diff --git a/.gitattributes b/.gitattributes index fa1385d99a319b..d0c3b3e9ccf66d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,5 @@ * -text +ports/** -linguist-detectable + +# Declare files that will always have LF line endings on checkout. +scripts/ci.baseline.txt text eol=lf \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/i-have-a-question.md b/.github/ISSUE_TEMPLATE/i-have-a-question.md index 7129976300e66d..643d43dce96ec6 100644 --- a/.github/ISSUE_TEMPLATE/i-have-a-question.md +++ b/.github/ISSUE_TEMPLATE/i-have-a-question.md @@ -7,4 +7,4 @@ assignees: '' --- -When asking a question please also include where you looked for an answer (so we can update the documentation if needed). +Please create a discussion in https://github.com/microsoft/vcpkg/discussions/new instead. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000000000..31be625f265ee3 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ +**Describe the pull request** + +- #### What does your PR fix? + Fixes #... + +- #### Which triplets are supported/not supported? Have you updated the [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)? + , + +- #### Does your PR follow the [maintainer guide](https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md)? + `Your answer` + +- #### If you have added/updated a port: Have you run `./vcpkg x-add-version --all` and committed the result? + + +**If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/** diff --git a/.github/workflows/trustedPR.yml b/.github/workflows/trustedPR.yml new file mode 100644 index 00000000000000..d45bfeb11c86bf --- /dev/null +++ b/.github/workflows/trustedPR.yml @@ -0,0 +1,58 @@ +# Modelled after https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ + +name: Post PR Suggestions + +on: + workflow_run: + workflows: ["PR Suggestions"] + types: + - completed + +jobs: + comment: + runs-on: ubuntu-latest + if: > + ${{ github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.conclusion == 'success' }} + + steps: + - name: 'Download artifact' + uses: actions/github-script@v3.1.0 + with: + script: | + var artifacts = await github.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{github.event.workflow_run.id }}, + }); + var matchArtifact = artifacts.data.artifacts.filter((artifact) => { + return artifact.name == "pr" + })[0]; + var download = await github.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', + }); + var fs = require('fs'); + fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); + - run: unzip pr.zip + + - uses: actions/github-script@v4 + with: + script: | + const { promises: fs } = require('fs') + const event = (await fs.readFile('event', 'utf8')).trim() + const body = (await fs.readFile('body', 'utf8')).trim() + const issue_number = Number(await fs.readFile('./NR')); + + var req = { + owner: context.repo.owner, + pull_number: issue_number, + repo: context.repo.repo, + event: event + }; + if (body !== "") { + req.body = body; + } + await github.pulls.createReview(req); diff --git a/.github/workflows/untrustedPR.yml b/.github/workflows/untrustedPR.yml new file mode 100644 index 00000000000000..cb77b745f8a2fb --- /dev/null +++ b/.github/workflows/untrustedPR.yml @@ -0,0 +1,121 @@ +# Modelled after https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ + +# These "checks" are also performed as part of our critical-path azure-pipelines review, +# however here they are better able to post back to the original PR +name: PR Suggestions + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + # fetch-depth 50 tries to ensure we capture the whole history of the branch + fetch-depth: 50 + + - uses: actions/cache@v2 + id: cache + with: + path: | + ./vcpkg + key: ${{ runner.os }}-${{ hashFiles('scripts/bootstrap*') }} + + - name: bootstrap + if: steps.cache.outputs.cache-hit != 'true' + run: ./bootstrap-vcpkg.sh + + - name: Save PR number + run: | + mkdir -p ./pr + echo ${{ github.event.number }} > ./pr/NR + + - name: Formatting + run: | + git config user.email github-actions + git config user.name github-actions@github.com + + git diff --name-status --merge-base HEAD^ HEAD --diff-filter=MAR -- '*portfile.cmake' | sed 's/[MAR]\t*//' | while read filename; do grep -q -E '(vcpkg_install_cmake|vcpkg_build_cmake|vcpkg_configure_cmake|vcpkg_fixup_cmake_targets)' "$filename" && echo " - \`$filename\`" || true; done > .github-pr.deprecated-cmake + ./vcpkg format-manifest --all --convert-control + git diff > .github-pr.format-manifest + git add -u + git commit -m "tmp" --allow-empty + # HEAD^^ refers to the "main" commit that was merged into + git checkout HEAD^^ -- versions + git restore --staged versions + ./vcpkg x-add-version --all --skip-formatting-check > .github-pr.x-add-version.out + git diff > .github-pr.x-add-version.diff + git reset HEAD~ --mixed + + - uses: actions/github-script@v4 + with: + script: | + const { promises: fs } = require('fs') + const add_version = (await fs.readFile('.github-pr.x-add-version.diff', 'utf8')).trim() + const add_version_out = (await fs.readFile('.github-pr.x-add-version.out', 'utf8')).trim() + const format = (await fs.readFile('.github-pr.format-manifest', 'utf8')).trim() + const cmake = (await fs.readFile('.github-pr.deprecated-cmake', 'utf8')).trim() + + let approve = true; + var output = '' + if (format !== "") { + output += "
All manifest files must be formatted\n\n" + output += "`./vcpkg format-manifest ports/*/vcpkg.json`\n" + output += "
Diff\n\n" + output += "```diff\n" + format + "\n```\n" + output += "
\n\n" + approve = false; + } + if (add_version_out !== "") { + output += "
PRs must add only one version and must not modify any published versions\n\n" + output += "When making any changes to a library, the version or port-version in `vcpkg.json` or `CONTROL` must be modified.\n" + output += "```\n" + add_version_out + "\n```\n
\n" + approve = false; + } + if (add_version !== "") { + output += "
After committing all other changes, the version database must be updated\n\n" + output += "```sh\n" + output += "git add -u && git commit\n" + output += "git checkout ${{ github.event.pull_request.base.sha }} -- versions\n" + output += "./vcpkg x-add-version --all\n" + output += "```\n" + output += "
Diff\n\n" + output += "```diff\n" + add_version + "\n```\n" + output += "
\n\n" + approve = false; + } + if (cmake !== "") { + output += "You have modified or added at least one portfile where deprecated functions are used.\n" + output += "
\n\n" + output += "If you feel able to do so, please consider migrating them to the new functions:\n" + output += " `vcpkg_install_cmake` -> `vcpkg_cmake_install` (from port `vcpkg-cmake`)\n" + output += " `vcpkg_build_cmake` -> `vcpkg_cmake_build` (from port `vcpkg-cmake`)\n" + output += " `vcpkg_configure_cmake` -> `vcpkg_cmake_configure` (Please remove the option `PREFER_NINJA`) (from port `vcpkg-cmake`)\n" + output += " `vcpkg_fixup_cmake_targets` -> `vcpkg_cmake_config_fixup` (from port `vcpkg-cmake-config`)\n" + output += "\n" + output += "In the ports that use the new function, you have to add the corresponding dependencies:\n" + output += "```json\n" + output += '{\n "name": "vcpkg-cmake",\n "host": true\n},\n' + output += '{\n "name": "vcpkg-cmake-config",\n "host": true\n}\n' + output += "```\n" + output += `The following files are affected:\n${cmake}\n` + output += "
\n" + } + + if (approve) { + await fs.writeFile("pr/event", "APPROVE") + } else { + output = "_This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!_\n\n" + output + await fs.writeFile("pr/event", "REQUEST_CHANGES") + } + await fs.writeFile("pr/body", output) + + console.log(output); + + - uses: actions/upload-artifact@v2 + with: + name: pr + path: pr/ diff --git a/.gitignore b/.gitignore index 2c7abc15df7a94..e238993507a51f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,9 +10,10 @@ *.user *.userosscache *.sln.docstates +/vcpkg-configuration.json -toolsrc/out* -toolsrc/CMakeSettings.json +# fuzzing +sync_dir* # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs @@ -286,40 +287,37 @@ __pycache__/ /installed*/ /packages/ /scripts/buildsystems/tmp/ -/toolsrc/build.rel/ -/toolsrc/msbuild.x86.debug/ -/toolsrc/msbuild.x86.release/ -/toolsrc/msbuild.x64.debug/ -/toolsrc/msbuild.x64.release/ #ignore custom triplets /triplets/* #add vcpkg-designed triplets back in -!triplets/arm-uwp.cmake -!triplets/arm-windows.cmake -!triplets/x64-uwp.cmake -!triplets/x64-windows.cmake -!triplets/x64-windows-static.cmake -!triplets/x86-uwp.cmake -!triplets/x86-windows.cmake -!triplets/x86-windows-static.cmake -!triplets/arm64-uwp.cmake -!triplets/arm64-windows.cmake -!triplets/x64-linux.cmake -!triplets/x64-osx.cmake +!/triplets/arm-uwp.cmake +!/triplets/arm64-windows.cmake +!/triplets/x64-linux.cmake +!/triplets/x64-osx.cmake +!/triplets/x64-uwp.cmake +!/triplets/x64-windows-static.cmake +!/triplets/x64-windows.cmake +!/triplets/x86-windows.cmake + +!/triplets/community +!/triplets/community/** + *.exe *.zip ############################################################ # vcpkg - End ############################################################ +vcpkg.disable-metrics archives - -############################################################ -# Maven - Start -############################################################ - +.DS_Store +prefab/ +*.swp + +################### +# Codespaces +################### +pythonenv3.8/ +.venv/ target/ - -############################################################ -# Maven - End -############################################################ +vcpkg_installed diff --git a/CHANGELOG.md b/CHANGELOG.md index ad2091da9e20c4..f44ad778efaeb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12494 @@ +vcpkg (2021.05.01 - 2021.05.12) + +--- +#### Total port count: 1669 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1531| +|**x64-linux**|1441| +|**x64-osx**|1348| +|x86-windows|1521| +|x64-windows-static-md|1468| +|x64-windows-static|1455| +|arm64-windows|1139| +|x64-uwp|856| +|arm-uwp|811| + +
+The following documentation has been updated: + +- [registries.md](docs/maintainers/registries.md) ***[NEW]*** + - [(#17672)](https://github.com/microsoft/vcpkg/pull/17672) [docs registries] Add reference documentation (by @strega-nil) +- [registries.md](docs/users/registries.md) ***[NEW]*** + - [(#17672)](https://github.com/microsoft/vcpkg/pull/17672) [docs registries] Add reference documentation (by @strega-nil) +- [privacy.md](docs/about/privacy.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [modify-baseline-to-pin-old-boost.md](docs/examples/modify-baseline-to-pin-old-boost.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [vcpkg_android.cmake](docs/examples/vcpkg_android_example_cmake_script/cmake/vcpkg_android.cmake) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [versioning.getting-started.md](docs/examples/versioning.getting-started.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) + - [(#17580)](https://github.com/microsoft/vcpkg/pull/17580) [docs] Consolidate versioning documentation (by @ras0219-msft) +- [control-files.md](docs/maintainers/control-files.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [maintainer-guide.md](docs/maintainers/maintainer-guide.md) + - [(#17580)](https://github.com/microsoft/vcpkg/pull/17580) [docs] Consolidate versioning documentation (by @ras0219-msft) +- [manifest-files.md](docs/maintainers/manifest-files.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [portfile-functions.md](docs/maintainers/portfile-functions.md) + - [(#17179)](https://github.com/microsoft/vcpkg/pull/17179) [docs] link to new functions in deprecated warnings (by @autoantwort) +- [vcpkg_cmake_configure.md](docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [vcpkg_apply_patches.md](docs/maintainers/vcpkg_apply_patches.md) + - [(#17179)](https://github.com/microsoft/vcpkg/pull/17179) [docs] link to new functions in deprecated warnings (by @autoantwort) +- [vcpkg_build_cmake.md](docs/maintainers/vcpkg_build_cmake.md) + - [(#17179)](https://github.com/microsoft/vcpkg/pull/17179) [docs] link to new functions in deprecated warnings (by @autoantwort) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [vcpkg_build_make.md](docs/maintainers/vcpkg_build_make.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [vcpkg_build_nmake.md](docs/maintainers/vcpkg_build_nmake.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [vcpkg_configure_cmake.md](docs/maintainers/vcpkg_configure_cmake.md) + - [(#17179)](https://github.com/microsoft/vcpkg/pull/17179) [docs] link to new functions in deprecated warnings (by @autoantwort) +- [vcpkg_copy_tools.md](docs/maintainers/vcpkg_copy_tools.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [vcpkg_fixup_cmake_targets.md](docs/maintainers/vcpkg_fixup_cmake_targets.md) + - [(#17179)](https://github.com/microsoft/vcpkg/pull/17179) [docs] link to new functions in deprecated warnings (by @autoantwort) +- [vcpkg_install_cmake.md](docs/maintainers/vcpkg_install_cmake.md) + - [(#17179)](https://github.com/microsoft/vcpkg/pull/17179) [docs] link to new functions in deprecated warnings (by @autoantwort) +- [README.md](docs/README.md) + - [(#17672)](https://github.com/microsoft/vcpkg/pull/17672) [docs registries] Add reference documentation (by @strega-nil) +- [regenerate.ps1](docs/regenerate.ps1) + - [(#17179)](https://github.com/microsoft/vcpkg/pull/17179) [docs] link to new functions in deprecated warnings (by @autoantwort) +- [prefab.md](docs/specifications/prefab.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [registries.md](docs/specifications/registries.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [registries-2.md](docs/specifications/registries-2.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [versioning.md](docs/specifications/versioning.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [android.md](docs/users/android.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [config-environment.md](docs/users/config-environment.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) + - [(#17580)](https://github.com/microsoft/vcpkg/pull/17580) [docs] Consolidate versioning documentation (by @ras0219-msft) +- [manifests.md](docs/users/manifests.md) + - [(#17580)](https://github.com/microsoft/vcpkg/pull/17580) [docs] Consolidate versioning documentation (by @ras0219-msft) +- [versioning.implementation-details.md](docs/users/versioning.implementation-details.md) + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [versioning.md](docs/users/versioning.md) + - [(#17580)](https://github.com/microsoft/vcpkg/pull/17580) [docs] Consolidate versioning documentation (by @ras0219-msft) +- [versioning.reference.md](docs/users/versioning.reference.md) + - [(#17580)](https://github.com/microsoft/vcpkg/pull/17580) [docs] Consolidate versioning documentation (by @ras0219-msft) + +
+The following changes have been made to vcpkg: + +- [(#16577)](https://github.com/microsoft/vcpkg/pull/16577) [icu] add host depedency (by @autoantwort) +- [(#16847)](https://github.com/microsoft/vcpkg/pull/16847) Compile for android including armv6. (by @talregev) +- [(#16965)](https://github.com/microsoft/vcpkg/pull/16965) [libfido2] New port (by @xgcssch) +- [(#17019)](https://github.com/microsoft/vcpkg/pull/17019) [fontconfig] Add cflags in tools build command (by @xandox) +- [(#17032)](https://github.com/microsoft/vcpkg/pull/17032) [libtcod] Update to 1.16.7 (by @HexDecimal) +- [(#17063)](https://github.com/microsoft/vcpkg/pull/17063) [cpuinfo,fbgemm,nnpack] update to latest source version and rename targets (by @luncliff) +- [(#17065)](https://github.com/microsoft/vcpkg/pull/17065) [qnnpack] create a new port (by @luncliff) +- [(#17099)](https://github.com/microsoft/vcpkg/pull/17099) [Forge] update version to 1.0.7 (by @9prady9) +- [(#17179)](https://github.com/microsoft/vcpkg/pull/17179) [docs] link to new functions in deprecated warnings (by @autoantwort) +- [(#17204)](https://github.com/microsoft/vcpkg/pull/17204) [ffmpeg] avdevice CoreAudio dependency fix for osx (by @mcmtroffaes) +- [(#17266)](https://github.com/microsoft/vcpkg/pull/17266) [libarchive] disable libb2 until properly handled (by @cenit) +- [(#17299)](https://github.com/microsoft/vcpkg/pull/17299) [ffmpeg] soxr dependency fix (by @mcmtroffaes) +- [(#17424)](https://github.com/microsoft/vcpkg/pull/17424) [grpc] Create codegen feature (by @ras0219) +- [(#17431)](https://github.com/microsoft/vcpkg/pull/17431) [nccl] Remove NCCL auto-download due to licensing issues (by @jacobkahn) +- [(#17456)](https://github.com/microsoft/vcpkg/pull/17456) [Openssl] Fix mingw build (by @dg0yt) +- [(#17533)](https://github.com/microsoft/vcpkg/pull/17533) [cryptopp] Update to 8.5.0 (by @orudge) +- [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- [(#17580)](https://github.com/microsoft/vcpkg/pull/17580) [docs] Consolidate versioning documentation (by @ras0219-msft) +- [(#17589)](https://github.com/microsoft/vcpkg/pull/17589) [ghc-filesystem] Fix port/package name discrepancy (by @AndyBrown91) +- [(#17593)](https://github.com/microsoft/vcpkg/pull/17593) [vcpkg baseline][libheif] fix CI errors if gdk-pixbuf can be found (by @Neumann-A) +- [(#17596)](https://github.com/microsoft/vcpkg/pull/17596) [cairo] Windows: Fix cairo dll definition (by @Neumann-A) +- [(#17597)](https://github.com/microsoft/vcpkg/pull/17597) [infoware] Bump version to 0.6.0 (by @nabijaczleweli) +- [(#17598)](https://github.com/microsoft/vcpkg/pull/17598) [hdf5] fix pc files (by @Neumann-A) +- [(#17610)](https://github.com/microsoft/vcpkg/pull/17610) [hidapi] fix mac build (by @autoantwort) +- [(#17611)](https://github.com/microsoft/vcpkg/pull/17611) [asio] Add inline dummy return patch (by @pratikpc) +- [(#17620)](https://github.com/microsoft/vcpkg/pull/17620) [cairo] update to 1.17.4 (by @Neumann-A) +- [(#17624)](https://github.com/microsoft/vcpkg/pull/17624) [libass] Update to 0.15.1 (by @Masaiki) +- [(#17625)](https://github.com/microsoft/vcpkg/pull/17625) [ffmpeg] fix optional X11 platform dependencies (by @mcmtroffaes) +- [(#17629)](https://github.com/microsoft/vcpkg/pull/17629) [msmpi] Update the download hash (by @JackBoosY) +- [(#17631)](https://github.com/microsoft/vcpkg/pull/17631) [tool-meson] update to 0.58 (by @Neumann-A) +- [(#17633)](https://github.com/microsoft/vcpkg/pull/17633) Add g++-11 support (by @xieyubo) +- [(#17634)](https://github.com/microsoft/vcpkg/pull/17634) [pthreadpool] remove unused dependency (by @luncliff) +- [(#17637)](https://github.com/microsoft/vcpkg/pull/17637) [libffi] Update patch to fix apply patch failure (by @JackBoosY) +- [(#17641)](https://github.com/microsoft/vcpkg/pull/17641) [DCMTK] Update to 3.6.6 (by @BigSeb) +- [(#17648)](https://github.com/microsoft/vcpkg/pull/17648) [seal]Updated to version 3.6.4 (by @WeiDaiWD) +- [(#17659)](https://github.com/microsoft/vcpkg/pull/17659) [ffmpeg] fix dnn dependency (by @mcmtroffaes) +- [(#17661)](https://github.com/microsoft/vcpkg/pull/17661) [google-cloud-cpp] update to latest (v1.27.0) version (by @coryan) +- [(#17666)](https://github.com/microsoft/vcpkg/pull/17666) [qt5-base] fix install / packages dir being on different drives (by @Neumann-A) +- [(#17669)](https://github.com/microsoft/vcpkg/pull/17669) [gtkmm] Update to 4.0.1 (by @Neumann-A) +- [(#17670)](https://github.com/microsoft/vcpkg/pull/17670) [gtk] update to 4.3.0 (by @Neumann-A) +- [(#17672)](https://github.com/microsoft/vcpkg/pull/17672) [docs registries] Add reference documentation (by @strega-nil) +- [(#17675)](https://github.com/microsoft/vcpkg/pull/17675) [Hedley] Update to v15 (by @pratikpc) +- [(#17682)](https://github.com/microsoft/vcpkg/pull/17682) [fann] Support UNIX, re-fix installation (by @JackBoosY) +- [(#17683)](https://github.com/microsoft/vcpkg/pull/17683) [igraph] update to 0.9.3 (by @szhorvat) +- [(#17689)](https://github.com/microsoft/vcpkg/pull/17689) [vcpkg] Update vcpkg tool version 2021-05-05 (by @ras0219-msft) +- [(#17706)](https://github.com/microsoft/vcpkg/pull/17706) [vcpkg] Update cmake to 3.20.2 (by @Neumann-A) +- [(#17709)](https://github.com/microsoft/vcpkg/pull/17709) [gtest] Update to the latest commit (by @JonLiu1993) +- [(#17710)](https://github.com/microsoft/vcpkg/pull/17710) [libheif] Install pdbs (by @JackBoosY) +- [(#17711)](https://github.com/microsoft/vcpkg/pull/17711) [protopuf] Update to 2.0.0 (by @PragmaTwice) +- [(#17714)](https://github.com/microsoft/vcpkg/pull/17714) [vcpkg baseline][asiosdk] Update hash (by @NancyLi1013) +- [(#17733)](https://github.com/microsoft/vcpkg/pull/17733) [brynet] upgrade version 1.11.0 (by @IronsDu) +- [(#17736)](https://github.com/microsoft/vcpkg/pull/17736) [draco] Fix build error in gcc 11 (by @NancyLi1013) +- [(#17749)](https://github.com/microsoft/vcpkg/pull/17749) [d3dx12] update port (by @walbourn) +- [(#17771)](https://github.com/microsoft/vcpkg/pull/17771) [fastlz] update to the latest commit (by @JonLiu1993) +- [(#17774)](https://github.com/microsoft/vcpkg/pull/17774) [abseil] vcpkg_fixup_pkgconfig (by @Neumann-A) +- [(#17775)](https://github.com/microsoft/vcpkg/pull/17775) [allgero5] vcpkg_fixup_pkgconfig (by @Neumann-A) +- [(#17797)](https://github.com/microsoft/vcpkg/pull/17797) [vcpkg baseline][chartdir] Update version to 7.0.0 (by @Cheney-W) +- [(#17862)](https://github.com/microsoft/vcpkg/pull/17862) [sobjectizer] Update to 5.7.2.4 (by @eao197) + +
+ +
+The following 50 ports have been updated: + +- google-cloud-cpp `#0` -> `#0` + - [(#17661)](https://github.com/microsoft/vcpkg/pull/17661) [google-cloud-cpp] update to latest (v1.27.0) version (by @coryan) +- fbgemm `#0` -> `#0` + - [(#17063)](https://github.com/microsoft/vcpkg/pull/17063) [cpuinfo,fbgemm,nnpack] update to latest source version and rename targets (by @luncliff) +- icu `69.1#8` -> `69.1#0` + - [(#16577)](https://github.com/microsoft/vcpkg/pull/16577) [icu] add host depedency (by @autoantwort) +- ghc-filesystem `#0` -> `#0` + - [(#17589)](https://github.com/microsoft/vcpkg/pull/17589) [ghc-filesystem] Fix port/package name discrepancy (by @AndyBrown91) +- vcpkg-cmake `#0` -> `#0` + - [(#17560)](https://github.com/microsoft/vcpkg/pull/17560) [doc] Fix spelling errors (by @dg0yt) +- grpc `#0` -> `#0` + - [(#17424)](https://github.com/microsoft/vcpkg/pull/17424) [grpc] Create codegen feature (by @ras0219) +- sobjectizer `#0` -> `#0` + - [(#17862)](https://github.com/microsoft/vcpkg/pull/17862) [sobjectizer] Update to 5.7.2.4 (by @eao197) +- openssl `1.1.1k#0` -> `1.1.1k#0` + - [(#17456)](https://github.com/microsoft/vcpkg/pull/17456) [Openssl] Fix mingw build (by @dg0yt) +- cryptopp `8.2.0-2#0` -> `8.5.0#0` + - [(#17533)](https://github.com/microsoft/vcpkg/pull/17533) [cryptopp] Update to 8.5.0 (by @orudge) +- pthreadpool `#0` -> `#0` + - [(#17634)](https://github.com/microsoft/vcpkg/pull/17634) [pthreadpool] remove unused dependency (by @luncliff) +- dcmtk `3.6.5+_20191213#0` -> `3.6.6#0` + - [(#17641)](https://github.com/microsoft/vcpkg/pull/17641) [DCMTK] Update to 3.6.6 (by @BigSeb) +- cairo `#0` -> `#0` + - [(#17596)](https://github.com/microsoft/vcpkg/pull/17596) [cairo] Windows: Fix cairo dll definition (by @Neumann-A) + - [(#17620)](https://github.com/microsoft/vcpkg/pull/17620) [cairo] update to 1.17.4 (by @Neumann-A) +- libfido2 `#0` -> `#0` + - [(#16965)](https://github.com/microsoft/vcpkg/pull/16965) [libfido2] New port (by @xgcssch) +- allegro5 `5.2.6.0#0` -> `5.2.6.0#0` + - [(#17775)](https://github.com/microsoft/vcpkg/pull/17775) [allgero5] vcpkg_fixup_pkgconfig (by @Neumann-A) +- draco `1.3.6#0` -> `1.3.6#0` + - [(#17736)](https://github.com/microsoft/vcpkg/pull/17736) [draco] Fix build error in gcc 11 (by @NancyLi1013) +- protopuf `1.0.1#0` -> `1.0.1#0` + - [(#17711)](https://github.com/microsoft/vcpkg/pull/17711) [protopuf] Update to 2.0.0 (by @PragmaTwice) +- cpuinfo `2019-07-28-1#0` -> `2019-07-28-1#0` + - [(#17063)](https://github.com/microsoft/vcpkg/pull/17063) [cpuinfo,fbgemm,nnpack] update to latest source version and rename targets (by @luncliff) +- igraph `#0` -> `#0` + - [(#17683)](https://github.com/microsoft/vcpkg/pull/17683) [igraph] update to 0.9.3 (by @szhorvat) +- tool-meson `0.56.02#0` -> `0.56.02#0` + - [(#17631)](https://github.com/microsoft/vcpkg/pull/17631) [tool-meson] update to 0.58 (by @Neumann-A) +- libtcod `1.16.6#0` -> `1.16.6#0` + - [(#17032)](https://github.com/microsoft/vcpkg/pull/17032) [libtcod] Update to 1.16.7 (by @HexDecimal) +- chartdir `6.3.1#2` -> `6.3.1#0` + - [(#17797)](https://github.com/microsoft/vcpkg/pull/17797) [vcpkg baseline][chartdir] Update version to 7.0.0 (by @Cheney-W) +- fontconfig `2.13.1#6` -> `2.13.1#7` + - [(#17019)](https://github.com/microsoft/vcpkg/pull/17019) [fontconfig] Add cflags in tools build command (by @xandox) +- hidapi `#0` -> `#0` + - [(#17610)](https://github.com/microsoft/vcpkg/pull/17610) [hidapi] fix mac build (by @autoantwort) +- asio `#0` -> `#0` + - [(#17611)](https://github.com/microsoft/vcpkg/pull/17611) [asio] Add inline dummy return patch (by @pratikpc) +- seal `3.6.2#0` -> `3.6.4#0` + - [(#17648)](https://github.com/microsoft/vcpkg/pull/17648) [seal]Updated to version 3.6.4 (by @WeiDaiWD) +- libass `0.15.0#0` -> `0.15.0#0` + - [(#17624)](https://github.com/microsoft/vcpkg/pull/17624) [libass] Update to 0.15.1 (by @Masaiki) +- forge `#0` -> `#0` + - [(#17099)](https://github.com/microsoft/vcpkg/pull/17099) [Forge] update version to 1.0.7 (by @9prady9) +- qt5-base `#0` -> `#0` + - [(#17666)](https://github.com/microsoft/vcpkg/pull/17666) [qt5-base] fix install / packages dir being on different drives (by @Neumann-A) +- d3dx12 `may2020#0` -> `may2021#0` + - [(#17749)](https://github.com/microsoft/vcpkg/pull/17749) [d3dx12] update port (by @walbourn) +- qnnpack `#0` -> `#0` + - [(#17065)](https://github.com/microsoft/vcpkg/pull/17065) [qnnpack] create a new port (by @luncliff) +- asiosdk `2.3.3-1#0` -> `2.3.3-1#0` + - [(#17714)](https://github.com/microsoft/vcpkg/pull/17714) [vcpkg baseline][asiosdk] Update hash (by @NancyLi1013) +- liblsl `1.14.0#0` -> `1.14.0#1` + - [(#17689)](https://github.com/microsoft/vcpkg/pull/17689) [vcpkg] Update vcpkg tool version 2021-05-05 (by @ras0219-msft) +- libheif `1.10.0#0` -> `1.10.0#0` + - [(#17593)](https://github.com/microsoft/vcpkg/pull/17593) [vcpkg baseline][libheif] fix CI errors if gdk-pixbuf can be found (by @Neumann-A) + - [(#17710)](https://github.com/microsoft/vcpkg/pull/17710) [libheif] Install pdbs (by @JackBoosY) +- hedley `14#0` -> `14#0` + - [(#17675)](https://github.com/microsoft/vcpkg/pull/17675) [Hedley] Update to v15 (by @pratikpc) +- infoware `0.5.5#0` -> `0.6.0#0` + - [(#17597)](https://github.com/microsoft/vcpkg/pull/17597) [infoware] Bump version to 0.6.0 (by @nabijaczleweli) +- fann `2.2.0-1#0` -> `2.2.0-1#0` + - [(#17682)](https://github.com/microsoft/vcpkg/pull/17682) [fann] Support UNIX, re-fix installation (by @JackBoosY) +- libffi `#0` -> `#0` + - [(#17637)](https://github.com/microsoft/vcpkg/pull/17637) [libffi] Update patch to fix apply patch failure (by @JackBoosY) +- abseil `#0` -> `#0` + - [(#17774)](https://github.com/microsoft/vcpkg/pull/17774) [abseil] vcpkg_fixup_pkgconfig (by @Neumann-A) +- brynet `1.10.0#0` -> `1.11.0#0` + - [(#17733)](https://github.com/microsoft/vcpkg/pull/17733) [brynet] upgrade version 1.11.0 (by @IronsDu) +- libarchive `#0` -> `#0` + - [(#17266)](https://github.com/microsoft/vcpkg/pull/17266) [libarchive] disable libb2 until properly handled (by @cenit) +- gtk `#0` -> `#0` + - [(#17670)](https://github.com/microsoft/vcpkg/pull/17670) [gtk] update to 4.3.0 (by @Neumann-A) +- protobuf `#0` -> `#0` + - [(#17689)](https://github.com/microsoft/vcpkg/pull/17689) [vcpkg] Update vcpkg tool version 2021-05-05 (by @ras0219-msft) +- nnpack `#0` -> `#0` + - [(#17063)](https://github.com/microsoft/vcpkg/pull/17063) [cpuinfo,fbgemm,nnpack] update to latest source version and rename targets (by @luncliff) +- gtkmm `#0` -> `#0` + - [(#17669)](https://github.com/microsoft/vcpkg/pull/17669) [gtkmm] Update to 4.0.1 (by @Neumann-A) +- msmpi `10.1#0` -> `10.1#0` + - [(#17629)](https://github.com/microsoft/vcpkg/pull/17629) [msmpi] Update the download hash (by @JackBoosY) +- fastlz `1.0-3#0` -> `1.0-3#0` + - [(#17771)](https://github.com/microsoft/vcpkg/pull/17771) [fastlz] update to the latest commit (by @JonLiu1993) +- nccl `2.4.6#0` -> `2.4.6#0` + - [(#17431)](https://github.com/microsoft/vcpkg/pull/17431) [nccl] Remove NCCL auto-download due to licensing issues (by @jacobkahn) +- gtest `1.10.0#4` -> `1.10.0#0` + - [(#17709)](https://github.com/microsoft/vcpkg/pull/17709) [gtest] Update to the latest commit (by @JonLiu1993) +- hdf5 `1.12.0#1` -> `1.12.0#0` + - [(#17598)](https://github.com/microsoft/vcpkg/pull/17598) [hdf5] fix pc files (by @Neumann-A) +- ffmpeg `4.3.2#7` -> `4.3.2#11` + - [(#17204)](https://github.com/microsoft/vcpkg/pull/17204) [ffmpeg] avdevice CoreAudio dependency fix for osx (by @mcmtroffaes) + - [(#17299)](https://github.com/microsoft/vcpkg/pull/17299) [ffmpeg] soxr dependency fix (by @mcmtroffaes) + - [(#17625)](https://github.com/microsoft/vcpkg/pull/17625) [ffmpeg] fix optional X11 platform dependencies (by @mcmtroffaes) + - [(#17659)](https://github.com/microsoft/vcpkg/pull/17659) [ffmpeg] fix dnn dependency (by @mcmtroffaes) + +
+ +-- vcpkg team vcpkg@microsoft.com Thu, 13 May 00:00:00 -0700 + + +vcpkg (2020.11.03 - 2021.04.30) +--- +#### Total port count: 1667 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|**1523**| +|**x64-linux**|**1433**| +|**x64-osx**|**1333**| +|x86-windows|1483| +|x64-windows-static-md|1441| +|x64-windows-static|1421| +|arm64-windows|1096| +|x64-uwp|829| +|arm-uwp|783| + +
+ +The following documentation has been updated: + +- [modify-baseline-to-pin-old-boost.md](docs/examples/modify-baseline-to-pin-old-boost.md) ***[NEW]*** + - [(#16381)](https://github.com/microsoft/vcpkg/pull/16381) [vcpkg] [docs] Add Boost versioning example (by @vicroms) +- [z_vcpkg_apply_patches.md](docs/maintainers/internal/z_vcpkg_apply_patches.md) ***[NEW]*** + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [z_vcpkg_function_arguments.md](docs/maintainers/internal/z_vcpkg_function_arguments.md) ***[NEW]*** + - [(#16130)](https://github.com/microsoft/vcpkg/pull/16130) [(z_)vcpkg_prettify_command(_line)] Scripts Tree Audit (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [z_vcpkg_prettify_command_line.md](docs/maintainers/internal/z_vcpkg_prettify_command_line.md) ***[NEW]*** + - [(#16130)](https://github.com/microsoft/vcpkg/pull/16130) [(z_)vcpkg_prettify_command(_line)] Scripts Tree Audit (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg-cmake.md](docs/maintainers/ports/vcpkg-cmake.md) ***[NEW]*** + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) +- [vcpkg_cmake_build.md](docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md) ***[NEW]*** + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_cmake_configure.md](docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md) ***[NEW]*** + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_cmake_install.md](docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md) ***[NEW]*** + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg-cmake-config.md](docs/maintainers/ports/vcpkg-cmake-config.md) ***[NEW]*** + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) +- [vcpkg_cmake_config_fixup.md](docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md) ***[NEW]*** + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg-pkgconfig-get-modules.md](docs/maintainers/ports/vcpkg-pkgconfig-get-modules.md) ***[NEW]*** + - [(#16954)](https://github.com/microsoft/vcpkg/pull/16954) [vcpkg baseline][qt5-base] Fix glib link issues on linux (by @Neumann-A) +- [x_vcpkg_pkgconfig_get_modules.md](docs/maintainers/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.md) ***[NEW]*** + - [(#16954)](https://github.com/microsoft/vcpkg/pull/16954) [vcpkg baseline][qt5-base] Fix glib link issues on linux (by @Neumann-A) +- [vcpkg_build_qmake.md](docs/maintainers/vcpkg_build_qmake.md) ***[NEW]*** + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_buildpath_length_warning.md](docs/maintainers/vcpkg_buildpath_length_warning.md) ***[NEW]*** + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16191)](https://github.com/microsoft/vcpkg/pull/16191) [scripts-audit] vcpkg_buildpath_length_warning (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_configure_qmake.md](docs/maintainers/vcpkg_configure_qmake.md) ***[NEW]*** + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_execute_in_download_mode.md](docs/maintainers/vcpkg_execute_in_download_mode.md) ***[NEW]*** + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_execute_required_process_repeat.md](docs/maintainers/vcpkg_execute_required_process_repeat.md) ***[NEW]*** + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_find_fortran.md](docs/maintainers/vcpkg_find_fortran.md) ***[NEW]*** + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_get_program_files_platform_bitness.md](docs/maintainers/vcpkg_get_program_files_platform_bitness.md) ***[NEW]*** + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_get_windows_sdk.md](docs/maintainers/vcpkg_get_windows_sdk.md) ***[NEW]*** + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_internal_get_cmake_vars.md](docs/maintainers/vcpkg_internal_get_cmake_vars.md) ***[NEW]*** + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) +- [vcpkg_minimum_required.md](docs/maintainers/vcpkg_minimum_required.md) ***[NEW]*** + - [(#15638)](https://github.com/microsoft/vcpkg/pull/15638) [vcpkg] Add vcpkg_minimum_required as a replacement for VERSION.txt. (by @BillyONeal) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_replace_string.md](docs/maintainers/vcpkg_replace_string.md) ***[NEW]*** + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [registries-2.md](docs/specifications/registries-2.md) ***[NEW]*** + - [(#13590)](https://github.com/microsoft/vcpkg/pull/13590) [vcpkg registries] Registries: Take 2 (by @strega-nil) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [scripts-extraction.md](docs/specifications/scripts-extraction.md) ***[NEW]*** + - [(#16055)](https://github.com/microsoft/vcpkg/pull/16055) [vcpkg] Add scripts tree extraction notes. (by @BillyONeal) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [versioning.md](docs/specifications/versioning.md) ***[NEW]*** + - [(#11758)](https://github.com/microsoft/vcpkg/pull/11758) [vcpkg] RFC: Versioning (by @vicroms) + - [(#15784)](https://github.com/microsoft/vcpkg/pull/15784) [vcpkg] Rename `port_versions` to `versions` (by @strega-nil) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [host-dependencies.md](docs/users/host-dependencies.md) ***[NEW]*** + - [(#16627)](https://github.com/microsoft/vcpkg/pull/16627) [host dependencies] add support in the scripts (by @strega-nil) +- [mingw.md](docs/users/mingw.md) ***[NEW]*** + - [(#17219)](https://github.com/microsoft/vcpkg/pull/17219) Add mingw documentation (by @dg0yt) +- [versioning.getting-started.md](docs/users/versioning.getting-started.md) ***[NEW]*** + - [(#15693)](https://github.com/microsoft/vcpkg/pull/15693) [vcpkg] More versioning docs (by @vicroms) + - [(#16324)](https://github.com/microsoft/vcpkg/pull/16324) [vcpkg docs] Update the versioning.getting-started.md (by @PhoebeHui) +- [versioning.implementation-details.md](docs/users/versioning.implementation-details.md) ***[NEW]*** + - [(#15693)](https://github.com/microsoft/vcpkg/pull/15693) [vcpkg] More versioning docs (by @vicroms) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [versioning.md](docs/users/versioning.md) ***[NEW]*** + - [(#15565)](https://github.com/microsoft/vcpkg/pull/15565) [vcpkg] Add initial versioning documentation (by @ras0219) + - [(#15693)](https://github.com/microsoft/vcpkg/pull/15693) [vcpkg] More versioning docs (by @vicroms) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [versioning.reference.md](docs/users/versioning.reference.md) ***[NEW]*** + - [(#15693)](https://github.com/microsoft/vcpkg/pull/15693) [vcpkg] More versioning docs (by @vicroms) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [faq.md](docs/about/faq.md) + - [(#15845)](https://github.com/microsoft/vcpkg/pull/15845) [docs] Correct the "new port requests" link in FAQ (by @claremacrae) + - [(#17257)](https://github.com/microsoft/vcpkg/pull/17257) [vcpkg docs] Add the procedure for updating vcpkg to faq (by @PhoebeHui) + - [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [privacy.md](docs/about/privacy.md) + - [(#15474)](https://github.com/microsoft/vcpkg/pull/15474) [vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (by @BillyONeal) +- [manifest-mode-cmake.md](docs/examples/manifest-mode-cmake.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#17502)](https://github.com/microsoft/vcpkg/pull/17502) [doc] Fix example code. (by @w-gomes) +- [packaging-github-repos.md](docs/examples/packaging-github-repos.md) + - [(#15018)](https://github.com/microsoft/vcpkg/pull/15018) [cppunit] add linux support and bump version to 1.15.1 (by @dweckmann) +- [packaging-zipfiles.md](docs/examples/packaging-zipfiles.md) + - [(#15018)](https://github.com/microsoft/vcpkg/pull/15018) [cppunit] add linux support and bump version to 1.15.1 (by @dweckmann) +- [patching.md](docs/examples/patching.md) + - [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [versioning.getting-started.md](docs/examples/versioning.getting-started.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [index.md](docs/index.md) + - [(#14833)](https://github.com/microsoft/vcpkg/pull/14833) Fix broken doc link (by @TeeVenDick) + - [(#16421)](https://github.com/microsoft/vcpkg/pull/16421) [docs] Add references to awesome community websites. Fixes #16278 (by @ras0219) + - [(#16489)](https://github.com/microsoft/vcpkg/pull/16489) [docs] Update to Community Resources in doc (by @Balnian) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#16522)](https://github.com/microsoft/vcpkg/pull/16522) [vcpkg docs] Fix typo in docs/index.md (by @sbc100) + - [(#16627)](https://github.com/microsoft/vcpkg/pull/16627) [host dependencies] add support in the scripts (by @strega-nil) +- [control-files.md](docs/maintainers/control-files.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#17214)](https://github.com/microsoft/vcpkg/pull/17214) [doc] Improve manifest documentation links (by @dg0yt) + - [(#17439)](https://github.com/microsoft/vcpkg/pull/17439) control-files.md: fix dead link and add command how to convert files (by @autoantwort) + - [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [execute_process.md](docs/maintainers/execute_process.md) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_internal_get_cmake_vars.md](docs/maintainers/internal/vcpkg_internal_get_cmake_vars.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [maintainer-guide.md](docs/maintainers/maintainer-guide.md) + - [(#15171)](https://github.com/microsoft/vcpkg/pull/15171) [docs] Document acceptable uses for features. (by @BillyONeal) + - [(#15655)](https://github.com/microsoft/vcpkg/pull/15655) [vcpkg] Add CI check for version files and update maintainer's guideline (by @vicroms) + - [(#15784)](https://github.com/microsoft/vcpkg/pull/15784) [vcpkg] Rename `port_versions` to `versions` (by @strega-nil) + - [(#16480)](https://github.com/microsoft/vcpkg/pull/16480) [vcpkg_*_cmake] remove deprecation message (by @strega-nil) + - [(#16795)](https://github.com/microsoft/vcpkg/pull/16795) [docs] link to up to date versioning specification (by @autoantwort) + - [(#16852)](https://github.com/microsoft/vcpkg/pull/16852) [maintainer-guide] Clarify best practices for default features (by @ras0219-msft) +- [manifest-files.md](docs/maintainers/manifest-files.md) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#17549)](https://github.com/microsoft/vcpkg/pull/17549) [doc] Update manifest to reference versioning spec (by @mathisloge) +- [portfile-functions.md](docs/maintainers/portfile-functions.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#14914)](https://github.com/microsoft/vcpkg/pull/14914) [docs] fix pwsh sorting (by @strega-nil) + - [(#15638)](https://github.com/microsoft/vcpkg/pull/15638) [vcpkg] Add vcpkg_minimum_required as a replacement for VERSION.txt. (by @BillyONeal) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16130)](https://github.com/microsoft/vcpkg/pull/16130) [(z_)vcpkg_prettify_command(_line)] Scripts Tree Audit (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16954)](https://github.com/microsoft/vcpkg/pull/16954) [vcpkg baseline][qt5-base] Fix glib link issues on linux (by @Neumann-A) +- [vcpkg_acquire_msys.md](docs/maintainers/vcpkg_acquire_msys.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_add_to_path.md](docs/maintainers/vcpkg_add_to_path.md) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16189)](https://github.com/microsoft/vcpkg/pull/16189) [scripts-audit] vcpkg_add_to_path (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_apply_patches.md](docs/maintainers/vcpkg_apply_patches.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_build_cmake.md](docs/maintainers/vcpkg_build_cmake.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_build_gn.md](docs/maintainers/vcpkg_build_gn.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_build_make.md](docs/maintainers/vcpkg_build_make.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#14891)](https://github.com/microsoft/vcpkg/pull/14891) [python3] Build interpreter (by @Hoikas) + - [(#15419)](https://github.com/microsoft/vcpkg/pull/15419) [docs] fix "CMake script" -> "makefile" for vcpkg_(n)build_make (by @tueda) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_build_msbuild.md](docs/maintainers/vcpkg_build_msbuild.md) + - [(#15018)](https://github.com/microsoft/vcpkg/pull/15018) [cppunit] add linux support and bump version to 1.15.1 (by @dweckmann) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_build_ninja.md](docs/maintainers/vcpkg_build_ninja.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_build_nmake.md](docs/maintainers/vcpkg_build_nmake.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#15419)](https://github.com/microsoft/vcpkg/pull/15419) [docs] fix "CMake script" -> "makefile" for vcpkg_(n)build_make (by @tueda) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_check_features.md](docs/maintainers/vcpkg_check_features.md) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_check_linkage.md](docs/maintainers/vcpkg_check_linkage.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#15832)](https://github.com/microsoft/vcpkg/pull/15832) [vcpkg] clarify the actions of vcpkg_check_linkage (by @barcharcraz) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_clean_executables_in_bin.md](docs/maintainers/vcpkg_clean_executables_in_bin.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_clean_msbuild.md](docs/maintainers/vcpkg_clean_msbuild.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_common_definitions.md](docs/maintainers/vcpkg_common_definitions.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14549)](https://github.com/microsoft/vcpkg/pull/14549) [vcpkg] initial openbsd (community) support (by @jgilje) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#15725)](https://github.com/microsoft/vcpkg/pull/15725) [aws-cpp-sdk] [zlib] [openssl] [curl] Fix zlib, OpenSSL, curl and AWS SDK for Android (by @ahmedyarub) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) + - [(#16627)](https://github.com/microsoft/vcpkg/pull/16627) [host dependencies] add support in the scripts (by @strega-nil) + - [(#16900)](https://github.com/microsoft/vcpkg/pull/16900) [vcpkg/scripts] add variable VCPKG_CROSSCOMPILING (by @Neumann-A) +- [vcpkg_configure_cmake.md](docs/maintainers/vcpkg_configure_cmake.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_configure_gn.md](docs/maintainers/vcpkg_configure_gn.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_configure_make.md](docs/maintainers/vcpkg_configure_make.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_configure_meson.md](docs/maintainers/vcpkg_configure_meson.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_copy_pdbs.md](docs/maintainers/vcpkg_copy_pdbs.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_copy_tool_dependencies.md](docs/maintainers/vcpkg_copy_tool_dependencies.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_copy_tools.md](docs/maintainers/vcpkg_copy_tools.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) + - [(#16935)](https://github.com/microsoft/vcpkg/pull/16935) [vcpkg/scripts] add a way to define another tool destination (by @Neumann-A) +- [vcpkg_download_distfile.md](docs/maintainers/vcpkg_download_distfile.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_execute_build_process.md](docs/maintainers/vcpkg_execute_build_process.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16515)](https://github.com/microsoft/vcpkg/pull/16515) Remove a ')' character in the documentation (by @duanqn) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_execute_required_process.md](docs/maintainers/vcpkg_execute_required_process.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16130)](https://github.com/microsoft/vcpkg/pull/16130) [(z_)vcpkg_prettify_command(_line)] Scripts Tree Audit (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_extract_source_archive.md](docs/maintainers/vcpkg_extract_source_archive.md) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_extract_source_archive_ex.md](docs/maintainers/vcpkg_extract_source_archive_ex.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_fail_port_install.md](docs/maintainers/vcpkg_fail_port_install.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_find_acquire_program.md](docs/maintainers/vcpkg_find_acquire_program.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_fixup_cmake_targets.md](docs/maintainers/vcpkg_fixup_cmake_targets.md) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) + - [(#16935)](https://github.com/microsoft/vcpkg/pull/16935) [vcpkg/scripts] add a way to define another tool destination (by @Neumann-A) +- [vcpkg_fixup_pkgconfig.md](docs/maintainers/vcpkg_fixup_pkgconfig.md) + - [(#13126)](https://github.com/microsoft/vcpkg/pull/13126) [vcpkg_fixup_pkgconfig] Handle spaces in path, do not validate individual libraries (by @ras0219) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#15725)](https://github.com/microsoft/vcpkg/pull/15725) [aws-cpp-sdk] [zlib] [openssl] [curl] Fix zlib, OpenSSL, curl and AWS SDK for Android (by @ahmedyarub) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_from_bitbucket.md](docs/maintainers/vcpkg_from_bitbucket.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_from_git.md](docs/maintainers/vcpkg_from_git.md) + - [(#15049)](https://github.com/microsoft/vcpkg/pull/15049) [vcpkg_from_git] new options TAG and X_OUT_REF (by @Neumann-A) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_from_github.md](docs/maintainers/vcpkg_from_github.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14884)](https://github.com/microsoft/vcpkg/pull/14884) [vcpkg baseline][vtk-m] fix the sha512 (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_from_gitlab.md](docs/maintainers/vcpkg_from_gitlab.md) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#14884)](https://github.com/microsoft/vcpkg/pull/14884) [vcpkg baseline][vtk-m] fix the sha512 (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_from_sourceforge.md](docs/maintainers/vcpkg_from_sourceforge.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_install_cmake.md](docs/maintainers/vcpkg_install_cmake.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_install_gn.md](docs/maintainers/vcpkg_install_gn.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_install_make.md](docs/maintainers/vcpkg_install_make.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_install_meson.md](docs/maintainers/vcpkg_install_meson.md) + - [(#15756)](https://github.com/microsoft/vcpkg/pull/15756) [vcpkg/meson] fix some details (by @Neumann-A) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_install_msbuild.md](docs/maintainers/vcpkg_install_msbuild.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_install_nmake.md](docs/maintainers/vcpkg_install_nmake.md) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_install_qmake.md](docs/maintainers/vcpkg_install_qmake.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [vcpkg_prettify_command.md](docs/maintainers/vcpkg_prettify_command.md) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16130)](https://github.com/microsoft/vcpkg/pull/16130) [(z_)vcpkg_prettify_command(_line)] Scripts Tree Audit (by @strega-nil) +- [README.md](docs/README.md) + - [(#16758)](https://github.com/microsoft/vcpkg/pull/16758) [docs] Rename docs/index.md to docs/README.md (by @autoantwort) + - [(#16796)](https://github.com/microsoft/vcpkg/pull/16796) [docs] fix links for vcpkg-tool maintainer help (by @autoantwort) + - [(#17066)](https://github.com/microsoft/vcpkg/pull/17066) add link to common vcpkg definitions (by @autoantwort) + - [(#17214)](https://github.com/microsoft/vcpkg/pull/17214) [doc] Improve manifest documentation links (by @dg0yt) + - [(#17219)](https://github.com/microsoft/vcpkg/pull/17219) Add mingw documentation (by @dg0yt) + - [(#17220)](https://github.com/microsoft/vcpkg/pull/17220) [docs] add more blog posts (by @autoantwort) + - [(#17550)](https://github.com/microsoft/vcpkg/pull/17550) [doc] Add 2019.06 blog post (by @dg0yt) + - [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [regenerate.ps1](docs/regenerate.ps1) + - [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) + - [(#14914)](https://github.com/microsoft/vcpkg/pull/14914) [docs] fix pwsh sorting (by @strega-nil) + - [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) + - [(#16954)](https://github.com/microsoft/vcpkg/pull/16954) [vcpkg baseline][qt5-base] Fix glib link issues on linux (by @Neumann-A) +- [binarycaching.md](docs/specifications/binarycaching.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [export-command.md](docs/specifications/export-command.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [feature-packages.md](docs/specifications/feature-packages.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [manifests.md](docs/specifications/manifests.md) + - [(#15688)](https://github.com/microsoft/vcpkg/pull/15688) fix wrong path in docs/specifications/manifests.md (by @aarcangeli) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#16760)](https://github.com/microsoft/vcpkg/pull/16760) [vcpkg docs] Modify manifest-root-dir as manifest-root (by @NancyLi1013) +- [ports-overlay.md](docs/specifications/ports-overlay.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [prefab.md](docs/specifications/prefab.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [registries.md](docs/specifications/registries.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [benchmarking.md](docs/tool-maintainers/benchmarking.md) + - [(#15474)](https://github.com/microsoft/vcpkg/pull/15474) [vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (by @BillyONeal) +- [layout.md](docs/tool-maintainers/layout.md) + - [(#15474)](https://github.com/microsoft/vcpkg/pull/15474) [vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (by @BillyONeal) +- [testing.md](docs/tool-maintainers/testing.md) + - [(#15474)](https://github.com/microsoft/vcpkg/pull/15474) [vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (by @BillyONeal) +- [android.md](docs/users/android.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#16881)](https://github.com/microsoft/vcpkg/pull/16881) [docs] Vulkan SDK usage for Android triplets (by @luncliff) +- [binarycaching.md](docs/users/binarycaching.md) + - [(#13626)](https://github.com/microsoft/vcpkg/pull/13626) [vcpkg] Add experimental x-azblob binary provider (by @ras0219) + - [(#14952)](https://github.com/microsoft/vcpkg/pull/14952) [vcpkg] Fix uploading to Azure DevOps Artifacts (by @ras0219) + - [(#15396)](https://github.com/microsoft/vcpkg/pull/15396) [vcpkg] Improve docs for binarycaching (by @ras0219) + - [(#15512)](https://github.com/microsoft/vcpkg/pull/15512) [vcpkg] Allow to use Nuget's cache for Nuget binary caching sources (fix #15169) (by @klalumiere) + - [(#16337)](https://github.com/microsoft/vcpkg/pull/16337) [docs/users/binarycaching.md] a little blurb about using GCS (by @coryan) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#17060)](https://github.com/microsoft/vcpkg/pull/17060) binarycaching.md: Move Configuration section to the top. Add table of??? (by @autoantwort) +- [config-environment.md](docs/users/config-environment.md) + - [(#15396)](https://github.com/microsoft/vcpkg/pull/15396) [vcpkg] Improve docs for binarycaching (by @ras0219) + - [(#15512)](https://github.com/microsoft/vcpkg/pull/15512) [vcpkg] Allow to use Nuget's cache for Nuget binary caching sources (fix #15169) (by @klalumiere) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#16627)](https://github.com/microsoft/vcpkg/pull/16627) [host dependencies] add support in the scripts (by @strega-nil) + - [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [integration.md](docs/users/integration.md) + - [(#16323)](https://github.com/microsoft/vcpkg/pull/16323) [docs] Add CMake Integration to manifests.md (by @ras0219) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [manifests.md](docs/users/manifests.md) + - [(#15565)](https://github.com/microsoft/vcpkg/pull/15565) [vcpkg] Add initial versioning documentation (by @ras0219) + - [(#16069)](https://github.com/microsoft/vcpkg/pull/16069) [docs/users/manifests.md] Prioritize examples. Fix example. Add MSBuild integration documentation. (by @ras0219-msft) + - [(#16155)](https://github.com/microsoft/vcpkg/pull/16155) [vcpkg.targets] Add an additional options parameter for MSBuild integration (by @ras0219) + - [(#16173)](https://github.com/microsoft/vcpkg/pull/16173) [vcpkg integrate install] Allow setting the vcpkg installed dir (by @strega-nil) + - [(#16323)](https://github.com/microsoft/vcpkg/pull/16323) [docs] Add CMake Integration to manifests.md (by @ras0219) + - [(#16336)](https://github.com/microsoft/vcpkg/pull/16336) [docs/users/manifests.md] add a link to the specification (by @coryan) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#16627)](https://github.com/microsoft/vcpkg/pull/16627) [host dependencies] add support in the scripts (by @strega-nil) +- [selecting-library-features.md](docs/users/selecting-library-features.md) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#17484)](https://github.com/microsoft/vcpkg/pull/17484) [doc] Fix broken link (by @dg0yt) +- [triplets.md](docs/users/triplets.md) + - [(#15115)](https://github.com/microsoft/vcpkg/pull/15115) [vcpkg] `VCPKG_ENV_PASSTHROUGH_UNTRACKED` (by @ras0219) + - [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) + - [(#16867)](https://github.com/microsoft/vcpkg/pull/16867) [docs-triplets] Suggest overlay triplets (by @ras0219-msft) + - [(#17219)](https://github.com/microsoft/vcpkg/pull/17219) Add mingw documentation (by @dg0yt) +
+ +
+The following changes to vcpkg have been made: + +- [(#7824)](https://github.com/microsoft/vcpkg/pull/7824) [fastcgi]Add new port (by @longhuan2018) +- [(#8524)](https://github.com/microsoft/vcpkg/pull/8524) Add option VCPKG_QMAKE_USE_NMAKE in vcpkg_build_qmake and install_qt (by @JackBoosY) +- [(#9231)](https://github.com/microsoft/vcpkg/pull/9231) [pcl] Add gcc version check (by @NancyLi1013) +- [(#10979)](https://github.com/microsoft/vcpkg/pull/10979) [popsift] add new port v0.9 (by @simogasp) +- [(#11225)](https://github.com/microsoft/vcpkg/pull/11225) [magnum] fixes adding any feature that depends on any other feature it will enable all the defaults (by @fran6co) +- [(#11273)](https://github.com/microsoft/vcpkg/pull/11273) [ignition-common3] Add new port ???? (by @traversaro) +- [(#11758)](https://github.com/microsoft/vcpkg/pull/11758) [vcpkg] RFC: Versioning (by @vicroms) +- [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) +- [(#11898)](https://github.com/microsoft/vcpkg/pull/11898) Add support for llvm-objdump to applocal.ps1 (by @Chronial) +- [(#12215)](https://github.com/microsoft/vcpkg/pull/12215) [vcpkg_fixup_cmake_targets] Add NO_PREFIX_CORRECTION (by @Neumann-A) +- [(#12785)](https://github.com/microsoft/vcpkg/pull/12785) [OpenCV] fix compatibility with VTK9 (by @cenit) +- [(#12860)](https://github.com/microsoft/vcpkg/pull/12860) [harfbuzz] Use meson and update to 2.7.0 (by @vejmartin) +- [(#12877)](https://github.com/microsoft/vcpkg/pull/12877) [vcpkg] Add option cmake-args (by @Neumann-A) +- [(#12936)](https://github.com/microsoft/vcpkg/pull/12936) [vcpkg/scripts] Add a way to get cmake compiler settings/flags (by @Neumann-A) +- [(#12945)](https://github.com/microsoft/vcpkg/pull/12945) [meson|scripts] update scripts (by @Neumann-A) +- [(#13028)](https://github.com/microsoft/vcpkg/pull/13028) More or less completely rewritten tensorflow-cc port (by @jgehw) +- [(#13081)](https://github.com/microsoft/vcpkg/pull/13081) [mpc/mpfr] Add new port / update mpfr (by @Neumann-A) +- [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- [(#13126)](https://github.com/microsoft/vcpkg/pull/13126) [vcpkg_fixup_pkgconfig] Handle spaces in path, do not validate individual libraries (by @ras0219) +- [(#13300)](https://github.com/microsoft/vcpkg/pull/13300) [sdl2pp] Update to 0.16.1 and fix find_package error (by @LilyWangL) +- [(#13355)](https://github.com/microsoft/vcpkg/pull/13355) [v8] Update v8 to current stable version: 8.6.395.17 (by @Kwizatz) +- [(#13361)](https://github.com/microsoft/vcpkg/pull/13361) [wxwidgets] Fix #4756 (by @ras0219) +- [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) +- [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) +- [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- [(#13590)](https://github.com/microsoft/vcpkg/pull/13590) [vcpkg registries] Registries: Take 2 (by @strega-nil) +- [(#13626)](https://github.com/microsoft/vcpkg/pull/13626) [vcpkg] Add experimental x-azblob binary provider (by @ras0219) +- [(#13658)](https://github.com/microsoft/vcpkg/pull/13658) [rhash] Update to the latest version (by @LilyWangL) +- [(#13680)](https://github.com/microsoft/vcpkg/pull/13680) [paho-mqtt] Update to version 1.3.5 (by @LilyWangL) +- [(#13687)](https://github.com/microsoft/vcpkg/pull/13687) [usd] fix dll path and update to 20.08 (by @ousttrue) +- [(#13691)](https://github.com/microsoft/vcpkg/pull/13691) [libprotobuf-mutator] Add new port (by @lebdron) +- [(#13704)](https://github.com/microsoft/vcpkg/pull/13704) [libdatachannel] Add new port (by @Nemirtingas) +- [(#13725)](https://github.com/microsoft/vcpkg/pull/13725) [matplotplusplus] Add new port (by @myd7349) +- [(#13739)](https://github.com/microsoft/vcpkg/pull/13739) [eigen3] Fix include path (by @LilyWangL) +- [(#13755)](https://github.com/microsoft/vcpkg/pull/13755) [vcpkg] Two bug fixes and some improvements in buildsystems/msbuild (by @FrankHeimes) +- [(#13759)](https://github.com/microsoft/vcpkg/pull/13759) [camport3] add new port (by @syp1975) +- [(#13849)](https://github.com/microsoft/vcpkg/pull/13849) [physx] Add support for Linux, macOS, and UWP (by @Hoikas) +- [(#13899)](https://github.com/microsoft/vcpkg/pull/13899) [imgui] Add experimental docking feature (by @brukted) +- [(#13931)](https://github.com/microsoft/vcpkg/pull/13931) [vcpkg] Increment number of retries and timeout of fs.rename() (by @mapozyan) +- [(#13950)](https://github.com/microsoft/vcpkg/pull/13950) [many ports] add GnuPG libraries (by @wrobelda) +- [(#13998)](https://github.com/microsoft/vcpkg/pull/13998) [llvm] update to 11.0.0 (by @yurybura) +- [(#14018)](https://github.com/microsoft/vcpkg/pull/14018) [vcpkg] preprocess _ignore_flags with vcpkg_escape_regex_control_characters (by @jgilje) +- [(#14083)](https://github.com/microsoft/vcpkg/pull/14083) [qt5-tools] Patch windeployqt to locate icudtd correctly. (by @seanlis) +- [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) +- [(#14109)](https://github.com/microsoft/vcpkg/pull/14109) [abseil] Revert changes about arm build (by @JackBoosY) +- [(#14123)](https://github.com/microsoft/vcpkg/pull/14123) [vcpkg] Implement VersionedPortfileProvider and BaselineProvider (by @vicroms) +- [(#14153)](https://github.com/microsoft/vcpkg/pull/14153) [vcpkg] Initial Registries: Part 2 MVP (by @strega-nil) +- [(#14183)](https://github.com/microsoft/vcpkg/pull/14183) [vcpkg] Implement constraints and overrides in manifests (by @ras0219) +- [(#14186)](https://github.com/microsoft/vcpkg/pull/14186) [icu] Add MSVC ARM64 support (by @janisozaur) +- [(#14195)](https://github.com/microsoft/vcpkg/pull/14195) [comms] Add new ports (by @mathisloge) +- [(#14213)](https://github.com/microsoft/vcpkg/pull/14213) [libjuice] Update libjuice for libdatachannel port. (by @Nemirtingas) +- [(#14223)](https://github.com/microsoft/vcpkg/pull/14223) [indicators] Update to Master (by @Link1J) +- [(#14240)](https://github.com/microsoft/vcpkg/pull/14240) [arrayfire] New Port (by @jacobkahn) +- [(#14242)](https://github.com/microsoft/vcpkg/pull/14242) [many ports] Add GnuTLS and its dependencies (by @wrobelda) +- [(#14243)](https://github.com/microsoft/vcpkg/pull/14243) [vcpkg] X_VCPKG_APPINSTALL_DEPS_INSTALL optionally install dependencies on install (by @sandercox) +- [(#14245)](https://github.com/microsoft/vcpkg/pull/14245) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 1 (by @JackBoosY) +- [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) +- [(#14248)](https://github.com/microsoft/vcpkg/pull/14248) [libnice] Fix build error on Linux (by @LilyWangL) +- [(#14290)](https://github.com/microsoft/vcpkg/pull/14290) [libmysql/libmariadb] Export unofficial cmake targets (by @JackBoosY) +- [(#14292)](https://github.com/microsoft/vcpkg/pull/14292) [caf] Add usage and vcpkg-cmake-wrapper (by @NancyLi1013) +- [(#14299)](https://github.com/microsoft/vcpkg/pull/14299) [rtabmap] New port (by @seanyen) +- [(#14305)](https://github.com/microsoft/vcpkg/pull/14305) [poco] Fix dependency, add features (by @JackBoosY) +- [(#14308)](https://github.com/microsoft/vcpkg/pull/14308) [OpenSSL] refactor openssl ports. (by @Neumann-A) +- [(#14310)](https://github.com/microsoft/vcpkg/pull/14310) [vcpkg] Add korean version Readme (by @AkiaCode) +- [(#14324)](https://github.com/microsoft/vcpkg/pull/14324) [ignition] Updates on various pkgs ???? (by @ahoarau) +- [(#14325)](https://github.com/microsoft/vcpkg/pull/14325) [tbb] Support tbb build for arm-linux & arm64-linux (by @xieyubo) +- [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- [(#14343)](https://github.com/microsoft/vcpkg/pull/14343) [vcpkg, azure-macro-utils-c] Fix SHA and add FILE_DISAMBIGUATOR for vcpkg_from_github (by @BillyONeal) +- [(#14344)](https://github.com/microsoft/vcpkg/pull/14344) [tool-meson] Update to 0.56.0 (by @c72578) +- [(#14348)](https://github.com/microsoft/vcpkg/pull/14348) [libsamplerate, sdl2-gfx] Fix build error with Visual Studio 2019 version 16.8 (by @LilyWangL) +- [(#14349)](https://github.com/microsoft/vcpkg/pull/14349) [sentry-native] Disable warning C5105 (by @LilyWangL) +- [(#14350)](https://github.com/microsoft/vcpkg/pull/14350) [curl] Fixes pkgconfig configuration file (by @Matioupi) +- [(#14351)](https://github.com/microsoft/vcpkg/pull/14351) add dataframe of github hosseinmoein/DataFrame (by @shimondoodkin) +- [(#14360)](https://github.com/microsoft/vcpkg/pull/14360) [ffmpeg] add if guard, fix library ordering on linux, minor clean up (by @mcmtroffaes) +- [(#14366)](https://github.com/microsoft/vcpkg/pull/14366) [vcpkg] Disable vcpkg_copy_tool_dependencies on non-Windows (by @BillyONeal) +- [(#14372)](https://github.com/microsoft/vcpkg/pull/14372) [fmt] update to 7.1.1 (by @bl-ue) +- [(#14375)](https://github.com/microsoft/vcpkg/pull/14375) [google-cloud-cpp] Update to the v1.20.0 release (by @coryan) +- [(#14376)](https://github.com/microsoft/vcpkg/pull/14376) [libigl] Fix dynamic build and enable header-only mode (by @FabienPean) +- [(#14377)](https://github.com/microsoft/vcpkg/pull/14377) Update CHANGELOG 2020.11.03 (by @vicroms) +- [(#14379)](https://github.com/microsoft/vcpkg/pull/14379) [imgui] Update to 1.79 (by @RT222) +- [(#14380)](https://github.com/microsoft/vcpkg/pull/14380) [implot] Update to 0.8 (by @RT222) +- [(#14382)](https://github.com/microsoft/vcpkg/pull/14382) [kenlm, pdal] Fix const overload on Visual Studio 2019 version 16.8 (by @LilyWangL) +- [(#14383)](https://github.com/microsoft/vcpkg/pull/14383) [magnum] Removing quotes around tools list where vcpkg_copy_tools is involked (by @PhoebeHui) +- [(#14385)](https://github.com/microsoft/vcpkg/pull/14385) [oatpp-curl] Fix curl dependency cannot be found (by @NancyLi1013) +- [(#14387)](https://github.com/microsoft/vcpkg/pull/14387) [xeus] remove openssl static build patch as it is no longer needed (by @mcmtroffaes) +- [(#14388)](https://github.com/microsoft/vcpkg/pull/14388) [ffmpeg] simplify openssl library search, and fix linux openssl feature linking (by @mcmtroffaes) +- [(#14392)](https://github.com/microsoft/vcpkg/pull/14392) [tensorflow] Add C port (by @jgehw) +- [(#14395)](https://github.com/microsoft/vcpkg/pull/14395) [ZSTD] Update to 1.4.5 (by @Neumann-A) +- [(#14396)](https://github.com/microsoft/vcpkg/pull/14396) [vcpkg] copy tools pdb if they exist. (by @Neumann-A) +- [(#14397)](https://github.com/microsoft/vcpkg/pull/14397) [vcpkg] Add x-ignore-lock-failures (by @strega-nil) +- [(#14399)](https://github.com/microsoft/vcpkg/pull/14399) [llvm] install tools in tools/llvm (by @strega-nil) +- [(#14400)](https://github.com/microsoft/vcpkg/pull/14400) [vcpkg baseline] [rtabmap] Set option dependencies OFF (by @PhoebeHui) +- [(#14405)](https://github.com/microsoft/vcpkg/pull/14405) [netcdf-cxx4] Export cmake targets (by @NancyLi1013) +- [(#14407)](https://github.com/microsoft/vcpkg/pull/14407) [libffi] mingw support (by @longnguyen2004) +- [(#14412)](https://github.com/microsoft/vcpkg/pull/14412) [geotrans] update to version 3.8 (on-hold waiting for CI/VM port 21 for ftp to be opened or alternate host site) (by @StarGate-One) +- [(#14413)](https://github.com/microsoft/vcpkg/pull/14413) [fmt] update to 7.1.2 (by @bl-ue) +- [(#14414)](https://github.com/microsoft/vcpkg/pull/14414) [span-lite] update to 0.8.1 (by @Ryan-rsm-McKenzie) +- [(#14416)](https://github.com/microsoft/vcpkg/pull/14416) [cppgraphqlgen] Update to v3.2.4 (by @wravery) +- [(#14417)](https://github.com/microsoft/vcpkg/pull/14417) [sdl2] apply upstream patch to fix macos vulkan fixes #13773 (by @jhs67) +- [(#14421)](https://github.com/microsoft/vcpkg/pull/14421) [netcdf-c] Fix linkage error (by @NancyLi1013) +- [(#14422)](https://github.com/microsoft/vcpkg/pull/14422) [osg-qt] Fix installation when building static on Windows (by @JackBoosY) +- [(#14426)](https://github.com/microsoft/vcpkg/pull/14426) [vcpkg baseline][rtabmap] Fix dependency issue when build tools (by @PhoebeHui) +- [(#14435)](https://github.com/microsoft/vcpkg/pull/14435) [opencascade] update debug paths in *Targets-debug.cmake (by @socuwn) +- [(#14436)](https://github.com/microsoft/vcpkg/pull/14436) [vcpkg] Add a definition for OVERLAY_TRIPLET_ENV (by @strega-nil) +- [(#14439)](https://github.com/microsoft/vcpkg/pull/14439) [string-theory] Update to 3.4 (by @zrax) +- [(#14443)](https://github.com/microsoft/vcpkg/pull/14443) [krabsetw] Update to 4.1.14 (by @jrave) +- [(#14444)](https://github.com/microsoft/vcpkg/pull/14444) [mpg123] Upgrade to 1.26.3 (by @evpobr) +- [(#14446)](https://github.com/microsoft/vcpkg/pull/14446) [protopuf] Add a new port protopuf (by @PragmaTwice) +- [(#14447)](https://github.com/microsoft/vcpkg/pull/14447) [alembic] update to 1.7.16 (by @SeekingMeaning) +- [(#14448)](https://github.com/microsoft/vcpkg/pull/14448) [quill] Update to 1.5.2 (by @odygrd) +- [(#14450)](https://github.com/microsoft/vcpkg/pull/14450) [bond] update to 9.0.3 (by @SeekingMeaning) +- [(#14452)](https://github.com/microsoft/vcpkg/pull/14452) [zstr] update to 1.0.4 (by @SeekingMeaning) +- [(#14453)](https://github.com/microsoft/vcpkg/pull/14453) [yas] update to 7.0.5 (by @SeekingMeaning) +- [(#14454)](https://github.com/microsoft/vcpkg/pull/14454) [xsimd][xtensor][xtl] Update to latest (by @SeekingMeaning) +- [(#14455)](https://github.com/microsoft/vcpkg/pull/14455) [xeus] update to 0.24.3 (by @SeekingMeaning) +- [(#14456)](https://github.com/microsoft/vcpkg/pull/14456) [wepoll] update to 1.5.8 (by @SeekingMeaning) +- [(#14457)](https://github.com/microsoft/vcpkg/pull/14457) [openssl] Add build depends to deprecated openssl ports (by @Neumann-A) +- [(#14460)](https://github.com/microsoft/vcpkg/pull/14460) [szip, openssl] Fix problems with mingw (by @longnguyen2004) +- [(#14462)](https://github.com/microsoft/vcpkg/pull/14462) [libcuckoo] Update version to v0.3 (by @westfly) +- [(#14465)](https://github.com/microsoft/vcpkg/pull/14465) [libflac] require NASM for libflac[asm] (by @cbergemann) +- [(#14473)](https://github.com/microsoft/vcpkg/pull/14473) [curl] Enable feature tool and install curl-config on non-Windows (by @JackBoosY) +- [(#14476)](https://github.com/microsoft/vcpkg/pull/14476) [libxslt] Fix install tools and pkgconfig (by @JackBoosY) +- [(#14477)](https://github.com/microsoft/vcpkg/pull/14477) [openssl] Remove unused patches (by @NancyLi1013) +- [(#14479)](https://github.com/microsoft/vcpkg/pull/14479) [aws-sdk-cpp] Update to 1.8.83 (by @PhoebeHui) +- [(#14481)](https://github.com/microsoft/vcpkg/pull/14481) [onnxruntime-gpu] Add port for onnxruntime (GPU) (by @ianormy) +- [(#14482)](https://github.com/microsoft/vcpkg/pull/14482) [gamedev-framework] update to 0.18.1 (by @jube) +- [(#14483)](https://github.com/microsoft/vcpkg/pull/14483) [libjpeg-turbo] Enabled jpeg7 and jpeg8 APIs (by @Ziriax) +- [(#14485)](https://github.com/microsoft/vcpkg/pull/14485) [libosmscout] Add new port (by @OgreTransporter) +- [(#14493)](https://github.com/microsoft/vcpkg/pull/14493) Fix some "passing, remove from fail lists" from the 2020-11-08 build (by @BillyONeal) +- [(#14496)](https://github.com/microsoft/vcpkg/pull/14496) [restinio] update to v.0.6.12 (by @eao197) +- [(#14497)](https://github.com/microsoft/vcpkg/pull/14497) [libde265] Updated to v1.0.8 (by @JonLiu1993) +- [(#14499)](https://github.com/microsoft/vcpkg/pull/14499) [freetype] Fix INTERFACE_LINK_LIBRARIES in exported cmake file (by @JackBoosY) +- [(#14502)](https://github.com/microsoft/vcpkg/pull/14502) [boost-locale] Replace VCPKG_TARGET_IS_WINDOWS in b2-options (by @longnguyen2004) +- [(#14505)](https://github.com/microsoft/vcpkg/pull/14505) [nuspell] Update version to 4.0.1 (by @dimztimz) +- [(#14510)](https://github.com/microsoft/vcpkg/pull/14510) [python3] Upgrade to 3.9.0 (by @Hoikas) +- [(#14517)](https://github.com/microsoft/vcpkg/pull/14517) [boost] Install usage file (by @PhoebeHui) +- [(#14518)](https://github.com/microsoft/vcpkg/pull/14518) [ampl-mp] Update version, separate port ampl-asl and fix arm build (by @JackBoosY) +- [(#14521)](https://github.com/microsoft/vcpkg/pull/14521) [comms ] update to the next version (by @mathisloge) +- [(#14522)](https://github.com/microsoft/vcpkg/pull/14522) [realsense2] Update to version 2.39.0 (by @padarom) +- [(#14523)](https://github.com/microsoft/vcpkg/pull/14523) [comms-ublox] added new port (by @mathisloge) +- [(#14528)](https://github.com/microsoft/vcpkg/pull/14528) [3fd] Update to 2.6.3, fix port (by @strega-nil) +- [(#14529)](https://github.com/microsoft/vcpkg/pull/14529) [freetds] Remove patches and update to a version that no longer needs them (by @BillyONeal) +- [(#14530)](https://github.com/microsoft/vcpkg/pull/14530) [harfbuzz] fix icu linkage (by @Neumann-A) +- [(#14533)](https://github.com/microsoft/vcpkg/pull/14533) [libmariadb] Export target mariadbclient (by @JackBoosY) +- [(#14535)](https://github.com/microsoft/vcpkg/pull/14535) [libarchive] Fix dependencies, combine patches (by @JackBoosY) +- [(#14536)](https://github.com/microsoft/vcpkg/pull/14536) [opencl] Remove feature wdk (by @PhoebeHui) +- [(#14538)](https://github.com/microsoft/vcpkg/pull/14538) [urho3d] Add new port (by @koprok) +- [(#14539)](https://github.com/microsoft/vcpkg/pull/14539) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version (by @RT222) +- [(#14540)](https://github.com/microsoft/vcpkg/pull/14540) [libidn2] Update to version 2.3.0 (by @lazyhamster) +- [(#14541)](https://github.com/microsoft/vcpkg/pull/14541) [sentry-native] Update to version 0.4.4 (by @AenBleidd) +- [(#14545)](https://github.com/microsoft/vcpkg/pull/14545) [libvpx] switch from yasm to nasm (by @mcmtroffaes) +- [(#14546)](https://github.com/microsoft/vcpkg/pull/14546) [aws-sdk-cpp] Make aws-sdk-cpp rpath relocatable (by @klalumiere) +- [(#14547)](https://github.com/microsoft/vcpkg/pull/14547) [ffmpeg] use nasm instead of yasm (by @mcmtroffaes) +- [(#14549)](https://github.com/microsoft/vcpkg/pull/14549) [vcpkg] initial openbsd (community) support (by @jgilje) +- [(#14554)](https://github.com/microsoft/vcpkg/pull/14554) [assimp] Fix cmake config name and add cmake version (by @PhoebeHui) +- [(#14555)](https://github.com/microsoft/vcpkg/pull/14555) [tbb] fix shared tbb library configuration build under *nix (by @xandox) +- [(#14556)](https://github.com/microsoft/vcpkg/pull/14556) [many ports] mingw support (by @longnguyen2004) +- [(#14562)](https://github.com/microsoft/vcpkg/pull/14562) [ignition-transport8] Fix ignition-transport8 version (by @ahoarau) +- [(#14563)](https://github.com/microsoft/vcpkg/pull/14563) [robin-hood-hashing] Update to 3.9.1 (by @RT222) +- [(#14566)](https://github.com/microsoft/vcpkg/pull/14566) [liblsl] Update to 1.13.1 (by @chausner) +- [(#14576)](https://github.com/microsoft/vcpkg/pull/14576) [seal] Update to version 3.6.0. Changed default features. (by @WeiDaiWD) +- [(#14579)](https://github.com/microsoft/vcpkg/pull/14579) [baseline][libarchive] : regression fix (by @Matioupi) +- [(#14580)](https://github.com/microsoft/vcpkg/pull/14580) fix single configuration make builds. (by @Neumann-A) +- [(#14583)](https://github.com/microsoft/vcpkg/pull/14583) [ijg-libjpeg] add new port (by @luncliff) +- [(#14586)](https://github.com/microsoft/vcpkg/pull/14586) [vcpkg baseline][monkeys-audio] Update to 5.59 (by @NancyLi1013) +- [(#14587)](https://github.com/microsoft/vcpkg/pull/14587) [xmlsec] Update to 1.2.31 (by @SvenPStarFinanz) +- [(#14589)](https://github.com/microsoft/vcpkg/pull/14589) [poco] Fix dependency and cmake config issue (by @PhoebeHui) +- [(#14594)](https://github.com/microsoft/vcpkg/pull/14594) [qt5-base] fix brotli linkage and qml dlls deployment (by @Neumann-A) +- [(#14605)](https://github.com/microsoft/vcpkg/pull/14605) CGAL: Update to 5.1.1 (by @maxGimeno) +- [(#14614)](https://github.com/microsoft/vcpkg/pull/14614) [vcpkg docs] Check for documentation generation in CI (by @strega-nil) +- [(#14615)](https://github.com/microsoft/vcpkg/pull/14615) [liblzma] use upstream CMakeLists.txt + Add pkgconfig. (by @Neumann-A) +- [(#14616)](https://github.com/microsoft/vcpkg/pull/14616) [vcpkg] Fix GCC-6 build. (by @ras0219-msft) +- [(#14618)](https://github.com/microsoft/vcpkg/pull/14618) [SUNDIALS] Update to 5.5.0 (by @JonLiu1993) +- [(#14623)](https://github.com/microsoft/vcpkg/pull/14623) [hunspell] Avoid automatically added lib prefix (by @PhoebeHui) +- [(#14624)](https://github.com/microsoft/vcpkg/pull/14624) [cppzmq] Add draft feature (by @NancyLi1013) +- [(#14625)](https://github.com/microsoft/vcpkg/pull/14625) Fix for issue #11927 (by @christophe-calmejane) +- [(#14626)](https://github.com/microsoft/vcpkg/pull/14626) [libpq/ffmpeg] Fix iconv/intl linkage not covered by CI (by @Neumann-A) +- [(#14629)](https://github.com/microsoft/vcpkg/pull/14629) [proj] Added support for optionally building the tools (by @SNiLD) +- [(#14633)](https://github.com/microsoft/vcpkg/pull/14633) [vcpkg] Introduce `create_versioned_install_plan()` (by @ras0219) +- [(#14640)](https://github.com/microsoft/vcpkg/pull/14640) [mesa] new port (by @Neumann-A) +- [(#14642)](https://github.com/microsoft/vcpkg/pull/14642) [zeromq] Add feature draft (by @JonLiu1993) +- [(#14644)](https://github.com/microsoft/vcpkg/pull/14644) [vcpkg baseline][qt5-location] Update patch (by @NancyLi1013) +- [(#14646)](https://github.com/microsoft/vcpkg/pull/14646) [soci] Update to 4.0.1 (by @JonLiu1993) +- [(#14647)](https://github.com/microsoft/vcpkg/pull/14647) [abseil] Re-fix cxx 17 standard, add macro ABSL_USE_CXX17 (by @JackBoosY) +- [(#14648)](https://github.com/microsoft/vcpkg/pull/14648) [libheif] update to 1.9.1 (by @JonLiu1993) +- [(#14650)](https://github.com/microsoft/vcpkg/pull/14650) [tesseract] Enable dynamic build, format portfile.cmake (by @JackBoosY) +- [(#14651)](https://github.com/microsoft/vcpkg/pull/14651) [openvdb] Fix dependency issue and usage issue (by @PhoebeHui) +- [(#14655)](https://github.com/microsoft/vcpkg/pull/14655) [leptonica] add missing dependency (by @cenit) +- [(#14658)](https://github.com/microsoft/vcpkg/pull/14658) [clamav] Add new port (by @zaddach) +- [(#14659)](https://github.com/microsoft/vcpkg/pull/14659) [vcpkg] fix vs2015 build (by @strega-nil) +- [(#14661)](https://github.com/microsoft/vcpkg/pull/14661) [vcpkg] fix cmake paths in tags (alternative 2) (by @strega-nil) +- [(#14662)](https://github.com/microsoft/vcpkg/pull/14662) Use OS-included Python 2.7 on macOS (by @LRFLEW) +- [(#14666)](https://github.com/microsoft/vcpkg/pull/14666) [duktape] Add VERSION and SOVERSION properties CMake build (by @LRFLEW) +- [(#14670)](https://github.com/microsoft/vcpkg/pull/14670) [protobuf] Update to 3.14.0 (by @JonLiu1993) +- [(#14674)](https://github.com/microsoft/vcpkg/pull/14674) [vcpkg] Output the filepath on hash error. (by @Neumann-A) +- [(#14676)](https://github.com/microsoft/vcpkg/pull/14676) [flashlight-cuda] New Port (by @jacobkahn) +- [(#14677)](https://github.com/microsoft/vcpkg/pull/14677) [sqlcipher] Update to 4.4.1 (by @SvenPStarFinanz) +- [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- [(#14683)](https://github.com/microsoft/vcpkg/pull/14683) [nccl] New Port (by @jacobkahn) +- [(#14686)](https://github.com/microsoft/vcpkg/pull/14686) [cudnn] Try to find CUDNN locally before downloading (by @jacobkahn) +- [(#14688)](https://github.com/microsoft/vcpkg/pull/14688) [networkdirect-sdk] Rework portfile.cmake to allow windows x64 and x86, add fail for other triplet combinations, remove all triplets for CI fail list (by @StarGate-One) +- [(#14691)](https://github.com/microsoft/vcpkg/pull/14691) [commsdsl] update to version 3.5.4 (by @mathisloge) +- [(#14711)](https://github.com/microsoft/vcpkg/pull/14711) [geographiclib] Update to version 1.51 (by @cffk) +- [(#14714)](https://github.com/microsoft/vcpkg/pull/14714) [vcpkg baseline][qt-advanced-docking-system] Update hash (by @NancyLi1013) +- [(#14715)](https://github.com/microsoft/vcpkg/pull/14715) [curl] Fixes pkgconfig file (by @Matioupi) +- [(#14716)](https://github.com/microsoft/vcpkg/pull/14716) [cmake] update to 3.19.2 (by @JackBoosY) +- [(#14719)](https://github.com/microsoft/vcpkg/pull/14719) [ceres] upgrade to 2.0.0 (by @fran6co) +- [(#14722)](https://github.com/microsoft/vcpkg/pull/14722) [bitsery] Update to 5.2.1 (by @RT222) +- [(#14723)](https://github.com/microsoft/vcpkg/pull/14723) [toml11] fixes installation (by @fran6co) +- [(#14724)](https://github.com/microsoft/vcpkg/pull/14724) [opengl] port path fix when crosscompiling (by @Nemirtingas) +- [(#14730)](https://github.com/microsoft/vcpkg/pull/14730) [ignition-msgs*] Fix flaky CI tests for ignition-msgs* ports (take 2) (by @traversaro) +- [(#14732)](https://github.com/microsoft/vcpkg/pull/14732) [tiny-process-library] Bump tiny-process-library to 2.0.4 (by @traversaro) +- [(#14734)](https://github.com/microsoft/vcpkg/pull/14734) [hiredis] update to 1.0.0 (Fix #13256) (by @klalumiere) +- [(#14736)](https://github.com/microsoft/vcpkg/pull/14736) [cudnn] Don't copy debug versions of the lib since they aren't provided (by @jacobkahn) +- [(#14744)](https://github.com/microsoft/vcpkg/pull/14744) [vcpkg] Fix redefinition for OVERLAY_TRIPLETS_ENV (by @davidxiaozhi) +- [(#14749)](https://github.com/microsoft/vcpkg/pull/14749) [libuvc] added (by @fran6co) +- [(#14750)](https://github.com/microsoft/vcpkg/pull/14750) [azure-kinect-sensor-sdk] not working on Linux (by @fran6co) +- [(#14752)](https://github.com/microsoft/vcpkg/pull/14752) [jsoncons] Update to version 0.159.0 (by @danielaparker) +- [(#14755)](https://github.com/microsoft/vcpkg/pull/14755) [libtorrent] Update to 1.2.11 (by @FranciscoPombal) +- [(#14758)](https://github.com/microsoft/vcpkg/pull/14758) [speexdsp] Update CMake script for macOS/Linux (by @LRFLEW) +- [(#14761)](https://github.com/microsoft/vcpkg/pull/14761) update osg-qt from Qt4 tag to master branch(Qt5) (by @ZgblKylin) +- [(#14762)](https://github.com/microsoft/vcpkg/pull/14762) [redis-plus-plus] Add c++17 feature (by @JonLiu1993) +- [(#14763)](https://github.com/microsoft/vcpkg/pull/14763) [poco] Fix dependency libmariadb (by @JackBoosY) +- [(#14768)](https://github.com/microsoft/vcpkg/pull/14768) [ace] copy generated headers files for tao (by @victorburckel) +- [(#14770)](https://github.com/microsoft/vcpkg/pull/14770) [fixed-string] Add library (by @unterumarmung) +- [(#14771)](https://github.com/microsoft/vcpkg/pull/14771) [elfutils] add new port (by @Neumann-A) +- [(#14772)](https://github.com/microsoft/vcpkg/pull/14772) [vcpkg msbuild] Fix the issues introduced in 13755 (by @strega-nil) +- [(#14774)](https://github.com/microsoft/vcpkg/pull/14774) [rtaudio] Add new port (by @chausner) +- [(#14776)](https://github.com/microsoft/vcpkg/pull/14776) [Chipmunk] build via cmake (by @comedinha) +- [(#14781)](https://github.com/microsoft/vcpkg/pull/14781) [span-lite] update to 0.9.0 (by @Ryan-rsm-McKenzie) +- [(#14782)](https://github.com/microsoft/vcpkg/pull/14782) [xbyak] update to 5.991 (by @Ryan-rsm-McKenzie) +- [(#14785)](https://github.com/microsoft/vcpkg/pull/14785) [openssl] Handle INSTALL_NAME_DIR and OSX_DEPLOYMENT_TARGET for macOS shared builds (by @LRFLEW) +- [(#14786)](https://github.com/microsoft/vcpkg/pull/14786) [fmt] Update to 7.1.3 (by @kevinlul) +- [(#14790)](https://github.com/microsoft/vcpkg/pull/14790) [osg] Update dependency (by @NancyLi1013) +- [(#14791)](https://github.com/microsoft/vcpkg/pull/14791) [vcpkg] Remove non-existing 'import' command in vcpkg help information (by @PhoebeHui) +- [(#14792)](https://github.com/microsoft/vcpkg/pull/14792) [prometheus-cpp] Update to version 0.11.0 (by @gjasny) +- [(#14793)](https://github.com/microsoft/vcpkg/pull/14793) [devil] Fix pkgconfig on Windows (by @JackBoosY) +- [(#14794)](https://github.com/microsoft/vcpkg/pull/14794) [ebml/gppanel/matroska/polyhook2/unrar] Fix typos in CONTROL files (by @NancyLi1013) +- [(#14795)](https://github.com/microsoft/vcpkg/pull/14795) [cpp-httplib] Update to 0.7.15 (by @JonLiu1993) +- [(#14796)](https://github.com/microsoft/vcpkg/pull/14796) [sdl2-image] Fix usage (by @JackBoosY) +- [(#14797)](https://github.com/microsoft/vcpkg/pull/14797) [vcpkg] Fix issue in vcpkg.targets that introduced in 13755 (by @PhoebeHui) +- [(#14800)](https://github.com/microsoft/vcpkg/pull/14800) [Proj4] Update to 7.2.0 (by @longhuan2018) +- [(#14801)](https://github.com/microsoft/vcpkg/pull/14801) [cwalk] Add new port (by @likle) +- [(#14803)](https://github.com/microsoft/vcpkg/pull/14803) Include "zip" as required apt dependency in bootstrap error message (by @chausner) +- [(#14805)](https://github.com/microsoft/vcpkg/pull/14805) [libevent] Fix library cannot be found (by @NancyLi1013) +- [(#14807)](https://github.com/microsoft/vcpkg/pull/14807) [curl] Add feature idn2 (by @JackBoosY) +- [(#14813)](https://github.com/microsoft/vcpkg/pull/14813) [pugixml] Update to 1.11.1 (by @RT222) +- [(#14816)](https://github.com/microsoft/vcpkg/pull/14816) [lapack-reference] add to CMAKE_FIND_LIBRARY_SUFFIXES additional suffixes (by @xandox) +- [(#14825)](https://github.com/microsoft/vcpkg/pull/14825) [vcpkg_apply_patches] Fix Git too long path error (by @Pospelove) +- [(#14833)](https://github.com/microsoft/vcpkg/pull/14833) Fix broken doc link (by @TeeVenDick) +- [(#14841)](https://github.com/microsoft/vcpkg/pull/14841) [pegtl] Update to 3.0.0 release (by @wravery) +- [(#14842)](https://github.com/microsoft/vcpkg/pull/14842) [cppgraphqlgen] Update to v3.3.0 (by @wravery) +- [(#14843)](https://github.com/microsoft/vcpkg/pull/14843) [vcpkg baseline] [libass] Fix dependency issue in Linux (by @PhoebeHui) +- [(#14844)](https://github.com/microsoft/vcpkg/pull/14844) [sobjectizer] update to v.5.7.2 (by @eao197) +- [(#14848)](https://github.com/microsoft/vcpkg/pull/14848) [vcpkg_apply_patches] Work around /etc/gitconfig: Permission denied (by @ras0219) +- [(#14852)](https://github.com/microsoft/vcpkg/pull/14852) [vcpkg] Expose alpha end-to-end versioning (by @ras0219) +- [(#14856)](https://github.com/microsoft/vcpkg/pull/14856) [vcpkg] fix feature flags telemetry (by @strega-nil) +- [(#14857)](https://github.com/microsoft/vcpkg/pull/14857) Change Nuget binary cache pre-release info to always start with letters (by @frivard-coveo) +- [(#14862)](https://github.com/microsoft/vcpkg/pull/14862) [nghttp2] Update to 1.42.0. (by @geraldcombs) +- [(#14863)](https://github.com/microsoft/vcpkg/pull/14863) [c-ares] Update to 1.17.1. (by @geraldcombs) +- [(#14866)](https://github.com/microsoft/vcpkg/pull/14866) [vcpkg baseline] [gdal] Fix build errors on linux and osx (by @PhoebeHui) +- [(#14868)](https://github.com/microsoft/vcpkg/pull/14868) [aws-sdk-cpp] Restore AWSSDKConfig.cmake and add usage (by @JackBoosY) +- [(#14872)](https://github.com/microsoft/vcpkg/pull/14872) [microsoft-signalr] Fix build error on Linux (by @NancyLi1013) +- [(#14876)](https://github.com/microsoft/vcpkg/pull/14876) [clrng] Add new port: clRNG (by @MathiasMagnus) +- [(#14880)](https://github.com/microsoft/vcpkg/pull/14880) [cuda] Add ENV CUDA_HOME to path hints (by @jacobkahn) +- [(#14882)](https://github.com/microsoft/vcpkg/pull/14882) [vcpkg] Output versions during install plans (by @ras0219) +- [(#14884)](https://github.com/microsoft/vcpkg/pull/14884) [vcpkg baseline][vtk-m] fix the sha512 (by @strega-nil) +- [(#14886)](https://github.com/microsoft/vcpkg/pull/14886) [google-cloud-cpp] update to latest release (v1.21.0) (by @coryan) +- [(#14888)](https://github.com/microsoft/vcpkg/pull/14888) [libigl] Always install as header-only library (by @FabienPean) +- [(#14889)](https://github.com/microsoft/vcpkg/pull/14889) [vcpkg] Add SemVer and Date versioning schemes (by @vicroms) +- [(#14891)](https://github.com/microsoft/vcpkg/pull/14891) [python3] Build interpreter (by @Hoikas) +- [(#14897)](https://github.com/microsoft/vcpkg/pull/14897) [termcolor]; Add termcolor (by @theidexisted) +- [(#14898)](https://github.com/microsoft/vcpkg/pull/14898) [kuku] Add new port (by @kiromaru) +- [(#14901)](https://github.com/microsoft/vcpkg/pull/14901) [opencascade] Fix static build (by @JackBoosY) +- [(#14904)](https://github.com/microsoft/vcpkg/pull/14904) [magic-enum] Update to v0.7.1 (by @Neargye) +- [(#14911)](https://github.com/microsoft/vcpkg/pull/14911) [arrayfire] Update port to fix cuSparse issue with CUDA 10.1 (by @jacobkahn) +- [(#14912)](https://github.com/microsoft/vcpkg/pull/14912) [flashlight-cuda] Add stb as dependency, bump port commit (by @jacobkahn) +- [(#14913)](https://github.com/microsoft/vcpkg/pull/14913) [vcpkg baseline][monkeys-audio] Update to 565d. (by @Hoikas) +- [(#14914)](https://github.com/microsoft/vcpkg/pull/14914) [docs] fix pwsh sorting (by @strega-nil) +- [(#14915)](https://github.com/microsoft/vcpkg/pull/14915) [vcpkg] fix compile on vs2015 (by @strega-nil) +- [(#14916)](https://github.com/microsoft/vcpkg/pull/14916) [quill] Update 1.6.0 (by @odygrd) +- [(#14917)](https://github.com/microsoft/vcpkg/pull/14917) [freetype] Make zlib and brotli features (by @LRFLEW) +- [(#14918)](https://github.com/microsoft/vcpkg/pull/14918) [zxing-cpp] Update zxing-cpp and fix iconv dependency (by @JonLiu1993) +- [(#14921)](https://github.com/microsoft/vcpkg/pull/14921) [libpqxx] update to 7.2.1 (by @JonLiu1993) +- [(#14923)](https://github.com/microsoft/vcpkg/pull/14923) [cimg] update to 2.9.4 (by @JonLiu1993) +- [(#14925)](https://github.com/microsoft/vcpkg/pull/14925) [sail] Add new port (by @happy-sea-fox) +- [(#14927)](https://github.com/microsoft/vcpkg/pull/14927) [vcpkg] Error on '#' in version strings to avoid confusion (by @ras0219) +- [(#14935)](https://github.com/microsoft/vcpkg/pull/14935) [usockets] Fix build issue with feature ssl (by @PhoebeHui) +- [(#14936)](https://github.com/microsoft/vcpkg/pull/14936) [aws-sdk-cpp] Add find_dependency to AWSSDKConfig.cmake and fix usage (by @JackBoosY) +- [(#14937)](https://github.com/microsoft/vcpkg/pull/14937) [gamenetworkingsockets] Add new port (by @Balnian) +- [(#14945)](https://github.com/microsoft/vcpkg/pull/14945) Fix failures when parsing the default options for binary caching not being emitted. (by @BillyONeal) +- [(#14946)](https://github.com/microsoft/vcpkg/pull/14946) [fontconfig] fix dll name in def file (by @Neumann-A) +- [(#14947)](https://github.com/microsoft/vcpkg/pull/14947) [vcpkg] Add versioning fields to schema (by @ras0219) +- [(#14948)](https://github.com/microsoft/vcpkg/pull/14948) [vcpkg] Improve error messages for incomplete Mono (by @ras0219) +- [(#14952)](https://github.com/microsoft/vcpkg/pull/14952) [vcpkg] Fix uploading to Azure DevOps Artifacts (by @ras0219) +- [(#14953)](https://github.com/microsoft/vcpkg/pull/14953) [vcpkg] Add --nuget-description option for `vcpkg export` (by @ras0219) +- [(#14954)](https://github.com/microsoft/vcpkg/pull/14954) [vcpkg] Disable survey message (by @ras0219) +- [(#14960)](https://github.com/microsoft/vcpkg/pull/14960) [pcl] Fix build when librealsense2 is present (by @dweckmann) +- [(#14962)](https://github.com/microsoft/vcpkg/pull/14962) [geogram] Fix windows dynamic build usage (by @FabienPean) +- [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) +- [(#14970)](https://github.com/microsoft/vcpkg/pull/14970) [ NASM ] Update version from 2.14.02 to 2.15.05 (by @Nioub) +- [(#14971)](https://github.com/microsoft/vcpkg/pull/14971) [ms-gltf] Add new port (by @luncliff) +- [(#14972)](https://github.com/microsoft/vcpkg/pull/14972) [ATK] Installing .pc files (by @faserg1) +- [(#14975)](https://github.com/microsoft/vcpkg/pull/14975) [nanobench] update to 4.3.0 (by @JonLiu1993) +- [(#14976)](https://github.com/microsoft/vcpkg/pull/14976) [osgearth/rocksdb] Update to latest release (by @NancyLi1013) +- [(#14977)](https://github.com/microsoft/vcpkg/pull/14977) [vcpkg] x_vcpkg_install_local_dependencies fixes (by @sandercox) +- [(#14980)](https://github.com/microsoft/vcpkg/pull/14980) [EASTL] update to 3.17.03 (by @JonLiu1993) +- [(#14981)](https://github.com/microsoft/vcpkg/pull/14981) [libcopp] update to 1.3.3 (by @owent) +- [(#14986)](https://github.com/microsoft/vcpkg/pull/14986) 2020-12-07 Build Fixes (by @BillyONeal) +- [(#14988)](https://github.com/microsoft/vcpkg/pull/14988) [GLIBMM] Installing .pc file (by @faserg1) +- [(#14991)](https://github.com/microsoft/vcpkg/pull/14991) [libxml2] build failure with x64-linux-dynamic (Fix #14990) (by @klalumiere) +- [(#14992)](https://github.com/microsoft/vcpkg/pull/14992) [sdl2] Don't propagate shared link options (by @JesseFarebro) +- [(#14997)](https://github.com/microsoft/vcpkg/pull/14997) [libcopp] Update to 1.3.4 (#14996) (by @owent) +- [(#14999)](https://github.com/microsoft/vcpkg/pull/14999) [vcpkg] Add commands to maintain and verify versions db integrity (by @vicroms) +- [(#15001)](https://github.com/microsoft/vcpkg/pull/15001) Fix crosscompiling for x86_64 on ARM64 macOS (by @orudge) +- [(#15002)](https://github.com/microsoft/vcpkg/pull/15002) [libpng] Fix cross-compilation on macOS (by @orudge) +- [(#15005)](https://github.com/microsoft/vcpkg/pull/15005) [qt5] Fix linux dynamic build (by @dweckmann) +- [(#15009)](https://github.com/microsoft/vcpkg/pull/15009) [dav1d] Add dav1d AV1 decoder port (by @RichLogan) +- [(#15010)](https://github.com/microsoft/vcpkg/pull/15010) [vcpkg] Remove extra indirection in IVersionedPortfileProvider/IBaselineProvider (by @ras0219) +- [(#15013)](https://github.com/microsoft/vcpkg/pull/15013) [vcpkg] Add support for --overlay-ports to versioning (by @ras0219) +- [(#15015)](https://github.com/microsoft/vcpkg/pull/15015) [seal] Update to SEAL 3.6.1 (by @kiromaru) +- [(#15018)](https://github.com/microsoft/vcpkg/pull/15018) [cppunit] add linux support and bump version to 1.15.1 (by @dweckmann) +- [(#15022)](https://github.com/microsoft/vcpkg/pull/15022) [eigen3] update to 3.3.9 (by @FlyingdutchmanC) +- [(#15027)](https://github.com/microsoft/vcpkg/pull/15027) [arrayfire] Remove forge and graphics deps from port (by @jacobkahn) +- [(#15030)](https://github.com/microsoft/vcpkg/pull/15030) [tcl, anyrpc, ois, osgearth] Build Fixes 2020-12-09 (by @BillyONeal) +- [(#15036)](https://github.com/microsoft/vcpkg/pull/15036) [speexdsp] Fix include directories for Linux builds (by @LRFLEW) +- [(#15037)](https://github.com/microsoft/vcpkg/pull/15037) [librttopo]new port (by @longhuan2018) +- [(#15038)](https://github.com/microsoft/vcpkg/pull/15038) [readosm] Update to 1.1.0a (by @longhuan2018) +- [(#15039)](https://github.com/microsoft/vcpkg/pull/15039) [spatialite-tools]update to 5.0.0 (by @longhuan2018) +- [(#15040)](https://github.com/microsoft/vcpkg/pull/15040) [libspatialite] Update 5.0.0 (by @longhuan2018) +- [(#15041)](https://github.com/microsoft/vcpkg/pull/15041) [curl] Update to 7.74.0 (by @nokutu) +- [(#15042)](https://github.com/microsoft/vcpkg/pull/15042) [sentry-native] Fix sentry-config-cmake.in (by @JackBoosY) +- [(#15044)](https://github.com/microsoft/vcpkg/pull/15044) [osg] build failure (by @JonLiu1993) +- [(#15045)](https://github.com/microsoft/vcpkg/pull/15045) [vcpkg] Don't require native tools on arm64 macOS (by @orudge) +- [(#15047)](https://github.com/microsoft/vcpkg/pull/15047) [CGAL] Upgrade to 5.2 (by @maxGimeno) +- [(#15049)](https://github.com/microsoft/vcpkg/pull/15049) [vcpkg_from_git] new options TAG and X_OUT_REF (by @Neumann-A) +- [(#15054)](https://github.com/microsoft/vcpkg/pull/15054) [vcpkg registries] Add git registries (by @strega-nil) +- [(#15056)](https://github.com/microsoft/vcpkg/pull/15056) [opencascade] Fix OpenCASCADE_INSTALL_PREFIX path in config (by @NancyLi1013) +- [(#15057)](https://github.com/microsoft/vcpkg/pull/15057) [taskflow] update port to v2.7.0 (by @remz1337) +- [(#15058)](https://github.com/microsoft/vcpkg/pull/15058) [mp3lame] Fix lib suffix on Unix (by @NancyLi1013) +- [(#15060)](https://github.com/microsoft/vcpkg/pull/15060) [fontconfig] Disable install data files (by @JackBoosY) +- [(#15062)](https://github.com/microsoft/vcpkg/pull/15062) [openssl] Remove extra slashes when installing usage (by @JackBoosY) +- [(#15063)](https://github.com/microsoft/vcpkg/pull/15063) [imgui] Fix find dependencies (by @JackBoosY) +- [(#15068)](https://github.com/microsoft/vcpkg/pull/15068) [oneDNN] New port (by @jacobkahn) +- [(#15076)](https://github.com/microsoft/vcpkg/pull/15076) Properly index package actions in log (by @gritukan) +- [(#15080)](https://github.com/microsoft/vcpkg/pull/15080) [hyperscan] Remove erroneous python3 dependency. (by @Hoikas) +- [(#15081)](https://github.com/microsoft/vcpkg/pull/15081) [vcpkg] Refactor end-to-end tests (by @ras0219) +- [(#15082)](https://github.com/microsoft/vcpkg/pull/15082) [glbinding] Improve usage information (by @ras0219) +- [(#15084)](https://github.com/microsoft/vcpkg/pull/15084) [vcpkg] Adhere to older draft schema to improve compatibility with editors (such as VS) (by @ras0219) +- [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) +- [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) +- [(#15092)](https://github.com/microsoft/vcpkg/pull/15092) [breakpad] Support breakpad_client on Linux & macOS (by @Perlmint) +- [(#15095)](https://github.com/microsoft/vcpkg/pull/15095) Avoid C4819 warning during bootstrap-vcpkg.bat (by @tetsuh) +- [(#15104)](https://github.com/microsoft/vcpkg/pull/15104) [ csv2 ]update to latest commit (by @gennesseaux) +- [(#15105)](https://github.com/microsoft/vcpkg/pull/15105) [NLopt] Update to 2.7.0 (by @rickertm) +- [(#15109)](https://github.com/microsoft/vcpkg/pull/15109) Azure-IoT-Sdk for C release 2020-12-09 (by @ewertons) +- [(#15110)](https://github.com/microsoft/vcpkg/pull/15110) [vcpkg] Fix CMAKE_CURRENT_LIST_DIR in load_dep_info_vars() (by @ras0219) +- [(#15112)](https://github.com/microsoft/vcpkg/pull/15112) [freetype] avoid target_link_libraries call since qt6 does not like it. (by @Neumann-A) +- [(#15114)](https://github.com/microsoft/vcpkg/pull/15114) [vcpkg registries] support versions (by @strega-nil) +- [(#15115)](https://github.com/microsoft/vcpkg/pull/15115) [vcpkg] `VCPKG_ENV_PASSTHROUGH_UNTRACKED` (by @ras0219) +- [(#15116)](https://github.com/microsoft/vcpkg/pull/15116) [vcpkg] fix v140. again (by @strega-nil) +- [(#15125)](https://github.com/microsoft/vcpkg/pull/15125) [coin] x64-windows-statid-md fixes (by @ankurverma85) +- [(#15126)](https://github.com/microsoft/vcpkg/pull/15126) [sdl1] x64-windows-static-md fixes (by @ankurverma85) +- [(#15127)](https://github.com/microsoft/vcpkg/pull/15127) [ffmpeg] fix up the pkgconfig files (by @JackBoosY) +- [(#15136)](https://github.com/microsoft/vcpkg/pull/15136) [wt] Update to 4.5.0 (by @RockinRoel) +- [(#15137)](https://github.com/microsoft/vcpkg/pull/15137) [boost-modular-build-helper] Specify msvc version in user-config.jam (by @ras0219-msft) +- [(#15138)](https://github.com/microsoft/vcpkg/pull/15138) [comms] update comms libs to latest version (by @mathisloge) +- [(#15139)](https://github.com/microsoft/vcpkg/pull/15139) [vcpkg] Teach `vcpkg install` `--no-build-missing` (by @ras0219-msft) +- [(#15140)](https://github.com/microsoft/vcpkg/pull/15140) [sail] Enable static builds and more platforms (by @happy-sea-fox) +- [(#15141)](https://github.com/microsoft/vcpkg/pull/15141) [vcpkg ci] upload diff from clang-format to artifacts (by @strega-nil) +- [(#15142)](https://github.com/microsoft/vcpkg/pull/15142) [mdns] added new port (by @mathisloge) +- [(#15144)](https://github.com/microsoft/vcpkg/pull/15144) [fontconfig] add vcpkg cmake wrapper. (by @Neumann-A) +- [(#15147)](https://github.com/microsoft/vcpkg/pull/15147) [openexr] Remove python dependency of openexr. (by @BillyONeal) +- [(#15149)](https://github.com/microsoft/vcpkg/pull/15149) [vcpkg] Fix warning (as error) when building vcpgk/toolsrc with clang++ 10 or g++ 9.3 (see #15148) (by @klalumiere) +- [(#15151)](https://github.com/microsoft/vcpkg/pull/15151) [opentracing] Update VMs 2020-12 (by @BillyONeal) +- [(#15156)](https://github.com/microsoft/vcpkg/pull/15156) [Realsense2] Update to 2.40.0 (by @JonLiu1993) +- [(#15158)](https://github.com/microsoft/vcpkg/pull/15158) [poppler] Add new port (by @playgithub) +- [(#15159)](https://github.com/microsoft/vcpkg/pull/15159) [comms] fixes debug build configuration (by @mathisloge) +- [(#15162)](https://github.com/microsoft/vcpkg/pull/15162) [OpenCV] update to v4.5 and to v3.4.12 (by @cenit) +- [(#15163)](https://github.com/microsoft/vcpkg/pull/15163) [magnum,magnum-plugins] Add vulkan and shaderconverter features (by @Squareys) +- [(#15168)](https://github.com/microsoft/vcpkg/pull/15168) [civetweb] Disable extensive log output for debug builds (by @gjasny) +- [(#15170)](https://github.com/microsoft/vcpkg/pull/15170) [qt5-base] mysql plugin added (by @jepessen) +- [(#15171)](https://github.com/microsoft/vcpkg/pull/15171) [docs] Document acceptable uses for features. (by @BillyONeal) +- [(#15172)](https://github.com/microsoft/vcpkg/pull/15172) [vcpkg] Improve versioning files generators (by @vicroms) +- [(#15177)](https://github.com/microsoft/vcpkg/pull/15177) [cppmicroservices] Fix warning C4834 (by @Cheney-W) +- [(#15179)](https://github.com/microsoft/vcpkg/pull/15179) [mingw] Use find_file to find compiler, fall back to unprefixed windres if the prefixed version doesn't exist (by @longnguyen2004) +- [(#15182)](https://github.com/microsoft/vcpkg/pull/15182) [sobjectizer] update to v.5.7.2.1 (by @eao197) +- [(#15183)](https://github.com/microsoft/vcpkg/pull/15183) [ctp] bugfix for linux-x64 and file name case sensitivity (by @xgao1023) +- [(#15186)](https://github.com/microsoft/vcpkg/pull/15186) [pegtl] Update to release version 3.1.0 (by @wravery) +- [(#15187)](https://github.com/microsoft/vcpkg/pull/15187) Write manifest "vcpkg install" output to stdout (by @PazerOP) +- [(#15188)](https://github.com/microsoft/vcpkg/pull/15188) Fixed internal compiler error when using newer GCC@master. (by @nanoric) +- [(#15191)](https://github.com/microsoft/vcpkg/pull/15191) [openssl] install pkgconfig file (by @Perlmint) +- [(#15194)](https://github.com/microsoft/vcpkg/pull/15194) [ogre] make zziplib, freeimage, assimp, freetype and less strict resource manager as feature (by @dweckmann) +- [(#15196)](https://github.com/microsoft/vcpkg/pull/15196) [libjpeg-turbo/mozjpeg] Add conflict messages (by @NancyLi1013) +- [(#15200)](https://github.com/microsoft/vcpkg/pull/15200) [tool-meson] Rev vcpkg's meson build (by @RichLogan) +- [(#15206)](https://github.com/microsoft/vcpkg/pull/15206) Print failing upload attempts in !debug. (by @BillyONeal) +- [(#15207)](https://github.com/microsoft/vcpkg/pull/15207) [pugixml] Update to 1.11.4 (by @c72578) +- [(#15210)](https://github.com/microsoft/vcpkg/pull/15210) Updated directxtk et al for cmake package support (by @walbourn) +- [(#15213)](https://github.com/microsoft/vcpkg/pull/15213) [libass] Update to 0.15.0 (by @wangqr) +- [(#15214)](https://github.com/microsoft/vcpkg/pull/15214) [avisynthplus] Update to 3.6.1 (by @wangqr) +- [(#15215)](https://github.com/microsoft/vcpkg/pull/15215) [zziplib] Uses upstream CMakeLists.txt (by @longnguyen2004) +- [(#15219)](https://github.com/microsoft/vcpkg/pull/15219) [gloo] New Port (by @jacobkahn) +- [(#15221)](https://github.com/microsoft/vcpkg/pull/15221) [python3] Add vcpkg-cmake-wrapper. (by @Hoikas) +- [(#15222)](https://github.com/microsoft/vcpkg/pull/15222) Port for Microsoft GitHub DirectX-Headers (by @walbourn) +- [(#15234)](https://github.com/microsoft/vcpkg/pull/15234) [libjpeg-turbo] fix incompatibility for c11 and c17 (by @playgithub) +- [(#15236)](https://github.com/microsoft/vcpkg/pull/15236) [gmp/nettle] Update to latest release revision (by @PhoebeHui) +- [(#15240)](https://github.com/microsoft/vcpkg/pull/15240) [Hedley] Update to v14 (by @pratikpc) +- [(#15244)](https://github.com/microsoft/vcpkg/pull/15244) [x-plane] Update to 3.0.3 (by @siavee) +- [(#15245)](https://github.com/microsoft/vcpkg/pull/15245) [graphicsmagick] Add delegates.mgk (by @NancyLi1013) +- [(#15246)](https://github.com/microsoft/vcpkg/pull/15246) [protobuf] Fix the default proto file path (by @JackBoosY) +- [(#15252)](https://github.com/microsoft/vcpkg/pull/15252) Fixed port of quirc - patch did no longer apply / modified to fix build (by @Markus87) +- [(#15254)](https://github.com/microsoft/vcpkg/pull/15254) [boost-modular-builder] let fallback to default tool path (by @xandox) +- [(#15257)](https://github.com/microsoft/vcpkg/pull/15257) Add testing with VS2015 and VS2017 compilers. (by @BillyONeal) +- [(#15258)](https://github.com/microsoft/vcpkg/pull/15258) Update MacOS Software (by @BillyONeal) +- [(#15259)](https://github.com/microsoft/vcpkg/pull/15259) [libpqxx] update to 7.3.0 (by @JonLiu1993) +- [(#15263)](https://github.com/microsoft/vcpkg/pull/15263) [libass] update to 0.15.0 (by @JonLiu1993) +- [(#15265)](https://github.com/microsoft/vcpkg/pull/15265) [boost-modular-build-helper] Fix repeat building issue on linux and osx (by @PhoebeHui) +- [(#15266)](https://github.com/microsoft/vcpkg/pull/15266) [wtl] Update wtl to 10.0.10320 (by @chrullrich) +- [(#15269)](https://github.com/microsoft/vcpkg/pull/15269) [libsodium] use x64 specific gcc options only on x64 platform (by @isanych) +- [(#15274)](https://github.com/microsoft/vcpkg/pull/15274) [boost-modular-build-helper] Allow setting B2_OPTIONS_[DBG|REL] in BOOST_CMAKE_FRAGMENT (fixes #15273) (by @klalumiere) +- [(#15276)](https://github.com/microsoft/vcpkg/pull/15276) [ompl] upgrade to v1.5.1 (by @seanyen) +- [(#15277)](https://github.com/microsoft/vcpkg/pull/15277) [dlib] adding missing cudnn depedency for cuda feature (by @Kicer86) +- [(#15281)](https://github.com/microsoft/vcpkg/pull/15281) [librsync] fix librsync linkage (by @Amf1k) +- [(#15282)](https://github.com/microsoft/vcpkg/pull/15282) [mingw] Remove executable extension on non-Windows hosts (by @longnguyen2004) +- [(#15286)](https://github.com/microsoft/vcpkg/pull/15286) [boost-di] Update to 1.2.0 (by @PhoebeHui) +- [(#15292)](https://github.com/microsoft/vcpkg/pull/15292) [gdal] Update to 3.2.2 (by @longhuan2018) +- [(#15295)](https://github.com/microsoft/vcpkg/pull/15295) [minimp3] update to 2020-11-27 (by @JonLiu1993) +- [(#15296)](https://github.com/microsoft/vcpkg/pull/15296) [darknet] yolo v4 weights's hash need to update (by @JonLiu1993) +- [(#15298)](https://github.com/microsoft/vcpkg/pull/15298) [openssl] Update to 1.1.1i (by @lebdron) +- [(#15299)](https://github.com/microsoft/vcpkg/pull/15299) [vcpkg] use VCPKG_ROOT_DIR instead of DOWNLOADS for WORKING_DIRECTORY in do_version_check (by @lebdron) +- [(#15305)](https://github.com/microsoft/vcpkg/pull/15305) [arcus] New port (by @stephenjust) +- [(#15306)](https://github.com/microsoft/vcpkg/pull/15306) [tbb] arm64-osx support (by @lebdron) +- [(#15307)](https://github.com/microsoft/vcpkg/pull/15307) [grpc] Build codegen on arm64-osx (by @lebdron) +- [(#15314)](https://github.com/microsoft/vcpkg/pull/15314) fix licensingfile of kf5archive (by @Hendiadyoin1) +- [(#15322)](https://github.com/microsoft/vcpkg/pull/15322) [bcg729] New port (by @geraldcombs) +- [(#15331)](https://github.com/microsoft/vcpkg/pull/15331) [libilbc] New port (by @geraldcombs) +- [(#15334)](https://github.com/microsoft/vcpkg/pull/15334) [freetype] Update to 2.10.4 (by @kevinlul) +- [(#15336)](https://github.com/microsoft/vcpkg/pull/15336) [KTX] Add port (by @stephenjust) +- [(#15338)](https://github.com/microsoft/vcpkg/pull/15338) [restinio] update to v.0.6.13 (by @eao197) +- [(#15340)](https://github.com/microsoft/vcpkg/pull/15340) [mdnsresponder] Change compile flag /Zi to /Z7 (by @JackBoosY) +- [(#15342)](https://github.com/microsoft/vcpkg/pull/15342) Raylib update to 3.5.0 (by @JonLiu1993) +- [(#15344)](https://github.com/microsoft/vcpkg/pull/15344) [cpp-httplib] Update to version 0.7.18 (by @iko1) +- [(#15352)](https://github.com/microsoft/vcpkg/pull/15352) [boost-python] Adds `python-debugging=on` to `B2_OPTIONS_DBG` (fixes #15350) (by @klalumiere) +- [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- [(#15354)](https://github.com/microsoft/vcpkg/pull/15354) [vcpkg] Fix unrecognized identifier errors in prbuild and cibuild. (by @BillyONeal) +- [(#15355)](https://github.com/microsoft/vcpkg/pull/15355) [vcpkg] Fix pwsh version detection for old versions to download a fresh copy. (by @BillyONeal) +- [(#15359)](https://github.com/microsoft/vcpkg/pull/15359) [monkeys-audio] Update to 5.70 (by @c72578) +- [(#15360)](https://github.com/microsoft/vcpkg/pull/15360) [glib] Fix pkgconfig files (by @PhoebeHui) +- [(#15361)](https://github.com/microsoft/vcpkg/pull/15361) [libpq] Change compile flag /Zi to /Z7 when building Windows (by @JackBoosY) +- [(#15362)](https://github.com/microsoft/vcpkg/pull/15362) [ceres] Fix static library path on Linux (by @JackBoosY) +- [(#15365)](https://github.com/microsoft/vcpkg/pull/15365) update toml++ to v2.3.0 (by @marzer) +- [(#15366)](https://github.com/microsoft/vcpkg/pull/15366) [LLGL] installs header files in the wrong directory (by @JonLiu1993) +- [(#15372)](https://github.com/microsoft/vcpkg/pull/15372) [onednn] Fix share path infix to match find_package() name (by @jacobkahn) +- [(#15374)](https://github.com/microsoft/vcpkg/pull/15374) [osg] fix x64-windows-static-md builds (by @ankurverma85) +- [(#15375)](https://github.com/microsoft/vcpkg/pull/15375) [osgearth] Fix x64-windows-static-md (by @ankurverma85) +- [(#15378)](https://github.com/microsoft/vcpkg/pull/15378) [antlr4,python3] Resolve cross port conflicts (by @BillyONeal) +- [(#15379)](https://github.com/microsoft/vcpkg/pull/15379) [flashlight-cuda] Update port (by @jacobkahn) +- [(#15383)](https://github.com/microsoft/vcpkg/pull/15383) [directxmath] port updated for cmake improvements (by @walbourn) +- [(#15384)](https://github.com/microsoft/vcpkg/pull/15384) [soqt] Use vcpkg_from_github. (by @BillyONeal) +- [(#15385)](https://github.com/microsoft/vcpkg/pull/15385) [boost-build] Fix cflags and c++flags for msvc (by @PhoebeHui) +- [(#15387)](https://github.com/microsoft/vcpkg/pull/15387) [simde] update to 0.7.0 (by @JonLiu1993) +- [(#15389)](https://github.com/microsoft/vcpkg/pull/15389) [exiv2] Add pkgconfig to fix the path (by @NancyLi1013) +- [(#15393)](https://github.com/microsoft/vcpkg/pull/15393) [freeimage] Fix for FreeImage incorrect image format enum after disabling vendor plugins (by @giladbau) +- [(#15394)](https://github.com/microsoft/vcpkg/pull/15394) [IXWebsocket ] Upgraded to 11.0.4 version (by @ludekvodicka) +- [(#15396)](https://github.com/microsoft/vcpkg/pull/15396) [vcpkg] Improve docs for binarycaching (by @ras0219) +- [(#15398)](https://github.com/microsoft/vcpkg/pull/15398) [sdl2] Update to 2.0.14 (by @RT222) +- [(#15400)](https://github.com/microsoft/vcpkg/pull/15400) [wangle] Fix dependency issue (by @PhoebeHui) +- [(#15401)](https://github.com/microsoft/vcpkg/pull/15401) Update cpprestsdk to 2.10.17. (by @BillyONeal) +- [(#15410)](https://github.com/microsoft/vcpkg/pull/15410) [msbuild]Fix incorrect triplet configuration for Project Reunion apps (by @soumyamahunt) +- [(#15411)](https://github.com/microsoft/vcpkg/pull/15411) [vcpkg] Add x64-windows-static-md to pipeline (by @ankurverma85) +- [(#15416)](https://github.com/microsoft/vcpkg/pull/15416) [libheif] update to 1.10.0 (by @0xC0000054) +- [(#15419)](https://github.com/microsoft/vcpkg/pull/15419) [docs] fix "CMake script" -> "makefile" for vcpkg_(n)build_make (by @tueda) +- [(#15421)](https://github.com/microsoft/vcpkg/pull/15421) [tmx] Update tmx port to 1.1.0 (by @jarruda) +- [(#15425)](https://github.com/microsoft/vcpkg/pull/15425) [nuspell] update to version 4.2.0 (by @dimztimz) +- [(#15427)](https://github.com/microsoft/vcpkg/pull/15427) [msdfgen] New port (by @Haeri) +- [(#15435)](https://github.com/microsoft/vcpkg/pull/15435) [vcpkg] Provide proxy setting instruction for more compatibility. (by @cnSchwarzer) +- [(#15436)](https://github.com/microsoft/vcpkg/pull/15436) simdjson update to v0.7.1 (by @JonLiu1993) +- [(#15437)](https://github.com/microsoft/vcpkg/pull/15437) [hidapi] Support static build (by @PhoebeHui) +- [(#15438)](https://github.com/microsoft/vcpkg/pull/15438) [wil] Use internal CMakeLists (by @JackBoosY) +- [(#15445)](https://github.com/microsoft/vcpkg/pull/15445) [opencl] Fix dynamic build on linux (by @dweckmann) +- [(#15449)](https://github.com/microsoft/vcpkg/pull/15449) [vcpkg] Update paragraph tests (by @Mr-Leshiy) +- [(#15460)](https://github.com/microsoft/vcpkg/pull/15460) update trantor to 1.1.1 (by @kkzi) +- [(#15467)](https://github.com/microsoft/vcpkg/pull/15467) [quill] Update to v1.6.1 (by @RT222) +- [(#15468)](https://github.com/microsoft/vcpkg/pull/15468) [type-safe] New port. (by @blaz-kranjc) +- [(#15470)](https://github.com/microsoft/vcpkg/pull/15470) [vcpkg] Use a tag file rather than conditional compilation to permanently disable metrics. (by @BillyONeal) +- [(#15472)](https://github.com/microsoft/vcpkg/pull/15472) [vcpkg] Restore embedded git hash behind an option. (by @BillyONeal) +- [(#15473)](https://github.com/microsoft/vcpkg/pull/15473) [vcpkg baseline][cppcms] Fix issue with detecting Python 2. (by @Hoikas) +- [(#15474)](https://github.com/microsoft/vcpkg/pull/15474) [vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (by @BillyONeal) +- [(#15482)](https://github.com/microsoft/vcpkg/pull/15482) [libepoxy] Update to 1.5.5 (by @ras0219) +- [(#15485)](https://github.com/microsoft/vcpkg/pull/15485) Update to hidapi-0.10.1 (by @JoergAtGithub) +- [(#15486)](https://github.com/microsoft/vcpkg/pull/15486) [libzippp] fix find lzma (by @StarGate-One) +- [(#15491)](https://github.com/microsoft/vcpkg/pull/15491) [vcpkg baseline][poppler] Fix issue with using libcurl. (by @Hoikas) +- [(#15500)](https://github.com/microsoft/vcpkg/pull/15500) [openigtlink] Fix cmake config location (by @dweckmann) +- [(#15504)](https://github.com/microsoft/vcpkg/pull/15504) [vcpkg] Fix build for mingw (by @strega-nil) +- [(#15507)](https://github.com/microsoft/vcpkg/pull/15507) [pybind11] Use vcpkg Python3. (by @Hoikas) +- [(#15509)](https://github.com/microsoft/vcpkg/pull/15509) [openimageio] Bump to 2.2.10.0. (by @Hoikas) +- [(#15510)](https://github.com/microsoft/vcpkg/pull/15510) [google-cloud-cpp] update to latest release (v1.22.0) (by @coryan) +- [(#15512)](https://github.com/microsoft/vcpkg/pull/15512) [vcpkg] Allow to use Nuget's cache for Nuget binary caching sources (fix #15169) (by @klalumiere) +- [(#15513)](https://github.com/microsoft/vcpkg/pull/15513) [boost-asio] Fix duplicate symbols of asio::dummy_return (by @cedral) +- [(#15514)](https://github.com/microsoft/vcpkg/pull/15514) [flashlight-cpu] New port (by @jacobkahn) +- [(#15516)](https://github.com/microsoft/vcpkg/pull/15516) [vcpkg] Add sources for TLS 1.2 downloader tool. (by @BillyONeal) +- [(#15517)](https://github.com/microsoft/vcpkg/pull/15517) [sqlite-orm] Update to 1.6 (by @NancyLi1013) +- [(#15537)](https://github.com/microsoft/vcpkg/pull/15537) [polyhook2]Update to the latest version (by @stevemk14ebr) +- [(#15538)](https://github.com/microsoft/vcpkg/pull/15538) [vcpkg] Show the cache file name at download time to provide more ancillary information in non-ARIA2 mode. (by @RonxBulld) +- [(#15540)](https://github.com/microsoft/vcpkg/pull/15540) [sdl2] Fix improper replacement of -lSDL2main + remove IGNORE_FLAGS and SYSTEM_LIBRARIES (by @longnguyen2004) +- [(#15541)](https://github.com/microsoft/vcpkg/pull/15541) gdal:x64-windows-static-md fixes (by @ankurverma85) +- [(#15543)](https://github.com/microsoft/vcpkg/pull/15543) [vcpkg/docs] Add Missing Links in Spanish Readme (by @ninjaoflight) +- [(#15549)](https://github.com/microsoft/vcpkg/pull/15549) [cppgraphqlgen] Fix --head for new branch/option (by @wravery) +- [(#15554)](https://github.com/microsoft/vcpkg/pull/15554) directxmesh, directxtex, and uvatlas now support linux (by @walbourn) +- [(#15558)](https://github.com/microsoft/vcpkg/pull/15558) [palsigslot] New port (by @luca-schlecker) +- [(#15565)](https://github.com/microsoft/vcpkg/pull/15565) [vcpkg] Add initial versioning documentation (by @ras0219) +- [(#15567)](https://github.com/microsoft/vcpkg/pull/15567) [entt] update to <3.6> (by @JonLiu1993) +- [(#15569)](https://github.com/microsoft/vcpkg/pull/15569) [paho-mqtt] update to 1.3.8 (by @JonLiu1993) +- [(#15572)](https://github.com/microsoft/vcpkg/pull/15572) [vcpkg,boost-modular-build-helper] initial ppc64le community support (by @lebdron) +- [(#15573)](https://github.com/microsoft/vcpkg/pull/15573) [paho-mqttpp3] update to 1.2.0 (by @JonLiu1993) +- [(#15574)](https://github.com/microsoft/vcpkg/pull/15574) [poppler] Fix error gperf is not recognized as an internal or externa command (by @Cheney-W) +- [(#15577)](https://github.com/microsoft/vcpkg/pull/15577) [SOCI] Add support for soci-mysql connector (by @emexal-company) +- [(#15578)](https://github.com/microsoft/vcpkg/pull/15578) [vcpkg_apply_patches] don't change line endings on patching. (by @Neumann-A) +- [(#15579)](https://github.com/microsoft/vcpkg/pull/15579) [libpq] fix python patches (by @Neumann-A) +- [(#15580)](https://github.com/microsoft/vcpkg/pull/15580) [vcpkg] Add parse checking for version fields and enable non-string versions outside 'versions' flag (by @ras0219) +- [(#15581)](https://github.com/microsoft/vcpkg/pull/15581) [ignition-fuel-tools4] Add new port ???? (by @traversaro) +- [(#15583)](https://github.com/microsoft/vcpkg/pull/15583) [vcpkg] Add a different way to use CommandBuilder, support InWorkingDirectory (by @strega-nil) +- [(#15584)](https://github.com/microsoft/vcpkg/pull/15584) [vcpkg] Resolve macos host machines running out of disk space by reducing size and using fixed disks. (by @BillyONeal) +- [(#15585)](https://github.com/microsoft/vcpkg/pull/15585) [speexdsp] Configure and install speexdsp.pc (by @adam-bloom) +- [(#15589)](https://github.com/microsoft/vcpkg/pull/15589) [libzip] Relative pkgconfig paths (by @adam-bloom) +- [(#15593)](https://github.com/microsoft/vcpkg/pull/15593) [pangolin] Fix static build error (by @NancyLi1013) +- [(#15595)](https://github.com/microsoft/vcpkg/pull/15595) [nana] Fix fontconfig dependency (by @NancyLi1013) +- [(#15596)](https://github.com/microsoft/vcpkg/pull/15596) [qt5-base] Improve the warning message on Linux (by @JackBoosY) +- [(#15597)](https://github.com/microsoft/vcpkg/pull/15597) [qt5] Remove dependency qt5 feature mysqlplugin when building x86 (by @JackBoosY) +- [(#15600)](https://github.com/microsoft/vcpkg/pull/15600) [graphicsmagick] update to version 1.3.36 (by @josuegomes) +- [(#15603)](https://github.com/microsoft/vcpkg/pull/15603) [outcome] Replace Outcome single header based port with full fat cmake install port (by @ned14) +- [(#15606)](https://github.com/microsoft/vcpkg/pull/15606) [boost-locale] android build (by @xandox) +- [(#15608)](https://github.com/microsoft/vcpkg/pull/15608) Librealsense2 android build (by @xandox) +- [(#15609)](https://github.com/microsoft/vcpkg/pull/15609) delete linux from fail port from tomlplusplus (by @marshevms) +- [(#15611)](https://github.com/microsoft/vcpkg/pull/15611) [vcpkg_acquire_msys] add findutils as a dependency to libtool (by @Neumann-A) +- [(#15613)](https://github.com/microsoft/vcpkg/pull/15613) [libconfig] shlwapi is not available on linux (by @vmiheer) +- [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- [(#15620)](https://github.com/microsoft/vcpkg/pull/15620) [libtorrent] update to 1.2.12 (by @JonLiu1993) +- [(#15622)](https://github.com/microsoft/vcpkg/pull/15622) [vcpkg_build_make] remove libtool artifacts (by @Neumann-A) +- [(#15624)](https://github.com/microsoft/vcpkg/pull/15624) [glslang] Provide glslang-default-resource-limits library. (by @wolfpld) +- [(#15627)](https://github.com/microsoft/vcpkg/pull/15627) [vcpkg] Rewriting CmdLineBuilder (2/n) (by @strega-nil) +- [(#15633)](https://github.com/microsoft/vcpkg/pull/15633) [vcpkg] Change version field in `baseline.json` (by @vicroms) +- [(#15634)](https://github.com/microsoft/vcpkg/pull/15634) [openal-soft] Fix issue with cmake config. (by @Hoikas) +- [(#15636)](https://github.com/microsoft/vcpkg/pull/15636) [vcpkg] Fix incorrect handling of messages for permenantly disabled metrics. (by @BillyONeal) +- [(#15637)](https://github.com/microsoft/vcpkg/pull/15637) [physfs] Enable arm64 for non-Windows targets (by @past-due) +- [(#15638)](https://github.com/microsoft/vcpkg/pull/15638) [vcpkg] Add vcpkg_minimum_required as a replacement for VERSION.txt. (by @BillyONeal) +- [(#15639)](https://github.com/microsoft/vcpkg/pull/15639) directxtex, directxmesh, directxtk, uvatlas ports updated to fix cach??? (by @walbourn) +- [(#15645)](https://github.com/microsoft/vcpkg/pull/15645) [xlnt] Prevent macro redefinition (by @malirod) +- [(#15650)](https://github.com/microsoft/vcpkg/pull/15650) [log4cpp] find_package support (by @mannkafai) +- [(#15651)](https://github.com/microsoft/vcpkg/pull/15651) Improve `x-ci-verify-versions` error messages (by @vicroms) +- [(#15652)](https://github.com/microsoft/vcpkg/pull/15652) [vcpkg] Add version files (by @vicroms) +- [(#15655)](https://github.com/microsoft/vcpkg/pull/15655) [vcpkg] Add CI check for version files and update maintainer's guideline (by @vicroms) +- [(#15659)](https://github.com/microsoft/vcpkg/pull/15659) [vcpkg] vcpkg_configure_make: Support macOS cross-compile (by @past-due) +- [(#15661)](https://github.com/microsoft/vcpkg/pull/15661) [gtest] Add a patch to fix build error in GCC 11 (by @PragmaTwice) +- [(#15662)](https://github.com/microsoft/vcpkg/pull/15662) Reorder CI checks (by @vicroms) +- [(#15664)](https://github.com/microsoft/vcpkg/pull/15664) [vcpkg] Format JSON output of `x-add-version` to minimize diffs (by @vicroms) +- [(#15666)](https://github.com/microsoft/vcpkg/pull/15666) [podofo] Fix feature crypto (by @JackBoosY) +- [(#15667)](https://github.com/microsoft/vcpkg/pull/15667) [vtk] use patch for QT_NO_KEYWORDS support from upstream (by @dweckmann) +- [(#15669)](https://github.com/microsoft/vcpkg/pull/15669) [google-cloud-cpp] update to v1.23.0 (by @coryan) +- [(#15671)](https://github.com/microsoft/vcpkg/pull/15671) [libopusenc] fix macOS and Linux build (by @Be-ing) +- [(#15672)](https://github.com/microsoft/vcpkg/pull/15672) [blend2d] Update to beta_2021-01-02 (by @ZeeWanderer) +- [(#15673)](https://github.com/microsoft/vcpkg/pull/15673) [vcpkg] Rewriting CmdLineBuilder/Command (3/n) (by @strega-nil) +- [(#15676)](https://github.com/microsoft/vcpkg/pull/15676) [vcpkg] Remove versions feature flag check in all places except inputs (by @ras0219) +- [(#15677)](https://github.com/microsoft/vcpkg/pull/15677) [vcpkg] Miscellaneous internal improvements extracted from #15424 (by @ras0219) +- [(#15680)](https://github.com/microsoft/vcpkg/pull/15680) Fix Mbed TLS build for Android (by @ahmedyarub) +- [(#15682)](https://github.com/microsoft/vcpkg/pull/15682) [pagmo2] Add new port (by @dmillard) +- [(#15683)](https://github.com/microsoft/vcpkg/pull/15683) [simage] Fix optional dependencies (by @ras0219-msft) +- [(#15684)](https://github.com/microsoft/vcpkg/pull/15684) [physfs] Fix arm64-windows (by @past-due) +- [(#15686)](https://github.com/microsoft/vcpkg/pull/15686) [vcpkg-ci] Move version validation after CI build passes (by @ras0219) +- [(#15687)](https://github.com/microsoft/vcpkg/pull/15687) [libssh] Add support for Android (by @ahmedyarub) +- [(#15688)](https://github.com/microsoft/vcpkg/pull/15688) fix wrong path in docs/specifications/manifests.md (by @aarcangeli) +- [(#15692)](https://github.com/microsoft/vcpkg/pull/15692) update libusb to 1.0.24 (by @matwey) +- [(#15693)](https://github.com/microsoft/vcpkg/pull/15693) [vcpkg] More versioning docs (by @vicroms) +- [(#15699)](https://github.com/microsoft/vcpkg/pull/15699) [libmariadb] Fix compiling on ARM64 (by @kotori2) +- [(#15700)](https://github.com/microsoft/vcpkg/pull/15700) [pegtl] Update to 3.2.0 release (by @wravery) +- [(#15701)](https://github.com/microsoft/vcpkg/pull/15701) [cppgraphqlgen] Update to 3.5.0 release (by @wravery) +- [(#15706)](https://github.com/microsoft/vcpkg/pull/15706) [icu] Add support for macos rpath prefix macro (by @adam-bloom) +- [(#15709)](https://github.com/microsoft/vcpkg/pull/15709) [vcpkg] Fix regression in error messages with registries/versioning (by @ras0219) +- [(#15714)](https://github.com/microsoft/vcpkg/pull/15714) [nsync] create a new port (by @luncliff) +- [(#15715)](https://github.com/microsoft/vcpkg/pull/15715) [metrohash] support Android triplet build (by @luncliff) +- [(#15717)](https://github.com/microsoft/vcpkg/pull/15717) [mnn,flatbuffers] add a new port and patch (by @luncliff) +- [(#15718)](https://github.com/microsoft/vcpkg/pull/15718) [sfml] Install usage and change version scheme to relaxed (by @ras0219) +- [(#15720)](https://github.com/microsoft/vcpkg/pull/15720) [sdformat9] Update to 9.4.0 (by @traversaro) +- [(#15721)](https://github.com/microsoft/vcpkg/pull/15721) [xorstr] Update to 2020-11-29 (by @ghost) +- [(#15722)](https://github.com/microsoft/vcpkg/pull/15722) [phnt] Update to 2020-12-21 (by @ghost) +- [(#15724)](https://github.com/microsoft/vcpkg/pull/15724) [freerdp] Fix include path (by @KangLin) +- [(#15725)](https://github.com/microsoft/vcpkg/pull/15725) [aws-cpp-sdk] [zlib] [openssl] [curl] Fix zlib, OpenSSL, curl and AWS SDK for Android (by @ahmedyarub) +- [(#15727)](https://github.com/microsoft/vcpkg/pull/15727) [poppler] Disable clang-format check (by @NancyLi1013) +- [(#15729)](https://github.com/microsoft/vcpkg/pull/15729) [vcpkg baseline] [mesa] Fix conflicts with angle (by @NancyLi1013) +- [(#15732)](https://github.com/microsoft/vcpkg/pull/15732) [msys2] Update msys components pkgconfig url (by @JackBoosY) +- [(#15734)](https://github.com/microsoft/vcpkg/pull/15734) [tiff] add vcpkg_fixup_pkgconfig for tiff (by @Neumann-A) +- [(#15735)](https://github.com/microsoft/vcpkg/pull/15735) [libjepg-turbo] Fix *.pc files (by @Neumann-A) +- [(#15739)](https://github.com/microsoft/vcpkg/pull/15739) [restc-cpp] new port (by @lejcik) +- [(#15740)](https://github.com/microsoft/vcpkg/pull/15740) [vcpkg baseline][vcpkg_configure_make] Fix arm64-windows, arm-uwp (by @past-due) +- [(#15743)](https://github.com/microsoft/vcpkg/pull/15743) [usockets] Update uSockets to the latest version (by @JonLiu1993) +- [(#15746)](https://github.com/microsoft/vcpkg/pull/15746) [vcpkg baseline] Disable spatialite-tools on linux and osx (by @NancyLi1013) +- [(#15748)](https://github.com/microsoft/vcpkg/pull/15748) [libpq] Fix install tool pg_config on Linux (by @JackBoosY) +- [(#15750)](https://github.com/microsoft/vcpkg/pull/15750) [libgeotiff] Fix packagename via find_package (by @NancyLi1013) +- [(#15751)](https://github.com/microsoft/vcpkg/pull/15751) [reproc] update to 14.2.1 (by @JonLiu1993) +- [(#15752)](https://github.com/microsoft/vcpkg/pull/15752) [libsass/sassc] add new port/tool (by @Neumann-A) +- [(#15754)](https://github.com/microsoft/vcpkg/pull/15754) [graphene] Add new port (by @Neumann-A) +- [(#15756)](https://github.com/microsoft/vcpkg/pull/15756) [vcpkg/meson] fix some details (by @Neumann-A) +- [(#15757)](https://github.com/microsoft/vcpkg/pull/15757) [Arrow] Update to 3.0.0 (by @GPSnoopy) +- [(#15760)](https://github.com/microsoft/vcpkg/pull/15760) Update aws cpp sdk (by @ahmedyarub) +- [(#15764)](https://github.com/microsoft/vcpkg/pull/15764) [opencolorio] Install OpenColorIOConfig.cmake (by @ras0219) +- [(#15767)](https://github.com/microsoft/vcpkg/pull/15767) [vcpkg] fix edit command on windows (by @strega-nil) +- [(#15768)](https://github.com/microsoft/vcpkg/pull/15768) [vcpkg baseline][spatialite-tools] fix linux osx build falied (by @longhuan2018) +- [(#15769)](https://github.com/microsoft/vcpkg/pull/15769) [x264] Fix build failed on uwp (by @NancyLi1013) +- [(#15770)](https://github.com/microsoft/vcpkg/pull/15770) [darknet] update to latest version (by @cenit) +- [(#15771)](https://github.com/microsoft/vcpkg/pull/15771) [libiconv] Updated typo in iconv share files location (by @ludekvodicka) +- [(#15777)](https://github.com/microsoft/vcpkg/pull/15777) [osgearth] Make all find_packages required in effort to make this port less "flaky", and turn on in CI. (by @BillyONeal) +- [(#15782)](https://github.com/microsoft/vcpkg/pull/15782) [lzo] Install pc file on windows (by @Neumann-A) +- [(#15784)](https://github.com/microsoft/vcpkg/pull/15784) [vcpkg] Rename `port_versions` to `versions` (by @strega-nil) +- [(#15785)](https://github.com/microsoft/vcpkg/pull/15785) [crfsuite] change /include/x.h => /include/crfsuite/x.h (by @BillyONeal) +- [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) +- [(#15788)](https://github.com/microsoft/vcpkg/pull/15788) [quirc, opencv4] Build fixes from 2021-01-18 build (by @BillyONeal) +- [(#15789)](https://github.com/microsoft/vcpkg/pull/15789) [ogre] Do not use strict mode by default in ogre for backward compatibility (by @traversaro) +- [(#15790)](https://github.com/microsoft/vcpkg/pull/15790) [sentry-native] Update to 0.4.5 (by @AenBleidd) +- [(#15797)](https://github.com/microsoft/vcpkg/pull/15797) [libsamplerate] Upgrade to 0.2.0 (by @evpobr) +- [(#15802)](https://github.com/microsoft/vcpkg/pull/15802) [ceres] Mark all dependencies REQUIRED (by @ras0219) +- [(#15803)](https://github.com/microsoft/vcpkg/pull/15803) [vcpkg testing] fix e2e tests (by @strega-nil) +- [(#15804)](https://github.com/microsoft/vcpkg/pull/15804) [aws-sdk-cpp] Fix PRIVATE => PRVATE typo (by @BillyONeal) +- [(#15806)](https://github.com/microsoft/vcpkg/pull/15806) [libxslt] Fixed macos build (by @ludekvodicka) +- [(#15810)](https://github.com/microsoft/vcpkg/pull/15810) [vcpkg] Restore x-upload-metrics command accidentally disabled by removing VCPKG_DISABLE_METRICS (by @BillyONeal) +- [(#15812)](https://github.com/microsoft/vcpkg/pull/15812) [freeimage] Fix plugin disable patch (by @JackBoosY) +- [(#15821)](https://github.com/microsoft/vcpkg/pull/15821) [libffi] Added armv7-a to allowed architectures for Android 32 bit arm builds (by @venabled) +- [(#15825)](https://github.com/microsoft/vcpkg/pull/15825) [vcpkg] Improve diagnostics around compiler tracking and toolset errors. 'Fixes' #15823. (by @ras0219) +- [(#15828)](https://github.com/microsoft/vcpkg/pull/15828) [vcpkg] Add dummy version.txt for vcpkg older than vcpkg_minimum_required. (by @BillyONeal) +- [(#15831)](https://github.com/microsoft/vcpkg/pull/15831) [spirv-cross,spirv-headers,spirv-tools] 2021-01-15 update (by @barcharcraz) +- [(#15832)](https://github.com/microsoft/vcpkg/pull/15832) [vcpkg] clarify the actions of vcpkg_check_linkage (by @barcharcraz) +- [(#15837)](https://github.com/microsoft/vcpkg/pull/15837) [ngspice] Update to rev 33 (by @marekr) +- [(#15841)](https://github.com/microsoft/vcpkg/pull/15841) [trantor] Update to 1.2.0 (by @an-tao) +- [(#15845)](https://github.com/microsoft/vcpkg/pull/15845) [docs] Correct the "new port requests" link in FAQ (by @claremacrae) +- [(#15850)](https://github.com/microsoft/vcpkg/pull/15850) [drogon] Upgrade to v1.3.0 (by @kotori2) +- [(#15851)](https://github.com/microsoft/vcpkg/pull/15851) [libpqxx] Upgrade to v7.3.1 (by @tomlankhorst) +- [(#15852)](https://github.com/microsoft/vcpkg/pull/15852) [angelscript] Update to 2.35.0 (by @crackedmind) +- [(#15855)](https://github.com/microsoft/vcpkg/pull/15855) [speex] Add linux and macOS support. (by @Hoikas) +- [(#15856)](https://github.com/microsoft/vcpkg/pull/15856) [kinectsdk1] Update hash (by @Cheney-W) +- [(#15857)](https://github.com/microsoft/vcpkg/pull/15857) [charls] update to 2.2.0 (by @JonLiu1993) +- [(#15859)](https://github.com/microsoft/vcpkg/pull/15859) [OpenCV] bump to 4.5.1 and to 3.4.13 (by @cenit) +- [(#15860)](https://github.com/microsoft/vcpkg/pull/15860) [CGAL] switch dep to gmp instead of mpir (by @Neumann-A) +- [(#15862)](https://github.com/microsoft/vcpkg/pull/15862) [ace] Update to 7.0.0 (by @jwillemsen) +- [(#15867)](https://github.com/microsoft/vcpkg/pull/15867) [vcpkg] vcpkg_configure_meson: Support macOS cross-compile (by @past-due) +- [(#15868)](https://github.com/microsoft/vcpkg/pull/15868) [libidn2] Fix cross-compile (non-Windows) (by @past-due) +- [(#15871)](https://github.com/microsoft/vcpkg/pull/15871) [vcpkg] Improve error reporting for vcpkg_abi_info.txt copy failure. (by @BillyONeal) +- [(#15874)](https://github.com/microsoft/vcpkg/pull/15874) [vcpkg] set CMake policy CMP0087 for X_VCPKG_APPLOCAL_DEPS_INSTALL (by @Be-ing) +- [(#15875)](https://github.com/microsoft/vcpkg/pull/15875) [sentry-native] Update to 0.4.6 (by @AenBleidd) +- [(#15878)](https://github.com/microsoft/vcpkg/pull/15878) [libkeyfinder] add new port with libkeyfinder 2.2.4 (by @Be-ing) +- [(#15882)](https://github.com/microsoft/vcpkg/pull/15882) [ngspice] build codemodel extension libraries (by @marekr) +- [(#15885)](https://github.com/microsoft/vcpkg/pull/15885) [libconfig] Fix libconfig when installing master branch (by @vmiheer) +- [(#15886)](https://github.com/microsoft/vcpkg/pull/15886) [baseline][colmap] Fix find dependency freeimage (by @JackBoosY) +- [(#15887)](https://github.com/microsoft/vcpkg/pull/15887) [boost-concept-check] Fix warning C4834 when install pagmo2 (by @Cheney-W) +- [(#15892)](https://github.com/microsoft/vcpkg/pull/15892) [libvpx] Fix arm-uwp builds for v142 toolset (by @jwtowner) +- [(#15894)](https://github.com/microsoft/vcpkg/pull/15894) [taskflow] update to 3.0.0 (by @mfornace) +- [(#15898)](https://github.com/microsoft/vcpkg/pull/15898) [vcpkg] Teach vcpkg.targets to emit a .tlog, enabling up-to-date checks (by @ras0219) +- [(#15900)](https://github.com/microsoft/vcpkg/pull/15900) [vcpkg baseline][osgearth] Fix and add dependency tinyxml (by @JackBoosY) +- [(#15902)](https://github.com/microsoft/vcpkg/pull/15902) [openvdb] Fix vcpkg-cmake-wrapper (by @JackBoosY) +- [(#15906)](https://github.com/microsoft/vcpkg/pull/15906) Add shell.nix for building on NixOS (by @poelzi) +- [(#15913)](https://github.com/microsoft/vcpkg/pull/15913) [sciplot] Add new port (by @CaeruleusAqua) +- [(#15918)](https://github.com/microsoft/vcpkg/pull/15918) [libftdi1] update to 1.5 (#15917) (by @eloc3147) +- [(#15926)](https://github.com/microsoft/vcpkg/pull/15926) [vcpkg] Emit parse errors to match '::: error: ' for better IDE compatibility (by @ras0219) +- [(#15933)](https://github.com/microsoft/vcpkg/pull/15933) [vcpkg baseline] Fix baseline regression (by @JackBoosY) +- [(#15934)](https://github.com/microsoft/vcpkg/pull/15934) [physx] Use /Z7 instead of /Zi to integrate the debug info when building static (by @JackBoosY) +- [(#15935)](https://github.com/microsoft/vcpkg/pull/15935) [raylib] Fix usage (by @NancyLi1013) +- [(#15936)](https://github.com/microsoft/vcpkg/pull/15936) [libjpeg-turbo] update to 2.0.6 (by @JonLiu1993) +- [(#15937)](https://github.com/microsoft/vcpkg/pull/15937) [meson] fix single-config builds (by @cenit) +- [(#15941)](https://github.com/microsoft/vcpkg/pull/15941) [curl] Fix/android curl debug bin (by @venabled) +- [(#15942)](https://github.com/microsoft/vcpkg/pull/15942) [darknet] fix opencv features, add compatibility with VS16.9 (by @cenit) +- [(#15943)](https://github.com/microsoft/vcpkg/pull/15943) [fast-cpp-csv-parser ] Update to the latest commit: Fixes compiler warnings (by @remz1337) +- [(#15945)](https://github.com/microsoft/vcpkg/pull/15945) [openal-soft] Update to 1.21.1 (by @past-due) +- [(#15948)](https://github.com/microsoft/vcpkg/pull/15948) [ shaderwriter ]Update to version 1.0.0 (by @DragonJoker) +- [(#15950)](https://github.com/microsoft/vcpkg/pull/15950) [libgcrypt] Update libgcrypt (by @nightlark) +- [(#15953)](https://github.com/microsoft/vcpkg/pull/15953) [libsndfile] Update to 1.0.31 (by @evpobr) +- [(#15954)](https://github.com/microsoft/vcpkg/pull/15954) [libsamplerate] Update to 0.2.1 (by @evpobr) +- [(#15957)](https://github.com/microsoft/vcpkg/pull/15957) [gmp] correct supports field to run CI for other platforms (by @Neumann-A) +- [(#15960)](https://github.com/microsoft/vcpkg/pull/15960) [vcpkg] fix X_VCPKG_APPLOCAL_DEPS_INSTALL (by @dhrdlicka) +- [(#15965)](https://github.com/microsoft/vcpkg/pull/15965) [cairo] Make freetype and fontconfig optional. (by @Hoikas) +- [(#15967)](https://github.com/microsoft/vcpkg/pull/15967) [discreture] Add new port (by @remz1337) +- [(#15971)](https://github.com/microsoft/vcpkg/pull/15971) [matio] Update to v1.5.19 (by @traversaro) +- [(#15973)](https://github.com/microsoft/vcpkg/pull/15973) [vcpkg baseline][armadillo] Update to 10.2.0 and also update the repository (by @NancyLi1013) +- [(#15974)](https://github.com/microsoft/vcpkg/pull/15974) [magic-enum] Update to v0.7.2 (by @Neargye) +- [(#15975)](https://github.com/microsoft/vcpkg/pull/15975) [nameof] Update to 0.10.0 (by @Neargye) +- [(#15978)](https://github.com/microsoft/vcpkg/pull/15978) [proj4] Bump to proj 7.2.1 (by @rhuijben) +- [(#15985)](https://github.com/microsoft/vcpkg/pull/15985) [proj4] Copy over proj.pdb file on install (by @stefanuhrig) +- [(#15986)](https://github.com/microsoft/vcpkg/pull/15986) [chromaprint] add new port with version 1.5.0 (by @Be-ing) +- [(#15988)](https://github.com/microsoft/vcpkg/pull/15988) [libebur128] add new port with version 1.2.5 (by @Be-ing) +- [(#15989)](https://github.com/microsoft/vcpkg/pull/15989) [functions-framework-cpp] add new port with version 0.3.0 (by @coryan) +- [(#15990)](https://github.com/microsoft/vcpkg/pull/15990) [libdjinterop] add new port with version 0.14.6 (by @Be-ing) +- [(#15994)](https://github.com/microsoft/vcpkg/pull/15994) [date] Fix vcpkg_fixup_cmake_targets for mingw (by @longnguyen2004) +- [(#15995)](https://github.com/microsoft/vcpkg/pull/15995) [libpqxx] Fix build with Visual Studio 2017 (by @JackBoosY) +- [(#15997)](https://github.com/microsoft/vcpkg/pull/15997) [opencascade] Update to 7.5.0 (by @JonLiu1993) +- [(#16000)](https://github.com/microsoft/vcpkg/pull/16000) [ffmpeg] avfilter: fix dependencies and linux library ordering (by @mcmtroffaes) +- [(#16001)](https://github.com/microsoft/vcpkg/pull/16001) [google-cloud-cpp] update to the latest release (v1.24.0) (by @coryan) +- [(#16008)](https://github.com/microsoft/vcpkg/pull/16008) [ngspice] Update to rev 34 (by @marekr) +- [(#16009)](https://github.com/microsoft/vcpkg/pull/16009) [vcpkg] fix checking out git registry ports (by @strega-nil) +- [(#16010)](https://github.com/microsoft/vcpkg/pull/16010) [directxsdk] Update DirectX SDK port (by @walbourn) +- [(#16012)](https://github.com/microsoft/vcpkg/pull/16012) [vcpkg] Tool fixes needed for vcpkg-tool extraction (by @BillyONeal) +- [(#16013)](https://github.com/microsoft/vcpkg/pull/16013) [azure-core-cpp] Add new port (by @azure-sdk) +- [(#16014)](https://github.com/microsoft/vcpkg/pull/16014) [azure-identity-cpp] Publish version 1.0.0-beta.3 (by @azure-sdk) +- [(#16018)](https://github.com/microsoft/vcpkg/pull/16018) [log4cxx] Fix dependency and pkgconfig (by @NancyLi1013) +- [(#16020)](https://github.com/microsoft/vcpkg/pull/16020) [azure-storage-common-cpp] Publish version 12.0.0-beta.7 (by @azure-sdk) +- [(#16021)](https://github.com/microsoft/vcpkg/pull/16021) [sentry-native] Update to 0.4.7 (by @AenBleidd) +- [(#16033)](https://github.com/microsoft/vcpkg/pull/16033) [sdl2] Fix vulkan feature dependencies (by @past-due) +- [(#16035)](https://github.com/microsoft/vcpkg/pull/16035) [metrohash] support iOS triplets (by @luncliff) +- [(#16037)](https://github.com/microsoft/vcpkg/pull/16037) [glslang] support iOS triplets (by @luncliff) +- [(#16038)](https://github.com/microsoft/vcpkg/pull/16038) [spirv-cross,spirv-tools] support iOS triplets (by @luncliff) +- [(#16045)](https://github.com/microsoft/vcpkg/pull/16045) Nanodbc/fix/config cmake files path linux (by @samyy321) +- [(#16051)](https://github.com/microsoft/vcpkg/pull/16051) [aubio] allow to build without dependencies (by @autoantwort) +- [(#16053)](https://github.com/microsoft/vcpkg/pull/16053) [azure-storage-files-shares-cpp] Add new port (by @azure-sdk) +- [(#16055)](https://github.com/microsoft/vcpkg/pull/16055) [vcpkg] Add scripts tree extraction notes. (by @BillyONeal) +- [(#16057)](https://github.com/microsoft/vcpkg/pull/16057) [prometheus-cpp] Update to version 0.12.1 (by @gjasny) +- [(#16061)](https://github.com/microsoft/vcpkg/pull/16061) [scripts-audit] vcpkg.cmake (by @strega-nil) +- [(#16065)](https://github.com/microsoft/vcpkg/pull/16065) [cpprestsdk] Bump version to 2.10.18 (by @barcharcraz) +- [(#16068)](https://github.com/microsoft/vcpkg/pull/16068) Add disable-exceptions feature to portfile for tbb (by @aggieNick02) +- [(#16069)](https://github.com/microsoft/vcpkg/pull/16069) [docs/users/manifests.md] Prioritize examples. Fix example. Add MSBuild integration documentation. (by @ras0219-msft) +- [(#16071)](https://github.com/microsoft/vcpkg/pull/16071) [gtest] fix builds when using --head (by @sylveon) +- [(#16077)](https://github.com/microsoft/vcpkg/pull/16077) [V8, icu] Update v8 to version 9.0.257.17, icu to 69.1 (by @Kwizatz) +- [(#16082)](https://github.com/microsoft/vcpkg/pull/16082) [libarchive] Fix static linking dependencies (by @DDoSolitary) +- [(#16085)](https://github.com/microsoft/vcpkg/pull/16085) [netcdf-c] Fix usage (by @JackBoosY) +- [(#16087)](https://github.com/microsoft/vcpkg/pull/16087) [boost-python] Fix build issue with feature python2 (by @PhoebeHui) +- [(#16089)](https://github.com/microsoft/vcpkg/pull/16089) [spdlog] Support build shared library (by @JonLiu1993) +- [(#16095)](https://github.com/microsoft/vcpkg/pull/16095) [vcpkg] Fix unsupported modifiers for X_VCPKG_APPLOCAL_DEPS_INSTALL. (by @crud89) +- [(#16101)](https://github.com/microsoft/vcpkg/pull/16101) Update DXUT port and add Effects11 (FX) port (by @walbourn) +- [(#16106)](https://github.com/microsoft/vcpkg/pull/16106) [abseil] Remove link flag '-ignore:4221' (by @JackBoosY) +- [(#16107)](https://github.com/microsoft/vcpkg/pull/16107) [lua] support iOS triplets (by @luncliff) +- [(#16108)](https://github.com/microsoft/vcpkg/pull/16108) [minizip] support iOS/Android triplets (by @luncliff) +- [(#16109)](https://github.com/microsoft/vcpkg/pull/16109) [geos] Update to 3.9.0 (by @JackBoosY) +- [(#16120)](https://github.com/microsoft/vcpkg/pull/16120) [nng] Update to v1.4.0 (by @jharmer95) +- [(#16121)](https://github.com/microsoft/vcpkg/pull/16121) [doctest] Update to v2.4.5 (by @jharmer95) +- [(#16125)](https://github.com/microsoft/vcpkg/pull/16125) [sqlite3] Update to 3.34.1 (by @past-due) +- [(#16127)](https://github.com/microsoft/vcpkg/pull/16127) [vcpkg docs] consistency-ify docs/regenerate on non-windows (by @strega-nil) +- [(#16130)](https://github.com/microsoft/vcpkg/pull/16130) [(z_)vcpkg_prettify_command(_line)] Scripts Tree Audit (by @strega-nil) +- [(#16131)](https://github.com/microsoft/vcpkg/pull/16131) [ngspice] fix win32 codemodel glob (by @marekr) +- [(#16134)](https://github.com/microsoft/vcpkg/pull/16134) [gl2ps] update to 1.4.2 (by @JonLiu1993) +- [(#16137)](https://github.com/microsoft/vcpkg/pull/16137) [shaderc] Use build type to build targets (by @JackBoosY) +- [(#16138)](https://github.com/microsoft/vcpkg/pull/16138) [vcpkg baseline][log4cpp] Update version record (by @JackBoosY) +- [(#16140)](https://github.com/microsoft/vcpkg/pull/16140) [workflow] add port of sogou/workflow (by @dengjunplusplus) +- [(#16144)](https://github.com/microsoft/vcpkg/pull/16144) [fast-float] Add new port (by @georg-emg) +- [(#16148)](https://github.com/microsoft/vcpkg/pull/16148) [ashes] Update to 2021-09-02 (by @DragonJoker) +- [(#16149)](https://github.com/microsoft/vcpkg/pull/16149) [aws-sdk-cpp] Regenerate feature list (by @ras0219) +- [(#16151)](https://github.com/microsoft/vcpkg/pull/16151) [inja] Update to v3.2.0 (by @matusnovak) +- [(#16154)](https://github.com/microsoft/vcpkg/pull/16154) [wxWidgets] Fix issue with port usage (by @AenBleidd) +- [(#16155)](https://github.com/microsoft/vcpkg/pull/16155) [vcpkg.targets] Add an additional options parameter for MSBuild integration (by @ras0219) +- [(#16160)](https://github.com/microsoft/vcpkg/pull/16160) [azure-core-cpp] Azure Core Release Beta6 (by @azure-sdk) +- [(#16162)](https://github.com/microsoft/vcpkg/pull/16162) [google-cloud-cpp] populate license field (by @coryan) +- [(#16163)](https://github.com/microsoft/vcpkg/pull/16163) [functions-framework-cpp] populate license field (by @coryan) +- [(#16166)](https://github.com/microsoft/vcpkg/pull/16166) [glfw3/glew] Fix pkgconfig (by @JackBoosY) +- [(#16172)](https://github.com/microsoft/vcpkg/pull/16172) [bfgroup-lyra] Install CMake Targets (by @Hoikas) +- [(#16173)](https://github.com/microsoft/vcpkg/pull/16173) [vcpkg integrate install] Allow setting the vcpkg installed dir (by @strega-nil) +- [(#16177)](https://github.com/microsoft/vcpkg/pull/16177) [google-cloud-cpp] use 'version' for version numbers (by @coryan) +- [(#16178)](https://github.com/microsoft/vcpkg/pull/16178) [functions-framework-cpp] use 'version' for version numbers (by @coryan) +- [(#16180)](https://github.com/microsoft/vcpkg/pull/16180) [vcpkg_build_msbuild] Hotfix regression in #16173 (by @ras0219) +- [(#16183)](https://github.com/microsoft/vcpkg/pull/16183) update azure-storage-{common/blob/file/datalake}-cpp (by @azure-sdk) +- [(#16189)](https://github.com/microsoft/vcpkg/pull/16189) [scripts-audit] vcpkg_add_to_path (by @strega-nil) +- [(#16190)](https://github.com/microsoft/vcpkg/pull/16190) [scripts-audit] execute_process (by @strega-nil) +- [(#16191)](https://github.com/microsoft/vcpkg/pull/16191) [scripts-audit] vcpkg_buildpath_length_warning (by @strega-nil) +- [(#16193)](https://github.com/microsoft/vcpkg/pull/16193) [scripts-audit] z_vcpkg_function_arguments (by @strega-nil) +- [(#16194)](https://github.com/microsoft/vcpkg/pull/16194) [kuku] Update Kuku to version 2.1 (by @kiromaru) +- [(#16195)](https://github.com/microsoft/vcpkg/pull/16195) [z_vcpkg_prettify_command_line] write to output variable (by @strega-nil) +- [(#16197)](https://github.com/microsoft/vcpkg/pull/16197) Update portaudio port to latest on github (by @fluffy) +- [(#16198)](https://github.com/microsoft/vcpkg/pull/16198) [workflow] Disable parallel configure due to writes to source dir (by @ras0219) +- [(#16199)](https://github.com/microsoft/vcpkg/pull/16199) [vcpkg_install_msbuild] Hotfix regression in #16173 (by @ras0219) +- [(#16202)](https://github.com/microsoft/vcpkg/pull/16202) [quill] Uncomment QUILL_FMT_EXTERNAL macro (by @RT222) +- [(#16208)](https://github.com/microsoft/vcpkg/pull/16208) [rtaudio] Fix mingw, switch to rolling release (by @autoantwort) +- [(#16212)](https://github.com/microsoft/vcpkg/pull/16212) [vcpkg] Change scripts/tls12-download.exe mode from 100644 to 100755 (by @yuri-sevatz) +- [(#16223)](https://github.com/microsoft/vcpkg/pull/16223) [libebur128] update to 1.2.6; fixes dynamic linking on Windows (by @Be-ing) +- [(#16226)](https://github.com/microsoft/vcpkg/pull/16226) [leptonica] now all dependencies have their own find_dependency... (by @cenit) +- [(#16227)](https://github.com/microsoft/vcpkg/pull/16227) [jsoncons] Update to version 0.162.0 (by @danielaparker) +- [(#16230)](https://github.com/microsoft/vcpkg/pull/16230) [sobjectizer] update to v.5.7.2.2 (by @eao197) +- [(#16232)](https://github.com/microsoft/vcpkg/pull/16232) [llvm] update to 11.1.0, add features and fix issues (by @yurybura) +- [(#16235)](https://github.com/microsoft/vcpkg/pull/16235) [hazelcast-cpp-client] Add new port (by @ihsandemir) +- [(#16238)](https://github.com/microsoft/vcpkg/pull/16238) [ryu] added ryu_printf (by @georg-emg) +- [(#16239)](https://github.com/microsoft/vcpkg/pull/16239) upgrade imgui to v1.81 (by @BrianPeek) +- [(#16245)](https://github.com/microsoft/vcpkg/pull/16245) [magnum,-plugins] Fix deployment of plugin types and incorrect removal of plugin lib dir on unix (by @Squareys) +- [(#16246)](https://github.com/microsoft/vcpkg/pull/16246) [halide] Update Halide to 11.0.1 (by @alexreinking) +- [(#16255)](https://github.com/microsoft/vcpkg/pull/16255) [imgui] change to correct dx binding implementation path (by @aizuon) +- [(#16257)](https://github.com/microsoft/vcpkg/pull/16257) [scripts audit] ports.cmake (by @strega-nil) +- [(#16260)](https://github.com/microsoft/vcpkg/pull/16260) [vcpkg] vcpkg_configure_meson: cross-compile fixes for Android (by @jwtowner) +- [(#16261)](https://github.com/microsoft/vcpkg/pull/16261) [continuable] add a new port (by @luncliff) +- [(#16264)](https://github.com/microsoft/vcpkg/pull/16264) [hpx] Update hpx to V1.6.0 (by @hkaiser) +- [(#16268)](https://github.com/microsoft/vcpkg/pull/16268) [Imgui] Update docking-experimental and freetype features to 1.81 (by @RT222) +- [(#16270)](https://github.com/microsoft/vcpkg/pull/16270) [vcpkg baseline][gsoap] Update to 2.8.111 (by @NancyLi1013) +- [(#16277)](https://github.com/microsoft/vcpkg/pull/16277) Updated 'simdjson' to v0.8.2 (by @jharmer95) +- [(#16280)](https://github.com/microsoft/vcpkg/pull/16280) qt5-base: misleading list of system packages required (by @wrobelda) +- [(#16285)](https://github.com/microsoft/vcpkg/pull/16285) [libffi] Fix processors (by @autoantwort) +- [(#16289)](https://github.com/microsoft/vcpkg/pull/16289) [vcpkg baseline][ktx/otl] Update download hash (by @JackBoosY) +- [(#16293)](https://github.com/microsoft/vcpkg/pull/16293) [URGENT] [vcpkg] fix script broken audit (by @cenit) +- [(#16294)](https://github.com/microsoft/vcpkg/pull/16294) [llvm] Fix resource path when building tools (by @JackBoosY) +- [(#16296)](https://github.com/microsoft/vcpkg/pull/16296) [soci] Fix feature mysql (by @JackBoosY) +- [(#16302)](https://github.com/microsoft/vcpkg/pull/16302) [bext-di] Rename `boost-di` to `bext-di` (by @krzysztof-jusiak) +- [(#16307)](https://github.com/microsoft/vcpkg/pull/16307) [functions-framework-cpp] update to latest release (v0.4.0) (by @coryan) +- [(#16312)](https://github.com/microsoft/vcpkg/pull/16312) [vcpkg] Add tar support for gettext (by @Wedge009) +- [(#16315)](https://github.com/microsoft/vcpkg/pull/16315) [python3] upgrade to 3.9.2 (by @Hoikas) +- [(#16317)](https://github.com/microsoft/vcpkg/pull/16317) direcxtsdk port updated to use MS Downloads (by @walbourn) +- [(#16320)](https://github.com/microsoft/vcpkg/pull/16320) [librtmp] Switch to GitHub mirror (by @ras0219) +- [(#16322)](https://github.com/microsoft/vcpkg/pull/16322) [box2d] update to 2.4.1 (by @JonLiu1993) +- [(#16323)](https://github.com/microsoft/vcpkg/pull/16323) [docs] Add CMake Integration to manifests.md (by @ras0219) +- [(#16324)](https://github.com/microsoft/vcpkg/pull/16324) [vcpkg docs] Update the versioning.getting-started.md (by @PhoebeHui) +- [(#16325)](https://github.com/microsoft/vcpkg/pull/16325) [libpmemobj-cpp] update to ver. 1.12 (by @JonLiu1993) +- [(#16334)](https://github.com/microsoft/vcpkg/pull/16334) [jsoncons] Update to 0.162.1 (by @danielaparker) +- [(#16335)](https://github.com/microsoft/vcpkg/pull/16335) [jsonnet] Incorporate md5.cpp into jsonnet library (by @tetsuh) +- [(#16336)](https://github.com/microsoft/vcpkg/pull/16336) [docs/users/manifests.md] add a link to the specification (by @coryan) +- [(#16337)](https://github.com/microsoft/vcpkg/pull/16337) [docs/users/binarycaching.md] a little blurb about using GCS (by @coryan) +- [(#16339)](https://github.com/microsoft/vcpkg/pull/16339) [psimd] add a new port (by @luncliff) +- [(#16340)](https://github.com/microsoft/vcpkg/pull/16340) [fp16] create a new port (by @luncliff) +- [(#16341)](https://github.com/microsoft/vcpkg/pull/16341) [fxdiv] create a new port (by @luncliff) +- [(#16342)](https://github.com/microsoft/vcpkg/pull/16342) [pthreadpool] create a new port (by @luncliff) +- [(#16344)](https://github.com/microsoft/vcpkg/pull/16344) [nnpack] create a new port (by @luncliff) +- [(#16345)](https://github.com/microsoft/vcpkg/pull/16345) [mfl] Add new port (by @cpp-niel) +- [(#16346)](https://github.com/microsoft/vcpkg/pull/16346) [fbgemm] create a new port (by @luncliff) +- [(#16347)](https://github.com/microsoft/vcpkg/pull/16347) vcpkg_copy_tool_dependencies: show description how to install powershell (by @autoantwort) +- [(#16348)](https://github.com/microsoft/vcpkg/pull/16348) [pthreads] support ARM arch and UWP platform (by @luncliff) +- [(#16354)](https://github.com/microsoft/vcpkg/pull/16354) [amqpcpp] update to 4.3.11 (by @JonLiu1993) +- [(#16356)](https://github.com/microsoft/vcpkg/pull/16356) [vcpkg baseline][poppler] Add feature splash and add its dependency boost-container and boost-move (by @JackBoosY) +- [(#16359)](https://github.com/microsoft/vcpkg/pull/16359) [vcpkg baseline][stxxl] Skip baseline check for windows build (by @JackBoosY) +- [(#16364)](https://github.com/microsoft/vcpkg/pull/16364) [tensorflow] upgrade to 2.4.1 (by @jgehw) +- [(#16366)](https://github.com/microsoft/vcpkg/pull/16366) [brynet] upgrade to 1.10.0 (by @IronsDu) +- [(#16369)](https://github.com/microsoft/vcpkg/pull/16369) [soci] Re-fix feature mysql (by @JackBoosY) +- [(#16370)](https://github.com/microsoft/vcpkg/pull/16370) [sdl2] Update patch (by @NancyLi1013) +- [(#16371)](https://github.com/microsoft/vcpkg/pull/16371) [wxwidgets] Fix include path in UNIX (by @JackBoosY) +- [(#16373)](https://github.com/microsoft/vcpkg/pull/16373) [podofo] update to 0.9.7 (by @JonLiu1993) +- [(#16375)](https://github.com/microsoft/vcpkg/pull/16375) [boost] /safeseh (by @autoantwort) +- [(#16378)](https://github.com/microsoft/vcpkg/pull/16378) [boost-context] fix linux -> windows cross compile (by @autoantwort) +- [(#16379)](https://github.com/microsoft/vcpkg/pull/16379) [seal] Updated SEAL version to 3.6.2. (by @WeiDaiWD) +- [(#16380)](https://github.com/microsoft/vcpkg/pull/16380) [rsasynccpp] Add new port (Rstein.AsyncCpp) (by @renestein) +- [(#16381)](https://github.com/microsoft/vcpkg/pull/16381) [vcpkg] [docs] Add Boost versioning example (by @vicroms) +- [(#16383)](https://github.com/microsoft/vcpkg/pull/16383) [antlr4] update to 4.9.1 (by @NickStrupat) +- [(#16385)](https://github.com/microsoft/vcpkg/pull/16385) [vcpkg baseline] [itpp] Fix include directory (by @PhoebeHui) +- [(#16386)](https://github.com/microsoft/vcpkg/pull/16386) [qt5-base] Add feature vulkan (by @JackBoosY) +- [(#16390)](https://github.com/microsoft/vcpkg/pull/16390) Update taglib to 1.12.0 (by @pdehne) +- [(#16392)](https://github.com/microsoft/vcpkg/pull/16392) [woff2] fix for static linking and alternative compiler toolchains (by @jwtowner) +- [(#16397)](https://github.com/microsoft/vcpkg/pull/16397) [brotli] add iOS support (by @jwtowner) +- [(#16398)](https://github.com/microsoft/vcpkg/pull/16398) [libwebm] apply upstream changes to support Android NDK r15b and later (by @jwtowner) +- [(#16400)](https://github.com/microsoft/vcpkg/pull/16400) [vcpkg-tool] Publish release 2021-02-24-d67989bce1043b98092ac45996a8230a059a2d7e (by @ras0219-msft) +- [(#16401)](https://github.com/microsoft/vcpkg/pull/16401) [breakpad] add support for Android triplets (by @jwtowner) +- [(#16404)](https://github.com/microsoft/vcpkg/pull/16404) [concurrentqueue] Update to 1.0.3 (by @JonLiu1993) +- [(#16408)](https://github.com/microsoft/vcpkg/pull/16408) [libtcod] Add new port. (by @HexDecimal) +- [(#16411)](https://github.com/microsoft/vcpkg/pull/16411) [realsense2] Update version to v 2.42.0 (by @Cheney-W) +- [(#16413)](https://github.com/microsoft/vcpkg/pull/16413) [cudnn] auto-download only if cuda version matches (by @cenit) +- [(#16415)](https://github.com/microsoft/vcpkg/pull/16415) [comms, commsdsl] update ports (by @mathisloge) +- [(#16420)](https://github.com/microsoft/vcpkg/pull/16420) [python3] Add feature deprecated-win7-support. (by @Hoikas) +- [(#16421)](https://github.com/microsoft/vcpkg/pull/16421) [docs] Add references to awesome community websites. Fixes #16278 (by @ras0219) +- [(#16426)](https://github.com/microsoft/vcpkg/pull/16426) [libmysql] Re-fix dependency openssl (by @JackBoosY) +- [(#16428)](https://github.com/microsoft/vcpkg/pull/16428) Upgrade to Python 3.9.2 to avoid CVE-2021-3177 and CVE-2021-23336 (by @cclauss) +- [(#16429)](https://github.com/microsoft/vcpkg/pull/16429) [glm] Add namespace to export target (by @JackBoosY) +- [(#16434)](https://github.com/microsoft/vcpkg/pull/16434) [libpq] fix filenames (linux -> windows cross compile) (by @autoantwort) +- [(#16436)](https://github.com/microsoft/vcpkg/pull/16436) [iir1] Add new port (by @andywang0607) +- [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) +- [(#16446)](https://github.com/microsoft/vcpkg/pull/16446) [celero] Updated to v2.7.2 (by @DigitalInBlue) +- [(#16447)](https://github.com/microsoft/vcpkg/pull/16447) [functions-framework-cpp] update to latest release (v0.5.0) (by @coryan) +- [(#16449)](https://github.com/microsoft/vcpkg/pull/16449) [protobuf] Update to 3.15.8 (by @yonik) +- [(#16455)](https://github.com/microsoft/vcpkg/pull/16455) [qscintilla] Update to 2.12 (by @m-kuhn) +- [(#16458)](https://github.com/microsoft/vcpkg/pull/16458) [exprtk] Update ExprTk (by @ArashPartow) +- [(#16459)](https://github.com/microsoft/vcpkg/pull/16459) [protopuf] Update to 1.0.1 (by @PragmaTwice) +- [(#16460)](https://github.com/microsoft/vcpkg/pull/16460) [libhv] Add new port (by @ithewei) +- [(#16461)](https://github.com/microsoft/vcpkg/pull/16461) [liblsl] Update to 1.14.0 (by @chausner) +- [(#16468)](https://github.com/microsoft/vcpkg/pull/16468) [vcpkg-cmake] Fix typo in vcpkg_cmake_configure that prevented custom triplets from working (by @sylveon) +- [(#16470)](https://github.com/microsoft/vcpkg/pull/16470) [sobjectizer] update to v5.7.2.3 (by @eao197) +- [(#16471)](https://github.com/microsoft/vcpkg/pull/16471) [libnop] create a new port (by @luncliff) +- [(#16473)](https://github.com/microsoft/vcpkg/pull/16473) [vcpkg baseline][libnice] Temporarily Skip all triplets check (by @NancyLi1013) +- [(#16477)](https://github.com/microsoft/vcpkg/pull/16477) [google-cloud-cpp] update to latest release (v1.25.0) (by @coryan) +- [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- [(#16480)](https://github.com/microsoft/vcpkg/pull/16480) [vcpkg_*_cmake] remove deprecation message (by @strega-nil) +- [(#16482)](https://github.com/microsoft/vcpkg/pull/16482) [boost-context] fix build result on apple arm (by @autoantwort) +- [(#16488)](https://github.com/microsoft/vcpkg/pull/16488) [msix] Add DISABLE_PARALLEL_CONFIGURE (by @NancyLi1013) +- [(#16489)](https://github.com/microsoft/vcpkg/pull/16489) [docs] Update to Community Resources in doc (by @Balnian) +- [(#16491)](https://github.com/microsoft/vcpkg/pull/16491) [g3log] update to 1.3.4 (by @JonLiu1993) +- [(#16492)](https://github.com/microsoft/vcpkg/pull/16492) [Azure pipeline] Upload file list logs for unstable testing (by @PhoebeHui) +- [(#16493)](https://github.com/microsoft/vcpkg/pull/16493) [mongoose] update to 7.1 (by @JonLiu1993) +- [(#16496)](https://github.com/microsoft/vcpkg/pull/16496) [uWebSockets] update to 19.0.0 (by @JonLiu1993) +- [(#16501)](https://github.com/microsoft/vcpkg/pull/16501) Don't copy svm-toy if not on Windows (by @SoftwareApe) +- [(#16502)](https://github.com/microsoft/vcpkg/pull/16502) [docs] Improve inter-document linking; add 'latest' links (by @ras0219) +- [(#16508)](https://github.com/microsoft/vcpkg/pull/16508) [scintilla] update to 4.4.6 (by @JonLiu1993) +- [(#16510)](https://github.com/microsoft/vcpkg/pull/16510) [fplus] update to v0.2.13-p0 (by @JonLiu1993) +- [(#16511)](https://github.com/microsoft/vcpkg/pull/16511) [crow] update to 0.2 (by @JonLiu1993) +- [(#16512)](https://github.com/microsoft/vcpkg/pull/16512) [hiredis] Fix include path (by @NancyLi1013) +- [(#16513)](https://github.com/microsoft/vcpkg/pull/16513) [opencascade] fix #16252 (by @Dejauxvue) +- [(#16515)](https://github.com/microsoft/vcpkg/pull/16515) Remove a ')' character in the documentation (by @duanqn) +- [(#16522)](https://github.com/microsoft/vcpkg/pull/16522) [vcpkg docs] Fix typo in docs/index.md (by @sbc100) +- [(#16525)](https://github.com/microsoft/vcpkg/pull/16525) [openssl] update to 1.1.1j (by @metsma) +- [(#16526)](https://github.com/microsoft/vcpkg/pull/16526) [poco] Remove dependency port openssl for feature netssl on windows (by @JackBoosY) +- [(#16527)](https://github.com/microsoft/vcpkg/pull/16527) [argparse] Update to the latest commit (by @JonLiu1993) +- [(#16536)](https://github.com/microsoft/vcpkg/pull/16536) [ginkgo] Create new port (by @upsj) +- [(#16546)](https://github.com/microsoft/vcpkg/pull/16546) [wxwidgets] Fix cmake wrapper (by @JackBoosY) +- [(#16548)](https://github.com/microsoft/vcpkg/pull/16548) [Azure-Kinect-Sensor-SDK] update to 1.41 (by @JonLiu1993) +- [(#16549)](https://github.com/microsoft/vcpkg/pull/16549) [poco] Fix feature sqlite3 (by @NancyLi1013) +- [(#16550)](https://github.com/microsoft/vcpkg/pull/16550) [sentry-native] Update to 0.4.8 (by @AenBleidd) +- [(#16552)](https://github.com/microsoft/vcpkg/pull/16552) [vc] Update HEAD_REF and fix CMake configure options (by @bernhardmgruber) +- [(#16553)](https://github.com/microsoft/vcpkg/pull/16553) [metrohash] support more triplets by excluding 128 CRC source (by @luncliff) +- [(#16568)](https://github.com/microsoft/vcpkg/pull/16568) [trantor] Update to 1.3.0 (by @an-tao) +- [(#16572)](https://github.com/microsoft/vcpkg/pull/16572) [geos] upgrade to 3.9.1 (by @m-kuhn) +- [(#16575)](https://github.com/microsoft/vcpkg/pull/16575) [wil] Updating WIL version to match its nuget package version (by @anaaru) +- [(#16576)](https://github.com/microsoft/vcpkg/pull/16576) [krabsetw] Update krabsetw to 4.1.18 (by @jrave) +- [(#16590)](https://github.com/microsoft/vcpkg/pull/16590) [vcpkg] Initial support of FreeBSD x86 platform (by @arves100) +- [(#16591)](https://github.com/microsoft/vcpkg/pull/16591) [cpp-httplib] Upgrade to v0.8.4 (by @tosone) +- [(#16592)](https://github.com/microsoft/vcpkg/pull/16592) [CGAL] Restore boost dependencies (by @maxGimeno) +- [(#16593)](https://github.com/microsoft/vcpkg/pull/16593) [hazelcast-cpp-client] New version update to 4.0.1 (by @ihsandemir) +- [(#16596)](https://github.com/microsoft/vcpkg/pull/16596) [scripts] vcpkg_configure_make: do not set --build on macOS (by @autoantwort) +- [(#16603)](https://github.com/microsoft/vcpkg/pull/16603) Update Lua port to version 5.4.2 (by @frankhale) +- [(#16605)](https://github.com/microsoft/vcpkg/pull/16605) [vcpkg-cmake] Search for binaries after manifest-based installs (by @townsend2010) +- [(#16610)](https://github.com/microsoft/vcpkg/pull/16610) [tiff] support zstd compression in TIFF image files (take 2) (by @ghesketh) +- [(#16611)](https://github.com/microsoft/vcpkg/pull/16611) [docs] Fix the automatically generated document URL (by @JackBoosY) +- [(#16617)](https://github.com/microsoft/vcpkg/pull/16617) [libxslt] Update to 1.1.34 (by @pastle-ptc) +- [(#16621)](https://github.com/microsoft/vcpkg/pull/16621) [harfbuzz] work around upstream SameFileError (by @Krzmbrzl) +- [(#16625)](https://github.com/microsoft/vcpkg/pull/16625) [ocilib] fix wrong solution filename (by @meastp) +- [(#16627)](https://github.com/microsoft/vcpkg/pull/16627) [host dependencies] add support in the scripts (by @strega-nil) +- [(#16628)](https://github.com/microsoft/vcpkg/pull/16628) Port for PresentMon, windows-only ETW swap-chain presentation capture and analysis tool (by @aggieNick02) +- [(#16633)](https://github.com/microsoft/vcpkg/pull/16633) [vcpkg_execute_build_process] Add warning message when memory or hard disk space is insufficient (by @JackBoosY) +- [(#16643)](https://github.com/microsoft/vcpkg/pull/16643) [prometheus-cpp] Update to version 0.12.2 (by @gjasny) +- [(#16649)](https://github.com/microsoft/vcpkg/pull/16649) [taglib] Upgrade from 1.12-beta-2 to 1.12 (by @uklotzde) +- [(#16651)](https://github.com/microsoft/vcpkg/pull/16651) [drogon] Update to 1.4.1 (by @an-tao) +- [(#16657)](https://github.com/microsoft/vcpkg/pull/16657) [magnum/magnum-plugins] fix magnum-plugins building all magnum dependencies (by @fran6co) +- [(#16659)](https://github.com/microsoft/vcpkg/pull/16659) [qt5-base] make libpq an optional dependency (by @autoantwort) +- [(#16661)](https://github.com/microsoft/vcpkg/pull/16661) [openjpeg] 16645 Fix compile w/features jp3d,jpip,jpwl,mj2 triplet x64-windows VS 2019 ver 16.9.1 (by @StarGate-One) +- [(#16664)](https://github.com/microsoft/vcpkg/pull/16664) [abseil] Upgrade abseil to 20200923 patch 3, fix gcc11 build error (by @xieyubo) +- [(#16667)](https://github.com/microsoft/vcpkg/pull/16667) [indicators] update to 2.0 (by @JonLiu1993) +- [(#16668)](https://github.com/microsoft/vcpkg/pull/16668) Azure Core Release Beta 7 (by @azure-sdk) +- [(#16672)](https://github.com/microsoft/vcpkg/pull/16672) [uWebSockets] updated to 19.0.0 alpha 5 (by @Phantomouse) +- [(#16675)](https://github.com/microsoft/vcpkg/pull/16675) [websocketpp] Add features to build without Boost (by @joefocusrite) +- [(#16679)](https://github.com/microsoft/vcpkg/pull/16679) [sqlite3] Update to 3.35.0 (by @kevinlul) +- [(#16683)](https://github.com/microsoft/vcpkg/pull/16683) [tweeny] Update to v3.2.0 (by @bradJM) +- [(#16684)](https://github.com/microsoft/vcpkg/pull/16684) [openvr ] Update openvr to 1.16.8 (by @EniacMlezi) +- [(#16693)](https://github.com/microsoft/vcpkg/pull/16693) [libbacktrace] new port (by @autoantwort) +- [(#16696)](https://github.com/microsoft/vcpkg/pull/16696) New port for mailio. (by @karastojko) +- [(#16697)](https://github.com/microsoft/vcpkg/pull/16697) [uSockets] update to version 0.7.1 (by @Phantomouse) +- [(#16701)](https://github.com/microsoft/vcpkg/pull/16701) [robin-hood-hashing] update to 3.10.0 (by @Ryan-rsm-McKenzie) +- [(#16703)](https://github.com/microsoft/vcpkg/pull/16703) [args] update to latest version (by @Ryan-rsm-McKenzie) +- [(#16705)](https://github.com/microsoft/vcpkg/pull/16705) [sundials] Update to 5.7.0 and also update repository (by @NancyLi1013) +- [(#16708)](https://github.com/microsoft/vcpkg/pull/16708) [ace] Upgrade to 7.0.1 (by @jwillemsen) +- [(#16710)](https://github.com/microsoft/vcpkg/pull/16710) [ixwebsocket] Fix cmake-configure files install path (by @NancyLi1013) +- [(#16711)](https://github.com/microsoft/vcpkg/pull/16711) [asio] update to 1.18.1 (by @JonLiu1993) +- [(#16714)](https://github.com/microsoft/vcpkg/pull/16714) [openh264] Add openh264 port (by @RichLogan) +- [(#16716)](https://github.com/microsoft/vcpkg/pull/16716) Don't try to install dependencies not managed by vcpkg (by @omartijn) +- [(#16725)](https://github.com/microsoft/vcpkg/pull/16725) [openmama] Modify the output path of the common header file (by @Cheney-W) +- [(#16726)](https://github.com/microsoft/vcpkg/pull/16726) [libxml2] Disable http and ftp on UWP (by @JackBoosY) +- [(#16727)](https://github.com/microsoft/vcpkg/pull/16727) [imgui] Update to 1.82 (by @RT222) +- [(#16730)](https://github.com/microsoft/vcpkg/pull/16730) [libsodium] Rework CMake build to match autoconf (by @thomasgt) +- [(#16733)](https://github.com/microsoft/vcpkg/pull/16733) [angle] Include EGL/eglext_angle.h in ANGLE (by @hanseuljun) +- [(#16737)](https://github.com/microsoft/vcpkg/pull/16737) [sdl2-mixer] Fix features link error (by @NancyLi1013) +- [(#16740)](https://github.com/microsoft/vcpkg/pull/16740) [libpq] mingw support (by @longnguyen2004) +- [(#16742)](https://github.com/microsoft/vcpkg/pull/16742) [glad] Add features to support different configurations. (by @crud89) +- [(#16749)](https://github.com/microsoft/vcpkg/pull/16749) [ttauri] Add new port (by @takev) +- [(#16755)](https://github.com/microsoft/vcpkg/pull/16755) [detours] support debug builds (by @sylveon) +- [(#16758)](https://github.com/microsoft/vcpkg/pull/16758) [docs] Rename docs/index.md to docs/README.md (by @autoantwort) +- [(#16760)](https://github.com/microsoft/vcpkg/pull/16760) [vcpkg docs] Modify manifest-root-dir as manifest-root (by @NancyLi1013) +- [(#16761)](https://github.com/microsoft/vcpkg/pull/16761) [vcpkg] Add "arm64-windows-static-md" triplet (by @davidebeatrici) +- [(#16763)](https://github.com/microsoft/vcpkg/pull/16763) [collada-dom] Add REMOVE_RECURSE to solve DLLs error path (by @JonLiu1993) +- [(#16765)](https://github.com/microsoft/vcpkg/pull/16765) [WinReg] update to v4.0.0 (by @JonLiu1993) +- [(#16766)](https://github.com/microsoft/vcpkg/pull/16766) [fmt] Fix build error when building arm64-uwp (by @JackBoosY) +- [(#16767)](https://github.com/microsoft/vcpkg/pull/16767) [libwebsockets] Update to v4.1.6 (by @657870) +- [(#16768)](https://github.com/microsoft/vcpkg/pull/16768) Upgrade ffmpeg to 4.3.2 (by @omartijn) +- [(#16770)](https://github.com/microsoft/vcpkg/pull/16770) [qt5-webengine] Fix issues (by @Neumann-A) +- [(#16774)](https://github.com/microsoft/vcpkg/pull/16774) [ci,vcpkg-cmake-*] remove host-only nature of vcpkg-cmake-* ports (by @strega-nil) +- [(#16775)](https://github.com/microsoft/vcpkg/pull/16775) [vcpkg_build_make] Fix interaction with Windows Detours (by @ras0219-msft) +- [(#16776)](https://github.com/microsoft/vcpkg/pull/16776) [vcpkg baseline] Skip libgnutls:x64-osx in Ci testing (by @PhoebeHui) +- [(#16779)](https://github.com/microsoft/vcpkg/pull/16779) [vtk] Add support for unicode path for VTK reader/writer (by @robbie-li) +- [(#16787)](https://github.com/microsoft/vcpkg/pull/16787) [msbuild] fix integration caching (by @strega-nil) +- [(#16788)](https://github.com/microsoft/vcpkg/pull/16788) [happly] add new port (by @autoantwort) +- [(#16789)](https://github.com/microsoft/vcpkg/pull/16789) [mailio] does not support uwp (by @autoantwort) +- [(#16794)](https://github.com/microsoft/vcpkg/pull/16794) [Influxdb-cxx] add new port (by @autoantwort) +- [(#16795)](https://github.com/microsoft/vcpkg/pull/16795) [docs] link to up to date versioning specification (by @autoantwort) +- [(#16796)](https://github.com/microsoft/vcpkg/pull/16796) [docs] fix links for vcpkg-tool maintainer help (by @autoantwort) +- [(#16799)](https://github.com/microsoft/vcpkg/pull/16799) [jwt-cpp] update to v0.5.0 (by @prince-chrismc) +- [(#16802)](https://github.com/microsoft/vcpkg/pull/16802) [celero] Updated to Celero v2.8.0 (by @DigitalInBlue) +- [(#16804)](https://github.com/microsoft/vcpkg/pull/16804) [blend2d] Update to beta_2021-03-17 (by @ZeeWanderer) +- [(#16805)](https://github.com/microsoft/vcpkg/pull/16805) Updates links to documentation in repo's root README.md (by @voldyman) +- [(#16806)](https://github.com/microsoft/vcpkg/pull/16806) [sail] Update 0.9.0-pre11 -> 0.9.0-pre12 (by @happy-sea-fox) +- [(#16810)](https://github.com/microsoft/vcpkg/pull/16810) [libgwenhywfar] new port (by @wrobelda) +- [(#16816)](https://github.com/microsoft/vcpkg/pull/16816) [libmt32emu] new port (by @autoantwort) +- [(#16818)](https://github.com/microsoft/vcpkg/pull/16818) [implot] Update to 0.9 (by @RT222) +- [(#16819)](https://github.com/microsoft/vcpkg/pull/16819) [spdlog] Fix build for Android (by @ahmedyarub) +- [(#16820)](https://github.com/microsoft/vcpkg/pull/16820) [jsoncons] Update to v0.163.0 (by @danielaparker) +- [(#16822)](https://github.com/microsoft/vcpkg/pull/16822) [bext-ut] create a new port (by @luncliff) +- [(#16824)](https://github.com/microsoft/vcpkg/pull/16824) [termcolor] update to 2.0.0 (by @JonLiu1993) +- [(#16825)](https://github.com/microsoft/vcpkg/pull/16825) [cairo,cairomm] add fontconfig and quartz feature and update cairo version (by @abique) +- [(#16834)](https://github.com/microsoft/vcpkg/pull/16834) [sqlite3] Update to 3.35.2 (by @past-due) +- [(#16835)](https://github.com/microsoft/vcpkg/pull/16835) [libhv] Add DISABLE_PARALLEL (by @NancyLi1013) +- [(#16837)](https://github.com/microsoft/vcpkg/pull/16837) [vcpkg baseline][gsoap] Update to 2.8.112 (by @NancyLi1013) +- [(#16838)](https://github.com/microsoft/vcpkg/pull/16838) [mapbox-geometry,mapbox-polylabel,geojson-vt-cpp,geojson-cpp] new ports (by @mathisloge) +- [(#16839)](https://github.com/microsoft/vcpkg/pull/16839) [libusb] Fix the support for Visual Studio 2019 (by @NancyLi1013) +- [(#16842)](https://github.com/microsoft/vcpkg/pull/16842) [workflow] update version of workflow port (by @dengjunplusplus) +- [(#16843)](https://github.com/microsoft/vcpkg/pull/16843) [flatbuffers] support iOS triplets (by @luncliff) +- [(#16852)](https://github.com/microsoft/vcpkg/pull/16852) [maintainer-guide] Clarify best practices for default features (by @ras0219-msft) +- [(#16856)](https://github.com/microsoft/vcpkg/pull/16856) [ixwebsocket] update to 11.2.3 (by @bsergean) +- [(#16858)](https://github.com/microsoft/vcpkg/pull/16858) [ryu] ryuConfig.cmake now selects the correct libraries when cross compiling (by @georg-emg) +- [(#16859)](https://github.com/microsoft/vcpkg/pull/16859) boost-modular-build-helper] Add system library dl for boost-regex[icu] and boost-locale[icu] on linux (by @PhoebeHui) +- [(#16860)](https://github.com/microsoft/vcpkg/pull/16860) [lz4] update to 1.9.3 (by @Thieum) +- [(#16863)](https://github.com/microsoft/vcpkg/pull/16863) [mqtt-cpp] update to 9.0.0 (by @sandro97git) +- [(#16865)](https://github.com/microsoft/vcpkg/pull/16865) [zstd] update to 1.4.9 (by @Thieum) +- [(#16867)](https://github.com/microsoft/vcpkg/pull/16867) [docs-triplets] Suggest overlay triplets (by @ras0219-msft) +- [(#16870)](https://github.com/microsoft/vcpkg/pull/16870) [spdlog] Update to 1.8.5 (by @Ryan-rsm-McKenzie) +- [(#16871)](https://github.com/microsoft/vcpkg/pull/16871) [WinReg] Update to v4.1.0 (by @JonLiu1993) +- [(#16872)](https://github.com/microsoft/vcpkg/pull/16872) [g3log] Add supports (by @NancyLi1013) +- [(#16875)](https://github.com/microsoft/vcpkg/pull/16875) [fakeit] add new port (by @autoantwort) +- [(#16877)](https://github.com/microsoft/vcpkg/pull/16877) [llvm] add features enable-{eh,ffi,bindings,terminfo,threads} (by @abique) +- [(#16879)](https://github.com/microsoft/vcpkg/pull/16879) [rapidcsv] new port (by @autoantwort) +- [(#16881)](https://github.com/microsoft/vcpkg/pull/16881) [docs] Vulkan SDK usage for Android triplets (by @luncliff) +- [(#16882)](https://github.com/microsoft/vcpkg/pull/16882) [ffmpeg] Fix FindFFMPEG lib versions for building opencv[ffmpeg] (by @genevanmeter) +- [(#16883)](https://github.com/microsoft/vcpkg/pull/16883) [vamp-sdk] new package (by @abique) +- [(#16884)](https://github.com/microsoft/vcpkg/pull/16884) [libcbor] New port (by @xgcssch) +- [(#16885)](https://github.com/microsoft/vcpkg/pull/16885) [microsoft-signalr] Update port with new version and find_package support (by @BrennanConroy) +- [(#16890)](https://github.com/microsoft/vcpkg/pull/16890) [freealut] Add a port of freealut (by @QAston) +- [(#16891)](https://github.com/microsoft/vcpkg/pull/16891) [libsoundio] Add support for linux backends (by @joefocusrite) +- [(#16892)](https://github.com/microsoft/vcpkg/pull/16892) [glfw3] Update to version 3.3.3 (by @barcharcraz) +- [(#16897)](https://github.com/microsoft/vcpkg/pull/16897) [libxml2] add missing GNUInstallDirs to fix pc files (by @Neumann-A) +- [(#16900)](https://github.com/microsoft/vcpkg/pull/16900) [vcpkg/scripts] add variable VCPKG_CROSSCOMPILING (by @Neumann-A) +- [(#16901)](https://github.com/microsoft/vcpkg/pull/16901) [robin-hood-hashing] Update to 3.11.1 (by @RT222) +- [(#16904)](https://github.com/microsoft/vcpkg/pull/16904) [vcpkg baseline][osgearth/gdal] Re-fix dependency gdal (by @JackBoosY) +- [(#16905)](https://github.com/microsoft/vcpkg/pull/16905) [fontconfig] fixes for arm64-macos (by @abique) +- [(#16910)](https://github.com/microsoft/vcpkg/pull/16910) [mpg123] Upgrade to 1.26.3-1 (by @evpobr) +- [(#16911)](https://github.com/microsoft/vcpkg/pull/16911) [freeglut] Don't enforce x64 when the compiler is 64 bit (by @davidebeatrici) +- [(#16913)](https://github.com/microsoft/vcpkg/pull/16913) [nowide] Upgrade to 11.1.1 (by @tats-u) +- [(#16916)](https://github.com/microsoft/vcpkg/pull/16916) [dav1d] Update to 0.8.2 (by @EwoutH) +- [(#16927)](https://github.com/microsoft/vcpkg/pull/16927) [vcpkg] Convert env vars slash if host is Win32 (by @huangqinjin) +- [(#16928)](https://github.com/microsoft/vcpkg/pull/16928) [abseil] Upgrade to 20210324 (by @Chronial) +- [(#16930)](https://github.com/microsoft/vcpkg/pull/16930) [boost-context] support android (by @huangqinjin) +- [(#16931)](https://github.com/microsoft/vcpkg/pull/16931) [quill] Upgrade to 1.6.2 (by @odygrd) +- [(#16935)](https://github.com/microsoft/vcpkg/pull/16935) [vcpkg/scripts] add a way to define another tool destination (by @Neumann-A) +- [(#16936)](https://github.com/microsoft/vcpkg/pull/16936) [ghc-filesystem] create a new port (by @luncliff) +- [(#16937)](https://github.com/microsoft/vcpkg/pull/16937) [OpenSSL] Update to 1.1.1k (by @metsma) +- [(#16943)](https://github.com/microsoft/vcpkg/pull/16943) [lua]Update port to version 5.4.3 (by @frankhale) +- [(#16948)](https://github.com/microsoft/vcpkg/pull/16948) [cmake] update cmake test port (by @Neumann-A) +- [(#16952)](https://github.com/microsoft/vcpkg/pull/16952) [vcpkg_acquire_msys] Update package versions (by @ras0219-msft) +- [(#16954)](https://github.com/microsoft/vcpkg/pull/16954) [vcpkg baseline][qt5-base] Fix glib link issues on linux (by @Neumann-A) +- [(#16957)](https://github.com/microsoft/vcpkg/pull/16957) [libarchive] Remove lzo from the default feature list (by @PhoebeHui) +- [(#16959)](https://github.com/microsoft/vcpkg/pull/16959) [vcpkg/make/scripts]only append the lib directories if they exist. (by @Neumann-A) +- [(#16962)](https://github.com/microsoft/vcpkg/pull/16962) [opensubdiv] Remove debug/share folder (by @PhoebeHui) +- [(#16969)](https://github.com/microsoft/vcpkg/pull/16969) [open62541] add amalgamation feature (by @Neumann-A) +- [(#16975)](https://github.com/microsoft/vcpkg/pull/16975) [libodb-mysql] Fix usage (by @JackBoosY) +- [(#16984)](https://github.com/microsoft/vcpkg/pull/16984) [gsl-lite] Update to 0.38.0 (by @mbeutel) +- [(#16994)](https://github.com/microsoft/vcpkg/pull/16994) [boost-regex] fix build with icu on osx (by @autoantwort) +- [(#16997)](https://github.com/microsoft/vcpkg/pull/16997) [protobuf] Fix deprecation warning in vcpkg_check_feature() (by @NancyLi1013) +- [(#17003)](https://github.com/microsoft/vcpkg/pull/17003) [libwebsockets] Fix usage, export include path (by @JackBoosY) +- [(#17004)](https://github.com/microsoft/vcpkg/pull/17004) [libmariadb] update to the 3.1.12 (by @JonLiu1993) +- [(#17010)](https://github.com/microsoft/vcpkg/pull/17010) [gettext] Add feature tools (by @Neumann-A) +- [(#17011)](https://github.com/microsoft/vcpkg/pull/17011) [pthreads] Fix crt linkage (by @JackBoosY) +- [(#17012)](https://github.com/microsoft/vcpkg/pull/17012) [soil] Update repository (by @NancyLi1013) +- [(#17014)](https://github.com/microsoft/vcpkg/pull/17014) [vcpkg baseline][pangolin] Add options to dependencies to avoid finding them automatically (by @JackBoosY) +- [(#17015)](https://github.com/microsoft/vcpkg/pull/17015) [vtk] enables openvr module when openvr is listed (by @veggiesaurus) +- [(#17016)](https://github.com/microsoft/vcpkg/pull/17016) [magnum,-plugins] Fix deprecated use of vcpkg_check_features (by @Squareys) +- [(#17018)](https://github.com/microsoft/vcpkg/pull/17018) [vcpkg] Pass no parallel build command to execute_process when parallel build is disabled (by @xandox) +- [(#17020)](https://github.com/microsoft/vcpkg/pull/17020) [Libassuan] Add cflags to tool build command (by @xandox) +- [(#17021)](https://github.com/microsoft/vcpkg/pull/17021) Libgcrypt add cflags to tool build command (by @xandox) +- [(#17023)](https://github.com/microsoft/vcpkg/pull/17023) Libgpg-error add cflags to tools build commands (by @xandox) +- [(#17024)](https://github.com/microsoft/vcpkg/pull/17024) Libspatialite remove cflags from vcpkg_configure_make options (by @xandox) +- [(#17025)](https://github.com/microsoft/vcpkg/pull/17025) Spatialite-tools remove cflags from vcpkg_configure_make options (by @xandox) +- [(#17026)](https://github.com/microsoft/vcpkg/pull/17026) Openmpi keep -isystem flags in configure scripts (by @xandox) +- [(#17027)](https://github.com/microsoft/vcpkg/pull/17027) [google-cloud-cpp] update to the latest release (v1.26.0) (by @coryan) +- [(#17047)](https://github.com/microsoft/vcpkg/pull/17047) [entt] Update to 3.7.0 (by @skaarj1989) +- [(#17049)](https://github.com/microsoft/vcpkg/pull/17049) [vcpkg] improve pull request template (by @autoantwort) +- [(#17051)](https://github.com/microsoft/vcpkg/pull/17051) [x265] Allow release-only build. (by @matttyson) +- [(#17060)](https://github.com/microsoft/vcpkg/pull/17060) binarycaching.md: Move Configuration section to the top. Add table of??? (by @autoantwort) +- [(#17066)](https://github.com/microsoft/vcpkg/pull/17066) add link to common vcpkg definitions (by @autoantwort) +- [(#17067)](https://github.com/microsoft/vcpkg/pull/17067) [sqlite3] Update to 3.35.4 (by @past-due) +- [(#17068)](https://github.com/microsoft/vcpkg/pull/17068) fix VCPKG_CROSSCOMPILING (by @autoantwort) +- [(#17070)](https://github.com/microsoft/vcpkg/pull/17070) [libmt32emu] update to 2.5.0 (by @autoantwort) +- [(#17073)](https://github.com/microsoft/vcpkg/pull/17073) vcpkg_configure_make: Add support for linux -> windows cross compilation (by @autoantwort) +- [(#17074)](https://github.com/microsoft/vcpkg/pull/17074) [mpg123] Upgrade to 1.26.4 (by @evpobr) +- [(#17076)](https://github.com/microsoft/vcpkg/pull/17076) Update libjuice to 0.7.1 to update libdatachannel (by @Nemirtingas) +- [(#17077)](https://github.com/microsoft/vcpkg/pull/17077) [libdatachannel ] Update to 0.12.0 (by @Nemirtingas) +- [(#17082)](https://github.com/microsoft/vcpkg/pull/17082) [nuklear] Upgrade from 2020-09-14 to 2021-03-18 version and switch repo (by @SamuelMarks) +- [(#17083)](https://github.com/microsoft/vcpkg/pull/17083) [vcpkg baseline][gdal] Fix configure error on OSX (by @JackBoosY) +- [(#17085)](https://github.com/microsoft/vcpkg/pull/17085) [vcpkg/scripts/make] add compiler tools to PATH (by @huangqinjin) +- [(#17094)](https://github.com/microsoft/vcpkg/pull/17094) [fltk] Fix link to system libs (by @JackBoosY) +- [(#17095)](https://github.com/microsoft/vcpkg/pull/17095) [libui] Export system libs on OSX (by @JackBoosY) +- [(#17101)](https://github.com/microsoft/vcpkg/pull/17101) [minizip-ng] add new port (by @prateek9623) +- [(#17102)](https://github.com/microsoft/vcpkg/pull/17102) [scripts] Fix Perl download link (by @yurybura) +- [(#17106)](https://github.com/microsoft/vcpkg/pull/17106) [sdl2] Fix pthread detection on macOS (by @past-due) +- [(#17112)](https://github.com/microsoft/vcpkg/pull/17112) [fastcdr] Fix support Linux (by @NancyLi1013) +- [(#17113)](https://github.com/microsoft/vcpkg/pull/17113) [libmariadb] Fix build error with cmake 3.20.0 (by @NancyLi1013) +- [(#17117)](https://github.com/microsoft/vcpkg/pull/17117) [glib] fix build error for x64-linux-dynamic (by @kwiechen) +- [(#17120)](https://github.com/microsoft/vcpkg/pull/17120) format vcpkg.json testing files (by @autoantwort) +- [(#17123)](https://github.com/microsoft/vcpkg/pull/17123) [directxtex,directxmesh, directxtk, directxtk12, uvatlas] updated for April 2021 releases (by @walbourn) +- [(#17126)](https://github.com/microsoft/vcpkg/pull/17126) [jsoncons] Update to 0.163.1 (by @danielaparker) +- [(#17138)](https://github.com/microsoft/vcpkg/pull/17138) Add /etc/fstab in order to remove /cygdrive/ prefix (by @dg0yt) +- [(#17142)](https://github.com/microsoft/vcpkg/pull/17142) [azure-core-cpp, azure-identity-cpp] Update to latest version (by @azure-sdk) +- [(#17143)](https://github.com/microsoft/vcpkg/pull/17143) [azure-security-keyvault-*] Add new ports (by @azure-sdk) +- [(#17148)](https://github.com/microsoft/vcpkg/pull/17148) [hunspell] switch to make to enable build of hunspell tools (by @Neumann-A) +- [(#17152)](https://github.com/microsoft/vcpkg/pull/17152) [spdlog] Use external fmt header (by @NancyLi1013) +- [(#17158)](https://github.com/microsoft/vcpkg/pull/17158) [qt5] Move qt5 headers into qt5 subdir (by @Neumann-A) +- [(#17160)](https://github.com/microsoft/vcpkg/pull/17160) [vcpkg] add versions for testing files (by @autoantwort) +- [(#17166)](https://github.com/microsoft/vcpkg/pull/17166) [libtorrent] Update to latest 1.2.x commit (by @FranciscoPombal) +- [(#17168)](https://github.com/microsoft/vcpkg/pull/17168) [clamav] Fix the conflicts with libmspack (by @NancyLi1013) +- [(#17169)](https://github.com/microsoft/vcpkg/pull/17169) [behaviortree-cpp] update to 3.5.6 (by @JonLiu1993) +- [(#17170)](https://github.com/microsoft/vcpkg/pull/17170) [knet]Update to v1.0.2 (by @KibaAmor) +- [(#17172)](https://github.com/microsoft/vcpkg/pull/17172) [libwebp] Fix release-only builds (by @dg0yt) +- [(#17173)](https://github.com/microsoft/vcpkg/pull/17173) [trantor] Update to 1.4.0 (by @an-tao) +- [(#17174)](https://github.com/microsoft/vcpkg/pull/17174) [xaudio2redist] Add new port (by @walbourn) +- [(#17175)](https://github.com/microsoft/vcpkg/pull/17175) [dxsdk-d3dx] Add new port (by @walbourn) +- [(#17182)](https://github.com/microsoft/vcpkg/pull/17182) [cpp-httplib] Upgrade to v0.8.6 (by @PhilLab) +- [(#17190)](https://github.com/microsoft/vcpkg/pull/17190) [drogon] Update to 1.5.1 (by @an-tao) +- [(#17191)](https://github.com/microsoft/vcpkg/pull/17191) [mpg123] Upgrade to 1.26.5 (by @evpobr) +- [(#17196)](https://github.com/microsoft/vcpkg/pull/17196) [pthreadpool] update sources and support find_package (by @luncliff) +- [(#17197)](https://github.com/microsoft/vcpkg/pull/17197) sync GLIB_DLL_SUFFIX with pkgconfig (by @kwiechen) +- [(#17198)](https://github.com/microsoft/vcpkg/pull/17198) [docs] Typo fix for Korean doc. (by @vyujing) +- [(#17200)](https://github.com/microsoft/vcpkg/pull/17200) [simdjson] Update to 0.9.2 (by @myd7349) +- [(#17201)](https://github.com/microsoft/vcpkg/pull/17201) [yyjson] Add new port (by @myd7349) +- [(#17206)](https://github.com/microsoft/vcpkg/pull/17206) [libgeotiff] Fix mingw build (by @dg0yt) +- [(#17208)](https://github.com/microsoft/vcpkg/pull/17208) [hypodermic] Add new port (v2.5.2) (by @revilo) +- [(#17209)](https://github.com/microsoft/vcpkg/pull/17209) [vcpkg baseline] [nowide] update to 11.1.2 (by @autoantwort) +- [(#17214)](https://github.com/microsoft/vcpkg/pull/17214) [doc] Improve manifest documentation links (by @dg0yt) +- [(#17218)](https://github.com/microsoft/vcpkg/pull/17218) [vcpkg Readme] Added x64 triplet note for Windows Quick Start (by @MarkIngramUK) +- [(#17219)](https://github.com/microsoft/vcpkg/pull/17219) Add mingw documentation (by @dg0yt) +- [(#17220)](https://github.com/microsoft/vcpkg/pull/17220) [docs] add more blog posts (by @autoantwort) +- [(#17221)](https://github.com/microsoft/vcpkg/pull/17221) [avisynthplus] Update to 3.7.0 (by @wangqr) +- [(#17223)](https://github.com/microsoft/vcpkg/pull/17223) Update bitmagic version to 7.2.0 (by @klalumiere) +- [(#17226)](https://github.com/microsoft/vcpkg/pull/17226) [ncurses] Add new port (by @Hoikas) +- [(#17230)](https://github.com/microsoft/vcpkg/pull/17230) [c-ares] Fix definition on static build, add options to disable tools and tests (by @JackBoosY) +- [(#17231)](https://github.com/microsoft/vcpkg/pull/17231) [hidapi] Add support linux and osx (by @NancyLi1013) +- [(#17232)](https://github.com/microsoft/vcpkg/pull/17232) [libpq] Fix cmake wrapper on Windows, add usage (by @JackBoosY) +- [(#17235)](https://github.com/microsoft/vcpkg/pull/17235) [fluidsynth] update portfile features. (by @Neumann-A) +- [(#17236)](https://github.com/microsoft/vcpkg/pull/17236) [ffmpeg] no longer hardcode version strings in FindFFMPEG script (by @mcmtroffaes) +- [(#17238)](https://github.com/microsoft/vcpkg/pull/17238) [minizip-ng] Modify the output include path of the header file (by @Cheney-W) +- [(#17239)](https://github.com/microsoft/vcpkg/pull/17239) [stlab] update to 1.6.2 (by @dittons) +- [(#17242)](https://github.com/microsoft/vcpkg/pull/17242) [scnlib] Update the port of scnlib to 0.4 (by @QAston) +- [(#17249)](https://github.com/microsoft/vcpkg/pull/17249) [elfio] Update elfio from 3.8 to 3.9 (by @schultetwin1) +- [(#17250)](https://github.com/microsoft/vcpkg/pull/17250) [vcpkg baseline][pangolin] Set CMAKE_DISABLE_FIND_PACKAGE_XX to ON (by @PhoebeHui) +- [(#17253)](https://github.com/microsoft/vcpkg/pull/17253) [libwebsockets] Update dependency (by @NancyLi1013) +- [(#17256)](https://github.com/microsoft/vcpkg/pull/17256) [Xalan-C] update to 1.12 (by @JonLiu1993) +- [(#17257)](https://github.com/microsoft/vcpkg/pull/17257) [vcpkg docs] Add the procedure for updating vcpkg to faq (by @PhoebeHui) +- [(#17258)](https://github.com/microsoft/vcpkg/pull/17258) [vcpkg] Fix the wrong slash (by @PhoebeHui) +- [(#17264)](https://github.com/microsoft/vcpkg/pull/17264) [Gmp] add cflags to build commands for compiletime tools (by @xandox) +- [(#17271)](https://github.com/microsoft/vcpkg/pull/17271) [catch2] Fix share/catch2 directory name conflict (by @wildmichael) +- [(#17277)](https://github.com/microsoft/vcpkg/pull/17277) [vcpkg baseline][popsift] Fix vcpkg_find_cuda.cmake path (by @JackBoosY) +- [(#17279)](https://github.com/microsoft/vcpkg/pull/17279) [fmt] Update usage (by @NancyLi1013) +- [(#17280)](https://github.com/microsoft/vcpkg/pull/17280) [fontconfig] Don't require uuid port for mingw (by @dg0yt) +- [(#17282)](https://github.com/microsoft/vcpkg/pull/17282) [libzip] fix dependency in libzip-config.cmake.in (by @NancyLi1013) +- [(#17287)](https://github.com/microsoft/vcpkg/pull/17287) [libvpx] Fix libvpx compilation (install process) (by @talregev) +- [(#17290)](https://github.com/microsoft/vcpkg/pull/17290) [lodepng-c] Disable parallel configure (by @JackBoosY) +- [(#17294)](https://github.com/microsoft/vcpkg/pull/17294) [libyuv] update to latest commit (by @JonLiu1993) +- [(#17297)](https://github.com/microsoft/vcpkg/pull/17297) [armadillo] update to <10.4.0> (by @JonLiu1993) +- [(#17298)](https://github.com/microsoft/vcpkg/pull/17298) [ffmpeg] add -fPIC (by @cenit) +- [(#17300)](https://github.com/microsoft/vcpkg/pull/17300) [CGAL] Fix the configuration file (by @maxGimeno) +- [(#17306)](https://github.com/microsoft/vcpkg/pull/17306) [ryu] fixed syntax error in ryuConfig.cmake (by @georg-emg) +- [(#17311)](https://github.com/microsoft/vcpkg/pull/17311) [igraph] create new port (by @szhorvat) +- [(#17318)](https://github.com/microsoft/vcpkg/pull/17318) [pthreads] Make port empty on mingw (by @dg0yt) +- [(#17321)](https://github.com/microsoft/vcpkg/pull/17321) [libosip2] Update to 5.2.0 and add windows support (by @NancyLi1013) +- [(#17331)](https://github.com/microsoft/vcpkg/pull/17331) Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (by @BillyONeal) +- [(#17341)](https://github.com/microsoft/vcpkg/pull/17341) [vcpkg baseline][marble] Disable find I18n (by @JackBoosY) +- [(#17346)](https://github.com/microsoft/vcpkg/pull/17346) [cudnn] add other locations to find lib already installed (by @cenit) +- [(#17347)](https://github.com/microsoft/vcpkg/pull/17347) [shaderwriter] Update to version 1.1.0 (by @DragonJoker) +- [(#17354)](https://github.com/microsoft/vcpkg/pull/17354) [opencv4] Fix OPTIONS BUILD_opencv_gapi (by @NancyLi1013) +- [(#17355)](https://github.com/microsoft/vcpkg/pull/17355) [cub] update to 1.12.0 (by @JonLiu1993) +- [(#17356)](https://github.com/microsoft/vcpkg/pull/17356) [corrade] Fix VS2019 build error (by @NancyLi1013) +- [(#17360)](https://github.com/microsoft/vcpkg/pull/17360) [tinyexr] update version and add targets (by @fran6co) +- [(#17362)](https://github.com/microsoft/vcpkg/pull/17362) [Outcome] update to v2.2.0 release. (by @ned14) +- [(#17363)](https://github.com/microsoft/vcpkg/pull/17363) Add arm64-osx-dynamic triplet (by @nickgravelyn) +- [(#17364)](https://github.com/microsoft/vcpkg/pull/17364) Add VCPKG_OSX_ARCHITECTURES for x64-osx-dynamic triplet (by @nickgravelyn) +- [(#17367)](https://github.com/microsoft/vcpkg/pull/17367) [spirv-cross] small cleanup (by @fran6co) +- [(#17370)](https://github.com/microsoft/vcpkg/pull/17370) [PoissonRecon] new port (by @fran6co) +- [(#17371)](https://github.com/microsoft/vcpkg/pull/17371) [hdf5] threadsafe support (by @Thieum) +- [(#17373)](https://github.com/microsoft/vcpkg/pull/17373) [openssl/unix] Run `make` with 'VCPKG_CONCURRENCY' parallelism (by @mschofie) +- [(#17376)](https://github.com/microsoft/vcpkg/pull/17376) [ci] Update macOS to 11 (by @strega-nil) +- [(#17378)](https://github.com/microsoft/vcpkg/pull/17378) [flashlight-cuda] update port to v0.3 (by @jacobkahn) +- [(#17389)](https://github.com/microsoft/vcpkg/pull/17389) [libxml2] Pass version to rc via configured file (by @dg0yt) +- [(#17399)](https://github.com/microsoft/vcpkg/pull/17399) [directx-headers] port updated (by @walbourn) +- [(#17401)](https://github.com/microsoft/vcpkg/pull/17401) [portaudio] update to 19.7 (by @Be-ing) +- [(#17404)](https://github.com/microsoft/vcpkg/pull/17404) [forge] Fix usage (by @JackBoosY) +- [(#17407)](https://github.com/microsoft/vcpkg/pull/17407) [taskflow] update to 3.1.0 (by @JonLiu1993) +- [(#17410)](https://github.com/microsoft/vcpkg/pull/17410) [parmetis] Fix build on x64-linux. (by @grospelliergilles) +- [(#17413)](https://github.com/microsoft/vcpkg/pull/17413) [sentry-native] Update to 0.4.9 (by @AenBleidd) +- [(#17415)](https://github.com/microsoft/vcpkg/pull/17415) [tinygltf] fix json path (by @fran6co) +- [(#17419)](https://github.com/microsoft/vcpkg/pull/17419) [Libidn2] disable documentation (by @xandox) +- [(#17420)](https://github.com/microsoft/vcpkg/pull/17420) [Libtasn1] disable documentation (by @xandox) +- [(#17421)](https://github.com/microsoft/vcpkg/pull/17421) [Nettle] add cflags to build tools (by @xandox) +- [(#17422)](https://github.com/microsoft/vcpkg/pull/17422) [grpc][upb] Update to newer versions (by @ras0219) +- [(#17432)](https://github.com/microsoft/vcpkg/pull/17432) [flashlight-cpu] Update port to v0.3 (by @jacobkahn) +- [(#17437)](https://github.com/microsoft/vcpkg/pull/17437) [pcl] Fix qhul cannot be found (by @NancyLi1013) +- [(#17439)](https://github.com/microsoft/vcpkg/pull/17439) control-files.md: fix dead link and add command how to convert files (by @autoantwort) +- [(#17444)](https://github.com/microsoft/vcpkg/pull/17444) [gsl-lite] Update to 0.38.1 (by @mbeutel) +- [(#17445)](https://github.com/microsoft/vcpkg/pull/17445) [gamedev-framework] Update to 0.20.0 (by @ahugeat) +- [(#17447)](https://github.com/microsoft/vcpkg/pull/17447) [azure-sdk-for-cpp] Upgrade vcpkg manifest files (by @antkmsft) +- [(#17451)](https://github.com/microsoft/vcpkg/pull/17451) [frozen] Update to latest commit (by @Ryan-rsm-McKenzie) +- [(#17453)](https://github.com/microsoft/vcpkg/pull/17453) [physx] Update to 4.1.2 (by @Hoikas) +- [(#17459)](https://github.com/microsoft/vcpkg/pull/17459) [marl] update to latest version (by @JonLiu1993) +- [(#17461)](https://github.com/microsoft/vcpkg/pull/17461) [matplotplusplus] Install extra 3rd libraries (by @JackBoosY) +- [(#17466)](https://github.com/microsoft/vcpkg/pull/17466) [jsoncons] Update to version 0.163.3 (by @danielaparker) +- [(#17467)](https://github.com/microsoft/vcpkg/pull/17467) [ffmpeg] avdevice xcb linking fix on linux (by @mcmtroffaes) +- [(#17471)](https://github.com/microsoft/vcpkg/pull/17471) [ecos] Update ecos library version to 2.0.8 (by @csorvagep) +- [(#17484)](https://github.com/microsoft/vcpkg/pull/17484) [doc] Fix broken link (by @dg0yt) +- [(#17488)](https://github.com/microsoft/vcpkg/pull/17488) [pkgconf] Add new port (by @Neumann-A) +- [(#17491)](https://github.com/microsoft/vcpkg/pull/17491) [vcpkg baseline] Disable forest in ci baseline (by @PhoebeHui) +- [(#17492)](https://github.com/microsoft/vcpkg/pull/17492) [vcpkg baseline][marble] Disable dependency KF5 (by @JackBoosY) +- [(#17495)](https://github.com/microsoft/vcpkg/pull/17495) [boolinq] update to 3.0.1 (2020-07-29) (by @JonLiu1993) +- [(#17496)](https://github.com/microsoft/vcpkg/pull/17496) [grpc] update to 1.37.0 (by @JonLiu1993) +- [(#17501)](https://github.com/microsoft/vcpkg/pull/17501) [sqlcipher] update to 4.4.3 (#17500) (by @shiena) +- [(#17502)](https://github.com/microsoft/vcpkg/pull/17502) [doc] Fix example code. (by @w-gomes) +- [(#17507)](https://github.com/microsoft/vcpkg/pull/17507) [gamenetworkingsockets] Update to the latest commit to include headers (by @JonLiu1993) +- [(#17509)](https://github.com/microsoft/vcpkg/pull/17509) [botan] add arm (by @jgilje) +- [(#17511)](https://github.com/microsoft/vcpkg/pull/17511) [spdlog] Fix mingW build (by @JackBoosY) +- [(#17523)](https://github.com/microsoft/vcpkg/pull/17523) [gettext] disable dirent detection on windows (by @Neumann-A) +- [(#17525)](https://github.com/microsoft/vcpkg/pull/17525) [libqcow] Fix build issues by updating to 20210419 (by @AlexAltea) +- [(#17528)](https://github.com/microsoft/vcpkg/pull/17528) [vcpkg baseline][gdk-pixbuf] Fix build error on windows (by @PhoebeHui) +- [(#17531)](https://github.com/microsoft/vcpkg/pull/17531) [ffmpeg] add openh264 support (by @mcmtroffaes) +- [(#17549)](https://github.com/microsoft/vcpkg/pull/17549) [doc] Update manifest to reference versioning spec (by @mathisloge) +- [(#17550)](https://github.com/microsoft/vcpkg/pull/17550) [doc] Add 2019.06 blog post (by @dg0yt) +- [(#17552)](https://github.com/microsoft/vcpkg/pull/17552) [matplotplusplus] Fix find and use dependencies (by @JackBoosY) +- [(#17554)](https://github.com/microsoft/vcpkg/pull/17554) [zeromq] Update to 4.3.4 (by @Carbenium) +- [(#17559)](https://github.com/microsoft/vcpkg/pull/17559) [new/updated port] frugally-deep and updated fplus (by @mathisloge) +- [(#17566)](https://github.com/microsoft/vcpkg/pull/17566) [docs] Fix broken links (by @PhoebeHui) +- [(#17579)](https://github.com/microsoft/vcpkg/pull/17579) [python3] Disable registry access to determine WinSDK (by @ras0219-msft) +- [(#17581)](https://github.com/microsoft/vcpkg/pull/17581) [comms,commsdsl] update ports (by @mathisloge) + +
+ +
+The following 47 ports have been added: + +|port|version| +|---|---| +|[kuku](https://github.com/microsoft/vcpkg/pull/14898)[#16194](https://github.com/microsoft/vcpkg/pull/16194)|2 +|[gpgme](https://github.com/microsoft/vcpkg/pull/13950)|1.14.0 +|[boost-leaf](https://github.com/microsoft/vcpkg/pull/15090)[#15616](https://github.com/microsoft/vcpkg/pull/15616)|1.75.0 +|[libgcrypt](https://github.com/microsoft/vcpkg/pull/13950)[#15950](https://github.com/microsoft/vcpkg/pull/15950)[#17021](https://github.com/microsoft/vcpkg/pull/17021)|1.8.7 +|[status-code](https://github.com/microsoft/vcpkg/pull/15603)|1.0.0-ab3cd821 +|[librttopo](https://github.com/microsoft/vcpkg/pull/15037)|1.1.0-2 +|[azure-identity-cpp](https://github.com/microsoft/vcpkg/pull/16014)[#16668](https://github.com/microsoft/vcpkg/pull/16668)[#17142](https://github.com/microsoft/vcpkg/pull/17142)[#17447](https://github.com/microsoft/vcpkg/pull/17447)|1.0.0-beta.3 +|[libassuan](https://github.com/microsoft/vcpkg/pull/13950)[#17020](https://github.com/microsoft/vcpkg/pull/17020)|2.5.3 +|[llfio](https://github.com/microsoft/vcpkg/pull/15603)[#17362](https://github.com/microsoft/vcpkg/pull/17362)|2.0-20210420 +|[graphene](https://github.com/microsoft/vcpkg/pull/13100)[#15754](https://github.com/microsoft/vcpkg/pull/15754)|1.10.2 +|[ampl-asl](https://github.com/microsoft/vcpkg/pull/14518)|2020-11-11 +|[sdformat10](https://github.com/microsoft/vcpkg/pull/14324)|10.0.0 +|[popsift](https://github.com/microsoft/vcpkg/pull/10979)[#17277](https://github.com/microsoft/vcpkg/pull/17277)|0.9 +|[fastcgi](https://github.com/microsoft/vcpkg/pull/7824)|2020-09-11 +|[boost-stl-interfaces](https://github.com/microsoft/vcpkg/pull/14089)[#14969](https://github.com/microsoft/vcpkg/pull/14969)[#15090](https://github.com/microsoft/vcpkg/pull/15090)[#15616](https://github.com/microsoft/vcpkg/pull/15616)|1.74.0 +|[dataframe](https://github.com/microsoft/vcpkg/pull/14351)|1.12.0 +|[discreture](https://github.com/microsoft/vcpkg/pull/15967)|2020-01-29 +|[clrng](https://github.com/microsoft/vcpkg/pull/14876)|2020-12-01 +|[libuvc](https://github.com/microsoft/vcpkg/pull/14749)|2020-11-24 +|[ignition-fuel-tools4](https://github.com/microsoft/vcpkg/pull/15581)|4.3.0 +|[boost-pfr](https://github.com/microsoft/vcpkg/pull/15090)[#15616](https://github.com/microsoft/vcpkg/pull/15616)|1.75.0 +|[clamav](https://github.com/microsoft/vcpkg/pull/14658)[#17168](https://github.com/microsoft/vcpkg/pull/17168)|0.103.0 +|[azure-storage-files-datalake-cpp](https://github.com/microsoft/vcpkg/pull/16020)[#16183](https://github.com/microsoft/vcpkg/pull/16183)[#16668](https://github.com/microsoft/vcpkg/pull/16668)[#17142](https://github.com/microsoft/vcpkg/pull/17142)[#17447](https://github.com/microsoft/vcpkg/pull/17447)|12.0.0-beta.10 +|[azure-storage-blobs-cpp](https://github.com/microsoft/vcpkg/pull/16020)[#16183](https://github.com/microsoft/vcpkg/pull/16183)[#16668](https://github.com/microsoft/vcpkg/pull/16668)[#17142](https://github.com/microsoft/vcpkg/pull/17142)[#17447](https://github.com/microsoft/vcpkg/pull/17447)|12.0.0-beta.10 +|[tensorflow-common](https://github.com/microsoft/vcpkg/pull/14392)[#15354](https://github.com/microsoft/vcpkg/pull/15354)[#16364](https://github.com/microsoft/vcpkg/pull/16364)[#17331](https://github.com/microsoft/vcpkg/pull/17331)|2.3.1 +|[libsass](https://github.com/microsoft/vcpkg/pull/15752)|3.6.4 +|[ignition-common3](https://github.com/microsoft/vcpkg/pull/11273)|3.9.0 +|[ned14-internal-quickcpplib](https://github.com/microsoft/vcpkg/pull/15603)[#17362](https://github.com/microsoft/vcpkg/pull/17362)|0.0.0-24d92c71 +|[directxmath](https://github.com/microsoft/vcpkg/pull/15210)[#15383](https://github.com/microsoft/vcpkg/pull/15383)[#15554](https://github.com/microsoft/vcpkg/pull/15554)|3.1.6 +|[ignition-transport9](https://github.com/microsoft/vcpkg/pull/14324)|9.0.0 +|[mpc](https://github.com/microsoft/vcpkg/pull/13081)|1.2.0 +|[azure-storage-common-cpp](https://github.com/microsoft/vcpkg/pull/16020)[#16183](https://github.com/microsoft/vcpkg/pull/16183)[#16668](https://github.com/microsoft/vcpkg/pull/16668)[#17142](https://github.com/microsoft/vcpkg/pull/17142)[#17447](https://github.com/microsoft/vcpkg/pull/17447)|12.0.0-beta.10 +|[ignition-msgs6](https://github.com/microsoft/vcpkg/pull/14324)[#14730](https://github.com/microsoft/vcpkg/pull/14730)|6.0.0 +|[tensorflow](https://github.com/microsoft/vcpkg/pull/14392)[#15354](https://github.com/microsoft/vcpkg/pull/15354)[#16364](https://github.com/microsoft/vcpkg/pull/16364)|2.3.1 +|[mesa](https://github.com/microsoft/vcpkg/pull/14640)[#15729](https://github.com/microsoft/vcpkg/pull/15729)|20.2.2 +|[azure-core-cpp](https://github.com/microsoft/vcpkg/pull/16013)[#16160](https://github.com/microsoft/vcpkg/pull/16160)[#16668](https://github.com/microsoft/vcpkg/pull/16668)[#17142](https://github.com/microsoft/vcpkg/pull/17142)[#17447](https://github.com/microsoft/vcpkg/pull/17447)|1.0.0-beta.5 +|[sassc](https://github.com/microsoft/vcpkg/pull/15752)|3.6.1 +|[fixed-string](https://github.com/microsoft/vcpkg/pull/14770)|0.1.0 +|[libgpg-error](https://github.com/microsoft/vcpkg/pull/13950)[#17023](https://github.com/microsoft/vcpkg/pull/17023)|1.39 +|[elfutils](https://github.com/microsoft/vcpkg/pull/14771)|0.182 +|[azure-storage-files-shares-cpp](https://github.com/microsoft/vcpkg/pull/16053)[#16183](https://github.com/microsoft/vcpkg/pull/16183)[#16668](https://github.com/microsoft/vcpkg/pull/16668)[#17142](https://github.com/microsoft/vcpkg/pull/17142)[#17447](https://github.com/microsoft/vcpkg/pull/17447)|12.0.0-beta.10 +|[libilbc](https://github.com/microsoft/vcpkg/pull/15331)|3.0.3 +|[blas](https://github.com/microsoft/vcpkg/pull/13448)|1 +|[boost-json](https://github.com/microsoft/vcpkg/pull/15090)[#15616](https://github.com/microsoft/vcpkg/pull/15616)|1.75.0 +|[camport3](https://github.com/microsoft/vcpkg/pull/13759)|1.5.3 +|[arcus](https://github.com/microsoft/vcpkg/pull/15305)|4.8.0 +|[directx-headers](https://github.com/microsoft/vcpkg/pull/15222)[#15554](https://github.com/microsoft/vcpkg/pull/15554)[#17399](https://github.com/microsoft/vcpkg/pull/17399)|1 + +
+ +
+The following 804 ports have been updated: + +- boost-config `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libopusenc `0.2.1#0` -> `0.2.1#0` + - [(#15671)](https://github.com/microsoft/vcpkg/pull/15671) [libopusenc] fix macOS and Linux build (by @Be-ing) +- aws-sdk-cpp `1.8.126#0` -> `1.8.126#5` + - [(#13998)](https://github.com/microsoft/vcpkg/pull/13998) [llvm] update to 11.0.0 (by @yurybura) + - [(#14479)](https://github.com/microsoft/vcpkg/pull/14479) [aws-sdk-cpp] Update to 1.8.83 (by @PhoebeHui) + - [(#14546)](https://github.com/microsoft/vcpkg/pull/14546) [aws-sdk-cpp] Make aws-sdk-cpp rpath relocatable (by @klalumiere) + - [(#14868)](https://github.com/microsoft/vcpkg/pull/14868) [aws-sdk-cpp] Restore AWSSDKConfig.cmake and add usage (by @JackBoosY) + - [(#14936)](https://github.com/microsoft/vcpkg/pull/14936) [aws-sdk-cpp] Add find_dependency to AWSSDKConfig.cmake and fix usage (by @JackBoosY) + - [(#15725)](https://github.com/microsoft/vcpkg/pull/15725) [aws-cpp-sdk] [zlib] [openssl] [curl] Fix zlib, OpenSSL, curl and AWS SDK for Android (by @ahmedyarub) + - [(#15760)](https://github.com/microsoft/vcpkg/pull/15760) Update aws cpp sdk (by @ahmedyarub) + - [(#15804)](https://github.com/microsoft/vcpkg/pull/15804) [aws-sdk-cpp] Fix PRIVATE => PRVATE typo (by @BillyONeal) + - [(#16149)](https://github.com/microsoft/vcpkg/pull/16149) [aws-sdk-cpp] Regenerate feature list (by @ras0219) +- eigen3 `3.3.7#7` -> `3.3.7#8` + - [(#13739)](https://github.com/microsoft/vcpkg/pull/13739) [eigen3] Fix include path (by @LilyWangL) + - [(#15022)](https://github.com/microsoft/vcpkg/pull/15022) [eigen3] update to 3.3.9 (by @FlyingdutchmanC) +- openvdb `7.1.0#1` -> `7.1.0#2` + - [(#14651)](https://github.com/microsoft/vcpkg/pull/14651) [openvdb] Fix dependency issue and usage issue (by @PhoebeHui) + - [(#15902)](https://github.com/microsoft/vcpkg/pull/15902) [openvdb] Fix vcpkg-cmake-wrapper (by @JackBoosY) +- minizip-ng `#0` -> `#0` + - [(#17101)](https://github.com/microsoft/vcpkg/pull/17101) [minizip-ng] add new port (by @prateek9623) + - [(#17238)](https://github.com/microsoft/vcpkg/pull/17238) [minizip-ng] Modify the output include path of the header file (by @Cheney-W) +- boost-predef `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- kenlm `20200924#0` -> `20200924#0` + - [(#14382)](https://github.com/microsoft/vcpkg/pull/14382) [kenlm, pdal] Fix const overload on Visual Studio 2019 version 16.8 (by @LilyWangL) +- harfbuzz `2.7.4#1` -> `2.7.4#1` + - [(#12860)](https://github.com/microsoft/vcpkg/pull/12860) [harfbuzz] Use meson and update to 2.7.0 (by @vejmartin) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14530)](https://github.com/microsoft/vcpkg/pull/14530) [harfbuzz] fix icu linkage (by @Neumann-A) + - [(#16621)](https://github.com/microsoft/vcpkg/pull/16621) [harfbuzz] work around upstream SameFileError (by @Krzmbrzl) +- boost-uninstall `1.73.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- drogon `1.1.0#0` -> `1.3.0#0` + - [(#15850)](https://github.com/microsoft/vcpkg/pull/15850) [drogon] Upgrade to v1.3.0 (by @kotori2) + - [(#16651)](https://github.com/microsoft/vcpkg/pull/16651) [drogon] Update to 1.4.1 (by @an-tao) + - [(#17190)](https://github.com/microsoft/vcpkg/pull/17190) [drogon] Update to 1.5.1 (by @an-tao) +- directxmesh `aug2020#1` -> `apr2021#0` + - [(#14539)](https://github.com/microsoft/vcpkg/pull/14539) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version (by @RT222) + - [(#15210)](https://github.com/microsoft/vcpkg/pull/15210) Updated directxtk et al for cmake package support (by @walbourn) + - [(#15554)](https://github.com/microsoft/vcpkg/pull/15554) directxmesh, directxtex, and uvatlas now support linux (by @walbourn) + - [(#15639)](https://github.com/microsoft/vcpkg/pull/15639) directxtex, directxmesh, directxtk, uvatlas ports updated to fix cach??? (by @walbourn) + - [(#17123)](https://github.com/microsoft/vcpkg/pull/17123) [directxtex,directxmesh, directxtk, directxtk12, uvatlas] updated for April 2021 releases (by @walbourn) +- boost-functional `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- gppanel `2020-05-20#0` -> `2020-05-20#0` + - [(#13361)](https://github.com/microsoft/vcpkg/pull/13361) [wxwidgets] Fix #4756 (by @ras0219) + - [(#14794)](https://github.com/microsoft/vcpkg/pull/14794) [ebml/gppanel/matroska/polyhook2/unrar] Fix typos in CONTROL files (by @NancyLi1013) +- openimageio `2.1.16.0#4` -> `2.2.10.0#0` + - [(#15509)](https://github.com/microsoft/vcpkg/pull/15509) [openimageio] Bump to 2.2.10.0. (by @Hoikas) +- quill `1.6.1#1` -> `1.6.1#1` + - [(#14448)](https://github.com/microsoft/vcpkg/pull/14448) [quill] Update to 1.5.2 (by @odygrd) + - [(#14916)](https://github.com/microsoft/vcpkg/pull/14916) [quill] Update 1.6.0 (by @odygrd) + - [(#15467)](https://github.com/microsoft/vcpkg/pull/15467) [quill] Update to v1.6.1 (by @RT222) + - [(#16202)](https://github.com/microsoft/vcpkg/pull/16202) [quill] Uncomment QUILL_FMT_EXTERNAL macro (by @RT222) + - [(#16931)](https://github.com/microsoft/vcpkg/pull/16931) [quill] Upgrade to 1.6.2 (by @odygrd) +- cppcms `1.2.1-1#0` -> `1.2.1#2` + - [(#15473)](https://github.com/microsoft/vcpkg/pull/15473) [vcpkg baseline][cppcms] Fix issue with detecting Python 2. (by @Hoikas) +- flann `2019-04-07-1#0` -> `2019-04-07#1` + - [(#14716)](https://github.com/microsoft/vcpkg/pull/14716) [cmake] update to 3.19.2 (by @JackBoosY) +- libxmlpp `2.40.1#6` -> `2.40.1#8` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14988)](https://github.com/microsoft/vcpkg/pull/14988) [GLIBMM] Installing .pc file (by @faserg1) + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- mfl `#0` -> `#0` + - [(#16345)](https://github.com/microsoft/vcpkg/pull/16345) [mfl] Add new port (by @cpp-niel) +- highfive `2.2.2#0` -> `2.2.2#1` + - [(#14716)](https://github.com/microsoft/vcpkg/pull/14716) [cmake] update to 3.19.2 (by @JackBoosY) +- lodepng `2020-03-15#0` -> `2020-03-15#0` + - [(#16408)](https://github.com/microsoft/vcpkg/pull/16408) [libtcod] Add new port. (by @HexDecimal) +- boost-modular-build-helper `1.75.0#1` -> `1.75.0#2` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14517)](https://github.com/microsoft/vcpkg/pull/14517) [boost] Install usage file (by @PhoebeHui) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15137)](https://github.com/microsoft/vcpkg/pull/15137) [boost-modular-build-helper] Specify msvc version in user-config.jam (by @ras0219-msft) + - [(#15254)](https://github.com/microsoft/vcpkg/pull/15254) [boost-modular-builder] let fallback to default tool path (by @xandox) + - [(#15274)](https://github.com/microsoft/vcpkg/pull/15274) [boost-modular-build-helper] Allow setting B2_OPTIONS_[DBG|REL] in BOOST_CMAKE_FRAGMENT (fixes #15273) (by @klalumiere) + - [(#15572)](https://github.com/microsoft/vcpkg/pull/15572) [vcpkg,boost-modular-build-helper] initial ppc64le community support (by @lebdron) + - [(#15606)](https://github.com/microsoft/vcpkg/pull/15606) [boost-locale] android build (by @xandox) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16087)](https://github.com/microsoft/vcpkg/pull/16087) [boost-python] Fix build issue with feature python2 (by @PhoebeHui) + - [(#16375)](https://github.com/microsoft/vcpkg/pull/16375) [boost] /safeseh (by @autoantwort) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) + - [(#16859)](https://github.com/microsoft/vcpkg/pull/16859) boost-modular-build-helper] Add system library dl for boost-regex[icu] and boost-locale[icu] on linux (by @PhoebeHui) + - [(#16930)](https://github.com/microsoft/vcpkg/pull/16930) [boost-context] support android (by @huangqinjin) +- boost-local-function `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-type-erasure `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- bext-ut `#0` -> `#0` + - [(#16822)](https://github.com/microsoft/vcpkg/pull/16822) [bext-ut] create a new port (by @luncliff) +- gamenetworkingsockets `2020-09-02#0` -> `2020-09-02#0` + - [(#14937)](https://github.com/microsoft/vcpkg/pull/14937) [gamenetworkingsockets] Add new port (by @Balnian) + - [(#17507)](https://github.com/microsoft/vcpkg/pull/17507) [gamenetworkingsockets] Update to the latest commit to include headers (by @JonLiu1993) +- sqlite-orm `1.5#2` -> `1.6#0` + - [(#15517)](https://github.com/microsoft/vcpkg/pull/15517) [sqlite-orm] Update to 1.6 (by @NancyLi1013) +- indicators `1.7#0` -> `2020-10-30#0` + - [(#14223)](https://github.com/microsoft/vcpkg/pull/14223) [indicators] Update to Master (by @Link1J) + - [(#16667)](https://github.com/microsoft/vcpkg/pull/16667) [indicators] update to 2.0 (by @JonLiu1993) +- boost-coroutine `1.75.0#2` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- bitserializer `0.10#0` -> `0.10#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) +- superlu `2#0` -> `2#0` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) +- ceres `1.14.0#10` -> `2.0.0#0` + - [(#12785)](https://github.com/microsoft/vcpkg/pull/12785) [OpenCV] fix compatibility with VTK9 (by @cenit) + - [(#14719)](https://github.com/microsoft/vcpkg/pull/14719) [ceres] upgrade to 2.0.0 (by @fran6co) + - [(#14986)](https://github.com/microsoft/vcpkg/pull/14986) 2020-12-07 Build Fixes (by @BillyONeal) + - [(#15362)](https://github.com/microsoft/vcpkg/pull/15362) [ceres] Fix static library path on Linux (by @JackBoosY) + - [(#15802)](https://github.com/microsoft/vcpkg/pull/15802) [ceres] Mark all dependencies REQUIRED (by @ras0219) +- zeromq `2019-09-20#1` -> `2019-09-20#2` + - [(#14642)](https://github.com/microsoft/vcpkg/pull/14642) [zeromq] Add feature draft (by @JonLiu1993) + - [(#17554)](https://github.com/microsoft/vcpkg/pull/17554) [zeromq] Update to 4.3.4 (by @Carbenium) +- msdfgen `1.8#0` -> `1.8#0` + - [(#15427)](https://github.com/microsoft/vcpkg/pull/15427) [msdfgen] New port (by @Haeri) +- libgwenhywfar `#0` -> `#0` + - [(#16810)](https://github.com/microsoft/vcpkg/pull/16810) [libgwenhywfar] new port (by @wrobelda) +- boost-property-tree `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- sdl2pp `0.16.0-2#0` -> `0.16.1#0` + - [(#13300)](https://github.com/microsoft/vcpkg/pull/13300) [sdl2pp] Update to 0.16.1 and fix find_package error (by @LilyWangL) +- console-bridge `1.0.1#0` -> `1.0.1#1` + - [(#14324)](https://github.com/microsoft/vcpkg/pull/14324) [ignition] Updates on various pkgs ???? (by @ahoarau) +- boost-variant2 `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libnop `#0` -> `#0` + - [(#16471)](https://github.com/microsoft/vcpkg/pull/16471) [libnop] create a new port (by @luncliff) +- aws-lambda-cpp `0.2.6#0` -> `0.2.6#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) +- boost-concept-check `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#15887)](https://github.com/microsoft/vcpkg/pull/15887) [boost-concept-check] Fix warning C4834 when install pagmo2 (by @Cheney-W) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- crow `0.1-1#0` -> `0.1-1#0` + - [(#16511)](https://github.com/microsoft/vcpkg/pull/16511) [crow] update to 0.2 (by @JonLiu1993) +- arrayfire `3.7.3#0` -> `3.7.3#0` + - [(#14240)](https://github.com/microsoft/vcpkg/pull/14240) [arrayfire] New Port (by @jacobkahn) + - [(#14911)](https://github.com/microsoft/vcpkg/pull/14911) [arrayfire] Update port to fix cuSparse issue with CUDA 10.1 (by @jacobkahn) + - [(#15027)](https://github.com/microsoft/vcpkg/pull/15027) [arrayfire] Remove forge and graphics deps from port (by @jacobkahn) +- libsamplerate `0.1.9.0#0` -> `0.1.9.0#0` + - [(#14348)](https://github.com/microsoft/vcpkg/pull/14348) [libsamplerate, sdl2-gfx] Fix build error with Visual Studio 2019 version 16.8 (by @LilyWangL) + - [(#15797)](https://github.com/microsoft/vcpkg/pull/15797) [libsamplerate] Upgrade to 0.2.0 (by @evpobr) + - [(#15954)](https://github.com/microsoft/vcpkg/pull/15954) [libsamplerate] Update to 0.2.1 (by @evpobr) +- rocksdb `6.13.3#0` -> `6.14.6#0` + - [(#14976)](https://github.com/microsoft/vcpkg/pull/14976) [osgearth/rocksdb] Update to latest release (by @NancyLi1013) +- psimd `2021-02-21#0` -> `2021-02-21#0` + - [(#16339)](https://github.com/microsoft/vcpkg/pull/16339) [psimd] add a new port (by @luncliff) +- brotli `1.0.9#0` -> `1.0.9#1` + - [(#16397)](https://github.com/microsoft/vcpkg/pull/16397) [brotli] add iOS support (by @jwtowner) +- abseil `2020-09-23#0` -> `2020-09-23#0` + - [(#14109)](https://github.com/microsoft/vcpkg/pull/14109) [abseil] Revert changes about arm build (by @JackBoosY) + - [(#14647)](https://github.com/microsoft/vcpkg/pull/14647) [abseil] Re-fix cxx 17 standard, add macro ABSL_USE_CXX17 (by @JackBoosY) + - [(#16106)](https://github.com/microsoft/vcpkg/pull/16106) [abseil] Remove link flag '-ignore:4221' (by @JackBoosY) + - [(#16664)](https://github.com/microsoft/vcpkg/pull/16664) [abseil] Upgrade abseil to 20200923 patch 3, fix gcc11 build error (by @xieyubo) + - [(#16928)](https://github.com/microsoft/vcpkg/pull/16928) [abseil] Upgrade to 20210324 (by @Chronial) +- angelscript `2.34.0#0` -> `2.34.0#0` + - [(#14245)](https://github.com/microsoft/vcpkg/pull/14245) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 1 (by @JackBoosY) + - [(#15852)](https://github.com/microsoft/vcpkg/pull/15852) [angelscript] Update to 2.35.0 (by @crackedmind) +- magic-get `2019-09-02-1#0` -> `2019-09-02#0` + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- mqtt-cpp `7.0.1-2#0` -> `9.0.0#0` + - [(#16863)](https://github.com/microsoft/vcpkg/pull/16863) [mqtt-cpp] update to 9.0.0 (by @sandro97git) +- lz4 `1.9.2-2#0` -> `1.9.3#0` + - [(#16860)](https://github.com/microsoft/vcpkg/pull/16860) [lz4] update to 1.9.3 (by @Thieum) +- lua `5.4.1#0` -> `5.4.2#0` + - [(#16107)](https://github.com/microsoft/vcpkg/pull/16107) [lua] support iOS triplets (by @luncliff) + - [(#16603)](https://github.com/microsoft/vcpkg/pull/16603) Update Lua port to version 5.4.2 (by @frankhale) + - [(#16943)](https://github.com/microsoft/vcpkg/pull/16943) [lua]Update port to version 5.4.3 (by @frankhale) +- fluidsynth `2.1.4#0` -> `2.1.4#0` + - [(#17235)](https://github.com/microsoft/vcpkg/pull/17235) [fluidsynth] update portfile features. (by @Neumann-A) +- boost-dll `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- assimp `5.0.1#3` -> `5.0.1#4` + - [(#14554)](https://github.com/microsoft/vcpkg/pull/14554) [assimp] Fix cmake config name and add cmake version (by @PhoebeHui) +- libpqxx `7.3.1#0` -> `7.3.1#1` + - [(#14921)](https://github.com/microsoft/vcpkg/pull/14921) [libpqxx] update to 7.2.1 (by @JonLiu1993) + - [(#15259)](https://github.com/microsoft/vcpkg/pull/15259) [libpqxx] update to 7.3.0 (by @JonLiu1993) + - [(#15851)](https://github.com/microsoft/vcpkg/pull/15851) [libpqxx] Upgrade to v7.3.1 (by @tomlankhorst) + - [(#15995)](https://github.com/microsoft/vcpkg/pull/15995) [libpqxx] Fix build with Visual Studio 2017 (by @JackBoosY) +- boost-static-string `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- itk `5.1.0#0` -> `5.1.0#0` + - [(#14510)](https://github.com/microsoft/vcpkg/pull/14510) [python3] Upgrade to 3.9.0 (by @Hoikas) + - [(#15221)](https://github.com/microsoft/vcpkg/pull/15221) [python3] Add vcpkg-cmake-wrapper. (by @Hoikas) +- kf5i18n `5.64.0#1` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- qt5-xmlpatterns `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- cairo `1.16.0#7` -> `1.16.0#8` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#15965)](https://github.com/microsoft/vcpkg/pull/15965) [cairo] Make freetype and fontconfig optional. (by @Hoikas) + - [(#16825)](https://github.com/microsoft/vcpkg/pull/16825) [cairo,cairomm] add fontconfig and quartz feature and update cairo version (by @abique) +- boost-type-index `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- qt5-purchasing `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- asio `1.18.0#0` -> `1.18.0#0` + - [(#16711)](https://github.com/microsoft/vcpkg/pull/16711) [asio] update to 1.18.1 (by @JonLiu1993) +- gl2ps `1.4.0-3#0` -> `1.4.2#0` + - [(#16134)](https://github.com/microsoft/vcpkg/pull/16134) [gl2ps] update to 1.4.2 (by @JonLiu1993) +- matio `1.5.17#0` -> `1.5.19#0` + - [(#15971)](https://github.com/microsoft/vcpkg/pull/15971) [matio] Update to v1.5.19 (by @traversaro) +- wxwidgets `3.1.4#3` -> `3.1.4#0` + - [(#13361)](https://github.com/microsoft/vcpkg/pull/13361) [wxwidgets] Fix #4756 (by @ras0219) + - [(#16154)](https://github.com/microsoft/vcpkg/pull/16154) [wxWidgets] Fix issue with port usage (by @AenBleidd) + - [(#16371)](https://github.com/microsoft/vcpkg/pull/16371) [wxwidgets] Fix include path in UNIX (by @JackBoosY) + - [(#16546)](https://github.com/microsoft/vcpkg/pull/16546) [wxwidgets] Fix cmake wrapper (by @JackBoosY) +- qt5-scxml `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- itpp `4.3.1-5#0` -> `4.3.1-5#0` + - [(#16385)](https://github.com/microsoft/vcpkg/pull/16385) [vcpkg baseline] [itpp] Fix include directory (by @PhoebeHui) +- clapack `3.2.1#15` -> `3.2.1#16` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- opengl `0.0-7#0` -> `0#8` + - [(#14724)](https://github.com/microsoft/vcpkg/pull/14724) [opengl] port path fix when crosscompiling (by @Nemirtingas) +- cimg `2.6.2#0` -> `2.9.4#0` + - [(#14923)](https://github.com/microsoft/vcpkg/pull/14923) [cimg] update to 2.9.4 (by @JonLiu1993) +- qt5-graphicaleffects `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- effects11 `11.26#0` -> `11.26#0` + - [(#16101)](https://github.com/microsoft/vcpkg/pull/16101) Update DXUT port and add Effects11 (FX) port (by @walbourn) +- wavpack `5.3.0#0` -> `5.3.0#1` + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) +- trantor `1.1.0#0` -> `1.1.1#0` + - [(#15460)](https://github.com/microsoft/vcpkg/pull/15460) update trantor to 1.1.1 (by @kkzi) + - [(#15841)](https://github.com/microsoft/vcpkg/pull/15841) [trantor] Update to 1.2.0 (by @an-tao) + - [(#16568)](https://github.com/microsoft/vcpkg/pull/16568) [trantor] Update to 1.3.0 (by @an-tao) + - [(#17173)](https://github.com/microsoft/vcpkg/pull/17173) [trantor] Update to 1.4.0 (by @an-tao) +- nowide `11.0.0#0` -> `11.1.1#0` + - [(#16913)](https://github.com/microsoft/vcpkg/pull/16913) [nowide] Upgrade to 11.1.1 (by @tats-u) + - [(#17209)](https://github.com/microsoft/vcpkg/pull/17209) [vcpkg baseline] [nowide] update to 11.1.2 (by @autoantwort) +- freealut `1.1.0#0` -> `1.1.0#0` + - [(#16890)](https://github.com/microsoft/vcpkg/pull/16890) [freealut] Add a port of freealut (by @QAston) +- libsvm `323-1#0` -> `323#0` + - [(#16501)](https://github.com/microsoft/vcpkg/pull/16501) Don't copy svm-toy if not on Windows (by @SoftwareApe) +- glibmm `2.52.1#12` -> `2.52.1#14` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14988)](https://github.com/microsoft/vcpkg/pull/14988) [GLIBMM] Installing .pc file (by @faserg1) + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- openmvg `1.6#0` -> `1.6#1` + - [(#15859)](https://github.com/microsoft/vcpkg/pull/15859) [OpenCV] bump to 4.5.1 and to 3.4.13 (by @cenit) +- boost-preprocessor `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-odeint `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- gsoap `2.8.105#0` -> `2.8.111#0` + - [(#16270)](https://github.com/microsoft/vcpkg/pull/16270) [vcpkg baseline][gsoap] Update to 2.8.111 (by @NancyLi1013) + - [(#16837)](https://github.com/microsoft/vcpkg/pull/16837) [vcpkg baseline][gsoap] Update to 2.8.112 (by @NancyLi1013) +- openssl-windows `1.1.1h#0` -> `1.1.1h#1` + - [(#14308)](https://github.com/microsoft/vcpkg/pull/14308) [OpenSSL] refactor openssl ports. (by @Neumann-A) + - [(#14457)](https://github.com/microsoft/vcpkg/pull/14457) [openssl] Add build depends to deprecated openssl ports (by @Neumann-A) +- networkdirect-sdk `2.0.1#0` -> `2.0.1#1` + - [(#14688)](https://github.com/microsoft/vcpkg/pull/14688) [networkdirect-sdk] Rework portfile.cmake to allow windows x64 and x86, add fail for other triplet combinations, remove all triplets for CI fail list (by @StarGate-One) +- boost-regex `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) + - [(#16994)](https://github.com/microsoft/vcpkg/pull/16994) [boost-regex] fix build with icu on osx (by @autoantwort) +- libmicrohttpd `0.9.63#4` -> `0.9.63#5` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- nanobench `4.0.0#0` -> `4.3.0#0` + - [(#14975)](https://github.com/microsoft/vcpkg/pull/14975) [nanobench] update to 4.3.0 (by @JonLiu1993) +- nuspell `3.1.1#0` -> `4.0.1#0` + - [(#14505)](https://github.com/microsoft/vcpkg/pull/14505) [nuspell] Update version to 4.0.1 (by @dimztimz) + - [(#15425)](https://github.com/microsoft/vcpkg/pull/15425) [nuspell] update to version 4.2.0 (by @dimztimz) +- boost-python `1.75.0#1` -> `1.75.0#1` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15352)](https://github.com/microsoft/vcpkg/pull/15352) [boost-python] Adds `python-debugging=on` to `B2_OPTIONS_DBG` (fixes #15350) (by @klalumiere) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- openvr `1.12.5#0` -> `1.16.8#0` + - [(#16684)](https://github.com/microsoft/vcpkg/pull/16684) [openvr ] Update openvr to 1.16.8 (by @EniacMlezi) +- boost-container `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- botan `2.16.0#0` -> `2.16.0#0` + - [(#17509)](https://github.com/microsoft/vcpkg/pull/17509) [botan] add arm (by @jgilje) +- azure-security-keyvault-keys-cpp `4.0.0-beta.1#0` -> `4.0.0-beta.1#0` + - [(#17143)](https://github.com/microsoft/vcpkg/pull/17143) [azure-security-keyvault-*] Add new ports (by @azure-sdk) + - [(#17447)](https://github.com/microsoft/vcpkg/pull/17447) [azure-sdk-for-cpp] Upgrade vcpkg manifest files (by @antkmsft) +- libtcod `1.16.6#0` -> `1.16.6#0` + - [(#16408)](https://github.com/microsoft/vcpkg/pull/16408) [libtcod] Add new port. (by @HexDecimal) +- realsense2 `2.40.0#1` -> `2.40.0#1` + - [(#14522)](https://github.com/microsoft/vcpkg/pull/14522) [realsense2] Update to version 2.39.0 (by @padarom) + - [(#15156)](https://github.com/microsoft/vcpkg/pull/15156) [Realsense2] Update to 2.40.0 (by @JonLiu1993) + - [(#15608)](https://github.com/microsoft/vcpkg/pull/15608) Librealsense2 android build (by @xandox) + - [(#16411)](https://github.com/microsoft/vcpkg/pull/16411) [realsense2] Update version to v 2.42.0 (by @Cheney-W) +- upb `2020-08-19#0` -> `2020-08-19#0` + - [(#17331)](https://github.com/microsoft/vcpkg/pull/17331) Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (by @BillyONeal) + - [(#17422)](https://github.com/microsoft/vcpkg/pull/17422) [grpc][upb] Update to newer versions (by @ras0219) +- brynet `1.0.7#0` -> `1.10.0#0` + - [(#16366)](https://github.com/microsoft/vcpkg/pull/16366) [brynet] upgrade to 1.10.0 (by @IronsDu) +- libssh `0.9.5#1` -> `0.9.5#3` + - [(#15687)](https://github.com/microsoft/vcpkg/pull/15687) [libssh] Add support for Android (by @ahmedyarub) + - [(#15725)](https://github.com/microsoft/vcpkg/pull/15725) [aws-cpp-sdk] [zlib] [openssl] [curl] Fix zlib, OpenSSL, curl and AWS SDK for Android (by @ahmedyarub) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) +- boost-hof `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- gdk-pixbuf `2.36.9-5#6` -> `2.36.9-5#7` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) + - [(#17528)](https://github.com/microsoft/vcpkg/pull/17528) [vcpkg baseline][gdk-pixbuf] Fix build error on windows (by @PhoebeHui) +- ace `0#1` -> `0#1` + - [(#14768)](https://github.com/microsoft/vcpkg/pull/14768) [ace] copy generated headers files for tao (by @victorburckel) + - [(#15862)](https://github.com/microsoft/vcpkg/pull/15862) [ace] Update to 7.0.0 (by @jwillemsen) + - [(#16708)](https://github.com/microsoft/vcpkg/pull/16708) [ace] Upgrade to 7.0.1 (by @jwillemsen) +- scintilla `4.4.5#0` -> `4.4.5#0` + - [(#16508)](https://github.com/microsoft/vcpkg/pull/16508) [scintilla] update to 4.4.6 (by @JonLiu1993) +- boost-pool `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- cairomm `1.15.3#5` -> `1.15.3#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#16825)](https://github.com/microsoft/vcpkg/pull/16825) [cairo,cairomm] add fontconfig and quartz feature and update cairo version (by @abique) +- freerdp `2.2.0#0` -> `2.2.0#0` + - [(#15724)](https://github.com/microsoft/vcpkg/pull/15724) [freerdp] Fix include path (by @KangLin) +- hypodermic `2.5.2#0` -> `2.5.2#0` + - [(#17208)](https://github.com/microsoft/vcpkg/pull/17208) [hypodermic] Add new port (v2.5.2) (by @revilo) +- libtorrent `1.2.10#1` -> `1.2.10#2` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#14755)](https://github.com/microsoft/vcpkg/pull/14755) [libtorrent] Update to 1.2.11 (by @FranciscoPombal) + - [(#15620)](https://github.com/microsoft/vcpkg/pull/15620) [libtorrent] update to 1.2.12 (by @JonLiu1993) + - [(#17166)](https://github.com/microsoft/vcpkg/pull/17166) [libtorrent] Update to latest 1.2.x commit (by @FranciscoPombal) +- zstd `1.4.4#1` -> `1.4.5#1` + - [(#14395)](https://github.com/microsoft/vcpkg/pull/14395) [ZSTD] Update to 1.4.5 (by @Neumann-A) + - [(#16865)](https://github.com/microsoft/vcpkg/pull/16865) [zstd] update to 1.4.9 (by @Thieum) +- qt5-script `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- dlib `4#0` -> `4#0` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) + - [(#15277)](https://github.com/microsoft/vcpkg/pull/15277) [dlib] adding missing cudnn depedency for cuda feature (by @Kicer86) +- boost-function-types `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libudis86 `2018-01-28-56ff6c87#0` -> `2018-01-28-56ff6c87#0` + - [(#17331)](https://github.com/microsoft/vcpkg/pull/17331) Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (by @BillyONeal) +- libkeyfinder `2.2.4#0` -> `2.2.4#0` + - [(#15878)](https://github.com/microsoft/vcpkg/pull/15878) [libkeyfinder] add new port with libkeyfinder 2.2.4 (by @Be-ing) +- paho-mqttpp3 `1.1#1` -> `1.1#1` + - [(#13680)](https://github.com/microsoft/vcpkg/pull/13680) [paho-mqtt] Update to version 1.3.5 (by @LilyWangL) + - [(#15573)](https://github.com/microsoft/vcpkg/pull/15573) [paho-mqttpp3] update to 1.2.0 (by @JonLiu1993) +- qt5-declarative `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- icu `8#5` -> `8#8` + - [(#14186)](https://github.com/microsoft/vcpkg/pull/14186) [icu] Add MSVC ARM64 support (by @janisozaur) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15706)](https://github.com/microsoft/vcpkg/pull/15706) [icu] Add support for macos rpath prefix macro (by @adam-bloom) + - [(#16077)](https://github.com/microsoft/vcpkg/pull/16077) [V8, icu] Update v8 to version 9.0.257.17, icu to 69.1 (by @Kwizatz) +- freexl `1.0.4#10` -> `1.0.4#11` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) +- mongo-c-driver `1.16.1-1#1` -> `1.16.1#3` + - [(#13126)](https://github.com/microsoft/vcpkg/pull/13126) [vcpkg_fixup_pkgconfig] Handle spaces in path, do not validate individual libraries (by @ras0219) +- boost-timer `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- libodb `2.4.0-6#0` -> `2.4.0-6#0` + - [(#16975)](https://github.com/microsoft/vcpkg/pull/16975) [libodb-mysql] Fix usage (by @JackBoosY) +- qt5-3d `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- palsigslot `1.2.0#0` -> `1.2.0#0` + - [(#15558)](https://github.com/microsoft/vcpkg/pull/15558) [palsigslot] New port (by @luca-schlecker) +- ghc-filesystem `#0` -> `#0` + - [(#16936)](https://github.com/microsoft/vcpkg/pull/16936) [ghc-filesystem] create a new port (by @luncliff) +- qt5-webchannel `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- gettext `0.19-15#0` -> `0.21#0` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#17010)](https://github.com/microsoft/vcpkg/pull/17010) [gettext] Add feature tools (by @Neumann-A) + - [(#17523)](https://github.com/microsoft/vcpkg/pull/17523) [gettext] disable dirent detection on windows (by @Neumann-A) +- fdk-aac `2018-07-08-2#0` -> `2018-07-08#3` + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) +- yyjson `#0` -> `#0` + - [(#17201)](https://github.com/microsoft/vcpkg/pull/17201) [yyjson] Add new port (by @myd7349) +- tweeny `3#0` -> `3#0` + - [(#16683)](https://github.com/microsoft/vcpkg/pull/16683) [tweeny] Update to v3.2.0 (by @bradJM) +- span-lite `0.7.0#0` -> `0.8.1#0` + - [(#14414)](https://github.com/microsoft/vcpkg/pull/14414) [span-lite] update to 0.8.1 (by @Ryan-rsm-McKenzie) + - [(#14781)](https://github.com/microsoft/vcpkg/pull/14781) [span-lite] update to 0.9.0 (by @Ryan-rsm-McKenzie) +- boost-array `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- debug-assert `1.3.3#0` -> `1.3.3#0` + - [(#15468)](https://github.com/microsoft/vcpkg/pull/15468) [type-safe] New port. (by @blaz-kranjc) +- hyperscan `5.3.0#0` -> `5.3.0#1` + - [(#15080)](https://github.com/microsoft/vcpkg/pull/15080) [hyperscan] Remove erroneous python3 dependency. (by @Hoikas) +- boost-wave `1.75.0#1` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- ensmallen `2.14.2#0` -> `2.14.2#0` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) +- cartographer `1.0.0-3#0` -> `1.0.0-3#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- boost-statechart `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- librtmp `2019-11-11_1#0` -> `2019-11-11_1#0` + - [(#16320)](https://github.com/microsoft/vcpkg/pull/16320) [librtmp] Switch to GitHub mirror (by @ras0219) +- openigtlink `3.0#0` -> `3.0#1` + - [(#15500)](https://github.com/microsoft/vcpkg/pull/15500) [openigtlink] Fix cmake config location (by @dweckmann) +- libdatachannel `v0.10.1#0` -> `v0.10.1#0` + - [(#13704)](https://github.com/microsoft/vcpkg/pull/13704) [libdatachannel] Add new port (by @Nemirtingas) + - [(#17077)](https://github.com/microsoft/vcpkg/pull/17077) [libdatachannel ] Update to 0.12.0 (by @Nemirtingas) + - [(#17331)](https://github.com/microsoft/vcpkg/pull/17331) Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (by @BillyONeal) +- pixman `0.38.4#2` -> `0.38.4#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- libnice `0.1.15#5` -> `0.1.15#6` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14248)](https://github.com/microsoft/vcpkg/pull/14248) [libnice] Fix build error on Linux (by @LilyWangL) +- ebml `1.4.0#0` -> `1.4.0#0` + - [(#14794)](https://github.com/microsoft/vcpkg/pull/14794) [ebml/gppanel/matroska/polyhook2/unrar] Fix typos in CONTROL files (by @NancyLi1013) +- fplus `0.2.3-p0#0` -> `0.2.3-p0#0` + - [(#16510)](https://github.com/microsoft/vcpkg/pull/16510) [fplus] update to v0.2.13-p0 (by @JonLiu1993) + - [(#17559)](https://github.com/microsoft/vcpkg/pull/17559) [new/updated port] frugally-deep and updated fplus (by @mathisloge) +- mapbox-geojson-vt-cpp `#0` -> `#0` + - [(#16838)](https://github.com/microsoft/vcpkg/pull/16838) [mapbox-geometry,mapbox-polylabel,geojson-vt-cpp,geojson-cpp] new ports (by @mathisloge) +- mdnsresponder `765.30.11-2#0` -> `765.30.11#3` + - [(#15340)](https://github.com/microsoft/vcpkg/pull/15340) [mdnsresponder] Change compile flag /Zi to /Z7 (by @JackBoosY) +- boost-graph-parallel `1.74.0#1` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- poppler `20.12.1#0` -> `20.12.1#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#15158)](https://github.com/microsoft/vcpkg/pull/15158) [poppler] Add new port (by @playgithub) + - [(#15491)](https://github.com/microsoft/vcpkg/pull/15491) [vcpkg baseline][poppler] Fix issue with using libcurl. (by @Hoikas) + - [(#15574)](https://github.com/microsoft/vcpkg/pull/15574) [poppler] Fix error gperf is not recognized as an internal or externa command (by @Cheney-W) + - [(#15727)](https://github.com/microsoft/vcpkg/pull/15727) [poppler] Disable clang-format check (by @NancyLi1013) + - [(#16356)](https://github.com/microsoft/vcpkg/pull/16356) [vcpkg baseline][poppler] Add feature splash and add its dependency boost-container and boost-move (by @JackBoosY) +- portaudio `2020-02-02#0` -> `2020-02-02#0` + - [(#16197)](https://github.com/microsoft/vcpkg/pull/16197) Update portaudio port to latest on github (by @fluffy) + - [(#17401)](https://github.com/microsoft/vcpkg/pull/17401) [portaudio] update to 19.7 (by @Be-ing) +- libsodium `1.0.18#3` -> `1.0.18#3` + - [(#15269)](https://github.com/microsoft/vcpkg/pull/15269) [libsodium] use x64 specific gcc options only on x64 platform (by @isanych) + - [(#16730)](https://github.com/microsoft/vcpkg/pull/16730) [libsodium] Rework CMake build to match autoconf (by @thomasgt) +- poco `1.10.1#1` -> `1.10.1#3` + - [(#14305)](https://github.com/microsoft/vcpkg/pull/14305) [poco] Fix dependency, add features (by @JackBoosY) + - [(#14589)](https://github.com/microsoft/vcpkg/pull/14589) [poco] Fix dependency and cmake config issue (by @PhoebeHui) + - [(#14763)](https://github.com/microsoft/vcpkg/pull/14763) [poco] Fix dependency libmariadb (by @JackBoosY) + - [(#16526)](https://github.com/microsoft/vcpkg/pull/16526) [poco] Remove dependency port openssl for feature netssl on windows (by @JackBoosY) + - [(#16549)](https://github.com/microsoft/vcpkg/pull/16549) [poco] Fix feature sqlite3 (by @NancyLi1013) +- aws-checksums `0.1.9#0` -> `0.1.9#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) +- azure-iot-sdk-c `2020-07-19#1` -> `2020-12-09#0` + - [(#15109)](https://github.com/microsoft/vcpkg/pull/15109) Azure-IoT-Sdk for C release 2020-12-09 (by @ewertons) +- opencascade `7.5.0#1` -> `7.5.0#3` + - [(#14435)](https://github.com/microsoft/vcpkg/pull/14435) [opencascade] update debug paths in *Targets-debug.cmake (by @socuwn) + - [(#14901)](https://github.com/microsoft/vcpkg/pull/14901) [opencascade] Fix static build (by @JackBoosY) + - [(#15056)](https://github.com/microsoft/vcpkg/pull/15056) [opencascade] Fix OpenCASCADE_INSTALL_PREFIX path in config (by @NancyLi1013) + - [(#15997)](https://github.com/microsoft/vcpkg/pull/15997) [opencascade] Update to 7.5.0 (by @JonLiu1993) + - [(#16513)](https://github.com/microsoft/vcpkg/pull/16513) [opencascade] fix #16252 (by @Dejauxvue) +- boost-asio `1.75.0#1` -> `1.75.0#1` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15513)](https://github.com/microsoft/vcpkg/pull/15513) [boost-asio] Fix duplicate symbols of asio::dummy_return (by @cedral) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- sdformat6 `6.2.0-1#0` -> `6.2.0-1#0` + - [(#17376)](https://github.com/microsoft/vcpkg/pull/17376) [ci] Update macOS to 11 (by @strega-nil) +- openssl-unix `1.1.1h#0` -> `1.1.1h#1` + - [(#14308)](https://github.com/microsoft/vcpkg/pull/14308) [OpenSSL] refactor openssl ports. (by @Neumann-A) + - [(#14457)](https://github.com/microsoft/vcpkg/pull/14457) [openssl] Add build depends to deprecated openssl ports (by @Neumann-A) +- pagmo2 `#0` -> `#0` + - [(#15682)](https://github.com/microsoft/vcpkg/pull/15682) [pagmo2] Add new port (by @dmillard) +- lzo `2.10-5#0` -> `2.1#6` + - [(#15782)](https://github.com/microsoft/vcpkg/pull/15782) [lzo] Install pc file on windows (by @Neumann-A) +- workflow `0.9.3#0` -> `0.9.3#0` + - [(#16140)](https://github.com/microsoft/vcpkg/pull/16140) [workflow] add port of sogou/workflow (by @dengjunplusplus) + - [(#16198)](https://github.com/microsoft/vcpkg/pull/16198) [workflow] Disable parallel configure due to writes to source dir (by @ras0219) + - [(#16842)](https://github.com/microsoft/vcpkg/pull/16842) [workflow] update version of workflow port (by @dengjunplusplus) +- boost-icl `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- globjects `1.1.0-3#0` -> `1.1.0#0` + - [(#16429)](https://github.com/microsoft/vcpkg/pull/16429) [glm] Add namespace to export target (by @JackBoosY) +- spirv-cross `2020-02-26#0` -> `2020-02-26#0` + - [(#15831)](https://github.com/microsoft/vcpkg/pull/15831) [spirv-cross,spirv-headers,spirv-tools] 2021-01-15 update (by @barcharcraz) + - [(#16038)](https://github.com/microsoft/vcpkg/pull/16038) [spirv-cross,spirv-tools] support iOS triplets (by @luncliff) + - [(#17367)](https://github.com/microsoft/vcpkg/pull/17367) [spirv-cross] small cleanup (by @fran6co) +- boost-parameter `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libui `2018-11-03-1#0` -> `2018-11-03-1#0` + - [(#17095)](https://github.com/microsoft/vcpkg/pull/17095) [libui] Export system libs on OSX (by @JackBoosY) +- ignition-transport8 `8.0.0#0` -> `8.1.0#0` + - [(#14562)](https://github.com/microsoft/vcpkg/pull/14562) [ignition-transport8] Fix ignition-transport8 version (by @ahoarau) +- onnxruntime-gpu `1.5.1#0` -> `1.5.1#0` + - [(#14481)](https://github.com/microsoft/vcpkg/pull/14481) [onnxruntime-gpu] Add port for onnxruntime (GPU) (by @ianormy) +- rsasynccpp `#0` -> `#0` + - [(#16380)](https://github.com/microsoft/vcpkg/pull/16380) [rsasynccpp] Add new port (Rstein.AsyncCpp) (by @renestein) +- boost-locale `1.75.0#1` -> `1.75.0#3` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14502)](https://github.com/microsoft/vcpkg/pull/14502) [boost-locale] Replace VCPKG_TARGET_IS_WINDOWS in b2-options (by @longnguyen2004) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- libsigcpp `2.10-3#1` -> `2.10-3#2` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14988)](https://github.com/microsoft/vcpkg/pull/14988) [GLIBMM] Installing .pc file (by @faserg1) + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- v8 `8.3.110.13#0` -> `8.6.395.17#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#13355)](https://github.com/microsoft/vcpkg/pull/13355) [v8] Update v8 to current stable version: 8.6.395.17 (by @Kwizatz) + - [(#16077)](https://github.com/microsoft/vcpkg/pull/16077) [V8, icu] Update v8 to version 9.0.257.17, icu to 69.1 (by @Kwizatz) +- netcdf-c `4.7.4#1` -> `4.7.4#2` + - [(#14421)](https://github.com/microsoft/vcpkg/pull/14421) [netcdf-c] Fix linkage error (by @NancyLi1013) + - [(#16085)](https://github.com/microsoft/vcpkg/pull/16085) [netcdf-c] Fix usage (by @JackBoosY) +- qt5-remoteobjects `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- tbb `2020_U3#1` -> `2020_U3#4` + - [(#14325)](https://github.com/microsoft/vcpkg/pull/14325) [tbb] Support tbb build for arm-linux & arm64-linux (by @xieyubo) + - [(#14555)](https://github.com/microsoft/vcpkg/pull/14555) [tbb] fix shared tbb library configuration build under *nix (by @xandox) + - [(#15306)](https://github.com/microsoft/vcpkg/pull/15306) [tbb] arm64-osx support (by @lebdron) + - [(#16068)](https://github.com/microsoft/vcpkg/pull/16068) Add disable-exceptions feature to portfile for tbb (by @aggieNick02) +- qt5-translations `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- freetds `1.2.11#0` -> `1.2.11#0` + - [(#14529)](https://github.com/microsoft/vcpkg/pull/14529) [freetds] Remove patches and update to a version that no longer needs them (by @BillyONeal) + - [(#14970)](https://github.com/microsoft/vcpkg/pull/14970) [ NASM ] Update version from 2.14.02 to 2.15.05 (by @Nioub) +- kf5windowsystem `5.64.0#0` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- uvatlas `aug2020#0` -> `apr2021#0` + - [(#15210)](https://github.com/microsoft/vcpkg/pull/15210) Updated directxtk et al for cmake package support (by @walbourn) + - [(#15554)](https://github.com/microsoft/vcpkg/pull/15554) directxmesh, directxtex, and uvatlas now support linux (by @walbourn) + - [(#15639)](https://github.com/microsoft/vcpkg/pull/15639) directxtex, directxmesh, directxtk, uvatlas ports updated to fix cach??? (by @walbourn) + - [(#17123)](https://github.com/microsoft/vcpkg/pull/17123) [directxtex,directxmesh, directxtk, directxtk12, uvatlas] updated for April 2021 releases (by @walbourn) +- qt5-speech `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- boost-xpressive `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libmt32emu `#0` -> `#0` + - [(#16816)](https://github.com/microsoft/vcpkg/pull/16816) [libmt32emu] new port (by @autoantwort) + - [(#17070)](https://github.com/microsoft/vcpkg/pull/17070) [libmt32emu] update to 2.5.0 (by @autoantwort) +- boost-range `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- yas `7.0.4#0` -> `7.0.5#0` + - [(#14453)](https://github.com/microsoft/vcpkg/pull/14453) [yas] update to 7.0.5 (by @SeekingMeaning) +- geographiclib `1.50.1#0` -> `1.51#0` + - [(#14711)](https://github.com/microsoft/vcpkg/pull/14711) [geographiclib] Update to version 1.51 (by @cffk) +- directxsdk `jun10#0` -> `jun10#0` + - [(#16010)](https://github.com/microsoft/vcpkg/pull/16010) [directxsdk] Update DirectX SDK port (by @walbourn) + - [(#16317)](https://github.com/microsoft/vcpkg/pull/16317) direcxtsdk port updated to use MS Downloads (by @walbourn) +- pango `1.40.11#8` -> `1.40.11#9` + - [(#12860)](https://github.com/microsoft/vcpkg/pull/12860) [harfbuzz] Use meson and update to 2.7.0 (by @vejmartin) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- entt `3.5.1#0` -> `3.6.0#0` + - [(#15567)](https://github.com/microsoft/vcpkg/pull/15567) [entt] update to <3.6> (by @JonLiu1993) + - [(#17047)](https://github.com/microsoft/vcpkg/pull/17047) [entt] Update to 3.7.0 (by @skaarj1989) +- boost-intrusive `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- xaudio2redist `1.2.6#0` -> `1.2.6#0` + - [(#17174)](https://github.com/microsoft/vcpkg/pull/17174) [xaudio2redist] Add new port (by @walbourn) +- qt5-webengine `5.15.2#1` -> `5.15.2#2` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) + - [(#16770)](https://github.com/microsoft/vcpkg/pull/16770) [qt5-webengine] Fix issues (by @Neumann-A) +- kf5completion `5.64.0#0` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- boost-rational `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- ois `1.5-1#0` -> `1.5#0` + - [(#15030)](https://github.com/microsoft/vcpkg/pull/15030) [tcl, anyrpc, ois, osgearth] Build Fixes 2020-12-09 (by @BillyONeal) +- openssl-uwp `1.1.1h#1` -> `1.1.1h#1` + - [(#14308)](https://github.com/microsoft/vcpkg/pull/14308) [OpenSSL] refactor openssl ports. (by @Neumann-A) + - [(#14457)](https://github.com/microsoft/vcpkg/pull/14457) [openssl] Add build depends to deprecated openssl ports (by @Neumann-A) +- qt5-wayland `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- boost-flyweight `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-heap `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- exiv2 `0.27.3#2` -> `0.27.3#4` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#15389)](https://github.com/microsoft/vcpkg/pull/15389) [exiv2] Add pkgconfig to fix the path (by @NancyLi1013) +- qt5-gamepad `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- boost-property-map `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- taglib `1.11.1-20190531#0` -> `1.12.0-20210123#0` + - [(#16390)](https://github.com/microsoft/vcpkg/pull/16390) Update taglib to 1.12.0 (by @pdehne) + - [(#16649)](https://github.com/microsoft/vcpkg/pull/16649) [taglib] Upgrade from 1.12-beta-2 to 1.12 (by @uklotzde) +- boost-numeric-conversion `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libepoxy `1.5.4#1` -> `1.5.4#2` + - [(#14344)](https://github.com/microsoft/vcpkg/pull/14344) [tool-meson] Update to 0.56.0 (by @c72578) + - [(#15482)](https://github.com/microsoft/vcpkg/pull/15482) [libepoxy] Update to 1.5.5 (by @ras0219) +- mapbox-geojson-cpp `#0` -> `#0` + - [(#16838)](https://github.com/microsoft/vcpkg/pull/16838) [mapbox-geometry,mapbox-polylabel,geojson-vt-cpp,geojson-cpp] new ports (by @mathisloge) +- zziplib `0.13.71#0` -> `0.13.71#1` + - [(#15215)](https://github.com/microsoft/vcpkg/pull/15215) [zziplib] Uses upstream CMakeLists.txt (by @longnguyen2004) +- gsl-lite `0.37.0#0` -> `0.37.0#0` + - [(#16984)](https://github.com/microsoft/vcpkg/pull/16984) [gsl-lite] Update to 0.38.0 (by @mbeutel) + - [(#17444)](https://github.com/microsoft/vcpkg/pull/17444) [gsl-lite] Update to 0.38.1 (by @mbeutel) +- boost-context `1.75.0#2` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16378)](https://github.com/microsoft/vcpkg/pull/16378) [boost-context] fix linux -> windows cross compile (by @autoantwort) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) + - [(#16482)](https://github.com/microsoft/vcpkg/pull/16482) [boost-context] fix build result on apple arm (by @autoantwort) + - [(#16930)](https://github.com/microsoft/vcpkg/pull/16930) [boost-context] support android (by @huangqinjin) +- darknet `2020-08-30#1` -> `2020-08-30#2` + - [(#15296)](https://github.com/microsoft/vcpkg/pull/15296) [darknet] yolo v4 weights's hash need to update (by @JonLiu1993) + - [(#15770)](https://github.com/microsoft/vcpkg/pull/15770) [darknet] update to latest version (by @cenit) + - [(#15942)](https://github.com/microsoft/vcpkg/pull/15942) [darknet] fix opencv features, add compatibility with VS16.9 (by @cenit) +- xsimd `7.4.8#0` -> `7.4.9#0` + - [(#14454)](https://github.com/microsoft/vcpkg/pull/14454) [xsimd][xtensor][xtl] Update to latest (by @SeekingMeaning) +- magic-enum `0.7.0#0` -> `0.7.1#0` + - [(#14904)](https://github.com/microsoft/vcpkg/pull/14904) [magic-enum] Update to v0.7.1 (by @Neargye) + - [(#15974)](https://github.com/microsoft/vcpkg/pull/15974) [magic-enum] Update to v0.7.2 (by @Neargye) +- qt5-imageformats `5.15.1#1` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- sdl1 `1.2.15#12` -> `1.2.15#13` + - [(#15126)](https://github.com/microsoft/vcpkg/pull/15126) [sdl1] x64-windows-static-md fixes (by @ankurverma85) +- libffi `3.3#5` -> `3.3#7` + - [(#14407)](https://github.com/microsoft/vcpkg/pull/14407) [libffi] mingw support (by @longnguyen2004) + - [(#15821)](https://github.com/microsoft/vcpkg/pull/15821) [libffi] Added armv7-a to allowed architectures for Android 32 bit arm builds (by @venabled) + - [(#16285)](https://github.com/microsoft/vcpkg/pull/16285) [libffi] Fix processors (by @autoantwort) +- iir1 `#0` -> `#0` + - [(#16436)](https://github.com/microsoft/vcpkg/pull/16436) [iir1] Add new port (by @andywang0607) +- continuable `4.1.0#0` -> `4.1.0#0` + - [(#16261)](https://github.com/microsoft/vcpkg/pull/16261) [continuable] add a new port (by @luncliff) +- boost-yap `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libxslt `1.1.33#1` -> `1.1.33#9` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#14476)](https://github.com/microsoft/vcpkg/pull/14476) [libxslt] Fix install tools and pkgconfig (by @JackBoosY) + - [(#15806)](https://github.com/microsoft/vcpkg/pull/15806) [libxslt] Fixed macos build (by @ludekvodicka) + - [(#16617)](https://github.com/microsoft/vcpkg/pull/16617) [libxslt] Update to 1.1.34 (by @pastle-ptc) +- python3 `3.9.2#2` -> `3.9.2#0` + - [(#14510)](https://github.com/microsoft/vcpkg/pull/14510) [python3] Upgrade to 3.9.0 (by @Hoikas) + - [(#14891)](https://github.com/microsoft/vcpkg/pull/14891) [python3] Build interpreter (by @Hoikas) + - [(#15221)](https://github.com/microsoft/vcpkg/pull/15221) [python3] Add vcpkg-cmake-wrapper. (by @Hoikas) + - [(#15378)](https://github.com/microsoft/vcpkg/pull/15378) [antlr4,python3] Resolve cross port conflicts (by @BillyONeal) + - [(#16315)](https://github.com/microsoft/vcpkg/pull/16315) [python3] upgrade to 3.9.2 (by @Hoikas) + - [(#16420)](https://github.com/microsoft/vcpkg/pull/16420) [python3] Add feature deprecated-win7-support. (by @Hoikas) + - [(#17579)](https://github.com/microsoft/vcpkg/pull/17579) [python3] Disable registry access to determine WinSDK (by @ras0219-msft) +- matplotplusplus `#0` -> `#0` + - [(#13725)](https://github.com/microsoft/vcpkg/pull/13725) [matplotplusplus] Add new port (by @myd7349) + - [(#17461)](https://github.com/microsoft/vcpkg/pull/17461) [matplotplusplus] Install extra 3rd libraries (by @JackBoosY) + - [(#17552)](https://github.com/microsoft/vcpkg/pull/17552) [matplotplusplus] Fix find and use dependencies (by @JackBoosY) +- oatpp-zlib `1.2.0#0` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- capnproto `0.8.0#0` -> `0.8.0#1` + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- vc `1.4.1#0` -> `1.4.1#1` + - [(#16552)](https://github.com/microsoft/vcpkg/pull/16552) [vc] Update HEAD_REF and fix CMake configure options (by @bernhardmgruber) +- libflac `1.3.3#4` -> `1.3.3#5` + - [(#14465)](https://github.com/microsoft/vcpkg/pull/14465) [libflac] require NASM for libflac[asm] (by @cbergemann) +- colmap `3.6#0` -> `3.6#0` + - [(#15886)](https://github.com/microsoft/vcpkg/pull/15886) [baseline][colmap] Fix find dependency freeimage (by @JackBoosY) +- glew `2.1.0#9` -> `2.1.0#10` + - [(#16166)](https://github.com/microsoft/vcpkg/pull/16166) [glfw3/glew] Fix pkgconfig (by @JackBoosY) +- libwebp `1.1.0#1` -> `1.1.0#3` + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) + - [(#17172)](https://github.com/microsoft/vcpkg/pull/17172) [libwebp] Fix release-only builds (by @dg0yt) +- behaviortree-cpp `3.5.1#0` -> `3.5.1#0` + - [(#17169)](https://github.com/microsoft/vcpkg/pull/17169) [behaviortree-cpp] update to 3.5.6 (by @JonLiu1993) +- g3log `2019-07-29#0` -> `2019-07-29#0` + - [(#16491)](https://github.com/microsoft/vcpkg/pull/16491) [g3log] update to 1.3.4 (by @JonLiu1993) + - [(#16872)](https://github.com/microsoft/vcpkg/pull/16872) [g3log] Add supports (by @NancyLi1013) +- libprotobuf-mutator `1#0` -> `1#0` + - [(#13691)](https://github.com/microsoft/vcpkg/pull/13691) [libprotobuf-mutator] Add new port (by @lebdron) +- opencolorio `1.1.1#4` -> `1.1.1#0` + - [(#15764)](https://github.com/microsoft/vcpkg/pull/15764) [opencolorio] Install OpenColorIOConfig.cmake (by @ras0219) +- qt5-sensors `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- libcbor `0.8.0#0` -> `0.8.0#0` + - [(#16884)](https://github.com/microsoft/vcpkg/pull/16884) [libcbor] New port (by @xgcssch) +- alembic `1.7.15#0` -> `1.7.16#0` + - [(#14447)](https://github.com/microsoft/vcpkg/pull/14447) [alembic] update to 1.7.16 (by @SeekingMeaning) +- boost-proto `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- tinyexr `2020-03-15#0` -> `1.0.0#0` + - [(#17360)](https://github.com/microsoft/vcpkg/pull/17360) [tinyexr] update version and add targets (by @fran6co) +- libspatialite `5.0.0#5` -> `5.0.0#7` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#14800)](https://github.com/microsoft/vcpkg/pull/14800) [Proj4] Update to 7.2.0 (by @longhuan2018) + - [(#15040)](https://github.com/microsoft/vcpkg/pull/15040) [libspatialite] Update 5.0.0 (by @longhuan2018) + - [(#17024)](https://github.com/microsoft/vcpkg/pull/17024) Libspatialite remove cflags from vcpkg_configure_make options (by @xandox) +- detours `4.0.1-1#0` -> `4.0.1#2` + - [(#16755)](https://github.com/microsoft/vcpkg/pull/16755) [detours] support debug builds (by @sylveon) +- boost-unordered `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- chartdir `6.3.1-1#0` -> `6.3.1#2` + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- oatpp-swagger `1.2.0#1` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- orc `1.6.4#0` -> `1.6.4#1` + - [(#14395)](https://github.com/microsoft/vcpkg/pull/14395) [ZSTD] Update to 1.4.5 (by @Neumann-A) +- minizip `1.2.11#7` -> `1.2.11#8` + - [(#16108)](https://github.com/microsoft/vcpkg/pull/16108) [minizip] support iOS/Android triplets (by @luncliff) +- qt5-datavis3d `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- fontconfig `2.13.1#1` -> `2.13.1#6` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#14946)](https://github.com/microsoft/vcpkg/pull/14946) [fontconfig] fix dll name in def file (by @Neumann-A) + - [(#15060)](https://github.com/microsoft/vcpkg/pull/15060) [fontconfig] Disable install data files (by @JackBoosY) + - [(#15144)](https://github.com/microsoft/vcpkg/pull/15144) [fontconfig] add vcpkg cmake wrapper. (by @Neumann-A) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) + - [(#16905)](https://github.com/microsoft/vcpkg/pull/16905) [fontconfig] fixes for arm64-macos (by @abique) + - [(#17280)](https://github.com/microsoft/vcpkg/pull/17280) [fontconfig] Don't require uuid port for mingw (by @dg0yt) +- ignition-math6 `6.4.0#0` -> `6.6.0#0` + - [(#14324)](https://github.com/microsoft/vcpkg/pull/14324) [ignition] Updates on various pkgs ???? (by @ahoarau) +- args `2020-09-14#0` -> `2020-09-14#0` + - [(#16703)](https://github.com/microsoft/vcpkg/pull/16703) [args] update to latest version (by @Ryan-rsm-McKenzie) +- boost-hana `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- ecm `5.74.0#0` -> `5.74.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- tiny-process-library `2018-12-06#0` -> `2.0.4#0` + - [(#14732)](https://github.com/microsoft/vcpkg/pull/14732) [tiny-process-library] Bump tiny-process-library to 2.0.4 (by @traversaro) +- libconfig `1.7.2#3` -> `1.7.2#4` + - [(#15613)](https://github.com/microsoft/vcpkg/pull/15613) [libconfig] shlwapi is not available on linux (by @vmiheer) + - [(#15885)](https://github.com/microsoft/vcpkg/pull/15885) [libconfig] Fix libconfig when installing master branch (by @vmiheer) +- boost-chrono `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- celero `2.6.0-1#0` -> `2.7.2#0` + - [(#16446)](https://github.com/microsoft/vcpkg/pull/16446) [celero] Updated to v2.7.2 (by @DigitalInBlue) + - [(#16802)](https://github.com/microsoft/vcpkg/pull/16802) [celero] Updated to Celero v2.8.0 (by @DigitalInBlue) +- stlab `1.5.2-1#0` -> `1.6.2#0` + - [(#17239)](https://github.com/microsoft/vcpkg/pull/17239) [stlab] update to 1.6.2 (by @dittons) +- directxtk `jan2021#1` -> `apr2021#0` + - [(#14539)](https://github.com/microsoft/vcpkg/pull/14539) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version (by @RT222) + - [(#15210)](https://github.com/microsoft/vcpkg/pull/15210) Updated directxtk et al for cmake package support (by @walbourn) + - [(#15554)](https://github.com/microsoft/vcpkg/pull/15554) directxmesh, directxtex, and uvatlas now support linux (by @walbourn) + - [(#15639)](https://github.com/microsoft/vcpkg/pull/15639) directxtex, directxmesh, directxtk, uvatlas ports updated to fix cach??? (by @walbourn) + - [(#17123)](https://github.com/microsoft/vcpkg/pull/17123) [directxtex,directxmesh, directxtk, directxtk12, uvatlas] updated for April 2021 releases (by @walbourn) +- boost-outcome `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- qt5-webglplugin `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- cppzmq `4.7.1#0` -> `4.7.1#1` + - [(#14624)](https://github.com/microsoft/vcpkg/pull/14624) [cppzmq] Add draft feature (by @NancyLi1013) +- anyrpc `2020-01-13-1#0` -> `2020-01-13#0` + - [(#15030)](https://github.com/microsoft/vcpkg/pull/15030) [tcl, anyrpc, ois, osgearth] Build Fixes 2020-12-09 (by @BillyONeal) +- azure-macro-utils-c `2020-06-17-1#0` -> `2020-06-17#2` + - [(#14343)](https://github.com/microsoft/vcpkg/pull/14343) [vcpkg, azure-macro-utils-c] Fix SHA and add FILE_DISAMBIGUATOR for vcpkg_from_github (by @BillyONeal) +- boost-foreach `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libgpod `2019-08-29#2` -> `2019-08-29#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- antlr4 `4.8#1` -> `4.8#1` + - [(#15378)](https://github.com/microsoft/vcpkg/pull/15378) [antlr4,python3] Resolve cross port conflicts (by @BillyONeal) + - [(#16383)](https://github.com/microsoft/vcpkg/pull/16383) [antlr4] update to 4.9.1 (by @NickStrupat) +- boost-tti `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- qt5-mqtt `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- libebur128 `1.2.5#0` -> `1.2.5#0` + - [(#15988)](https://github.com/microsoft/vcpkg/pull/15988) [libebur128] add new port with version 1.2.5 (by @Be-ing) + - [(#16223)](https://github.com/microsoft/vcpkg/pull/16223) [libebur128] update to 1.2.6; fixes dynamic linking on Windows (by @Be-ing) +- boost-variant `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-phoenix `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- gtest `1.10.0#2` -> `1.10.0#4` + - [(#15661)](https://github.com/microsoft/vcpkg/pull/15661) [gtest] Add a patch to fix build error in GCC 11 (by @PragmaTwice) + - [(#16071)](https://github.com/microsoft/vcpkg/pull/16071) [gtest] fix builds when using --head (by @sylveon) +- spatialite-tools `5.0.0#1` -> `5.0.0#7` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#14800)](https://github.com/microsoft/vcpkg/pull/14800) [Proj4] Update to 7.2.0 (by @longhuan2018) + - [(#15039)](https://github.com/microsoft/vcpkg/pull/15039) [spatialite-tools]update to 5.0.0 (by @longhuan2018) + - [(#15040)](https://github.com/microsoft/vcpkg/pull/15040) [libspatialite] Update 5.0.0 (by @longhuan2018) + - [(#15768)](https://github.com/microsoft/vcpkg/pull/15768) [vcpkg baseline][spatialite-tools] fix linux osx build falied (by @longhuan2018) + - [(#17025)](https://github.com/microsoft/vcpkg/pull/17025) Spatialite-tools remove cflags from vcpkg_configure_make options (by @xandox) +- libosip2 `5.1.0-4#0` -> `5.1.0-4#0` + - [(#17321)](https://github.com/microsoft/vcpkg/pull/17321) [libosip2] Update to 5.2.0 and add windows support (by @NancyLi1013) +- boost-scope-exit `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- kf5holidays `5.74.0#0` -> `5.74.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- qscintilla `2.11.4-2#0` -> `2.12.0#0` + - [(#16455)](https://github.com/microsoft/vcpkg/pull/16455) [qscintilla] Update to 2.12 (by @m-kuhn) +- netcdf-cxx4 `4.3.1#1` -> `4.3.1#2` + - [(#14405)](https://github.com/microsoft/vcpkg/pull/14405) [netcdf-cxx4] Export cmake targets (by @NancyLi1013) +- ashes `2020-10-21#0` -> `2021-02-09#0` + - [(#16148)](https://github.com/microsoft/vcpkg/pull/16148) [ashes] Update to 2021-09-02 (by @DragonJoker) +- boost-assert `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- ryu `2.0#0` -> `2.0#0` + - [(#16238)](https://github.com/microsoft/vcpkg/pull/16238) [ryu] added ryu_printf (by @georg-emg) + - [(#16858)](https://github.com/microsoft/vcpkg/pull/16858) [ryu] ryuConfig.cmake now selects the correct libraries when cross compiling (by @georg-emg) + - [(#17306)](https://github.com/microsoft/vcpkg/pull/17306) [ryu] fixed syntax error in ryuConfig.cmake (by @georg-emg) +- ms-gltf `r1.9.5.0#0` -> `r1.9.5.0#0` + - [(#14971)](https://github.com/microsoft/vcpkg/pull/14971) [ms-gltf] Add new port (by @luncliff) +- cuda `10.1#4` -> `10.1#7` + - [(#14880)](https://github.com/microsoft/vcpkg/pull/14880) [cuda] Add ENV CUDA_HOME to path hints (by @jacobkahn) + - [(#16413)](https://github.com/microsoft/vcpkg/pull/16413) [cudnn] auto-download only if cuda version matches (by @cenit) +- libosmscout `1.1.1#0` -> `1.1.1#0` + - [(#14485)](https://github.com/microsoft/vcpkg/pull/14485) [libosmscout] Add new port (by @OgreTransporter) +- nameof `0.9.4#0` -> `0.10.0#0` + - [(#15975)](https://github.com/microsoft/vcpkg/pull/15975) [nameof] Update to 0.10.0 (by @Neargye) +- cppunit `1.14.0-1#0` -> `1.15.1#0` + - [(#15018)](https://github.com/microsoft/vcpkg/pull/15018) [cppunit] add linux support and bump version to 1.15.1 (by @dweckmann) +- libgeotiff `1.6.0#1` -> `1.6.0#2` + - [(#15750)](https://github.com/microsoft/vcpkg/pull/15750) [libgeotiff] Fix packagename via find_package (by @NancyLi1013) + - [(#17206)](https://github.com/microsoft/vcpkg/pull/17206) [libgeotiff] Fix mingw build (by @dg0yt) +- freeimage `3.18.0#17` -> `3.18.0#19` + - [(#15393)](https://github.com/microsoft/vcpkg/pull/15393) [freeimage] Fix for FreeImage incorrect image format enum after disabling vendor plugins (by @giladbau) + - [(#15812)](https://github.com/microsoft/vcpkg/pull/15812) [freeimage] Fix plugin disable patch (by @JackBoosY) +- ctp `6.3.15_20190220_se#0` -> `6.3.15_20190220_se#1` + - [(#15183)](https://github.com/microsoft/vcpkg/pull/15183) [ctp] bugfix for linux-x64 and file name case sensitivity (by @xgao1023) +- sqlcipher `4.4.0#0` -> `4.4.1#0` + - [(#14677)](https://github.com/microsoft/vcpkg/pull/14677) [sqlcipher] Update to 4.4.1 (by @SvenPStarFinanz) + - [(#17501)](https://github.com/microsoft/vcpkg/pull/17501) [sqlcipher] update to 4.4.3 (#17500) (by @shiena) +- openh264 `#0` -> `#0` + - [(#16714)](https://github.com/microsoft/vcpkg/pull/16714) [openh264] Add openh264 port (by @RichLogan) +- tmx `1.0.0#2` -> `1.1.0#0` + - [(#15421)](https://github.com/microsoft/vcpkg/pull/15421) [tmx] Update tmx port to 1.1.0 (by @jarruda) +- boost-safe-numerics `1.74.0#1` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-typeof `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libevent `2.1.12#0` -> `2.1.12#1` + - [(#14805)](https://github.com/microsoft/vcpkg/pull/14805) [libevent] Fix library cannot be found (by @NancyLi1013) +- gloo `20201203#0` -> `20201203#0` + - [(#15219)](https://github.com/microsoft/vcpkg/pull/15219) [gloo] New Port (by @jacobkahn) +- knet `1.0.1#0` -> `1.0.1#0` + - [(#17170)](https://github.com/microsoft/vcpkg/pull/17170) [knet]Update to v1.0.2 (by @KibaAmor) +- comms-ublox `0.20.0#0` -> `0.20.0#0` + - [(#14523)](https://github.com/microsoft/vcpkg/pull/14523) [comms-ublox] added new port (by @mathisloge) + - [(#15138)](https://github.com/microsoft/vcpkg/pull/15138) [comms] update comms libs to latest version (by @mathisloge) + - [(#15159)](https://github.com/microsoft/vcpkg/pull/15159) [comms] fixes debug build configuration (by @mathisloge) +- soci `4.0.1#1` -> `4.0.1#1` + - [(#14646)](https://github.com/microsoft/vcpkg/pull/14646) [soci] Update to 4.0.1 (by @JonLiu1993) + - [(#15577)](https://github.com/microsoft/vcpkg/pull/15577) [SOCI] Add support for soci-mysql connector (by @emexal-company) + - [(#16296)](https://github.com/microsoft/vcpkg/pull/16296) [soci] Fix feature mysql (by @JackBoosY) + - [(#16369)](https://github.com/microsoft/vcpkg/pull/16369) [soci] Re-fix feature mysql (by @JackBoosY) +- azure-umqtt-c `2020-07-19#0` -> `2020-12-09#0` + - [(#15109)](https://github.com/microsoft/vcpkg/pull/15109) Azure-IoT-Sdk for C release 2020-12-09 (by @ewertons) +- xbyak `5.97#0` -> `5.991#0` + - [(#14782)](https://github.com/microsoft/vcpkg/pull/14782) [xbyak] update to 5.991 (by @Ryan-rsm-McKenzie) +- qt5-quickcontrols `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- qt5-connectivity `1#0` -> `1#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- boost-throw-exception `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- geos `3.8.1#1` -> `3.9.0#0` + - [(#16109)](https://github.com/microsoft/vcpkg/pull/16109) [geos] Update to 3.9.0 (by @JackBoosY) + - [(#16572)](https://github.com/microsoft/vcpkg/pull/16572) [geos] upgrade to 3.9.1 (by @m-kuhn) +- log4cpp `2.9.1#3` -> `2.9.1#4` + - [(#15650)](https://github.com/microsoft/vcpkg/pull/15650) [log4cpp] find_package support (by @mannkafai) +- dxsdk-d3dx `#0` -> `#0` + - [(#17175)](https://github.com/microsoft/vcpkg/pull/17175) [dxsdk-d3dx] Add new port (by @walbourn) +- pthreads `3.0.0-6#0` -> `3.0.0-6#0` + - [(#16348)](https://github.com/microsoft/vcpkg/pull/16348) [pthreads] support ARM arch and UWP platform (by @luncliff) + - [(#17011)](https://github.com/microsoft/vcpkg/pull/17011) [pthreads] Fix crt linkage (by @JackBoosY) + - [(#17318)](https://github.com/microsoft/vcpkg/pull/17318) [pthreads] Make port empty on mingw (by @dg0yt) +- angle `2020-05-15-1#0` -> `2020-05-15#2` + - [(#16733)](https://github.com/microsoft/vcpkg/pull/16733) [angle] Include EGL/eglext_angle.h in ANGLE (by @hanseuljun) +- x-plane `3.0.1-1#0` -> `3.0.3#0` + - [(#15244)](https://github.com/microsoft/vcpkg/pull/15244) [x-plane] Update to 3.0.3 (by @siavee) +- kinectsdk1 `1.8-2#0` -> `1.8#0` + - [(#15856)](https://github.com/microsoft/vcpkg/pull/15856) [kinectsdk1] Update hash (by @Cheney-W) +- lodepng-c `2021-03-01#0` -> `2021-03-01#0` + - [(#16408)](https://github.com/microsoft/vcpkg/pull/16408) [libtcod] Add new port. (by @HexDecimal) + - [(#17290)](https://github.com/microsoft/vcpkg/pull/17290) [lodepng-c] Disable parallel configure (by @JackBoosY) +- urdfdom `1.0.4#2` -> `1.0.4#3` + - [(#14324)](https://github.com/microsoft/vcpkg/pull/14324) [ignition] Updates on various pkgs ???? (by @ahoarau) +- shaderwriter `1.0.0#0` -> `1.0.0#0` + - [(#15948)](https://github.com/microsoft/vcpkg/pull/15948) [ shaderwriter ]Update to version 1.0.0 (by @DragonJoker) + - [(#17347)](https://github.com/microsoft/vcpkg/pull/17347) [shaderwriter] Update to version 1.1.0 (by @DragonJoker) +- libbson `1.16.1#1` -> `1.16.1#2` + - [(#13126)](https://github.com/microsoft/vcpkg/pull/13126) [vcpkg_fixup_pkgconfig] Handle spaces in path, do not validate individual libraries (by @ras0219) +- pcl `1.11.1#1` -> `1.11.1#2` + - [(#9231)](https://github.com/microsoft/vcpkg/pull/9231) [pcl] Add gcc version check (by @NancyLi1013) + - [(#14960)](https://github.com/microsoft/vcpkg/pull/14960) [pcl] Fix build when librealsense2 is present (by @dweckmann) + - [(#17437)](https://github.com/microsoft/vcpkg/pull/17437) [pcl] Fix qhul cannot be found (by @NancyLi1013) +- boost-core `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- wtl `10.0.10077#0` -> `10.0.10320#0` + - [(#15266)](https://github.com/microsoft/vcpkg/pull/15266) [wtl] Update wtl to 10.0.10320 (by @chrullrich) +- fribidi `1.0.10#1` -> `1.0.10#2` + - [(#12945)](https://github.com/microsoft/vcpkg/pull/12945) [meson|scripts] update scripts (by @Neumann-A) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) +- xtl `0.6.18#0` -> `0.6.21#0` + - [(#14454)](https://github.com/microsoft/vcpkg/pull/14454) [xsimd][xtensor][xtl] Update to latest (by @SeekingMeaning) +- usockets `0.6.0#1` -> `0.6.0#1` + - [(#14935)](https://github.com/microsoft/vcpkg/pull/14935) [usockets] Fix build issue with feature ssl (by @PhoebeHui) + - [(#15743)](https://github.com/microsoft/vcpkg/pull/15743) [usockets] Update uSockets to the latest version (by @JonLiu1993) + - [(#16697)](https://github.com/microsoft/vcpkg/pull/16697) [uSockets] update to version 0.7.1 (by @Phantomouse) +- gdal `3.1.3#1` -> `3.1.3#14` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#13449)](https://github.com/microsoft/vcpkg/pull/13449) [gdal] Update to 3.1.3 (by @JackBoosY) + - [(#14866)](https://github.com/microsoft/vcpkg/pull/14866) [vcpkg baseline] [gdal] Fix build errors on linux and osx (by @PhoebeHui) + - [(#15292)](https://github.com/microsoft/vcpkg/pull/15292) [gdal] Update to 3.2.2 (by @longhuan2018) + - [(#15541)](https://github.com/microsoft/vcpkg/pull/15541) gdal:x64-windows-static-md fixes (by @ankurverma85) + - [(#16904)](https://github.com/microsoft/vcpkg/pull/16904) [vcpkg baseline][osgearth/gdal] Re-fix dependency gdal (by @JackBoosY) + - [(#17083)](https://github.com/microsoft/vcpkg/pull/17083) [vcpkg baseline][gdal] Fix configure error on OSX (by @JackBoosY) +- corrade `2020.06#0` -> `2020.06#0` + - [(#17356)](https://github.com/microsoft/vcpkg/pull/17356) [corrade] Fix VS2019 build error (by @NancyLi1013) +- mapbox-polylabel `#0` -> `#0` + - [(#16838)](https://github.com/microsoft/vcpkg/pull/16838) [mapbox-geometry,mapbox-polylabel,geojson-vt-cpp,geojson-cpp] new ports (by @mathisloge) +- boost-multi-index `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- azure-c-shared-utility `2020-07-19#0` -> `2020-12-09#1` + - [(#14750)](https://github.com/microsoft/vcpkg/pull/14750) [azure-kinect-sensor-sdk] not working on Linux (by @fran6co) + - [(#15109)](https://github.com/microsoft/vcpkg/pull/15109) Azure-IoT-Sdk for C release 2020-12-09 (by @ewertons) +- hypre `2.19.0#0` -> `2.19.0#0` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) +- exprtk `2020-09-14#0` -> `2021-01-01#0` + - [(#16458)](https://github.com/microsoft/vcpkg/pull/16458) [exprtk] Update ExprTk (by @ArashPartow) +- bfgroup-lyra `1.5#0` -> `1.5#0` + - [(#16172)](https://github.com/microsoft/vcpkg/pull/16172) [bfgroup-lyra] Install CMake Targets (by @Hoikas) +- boost-vcpkg-helpers `7#1` -> `7#2` + - [(#14517)](https://github.com/microsoft/vcpkg/pull/14517) [boost] Install usage file (by @PhoebeHui) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- qt5-webview `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- qt5-charts `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- boost-winapi `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- poissonrecon `2019-09-15#0` -> `2019-09-15#0` + - [(#17370)](https://github.com/microsoft/vcpkg/pull/17370) [PoissonRecon] new port (by @fran6co) +- boost-log `1.75.0#2` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- boost-utility `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- oatpp-sqlite `1.2.0#0` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- nng `1.3.2#0` -> `1.4.0#0` + - [(#16120)](https://github.com/microsoft/vcpkg/pull/16120) [nng] Update to v1.4.0 (by @jharmer95) +- tinygltf `2020-07-28#0` -> `2020-07-28#1` + - [(#17415)](https://github.com/microsoft/vcpkg/pull/17415) [tinygltf] fix json path (by @fran6co) +- azure-kinect-sensor-sdk `1.4.0-alpha.0#6` -> `1.4.1#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) + - [(#14750)](https://github.com/microsoft/vcpkg/pull/14750) [azure-kinect-sensor-sdk] not working on Linux (by @fran6co) + - [(#16548)](https://github.com/microsoft/vcpkg/pull/16548) [Azure-Kinect-Sensor-SDK] update to 1.41 (by @JonLiu1993) +- kf5syntaxhighlighting `5.64.0-1#0` -> `5.64.0-1#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- readosm `1.1.0#3` -> `1.1.0a#0` + - [(#15038)](https://github.com/microsoft/vcpkg/pull/15038) [readosm] Update to 1.1.0a (by @longhuan2018) +- x265 `3.4#1` -> `3.4#4` + - [(#13126)](https://github.com/microsoft/vcpkg/pull/13126) [vcpkg_fixup_pkgconfig] Handle spaces in path, do not validate individual libraries (by @ras0219) + - [(#14556)](https://github.com/microsoft/vcpkg/pull/14556) [many ports] mingw support (by @longnguyen2004) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) + - [(#17051)](https://github.com/microsoft/vcpkg/pull/17051) [x265] Allow release-only build. (by @matttyson) +- tensorflow-cc `2.3.1#1` -> `2.3.1#1` + - [(#13028)](https://github.com/microsoft/vcpkg/pull/13028) More or less completely rewritten tensorflow-cc port (by @jgehw) + - [(#14392)](https://github.com/microsoft/vcpkg/pull/14392) [tensorflow] Add C port (by @jgehw) + - [(#15354)](https://github.com/microsoft/vcpkg/pull/15354) [vcpkg] Fix unrecognized identifier errors in prbuild and cibuild. (by @BillyONeal) + - [(#16364)](https://github.com/microsoft/vcpkg/pull/16364) [tensorflow] upgrade to 2.4.1 (by @jgehw) +- qt5-doc `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- hunspell `1.7.0#2` -> `1.7.0#2` + - [(#14623)](https://github.com/microsoft/vcpkg/pull/14623) [hunspell] Avoid automatically added lib prefix (by @PhoebeHui) + - [(#17148)](https://github.com/microsoft/vcpkg/pull/17148) [hunspell] switch to make to enable build of hunspell tools (by @Neumann-A) +- geogram `1.7.5#2` -> `1.7.5#3` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) + - [(#14962)](https://github.com/microsoft/vcpkg/pull/14962) [geogram] Fix windows dynamic build usage (by @FabienPean) +- gmime `3.2.6#1` -> `3.2.6#1` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- qt5 `5.15.1#1` -> `5.15.1#2` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) + - [(#15170)](https://github.com/microsoft/vcpkg/pull/15170) [qt5-base] mysql plugin added (by @jepessen) + - [(#15597)](https://github.com/microsoft/vcpkg/pull/15597) [qt5] Remove dependency qt5 feature mysqlplugin when building x86 (by @JackBoosY) +- oatpp-websocket `1.2.0#1` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- chipmunk `7.0.3#0` -> `7.0.3#1` + - [(#14776)](https://github.com/microsoft/vcpkg/pull/14776) [Chipmunk] build via cmake (by @comedinha) +- libwebm `1.0.0.27-5#0` -> `1.0.0.27#6` + - [(#16398)](https://github.com/microsoft/vcpkg/pull/16398) [libwebm] apply upstream changes to support Android NDK r15b and later (by @jwtowner) +- scnlib `#0` -> `#0` + - [(#17242)](https://github.com/microsoft/vcpkg/pull/17242) [scnlib] Update the port of scnlib to 0.4 (by @QAston) +- sqlite3 `3.33.0#0` -> `3.33.0#0` + - [(#16125)](https://github.com/microsoft/vcpkg/pull/16125) [sqlite3] Update to 3.34.1 (by @past-due) + - [(#16679)](https://github.com/microsoft/vcpkg/pull/16679) [sqlite3] Update to 3.35.0 (by @kevinlul) + - [(#16834)](https://github.com/microsoft/vcpkg/pull/16834) [sqlite3] Update to 3.35.2 (by @past-due) + - [(#17067)](https://github.com/microsoft/vcpkg/pull/17067) [sqlite3] Update to 3.35.4 (by @past-due) +- grpc `1.33.1#1` -> `1.33.1#2` + - [(#14647)](https://github.com/microsoft/vcpkg/pull/14647) [abseil] Re-fix cxx 17 standard, add macro ABSL_USE_CXX17 (by @JackBoosY) + - [(#15307)](https://github.com/microsoft/vcpkg/pull/15307) [grpc] Build codegen on arm64-osx (by @lebdron) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) + - [(#17422)](https://github.com/microsoft/vcpkg/pull/17422) [grpc][upb] Update to newer versions (by @ras0219) + - [(#17496)](https://github.com/microsoft/vcpkg/pull/17496) [grpc] update to 1.37.0 (by @JonLiu1993) +- fltk `1.3.5#3` -> `1.3.5#0` + - [(#17094)](https://github.com/microsoft/vcpkg/pull/17094) [fltk] Fix link to system libs (by @JackBoosY) +- lapack-reference `3.8.0#3` -> `3.8.0#4` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) + - [(#14816)](https://github.com/microsoft/vcpkg/pull/14816) [lapack-reference] add to CMAKE_FIND_LIBRARY_SUFFIXES additional suffixes (by @xandox) +- cudnn `7.6.5#1` -> `7.6.5#4` + - [(#14686)](https://github.com/microsoft/vcpkg/pull/14686) [cudnn] Try to find CUDNN locally before downloading (by @jacobkahn) + - [(#14736)](https://github.com/microsoft/vcpkg/pull/14736) [cudnn] Don't copy debug versions of the lib since they aren't provided (by @jacobkahn) + - [(#16413)](https://github.com/microsoft/vcpkg/pull/16413) [cudnn] auto-download only if cuda version matches (by @cenit) + - [(#17331)](https://github.com/microsoft/vcpkg/pull/17331) Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (by @BillyONeal) + - [(#17346)](https://github.com/microsoft/vcpkg/pull/17346) [cudnn] add other locations to find lib already installed (by @cenit) +- boost-filesystem `1.75.0#1` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- boost-coroutine2 `1.74.0#2` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- qt-advanced-docking-system `3.6.3#0` -> `3.6.3#1` + - [(#14714)](https://github.com/microsoft/vcpkg/pull/14714) [vcpkg baseline][qt-advanced-docking-system] Update hash (by @NancyLi1013) +- graphicsmagick `1.3.35#3` -> `1.3.35#3` + - [(#15245)](https://github.com/microsoft/vcpkg/pull/15245) [graphicsmagick] Add delegates.mgk (by @NancyLi1013) + - [(#15600)](https://github.com/microsoft/vcpkg/pull/15600) [graphicsmagick] update to version 1.3.36 (by @josuegomes) +- redis-plus-plus `1.2.1#0` -> `1.2.1#1` + - [(#14762)](https://github.com/microsoft/vcpkg/pull/14762) [redis-plus-plus] Add c++17 feature (by @JonLiu1993) +- ogre `1.12.9#0` -> `1.12.9#0` + - [(#14554)](https://github.com/microsoft/vcpkg/pull/14554) [assimp] Fix cmake config name and add cmake version (by @PhoebeHui) + - [(#15194)](https://github.com/microsoft/vcpkg/pull/15194) [ogre] make zziplib, freeimage, assimp, freetype and less strict resource manager as feature (by @dweckmann) + - [(#15789)](https://github.com/microsoft/vcpkg/pull/15789) [ogre] Do not use strict mode by default in ogre for backward compatibility (by @traversaro) +- boost-any `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libpmemobj-cpp `1.11#0` -> `1.12#0` + - [(#16325)](https://github.com/microsoft/vcpkg/pull/16325) [libpmemobj-cpp] update to ver. 1.12 (by @JonLiu1993) +- aliyun-oss-c-sdk `3.10.0#0` -> `3.10.0#0` + - [(#14245)](https://github.com/microsoft/vcpkg/pull/14245) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 1 (by @JackBoosY) +- boost-graph `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- vtk `9.0.1#2` -> `9.0.1#6` + - [(#15334)](https://github.com/microsoft/vcpkg/pull/15334) [freetype] Update to 2.10.4 (by @kevinlul) + - [(#15667)](https://github.com/microsoft/vcpkg/pull/15667) [vtk] use patch for QT_NO_KEYWORDS support from upstream (by @dweckmann) + - [(#16779)](https://github.com/microsoft/vcpkg/pull/16779) [vtk] Add support for unicode path for VTK reader/writer (by @robbie-li) + - [(#17015)](https://github.com/microsoft/vcpkg/pull/17015) [vtk] enables openvr module when openvr is listed (by @veggiesaurus) +- opencv4 `4.3.0#4` -> `4.3.0#5` + - [(#12785)](https://github.com/microsoft/vcpkg/pull/12785) [OpenCV] fix compatibility with VTK9 (by @cenit) + - [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) + - [(#15162)](https://github.com/microsoft/vcpkg/pull/15162) [OpenCV] update to v4.5 and to v3.4.12 (by @cenit) + - [(#15788)](https://github.com/microsoft/vcpkg/pull/15788) [quirc, opencv4] Build fixes from 2021-01-18 build (by @BillyONeal) + - [(#15859)](https://github.com/microsoft/vcpkg/pull/15859) [OpenCV] bump to 4.5.1 and to 3.4.13 (by @cenit) + - [(#17354)](https://github.com/microsoft/vcpkg/pull/17354) [opencv4] Fix OPTIONS BUILD_opencv_gapi (by @NancyLi1013) +- implot `0.7#0` -> `0.8#0` + - [(#14380)](https://github.com/microsoft/vcpkg/pull/14380) [implot] Update to 0.8 (by @RT222) + - [(#16818)](https://github.com/microsoft/vcpkg/pull/16818) [implot] Update to 0.9 (by @RT222) +- boost-random `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- boost-build `1.75.0.beta1#1` -> `1.75.0#1` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15385)](https://github.com/microsoft/vcpkg/pull/15385) [boost-build] Fix cflags and c++flags for msvc (by @PhoebeHui) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16930)](https://github.com/microsoft/vcpkg/pull/16930) [boost-context] support android (by @huangqinjin) +- msix `1.7-2#0` -> `1.7-2#0` + - [(#16488)](https://github.com/microsoft/vcpkg/pull/16488) [msix] Add DISABLE_PARALLEL_CONFIGURE (by @NancyLi1013) +- boost-crc `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- mailio `#0` -> `#0` + - [(#16696)](https://github.com/microsoft/vcpkg/pull/16696) New port for mailio. (by @karastojko) + - [(#16789)](https://github.com/microsoft/vcpkg/pull/16789) [mailio] does not support uwp (by @autoantwort) +- mbedtls `2.24.0#1` -> `2.24.0#2` + - [(#15680)](https://github.com/microsoft/vcpkg/pull/15680) Fix Mbed TLS build for Android (by @ahmedyarub) + - [(#15687)](https://github.com/microsoft/vcpkg/pull/15687) [libssh] Add support for Android (by @ahmedyarub) +- openmama `6.3.1#0` -> `6.3.1#0` + - [(#16725)](https://github.com/microsoft/vcpkg/pull/16725) [openmama] Modify the output path of the common header file (by @Cheney-W) +- curl `7.74.0#1` -> `7.74.0#4` + - [(#14350)](https://github.com/microsoft/vcpkg/pull/14350) [curl] Fixes pkgconfig configuration file (by @Matioupi) + - [(#14473)](https://github.com/microsoft/vcpkg/pull/14473) [curl] Enable feature tool and install curl-config on non-Windows (by @JackBoosY) + - [(#14715)](https://github.com/microsoft/vcpkg/pull/14715) [curl] Fixes pkgconfig file (by @Matioupi) + - [(#14807)](https://github.com/microsoft/vcpkg/pull/14807) [curl] Add feature idn2 (by @JackBoosY) + - [(#15041)](https://github.com/microsoft/vcpkg/pull/15041) [curl] Update to 7.74.0 (by @nokutu) + - [(#15491)](https://github.com/microsoft/vcpkg/pull/15491) [vcpkg baseline][poppler] Fix issue with using libcurl. (by @Hoikas) + - [(#15725)](https://github.com/microsoft/vcpkg/pull/15725) [aws-cpp-sdk] [zlib] [openssl] [curl] Fix zlib, OpenSSL, curl and AWS SDK for Android (by @ahmedyarub) + - [(#15941)](https://github.com/microsoft/vcpkg/pull/15941) [curl] Fix/android curl debug bin (by @venabled) +- boost-algorithm `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- oatpp-libressl `1.2.0#1` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- hidapi `0.10.1#0` -> `0.10.1#0` + - [(#15437)](https://github.com/microsoft/vcpkg/pull/15437) [hidapi] Support static build (by @PhoebeHui) + - [(#15485)](https://github.com/microsoft/vcpkg/pull/15485) Update to hidapi-0.10.1 (by @JoergAtGithub) + - [(#17231)](https://github.com/microsoft/vcpkg/pull/17231) [hidapi] Add support linux and osx (by @NancyLi1013) +- gtkmm `3.22.2#4` -> `3.22.2#5` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- shaderc `2019-06-26-1#0` -> `2019-06-26#2` + - [(#16137)](https://github.com/microsoft/vcpkg/pull/16137) [shaderc] Use build type to build targets (by @JackBoosY) +- nsync `#0` -> `#0` + - [(#15714)](https://github.com/microsoft/vcpkg/pull/15714) [nsync] create a new port (by @luncliff) +- fast-cpp-csv-parser `2019-08-14#0` -> `2021-01-03#0` + - [(#15943)](https://github.com/microsoft/vcpkg/pull/15943) [fast-cpp-csv-parser ] Update to the latest commit: Fixes compiler warnings (by @remz1337) +- oatpp-curl `1.2.0#1` -> `1.2.0#2` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) + - [(#14385)](https://github.com/microsoft/vcpkg/pull/14385) [oatpp-curl] Fix curl dependency cannot be found (by @NancyLi1013) +- functions-framework-cpp `0.3.0#0` -> `0.3.0#0` + - [(#15989)](https://github.com/microsoft/vcpkg/pull/15989) [functions-framework-cpp] add new port with version 0.3.0 (by @coryan) + - [(#16163)](https://github.com/microsoft/vcpkg/pull/16163) [functions-framework-cpp] populate license field (by @coryan) + - [(#16178)](https://github.com/microsoft/vcpkg/pull/16178) [functions-framework-cpp] use 'version' for version numbers (by @coryan) + - [(#16307)](https://github.com/microsoft/vcpkg/pull/16307) [functions-framework-cpp] update to latest release (v0.4.0) (by @coryan) + - [(#16447)](https://github.com/microsoft/vcpkg/pull/16447) [functions-framework-cpp] update to latest release (v0.5.0) (by @coryan) +- suitesparse `5.8.0#0` -> `5.8.0#0` + - [(#15802)](https://github.com/microsoft/vcpkg/pull/15802) [ceres] Mark all dependencies REQUIRED (by @ras0219) +- ttauri `#0` -> `#0` + - [(#16749)](https://github.com/microsoft/vcpkg/pull/16749) [ttauri] Add new port (by @takev) +- cppgraphqlgen `2020-12-07#1` -> `2020-12-07#1` + - [(#14416)](https://github.com/microsoft/vcpkg/pull/14416) [cppgraphqlgen] Update to v3.2.4 (by @wravery) + - [(#14842)](https://github.com/microsoft/vcpkg/pull/14842) [cppgraphqlgen] Update to v3.3.0 (by @wravery) + - [(#15549)](https://github.com/microsoft/vcpkg/pull/15549) [cppgraphqlgen] Fix --head for new branch/option (by @wravery) + - [(#15701)](https://github.com/microsoft/vcpkg/pull/15701) [cppgraphqlgen] Update to 3.5.0 release (by @wravery) +- flatbuffers `1.12.0#1` -> `1.12.0#2` + - [(#15717)](https://github.com/microsoft/vcpkg/pull/15717) [mnn,flatbuffers] add a new port and patch (by @luncliff) + - [(#16843)](https://github.com/microsoft/vcpkg/pull/16843) [flatbuffers] support iOS triplets (by @luncliff) +- libass `0.14.0#0` -> `0.15.0#0` + - [(#14843)](https://github.com/microsoft/vcpkg/pull/14843) [vcpkg baseline] [libass] Fix dependency issue in Linux (by @PhoebeHui) + - [(#15213)](https://github.com/microsoft/vcpkg/pull/15213) [libass] Update to 0.15.0 (by @wangqr) + - [(#15263)](https://github.com/microsoft/vcpkg/pull/15263) [libass] update to 0.15.0 (by @JonLiu1993) +- ignition-msgs1 `1.0.0#2` -> `1.0.0#3` + - [(#14730)](https://github.com/microsoft/vcpkg/pull/14730) [ignition-msgs*] Fix flaky CI tests for ignition-msgs* ports (take 2) (by @traversaro) +- boost-stacktrace `1.75.0#1` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- jsoncons `0.158.0#0` -> `0.159.0#0` + - [(#14752)](https://github.com/microsoft/vcpkg/pull/14752) [jsoncons] Update to version 0.159.0 (by @danielaparker) + - [(#16227)](https://github.com/microsoft/vcpkg/pull/16227) [jsoncons] Update to version 0.162.0 (by @danielaparker) + - [(#16334)](https://github.com/microsoft/vcpkg/pull/16334) [jsoncons] Update to 0.162.1 (by @danielaparker) + - [(#16820)](https://github.com/microsoft/vcpkg/pull/16820) [jsoncons] Update to v0.163.0 (by @danielaparker) + - [(#17126)](https://github.com/microsoft/vcpkg/pull/17126) [jsoncons] Update to 0.163.1 (by @danielaparker) + - [(#17466)](https://github.com/microsoft/vcpkg/pull/17466) [jsoncons] Update to version 0.163.3 (by @danielaparker) +- boost-io `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- mnn `1.1.0#0` -> `1.1.0#0` + - [(#15717)](https://github.com/microsoft/vcpkg/pull/15717) [mnn,flatbuffers] add a new port and patch (by @luncliff) +- spdlog `1.8.0#1` -> `1.8.0#3` + - [(#16089)](https://github.com/microsoft/vcpkg/pull/16089) [spdlog] Support build shared library (by @JonLiu1993) + - [(#16819)](https://github.com/microsoft/vcpkg/pull/16819) [spdlog] Fix build for Android (by @ahmedyarub) + - [(#16870)](https://github.com/microsoft/vcpkg/pull/16870) [spdlog] Update to 1.8.5 (by @Ryan-rsm-McKenzie) + - [(#17152)](https://github.com/microsoft/vcpkg/pull/17152) [spdlog] Use external fmt header (by @NancyLi1013) + - [(#17511)](https://github.com/microsoft/vcpkg/pull/17511) [spdlog] Fix mingW build (by @JackBoosY) +- openssl `1.1.1j#1` -> `1.1.1j#5` + - [(#14308)](https://github.com/microsoft/vcpkg/pull/14308) [OpenSSL] refactor openssl ports. (by @Neumann-A) + - [(#14460)](https://github.com/microsoft/vcpkg/pull/14460) [szip, openssl] Fix problems with mingw (by @longnguyen2004) + - [(#14785)](https://github.com/microsoft/vcpkg/pull/14785) [openssl] Handle INSTALL_NAME_DIR and OSX_DEPLOYMENT_TARGET for macOS shared builds (by @LRFLEW) + - [(#15062)](https://github.com/microsoft/vcpkg/pull/15062) [openssl] Remove extra slashes when installing usage (by @JackBoosY) + - [(#15191)](https://github.com/microsoft/vcpkg/pull/15191) [openssl] install pkgconfig file (by @Perlmint) + - [(#15298)](https://github.com/microsoft/vcpkg/pull/15298) [openssl] Update to 1.1.1i (by @lebdron) + - [(#15725)](https://github.com/microsoft/vcpkg/pull/15725) [aws-cpp-sdk] [zlib] [openssl] [curl] Fix zlib, OpenSSL, curl and AWS SDK for Android (by @ahmedyarub) + - [(#16525)](https://github.com/microsoft/vcpkg/pull/16525) [openssl] update to 1.1.1j (by @metsma) + - [(#16937)](https://github.com/microsoft/vcpkg/pull/16937) [OpenSSL] Update to 1.1.1k (by @metsma) + - [(#17373)](https://github.com/microsoft/vcpkg/pull/17373) [openssl/unix] Run `make` with 'VCPKG_CONCURRENCY' parallelism (by @mschofie) +- sdl2-mixer `2.0.4#10` -> `2.0.4#0` + - [(#16737)](https://github.com/microsoft/vcpkg/pull/16737) [sdl2-mixer] Fix features link error (by @NancyLi1013) +- fp16 `#0` -> `#0` + - [(#16340)](https://github.com/microsoft/vcpkg/pull/16340) [fp16] create a new port (by @luncliff) +- mozjpeg `2020-06-02-1#0` -> `2020-06-02#2` + - [(#15196)](https://github.com/microsoft/vcpkg/pull/15196) [libjpeg-turbo/mozjpeg] Add conflict messages (by @NancyLi1013) +- argtable2 `8#0` -> `8#0` + - [(#14245)](https://github.com/microsoft/vcpkg/pull/14245) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 1 (by @JackBoosY) +- breakpad `2020-09-14#1` -> `2020-09-14#2` + - [(#15092)](https://github.com/microsoft/vcpkg/pull/15092) [breakpad] Support breakpad_client on Linux & macOS (by @Perlmint) + - [(#16401)](https://github.com/microsoft/vcpkg/pull/16401) [breakpad] add support for Android triplets (by @jwtowner) +- zstr `1.0.1#0` -> `1.0.4#0` + - [(#14452)](https://github.com/microsoft/vcpkg/pull/14452) [zstr] update to 1.0.4 (by @SeekingMeaning) +- qt5-location `5.15.1#1` -> `5.15.1#2` + - [(#14644)](https://github.com/microsoft/vcpkg/pull/14644) [vcpkg baseline][qt5-location] Update patch (by @NancyLi1013) + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- physx `4.1.1#5` -> `4.1.1#7` + - [(#13849)](https://github.com/microsoft/vcpkg/pull/13849) [physx] Add support for Linux, macOS, and UWP (by @Hoikas) + - [(#15934)](https://github.com/microsoft/vcpkg/pull/15934) [physx] Use /Z7 instead of /Zi to integrate the debug info when building static (by @JackBoosY) + - [(#17453)](https://github.com/microsoft/vcpkg/pull/17453) [physx] Update to 4.1.2 (by @Hoikas) +- magnum `2020.06#1` -> `2020.06#5` + - [(#11225)](https://github.com/microsoft/vcpkg/pull/11225) [magnum] fixes adding any feature that depends on any other feature it will enable all the defaults (by @fran6co) + - [(#14383)](https://github.com/microsoft/vcpkg/pull/14383) [magnum] Removing quotes around tools list where vcpkg_copy_tools is involked (by @PhoebeHui) + - [(#15163)](https://github.com/microsoft/vcpkg/pull/15163) [magnum,magnum-plugins] Add vulkan and shaderconverter features (by @Squareys) + - [(#16245)](https://github.com/microsoft/vcpkg/pull/16245) [magnum,-plugins] Fix deployment of plugin types and incorrect removal of plugin lib dir on unix (by @Squareys) + - [(#17016)](https://github.com/microsoft/vcpkg/pull/17016) [magnum,-plugins] Fix deprecated use of vcpkg_check_features (by @Squareys) +- glslang `2019-03-05#2` -> `2019-03-05#2` + - [(#15624)](https://github.com/microsoft/vcpkg/pull/15624) [glslang] Provide glslang-default-resource-limits library. (by @wolfpld) + - [(#16037)](https://github.com/microsoft/vcpkg/pull/16037) [glslang] support iOS triplets (by @luncliff) +- kf5guiaddons `5.64.0#0` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- directxtk12 `jan2021#1` -> `apr2021#0` + - [(#14539)](https://github.com/microsoft/vcpkg/pull/14539) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version (by @RT222) + - [(#15210)](https://github.com/microsoft/vcpkg/pull/15210) Updated directxtk et al for cmake package support (by @walbourn) + - [(#15554)](https://github.com/microsoft/vcpkg/pull/15554) directxmesh, directxtex, and uvatlas now support linux (by @walbourn) + - [(#15639)](https://github.com/microsoft/vcpkg/pull/15639) directxtex, directxmesh, directxtk, uvatlas ports updated to fix cach??? (by @walbourn) + - [(#17123)](https://github.com/microsoft/vcpkg/pull/17123) [directxtex,directxmesh, directxtk, directxtk12, uvatlas] updated for April 2021 releases (by @walbourn) +- rhash `1.3.9#0` -> `1.4.0#0` + - [(#13658)](https://github.com/microsoft/vcpkg/pull/13658) [rhash] Update to the latest version (by @LilyWangL) +- forge `1.0.5#0` -> `1.0.5#0` + - [(#17404)](https://github.com/microsoft/vcpkg/pull/17404) [forge] Fix usage (by @JackBoosY) +- kf5crash `5.64.0#0` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- taskflow `2.6.0#0` -> `2.7.0#0` + - [(#15057)](https://github.com/microsoft/vcpkg/pull/15057) [taskflow] update port to v2.7.0 (by @remz1337) + - [(#15894)](https://github.com/microsoft/vcpkg/pull/15894) [taskflow] update to 3.0.0 (by @mfornace) + - [(#17407)](https://github.com/microsoft/vcpkg/pull/17407) [taskflow] update to 3.1.0 (by @JonLiu1993) +- pegtl `2020-12-07#0` -> `2020-12-07#0` + - [(#14841)](https://github.com/microsoft/vcpkg/pull/14841) [pegtl] Update to 3.0.0 release (by @wravery) + - [(#15186)](https://github.com/microsoft/vcpkg/pull/15186) [pegtl] Update to release version 3.1.0 (by @wravery) + - [(#15700)](https://github.com/microsoft/vcpkg/pull/15700) [pegtl] Update to 3.2.0 release (by @wravery) +- aubio `0.4.9#3` -> `0.4.9#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) + - [(#16051)](https://github.com/microsoft/vcpkg/pull/16051) [aubio] allow to build without dependencies (by @autoantwort) +- munit `2019-04-06#0` -> `2019-04-06#1` + - [(#12945)](https://github.com/microsoft/vcpkg/pull/12945) [meson|scripts] update scripts (by @Neumann-A) +- rtaudio `5.1.0#0` -> `5.1.0#0` + - [(#14774)](https://github.com/microsoft/vcpkg/pull/14774) [rtaudio] Add new port (by @chausner) + - [(#16208)](https://github.com/microsoft/vcpkg/pull/16208) [rtaudio] Fix mingw, switch to rolling release (by @autoantwort) +- kf5coreaddons `5.64.0#0` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- libmodplug `0.8.9.0#6` -> `0.8.9.0#7` + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) +- libogg `1.3.4#2` -> `1.3.4#3` + - [(#14556)](https://github.com/microsoft/vcpkg/pull/14556) [many ports] mingw support (by @longnguyen2004) +- urho3d `#0` -> `#0` + - [(#14538)](https://github.com/microsoft/vcpkg/pull/14538) [urho3d] Add new port (by @koprok) +- wxchartdir `1.0.0#0` -> `1.0.0#0` + - [(#13361)](https://github.com/microsoft/vcpkg/pull/13361) [wxwidgets] Fix #4756 (by @ras0219) +- c-ares `1.17.1#0` -> `1.17.1#0` + - [(#14863)](https://github.com/microsoft/vcpkg/pull/14863) [c-ares] Update to 1.17.1. (by @geraldcombs) + - [(#17230)](https://github.com/microsoft/vcpkg/pull/17230) [c-ares] Fix definition on static build, add options to disable tools and tests (by @JackBoosY) +- libidn2 `2.2.0#0` -> `2.3.0#1` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#14540)](https://github.com/microsoft/vcpkg/pull/14540) [libidn2] Update to version 2.3.0 (by @lazyhamster) + - [(#15868)](https://github.com/microsoft/vcpkg/pull/15868) [libidn2] Fix cross-compile (non-Windows) (by @past-due) + - [(#17419)](https://github.com/microsoft/vcpkg/pull/17419) [Libidn2] disable documentation (by @xandox) +- qt5-x11extras `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- reproc `14.1.0#0` -> `14.2.1#0` + - [(#15751)](https://github.com/microsoft/vcpkg/pull/15751) [reproc] update to 14.2.1 (by @JonLiu1993) +- boost-interval `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- qt5-quickcontrols2 `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- otl `4.0.455#0` -> `4.0.455#1` + - [(#16289)](https://github.com/microsoft/vcpkg/pull/16289) [vcpkg baseline][ktx/otl] Update download hash (by @JackBoosY) +- ixwebsocket `11.0.4#0` -> `11.0.4#0` + - [(#15394)](https://github.com/microsoft/vcpkg/pull/15394) [IXWebsocket ] Upgraded to 11.0.4 version (by @ludekvodicka) + - [(#16710)](https://github.com/microsoft/vcpkg/pull/16710) [ixwebsocket] Fix cmake-configure files install path (by @NancyLi1013) + - [(#16856)](https://github.com/microsoft/vcpkg/pull/16856) [ixwebsocket] update to 11.2.3 (by @bsergean) +- boost-compute `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- comms `3.1.3#0` -> `3.1.3#0` + - [(#14195)](https://github.com/microsoft/vcpkg/pull/14195) [comms] Add new ports (by @mathisloge) + - [(#14521)](https://github.com/microsoft/vcpkg/pull/14521) [comms ] update to the next version (by @mathisloge) + - [(#15138)](https://github.com/microsoft/vcpkg/pull/15138) [comms] update comms libs to latest version (by @mathisloge) + - [(#15159)](https://github.com/microsoft/vcpkg/pull/15159) [comms] fixes debug build configuration (by @mathisloge) + - [(#16415)](https://github.com/microsoft/vcpkg/pull/16415) [comms, commsdsl] update ports (by @mathisloge) + - [(#17581)](https://github.com/microsoft/vcpkg/pull/17581) [comms,commsdsl] update ports (by @mathisloge) +- glib `2.52.3#23` -> `2.52.3#27` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14988)](https://github.com/microsoft/vcpkg/pull/14988) [GLIBMM] Installing .pc file (by @faserg1) + - [(#15360)](https://github.com/microsoft/vcpkg/pull/15360) [glib] Fix pkgconfig files (by @PhoebeHui) + - [(#17117)](https://github.com/microsoft/vcpkg/pull/17117) [glib] fix build error for x64-linux-dynamic (by @kwiechen) + - [(#17197)](https://github.com/microsoft/vcpkg/pull/17197) sync GLIB_DLL_SUFFIX with pkgconfig (by @kwiechen) +- dxut `11.14#0` -> `11.14#0` + - [(#15788)](https://github.com/microsoft/vcpkg/pull/15788) [quirc, opencv4] Build fixes from 2021-01-18 build (by @BillyONeal) + - [(#16101)](https://github.com/microsoft/vcpkg/pull/16101) Update DXUT port and add Effects11 (FX) port (by @walbourn) +- boost-iostreams `1.75.0#1` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- directxtex `jan2021#2` -> `apr2021#0` + - [(#14539)](https://github.com/microsoft/vcpkg/pull/14539) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version (by @RT222) + - [(#15210)](https://github.com/microsoft/vcpkg/pull/15210) Updated directxtk et al for cmake package support (by @walbourn) + - [(#15554)](https://github.com/microsoft/vcpkg/pull/15554) directxmesh, directxtex, and uvatlas now support linux (by @walbourn) + - [(#15639)](https://github.com/microsoft/vcpkg/pull/15639) directxtex, directxmesh, directxtk, uvatlas ports updated to fix cach??? (by @walbourn) + - [(#17123)](https://github.com/microsoft/vcpkg/pull/17123) [directxtex,directxmesh, directxtk, directxtk12, uvatlas] updated for April 2021 releases (by @walbourn) +- opencv3 `3.4.10#2` -> `3.4.10#5` + - [(#12785)](https://github.com/microsoft/vcpkg/pull/12785) [OpenCV] fix compatibility with VTK9 (by @cenit) + - [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) + - [(#15162)](https://github.com/microsoft/vcpkg/pull/15162) [OpenCV] update to v4.5 and to v3.4.12 (by @cenit) + - [(#15788)](https://github.com/microsoft/vcpkg/pull/15788) [quirc, opencv4] Build fixes from 2021-01-18 build (by @BillyONeal) + - [(#15859)](https://github.com/microsoft/vcpkg/pull/15859) [OpenCV] bump to 4.5.1 and to 3.4.13 (by @cenit) +- libusb `1.0.24#3` -> `3#0` + - [(#15692)](https://github.com/microsoft/vcpkg/pull/15692) update libusb to 1.0.24 (by @matwey) + - [(#16839)](https://github.com/microsoft/vcpkg/pull/16839) [libusb] Fix the support for Visual Studio 2019 (by @NancyLi1013) +- sundials `3.1.1-2#0` -> `5.5.0#0` + - [(#14618)](https://github.com/microsoft/vcpkg/pull/14618) [SUNDIALS] Update to 5.5.0 (by @JonLiu1993) + - [(#16705)](https://github.com/microsoft/vcpkg/pull/16705) [sundials] Update to 5.7.0 and also update repository (by @NancyLi1013) +- fmt `0#0` -> `0#0` + - [(#14372)](https://github.com/microsoft/vcpkg/pull/14372) [fmt] update to 7.1.1 (by @bl-ue) + - [(#14413)](https://github.com/microsoft/vcpkg/pull/14413) [fmt] update to 7.1.2 (by @bl-ue) + - [(#14786)](https://github.com/microsoft/vcpkg/pull/14786) [fmt] Update to 7.1.3 (by @kevinlul) + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16766)](https://github.com/microsoft/vcpkg/pull/16766) [fmt] Fix build error when building arm64-uwp (by @JackBoosY) + - [(#16774)](https://github.com/microsoft/vcpkg/pull/16774) [ci,vcpkg-cmake-*] remove host-only nature of vcpkg-cmake-* ports (by @strega-nil) + - [(#17279)](https://github.com/microsoft/vcpkg/pull/17279) [fmt] Update usage (by @NancyLi1013) +- simage `1.8.0#0` -> `1.8.0#1` + - [(#15683)](https://github.com/microsoft/vcpkg/pull/15683) [simage] Fix optional dependencies (by @ras0219-msft) +- libqcow `20200928#0` -> `20210419#0` + - [(#17525)](https://github.com/microsoft/vcpkg/pull/17525) [libqcow] Fix build issues by updating to 20210419 (by @AlexAltea) +- boost-thread `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- atk `2.24.0-5#1` -> `2.24.0-5#2` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) + - [(#14972)](https://github.com/microsoft/vcpkg/pull/14972) [ATK] Installing .pc files (by @faserg1) + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- avisynthplus `3.6.0#0` -> `3.6.1#0` + - [(#15214)](https://github.com/microsoft/vcpkg/pull/15214) [avisynthplus] Update to 3.6.1 (by @wangqr) + - [(#17221)](https://github.com/microsoft/vcpkg/pull/17221) [avisynthplus] Update to 3.7.0 (by @wangqr) +- krabsetw `4.1.13#0` -> `4.1.14#0` + - [(#14443)](https://github.com/microsoft/vcpkg/pull/14443) [krabsetw] Update to 4.1.14 (by @jrave) + - [(#16576)](https://github.com/microsoft/vcpkg/pull/16576) [krabsetw] Update krabsetw to 4.1.18 (by @jrave) +- xalan-c `1.11-12#0` -> `1.11-12#0` + - [(#17256)](https://github.com/microsoft/vcpkg/pull/17256) [Xalan-C] update to 1.12 (by @JonLiu1993) +- boost-spirit `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-circular-buffer `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- igraph `#0` -> `#0` + - [(#17311)](https://github.com/microsoft/vcpkg/pull/17311) [igraph] create new port (by @szhorvat) +- flashlight-cuda `20201201#0` -> `20201201#0` + - [(#14676)](https://github.com/microsoft/vcpkg/pull/14676) [flashlight-cuda] New Port (by @jacobkahn) + - [(#14912)](https://github.com/microsoft/vcpkg/pull/14912) [flashlight-cuda] Add stb as dependency, bump port commit (by @jacobkahn) + - [(#15379)](https://github.com/microsoft/vcpkg/pull/15379) [flashlight-cuda] Update port (by @jacobkahn) + - [(#15514)](https://github.com/microsoft/vcpkg/pull/15514) [flashlight-cpu] New port (by @jacobkahn) + - [(#17378)](https://github.com/microsoft/vcpkg/pull/17378) [flashlight-cuda] update port to v0.3 (by @jacobkahn) +- boost-fusion `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-nowide `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- vcpkg-cmake-config `#0` -> `#0` + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16774)](https://github.com/microsoft/vcpkg/pull/16774) [ci,vcpkg-cmake-*] remove host-only nature of vcpkg-cmake-* ports (by @strega-nil) +- boost-conversion `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- paho-mqtt `1.3.1#0` -> `1.3.5#0` + - [(#13680)](https://github.com/microsoft/vcpkg/pull/13680) [paho-mqtt] Update to version 1.3.5 (by @LilyWangL) + - [(#15569)](https://github.com/microsoft/vcpkg/pull/15569) [paho-mqtt] update to 1.3.8 (by @JonLiu1993) +- boost-detail `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- xorstr `2020-02-11#0` -> `2020-02-11#0` + - [(#15721)](https://github.com/microsoft/vcpkg/pull/15721) [xorstr] Update to 2020-11-29 (by @ghost) +- benchmark `1.5.2#0` -> `1.5.2#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) +- cwalk `1.2.5#0` -> `1.2.5#0` + - [(#14801)](https://github.com/microsoft/vcpkg/pull/14801) [cwalk] Add new port (by @likle) +- mpfr `4.0.2-2#0` -> `4.1.0#0` + - [(#13081)](https://github.com/microsoft/vcpkg/pull/13081) [mpc/mpfr] Add new port / update mpfr (by @Neumann-A) +- xlnt `1.5.0#0` -> `1.5.0#1` + - [(#15645)](https://github.com/microsoft/vcpkg/pull/15645) [xlnt] Prevent macro redefinition (by @malirod) +- glfw3 `3.3.2#1` -> `3.3.2#1` + - [(#16166)](https://github.com/microsoft/vcpkg/pull/16166) [glfw3/glew] Fix pkgconfig (by @JackBoosY) + - [(#16892)](https://github.com/microsoft/vcpkg/pull/16892) [glfw3] Update to version 3.3.3 (by @barcharcraz) +- urdfdom-headers `1.0.5#0` -> `1.0.5#1` + - [(#14324)](https://github.com/microsoft/vcpkg/pull/14324) [ignition] Updates on various pkgs ???? (by @ahoarau) +- libftdi1 `1.4-1#0` -> `1.4-1#0` + - [(#15918)](https://github.com/microsoft/vcpkg/pull/15918) [libftdi1] update to 1.5 (#15917) (by @eloc3147) +- woff2 `1.0.2#0` -> `1.0.2#1` + - [(#16392)](https://github.com/microsoft/vcpkg/pull/16392) [woff2] fix for static linking and alternative compiler toolchains (by @jwtowner) +- openjpeg `2.3.1#2` -> `2.3.1#0` + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) + - [(#16661)](https://github.com/microsoft/vcpkg/pull/16661) [openjpeg] 16645 Fix compile w/features jp3d,jpip,jpwl,mj2 triplet x64-windows VS 2019 ver 16.9.1 (by @StarGate-One) +- pangolin `0.5#11` -> `0.5#12` + - [(#15593)](https://github.com/microsoft/vcpkg/pull/15593) [pangolin] Fix static build error (by @NancyLi1013) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) + - [(#17014)](https://github.com/microsoft/vcpkg/pull/17014) [vcpkg baseline][pangolin] Add options to dependencies to avoid finding them automatically (by @JackBoosY) + - [(#17250)](https://github.com/microsoft/vcpkg/pull/17250) [vcpkg baseline][pangolin] Set CMAKE_DISABLE_FIND_PACKAGE_XX to ON (by @PhoebeHui) +- soil `2008.07.07-2#0` -> `2008.07.07-2#0` + - [(#17012)](https://github.com/microsoft/vcpkg/pull/17012) [soil] Update repository (by @NancyLi1013) +- boost-dynamic-bitset `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libplist `1.3.6#0` -> `1.3.6#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- boost-qvm `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- bcg729 `1.1.1#0` -> `1.1.1#0` + - [(#15322)](https://github.com/microsoft/vcpkg/pull/15322) [bcg729] New port (by @geraldcombs) +- monkeys-audio `5.48#0` -> `5.59#0` + - [(#14586)](https://github.com/microsoft/vcpkg/pull/14586) [vcpkg baseline][monkeys-audio] Update to 5.59 (by @NancyLi1013) + - [(#14913)](https://github.com/microsoft/vcpkg/pull/14913) [vcpkg baseline][monkeys-audio] Update to 565d. (by @Hoikas) + - [(#15359)](https://github.com/microsoft/vcpkg/pull/15359) [monkeys-audio] Update to 5.70 (by @c72578) +- sobjectizer `5.7.1#0` -> `5.7.2#0` + - [(#14844)](https://github.com/microsoft/vcpkg/pull/14844) [sobjectizer] update to v.5.7.2 (by @eao197) + - [(#15182)](https://github.com/microsoft/vcpkg/pull/15182) [sobjectizer] update to v.5.7.2.1 (by @eao197) + - [(#16230)](https://github.com/microsoft/vcpkg/pull/16230) [sobjectizer] update to v.5.7.2.2 (by @eao197) + - [(#16470)](https://github.com/microsoft/vcpkg/pull/16470) [sobjectizer] update to v5.7.2.3 (by @eao197) +- boost-multi-array `1.74.0#1` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- onednn `2.0#0` -> `2.0#0` + - [(#15068)](https://github.com/microsoft/vcpkg/pull/15068) [oneDNN] New port (by @jacobkahn) + - [(#15372)](https://github.com/microsoft/vcpkg/pull/15372) [onednn] Fix share path infix to match find_package() name (by @jacobkahn) +- ktx `4.0.0-beta5#0` -> `4.0.0-beta5#0` + - [(#15336)](https://github.com/microsoft/vcpkg/pull/15336) [KTX] Add port (by @stephenjust) + - [(#16289)](https://github.com/microsoft/vcpkg/pull/16289) [vcpkg baseline][ktx/otl] Update download hash (by @JackBoosY) +- magnum-plugins `2020.06#1` -> `2020.06#5` + - [(#15163)](https://github.com/microsoft/vcpkg/pull/15163) [magnum,magnum-plugins] Add vulkan and shaderconverter features (by @Squareys) + - [(#16245)](https://github.com/microsoft/vcpkg/pull/16245) [magnum,-plugins] Fix deployment of plugin types and incorrect removal of plugin lib dir on unix (by @Squareys) + - [(#16657)](https://github.com/microsoft/vcpkg/pull/16657) [magnum/magnum-plugins] fix magnum-plugins building all magnum dependencies (by @fran6co) + - [(#17016)](https://github.com/microsoft/vcpkg/pull/17016) [magnum,-plugins] Fix deprecated use of vcpkg_check_features (by @Squareys) +- kf5itemmodels `5.64.0#0` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- parmetis `4.0.3-3#0` -> `4.0.3#4` + - [(#17410)](https://github.com/microsoft/vcpkg/pull/17410) [parmetis] Fix build on x64-linux. (by @grospelliergilles) +- string-theory `3.3#0` -> `3.4#0` + - [(#14439)](https://github.com/microsoft/vcpkg/pull/14439) [string-theory] Update to 3.4 (by @zrax) +- wt `4.4.0#0` -> `4.5.0#0` + - [(#15136)](https://github.com/microsoft/vcpkg/pull/15136) [wt] Update to 4.5.0 (by @RockinRoel) +- kf5widgetsaddons `5.64.0#0` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- matroska `1.6.2#0` -> `1.6.2#0` + - [(#14794)](https://github.com/microsoft/vcpkg/pull/14794) [ebml/gppanel/matroska/polyhook2/unrar] Fix typos in CONTROL files (by @NancyLi1013) +- libbacktrace `#0` -> `#0` + - [(#16693)](https://github.com/microsoft/vcpkg/pull/16693) [libbacktrace] new port (by @autoantwort) +- boost-ublas `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- seal `3.5.9#0` -> `3.6.0#0` + - [(#14576)](https://github.com/microsoft/vcpkg/pull/14576) [seal] Update to version 3.6.0. Changed default features. (by @WeiDaiWD) + - [(#15015)](https://github.com/microsoft/vcpkg/pull/15015) [seal] Update to SEAL 3.6.1 (by @kiromaru) + - [(#16379)](https://github.com/microsoft/vcpkg/pull/16379) [seal] Updated SEAL version to 3.6.2. (by @WeiDaiWD) +- gts `0.7.6-3#0` -> `0.7.6-3#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- boost-math `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- pybind11 `2.6.0#1` -> `2.6.0#3` + - [(#14510)](https://github.com/microsoft/vcpkg/pull/14510) [python3] Upgrade to 3.9.0 (by @Hoikas) + - [(#15221)](https://github.com/microsoft/vcpkg/pull/15221) [python3] Add vcpkg-cmake-wrapper. (by @Hoikas) + - [(#15507)](https://github.com/microsoft/vcpkg/pull/15507) [pybind11] Use vcpkg Python3. (by @Hoikas) +- ignition-cmake2 `2.2.0-1#0` -> `2.5.0#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14324)](https://github.com/microsoft/vcpkg/pull/14324) [ignition] Updates on various pkgs ???? (by @ahoarau) +- marble `19.08.2#0` -> `19.08.2#0` + - [(#17341)](https://github.com/microsoft/vcpkg/pull/17341) [vcpkg baseline][marble] Disable find I18n (by @JackBoosY) + - [(#17492)](https://github.com/microsoft/vcpkg/pull/17492) [vcpkg baseline][marble] Disable dependency KF5 (by @JackBoosY) +- libtasn1 `#0` -> `#0` + - [(#14242)](https://github.com/microsoft/vcpkg/pull/14242) [many ports] Add GnuTLS and its dependencies (by @wrobelda) + - [(#17420)](https://github.com/microsoft/vcpkg/pull/17420) [Libtasn1] disable documentation (by @xandox) +- hdf5 `1.12.0#0` -> `1.12.0#1` + - [(#17371)](https://github.com/microsoft/vcpkg/pull/17371) [hdf5] threadsafe support (by @Thieum) +- prometheus-cpp `0.10.0#0` -> `0.11.0#0` + - [(#14792)](https://github.com/microsoft/vcpkg/pull/14792) [prometheus-cpp] Update to version 0.11.0 (by @gjasny) + - [(#16057)](https://github.com/microsoft/vcpkg/pull/16057) [prometheus-cpp] Update to version 0.12.1 (by @gjasny) + - [(#16643)](https://github.com/microsoft/vcpkg/pull/16643) [prometheus-cpp] Update to version 0.12.2 (by @gjasny) +- lcm `1.4.0#1` -> `1.4.0#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- oatpp-mbedtls `1.2.0#1` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- wangle `2020.10.19.00#0` -> `2020.10.19.00#1` + - [(#15400)](https://github.com/microsoft/vcpkg/pull/15400) [wangle] Fix dependency issue (by @PhoebeHui) +- spirv-headers `1.5.1#0` -> `1.5.1#0` + - [(#15831)](https://github.com/microsoft/vcpkg/pull/15831) [spirv-cross,spirv-headers,spirv-tools] 2021-01-15 update (by @barcharcraz) +- date `3.0.0#1` -> `3.0.0#2` + - [(#15994)](https://github.com/microsoft/vcpkg/pull/15994) [date] Fix vcpkg_fixup_cmake_targets for mingw (by @longnguyen2004) +- mapbox-geometry `#0` -> `#0` + - [(#16838)](https://github.com/microsoft/vcpkg/pull/16838) [mapbox-geometry,mapbox-polylabel,geojson-vt-cpp,geojson-cpp] new ports (by @mathisloge) +- boost-container-hash `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-logic `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- concurrentqueue `1.0.2#0` -> `1.0.2#0` + - [(#16404)](https://github.com/microsoft/vcpkg/pull/16404) [concurrentqueue] Update to 1.0.3 (by @JonLiu1993) +- dmlc `2019-08-12-4#0` -> `2019-08-12#5` + - [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) +- libjpeg-turbo `2.0.5#1` -> `2.0.5#4` + - [(#14483)](https://github.com/microsoft/vcpkg/pull/14483) [libjpeg-turbo] Enabled jpeg7 and jpeg8 APIs (by @Ziriax) + - [(#15196)](https://github.com/microsoft/vcpkg/pull/15196) [libjpeg-turbo/mozjpeg] Add conflict messages (by @NancyLi1013) + - [(#15234)](https://github.com/microsoft/vcpkg/pull/15234) [libjpeg-turbo] fix incompatibility for c11 and c17 (by @playgithub) + - [(#15735)](https://github.com/microsoft/vcpkg/pull/15735) [libjepg-turbo] Fix *.pc files (by @Neumann-A) + - [(#15936)](https://github.com/microsoft/vcpkg/pull/15936) [libjpeg-turbo] update to 2.0.6 (by @JonLiu1993) +- sdl2 `2.0.14#0` -> `2.0.14#0` + - [(#14417)](https://github.com/microsoft/vcpkg/pull/14417) [sdl2] apply upstream patch to fix macos vulkan fixes #13773 (by @jhs67) + - [(#14992)](https://github.com/microsoft/vcpkg/pull/14992) [sdl2] Don't propagate shared link options (by @JesseFarebro) + - [(#15398)](https://github.com/microsoft/vcpkg/pull/15398) [sdl2] Update to 2.0.14 (by @RT222) + - [(#15540)](https://github.com/microsoft/vcpkg/pull/15540) [sdl2] Fix improper replacement of -lSDL2main + remove IGNORE_FLAGS and SYSTEM_LIBRARIES (by @longnguyen2004) + - [(#16033)](https://github.com/microsoft/vcpkg/pull/16033) [sdl2] Fix vulkan feature dependencies (by @past-due) + - [(#16370)](https://github.com/microsoft/vcpkg/pull/16370) [sdl2] Update patch (by @NancyLi1013) + - [(#17106)](https://github.com/microsoft/vcpkg/pull/17106) [sdl2] Fix pthread detection on macOS (by @past-due) +- boost-mp11 `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- nnpack `#0` -> `#0` + - [(#16344)](https://github.com/microsoft/vcpkg/pull/16344) [nnpack] create a new port (by @luncliff) +- qt5-winextras `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- nana `1.7.4#0` -> `1.7.4#1` + - [(#15595)](https://github.com/microsoft/vcpkg/pull/15595) [nana] Fix fontconfig dependency (by @NancyLi1013) +- boost-tokenizer `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-mpi `1.75.0#1` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- xmlsec `1.2.30#1` -> `1.2.30#1` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#14587)](https://github.com/microsoft/vcpkg/pull/14587) [xmlsec] Update to 1.2.31 (by @SvenPStarFinanz) +- boost-parameter-python `1.74.0#2` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- winreg `3.1.0#0` -> `4.0.0#0` + - [(#16765)](https://github.com/microsoft/vcpkg/pull/16765) [WinReg] update to v4.0.0 (by @JonLiu1993) + - [(#16871)](https://github.com/microsoft/vcpkg/pull/16871) [WinReg] Update to v4.1.0 (by @JonLiu1993) +- pkgconf `#0` -> `#0` + - [(#17488)](https://github.com/microsoft/vcpkg/pull/17488) [pkgconf] Add new port (by @Neumann-A) +- liblsl `1.13.0-b11-1#0` -> `1.13.1#0` + - [(#14566)](https://github.com/microsoft/vcpkg/pull/14566) [liblsl] Update to 1.13.1 (by @chausner) + - [(#16461)](https://github.com/microsoft/vcpkg/pull/16461) [liblsl] Update to 1.14.0 (by @chausner) +- sdformat9 `9.2.0-1#0` -> `9.4.0#0` + - [(#15720)](https://github.com/microsoft/vcpkg/pull/15720) [sdformat9] Update to 9.4.0 (by @traversaro) +- boost-fiber `1.75.0#2` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- boost-mpl `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- rapidcsv `#0` -> `#0` + - [(#16879)](https://github.com/microsoft/vcpkg/pull/16879) [rapidcsv] new port (by @autoantwort) +- opencv `4.3.0#1` -> `4.3.0#1` + - [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) + - [(#15788)](https://github.com/microsoft/vcpkg/pull/15788) [quirc, opencv4] Build fixes from 2021-01-18 build (by @BillyONeal) + - [(#15859)](https://github.com/microsoft/vcpkg/pull/15859) [OpenCV] bump to 4.5.1 and to 3.4.13 (by @cenit) +- spirv-tools `2020.1#0` -> `2020.1#0` + - [(#15831)](https://github.com/microsoft/vcpkg/pull/15831) [spirv-cross,spirv-headers,spirv-tools] 2021-01-15 update (by @barcharcraz) + - [(#16038)](https://github.com/microsoft/vcpkg/pull/16038) [spirv-cross,spirv-tools] support iOS triplets (by @luncliff) +- zxing-cpp `3.3.3#8` -> `2020-12-2#0` + - [(#14918)](https://github.com/microsoft/vcpkg/pull/14918) [zxing-cpp] Update zxing-cpp and fix iconv dependency (by @JonLiu1993) +- doctest `2.4.0#0` -> `2.4.5#0` + - [(#16121)](https://github.com/microsoft/vcpkg/pull/16121) [doctest] Update to v2.4.5 (by @jharmer95) +- influxdb-cxx `#0` -> `#0` + - [(#16794)](https://github.com/microsoft/vcpkg/pull/16794) [Influxdb-cxx] add new port (by @autoantwort) +- marl `2020-10-10#0` -> `2020-10-10#0` + - [(#17459)](https://github.com/microsoft/vcpkg/pull/17459) [marl] update to latest version (by @JonLiu1993) +- boost-beast `1.74.0#2` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- robin-hood-hashing `3.9.0#0` -> `3.9.1#0` + - [(#14563)](https://github.com/microsoft/vcpkg/pull/14563) [robin-hood-hashing] Update to 3.9.1 (by @RT222) + - [(#16701)](https://github.com/microsoft/vcpkg/pull/16701) [robin-hood-hashing] update to 3.10.0 (by @Ryan-rsm-McKenzie) + - [(#16901)](https://github.com/microsoft/vcpkg/pull/16901) [robin-hood-hashing] Update to 3.11.1 (by @RT222) +- hiredis `1.0.0#0` -> `1.0.0#0` + - [(#14734)](https://github.com/microsoft/vcpkg/pull/14734) [hiredis] update to 1.0.0 (Fix #13256) (by @klalumiere) + - [(#16512)](https://github.com/microsoft/vcpkg/pull/16512) [hiredis] Fix include path (by @NancyLi1013) +- libmysql `8.0.20#1` -> `8.0.20#1` + - [(#14290)](https://github.com/microsoft/vcpkg/pull/14290) [libmysql/libmariadb] Export unofficial cmake targets (by @JackBoosY) + - [(#16426)](https://github.com/microsoft/vcpkg/pull/16426) [libmysql] Re-fix dependency openssl (by @JackBoosY) +- nlopt `2.6.2-1#0` -> `2.7.0#0` + - [(#15105)](https://github.com/microsoft/vcpkg/pull/15105) [NLopt] Update to 2.7.0 (by @rickertm) +- libzippp `4.0-1.7.3#2` -> `4.0-1.7.3#3` + - [(#15486)](https://github.com/microsoft/vcpkg/pull/15486) [libzippp] fix find lzma (by @StarGate-One) +- p-ranav-csv2 `2020-06-02#0` -> `2020-12-14#0` + - [(#15104)](https://github.com/microsoft/vcpkg/pull/15104) [ csv2 ]update to latest commit (by @gennesseaux) +- mpg123 `1.26.3#14` -> `1.26.3#0` + - [(#14444)](https://github.com/microsoft/vcpkg/pull/14444) [mpg123] Upgrade to 1.26.3 (by @evpobr) + - [(#16910)](https://github.com/microsoft/vcpkg/pull/16910) [mpg123] Upgrade to 1.26.3-1 (by @evpobr) + - [(#17074)](https://github.com/microsoft/vcpkg/pull/17074) [mpg123] Upgrade to 1.26.4 (by @evpobr) + - [(#17191)](https://github.com/microsoft/vcpkg/pull/17191) [mpg123] Upgrade to 1.26.5 (by @evpobr) +- uwebsockets `18.13.0#0` -> `18.13.0#0` + - [(#16496)](https://github.com/microsoft/vcpkg/pull/16496) [uWebSockets] update to 19.0.0 (by @JonLiu1993) + - [(#16672)](https://github.com/microsoft/vcpkg/pull/16672) [uWebSockets] updated to 19.0.0 alpha 5 (by @Phantomouse) +- aws-c-common `0.4.56#0` -> `0.4.56#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) +- x264 `157-303c484ec828ed0#12` -> `157-303c484ec828ed0#14` + - [(#12936)](https://github.com/microsoft/vcpkg/pull/12936) [vcpkg/scripts] Add a way to get cmake compiler settings/flags (by @Neumann-A) + - [(#14556)](https://github.com/microsoft/vcpkg/pull/14556) [many ports] mingw support (by @longnguyen2004) + - [(#15769)](https://github.com/microsoft/vcpkg/pull/15769) [x264] Fix build failed on uwp (by @NancyLi1013) +- dav1d `0.8.1#0` -> `0.8.1#0` + - [(#15009)](https://github.com/microsoft/vcpkg/pull/15009) [dav1d] Add dav1d AV1 decoder port (by @RichLogan) + - [(#16916)](https://github.com/microsoft/vcpkg/pull/16916) [dav1d] Update to 0.8.2 (by @EwoutH) +- opensubdiv `3.4.3#0` -> `3.4.3#0` + - [(#16962)](https://github.com/microsoft/vcpkg/pull/16962) [opensubdiv] Remove debug/share folder (by @PhoebeHui) +- inja `3.0.0#0` -> `3.2.0#0` + - [(#16151)](https://github.com/microsoft/vcpkg/pull/16151) [inja] Update to v3.2.0 (by @matusnovak) +- boost-align `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-poly-collection `1.74.0#1` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- glad `0.1.33-1#0` -> `0.1.33-1#0` + - [(#16742)](https://github.com/microsoft/vcpkg/pull/16742) [glad] Add features to support different configurations. (by @crud89) +- ncurses `6.2#0` -> `6.2#0` + - [(#17226)](https://github.com/microsoft/vcpkg/pull/17226) [ncurses] Add new port (by @Hoikas) +- websocketpp `0.8.2#0` -> `0.8.2#0` + - [(#16675)](https://github.com/microsoft/vcpkg/pull/16675) [websocketpp] Add features to build without Boost (by @joefocusrite) +- boost-signals2 `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- wil `2020-05-19#1` -> `2020-05-19#1` + - [(#15438)](https://github.com/microsoft/vcpkg/pull/15438) [wil] Use internal CMakeLists (by @JackBoosY) + - [(#16575)](https://github.com/microsoft/vcpkg/pull/16575) [wil] Updating WIL version to match its nuget package version (by @anaaru) +- mmloader `2020-05-15#0` -> `2020-05-15#0` + - [(#15151)](https://github.com/microsoft/vcpkg/pull/15151) [opentracing] Update VMs 2020-12 (by @BillyONeal) +- asiosdk `2.3.3-1#0` -> `2.3.3-1#0` + - [(#14245)](https://github.com/microsoft/vcpkg/pull/14245) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 1 (by @JackBoosY) +- sciplot `#0` -> `#0` + - [(#15913)](https://github.com/microsoft/vcpkg/pull/15913) [sciplot] Add new port (by @CaeruleusAqua) +- commsdsl `3.6.0#0` -> `3.6.0#0` + - [(#14195)](https://github.com/microsoft/vcpkg/pull/14195) [comms] Add new ports (by @mathisloge) + - [(#14521)](https://github.com/microsoft/vcpkg/pull/14521) [comms ] update to the next version (by @mathisloge) + - [(#14691)](https://github.com/microsoft/vcpkg/pull/14691) [commsdsl] update to version 3.5.4 (by @mathisloge) + - [(#15138)](https://github.com/microsoft/vcpkg/pull/15138) [comms] update comms libs to latest version (by @mathisloge) + - [(#15159)](https://github.com/microsoft/vcpkg/pull/15159) [comms] fixes debug build configuration (by @mathisloge) + - [(#16415)](https://github.com/microsoft/vcpkg/pull/16415) [comms, commsdsl] update ports (by @mathisloge) + - [(#17581)](https://github.com/microsoft/vcpkg/pull/17581) [comms,commsdsl] update ports (by @mathisloge) +- 3fd `2.6.2#0` -> `2.6.3#0` + - [(#14528)](https://github.com/microsoft/vcpkg/pull/14528) [3fd] Update to 2.6.3, fix port (by @strega-nil) +- libsigcpp-3 `3.0.3#0` -> `3.0.3#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- boost-type-traits `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- vamp-sdk `#0` -> `#0` + - [(#16883)](https://github.com/microsoft/vcpkg/pull/16883) [vamp-sdk] new package (by @abique) +- hpx `1.5.1#1` -> `1.6.0#0` + - [(#16264)](https://github.com/microsoft/vcpkg/pull/16264) [hpx] Update hpx to V1.6.0 (by @hkaiser) +- crfsuite `2019-07-21#0` -> `2019-07-21#0` + - [(#15785)](https://github.com/microsoft/vcpkg/pull/15785) [crfsuite] change /include/x.h => /include/crfsuite/x.h (by @BillyONeal) +- qt5-base `5.15.2#1` -> `5.15.2#4` + - [(#8524)](https://github.com/microsoft/vcpkg/pull/8524) Add option VCPKG_QMAKE_USE_NMAKE in vcpkg_build_qmake and install_qt (by @JackBoosY) + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#14594)](https://github.com/microsoft/vcpkg/pull/14594) [qt5-base] fix brotli linkage and qml dlls deployment (by @Neumann-A) + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) + - [(#15005)](https://github.com/microsoft/vcpkg/pull/15005) [qt5] Fix linux dynamic build (by @dweckmann) + - [(#15170)](https://github.com/microsoft/vcpkg/pull/15170) [qt5-base] mysql plugin added (by @jepessen) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16280)](https://github.com/microsoft/vcpkg/pull/16280) qt5-base: misleading list of system packages required (by @wrobelda) + - [(#16386)](https://github.com/microsoft/vcpkg/pull/16386) [qt5-base] Add feature vulkan (by @JackBoosY) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) + - [(#16659)](https://github.com/microsoft/vcpkg/pull/16659) [qt5-base] make libpq an optional dependency (by @autoantwort) + - [(#16954)](https://github.com/microsoft/vcpkg/pull/16954) [vcpkg baseline][qt5-base] Fix glib link issues on linux (by @Neumann-A) + - [(#17158)](https://github.com/microsoft/vcpkg/pull/17158) [qt5] Move qt5 headers into qt5 subdir (by @Neumann-A) +- nccl `2.4.6#0` -> `2.4.6#0` + - [(#14683)](https://github.com/microsoft/vcpkg/pull/14683) [nccl] New Port (by @jacobkahn) +- qt5-activeqt `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- catch2 `2.13.1#0` -> `2.13.1#1` + - [(#17271)](https://github.com/microsoft/vcpkg/pull/17271) [catch2] Fix share/catch2 directory name conflict (by @wildmichael) +- kf5itemviews `5.64.0#0` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- speex `1.2.0#7` -> `1.2.0#8` + - [(#15855)](https://github.com/microsoft/vcpkg/pull/15855) [speex] Add linux and macOS support. (by @Hoikas) +- duktape `2.5.0#0` -> `2.5.0#1` + - [(#14666)](https://github.com/microsoft/vcpkg/pull/14666) [duktape] Add VERSION and SOVERSION properties CMake build (by @LRFLEW) +- bitsery `5.1.0#0` -> `5.2.1#0` + - [(#14722)](https://github.com/microsoft/vcpkg/pull/14722) [bitsery] Update to 5.2.1 (by @RT222) +- qt5-virtualkeyboard `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- qt5-serialport `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- xeus `0.24.1#1` -> `0.24.1#1` + - [(#14387)](https://github.com/microsoft/vcpkg/pull/14387) [xeus] remove openssl static build patch as it is no longer needed (by @mcmtroffaes) + - [(#14455)](https://github.com/microsoft/vcpkg/pull/14455) [xeus] update to 0.24.3 (by @SeekingMeaning) +- kf5plotting `5.74.0#0` -> `5.74.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- libyuv `fec9121#3` -> `fec9121#0` + - [(#17294)](https://github.com/microsoft/vcpkg/pull/17294) [libyuv] update to latest commit (by @JonLiu1993) +- arrow `1.0.1#1` -> `1.0.1#2` + - [(#14245)](https://github.com/microsoft/vcpkg/pull/14245) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 1 (by @JackBoosY) + - [(#14395)](https://github.com/microsoft/vcpkg/pull/14395) [ZSTD] Update to 1.4.5 (by @Neumann-A) + - [(#15757)](https://github.com/microsoft/vcpkg/pull/15757) [Arrow] Update to 3.0.0 (by @GPSnoopy) +- glm `0.9.9.8#0` -> `0.9.9.8#0` + - [(#16429)](https://github.com/microsoft/vcpkg/pull/16429) [glm] Add namespace to export target (by @JackBoosY) +- charls `2.1.0-1#0` -> `2.2.0#0` + - [(#15857)](https://github.com/microsoft/vcpkg/pull/15857) [charls] update to 2.2.0 (by @JonLiu1993) +- boost-endian `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- raylib `3.5.0#3` -> `3.5.0#1` + - [(#15342)](https://github.com/microsoft/vcpkg/pull/15342) Raylib update to 3.5.0 (by @JonLiu1993) + - [(#15935)](https://github.com/microsoft/vcpkg/pull/15935) [raylib] Fix usage (by @NancyLi1013) +- bond `9.0.2#0` -> `9.0.2#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14450)](https://github.com/microsoft/vcpkg/pull/14450) [bond] update to 9.0.3 (by @SeekingMeaning) +- gamedev-framework `0.18.0#0` -> `0.18.1#0` + - [(#14482)](https://github.com/microsoft/vcpkg/pull/14482) [gamedev-framework] update to 0.18.1 (by @jube) + - [(#17445)](https://github.com/microsoft/vcpkg/pull/17445) [gamedev-framework] Update to 0.20.0 (by @ahugeat) +- openexr `2.5.0#1` -> `2.5.0#0` + - [(#15147)](https://github.com/microsoft/vcpkg/pull/15147) [openexr] Remove python dependency of openexr. (by @BillyONeal) +- qt5-androidextras `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- sdl2-image `2.0.5#0` -> `2.0.5#1` + - [(#14796)](https://github.com/microsoft/vcpkg/pull/14796) [sdl2-image] Fix usage (by @JackBoosY) +- gtk `3.22.19-4#0` -> `3.22.19-4#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- boost-msm `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- restinio `0.6.11#0` -> `0.6.12#0` + - [(#14496)](https://github.com/microsoft/vcpkg/pull/14496) [restinio] update to v.0.6.12 (by @eao197) + - [(#15338)](https://github.com/microsoft/vcpkg/pull/15338) [restinio] update to v.0.6.13 (by @eao197) +- imgui `1.81#1` -> `1.81#4` + - [(#13899)](https://github.com/microsoft/vcpkg/pull/13899) [imgui] Add experimental docking feature (by @brukted) + - [(#14379)](https://github.com/microsoft/vcpkg/pull/14379) [imgui] Update to 1.79 (by @RT222) + - [(#15063)](https://github.com/microsoft/vcpkg/pull/15063) [imgui] Fix find dependencies (by @JackBoosY) + - [(#16239)](https://github.com/microsoft/vcpkg/pull/16239) upgrade imgui to v1.81 (by @BrianPeek) + - [(#16255)](https://github.com/microsoft/vcpkg/pull/16255) [imgui] change to correct dx binding implementation path (by @aizuon) + - [(#16268)](https://github.com/microsoft/vcpkg/pull/16268) [Imgui] Update docking-experimental and freetype features to 1.81 (by @RT222) + - [(#16727)](https://github.com/microsoft/vcpkg/pull/16727) [imgui] Update to 1.82 (by @RT222) +- boost-lockfree `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libzip `1.7.3#1` -> `1.7.3#1` + - [(#15589)](https://github.com/microsoft/vcpkg/pull/15589) [libzip] Relative pkgconfig paths (by @adam-bloom) + - [(#17282)](https://github.com/microsoft/vcpkg/pull/17282) [libzip] fix dependency in libzip-config.cmake.in (by @NancyLi1013) +- elfio `3.8#0` -> `3.8#0` + - [(#17249)](https://github.com/microsoft/vcpkg/pull/17249) [elfio] Update elfio from 3.8 to 3.9 (by @schultetwin1) +- openal-soft `1.20.1#5` -> `1.20.1#6` + - [(#15634)](https://github.com/microsoft/vcpkg/pull/15634) [openal-soft] Fix issue with cmake config. (by @Hoikas) + - [(#15945)](https://github.com/microsoft/vcpkg/pull/15945) [openal-soft] Update to 1.21.1 (by @past-due) +- ocilib `4.7.1#0` -> `4.7.1#0` + - [(#16625)](https://github.com/microsoft/vcpkg/pull/16625) [ocilib] fix wrong solution filename (by @meastp) +- glbinding `3.1.0-2#0` -> `3.1.0#0` + - [(#15082)](https://github.com/microsoft/vcpkg/pull/15082) [glbinding] Improve usage information (by @ras0219) +- boost-bimap `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libpng `1.6.37#12` -> `1.6.37#14` + - [(#14499)](https://github.com/microsoft/vcpkg/pull/14499) [freetype] Fix INTERFACE_LINK_LIBRARIES in exported cmake file (by @JackBoosY) + - [(#15002)](https://github.com/microsoft/vcpkg/pull/15002) [libpng] Fix cross-compilation on macOS (by @orudge) +- boost-callable-traits `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- happly `#0` -> `#0` + - [(#16788)](https://github.com/microsoft/vcpkg/pull/16788) [happly] add new port (by @autoantwort) +- libheif `1.7.0#1` -> `1.10.0#0` + - [(#14648)](https://github.com/microsoft/vcpkg/pull/14648) [libheif] update to 1.9.1 (by @JonLiu1993) + - [(#15416)](https://github.com/microsoft/vcpkg/pull/15416) [libheif] update to 1.10.0 (by @0xC0000054) +- pdal `1.7.1#9` -> `1.7.1#11` + - [(#14382)](https://github.com/microsoft/vcpkg/pull/14382) [kenlm, pdal] Fix const overload on Visual Studio 2019 version 16.8 (by @LilyWangL) + - [(#15750)](https://github.com/microsoft/vcpkg/pull/15750) [libgeotiff] Fix packagename via find_package (by @NancyLi1013) +- oatpp-mongo `1.2.0#0` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- proj4 `7.2.1#2` -> `7.2.1#3` + - [(#14629)](https://github.com/microsoft/vcpkg/pull/14629) [proj] Added support for optionally building the tools (by @SNiLD) + - [(#14800)](https://github.com/microsoft/vcpkg/pull/14800) [Proj4] Update to 7.2.0 (by @longhuan2018) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#15978)](https://github.com/microsoft/vcpkg/pull/15978) [proj4] Bump to proj 7.2.1 (by @rhuijben) + - [(#15985)](https://github.com/microsoft/vcpkg/pull/15985) [proj4] Copy over proj.pdb file on install (by @stefanuhrig) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- boost-bind `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- toml11 `3.5.0#0` -> `3.5.0#1` + - [(#14723)](https://github.com/microsoft/vcpkg/pull/14723) [toml11] fixes installation (by @fran6co) +- boost-move `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- tomlplusplus `2.3.0#0` -> `2.3.0#1` + - [(#15365)](https://github.com/microsoft/vcpkg/pull/15365) update toml++ to v2.3.0 (by @marzer) + - [(#15609)](https://github.com/microsoft/vcpkg/pull/15609) delete linux from fail port from tomlplusplus (by @marshevms) +- libvpx `1.9.0#3` -> `1.9.0#7` + - [(#14545)](https://github.com/microsoft/vcpkg/pull/14545) [libvpx] switch from yasm to nasm (by @mcmtroffaes) + - [(#14556)](https://github.com/microsoft/vcpkg/pull/14556) [many ports] mingw support (by @longnguyen2004) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) + - [(#15892)](https://github.com/microsoft/vcpkg/pull/15892) [libvpx] Fix arm-uwp builds for v142 toolset (by @jwtowner) + - [(#17287)](https://github.com/microsoft/vcpkg/pull/17287) [libvpx] Fix libvpx compilation (install process) (by @talregev) + - [(#17331)](https://github.com/microsoft/vcpkg/pull/17331) Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (by @BillyONeal) +- boost-tuple `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- minc `2.4.03#0` -> `2.4.03#1` + - [(#14716)](https://github.com/microsoft/vcpkg/pull/14716) [cmake] update to 3.19.2 (by @JackBoosY) +- vcpkg-pkgconfig-get-modules `#0` -> `#0` + - [(#16954)](https://github.com/microsoft/vcpkg/pull/16954) [vcpkg baseline][qt5-base] Fix glib link issues on linux (by @Neumann-A) +- boost-program-options `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- qt5-tools `5.15.1#1` -> `5.15.1#1` + - [(#14083)](https://github.com/microsoft/vcpkg/pull/14083) [qt5-tools] Patch windeployqt to locate icudtd correctly. (by @seanlis) + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- qt5-svg `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- pangomm `2.40.1#4` -> `2.40.1#4` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- protobuf `3.14.0#1` -> `3.14.0#1` + - [(#14670)](https://github.com/microsoft/vcpkg/pull/14670) [protobuf] Update to 3.14.0 (by @JonLiu1993) + - [(#15246)](https://github.com/microsoft/vcpkg/pull/15246) [protobuf] Fix the default proto file path (by @JackBoosY) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16449)](https://github.com/microsoft/vcpkg/pull/16449) [protobuf] Update to 3.15.8 (by @yonik) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) + - [(#16904)](https://github.com/microsoft/vcpkg/pull/16904) [vcpkg baseline][osgearth/gdal] Re-fix dependency gdal (by @JackBoosY) + - [(#16997)](https://github.com/microsoft/vcpkg/pull/16997) [protobuf] Fix deprecation warning in vcpkg_check_feature() (by @NancyLi1013) +- vtk-m `1.5.0#0` -> `1.5.0#1` + - [(#14884)](https://github.com/microsoft/vcpkg/pull/14884) [vcpkg baseline][vtk-m] fix the sha512 (by @strega-nil) +- simde `2019-06-05#0` -> `0.7.0#0` + - [(#15387)](https://github.com/microsoft/vcpkg/pull/15387) [simde] update to 0.7.0 (by @JonLiu1993) +- fbgemm `#0` -> `#0` + - [(#16346)](https://github.com/microsoft/vcpkg/pull/16346) [fbgemm] create a new port (by @luncliff) +- boost-static-assert `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- mp3lame `3.100#4` -> `3.100#6` + - [(#14556)](https://github.com/microsoft/vcpkg/pull/14556) [many ports] mingw support (by @longnguyen2004) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15058)](https://github.com/microsoft/vcpkg/pull/15058) [mp3lame] Fix lib suffix on Unix (by @NancyLi1013) +- wepoll `1.5.5#0` -> `1.5.8#0` + - [(#14456)](https://github.com/microsoft/vcpkg/pull/14456) [wepoll] update to 1.5.8 (by @SeekingMeaning) + - [(#14986)](https://github.com/microsoft/vcpkg/pull/14986) 2020-12-07 Build Fixes (by @BillyONeal) +- simdjson `0.5.0#0` -> `0.7.1#0` + - [(#15436)](https://github.com/microsoft/vcpkg/pull/15436) simdjson update to v0.7.1 (by @JonLiu1993) + - [(#16277)](https://github.com/microsoft/vcpkg/pull/16277) Updated 'simdjson' to v0.8.2 (by @jharmer95) + - [(#17200)](https://github.com/microsoft/vcpkg/pull/17200) [simdjson] Update to 0.9.2 (by @myd7349) +- ijg-libjpeg `9d#0` -> `9d#0` + - [(#14583)](https://github.com/microsoft/vcpkg/pull/14583) [ijg-libjpeg] add new port (by @luncliff) +- ffnvcodec `10.0.26.0#0` -> `10.0.26.0#1` + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) +- mdns `1.1#0` -> `1.1#0` + - [(#15142)](https://github.com/microsoft/vcpkg/pull/15142) [mdns] added new port (by @mathisloge) +- ginkgo `#0` -> `#0` + - [(#16536)](https://github.com/microsoft/vcpkg/pull/16536) [ginkgo] Create new port (by @upsj) +- usd `20.02-1#0` -> `20.08#0` + - [(#13687)](https://github.com/microsoft/vcpkg/pull/13687) [usd] fix dll path and update to 20.08 (by @ousttrue) +- nettle `3.6#4` -> `3.6#5` + - [(#13126)](https://github.com/microsoft/vcpkg/pull/13126) [vcpkg_fixup_pkgconfig] Handle spaces in path, do not validate individual libraries (by @ras0219) + - [(#15236)](https://github.com/microsoft/vcpkg/pull/15236) [gmp/nettle] Update to latest release revision (by @PhoebeHui) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#17421)](https://github.com/microsoft/vcpkg/pull/17421) [Nettle] add cflags to build tools (by @xandox) +- frozen `1.0.0#0` -> `1.0.0#0` + - [(#17451)](https://github.com/microsoft/vcpkg/pull/17451) [frozen] Update to latest commit (by @Ryan-rsm-McKenzie) +- caf `0.17.6#1` -> `0.17.6#1` + - [(#14292)](https://github.com/microsoft/vcpkg/pull/14292) [caf] Add usage and vcpkg-cmake-wrapper (by @NancyLi1013) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- azure-uamqp-c `2020-07-19#0` -> `2020-12-09#0` + - [(#15109)](https://github.com/microsoft/vcpkg/pull/15109) Azure-IoT-Sdk for C release 2020-12-09 (by @ewertons) +- avro-cpp `1.9.2#0` -> `1.9.2#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) +- boost-function `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- nghttp2 `1.39.2-2#0` -> `1.42.0#0` + - [(#14862)](https://github.com/microsoft/vcpkg/pull/14862) [nghttp2] Update to 1.42.0. (by @geraldcombs) +- polyhook2 `2020-09-22#0` -> `2020-09-22#0` + - [(#14794)](https://github.com/microsoft/vcpkg/pull/14794) [ebml/gppanel/matroska/polyhook2/unrar] Fix typos in CONTROL files (by @NancyLi1013) + - [(#15537)](https://github.com/microsoft/vcpkg/pull/15537) [polyhook2]Update to the latest version (by @stevemk14ebr) +- cpprestsdk `2.10.16-3#0` -> `2.10.17#0` + - [(#15401)](https://github.com/microsoft/vcpkg/pull/15401) Update cpprestsdk to 2.10.17. (by @BillyONeal) + - [(#16065)](https://github.com/microsoft/vcpkg/pull/16065) [cpprestsdk] Bump version to 2.10.18 (by @barcharcraz) +- boost-integer `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-iterator `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- devil `1.8.0#6` -> `1.8.0#7` + - [(#14793)](https://github.com/microsoft/vcpkg/pull/14793) [devil] Fix pkgconfig on Windows (by @JackBoosY) +- chromaprint `1.5.0#0` -> `1.5.0#0` + - [(#15986)](https://github.com/microsoft/vcpkg/pull/15986) [chromaprint] add new port with version 1.5.0 (by @Be-ing) + - [(#17331)](https://github.com/microsoft/vcpkg/pull/17331) Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (by @BillyONeal) +- boost-test `1.75.0#1` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- liblas `1.8.1#5` -> `1.8.1#6` + - [(#15750)](https://github.com/microsoft/vcpkg/pull/15750) [libgeotiff] Fix packagename via find_package (by @NancyLi1013) +- ffmpeg `4.3.2#0` -> `4.3.2#12` + - [(#14360)](https://github.com/microsoft/vcpkg/pull/14360) [ffmpeg] add if guard, fix library ordering on linux, minor clean up (by @mcmtroffaes) + - [(#14388)](https://github.com/microsoft/vcpkg/pull/14388) [ffmpeg] simplify openssl library search, and fix linux openssl feature linking (by @mcmtroffaes) + - [(#14547)](https://github.com/microsoft/vcpkg/pull/14547) [ffmpeg] use nasm instead of yasm (by @mcmtroffaes) + - [(#14556)](https://github.com/microsoft/vcpkg/pull/14556) [many ports] mingw support (by @longnguyen2004) + - [(#14626)](https://github.com/microsoft/vcpkg/pull/14626) [libpq/ffmpeg] Fix iconv/intl linkage not covered by CI (by @Neumann-A) + - [(#15127)](https://github.com/microsoft/vcpkg/pull/15127) [ffmpeg] fix up the pkgconfig files (by @JackBoosY) + - [(#15593)](https://github.com/microsoft/vcpkg/pull/15593) [pangolin] Fix static build error (by @NancyLi1013) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) + - [(#16000)](https://github.com/microsoft/vcpkg/pull/16000) [ffmpeg] avfilter: fix dependencies and linux library ordering (by @mcmtroffaes) + - [(#16768)](https://github.com/microsoft/vcpkg/pull/16768) Upgrade ffmpeg to 4.3.2 (by @omartijn) + - [(#16882)](https://github.com/microsoft/vcpkg/pull/16882) [ffmpeg] Fix FindFFMPEG lib versions for building opencv[ffmpeg] (by @genevanmeter) + - [(#17236)](https://github.com/microsoft/vcpkg/pull/17236) [ffmpeg] no longer hardcode version strings in FindFFMPEG script (by @mcmtroffaes) + - [(#17287)](https://github.com/microsoft/vcpkg/pull/17287) [libvpx] Fix libvpx compilation (install process) (by @talregev) + - [(#17298)](https://github.com/microsoft/vcpkg/pull/17298) [ffmpeg] add -fPIC (by @cenit) + - [(#17467)](https://github.com/microsoft/vcpkg/pull/17467) [ffmpeg] avdevice xcb linking fix on linux (by @mcmtroffaes) + - [(#17531)](https://github.com/microsoft/vcpkg/pull/17531) [ffmpeg] add openh264 support (by @mcmtroffaes) +- atlmfc `0#0` -> `0#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) +- boost-format `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-gil `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- telnetpp `2.0-4#0` -> `2.1.2#0` + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) +- boolinq `2019-07-22#0` -> `2019-07-22#0` + - [(#17495)](https://github.com/microsoft/vcpkg/pull/17495) [boolinq] update to 3.0.1 (2020-07-29) (by @JonLiu1993) +- qt5-serialbus `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- boost-system `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- cgal `5.2#1` -> `5.2#3` + - [(#14605)](https://github.com/microsoft/vcpkg/pull/14605) CGAL: Update to 5.1.1 (by @maxGimeno) + - [(#15047)](https://github.com/microsoft/vcpkg/pull/15047) [CGAL] Upgrade to 5.2 (by @maxGimeno) + - [(#15860)](https://github.com/microsoft/vcpkg/pull/15860) [CGAL] switch dep to gmp instead of mpir (by @Neumann-A) + - [(#16592)](https://github.com/microsoft/vcpkg/pull/16592) [CGAL] Restore boost dependencies (by @maxGimeno) + - [(#17300)](https://github.com/microsoft/vcpkg/pull/17300) [CGAL] Fix the configuration file (by @maxGimeno) +- libde265 `1.0.5#0` -> `1.0.8#0` + - [(#14497)](https://github.com/microsoft/vcpkg/pull/14497) [libde265] Updated to v1.0.8 (by @JonLiu1993) +- libxml2 `2.9.10#1` -> `2.9.10#2` + - [(#14476)](https://github.com/microsoft/vcpkg/pull/14476) [libxslt] Fix install tools and pkgconfig (by @JackBoosY) + - [(#14991)](https://github.com/microsoft/vcpkg/pull/14991) [libxml2] build failure with x64-linux-dynamic (Fix #14990) (by @klalumiere) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) + - [(#16726)](https://github.com/microsoft/vcpkg/pull/16726) [libxml2] Disable http and ftp on UWP (by @JackBoosY) + - [(#16897)](https://github.com/microsoft/vcpkg/pull/16897) [libxml2] add missing GNUInstallDirs to fix pc files (by @Neumann-A) + - [(#17389)](https://github.com/microsoft/vcpkg/pull/17389) [libxml2] Pass version to rc via configured file (by @dg0yt) +- vcpkg-cmake `#0` -> `#0` + - [(#16440)](https://github.com/microsoft/vcpkg/pull/16440) [scripts-audit] Rollup PR 2021-02-26 (by @strega-nil) + - [(#16468)](https://github.com/microsoft/vcpkg/pull/16468) [vcpkg-cmake] Fix typo in vcpkg_cmake_configure that prevented custom triplets from working (by @sylveon) + - [(#16774)](https://github.com/microsoft/vcpkg/pull/16774) [ci,vcpkg-cmake-*] remove host-only nature of vcpkg-cmake-* ports (by @strega-nil) +- pugixml `1.1#2` -> `1.11.1#0` + - [(#14813)](https://github.com/microsoft/vcpkg/pull/14813) [pugixml] Update to 1.11.1 (by @RT222) + - [(#15207)](https://github.com/microsoft/vcpkg/pull/15207) [pugixml] Update to 1.11.4 (by @c72578) +- nuklear `2020-09-14#0` -> `2021-03-18#0` + - [(#17082)](https://github.com/microsoft/vcpkg/pull/17082) [nuklear] Upgrade from 2020-09-14 to 2021-03-18 version and switch repo (by @SamuelMarks) +- cppmicroservices `3.4.0-1#0` -> `3.4.0#2` + - [(#15177)](https://github.com/microsoft/vcpkg/pull/15177) [cppmicroservices] Fix warning C4834 (by @Cheney-W) +- unrar `5.8.1#0` -> `5.8.1#0` + - [(#14794)](https://github.com/microsoft/vcpkg/pull/14794) [ebml/gppanel/matroska/polyhook2/unrar] Fix typos in CONTROL files (by @NancyLi1013) +- qt5-websockets `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- boost-process `1.74.0#2` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libsoundio `2.0.0-3#0` -> `2.0.0-3#0` + - [(#16891)](https://github.com/microsoft/vcpkg/pull/16891) [libsoundio] Add support for linux backends (by @joefocusrite) +- oatpp `1.2.0#1` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- boost-lexical-cast `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- quirc `1.1#1` -> `1.1#1` + - [(#15252)](https://github.com/microsoft/vcpkg/pull/15252) Fixed port of quirc - patch did no longer apply / modified to fix build (by @Markus87) + - [(#15788)](https://github.com/microsoft/vcpkg/pull/15788) [quirc, opencv4] Build fixes from 2021-01-18 build (by @BillyONeal) +- qt5-macextras `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- sail `0.9.0-pre10#0` -> `0.9.0-pre10#0` + - [(#14925)](https://github.com/microsoft/vcpkg/pull/14925) [sail] Add new port (by @happy-sea-fox) + - [(#15140)](https://github.com/microsoft/vcpkg/pull/15140) [sail] Enable static builds and more platforms (by @happy-sea-fox) + - [(#16806)](https://github.com/microsoft/vcpkg/pull/16806) [sail] Update 0.9.0-pre11 -> 0.9.0-pre12 (by @happy-sea-fox) +- osgearth `3#2` -> `3.1#0` + - [(#14976)](https://github.com/microsoft/vcpkg/pull/14976) [osgearth/rocksdb] Update to latest release (by @NancyLi1013) + - [(#15375)](https://github.com/microsoft/vcpkg/pull/15375) [osgearth] Fix x64-windows-static-md (by @ankurverma85) + - [(#15777)](https://github.com/microsoft/vcpkg/pull/15777) [osgearth] Make all find_packages required in effort to make this port less "flaky", and turn on in CI. (by @BillyONeal) + - [(#15900)](https://github.com/microsoft/vcpkg/pull/15900) [vcpkg baseline][osgearth] Fix and add dependency tinyxml (by @JackBoosY) +- boost-ptr-container `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- freetype `2.10.2#4` -> `2.10.2#7` + - [(#14499)](https://github.com/microsoft/vcpkg/pull/14499) [freetype] Fix INTERFACE_LINK_LIBRARIES in exported cmake file (by @JackBoosY) + - [(#14917)](https://github.com/microsoft/vcpkg/pull/14917) [freetype] Make zlib and brotli features (by @LRFLEW) + - [(#15112)](https://github.com/microsoft/vcpkg/pull/15112) [freetype] avoid target_link_libraries call since qt6 does not like it. (by @Neumann-A) + - [(#15334)](https://github.com/microsoft/vcpkg/pull/15334) [freetype] Update to 2.10.4 (by @kevinlul) +- podofo `0.9.6#12` -> `0.9.6#13` + - [(#15666)](https://github.com/microsoft/vcpkg/pull/15666) [podofo] Fix feature crypto (by @JackBoosY) + - [(#16373)](https://github.com/microsoft/vcpkg/pull/16373) [podofo] update to 0.9.7 (by @JonLiu1993) +- ignition-msgs5 `5.3.0#1` -> `5.3.0#2` + - [(#14324)](https://github.com/microsoft/vcpkg/pull/14324) [ignition] Updates on various pkgs ???? (by @ahoarau) + - [(#14730)](https://github.com/microsoft/vcpkg/pull/14730) [ignition-msgs*] Fix flaky CI tests for ignition-msgs* ports (take 2) (by @traversaro) +- boost-vmd `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- librsvg `2.40.20-2#0` -> `2.40.20-2#0` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- cpp-httplib `0.7.0#0` -> `0.7.15#0` + - [(#14795)](https://github.com/microsoft/vcpkg/pull/14795) [cpp-httplib] Update to 0.7.15 (by @JonLiu1993) + - [(#15344)](https://github.com/microsoft/vcpkg/pull/15344) [cpp-httplib] Update to version 0.7.18 (by @iko1) + - [(#16591)](https://github.com/microsoft/vcpkg/pull/16591) [cpp-httplib] Upgrade to v0.8.4 (by @tosone) + - [(#17182)](https://github.com/microsoft/vcpkg/pull/17182) [cpp-httplib] Upgrade to v0.8.6 (by @PhilLab) +- azure-security-keyvault-common-cpp `4.0.0-beta.1#0` -> `4.0.0-beta.1#0` + - [(#17143)](https://github.com/microsoft/vcpkg/pull/17143) [azure-security-keyvault-*] Add new ports (by @azure-sdk) + - [(#17447)](https://github.com/microsoft/vcpkg/pull/17447) [azure-sdk-for-cpp] Upgrade vcpkg manifest files (by @antkmsft) +- sfml `2.5.1#9` -> `2.5.1#0` + - [(#15718)](https://github.com/microsoft/vcpkg/pull/15718) [sfml] Install usage and change version scheme to relaxed (by @ras0219) +- presentmon `1.6.0#0` -> `1.6.0#0` + - [(#16628)](https://github.com/microsoft/vcpkg/pull/16628) Port for PresentMon, windows-only ETW swap-chain presentation capture and analysis tool (by @aggieNick02) +- boost-exception `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- type-safe `0.2.1#0` -> `0.2.1#0` + - [(#15468)](https://github.com/microsoft/vcpkg/pull/15468) [type-safe] New port. (by @blaz-kranjc) +- collada-dom `2.5.0-3#0` -> `2.5.0#4` + - [(#16763)](https://github.com/microsoft/vcpkg/pull/16763) [collada-dom] Add REMOVE_RECURSE to solve DLLs error path (by @JonLiu1993) +- bde `2#0` -> `2#0` + - [(#14246)](https://github.com/microsoft/vcpkg/pull/14246) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 2 (by @JackBoosY) +- librsync `2020-09-16#0` -> `2020-09-16#1` + - [(#15281)](https://github.com/microsoft/vcpkg/pull/15281) [librsync] fix librsync linkage (by @Amf1k) +- shogun `6.1.4#3` -> `6.1.4#4` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) +- asyncplusplus `1.1#0` -> `1.1#0` + - [(#14245)](https://github.com/microsoft/vcpkg/pull/14245) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 1 (by @JackBoosY) +- frugally-deep `#0` -> `#0` + - [(#17559)](https://github.com/microsoft/vcpkg/pull/17559) [new/updated port] frugally-deep and updated fplus (by @mathisloge) +- xtensor `0.21.6#0` -> `0.21.9#0` + - [(#14454)](https://github.com/microsoft/vcpkg/pull/14454) [xsimd][xtensor][xtl] Update to latest (by @SeekingMeaning) +- jwt-cpp `0.4.0#0` -> `0.4.0#0` + - [(#16799)](https://github.com/microsoft/vcpkg/pull/16799) [jwt-cpp] update to v0.5.0 (by @prince-chrismc) +- libigl `2.2.0#2` -> `2.2.0#4` + - [(#14376)](https://github.com/microsoft/vcpkg/pull/14376) [libigl] Fix dynamic build and enable header-only mode (by @FabienPean) + - [(#14888)](https://github.com/microsoft/vcpkg/pull/14888) [libigl] Always install as header-only library (by @FabienPean) +- boost-polygon `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libiconv `1.16#5` -> `1.16#8` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#15606)](https://github.com/microsoft/vcpkg/pull/15606) [boost-locale] android build (by @xandox) + - [(#15771)](https://github.com/microsoft/vcpkg/pull/15771) [libiconv] Updated typo in iconv share files location (by @ludekvodicka) +- boost-convert `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- sentry-native `0.4.4#1` -> `0.4.4#1` + - [(#14349)](https://github.com/microsoft/vcpkg/pull/14349) [sentry-native] Disable warning C5105 (by @LilyWangL) + - [(#14541)](https://github.com/microsoft/vcpkg/pull/14541) [sentry-native] Update to version 0.4.4 (by @AenBleidd) + - [(#15042)](https://github.com/microsoft/vcpkg/pull/15042) [sentry-native] Fix sentry-config-cmake.in (by @JackBoosY) + - [(#15790)](https://github.com/microsoft/vcpkg/pull/15790) [sentry-native] Update to 0.4.5 (by @AenBleidd) + - [(#15875)](https://github.com/microsoft/vcpkg/pull/15875) [sentry-native] Update to 0.4.6 (by @AenBleidd) + - [(#16021)](https://github.com/microsoft/vcpkg/pull/16021) [sentry-native] Update to 0.4.7 (by @AenBleidd) + - [(#16550)](https://github.com/microsoft/vcpkg/pull/16550) [sentry-native] Update to 0.4.8 (by @AenBleidd) + - [(#17413)](https://github.com/microsoft/vcpkg/pull/17413) [sentry-native] Update to 0.4.9 (by @AenBleidd) +- llvm `11.0.0#1` -> `11.0.0#7` + - [(#13998)](https://github.com/microsoft/vcpkg/pull/13998) [llvm] update to 11.0.0 (by @yurybura) + - [(#14399)](https://github.com/microsoft/vcpkg/pull/14399) [llvm] install tools in tools/llvm (by @strega-nil) + - [(#16232)](https://github.com/microsoft/vcpkg/pull/16232) [llvm] update to 11.1.0, add features and fix issues (by @yurybura) + - [(#16294)](https://github.com/microsoft/vcpkg/pull/16294) [llvm] Fix resource path when building tools (by @JackBoosY) + - [(#16877)](https://github.com/microsoft/vcpkg/pull/16877) [llvm] add features enable-{eh,ffi,bindings,terminfo,threads} (by @abique) +- bitmagic `6.4.0#0` -> `7.2.0#0` + - [(#17223)](https://github.com/microsoft/vcpkg/pull/17223) Update bitmagic version to 7.2.0 (by @klalumiere) +- gdcm `3.0.7#0` -> `3.0.7#1` + - [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) +- qt5-networkauth `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- jsonnet `0.16.0#1` -> `0.16.0#2` + - [(#16335)](https://github.com/microsoft/vcpkg/pull/16335) [jsonnet] Incorporate md5.cpp into jsonnet library (by @tetsuh) +- google-cloud-cpp `1.24.0#0` -> `1.24.0#0` + - [(#14375)](https://github.com/microsoft/vcpkg/pull/14375) [google-cloud-cpp] Update to the v1.20.0 release (by @coryan) + - [(#14886)](https://github.com/microsoft/vcpkg/pull/14886) [google-cloud-cpp] update to latest release (v1.21.0) (by @coryan) + - [(#15510)](https://github.com/microsoft/vcpkg/pull/15510) [google-cloud-cpp] update to latest release (v1.22.0) (by @coryan) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#15669)](https://github.com/microsoft/vcpkg/pull/15669) [google-cloud-cpp] update to v1.23.0 (by @coryan) + - [(#16001)](https://github.com/microsoft/vcpkg/pull/16001) [google-cloud-cpp] update to the latest release (v1.24.0) (by @coryan) + - [(#16162)](https://github.com/microsoft/vcpkg/pull/16162) [google-cloud-cpp] populate license field (by @coryan) + - [(#16177)](https://github.com/microsoft/vcpkg/pull/16177) [google-cloud-cpp] use 'version' for version numbers (by @coryan) + - [(#16477)](https://github.com/microsoft/vcpkg/pull/16477) [google-cloud-cpp] update to latest release (v1.25.0) (by @coryan) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) + - [(#17027)](https://github.com/microsoft/vcpkg/pull/17027) [google-cloud-cpp] update to the latest release (v1.26.0) (by @coryan) +- oatpp-postgresql `1.2.0#0` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- boost-geometry `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libcroco `0.6.13#2` -> `0.6.13#2` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- phnt `2019-05-01#0` -> `2019-05-01#0` + - [(#15722)](https://github.com/microsoft/vcpkg/pull/15722) [phnt] Update to 2020-12-21 (by @ghost) +- kf5archive `5.74.0#1` -> `5.74.0#1` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) + - [(#15314)](https://github.com/microsoft/vcpkg/pull/15314) fix licensingfile of kf5archive (by @Hendiadyoin1) +- fxdiv `2021-02-21#0` -> `2021-02-21#0` + - [(#16341)](https://github.com/microsoft/vcpkg/pull/16341) [fxdiv] create a new port (by @luncliff) +- minimp3 `2019-07-24-1#0` -> `2020-12-25#0` + - [(#15295)](https://github.com/microsoft/vcpkg/pull/15295) [minimp3] update to 2020-11-27 (by @JonLiu1993) +- boost-optional `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-metaparse `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-uuid `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libwebsockets `4.1.3#0` -> `4.1.6#0` + - [(#16767)](https://github.com/microsoft/vcpkg/pull/16767) [libwebsockets] Update to v4.1.6 (by @657870) + - [(#17003)](https://github.com/microsoft/vcpkg/pull/17003) [libwebsockets] Fix usage, export include path (by @JackBoosY) + - [(#17253)](https://github.com/microsoft/vcpkg/pull/17253) [libwebsockets] Update dependency (by @NancyLi1013) +- azure-uhttp-c `2020-07-19#0` -> `2020-12-09#0` + - [(#15109)](https://github.com/microsoft/vcpkg/pull/15109) Azure-IoT-Sdk for C release 2020-12-09 (by @ewertons) +- zlib `1.2.11#9` -> `1.2.11#10` + - [(#15725)](https://github.com/microsoft/vcpkg/pull/15725) [aws-cpp-sdk] [zlib] [openssl] [curl] Fix zlib, OpenSSL, curl and AWS SDK for Android (by @ahmedyarub) +- libcuckoo `2018-12-24-1#0` -> `0.3#0` + - [(#14462)](https://github.com/microsoft/vcpkg/pull/14462) [libcuckoo] Update version to v0.3 (by @westfly) +- opencv2 `2.4.13.7#3` -> `2.4.13.7#5` + - [(#12785)](https://github.com/microsoft/vcpkg/pull/12785) [OpenCV] fix compatibility with VTK9 (by @cenit) + - [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) +- libgnutls `#0` -> `#0` + - [(#14242)](https://github.com/microsoft/vcpkg/pull/14242) [many ports] Add GnuTLS and its dependencies (by @wrobelda) + - [(#16810)](https://github.com/microsoft/vcpkg/pull/16810) [libgwenhywfar] new port (by @wrobelda) +- boost-units `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- cub `1.8.0-1#0` -> `1.8.0-1#0` + - [(#17355)](https://github.com/microsoft/vcpkg/pull/17355) [cub] update to 1.12.0 (by @JonLiu1993) +- llgl `2019-08-15#0` -> `2019-08-15#1` + - [(#15366)](https://github.com/microsoft/vcpkg/pull/15366) [LLGL] installs header files in the wrong directory (by @JonLiu1993) +- halide `10.0.0#0` -> `11.0.1#0` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) + - [(#16246)](https://github.com/microsoft/vcpkg/pull/16246) [halide] Update Halide to 11.0.1 (by @alexreinking) +- boost-sort `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-lambda `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- soqt `1.6.0-1#0` -> `1.6.0#2` + - [(#15384)](https://github.com/microsoft/vcpkg/pull/15384) [soqt] Use vcpkg_from_github. (by @BillyONeal) +- fastcdr `1.0.15#0` -> `1.0.15#0` + - [(#17112)](https://github.com/microsoft/vcpkg/pull/17112) [fastcdr] Fix support Linux (by @NancyLi1013) +- amqpcpp `4.1.7#0` -> `4.3.11#0` + - [(#16354)](https://github.com/microsoft/vcpkg/pull/16354) [amqpcpp] update to 4.3.11 (by @JonLiu1993) +- io2d `2020-09-14#1` -> `2020-09-14#1` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) +- boost-assign `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- ampl-mp `2020-11-11#0` -> `2020-11-11#0` + - [(#14245)](https://github.com/microsoft/vcpkg/pull/14245) [vcpkg baseline] Clean up baseline, use Keyword Supports Part 1 (by @JackBoosY) + - [(#14518)](https://github.com/microsoft/vcpkg/pull/14518) [ampl-mp] Update version, separate port ampl-asl and fix arm build (by @JackBoosY) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- armadillo `10.1.0#1` -> `10.1.0#1` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) + - [(#15677)](https://github.com/microsoft/vcpkg/pull/15677) [vcpkg] Miscellaneous internal improvements extracted from #15424 (by @ras0219) + - [(#15973)](https://github.com/microsoft/vcpkg/pull/15973) [vcpkg baseline][armadillo] Update to 10.2.0 and also update the repository (by @NancyLi1013) + - [(#17297)](https://github.com/microsoft/vcpkg/pull/17297) [armadillo] update to <10.4.0> (by @JonLiu1993) +- opentracing `1.6.0#0` -> `1.6.0#0` + - [(#15151)](https://github.com/microsoft/vcpkg/pull/15151) [opentracing] Update VMs 2020-12 (by @BillyONeal) +- libjuice `0.5.2#0` -> `0.6.0#0` + - [(#14213)](https://github.com/microsoft/vcpkg/pull/14213) [libjuice] Update libjuice for libdatachannel port. (by @Nemirtingas) + - [(#17076)](https://github.com/microsoft/vcpkg/pull/17076) Update libjuice to 0.7.1 to update libdatachannel (by @Nemirtingas) +- argparse `2.1#0` -> `2.1#0` + - [(#16527)](https://github.com/microsoft/vcpkg/pull/16527) [argparse] Update to the latest commit (by @JonLiu1993) +- microsoft-signalr `0.1.0-alpha1#2` -> `0.1.0-alpha1#2` + - [(#14872)](https://github.com/microsoft/vcpkg/pull/14872) [microsoft-signalr] Fix build error on Linux (by @NancyLi1013) + - [(#16885)](https://github.com/microsoft/vcpkg/pull/16885) [microsoft-signalr] Update port with new version and find_package support (by @BrennanConroy) +- osg `3.6.5#2` -> `3.6.5#7` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#14790)](https://github.com/microsoft/vcpkg/pull/14790) [osg] Update dependency (by @NancyLi1013) + - [(#15044)](https://github.com/microsoft/vcpkg/pull/15044) [osg] build failure (by @JonLiu1993) + - [(#15374)](https://github.com/microsoft/vcpkg/pull/15374) [osg] fix x64-windows-static-md builds (by @ankurverma85) + - [(#15375)](https://github.com/microsoft/vcpkg/pull/15375) [osgearth] Fix x64-windows-static-md (by @ankurverma85) +- bext-di `1.2.0#0` -> `1.2.0#0` + - [(#16302)](https://github.com/microsoft/vcpkg/pull/16302) [bext-di] Rename `boost-di` to `bext-di` (by @krzysztof-jusiak) +- libsndfile `1.0.30#0` -> `1.0.31#0` + - [(#15953)](https://github.com/microsoft/vcpkg/pull/15953) [libsndfile] Update to 1.0.31 (by @evpobr) +- outcome `2.1.3#0` -> `2.2.0-b9e664fb#0` + - [(#15603)](https://github.com/microsoft/vcpkg/pull/15603) [outcome] Replace Outcome single header based port with full fat cmake install port (by @ned14) + - [(#17362)](https://github.com/microsoft/vcpkg/pull/17362) [Outcome] update to v2.2.0 release. (by @ned14) +- libcopp `1.3.2#0` -> `1.3.3#0` + - [(#14981)](https://github.com/microsoft/vcpkg/pull/14981) [libcopp] update to 1.3.3 (by @owent) + - [(#14997)](https://github.com/microsoft/vcpkg/pull/14997) [libcopp] Update to 1.3.4 (#14996) (by @owent) +- tiff `4.1.0#1` -> `4.1.0#2` + - [(#15734)](https://github.com/microsoft/vcpkg/pull/15734) [tiff] add vcpkg_fixup_pkgconfig for tiff (by @Neumann-A) + - [(#16610)](https://github.com/microsoft/vcpkg/pull/16610) [tiff] support zstd compression in TIFF image files (take 2) (by @ghesketh) +- tool-meson `0.55.3#0` -> `0.56.0#0` + - [(#12945)](https://github.com/microsoft/vcpkg/pull/12945) [meson|scripts] update scripts (by @Neumann-A) + - [(#14344)](https://github.com/microsoft/vcpkg/pull/14344) [tool-meson] Update to 0.56.0 (by @c72578) + - [(#15200)](https://github.com/microsoft/vcpkg/pull/15200) [tool-meson] Rev vcpkg's meson build (by @RichLogan) +- fast-float `0.8.0#0` -> `0.8.0#0` + - [(#16144)](https://github.com/microsoft/vcpkg/pull/16144) [fast-float] Add new port (by @georg-emg) +- physfs `3.0.2#0` -> `3.0.2#0` + - [(#15637)](https://github.com/microsoft/vcpkg/pull/15637) [physfs] Enable arm64 for non-Windows targets (by @past-due) + - [(#15684)](https://github.com/microsoft/vcpkg/pull/15684) [physfs] Fix arm64-windows (by @past-due) +- boost-contract `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- open62541 `1.1.2#0` -> `1.1.2#0` + - [(#16969)](https://github.com/microsoft/vcpkg/pull/16969) [open62541] add amalgamation feature (by @Neumann-A) +- hedley `2019-05-08-1#0` -> `14#0` + - [(#15240)](https://github.com/microsoft/vcpkg/pull/15240) [Hedley] Update to v14 (by @pratikpc) +- rtabmap `0.20.3#0` -> `0.20.3#0` + - [(#14299)](https://github.com/microsoft/vcpkg/pull/14299) [rtabmap] New port (by @seanyen) + - [(#14400)](https://github.com/microsoft/vcpkg/pull/14400) [vcpkg baseline] [rtabmap] Set option dependencies OFF (by @PhoebeHui) + - [(#14426)](https://github.com/microsoft/vcpkg/pull/14426) [vcpkg baseline][rtabmap] Fix dependency issue when build tools (by @PhoebeHui) +- leptonica `1.80.0#1` -> `1.80.0#2` + - [(#14655)](https://github.com/microsoft/vcpkg/pull/14655) [leptonica] add missing dependency (by @cenit) + - [(#16226)](https://github.com/microsoft/vcpkg/pull/16226) [leptonica] now all dependencies have their own find_dependency... (by @cenit) +- oatpp-consul `1.2.0#1` -> `1.2.0#0` + - [(#14341)](https://github.com/microsoft/vcpkg/pull/14341) [oatpp] Add new port and vcpkg.json (by @mheyman) +- box2d `2.4.0#0` -> `2.4.0#0` + - [(#16322)](https://github.com/microsoft/vcpkg/pull/16322) [box2d] update to 2.4.1 (by @JonLiu1993) +- boost `1.74.0#4` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-serialization `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- ompl `1.5.0#1` -> `1.5.1#0` + - [(#15276)](https://github.com/microsoft/vcpkg/pull/15276) [ompl] upgrade to v1.5.1 (by @seanyen) +- liblzma `5.2.5#1` -> `5.2.5#2` + - [(#14615)](https://github.com/microsoft/vcpkg/pull/14615) [liblzma] use upstream CMakeLists.txt + Add pkgconfig. (by @Neumann-A) +- coin `4.0.0#1` -> `4.0.0#2` + - [(#15125)](https://github.com/microsoft/vcpkg/pull/15125) [coin] x64-windows-statid-md fixes (by @ankurverma85) +- gmp `6.2.1#0` -> `6.2.1#0` + - [(#13081)](https://github.com/microsoft/vcpkg/pull/13081) [mpc/mpfr] Add new port / update mpfr (by @Neumann-A) + - [(#15236)](https://github.com/microsoft/vcpkg/pull/15236) [gmp/nettle] Update to latest release revision (by @PhoebeHui) + - [(#15957)](https://github.com/microsoft/vcpkg/pull/15957) [gmp] correct supports field to run CI for other platforms (by @Neumann-A) + - [(#17264)](https://github.com/microsoft/vcpkg/pull/17264) [Gmp] add cflags to build commands for compiletime tools (by @xandox) +- boost-accumulators `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- openmpi `4.0.3#3` -> `4.1.0#0` + - [(#17026)](https://github.com/microsoft/vcpkg/pull/17026) Openmpi keep -isystem flags in configure scripts (by @xandox) +- civetweb `1.13#0` -> `1.13#1` + - [(#15168)](https://github.com/microsoft/vcpkg/pull/15168) [civetweb] Disable extensive log output for debug builds (by @gjasny) +- hazelcast-cpp-client `#0` -> `#0` + - [(#16235)](https://github.com/microsoft/vcpkg/pull/16235) [hazelcast-cpp-client] Add new port (by @ihsandemir) + - [(#16593)](https://github.com/microsoft/vcpkg/pull/16593) [hazelcast-cpp-client] New version update to 4.0.1 (by @ihsandemir) +- boost-signals `1.68.0-1#0` -> `1.68.0-1#0` + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) +- libmariadb `3.1.10#1` -> `3.1.10#5` + - [(#14290)](https://github.com/microsoft/vcpkg/pull/14290) [libmysql/libmariadb] Export unofficial cmake targets (by @JackBoosY) + - [(#14533)](https://github.com/microsoft/vcpkg/pull/14533) [libmariadb] Export target mariadbclient (by @JackBoosY) + - [(#14763)](https://github.com/microsoft/vcpkg/pull/14763) [poco] Fix dependency libmariadb (by @JackBoosY) + - [(#15699)](https://github.com/microsoft/vcpkg/pull/15699) [libmariadb] Fix compiling on ARM64 (by @kotori2) + - [(#17004)](https://github.com/microsoft/vcpkg/pull/17004) [libmariadb] update to the 3.1.12 (by @JonLiu1993) + - [(#17113)](https://github.com/microsoft/vcpkg/pull/17113) [libmariadb] Fix build error with cmake 3.20.0 (by @NancyLi1013) +- freeglut `3.2.1-4#0` -> `3.2.1#5` + - [(#16911)](https://github.com/microsoft/vcpkg/pull/16911) [freeglut] Don't enforce x64 when the compiler is 64 bit (by @davidebeatrici) +- boost-di `1.1.0-1#0` -> `1.2.0#0` + - [(#15286)](https://github.com/microsoft/vcpkg/pull/15286) [boost-di] Update to 1.2.0 (by @PhoebeHui) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- speexdsp `1.2.0#3` -> `1.2.0#5` + - [(#14758)](https://github.com/microsoft/vcpkg/pull/14758) [speexdsp] Update CMake script for macOS/Linux (by @LRFLEW) + - [(#15036)](https://github.com/microsoft/vcpkg/pull/15036) [speexdsp] Fix include directories for Linux builds (by @LRFLEW) + - [(#15585)](https://github.com/microsoft/vcpkg/pull/15585) [speexdsp] Configure and install speexdsp.pc (by @adam-bloom) +- ignition-modularscripts `2020-05-16#2` -> `2020-11-23#0` + - [(#14730)](https://github.com/microsoft/vcpkg/pull/14730) [ignition-msgs*] Fix flaky CI tests for ignition-msgs* ports (take 2) (by @traversaro) +- leaf `0.2.2#0` -> `0.2.2#0` + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- nanodbc `2.13.0#0` -> `2.13.0#2` + - [(#16045)](https://github.com/microsoft/vcpkg/pull/16045) Nanodbc/fix/config cmake files path linux (by @samyy321) +- mongoose `6.15-2#0` -> `6.15-2#0` + - [(#16493)](https://github.com/microsoft/vcpkg/pull/16493) [mongoose] update to 7.1 (by @JonLiu1993) +- boost-histogram `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- kf5config `5.64.0#0` -> `5.64.0#0` + - [(#13467)](https://github.com/microsoft/vcpkg/pull/13467) [many ports] Update existing KF5 frameworks to 5.75 (by @wrobelda) +- boost-smart-ptr `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- boost-atomic `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- moos-core `10.4.0-4#0` -> `10.4.0#5` + - [(#14884)](https://github.com/microsoft/vcpkg/pull/14884) [vcpkg baseline][vtk-m] fix the sha512 (by @strega-nil) +- libpq `12.2#8` -> `12.2#12` + - [(#14626)](https://github.com/microsoft/vcpkg/pull/14626) [libpq/ffmpeg] Fix iconv/intl linkage not covered by CI (by @Neumann-A) + - [(#15361)](https://github.com/microsoft/vcpkg/pull/15361) [libpq] Change compile flag /Zi to /Z7 when building Windows (by @JackBoosY) + - [(#15579)](https://github.com/microsoft/vcpkg/pull/15579) [libpq] fix python patches (by @Neumann-A) + - [(#15748)](https://github.com/microsoft/vcpkg/pull/15748) [libpq] Fix install tool pg_config on Linux (by @JackBoosY) + - [(#16434)](https://github.com/microsoft/vcpkg/pull/16434) [libpq] fix filenames (linux -> windows cross compile) (by @autoantwort) + - [(#16651)](https://github.com/microsoft/vcpkg/pull/16651) [drogon] Update to 1.4.1 (by @an-tao) + - [(#16740)](https://github.com/microsoft/vcpkg/pull/16740) [libpq] mingw support (by @longnguyen2004) + - [(#17232)](https://github.com/microsoft/vcpkg/pull/17232) [libpq] Fix cmake wrapper on Windows, add usage (by @JackBoosY) +- protopuf `1.0.0#0` -> `1.0.0#0` + - [(#14446)](https://github.com/microsoft/vcpkg/pull/14446) [protopuf] Add a new port protopuf (by @PragmaTwice) + - [(#16459)](https://github.com/microsoft/vcpkg/pull/16459) [protopuf] Update to 1.0.1 (by @PragmaTwice) +- blend2d `beta_2020-08-24#0` -> `beta_2021-01-02#0` + - [(#15672)](https://github.com/microsoft/vcpkg/pull/15672) [blend2d] Update to beta_2021-01-02 (by @ZeeWanderer) + - [(#16804)](https://github.com/microsoft/vcpkg/pull/16804) [blend2d] Update to beta_2021-03-17 (by @ZeeWanderer) +- ecos `2.0.7#0` -> `2.0.8#0` + - [(#17471)](https://github.com/microsoft/vcpkg/pull/17471) [ecos] Update ecos library version to 2.0.8 (by @csorvagep) +- boost-date-time `1.75.0#0` -> `1.75.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) + - [(#16479)](https://github.com/microsoft/vcpkg/pull/16479) [many ports] Apply host dependencies (by @ras0219) +- geotrans `3.7#0` -> `3.8#0` + - [(#14412)](https://github.com/microsoft/vcpkg/pull/14412) [geotrans] update to version 3.8 (on-hold waiting for CI/VM port 21 for ftp to be opened or alternate host site) (by @StarGate-One) +- lapack `3#0` -> `3#1` + - [(#13448)](https://github.com/microsoft/vcpkg/pull/13448) [BLAS] add metaport (by @cenit) +- boost-multiprecision `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- qt5-multimedia `5.15.1#0` -> `5.15.2#0` + - [(#14678)](https://github.com/microsoft/vcpkg/pull/14678) [qt5] Update to 5.15.2 (by @Neumann-A) +- flashlight-cpu `20210111#0` -> `20210111#0` + - [(#15514)](https://github.com/microsoft/vcpkg/pull/15514) [flashlight-cpu] New port (by @jacobkahn) + - [(#17432)](https://github.com/microsoft/vcpkg/pull/17432) [flashlight-cpu] Update port to v0.3 (by @jacobkahn) +- boost-interprocess `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- pthreadpool `#0` -> `#0` + - [(#16342)](https://github.com/microsoft/vcpkg/pull/16342) [pthreadpool] create a new port (by @luncliff) + - [(#17196)](https://github.com/microsoft/vcpkg/pull/17196) [pthreadpool] update sources and support find_package (by @luncliff) +- boost-ratio `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- libarchive `3.4.3#1` -> `3.4.3#3` + - [(#14535)](https://github.com/microsoft/vcpkg/pull/14535) [libarchive] Fix dependencies, combine patches (by @JackBoosY) + - [(#14579)](https://github.com/microsoft/vcpkg/pull/14579) [baseline][libarchive] : regression fix (by @Matioupi) + - [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) + - [(#16082)](https://github.com/microsoft/vcpkg/pull/16082) [libarchive] Fix static linking dependencies (by @DDoSolitary) + - [(#16957)](https://github.com/microsoft/vcpkg/pull/16957) [libarchive] Remove lzo from the default feature list (by @PhoebeHui) +- fakeit `#0` -> `#0` + - [(#16875)](https://github.com/microsoft/vcpkg/pull/16875) [fakeit] add new port (by @autoantwort) +- dartsim `6.9.4#0` -> `6.9.4#0` + - [(#17331)](https://github.com/microsoft/vcpkg/pull/17331) Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (by @BillyONeal) +- tesseract `4.1.1#1` -> `4.1.1#7` + - [(#11776)](https://github.com/microsoft/vcpkg/pull/11776) [intl/gettext/fontconfig] update to native build system (by @Neumann-A) + - [(#12785)](https://github.com/microsoft/vcpkg/pull/12785) [OpenCV] fix compatibility with VTK9 (by @cenit) + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14650)](https://github.com/microsoft/vcpkg/pull/14650) [tesseract] Enable dynamic build, format portfile.cmake (by @JackBoosY) + - [(#15089)](https://github.com/microsoft/vcpkg/pull/15089) [libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (by @cenit) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) +- atkmm `2.24.2#3` -> `2.24.2#5` + - [(#13100)](https://github.com/microsoft/vcpkg/pull/13100) [glib up to gtk] update and make it work with meson (by @Neumann-A) + - [(#14988)](https://github.com/microsoft/vcpkg/pull/14988) [GLIBMM] Installing .pc file (by @faserg1) + - [(#15353)](https://github.com/microsoft/vcpkg/pull/15353) Build results from 2020-12-27 (by @BillyONeal) +- restc-cpp `#0` -> `#0` + - [(#15739)](https://github.com/microsoft/vcpkg/pull/15739) [restc-cpp] new port (by @lejcik) +- log4cxx `0.11.0#1` -> `0.11.0#2` + - [(#16018)](https://github.com/microsoft/vcpkg/pull/16018) [log4cxx] Fix dependency and pkgconfig (by @NancyLi1013) +- libdjinterop `0.14.6#0` -> `0.14.6#0` + - [(#15990)](https://github.com/microsoft/vcpkg/pull/15990) [libdjinterop] add new port with version 0.14.6 (by @Be-ing) +- opencl `2.2#4` -> `2.2#7` + - [(#14536)](https://github.com/microsoft/vcpkg/pull/14536) [opencl] Remove feature wdk (by @PhoebeHui) + - [(#15445)](https://github.com/microsoft/vcpkg/pull/15445) [opencl] Fix dynamic build on linux (by @dweckmann) + - [(#15787)](https://github.com/microsoft/vcpkg/pull/15787) [ffmpeg] Add support for dav1d,fontconfig,freetype,fribidi,ilbc,modplug,opengl,openjpeg,libssh,tensorflow,tesseract,webp,libxml2 dependencies. (by @Sibras) +- ngspice `34#1` -> `34#1` + - [(#15837)](https://github.com/microsoft/vcpkg/pull/15837) [ngspice] Update to rev 33 (by @marekr) + - [(#15882)](https://github.com/microsoft/vcpkg/pull/15882) [ngspice] build codemodel extension libraries (by @marekr) + - [(#16008)](https://github.com/microsoft/vcpkg/pull/16008) [ngspice] Update to rev 34 (by @marekr) + - [(#16131)](https://github.com/microsoft/vcpkg/pull/16131) [ngspice] fix win32 codemodel glob (by @marekr) +- boost-compatibility `1.74.0#0` -> `1.74.0#0` + - [(#14089)](https://github.com/microsoft/vcpkg/pull/14089) [boost] Update to 1.74.0 (by @niclar) + - [(#14969)](https://github.com/microsoft/vcpkg/pull/14969) [icu] mingw support + [mp3lame] Fix VCPKG_TARGET_STATIC_LIBRARY_SUFFIX (by @longnguyen2004) + - [(#15090)](https://github.com/microsoft/vcpkg/pull/15090) [boost] update to 1.75.0 (by @yurybura) + - [(#15616)](https://github.com/microsoft/vcpkg/pull/15616) [boost][many ports] Reformat manifest files in preparation for #15424 (by @ras0219) +- osg-qt `Qt4#3` -> `Qt4#3` + - [(#14422)](https://github.com/microsoft/vcpkg/pull/14422) [osg-qt] Fix installation when building static on Windows (by @JackBoosY) + - [(#14761)](https://github.com/microsoft/vcpkg/pull/14761) update osg-qt from Qt4 tag to master branch(Qt5) (by @ZgblKylin) +- sdl2-gfx `1.0.4-6#0` -> `1.0.4#7` + - [(#14348)](https://github.com/microsoft/vcpkg/pull/14348) [libsamplerate, sdl2-gfx] Fix build error with Visual Studio 2019 version 16.8 (by @LilyWangL) +- metrohash `1.1.3#0` -> `1.1.3#0` + - [(#15715)](https://github.com/microsoft/vcpkg/pull/15715) [metrohash] support Android triplet build (by @luncliff) + - [(#16035)](https://github.com/microsoft/vcpkg/pull/16035) [metrohash] support iOS triplets (by @luncliff) + - [(#16553)](https://github.com/microsoft/vcpkg/pull/16553) [metrohash] support more triplets by excluding 128 CRC source (by @luncliff) +- libhv `#0` -> `#0` + - [(#16460)](https://github.com/microsoft/vcpkg/pull/16460) [libhv] Add new port (by @ithewei) + - [(#16835)](https://github.com/microsoft/vcpkg/pull/16835) [libhv] Add DISABLE_PARALLEL (by @NancyLi1013) + - [(#17331)](https://github.com/microsoft/vcpkg/pull/17331) Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (by @BillyONeal) +- libodb-mysql `2.4.0-7#0` -> `2.4.0-7#0` + - [(#16975)](https://github.com/microsoft/vcpkg/pull/16975) [libodb-mysql] Fix usage (by @JackBoosY) +- termcolor `1.0.1#0` -> `1.0.1#0` + - [(#14897)](https://github.com/microsoft/vcpkg/pull/14897) [termcolor]; Add termcolor (by @theidexisted) + - [(#16824)](https://github.com/microsoft/vcpkg/pull/16824) [termcolor] update to 2.0.0 (by @JonLiu1993) +- eastl `3.16.07#0` -> `3.17.03#0` + - [(#14980)](https://github.com/microsoft/vcpkg/pull/14980) [EASTL] update to 3.17.03 (by @JonLiu1993) + +
+ +-- vcpkg team vcpkg@microsoft.com Sat, 01 May 00:00:00 -0700 + +vcpkg (2020.11.03) +--- +#### Total port count: 1519 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1374| +|x86-windows|1346| +|**x64-linux**|1269| +|x64-windows-static|1266| +|**x64-osx**|1202| +|arm64-windows|985| +|x64-uwp|753| +|arm-uwp|711| + +##### The following documentation has been updated: +- [Selecting Library Features](docs/users/selecting-library-features.md) ***[NEW]*** + - [(#14189)](https://github.com/microsoft/vcpkg/pull/14189) [vcpkg] User help: selecting-library-features.md (by @vmiheer) + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#14317)](https://github.com/microsoft/vcpkg/pull/14317) [vcpkg] Fix incorrect determination of PowerShell not found (by @BillyONeal) +- [(#14206)](https://github.com/microsoft/vcpkg/pull/14206) [vcpkg] Add tab completion for Fish (by @Link1J) +- [(#14367)](https://github.com/microsoft/vcpkg/pull/14367) Add CHANGELOG up to 2020.11.01 (by @vicroms) +- [(#14366)](https://github.com/microsoft/vcpkg/pull/14366) [vcpkg] Disable vcpkg_copy_tool_dependencies on non-Windows (by @BillyONeal) + +
+The following 1 ports have been added: + +|port|version| +|---|---| +|[elfio](https://github.com/microsoft/vcpkg/pull/14314)| 3.8#0 +
+ +
+The following 0 ports have been updated: + +
+ +-- vcpkg team vcpkg@microsoft.com TUE, 03 Nov 14:35:00 -0800 + +vcpkg (2020.11.01) +--- +#### Total port count: 1519 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1374| +|x86-windows|1346| +|**x64-linux**|1269| +|x64-windows-static|1266| +|**x64-osx**|1202| +|arm64-windows|985| +|x64-uwp|753| +|arm-uwp|711| + +#### The following commands and options have been updated: +- [Environment and Configuration](docs/users/config-environment.md) + - [(#12640)](https://github.com/microsoft/vcpkg/pull/12640) [vcpkg] add environment variable VCPKG_OVERLAY_PORTS (by @Neumann-A) + - [(#12790)](https://github.com/microsoft/vcpkg/pull/12790) [vcpkg] add env var VCPKG_OVERLAY_TRIPLETS (by @Neumann-A) +- [Package Federation: Custom Registries](docs/specifications/registries.md)***[NEW]*** + - [(#12881)](https://github.com/microsoft/vcpkg/pull/12881) [vcpkg RFC] initial registries RFC (by @strega-nil) +- [Manifest Mode](docs/users/manifests.md)***[NEW]*** + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @strega-nil) + - [(#13578)](https://github.com/microsoft/vcpkg/pull/13578) Fix feature flags option typo (by @strega-nil) + - [(#13399)](https://github.com/microsoft/vcpkg/pull/13399) [vcpkg] Further JSON error improvements (by @strega-nil) +- [Binary Caching](docs/users/binarycaching.md)***[NEW]*** + - [(#13517)](https://github.com/microsoft/vcpkg/pull/13517) [vcpkg-docs] Add docs/users/binarycaching.md (by @ras0219) + - [(#13641)](https://github.com/microsoft/vcpkg/pull/13641) [vcpkg-docs] Add note about GitHub hosted agents (by @ras0219) + +#### The following documentation has been updated: +- [Buildsystem Integration](docs/users/integration.md) + - [(#12145)](https://github.com/microsoft/vcpkg/pull/12145) [vcpkg] Update message in bootstrap.ps1 (by @PhoebeHui) + - [(#12873)](https://github.com/microsoft/vcpkg/pull/12873) [vcpkg] Fix bullet lists for integration.md on readthedocs.io (by @PhoebeHui) +- [vcpkg_from_sourceforge](docs/maintainers/vcpkg_from_sourceforge.md) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) (by @JackBoosY) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @JackBoosY) +- [Installing and Using Packages Example: SQLite](docs/examples/installing-and-using-packages.md) + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: (by @ras0219) +- [Packaging Zipfiles Example: zlib](docs/examples/packaging-zipfiles.md) + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @ras0219) +- [Patching Example: Patching libpng to work for x64-uwp](docs/examples/patching.md) + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @ras0219) +- [CONTROL files](docs/maintainers/control-files.md) + - [(#12227)](https://github.com/microsoft/vcpkg/pull/12227) [vcpkg manifests] fix some issues (by @strega-nil) + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @strega-nil) +- [Portfile helper functions](docs/maintainers/portfile-functions.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) + - [(#13065)](https://github.com/microsoft/vcpkg/pull/13065) Delete use of vcpkg_test_cmake and vcpkg_common_functions. (by @ras0219) +- [vcpkg_build_make](docs/maintainers/vcpkg_build_make.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_common_definitions](docs/maintainers/vcpkg_common_definitions.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_configure_make](docs/maintainers/vcpkg_configure_make.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_find_acquire_program](docs/maintainers/vcpkg_find_acquire_program.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) + - [(#12396)](https://github.com/microsoft/vcpkg/pull/12396) [chromium-base] Add new port (by @ras0219) +- [vcpkg_fixup_pkgconfig](docs/maintainers/vcpkg_fixup_pkgconfig.md)***[NEW]*** + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [Binary Caching v1.1](docs/specifications/binarycaching.md)***[NEW]*** + - [(#11204)](https://github.com/microsoft/vcpkg/pull/11204) [vcpkg] RFC: Binarycaching (by @ras0219-msft) + - [(#13517)](https://github.com/microsoft/vcpkg/pull/13517) [vcpkg-docs] Add docs/users/binarycaching.md (by @ras0219-msft) +- [Triplet files](docs/users/triplets.md) + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 (by @Squareys) + - [(#11290)](https://github.com/microsoft/vcpkg/pull/11290) [vcpkg] #11129: Add VCPKG_LINKER_FLAGS_. (by @Squareys) + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @Squareys) +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#12460)](https://github.com/microsoft/vcpkg/pull/12460) [vcpkg] Improve format check failure message (by @JackBoosY) + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @JackBoosY) +- [vcpkg_check_linkage](docs/maintainers/vcpkg_check_linkage.md) + - [(#12624)](https://github.com/microsoft/vcpkg/pull/12624) Fix .gitignore excluding triplets/community, sort, and driveby vcpkg_check_linkage.md doc bug. (by @BillyONeal) +- [Overlay triplets example](docs/examples/overlay-triplets-linux-dynamic.md) + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: (by @PhoebeHui) +- [vcpkg_configure_cmake](docs/maintainers/vcpkg_configure_cmake.md) + - [(#12846)](https://github.com/microsoft/vcpkg/pull/12846) [vcpkg_configure_cmake] Pass CMAKE_DISABLE_SOURCE_CHANGES to all ports by default (by @ras0219) +- [execute_process](docs/maintainers/execute_process.md) + - [(#12926)](https://github.com/microsoft/vcpkg/pull/12926) [execute_process] Don't strip embedded semicolons (by @jgehw) +- [Layout of the vcpkg source tree](docs/tool-maintainers/layout.md) + - [(#13421)](https://github.com/microsoft/vcpkg/pull/13421) [vcpkg] Merge the vcpkg metadata uploader into the vcpkg binary (by @BillyONeal) +- [Manifest Mode: CMake Example](docs/examples/manifest-mode-cmake.md)***[NEW]*** + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @strega-nil) +- [Packaging Github Repos Example: libogg](docs/examples/packaging-github-repos.md) + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @strega-nil) +- [Quick Start](docs/README.md) + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @strega-nil) +- [Manifest files - `vcpkg.json`](docs/maintainers/manifest-files.md)***[NEW]*** + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @strega-nil) +- [Vcpkg PR Checklist](docs/maintainers/pr-review-checklist.md) + - [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @strega-nil) + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#12172)](https://github.com/microsoft/vcpkg/pull/12172) [vcpkg ci] add macos scripts to vcpkg repo (by @strega-nil) +- [(#12176)](https://github.com/microsoft/vcpkg/pull/12176) [vcpkg] VM Update (by @BillyONeal) +- [(#12138)](https://github.com/microsoft/vcpkg/pull/12138) [vcpkg] Implement --x-write-nuget-packages-config= setting for `install` and `x-set-installed` (by @ras0219) +- [(#12192)](https://github.com/microsoft/vcpkg/pull/12192) Fix sourceparagraph:BooleanField (by @strega-nil) +- [(#12191)](https://github.com/microsoft/vcpkg/pull/12191) Don't change manifest root when manifest isn't enabled. (by @dada2048) +- [(#12170)](https://github.com/microsoft/vcpkg/pull/12170) [vcpkg] Enable NuGet-based binary caching via mono (by @ras0219) +- [(#12145)](https://github.com/microsoft/vcpkg/pull/12145) [vcpkg] Update message in bootstrap.ps1 (by @PhoebeHui) +- [(#12201)](https://github.com/microsoft/vcpkg/pull/12201) [vcpkg] Remove all uses of Foo::Foo() noexcept = default; to fix #9955 (by @ras0219) +- [(#12203)](https://github.com/microsoft/vcpkg/pull/12203) [vcpkg] Improve performance of compiler tracking (by @ras0219) +- [(#12212)](https://github.com/microsoft/vcpkg/pull/12212) [msbuild] Revert the importance to Normal (by @PhoebeHui) +- [(#12197)](https://github.com/microsoft/vcpkg/pull/12197) [vcpkg] Remove the tombstones and 'ignore' baseline concepts. (by @BillyONeal) +- [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) (by @JackBoosY) +- [(#4608)](https://github.com/microsoft/vcpkg/pull/4608) [vcpkg] Use IncludePath and LibraryPath properties (by @FrankHeimes) +- [(#12242)](https://github.com/microsoft/vcpkg/pull/12242) [vcpkg] Remove use of std::variant and std::visit to fix VS2015. (by @ras0219) +- [(#12272)](https://github.com/microsoft/vcpkg/pull/12272) [vcpkg] Revert change which causes sources to be purged by default in `vcpkg build` (by @ras0219) +- [(#12263)](https://github.com/microsoft/vcpkg/pull/12263) [vcpkg] Update toolsrc VERSION to 2020.06.15 (by @c72578) +- [(#12232)](https://github.com/microsoft/vcpkg/pull/12232) [opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. (by @BillyONeal) +- [(#12219)](https://github.com/microsoft/vcpkg/pull/12219) [openvr] Update to 1.12.5 (by @RT222) +- [(#12177)](https://github.com/microsoft/vcpkg/pull/12177) [vcpkg] Added python script to generate all packages file list, added to azur… (by @yaoleo34) +- [(#12101)](https://github.com/microsoft/vcpkg/pull/12101) [vcpkg] Add mingw dynamic libs triplet (by @longnguyen2004) +- [(#11655)](https://github.com/microsoft/vcpkg/pull/11655) [vcpkg] Format the C++ in CI (by @strega-nil) +- [(#12093)](https://github.com/microsoft/vcpkg/pull/12093) [vcpkg docs] new README/Quick Start guide (by @strega-nil) +- [(#12300)](https://github.com/microsoft/vcpkg/pull/12300) [libbson, vcpkg baseline] Remove passing and fix spurious failure. (by @BillyONeal) +- [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) +- [(#12140)](https://github.com/microsoft/vcpkg/pull/12140) [simdjson] Update to 0.4.6 (by @myd7349) +- [(#11967)](https://github.com/microsoft/vcpkg/pull/11967) [evpp] Fix build error on OSX (by @JackBoosY) +- [(#12314)](https://github.com/microsoft/vcpkg/pull/12314) [vcpkg ci] Update formatting CI (by @strega-nil) +- [(#12259)](https://github.com/microsoft/vcpkg/pull/12259) [triplets][osx] add support for arm64 'apple silicon' (by @eklipse2k8) +- [(#11754)](https://github.com/microsoft/vcpkg/pull/11754) [pcre2] Update to 10.35 (by @c72578) +- [(#11753)](https://github.com/microsoft/vcpkg/pull/11753) Fix support for toolchains that set CMAKE_FIND_ROOT_PATH_MODE_* variables to ONLY (by @traversaro) +- [(#12317)](https://github.com/microsoft/vcpkg/pull/12317) [vcpkg README] Fix links (by @strega-nil) +- [(#12319)](https://github.com/microsoft/vcpkg/pull/12319) [vcpkg.targets] Fix #12292 regression with MSBuild targets (by @ras0219-msft) +- [(#12323)](https://github.com/microsoft/vcpkg/pull/12323) [vcpkg] Ignore dependencies not found errors when downloading mode (by @JackBoosY) +- [(#12257)](https://github.com/microsoft/vcpkg/pull/12257) [vcpkg] Fix MSBuild regressions #12062 and #12086. (by @ras0219) +- [(#12037)](https://github.com/microsoft/vcpkg/pull/12037) [freerdp] Fix x64-osx triplet (by @AlexAltea) +- [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. (by @Neumann-A) +- [(#12227)](https://github.com/microsoft/vcpkg/pull/12227) [vcpkg manifests] fix some issues (by @strega-nil) +- [(#8322)](https://github.com/microsoft/vcpkg/pull/8322) [kfr] Add new port (by @myd7349) +- [(#12244)](https://github.com/microsoft/vcpkg/pull/12244) [cuda] correct env variables for newer cuda versions (by @Neumann-A) +- [(#12256)](https://github.com/microsoft/vcpkg/pull/12256) [vcpkg] Move default binary cache from `$root/archives` to user-wide directory (by @ras0219) +- [(#12350)](https://github.com/microsoft/vcpkg/pull/12350) [vcpkg] Remove unnecessary work queue (by @strega-nil) +- [(#12367)](https://github.com/microsoft/vcpkg/pull/12367) [vcpkg build] fix #12355 (by @strega-nil) +- [(#12369)](https://github.com/microsoft/vcpkg/pull/12369) [vcpkg formatting] Fix format regex (by @strega-nil) +- [(#12178)](https://github.com/microsoft/vcpkg/pull/12178) [vcpkg] Add a schema file for vcpkg.json (by @Edhebi) +- [(#12370)](https://github.com/microsoft/vcpkg/pull/12370) [vcpkg] Enable binary caching by default (by @ras0219) +- [(#12386)](https://github.com/microsoft/vcpkg/pull/12386) [vcpkg] Add CMake heuristics for header-only libraries (by @ras0219) +- [(#12366)](https://github.com/microsoft/vcpkg/pull/12366) [vcpkg] Improve informational message for `--editable` while cleaning sources (by @ras0219) +- [(#12378)](https://github.com/microsoft/vcpkg/pull/12378) [vcpkg] proper errorcheck during files installation (by @Maximus5) +- [(#12384)](https://github.com/microsoft/vcpkg/pull/12384) [vcpkg-ci] Always publish file lists (by @ras0219) +- [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [(#12361)](https://github.com/microsoft/vcpkg/pull/12361) [vcpkg] Fix iOS toolchain detection when using the iOS community triplets (by @alcroito) +- [(#12398)](https://github.com/microsoft/vcpkg/pull/12398) [libb2] Add supports and install pkg-conifg on macOS VM (by @PhoebeHui) +- [(#12368)](https://github.com/microsoft/vcpkg/pull/12368) [vcpkg formatting] Turn off DeriveLineEnding (by @strega-nil) +- [(#12429)](https://github.com/microsoft/vcpkg/pull/12429) [vcpkg] Fix ParagraphParser::required_field() (by @maksqwe) +- [(#12400)](https://github.com/microsoft/vcpkg/pull/12400) [vcpkg] implement copy_symlink working for non-elevated processes (by @Maximus5) +- [(#12432)](https://github.com/microsoft/vcpkg/pull/12432) vcpkg_configure_make: typo fix '_vcpkg_append_to_configure_environment' (by @kevinlul) +- [(#12351)](https://github.com/microsoft/vcpkg/pull/12351) [vcpkg] Clean up command switch code (by @strega-nil) +- [(#12179)](https://github.com/microsoft/vcpkg/pull/12179) [vcpkg] print list in json (by @dan-shaw) +- [(#12084)](https://github.com/microsoft/vcpkg/pull/12084) Build fix with MinGW GCC 9.2.0 (by @cristianadam) +- [(#12455)](https://github.com/microsoft/vcpkg/pull/12455) [libmicrohttpd] Add `platform.h` to restricted header list. (by @ras0219) +- [(#12468)](https://github.com/microsoft/vcpkg/pull/12468) [vcpkg] Add NVTOOLSEXT_PATH to the env passthrough list (by @Neumann-A) +- [(#12534)](https://github.com/microsoft/vcpkg/pull/12534) Add initial s390x support (by @lebdron) +- [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries (by @Neumann-A) +- [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 (by @cenit) +- [(#12467)](https://github.com/microsoft/vcpkg/pull/12467) [vcpkg-acquire-msys] Install new keyring (by @emptyVoid) +- [(#9561)](https://github.com/microsoft/vcpkg/pull/9561) [libusb] Fix issue to support linux (by @PhoebeHui) +- [(#12460)](https://github.com/microsoft/vcpkg/pull/12460) [vcpkg] Improve format check failure message (by @JackBoosY) +- [(#9248)](https://github.com/microsoft/vcpkg/pull/9248) fix issue #9228 : Add support to subgroups in gitlab (by @RamadanAhmed) +- [(#12513)](https://github.com/microsoft/vcpkg/pull/12513) [vcpkg] EOL LF for ci.baseline.txt (by @Neumann-A) +- [(#8628)](https://github.com/microsoft/vcpkg/pull/8628) [marble] Add new port (by @ig-or) +- [(#12118)](https://github.com/microsoft/vcpkg/pull/12118) [mozjpeg] fix build (by @saucecontrol) +- [(#12530)](https://github.com/microsoft/vcpkg/pull/12530) [libmodbus] Fix static linkage error (by @NancyLi1013) +- [(#12514)](https://github.com/microsoft/vcpkg/pull/12514) [mpir] Fix build error if VCPKG_BUILD_TYPE is set as release or debug (by @NancyLi1013) +- [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build (by @JackBoosY) +- [(#12569)](https://github.com/microsoft/vcpkg/pull/12569) [vcpkg_fixup_pkgconfig] Remove required in first find_program call for pkg-config (by @Neumann-A) +- [(#12097)](https://github.com/microsoft/vcpkg/pull/12097) Fix vcpkg android toolchain so it adds flags that aren't just ignored (by @jamiebk) +- [(#11021)](https://github.com/microsoft/vcpkg/pull/11021) [rsocket] Add new port (by @curoky) +- [(#12104)](https://github.com/microsoft/vcpkg/pull/12104) Fix vcpkg_fixup_cmake_targets to work correctly on MinGW (by @koprok) +- [(#12661)](https://github.com/microsoft/vcpkg/pull/12661) [vcpkg] Fix typo in link for installing and using packages (by @varunagrawal) +- [(#12639)](https://github.com/microsoft/vcpkg/pull/12639) [vcpkg-ci] fix macos setup scripts (by @strega-nil) +- [(#12586)](https://github.com/microsoft/vcpkg/pull/12586) [vcpkg] Fix build on Windows 8.1 SDK (by @strega-nil) +- [(#12585)](https://github.com/microsoft/vcpkg/pull/12585) [vcpkg] Refactor Commands: Part 1 (by @strega-nil) +- [(#10770)](https://github.com/microsoft/vcpkg/pull/10770) [cmake] Add cmake port to test qt (by @Neumann-A) +- [(#10786)](https://github.com/microsoft/vcpkg/pull/10786) [tomlplusplus] Add new port (by @traversaro) +- [(#12641)](https://github.com/microsoft/vcpkg/pull/12641) Refactor commands 2: Electric Boogaloo (by @strega-nil) +- [(#12548)](https://github.com/microsoft/vcpkg/pull/12548) [vcpkg manifest] look at `platform` directives (by @strega-nil) +- [(#12494)](https://github.com/microsoft/vcpkg/pull/12494) [qt-webengine] Fix building with vs2017 (by @Neumann-A) +- [(#11376)](https://github.com/microsoft/vcpkg/pull/11376) [avro-cpp] new port (by @alexander-smyslov) +- [(#11535)](https://github.com/microsoft/vcpkg/pull/11535) [mpg123] Allow cross-compiling, fix previous builds tainting rebuilds (by @kevinlul) +- [(#12624)](https://github.com/microsoft/vcpkg/pull/12624) Fix .gitignore excluding triplets/community, sort, and driveby vcpkg_check_linkage.md doc bug. (by @BillyONeal) +- [(#12423)](https://github.com/microsoft/vcpkg/pull/12423) [vcpkg] Add environment variable VCPKG_DEFAULT_BINARY_CACHE (by @Neumann-A) +- [(#10670)](https://github.com/microsoft/vcpkg/pull/10670) [vcpkg] Fix [boost] find_package for MSVC2013 / v120 (by @ManuelKugelmann) +- [(#12549)](https://github.com/microsoft/vcpkg/pull/12549) [vcpkg manifest] add feature support (by @strega-nil) +- [(#12471)](https://github.com/microsoft/vcpkg/pull/12471) [vcpkg format-manifest] Add convert-control flag (by @strega-nil) +- [(#11208)](https://github.com/microsoft/vcpkg/pull/11208) [ITK] Update to 5.1 (by @Neumann-A) +- [(#12640)](https://github.com/microsoft/vcpkg/pull/12640) [vcpkg] add environment variable VCPKG_OVERLAY_PORTS (by @Neumann-A) +- [(#12742)](https://github.com/microsoft/vcpkg/pull/12742) [wavpack] Fix failure on linux and osx (by @PhoebeHui) +- [(#12727)](https://github.com/microsoft/vcpkg/pull/12727) [msbuild] Revert the importance to Normal (by @PhoebeHui) +- [(#12717)](https://github.com/microsoft/vcpkg/pull/12717) [vcpkg] Fix prettify output not working in some cases (by @Deadpikle) +- [(#12715)](https://github.com/microsoft/vcpkg/pull/12715) [vcpkg] Add VCPKG_TARGET_IS_IOS (by @Deadpikle) +- [(#12716)](https://github.com/microsoft/vcpkg/pull/12716) [vcpkg] Fix arm64-osx triplet not building for arm64 (by @Deadpikle) +- [(#12701)](https://github.com/microsoft/vcpkg/pull/12701) [vcpkg-ci-paraview] move into scripts/test_ports (by @Neumann-A) +- [(#12699)](https://github.com/microsoft/vcpkg/pull/12699) [vcpkg baseline] remove qt translations from skip list (by @Neumann-A) +- [(#12695)](https://github.com/microsoft/vcpkg/pull/12695) [ngspice] Initial port (by @marekr) +- [(#12678)](https://github.com/microsoft/vcpkg/pull/12678) [vcpkg] Add missing check for x86 (by @arves100) +- [(#12752)](https://github.com/microsoft/vcpkg/pull/12752) [vcpkg_build_qmake] Disable multi-threaded build when file fails to open (by @JackBoosY) +- [(#12789)](https://github.com/microsoft/vcpkg/pull/12789) [vcpkg] Fix vs2015 build (by @strega-nil) +- [(#12312)](https://github.com/microsoft/vcpkg/pull/12312) [fmt] Update to 7.0.2 + [spdlog] Update to 1.7.0 (by @kevinlul) +- [(#12515)](https://github.com/microsoft/vcpkg/pull/12515) [pangolin] Fix build failure on UNIX (by @JackBoosY) +- [(#12792)](https://github.com/microsoft/vcpkg/pull/12792) [log4cpp] Fix header file install path (by @LilyWangL) +- [(#12784)](https://github.com/microsoft/vcpkg/pull/12784) [gSoap] Update to 2.8.105 and add a required shared directory (by @xgcssch) +- [(#12768)](https://github.com/microsoft/vcpkg/pull/12768) [libtorrent] Update to 1.2.8 (by @FranciscoPombal) +- [(#12762)](https://github.com/microsoft/vcpkg/pull/12762) [boost] Add Supports fields and more accurately handle arm64-windows/x64-uwp (by @ras0219) +- [(#12630)](https://github.com/microsoft/vcpkg/pull/12630) [secp256k1] Fix build failures and export cmake targets (by @PhoebeHui) +- [(#12524)](https://github.com/microsoft/vcpkg/pull/12524) [asmjit] Update to the latest commit (by @ZehMatt) +- [(#12528)](https://github.com/microsoft/vcpkg/pull/12528) [libass] Fix build error on x64-windows-static (by @LilyWangL) +- [(#12634)](https://github.com/microsoft/vcpkg/pull/12634) [vcpkg] Improving android support (by @christophe-calmejane) +- [(#9162)](https://github.com/microsoft/vcpkg/pull/9162) [crashrpt] Add new port (by @tbdrake) +- [(#12810)](https://github.com/microsoft/vcpkg/pull/12810) [vcpkg] Make C++ the primary github language (by @strega-nil) +- [(#12198)](https://github.com/microsoft/vcpkg/pull/12198) [vcpkg] Add `vcpkg export` to E2E tests. Enable E2E tests on all platforms. (by @ras0219) +- [(#12698)](https://github.com/microsoft/vcpkg/pull/12698) [vcpkg] Rewrite CMake build system to be more target-based (by @strega-nil) +- [(#12776)](https://github.com/microsoft/vcpkg/pull/12776) [vcpkg_copy_tool_dependencies] Use vcpkg internal powershell (by @JackBoosY) +- [(#12805)](https://github.com/microsoft/vcpkg/pull/12805) [lapack-reference|fortran] Add new port (by @Neumann-A) +- [(#12829)](https://github.com/microsoft/vcpkg/pull/12829) [vcpkg] Fix resolution of default features when using Manifest mode (by @ras0219) +- [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues (by @Neumann-A) +- [(#12818)](https://github.com/microsoft/vcpkg/pull/12818) [constexpr-contracts] Adds new port (by @cjdb) +- [(#12845)](https://github.com/microsoft/vcpkg/pull/12845) [vcpkg] Lift `--x-json` to a global option, implement experimental `x-package-info` command (by @ras0219) +- [(#12876)](https://github.com/microsoft/vcpkg/pull/12876) [vcpkg] Reduce dependencies and contents of vcpkgpaths.h (by @ras0219) +- [(#12866)](https://github.com/microsoft/vcpkg/pull/12866) [msys] Improve vcpkg_acquire_msys (by @PhoebeHui) +- [(#12897)](https://github.com/microsoft/vcpkg/pull/12897) [vcpkg] Restore layering and purge unused ParagraphParseResult (by @ras0219) +- [(#12895)](https://github.com/microsoft/vcpkg/pull/12895) [vcpkg_find_acquire_program] add version check for ninja (by @Neumann-A) +- [(#12927)](https://github.com/microsoft/vcpkg/pull/12927) [meson] Update meson to 0.55.1 (by @Neumann-A) +- [(#12837)](https://github.com/microsoft/vcpkg/pull/12837) Fix/clang10 linux (by @ignacionr) +- [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) (by @NancyLi1013) +- [(#12774)](https://github.com/microsoft/vcpkg/pull/12774) [vcpkg] Use std::filesystem when Visual Studio is greater than 2015 (by @JackBoosY) +- [(#12626)](https://github.com/microsoft/vcpkg/pull/12626) [vcpkg_find_acquire_program] Enable find_acquire(PKGCONFIG) (by @ras0219) +- [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. (by @Sibras) +- [(#12864)](https://github.com/microsoft/vcpkg/pull/12864) [vcpkg_execute_build_process] Re-fix qt5 components build (by @JackBoosY) +- [(#13000)](https://github.com/microsoft/vcpkg/pull/13000) [vcpkg] Fix baseline (by @NancyLi1013) +- [(#12985)](https://github.com/microsoft/vcpkg/pull/12985) [vcpkg] Add Forward Declarations (originally by @cngzhnp) (by @strega-nil) +- [(#12976)](https://github.com/microsoft/vcpkg/pull/12976) [vcpkg] Update hint message (by @PhoebeHui) +- [(#12974)](https://github.com/microsoft/vcpkg/pull/12974) [fluidsynth/redis-plus-plus] Update to the latest released version (by @NancyLi1013) +- [(#13017)](https://github.com/microsoft/vcpkg/pull/13017) remove registries.h and fwd/registries.h... (by @strega-nil) +- [(#12975)](https://github.com/microsoft/vcpkg/pull/12975) [openmpi/vcpkg_build_make] Disable parallel build (by @JackBoosY) +- [(#13043)](https://github.com/microsoft/vcpkg/pull/13043) [vcpkg] Fix hint message (by @PhoebeHui) +- [(#12046)](https://github.com/microsoft/vcpkg/pull/12046) [portmidi] Updated portmidi package to use alternative code source (by @stekyne) +- [(#13066)](https://github.com/microsoft/vcpkg/pull/13066) [typo] Fix incorrect Path in readme (by @ninjaoflight) +- [(#13034)](https://github.com/microsoft/vcpkg/pull/13034) [openmama] Feature use cmake for openmama (by @fquinner) +- [(#12910)](https://github.com/microsoft/vcpkg/pull/12910) [vcpkg] Fix editable bug (by @ras0219) +- [(#12523)](https://github.com/microsoft/vcpkg/pull/12523) [vcpkg.cmake] check for vcpkg.json only in `${CMAKE_SOURCE_DIR}` (by @strega-nil) +- [(#12964)](https://github.com/microsoft/vcpkg/pull/12964) [vcpkg] Do not use raw paths inside regexes (by @hanst99) +- [(#13092)](https://github.com/microsoft/vcpkg/pull/13092) [vcpkg] Hotfix regression in #12523 (by @ras0219) +- [(#13067)](https://github.com/microsoft/vcpkg/pull/13067) Sort file lists and failure logs together. (by @BillyONeal) +- [(#12738)](https://github.com/microsoft/vcpkg/pull/12738) [vcpkg] Use https sources for common tools (by @janisozaur) +- [(#13058)](https://github.com/microsoft/vcpkg/pull/13058) [Box2d] Update to 2.4.0 (by @JonLiu1993) +- [(#12977)](https://github.com/microsoft/vcpkg/pull/12977) fix vcpkg_configure_cmake for case when having semicolons in OPTIONS (by @jgehw) +- [(#12950)](https://github.com/microsoft/vcpkg/pull/12950) [vcpkg] Fix build on older compilers. (by @huahang) +- [(#13104)](https://github.com/microsoft/vcpkg/pull/13104) [vcpkg] Fix vcpkg_acquire_msys failing on path with spaces (by @SupSuper) +- [(#13125)](https://github.com/microsoft/vcpkg/pull/13125) Disable fluidlite in CI. (by @BillyONeal) +- [(#13117)](https://github.com/microsoft/vcpkg/pull/13117) [vcpkg] Fix #13094 by avoiding the comma operator. (by @BillyONeal) +- [(#13107)](https://github.com/microsoft/vcpkg/pull/13107) [VMSS] Fix the printed error message (by @JackBoosY) +- [(#13069)](https://github.com/microsoft/vcpkg/pull/13069) [vcpkg] Fix upgrade for port-version (by @strega-nil) +- [(#12982)](https://github.com/microsoft/vcpkg/pull/12982) [vcpkg_find_acquire_program] Cleanup and add CI testing (by @ras0219) +- [(#13142)](https://github.com/microsoft/vcpkg/pull/13142) Allow use of VS LLVM clang-format. (by @BillyONeal) +- [(#13148)](https://github.com/microsoft/vcpkg/pull/13148) [baseline] Skip check of clapack:x64-osx in the baseline (by @JackBoosY) +- [(#12884)](https://github.com/microsoft/vcpkg/pull/12884) [skia, ompl, capnproto] Update VMs for 2020-08-12 (including VS 16.7) (by @BillyONeal) +- [(#13086)](https://github.com/microsoft/vcpkg/pull/13086) [vcpkg] Disable timeout (default 10s) in vcpkg_acquire_msys (by @jgehw) +- [(#13176)](https://github.com/microsoft/vcpkg/pull/13176) [vcpkg_from_sourceforge] Determine sourceforge status (by @JackBoosY) +- [(#12229)](https://github.com/microsoft/vcpkg/pull/12229) [OpenMVG/OpenMVS] fix tools (by @cenit) +- [(#12903)](https://github.com/microsoft/vcpkg/pull/12903) [cspice] Add 64bit packages (by @NancyLi1013) +- [(#12687)](https://github.com/microsoft/vcpkg/pull/12687) [v8] Add v8 Javascript engine port (#372). (by @Kwizatz) +- [(#13237)](https://github.com/microsoft/vcpkg/pull/13237) [Readme] fix typo & sync content (by @KevinZonda) +- [(#13209)](https://github.com/microsoft/vcpkg/pull/13209) Fix link (by @SpriteOvO) +- [(#13200)](https://github.com/microsoft/vcpkg/pull/13200) [clapack, lapack-reference] Add conflict messages (by @NancyLi1013) +- [(#13174)](https://github.com/microsoft/vcpkg/pull/13174) [libhsplasma] Add new port (by @Hoikas) +- [(#12846)](https://github.com/microsoft/vcpkg/pull/12846) [vcpkg_configure_cmake] Pass CMAKE_DISABLE_SOURCE_CHANGES to all ports by default (by @ras0219) +- [(#13019)](https://github.com/microsoft/vcpkg/pull/13019) [vcpkg] Replace uses of msys pacman.exe with direct package downloads (by @ras0219) +- [(#13228)](https://github.com/microsoft/vcpkg/pull/13228) [vcpkg] Implement 'repository' tag for NuGet binary caching (by @ras0219) +- [(#13302)](https://github.com/microsoft/vcpkg/pull/13302) [vcpkg] Add July 2020 changelog (by @grdowns) +- [(#13295)](https://github.com/microsoft/vcpkg/pull/13295) [vcpkg baseline][rest-rpc] Skip check in baseline (by @JackBoosY) +- [(#13038)](https://github.com/microsoft/vcpkg/pull/13038) [vcpkg] Registries MVP (by @strega-nil) +- [(#13252)](https://github.com/microsoft/vcpkg/pull/13252) [hypre] Update to 2.19.0 (by @albertziegenhagel) +- [(#13313)](https://github.com/microsoft/vcpkg/pull/13313) [vcpkg.cmake] error out if the mode has changed (by @strega-nil) +- [(#12857)](https://github.com/microsoft/vcpkg/pull/12857) [many ports] Add supports (by @PhoebeHui) +- [(#11290)](https://github.com/microsoft/vcpkg/pull/11290) [vcpkg] #11129: Add VCPKG_LINKER_FLAGS_. (by @psfrolov) +- [(#13231)](https://github.com/microsoft/vcpkg/pull/13231) [vcpkg] Delay failures in `vcpkg install` until missing manifest requested (by @ras0219) +- [(#13297)](https://github.com/microsoft/vcpkg/pull/13297) [vcpkg_acquire_msys.cmake] Add gettext tool (by @StarGate-One) +- [(#13290)](https://github.com/microsoft/vcpkg/pull/13290) [vcpkg] Fix compile on gcc 6 (by @strega-nil) +- [(#13229)](https://github.com/microsoft/vcpkg/pull/13229) [blaze][ceres][clapack][geogram][lapack][lapack-reference][opencv4][selene] Fix deps issues (by @ras0219) +- [(#10645)](https://github.com/microsoft/vcpkg/pull/10645) Fix [boost] MSVC 2013 v120 Build (by @ManuelKugelmann) +- [(#13267)](https://github.com/microsoft/vcpkg/pull/13267) [powershell] Update to 7.0.3 (by @JackBoosY) +- [(#12509)](https://github.com/microsoft/vcpkg/pull/12509) [vcpkg] json format for search (by @dan-shaw) +- [(#11880)](https://github.com/microsoft/vcpkg/pull/11880) [vcpkg] Add community triple arm64-linux and arm-linux. (by @xieyubo) +- [(#12396)](https://github.com/microsoft/vcpkg/pull/12396) [chromium-base] Add new port (by @vejmartin) +- [(#13378)](https://github.com/microsoft/vcpkg/pull/13378) [vcpkg] Fixed 'update' command output (by @lazyhamster) +- [(#13382)](https://github.com/microsoft/vcpkg/pull/13382) [xtensor-io] [taskflow] [tcl] [sophus] Fix CI 2020-09-06 (by @BillyONeal) +- [(#12981)](https://github.com/microsoft/vcpkg/pull/12981) [vcpkg] Improve Json error messages (by @ras0219) +- [(#13398)](https://github.com/microsoft/vcpkg/pull/13398) [vcpkg] Fix compilation on VS2015 (by @ras0219) +- [(#13387)](https://github.com/microsoft/vcpkg/pull/13387) [boost] Remove invalid identifier !v120 (by @PhoebeHui) +- [(#12926)](https://github.com/microsoft/vcpkg/pull/12926) [execute_process] Don't strip embedded semicolons (by @jgehw) +- [(#13386)](https://github.com/microsoft/vcpkg/pull/13386) [vcpkg] improve s390x support (by @lebdron) +- [(#13401)](https://github.com/microsoft/vcpkg/pull/13401) [tmx] Fix build failure (by @JackBoosY) +- [(#13240)](https://github.com/microsoft/vcpkg/pull/13240) [vcpkg|toolchain] add VCPKG_OVERLAY_(PORTS|TRIPLETS) to the toolchain (by @Neumann-A) +- [(#13140)](https://github.com/microsoft/vcpkg/pull/13140) [taskflow] Update cpp-taskflow 2.2.0 to taskflow 2.6.0 (by @mfornace) +- [(#12746)](https://github.com/microsoft/vcpkg/pull/12746) Fix issue "print out missing path in read_lines" #12745. (by @martin-s) +- [(#13421)](https://github.com/microsoft/vcpkg/pull/13421) [vcpkg] Merge the vcpkg metadata uploader into the vcpkg binary (by @BillyONeal) +- [(#13489)](https://github.com/microsoft/vcpkg/pull/13489) Fix bootstrap on VS2019. (by @BillyONeal) +- [(#13488)](https://github.com/microsoft/vcpkg/pull/13488) [vcpkg manifest] Add documentation! (by @strega-nil) +- [(#13497)](https://github.com/microsoft/vcpkg/pull/13497) [tool-meson] Update to 0.55.3 (by @c72578) +- [(#13486)](https://github.com/microsoft/vcpkg/pull/13486) [vcpkg] Add metrics for binarycaching feature (by @ras0219) +- [(#13517)](https://github.com/microsoft/vcpkg/pull/13517) [vcpkg-docs] Add docs/users/binarycaching.md (by @ras0219) +- [(#13589)](https://github.com/microsoft/vcpkg/pull/13589) [vcpkg manifest-mode] Fix parallel msbuild failures (by @strega-nil) +- [(#13609)](https://github.com/microsoft/vcpkg/pull/13609) [vcpkg] Keep sym links in Linux zip cache files (by @here-mikelley) +- [(#13508)](https://github.com/microsoft/vcpkg/pull/13508) [vcpkg] Add build scripts to produce signed vcpkg binaries. (by @BillyONeal) +- [(#13560)](https://github.com/microsoft/vcpkg/pull/13560) [Many ports] Update to the latest version or commit (by @NancyLi1013) +- [(#13529)](https://github.com/microsoft/vcpkg/pull/13529) [scintilla] Add static linking to Scintilla (by @alek-d) +- [(#13629)](https://github.com/microsoft/vcpkg/pull/13629) [mimalloc] Update to 1.6.4 (by @JonLiu1993) +- [(#13537)](https://github.com/microsoft/vcpkg/pull/13537) [vcpkg] Fix the case of current_path() before use on Windows. (by @BillyONeal) +- [(#13685)](https://github.com/microsoft/vcpkg/pull/13685) [documentation] Fix manifest link (by @JackBoosY) +- [(#13667)](https://github.com/microsoft/vcpkg/pull/13667) [vcpkg] Show Empty Object on vcpkg --list when used with --x-json (by @pratikpc) +- [(#13562)](https://github.com/microsoft/vcpkg/pull/13562) [Ninja] update to 1.10.1 (by @Farwaykorse) +- [(#13665)](https://github.com/microsoft/vcpkg/pull/13665) [scintilla] Update to 4.4.5 (by @alek-d) +- [(#13491)](https://github.com/microsoft/vcpkg/pull/13491) [vcpkg, libpq] separate static and shared library installations (by @lebdron) +- [(#13450)](https://github.com/microsoft/vcpkg/pull/13450) try fixing x264 (by @Neumann-A) +- [(#13619)](https://github.com/microsoft/vcpkg/pull/13619) [vcpkg macos ci] Switch to using our own base boxes, to fix bringing up mac machines (by @strega-nil) +- [(#13722)](https://github.com/microsoft/vcpkg/pull/13722) [vcpkg] Fix Windows pipeline's outdated Ninja reference (by @ras0219-msft) +- [(#13451)](https://github.com/microsoft/vcpkg/pull/13451) [qt5-location] Rename vendored libs to avoid conflicts (by @ras0219) +- [(#13732)](https://github.com/microsoft/vcpkg/pull/13732) [vcpkg_build_cmake] Set PARALLEL_ARG when using Ninja (by @JackBoosY) +- [(#13669)](https://github.com/microsoft/vcpkg/pull/13669) [vcpkg] Skip all files named .DS_Store, no need to check if the file is regular (by @ras0219) +- [(#13708)](https://github.com/microsoft/vcpkg/pull/13708) [libidn2] Support UNIX (by @JackBoosY) +- [(#13644)](https://github.com/microsoft/vcpkg/pull/13644) Update the latest g++-10 version if exists (by @cngzhnp) +- [(#13571)](https://github.com/microsoft/vcpkg/pull/13571) Add compiler info to nuspec description (by @RoguePointer80) +- [(#12790)](https://github.com/microsoft/vcpkg/pull/12790) [vcpkg] add env var VCPKG_OVERLAY_TRIPLETS (by @Neumann-A) +- [(#13775)](https://github.com/microsoft/vcpkg/pull/13775) [vcpkg baseline] Skip libvmdk (by @NancyLi1013) +- [(#13748)](https://github.com/microsoft/vcpkg/pull/13748) Add MSVC-internal testing scripts to public GitHub. (by @BillyONeal) +- [(#13794)](https://github.com/microsoft/vcpkg/pull/13794) [vcpkg] fix ci #13790 (by @Neumann-A) +- [(#13799)](https://github.com/microsoft/vcpkg/pull/13799) [vcpkg osx ci] update 2020-09-28 (by @strega-nil) +- [(#13735)](https://github.com/microsoft/vcpkg/pull/13735) Added spanish readme (by @ninjaoflight) +- [(#13385)](https://github.com/microsoft/vcpkg/pull/13385) [osgearth] update to latest to fix build issue with latest geos (by @ankurverma85) +- [(#13830)](https://github.com/microsoft/vcpkg/pull/13830) [libqcow] Skip in all triplets because the upstream GitHub purges old archives (by @ras0219) +- [(#13711)](https://github.com/microsoft/vcpkg/pull/13711) [vcpkg/manifest] write manifest install logs into the build dir. (by @Neumann-A) +- [(#13889)](https://github.com/microsoft/vcpkg/pull/13889) [vcpkg_acquire_msys] Use Mirrors (by @ras0219-msft) +- [(#13810)](https://github.com/microsoft/vcpkg/pull/13810) [mbedtls] Add supports (by @PhoebeHui) +- [(#13858)](https://github.com/microsoft/vcpkg/pull/13858) [tinyutf8, moos-core] Re-enable in CI. (by @BillyONeal) +- [(#13829)](https://github.com/microsoft/vcpkg/pull/13829) [vcpkg macos ci] modify README slightly (by @strega-nil) +- [(#13903)](https://github.com/microsoft/vcpkg/pull/13903) [vcpkg] run both cxx and c compiler id. (by @Neumann-A) +- [(#13751)](https://github.com/microsoft/vcpkg/pull/13751) [vcpkg] Enable reentrant vcpkg calls (by @ras0219) +- [(#13446)](https://github.com/microsoft/vcpkg/pull/13446) [vcpkg] Avoid computing triplet ABIs for editable packages (by @ras0219) +- [(#13734)](https://github.com/microsoft/vcpkg/pull/13734) [gitignore] add default build dir of vs code to ignore list (by @Neumann-A) +- [(#13767)](https://github.com/microsoft/vcpkg/pull/13767) Upgrade log4cxx (by @stephen-webb) +- [(#13803)](https://github.com/microsoft/vcpkg/pull/13803) [libwebsockets] Update to the latest version (by @NancyLi1013) +- [(#13857)](https://github.com/microsoft/vcpkg/pull/13857) Always accept = or space as delimiters when parsing common command line parameters. (by @BillyONeal) +- [(#13821)](https://github.com/microsoft/vcpkg/pull/13821) [7zip] Add supports field (by @NancyLi1013) +- [(#13623)](https://github.com/microsoft/vcpkg/pull/13623) [vcpkg] Use more forward declarations rather than definitions (by @cngzhnp) +- [(#13585)](https://github.com/microsoft/vcpkg/pull/13585) [log4cplus/muparser/nmslib] Update to the latest version (by @NancyLi1013) +- [(#13559)](https://github.com/microsoft/vcpkg/pull/13559) [fastcdr/jack2/fcl/ensmallen/hwloc] Update to latest release (by @PhoebeHui) +- [(#13399)](https://github.com/microsoft/vcpkg/pull/13399) [vcpkg] Further JSON error improvements (by @ras0219) +- [(#13964)](https://github.com/microsoft/vcpkg/pull/13964) [qca]support linux-osx-static build (by @longhuan2018) +- [(#13713)](https://github.com/microsoft/vcpkg/pull/13713) [vcpkg/manifest/toolchain] Add install/bootstrap options & fix CACHE variables usage (by @Neumann-A) +- [(#14000)](https://github.com/microsoft/vcpkg/pull/14000) [vcpkg/configure_make] add USE_WRAPPERS option (by @Neumann-A) +- [(#14005)](https://github.com/microsoft/vcpkg/pull/14005) [akali] Update to v1.42 (by @winsoft666) +- [(#13011)](https://github.com/microsoft/vcpkg/pull/13011) [vcpkg] VCPKG_APPINSTALL_DEPS install dependencies on install #1653 (by @sandercox) +- [(#13860)](https://github.com/microsoft/vcpkg/pull/13860) [halide] Update to version 10.0.0 (by @alexreinking) +- [(#14001)](https://github.com/microsoft/vcpkg/pull/14001) [vcpkg/configure_make] add option DETERMINE_BUILD_TRIPLET (by @Neumann-A) +- [(#14054)](https://github.com/microsoft/vcpkg/pull/14054) [chakracore,gamma,libopenmpt,portaudio,usrsctp] Fix baseline for 2020-10-14 (by @BillyONeal) +- [(#14002)](https://github.com/microsoft/vcpkg/pull/14002) [vcpkg/configure_cmake] add LOGNAME option (by @Neumann-A) +- [(#14036)](https://github.com/microsoft/vcpkg/pull/14036) [antlr4] update to 4.8 (by @capra314cabra) +- [(#13477)](https://github.com/microsoft/vcpkg/pull/13477) [qt5] Update to 5.15.1 (by @Neumann-A) +- [(#13730)](https://github.com/microsoft/vcpkg/pull/13730) [vcpkg_common_definitions] Add macro VCPKG_HOST_IS_ (by @JackBoosY) +- [(#13465)](https://github.com/microsoft/vcpkg/pull/13465) [vcpkg] Set CMAKE_SYSTEM_PROCESSOR if target architecture is arm-linux or arm64-linux. (by @xieyubo) +- [(#12612)](https://github.com/microsoft/vcpkg/pull/12612) [cmake] upgrade to 3.18 (by @cenit) +- [(#13025)](https://github.com/microsoft/vcpkg/pull/13025) [CMake] VCPKG_APPLOCAL_DEPS sometimes causes conflicts when processing multiple files in the same directory (by @sandercox) +- [(#14050)](https://github.com/microsoft/vcpkg/pull/14050) [libvorbis] MinGW build fix (by @Trider12) +- [(#14120)](https://github.com/microsoft/vcpkg/pull/14120) [freetds] Update to v1.2.5 and update source to github. (by @BillyONeal) +- [(#14142)](https://github.com/microsoft/vcpkg/pull/14142) [ptex] Fix build on *inx (by @JackBoosY) +- [(#14079)](https://github.com/microsoft/vcpkg/pull/14079) [vcpkg] Add `versions` feature flag and version field manifest parsing (by @ras0219) +- [(#13540)](https://github.com/microsoft/vcpkg/pull/13540) [libp7-baical] Fix build error (by @NancyLi1013) +- [(#14129)](https://github.com/microsoft/vcpkg/pull/14129) [vcpkg] Vcpkg appinstall deps fixes (by @sandercox) +- [(#13953)](https://github.com/microsoft/vcpkg/pull/13953) [vcpkg_find_acquire_program] Fix SWIG on non-Windows platforms. (by @Hoikas) +- [(#14188)](https://github.com/microsoft/vcpkg/pull/14188) [vcpkg] Print more verbose compiler detection info (by @ekilmer) +- [(#13972)](https://github.com/microsoft/vcpkg/pull/13972) Fix forward declarations & replace fwd header files (by @cngzhnp) +- [(#14208)](https://github.com/microsoft/vcpkg/pull/14208) [Many Ports] Baseline Fixes for 2020-10-24 CI Build (by @BillyONeal) +- [(#14220)](https://github.com/microsoft/vcpkg/pull/14220) [vcpkg] update msys-libiconv version (by @ludchieng) +- [(#13777)](https://github.com/microsoft/vcpkg/pull/13777) [vcpkg] Implement versions db generator (by @vicroms) +- [(#13968)](https://github.com/microsoft/vcpkg/pull/13968) [vcpkg] Fix more cases of semicolon mishandling in "scripts" - follow-up to PR #12926 (by @jgehw) +- [(#14147)](https://github.com/microsoft/vcpkg/pull/14147) [lcm] Fix build error on Linux (by @LilyWangL) +- [(#14262)](https://github.com/microsoft/vcpkg/pull/14262) [vcpkg] Always use version-string in generator (by @vicroms) +- [(#14260)](https://github.com/microsoft/vcpkg/pull/14260) [vcpkg] Always publish failure logs, even on success. (by @BillyONeal) +- [(#11363)](https://github.com/microsoft/vcpkg/pull/11363) [vcpkg] Use named mutex to serialize dll copies (by @thomasgt) +- [(#13701)](https://github.com/microsoft/vcpkg/pull/13701) [folly/fizz/wangle/proxygen/fbthrift] Update to latest revision (by @PhoebeHui) +- [(#13805)](https://github.com/microsoft/vcpkg/pull/13805) [vcpkg, jsonnet, openssl-uwp] Enable use of the system powershell-core if it is present. (by @BillyONeal) +- [(#14271)](https://github.com/microsoft/vcpkg/pull/14271) [vcpkg] Fix search for pwsh in vcpkgtools.xml. (by @BillyONeal) +- [(#14102)](https://github.com/microsoft/vcpkg/pull/14102) [boost] Enable Boost building with wasm32-emscripten (by @stoperro) +- [(#14003)](https://github.com/microsoft/vcpkg/pull/14003) [vcpkg baseline] [vs-yasm] Build yasm instead of downloading it to work around memory corruption bugs in yasm itself. (by @BillyONeal) +- [(#14202)](https://github.com/microsoft/vcpkg/pull/14202) [vcpkg] Remove hard-coded ApiKey from nuget push (by @ekilmer) +- [(#13158)](https://github.com/microsoft/vcpkg/pull/13158) [ocilib] Update to 4.7.0 (by @JonLiu1993) +- [(#13374)](https://github.com/microsoft/vcpkg/pull/13374) [vcpkg] Support cross compile arm64-linux, arm-linux triplets on a linux x86_64 host. (by @xieyubo) +- [(#14269)](https://github.com/microsoft/vcpkg/pull/14269) [vcpkg] mingw: Add compiler executable name into toolchain file (by @longnguyen2004) +- [(#13971)](https://github.com/microsoft/vcpkg/pull/13971) [vcpkg] translate the README to french (by @x0rld) + +
+The following 109 ports have been added: + +|port|version| +|---|---| +|[detect_compiler](https://github.com/microsoft/vcpkg/pull/12203)| 0#0 +|[ppmagic](https://github.com/microsoft/vcpkg/pull/12253)| 2020-07-03#0 +|[getdns](https://github.com/microsoft/vcpkg/pull/12090)| 1.6.0#0 +|[font-chef](https://github.com/microsoft/vcpkg/pull/12293)| 1.0.1#0 +|[implot](https://github.com/microsoft/vcpkg/pull/11920)| 0.3-1#0 +|[libfort](https://github.com/microsoft/vcpkg/pull/12305)| 0.4.1#0 +|[threadpool](https://github.com/microsoft/vcpkg/pull/11650)| 0.2.5#1 +|[mygui](https://github.com/microsoft/vcpkg/pull/11991)| 2020-06-17#0 +|[kfr](https://github.com/microsoft/vcpkg/pull/8322)| 2020-06-15#0 +|[meshoptimizer](https://github.com/microsoft/vcpkg/pull/12211)| 0.14#1 +|[edlib](https://github.com/microsoft/vcpkg/pull/12490)| 1.2.6#0 +|[neargye-semver](https://github.com/microsoft/vcpkg/pull/12406)| 0.2.2#0 +|[marble](https://github.com/microsoft/vcpkg/pull/8628)| 19.08.2#0 +|[simple-fft](https://github.com/microsoft/vcpkg/pull/11929)| 2020-06-14#0 +|[stx](https://github.com/microsoft/vcpkg/pull/12011)| 1.0.1#0 +|[rsocket](https://github.com/microsoft/vcpkg/pull/11021)| 2020.05.04.00-1#0 +|[brpc](https://github.com/microsoft/vcpkg/pull/11524)| 0.9.7#0 +|[gamedev-framework](https://github.com/microsoft/vcpkg/pull/12426)[#14066](https://github.com/microsoft/vcpkg/pull/14066) | 0.18.0#0 +|[audiofile](https://github.com/microsoft/vcpkg/pull/12482)| 1.0.7#0 +|[tomlplusplus](https://github.com/microsoft/vcpkg/pull/10786)| 1.3.0-3#0 +|[vcpkg-ci-paraview](https://github.com/microsoft/vcpkg/pull/12342)| 1#1 +|[avro-cpp](https://github.com/microsoft/vcpkg/pull/11376)| 1.9.2#0 +|[xframe](https://github.com/microsoft/vcpkg/pull/12427)| 0.3.0#0 +|[minc](https://github.com/microsoft/vcpkg/pull/11208)| 2.4.03#0 +|[nifticlib](https://github.com/microsoft/vcpkg/pull/11208)| 2020-04-30#0 +|[pngpp](https://github.com/microsoft/vcpkg/pull/12705)| 0.2.10#0 +|[ngspice](https://github.com/microsoft/vcpkg/pull/12695)| 32#0 +|[lzokay](https://github.com/microsoft/vcpkg/pull/12655)| 2020-07-30#0 +|[josuttis-jthread](https://github.com/microsoft/vcpkg/pull/12497)| 2020-07-21#0 +|[lapack](https://github.com/microsoft/vcpkg/pull/12464)| 0#0 +|[colmap](https://github.com/microsoft/vcpkg/pull/12410)| 3.6#0 +|[qwtw](https://github.com/microsoft/vcpkg/pull/12748)| 3.0#0 +|[cppad](https://github.com/microsoft/vcpkg/pull/12560)| 20200000.3#0 +|[kf5completion](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[kf5config](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[kf5coreaddons](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[kf5crash](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[kf5guiaddons](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[kf5i18n](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[kf5itemmodels](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[kf5itemviews](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[kf5widgetsaddons](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[kf5windowsystem](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0#0 +|[libde265](https://github.com/microsoft/vcpkg/pull/11861)| 1.0.5#0 +|[libheif](https://github.com/microsoft/vcpkg/pull/11861)| 1.7.0#0 +|[quazip](https://github.com/microsoft/vcpkg/pull/11861)| 0.9.1#0 +|[vc](https://github.com/microsoft/vcpkg/pull/11861)| 1.4.1#0 +|[tlx](https://github.com/microsoft/vcpkg/pull/11943)| 0.5.20191212#0 +|[crashrpt](https://github.com/microsoft/vcpkg/pull/9162)| 1.4.3#0 +|[dbghelp](https://github.com/microsoft/vcpkg/pull/9162)| 0.0#0 +|[directxsdk](https://github.com/microsoft/vcpkg/pull/12778)| jun10#0 +|[opencolorio-tools](https://github.com/microsoft/vcpkg/pull/12420)| 1.1.1#0 +|[lapack-reference](https://github.com/microsoft/vcpkg/pull/12805)| 3.8.0#0 +|[vcpkg-gfortran](https://github.com/microsoft/vcpkg/pull/12805)| 1#0 +|[constexpr-contracts](https://github.com/microsoft/vcpkg/pull/12818)| 2020-08-09#0 +|[numcpp](https://github.com/microsoft/vcpkg/pull/12682)| 2.1.0#0 +|[behaviortree-cpp](https://github.com/microsoft/vcpkg/pull/12769)| 3.5.1#0 +|[fluidlite](https://github.com/microsoft/vcpkg/pull/13006)| 2020-08-20#0 +|[boost-uninstall](https://github.com/microsoft/vcpkg/pull/12851)| 1.73.0#0 +|[vlfeat](https://github.com/microsoft/vcpkg/pull/12229)| 2020-07-10#0 +|[v8](https://github.com/microsoft/vcpkg/pull/12687)| 8.3.110.13#0 +|[rest-rpc](https://github.com/microsoft/vcpkg/pull/13232)| 0.07#0 +|[cpu-features](https://github.com/microsoft/vcpkg/pull/12681)| 0.4.1#0 +|[libhsplasma](https://github.com/microsoft/vcpkg/pull/13174)| 2020.08.30#0 +|[sentry-native](https://github.com/microsoft/vcpkg/pull/13118)| 0.4.0#0 +|[libxmlmm](https://github.com/microsoft/vcpkg/pull/13139)| 0.6.0#0 +|[levmar](https://github.com/microsoft/vcpkg/pull/13164)| 2.6#0 +|[knet](https://github.com/microsoft/vcpkg/pull/13207)| 1.0.1#0 +|[rappture](https://github.com/microsoft/vcpkg/pull/13321)| 1.9#0 +|[serd](https://github.com/microsoft/vcpkg/pull/13260)| 0.30.4#0 +|[chromium-base](https://github.com/microsoft/vcpkg/pull/12396)| 86.0.4199.1#0 +|[sord](https://github.com/microsoft/vcpkg/pull/13411)| 0.16.4#0 +|[mp-units](https://github.com/microsoft/vcpkg/pull/13416)| 0.6.0#0 +|[lerc](https://github.com/microsoft/vcpkg/pull/13358)| 2.2#0 +|[irrxml](https://github.com/microsoft/vcpkg/pull/13264)| 1.2#0 +|[kubazip](https://github.com/microsoft/vcpkg/pull/13264)| 0.1.19#0 +|[poly2tri](https://github.com/microsoft/vcpkg/pull/13264)| 2020-07-21#0 +|[taskflow](https://github.com/microsoft/vcpkg/pull/13140)| 2.6.0#0 +|[hffix](https://github.com/microsoft/vcpkg/pull/13433)| 1.0.0#0 +|[d3dx12](https://github.com/microsoft/vcpkg/pull/13360)| may2020#0 +|[croncpp](https://github.com/microsoft/vcpkg/pull/13359)| 2020-09-04#1 +|[triangle](https://github.com/microsoft/vcpkg/pull/13322)| 1.6#0 +|[dartsim](https://github.com/microsoft/vcpkg/pull/13320)| 9.4.0#0 +|[unqlite](https://github.com/microsoft/vcpkg/pull/13544)| 1.1.9#0 +|[lv2](https://github.com/microsoft/vcpkg/pull/13462)| 1.18.0#0 +|[fbthrift](https://github.com/microsoft/vcpkg/pull/13072)| 2019.11.11.00#0 +|[libsigcpp-3](https://github.com/microsoft/vcpkg/pull/13412)| 3.0.3#0 +|[libsbml](https://github.com/microsoft/vcpkg/pull/13524)| 5.18.0#0 +|[opencascade](https://github.com/microsoft/vcpkg/pull/13493)| 7.4.0#0 +|[opensubdiv](https://github.com/microsoft/vcpkg/pull/13695)| 3.4.3#0 +|[tinyexpr](https://github.com/microsoft/vcpkg/pull/13729)| 2020-09-25#0 +|[mikktspace](https://github.com/microsoft/vcpkg/pull/13900)| 2020-10-06#0 +|[sltbench](https://github.com/microsoft/vcpkg/pull/13886)| 2.4.0#0 +|[rbdl](https://github.com/microsoft/vcpkg/pull/13884)| 2.6.0#0 +|[sqlcipher](https://github.com/microsoft/vcpkg/pull/13786)| 4.4.0#0 +|[sratom](https://github.com/microsoft/vcpkg/pull/13771)| 0.6.4#0 +|[libspnav](https://github.com/microsoft/vcpkg/pull/14052)| 0.2.3#0 +|[kenlm](https://github.com/microsoft/vcpkg/pull/13692)| 20200924#0 +|[ezc3d](https://github.com/microsoft/vcpkg/pull/14016)| 1.3.7#0 +|[vulkan-headers](https://github.com/microsoft/vcpkg/pull/14116)| 1.2.157#0 +|[shaderwriter](https://github.com/microsoft/vcpkg/pull/14088)| 2020-10-15#0 +|[libjuice](https://github.com/microsoft/vcpkg/pull/13703)| 0.5.2#0 +|[lilv](https://github.com/microsoft/vcpkg/pull/14080)| 0.24.10#0 +|[ashes](https://github.com/microsoft/vcpkg/pull/14087)| 2020-10-21#0 +|[yasm-tool-helper](https://github.com/microsoft/vcpkg/pull/14003)| 2020-10-12#0 +|[yasm-tool](https://github.com/microsoft/vcpkg/pull/14003)| 2020-10-12#0 +|[krabsetw](https://github.com/microsoft/vcpkg/pull/14192)| 4.1.13#0 +|[faiss](https://github.com/microsoft/vcpkg/pull/13825)| 1.6.4#0 +|[oatpp-sqlite](https://github.com/microsoft/vcpkg/pull/14107)| 1.2.0#0 +
+ +
+The following 35 ports have been updated: + +- marl `2020-05-21#0` -> `2020-06-30#0` + - [(#12162)](https://github.com/microsoft/vcpkg/pull/12162) [marl] Update to 2020-06-30 + +- simdjson `2020-05-26#0` -> `0.4.6#0` + - [(#12140)](https://github.com/microsoft/vcpkg/pull/12140) [simdjson] Update to 0.4.6 + +- blend2d `beta_2020-06-01#0` -> `beta_2020-07-09#0,` + - [(#12360)](https://github.com/microsoft/vcpkg/pull/12360) [blend2d] Update to beta_2020-07-09 + +- libb2 `0.98.1-2#0` -> `0.98.1#3,` + - [(#12398)](https://github.com/microsoft/vcpkg/pull/12398) [libb2] Add supports and install pkg-conifg on macOS VM + +- geographiclib `1.47-patch1-16#0` -> `1.50.1#0` + - [(#12379)](https://github.com/microsoft/vcpkg/pull/12379) [geographiclib] Update to 1.50.1 + +- ogre `1.12.1-1#0` -> `1.12.7#0` + - [(#12210)](https://github.com/microsoft/vcpkg/pull/12210) [ogre] Update to version 1.12.7 and fix link error + +- libmodbus `3.1.6#0` -> `3.1.6#1,` + - [(#12530)](https://github.com/microsoft/vcpkg/pull/12530) [libmodbus] Fix static linkage error + +- mpir `3.0.0-8#0` -> `3.0.0#9,` + - [(#12514)](https://github.com/microsoft/vcpkg/pull/12514) [mpir] Fix build error if VCPKG_BUILD_TYPE is set as release or debug + +- mosquitto `1.6.8-1#0` -> `1.6.8#"2",` + - [(#12536)](https://github.com/microsoft/vcpkg/pull/12536) [mosquitto] Add vcpkg-cmake-wrapper.cmake and vcpkg.json + +- coroutine `1.5.0#0` -> `1.5.0#"1",` + - [(#12456)](https://github.com/microsoft/vcpkg/pull/12456) [coroutine] Fix error C7651 + +- argtable3 `2019-08-21#0` -> `3.1.5#0` + - [(#12421)](https://github.com/microsoft/vcpkg/pull/12421) [argtable3] Update to 3.1.5 + +- gmp `6.2.0-2#0` -> `6.2.0#3,` + - [(#12664)](https://github.com/microsoft/vcpkg/pull/12664) [mpir, gmp] Add message to handle the conflicts between these two ports + +- libass `0.14.0#0` -> `0.14.0#3,` + - [(#12528)](https://github.com/microsoft/vcpkg/pull/12528) [libass] Fix build error on x64-windows-static + +- cmocka `1.1.5#0` -> `2020-08-01#0` + - [(#12828)](https://github.com/microsoft/vcpkg/pull/12828) [cmocka] Update to 2020-08-01 + +- libvorbis `1.3.6-4d963fe#0` -> `1.3.7#0` + - [(#12909)](https://github.com/microsoft/vcpkg/pull/12909) [libvorbis] Update to 1.3.7 + +- libsndfile `1.0.29#0` -> `1.0.29#11,` + - [(#12921)](https://github.com/microsoft/vcpkg/pull/12921) [libsndfile] Update to 1.0.29 + +- bzip2 `1.0.8#0` -> `1.0.8#1,` + - [(#13242)](https://github.com/microsoft/vcpkg/pull/13242) [bzip2] Add SHA512 hash check + +- xbyak `5.93#0` -> `5.97#0` + - [(#13553)](https://github.com/microsoft/vcpkg/pull/13553) [xbyak] Update port to 5.97 + +- nng `1.3.0#0` -> `1.3.2#0` + - [(#13545)](https://github.com/microsoft/vcpkg/pull/13545) [nng] Update to 1.3.2 + +- infoware `0.5.5#0` -> `0.5.5#1,` + - [(#13822)](https://github.com/microsoft/vcpkg/pull/13822) [infoware] fix linking issues with non-release builds + +- sdl2 `2.0.12#0` -> `2.0.12#5,` + - [(#13801)](https://github.com/microsoft/vcpkg/pull/13801) [sdl2] Fix build when VCPKG_BUILD_TYPE is set to "release" + +- chakracore `1.11.22#0` -> `1.11.22#1,` + - [(#14054)](https://github.com/microsoft/vcpkg/pull/14054) [chakracore,gamma,libopenmpt,portaudio,usrsctp] Fix baseline for 2020-10-14 + +- libopenmpt `2017-01-28-cf2390140#0` -> `2017-01-28-cf2390140#1,` + - [(#14054)](https://github.com/microsoft/vcpkg/pull/14054) [chakracore,gamma,libopenmpt,portaudio,usrsctp] Fix baseline for 2020-10-14 + +- portaudio `2020-02-02#0` -> `2020-02-02#2,` + - [(#14054)](https://github.com/microsoft/vcpkg/pull/14054) [chakracore,gamma,libopenmpt,portaudio,usrsctp] Fix baseline for 2020-10-14 + +- itk `5.1.0#0` -> `5.1.0#3,` + - [(#14056)](https://github.com/microsoft/vcpkg/pull/14056) [itk,libsamplerate,libsndfile] Apply some Visual Studio 2019 version 16.9 preview 1 workarounds + +- libsamplerate `0.1.9.0-1#0` -> `0.1.9.0#2,` + - [(#14056)](https://github.com/microsoft/vcpkg/pull/14056) [itk,libsamplerate,libsndfile] Apply some Visual Studio 2019 version 16.9 preview 1 workarounds + +- json-dto `0.2.10#0` -> `0.2.11#0` + - [(#14084)](https://github.com/microsoft/vcpkg/pull/14084) [json-dto] update to v.0.2.11 + +- freetds `1.1.17#0` -> `1.2.5#0` + - [(#14120)](https://github.com/microsoft/vcpkg/pull/14120) [freetds] Update to v1.2.5 and update source to github. + +- restinio `0.6.10#0` -> `0.6.11#0` + - [(#14162)](https://github.com/microsoft/vcpkg/pull/14162) [restinio] update to v.0.6.11 + +- cppwinrt `fall_2017_creators_update_for_vs_15.3-2#0` -> `windows-sdk#0` + - [(#14092)](https://github.com/microsoft/vcpkg/pull/14092) [cppwinrt] Update to version 2.0.201008.2 + +- vs-yasm `0.5.0#0` -> `0.5.0#1,` + - [(#14003)](https://github.com/microsoft/vcpkg/pull/14003) [vcpkg baseline] [vs-yasm] Build yasm instead of downloading it to work around memory corruption bugs in yasm itself. + +- asio `1.12.2-2#0` -> `1.18.0#0` + - [(#14167)](https://github.com/microsoft/vcpkg/pull/14167) [asio] update to version 1.18.0 (#14095) + +- opendnp3 `2.3.2#0` -> `3.1.0#0` + - [(#14167)](https://github.com/microsoft/vcpkg/pull/14167) [asio] update to version 1.18.0 (#14095) + +- restbed `4.16-07-28-2018-2#0` -> `4.7#0` + - [(#14167)](https://github.com/microsoft/vcpkg/pull/14167) [asio] update to version 1.18.0 (#14095) + +- sqlitecpp `3.1.1#0` -> `3.1.1#1,` + - [(#14029)](https://github.com/microsoft/vcpkg/pull/14029) [sqlitecpp] Additions for sqlcipher port + +
+ +-- vcpkg team vcpkg@microsoft.com MON, 2 Nov 00:00:00 -0800 + +vcpkg (2020.06.16 - 2020.7.31) +--- +#### Total port count: 1429 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1304| +|x86-windows|1284| +|x64-windows-static|1213| +|**x64-osx**|1139| +|**x64-linux**|1210| +|arm64-windows|928| +|x64-uwp|700| +|arm-uwp|669| + +#### The following commands and options have been updated: +- `x-package-info` ***[NEW COMMAND]***: Allows viewing of port information in a requested format (currently json) + - [(#12845)](https://github.com/microsoft/vcpkg/pull/12845) [vcpkg] Lift `--x-json` to a global option, implement experimental `x-package-info` command (by @ras0219) +- `--editable` ***[NEW OPTION]***: Suppress binary caching and source re-extraction for packages listed on the command line + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) + - [(#12366)](https://github.com/microsoft/vcpkg/pull/12366) [vcpkg] Improve informational message for `--editable` while cleaning sources (by @ras0219) +- `--x-binarysource=` ***[NEW OPTION]***: Experimental: Support NuGet servers for retrieving and uploading of binary packages during builds + - [(#12058)](https://github.com/microsoft/vcpkg/pull/12058) [vcpkg] Implementation of --x-binarysource=nuget (and friends) (by @ras0219) +- `install` + - `--x-write-nuget-packages-config` ***[NEW OPTION]***: Experimental: Write out a NuGet packages config-formatted file for use with external binary caching + - [(#12138)](https://github.com/microsoft/vcpkg/pull/12138) [vcpkg] Implement --x-write-nuget-packages-config= setting for `install` and `x-set-installed` (by @ras0219) +- `x-set-installed` + - `--dry-run` ***[NEW OPTION]***: Perform a dry run by not actually building or installing + - [(#12132)](https://github.com/microsoft/vcpkg/pull/12132) [vcpkg-x-set-installed] Implement --dry-run (by @ras0219) +- `--x-json`: Lift this option to the global scope to request json output from compatible commands (see `x-package-info`) + - [(#12845)](https://github.com/microsoft/vcpkg/pull/12845) [vcpkg] Lift `--x-json` to a global option, implement experimental `x-package-info` command (by @ras0219) + +#### The following documentation has been updated: +- [vcpkg_from_sourceforge](docs/maintainers/vcpkg_from_sourceforge.md) ***[NEW]*** + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) (by @JackBoosY) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) (by @JackBoosY) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_fixup_pkgconfig](docs/maintainers/vcpkg_fixup_pkgconfig.md) ***[NEW]*** + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [Binary Caching Specification](docs/specifications/binarycaching.md) ***[NEW]*** + - [(#11204)](https://github.com/microsoft/vcpkg/pull/11204) [vcpkg] RFC: Binarycaching (by @ras0219-msft) +- [README](README.md) + - [(#12093)](https://github.com/microsoft/vcpkg/pull/12093) [vcpkg docs] new README/Quick Start guide (by @strega-nil) +- [Patching Example](docs/examples/patching.md) + - [(#11952)](https://github.com/microsoft/vcpkg/pull/11952) [Document]Mention --ignore-space-at-eol in patching.md (by @Pospelove) + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) +- [vcpkg_fixup_cmake_targets](docs/maintainers/vcpkg_fixup_cmake_targets.md) + - [(#11275)](https://github.com/microsoft/vcpkg/pull/11275) [ignition-plugin1] Add new port 🤖 (by @traversaro) +- [Privacy](docs/about/privacy.md) + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation (by @strega-nil) +- [Manifests](docs/specifications/manifests.md) + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation (by @strega-nil) +- [Environment and Configuration](docs/users/config-environment.md) + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation (by @strega-nil) + - [(#12640)](https://github.com/microsoft/vcpkg/pull/12640) [vcpkg] add environment variable VCPKG_OVERLAY_PORTS (by @Neumann-A) +- [Buildsystem Integration](docs/users/integration.md) + - [(#12145)](https://github.com/microsoft/vcpkg/pull/12145) [vcpkg] Update message in bootstrap.ps1 (by @PhoebeHui) + - [(#12873)](https://github.com/microsoft/vcpkg/pull/12873) [vcpkg] Fix bullet lists for integration.md on readthedocs.io (by @ftheile) +- [Installing and Using Packages](docs/examples/installing-and-using-packages.md) + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: (by @PhoebeHui) +- [Packaging Zipfiles](docs/examples/packaging-zipfiles.md) + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) +- [CONTROL Files](docs/maintainers/control-files.md) + - [(#12227)](https://github.com/microsoft/vcpkg/pull/12227) [vcpkg manifests] fix some issues (by @strega-nil) +- [Portfile Functions](docs/maintainers/portfile-functions.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_build_make](docs/maintainers/vcpkg_build_make.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_common_definitions](docs/maintainers/vcpkg_common_definitions.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_configure_make](docs/maintainers/vcpkg_configure_make.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_find_acquire_program](docs/maintainers/vcpkg_find_acquire_program.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [Triplets](docs/users/triplets.md) + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 (by @Squareys) +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#12460)](https://github.com/microsoft/vcpkg/pull/12460) [vcpkg] Improve format check failure message (by @JackBoosY) +- [vcpkg_check_linkage.md](docs/maintainers/vcpkg_check_linkage.md) + - [(#12624)](https://github.com/microsoft/vcpkg/pull/12624) Fix .gitignore excluding triplets/community, sort, and driveby vcpkg_check_linkage.md doc bug. (by @BillyONeal) +- [Overlay Triplets Example: Dynamic Linux Library](docs/examples/overlay-triplets-linux-dynamic.md) + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: (by @PhoebeHui) + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- Port Manifest: New feature to allow projects to state their dependencies in a declarative format + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation (by @strega-nil) + - [(#12227)](https://github.com/microsoft/vcpkg/pull/12227) [vcpkg manifests] fix some issues (by @strega-nil) + - [(#12549)](https://github.com/microsoft/vcpkg/pull/12549) [vcpkg manifest] add feature support (by @strega-nil) +- `vcpkg_from_sourceforge`: New maintainer helper function to retrieve sources from SourceForge + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) (by @JackBoosY) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) (by @JackBoosY) +- `VCPKG_OVERLAY_PORTS`: New environment variable to allow users to override ports with alternate versions + - [(#12640)](https://github.com/microsoft/vcpkg/pull/12640) [vcpkg] add environment variable VCPKG_OVERLAY_PORTS (by @Neumann-A) + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#12174)](https://github.com/microsoft/vcpkg/pull/12174) [vcpkg] Fix `vcpkg export --nuget` regressions (by @ras0219) +- [(#11842)](https://github.com/microsoft/vcpkg/pull/11842) [vcpkg] Extract common paths settings to make_cmake_cmd... (by @BillyONeal) +- [(#11977)](https://github.com/microsoft/vcpkg/pull/11977) [CHANGELOG] Update to 2020.06.15 (by @vicroms) +- [(#11978)](https://github.com/microsoft/vcpkg/pull/11978) Attempt to mitigate Windows Defender detections by making provision-image.ps1 not a powershell script (by @BillyONeal) +- [(#11015)](https://github.com/microsoft/vcpkg/pull/11015) [vcpkg] Fix issue #9781 by exporting from the installed directory (by @ras0219) +- [(#11984)](https://github.com/microsoft/vcpkg/pull/11984) [breakpad] Fix build failure on OSX (by @JackBoosY) +- [(#11981)](https://github.com/microsoft/vcpkg/pull/11981) [thrift] Update to 0.13.0 and fix OSX build (by @JackBoosY) +- [(#11963)](https://github.com/microsoft/vcpkg/pull/11963) [libvpx] Support arm64-windows (by @JackBoosY) +- [(#12000)](https://github.com/microsoft/vcpkg/pull/12000) [vcpkg] Clean tombstones in every build except PR validations (by @BillyONeal) +- [(#11965)](https://github.com/microsoft/vcpkg/pull/11965) [vcpkg baseline] Retrigger failed ports in baseline (by @PhoebeHui) +- [(#11938)](https://github.com/microsoft/vcpkg/pull/11938) [vcpkg] Add mirror to download Strawberry Perl (by @AenBleidd) +- [(#11931)](https://github.com/microsoft/vcpkg/pull/11931) [vcpkg] Put user-defined configuration triplets path on top of the search queue (by @AenBleidd) +- [(#11999)](https://github.com/microsoft/vcpkg/pull/11999) [vcpkg] Use SSH keys instead of password authentication when minting Linux scale sets (by @BillyONeal) +- [(#12049)](https://github.com/microsoft/vcpkg/pull/12049) [vcpkg] Delete unused --purge-tombstones and introduce BufferedPrint class (by @BillyONeal) +- [(#11654)](https://github.com/microsoft/vcpkg/pull/11654) [vcpkg] Track compiler information in ABI (by @ras0219) +- [(#11983)](https://github.com/microsoft/vcpkg/pull/11983) [libmicrohttpd] Support build on UNIX and use msbuild on Windows (by @JackBoosY) +- [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) (by @endrift) +- [(#12074)](https://github.com/microsoft/vcpkg/pull/12074) [vcpkg] Do not fail just because cleaning tombstones failed in CI. (by @BillyONeal) +- [(#11275)](https://github.com/microsoft/vcpkg/pull/11275) [ignition-plugin1] Add new port 🤖 (by @traversaro) +- [(#12067)](https://github.com/microsoft/vcpkg/pull/12067) [vcpkg baseline] Fix baseline errors (by @JackBoosY) +- [(#12082)](https://github.com/microsoft/vcpkg/pull/12082) [vcpkg] Commonize pipelines build powershell and don't use binary caching in CI (rather than PR) builds (by @BillyONeal) +- [(#12113)](https://github.com/microsoft/vcpkg/pull/12113) [vcpkg] Add disk space report to Windows PR/CI (by @BillyONeal) +- [(#12072)](https://github.com/microsoft/vcpkg/pull/12072) [vcpkg build] fix build command (by @strega-nil) +- [(#12120)](https://github.com/microsoft/vcpkg/pull/12120) [vcpkg] Delete unnecessary tombstone deletion step now that CI rebuilds everything (by @BillyONeal) +- [(#12091)](https://github.com/microsoft/vcpkg/pull/12091) [vcpkg] Use XDG/LOCALAPPDATA for default binary caching path (by @ras0219) +- [(#12128)](https://github.com/microsoft/vcpkg/pull/12128) [vcpkg] Fix "[commands-build] build smoke test" (by @ras0219) +- [(#12130)](https://github.com/microsoft/vcpkg/pull/12130) [vcpkg] Add write-only binary caching for CI. (by @BillyONeal) +- [(#12101)](https://github.com/microsoft/vcpkg/pull/12101) [vcpkg] Add mingw dynamic libs triplet (by @longnguyen2004) +- [(#12069)](https://github.com/microsoft/vcpkg/pull/12069) Fix typo in comment (by @freddy77) +- [(#12144)](https://github.com/microsoft/vcpkg/pull/12144) [vcpkg baseline][paraview] Fix linux build (by @JackBoosY) +- [(#12172)](https://github.com/microsoft/vcpkg/pull/12172) [vcpkg ci] add macos scripts to vcpkg repo (by @strega-nil) +- [(#12176)](https://github.com/microsoft/vcpkg/pull/12176) [vcpkg] VM Update (by @BillyONeal) +- [(#12192)](https://github.com/microsoft/vcpkg/pull/12192) Fix sourceparagraph:BooleanField (by @strega-nil) +- [(#12191)](https://github.com/microsoft/vcpkg/pull/12191) Don't change manifest root when manifest isn't enabled. (by @dada2048) +- [(#12170)](https://github.com/microsoft/vcpkg/pull/12170) [vcpkg] Enable NuGet-based binary caching via mono (by @ras0219) +- [(#12145)](https://github.com/microsoft/vcpkg/pull/12145) [vcpkg] Update message in bootstrap.ps1 (by @PhoebeHui) +- [(#12201)](https://github.com/microsoft/vcpkg/pull/12201) [vcpkg] Remove all uses of Foo::Foo() noexcept = default; to fix #9955 (by @ras0219) +- [(#12203)](https://github.com/microsoft/vcpkg/pull/12203) [vcpkg] Improve performance of compiler tracking (by @ras0219) +- [(#12212)](https://github.com/microsoft/vcpkg/pull/12212) [msbuild] Revert the importance to Normal (by @PhoebeHui) +- [(#12197)](https://github.com/microsoft/vcpkg/pull/12197) [vcpkg] Remove the tombstones and 'ignore' baseline concepts. (by @BillyONeal) +- [(#4608)](https://github.com/microsoft/vcpkg/pull/4608) [vcpkg] Use IncludePath and LibraryPath properties (by @FrankHeimes) +- [(#12242)](https://github.com/microsoft/vcpkg/pull/12242) [vcpkg] Remove use of std::variant and std::visit to fix VS2015. (by @ras0219) +- [(#12272)](https://github.com/microsoft/vcpkg/pull/12272) [vcpkg] Revert change which causes sources to be purged by default in `vcpkg build` (by @ras0219) +- [(#12263)](https://github.com/microsoft/vcpkg/pull/12263) [vcpkg] Update toolsrc VERSION to 2020.06.15 (by @c72578) +- [(#12232)](https://github.com/microsoft/vcpkg/pull/12232) [opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. (by @BillyONeal) +- [(#12177)](https://github.com/microsoft/vcpkg/pull/12177) [vcpkg] Added python script to generate all packages file list, added to azur… (by @yaoleo34) +- [(#11655)](https://github.com/microsoft/vcpkg/pull/11655) [vcpkg] Format the C++ in CI (by @strega-nil) +- [(#12300)](https://github.com/microsoft/vcpkg/pull/12300) [libbson, vcpkg baseline] Remove passing and fix spurious failure. (by @BillyONeal) +- [(#12140)](https://github.com/microsoft/vcpkg/pull/12140) [simdjson] Update to 0.4.6 (by @myd7349) +- [(#11967)](https://github.com/microsoft/vcpkg/pull/11967) [evpp] Fix build error on OSX (by @JackBoosY) +- [(#12314)](https://github.com/microsoft/vcpkg/pull/12314) [vcpkg ci] Update formatting CI (by @strega-nil) +- [(#12259)](https://github.com/microsoft/vcpkg/pull/12259) [triplets][osx] add support for arm64 'apple silicon' (by @eklipse2k8) +- [(#11754)](https://github.com/microsoft/vcpkg/pull/11754) [pcre2] Update to 10.35 (by @c72578) +- [(#11753)](https://github.com/microsoft/vcpkg/pull/11753) Fix support for toolchains that set CMAKE_FIND_ROOT_PATH_MODE_* variables to ONLY (by @traversaro) +- [(#12317)](https://github.com/microsoft/vcpkg/pull/12317) [vcpkg README] Fix links (by @strega-nil) +- [(#12319)](https://github.com/microsoft/vcpkg/pull/12319) [vcpkg.targets] Fix #12292 regression with MSBuild targets (by @ras0219-msft) +- [(#12323)](https://github.com/microsoft/vcpkg/pull/12323) [vcpkg] Ignore dependencies not found errors when downloading mode (by @JackBoosY) +- [(#12257)](https://github.com/microsoft/vcpkg/pull/12257) [vcpkg] Fix MSBuild regressions #12062 and #12086. (by @ras0219) +- [(#12037)](https://github.com/microsoft/vcpkg/pull/12037) [freerdp] Fix x64-osx triplet (by @AlexAltea) +- [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. (by @Neumann-A) +- [(#8322)](https://github.com/microsoft/vcpkg/pull/8322) [kfr] Add new port (by @myd7349) +- [(#12244)](https://github.com/microsoft/vcpkg/pull/12244) [cuda] correct env variables for newer cuda versions (by @Neumann-A) +- [(#12256)](https://github.com/microsoft/vcpkg/pull/12256) [vcpkg] Move default binary cache from `$root/archives` to user-wide directory (by @ras0219) +- [(#12350)](https://github.com/microsoft/vcpkg/pull/12350) [vcpkg] Remove unnecessary work queue (by @strega-nil) +- [(#12367)](https://github.com/microsoft/vcpkg/pull/12367) [vcpkg build] fix #12355 (by @strega-nil) +- [(#12369)](https://github.com/microsoft/vcpkg/pull/12369) [vcpkg formatting] Fix format regex (by @strega-nil) +- [(#12178)](https://github.com/microsoft/vcpkg/pull/12178) [vcpkg] Add a schema file for vcpkg.json (by @Edhebi) +- [(#12370)](https://github.com/microsoft/vcpkg/pull/12370) [vcpkg] Enable binary caching by default (by @ras0219) +- [(#12386)](https://github.com/microsoft/vcpkg/pull/12386) [vcpkg] Add CMake heuristics for header-only libraries (by @ras0219) +- [(#12378)](https://github.com/microsoft/vcpkg/pull/12378) [vcpkg] proper errorcheck during files installation (by @Maximus5) +- [(#12384)](https://github.com/microsoft/vcpkg/pull/12384) [vcpkg-ci] Always publish file lists (by @ras0219) +- [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [(#12361)](https://github.com/microsoft/vcpkg/pull/12361) [vcpkg] Fix iOS toolchain detection when using the iOS community triplets (by @alcroito) +- [(#12398)](https://github.com/microsoft/vcpkg/pull/12398) [libb2] Add supports and install pkg-conifg on macOS VM (by @PhoebeHui) +- [(#12368)](https://github.com/microsoft/vcpkg/pull/12368) [vcpkg formatting] Turn off DeriveLineEnding (by @strega-nil) +- [(#12429)](https://github.com/microsoft/vcpkg/pull/12429) [vcpkg] Fix ParagraphParser::required_field() (by @maksqwe) +- [(#12400)](https://github.com/microsoft/vcpkg/pull/12400) [vcpkg] implement copy_symlink working for non-elevated processes (by @Maximus5) +- [(#12432)](https://github.com/microsoft/vcpkg/pull/12432) vcpkg_configure_make: typo fix '_vcpkg_append_to_configure_environment' (by @kevinlul) +- [(#12351)](https://github.com/microsoft/vcpkg/pull/12351) [vcpkg] Clean up command switch code (by @strega-nil) +- [(#12179)](https://github.com/microsoft/vcpkg/pull/12179) [vcpkg] print list in json (by @dan-shaw) +- [(#12084)](https://github.com/microsoft/vcpkg/pull/12084) Build fix with MinGW GCC 9.2.0 (by @cristianadam) +- [(#12455)](https://github.com/microsoft/vcpkg/pull/12455) [libmicrohttpd] Add `platform.h` to restricted header list. (by @ras0219) +- [(#12468)](https://github.com/microsoft/vcpkg/pull/12468) [vcpkg] Add NVTOOLSEXT_PATH to the env passthrough list (by @Neumann-A) +- [(#12534)](https://github.com/microsoft/vcpkg/pull/12534) Add initial s390x support (by @lebdron) +- [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries (by @Neumann-A) +- [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 (by @cenit) +- [(#12467)](https://github.com/microsoft/vcpkg/pull/12467) [vcpkg-acquire-msys] Install new keyring (by @emptyVoid) +- [(#12460)](https://github.com/microsoft/vcpkg/pull/12460) [vcpkg] Improve format check failure message (by @JackBoosY) +- [(#9248)](https://github.com/microsoft/vcpkg/pull/9248) fix issue #9228 : Add support to subgroups in gitlab (by @RamadanAhmed) +- [(#12513)](https://github.com/microsoft/vcpkg/pull/12513) [vcpkg] EOL LF for ci.baseline.txt (by @Neumann-A) +- [(#8628)](https://github.com/microsoft/vcpkg/pull/8628) [marble] Add new port (by @ig-or) +- [(#12118)](https://github.com/microsoft/vcpkg/pull/12118) [mozjpeg] fix build (by @saucecontrol) +- [(#12530)](https://github.com/microsoft/vcpkg/pull/12530) [libmodbus] Fix static linkage error (by @NancyLi1013) +- [(#12514)](https://github.com/microsoft/vcpkg/pull/12514) [mpir] Fix build error if VCPKG_BUILD_TYPE is set as release or debug (by @NancyLi1013) +- [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build (by @JackBoosY) +- [(#12569)](https://github.com/microsoft/vcpkg/pull/12569) [vcpkg_fixup_pkgconfig] Remove required in first find_program call for pkg-config (by @Neumann-A) +- [(#12097)](https://github.com/microsoft/vcpkg/pull/12097) Fix vcpkg android toolchain so it adds flags that aren't just ignored (by @jamiebk) +- [(#11021)](https://github.com/microsoft/vcpkg/pull/11021) [rsocket] Add new port (by @curoky) +- [(#12104)](https://github.com/microsoft/vcpkg/pull/12104) Fix vcpkg_fixup_cmake_targets to work correctly on MinGW (by @koprok) +- [(#12661)](https://github.com/microsoft/vcpkg/pull/12661) [vcpkg] Fix typo in link for installing and using packages (by @varunagrawal) +- [(#12639)](https://github.com/microsoft/vcpkg/pull/12639) [vcpkg-ci] fix macos setup scripts (by @strega-nil) +- [(#12586)](https://github.com/microsoft/vcpkg/pull/12586) [vcpkg] Fix build on Windows 8.1 SDK (by @strega-nil) +- [(#12585)](https://github.com/microsoft/vcpkg/pull/12585) [vcpkg] Refactor Commands: Part 1 (by @strega-nil) +- [(#10770)](https://github.com/microsoft/vcpkg/pull/10770) [cmake] Add cmake port to test qt (by @Neumann-A) +- [(#10786)](https://github.com/microsoft/vcpkg/pull/10786) [tomlplusplus] Add new port (by @traversaro) +- [(#12641)](https://github.com/microsoft/vcpkg/pull/12641) Refactor commands 2: Electric Boogaloo (by @strega-nil) +- [(#12548)](https://github.com/microsoft/vcpkg/pull/12548) [vcpkg manifest] look at `platform` directives (by @strega-nil) +- [(#12494)](https://github.com/microsoft/vcpkg/pull/12494) [qt-webengine] Fix building with vs2017 (by @Neumann-A) +- [(#11376)](https://github.com/microsoft/vcpkg/pull/11376) [avro-cpp] new port (by @alexander-smyslov) +- [(#11535)](https://github.com/microsoft/vcpkg/pull/11535) [mpg123] Allow cross-compiling, fix previous builds tainting rebuilds (by @kevinlul) +- [(#12624)](https://github.com/microsoft/vcpkg/pull/12624) Fix .gitignore excluding triplets/community, sort, and driveby vcpkg_check_linkage.md doc bug. (by @BillyONeal) +- [(#12423)](https://github.com/microsoft/vcpkg/pull/12423) [vcpkg] Add environment variable VCPKG_DEFAULT_BINARY_CACHE (by @Neumann-A) +- [(#10670)](https://github.com/microsoft/vcpkg/pull/10670) [vcpkg] Fix [boost] find_package for MSVC2013 / v120 (by @ManuelKugelmann) +- [(#12471)](https://github.com/microsoft/vcpkg/pull/12471) [vcpkg format-manifest] Add convert-control flag (by @strega-nil) +- [(#11208)](https://github.com/microsoft/vcpkg/pull/11208) [ITK] Update to 5.1 (by @Neumann-A) +- [(#12742)](https://github.com/microsoft/vcpkg/pull/12742) [wavpack] Fix failure on linux and osx (by @PhoebeHui) +- [(#12727)](https://github.com/microsoft/vcpkg/pull/12727) [msbuild] Revert the importance to Normal (by @PhoebeHui) +- [(#12717)](https://github.com/microsoft/vcpkg/pull/12717) [vcpkg] Fix prettify output not working in some cases (by @Deadpikle) +- [(#12715)](https://github.com/microsoft/vcpkg/pull/12715) [vcpkg] Add VCPKG_TARGET_IS_IOS (by @Deadpikle) +- [(#12716)](https://github.com/microsoft/vcpkg/pull/12716) [vcpkg] Fix arm64-osx triplet not building for arm64 (by @Deadpikle) +- [(#12701)](https://github.com/microsoft/vcpkg/pull/12701) [vcpkg-ci-paraview] move into scripts/test_ports (by @Neumann-A) +- [(#12699)](https://github.com/microsoft/vcpkg/pull/12699) [vcpkg baseline] remove qt translations from skip list (by @Neumann-A) +- [(#12695)](https://github.com/microsoft/vcpkg/pull/12695) [ngspice] Initial port (by @marekr) +- [(#12678)](https://github.com/microsoft/vcpkg/pull/12678) [vcpkg] Add missing check for x86 (by @arves100) +- [(#12752)](https://github.com/microsoft/vcpkg/pull/12752) [vcpkg_build_qmake] Disable multi-threaded build when file fails to open (by @JackBoosY) +- [(#12789)](https://github.com/microsoft/vcpkg/pull/12789) [vcpkg] Fix vs2015 build (by @strega-nil) +- [(#12312)](https://github.com/microsoft/vcpkg/pull/12312) [fmt] Update to 7.0.2 + [spdlog] Update to 1.7.0 (by @kevinlul) +- [(#12515)](https://github.com/microsoft/vcpkg/pull/12515) [pangolin] Fix build failure on UNIX (by @JackBoosY) +- [(#12792)](https://github.com/microsoft/vcpkg/pull/12792) [log4cpp] Fix header file install path (by @LilyWangL) +- [(#12784)](https://github.com/microsoft/vcpkg/pull/12784) [gSoap] Update to 2.8.105 and add a required shared directory (by @xgcssch) +- [(#12768)](https://github.com/microsoft/vcpkg/pull/12768) [libtorrent] Update to 1.2.8 (by @FranciscoPombal) +- [(#12762)](https://github.com/microsoft/vcpkg/pull/12762) [boost] Add Supports fields and more accurately handle arm64-windows/x64-uwp (by @ras0219) +- [(#12630)](https://github.com/microsoft/vcpkg/pull/12630) [secp256k1] Fix build failures and export cmake targets (by @PhoebeHui) +- [(#12524)](https://github.com/microsoft/vcpkg/pull/12524) [asmjit] Update to the latest commit (by @ZehMatt) +- [(#12528)](https://github.com/microsoft/vcpkg/pull/12528) [libass] Fix build error on x64-windows-static (by @LilyWangL) +- [(#12634)](https://github.com/microsoft/vcpkg/pull/12634) [vcpkg] Improving android support (by @christophe-calmejane) +- [(#9162)](https://github.com/microsoft/vcpkg/pull/9162) [crashrpt] Add new port (by @tbdrake) +- [(#12810)](https://github.com/microsoft/vcpkg/pull/12810) [vcpkg] Make C++ the primary github language (by @strega-nil) +- [(#12198)](https://github.com/microsoft/vcpkg/pull/12198) [vcpkg] Add `vcpkg export` to E2E tests. Enable E2E tests on all platforms. (by @ras0219) +- [(#12698)](https://github.com/microsoft/vcpkg/pull/12698) [vcpkg] Rewrite CMake build system to be more target-based (by @strega-nil) +- [(#12776)](https://github.com/microsoft/vcpkg/pull/12776) [vcpkg_copy_tool_dependencies] Use vcpkg internal powershell (by @JackBoosY) +- [(#12805)](https://github.com/microsoft/vcpkg/pull/12805) [lapack-reference|fortran] Add new port (by @Neumann-A) +- [(#12829)](https://github.com/microsoft/vcpkg/pull/12829) [vcpkg] Fix resolution of default features when using Manifest mode (by @ras0219) +- [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues (by @Neumann-A) +- [(#12818)](https://github.com/microsoft/vcpkg/pull/12818) [constexpr-contracts] Adds new port (by @cjdb) +- [(#12876)](https://github.com/microsoft/vcpkg/pull/12876) [vcpkg] Reduce dependencies and contents of vcpkgpaths.h (by @ras0219) +- [(#12866)](https://github.com/microsoft/vcpkg/pull/12866) [msys] Improve vcpkg_acquire_msys (by @PhoebeHui) +- [(#12897)](https://github.com/microsoft/vcpkg/pull/12897) [vcpkg] Restore layering and purge unused ParagraphParseResult (by @ras0219) +- [(#12895)](https://github.com/microsoft/vcpkg/pull/12895) [vcpkg_find_acquire_program] add version check for ninja (by @Neumann-A) +- [(#12927)](https://github.com/microsoft/vcpkg/pull/12927) [meson] Update meson to 0.55.1 (by @Neumann-A) +- [(#12837)](https://github.com/microsoft/vcpkg/pull/12837) Fix/clang10 linux (by @ignacionr) +- [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) (by @NancyLi1013) +- [(#12774)](https://github.com/microsoft/vcpkg/pull/12774) [vcpkg] Use std::filesystem when Visual Studio is greater than 2015 (by @JackBoosY) +- [(#12626)](https://github.com/microsoft/vcpkg/pull/12626) [vcpkg_find_acquire_program] Enable find_acquire(PKGCONFIG) (by @ras0219) +- [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. (by @Sibras) +- [(#12864)](https://github.com/microsoft/vcpkg/pull/12864) [vcpkg_execute_build_process] Re-fix qt5 components build (by @JackBoosY) +- [(#13000)](https://github.com/microsoft/vcpkg/pull/13000) [vcpkg] Fix baseline (by @NancyLi1013) +- [(#12985)](https://github.com/microsoft/vcpkg/pull/12985) [vcpkg] Add Forward Declarations (originally by @cngzhnp) (by @strega-nil) +- [(#12976)](https://github.com/microsoft/vcpkg/pull/12976) [vcpkg] Update hint message (by @PhoebeHui) +- [(#12974)](https://github.com/microsoft/vcpkg/pull/12974) [fluidsynth/redis-plus-plus] Update to the latest released version (by @NancyLi1013) +- [(#13017)](https://github.com/microsoft/vcpkg/pull/13017) remove registries.h and fwd/registries.h... (by @strega-nil) +- [(#12975)](https://github.com/microsoft/vcpkg/pull/12975) [openmpi/vcpkg_build_make] Disable parallel build (by @JackBoosY) +- [(#13043)](https://github.com/microsoft/vcpkg/pull/13043) [vcpkg] Fix hint message (by @PhoebeHui) +- [(#12046)](https://github.com/microsoft/vcpkg/pull/12046) [portmidi] Updated portmidi package to use alternative code source (by @stekyne) +- [(#13066)](https://github.com/microsoft/vcpkg/pull/13066) [typo] Fix incorrect Path in readme (by @ninjaoflight) +- [(#12910)](https://github.com/microsoft/vcpkg/pull/12910) [vcpkg] Fix editable bug (by @ras0219) +- [(#12523)](https://github.com/microsoft/vcpkg/pull/12523) [vcpkg.cmake] check for vcpkg.json only in `${CMAKE_SOURCE_DIR}` (by @strega-nil) +- [(#12964)](https://github.com/microsoft/vcpkg/pull/12964) [vcpkg] Do not use raw paths inside regexes (by @hanst99) +- [(#13092)](https://github.com/microsoft/vcpkg/pull/13092) [vcpkg] Hotfix regression in #12523 (by @ras0219) +- [(#13067)](https://github.com/microsoft/vcpkg/pull/13067) Sort file lists and failure logs together. (by @BillyONeal) +- [(#12738)](https://github.com/microsoft/vcpkg/pull/12738) [vcpkg] Use https sources for common tools (by @janisozaur) +- [(#13058)](https://github.com/microsoft/vcpkg/pull/13058) [Box2d] Update to 2.4.0 (by @JonLiu1993) +- [(#12977)](https://github.com/microsoft/vcpkg/pull/12977) fix vcpkg_configure_cmake for case when having semicolons in OPTIONS (by @jgehw) +- [(#12950)](https://github.com/microsoft/vcpkg/pull/12950) [vcpkg] Fix build on older compilers. (by @huahang) +- [(#13104)](https://github.com/microsoft/vcpkg/pull/13104) [vcpkg] Fix vcpkg_acquire_msys failing on path with spaces (by @SupSuper) +- [(#13125)](https://github.com/microsoft/vcpkg/pull/13125) Disable fluidlite in CI. (by @BillyONeal) +- [(#13117)](https://github.com/microsoft/vcpkg/pull/13117) [vcpkg] Fix #13094 by avoiding the comma operator. (by @BillyONeal) +- [(#13107)](https://github.com/microsoft/vcpkg/pull/13107) [VMSS] Fix the printed error message (by @JackBoosY) +- [(#13069)](https://github.com/microsoft/vcpkg/pull/13069) [vcpkg] Fix upgrade for port-version (by @strega-nil) +- [(#12982)](https://github.com/microsoft/vcpkg/pull/12982) [vcpkg_find_acquire_program] Cleanup and add CI testing (by @ras0219) +- [(#13142)](https://github.com/microsoft/vcpkg/pull/13142) Allow use of VS LLVM clang-format. (by @BillyONeal) +- [(#13148)](https://github.com/microsoft/vcpkg/pull/13148) [baseline] Skip check of clapack:x64-osx in the baseline (by @JackBoosY) + +
+The following 59 ports have been added: + +|port|version| +|---|---| +|[nanobench](https://github.com/microsoft/vcpkg/pull/11955)| 4.0.0 +|[cgns](https://github.com/microsoft/vcpkg/pull/9960)| 3.4.0-1 +|[paraview](https://github.com/microsoft/vcpkg/pull/9960)[#12067](https://github.com/microsoft/vcpkg/pull/12067) [#12144](https://github.com/microsoft/vcpkg/pull/12144) [#12149](https://github.com/microsoft/vcpkg/pull/12149) [#11596](https://github.com/microsoft/vcpkg/pull/11596) [#12342](https://github.com/microsoft/vcpkg/pull/12342) | 5.8.0-2 +|[drogon](https://github.com/microsoft/vcpkg/pull/12024)[#12931](https://github.com/microsoft/vcpkg/pull/12931) [#13007](https://github.com/microsoft/vcpkg/pull/13007) | v1.0.0-beta21 +|[libxdiff](https://github.com/microsoft/vcpkg/pull/12017)| 0.23 +|[efsw](https://github.com/microsoft/vcpkg/pull/11901)| 2020-06-08 +|[bitmagic](https://github.com/microsoft/vcpkg/pull/11890)| 6.4.0 +|[tgbot-cpp](https://github.com/microsoft/vcpkg/pull/11876)| 1.2.1 +|[ignition-plugin1](https://github.com/microsoft/vcpkg/pull/11275)| 1.1.0 +|[ppmagic](https://github.com/microsoft/vcpkg/pull/12253)| 2020-07-03 +|[getdns](https://github.com/microsoft/vcpkg/pull/12090)| 1.6.0 +|[font-chef](https://github.com/microsoft/vcpkg/pull/12293)| 1.0.1 +|[implot](https://github.com/microsoft/vcpkg/pull/11920)[#12835](https://github.com/microsoft/vcpkg/pull/12835) | 0.4 +|[threadpool](https://github.com/microsoft/vcpkg/pull/11650)| 0.2.5 +|[mygui](https://github.com/microsoft/vcpkg/pull/11991)| 2020-06-17 +|[kfr](https://github.com/microsoft/vcpkg/pull/8322)| 2020-06-15 +|[meshoptimizer](https://github.com/microsoft/vcpkg/pull/12211)| 0.14 +|[edlib](https://github.com/microsoft/vcpkg/pull/12490)| 1.2.6 +|[neargye-semver](https://github.com/microsoft/vcpkg/pull/12406)| 0.2.2 +|[marble](https://github.com/microsoft/vcpkg/pull/8628)| 19.08.2 +|[simple-fft](https://github.com/microsoft/vcpkg/pull/11929)| 2020-06-14 +|[stx](https://github.com/microsoft/vcpkg/pull/12011)| 1.0.1 +|[rsocket](https://github.com/microsoft/vcpkg/pull/11021)| 2020.05.04.00-1 +|[brpc](https://github.com/microsoft/vcpkg/pull/11524)| 0.9.7 +|[gamedev-framework](https://github.com/microsoft/vcpkg/pull/12426)[#12680](https://github.com/microsoft/vcpkg/pull/12680) | 0.17 +|[tomlplusplus](https://github.com/microsoft/vcpkg/pull/10786)[#12859](https://github.com/microsoft/vcpkg/pull/12859) | 2.1.0 +|[vcpkg-ci-paraview](https://github.com/microsoft/vcpkg/pull/12342)| 1 +|[avro-cpp](https://github.com/microsoft/vcpkg/pull/11376)| 1.9.2 +|[xframe](https://github.com/microsoft/vcpkg/pull/12427)| 0.3.0 +|[minc](https://github.com/microsoft/vcpkg/pull/11208)| 2.4.03 +|[nifticlib](https://github.com/microsoft/vcpkg/pull/11208)| 2020-04-30 +|[ngspice](https://github.com/microsoft/vcpkg/pull/12695)| 32 +|[josuttis-jthread](https://github.com/microsoft/vcpkg/pull/12497)[#13040](https://github.com/microsoft/vcpkg/pull/13040) | 2020-07-21 +|[lapack](https://github.com/microsoft/vcpkg/pull/12464)[#12805](https://github.com/microsoft/vcpkg/pull/12805) | 1 +|[qwtw](https://github.com/microsoft/vcpkg/pull/12748)[#12961](https://github.com/microsoft/vcpkg/pull/12961) | 3.1.0 +|[cppad](https://github.com/microsoft/vcpkg/pull/12560)| 20200000.3 +|[kf5completion](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5config](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5coreaddons](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5crash](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5guiaddons](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5i18n](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5itemmodels](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5itemviews](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5widgetsaddons](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5windowsystem](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[libde265](https://github.com/microsoft/vcpkg/pull/11861)| 1.0.5 +|[libheif](https://github.com/microsoft/vcpkg/pull/11861)[#12856](https://github.com/microsoft/vcpkg/pull/12856) | 1.7.0 +|[quazip](https://github.com/microsoft/vcpkg/pull/11861)| 0.9.1 +|[vc](https://github.com/microsoft/vcpkg/pull/11861)| 1.4.1 +|[tlx](https://github.com/microsoft/vcpkg/pull/11943)| 0.5.20191212 +|[crashrpt](https://github.com/microsoft/vcpkg/pull/9162)| 1.4.3 +|[dbghelp](https://github.com/microsoft/vcpkg/pull/9162)| 0.0 +|[opencolorio-tools](https://github.com/microsoft/vcpkg/pull/12420)| 1.1.1 +|[lapack-reference](https://github.com/microsoft/vcpkg/pull/12805)[#12977](https://github.com/microsoft/vcpkg/pull/12977) [#12929](https://github.com/microsoft/vcpkg/pull/12929) | 3.8.0 +|[vcpkg-gfortran](https://github.com/microsoft/vcpkg/pull/12805)| 1 +|[constexpr-contracts](https://github.com/microsoft/vcpkg/pull/12818)| 2020-08-09 +|[fluidlite](https://github.com/microsoft/vcpkg/pull/13006)[#13125](https://github.com/microsoft/vcpkg/pull/13125) | 2020-08-20 +|[boost-uninstall](https://github.com/microsoft/vcpkg/pull/12851)| 1.73.0 +
+ +
+The following 345 ports have been updated: + +- slikenet `2019-10-22_1` -> `2019-10-22-2` + - [(#11987)](https://github.com/microsoft/vcpkg/pull/11987) [slikenet] Add cmake config and targets file + +- breakpad `2019-07-11-1` -> `2019-07-11-2` + - [(#11984)](https://github.com/microsoft/vcpkg/pull/11984) [breakpad] Fix build failure on OSX + +- plf-colony `2019-08-10` -> `5.33` + - [(#11993)](https://github.com/microsoft/vcpkg/pull/11993) [plf-colony] Update to 5.33 + +- thrift `2020-02-08` -> `0.13.0` + - [(#11981)](https://github.com/microsoft/vcpkg/pull/11981) [thrift] Update to 0.13.0 and fix OSX build + +- libvpx `1.8.1-5` -> `1.8.1-7` + - [(#11963)](https://github.com/microsoft/vcpkg/pull/11963) [libvpx] Support arm64-windows + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#12401)](https://github.com/microsoft/vcpkg/pull/12401) [liblzma, libvpx] Add mingw support + - [(#12706)](https://github.com/microsoft/vcpkg/pull/12706) [libvpx] fix pdb paths + +- libzip `rel-1-6-1` -> `1.7.1` + - [(#11982)](https://github.com/microsoft/vcpkg/pull/11982) [libzip] Update to 1.7.1 + - [(#12610)](https://github.com/microsoft/vcpkg/pull/12610) [libzip] Fix find_package error + +- directxtex `jun2020` -> `jun2020b` + - [(#11971)](https://github.com/microsoft/vcpkg/pull/11971) [directxtk12][directxtex] Update to latest version + - [(#12332)](https://github.com/microsoft/vcpkg/pull/12332) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + - [(#13060)](https://github.com/microsoft/vcpkg/pull/13060) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtk12 `jun2020` -> `jun2020b` + - [(#11971)](https://github.com/microsoft/vcpkg/pull/11971) [directxtk12][directxtex] Update to latest version + - [(#12332)](https://github.com/microsoft/vcpkg/pull/12332) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + - [(#13060)](https://github.com/microsoft/vcpkg/pull/13060) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- geographiclib `1.47-patch1-12` -> `1.47-patch1-16` + - [(#11965)](https://github.com/microsoft/vcpkg/pull/11965) [vcpkg baseline] Retrigger failed ports in baseline + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12379)](https://github.com/microsoft/vcpkg/pull/12379) [geographiclib] Update to 1.50.1 + - [(#12471)](https://github.com/microsoft/vcpkg/pull/12471) [vcpkg format-manifest] Add convert-control flag + +- polyclipping `6.4.2` -> `6.4.2-4` + - [(#11965)](https://github.com/microsoft/vcpkg/pull/11965) [vcpkg baseline] Retrigger failed ports in baseline + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- qhull `7.3.2-2` -> `8.0.0` + - [(#12015)](https://github.com/microsoft/vcpkg/pull/12015) [qhull] update version 8.0.0 + +- jsoncons `0.153.0` -> `0.155.1` + - [(#12014)](https://github.com/microsoft/vcpkg/pull/12014) [jsoncons] Update to v0.153.3 + - [(#12372)](https://github.com/microsoft/vcpkg/pull/12372) [jsoncons] Update to v0.154.1 + - [(#12827)](https://github.com/microsoft/vcpkg/pull/12827) [jsoncons] Update to version 0.155.1 + +- azure-c-shared-utility `2020-02-04.1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + +- azure-iot-sdk-c `2020-02-04.1-1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12209)](https://github.com/microsoft/vcpkg/pull/12209) [azure-iot-sdk-c] Fix feature name and enable to build + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + - [(#12605)](https://github.com/microsoft/vcpkg/pull/12605) [azure-iot-sdk-c] Fix passing hsm_type_symm_key + +- azure-macro-utils-c `2020-02-04.1` -> `2020-06-17-1` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + +- azure-uamqp-c `2020-02-04.1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + +- azure-uhttp-c `2020-02-04.1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + +- azure-umqtt-c `2020-02-04.1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + +- umock-c `2020-02-04.1` -> `2020-06-17-1` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + +- tinyxml2 `8.0.0` -> `8.0.0-1` + - [(#11966)](https://github.com/microsoft/vcpkg/pull/11966) [tinyxml2] Fix generation of pkg-config file + +- nlohmann-json `3.7.3` -> `3.9.1` + - [(#11941)](https://github.com/microsoft/vcpkg/pull/11941) [nlohmann-json] Upgrade to 3.8.0 + - [(#12117)](https://github.com/microsoft/vcpkg/pull/12117) [nlohmann-json] Always install multiple headers to allow forward declarations + - [(#12601)](https://github.com/microsoft/vcpkg/pull/12601) [nlohmann-json] Update to 3.9.0 + - [(#12787)](https://github.com/microsoft/vcpkg/pull/12787) [nlohmann-json] Update to 3.9.1 + +- trantor `v1.0.0-rc13` -> `v1.0.0-rc16` + - [(#11937)](https://github.com/microsoft/vcpkg/pull/11937) [trantor] Bump version to v1.0.0-rc14 + - [(#12930)](https://github.com/microsoft/vcpkg/pull/12930) [trantor] Update to 1.0.0-rc16 + +- graphicsmagick `1.3.35` -> `1.3.35-2` + - [(#11926)](https://github.com/microsoft/vcpkg/pull/11926) [graphicsmagick] fix Magick++.h header location. + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- bitsery `5.0.3` -> `5.1.0` + - [(#11912)](https://github.com/microsoft/vcpkg/pull/11912) [bitsery] Update to 5.1.0 version + +- skyr-url `1.10.0` -> `1.12.0` + - [(#11911)](https://github.com/microsoft/vcpkg/pull/11911) [skyr-url] Updated version number of skyr-url + - [(#12214)](https://github.com/microsoft/vcpkg/pull/12214) [skyr-url] Changed version number to 1.12.0 + +- vtk `9.0-2` -> `9.0.1` + - [(#9960)](https://github.com/microsoft/vcpkg/pull/9960) [CGNS/ParaView] Add new ports + - [(#12067)](https://github.com/microsoft/vcpkg/pull/12067) [vcpkg baseline] Fix baseline errors + - [(#11399)](https://github.com/microsoft/vcpkg/pull/11399) [vtk] Added opengl feature. + - [(#12149)](https://github.com/microsoft/vcpkg/pull/12149) [vtk] update to 9.0.1 + - [(#12472)](https://github.com/microsoft/vcpkg/pull/12472) [vtk|cuda] add nvcc to the path + - [(#12342)](https://github.com/microsoft/vcpkg/pull/12342) [qt5-base] Add zstd as a dependency + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- so5extra `1.4.0` -> `1.4.1` + - [(#12052)](https://github.com/microsoft/vcpkg/pull/12052) [so5extra] update to v.1.4.1. + +- sobjectizer `5.7.0.1` -> `5.7.1` + - [(#12051)](https://github.com/microsoft/vcpkg/pull/12051) [SObjectizer] update to v.5.7.1. + +- field3d `1.7.2` -> `1.7.3` + - [(#11747)](https://github.com/microsoft/vcpkg/pull/11747) [hdf5] Update HDF5 to 1.12 + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + - [(#12342)](https://github.com/microsoft/vcpkg/pull/12342) [qt5-base] Add zstd as a dependency + +- hdf5 `1.10.5-12` -> `1.12.0` + - [(#11747)](https://github.com/microsoft/vcpkg/pull/11747) [hdf5] Update HDF5 to 1.12 + +- freerdp `2.0.0-1` -> `2.1.1-1` + - [(#12050)](https://github.com/microsoft/vcpkg/pull/12050) [freerdp] Update to version 2.1.1 + - [(#12037)](https://github.com/microsoft/vcpkg/pull/12037) [freerdp] Fix x64-osx triplet + +- openal-soft `1.20.1-1` -> `1.20.1-2` + - [(#12047)](https://github.com/microsoft/vcpkg/pull/12047) [openal-soft] Fix build failure by updating the library + - [(#12318)](https://github.com/microsoft/vcpkg/pull/12318) [openal-soft] Revert #12047 + - [(#12103)](https://github.com/microsoft/vcpkg/pull/12103) Mingw port fixes + +- absent `0.3.0` -> `0.3.1` + - [(#12036)](https://github.com/microsoft/vcpkg/pull/12036) [absent] Bump version 0.3.1 + +- cjson `2019-11-30` -> `2019-11-30-1` + - [(#12026)](https://github.com/microsoft/vcpkg/pull/12026) [cjson] fix windows-static for don't export symbols + +- open62541 `1.0.1` -> `1.1` + - [(#12023)](https://github.com/microsoft/vcpkg/pull/12023) [open62541] update to v1.1, add encryption support + +- abseil `2020-03-03-6` -> `2020-03-03-7` + - [(#12022)](https://github.com/microsoft/vcpkg/pull/12022) [abseil] Fix usage issue + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12471)](https://github.com/microsoft/vcpkg/pull/12471) [vcpkg format-manifest] Add convert-control flag + - [(#12781)](https://github.com/microsoft/vcpkg/pull/12781) [abseil] Fix CMake warning + +- nowide `10.0.1` -> `11.0.0` + - [(#12020)](https://github.com/microsoft/vcpkg/pull/12020) [nowide] Update to 11.0.0 + +- cpp-httplib `0.5.1` -> `0.7.0` + - [(#12010)](https://github.com/microsoft/vcpkg/pull/12010) [cpp-httplib] Update library to 0.7.0 + +- openmesh `8.0` -> `8.1` + - [(#12007)](https://github.com/microsoft/vcpkg/pull/12007) [openmesh] Fix install *.dll and add vcpkg-cmake-wrapper.cmake + - [(#11739)](https://github.com/microsoft/vcpkg/pull/11739) [openmesh] Upgrade to 8.1 + +- cpprestsdk `2.10.16-2` -> `2.10.16-3` + - [(#12006)](https://github.com/microsoft/vcpkg/pull/12006) [cpprestsdk] Fix usage issue when building static + +- activemq-cpp `3.9.5-2` -> `3.9.5-3` + - [(#12005)](https://github.com/microsoft/vcpkg/pull/12005) [activemq-cpp] Fix static build + +- date `2019-11-08` -> `3.0.0` + - [(#11968)](https://github.com/microsoft/vcpkg/pull/11968) [date] Update to 3.0.0 + - [(#12739)](https://github.com/microsoft/vcpkg/pull/12739) [date] Fix config.cmake and usage + +- libmicrohttpd `0.9.63-2` -> `0.9.63-3` + - [(#11983)](https://github.com/microsoft/vcpkg/pull/11983) [libmicrohttpd] Support build on UNIX and use msbuild on Windows + - [(#12455)](https://github.com/microsoft/vcpkg/pull/12455) [libmicrohttpd] Add `platform.h` to restricted header list. + +- llvm `10.0.0-3` -> `10.0.0-4` + - [(#11956)](https://github.com/microsoft/vcpkg/pull/11956) [llvm] fix issue #11916 + +- ffmpeg `4.2-10` -> `4.2-13` + - [(#11946)](https://github.com/microsoft/vcpkg/pull/11946) [ffmpeg] Add avisynthplus support + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#12083)](https://github.com/microsoft/vcpkg/pull/12083) [ffmpeg] Allow gpl builds without avisynthplus + - [(#12063)](https://github.com/microsoft/vcpkg/pull/12063) [ffmpeg] Fix tools dependency dll file + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + - [(#12635)](https://github.com/microsoft/vcpkg/pull/12635) [ffmpeg] fix FindFFMPEG.cmake to work properly even without avresample + - [(#12843)](https://github.com/microsoft/vcpkg/pull/12843) [ffmpeg] Some libraries in ffmpeg can be optional + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + - [(#13004)](https://github.com/microsoft/vcpkg/pull/13004) [ffmpeg] fix cmake module + +- imgui `1.76-1` -> `1.78` + - [(#11919)](https://github.com/microsoft/vcpkg/pull/11919) [imgui] Add Freetype feature + - [(#12155)](https://github.com/microsoft/vcpkg/pull/12155) [imgui] Update to 1.77 + - [(#12329)](https://github.com/microsoft/vcpkg/pull/12329) [imgui] Split bindings to multiple features + - [(#12210)](https://github.com/microsoft/vcpkg/pull/12210) [ogre] Update to version 1.12.7 and fix link error + - [(#12890)](https://github.com/microsoft/vcpkg/pull/12890) [imgui] Add messages for unsupported features + - [(#13064)](https://github.com/microsoft/vcpkg/pull/13064) [imgui] Update to 1.78 + - [(#12691)](https://github.com/microsoft/vcpkg/pull/12691) [libigl] fix imgui feature + +- x265 `3.2-3` -> `3.4` + - [(#11903)](https://github.com/microsoft/vcpkg/pull/11903) [x265] Delete the bin directory if the platform is Linux + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + - [(#13048)](https://github.com/microsoft/vcpkg/pull/13048) [x265] Update source and version + +- wtl `10.0-5` -> `10.0.10077` + - [(#11893)](https://github.com/microsoft/vcpkg/pull/11893) [wtl] Update to 10.0.10077 + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12688)](https://github.com/microsoft/vcpkg/pull/12688) [wtl ] Upgrade wtl to 10.0.10077. + +- icu `67.1` -> `67.1-2` + - [(#11897)](https://github.com/microsoft/vcpkg/pull/11897) [icu] Add tools + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + +- cairo `1.16.0-4` -> `1.16.0-6` + - [(#11829)](https://github.com/microsoft/vcpkg/pull/11829) [cairo] Fix error in static build + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- pango `1.40.11-6` -> `1.40.11-7` + - [(#11829)](https://github.com/microsoft/vcpkg/pull/11829) [cairo] Fix error in static build + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- grpc `1.28.1-1` -> `1.31.1` + - [(#11791)](https://github.com/microsoft/vcpkg/pull/11791) [grpc] Update to 1.29.1 + - [(#12611)](https://github.com/microsoft/vcpkg/pull/12611) [grpc] Fix generate plugin grpc_csharp_ext + - [(#12920)](https://github.com/microsoft/vcpkg/pull/12920) [grpc] grpc v1.30.2 + - [(#13084)](https://github.com/microsoft/vcpkg/pull/13084) [grpc][upb][re2] grpc v1.31.1 + +- offscale-libetcd-cpp `2019-07-10` -> `2019-07-10-1` + - [(#11791)](https://github.com/microsoft/vcpkg/pull/11791) [grpc] Update to 1.29.1 + +- stlab `1.5.2` -> `1.5.2-1` + - [(#11787)](https://github.com/microsoft/vcpkg/pull/11787) [stlab] Fix cmake config file + +- ffnvcodec `9.1.23.1` -> `9.1.23.1-1` + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- libpq `12.2-2` -> `12.2-3` + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + - [(#12415)](https://github.com/microsoft/vcpkg/pull/12415) [libpq] Remove broken features + - [(#12674)](https://github.com/microsoft/vcpkg/pull/12674) [libpq] only require bison and flex on Windows + +- tensorflow-cc `1.14-2` -> `1.14-3` + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#12546)](https://github.com/microsoft/vcpkg/pull/12546) [tensorflow-cc] fix build issues on Windows + +- ignition-modularscripts `2020-05-09` -> `2020-05-16` + - [(#11275)](https://github.com/microsoft/vcpkg/pull/11275) [ignition-plugin1] Add new port 🤖 + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + +- apr `1.7.0` -> `1.7.0-1` + - [(#12067)](https://github.com/microsoft/vcpkg/pull/12067) [vcpkg baseline] Fix baseline errors + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + +- argtable2 `2.13-4` -> `2.13-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- cunit `2.1.3-3` -> `2.1.3-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- epsilon `0.9.2-1` -> `0.9.2-4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- freeglut `3.2.1-1` -> `3.2.1-4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- freeimage `3.18.0-9` -> `3.18.0-12` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- giflib `5.1.4-3` -> `5.1.4-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- gsoap `2.8.102` -> `2.8.105` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12784)](https://github.com/microsoft/vcpkg/pull/12784) [gSoap] Update to 2.8.105 and add a required shared directory + +- healpix `1.12.10-1` -> `1.12.10-5` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- irrlicht `1.8.4-5` -> `1.8.4-8` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#13137)](https://github.com/microsoft/vcpkg/pull/13137) [irrlicht] Patch moved sysctl.h header file + +- itpp `4.3.1-2` -> `4.3.1-5` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libaiff `5.0-3` -> `5.0-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libdisasm `0.23-3` -> `0.23-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libmad `0.15.1-5` -> `0.15.1-8` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libmikmod `3.3.11.1-5` -> `3.3.11.1-8` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libsquish `1.15-3` -> `1.15-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libssh `0.9.3-1` -> `0.9.3-2` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- libusb-win32 `1.2.6.0-3` -> `1.2.6.0-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libuuid `1.0.3-4` -> `1.0.3-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libxmp-lite `4.4.1-3` -> `4.4.1-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- mathgl `2.4.3-3` -> `2.4.3-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- mp3lame `3.100` -> `3.100-3` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- mpg123 `1.25.8-10` -> `1.25.8-12` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12287)](https://github.com/microsoft/vcpkg/pull/12287) [mpg123] Update portfile.cmake to accomodate OpenSUSE 15.x /lib /lib64 + - [(#11535)](https://github.com/microsoft/vcpkg/pull/11535) [mpg123] Allow cross-compiling, fix previous builds tainting rebuilds + +- pcre `8.44-1` -> `8.44-4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12252)](https://github.com/microsoft/vcpkg/pull/12252) [pcre] Use vcpkg_from_sourceforge as a fallback + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12629)](https://github.com/microsoft/vcpkg/pull/12629) [pcre] Fix installation when only building release + +- pcre2 `10.30-7` -> `10.35` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12233)](https://github.com/microsoft/vcpkg/pull/12233) [pcre2] Restore the https://ftp.pcre.org/ mirror in addition to the SourceForge mirrors. + - [(#11754)](https://github.com/microsoft/vcpkg/pull/11754) [pcre2] Update to 10.35 + - [(#12347)](https://github.com/microsoft/vcpkg/pull/12347) [pcre2] Fix -mshstk needed with -fcf-protection + +- plplot `5.13.0-5` -> `5.13.0-8` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- podofo `0.9.6-8` -> `0.9.6-9` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- portmidi `0.217.1-1` -> `0.234` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12046)](https://github.com/microsoft/vcpkg/pull/12046) [portmidi] Updated portmidi package to use alternative code source + +- pthreads `3.0.0-5` -> `3.0.0-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- qt5-base `5.12.8-4` -> `5.15.0` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12153)](https://github.com/microsoft/vcpkg/pull/12153) [qt5-base] fix static init fiasco and fix debug dll's not being copied + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + - [(#12342)](https://github.com/microsoft/vcpkg/pull/12342) [qt5-base] Add zstd as a dependency + - [(#12752)](https://github.com/microsoft/vcpkg/pull/12752) [vcpkg_build_qmake] Disable multi-threaded build when file fails to open + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- qwt `6.1.3-11` -> `6.1.4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + +- rapidxml `1.13-1` -> `1.13-4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- sigslot `1.0.0` -> `1.0.0-3` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- soxr `0.1.3.` -> `0.1.3-2` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- tclap `1.2.2-2` -> `1.2.2-3` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- tinyfiledialogs `3.4.3-2` -> `3.6.3` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12137)](https://github.com/microsoft/vcpkg/pull/12137) [tinyfiledialogs] Update version and download path to v3.6.3 + +- tinyxml `2.6.2-4` -> `2.6.2-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- openssl-unix `1.1.1d-4` -> `1.1.1g` + - [(#11882)](https://github.com/microsoft/vcpkg/pull/11882) [openssl] Update openssl 1.1.1g - continued from PR #11003 + - [(#12544)](https://github.com/microsoft/vcpkg/pull/12544) [openssl-unix] Add mingw with dynamic libs support - take 2 + - [(#12867)](https://github.com/microsoft/vcpkg/pull/12867) [openssl] Interrupt the build process when files conflict + - [(#12986)](https://github.com/microsoft/vcpkg/pull/12986) [openssl-unix] Fix #12919 + - [(#12527)](https://github.com/microsoft/vcpkg/pull/12527) [openssl-unix] use xcrun for iOS triplet build + +- openssl-uwp `1.1.1d-1` -> `1.1.1g` + - [(#11882)](https://github.com/microsoft/vcpkg/pull/11882) [openssl] Update openssl 1.1.1g - continued from PR #11003 + - [(#12867)](https://github.com/microsoft/vcpkg/pull/12867) [openssl] Interrupt the build process when files conflict + +- openssl-windows `1.1.1d-2` -> `1.1.1g` + - [(#11882)](https://github.com/microsoft/vcpkg/pull/11882) [openssl] Update openssl 1.1.1g - continued from PR #11003 + - [(#12056)](https://github.com/microsoft/vcpkg/pull/12056) [openssl-windows] Added feature option to build openssl with no-pinshared flag + - [(#12867)](https://github.com/microsoft/vcpkg/pull/12867) [openssl] Interrupt the build process when files conflict + +- openssl `1.1.1d` -> `1.1.1g` + - [(#11882)](https://github.com/microsoft/vcpkg/pull/11882) [openssl] Update openssl 1.1.1g - continued from PR #11003 + - [(#12867)](https://github.com/microsoft/vcpkg/pull/12867) [openssl] Interrupt the build process when files conflict + +- cmocka `1.1.5-1` -> `1.1.5` + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + - [(#12828)](https://github.com/microsoft/vcpkg/pull/12828) [cmocka] Update to 2020-08-01 + +- libarchive `3.4.1-3` -> `3.4.1` + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + +- libiconv `1.16-3` -> `1.16` + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + +- libxml2 `2.9.9-6` -> `2.9.9` + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + +- suitesparse `5.4.0-5` -> `5.4.0-6` + - [(#11945)](https://github.com/microsoft/vcpkg/pull/11945) [suitesparse] Fixing `SuiteSparse_INCLUDE_DIRS` is not usable from the port. + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + +- boost-locale `1.73.0` -> `1.73.0-1` + - [(#10943)](https://github.com/microsoft/vcpkg/pull/10943) [boost-locale] Fix boost-locale failing to build with ICU + - [(#12762)](https://github.com/microsoft/vcpkg/pull/12762) [boost] Add Supports fields and more accurately handle arm64-windows/x64-uwp + +- monkeys-audio `5.38` -> `5.48` + - [(#12158)](https://github.com/microsoft/vcpkg/pull/12158) [monkeys-audio] Update to 5.46 + - [(#12690)](https://github.com/microsoft/vcpkg/pull/12690) [monkeys-audio] Update to 5.48 + +- google-cloud-cpp `1.14.0` -> `1.16.0` + - [(#12195)](https://github.com/microsoft/vcpkg/pull/12195) [google-cloud-cpp] Update to v1.15.0 + - [(#12747)](https://github.com/microsoft/vcpkg/pull/12747) [google-cloud-cpp] Update to v1.16.0 + +- infoware `0.5.3` -> `0.5.5` + - [(#12167)](https://github.com/microsoft/vcpkg/pull/12167) [infoware] Bump version to 0.5.4 + - [(#13010)](https://github.com/microsoft/vcpkg/pull/13010) [infoware] Bump version to 0.5.5 + +- sqlite3 `3.32.1` -> `3.32.3` + - [(#12185)](https://github.com/microsoft/vcpkg/pull/12185) update to sqlite3 3.32.3 + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: + - [(#11532)](https://github.com/microsoft/vcpkg/pull/11532) [sqlite3] Sqlite3 geopoly and json1 features + +- plibsys `0.0.4-3` -> `0.0.4` + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + +- span-lite `0.5.0` -> `0.7.0` + - [(#12206)](https://github.com/microsoft/vcpkg/pull/12206) [span-lite] Update to 0.7.0 + +- safeint `3.23` -> `3.24` + - [(#12217)](https://github.com/microsoft/vcpkg/pull/12217) [safeint] Update to 3.24 + +- xerces-c `3.2.3` -> `3.2.3-1` + - [(#12205)](https://github.com/microsoft/vcpkg/pull/12205) [xerces-c] rename feature from xmlch_wchar to xmlch-wchar + +- libnice `0.1.15-3` -> `0.1.15-4` + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- opencc `2020-04-26-4` -> `2020-04-26-6` + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12246)](https://github.com/microsoft/vcpkg/pull/12246) [opencc] Fix regression on pipeline + +- exiv2 `0.27.2-1` -> `0.27.3` + - [(#12278)](https://github.com/microsoft/vcpkg/pull/12278) [Exiv2] update to 0.27.3 + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- nanodbc `2.12.4-8` -> `2.12.4` + - [(#12274)](https://github.com/microsoft/vcpkg/pull/12274) [nanodbc] Set unixodbc as a dependency under non-Windows + +- doctest `2.3.7` -> `2.4.0` + - [(#12239)](https://github.com/microsoft/vcpkg/pull/12239) [doctest] update to 2.4.0 + +- opengl `0.0-6` -> `0.0-7` + - [(#12232)](https://github.com/microsoft/vcpkg/pull/12232) [opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. + +- wincrypt `0.0-1` -> `0.0-2` + - [(#12232)](https://github.com/microsoft/vcpkg/pull/12232) [opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. + +- winsock2 `0.0-1` -> `0.0-2` + - [(#12232)](https://github.com/microsoft/vcpkg/pull/12232) [opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. + +- openvr `1.10.30` -> `1.12.5` + - [(#12219)](https://github.com/microsoft/vcpkg/pull/12219) [openvr] Update to 1.12.5 + +- utf8h `841cb2deb8eb806e73fff0e1f43a11fca4f5da45` -> `2020-06-14` + - [(#12218)](https://github.com/microsoft/vcpkg/pull/12218) [utf8h] Update to latest version + +- libyuv `fec9121-1` -> `fec9121-2` + - [(#12213)](https://github.com/microsoft/vcpkg/pull/12213) [libyuv] Find dependency port libjpeg-turbo + - [(#12338)](https://github.com/microsoft/vcpkg/pull/12338) [libyuv] Fix static build issue + +- polyhook2 `2020-06-02` -> `2020-08-04` + - [(#12189)](https://github.com/microsoft/vcpkg/pull/12189) [polyhook2] Update to latest + - [(#12524)](https://github.com/microsoft/vcpkg/pull/12524) [asmjit] Update to the latest commit + +- ace `6.5.9-5` -> `6.5.11` + - [(#12183)](https://github.com/microsoft/vcpkg/pull/12183) [ace] 6.5.10 + - [(#12954)](https://github.com/microsoft/vcpkg/pull/12954) [ace] Update to 6.5.11 + +- curl `7.68.0-3` -> `7.71.1` + - [(#12141)](https://github.com/microsoft/vcpkg/pull/12141) [curl] Update to 7.71.0 + - [(#12758)](https://github.com/microsoft/vcpkg/pull/12758) [curl] Fix tools + - [(#12800)](https://github.com/microsoft/vcpkg/pull/12800) [curl] Fix static build + +- robin-hood-hashing `3.4.0` -> `3.8.0` + - [(#12147)](https://github.com/microsoft/vcpkg/pull/12147) [robin-hood-hashing] Update to 3.7.0 + - [(#12480)](https://github.com/microsoft/vcpkg/pull/12480) [robin-hood-hashing] Update to latest version + +- libexif `0.6.21-2` -> `0.6.22` + - [(#12161)](https://github.com/microsoft/vcpkg/pull/12161) [libexif] Update to 0.6.22 + +- cli `1.1.1` -> `1.2.0` + - [(#12139)](https://github.com/microsoft/vcpkg/pull/12139) [cli] update the version to 1.2.0 + +- libffi `3.3-2` -> `3.3-3` + - [(#12126)](https://github.com/microsoft/vcpkg/pull/12126) [libffi] Add pkgconfig file + - [(#12498)](https://github.com/microsoft/vcpkg/pull/12498) [libffi] fix crash in debug + +- angle `2020-05-15` -> `2020-05-15-1` + - [(#12111)](https://github.com/microsoft/vcpkg/pull/12111) [angle] Add egl renderer to list of files compiled for linux + +- caf `0.17.2` -> `0.17.3` + - [(#12068)](https://github.com/microsoft/vcpkg/pull/12068) [caf] Update to 0.17.3 + +- aws-sdk-cpp `1.7.333` -> `1.8.4` + - [(#12316)](https://github.com/microsoft/vcpkg/pull/12316) aws-sdk-cpp version update + +- libcopp `1.2.1` -> `1.3.1` + - [(#12264)](https://github.com/microsoft/vcpkg/pull/12264) [libcoppp] Update version to 1.3.0 + +- openimageio `2.1.9.0` -> `2.1.16.0-1` + - [(#11767)](https://github.com/microsoft/vcpkg/pull/11767) [openimageio] Update to version 2.1.16.0 + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + - [(#12592)](https://github.com/microsoft/vcpkg/pull/12592) [openimageio] Fix installed cmake file path + - [(#12856)](https://github.com/microsoft/vcpkg/pull/12856) [vcpkg baseline] Fix openimageio and pangolin build failures on Linux + +- evpp `0.7.0-2` -> `0.7.0-3` + - [(#11967)](https://github.com/microsoft/vcpkg/pull/11967) [evpp] Fix build error on OSX + - [(#12277)](https://github.com/microsoft/vcpkg/pull/12277) [libevent] update to 2.1.12 + +- protobuf `3.12.0-2` -> `3.13.0` + - [(#11851)](https://github.com/microsoft/vcpkg/pull/11851) [protobuf] Update to 3.12.3 + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12103)](https://github.com/microsoft/vcpkg/pull/12103) Mingw port fixes + - [(#12776)](https://github.com/microsoft/vcpkg/pull/12776) [vcpkg_copy_tool_dependencies] Use vcpkg internal powershell + - [(#12918)](https://github.com/microsoft/vcpkg/pull/12918) [protobuf] protobuf v3.13.0 + +- fontconfig `2.12.4-10` -> `2.12.4` + - [(#12322)](https://github.com/microsoft/vcpkg/pull/12322) [fontconfig] Fix fonts.conf install path + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- faad2 `2.9.1-1` -> `2.9.1` + - [(#12306)](https://github.com/microsoft/vcpkg/pull/12306) [Many ports] Fix invalid character in feature name + +- freetype `2.10.1-6` -> `2.10.2` + - [(#11846)](https://github.com/microsoft/vcpkg/pull/11846) [freetype] Update to 2.10.2 + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + - [(#12886)](https://github.com/microsoft/vcpkg/pull/12886) [many ports] Fix various problems with mingw + +- cgal `5.0.2-1` -> `5.0.3` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12711)](https://github.com/microsoft/vcpkg/pull/12711) [cgal] Update cgal to 5.0.3 + +- cutelyst2 `2.9.0` -> `2.9.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- kd-soap `1.8.0-1` -> `1.8.0-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- kf5archive `5.64.0` -> `5.64.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#11861)](https://github.com/microsoft/vcpkg/pull/11861) Adding libraries needed to build Krita + +- kf5holidays `5.64.0` -> `5.64.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- kf5plotting `5.64.0` -> `5.64.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- kf5syntaxhighlighting `5.64.0` -> `5.64.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- libqglviewer `2.7.2-2` -> `2.7.2-3` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- opencv2 `2.4.13.7-1` -> `2.4.13.7-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- opencv3 `3.4.7-3` -> `3.4.7-4` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- opencv4 `4.1.1-6` -> `4.3.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- osg-qt `Qt4-1` -> `Qt4-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qca `2.2.1` -> `2.2.1-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qcustomplot `2.0.1-3` -> `2.0.1-4` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qscintilla `2.11.4-1` -> `2.11.4-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt-advanced-docking-system `3.2.5-1` -> `3.2.5-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-3d `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-activeqt `5.12.8-1` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-androidextras `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-canvas3d `5.12.8` -> `0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-charts `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-connectivity `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + +- qt5-datavis3d `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-declarative `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-doc `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-gamepad `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-graphicaleffects `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-imageformats `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + +- qt5-location `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + +- qt5-macextras `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-mqtt `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-multimedia `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-networkauth `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-purchasing `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-quickcontrols `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-quickcontrols2 `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-remoteobjects `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-script `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-scxml `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-sensors `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-serialbus `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-serialport `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-speech `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-svg `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-tools `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-translations `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-virtualkeyboard `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-wayland `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-webchannel `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-webengine `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12494)](https://github.com/microsoft/vcpkg/pull/12494) [qt-webengine] Fix building with vs2017 + +- qt5-webglplugin `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-websockets `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-webview `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-winextras `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-x11extras `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-xmlpatterns `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5 `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12471)](https://github.com/microsoft/vcpkg/pull/12471) [vcpkg format-manifest] Add convert-control flag + - [(#12864)](https://github.com/microsoft/vcpkg/pull/12864) [vcpkg_execute_build_process] Re-fix qt5 components build + +- qtkeychain `v0.9.1` -> `v0.9.1-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- soqt `1.6.0` -> `1.6.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- range-v3 `0.10.0-20200425` -> `0.10.0-20200708` + - [(#12346)](https://github.com/microsoft/vcpkg/pull/12346) [range-v3] updates range-v3 + +- azure-storage-cpp `7.4.0` -> `7.5.0` + - [(#12333)](https://github.com/microsoft/vcpkg/pull/12333) [azure-storage-cpp] Upgrade to 7.5.0 + +- directxmesh `jun2020` -> `jul2020` + - [(#12332)](https://github.com/microsoft/vcpkg/pull/12332) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + - [(#13060)](https://github.com/microsoft/vcpkg/pull/13060) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtk `jun2020` -> `jul2020` + - [(#12332)](https://github.com/microsoft/vcpkg/pull/12332) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + - [(#13060)](https://github.com/microsoft/vcpkg/pull/13060) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- cuda `10.1-1` -> `10.1` + - [(#12244)](https://github.com/microsoft/vcpkg/pull/12244) [cuda] correct env variables for newer cuda versions + +- pybind11 `2.4.3` -> `2.5.0` + - [(#12394)](https://github.com/microsoft/vcpkg/pull/12394) [pybind11] Update to v2.5.0 + +- corrade `2019.10-1` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + +- magnum-extras `2019.10` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + +- magnum-integration `2019.10` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + +- magnum-plugins `2019.10-2` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + - [(#12458)](https://github.com/microsoft/vcpkg/pull/12458) [magnum-plugins] Fix file conflict with stb + +- magnum `2019.10-2` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + +- zstd `1.4.4-1` -> `1.4.4` + - [(#12407)](https://github.com/microsoft/vcpkg/pull/12407) [zstd] fix pkg-config files + +- string-theory `3.2` -> `3.3` + - [(#12440)](https://github.com/microsoft/vcpkg/pull/12440) [string-theory] Update to 3.3 + +- nrf-ble-driver `4.1.1-2` -> `4.1.2` + - [(#12436)](https://github.com/microsoft/vcpkg/pull/12436) [nrf-ble-driver] Update to v4.1.2 + +- folly `2019.10.21.00-2` -> `2019.10.21.00` + - [(#12419)](https://github.com/microsoft/vcpkg/pull/12419) [folly] Fix build error C3861 + +- boost-modular-build-helper `1.73.0-1` -> `1.73.0` + - [(#12417)](https://github.com/microsoft/vcpkg/pull/12417) [boost-modular-build-helper] Remove has_icu.lib + - [(#12535)](https://github.com/microsoft/vcpkg/pull/12535) [boost] s390x support + - [(#12634)](https://github.com/microsoft/vcpkg/pull/12634) [vcpkg] Improving android support + - [(#9224)](https://github.com/microsoft/vcpkg/pull/9224) [boost-modular-build-helper] Fix issue that link incorrect dependent libraries + - [(#12851)](https://github.com/microsoft/vcpkg/pull/12851) [boost-uninstall] Add port to easily uninstall all boost components + +- liblzma `5.2.4-5` -> `5.2.5` + - [(#12401)](https://github.com/microsoft/vcpkg/pull/12401) [liblzma, libvpx] Add mingw support + - [(#7226)](https://github.com/microsoft/vcpkg/pull/7226) [liblzma] Patch headers to fix https://github.com/OpenTTD/OpenTTD/pull/7614 + +- pugixml `1.10-1` -> `1.10` + - [(#12441)](https://github.com/microsoft/vcpkg/pull/12441) [pugixml] Fix pkgconfig file + +- hiredis `2019-11-2-1` -> `2019-11-2` + - [(#12354)](https://github.com/microsoft/vcpkg/pull/12354) [hiredis] Fix feature ssl build error on windows + +- eigen3 `3.3.7-5` -> `3.3.7` + - [(#12279)](https://github.com/microsoft/vcpkg/pull/12279) [eigen3] Fix eigen3 and cuda compatibility issue + +- zlib `1.2.11-6` -> `1.2.11` + - [(#12133)](https://github.com/microsoft/vcpkg/pull/12133) [zlib] Add pkgconfig file + - [(#12753)](https://github.com/microsoft/vcpkg/pull/12753) [zlib, libpng] Fix pkg-config for mingw + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- libmupdf `1.16.1-1` -> `1.17.0` + - [(#12483)](https://github.com/microsoft/vcpkg/pull/12483) [libmupdf] Update libmupdf to 1.17.0 + +- bzip2 `1.0.6-5` -> `1.0.6-6` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12880)](https://github.com/microsoft/vcpkg/pull/12880) [bzip2] fixes for building release-only + +- gmp `6.2.0-1` -> `6.2.0-2` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12664)](https://github.com/microsoft/vcpkg/pull/12664) [mpir, gmp] Add message to handle the conflicts between these two ports + +- libpng `1.6.37-9` -> `1.6.37-10` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12753)](https://github.com/microsoft/vcpkg/pull/12753) [zlib, libpng] Fix pkg-config for mingw + +- nettle `3.5.1-1` -> `3.5.1-2` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + +- ompl `1.4.2-4` -> `1.5.0` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + - [(#11737)](https://github.com/microsoft/vcpkg/pull/11737) [ompl]: upgrade to 1.5.0 + +- sdl1 `1.2.15-11` -> `1.2.15` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + +- alembic `1.7.12-1` -> `1.7.13` + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + - [(#12735)](https://github.com/microsoft/vcpkg/pull/12735) [alembic] Update to 1.7.13 + +- opencv `4.1.1-1` -> `4.3.0` + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- openexr `2.3.0-5` -> `2.5.0` + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- libftdi1 `1.4` -> `1.4-1` + - [(#9561)](https://github.com/microsoft/vcpkg/pull/9561) [libusb] Fix issue to support linux + +- libusb `1.0.23` -> `1.0.23-1` + - [(#9561)](https://github.com/microsoft/vcpkg/pull/9561) [libusb] Fix issue to support linux + - [(#12656)](https://github.com/microsoft/vcpkg/pull/12656) [libusb] build fails on windows due to symlink in extracted archive + - [(#13057)](https://github.com/microsoft/vcpkg/pull/13057) [libusb] Add vcpkg-cmake-wrapper + +- treehopper `1.11.3-3` -> `1.11.3-4` + - [(#9561)](https://github.com/microsoft/vcpkg/pull/9561) [libusb] Fix issue to support linux + +- outcome `2.1` -> `2.1.3` + - [(#12078)](https://github.com/microsoft/vcpkg/pull/12078) [outcome] Update library and fix portfile + +- librdkafka `1.2.0-2` -> `1.5.0` + - [(#12095)](https://github.com/microsoft/vcpkg/pull/12095) [librdkafka] Upgrade to 1.4.4 + - [(#12731)](https://github.com/microsoft/vcpkg/pull/12731) [librdkafka] Update to 1.5.0 + +- glew `2.1.0-7` -> `2.1.0-8` + - [(#12103)](https://github.com/microsoft/vcpkg/pull/12103) Mingw port fixes + +- mozjpeg `2020-06-02` -> `2020-06-02-1` + - [(#12118)](https://github.com/microsoft/vcpkg/pull/12118) [mozjpeg] fix build + +- fltk `1.3.5-2` -> `1.3.5` + - [(#12273)](https://github.com/microsoft/vcpkg/pull/12273) [fltk] Force static library due to global variables. Fix CMake Targets. + +- nana `1.7.2-3` -> `1.7.2` + - [(#12543)](https://github.com/microsoft/vcpkg/pull/12543) [nana] Fix the version and language standard + +- winpcap `4.1.3-3` -> `4.1.3` + - [(#12542)](https://github.com/microsoft/vcpkg/pull/12542) [winpcap] Remove the keyword 'inline' macro + +- boost-build `1.73.0-1` -> `1.73.0` + - [(#12535)](https://github.com/microsoft/vcpkg/pull/12535) [boost] s390x support + - [(#12851)](https://github.com/microsoft/vcpkg/pull/12851) [boost-uninstall] Add port to easily uninstall all boost components + +- restinio `0.6.8` -> `0.6.9` + - [(#12087)](https://github.com/microsoft/vcpkg/pull/12087) [RESTinio] Update to v.0.6.8.1 + - [(#12889)](https://github.com/microsoft/vcpkg/pull/12889) [restinio] update to 0.6.9 + - [(#13018)](https://github.com/microsoft/vcpkg/pull/13018) [restinio] update to v.0.6.10 + +- fizz `2020.02.03.00` -> `2020.02.03.00` + - [(#12277)](https://github.com/microsoft/vcpkg/pull/12277) [libevent] update to 2.1.12 + +- libevent `2.1.11-5` -> `2.1.12` + - [(#12277)](https://github.com/microsoft/vcpkg/pull/12277) [libevent] update to 2.1.12 + +- libflac `1.3.3-1` -> `1.3.3` + - [(#12374)](https://github.com/microsoft/vcpkg/pull/12374) [sdl2-mixer] Fix FLAC symbol export when static linking, add nativemidi default feature + - [(#12761)](https://github.com/microsoft/vcpkg/pull/12761) [flac] Disable stack smash protection and FORTIFY_SOURCE for mingw + +- libsndfile `1.0.29-9` -> `1.0.29` + - [(#12374)](https://github.com/microsoft/vcpkg/pull/12374) [sdl2-mixer] Fix FLAC symbol export when static linking, add nativemidi default feature + - [(#12921)](https://github.com/microsoft/vcpkg/pull/12921) [libsndfile] Update to 1.0.29 + +- sdl2-mixer `2.0.4-9` -> `2.0.4` + - [(#12374)](https://github.com/microsoft/vcpkg/pull/12374) [sdl2-mixer] Fix FLAC symbol export when static linking, add nativemidi default feature + +- physx `4.1.1-3` -> `4.1.1` + - [(#12413)](https://github.com/microsoft/vcpkg/pull/12413) [physx] Add patch for NVIDIAGameWorks/PhysX#322. + - [(#12710)](https://github.com/microsoft/vcpkg/pull/12710) [physx] Add support for checked and profile builds. + +- wxwidgets `3.1.3-1` -> `3.1.4` + - [(#12485)](https://github.com/microsoft/vcpkg/pull/12485) [wxwidgets] Adding wxWidgets resource compiler (wxrc) to /tools/wxwidgets directory + - [(#12733)](https://github.com/microsoft/vcpkg/pull/12733) [wxwidgets] Update to 3.1.4 + - [(#12885)](https://github.com/microsoft/vcpkg/pull/12885) [wxwidgets] copy pdbs + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- osgearth `2.10.2-1` -> `3.0` + - [(#12531)](https://github.com/microsoft/vcpkg/pull/12531) [osgearth] update to 3.0 + +- netcdf-c `4.7.3-1` -> `4.7.3` + - [(#12342)](https://github.com/microsoft/vcpkg/pull/12342) [qt5-base] Add zstd as a dependency + - [(#12755)](https://github.com/microsoft/vcpkg/pull/12755) [netcdf-c] also depend on embree on osx + - [(#12434)](https://github.com/microsoft/vcpkg/pull/12434) [netcdf-c] Fix dependency libmath + +- arrow `0.17.1` -> `1.0.0` + - [(#12537)](https://github.com/microsoft/vcpkg/pull/12537) [Arrow] Update to 1.0.0 + +- libigl `2.1.0-2` -> `2.2.0` + - [(#10252)](https://github.com/microsoft/vcpkg/pull/10252) [libigl] Fix configure error and dependencies + - [(#12691)](https://github.com/microsoft/vcpkg/pull/12691) [libigl] fix imgui feature + +- asiosdk `2.3.3` -> `2.3.3-1` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- jxrlib `2019.10.9` -> `2019.10.9-1` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- libmodman `2.0.1-1` -> `2.0.1-2` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- libproxy `0.4.15-1` -> `0.4.15-2` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- stb `2020-02-08` -> `2020-02-08-1` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- itk `5.0.1-2` -> `5.1.0` + - [(#11208)](https://github.com/microsoft/vcpkg/pull/11208) [ITK] Update to 5.1 + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- opencl `2.2-2-1` -> `2.2` + - [(#11208)](https://github.com/microsoft/vcpkg/pull/11208) [ITK] Update to 5.1 + +- openjpeg `2.3.1-1` -> `2.3.1` + - [(#11208)](https://github.com/microsoft/vcpkg/pull/11208) [ITK] Update to 5.1 + +- pbc `0.5.14-2` -> `0.5.14` + - [(#12732)](https://github.com/microsoft/vcpkg/pull/12732) [vcpkg baseline] Fix pbc build failure with x64-osx + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- libodb-sqlite `2.4.0-6` -> `2.4.0` + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: + +- gtkmm `3.22.2-2` -> `3.22.2` + - [(#12637)](https://github.com/microsoft/vcpkg/pull/12637) [gtkmm] fix missing symbol exports with gtkmm release build + +- wavpack `5.2.0` -> `5.2.0` + - [(#12742)](https://github.com/microsoft/vcpkg/pull/12742) [wavpack] Fix failure on linux and osx + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- shapelib `1.4.1-2` -> `1.5.0` + - [(#12737)](https://github.com/microsoft/vcpkg/pull/12737) [shapelib] Update to 1.5.0 + +- teemo `1.3` -> `2.1` + - [(#12728)](https://github.com/microsoft/vcpkg/pull/12728) [teemo] Update to v2.1 + +- quill `1.3.1` -> `1.4.0` + - [(#12683)](https://github.com/microsoft/vcpkg/pull/12683) [quill] Update to version 1.3.3 + - [(#12924)](https://github.com/microsoft/vcpkg/pull/12924) [quill] Update to 1.4.0 + +- libmariadb `3.1.7-1` -> `3.1.7` + - [(#12669)](https://github.com/microsoft/vcpkg/pull/12669) [libmariadb] Include bundled zlib and openssl + +- brotli `1.0.7-1` -> `1.0.7` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- cairomm `1.15.3-4` -> `1.15.3` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- freetype-gl `2019-03-29-3` -> `2019-03-29` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- libraqm `0.7.0-1` -> `0.7.0` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- sfml `2.5.1-7` -> `2.5.1` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + - [(#11800)](https://github.com/microsoft/vcpkg/pull/11800) [sfml][imgui-sfml] Push SFML_STATIC_LIBRARIES setting into `sfml` + +- fmt `6.2.1` -> `7.0.3` + - [(#12312)](https://github.com/microsoft/vcpkg/pull/12312) [fmt] Update to 7.0.2 + [spdlog] Update to 1.7.0 + - [(#12806)](https://github.com/microsoft/vcpkg/pull/12806) [fmt] Update to 7.0.3 + +- spdlog `1.6.1` -> `1.7.0` + - [(#12312)](https://github.com/microsoft/vcpkg/pull/12312) [fmt] Update to 7.0.2 + [spdlog] Update to 1.7.0 + +- armadillo `2019-04-16-8` -> `2019-04-16` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + +- blaze `3.7` -> `3.8` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#12916)](https://github.com/microsoft/vcpkg/pull/12916) [blaze] Update to Blaze 3.8 + +- ceres `1.14.0-7` -> `1.14.0` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + +- clapack `3.2.1-13` -> `3.2.1` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#12805)](https://github.com/microsoft/vcpkg/pull/12805) [lapack-reference|fortran] Add new port + +- dlib `19.19-1` -> `19.21` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#13061)](https://github.com/microsoft/vcpkg/pull/13061) [dlib] Update to v19.21 + +- geogram `1.6.9-7` -> `1.7.5` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#12562)](https://github.com/microsoft/vcpkg/pull/12562) [geogram] update to 1.7.5 + - [(#12626)](https://github.com/microsoft/vcpkg/pull/12626) [vcpkg_find_acquire_program] Enable find_acquire(PKGCONFIG) + +- mlpack `3.2.2-3` -> `3.2.2` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#12805)](https://github.com/microsoft/vcpkg/pull/12805) [lapack-reference|fortran] Add new port + +- pangolin `0.5-7` -> `0.5` + - [(#12515)](https://github.com/microsoft/vcpkg/pull/12515) [pangolin] Fix build failure on UNIX + - [(#12856)](https://github.com/microsoft/vcpkg/pull/12856) [vcpkg baseline] Fix openimageio and pangolin build failures on Linux + +- orocos-kdl `1.4-2` -> `1.4` + - [(#12794)](https://github.com/microsoft/vcpkg/pull/12794) [ocoros-kdl] Fix the CMake config file + +- log4cpp `2.9.1-2` -> `2.9.1` + - [(#12792)](https://github.com/microsoft/vcpkg/pull/12792) [log4cpp] Fix header file install path + +- bond `9.0.0` -> `9.0.2` + - [(#12782)](https://github.com/microsoft/vcpkg/pull/12782) [bond] Update to v9.0.2 + +- libtorrent `1.2.7` -> `1.2.9` + - [(#12768)](https://github.com/microsoft/vcpkg/pull/12768) [libtorrent] Update to 1.2.8 + - [(#12762)](https://github.com/microsoft/vcpkg/pull/12762) [boost] Add Supports fields and more accurately handle arm64-windows/x64-uwp + - [(#12946)](https://github.com/microsoft/vcpkg/pull/12946) [libtorrent] minor version bump and python patch adjustment + +- boost-context `1.73.0-1` -> `1.73.0` + - [(#12762)](https://github.com/microsoft/vcpkg/pull/12762) [boost] Add Supports fields and more accurately handle arm64-windows/x64-uwp + +- secp256k1 `2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4-2` -> `2017-19-10` + - [(#12630)](https://github.com/microsoft/vcpkg/pull/12630) [secp256k1] Fix build failures and export cmake targets + +- xbyak `5.911` -> `5.93` + - [(#12577)](https://github.com/microsoft/vcpkg/pull/12577) [Xbyak] Update to 5.93 + +- tiff `4.0.10-9` -> `4.1.0` + - [(#12559)](https://github.com/microsoft/vcpkg/pull/12559) [tiff] Update 4.0.10 to 4.1.0 + +- asmjit `2020-05-08` -> `2020-07-22` + - [(#12524)](https://github.com/microsoft/vcpkg/pull/12524) [asmjit] Update to the latest commit + +- libressl `2.9.1-2` -> `2.9.1` + - [(#11949)](https://github.com/microsoft/vcpkg/pull/11949) [libressl] add download mirror + +- darknet `2020-03-02` -> `2020-06-29` + - [(#11037)](https://github.com/microsoft/vcpkg/pull/11037) [darknet] ready for yolo_v4 + +- embree3 `3.8.0` -> `3.11.0` + - [(#12555)](https://github.com/microsoft/vcpkg/pull/12555) [embree3] Update to 3.11.0 + +- fribidi `1.0.9-1` -> `1.0.10` + - [(#12517)](https://github.com/microsoft/vcpkg/pull/12517) [fribidi] Update to 1.0.10 + +- opencolorio `1.1.1-2` -> `1.1.1` + - [(#12420)](https://github.com/microsoft/vcpkg/pull/12420) [opencolorio-tools] Separate feature application to avoid circular dependency + - [(#12869)](https://github.com/microsoft/vcpkg/pull/12869) [opencolorio] Update repository + +- osg `3.6.4-3` -> `3.6.5` + - [(#12672)](https://github.com/microsoft/vcpkg/pull/12672) [osg] Update to 3.6.5 + +- openblas `0.3.9-1` -> `0.3.9` + - [(#12805)](https://github.com/microsoft/vcpkg/pull/12805) [lapack-reference|fortran] Add new port + - [(#12956)](https://github.com/microsoft/vcpkg/pull/12956) [openblas] Fix generating pkg-config file + +- farmhash `1.1-1` -> `1.1` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- freexl `1.0.4-9` -> `1.0.4` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- libcrafter `0.3-1` -> `0.3` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- libmagic `5.37-1` -> `5.37` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- libwandio `4.2.1-2` -> `4.2.1` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- ocilib `4.6.4-1` -> `4.6.4` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- x264 `157-303c484ec828ed0-8` -> `157-303c484ec828ed0` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- wpilib `2020.1.1` -> `2020.3.2` + - [(#12373)](https://github.com/microsoft/vcpkg/pull/12373) [wpilib] Update to 2020.3.2 + +- proj4 `6.3.1-1` -> `6.3.1` + - [(#12875)](https://github.com/microsoft/vcpkg/pull/12875) [proj4] use sqlite3 config cmake, make sqlite3 private + +- tool-meson `0.54.2` -> `0.55.1` + - [(#12927)](https://github.com/microsoft/vcpkg/pull/12927) [meson] Update meson to 0.55.1 + +- apr-util `1.6.1-1` -> `1.6.1` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- expat `2.2.7` -> `2.2.9` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- gdal `2.4.1-9` -> `2.4.1` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + - [(#12541)](https://github.com/microsoft/vcpkg/pull/12541) [gdal] Fix static build issue + +- io2d `2019-07-11-2` -> `2019-07-11` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- libkml `1.3.0-4` -> `1.3.0` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- poco `1.9.2-2` -> `1.9.2` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- readosm `1.1.0-2` -> `1.1.0` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- skia `2020-05-18-1` -> `2020-05-18` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- spatialite-tools `4.3.0-2` -> `4.3.0` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- xlnt `1.4.0-1` -> `1.5.0` + - [(#12972)](https://github.com/microsoft/vcpkg/pull/12972) [xlnt] Upgrade xlnt to 1.5.0 + +- fdk-aac `2018-07-08-1` -> `2018-07-08-2` + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- opus `1.3.1-3` -> `1.3.1` + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + - [(#12886)](https://github.com/microsoft/vcpkg/pull/12886) [many ports] Fix various problems with mingw + +- sdl2 `2.0.12-1` -> `2.0.12` + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- speex `1.2.0-4` -> `1.2.0` + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- pcl `1.9.1-13` -> `1.11.0` + - [(#10042)](https://github.com/microsoft/vcpkg/pull/10042) [pcl] Update to 1.10.0 + - [(#13020)](https://github.com/microsoft/vcpkg/pull/13020) [pcl] check SSE flags + +- tinygltf `2.2.0` -> `2020-07-28` + - [(#12608)](https://github.com/microsoft/vcpkg/pull/12608) [tinygltf] update to v2.4.0 + +- pmdk `1.8` -> `1.9` + - [(#12863)](https://github.com/microsoft/vcpkg/pull/12863) [pmdk] Update to 1.9 + +- kangaru `4.2.2` -> `4.2.4` + - [(#12932)](https://github.com/microsoft/vcpkg/pull/12932) [kangaru] Update to v4.2.4 + +- intel-mkl `2018.0.1` -> `2020.0.0` + - [(#12978)](https://github.com/microsoft/vcpkg/pull/12978) [intel-mkl] Update to 2020.0.0 + +- fluidsynth `2.1.0` -> `2.1.4` + - [(#12974)](https://github.com/microsoft/vcpkg/pull/12974) [fluidsynth/redis-plus-plus] Update to the latest released version + +- redis-plus-plus `1.1.1` -> `1.1.2` + - [(#12974)](https://github.com/microsoft/vcpkg/pull/12974) [fluidsynth/redis-plus-plus] Update to the latest released version + +- openxr-loader `1.0.3.0` -> `1.0.11` + - [(#12060)](https://github.com/microsoft/vcpkg/pull/12060) [openxr-loader] Update to latest version, official repo + +- libmediainfo `20.03` -> `20.08` + - [(#12944)](https://github.com/microsoft/vcpkg/pull/12944) [libmediainfo] Update to 20.08 + +- wt `4.2.2` -> `4.4.0` + - [(#13005)](https://github.com/microsoft/vcpkg/pull/13005) [wt] Update to 4.4.0 + +- libjpeg-turbo `2.0.4` -> `2.0.5` + - [(#12973)](https://github.com/microsoft/vcpkg/pull/12973) [libjpeg-turbo] Update to 2.0.5 + +- berkeleydb `4.8.30-4` -> `4.8.30` + - [(#12870)](https://github.com/microsoft/vcpkg/pull/12870) [berkeleydb] Fix build error with Visual Studio 16.7.0 + +- libmodplug `0.8.9.0-5` -> `0.8.9.0` + - [(#12886)](https://github.com/microsoft/vcpkg/pull/12886) [many ports] Fix various problems with mingw + +- imgui-sfml `2.1-1` -> `2.1-2` + - [(#11800)](https://github.com/microsoft/vcpkg/pull/11800) [sfml][imgui-sfml] Push SFML_STATIC_LIBRARIES setting into `sfml` + +- re2 `2020-01-01` -> `2020-06-01` + - [(#13084)](https://github.com/microsoft/vcpkg/pull/13084) [grpc][upb][re2] grpc v1.31.1 + +- upb `2019-10-21-2` -> `2020-08-19` + - [(#13084)](https://github.com/microsoft/vcpkg/pull/13084) [grpc][upb][re2] grpc v1.31.1 + +- box2d `2019-12-31` -> `2.4.0` + - [(#13058)](https://github.com/microsoft/vcpkg/pull/13058) [Box2d] Update to 2.4.0 + +- cpp-taskflow `2.2.0-1` -> `2.5.0` + - [(#12923)](https://github.com/microsoft/vcpkg/pull/12923) [cpp-taskflow] Update to 2.5.0 + +- aubio `0.4.9-1` -> `0.4.9` + - [(#12921)](https://github.com/microsoft/vcpkg/pull/12921) [libsndfile] Update to 1.0.29 + +- libfreenect2 `0.2.0-4` -> `0.2.0` + - [(#13057)](https://github.com/microsoft/vcpkg/pull/13057) [libusb] Add vcpkg-cmake-wrapper + +
+ +-- vcpkg team vcpkg@microsoft.com THU, 27 Aug 02:20:00 -0800 + +vcpkg (2020.04.20 - 2020.06.15) +--- +#### Total port count: 1402 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1282| +|**x64-osx**|1109| +|**x64-linux**|1181| +|x64-windows-static|1187| +|x86-windows|1261| +|x64-uwp|693| +|arm64-windows|903| +|arm-uwp|656| + +#### The following documentation has been updated: +- [Testing](docs/tool-maintainers/testing.md) + - [(#11007)](https://github.com/microsoft/vcpkg/pull/11007) [vcpkg] Fix Catch2 include path in documentation (by @horenmar) +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) +- [Portfile helper functions](docs/maintainers/portfile-functions.md) + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @myd7349) +- [vcpkg_clean_executables_in_bin](docs/maintainers/vcpkg_clean_executables_in_bin.md)***[NEW]*** + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) +- [vcpkg_copy_tools](docs/maintainers/vcpkg_copy_tools.md)***[NEW]*** + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) +- [vcpkg_build_gn](docs/maintainers/vcpkg_build_gn.md)***[NEW]*** + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg_build_ninja](docs/maintainers/vcpkg_build_ninja.md)***[NEW]*** + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg_configure_gn](docs/maintainers/vcpkg_configure_gn.md)***[NEW]*** + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg_find_acquire_program](docs/maintainers/vcpkg_find_acquire_program.md) + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg_install_gn](docs/maintainers/vcpkg_install_gn.md)***[NEW]*** + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg and Android](docs/examples/vcpkg_android_example_cmake_script/cmake/vcpkg_android.cmake)***[NEW]*** + - [(#11264)](https://github.com/microsoft/vcpkg/pull/11264) Improve Android doc (triplets, usage with cmake and prefab) (by @pthom) +- [vcpkg telemetry and privacy](docs/about/privacy.md) + - [(#11542)](https://github.com/microsoft/vcpkg/pull/11542) [vcpkg metrics] Allow someone to opt out after build (by @strega-nil) +- [Manifests](docs/specifications/manifests.md)***[NEW]*** + - [(#11203)](https://github.com/microsoft/vcpkg/pull/11203) [vcpkg] RFC: Manifests (by @strega-nil) +- [CONTROL files](docs/maintainers/control-files.md) + - [(#11323)](https://github.com/microsoft/vcpkg/pull/11323) [vcpkg] add x86-wasm.cmake to community triplets (by @MoAlyousef) + - [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS (by @MoAlyousef) +- [Installing and Using Packagese Example: SQLite](docs/examples/installing-and-using-packages.md) + - [(#11763)](https://github.com/microsoft/vcpkg/pull/11763) docs: fix CMakeLists example for SQLite3 (by @disposedtrolley) + +#### The following changes have been made to the vcpkg tool and infrastructure: +- [(#10828)](https://github.com/microsoft/vcpkg/pull/10828) Onboard Windows PR tests to Azure Pipelines YAML and Scale Sets (by @BillyONeal) +- [(#10932)](https://github.com/microsoft/vcpkg/pull/10932) [vcpkg] Update git to 2.26.2 (by @Cheney-W) +- [(#10973)](https://github.com/microsoft/vcpkg/pull/10973) [vcpkg] Fix toolsrc CMake build error (by @NancyLi1013) +- [(#11009)](https://github.com/microsoft/vcpkg/pull/11009) Fix slack link to current, correct, location. (by @grafikrobot) +- [(#9861)](https://github.com/microsoft/vcpkg/pull/9861) [scripts] add new function vcpkg_fixup_pkgconfig (by @Neumann-A) +- [(#11064)](https://github.com/microsoft/vcpkg/pull/11064) [vcpkg] Copy macos pipelines into azure-pipelines.yml (by @BillyONeal) +- [(#10476)](https://github.com/microsoft/vcpkg/pull/10476) [vcpkg] Add support for VCPKG_BINARY_SOURCES and --x-binarysource=<> (by @ras0219-msft) +- [(#11068)](https://github.com/microsoft/vcpkg/pull/11068) [vcpkg] Small touchups for vcpkg unit tests (by @horenmar) +- [(#11085)](https://github.com/microsoft/vcpkg/pull/11085) [vcpkg] Correctly record default feature list in BinaryParagraphs. Fixes #10678. (by @ras0219-msft) +- [(#11090)](https://github.com/microsoft/vcpkg/pull/11090) [vcpkg] Bump macos build timeouts to 1 day (by @BillyONeal) +- [(#11091)](https://github.com/microsoft/vcpkg/pull/11091) [vcpkg baseline] Ignore mlpack on macOS (by @strega-nil) +- [(#11083)](https://github.com/microsoft/vcpkg/pull/11083) [vcpkg] Warn on unmatched removal with reasonable alternative (by @ras0219-msft) +- [(#11102)](https://github.com/microsoft/vcpkg/pull/11102) [vcpkg] fix undefined working dir in vcpkg_acquire_msys (by @Neumann-A) +- [(#11058)](https://github.com/microsoft/vcpkg/pull/11058) [msbuild]fix use UseEnv-True (by @Voskrese) +- [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot (by @BillyONeal) +- [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) +- [(#11166)](https://github.com/microsoft/vcpkg/pull/11166) [vcpkg] Add disk space report on Linux. (by @BillyONeal) +- [(#11170)](https://github.com/microsoft/vcpkg/pull/11170) [vcpkg] fix bug in Filesystem::absolute (by @strega-nil) +- [(#11175)](https://github.com/microsoft/vcpkg/pull/11175) [vcpkg] Point README.md to the correct status badge. (by @BillyONeal) +- [(#11171)](https://github.com/microsoft/vcpkg/pull/11171) [vcpkg] Add telemetry notice to `README.md`. (by @BillyONeal) +- [(#11189)](https://github.com/microsoft/vcpkg/pull/11189) [vcpkg] Add tombstone deletion scripts. (by @BillyONeal) +- [(#11105)](https://github.com/microsoft/vcpkg/pull/11105) [vcpkg/scripts] Fix ninja search path on windows and find binaries within vcpkg first (by @Neumann-A) +- [(#11202)](https://github.com/microsoft/vcpkg/pull/11202) [vcpkg] always pass VSCMD_SKIP_SENDTELEMETRY=1 (by @strega-nil) +- [(#8588)](https://github.com/microsoft/vcpkg/pull/8588) [vcpkg] Add x86 support for Linux toolchain (by @zhbanito) +- [(#11213)](https://github.com/microsoft/vcpkg/pull/11213) [vcpkg] Restrict telemetry uploads to TLS 1.2 (by @BillyONeal) +- [(#11234)](https://github.com/microsoft/vcpkg/pull/11234) [vcpkg] Don't build the metrics uploader when metrics are disabled. (by @BillyONeal) +- [(#11233)](https://github.com/microsoft/vcpkg/pull/11233) [vcpkg] Resolve relative overlay ports to the current working directory. (by @ras0219-msft) +- [(#10760)](https://github.com/microsoft/vcpkg/pull/10760) [vcpkg] Adding support for finding VS2019 by environment variable (by @Honeybunch) +- [(#11174)](https://github.com/microsoft/vcpkg/pull/11174) [vcpkg] [llvm] Bump Linux VM memory size and do all operations on the temporary disk. (by @BillyONeal) +- [(#11266)](https://github.com/microsoft/vcpkg/pull/11266) [vcpkg][android] Link C++ runtime according to VCPKG_CRT_LINKAGE (by @huangqinjin) +- [(#11260)](https://github.com/microsoft/vcpkg/pull/11260) [vcpkg] Update pull request template (by @PhoebeHui) +- [(#11302)](https://github.com/microsoft/vcpkg/pull/11302) [vcpkg] Resolve --overlay-ports is only working for relative parths since fix… (by @TobiasFunk) +- [(#11205)](https://github.com/microsoft/vcpkg/pull/11205) [vcpkg] Hopefully fix build on macOS 10.13/10.14 (by @strega-nil) +- [(#11093)](https://github.com/microsoft/vcpkg/pull/11093) [vcpkg] Fix nuget package import failed. (by @shihaonan369) +- [(#11239)](https://github.com/microsoft/vcpkg/pull/11239) [vcpkg] Turn on tests in CI. (by @BillyONeal) +- [(#11339)](https://github.com/microsoft/vcpkg/pull/11339) [vcpkg] Avoid naming Policheck sensitive term 'Virgin Islands' (by @BillyONeal) +- [(#11368)](https://github.com/microsoft/vcpkg/pull/11368) [vcpkg] Do not build the metrics uploader with MSBuild when metrics are disabled (by @rickertm) +- [(#11315)](https://github.com/microsoft/vcpkg/pull/11315) [vcpkg] Harden expand environment strings path with explicit integer overflow checks and resistance to CP_ACP. (by @BillyONeal) +- [(#11450)](https://github.com/microsoft/vcpkg/pull/11450) [vcpkg CI] Clean git directory before clone (by @strega-nil) +- [(#11432)](https://github.com/microsoft/vcpkg/pull/11432) [vcpkg] Harden file removals and clean directory contents in "CI" inside vcpkg itself. (by @BillyONeal) +- [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 (by @JackBoosY) +- [(#11433)](https://github.com/microsoft/vcpkg/pull/11433) [vcpkg] Optimize string split slightly. (by @BillyONeal) +- [(#11299)](https://github.com/microsoft/vcpkg/pull/11299) [vcpkg] pass -disableMetrics to bootstrap on git bash (by @strega-nil) +- [(#11453)](https://github.com/microsoft/vcpkg/pull/11453) Fix CMake PATH that fails Windows tests. (by @BillyONeal) +- [(#11343)](https://github.com/microsoft/vcpkg/pull/11343) [vcpkg] fix extern C around ctermid (by @strega-nil) +- [(#11380)](https://github.com/microsoft/vcpkg/pull/11380) [tool-meson] Update to 0.54.2 (by @c72578) +- [(#11057)](https://github.com/microsoft/vcpkg/pull/11057) [Vcpkg] Fix macOS applocal.py dependency bundling error (by @kevinhartman) +- [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds (by @Neumann-A) +- [(#11431)](https://github.com/microsoft/vcpkg/pull/11431) [vcpkg] Add static triplet for arm64-windows (by @orudge) +- [(#11466)](https://github.com/microsoft/vcpkg/pull/11466) [vcpkg] Fix cmake architecture detection on windows with ninja generator (by @Chronial) +- [(#11512)](https://github.com/microsoft/vcpkg/pull/11512) [vcpkg] Remove powershell from the 'run vcpkg ci' path to reduce hangs from msys components. (by @BillyONeal) +- [(#11443)](https://github.com/microsoft/vcpkg/pull/11443) [vcpkg-acquire-msys] Update pacman before any other package. (by @emptyVoid) +- [(#11496)](https://github.com/microsoft/vcpkg/pull/11496) [Baseline] Fix boost-*:arm-uwp failure and resolve conflicts in CI (by @PhoebeHui) +- [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports (by @JackBoosY) +- [(#11545)](https://github.com/microsoft/vcpkg/pull/11545) [vcpkg] Move CI cleaning back out of the 'ci' command into a separate command to restore cross-compilation preinstalls. (by @BillyONeal) +- [(#11612)](https://github.com/microsoft/vcpkg/pull/11612) [vcpkg baseline] Fix baseline failures (by @PhoebeHui) +- [(#11542)](https://github.com/microsoft/vcpkg/pull/11542) [vcpkg metrics] Allow someone to opt out after build (by @strega-nil) +- [(#11653)](https://github.com/microsoft/vcpkg/pull/11653) [vcpkg] Rename the msbuild property VcpkgRoot (by @BillyONeal) +- [(#11629)](https://github.com/microsoft/vcpkg/pull/11629) [vcpkg] Use a crypto RNG to generate admin passwords (by @BillyONeal) +- [(#11697)](https://github.com/microsoft/vcpkg/pull/11697) [vcpkg baseline] fix libb2:x64-osx (by @strega-nil) +- [(#11668)](https://github.com/microsoft/vcpkg/pull/11668) [CI|python3] add setuptools (by @Neumann-A) +- [(#11613)](https://github.com/microsoft/vcpkg/pull/11613) [vcpkg-baseline][unixodbc/nanodbc] Fix unixodbc build failure and set it as a dependency on nanodbc (by @JackBoosY) +- [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline (by @PhoebeHui) +- [(#11323)](https://github.com/microsoft/vcpkg/pull/11323) [vcpkg] add x86-wasm.cmake to community triplets (by @MoAlyousef) +- [(#11647)](https://github.com/microsoft/vcpkg/pull/11647) [vcpkg baseline][libfabric] Only support dynamic build (by @JackBoosY) +- [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links (by @BillyONeal) +- [(#11764)](https://github.com/microsoft/vcpkg/pull/11764) [vcpkg] Add directories to x-ci-clean lost in merge conflict resolution. (by @BillyONeal) +- [(#11742)](https://github.com/microsoft/vcpkg/pull/11742) [vcpkg-baseline][manyport] Fix baseline error (by @JackBoosY) +- [(#11779)](https://github.com/microsoft/vcpkg/pull/11779) [vcpkg] Provide $(VcpkgRoot) and $(VcpkgCurrentInstalledDir) for customers. (by @BillyONeal) +- [(#11750)](https://github.com/microsoft/vcpkg/pull/11750) [vcpkg README] Add #include channel (by @strega-nil) +- [(#11693)](https://github.com/microsoft/vcpkg/pull/11693) [CI|gfortran] Install gfortran for OSX and Linux CI (by @Neumann-A) +- [(#11839)](https://github.com/microsoft/vcpkg/pull/11839) [vcpkg] Fix OSX CI by ensuring the downloads directory exists (by @BillyONeal +- [(#11810)](https://github.com/microsoft/vcpkg/pull/11810) [vcpkg-acquire-msys] Improvement (by @emptyVoid) +- [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS (by @BillyONeal) +- [(#11146)](https://github.com/microsoft/vcpkg/pull/11146) [vcpkg] Add nologo to windows toolchain (by @Neumann-A) +- [(#11891)](https://github.com/microsoft/vcpkg/pull/11891) [vcpkg] Fix bootstrap on VS2015 (by @BillyONeal) +- [(#11858)](https://github.com/microsoft/vcpkg/pull/11858) [vcpkg] Merge unit test pass into x86-windows. (by @BillyONeal) +- [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error (by @JackBoosY) +- [(#4361)](https://github.com/microsoft/vcpkg/pull/4361) Adds vcpkg item to project settings in Visual Studio (by @Neumann-A) +- [(#11958)](https://github.com/microsoft/vcpkg/pull/11958) Delete g_binary_caching global that should be passed as a parameter. (by @BillyONeal) + +
+The following 79 ports have been added: + +|port|version| +|---|---| +|[ryml](https://github.com/microsoft/vcpkg/pull/10793)| 2020-04-12 +|[qt5-androidextras](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-canvas3d](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-doc](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-serialbus](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-translations](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-wayland](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-webengine](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) [#11120](https://github.com/microsoft/vcpkg/pull/11120) [#11653](https://github.com/microsoft/vcpkg/pull/11653) | 5.12.8 +|[qt5-webglplugin](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-x11extras](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[iniparser](https://github.com/microsoft/vcpkg/pull/10710)| 2020-04-06 +|[quill](https://github.com/microsoft/vcpkg/pull/10902)[#11326](https://github.com/microsoft/vcpkg/pull/11326) | 1.3.1 +|[frozen](https://github.com/microsoft/vcpkg/pull/10766)| 1.0.0 +|[cppcoro](https://github.com/microsoft/vcpkg/pull/10693)| 2020-2-28-1 +|[libtomcrypt](https://github.com/microsoft/vcpkg/pull/10960)| 1.18.2-1 +|[libtommath](https://github.com/microsoft/vcpkg/pull/10960)| 1.2.0-1 +|[pe-parse](https://github.com/microsoft/vcpkg/pull/11012)| 1.2.0 +|[opencc](https://github.com/microsoft/vcpkg/pull/8474)[#10767](https://github.com/microsoft/vcpkg/pull/10767) [#11559](https://github.com/microsoft/vcpkg/pull/11559) [#11612](https://github.com/microsoft/vcpkg/pull/11612) | 2020-04-26-4 +|[uchardet](https://github.com/microsoft/vcpkg/pull/8477)| 2020-04-26 +|[libqcow](https://github.com/microsoft/vcpkg/pull/11036)[#11238](https://github.com/microsoft/vcpkg/pull/11238) | 20191221-1 +|[mstch](https://github.com/microsoft/vcpkg/pull/11020)| 1.0.2-2 +|[nowide](https://github.com/microsoft/vcpkg/pull/11066)[#11732](https://github.com/microsoft/vcpkg/pull/11732) [#11859](https://github.com/microsoft/vcpkg/pull/11859) | alias +|[discord-game-sdk](https://github.com/microsoft/vcpkg/pull/10763)[#11728](https://github.com/microsoft/vcpkg/pull/11728) | 2.5.6-1 +|[libmpeg2](https://github.com/microsoft/vcpkg/pull/8871)| 0.5.1 +|[opencv2](https://github.com/microsoft/vcpkg/pull/7849)[#11201](https://github.com/microsoft/vcpkg/pull/11201) | 2.4.13.7-1 +|[rtlsdr](https://github.com/microsoft/vcpkg/pull/10901)[#11575](https://github.com/microsoft/vcpkg/pull/11575) | 2020-04-16-1 +|[gasol](https://github.com/microsoft/vcpkg/pull/9550)| 2018-01-04 +|[coin](https://github.com/microsoft/vcpkg/pull/9880)| 4.0.0 +|[simage](https://github.com/microsoft/vcpkg/pull/9880)| 1.8.0 +|[soqt](https://github.com/microsoft/vcpkg/pull/9880)| 1.6.0 +|[gmp](https://github.com/microsoft/vcpkg/pull/10613)[#11565](https://github.com/microsoft/vcpkg/pull/11565) | 6.2.0-1 +|[nettle](https://github.com/microsoft/vcpkg/pull/10613)[#11565](https://github.com/microsoft/vcpkg/pull/11565) | 3.5.1-1 +|[vs-yasm](https://github.com/microsoft/vcpkg/pull/10613)| 0.5.0 +|[uthenticode](https://github.com/microsoft/vcpkg/pull/11199)[#11256](https://github.com/microsoft/vcpkg/pull/11256) [#11362](https://github.com/microsoft/vcpkg/pull/11362) | 1.0.4 +|[bitserializer-pugixml](https://github.com/microsoft/vcpkg/pull/11241)[#11683](https://github.com/microsoft/vcpkg/pull/11683) | alias +|[ignition-math6](https://github.com/microsoft/vcpkg/pull/11232)| 6.4.0 +|[vtk-m](https://github.com/microsoft/vcpkg/pull/11148)| 1.5.0 +|[crashpad](https://github.com/microsoft/vcpkg/pull/10505)| 2020-03-18 +|[bitserializer-rapidyaml](https://github.com/microsoft/vcpkg/pull/11242)[#11683](https://github.com/microsoft/vcpkg/pull/11683) | alias +|[ignition-msgs5](https://github.com/microsoft/vcpkg/pull/11272)[#11397](https://github.com/microsoft/vcpkg/pull/11397) | 5.1.0 +|[ignition-transport8](https://github.com/microsoft/vcpkg/pull/11272)| 8.0.0 +|[sdformat9](https://github.com/microsoft/vcpkg/pull/11265)[#11742](https://github.com/microsoft/vcpkg/pull/11742) | 9.2.0-1 +|[kissfft](https://github.com/microsoft/vcpkg/pull/9237)| 2020-03-30 +|[jaeger-client-cpp](https://github.com/microsoft/vcpkg/pull/9126)[#11583](https://github.com/microsoft/vcpkg/pull/11583) | 0.5.1-1 +|[libmediainfo](https://github.com/microsoft/vcpkg/pull/7005)| 20.03 +|[h5py-lzf](https://github.com/microsoft/vcpkg/pull/10871)| 2019-12-04 +|[microsoft-signalr](https://github.com/microsoft/vcpkg/pull/10833)[#11496](https://github.com/microsoft/vcpkg/pull/11496) | 0.1.0-alpha1-1 +|[oatpp-consul](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-curl](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-libressl](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-mbedtls](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-swagger](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-websocket](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[gperftools](https://github.com/microsoft/vcpkg/pull/8750)| 2019-09-02 +|[libvmdk](https://github.com/microsoft/vcpkg/pull/11010)| 2019-12-21 +|[ctp](https://github.com/microsoft/vcpkg/pull/10717)| 6.3.15_20190220_se +|[munit](https://github.com/microsoft/vcpkg/pull/6780)| 2019-04-06 +|[mmloader](https://github.com/microsoft/vcpkg/pull/11381)| 2020-05-15 +|[absent](https://github.com/microsoft/vcpkg/pull/11447)| 0.3.0 +|[ocilib](https://github.com/microsoft/vcpkg/pull/11549)[#11646](https://github.com/microsoft/vcpkg/pull/11646) | 4.6.4-1 +|[tinyply](https://github.com/microsoft/vcpkg/pull/11534)| 2020-05-22 +|[symengine](https://github.com/microsoft/vcpkg/pull/8752)| 2020-05-25 +|[nanoprintf](https://github.com/microsoft/vcpkg/pull/11605)| 2020-05-27 +|[wavelib](https://github.com/microsoft/vcpkg/pull/11611)| 2020-05-29 +|[refl-cpp](https://github.com/microsoft/vcpkg/pull/11622)| 0.9.1 +|[trantor](https://github.com/microsoft/vcpkg/pull/11533)| v1.0.0-rc13 +|[sockpp](https://github.com/microsoft/vcpkg/pull/11562)| 0.7 +|[protozero](https://github.com/microsoft/vcpkg/pull/11652)| 1.6.8 +|[p-ranav-csv2](https://github.com/microsoft/vcpkg/pull/11725)| 2020-06-02 +|[cr](https://github.com/microsoft/vcpkg/pull/11841)| 2020-04-26 +|[json-schema-validator](https://github.com/microsoft/vcpkg/pull/11599)| 2.1.0 +|[log4cxx](https://github.com/microsoft/vcpkg/pull/11659)| 0.10.0-2 +|[xbyak](https://github.com/microsoft/vcpkg/pull/11689)| 5.911 +|[licensepp](https://github.com/microsoft/vcpkg/pull/11711)| 2020-05-19 +|[v-hacd](https://github.com/microsoft/vcpkg/pull/11606)| 3.2.0 +|[libosmium](https://github.com/microsoft/vcpkg/pull/11863)| 2.15.5 +|[gzip-hpp](https://github.com/microsoft/vcpkg/pull/11735)| 0.1.0 +|[infoware](https://github.com/microsoft/vcpkg/pull/11410)| 0.5.3 +
+ +
+The following 375 ports have been updated: + +- otl `4.0.451` -> `4.0.455` + - [(#10922)](https://github.com/microsoft/vcpkg/pull/10922) [vcpkg baseline] Update hash for otl + - [(#11300)](https://github.com/microsoft/vcpkg/pull/11300) [otl] Update to 4.0.455 + +- vtk `8.2.0-12` -> `9.0-2` + - [(#10925)](https://github.com/microsoft/vcpkg/pull/10925) [VTK] Check if VTKTarget files exist + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + - [(#11643)](https://github.com/microsoft/vcpkg/pull/11643) [vtk] Fix single configuration builds + - [(#11708)](https://github.com/microsoft/vcpkg/pull/11708) [python3] Update to Python 3.8 + +- winreg `1.2.1-1` -> `3.1.0` + - [(#10926)](https://github.com/microsoft/vcpkg/pull/10926) [winreg] Update to 2.2.0 + - [(#10976)](https://github.com/microsoft/vcpkg/pull/10976) [WinReg] update to v2.2.2 + - [(#11034)](https://github.com/microsoft/vcpkg/pull/11034) [winreg] Update to 2.2.3 + - [(#11766)](https://github.com/microsoft/vcpkg/pull/11766) [winreg] Update to 2.4.0 + - [(#11883)](https://github.com/microsoft/vcpkg/pull/11883) [WinReg] Update to 3.0.1 + - [(#11888)](https://github.com/microsoft/vcpkg/pull/11888) [WinReg] Update to 3.1.0 + +- libyaml `0.2.2-2` -> `0.2.2-3` + - [(#10908)](https://github.com/microsoft/vcpkg/pull/10908) [libyaml] Fix linkage in non-Windows systems + +- libzippp `2019-07-22` -> `3.1-1.6.1` + - [(#10893)](https://github.com/microsoft/vcpkg/pull/10893) [libzippp] Update to libzippp-v3.1-1.6.1 + +- blend2d `beta_2020-04-15` -> `beta_2020-06-01` + - [(#10891)](https://github.com/microsoft/vcpkg/pull/10891) [blend2d] Update to beta_2020-04-19 + - [(#11155)](https://github.com/microsoft/vcpkg/pull/11155) [blend2d] Update to beta_2020-05-04 + - [(#11778)](https://github.com/microsoft/vcpkg/pull/11778) [blend2d] Update to beta_2020-06-01 + +- pegtl `3.0.0-pre-9d58962` -> `3.0.0-pre-83b6cdc` + - [(#10870)](https://github.com/microsoft/vcpkg/pull/10870) [pegtl] Update to latest commit from 4/5/2020 + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + - [(#11531)](https://github.com/microsoft/vcpkg/pull/11531) [pegtl/cppgraphqlgen] matching updates for dependency + +- skyr-url `1.5.1` -> `1.9.0` + - [(#10868)](https://github.com/microsoft/vcpkg/pull/10868) [skyr-url] Bump version to 1.7.0 + - [(#10954)](https://github.com/microsoft/vcpkg/pull/10954) [skyr-url] Updated port to use version 1.7.3 + - [(#11153)](https://github.com/microsoft/vcpkg/pull/11153) [skyr-url] Changed skyr-url version number to 1.7.5 + - [(#11568)](https://github.com/microsoft/vcpkg/pull/11568) [skyr-url] Changed version number to 1.9.0 + - [(#11774)](https://github.com/microsoft/vcpkg/pull/11774) [skyr-url] Changed version number for skyr-url + +- protobuf `3.11.3` -> `3.12.0-2` + - [(#10863)](https://github.com/microsoft/vcpkg/pull/10863) [protobuf] Update to 3.11.4 + - [(#11228)](https://github.com/microsoft/vcpkg/pull/11228) [protobuf] Correct protobuf under android (Fix issue #8218) + - [(#11397)](https://github.com/microsoft/vcpkg/pull/11397) [protobuf] protobuf v3.12.0 + - [(#11504)](https://github.com/microsoft/vcpkg/pull/11504) [protobuf] Fix RPATH error for static build + - [(#11516)](https://github.com/microsoft/vcpkg/pull/11516) [protobuf] Don't redefine PROTOBUF_USE_DLLS + +- sdformat6 `6.2.0` -> `6.2.0-1` + - [(#10859)](https://github.com/microsoft/vcpkg/pull/10859) [sdformat6] Migrate from Bitbucket to GitHub 🤖 + +- ompl `1.4.2-2` -> `1.4.2-4` + - [(#10854)](https://github.com/microsoft/vcpkg/pull/10854) [ompl] Fix ompl[app] build error + - [(#10972)](https://github.com/microsoft/vcpkg/pull/10972) [ompl] Fix patch apply error + +- dlib `19.17-1` -> `19.19-1` + - [(#10826)](https://github.com/microsoft/vcpkg/pull/10826) [dlib] Updated dlib to v19.19 + - [(#11195)](https://github.com/microsoft/vcpkg/pull/11195) [dlib] add more granularity in features + +- arrow `0.17.0` -> `0.17.1` + - [(#10800)](https://github.com/microsoft/vcpkg/pull/10800) [Arrow] Explicitly enable CSV and JSON + - [(#11016)](https://github.com/microsoft/vcpkg/pull/11016) [Arrow] Add filesystem feature + - [(#11472)](https://github.com/microsoft/vcpkg/pull/11472) [Arrow] Update to 0.17.1 + +- ace `6.5.8` -> `6.5.9-5` + - [(#10984)](https://github.com/microsoft/vcpkg/pull/10984) [ace] Add support for MacOSX + - [(#11112)](https://github.com/microsoft/vcpkg/pull/11112) [ace] Update to 6.5.9 + - [(#11369)](https://github.com/microsoft/vcpkg/pull/11369) [ace] Add patch to fix Visual Studio 2019 16.5 internal compiler error + - [(#11441)](https://github.com/microsoft/vcpkg/pull/11441) [ace] Add support for uwp + - [(#11464)](https://github.com/microsoft/vcpkg/pull/11464) [ace] Simplified port file + - [(#11713)](https://github.com/microsoft/vcpkg/pull/11713) [ace] Fix missing cpp files + - [(#11473)](https://github.com/microsoft/vcpkg/pull/11473) [ace] tao as feature + +- libaaplus `2.12` -> `2.12-1` + - [(#10981)](https://github.com/microsoft/vcpkg/pull/10981) [libaaplus] Use versioned download link + +- spscqueue `2019-07-26` -> `1.0` + - [(#10874)](https://github.com/microsoft/vcpkg/pull/10874) [spscqueue] Update to version 1.0 + +- googleapis `0.8.0` -> `alias` + - [(#10994)](https://github.com/microsoft/vcpkg/pull/10994) [googleapis] update to v0.9.0 + - [(#11698)](https://github.com/microsoft/vcpkg/pull/11698) [google-cloud-cpp] Consolidate all google-cloud* packages + +- ms-gsl `3.0.0` -> `3.0.1` + - [(#10993)](https://github.com/microsoft/vcpkg/pull/10993) [ms-gsl] Update to 3.0.1 + +- ryu `2.0-1` -> `2.0-2` + - [(#10989)](https://github.com/microsoft/vcpkg/pull/10989) [ryu]Ryu include fix + +- glm `0.9.9.7` -> `0.9.9.8` + - [(#10977)](https://github.com/microsoft/vcpkg/pull/10977) [glm, sqlitecpp] update to new version + +- sqlitecpp `2.3.0-1` -> `3.0.0` + - [(#10977)](https://github.com/microsoft/vcpkg/pull/10977) [glm, sqlitecpp] update to new version + +- nngpp `1.2.4` -> `1.3.0` + - [(#10975)](https://github.com/microsoft/vcpkg/pull/10975) [nngpp] Update to 1.3.0 + +- libvpx `1.8.1-1` -> `1.8.1-5` + - [(#10952)](https://github.com/microsoft/vcpkg/pull/10952) [libvpx][mpg123] Fix use of YASM in MSBuild (via path) + - [(#11058)](https://github.com/microsoft/vcpkg/pull/11058) [msbuild]fix use UseEnv-True + - [(#11022)](https://github.com/microsoft/vcpkg/pull/11022) [libvpx] Added support for build on MacOS and Linux + - [(#11500)](https://github.com/microsoft/vcpkg/pull/11500) [libvpx] Change default target on Unix + - [(#11795)](https://github.com/microsoft/vcpkg/pull/11795) [libvpx] Add cmake config file + +- mpg123 `1.25.8-6` -> `1.25.8-9` + - [(#10952)](https://github.com/microsoft/vcpkg/pull/10952) [libvpx][mpg123] Fix use of YASM in MSBuild (via path) + - [(#11058)](https://github.com/microsoft/vcpkg/pull/11058) [msbuild]fix use UseEnv-True + - [(#11287)](https://github.com/microsoft/vcpkg/pull/11287) [mpg123] Enable UWP support + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- qt5-3d `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-activeqt `5.12.5-1` -> `5.12.8-1` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + - [(#11045)](https://github.com/microsoft/vcpkg/pull/11045) [qt5] reactivate qt5-activeqt for CI coverage + +- qt5-base `5.12.5-13` -> `5.12.8-4` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + - [(#11111)](https://github.com/microsoft/vcpkg/pull/11111) [qt5] Add -j to make to parallelize on Linux and MacOS + - [(#11371)](https://github.com/microsoft/vcpkg/pull/11371) [qt5-base] Add Xorg dependency libx11-xcb-dev + - [(#11416)](https://github.com/microsoft/vcpkg/pull/11416) [harfbuzz,skia] Update and replace Skia dependencies with vcpkg + - [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links + +- qt5-charts `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-connectivity `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-datavis3d `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-declarative `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-gamepad `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-graphicaleffects `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-imageformats `5.12.5-3` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-location `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-macextras `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-mqtt `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-multimedia `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-networkauth `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-purchasing `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-quickcontrols `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-quickcontrols2 `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-remoteobjects `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-script `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-scxml `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-sensors `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-serialport `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-speech `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-svg `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-tools `5.12.5-5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-virtualkeyboard `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-webchannel `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-websockets `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-webview `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-winextras `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-xmlpatterns `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5 `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- libzip `rel-1-5-2--1` -> `rel-1-6-1` + - [(#10784)](https://github.com/microsoft/vcpkg/pull/10784) [libzip] update to rel-1-6-1 + +- nng `1.2.5` -> `1.3.0` + - [(#10974)](https://github.com/microsoft/vcpkg/pull/10974) [nng] Update to 1.3.0 + +- libmupdf `1.16.1` -> `1.16.1-1` + - [(#10708)](https://github.com/microsoft/vcpkg/pull/10708) [libmupdf] fix build error on Linux + +- catch2 `2.11.3` -> `2.12.1` + - [(#10996)](https://github.com/microsoft/vcpkg/pull/10996) [catch2] Update to 2.12.1 + +- websocketpp `0.8.1-1` -> `0.8.2` + - [(#10969)](https://github.com/microsoft/vcpkg/pull/10969) [websocketpp] Update to 0.8.2 + +- coroutine `2020-01-13` -> `1.5.0` + - [(#10692)](https://github.com/microsoft/vcpkg/pull/10692) [coroutine] update to 1.5.0 + +- boost-modular-build-helper `1.72.0-1` -> `1.73.0-1` + - [(#10285)](https://github.com/microsoft/vcpkg/pull/10285) [boost-modular-build-helper] Support Clang '--target=' syntax to enable Android builds + - [(#10814)](https://github.com/microsoft/vcpkg/pull/10814) [boost-modular-build] Fix lack of arm64-linux support + - [(#11427)](https://github.com/microsoft/vcpkg/pull/11427) [boost] MinGW build fixes + +- openssl-unix `1.1.1d-2` -> `1.1.1d-4` + - [(#10450)](https://github.com/microsoft/vcpkg/pull/10450) [openssl-unix] Update header path for shared library compilation + - [(#11344)](https://github.com/microsoft/vcpkg/pull/11344) [openssl-unix] Fix openssl-unix android build + +- sdl2-gfx `1.0.4-5` -> `1.0.4-6` + - [(#10575)](https://github.com/microsoft/vcpkg/pull/10575) [sdl2-gfx] Fix build error on non windows + +- hwloc `1.11.7-3` -> `1.11.7-4` + - [(#10615)](https://github.com/microsoft/vcpkg/pull/10615) [hwloc] Support UNIX + +- pixel `0.3` -> `0.3-1` + - [(#10638)](https://github.com/microsoft/vcpkg/pull/10638) [pixel] Add warning message on Linux + +- qt-advanced-docking-system `2019-08-14-1` -> `3.2.5-1` + - [(#10170)](https://github.com/microsoft/vcpkg/pull/10170) [qt-advanced-docking-system] updated qt-advanced-docking-system to 3.2.1 + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + +- libarchive `3.4.1-1` -> `3.4.1-3` + - [(#11044)](https://github.com/microsoft/vcpkg/pull/11044) [libarchive] expose zstd as a build feature + - [(#11570)](https://github.com/microsoft/vcpkg/pull/11570) [libarchive] Disable C4061 which causes build to fail in Visual Studio 2019 16.6 + +- azure-kinect-sensor-sdk `1.4.0-alpha.0-2` -> `1.4.0-alpha.0-5` + - [(#11033)](https://github.com/microsoft/vcpkg/pull/11033) [azure-kinect-sensor-sdk] Fix pipeline error + - [(#10253)](https://github.com/microsoft/vcpkg/pull/10253) [imgui] Add feature bindings and remove feature example + - [(#11116)](https://github.com/microsoft/vcpkg/pull/11116) [azure-kinect-sensor-sdk] Disable parallel configure due to source directory writes + - [(#11139)](https://github.com/microsoft/vcpkg/pull/11139) [azure-kinect-sensor-sdk] Fix Deploy Azure Kinect Sensor SDK on Windows + +- range-v3 `0.10.0` -> `0.10.0-20200425` + - [(#11031)](https://github.com/microsoft/vcpkg/pull/11031) [range-v3] Update to new version. + +- ode `0.16` -> `0.16.1` + - [(#11029)](https://github.com/microsoft/vcpkg/pull/11029) [ode] Bump version to 0.16.1 + +- boost-coroutine `1.72.0` -> `1.73.0` + - [(#10988)](https://github.com/microsoft/vcpkg/pull/10988) [boost-coroutine] Add patch from boost.org + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- libtorrent `1.2.2-1` -> `1.2.7` + - [(#10686)](https://github.com/microsoft/vcpkg/pull/10686) [libtorrent] Update to 1.2.6 and add features + - [(#11257)](https://github.com/microsoft/vcpkg/pull/11257) [libtorrent] add iconv feature on windows and clean up portfile + - [(#11389)](https://github.com/microsoft/vcpkg/pull/11389) [libtorrent] minor portfile simplification and version bump + - [(#11709)](https://github.com/microsoft/vcpkg/pull/11709) [libtorrent] Update to 1.2.7 + +- geos `3.6.3-3` -> `3.6.4` + - [(#10377)](https://github.com/microsoft/vcpkg/pull/10377) [geos] Upgrade to GEOS 3.6.4 + +- egl-registry `2020-02-03` -> `2020-02-20` + - [(#10676)](https://github.com/microsoft/vcpkg/pull/10676) [egl-registry, opengl-registry] Update egl-registry to 2020-02-20 and opengl-registry to 2020-03-25 + +- opengl-registry `2020-02-03` -> `2020-03-25` + - [(#10676)](https://github.com/microsoft/vcpkg/pull/10676) [egl-registry, opengl-registry] Update egl-registry to 2020-02-20 and opengl-registry to 2020-03-25 + +- murmurhash `2016-01-09` -> `2016-01-09-3` + - [(#11011)](https://github.com/microsoft/vcpkg/pull/11011) [murmurhash] installation fix + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- gts `0.7.6-1` -> `0.7.6-3` + - [(#10055)](https://github.com/microsoft/vcpkg/pull/10055) [gts] Support for build with cmake in unix + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11884)](https://github.com/microsoft/vcpkg/pull/11884) [glib/gts] Add pkgconfig files + +- icu `65.1-3` -> `67.1` + - [(#10656)](https://github.com/microsoft/vcpkg/pull/10656) [icu] Fix configure failure due to not finding python + - [(#11714)](https://github.com/microsoft/vcpkg/pull/11714) [icu] Update to 67.1 + +- ffmpeg `4.2-7` -> `4.2-9` + - [(#8797)](https://github.com/microsoft/vcpkg/pull/8797) [ffmpeg] Fix ffmpeg[opencl, openssl, lzma] static build failed + - [(#11443)](https://github.com/microsoft/vcpkg/pull/11443) [vcpkg-acquire-msys] Update pacman before any other package. + - [(#11810)](https://github.com/microsoft/vcpkg/pull/11810) [vcpkg-acquire-msys] Improvement + +- liblzma `5.2.4-4` -> `5.2.4-5` + - [(#8797)](https://github.com/microsoft/vcpkg/pull/8797) [ffmpeg] Fix ffmpeg[opencl, openssl, lzma] static build failed + +- cpprestsdk `2.10.15-1` -> `2.10.16-2` + - [(#11018)](https://github.com/microsoft/vcpkg/pull/11018) [cpprestsdk] Update to v2.10.16 + - [(#11694)](https://github.com/microsoft/vcpkg/pull/11694) [cpprestsdk] Avoid using pkg-config to find OpenSSL libraries on Linux + - [(#11867)](https://github.com/microsoft/vcpkg/pull/11867) [cpprestsdk] Fix find dependency openssl + +- harfbuzz `2.5.3` -> `2.6.6` + - [(#11082)](https://github.com/microsoft/vcpkg/pull/11082) [harfbuzz] Change build depends from freetype to freetype[core] + - [(#11416)](https://github.com/microsoft/vcpkg/pull/11416) [harfbuzz,skia] Update and replace Skia dependencies with vcpkg + +- pcl `1.9.1-11` -> `1.9.1-13` + - [(#11047)](https://github.com/microsoft/vcpkg/pull/11047) [pcl] Fix link to libpng + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + +- armadillo `2019-04-16-6` -> `2019-04-16-8` + - [(#11063)](https://github.com/microsoft/vcpkg/pull/11063) [armadillo] Add dependent port superlu on osx + +- abseil `2020-03-03-3` -> `2020-03-03-6` + - [(#11039)](https://github.com/microsoft/vcpkg/pull/11039) [abseil] Configure abseil to use std:: types when feature cxx17 is enabled + - [(#11630)](https://github.com/microsoft/vcpkg/pull/11630) [abseil] Fix arm build + - [(#11827)](https://github.com/microsoft/vcpkg/pull/11827) [abseil] Enable dynamic build on Windows + +- metrohash `1.1.3` -> `1.1.3-1` + - [(#10992)](https://github.com/microsoft/vcpkg/pull/10992) [metrohash] installation fix + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- nana `1.7.2-1` -> `1.7.2-3` + - [(#10936)](https://github.com/microsoft/vcpkg/pull/10936) [nana] Revert 1 darkcacok patch nana + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- alembic `1.7.12` -> `1.7.12-1` + - [(#10912)](https://github.com/microsoft/vcpkg/pull/10912) [alembic] linux fixes + +- civetweb `2019-07-05-1` -> `1.12` + - [(#10591)](https://github.com/microsoft/vcpkg/pull/10591) [civetweb] Update to version 1.12 + +- argh `2018-12-18-1` -> `2018-12-18-2` + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + +- ceres `1.14.0-6` -> `1.14.0-7` + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + - [(#11200)](https://github.com/microsoft/vcpkg/pull/11200) [ceres] Added patch to add find_dependency() for suitesparse targets downstream + +- idevicerestore `1.0.12-3` -> `1.0.12-4` + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + - [(#11074)](https://github.com/microsoft/vcpkg/pull/11074) [idevicerestore] Fix libgen.h cannot be found + +- openblas `0.3.7` -> `0.3.9-1` + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + +- imgui `1.74` -> `1.76-1` + - [(#10253)](https://github.com/microsoft/vcpkg/pull/10253) [imgui] Add feature bindings and remove feature example + - [(#11388)](https://github.com/microsoft/vcpkg/pull/11388) [imgui] Update to 1.76 + +- libigl `2.1.0-1` -> `2.1.0-2` + - [(#10253)](https://github.com/microsoft/vcpkg/pull/10253) [imgui] Add feature bindings and remove feature example + +- opencv4 `4.1.1-3` -> `4.1.1-6` + - [(#10886)](https://github.com/microsoft/vcpkg/pull/10886) [opencv4] Add GTK support for opencv4 portfile + - [(#7849)](https://github.com/microsoft/vcpkg/pull/7849) [OpenCV2] add new "old" port + - [(#11201)](https://github.com/microsoft/vcpkg/pull/11201) [opencv4] Changed dependency on qt5 to qt5-base, closes microsoft/vcpkg#11138 + - [(#11429)](https://github.com/microsoft/vcpkg/pull/11429) [opencv4] Fix linking halide + +- libbson `1.15.1-1` -> `1.16.1` + - [(#10010)](https://github.com/microsoft/vcpkg/pull/10010) [libbson/mongo-c-driver] Update to 1.16.1 + +- mongo-c-driver `1.15.1-1` -> `1.16.1-1` + - [(#10010)](https://github.com/microsoft/vcpkg/pull/10010) [libbson/mongo-c-driver] Update to 1.16.1 + - [(#11217)](https://github.com/microsoft/vcpkg/pull/11217) [mongo-c-driver] Fix find_package error + +- mongo-cxx-driver `3.4.0-4` -> `3.4.0-5` + - [(#10010)](https://github.com/microsoft/vcpkg/pull/10010) [libbson/mongo-c-driver] Update to 1.16.1 + - [(#11584)](https://github.com/microsoft/vcpkg/pull/11584) [mongo-cxx-driver] Patch std::atomic P0883 changes + +- cpuinfo `2019-07-28` -> `2019-07-28-1` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- czmq `2019-06-10-3` -> `2019-06-10-4` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- libsvm `323` -> `323-1` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- nanomsg `1.1.5-1` -> `1.1.5-2` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- uriparser `0.9.3-4` -> `0.9.3-5` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- zyre `2019-07-07` -> `2019-07-07-1` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- halide `release_2019_08_27-2` -> `master_2020_03_07` + - [(#10295)](https://github.com/microsoft/vcpkg/pull/10295) [llvm] Update to version 10.0.0 and add new features + +- llvm `8.0.0-5` -> `10.0.0-3` + - [(#10295)](https://github.com/microsoft/vcpkg/pull/10295) [llvm] Update to version 10.0.0 and add new features + - [(#11174)](https://github.com/microsoft/vcpkg/pull/11174) [vcpkg] [llvm] Bump Linux VM memory size and do all operations on the temporary disk. + - [(#11268)](https://github.com/microsoft/vcpkg/pull/11268) [llvm] add more backend options, fix issues + - [(#11703)](https://github.com/microsoft/vcpkg/pull/11703) [llvm] fix llvm-tblgen build with MSVC v19.26 + +- sciter `4.4.1.5` -> `4.4.3.20` + - [(#11161)](https://github.com/microsoft/vcpkg/pull/11161) [sciter] Update to 4.4.3.15.7771 + - [(#11393)](https://github.com/microsoft/vcpkg/pull/11393) [sciter] Update to 4.4.3.18.7817 + - [(#11723)](https://github.com/microsoft/vcpkg/pull/11723) [sciter] Update to 4.4.3.20.7852 + +- apr-util `1.6.0-5` -> `1.6.1-1` + - [(#8579)](https://github.com/microsoft/vcpkg/pull/8579) [apr apr-util] Apr and apr-util for non windows systems + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- apr `1.6.5-3` -> `1.7.0` + - [(#8579)](https://github.com/microsoft/vcpkg/pull/8579) [apr apr-util] Apr and apr-util for non windows systems + +- opencv3 `3.4.7-2` -> `3.4.7-3` + - [(#7849)](https://github.com/microsoft/vcpkg/pull/7849) [OpenCV2] add new "old" port + - [(#11201)](https://github.com/microsoft/vcpkg/pull/11201) [opencv4] Changed dependency on qt5 to qt5-base, closes microsoft/vcpkg#11138 + +- gtest `2019-10-09-1` -> `1.10.0` + - [(#10963)](https://github.com/microsoft/vcpkg/pull/10963) [gtest] Rollback to a release version. + +- ignition-cmake0 `0.6.2-1` -> `0.6.2-2` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + +- ignition-cmake2 `2.1.1` -> `2.2.0-1` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + - [(#11232)](https://github.com/microsoft/vcpkg/pull/11232) [ignition-math6] Add new port 🤖 + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- ignition-common1 `1.1.1` -> `1.1.1-1` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + +- ignition-fuel-tools1 `1.2.0` -> `1.2.0-2` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- ignition-math4 `4.0.0` -> `4.0.0-1` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + +- ignition-modularscripts `2020-02-10` -> `2020-05-09` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- ignition-msgs1 `1.0.0` -> `1.0.0-1` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + +- ignition-transport4 `4.0.0` -> `4.0.0-2` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- cuda `10.1` -> `10.1-1` + - [(#10838)](https://github.com/microsoft/vcpkg/pull/10838) [cuda] Fix find cuda in UNIX + +- libiconv `1.16-1` -> `1.16-3` + - [(#9832)](https://github.com/microsoft/vcpkg/pull/9832) libiconv - Fix ICONV_CONST + - [(#11586)](https://github.com/microsoft/vcpkg/pull/11586) [vcpkg-baseline][zxing-cpp] Fix build failure + +- glib `2.52.3-14-5` -> `2.52.3-14-7` + - [(#10856)](https://github.com/microsoft/vcpkg/pull/10856) [glib] Update the usage of string(TOUPPER ...) + - [(#11884)](https://github.com/microsoft/vcpkg/pull/11884) [glib/gts] Add pkgconfig files + +- freerdp `2.0.0-rc4-7` -> `2.0.0-1` + - [(#11051)](https://github.com/microsoft/vcpkg/pull/11051) [freerdp] Update to 2.0.0 + - [(#11639)](https://github.com/microsoft/vcpkg/pull/11639) [freerdp] Optional 'urbdrc' feature + +- wxwidgets `3.1.3` -> `3.1.3-1` + - [(#11178)](https://github.com/microsoft/vcpkg/pull/11178) [wxwidgets] Apply fix to wxWidgets for copy and paste macOS + +- libsquish `1.15-2` -> `1.15-3` + - [(#11124)](https://github.com/microsoft/vcpkg/pull/11124) [libsquish] add missing SQUISH_EXPORT + +- bitserializer-cpprestjson `0.8` -> `alias` + - [(#11157)](https://github.com/microsoft/vcpkg/pull/11157) [BitSerializer] Update to version 0.9 + - [(#11683)](https://github.com/microsoft/vcpkg/pull/11683) [bitserializer] Update to new version 0.10 + +- bitserializer-rapidjson `0.8` -> `alias` + - [(#11157)](https://github.com/microsoft/vcpkg/pull/11157) [BitSerializer] Update to version 0.9 + - [(#11683)](https://github.com/microsoft/vcpkg/pull/11683) [bitserializer] Update to new version 0.10 + +- bitserializer `0.8` -> `0.9` + - [(#11157)](https://github.com/microsoft/vcpkg/pull/11157) [BitSerializer] Update to version 0.9 + - [(#11683)](https://github.com/microsoft/vcpkg/pull/11683) [bitserializer] Update to new version 0.10 + +- gsoap `2.8.93-2` -> `2.8.93-3` + - [(#11048)](https://github.com/microsoft/vcpkg/pull/11048) [gsoap] Add supports for gsoap + - [(#11355)](https://github.com/microsoft/vcpkg/pull/11355) [gSoap] Update to 2.8.102 and re-enable x64 Builds + +- lua `5.3.5-3` -> `5.3.5-5` + - [(#11163)](https://github.com/microsoft/vcpkg/pull/11163) [lua] Compile as position-independent code + - [(#11870)](https://github.com/microsoft/vcpkg/pull/11870) [lua] Add vcpkg-cmake-wrapper + +- gainput `1.0.0-2` -> `1.0.0-3` + - [(#11000)](https://github.com/microsoft/vcpkg/pull/11000) [gainput] imporve cmake search gainput library + +- opencl `2.2-2` -> `2.2-2-1` + - [(#10567)](https://github.com/microsoft/vcpkg/pull/10567) [opencl] Add build type when installing targets + +- azure-iot-sdk-c `2020-02-04.1` -> `2020-02-04.1-1` + - [(#11017)](https://github.com/microsoft/vcpkg/pull/11017) [azure-iot-sdk-c] Fixed the CMake config export. + +- sfml `2.5.1-6` -> `2.5.1-7` + - [(#11246)](https://github.com/microsoft/vcpkg/pull/11246) [sfml] Remove unnecessary patch + +- asmjit `2020-02-08` -> `2020-05-08` + - [(#11245)](https://github.com/microsoft/vcpkg/pull/11245) [asmjit] Update to the latest commit + +- libpq `12.0-1` -> `12.2-2` + - [(#11223)](https://github.com/microsoft/vcpkg/pull/11223) [libpq] link libdl on linux + - [(#10915)](https://github.com/microsoft/vcpkg/pull/10915) [libpq] Update to 12.2 and some feature fixes + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + - [(#11612)](https://github.com/microsoft/vcpkg/pull/11612) [vcpkg baseline] Fix baseline failures + - [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links + +- allegro5 `5.2.5.0` -> `5.2.6.0` + - [(#11187)](https://github.com/microsoft/vcpkg/pull/11187) [Allegro] Update to 5.2.6.0 + +- lz4 `1.9.2-1` -> `1.9.2-2` + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + +- pegtl-2 `2.8.1` -> `2.8.1-1` + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + +- vtk-dicom `0.8.12` -> `0.8.12-1` + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + +- libzen `0.4.37` -> `0.4.38` + - [(#11237)](https://github.com/microsoft/vcpkg/pull/11237) [libzen] Update to 0.4.38 + +- speexdsp `1.2.0-1` -> `1.2.0-2` + - [(#11218)](https://github.com/microsoft/vcpkg/pull/11218) [speexdsp] Change repo to github + +- restclient-cpp `0.5.1-3` -> `0.5.2` + - [(#9717)](https://github.com/microsoft/vcpkg/pull/9717) [restclient-cpp] Fix portfile and update version. + +- libpng `1.6.37-7` -> `1.6.37-9` + - [(#11162)](https://github.com/microsoft/vcpkg/pull/11162) [libpng] Fix missing symbols when compiling for ARM + - [(#11280)](https://github.com/microsoft/vcpkg/pull/11280) [libpng] Fix android build + +- capstone `4.0.1-120373dc` -> `4.0.2` + - [(#11250)](https://github.com/microsoft/vcpkg/pull/11250) [capstone] Update to 4.0.2 + +- nuspell `3.1.0` -> `3.1.1` + - [(#11291)](https://github.com/microsoft/vcpkg/pull/11291) [nuspell] update port to v3.1.1 + +- zydis `3.1.0` -> `3.1.0-1` + - [(#11173)](https://github.com/microsoft/vcpkg/pull/11173) Update zydis portfile.cmake + +- glog `0.4.0-2` -> `0.4.0-3` + - [(#11288)](https://github.com/microsoft/vcpkg/pull/11288) [glog] Disable tests + +- opus `1.3.1-2` -> `1.3.1-3` + - [(#11279)](https://github.com/microsoft/vcpkg/pull/11279) [opus] Update port to 1.3.1-2 + +- eigen3 `3.3.7-4` -> `3.3.7-5` + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- nlopt `2.6.1-1` -> `2.6.2-1` + - [(#11254)](https://github.com/microsoft/vcpkg/pull/11254) [nlopt] Update to 2.6.2 + - [(#11398)](https://github.com/microsoft/vcpkg/pull/11398) [nlopt] Enable UWP support + +- string-theory `3.1` -> `3.2` + - [(#11310)](https://github.com/microsoft/vcpkg/pull/11310) [string-theory] Update to 3.2 + +- miniz `2.1.0` -> `2.1.0-1` + - [(#11316)](https://github.com/microsoft/vcpkg/pull/11316) [miniz] Fix broken cmake config file + +- z3 `4.8.6` -> `4.8.8` + - [(#11314)](https://github.com/microsoft/vcpkg/pull/11314) [z3] update port to 4.8.8 + +- jsoncons `0.150.0` -> `0.153.0` + - [(#11311)](https://github.com/microsoft/vcpkg/pull/11311) [jsoncons] Update to v0.151.0 + - [(#11505)](https://github.com/microsoft/vcpkg/pull/11505) [jsoncons] Update to v0.152.0 + - [(#11699)](https://github.com/microsoft/vcpkg/pull/11699) [jsoncons] Update to v0.153.0 + +- units `2.3.0` -> `2.3.1` + - [(#11308)](https://github.com/microsoft/vcpkg/pull/11308) [units] Update to 2.3.1 + +- boost-accumulators `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-algorithm `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-align `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-any `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-array `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-asio `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-assert `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-assign `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-atomic `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-beast `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-bimap `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-bind `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-build `1.72.0` -> `1.73.0-1` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + - [(#11427)](https://github.com/microsoft/vcpkg/pull/11427) [boost] MinGW build fixes + +- boost-callable-traits `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-chrono `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-circular-buffer `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-compatibility `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-compute `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-concept-check `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-config `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-container-hash `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-container `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-context `1.72.0` -> `1.73.0-1` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + - [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline + +- boost-contract `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-conversion `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-convert `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-core `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-coroutine2 `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-crc `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-date-time `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-detail `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-dll `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-dynamic-bitset `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-endian `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-exception `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-fiber `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-filesystem `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-flyweight `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-foreach `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-format `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-function-types `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-function `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-functional `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-fusion `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-geometry `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-gil `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-graph-parallel `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-graph `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- sobjectizer `5.7.0` -> `5.7.0.1` + - [(#11276)](https://github.com/microsoft/vcpkg/pull/11276) [sobjectizer] update to v.5.7.0.1. + +- imgui-sfml `2.1` -> `2.1-1` + - [(#10840)](https://github.com/microsoft/vcpkg/pull/10840) [imgui-sfml] Force imgui-sfml to be a static library + +- gdcm `3.0.4` -> `3.0.5` + - [(#11258)](https://github.com/microsoft/vcpkg/pull/11258) [gdcm] Update to version 3.0.5 + +- opengl `0.0-5` -> `0.0-6` + - [(#11294)](https://github.com/microsoft/vcpkg/pull/11294) [OpenGL] Fix lib files copy when VCPKG_BUILD_TYPE is set + +- libmysql `8.0.4-7` -> `8.0.20` + - [(#11303)](https://github.com/microsoft/vcpkg/pull/11303) [libmysql] Update to 8.0.20 + +- libodb-mysql `2.4.0-6` -> `2.4.0-7` + - [(#11303)](https://github.com/microsoft/vcpkg/pull/11303) [libmysql] Update to 8.0.20 + +- ogre-next `2019-10-20` -> `2019-10-20-1` + - [(#11325)](https://github.com/microsoft/vcpkg/pull/11325) [ogre/ogre-next] Add conflict error message + +- ogre `1.12.1` -> `1.12.1-1` + - [(#11325)](https://github.com/microsoft/vcpkg/pull/11325) [ogre/ogre-next] Add conflict error message + +- paho-mqttpp3 `1.0.1-3` -> `1.1` + - [(#11327)](https://github.com/microsoft/vcpkg/pull/11327) [paho-mqttpp3] update to 1.1 + +- gsl-lite `0.36.0` -> `0.37.0` + - [(#11351)](https://github.com/microsoft/vcpkg/pull/11351) [gsl-lite] update to 0.37.0 + +- restinio `0.6.6` -> `0.6.8` + - [(#11367)](https://github.com/microsoft/vcpkg/pull/11367) [restinio] update to v.0.6.8 + +- tiff `4.0.10-8` -> `4.0.10-9` + - [(#11364)](https://github.com/microsoft/vcpkg/pull/11364) [tiff] Install runtime deps for tiff[tool] + +- sqlite3 `3.31.1` -> `3.32.1` + - [(#11267)](https://github.com/microsoft/vcpkg/pull/11267) [sqlite3] Enable build for android + - [(#11635)](https://github.com/microsoft/vcpkg/pull/11635) [sqlite3] update to 3.32 + - [(#11716)](https://github.com/microsoft/vcpkg/pull/11716) [sqlite] Updated to 3.32.1 to fix a security vulnerability + +- aws-sdk-cpp `1.7.270` -> `1.7.333` + - [(#11332)](https://github.com/microsoft/vcpkg/pull/11332) [aws-sdk-cpp] Update to 1.7.333 + +- libxml2 `2.9.9-5` -> `2.9.9-6` + - [(#11072)](https://github.com/microsoft/vcpkg/pull/11072) [libxml2] Add iconv and charset linkage in vcpkg-cmake-wrapper on osx + +- libgo `2.8-2` -> `3.1-1` + - [(#11263)](https://github.com/microsoft/vcpkg/pull/11263) [libgo] Update to 3.1 + - [(#11435)](https://github.com/microsoft/vcpkg/pull/11435) [libgo] Update CONTROL file for typo + +- ixwebsocket `9.1.9` -> `9.6.2` + - [(#11030)](https://github.com/microsoft/vcpkg/pull/11030) [ixwebsocket] update to 9.6.2 + +- cpuid `0.4.1` -> `0.4.1-1` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- dmlc `2019-08-12-1` -> `2019-08-12-4` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11612)](https://github.com/microsoft/vcpkg/pull/11612) [vcpkg baseline] Fix baseline failures + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- libnice `0.1.15-2` -> `0.1.15-3` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- magnum `2019.10-1` -> `2019.10-2` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- mlpack `3.2.2-1` -> `3.2.2-3` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11785)](https://github.com/microsoft/vcpkg/pull/11785) [mlpack] Explicitly depend on stb + +- nanodbc `2.12.4-5` -> `2.12.4-8` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11613)](https://github.com/microsoft/vcpkg/pull/11613) [vcpkg-baseline][unixodbc/nanodbc] Fix unixodbc build failure and set it as a dependency on nanodbc + +- osg `3.6.4-2` -> `3.6.4-3` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11715)](https://github.com/microsoft/vcpkg/pull/11715) [osg] Fix conflict when asio and boost-asio are installed. + +- podofo `0.9.6-7` -> `0.9.6-8` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- replxx `0.0.2` -> `0.0.2-2` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11571)](https://github.com/microsoft/vcpkg/pull/11571) [replxx] Add missing header needed to name std::runtime_error for replxx. + +- stormlib `2019-05-10` -> `2019-05-10-1` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- parallelstl `20191218` -> `20200330` + - [(#11379)](https://github.com/microsoft/vcpkg/pull/11379) [parallelstl] update to 20200330 + +- angle `2019-12-31-2` -> `2020-05-15` + - [(#11394)](https://github.com/microsoft/vcpkg/pull/11394) [angle] update for gcc 10 compatibility + +- parallel-hashmap `1.30` -> `1.32` + - [(#11420)](https://github.com/microsoft/vcpkg/pull/11420) [parallel-hashmap] Update parallel-hashmap version + +- utfcpp `3.1` -> `3.1.1` + - [(#11426)](https://github.com/microsoft/vcpkg/pull/11426) [utfcpp] Update to 3.1.1 + +- realsense2 `2.33.1-1` -> `2.34.0` + - [(#11437)](https://github.com/microsoft/vcpkg/pull/11437) [realsense2] Update to 2.34.0 + +- grpc `1.27.3` -> `1.28.1-1` + - [(#11449)](https://github.com/microsoft/vcpkg/pull/11449) [grpc] upgrade to 1.28.1 + - [(#10307)](https://github.com/microsoft/vcpkg/pull/10307) [grpc] Add feature absl-sync + +- skia `2020-02-15-1` -> `2020-05-18-1` + - [(#11416)](https://github.com/microsoft/vcpkg/pull/11416) [harfbuzz,skia] Update and replace Skia dependencies with vcpkg + +- fribidi `1.0.9` -> `1.0.9-1` + - [(#11380)](https://github.com/microsoft/vcpkg/pull/11380) [tool-meson] Update to 0.54.2 + +- libepoxy `1.5.3-3` -> `1.5.4` + - [(#11380)](https://github.com/microsoft/vcpkg/pull/11380) [tool-meson] Update to 0.54.2 + - [(#11448)](https://github.com/microsoft/vcpkg/pull/11448) [libepoxy] Update to 1.5.4 + +- tool-meson `0.53.2` -> `0.54.2` + - [(#11380)](https://github.com/microsoft/vcpkg/pull/11380) [tool-meson] Update to 0.54.2 + +- monkeys-audio `5.24` -> `5.38` + - [(#11444)](https://github.com/microsoft/vcpkg/pull/11444) [monkeys-audio] Update to 5.38 + +- clapack `3.2.1-12` -> `3.2.1-13` + - [(#9957)](https://github.com/microsoft/vcpkg/pull/9957) [clapack] Add uwp support + +- fcl `0.6.0` -> `0.6.0-1` + - [(#11406)](https://github.com/microsoft/vcpkg/pull/11406) [fcl] Explicity handle FCL_USE_X64_SSE CMake option + +- farmhash `1.1` -> `1.1-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- freexl `1.0.4-8` -> `1.0.4-9` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- healpix `1.12.10` -> `1.12.10-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libb2 `0.98.1` -> `0.98.1-2` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + - [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline + +- libcrafter `0.3` -> `0.3-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libmagic `5.37` -> `5.37-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libmesh `1.5.0` -> `1.5.0-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libosip2 `5.1.0-3` -> `5.1.0-4` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libudns `0.4-1` -> `0.4-2` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libwandio `4.2.1` -> `4.2.1-2` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libxslt `1.1.33-6` -> `1.1.33-7` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- pfring `2019-10-17-1` -> `2019-10-17-2` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- sdl1 `1.2.15-10` -> `1.2.15-11` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- tcl `8.6.10-3` -> `core-9-0-a1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- x264 `157-303c484ec828ed0-7` -> `157-303c484ec828ed0-8` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libflac `1.3.3` -> `1.3.3-1` + - [(#11152)](https://github.com/microsoft/vcpkg/pull/11152) [libflac] Update to 1.3.3-1 + +- libsndfile `1.0.29-8` -> `1.0.29-9` + - [(#11152)](https://github.com/microsoft/vcpkg/pull/11152) [libflac] Update to 1.3.3-1 + +- octomap `2017-03-11-7` -> `2017-03-11-8` + - [(#11408)](https://github.com/microsoft/vcpkg/pull/11408) [octomap] Cleanup + +- freeglut `3.0.0-9` -> `3.2.1-1` + - [(#11423)](https://github.com/microsoft/vcpkg/pull/11423) [freeglut] updated to 3.2.1 + - [(#11527)](https://github.com/microsoft/vcpkg/pull/11527) [freeglut] fix debug macro patch + +- libpqxx `6.4.5-2` -> `6.4.5-3` + - [(#11442)](https://github.com/microsoft/vcpkg/pull/11442) [libpqxx] linux support + +- marl `2019-09-13` -> `2020-05-21` + - [(#11465)](https://github.com/microsoft/vcpkg/pull/11465) [marl] Update to 2020-05-20 + +- python3 `3.7.3-2` -> `3.8.3` + - [(#11489)](https://github.com/microsoft/vcpkg/pull/11489) [python3] Fix dynamic build error on Linux + - [(#11708)](https://github.com/microsoft/vcpkg/pull/11708) [python3] Update to Python 3.8 + +- azure-storage-cpp `7.3.0` -> `7.4.0` + - [(#11510)](https://github.com/microsoft/vcpkg/pull/11510) [azure-storage-cpp] Upgrade to 7.4.0 + +- entt `3.3.2` -> `3.4.0` + - [(#11509)](https://github.com/microsoft/vcpkg/pull/11509) [entt] Update to 3.4.0 (#11507) + +- wil `2019-11-07` -> `2020-05-19` + - [(#11506)](https://github.com/microsoft/vcpkg/pull/11506) [wil] Update to 2020-05-19 + +- signalrclient `1.0.0-beta1-8` -> `1.0.0-beta1-9` + - [(#11496)](https://github.com/microsoft/vcpkg/pull/11496) [Baseline] Fix boost-*:arm-uwp failure and resolve conflicts in CI + +- bond `8.1.0-3` -> `9.0.0` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + - [(#11628)](https://github.com/microsoft/vcpkg/pull/11628) [bond] Update to 9.0.0 + - [(#10319)](https://github.com/microsoft/vcpkg/pull/10319) [bond] updated version + added bond-over-grpc integration as feature + +- ccfits `2.5-4` -> `2.5-5` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- geographiclib `1.47-patch1-10` -> `1.47-patch1-12` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- libaiff `5.0-2` -> `5.0-3` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- ois `1.5` -> `1.5-1` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- wtl `10.0-4` -> `10.0-5` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- xmsh `0.5.2` -> `0.5.2-1` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- xmlsec `1.2.29-2` -> `1.2.30` + - [(#11595)](https://github.com/microsoft/vcpkg/pull/11595) [Xmlsec] Update to 1.2.30 + +- activemq-cpp `3.9.5-1` -> `3.9.5-2` + - [(#11589)](https://github.com/microsoft/vcpkg/pull/11589) [libusbmuxd berkeleydb cppcms activemq-cpp] Add Supports and failure message + +- berkeleydb `4.8.30-3` -> `4.8.30-4` + - [(#11589)](https://github.com/microsoft/vcpkg/pull/11589) [libusbmuxd berkeleydb cppcms activemq-cpp] Add Supports and failure message + +- cppcms `1.2.1` -> `1.2.1-1` + - [(#11589)](https://github.com/microsoft/vcpkg/pull/11589) [libusbmuxd berkeleydb cppcms activemq-cpp] Add Supports and failure message + +- libusbmuxd `1.2.185` -> `1.2.185-1` + - [(#11589)](https://github.com/microsoft/vcpkg/pull/11589) [libusbmuxd berkeleydb cppcms activemq-cpp] Add Supports and failure message + +- seal `3.4.5` -> `3.4.5-1` + - [(#11588)](https://github.com/microsoft/vcpkg/pull/11588) [seal] Disable SEAL_USE_MSGSL and add default feature zlib + +- magic-get `2019-09-02` -> `2019-09-02-1` + - [(#11581)](https://github.com/microsoft/vcpkg/pull/11581) [magic-get] Fix improper direct reference to the "downloads" directory + +- lpeg `1.0.1-4` -> `1.0.2-1` + - [(#11554)](https://github.com/microsoft/vcpkg/pull/11554) [luafilesystem][lpeg] Bump versions + +- luafilesystem `1.7.0.2-1` -> `1.8.0-1` + - [(#11554)](https://github.com/microsoft/vcpkg/pull/11554) [luafilesystem][lpeg] Bump versions + +- scnlib `0.1.2` -> `0.3` + - [(#11540)](https://github.com/microsoft/vcpkg/pull/11540) [scnlib] Update to version 0.3 + +- cppgraphqlgen `3.2.1` -> `3.2.2` + - [(#11531)](https://github.com/microsoft/vcpkg/pull/11531) [pegtl/cppgraphqlgen] matching updates for dependency + +- protobuf-c `1.3.2` -> `1.3.2-2` + - [(#11517)](https://github.com/microsoft/vcpkg/pull/11517) [protobuf-c] Fix tool protoc-gen-c crash + - [(#11609)](https://github.com/microsoft/vcpkg/pull/11609) [protobuf-c] Fix wrong dependency for feature test + +- basisu `1.11-3` -> `1.11-4` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- folly `2019.10.21.00-1` -> `2019.10.21.00-2` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- gppanel `2018-04-06` -> `2020-05-20` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- msgpack11 `0.0.10` -> `0.0.10-1` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- rapidcheck `2018-11-05-1` -> `2018-11-05-2` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- simdjson `2019-12-27` -> `2020-05-26` + - [(#11495)](https://github.com/microsoft/vcpkg/pull/11495) [simdjson] Fix error LNK2001 when compile with /fsanitize=address in MSVC + - [(#10709)](https://github.com/microsoft/vcpkg/pull/10709) [simdjson] Update to 0.3.1 + +- ponder `3.0.0` -> `3.0.0-1` + - [(#11582)](https://github.com/microsoft/vcpkg/pull/11582) [ponder] patch missing headers for Visual Studio 2019 16.6 + +- telnetpp `2.0-3` -> `2.0-4` + - [(#11573)](https://github.com/microsoft/vcpkg/pull/11573) [telnetpp] Add missing for Visual Studio 2019 16.6 + +- libpopt `1.16-12` -> `1.16-13` + - [(#11607)](https://github.com/microsoft/vcpkg/pull/11607) [libpopt] Remove invalid URL + +- cpputest `2019-9-16` -> `2019-9-16-1` + - [(#11585)](https://github.com/microsoft/vcpkg/pull/11585) [cpputest] Move library to manual-link + +- unixodbc `2.3.7` -> `2.3.7-1` + - [(#11613)](https://github.com/microsoft/vcpkg/pull/11613) [vcpkg-baseline][unixodbc/nanodbc] Fix unixodbc build failure and set it as a dependency on nanodbc + +- nghttp2 `1.39.2-1` -> `1.39.2-2` + - [(#11638)](https://github.com/microsoft/vcpkg/pull/11638) [nghttp2] Fix to build nghttp2 statically + +- gli `dd17acf` -> `dd17acf-1` + - [(#11634)](https://github.com/microsoft/vcpkg/pull/11634) [gli] Add CMake config support + +- mimalloc `1.6.1` -> `1.6.1-1` + - [(#11632)](https://github.com/microsoft/vcpkg/pull/11632) [mimalloc] Install mimalloc-redirect.dll to CMAKE_INSTALL_BINDIR + +- quickfix `1.15.1-3` -> `1.15.1-4` + - [(#11604)](https://github.com/microsoft/vcpkg/pull/11604) [vcpkg-baseline][quickfix] Fix build failure on arm64-windows + +- zxing-cpp `3.3.3-6` -> `3.3.3-7` + - [(#11586)](https://github.com/microsoft/vcpkg/pull/11586) [vcpkg-baseline][zxing-cpp] Fix build failure + +- ppconsul `0.5` -> `0.5-1` + - [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline + +- proj4 `6.3.1` -> `6.3.1-1` + - [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline + - [(#11086)](https://github.com/microsoft/vcpkg/pull/11086) [PROJ4] Add search path for sqlite.exe + +- jwt-cpp `2019-05-07-1` -> `0.4.0` + - [(#11625)](https://github.com/microsoft/vcpkg/pull/11625) [jwt-cpp] Update to v0.4.0 + +- polyhook2 `2020-02-17` -> `2020-06-02` + - [(#11561)](https://github.com/microsoft/vcpkg/pull/11561) [polyhook2] Update to 2020-05-25 + - [(#11729)](https://github.com/microsoft/vcpkg/pull/11729) [polyhook2] Update polyhook to latest + +- gdk-pixbuf `2.36.9-4` -> `2.36.9-5` + - [(#11721)](https://github.com/microsoft/vcpkg/pull/11721) [gdk-pixbuf] GdkPixbuf fix for building on macOS + +- yaml-cpp `0.6.2-3` -> `0.6.3` + - [(#11718)](https://github.com/microsoft/vcpkg/pull/11718) [yaml-cpp] Update to 0.6.3 and also fix headers cannot be found + +- fmt `6.2.0` -> `6.2.1` + - [(#11706)](https://github.com/microsoft/vcpkg/pull/11706) [fmt] add vcpkg_fixup_pkgconfig + - [(#11789)](https://github.com/microsoft/vcpkg/pull/11789) [fmt] Update to 6.2.1 + +- magic-enum `0.6.4` -> `0.6.6` + - [(#11704)](https://github.com/microsoft/vcpkg/pull/11704) [magic-enum] Update to v0.6.5 + - [(#11814)](https://github.com/microsoft/vcpkg/pull/11814) [magic-enum] Update to v0.6.6 + +- enet `1.3.13-1` -> `1.3.15` + - [(#11702)](https://github.com/microsoft/vcpkg/pull/11702) [enet] Update to 1.3.15 + +- libfabric `1.8.1` -> `1.8.1-1` + - [(#11647)](https://github.com/microsoft/vcpkg/pull/11647) [vcpkg baseline][libfabric] Only support dynamic build + +- google-cloud-cpp-common `0.25.0` -> `alias` + - [(#11698)](https://github.com/microsoft/vcpkg/pull/11698) [google-cloud-cpp] Consolidate all google-cloud* packages + +- google-cloud-cpp-spanner `1.1.0` -> `alias` + - [(#11698)](https://github.com/microsoft/vcpkg/pull/11698) [google-cloud-cpp] Consolidate all google-cloud* packages + +- google-cloud-cpp `0.21.0` -> `1.14.0` + - [(#11698)](https://github.com/microsoft/vcpkg/pull/11698) [google-cloud-cpp] Consolidate all google-cloud* packages + +- amqpcpp `4.1.5` -> `4.1.7` + - [(#11608)](https://github.com/microsoft/vcpkg/pull/11608) [amqpcpp] Update to 4.1.7 + +- shiva-sfml `1.0` -> `1.0-1` + - [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links + +- spirv-tools `2020.1` -> `2020.1-1` + - [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links + +- cpp-taskflow `2.2.0` -> `2.2.0-1` + - [(#11742)](https://github.com/microsoft/vcpkg/pull/11742) [vcpkg-baseline][manyport] Fix baseline error + +- eabase `2.09.12` -> `2.09.12-1` + - [(#11742)](https://github.com/microsoft/vcpkg/pull/11742) [vcpkg-baseline][manyport] Fix baseline error + +- fastrtps `1.5.0-2` -> `1.5.0-3` + - [(#11742)](https://github.com/microsoft/vcpkg/pull/11742) [vcpkg-baseline][manyport] Fix baseline error + +- librsvg `2.40.20` -> `2.40.20-2` + - [(#11722)](https://github.com/microsoft/vcpkg/pull/11722) [librsvg] Fix for macOS + - [(#11865)](https://github.com/microsoft/vcpkg/pull/11865) [vcpkg baseline] Fix baseline + +- mozjpeg `3.2-3` -> `2020-06-02` + - [(#11719)](https://github.com/microsoft/vcpkg/pull/11719) [mozjpeg] Update to latest commit + +- pcre `8.44` -> `8.44-1` + - [(#11564)](https://github.com/microsoft/vcpkg/pull/11564) [pcre] Add pkgconfig files + +- tensorflow-cc `1.14-1` -> `1.14-2` + - [(#11839)](https://github.com/microsoft/vcpkg/pull/11839) [vcpkg] Fix OSX CI by ensuring the downloads directory exists + +- sqlpp11-connector-mysql `0.29` -> `0.29-1` + - [(#11771)](https://github.com/microsoft/vcpkg/pull/11771) [sqlpp11] update to v0.59 + +- sqlpp11 `0.58-3` -> `0.59` + - [(#11771)](https://github.com/microsoft/vcpkg/pull/11771) [sqlpp11] update to v0.59 + +- unicorn-lib `2019-07-11` -> `2020-03-02` + - [(#11830)](https://github.com/microsoft/vcpkg/pull/11830) [unicorn-lib] Update to 01cc7fc (2020-03-02) + +- sol2 `3.2.0` -> `3.2.1` + - [(#11826)](https://github.com/microsoft/vcpkg/pull/11826) [sol] Update to version 3.2.1 + +- avisynthplus `3.5.0` -> `3.6.0` + - [(#11736)](https://github.com/microsoft/vcpkg/pull/11736) [avisynthplus] Upgrade to 3.6.0 + +- plibsys `0.0.4-2` -> `0.0.4-3` + - [(#11633)](https://github.com/microsoft/vcpkg/pull/11633) [plibsys] Fix failures on linux and osx + +- libxmp-lite `4.4.1-2` -> `4.4.1-3` + - [(#11865)](https://github.com/microsoft/vcpkg/pull/11865) [vcpkg baseline] Fix baseline + +- msix `1.7` -> `1.7-2` + - [(#11865)](https://github.com/microsoft/vcpkg/pull/11865) [vcpkg baseline] Fix baseline + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- usd `20.02` -> `20.02-1` + - [(#11440)](https://github.com/microsoft/vcpkg/pull/11440) [usd] Fix build error on Linux + +- cryptopp `8.2.0-1` -> `8.2.0-2` + - [(#11711)](https://github.com/microsoft/vcpkg/pull/11711) [licensepp] Add new port + +- libpcap `1.9.1` -> `1.9.1-2` + - [(#9426)](https://github.com/microsoft/vcpkg/pull/9426) [libpcap] Fix pkgconfig libs and include path + - [(#10731)](https://github.com/microsoft/vcpkg/pull/10731) [libpcap] Enable compilation of libpcap port on x86-windows and x64-windows + +- ms-angle `2018-04-18-2` -> `alias` + - [(#11458)](https://github.com/microsoft/vcpkg/pull/11458) [ms-angle] Set ms-angle to empty package + +- libgit2 `1.0.0` -> `1.0.1` + - [(#11844)](https://github.com/microsoft/vcpkg/pull/11844) [libgit2] Update to 1.0.1 + +- uwebsockets `0.17.2` -> `18.1.0` + - [(#11866)](https://github.com/microsoft/vcpkg/pull/11866) [uWbSockets] Update to 18.1.0 + +- nameof `0.9.3` -> `0.9.4` + - [(#11815)](https://github.com/microsoft/vcpkg/pull/11815) [nameof] Update to 0.9.4 + +- cairo `1.16.0-3` -> `1.16.0-4` + - [(#11868)](https://github.com/microsoft/vcpkg/pull/11868) [cairo] Install the xlib header file when selecting feature x11 + +- directxmesh `dec2019-1` -> `jun2020` + - [(#11794)](https://github.com/microsoft/vcpkg/pull/11794) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtex `dec2019` -> `jun2020` + - [(#11794)](https://github.com/microsoft/vcpkg/pull/11794) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtk `2019-12-31` -> `jun2020` + - [(#11794)](https://github.com/microsoft/vcpkg/pull/11794) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtk12 `dec2019` -> `jun2020` + - [(#11794)](https://github.com/microsoft/vcpkg/pull/11794) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- spdlog `1.4.2-1` -> `1.6.1` + - [(#11793)](https://github.com/microsoft/vcpkg/pull/11793) [spdlog] Update to 1.61 + +- msmpi `10.0-2` -> `10.1` + - [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS + +- openmpi `4.0.1` -> `4.0.3` + - [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS + +- sdl2 `2.0.12` -> `2.0.12-1` + - [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS + +- gtk `3.22.19-3` -> `3.22.19-4` + - [(#11892)](https://github.com/microsoft/vcpkg/pull/11892) [gtk] DISABLE_PARALLEL_CONFIGURE + +- xalan-c `1.11-11` -> `1.11-12` + - [(#11869)](https://github.com/microsoft/vcpkg/pull/11869) [xalan-c] Fix import Xalan.exe + +- libuuid `1.0.3-3` -> `1.0.3-4` + - [(#11849)](https://github.com/microsoft/vcpkg/pull/11849) [libuuid] Install uuid.pc file + +- lastools `2019-07-10` -> `2020-05-09` + - [(#11796)](https://github.com/microsoft/vcpkg/pull/11796) [LAStools] Update to 200509 + +- libpmemobj-cpp `1.8` -> `1.10` + - [(#11738)](https://github.com/microsoft/vcpkg/pull/11738) [libpmemobj-cpp] Update to 1.10 + +- librabbitmq `0.10.0` -> `2020-06-03` + - [(#11733)](https://github.com/microsoft/vcpkg/pull/11733) [librabbitmq] Update to use rabbitmq-config.cmake + +- hyperscan `5.2.1` -> `5.2.1-1` + - [(#11708)](https://github.com/microsoft/vcpkg/pull/11708) [python3] Update to Python 3.8 + +- tinyxml2 `7.1.0` -> `8.0.0` + - [(#11616)](https://github.com/microsoft/vcpkg/pull/11616) [tinyxml2] Update to 8.0.0; avoid exporting symbols when building static libraries + +- winpcap `4.1.3-2` -> `4.1.3-3` + - [(#10731)](https://github.com/microsoft/vcpkg/pull/10731) [libpcap] Enable compilation of libpcap port on x86-windows and x64-windows + +- ccd `2.1-3` -> `2.1-4` + - [(#11407)](https://github.com/microsoft/vcpkg/pull/11407) [ccd] Add emscripten support + +- itpp `4.3.1-1` -> `4.3.1-2` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- plplot `5.13.0-4` -> `5.13.0-5` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- pthreads `3.0.0-4` -> `3.0.0-5` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- qwt `6.1.3-10` -> `6.1.3-11` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- soundtouch `2.0.0-4` -> `2.0.0-6` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- tclap `1.2.2-1` -> `1.2.2-2` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- tinyfiledialogs `3.4.3-1` -> `3.4.3-2` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- mpir `3.0.0-7` -> `3.0.0-8` + - [(#9205)](https://github.com/microsoft/vcpkg/pull/9205) [mpir] Add mpirxx.lib + +- fftw3 `3.3.8-6` -> `3.3.8-7` + - [(#4361)](https://github.com/microsoft/vcpkg/pull/4361) Adds vcpkg item to project settings in Visual Studio + +
+ +-- vcpkg team vcpkg@microsoft.com MON, 16 June 1400:00 -0700 + +vcpkg (2020.04.01 - 2020.04.20) +--- +#### Total port count: 1322 + +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1218| +|x86-windows|1202| +|x64-windows-static|1130| +|**x64-linux**|1104| +|**x64-osx**|1041| +|arm64-windows|842| +|x64-uwp|654| +|arm-uwp|625| + +#### The following documentation has been updated: +- [vcpkg_from_git](docs/maintainers/vcpkg_from_git.md) + - [(#9446)](https://github.com/microsoft/vcpkg/pull/9446) vcpkg_from_git: Add support for git over ssh (by @marcrambo) +- [Exporting to Android Archives (AAR files)](docs/specifications/prefab.md) ***[NEW]*** + - [(#10271)](https://github.com/microsoft/vcpkg/pull/10271) Android Support: Exporting to Android Archive (AAR) (by @atkawa7) +- [Triplets](docs/users/triplets.md) + - [(#6275)](https://github.com/microsoft/vcpkg/pull/6275) Add initial iOS support (by @alcroito) + +#### The following *remarkable* changes have been made to vcpkg: +- [(#9446)](https://github.com/microsoft/vcpkg/pull/9446) vcpkg_from_git: Add support for git over ssh (by @marcrambo) +- [(#10271)](https://github.com/microsoft/vcpkg/pull/10271) Android Support: Exporting to Android Archive (AAR) (by @atkawa7) +- [(#10395)](https://github.com/microsoft/vcpkg/pull/10395) [vcpkg] Make configure meson sane and work for all targets. (by @Neumann-A) +- [(#10398)](https://github.com/microsoft/vcpkg/pull/10398) [vcpkg] New policy: SKIP_ARCHITECTURE_CHECK. (by @Neumann-A) +- [(#6275)](https://github.com/microsoft/vcpkg/pull/6275) Add initial iOS support (by @alcroito) +- [(#10817)](https://github.com/microsoft/vcpkg/pull/10817) [vcpkg] Add x-set-installed command (by @strega-nil) +- [(#10521)](https://github.com/microsoft/vcpkg/pull/10521) [vcpkg] Add initial JSON support (by @strega-nil) + +#### The following *additional* changes have been made to vcpkg: +- [(#10637)](https://github.com/microsoft/vcpkg/pull/10637) [vcpkg baseline] Ignore osg-qt (by @PhoebeHui) +- [(#10660)](https://github.com/microsoft/vcpkg/pull/10660) [vcpkg] Fix spec instance name (by @PhoebeHui) +- [(#10703)](https://github.com/microsoft/vcpkg/pull/10703) [vcpkg baseline] Remove replxx:x86-windows=fail (by @strega-nil) +- [(#10655)](https://github.com/microsoft/vcpkg/pull/10655) [vcpkg] Fix nuget/aria2/ninja version/filename inconsistent (by @LilyWangL) +- [(#10583)](https://github.com/microsoft/vcpkg/pull/10583) [vcpkg] Correct UInt128 code 😇 (by @strega-nil) +- [(#10543)](https://github.com/microsoft/vcpkg/pull/10543) [vcpkg-test] Fix the check for ability to make symlinks (by @strega-nil) +- [(#10621)](https://github.com/microsoft/vcpkg/pull/10621) [vcpkg] fix vcpkg_find_acquire_program for scripts (by @Neumann-A) +- [(#10834)](https://github.com/microsoft/vcpkg/pull/10834) [vcpkg] Clean up CMake build system (by @strega-nil) +- [(#10846)](https://github.com/microsoft/vcpkg/pull/10846) [vcpkg] Fix bootstrap from out of directory (by @strega-nil) +- [(#10796)](https://github.com/microsoft/vcpkg/pull/10796) [Ninja] Update to 1.10 (by @Voskrese) +- [(#10867)](https://github.com/microsoft/vcpkg/pull/10867) [vcpkg] Fix build scripts on openSUSE and g++9 (by @strega-nil) + +
+The following 5 ports have been added: + +|port|version| +|---|---| +|[skyr-url](https://github.com/microsoft/vcpkg/pull/10463)[#10694](https://github.com/microsoft/vcpkg/pull/10694) | 1.5.1 +|[boringssl](https://github.com/microsoft/vcpkg/pull/8455)| 2020-04-07 +|[quadtree](https://github.com/microsoft/vcpkg/pull/10787)| 2020-04-13 +|[avisynthplus](https://github.com/microsoft/vcpkg/pull/10496)| 3.5.0 +|[c4core](https://github.com/microsoft/vcpkg/pull/10791)| 2020-04-12 +
+ +
+The following 69 ports have been updated: + +- cub `1.8.0` -> `1.8.0-1` + - [(#10660)](https://github.com/microsoft/vcpkg/pull/10660) [vcpkg] Fix spec instance name + +- vulkan-hpp `2019-05-11` -> `2019-05-11-1` + - [(#10660)](https://github.com/microsoft/vcpkg/pull/10660) [vcpkg] Fix spec instance name + +- function2 `4.0.0` -> `4.1.0` + - [(#10666)](https://github.com/microsoft/vcpkg/pull/10666) [function2] Update to version 4.1.0 + +- libwebsockets `3.2.2-1` -> `4.0.1-1` + - [(#10658)](https://github.com/microsoft/vcpkg/pull/10658) [libwebsockets] Update to 4.0.1 + - [(#10636)](https://github.com/microsoft/vcpkg/pull/10636) [mosquitto] Add support for static build + +- googleapis `0.6.0` -> `0.8.0` + - [(#10651)](https://github.com/microsoft/vcpkg/pull/10651) [googleapis] upgrade to v0.7.0 release + - [(#10885)](https://github.com/microsoft/vcpkg/pull/10885) [googleapis] Update to v0.8.0 + +- ixwebsocket `8.0.5` -> `9.1.9` + - [(#10633)](https://github.com/microsoft/vcpkg/pull/10633) [ixwebsocket] Update to 9.1.9 + +- opus `1.3.1` -> `1.3.1-2` + - [(#10634)](https://github.com/microsoft/vcpkg/pull/10634) [opus] Make AVX an optional feature + +- freerdp `2.0.0-rc4-6` -> `2.0.0-rc4-7` + - [(#10630)](https://github.com/microsoft/vcpkg/pull/10630) [freerdp] Fix include paths and output + +- openvr `1.9.16` -> `1.10.30` + - [(#10629)](https://github.com/microsoft/vcpkg/pull/10629) [openvr] Added Linux support and updated to v1.10.30 + +- abseil `2020-03-03-1` -> `2020-03-03-3` + - [(#10620)](https://github.com/microsoft/vcpkg/pull/10620) [abseil] Fix feature name error + - [(#10721)](https://github.com/microsoft/vcpkg/pull/10721) [abseil] Fix CompressedTuple move constructor on MSVC + +- reproc `11.0.1` -> `12.0.0` + - [(#10594)](https://github.com/microsoft/vcpkg/pull/10594) [reproc] Update to version 12.0.0 + +- hunspell `1.7.0` -> `1.7.0-1` + - [(#10574)](https://github.com/microsoft/vcpkg/pull/10574) [hunspell] Disable build tools in non-Windows + +- sciter `4.4.0.7` -> `4.4.1.5` + - [(#10071)](https://github.com/microsoft/vcpkg/pull/10071) [sciter] Update to 4.4.1.5 + +- qt5-base `5.12.5-11` -> `5.12.5-13` + - [(#10641)](https://github.com/microsoft/vcpkg/pull/10641) [qt5-base] Fix EGL absolute path on Linux + - [(#10746)](https://github.com/microsoft/vcpkg/pull/10746) [qt5] fix some remaining absolute paths. + - [(#9705)](https://github.com/microsoft/vcpkg/pull/9705) [qt5-base, qt5-imageformat] fix issues on osx + +- nana `1.7.2` -> `1.7.2-1` + - [(#10605)](https://github.com/microsoft/vcpkg/pull/10605) [nana] Add Xorg dependency libxcursor-dev and modify deprecated functions + +- blend2d `beta_2019-12-27` -> `beta_2020-04-15` + - [(#10600)](https://github.com/microsoft/vcpkg/pull/10600) [blend2d] Update to beta_2020-03-29 + - [(#10844)](https://github.com/microsoft/vcpkg/pull/10844) [blend2d] Update to beta_2020-04-15 + +- libffi `3.3` -> `3.3-2` + - [(#10485)](https://github.com/microsoft/vcpkg/pull/10485) [libffi] Support arm/arm64 + - [(#10469)](https://github.com/microsoft/vcpkg/pull/10469) [libffi] Check return value of execute_process() + +- fribidi `2019-02-04-2` -> `2019-02-04-3` + - [(#10395)](https://github.com/microsoft/vcpkg/pull/10395) [vcpkg] Make configure meson sane and work for all targets. + - [(#10713)](https://github.com/microsoft/vcpkg/pull/10713) [fribidi] Updated to v1.0.9 + +- libepoxy `1.5.3-2` -> `1.5.3-3` + - [(#10395)](https://github.com/microsoft/vcpkg/pull/10395) [vcpkg] Make configure meson sane and work for all targets. + +- egl-registry `2019-08-08` -> `2020-02-03` + - [(#9965)](https://github.com/microsoft/vcpkg/pull/9965) [angle] Improve port + +- glad `0.1.33` -> `0.1.33-1` + - [(#9965)](https://github.com/microsoft/vcpkg/pull/9965) [angle] Improve port + +- opengl-registry `2019-08-22` -> `2020-02-03` + - [(#9965)](https://github.com/microsoft/vcpkg/pull/9965) [angle] Improve port + +- mpfr `4.0.2-1` -> `4.0.2-2` + - [(#10035)](https://github.com/microsoft/vcpkg/pull/10035) [mpfr] Add mirror for mpfr at gnu.org + +- google-cloud-cpp-common `0.21.0` -> `0.25.0` + - [(#10680)](https://github.com/microsoft/vcpkg/pull/10680) [google-cloud-cpp*] update to the latest release + +- google-cloud-cpp-spanner `0.9.0` -> `1.1.0` + - [(#10680)](https://github.com/microsoft/vcpkg/pull/10680) [google-cloud-cpp*] update to the latest release + +- google-cloud-cpp `0.20.0` -> `0.21.0` + - [(#10680)](https://github.com/microsoft/vcpkg/pull/10680) [google-cloud-cpp*] update to the latest release + +- jsoncons `0.149.0` -> `0.150.0` + - [(#10688)](https://github.com/microsoft/vcpkg/pull/10688) [jsoncons] update to v0.150.0 + +- osg-qt `Qt4` -> `Qt4-1` + - [(#9705)](https://github.com/microsoft/vcpkg/pull/9705) [qt5-base, qt5-imageformat] fix issues on osx + +- qt5-imageformats `5.12.5-2` -> `5.12.5-3` + - [(#9705)](https://github.com/microsoft/vcpkg/pull/9705) [qt5-base, qt5-imageformat] fix issues on osx + +- libpng `1.6.37-6` -> `1.6.37-7` + - [(#6275)](https://github.com/microsoft/vcpkg/pull/6275) Add initial iOS support + +- pcre2 `10.30-6` -> `10.30-7` + - [(#6275)](https://github.com/microsoft/vcpkg/pull/6275) Add initial iOS support + +- curlpp `2018-06-15-2` -> `2018-06-15-3` + - [(#10535)](https://github.com/microsoft/vcpkg/pull/10535) [curlpp] Fix target "curlpp" link "ZLIB::ZLIB" error + +- avro-c `1.9.2` -> `1.9.2-1` + - [(#10514)](https://github.com/microsoft/vcpkg/pull/10514) [avro-c] Fix building avro-c in Linux + +- nlohmann-fifo-map `2018.05.07` -> `2018.05.07-1` + - [(#10850)](https://github.com/microsoft/vcpkg/pull/10850) [nlohmann-fifo-map] Fix could not find a package "nlohmann-fifo-map" + +- cppitertools `2019-04-14-3` -> `2.0` + - [(#10848)](https://github.com/microsoft/vcpkg/pull/10848) [cppitertools] Update to version 2.0 + +- python3 `3.7.3-1` -> `3.7.3-2` + - [(#10841)](https://github.com/microsoft/vcpkg/pull/10841) [python3] fix build on macOS and linux + +- restinio `0.6.5` -> `0.6.6` + - [(#10813)](https://github.com/microsoft/vcpkg/pull/10813) [restinio] Updated to v.0.6.6 + +- libgit2 `0.99.0-1` -> `1.0.0` + - [(#10807)](https://github.com/microsoft/vcpkg/pull/10807) [libgit2] Upgrade to 1.0.0 + +- zstd `1.4.4` -> `1.4.4-1` + - [(#10815)](https://github.com/microsoft/vcpkg/pull/10815) [zstd] export zstd-config.cmake + +- blosc `1.17.1` -> `1.18.1-1` + - [(#10816)](https://github.com/microsoft/vcpkg/pull/10816) [blosc] Update to 1.18.1 + +- freetype `2.10.1-5` -> `2.10.1-6` + - [(#10835)](https://github.com/microsoft/vcpkg/pull/10835) [Freetype] Actually prevent linking HarfBuzz on POSIX + +- gsl `2.4-5` -> `2.6` + - [(#10758)](https://github.com/microsoft/vcpkg/pull/10758) [gsl] update to 2.6 + +- physfs `3.0.2-1` -> `3.0.2-2` + - [(#10781)](https://github.com/microsoft/vcpkg/pull/10781) [physfs] mirror url + +- openssl-windows `1.1.1d-1` -> `1.1.1d-2` + - [(#10743)](https://github.com/microsoft/vcpkg/pull/10743) [openssl-windows] Avoid to install docs for openssl-windows + +- coolprop `6.1.0-4` -> `6.1.0-5` + - [(#10755)](https://github.com/microsoft/vcpkg/pull/10755) [fmt] update to 6.2.0 + +- fmt `6.1.2` -> `6.2.0` + - [(#10755)](https://github.com/microsoft/vcpkg/pull/10755) [fmt] update to 6.2.0 + +- directxmesh `dec2019` -> `dec2019-1` + - [(#10739)](https://github.com/microsoft/vcpkg/pull/10739) [DirectXMesh] Add support build for DirectX12 + +- libvorbis `1.3.6-9eadecc-3` -> `1.3.6-4d963fe` + - [(#10756)](https://github.com/microsoft/vcpkg/pull/10756) [libvorbis] Update to latest commit + +- nuspell `3.0.0` -> `3.1.0` + - [(#10737)](https://github.com/microsoft/vcpkg/pull/10737) [nuspell] update port to v3.1.0 + +- raylib `2.6.0` -> `3.0.0` + - [(#10722)](https://github.com/microsoft/vcpkg/pull/10722) [raylib] Update to 3.0.0 + +- entt `3.3.0` -> `3.3.2` + - [(#10672)](https://github.com/microsoft/vcpkg/pull/10672) [entt] Update to version 3.3.2 + +- indicators `1.5` -> `1.7` + - [(#10685)](https://github.com/microsoft/vcpkg/pull/10685) [indicators] Updated indicators to 1.7 + +- realsense2 `2.33.1` -> `2.33.1-1` + - [(#10673)](https://github.com/microsoft/vcpkg/pull/10673) [realsense2] Add tm2 feature for support T265 devices + +- flatbuffers `1.11.0-1` -> `1.12.0` + - [(#10664)](https://github.com/microsoft/vcpkg/pull/10664) [flatbuffers] Update to 1.12.0 + +- curl `7.68.0-2` -> `7.68.0-3` + - [(#10659)](https://github.com/microsoft/vcpkg/pull/10659) [curl] Fix cmake configure error + +- ismrmrd `1.4.1` -> `1.4.2` + - [(#10618)](https://github.com/microsoft/vcpkg/pull/10618) [ismrmrd] updated to version 1.4.2 + +- mosquitto `1.6.8` -> `1.6.8-1` + - [(#10636)](https://github.com/microsoft/vcpkg/pull/10636) [mosquitto] Add support for static build + +- lz4 `1.9.2` -> `1.9.2-1` + - [(#10452)](https://github.com/microsoft/vcpkg/pull/10452) [lz4] Fix for building Linux shared libraries + +- sdl2 `2.0.10-3` -> `2.0.12` + - [(#10500)](https://github.com/microsoft/vcpkg/pull/10500) [sdl2] Update to 2.0.12 version + +- osg `3.6.4-1` -> `3.6.4-2` + - [(#10082)](https://github.com/microsoft/vcpkg/pull/10082) [osg] Add feature examples and plugins, fix configure options + +- osgearth `2.10.2` -> `2.10.2-1` + - [(#10082)](https://github.com/microsoft/vcpkg/pull/10082) [osg] Add feature examples and plugins, fix configure options + +- ms-gsl `2.1.0` -> `3.0.0` + - [(#10872)](https://github.com/microsoft/vcpkg/pull/10872) [ms-gsl] Update version to v3.0.0 + - [(#10831)](https://github.com/microsoft/vcpkg/pull/10831) [ms-gsl] Update to v3.0.0 + +- cppgraphqlgen `3.2.0` -> `3.2.1` + - [(#10869)](https://github.com/microsoft/vcpkg/pull/10869) [cppgraphqlgen] Update to v3.2.1 + +- cgal `5.0.2` -> `5.0.2-1` + - [(#10879)](https://github.com/microsoft/vcpkg/pull/10879) [cgal] Add dependency boost-interval + +- arrow `0.16.0` -> `0.17.0` + - [(#10883)](https://github.com/microsoft/vcpkg/pull/10883) [Arrow] Update to 0.17 + +- xerces-c `3.2.2-13` -> `3.2.3` + - [(#10779)](https://github.com/microsoft/vcpkg/pull/10779) [xerces-c] Update to version 3.2.3 + +- libarchive `3.4.1` -> `3.4.1-1` + - [(#10769)](https://github.com/microsoft/vcpkg/pull/10769) [libarchive, libuv]Fix static linkage + +- libuv `1.34.2` -> `1.34.2-1` + - [(#10769)](https://github.com/microsoft/vcpkg/pull/10769) [libarchive, libuv]Fix static linkage + +- qscintilla `2.10-11` -> `2.11.4-1` + - [(#10511)](https://github.com/microsoft/vcpkg/pull/10511) [qscintilla] Update to 2.11.4 + +
+ +-- vcpkg team vcpkg@microsoft.com MON, 20 April 15:00:00 -0700 + + +vcpkg (2020.01.31) +--- +#### Total port count: 1295 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1195| +|x86-windows|1183| +|x64-windows-static|1104| +|**x64-linux**|1054| +|**x64-osx**|970| +|arm64-windows|814| +|x64-uwp|644| +|arm-uwp|615| + +#### The following documentation has been updated: +- [Triplets](docs/users/triplets.md) + - [(#7976)](https://github.com/microsoft/vcpkg/pull/7976) Community Triplets 🤠(by @vicroms) + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- Allow untested triplet configurations as "Community Triplets" + - [(#7976)](https://github.com/microsoft/vcpkg/pull/7976) Community Triplets 🤠(by @vicroms) +- Add community support for MinGW + - [(#9137)](https://github.com/microsoft/vcpkg/pull/9137) Add community support for building with MinGW (by @cristianadam) + - [(#9807)](https://github.com/microsoft/vcpkg/pull/9807) MinGW: Fix vcpkg common definitions (by @cristianadam) +- Allow ARM/ARM64 toolchains to be selected when building x86 targets, also allow ARM64 to target ARM + - [(#9578)](https://github.com/microsoft/vcpkg/pull/9578) [vcpkg] Mark ARM and x86 on ARM64 and x86 on ARM as supported architectures when searching for toolchains on Windows (by @cbezault) + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#9435)](https://github.com/microsoft/vcpkg/pull/9435) Update CI baseline (by @NancyLi1013) +- [(#9494)](https://github.com/microsoft/vcpkg/pull/9494) [charls] Upgrade to 2.1.0 (by @vbaderks) +- [(#9379)](https://github.com/microsoft/vcpkg/pull/9379) [uvatlas] Upgrade to dec2019 (by @AlvinZhangH) +- [(#9529)](https://github.com/microsoft/vcpkg/pull/9529) [box2d] Update to 2019-12-31 (by @PhoebeHui) +- [(#9513)](https://github.com/microsoft/vcpkg/pull/9513) [wpilib] Update to 2020.1.1 (by @ThadHouse) +- [(#9499)](https://github.com/microsoft/vcpkg/pull/9499) [akali] Add new port (by @winsoft666) +- [(#9301)](https://github.com/microsoft/vcpkg/pull/9301) [sdl1] Add build support for ARM64 Windows 10 (by @shibayan) +- [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI (by @Neumann-A) +- [(#9308)](https://github.com/microsoft/vcpkg/pull/9308) [pdal] Fix static build (by @JackBoosY) +- [(#8701)](https://github.com/microsoft/vcpkg/pull/8701) [nethost] Adding a port for nethost (by @tannergooding) +- [(#8650)](https://github.com/microsoft/vcpkg/pull/8650) [libmagic] Add new port (by @NancyLi1013) +- [(#8386)](https://github.com/microsoft/vcpkg/pull/8386) [tfhe] Add new port (by @NancyLi1013) +- [(#8518)](https://github.com/microsoft/vcpkg/pull/8518) [libb2] Add new port (by @NancyLi1013) +- [(#9605)](https://github.com/microsoft/vcpkg/pull/9605) Add December changelog (by @grdowns) +- [(#9566)](https://github.com/microsoft/vcpkg/pull/9566) [vcpkg] Fix a typo (by @MaherJendoubi) +- [(#9207)](https://github.com/microsoft/vcpkg/pull/9207) [sdl1]Change build method to vcpkg_*_make (by @JackBoosY) +- [(#6393)](https://github.com/microsoft/vcpkg/pull/6393) Map MinSizeRel and RelWithDebInfo correctly (by @Neumann-A) +- [(#9458)](https://github.com/microsoft/vcpkg/pull/9458) [azure-kinect-sensor-sdk] Remove feature test and fix static build in Windows (by @JackBoosY) +- [(#8936)](https://github.com/microsoft/vcpkg/pull/8936) [libplist] Update to 1.2.137 (by @PhoebeHui) +- [(#8888)](https://github.com/microsoft/vcpkg/pull/8888) [caf] Update to 0.17.2 (by @JackBoosY) +- [(#8683)](https://github.com/microsoft/vcpkg/pull/8683) [libwandio] Add new port (by @NancyLi1013) +- [(#8678)](https://github.com/microsoft/vcpkg/pull/8678) [libevhtp] Add new port (by @NancyLi1013) +- [(#9600)](https://github.com/microsoft/vcpkg/pull/9600) Update baseline to fix osx failure (by @JackBoosY) +- [(#9669)](https://github.com/microsoft/vcpkg/pull/9669) [vcpkg] Update baseline for OSX (by @ras0219-msft) +- [(#9649)](https://github.com/microsoft/vcpkg/pull/9649) [tfhe] Fix Mac support (by @SeekingMeaning) +- [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d (by @Neumann-A) +- [(#9642)](https://github.com/microsoft/vcpkg/pull/9642) Introduce new policy to skip post verification of dll exports (by @martin-s) +- [(#9602)](https://github.com/microsoft/vcpkg/pull/9602) [vcpkg] Fix build type in vcpkg_build_make.cmake [x264] Modernize (by @NancyLi1013) +- [(#9536)](https://github.com/microsoft/vcpkg/pull/9536) Minor edit to help message for cli depend-info option. Fix for #9534. (by @dbird137) +- [(#9617)](https://github.com/microsoft/vcpkg/pull/9617) [akali] Update to v1.41 (by @winsoft666) +- [(#9572)](https://github.com/microsoft/vcpkg/pull/9572) [soem] Add new port (by @seanyen) +- [(#9574)](https://github.com/microsoft/vcpkg/pull/9574) [doxygen] Updated to 1.8.17 (by @tagsemb) +- [(#9372)](https://github.com/microsoft/vcpkg/pull/9372) [VCPKG] WinHTTPOption for company Proxy not correctly taken into account (by @xabbudm) +- [(#9720)](https://github.com/microsoft/vcpkg/pull/9720) [toolsrc] Added missing @ to FATAL_ERROR message (by @theriverman) +- [(#9555)](https://github.com/microsoft/vcpkg/pull/9555) [embree3] added cleanup command to embree3 port for static build (by @xelatihy) +- [(#9684)](https://github.com/microsoft/vcpkg/pull/9684) [teemo] new port. (by @winsoft666) +- [(#9591)](https://github.com/microsoft/vcpkg/pull/9591) [scintilla] Update to 4.2.3 (by @SeekingMeaning) +- [(#9767)](https://github.com/microsoft/vcpkg/pull/9767) [open62541] Update to v1.0 (by @yurybura) +- [(#9760)](https://github.com/microsoft/vcpkg/pull/9760) [monkeys-audio] Update to 5.14, add feature tools (by @JackBoosY) +- [(#9770)](https://github.com/microsoft/vcpkg/pull/9770) [asmjit] update to current version (by @jsmolka) +- [(#9708)](https://github.com/microsoft/vcpkg/pull/9708) [doxygen] Add alternative download URL (by @c72578) +- [(#9690)](https://github.com/microsoft/vcpkg/pull/9690) [string_theory] Update to 3.0 (by @zrax) +- [(#9680)](https://github.com/microsoft/vcpkg/pull/9680) [jasper] freeglut is not a dependency in macOS (by @david-antiteum) +- [(#9633)](https://github.com/microsoft/vcpkg/pull/9633) [cryptopp] Fixed build error on ARM32/ARM64 Windows (by @shibayan) +- [(#9281)](https://github.com/microsoft/vcpkg/pull/9281) [pbc] Correct non Windows build (by @decent-dcore) +- [(#9816)](https://github.com/microsoft/vcpkg/pull/9816) Make VS 2019 default to x64 triplet if CMAKE_GENERATOR_PLATFORM is not defined (by @Neumann-A) +- [(#9541)](https://github.com/microsoft/vcpkg/pull/9541) [memorymodule] Add new port (by @myd7349) +- [(#9521)](https://github.com/microsoft/vcpkg/pull/9521) [ftgl] Fix build failure #9520 (by @sma-github) +- [(#9456)](https://github.com/microsoft/vcpkg/pull/9456) [asiosdk] Add new port (by @batlogic) +- [(#9314)](https://github.com/microsoft/vcpkg/pull/9314) [sdl2-gfx] Fixed build error ARM64 Windows 10 (by @shibayan) +- [(#9265)](https://github.com/microsoft/vcpkg/pull/9265) Update the repo for jom 1.1.3 (by @zigguratvertigo) +- [(#8774)](https://github.com/microsoft/vcpkg/pull/8774) [vcpkg_find_acquire_program] Include version in downloaded python MSI… (by @ras0219-msft) +- [(#9698)](https://github.com/microsoft/vcpkg/pull/9698) [seal] Add new port (by @musaprg) +- [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version (by @JackBoosY) + +
+The following 22 ports have been added: + +|port|version| +|---|---| +|[argumentum](https://github.com/microsoft/vcpkg/pull/9478)| 0.2.2 +|[tabulate](https://github.com/microsoft/vcpkg/pull/9543)| 2019-01-06 +|[akali](https://github.com/microsoft/vcpkg/pull/9499)[#9617](https://github.com/microsoft/vcpkg/pull/9617) | 1.41 +|[nethost](https://github.com/microsoft/vcpkg/pull/8701)| 2019-12-21 +|[libmagic](https://github.com/microsoft/vcpkg/pull/8650)| 5.37 +|[yas](https://github.com/microsoft/vcpkg/pull/8891)| 7.0.4 +|[tfhe](https://github.com/microsoft/vcpkg/pull/8386)[#9649](https://github.com/microsoft/vcpkg/pull/9649) | 1.0.1-1 +|[libb2](https://github.com/microsoft/vcpkg/pull/8518)| 0.98.1 +|[libaaplus](https://github.com/microsoft/vcpkg/pull/9194)[#9579](https://github.com/microsoft/vcpkg/pull/9579) [#9664](https://github.com/microsoft/vcpkg/pull/9664) | 2.12 +|[libwandio](https://github.com/microsoft/vcpkg/pull/8683)| 4.2.1 +|[libevhtp](https://github.com/microsoft/vcpkg/pull/8678)| 1.2.18 +|[soem](https://github.com/microsoft/vcpkg/pull/9572)| 1.4.0 +|[glui](https://github.com/microsoft/vcpkg/pull/9155)| 2019-11-30 +|[teemo](https://github.com/microsoft/vcpkg/pull/9684)| 1.2 +|[mqtt-cpp](https://github.com/microsoft/vcpkg/pull/9787)| 7.0.1 +|[msgpack11](https://github.com/microsoft/vcpkg/pull/9524)| 0.0.10 +|[mcpp](https://github.com/microsoft/vcpkg/pull/9598)| 2.7.2.14 +|[memorymodule](https://github.com/microsoft/vcpkg/pull/9541)| 2019-12-31 +|[asiosdk](https://github.com/microsoft/vcpkg/pull/9456)| 2.3.3 +|[sfsexp](https://github.com/microsoft/vcpkg/pull/9420)| 1.3 +|[quaternions](https://github.com/microsoft/vcpkg/pull/9837)| 1.0.0 +|[seal](https://github.com/microsoft/vcpkg/pull/9698)| 3.4.5 +
+ +
+The following 226 ports have been updated: + +- simpleini `2018-08-31-3` -> `2018-08-31-4` + - [(#9429)](https://github.com/microsoft/vcpkg/pull/9429) [simpleini] Install missing code + +- directxtk `dec2019` -> `2019-12-31` + - [(#9508)](https://github.com/microsoft/vcpkg/pull/9508) [directxtk] Fix invalid solution configuration + +- nameof `0.9.2` -> `0.9.3` + - [(#9503)](https://github.com/microsoft/vcpkg/pull/9503) [nameof] Update to 0.9.3 + +- charls `2.0.0-3` -> `2.1.0-1` + - [(#9494)](https://github.com/microsoft/vcpkg/pull/9494) [charls] upgrade to 2.1.0 + +- ptex `2.3.2` -> `2.3.2-1` + - [(#9455)](https://github.com/microsoft/vcpkg/pull/9455) [ptext] Fix library cannot be found by find_package() + +- fruit `3.4.0-1` -> `3.4.0-2` + - [(#9445)](https://github.com/microsoft/vcpkg/pull/9445) [fruit] fix wchar.h import issue under Catalina + +- libxlsxwriter `0.8.7-1` -> `0.9.4` + - [(#9410)](https://github.com/microsoft/vcpkg/pull/9410) [libxlsxwriter] upgrade to 0.8.9 + - [(#9775)](https://github.com/microsoft/vcpkg/pull/9775) [libxlsxwriter] upgrade to 0.9.4 + +- uvatlas `apr2019` -> `dec2019` + - [(#9379)](https://github.com/microsoft/vcpkg/pull/9379) [uvatlas] Upgrade to dec2019 + +- grpc `1.23.1-1` -> `1.26.0` + - [(#9135)](https://github.com/microsoft/vcpkg/pull/9135) [grpc] Update grpc to 1.24.3 + - [(#9363)](https://github.com/microsoft/vcpkg/pull/9363) [grpc] Upgrade to gRPC-1.26.0 + +- freetype `2.10.1-1` -> `2.10.1-3` + - [(#9311)](https://github.com/microsoft/vcpkg/pull/9311) [freetype] use config and the correct alias + - [(#9706)](https://github.com/microsoft/vcpkg/pull/9706) [freetype] Add feature support + +- glibmm `2.52.1-10` -> `2.52.1-11` + - [(#9562)](https://github.com/microsoft/vcpkg/pull/9562) [glibmm] Fix build error on Linux + +- libfreenect2 `0.2.0-3` -> `0.2.0-4` + - [(#9551)](https://github.com/microsoft/vcpkg/pull/9551) [libfreenect2] add opengl and opencl features + +- jsoncons `0.140.0` -> `0.143.1` + - [(#9547)](https://github.com/microsoft/vcpkg/pull/9547) [jsoncons] Update to 0.143.1 + +- uwebsockets `0.16.5` -> `0.17.0a4` + - [(#9535)](https://github.com/microsoft/vcpkg/pull/9535) [uwebsockets] Update to 0.17.0 alpha 4 + +- box2d `2.3.1-374664b-2` -> `2019-12-31` + - [(#9529)](https://github.com/microsoft/vcpkg/pull/9529) [box2d] Update to 2019-12-31 + +- parallel-hashmap `1.27` -> `1.30` + - [(#9519)](https://github.com/microsoft/vcpkg/pull/9519) [parallel-hashmap] Update to 1.30 + +- wpilib `2019.6.1` -> `2020.1.1` + - [(#9513)](https://github.com/microsoft/vcpkg/pull/9513) [wpilib] update to 2020.1.1 + +- check `0.13.0-1` -> `0.13.0-2` + - [(#9510)](https://github.com/microsoft/vcpkg/pull/9510) [check/gettimeofday] Move static libraries to manual-link + +- gettimeofday `2017-10-14-2` -> `2017-10-14-3` + - [(#9510)](https://github.com/microsoft/vcpkg/pull/9510) [check/gettimeofday] Move static libraries to manual-link + +- magic-enum `0.6.3-1` -> `0.6.4` + - [(#9502)](https://github.com/microsoft/vcpkg/pull/9502) [magic-enum] Update to v0.6.4 + +- simdjson `2019-08-05` -> `2019-12-27` + - [(#9484)](https://github.com/microsoft/vcpkg/pull/9484) [simdjson] Update library + +- cpp-httplib `0.4.2` -> `0.5.1` + - [(#9480)](https://github.com/microsoft/vcpkg/pull/9480) [cpp-httplib] Update library to 0.5.1 + +- blend2d `beta_2019-10-09` -> `beta_2019-12-27` + - [(#9448)](https://github.com/microsoft/vcpkg/pull/9448) [blend2d] Update to beta_2019-12-27 + +- parallelstl `20190522-1` -> `20191218` + - [(#9443)](https://github.com/microsoft/vcpkg/pull/9443) [parallelstl] Update to latest version and fix find_package unable to find ParallelSTLConfig.cmake + +- sdl2pp `0.16.0-1` -> `0.16.0-2` + - [(#9428)](https://github.com/microsoft/vcpkg/pull/9428) [sdl2pp] Fix find dependencies + +- basisu `1.11-2` -> `1.11-3` + - [(#9425)](https://github.com/microsoft/vcpkg/pull/9425) [basisu] update from upstream repository, add support for pvrtc2 + +- devil `1.8.0-4` -> `1.8.0-5` + - [(#9341)](https://github.com/microsoft/vcpkg/pull/9341) [devil] fix OpenEXR not found + +- sdl1 `1.2.15-8` -> `1.2.15-9` + - [(#9301)](https://github.com/microsoft/vcpkg/pull/9301) [sdl1] Add build support for ARM64 Windows 10 + - [(#9207)](https://github.com/microsoft/vcpkg/pull/9207) [sdl1]Change build method to vcpkg_*_make + +- qt5-base `5.12.5-7` -> `5.12.5-8` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- qt5-imageformats `5.12.5-1` -> `5.12.5-2` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- qt5-tools `5.12.5-2` -> `5.12.5-3` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + +- qt5-xmlpatterns `5.12.5` -> `5.12.5-1` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + +- vtk `8.2.0-9` -> `8.2.0-10` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + - [(#9219)](https://github.com/microsoft/vcpkg/pull/9219) [vtk] fix VTKConfig.cmake path + +- libevent `2.1.11-2` -> `2.1.11-4` + - [(#9292)](https://github.com/microsoft/vcpkg/pull/9292) [libevent] Fix include headers fails on x64-windows, using CMAKE + - [(#9232)](https://github.com/microsoft/vcpkg/pull/9232) [libevent] remove dependency of default feature + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- pdal `1.7.1-6` -> `1.7.1-8` + - [(#9308)](https://github.com/microsoft/vcpkg/pull/9308) [pdal] fix static build + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- xsimd `7.2.5` -> `7.4.5` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- xtensor-blas `0.16.1` -> `0.17.1` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- xtensor-io `0.7.0` -> `0.9.0` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- xtensor `0.20.8` -> `0.21.2` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- xtl `0.6.5` -> `0.6.10` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- freeimage `3.18.0-7` -> `3.18.0-8` + - [(#8707)](https://github.com/microsoft/vcpkg/pull/8707) [freeimage libraw] Fix case issue on Linux + +- libraw `201903-2` -> `201903-3` + - [(#8707)](https://github.com/microsoft/vcpkg/pull/8707) [freeimage libraw] Fix case issue on Linux + +- cgl `0.60.2-1` -> `0.60.2-2` + - [(#8807)](https://github.com/microsoft/vcpkg/pull/8807) [cgl] Fix cgl cannot be found + +- nanovg `2019-8-30-1` -> `2019-8-30-3` + - [(#8813)](https://github.com/microsoft/vcpkg/pull/8813) [nanovg] Add dependency port stb + +- hdf5 `1.10.5-8` -> `1.10.5-9` + - [(#9043)](https://github.com/microsoft/vcpkg/pull/9043) [hdf5] Fix static builds when building dynamic builds + - [(#9413)](https://github.com/microsoft/vcpkg/pull/9413) [HDF5] Correct SZIP linkage, modernize portfile + +- cgicc `3.2.19-3` -> `3.2.19-4` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + - [(#8558)](https://github.com/microsoft/vcpkg/pull/8558) [cgicc]Fix usage error:lnk2019. + +- gsl `2.4-4` -> `2.4-5` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + +- libidn2 `2.2.0` -> `2.2.0-1` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + +- libmicrohttpd `0.9.63-1` -> `0.9.63-2` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + +- libosip2 `5.1.0-1` -> `5.1.0-3` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + - [(#9602)](https://github.com/microsoft/vcpkg/pull/9602) [vcpkg] Fix build type in vcpkg_build_make.cmake [x264] Modernize + +- libiconv `1.15-6` -> `1.16-1` + - [(#9229)](https://github.com/microsoft/vcpkg/pull/9229) [libiconv] Make built libraries relocatable + +- bullet3 `2.88-1` -> `2.89` + - [(#9098)](https://github.com/microsoft/vcpkg/pull/9098) [bullet3] Install CMake toolchain files and targets + - [(#9663)](https://github.com/microsoft/vcpkg/pull/9663) [bullet3] Update to 2.89 + +- fmt `6.0.0` -> `6.0.0-1` + - [(#9121)](https://github.com/microsoft/vcpkg/pull/9121) [fmt] Disable warning C4189 on Visual Studio 2015 + +- otl `4.0.448` -> `4.0.451` + - [(#9107)](https://github.com/microsoft/vcpkg/pull/9107) [otl] Fix header file name and version number + - [(#9579)](https://github.com/microsoft/vcpkg/pull/9579) [otl libaaplus forge] Fix build issues + - [(#9552)](https://github.com/microsoft/vcpkg/pull/9552) [otl] Update to version 4.0.451 + +- liblzma `5.2.4-2` -> `5.2.4-3` + - [(#9192)](https://github.com/microsoft/vcpkg/pull/9192) [liblzma] Stop exporting HAVE_CONFIG_H + +- glib `2.52.3-14-4` -> `2.52.3-14-5` + - [(#9054)](https://github.com/microsoft/vcpkg/pull/9054) [glib] Install msvc_recommended_pragmas.h to /installed/include + +- curl `7.66.0-1` -> `7.68.0` + - [(#8973)](https://github.com/microsoft/vcpkg/pull/8973) [curl] Disable export of Curl::curl targets when building 'tool' feature + - [(#9589)](https://github.com/microsoft/vcpkg/pull/9589) [curl] Update to 7.68.0 + +- forge `1.0.4-1` -> `1.0.4-2` + - [(#9579)](https://github.com/microsoft/vcpkg/pull/9579) [otl libaaplus forge] Fix build issues + +- reproc `9.0.0` -> `10.0.3` + - [(#9544)](https://github.com/microsoft/vcpkg/pull/9544) [reproc] Update to v10.0.3. + +- cpp-netlib `0.13.0-2` -> `0.13.0-3` + - [(#9537)](https://github.com/microsoft/vcpkg/pull/9537) [cpp-netlib] Fix cmake path, add homepage + +- proj4 `6.2.1-1` -> `6.3.0-1` + - [(#9437)](https://github.com/microsoft/vcpkg/pull/9437) [sqlite3] Rename sqlite3 tool as sqlite3.exe + - [(#9573)](https://github.com/microsoft/vcpkg/pull/9573) [proj4] Update to version 6.3.0 + +- sqlite3 `3.30.1-1` -> `3.30.1-2` + - [(#9437)](https://github.com/microsoft/vcpkg/pull/9437) [sqlite3] Rename sqlite3 tool as sqlite3.exe + +- msix `MsixCoreInstaller-preview-1` -> `1.7` + - [(#8934)](https://github.com/microsoft/vcpkg/pull/8934) [msix] Update to 1.7 + +- xmsh `0.4.1` -> `0.5.2` + - [(#7155)](https://github.com/microsoft/vcpkg/pull/7155) [xmsh]Upgrade version to 0.5.2 and fix build failure. + +- opencolorio `1.1.1` -> `1.1.1-2` + - [(#8920)](https://github.com/microsoft/vcpkg/pull/8920) [opencolorio] Modify find python2 to find python3 + - [(#9755)](https://github.com/microsoft/vcpkg/pull/9755) [opencolorio] fix lcms dependency + +- graphicsmagick `1.3.33-1` -> `1.3.34` + - [(#9596)](https://github.com/microsoft/vcpkg/pull/9596) [graphicsmagick] Updated to GraphicsMagick-1.3.34 + +- openal-soft `1.19.1-2` -> `1.20.0` + - [(#9583)](https://github.com/microsoft/vcpkg/pull/9583) [openal-soft] Update OpenAL Soft to 1.20.0 + +- google-cloud-cpp `0.15.0` -> `0.17.0` + - [(#9576)](https://github.com/microsoft/vcpkg/pull/9576) [google-cloud-cpp] Upgrade to v0.17.0 + +- openmvs `1.0-3` -> `1.0.1` + - [(#9563)](https://github.com/microsoft/vcpkg/pull/9563) [openmvs] Update to 1.0.1 + +- ixwebsocket `7.4.0` -> `7.9.2` + - [(#9397)](https://github.com/microsoft/vcpkg/pull/9397) [ixwebsocket] update to 7.6.3 + +- azure-kinect-sensor-sdk `1.4.0-alpha.0` -> `1.4.0-alpha.0-2` + - [(#9458)](https://github.com/microsoft/vcpkg/pull/9458) [azure-kinect-sensor-sdk] Remove feature test and fix static build in Windows + - [(#9763)](https://github.com/microsoft/vcpkg/pull/9763) [azure-kinect-sensor-sdk] Fix *.dll install path + +- netcdf-c `4.7.0-5` -> `4.7.3-1` + - [(#9361)](https://github.com/microsoft/vcpkg/pull/9361) [netcdf-c] Update to 4.7.3 and switched to use targets to generate valid targets + - [(#9721)](https://github.com/microsoft/vcpkg/pull/9721) [netcdf-c] Fix builds with hdf5[parallel] + +- realsense2 `2.22.0-2` -> `2.30.0` + - [(#9220)](https://github.com/microsoft/vcpkg/pull/9220) [realsense2] update to 2.30 + +- libplist `1.2.77` -> `1.2.137` + - [(#8936)](https://github.com/microsoft/vcpkg/pull/8936) [libplist] Update to 1.2.137 + +- ismrmrd `1.4.0-1` -> `1.4.1` + - [(#8880)](https://github.com/microsoft/vcpkg/pull/8880) [ismrmrd] Update to 1.4.1 + +- caf `0.16.3` -> `0.17.2` + - [(#8888)](https://github.com/microsoft/vcpkg/pull/8888) [caf] Update to 0.17.2 + +- openmvg `1.4-6` -> `1.4-7` + - [(#8824)](https://github.com/microsoft/vcpkg/pull/8824) [openmvg]Fix path in openmvg-config.cmake. + +- qhull `7.3.2-1` -> `7.3.2-2` + - [(#9651)](https://github.com/microsoft/vcpkg/pull/9651) [qhull] Fix Mac support + +- cppmicroservices `4.0.0-pre1` -> `v3.4.0` + - [(#9600)](https://github.com/microsoft/vcpkg/pull/9600) Update baseline to fix osx failure + +- libguarded `2019-08-27` -> `2019-08-27-1` + - [(#9600)](https://github.com/microsoft/vcpkg/pull/9600) Update baseline to fix osx failure + +- sfgui `0.4.0-2` -> `0.4.0-3` + - [(#9625)](https://github.com/microsoft/vcpkg/pull/9625) [sfgui] fix sfgui on macOS + +- azure-storage-cpp `7.0.0` -> `7.1.0-1` + - [(#9646)](https://github.com/microsoft/vcpkg/pull/9646) [azure-storage-cpp]Upgrade to 7.1.0 + - [(#9852)](https://github.com/microsoft/vcpkg/pull/9852) [azure-storage-cpp] Azure storage only requires gettext on OSX + +- ace `6.5.7` -> `6.5.7-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9016)](https://github.com/microsoft/vcpkg/pull/9016) [ace] Let `ssl` feature able to work on Linux when selected + +- freerdp `2.0.0-rc4-3` -> `2.0.0-rc4-4` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- freetds `1.1.6-1` -> `1.1.17` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- libmysql `8.0.4-4` -> `8.0.4-5` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- libpq `9.6.3` -> `12.0` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- librtmp `2019-11-11` -> `2019-11-11_1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- libssh `0.7.6-1` -> `0.9.0` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- libwebsockets `3.2.0` -> `3.2.2` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9734)](https://github.com/microsoft/vcpkg/pull/9734) [libwebsockets] Update to v3.2.2 + +- mosquitto `1.6.7` -> `1.6.7-2` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9754)](https://github.com/microsoft/vcpkg/pull/9754) [mosquitto] Install mosquittopp.lib to dest + +- nmap `7.70-1` -> `7.70-4` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- openssl-unix `1.0.2s-1` -> `1.1.1d-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- openssl-uwp `1.0.2r-1` -> `1.1.1d-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- openssl-windows `1.0.2s-2` -> `1.1.1d-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- qt5-graphicaleffects `5.12.5` -> `5.12.5-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- quickfix `1.15.1-1` -> `1.15.1-3` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- slikenet `2019-10-22` -> `2019-10-22_1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- xmlsec `1.2.29` -> `1.2.29-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- yara `3.10.0` -> `3.10.0-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- x264 `157-303c484ec828ed0-6` -> `157-303c484ec828ed0-7` + - [(#9602)](https://github.com/microsoft/vcpkg/pull/9602) [vcpkg] Fix build type in vcpkg_build_make.cmake [x264] Modernize + +- glfw3 `3.3-3` -> `3.3.1` + - [(#9626)](https://github.com/microsoft/vcpkg/pull/9626) [glfw3] Update to 3.3.1 + +- glad `0.1.31` -> `0.1.33` + - [(#9627)](https://github.com/microsoft/vcpkg/pull/9627) [glad] Update to 0.1.33 + +- libxml2 `2.9.9-4` -> `2.9.9-5` + - [(#9636)](https://github.com/microsoft/vcpkg/pull/9636) [libxml2] Apply fixes also to the target of libxml2. + - [(#9492)](https://github.com/microsoft/vcpkg/pull/9492) [libxml2] Embed resources in Windows-based shared library (#9474) + +- gettext `0.19-11` -> `0.19-13` + - [(#9610)](https://github.com/microsoft/vcpkg/pull/9610) [gettext] Add dependency on iconv + - [(#9797)](https://github.com/microsoft/vcpkg/pull/9797) [gettext] fix library placement on macOS + +- xlnt `1.3.0-2` -> `1.4.0` + - [(#9609)](https://github.com/microsoft/vcpkg/pull/9609) [xlnt] Upgrade to v1.4.0 + +- cpr `1.3.0-7` -> `1.3.0-8` + - [(#9567)](https://github.com/microsoft/vcpkg/pull/9567) [cpr] Add find_dependency to cprConfig.cmake + +- sfml `2.5.1-4` -> `2.5.1-6` + - [(#9190)](https://github.com/microsoft/vcpkg/pull/9190) [sfml] Declare Windows library export + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- libtorrent `1.2.2` -> `1.2.2-1` + - [(#7345)](https://github.com/microsoft/vcpkg/pull/7345) [libtorrent] Fix linkage issues for dynamic builds + +- libffi `3.1-6` -> `3.1-7` + - [(#8895)](https://github.com/microsoft/vcpkg/pull/8895) [libffi] Add libffiConfigVersion.cmake file + +- plplot `5.13.0-3` -> `5.13.0-4` + - [(#8817)](https://github.com/microsoft/vcpkg/pull/8817) [plplot] Fix static build issue + +- libpqxx `6.4.5` -> `6.4.5-1` + - [(#9051)](https://github.com/microsoft/vcpkg/pull/9051) [libpqxx] Fix lib name on Linux + +- freeglut `3.0.0-7` -> `3.0.0-9` + - [(#9155)](https://github.com/microsoft/vcpkg/pull/9155) [glui] Add new port + - [(#9725)](https://github.com/microsoft/vcpkg/pull/9725) [freeglut] Patch header correctly + - [(#9745)](https://github.com/microsoft/vcpkg/pull/9745) [freeglut] check whether debug/release is enabled before moving files + +- ffmpeg `4.2-2` -> `4.2-4` + - [(#9695)](https://github.com/microsoft/vcpkg/pull/9695) [ffmpeg] fix openssl detection + - [(#9718)](https://github.com/microsoft/vcpkg/pull/9718) [ffmpeg] fix link order + +- catch2 `2.11.0` -> `2.11.1` + - [(#9685)](https://github.com/microsoft/vcpkg/pull/9685) [catch2] Update to 2.11.1 + +- boost-accumulators `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-algorithm `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-align `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-any `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-array `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-asio `1.71.0-1` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-assert `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-assign `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-atomic `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-beast `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-bimap `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-bind `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-build `1.70.0-1` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-callable-traits `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-chrono `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-circular-buffer `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-compatibility `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-compute `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-concept-check `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-config `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-container-hash `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-container `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-context `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-contract `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-conversion `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-convert `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-core `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-coroutine `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-coroutine2 `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-crc `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-date-time `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-detail `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-disjoint-sets `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-dll `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-dynamic-bitset `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-endian `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-exception `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-fiber `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-filesystem `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-flyweight `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-foreach `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-format `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-function-types `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-function `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-functional `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-fusion `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-geometry `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-gil `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-graph-parallel `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-graph `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- embree3 `3.6.1` -> `3.6.1-1` + - [(#9555)](https://github.com/microsoft/vcpkg/pull/9555) [embree3] added cleanup command to embree3 port for static build + +- libarchive `3.4.0-2` -> `3.4.1` + - [(#9676)](https://github.com/microsoft/vcpkg/pull/9676) [libarchive] Update to 3.4.1 + +- tinyfiledialogs `3.3.8-1` -> `3.4.3` + - [(#9630)](https://github.com/microsoft/vcpkg/pull/9630) [tinyfiledialogs] Fix tinyfiledialogs not being fetchable from sourceforge + +- tesseract `4.1.0-4` -> `4.1.1` + - [(#9629)](https://github.com/microsoft/vcpkg/pull/9629) [tesseract] port update to 4.1.1 release + +- glm `0.9.9.5-3` -> `0.9.9.7` + - [(#9621)](https://github.com/microsoft/vcpkg/pull/9621) [glm] Updated to 0.9.9.7 + +- google-cloud-cpp-spanner `0.3.0` -> `0.5.0` + - [(#9611)](https://github.com/microsoft/vcpkg/pull/9611) [google-cloud-cpp-spanner] Upgrade to the v0.5.0 release. + +- scintilla `4.1.2` -> `4.2.3` + - [(#9591)](https://github.com/microsoft/vcpkg/pull/9591) [scintilla] Update to 4.2.3 + +- ppconsul `0.4` -> `0.5` + - [(#9752)](https://github.com/microsoft/vcpkg/pull/9752) [ppconsul] Add missing boost dependencies + - [(#9713)](https://github.com/microsoft/vcpkg/pull/9713) [ppconsul] Upgrade to latest version + +- boost-signals `1.68.0` -> `1.68.0-1` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- gtest `2019-10-09` -> `2019-10-09-1` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- pcl `1.9.1-9` -> `1.9.1-10` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- soil2 `release-1.11` -> `release-1.11-1` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- tmxparser `2.1.0-2` -> `2.1.0-3` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- xerces-c `3.2.2-11` -> `3.2.2-13` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + - [(#9702)](https://github.com/microsoft/vcpkg/pull/9702) [xerces-c] fixed issue #9654 + +- openssl `1` -> `1.1.1d` + - [(#9777)](https://github.com/microsoft/vcpkg/pull/9777) [openssl] Update the version + +- open62541 `0.3.0-4` -> `1.0` + - [(#9767)](https://github.com/microsoft/vcpkg/pull/9767) [open62541] Update to v1.0 + +- monkeys-audio `4.8.3-1` -> `5.14` + - [(#9760)](https://github.com/microsoft/vcpkg/pull/9760) [monkeys-audio] Update to 5.14, add feature tools + +- hpx `1.3.0-2` -> `1.4.0-1` + - [(#9773)](https://github.com/microsoft/vcpkg/pull/9773) Updating HPX to V1.4 + +- paho-mqtt `1.3.0-1` -> `1.3.0-2` + - [(#9753)](https://github.com/microsoft/vcpkg/pull/9753) [paho-mqtt] Fix Windows platform predefined macros + +- alembic `1.7.11-6` -> `1.7.12` + - [(#9737)](https://github.com/microsoft/vcpkg/pull/9737) Update Alembic version to 1.7.12 + +- libudns `0.4` -> `0.4-1` + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- luajit `2.0.5-2` -> `2.0.5-3` + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + - [(#9782)](https://github.com/microsoft/vcpkg/pull/9782) [luajit] Copy tool dependencies + +- pfring `2019-10-17` -> `2019-10-17-1` + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- tcl `8.6.10-2` -> `8.6.10-3` + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- asmjit `2019-07-11` -> `2020-01-20` + - [(#9770)](https://github.com/microsoft/vcpkg/pull/9770) [asmjit] update to current version + +- so5extra `1.3.1.1` -> `1.4.0` + - [(#9732)](https://github.com/microsoft/vcpkg/pull/9732) [sobjectizer][so5extra] updates to 5.7.0 and 1.4.0 + +- sobjectizer `5.6.1-1` -> `5.7.0` + - [(#9732)](https://github.com/microsoft/vcpkg/pull/9732) [sobjectizer][so5extra] updates to 5.7.0 and 1.4.0 + +- string-theory `2.3` -> `3.1` + - [(#9690)](https://github.com/microsoft/vcpkg/pull/9690) [string_theory] Update to 3.0 + - [(#9833)](https://github.com/microsoft/vcpkg/pull/9833) [string_theory] Update to 3.1 + +- anyrpc `2017-12-01-1` -> `2020-01-13-1` + - [(#9682)](https://github.com/microsoft/vcpkg/pull/9682) [anyrpc] Updated to latest commit + +- jasper `2.0.16-2` -> `2.0.16-3` + - [(#9680)](https://github.com/microsoft/vcpkg/pull/9680) [jasper] freeglut is not a dependency in macOS + +- cryptopp `8.2.0` -> `8.2.0-1` + - [(#9633)](https://github.com/microsoft/vcpkg/pull/9633) [cryptopp] Fixed build error on ARM32/ARM64 Windows + +- angle `2019-07-19-4` -> `2019-12-31` + - [(#9557)](https://github.com/microsoft/vcpkg/pull/9557) [angle] Update to 2019-12-31 + +- pbc `0.5.14-1` -> `0.5.14-2` + - [(#9281)](https://github.com/microsoft/vcpkg/pull/9281) [pbc] Correct non Windows build + +- fizz `2019.10.28.00` -> `2020.01.20.00` + - [(#9779)](https://github.com/microsoft/vcpkg/pull/9779) [fizz] Update to latest version + +- hyperscan `5.0.1-2` -> `5.1.0-3` + - [(#9618)](https://github.com/microsoft/vcpkg/pull/9618) [hyperscan] Update the portfile to remove debug/share file + +- coroutine `1.4.3` -> `2020-01-13` + - [(#9624)](https://github.com/microsoft/vcpkg/pull/9624) [ms-gsl] Update to v2.1.0, the "end of 2019 snapshot" + +- ms-gsl `2019-07-11` -> `2.1.0` + - [(#9624)](https://github.com/microsoft/vcpkg/pull/9624) [ms-gsl] Update to v2.1.0, the "end of 2019 snapshot" + +- ftgl `2.4.0-1` -> `2.4.0-2` + - [(#9521)](https://github.com/microsoft/vcpkg/pull/9521) [ftgl] Fix build failure #9520 + +- sdl2-mixer `2.0.4-7` -> `2.0.4-8` + - [(#9332)](https://github.com/microsoft/vcpkg/pull/9332) [sdl2-mixer] Fix dynamic loading when building static library + +- sdl2-gfx `1.0.4-4` -> `1.0.4-5` + - [(#9314)](https://github.com/microsoft/vcpkg/pull/9314) [sdl2-gfx] Fixed build error ARM64 Windows 10 + +- restclient-cpp `0.5.1-2` -> `0.5.1-3` + - [(#9487)](https://github.com/microsoft/vcpkg/pull/9487) [restclient-cpp]: correct the way to remove debug/include + +- jsoncpp `1.9.1` -> `1.9.2` + - [(#9759)](https://github.com/microsoft/vcpkg/pull/9759) [Jsoncpp] Update to 1.9.2 + +- loguru `v2.0.0` -> `v2.1.0` + - [(#8682)](https://github.com/microsoft/vcpkg/pull/8682) [loguru] Update to 2.1.0 and extend to generate proper binary on non-windows + +- gsl-lite `0.34.0` -> `0.36.0` + - [(#9827)](https://github.com/microsoft/vcpkg/pull/9827) [gsl-lite] Update to version 0.36.0 + +- telnetpp `2.0-2` -> `2.0-3` + - [(#9827)](https://github.com/microsoft/vcpkg/pull/9827) [gsl-lite] Update to version 0.36.0 + +- cgal `5.0` -> `5.0.1` + - [(#9831)](https://github.com/microsoft/vcpkg/pull/9831) [cgal] Upgrade to 5.0.1 + +- avro-c `1.8.2-3` -> `1.8.2-4` + - [(#9808)](https://github.com/microsoft/vcpkg/pull/9808) [avro-c] enable Snappy codec + +- pango `1.40.11-5` -> `1.40.11-6` + - [(#9801)](https://github.com/microsoft/vcpkg/pull/9801) [pango] fix macOS dynamic library + +- eigen3 `3.3.7-3` -> `3.3.7-4` + - [(#9821)](https://github.com/microsoft/vcpkg/pull/9821) Update eigen3's portfile to use new gitlab repo + +- aws-c-common `0.4.1` -> `0.4.15` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- aws-c-event-stream `0.1.1` -> `0.1.4` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- aws-checksums `0.1.3` -> `0.1.5` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- aws-lambda-cpp `0.1.0-2` -> `0.2.4` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- aws-sdk-cpp `1.7.142-1` -> `1.7.214` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- azure-c-shared-utility `2019-10-07.2-1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-iot-sdk-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-macro-utils-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-uamqp-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-uhttp-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-umqtt-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- umock-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +
+ +-- vcpkg team vcpkg@microsoft.com THU, 05 Jan 15:00:00 -0800 + +vcpkg (2019.12.31) +--- +#### Total port count: 1268 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1181| +|x86-windows|1166| +|x64-windows-static|1087| +|**x64-linux**|1000| +|**x64-osx**|920| +|arm64-windows|795| +|x64-uwp|642| +|arm-uwp|615| + +#### The following documentation has been updated: +- [PR Review Checklist](docs/maintainers/pr-review-checklist.md) ***[NEW]*** + - [(#9264)](https://github.com/microsoft/vcpkg/pull/9264) [vcpkg] Initialize PR review checklist +- [vcpkg_install_qmake](docs/maintainers/vcpkg_install_qmake.md) ***[NEW]*** + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [CONTROL Files](docs/maintainers/control-files.md) + - [(#9140)](https://github.com/microsoft/vcpkg/pull/9140) [docs] Fix CONTROL file default-features section header +- [Portfile Functions](docs/maintainers/portfile-functions.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_build_nmake](docs/maintainers/vcpkg_build_nmake.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_common_definitions](docs/maintainers/vcpkg_common_definitions.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_configure_make](docs/maintainers/vcpkg_configure_make.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_download_distfile](docs/maintainers/vcpkg_download_distfile.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_extract_source_archive_ex](docs/maintainers/vcpkg_extract_source_archive_ex.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_find_acquire_program](docs/maintainers/vcpkg_find_acquire_program.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_install_nmake](docs/maintainers/vcpkg_install_nmake.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +#### The following changes have been made to vcpkg's infrastructure: +- [(#9160)](https://github.com/microsoft/vcpkg/pull/9160) [ffmpeg] Fixed build error ARM64 Windows 10 +- [(#9199)](https://github.com/microsoft/vcpkg/pull/9199) [vcpkg] Add November changelog +- [(#9203)](https://github.com/microsoft/vcpkg/pull/9203) [vcpkg] Check in baseline results for CI builds +- [(#9191)](https://github.com/microsoft/vcpkg/pull/9191) [vcpkg] Give hints for yasm with brew and apt +- [(#9242)](https://github.com/microsoft/vcpkg/pull/9242) [libxslt] Fix writing to locations outside vcpkg in Windows builds +- [(#9279)](https://github.com/microsoft/vcpkg/pull/9279) Removed umock-c:64-windows-static result in baseline +- [(#9280)](https://github.com/microsoft/vcpkg/pull/9280) [vcpkg] Add pull request template +- [(#9331)](https://github.com/microsoft/vcpkg/pull/9331) Update baseline to skip ogre conflicts +- [(#9349)](https://github.com/microsoft/vcpkg/pull/9349) Update baseline with 'leptonica:arm-uwp=fail' +- [(#9277)](https://github.com/microsoft/vcpkg/pull/9277) [brynet] Update to 1.0.5 +- [(#9330)](https://github.com/microsoft/vcpkg/pull/9330) [simpleini] Fix build failure on travis CI +- [(#9313)](https://github.com/microsoft/vcpkg/pull/9313) [opendnp3] Add new port +- [(#9255)](https://github.com/microsoft/vcpkg/pull/9255) [OpenEXR] add missing underscore for OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES +- [(#9252)](https://github.com/microsoft/vcpkg/pull/9252) [rttr] Add dependency rapidjson +- [(#8533)](https://github.com/microsoft/vcpkg/pull/8533) Fix CMAKE_TRY_COMPILE_PLATFORM_VARIABLES +- [(#9382)](https://github.com/microsoft/vcpkg/pull/9382) [directxtk12] Update to dec2019 release +- [(#9383)](https://github.com/microsoft/vcpkg/pull/9383) [directxtex] Update to dec2019 release +- [(#9384)](https://github.com/microsoft/vcpkg/pull/9384) [directxmesh] Update to dec2019 release +- [(#9381)](https://github.com/microsoft/vcpkg/pull/9381) [directxtk] Update to dec2019 release +- [(#9287)](https://github.com/microsoft/vcpkg/pull/9287) Removed unused template function. +- [(#9411)](https://github.com/microsoft/vcpkg/pull/9411) [vcpkg-baseline] Fixes for vtk, libarchive, xalan-c, and openvpn3 on Linux +- [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [(#9388)](https://github.com/microsoft/vcpkg/pull/9388) [hiredis] Support building static +- [(#8624)](https://github.com/microsoft/vcpkg/pull/8624) [protobuf-c]Add new port. +- [(#9389)](https://github.com/microsoft/vcpkg/pull/9389) Remove vtk:x64-linux result in baseline + +
+The following 8 ports have been added: + +|port|version| +|---|---| +|[proxywrapper](https://github.com/microsoft/vcpkg/pull/8916)| 1.0.0 +|[opendnp3](https://github.com/microsoft/vcpkg/pull/9313)| 2.3.2 +|[function2](https://github.com/microsoft/vcpkg/pull/9246)| 4.0.0 +|[protobuf-c](https://github.com/microsoft/vcpkg/pull/8624)| 1.3.2 +|[indicators](https://github.com/microsoft/vcpkg/pull/9315)| 1.5 +|[proxygen](https://github.com/microsoft/vcpkg/pull/8766)| 2019.10.21.00 +|[azure-kinect-sensor-sdk](https://github.com/microsoft/vcpkg/pull/8786)| 1.4.0-alpha.0 +|[xtensor-fftw](https://github.com/microsoft/vcpkg/pull/9159)| 2019-11-30 +
+ +
+The following 72 ports have been updated: + +- restinio `0.6.1` -> `0.6.2` + - [(#9174)](https://github.com/microsoft/vcpkg/pull/9174) [restinio] Update to v.0.6.1.1. + - [(#9293)](https://github.com/microsoft/vcpkg/pull/9293) [restinio] update to 0.6.2 + +- pixman `0.38.0-4` -> `0.38.4-1` + - [(#9170)](https://github.com/microsoft/vcpkg/pull/9170) [pixman] Update to version 0.38.4 + +- cjson `1.7.12` -> `2019-11-30` + - [(#9157)](https://github.com/microsoft/vcpkg/pull/9157) [cjson] Update to 2019-11-30 + +- parallel-hashmap `1.24` -> `1.27` + - [(#9152)](https://github.com/microsoft/vcpkg/pull/9152) [parallel-hashmap] Update to 1.27 + +- jsoncons `0.139.0` -> `0.140.0` + - [(#9124)](https://github.com/microsoft/vcpkg/pull/9124) [jsoncons] Update to v0.140.0 + +- boost-modular-build-helper `1.71.0` -> `1.71.0-1` + - [(#9108)](https://github.com/microsoft/vcpkg/pull/9108) [boost-modular-build-helper] put quotes around the directory + +- protobuf `3.10.0` -> `3.11.2` + - [(#9131)](https://github.com/microsoft/vcpkg/pull/9131) [protobuf] Update protobuf to 3.11.0 + - [(#9271)](https://github.com/microsoft/vcpkg/pull/9271) [protobuf] Update to 3.11.2 + +- ecsutil `1.0.7.3` -> `1.0.7.8` + - [(#8885)](https://github.com/microsoft/vcpkg/pull/8885) [ecsuti] Update to v1.0.7.8 + +- libmodman `2.0.1` -> `2.0.1-1` + - [(#8916)](https://github.com/microsoft/vcpkg/pull/8916) [proxywrapper] Add new port + +- libproxy `0.4.15` -> `0.4.15-1` + - [(#8916)](https://github.com/microsoft/vcpkg/pull/8916) [proxywrapper] Add new port + +- xalan-c `1.11-9` -> `1.11-11` + - [(#9203)](https://github.com/microsoft/vcpkg/pull/9203) [vcpkg] Check in baseline results for CI builds + - [(#9411)](https://github.com/microsoft/vcpkg/pull/9411) [vcpkg-baseline] Fixes for vtk, libarchive, xalan-c, and openvpn3 on Linux + +- libxslt `1.1.33-5` -> `1.1.33-6` + - [(#9242)](https://github.com/microsoft/vcpkg/pull/9242) [libxslt] Fix writing to locations outside vcpkg in Windows builds + +- azure-c-shared-utility `2019-10-07.2` -> `2019-10-07.2-1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-iot-sdk-c `2019-11-21.1` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-macro-utils-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-uamqp-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-uhttp-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-umqtt-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- umock-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- python3 `3.7.4` -> `3.7.3` + - [(#9173)](https://github.com/microsoft/vcpkg/pull/9173) [python3] Fix CONTROL Version + +- brynet `1.0.3` -> `1.0.5` + - [(#9277)](https://github.com/microsoft/vcpkg/pull/9277) [brynet] Update to 1.0.5 + +- cpp-httplib `0.2.5` -> `0.4.2` + - [(#9360)](https://github.com/microsoft/vcpkg/pull/9360) [cpp-httplib] Update library to 0.4.2 + +- botan `2.12.1` -> `2.12.1-1` + - [(#9335)](https://github.com/microsoft/vcpkg/pull/9335) [botan] Fix unrecognized compile flag MT/MD + +- simpleini `2018-08-31-2` -> `2018-08-31-3` + - [(#9330)](https://github.com/microsoft/vcpkg/pull/9330) [simpleini] Fix build failure on travis CI + +- libpcap `1.9.0` -> `1.9.1` + - [(#9329)](https://github.com/microsoft/vcpkg/pull/9329) [libpcap] update portfile for cmake build and bump version to 1.9.1 + +- live555 `latest` -> `latest-1` + - [(#9303)](https://github.com/microsoft/vcpkg/pull/9303) [live555] Fix live555:x86-windows-static build failure + +- usockets `0.3.1` -> `0.3.4` + - [(#9278)](https://github.com/microsoft/vcpkg/pull/9278) [usockets] update to 0.3.4 + +- uwebsockets `0.15.7` -> `0.16.5` + - [(#9276)](https://github.com/microsoft/vcpkg/pull/9276) [uwebsockets] update to 0.16.5 + +- check `0.13.0` -> `0.13.0-1` + - [(#9267)](https://github.com/microsoft/vcpkg/pull/9267) [check] Fix library cannot be found + +- tesseract `4.1.0-3` -> `4.1.0-4` + - [(#9266)](https://github.com/microsoft/vcpkg/pull/9266) [tesseract] Fix feature name and build error + +- libharu `2017-08-15-8` -> `2017-08-15-9` + - [(#9261)](https://github.com/microsoft/vcpkg/pull/9261) [libharu] Remove symbols also exported from tiff (as a default feature) + +- alembic `1.7.11-5` -> `1.7.11-6` + - [(#9255)](https://github.com/microsoft/vcpkg/pull/9255) [OpenEXR] add missing underscore for OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES + +- openexr `2.3.0-4` -> `2.3.0-5` + - [(#9255)](https://github.com/microsoft/vcpkg/pull/9255) [OpenEXR] add missing underscore for OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES + +- xeus `0.20.0` -> `0.20.0-1` + - [(#9254)](https://github.com/microsoft/vcpkg/pull/9254) [xeus] Fix build error with Visual Studio 2019 + +- libpq `9.6.1-8` -> `9.6.3` + - [(#9253)](https://github.com/microsoft/vcpkg/pull/9253) [libpq] Fix version mismatch between CONTROL and portfile + +- rttr `0.9.6-1` -> `0.9.6-2` + - [(#9252)](https://github.com/microsoft/vcpkg/pull/9252) [rttr] Add dependency rapidjson + +- proj4 `6.2.0-1` -> `6.2.1-1` + - [(#9227)](https://github.com/microsoft/vcpkg/pull/9227) [proj4] Update to version 6.2.1; disable exporting symbols for static libraries + +- geotrans `3.7` -> `3.7-1` + - [(#9217)](https://github.com/microsoft/vcpkg/pull/9217) [geotrans] Add macro LITTLE_ENDIAN + +- mongoose `6.15-1` -> `6.15-2` + - [(#9209)](https://github.com/microsoft/vcpkg/pull/9209) [mongoose] Add feature ssl + +- ecm `5.60.0-1` -> `5.60.0-2` + - [(#9210)](https://github.com/microsoft/vcpkg/pull/9210) [ecm] Add usage to fix printing error messages + +- tbb `2019_U8-2` -> `2019_U8-3` + - [(#9188)](https://github.com/microsoft/vcpkg/pull/9188) [tbb] Set fatal build tool requirements for UNIX + +- libqglviewer `2.7.0-2` -> `2.7.2-2` + - [(#9186)](https://github.com/microsoft/vcpkg/pull/9186) [libqglviewer] update to 2.7.2 + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- nanodbc `2.12.4-4` -> `2.12.4-5` + - [(#9185)](https://github.com/microsoft/vcpkg/pull/9185) [nanodbc] Set NANODBC_ENABLE_UNICODE to OFF + +- libevent `2.1.11-1` -> `2.1.11-2` + - [(#9101)](https://github.com/microsoft/vcpkg/pull/9101) [libevent] Add thread as default feature + +- directxtk12 `oct2019` -> `dec2019` + - [(#9382)](https://github.com/microsoft/vcpkg/pull/9382) [directxtk12] Update to dec2019 release + +- directxtex `oct2019` -> `dec2019` + - [(#9383)](https://github.com/microsoft/vcpkg/pull/9383) [directxtex] Update to dec2019 release + +- directxmesh `aug2019` -> `dec2019` + - [(#9384)](https://github.com/microsoft/vcpkg/pull/9384) [directxmesh] Update to dec2019 release + +- directxtk `oct2019` -> `dec2019` + - [(#9381)](https://github.com/microsoft/vcpkg/pull/9381) [directxtk] Update to dec2019 release + +- nano-signal-slot `2018-08-25-1` -> `2.0.1` + - [(#9376)](https://github.com/microsoft/vcpkg/pull/9376) [nano-signal-slot] Update to latest version + +- libarchive `3.4.0-1` -> `3.4.0-2` + - [(#9411)](https://github.com/microsoft/vcpkg/pull/9411) [vcpkg-baseline] Fixes for vtk, libarchive, xalan-c, and openvpn3 on Linux + +- openvpn3 `3.4.1` -> `3.4.1-1` + - [(#9411)](https://github.com/microsoft/vcpkg/pull/9411) [vcpkg-baseline] Fixes for vtk, libarchive, xalan-c, and openvpn3 on Linux + +- ffmpeg `4.2-1` -> `4.2-2` + - [(#9405)](https://github.com/microsoft/vcpkg/pull/9405) [ffmpeg] portfile: fix typo Relase->Release + - [(#9090)](https://github.com/microsoft/vcpkg/pull/9090) [ffmpeg] install correct copyright file and enable (L)GPLv3 builds + +- entt `3.1.1` -> `3.2.2` + - [(#9409)](https://github.com/microsoft/vcpkg/pull/9409) [entt] Upgrade library to 3.2.2 + +- doctest `2.3.5` -> `2.3.6` + - [(#9403)](https://github.com/microsoft/vcpkg/pull/9403) [doctest] Update library to 2.3.6 + +- qcustomplot `2.0.1-1` -> `2.0.1-3` + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- qscintilla `2.10-9` -> `2.10-11` + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- qt5-base `5.12.5-3` -> `5.12.5-7` + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- qwt `6.1.3-8` -> `6.1.3-10` + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- hiredis `2019-11-1` -> `2019-11-2` + - [(#9388)](https://github.com/microsoft/vcpkg/pull/9388) [hiredis] Support building static + +- argparse `2.0.1` -> `2.1` + - [(#9291)](https://github.com/microsoft/vcpkg/pull/9291) [argparse] Upgrade to v2.1 + +- angle `2019-07-19-3` -> `2019-07-19-4` + - [(#7923)](https://github.com/microsoft/vcpkg/pull/7923) [angle]Fix windows build error: cannot find definition far. + +- libwebp `1.0.2-7` -> `1.0.2-8` + - [(#9300)](https://github.com/microsoft/vcpkg/pull/9300) [libwebp] Fixed build error ARM64 Windows 10 + +- libpng `1.6.37-5` -> `1.6.37-6` + - [(#9198)](https://github.com/microsoft/vcpkg/pull/9198) [libpng] Strong cleanup of the port + +- libgit2 `0.28.3` -> `0.28.4` + - [(#9270)](https://github.com/microsoft/vcpkg/pull/9270) [libgit2] Update to 0.28.4 + +- embree3 `3.5.2-3` -> `3.6.1` + - [(#9073)](https://github.com/microsoft/vcpkg/pull/9073) [embree3] Update to version 3.6.1 + +- pmdk `1.7` -> `1.7-1` + - [(#9094)](https://github.com/microsoft/vcpkg/pull/9094) [pmdk] Remove non-ascii charactor + +- fftwpp `2.05` -> `2019-12-19` + - [(#9169)](https://github.com/microsoft/vcpkg/pull/9169) [fftwpp] Update to latest commit + +- freerdp `2.0.0-rc4-2` -> `2.0.0-rc4-3` + - [(#9176)](https://github.com/microsoft/vcpkg/pull/9176) [freerdp] Fix linux build, add dependency port glib + +- abseil `2019-05-08-1` -> `2019-12-19` + - [(#9367)](https://github.com/microsoft/vcpkg/pull/9367) [abseil] Update to the latest and fix link failure error using StrCat + +- sdl2-gfx `1.0.4-2` -> `1.0.4-4` + - [(#9319)](https://github.com/microsoft/vcpkg/pull/9319) [sdl2-gfx] Update CMake build and find_package support + +- io2d `2019-07-11-1` -> `2019-07-11-2` + - [(#8935)](https://github.com/microsoft/vcpkg/pull/8935) [io2d] Fix link to target "Cairo::Cairo" error + +- vtk `8.2.0-9` -> `8.2.0-10` + - [(#9389)](https://github.com/microsoft/vcpkg/pull/9389) Remove vtk:x64-linux result in baseline + +
+ +-- vcpkg team vcpkg@microsoft.com TUE, 09 Jan 05:45:00 -0800 + +vcpkg (2019.11.30) +--- +#### Total port count: 1262 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1182| +|x86-windows|1163| +|x64-windows-static|1094| +|**x64-linux**|1021| +|**x64-osx**|984| +|arm64-windows|782| +|x64-uwp|646| +|arm-uwp|614| + +#### The following commands and options have been updated: +- `export` + - `--x-chocolatey` ***[NEW OPTION]*** : Experimental option to export a port as a `chocolatey` package + - [(#6891)](https://github.com/microsoft/vcpkg/pull/6891) [feature] add `vcpkg export --x-chocolatey` support + +#### The following documentation has been updated: +- [vcpkg_from_github](docs/maintainers/vcpkg_from_github.md) + - [(#5719)](https://github.com/microsoft/vcpkg/pull/5719) [vcpkg_from_github] Allow targeting Github Enterprise instances +- [Privacy and Vcpkg](docs/about/privacy.md) + - [(#9080)](https://github.com/microsoft/vcpkg/pull/9080) [vcpkg] update telemetry + +#### The following additional changes have been made to vcpkg's infrastructure: +- [(#8853)](https://github.com/microsoft/vcpkg/pull/8853) Add October changelog +- [(#8894)](https://github.com/microsoft/vcpkg/pull/8894) Update README.md +- [(#8976)](https://github.com/microsoft/vcpkg/pull/8976) [libusb] upgrade and support arm64-windows +- [(#8924)](https://github.com/microsoft/vcpkg/pull/8924) [vcpkg] Remove libc++fs link dependency for clang/libc++ 9.* +- [(#7598)](https://github.com/microsoft/vcpkg/pull/7598) [vcpkg] QoL: add host specific path separator to common definitions +- [(#8941)](https://github.com/microsoft/vcpkg/pull/8941) [docs] Add the gcc+=7 prerequisite to the README +- [(#5719)](https://github.com/microsoft/vcpkg/pull/5719) [vcpkg_from_github] Allow targeting Github Enterprise instances +- [(#9080)](https://github.com/microsoft/vcpkg/pull/9080) [vcpkg] update telemetry + +
+The following 12 ports have been added: + +|port|version| +|---|---| +|[ogre-next](https://github.com/microsoft/vcpkg/pull/8677)| 2019-10-20 +|[hiredis](https://github.com/microsoft/vcpkg/pull/8843)[#8862](https://github.com/microsoft/vcpkg/pull/8862) | 2019-11-1 +|[cspice](https://github.com/microsoft/vcpkg/pull/8859)| 66-1 +|[ecos](https://github.com/microsoft/vcpkg/pull/9019)| 2.0.7 +|[redis-plus-plus](https://github.com/microsoft/vcpkg/pull/8846)| 1.1.1 +|[nanoflann](https://github.com/microsoft/vcpkg/pull/8962)| 1.3.1 +|[wxchartdir](https://github.com/microsoft/vcpkg/pull/7914)| 1.0.0 +|[faad2](https://github.com/microsoft/vcpkg/pull/9003)| 2.9.1-1 +|[pfring](https://github.com/microsoft/vcpkg/pull/8648)| 2019-10-17 +|[libmodman](https://github.com/microsoft/vcpkg/pull/8931)| 2.0.1 +|[libproxy](https://github.com/microsoft/vcpkg/pull/8931)| 0.4.15 +|[google-cloud-cpp-spanner](https://github.com/microsoft/vcpkg/pull/9096)| 0.3.0 +
+ +
+The following 67 ports have been updated: + +- tbb `2019_U8-1` -> `2019_U8-2` + - [(#8744)](https://github.com/microsoft/vcpkg/pull/8744) tbb: Fix compilation on OSX + +- openvpn3 `2018-03-21-1` -> `3.4.1` + - [(#8851)](https://github.com/microsoft/vcpkg/pull/8851) openvpn3: bump version + +- sqlpp11 `0.58-2` -> `0.58-3` + - [(#8837)](https://github.com/microsoft/vcpkg/pull/8837) [sqlpp11] fixed ddl2cpp path + +- jsonnet `0.13.0` -> `0.14.0` + - [(#8848)](https://github.com/microsoft/vcpkg/pull/8848) [jsonnet]Upgrade to 0.14.0. + +- pango `1.40.11-4` -> `1.40.11-5` + - [(#8745)](https://github.com/microsoft/vcpkg/pull/8745) [pango] Add missing link library + +- opencv3 `3.4.7-2` -> `3.4.8` + - [(#8623)](https://github.com/microsoft/vcpkg/pull/8623) [opencv3] Upgrade to version 3.4.8 + - [(#8911)](https://github.com/microsoft/vcpkg/pull/8911) Revert "[opencv3] Upgrade to version 3.4.8" + +- boost-modular-build-helper `1.70.0-2` -> `1.71.0` + - [(#8606)](https://github.com/microsoft/vcpkg/pull/8606) [boost-modular-build-helper] Update to 1.71. + +- libxslt `1.1.33-4` -> `1.1.33-5` + - [(#9014)](https://github.com/microsoft/vcpkg/pull/9014) Prevent python3 build failure + +- python3 `3.7.3` -> `3.7.4` + - [(#9014)](https://github.com/microsoft/vcpkg/pull/9014) Prevent python3 build failure + +- orc `1.5.6-1` -> `1.5.7` + - [(#8980)](https://github.com/microsoft/vcpkg/pull/8980) [orc]Upgrade to 1.5.7, disable tzdata test. + +- openvdb `6.1.0` -> `6.2.1` + - [(#8979)](https://github.com/microsoft/vcpkg/pull/8979) [openvdb]Upgrade to 6.2.1 + +- libusb `1.0.22-4` -> `1.0.23` + - [(#8976)](https://github.com/microsoft/vcpkg/pull/8976) [libusb] upgrade and support arm64-windows + +- libmad `0.15.1-4` -> `0.15.1-5` + - [(#8959)](https://github.com/microsoft/vcpkg/pull/8959) [libmad] Fix libmad header for non-x86 MSVC targets + +- wil `2019-07-16` -> `2019-11-07` + - [(#8948)](https://github.com/microsoft/vcpkg/pull/8948) Update WIL port + +- botan `2.11.0` -> `2.12.1` + - [(#8844)](https://github.com/microsoft/vcpkg/pull/8844) [botan]Upgrade to 2.12.1 + +- libbson `1.14.0-3` -> `1.15.1-1` + - [(#8790)](https://github.com/microsoft/vcpkg/pull/8790) [libbson][mongo-c-driver] Update to 1.15.1. Parse CONTROL file for version number + +- mongo-c-driver `1.14.0-5` -> `1.15.1-1` + - [(#8790)](https://github.com/microsoft/vcpkg/pull/8790) [libbson][mongo-c-driver] Update to 1.15.1. Parse CONTROL file for version number + +- libpopt `1.16-11` -> `1.16-12` + - [(#8652)](https://github.com/microsoft/vcpkg/pull/8652) [libpopt]Fix linux build. + +- libpng `1.6.37-4` -> `1.6.37-5` + - [(#8622)](https://github.com/microsoft/vcpkg/pull/8622) [lipng/libpng-apng]Remove port libpng-apng and add apng as a feature with libpng. + - [(#8716)](https://github.com/microsoft/vcpkg/pull/8716) [libpng] Fix CMake targets + +- evpp `0.7.0-1` -> `0.7.0-2` + - [(#8349)](https://github.com/microsoft/vcpkg/pull/8349) [libevent] add features + +- libevent `2.1.11` -> `2.1.11-1` + - [(#8349)](https://github.com/microsoft/vcpkg/pull/8349) [libevent] add features + +- restinio `0.6.0.1` -> `0.6.1` + - [(#8993)](https://github.com/microsoft/vcpkg/pull/8993) [restinio] Update to v.0.6.1 + +- google-cloud-cpp-common `0.15.0` -> `0.16.0-1` + - [(#8986)](https://github.com/microsoft/vcpkg/pull/8986) [google-cloud-cpp*] Update to 0.16.0 + - [(#9097)](https://github.com/microsoft/vcpkg/pull/9097) [google-cloud-cpp-common] Add test feature + +- google-cloud-cpp `0.14.0-1` -> `0.15.0` + - [(#8986)](https://github.com/microsoft/vcpkg/pull/8986) [google-cloud-cpp*] Update to 0.16.0 + +- freetype-gl `2019-03-29-2` -> `2019-03-29-3` + - [(#8992)](https://github.com/microsoft/vcpkg/pull/8992) [freetype-gl] Fix POST_BUILD_CHECKS_FAILED failure on Unix + +- tinyobjloader `1.0.7-1` -> `2.0.0-rc2` + - [(#8955)](https://github.com/microsoft/vcpkg/pull/8955) [tinyobjloader] Update to 2.0.0-rc2; Add feature to enable double precision + +- libzip `rel-1-5-2` -> `rel-1-5-2--1` + - [(#8918)](https://github.com/microsoft/vcpkg/pull/8918) [libzip] Fix patch not applying + +- tgui `0.8.5` -> `0.8.6` + - [(#8877)](https://github.com/microsoft/vcpkg/pull/8877) [tgui]Update to 0.8.6 + +- jsoncons `0.136.1` -> `0.139.0` + - [(#9058)](https://github.com/microsoft/vcpkg/pull/9058) [jsoncons] Update to v0.139.0 + +- azure-iot-sdk-c `2019-10-11.2` -> `2019-11-21.1` + - [(#9059)](https://github.com/microsoft/vcpkg/pull/9059) [azure-iot-sdk-c] Update public-preview feature to branch with fixed telemetry + +- tiff `4.0.10-7` -> `4.0.10-8` + - [(#9010)](https://github.com/microsoft/vcpkg/pull/9010) [tiff] Make BUILD_TOOLS option a feature + +- magic-enum `0.6.3` -> `0.6.3-1` + - [(#9007)](https://github.com/microsoft/vcpkg/pull/9007) [magic-enum] Fix export config.cmake issue + +- libflac `1.3.2-6` -> `1.3.3` + - [(#8988)](https://github.com/microsoft/vcpkg/pull/8988) [libflac] Update libflac to 1.3.3 + +- otl `4.0.447` -> `4.0.448` + - [(#8937)](https://github.com/microsoft/vcpkg/pull/8937) [otl] Upgrade to version 4.0.448 + +- librtmp `2.4-2` -> `2019-11-11` + - [(#8958)](https://github.com/microsoft/vcpkg/pull/8958) use latest librtmp + +- stlab `1.4.1-1` -> `1.5.1` + - [(#8901)](https://github.com/microsoft/vcpkg/pull/8901) [stlab] Update to 1.5.1 + +- bitsery `5.0.0` -> `5.0.1-1` + - [(#8892)](https://github.com/microsoft/vcpkg/pull/8892) [bitsery] Update to 5.0.1 + +- cereal `1.2.2-2` -> `1.3.0` + - [(#8913)](https://github.com/microsoft/vcpkg/pull/8913) [cereal] Update to 1.3.0 + +- fizz `2019.07.08.00` -> `2019.10.28.00` + - [(#8765)](https://github.com/microsoft/vcpkg/pull/8765) [folly/fizz]Upgrade version. + +- folly `2019.06.17.00` -> `2019.10.21.00` + - [(#8765)](https://github.com/microsoft/vcpkg/pull/8765) [folly/fizz]Upgrade version. + +- qt5-base `5.12.5-1` -> `5.12.5-3` + - [(#8793)](https://github.com/microsoft/vcpkg/pull/8793) [qt5] Modify qtdeploy to include qtquickshapes + - [(#8932)](https://github.com/microsoft/vcpkg/pull/8932) [qt5-base] Add option to link to OpenSSL at compile-time + +- nlohmann-json `3.7.0` -> `3.7.3` + - [(#9069)](https://github.com/microsoft/vcpkg/pull/9069) [nlohmann-json] Upgrade to 3.7.3 + +- json-dto `0.2.8-2` -> `0.2.9.2` + - [(#9057)](https://github.com/microsoft/vcpkg/pull/9057) [json-dto] Update to v0.2.9; Switch repo; Fix license installation + - [(#9083)](https://github.com/microsoft/vcpkg/pull/9083) [json_dto] Update to v.0.2.9.2 + +- prometheus-cpp `0.7.0` -> `0.8.0` + - [(#9047)](https://github.com/microsoft/vcpkg/pull/9047) [prometheus-cpp] Update to version 0.8.0 + +- date `2019-09-09` -> `2019-11-08` + - [(#9006)](https://github.com/microsoft/vcpkg/pull/9006) [date] Update to 2019-11-08 + +- netcdf-cxx4 `4.3.0-5` -> `4.3.1` + - [(#8978)](https://github.com/microsoft/vcpkg/pull/8978) [netcdf-cxx4] Update to 4.3.1 + +- libsodium `1.0.18-1` -> `1.0.18-2` + - [(#8974)](https://github.com/microsoft/vcpkg/pull/8974) [libsodium] Fix CPU feature not properly detected on Linux + +- cgal `4.14-3` -> `5.0` + - [(#8659)](https://github.com/microsoft/vcpkg/pull/8659) [cgal][openmvs] CGAL: Upgrade to 5.0 + +- openmvs `1.0-2` -> `1.0-3` + - [(#8659)](https://github.com/microsoft/vcpkg/pull/8659) [cgal][openmvs] CGAL: Upgrade to 5.0 + +- ace `6.5.6` -> `6.5.7` + - [(#9074)](https://github.com/microsoft/vcpkg/pull/9074) [ace] Upgrade to 6.5.7 + +- libmspack `0.10.1-2` -> `0.10.1-3` + - [(#8966)](https://github.com/microsoft/vcpkg/pull/8966) [libmspack] Fix several missing imports + +- mdnsresponder `765.30.11-1` -> `765.30.11-2` + - [(#8953)](https://github.com/microsoft/vcpkg/pull/8953) [mdnsresponder] Fix build with dynamic CRT + +- detours `4.0.1` -> `4.0.1-1` + - [(#8854)](https://github.com/microsoft/vcpkg/pull/8854) [detours] Update for vcpkg_build_nmake + +- curlpp `2018-06-15-1` -> `2018-06-15-2` + - [(#9065)](https://github.com/microsoft/vcpkg/pull/9065) [curlpp] Restore installing vcpkg-cmake-wrapper script + +- portaudio `2019-09-30` -> `2019-11-5` + - [(#8944)](https://github.com/microsoft/vcpkg/pull/8944) [portaudio] Fix library cannot be found + +- wt `4.0.5-1` -> `4.1.1` + - [(#8903)](https://github.com/microsoft/vcpkg/pull/8903) [wt] Update to 4.1.1 + +- z3 `4.8.5-1` -> `4.8.6` + - [(#8899)](https://github.com/microsoft/vcpkg/pull/8899) [z3] Update to 4.8.6 + +- pdcurses `3.8-1` -> `3.8-2` + - [(#9042)](https://github.com/microsoft/vcpkg/pull/9042) [pdcurses] Fix linkage error + +- angle `2019-07-19-2` -> `2019-07-19-3` + - [(#8785)](https://github.com/microsoft/vcpkg/pull/8785) [angle] Add option /bigobj to compiler + +- argparse `1.9` -> `2.0.1` + - [(#9088)](https://github.com/microsoft/vcpkg/pull/9088) [argparse] Update library to 2.0.1 + +- catch2 `2.10.1-1` -> `2.11.0` + - [(#9089)](https://github.com/microsoft/vcpkg/pull/9089) [catch2] Update library to 2.11.0 + +- magnum-plugins `2019.10` -> `2019.10-1` + - [(#8939)](https://github.com/microsoft/vcpkg/pull/8939) [magnum-plugins] Fix basisimporter/basisimageconverter features + +- spdlog `1.3.1-2` -> `1.4.2` + - [(#8779)](https://github.com/microsoft/vcpkg/pull/8779) [spdlog]Update to 1.4.2 + +- assimp `5.0.0-1` -> `5.0.0-2` + - [(#9075)](https://github.com/microsoft/vcpkg/pull/9075) [minizip, assimp] Export minizip CMake targets; Add minizip as assimp dependency + +- minizip `1.2.11-5` -> `1.2.11-6` + - [(#9075)](https://github.com/microsoft/vcpkg/pull/9075) [minizip, assimp] Export minizip CMake targets; Add minizip as assimp dependency + +- ixwebsocket `6.1.0` -> `7.4.0` + - [(#9099)](https://github.com/microsoft/vcpkg/pull/9099) [ixwebsocket] Update to 7.4.0 + +- ppconsul `0.3-1` -> `0.4` + - [(#9104)](https://github.com/microsoft/vcpkg/pull/9104) [ppconsul] Update to 0.4 + +
+ +-- vcpkg team vcpkg@microsoft.com TUE, 03 Dec 14:30:00 -0800 + +vcpkg (2019.10.31) +--- +#### Total port count: 1250 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1169| +|x86-windows|1154| +|x64-windows-static|1080| +|**x64-linux**|1014| +|**x64-osx**|976| +|arm64-windows|774| +|x64-uwp|638| +|arm-uwp|608| + +#### The following commands and options have been updated: +- `create` + - Port template updated with best practices, new CMake variables, `CONTROL` homepage field and example feature entries, links to relevant documentation, and maintainer function usage examples + - [(#8427)](https://github.com/microsoft/vcpkg/pull/8427) Update vcpkg create template + - [(#8488)](https://github.com/microsoft/vcpkg/pull/8488) update templates. + +#### The following documentation has been updated: +- [vcpkg_fixup_cmake_targets](docs/maintainers/cmake_fixup_cmake_targets.md) ***[NEW]*** + - [(#8365)](https://github.com/microsoft/vcpkg/pull/8365) [Documentation] Added documentation page for vcpkg_fixup_cmake_targets.cmake + - [(#8424)](https://github.com/microsoft/vcpkg/pull/8424) [Documentation] Update and rename cmake_fixup_cmake_targets.md to vcpkg_fixup_cmake_t… +- [vcpkg_build_make](docs/maintainers/vcpkg_build_make.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake +- [vcpkg_build_nmake](docs/maintainers/vcpkg_build_nmake.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8589)](https://github.com/microsoft/vcpkg/pull/8589) [libxslt]Using vcpkg_install_nmake in Windows, support unix. +- [vcpkg_configure_make](docs/maintainers/vcpkg_configure_make.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8647)](https://github.com/microsoft/vcpkg/pull/8647) support SKIP_CONFIGURE in vcpkg_configure_make. +- [vcpkg_install_make](docs/maintainers/vcpkg_install_make.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake +- [vcpkg_install_nmake](docs/maintainers/vcpkg_install_nmake.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8589)](https://github.com/microsoft/vcpkg/pull/8589) [libxslt]Using vcpkg_install_nmake in Windows, support unix. +- [Chinese README](README_zh_CN.md) ***[NEW]*** + - [(#8476)](https://github.com/microsoft/vcpkg/pull/8476) Add Chinese readme. +- [Portfile Helper Functions](docs/maintainers/portfile-functions.md) + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#8720)](https://github.com/microsoft/vcpkg/pull/8720) maintainer-guide.md - Fix link + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- New maintainer `portfile.cmake` helper functions for finer control over configuring/building/installing with `make` and `nmake` + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8540)](https://github.com/microsoft/vcpkg/pull/8540) Fix separate make and install execution error issue. + - [(#8589)](https://github.com/microsoft/vcpkg/pull/8589) [libxslt]Using vcpkg_install_nmake in Windows, support unix. + - [(#8610)](https://github.com/microsoft/vcpkg/pull/8610) Add AUTOCONF support with vcpkg_configure_make in Windows. + - [(#8647)](https://github.com/microsoft/vcpkg/pull/8647) support SKIP_CONFIGURE in vcpkg_configure_make. +- Support for the `go` compiler in `vcpkg_find_acquire_program` + - [(#8440)](https://github.com/microsoft/vcpkg/pull/8440) Add go to vcpkg_find_acquire_program + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#8365)](https://github.com/microsoft/vcpkg/pull/8365) [Documentation] Added documentation page for vcpkg_fixup_cmake_targets.cmake +- [(#8418)](https://github.com/microsoft/vcpkg/pull/8418) Add September changelog +- [(#8435)](https://github.com/microsoft/vcpkg/pull/8435) Find default for text/plain on Linux and Windows (#567) +- [(#8489)](https://github.com/microsoft/vcpkg/pull/8489) Fix option -j +- [(#8580)](https://github.com/microsoft/vcpkg/pull/8580) Fix CMake checks for Apple Clang 11.0 on macOS 10.15 +- [(#8638)](https://github.com/microsoft/vcpkg/pull/8638) Fix compile error in Visual Studio 2017 15.1 +- [(#8669)](https://github.com/microsoft/vcpkg/pull/8669) [vcpkg_download_distfile.cmake] Fix Examples +- [(#8667)](https://github.com/microsoft/vcpkg/pull/8667) vcpkg_configure_meson - Remove compiler flag /Oi +- [(#8639)](https://github.com/microsoft/vcpkg/pull/8639) mesonbuild - Update to 0.52.0 + +
+The following 24 ports have been added: + +|port|version| +|---|---| +|[cpp-base64](https://github.com/microsoft/vcpkg/pull/8368)| 2019-06-19 +|[mgnlibs](https://github.com/microsoft/vcpkg/pull/8390)| 2019-09-29 +|[mmx](https://github.com/microsoft/vcpkg/pull/8384)| 2019-09-29 +|[kcp](https://github.com/microsoft/vcpkg/pull/8278)| 2019-09-20 +|[dbow3](https://github.com/microsoft/vcpkg/pull/8547)| 1.0.0 +|[nlohmann-fifo-map](https://github.com/microsoft/vcpkg/pull/8458)| 2018.05.07 +|[libcrafter](https://github.com/microsoft/vcpkg/pull/8568)| 0.3 +|[libudns](https://github.com/microsoft/vcpkg/pull/8572)| 0.4 +|[ffnvcodec](https://github.com/microsoft/vcpkg/pull/8559)| 9.1.23.0 +|[bfgroup-lyra](https://github.com/microsoft/vcpkg/pull/8612)| 1.1 +|[google-cloud-cpp-common](https://github.com/microsoft/vcpkg/pull/8735)| 0.15.0 +|[libsrt](https://github.com/microsoft/vcpkg/pull/8712)| 1.3.4 +|[polyhook2](https://github.com/microsoft/vcpkg/pull/8719)| 2019-10-24 +|[tool-meson](https://github.com/microsoft/vcpkg/pull/8639)| 0.52.0 +|[slikenet](https://github.com/microsoft/vcpkg/pull/8693)| 2019-10-22 +|[libigl](https://github.com/microsoft/vcpkg/pull/8607)| 2.1.0-1 +|[libmesh](https://github.com/microsoft/vcpkg/pull/8592)| 1.5.0 +|[upb](https://github.com/microsoft/vcpkg/pull/8681)| 2019-10-21 +|[opencensus-cpp](https://github.com/microsoft/vcpkg/pull/8740)| 0.4.0 +|[openscap](https://github.com/microsoft/vcpkg/pull/8654)| 1.3.1 +|[fftwpp](https://github.com/microsoft/vcpkg/pull/8625)| 2.05 +|[ois](https://github.com/microsoft/vcpkg/pull/8507)| 1.5 +|[libdivide](https://github.com/microsoft/vcpkg/pull/8320)| 3.0 +|[wordnet](https://github.com/microsoft/vcpkg/pull/8816)| 3.0 +
+ +
+The following 151 ports have been updated: + +- kangaru `4.2.0` -> `4.2.1` + - [(#8414)](https://github.com/microsoft/vcpkg/pull/8414) [kangaru] Update library to 4.2.1 + +- magic-enum `0.6.0` -> `0.6.3` + - [(#8431)](https://github.com/microsoft/vcpkg/pull/8431) [magic_enum] Update to 0.6.1. Add HEAD_REF + - [(#8500)](https://github.com/microsoft/vcpkg/pull/8500) [magic-enum] Update to 0.6.2 + - [(#8656)](https://github.com/microsoft/vcpkg/pull/8656) [magic-enum] Update to 0.6.3 + +- json5-parser `1.0.0` -> `1.0.0-1` + - [(#8401)](https://github.com/microsoft/vcpkg/pull/8401) [json5-parser] fix find_package issue + +- reproc `8.0.1` -> `9.0.0` + - [(#8411)](https://github.com/microsoft/vcpkg/pull/8411) Update reproc to 9.0.0. + +- libfabric `1.8.0` -> `1.8.1` + - [(#8415)](https://github.com/microsoft/vcpkg/pull/8415) [libfabric] Update library to 1.8.1 + +- thrift `2019-05-07-3` -> `2019-05-07-4` + - [(#8410)](https://github.com/microsoft/vcpkg/pull/8410) [thrift]fix-paths + +- grpc `1.23.0` -> `1.23.1-1` + - [(#8438)](https://github.com/microsoft/vcpkg/pull/8438) [grpc] Update grpc to 1.23.1 + - [(#8737)](https://github.com/microsoft/vcpkg/pull/8737) [grpc]Fix build failure in Linux: duplicate function gettid. + +- protobuf `3.9.1` -> `3.10.0` + - [(#8439)](https://github.com/microsoft/vcpkg/pull/8439) [protobuf] Update protobuf to 3.10.0 + +- google-cloud-cpp `0.13.0` -> `0.14.0` + - [(#8441)](https://github.com/microsoft/vcpkg/pull/8441) [google-cloud-cpp] Update to v0.14.0 + +- nrf-ble-driver `4.1.1` -> `4.1.1-1` + - [(#8437)](https://github.com/microsoft/vcpkg/pull/8437) [nrf-ble-driver] Fix version number + +- plplot `5.13.0-2` -> `5.13.0-3` + - [(#8405)](https://github.com/microsoft/vcpkg/pull/8405) fix find_package(wxWidgets) issue in release build + +- freexl `1.0.4-2` -> `1.0.4-8` + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8489)](https://github.com/microsoft/vcpkg/pull/8489) Fix option -j + - [(#8540)](https://github.com/microsoft/vcpkg/pull/8540) Fix separate make and install execution error issue. + +- libosip2 `5.1.0` -> `5.1.0-1` + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + +- x264 `157-303c484ec828ed0-2` -> `157-303c484ec828ed0-6` + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8489)](https://github.com/microsoft/vcpkg/pull/8489) Fix option -j + - [(#8540)](https://github.com/microsoft/vcpkg/pull/8540) Fix separate make and install execution error issue. + +- qt5-tools `5.12.5-1` -> `5.12.5-2` + - [(#8373)](https://github.com/microsoft/vcpkg/pull/8373) [qt5-tools] change control file so activeqt isn't a dependency on non windows + +- metis `5.1.0-5` -> `5.1.0-6` + - [(#8376)](https://github.com/microsoft/vcpkg/pull/8376) [metis][suitesparse] add metisConfig.cmake + +- suitesparse `5.4.0-3` -> `5.4.0-4` + - [(#8376)](https://github.com/microsoft/vcpkg/pull/8376) [metis][suitesparse] add metisConfig.cmake + +- activemq-cpp `3.9.5` -> `3.9.5-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- alac-decoder `0.2-1` -> `0.2-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- angelscript `2.33.1-1` -> `2.34.0` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + - [(#8520)](https://github.com/microsoft/vcpkg/pull/8520) [angelscript] Upgrade to version 2.34.0 + +- anyrpc `2017-12-01` -> `2017-12-01-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- apr-util `1.6.0-3` -> `1.6.0-5` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- apr `1.6.5-2` -> `1.6.5-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- argtable2 `2.13-2` -> `2.13-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- atk `2.24.0-4` -> `2.24.0-5` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- atkmm `2.24.2-1` -> `2.24.2-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- aubio `0.4.9` -> `0.4.9-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- azure-c-shared-utility `2019-08-20.1` -> `2019-10-07.2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- berkeleydb `4.8.30-2` -> `4.8.30-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- bigint `2010.04.30-3` -> `2010.04.30-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- blaze `3.6` -> `3.6-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- bond `8.1.0-2` -> `8.1.0-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- boost-di `1.1.0` -> `1.1.0-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- butteraugli `2019-05-08` -> `2019-05-08-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cairomm `1.15.3-3` -> `1.15.3-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cartographer `1.0.0-1` -> `1.0.0-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- ccd `2.1-1` -> `2.1-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- ccfits `2.5-3` -> `2.5-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cfitsio `3.410-2` -> `3.410-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- charls `2.0.0-2` -> `2.0.0-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- chmlib `0.40-3` -> `0.40-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- clblas `2.12-2` -> `2.12-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- clblast `1.5.0` -> `1.5.0-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- clfft `2.12.2-1` -> `2.12.2-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- collada-dom `2.5.0-2` -> `2.5.0-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- console-bridge `0.4.3-1` -> `0.4.3-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cppkafka `0.3.1-1` -> `0.3.1-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cppunit `1.14.0` -> `1.14.0-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cunit `2.1.3-2` -> `2.1.3-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- dlfcn-win32 `1.1.1-3` -> `1.1.1-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- dmlc `2019-08-12` -> `2019-08-12-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- duktape `2.4.0-4` -> `2.4.0-6` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + - [(#8767)](https://github.com/microsoft/vcpkg/pull/8767) [duktape] fix pip and pyyaml install issue + +- entityx `1.3.0-1` -> `1.3.0-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- epsilon `0.9.2` -> `0.9.2-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- fcl `0.5.0-6` -> `0.5.0-7` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- flint `2.5.2-3` -> `2.5.2-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- nameof `2019-07-13` -> `0.9.2` + - [(#8464)](https://github.com/microsoft/vcpkg/pull/8464) [nameof] Update to 0.9.1 + - [(#8671)](https://github.com/microsoft/vcpkg/pull/8671) [nameof] Update to 0.9.2 + +- gsl-lite `0.28.0` -> `0.34.0` + - [(#8465)](https://github.com/microsoft/vcpkg/pull/8465) [gsl-lite] Update to v0.34.0 + +- libffi `3.1-5` -> `3.1-6` + - [(#8162)](https://github.com/microsoft/vcpkg/pull/8162) [libffi] Add support for CMake config + +- mathgl `2.4.3-2` -> `2.4.3-3` + - [(#8369)](https://github.com/microsoft/vcpkg/pull/8369) [mathgl]Fix feature glut/hdf5/qt5. + +- yoga `1.14.0` -> `1.16.0-1` + - [(#8495)](https://github.com/microsoft/vcpkg/pull/8495) [yoga] Add project declaration and fix linux installation. + - [(#8630)](https://github.com/microsoft/vcpkg/pull/8630) [yoga] Update to 1.16.0 and enabled UWP builds + +- openssl-windows `1.0.2s-1` -> `1.0.2s-2` + - [(#8224)](https://github.com/microsoft/vcpkg/pull/8224) Including config file openssl.cnf in installation. + +- liblas `1.8.1-2` -> `1.8.1-3` + - [(#7920)](https://github.com/microsoft/vcpkg/pull/7920) [liblas]Fix ${_IMPORT_PREFIX} in liblas-depends-*.cmake. + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + +- azure-storage-cpp `6.1.0-2` -> `7.0.0` + - [(#8499)](https://github.com/microsoft/vcpkg/pull/8499) [azure-storage-cpp]Upgrade to 7.0.0 + +- sdl2-mixer `2.0.4-6` -> `2.0.4-7` + - [(#8496)](https://github.com/microsoft/vcpkg/pull/8496) [sdl2-mixer]Fix usage issue. + +- armadillo `2019-04-16-5` -> `2019-04-16-6` + - [(#8494)](https://github.com/microsoft/vcpkg/pull/8494) [armadillo]Fix cmake path. + +- restinio `0.6.0` -> `0.6.0.1` + - [(#8493)](https://github.com/microsoft/vcpkg/pull/8493) [restinio] updated to v.0.6.0.1 + +- ode `0.15.1-3` -> `0.16` + - [(#8485)](https://github.com/microsoft/vcpkg/pull/8485) [ode] Upgrade to 0.16 + +- itk `5.0.1-1` -> `5.0.1-2` + - [(#8501)](https://github.com/microsoft/vcpkg/pull/8501) [itk]Fix use 64 bit ids. + +- irrlicht `1.8.4-2` -> `1.8.4-4` + - [(#8505)](https://github.com/microsoft/vcpkg/pull/8505) [irrlicht] Reorder link libraries + - [(#8535)](https://github.com/microsoft/vcpkg/pull/8535) [irrlicht] do not build exisiting dependencies + +- azure-iot-sdk-c `2019-08-20.1` -> `2019-10-11.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8565)](https://github.com/microsoft/vcpkg/pull/8565) azure-iot-sdk-c for release of 2019-10-10 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- azure-macro-utils-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- azure-uamqp-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- azure-uhttp-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- azure-umqtt-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- umock-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- openxr-loader `2019-09-25` -> `1.0.3.0` + - [(#8515)](https://github.com/microsoft/vcpkg/pull/8515) [openxr-loader] Update to 1.0.3 release + latest C++ bindings header + +- gdcm `3.0.0-5` -> `3.0.3` + - [(#8522)](https://github.com/microsoft/vcpkg/pull/8522) [gdcm/libtorrent] Upgrade to new version + +- libtorrent `1.2.1-bcb26fd6` -> `1.2.2` + - [(#8522)](https://github.com/microsoft/vcpkg/pull/8522) [gdcm/libtorrent] Upgrade to new version + +- sfml `2.5.1-3` -> `2.5.1-4` + - [(#8523)](https://github.com/microsoft/vcpkg/pull/8523) [sfml]Add usage. + +- darknet `0.2.5.1` -> `0.2.5.1-1` + - [(#8527)](https://github.com/microsoft/vcpkg/pull/8527) [stb] update and add cmake module + +- stb `2019-07-11` -> `2019-08-17` + - [(#8527)](https://github.com/microsoft/vcpkg/pull/8527) [stb] update and add cmake module + +- curlpp `2018-06-15` -> `2018-06-15-1` + - [(#8532)](https://github.com/microsoft/vcpkg/pull/8532) [curlpp] fix regression introduced in #7331 + +- libjpeg-turbo `2.0.2` -> `2.0.3` + - [(#8412)](https://github.com/microsoft/vcpkg/pull/8412) [libjpeg-turbo] Update to 2.0.3. + +- opencv3 `3.4.7-1` -> `3.4.7-2` + - [(#8542)](https://github.com/microsoft/vcpkg/pull/8542) [opencv] add tesseract to fix downstream linking + +- opencv4 `4.1.1-2` -> `4.1.1-3` + - [(#8542)](https://github.com/microsoft/vcpkg/pull/8542) [opencv] add tesseract to fix downstream linking + +- gtest `2019-08-14-2` -> `2019-10-09` + - [(#8544)](https://github.com/microsoft/vcpkg/pull/8544) [gtest/pmdk] Upgrade to new version + +- pmdk `1.6-3` -> `2019-10-10` + - [(#8544)](https://github.com/microsoft/vcpkg/pull/8544) [gtest/pmdk] Upgrade to new version + - [(#8586)](https://github.com/microsoft/vcpkg/pull/8586) [pmdk] Upgrade to version 1.7 + +- imgui `1.72b` -> `1.73-1` + - [(#8504)](https://github.com/microsoft/vcpkg/pull/8504) [imgui] Update to 1.73 + - [(#8605)](https://github.com/microsoft/vcpkg/pull/8605) [imgui]Add feature example in windows. + +- sqlite3 `3.29.0-1` -> `3.30.1-1` + - [(#8567)](https://github.com/microsoft/vcpkg/pull/8567) [sqlite3] Update to 3.30.1 + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + +- ffmpeg `4.2` -> `4.2-1` + - [(#8596)](https://github.com/microsoft/vcpkg/pull/8596) [ffmpeg] Pass Vcpkg compiler and linker flags to build script + +- libyuv `fec9121` -> `fec9121-1` + - [(#8576)](https://github.com/microsoft/vcpkg/pull/8576) [libyuv] fix include header installation + - [(#8709)](https://github.com/microsoft/vcpkg/pull/8709) [libyuv] Add Mac/Linux build support + - [(#8769)](https://github.com/microsoft/vcpkg/pull/8769) [libyuv]Build corresponding type library according to BUILD_SHARED_LIBS. + +- libarchive `3.4.0` -> `3.4.0-1` + - [(#8564)](https://github.com/microsoft/vcpkg/pull/8564) Mixed release and debug build in libarchive + +- aixlog `1.2.1-1` -> `1.2.2` + - [(#8587)](https://github.com/microsoft/vcpkg/pull/8587) [aixlog] Update library to 1.2.2 + +- portaudio `19.0.6.00-5` -> `2019-09-30` + - [(#8399)](https://github.com/microsoft/vcpkg/pull/8399) [portaudio] Update to the latest version + +- chakracore `1.11.13` -> `1.11.14` + - [(#8593)](https://github.com/microsoft/vcpkg/pull/8593) [chakracore] Update library to 1.11.14 + +- embree3 `3.5.2-2` -> `3.5.2-3` + - [(#8608)](https://github.com/microsoft/vcpkg/pull/8608) [embree3]Fix generated cmake files path. + - [(#8591)](https://github.com/microsoft/vcpkg/pull/8591) [embree3]Fix EMBREE_ROOT_DIR path setting,EMBREE_LIBRARY Debug/Release path setting. + +- cpp-httplib `0.2.4` -> `0.2.5` + - [(#8590)](https://github.com/microsoft/vcpkg/pull/8590) [cpp-httplib] Update library to 0.2.5 + +- range-v3 `0.9.0-20190822` -> `0.9.1` + - [(#8583)](https://github.com/microsoft/vcpkg/pull/8583) [range-v3] Update to 0.9.1 + +- otl `4.0.443-2` -> `4.0.447` + - [(#8581)](https://github.com/microsoft/vcpkg/pull/8581) otl version 447 + +- directxtex `aug2019` -> `oct2019` + - [(#8563)](https://github.com/microsoft/vcpkg/pull/8563) [directxtk][directxtk12][directxtex][directxmesh] Fixed missing pdbs + - [(#8723)](https://github.com/microsoft/vcpkg/pull/8723) [directxtex] Update library to oct2019 + +- directxtk `aug2019` -> `oct2019` + - [(#8563)](https://github.com/microsoft/vcpkg/pull/8563) [directxtk][directxtk12][directxtex][directxmesh] Fixed missing pdbs + - [(#8724)](https://github.com/microsoft/vcpkg/pull/8724) [directxtk] Update library to oct2019 + +- directxtk12 `aug2019` -> `oct2019` + - [(#8563)](https://github.com/microsoft/vcpkg/pull/8563) [directxtk][directxtk12][directxtex][directxmesh] Fixed missing pdbs + - [(#8725)](https://github.com/microsoft/vcpkg/pull/8725) [directxtk12] Update library to oct2019 + +- vtk `8.2.0-8` -> `8.2.0-9` + - [(#8554)](https://github.com/microsoft/vcpkg/pull/8554) [vtk] Change atlmfc as feature + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + +- sdl2 `2.0.9-4` -> `2.0.10-2` + - [(#8643)](https://github.com/microsoft/vcpkg/pull/8643) [sdl2] Update to 2.0.10 + - [(#8760)](https://github.com/microsoft/vcpkg/pull/8760) Fix sdl2 build if there is space in the path + +- gdal `2.4.1-8` -> `2.4.1-9` + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + - [(#8621)](https://github.com/microsoft/vcpkg/pull/8621) [proj4] Update to version 6.2.0 + +- libgeotiff `1.4.2-9` -> `1.4.2-10` + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + +- proj4 `4.9.3-5` -> `6.2.0-1` + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + - [(#8621)](https://github.com/microsoft/vcpkg/pull/8621) [proj4] Update to version 6.2.0 + +- tcl `8.6.5` -> `8.6.10-2` + - [(#8402)](https://github.com/microsoft/vcpkg/pull/8402) [tcl]Upgrade to 8.6.9 and use vcpkg_install_make/vcpkg_install_nmake. + +- physx `4.1.1-1` -> `4.1.1-3` + - [(#8561)](https://github.com/microsoft/vcpkg/pull/8561) [physx] Added a patch to fix missing typeinfo.h header with VS16.3 and missing pdb files + - [(#8658)](https://github.com/microsoft/vcpkg/pull/8658) [physx] Added UWP support + +- celero `2.5.0-1` -> `2.6.0` + - [(#8646)](https://github.com/microsoft/vcpkg/pull/8646) [celero] Updated to v2.6.0 + +- assimp `5.0.0` -> `5.0.0-1` + - [(#8665)](https://github.com/microsoft/vcpkg/pull/8665) [assimp] Fix cmake package config + +- mosquitto `1.6.3` -> `1.6.7` + - [(#8661)](https://github.com/microsoft/vcpkg/pull/8661) [mosquitto] Update to 1.6.7 + +- plog `1.1.4` -> `1.1.5` + - [(#8685)](https://github.com/microsoft/vcpkg/pull/8685) [plog] Update to 1.1.5 + +- catch2 `2.9.2` -> `2.10.1-1` + - [(#8684)](https://github.com/microsoft/vcpkg/pull/8684) [catch2] Update to 2.10.1 + +- nano-signal-slot `commit-25aa2aa90d450d3c7550c535c7993a9e2ed0764a` -> `2018-08-25-1` + - [(#8675)](https://github.com/microsoft/vcpkg/pull/8675) [nano-signal-slot] Enable UWP and dynamic builds + +- duckx `2019-08-06` -> `1.0.0` + - [(#8673)](https://github.com/microsoft/vcpkg/pull/8673) [duckx] update library to 1.0.0 + +- jsoncons `0.136.0` -> `0.136.1` + - [(#8689)](https://github.com/microsoft/vcpkg/pull/8689) [jsoncons] Update to v.0.136.1 + +- libpmemobj-cpp `1.7` -> `1.8` + - [(#8729)](https://github.com/microsoft/vcpkg/pull/8729) [libpmemobj-cpp] Update library to 1.8 + +- forest `12.0.3` -> `12.0.4` + - [(#8727)](https://github.com/microsoft/vcpkg/pull/8727) [forest] Update library to 12.0.4 + +- check `0.12.0-2` -> `0.13.0` + - [(#8722)](https://github.com/microsoft/vcpkg/pull/8722) [check] Update library to 0.13.0 + +- libcopp `1.2.0` -> `1.2.1` + - [(#8728)](https://github.com/microsoft/vcpkg/pull/8728) [libcopp] Update library to 1.2.1 + +- corrade `2019.01-1` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- magnum-extras `2019.01-2` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- magnum-integration `2019.01-2` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- magnum-plugins `2019.01-2` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- magnum `2019.01-2` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- curl `7.66.0` -> `7.66.0-1` + - [(#8739)](https://github.com/microsoft/vcpkg/pull/8739) [curl]Fix tools depends zlib. + +- x265 `3.0-2` -> `3.2-1` + - [(#8738)](https://github.com/microsoft/vcpkg/pull/8738) update x265 to 3.2 + +- pixman `0.38.0-3` -> `0.38.0-4` + - [(#8736)](https://github.com/microsoft/vcpkg/pull/8736) [pixman] Improve Arm detection + +- xmlsec `1.2.28` -> `1.2.29` + - [(#8721)](https://github.com/microsoft/vcpkg/pull/8721) [xmlsec] Update to 1.2.29 + +- string-theory `2.2` -> `2.3` + - [(#8734)](https://github.com/microsoft/vcpkg/pull/8734) [string-theory] Update library to 2.3 + +- log4cpp `2.9.1-1` -> `2.9.1-2` + - [(#8741)](https://github.com/microsoft/vcpkg/pull/8741) [log4cpp] Fix link static library + +- so5extra `1.3.1-2` -> `1.3.1.1` + - [(#8770)](https://github.com/microsoft/vcpkg/pull/8770) [so5extra] updated to 1.3.1.1 + +- wangle `2019.07.08.00` -> `2019.07.08.00-1` + - [(#8764)](https://github.com/microsoft/vcpkg/pull/8764) [wangle]Fix config.cmake + +- fribidi `2019-02-04-1` -> `2019-02-04-2` + - [(#8639)](https://github.com/microsoft/vcpkg/pull/8639) mesonbuild - Update to 0.52.0 + +- libepoxy `1.5.3-1` -> `1.5.3-2` + - [(#8639)](https://github.com/microsoft/vcpkg/pull/8639) mesonbuild - Update to 0.52.0 + +- jxrlib `1.1-9` -> `2019.10.9` + - [(#8525)](https://github.com/microsoft/vcpkg/pull/8525) [jxrlib] Update port + +- fltk `1.3.4-8` -> `1.3.5-1` + - [(#8457)](https://github.com/microsoft/vcpkg/pull/8457) FLTK v1.3.5 + +- qt5-location `5.12.5-1` -> `5.12.5-2` + - [(#8777)](https://github.com/microsoft/vcpkg/pull/8777) [qt5-location] Modify clipper library name to avoid conflicts with vxl + +- pthreads `3.0.0-3` -> `3.0.0-4` + - [(#8651)](https://github.com/microsoft/vcpkg/pull/8651) [pthreads]Add usage. + +- glib `2.52.3-14-3` -> `2.52.3-14-4` + - [(#8653)](https://github.com/microsoft/vcpkg/pull/8653) [glib]Fix linux build. + +- libxslt `1.1.33-2` -> `1.1.33-4` + - [(#8589)](https://github.com/microsoft/vcpkg/pull/8589) [libxslt]Using vcpkg_install_nmake in Windows, support unix. + +- paho-mqtt `1.3.0` -> `1.3.0-1` + - [(#8492)](https://github.com/microsoft/vcpkg/pull/8492) Export paho-mqtt cmake targets, fix paho-mqttpp3 dependency. + +- paho-mqttpp3 `1.0.1-2` -> `1.0.1-3` + - [(#8492)](https://github.com/microsoft/vcpkg/pull/8492) Export paho-mqtt cmake targets, fix paho-mqttpp3 dependency. + +- pcre2 `10.30-5` -> `10.30-6` + - [(#8620)](https://github.com/microsoft/vcpkg/pull/8620) [pcre2]Fix uwp build failure. + +- arrow `0.14.1-1` -> `0.15.1` + - [(#8815)](https://github.com/microsoft/vcpkg/pull/8815) [Arrow] Update to Arrow 0.15.1 + +- netcdf-c `4.7.0-4` -> `4.7.0-5` + - [(#8398)](https://github.com/microsoft/vcpkg/pull/8398) [netcdf-c] Add usage + +- sol2 `3.0.3-1` -> `3.0.3-2` + - [(#8776)](https://github.com/microsoft/vcpkg/pull/8776) [sol2] Use the single header release + +- arb `2.16.0` -> `2.17.0` + - [(#8831)](https://github.com/microsoft/vcpkg/pull/8831) [arb]Upgrade to 2.17.0 + +- wxwidgets `3.1.2-2` -> `3.1.3` + - [(#8808)](https://github.com/microsoft/vcpkg/pull/8808) [wxwidgets] Upgrade to 3.1.3 + +
+ +-- vcpkg team vcpkg@microsoft.com FRI, 01 Nov 08:30:00 -0800 + +vcpkg (2019.09.30) +--- +#### Total port count: 1225 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1151| +|x86-windows|1136| +|x64-windows-static|1061| +|**x64-linux**|980| +|**x64-osx**|939| +|arm64-windows|766| +|x64-uwp|624| +|arm-uwp|594| + +#### The following commands and options have been updated: +- `x-history` ***[NEW COMMAND]*** + - Shows the full history of CONTROL version of a port, including the vcpkg commit hash, CONTROL version, and date of vcpkg commit + - [(#7377)](https://github.com/microsoft/vcpkg/pull/7377) [x-history] Prints CONTROL version history of a port 👻 + - [(#8101)](https://github.com/microsoft/vcpkg/pull/8101) fix x-history help desc. +- `depend-info` + - Constrain argument count to single port name as usage intends + - [(#8135)](https://github.com/microsoft/vcpkg/pull/8135) [vcpkg] Fix `depend-info` command arguments arity + +#### The following documentation has been updated: +- [Frequently Asked Questions](docs/about/faq.md) + - [(#8258)](https://github.com/microsoft/vcpkg/pull/8258) Add detailed instructions for custom configurations +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#8383)](https://github.com/microsoft/vcpkg/pull/8383) Fix a typo in maintainer-guide.md + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- Add port features to CI test result XML as the first step in testing them in CI system + - [(#8342)](https://github.com/microsoft/vcpkg/pull/8342) [CI system] Add features to test result xml + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#8048)](https://github.com/microsoft/vcpkg/pull/8048) Add August changelog +- [(#8082)](https://github.com/microsoft/vcpkg/pull/8082) [vcpkg] remove text from license +- [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 +- [(#7954)](https://github.com/microsoft/vcpkg/pull/7954) Fix bug in `.vcpkg-root` detection that breaks `--overlay-triplets` +- [(#8131)](https://github.com/microsoft/vcpkg/pull/8131) [vcpkg] add missing implib definitions, fix shared lib extension on mac +- [(#8129)](https://github.com/microsoft/vcpkg/pull/8129) [vcpkg] Continue on malformed paths in PATH +- [(#8200)](https://github.com/microsoft/vcpkg/pull/8200) [vcpkg] Fix missing VCPKG_ROOT_PATH in create command +- [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats +- [(#5180)](https://github.com/microsoft/vcpkg/pull/5180) Use CMAKE_TRY_COMPILE_PLATFORM_VARIABLES to propagate values +- [(#8032)](https://github.com/microsoft/vcpkg/pull/8032) [vcpkg] Avoid RENAME usage to prevent cross-device link problems (#4245) +- [(#8304)](https://github.com/microsoft/vcpkg/pull/8304) [ports.cmake] Fixup capitalization inconsistencies of Windows drive letter + +
+The following 55 ports have been added: + +|port|version| +|---|---| +|[dmlc](https://github.com/microsoft/vcpkg/pull/7549)| 2019-08-12 +|[anyrpc](https://github.com/microsoft/vcpkg/pull/7438)| 2017-12-01 +|[imgui-sfml](https://github.com/microsoft/vcpkg/pull/7429)[#8004](https://github.com/microsoft/vcpkg/pull/8004) | 2.1 +|[ignition-cmake0](https://github.com/microsoft/vcpkg/pull/7781)[#8044](https://github.com/microsoft/vcpkg/pull/8044) [#8136](https://github.com/microsoft/vcpkg/pull/8136) | 0.6.2-1 +|[ignition-math4](https://github.com/microsoft/vcpkg/pull/7781)| 4.0.0 +|[ignition-modularscripts](https://github.com/microsoft/vcpkg/pull/7781)[#8136](https://github.com/microsoft/vcpkg/pull/8136) | 2019-09-11 +|[volk](https://github.com/microsoft/vcpkg/pull/8035)[#8364](https://github.com/microsoft/vcpkg/pull/8364) | 2019-09-26 +|[cppkafka](https://github.com/microsoft/vcpkg/pull/7987)[#8073](https://github.com/microsoft/vcpkg/pull/8073) | 0.3.1-1 +|[nativefiledialog](https://github.com/microsoft/vcpkg/pull/7944)| 2019-08-28 +|[cello](https://github.com/microsoft/vcpkg/pull/7386)| 2019-07-23 +|[libhydrogen](https://github.com/microsoft/vcpkg/pull/7436)| 2019-08-11 +|[quantlib](https://github.com/microsoft/vcpkg/pull/7283)| 2019-09-02 +|[magic-get](https://github.com/microsoft/vcpkg/pull/8072)| 2019-09-02 +|[cityhash](https://github.com/microsoft/vcpkg/pull/7879)| 2013-01-08 +|[ignition-common1](https://github.com/microsoft/vcpkg/pull/8111)| 1.1.1 +|[wampcc](https://github.com/microsoft/vcpkg/pull/7929)| 2019-09-04 +|[hidapi](https://github.com/microsoft/vcpkg/pull/8113)| 2019-08-30 +|[sokol](https://github.com/microsoft/vcpkg/pull/8107)| 2019-09-09 +|[parallelstl](https://github.com/microsoft/vcpkg/pull/8039)| 20190522-1 +|[marl](https://github.com/microsoft/vcpkg/pull/8132)[#8161](https://github.com/microsoft/vcpkg/pull/8161) | 2019-09-13 +|[vectorclass](https://github.com/microsoft/vcpkg/pull/7573)| 2.00.01 +|[wren](https://github.com/microsoft/vcpkg/pull/7242)| 2019-07-01 +|[libsrtp](https://github.com/microsoft/vcpkg/pull/8046)| 2.2.0 +|[ignition-msgs1](https://github.com/microsoft/vcpkg/pull/8044)| 1.0.0 +|[ignition-transport4](https://github.com/microsoft/vcpkg/pull/8044)| 4.0.0 +|[argtable3](https://github.com/microsoft/vcpkg/pull/7815)| 2019-08-21 +|[llgl](https://github.com/microsoft/vcpkg/pull/7701)| 2019-08-15 +|[sdformat6](https://github.com/microsoft/vcpkg/pull/8137)| 6.2.0 +|[grppi](https://github.com/microsoft/vcpkg/pull/8125)| 0.4.0 +|[opencolorio](https://github.com/microsoft/vcpkg/pull/8006)| 1.1.1 +|[cpputest](https://github.com/microsoft/vcpkg/pull/8188)| 2019-9-16 +|[winreg](https://github.com/microsoft/vcpkg/pull/8190)[#8371](https://github.com/microsoft/vcpkg/pull/8371) | 1.2.1-1 +|[zfp](https://github.com/microsoft/vcpkg/pull/7955)| 0.5.5-1 +|[libyuv](https://github.com/microsoft/vcpkg/pull/7486)| fec9121 +|[foonathan-memory](https://github.com/microsoft/vcpkg/pull/7350)[#8266](https://github.com/microsoft/vcpkg/pull/8266) | 2019-07-21-1 +|[jinja2cpplight](https://github.com/microsoft/vcpkg/pull/8207)| 2018-05-08 +|[liblbfgs](https://github.com/microsoft/vcpkg/pull/8186)| 1.10 +|[sigslot](https://github.com/microsoft/vcpkg/pull/8262)| 1.0.0 +|[cute-headers](https://github.com/microsoft/vcpkg/pull/8277)| 2019-09-20 +|[libsoundio](https://github.com/microsoft/vcpkg/pull/8273)| 2.0.0 +|[matplotlib-cpp](https://github.com/microsoft/vcpkg/pull/8313)| 2019-09-24 +|[asynch](https://github.com/microsoft/vcpkg/pull/8317)[#8371](https://github.com/microsoft/vcpkg/pull/8371) | 2019-09-21-1 +|[minimp3](https://github.com/microsoft/vcpkg/pull/8319)[#8371](https://github.com/microsoft/vcpkg/pull/8371) | 2019-07-24-1 +|[crfsuite](https://github.com/microsoft/vcpkg/pull/8233)| 2019-07-21 +|[cudnn](https://github.com/microsoft/vcpkg/pull/7536)| 7.6 +|[libosip2](https://github.com/microsoft/vcpkg/pull/8261)| 5.1.0 +|[portable-snippets](https://github.com/microsoft/vcpkg/pull/7783)| 2019-09-20 +|[ignition-fuel-tools1](https://github.com/microsoft/vcpkg/pull/8136)| 1.2.0 +|[clickhouse-cpp](https://github.com/microsoft/vcpkg/pull/7880)| 2019-05-22 +|[tweeny](https://github.com/microsoft/vcpkg/pull/8341)| 3.0 +|[nanogui](https://github.com/microsoft/vcpkg/pull/8302)| 2019-09-23 +|[wepoll](https://github.com/microsoft/vcpkg/pull/8280)| 1.5.5 +|[tcl](https://github.com/microsoft/vcpkg/pull/8026)| 8.6.5 +|[cpuinfo](https://github.com/microsoft/vcpkg/pull/7449)| 2019-07-28 +|[mathc](https://github.com/microsoft/vcpkg/pull/8394)| 2019-09-29 +
+ +
+The following 220 ports have been updated: + +- breakpad `2019-07-11` -> `2019-07-11-1` + - [(#7938)](https://github.com/microsoft/vcpkg/pull/7938) [breakpad] Fix build failed with Visual Studio 2019 + +- gtest `2019-08-14-1` -> `2019-08-14-2` + - [(#7887)](https://github.com/microsoft/vcpkg/pull/7887) [gtest]Re-fix gmock target. + +- libxslt `1.1.33` -> `1.1.33-2` + - [(#7451)](https://github.com/microsoft/vcpkg/pull/7451) [libxslt]Fix dependent ports in static builds. + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- pcre2 `10.30-4` -> `10.30-5` + - [(#7948)](https://github.com/microsoft/vcpkg/pull/7948) Fix build with Emscripten/WASM + +- entt `3.0.0-1` -> `3.1.1` + - [(#7984)](https://github.com/microsoft/vcpkg/pull/7984) [entt] Update to 3.1.0 + - [(#8098)](https://github.com/microsoft/vcpkg/pull/8098) [entt] Update to 3.1.1 + +- raylib `2019-04-27-2` -> `2.5.0` + - [(#7848)](https://github.com/microsoft/vcpkg/pull/7848) [raylib] update to 2.5.0 + +- jsoncons `0.132.1` -> `0.136.0` + - [(#8034)](https://github.com/microsoft/vcpkg/pull/8034) [jsoncons] Update to version 0.133.0 + - [(#8221)](https://github.com/microsoft/vcpkg/pull/8221) [jsoncons] Update to v0.134.0 + - [(#8348)](https://github.com/microsoft/vcpkg/pull/8348) [jsoncons] Update jsoncons to v0.135.0 + - [(#8382)](https://github.com/microsoft/vcpkg/pull/8382) [jsoncons] Update jsoncons to v0.136.0 + +- exiv2 `0.27.1-1` -> `0.27.2-1` + - [(#7992)](https://github.com/microsoft/vcpkg/pull/7992) [exiv2] Update library to 0.27.2 + +- gettext `0.19-10` -> `0.19-11` + - [(#7990)](https://github.com/microsoft/vcpkg/pull/7990) [gettext]Improve gettext on Linux. + +- wtl `10.0-2` -> `10.0-3` + - [(#8005)](https://github.com/microsoft/vcpkg/pull/8005) Update WTL to 10.0.9163. + +- aixlog `1.2.1` -> `1.2.1-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- chaiscript `6.1.0` -> `6.1.0-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- dlfcn-win32 `1.1.1-2` -> `1.1.1-3` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- enet `1.3.13` -> `1.3.13-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- fltk `1.3.4-6` -> `1.3.4-7` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- fmi4cpp `0.7.0-1` -> `0.7.0-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- fmilib `2.0.3-1` -> `2.0.3-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- freetds `1.1.6` -> `1.1.6-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- gainput `1.0.0-1` -> `1.0.0-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- geographiclib `1.47-patch1-7` -> `1.47-patch1-9` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + - [(#8115)](https://github.com/microsoft/vcpkg/pull/8115) [geographiclib]Fix usage error and cmake path in Linux. + +- glog `0.4.0-1` -> `0.4.0-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- irrlicht `1.8.4-1` -> `1.8.4-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libmikmod `3.3.11.1-4` -> `3.3.11.1-5` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libodb-mysql `2.4.0-3` -> `2.4.0-4` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libodb-sqlite `2.4.0-4` -> `2.4.0-5` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libodb `2.4.0-5` -> `2.4.0-6` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libsquish `1.15-1` -> `1.15-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- lzo `2.10-2` -> `2.10-3` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- nanovg `master` -> `2019-8-30-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + - [(#8302)](https://github.com/microsoft/vcpkg/pull/8302) [nanogui] Add new port + +- ode `0.15.1-1` -> `0.15.1-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- opencsg `1.4.2` -> `1.4.2-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- orocos-kdl `1.4-1` -> `1.4-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- pangomm `2.40.1` -> `2.40.1-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- pcre `8.41-2` -> `8.41-3` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- qt5-gamepad `5.12.3-1` -> `5.12.5-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- wavpack `5.1.0-00d9a4a-1` -> `5.1.0-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- tensorflow-cc `1.14` -> `1.14-1` + - [(#8023)](https://github.com/microsoft/vcpkg/pull/8023) [tensorflow-cc]Fix build error and add warning message. + +- glew `2.1.0-5` -> `2.1.0-6` + - [(#7967)](https://github.com/microsoft/vcpkg/pull/7967) [VTK/GLEW] Fix Regression of VTK with newer CMake Versions + +- libpq `9.6.1-7` -> `9.6.1-8` + - [(#8076)](https://github.com/microsoft/vcpkg/pull/8076) libpq requires HAVE_CRYPTO_LOCK for thread safety with openssl <1.1.0 + - [(#8080)](https://github.com/microsoft/vcpkg/pull/8080) [libpq] #undef int128 type if compiling for 32 bit architecture + - [(#8090)](https://github.com/microsoft/vcpkg/pull/8090) [libpq] Bump version number + +- sobjectizer `5.6.0.2` -> `5.6.1` + - [(#8052)](https://github.com/microsoft/vcpkg/pull/8052) [sobjectizer] updated to 5.6.1 + +- unrar `5.5.8-2` -> `5.8.1` + - [(#8053)](https://github.com/microsoft/vcpkg/pull/8053) [unrar] Don't use a custom struct member alignment + - [(#8108)](https://github.com/microsoft/vcpkg/pull/8108) [unrar] Update to 5.8.1 + +- xalan-c `1.11-7` -> `1.11-8` + - [(#7795)](https://github.com/microsoft/vcpkg/pull/7795) [xalan-c] fixed cmake files location + +- re2 `2019-08-01` -> `2019-09-01` + - [(#8089)](https://github.com/microsoft/vcpkg/pull/8089) [re2] Update library to 2019-09-01 + +- libvpx `1.7.0-3` -> `1.8.1` + - [(#8086)](https://github.com/microsoft/vcpkg/pull/8086) [libvpx] Update to 1.8.1. + - [(#8100)](https://github.com/microsoft/vcpkg/pull/8100) [libvpx] Fix build when VCPKG_BUILD_TYPE is set. + +- grpc `1.22.0` -> `1.23.0` + - [(#8109)](https://github.com/microsoft/vcpkg/pull/8109) [grpc] Update grpc to 1.23.0 + +- egl-registry `2018-06-30-1` -> `2019-08-08` + - [(#8095)](https://github.com/microsoft/vcpkg/pull/8095) Update egl-registry to 2019-08-08 and opengl-registry to 2019-08-22. + +- opengl-registry `2018-06-30-1` -> `2019-08-22` + - [(#8095)](https://github.com/microsoft/vcpkg/pull/8095) Update egl-registry to 2019-08-08 and opengl-registry to 2019-08-22. + +- dimcli `5.0.0` -> `5.0.1` + - [(#8024)](https://github.com/microsoft/vcpkg/pull/8024) [dimcli] Upgrade to version 5.0.1 + +- libwebsockets `3.1.0-3` -> `3.2.0` + - [(#8017)](https://github.com/microsoft/vcpkg/pull/8017) Update libwebsockets to v3.2.0 + +- mongo-c-driver `1.14.0-3-1` -> `1.14.0-4` + - [(#7974)](https://github.com/microsoft/vcpkg/pull/7974) [mongo-c-driver] fix debug linkage under linux + +- qwt `6.1.3-7` -> `6.1.3-8` + - [(#8030)](https://github.com/microsoft/vcpkg/pull/8030) [qwt]make qwt support unix + +- ixwebsocket `5.0.4` -> `6.1.0` + - [(#7839)](https://github.com/microsoft/vcpkg/pull/7839) [ixwebsocket] update to 6.1.0 to fix Windows problem + +- cpp-httplib `0.2.1` -> `0.2.4` + - [(#8054)](https://github.com/microsoft/vcpkg/pull/8054) [cpp-httplib] Update library to 0.2.2 + - [(#8172)](https://github.com/microsoft/vcpkg/pull/8172) [cpp-httplib] Update library to 0.2.4 + +- blend2d `beta_2019-07-16` -> `beta_2019-10-09` + - [(#8120)](https://github.com/microsoft/vcpkg/pull/8120) [blend2d] Port update beta_2019-10-09 + +- json-c `2019-05-31` -> `2019-09-10` + - [(#8121)](https://github.com/microsoft/vcpkg/pull/8121) [json-c] Add dynamic library support + +- glfw3 `3.3-1` -> `3.3-2` + - [(#7592)](https://github.com/microsoft/vcpkg/pull/7592) [glfw3] fix cmake config + +- google-cloud-cpp `0.12.0` -> `0.13.0` + - [(#8077)](https://github.com/microsoft/vcpkg/pull/8077) Update google-cloud-cpp and googleapis. + +- googleapis `0.1.3` -> `0.1.5` + - [(#8077)](https://github.com/microsoft/vcpkg/pull/8077) Update google-cloud-cpp and googleapis. + +- tbb `2019_U8` -> `2019_U8-1` + - [(#8018)](https://github.com/microsoft/vcpkg/pull/8018) [tbb]Fix static build. + +- openxr-loader `1.0.0-2` -> `2019-09-25` + - [(#8123)](https://github.com/microsoft/vcpkg/pull/8123) [openxr-loader] Update to 1.0.2 + - [(#8255)](https://github.com/microsoft/vcpkg/pull/8255) [openxr-loader] Add openxr C++ bindings + +- sdl1 `1.2.15-6` -> `1.2.15-8` + - [(#8070)](https://github.com/microsoft/vcpkg/pull/8070) [sdl1]Support linux build. + - [(#8327)](https://github.com/microsoft/vcpkg/pull/8327) [sdl1] fix windows sdk 18362 build failure + +- glslang `2019-03-05` -> `2019-03-05-1` + - [(#8051)](https://github.com/microsoft/vcpkg/pull/8051) [glslang]Fix generated cmake files. + +- opencl `2.2 (2017.07.18)-1` -> `2.2 (2018.08.31)` + - [(#4204)](https://github.com/microsoft/vcpkg/pull/4204) Linux support for the OpenCL SDK package + +- libspatialite `4.3.0a-3` -> `4.3.0a-4` + - [(#8025)](https://github.com/microsoft/vcpkg/pull/8025) [libspatialite]make libspatialite support linux and osx + +- libqrencode `4.0.2` -> `4.0.2-1` + - [(#8099)](https://github.com/microsoft/vcpkg/pull/8099) [libqrencode] Add tool feature; Remove unnecessary patch + +- sdl2-mixer `2.0.4-3` -> `2.0.4-6` + - [(#7720)](https://github.com/microsoft/vcpkg/pull/7720) [sdl2-mixer]Remove useless dependency link libraries. + - [(#8208)](https://github.com/microsoft/vcpkg/pull/8208) [sdl2-mixer] Fix features dependency link. + - [(#8335)](https://github.com/microsoft/vcpkg/pull/8335) [sdl2-mixer]Re-fix dynamic call. + +- evpp `0.7.0` -> `0.7.0-1` + - [(#8050)](https://github.com/microsoft/vcpkg/pull/8050) [evpp]Fix linux build. + +- libogg `1.3.3-4` -> `1.3.4` + - [(#8094)](https://github.com/microsoft/vcpkg/pull/8094) [libogg] Update to 1.3.4-1 + +- otl `4.0.442` -> `4.0.443` + - [(#8139)](https://github.com/microsoft/vcpkg/pull/8139) [otl] fix hash and update version + +- speexdsp `1.2rc3-3` -> `1.2.0` + - [(#8140)](https://github.com/microsoft/vcpkg/pull/8140) [speexdsp] update to 1.2.0 + +- pcl `1.9.1-8` -> `1.9.1-9` + - [(#8154)](https://github.com/microsoft/vcpkg/pull/8154) [pcl] Fix problem with link-type keywords in linked libraries + +- libqglviewer `2.7.0` -> `2.7.0-2` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-3d `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-activeqt `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-base `5.12.3-4` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + - [(#8212)](https://github.com/microsoft/vcpkg/pull/8212) [Qt] feature latest to build 5.13.1 + +- qt5-charts `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-connectivity `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-datavis3d `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-declarative `5.12.3-2` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-graphicaleffects `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-imageformats `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-location `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-macextras `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-modularscripts `2019-04-30-1` -> `deprecated` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + +- qt5-mqtt `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-multimedia `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-networkauth `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-purchasing `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-quickcontrols `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-quickcontrols2 `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-remoteobjects `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-script `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-scxml `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-sensors `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-serialport `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-speech `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-svg `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-tools `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-virtualkeyboard `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-webchannel `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-websockets `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-webview `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-winextras `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-xmlpatterns `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5 `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8212)](https://github.com/microsoft/vcpkg/pull/8212) [Qt] feature latest to build 5.13.1 + +- mathgl `2.4.3-1` -> `2.4.3-2` + - [(#8145)](https://github.com/microsoft/vcpkg/pull/8145) [mathgl]Fix build failure on x86-windows. + +- libpng `1.6.37-3` -> `1.6.37-4` + - [(#8079)](https://github.com/microsoft/vcpkg/pull/8079) [libpng] Replace find_library() with a simple set() for linking libm on UNIX + +- chakracore `1.11.12` -> `1.11.13` + - [(#8171)](https://github.com/microsoft/vcpkg/pull/8171) [chakracore] Update library to 1.11.13 + +- fastcdr `1.0.10` -> `1.0.11` + - [(#8173)](https://github.com/microsoft/vcpkg/pull/8173) [fastcdr] Update library to 1.0.11 + +- yara `e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9-2` -> `3.10.0` + - [(#8194)](https://github.com/microsoft/vcpkg/pull/8194) [yara] Update to 3.10.0 + +- rabit `0.1` -> `0.1-2` + - [(#8042)](https://github.com/microsoft/vcpkg/pull/8042) [rabit] Fix file conflict with dmlc + - [(#8206)](https://github.com/microsoft/vcpkg/pull/8206) [rabit] Fix cmake files path + +- gdcm `3.0.0-4` -> `3.0.0-5` + - [(#7852)](https://github.com/microsoft/vcpkg/pull/7852) [gdcm] Fix file UseGDCM.cmake path name + +- libyaml `0.2.2-1` -> `0.2.2-2` + - [(#8177)](https://github.com/microsoft/vcpkg/pull/8177) Fix libyaml CMake package and CMake targets + +- clapack `3.2.1-10` -> `3.2.1-12` + - [(#8191)](https://github.com/microsoft/vcpkg/pull/8191) [clapack] Fix clapack-targets.cmake path in clpack-config.cmake + - [(#8388)](https://github.com/microsoft/vcpkg/pull/8388) [clapack] fix clapack install + +- embree3 `3.5.2-1` -> `3.5.2-2` + - [(#8192)](https://github.com/microsoft/vcpkg/pull/8192) [embree3]Fix static build and cmake path. + +- llvm `8.0.0` -> `8.0.0-2` + - [(#7919)](https://github.com/microsoft/vcpkg/pull/7919) [llvm]Fix build error on Linux: cannot find -lxml2. + - [(#8102)](https://github.com/microsoft/vcpkg/pull/8102) [halide]Upgrade to release_2019_08_27. + +- vtk `8.2.0-5` -> `8.2.0-8` + - [(#7933)](https://github.com/microsoft/vcpkg/pull/7933) [VTK] VTK links with release version of LMZA in debug build instead of debu… + - [(#8345)](https://github.com/microsoft/vcpkg/pull/8345) [vtk] Fix vtk[python] build failure + - [(#8403)](https://github.com/microsoft/vcpkg/pull/8403) [vtk] fix typo in lzma and lz4 patch + +- dcmtk `3.6.4-1` -> `3.6.4-2` + - [(#8202)](https://github.com/microsoft/vcpkg/pull/8202) [dcmtk] Fix build error on Linux + +- openimageio `2019-08-08-2` -> `2019-08-08-4` + - [(#8210)](https://github.com/microsoft/vcpkg/pull/8210) [openimageio] Add opencolorio as feature + - [(#8230)](https://github.com/microsoft/vcpkg/pull/8230) [openimageio]Re-fix find openexr issue. + - [(#8379)](https://github.com/microsoft/vcpkg/pull/8379) [alembic,geogram,openimageio]: openexr and libraw debug linkage, minor fix for geogram + +- cli `1.1-1` -> `1.1.1` + - [(#8209)](https://github.com/microsoft/vcpkg/pull/8209) [cli] Update the version to 1.1.1 + +- libepoxy `1.5.3` -> `1.5.3-1` + - [(#7985)](https://github.com/microsoft/vcpkg/pull/7985) [libepoxy]Add support with unix. + +- atk `2.24.0-3` -> `2.24.0-4` + - [(#7991)](https://github.com/microsoft/vcpkg/pull/7991) [atk]Support UNIX. + +- date `2019-05-18-1` -> `2019-09-09` + - [(#8151)](https://github.com/microsoft/vcpkg/pull/8151) [date] Add official CMake targets support + +- riffcpp `2.2.2` -> `2.2.4` + - [(#8153)](https://github.com/microsoft/vcpkg/pull/8153) [riffcpp] Update to 2.2.4 + +- duktape `2.4.0-3` -> `2.4.0-4` + - [(#8144)](https://github.com/microsoft/vcpkg/pull/8144) [duktape] Change download path of pip. + +- cgicc `3.2.19-2` -> `3.2.19-3` + - [(#8232)](https://github.com/microsoft/vcpkg/pull/8232) [cgicc]Fix linux build. + +- graphicsmagick `1.3.32-1` -> `1.3.33` + - [(#8256)](https://github.com/microsoft/vcpkg/pull/8256) [graphicsmagick] updated to 1.3.33 + +- ecsutil `1.0.7.2` -> `1.0.7.3` + - [(#8253)](https://github.com/microsoft/vcpkg/pull/8253) update for ECSUtil 1.0.7.3 + +- cpp-redis `4.3.1-1` -> `4.3.1-2` + - [(#8245)](https://github.com/microsoft/vcpkg/pull/8245) [simpleini cpp-redis tacopie] ports update + +- simpleini `2018-08-31-1` -> `2018-08-31-2` + - [(#8245)](https://github.com/microsoft/vcpkg/pull/8245) [simpleini cpp-redis tacopie] ports update + +- tacopie `3.2.0-1` -> `3.2.0-2` + - [(#8245)](https://github.com/microsoft/vcpkg/pull/8245) [simpleini cpp-redis tacopie] ports update + +- cairo `1.16.0-1` -> `1.16.0-2` + - [(#8249)](https://github.com/microsoft/vcpkg/pull/8249) [cairo]Add feature X11. + +- tinynpy `1.0.0-2` -> `1.0.0-3` + - [(#8274)](https://github.com/microsoft/vcpkg/pull/8274) [tinynpy] update + +- io2d `2019-07-11` -> `2019-07-11-1` + - [(#8251)](https://github.com/microsoft/vcpkg/pull/8251) [io2d]Fix linux build: add dependency cairo[x11]. + +- linenoise-ng `4754bee2d8eb3` -> `4754bee2d8eb3-1` + - [(#8276)](https://github.com/microsoft/vcpkg/pull/8276) [linenoise-ng] Fix flaky config + +- zeromq `2019-07-09-1` -> `2019-09-20` + - [(#8119)](https://github.com/microsoft/vcpkg/pull/8119) [zeromq] Update to 2019-09-13 + +- basisu `1.11-1` -> `1.11-2` + - [(#8289)](https://github.com/microsoft/vcpkg/pull/8289) [basisu] Updating with latest upstream changes + +- doctest `2.3.4` -> `2.3.5` + - [(#8295)](https://github.com/microsoft/vcpkg/pull/8295) [doctest] Update library to 2.3.5 + +- mbedtls `2.16.2` -> `2.16.3` + - [(#8296)](https://github.com/microsoft/vcpkg/pull/8296) [mbedtls] Update library to 2.16.3 + +- pugixml `1.9-3` -> `1.10` + - [(#8297)](https://github.com/microsoft/vcpkg/pull/8297) [pugixml] Update library to 1.10 + +- armadillo `2019-04-16-4` -> `2019-04-16-5` + - [(#8299)](https://github.com/microsoft/vcpkg/pull/8299) [armadillo] Fix configure_file failed + +- parallel-hashmap `1.23` -> `1.24` + - [(#8301)](https://github.com/microsoft/vcpkg/pull/8301) [parallel-hashmap] Update library to 1.24 + +- realsense2 `2.22.0-1` -> `2.22.0-2` + - [(#8303)](https://github.com/microsoft/vcpkg/pull/8303) [realsense2] fix dependency glfw3 and mismatching number of debug and release binaries + +- ffmpeg `4.1-11` -> `4.2` + - [(#8021)](https://github.com/microsoft/vcpkg/pull/8021) [ffmpeg] update to 4.2 + +- open62541 `0.3.0-3` -> `0.3.0-4` + - [(#8252)](https://github.com/microsoft/vcpkg/pull/8252) [open62541] fix dynamic build + +- librdkafka `1.1.0-1` -> `1.2.0-2` + - [(#8307)](https://github.com/microsoft/vcpkg/pull/8307) [librdkafka] Update library to 1.2.0 + - [(#8355)](https://github.com/microsoft/vcpkg/pull/8355) [librdkafka] Add vcpkg-cmake-wrapper.cmake + +- chartdir `6.3.1` -> `6.3.1-1` + - [(#8308)](https://github.com/microsoft/vcpkg/pull/8308) [chartdir] fix hash for osx + +- mpfr `4.0.1` -> `4.0.2-1` + - [(#8324)](https://github.com/microsoft/vcpkg/pull/8324) update mpfr to 4.0.2 and fix build on osx + +- cuda `9.0` -> `10.1` + - [(#7536)](https://github.com/microsoft/vcpkg/pull/7536) [cudnn] add port and enable it in darknet + +- darknet `0.2.5-6` -> `0.2.5.1` + - [(#7536)](https://github.com/microsoft/vcpkg/pull/7536) [cudnn] add port and enable it in darknet + +- opencv4 `4.1.1-1` -> `4.1.1-2` + - [(#7536)](https://github.com/microsoft/vcpkg/pull/7536) [cudnn] add port and enable it in darknet + +- libiconv `1.15-5` -> `1.15-6` + - [(#8312)](https://github.com/microsoft/vcpkg/pull/8312) [libiconv] Guard imported targets in non-Windows + +- gsoap `2.8.87-1` -> `2.8.93-1` + - [(#8338)](https://github.com/microsoft/vcpkg/pull/8338) [gSoap] Update to 2.8.93 + +- arrow `0.14.1` -> `0.14.1-1` + - [(#8263)](https://github.com/microsoft/vcpkg/pull/8263) [arrow]Fix build error on Visual Studio 2019. + +- sol2 `3.0.3` -> `3.0.3-1` + - [(#8243)](https://github.com/microsoft/vcpkg/pull/8243) [sol2]Fix using namespace. + +- alembic `1.7.11-4` -> `1.7.11-5` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + - [(#8379)](https://github.com/microsoft/vcpkg/pull/8379) [alembic,geogram,openimageio]: openexr and libraw debug linkage, minor fix for geogram + +- avro-c `1.8.2-2` -> `1.8.2-3` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- aws-sdk-cpp `1.7.142` -> `1.7.142-1` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- boost-system `1.70.0` -> `1.70.0-1` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- cgal `4.14-2` -> `4.14-3` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- eigen3 `3.3.7-2` -> `3.3.7-3` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- itk `5.0.1` -> `5.0.1-1` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- kinectsdk2 `2.0-1` -> `2.0-2` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- ompl `1.4.2-1` -> `1.4.2-2` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- openmvg `1.4-5` -> `1.4-6` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- curl `7.65.2-1` -> `7.66.0` + - [(#7331)](https://github.com/microsoft/vcpkg/pull/7331) [curl] Update to 7.66.0 + +- halide `release_2018_02_15-1` -> `release_2019_08_27` + - [(#8102)](https://github.com/microsoft/vcpkg/pull/8102) [halide]Upgrade to release_2019_08_27. + +- boost-accumulators `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-algorithm `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-align `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-any `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-array `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-asio `1.70.0-2` -> `1.71.0-1` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-assert `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-assign `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-atomic `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-beast `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-bimap `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-bind `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-callable-traits `2.3.2` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-chrono `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-circular-buffer `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-compatibility `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-compute `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-concept-check `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-config `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-container-hash `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-container `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-context `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-contract `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-conversion `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-convert `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-core `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-coroutine `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-coroutine2 `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-crc `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-date-time `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-detail `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-disjoint-sets `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-dll `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-dynamic-bitset `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-endian `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-exception `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-fiber `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-filesystem `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-flyweight `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-foreach `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-format `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-function-types `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-function `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-functional `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-fusion `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-geometry `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-gil `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-graph-parallel `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-graph `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-hana `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- hpx `1.3.0-1` -> `1.3.0-2` + - [(#8259)](https://github.com/microsoft/vcpkg/pull/8259) [hpx] Redirect --head to `stable` + +- assimp `4.1.0-8` -> `5.0.0` + - [(#8370)](https://github.com/microsoft/vcpkg/pull/8370) [assimp] Update the version to 5.0.0 + - [(#8381)](https://github.com/microsoft/vcpkg/pull/8381) [assimp] Update the version + +- angle `2019-06-13` -> `2019-07-19-2` + - [(#7329)](https://github.com/microsoft/vcpkg/pull/7329) [angle] Update to the latest commit. + - [(#8395)](https://github.com/microsoft/vcpkg/pull/8395) drop useless patch + +
+ +-- vcpkg team vcpkg@microsoft.com TUE, 01 Oct 22:00:00 -0800 + +vcpkg (2019.08.31) +--- +#### Total port count: 1169 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1099| +|x86-windows|1085| +|x64-windows-static|987| +|**x64-linux**|930| +|**x64-osx**|876| +|arm64-windows|726| +|x64-uwp|595| +|arm-uwp|571| + +#### The following commands and options have been updated: +- `depend-info` + - `--max-recurse` ***[NEW OPTION]***: Set the max depth of recursion for listing dependencies + - `--sort` ***[NEW OPTION]***: Sort the list of dependencies by `lexicographical`, `topological`, and `reverse` (topological) order + - `--show-depth` ***[NEW OPTION]***: Display the depth of each dependency in the list + - [(#7643)](https://github.com/microsoft/vcpkg/pull/7643) [depend-info] Fix bugs, add `--sort`, `--show-depth` and `--max-recurse` options +- `install --only-downloads` ***[NEW OPTION]*** + - Download sources for a package and its dependencies and don't build them + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+ +#### The following documentation has been updated: +- [Index](docs/README.md) + - [(#7506)](https://github.com/microsoft/vcpkg/pull/7506) Update tests, and add documentation! + - [(#7821)](https://github.com/microsoft/vcpkg/pull/7821) [vcpkg docs] More tool maintainer docs! ðŸ±â€ðŸ‘¤ +- [Tool maintainers: Testing](docs/tool-maintainers/testing.md) ***[NEW]*** + - [(#7506)](https://github.com/microsoft/vcpkg/pull/7506) Update tests, and add documentation! + - [(#7821)](https://github.com/microsoft/vcpkg/pull/7821) [vcpkg docs] More tool maintainer docs! ðŸ±â€ðŸ‘¤ +- [Examples: Overlay triplets example +](docs/examples/overlay-triplets-linux-dynamic.md) + - [(#7502)](https://github.com/microsoft/vcpkg/pull/7502) [vcpkg-docs] Reword and reorganize overlay-triplets-linux-dynamic.md +- [Portfile helper functions](docs/maintainers/portfile-functions.md) + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+- [`vcpkg_check_features`](docs/maintainers/vcpkg_check_features.md) + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check +- [`vcpkg_configure_cmake`](docs/maintainers/vcpkg_configure_cmake.md) + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check +- [`vcpkg_pretiffy_command`](docs/maintainers/vcpkg_prettify_command.md) ***[NEW]*** + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#7751)](https://github.com/microsoft/vcpkg/pull/7751) Add guideline for overriding `VCPKG_` +- [Tool maintainers: Benchmarking](docs/tool-maintainers/benchmarking.md) ***[NEW]*** + - [(#7821)](https://github.com/microsoft/vcpkg/pull/7821) [vcpkg docs] More tool maintainer docs! ðŸ±â€ðŸ‘¤ +- [Tool maintainers: Layout of the vcpkg source tree](docs/tool-maintainers/layout.md) ***[NEW]*** + - [(#7821)](https://github.com/microsoft/vcpkg/pull/7821) [vcpkg docs] More tool maintainer docs! ðŸ±â€ðŸ‘¤ +- [`vcpkg_common_definitions`](docs/maintainers/vcpkg_common_definitions.md) ***[NEW]*** + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+- [`vcpkg_execute_required_process`](docs/maintainers/vcpkg_execute_required_process.md) + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+- [`vcpkg_fail_port_install`](docs/maintainers/vcpkg_fail_port_install.md) ***[NEW]*** + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+ +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- CONTROL files extended syntax + - The `Build-Depends` field now supports logical expressions as well as line breaks + - [(#7508)](https://github.com/microsoft/vcpkg/pull/7508) Improve logical evaluation of dependency qualifiers + - [(#7863)](https://github.com/microsoft/vcpkg/pull/7863) Fix list parsing logic and add error messages +- Quality-of-Life improvements for portfile maintainers + - [(#7601)](https://github.com/microsoft/vcpkg/pull/7601) [vcpkg/cmake] Added a function to fail from portfiles in a default way + - [(#7600)](https://github.com/microsoft/vcpkg/pull/7600) [vcpkg] QoL: add target dependent library prefix/suffix variables and enable find_library for portfiles + - [(#7773)](https://github.com/microsoft/vcpkg/pull/7773) [vcpkg] QoL: Make find_library useable without errors to console. + - [(#7599)](https://github.com/microsoft/vcpkg/pull/7599) [vcpkg] QoL: add host/target dependent variables for executable suffixes + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#4572)](https://github.com/microsoft/vcpkg/pull/4572) Change CMakeLists.txt in toolsrc to allow compiling with llvm toolset +- [(#7305)](https://github.com/microsoft/vcpkg/pull/7305) [vcpkg] Public ABI override option +- [(#7307)](https://github.com/microsoft/vcpkg/pull/7307) [vcpkg] Always calculate ABI tags +- [(#7491)](https://github.com/microsoft/vcpkg/pull/7491) Handle response files with Windows line-endings properly +- [(#7501)](https://github.com/microsoft/vcpkg/pull/7501) Add July changelog +- [(#7506)](https://github.com/microsoft/vcpkg/pull/7506) Update tests, and add documentation! +- [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check +- [(#7568)](https://github.com/microsoft/vcpkg/pull/7568) [tensorflow] Add new port for linux +- [(#7570)](https://github.com/microsoft/vcpkg/pull/7570) [vcpkg] Make `RealFilesystem::remove_all` much, much faster, and start benchmarking +- [(#7587)](https://github.com/microsoft/vcpkg/pull/7587) [vcpkg] Revert accidental removal of powershell-core usage in bb3a9ddb6ec917f54 +- [(#7619)](https://github.com/microsoft/vcpkg/pull/7619) [vcpkg] Fix `.vcpkg-root` detection issue +- [(#7620)](https://github.com/microsoft/vcpkg/pull/7620) [vcpkg] Fix warnings in `files.{h,cpp}` build under /W4 +- [(#7623)](https://github.com/microsoft/vcpkg/pull/7623) Fix VS 2019 detection bug +- [(#7637)](https://github.com/microsoft/vcpkg/pull/7637) [vcpkg] Fix the build on VS2015 debug +- [(#7638)](https://github.com/microsoft/vcpkg/pull/7638) [vcpkg] Make CMakelists nicer 😠+- [(#7687)](https://github.com/microsoft/vcpkg/pull/7687) [vcpkg] Port toolchains +- [(#7754)](https://github.com/microsoft/vcpkg/pull/7754) [vcpkg] Allow multiple spaces in a comma list +- [(#7757)](https://github.com/microsoft/vcpkg/pull/7757) [vcpkg] Switch to internal hash algorithms ðŸ±â€ðŸ’» +- [(#7793)](https://github.com/microsoft/vcpkg/pull/7793) Allow redirection of the scripts folder +- [(#7798)](https://github.com/microsoft/vcpkg/pull/7798) [vcpkg] Fix build on FreeBSD 😈 +- [(#7816)](https://github.com/microsoft/vcpkg/pull/7816) [vcpkg] Fix gcc-9 warning +- [(#7864)](https://github.com/microsoft/vcpkg/pull/7864) [vcpkg] Move `do_build_package_and_clean_buildtrees()` above generating vcpkg_abi_info.txt so it will be included in the package. +- [(#7930)](https://github.com/microsoft/vcpkg/pull/7930) [vcpkg] fix bug in StringView::operator== 😱 +
+The following 63 ports have been added: + +|port|version| +|---|---| +|[riffcpp](https://github.com/microsoft/vcpkg/pull/7509) [#7541](https://github.com/microsoft/vcpkg/pull/7541) [#7859](https://github.com/microsoft/vcpkg/pull/7859) | 2.2.2 +|[easyhook](https://github.com/microsoft/vcpkg/pull/7487)| 2.7.6789.0 +|[brigand](https://github.com/microsoft/vcpkg/pull/7518)| 1.3.0 +|[ctbignum](https://github.com/microsoft/vcpkg/pull/7512)| 2019-08-02 +|[gaussianlib](https://github.com/microsoft/vcpkg/pull/7542)| 2019-08-04 +|[tinycthread](https://github.com/microsoft/vcpkg/pull/7565)| 2019-08-06 +|[libcerf](https://github.com/microsoft/vcpkg/pull/7320)| 1.13 +|[tinynpy](https://github.com/microsoft/vcpkg/pull/7393)| 1.0.0-2 +|[googleapis](https://github.com/microsoft/vcpkg/pull/7557) [#7703](https://github.com/microsoft/vcpkg/pull/7703) | 0.1.3 +|[pdqsort](https://github.com/microsoft/vcpkg/pull/7464)| 2019-07-30 +|[discount](https://github.com/microsoft/vcpkg/pull/7400)| 2.2.6 +|[duckx](https://github.com/microsoft/vcpkg/pull/7561)| 2019-08-06 +|[opencv3](https://github.com/microsoft/vcpkg/pull/5169) [#7581](https://github.com/microsoft/vcpkg/pull/7581) [#7658](https://github.com/microsoft/vcpkg/pull/7658) [#7925](https://github.com/microsoft/vcpkg/pull/7925) | 3.4.7-1 +|[opencv4](https://github.com/microsoft/vcpkg/pull/5169) [#7558](https://github.com/microsoft/vcpkg/pull/7558) [#7581](https://github.com/microsoft/vcpkg/pull/7581) [#7658](https://github.com/microsoft/vcpkg/pull/7658) | 4.1.1-1 +|[tiny-bignum-c](https://github.com/microsoft/vcpkg/pull/7531)| 2019-07-31 +|[tgc](https://github.com/microsoft/vcpkg/pull/7644)| 2019-08-11 +|[bento4](https://github.com/microsoft/vcpkg/pull/7595)| 1.5.1-628 +|[dbow2](https://github.com/microsoft/vcpkg/pull/7552)| 2019-08-05 +|[tiny-aes-c](https://github.com/microsoft/vcpkg/pull/7530)| 2019-07-31 +|[drlibs](https://github.com/microsoft/vcpkg/pull/7656)| 2019-08-12 +|[nt-wrapper](https://github.com/microsoft/vcpkg/pull/7633)| 2019-08-10 +|[xorstr](https://github.com/microsoft/vcpkg/pull/7631)| 2019-08-10 +|[lazy-importer](https://github.com/microsoft/vcpkg/pull/7630)| 2019-08-10 +|[plf-colony](https://github.com/microsoft/vcpkg/pull/7627)| 2019-08-10 +|[plf-list](https://github.com/microsoft/vcpkg/pull/7627)| 2019-08-10 +|[plf-nanotimer](https://github.com/microsoft/vcpkg/pull/7627)| 2019-08-10 +|[plf-stack](https://github.com/microsoft/vcpkg/pull/7627)| 2019-08-10 +|[tiny-regex-c](https://github.com/microsoft/vcpkg/pull/7626)| 2019-07-31 +|[hayai](https://github.com/microsoft/vcpkg/pull/7624)| 2019-08-10 +|[yasm](https://github.com/microsoft/vcpkg/pull/7478)| 1.3.0 +|[fast-cpp-csv-parser](https://github.com/microsoft/vcpkg/pull/7681)| 2019-08-14 +|[wg21-sg14](https://github.com/microsoft/vcpkg/pull/7663)| 2019-08-13 +|[pistache](https://github.com/microsoft/vcpkg/pull/7547)| 2019-08-05 +|[hfsm2](https://github.com/microsoft/vcpkg/pull/7516)| beta7 +|[mpmcqueue](https://github.com/microsoft/vcpkg/pull/7437)| 2019-07-26 +|[spscqueue](https://github.com/microsoft/vcpkg/pull/7437)| 2019-07-26 +|[tinkerforge](https://github.com/microsoft/vcpkg/pull/7523)| 2.1.25 +|[field3d](https://github.com/microsoft/vcpkg/pull/7594)| 1.7.2 +|[libsvm](https://github.com/microsoft/vcpkg/pull/7664)| 323 +|[nanort](https://github.com/microsoft/vcpkg/pull/7778)| 2019-08-20 +|[libspatialindex](https://github.com/microsoft/vcpkg/pull/7762)| 1.9.0 +|[qtkeychain](https://github.com/microsoft/vcpkg/pull/7760)| v0.9.1 +|[sparsehash](https://github.com/microsoft/vcpkg/pull/7772)| 2.0.3 +|[tensorflow-cc](https://github.com/microsoft/vcpkg/pull/7568)| 1.14 +|[qt-advanced-docking-system](https://github.com/microsoft/vcpkg/pull/7621)| 2019-08-14 +|[quickfast](https://github.com/microsoft/vcpkg/pull/7814)| 1.5 +|[mp3lame](https://github.com/microsoft/vcpkg/pull/7830)| 3.100 +|[quickfix](https://github.com/microsoft/vcpkg/pull/7796)| 1.15.1 +|[fplus](https://github.com/microsoft/vcpkg/pull/7883)| 0.2.3-p0 +|[json5-parser](https://github.com/microsoft/vcpkg/pull/7915)| 1.0.0 +|[gppanel](https://github.com/microsoft/vcpkg/pull/7868)| 2018-04-06 +|[libguarded](https://github.com/microsoft/vcpkg/pull/7924)| 2019-08-27 +|[cgl](https://github.com/microsoft/vcpkg/pull/7810)| 0.60.2-1 +|[minifb](https://github.com/microsoft/vcpkg/pull/7766)| 2019-08-20-1 +|[log4cpp](https://github.com/microsoft/vcpkg/pull/7433)| 2.9.1-1 +|[chartdir](https://github.com/microsoft/vcpkg/pull/7912)| 6.3.1 +|[outcome](https://github.com/microsoft/vcpkg/pull/7940)| 2.1 +|[libP7Client](https://github.com/microsoft/vcpkg/pull/7605)| 5.2 +|[clue](https://github.com/microsoft/vcpkg/pull/7564)| 1.0.0-alpha.7 +|[status-value-lite](https://github.com/microsoft/vcpkg/pull/7563)| 1.1.0 +|[type-lite](https://github.com/microsoft/vcpkg/pull/7563)| 0.1.0 +|[value-ptr-lite](https://github.com/microsoft/vcpkg/pull/7563)| 0.2.1 +|[kvasir-mpl](https://github.com/microsoft/vcpkg/pull/7562)| 2019-08-06 +
+ +
+The following 199 ports have been updated: + +- pcl `1.9.1-5` -> `1.9.1-8` + - [(#7413)](https://github.com/microsoft/vcpkg/pull/7413) [pcl] Fix Build failure in linux + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7700)](https://github.com/microsoft/vcpkg/pull/7700) [czmq/pcl] Fix judgment feature condition. + +- xalan-c `1.11-5` -> `1.11-7` + - [(#7496)](https://github.com/microsoft/vcpkg/pull/7496) [xalan-c] Bump version number + - [(#7505)](https://github.com/microsoft/vcpkg/pull/7505) [xalan-c] switch to https://github.com/apache/xalan-c (#7489) + +- catch2 `2.7.2-2` -> `2.9.2` + - [(#7497)](https://github.com/microsoft/vcpkg/pull/7497) [Catch2] Update to v2.9.1 + - [(#7702)](https://github.com/microsoft/vcpkg/pull/7702) [brynet, catch2, chakracore] Update some ports version + +- ade `0.1.1d` -> `0.1.1f` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + - [(#7628)](https://github.com/microsoft/vcpkg/pull/7628) [ade] Update library to 0.1.1f + +- harfbuzz `2.5.1-1` -> `2.5.3` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + +- libpmemobj-cpp `1.6-1` -> `1.7` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + +- msgpack `3.1.1` -> `3.2.0` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + +- protobuf `3.8.0-1` -> `3.9.1` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + - [(#7671)](https://github.com/microsoft/vcpkg/pull/7671) [protobuf] Update from 3.9.0 to 3.9.1 + +- string-theory `2.1-1` -> `2.2` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + +- ccfits `2.5-2` -> `2.5-3` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- itpp `4.3.1` -> `4.3.1-1` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- mpg123 `1.25.8-5` -> `1.25.8-6` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- qwt `6.1.3-6` -> `6.1.3-7` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- sdl1 `1.2.15-5` -> `1.2.15-6` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- gdal `2.4.1-5` -> `2.4.1-8` + - [(#7520)](https://github.com/microsoft/vcpkg/pull/7520) [gdal] Fix duplicate pdb file + - [(#7434)](https://github.com/microsoft/vcpkg/pull/7434) [gdal] Fix dependent ports in static builds. + +- blosc `1.16.3-2` -> `1.17.0-1` + - [(#7525)](https://github.com/microsoft/vcpkg/pull/7525) Update some ports version + - [(#7649)](https://github.com/microsoft/vcpkg/pull/7649) [blosc] enable dependent ports to use debug builds + +- boost-callable-traits `1.70.0` -> `2.3.2` + - [(#7525)](https://github.com/microsoft/vcpkg/pull/7525) Update some ports version + +- cjson `1.7.10-1` -> `1.7.12` + - [(#7525)](https://github.com/microsoft/vcpkg/pull/7525) Update some ports version + +- cppzmq `4.3.0-1` -> `4.4.1` + - [(#7525)](https://github.com/microsoft/vcpkg/pull/7525) Update some ports version + +- restinio `0.5.1-1` -> `0.6.0` + - [(#7514)](https://github.com/microsoft/vcpkg/pull/7514) [RESTinio] updated to v.0.5.1.1 + - [(#7962)](https://github.com/microsoft/vcpkg/pull/7962) RESTinio updated to v.0.6.0 + +- argh `2018-12-18` -> `2018-12-18-1` + - [(#7527)](https://github.com/microsoft/vcpkg/pull/7527) [argh] fix flaky cmake config + +- libusb `1.0.22-3` -> `1.0.22-4` + - [(#7465)](https://github.com/microsoft/vcpkg/pull/7465) [libusb] Fix using mismatched CRT_linkage/library_linkage issue. + +- casclib `1.50` -> `1.50b-1` + - [(#7522)](https://github.com/microsoft/vcpkg/pull/7522) [casclib] Added CMake targets + - [(#7907)](https://github.com/microsoft/vcpkg/pull/7907) [casclib] Update library to 1.50b + +- opencv `3.4.3-9` -> `4.1.1-1` + - [(#7499)](https://github.com/microsoft/vcpkg/pull/7499) Add feature halide to OpenCV. + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + - [(#7659)](https://github.com/microsoft/vcpkg/pull/7659) [opencv] Expose all features from `opencv4` in meta-package + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- openxr-loader `1.0.0-1` -> `1.0.0-2` + - [(#7560)](https://github.com/microsoft/vcpkg/pull/7560) [Openxr-loader] Remove the invalid patch + +- simdjson `2019-03-09` -> `2019-08-05` + - [(#7546)](https://github.com/microsoft/vcpkg/pull/7546) [simdjson] Update to 0.2.1 + +- alembic `1.7.11-3` -> `1.7.11-4` + - [(#7551)](https://github.com/microsoft/vcpkg/pull/7551) [alembic] fix hdf5 linkage + +- xerces-c `3.2.2-10` -> `3.2.2-11` + - [(#7500)](https://github.com/microsoft/vcpkg/pull/7500) [xercec-c] no symlinks in static build (#7490) + - [(#7622)](https://github.com/microsoft/vcpkg/pull/7622) [tiff][tesseract][xerces-c] Disable unmanaged optional dependencies + +- sol2 `3.0.2` -> `3.0.3` + - [(#7545)](https://github.com/microsoft/vcpkg/pull/7545) Update sol2 portfile to 579908 + - [(#7804)](https://github.com/microsoft/vcpkg/pull/7804) [sol2] Update library to 3.0.3 + +- cpprestsdk `2.10.14` -> `2.10.14-1` + - [(#7472)](https://github.com/microsoft/vcpkg/pull/7472) Repair compression dependency bugs in cpprestsdk + - [(#7863)](https://github.com/microsoft/vcpkg/pull/7863) fix list parsing logic and add error messages + +- libevent `2.1.10` -> `2.1.11` + - [(#7515)](https://github.com/microsoft/vcpkg/pull/7515) [libevent] update to 2.1.11 + +- imgui `1.70-1` -> `1.72b` + - [(#7534)](https://github.com/microsoft/vcpkg/pull/7534) Update some ports version + +- mbedtls `2.15.1` -> `2.16.2` + - [(#7534)](https://github.com/microsoft/vcpkg/pull/7534) Update some ports version + +- ffmpeg `4.1-8` -> `4.1-9` + - [(#7476)](https://github.com/microsoft/vcpkg/pull/7476) [ffmpeg] Fix debug build in Windows. + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + - [(#7608)](https://github.com/microsoft/vcpkg/pull/7608) [ffmpeg] Add feature avresample. + - [(#7739)](https://github.com/microsoft/vcpkg/pull/7739) [ffmpeg] Fix static linking on Windows, FindFFMPEG + +- kangaru `4.1.3-2` -> `4.2.0` + - [(#7567)](https://github.com/microsoft/vcpkg/pull/7567) Updated kangaru version + +- cpp-taskflow `2018-11-30` -> `2.2.0` + - [(#7554)](https://github.com/microsoft/vcpkg/pull/7554) [cpp-taskflow] update to 2.2.0 + +- jsoncons `0.125.0` -> `0.132.1` + - [(#7529)](https://github.com/microsoft/vcpkg/pull/7529) Update jsoncons to v0.131.2 + - [(#7718)](https://github.com/microsoft/vcpkg/pull/7718) [jsoncons] Update library to 0.132.1 + +- tinyexif `1.0.2-5` -> `1.0.2-6` + - [(#7575)](https://github.com/microsoft/vcpkg/pull/7575) [TinyEXIF] fix linux/mac + +- itk `5.0.0-2` -> `5.0.1` + - [(#7241)](https://github.com/microsoft/vcpkg/pull/7241) ITK portfile support legacy user code by default + - [(#7586)](https://github.com/microsoft/vcpkg/pull/7586) [itk] Update library from 5.0.0 to 5.0.1 + +- stxxl `2018-11-15-1` -> `2018-11-15-2` + - [(#7330)](https://github.com/microsoft/vcpkg/pull/7330) [stxxl] compilation fix + +- chakracore `1.11.9` -> `1.11.12` + - [(#7576)](https://github.com/microsoft/vcpkg/pull/7576) [chakracore] Update library to 1.11.11 + - [(#7702)](https://github.com/microsoft/vcpkg/pull/7702) [brynet, catch2, chakracore] Update some ports version + +- qhull `7.3.2` -> `7.3.2-1` + - [(#7370)](https://github.com/microsoft/vcpkg/pull/7370) [Qhulluwp] fix uwp building + +- netcdf-c `4.7.0-3` -> `4.7.0-4` + - [(#7578)](https://github.com/microsoft/vcpkg/pull/7578) [netcdf-c] correctly fix hdf5 linkage + +- google-cloud-cpp `0.11.0` -> `0.12.0` + - [(#7557)](https://github.com/microsoft/vcpkg/pull/7557) Update google-cloud-cpp to 0.12.0. + +- stormlib `9.22` -> `2019-05-10` + - [(#7409)](https://github.com/microsoft/vcpkg/pull/7409) [stormlib] Add targets and streamline build + +- openimageio `2.0.8` -> `2019-08-08-2` + - [(#7419)](https://github.com/microsoft/vcpkg/pull/7419) [openimageio] Fix feature libraw build errors + - [(#7588)](https://github.com/microsoft/vcpkg/pull/7588) [openimageio] find_package support + - [(#7747)](https://github.com/microsoft/vcpkg/pull/7747) [openimageio] Fix find correct debug/release openexr libraries. + +- librdkafka `1.1.0` -> `1.1.0-1` + - [(#7469)](https://github.com/microsoft/vcpkg/pull/7469) Librdkafka snappy + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- open62541 `0.3.0-2` -> `0.3.0-3` + - [(#7607)](https://github.com/microsoft/vcpkg/pull/7607) [open62541] Fix flakiness/bugginess + +- jsonnet `2019-05-08` -> `2019-05-08-1` + - [(#7587)](https://github.com/microsoft/vcpkg/pull/7587) [vcpkg] Revert accidental removal of powershell-core usage in bb3a9ddb6ec917f54 + - [(#7374)](https://github.com/microsoft/vcpkg/pull/7374) [jsonnet] Upgrade version to 0.13.0 + +- expat `2.2.6` -> `2.2.7` + - [(#7596)](https://github.com/microsoft/vcpkg/pull/7596) [expat] Update library to 2.2.7 + +- aws-lambda-cpp `0.1.0-1` -> `0.1.0-2` + - [(#7601)](https://github.com/microsoft/vcpkg/pull/7601) [vcpkg/cmake] Added a function to fail from portfiles in a default way + +- rocksdb `6.1.2` -> `6.1.2-1` + - [(#7452)](https://github.com/microsoft/vcpkg/pull/7452) [rocksdb] Change linkage type to static. + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- freeimage `3.18.0-6` -> `3.18.0-7` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + +- gdcm `3.0.0-3` -> `3.0.0-4` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + +- ogre `1.12.0-1` -> `1.12.1` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- pthreads `3.0.0-2` -> `3.0.0-3` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + +- qt5 `5.12.3` -> `5.12.3-1` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + - [(#7642)](https://github.com/microsoft/vcpkg/pull/7642) [qt5] Only build qt5-activeqt on windows + +- zxing-cpp `3.3.3-5` -> `3.3.3-6` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + +- tesseract `4.1.0-1` -> `4.1.0-2` + - [(#7622)](https://github.com/microsoft/vcpkg/pull/7622) [tiff][tesseract][xerces-c] Disable unmanaged optional dependencies + +- tiff `4.0.10-6` -> `4.0.10-7` + - [(#7622)](https://github.com/microsoft/vcpkg/pull/7622) [tiff][tesseract][xerces-c] Disable unmanaged optional dependencies + +- osg `3.6.3-1` -> `3.6.4` + - [(#7653)](https://github.com/microsoft/vcpkg/pull/7653) [osg] Update osg version to 3.6.4 + - [(#7677)](https://github.com/microsoft/vcpkg/pull/7677) [osg] Fix Applying patch failed + +- cppgraphqlgen `3.0.0` -> `3.0.2` + - [(#7639)](https://github.com/microsoft/vcpkg/pull/7639) [cppgraphqlgen] Update with matching PEGTL + +- pegtl `3.0.0-pre` -> `3.0.0-pre-697aaa0` + - [(#7639)](https://github.com/microsoft/vcpkg/pull/7639) [cppgraphqlgen] Update with matching PEGTL + +- monkeys-audio `4.3.3-1` -> `4.8.3` + - [(#7634)](https://github.com/microsoft/vcpkg/pull/7634) [monkeys-audio] Update library to 4.8.3 + +- directxmesh `apr2019` -> `jun2019-1` + - [(#7665)](https://github.com/microsoft/vcpkg/pull/7665) [directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support + - [(#7869)](https://github.com/microsoft/vcpkg/pull/7869) [directxmesh] Update library to aug2019 + +- directxtex `apr2019` -> `jun2019-1` + - [(#7665)](https://github.com/microsoft/vcpkg/pull/7665) [directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support + - [(#7870)](https://github.com/microsoft/vcpkg/pull/7870) [directxtex] Update library to aug2019 + +- directxtk `apr2019-1` -> `jun2019-1` + - [(#7665)](https://github.com/microsoft/vcpkg/pull/7665) [directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support + - [(#7871)](https://github.com/microsoft/vcpkg/pull/7871) [directxtk] Update library to aug2019 + +- directxtk12 `dec2016-1` -> `jun2019-1` + - [(#7665)](https://github.com/microsoft/vcpkg/pull/7665) [directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support + - [(#7872)](https://github.com/microsoft/vcpkg/pull/7872) [directxtk12] Update library to aug2019 + +- usockets `0.1.2` -> `0.3.1` + - [(#7662)](https://github.com/microsoft/vcpkg/pull/7662) [usockets] upgrade to v0.3.1 + +- dimcli `4.1.0` -> `5.0.0` + - [(#7651)](https://github.com/microsoft/vcpkg/pull/7651) [dimcli] Fix build error C2220 + - [(#7785)](https://github.com/microsoft/vcpkg/pull/7785) [dimcli] Update library to 5.0.0 + +- czmq `2019-06-10-1` -> `2019-06-10-3` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7700)](https://github.com/microsoft/vcpkg/pull/7700) [czmq/pcl] Fix judgment feature condition. + +- darknet `0.2.5-5` -> `0.2.5-6` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- mimalloc `2019-06-25` -> `2019-06-25-1` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- mongo-c-driver `1.14.0-3` -> `1.14.0-3-1` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- oniguruma `6.9.2-2` -> `6.9.3` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7721)](https://github.com/microsoft/vcpkg/pull/7721) [oniguruma] Update library 6.9.3 + +- paho-mqttpp3 `1.0.1` -> `1.0.1-2` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7769)](https://github.com/microsoft/vcpkg/pull/7769) [paho-mqttpp3] Fix missing reference to C library headers + +- xsimd `7.2.3-1` -> `7.2.3-2` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- xtensor `0.20.7-1` -> `0.20.7-2` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- zeromq `2019-07-09` -> `2019-07-09-1` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- gtest `2019-01-04-2` -> `2019-08-14-1` + - [(#7692)](https://github.com/microsoft/vcpkg/pull/7692) [gtest] update to 90a443f9c2437ca8a682a1ac625eba64e1d74a8a + - [(#7316)](https://github.com/microsoft/vcpkg/pull/7316) [gtest] Re-fix port_main/port_maind libraries path and add gmock cmake files. + +- physx `commit-624f2cb6c0392013d54b235d9072a49d01c3cb6c` -> `4.1.1-1` + - [(#7679)](https://github.com/microsoft/vcpkg/pull/7679) [physx] Update to 4.1.1 (with Visual Studio 2019 support) + +- libidn2 `2.1.1-1` -> `2.2.0` + - [(#7685)](https://github.com/microsoft/vcpkg/pull/7685) [libidn2] Update to version 2.2.0. + +- poco `2.0.0-pre-3` -> `1.9.2-1` + - [(#7698)](https://github.com/microsoft/vcpkg/pull/7698) [poco] Upgrade version to 1.9.2 release. + - [(#7892)](https://github.com/microsoft/vcpkg/pull/7892) [poco] Fix conflicts with libharu. + +- osgearth `2.10.1` -> `2.10.2` + - [(#7695)](https://github.com/microsoft/vcpkg/pull/7695) [osgearth] Fix osgearth rocksdb plugin build falied + +- spdlog `1.3.1-1` -> `1.3.1-2` + - [(#7670)](https://github.com/microsoft/vcpkg/pull/7670) [spdlog] fix cmake targets path + +- libgit2 `0.28.2` -> `0.28.3` + - [(#7669)](https://github.com/microsoft/vcpkg/pull/7669) [libgit2] Upgrade to version 0.28.3 + +- brynet `1.0.2` -> `1.0.3` + - [(#7702)](https://github.com/microsoft/vcpkg/pull/7702) [brynet, catch2, chakracore] Update some ports version + +- nghttp2 `1.35.0` -> `1.39.2` + - [(#7699)](https://github.com/microsoft/vcpkg/pull/7699) [nghttp2] Upgrade to version 1.39.2 + +- leptonica `1.76.0-1` -> `1.78.0-1` + - [(#7358)](https://github.com/microsoft/vcpkg/pull/7358) [leptonica] Upgrade to 1.78.0 + - [(#7712)](https://github.com/microsoft/vcpkg/pull/7712) [leptonica] Add dependency port libwebp and fix find libwebp in debug/release + +- libtorrent `2019-04-19` -> `1.2.1-bcb26fd6` + - [(#7708)](https://github.com/microsoft/vcpkg/pull/7708) [libtorrent] Update to 1.2.1-bcb26fd6 + +- angelscript `2.33.0-1` -> `2.33.1-1` + - [(#7650)](https://github.com/microsoft/vcpkg/pull/7650) [angelscript] Added feature to optionally install all Angelscript standard addons + +- jsoncpp `1.8.4-1` -> `1.9.1` + - [(#7719)](https://github.com/microsoft/vcpkg/pull/7719) [jsoncpp] Update library to 1.9.1 + +- robin-hood-hashing `3.2.13` -> `3.4.0` + - [(#7722)](https://github.com/microsoft/vcpkg/pull/7722) [robin-hood-hashing] Update library to 3.4.0 + +- sqlite-orm `1.3-1` -> `1.4` + - [(#7723)](https://github.com/microsoft/vcpkg/pull/7723) [sqlite-orm] Update library to 1.4 + +- doctest `2.3.3` -> `2.3.4` + - [(#7716)](https://github.com/microsoft/vcpkg/pull/7716) [doctest] Update library to 2.3.4 + +- pegtl-2 `2.8.0` -> `2.8.1` + - [(#7715)](https://github.com/microsoft/vcpkg/pull/7715) [pegtl-2] Update library to 2.8.1 + +- cpp-httplib `0.2.0` -> `0.2.1` + - [(#7714)](https://github.com/microsoft/vcpkg/pull/7714) [cpp-httplib] Update library to 0.2.1 + +- geographiclib `1.47-patch1-6` -> `1.47-patch1-7` + - [(#7697)](https://github.com/microsoft/vcpkg/pull/7697) [geographiclib] Fix build error on Linux + +- libmariadb `3.0.10-3` -> `3.0.10-4` + - [(#7710)](https://github.com/microsoft/vcpkg/pull/7710) [libmariadb] Fix usage error LNK2001. + +- irrlicht `1.8.4-2` -> `1.8.4-1` + - [(#7726)](https://github.com/microsoft/vcpkg/pull/7726) Revert "[irrlicht] use unicode path on windows (#7354)" + +- cgltf `2019-04-30` -> `1.3` + - [(#7731)](https://github.com/microsoft/vcpkg/pull/7731) [cgltf] Update library to 1.2 + - [(#7774)](https://github.com/microsoft/vcpkg/pull/7774) [cgltf] Update library to 1.3 + +- duktape `2.3.0-2` -> `2.4.0-3` + - [(#7548)](https://github.com/microsoft/vcpkg/pull/7548) [ duktape] Update hash for pip. + - [(#7873)](https://github.com/microsoft/vcpkg/pull/7873) [duktape] Update library to 2.4.0 + +- double-conversion `3.1.4` -> `3.1.5` + - [(#7717)](https://github.com/microsoft/vcpkg/pull/7717) [double-conversion] Update library to 3.1.5 + +- libmorton `2018-19-07` -> `0.2` + - [(#7738)](https://github.com/microsoft/vcpkg/pull/7738) [libmorton] Update library to 0.2 + +- clp `1.17.2-2` -> `1.17.3` + - [(#7756)](https://github.com/microsoft/vcpkg/pull/7756) [clp] Update library to 1.17.3 + +- libfabric `1.7.1-1` -> `1.8.0` + - [(#7755)](https://github.com/microsoft/vcpkg/pull/7755) [libfabric] Update library to 1.8.0 + +- leaf `0.2.1-2` -> `0.2.2` + - [(#7782)](https://github.com/microsoft/vcpkg/pull/7782) [leaf] Update library to 0.2.2 + +- inih `44` -> `45` + - [(#7780)](https://github.com/microsoft/vcpkg/pull/7780) [inih] Update library to 45 + +- clara `2019-03-29` -> `1.1.5` + - [(#7775)](https://github.com/microsoft/vcpkg/pull/7775) [clara] Update library to 1.1.5 + +- distorm `2018-08-26-16e6f435-1` -> `3.4.1` + - [(#7777)](https://github.com/microsoft/vcpkg/pull/7777) [distorm] Update library to 3.4.1 + +- libcopp `1.1.0-2` -> `1.2.0` + - [(#7770)](https://github.com/microsoft/vcpkg/pull/7770) [libcopp] Update library to 1.2.0 + +- argparse `2019-06-10` -> `1.9` + - [(#7753)](https://github.com/microsoft/vcpkg/pull/7753) [argparse] Update library to 1.9 + +- argagg `2019-01-25` -> `0.4.6` + - [(#7752)](https://github.com/microsoft/vcpkg/pull/7752) [argagg] Update library to 0.4.6 + +- eastl `3.14.00` -> `3.14.01` + - [(#7786)](https://github.com/microsoft/vcpkg/pull/7786) [eastl] Update library to 3.14.01 + +- fribidi `58c6cb3` -> `2019-02-04-1` + - [(#7768)](https://github.com/microsoft/vcpkg/pull/7768) [fribidi] Fix static library suffix in windows-static + +- luajit `2.0.5-1` -> `2.0.5-2` + - [(#7764)](https://github.com/microsoft/vcpkg/pull/7764) [luajit] Separate debug/release build path and fix generate pdbs. + +- ixwebsocket `4.0.3` -> `5.0.4` + - [(#7789)](https://github.com/microsoft/vcpkg/pull/7789) [ixwebsocket] update to 5.0.4 + +- azure-c-shared-utility `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-iot-sdk-c `2019-07-01.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-macro-utils-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-uamqp-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-uhttp-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-umqtt-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- umock-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- embree3 `3.5.2` -> `3.5.2-1` + - [(#7767)](https://github.com/microsoft/vcpkg/pull/7767) [embree3] Fix install path + +- re2 `2019-05-07-2` -> `2019-08-01` + - [(#7808)](https://github.com/microsoft/vcpkg/pull/7808) [re2] Update library to 2019-08-01 + +- reproc `6.0.0-2` -> `8.0.1` + - [(#7807)](https://github.com/microsoft/vcpkg/pull/7807) [reproc] Update library to 8.0.1 + +- safeint `3.20.0` -> `3.21` + - [(#7806)](https://github.com/microsoft/vcpkg/pull/7806) [safeint] Update library to 3.21 + +- snowhouse `3.1.0` -> `3.1.1` + - [(#7805)](https://github.com/microsoft/vcpkg/pull/7805) [snowhouse] Update library to 3.1.1 + +- spectra `0.8.0` -> `0.8.1` + - [(#7803)](https://github.com/microsoft/vcpkg/pull/7803) [spectra] Update library to 0.8.1 + +- spirv-cross `2019-05-09` -> `2019-07-26` + - [(#7802)](https://github.com/microsoft/vcpkg/pull/7802) [spirv-cross] Update library to 2019-07-26 + +- libmodbus `3.1.4-3` -> `3.1.6` + - [(#7834)](https://github.com/microsoft/vcpkg/pull/7834) [libmodbus] Update library to 3.1.6 + +- basisu `0.0.1-1` -> `1.11-1` + - [(#7836)](https://github.com/microsoft/vcpkg/pull/7836) [basisu] fix vcpkg version, merge upstream fixes + +- range-v3 `0.5.0` -> `0.9.0-20190822` + - [(#7845)](https://github.com/microsoft/vcpkg/pull/7845) Update range-v3 reference + +- cryptopp `8.1.0-2` -> `8.2.0` + - [(#7854)](https://github.com/microsoft/vcpkg/pull/7854) [cryptopp] Update library to 8.2.0 + +- lz4 `1.9.1-2` -> `1.9.2` + - [(#7860)](https://github.com/microsoft/vcpkg/pull/7860) [lz4] Update library to 1.9.2 + +- wxwidgets `3.1.2-1` -> `3.1.2-2` + - [(#7833)](https://github.com/microsoft/vcpkg/pull/7833) [wxwidgets] Windows ARM support + +- args `2019-05-01` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- asmjit `2019-03-29` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- aws-c-common `0.3.11-1` -> `0.4.1` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- aws-sdk-cpp `1.7.116` -> `1.7.142` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- bitsery `4.6.0` -> `5.0.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- botan `2.9.0-2` -> `2.11.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- breakpad `2019-05-08` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- chipmunk `7.0.2` -> `7.0.3` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- console-bridge `0.3.2-4` -> `0.4.3-1` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- coroutine `1.4.1-1` -> `1.4.3` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- crc32c `1.0.7-1` -> `1.1.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- exprtk `2019-03-29` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- fastcdr `1.0.9-1` -> `1.0.10` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + - [(#7862)](https://github.com/microsoft/vcpkg/pull/7862) [fastcdr] Update library 1.0.10 + +- fizz `2019.05.20.00-1` -> `2019.07.08.00` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- folly `2019.05.20.00-1` -> `2019.06.17.00` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- glad `0.1.30` -> `0.1.31` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- gmmlib `19.1.2` -> `19.2.3` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- graphite2 `1.3.12-1` -> `1.3.13` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- grpc `1.21.1-1` -> `1.22.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- io2d `0.1-2` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- libarchive `3.3.3-3` -> `3.4.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- libpqxx `6.4.4` -> `6.4.5` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- libssh2 `1.8.2` -> `1.9.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- libuv `1.29.1` -> `1.30.1` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- luabridge `2.3.1` -> `2.3.2` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- matio `1.5.15` -> `1.5.16` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- mosquitto `1.6.2-2` -> `1.6.3` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- ms-gsl `2019-04-19` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- nmslib `1.7.3.6-1` -> `1.8.1` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- nuklear `2019-03-29` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- openvr `1.4.18` -> `1.5.17` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- orc `1.5.5-1` -> `1.5.6` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + - [(#7908)](https://github.com/microsoft/vcpkg/pull/7908) Add homepage for orc + +- parson `2019-04-19` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- piex `2018-03-13-1` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- ptex `2.1.28-1` -> `2.3.2` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- pybind11 `2.2.4` -> `2.3.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- rs-core-lib `2019-05-07` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- shogun `6.1.3-3` -> `6.1.4` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- stb `2019-05-07` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- taocpp-json `2019-05-08` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- tbb `2019_U7-1` -> `2019_U8` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- telnetpp `1.2.4-1` -> `2.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- blaze `3.5` -> `3.6` + - [(#7878)](https://github.com/microsoft/vcpkg/pull/7878) [blaze] Update to Blaze 3.6 + +- glfw3 `3.3-1` -> `3.3-2` + - [(#7885)](https://github.com/microsoft/vcpkg/pull/7885) [glfw3] Add more information about installing dependencies. + +- fmt `5.3.0-2` -> `6.0.0` + - [(#7910)](https://github.com/microsoft/vcpkg/pull/7910) [fmt] Update to 6.0.0 + - [(#7884)](https://github.com/microsoft/vcpkg/pull/7884) [fmt] missing VCPKG_BUILD_TYPE support added + +- magic-enum `2019-06-07` -> `0.6.0` + - [(#7916)](https://github.com/microsoft/vcpkg/pull/7916) [magic-enum] Update to v0.6.0 + +- liblsl `1.13.0-b6` -> `1.13.0-b11-1` + - [(#7906)](https://github.com/microsoft/vcpkg/pull/7906) [liblsl] Update library to 1.13.0-b11 + - [(#7945)](https://github.com/microsoft/vcpkg/pull/7945) [liblsl] Fix installation + +- yaml-cpp `0.6.2-2` -> `0.6.2-3` + - [(#7847)](https://github.com/microsoft/vcpkg/pull/7847) [yaml-cpp] Fix include path in yaml-cpp-config.cmake + +- fluidsynth `2.0.5` -> `2.0.5-1` + - [(#7837)](https://github.com/microsoft/vcpkg/pull/7837) [fluidsynth] add Windows ARM support + +- nmap `7.70` -> `7.70-1` + - [(#7811)](https://github.com/microsoft/vcpkg/pull/7811) [nmap] Fix build error. + +- moos-ui `10.0.1-1` -> `10.0.1-2` + - [(#7812)](https://github.com/microsoft/vcpkg/pull/7812) [moos-ui] Fix install path + +- openni2 `2.2.0.33-9` -> `2.2.0.33-10` + - [(#7809)](https://github.com/microsoft/vcpkg/pull/7809) [openni2] Add warning message when cannot find NETFXSDK. + +- abseil `2019-05-08` -> `2019-05-08-1` + - [(#7745)](https://github.com/microsoft/vcpkg/pull/7745) [abseil] fix cmake config issue + +- libwebp `1.0.2-6` -> `1.0.2-7` + - [(#7886)](https://github.com/microsoft/vcpkg/pull/7886) [libwebp] Fix two dependent windows library link conditions. + +- wpilib `2019.5.1` -> `2019.6.1` + - [(#7927)](https://github.com/microsoft/vcpkg/pull/7927) [wpilib] Update wpilib port to allow opencv4 + +- ogdf `2018-03-28-2` -> `2019-08-23` + - [(#7846)](https://github.com/microsoft/vcpkg/pull/7846) [ogdf] Update source link + +- libp7client `5.2` -> `5.2-1` + - [(#7977)](https://github.com/microsoft/vcpkg/pull/7977) [libp7client] Rename port folder to lowercase + +- libpng `1.6.37-2` -> `1.6.37-3` + - [(#7972)](https://github.com/microsoft/vcpkg/pull/7972) [libpng] Fix find_package() in CONFIG mode (#7968) + +- openblas `0.3.6-5` -> `0.3.6-6` + - [(#7888)](https://github.com/microsoft/vcpkg/pull/7888) [openblas] Enable x86 build and fix usage errors. + +- qt5-base `5.12.3-3` -> `5.12.3-4` + - [(#7973)](https://github.com/microsoft/vcpkg/pull/7973) [Qt5] Fix libpq linkage in wrapper + +- liblas `1.8.1` -> `1.8.1-2` + - [(#7975)](https://github.com/microsoft/vcpkg/pull/7975) [liblas] Fix Geotiff linkage + +- glib `2.52.3-14-2` -> `2.52.3-14-3` + - [(#7963)](https://github.com/microsoft/vcpkg/pull/7963) [glib] Fix install config.h + +
+ +-- vcpkg team vcpkg@microsoft.com THU, 04 Sept 14:00:00 -0800 + vcpkg (2019.7.31) --- #### Total port count: 1105 @@ -659,7 +13150,7 @@ vcpkg (2019.6.30) - [CONTROL files](docs/maintainers/control-files.md#Homepage) - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL - [(#6871)](https://github.com/Microsoft/vcpkg/pull/6871) [docs] Add maintainer guidelines -- [index](docs/index.md) +- [index](docs/README.md) - [(#6871)](https://github.com/Microsoft/vcpkg/pull/6871) [docs] Add maintainer guidelines - [Portfile helper functions](docs/maintainers/portfile-functions.md) - [(#7039)](https://github.com/Microsoft/vcpkg/pull/7039) [docs]Update cmake docs diff --git a/Jenkinsfile b/Jenkinsfile index ded0c2a832fd87..4b7af67b7103f8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,54 +1,66 @@ -node('work-server') { - try { - notify('warning', "STARTED") - - stage ("Clone vcpkg") { - checkout scm - } - - withMaven (maven: "default", mavenSettings: "maven-settings", mavenLocalRepo: ".repository", - options: [ - artifactsPublisher(disabled: true) - ] - ) { - if (env.BRANCH_NAME == 'master') { - pom = readMavenPom file: 'pom.xml' - versionPrefix = pom.getProperties().getProperty('version.prefix') - script { - currentBuild.displayName = "${versionPrefix}-${BUILD_NUMBER}" - } - - stage ("Set versions") { - bat "mvn versions:set -DnewVersion=${versionPrefix}-${BUILD_NUMBER}" - } - - stage ("Deploy vcpkg") { - bat "mvn clean deploy" - } - } - } - - stage ("Clean workspace") { - deleteDir() - } - - notify('good', 'SUCCESS') - - } catch (e) { - currentBuild.result = "FAILED" - notify('danger', 'FAILED') - throw e - } -} +#!/usr/bin/env groovy + +branch = 'vcpkg' + +node('windows-aws-builder-minimal') { + ws('C:\\workspace') { + try { + checkout( + [ + $class: 'GitSCM', + branches: scm.branches, + extensions: scm.extensions + [[$class: 'WipeWorkspace']], + userRemoteConfigs: scm.userRemoteConfigs + ] + ) + + withMaven (maven: 'default', mavenSettings: 'maven-settings', mavenLocalRepo: '.repository', + options: [ + artifactsPublisher(disabled: true) + ] + ) { + if (env.BRANCH_NAME =~ /^release\/vcpkg_.+/) { + pom = readMavenPom file: 'pom.xml' + versionPrefix = pom.getProperties().getProperty('version.prefix') + script { + currentBuild.displayName = "${versionPrefix}.${BUILD_NUMBER}" + } + + stage ('Tag SCM') { + sshagent(['maarcus-teamcity-github-key']) { -def notify(color, message) { - withCredentials([string(credentialsId: 'work-server-slack', variable: 'TOKEN')]) { - slackSend( - channel: '#build-notifications', - color: color, - message: message + ": Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})", - teamDomain: 'work-server', - token: "$TOKEN" - ) + def repoUrl = scm + .getUserRemoteConfigs()[0] + .getUrl() + + bat "git tag ${branch}-${versionPrefix}.${BUILD_NUMBER}" + bat "git push ${repoUrl} ${branch}-${versionPrefix}.${BUILD_NUMBER}" + } + } + + stage ('Build vcpkg.exe') { + bat "bootstrap-vcpkg.bat" + } + + stage ('Build and deploy vcpkg') { + bat 'mvn deploy' + } + } + else { + stage ('Build vcpkg.exe') { + bat "bootstrap-vcpkg.bat" + } + + stage ('Build vcpkg') { + bat 'mvn verify' + } + } + } + } + catch (e) { + echo 'FAILED: ' + e + currentBuild.result = 'FAILED' + throw e + } } -} \ No newline at end of file +} diff --git a/LICENSE.txt b/LICENSE.txt index 375184eafa27bf..2e4eac8264fa4c 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,3 @@ -Port Tree - Copyright (c) Microsoft Corporation All rights reserved. diff --git a/README.md b/README.md index c3f42aa0a292db..936cc16819873f 100644 --- a/README.md +++ b/README.md @@ -1,72 +1,363 @@ -# Vcpkg +# Vcpkg: Overview -## Overview -Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving; your involvement is vital to its success! +[中文总览](README_zh_CN.md) +[Español](README_es.md) +[한국어](README_ko_KR.md) +[Français](README_fr.md) -For short description of available commands, run `vcpkg help`. +Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. +This tool and ecosystem are constantly evolving, and we always appreciate contributions! + +If you've never used vcpkg before, or if you're trying to figure out how to use vcpkg, +check out our [Getting Started](#getting-started) section for how to start using vcpkg. + +For short description of available commands, once you've installed vcpkg, +you can run `vcpkg help`, or `vcpkg help [command]` for command-specific help. + +* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) +* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), the #vcpkg channel +* Discord: [\#include \](https://www.includecpp.org), the #ðŸŒvcpkg channel +* Docs: [Documentation](docs/README.md) + +[![Build Status](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master) + +# Table of Contents + +- [Vcpkg: Overview](#vcpkg-overview) +- [Table of Contents](#table-of-contents) +- [Getting Started](#getting-started) + - [Quick Start: Windows](#quick-start-windows) + - [Quick Start: Unix](#quick-start-unix) + - [Installing Linux Developer Tools](#installing-linux-developer-tools) + - [Installing macOS Developer Tools](#installing-macos-developer-tools) + - [Installing GCC for macOS before 10.15](#installing-gcc-for-macos-before-1015) + - [Using vcpkg with CMake](#using-vcpkg-with-cmake) + - [Visual Studio Code with CMake Tools](#visual-studio-code-with-cmake-tools) + - [Vcpkg with Visual Studio CMake Projects](#vcpkg-with-visual-studio-cmake-projects) + - [Vcpkg with CLion](#vcpkg-with-clion) + - [Vcpkg as a Submodule](#vcpkg-as-a-submodule) +- [Tab-Completion/Auto-Completion](#tab-completionauto-completion) +- [Examples](#examples) +- [Contributing](#contributing) +- [License](#license) +- [Telemetry](#telemetry) + +# Getting Started + +First, follow the quick start guide for either +[Windows](#quick-start-windows), or [macOS and Linux](#quick-start-unix), +depending on what you're using. + +For more information, see [Installing and Using Packages][getting-started:using-a-package]. +If a library you need is not present in the vcpkg catalog, +you can [open an issue on the GitHub repo][contributing:submit-issue] +where the vcpkg team and community can see it, +and potentially add the port to vcpkg. + +After you've gotten vcpkg installed and working, +you may wish to add [tab completion](#tab-completionauto-completion) to your shell. + +Finally, if you're interested in the future of vcpkg, +check out the [manifest][getting-started:manifest-spec] guide! +This is an experimental feature and will likely have bugs, +so try it out and [open all the issues][contributing:submit-issue]! + +## Quick Start: Windows -## Quick Start Prerequisites: -- Windows 10, 8.1, 7, Linux, or MacOS -- Visual Studio 2015 Update 3 or newer (on Windows) -- Git -- *Optional:* CMake 3.12.4 +- Windows 7 or newer +- [Git][getting-started:git] +- [Visual Studio][getting-started:visual-studio] 2015 Update 3 or greater with the English language pack + +First, download and bootstrap vcpkg itself; it can be installed anywhere, +but generally we recommend using vcpkg as a submodule for CMake projects, +and installing it globally for Visual Studio projects. +We recommend somewhere like `C:\src\vcpkg` or `C:\dev\vcpkg`, +since otherwise you may run into path issues for some port build systems. + +```cmd +> git clone https://github.com/microsoft/vcpkg +> .\vcpkg\bootstrap-vcpkg.bat +``` + +To install the libraries for your project, run: + +```cmd +> .\vcpkg\vcpkg install [packages to install] +``` + +Note: This will install x86 libraries by default. To install x64, run: + +```cmd +> .\vcpkg\vcpkg install [package name]:x64-windows +``` + +Or + +```cmd +> .\vcpkg\vcpkg install [packages to install] --triplet=x64-windows +``` + +You can also search for the libraries you need with the `search` subcommand: + +```cmd +> .\vcpkg\vcpkg search [search term] +``` + +In order to use vcpkg with Visual Studio, +run the following command (may require administrator elevation): + +```cmd +> .\vcpkg\vcpkg integrate install +``` + +After this, you can now create a New non-CMake Project (or open an existing one). +All installed libraries are immediately ready to be `#include`'d and used +in your project without additional configuration. + +If you're using CMake with Visual Studio, +continue [here](#vcpkg-with-visual-studio-cmake-projects). + +In order to use vcpkg with CMake outside of an IDE, +you can use the toolchain file: + +```cmd +> cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +> cmake --build [build directory] +``` + +With CMake, you will still need to `find_package` and the like to use the libraries. +Check out the [CMake section](#using-vcpkg-with-cmake) for more information, +including on using CMake with an IDE. + +For any other tools, including Visual Studio Code, +check out the [integration guide][getting-started:integration]. + +## Quick Start: Unix + +Prerequisites for Linux: +- [Git][getting-started:git] +- [g++][getting-started:linux-gcc] >= 6 + +Prerequisites for macOS: +- [Apple Developer Tools][getting-started:macos-dev-tools] +- On macOS 10.14 or below, you will also need: + - [Homebrew][getting-started:macos-brew] + - [g++][getting-started:macos-gcc] >= 6 from Homebrew + +First, download and bootstrap vcpkg itself; it can be installed anywhere, +but generally we recommend using vcpkg as a submodule for CMake projects. + +```sh +$ git clone https://github.com/microsoft/vcpkg +$ ./vcpkg/bootstrap-vcpkg.sh +``` + +To install the libraries for your project, run: + +```sh +$ ./vcpkg/vcpkg install [packages to install] +``` + +You can also search for the libraries you need with the `search` subcommand: + +```sh +$ ./vcpkg/vcpkg search [search term] +``` + +In order to use vcpkg with CMake, you can use the toolchain file: + +```sh +$ cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +$ cmake --build [build directory] +``` + +With CMake, you will still need to `find_package` and the like to use the libraries. +Check out the [CMake section](#using-vcpkg-with-cmake) +for more information on how best to use vcpkg with CMake, +and CMake Tools for VSCode. + +For any other tools, check out the [integration guide][getting-started:integration]. + +## Installing Linux Developer Tools + +Across the different distros of Linux, there are different packages you'll +need to install: + +- Debian, Ubuntu, popOS, and other Debian-based distributions: + +```sh +$ sudo apt-get update +$ sudo apt-get install build-essential tar curl zip unzip +``` + +- CentOS + +```sh +$ sudo yum install centos-release-scl +$ sudo yum install devtoolset-7 +$ scl enable devtoolset-7 bash +``` + +For any other distributions, make sure you're installing g++ 6 or above. +If you want to add instructions for your specific distro, +[please open a PR][contributing:submit-pr]! + +## Installing macOS Developer Tools + +On macOS 10.15, the only thing you should need to do is run the following in your terminal: + +```sh +$ xcode-select --install +``` + +Then follow along with the prompts in the windows that comes up. + +On macOS 10.14 and previous, you'll also need to install g++ from homebrew; +follow the instructions in the following section. + +### Installing GCC for macOS before 10.15 + +This will _only_ be necessary if you're using a macOS version from before 10.15. +Installing homebrew should be very easy; check out for more information, +but at its simplest, run the following command: + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +``` + +Then, in order to grab an up-to-date version of gcc, run the following: -To get started: +```sh +$ brew install gcc ``` -> git clone https://github.com/Microsoft/vcpkg.git -> cd vcpkg -PS> .\bootstrap-vcpkg.bat -Linux:~/$ ./bootstrap-vcpkg.sh +You'll then be able to bootstrap vcpkg along with the [quick start guide](#quick-start-unix) + +## Using vcpkg with CMake + +If you're using vcpkg with CMake, the following may help! + +### Visual Studio Code with CMake Tools + +Adding the following to your workspace `settings.json` will make +CMake Tools automatically use vcpkg for libraries: + +```json +{ + "cmake.configureSettings": { + "CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake" + } +} ``` -Then, to hook up user-wide [integration](docs/users/integration.md), run (note: requires admin on first use) +### Vcpkg with Visual Studio CMake Projects + +Open the CMake Settings Editor, and under `CMake toolchain file`, +add the path to the vcpkg toolchain file: + ``` -PS> .\vcpkg integrate install -Linux:~/$ ./vcpkg integrate install +[vcpkg root]/scripts/buildsystems/vcpkg.cmake ``` -Install any packages with +### Vcpkg with CLion + +Open the Toolchains settings +(File > Settings on Windows and Linux, CLion > Preferences on macOS), +and go to the CMake settings (Build, Execution, Deployment > CMake). +Finally, in `CMake options`, add the following line: + +``` +-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake ``` -PS> .\vcpkg install sdl2 curl -Linux:~/$ ./vcpkg install sdl2 curl + +Unfortunately, you'll have to add this to each profile. + +### Vcpkg as a Submodule + +When using vcpkg as a submodule of your project, +you can add the following to your CMakeLists.txt before the first `project()` call, +instead of passing `CMAKE_TOOLCHAIN_FILE` to the cmake invocation. + +```cmake +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake + CACHE STRING "Vcpkg toolchain file") ``` -The best way to use installed libraries with CMake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake`. +This will still allow people to not use vcpkg, +by passing the `CMAKE_TOOLCHAIN_FILE` directly, +but it will make the configure-build step slightly easier. -In Visual Studio, you can create a New Project (or open an existing one). All installed libraries are immediately ready to be `#include`'d and used in your project without additional configuration. +[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md +[getting-started:integration]: docs/users/integration.md +[getting-started:git]: https://git-scm.com/downloads +[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools +[getting-started:linux-gcc]: #installing-linux-developer-tools +[getting-started:macos-dev-tools]: #installing-macos-developer-tools +[getting-started:macos-brew]: #installing-gcc-on-macos +[getting-started:macos-gcc]: #installing-gcc-on-macos +[getting-started:visual-studio]: https://visualstudio.microsoft.com/ +[getting-started:manifest-spec]: docs/specifications/manifests.md -For more information, see our [using a package](docs/examples/installing-and-using-packages.md) example for the specifics. If your library is not present in vcpkg catalog, you can open an [issue on the GitHub repo](https://github.com/microsoft/vcpkg/issues) where the dev team and the community can see it and potentially create the port file for this library. +# Tab-Completion/Auto-Completion -Additional notes on macOS and Linux support can be found in the [official announcement](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/). +`vcpkg` supports auto-completion of commands, package names, +and options in both powershell and bash. +To enable tab-completion in the shell of your choice, run: -## Tab-Completion / Auto-Completion -`vcpkg` supports auto-completion of commands, package names, options etc in Powershell and bash. To enable tab-completion, use one of the following: +```pwsh +> .\vcpkg integrate powershell ``` -PS> .\vcpkg integrate powershell -Linux:~/$ ./vcpkg integrate bash + +or + +```sh +$ ./vcpkg integrate bash ``` -and restart your console. +depending on the shell you use, then restart your console. -## Examples -See the [documentation](docs/index.md) for specific walkthroughs, including [installing and using a package](docs/examples/installing-and-using-packages.md), [adding a new package from a zipfile](docs/examples/packaging-zipfiles.md), and [adding a new package from a GitHub repo](docs/examples/packaging-github-repos.md). +# Examples -Our docs are now also available online at ReadTheDocs: ! +See the [documentation](docs/README.md) for specific walkthroughs, +including [installing and using a package](docs/examples/installing-and-using-packages.md), +[adding a new package from a zipfile](docs/examples/packaging-zipfiles.md), +and [adding a new package from a GitHub repo](docs/examples/packaging-github-repos.md). + +Our docs are now also available online at our website https://vcpkg.io/. We really appreciate any and all feedback! You can submit an issue in https://github.com/vcpkg/vcpkg.github.io/issues. See a 4 minute [video demo](https://www.youtube.com/watch?v=y41WFKbQFTw). -## Contributing -Vcpkg is built with your contributions. Here are some ways you can contribute: +# Contributing + +Vcpkg is an open source project, and is thus built with your contributions. +Here are some ways you can contribute: + +* [Submit Issues][contributing:submit-issue] in vcpkg or existing packages +* [Submit Fixes and New Packages][contributing:submit-pr] + +Please refer to our [Contributing Guide](CONTRIBUTING.md) for more details. + +This project has adopted the [Microsoft Open Source Code of Conduct][contributing:coc]. +For more information see the [Code of Conduct FAQ][contributing:coc-faq] +or email [opencode@microsoft.com](mailto:opencode@microsoft.com) +with any additional questions or comments. + +[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose +[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls +[contributing:coc]: https://opensource.microsoft.com/codeofconduct/ +[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/ -* [Submit Issues](https://github.com/Microsoft/vcpkg/issues) in vcpkg or existing packages -* [Submit Fixes and New Packages](https://github.com/Microsoft/vcpkg/pulls) +# License -Please refer to our [Contribution guidelines](CONTRIBUTING.md) for more details. +The code in this repository is licensed under the [MIT License](LICENSE.txt). -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +# Telemetry -## License +vcpkg collects usage data in order to help us improve your experience. +The data collected by Microsoft is anonymous. +You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics, +passing --disable-metrics to vcpkg on the command line, +or by setting the VCPKG_DISABLE_METRICS environment variable. -Code licensed under the [MIT License](LICENSE.txt). +Read more about vcpkg telemetry at docs/about/privacy.md diff --git a/README_es.md b/README_es.md new file mode 100644 index 00000000000000..0ed0474f63d1d2 --- /dev/null +++ b/README_es.md @@ -0,0 +1,418 @@ +# Vcpkg + +[中文总览](README_zh_CN.md) +[English](README.md) +[한국어](README_ko_KR.md) +[Français](README_fr.md) + +Vcpkg ayuda a manejar librerías de C y C++ en Windows, Linux y MacOS. +Esta herramienta y ecosistema se encuentran en constante evolución ¡Siempre apreciamos contribuciones nuevas! + +Si nunca ha usado Vcpkg antes, +o si está intentando aprender a usar vcpkg, consulte nuestra sección +[Primeros pasos](#primeros-pasos) para iniciar a usar Vcpkg. + +Para una descripción corta de los comandos disponibles, +una vez instalado Vcpkg puede ejecutar `vcpkg help`, o +`vcpkg help [comando]` para obtener ayuda específica de un comando. + +* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) +* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), en el canal #vcpkg +* Discord: [\#include \](https://www.includecpp.org), en el canal #ðŸŒvcpkg +* Docs: [Documentación](docs/README.md) + +[![Estado de compilación](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master) + +## Tabla de contenido + +* [Vcpkg: General](#vcpkg-general) +* [Tabla de contenidos](#tabla-de-contenidos) +* ["Primeros pasos"](#primeros-pasos) + + [Inicio rápido: Windows](#inicio-rápido-windows) + + [Inicio rápido: Unix](#inicio-rápido-unix) + + [Instalando herramientas de desarrollo en Linux](#instalando-herramientas-de-desarrollo-en-Linux) + + [Instalando herramientas de desarrollo en macOS](#instalando-herramientas-de-desarrollo-en-macos) + - [Instalando GCC en MacOS previo a 10.15](#instalando-gcc-en-macos-previo-a-10.15) + + [Usando Vcpkg con CMake](#usando-vcpkg-con-cmake) + - [Visual Studio Code con CMake Tools](#visual-studio-code-con-cmake-tools) + - [Vcpkg con proyectos de Visual Studio (CMake)](#vcpkg-con-proyectos-de-visual-studio\(CMake\)) + - [Vcpkg con CLion](#vcpkg-con-clion) + - [Vcpkg como submódulo](#vcpkg-como-submódulo) + + [Inicio rápido: archivos de Manifiesto](#inicio-rápido-manifiestos) +* [Tab-Completado/Autocompletado](#Completado-TabAutocompletado) +* [Ejemplos](#ejemplos) +* [Contribuyendo](#contribuyendo) +* [Licencia](#licencia) +* [telemetría](#telemetría) + +## Primeros pasos + +Antes de iniciar, siga la guía ya sea para [Windows](#inicio-rápido-windows), +o [macOS y Linux](#inicio-rápido-unix) dependiendo del SO que use. + +Para más información, ver [Instalando y Usando Paquetes][getting-started:using-a-package]. +Si una librería que necesita no está presente en el catálogo de vcpkg, +puede [abrir una incidencia en el repositorio de GitHub][contributing:submit-issue] +donde el equipo de vcpkg y la comunidad pueden verlo, y potencialmente hacer un port a vcpkg. + +Después de tener Vcpkg instalado y funcionando, +puede que desee añadir [completado con tab](#Completado-TabAuto-Completado) en su terminal. + +Finalmente, si está interesado en el futuro de Vcpkg, +puede ver la guía de [archivos de manifiesto][getting-started:manifest-spec]! +esta es una característica experimental y es probable que tenga errores, +así que se recomienda revisar y [crear incidencias][contributing:submit-issue]! + +### Inicio Rápido: Windows + +Prerrequisitos: + +- Windows 7 o superior +- [Git][getting-started:git] +- [Visual Studio][getting-started:visual-studio] 2015 Update 3 o superior con el paquete Inglés de Visual Studio. + +Primero, descargue y compile vcpkg; puede ser instalado en cualquier lugar, +pero generalmente recomendamos usar vcpkg como submódulo para proyectos de CMake, +e instalándolo globalmente para Proyectos de Visual Studio. +recomendamos un lugar como `C:\src\vcpkg` o `C:\dev\vcpkg`, +ya que de otra forma puede encontrarse problemas de ruta para algunos sistemas de port. + +```cmd +> git clone https://github.com/microsoft/vcpkg +> .\vcpkg\bootstrap-vcpkg.bat +``` + +Para instalar las librerías para su proyecto, ejecute: + +```cmd +> .\vcpkg\vcpkg install [paquetes a instalar] +``` + +también puede buscar librerías que necesite usar el comando `search`: + +```cmd +> .\vcpkg\vcpkg search [término de búsqueda] +``` + +Para poder utilizar vcpkg con Visual Studio, +ejecute el siguiente comando (puede requerir privilegios de administrador): + +```cmd +> .\vcpkg\vcpkg integrate install +``` + +Después de esto, puede crear un nuevo proyecto que no sea de CMake(MSBuild) o abrir uno existente. +Todas las librerías estarán listas para ser incluidas y +usadas en su proyecto sin configuración adicional. + +Si está usando CMake con Visual Studio, +continúe [aquí](#vcpkg-con-proyectos-de-visual-studio\(CMake\)). + +Para utilizar Vcpkg con CMake sin un IDE, +puede utilizar el archivo de herramientas incluido: + +```cmd +> cmake -B [directorio de compilación] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +> cmake --build [directorio de compilación] +``` + +Con CMake, todavía necesitara `find_package` y las configuraciones adicionales de la librería. +Revise la [Sección de Cmake](#usando-vcpkg-con-cmake) para más información, +incluyendo el uso de CMake con un IDE. + +Para cualquier otra herramienta, incluyendo Visual Studio Code, +reviste la [guía de integración][getting-started:integration]. + +### Inicio rápido: Unix + +Prerrequisitos para Linux: + +- [Git][getting-started:git] +- [G++/GCC][getting-started:linux-gcc] >= 6 + +Prerrequisitos para macOS: + +- [Herramientas de desarrollo de Apple][getting-started:macos-dev-tools] +- En macOS 10.14 o inferior, también necesita: + - [Homebrew][getting-started:macos-brew] + - [g++][getting-started:macos-gcc] >= 6 de Homebrew + +Primero, descargue y compile vcpkg, puede ser instalado donde sea, +pero recomendamos usar vcpkg como submodulo para proyectos de CMake. + +```sh +$ git clone https://github.com/microsoft/vcpkg +$ ./vcpkg/bootstrap-vcpkg.sh +``` + +Para instalar las librerías para su proyecto, ejecute: + +```sh +$ ./vcpkg/vcpkg install [paquetes a instalar] +``` + +Nota: por defecto se instalarán las librerías x86, para instalar x64, ejecute: + +```cmd +> .\vcpkg\vcpkg install [paquete a instalar]:x64-windows +``` + +O si desea instalar varios paquetes: + +```cmd +> .\vcpkg\vcpkg install [paquetes a instalar] --triplet=x64-windows +``` + +También puede buscar las librerías que necesita con el subcomando `search`: + +```sh +$ ./vcpkg/vcpkg search [término de búsqueda] +``` + +Para usar vcpkg con CMake, tiene que usar el siguiente archivo toolchain: + +```sh +$ cmake -B [directorio de compilación] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +$ cmake --build [directorio de compilación] +``` + +Con CMake, todavía necesitara `find_package` y las configuraciones adicionales de la librería. +Revise la [Sección de CMake](#usando-vcpkg-con-cmake) +para más información en cómo aprovechar mejor Vcpkg con CMake, +y CMake tools para VSCode. + +Para cualquier otra herramienta, visite la [guía de integración][getting-started:integration]. + +### Instalando Herramientas de desarrollo en Linux + +Según las distribuciones de Linux, hay diferentes paquetes +que necesitará instalar: + +- Debian, Ubuntu, popOS, y otra distribución basada en Debian: + +```sh +$ sudo apt-get update +$ sudo apt-get install build-essential tar curl zip unzip +``` + +- CentOS + +```sh +$ sudo yum install centos-release-scl +$ sudo yum install devtoolset-7 +$ scl enable devtoolset-7 bash +``` + +Para cualquier otra distribución, asegúrese que dispone de g++ 6 o superior. +Si desea añadir instrucción para una distribución específica, +[cree un pull request][contributing:submit-pr] + +### Instalando Herramientas de desarrollo en macOS + +En macOS 10.15, solo tiene que ejecutar el siguiente comando en la terminal: + +```sh +$ xcode-select --install +``` + +Luego seguir los pasos que aparecerán en las ventanas que se muestran. + +En macOS 10.14 y previos, también requiere instalar g++ de homebrew; +siguiendo los pasos en la sección siguiente. + +#### Instalando GCC en macOS previo a 10.15 + +Este paso _solo_ es requerido si está usando una versión de macOS previa a 10.15. +Instalar homebrew debería ser sencillo; visite para mas información, +pero de manera simple, ejecute el siguiente comando: + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +``` + +luego, para obtener una versión actualizada de gcc, ejecute el comando: + +```sh +$ brew install gcc +``` + +Posteriormente podrá compilar vcpkg junto con la [guía de inicio rápido](#inicio-rápido-unix) + +### Usando Vcpkg con CMake + +¡Si está usando Vcpkg con CMake, lo siguiente puede ayudar! + +#### Visual Studio Code con CMake Tools + +Agregando lo siguiente al espacio de trabajo `settings.json` permitirá que +CMake Tools use automáticamente Vcpkg para las librerías: + +```json +{ + "cmake.configureSettings": { + "CMAKE_TOOLCHAIN_FILE": "[raíz de vcpkg]/scripts/buildsystems/vcpkg.cmake" + } +} +``` + +#### Vcpkg con proyectos de Visual Studio(CMake) + +Abra el editor de Ajustes de CMake, bajo la sección `CMake toolchain file`, +posteriormente agregue al path el archivo de cadena de herramientas de Vcpkg: + +```sh +[raíz de vcpkg]/scripts/buildsystems/vcpkg.cmake +``` + +#### Vcpkg con CLion + +Abra los ajustes de Cadena de Herramientas (Toolchains) +(File > Settings en Windows y Linux, Clion > Preferences en macOS), +y entre en la sección de ajustes de CMake (Build, Execution, Deployment > CMake). +Finalmente, en `CMake options`, agregue la línea siguiente: + +```sh +-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +Desafortunadamente, tendrá que hacerlo para cada perfil. + +#### Vcpkg como Submódulo + +Cuando este usando Vcpkg como un submódulo para su proyecto, +puede agregar lo siguiente as su CMakeLists,txt antes de la primera llamada a `project()`, +en vez de pasar `CMAKE_TOOLCHAIN_FILE` a la invocación de CMake. + +```cmake +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake + CACHE STRING "Vcpkg toolchain file") +``` + +Esto permitirá a las personas no usar Vcpkg, +indicando el `CMAKE_TOOLCHAIN_FILE` directamente, +sin embargo, hará el proceso de configuración y compilación más sencillo. + +### Inicio rápido: Manifiestos + +Así que desea ver cómo será el futuro de Vcpkg! +realmente lo apreciamos. Sin embargo, primero una advertencia: +el soporte de archivos de manifiesto aún está en beta, +aun así la mayoría debería funcionar, +pero no hay garantía de esto y es muy probable que encuentre uno o más bugs +mientras use Vcpkg en este modo. +Adicionalmente, es probablemente que se rompan comportamientos antes de que se pueda considerar estable, +así que está advertido. +Por favor [Abra un Problema][contributing:submit-issue] si encuentra algún error + +Primero, instale vcpkg normalmente para [Windows](#inicio-rápido-windows) o +[Unix](#inicio-rápido-unix). +Puede que desee instalar Vcpkg en un lugar centralizado, +ya que el directorio existe localmente, +y está bien ejecutar múltiples comandos desde el mismo directorio de vcpkg al mismo tiempo. + +Luego, se requiere activar la bandera de característica `manifests` en vcpkg agregando +`manifests` a los valores separados por coma en la opción `--feature-flags`, +o agregándole en los valores separados por coma en la variable de entorno `VCPKG_FEATURE_FLAGS` + +también puede que desee agregar Vcpkg al `PATH`. + +Luego, todo lo que hay que hacer es crear un manifiesto; +cree un archivo llamado `vcpkg.json`, y escriba lo siguiente: + +```json +{ + "name": "", + "version-string": "", + "dependencies": [ + "abseil", + "boost" + ] +} +``` + +Las librerías serán instaladas en el directorio `vcpkg_installed`, +en el mismo directorio que su `vcpkg.json`. +Si puede usar el regular conjunto de herramientas de CMake, +o mediante la integración de Visual Studio/MSBuild, +este instalará las dependencias automáticamente, +pero necesitará ajustar `VcpkgManifestEnabled` en `On` para MSBuild. +Si desea instalar sus dependencias sin usar CMake o MSBuild, +puede usar un simple `vcpkg install --feature-flags=manifests` + +Para más información, revise la especificación de [manifiesto][getting-started:manifest-spec] + +[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md +[getting-started:integration]: docs/users/integration.md +[getting-started:git]: https://git-scm.com/downloads +[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools +[getting-started:linux-gcc]: #installing-linux-developer-tools +[getting-started:macos-dev-tools]: #installing-macos-developer-tools +[getting-started:macos-brew]: #installing-gcc-on-macos +[getting-started:macos-gcc]: #installing-gcc-on-macos +[getting-started:visual-studio]: https://visualstudio.microsoft.com/ +[getting-started:manifest-spec]: docs/specifications/manifests.md + +## Completado-Tab/Autocompletado + +`vcpkg` soporta autocompletado para los comandos, nombres de paquetes, +y opciones, tanto en PowerShell como en bash. +para activar el autocompletado en la terminal de elección ejecute: + +```pwsh +> .\vcpkg integrate powershell +``` + +o + +```sh +$ ./vcpkg integrate bash +``` + +según la terminal que use, luego reinicie la consola. + +## Ejemplos + +ver la [documentación](docs/README.md) para tutoriales específicos, incluyendo +[instalando y usando un paquete](docs/examples/installing-and-using-packages.md), +[agregando un nuevo paquete desde un archivo comprimido](docs/examples/packaging-zipfiles.md), +[agregando un nuevo paquete desde un repositorio en GitHub](docs/examples/packaging-github-repos.md). + +Nuestra documentación también esta disponible en nuestro sitio web [vcpkg.io](https://vcpkg.io/). +Si necesita ayuda puede [crear un incidente](https://github.com/vcpkg/vcpkg.github.io/issues). +¡Apreciamos cualquier retroalimentación! + +Ver un [video de demostración](https://www.youtube.com/watch?v=y41WFKbQFTw) de 4 minutos. + +## Contribuyendo + +Vcpkg es un proyecto de código abierto, y está construido con sus contribuciones. +Aquí hay unas de las maneras en las que puede contribuir: + +* [Creando Incidencias][contributing:submit-issue] en vcpkg o paquetes existentes +* [Creando Correcciones y Nuevos Paquetes][contributing:submit-pr] + +Por favor visite nuestra [Guía de Contribución](CONTRIBUTING.md) para más detalles. + +Este proyecto ha adoptado el [Código de Conducta de Microsoft de Código Abierto][contributing:coc]. +Para más información ver [Preguntas frecuentes del Código de Conducta][contributing:coc-faq] +o envíe un correo a [opencode@microsoft.com](mailto:opencode@microsoft.com) +con cualquier pregunta adicional o comentarios. + +[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose +[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls +[contributing:coc]: https://opensource.microsoft.com/codeofconduct/ +[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/ + +## Licencia + +El código en este repositorio se encuentra licenciado mediante la [Licencia MIT](LICENSE.txt). + +## Telemetría + +vcpkg recolecta datos de uso para mejorar su experiencia. +La información obtenida por Microsoft es anónima. +puede ser dado de baja de la telemetría ejecutando de nuevo el script `bootstrap-vcpkg` con `-disableMetrics`, +pasando `--disable-metrics` a vcpkg en la línea de comandos, +o creando la variable de entorno `VCPKG_DISABLE_METRICS`. + +Se puede leer más sobre la telemetría de vcpkg en docs/about/privacy.md diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 00000000000000..f39c09b03d942a --- /dev/null +++ b/README_fr.md @@ -0,0 +1,311 @@ +# Vcpkg: Vue d'ensemble + +[中文总览](README_zh_CN.md) +[Español](README_es.md) + +Vcpkg vous aide à gérer vos bibliothèques C et C++ sur Windows, Linux et MacOS. +L'outil et l'écosystème sont en évolution constante, et nous apprécions vos contributions! + +Si vous n'avez jamais utilisé vcpkg, ou si vous essayez d'utiliser vcpkg, lisez notre [introduction](#introduction) pour comprendre comment l'utiliser. + +Pour une description des commandes disponibles, quand vous avez installé vcpkg, vous pouvez lancer `vcpkg help` ou `vcpkg help [commande]` pour de l'aide spécifique à une commande. + + +* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) +* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), the #vcpkg channel +* Discord: [\#include \](https://www.includecpp.org), le canal #ðŸŒvcpkg +* Docs: [Documentation](docs/README.md) + +[![Build Status](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master) + +# Sommaire + +- [Vcpkg: Vue d'ensemble](#vcpkg-vue-d'ensemble) +- [Sommaire](#Sommaire) +- [Introduction](#introduction) + - [Introduction Windows](#Introduction:-Windows) + - [Introduction Unix](#Introduction-aux-Systèmes-Unix) + - [Installer les prérequis pour linux](#installation-des-prérequis-linux) + - [Installer les prérequis pour macOS](#installation-des-prérequis-macos) + - [Installer GCC pour macOS avant 10.15](#installer-gcc-pour-macos-avant-10.15) + - [Utiliser vcpkg avec CMake](#utiliser-vcpkg-avec-cmake) + - [Visual Studio Code avec CMake Tools](#visual-studio-code-avec-cmake-tools) + - [Vcpkg avec Visual Studio pour un projet CMake](#vcpkg-avec-visual-studio-un-projet-cmake) + - [Vcpkg avec CLion](#vcpkg-avec-clion) + - [Vcpkg en tant que sous module](#vcpkg-en-tant-que-sous-module) + - [Tab-Completion/Auto-Completion](#tab-complétionauto-complétion) + - [Exemples](#exemples) + - [Contribuer](#contribuer) + - [Licence](#licence) + - [Télémétrie](#Télémétrie) + +# Introduction + +Premièrement, suivez le guide d'introduction [Windows](#Introduction:-Windows), ou [macOS et Linux](#Unix), en fonction de vos besoins. + +Pour plus d'information, regardez [utiliser des paquets][getting-started:utiliser-un-paquet]. +Si la bibliothèque dont vous avez besoin n'est pas présente dans la liste, vous pouvez [ouvrir une issue sur le repo github](contribuer:faire-une-issue) où l'équipe de vcpkg et la communauté peuvent le voir, et possiblement ajouter le port de vcpkg. + +Après avoir installé et lancé vcpkg vous pourriez vouloir ajouter [l'auto-complétion](auto-completion) à votre shell. + +Si vous êtes intéressé par le futur de vcpkg, regardez le guide du [manifeste][getting-started:manifest-spec] ! +C'est une fonctionnalité expérimentale et possiblement boguée, donc essayez d'[ouvrir des issues](contribuer:envoyer-une-issue) ! + +# Introduction: Windows +Prérequis : + - Windows 7 ou plus + - [Git][getting-started:git] + + [Visual Studio][getting-started:visualstudio] 2015 mise à jour 3 où plus récente avec le pack de langue Anglais + +Premièrement, téléchargez et lancer le fichier bootstrap-vcpkg; il peut être installé n'importe où mais il est recommandé d'utiliser vcpkg pour des projets CMake. Nous recommandons ces chemins `C:\src\vcpkg` ou `C:\dev\vcpkg`, sinon vous pourriez avoir des problèmes de chemin pour certaines compilations. + + +```cmd +> git clone https://github.com/microsoft/vcpkg +> .\vcpkg\bootstrap-vcpkg.bat +``` + +Pour installer des bibliothèques pour votre projet, lancez: + +```cmd +> .\vcpkg\vcpkg install [paquets à installer] +``` + +Vous pouvez aussi chercher la bibliothèque dont vous avez besoin avec l'argument `search`: + +```cmd +> .\vcpkg\vcpkg search [terme de recherche] +``` + + +Pour utiliser vcpkg avec Visual Studio, lancez cette commande (pourrait nécessiter d'être lancée avec les droits administrateur) + +```cmd +> .\vcpkg\vcpkg integrate install +``` + +Ensuite, vous pouvez créer un nouveau projet n'utilisant pas CMake (ou en ouvrir un préexistant). +Toutes les bibliothèques installées sont directement prêtes à être `#include` et utilisées sans davantage de configuration. + +Si vous utilisez CMake avec Visual Studio continuez [ici](#vcpkg-avec-cmake-et-visual-studio). + +Afin d'utiliser vcpkg en dehors d'un IDE, vous pouvez utiliser le fichier de toolchain : + +```cmd +> cmake -B [dossier de build] -S . -DCMAKE_TOOLCHAIN_FILE=[chemin vers vcpkg]/scripts/buildsystems/vcpkg.cmake +> cmake --build [dossier de build] +``` + +Avec CMake, vous devrez utiliser `find_package` notamment, et autres, pour compiler. + +Regardez la [section CMake](#utiliser-vcpkg-avec-cmake) pour plus d'information, notamment utiliser CMake avec un IDE. + +Pour les autres éditeurs, y compris Visual Studio Code regardez le [guide d'intégration](getting-started:integration). + + +## Introduction aux Systèmes Unix + +Prérequis pour Linux : +- [Git][getting-started:git] +- [g++][getting-started:linux-gcc] >= 6 + +Prérequis pour macOS: +- [Outils de développement Apple][getting-started:macos-dev-tools] +- Pour macOS 10.14 et en dessous, vous aurez besoin de: + - [Homebrew][getting-started:macos-brew] + - [g++][getting-started:macos-gcc] >= 6 + +Premièrement, clonez et lancez le bootstrap vcpkg; il peut être installé n'importe où mais il est recommandé de l'utiliser comme un sous-module pour projets CMake. + +```sh +$ git clone https://github.com/microsoft/vcpkg +$ ./vcpkg/bootstrap-vcpkg.sh +``` + +Pour installer des bibliothèques pour votre projet, lancez : + +```sh +$ ./vcpkg/vcpkg install [paquets à installer] +``` + +Vous pouvez aussi chercher la bibliothèque dont vous avez besoin avec l'argument `search` : + + +```sh +$ ./vcpkg/vcpkg search [terme de recherche] +``` + +Pour utiliser vcpkg en dehors d'un IDE, vous pouvez utiliser le fichier de toolchain : + +```cmd +> cmake -B [dossier de build] -S . -DCMAKE_TOOLCHAIN_FILE=[chemin vers vcpkg]/scripts/buildsystems/vcpkg.cmake +> cmake --build [dossier de build] +``` + +Avec CMake, vous devrez utiliser `find_package` notamment, et autres, pour compiler. + +Lisez la [section CMake](#utiliser-vcpkg-avec-cmake) pour plus d'information, notamment utiliser CMake avec un IDE. + +Pour les autres éditeurs, y compris Visual Studio Code lisez le [guide d'intégration][getting-started:integration]. + +## Installation des prérequis linux + +Pour les différentes distros Linux, il y a différents paquets que vous aurez besoin d'installer : + +- Debian, Ubuntu, popOS, et les autres distros basées sur Debian : + +```sh +$ sudo apt-get update +$ sudo apt-get install build-essential tar curl zip unzip +``` + +- CentOS + +```sh +$ sudo yum install centos-release-scl +$ sudo yum install devtoolset-7 +$ scl enable devtoolset-7 bash +``` + +Pour les autres distributions, installez au minimum g++ 6. +Si vous voulez ajouter des instructions spécifiques pour votre distro, [ouvrez une PR svp][contribuer:faire-une-pr] ! + +## Installation des prérequis macOS + +Pour macOS 10.15, la seule chose dont vous avez besoin est de lancer cette commande : + +```sh +$ xcode-select --install +``` + +Ensuite suivez les instructions qui s'afficheront dans la fenêtre. + +Pour macOS 10.14 et les versions précédentes, vous aurez besoin d'installer g++ avec homebrew; suivez les instructions dans la section suivante. + +### Installer GCC pour macOS antérieur à 10.15 + +Cette partie est seulement nécessaire si vous avez une version de macOS antérieure à 10.15. + +Installer homebrew devrait être très simple; pour plus d'informations allez sur , mais le plus simple est de lancer la commande suivante : + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +``` + +Ensuite, afin d'obtenir une version à jour de gcc, lancez la commande suivante : + +```sh +$ brew install gcc +``` + +Ensuite suivez l'[introduction Unix](#Introduction-aux-Systèmes-Unix) + +## Utiliser vcpkg avec CMake + +Si vous utilisez vcpkg avec CMake, la suite pourrait vous aider ! + +## Visual Studio Code avec CMake tools + +```json +{ + "cmake.configureSettings": { + "CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake" + } +} +``` +### Vcpkg avec des projets CMake Visual Studio + +Ouvrez les paramètres CMake, et ajoutez le chemin ci-dessous à `CMake toolchain file` : + +``` +[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +### Vcpkg avec CLion + +Ouvrez les paramètres de Toolchains (File > Settings sur Windows et Linux, CLion > Preference pour macOS) et allez dans les paramètres CMake (Build, Execution, Deployment > CMake). +Finalement, dans `CMake options`, ajoutez la ligne suivante : + +``` +-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +Malheureusement, vous devrez le refaire pour chaque projet. + + +### Vcpkg en tant que sous-module + +Quand vous utilisez vcpkg comme un sous-module de votre projet, vous pouvez l'ajouter à votre CMakeLists.txt avant le premier appel de `project()`, au lieu d'utiliser `CMAKE_TOOLCHAIN_FILE` dans les paramètres d'appel de cmake. + +```cmake +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake + CACHE STRING "Vcpkg toolchain file") +``` + +Cela permettra toujours aux gens de ne pas utiliser vcpkg, en passant directement le CMAKE_TOOLCHAIN_FILE, mais cela rendra l'étape de configuration-construction légèrement plus facile. + +[getting-started:utiliser-un-paquet]: docs/examples/installing-and-using-packages.md +[getting-started:integration]: docs/users/integration.md +[getting-started:git]: https://git-scm.com/downloads +[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools +[getting-started:linux-gcc]: #installing-linux-developer-tools +[getting-started:macos-dev-tools]: #installing-macos-developer-tools +[getting-started:macos-brew]: #installing-gcc-on-macos +[getting-started:macos-gcc]: #installing-gcc-on-macos +[getting-started:visual-studio]: https://visualstudio.microsoft.com/ +[getting-started:manifest-spec]: docs/specifications/manifests.md + +# Tab-complétion/Auto-complétion + +`vcpkg` supporte l'auto-complétion des commandes, nom de paquets, et options dans powershell et bash. +Pour activer la tab-complétion dans le shell de votre choix : + +```pwsh +> .\vcpkg integrate powershell +``` + +ou + +```sh +$ ./vcpkg integrate bash +``` + +selon le shell que vous utilisez, puis redémarrez la console. + +# Exemples + +Lisez la [documentation](doc/README.md) pour des instructions plus spécifiques ainsi que [l'installation et l'utilisation des paquets](docs/examples/installing-and-using-packages.md), +[ajouter un nouveau paquet depuis un fichier zip](docs/examples/packaging-zipfiles.md), +et [ajouter un nouveau paquet depuis un dépôt GitHub](docs/examples/packaging-github-repos.md). + +La documentation est aussi disponible en ligne sur ReadTheDocs : ! + +Regardez une [démo vidéo]((https://www.youtube.com/watch?v=y41WFKbQFTw) de 4 minutes en anglais. + +# Contribuer + +Vcpkg est un projet open source, et évolue ainsi avec vos contributions. +Voici quelques moyens pour vous d'y contribuer : +* [Soumettre des Issues][contributing:submit-issue] sur vcpkg ou des paquets existants +* [Proposer des corrections et de nouveaux paquets][contributing:submit-pr] + + +Veuillez vous référer au [guide de contribution](CONTRIBUTING.md) pour plus de détails. + + +Ce projet a adopté le [Code de Conduite Open Source de Microsoft][contribuer:coc]. +[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose +[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls +[contributing:coc]: https://opensource.microsoft.com/codeofconduct/ +[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/ + +# Licence +Le code sur ce dépôt est distribué sous [licence MIT](LICENSE.txt). + +# Télémétrie + +vcpkg collecte des données pour nous aider à améliorer votre expérience. +Les données collectées par Microsoft sont anonymes. +Vous pouvez désactiver la télémétrie en relançant le bootstrap-vcpkg avec l'argument `-disableMetrics`, passer l'argument `--disable-metrics` à chaque exécution de vcpkg, ou en créant une variable d'environnement nommée `VCPKG_DISABLE_METRICS`. + +Vous trouverez plus d'informations à propos de la télémétrie dans vcpkg sur cette [page](docs/about/privacy.md). diff --git a/README_ko_KR.md b/README_ko_KR.md new file mode 100644 index 00000000000000..3f76ac0c5c0d67 --- /dev/null +++ b/README_ko_KR.md @@ -0,0 +1,336 @@ +# Vcpkg: 개요 + +Vcpkg는 Windows, Linux ë° MacOSì—ì„œ C ë° C++ ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 관리하는 ë° ë„ì›€ì´ ë©ë‹ˆë‹¤. +ì´ íˆ´ê³¼ ìƒíƒœê³„는 지ì†ì ìœ¼ë¡œ 진화하고 있으며 í•­ìƒ ê¸°ì—¬í•´ 주셔서 ê°ì‚¬í•©ë‹ˆë‹¤! + +ì´ì „ì— vcpkg를 사용한 ì ì´ 없거나 vcpkg를 사용하는 ë°©ë²•ì„ ì•Œê³  ì‹¶ì„ ê²½ìš°, +vcpkg ì‚¬ìš©ì„ ì‹œìž‘í•˜ëŠ” ë°©ë²•ì€ [시작하기](#시작하기) ì„¹ì…˜ì„ í™•ì¸í•˜ì„¸ìš”. + +사용 가능한 ëª…ë ¹ì–´ì— ëŒ€í•œ 간단한 ì„¤ëª…ì„ ë³´ë ¤ë©´ vcpkg를 설치 í•œ 후 `vcpkg help` ë˜ëŠ” `vcpkg help [command]` 명령어로 명령어 별 ë„움ë§ì„ ë³¼ 수 있습니다. + +* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) +* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), #vcpkg ì±„ë„ +* Discord: [\#include \](https://www.includecpp.org), #ðŸŒvcpkg ì±„ë„ +* Docs: [Documentation](docs/README.md) + +[![Build Status](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master) + +# 목차 + +- [Vcpkg: 개요 둘러보기](#vcpkg-개요) +- [목차](#목차) +- [시작하기](#시작하기) + - [빠르게 시작하기: 윈ë„ìš°](#빠르게-시작하기-윈ë„ìš°) + - [빠르게 시작하기: 유닉스](#빠르게-시작하기-유닉스) + - [리눅스 ê°œë°œìž ë„구 설치하기](#리눅스-개발ìž-ë„구-설치하기) + - [macOS ê°œë°œìž ë„구 설치하기](#macos-개발ìž-ë„구-설치하기) + - [10.15버전 ì´ì „ macOSì— GCC 설치하기](#1015버전-ì´ì „-macosì—-gcc-설치하기) + - [CMake와 함께 vcpkg 사용](#cmake와-함께-vcpkg-사용) + - [Visual Studio Code와 CMake Tools](#visual-studio-code와-cmake-tools) + - [Visual Studio CMake 프로ì íŠ¸ì™€ Vcpkg](#visual-studio-cmake-프로ì íŠ¸ì™€-vcpkg) + - [Vcpkg와 CLion](#vcpkg와-clion) + - [ì„œë¸Œëª¨ë“ˆë¡œì„œì˜ Vcpkg](#서브모듈로서ì˜-vcpkg) +- [탭 완성/ìžë™ 완성](#탭-완성/ìžë™-완성) +- [예제](#예제) +- [기여](#기여) +- [ë¼ì´ì„ ìŠ¤](#ë¼ì´ì„ ìŠ¤) +- [ë°ì´í„° 수집](#ë°ì´í„°-수집) + +# 시작하기 + +먼저, 사용하는 ìš´ì˜ì²´ì œì— ë”°ë¼ ë¹ ë¥´ê²Œ 시작하기 문서를 ë”°ë¼ê°€ì„¸ìš”. +[윈ë„ìš°](#빠르게-시작하기-윈ë„ìš°) ë˜ëŠ” [macOS 그리고 Linux](#빠르게-시작하기-유닉스). + +ë” ë§Žì€ ì •ë³´ë¥¼ 얻고 싶다면, [패키지 설치 ë° ì‚¬ìš©][getting-started:using-a-package] 문서를 참고하세요. +만약 필요한 ë¼ì´ë¸ŒëŸ¬ë¦¬ê°€ vcpkg ì¹´íƒˆë¡œê·¸ì— ì—†ëŠ” 경우, vcpkg 팀ì´ë‚˜ 커뮤니티가 ë³¼ 수 있는 +[GitHub 저장소ì—ì„œ ì´ìŠˆë¥¼ ì—´ ​​수 있습니다][contributing:submit-issue] +ë˜í•œ 잠재ì ìœ¼ë¡œ vcpkgì— í¬íŠ¸ê°€ ì¶”ê°€ë  ê²ƒ 입니다. + +vcpkg를 설치하고 ìž‘ë™ í•œ 후, +ì…¸ì— [탭 완성/ìžë™ 완성](#탭-완성/ìžë™-완성)ì„ ì¶”ê°€ í•  수 있습니다. + +마지막으로, vcpkgì˜ ë¯¸ëž˜ì— ê´€ì‹¬ì´ ìžˆë‹¤ë©´, +[manifest][getting-started:manifest-spec] ê°€ì´ë“œë¥¼ 확ì¸í•˜ì„¸ìš”! +ì´ê²ƒì€ 실험ì ì¸ 기능ì´ë©° 버그가 ìžˆì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. +ì‹œë„í•´ë³´ê³  문제가 있다면 [ì´ìŠˆì„ 여세요][contributing:submit-issue]! + +## 빠르게 시작하기: 윈ë„ìš° + +필요조건: +- Windows 7 ì´ìƒ +- [Git][getting-started:git] +- [Visual Studio][getting-started:visual-studio] ì˜ì–´ ì–¸ì–´íŒ©ì´ ì„¤ì¹˜ëœ 2015 Update 3 버전 ì´ìƒ + +첫번째로, vcpkg ìžì²´ë¥¼ 다운로드하고 부트스트랩합니다; ì–´ë””ì—나 설치할 수 있습니다, +하지만 ì¼ë°˜ì ìœ¼ë¡œ CMake 프로ì íŠ¸ì˜ 하위 모듈로 vcpkg를 사용하는 ê²ƒì´ ì¢‹ìŠµë‹ˆë‹¤. +Visual Studio 프로ì íŠ¸ë¥¼ 위해 ì „ì—­ì ìœ¼ë¡œ 설치합니다. +설치 위치는 `C:\src\vcpkg` 나 `C:\dev\vcpkg`를 ì‚¬ìš©í• ê²ƒì„ ê¶Œìž¥í•©ë‹ˆë‹¤. +그렇지 않으면 ì¼ë¶€ í¬íŠ¸ 빌드 시스템ì—ì„œ 경로 문제가 ë°œìƒí•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. + +```cmd +> git clone https://github.com/microsoft/vcpkg +> .\vcpkg\bootstrap-vcpkg.bat +``` + +ë‹¹ì‹ ì˜ í”„ë¡œì íŠ¸ì— ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 설치, 실행 시키려면 다ìŒê³¼ ê°™ì´ ìž‘ì„±í•˜ì„¸ìš”: + +```cmd +> .\vcpkg\vcpkg install [packages to install] +``` + +다ìŒê³¼ ê°™ì´ `search` 하위 명령어를 사용하여 필요한 ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 검색 í•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. + +```cmd +> .\vcpkg\vcpkg search [search term] +``` + +Visual Studioì—ì„œ vcpkg를 사용하려면 +ë‹¤ìŒ ëª…ë ¹ì„ ì‹¤í–‰í•©ë‹ˆë‹¤ (ê´€ë¦¬ìž ê¶Œí•œì´ í•„ìš”í•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤): + +```cmd +> .\vcpkg\vcpkg integrate install +``` + + +그런 다ìŒ, ì´ì œ CMakeê°€ ì•„ë‹Œ 새 프로ì íŠ¸ë¥¼ 만들 수 있습니다. (ë˜ëŠ” 기존 프로ì íŠ¸ë¥¼ ì—´ 수 있습니다) +ì„¤ì¹˜ëœ ëª¨ë“  ë¼ì´ë¸ŒëŸ¬ë¦¬ëŠ” 즉시 `# include` ë  ì¤€ë¹„ê°€ ë˜ì–´ 추가 êµ¬ì„±ì—†ì´ í”„ë¡œì íŠ¸ì—ì„œ 사용할 수 있습니다. + +Visual Studioì—ì„œ CMake를 사용하는 경우, +[여기를 보세요](#visual-studio-code와-cmake-tools). + +IDE 외부ì—ì„œ CMake와 함께 vcpkg를 사용하려면, +íˆ´ì²´ì¸ íŒŒì¼ì„ 사용할 수 있습니다: + +```cmd +> cmake -B [build directory] -S . -DCMAKE_TOOLCH +AIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +> cmake --build [build directory] +``` + +CMake와 ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 사용하려면 `find_package` ë“±ì´ í•„ìš”í•©ë‹ˆë‹¤. +IDEì—ì„œ CMake ì‚¬ìš©ì— ëŒ€í•œ ìžì„¸í•œ ë‚´ìš©ì€ [CMake 섹션](#cmake와-함께-vcpkg-사용)ì„ í™•ì¸í•˜ì„¸ìš”. + + +Visual Studio Code를 í¬í•¨í•œ 다른 íˆ´ì˜ ê²½ìš° +[통합 ê°€ì´ë“œ][getting-started:integration]ì„ í™•ì¸í•˜ì„¸ìš”. + +## 빠르게 시작하기: 유닉스 + +Linuxì—ì„œì˜ í•„ìš”ì¡°ê±´: +- [Git][getting-started:git] +- [g++][getting-started:linux-gcc] >= 6 + +macOSì—ì„œì˜ í•„ìš”ì¡°ê±´: +- [Apple Developer Tools][getting-started:macos-dev-tools] +- macOS 10.14ì´ë‚˜ 아래 버전ì—서는 ë‹¤ìŒ ë„êµ¬ë“¤ë„ í•„ìš”í•©ë‹ˆë‹¤: + - [Homebrew][getting-started:macos-brew] + - [g++][getting-started:macos-gcc] >= 6 from Homebrew + +첫번째로, vcpkg ìžì²´ë¥¼ 다운로드하고 부트스트랩합니다; ì–´ë””ì—나 설치할 수 있습니다, +하지만 ì¼ë°˜ì ìœ¼ë¡œ CMake 프로ì íŠ¸ì˜ 하위 모듈로 vcpkg를 사용하는 ê²ƒì´ ì¢‹ìŠµë‹ˆë‹¤. + +```sh +$ git clone https://github.com/microsoft/vcpkg +$ ./vcpkg/bootstrap-vcpkg.sh +``` + +ë‹¹ì‹ ì˜ í”„ë¡œì íŠ¸ì— ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 설치, 실행 시키려면 다ìŒê³¼ ê°™ì´ ìž‘ì„±í•˜ì„¸ìš”: + +```sh +$ ./vcpkg/vcpkg install [packages to install] +``` + +다ìŒê³¼ ê°™ì´ `search` 하위 명령어를 사용하여 필요한 ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 검색 í•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. + +```sh +$ ./vcpkg/vcpkg search [search term] +``` + +CMakeì—ì„œ vcpkg를 사용하려면 íˆ´ì²´ì¸ íŒŒì¼ì„ 사용할 수 있습니다 +```sh +$ cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +$ cmake --build [build directory] +``` + +CMake와 ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 사용하려면 `find_package` ë“±ì´ í•„ìš”í•©ë‹ˆë‹¤. +CMake ë° CMake Tools for VSCodeì—ì„œ vcpkg를 가장 잘 사용하는 ë°©ë²•ì— ëŒ€í•œ ìžì„¸í•œ ë‚´ìš©ì€ +[CMake 섹션](#cmake와-함께-vcpkg-사용)ì„ í™•ì¸í•˜ì„¸ìš”. + +다른 íˆ´ì— ëŒ€í•´ì„œëŠ” [통합 ê°€ì´ë“œ][getting-started:integration]ì„ í™•ì¸í•˜ì„¸ìš”. +## 리눅스 ê°œë°œìž ë„구 설치하기 + +ë¦¬ëˆ…ìŠ¤ì˜ ë‹¤ì–‘í•œ ë°°í¬íŒì—는 다양한 패키지가 있습니다. +설치 í•„ìš”: + +-Debian, Ubuntu, popOS ë° ê¸°íƒ€ Debian 기반 ë°°í¬íŒ: + +```sh +$ sudo apt-get update +$ sudo apt-get install build-essential tar curl zip unzip +``` + +- CentOS + +```sh +$ sudo yum install centos-release-scl +$ sudo yum install devtoolset-7 +$ scl enable devtoolset-7 bash +``` + +다른 ë°°í¬íŒì˜ 경우 g++ 6 ì´ìƒì˜ ë²„ì „ì„ ì„¤ì¹˜í•´ì•¼í•©ë‹ˆë‹¤. +특정 ë°°í¬íŒì— 대한 ì§€ì¹¨ì„ ì¶”ê°€í•˜ë ¤ë©´ +[PRì„ ì—´ì–´ì£¼ì„¸ìš”][contributing:submit-pr]! + +## macOS ê°œë°œìž ë„구 설치하기 + +macOS 10.15ì—서는 터미ë„ì—ì„œ ë‹¤ìŒ ëª…ë ¹ì–´ë¥¼ 실행하시면 ë©ë‹ˆë‹¤. + +```sh +$ xcode-select --install +``` + +그런 ë‹¤ìŒ ë‚˜íƒ€ë‚˜ëŠ” ì°½ì— ë‚˜íƒ€ë‚˜ëŠ” 메시지를 따르세요. + +macOS 10.14 ë° ì´ì „ 버전ì—서는 homebrewì—ì„œ g++ë„ ì„¤ì¹˜í•´ì•¼í•©ë‹ˆë‹¤. +ë‹¤ìŒ ì„¹ì…˜ì˜ ì§€ì¹¨ì„ ë”°ë¥´ì„¸ìš”. + +### 10.15버전 ì´ì „ macOSì— GCC 설치하기 + +ì´ë²ˆ ì„¹ì…˜ì€ 10.15 ì´ì „ì˜ macOS ë²„ì „ì„ ì‚¬ìš©í•˜ëŠ” 경우ì—만 필요합니다. +homebrew를 설치하는 ê²ƒì€ ë§¤ìš° 쉽습니다. ìžì„¸í•œ ë‚´ìš©ì€ ë¥¼ 확ì¸í•˜ì„¸ìš”. +가장 간단하게 ë‹¤ìŒ ëª…ë ¹ì–´ì„ ì‹¤í–‰í•©ë‹ˆë‹¤. + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +``` + +그런 ë‹¤ìŒ ìµœì‹  ë²„ì „ì˜ gcc를 설치하시려면 ë‹¤ìŒ ëª…ë ¹ì–´ë¥¼ 실행하십시오. + +```sh +$ brew install gcc +``` + +ê·¸ëŸ°ë‹¤ìŒ [빠른 시작 ê°€ì´ë“œ](#빠르게-시작하기-유닉스)와 함께 vcpkg를 부트스트랩 í•  수 있습니다. + +## CMake와 함께 vcpkg 사용 + +CMake와 함께 vcpkg를 사용하는 경우, 다ìŒê³¼ ê°™ì´ ë”°ë¼í•´ 보세요 + +### Visual Studio Code와 CMake Tools + +ìž‘ì—… 공간 `settings.json` 파ì¼ì— 다ìŒì„ 추가하면 +CMake ë„구는 ë¼ì´ë¸ŒëŸ¬ë¦¬ì— ìžë™ìœ¼ë¡œ vcpkg를 사용합니다. + +```json +{ + "cmake.configureSettings": { + "CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake" + } +} +``` + +### Visual Studio CMake 프로ì íŠ¸ì™€ Vcpkg + +CMake 설정 편집기를 ì—´ê³  'CMake toolchain file'ì—ì„œ +vcpkg íˆ´ì²´ì¸ íŒŒì¼ì— 경로를 추가합니다. + +``` +[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +### Vcpkg와 CLion + +Toolchains settingsì„ ì—½ë‹ˆë‹¤. +(File > Settings on Windows and Linux, CLion > Preferences on macOS), +그리고 Cmake ì„¸íŒ…ì„ ì—½ë‹ˆë‹¤ (Build, Execution, Deployment > CMake). +마지막으로 `CMake options`ì—ì„œ ë‹¤ìŒ ì¤„ì„ ì¶”ê°€í•©ë‹ˆë‹¤. + +``` +-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +ê° í”„ë¡œí•„ì— ì´ê²ƒì„ 추가해야합니다. + +### ì„œë¸Œëª¨ë“ˆë¡œì„œì˜ Vcpkg + +프로ì íŠ¸ì˜ 하위 모듈로 vcpkg를 사용하는 경우 +cmake 호출ì—`CMAKE_TOOLCHAIN_FILE`ì„ ì „ë‹¬í•˜ëŠ” 대신 첫 번째 `project ()` 호출 ì „ì— CMakeLists.txtì— ë‹¤ìŒì„ 추가 í•  수 있습니다. + +```cmake +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake + CACHE STRING "Vcpkg toolchain file") +``` + +ì´ë ‡ê²Œ 하면 `CMAKE_TOOLCHAIN_FILE`ì„ ì§ì ‘ 전달하여 구성-빌드 단계가 약간 ë” ì‰¬ì›Œì§€ì§€ë§Œ +ì‚¬ëžŒë“¤ì´ vcpkg를 사용하지 못하게 ë©ë‹ˆë‹¤. + +[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md +[getting-started:integration]: docs/users/integration.md +[getting-started:git]: https://git-scm.com/downloads +[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools +[getting-started:linux-gcc]: #installing-linux-developer-tools +[getting-started:macos-dev-tools]: #installing-macos-developer-tools +[getting-started:macos-brew]: #installing-gcc-on-macos +[getting-started:macos-gcc]: #installing-gcc-on-macos +[getting-started:visual-studio]: https://visualstudio.microsoft.com/ +[getting-started:manifest-spec]: docs/specifications/manifests.md + +# 탭 완성/ìžë™ 완성 + +`vcpkg`는 powershellê³¼ bash 모ë‘ì—ì„œ 명령, 패키지 ì´ë¦„ ë° ì˜µì…˜ì˜ ìžë™ ì™„ì„±ì„ ì§€ì›í•©ë‹ˆë‹¤. +ì„ íƒí•œ ì…¸ì—ì„œ 탭 ì™„ì„±ì„ í™œì„±í™”í•˜ë ¤ë©´ ë‹¤ìŒ ëª…ë ¹ì–´ë¥¼ 실행합니다. + +```pwsh +> .\vcpkg integrate powershell +``` + +í˜¹ì€ + +```sh +$ ./vcpkg integrate bash +``` + +사용하는 ì…¸ì— ë”°ë¼ ì½˜ì†”ì„ ë‹¤ì‹œ 시작세요. + +# 예제 + +구체ì ì¸ ì—°ìŠµì€ [문서](docs/README.md)를 참고하세요, +including [패키지 설치 ë° ì‚¬ìš©](docs/examples/installing-and-using-packages.md), +[zip 파ì¼ì—ì„œ 새 패키지 추가](docs/examples/packaging-zipfiles.md), +ë° [GitHub 저장소ì—ì„œ 새 패키지 추가](docs/examples/packaging-github-repos.md). + +ì´ì œ ReadTheDocsì—ì„œ 온ë¼ì¸ìœ¼ë¡œ 문서를 사용할 ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤: ! + +[4분짜리 ë°ëª¨ ì˜ìƒì„ 보세요](https://www.youtube.com/watch?v=y41WFKbQFTw). + +# 기여 + +Vcpkg는 오픈소스 프로ì íŠ¸ìž…니다, ë”°ë¼ì„œ ì—¬ëŸ¬ë¶„ì˜ ê¸°ì—¬ë¡œ 만들어 졌습니다. +기여할 수 있는 몇 가지 ë°©ë²•ì€ ë‹¤ìŒê³¼ 같습니다: + +* vcpkg ë˜ëŠ” 기존 íŒ¨í‚¤ì§€ì˜ [문제 제출][contributing:submit-issue] +* [Submit Fixes and New Packages][contributing:submit-pr] + +ìžì„¸í•œ ë‚´ìš©ì€ [컨트리뷰팅 ê°€ì´ë“œ](CONTRIBUTING.md)를 참고하세요. + +ì´ í”„ë¡œì íŠ¸ëŠ” [Microsoft Open Source Code of Conduct][contributing:coc]ì„ ì±„íƒí–ˆìŠµë‹ˆë‹¤. +ë” ë§Žì€ ì •ë³´ë¥¼ 얻고 싶다면 [Code of Conduct FAQ][contributing:coc-faq] 문서를 참고하거나 추가 질문 ë˜ëŠ” ì˜ê²¬ì€ ì´ë©”ì¼ [opencode@microsoft.com](mailto:opencode@microsoft.com)ë¡œ 보내주세요. + +[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose +[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls +[contributing:coc]: https://opensource.microsoft.com/codeofconduct/ +[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/ + +# ë¼ì´ì„ ìŠ¤ + +ì´ ì €ìž¥ì†Œì˜ ì½”ë“œëŠ” [MIT ë¼ì´ì„ ìŠ¤](LICENSE.txt)ì— ë”°ë¼ ë¼ì´ì„ ìŠ¤ê°€ 부여ë©ë‹ˆë‹¤. + +# ë°ì´í„° 수집 + +vcpkg는 ì‚¬ìš©ìž ê²½í—˜ì„ ê°œì„ í•˜ëŠ” ë° ë„ì›€ì´ ë˜ë„ë¡ ì‚¬ìš© ë°ì´í„°ë¥¼ 수집합니다. +Microsoft는 ì´ ì •ë³´ë¥¼ ìµëª…으로 수집합니다. +bootstrap-vcpkg 스í¬ë¦½íŠ¸ë¥¼ -disableMetrics를 추가해 다시 실행하여 ì›ê²© 분ì„ì„ ì˜µíŠ¸ì•„ì›ƒ í•  수 있습니다. +커맨드 ë¼ì¸ì—ì„œ --disable-metrics를 vcpkgì— ì „ë‹¬í•©ë‹ˆë‹¤. +ë˜ëŠ” VCPKG_DISABLE_METRICS 환경 변수를 설정합니다. + +docs/about/privacy.md ì— vcpkg ë°ì´í„° ìˆ˜ì§‘ì— ëŒ€í•´ ìžì„¸ížˆ 알아보세요. diff --git a/README_zh_CN.md b/README_zh_CN.md new file mode 100644 index 00000000000000..3195378646996e --- /dev/null +++ b/README_zh_CN.md @@ -0,0 +1,325 @@ +# Vcpkg: 总览 + +[English Overview](README.md) + +Vcpkg å¯å¸®åŠ©æ‚¨åœ¨ Windows〠Linux å’Œ MacOS ä¸Šç®¡ç† C å’Œ C++ 库。 +这个工具和生æ€é“¾æ­£åœ¨ä¸æ–­å‘å±•ï¼Œæˆ‘ä»¬ä¸€ç›´æœŸå¾…æ‚¨çš„è´¡çŒ®ï¼ + +若您从未使用过vcpkg或希望了解如何使用vcpkg,请查阅[快速开始](#入门)章节。 + +如需获å–有关å¯ç”¨å‘½ä»¤çš„简短æ述,请在编译vcpkgåŽæ‰§è¡Œ `vcpkg help` 或执行 `vcpkg help [command]` æ¥èŽ·å–具体的帮助信æ¯ã€‚ + +* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) +* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), #vcpkg é¢‘é“ +* Discord: [\#include \](https://www.includecpp.org), #ðŸŒvcpkg é¢‘é“ +* 文档: [Documentation](docs/README.md) + +[![当å‰ç”ŸæˆçŠ¶æ€](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master) + +# 目录 + +- [Vcpkg: 总览](#vcpkg-总览) +- [目录](#目录) +- [入门](#入门) + - [快速开始: Windows](#快速开始-windows) + - [快速开始: Unix](#快速开始-unix) + - [安装 Linux Developer Tools](#安装-linux-developer-tools) + - [安装 macOS Developer Tools](#安装-macos-developer-tools) + - [在 macOS 10.15 之å‰ç‰ˆæœ¬ä¸­å®‰è£… GCC](#在-macos-1015-之å‰ç‰ˆæœ¬ä¸­å®‰è£…-gcc) + - [在 CMake 中使用 vcpkg](#在-cmake-中使用-vcpkg) + - [Visual Studio Code 中的 CMake Tools](#visual-studio-code-中的-cmake-tools) + - [Visual Studio CMake 工程中使用 vcpkg](#visual-studio-cmake-工程中使用-vcpkg) + - [CLion 中使用 vcpkg](#clion-中使用-vcpkg) + - [å°† vcpkg 作为一个å­æ¨¡å—](#å°†-vcpkg-作为一个å­æ¨¡å—) +- [Tab补全/自动补全](#tab补全自动补全) + - [示例](#示例) + - [贡献者](#贡献者) +- [License](#license) +- [æ•°æ®æ”¶é›†](#æ•°æ®æ”¶é›†) + +# 入门 + +首先,请阅读以下任一方é¢çš„快速入门指å—: +[Windows](#快速开始-windows) 或 [macOSå’ŒLinux](#快速开始-unix), +è¿™å–决于您使用的是什么平å°ã€‚ + +有关更多信æ¯ï¼Œè¯·å‚è§ [安装和使用软件包][getting-started:using-a-package]。 +如果vcpkg目录中没有您需è¦çš„库, +您å¯ä»¥ [在GitHub上打开问题][contributing:submit-issue]。 +vcpkg团队和贡献者å¯ä»¥çœ‹åˆ°å®ƒçš„地方, +并å¯èƒ½å°†è¿™ä¸ªåº“添加到vcpkg。 + +安装并è¿è¡ŒvcpkgåŽï¼Œ +您å¯èƒ½å¸Œæœ›å°† [TAB补全](#tab补全自动补全) 添加到您的Shell中。 + +最åŽï¼Œå¦‚果您对vcpkg的未æ¥æ„Ÿå…´è¶£ï¼Œè¯·æŸ¥çœ‹ [清å•][getting-started:manifest-spec]ï¼ +这是一项实验性功能,å¯èƒ½ä¼šå‡ºçŽ°é”™è¯¯ã€‚ +因此,请å°è¯•ä¸€ä¸‹å¹¶[打开所有问题][contributing:submit-issue]! + +## 快速开始: Windows + +需求: +- Windows 7 或更新的版本 +- [Git][getting-started:git] +- [Visual Studio 2015 Update 3][getting-started:visual-studio] 或更新的版本(包å«è‹±æ–‡è¯­è¨€åŒ…) + +首先,请下载vcpkg并执行 bootstrap.bat 脚本。 +它å¯ä»¥å®‰è£…在任何地方,但是通常我们建议您使用 vcpkg 作为 CMake 项目的å­æ¨¡å—,并将其全局安装到 Visual Studio 项目中。 +我们建议您使用例如 `C:\src\vcpkg` 或 `C:\dev\vcpkg` 的安装目录,å¦åˆ™æ‚¨å¯èƒ½é‡åˆ°æŸäº›åº“构建系统的路径问题。 + +```cmd +> git clone https://github.com/microsoft/vcpkg +> .\vcpkg\bootstrap-vcpkg.bat +``` + +使用以下命令安装您的项目所需è¦çš„库: + +```cmd +> .\vcpkg\vcpkg install [packages to install] +``` + +您也å¯ä»¥ä½¿ç”¨ `search` å­å‘½ä»¤æ¥æŸ¥æ‰¾vcpkg中集æˆçš„库: + +```cmd +> .\vcpkg\vcpkg search [search term] +``` + +若您希望在 Visual Studio 中使用vcpkg,请è¿è¡Œä»¥ä¸‹å‘½ä»¤ (首次å¯åŠ¨éœ€è¦ç®¡ç†å‘˜æƒé™) + +```cmd +> .\vcpkg\vcpkg integrate install +``` + +在此之åŽï¼Œæ‚¨å¯ä»¥åˆ›å»ºä¸€ä¸ªéžcmake项目 (或打开已有的项目)。 +在您的项目中,所有已安装的库å‡å¯ç«‹å³ä½¿ç”¨ `#include` 包å«æ‚¨éœ€ä½¿ç”¨çš„库的头文件并无需添加é¢å¤–é…置。 + +若您在 Visual Studio 中使用cmake工程,请查阅[这里](#visual-studio-cmake-工程中使用-vcpkg)。 + +为了在IDE以外在cmake中使用vcpkg,您需è¦ä½¿ç”¨ä»¥ä¸‹å·¥å…·é“¾æ–‡ä»¶: + +```cmd +> cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +> cmake --build [build directory] +``` + +在cmake中,您ä»éœ€é€šè¿‡ `find_package` æ¥ä½¿ç”¨ç¬¬ä¸‰æ–¹åº“。 +请查阅 [CMake 章节](#在-cmake-中使用-vcpkg) 获å–更多信æ¯ï¼Œå…¶ä¸­åŒ…å«äº†åœ¨IDE中使用cmake的内容。 + +对于其他工具 (包括Visual Studio Code),请查阅 [集æˆæŒ‡å—][getting-started:integration]。 + +## 快速开始: Unix + +Linuxå¹³å°çš„使用需求: +- [Git][getting-started:git] +- [g++][getting-started:linux-gcc] >= 6 + +macOSå¹³å°çš„使用需求: +- [Apple Developer Tools][getting-started:macos-dev-tools] +- macOS 10.14 或更低版本中,您也需è¦: + - [Homebrew][getting-started:macos-brew] + - Homebrew 中 [g++][getting-started:macos-gcc] >= 6 + +首先,请下载vcpkg并执行 bootstrap.sh 脚本。 +我们建议您将vcpkg作为cmake项目的å­æ¨¡å—使用。 + +```sh +$ git clone https://github.com/microsoft/vcpkg +$ ./vcpkg/bootstrap-vcpkg.sh +``` + +使用以下命令安装任æ„包: + +```sh +$ ./vcpkg/vcpkg install [packages to install] +``` + +您也å¯ä»¥ä½¿ç”¨ `search` å­å‘½ä»¤æ¥æŸ¥æ‰¾vcpkg中已集æˆçš„库: + +```sh +$ ./vcpkg/vcpkg search [search term] +``` + +为了在cmake中使用vcpkg,您需è¦ä½¿ç”¨ä»¥ä¸‹å·¥å…·é“¾æ–‡ä»¶: + +```sh +$ cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +$ cmake --build [build directory] +``` + +在cmake中,您ä»éœ€é€šè¿‡ `find_package` æ¥ä½¿ç”¨ç¬¬ä¸‰æ–¹åº“。 +为了您更好的在cmake或 VSCode CMake Tools 中使用vcpkg, +请查阅 [CMake 章节](#在-cmake-中使用-vcpkg) 获å–更多信æ¯ï¼Œ +其中包å«äº†åœ¨IDE中使用cmake的内容。 + +对于其他工具,请查阅 [集æˆæŒ‡å—][getting-started:integration]。 + +## 安装 Linux Developer Tools + +在Linuxçš„ä¸åŒå‘行版中,您需è¦å®‰è£…ä¸åŒçš„工具包: + +- Debian,Ubuntu,popOS或其他基于 Debian çš„å‘行版: + +```sh +$ sudo apt-get update +$ sudo apt-get install build-essential tar curl zip unzip +``` + +- CentOS + +```sh +$ sudo yum install centos-release-scl +$ sudo yum install devtoolset-7 +$ scl enable devtoolset-7 bash +``` + +对于其他的å‘行版,请确ä¿å·²å®‰è£… g++ 6 或更新的版本。 +若您希望添加特定å‘行版的说明,[请æ交一个 PR][contributing:submit-pr]! + +## 安装 macOS Developer Tools + +在 macOS 10.15 中,唯一需è¦åšçš„是在终端中è¿è¡Œä»¥ä¸‹å‘½ä»¤: + +```sh +$ xcode-select --install +``` + +然åŽæŒ‰ç…§å‡ºçŽ°çš„窗å£ä¸­çš„æ示进行æ“作。 + +在 macOS 10.14 åŠå…ˆå‰ç‰ˆæœ¬ä¸­ï¼Œæ‚¨ä¹Ÿéœ€è¦ä½¿ç”¨ homebrew 安装 g++。 +请éµå¾ªä»¥ä¸‹éƒ¨åˆ†ä¸­çš„说明: + +### 在 macOS 10.15 之å‰ç‰ˆæœ¬ä¸­å®‰è£… GCC + +æ­¤æ¡åªåœ¨æ‚¨çš„macOS版本低于 10.15 时是必须的。 +安装homebrew应当很轻æ¾ï¼Œè¯·æŸ¥é˜… 以获å–更多信æ¯ã€‚ +为了更简便,请使用以下命令: + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +``` + +然åŽï¼Œä¸ºäº†èŽ·å–最新版本的gcc,请è¿è¡Œä»¥ä¸‹å‘½ä»¤ï¼š + +```sh +$ brew install gcc +``` + +此时,您就å¯ä»¥ä½¿ç”¨ bootstrap.sh 编译vcpkg了。 请å‚阅 [快速开始](#快速开始-unix) + +## 在 CMake 中使用 vcpkg + +若您希望在CMake中使用vcpkg,以下内容å¯èƒ½å¸®åŠ©æ‚¨ï¼š + +### Visual Studio Code 中的 CMake Tools + +将以下内容添加到您的工作区的 `settings.json` 中将使CMake Tools自动使用vcpkg中的第三方库: + +```json +{ + "cmake.configureSettings": { + "CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake" + } +} +``` + +### Visual Studio CMake 工程中使用 vcpkg + +打开CMake设置选项,将 vcpkg toolchain 文件路径在 `CMake toolchain file` 中: + +``` +[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +### CLion 中使用 vcpkg + +打开 Toolchains 设置 +(File > Settings on Windows and Linux, CLion > Preferences on macOS), +并打开 CMake 设置 (Build, Execution, Deployment > CMake)。 +最åŽåœ¨ `CMake options` 中添加以下行: + +``` +-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +é—憾的是,您必须手动将此选项加入æ¯ä¸ªé¡¹ç›®é…置文件中。 + +### å°† vcpkg 作为一个å­æ¨¡å— + +当您希望将vcpkg作为一个å­æ¨¡å—加入到您的工程中时, +您å¯ä»¥åœ¨ç¬¬ä¸€ä¸ª `project()` 调用之å‰å°†ä»¥ä¸‹å†…容添加到 CMakeLists.txt 中, +而无需将 `CMAKE_TOOLCHAIN_FILE` 传递给cmake调用。 + +```cmake +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake + CACHE STRING "Vcpkg toolchain file") +``` + +使用此ç§æ–¹å¼å¯æ— éœ€è®¾ç½® `CMAKE_TOOLCHAIN_FILE` å³å¯ä½¿ç”¨vcpkg,且更容易完æˆé…置工作。 + +[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md +[getting-started:integration]: docs/users/integration.md +[getting-started:git]: https://git-scm.com/downloads +[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools +[getting-started:linux-gcc]: #installing-linux-developer-tools +[getting-started:macos-dev-tools]: #installing-macos-developer-tools +[getting-started:macos-brew]: #installing-gcc-on-macos +[getting-started:macos-gcc]: #installing-gcc-on-macos +[getting-started:visual-studio]: https://visualstudio.microsoft.com/ +[getting-started:manifest-spec]: docs/specifications/manifests.md + +# Tab补全/自动补全 + +`vcpkg` 支æŒå‘½ä»¤ï¼ŒåŒ…åç§°ï¼Œä»¥åŠ Powershell å’Œ Bash 中的选项。 +若您需è¦åœ¨æŒ‡å®šçš„ shell 中å¯ç”¨Tab补全功能,请ä¾æ®æ‚¨ä½¿ç”¨çš„shellè¿è¡Œï¼š + +```pwsh +> .\vcpkg integrate powershell +``` + +或 + +```sh +$ ./vcpkg integrate bash +``` + +然åŽé‡æ–°å¯åŠ¨æŽ§åˆ¶å°ã€‚ + +## 示例 + +请查看 [文档](docs/README.md) 获å–具体示例, +å…¶åŒ…å« [安装并使用包](docs/examples/installing-and-using-packages.md), +[使用压缩文件添加包](docs/examples/packaging-zipfiles.md) +å’Œ [从GitHubæºä¸­æ·»åŠ ä¸€ä¸ªåŒ…](docs/examples/packaging-github-repos.md)。 + +我们的文档现在也å¯ä»¥ä»Ž [ReadTheDocs](https://vcpkg.readthedocs.io/) 在线获å–。 + +观看4分钟 [demo视频](https://www.youtube.com/watch?v=y41WFKbQFTw)。 + +## 贡献者 + +Vcpkg是一个开æºé¡¹ç›®ï¼Œå¹¶é€šè¿‡æ‚¨çš„贡献ä¸æ–­å‘展。 +下é¢æ˜¯ä¸€äº›æ‚¨å¯ä»¥è´¡çŒ®çš„æ–¹å¼: + +* [æ交一个关于vcpkg或已支æŒåŒ…çš„æ–°issue][contributing:submit-issue] +* [æ交修å¤PR和创建新包][contributing:submit-pr] + +请å‚阅我们的 [贡献准则](CONTRIBUTING.md) 了解更多详细信æ¯ã€‚ + +该项目采用了 [Microsoftå¼€æºè¡Œä¸ºå‡†åˆ™][contributing:coc]。 +获å–更多信æ¯è¯·æŸ¥çœ‹ [行为准则FAQ][contributing:coc-faq] 或è”ç³» [opencode@microsoft.com](mailto:opencode@microsoft.com)æ出其他问题或æ„è§ã€‚ + +[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose +[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls +[contributing:coc]: https://opensource.microsoft.com/codeofconduct/ +[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/ + +# License + +在此存储库中使用的代ç å‡éµå¾ª [MIT License](LICENSE.txt)。 + +# æ•°æ®æ”¶é›† + +vcpkg会收集使用情况数æ®ï¼Œä»¥å¸®åŠ©æˆ‘们改善您的体验。 +Microsoft收集的数æ®æ˜¯åŒ¿å的。 +您也å¯ä»¥é€šè¿‡ä½¿ç”¨ `-disableMetrics` ã€åœ¨å‘½ä»¤è¡Œä¸Šå°†`--disable-metrics`传递给vcpkg,或通过设置环境å˜é‡ `VCPKG_DISABLE_METRICS` 并é‡æ–°è¿è¡Œ bootstrap-vcpkg 脚本æ¥é€‰æ‹©ç¦ç”¨æ•°æ®æ”¶é›†ã€‚ +请在 [privacy.md](docs/about/privacy.md) 中了解有关 vcpkg æ•°æ®æ”¶é›†çš„更多信æ¯ã€‚ diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000000000..71769a8506531f --- /dev/null +++ b/docs/README.md @@ -0,0 +1,74 @@ +### Quick Start + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/README.md).** + +Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving; your involvement is vital to its success! + +### Examples + +- [Installing and Using Packages Example: sqlite](examples/installing-and-using-packages.md) +- [Packaging Zipfiles Example: zlib](examples/packaging-zipfiles.md) +- [Packaging GitHub Repositories Example: libogg](examples/packaging-github-repos.md) +- [Patching Example: Patching libpng to work for x64-uwp](examples/patching.md) +- [Getting Started with Versioning](examples/versioning.getting-started.md) + +### User Help + +- [Buildsystem Integration](users/integration.md) +- [Triplet files](users/triplets.md) +- [Configuration and Environment](users/config-environment.md) +- [Manifest Mode](users/manifests.md) +- [Binary Caching](users/binarycaching.md) +- [Asset Caching](users/assetcaching.md) +- [Versioning](users/versioning.md) +- [Usage with Android](users/android.md) +- [Usage with Mingw-w64](users/mingw.md) +- [Host Dependencies](users/host-dependencies.md) +- [Using Registries](users/registries.md) + +### Maintainer Help + +- [Manifest files - vcpkg.json](maintainers/manifest-files.md) +- [Control files](maintainers/control-files.md) +- [Portfile functions](maintainers/portfile-functions.md) +- [Common CMake definitions](maintainers/vcpkg_common_definitions.md) +- [Maintainer Guidelines](maintainers/maintainer-guide.md) +- [Creating Registries](maintainers/registries.md) +- [CMake Guidelines](maintainers/cmake-guidelines.md) + +### [Vcpkg-Tool](https://github.com/microsoft/vcpkg-tool) Maintainer Help + +- [Testing](https://github.com/microsoft/vcpkg-tool/tree/main/docs/testing.md) +- [Benchmarking](https://github.com/microsoft/vcpkg-tool/tree/main/docs/benchmarking.md) +- [Layout of the vcpkg source tree](https://github.com/microsoft/vcpkg-tool/tree/main/docs/layout.md) + +### Community Resources (not directly affiliated with vcpkg) + +- [vcpkg.info](https://vcpkg.info/) - Package index + search +- [vcpkgx](https://vcpkgx.com/) - Package index + search +- [vcpkg index](https://vcpkg.dev/) - Package index + search + +### Specifications + +- [Export](specifications/export-command.md) +- [Feature Packages](specifications/feature-packages.md) + +### Blog posts + +- [Vcpkg Host Dependencies for Cross-Compilation](https://devblogs.microsoft.com/cppblog/vcpkg-host-dependencies/) +- [Registries: Bring your own libraries to vcpkg](https://devblogs.microsoft.com/cppblog/registries-bring-your-own-libraries-to-vcpkg/) +- [Vcpkg: Accelerate your team development environment with binary caching and manifests](https://devblogs.microsoft.com/cppblog/vcpkg-accelerate-your-team-development-environment-with-binary-caching-and-manifests/) +- [Vcpkg: 2019.06 Update (overlay ports, overlay triplets, `vcpkg_check_features`)](https://devblogs.microsoft.com/cppblog/vcpkg-2019-06-update/) +- [Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/) +- [Vcpkg: Using multiple enlistments to handle multiple versions of a library](https://blogs.msdn.microsoft.com/vcblog/2017/10/23/vcpkg-using-multiple-enlistments/) +- [Vcpkg: introducing the export command](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) +- [Binary Compatibility and Pain-free Upgrade Why Moving to Visual Studio 2017 is almost "too easy"](https://blogs.msdn.microsoft.com/vcblog/2017/03/07/binary-compatibility-and-pain-free-upgrade-why-moving-to-visual-studio-2017-is-almost-too-easy/) +- [Vcpkg recent enhancements](https://blogs.msdn.microsoft.com/vcblog/2017/02/14/vcpkg-recent-enhancements/) +- [Vcpkg 3 Months Anniversary, Survey](https://blogs.msdn.microsoft.com/vcblog/2017/01/11/vcpkg-3-months-anniversary-survey/) +- [Vcpkg updates: Static linking is now available](https://blogs.msdn.microsoft.com/vcblog/2016/11/01/vcpkg-updates-static-linking-is-now-available/) +- [Vcpkg: a tool to acquire and build C++ open source libraries on Windows](https://blogs.msdn.microsoft.com/vcblog/2016/09/19/vcpkg-a-tool-to-acquire-and-build-c-open-source-libraries-on-windows/) + +### Other + +- [FAQ](about/faq.md) +- [Privacy](about/privacy.md) diff --git a/docs/about/faq.md b/docs/about/faq.md index 504738479defb9..e5dcd4c4c03e15 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -1,10 +1,12 @@ # Frequently Asked Questions ## Can I contribute a new library? -Yes! Start out by reading our [contribution guidelines](https://github.com/Microsoft/vcpkg/blob/master/CONTRIBUTING.md). If you want to contribute but don't have a particular library in mind then take a look at the list of [new port requests](https://github.com/Microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+label%3A%22new+port+request+-+consider+making+a+PR%21%22). +Yes! Start out by reading our [contribution guidelines](https://github.com/Microsoft/vcpkg/blob/master/CONTRIBUTING.md). +If you want to contribute but don't have a particular library in mind then take a look at the list +of [new port requests](https://github.com/Microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+label%3Acategory%3Anew-port). ## Can Vcpkg create pre-built binary packages? What is the binary format used by Vcpkg? -Yes! See [the `export` command](../users/integration.md#export). +Yes! See [the `export` command](../users/integration.md#export-command). ## How do I update libraries? The `vcpkg update` command lists all packages which are out-of-sync with your current portfiles. To update a package, follow the instructions in the command. @@ -28,6 +30,9 @@ We currently target Windows Desktop (x86 and x64) as well as the Universal Windo ## Does Vcpkg run on Linux/OSX? Yes! We continuously test on OSX and Ubuntu 16.04, however we know users have been successful with Arch, Fedora, and FreeBSD. If you have trouble with your favorite Linux distribution, let us know in an issue and we'd be happy to help! +## How do I update vcpkg? +Execute `git pull` to get the latest sources, then run `bootstrap-vcpkg.bat` (Windows) or `./bootstrap-vcpkg.sh` (Unix) to update vcpkg. + ## How do I use different versions of a library on one machine? Within a single instance of Vcpkg (e.g. one set of `installed\`, `packages\`, `ports\` and so forth), you can only have one version of a library installed (otherwise, the headers would conflict with each other!). For those with experience with system-wide package managers, packages in Vcpkg correspond to the `X-dev` or `X-devel` packages. @@ -52,11 +57,12 @@ Yes. While Vcpkg will only produce the standard "Release" and "Debug" configurat First of all, Vcpkg will automatically assume any custom configuration starting with "Release" (resp. "Debug") as a configuration that is compatible with the standard "Release" (resp. "Debug") configuration and will act accordingly. -For other configurations, you only need to override the MSBuild `$(VcpkgConfiguration)` macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. +For other configurations, you only need to override the MSBuild `$(VcpkgConfiguration)` macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. Unfortunately, due to the sequential nature of MSBuild, you'll need to add those settings much higher in your vcxproj so that it is declared before the Vcpk integration is loaded. It is recommend that the `$(VcpkgConfiguration)` macro is added to the "Globals" PropertyGroup. For example, you can add support for your "MyRelease" configuration by adding in your project file: ``` - + + ... Release ``` diff --git a/docs/about/privacy.md b/docs/about/privacy.md index 91d7093721c6e7..d2ba7552e15046 100644 --- a/docs/about/privacy.md +++ b/docs/about/privacy.md @@ -1,51 +1,50 @@ +# Vcpkg Telemetry and Privacy -# Privacy and Vcpkg +vcpkg collects telemetry data to understand usage issues, such as failing packages, and to guide tool improvements. The collected data is anonymous. +For more information about how Microsoft protects your privacy, see https://privacy.microsoft.com/en-US/privacystatement#mainenterprisedeveloperproductsmodule -## Do you collect telemetry data? What is it used for? +## Scope -We do collect telemetry data from usage of "vcpkg.exe". We explicitly ONLY collect information from invocations of the tool itself; we do NOT add any tracking information into the produced libraries. We use this information to understand usage issues, such as failing packages, and to guide tool improvements. +We explicitly ONLY collect information from invocations of the tool itself; we do NOT add any tracking information into the produced libraries. Telemetry is collected when using any of the `vcpkg` commands. -## What telemetry is collected? +## How to opt out -We collect the command line used, the time of invocation, and how long execution took. Some commands also add additional calculated information (such as the full set of libraries to install). We generate a completely random UUID on first use and attach it to each event. -In order to opt-out of data collection, you can re-run the boostrap script with the following flag, for Windows and Linux/OSX, respectively: +The vcpkg telemetry feature is enabled by default. In order to opt-out of data collection, you can re-run the bootstrap script with the following flag, for Windows and Linux/OSX, respectively: ```PS> .\bootstrap-vcpkg.bat -disableMetrics``` ```~/$ ./bootstrap-vcpkg.sh -disableMetrics``` -For more information about how Microsoft protects your privacy, see https://privacy.microsoft.com/en-us/privacy. - -Here is an example of an event for the command line `vcpkg install zlib`: -```json -[{ - "ver": 1, - "name": "Microsoft.ApplicationInsights.Event", - "time": "2016-09-01T00:19:10.949Z", - "sampleRate": 100.000000, - "seq": "0:0", - "iKey": "aaaaaaaa-4393-4dd9-ab8e-97e8fe6d7603", - "flags": 0.000000, - "tags": { - "ai.device.os": "Windows", - "ai.device.osVersion": "10.0.14912", - "ai.session.id": "aaaaaaaa-7c69-4b83-7d82-8a4198d7e88d", - "ai.user.id": "aaaaaaaa-c9ab-4bf5-0847-a3455f539754", - "ai.user.accountAcquisitionDate": "2016-08-20T00:38:09.860Z" - }, - "data": { - "baseType": "EventData", - "baseData": { - "ver": 2, - "name": "commandline_test7", - "properties": { "version":"0.0.30-9b4e44a693459c0a618f370681f837de6dd95a30","cmdline":"install zlib","command":"install","installplan":"zlib:x86-windows" }, - "measurements": { "elapsed_us":68064.355736 } - } - } -}] +## Disclosure + +vcpkg displays text similar to the following when you build vcpkg. This is how Microsoft notifies you about data collection. + +``` +Telemetry +--------- +vcpkg collects usage data in order to help us improve your experience. +The data collected by Microsoft is anonymous. +You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics, +passing --disable-metrics to vcpkg on the command line, +or by setting the VCPKG_DISABLE_METRICS environment variable. + +Read more about vcpkg telemetry at docs/about/privacy.md ``` -In the source code (included in `toolsrc\`), you can search for calls to the functions `TrackProperty()` and `TrackMetric()` to see every specific data point we collect. -## Is the data stored on my system? +## Data Collected + +The telemetry feature doesn't collect personal data, such as usernames or email addresses. It doesn't scan your code and doesn't extract project-level data, such as name, repository, or author. The data is sent securely to Microsoft servers and held under restricted access. + +Protecting your privacy is important to us. If you suspect the telemetry is collecting sensitive data or the data is being insecurely or inappropriately handled, file an issue in the Microsoft/vcpkg repository or send an email to vcpkg@microsoft.com for investigation. + +We collect various telemetry events such as the command line used, the time of invocation, and how long execution took. Some commands also add additional calculated information (such as the full set of libraries to install). We generate a completely random UUID on first use and attach it to each event. + +You can see the telemetry events any command by appending `--printmetrics` after the vcpkg command line. + +In the source code (included at https://github.com/microsoft/vcpkg-tool/ ), you can search for calls to the functions `track_property()`, `track_feature()`, `track_metric()`, and `track_buildtime()` +to see every specific data point we collect. + +## Avoid inadvertent disclosure information -We store each event document in your temporary files directory. These will be cleaned out whenever you clear your temporary files. +vcpkg contributors and anyone else running a version of vcpkg that they built themselves should consider the path to their source code. If a crash occurs when using vcpkg, the file path from the build machine is collected as part of the stack trace and isn't hashed. +Because of this, builds of vcpkg shouldn't be located in directories whose path names expose personal or sensitive information. diff --git a/docs/examples/installing-and-using-packages.md b/docs/examples/installing-and-using-packages.md index 73f9d29a923253..011df93a4cc9f9 100644 --- a/docs/examples/installing-and-using-packages.md +++ b/docs/examples/installing-and-using-packages.md @@ -14,7 +14,7 @@ First, we need to know what name [SQLite](https://sqlite.org) goes by in the por ```no-highlight PS D:\src\vcpkg> .\vcpkg search sqlite libodb-sqlite 2.4.0 Sqlite support for the ODB ORM library -sqlite3 3.15.0 SQLite is a software library that implements a se... +sqlite3 3.32.1 SQLite is a software library that implements a se... If your library is not listed, please open an issue at: https://github.com/Microsoft/vcpkg/issues @@ -24,38 +24,38 @@ Looking at the list, we can see that the port is named "sqlite3". You can also r Installing is then as simple as using the `install` command. ```no-highlight PS D:\src\vcpkg> .\vcpkg install sqlite3 --- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-windows --- DOWNLOADS=D:/src/vcpkg/downloads --- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/sqlite3_x86-windows --- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/sqlite3 --- CURRENT_PORT_DIR=D:/src/vcpkg/ports/sqlite3/. --- Downloading https://sqlite.org/2016/sqlite-amalgamation-3150000.zip... --- Downloading https://sqlite.org/2016/sqlite-amalgamation-3150000.zip... OK --- Testing integrity of downloaded file... --- Testing integrity of downloaded file... OK --- Extracting source D:/src/vcpkg/downloads/sqlite-amalgamation-3150000.zip --- Extracting done --- Configuring x86-windows-rel --- Configuring x86-windows-rel done --- Configuring x86-windows-dbg --- Configuring x86-windows-dbg done --- Build x86-windows-rel --- Build x86-windows-rel done --- Build x86-windows-dbg --- Build x86-windows-dbg done --- Package x86-windows-rel --- Package x86-windows-rel done --- Package x86-windows-dbg --- Package x86-windows-dbg done +Computing installation plan... +The following packages will be built and installed: + sqlite3[core]:x86-windows +Starting package 1/1: sqlite3:x86-windows +Building package sqlite3[core]:x86-windows... +-- Downloading https://sqlite.org/2020/sqlite-amalgamation-3320100.zip... +-- Extracting source C:/src/vcpkg/downloads/sqlite-amalgamation-3320100.zip +-- Applying patch fix-arm-uwp.patch +-- Using source at C:/src/vcpkg/buildtrees/sqlite3/src/3320100-15aeda126a.clean +-- Configuring x86-windows +-- Building x86-windows-dbg +-- Building x86-windows-rel -- Performing post-build validation -- Performing post-build validation done -Package sqlite3:x86-windows is installed +Building package sqlite3[core]:x86-windows... done +Installing package sqlite3[core]:x86-windows... +Installing package sqlite3[core]:x86-windows... done +Elapsed time for package sqlite3:x86-windows: 12 s + +Total elapsed time: 12.04 s + +The package sqlite3:x86-windows provides CMake targets: + + find_package(unofficial-sqlite3 CONFIG REQUIRED) + target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)) + ``` -We can check that sqlite3 was successfully installed for x86 windows desktop by running the `list` command. +We can check that sqlite3 was successfully installed for x86 Windows desktop by running the `list` command. ```no-highlight PS D:\src\vcpkg> .\vcpkg list -sqlite3:x86-windows 3.15.0 SQLite is a software library that implements a se... +sqlite3:x86-windows 3.32.1 SQLite is a software library that implements a se... ``` To install for other architectures and platforms such as Universal Windows Platform or x64 Desktop, you can suffix the package name with `:`. @@ -82,7 +82,7 @@ Installing new libraries will make them instantly available. ``` *Note: You will need to restart Visual Studio or perform a Build to update intellisense with the changes.* -You can now simply use File -> New Project in Visual Studio 2015 or Visual Studio 2017 and the library will be automatically available. For SQLite, you can try out their [C/C++ sample](https://sqlite.org/quickstart.html). +You can now simply use File -> New Project in Visual Studio and the library will be automatically available. For SQLite, you can try out their [C/C++ sample](https://sqlite.org/quickstart.html). To remove the integration for your user, you can use `.\vcpkg integrate remove`. @@ -92,7 +92,7 @@ To remove the integration for your user, you can use `.\vcpkg integrate remove`. The best way to use installed libraries with cmake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as: `-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake`. -If you are using CMake through Open Folder with Visual Studio 2017 you can define `CMAKE_TOOLCHAIN_FILE` by adding a "variables" section to each of your `CMakeSettings.json` configurations: +If you are using CMake through Open Folder with Visual Studio you can define `CMAKE_TOOLCHAIN_FILE` by adding a "variables" section to each of your `CMakeSettings.json` configurations: ```json { @@ -118,10 +118,11 @@ Now let's make a simple CMake project with a main file. cmake_minimum_required(VERSION 3.0) project(test) -find_package(Sqlite3 REQUIRED) +find_package(unofficial-sqlite3 CONFIG REQUIRED) add_executable(main main.cpp) -target_link_libraries(main sqlite3) + +target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3) ``` ```cpp // main.cpp diff --git a/docs/examples/manifest-mode-cmake.md b/docs/examples/manifest-mode-cmake.md new file mode 100644 index 00000000000000..77891b60e7bf15 --- /dev/null +++ b/docs/examples/manifest-mode-cmake.md @@ -0,0 +1,200 @@ +# Manifest Mode: CMake Example + +We would like to add [vcpkg manifest support](../users/manifests.md) to an existing cmake project! +Let's create a simple project that prints the fibonacci sequence up to a certain number, +using some common dependencies. + +## Initial Layout + +Let's create the following file layout: + +```no-highlight +fibo/ + src/ + main.cxx + CMakeLists.txt +``` + +And we wish to use [fmt](https://github.com/fmtlib/fmt), [range-v3](https://github.com/ericniebler/range-v3), +and [cxxopts](https://github.com/jarro2783/cxxopts). + +Let's write our `CMakeLists.txt` first: + +```cmake +cmake_minimum_required(VERSION 3.15) + +project(fibo CXX) + +find_package(fmt REQUIRED) +find_package(range-v3 REQUIRED) +find_package(cxxopts REQUIRED) + +add_executable(fibo src/main.cxx) +target_compile_features(fibo PRIVATE cxx_std_17) + +target_link_libraries(fibo + PRIVATE + fmt::fmt + range-v3::range-v3 + cxxopts::cxxopts) +``` + +And then we should add `main.cxx`: + +```cxx +#include +#include +#include + +namespace view = ranges::views; + +int fib(int x) { + int a = 0, b = 1; + + for (int it : view::repeat(0) | view::take(x)) { + (void)it; + int tmp = a; + a += b; + b = tmp; + } + + return a; +} + +int main(int argc, char** argv) { + cxxopts::Options options("fibo", "Print the fibonacci sequence up to a value 'n'"); + options.add_options() + ("n,value", "The value to print to", cxxopts::value()->default_value("10")); + + auto result = options.parse(argc, argv); + auto n = result["value"].as(); + + for (int x : view::iota(1) | view::take(n)) { + fmt::print("fib({}) = {}\n", x, fib(x)); + } +} +``` + +This is a simple project of course, but it should give us a clean project to start with. +Let's try it out! + +Let's assume you have `fmt`, `range-v3`, and `cxxopts` installed with vcpkg classic mode; +then, you can just do a simple: + +```cmd +D:\src\fibo> cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake +-- Building for: Visual Studio 16 2019 +-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041. +-- The CXX compiler identification is MSVC 19.27.29111.0 +-- Detecting CXX compiler ABI info +-- Detecting CXX compiler ABI info - done +-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped +-- Detecting CXX compile features +-- Detecting CXX compile features - done +-- Configuring done +-- Generating done +-- Build files have been written to: D:/src/fibo/build +D:\src\fibo> cmake --build build +Microsoft (R) Build Engine version 16.7.0+b89cb5fde for .NET Framework +Copyright (C) Microsoft Corporation. All rights reserved. + + Checking Build System + Building Custom Rule D:/src/fibo/CMakeLists.txt + main.cxx + The contents of are available only with C++20 or later. + fibo.vcxproj -> D:\src\fibo\build\Debug\fibo.exe + Building Custom Rule D:/src/fibo/CMakeLists.txt +``` + +And now we can try out the `fibo` binary! + +```cmd +D:\src\fibo> .\build\Debug\fibo.exe -n 7 +fib(1) = 1 +fib(2) = 1 +fib(3) = 2 +fib(4) = 3 +fib(5) = 5 +fib(6) = 8 +fib(7) = 13 +``` + +it works! + +## Converting to Manifest Mode + +We now wish to use manifest mode, so all of our dependencies are managed for us! Let's write a `vcpkg.json`: + +```json +{ + "name": "fibo", + "version-string": "0.1.0", + "dependencies": [ + "cxxopts", + "fmt", + "range-v3" + ] +} +``` + +Let's delete the build directory and rerun the build: + +```cmd +D:\src\fibo> rmdir /S /Q build +D:\src\fibo> cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake +-- Running vcpkg install +Detecting compiler hash for triplet x64-windows... +The following packages will be built and installed: + cxxopts[core]:x64-windows + fmt[core]:x64-windows + range-v3[core]:x64-windows +Starting package 1/3: cxxopts:x64-windows +Building package cxxopts[core]:x64-windows... +Using cached binary package: C:\Users\me\AppData\Local\vcpkg/archives\d2\d2d1e5302cdfefef2fd090d8eda84cc0c1fbe6f1.zip +Building package cxxopts[core]:x64-windows... done +Installing package cxxopts[core]:x64-windows... +Installing package cxxopts[core]:x64-windows... done +Elapsed time for package cxxopts:x64-windows: 50.64 ms +Starting package 2/3: fmt:x64-windows +Building package fmt[core]:x64-windows... +Using cached binary package: C:\Users\me\AppData\Local\vcpkg/archives\bf\bf00d5214e912d71414b545b241f54ef87fdf6e5.zip +Building package fmt[core]:x64-windows... done +Installing package fmt[core]:x64-windows... +Installing package fmt[core]:x64-windows... done +Elapsed time for package fmt:x64-windows: 225 ms +Starting package 3/3: range-v3:x64-windows +Building package range-v3[core]:x64-windows... +Using cached binary package: C:\Users\me\AppData\Local\vcpkg/archives\fe\fe2cdedef6953bf954e8ddca471bf3cc8d9b06d7.zip +Building package range-v3[core]:x64-windows... done +Installing package range-v3[core]:x64-windows... +Installing package range-v3[core]:x64-windows... done +Elapsed time for package range-v3:x64-windows: 1.466 s + +Total elapsed time: 1.742 s + +-- Running vcpkg install - done +-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041. +-- The CXX compiler identification is MSVC 19.27.29111.0 +-- Detecting CXX compiler ABI info +-- Detecting CXX compiler ABI info - done +-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped +-- Detecting CXX compile features +-- Detecting CXX compile features - done +-- Configuring done +-- Generating done +-- Build files have been written to: D:/src/fibo/build +D:\src\fibo> cmake --build build +Microsoft (R) Build Engine version 16.7.0+b89cb5fde for .NET Framework +Copyright (C) Microsoft Corporation. All rights reserved. + + Checking Build System + Building Custom Rule D:/src/fibo/CMakeLists.txt + main.cxx + The contents of are available only with C++20 or later. + fibo.vcxproj -> D:\src\fibo\build\Debug\fibo.exe + Building Custom Rule D:/src/fibo/CMakeLists.txt +``` + +You can see that with just a _single file_, we've changed over to manifests without _any_ trouble. +The build system doesn't change _at all_! We just add a `vcpkg.json` file, delete the build directory, +and reconfigure. And we're done! diff --git a/docs/examples/modify-baseline-to-pin-old-boost.md b/docs/examples/modify-baseline-to-pin-old-boost.md new file mode 100644 index 00000000000000..72e285f386b9a8 --- /dev/null +++ b/docs/examples/modify-baseline-to-pin-old-boost.md @@ -0,0 +1,190 @@ +# Pin old Boost versions +This document will teach you how to set versions of meta-packages like `boost` or `qt5`. + +**What is a meta-package?** +In vcpkg we call meta-packages to ports that by themselves don't install anything but that instead forward installation to another port or ports. The reasons for these meta-packages to exist are plenty: to install different versions of a library depending on platform (like the old OpenSSL port did), to allow for multiple versions to exist in the vcpkg registry at the same time (OpenCV), or to conveniently install/uninstall a catalog of related packages (Boost and Qt). + +In the case of Boost, it is unlikely that a user requires all of the 140+ Boost libraries in their project. For the sake of convenience, vcpkg splits Boost into multiple sub-packages broken down to individual libraries. By doing so, users can limit the subset of Boost libraries that they depend on. + +If a user wants to install all of the Boost libraries available in vcpkg, they can do so by installing the `boost` meta-package. + +Due to the nature of meta-packages, some unexpected issues arise when trying to use them with versioning. If a user writes the following manifest file: + +`vcpkg.json` +```json +{ + "name": "demo", + "version": "1.0.0", + "builtin-baseline": "787fe1418ea968913cc6daf11855ffd8b0b5e9d4", + "dependencies": [ "boost-tuple" ], + "overrides": [ + { "name": "boost", "version": "1.72.0" } + ] +} +``` + +The resulting installation plan is: +``` +The following packages will be built and installed: + boost-assert[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-assert\3393715b4ebe30fe1c3b68acf7f84363e611f156 + boost-compatibility[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-compatibility\cda5675366367789659c59aca65fc57d03c51deb + boost-config[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-config\ca82ca1b9c1739c91f3cf42c68cee56c896ae6bd + boost-container-hash[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-container-hash\bf472c23d29c3d80b562c43471eb92cea998f372 + boost-core[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-core\20a19f6ece37686a02eed33e1f58add8b7a2582a + boost-detail[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-detail\96744251f025f9b3c856a275dfc338031876777b + boost-integer[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-integer\de70ce0d1500df1eda3496c4f98f42f5db256b4a + boost-io[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-io\7bf3407372f8fc2a99321d24a0e952d44fe25bf3 + boost-preprocessor[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-preprocessor\8d78b8ba2e9f54cb00137115ddd2ffec1c63c149 + boost-static-assert[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-static-assert\2a41c4703c7122de25b1c60510c43edc9371f63d + boost-throw-exception[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-throw-exception\b13bdf32a20786a0165cc20205ef63765cac0627 + boost-tuple[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-tuple\22e3d000a178a88992c430d8ae8a0244c7dea674 + boost-type-traits[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-type-traits\8829793f6c6c913257314caa317599f8d253a5ca + boost-uninstall[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-uninstall\08933bad27b6d41caef0940c31e2069ecb6a079c + boost-utility[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-utility\47572946bf6a63c731b9c4142eecb8bef3d3b270 + boost-vcpkg-helpers[core]:x64-windows -> 7#2 -- D:\vcpkg\buildtrees\versioning\versions\boost-vcpkg-helpers\2a21e5ab45d1ce41c185faf85dff0670ea6def1d +``` + +It is reasonable to expect that overriding `boost` to version 1.72.0 results in all Boost packages being pinned to version 1.72.0. **However, vcpkg does not treat the `boost` meta-package any differently that any other port.** In other words, vcpkg has no notion that `boost` is related to all the other `boost-*` libraries, other than it depends on all of them. For this reason, all the other boost packages are installed at version 1.75.0, which is the baseline version. + +Below, we describe two methods to pin down Boost versions effectively. + +## Method 1: Pin specific packages +Use `"overrides"` to force specific versions in a package-by-package basis. + +`vcpkg.json` +```json +{ + "name": "demo", + "version": "1.0.0", + "builtin-baseline": "787fe1418ea968913cc6daf11855ffd8b0b5e9d4", + "dependencies": [ "boost-tuple" ], + "overrides": [ + { "name": "boost-core", "version": "1.72" }, + { "name": "boost-integer", "version": "1.72" }, + { "name": "boost-io", "version": "1.72" }, + { "name": "boost-tuple", "version": "1.72" } + ] +} +``` + +This method allows you to quickly set the specific versions you want, but you will need to write an override for each package. Boost libraries are also heavily interdependent, which means that you may end up writing a lot of override lines. + +The second method makes it easy to pin the entire Boost collection and end up with a very simple manifest file. + +## Method 2: Modify baseline +An easy way to set the version for the entirety of boost is to use the `"builtin-baseline"` property. + +As of right now, it is only possible to go back to Boost version `1.75.0` using a baseline. Since that was the contemporary Boost version when the versioning feature was merged. **But, it is possible to modify the baseline to whatever you like and use that instead.** + +### Step 1: Create a new branch +As described in the versioning documentation. The value that goes in `"builtin-baseline"` is a Git commit in the vcpkg repository's history. Then it stands to reason, that if you want to customize the baseline you should be able to create a new commit with said custom baseline. + +Let's start by creating a new branch to hold our modified baseline. +In the directory containing your clone of the vcpkg Git repository run: + +``` +git checkout -b custom-boost-baseline +``` + +This will create a new branch named `custom-boost-baseline` and check it out immediately. + +### Step 2: Modify the baseline +The next step is to modify the baseline file, open the file in your editor of choice and modify the entries for the Boost libraries. + +Change the `"baseline"` version to your desired version. +_NOTE: Remember to also set the port versions to 0 (or your desired version)._ + +`${vcpkg-root}/versions/baseline.json` +```diff +... + "boost": { +- "baseline": "1.75.0", ++ "baseline": "1.72.0", + "port-version": 0 + }, + "boost-accumulators": { +- "baseline": "1.75.0", +- "port-version": 1 ++ "baseline": "1.72.0", ++ "port-version": 0 + }, + "boost-algorithm": { +- "baseline": "1.75.0", ++ "baseline": "1.72.0", + "port-version": 0 + }, + "boost-align": { +- "baseline": "1.75.0", ++ "baseline": "1.72.0", + "port-version": 0 + }, +... + "boost-uninstall: { + "baseline": "1.75.0", + "port-version": 0 + }, +... +``` + +Some `boost-` packages are helpers used by vcpkg and are not part of Boost. For example, `"boost-uninstall"` is a vcpkg helper to conveniently uninstall all Boost libraries, but it didn't exist for Boost version `1.72.0`, in this case it is fine to leave it at `1.75.0` to avoid baseline errors (since all versions in `baseline.json` must have existed). + +### Step 3: Commit your changes +After saving your modified file, run these commands to commit your changes: + +``` +git add versions/baseline.json +git commit -m "Baseline Boost 1.72.0" +``` + +You can set the commit message to whatever you want, just make it useful for you. + +### Step 4: Get your baseline commit SHA +Once all your changes are ready, you can get the commit SHA by running: +``` +git rev-parse HEAD +``` + +The output of that command will be the commit SHA you need to put as the `"builtin-baseline"` in your project's manifest file. Copy the 40-hex digits and save them to use later in your manifest file. + +### Step 5: (Optional) Go back to the main repository branch +Once your changes have been committed locally, you can refer to the commit SHA regardless of the repository branch you're working on. So, let's go back to the main vcpkg repository branch. + +``` +git checkout master +``` + +### Step 6: Create your manifest file with your custom baseline + +```json +{ + "name": "demo", + "version": "1.0.0", + "builtin-baseline": "9b5cf7c3d9376ddf43429671282972ec4f99aa85", + "dependencies": [ "boost-tuple" ] +} +``` + +In this example, commit SHA `9b5cf7c3d9376ddf43429671282972ec4f99aa85` is the commit ID with the modified baseline. Even when a different branch (`master` in this case) is checked out, Git is able to find the commit as long as the branch with the modified baseline exists (the `custom-boost-baseline` branch we created in step 1). + +We run `vcpkg --feature-flags="manifests,versions" install` in the directory containing our manifest file and the output looks like this: + +``` +The following packages will be built and installed: + boost-assert[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-assert\6754398591f48435b28014ca0d60e5375a4c04d1 + boost-compatibility[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-compatibility\9893ff3c554575bc712df4108a949e07b269f401 + boost-config[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-config\de2784767046b06ec31eb718f10df512e51f2aad + boost-container-hash[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-container-hash\cc19fb0154bbef188f309f49b2664ec7623b96b6 + boost-core[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-core\0eb5e20df9e267e9eca325be946f52ceb8a60229 + boost-detail[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-detail\759d7c6a3f9dbaed0b0c69fa0bb764f7606bb02d + boost-integer[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-integer\173956c61a26e83b0f8b58b0baf60f06aeee637c + boost-preprocessor[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-preprocessor\86eb3938b7875f124feb845331dbe84cbab5d1c6 + boost-static-assert[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-static-assert\e82d8f7f3ee07e927dc374f5a08ed6d6f4ef81f4 + boost-throw-exception[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-throw-exception\64df295f7df41de4fcb219834889b126b5020def + boost-tuple[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-tuple\b3e1b01ffce6e367e4fed0a5538a8546abacb6b2 + boost-type-traits[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-type-traits\5e44ec657660eccf4d3b2710b092dd238e1e7a2d + boost-uninstall[core]:x64-windows -> 1.75.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-uninstall\08933bad27b6d41caef0940c31e2069ecb6a079c + boost-utility[core]:x64-windows -> 1.72.0 -- D:\vcpkg\buildtrees\versioning\versions\boost-utility\7d721b2458d5d595ac341eb54883274f38a4b8c2 + boost-vcpkg-helpers[core]:x64-windows -> 7#2 -- D:\vcpkg\buildtrees\versioning\versions\boost-vcpkg-helpers\2a21e5ab45d1ce41c185faf85dff0670ea6def1d +``` + +Notice how simple our manifest file has become, instead of having a multitude of `"overrides"` you can pin down all Boost packages just by setting the `"builtin-baseline"` to be your modified baseline commit SHA. diff --git a/docs/examples/overlay-triplets-linux-dynamic.md b/docs/examples/overlay-triplets-linux-dynamic.md index b2868e2fd5b6a2..5d79013377afb1 100644 --- a/docs/examples/overlay-triplets-linux-dynamic.md +++ b/docs/examples/overlay-triplets-linux-dynamic.md @@ -55,8 +55,8 @@ Total elapsed time: 44.82 s The package sqlite3:x64-linux-dynamic provides CMake targets: - find_package(sqlite3 CONFIG REQUIRED) - target_link_libraries(main PRIVATE sqlite3) + find_package(unofficial-sqlite3 CONFIG REQUIRED) + target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3) ``` Overlay triplets enables your custom triplet files when using `vcpkg install`, `vcpkg update`, `vcpkg upgrade`, and `vcpkg remove`. @@ -71,7 +71,7 @@ When using the `--overlay-triplets` option, a message like the following lets yo As you may have noticed, the default triplets for Windows (`x86-windows` and `x64-windows`) install dynamic libraries, while a suffix (`-static`) is needed for static libraries. This is different with Linux and Mac OS where static libraries are built by `x64-linux` and `x64-osx`. -Using `--overlay-ports` it is possible to override the default triplets to accomplish the same behavior on Linux: +Using `--overlay-triplets` it is possible to override the default triplets to accomplish the same behavior on Linux: * `x64-linux`: Builds dynamic libraries, * `x64-linux-static`: Builds static libraries. @@ -85,7 +85,7 @@ Using the custom triplet created in the previous example, rename `custom-triplet ~/git$ cp vcpkg/triplets/x64-linux.cmake custom-triplets/x64-linux-static.cmake ``` -### Step 2: Use `--overlay-ports` to override default triplets +### Step 2: Use `--overlay-triplets` to override default triplets Use the `--overlay-triplets` option to include the triplets in the `custom-triplets` directory. @@ -115,8 +115,8 @@ Total elapsed time: 44.82 s The package sqlite3:x64-linux provides CMake targets: - find_package(sqlite3 CONFIG REQUIRED) - target_link_libraries(main PRIVATE sqlite3) + find_package(unofficial-sqlite3 CONFIG REQUIRED) + target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3) ``` Note that the default triplet is masked by your custom triplet: diff --git a/docs/examples/packaging-github-repos.md b/docs/examples/packaging-github-repos.md index af2e6141ac6892..3a0e81c2f93a46 100644 --- a/docs/examples/packaging-github-repos.md +++ b/docs/examples/packaging-github-repos.md @@ -1,24 +1,23 @@ ## Packaging Github Repos Example: libogg -### Create the CONTROL file -The `CONTROL` file is a simple set of fields describing the package's metadata. - -*For libogg, we'll create the file `ports\libogg\CONTROL` with the following contents:* -```no-highlight -Source: libogg -Version: 1.3.3 -Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. -``` +### Create the manifest file +The manifest file (called `vcpkg.json`) is a json file describing the package's metadata. -### Create the portfile -`portfile.cmake` describes how to build and install the package. First we include `vcpkg_common_functions` to give us utilities for carrying this out: +For libogg, we'll create the file `ports/libogg/vcpkg.json` with the following content: -```no-highlight -include(vcpkg_common_functions) +```json +{ + "name": "libogg", + "version-string": "1.3.3", + "description": "Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs." +} ``` -Now we download the project from Github with [`vcpkg_from_github`](../maintainers/vcpkg_from_github.md): +You can format the manifest file to our specifications with `vcpkg format-manifest ports/libogg/vcpkg.json`. + +### Create the portfile +`portfile.cmake` describes how to build and install the package. First we download the project from Github with [`vcpkg_from_github`](../maintainers/vcpkg_from_github.md): -```no-highlight +```cmake vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/ogg @@ -28,11 +27,11 @@ vcpkg_from_github( ) ``` -The important parts to update are `REPO` for the GitHub repository path, `REF` for a stable tag/commit to use, and `SHA512` with the checksum of the downloaded zipfile (you can get this easily by setting it to `1`, trying to install the package, and copying the checksum). +The important parts to update are `REPO` for the GitHub repository path, `REF` for a stable tag/commit to use, and `SHA512` with the checksum of the downloaded zipfile (you can get this easily by setting it to `0`, trying to install the package, and copying the checksum). Finally, we configure the project with CMake, install the package, and copy over the license file: -```no-highlight +```cmake vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -46,14 +45,13 @@ Check the documentation for [`vcpkg_configure_cmake`](../maintainers/vcpkg_confi Now you can run `vcpkg install libogg` to build and install the package. ### Suggested example portfiles -In the `ports\` directory are many libraries that can be used as examples, including many that are not based on CMake. +In the `ports/` directory are many libraries that can be used as examples, including many that are not based on CMake. - Header only libraries - - rapidjson - - range-v3 + - rapidjson + - range-v3 - MSBuild-based - - cppunit - - mpg123 + - mpg123 - Non-CMake, custom buildsystem - - openssl - - ffmpeg + - openssl + - ffmpeg diff --git a/docs/examples/packaging-zipfiles.md b/docs/examples/packaging-zipfiles.md index ed63637fd718a8..979cc29b45db47 100644 --- a/docs/examples/packaging-zipfiles.md +++ b/docs/examples/packaging-zipfiles.md @@ -1,9 +1,9 @@ -## Packaging Zipfiles Example: zlib +## Packaging `.zip` Files Example: zlib ### Bootstrap with `create` First, locate a globally accessible archive of the library's sources. Zip, gzip, and bzip are all supported. Strongly prefer official sources or mirrors over unofficial mirrors. -*Looking at zlib's website, the URL http://zlib.net/zlib1211.zip looks appropriate.* +*Looking at zlib's website, the URL http://zlib.net/zlib-1.2.11.tar.gz looks appropriate.* Second, determine a suitable package name. This should be ASCII, lowercase, and recognizable to someone who knows the library's "human name". If the library is already packaged in another package manager, prefer that name. @@ -13,46 +13,44 @@ Finally, if the server's name for the archive is not very descriptive (such as d *`zlib1211.zip` is a fine name, so no change needed.* -All this information can then be passed into the `create` command, which will download the sources and bootstrap the packaging process inside `ports\`. +All this information can then be passed into the `create` command, which will download the sources and bootstrap the packaging process inside `ports/`. ```no-highlight -PS D:\src\vcpkg> .\vcpkg create zlib2 http://zlib.net/zlib-1.2.11.tar.gz zlib-1.2.11.zip +PS D:\src\vcpkg> .\vcpkg create zlib2 http://zlib.net/zlib-1.2.11.tar.gz zlib1211.tar.gz -- Generated portfile: D:/src/vcpkg/ports/zlib2/portfile.cmake ``` -### Create the CONTROL file -In addition to the generated `ports\\portfile.cmake`, we also need a `ports\\CONTROL` file. This file is a simple set of fields describing the package's metadata. +### Create the manifest file +In addition to the generated `ports//portfile.cmake`, we also need a `ports//vcpkg.json` file. This file is a simple set of fields describing the package's metadata. -*For zlib2, we'll create the file `ports\zlib2\CONTROL` with the following contents:* -```no-highlight -Source: zlib2 -Version: 1.2.11 -Description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library +*For zlib2, we'll create the file `ports/zlib2/vcpkg.json` with the following contents:* +```json +{ + "name": "zlib2", + "version-string": "1.2.11", + "description": "A Massively Spiffy Yet Delicately Unobtrusive Compression Library" +} ``` ### Tweak the generated portfile The generated `portfile.cmake` will need some editing to correctly package most libraries in the wild, however we can start by trying out the build. ```no-highlight -PS D:\src\vcpkg> .\vcpkg build zlib2 --- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-windows --- DOWNLOADS=D:/src/vcpkg/downloads --- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/zlib2_x86-windows --- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/zlib2 --- CURRENT_PORT_DIR=D:/src/vcpkg/ports/zlib2/. --- Using cached D:/src/vcpkg/downloads/zlib-1.2.11.tar.gz --- Testing integrity of cached file... --- Testing integrity of cached file... OK --- Extracting source D:/src/vcpkg/downloads/zlib-1.2.11.tar.gz --- Extracting done --- Configuring x86-windows-rel --- Configuring x86-windows-rel done --- Configuring x86-windows-dbg --- Configuring x86-windows-dbg done --- Build x86-windows-rel --- Build x86-windows-rel done --- Build x86-windows-dbg --- Build x86-windows-dbg done +PS D:\src\vcpkg> .\vcpkg install zlib2 +Computing installation plan... +The following packages will be built and installed: + zlib2[core]:x64-uwp +Starting package 1/1: zlib2:x64-uwp +Building package zlib2[core]:x64-uwp... +-- Using cached C:/src/vcpkg/downloads/zlib1211.tar.gz +-- Cleaning sources at C:/src/vcpkg/buildtrees/zlib2/src/1.2.11-deec42f53b.clean. Pass --editable to vcpkg to reuse sources. +-- Extracting source C:/src/vcpkg/downloads/zlib1211.tar.gz +-- Applying patch cmake_dont_build_more_than_needed.patch +-- Using source at C:/src/vcpkg/buildtrees/zlib2/src/1.2.11-deec42f53b.clean +-- Configuring x64-uwp +-- Building x64-uwp-dbg +-- Building x64-uwp-rel +-- Installing: C:/src/vcpkg/packages/zlib2_x64-uwp/share/zlib2/copyright -- Performing post-build validation Include files should not be duplicated into the /debug/include directory. If this cannot be disabled in the project cmake, use file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -66,13 +64,12 @@ Found 3 error(s). Please correct the portfile: At this point, it is a matter of reading the error messages and log files while steadily improving the quality of the portfile. Zlib required providing a discrete copy of the LICENSE to copy into the package, suppressing the build and installation of executables and headers, and removing the static libraries after they were installed. ### Suggested example portfiles -In the `ports\` directory are many libraries that can be used as examples, including many that are not based on CMake. +In the `ports/` directory are many libraries that can be used as examples, including many that are not based on CMake. - Header only libraries - rapidjson - range-v3 - MSBuild-based - - cppunit - mpg123 - Non-CMake, custom buildsystem - openssl diff --git a/docs/examples/patching.md b/docs/examples/patching.md index b152231e215810..4afc1ffafd58da 100644 --- a/docs/examples/patching.md +++ b/docs/examples/patching.md @@ -1,32 +1,29 @@ -## Patching Example: Patching libpng to work for x86-uwp +## Patching Example: Patching libpng to work for x64-uwp ### Initial error logs First, try building: ```no-highlight -PS D:\src\vcpkg> vcpkg install libpng:x86-uwp --- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-uwp --- DOWNLOADS=D:/src/vcpkg/downloads --- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/libpng_x86-uwp --- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/libpng --- CURRENT_PORT_DIR=D:/src/vcpkg/ports/libpng/. --- Using cached D:/src/vcpkg/downloads/libpng-1.6.24.tar.xz --- Extracting done --- Configuring x86-uwp-rel --- Configuring x86-uwp-rel done --- Configuring x86-uwp-dbg --- Configuring x86-uwp-dbg done --- Build x86-uwp-rel +PS D:\src\vcpkg> vcpkg install libpng:x64-uwp --editable +Computing installation plan... +The following packages will be built and installed: + libpng[core]:x64-uwp +Starting package 1/1: libpng:x64-uwp +Building package libpng[core]:x64-uwp... +-- Using cached D:/src/vcpkg/downloads/glennrp-libpng-v1.6.37.tar.gz +-- Extracting source D:/src/vcpkg/downloads/glennrp-libpng-v1.6.37.tar.gz +-- Using source at D:/src/vcpkg/buildtrees/libpng/src/v1.6.37-c993153cdf +-- Configuring x64-uwp +-- Building x64-uwp-rel CMake Error at scripts/cmake/execute_required_process.cmake:14 (message): - Command failed: C:/Program - Files/CMake/bin/cmake.exe;--build;.;--config;Release + Command failed: C:/Program Files/CMake/bin/cmake.exe;--build;.;--config;Release - Working Directory: D:/src/vcpkg/buildtrees/libpng/x86-uwp-rel + Working Directory: D:/src/vcpkg/buildtrees/libpng/x64-uwp-rel See logs for more information: - D:\src\vcpkg\buildtrees\libpng\build-x86-uwp-rel-out.log - D:\src\vcpkg\buildtrees\libpng\build-x86-uwp-rel-err.log + D:\src\vcpkg\buildtrees\libpng\build-x64-uwp-rel-out.log + D:\src\vcpkg\buildtrees\libpng\build-x64-uwp-rel-err.log Call Stack (most recent call first): scripts/cmake/vcpkg_build_cmake.cmake:3 (execute_required_process) @@ -37,22 +34,22 @@ Call Stack (most recent call first): Error: build command failed ``` -Next, looking at the above logs (build-...-out.log and build-...-err.log). +Next, looking at the above logs (build-xxx-out.log and build-xxx-err.log). ```no-highlight -// build-x86-uwp-rel-out.log +// build-x64-uwp-rel-out.log ... -"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) -> -"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj" (default target) (3) -> +"D:\src\vcpkg\buildtrees\libpng\x64-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) -> +"D:\src\vcpkg\buildtrees\libpng\x64-uwp-rel\png.vcxproj" (default target) (3) -> (ClCompile target) -> - D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24\pngerror.c(775): warning C4013: 'ExitProcess' undefined; assuming extern returning int [D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj] + D:\src\vcpkg\buildtrees\libpng\src\v1.6.37-c993153cdf\pngerror.c(775): warning C4013: 'ExitProcess' undefined; assuming extern returning int [D:\src\vcpkg\buildtrees\libpng\x64-uwp-rel\png.vcxproj] -"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) -> -"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj" (default target) (3) -> +"D:\src\vcpkg\buildtrees\libpng\x64-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) -> +"D:\src\vcpkg\buildtrees\libpng\x64-uwp-rel\png.vcxproj" (default target) (3) -> (Link target) -> - pngerror.obj : error LNK2019: unresolved external symbol _ExitProcess referenced in function _png_longjmp [D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj] - D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\Release\libpng16.dll : fatal error LNK1120: 1 unresolved externals [D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj] + pngerror.obj : error LNK2019: unresolved external symbol _ExitProcess referenced in function _png_longjmp [D:\src\vcpkg\buildtrees\libpng\x64-uwp-rel\png.vcxproj] + D:\src\vcpkg\buildtrees\libpng\x64-uwp-rel\Release\libpng16.dll : fatal error LNK1120: 1 unresolved externals [D:\src\vcpkg\buildtrees\libpng\x64-uwp-rel\png.vcxproj] 1 Warning(s) 2 Error(s) @@ -65,7 +62,7 @@ Time Elapsed 00:00:04.19 Taking a look at [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx) shows that `ExitProcess` is only available for desktop apps. Additionally, it's useful to see the surrounding context: ```c -/* buildtrees\libpng\src\libpng-1.6.24\pngerror.c:769 */ +/* buildtrees\libpng\src\v1.6.37-c993153cdf\pngerror.c:769 */ /* If control reaches this point, png_longjmp() must not return. The only * choice is to terminate the whole process (or maybe the thread); to do * this the ANSI-C abort() function is used unless a different method is @@ -77,7 +74,7 @@ Taking a look at [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop A recursive search for `PNG_ABORT` reveals the definition: ```no-highlight -PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> findstr /snipl "PNG_ABORT" * +PS D:\src\vcpkg\buildtrees\libpng\src\v1.6.37-c993153cdf> findstr /snipl "PNG_ABORT" * CHANGES:701: Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros libpng-manual.txt:432:errors will result in a call to PNG_ABORT() which defaults to abort(). libpng-manual.txt:434:You can #define PNG_ABORT() to a function that does something @@ -100,7 +97,7 @@ pngpriv.h:463:# define PNG_ABORT() abort() This already gives us some great clues, but the full definition tells the complete story. ```c -/* buildtrees\libpng\src\libpng-1.6.24\pngpriv.h:459 */ +/* buildtrees\libpng\src\v1.6.37-c993153cdf\pngpriv.h:459 */ #ifndef PNG_ABORT # ifdef _WINDOWS_ # define PNG_ABORT() ExitProcess(0) @@ -116,15 +113,15 @@ This already gives us some great clues, but the full definition tells the comple We recommend using git to create the patch file, since you'll already have it installed. ```no-highlight -PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git init . -Initialized empty Git repository in D:/src/vcpkg/buildtrees/libpng/src/libpng-1.6.24/.git/ +PS D:\src\vcpkg\buildtrees\libpng\src\v1.6.37-c993153cdf> git init . +Initialized empty Git repository in D:/src/vcpkg/buildtrees/libpng/src/v1.6.37-c993153cdf/.git/ -PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git add . +PS D:\src\vcpkg\buildtrees\libpng\src\v1.6.37-c993153cdf> git add . warning: LF will be replaced by CRLF in ANNOUNCE. The file will have its original line endings in your working directory. ... -PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git commit -m "temp" +PS D:\src\vcpkg\buildtrees\libpng\src\v1.6.37-c993153cdf> git commit -m "temp" [master (root-commit) 68f253f] temp 422 files changed, 167717 insertions(+) ... @@ -132,7 +129,7 @@ PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git commit -m "temp" Now we can modify `pngpriv.h` to use `abort()` everywhere. ```c -/* buildtrees\libpng\src\libpng-1.6.24\pngpriv.h:459 */ +/* buildtrees\libpng\src\v1.6.37-c993153cdf\pngpriv.h:459 */ #ifndef PNG_ABORT # define PNG_ABORT() abort() #endif @@ -140,7 +137,7 @@ Now we can modify `pngpriv.h` to use `abort()` everywhere. The output of `git diff` is already in patch format, so we just need to save the patch into the `ports/libpng` directory. ```no-highlight -PS buildtrees\libpng\src\libpng-1.6.24> git diff | out-file -enc ascii ..\..\..\..\ports\libpng\use-abort-on-all-platforms.patch +PS buildtrees\libpng\src\v1.6.37-c993153cdf> git diff --ignore-space-at-eol | out-file -enc ascii ..\..\..\..\ports\libpng\use-abort-on-all-platforms.patch ``` Finally, we need to apply the patch after extracting the source. @@ -163,42 +160,61 @@ vcpkg_configure_cmake( To be completely sure this works from scratch, we need to remove the package and rebuild it: ```no-highlight -PS D:\src\vcpkg> vcpkg remove libpng:x86-uwp -Package libpng:x86-uwp was successfully removed +PS D:\src\vcpkg> vcpkg remove libpng:x64-uwp +Package libpng:x64-uwp was successfully removed ``` -and complete delete the building directory: D:\src\vcpkg\buildtrees\libpng Now we try a fresh, from scratch install. + ```no-highlight -PS D:\src\vcpkg> vcpkg install libpng:x86-uwp --- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-uwp --- DOWNLOADS=D:/src/vcpkg/downloads --- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/libpng_x86-uwp --- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/libpng --- CURRENT_PORT_DIR=D:/src/vcpkg/ports/libpng/. --- Using cached D:/src/vcpkg/downloads/libpng-1.6.24.tar.xz --- Extracting source D:/src/vcpkg/downloads/libpng-1.6.24.tar.xz --- Extracting done --- Configuring x86-uwp-rel --- Configuring x86-uwp-rel done --- Configuring x86-uwp-dbg --- Configuring x86-uwp-dbg done --- Build x86-uwp-rel --- Build x86-uwp-rel done --- Build x86-uwp-dbg --- Build x86-uwp-dbg done --- Package x86-uwp-rel --- Package x86-uwp-rel done --- Package x86-uwp-dbg --- Package x86-uwp-dbg done -Package libpng:x86-uwp is installed +PS D:\src\vcpkg> vcpkg install libpng:x64-uwp +Computing installation plan... +The following packages will be built and installed: + libpng[core]:x64-uwp +Starting package 1/1: libpng:x64-uwp +Building package libpng[core]:x64-uwp... +Could not locate cached archive: C:\Users\me\AppData\Local\vcpkg/archives\f4\f44b54f818f78b9a4ccd34b3666f566f94286850.zip +-- Using cached D:/src/vcpkg/downloads/glennrp-libpng-v1.6.37.tar.gz +-- Extracting source D:/src/vcpkg/downloads/glennrp-libpng-v1.6.37.tar.gz +-- Applying patch use_abort.patch +-- Applying patch cmake.patch +-- Applying patch pkgconfig.patch +-- Applying patch pkgconfig.2.patch +-- Using source at D:/src/vcpkg/buildtrees/libpng/src/v1.6.37-10db9f58e4.clean +-- Configuring x64-uwp +-- Building x64-uwp-dbg +-- Building x64-uwp-rel +-- Fixing pkgconfig file: D:/src/vcpkg/packages/libpng_x64-uwp/lib/pkgconfig/libpng.pc +-- Fixing pkgconfig file: D:/src/vcpkg/packages/libpng_x64-uwp/lib/pkgconfig/libpng16.pc +-- Fixing pkgconfig file: D:/src/vcpkg/packages/libpng_x64-uwp/debug/lib/pkgconfig/libpng.pc +-- Fixing pkgconfig file: D:/src/vcpkg/packages/libpng_x64-uwp/debug/lib/pkgconfig/libpng16.pc +-- Installing: D:/src/vcpkg/packages/libpng_x64-uwp/share/libpng/copyright +-- Performing post-build validation +-- Performing post-build validation done +Stored binary cache: C:\Users\me\AppData\Local\vcpkg/archives\f4\f44b54f818f78b9a4ccd34b3666f566f94286850.zip +Building package libpng[core]:x64-uwp... done +Installing package libpng[core]:x64-uwp... +Installing package libpng[core]:x64-uwp... done +Elapsed time for package libpng:x64-uwp: 11.94 s + +Total elapsed time: 11.95 s + +The package libpng:x64-uwp provides CMake targets: + + find_package(libpng CONFIG REQUIRED) + target_link_libraries(main PRIVATE png) ``` -Finally, to fully commit and publish the changes, we need to bump the internal release number and add the patch file to source control, then make a Pull Request! - -```no-highlight -# ports\libpng\CONTROL -Source: libpng -Version: 1.6.24-1 -Build-Depends: zlib +Finally, to fully commit and publish the changes, we need to bump the port version in `vcpkg.json`, +and add the patch file to source control, then make a Pull Request! + +```json +{ + "name": "libpng", + "version": "1.6.37", + "port-version": 1, + "dependencies": [ + "zlib" + ] +} ``` diff --git a/docs/examples/vcpkg_android_example_cmake/.gitignore b/docs/examples/vcpkg_android_example_cmake/.gitignore new file mode 100644 index 00000000000000..378eac25d31170 --- /dev/null +++ b/docs/examples/vcpkg_android_example_cmake/.gitignore @@ -0,0 +1 @@ +build diff --git a/docs/examples/vcpkg_android_example_cmake/CMakeLists.txt b/docs/examples/vcpkg_android_example_cmake/CMakeLists.txt new file mode 100644 index 00000000000000..7572bbbc83884f --- /dev/null +++ b/docs/examples/vcpkg_android_example_cmake/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.0) +project(test) +find_package(jsoncpp CONFIG REQUIRED) +add_library(my_lib my_lib.cpp) +target_link_libraries(my_lib jsoncpp_lib) diff --git a/docs/examples/vcpkg_android_example_cmake/compile.sh b/docs/examples/vcpkg_android_example_cmake/compile.sh new file mode 100755 index 00000000000000..1d1aa60a920b8f --- /dev/null +++ b/docs/examples/vcpkg_android_example_cmake/compile.sh @@ -0,0 +1,54 @@ +# +# 1. Check the presence of required environment variables +# +if [ -z ${ANDROID_NDK_HOME+x} ]; then + echo "Please set ANDROID_NDK_HOME" + exit 1 +fi +if [ -z ${VCPKG_ROOT+x} ]; then + echo "Please set VCPKG_ROOT" + exit 1 +fi + +# +# 2. Set the path to the toolchains +# +vcpkg_toolchain_file=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake +android_toolchain_file=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake + + +# +# 3. Select a pair "Android abi" / "vcpkg triplet" +# Uncomment one of the four possibilities below +# + +android_abi=armeabi-v7a +vcpkg_target_triplet=arm-android + +# android_abi=x86 +# vcpkg_target_triplet=x86-android + +# android_abi=arm64-v8a +# vcpkg_target_triplet=arm64-android + +# android_abi=x86_64 +# vcpkg_target_triplet=x64-android + + +# +# 4. Install the library via vcpkg +# +$VCPKG_ROOT/vcpkg install jsoncpp:$vcpkg_target_triplet + +# +# 5. Test the build +# +rm -rf build +mkdir build +cd build +cmake .. \ + -DCMAKE_TOOLCHAIN_FILE=$vcpkg_toolchain_file \ + -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$android_toolchain_file \ + -DVCPKG_TARGET_TRIPLET=$vcpkg_target_triplet \ + -DANDROID_ABI=$android_abi +make diff --git a/docs/examples/vcpkg_android_example_cmake/my_lib.cpp b/docs/examples/vcpkg_android_example_cmake/my_lib.cpp new file mode 100644 index 00000000000000..f0165d72df6156 --- /dev/null +++ b/docs/examples/vcpkg_android_example_cmake/my_lib.cpp @@ -0,0 +1,8 @@ +#include + +int answer() +{ + Json::Value meaning_of; + meaning_of["everything"] = 42; + return meaning_of["everything"].asInt(); +} diff --git a/docs/examples/vcpkg_android_example_cmake_script/.gitignore b/docs/examples/vcpkg_android_example_cmake_script/.gitignore new file mode 100644 index 00000000000000..378eac25d31170 --- /dev/null +++ b/docs/examples/vcpkg_android_example_cmake_script/.gitignore @@ -0,0 +1 @@ +build diff --git a/docs/examples/vcpkg_android_example_cmake_script/CMakeLists.txt b/docs/examples/vcpkg_android_example_cmake_script/CMakeLists.txt new file mode 100644 index 00000000000000..d3218866f57b7d --- /dev/null +++ b/docs/examples/vcpkg_android_example_cmake_script/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.0) + +# if -DVCPKG_TARGET_ANDROID=ON is specified when invoking cmake, load cmake/vcpkg_android.cmake +# !!! Important: place this line before calling project() !!! +if (VCPKG_TARGET_ANDROID) + include("cmake/vcpkg_android.cmake") +endif() + +project(test) + +find_package(jsoncpp CONFIG REQUIRED) +add_library(my_lib my_lib.cpp) +target_link_libraries(my_lib jsoncpp_lib) diff --git a/docs/examples/vcpkg_android_example_cmake_script/cmake/vcpkg_android.cmake b/docs/examples/vcpkg_android_example_cmake_script/cmake/vcpkg_android.cmake new file mode 100644 index 00000000000000..3f09b1114e5f0a --- /dev/null +++ b/docs/examples/vcpkg_android_example_cmake_script/cmake/vcpkg_android.cmake @@ -0,0 +1,99 @@ +# +# vcpkg_android.cmake +# +# Helper script when using vcpkg with cmake. It should be triggered via the variable VCPKG_TARGET_ANDROID +# +# For example: +# if (VCPKG_TARGET_ANDROID) +# include("cmake/vcpkg_android.cmake") +# endif() +# +# This script will: +# 1 & 2. check the presence of needed env variables: ANDROID_NDK_HOME and VCPKG_ROOT +# 3. set VCPKG_TARGET_TRIPLET according to ANDROID_ABI +# 4. Combine vcpkg and Android toolchains by setting CMAKE_TOOLCHAIN_FILE +# and VCPKG_CHAINLOAD_TOOLCHAIN_FILE + +# Note: VCPKG_TARGET_ANDROID is not an official Vcpkg variable. +# it is introduced for the need of this script + +if (VCPKG_TARGET_ANDROID) + + # + # 1. Check the presence of environment variable ANDROID_NDK_HOME + # + if (NOT DEFINED ENV{ANDROID_NDK_HOME}) + message(FATAL_ERROR " + Please set an environment variable ANDROID_NDK_HOME + For example: + export ANDROID_NDK_HOME=/home/your-account/Android/Sdk/ndk-bundle + Or: + export ANDROID_NDK_HOME=/home/your-account/Android/android-ndk-r21b + ") + endif() + + # + # 2. Check the presence of environment variable VCPKG_ROOT + # + if (NOT DEFINED ENV{VCPKG_ROOT}) + message(FATAL_ERROR " + Please set an environment variable VCPKG_ROOT + For example: + export VCPKG_ROOT=/path/to/vcpkg + ") + endif() + + + # + # 3. Set VCPKG_TARGET_TRIPLET according to ANDROID_ABI + # + # There are four different Android ABI, each of which maps to + # a vcpkg triplet. The following table outlines the mapping from vcpkg architectures to android architectures + # + # |VCPKG_TARGET_TRIPLET | ANDROID_ABI | + # |---------------------------|----------------------| + # |arm64-android | arm64-v8a | + # |arm-android | armeabi-v7a | + # |x64-android | x86_64 | + # |x86-android | x86 | + # + # The variable must be stored in the cache in order to successfully the two toolchains. + # + if (ANDROID_ABI MATCHES "arm64-v8a") + set(VCPKG_TARGET_TRIPLET "arm64-android" CACHE STRING "" FORCE) + elseif(ANDROID_ABI MATCHES "armeabi-v7a") + set(VCPKG_TARGET_TRIPLET "arm-android" CACHE STRING "" FORCE) + elseif(ANDROID_ABI MATCHES "x86_64") + set(VCPKG_TARGET_TRIPLET "x64-android" CACHE STRING "" FORCE) + elseif(ANDROID_ABI MATCHES "x86") + set(VCPKG_TARGET_TRIPLET "x86-android" CACHE STRING "" FORCE) + else() + message(FATAL_ERROR " + Please specify ANDROID_ABI + For example + cmake ... -DANDROID_ABI=armeabi-v7a + + Possible ABIs are: arm64-v8a, armeabi-v7a, x64-android, x86-android + ") + endif() + message("vcpkg_android.cmake: VCPKG_TARGET_TRIPLET was set to ${VCPKG_TARGET_TRIPLET}") + + + # + # 4. Combine vcpkg and Android toolchains + # + + # vcpkg and android both provide dedicated toolchains: + # + # vcpkg_toolchain_file=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake + # android_toolchain_file=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake + # + # When using vcpkg, the vcpkg toolchain shall be specified first. + # However, vcpkg provides a way to preload and additional toolchain, + # with the VCPKG_CHAINLOAD_TOOLCHAIN_FILE option. + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE $ENV{ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake) + set(CMAKE_TOOLCHAIN_FILE $ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake) + message("vcpkg_android.cmake: CMAKE_TOOLCHAIN_FILE was set to ${CMAKE_TOOLCHAIN_FILE}") + message("vcpkg_android.cmake: VCPKG_CHAINLOAD_TOOLCHAIN_FILE was set to ${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + +endif(VCPKG_TARGET_ANDROID) diff --git a/docs/examples/vcpkg_android_example_cmake_script/compile.sh b/docs/examples/vcpkg_android_example_cmake_script/compile.sh new file mode 100755 index 00000000000000..abd981a6a2c3e4 --- /dev/null +++ b/docs/examples/vcpkg_android_example_cmake_script/compile.sh @@ -0,0 +1,37 @@ +# 1. Install the library via vcpkg +# This install jsoncpp for the 4 android target ABIs and for the host computer. +# see the correspondence between ABIs and vcpkg triplets in the table below: +# +# |VCPKG_TARGET_TRIPLET | ANDROID_ABI | +# |---------------------------|----------------------| +# |arm64-android | arm64-v8a | +# |arm-android | armeabi-v7a | +# |x64-android | x86_64 | +# |x86-android | x86 | +$VCPKG_ROOT/vcpkg install \ + jsoncpp \ + jsoncpp:arm-android \ + jsoncpp:arm64-android \ + jsoncpp:x86-android \ + jsoncpp:x64-android + + +# 2. Test the build +# +# First, select an android ABI +# Uncomment one of the four possibilities below +# +android_abi=armeabi-v7a +# android_abi=x86 +# android_abi=arm64-v8a +# android_abi=x86_64 + +rm -rf build +mkdir build && cd build + +# DVCPKG_TARGET_ANDROID will load vcpkg_android.cmake, +# which will then load the android + vcpkg toolchains. +cmake .. \ + -DVCPKG_TARGET_ANDROID=ON \ + -DANDROID_ABI=$android_abi +make diff --git a/docs/examples/vcpkg_android_example_cmake_script/my_lib.cpp b/docs/examples/vcpkg_android_example_cmake_script/my_lib.cpp new file mode 100644 index 00000000000000..f0165d72df6156 --- /dev/null +++ b/docs/examples/vcpkg_android_example_cmake_script/my_lib.cpp @@ -0,0 +1,8 @@ +#include + +int answer() +{ + Json::Value meaning_of; + meaning_of["everything"] = 42; + return meaning_of["everything"].asInt(); +} diff --git a/docs/examples/versioning.getting-started.md b/docs/examples/versioning.getting-started.md new file mode 100644 index 00000000000000..c55cf7c1c76539 --- /dev/null +++ b/docs/examples/versioning.getting-started.md @@ -0,0 +1,251 @@ +# Getting started with versioning + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/examples/versioning.getting-started.md).** + +Vcpkg lets you take control of which version of packages to install in your projects using manifests. + +## Using versions with manifests + +With the `versions` feature flag enabled you can start adding version constraints to your dependencies. + +Let's start with creating a simple CMake project that depends on `fmt` and `zlib`. + +Create a folder with the following files: + +**vcpkg.json** +```json +{ + "name": "versions-test", + "version": "1.0.0", + "dependencies": [ + { + "name": "fmt", + "version>=": "7.1.3#1" + }, + "zlib" + ], + "builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc" +} +``` + +**main.cpp** +```c++ +#include +#include + +int main() +{ + fmt::print("fmt version is {}\n" + "zlib version is {}\n", + FMT_VERSION, ZLIB_VERSION); + return 0; +} +``` + +**CMakeLists.txt** +```CMake +cmake_minimum_required(VERSION 3.18) + +project(versionstest CXX) + +add_executable(main main.cpp) + +find_package(ZLIB REQUIRED) +find_package(fmt CONFIG REQUIRED) +target_link_libraries(main PRIVATE ZLIB::ZLIB fmt::fmt) +``` + +And now we build and run our project with CMake: + +1. Create the build directory for the project. +``` +PS D:\versions-test> mkdir build +PS D:\versions-test> cd build +``` + +2. Configure CMake. +``` +PS D:\versions-test\build> cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake .. +-- Running vcpkg install +Detecting compiler hash for triplet x86-windows... +The following packages will be built and installed: + fmt[core]:x64-windows -> 7.1.3#1 -- D:\Work\viromer\vcpkg\buildtrees\versioning\versions\fmt\4f8427eb0bd40da1856d4e67bde39a4fda689d72 + vcpkg-cmake[core]:x64-windows -> 2021-02-26 -- D:\Work\viromer\vcpkg\buildtrees\versioning\versions\vcpkg-cmake\51896aa8073adb5c8450daa423d03eedf0dfc61f + vcpkg-cmake-config[core]:x64-windows -> 2021-02-26 -- D:\Work\viromer\vcpkg\buildtrees\versioning\versions\vcpkg-cmake-config\d255b3d566a8861dcc99a958240463e678528066 + zlib[core]:x64-windows -> 1.2.11#9 -- D:\Work\viromer\vcpkg\buildtrees\versioning\versions\zlib\827111046e37c98153d9d82bb6fa4183b6d728e4 +... +``` + +3. Build the project. +``` +PS D:\versions-test\build> cmake --build . +[2/2] Linking CXX executable main.exe +``` + +4. Run it! +``` +PS D:\versions-test\build> ./main.exe +fmt version is 70103 +zlib version is 1.2.11 +``` + +Take a look at the output: + +``` +fmt[core]:x86-windows -> 7.1.3#1 -- D:\vcpkg\buildtrees\versioning\versions\fmt\4f8427eb0bd40da1856d4e67bde39a4fda689d72 +... +zlib[core]:x86-windows -> 1.2.11#9 -- D:\vcpkg\buildtrees\versioning\versions\zlib\827111046e37c98153d9d82bb6fa4183b6d728e4 +``` + +Instead of using the portfiles in `ports/`, vcpkg is checking out the files for each version in `buildtrees/versioning/versions/`. The files in `ports/` are still used when running vcpkg in classic mode or when the `versions` feature flag is disabled. + +_NOTE: Output from vcpkg while configuring CMake is only available when using CMake version `3.18` or newer. If you're using an older CMake you can check the `vcpkg-manifest-install.log` file in your build directory instead._ + +Read our [manifests announcement blog post](https://devblogs.microsoft.com/cppblog/vcpkg-accelerate-your-team-development-environment-with-binary-caching-and-manifests/#using-manifests-with-msbuild-projects) to learn how to use manifests with MSBuild. + +### Manifest changes +If you have used manifests before you will notice that there are some new JSON properties. Let's review these changes: + +#### **`version`** +```json +{ + "name": "versions-test", + "version": "1.0.0" +} +``` + +This is your project's version declaration. Previously, you could only declare versions for your projects using the `version-string` property. Now that versioning has come around, vcpkg is aware of some new versioning schemes. + +Version scheme | Description +---------------- | --------------- +`version` | Dot-separated numerics: `1.0.0.5`. +`version-semver` | Compliant [semantic versions](https://semver.org): `1.2.0` and `1.2.0-rc`. +`version-date` | Dates in `YYYY-MM-DD` format: `2021-01-01` +`version-string` | Arbitrary strings: `vista`, `candy`. + +#### **`version>=`** +```json +{ + "dependencies": [ + { "name": "fmt", "version>=": "7.1.3" }, + "zlib" + ] +} +``` + +This property is used to express minimum version constraints, it is allowed only as part of the `"dependencies"` declarations. In our example we set an explicit constraint on version `7.1.3#1` of `fmt`. + +Vcpkg is allowed to upgrade this constraint if a transitive dependency requires a newer version. For example, if `zlib` were to declare a dependency on `fmt` version `7.1.4` then vcpkg would install `7.1.4` instead. + +Vcpkg uses a minimum version approach, in our example, even if `fmt` version `8.0.0` were to be released, vcpkg would still install version `7.1.3#1` as that is the minimum version that satisfies the constraint. The advantages of this approach are that you don't get unexpected dependency upgrades when you update vcpkg and you get reproducible builds (in terms of version used) as long as you use the same manifest. + +If you want to upgrade your dependencies, you can bump the minimum version constraint or use a newer baseline. + +#### **`builtin-baseline`** + +```json +{ "builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc" } +``` + +This field declares the versioning baseline for all ports. Setting a baseline is required to enable versioning, otherwise you will get the current versions on the ports directory. You can run 'git rev-parse HEAD' to get the current commit of vcpkg and set it as the builtin-baseline. See the [`builtin-baseline` documentation](../users/versioning.md#builtin-baseline) for more information. + +In our example, you can notice that we do not declare a version constraint for `zlib`; instead, the version is taken from the baseline. Internally, vcpkg will look in commit `3426db05b996481ca31e95fff3734cf23e0f51bc` to find out what version of `zlib` was the latest at that point in time (in our case it was `1.2.11#9`). + +During version resolution, baseline versions are treated as minimum version constraints. If you declare an explicit constraint that is lower than a baseline version, the explicit constraint will be upgraded to the baseline version. + +For example, if we modified our dependencies like this: +```json +{ "dependencies": [ + { + "name": "fmt", + "version>=": "7.1.3#1" + }, + { + "name": "zlib", + "version>=": "1.2.11#7" + } +] } +``` + +_NOTE: The value `1.2.11#7` represents version `1.2.11`, port version `7`._ + +Since the baseline introduces a minimum version constraint for `zlib` at `1.2.11#9` and a higher version does satisfy the minimum version constraint for `1.2.11#7`, vcpkg is allowed to upgrade it. + +Baselines are also a convenient mechanism to upgrade multiple versions at a time, for example, if you wanted to depend on multiple `boost` libraries, it is more convenient to set the `baseline` once than declaring a version constraint on each package. + +But what if you want to pin a version older than the baseline? + +#### **`overrides`** + +Since baselines establish a version floor for all packages and explicit constraints get upgraded when they are lower than the baseline, we need another mechanism to downgrade versions past the baseline. + +The mechanism vcpkg provides for that scenario is `overrides`. When an override is declared on a package, vcpkg will ignore all other version constraints either directly declared in the manifest or from transitive dependencies. In short, `overrides` will force vcpkg to use the exact version declared, period. + +Let's modify our example once more, this time to force vcpkg to use version `6.0.0` of `fmt`. + +```json +{ + "name": "versions-test", + "version": "1.0.0", + "dependencies": [ + { + "name": "fmt", + "version>=": "7.1.3#1" + }, + { + "name": "zlib", + "version>=": "1.2.11#7" + } + ], + "builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc", + "overrides": [ + { + "name": "fmt", + "version": "6.0.0" + } + ] +} +``` + +Rebuild our project: + +``` +PS D:\versions-test\build> rm ./CMakeCache.txt +PS D:\versions-test\build> rm -r ./vcpkg_installed +PS D:\versions-test\build> cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake .. +-- Running vcpkg install +Detecting compiler hash for triplet x86-windows... +The following packages will be built and installed: + fmt[core]:x86-windows -> 6.0.0 -- D:\vcpkg\buildtrees\versioning\versions\fmt\d99b6a35e1406ba6b6e09d719bebd086f83ed5f3 + zlib[core]:x86-windows -> 1.2.11#9 -- D:\vcpkg\buildtrees\versioning\versions\zlib\827111046e37c98153d9d82bb6fa4183b6d728e4 +... +PS D:\versions-test\build> cmake --build . +[2/2] Linking CXX executable main.exe +``` + +And run it! +``` +PS D:\versions-test\build> .\main.exe +fmt version is 60000 +zlib version is 1.2.11 +``` + +Notice how the `fmt` is now at version `6.0.0` just like we wanted. + +## Versions and custom ports + +The last thing to discuss is how overlay ports interact with versioning resolution. The answer is: they don't. + +Going into more detail, when you provide an overlay for a port, vcpkg will always use the overlay port without caring what version is contained in it. The reasons are two-fold: (1) it is consistent with the existing behavior of overlay ports of completely masking the existing port, and (2) overlay ports do not (and are not expected to) provide enough information to power vcpkg's versioning feature. + +If you want to have flexible port customization along with versioning features, you should consider making your own custom registry. See our [registries specification for more details](../specifications/registries.md). + +## Further reading + +If you're interested in delving deeper into the details of how versioning works we recommended that you read the [original versioning specification](../specifications/versioning.md) and the [implementation details](../users/versioning.implementation-details.md). + +See also: + +* [Versioning docs](../users/versioning.md) +* [Original specification](../specifications/versioning.md) +* [Versioning implementation details](../users/versioning.implementation-details.md) diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index b2f0a53b29b6e3..00000000000000 --- a/docs/index.md +++ /dev/null @@ -1,47 +0,0 @@ -### Quick Start - -Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving; your involvement are vital to its success! - -### Examples - -- [Installing and Using Packages Example: sqlite](examples/installing-and-using-packages.md) -- [Packaging Zipfiles Example: zlib](examples/packaging-zipfiles.md) -- [Packaging GitHub Repositories Example: libogg](examples/packaging-github-repos.md) -- [Patching Example: Patching libpng to work for x86-uwp](examples/patching.md) - -### User Help - -- [Integration with build systems](users/integration.md) -- [Triplet files](users/triplets.md) -- [Configuration and Environment](users/config-environment.md) - -### Maintainer help - -- [Control files](maintainers/control-files.md) -- [Portfile functions](maintainers/portfile-functions.md) -- [Maintainer Guidelines](maintainers/maintainer-guide.md) - -### Tool Maintainer Help - -- [Testing](tool-maintainers/testing.md) -- [Maintainer Guidelines](maintainers/maintainer-guide.md) - -### Specifications - -- [Export](specifications/export-command.md) -- [Feature Packages](specifications/feature-packages.md) - -### Blog posts -- [Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/) -- [Vcpkg: Using multiple enlistments to handle multiple versions of a library](https://blogs.msdn.microsoft.com/vcblog/2017/10/23/vcpkg-using-multiple-enlistments/) -- [Vcpkg: introducing the export command](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) -- [Binary Compatibility and Pain-free Upgrade Why Moving to Visual Studio 2017 is almost "too easy"](https://blogs.msdn.microsoft.com/vcblog/2017/03/07/binary-compatibility-and-pain-free-upgrade-why-moving-to-visual-studio-2017-is-almost-too-easy/) -- [Vcpkg recent enhancements](https://blogs.msdn.microsoft.com/vcblog/2017/02/14/vcpkg-recent-enhancements/) -- [Vcpkg 3 Months Anniversary, Survey](https://blogs.msdn.microsoft.com/vcblog/2017/01/11/vcpkg-3-months-anniversary-survey/) -- [Vcpkg updates: Static linking is now available](https://blogs.msdn.microsoft.com/vcblog/2016/11/01/vcpkg-updates-static-linking-is-now-available/) -- [Vcpkg: a tool to acquire and build C++ open source libraries on Windows](https://blogs.msdn.microsoft.com/vcblog/2016/09/19/vcpkg-a-tool-to-acquire-and-build-c-open-source-libraries-on-windows/) - -### Other - -- [FAQ](about/faq.md) -- [Privacy](about/privacy.md) diff --git a/docs/maintainers/cmake-guidelines.md b/docs/maintainers/cmake-guidelines.md new file mode 100644 index 00000000000000..c0bd5b6a081ff8 --- /dev/null +++ b/docs/maintainers/cmake-guidelines.md @@ -0,0 +1,166 @@ +# CMake Guidelines + +We expect that all CMake scripts that are either: + +- In the `scripts/` directory, or +- In a `vcpkg-*` port + +should follow the guidelines laid out in this document. +Existing scripts may not follow these guidelines yet; +it is expected that we will continue to update old scripts +to fall in line with these guidelines. + +These guidelines are intended to create stability in our scripts. +We hope that they will make both forwards and backwards compatibility easier. + +## The Guidelines + +- Except for out-parameters, we always use `cmake_parse_arguments()` + rather than function parameters or referring to `${ARG}`. + - This doesn't necessarily need to be followed for "script-local helper functions" + - In this case, positional parameters should be put in the function + declaration (rather than using `${ARG}`), + and should be named according to local rules (i.e. `snake_case`). + - Exception: positional parameters that are optional should be + given a name via `set(argument_name "${ARG}")`, after checking `ARGC`. + - Out-parameters should be the first parameter to a function. Example: + ```cmake + function(format out_var) + cmake_parse_arguments(PARSE_ARGV 1 "arg" ...) + # ... set(buffer "output") + set("${out_var}" "${buffer}" PARENT_SCOPE) + endfunction() + ``` +- There are no unparsed or unused arguments. + Always check for `ARGN` or `arg_UNPARSED_ARGUMENTS`. + `FATAL_ERROR` when possible, `WARNING` if necessary for backwards compatibility. +- All `cmake_parse_arguments` must use `PARSE_ARGV`. +- All `foreach` loops must use `IN LISTS`, `IN ITEMS`, or `RANGE`. +- The variables `${ARGV}` and `${ARGN}` are unreferenced, + except in helpful messages to the user. + - (i.e., `message(FATAL_ERROR "blah was passed extra arguments: ${ARGN}")`) +- We always use functions, not macros or top level code. + - Exception: "script-local helper macros". It is sometimes helpful to define a small macro. + This should be done sparingly, and functions should be preferred. + - Exception: `vcpkg.cmake`'s `find_package`. +- Scripts in the scripts tree should not be expected to need observable changes + as part of normal operation. + - Example violation: `vcpkg_acquire_msys()` has hard-coded packages and versions + that need updating over time due to the MSYS project dropping old packages. + - Example exception: `vcpkg_from_sourceforge()` has a list of mirrors which + needs maintenance, but does not have an observable behavior impact on the callers. +- Rules for quoting: there are three kinds of arguments in CMake - + unquoted (`foo(BAR)`), quoted (`foo("BAR")`), and bracketed (`foo([[BAR]])`). + Follow these rules to quote correctly: + - If an argument contains a variable expansion `${...}`, + it must be quoted. + - Exception: a "splat" variable expansion, when one variable will be + passed to a function as multiple arguments. In this case, the argument + should simply be `${foo}`: + ```cmake + vcpkg_list(SET working_directory) + if(DEFINED "arg_WORKING_DIRECTORY") + vcpkg_list(SET working_directory WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}") + endif() + # calls do_the_thing() if NOT DEFINED arg_WORKING_DIRECTORY, + # else calls do_the_thing(WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}") + do_the_thing(${working_directory}) + ``` + - Otherwise, if the argument contains any escape sequences that are not + `\\`, `\"`, or `\$`, that argument must be a quoted argument. + - For example: `"foo\nbar"` must be quoted. + - Otherwise, if the argument contains a `\`, a `"`, or a `$`, + that argument should be bracketed. + - Example: + ```cmake + set(x [[foo\bar]]) + set(y [=[foo([[bar\baz]])]=]) + ``` + - Otherwise, if the argument contains characters that are + not alphanumeric or `_`, that argument should be quoted. + - Otherwise, the argument should be unquoted. + - Exception: arguments to `if()` of type `` should always be quoted: + - Both arguments to the comparison operators - + `EQUAL`, `STREQUAL`, `VERSION_LESS`, etc. + - The first argument to `MATCHES` and `IN_LIST` + - Example: + ```cmake + if("${FOO}" STREQUAL "BAR") # ... + if("${BAZ}" EQUAL "0") # ... + if("FOO" IN_LIST list_variable) # ... + if("${bar}" MATCHES [[a[bcd]+\.[bcd]+]]) # ... + ``` + - For single expressions and for other types of predicates that do not + take ``, use the normal rules. +- There are no "pointer" or "in-out" parameters + (where a user passes a variable name rather than the contents), + except for simple out-parameters. +- Variables are not assumed to be empty. + If the variable is intended to be used locally, + it must be explicitly initialized to empty with `set(foo "")` if it is a string variable, + and `vcpkg_list(SET foo)` if it is a list variable. +- `set(var)` should not be used. Use `unset(var)` to unset a variable, + `set(var "")` to set it to the empty string, + and `vcpkg_list(SET var)` to set it to the empty list. + _Note: the empty string and the empty list are the same value;_ + _this is a notational difference rather than a difference in result_ +- All variables expected to be inherited from the parent scope across an API boundary + (i.e. not a file-local function) should be documented. + Note that all variables mentioned in triplets.md are considered documented. +- Out parameters are only set in `PARENT_SCOPE` and are never read. + See also the helper `z_vcpkg_forward_output_variable()` to forward out parameters through a function scope. +- `CACHE` variables are used only for global variables which are shared internally among strongly coupled + functions and for internal state within a single function to avoid duplicating work. + These should be used extremely sparingly and should use the `Z_VCPKG_` prefix to avoid + colliding with any local variables that would be defined by any other code. + - Examples: + - `vcpkg_cmake_configure`'s `Z_VCPKG_CMAKE_GENERATOR` + - `z_vcpkg_get_cmake_vars`'s `Z_VCPKG_GET_CMAKE_VARS_FILE` +- `include()`s are only allowed in `ports.cmake` or `vcpkg-port-config.cmake`. +- `foreach(RANGE)`'s arguments _must always be_ natural numbers, + and `` _must always be_ less than or equal to ``. + - This must be checked by something like: + ```cmake + if("${start}" LESS_EQUAL "${end}") + foreach(RANGE "${start}" "${end}") + ... + endforeach() + endif() + ``` +- All port-based scripts must use `include_guard(GLOBAL)` + to avoid being included multiple times. + +### CMake Versions to Require + +- All CMake scripts, except for `vcpkg.cmake`, + may assume the version of CMake that is present in the + `cmake_minimum_required` of `ports.cmake`. + - This `cmake_minimum_required` should be bumped every time a new version + of CMake is added to `vcpkgTools.xml`, as should the + `cmake_minimum_required` in all of the helper `CMakeLists.txt` files. +- `vcpkg.cmake` must assume a version of CMake back to 3.1 in general + - Specific functions and options may assume a greater CMake version; + if they do, make sure to comment that function or option + with the required CMake version. + + +### Changing Existing Functions + +- Never remove arguments in non-internal functions; + if they should no longer do anything, just take them as normal and warn on use. +- Never add a new mandatory argument. + +### Naming Variables + +- `cmake_parse_arguments`: set prefix to `"arg"` +- Local variables are named with `snake_case` +- Internal global variable names are prefixed with `Z_VCPKG_`. +- External experimental global variable names are prefixed with `X_VCPKG_`. + +- Internal functions are prefixed with `z_vcpkg_` + - Functions which are internal to a single function (i.e., helper functions) + are named `[z_]_`, where `` is the name of the function they are + a helper to, and `` is what the helper function does. + - `z_` should be added to the front if `` doesn't have a `z_`, + but don't name a helper function `z_z_foo_bar`. +- Public global variables are named `VCPKG_`. diff --git a/docs/maintainers/control-files.md b/docs/maintainers/control-files.md index 03bfa113a7a0f3..7064ad40e70c47 100644 --- a/docs/maintainers/control-files.md +++ b/docs/maintainers/control-files.md @@ -1,5 +1,9 @@ # CONTROL files +**CONTROL files are retained for backwards compatibility with earlier versions of vcpkg; +all new features are added only to [vcpkg.json manifest files](manifest-files.md), and we recommend using vcpkg.json for any newly authored port. +Use `./vcpkg format-manifest ports//CONTROL` to convert an existing CONTROL file to a vcpkg.json file.** + The `CONTROL` file contains metadata about the port. The syntax is based on [the Debian `control` format][debian] although we only support the subset of fields documented here. Field names are case-sensitive and start the line without leading whitespace. Paragraphs are separated by one or more empty lines. @@ -8,18 +12,19 @@ Field names are case-sensitive and start the line without leading whitespace. P ## Source Paragraph -The first paragraph in a `CONTROL` file is the Source paragraph. It must have a `Source`, `Version`, and `Description` field. It can optionally have a `Build-Depends` and `Default-Features` field. +The first paragraph in a `CONTROL` file is the Source paragraph. It must have a `Source`, `Version`, and `Description` field. The full set of fields is documented below. ### Examples: ```no-highlight Source: ace -Version: 6.5.5-1 +Version: 6.5.5 Description: The ADAPTIVE Communication Environment ``` ```no-highlight Source: vtk -Version: 8.2.0-2 +Version: 8.2.0 +Port-Version: 2 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, atlmfc (windows), eigen3, double-conversion, pugixml, libharu, sqlite3, netcdf-c ``` @@ -39,7 +44,7 @@ Package collections to check for conflicts: + [Packages search](https://pkgs.org/) #### Version -The port version. +The library version. This field is an alphanumeric string that may also contain `.`, `_`, or `-`. No attempt at ordering versions is made; all versions are treated as bit strings and are only evaluated for equality. @@ -47,7 +52,6 @@ For tagged-release ports, we follow the following convention: 1. If the port follows a scheme like `va.b.c`, we remove the leading `v`. In this case, it becomes `a.b.c`. 2. If the port includes its own name in the version like `curl-7_65_1`, we remove the leading name: `7_65_1` -3. If the port has been modified, we append a `-N` to distinguish the versions: `1.2.1-4` For rolling-release ports, we use the date that the _commit was accessed by you_, formatted as `YYYY-MM-DD`. Stated another way: if someone had a time machine and went to that date, they would see this commit as the latest master. @@ -56,11 +60,17 @@ For example, given: 2. The current version string is `2019-02-14-1` 3. Today's date is 2019-06-01. -Then if you update the source version today, you should give it version `2019-06-01`. If you need to make a change which doesn't adjust the source version, you should give it version `2019-02-14-2`. +Then if you update the source version today, you should give it version `2019-06-01`. -Example: +#### Port-Version +The version of the port. + +This field is a non-negative integer. It allows one to version the port file separately from the version of the underlying library; if you make a change to a port, without changing the underlying version of the library, you should increment this field by one (starting at `0`, which is equivalent to no `Port-Version` field). When the version of the underlying library is upgraded, this field should be set back to `0` (i.e., delete the `Port-Version` field). + +##### Examples: ```no-highlight -Version: 1.0.5-2 +Version: 1.0.5 +Port-Version: 2 ``` ```no-highlight Version: 2019-03-21 @@ -71,15 +81,15 @@ A description of the library. By convention the first line of the description is a summary of the library. An optional detailed description follows. The detailed description can be multiple lines, all starting with whitespace. -Example: +##### Examples: ```no-highlight Description: C++ header-only JSON library ``` ```no-highlight Description: Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1. - MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for "machine + MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for "machine to machine" messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino. -```` +``` #### Homepage The URL of the homepage for the library where a user is able to find additional documentation or the original source code. @@ -96,28 +106,63 @@ Vcpkg does not distinguish between build-only dependencies and runtime dependenc *For example: websocketpp is a header only library, and thus does not require any dependencies at install time. However, downstream users need boost and openssl to make use of the library. Therefore, websocketpp lists boost and openssl as dependencies* -Example: -```no-highlight -Build-Depends: zlib, libpng, libjpeg-turbo, tiff -``` -If the port is dependent on optional features of another library those can be specified using the `portname[featurelist]` syntax. +If the port is dependent on optional features of another library those can be specified using the `portname[featurelist]` syntax. If the port does not require any features from the dependency, this should be specified as `portname[core]`. -Dependencies can be filtered based on the target triplet to support different requirements on Windows Desktop versus the Universal Windows Platform. Currently, the string inside parentheses is substring-compared against the triplet name. There must be a space between the name of the port and the filter. __This will change in a future version to not depend on the triplet name.__ +Dependencies can be filtered based on the target triplet to support differing requirements. These filters use the same syntax as the Supports field below and are surrounded in parentheses following the portname and feature list. -Example: +##### Example: ```no-highlight -Build-Depends: curl[openssl] (!windows&!osx), curl[winssl] (windows), curl[darwinssl] (osx) +Build-Depends: rapidjson, curl[core,openssl] (!windows), curl[core,winssl] (windows) ``` -#### Default-Feature +#### Default-Features Comma separated list of optional port features to install by default. This field is optional. +##### Example: ```no-highlight Default-Features: dynamodb, s3, kinesis ``` + +#### Supports +Expression that evaluates to true when the port is expected to build successfully for a triplet. + +Currently, this field is only used in the CI testing to skip ports. In the future, this mechanism is intended to warn users in advance that a given install tree is not expected to succeed. Therefore, this field should be used optimistically; in cases where a port is expected to succeed 10% of the time, it should still be marked "supported". + +The grammar for the supports expression uses standard operators: +- `!expr` - negation +- `expr|expr` - or (`||` is also supported) +- `expr&expr` - and (`&&` is also supported) +- `(expr)` - grouping/precedence + +The predefined expressions are computed from standard triplet settings: +- `native` - `TARGET_TRIPLET` == `HOST_TRIPLET` +- `x64` - `VCPKG_TARGET_ARCHITECTURE` == `"x64"` +- `x86` - `VCPKG_TARGET_ARCHITECTURE` == `"x86"` +- `arm` - `VCPKG_TARGET_ARCHITECTURE` == `"arm"` or `VCPKG_TARGET_ARCHITECTURE` == `"arm64"` +- `arm64` - `VCPKG_TARGET_ARCHITECTURE` == `"arm64"` +- `windows` - `VCPKG_CMAKE_SYSTEM_NAME` == `""` or `VCPKG_CMAKE_SYSTEM_NAME` == `"WindowsStore"` +- `uwp` - `VCPKG_CMAKE_SYSTEM_NAME` == `"WindowsStore"` +- `linux` - `VCPKG_CMAKE_SYSTEM_NAME` == `"Linux"` +- `osx` - `VCPKG_CMAKE_SYSTEM_NAME` == `"Darwin"` +- `android` - `VCPKG_CMAKE_SYSTEM_NAME` == `"Android"` +- `static` - `VCPKG_LIBRARY_LINKAGE` == `"static"` +- `wasm32` - `VCPKG_TARGET_ARCHITECTURE` == `"wasm32"` +- `emscripten` - `VCPKG_CMAKE_SYSTEM_NAME` == `"Emscripten"` + +These predefined expressions can be overridden in the triplet file via the [`VCPKG_DEP_INFO_OVERRIDE_VARS`](../users/triplets.md) option. + +This field is optional and defaults to true. + +> Implementers' Note: these terms are computed from the triplet via the `vcpkg_get_dep_info` mechanism. + +##### Example: +```no-highlight +Supports: !(uwp|arm) +``` + ## Feature Paragraphs Multiple optional features can be specified in the `CONTROL` files. It must have a `Feature` and `Description` field. It can optionally have a `Build-Depends` field. It must be separated from other paragraphs by one or more empty lines. @@ -139,7 +184,7 @@ Build-Depends: qt5 Feature: mpi Description: MPI functionality for VTK -Build-Depends: msmpi, hdf5[parallel] +Build-Depends: mpi, hdf5[parallel] Feature: python Description: Python functionality for VTK diff --git a/docs/maintainers/execute_process.md b/docs/maintainers/execute_process.md new file mode 100644 index 00000000000000..688ec84646c72e --- /dev/null +++ b/docs/maintainers/execute_process.md @@ -0,0 +1,11 @@ +# execute_process + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/execute_process.md). + +Intercepts all calls to execute_process() inside portfiles and fails when Download Mode +is enabled. + +In order to execute a process in Download Mode call `vcpkg_execute_in_download_mode()` instead. + +## Source +[scripts/cmake/execute\_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/execute_process.cmake) diff --git a/docs/maintainers/internal/z_vcpkg_apply_patches.md b/docs/maintainers/internal/z_vcpkg_apply_patches.md new file mode 100644 index 00000000000000..64351ed526666e --- /dev/null +++ b/docs/maintainers/internal/z_vcpkg_apply_patches.md @@ -0,0 +1,32 @@ +# z_vcpkg_apply_patches + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** + +Apply a set of patches to a source tree. + +```cmake +z_vcpkg_apply_patches( + SOURCE_PATH + [QUIET] + PATCHES ... +) +``` + +The `` should be set to `${SOURCE_PATH}` by convention, +and is the path to apply the patches in. + +`z_vcpkg_apply_patches` will take the list of ``es, +which are by default relative to the port directory, +and apply them in order using `git apply`. +Generally, these ``es take the form of `some.patch` +to select patches in the port directory. +One may also download patches and use `${VCPKG_DOWNLOADS}/path/to/some.patch`. + +If `QUIET` is not passed, it is a fatal error for a patch to fail to apply; +otherwise, if `QUIET` is passed, no message is printed. +This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. + +## Source +[scripts/cmake/z\_vcpkg\_apply\_patches.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_apply_patches.cmake) diff --git a/docs/maintainers/internal/z_vcpkg_forward_output_variable.md b/docs/maintainers/internal/z_vcpkg_forward_output_variable.md new file mode 100644 index 00000000000000..10c5855df6dba0 --- /dev/null +++ b/docs/maintainers/internal/z_vcpkg_forward_output_variable.md @@ -0,0 +1,38 @@ +# z_vcpkg_forward_output_variable + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). + +This macro helps with forwarding values from inner function calls, +through a local function scope, into pointer out parameters. + +```cmake +z_vcpkg_forward_output_variable(ptr_to_parent_var var_to_forward) +``` + +is equivalent to + +```cmake +if(DEFINED ptr_to_parent_var) + if(DEFINED value_var) + set("${ptr_to_parent_var}" "${value_var}" PARENT_SCOPE) + else() + unset("${ptr_to_parent_var}" PARENT_SCOPE) + endif() +endif() +``` + +Take note that the first argument should be a local variable that has a value of the parent variable name. +Most commonly, this local is the result of a pointer-out parameter to a function. +If the variable in the first parameter is not defined, this function does nothing, +simplifying functions with optional out parameters. +Most commonly, this should be used in cases like: + +```cmake +function(my_function out_var) + file(SHA512 "somefile.txt" local_var) + z_vcpkg_forward_output_variable(out_var local_var) +endfunction() +``` + +## Source +[scripts/cmake/z\_vcpkg\_forward\_output\_variable.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_forward_output_variable.cmake) diff --git a/docs/maintainers/internal/z_vcpkg_function_arguments.md b/docs/maintainers/internal/z_vcpkg_function_arguments.md new file mode 100644 index 00000000000000..ac6fb1b6096d68 --- /dev/null +++ b/docs/maintainers/internal/z_vcpkg_function_arguments.md @@ -0,0 +1,29 @@ +# z_vcpkg_function_arguments + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** +Get a list of the arguments which were passed in. +Unlike `ARGV`, which is simply the arguments joined with `;`, +so that `(A B)` is not distinguishable from `("A;B")`, +this macro gives `"A;B"` for the first argument list, +and `"A\;B"` for the second. + +```cmake +z_vcpkg_function_arguments( []) +``` + +`z_vcpkg_function_arguments` gets the arguments between `ARGV` and the last argument. +`` defaults to `0`, so that all arguments are taken. + +## Example: +```cmake +function(foo_replacement) + z_vcpkg_function_arguments(ARGS) + foo(${ARGS}) + ... +endfunction() +``` + +## Source +[scripts/cmake/z\_vcpkg\_function\_arguments.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_function_arguments.cmake) diff --git a/docs/maintainers/internal/z_vcpkg_get_cmake_vars.md b/docs/maintainers/internal/z_vcpkg_get_cmake_vars.md new file mode 100644 index 00000000000000..2dcf2a8e7e989e --- /dev/null +++ b/docs/maintainers/internal/z_vcpkg_get_cmake_vars.md @@ -0,0 +1,36 @@ +# z_vcpkg_get_cmake_vars + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** +Runs a cmake configure with a dummy project to extract certain cmake variables + +## Usage +```cmake +z_vcpkg_get_cmake_vars() +``` + +`z_vcpkg_get_cmake_vars(cmake_vars_file)` sets `` to +a path to a generated CMake file, with the detected `CMAKE_*` variables +re-exported as `VCPKG_DETECTED_*`. + +## Notes +Avoid usage in portfiles. + +All calls to `z_vcpkg_get_cmake_vars` will result in the same output file; +the output file is not generated multiple times. + +## Examples + +* [vcpkg_configure_make](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) + +### Basic Usage + +```cmake +z_vcpkg_get_cmake_vars(cmake_vars_file) +include("${cmake_vars_file}") +message(STATUS "detected CXX flags: ${VCPKG_DETECTED_CXX_FLAGS}") +``` + +## Source +[scripts/cmake/z\_vcpkg\_get\_cmake\_vars.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_get_cmake_vars.cmake) diff --git a/docs/maintainers/internal/z_vcpkg_prettify_command_line.md b/docs/maintainers/internal/z_vcpkg_prettify_command_line.md new file mode 100644 index 00000000000000..f17114bce8b493 --- /dev/null +++ b/docs/maintainers/internal/z_vcpkg_prettify_command_line.md @@ -0,0 +1,21 @@ +# z_vcpkg_prettify_command_line + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** +Turn a command line into a formatted string. + +```cmake +z_vcpkg_prettify_command_line( ...) +``` + +This command is for internal use, when printing out to a message. + +## Examples + +* `scripts/cmake/vcpkg_execute_build_process.cmake` +* `scripts/cmake/vcpkg_execute_required_process.cmake` +* `scripts/cmake/vcpkg_execute_required_process_repeat.cmake` + +## Source +[scripts/cmake/z\_vcpkg\_prettify\_command\_line.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_prettify_command_line.cmake) diff --git a/docs/maintainers/maintainer-guide.md b/docs/maintainers/maintainer-guide.md index e4938844faa58b..185d3d15bbed66 100644 --- a/docs/maintainers/maintainer-guide.md +++ b/docs/maintainers/maintainer-guide.md @@ -1,26 +1,40 @@ # Maintainer Guidelines and Policies -This document lists a set of policies that you should apply when adding or updating a port recipe. It is intended to serve the role of [Debian's Policy Manual](https://www.debian.org/doc/debian-policy/), [Homebrew's Maintainer Guidelines](https://docs.brew.sh/Maintainer-Guidelines), and [Homebrew's Formula Cookbook](https://docs.brew.sh/Formula-Cookbook). +This document lists a set of policies that you should apply when adding or updating a port recipe. +It is intended to serve the role of +[Debian's Policy Manual](https://www.debian.org/doc/debian-policy/), +[Homebrew's Maintainer Guidelines](https://docs.brew.sh/Maintainer-Guidelines), and +[Homebrew's Formula Cookbook](https://docs.brew.sh/Formula-Cookbook). ## PR Structure ### Make separate Pull Requests per port -Whenever possible, separate changes into multiple PR's. This makes them significantly easier to review and prevents issues with one set of changes from holding up every other change. +Whenever possible, separate changes into multiple PRs. +This makes them significantly easier to review and prevents issues with one set of changes from holding up every other change. ### Avoid trivial changes in untouched files -For example, avoid reformatting or renaming variables in portfiles that otherwise have no reason to be modified for the issue at hand. However, if you need to modify the file for the primary purpose of the PR (updating the library), then obviously beneficial changes like fixing typos are appreciated! +For example, avoid reformatting or renaming variables in portfiles that otherwise have no reason to be modified for the issue at hand. +However, if you need to modify the file for the primary purpose of the PR (updating the library), +then obviously beneficial changes like fixing typos are appreciated! ### Check names against other repositories -A good service to check many at once is [Repology](https://repology.org/). If the library you are adding could be confused with another one, consider renaming to make it clear. +A good service to check many at once is [Repology](https://repology.org/). +If the library you are adding could be confused with another one, +consider renaming to make it clear. We prefer when names are longer and/or +unlikely to conflict with any future use of the same name. If the port refers +to a library on GitHub, a good practice is to prefix the name with the organization +if there is any chance of confusion. ### Use GitHub Draft PRs -GitHub Draft PRs are a great way to get CI or human feedback on work that isn't yet ready to merge. Most new PRs should be opened as drafts and converted to normal PRs once the CI passes. +GitHub Draft PRs are a great way to get CI or human feedback on work that isn't yet ready to merge. +Most new PRs should be opened as drafts and converted to normal PRs once the CI passes. -More information about GitHub Draft PRs: https://github.blog/2019-02-14-introducing-draft-pull-requests/ +More information about GitHub Draft PRs: +https://github.blog/2019-02-14-introducing-draft-pull-requests/ ## Portfiles @@ -28,29 +42,113 @@ More information about GitHub Draft PRs: https://github.blog/2019-02-14-introduc At this time, the following helpers are deprecated: -1. `vcpkg_extract_archive()` should be replaced by `vcpkg_extract_archive_ex()` -2. `vcpkg_apply_patches()` should be replaced by the `PATCHES` arguments to the "extract" helpers (e.g. `vcpkg_from_github()`) -3. `vcpkg_build_msbuild()` should be replaced by `vcpkg_install_msbuild()` +1. `vcpkg_extract_source_archive()` should be replaced by [`vcpkg_extract_source_archive_ex()`](vcpkg_extract_source_archive_ex.md) +2. `vcpkg_apply_patches()` should be replaced by the `PATCHES` arguments to the "extract" helpers (e.g. [`vcpkg_from_github()`](vcpkg_from_github.md)) +3. `vcpkg_build_msbuild()` should be replaced by [`vcpkg_install_msbuild()`](vcpkg_install_msbuild.md) +4. `vcpkg_copy_tool_dependencies()` should be replaced by [`vcpkg_copy_tools()`](vcpkg_copy_tools.md) ### Avoid excessive comments in portfiles -Ideally, portfiles should be short, simple, and as declarative as possible. Remove any boiler plate comments introduced by the `create` command before submitting a PR. +Ideally, portfiles should be short, simple, and as declarative as possible. +Remove any boiler plate comments introduced by the `create` command before submitting a PR. + +### Ports must not be path dependent + +Ports must not change their behavior based on which ports are already installed in a form that would change which contents that port installs. For example, given: + +``` +> vcpkg install a +> vcpkg install b +> vcpkg remove a +``` + +and + +``` +> vcpkg install b +``` + +the files installed by `b` must be the same, regardless of influence by the previous installation of `a`. This means that ports must not try to detect whether something is provided in the installed tree by another port before taking some action. A specific and common cause of such "path dependent" behavior is described below in "When defining features, explicitly control dependencies." + +### Unique port attribution rule + +In the entire vcpkg system, no two ports a user is expected to use concurrently may provide the same file. If a port tries to install a file already provided by another file, installation will fail. If a port wants to use an extremely common name for a header, for example, it should place those headers in a subdirectory rather than in `include`. + +## Features + +### Do not use features to implement alternatives + +Features must be treated as additive functionality. If port[featureA] installs and port[featureB] installs, then port[featureA,featureB] must install. Moreover, if a second port depends on [featureA] and a third port depends on [featureB], installing both the second and third ports should have their dependencies satisfied. + +Libraries in this situation must choose one of the available options as expressed in vcpkg, and users who want a different setting must use overlay ports at this time. + +Existing examples we would not accept today retained for backwards compatibility: + * `libgit2`, `libzip`, `open62541` all have features for selecting a TLS or crypto backend. Note that `curl` has different crypto backend options but allows selecting between them at runtime, meaning the above tenet is maintained. + * `darknet` has `opencv2`, `opencv3`, features to control which version of opencv to use for its dependencies. + +### A feature may engage preview or beta functionality + +Notwithstanding the above, if there is a preview branch or similar where the preview functionality has a high probability of not disrupting the non-preview functionality (for example, no API removals), a feature is acceptable to model this setting. + +Examples: + * The Azure SDKs (of the form `azure-Xxx`) have a `public-preview` feature. + * `imgui` has an `experimental-docking` feature which engages their preview docking branch which uses a merge commit attached to each of their public numbered releases. + +### Default features should enable behaviors, not APIs + +If a consumer is depending directly upon a library, they can list out any desired features easily (`library[feature1,feature2]`). However, if a consumer _does not know_ they are using a library, they cannot list out those features. If that hidden library is like `libarchive` where features are adding additional compression algorithms (and thus behaviors) to an existing generic interface, default features offer a way to ensure a reasonably functional transitive library is built even if the final consumer doesn't name it directly. + +If the feature adds additional APIs (or executables, or library binaries) and doesn't modify the behavior of existing APIs, it should be left off by default. This is because any consumer which might want to use those APIs can easily require it via their direct reference. + +If in doubt, do not mark a feature as default. + +### Do not use features to control alternatives in published interfaces + +If a consumer of a port depends on only the core functionality of that port, with high probability they must not be broken by turning on the feature. This is even more important when the alternative is not directly controlled by the consumer, but by compiler settings like `/std:c++17` / `-std=c++17`. + +Existing examples we would not accept today retained for backwards compatibility: + * `redis-plus-plus[cxx17]` controls a polyfill but does not bake the setting into the installed tree. + * `ace[wchar]` changes all APIs to accept `const wchar_t*` rather than `const char*`. + +### A feature may replace polyfills with aliases provided that replacement is baked into the installed tree + +Notwithstanding the above, ports may remove polyfills with a feature, as long as: + 1. Turning on the feature changes the polyfills to aliases of the polyfilled entity + 2. The state of the polyfill is baked into the installed headers, such that ABI mismatch "impossible" runtime errors are unlikely + 3. It is possible for a consumer of the port to write code which works in both modes, for example by using a typedef which is either polyfilled or not + +Example: + * `abseil[cxx17]` changes `absl::string_view` to a replacement or `std::string_view`; the patch +https://github.com/microsoft/vcpkg/blob/981e65ce0ac1f6c86e5a5ded7824db8780173c76/ports/abseil/fix-cxx-standard.patch implements the baking requirement + +### Recommended solutions + +If it's critical to expose the underlying alternatives, we recommend providing messages at build time to instruct the user on how to copy the port into a private overlay: +```cmake +set(USING_DOG 0) +message(STATUS "This version of LibContosoFrobnicate uses the Kittens backend. To use the Dog backend instead, create an overlay port of this with USING_DOG set to 1 and the `kittens` dependency replaced with `dog`.") +message(STATUS "This recipe is at ${CMAKE_CURRENT_LIST_DIR}") +message(STATUS "See the overlay ports documentation at https://github.com/microsoft/vcpkg/blob/master/docs/specifications/ports-overlay.md") +``` ## Build Techniques ### Do not use vendored dependencies -Do not use embedded copies of libraries. All dependencies should be split out and packaged separately so they can be updated and maintained. +Do not use embedded copies of libraries. +All dependencies should be split out and packaged separately so they can be updated and maintained. ### Prefer using CMake -When multiple buildsystems are available, prefer using CMake. Additionally, when appropriate, it can be easier and more maintainable to rewrite alternative buildsystems into CMake using `file(GLOB)` directives. +When multiple buildsystems are available, prefer using CMake. +Additionally, when appropriate, it can be easier and more maintainable to rewrite alternative buildsystems into CMake using `file(GLOB)` directives. Examples: [abseil](../../ports/abseil/portfile.cmake) ### Choose either static or shared binaries -By default, `vcpkg_configure_cmake()` will pass in the appropriate setting for `BUILD_SHARED_LIBS`, however for libraries that don't respect that variable, you can switch on `VCPKG_LIBRARY_LINKAGE`: +By default, `vcpkg_configure_cmake()` will pass in the appropriate setting for `BUILD_SHARED_LIBS`, +however for libraries that don't respect that variable, you can switch on `VCPKG_LIBRARY_LINKAGE`: ```cmake string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC) @@ -67,19 +165,37 @@ vcpkg_configure_cmake( ### When defining features, explicitly control dependencies -When defining a feature that captures an optional dependency, ensure that the dependency will not be used accidentally when the feature is not explicitly enabled. For example: +When defining a feature that captures an optional dependency, +ensure that the dependency will not be used accidentally when the feature is not explicitly enabled. ```cmake -set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB ON) -if("zlib" IN_LIST FEATURES) - set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB OFF) +if ("zlib" IN_LIST FEATURES) + set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB OFF) +else() + set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB ON) endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB} +) +``` + +The snippet below using `vcpkg_check_features()` is equivalent, [see the documentation](vcpkg_check_features.md). + +```cmake +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + "zlib" CMAKE_DISABLE_FIND_PACKAGE_ZLIB +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB} + ${FEATURE_OPTIONS} ) ``` @@ -94,25 +210,63 @@ A lib is considered conflicting if it does any of the following: Conflicting libs are typically by design and not considered a defect. Because some build systems link against everything in the lib directory, these should be moved into a subdirectory named `manual-link`. +## Manifests and CONTROL files + +When adding a new port, use the new manifest syntax for defining a port; +you may also change over to manifests when modifying an existing port. +You may do so easily by running the `vcpkg format-manifest` command, which will convert existing CONTROL +files into manifest files. Do not convert CONTROL files that have not been modified. + ## Versioning -### Follow common conventions for the `Version:` field +### Follow common conventions for the `"version"` field -See our [CONTROL files document](control-files.md#version) for a full explanation of our conventions. +See our [versioning documentation](../users/versioning.md#version-schemes) for a full explanation of our conventions. -### Update the `Version:` field in the `CONTROL` file of any modified ports +### Update the `"port-version"` field in the manifest file of any modified ports Vcpkg uses this field to determine whether a given port is out-of-date and should be changed whenever the port's behavior changes. -Our convention for this field is to append a `-N` to the upstream version when changes need to be made. +Our convention is to use the `"port-version"` field for changes to the port that don't change the upstream version, and to reset the `"port-version"` back to zero when an update to the upstream version is made. For Example: -- Zlib's package version is currently `1.2.1`. +- Zlib's package version is currently `1.2.1`, with no explicit `"port-version"` (equivalent to a `"port-version"` of `0`). - You've discovered that the wrong copyright file has been deployed, and fixed that in the portfile. -- You should update the `Version:` field in the control file to `1.2.1-1`. +- You should update the `"port-version"` field in the manifest file to `1`. + +See our [manifest files document](manifest-files.md#port-version) for a full explanation of our conventions. + +### Update the version files in `versions/` of any modified ports + +Vcpkg uses a set of metadata files to power its versioning feature. +These files are located in the following locations: +* `${VCPKG_ROOT}/versions/baseline.json`, (this file is common to all ports) and +* `${VCPKG_ROOT}/versions/${first-letter-of-portname}-/${portname}.json` (one per port). + +For example, for `zlib` the relevant files are: +* `${VCPKG_ROOT}/versions/baseline.json` +* `${VCPKG_ROOT}/versions/z-/zlib.json` + +We expect that each time you update a port, you also update its version files. + +**The recommended method to update these files is to run the `x-add-version` command, e.g.:** + +``` +vcpkg x-add-version zlib +``` + +If you're updating multiple ports at the same time, instead you can run: + +``` +vcpkg x-add-version --all +``` + +To update the files for all modified ports at once. -See our [CONTROL files document](control-files.md#version) for a full explanation of our conventions. +_NOTE: These commands require you to have committed your changes to the ports before running them. The reason is that the Git SHA of the port directory is required in these version files. But don't worry, the `x-add-version` command will warn you if you have local changes that haven't been committed._ + +See our [versioning specification](../specifications/versioning.md) and [registries specification](../specifications/registries-2.md) to learn how vcpkg interacts with these files. ## Patching @@ -123,7 +277,23 @@ It is preferable to set options in a call to `vcpkg_configure_xyz()` over patchi Common options that allow avoiding patching: 1. [MSBUILD] `` settings inside the project file can be overridden via `/p:` parameters 2. [CMAKE] Calls to `find_package(XYz)` in CMake scripts can be disabled via [`-DCMAKE_DISABLE_FIND_PACKAGE_XYz=ON`](https://cmake.org/cmake/help/v3.15/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html) -3. [CMAKE] Cache variables (declared as `set(VAR "value" CACHE STRING "Documentation")` or `option(VAR "Documentation" "Default Value")`) can be overriden by just passing them in on the command line as `-DVAR:STRING=Foo`. One notable exception is if the `FORCE` parameter is passed to `set()`. See also the [CMake `set` documentation](https://cmake.org/cmake/help/v3.15/command/set.html) +3. [CMAKE] Cache variables (declared as `set(VAR "value" CACHE STRING "Documentation")` or `option(VAR "Documentation" "Default Value")`) can be overridden by just passing them in on the command line as `-DVAR:STRING=Foo`. One notable exception is if the `FORCE` parameter is passed to `set()`. See also the [CMake `set` documentation](https://cmake.org/cmake/help/v3.15/command/set.html) + +### Prefer patching over overriding `VCPKG_` values + +Some variables prefixed with `VCPKG_` have an equivalent `CMAKE_`. +However, not all of them are passed to the internal package build [(see implementation: Windows toolchain)](../../scripts/toolchains/windows.cmake). + +Consider the following example: + +```cmake +set(VCPKG_C_FLAGS "-O2 ${VCPKG_C_FLAGS}") +set(VCPKG_CXX_FLAGS "-O2 ${VCPKG_CXX_FLAGS}") +``` + +Using `vcpkg`'s built-in toolchains this works, because the value of `VCPKG__FLAGS` is forwarded to the appropriate `CMAKE_LANG_FLAGS` variable. But, a custom toolchain that is not aware of `vcpkg`'s variables will not forward them. + +Because of this, it is preferable to patch the buildsystem directly when setting `CMAKE__FLAGS`. ### Minimize patches @@ -158,6 +328,32 @@ Note that if a library generates CMake integration files (`foo-config.cmake`), r Finally, DLL files on Windows should never be renamed post-build because it breaks the generated LIBs. +## Code format + +### Vcpkg internal code + +We require the C++ code inside vcpkg to follow the clang-format, if you change them. Please perform the following steps after modification: + +- Use Visual Studio: +1. Configure your [clang-format tools](https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/). +2. Open the modified file. +3. Use shortcut keys Ctrl+K, Ctrl+D to format the current file. + +- Use tools: +1. Install [llvm clang-format](https://releases.llvm.org/download.html#10.0.0) +2. Run command: +```cmd +> LLVM_PATH/bin/clang-format.exe -style=file -i changed_file.cpp +``` + +### Manifests + +We require that the manifest file be formatted. Use the following command to format all manifest files: + +```cmd +> vcpkg format-manifest --all +``` + ## Useful implementation notes ### Portfiles are run in Script Mode diff --git a/docs/maintainers/manifest-files.md b/docs/maintainers/manifest-files.md new file mode 100644 index 00000000000000..590edb24558ab7 --- /dev/null +++ b/docs/maintainers/manifest-files.md @@ -0,0 +1,432 @@ +# Manifest files - `vcpkg.json` + +The `vcpkg.json` file contains metadata about the port. +It's a JSON file, and replaces the existing CONTROL file metadata structure. +It must have a top level object, and all fields are case sensitive. + +## Examples: + +The most important fields in a manifest, the ones which are required for all ports, +are the `"name"` field, and a version field (for now, just `"version-string"`). +There's more information about these fields below. + +```json +{ + "name": "ace", + "version-string": "6.5.5" +} +``` + +```json +{ + "name": "vtk", + "version-string": "8.2.0", + "port-version": 2, + "description": "Software system for 3D computer graphics, image processing, and visualization", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + }, + "double-conversion", + "eigen3", + "expat", + "freetype", + "glew", + "hdf5", + "jsoncpp", + "libharu", + "libjpeg-turbo", + "libpng", + "libtheora", + "libxml2", + "lz4", + "netcdf-c", + "proj4", + "pugixml", + "sqlite3", + "tiff", + "zlib" + ] +} +``` + +## Fields + +### `"name"` +The name of the port. + +When adding new ports be aware that the name may conflict with other projects that are not a part of vcpkg. For example `json` conflicts with too many other projects so you should add a scope to the name such as `taocpp-json` to make it unique. Verify there are no conflicts on a search engine as well as on other package collections. + +Package collections to check for conflicts: + ++ [Repology](https://repology.org/projects/) ++ [Debian packages](https://www.debian.org/distrib/packages) ++ [Packages search](https://pkgs.org/) + +A name must be an identifier: i.e., it must only consist of lowercase ascii alphabetic characters, +numbers, and hyphens, and it must not begin nor end with a hyphen. + +### Version fields + +Currently there are different fields for special versioning. Namely: + +Manifest property | Versioning scheme +------------------|------------------------------------ +`version` | For dot-separated numeric versions +`version-semver` | For SemVer compliant versions +`version-date` | For dates in the format YYYY-MM-DD +`version-string` | For arbitrary strings + +See https://github.com/microsoft/vcpkg/blob/master/docs/specifications/versioning.md#22-package-versions for more details. + +Additionally, `"port-version"` is used to differentiate between port changes that don't change the underlying library version. + +#### `"version-string"` + +This field is an ascii string, and may contain alphanumeric characters, `.`, `_`, or `-`. No attempt at ordering versions is made; all versions are treated as byte strings and are only evaluated for equality. + +For tagged-release ports, we follow the following convention: + +1. If the library follows a scheme like `va.b.c`, we remove the leading `v`. In this case, it becomes `a.b.c`. +2. If the library includes its own name in the version like `curl-7_65_1`, we remove the leading name: `7_65_1` +3. If the library is versioned by dates, format the resulting version string just like the upstream library; + for example, Abseil formats their dates `lts_2020_02_25`, so the `"version-string"` should be `"lts_2020_02_25"`. + +For rolling-release ports, we use the date that the _commit was accessed by you_, formatted as `YYYY-MM-DD`. Stated another way: if someone had a time machine and went to that date, they would see this commit as the latest master. + +For example, given: +1. The latest commit was made on 2019-04-19 +2. The current version string is `2019-02-14` +3. Today's date is 2019-06-01. + +Then if you update the source version today, you should give it version `2019-06-01`. + +#### `"port-version"` + +The version of the port, aside from the library version. + +This field is a non-negative integer. +It allows one to version the port file separately from the version of the underlying library; +if you make a change to a port, without changing the underlying version of the library, +you should increment this field by one (starting at `0`, which is equivalent to no `"port-version"` field). +When the version of the underlying library is upgraded, +this field should be set back to `0` (i.e., delete the `"port-version"` field). + +#### Examples: +```json +{ + "version": "1.0.5", + "port-version": 2 +} +``` + +```json +{ + "version": "2019-03-21" +} +``` + +### `"description"` + +A description of the library. + +This field can either be a single string, which should be a summary of the library, +or can be an array, with the first line being a summary and the remaining lines being the detailed description - +one string per line. + +#### Examples: +```json +{ + "description": "C++ header-only JSON library" +} +``` +```json +{ + "description": [ + "Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1.", + "MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model." + "This makes it suitable for 'machine to machine' messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino." + ] +} +``` + +### `"homepage"` + +The URL of the homepage for the library where a user is able to find additional documentation or the original source code. + +### `"documentation"` + +The URL where a user would be able to find official documentation for the library. Optional. + +### `"maintainers"` + +A list of strings that define the set of maintainers of a package. +It's recommended that these take the form of `Givenname Surname `, +but this field is not checked for consistency. + +Optional. + +#### Example: +```json +{ + "homepage": "https://github.com/microsoft/vcpkg" +} +``` + +### `"dependencies"` + +An array of ports the library has a dependency on. + +vcpkg does not distinguish between build-only dependencies and runtime dependencies. +The complete list of dependencies needed to successfully use the library should be specified. + +For example: websocketpp is a header only library, and thus does not require any dependencies at install time. +However, downstream users need boost and openssl to make use of the library. +Therefore, websocketpp lists boost and openssl as dependencies. + +Each dependency may be either an identifier, or an object. +For many dependencies, just listing the name of the library should be fine; +however, if one needs to add extra information to that dependency, one may use the dependency object. +For a dependency object, the `"name"` field is used to designate the library; +for example the dependency object `{ "name": "zlib" }` is equivalent to just writing `"zlib"`. + +If the port is dependent on optional features of another library, +those can be specified using the `"features"` field of the dependency object. +If the port does not require any features from the dependency, +this should be specified with the `"default-features"` fields set to `false`. + +Dependencies can also be filtered based on the target triplet to support differing requirements. +These filters use the same syntax as the `"supports"` field below, +and are specified in the `"platform"` field. + +#### Example: +```json +{ + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "winssl" + ], + "platform": "windows" + }, + { + "name": "curl", + "default-features": false, + "features": [ + "openssl" + ], + "platform": "!windows" + }, + "rapidjson" + ] +} +``` + +### `"features"` + +Multiple optional features can be specified in manifest files, in the `"features"` object field. +This field is a map from the feature name, to the feature's information. +Each one must have a `"description"` field, and may also optionally have a `"dependencies"` field. + +A feature's name must be an identifier - +in other words, lowercase alphabetic characters, digits, and hyphens, +neither starting nor ending with a hyphen. + +A feature's `"description"` is a description of the feature, +and is the same kind of thing as the port `"description"` field. + +A feature's `"dependencies"` field contains the list of extra dependencies required to build and use this feature; +this field isn't required if the feature doesn't require any extra dependencies. +On installation the dependencies from all selected features are combined to produce the full dependency list for the build. + +#### Example: + +```json +{ + "name": "vtk", + "version-string": "8.2.0", + "port-version": 2, + "description": "Software system for 3D computer graphics, image processing, and visualization", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + }, + "double-conversion", + "eigen3", + "expat", + "freetype", + "glew", + "hdf5", + "jsoncpp", + "libharu", + "libjpeg-turbo", + "libpng", + "libtheora", + "libxml2", + "lz4", + "netcdf-c", + "proj4", + "pugixml", + "sqlite3", + "tiff", + "zlib" + ], + "features": { + "mpi": { + "description": "MPI functionality for VTK", + "dependencies": [ + { + "name": "hdf5", + "features": [ + "parallel" + ] + }, + "mpi" + ] + }, + "openvr": { + "description": "OpenVR functionality for VTK", + "dependencies": [ + "openvr", + "sdl2" + ] + }, + "python": { + "description": "Python functionality for VTK", + "dependencies": [ + "python3" + ] + }, + "qt": { + "description": "Qt functionality for VTK", + "dependencies": [ + "qt5" + ] + } + } +} +``` + +### `"default-features"` + +An array of feature names that the library uses by default, if nothing else is specified. + +#### Example: +```json +{ + "default-features": [ + "kinesis" + ], + "features": { + "dynamodb": { + "description": "Build dynamodb support", + "dependencies": [ + "dynamodb" + ] + }, + "kinesis": { + "description": "build kinesis support" + } + } +} +``` + +### `"supports"` + +A string, formatted as a platform expression, +that evaluates to true when the port should build successfully for a triplet. + +This field is used in the CI testing to skip ports, +and warns users in advance that a given install tree is not expected to succeed. +Therefore, this field should be used optimistically; +in cases where a port is expected to succeed 10% of the time, it should still be marked "supported". + +The grammar for this top-level platform expression, in [EBNF], is as follows: + +```ebnf +whitespace-character = +| ? U+0009 "CHARACTER TABULATION" ? +| ? U+000A "LINE FEED" ? +| ? U+000D "CARRIAGE RETURN" ? +| ? U+0020 "SPACE" ? ; +optional-whitespace = { whitespace-character } ; + +lowercase-alpha = +| "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" +| "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" ; +digit = +| "0" | "1" | "2" | "3" | "4" +| "5" | "6" | "7" | "8" | "9" ; +identifier-character = +| lowercase-alpha +| digit ; + +platform-expression = +| platform-expression-not +| platform-expression-and +| platform-expression-or ; + +platform-expression-identifier = +| identifier-character, { identifier-character }, optional-whitespace ; + +platform-expression-simple = +| platform-expression-identifier +| "(", optional-whitespace, platform-expression, ")", optional-whitespace ; + +platform-expression-not = +| platform-expression-simple +| "!", optional-whitespace, platform-expression-simple ; + +platform-expression-and = +| platform-expression-not, { "&", optional-whitespace, platform-expression-not } ; + +platform-expression-or = +| platform-expression-not, { "|", optional-whitespace, platform-expression-not } ; + +top-level-platform-expression = optional-whitespace, platform-expression ; +``` + +Basically, there are four kinds of expressions -- identifiers, negations, ands, and ors. +Negations may only negate an identifier or a grouped expression. +Ands and ors are a list of `&` or `|` separated identifiers, negated expressions, and grouped expressions. +One may not mix `&` and `|` without parentheses for grouping. + +These predefined identifier expressions are computed from standard triplet settings: +- `native` - `TARGET_TRIPLET` == `HOST_TRIPLET`; + useful for ports which depend on their own built binaries in their build. +- `x64` - `VCPKG_TARGET_ARCHITECTURE` == `"x64"` +- `x86` - `VCPKG_TARGET_ARCHITECTURE` == `"x86"` +- `arm` - `VCPKG_TARGET_ARCHITECTURE` == `"arm"` or `VCPKG_TARGET_ARCHITECTURE` == `"arm64"` +- `arm64` - `VCPKG_TARGET_ARCHITECTURE` == `"arm64"` +- `windows` - `VCPKG_CMAKE_SYSTEM_NAME` == `""` or `VCPKG_CMAKE_SYSTEM_NAME` == `"WindowsStore"` +- `mingw` - `VCPKG_CMAKE_SYSTEM_NAME` == `"MinGW"` +- `uwp` - `VCPKG_CMAKE_SYSTEM_NAME` == `"WindowsStore"` +- `linux` - `VCPKG_CMAKE_SYSTEM_NAME` == `"Linux"` +- `osx` - `VCPKG_CMAKE_SYSTEM_NAME` == `"Darwin"` +- `android` - `VCPKG_CMAKE_SYSTEM_NAME` == `"Android"` +- `static` - `VCPKG_LIBRARY_LINKAGE` == `"static"` +- `wasm32` - `VCPKG_TARGET_ARCHITECTURE` == `"wasm32"` +- `emscripten` - `VCPKG_CMAKE_SYSTEM_NAME` == `"Emscripten"` + +These predefined identifier expressions can be overridden in the triplet file, +via the [`VCPKG_DEP_INFO_OVERRIDE_VARS`](../users/triplets.md) option, +and new identifier expressions can be added via the same mechanism. + +This field is optional and defaults to true. + +> Implementers' Note: these terms are computed from the triplet via the `vcpkg_get_dep_info` mechanism. + +[EBNF]: https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form + +#### Example: +```json +{ + "supports": "!uwp & !(arm & !arm64)" +} +``` + +This means "doesn't support uwp, nor arm32 (but does support arm64)". diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md index eadebf49a7b2fc..45aa4589bc481b 100644 --- a/docs/maintainers/portfile-functions.md +++ b/docs/maintainers/portfile-functions.md @@ -1,28 +1,81 @@ - - -# Portfile helper functions -- [vcpkg\_acquire\_msys](vcpkg_acquire_msys.md) -- [vcpkg\_add\_to\_path](vcpkg_add_to_path.md) -- [vcpkg\_apply\_patches](vcpkg_apply_patches.md) -- [vcpkg\_build\_cmake](vcpkg_build_cmake.md) -- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md) -- [vcpkg\_check\_features](vcpkg_check_features.md) -- [vcpkg\_check\_linkage](vcpkg_check_linkage.md) -- [vcpkg\_clean\_msbuild](vcpkg_clean_msbuild.md) -- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md) -- [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md) -- [vcpkg\_copy\_tool\_dependencies](vcpkg_copy_tool_dependencies.md) -- [vcpkg\_download\_distfile](vcpkg_download_distfile.md) -- [vcpkg\_execute\_build\_process](vcpkg_execute_build_process.md) -- [vcpkg\_execute\_required\_process](vcpkg_execute_required_process.md) -- [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md) -- [vcpkg\_extract\_source\_archive\_ex](vcpkg_extract_source_archive_ex.md) -- [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md) -- [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md) -- [vcpkg\_from\_git](vcpkg_from_git.md) -- [vcpkg\_from\_github](vcpkg_from_github.md) -- [vcpkg\_from\_gitlab](vcpkg_from_gitlab.md) -- [vcpkg\_install\_cmake](vcpkg_install_cmake.md) -- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md) -- [vcpkg\_prettify\_command](vcpkg_prettify_command.md) -- [vcpkg\_test\_cmake](vcpkg_test_cmake.md) + + +# Portfile helper functions +- [execute\_process](execute_process.md) +- [vcpkg\_acquire\_msys](vcpkg_acquire_msys.md) +- [vcpkg\_add\_to\_path](vcpkg_add_to_path.md) +- [vcpkg\_apply\_patches](vcpkg_apply_patches.md) (deprecated) +- [vcpkg\_build\_cmake](vcpkg_build_cmake.md) (deprecated, use [vcpkg\_cmake\_build](ports/vcpkg-cmake/vcpkg_cmake_build.md)) +- [vcpkg\_build\_make](vcpkg_build_make.md) +- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md) +- [vcpkg\_build\_ninja](vcpkg_build_ninja.md) +- [vcpkg\_build\_nmake](vcpkg_build_nmake.md) +- [vcpkg\_build\_qmake](vcpkg_build_qmake.md) +- [vcpkg\_buildpath\_length\_warning](vcpkg_buildpath_length_warning.md) +- [vcpkg\_check\_features](vcpkg_check_features.md) +- [vcpkg\_check\_linkage](vcpkg_check_linkage.md) +- [vcpkg\_clean\_executables\_in\_bin](vcpkg_clean_executables_in_bin.md) +- [vcpkg\_clean\_msbuild](vcpkg_clean_msbuild.md) +- [vcpkg\_common\_definitions](vcpkg_common_definitions.md) +- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md) (deprecated, use [vcpkg\_cmake\_configure](ports/vcpkg-cmake/vcpkg_cmake_configure.md)) +- [vcpkg\_configure\_gn](vcpkg_configure_gn.md) +- [vcpkg\_configure\_make](vcpkg_configure_make.md) +- [vcpkg\_configure\_meson](vcpkg_configure_meson.md) +- [vcpkg\_configure\_qmake](vcpkg_configure_qmake.md) +- [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md) +- [vcpkg\_copy\_tool\_dependencies](vcpkg_copy_tool_dependencies.md) +- [vcpkg\_copy\_tools](vcpkg_copy_tools.md) +- [vcpkg\_download\_distfile](vcpkg_download_distfile.md) +- [vcpkg\_execute\_build\_process](vcpkg_execute_build_process.md) +- [vcpkg\_execute\_in\_download\_mode](vcpkg_execute_in_download_mode.md) +- [vcpkg\_execute\_required\_process](vcpkg_execute_required_process.md) +- [vcpkg\_execute\_required\_process\_repeat](vcpkg_execute_required_process_repeat.md) +- [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md) +- [vcpkg\_extract\_source\_archive\_ex](vcpkg_extract_source_archive_ex.md) +- [vcpkg\_fail\_port\_install](vcpkg_fail_port_install.md) +- [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md) +- [vcpkg\_find\_fortran](vcpkg_find_fortran.md) +- [vcpkg\_fixup\_cmake\_targets](vcpkg_fixup_cmake_targets.md) (deprecated, use [vcpkg\_cmake\_config\_fixup](ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md)) +- [vcpkg\_fixup\_pkgconfig](vcpkg_fixup_pkgconfig.md) +- [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md) +- [vcpkg\_from\_git](vcpkg_from_git.md) +- [vcpkg\_from\_github](vcpkg_from_github.md) +- [vcpkg\_from\_gitlab](vcpkg_from_gitlab.md) +- [vcpkg\_from\_sourceforge](vcpkg_from_sourceforge.md) +- [vcpkg\_get\_program\_files\_platform\_bitness](vcpkg_get_program_files_platform_bitness.md) +- [vcpkg\_get\_windows\_sdk](vcpkg_get_windows_sdk.md) +- [vcpkg\_install\_cmake](vcpkg_install_cmake.md) (deprecated, use [vcpkg\_cmake\_install](ports/vcpkg-cmake/vcpkg_cmake_install.md)) +- [vcpkg\_install\_gn](vcpkg_install_gn.md) +- [vcpkg\_install\_make](vcpkg_install_make.md) +- [vcpkg\_install\_meson](vcpkg_install_meson.md) +- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md) +- [vcpkg\_install\_nmake](vcpkg_install_nmake.md) +- [vcpkg\_install\_qmake](vcpkg_install_qmake.md) +- [vcpkg\_list](vcpkg_list.md) +- [vcpkg\_minimum\_required](vcpkg_minimum_required.md) +- [vcpkg\_replace\_string](vcpkg_replace_string.md) + +## Internal Functions + +- [z\_vcpkg\_apply\_patches](internal/z_vcpkg_apply_patches.md) +- [z\_vcpkg\_forward\_output\_variable](internal/z_vcpkg_forward_output_variable.md) +- [z\_vcpkg\_function\_arguments](internal/z_vcpkg_function_arguments.md) +- [z\_vcpkg\_get\_cmake\_vars](internal/z_vcpkg_get_cmake_vars.md) +- [z\_vcpkg\_prettify\_command\_line](internal/z_vcpkg_prettify_command_line.md) + +## Scripts from Ports + +### [vcpkg-cmake](ports/vcpkg-cmake.md) + +- [vcpkg\_cmake\_build](ports/vcpkg-cmake/vcpkg_cmake_build.md) +- [vcpkg\_cmake\_configure](ports/vcpkg-cmake/vcpkg_cmake_configure.md) +- [vcpkg\_cmake\_get\_vars](ports/vcpkg-cmake/vcpkg_cmake_get_vars.md) +- [vcpkg\_cmake\_install](ports/vcpkg-cmake/vcpkg_cmake_install.md) + +### [vcpkg-cmake-config](ports/vcpkg-cmake-config.md) + +- [vcpkg\_cmake\_config\_fixup](ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md) + +### [vcpkg-pkgconfig-get-modules](ports/vcpkg-pkgconfig-get-modules.md) + +- [x\_vcpkg\_pkgconfig\_get\_modules](ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.md) diff --git a/docs/maintainers/ports/vcpkg-cmake-config.md b/docs/maintainers/ports/vcpkg-cmake-config.md new file mode 100644 index 00000000000000..18e7bb9ac87083 --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake-config.md @@ -0,0 +1,10 @@ +# vcpkg-cmake-config + +`vcpkg-cmake-config` provides `vcpkg_cmake_config_fixup()`, +a function which both: + +- Fixes common mistakes in port build systems, like using absolute paths +- Merges the debug and release config files. + +This function should almost always be used when a port has `*config.cmake` files, +even when the buildsystem of the project is not CMake. diff --git a/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md b/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md new file mode 100644 index 00000000000000..e4b486798ca388 --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md @@ -0,0 +1,51 @@ +# vcpkg_cmake_config_fixup + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md). + +Merge release and debug CMake targets and configs to support multiconfig generators. + +Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. + +```cmake +vcpkg_cmake_config_fixup( + [PACKAGE_NAME ] + [CONFIG_PATH ] + [DO_NOT_DELETE_PARENT_CONFIG_PATH] + [NO_PREFIX_CORRECTION] +) +``` + +For many ports, `vcpkg_cmake_config_fixup()` on its own should work, +as `PACKAGE_NAME` defaults to `${PORT}` and `CONFIG_PATH` defaults to `share/${PACKAGE_NAME}`. +For ports where the package name passed to `find_package` is distinct from the port name, +`PACKAGE_NAME` should be changed to be that name instead. +For ports where the directory of the `*config.cmake` files cannot be set, +use the `CONFIG_PATH` to change the directory where the files come from. + +By default the parent directory of CONFIG_PATH is removed if it is named "cmake". +Passing the `DO_NOT_DELETE_PARENT_CONFIG_PATH` option disable such behavior, +as it is convenient for ports that install +more than one CMake package configuration file. + +The `NO_PREFIX_CORRECTION` option disables the correction of `_IMPORT_PREFIX` +done by vcpkg due to moving the config files. +Currently the correction does not take into account how the files are moved, +and applies a rather simply correction which in some cases will yield the wrong results. + +## How it Works + +1. Moves `/debug//*targets-debug.cmake` to `/share/${PACKAGE_NAME}`. +2. Removes `/debug//*config.cmake`. +3. Transform all references matching `/bin/*.exe` to `/tools//*.exe` on Windows. +4. Transform all references matching `/bin/*` to `/tools//*` on other platforms. +5. Fixes `${_IMPORT_PREFIX}` in auto generated targets. +6. Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. + +## Examples + +* [concurrentqueue](https://github.com/Microsoft/vcpkg/blob/master/ports/concurrentqueue/portfile.cmake) +* [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake) +* [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake) + +## Source +[ports/vcpkg-cmake-config/vcpkg\_cmake\_config\_fixup.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake) diff --git a/docs/maintainers/ports/vcpkg-cmake.md b/docs/maintainers/ports/vcpkg-cmake.md new file mode 100644 index 00000000000000..b84c58869c8e27 --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake.md @@ -0,0 +1,7 @@ +# vcpkg-cmake + +This port contains cmake functions for dealing with a CMake buildsystem. + +In the common case, `vcpkg_cmake_configure()` (with appropriate arguments) +followed by `vcpkg_cmake_install()` will be enough to build and install a port. +`vcpkg_cmake_build()` is provided for more complex cases. diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md new file mode 100644 index 00000000000000..51a96372f812cd --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md @@ -0,0 +1,36 @@ +# vcpkg_cmake_build + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md). + +Build a cmake project. + +```cmake +vcpkg_cmake_build( + [TARGET ] + [LOGFILE_BASE ] + [DISABLE_PARALLEL] + [ADD_BIN_TO_PATH] +) +``` + +`vcpkg_cmake_build` builds an already-configured cmake project. +You can use the alias [`vcpkg_cmake_install()`] function +if your CMake build system supports the `install` TARGET, +and this is something we recommend doing whenever possible. +Otherwise, you can use `TARGET` to set the target to build. +This function defaults to not passing a target to cmake. + +`LOGFILE_BASE` is used to set the base of the logfile names; +by default, this is `build`, and thus the logfiles end up being something like +`build-x86-windows-dbg.log`; if you use `vcpkg_cmake_install`, +this is set to `install`, so you'll get log names like `install-x86-windows-dbg.log`. + +For build systems that are buggy when run in parallel, +using `DISABLE_PARALLEL` will run the build with only one job. + +Finally, `ADD_BIN_TO_PATH` adds the appropriate (either release or debug) +`bin/` directories to the path during the build, +such that executables run during the build will be able to access those DLLs. + +## Source +[ports/vcpkg-cmake/vcpkg\_cmake\_build.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake/vcpkg_cmake_build.cmake) diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md new file mode 100644 index 00000000000000..6053b363c69728 --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md @@ -0,0 +1,93 @@ +# vcpkg_cmake_configure + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md). + +Configure a CMake buildsystem. + +```cmake +vcpkg_cmake_configure( + SOURCE_PATH + [LOGFILE_BASE ] + [DISABLE_PARALLEL_CONFIGURE] + [NO_CHARSET_FLAG] + [WINDOWS_USE_MSBUILD] + [GENERATOR ] + [OPTIONS + ...] + [OPTIONS_RELEASE + ...] + [OPTIONS_DEBUG + ...] + [MAYBE_UNUSED_VARIABLES + ...] +) +``` + +`vcpkg_cmake_configure` configures a CMake build system for use with +`vcpkg_cmake_buildsystem_build` and `vcpkg_cmake_buildsystem_install`. +`source-path` is where the source is located; by convention, +this is usually `${SOURCE_PATH}`, which is set by one of the `vcpkg_from_*` functions. +This function configures the build system for both Debug and Release builds by default, +assuming that `VCPKG_BUILD_TYPE` is not set; if it is, then it will only configure for +that build type. + +Use the `OPTIONS` argument to set the configure settings for both release and debug, +and use `OPTIONS_RELEASE` and `OPTIONS_DEBUG` to set the configure settings for +release only and debug only respectively. + +By default, when possible, `vcpkg_cmake_configure` uses [ninja-build] +as its build system. If the `WINDOWS_USE_MSBUILD` argument is passed, then +`vcpkg_cmake_configure` will use a Visual Studio generator on Windows; +on every other platform, `vcpkg_cmake_configure` just uses Ninja. + +[ninja-build]: https://ninja-build.org/ + +Additionally, one may pass the specific generator a port should use with `GENERATOR`. +This is useful if some project-specific buildsystem +has been wrapped in a CMake build system that doesn't perform an actual build. +If used for this purpose, it should be set to `"NMake Makefiles"`. +`vcpkg_cmake_buildsystem_build` and `install` do not support this being set to anything +except for NMake. + +For libraries which cannot be configured in parallel, +pass the `DISABLE_PARALLEL_CONFIGURE` flag. This is needed, for example, +if the library's build system writes back into the source directory during configure. +This also disables the `CMAKE_DISABLE_SOURCE_CHANGES` option. + +By default, this function adds flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` +which set the default character set to utf-8 for MSVC. +If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. + +This function makes certain that all options passed in are used by the +underlying CMake build system. If there are options that might be unused, +perhaps on certain platforms, pass those variable names to +`MAYBE_UNUSED_VARIABLES`. For example: +```cmake +vcpkg_cmake_configure( + ... + OPTIONS + -DBUILD_EXAMPLE=OFF + ... + MAYBE_UNUSED_VARIABLES + BUILD_EXAMPLE +) +``` + +`LOGFILE_BASE` is used to set the base of the logfile names; +by default, this is `config`, and thus the logfiles end up being something like +`config-x86-windows-dbg.log`. You can set it to anything you like; +if you set it to `config-the-first`, +you'll get something like `config-the-first-x86-windows.dbg.log`. + +## Notes +This command supplies many common arguments to CMake. To see the full list, examine the source. + +## Examples + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) + +## Source +[ports/vcpkg-cmake/vcpkg\_cmake\_configure.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake) diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_get_vars.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_get_vars.md new file mode 100644 index 00000000000000..68e51333c42b23 --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_get_vars.md @@ -0,0 +1,31 @@ +# vcpkg_cmake_get_vars + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_get_vars.md). + +Runs a cmake configure with a dummy project to extract certain cmake variables + +## Usage +```cmake +vcpkg_cmake_get_vars() +``` + +`vcpkg_cmake_get_vars()` sets `` to +a path to a generated CMake file, with the detected `CMAKE_*` variables +re-exported as `VCPKG_DETECTED_CMAKE_*`. + +## Notes +Avoid usage in portfiles. + +All calls to `vcpkg_cmake_get_vars` will result in the same output file; +the output file is not generated multiple times. + +### Basic Usage + +```cmake +vcpkg_cmake_get_vars(cmake_vars_file) +include("${cmake_vars_file}") +message(STATUS "detected CXX flags: ${VCPKG_DETECTED_CMAKE_CXX_FLAGS}") +``` + +## Source +[ports/vcpkg-cmake/vcpkg\_cmake\_get\_vars.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake/vcpkg_cmake_get_vars.cmake) diff --git a/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md new file mode 100644 index 00000000000000..29ac265aa6eef1 --- /dev/null +++ b/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md @@ -0,0 +1,25 @@ +# vcpkg_cmake_install + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md). + +Build and install a cmake project. + +```cmake +vcpkg_cmake_install( + [DISABLE_PARALLEL] + [ADD_BIN_TO_PATH] +) +``` + +`vcpkg_cmake_install` transparently forwards to [`vcpkg_cmake_build()`], +with additional parameters to set the `TARGET` to `install`, +and to set the `LOGFILE_ROOT` to `install` as well. + +[`vcpkg_cmake_build()`]: vcpkg_cmake_build.cmake + +## Examples: + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) + +## Source +[ports/vcpkg-cmake/vcpkg\_cmake\_install.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake/vcpkg_cmake_install.cmake) diff --git a/docs/maintainers/ports/vcpkg-pkgconfig-get-modules.md b/docs/maintainers/ports/vcpkg-pkgconfig-get-modules.md new file mode 100644 index 00000000000000..ac99412c2484bd --- /dev/null +++ b/docs/maintainers/ports/vcpkg-pkgconfig-get-modules.md @@ -0,0 +1,6 @@ +# vcpkg-pkgconfig-get-modules + +**Experimental: will change or be removed at any time** + +`vcpkg-pkgconfig-get-modules` provides `x_vcpkg_pkgconfig_get_modules()`, a function which simplifies calling +`pkg-config` in portfiles in order to gather dependencies for exotic buildsystems. diff --git a/docs/maintainers/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.md b/docs/maintainers/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.md new file mode 100644 index 00000000000000..06299533a00c6f --- /dev/null +++ b/docs/maintainers/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.md @@ -0,0 +1,44 @@ +# x_vcpkg_pkgconfig_get_modules + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.md). + +Experimental +Retrieve required module information from pkgconfig modules + +## Usage +```cmake +x_vcpkg_pkgconfig_get_modules( + PREFIX + MODULES ... + [LIBS] + [LIBRARIES] + [LIBRARIES_DIRS] + [INCLUDE_DIRS] +) +``` +## Parameters + +### PREFIX +Used variable prefix to use + +### MODULES +List of pkgconfig modules to retrieve information for. + +### LIBS +Returns `"${PKGCONFIG}" --libs` in _LIBS_(DEBUG|RELEASE) + +### LIBRARIES +Returns `"${PKGCONFIG}" --libs-only-l` in _LIBRARIES_(DEBUG|RELEASE) + +### LIBRARIES_DIRS +Returns `"${PKGCONFIG}" --libs-only-L` in _LIBRARIES_DIRS_(DEBUG|RELEASE) + +### INCLUDE_DIRS +Returns `"${PKGCONFIG}" --cflags-only-I` in _INCLUDE_DIRS_(DEBUG|RELEASE) + +## Examples + +* [qt5-base](https://github.com/microsoft/vcpkg/blob/master/ports/qt5-base/portfile.cmake) + +## Source +[ports/vcpkg-pkgconfig-get-modules/x\_vcpkg\_pkgconfig\_get\_modules.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.cmake) diff --git a/docs/maintainers/pr-review-checklist.md b/docs/maintainers/pr-review-checklist.md new file mode 100644 index 00000000000000..ce8d1c3a9998c0 --- /dev/null +++ b/docs/maintainers/pr-review-checklist.md @@ -0,0 +1,115 @@ +Vcpkg PR Checklist +===================== +Revision: 1 + +## Overview +This document provides an annotated checklist which vcpkg team members use to apply the "reviewed" label on incoming pull requests. If a pull request violates any of these points, we may ask contributors to make necessary changes before we can merge the changeset. + +Feel free to create an issue or pull request if you feel that this checklist can be improved. Please increment the revision number when modifying the checklist content. + +## Checklist +You can link any of these checklist items in a GitHub comment by copying the link address attached to each item code. + +
+c000001: No deprecated helper functions are used + +See our [Maintainer Guidelines and Policies](maintainer-guide.md#Avoid-deprecated-helper-functions) for more information. + +
+ +
+c000002: `"port-version"` field is updated + +See our [Maintainer Guidelines and Policies](maintainer-guide.md#versioning) for more information. + +
+ +
+c000003: New ports contain a `"description"` field written in English + +A description only one or a few sentences long is helpful. Consider using the library's official description from their `README.md` or similar if possible. Automatic translations are acceptable and we are happy to clean up translations to English for our contributors. + +See our [manifest file documentation](manifest-files.md#description) for more information. + +
+ +
+c000004: No unnecessary comments are present in the changeset + +See our [Maintainer Guidelines and Policies](maintainer-guide.md#Avoid-excessive-comments-in-portfiles) for more information. + +
+ +
+c000005: Downloaded archives are versioned if available + +
+c000006: New ports pass CI checks for triplets that the library officially supports + +To ensure vcpkg ports are of a high quality, we ask that incoming ports support the official platforms for the library in question. + +
+ +
+c000007: Patches fix issues that are vcpkg-specific only + +If possible, patches to the library source code should be upstreamed to the library's official repository. Opening up a pull request on the library's repository will help to improve the library for everyone, not just vcpkg users. + +
+ +
+c000008: New ports download source code from the official source if available + +To respect library authors and keep code secure, please have ports download source code from the official source. We may make exceptions if the original source code is not available and there is substantial community interest in maintaining the library in question. + +
+ +
+c000009: Ports and port features are named correctly + +For user accessibility, we prefer names of ports and port features to be intuitive and close to their counterparts in official sources and other package managers. If you are unsure about the naming of a port or port feature, we recommend checking repology.org, packages.ubuntu.com, or searching for additional information using a search engine. We can also help our contributors with this, so feel free to ask for naming suggestions if you are unsure. + +
+ +
+c000010: Library targets are exported when appropriate + +To provide users with a seamless build system integration, please be sure to export and provide a means of finding the library targets intended to be used downstream. Targets not meant to be exported should be be marked private and not exported. + +
+ +
+c000011: Ports do not use applications which modify the user's system + +Ports should uphold vcpkg's contract of not modifying the user's system by avoiding applications which do so. Examples of these applications are `sudo`, `apt`, `brew`, or `pip`. Please use an alternative to these types of programs wherever possible. + +
+ +
+c000012: Ports with system dependencies include an information message during installation + +Some ports have library and tool dependencies that do not exist within vcpkg. For these missing dependencies, we ask that contributors add a message to the top of the port's `portfile.cmake` stating the missing dependencies and how to acquire them. We ask that the message is displayed before any major work is done to ensure that users can "early out" of the installation process as soon as possible in case they are missing the dependency. + +Example: +```cmake +message( +"${PORT} currently requires the following libraries from the system package manager: + autoconf libtool +These can be installed on Ubuntu systems via sudo apt install autoconf libtool" +) +``` + +
+ +
+c000013: Manifest files are used instead of CONTROL files for new ports + +Many existing ports use the CONTROL file syntax; while this syntax will be supported for some time to come, +new ports should not use these. Any newly added port _must_ use the manifest files. + +We also recommend, when significant modifications are made to ports, that one switches to manifest files; +however, this is not required. You may find `vcpkg format-manifest` useful. diff --git a/docs/maintainers/registries.md b/docs/maintainers/registries.md new file mode 100644 index 00000000000000..a4df8d32bb6406 --- /dev/null +++ b/docs/maintainers/registries.md @@ -0,0 +1,357 @@ +# Creating Registries + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/maintainers/registries.md).** + +There are two parts to using registries; this documents the creation side of +the relationship. In order to learn more about using registries that others +have created, please read [this documentation](../users/registries.md). +## Table of Contents + +- [Creating Registries](#creating-registries) + - [Table of Contents](#table-of-contents) + - [Overview](#overview) + - [Git Registries](#git-registries) + - [Adding a New Version](#adding-a-new-version) + - [Filesystem Registries](#filesystem-registries) + - [Adding a New Version](#adding-a-new-version-1) + +## Overview + +Registries are collections of ports and their versions. There are two major +choices of implementation for registries, if you want to create your own - +git registries, and filesystem registries. + +Git registries are simple git repositories, and can be shared publicly or +privately via normal mechanisms for git repositories. The vcpkg repository at +, for example, is a git registry. + +Filesystem registries are designed as more of a testing ground. Given that they +literally live on your filesystem, the only way to share them is via shared +directories. However, filesystem registries can be useful as a way to represent +registries held in non-git version control systems, assuming one has some way +to get the registry onto the disk. + +Note that we expect the set of registry types to grow over time; if you would +like support for registries built in your favorite public version control +system, don't hesitate to open a PR. + +The basic structure of a registry is: + +- The set of versions that are considered "latest" at certain times in history, + known as the "baseline". +- The set of all the versions of all the ports, and where to find each of + these in the registry. + +### Git Registries + +As you're following along with this documentation, it may be helpful to have +a working example to refer to. We've written one and put it here: +. + +All git registries must have a `versions/baseline.json` file. This file +contains the set of "latest versions" at a certain commit. It is laid out as +a top-level object containing only the `"default"` field. This field should +contain an object mapping port names to the version which is currently the +latest. + +Here's an example of a valid baseline.json: + +```json +{ + "default": { + "kitten": { + "baseline": "2.6.2", + "port-version": 0 + }, + "port-b": { + "baseline": "19.00", + "port-version": 2 + } + } +} +``` + +The `versions` directory contains all the information about which versions of +which packages are contained in the registry, along with where those versions +are stored. The rest of the registry just acts as a backing store, as far as +vcpkg is concerned: only things inside the `versions` directory will be used +to direct how your registry is seen by vcpkg. + +Each port in a registry should exist in the versions directory as +`-/.json`; in other words, the +information about the `kitten` port would be located in +`versions/k-/kitten.json`. This should be a top-level object with only a +single field: `"versions"`. This field should contain an array of version +objects: + +- The version of the port in question; should be exactly the same as the + `vcpkg.json` file, including the version fields and `"port-version"`. +- The `"git-tree"` field, which is a git tree; in other words, what you get + when you write `git rev-parse COMMIT-ID:path/to/port`. + +Note that the version fields for ports with `CONTROL` files, is +`"version-string"`; we do not recommend using `CONTROL` files in new +registries, however. + +_WARNING_: One very important part of registries is that versions should +_never_ be changed. Updating to a later ref should never remove or change an +existing version. It must always be safe to update a registry. + +Here's an example of a valid version database for a `kitten` port with one +version: + +```json +{ + "versions": [ + { + "version": "2.6.2", + "port-version": 0, + "git-tree": "67d60699c271b7716279fdea5a5c6543929eb90e" + } + ] +} +``` + +In general, it's not important where you place port directories. However, the +idiom in vcpkg is to follow what the built in vcpkg registry does: your +`kitten` port should be placed in `ports/kitten`. + +_WARNING_: One other thing to keep in mind is that when you update a registry, +all previous versions should also be accessible. Since your user will set their +baseline to a commit ID, that commit ID must always exist, and be accessible +from your HEAD commit, which is what is actually fetched. This means that your +HEAD commit should be a child of all previous HEAD commits. + +#### Adding a New Version + +There is some git trickery involved in creating a new version of a port. The +first thing to do is make some changes, update the `"port-version"` and regular +version field as you need to, and then test with `overlay-ports`: +`vcpkg install kitten --overlay-ports=ports/kitten`. + +Once you've finished your testing, you'll need to make sure that the directory +as it is is under git's purview. You'll do this by creating a temporary commit: + +```pwsh +> git add ports/kitten +> git commit -m 'temporary commit' +``` + +Then, get the git tree ID of the directory: + +```pwsh +> git rev-parse HEAD:ports/kitten +73ad3c823ef701c37421b450a34271d6beaf7b07 +``` + +Then, you can add this version to the versions database. At the top of your +`versions/k-/kitten.json`, you can add (assuming you're adding version +`2.6.3#0`): + +```json +{ + "versions": [ + { + "version": "2.6.3", + "port-version": 0, + "git-tree": "73ad3c823ef701c37421b450a34271d6beaf7b07" + }, + { + "version": "2.6.2", + "port-version": 0, + "git-tree": "67d60699c271b7716279fdea5a5c6543929eb90e" + } + ] +} +``` + +then, you'll want to modify your `versions/baseline.json` with your new version +as well: + +```json +{ + "default": { + "kitten": { + "baseline": "2.6.3", + "port-version": 0 + }, + "port-b": { + "baseline": "19.00", + "port-version": 2 + } + } +} +``` + +and amend your current commit: + +```pwsh +> git commit --amend +``` + +then share away! + +### Filesystem Registries + +As you're following along with this documentation, it may be helpful to have +a working example to refer to. We've written one and put it here: +. + +All filesystem registries must have a `versions/baseline.json` file. This file +contains the set of "latest versions" for a certain version of the registry. +It is laid out as a top-level object containing a map from version name to +"baseline objects", which map port names to the version which is considered +"latest" for that version of the registry. + +Filesystem registries need to decide on a versioning scheme. Unlike git +registries, which have the implicit versioning scheme of refs, filesystem +registries can't rely on the version control system here. One possible option +is to do a daily release, and have your "versions" be dates. + +_WARNING_: A baseline must always refer to the same set of versions. If you +want to add new versions, you need to create a new version of the registry in +the `baseline.json` file. + +Here's an example of a valid `baseline.json`, for a registry that has decided +upon dates for their versions: + +```json +{ + "2021-04-16": { + "kitten": { + "baseline": "2.6.2", + "port-version": 0 + }, + "port-b": { + "baseline": "19.00", + "port-version": 2 + } + }, + "2021-04-15": { + "kitten": { + "baseline": "2.6.2", + "port-version": 0 + }, + "port-b": { + "baseline": "19.00", + "port-version": 1 + } + } +} +``` + +The `versions` directory contains all the information about which versions of +which packages are contained in the registry, along with where those versions +are stored. The rest of the registry just acts as a backing store, as far as +vcpkg is concerned: only things inside the `versions` directory will be used +to direct how your registry is seen by vcpkg. + +Each port in a registry should exist in the versions directory as +`-/.json`; in other words, the +information about the `kitten` port would be located in +`versions/k-/kitten.json`. This should be a top-level object with only a +single field: `"versions"`. This field should contain an array of version +objects: + +- The version of the port in question; should be exactly the same as the + `vcpkg.json` file, including the version fields and `"port-version"`. +- The `"path"` field: a relative directory, rooted at the base of the registry + (in other words, the directory where `versions` is located), to the port + directory. It should look something like `"$/path/to/port/dir`" + +Note that the version fields for ports with `CONTROL` files, is +`"version-string"`; we do not recommend using `CONTROL` files in new +registries, however. + +In general, it's not important where you place port directories. However, the +idiom in vcpkg is to follow somewhat closely to what the built in vcpkg +registry does: your `kitten` port at version `x.y.z` should be placed in +`ports/kitten/x.y.z`, with port versions appended as you see fit (although +since `#` is not a good character to use for file names, perhaps use `_`). + +_WARNING_: One very important part of registries is that versions should +_never_ be changed. One should never remove or change an existing version. +Your changes to your registry shouldn't change behavior to downstream users. + +Here's an example of a valid version database for a `kitten` port with one +version: + +```json +{ + "versions": [ + { + "version": "2.6.2", + "port-version": 0, + "path": "$/ports/kitten/2.6.2_0" + } + ] +} +``` + +#### Adding a New Version + +Unlike git registries, adding a new version to a filesystem registry mostly +involves a lot of copying. The first thing to do is to copy the latest +version of your port into a new version directory, update the version and +`"port-version"` fields as you need to, and then test with `overlay-ports`: +`vcpkg install kitten --overlay-ports=ports/kitten/new-version`. + +Once you've finished your testing, you can add this new version to the top of +your `versions/k-/kitten.json`: + +```json +{ + "versions": [ + { + "version": "2.6.3", + "port-version": 0, + "path": "$/ports/kitten/2.6.3_0" + }, + { + "version": "2.6.2", + "port-version": 0, + "path": "$/ports/kitten/2.6.2_0" + } + ] +} +``` + +then, you'll want to modify your `versions/baseline.json` with your new version +as well (remember not to modify existing baselines): + +```json +{ + "2021-04-17": { + "kitten": { + "baseline": "2.6.3", + "port-version": 0 + }, + "port-b": { + "baseline": "19.00", + "port-version": 2 + } + }, + "2021-04-16": { + "kitten": { + "baseline": "2.6.2", + "port-version": 0 + }, + "port-b": { + "baseline": "19.00", + "port-version": 2 + } + }, + "2021-04-15": { + "kitten": { + "baseline": "2.6.2", + "port-version": 0 + }, + "port-b": { + "baseline": "19.00", + "port-version": 1 + } + } +} +``` + +and you're done! diff --git a/docs/maintainers/vcpkg_acquire_msys.md b/docs/maintainers/vcpkg_acquire_msys.md index 4dc8f53917e285..fbd43b8e32aa48 100644 --- a/docs/maintainers/vcpkg_acquire_msys.md +++ b/docs/maintainers/vcpkg_acquire_msys.md @@ -1,10 +1,16 @@ # vcpkg_acquire_msys +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_acquire_msys.md). + Download and prepare an MSYS2 instance. ## Usage ```cmake -vcpkg_acquire_msys( [PACKAGES ...]) +vcpkg_acquire_msys( + PACKAGES ... + [NO_DEFAULT_PACKAGES] + [DIRECT_PACKAGES ...] +) ``` ## Parameters @@ -14,7 +20,22 @@ An out-variable that will be set to the path to MSYS2. ### PACKAGES A list of packages to acquire in msys. -To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15)` +To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.16)` + +### NO_DEFAULT_PACKAGES +Exclude the normal base packages. + +The list of base packages includes: bash, coreutils, sed, grep, gawk, diffutils, make, and pkg-config + +### DIRECT_PACKAGES +A list of URL/SHA512 pairs to acquire in msys. + +This parameter can be used by a port to privately extend the list of msys packages to be acquired. +The URLs can be found on the msys2 website[1] and should be a direct archive link: + + https://repo.msys2.org/mingw/i686/mingw-w64-i686-gettext-0.19.8.1-9-any.pkg.tar.zst + +[1] https://packages.msys2.org/search ## Notes A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`: @@ -36,4 +57,4 @@ vcpkg_execute_required_process( * [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake) ## Source -[scripts/cmake/vcpkg_acquire_msys.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_acquire_msys.cmake) +[scripts/cmake/vcpkg\_acquire\_msys.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_acquire_msys.cmake) diff --git a/docs/maintainers/vcpkg_add_to_path.md b/docs/maintainers/vcpkg_add_to_path.md index b47d86cef84399..76fb251b934e5a 100644 --- a/docs/maintainers/vcpkg_add_to_path.md +++ b/docs/maintainers/vcpkg_add_to_path.md @@ -1,26 +1,27 @@ # vcpkg_add_to_path -Add a directory to the PATH environment variable +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_add_to_path.md). + +Add a directory or directories to the PATH environment variable -## Usage ```cmake -vcpkg_add_to_path([PREPEND] <${PYTHON3_DIR}>) +vcpkg_add_to_path([PREPEND] [...]) ``` -## Parameters -### -The directory to add +`vcpkg_add_to_path` adds all of the paths passed to it to the PATH environment variable. +If PREPEND is passed, then those paths are prepended to the PATH environment variable, +so that they are searched first; otherwise, those paths are appended, so they are +searched after the paths which are already in the environment variable. -### PREPEND -Prepends the directory. +The paths are added in the order received, so that the first path is always searched +before a later path. -The default is to append. +If no paths are passed, then nothing will be done. ## Examples: * [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake#L75) * [folly](https://github.com/Microsoft/vcpkg/blob/master/ports/folly/portfile.cmake#L15) * [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) - ## Source -[scripts/cmake/vcpkg_add_to_path.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_add_to_path.cmake) +[scripts/cmake/vcpkg\_add\_to\_path.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_add_to_path.cmake) diff --git a/docs/maintainers/vcpkg_apply_patches.md b/docs/maintainers/vcpkg_apply_patches.md index d4d8dbfec5e51d..a3aad07145add8 100644 --- a/docs/maintainers/vcpkg_apply_patches.md +++ b/docs/maintainers/vcpkg_apply_patches.md @@ -1,8 +1,11 @@ # vcpkg_apply_patches +**This function has been deprecated in favor of the `PATCHES` argument to [`vcpkg_from_github()`](vcpkg_from_github.md) et al.** + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_apply_patches.md). + Apply a set of patches to a source tree. -## Usage ```cmake vcpkg_apply_patches( SOURCE_PATH <${SOURCE_PATH}> @@ -11,25 +14,5 @@ vcpkg_apply_patches( ) ``` -## Parameters -### SOURCE_PATH -The source path in which apply the patches. By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. - -### PATCHES -A list of patches that are applied to the source tree. - -Generally, these take the form of `${CMAKE_CURRENT_LIST_DIR}/some.patch` to select patches in the `port\\` directory. - -### QUIET -Disables the warning message upon failure. - -This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. - -## Examples - -* [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) -* [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake) -* [libpng](https://github.com/Microsoft/vcpkg/blob/master/ports/libpng/portfile.cmake) - ## Source -[scripts/cmake/vcpkg_apply_patches.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_apply_patches.cmake) +[scripts/cmake/vcpkg\_apply\_patches.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_apply_patches.cmake) diff --git a/docs/maintainers/vcpkg_build_cmake.md b/docs/maintainers/vcpkg_build_cmake.md index 1e17eb97553c3e..8fa40bc71cef95 100644 --- a/docs/maintainers/vcpkg_build_cmake.md +++ b/docs/maintainers/vcpkg_build_cmake.md @@ -1,5 +1,9 @@ # vcpkg_build_cmake +**This function has been deprecated in favor of [`vcpkg_cmake_build`](ports/vcpkg-cmake/vcpkg_cmake_build.md) from the vcpkg-cmake port.** + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_cmake.md). + Build a cmake project. ## Usage: @@ -19,7 +23,7 @@ be passed. Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. ## Notes: -This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). +This command should be preceded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the "install" target @@ -31,4 +35,4 @@ You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) functi * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) ## Source -[scripts/cmake/vcpkg_build_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_cmake.cmake) +[scripts/cmake/vcpkg\_build\_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_cmake.cmake) diff --git a/docs/maintainers/vcpkg_build_make.md b/docs/maintainers/vcpkg_build_make.md new file mode 100644 index 00000000000000..a274b6f6e42ab1 --- /dev/null +++ b/docs/maintainers/vcpkg_build_make.md @@ -0,0 +1,54 @@ +# vcpkg_build_make + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_make.md). + +Build a linux makefile project. + +## Usage: +```cmake +vcpkg_build_make([BUILD_TARGET ] + [ADD_BIN_TO_PATH] + [ENABLE_INSTALL] + [MAKEFILE ] + [LOGFILE_ROOT ]) +``` + +### BUILD_TARGET +The target passed to the make build command (`./make `). If not specified, the 'all' target will +be passed. + +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + +### ENABLE_INSTALL +IF the port supports the install target use vcpkg_install_make() instead of vcpkg_build_make() + +### MAKEFILE +Specifies the Makefile as a relative path from the root of the sources passed to `vcpkg_configure_make()` + +### BUILD_TARGET +The target passed to the make build command (`./make `). Defaults to 'all'. + +### INSTALL_TARGET +The target passed to the make build command (`./make `) if `ENABLE_INSTALL` is used. Defaults to 'install'. + +### DISABLE_PARALLEL +The underlying buildsystem will be instructed to not parallelize + +### SUBPATH +Additional subdir to invoke make in. Useful if only parts of a port should be built. + +## Notes: +This command should be preceded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md). +You can use the alias [`vcpkg_install_make()`](vcpkg_install_make.md) function if your makefile supports the +"install" target + +## Examples + +* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake) +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +* [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_build\_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_make.cmake) diff --git a/docs/maintainers/vcpkg_build_msbuild.md b/docs/maintainers/vcpkg_build_msbuild.md index 9f458f3527614f..4e86fd3b66e005 100644 --- a/docs/maintainers/vcpkg_build_msbuild.md +++ b/docs/maintainers/vcpkg_build_msbuild.md @@ -1,5 +1,7 @@ # vcpkg_build_msbuild +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_msbuild.md). + Build a msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`. ## Usage @@ -59,7 +61,6 @@ Additional options passed to msbuild for Debug builds. These are in addition to ## Examples * [chakracore](https://github.com/Microsoft/vcpkg/blob/master/ports/chakracore/portfile.cmake) -* [cppunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cppunit/portfile.cmake) ## Source -[scripts/cmake/vcpkg_build_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_msbuild.cmake) +[scripts/cmake/vcpkg\_build\_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_msbuild.cmake) diff --git a/docs/maintainers/vcpkg_build_ninja.md b/docs/maintainers/vcpkg_build_ninja.md new file mode 100644 index 00000000000000..de099a16d3e998 --- /dev/null +++ b/docs/maintainers/vcpkg_build_ninja.md @@ -0,0 +1,19 @@ +# vcpkg_build_ninja + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_ninja.md). + +Build a ninja project + +## Usage: +```cmake +vcpkg_build_ninja( + [TARGETS ...] +) +``` + +## Parameters: +### TARGETS +Only build the specified targets. + +## Source +[scripts/cmake/vcpkg\_build\_ninja.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_ninja.cmake) diff --git a/docs/maintainers/vcpkg_build_nmake.md b/docs/maintainers/vcpkg_build_nmake.md new file mode 100644 index 00000000000000..97145b5c28cb3d --- /dev/null +++ b/docs/maintainers/vcpkg_build_nmake.md @@ -0,0 +1,78 @@ +# vcpkg_build_nmake + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_nmake.md). + +Build a msvc makefile project. + +## Usage: +```cmake +vcpkg_build_nmake( + SOURCE_PATH <${SOURCE_PATH}> + [NO_DEBUG] + [ENABLE_INSTALL] + [TARGET ] + [PROJECT_SUBPATH <${SUBPATH}>] + [PROJECT_NAME <${MAKEFILE_NAME}>] + [PRERUN_SHELL <${SHELL_PATH}>] + [PRERUN_SHELL_DEBUG <${SHELL_PATH}>] + [PRERUN_SHELL_RELEASE <${SHELL_PATH}>] + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] + [TARGET ]) +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the source files. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PROJECT_SUBPATH +Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile. + +### PROJECT_NAME +Specifies the name of msvc makefile name. +Default is `makefile.vc` + +### NO_DEBUG +This port doesn't support debug mode. + +### ENABLE_INSTALL +Install binaries after build. + +### PRERUN_SHELL +Script that needs to be called before build + +### PRERUN_SHELL_DEBUG +Script that needs to be called before debug build + +### PRERUN_SHELL_RELEASE +Script that needs to be called before release build + +### OPTIONS +Additional options passed to generate during the generation. + +### OPTIONS_RELEASE +Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`. + +### TARGET +The target passed to the nmake build command (`nmake/nmake install`). If not specified, no target will +be passed. + +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + +## Notes: +You can use the alias [`vcpkg_install_nmake()`](vcpkg_install_nmake.md) function if your makefile supports the +"install" target + +## Examples + +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_build\_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_nmake.cmake) diff --git a/docs/maintainers/vcpkg_build_qmake.md b/docs/maintainers/vcpkg_build_qmake.md new file mode 100644 index 00000000000000..e452388546d523 --- /dev/null +++ b/docs/maintainers/vcpkg_build_qmake.md @@ -0,0 +1,12 @@ +# vcpkg_build_qmake + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_qmake.md). + +Build a qmake-based project, previously configured using vcpkg_configure_qmake. + +```cmake +vcpkg_build_qmake() +``` + +## Source +[scripts/cmake/vcpkg\_build\_qmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_qmake.cmake) diff --git a/docs/maintainers/vcpkg_buildpath_length_warning.md b/docs/maintainers/vcpkg_buildpath_length_warning.md new file mode 100644 index 00000000000000..c67dc64656f933 --- /dev/null +++ b/docs/maintainers/vcpkg_buildpath_length_warning.md @@ -0,0 +1,16 @@ +# vcpkg_buildpath_length_warning + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_buildpath_length_warning.md). + +Warns the user if their vcpkg installation path might be too long for the package they're installing. + +```cmake +vcpkg_buildpath_length_warning() +``` + +`vcpkg_buildpath_length_warning` warns the user if the number of bytes in the +path to `buildtrees` is bigger than `N`. Note that this is simply a warning, +and isn't relied on for correctness. + +## Source +[scripts/cmake/vcpkg\_buildpath\_length\_warning.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_buildpath_length_warning.cmake) diff --git a/docs/maintainers/vcpkg_check_features.md b/docs/maintainers/vcpkg_check_features.md index cec01dde2ea715..a8b90a3cd90ce9 100644 --- a/docs/maintainers/vcpkg_check_features.md +++ b/docs/maintainers/vcpkg_check_features.md @@ -1,53 +1,45 @@ # vcpkg_check_features + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_check_features.md). Check if one or more features are a part of a package installation. -## Usage ```cmake vcpkg_check_features( - OUT_FEATURE_OPTIONS - [FEATURES - - [ ] - ...] - [INVERTED_FEATURES - - [ ] - ...] + OUT_FEATURE_OPTIONS + [PREFIX ] + [FEATURES + [ ]... + ] + [INVERTED_FEATURES + [ ]... + ] ) ``` -`vcpkg_check_features()` accepts these parameters: - -* `OUT_FEATURE_OPTIONS`: - An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS` - and then set it to contain a list of option definitions (`-D=ON|OFF`). - - This should be set to `FEATURE_OPTIONS` by convention. - -* `FEATURES`: - A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs. - For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: - - * `-D=ON`, if a feature is specified for installation, - * `-D=OFF`, otherwise. - -* `INVERTED_FEATURES`: - A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`. - For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: - - * `-D=OFF`, if a feature is specified for installation, - * `-D=ON`, otherwise. +The `` should be set to `FEATURE_OPTIONS` by convention. -## Notes +`vcpkg_check_features()` will: -The `FEATURES` name parameter can be omitted if no `INVERTED_FEATURES` are used. +- for each `` passed in `FEATURES`: + - if the feature is set, add `-D=ON` to ``, + and set `_` to ON. + - if the feature is not set, add `-D=OFF` to ``, + and set `_` to OFF. +- for each `` passed in `INVERTED_FEATURES`: + - if the feature is set, add `-D=OFF` to ``, + and set `_` to OFF. + - if the feature is not set, add `-D=ON` to ``, + and set `_` to ON. -At least one (`FEATURE_NAME`, `OPTION_NAME`) pair must be passed to the function call. +If `` is not passed, then the feature vars set are simply ``, +not `_`. -Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication. -If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists, -two conflicting definitions are added to `OUT_FEATURE_OPTIONS`. +If `INVERTED_FEATURES` is not passed, then the `FEATURES` keyword is optional. +This behavior is deprecated. +If the same `` is passed multiple times, +then `vcpkg_check_features` will cause a fatal error, +since that is a bug. ## Examples @@ -58,18 +50,18 @@ $ ./vcpkg install mimalloc[asm,secure] # ports/mimalloc/portfile.cmake vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - # Keyword FEATURES is optional if INVERTED_FEATURES are not used - asm MI_SEE_ASM - override MI_OVERRIDE - secure MI_SECURE + FEATURES + asm MI_SEE_ASM + override MI_OVERRIDE + secure MI_SECURE ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DMI_SEE_ASM=ON; -DMI_OVERRIDE=OFF; -DMI_SECURE=ON" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DMI_SEE_ASM=ON;-DMI_OVERRIDE=OFF;-DMI_SECURE=ON" + ${FEATURE_OPTIONS} ) ``` @@ -79,18 +71,18 @@ vcpkg_configure_cmake( $ ./vcpkg install cpprestsdk[websockets] # ports/cpprestsdk/portfile.cmake -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - INVERTED_FEATURES # <- Keyword INVERTED_FEATURES required - brotli CPPREST_EXCLUDE_BROTLI - websockets CPPREST_EXCLUDE_WEBSOCKETS +vcpkg_check_features( + INVERTED_FEATURES + brotli CPPREST_EXCLUDE_BROTLI + websockets CPPREST_EXCLUDE_WEBSOCKETS ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON; -DCPPREST_EXCLUDE_WEBSOCKETS=OFF" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON;-DCPPREST_EXCLUDE_WEBSOCKETS=OFF" + ${FEATURE_OPTIONS} ) ``` @@ -100,20 +92,21 @@ vcpkg_configure_cmake( $ ./vcpkg install pcl[cuda] # ports/pcl/portfile.cmake -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - cuda WITH_CUDA - cuda BUILD_CUDA - cuda BUILD_GPU +vcpkg_check_features( + FEATURES + cuda WITH_CUDA + cuda BUILD_CUDA + cuda BUILD_GPU ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DWITH_CUDA=ON; -DBUILD_CUDA=ON; -DBUILD_GPU=ON" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DWITH_CUDA=ON;-DBUILD_CUDA=ON;-DBUILD_GPU=ON" + ${FEATURE_OPTIONS} ) -``` +``` ### Example 4: Use regular and inverted features @@ -121,21 +114,21 @@ vcpkg_configure_cmake( $ ./vcpkg install rocksdb[tbb] # ports/rocksdb/portfile.cmake -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used - tbb WITH_TBB - INVERTED_FEATURES - tbb ROCKSDB_IGNORE_PACKAGE_TBB +vcpkg_check_features( + FEATURES + tbb WITH_TBB + INVERTED_FEATURES + tbb ROCKSDB_IGNORE_PACKAGE_TBB ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - # Expands to "-DWITH_TBB=ON; -DROCKSDB_IGNORE_PACKAGE_TBB=OFF" - ${FEATURE_OPTIONS} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DWITH_TBB=ON;-DROCKSDB_IGNORE_PACKAGE_TBB=OFF" + ${FEATURE_OPTIONS} ) -``` +``` ## Examples in portfiles @@ -143,6 +136,5 @@ vcpkg_configure_cmake( * [pcl](https://github.com/microsoft/vcpkg/blob/master/ports/pcl/portfile.cmake) * [rocksdb](https://github.com/microsoft/vcpkg/blob/master/ports/rocksdb/portfile.cmake) - ## Source -[scripts/cmake/vcpkg_check_features.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_features.cmake) +[scripts/cmake/vcpkg\_check\_features.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_features.cmake) diff --git a/docs/maintainers/vcpkg_check_linkage.md b/docs/maintainers/vcpkg_check_linkage.md index 406325dba08f84..8b73520e0a7c16 100644 --- a/docs/maintainers/vcpkg_check_linkage.md +++ b/docs/maintainers/vcpkg_check_linkage.md @@ -1,5 +1,7 @@ # vcpkg_check_linkage +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_check_linkage.md). + Asserts the available library and CRT linkage options for the port. ## Usage @@ -14,6 +16,8 @@ vcpkg_check_linkage( ### ONLY_STATIC_LIBRARY Indicates that this port can only be built with static library linkage. +Note: If the user requested a dynamic build ONLY_STATIC_LIBRARY will result in a note being printed, not a fatal error. + ### ONLY_DYNAMIC_LIBRARY Indicates that this port can only be built with dynamic/shared library linkage. @@ -28,7 +32,7 @@ This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, ## Examples -* [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) +* [abseil](https://github.com/Microsoft/vcpkg/blob/master/ports/abseil/portfile.cmake) ## Source -[scripts/cmake/vcpkg_check_linkage.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_linkage.cmake) +[scripts/cmake/vcpkg\_check\_linkage.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_linkage.cmake) diff --git a/docs/maintainers/vcpkg_clean_executables_in_bin.md b/docs/maintainers/vcpkg_clean_executables_in_bin.md new file mode 100644 index 00000000000000..b6df723adec912 --- /dev/null +++ b/docs/maintainers/vcpkg_clean_executables_in_bin.md @@ -0,0 +1,25 @@ +# vcpkg_clean_executables_in_bin + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_clean_executables_in_bin.md). + +Remove specified executables found in `${CURRENT_PACKAGES_DIR}/bin` and `${CURRENT_PACKAGES_DIR}/debug/bin`. If, after all specified executables have been removed, and the `bin` and `debug/bin` directories are empty, then also delete `bin` and `debug/bin` directories. + +## Usage +```cmake +vcpkg_clean_executables_in_bin( + FILE_NAMES ... +) +``` + +## Parameters +### FILE_NAMES +A list of executable filenames without extension. + +## Notes +Generally, there is no need to call this function manually. Instead, pass an extra `AUTO_CLEAN` argument when calling `vcpkg_copy_tools`. + +## Examples +* [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_clean\_executables\_in\_bin.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_clean_executables_in_bin.cmake) diff --git a/docs/maintainers/vcpkg_clean_msbuild.md b/docs/maintainers/vcpkg_clean_msbuild.md index 39d07077b14321..3474076b53ac31 100644 --- a/docs/maintainers/vcpkg_clean_msbuild.md +++ b/docs/maintainers/vcpkg_clean_msbuild.md @@ -1,5 +1,7 @@ # vcpkg_clean_msbuild +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_clean_msbuild.md). + Clean intermediate files generated by `vcpkg_install_msbuild()`. ## Usage @@ -9,7 +11,7 @@ vcpkg_clean_msbuild() ## Examples -* [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) +* [python3](https://github.com/Microsoft/vcpkg/blob/master/ports/python3/portfile.cmake) ## Source -[scripts/cmake/vcpkg_clean_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_clean_msbuild.cmake) +[scripts/cmake/vcpkg\_clean\_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_clean_msbuild.cmake) diff --git a/docs/maintainers/vcpkg_common_definitions.md b/docs/maintainers/vcpkg_common_definitions.md new file mode 100644 index 00000000000000..2e1037af5f50bc --- /dev/null +++ b/docs/maintainers/vcpkg_common_definitions.md @@ -0,0 +1,34 @@ +# vcpkg_common_definitions + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_common_definitions.md). + +This file defines the following variables which are commonly needed or used in portfiles: + +```cmake +VCPKG_TARGET_IS_ with being one of the following: WINDOWS, UWP, MINGW, LINUX, OSX, ANDROID, FREEBSD, OPENBSD. only defined if +VCPKG_HOST_IS_ with being one of the following: WINDOWS, LINUX, OSX, FREEBSD, OPENBSD. only defined if +VCPKG_HOST_PATH_SEPARATOR Host specific path separator (USAGE: "${VCPKG_HOST_PATH_SEPARATOR}"; only use and pass variables with VCPKG_HOST_PATH_SEPARATOR within "") +VCPKG_HOST_EXECUTABLE_SUFFIX executable suffix of the host +VCPKG_TARGET_EXECUTABLE_SUFFIX executable suffix of the target +VCPKG_TARGET_STATIC_LIBRARY_PREFIX static library prefix for target (same as CMAKE_STATIC_LIBRARY_PREFIX) +VCPKG_TARGET_STATIC_LIBRARY_SUFFIX static library suffix for target (same as CMAKE_STATIC_LIBRARY_SUFFIX) +VCPKG_TARGET_SHARED_LIBRARY_PREFIX shared library prefix for target (same as CMAKE_SHARED_LIBRARY_PREFIX) +VCPKG_TARGET_SHARED_LIBRARY_SUFFIX shared library suffix for target (same as CMAKE_SHARED_LIBRARY_SUFFIX) +VCPKG_TARGET_IMPORT_LIBRARY_PREFIX import library prefix for target (same as CMAKE_IMPORT_LIBRARY_PREFIX) +VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX import library suffix for target (same as CMAKE_IMPORT_LIBRARY_SUFFIX) +VCPKG_FIND_LIBRARY_PREFIXES target dependent prefixes used for find_library calls in portfiles +VCPKG_FIND_LIBRARY_SUFFIXES target dependent suffixes used for find_library calls in portfiles +VCPKG_SYSTEM_LIBRARIES list of libraries are provide by the toolchain and are not managed by vcpkg +TARGET_TRIPLET the name of the current triplet to build for +CURRENT_INSTALLED_DIR the absolute path to the installed files for the current triplet +HOST_TRIPLET the name of the triplet corresponding to the host +CURRENT_HOST_INSTALLED_DIR the absolute path to the installed files for the host triplet +VCPKG_CROSSCOMPILING Whether vcpkg is cross-compiling: in other words, whether TARGET_TRIPLET and HOST_TRIPLET are different +``` + +CMAKE_STATIC_LIBRARY_(PREFIX|SUFFIX), CMAKE_SHARED_LIBRARY_(PREFIX|SUFFIX) and CMAKE_IMPORT_LIBRARY_(PREFIX|SUFFIX) are defined for the target +Furthermore the variables CMAKE_FIND_LIBRARY_(PREFIXES|SUFFIXES) are also defined for the target so that +portfiles are able to use find_library calls to discover dependent libraries within the current triplet for ports. + +## Source +[scripts/cmake/vcpkg\_common\_definitions.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_common_definitions.cmake) diff --git a/docs/maintainers/vcpkg_configure_cmake.md b/docs/maintainers/vcpkg_configure_cmake.md index ebbd92ed1b30ab..8a1eb3284a4485 100644 --- a/docs/maintainers/vcpkg_configure_cmake.md +++ b/docs/maintainers/vcpkg_configure_cmake.md @@ -1,5 +1,9 @@ # vcpkg_configure_cmake +**This function has been deprecated in favor of [`vcpkg_cmake_configure`](ports/vcpkg-cmake/vcpkg_cmake_configure.md) from the vcpkg-cmake port.** + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_cmake.md). + Configure CMake for Debug and Release builds of a project. ## Usage @@ -13,6 +17,7 @@ vcpkg_configure_cmake( [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] [OPTIONS_RELEASE <-DOPTIMIZE=1>...] [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] + [MAYBE_UNUSED_VARIABLES ...] ) ``` @@ -29,6 +34,8 @@ This should be specified unless the port is known to not work under Ninja. Disables running the CMake configure step in parallel. This is needed for libraries which write back into their source directory during configure. +This also disables CMAKE_DISABLE_SOURCE_CHANGES. + ### NO_CHARSET_FLAG Disables passing `utf-8` as the default character set to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`. @@ -38,7 +45,7 @@ This is needed for libraries that set their own source code's character set. Specifies the precise generator to use. This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build. -If used for this purpose, it should be set to "NMake Makefiles". +If used for this purpose, it should be set to `"NMake Makefiles"`. ### OPTIONS Additional options passed to CMake during the configuration. @@ -49,6 +56,23 @@ Additional options passed to CMake during the Release configuration. These are i ### OPTIONS_DEBUG Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. +### MAYBE_UNUSED_VARIABLES +Any CMake variables which are explicitly passed in, but which may not be used on all platforms. +For example: +```cmake +vcpkg_cmake_configure( + ... + OPTIONS + -DBUILD_EXAMPLE=OFF + ... + MAYBE_UNUSED_VARIABLES + BUILD_EXAMPLE +) +``` + +### LOGNAME +Name of the log to write the output of the configure call to. + ## Notes This command supplies many common arguments to CMake. To see the full list, examine the source. @@ -60,4 +84,4 @@ This command supplies many common arguments to CMake. To see the full list, exam * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) ## Source -[scripts/cmake/vcpkg_configure_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_cmake.cmake) +[scripts/cmake/vcpkg\_configure\_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_cmake.cmake) diff --git a/docs/maintainers/vcpkg_configure_gn.md b/docs/maintainers/vcpkg_configure_gn.md new file mode 100644 index 00000000000000..c196f7330114ff --- /dev/null +++ b/docs/maintainers/vcpkg_configure_gn.md @@ -0,0 +1,32 @@ +# vcpkg_configure_gn + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_gn.md). + +Generate Ninja (GN) targets + +## Usage: +```cmake +vcpkg_configure_gn( + SOURCE_PATH + [OPTIONS ] + [OPTIONS_DEBUG ] + [OPTIONS_RELEASE ] +) +``` + +## Parameters: +### SOURCE_PATH (required) +The path to the GN project. + +### OPTIONS +Options to be passed to both the debug and release targets. +Note: Must be provided as a space-separated string. + +### OPTIONS_DEBUG (space-separated string) +Options to be passed to the debug target. + +### OPTIONS_RELEASE (space-separated string) +Options to be passed to the release target. + +## Source +[scripts/cmake/vcpkg\_configure\_gn.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_gn.cmake) diff --git a/docs/maintainers/vcpkg_configure_make.md b/docs/maintainers/vcpkg_configure_make.md new file mode 100644 index 00000000000000..ebf80521af7718 --- /dev/null +++ b/docs/maintainers/vcpkg_configure_make.md @@ -0,0 +1,93 @@ +# vcpkg_configure_make + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_make.md). + +Configure configure for Debug and Release builds of a project. + +## Usage +```cmake +vcpkg_configure_make( + SOURCE_PATH <${SOURCE_PATH}> + [AUTOCONFIG] + [USE_WRAPPERS] + [DETERMINE_BUILD_TRIPLET] + [BUILD_TRIPLET "--host=x64 --build=i686-unknown-pc"] + [NO_ADDITIONAL_PATHS] + [CONFIG_DEPENDENT_ENVIRONMENT ...] + [CONFIGURE_ENVIRONMENT_VARIABLES ...] + [ADD_BIN_TO_PATH] + [NO_DEBUG] + [SKIP_CONFIGURE] + [PROJECT_SUBPATH <${PROJ_SUBPATH}>] + [PRERUN_SHELL <${SHELL_PATH}>] + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +) +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the `configure`/`configure.ac`. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PROJECT_SUBPATH +Specifies the directory containing the ``configure`/`configure.ac`. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### SKIP_CONFIGURE +Skip configure process + +### USE_WRAPPERS +Use autotools ar-lib and compile wrappers (only applies to windows cl and lib) + +### BUILD_TRIPLET +Used to pass custom --build/--target/--host to configure. Can be globally overwritten by VCPKG_MAKE_BUILD_TRIPLET + +### DETERMINE_BUILD_TRIPLET +For ports having a configure script following the autotools rules for selecting the triplet + +### NO_ADDITIONAL_PATHS +Don't pass any additional paths except for --prefix to the configure call + +### AUTOCONFIG +Need to use autoconfig to generate configure file. + +### PRERUN_SHELL +Script that needs to be called before configuration (do not use for batch files which simply call autoconf or configure) + +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during configure such that executables can run against the in-tree DLLs. + +## DISABLE_VERBOSE_FLAGS +do not pass '--disable-silent-rules --verbose' to configure + +### OPTIONS +Additional options passed to configure during the configuration. + +### OPTIONS_RELEASE +Additional options passed to configure during the Release configuration. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to configure during the Debug configuration. These are in addition to `OPTIONS`. + +### CONFIG_DEPENDENT_ENVIRONMENT +List of additional configuration dependent environment variables to set. +Pass SOMEVAR to set the environment and have SOMEVAR_(DEBUG|RELEASE) set in the portfile to the appropriate values +General environment variables can be set from within the portfile itself. + +### CONFIGURE_ENVIRONMENT_VARIABLES +List of additional environment variables to pass via the configure call. + +## Notes +This command supplies many common arguments to configure. To see the full list, examine the source. + +## Examples + +* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake) +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +* [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_configure\_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) diff --git a/docs/maintainers/vcpkg_configure_meson.md b/docs/maintainers/vcpkg_configure_meson.md new file mode 100644 index 00000000000000..a0bfc8a99df1bf --- /dev/null +++ b/docs/maintainers/vcpkg_configure_meson.md @@ -0,0 +1,40 @@ +# vcpkg_configure_meson + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_meson.md). + +Configure Meson for Debug and Release builds of a project. + +## Usage +```cmake +vcpkg_configure_meson( + SOURCE_PATH <${SOURCE_PATH}> + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +) +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the `meson.build`. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### OPTIONS +Additional options passed to Meson during the configuration. + +### OPTIONS_RELEASE +Additional options passed to Meson during the Release configuration. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to Meson during the Debug configuration. These are in addition to `OPTIONS`. + +## Notes +This command supplies many common arguments to Meson. To see the full list, examine the source. + +## Examples + +* [fribidi](https://github.com/Microsoft/vcpkg/blob/master/ports/fribidi/portfile.cmake) +* [libepoxy](https://github.com/Microsoft/vcpkg/blob/master/ports/libepoxy/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_configure\_meson.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_meson.cmake) diff --git a/docs/maintainers/vcpkg_configure_qmake.md b/docs/maintainers/vcpkg_configure_qmake.md new file mode 100644 index 00000000000000..53526e10321468 --- /dev/null +++ b/docs/maintainers/vcpkg_configure_qmake.md @@ -0,0 +1,23 @@ +# vcpkg_configure_qmake + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_qmake.md). + +Configure a qmake-based project. + +```cmake +vcpkg_configure_qmake( + SOURCE_PATH + [OPTIONS arg1 [arg2 ...]] + [OPTIONS_RELEASE arg1 [arg2 ...]] + [OPTIONS_DEBUG arg1 [arg2 ...]] +) +``` + +### SOURCE_PATH +The path to the *.pro qmake project file. + +### OPTIONS, OPTIONS\_RELEASE, OPTIONS\_DEBUG +The options passed to qmake. + +## Source +[scripts/cmake/vcpkg\_configure\_qmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_qmake.cmake) diff --git a/docs/maintainers/vcpkg_copy_pdbs.md b/docs/maintainers/vcpkg_copy_pdbs.md index 1583f777ff25cc..9c379d225959d1 100644 --- a/docs/maintainers/vcpkg_copy_pdbs.md +++ b/docs/maintainers/vcpkg_copy_pdbs.md @@ -1,20 +1,24 @@ # vcpkg_copy_pdbs +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_copy_pdbs.md). + Automatically locate pdbs in the build tree and copy them adjacent to all DLLs. -## Usage ```cmake -vcpkg_copy_pdbs([BUILD_PATHS <${CURRENT_PACKAGES_DIR}/bin/*.dll> ...]) +vcpkg_copy_pdbs( + [BUILD_PATHS ...]) ``` -## Notes -This command should always be called by portfiles after they have finished rearranging the binary output. +The ``s are patterns which will be passed to `file(GLOB_RECURSE)`, +for locating DLLs. It defaults to using: -## Parameters -### BUILD_PATHS -Path patterns passed to `file(GLOB_RECURSE)` for locating dlls. +- `${CURRENT_PACKAGES_DIR}/bin/*.dll` +- `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll` -Defaults to `${CURRENT_PACKAGES_DIR}/bin/*.dll` and `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll`. +since that is generally where DLLs are located. + +## Notes +This command should always be called by portfiles after they have finished rearranging the binary output. ## Examples @@ -22,4 +26,4 @@ Defaults to `${CURRENT_PACKAGES_DIR}/bin/*.dll` and `${CURRENT_PACKAGES_DIR}/deb * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) ## Source -[scripts/cmake/vcpkg_copy_pdbs.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_pdbs.cmake) +[scripts/cmake/vcpkg\_copy\_pdbs.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_pdbs.cmake) diff --git a/docs/maintainers/vcpkg_copy_tool_dependencies.md b/docs/maintainers/vcpkg_copy_tool_dependencies.md index 05d74f0b273f40..d34fa5d602c040 100644 --- a/docs/maintainers/vcpkg_copy_tool_dependencies.md +++ b/docs/maintainers/vcpkg_copy_tool_dependencies.md @@ -1,5 +1,7 @@ # vcpkg_copy_tool_dependencies +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_copy_tool_dependencies.md). + Copy all DLL dependencies of built tools into the tool folder. ## Usage @@ -18,4 +20,4 @@ This command should always be called by portfiles after they have finished rearr * [fltk](https://github.com/Microsoft/vcpkg/blob/master/ports/fltk/portfile.cmake) ## Source -[scripts/cmake/vcpkg_copy_tool_dependencies.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_tool_dependencies.cmake) +[scripts/cmake/vcpkg\_copy\_tool\_dependencies.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_tool_dependencies.cmake) diff --git a/docs/maintainers/vcpkg_copy_tools.md b/docs/maintainers/vcpkg_copy_tools.md new file mode 100644 index 00000000000000..aa9c0735cb97a4 --- /dev/null +++ b/docs/maintainers/vcpkg_copy_tools.md @@ -0,0 +1,36 @@ +# vcpkg_copy_tools + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_copy_tools.md). + +Copy tools and all their DLL dependencies into the `tools` folder. + +## Usage +```cmake +vcpkg_copy_tools( + TOOL_NAMES ... + [SEARCH_DIR <${CURRENT_PACKAGES_DIR}/bin>] + [DESTINATION <${CURRENT_PACKAGES_DIR}/tools/${PORT}>] + [AUTO_CLEAN] +) +``` +## Parameters +### TOOL_NAMES +A list of tool filenames without extension. + +### SEARCH_DIR +The path to the directory containing the tools. This will be set to `${CURRENT_PACKAGES_DIR}/bin` if omitted. + +### DESTINATION +Destination to copy the tools to. This will be set to `${CURRENT_PACKAGES_DIR}/tools/${PORT}` if omitted. + +### AUTO_CLEAN +Auto clean executables in `${CURRENT_PACKAGES_DIR}/bin` and `${CURRENT_PACKAGES_DIR}/debug/bin`. + +## Examples + +* [cpuinfo](https://github.com/microsoft/vcpkg/blob/master/ports/cpuinfo/portfile.cmake) +* [nanomsg](https://github.com/microsoft/vcpkg/blob/master/ports/nanomsg/portfile.cmake) +* [uriparser](https://github.com/microsoft/vcpkg/blob/master/ports/uriparser/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_copy\_tools.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_tools.cmake) diff --git a/docs/maintainers/vcpkg_download_distfile.md b/docs/maintainers/vcpkg_download_distfile.md index 2e86b8f7c46cd0..62fde14553073b 100644 --- a/docs/maintainers/vcpkg_download_distfile.md +++ b/docs/maintainers/vcpkg_download_distfile.md @@ -1,5 +1,7 @@ # vcpkg_download_distfile +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_download_distfile.md). + Download and cache a file needed for this port. This helper should always be used instead of CMake's built-in `file(DOWNLOAD)` command. @@ -11,6 +13,7 @@ vcpkg_download_distfile( URLS ... FILENAME SHA512 <5981de...> + [ALWAYS_REDOWNLOAD] ) ``` ## Parameters @@ -28,11 +31,19 @@ The expected hash for the file. If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch. +### QUIET +Suppress output on cache hit + ### SKIP_SHA512 Skip SHA512 hash check for file. This switch is only valid when building with the `--head` command line flag. +### ALWAYS_REDOWNLOAD +Avoid caching; this is a REST call or otherwise unstable. + +Requires `SKIP_SHA512`. + ### HEADERS A list of headers to append to the download request. This can be used for authentication during a download. @@ -45,7 +56,7 @@ The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downlo * [apr](https://github.com/Microsoft/vcpkg/blob/master/ports/apr/portfile.cmake) * [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake) -* [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) +* [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake) ## Source -[scripts/cmake/vcpkg_download_distfile.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_download_distfile.cmake) +[scripts/cmake/vcpkg\_download\_distfile.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_download_distfile.cmake) diff --git a/docs/maintainers/vcpkg_execute_build_process.md b/docs/maintainers/vcpkg_execute_build_process.md index d5b3593d9f0d65..7eb6f8d46f950e 100644 --- a/docs/maintainers/vcpkg_execute_build_process.md +++ b/docs/maintainers/vcpkg_execute_build_process.md @@ -1,5 +1,7 @@ # vcpkg_execute_build_process +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_execute_build_process.md). + Execute a required build process ## Usage @@ -8,7 +10,7 @@ vcpkg_execute_build_process( COMMAND [...] [NO_PARALLEL_COMMAND [...]] WORKING_DIRECTORY - LOGNAME ) + LOGNAME ) ``` ## Parameters @@ -33,4 +35,4 @@ conflict when building multiple at once. * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) ## Source -[scripts/cmake/vcpkg_execute_build_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_build_process.cmake) +[scripts/cmake/vcpkg\_execute\_build\_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_build_process.cmake) diff --git a/docs/maintainers/vcpkg_execute_in_download_mode.md b/docs/maintainers/vcpkg_execute_in_download_mode.md new file mode 100644 index 00000000000000..a9fb5bffb806c8 --- /dev/null +++ b/docs/maintainers/vcpkg_execute_in_download_mode.md @@ -0,0 +1,21 @@ +# vcpkg_execute_in_download_mode + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_execute_in_download_mode.md). + +Execute a process even in download mode. + +## Usage +```cmake +vcpkg_execute_in_download_mode( + ... +) +``` + +The signature of this function is identical to `execute_process()`. + +See [`execute_process()`] for more details. + +[`execute_process()`]: https://cmake.org/cmake/help/latest/command/execute_process.html + +## Source +[scripts/cmake/vcpkg\_execute\_in\_download\_mode.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_in_download_mode.cmake) diff --git a/docs/maintainers/vcpkg_execute_required_process.md b/docs/maintainers/vcpkg_execute_required_process.md index 4b1a7e0814673e..b00c97260f2ad3 100644 --- a/docs/maintainers/vcpkg_execute_required_process.md +++ b/docs/maintainers/vcpkg_execute_required_process.md @@ -1,5 +1,7 @@ # vcpkg_execute_required_process +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_execute_required_process.md). + Execute a process with logging and fail the build if the command fails. ## Usage @@ -8,9 +10,16 @@ vcpkg_execute_required_process( COMMAND <${PERL}> [...] WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg> LOGNAME + [TIMEOUT ] + [OUTPUT_VARIABLE ] + [ERROR_VARIABLE ] ) ``` ## Parameters +### ALLOW_IN_DOWNLOAD_MODE +Allows the command to execute in Download Mode. +[See execute_process() override](../../scripts/cmake/execute_process.cmake). + ### COMMAND The command to be executed, along with its arguments. @@ -20,6 +29,15 @@ The directory to execute the command in. ### LOGNAME The prefix to use for the log files. +### TIMEOUT +Optional timeout after which to terminate the command. + +### OUTPUT_VARIABLE +Optional variable to receive stdout of the command. + +### ERROR_VARIABLE +Optional variable to receive stderr of the command. + This should be a unique name for different triplets so that the logs don't conflict when building multiple at once. ## Examples @@ -30,4 +48,4 @@ This should be a unique name for different triplets so that the logs don't confl * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) ## Source -[scripts/cmake/vcpkg_execute_required_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_required_process.cmake) +[scripts/cmake/vcpkg\_execute\_required\_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_required_process.cmake) diff --git a/docs/maintainers/vcpkg_execute_required_process_repeat.md b/docs/maintainers/vcpkg_execute_required_process_repeat.md new file mode 100644 index 00000000000000..22dcfc4afbe827 --- /dev/null +++ b/docs/maintainers/vcpkg_execute_required_process_repeat.md @@ -0,0 +1,19 @@ +# vcpkg_execute_required_process_repeat + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_execute_required_process_repeat.md). + +Execute a process until the command succeeds, or until the COUNT is reached. + +## Usage +```cmake +vcpkg_execute_required_process_repeat( + COMMAND [] + COUNT + WORKING_DIRECTORY + LOGNAME + [ALLOW_IN_DOWNLOAD_MODE] +) +``` + +## Source +[scripts/cmake/vcpkg\_execute\_required\_process\_repeat.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_required_process_repeat.cmake) diff --git a/docs/maintainers/vcpkg_extract_source_archive.md b/docs/maintainers/vcpkg_extract_source_archive.md index 4971df9604101a..1d807edc8eb706 100644 --- a/docs/maintainers/vcpkg_extract_source_archive.md +++ b/docs/maintainers/vcpkg_extract_source_archive.md @@ -1,26 +1,75 @@ # vcpkg_extract_source_archive -Extract an archive into the source directory. Deprecated in favor of [`vcpkg_extract_source_archive_ex`](vcpkg_extract_source_archive_ex.md). +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_extract_source_archive.md). + +Extract an archive into the source directory. ## Usage +There are two "overloads" of this function. The first is deprecated: + +```cmake +vcpkg_extract_source_archive(<${ARCHIVE}> [<${TARGET_DIRECTORY}>]) +``` + +This overload should not be used. + +The latter is suggested to use for all future `vcpkg_extract_source_archive`s. + ```cmake -vcpkg_extract_source_archive( - <${ARCHIVE}> [<${TARGET_DIRECTORY}>] +vcpkg_extract_source_archive( + ARCHIVE + [NO_REMOVE_ONE_LEVEL] + [PATCHES ...] + [SOURCE_BASE ] + [BASE_DIRECTORY | WORKING_DIRECTORY ] ) ``` -## Parameters -### ARCHIVE -The full path to the archive to be extracted. -This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). +`vcpkg_extract_source_archive` takes an archive and extracts it. +It replaces existing uses of `vcpkg_extract_source_archive_ex`. +The simplest use of it is: + +```cmake +vcpkg_download_distfile(archive ...) +vcpkg_extract_source_archive(source_path ARCHIVE "${archive}") +``` + +The general expectation is that an archives are laid out with a base directory, +and all the actual files underneath that directory; in other words, if you +extract the archive, you'll get something that looks like: + +``` +zlib-1.2.11/ + doc/ + ... + examples/ + ... + ChangeLog + CMakeLists.txt + README + zlib.h + ... +``` -### TARGET_DIRECTORY -If specified, the archive will be extracted into the target directory instead of `${CURRENT_BUILDTREES_DIR}\src\`. +`vcpkg_extract_source_archive` automatically removes this directory, +and gives you the items under it directly. However, this only works +when there is exactly one item in the top level of an archive. +Otherwise, you'll have to pass the `NO_REMOVE_ONE_LEVEL` argument to +prevent `vcpkg_extract_source_archive` from performing this transformation. -This can be used to mimic git submodules, by extracting into a subdirectory of another archive. +If the source needs to be patched in some way, the `PATCHES` argument +allows one to do this, just like other `vcpkg_from_*` functions. -## Notes -This command will also create a tracking file named .extracted in the TARGET_DIRECTORY. This file, when present, will suppress the extraction of the archive. +`vcpkg_extract_source_archive` extracts the files to +`${CURRENT_BUILDTREES_DIR}//-.clean`. +When in editable mode, no `.clean` is appended, +to allow for a user to modify the sources. +`base-directory` defaults to `src`, +and `source-base` defaults to the stem of ``. +You can change these via the `BASE_DIRECTORY` and `SOURCE_BASE` arguments +respectively. +If you need to extract to a location that is not based in `CURRENT_BUILDTREES_DIR`, +you can use the `WORKING_DIRECTORY` argument to do the same. ## Examples @@ -29,4 +78,4 @@ This command will also create a tracking file named .extracted in the * [msgpack](https://github.com/Microsoft/vcpkg/blob/master/ports/msgpack/portfile.cmake) ## Source -[scripts/cmake/vcpkg_extract_source_archive.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive.cmake) +[scripts/cmake/vcpkg\_extract\_source\_archive.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive.cmake) diff --git a/docs/maintainers/vcpkg_extract_source_archive_ex.md b/docs/maintainers/vcpkg_extract_source_archive_ex.md index 8f525c3ce579e3..72b45d87cf6a8c 100644 --- a/docs/maintainers/vcpkg_extract_source_archive_ex.md +++ b/docs/maintainers/vcpkg_extract_source_archive_ex.md @@ -1,52 +1,26 @@ # vcpkg_extract_source_archive_ex -Extract an archive into the source directory. Replaces [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md). +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_extract_source_archive_ex.md). + +Extract an archive into the source directory. +Originally replaced [`vcpkg_extract_source_archive()`], +but new ports should instead use the second overload of +[`vcpkg_extract_source_archive()`]. ## Usage ```cmake vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH - ARCHIVE <${ARCHIVE}> - [REF <1.0.0>] - [NO_REMOVE_ONE_LEVEL] - [WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/src>] - [PATCHES ...] + [OUT_SOURCE_PATH ] + ... ) ``` -## Parameters -### OUT_SOURCE_PATH -Specifies the out-variable that will contain the extracted location. - -This should be set to `SOURCE_PATH` by convention. - -### ARCHIVE -The full path to the archive to be extracted. - -This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). - -### REF -A friendly name that will be used instead of the filename of the archive. If more than 10 characters it will be truncated. - -By convention, this is set to the version number or tag fetched - -### WORKING_DIRECTORY -If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. - -Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). - -### PATCHES -A list of patches to be applied to the extracted sources. - -Relative paths are based on the port directory. - -### NO_REMOVE_ONE_LEVEL -Specifies that the default removal of the top level folder should not occur. -## Examples +See the documentation for [`vcpkg_extract_source_archive()`] for other parameters. +Additionally, `vcpkg_extract_source_archive_ex()` adds the `REF` and `WORKING_DIRECTORY` +parameters, which are wrappers around `SOURCE_BASE` and `BASE_DIRECTORY` +respectively. -* [bzip2](https://github.com/Microsoft/vcpkg/blob/master/ports/bzip2/portfile.cmake) -* [sqlite3](https://github.com/Microsoft/vcpkg/blob/master/ports/sqlite3/portfile.cmake) -* [cairo](https://github.com/Microsoft/vcpkg/blob/master/ports/cairo/portfile.cmake) +[`vcpkg_extract_source_archive()`]: vcpkg_extract_source_archive.md ## Source -[scripts/cmake/vcpkg_extract_source_archive_ex.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive_ex.cmake) +[scripts/cmake/vcpkg\_extract\_source\_archive\_ex.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive_ex.cmake) diff --git a/docs/maintainers/vcpkg_fail_port_install.md b/docs/maintainers/vcpkg_fail_port_install.md new file mode 100644 index 00000000000000..f729b19a356891 --- /dev/null +++ b/docs/maintainers/vcpkg_fail_port_install.md @@ -0,0 +1,43 @@ +# vcpkg_fail_port_install + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_fail_port_install.md). + +Checks common requirements and fails the current portfile with a (default) error message + +## Usage +```cmake +vcpkg_fail_port_install( + [ALWAYS] + [MESSAGE <"Reason for failure">] + [ON_TARGET [ ...]] + [ON_ARCH [ ...]] + [ON_CRT_LINKAGE [ ...]]) + [ON_LIBRARY_LINKAGE [ ...]] +) +``` + +## Parameters +### MESSAGE +Additional failure message. If none is given, a default message will be displayed depending on the failure condition. + +### ALWAYS +Will always fail early + +### ON_TARGET +Targets for which the build should fail early. Valid targets are `` from `VCPKG_IS_TARGET_` (see `vcpkg_common_definitions.cmake`). + +### ON_ARCH +Architecture for which the build should fail early. + +### ON_CRT_LINKAGE +CRT linkage for which the build should fail early. + +### ON_LIBRARY_LINKAGE +Library linkage for which the build should fail early. + +## Examples + +* [aws-lambda-cpp](https://github.com/Microsoft/vcpkg/blob/master/ports/aws-lambda-cpp/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_fail\_port\_install.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fail_port_install.cmake) diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md index b868ea418ee602..fe23d4e5dbb79d 100644 --- a/docs/maintainers/vcpkg_find_acquire_program.md +++ b/docs/maintainers/vcpkg_find_acquire_program.md @@ -1,5 +1,7 @@ # vcpkg_find_acquire_program +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_find_acquire_program.md). + Download or find a well-known tool. ## Usage @@ -13,20 +15,29 @@ This variable specifies both the program to be acquired as well as the out param ## Notes The current list of programs includes: -- 7Z -- BISON -- FLEX -- GASPREPROCESSOR -- PERL -- PYTHON2 -- PYTHON3 -- JOM -- MESON -- NASM -- NINJA -- NUGET -- YASM -- ARIA2 (Downloader) +* 7Z +* ARIA2 (Downloader) +* BISON +* CLANG +* DARK +* DOXYGEN +* FLEX +* GASPREPROCESSOR +* GPERF +* PERL +* PYTHON2 +* PYTHON3 +* GIT +* GN +* GO +* JOM +* MESON +* NASM +* NINJA +* NUGET +* SCONS +* SWIG +* YASM Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). @@ -37,4 +48,4 @@ Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_ac * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) ## Source -[scripts/cmake/vcpkg_find_acquire_program.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_acquire_program.cmake) +[scripts/cmake/vcpkg\_find\_acquire\_program.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_acquire_program.cmake) diff --git a/docs/maintainers/vcpkg_find_fortran.md b/docs/maintainers/vcpkg_find_fortran.md new file mode 100644 index 00000000000000..227c1c8372a2a3 --- /dev/null +++ b/docs/maintainers/vcpkg_find_fortran.md @@ -0,0 +1,25 @@ +# vcpkg_find_fortran + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_find_fortran.md). + +Checks if a Fortran compiler can be found. +Windows(x86/x64) Only: If not it will switch/enable MinGW gfortran + and return required cmake args for building. + +## Usage +```cmake +vcpkg_find_fortran() +``` + +## Example +```cmake +vcpkg_find_fortran(fortran_args) +# ... +vcpkg_configure_cmake(... + OPTIONS + ${fortran_args} +) +``` + +## Source +[scripts/cmake/vcpkg\_find\_fortran.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_fortran.cmake) diff --git a/docs/maintainers/vcpkg_fixup_cmake_targets.md b/docs/maintainers/vcpkg_fixup_cmake_targets.md new file mode 100644 index 00000000000000..b9ca9c4d7d3ed6 --- /dev/null +++ b/docs/maintainers/vcpkg_fixup_cmake_targets.md @@ -0,0 +1,62 @@ +# vcpkg_fixup_cmake_targets + +**This function has been deprecated in favor of [`vcpkg_cmake_config_fixup`](ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md) from the vcpkg-cmake-config port.** + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_fixup_cmake_targets.md). + +Merge release and debug CMake targets and configs to support multiconfig generators. + +Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. + +## Usage +```cmake +vcpkg_fixup_cmake_targets([CONFIG_PATH ] + [TARGET_PATH ] + [TOOLS_PATH ] + [DO_NOT_DELETE_PARENT_CONFIG_PATH]) +``` + +## Parameters + +### CONFIG_PATH +Subpath currently containing `*.cmake` files subdirectory (like `lib/cmake/${PORT}`). Should be relative to `${CURRENT_PACKAGES_DIR}`. + +Defaults to `share/${PORT}`. + +### TARGET_PATH +Subpath to which the above `*.cmake` files should be moved. Should be relative to `${CURRENT_PACKAGES_DIR}`. +This needs to be specified if the port name differs from the `find_package()` name. + +Defaults to `share/${PORT}`. + +### DO_NOT_DELETE_PARENT_CONFIG_PATH +By default the parent directory of CONFIG_PATH is removed if it is named "cmake". +Passing this option disable such behavior, as it is convenient for ports that install +more than one CMake package configuration file. + +### NO_PREFIX_CORRECTION +Disables the correction of_IMPORT_PREFIX done by vcpkg due to moving the targets. +Currently the correction does not take into account how the files are moved and applies +I rather simply correction which in some cases will yield the wrong results. + +### TOOLS_PATH +Define the base path to tools. Default: `tools/` + +## Notes +Transform all `/debug//*targets-debug.cmake` files and move them to `/`. +Removes all `/debug//*targets.cmake` and `/debug//*config.cmake`. + +Transform all references matching `/bin/*.exe` to `/${TOOLS_PATH}/*.exe` on Windows. +Transform all references matching `/bin/*` to `/${TOOLS_PATH}/*` on other platforms. + +Fix `${_IMPORT_PREFIX}` in auto generated targets to be one folder deeper. +Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. + +## Examples + +* [concurrentqueue](https://github.com/Microsoft/vcpkg/blob/master/ports/concurrentqueue/portfile.cmake) +* [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake) +* [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_fixup\_cmake\_targets.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_cmake_targets.cmake) diff --git a/docs/maintainers/vcpkg_fixup_pkgconfig.md b/docs/maintainers/vcpkg_fixup_pkgconfig.md new file mode 100644 index 00000000000000..e94453d7298489 --- /dev/null +++ b/docs/maintainers/vcpkg_fixup_pkgconfig.md @@ -0,0 +1,49 @@ +# vcpkg_fixup_pkgconfig + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_fixup_pkgconfig.md). + +Fix common paths in *.pc files and make everything relative to $(prefix). +Additionally, on static triplets, private entries are merged with their non-private counterparts, +allowing pkg-config to be called without the ``--static`` flag. +Note that vcpkg is designed to never have to call pkg-config with the ``--static`` flag, +since a consumer cannot know if a dependent library has been built statically or not. + +## Usage +```cmake +vcpkg_fixup_pkgconfig( + [RELEASE_FILES ...] + [DEBUG_FILES ...] + [SKIP_CHECK] +) +``` + +## Parameters +### RELEASE_FILES +Specifies a list of files to apply the fixes for release paths. +Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR} without ${CURRENT_PACKAGES_DIR}/debug/ + +### DEBUG_FILES +Specifies a list of files to apply the fixes for debug paths. +Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR}/debug/ + +### SKIP_CHECK +Skips the library checks in vcpkg_fixup_pkgconfig. Only use if the script itself has unhandled cases. + +### SYSTEM_PACKAGES (deprecated) +This argument has been deprecated and has no effect. + +### SYSTEM_LIBRARIES (deprecated) +This argument has been deprecated and has no effect. + +### IGNORE_FLAGS (deprecated) +This argument has been deprecated and has no effect. + +## Notes +Still work in progress. If there are more cases which can be handled here feel free to add them + +## Examples + +* [brotli](https://github.com/Microsoft/vcpkg/blob/master/ports/brotli/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_fixup\_pkgconfig.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_pkgconfig.cmake) diff --git a/docs/maintainers/vcpkg_from_bitbucket.md b/docs/maintainers/vcpkg_from_bitbucket.md index 7e699f8eadf6e5..944d7769c9bfe3 100644 --- a/docs/maintainers/vcpkg_from_bitbucket.md +++ b/docs/maintainers/vcpkg_from_bitbucket.md @@ -1,7 +1,8 @@ # vcpkg_from_bitbucket +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_bitbucket.md). + Download and extract a project from Bitbucket. -Enables support for installing HEAD `vcpkg.exe install --head `. ## Usage: ```cmake @@ -34,7 +35,7 @@ If `REF` is specified, `SHA512` must also be specified. ### SHA512 The SHA512 hash that should match the archive (https://bitbucket.com/${REPO}/get/${REF}.tar.gz). -This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. ### HEAD_REF The unstable git commit-ish (ideally a branch) to pull for `--head` builds. @@ -56,4 +57,4 @@ This exports the `VCPKG_HEAD_VERSION` variable during head builds. * [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake) ## Source -[scripts/cmake/vcpkg_from_bitbucket.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_bitbucket.cmake) +[scripts/cmake/vcpkg\_from\_bitbucket.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_bitbucket.cmake) diff --git a/docs/maintainers/vcpkg_from_git.md b/docs/maintainers/vcpkg_from_git.md index 4b9a26c6211c36..de56c605459801 100644 --- a/docs/maintainers/vcpkg_from_git.md +++ b/docs/maintainers/vcpkg_from_git.md @@ -1,5 +1,7 @@ # vcpkg_from_git +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_git.md). + Download and extract a project from git ## Usage: @@ -8,6 +10,7 @@ vcpkg_from_git( OUT_SOURCE_PATH URL REF <59f7335e4d...> + [HEAD_REF ] [PATCHES ...] ) ``` @@ -19,11 +22,21 @@ Specifies the out-variable that will contain the extracted location. This should be set to `SOURCE_PATH` by convention. ### URL -The url of the git repository. Must start with `https`. +The url of the git repository. ### REF The git sha of the commit to download. +### FETCH_REF +The git branch to fetch in non-HEAD mode. After this is fetched, +then `REF` is checked out. This is useful in cases where the git server +does not allow checking out non-advertised objects. + +### HEAD_REF +The git branch to use when the package is requested to be built from the latest sources. + +Example: `main`, `develop`, `HEAD` + ### PATCHES A list of patches to be applied to the extracted sources. @@ -37,4 +50,4 @@ Relative paths are based on the port directory. * [fdlibm](https://github.com/Microsoft/vcpkg/blob/master/ports/fdlibm/portfile.cmake) ## Source -[scripts/cmake/vcpkg_from_git.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_git.cmake) +[scripts/cmake/vcpkg\_from\_git.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_git.cmake) diff --git a/docs/maintainers/vcpkg_from_github.md b/docs/maintainers/vcpkg_from_github.md index 8f9731629d9272..52ef5cbd99dd37 100644 --- a/docs/maintainers/vcpkg_from_github.md +++ b/docs/maintainers/vcpkg_from_github.md @@ -1,5 +1,7 @@ # vcpkg_from_github +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_github.md). + Download and extract a project from GitHub. Enables support for `install --head`. ## Usage: @@ -11,6 +13,9 @@ vcpkg_from_github( [SHA512 <45d0d7f8cc350...>] [HEAD_REF ] [PATCHES ...] + [GITHUB_HOST ] + [AUTHORIZATION_TOKEN <${SECRET_FROM_FILE}>] + [FILE_DISAMBIGUATOR ] ) ``` @@ -33,7 +38,7 @@ If `REF` is specified, `SHA512` must also be specified. ### SHA512 The SHA512 hash that should match the archive (https://github.com/${REPO}/archive/${REF}.tar.gz). -This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. ### HEAD_REF The unstable git commit-ish (ideally a branch) to pull for `--head` builds. @@ -45,6 +50,17 @@ A list of patches to be applied to the extracted sources. Relative paths are based on the port directory. +### GITHUB_HOST +A replacement host for enterprise GitHub instances. + +This field should contain the scheme, host, and port of the desired URL without a trailing slash. + +### AUTHORIZATION_TOKEN +A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}". + +### FILE_DISAMBIGUATOR +A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name. + ## Notes: At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. @@ -54,7 +70,7 @@ This exports the `VCPKG_HEAD_VERSION` variable during head builds. * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) * [ms-gsl](https://github.com/Microsoft/vcpkg/blob/master/ports/ms-gsl/portfile.cmake) -* [beast](https://github.com/Microsoft/vcpkg/blob/master/ports/beast/portfile.cmake) +* [boost-beast](https://github.com/Microsoft/vcpkg/blob/master/ports/boost-beast/portfile.cmake) ## Source -[scripts/cmake/vcpkg_from_github.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_github.cmake) +[scripts/cmake/vcpkg\_from\_github.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_github.cmake) diff --git a/docs/maintainers/vcpkg_from_gitlab.md b/docs/maintainers/vcpkg_from_gitlab.md index fe75ecf9356cff..b49453da40d5ed 100644 --- a/docs/maintainers/vcpkg_from_gitlab.md +++ b/docs/maintainers/vcpkg_from_gitlab.md @@ -1,5 +1,7 @@ # vcpkg_from_gitlab +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_gitlab.md). + Download and extract a project from Gitlab instances. Enables support for `install --head`. ## Usage: @@ -12,6 +14,7 @@ vcpkg_from_gitlab( [SHA512 <45d0d7f8cc350...>] [HEAD_REF ] [PATCHES ...] + [FILE_DISAMBIGUATOR ] ) ``` @@ -39,7 +42,7 @@ If `REF` is specified, `SHA512` must also be specified. The SHA512 hash that should match the archive (${GITLAB_URL}/${REPO}/-/archive/${REF}/${REPO_NAME}-${REF}.tar.gz). The REPO_NAME variable is parsed from the value of REPO. -This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. ### HEAD_REF The unstable git commit-ish (ideally a branch) to pull for `--head` builds. @@ -51,6 +54,9 @@ A list of patches to be applied to the extracted sources. Relative paths are based on the port directory. +### FILE_DISAMBIGUATOR +A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name. + ## Notes: At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. @@ -61,6 +67,5 @@ This exports the `VCPKG_HEAD_VERSION` variable during head builds. * [folly](https://github.com/Microsoft/vcpkg/blob/master/ports/folly/portfile.cmake#L15) * [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) - ## Source -[scripts/cmake/vcpkg_from_gitlab.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_gitlab.cmake) +[scripts/cmake/vcpkg\_from\_gitlab.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_gitlab.cmake) diff --git a/docs/maintainers/vcpkg_from_sourceforge.md b/docs/maintainers/vcpkg_from_sourceforge.md new file mode 100644 index 00000000000000..88379a8e21bae6 --- /dev/null +++ b/docs/maintainers/vcpkg_from_sourceforge.md @@ -0,0 +1,73 @@ +# vcpkg_from_sourceforge + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_from_sourceforge.md). + +Download and extract a project from sourceforge. + +This function automatically checks a set of sourceforge mirrors. +Additional mirrors can be injected through the `VCPKG_SOURCEFORGE_EXTRA_MIRRORS` +list variable in the triplet. + +## Usage: +```cmake +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO + [REF <2.1-3>] + SHA512 <547b417109332...> + FILENAME + [DISABLE_SSL] + [NO_REMOVE_ONE_LEVEL] + [PATCHES ...] +) +``` + +## Parameters: +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### REPO +The organization or user and repository (optional) on sourceforge. + +### REF +A stable version number that will not change contents. + +### FILENAME +The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. + +For example, we can get the download link: +https://sourceforge.net/settings/mirror_choices?projectname=mad&filename=libmad/0.15.1b/libmad-0.15.1b.tar.gz&selected=nchc +So the REPO is `mad/libmad`, the REF is `0.15.1b`, and the FILENAME is `libmad-0.15.1b.tar.gz` + +For some special links: +https://sourceforge.net/settings/mirror_choices?projectname=soxr&filename=soxr-0.1.3-Source.tar.xz&selected=nchc +The REPO is `soxr`, REF is not exist, and the FILENAME is `soxr-0.1.3-Source.tar.xz` + +### SHA512 +The SHA512 hash that should match the archive. + +This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. + +### WORKING_DIRECTORY +If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. + +Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). + +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + +### NO_REMOVE_ONE_LEVEL +Specifies that the default removal of the top level folder should not occur. + +## Examples: + +* [cunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cunit/portfile.cmake) +* [polyclipping](https://github.com/Microsoft/vcpkg/blob/master/ports/polyclipping/portfile.cmake) +* [tinyfiledialogs](https://github.com/Microsoft/vcpkg/blob/master/ports/tinyfiledialogs/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_from\_sourceforge.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_sourceforge.cmake) diff --git a/docs/maintainers/vcpkg_get_program_files_platform_bitness.md b/docs/maintainers/vcpkg_get_program_files_platform_bitness.md new file mode 100644 index 00000000000000..ed74869b805ef5 --- /dev/null +++ b/docs/maintainers/vcpkg_get_program_files_platform_bitness.md @@ -0,0 +1,15 @@ +# vcpkg_get_program_files_platform_bitness + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_get_program_files_platform_bitness.md). + +Get the Program Files directory of the current platform's bitness: +either `$ENV{ProgramW6432}` on 64-bit windows, +or `$ENV{PROGRAMFILES}` on 32-bit windows. + +## Usage: +```cmake +vcpkg_get_program_files_platform_bitness() +``` + +## Source +[scripts/cmake/vcpkg\_get\_program\_files\_platform\_bitness.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake) diff --git a/docs/maintainers/vcpkg_get_windows_sdk.md b/docs/maintainers/vcpkg_get_windows_sdk.md new file mode 100644 index 00000000000000..d3a3ee81757087 --- /dev/null +++ b/docs/maintainers/vcpkg_get_windows_sdk.md @@ -0,0 +1,13 @@ +# vcpkg_get_windows_sdk + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_get_windows_sdk.md). + +Get the Windows SDK number. + +## Usage: +```cmake +vcpkg_get_windows_sdk() +``` + +## Source +[scripts/cmake/vcpkg\_get\_windows\_sdk.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_get_windows_sdk.cmake) diff --git a/docs/maintainers/vcpkg_install_cmake.md b/docs/maintainers/vcpkg_install_cmake.md index 1b132b4f15db85..f8d3b6107b9bfb 100644 --- a/docs/maintainers/vcpkg_install_cmake.md +++ b/docs/maintainers/vcpkg_install_cmake.md @@ -1,5 +1,9 @@ # vcpkg_install_cmake +**This function has been deprecated in favor of [`vcpkg_cmake_install`](ports/vcpkg-cmake/vcpkg_cmake_install.md) from the vcpkg-cmake port.** + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_cmake.md). + Build and install a cmake project. ## Usage: @@ -22,4 +26,4 @@ parameter. * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) ## Source -[scripts/cmake/vcpkg_install_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_cmake.cmake) +[scripts/cmake/vcpkg\_install\_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_cmake.cmake) diff --git a/docs/maintainers/vcpkg_install_gn.md b/docs/maintainers/vcpkg_install_gn.md new file mode 100644 index 00000000000000..a0134b4a1531cb --- /dev/null +++ b/docs/maintainers/vcpkg_install_gn.md @@ -0,0 +1,29 @@ +# vcpkg_install_gn + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_gn.md). + +Installs a GN project. + +In order to build a GN project without installing, use [`vcpkg_build_ninja()`]. + +## Usage: +```cmake +vcpkg_install_gn( + SOURCE_PATH + [TARGETS ...] +) +``` + +## Parameters: +### SOURCE_PATH +The path to the source directory + +### TARGETS +Only install the specified targets. + +Note: includes must be handled separately + +[`vcpkg_build_ninja()`]: vcpkg_build_ninja.md + +## Source +[scripts/cmake/vcpkg\_install\_gn.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_gn.cmake) diff --git a/docs/maintainers/vcpkg_install_make.md b/docs/maintainers/vcpkg_install_make.md new file mode 100644 index 00000000000000..19f4b5ca8f1e3b --- /dev/null +++ b/docs/maintainers/vcpkg_install_make.md @@ -0,0 +1,26 @@ +# vcpkg_install_make + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_make.md). + +Build and install a make project. + +## Usage: +```cmake +vcpkg_install_make(...) +``` + +## Parameters: +See [`vcpkg_build_make()`](vcpkg_build_make.md). + +## Notes: +This command transparently forwards to [`vcpkg_build_make()`](vcpkg_build_make.md), adding `ENABLE_INSTALL` + +## Examples + +* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake) +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +* [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_install\_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_make.cmake) diff --git a/docs/maintainers/vcpkg_install_meson.md b/docs/maintainers/vcpkg_install_meson.md new file mode 100644 index 00000000000000..dcda9fb32a8e8a --- /dev/null +++ b/docs/maintainers/vcpkg_install_meson.md @@ -0,0 +1,22 @@ +# vcpkg_install_meson + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_meson.md). + +Builds a meson project previously configured with `vcpkg_configure_meson()`. + +## Usage +```cmake +vcpkg_install_meson([ADD_BIN_TO_PATH]) +``` + +## Parameters: +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + +## Examples + +* [fribidi](https://github.com/Microsoft/vcpkg/blob/master/ports/fribidi/portfile.cmake) +* [libepoxy](https://github.com/Microsoft/vcpkg/blob/master/ports/libepoxy/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_install\_meson.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_meson.cmake) diff --git a/docs/maintainers/vcpkg_install_msbuild.md b/docs/maintainers/vcpkg_install_msbuild.md index 46a92ddf75f408..8d0a31051aeff5 100644 --- a/docs/maintainers/vcpkg_install_msbuild.md +++ b/docs/maintainers/vcpkg_install_msbuild.md @@ -1,5 +1,7 @@ # vcpkg_install_msbuild +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_msbuild.md). + Build and install a msbuild-based project. This replaces `vcpkg_build_msbuild()`. ## Usage @@ -86,8 +88,8 @@ Additional options passed to msbuild for Debug builds. These are in addition to ## Examples -* [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) -* [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) +* [libirecovery](https://github.com/Microsoft/vcpkg/blob/master/ports/libirecovery/portfile.cmake) +* [libfabric](https://github.com/Microsoft/vcpkg/blob/master/ports/libfabric/portfile.cmake) ## Source -[scripts/cmake/vcpkg_install_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_msbuild.cmake) +[scripts/cmake/vcpkg\_install\_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_msbuild.cmake) diff --git a/docs/maintainers/vcpkg_install_nmake.md b/docs/maintainers/vcpkg_install_nmake.md new file mode 100644 index 00000000000000..9ac942ef2c3357 --- /dev/null +++ b/docs/maintainers/vcpkg_install_nmake.md @@ -0,0 +1,68 @@ +# vcpkg_install_nmake + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_nmake.md). + +Build and install a msvc makefile project. + +## Usage: +```cmake +vcpkg_install_nmake( + SOURCE_PATH <${SOURCE_PATH}> + [NO_DEBUG] + [TARGET ] + PROJECT_SUBPATH <${SUBPATH}> + PROJECT_NAME <${MAKEFILE_NAME}> + [PRERUN_SHELL <${SHELL_PATH}>] + [PRERUN_SHELL_DEBUG <${SHELL_PATH}>] + [PRERUN_SHELL_RELEASE <${SHELL_PATH}>] + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the source files. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PROJECT_SUBPATH +Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile. + +### PROJECT_NAME +Specifies the name of msvc makefile name. +Default is makefile.vc + +### NO_DEBUG +This port doesn't support debug mode. + +### PRERUN_SHELL +Script that needs to be called before build + +### PRERUN_SHELL_DEBUG +Script that needs to be called before debug build + +### PRERUN_SHELL_RELEASE +Script that needs to be called before release build + +### OPTIONS +Additional options passed to generate during the generation. + +### OPTIONS_RELEASE +Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`. + +## Parameters: +See [`vcpkg_build_nmake()`](vcpkg_build_nmake.md). + +## Notes: +This command transparently forwards to [`vcpkg_build_nmake()`](vcpkg_build_nmake.md), adding `ENABLE_INSTALL` + +## Examples + +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_install\_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_nmake.cmake) diff --git a/docs/maintainers/vcpkg_install_qmake.md b/docs/maintainers/vcpkg_install_qmake.md new file mode 100644 index 00000000000000..4efc1579485aac --- /dev/null +++ b/docs/maintainers/vcpkg_install_qmake.md @@ -0,0 +1,26 @@ +# vcpkg_install_qmake + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_qmake.md). + +Build and install a qmake project. + +## Usage: +```cmake +vcpkg_install_qmake(...) +``` + +## Parameters: +See [`vcpkg_build_qmake()`](vcpkg_build_qmake.md). + +## Notes: +This command transparently forwards to [`vcpkg_build_qmake()`](vcpkg_build_qmake.md). + +Additionally, this command will copy produced .libs/.dlls/.as/.dylibs/.sos to the appropriate +staging directories. + +## Examples + +* [libqglviewer](https://github.com/Microsoft/vcpkg/blob/master/ports/libqglviewer/portfile.cmake) + +## Source +[scripts/cmake/vcpkg\_install\_qmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_qmake.cmake) diff --git a/docs/maintainers/vcpkg_list.md b/docs/maintainers/vcpkg_list.md new file mode 100644 index 00000000000000..46aa7dabd35f7d --- /dev/null +++ b/docs/maintainers/vcpkg_list.md @@ -0,0 +1,94 @@ +# vcpkg_list + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_list.md). + +A replacement for CMake's `list()` function, which correctly handles elements +with internal semicolons (in other words, escaped semicolons). +Use `vcpkg_list()` instead of `list()` whenever possible. + +```cmake +vcpkg_list(SET [...]) +vcpkg_list( [...]) +``` + +In addition to all of the commands from `list()`, `vcpkg_list` adds +a `vcpkg_list(SET)` command. +This command takes its arguments, escapes them, and then concatenates +them into a list; this should be used instead of `set()` for setting any +list variable. + +Otherwise, the `vcpkg_list()` function is the same as the built-in +`list()` function, with the following restrictions: + +- `GET`, `REMOVE_ITEM`, and `REMOVE_AT` support only one index/value +- `POP_BACK` and `POP_FRONT` do not support getting the value into + another out variable. Use C++ style `GET` then `POP_(BACK|FRONT)`. +- `FILTER` and `TRANSFORM` are unsupported. + +See the [CMake documentation for `list()`](https://cmake.org/cmake/help/latest/command/list.html) +for more information. + +## Notes: Some Weirdnesses + +The most major weirdness is due to `""` pulling double-duty as "list of zero elements", +and "list of one element, which is empty". `vcpkg_list` always uses the former understanding. +This can cause weird behavior, for example: + +```cmake +set(lst "") +vcpkg_list(APPEND lst "" "") +# lst = ";" +``` + +This is because you're appending two elements to the empty list. +One very weird behavior that comes out of this would be: + +```cmake +set(lst "") +vcpkg_list(APPEND lst "") +# lst = "" +``` + +since `""` is the empty list, we append the empty element and end up with a list +of one element, which is empty. This does not happen for non-empty lists; +for example: + +```cmake +set(lst "a") +vcpkg_list(APPEND lst "") +# lst = "a;" +``` + +only the empty list has this odd behavior. + +## Examples + +### Creating a list + +```cmake +vcpkg_list(SET foo_param) +if(DEFINED arg_FOO) + vcpkg_list(SET foo_param FOO "${arg_FOO}") +endif() +``` + +### Appending to a list + +```cmake +set(OPTIONS -DFOO=BAR) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_list(APPEND OPTIONS "-DOS=WINDOWS;FOO") +endif() +``` + +### Popping the end off a list + +```cmake +if(NOT list STREQUAL "") + vcpkg_list(GET list end -1) + vcpkg_list(POP_BACK list) +endif() +``` + +## Source +[scripts/cmake/vcpkg\_list.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_list.cmake) diff --git a/docs/maintainers/vcpkg_minimum_required.md b/docs/maintainers/vcpkg_minimum_required.md new file mode 100644 index 00000000000000..caf975f61e254a --- /dev/null +++ b/docs/maintainers/vcpkg_minimum_required.md @@ -0,0 +1,17 @@ +# vcpkg_minimum_required + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_minimum_required.md). + +Asserts that the version of the vcpkg program being used to build a port is later than the supplied date, inclusive. + +## Usage +```cmake +vcpkg_minimum_required(VERSION 2021-01-13) +``` + +## Parameters +### VERSION +The date-version to check against. + +## Source +[scripts/cmake/vcpkg\_minimum\_required.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_minimum_required.cmake) diff --git a/docs/maintainers/vcpkg_prettify_command.md b/docs/maintainers/vcpkg_prettify_command.md deleted file mode 100644 index 1856e06b4ca603..00000000000000 --- a/docs/maintainers/vcpkg_prettify_command.md +++ /dev/null @@ -1,17 +0,0 @@ -# vcpkg_prettify_command - -Turns list of command arguments into a formatted string. - -## Usage -```cmake -vcpkg_prettify_command() -``` - -## Examples - -* `scripts/cmake/vcpkg_execute_build_process.cmake` -* `scripts/cmake/vcpkg_execute_required_process.cmake` -* `scripts/cmake/vcpkg_execute_required_process_repeat.cmake` - -## Source -[scripts/cmake/vcpkg_prettify_command.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_prettify_command.cmake) diff --git a/docs/maintainers/vcpkg_replace_string.md b/docs/maintainers/vcpkg_replace_string.md new file mode 100644 index 00000000000000..967dd3c01a6137 --- /dev/null +++ b/docs/maintainers/vcpkg_replace_string.md @@ -0,0 +1,12 @@ +# vcpkg_replace_string + +The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_replace_string.md). + +Replace a string in a file. + +```cmake +vcpkg_replace_string( ) +``` + +## Source +[scripts/cmake/vcpkg\_replace\_string.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_replace_string.cmake) diff --git a/docs/maintainers/vcpkg_test_cmake.md b/docs/maintainers/vcpkg_test_cmake.md deleted file mode 100644 index 15b3ad797b2ad9..00000000000000 --- a/docs/maintainers/vcpkg_test_cmake.md +++ /dev/null @@ -1,20 +0,0 @@ -# vcpkg_test_cmake - -Tests a built package for CMake `find_package()` integration. - -## Usage: -```cmake -vcpkg_test_cmake(PACKAGE_NAME [MODULE]) -``` - -## Parameters: - -### PACKAGE_NAME -The expected name to find with `find_package()`. - -### MODULE -Indicates that the library expects to be found via built-in CMake targets. - - -## Source -[scripts/cmake/vcpkg_test_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_test_cmake.cmake) diff --git a/docs/regenerate.ps1 b/docs/regenerate.ps1 old mode 100644 new mode 100755 index abb91af6113ba6..f2f888a770046a --- a/docs/regenerate.ps1 +++ b/docs/regenerate.ps1 @@ -1,27 +1,353 @@ -Param([string]$VcpkgRoot = "") +#! /usr/bin/env pwsh -$ErrorActionPreference = "Stop" +[CmdletBinding()] +Param( + [String]$VcpkgRoot = '' +) -if (!$VcpkgRoot) { - $VcpkgRoot = ".." +if ([String]::IsNullOrEmpty($VcpkgRoot)) { + $VcpkgRoot = "${PSScriptRoot}/.." } $VcpkgRoot = Resolve-Path $VcpkgRoot -if (!(Test-Path "$VcpkgRoot\.vcpkg-root")) { +if (-not (Test-Path "$VcpkgRoot/.vcpkg-root")) { throw "Invalid vcpkg instance, did you forget -VcpkgRoot?" } -Set-Content -Path "$PSScriptRoot\maintainers\portfile-functions.md" -Value "`n`n# Portfile helper functions" +class CMakeDocumentation { + [String]$Filename + [String[]]$ActualDocumentation + [Bool]$IsDeprecated + [String]$DeprecationMessage + [String]$DeprecatedByName + [String]$DeprecatedByPath + [Bool]$HasError +} + +[String[]]$cmakeScriptsPorts = @( + 'vcpkg-cmake' + 'vcpkg-cmake-config' + 'vcpkg-pkgconfig-get-modules' +) + +[CMakeDocumentation[]]$tableOfContents = @() +[CMakeDocumentation[]]$internalTableOfContents = @() +$portTableOfContents = [ordered]@{} + +function RelativeUnixPathTo +{ + Param( + [Parameter(Mandatory)] + [String]$Path, + [Parameter(Mandatory)] + [String]$Base + ) + + $Path = Resolve-Path -LiteralPath $Path + $Base = Resolve-Path -LiteralPath $Base + + if ($IsWindows) + { + if ((Split-Path -Qualifier $Path) -ne (Split-Path -Qualifier $Base)) + { + throw "It is not possible to get the relative unix path from $Base to $Path" + } + } + + $Path = $Path -replace '\\','/' + $Base = $Base -replace '\\','/' + + [String[]]$PathArray = $Path -split '/' + [String[]]$BaseArray = $Base -split '/' -ls "$VcpkgRoot\scripts\cmake\*.cmake" | % { - $contents = Get-Content $_ ` - | ? { $_ -match "^## |^##`$" } ` - | % { $_ -replace "^## ?","" } + [String[]]$Result = @() - if ($contents) { - Set-Content -Path "$PSScriptRoot\maintainers\$($_.BaseName).md" -Value "$($contents -join "`n")`n`n## Source`n[scripts/cmake/$($_.Name)](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/$($_.Name))" - "- [$($_.BaseName -replace "_","\_")]($($_.BaseName).md)" ` - | Out-File -Enc Ascii -Append -FilePath "$PSScriptRoot\maintainers\portfile-functions.md" + $Idx = 0 + + while ($Idx -lt $PathArray.Length -and $Idx -lt $BaseArray.Length) + { + if ($PathArray[$Idx] -ne $BaseArray[$Idx]) + { + break + } + ++$Idx + } + + for ($BaseIdx = $Idx; $BaseIdx -lt $BaseArray.Length; ++$BaseIdx) + { + $Result += '..' } + for ($PathIdx = $Idx; $PathIdx -lt $PathArray.Length; ++$PathIdx) + { + $Result += $PathArray[$PathIdx] + } + + $Result -join '/' } +function WriteFile +{ + Param( + [String[]]$Value, + [String]$Path + ) + # note that we use this method of getting the utf-8 bytes in order to: + # - have no final `r`n, which happens when Set-Content does the thing automatically on Windows + # - have no BOM, which happens when one uses [System.Text.Encoding]::UTF8 + [byte[]]$ValueAsBytes = (New-Object -TypeName 'System.Text.UTF8Encoding').GetBytes($Value -join "`n") + Set-Content -Path $Path -Value $ValueAsBytes -AsByteStream +} +function FinalDocFile +{ + Param( + [CMakeDocumentation]$Docs, + [String]$PathToFile # something like docs/maintainers/blah.md + ) + [String[]]$documentation = @() + + if ($Docs.ActualDocumentation.Length -eq 0) + { + throw "Invalid documentation: empty docs" + } + + $documentation += $Docs.ActualDocumentation[0] # name line + if ($Docs.IsDeprecated) + { + if ($null -eq $Docs.DeprecationMessage -or $Docs.DeprecationMessage -match '^ *$') + { + if(![string]::IsNullOrEmpty($Docs.DeprecatedByName)) + { + $message = " in favor of [``$($Docs.DeprecatedByName)``]($($Docs.DeprecatedByPath)$($Docs.DeprecatedByName).md)" + $Docs.DeprecatedByPath -match '^ports/([a-z\-]+)/$' | Out-Null + $port = $matches[1] + if(![string]::IsNullOrEmpty($port)) + { + $message += " from the $port port." + } + } + $documentation += @("", "**This function has been deprecated$message**") + } + else + { + $documentation += @("", "**This function has been deprecated $($Docs.DeprecationMessage)**") + } + } + $documentation += @("", "The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/$PathToFile).") + + $documentation += $Docs.ActualDocumentation[1..$Docs.ActualDocumentation.Length] + + $relativePath = RelativeUnixPathTo $Docs.Filename $VcpkgRoot + $documentation += @( + "", + "## Source", + "[$($relativePath -replace '_','\_')](https://github.com/Microsoft/vcpkg/blob/master/$relativePath)", + "" + ) + + $documentation +} + +function ParseCmakeDocComment +{ + Param( + [Parameter(Mandatory)] + [System.IO.FileSystemInfo]$Filename + ) + + $Docs = New-Object 'CMakeDocumentation' + $Docs.HasError = $False + $Docs.IsDeprecated = $False + $Docs.Filename = $Filename.FullName + + [String[]]$contents = Get-Content $Filename + + if ($contents[0] -eq '# DEPRECATED') + { + $Docs.IsDeprecated = $True + } + elseif($contents[0] -match '^# DEPRECATED( BY (([^/]+/)+)(.+))?((: *)(.*))?$') + { + $Docs.IsDeprecated = $True + $Docs.DeprecatedByPath = $matches[2] + $Docs.DeprecatedByName = $matches[4] + $Docs.DeprecationMessage = $matches[7] + } + + [String]$startCommentRegex = '#\[(=*)\[' + [String]$endCommentRegex = '' + [Bool]$inComment = $False + + $contents = $contents | ForEach-Object { + if (-not $inComment) { + if ($_ -match "^\s*${startCommentRegex}(\.[a-z]*)?:?\s*$") { + if (-not [String]::IsNullOrEmpty($matches[2]) -and $matches[2] -ne '.md') { + Write-Warning "The documentation in $($Filename.FullName) doesn't seem to be markdown (extension: $($matches[2])). Only markdown is supported; please rewrite the documentation in markdown." + } + $inComment = $True + $endCommentRegex = "\]$($matches[1])\]" + } elseif ($_ -match $startCommentRegex) { + $Docs.HasError = $True + Write-Warning "Invalid start of comment -- the comment start must be at the beginning of the line. + (on line: `"$_`")" + } else { + # do nothing -- we're outside a comment, so cmake code + } + } else { + if ($_ -match "^\s*#?${endCommentRegex}\s*$") { + $inComment = $False + $endCommentRegex = '' + } elseif ($_ -match $endCommentRegex) { + $Docs.HasError = $True + Write-Warning "Invalid end of comment -- the comment end must be on it's own on a line. + (on line: `"$_`")" + } else { + # regular documentation line + $_ + } + } + } + + if ($inComment) { + Write-Warning "File $($Filename.FullName) has an unclosed comment." + $Docs.HasError = $True + } + + if (-not [String]::IsNullOrEmpty($contents)) + { + $Docs.ActualDocumentation = $contents + } + + $Docs +} + +Get-ChildItem "$VcpkgRoot/scripts/cmake" -Filter '*.cmake' | ForEach-Object { + $docs = ParseCmakeDocComment $_ + [Bool]$isInternalFunction = $_.Name.StartsWith("z_vcpkg") + + if ($docs.IsDeprecated -and $null -eq $docs.ActualDocumentation) + { + return + } + if ($docs.HasError) + { + return + } + + if ($null -ne $docs.ActualDocumentation) + { + if ($isInternalFunction) + { + $pathToFile = "maintainers/internal/$($_.BaseName).md" + WriteFile ` + -Path "$PSScriptRoot/$pathToFile" ` + -Value (FinalDocFile $docs) + + $internalTableOfContents += $docs + } + else + { + $pathToFile = "maintainers/$($_.BaseName).md" + WriteFile ` + -Path "$PSScriptRoot/$pathToFile" ` + -Value (FinalDocFile $docs $pathToFile) + + $tableOfContents += $docs + } + } + elseif (-not $isInternalFunction) + { + # don't worry about undocumented internal functions + Write-Warning "The cmake function in file $($_.FullName) doesn't seem to have any documentation. Make sure the documentation comments are correctly written." + } +} + +$cmakeScriptsPorts | ForEach-Object { + $portName = $_ + + Copy-Item "$VcpkgRoot/ports/$portName/README.md" "$PSScriptRoot/maintainers/ports/$portName.md" + New-Item -Path "$PSScriptRoot/maintainers/ports/$portName" -Force -ItemType 'Directory' | Out-Null + + $portTableOfContents[$portName] = @() + + Get-ChildItem "$VcpkgRoot/ports/$portName" -Filter '*.cmake' | ForEach-Object { + if ($_.Name -eq 'vcpkg-port-config.cmake' -or $_.Name -eq 'portfile.cmake') + { + return + } + + $docs = ParseCmakeDocComment $_ + + if ($docs.IsDeprecated -and $null -eq $docs.ActualDocumentation) + { + return + } + if ($docs.HasError) + { + return + } + + if ($null -ne $docs.ActualDocumentation) + { + $pathToFile = "maintainers/ports/$portName/$($_.BaseName).md" + WriteFile ` + -Path "$PSScriptRoot/$pathToFile" ` + -Value (FinalDocFile $docs $pathToFile) + $portTableOfContents[$portName] += $docs + } + else + { + Write-Warning "The cmake function in file $($_.FullName) doesn't seem to have any documentation. Make sure the documentation comments are correctly written." + } + } +} + +$portfileFunctionsContent = @( + '', + '', + '# Portfile helper functions') + +function GetDeprecationMessage +{ + Param( + [CMakeDocumentation]$Doc + ) + $message = '' + if ($Doc.IsDeprecated) + { + $message = " (deprecated" + if(![string]::IsNullOrEmpty($Doc.DeprecatedByName)) + { + $message += ", use [$($($Doc.DeprecatedByName) -replace '_','\_')]($($Doc.DeprecatedByPath)$($Doc.DeprecatedByName).md)" + } + $message += ")" + } + $message +} + +$DocsName = @{ expression = { Split-Path -LeafBase $_.Filename } } +$tableOfContents | Sort-Object -Property $DocsName -Culture '' | ForEach-Object { + $name = Split-Path -LeafBase $_.Filename + $portfileFunctionsContent += "- [$($name -replace '_','\_')]($name.md)" + $(GetDeprecationMessage $_) +} +$portfileFunctionsContent += @("", "## Internal Functions", "") +$internalTableOfContents | Sort-Object -Property $DocsName -Culture '' | ForEach-Object { + $name = Split-Path -LeafBase $_.Filename + $portfileFunctionsContent += "- [$($name -replace '_','\_')](internal/$name.md)" + $(GetDeprecationMessage $_) +} + +$portfileFunctionsContent += @("", "## Scripts from Ports") +$portTableOfContents.GetEnumerator() | ForEach-Object { + $portName = $_.Name + $cmakeDocs = $_.Value + $portfileFunctionsContent += @("", "### [$portName](ports/$portName.md)", "") + $cmakeDocs | ForEach-Object { + $name = Split-Path -LeafBase $_.Filename + $portfileFunctionsContent += "- [$($name -replace '_','\_')](ports/$portName/$name.md)" + $(GetDeprecationMessage $_) + } +} + +$portfileFunctionsContent += "" # final newline + +WriteFile ` + -Path "$PSScriptRoot/maintainers/portfile-functions.md" ` + -Value $portfileFunctionsContent diff --git a/docs/specifications/binarycaching.md b/docs/specifications/binarycaching.md new file mode 100644 index 00000000000000..d9c55d5d140ffb --- /dev/null +++ b/docs/specifications/binarycaching.md @@ -0,0 +1,159 @@ +# Binary Caching v1.1 (Jul 14, 2020) + +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +**Up-to-date documentation is available at [Binarycaching](../users/binarycaching.md).** + +## Motivation + +The primary motivation of binary caching is to accelerate two broad scenarios in an easily accessible way + +- Continuous Integration + +- Developer Environment Changes (first-time or branch change) + +We generally believe both of these scenarios are addressed with the same feature set, however when differences arise they will be discussed in the individual scenarios. + +It should also be explicitly noted that this specification does not intend to propose a "Microsoft Sanctioned Public Binaries Service" such as nuget.org – we only intend to enable users to leverage services they already have access to, such as GitHub, local file shares, Azure Artifacts, etc. + +## Key User Stories + +### CI -> CI + +In this story, a CI build using either persistent or non-persistent machines wants to potentially reuse binaries built in a previous run of the pipeline. This is partially covered by the Cache tasks in GitHub Actions or Azure DevOps Pipelines, however the Cache task is all-or-nothing: a single package change will prevent restoration and require rebuilding the entire graph which is unacceptable in many scenarios (such as if actively developing one of the packages). + +### CI -> Developer + +In this story, the developer wants to reuse binaries built during a CI run. Given appropriate CI coverage, most developers will always have any needed dependencies pre-built by the CI system. + +Notably, this scenario indicates a need for Read/Write access granularity on the remote storage solution. Developers should not need write access to the output from the CI system for security reasons. + +### Single Developer (same machine reuse) + +With the introduction of manifest files, each project will have separate instances of Vcpkg. The performance costs of rebuilding binaries across each cloned project can be debilitating for those working in micro-repos or open source; for the monolithic enterprise developer it is simply frustrating. + +User-wide binary caching alleviates the pain of this scenario by ensuring the same binaries aren’t built multiple times (as long as the projects truly overlap with respect to versions/packages/etc). + +### Developer <-> Developer (multi-machine / team scenario) + +In a small team scenario, it's reasonable that multiple developer machines can trust each other enough to share binaries. This also applies to developers that have multiple machines and wish to share binaries between them (given a similar enough environment). + +## Solution Aspects + +### Tracking Compilers + +In order to provide reliable binary caching, vcpkg must determine if the produced binaries are appropriate for the current context. Currently, we consider many factors, including: + +- All files in the port directory + +- The toolchain file contents + +- The triplet contents + +- All dependency binaries + +- The version of the CMake tool used to build + +and a few others. + +However, we notably do not currently track the compiler used. This is critical for all cross-machine scenarios, as the environment is likely to change incompatibly from machine to machine. We propose hashing the compiler that will used by CMake. This can be accomplished either by reimplementing the logic of CMake or running some partial project and extracting the results. For performance reasons, we will prefer first using heuristics to approximate the CMake logic with accompanying documentation for users that fall outside those bounds. + +Another aspect of the environment we don't currently track is the CRT version on Linux systems. Currently, we believe this will not cause as many problems in most practices (thus not suitable for an MVP), since the compiler will (generally) link against the system CRT and should sufficiently reflect any differences. This can also be easily worked around by the user with documentation – the toolchain file can simply have a comment such as "# this uses muslc", which will cause it to hash differently. + +### Better control over source modifications + +Currently, vcpkg caches sources inside `buildtrees/$PORT/src/`. The built-in helpers, such as `vcpkg_extract_archive_ex()` assume that if the appropriately named source folder exists, it is true, accurate, and without modification. + +However, the basic workflow for working on ports (specifically, developing patches) breaks this assumption by directly editing whatever extracted source directory the tool is currently using until a successful build is achieved. The user then usually builds a patch file from their changes, then checks it in to the port directory (adding the changes to one of the tracked locations above) and everything is restored to normal. + +However, this causes serious issues with the current tracking system, because modifications to this cached source are not detected and tracked into the binary package. + +Our proposed solution is to force source re-extraction each time during builds that have uploading to any protocol enabled. Uploading/downloading can then be disabled on the command line via the --editable switch to reuse extracted sources and enable the current workflow. + +### Protocols + +To service different scenarios and user requirements, we need to support multiple backends. Currently, our CI system uses our only implemented backend: file-based archives. + +#### Backend #1: File-Based Archives + +This backend simply stores .zip files in a hierarchy similar to git objects: `$VCPKG_ROOT/archives/$XX/$YYYY.zip` with `$XX` being the first two characters of the computed package hash, and `$YYYY` being the full expanded hash. It also supports storing failure logs as `$VCPKG_ROOT/archives/fail/$XX/$YYYY.zip`, however we consider this an internal feature that is not relevant to the key User Stories. + +Our CI system uses this backend by symlinking this directory to an Azure Files share, enabling built binaries and failure logs to be shared by all machines in the pool. Credentials are handled at the time of mounting the Azure Files share, so this does not require interactive authentication. + +This protocol is ideal due to simplicity for same-machine reuse and simple serverless scenarios such as using networked SMB folders across multiple machines for very small teams. However, it has three significant limitations in the current incarnation: + +- It uses the hardcoded directory `$VCPKG_ROOT/archives` (redirectable using symlinks, but unwieldy) + +- It cannot use multiple directories + +- There is no ability to treat directories as "read-only"/immutable + +These second two points are required to implement the very useful concept of "fallback" folders (see https://github.com/NuGet/Home/wiki/%5BSpec%5D-Fallback-package-folders for NuGet’s spec on this topic). + +#### Backend #2: NuGet (Azure DevOps Artifacts, GitHub Packages, etc) + +This backend packages binaries into a "raw" NuGet package (not suitable for direct import by MSBuild projects) and uploads them to supported NuGet servers such as Azure DevOps Artifacts and GitHub Packages. We believe this will best satisfy the CI scenarios – both CI -> CI as well as CI -> Developer by relying on powerful, centralized, managed hosting. + +There is a difference in this case between the developer and CI scenarios. The developer generally wants to configure their remotes for the project and then be able to run vcpkg commands as normal, with packages automatically being downloaded and uploaded to optimize the experience. This is similar to File-Based Archives. + +While a CI system could use the same workflow as a developer, there are a few key differences. First, a CI system must use a stored secret for authentication, because it cannot interactively authenticate. Second, to enable more complex interactions with systems such as package signing and task-based restores, we must also support a 4-step workflow: + +1. Vcpkg computes hashes of any potentially required packages and writes them to a file + +2. An unspecified service/task/etc can parse this file and download any appropriate packages + +3. vcpkg is then invoked a second time, with any downloaded packages. This consumes the packages, performs any installations and builds, and potentially produces new packages to an output folder. + +4. Finally, another unspecified service/task/etc can take these output packages, sign them, and upload them. + +This flow enables arbitrarily complex, user-defined authentication and signing schemes, such as the tasks provided by GitHub Actions and Azure DevOps Pipelines or manual signing as documented in the NuGet documentation: https://docs.microsoft.com/en-us/nuget/create-packages/sign-a-package. + +#### Configuration + +Currently, our file-based backend is enabled by passing the undocumented `--binarycaching` flag to any Vcpkg command or setting the undocumented environment variable `VCPKG_FEATURE_FLAGS` to `binarycaching`. We will replace this feature flag with an on-by-default user-wide behavior, plus command line and environment-based configurability. + +The on-by-default configuration will specify the file-based archive protocol on either `%LOCALAPPDATA%/vcpkg/archives` (Windows) or `$XDG_CACHE_HOME/vcpkg/archives` (Unix). If `XDG_CACHE_HOME` is not defined on Unix, we will fall back to `$HOME/.cache/vcpkg/archives` based on the [XDG Base Directory Specification][1]. This can be redirected with a symlink, or completely overridden with the command line or environment. In the future we can also consider having a user-wide configuration file, however we do not believe this is important for any of our key scenarios. + +On the command line, a backend can be specified via `--binarysource=`. Multiple backends can be specified by passing the option multiple times and the order of evaluation is determined by the order on the command line. Writes will be performed on all upload backends, but only for packages that were built as part of this build (the tool will not repackage/reupload binaries downloaded from other sources). + +The environment variable `VCPKG_BINARY_SOURCES` can be set to a semicolon-delimited list of ``. Empty `` strings are valid and ignored, to support appending like `set VCPKG_BINARY_SOURCES=%VCPKG_BINARY_SOURCES%;foo` or `export VCPKG_BINARY_SOURCES="$VCPKG_BINARY_SOURCES;foo"` + +`` can be any of: + +- `clear` - ignore all lower priority sources (lowest priority is default, then env, then command line) + +- `default[,]` - Reintroduce the default ~/.vcpkg/packages (as read-only or with uploading) + +- `files,[,]` - Add a file-based archive at `` + +- `nuget,[,]` - Add a nuget-based source at ``. This url has a similar semantic as `nuget.exe restore -source ` for reads and `nuget.exe push -source ` for writes; notably it can also be a local path. + +- `nugetconfig,[,]` - Add a nuget-based source using the NuGet.config file at ``. This enables users to fully control NuGet's execution in combination with the documented NuGet environment variables. This has similar semantics to `nuget.exe push -ConfigFile ` and `nuget.exe restore -ConfigFile `. + +- `interactive` - Enables interactive mode (such as manual credential entry) for all other configured backends. + +`` can be any of `read`, `write`, or `readwrite` to control whether packages will be consumed or published. + +Backtick (`) can be used as an escape character within config strings, with double backtick (``) inserting a single backtick. All paths must be absolute. + +For all backends, noninteractive operation will be the default and the vcpkg tool will take a `--interactive` parameter to enable prompting for user credentials (if needed by the backend). + +To enable the 4-step flow, `vcpkg install` will take a command `--write-nuget-packages-config=` which can be used in combination with `--dry-run`. This path can be relative and will resolve with respect to the current working directory. + +[1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html + +#### Example 4-step flow + +``` +PS> vcpkg install --dry-run pkg1 pkg2 pkg3 --write-nuget-packages-config=packages.config +``` + +An unspecified process, such as `nuget.exe restore packages.config -packagedirectory $packages` or the [ADO task][2], restores the packages to `$packages`. + +``` +PS> vcpkg install pkg1 pkg2 pkg3 --binarysource=clear --binarysource=nuget,$outpkgs,upload --binarysource=nuget,$packages +``` + +Another unspecified process such as `nuget.exe sign $outpkgs/*.nupkg` and `nuget.exe push $outpkgs/*.nupkg` or the ADO task uploads the packages for use in future CI runs. + +[2]: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/nuget?view=azure-devops diff --git a/docs/specifications/export-command.md b/docs/specifications/export-command.md index 4111bfed44b531..5464e9408d5783 100644 --- a/docs/specifications/export-command.md +++ b/docs/specifications/export-command.md @@ -1,5 +1,7 @@ # Binary Export (Apr 28, 2017) +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + ## 1. Motivation ### A. Build once and share diff --git a/docs/specifications/feature-packages.md b/docs/specifications/feature-packages.md index 81afba0807c04a..5737c650a64dd7 100644 --- a/docs/specifications/feature-packages.md +++ b/docs/specifications/feature-packages.md @@ -1,6 +1,8 @@ # Proposal: Features / Feature packages (Feb 23 2017) -**Note: this is the proposal as it was initially accepted and does not necessarily reflect the current behavior.** +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +**Up-to-date documentation is available at [Selecting Library Features](../users/selecting-library-features.md).** ## 1. Motivation diff --git a/docs/specifications/manifests.md b/docs/specifications/manifests.md new file mode 100644 index 00000000000000..91acfea58a7888 --- /dev/null +++ b/docs/specifications/manifests.md @@ -0,0 +1,302 @@ +# Manifests -- `vcpkg.json` + +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +**Up-to-date documentation is available at [Manifests](../users/manifests.md).** + +For many other language package managers, there exists a way of writing one's dependencies in a declarative +manifest format; we want something similar for vcpkg. What follows is the specification of that feature; +this should mean that vcpkg becomes far more user and enterprise-friendly, and is additionally an important +first step for versioning and package federation. Our primary concern, beyond implementability, is ease-of-use; +it is important that using this feature is all of: + +* Easy for existing users +* Easy for new users to set up +* Easy to extend later for new features like versioning and federation +* _Declarative_, not _Imperative_. + +## Reasoning + +### Why JSON? + +We choose JSON for five main reasons: + +* Everybody knows JSON, and if one doesn't, it's really easy to learn +* Every tool supports JSON in the standard library, or in a commonly used support library + * This means writing tooling should be trivial in any language one is comfortable with + * Most configuration formats don't have a COBOL implementation 😉 +* Specified in an international standard + * There is _one_ right way to parse JSON + * There are no ambiguities of what the parse tree _should_ be +* Simple and secure + * Unlike YAML, for example, there's no weird ACE issues + * Easy to write a parser -- important since we can't depend on external libraries +* Schemas are almost a necessity + +Some have suggested allowing comments or commas in our parser; we chose to use JSON proper +rather than JSON5 or JSON with comments because JSON is the everywhere-supported international +standard. That is not necessarily true of JSON with comments. Additionally, if one needs +to write a comment, they can do so via `"$reason"` or `"$comment"` fields. + +## Specification + +A manifest file shall have the name `vcpkg.json`, and shall be in the root directory of a package. +It also replaces CONTROL files, though existing CONTROL files will still be +supported; there will be no difference between ports and packages, except +that packages do not need to supply portfile.cmake (eventually we would like +to remove the requirement of portfile.cmake for ports that already use +CMake). + +The specification uses definitions from the [Definitions](#definitions) section in order +to specify the shape of a value. Note that any object may contain any directives, written as +a field key that starts with a `$`; these directive shall be ignored by `vcpkg`. Common +directives may include `"$schema"`, `"$comment"`, `"$reason"`. + +A manifest must be a top-level object, and must have at least: + +* `"name"`: a `` +* One (and only one) of the following version fields: + * `"version-string"`: A `string`. Has no semantic meaning. + Equivalent to `CONTROL`'s `Version:` field. + * Other version fields will be defined by the Versions RFC + +The simplest vcpkg.json looks like this: + +```json +{ + "name": "mypackage", + "version-string": "0.1.0-dev" +} +``` + +Additionally, it may contain the following properties: +* `"port-version"`: A non-negative integer. If this field doesn't exist, it's assumed to be `0`. + * Note that this is a change from existing CONTROL files, where versions were a part of the version string +* `"maintainers"`: An array of `string`s which contain the authors of a package + * `"maintainers": [ "Nicole Mazzuca ", "×©×œ×•× ×¢×œ×™×›× " ]` +* `"description"`: A string or array of strings containing the description of a package + * `"description": "mypackage is a package of mine"` +* `"homepage"`: A url which points to the homepage of a package + * `"homepage": "https://github.com/strega-nil/mypackage"` +* `"documentation"`: A url which points to the documentation of a package + * `"documentation": "https://readthedocs.io/strega-nil/mypackage"` +* `"license"`: A `` + * `"license": "MIT"` +* `"dependencies"`: An array of ``s +* `"dev-dependencies"`: An array of ``s which are required only for developers (testing and the like) +* `"features"`: An array of ``s that the package supports +* `"default-features"`: An array of ``s that correspond to features, which will be used by default. +* `"supports"`: A `` + * `"supports": "windows & !arm"` + +Any properties which are not listed, and which do not start with a `$`, +will be warned against and are reserved for future use. + +The following is an example of an existing port CONTROL file rewritten as a vcpkg.json file: + +``` +Source: pango +Version: 1.40.11-6 +Homepage: https://ftp.gnome.org/pub/GNOME/sources/pango/ +Description: Text and font handling library. +Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz[glib] (!(windows&static)&!osx) +``` + +```json +{ + "name": "pango", + "version-string": "1.40.11", + "port-version": 6, + "homepage": "https://ftp.gnome.org/pub/GNOME/sources/pango/", + "description": "Text and font handling library.", + "dependencies": [ + "glib", + "gettext", + "cairo", + "fontconfig", + "freetype", + { + "name": "harfbuzz", + "features": [ "glib" ], + "platform": "!(windows & static) & !osx" + } + ] +} +``` + +## Behavior of the Tool + +There will be two "modes" for vcpkg from this point forward: "classic", and "manifest". +The former will act exactly like the existing vcpkg workflow, so as to avoid breaking +anyone. The latter will be the mode only when the user either: + +* Passes `--manifest-root=` (initially, `x-manifest-root`) +* Runs `vcpkg` in a directory that contains a file named `vcpkg.json`, or in a + child directory of a directory containing `vcpkg.json`. + * For this, initially vcpkg will warn that the behavior will change in the + future, and simply run in classic mode, unless the feature flag `manifests` is + passed via: + * The environment variable `VCPKG_FEATURE_FLAGS` + * The option `--feature-flags` + * (e.g., `--feature-flags=binarycaching,manifests`) + * If someone wants to use classic mode and silence the warning, they can add the + `-manifests` feature flag to disable the mode. + +When in "manifest" mode, the `installed` directory will be changed to +`/vcpkg_installed` (name up for bikeshedding). +The following commands will change behavior: + +* `vcpkg install` without any port arguments will install the dependencies listed in + the manifest file, and will remove any dependencies + which are no longer in the dependency tree implied by the manifest file. +* `vcpkg install` with port arguments will give an error. + +The following commands will not work in manifest mode, at least initially: + +* `vcpkg x-set-installed`: `vcpkg install` serves the same function +* `vcpkg remove` +* `vcpkg export` + +We may add these features back for manifest mode once we understand how best to +implement them. + +### Behavior of the Toolchain + +Mostly, the toolchain file stays the same; however, we shall add +two public options: + +```cmake +VCPKG_MANIFEST_MODE:BOOL= +VCPKG_MANIFEST_INSTALL:BOOL=ON +``` + +The first option either explicitly turns on, or off, manifest mode; +otherwise, we default to looking for a manifest file in the directory +tree upwards from the source directory. + +The `VCPKG_MANIFEST_INSTALL` option tells the toolchain whether to +install the packages or not -- if you wish to install the manifest +dependencies manually, you can set this to off, and we also turn it +off for packages installed by vcpkg. + +Additionally, if `-manifests` is set in the feature flags environment +variable, we turn off manifest mode in the toolchain, and we act like +the classic toolchain. + +### Example - CMake Integration + +An example of using the new vcpkg manifests feature for a new +project follows: + +The filesystem structure should look something like: + +``` +example/ + src/ + main.cxx + CMakeLists.txt + vcpkg.json +``` + +Then, `main.cxx` might look like: + +```cpp +#include + +int main() { + fmt::print("Hello, {}!", "world"); +} +``` + +Therefore, in `vcpkg.json`, we'll need to depend on `fmt`: + +```json +{ + "name": "example", + "version-string": "0.0.1", + "dependencies": [ + "fmt" + ] +} +``` + +Then, let's write our `CMakeLists.txt`: + +```cmake +cmake_minimum_required(VERSION 3.14) + +project(example CXX) + +add_executable(example src/main.cxx) + +find_package(fmt REQUIRED) + +target_link_libraries(example + PRIVATE + fmt::fmt) +``` + +And finally, to configure and build: + +```sh +$ cd example +$ cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake +... configuring and installing... +$ cmake --build build +``` + +and we're done! `fmt` will get installed into +`example/build/vcpkg_installed`, and we can run our executable with: + +```sh +$ build/example +Hello, world! +``` + +## Definitions + +* ``: A `string` which: + * Is entirely ASCII + * Contains only lowercase alphabetic characters, digits, and hyphen-minus + * Does not have multiple consecutive hyphens + * Does not begin nor end with a hyphen + * Is not a Windows filesystem reserved name + * Is not a vcpkg reserved name: "default" or "core". + * In other words, it must follow the regex `[a-z0-9]+(-[a-z0-9]+)*`, and must not be any of: + * `{ prn, aux, nul, con, lpt[1-9], com[1-9], core, default }` +* ``: A `string` consisting of a non-zero number of ``s, separated by `.`. + * `a.b.c` is valid + * `a` is valid + * `a/b` is not valid + * `Boost.Beast` is not valid, but `boost.beast` is +* ``: Either a ``, or an object: + * A dependency always contains the following: + * `"name"`: A `` + * Optionally, `"features"`: an array of ``s corresponding to features in the package. + * Optionally, `"default-features"`: a `boolean`. If this is false, then don't use the default features of the package; equivalent to core in existing CONTROL files. If this is true, do the default thing of including the default features. + * Optionally, `"platform"`: a `` + * ``: No extra fields are required. +* ``: An SPDX license expression at version 3.9. +* ``: A specification of a set of platforms; used in platform-specific dependencies and supports fields. A string that is parsed as follows: + * ``: + * `` + * `` + * `` + * ``: + * `( )` + * `` + * ``: + * regex: `/^[a-z0-9]+$/` + * ``: + * `` + * `! ` + * `` + * `` + * ` & ` + * `` + * `` + * ` | ` +* ``: An object containing the following: + * `"name"`: An ``, the name of the feature + * `"description"`: A `string` or array of `string`s, the description of the feature + * Optionally, `"dependencies"`: An array of ``s, the dependencies used by this feature diff --git a/docs/specifications/ports-overlay.md b/docs/specifications/ports-overlay.md index d486cfe193bff1..632954fc34375d 100644 --- a/docs/specifications/ports-overlay.md +++ b/docs/specifications/ports-overlay.md @@ -1,5 +1,6 @@ # Ports Overlay (Jun 19, 2019) +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** ## 1. Motivation diff --git a/docs/specifications/prefab.md b/docs/specifications/prefab.md new file mode 100644 index 00000000000000..8b84874426fec1 --- /dev/null +++ b/docs/specifications/prefab.md @@ -0,0 +1,160 @@ +# Vcpkg: export Android prefab Archives (AAR files) + +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +Vcpkg can export android archives ([AAR files](https://developer.android.com/studio/projects/android-library)). Once an archive is created, it can imported in Android Studio as a native dependent. The archive is automatically consumed using [android studio's prefab tool](https://github.com/google/prefab). + +For more information on Prefab, refer to: +* The [official prefab documentation](https://google.github.io/prefab). +* a blog post from Android developers blog: [Native Dependencies in Android Studio 4.0](https://android-developers.googleblog.com/2020/02/native-dependencies-in-android-studio-40.html) + +_Note for Android Studio users: prefab packages are supported on Android Studio 4+_ + +## Requirements + +1. `ndk ` + +Set environment variable `ANDROID_NDK_HOME` to your android ndk installation. For example: + +```` +export ANDROID_NDK_HOME=/home/your-account/Android/Sdk/ndk-bundle +```` + +2. `7zip ` or `zip ` + +3. `maven ` + +4. Android triplets + +See [android.md](../users/android.md) for instructions on how to install the triplets. + +*Please note that in order to use "prefab" (see below), the four architectures are required. If any is missing the export will fail* + + +## Example exporting [jsoncpp] + +First "vcpkg install" the 4 android architectures (it is mandatory to export all 4 of them) + +```` +./vcpkg install jsoncpp:arm-android jsoncpp:arm64-android jsoncpp:x64-android jsoncpp:x86-android +```` + + +Then, export the prefab: + +Note: +* The `--prefab-maven` flag is optional. Call it if you maven is installed. +* The `--prefab-debug` flag will output instructions on how to use the prefab archive via gradle. + +``` +./vcpkg export --triplet x64-android jsoncpp --prefab --prefab-maven --prefab-debug +``` + +You will see an output like this: +``` +The following packages are already built and will be exported: + jsoncpp:arm64-android + +Exporting package jsoncpp... +[DEBUG] Found 4 triplets + arm64-android + x64-android + x86-android + arm-android + +... +... Lots of output... +... + +[INFO] Scanning for projects... +Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom + +... +... Lots of output... +... + +[INFO] BUILD SUCCESS +[INFO] Total time: 2.207 s +[INFO] Finished at: 2020-05-10T14:42:28+02:00 + + +... +... Lots of output... +... + +[DEBUG] Configuration properties in Android Studio +In app/build.gradle + + com.vcpkg.ndk.support:jsoncpp:1.9.2 + +And cmake flags + + externalNativeBuild { + cmake { + arguments '-DANDROID_STL=c++_shared' + cppFlags "-std=c++17" + } + } + +In gradle.properties + + android.enablePrefab=true + android.enableParallelJsonGen=false + android.prefabVersion=${prefab.version} + +Successfully exported jsoncpp. Checkout .../vcpkg/prefab + +``` + +#### The output directory after export + +```` +prefab +└── jsoncpp/ + ├── aar/ + │   ├── AndroidManifest.xml + │   ├── META-INF/ + │   │   └── LICENSE + │   └── prefab/ + │   ├── modules/ + │   │   └── jsoncpp/ + │   │   ├── libs/ + │   │   │   ├── android.arm64-v8a/ + │   │   │   │   ├── abi.json + │   │   │   │   ├── include/ + │   │   │   │   │   └── json/ + │   │   │   │   │   ├── json.h + │   │   │   │   │   └── .... + │   │   │   │   └── libjsoncpp.so + │   │   │   ├── android.armeabi-v7a/ + │   │   │   │   ├── abi.json + │   │   │   │   ├── include/ + │   │   │   │   │   └── json/ + │   │   │   │   │   ├── json.h + │   │   │   │   │   └── .... + │   │   │   │   └── libjsoncpp.so + │   │   │   ├── android.x86/ + │   │   │   │   ├── abi.json + │   │   │   │   ├── include/ + │   │   │   │   │   └── json/ + │   │   │   │   │   ├── json.h + │   │   │   │   │   └── .... + │   │   │   │   └── libjsoncpp.so + │   │   │   └── android.x86_64/ + │   │   │   ├── abi.json + │   │   │   ├── include/ + │   │   │   │   └── json/ + │   │   │   │   │   ├── json.h + │   │   │   │   │   └── .... + │   │   │   └── libjsoncpp.so + │   │   └── module.json + │   └── prefab.json + ├── jsoncpp-1.9.2.aar + └── pom.xml +```` + +## Example consuming [jsoncpp] via vcpkg and prefab + +See the example repo here: + +https://github.com/atkawa7/prefab-vpkg-integration-sample diff --git a/docs/specifications/registries-2.md b/docs/specifications/registries-2.md new file mode 100644 index 00000000000000..b44dacfe5fd65c --- /dev/null +++ b/docs/specifications/registries-2.md @@ -0,0 +1,559 @@ +# Registries: Take 2 (including Git Registries) + +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +Originally, the design of registries was decided upon and written up in the [Registries RFC](registries.md). +However, as we've gotten further into the design process of git registries and versioning, +and discussed the interaction of versioning with registries, +it's become clear that the existing design was lacking. +We need to have an on-disk port database that is not tied to the ports tree. + +This RFC is a new design for registries, that includes this registry database. +It also includes the design for git registries, +which are likely to be the predominant form of registries in the wild. +They are also what we will start to treat the default registry as, +to allow for updating ports without updating the vcpkg executable +(likely necessary for binary releases). + +## Design Considerations + +After internal discussions of the relationship between versioning and registries, +it was clear that the existing design of registries does not play well with versioning. +It was also clear that it was necessary to have metadata about ports in a separate place from the ports tree; +in fact, after discussion, it was clear that the ports tree should be considered an implementation detail; +a backing store for build process information (e.g., `portfile.cmake` and the patches) and the manifest. + +From this, it's clear that vcpkg needs to add a new set of metadata. +The versioning implementation has decided on `port_versions`, and thus that's what this RFC uses. + +Since we're replacing the existing ports directory with a new method of describing ports, +this means that the ports directory is no longer anything but a data store. +This also means that the existing rules around locations of ports is no longer required; +however, it will still keep getting followed for the main repository, +and it's recommended that other registries follow the same pattern to make contributing easier. + +## What does the registry database look like? + +We don't wish to have the same problem as we do right now, +where there are nearly 1500 entries in a single directory. +We solve this by placing each database entry into `port_versions/-/.json`. +For example, the database entry for 7zip is in `port_versions/7-/7zip.json`. + +Each of these database entries contains all of the versions of the port throughout history, +along with versioning and feature metadata, so that we do not have to check out old manifests or CONTROL files +to get at that information. + +Each database entry file must be a top-level array of port version objects, which contain the following entries: +* A version field: `"version-string"`, `"version"`, etc. Same as in the manifest. +* Optionally, `"port-version"`: Same as in the manifest. + +And also contain a description of where to find the build files for this port; the possibilities include: + +* `"git-tree"`: The [git object ID] of a tree object; this is only allowed for git registries. + Note that this ID must be an ID from the repository where the registry is located. +* `"path"`: A path describing where to find the build files. + The first entry in this path should be `$`, which means "this path starts at the root of the registry". + No other kinds of paths are allowed. + * For example: `$/foo/bar` gives you `foo/bar` underneath the folder containing the `port_versions` directory. + * `/foo/bar` and `foo/bar` are both disallowed. + +Using a `"git-tree"` as a backend in a non-git registry, and using a `"path"` in a git registry, +is not permitted. Future extensions may include things like remote archives or git repositories, +or may allow `"path"` in git registries. + +Note that a registry entry should _always_ be additive; +deleting existing entries is unsupported and may result in bad behavior. +The only modification to existing entries that is allowable is moving the backing store +for the build files, assuming that the new build files are equivalent to the old build files. +(For example, a filesystem registry might have a new way of laying out where ports are). + +Additionally, we'd like a new way of describing the set of ports that make up a "baseline". +This is currently done with the reference of the vcpkg git repository - +each reference has a set of versions that are tested against each other, +and this is a major feature of vcpkg. +We wish to have the same feature in the new versioning world, +and so we'll have a set of baseline versions in the registry database. + +Baselines act differently between git registries or the builtin registry, +and in filesystem registries. +In git registries and the builtin registry, +since there's a history that one can access, +a baseline is the `"default"` entry in the baseline at the reference specified. +In filesystem registries, since there is no accessible history, +the baseline identifiers are mapped directly to entries in the baseline file, +without translation; by default, the `"default"` entry is used. + +These baselines are placed in `port_versions/baseline.json`. +This is an object mapping baseline names to baseline objects, +where baseline objects map port names to version objects. +A version object contains `"baseline"`, which is un-schemed version, +and optionally `"port-version"`. + +[git object ID]: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects + +### Example of a baseline file + +The following is a reasonable baseline.json for a filesystem registry that only has two ports: + +```json +{ + "default": { + "abseil": { "baseline": "2020-03-03" }, + "zlib": { "baseline": "1.2.11", "port-version": 9 } + }, + "old": { + "abseil": { "baseline": "2019-02-11" }, + "zlib": { "baseline": "1.2.11", "port-version": 3 } + }, + "really-old": { + "zlib": { "baseline": "1.2.9" } + } +} +``` + +### Example of a registry database entry file + +Note: This file assumes that the versions RFC has been implemented, +and thus that minimum versions are required; +the syntax may change in the time between now and finishing the implementation. + +This example is of `ogre`, since this port has both features and dependencies; +remember that this file would be `port_versions/o-/ogre.json`. + +```json +[ + { + "version-string": "1.12.7", + "git-tree": "466e96fd2e17dd2453aa31dc0bc61bdcf53e7f61", + }, + { + "version-string": "1.12.1", + "port-version": 1, + "git-tree": "0de81b4f7e0ec24966e929c2ea64e16c15e71d5e", + }, + ... +] +``` + +#### Filesystem Registry Databases + +Filesystem registries are the simplest possible registry; +they have a `port_versions` directory at the top-level, which contains the registry database. +It's expected that the filesystem registry would have a filesystem backing store: +something like the existing `ports` directory, except with separate versions. +There won't be a specific way to lay the ports tree out as mandated by the tool, +as we are treating the ports tree as an implementation detail of the registry; +it's simply a way to get the files for a port. +As an example, let's assume that the registry is laid out something like this: + +``` +/ + port_versions/ + baseline.json + a-/ + abseil.json + asmjit.json + o-/ + ogre.json + ports/ + a-/ + abseil/ + 2020-03-03_7/ + vcpkg.json + portfile.cmake + ... + 2020-03-03_8/ + vcpkg.json + portfile.cmake + ... + ... + asmjit/ + 2020-05-08/ + CONTROL + portfile.cmake + ... + 2020-07-22/ + vcpkg.json + portfile.cmake + ... + o-/ + ogre/ + 1.12.7/ + ... + 1.12.1/ + ... + ... + ... +``` + +Then, let's look at updating `asmjit` to latest. + +The current manifest file, in `asmjit/2020-07-22/vcpkg.json` looks like: + +```json +{ + "name": "asmjit", + "version-string": "2020-07-22", + "description": "Complete x86/x64 JIT and Remote Assembler for C++", + "homepage": "https://github.com/asmjit/asmjit", + "supports": "!arm" +} +``` + +while the current `port_versions/a-/asmjit.json` looks like: + +```json +[ + { + "version-string": "2020-07-22", + "path": "$/ports/a-/asmjit/2020-07-22" + }, + { + "version-string": "2020-05-08", + "path": "$/ports/a-/asmjit/2020-05-08" + } +] +``` + +with `port_versions/baseline.json` looking like: + +```json +{ + "default": { + ..., + "asmjit": { "baseline": "2020-07-22" }, + ... + } +} +``` + +and we'd like to update to `2020-10-08`. +We should first copy the existing implementation to a new folder: + +```sh +$ cp -r ports/a-/asmjit/2020-07-22 ports/a-/asmjit/2020-10-08 +``` + +then, we'll make the edits required to `ports/a-/asmjit/2020-10-08` to update to latest. +We should then update `port_versions/a-/asmjit.json`: + +```json +[ + { + "version-string": "2020-10-08", + "path": "$/ports/a-/asmjit/2020-10-08" + }, + { + "version-string": "2020-07-22", + "path": "$/ports/a-/asmjit/2020-07-22" + }, + { + "version-string": "2020-05-08", + "path": "$/ports/a-/asmjit/2020-05-08" + } +] +``` + +and update `port_versions/baseline.json`: + +```json +{ + "default": { + ..., + "asmjit": { "baseline": "2020-10-08" }, + ... + } +} +``` + +and we're done 😊. + +#### Git Registry Databases + +Git registries are not quite as simple as filesystem registries, +but they're still pretty simple, and are likely to be the most common: +the default registry is a git registry, for example. +There is not a specific way the tool requires one to lay out the backing store, +as long as it's possible to get an object hash that corresponds to a checked-in git tree +of the build information. +This allows, for example, the current vcpkg default registry way of laying out ports, +where the latest version of a port `

` is at `ports/

`, +and it also allows for any number of other designs. +One interesting design, for example, +is having an `old-ports` branch which is updated whenever someone want to backfill versions; +then, one could push the old version to the `old-ports` branch, +and then update the HEAD branch with the git tree of the old version in `port_versions/p-/

`. + +As above, we want to update `asmjit` to latest; let's assume we're working in the default vcpkg registry +(the repository): + +The current manifest file for `asmjit` looks like: + +```json +{ + "name": "asmjit", + "version-string": "2020-07-22", + "description": "Complete x86/x64 JIT and Remote Assembler for C++", + "homepage": "https://github.com/asmjit/asmjit", + "supports": "!arm" +} +``` + +and the current `port_versions/a-/asmjit.json` looks like: + +```json +[ + { + "version-string": "2020-07-22", + "git-tree": "fa0c36ba15b48959ab5a2df3463299e1d2473b6f" + } +] +``` + +Now, let's update it to the latest version: + +```json +{ + "name": "asmjit", + "version-string": "2020-10-08", + "description": "Complete x86/x64 JIT and Remote Assembler for C++", + "homepage": "https://github.com/asmjit/asmjit", + "supports": "!arm" +} +``` + +and make the proper edits to the portfile.cmake. Then, let's commit the changes: + +```cmd +> git add ./ports/asmjit +> git commit -m "[asmjit] update asmjit to 2020-10-08" +``` + +In `git-tree` mode, one needs to commit the new version of the port to get the git tree hash; +we use `git rev-parse` to do so: + +```cmd +> git rev-parse HEAD:ports/asmjit +2bb51d8ec8b43bb9b21032185ca8123da10ecc6c +``` + +and then modify `port_versions/a-/asmjit.json` as follows: + +```json +[ + { + "version-string": "2020-10-08", + "git-tree": "2bb51d8ec8b43bb9b21032185ca8123da10ecc6c" + }, + { + "version-string": "2020-07-22", + "git-tree": "fa0c36ba15b48959ab5a2df3463299e1d2473b6f" + } +] +``` + +Then we can commit and push this new database with: + +```sh +$ git add port_versions +$ git commit --amend --no-edit +$ git push +``` + +## Consuming Registries + +The `vcpkg-configuration.json` file from the [first registries RFC](registries.md) +is still the same, except that the registries have a slightly different layout. +A `` is still an object with the following fields: +* Optionally, `"default-registry"`: A `` or `null` +* Optionally, `"registries"`: An array of ``s + +Additionally, `` is still the same; +a `` object, plus the following properties: +* Optionally, `"baseline"`: A named baseline. Defaults to `"default"`. +* Optionally, `"packages"`: An array of ``s + +however, ``s are now slightly different: +* ``: + * `"kind"`: The string `"builtin"` +* ``: + * `"kind"`: The string `"filesystem"` + * `"path"`: A path +* ``: + * `"kind"`: The string `"git"` + * `"repository"`: A URI + +The `"packages"` field of distinct registries must be disjoint, +and each `` must have at the `"packages"` property, +since otherwise there's no point. + +As an example, a package which uses a different default registry, and a different registry for boost, +might look like the following: + +```json +{ + "default-registry": { + "kind": "filesystem", + "path": "vcpkg-ports" + }, + "registries": [ + { + "kind": "builtin", + "packages": [ "cppitertools" ] + } + ] +} +``` + +This will install `fmt` from `/vcpkg-ports`, +and `cppitertools` and the `boost` ports from the registry that ships with vcpkg. +Notably, this does not replace behavior up the tree -- only the `vcpkg-configuration.json`s +for the current invocation do anything. + +### Filesystem Registries + +A filesystem registry takes on the form: + +* `"kind"`: The string `"filesystem"` +* `"path"`: The path to the filesystem registry's root, i.e. the directory containing the `port_versions` directory. + +```json +{ + "kind": "filesystem", + "path": "vcpkg-registry" +} +``` + +Unlike git registries, where there's quite a bit of interesting stuff going on, +there isn't much stuff to do with filesystem registries. +We simply use the registry database at `/port_versions` to get information about ports. + +### Git Registries + +A git registry takes on the form: + +* `"kind"`: The string `"git"` +* `"repository"`: The URL at which the git repository lives. May be any kind of URL that git understands + +```json +{ + "kind": "git", + "repository": "https://github.com/microsoft/vcpkg" +} +``` + +Whenever the first vcpkg command is run with a git registry, +vcpkg notes down the exact commit that HEAD points to at the time of the run in the `vcpkg-lock.json` file. +This will be used as the commit which vcpkg takes the `"default"` baseline from, +and vcpkg will only update that commit when `vcpkg update` is run. + +Since the `"versions"` field is strictly additive, we don't consider older refs than `HEAD`. +We update the repository on some reasonable clip. +Likely, whenever a command is run that will change the set of installed ports. + +#### `vcpkg-lock.json` + +This file will contain metadata that we need to save across runs, +to allow us to keep a "state-of-the-world" that doesn't change unless one explicitly asks for it to change. +This means that, even across different machines, the same registries will be used. +We will also be able to write down version resolution in this file as soon as that feature is added. + +It is recommended that one adds this `vcpkg-lock.json` to one's version control. +This file is machine generated, and it is not specified how it's laid out; +however, for purposes of this RFC, we will define how it relates to git registries. + +In `vcpkg-lock.json`, in the top level object, +there will be a `"registries"` property that is an object. +This object will contain a `"git"` field, which is an array of git-registry objects, +that contain: + +* `"repository"`: The `"repository"` field from the git registry object +* `"baseline"`: The name of the baseline that we've used +* `"baseline-ref"`: The ref which we've gotten the specific baseline from. + +For example, a `vcpkg-lock.json` might look like: + +```json +{ + "registries": { + "git": [ + { + "repository": "https://github.com/microsoft/vcpkg", + "baseline": "default", + "baseline-ref": "6185aa76504a5025f36754324abf307cc776f3da" + } + ] + } +} +``` + +#### `vcpkg update` + +You'll notice that once the repository is added the first time, +there is only one way to update the repository to the tag at a later date - deleting the lock file. +We additionally want to add support for the user updating the registry by themselves - +they will be able to do this via the `vcpkg update` command. +The `vcpkg update` command will, for each git registry, +update the registry and repoint the `"commit"` field in `vcpkg-lock.json` to the latest `HEAD`. + +There is no way to update only one git registry to a later date, since versions are strictly additive. + +## Git Registries: Implementation on Disk + +There are two implementations on disk to consider here: the implementation of the registry database, +and once we have the database entries for the ports, accessing the port data from the git tree object. + +Both of these implementations are placed in the vcpkg cache home (shared by binary caching archives). +On unix, this is located at `$XDG_CACHE_HOME/vcpkg` if the environment variable exists, +otherwise `$HOME/.cache/vcpkg`; on Windows, it's located at `%LOCALAPPDATA%\vcpkg`. +In this document, we use the variable `$CACHE_ROOT` to refer to this folder. +We will add a new folder, `$CACHE_ROOT/registries`, which will contain all the data we need. + +First, we'll discuss the registry database. + +### Registry Database + +At `$CACHE_ROOT/registries/git`, +we'll create a new git repository root which contains all information from all git registries, +since the hashes should be unique, and this allows for deduplication +across repositories which have the same commits (e.g., for mirrors). +In order to get the data from git registries, we simply `fetch` the URL of the git registry. + +In order to grab a specific database entry from a git registry, `git show` is used to grab the +file from the right commit: `git show -- port_versions/-/.json`. + +One unfortunate thing about having one directory being used for all vcpkg instances on a machine is +that it's possible to have an issue with concurrency - for example, after `fetch`ing the latest HEAD +of `https://github.com/microsoft/vcpkg`, another vcpkg process might fetch the latest HEAD of +`https://github.com/meow/vcpkg` before the first vcpkg process has the chance to `git rev-parse FETCH_HEAD`. +Since the first vcpkg process will run `git rev-parse` after the second fetch is done, +instead of getting the `HEAD` of `microsoft/vcpkg`, they instead get the `HEAD` of `meow/vcpkg`. +We will solve this by having a mutex file in `$CACHE_ROOT/registries/git` +that vcpkg locks before any fetches (and unlocks after `rev-parse`ing). + +### Accessing Port Data from `git-tree`s + +Once we've done version resolution and everything with the database, +we then need to access the port data from the git history. +We will add a new folder, `$CACHE_ROOT/registries/git-trees`, into which we'll check out the port data. + +In this `git-trees` directory, we will have all of the trees we check out, at their hashes. +For example, the asmjit port data from above will be located at +`git-trees/2bb51d8ec8b43bb9b21032185ca8123da10ecc6c`. +We will add a mutex file in this `git-trees` directory as well which is taken whenever +we are checking out a new git tree. +We wish to allow multiple vcpkg instances to read port data at a time, +and thus we do the check outs semi-atomically - if `git-trees/` exists, +then the `` must be completely checked out. +vcpkg does this by first checking out to a temporary directory, +and then renaming to the actual hash. + +## Future Extensions + +The way forward for this is to allow the `"builtin"` registry to be a git registry, +in order to support packaging and shipping vcpkg as a binary. +This is currently our plan, although it definitely is still a ways out. +Git registries _are_ an important step on that road, +but are also a good way to support both enterprise, +and experimentation by our users. +They allow us a lot more flexibility than we've had in the past. \ No newline at end of file diff --git a/docs/specifications/registries.md b/docs/specifications/registries.md new file mode 100644 index 00000000000000..896188f4c6b6a1 --- /dev/null +++ b/docs/specifications/registries.md @@ -0,0 +1,287 @@ +# Package Federation: Custom Registries + +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +As it is now, vcpkg has over 1400 ports in the default registry (the `/ports` directory). +For the majority of users, this repository of packages is enough. However, many enterprises +need to more closely control their dependencies for one reason or another, and this document +lays out a method which we will build into vcpkg for exactly that reason. + +## Background + +A registry is simply a set of packages. In fact, there is already a registry in vcpkg: the default one. +Package federation, implemented via custom registries, allows one to add new packages, +edit existing packages, and have as much or as little control as one likes over the dependencies that one uses. +It gives the control over dependencies that an enterprise requires. + +### How Does the Current Default Registry Work? + +Of course, the existing vcpkg tool does have packages in the official, +default registry. The way we describe these packages is in the ports tree – +at the base of the vcpkg install directory, there is a directory named ports, +which contains on the order of 1300 directories, one for each package. Then, +in each package directory, there are at least two files: a CONTROL or +vcpkg.json file, which contains the name, version, description, and features +of the package; and a portfile.cmake file which contains the information on +how to download and build the package. There may be other files in this +registry, like patches or usage instructions, but only those two files are +needed. + +### Existing vcpkg Registry-like Features + +There are some existing features in vcpkg that act somewhat like a custom +registry. The most obvious feature that we have is overlay ports – this +feature allows you to specify any number of directories as "overlays", which +either contain a package definition directly, or which contain some number of +package directories; these overlays will be used instead of the ports tree +for packages that exist in both places, and are specified exclusively on the +command line. Additionally, unfortunately, if one installs a package from +overlay ports that does not exist in the ports tree, one must pass these +overlays to every vcpkg installation command. + +There is also the less obvious "feature" which works by virtue of the ports +tree being user-editable: one can always edit the ports tree on their own +machine, and can even fork vcpkg and publish their own ports tree. +Unfortunately, this then means that any updates to the source tree require +merges, as opposed to being able to fast-forward to the newest sources. + +### Why Registries? + +There are many reasons to want custom registries; however, the most important reasons are: + +* Legal requirements – a company like Microsoft or Google + needs the ability to strictly control the code that goes into their products, + making certain that they are following the licenses strictly. + * There have been examples in the past where a library which is licensed under certain terms contains code + which is not legally allowed to be licensed under those terms (see [this example][legal-example], + where a person tried to merge Microsoft-owned, Apache-licensed code into the GPL-licensed libstdc++). +* Technical requirements – a company may wish to run their own tests on the packages they ship, + such as [fuzzing]. +* Other requirements – an organization may wish to strictly control its dependencies for a myriad of other reasons. +* Newer versions – vcpkg may not necessarily always be up to date for all libraries in our registry, + and an organization may require a newer version than we ship; + they can very easily update this package and have the version that they want. +* Port modifications – vcpkg has somewhat strict policies on port modifications, + and an organization may wish to make different modifications than we do. + It may allow that organization to make certain that the package works on triplets + that our team does not test as extensively. +* Testing – just like port modifications, if a team wants to do specific testing on triplets they care about, + they can do so via their custom registry. + +Then, there is the question of why vcpkg needs a new solution for custom registries, +beyond the existing overlay ports feature. There are two big reasons – +the first is to allow a project to define the registries that they use for their dependencies, +and the second is the clear advantage in the user experience of the vcpkg tool. +If a project requires specific packages to come from specific registries, +they can do so without worrying that a user accidentally misses the overlay ports part of a command. +Additionally, beyond a feature which makes overlay ports easier to use, +custom registries allow for more complex and useful infrastructure around registries. +In the initial custom registry implementation, we will allow overlay ports style paths, +as well as git repositories, which means that people can run and use custom registries +without writing their own infrastructure around getting people that registry. + +It is the intention of vcpkg to be the most user-friendly package manager for C++, +and this allows us to fulfill on that intention even further. +As opposed to having to write `--overlay-ports=path/to/overlay` for every command one runs, +or adding an environment variable `VCPKG_OVERLAY_PORTS`, +one can simply write vcpkg install and the registries will be taken care of for you. +As opposed to having to use git submodules, or custom registry code for every project, +one can write and run the infrastructure in one place, +and every project that uses that registry requires only a few lines of JSON. + +[legal-example]: https://gcc.gnu.org/legacy-ml/libstdc++/2019-09/msg00054.html +[fuzzing]: https://en.wikipedia.org/wiki/Fuzzing + +## Specification + +We will be adding a new file that vcpkg understands - `vcpkg-configuration.json`. +The way that vcpkg will find this file is different depending on what mode vcpkg is in: +in classic mode, vcpkg finds this file alongside the vcpkg binary, in the root directory. +In manifest mode, vcpkg finds this file alongside the manifest. For the initial implementation, +this is all vcpkg will look for; however, in the future, vcpkg will walk the tree and include +configuration all along the way: this allows for overriding defaults. +The specific algorithm for applying this is not yet defined, since currently only one +`vcpkg-configuration.json` is allowed. + +The only thing allowed in a `vcpkg-configuration.json` is a `` object. + +A `` is an object: +* Optionally, `"default-registry"`: A `` or `null` +* Optionally, `"registries"`: An array of ``s + +Since this is the first RFC that adds anything to this field, +as of now the only properties that can live in that object will be +these. + +A `` is an object matching one of the following: +* ``: + * `"kind"`: The string `"builtin"` +* ``: + * `"kind"`: The string `"directory"` + * `"path"`: A path +* ``: + * `"kind"`: The string `"git"` + * `"repository"`: A URI + * Optionally, `"path"`: An absolute path into the git repository + * Optionally, `"ref"`: A git reference + +A `` is a `` object, plus the following properties: +* Optionally, `"scopes"`: An array of ``s +* Optionally, `"packages"`: An array of ``s + +The `"packages"` and `"scopes"` fields of distinct registries must be disjoint, +and each `` must have at least one of the `"scopes"` and `"packages"` property, +since otherwise there's no point. + +As an example, a package which uses a different default registry, and a different registry for boost, +might look like the following: + +```json +{ + "default-registry": { + "kind": "directory", + "path": "vcpkg-ports" + }, + "registries": [ + { + "kind": "git", + "repository": "https://github.com/boostorg/vcpkg-ports", + "ref": "v1.73.0", + "scopes": [ "boost" ] + }, + { + "kind": "builtin", + "packages": [ "cppitertools" ] + } + ] +} +``` + +This will install `fmt` from `/vcpkg-ports`, +`cppitertools` from the registry that ships with vcpkg, +and any `boost` dependencies from `https://github.com/boostorg/vcpkg-ports`. +Notably, this does not replace behavior up the tree -- only the `vcpkg-configuration.json`s +for the current invocation do anything. + +### Behavior + +When a vcpkg command requires the installation of dependencies, +it will generate the initial list of dependencies from the package, +and then run the following algorithm on each dependency: + +1. Figure out which registry the package should come from by doing the following: + 1. If there is a registry in the registry set which contains the dependency name in the `"packages"` array, + then use that registry. + 2. For every scope, in order from most specific to least, + if there is a registry in the registry set which contains that scope in the `"scopes"` array, + then use that registry. + (For example, for `"cat.meow.cute"`, check first for `"cat.meow.cute"`, then `"cat.meow"`, then `"cat"`). + 3. If the default registry is not `null`, use that registry. + 4. Else, error. +2. Then, add that package's dependencies to the list of packages to find, and repeat for the next dependency. + +vcpkg will also rerun this algorithm whenever an install is run with different configuration. + +### How Registries are Laid Out + +There are three kinds of registries, but they only differ in how the registry gets onto one's filesystem. +Once the registry is there, package lookup runs the same, with each kind having it's own way of defining its +own root. + +In order to find a port `meow` in a registry with root `R`, vcpkg first sees if `R/meow` exists; +if it does, then the port root is `R/meow`. Otherwise, see if `R/m-` exists; if it does, +then the port root is `R/m-/meow`. (note: this algorithm may be extended further in the future). + +For example, given the following port root: + +``` +R/ + abseil/... + b-/ + boost/... + boost-build/... + banana/... + banana/... +``` + +The port root for `abseil` is `R/abseil`; the port root for `boost` is `R/b-/boost`; +the port root for `banana` is `R/banana` (although this duplication is not recommended). + +The reason we are making this change to allow more levels in the ports tree is that ~1300 +ports are hard to look through in a tree view, and this allows us to see only the ports we're +interested in. Additionally, no port name may end in a `-`, so this means that these port subdirectories +will never intersect with actual ports. Additionally, since we use only ASCII for port names, +we don't have to worry about graphemes vs. code units vs. code points -- in ASCII, they are equivalent. + +Let's now look at how different registry kinds work: + +#### `` + +For a ``, there is no configuration required. +The registry root is simply `/ports`. + +#### `` + +For a ``, it is again fairly simple. +Given `$path` the value of the `"path"` property, the registry root is either: + +* If `$path` is absolute, then the registry root is `$path`. +* If `$path` is drive-relative (only important on Windows), the registry root is + `(drive of vcpkg.json)/$path` +* If `$path` is relative, the registry root is `(directory of vcpkg.json)/$path` + +Note that the path to vcpkg.json is _not_ canonicalized; it is used exactly as it is seen by vcpkg. + +#### `` + +This registry is the most complex. We would like to cache existing registries, +but we don't want to ignore new updates to the registry. +It is the opinion of the author that we want to find more updates than not, +so we will update the registry whenever the `vcpkg.json` or `vcpkg-configuration.json` +is modified. We will do so by keeping a sha512 of the `vcpkg.json` and `vcpkg-configuration.json` +inside the `vcpkg-installed` directory. + +We will download the specific ref of the repository to a central location (and update as needed), +and the root will be either: ``, if the `"path"` property is not defined, +or else `/` if it is defined. +The `"path"` property must be absolute, without a drive, and will be treated as relative to +the path to the repository. For example: + +```json +{ + "kind": "git", + "repository": "https://github.com/microsoft/vcpkg", + "path": "/ports" +} +``` + +is the correct way to refer to the registry built in to vcpkg, at the latest version. + +The following are all incorrect: + +```json +{ + "$reason": "path can't be drive-absolute", + "kind": "git", + "repository": "https://github.com/microsoft/vcpkg", + "path": "F:/ports" +} +``` + +```json +{ + "$reason": "path can't be relative", + "kind": "git", + "repository": "https://github.com/microsoft/vcpkg", + "path": "ports" +} +``` + +```json +{ + "$reason": "path _really_ can't be relative like that", + "kind": "git", + "repository": "https://github.com/microsoft/vcpkg", + "path": "../../meow/ports" +} +``` diff --git a/docs/specifications/scripts-extraction.md b/docs/specifications/scripts-extraction.md new file mode 100644 index 00000000000000..396e2d4e0273aa --- /dev/null +++ b/docs/specifications/scripts-extraction.md @@ -0,0 +1,66 @@ +# Scripts Tree Extraction + +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +## Background + +We extracted vcpkg-tool as part of a future wherein Registries are the primary mechanism for interacting with the ports tree, which would allow the vcpkg tool and associated artifacts to be deployed and figure the rest out on their own. Unfortunately, we have concurrently edited things in the so called "scripts" tree which lives in support of ports but really probably belongs in the vcpkg-tool repo. + +Moreover, as part of stabilizing registries, the interface exposed by the scripts tree becomes contractual rather than something we can change in concert with ports, since we can no longer see the universe of ports to validate that changes are correct. + +To that end we are auditing the contents of the scripts tree to make sure it is a solid foundation for future work. + +The work list is contained in [Issue #16188]. + +[Issue #16188]: https://github.com/microsoft/vcpkg/issues/16188 + +## Audit Points + +The following are assertions we want to be able to make about the contents of the scripts tree. Note that this does *not* refer to `vcpkg.cmake` since that needs to work with older versions of cmake. + +These are design ideals that we may break in some limited cases where that makes sense. + +- We always use `cmake_parse_arguments` rather than function parameters, or referring to `${ARG}`. + - Exception: there are exclusively positional parameters. This should be _very rare_. + - In this case, positional parameters should be put in the function declaration + (rather than using `${ARG}`), and should be named according to local rules + (i.e. `snake_case`). + - Exception: positional parameters that are optional should be given a name via + `set(argument_name "${ARG}") after checking `${ARGC}`. + - Note: in cases where there are positional parameters along with non-positional parameters, positional parameters should be referred to by `arg_UNPARSED_ARGUMENTS`. +- All `cmake_parse_arguments` use `PARSE_ARGV` for resistance to embedded semicolons. +- All `foreach` loops use `IN LISTS` for resistance to embedded semicolons. +- The variable `${ARGV}` is unreferenced. +- We use functions, not macros or top level code. +- Scripts in the scripts tree should not be expected to need changes as part of normal operation. (For example, `vcpkg_acquire_msys` has hard coded specific packages and versions thereof used which we believe is unacceptable) +- All non-splat variable expansions are in quotes "". +- There are no "pointer" parameters (where a user passes a variable name rather than the contents) except for out parameters. +- Undefined names are not referenced. +- Out parameters only set `PARENT_SCOPE`. +- `CACHE` variables are not used. +- `include()`s are removed and fixes to `port.cmake` et al. are made as necessary to avoid this. +- `foreach(RANGE)`'s arguments _must always be_ natural numbers, and `` _must always be_ less than or equal to ``. + - This should be checked. + +### Naming Variables + +- `cmake_parse_arguments`: set prefix to `"arg"` +- local variables are named `snake_case` +- Internal global variable names are named `Z_VCPKG_`. +- External experimental global variable names are named `X_VCPKG_`. +- Internal functions are named `z_vcpkg_*` + - Functions which are internal to a single function (i.e., helper functions) + are named `[z_]_`, where `` is the name of the function they are + a helper to, and `` is what the helper function does. + - `z_` should be added to the front if `` doesn't have a `z_`, + but don't name a helper function `z_z_foo_bar`. +- Public global variables are named `VCPKG_`. + +## Prognosis + +Not everything should remain in the scripts tree. As part of this audit, each helper will be dealt with in one of several ways: + +- Stay in scripts tree +- Deleted outright +- Moved to a tool port +- Deprecated diff --git a/docs/specifications/versioning.md b/docs/specifications/versioning.md new file mode 100644 index 00000000000000..1ad9ef8dcf0126 --- /dev/null +++ b/docs/specifications/versioning.md @@ -0,0 +1,357 @@ +# Versioning Specification + +**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.** + +**Up-to-date documentation is available at [Versioning](../users/versioning.md).** + +## Glossary +Some of the terms used in this document have similar meaning when discussed by the community, and because of that, they can cause confusion and ambiguity. To solve this issue, we will assign specific meaning to these terms and try to keep a consistent usage through the document. + +**Library**: A piece of software (source code, binary files, documentation, license, etc.) that is intended to be reused by other software. + +**Package**: A package can contain a library, collection of libraries, build scripts, software tools, or other components necessary for their use. The goal of vcpkg is to facilitate the installation of these packages in the user's environment. + +**Port**: A vcpkg specific term, a port contains: + +* Metadata about a package: package version, supported features, dependencies, etc. +* Instructions to acquire, build if necessary, and install the package. + +## 1 Enabling package versioning +On launch, the versioning feature will be disabled by default. Users can enable this feature by setting the `versions` feature flag. + +Example: +``` +vcpkg --feature-flags=versions install +``` + +### 1.1 Proposed experience +This feature requires the use of manifests to declare project dependencies. To allow versioning, the following features are added to manifests: + +* Ability to declare a package's versioning scheme. +* Ability to declare version constraints on dependencies. +* Ability for a top-level manifest to override all other version constraints. +* Ability to declare a baseline for all versions. + +Example: A manifest (`vcpkg.json`) using versioning features. +```json +{ + "name": "versions-test", + "version": "1.0.0", + "dependencies": ["fmt", {"name": "zlib", "version>=": "1.2.11"}], + "$x-default-baseline": "9fd3bd594f41afb8747e20f6ac9619f26f333cbe" +} +``` + +The example above shows some new manifest properties: +* `"version"`: Declares a version using a dot-separated versioning scheme (`1.0.0`). +* `"version>="`: Declares a minimum version constraint on package `zlib`. +* `"$x-default-baseline"`: Declares a baseline version for all packages. + +All these new features are described in more detail in this document. + +## 2 Specifying package versions +Through the years, C++ software authors have adopted multiple versioning schemes and practices that sometimes conflict between each other. On vcpkg, the most recurrent versioning schemes found are: +* Semantic versions +* Dates +* Repository commits +* Arbitrary strings + +For vcpkg to achieve wide adoption and compatibility with existing projects, it is important that we respect the versioning schemes used by each of the packages contained in our ports catalog. + +### 2.1 Port versions +Package versioning information is divided in two parts: a version string and a port version. +Port versions are a concept exclusive to vcpkg, they do not form part of a package’s upstream. But allow for versioning of the vcpkg ports themselves. + +Packages can also include the port version as part of a version constraint by using the “port-version†property on their dependencies. + +#### `port-version` + +An integer value that increases each time a vcpkg-specific change is made to the port. + +The rules for port versions are: +* Start at 0 for the original version of the port, +* increase by 1 each time a vcpkg-specific change is made to the port that does not increase the version of the package, +* and reset to 0 each time the version of the package is updated. + +Defaults to 0 if omitted. + +### 2.2 Package versions +Versions are an important part of a package’s upstream metadata. Ports in vcpkg should attempt to follow the versioning conventions used by the package’s authors. For that reason, when declaring a package’s version the appropriate scheme should be used. + +Each versioning scheme defines their own rules on what is a valid version string and more importantly the rules for how to sort versions using the same scheme. + +The versioning schemes understood by vcpkg are: + +Manifest property | Versioning scheme +------------------|------------------------------------ +`version` | For dot-separated numeric versions +`version-semver` | For SemVer compliant versions +`version-date` | For dates in the format YYYY-MM-DD +`version-string` | For arbitrary strings + +A manifest must contain only one version declaration. + +#### `version` +Accepts version strings that follow a relaxed, dot-separated-, semver-like scheme. + +The version is logically composed of dot-separated (`.`) numeric sections. Each section must contain an integer positive number with no leading zeroes. + +The regex pattern for this versioning scheme is: `(0|[1-9]\d*)(\.(0|[1-9]\d*))*` + +_Sorting behavior_: When comparing two versions, each section is compared from left to right by their numeric value, until the first difference is found. A version with the smallest set of sections takes precedence over another with a larger set of sections, given that all their preceding sections compare equally. + +Example: +`0` < `0.1` < `0.1.0` < `1` < `1.0.0` < `1.0.1` < `1.1`< `2.0.0` + +#### `version-semver` +Accepts version strings that follow semantic versioning conventions as described in the [semantic versioning specification](https://semver.org/#semantic-versioning-specification-semver). + +_Sorting behavior_: Strings are sorted following the rules described in the semantic versioning specification. + +Example: +`1.0.0-1` < `1.0.0-alpha` < `1.0.0-beta` < `1.0.0` < `1.0.1` < `1.1.0` + +#### `version-date` + +Accepts version strings that can be parsed to a date following the ISO-8601 format `YYYY-MM-DD`. Disambiguation identifiers are allowed in the form of dot-separated-, positive-, integer-numbers with no leading zeroes. + +The regex pattern for this versioning scheme is: `\d{4}-\d{2}-\d{2}(\.(0|[1-9]\d*))*`. + +_Sorting behavior_: Strings are sorted first by their date part, then by numeric comparison of their disambiguation identifiers. Disambiguation identifiers follow the rules of the relaxed (version) scheme. + +Examples: +`2020-01-01` < `2020-01-01.1` < `2020-02-01.1.2` < `2020-02-01.1.3` < `2020-02-01` + +#### `version-string` +For packages using version strings that do not fit any of the other schemes, it accepts most arbitrary strings, but some special characters like `#` are disallowed. + +_Sorting behavior_: No sorting is attempted on the version string itself. However, if the strings match exactly, the port versions can be compared and sorted. + +Examples: +`apple` <> `orange` <> `orange.2` <> `orange2` +`watermelon` (`port-version`: 0) < `watermelon` (`port-version`: 1) + +##### Example: Manifests using different versioning schemes +```json +{ + "name": "openssl", + "version": "1.1.1", + "port-version": 0 +} +``` +```json +{ + "name": "bzip2", + "version-semver": "1.0.8", +} +``` +```json +{ + "name": "abseil", + "version-date": "2020-03-03", + "port-version": 8 +} +``` +```json +{ + "name": "d3dx12", + "version-string": "may2020", + "port-version": 0 +} +``` + +## 3 Specifying dependency versions + +### 3.1 On manifest files +Manifest files help users specify complex versioned dependency graphs in a declarative manner. In this document we define a top-level manifest as the manifest file written by a user to declare their project’s dependencies. This is opposed to a port’s manifest file, which is used by port’s to declare the dependencies of the package it contains. + +There are three mechanisms you can use in your manifest files to control which versions of your packages are installed: **version constraints, registry baselines and overrides**. + +#### Version constraints +Specifying a version constraint is the most direct way to control which version of a package is installed, in vcpkg you can declare minimum version constraints using the syntax `"version>=": "1.0.0"`. + +#### Registry baseline +Baselines are used to set lower boundaries on package versions. A baseline effectively adds a minimum version constraint on all the packages declared in it. + +But what is a baseline? + +In the main registry, the baseline is a file located in `${VCPKG_ROOT}/versions/baseline.json`. This file contains a version declaration for each package in vcpkg. The format of this file is the following: + +```json +{ + "default": [ + { + ... + "fmt": { "version-semver": "7.1.2", "port-version": 0}, + ... + } + ] +} +``` + +The baseline file is tracked under source control. For any given revision of the registry, the versions declared in the baseline file must match the current versions of the ports in the registry at that revision. + +Old revisions of vcpkg that do not contain a baseline file can still work with versioning. As a fallback, if no baseline is available at a given revision, vcpkg will use its local baseline file. If a local baseline file does not exist, the local version of the port will be used as the baseline version. + +Baselines define a minimum version constraint an all packages contained in it. + +For example, if the baseline contains the entry: +``` +“fmtâ€: { “version-semverâ€: “7.1.2â€, “port-versionâ€: 0 } +``` + +A minimum version constraint will be added to `fmt` so that vcpkg won’t install a version lower than `7.1.2` with port version `0`. + +#### Overrides +Declaring an override forces vcpkg to ignore all other constraints, both top-level and transitive constraints, and use the version specified in the override. This is useful for pinning exact versions and for resolving version conflicts. + +## 4 Version constraints + +### 4.1 Declaring a baseline +For the initial implementation, the method to declare a baseline is to set the `“$x-default-baselineâ€` property. + +The use of `“$x-default-baselineâ€` is temporary and will very likely change in the future, as we work on implementing custom registries. + +#### `$x-default-baseline` +Accepts a Git commit ID. Vcpkg will try to find a baseline file in the given commit ID and use that to set the baseline versions (lower bound versions) of all declared dependencies. + +When resolving version constraints for a package, vcpkg will look for a baseline version: +* First by looking at the baseline file in the given commit ID. +* If the given commit ID does not contain a baseline file, vcpkg will fallback to use the local baseline file instead. +* If there’s no local baseline file, vcpkg will use the version currently available in the ports directory. + +_NOTE: If a baseline file is found, but it does not contain an entry for the package, the vcpkg invocation will fail._ + +Example: +```json +{ + "name": "project", + "version": "1.0.0", + "dependencies": ["zlib", "fmt"], + "$x-default-baseline":"9fd3bd594f41afb8747e20f6ac9619f26f333cbe" +} +``` + +Baselines can be used without any other version constraints to obtain behavior close to using “classic†mode. + +### 4.2 Declaring minimum version constraints +A minimum version requirement puts a lower boundary on the versions that can be used to satisfy a dependency. This means that any version that is newer than the requirement is valid (including major version changes). + +Vcpkg will use the oldest identified version that can satisfy all the version requirements in a build graph. Using a minimum version approach has the following advantages: +* Is predictable and easy to understand. +* User controls when upgrades happen, as in, no upgrades are performed automatically when a new version is released. +* Avoids using a SAT solver. + +Minimum version requirements are expressed by using the `"version>="` property in the dependencies list. + +Example: +```json +{ + "name": "project", + "version-semver": "1.0.0", + "dependencies": [ + { "name": "zlib", "version>=": "1.2" }, + { "name": "rapidjson", "version>=": "2020-02-01" } + ] +} +``` + +### 4.3 Declaring port version constraints +To be consistent with the minimum version approach, vcpkg uses the lowest available port version that matches the package version. There are many scenarios where a higher port version is desirable, e.g.: support for new platforms, fixing installation issues, among others. + +As part of the dependency object a port version can be specified. An error will be emitted if a non-existent port-version for the given package version is requested. + +Example: +```json +{ + "name": "project", + "version-semver": "1.0.0", + "dependencies": [ + { "name": "zlib", "version>=": "1.2" }, + { "name": "rapidjson", "version=": "2020-02-01", "port-version": 2 } + ] +} +``` + +### 4.4 Declaring overrides +Overrides are declared as an array of package version declarations. + +For an override to take effect, the overridden package must form part of the dependency graph. That means that a dependency must be declared either by the top-level manifest or be part of a transitive dependency. + +Example: +```json +{ + "name": "project", + "version": "1.0.0", + "dependencies": ["cpprestsdk"], + "overrides": [{"name":"zlib", "version-semver":"1.2.10"}], + "$x-default-baseline":"9fd3bd594f41afb8747e20f6ac9619f26f333cbe" +} +``` + +In the previous example, `zlib` is not a direct dependency of the project but it is a dependency for `cpprestsdk`, so the override takes effect forcing `zlib` to version `1.2.10`. + +## 5 Design considerations + +### 5.1 Constraint resolution +Given a manifest with a set of versioned dependencies, vcpkg will attempt to calculate a package installation plan that satisfies all the constraints. Constraints can be declared in the top-level manifest but can also be added transitively by indirect dependencies. + +Vcpkg roughly follows the steps below to compute an installation plan, the installation plan will either contain a valid set of package versions, or a list of version conflicts. + +* Add all top-level constraints to the plan. +* Recursively add transitive constraints to the plan. +* Each time a constraint is added for a package, also add it’s baseline version as a minimum constraint. +* Each time a constraint is added: + * If an override exists for the package, select the version in the override. + * Otherwise: + * If there is no previous version selected. + * Select the minimal version that satisfies the constraint. + * If there is a previous version selected: + * If the versioning scheme of the new constraint does not match that of the previously selected version: + * Add a version conflict. + * If the constraint’s version is not comparable to the previously selected version. For example, comparing “version-string: apple†to “version-string: orangeâ€: + * Add a version conflict. + * If the constraints version is higher than the previously selected version: + * Select the highest version. + * Otherwise, keep the previous selection. +* Review the plan: + * If there are no conflicts, install the selected packages. + * Otherwise, report the conflicts to the user. + +### 5.2 Acquiring port versions +Although the concept of package versions has always been present in vcpkg, the concept of version constraints has been not. + +With the introduction of versioning constraints, it is now possible that a package depends on a port version that does not match the one available locally. This raises a problem as vcpkg needs to know how to acquire the port files for the requested version. + +To solve this problem, a new set of metadata needs to be introduced. This specification proposes a that a new "versions" folder is added as part of a registry. In the main vcpkg registry, this means a new root level versions directory. + +The versions directory, from here on referred as the versions database, will contain JSON files for each one of the ports available in the registry. Each file will list all the versions available for a package and contain a Git tree-ish object that vcpkg can check out to obtain that version’s portfiles. + +As part of the versioning implementation, a generator for these database files will be implemented. The generator will extract from our repository’s Git history, all the versions of each port that had been available at any moment in time and compile them into these database files. + +Example: generated `zlib.json` +```json +{ + "versions": [ + { + "git-tree": "2dfc991c739ab9f2605c2ad91a58a7982eb15687", + "version-string": "1.2.11", + "port-version": 9 + }, + { “$truncated for brevity†}, + { + "git-tree": "a516e5ee220c8250f21821077d0e3dd517f02631", + "version-string": "1.2.10", + "port-version": 0 + }, + { + "git-tree": "3309ec82cd96d752ff890c441cb20ef49b52bf94", + "version-string": "1.2.8", + "port-version": 0 + } + ] +} +``` + +For each port, its corresponding versions file should be located in `versions/{first letter of port name}-/{port name}.json`. For example, zlib’s version file will be located in `versions/z-/zlib.json`. +Aside from port version files, the current baseline file is located in `versions/baseline.json`. diff --git a/docs/tool-maintainers/testing.md b/docs/tool-maintainers/testing.md deleted file mode 100644 index 28cc9e09907818..00000000000000 --- a/docs/tool-maintainers/testing.md +++ /dev/null @@ -1,162 +0,0 @@ -Testing -======= - -Testing vcpkg is important whenever one makes changes to the tool itself, and -writing new tests and keeping them up to date is also very important. If one's -code is subtly broken, we'd rather find it out right away than a few weeks down -the line when someone complains! - -Running Tests -------------- - -Before anything else, we should know whether you can actually run the tests! -All you should need is a way to build vcpkg -- anything will do! All you have to -do is follow the guide 😄 - -With `$VCPKG_DIRECTORY` being the directory where you have cloned vcpkg, create -a build directory in `$VCPKG_DIRECTORY/toolsrc` (commonly named `out`), and -`cd` into it. Make sure to clean it out if it already exists! - -```sh -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -G Ninja -$ cmake --build . -$ ./vcpkg-test # ./vcpkg-test [$SPECIFIC_TEST] for a specific set of tests -$ # i.e., ./vcpkg-test [arguments] -``` - -If you make any modifications to `vcpkg`, you'll have to do the -`cmake --build .` step again. - -Writing Tests -------------- - -In your journey to write new tests, and to modify existing tests, reading the -[Catch2 documentation] will be very helpful! Come back after reading those 😀 - -You'll want to place your tests in one of the existing files, or, if it doesn't -belong in any of those, in a [new file](#adding-new-test-files). - -The layout of these tests is as follows: - -```cpp -// ... includes - -TEST_CASE("Name of test", "[filename without the .cpp]") { - // setup and the like - REQUIRE(some boolean expression); -} - -// etc. -``` - -You want to give these test cases good, descriptive, unique names, like -`SourceParagraph construct minimum` -- it doesn't need to be extremely clear -english, and shorthand is good, but make sure it's clear what the test is from -the name. For the latter parameter, known as "tags", you should at least put the -name of the file which the test case is in -- e.g., in `arguments.cpp`, you'd -tag all of the test cases with `[arguments]`. - -If you wish to add helper functions, make sure to place them in an anonymous -namespace -- this will ensure that they don't trample over anybody else's -space. Additionally, there are a few helper functions that live in -`` and `src/vcpkg-test/util.cpp` -- make sure to look into -them so that you're not rewriting functionality. - -That should be all you need to know to start writing your own tests! -Remember to check out the [Catch2 documentation] -if you'd like to get more advanced with your tests, -and good luck on your testing journey! - -Adding New Test Files ---------------------- - -Adding new test files should be easy and straightforward. All it requires is -creating a new source file in `toolsrc/src/vcpkg-test`, and then rerunning -`CMake` in order to pick up the glob changes. - -### Example - -Let's try writing a new test file called `example` (very creative, I know). - -First, we should create a file, `example.cpp`, in `toolsrc/src/vcpkg-test`: - -```cpp -// vcpkg-test/example.cpp -#include -``` - -This is the minimum file needed for tests; let's rebuild our CMake directory. -You'll have to clean out the existing `out` directory for CMake to rerun -globbing. - -```sh -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -G Ninja -# ... --- Build files have been written to: $VCPKG_DIRECTORY/toolsrc/out -$ cmake --build . -[80/80] Linking CXX executable vcpkg.exe -``` - -Okay, now let's make sure this worked; add a test case to `example.cpp`: - -```cpp -TEST_CASE("Example 1 - fail", "[example]") { - REQUIRE(false); -} -``` - -Now build the tests again, and run them: - -```sh -$ cmake --build . -[2/2] Linking CXX executable vcpkg-test.exe -$ ./vcpkg-test - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -vcpkg-test.exe is a Catch v2.9.1 host application. -Run with -? for options - -------------------------------------------------------------------------------- -Example 1 - fail -------------------------------------------------------------------------------- -$VCPKG_DIRECTORY/toolsrc/src/vcpkg-test/example.cpp(3) -............................................................................... - -$VCPKG_DIRECTORY/toolsrc/src/vcpkg-test/example.cpp(14): FAILED: - REQUIRE( false ) - -=============================================================================== -test cases: 102 | 101 passed | 1 failed -assertions: 3611 | 3610 passed | 1 failed -``` - -Hopefully, that worked! It should compile correctly, and have one failing test. -Now let's try a more complex test, after deleting the old one; - -```cpp -// add #include to the top of the file -namespace Strings = vcpkg::Strings; - -TEST_CASE("Example 2 - success", "[example]") { - std::string hello = "Hello"; - REQUIRE(Strings::case_insensitive_ascii_equals(hello, "hELLo")); - REQUIRE_FALSE(Strings::case_insensitive_ascii_starts_with(hello, "E")); -} -``` - -Now compile and build the tests, and this time let's only run our example tests: - -```sh -$ cmake --build . -[2/2] Linking CXX executable vcpkg-test.exe -$ ./vcpkg-test [example] -Filters: [example] -=============================================================================== -All tests passed (2 assertions in 1 test case) -``` - -Hopefully you have one test running and succeeding! If you have that, you have -succeeded at adding a new file to vcpkg's tests. Congratulations! Have fun on -the rest of your journey ðŸ±â€ðŸ‘¤ðŸ˜ - -[Catch2 documentation]: https://github.com/catchorg/Catch2/blob/master/docs/tutorial.md#top diff --git a/docs/users/android.md b/docs/users/android.md new file mode 100644 index 00000000000000..45b0cf6162ea72 --- /dev/null +++ b/docs/users/android.md @@ -0,0 +1,262 @@ +# Vcpkg and Android + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/android.md).** + +Android is not officially supported, and there are no official android triplets at the moment. + +However, some packages can compile to Android, and the situation is improving: see the list of [PR related to Android](https://github.com/Microsoft/vcpkg/pulls?q=+android+). + + +## Android build requirements + +1. Download the [android ndk](https://developer.android.com/ndk/downloads/) + +2. Set environment variable `ANDROID_NDK_HOME` to your android ndk installation. + For example: + +````bash +export ANDROID_NDK_HOME=/home/your-account/Android/Sdk/ndk-bundle +```` + +Or: +````bash +export ANDROID_NDK_HOME=/home/your-account/Android/android-ndk-r21b +```` + +3. Install [vcpkg](https://github.com/microsoft/vcpkg) + +4. Set environment variable `VCPKG_ROOT` to your vcpkg installation. +````bash +export VCPKG_ROOT=/path/to/vcpkg +```` + +## Create the android triplets + + +### Android ABI and corresponding vcpkg triplets + +There are four different Android ABI, each of which maps to +a vcpkg triplet. The following table outlines the mapping from vcpkg architectures to android architectures + +|VCPKG_TARGET_TRIPLET | ANDROID_ABI | +|---------------------------|----------------------| +|arm64-android | arm64-v8a | +|arm-android | armeabi-v7a | +|x64-android | x86_64 | +|x86-android | x86 | + +### Create the android triplets +You can copy-paste the script below to populate them, and adjust them to your needs if required. + +````bash +cd $VCPKG_ROOT + +echo " +set(VCPKG_TARGET_ARCHITECTURE arm) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_CMAKE_SYSTEM_NAME Android) +" > triplets/community/arm-android.cmake + +echo " +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_CMAKE_SYSTEM_NAME Android) +" > triplets/community/arm64-android.cmake + +echo " +set(VCPKG_TARGET_ARCHITECTURE x86) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_CMAKE_SYSTEM_NAME Android) +" > triplets/community/x86-android.cmake + +echo " +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_CMAKE_SYSTEM_NAME Android) +" > triplets/community/x64-android.cmake +```` + +## Install libraries for Android using vcpkg + +Example for jsoncpp: + +````bash +cd $VCPKG_ROOT + +# specify the triplet like this +./vcpkg install jsoncpp --triplet arm-android +# or like this +./vcpkg install jsoncpp:arm64-android +./vcpkg install jsoncpp:x86-android +./vcpkg install jsoncpp:x64-android +```` + +### Using Vulkan SDK + +Vcpkg has a [`vulkan` package](https://github.com/microsoft/vcpkg/blob/master/ports/vulkan/portfile.cmake) which allows you to `find_package(Vulkan)`. To use it you have to provide `VULKAN_SDK` environment variable. + +```bash +export VULKAN_SDK=/usr/local +./vcpkg install vulkan +``` + +NDK already contains [Vulkan](https://developer.android.com/ndk/guides/graphics/getting-started) headers and `libvulkan.so` binaries for each of its architecture. +To expose them to VcPkg, you can consider `export VULKAN_SDK=...` for each installation. +But by placing `set(ENV{VULKAN_SDK} ...)` in the triplet files, you can skip the tedious work. + +If you are using NDK 21.3.6528147 or earlier version, it will be like the following. + +```cmake +# In android triplets... (e.g. arm64-android.cmake) +set(VCPKG_CMAKE_SYSTEM_NAME Android) +# ... +# If your API level is 30, libvulkan.so is at $ENV{ANDROID_NDK_HOME}/platforms/android-30/arch-arm64/usr/lib +set(ENV{VULKAN_SDK} $ENV{ANDROID_NDK_HOME}/sysroot/usr) +``` + +Notice that **the location of the sysroot has changed since NDK 22**. (see https://github.com/android/ndk/issues/1407) +If you prefer using [the latest version](https://developer.android.com/studio/projects/install-ndk#default-ndk-per-agp), check the [BuildSystemMaintainers.md of the NDK document](https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#sysroot) and then put appropriate path for your system. + +For example, Mac OS users will use the path like this. + +```cmake +# In android triplets... (e.g. arm64-android.cmake) +set(VCPKG_CMAKE_SYSTEM_NAME Android) +# ... +# If your API level is 30, libvulkan.so is at $ENV{ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/aarch64-linux-android/30 +set(ENV{VULKAN_SDK} $ENV{ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr) +``` + +By doing this for all android triplets, you can install `vulkan` and the packages that require it. (e.g. `vulkan-hpp`) + +

+ `vcpkg install vulkan-hpp:arm64-android` + +```console +user@host$ ./vcpkg install vulkan-hpp:arm64-android +Computing installation plan... +The following packages will be built and installed: + * vulkan[core]:arm64-android -> 1.1.82.1-1 + vulkan-hpp[core]:arm64-android -> 2019-05-11-1 +Additional packages (*) will be modified to complete this operation. +Detecting compiler hash for triplet arm64-android... +... +Starting package 1/2: vulkan:arm64-android +Building package vulkan[core]:arm64-android... +-- Using community triplet arm64-android. This triplet configuration is not guaranteed to succeed. +-- [COMMUNITY] Loading triplet configuration from: /.../vcpkg/triplets/community/arm64-android.cmake +-- Querying VULKAN_SDK Environment variable +-- Searching /.../Library/Android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/vulkan/ for vulkan.h +-- Found vulkan.h +-- Performing post-build validation +-- Performing post-build validation done +... +Building package vulkan[core]:arm64-android... done +Installing package vulkan[core]:arm64-android... +Installing package vulkan[core]:arm64-android... done +Elapsed time for package vulkan:arm64-android: 35.9 ms +Starting package 2/2: vulkan-hpp:arm64-android +Building package vulkan-hpp[core]:arm64-android... +-- Using community triplet arm64-android. This triplet configuration is not guaranteed to succeed. +-- [COMMUNITY] Loading triplet configuration from: /.../vcpkg/triplets/community/arm64-android.cmake +-- Using cached /.../vcpkg/downloads/KhronosGroup-Vulkan-Hpp-5ce8ae7fd0d9c0543d02f33cfa8a66e6a43e2150.tar.gz +-- Cleaning sources at /.../vcpkg/buildtrees/vulkan-hpp/src/e6a43e2150-4f344cd911.clean. Use --editable to skip cleaning for the packages you specify. +-- Extracting source /.../vcpkg/downloads/KhronosGroup-Vulkan-Hpp-5ce8ae7fd0d9c0543d02f33cfa8a66e6a43e2150.tar.gz +-- Using source at /.../vcpkg/buildtrees/vulkan-hpp/src/e6a43e2150-4f344cd911.clean +-- Performing post-build validation +-- Performing post-build validation done +... +Building package vulkan-hpp[core]:arm64-android... done +Installing package vulkan-hpp[core]:arm64-android... +Installing package vulkan-hpp[core]:arm64-android... done +Elapsed time for package vulkan-hpp:arm64-android: 144.5 ms + +Total elapsed time: 1.013 s + +The package vulkan-hpp:arm64-android is header only and can be used from CMake via: + + find_path(VULKAN_HPP_INCLUDE_DIRS "vulkan/vulkan.hpp") + target_include_directories(main PRIVATE ${VULKAN_HPP_INCLUDE_DIRS}) + +``` + +
+ + +## Consume libraries using vpckg, cmake and the android toolchain + +1. Combine vcpkg and Android toolchains + +vcpkg and android both provide dedicated toolchains: +````bash +vcpkg_toolchain_file=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake +android_toolchain_file=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake +```` + +When using vcpkg, the vcpkg toolchain shall be specified first. + +However, vcpkg provides a way to preload and additional toolchain, with the VCPKG_CHAINLOAD_TOOLCHAIN_FILE option. + +````bash +cmake \ + -DCMAKE_TOOLCHAIN_FILE=$vcpkg_toolchain_file \ + -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$android_toolchain_file \ + ... +```` + +2. Specify the android abi and vcpkg triplet + +When compiling for android, you need to select a matching "android abi" / "vcpkg triplet" pair. + +For example: + +````bash +android_abi=armeabi-v7a +vcpkg_target_triplet=arm-android + +cmake + ... + -DVCPKG_TARGET_TRIPLET=$vcpkg_target_triplet \ + -DANDROID_ABI=$android_abi +```` + +### Test on an example + +The folder [docs/examples/vcpkg_android_example_cmake](../examples/vcpkg_android_example_cmake) provides a working example, with an android library that consumes the jsoncpp library: + +*Details* + +* The [CMakeLists](../examples/vcpkg_android_example_cmake/CMakeLists.txt) simply uses `find_package` and `target_link_library` + +* The [compile.sh](../examples/vcpkg_android_example_cmake/compile.sh) script enables you to select any matching pair of "android abi" / "vcpkg triplet" and to test the compilation + +* The dummy [my_lib.cpp](../examples/vcpkg_android_example_cmake/my_lib.cpp) file uses the jsoncpp library + +*Note*: this example only compiles an Android library, as the compilation of a full fledged Android App is beyond the scope of this document. + +### Test on an example, using [vcpkg_android.cmake](../examples/vcpkg_android_example_cmake_script/cmake/vcpkg_android.cmake) + +The folder [docs/examples/vcpkg_android_example_cmake_script](../examples/vcpkg_android_example_cmake_script) provides the same example, and uses a cmake script in order to simplify the usage. + +*Details* + +* The main [CMakeLists](../examples/vcpkg_android_example_cmake_script/CMakeLists.txt) loads [vcpkg_android.cmake](../examples/vcpkg_android_example_cmake_script/cmake/vcpkg_android.cmake) if the flag `VCPKG_TARGET_ANDROID` is set: +````cmake +if (VCPKG_TARGET_ANDROID) + include("cmake/vcpkg_android.cmake") +endif() +```` +*Important: place these lines before calling project() !* + +* The [compile.sh](../examples/vcpkg_android_example_cmake_script/compile.sh) script shows that it is then possible to compile for android using a simple cmake invocation, for example: +````bash +cmake .. -DVCPKG_TARGET_ANDROID=ON -DANDROID_ABI=armeabi-v7a +```` + +## Consume libraries using vpckg, and Android prefab Archives (AAR files) + +See [prefab.md](../specifications/prefab.md) diff --git a/docs/users/assetcaching.md b/docs/users/assetcaching.md new file mode 100644 index 00000000000000..1328bb2fe95b4e --- /dev/null +++ b/docs/users/assetcaching.md @@ -0,0 +1,58 @@ +# Asset Caching + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/assetcaching.md).** + +**Experimental feature: this may change or be removed at any time** + +Vcpkg can utilize mirrors to cache downloaded assets, ensuring continued operation even if the original source changes +or disappears. + +In-tool help is available via `vcpkg help assetcaching`. + +## Configuration + +Asset caching can be configured by setting the environment variable `X_VCPKG_ASSET_SOURCES` to a semicolon-delimited +list of source strings. Characters can be escaped using backtick (\`). + +### Valid source strings + +The `` optional parameter for certain strings controls how they will be accessed. It can be specified as `read`, +`write`, or `readwrite` and defaults to `read`. + +#### `clear` + +Syntax: `clear` + +Removes all previous sources + +#### `x-azurl` + +Syntax: `x-azurl,[,[,]]` + +Adds an Azure Blob Storage source, optionally using Shared Access Signature validation. URL should include the container +path and be terminated with a trailing `/`. SAS, if defined, should be prefixed with a `?`. Non-Azure servers will also +work if they respond to GET and PUT requests of the form: ``. As an example, if you set +`X_VCPKG_ASSET_SOURCES` to `x-azurl,https://mydomain.com/vcpkg/,token=abc123,readwrite` your server should respond to +`GET` and `PUT` requests of the form `https://mydomain.com/vcpkg/?token=abc123`. + +You can also use the filesystem (e.g. a network drive) via `file://` as asset cache. For example you then set +`X_VCPKG_ASSET_SOURCES` to `x-azurl,file:///Z:/vcpkg/assetcache/,,readwrite` when you have a network folder mounted at +`Z:/`. + +The workflow of this asset source is: + +1. Attemp to read from the mirror +2. (If step 1 failed) Read from the original url +3. (If step 2 succeeded) Write back to the mirror + +You can enable/disable steps 1 and 3 via the [``](#valid-source-strings) specifier and you can disable step 2 via +`x-block-origin` below. + +See also the [binary caching documentation for Azure Blob Storage](binarycaching.md#azure-blob-storage-experimental) for +more information on how to set up an `x-azurl` source. + +#### `x-block-origin` + +Syntax: `x-block-origin` + +Disables use of the original URLs in case the mirror does not have the file available. diff --git a/docs/users/binarycaching.md b/docs/users/binarycaching.md new file mode 100644 index 00000000000000..b058a6bf63c21f --- /dev/null +++ b/docs/users/binarycaching.md @@ -0,0 +1,283 @@ +# Binary Caching + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/binarycaching.md).** + +Libraries installed with vcpkg can always be built from source. However, that can duplicate work and waste time when working across multiple projects. + +Binary caching is a vcpkg feature that saves copies of library binaries in a shared location that can be accessed by vcpkg for future installs. This means that, as a user, you should only need to build dependencies from source once. If vcpkg is asked to install the same library with the same build configuration in the future, it will just copy the built binaries from the cache and finish the operation in seconds. + +Binary caching is especially effective when using Continuous Integration, since local developers can reuse the binaries produced during a CI run. It also greatly enhances the performance of "ephemeral" or "hosted" build agents, since all local changes are otherwise lost between runs. By using binary caching backed by a cloud service, such as GitHub, Azure, or many others, you can ensure your CI runs at maximum speed and only rebuilds your dependencies when they've changed. + +Caches can be hosted in a variety of environments. The most basic examples are a folder on the local machine or a network file share. Caches can also be stored in any NuGet feed (such as GitHub or Azure DevOps Artifacts), Azure Blob Storage*, or Google Cloud Storage*. + +\* (experimental) + +If your CI provider offers a native "caching" function, we recommend using both vcpkg binary caching and the native method for the most performant results. + +In-tool help is available via `vcpkg help binarycaching`. + +Table of Contents + - [Configuration](#configuration) + - [CI Examples](#ci-examples) + - [GitHub Packages](#github-packages) + - [Azure DevOps Artifacts](#azure-devops-artifacts) + - [Azure Blob Storage](#azure-blob-storage-experimental) + - [Google Cloud Storage](#google-cloud-storage-experimental) + - [NuGet Provider Configuration](#nuget-provider-configuration) + - [Implementation Notes](#implementation-notes-internal-details-subject-to-change-without-notice) + + +## Configuration + +Binary caching is configured via a combination of defaults, the environment variable `VCPKG_BINARY_SOURCES` (set to `;;...`), and the command line option `--binarysource=`. Source options are evaluated in order of defaults, then environment, then command line. Binary caching can be completely disabled by passing `--binarysource=clear` as the last command line option. + +By default, zip-based archives will be cached at the first valid location of: + +**Windows** +1. `%VCPKG_DEFAULT_BINARY_CACHE%` +2. `%LOCALAPPDATA%\vcpkg\archives` +3. `%APPDATA%\vcpkg\archives` + +**Non-Windows** +1. `$VCPKG_DEFAULT_BINARY_CACHE` +2. `$XDG_CACHE_HOME/vcpkg/archives` +3. `$HOME/.cache/vcpkg/archives` + +### Valid source strings (``) + +| form | description +|-----------------------------|--------------- +| `clear` | Removes all previous sources (including the default) +| `default[,]` | Adds the default file-based location +| `files,[,]` | Adds a custom file-based location +| `nuget,[,]` | Adds a NuGet-based source; equivalent to the `-Source` parameter of the NuGet CLI +| `nugetconfig,[,]` | Adds a NuGet-config-file-based source; equivalent to the `-Config` parameter of the NuGet CLI. This config should specify `defaultPushSource` for uploads. +| `nugettimeout,` | Specifies a timeout for NuGet network operations; equivalent to the `-Timeout` parameter of the NuGet CLI. +| `x-azblob,,[,]` | **Experimental: will change or be removed without warning**
Adds an Azure Blob Storage source. Uses Shared Access Signature validation. URL should include the container path. +| `interactive` | Enables interactive credential management for NuGet (for debugging; requires `--debug` on the command line) + +The `` optional parameter for certain sources controls whether they will be consulted for +downloading binaries (`read`)(default), whether on-demand builds will be uploaded to that remote (`write`), or both (`readwrite`). + +Additional configuration details for NuGet-based providers can be found below in [NuGet Provider Configuration](#nuget-provider-configuration). + +## CI Examples + +If your CI system of choice is not listed, we welcome PRs to add them! + +### GitHub Packages + +To use vcpkg with GitHub Packages, we recommend using the `NuGet` backend. + +>**NOTE 2020-09-21**: GitHub's hosted agents come with an older, pre-installed copy of vcpkg on the path that does not support the latest binary caching. This means that direct calls to `bootstrap-vcpkg` or `vcpkg` without a path prefix may call an unintended vcpkg instance. We recommend taking the following two steps to avoid issues if you want to use your own copy of vcpkg: +> 1. Run the equivalent of `rm -rf "$VCPKG_INSTALLATION_ROOT"` using `shell: 'bash'` +> 2. Always call `vcpkg` and `bootstrap-vcpkg` with a path prefix, such as `./vcpkg`, `vcpkg/vcpkg`, `.\bootstrap-vcpkg.bat`, etc + +```yaml +# actions.yaml +# +# In this example, vcpkg has been added as a submodule (`git submodule add https://github.com/Microsoft/vcpkg`). +env: + VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' + +matrix: + os: ['windows-2019', 'ubuntu-20.04'] + include: + - os: 'windows-2019' + triplet: 'x86-windows' + mono: '' + - os: 'ubuntu-20.04' + triplet: 'x64-linux' + # To run `nuget.exe` on non-Windows platforms, we must use `mono`. + mono: 'mono' + +steps: + # This step assumes `vcpkg` has been bootstrapped (run `./vcpkg/bootstrap-vcpkg`) + - name: 'Setup NuGet Credentials' + shell: 'bash' + # Replace with your organization name + run: > + ${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1` + sources add + -source "https://nuget.pkg.github.com//index.json" + -storepasswordincleartext + -name "GitHub" + -username "" + -password "${{ secrets.GITHUB_TOKEN }}" + + # Omit this step if you're using manifests + - name: 'vcpkg package restore' + shell: 'bash' + run: > + ./vcpkg/vcpkg install sqlite3 cpprestsdk --triplet ${{ matrix.triplet }} +``` + +If you're using [manifests](../specifications/manifests.md), you can omit the `vcpkg package restore` step: it will be run automatically as part of your build. + +More information about GitHub Packages' NuGet support is available on [GitHub Docs][github-nuget]. + +[github-nuget]: https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-dotnet-cli-for-use-with-github-packages + +### Azure DevOps Artifacts + +To use vcpkg with Azure DevOps Artifacts, we recommend using the `NuGet` backend. + +First, you need to ensure Artifacts has been enabled on your DevOps instance; this can be done by an Administrator through `Project Settings > General > Overview > Azure DevOps Services > Artifacts`. + +Next, you will need to create a feed for your project; see the [Azure DevOps Artifacts Documentation][devops-nuget] for more information. Your feed URL will be an `https://` link ending with `/nuget/v3/index.json`. + +```yaml +# azure-pipelines.yaml +variables: +- name: VCPKG_BINARY_SOURCES + value: 'clear;nuget,,readwrite' + +steps: +# Remember to add this task to allow vcpkg to upload archives via NuGet +- task: NuGetAuthenticate@0 +``` + +If you are using custom agents with a non-Windows OS, you will need to install Mono to run `nuget.exe` (`apt install mono-complete`, `brew install mono`, etc). + +More information about Azure DevOps Artifacts' NuGet support is available in the [Azure DevOps Artifacts Documentation][devops-nuget]. + +[devops-nuget]: https://docs.microsoft.com/en-us/azure/devops/artifacts/get-started-nuget?view=azure-devops + +### Azure Blob Storage (experimental) + +> Note: This is an experimental feature and may change or be removed at any time + +Vcpkg supports interfacing with Azure Blob Storage via the `x-azblob` source type. + +``` +x-azblob,,[,] +``` + +First, you need to create an Azure Storage Account as well as a container ([Quick Start Documentation](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal)]. + +Next, you will need to create a Shared Access Signature, which can be done from the storage account under Settings -> Shared access signature. This SAS will need: +- Allowed services: Blob +- Allowed resource types: Object +- Allowed permissions: Read, Create (if using `write` or `readwrite`) + +The blob endpoint plus the container must be passed as the `` and the generated SAS without the `?` prefix must be passed as the ``. + +Example: +``` +x-azblob,https://.blob.core.windows.net/,sv=2019-12-12&ss=b&srt=o&sp=rcx&se=2020-12-31T06:20:36Z&st=2020-12-30T22:20:36Z&spr=https&sig=abcd,readwrite +``` + +Vcpkg will attempt to avoid revealing the SAS during normal operations, however: +1. It will be printed in full if `--debug` is passed +2. It will be passed as a command line parameter to subprocesses, such as `curl.exe` + +### Google Cloud Storage (experimental) + +> Note: This is an experimental feature and may change or be removed at any time + +Vcpkg supports interfacing with Google Cloud Storage (GCS) via the `x-gcs` source type. + +``` +x-gcs,[,] +``` + +First, you need to create an Google Cloud Platform Account as well as a storage bucket ([GCS Quick Start](https://cloud.google.com/storage/docs/quickstart-gsutil)]. + +As part of this quickstart you would have configured the `gsutil` command-line tool to authenticate with Google Cloud. +Vcpkg will use this command-line tool, make sure it is in your search path for executables. + +Example 1 (using a bucket without a common prefix for the objects): + +``` +x-gcs,gs:///,readwrite +``` + +Example 2 (using a bucket and a prefix for the objects): + +``` +x-gcs,gs:///my-vcpkg-cache/maybe/with/many/slashes/,readwrite +x-gcs,gs:///my-vcpkg-cache/maybe/with`,commas/too!/,readwrite +``` + +Commas (`,`) are valid as part of a object prefix in GCS, just remember to escape them in the vcpkg configuration, as +shown in the previous example. Note that GCS does not have folders (some of the GCS tools simulate folders), it is not +necessary to create or otherwise manipulate the prefix used by your vcpkg cache. + +## NuGet Provider Configuration + +### Credentials + +Many NuGet servers require additional credentials to access. The most flexible way to supply credentials is via the `nugetconfig` provider with a custom `nuget.config` file. See https://docs.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds for more information on authenticating via `nuget.config`. + +However, it is still possible to authenticate against many servers using NuGet's built-in credential providers or via customizing your environment's default `nuget.config`. The default config can be extended via nuget client calls such as +``` +nuget sources add -Name MyRemote -Source https://... -Username $user -Password $pass +``` +and then passed to vcpkg via `--binarysource=nuget,MyRemote,readwrite`. You can get a path to the precise copy of NuGet used by vcpkg by running `vcpkg fetch nuget`, which will report something like: +``` +$ vcpkg fetch nuget +/vcpkg/downloads/tools/nuget-5.5.1-linux/nuget.exe +``` +Non-Windows users will need to call this through mono via `mono /path/to/nuget.exe sources add ...`. + +##### Credential Example for Azure Dev Ops +```bash +# On Linux or OSX +$ mono `vcpkg fetch nuget | tail -n1` sources add \ + -name ADO \ + -Source https://pkgs.dev.azure.com/$ORG/_packaging/$FEEDNAME/nuget/v3/index.json \ + -Username $USERNAME \ + -Password $PAT +$ export VCPKG_BINARY_SOURCES="nuget,ADO,readwrite" +``` +```powershell +# On Windows Powershell +PS> & $(vcpkg fetch nuget | select -last 1) sources add ` + -name ADO ` + -Source https://pkgs.dev.azure.com/$ORG/_packaging/$FEEDNAME/nuget/v3/index.json ` + -Username $USERNAME ` + -Password $PAT +PS> $env:VCPKG_BINARY_SOURCES="nuget,ADO,readwrite" +``` + +We recommend using a Personal Access Token (PAT) as the password for maximum security. You can generate a PAT in User Settings -> Personal Access Tokens or `https://dev.azure.com/$ORG/_usersSettings/tokens`. + +#### `metadata.repository` + +The `nuget` and `nugetconfig` source providers additionally respect certain environment variables while generating nuget packages. The `metadata.repository` field of any packages will be generated as: +``` + +``` +or +``` + +``` +if the appropriate environment variables are defined and non-empty. This is specifically used to associate packages in GitHub Packages with the _building_ project and not intended to associate with the original package sources. + +#### NuGet's cache + +NuGet's cache is not used by default. To use it for every nuget-based source, set the [environment variable](config-environment.md) `VCPKG_USE_NUGET_CACHE` to `true` (case-insensitive) or `1`. + +## Implementation Notes (internal details subject to change without notice) + +Binary caching relies on hashing everything that contributes to a particular package build. This includes: + +- Every file in the port directory +- The triplet file and name +- The C++ compiler executable +- The C compiler executable +- The set of features selected +- Every dependency's package hash (note: this is that package's input hash, not contents) +- All helper scripts referenced by `portfile.cmake` (heuristic) +- The version of CMake used +- The contents of any environment variables listed in `VCPKG_ENV_PASSTHROUGH` +- The hash of the toolchain file (builtin or `VCPKG_CHAINLOAD_TOOLCHAIN_FILE`) + +Despite this extensive list, it is possible to defeat the cache and introduce nondeterminism. If you have additional details that you'd like to be tracked, the easiest resolution is to generate a triplet file with your additional information in a comment. That additional information will be included in the package's input set and ensure a unique universe of binaries. + +The hashes used are stored in the package and in the current installed directory at `/share//vcpkg_abi_info.txt`. + +The original specification for binary caching is available [here](../specifications/binarycaching.md). diff --git a/docs/users/config-environment.md b/docs/users/config-environment.md index bffa072780710b..73dd64a2120e71 100644 --- a/docs/users/config-environment.md +++ b/docs/users/config-environment.md @@ -1,5 +1,7 @@ ## Environment and Configuration +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/config-environment.md).** + ### Environment Variables #### VCPKG_DOWNLOADS @@ -14,7 +16,7 @@ subject to change without notice and should be considered highly unstable. Non-exhaustive list of off-by-default features: -- `binarycaching` +- `manifest` #### EDITOR @@ -29,7 +31,7 @@ repo versions and executable versions can cause issues. #### VCPKG_VISUAL_STUDIO_PATH This environment variable can be set to the full path to a Visual Studio instance on the machine. This Visual Studio instance -will be used if the triplet does not override it via the [`VCPKG_VISUAL_STUDIO_PATH` triplet setting](triplets.md#VCPKG_VISUAL_STUDIO_PATH). +will be used if the triplet does not override it via the [`VCPKG_VISUAL_STUDIO_PATH`](triplets.md#VCPKG_VISUAL_STUDIO_PATH) triplet setting. Example: `D:\2017` @@ -37,13 +39,57 @@ Example: `D:\2017` This environment variable can be set to a triplet name which will be used for unqualified triplet references in command lines. +#### VCPKG_DEFAULT_HOST_TRIPLET + +This environment variable can be set to a triplet name which will be used for unqualified host port references in command lines and all host port references in dependency lists. See [the host-dependencies documentation](host-dependencies.md) for more information. + +#### VCPKG_OVERLAY_PORTS + +This environment variable allows users to override ports with alternate versions according to the +[ports overlay](../specifications/ports-overlay.md) specification. List paths to overlays using +the platform dependent PATH separator (Windows `;` | others `:`) + +Example (Windows): `C:\custom-ports\boost;C:\custom-ports\sqlite3` + +#### VCPKG_OVERLAY_TRIPLETS + +This environment variable allows users to add directories to search for triplets. +[Example: overlay triplets](../examples/overlay-triplets-linux-dynamic.md). +List paths to overlays using the platform dependent PATH separator (Windows `;`, others `:`) + #### VCPKG_FORCE_SYSTEM_BINARIES This environment variable, if set, suppresses the downloading of CMake and Ninja and forces the use of the system binaries. -### VCPKG_KEEP_ENV_VARS +#### VCPKG_KEEP_ENV_VARS This environment variable can be set to a list of environment variables, separated by `;`, which will be propagated to the build environment. Example: `FOO_SDK_DIR;BAR_SDK_DIR` + +#### VCPKG_MAX_CONCURRENCY + +This environment variables limits the amount of concurrency requested by underlying buildsystems. If unspecified, this defaults to logical cores + 1. + +#### VCPKG_DEFAULT_BINARY_CACHE + +This environment variable redirects the default location to store binary packages. See [Binary Caching](binarycaching.md#Configuration) for more details. + +#### VCPKG_BINARY_SOURCES + +This environment variable adds or removes binary sources. See [Binary Caching](binarycaching.md#Configuration) for more details. + +#### VCPKG_NUGET_REPOSITORY + +This environment variable changes the metadata of produced NuGet packages. See [Binary Caching](binarycaching.md#Configuration) for more details. + +#### VCPKG_USE_NUGET_CACHE + +This environment variable allows using NuGet's cache for every nuget-based binary source. See [Binary Caching](binarycaching.md#NuGets-cache) for more details. + +#### X_VCPKG_ASSET_SOURCES + +> Note: This is an experimental feature and may change or be removed at any time + +This environment variable allows using a private mirror for all SHA512-tagged assets. See [Asset Caching](assetcaching.md) for more details. diff --git a/docs/users/host-dependencies.md b/docs/users/host-dependencies.md new file mode 100644 index 00000000000000..6521d28dd961ba --- /dev/null +++ b/docs/users/host-dependencies.md @@ -0,0 +1,65 @@ +# Host Dependencies + +Tools used at build time by other ports to generate code or implement a custom build system can be packaged inside vcpkg. + +## Consuming + +When consuming a port as a tool, you must set the dependency's `"host"` field to true. For example: +```json +{ + "name": "contoso-http-library", + "version-string": "1.0.0", + "description": "Contoso's http runtime library", + "dependencies": [ + "contoso-core-library", + { + "name": "contoso-code-generator", + "host": true + }, + { + "name": "contoso-build-system", + "host": true + } + ] +} +``` +In this case, the `contoso-code-generator` and `contoso-build-system` (including any transitive dependencies) will be built and installed for the host triplet before `contoso-http-library` is built. + +>Note: Consumers must use `vcpkg.json` instead of `CONTROL` as their metadata format. You can easily convert an existing `CONTROL` file using `vcpkg format-manifest /path/to/CONTROL`. + +Then, within the portfile of the consumer (`contoso-http-library` in the example), the CMake variable `CURRENT_HOST_INSTALLED_DIR` will be defined to `installed/` and should be used to locate any required assets. In the example, `contoso-code-generator` might have installed `tools/contoso-code-generator/ccg.exe` which the consumer would add to its local path via +```cmake +# ports/contoso-http-library/portfile.cmake +vcpkg_add_to_path(${CURRENT_HOST_INSTALLED_DIR}/tools/contoso-code-generator) +``` + +## Specifying the Host Triplet + +The default host triplets are chosen based on the host architecture and operating system, for example `x64-windows`, `x64-linux`, or `x64-osx`. They can be overridden via: + +1. In CMake-based manifest mode, calling `set(VCPKG_HOST_TRIPLET "" CACHE STRING "")` before the first `project()` directive +2. In MSBuild-based manifest mode, setting the `VcpkgHostTriplet` property +3. On the command line, via the flag `--host-triplet=...` +4. The `VCPKG_DEFAULT_HOST_TRIPLET` environment variable + +## Producing + +Producing a tool has no special requirements; tools should be authored as a standard port, following all the normal policies and practices. Notably, they should build against `TARGET_TRIPLET`, not `HOST_TRIPLET` within the context of their portfile. + +Sometimes, it can be useful to determine whether the current context is a cross-compiling one or not. This should be done by comparing the strings `TARGET_TRIPLET` and `HOST_TRIPLET`. For example: + +```cmake +string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" I_AM_NOT_CROSSCOMPILING) + +if(TARGET_TRIPLET STREQUAL HOST_TRIPLET) + # This is a native build +else() + # This is a cross build +endif() +``` + +## Host-only ports + +Some ports are host-only: script ports and tool ports are common examples. +In this case, you can use the `"native"` supports expression to describe this. +This supports expression is true when `TARGET_TRIPLET == HOST_TRIPLET`. diff --git a/docs/users/integration.md b/docs/users/integration.md index cd5f61e9debb22..15a3072e3c7a1a 100644 --- a/docs/users/integration.md +++ b/docs/users/integration.md @@ -1,27 +1,33 @@ -## Buildsystem Integration - -Vcpkg offers many ways to integrate into your build so you can do what's right for your project. There are two main categories of integration: - -- [`integrate` command](#integrate) -- [`export` command](#export) - -Each integration style has heuristics to deduce the correct [triplet][]. This can be overridden using [a common method](#triplet-selection) based on your buildsystem. - - -### Integrate Command - -These link your project(s) to a specific copy of Vcpkg on your machine so any updates or new package installations will be instantly available for the next build of your project. - - -#### User-wide for MSBuild (Recommended for Open Source MSBuild projects) +# Buildsystem Integration + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/integration.md).** +## Table of Contents +- [MSBuild Integration (Visual Studio)](#msbuild-integration-visual-studio) + - [User-wide integration](#user-wide-integration) + - [Per-project Integration](#per-project-integration) + - [Changing the triplet](#msbuild-changing-the-triplet) +- [CMake Integration](#cmake-integration) + - [Using an environment variable instead of a command line option](#using-an-environment-variable-instead-of-a-command-line-option) + - [Using multiple toolchain files](#using-multiple-toolchain-files) + - [Changing the triplet](#cmake-changing-the-triplet) +- [Manual Compiler Setup](#manual-compiler-setup) +- [`export` Command](#export-command) + +The buildsystem-specific integration styles have heuristics to deduce the correct [triplet][]. This can be overridden in a native way for [MSBuild](#msbuild-changing-the-triplet) and [CMake](#cmake-changing-the-triplet). + +## MSBuild Integration (Visual Studio) + +**If you are using manifest mode(`vcpkg.json`) see [here](manifests.md#msbuild-integration) for additional configuration options.** +### User-wide integration ```no-highlight vcpkg integrate install ``` -This will implicitly add Include Directories, Link Directories, and Link Libraries for all packages installed with Vcpkg to all VS2015 and VS2017 MSBuild projects. We also add a post-build action for executable projects that will analyze and copy any DLLs you need to the output folder, enabling a seamless F5 experience. +This will implicitly add Include Directories, Link Directories, and Link Libraries for all packages installed with Vcpkg to all VS2015, VS2017 and VS2019 MSBuild projects. We also add a post-build action for executable projects that will analyze and copy any DLLs you need to the output folder, enabling a seamless F5 experience. For the vast majority of libraries, this is all you need to do -- just File -> New Project and write code! However, some libraries perform conflicting behaviors such as redefining `main()`. Since you need to choose per-project which of these conflicting options you want, you will need to add those libraries to your linker inputs manually. Here are some examples, though this is not an exhaustive list: + - Gtest provides `gtest`, `gmock`, `gtest_main`, and `gmock_main` - SDL2 provides `SDL2main` - SFML provides `sfml-main` @@ -29,9 +35,45 @@ Here are some examples, though this is not an exhaustive list: To get a full list for all your installed packages, run `vcpkg owns manual-link`. -#### CMake toolchain file (Recommended for Open Source CMake projects) +**If you are using manifest mode (`vcpkg.json`) see [here](manifests.md#msbuild-integration) for all available options.** + +### Per-project integration + +**Note: This approach is not recommended for new projects, since it makes them difficult to share with others.** + +**For a portable, self-contained NuGet package, see the [`export command`](#export-command)** + +We also provide individual VS project integration through a NuGet package. This will modify the project file, so we do not recommend this approach for open source projects. ```no-highlight -cmake ../my/project -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake +PS D:\src\vcpkg> .\vcpkg integrate project +Created nupkg: D:\src\vcpkg\scripts\buildsystems\vcpkg.D.src.vcpkg.1.0.0.nupkg + +With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: + Install-Package vcpkg.D.src.vcpkg -Source "D:/src/vcpkg/scripts/buildsystems" +``` +*Note: The generated NuGet package does not contain the actual libraries. It instead acts like a shortcut (or symlink) to the vcpkg install and will "automatically" update with any changes (install/remove) to the libraries. You do not need to regenerate or update the NuGet package.* + + + +### Changing the triplet +You can see the automatically deduced triplet by setting your MSBuild verbosity to Normal or higher: + +> *Shortcut: Ctrl+Q "build and run"* +> +> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity + +To override the automatically chosen [triplet][], you can specify the MSBuild property `VcpkgTriplet` in your `.vcxproj`. We recommend adding this to the `Globals` PropertyGroup. +```xml + + + x86-windows-static + x64-windows-static + +``` + +## CMake Integration +```no-highlight +cmake ../my/project -DCMAKE_TOOLCHAIN_FILE=[vcpkg-root]/scripts/buildsystems/vcpkg.cmake ``` Projects configured with the Vcpkg toolchain file will have the appropriate Vcpkg folders added to the cmake search paths. This makes all libraries available to be found through `find_package()`, `find_path()`, and `find_library()`. @@ -44,7 +86,11 @@ find_path(CATCH_INCLUDE_DIR NAMES catch.hpp PATH_SUFFIXES catch2) include_directories(${CATCH_INCLUDE_DIR}) ``` -##### Using an environment variable instead of a command line option +**If you are using manifest mode (`vcpkg.json`) see [here](manifests.md#cmake-integration) for all available options.** + +For different IDE integrations see [here](../../README.md#using-vcpkg-with-cmake). + +### Using an environment variable instead of a command line option The `CMAKE_TOOLCHAIN_FILE` setting simply must be set before the `project()` directive is first called. This means that you can easily read from an environment variable to avoid passing it on the configure line: @@ -57,7 +103,7 @@ endif() project(myproject CXX) ``` -##### Using multiple toolchain files +### Using multiple toolchain files To use an external toolchain file with a project using vcpkg, you can set the cmake variable `VCPKG_CHAINLOAD_TOOLCHAIN_FILE` on the configure line: ```no-highlight @@ -66,21 +112,40 @@ cmake ../my/project \ -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=../my/project/compiler-settings-toolchain.cmake ``` -#### Linking NuGet file +Alternatively, you can include the vcpkg toolchain at the end of the primary toolchain file: +```cmake +# MyToolchain.cmake +set(CMAKE_CXX_COMPILER ...) +set(VCPKG_TARGET_TRIPLET x64-my-custom-windows-triplet) +include(/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake) +``` +**Note: vcpkg does _not_ see the settings in your own triplets, such as your compiler or compilation flags. To change vcpkg's settings, you must make a [custom triplet file](triplets.md) (which can [share your own toolchain](triplets.md#VCPKG_CHAINLOAD_TOOLCHAIN_FILE))** -We also provide individual VS project integration through a NuGet package. This will modify the project file, so we do not recommend this approach for open source projects. + + +### Changing the triplet +You can set `VCPKG_TARGET_TRIPLET` on the configure line: ```no-highlight -PS D:\src\vcpkg> .\vcpkg integrate project -Created nupkg: D:\src\vcpkg\scripts\buildsystems\vcpkg.D.src.vcpkg.1.0.0.nupkg +cmake ../my/project -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=... +``` +If you use `VCPKG_DEFAULT_TRIPLET` [environment variable](config-environment.md) to control the unqualified triplet in vcpkg command lines you can default `VCPKG_TARGET_TRIPLET` in CMake like [Using an environment variable instead of a command line option](#using-an-environment-variable-instead-of-a-command-line-option): -With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: - Install-Package vcpkg.D.src.vcpkg -Source "D:/src/vcpkg/scripts/buildsystems" +```cmake +if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET) + set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "") +endif() ``` -*Note: The generated NuGet package does not contain the actual libraries. It instead acts like a shortcut (or symlink) to the vcpkg install and will "automatically" update with any changes (install/remove) to the libraries. You do not need to regenerate or update the NuGet package.* +Finally, if you have your own toolchain file, you can set `VCPKG_TARGET_TRIPLET` there: +```cmake +# MyToolchain.cmake +set(CMAKE_CXX_COMPILER ...) +set(VCPKG_TARGET_TRIPLET x64-my-custom-triplet) +``` + +## Manual Compiler Setup -#### Manual compiler settings +Libraries are installed into the `installed\` subfolder in classic mode, partitioned by triplet (e.g. x86-windows): -Libraries are installed into the `installed\` subfolder, partitioned by architecture (e.g. x86-windows): * The header files are installed to `installed\x86-windows\include` * Release `.lib` files are installed to `installed\x86-windows\lib` or `installed\x86-windows\lib\manual-link` * Release `.dll` files are installed to `installed\x86-windows\bin` @@ -89,18 +154,17 @@ Libraries are installed into the `installed\` subfolder, partitioned by architec See your build system specific documentation for how to use prebuilt binaries. -Generally, to run any produced executables you will also need to either copy the needed DLL files to the same folder as your executable or *prepend* the correct `bin\` directory to your path. +_On Windows dynamic triplets:_ To run any produced executables you will also need to either copy the needed DLL files to the same folder as your executable or *prepend* the correct `bin\` directory to your path. - -### Export Command +## Export Command This command creates a shrinkwrapped archive containing a specific set of libraries (and their dependencies) that can be quickly and reliably shared with build servers or other users in your organization. -- `--nuget`: NuGet package (Recommended for MSBuild projects) +- `--nuget`: NuGet package - `--zip`: Zip archive -- `--7zip`: 7Zip archive (Recommended for CMake projects) +- `--7zip`: 7Zip archive - `--raw`: Raw, uncompressed folder -Each of these have the same layout, which mimics the layout of a full vcpkg: +Each of these have the same internal layout which mimics the layout of a full vcpkg instance: - `installed\` contains the installed package files - `scripts\buildsystems\vcpkg.cmake` is a toolchain file suitable for use with CMake @@ -109,42 +173,5 @@ Additionally, NuGet packages will contain a `build\native\vcpkg.targets` that in Please also see our [blog post](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) for additional examples. - -### Triplet selection -Every integration mechanism besides manually adding the folders will deduce a [triplet][] for your project as one of: -- x86-windows -- x64-windows -- x86-uwp -- x64-uwp -- arm-uwp - -#### With MSBuild -You can see the automatically deduced triplet by setting your MSBuild verbosity to Normal or higher: - -> *Shortcut: Ctrl+Q "build and run"* -> -> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity - -To override the automatically chosen [triplet][], you can specify the MSBuild property `VcpkgTriplet` in your `.vcxproj`. We recommend adding this to the `Globals` PropertyGroup. -```xml - - - x86-windows-static - x64-windows-static - -``` - -#### With CMake -You can set `VCPKG_TARGET_TRIPLET` on the configure line: -```no-highlight -cmake ../my/project -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=... -``` -If you use `VCPKG_DEFAULT_TRIPLET` [environment variable](config-environment.md) to control the unqualified triplet in vcpkg command lines you can default `VCPKG_TARGET_TRIPLET` in CMake like [Using an environment variable instead of a command line option](#using-an-environment-variable-instead-of-a-command-line-option): - -```cmake -if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET) - set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "") -endif() -``` [triplet]: triplets.md diff --git a/docs/users/manifests.md b/docs/users/manifests.md new file mode 100644 index 00000000000000..0018ff375d4007 --- /dev/null +++ b/docs/users/manifests.md @@ -0,0 +1,513 @@ +# Manifest Mode + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/manifests.md).** + +vcpkg has two modes of consuming dependencies - classic mode and manifest mode. + +In classic mode, vcpkg produces an "installed" tree, whose contents are changed by explicit calls to `vcpkg install` or +`vcpkg remove`. The installed tree is intended for consumption by any number of projects: for example, installing a +bunch of libraries and then using those libraries from Visual Studio, without additional configuration. Because the +installed tree is not associated with an individual project, it's similar to tools like `brew` or `apt`, except that the +installed tree is vcpkg-installation-local, rather than global to a system or user. + +In manifest mode, an installed tree is associated with a particular project rather than the vcpkg installation. The set +of installed ports is controlled by editing the project's "manifest file", and the installed tree is placed in the +project directory or build directory. This mode acts more similarly to language package managers like Cargo, or npm. We +recommend using this manifest mode whenever possible, because it allows one to encode a project's dependencies +explicitly in a project file, rather than in the documentation, making your project much easier to consume. + +Manifest mode is in beta, but it can be used from the CMake or MSBuild integration, which will be stable when used via +things like `find_package`. This is the recommended way to use manifest mode. + +Check out the [manifest cmake example](../examples/manifest-mode-cmake.md) for an example project using CMake and +manifest mode. + +## Table of Contents + +- [Simple Example Manifest](#simple-example-manifest) +- [Manifest Syntax Reference](#manifest-syntax-reference) +- [Command Line Interface](#command-line-interface) +- [CMake Integration](#cmake-integration) +- [MSBuild Integration](#msbuild-integration) + +See also [the original specification](../specifications/manifests.md) for more low-level details. + +## Simple Example Manifest + +```json +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "name": "my-application", + "version": "0.15.2", + "dependencies": [ + "boost-system", + { + "name": "cpprestsdk", + "default-features": false + }, + "libxml2", + "yajl" + ] +} +``` + +## Manifest Syntax Reference + +A manifest is a JSON-formatted file named `vcpkg.json` which lies at the root of your project. +It contains all the information a person needs to know to get dependencies for your project, +as well as all the metadata about your project that a person who depends on you might be interested in. + +Manifests follow strict JSON: they can't contain C++-style comments (`//`) nor trailing commas. However +you can use field names that start with `$` to write your comments in any object that has a well-defined set of keys. +These comment fields are not allowed in any objects which permit user-defined keys (such as `"features"`). + +Each manifest contains a top level object with the fields documented below; the most important ones are +[`"name"`](#name), the [version fields](#version-fields), and [`"dependencies"`](#dependencies): + +### `"name"` + +This is the name of your project! It must be formatted in a way that vcpkg understands - in other words, +it must be lowercase alphabetic characters, digits, and hyphens, and it must not start nor end with a hyphen. +For example, `Boost.Asio` might be given the name `boost-asio`. + +This is a required field. + +### Version fields + +There is, at this point, only one version field - `"version-string"`. However, more will be added in the future. +You must have one (and only one) version field. There are different reasons to use each version field: + +* `"version-string"` - used for packages that don't have orderable versions. This is pretty uncommon, + but since we don't have any versioning constraints yet, this is the only one that you can use. + +Additionally, the `"port-version"` field is used by registries of packages, +as a way to version "the package gotten from `vcpkg install`" differently from the upstream package version. +You shouldn't need to worry about this at all. + +#### Additional version fields + +**Experimental behind the `versions` feature flag** + +See [versioning](versioning.md#version-schemes) for additional version types. + +### `"description"` + +This is where you describe your project. Give it a good description to help in searching for it! +This can be a single string, or it can be an array of strings; +in the latter case, the first string is treated as a summary, +while the remaining strings are treated as the full description. + +### `"builtin-baseline"` + +**Experimental behind the `versions` feature flag** + +This field indicates the commit of vcpkg which provides global minimum version information for your manifest. It is required for top-level manifest files using versioning. + +See also [versioning](versioning.md#builtin-baseline) for more semantic details. + +### `"dependencies"` + +This field lists all the dependencies you'll need to build your library (as well as any your dependents might need, +if they were to use you). It's an array of strings and objects: + +* A string dependency (e.g., `"dependencies": [ "zlib" ]`) is the simplest way one can depend on a library; + it means you don't depend on a single version, and don't need to write down any more information. +* On the other hand, an object dependency (e.g., `"dependencies": [ { "name": "zlib" } ]`) + allows you to add that extra information. + +#### Example: + +```json +"dependencies": [ + { + "name": "arrow", + "default-features": false, + "features": [ "json" ] + }, + "boost-asio", + "openssl", + { + "name": "picosha2", + "platform": "!windows" + } +] +``` + +#### `"name"` Field + +The name of the dependency. This follows the same restrictions as the [`"name"`](#name) property for a project. + +#### `"features"` and `"default-features"` Fields + +`"features"` is an array of feature names which tell you the set of features that the +dependencies need to have at a minimum, +while `"default-features"` is a boolean that tells vcpkg whether or not to +install the features the package author thinks should be "most common for most people to use". + +For example, `ffmpeg` is a library which supports many, many audio and video codecs; +however, for your specific project, you may only need mp3 encoding. +Then, you might just ask for: + +```json +{ + "name": "ffmpeg", + "default-features": false, + "features": [ "mp3lame" ] +} +``` + +#### `"platform"` Field + +The `"platform"` field defines the platforms where the dependency should be installed - for example, +you might need to use sha256, and so you use platform primitives on Windows, but `picosha2` on non-Windows platforms. + +```json +{ + "name": "picosha2", + "platform": "!windows" +} +``` + +This is a string field which takes boolean expressions of the form ``, +`!expression`, `expression { & expression & expression...}`, and `expression { | expression | expression...}`, +along with parentheses to denote precedence. +For example, a dependency that's only installed on the Windows OS, for the ARM64 architecture, +and on Linux on x64, would be written `(windows & arm64) | (linux & x64)`. + +The common identifiers are: + +- The operating system: `windows`, `uwp`, `linux`, `osx` (includes macOS), `android`, `emscripten` +- The architecture: `x86`, `x64`, `wasm32`, `arm64`, `arm` (includes both arm32 and arm64 due to backwards compatibility) + +although one can define their own. + +#### `"version>="` Field + +**Experimental behind the `versions` feature flag** + +A minimum version constraint on the dependency. + +This field specifies the minimum version of the dependency using a '#' suffix to denote port-version if non-zero. + +See also [versioning](versioning.md#version-1) for more semantic details. + +### `"overrides"` + +**Experimental behind the `versions` feature flag** + +This field enables version resolution to be ignored for certain dependencies and to use specific versions instead. + +See also [versioning](versioning.md#overrides) for more semantic details. + +#### Example: + +```json + "overrides": [ + { + "name": "arrow", "version": "1.2.3", "port-version": 7 + } + ] +``` + +### `"supports"` + +If your project doesn't support common platforms, you can tell your users this with the `"supports"` field. +It uses the same platform expressions as [`"platform"`](#platform), from dependencies, as well as the +`"supports"` field of features. +For example, if your library doesn't support linux, you might write `{ "supports": "!linux" }`. + + +### `"features"` and `"default-features"` + +The `"features"` field defines _your_ project's optional features, that others may either depend on or not. +It's an object, where the keys are the names of the features, and the values are objects describing the feature. +`"description"` is required, +and acts exactly like the [`"description"`](#description) field on the global package, +and `"dependencies"` are optional, +and again act exactly like the [`"dependencies"`](#dependencies) field on the global package. +There's also the `"supports"` field, +which again acts exactly like the [`"supports"`](#supports) field on the global package. + +You also have control over which features are default, if a person doesn't ask for anything specific, +and that's the `"default-features"` field, which is an array of feature names. + +#### Example: + +```json +{ + "name": "libdb", + "version": "1.0.0", + "description": [ + "An example database library.", + "Optionally can build with CBOR, JSON, or CSV as backends." + ], + "$default-features-explanation": "Users using this library transitively will get all backends automatically", + "default-features": [ "cbor", "csv", "json" ], + "features": { + "cbor": { + "description": "The CBOR backend", + "dependencies": [ + { + "$explanation": [ + "This is how you tell vcpkg that the cbor feature depends on the json feature of this package" + ], + "name": "libdb", + "default-features": false, + "features": [ "json" ] + } + ] + }, + "csv": { + "description": "The CSV backend", + "dependencies": [ + "fast-cpp-csv-parser" + ] + }, + "json": { + "description": "The JSON backend", + "dependencies": [ + "jsoncons" + ] + } + } +} +``` + +## Command Line Interface + +**Experimental behind the `manifests` feature flag** + +When invoked from any subdirectory of the directory containing `vcpkg.json`, `vcpkg install` with no package arguments +will install all manifest dependencies into `/vcpkg_installed/`. Most of `vcpkg +install`'s classic mode parameters function the same in manifest mode. + +### `--x-install-root=` + +**Experimental and may change or be removed at any time** + +Specifies an alternate install location than `/vcpkg_installed/`. + +### `--triplet=` + +Specify the triplet to be used for installation. + +Defaults to the same default triplet as in classic mode. + +### `--x-feature=` + +**Experimental and may change or be removed at any time** + +Specify an additional feature from the `vcpkg.json` to install dependencies from. + +### `--x-no-default-features` + +**Experimental and may change or be removed at any time** + +Disables automatic activation of all default features listed in the `vcpkg.json`. + +### `--x-manifest-root=` + +**Experimental and may change or be removed at any time** + +Specifies the directory containing `vcpkg.json`. + +Defaults to searching upwards from the current working directory. + +## CMake Integration + +Our [CMake Integration](integration.md#cmake) will automatically detect a `vcpkg.json` manifest file in the same +directory as the top-level `CMakeLists.txt` (`${CMAKE_SOURCE_DIR}/vcpkg.json`) and activate manifest mode. Vcpkg will be +automatically bootstrapped if missing and invoked to install your dependencies into your local build directory +(`${CMAKE_BINARY_DIR}/vcpkg_installed`). + +### Configuration + +All vcpkg-affecting variables must be defined before the first `project()` directive, such as via the command line or +`set()` statements. + +#### `VCPKG_TARGET_TRIPLET` + +This variable controls which triplet dependencies will be installed for. + +If unset, vcpkg will automatically detect an appropriate default triplet given the current compiler settings. + +#### `VCPKG_HOST_TRIPLET` + +This variable controls which triplet host dependencies will be installed for. + +If unset, vcpkg will automatically detect an appropriate native triplet (x64-windows, x64-osx, x64-linux). + +See also [Host Dependencies](host-dependencies.md). + +#### `VCPKG_MANIFEST_MODE` + +This variable controls whether vcpkg operates in manifest mode or in classic mode. To disable manifest mode even with a +`vcpkg.json`, set this to `OFF`. + +Defaults to `ON` when `VCPKG_MANIFEST_DIR` is non-empty or `${CMAKE_SOURCE_DIR}/vcpkg.json` exists. + +#### `VCPKG_MANIFEST_DIR` + +This variable can be defined to specify an alternate folder containing your `vcpkg.json` manifest. + +Defaults to `${CMAKE_SOURCE_DIR}` if `${CMAKE_SOURCE_DIR}/vcpkg.json` exists. + +#### `VCPKG_MANIFEST_INSTALL` + +This variable controls whether vcpkg will be automatically run to install your dependencies during your configure step. + +Defaults to `ON` if `VCPKG_MANIFEST_MODE` is `ON`. + +#### `VCPKG_BOOTSTRAP_OPTIONS` + +This variable can be set to additional command parameters to pass to `./bootstrap-vcpkg` (run in automatic restore mode +if the vcpkg tool does not exist). + +#### `VCPKG_OVERLAY_TRIPLETS` + +This variable can be set to a list of paths to be passed on the command line as `--overlay-triplets=...` + +#### `VCPKG_OVERLAY_PORTS` + +This variable can be set to a list of paths to be passed on the command line as `--overlay-ports=...` + +#### `VCPKG_MANIFEST_FEATURES` + +This variable can be set to a list of features to treat as active when installing from your manifest. + +For example, Features can be used by projects to control building with additional dependencies to enable tests or +samples: + +```json +{ + "name": "mylibrary", + "version": "1.0", + "dependencies": [ "curl" ], + "features": { + "samples": { + "description": "Build Samples", + "dependencies": [ "fltk" ] + }, + "tests": { + "description": "Build Tests", + "dependencies": [ "gtest" ] + } + } +} +``` +```cmake +# CMakeLists.txt + +option(BUILD_TESTING "Build tests" OFF) +if(BUILD_TESTING) + list(APPEND VCPKG_MANIFEST_FEATURES "tests") +endif() + +option(BUILD_SAMPLES "Build samples" OFF) +if(BUILD_SAMPLES) + list(APPEND VCPKG_MANIFEST_FEATURES "samples") +endif() + +project(myapp) + +# ... +``` + +#### `VCPKG_MANIFEST_NO_DEFAULT_FEATURES` + +This variable controls whether to automatically activate all default features in addition to those listed in +`VCPKG_MANIFEST_FEATURES`. If set to `ON`, default features will not be automatically activated. + +Defaults to `OFF`. + +#### `VCPKG_INSTALL_OPTIONS` + +This variable can be set to a list of additional command line parameters to pass to the vcpkg tool during automatic +installation. + +#### `VCPKG_PREFER_SYSTEM_LIBS` + +This variable controls whether vcpkg will appends instead of prepends its paths to `CMAKE_PREFIX_PATH`, `CMAKE_LIBRARY_PATH` and `CMAKE_FIND_ROOT_PATH` so that vcpkg libraries/packages are found after toolchain/system libraries/packages. + +Defaults to `OFF`. + +#### `VCPKG_FEATURE_FLAGS` + +This variable can be set to a list of feature flags to pass to the vcpkg tool during automatic installation to opt-in to +experimental behavior. + +See the `--feature-flags=` command line option for more information. + +## MSBuild Integration + +To use manifests with MSBuild, first you need to use an [existing integration method](integration.md#with-msbuild). +Then, add a vcpkg.json above your project file (such as in the root of your source repository) and set the +property `VcpkgEnableManifest` to `true`. You can set this property via the IDE in `Project Properties -> Vcpkg -> Use +Vcpkg Manifest`. + +As part of your project's build, vcpkg automatically be run and install any listed dependencies to `vcpkg_installed/` +adjacent to the `vcpkg.json` file; these files will then automatically be included in and linked to your MSBuild +projects. + +Note: It is critical that all project files in a single build consuming the same `vcpkg.json` use the same triplet; if +you need to use different triplets for different projects in your solution, they must consume from different +`vcpkg.json` files. + +### Known issues + +* Visual Studio 2015 does not correctly track edits to the `vcpkg.json` and `vcpkg-configuration.json` files, and will +not respond to changes unless a `.cpp` is edited. + +### MSBuild Properties + +When using Visual Studio 2015 integration, these properties can be set in your project file before the + + + +line, which unfortunately requires manual editing of the `.vcxproj` or passing on the msbuild command line with `/p:`. +With 2017 or later integration, These properties can additionally be set via the Visual Studio GUI under +`Project Properties -> Vcpkg` or via a common `.props` file imported between `Microsoft.Cpp.props` and +`Microsoft.Cpp.targets`. + +#### `VcpkgEnabled` (Use Vcpkg) + +This can be set to "false" to explicitly disable vcpkg integration for the project + +#### `VcpkgTriplet` (Triplet) + +This can be set to a custom triplet to use for integration (such as x64-windows-static) + +#### `VcpkgHostTriplet` (Host Triplet) + +This can be set to a custom triplet to use for resolving host dependencies. + +If unset, this will default to the "native" triplet (x64-windows, x64-osx, x64-linux). + +See also [Host Dependencies](host-dependencies.md). + +#### `VcpkgAdditionalInstallOptions` (Additional Options) + +When using a manifest, this option specifies additional command line flags to pass to the underlying vcpkg tool +invocation. This can be used to access features that have not yet been exposed through another option. + +#### `VcpkgConfiguration` (Vcpkg Configuration) + +If your configuration names are too complex for vcpkg to guess correctly, you can assign this property to `Release` or +`Debug` to explicitly tell vcpkg what variant of libraries you want to consume. + +#### `VcpkgEnableManifest` (Use Vcpkg Manifest) + +This property must be set to true in order to consume from a local vcpkg.json file. If set to false, any local +vcpkg.json files will be ignored. This will default to true in the future. + +#### `VcpkgManifestInstall` (Install Vcpkg Dependencies) + +*(Requires `Use Vcpkg Manifest` set to `true`)* + +This property can be set to "false" to disable automatic dependency restoration on project build. Dependencies can be +manually restored via the vcpkg command line. + +#### `VcpkgInstalledDir` (Installed Directory) + +This property defines the location where headers and binaries are consumed from. In manifest mode, this directory is +created and populated based on your manifest. diff --git a/docs/users/mingw.md b/docs/users/mingw.md new file mode 100644 index 00000000000000..0a6c7ef6770623 --- /dev/null +++ b/docs/users/mingw.md @@ -0,0 +1,153 @@ +# Vcpkg and Mingw-w64 + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/mingw.md).** + +*MinGW is community-supported and not tested as part of vcpkg repository's CI process.* + +## Table of Contents + + - [Mingw-w64 community triplets](#Mingw-w64-community-triplets) + - [Using Mingw-w64 natively on Windows](#Using-Mingw-w64-natively-on-Windows) + - [How to avoid mixing different installations](#How-to-avoid-mixing-different-installations) + - [Using Mingw-w64 to build Windows programs on other systems](#Using-Mingw-w64-to-build-Windows-programs-on-other-systems) + +## Mingw-w64 community triplets + +Vcpkg includes +[x64, x86, arm64 and arm community triplets](https://github.com/microsoft/vcpkg/tree/master/triplets/community) +for [Mingw-w64](http://mingw-w64.org/). They don't depend on Visual Studio and +can be used natively on Windows as well as for cross-compiling on +other operating systems. There are two variants of each triplet, +selecting between static and dynamic linking. The actual tools +(g++ etc.) are expected to be named with particular prefixes. + +| architecture | vcpkg community triplets | tool name prefix | +|--------------|-----------------------------------------|----------------------| +| x64 | x64-mingw-dynamic, x64-mingw-static | x86_64-w64-mingw32- | +| x86 | x86-mingw-dynamic, x86-mingw-static | i686-w64-mingw32- | +| arm64 | arm64-mingw-dynamic, arm64-mingw-static | aarch64-w64-mingw32- | +| arm | arm-mingw-dynamic, arm-mingw-static | armv7-w64-mingw32- | + +These triplets are not tested by continuous integration, so many ports +do not build, and even existing ports may break on port updates. +Because of this, community involvement is paramount! + +- [Discussions](https://github.com/microsoft/vcpkg/discussions?discussions_q=mingw) +- [Open issues](https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+mingw) +- [Open pull requests](https://github.com/microsoft/vcpkg/pulls?q=is%3Apr+is%3Aopen+mingw) + +## Using Mingw-w64 natively on Windows + +With [MSYS2](https://www.msys2.org/), it is possible to easily create +a full environment for building ports with Mingw-w64 on a Windows PC. + +Note that for building software for native windows environments, you +must use a mingw subsystem of MSYS2, and install some packages +(with a specific prefix) for this subsystem. + +| architecture | vcpkg triplets | subsystem | package prefix | +|--------------|-------------------------------------|-----------|-------------------| +| x64 | x64-mingw-dynamic, x64-mingw-static | mingw64 | mingw-w64-x86_64- | +| x86 | x86-mingw-dynamic, x86-mingw-static | mingw32 | mingw-w64-i686- | + +After the basic installation of MSYS2, you will need to install a few +additional packages for software development, e.g. for x64: + +```bash +pacman -S --needed git base-devel mingw-w64-x86_64-toolchain +``` + +The active subsystem is selected by running the MSYS2 MinGW app, or +changed in a running terminal by + +```bash +source shell mingw64 # for x64, or "mingw32" for x86 +``` + +The bootstrapping of vcpkg shall be done by running bootstrap-vcpkg.bat. +This will download the official vcpkg.exe. + +```bash +git clone https://github.com/microsoft/vcpkg.git +cd vcpkg +./bootstrap-vcpkg.bat +``` + +For building packages, you need to tell vcpkg that you want to use the +mingw triplet. This can be done in different ways. When Visual Studio +is not installed, you must also set the host triplet to mingw. This is +needed to resolve host dependencies. For convenience, you can use +environment variables to set both triplets: + +```bash +export VCPKG_DEFAULT_TRIPLET=x64-mingw-dynamic +export VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-dynamic +``` + +Now you can test your setup: + +```bash +./vcpkg install zlib +``` + +### How to avoid mixing different installations + +[The MSYS2 project explicitly warns](https://www.msys2.org/wiki/MSYS2-introduction/#path) +that "mixing in programs from other MSYS2 installations, Cygwin installations, +compiler toolchains or even various other programs is not supported and will +probably break things in unexpected ways." For example, the proper passing of +command line arguments with quoting and escaping may fail. + +But Vcpkg ports implicitly create MSYS2 installations, e.g. for `pkg-config` +and for various other build tools needed to deal with packages based on +autoconf. In particular, when ports prepend the directory of tools to the +`PATH` environment variable, this may change which tool with a particular +name is actually invoked, and how arguments are passed between tools. + +To mitigate such issues when working with a full MSYS2 installation, +try to keep the directories of the msys subsystem (`/usr/bin`, `bin`) +out of the `PATH` environment variable as found by vcpkg. In bash, you +may modify the `PATH` just for a single call of vcpkg: + +```bash +PATH="${PATH/:\/usr\/bin:\/bin:/:}" ./vcpkg install libpq +``` + +Alternatively, you may run vcpkg from a regular Command Prompt, after +adding *only* the desired mingw directory (e.g. `C:\msys64\mingw64\bin`) +to the `PATH`. + +When using vcpkg for CI with standard images on Azure Pipelines, Github Actions +or similar, note that the default `PATH` might contain more directories +which create a mix of MSYS2 programs from different installations. You may +want to set the desired `PATH` manually, or remove directories which contain +`sh.exe`, `bash.exe`, `msys-2.0.dll` or `cygwin1.dll`. + +## Using Mingw-w64 to build Windows programs on other systems + +You can use the vcpkg mingw community triplets with toolchains on +non-Windows computers to cross-compile software to be run on Windows. +Many Linux distributions offer such toolchains in optional packages +with a mingw-w64 [suffix](https://repology.org/projects/?search=-mingw-w64) +or [prefix](https://repology.org/projects/?search=mingw-w64-). +As an example, for Debian-based distributions, you would start with +this installation command for the x64 toolchain: + +``` +sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 +``` + +Note that the packaged versions of Mingw-w64 toolchains on Linux distributions +might be older releases which lack some useful features or bug fixes. +An alternative independent toolchain is offered by [MXE](https://mxe.cc/). + +For vcpkg bootstrapping, clone the github repository and run the +`bootstrap-vcpkg.sh` script: + +```bash +git clone https://github.com/microsoft/vcpkg.git +cd vcpkg +./bootstrap-vcpkg.sh +./vcpkg install zlib:x64-mingw-dynamic +``` + diff --git a/docs/users/registries.md b/docs/users/registries.md new file mode 100644 index 00000000000000..53db7cb1f429fd --- /dev/null +++ b/docs/users/registries.md @@ -0,0 +1,135 @@ +# Using Registries + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/registries.md).** + +There are two parts to using registries; this documents the use side of the +relationship. In order to learn more about creating registries for others to +use, please read [this documentation](../maintainers/registries.md). + +## Table of Contents + +- [Using Registries](#using-registries) + - [Table of Contents](#table-of-contents) + - [`vcpkg-configuration.json`](#vcpkg-configurationjson) + - [Registry Objects](#registry-objects) + - [Registry Objects: `"kind"`](#registry-objects-kind) + - [Registry Objects: `"baseline"`](#registry-objects-baseline) + - [Registry Objects: `"repository"`](#registry-objects-repository) + - [Registry Objects: `"path"`](#registry-objects-path) + - [Configuration: `"default-registry"`](#configuration-default-registry) + - [Configuration: `"registries"`](#configuration-registries) + - [Example Configuration File](#example-configuration-file) + - [Package Name Resolution](#package-name-resolution) + - [Versioning Support](#versioning-support) + +## `vcpkg-configuration.json` + +From a high level perspective, everything that a project needs to define +about registries is contained in the vcpkg configuration file. In classic +mode, the configuration file lies in the vcpkg root; for manifest mode, +the file must exist next to the project's `vcpkg.json` file. +This file is named `vcpkg-configuration.json`, and it's a simple top-level +object file. + +### Registry Objects + +Registries are defined in JSON as objects. They must contain at least the +`"kind"` and `"baseline"` fields, and additionally the different kinds of +registry will have their own way of defining where the registry can be found: + +- git registries require the `"repository"` field +- filesystem registries require the `"path"` field +- built-in registries do not require a field, since there is only one + built-in registry. + +#### Registry Objects: `"kind"` + +The `"kind"` field must be a string: + +- For git registries: `"git"` +- For filesystem registries: `"filesystem"` +- For the builtin registry: `"builtin"` + +#### Registry Objects: `"baseline"` + +The `"baseline"` field must be a string. For git registries and for the +built-in registry, it should be a 40-character commit ID. +For filesystem registries, it can be any string that the registry defines. + +#### Registry Objects: `"repository"` + +This should be a string, of any repository format that git understands: + +- `"https://github.com/microsoft/vcpkg"` +- `"git@github.com:microsoft/vcpkg"` +- `"/dev/vcpkg-registry"` + +#### Registry Objects: `"path"` + +This should be a path; it can be either absolute or relative; relative paths +will be based at the directory the `vcpkg-configuration.json` lives in. + +### Configuration: `"default-registry"` + +The `"default-registry"` field should be a registry object. It defines +the registry that is used for all packages that are not claimed by any +package registries. It may also be `null`, in which case no packages that +are not claimed by package registries may be installed. + +### Configuration: `"registries"` + +The `"registries"` field should be an array of registry objects, each of +which additionally contain a `"packages"` field, which should be an array of +package names. These define the package registries, which are used for +the specific packages named by the `"packages"` field. + +The `"packages"` fields of all the package registries must be disjoint. + +### Example Configuration File + +Let's assume that you have mirrored at +: this will be your default registry. +Additionally, you want to use North Wind Trader's registry for their +beison and beicode libraries. The following `vcpkg-configuration.json` +will work: + +```json +{ + "default-registry": { + "kind": "git", + "repository": "https://git.example.com/vcpkg", + "baseline": "eefee7408133f3a0fef711ef9c6a3677b7e06fd7" + }, + "registries": [ + { + "kind": "git", + "repository": "https://github.com/northwindtraders/vcpkg-registry", + "baseline": "dacf4de488094a384ca2c202b923ccc097956e0c", + "packages": [ "beicode", "beison" ] + } + ] +} +``` + +## Package Name Resolution + +The way package name resolution works in vcpkg is fairly distinct from many +package managers. It is very carefully designed to _never_ implicitly choose +the registry that a package is fetched from. Just from +`vcpkg-configuration.json`, one can tell exactly from which registry a +package definition will be fetched from. + +The name resolution algorithm is as follows: + +- If there is a package registry that claims the package name, + use that registry; otherwise +- If there is a default registry defined, use that registry; otherwise +- If the default registry is set to `null`, error out; otherwise +- use the built-in registry. + +### Versioning Support + +Versioning with custom registries works exactly as it does in the built-in +registry. You can read more about that in the [versioning documentation]. + +[versioning documentation]: versioning.md \ No newline at end of file diff --git a/docs/users/selecting-library-features.md b/docs/users/selecting-library-features.md new file mode 100644 index 00000000000000..a780d640370cdb --- /dev/null +++ b/docs/users/selecting-library-features.md @@ -0,0 +1,92 @@ +# Selecting Library Features + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/selecting-library-features.md).** + +## Installing a library + +We will look at [llvm](https://llvm.org/) as an example. You could install it using: + +```powershell +> vcpkg install llvm +``` +or via a manifest with +```json +{ + "dependencies": ["llvm"] +} +``` + +With llvm now installed, we can execute: + +```powershell +> installed\x86-windows\bin\llc.exe --version +``` + +we see: + +```powershell + Registered Targets: + x86 - 32-bit X86: Pentium-Pro and above + x86-64 - 64-bit X86: EM64T and AMD64 +``` + +## Installing additional features + +But [llvm supports many more targets](https://llvm.org/docs/GettingStarted.html#local-llvm-configuration), from ARM to SPARC to SystemZ. +However, clearly our current installation doesn't include ARM as a target; +thus, we need to learn how vcpkg allows us to install other LLVM targets. +The llvm port allows this via the "target-*" features. + +If we do: + +```powershell +> vcpkg search llvm +``` + +We can see: + +``` +llvm 10.0.0#6 The LLVM Compiler Infrastructure +llvm[clang] Build C Language Family Front-end. +llvm[clang-tools-extra] Build Clang tools. +... +llvm[target-all] Build with all backends. +llvm[target-amdgpu] Build with AMDGPU backend. +llvm[target-arm] Build with ARM backend. +... +``` + +We can install any of these targets by using the install-feature syntax: + +```powershell +> vcpkg install llvm[target-arm] # Installs LLVM with the ARM target +``` +```json +{ + "dependencies": [{ "name": "llvm", "features": ["target-arm"] }] +} +``` + +## Opting out of default features + +The llvm port includes a few default features that you as a user may not want: for example, +the `clang` feature is default, which means that `vcpkg install llvm` will also build and install clang. +If you are writing a compiler that uses LLVM as a backend, +you're likely not interested in installing clang as well, +and we can do that by disabling default features with the special `core` "feature": +```powershell +> vcpkg install llvm[core,target-arm] # removing the default-feature with "core" also removes all of the default targets you get +``` +or in manifest files: +```json +{ + "dependencies": [{ + "name": "llvm", + "default-features": false, + "features": ["target-arm"] + }] +} +``` + +# Further reading +- The [Feature Packages](../specifications/feature-packages.md) specification was the initial design for features. diff --git a/docs/users/triplets.md b/docs/users/triplets.md index 7b75956e8aa305..efc55ac2c0aaea 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -1,18 +1,37 @@ -# Triplet files +# Triplet Files + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/triplets.md).** Triplet is a standard term used in cross compiling as a way to completely capture the target environment (cpu, os, compiler, runtime, etc) in a single convenient name. -In Vcpkg, we use triplets to describe self-consistent builds of library sets. This means every library will be built using the same target cpu, OS, and compiler toolchain, but also CRT linkage and preferred library type. +In Vcpkg, we use triplets to describe an imaginary "target configuration set" for every library. Within a triplet, libraries are generally built with the same configuration, but it is not a requirement. For example, you could have one triplet that builds `openssl` statically and `zlib` dynamically, one that builds them both statically, and one that builds them both dynamically (all for the same target OS and architecture). A single build will consume files from a single triplet. + +We currently provide many triplets by default (run `vcpkg help triplet`). However, you can easily customize or add your own by copying a built-in triplet from the `triplets\` directory into a project local location. Then, use overlay triplets (such as [`$VCPKG_OVERLAY_TRIPLETS`](config-environment.md#vcpkg_overlay_triplets), [CMake Manifest Mode](manifests.md#vcpkg_overlay_triplets), or [MSBuild Manifest Mode](manifests.md#vcpkgadditionalinstalloptions-additional-options)) to add that directory to vcpkg. See our [overlay triplets example](../examples/overlay-triplets-linux-dynamic.md) for a more detailed walkthrough. + +To change the triplet used by your project away from the default, see our [Integration Document](integration.md#triplet-selection). + +## Community triplets + +Triplets contained in the `triplets\community` folder are not tested by continuous integration, but are commonly requested by the community. -We currently provide many triplets by default (run `vcpkg help triplet`). However, you can easily add your own by creating a new file in the `triplets\` directory. The new triplet will immediately be available for use in commands, such as `vcpkg install boost:x86-windows-custom`. +Because we do not have continuous coverage, port updates may break compatibility with community triplets. Because of this, community involvement is paramount! -To change the triplet used by your project, such as to enable static linking, see our [Integration Document](integration.md#triplet-selection). +We will gladly accept and review contributions that aim to solve issues with these triplets. + +### Usage + +Community Triplets are enabled by default, when using a community triplet a message like the following one will be printed during a package install: + +```no-highlight +-- Using community triplet x86-uwp. This triplet configuration is not guaranteed to succeed. +-- [COMMUNITY] Loading triplet configuration from: D:\src\viromer\vcpkg\triplets\community\x86-uwp.cmake +``` ## Variables ### VCPKG_TARGET_ARCHITECTURE Specifies the target machine architecture. -Valid options are `x86`, `x64`, `arm`, and `arm64`. +Valid options are `x86`, `x64`, `arm`, `arm64` and `wasm32`. ### VCPKG_CRT_LINKAGE Specifies the desired CRT linkage (for MSVC). @@ -30,8 +49,11 @@ Specifies the target platform. Valid options include any CMake system name, such as: - Empty (Windows Desktop for legacy reasons) - `WindowsStore` (Universal Windows Platform) +- `MinGW` (Minimalist GNU for Windows) - `Darwin` (Mac OSX) +- `iOS` (iOS) - `Linux` (Linux) +- `Emscripten` (WebAssembly) ### VCPKG_CMAKE_SYSTEM_VERSION Specifies the target platform system version. @@ -58,8 +80,67 @@ This option also has forms for configuration-specific and C flags: - `VCPKG_C_FLAGS_DEBUG` - `VCPKG_C_FLAGS_RELEASE` +### VCPKG_LINKER_FLAGS +Sets additional linker flags to be used while building dynamic libraries and +executables in the absence of `VCPKG_CHAINLOAD_TOOLCHAIN_FILE`. + +This option also has forms for configuration-specific flags: +- `VCPKG_LINKER_FLAGS` +- `VCPKG_LINKER_FLAGS_DEBUG` +- `VCPKG_LINKER_FLAGS_RELEASE` + +### VCPKG_CMAKE_CONFIGURE_OPTIONS +Set additional CMake configure options that are appended to the configure command (in [`vcpkg_cmake_configure`](../maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md)). + +This field is optional. + +Also available as build-type specific `VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG` and `VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE` variables. + +### VCPKG_MAKE_CONFIGURE_OPTIONS +Set additional automake / autoconf configure options that are appended to the configure command (in [`vcpkg_configure_make`](../maintainers/vcpkg_configure_make.md)). + +This field is optional. + +For example, to skip certain libtool checks that may errantly fail: +```cmake +set(VCPKG_MAKE_CONFIGURE_OPTIONS "lt_cv_deplibs_check_method=pass_all") +``` + +Also available as build-type specific `VCPKG_MAKE_CONFIGURE_OPTIONS_DEBUG` and `VCPKG_MAKE_CONFIGURE_OPTIONS_RELEASE` variables. + + +### VCPKG_DEP_INFO_OVERRIDE_VARS +Replaces the default computed list of triplet "Supports" terms. + +This option (if set) will override the default set of terms used for qualified dependency resolution and "Supports" field evaluation. + +See the [`"supports"`](../maintainers/manifest-files.md#supports) manifest file field documentation for more details. + +> Implementers' Note: this list is extracted via the `vcpkg_get_dep_info` mechanism. + +### VCPKG_DISABLE_COMPILER_TRACKING + +When this option is set to (true|1|on), the compiler is ignored in the abi tracking. + ## Windows Variables +### VCPKG_ENV_PASSTHROUGH +Instructs vcpkg to allow additional environment variables into the build process. + +On Windows, vcpkg builds packages in a special clean environment that is isolated from the current command prompt to +ensure build reliability and consistency. This triplet option can be set to a list of additional environment variables +that will be added to the clean environment. The values of these environment variables will be hashed into the package +abi -- to pass through environment variables without abi tracking, see `VCPKG_ENV_PASSTHROUGH_UNTRACKED`. + +See also the `vcpkg env` command for how you can inspect the precise environment that will be used. + +> Implementers' Note: this list is extracted via the `vcpkg_get_tags` mechanism. + +### VCPKG_ENV_PASSTHROUGH_UNTRACKED +Instructs vcpkg to allow additional environment variables into the build process without abi tracking. + +See `VCPKG_ENV_PASSTHROUGH`. + ### VCPKG_VISUAL_STUDIO_PATH Specifies the Visual Studio installation to use. @@ -87,6 +168,10 @@ Valid settings: * The Visual Studio 2017 platform toolset is `v141`. * The Visual Studio 2015 platform toolset is `v140`. +### VCPKG_LOAD_VCVARS_ENV +If `VCPKG_CHAINLOAD_TOOLCHAIN_FILE` is used, VCPKG will not setup the Visual Studio environment. +Setting `VCPKG_LOAD_VCVARS_ENV` to (true|1|on) changes this behavior so that the Visual Studio environment is setup following the same rules as if `VCPKG_CHAINLOAD_TOOLCHAIN_FILE` was not set. + ## MacOS Variables ### VCPKG_INSTALL_NAME_DIR @@ -98,6 +183,10 @@ Sets the minimum macOS version for compiled binaries. This also changes what ver ### VCPKG_OSX_SYSROOT Set the name or path of the macOS platform SDK that will be used by CMake. See the CMake documentation for [CMAKE_OSX_SYSROOT](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_SYSROOT.html) for more information. + +### VCPKG_OSX_ARCHITECTURES +Set the macOS / iOS target architecture which will be used by CMake. See the CMake documentation for [CMAKE_OSX_ARCHITECTURES](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_ARCHITECTURES.html) for more information. + ## Per-port customization The CMake Macro `PORT` will be set when interpreting the triplet file and can be used to change settings (such as `VCPKG_LIBRARY_LINKAGE`) on a per-port basis. @@ -120,3 +209,9 @@ The default triplet when running any vcpkg command is `%VCPKG_DEFAULT_TRIPLET%` - OSX: `x64-osx` We recommend using a systematic naming scheme when creating new triplets. The Android toolchain naming scheme is a good source of inspiration: https://developer.android.com/ndk/guides/standalone_toolchain.html. + +## Android triplets +See [android.md](android.md) + +## Mingw-w64 triplets +See [mingw.md](mingw.md) diff --git a/docs/users/versioning.implementation-details.md b/docs/users/versioning.implementation-details.md new file mode 100644 index 00000000000000..e264e9ebfcbfe6 --- /dev/null +++ b/docs/users/versioning.implementation-details.md @@ -0,0 +1,134 @@ +# Versioning: Implementation details + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/versioning.implementation-details.md).** + +## Contents + +* [Minimum versioning](#minimum-versioning) +* [Constraint resolution](#constraint-resolution) +* [Acquiring port versions](#acquiring-port-versions) + + +### Minimum versioning +Vcpkg uses a minimal selection approach to versioning, inspired by the one [used by Go](https://research.swtch.com/vgo-mvs). But modified in some ways: + +* Always starts from a fresh install, eliminates the need for upgrade/downgrade operations. +* Allow unconstrained dependencies by introducing baselines. + +The minimal selection principle, however, stays the same. Given a set of constraints, vcpkg will use the "oldest" possible versions of packages that can satisfy all the constraints. + +Using a minimum version approach has the following advantages: +* Is predictable and easy to understand. +* User controls when upgrades happen, as in, no upgrades are performed automatically when a new version is released. +* Avoids using a SAT solver. + +To give an example, consider the following package graph: +``` + (A 1.0) -> (B 1.0) + + (A 1.1) -> (B 1.0) + -> (C 3.0) + + (A 1.2) -> (B 2.0) + -> (C 3.0) + + (C 2.0) +``` + +And the following manifest: +``` +{ + "name": "example", + "version": "1.0.0", + "dependencies": [ + { "name": "A", "version>=": "1.1" }, + { "name": "C", "version>=": "2.0" } + ], + "builtin-baseline": "" +} +``` + +After accounting for transitive dependencies we have the following set of constraints: +* A >= 1.1 + * B >= 1.0 + * C >= 3.0 +* C >= 2.0 + +Since vcpkg has to satisfy all the constraints, the set of installed packages becomes: + +* `A 1.1`, even when `A 1.2` exists, there are no constraints higher than `1.1` so vcpkg selects the minimum version possible. +* `B 1.0`, transitively required by `A 1.1`. +* `C 3.0`, upgraded by the transitive constraint added by `B 1.0` in order to satisfy version constraints. + +## Constraint resolution +Given a manifest with a set of versioned dependencies, vcpkg will attempt to calculate a package installation plan that satisfies all the constraints. + +Version constraints come in the following flavors: +* **Declared constraints**: Constraints declared explicitly in the top-level manifest using `version>=`. +* **Baseline constraints**: Constraints added implicitly by the `builtin-baseline`. +* **Transitive constraints**: Constraints added indirectly by dependencies of your dependencies. +* **Overridden constraints**: Constraints overridden in the top-level manifest using `overrides` declarations. + +To compute an installation plan, vcpkg follows roughly these steps: + +* Add all top-level constraints to the plan. +* Recursively add transitive constraints to the plan. + * Each time a new package is added to the plan, also add its baseline constraint to the plan. + * Each time a constraint is added: + * If an override exists for the package + * Select the version in the override. + * Otherwise: + * If there is no previous version selected. + * Select the minimal version that satisfies the constraint. + * If there is a previous version selected: + * If the versioning scheme of the new constraint does not match that of the previously selected version: + * Add a version conflict. + * If the constraint's version is not comparable to the previously selected version. For example, comparing "version-string: apple" to "version-string: orange": + * Add a version conflict. + * If the constraints version is higher than the previously selected version: + * Select the highest version. + * Otherwise: + * Keep the previous selection. +* Review the plan: + * If there are no conflicts + * Install the selected packages + * Otherwise: + * Report the conflicts to the user + +## Acquiring port versions +Although the concept of package versions has always been present in vcpkg, the concept of version constraints has been not. + +With the introduction of versioning constraints, it is now possible that a package depends on a port version that does not match the one available locally. This raises a problem as vcpkg needs to know how to acquire the port files for the requested version. + +To solve this problem, a new set of metadata files was introduced. These files are located in the `versions/` directory at the root level of the vcpkg repository. + +The `versions/` directory, will contain JSON files for each one of the ports available in the registry. Each file will list all the versions available for a package and contain a Git tree-ish object that vcpkg can check out to obtain that version's portfiles. + +Example: `zlib.json` + +``` +{ + "versions": [ + { + "git-tree": "2dfc991c739ab9f2605c2ad91a58a7982eb15687", + "version-string": "1.2.11", + "port-version": 9 + }, + ... + { + "git-tree": "a516e5ee220c8250f21821077d0e3dd517f02631", + "version-string": "1.2.10", + "port-version": 0 + }, + { + "git-tree": "3309ec82cd96d752ff890c441cb20ef49b52bf94", + "version-string": "1.2.8", + "port-version": 0 + } + ] +} +``` + +For each port, its corresponding versions file should be located in `versions/{first letter of port name}-/{port name}.json`. For example, zlib's version file will be located in `versions/z-/zlib.json`. Aside from port version files, the current baseline file is located in `versions/baseline.json`. + + diff --git a/docs/users/versioning.md b/docs/users/versioning.md new file mode 100644 index 00000000000000..bad49da0d7f8fc --- /dev/null +++ b/docs/users/versioning.md @@ -0,0 +1,257 @@ +# Versioning + +**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/versioning.md).** + +Versioning allows you to deterministically control the precise revisions of dependencies used by +your project from within your manifest file. + +See our guide to [getting started with versioning](../examples/versioning.getting-started.md). + +## Contents + +* [Version schemes](#version-schemes) + * [`version`](#version) + * [`version-semver`](#version-semver) + * [`version-date`](#version-date) + * [`version-string`](#version-string) +* [Version constraints](#version-constraints) +* [Version files](#version-files) + +## Version schemes +Ports in vcpkg should attempt to follow the versioning conventions used by the package's authors. For that reason, when declaring a package's version the appropriate scheme should be used. + +Each versioning scheme defines its own rules on what is a valid version string and more importantly the rules for how to sort versions using the same scheme. + +The versioning schemes understood by vcpkg are: + +Manifest property | Versioning scheme +------------------|------------------------------------ +`version` | For dot-separated numeric versions +`version-semver` | For SemVer compliant versions +`version-date` | For dates in the format YYYY-MM-DD +`version-string` | For arbitrary strings + +A manifest must contain only one version declaration. + +_NOTE: By design, vcpkg does not compare versions that use different schemes. For example, a package +that has a `version-string: 7.1.3` cannot be compared with the same package using `version: 7.1.4`, even if the +conversion seems obvious._ + +#### `version` +Accepts version strings that follow a relaxed, dot-separated-, semver-like scheme. + +The version is logically composed of dot-separated (`.`) numeric sections. Each section must contain an integer positive number with no leading zeroes. + +The regex pattern for this versioning scheme is: `(0|[1-9]\d*)(\.(0|[1-9]\d*))*` + +_Sorting behavior_: When comparing two versions, each section is compared from left to right by their numeric value, until the first difference is found. A version with the smallest set of sections takes precedence over another with a larger set of sections, given that all their preceding sections compare equally. + +Example: +`0` < `0.1` < `0.1.0` < `1` < `1.0.0` < `1.0.1` < `1.1`< `2.0.0` + +#### `version-semver` +Accepts version strings that follow semantic versioning conventions as described in the [semantic versioning specification](https://semver.org/#semantic-versioning-specification-semver). + +_Sorting behavior_: Strings are sorted following the rules described in the semantic versioning specification. + +Example: +`1.0.0-1` < `1.0.0-alpha` < `1.0.0-beta` < `1.0.0` < `1.0.1` < `1.1.0` + +#### `version-date` + +Accepts version strings that can be parsed to a date following the ISO-8601 format `YYYY-MM-DD`. Disambiguation identifiers are allowed in the form of dot-separated-, positive-, integer-numbers with no leading zeroes. + +This is the recommended versioning scheme for "Live at HEAD" libraries that don't have established release versions. + +The regex pattern for this versioning scheme is: `\d{4}-\d{2}-\d{2}(\.(0|[1-9]\d*))*` + +_Sorting behavior_: Strings are sorted first by their date part, then by numeric comparison of their disambiguation identifiers. Disambiguation identifiers follow the rules of the relaxed (`version`) scheme. + +Examples: +`2021-01-01` < `2021-01-01.1` < `2021-02-01.1.2` < `2021-02-01.1.3` < `2021-02-01` + +#### `version-string` +For packages using version strings that do not fit any of the other schemes, it accepts most arbitrary strings. The `#` which is used to denote port versions is disallowed. + +_Sorting behavior_: No sorting is attempted on the version string itself. However, if the strings match exactly, their port versions can be compared and sorted. + +Examples: +* `apple` <> `orange` <> `orange.2` <> `orange2` +* `watermelon#0`< `watermelon#1` + +#### `port-version` +A positive integer value that increases each time a vcpkg-specific change is made to the port. + +The rules for port versions are: +* Start at 0 for the original version of the port, +* increase by 1 each time a vcpkg-specific change is made to the port that does not increase the version of the package, +* and reset to 0 each time the version of the package is updated. + +_NOTE: Whenever vcpkg output a version it follows the format `#`. For example `1.2.0#2` means version `1.2.0` port version `2`. When the port version is `0` the `#0` suffix is omitted (`1.2.0` implies version `1.2.0` port version `0`)._ + +_Sorting behavior_: If two versions compare equally, their port versions are compared by their numeric value, lower port versions take precedence. + +Examples: +* `1.2.0` < `1.2.0#1` < `1.2.0#2` < `1.2.0#10` +* `2021-01-01#20` < `2021-01-01.1` +* `windows#7` < `windows#8` + +## Version constraints + +### `builtin-baseline` +Accepts a Git commit ID. Vcpkg will try to find a baseline file in the given commit ID and use that to set the baseline versions (lower bounds) of all dependencies. + +Baselines provide stability and ease of development for top-level manifest files. They are not considered from ports consumed as a dependency. If a minimum version constraint is required during transitive version resolution, the port should use `version>=`. + +Example: +```json +{ + "name": "project", + "version": "1.0.0", + "dependencies": ["zlib", "fmt"], + "builtin-baseline":"9fd3bd594f41afb8747e20f6ac9619f26f333cbe" +} +``` + +You can get the current commit of your vcpkg instance either by adding an empty `"builtin-baseline"` field, installing, and examining the error message or by running `git rev-parse HEAD` in the root of the vcpkg instance. + +When resolving version constraints for a package, vcpkg will look for a baseline version by looking +at the baseline file in the given commit ID. +If the given commit ID doesn't have a `versions/baseline.json` file or if the baseline file exists +but it does not declare a baseline version for the package the invocation will fail. +### `version>=` +Expresses a minimum version requirement, `version>=` declarations put a lower boundary on the versions that can be used to satisfy a dependency. + +**Note: Vcpkg selects the lowest version that matches all constraints, so a less-than constraint is not required.** + +Example: +```json +{ + "name": "project", + "version-semver": "1.0.0", + "dependencies": [ + { "name": "zlib", "version>=": "1.2.11#9" }, + { "name": "fmt", "version>=": "7.1.3#1" } + ], + "builtin-baseline":"3426db05b996481ca31e95fff3734cf23e0f51bc" +} +``` + +As part of a version constraint declaration, a port version can be specified by adding the suffix `#`, in the previous example `1.2.11#9` refers to version `1.2.11` port version `9`. + +### `overrides` +Declaring an override forces vcpkg to ignore all other version constraints and use the version specified in the override. This is useful for pinning exact versions and for resolving version conflicts. + +Overrides are declared as an array of package version declarations. + +For an override to take effect, the overridden package must form part of the dependency graph. That means that a dependency must be declared either by the top-level manifest or be part of a transitive dependency. + +```json +{ + "name": "project", + "version-semver": "1.0.0", + "dependencies": [ + { "name": "zlib", "version>=": "1.2.11#9" }, + "fmt" + ], + "builtin-baseline":"3426db05b996481ca31e95fff3734cf23e0f51bc", + "overrides": [ + { "name": "fmt", "version": "6.0.0" } + ] +} +``` + +## Version files +Vcpkg uses a set of metadata files to power its versioning feature. + +These files are located in the following locations: +* `${VCPKG_ROOT}/versions/baseline.json`, (this file is common to all ports) and +* `${VCPKG_ROOT}/versions/${first-letter-of-portname}-/${portname}.json` (one per port). + +For example, for `zlib` the relevant files are: +* `${VCPKG_ROOT}/versions/baseline.json` +* `${VCPKG_ROOT}/versions/z-/zlib.json` + +The vcpkg public CI checks validate that each time a port is added or updated its respective version files are also updated. + +### Baseline file +The baseline file located in `${VCPKG_ROOT}/versions/baseline.json` is used to declared the current baseline versions of all packages. + +For example: +```json +{ + "default": { + "3fd": { "baseline": "2.6.3", "port-version": 0 }, + "7zip": { "baseline": "19.00", "port-version": 2 }, + "abseil": { "baseline": "2020-09-23", "port-version": 1 } + } +} +``` + +Provided that there are no local modifications to the ports, the versions of all packages in the baseline file should map to the version of their corresponding portfiles in the `ports/` directory. + +### Versions file +Each port in vcpkg has a corresponding versions file, the location of a port's versions file follows the pattern: + +```sh +${VCPKG_ROOT}/versions/${first-letter-of-portname}-/${portname}.json +``` + +For example, for `zlib` the corresponding versions file is: + +```sh +${VCPKG_ROOT}/versions/z-/zlib.json +``` + +These files contain an array of all the versions available for a given port. +For example, the contents of `versions/z-/zlib.json` declare the following versions: +```json +{ + "versions": [ + { + "git-tree": "827111046e37c98153d9d82bb6fa4183b6d728e4", + "version-string": "1.2.11", + "port-version": 9 + }, + { + "git-tree": "068430e3e24fa228c302c808ba99f8a48d126557", + "version-string": "1.2.11", + "port-version": 8 + }, + ... + ] +} +``` +Each version declared in this file uses the same syntax used in manifest files, but adds an extra `git-tree` property. The value of `git-tree` is the SHA hash, as calculated by Git, of the directory containing the portfiles for the declared version. You can ask Git for the object SHA via the syntax: +``` +git rev-parse : +``` +For example, +``` +git rev-parse HEAD:ports/zlib +``` + +### Updating the version files +The recommended method to update these files is to run the `x-add-version` command. + +For example, if you have made changes to `zlib`: + +``` +vcpkg x-add-version zlib +``` + +If you're updating multiple ports at the same time, instead you can run: + +``` +vcpkg x-add-version --all +``` + +To update the files for all modified ports at once. + +_NOTE: These commands require you to have committed your changes to the ports before running them. The reason is that the Git SHA of the port directory is required in these version files. But don't worry, the `x-add-version` command will warn you if you have local changes that haven't been committed._ + +## See Also + +* The [implementation details](versioning.implementation-details.md) +* The [original specification](../specifications/versioning.md) + diff --git a/pom.xml b/pom.xml index 38e1ea78af28e5..11148859111f75 100644 --- a/pom.xml +++ b/pom.xml @@ -2,31 +2,25 @@ 4.0.0 com.imanage.work.thirdparty vcpkg - 10.3.0-SNAPSHOT - - Vcpkg + 10.4.1-SNAPSHOT - 10.3.0 + 10.4.1 - - - internal - http://archiva.imanage.com/repository/internal - - - snapshots - http://archiva.imanage.com/repository/snapshots - - + + + internal + http://archiva.imanage.com/repository/internal + + - - org.apache.maven.plugins - maven-antrun-plugin - + + org.apache.maven.plugins + maven-antrun-plugin + generate-vcpkg @@ -40,183 +34,234 @@ - build-vcpkg + build-solution-x64 run - compile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - copy-vcpkg-release-includes - prepare-package - - copy-resources - - - ${project.build.directory}/package/${project.artifactId}/include - - - ${basedir}/installed/x64-windows-static/include - - - - - - copy-vcpkg-x64-release-libs - prepare-package - - copy-resources - - - ${project.build.directory}/package/${project.artifactId}/lib/Release/x64 - - - ${basedir}/installed/x64-windows-static/lib - - - - - - copy-vcpkg-x64-debug-libs - prepare-package - - copy-resources - - - ${project.build.directory}/package/${project.artifactId}/lib/Debug/x64 - - - ${basedir}/installed/x64-windows-static/debug/lib - - - - - - copy-vcpkg-win32-release-libs - prepare-package - - copy-resources - - - ${project.build.directory}/package/${project.artifactId}/lib/Release/win32 - - - ${basedir}/installed/x86-windows-static/lib - - - - - - copy-vcpkg-win32-debug-libs - prepare-package - - copy-resources - + generate-sources - ${project.build.directory}/package/${project.artifactId}/lib//Debug/win32 - - - ${basedir}/installed/x86-windows-static/debug/lib - - + + + + + + + + + + + + + + + - - - - org.apache.maven.plugins - maven-jar-plugin - - default-jar - none - - - vcpkg + build-solution-x86 - jar + run + generate-sources - ${project.build.directory}/package + + + + + + + + + + + + + + + - - + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-vcpkg-json + prepare-package + + copy-resources + + + ${project.build.directory}/package/${project.artifactId} + + + ${basedir} + + vcpkg.json + + + + + + + copy-vcpkg-release-includes + prepare-package + + copy-resources + + + ${project.build.directory}/package/${project.artifactId}/include + + + ${project.build.directory}/installed_x64/x64-windows-static/include + + + + + + copy-vcpkg-x64-release-libs + prepare-package + + copy-resources + + + ${project.build.directory}/package/${project.artifactId}/lib/Release/x64 + + + ${project.build.directory}/installed_x64/x64-windows-static/lib + + **/*.lib + + + + + + + copy-vcpkg-x64-debug-libs + prepare-package + + copy-resources + + + ${project.build.directory}/package/${project.artifactId}/lib/Debug/x64 + + + ${project.build.directory}/installed_x64/x64-windows-static/debug/lib + + **/*.lib + + + + + + + copy-vcpkg-x86-release-libs + prepare-package + + copy-resources + + + ${project.build.directory}/package/${project.artifactId}/lib/Release/x86 + + + ${project.build.directory}/installed_x86/x86-windows-static/lib + + **/*.lib + + + + + + + copy-vcpkg-x86-debug-libs + prepare-package + + copy-resources + + + ${project.build.directory}/package/${project.artifactId}/lib/Debug/x86 + + + ${project.build.directory}/installed_x86/x86-windows-static/debug/lib + + **/*.lib + + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + default-jar + none + + + vcpkg + + jar + + + ${project.build.directory}/package + + + + - - com.googlecode.maven-download-plugin - download-maven-plugin - 1.4.1 - org.codehaus.mojo exec-maven-plugin - 1.6.0 + 3.0.0 org.apache.maven.plugins maven-antrun-plugin - 1.7 + 3.0.0 org.apache.maven.plugins maven-clean-plugin 3.1.0 - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 - - - org.apache.maven.plugins - maven-install-plugin - 2.5.2 - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.0 - - - org.apache.maven.plugins - maven-resources-plugin - 3.1.0 - + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.1 + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.apache.maven.plugins + maven-install-plugin + 2.5.2 + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.0 + + + org.apache.maven.plugins + maven-plugin-plugin + 3.5.2 + + + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 + diff --git a/ports/3fd/CONTROL b/ports/3fd/CONTROL deleted file mode 100644 index 75eecaa31fbab6..00000000000000 --- a/ports/3fd/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: 3fd -Version: 2.6.2-3 -Description: C++ Framework For Fast Development -Build-Depends: boost-lockfree (windows), boost-regex (windows), poco (windows), sqlite3, rapidxml diff --git a/ports/3fd/DataException.patch b/ports/3fd/DataException.patch deleted file mode 100644 index 106411cc098680..00000000000000 --- a/ports/3fd/DataException.patch +++ /dev/null @@ -1,107 +0,0 @@ -diff --git a/3FD/broker_impl_reader.cpp b/3FD/broker_impl_reader.cpp -index 98bd68a..d5948b5 100644 ---- a/3FD/broker_impl_reader.cpp -+++ b/3FD/broker_impl_reader.cpp -@@ -185,7 +185,7 @@ namespace broker - - core::Logger::Write(oss.str(), core::Logger::PRIO_INFORMATION); - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - CALL_STACK_TRACE; - std::ostringstream oss; -@@ -264,7 +264,7 @@ namespace broker - - m_messages.reserve(msgCountStepLimit); - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - CALL_STACK_TRACE; - std::ostringstream oss; -@@ -317,7 +317,7 @@ namespace broker - { - core::Logger::Write(ex, core::Logger::PRIO_CRITICAL); - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - std::ostringstream oss; - oss << "Failed to end transaction reading messages from broker queue. " -@@ -520,7 +520,7 @@ namespace broker - m_dbSession.rollback(); - return true; - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - std::ostringstream oss; - oss << "Failed to rollback transaction reading messages from broker queue. " -@@ -563,7 +563,7 @@ namespace broker - m_dbSession.commit(); - return true; - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - std::ostringstream oss; - oss << "Failed to commit transaction reading messages from broker queue. " -diff --git a/3FD/broker_impl_writer.cpp b/3FD/broker_impl_writer.cpp -index b237ba4..f9531c4 100644 ---- a/3FD/broker_impl_writer.cpp -+++ b/3FD/broker_impl_writer.cpp -@@ -241,7 +241,7 @@ namespace broker - - core::Logger::Write(oss.str(), core::Logger::PRIO_INFORMATION); - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - CALL_STACK_TRACE; - std::ostringstream oss; -@@ -348,7 +348,7 @@ namespace broker - { - core::Logger::Write(ex, core::Logger::PRIO_CRITICAL); - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - std::ostringstream oss; - oss << "Failed to end transaction writing messages into broker queue. " -@@ -405,7 +405,7 @@ namespace broker - { - m_future->get(); - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - std::ostringstream oss; - oss << "Failed to write messages into broker queue. " -@@ -455,7 +455,7 @@ namespace broker - m_dbSession.rollback(); - return true; - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - std::ostringstream oss; - oss << "Failed to rollback transaction writing messages into broker queue. " -@@ -498,7 +498,7 @@ namespace broker - m_dbSession.commit(); - return true; - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - std::ostringstream oss; - oss << "Failed to commit transaction writing messages into broker queue. " -@@ -589,7 +589,7 @@ namespace broker - { - throw; // just forward exceptions from errors known to have been already handled - } -- catch (Poco::Data::DataException &ex) -+ catch (Poco::DataException &ex) - { - std::ostringstream oss; - oss << "Failed to write messages into broker queue. " diff --git a/ports/3fd/RapidXML.patch b/ports/3fd/RapidXML.patch index fdb6cd18ebd49c..6373fc287229cf 100644 --- a/ports/3fd/RapidXML.patch +++ b/ports/3fd/RapidXML.patch @@ -1,13 +1,10 @@ -diff --git a/3FD/configuration.cpp b/3FD/configuration.cpp -index b9ca804..207a397 100644 ---- a/3FD/configuration.cpp -+++ b/3FD/configuration.cpp -@@ -2,7 +2,7 @@ - #include "configuration.h" - #include "exceptions.h" - #include "utils_io.h" --#include -+#include - - #ifdef _3FD_PLATFORM_WINRT - # include "utils_winrt.h" +--- a/3FD/xml.h ++++ b/3FD/xml.h +@@ -4,6 +4,6 @@ + #include "exceptions.h" + #include "utils.h" +-#include ++#include + + #include + #include diff --git a/ports/3fd/portfile.cmake b/ports/3fd/portfile.cmake index 40c902137a2c86..03cc7d3626cafc 100644 --- a/ports/3fd/portfile.cmake +++ b/ports/3fd/portfile.cmake @@ -1,4 +1,4 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "osx" "linux") # Check architecture: if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") @@ -17,36 +17,29 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) # Get source code: vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO faburaya/3FD - REF v2.6.2 - SHA512 a2444cc07d8741540c6071ac59bc8c63785db52e412a843aa18a5dfa0144b5001d428e44bcb520238e3d476440bc74526343f025005f05d534e732645f59cbe0 + REPO faburaya/3fd + REF 3a0fe606268721d1560b88dcca8647c67c0b275c # v2.6.3 (Stable) + SHA512 70630291b4055de2044ad76ef21e99d6ab6fd3468debb2a864a461cf8513642fe87f116e9dfff96ecff96f4577108493dc25aa40eeefcd93ee75990b13bb7b20 HEAD_REF master PATCHES - "${CMAKE_CURRENT_LIST_DIR}/remove-seekpos.patch" - "${CMAKE_CURRENT_LIST_DIR}/DataException.patch" - "${CMAKE_CURRENT_LIST_DIR}/RapidXML.patch" + rapidxml.patch ) -# Copy the sources to ensure a clean, out-of-source build -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all) -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all) -file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all) -get_filename_component(LAST_DIR_NAME "${SOURCE_PATH}" NAME) -set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all/${LAST_DIR_NAME}") - # Build: if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # UWP: - vcpkg_build_msbuild( - USE_VCPKG_INTEGRATION - PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.WinRT.UWP.vcxproj + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "3FD/3FD.WinRT.UWP.vcxproj" PLATFORM ${BUILD_ARCH} + USE_VCPKG_INTEGRATION ) elseif (NOT VCPKG_CMAKE_SYSTEM_NAME) # Win32: - vcpkg_build_msbuild( - USE_VCPKG_INTEGRATION - PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.vcxproj + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "3FD/3FD.vcxproj" PLATFORM ${BUILD_ARCH} TARGET Build + USE_VCPKG_INTEGRATION ) else() message(FATAL_ERROR "Unsupported system: 3FD is not currently ported to VCPKG in ${VCPKG_CMAKE_SYSTEM_NAME}!") @@ -72,32 +65,6 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/share/3FD ) -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # Visual C++, UWP app: - file(INSTALL - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/3FD.WinRT.UWP.lib - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/WinRT.UWP/3FD.WinRT.UWP.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/3FD.WinRT.UWP.lib - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/WinRT.UWP/3FD.WinRT.UWP.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) -else() # Visual C++, Win32 app: - file(INSTALL - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.lib - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.lib - ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) -endif() - # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd RENAME copyright) file(INSTALL ${SOURCE_PATH}/Acknowledgements.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd) diff --git a/ports/3fd/remove-seekpos.patch b/ports/3fd/remove-seekpos.patch deleted file mode 100644 index 6c77cdc64a5df9..00000000000000 --- a/ports/3fd/remove-seekpos.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/3fd/web_wws_impl_host.cpp b/3fd/web_wws_impl_host.cpp -index b87dc75..1cff45f 100644 ---- a/3fd/web_wws_impl_host.cpp -+++ b/3fd/web_wws_impl_host.cpp -@@ -48,7 +48,7 @@ namespace wws - throw AppException(oss.str()); - } - -- const auto fileSizeBytes = inputStream.seekg(0, std::ios::end).tellg().seekpos(); // move cursor to the end to get the zize -+ const auto fileSizeBytes = inputStream.seekg(0, std::ios::end).tellg(); // move cursor to the end to get the zize - - // File is not trunked: - if (fileSizeBytes > 0) diff --git a/ports/3fd/vcpkg.json b/ports/3fd/vcpkg.json new file mode 100644 index 00000000000000..9bbfbe83072517 --- /dev/null +++ b/ports/3fd/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "3fd", + "version-string": "2.6.3", + "description": "C++ Framework For Fast Development", + "supports": "windows & !static & !arm64", + "dependencies": [ + { + "name": "boost-lockfree", + "platform": "windows" + }, + { + "name": "boost-regex", + "platform": "windows" + }, + { + "name": "poco", + "platform": "windows" + }, + "rapidxml", + "sqlite3" + ] +} diff --git a/ports/7zip/CMakeLists.txt b/ports/7zip/CMakeLists.txt index 7e93a3bf0d0092..4ed90058413b0c 100644 --- a/ports/7zip/CMakeLists.txt +++ b/ports/7zip/CMakeLists.txt @@ -108,6 +108,7 @@ set(SRC_C C/Lzma2Enc.c C/LzmaDec.c C/LzmaEnc.c + C/LzmaLib.c C/MtCoder.c C/MtDec.c C/Ppmd7.c @@ -311,6 +312,7 @@ add_library(7zip ${SRC_CRYPTO} ${SRC_C} CPP/7zip/Archive/Archive2.def + C/Util/LzmaLib/LzmaLib.def ) target_compile_definitions(7zip @@ -334,6 +336,14 @@ target_include_directories(7zip set(PUBLIC_HEADERS C/7zTypes.h + C/Alloc.h + C/LzFind.h + C/LzFindMt.h + C/LzHash.h + C/LzmaDec.h + C/LzmaEnc.h + C/LzmaLib.h + C/Threads.h CPP/7zip/Archive/IArchive.h CPP/7zip/ICoder.h CPP/7zip/IDecl.h diff --git a/ports/7zip/CONTROL b/ports/7zip/CONTROL deleted file mode 100644 index 42cb47b345bba6..00000000000000 --- a/ports/7zip/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: 7zip -Version: 19.00 -Description: Library for archiving file with a high compression ratio. diff --git a/ports/7zip/portfile.cmake b/ports/7zip/portfile.cmake index 83515438c708ad..bffb9b4dfefb1e 100644 --- a/ports/7zip/portfile.cmake +++ b/ports/7zip/portfile.cmake @@ -1,4 +1,4 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "linux" "osx") set(7ZIP_VERSION 19.00) vcpkg_download_distfile(ARCHIVE @@ -27,8 +27,6 @@ vcpkg_copy_pdbs() file( INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/7zip + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright ) - -vcpkg_test_cmake(PACKAGE_NAME 7zip) diff --git a/ports/7zip/vcpkg.json b/ports/7zip/vcpkg.json new file mode 100644 index 00000000000000..a8c7b6ce54dc00 --- /dev/null +++ b/ports/7zip/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "7zip", + "version-string": "19.00", + "port-version": 3, + "description": "Library for archiving file with a high compression ratio.", + "homepage": "https://www.7-zip.org", + "supports": "!(linux | osx | arm | uwp)" +} diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL deleted file mode 100644 index b611fe9e7eaa00..00000000000000 --- a/ports/abseil/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: abseil -Version: 2019-05-08 -Homepage: https://github.com/abseil/abseil-cpp -Description: an open-source collection designed to augment the C++ standard library. - Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. - In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. - Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole. diff --git a/ports/abseil/fix-cxx-standard.patch b/ports/abseil/fix-cxx-standard.patch new file mode 100644 index 00000000000000..19e1f54db3f100 --- /dev/null +++ b/ports/abseil/fix-cxx-standard.patch @@ -0,0 +1,96 @@ +diff --git a/CMake/abslConfig.cmake.in b/CMake/abslConfig.cmake.in +index 62d246d..00947cf 100644 +--- a/CMake/abslConfig.cmake.in ++++ b/CMake/abslConfig.cmake.in +@@ -6,3 +6,5 @@ find_dependency(Threads) + @PACKAGE_INIT@ + + include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") ++ ++set(ABSL_USE_CXX17 @ABSL_USE_CXX17@) +\ No newline at end of file +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f0af6f6..927f4ed 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,6 +57,23 @@ else() + option(ABSL_ENABLE_INSTALL "Enable install rule" ON) + endif() + ++# CXX standard ++option(ABSL_USE_CXX17 "Enable CXX 17 standard" OFF) ++ ++if (ABSL_USE_CXX17) ++ set(CMAKE_CXX_STANDARD 17) ++ set(STD_ANY 1) ++ set(STD_OPTIONAL 1) ++ set(STD_STRING_VIEW 1) ++ set(STD_VARIANT 1) ++else() ++ set(CMAKE_CXX_STANDARD 11) ++ set(STD_ANY 0) ++ set(STD_OPTIONAL 0) ++ set(STD_STRING_VIEW 0) ++ set(STD_VARIANT 0) ++endif() ++ + list(APPEND CMAKE_MODULE_PATH + ${CMAKE_CURRENT_LIST_DIR}/CMake + ${CMAKE_CURRENT_LIST_DIR}/absl/copts +diff --git a/absl/base/CMakeLists.txt b/absl/base/CMakeLists.txt +index 9ff5aa2..315bee4 100644 +--- a/absl/base/CMakeLists.txt ++++ b/absl/base/CMakeLists.txt +@@ -87,6 +87,12 @@ absl_cc_library( + absl::errno_saver + ) + ++if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/options.h.in) ++ file(RENAME ${CMAKE_CURRENT_LIST_DIR}/options.h ${CMAKE_CURRENT_LIST_DIR}/options.h.in) ++endif() ++file(REMOVE ${CMAKE_CURRENT_LIST_DIR}/options.h) ++configure_file(${CMAKE_CURRENT_LIST_DIR}/options.h.in ${CMAKE_CURRENT_LIST_DIR}/options.h @ONLY) ++ + absl_cc_library( + NAME + config +diff --git a/absl/base/options.h b/absl/base/options.h +index 6a0fb07..54a9780 100644 +--- a/absl/base/options.h ++++ b/absl/base/options.h +@@ -100,7 +100,7 @@ + // User code should not inspect this macro. To check in the preprocessor if + // absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY. + +-#define ABSL_OPTION_USE_STD_ANY 2 ++#define ABSL_OPTION_USE_STD_ANY @STD_ANY@ + + + // ABSL_OPTION_USE_STD_OPTIONAL +@@ -127,7 +127,7 @@ + // absl::optional is a typedef of std::optional, use the feature macro + // ABSL_USES_STD_OPTIONAL. + +-#define ABSL_OPTION_USE_STD_OPTIONAL 2 ++#define ABSL_OPTION_USE_STD_OPTIONAL @STD_OPTIONAL@ + + + // ABSL_OPTION_USE_STD_STRING_VIEW +@@ -154,7 +154,7 @@ + // absl::string_view is a typedef of std::string_view, use the feature macro + // ABSL_USES_STD_STRING_VIEW. + +-#define ABSL_OPTION_USE_STD_STRING_VIEW 2 ++#define ABSL_OPTION_USE_STD_STRING_VIEW @STD_STRING_VIEW@ + + // ABSL_OPTION_USE_STD_VARIANT + // +@@ -180,7 +180,7 @@ + // absl::variant is a typedef of std::variant, use the feature macro + // ABSL_USES_STD_VARIANT. + +-#define ABSL_OPTION_USE_STD_VARIANT 2 ++#define ABSL_OPTION_USE_STD_VARIANT @STD_VARIANT@ + + + // ABSL_OPTION_USE_INLINE_NAMESPACE diff --git a/ports/abseil/fix-usage-lnk-error.patch b/ports/abseil/fix-usage-lnk-error.patch deleted file mode 100644 index 5335d144b74df7..00000000000000 --- a/ports/abseil/fix-usage-lnk-error.patch +++ /dev/null @@ -1,232 +0,0 @@ -diff --git a/absl/strings/ascii.cc b/absl/strings/ascii.cc -index c9481e8..5c155e1 100644 ---- a/absl/strings/ascii.cc -+++ b/absl/strings/ascii.cc -@@ -49,109 +49,6 @@ namespace ascii_internal { - // print ' //', Hex2(i & 0x78) - // elif i % 16 == 15: - // print -- --// clang-format off --// Array of bitfields holding character information. Each bit value corresponds --// to a particular character feature. For readability, and because the value --// of these bits is tightly coupled to this implementation, the individual bits --// are not named. Note that bitfields for all characters above ASCII 127 are --// zero-initialized. --const unsigned char kPropertyBits[256] = { -- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 0x00 -- 0x40, 0x68, 0x48, 0x48, 0x48, 0x48, 0x40, 0x40, -- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 0x10 -- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, -- 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 0x20 -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -- 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, // 0x30 -- 0x84, 0x84, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -- 0x10, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x05, // 0x40 -- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, -- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, // 0x50 -- 0x05, 0x05, 0x05, 0x10, 0x10, 0x10, 0x10, 0x10, -- 0x10, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x05, // 0x60 -- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, -- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, // 0x70 -- 0x05, 0x05, 0x05, 0x10, 0x10, 0x10, 0x10, 0x40, --}; -- --// Array of characters for the ascii_tolower() function. For values 'A' --// through 'Z', return the lower-case character; otherwise, return the --// identity of the passed character. --const char kToLower[256] = { -- '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', -- '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', -- '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', -- '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', -- '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', -- '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', -- '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', -- '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', -- '\x40', 'a', 'b', 'c', 'd', 'e', 'f', 'g', -- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', -- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', -- 'x', 'y', 'z', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', -- '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', -- '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f', -- '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', -- '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f', -- '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', -- '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', -- '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', -- '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', -- '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7', -- '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf', -- '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7', -- '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf', -- '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', -- '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf', -- '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7', -- '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf', -- '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', -- '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef', -- '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', -- '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff', --}; -- --// Array of characters for the ascii_toupper() function. For values 'a' --// through 'z', return the upper-case character; otherwise, return the --// identity of the passed character. --const char kToUpper[256] = { -- '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', -- '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', -- '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', -- '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', -- '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', -- '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', -- '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', -- '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', -- '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', -- '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', -- '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', -- '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', -- '\x60', 'A', 'B', 'C', 'D', 'E', 'F', 'G', -- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', -- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', -- 'X', 'Y', 'Z', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f', -- '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', -- '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', -- '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', -- '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', -- '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7', -- '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf', -- '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7', -- '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf', -- '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', -- '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf', -- '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7', -- '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf', -- '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', -- '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef', -- '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', -- '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff', --}; --// clang-format on -- - } // namespace ascii_internal - - void AsciiStrToLower(std::string* s) { -diff --git a/absl/strings/ascii.h b/absl/strings/ascii.h -index 48a9da2..9d70382 100644 ---- a/absl/strings/ascii.h -+++ b/absl/strings/ascii.h -@@ -61,14 +61,105 @@ - namespace absl { - namespace ascii_internal { - --// Declaration for an array of bitfields holding character information. --extern const unsigned char kPropertyBits[256]; -- --// Declaration for the array of characters to upper-case characters. --extern const char kToUpper[256]; -- --// Declaration for the array of characters to lower-case characters. --extern const char kToLower[256]; -+// Array of bitfields holding character information. Each bit value corresponds -+// to a particular character feature. For readability, and because the value -+// of these bits is tightly coupled to this implementation, the individual bits -+// are not named. Note that bitfields for all characters above ASCII 127 are -+// zero-initialized. -+const unsigned char kPropertyBits[256] = { -+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 0x00 -+ 0x40, 0x68, 0x48, 0x48, 0x48, 0x48, 0x40, 0x40, -+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 0x10 -+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, -+ 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 0x20 -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -+ 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, // 0x30 -+ 0x84, 0x84, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -+ 0x10, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x05, // 0x40 -+ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, -+ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, // 0x50 -+ 0x05, 0x05, 0x05, 0x10, 0x10, 0x10, 0x10, 0x10, -+ 0x10, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x05, // 0x60 -+ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, -+ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, // 0x70 -+ 0x05, 0x05, 0x05, 0x10, 0x10, 0x10, 0x10, 0x40, -+}; -+ -+// Array of characters for the ascii_tolower() function. For values 'A' -+// through 'Z', return the lower-case character; otherwise, return the -+// identity of the passed character. -+const char kToLower[256] = { -+ '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', -+ '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', -+ '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', -+ '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', -+ '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', -+ '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', -+ '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', -+ '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', -+ '\x40', 'a', 'b', 'c', 'd', 'e', 'f', 'g', -+ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', -+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', -+ 'x', 'y', 'z', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', -+ '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', -+ '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f', -+ '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', -+ '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f', -+ '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', -+ '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', -+ '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', -+ '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', -+ '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7', -+ '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf', -+ '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7', -+ '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf', -+ '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', -+ '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf', -+ '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7', -+ '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf', -+ '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', -+ '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef', -+ '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', -+ '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff', -+}; -+ -+// Array of characters for the ascii_toupper() function. For values 'a' -+// through 'z', return the upper-case character; otherwise, return the -+// identity of the passed character. -+const char kToUpper[256] = { -+ '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', -+ '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', -+ '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', -+ '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', -+ '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', -+ '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', -+ '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', -+ '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', -+ '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', -+ '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', -+ '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', -+ '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', -+ '\x60', 'A', 'B', 'C', 'D', 'E', 'F', 'G', -+ 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', -+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', -+ 'X', 'Y', 'Z', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f', -+ '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', -+ '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', -+ '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', -+ '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', -+ '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7', -+ '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf', -+ '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7', -+ '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf', -+ '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', -+ '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf', -+ '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7', -+ '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf', -+ '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', -+ '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef', -+ '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', -+ '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff', -+}; - - } // namespace ascii_internal - diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 1c299333287230..b8e71ada0f9cf3 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -1,33 +1,56 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "Abseil currently only supports being built for desktop") +if (NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) endif() -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF aa468ad75539619b47979911297efbb629c52e44 - SHA512 4254d8599103d8f06b03f60a0386eba07f314184217d0bca404d41fc0bd0a8df287fe6d07158d10cde096af3097aff2ecc1a5e8f7c3046ecf956b5fde709ad1d + REF 278e0a071885a22dcd2fd1b5576cc44757299343 #LTS 20210324, Patch 2 + SHA512 a9e8e9169ebcfb8bc2eca28152ad2f655f48e6281ea932eb712333f3d0aa0b6fa1a9b184f3e2ddd75d932a54b501cc5c7bb29a1c9de5d2146f82fc5754653895 HEAD_REF master - PATCHES fix-usage-lnk-error.patch + PATCHES + # in C++17 mode, use std::any, std::optional, std::string_view, std::variant + # instead of the library replacement types + # in C++11 mode, force use of library replacement types, otherwise the automatic + # detection can cause ABI issues depending on which compiler options + # are enabled for consuming user code + fix-cxx-standard.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + cxx17 ABSL_USE_CXX17 ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS ${FEATURE_OPTIONS} ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/absl) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/absl TARGET_PATH share/absl) +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() - -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/absl/copts ${CURRENT_PACKAGES_DIR}/include/absl/strings/testdata - ${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata) \ No newline at end of file + ${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/base/config.h + "#elif defined(ABSL_CONSUME_DLL)" "#elif 1" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/base/internal/thread_identity.h + "&& !defined(ABSL_CONSUME_DLL)" "&& 0" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/container/internal/hashtablez_sampler.h + "!defined(ABSL_CONSUME_DLL)" "0" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/abseil/vcpkg.json b/ports/abseil/vcpkg.json new file mode 100644 index 00000000000000..83f27d1d9f7896 --- /dev/null +++ b/ports/abseil/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "abseil", + "version-string": "20210324.2", + "description": [ + "an open-source collection designed to augment the C++ standard library.", + "Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.", + "In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.", + "Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole." + ], + "homepage": "https://github.com/abseil/abseil-cpp", + "supports": "(x64 | arm64) & (linux | osx | windows)", + "features": { + "cxx17": { + "description": "Enable compiler C++17." + } + } +} diff --git a/ports/absent/portfile.cmake b/ports/absent/portfile.cmake new file mode 100644 index 00000000000000..1c8436aa8b7915 --- /dev/null +++ b/ports/absent/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rvarago/absent + REF 0.3.1 + SHA512 c7b7d29422ef8afc48e3093496e1dd055cfe9969ae037c2b06ea70fe4283e7a7e9129171efaa257e909c535e24df5861b992b24b00ec03f965730e6a22e13015 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) + diff --git a/ports/absent/vcpkg.json b/ports/absent/vcpkg.json new file mode 100644 index 00000000000000..3f6ae21dcdd89d --- /dev/null +++ b/ports/absent/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "absent", + "version-string": "0.3.1", + "port-version": 1, + "description": "A small C++17 library meant to simplify the composition of nullable types in a generic, type-safe, and declarative way", + "homepage": "https://github.com/rvarago/absent" +} diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL deleted file mode 100644 index 64ef8442537593..00000000000000 --- a/ports/ace/CONTROL +++ /dev/null @@ -1,14 +0,0 @@ -Source: ace -Version: 6.5.6 -Homepage: https://www.dre.vanderbilt.edu/~schmidt/ACE.html -Description: The ADAPTIVE Communication Environment - -Feature: wchar -Description: Enable extra wide char functions in ACE - -Feature: ssl -Description: Enable SSL/TLS features in ACE -Build-Depends: openssl - -Feature: xml -Description: Enable XML features in ACE diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index 81c9534d05645a..239cc279aab484 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -1,46 +1,86 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") +# Using zip archive under Linux would cause sh/perl to report "No such file or directory" or "bad interpreter" +# when invoking `prj_install.pl`. +# So far this issue haven't yet be triggered under WSL 1 distributions. Not sure the root cause of it. +set(ACE_VERSION 7.0.3) +string(REPLACE "." "_" ACE_VERSION_DIRECTORY ${ACE_VERSION}) + +if("tao" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS) + # Don't change to vcpkg_from_github! This points to a release and not an archive + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE%2BTAO-src-${ACE_VERSION}.zip" + FILENAME ACE-TAO-${ACE_VERSION}.zip + SHA512 714d2c25bd4be44a03d350b2457b613b5d2d079fc294f287d10968ed02af5c9c82a2a0c10937acf46a4babfd4582cdc5fa23d6080dadd5cbc4f7f694037033f9 + ) + else() + # VCPKG_TARGET_IS_LINUX + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE%2BTAO-src-${ACE_VERSION}.tar.gz" + FILENAME ACE-TAO-${ACE_VERSION}.tar.gz + SHA512 e48df1c63bfd02f3a14d049efbcb9a2f476597deaa2b9259d4d852ddfea2319af14e6a1071139b091bff856619e11c650771bfe92c3220d198ec6e931cdd35de + ) + endif() +else() + if(VCPKG_TARGET_IS_WINDOWS) + # Don't change to vcpkg_from_github! This points to a release and not an archive + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE-src-${ACE_VERSION}.zip" + FILENAME ACE-src-${ACE_VERSION}.zip + SHA512 3232ea5437b5fa4a36f4b9d5586c1435a5e2f2dcb34770919a1d1dfe6ebe12e33b316f3c0a1275cdc40c12135800f8cb000ac12b4775f9c31d3ddc48b41bd375 + ) + else(VCPKG_TARGET_IS_WINDOWS) + # VCPKG_TARGET_IS_LINUX + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE-src-${ACE_VERSION}.tar.gz" + FILENAME ACE-src-${ACE_VERSION}.tar.gz + SHA512 019ec5c9f23c103d659ec57f6c7bfda3d6d12fc4ca77373353d6232c5fa24c03ffba222af45bd4afe997f02a81f834546cfbcb0e667000857b6e12f2ca3effaa + ) + endif() endif() +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +set(ACE_ROOT ${SOURCE_PATH}) +set(ENV{ACE_ROOT} ${ACE_ROOT}) +set(ACE_SOURCE_PATH ${ACE_ROOT}/ace) +if("tao" IN_LIST FEATURES) + set(TAO_ROOT ${SOURCE_PATH}/TAO) + set(ENV{TAO_ROOT} ${TAO_ROOT}) + set(WORKSPACE ${TAO_ROOT}/TAO_ACE) +else() + set(WORKSPACE ${ACE_ROOT}/ace/ace) +endif() if("wchar" IN_LIST FEATURES) list(APPEND ACE_FEATURE_LIST "uses_wchar=1") endif() if("zlib" IN_LIST FEATURES) list(APPEND ACE_FEATURE_LIST "zlib=1") + set(ENV{ZLIB_ROOT} ${CURRENT_INSTALLED_DIR}) else() list(APPEND ACE_FEATURE_LIST "zlib=0") endif() if("ssl" IN_LIST FEATURES) list(APPEND ACE_FEATURE_LIST "ssl=1") + list(APPEND ACE_FEATURE_LIST "openssl11=1") + set(ENV{SSL_ROOT} ${CURRENT_INSTALLED_DIR}) else() list(APPEND ACE_FEATURE_LIST "ssl=0") endif() list(JOIN ACE_FEATURE_LIST "," ACE_FEATURES) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - if(NOT VCPKG_CMAKE_SYSTEM_NAME) - set(DLL_DECORATOR s) - endif() set(MPC_STATIC_FLAG -static) endif() -include(vcpkg_common_functions) -set(ACE_ROOT ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers) -set(ENV{ACE_ROOT} ${ACE_ROOT}) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_6/ACE-src-6.5.6.zip" - FILENAME ACE-src-6.5.6.zip - SHA512 4ee42aafc86af159ab20dbb14c7c2a49bed733645f5cc3afa8cef3e9688ff929002f3420eb33e859afe10a534afc276340faa21d029fa56bd07bd9aed3403ab4 -) -vcpkg_extract_source_archive(${ARCHIVE}) +# Acquire Perl and add it to PATH (for execution of MPC) vcpkg_find_acquire_program(PERL) get_filename_component(PERL_PATH ${PERL} DIRECTORY) vcpkg_add_to_path(${PERL_PATH}) -if (TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR "ARM is currently not supported.") -elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86") +if (TRIPLET_SYSTEM_ARCH MATCHES "x86") set(MSBUILD_PLATFORM "Win32") else () set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) @@ -48,9 +88,7 @@ endif() # Add ace/config.h file # see https://htmlpreview.github.io/?https://github.com/DOCGroup/ACE_TAO/blob/master/ACE/ACE-INSTALL.html -if(NOT VCPKG_CMAKE_SYSTEM_NAME) - set(LIB_RELEASE_SUFFIX .lib) - set(LIB_DEBUG_SUFFIX d.lib) +if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") set(SOLUTION_TYPE vs2019) elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") @@ -58,116 +96,251 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME) else() set(SOLUTION_TYPE vc14) endif() - file(WRITE ${SOURCE_PATH}/config.h "#include \"ace/config-windows.h\"") + file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-windows.h\"") +elseif(VCPKG_TARGET_IS_LINUX) + set(SOLUTION_TYPE gnuace) + file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-linux.h\"") + file(WRITE ${ACE_ROOT}/include/makeinclude/platform_macros.GNU "include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU") +elseif(VCPKG_TARGET_IS_OSX) + set(SOLUTION_TYPE gnuace) + file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-macosx.h\"") + file(WRITE ${ACE_ROOT}/include/makeinclude/platform_macros.GNU "include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU") endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(DLL_DECORATOR) - set(LIB_RELEASE_SUFFIX .a) - set(LIB_DEBUG_SUFFIX .a) - set(LIB_PREFIX lib) - set(SOLUTION_TYPE gnuace) - file(WRITE ${SOURCE_PATH}/config.h "#include \"ace/config-linux.h\"") - file(WRITE ${ACE_ROOT}/include/makeinclude/platform_macros.GNU "include $(ACE_ROOT)include/makeinclude/platform_linux.GNU") +if(VCPKG_TARGET_IS_UWP) + set(MPC_VALUE_TEMPLATE -value_template link_options+=/APPCONTAINER) endif() # Invoke mwc.pl to generate the necessary solution and project files -vcpkg_execute_required_process( - COMMAND ${PERL} ${ACE_ROOT}/bin/mwc.pl -type ${SOLUTION_TYPE} -features "${ACE_FEATURES}" ace ${MPC_STATIC_FLAG} +vcpkg_execute_build_process( + COMMAND ${PERL} ${ACE_ROOT}/bin/mwc.pl -type ${SOLUTION_TYPE} -features "${ACE_FEATURES}" ${WORKSPACE}.mwc ${MPC_STATIC_FLAG} ${MPC_VALUE_TEMPLATE} WORKING_DIRECTORY ${ACE_ROOT} LOGNAME mwc-${TARGET_TRIPLET} ) -if(NOT VCPKG_CMAKE_SYSTEM_NAME) - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/ace.sln +if(VCPKG_TARGET_IS_WINDOWS) + file(RELATIVE_PATH PROJECT_SUBPATH ${SOURCE_PATH} ${WORKSPACE}.sln) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH ${PROJECT_SUBPATH} + LICENSE_SUBPATH COPYING PLATFORM ${MSBUILD_PLATFORM} USE_VCPKG_INTEGRATION + SKIP_CLEAN ) -endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + # ACE itself does not define an install target, so it is not clear which + # headers are public and which not. For the moment we install everything + # that is in the source path and ends in .h, .inl + function(install_includes ORIGINAL_PATH RELATIVE_PATHS) + foreach(RELATIVE_PATH ${RELATIVE_PATHS}) + file( + GLOB + HEADER_FILES + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.h + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.hpp + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.inl + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.cpp + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.idl + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.pidl) + file(INSTALL ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/${RELATIVE_PATH}) + endforeach() + endfunction() + + get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME) + set(SOURCE_COPY_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}) + + # Install headers in subdirectory + set(ACE_INCLUDE_FOLDERS + "ace" + "ace/Compression" + "ace/Compression/rle" + "ace/ETCL" + "ace/QoS" + "ace/Monitor_Control" + "ace/os_include" + "ace/os_include/arpa" + "ace/os_include/net" + "ace/os_include/netinet" + "ace/os_include/sys") + install_includes(${SOURCE_COPY_PATH} "${ACE_INCLUDE_FOLDERS}") + + if("ssl" IN_LIST FEATURES) + install_includes(${SOURCE_COPY_PATH} "ace/SSL") + endif() + + if("tao" IN_LIST FEATURES) + set(ACEXML_INCLUDE_FOLDERS "ACEXML/apps/svcconf" "ACEXML/common" + "ACEXML/parser/parser") + install_includes(${SOURCE_COPY_PATH} "${ACEXML_INCLUDE_FOLDERS}") + + set(ACE_PROTOCOLS_INCLUDE_FOLDERS "ace/HTBP" "ace/INet" "ace/RMCast" + "ace/TMCast") + install_includes(${SOURCE_COPY_PATH}/protocols "${ACE_PROTOCOLS_INCLUDE_FOLDERS}") + + install_includes(${SOURCE_COPY_PATH} "Kokyu") + + set(TAO_ORBSVCS_INCLUDE_FOLDERS + "orbsvcs" + "orbsvcs/AV" + "orbsvcs/Concurrency" + "orbsvcs/CosEvent" + "orbsvcs/Event" + "orbsvcs/FaultTolerance" + "orbsvcs/FtRtEvent/ClientORB" + "orbsvcs/FtRtEvent/EventChannel" + "orbsvcs/FtRtEvent/Utils" + "orbsvcs/HTIOP" + "orbsvcs/IFRService" + "orbsvcs/LifeCycle" + "orbsvcs/LoadBalancing" + "orbsvcs/Log" + "orbsvcs/Naming" + "orbsvcs/Naming/FaultTolerant" + "orbsvcs/Notify" + "orbsvcs/Notify/Any" + "orbsvcs/Notify/MonitorControl" + "orbsvcs/Notify/MonitorControlExt" + "orbsvcs/Notify/Sequence" + "orbsvcs/Notify/Structured" + "orbsvcs/PortableGroup" + "orbsvcs/Property" + "orbsvcs/Sched" + "orbsvcs/Security" + "orbsvcs/Time" + "orbsvcs/Trader") + if("ssl" IN_LIST FEATURES) + list(APPEND TAO_ORBSVCS_INCLUDE_FOLDERS "orbsvcs/SSLIOP") + endif() + install_includes(${SOURCE_COPY_PATH}/TAO/orbsvcs "${TAO_ORBSVCS_INCLUDE_FOLDERS}") + + set(TAO_ROOT_ORBSVCS_INCLUDE_FOLDERS "orbsvcs/FT_ReplicationManager" + "orbsvcs/Notify_Service") + install_includes(${SOURCE_COPY_PATH}/TAO "${TAO_ROOT_ORBSVCS_INCLUDE_FOLDERS}") + + set(TAO_INCLUDE_FOLDERS + "tao" + "tao/AnyTypeCode" + "tao/BiDir_GIOP" + "tao/CSD_Framework" + "tao/CSD_ThreadPool" + "tao/CodecFactory" + "tao/Codeset" + "tao/Compression" + "tao/Compression/rle" + "tao/DiffServPolicy" + "tao/DynamicAny" + "tao/DynamicInterface" + "tao/Dynamic_TP" + "tao/ETCL" + "tao/EndpointPolicy" + "tao/IFR_Client" + "tao/IORInterceptor" + "tao/IORManipulation" + "tao/IORTable" + "tao/ImR_Client" + "tao/Messaging" + "tao/Monitor" + "tao/ObjRefTemplate" + "tao/PI" + "tao/PI_Server" + "tao/PortableServer" + "tao/RTCORBA" + "tao/RTPortableServer" + "tao/RTScheduling" + "tao/SmartProxies" + "tao/Strategies" + "tao/TransportCurrent" + "tao/TypeCodeFactory" + "tao/Utils" + "tao/Valuetype" + "tao/ZIOP") + if("zlib" IN_LIST FEATURES) + list(APPEND TAO_INCLUDE_FOLDERS "tao/Compression/zlib") + endif() + install_includes(${SOURCE_COPY_PATH}/TAO "${TAO_INCLUDE_FOLDERS}") + endif() + + # Remove dlls without any export + if("tao" IN_LIST FEATURES) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/ACEXML_XML_Svc_Conf_Parser.dll + ${CURRENT_PACKAGES_DIR}/bin/ACEXML_XML_Svc_Conf_Parser.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/ACEXML_XML_Svc_Conf_Parserd.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/ACEXML_XML_Svc_Conf_Parserd_dll.pdb) + endif() + endif() + + vcpkg_clean_msbuild() +elseif(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) FIND_PROGRAM(MAKE make) IF (NOT MAKE) MESSAGE(FATAL_ERROR "MAKE not found") ENDIF () - vcpkg_execute_required_process( - COMMAND make - WORKING_DIRECTORY ${ACE_ROOT}/ace - LOGNAME make-${TARGET_TRIPLET} - ) -endif() -# ACE itself does not define an install target, so it is not clear which -# headers are public and which not. For the moment we install everything -# that is in the source path and ends in .h, .inl -function(install_ace_headers_subdirectory SOURCE_PATH RELATIVE_PATH) - file(GLOB HEADER_FILES ${SOURCE_PATH}/${RELATIVE_PATH}/*.h ${SOURCE_PATH}/${RELATIVE_PATH}/*.inl) - file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/ace/${RELATIVE_PATH}) -endfunction() - -# We manually install header found in the ace directory because in that case -# we are supposed to install also *cpp files, see ACE_wrappers\debian\libace-dev.install file -file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h ${SOURCE_PATH}/*.inl ${SOURCE_PATH}/*.cpp) -file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/ace/) - -# Install headers in subdirectory -install_ace_headers_subdirectory(${SOURCE_PATH} "Compression") -install_ace_headers_subdirectory(${SOURCE_PATH} "Compression/rle") -install_ace_headers_subdirectory(${SOURCE_PATH} "ETCL") -install_ace_headers_subdirectory(${SOURCE_PATH} "QoS") -install_ace_headers_subdirectory(${SOURCE_PATH} "Monitor_Control") -install_ace_headers_subdirectory(${SOURCE_PATH} "os_include") -install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/arpa") -install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/net") -install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/netinet") -install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/sys") -if("ssl" IN_LIST FEATURES) - install_ace_headers_subdirectory(${SOURCE_PATH} "SSL") -endif() + if("ssl" IN_LIST FEATURES) + list(APPEND _ace_makefile_macros "ssl=1") + endif() -# Install the libraries -function(install_ace_library SOURCE_PATH ACE_LIBRARY) - set(LIB_PATH ${SOURCE_PATH}/lib/) - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - # Install the DLL files - file(INSTALL - ${LIB_PATH}/${ACE_LIBRARY}d.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${LIB_PATH}/${ACE_LIBRARY}.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - endif() + set(ENV{INSTALL_PREFIX} ${CURRENT_PACKAGES_DIR}) + # Set `PWD` environment variable since ACE's `install` make target calculates install dir using this env. + set(_prev_env $ENV{PWD}) + get_filename_component(WORKING_DIR ${WORKSPACE} DIRECTORY) + set(ENV{PWD} ${WORKING_DIR}) - # Install the lib files - file(INSTALL - ${LIB_PATH}/${LIB_PREFIX}${ACE_LIBRARY}${DLL_DECORATOR}${LIB_DEBUG_SUFFIX} - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} "debug=1" "optimize=0" "-j${VCPKG_CONCURRENCY}" + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME make-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} install + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME install-${TARGET_TRIPLET}-dbg + ) - file(INSTALL - ${LIB_PATH}/${LIB_PREFIX}${ACE_LIBRARY}${DLL_DECORATOR}${LIB_RELEASE_SUFFIX} - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) -endfunction() - -install_ace_library(${ACE_ROOT} "ACE") -install_ace_library(${ACE_ROOT} "ACE_Compression") -install_ace_library(${ACE_ROOT} "ACE_ETCL") -install_ace_library(${ACE_ROOT} "ACE_ETCL_Parser") -install_ace_library(${ACE_ROOT} "ACE_Monitor_Control") -if(NOT VCPKG_CMAKE_SYSTEM_NAME) - install_ace_library(${ACE_ROOT} "ACE_QoS") -endif() -install_ace_library(${ACE_ROOT} "ACE_RLECompression") -if("ssl" IN_LIST FEATURES) - install_ace_library(${ACE_ROOT} "ACE_SSL") -endif() + file(COPY ${CURRENT_PACKAGES_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -# Handle copyright -file(COPY ${ACE_ROOT}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ace) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ace/COPYING ${CURRENT_PACKAGES_DIR}/share/ace/copyright) + file(GLOB _pkg_components ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc) + foreach(_pkg_comp ${_pkg_components}) + file(READ ${_pkg_comp} _content) + string(REPLACE "libdir=${CURRENT_PACKAGES_DIR}/lib" "libdir=${CURRENT_PACKAGES_DIR}/debug/lib" _content ${_content}) + file(WRITE ${_pkg_comp} ${_content}) + endforeach() + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") -vcpkg_copy_pdbs() + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} realclean + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME realclean-${TARGET_TRIPLET}-dbg + ) + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} "-j${VCPKG_CONCURRENCY}" + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME make-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + message(STATUS "Packaging ${TARGET_TRIPLET}-rel") + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} install + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME install-${TARGET_TRIPLET}-rel + ) + if("tao" IN_LIST FEATURES) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") + # Restore `PWD` environment variable + set($ENV{PWD} _prev_env) + + # Handle copyright + file(INSTALL ${ACE_ROOT}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endif() diff --git a/ports/ace/vcpkg.json b/ports/ace/vcpkg.json new file mode 100644 index 00000000000000..dd48feba3030c8 --- /dev/null +++ b/ports/ace/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "ace", + "version-string": "7.0.3", + "port-version": 1, + "description": "The ADAPTIVE Communication Environment", + "homepage": "https://www.dre.vanderbilt.edu/~schmidt/ACE.html", + "features": { + "ssl": { + "description": "Enable SSL/TLS features in ACE", + "dependencies": [ + "openssl" + ] + }, + "tao": { + "description": "The ACE ORB" + }, + "wchar": { + "description": "Enable extra wide char functions in ACE" + }, + "xml": { + "description": "Enable XML features in ACE" + }, + "zlib": { + "description": "Enable zlib support", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/activemq-cpp/CONTROL b/ports/activemq-cpp/CONTROL deleted file mode 100644 index ee3c4300cf31e1..00000000000000 --- a/ports/activemq-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: activemq-cpp -Version: 3.9.5 -Build-Depends: apr -Description: Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server. diff --git a/ports/activemq-cpp/fix-crt-linkage.patch b/ports/activemq-cpp/fix-crt-linkage.patch new file mode 100644 index 00000000000000..fcb74fda7abc5e --- /dev/null +++ b/ports/activemq-cpp/fix-crt-linkage.patch @@ -0,0 +1,36 @@ +diff --git a/vs2010-build/activemq-cpp.vcxproj b/vs2010-build/activemq-cpp.vcxproj +index 54b4822..6b35511 100644 +--- a/vs2010-build/activemq-cpp.vcxproj ++++ b/vs2010-build/activemq-cpp.vcxproj +@@ -2578,6 +2578,7 @@ + Default + true + false ++ MultiThreadedDebug + true + + +@@ -2687,6 +2688,7 @@ + true + false + true ++ MultiThreadedDebug + + + +@@ -2794,6 +2796,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + true ++ MultiThreaded + + + +@@ -2906,6 +2909,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + true ++ MultiThreaded + + + diff --git a/ports/activemq-cpp/portfile.cmake b/ports/activemq-cpp/portfile.cmake index b165efbcd2313d..6afa95b7914c74 100644 --- a/ports/activemq-cpp/portfile.cmake +++ b/ports/activemq-cpp/portfile.cmake @@ -1,26 +1,40 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() +vcpkg_fail_port_install( ON_TARGET "uwp" "linux" "osx") set(VERSION 3.9.5) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/activemq-cpp-library-${VERSION}) + vcpkg_download_distfile(ARCHIVE URLS "https://www.apache.org/dist/activemq/activemq-cpp/${VERSION}/activemq-cpp-library-${VERSION}-src.tar.bz2" FILENAME "activemq-cpp-library-${VERSION}-src.tar.bz2" - SHA512 83692d3dfd5ecf557fc88d204a03bf169ce6180bcff27be41b09409b8f7793368ffbeed42d98ef6374c6b6b477d9beb8a4a9ac584df9e56725ec59ceceaa6ae2 + SHA512 83692d3dfd5ecf557fc88d204a03bf169ce6180bcff27be41b09409b8f7793368ffbeed42d98ef6374c6b6b477d9beb8a4a9ac584df9e56725ec59ceceaa6ae2 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/FunctionLevelLinkingOn.diff + PATCHES + FunctionLevelLinkingOn.diff + fix-crt-linkage.patch ) -set(RELEASE_CONF "ReleaseDLL") -set(DEBUG_CONF "DebugDLL") +set(ACTIVEMQCPP_MSVC_PROJ ${SOURCE_PATH}/vs2010-build/activemq-cpp.vcxproj) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ACTIVEMQCPP_SHARED_LIB) + +if (ACTIVEMQCPP_SHARED_LIB) + set(RELEASE_CONF "ReleaseDLL") + set(DEBUG_CONF "DebugDLL") + + set(ACTIVEMQCPP_LIB_PREFFIX ) + set(ACTIVEMQCPP_LIB_SUFFIX d) + vcpkg_replace_string(${ACTIVEMQCPP_MSVC_PROJ} ";apr-1.lib" ";libapr-1.lib") +else() + set(RELEASE_CONF "Release") + set(DEBUG_CONF "Debug") + + set(ACTIVEMQCPP_LIB_PREFFIX lib) + set(ACTIVEMQCPP_LIB_SUFFIX ) + vcpkg_replace_string(${ACTIVEMQCPP_MSVC_PROJ} ";libapr-1.lib" ";apr-1.lib") +endif() if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") set(BUILD_ARCH "Win32") @@ -32,9 +46,8 @@ else() message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/vs2010-build/activemq-cpp.vcxproj + PROJECT_PATH ${ACTIVEMQCPP_MSVC_PROJ} RELEASE_CONFIGURATION ${RELEASE_CONF} DEBUG_CONFIGURATION ${DEBUG_CONF} PLATFORM ${BUILD_ARCH} @@ -42,43 +55,45 @@ vcpkg_build_msbuild( ) vcpkg_copy_pdbs() - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/activemq-cpp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/activemq-cpp/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/activemq-cpp/copyright) - -file( - COPY - ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file( - COPY - ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file( - COPY - ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file( - COPY - ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cppd.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file( - COPY - ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cppd.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file( - COPY - ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cppd.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/${ACTIVEMQCPP_LIB_PREFFIX}activemq-cpp.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + + if (ACTIVEMQCPP_SHARED_LIB) + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + endif() +endif() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/${ACTIVEMQCPP_LIB_PREFFIX}activemq-cpp${ACTIVEMQCPP_LIB_SUFFIX}.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + + if (ACTIVEMQCPP_SHARED_LIB) + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cpp${ACTIVEMQCPP_LIB_SUFFIX}.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cpp${ACTIVEMQCPP_LIB_SUFFIX}.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + endif() +endif() file(COPY ${SOURCE_PATH}/src/main/activemq DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) file(COPY ${SOURCE_PATH}/src/main/cms DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) file(COPY ${SOURCE_PATH}/src/main/decaf DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/activemq-cpp/vcpkg.json b/ports/activemq-cpp/vcpkg.json new file mode 100644 index 00000000000000..f950dba6736f19 --- /dev/null +++ b/ports/activemq-cpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "activemq-cpp", + "version-string": "3.9.5", + "port-version": 4, + "description": "Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server.", + "supports": "!(uwp | linux | osx)", + "dependencies": [ + "apr" + ] +} diff --git a/ports/ade/CONTROL b/ports/ade/CONTROL deleted file mode 100644 index fd8286ecd9584b..00000000000000 --- a/ports/ade/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: ade -Version: 0.1.1f -Description: ADE Framework is a graph construction, manipulation, and processing framework. ADE Framework is suitable for organizing data flow processing and execution. \ No newline at end of file diff --git a/ports/ade/portfile.cmake b/ports/ade/portfile.cmake index 83d8503b87dcce..7af58d539a71e6 100644 --- a/ports/ade/portfile.cmake +++ b/ports/ade/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/ade @@ -17,12 +15,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(COPY ${CURRENT_PACKAGES_DIR}/debug/share/ade/adeTargets-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ade/) - -file(READ ${CURRENT_PACKAGES_DIR}/share/ade/adeTargets-debug.cmake ADE_TARGET_DEBUG) -string(REPLACE "/lib/" - "/debug/lib/" ADE_TARGET_DEBUG "${ADE_TARGET_DEBUG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/ade/adeTargets-debug.cmake "${ADE_TARGET_DEBUG}") +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/ade/vcpkg.json b/ports/ade/vcpkg.json new file mode 100644 index 00000000000000..53fb3606d73169 --- /dev/null +++ b/ports/ade/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "ade", + "version-string": "0.1.1f", + "port-version": 2, + "description": "ADE Framework is a graph construction, manipulation, and processing framework. ADE Framework is suitable for organizing data flow processing and execution." +} diff --git a/ports/advobfuscator/portfile.cmake b/ports/advobfuscator/portfile.cmake new file mode 100644 index 00000000000000..883ac486520a04 --- /dev/null +++ b/ports/advobfuscator/portfile.cmake @@ -0,0 +1,14 @@ +# Download the code from GitHub +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO andrivet/ADVobfuscator + REF 1852a0eb75b03ab3139af7f938dfb617c292c600 + SHA512 1bca72b21a3cbf9d8db21fb21d112dd4ca83cac695abfb8fc3d8065245a0cc84cb9e41eb9ff81481e8e0a9d214ff6f5c9aec5d1ba8a9d4387b08dd895ecf1cd5 + HEAD_REF master +) + +# Install the header only source files to the right location +file(INSTALL ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# The README.md conains the LICENSE details +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/advobfuscator/vcpkg.json b/ports/advobfuscator/vcpkg.json new file mode 100644 index 00000000000000..370f98a8539895 --- /dev/null +++ b/ports/advobfuscator/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "advobfuscator", + "version-date": "2020-06-26", + "description": "Obfuscation library based on C++11/14 and metaprogramming", + "dependencies": [ + "boost-msm" + ] +} diff --git a/ports/aixlog/CONTROL b/ports/aixlog/CONTROL deleted file mode 100644 index 12e2a88c9eaa65..00000000000000 --- a/ports/aixlog/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: aixlog -Version: 1.2.1 -Description: Header-only C++ logging library diff --git a/ports/aixlog/portfile.cmake b/ports/aixlog/portfile.cmake index 4838372d67abdf..5249e4d23d1f2c 100644 --- a/ports/aixlog/portfile.cmake +++ b/ports/aixlog/portfile.cmake @@ -1,32 +1,16 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# -include(vcpkg_common_functions) - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO badaix/aixlog - REF v1.2.1 - SHA512 776558fdd911f0cc9e8d467bf8e00a1930d2e51bb8ccd5f36f95955fefecab65faf575a80fdaacfe83fd32808f8b9c2e0323b16823e0431300df7bc0c1dfde12 + OUT_SOURCE_PATH SOURCE_PATH + REPO badaix/aixlog + REF fd4a341740ee840092963de852584ec8ff811c4f # v1.5.0 + SHA512 10ab07dcb1e67064c0d69ddcf9289d79d914c70fe6922f32179f9ac38d5c682a4ebe08b686d8160c699a6b966bc7aa2fd7d0268664570a10ce146850e78b292d ) - - - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aixlog) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/aixlog/LICENSE ${CURRENT_PACKAGES_DIR}/share/aixlog/copyright) +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME aixlog) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aixlog/vcpkg.json b/ports/aixlog/vcpkg.json new file mode 100644 index 00000000000000..978c86f3f67927 --- /dev/null +++ b/ports/aixlog/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "aixlog", + "version-semver": "1.5.0", + "description": "Header-only C++ logging library", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/akali/portfile.cmake b/ports/akali/portfile.cmake new file mode 100644 index 00000000000000..e91bbd88f95e35 --- /dev/null +++ b/ports/akali/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO winsoft666/akali + REF 57fea619dea42aa116679b22340f56fc94eb83a9 + SHA512 b80f7e72396032e8b24464e159f4a6c24663d671bcbe9ffa46f68e5bc0398fd0caf3ac918f8ccb8d304be4d5a3fade2821f87f7270e02ec8aae722e2faeab0f3 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" AKALI_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DAKALI_STATIC:BOOL=${AKALI_STATIC} + -DBUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/akali) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/akali) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/akali) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/akali) +endif() + +file(READ ${CURRENT_PACKAGES_DIR}/include/akali/akali_export.h AKALI_EXPORT_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "#ifdef AKALI_STATIC" "#if 1" AKALI_EXPORT_H "${AKALI_EXPORT_H}") +else() + string(REPLACE "#ifdef AKALI_STATIC" "#if 0" AKALI_EXPORT_H "${AKALI_EXPORT_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/akali/akali_export.h "${AKALI_EXPORT_H}") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() diff --git a/ports/akali/vcpkg.json b/ports/akali/vcpkg.json new file mode 100644 index 00000000000000..fb1cc78517e26e --- /dev/null +++ b/ports/akali/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "akali", + "version-string": "1.42", + "port-version": 2, + "description": "C++ Common Library.", + "homepage": "https://github.com/winsoft666/akali", + "supports": "!(arm | arm64 | uwp)" +} diff --git a/ports/alac-decoder/CMakeLists.txt b/ports/alac-decoder/CMakeLists.txt index 1d82fc4e540fb4..a7c62f6487a738 100644 --- a/ports/alac-decoder/CMakeLists.txt +++ b/ports/alac-decoder/CMakeLists.txt @@ -18,6 +18,8 @@ set (SRCS if(MSVC) add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32) +else() + add_compile_options(-Wno-error=implicit-function-declaration) endif() include_directories(.) diff --git a/ports/alac-decoder/CONTROL b/ports/alac-decoder/CONTROL deleted file mode 100644 index dcbf3922e19187..00000000000000 --- a/ports/alac-decoder/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: alac-decoder -Version: 0.2-1 -Homepage: https://distfiles.macports.org/alac_decoder -Description: ALAC C implementation of a decoder, written from reverse engineering the file format diff --git a/ports/alac-decoder/no-pragma-warning.patch b/ports/alac-decoder/no-pragma-warning.patch index 97e2960c8b5bb8..1dc7c06874a9fc 100644 --- a/ports/alac-decoder/no-pragma-warning.patch +++ b/ports/alac-decoder/no-pragma-warning.patch @@ -1,14 +1,14 @@ -diff --git a/alac.c b/alac.c -index b829e29..8e8805f 100644 ---- a/alac.c -+++ b/alac.c -@@ -284,7 +284,9 @@ static int count_leading_zeros(int input) - return output; - } - #else -+#if !defined(_MSC_VER) - #warning using generic count leading zeroes. You may wish to write one for your CPU / compiler -+#endif - static int count_leading_zeros(int input) - { - int output = 0; +diff --git a/alac.c b/alac.c +index b829e29..8e8805f 100644 +--- a/alac.c ++++ b/alac.c +@@ -284,7 +284,9 @@ static int count_leading_zeros(int input) + return output; + } + #else ++#if !defined(_MSC_VER) + #warning using generic count leading zeroes. You may wish to write one for your CPU / compiler ++#endif + static int count_leading_zeros(int input) + { + int output = 0; diff --git a/ports/alac-decoder/portfile.cmake b/ports/alac-decoder/portfile.cmake index ee4a109d960764..15c8152b35371f 100644 --- a/ports/alac-decoder/portfile.cmake +++ b/ports/alac-decoder/portfile.cmake @@ -1,34 +1,32 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/alac_decoder) vcpkg_download_distfile(ARCHIVE URLS "https://distfiles.macports.org/alac_decoder/alac_decoder-0.2.0.tgz" FILENAME "alac_decoder-0.2.0.tgz" SHA512 4b37d4fe37681bfccaa4a27fbaf11eb2a1fba5f14e77d219a6d9814ff44d1168534d05eb19443dd2fd11e6fcdf4da3a22e3f3c79314cb7a6767c152351b13e29 ) -vcpkg_extract_source_archive(${ARCHIVE}) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/decomp.c DESTINATION ${SOURCE_PATH}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/remove_stdint_headers.patch - ${CMAKE_CURRENT_LIST_DIR}/no-pragma-warning.patch + remove_stdint_headers.patch + no-pragma-warning.patch ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/decomp.c DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/alac-decoder) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/alac-decoder RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/alac-decoder/vcpkg.json b/ports/alac-decoder/vcpkg.json new file mode 100644 index 00000000000000..b844541009bfca --- /dev/null +++ b/ports/alac-decoder/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "alac-decoder", + "version-string": "0.2", + "port-version": 5, + "description": "ALAC C implementation of a decoder, written from reverse engineering the file format", + "homepage": "https://distfiles.macports.org/alac_decoder" +} diff --git a/ports/alac/CONTROL b/ports/alac/CONTROL deleted file mode 100644 index 1bea4dc14549c1..00000000000000 --- a/ports/alac/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: alac -Version: 2017-11-03-c38887c5-1 -Homepage: https://github.com/macosforge/alac -Description: The Apple Lossless Audio Codec (ALAC) is a lossless audio codec developed by Apple and deployed on all of its platforms and devices. diff --git a/ports/alac/portfile.cmake b/ports/alac/portfile.cmake index ce5c6bad1a1aa9..d9dd83141e7dc4 100644 --- a/ports/alac/portfile.cmake +++ b/ports/alac/portfile.cmake @@ -2,8 +2,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/alac/vcpkg.json b/ports/alac/vcpkg.json new file mode 100644 index 00000000000000..74adbe459d0d26 --- /dev/null +++ b/ports/alac/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "alac", + "version-string": "2017-11-03-c38887c5", + "port-version": 2, + "description": "The Apple Lossless Audio Codec (ALAC) is a lossless audio codec developed by Apple and deployed on all of its platforms and devices.", + "homepage": "https://github.com/macosforge/alac", + "supports": "!uwp" +} diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL deleted file mode 100644 index 9c886b755780a7..00000000000000 --- a/ports/alembic/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: alembic -Version: 1.7.11-4 -Build-Depends: ilmbase, hdf5 -Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications. -Homepage: https://alembic.io/ diff --git a/ports/alembic/fix-C1083.patch b/ports/alembic/fix-C1083.patch deleted file mode 100644 index 15de9f514f9f26..00000000000000 --- a/ports/alembic/fix-C1083.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/lib/Alembic/Abc/Foundation.h b/lib/Alembic/Abc/Foundation.h -index 9760c49..fbab6a0 100644 ---- a/lib/Alembic/Abc/Foundation.h -+++ b/lib/Alembic/Abc/Foundation.h -@@ -40,11 +40,11 @@ - #include - #include - --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include - - #include - #include -diff --git a/lib/Alembic/AbcGeom/Foundation.h b/lib/Alembic/AbcGeom/Foundation.h -index 301efc3..2bb0f6b 100644 ---- a/lib/Alembic/AbcGeom/Foundation.h -+++ b/lib/Alembic/AbcGeom/Foundation.h -@@ -39,8 +39,8 @@ - - #include - --#include --#include -+#include -+#include - - - namespace Alembic { -diff --git a/lib/Alembic/Util/Foundation.h b/lib/Alembic/Util/Foundation.h -index d7f40dd..a41bb97 100644 ---- a/lib/Alembic/Util/Foundation.h -+++ b/lib/Alembic/Util/Foundation.h -@@ -63,7 +63,7 @@ - - #include - --#include -+#include - - #include - #include diff --git a/ports/alembic/fix-find-openexr-ilmbase.patch b/ports/alembic/fix-find-openexr-ilmbase.patch new file mode 100644 index 00000000000000..f35f17df35ec4f --- /dev/null +++ b/ports/alembic/fix-find-openexr-ilmbase.patch @@ -0,0 +1,50 @@ +diff --git a/cmake/AlembicIlmBase.cmake b/cmake/AlembicIlmBase.cmake +index cd00d70..0e50512 100644 +--- a/cmake/AlembicIlmBase.cmake ++++ b/cmake/AlembicIlmBase.cmake +@@ -33,11 +33,17 @@ + ## + ##-***************************************************************************** + +-FIND_PACKAGE(IlmBase) ++FIND_PACKAGE(OpenEXR) + +-IF (ILMBASE_FOUND) ++IF (OPENEXR_FOUND) + SET(ALEMBIC_ILMBASE_FOUND 1 CACHE STRING "Set to 1 if IlmBase is found, 0 otherwise") + ++ set(ALEMBIC_ILMBASE_INCLUDE_DIRECTORY ${OpenEXR_INCLUDE_DIRS}/OpenEXR) ++ set(ALEMBIC_ILMBASE_HALF_LIB ${OPENEXR_HALF_LIBRARY}) ++ set(ALEMBIC_ILMBASE_IEX_LIB ${OPENEXR_IEX_LIBRARY}) ++ set(ALEMBIC_ILMBASE_IEXMATH_LIB ${OPENEXR_IEXMATH_LIBRARY} ${OPENEXR_IMATH_LIBRARY}) ++ set(ALEMBIC_ILMBASE_ILMTHREAD_LIB ${OPENEXR_ILMTHREAD_LIBRARY}) ++ set(ALEMBIC_ILMBASE_IMATH_LIB ${OPENEXR_IMATH_LIBRARY}) + SET(ALEMBIC_ILMBASE_LIBS + ${ALEMBIC_ILMBASE_IMATH_LIB} + ${ALEMBIC_ILMBASE_ILMTHREAD_LIB} +@@ -45,9 +59,9 @@ IF (ILMBASE_FOUND) + ${ALEMBIC_ILMBASE_HALF_LIB} + ) + +- if (${ALEMBIC_ILMBASE_IEXMATH_LIB}) ++ if (ALEMBIC_ILMBASE_IEXMATH_LIB) + SET(ALEMBIC_ILMBASE_LIBS ${ALEMBIC_ILMBASE_LIBS} ${ALEMBIC_ILMBASE_IEXMATH_LIB}) +- endif (${ALEMBIC_ILMBASE_IEXMATH_LIB}) ++ endif (ALEMBIC_ILMBASE_IEXMATH_LIB) + + ELSE() + SET(ALEMBIC_ILMBASE_FOUND 0 CACHE STRING "Set to 1 if IlmBase is found, 0 otherwise") +diff --git a/cmake/AlembicOpenEXR.cmake b/cmake/AlembicOpenEXR.cmake +index 0833b32..a9180cd 100644 +--- a/cmake/AlembicOpenEXR.cmake ++++ b/cmake/AlembicOpenEXR.cmake +@@ -38,8 +38,8 @@ + FIND_PACKAGE( OpenEXR ) + + IF( OPENEXR_FOUND ) +- SET( ALEMBIC_OPENEXR_INCLUDE_PATH ${OPENEXR_INCLUDE_PATHS} ) ++ SET( ALEMBIC_OPENEXR_INCLUDE_PATH ${OPENEXR_INCLUDE_PATHS}/OpenEXR ) + SET( ALEMBIC_OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} ) + # SET( ALEMBIC_OPENEXR_DEFINITIONS ${OPENEXR_DEFINITIONS} ) + + SET( ALEMBIC_OPENEXR_FOUND 1 CACHE STRING "Set to 1 if OpenEXR is found, 0 otherwise" ) diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 2d000871f9fe86..dd8a3100e5a993 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -1,29 +1,38 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP" "OSX" "Linux") -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() +vcpkg_buildpath_length_warning(37) vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.11 - SHA512 94b9c218a2fe6e2e24205aff4a2f6bab784851c2aa15592fb60ea91f0e8038b0c0656a118f3a5cba0d3de8917dd90b74d0e2d1c4ac034b9ee3f5d0741d9f6b70 + REF 7e5cf9b896f4299117457f36a7bf47d962cd0ebf # 1.7.16 + SHA512 aeb449890874fa3a89a72245f3e63a3370332d6becdf20bc77bd9c216bbe1e4578018bbe559c06df69db199799d071399f925a91c8fa816e0eec2d2420f091e9 HEAD_REF master PATCHES - fix-C1083.patch + fix-find-openexr-ilmbase.patch ) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindIlmBase.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindOpenEXR.cmake) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + # In debug mode with g++, alembic defines -Werror + # so we need to disable some warnings to avoid build errors + list(APPEND GXX_DEBUG_FLAGS + -DCMAKE_CXX_FLAGS_DEBUG=-Wno-deprecated + -DCMAKE_CXX_FLAGS_DEBUG=-Wno-error=implicit-fallthrough + ) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DUSE_HDF5=ON + -DUSE_HDF5=ON + OPTIONS_DEBUG + ${GXX_DEBUG_FLAGS} ) vcpkg_install_cmake() @@ -34,23 +43,38 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE ${EXE}) -file(REMOVE ${DEBUG_EXE}) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll) - -file(READ ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-debug.cmake DEBUG_CONFIG) -string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll" - "\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG "${DEBUG_CONFIG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-debug.cmake "${DEBUG_CONFIG}") - -file(READ ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-release.cmake RELEASE_CONFIG) -string(REPLACE "\${_IMPORT_PREFIX}/lib/Alembic.dll" - "\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG "${RELEASE_CONFIG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-release.cmake "${RELEASE_CONFIG}") - -# Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Alembic/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/Alembic/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/Alembic/copyright) + +if(VCPKG_TARGET_IS_WINDOWS) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + + file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(REMOVE ${EXE}) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll) + file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-release.cmake RELEASE_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/lib/Alembic.dll" + "\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG "${RELEASE_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-release.cmake "${RELEASE_CONFIG}") + + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + + file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${DEBUG_EXE}) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll) + file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-debug.cmake DEBUG_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll" + "\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG "${DEBUG_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-debug.cmake "${DEBUG_CONFIG}") + + endif() + +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/alembic/vcpkg.json b/ports/alembic/vcpkg.json new file mode 100644 index 00000000000000..ca8d213bae4a32 --- /dev/null +++ b/ports/alembic/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "alembic", + "version": "1.7.16", + "port-version": 1, + "description": "Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications.", + "homepage": "https://alembic.io/", + "supports": "windows & !arm & !uwp & !static", + "dependencies": [ + "hdf5", + "ilmbase" + ] +} diff --git a/ports/aliyun-oss-c-sdk/CONTROL b/ports/aliyun-oss-c-sdk/CONTROL deleted file mode 100644 index 430541401bbb4b..00000000000000 --- a/ports/aliyun-oss-c-sdk/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: aliyun-oss-c-sdk -Version: 3.7.1-1 -Description: Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability. -Build-Depends: curl, apr-util diff --git a/ports/aliyun-oss-c-sdk/portfile.cmake b/ports/aliyun-oss-c-sdk/portfile.cmake index 2e3a2c73e9935d..6b3af2ab1fabeb 100644 --- a/ports/aliyun-oss-c-sdk/portfile.cmake +++ b/ports/aliyun-oss-c-sdk/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() @@ -7,8 +5,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aliyun/aliyun-oss-c-sdk - REF 3.7.1 - SHA512 0c289832d87ea7fae60d0846617bc839a1529ab6d59c2bb520e2826b0374953e8078179c4043c5c85a56c38985189aa584036104a504da4cf1ea2d35a53c8fde + REF f9e441137620d712c7d89587c951bed459ebc843 # 3.10.0 + SHA512 6621d105706fb69b3f1998d7c83c94ff93747946040f0c45ec52986c0e8d8db3d48237d1e3f0959e09536ca43bcbe3bcdb32f90622ce51de6ea7132be6dd7cf7 HEAD_REF master PATCHES patch.patch diff --git a/ports/aliyun-oss-c-sdk/vcpkg.json b/ports/aliyun-oss-c-sdk/vcpkg.json new file mode 100644 index 00000000000000..3494e59994412a --- /dev/null +++ b/ports/aliyun-oss-c-sdk/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "aliyun-oss-c-sdk", + "version-string": "3.10.0", + "port-version": 1, + "description": "Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability.", + "supports": "!(uwp | linux | osx)", + "dependencies": [ + "apr-util", + "curl" + ] +} diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL deleted file mode 100644 index defd1b481b44ae..00000000000000 --- a/ports/allegro5/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: allegro5 -Version: 5.2.5.0 -Homepage: https://github.com/liballeg/allegro5 -Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like. -Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 37eea075621d75..7748a4831ab876 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO liballeg/allegro5 - REF 5.2.5.0 - SHA512 9b97a46f0fd146c3958a5f8333822665ae06b984b3dbedc1356afdac8fe3248203347cb08b30ebda049a7320948c7844e9d00dc055c317836c2557b5bfc2ab04 + REF 5.2.6.0 + SHA512 d590c1a00d1b314c6946e0f6ad3e3a8b6e6309bada2ec38857186f817147ac99dae8a1c4412abe701af88da5dca3dd8f989a1da66630192643d3c08c0146b603 HEAD_REF master PATCHES fix-pdb-install.patch @@ -65,6 +63,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.pdb) diff --git a/ports/allegro5/vcpkg.json b/ports/allegro5/vcpkg.json new file mode 100644 index 00000000000000..fe3541d84aa038 --- /dev/null +++ b/ports/allegro5/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "allegro5", + "version": "5.2.6.0", + "port-version": 1, + "description": "Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like.", + "homepage": "https://github.com/liballeg/allegro5", + "dependencies": [ + "bzip2", + "freetype", + "libflac", + "libogg", + "libpng", + "libtheora", + "libvorbis", + "openal-soft", + "opengl", + "opus", + "opusfile", + "physfs", + "zlib" + ] +} diff --git a/ports/ampl-asl/copyright b/ports/ampl-asl/copyright new file mode 100644 index 00000000000000..7fe289a232d7f1 --- /dev/null +++ b/ports/ampl-asl/copyright @@ -0,0 +1,59 @@ +Licenses +======== + +Copyright (C) 1990 - 2001 Lucent Technologies + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +---------------------------------------------------------------------- + +Copyright (C) 2007 David M. Gay + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that the copyright notice and this permission notice and warranty +disclaimer appear in supporting documentation. + +The author disclaims all warranties with regard to this software, +including all implied warranties of merchantability and fitness. +In no event shall the author be liable for any special, indirect or +consequential damages or any damages whatsoever resulting from loss of +use, data or profits, whether in an action of contract, negligence or +other tortious action, arising out of or in connection with the use or +performance of this software. + +---------------------------------------------------------------------- + +Copyright (C) 2002 - 2014 AMPL Optimization LLC + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that the copyright notice and this permission notice and warranty +disclaimer appear in supporting documentation. + +The author and AMPL Optimization LLC disclaim all warranties with +regard to this software, including all implied warranties of +merchantability and fitness. In no event shall the author be liable +for any special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether in an +action of contract, negligence or other tortious action, arising out +of or in connection with the use or performance of this software. diff --git a/ports/ampl-asl/fix-crt-linkage.patch b/ports/ampl-asl/fix-crt-linkage.patch new file mode 100644 index 00000000000000..0e29b6ef4c04da --- /dev/null +++ b/ports/ampl-asl/fix-crt-linkage.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 976af78..35d248d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -256,7 +256,7 @@ macro(createSingleASL name sourcedir sources) + endif() + if(MSVC) + target_compile_options(${name} PRIVATE +- /wd4013 /wd4018 /wd4101 /wd4244 /wd4273 /wd4267 /wd4996 /MT$<$:d>) ++ /wd4013 /wd4018 /wd4101 /wd4244 /wd4273 /wd4267 /wd4996) + else() + target_compile_options(${name} PRIVATE -Wno-unused-result -Wno-parentheses) + endif() diff --git a/ports/ampl-asl/install-extra-headers.patch b/ports/ampl-asl/install-extra-headers.patch new file mode 100644 index 00000000000000..bf40b3b9f6bef6 --- /dev/null +++ b/ports/ampl-asl/install-extra-headers.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 35d248d..8a85aa7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -317,6 +317,7 @@ if(BUILD_CPP) + endif() + + install(FILES ${ASL_HEADERS} ${ASL_SOURCE_DIR}/opcode.hd ${ASL_SOURCE_DIR}/r_opn.hd ++ ${GENERATED_INCLUDE_DIR}/stdio1.h ${GENERATED_INCLUDE_DIR}/arith.h + DESTINATION include/asl COMPONENT asl) + install(FILES ${ASL2_HEADERS} ${ASL2_SOURCE_DIR}/opcode.hd ${ASL2_SOURCE_DIR}/r_opn.hd + DESTINATION include/asl2 COMPONENT asl) diff --git a/ports/ampl-asl/install-targets.patch b/ports/ampl-asl/install-targets.patch new file mode 100644 index 00000000000000..c68a7e813684e7 --- /dev/null +++ b/ports/ampl-asl/install-targets.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8a85aa7..c0619bc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -247,8 +247,8 @@ endif() + + macro(createSingleASL name sourcedir sources) + add_library(${name} STATIC ${${sources}} ${GENERATED_INCLUDE_DIR}/arith.h) +- target_include_directories(${name} PUBLIC ${GENERATED_INCLUDE_DIR} +- ${sourcedir}) ++ target_include_directories(${name} PUBLIC $ ++ $ $) + target_compile_definitions(${name} PRIVATE ${ASL_COMPILE_DEFINITIONS}) + target_link_libraries(${name} PUBLIC ${CMAKE_DL_LIBS}) + if(NOT WIN32) +@@ -322,14 +322,16 @@ install(FILES ${ASL_HEADERS} ${ASL_SOURCE_DIR}/opcode.hd ${ASL_SOURCE_DIR}/r_opn + install(FILES ${ASL2_HEADERS} ${ASL2_SOURCE_DIR}/opcode.hd ${ASL2_SOURCE_DIR}/r_opn.hd + DESTINATION include/asl2 COMPONENT asl) + +-install(TARGETS asl asl2 DESTINATION lib COMPONENT asl) ++install(TARGETS asl asl2 EXPORT unofficial-asl-config DESTINATION lib COMPONENT asl) + if(BUILD_MT_LIBS) +- install(TARGETS asl-mt asl2-mt DESTINATION lib COMPONENT asl) ++ install(TARGETS asl-mt asl2-mt EXPORT unofficial-asl-config DESTINATION lib COMPONENT asl) + endif() + if(MSVC AND BUILD_DYNRT_LIBS) +- install(TARGETS asl-dynrt asl2-dynrt DESTINATION lib COMPONENT asl) ++ install(TARGETS asl-dynrt asl2-dynrt EXPORT unofficial-asl-config DESTINATION lib COMPONENT asl) + endif() + if(TARGET aslcpp) + install(FILES ${ASL_CPP_HEADERS} DESTINATION include/aslcpp COMPONENT asl) +- install(TARGETS aslcpp DESTINATION lib COMPONENT asl) +-endif() +\ No newline at end of file ++ install(TARGETS aslcpp EXPORT unofficial-asl-config DESTINATION lib COMPONENT asl) ++endif() ++ ++install(EXPORT unofficial-asl-config DESTINATION share/unofficial-asl) +\ No newline at end of file diff --git a/ports/ampl-asl/portfile.cmake b/ports/ampl-asl/portfile.cmake new file mode 100644 index 00000000000000..96af62c254b2b1 --- /dev/null +++ b/ports/ampl-asl/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ampl/asl + REF 934d34719c8a620fcf16ae5a3c00c326eb22e748 + SHA512 b6fcb3dcb53a53d975666db1643d7ea518246e8fb6745621ce4b63de4393f7767844e9241baa6fdf1a45c241a9aa0866844c47deec0020313278128cccff6869 + HEAD_REF master + PATCHES + workaround-msvc-optimizer-ice.patch + fix-crt-linkage.patch # CRT linkage uses C/CXX FLAGS in vcpkg + install-extra-headers.patch + install-targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_MCMODELLARGE=OFF + -DBUILD_DYNRT_LIBS=OFF # CRT linkage uses C/CXX FLAGS in vcpkg + -DBUILD_MT_LIBS=OFF # CRT linkage uses C/CXX FLAGS in vcpkg + -DBUILD_CPP=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-asl TARGET_PATH share/unofficial-asl) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# from ampl-mp license +file(INSTALL ${CURRENT_PORT_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/ampl-asl/vcpkg.json b/ports/ampl-asl/vcpkg.json new file mode 100644 index 00000000000000..5a9827dfdb2596 --- /dev/null +++ b/ports/ampl-asl/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "ampl-asl", + "version-string": "2020-11-11", + "port-version": 1, + "description": "AMPL Solver Library", + "homepage": "https://github.com/ampl/asl", + "supports": "!uwp" +} diff --git a/ports/ampl-asl/workaround-msvc-optimizer-ice.patch b/ports/ampl-asl/workaround-msvc-optimizer-ice.patch new file mode 100644 index 00000000000000..7ae62595d4ed77 --- /dev/null +++ b/ports/ampl-asl/workaround-msvc-optimizer-ice.patch @@ -0,0 +1,60 @@ +diff --git a/src/solvers/avltree.c b/src/solvers/avltree.c +index 7a9adab..a75da90 100644 +--- a/src/solvers/avltree.c ++++ b/src/solvers/avltree.c +@@ -54,6 +54,10 @@ AVL_Tree { + void (*Free)(void*); + }; + ++#if defined(_MSC_VER) && _MSC_VER < 1917 ++#pragma optimize("", off) ++#endif ++ + AVL_Tree* + AVL_Tree_alloc2(void *v, AVL_Elcomp cmp, void *(*Malloc)(size_t), void (*Free)(void*)) + { +diff --git a/src/solvers/sphes.c b/src/solvers/sphes.c +index a50065f..6e6eedc 100644 +--- a/src/solvers/sphes.c ++++ b/src/solvers/sphes.c +@@ -461,6 +461,10 @@ compar(const void *a, const void *b) + #undef del_mblk + #define del_mblk(b,c) Del_mblk_ASL(a,b,(Char*)(c)) + ++#if defined(_MSC_VER) && _MSC_VER < 1917 ++#pragma optimize("", off) ++#endif ++ + static void + new_Hesoprod(ASL_pfgh *asl, ograd *L, ograd *R, real coef) + { +diff --git a/src/solvers2/avltree.c b/src/solvers2/avltree.c +index 7a9adab..a75da90 100644 +--- a/src/solvers2/avltree.c ++++ b/src/solvers2/avltree.c +@@ -54,6 +54,10 @@ AVL_Tree { + void (*Free)(void*); + }; + ++#if defined(_MSC_VER) && _MSC_VER < 1917 ++#pragma optimize("", off) ++#endif ++ + AVL_Tree* + AVL_Tree_alloc2(void *v, AVL_Elcomp cmp, void *(*Malloc)(size_t), void (*Free)(void*)) + { +diff --git a/src/solvers2/sphes.c b/src/solvers2/sphes.c +index dd2edff..ebdd3af 100644 +--- a/src/solvers2/sphes.c ++++ b/src/solvers2/sphes.c +@@ -855,6 +855,10 @@ compar(const void *a, const void *b) + #undef del_mblk + #define del_mblk(c) Del_mblk_ASL(a,(Char*)(c)) + ++#if defined(_MSC_VER) && _MSC_VER < 1917 ++#pragma optimize("", off) ++#endif ++ + static void + new_Hesoprod(EvalWorkspace *ew, int nov, int *ov, real *oc, int nR, int *Rov, real *Roc, real coef) + { diff --git a/ports/ampl-mp/CONTROL b/ports/ampl-mp/CONTROL deleted file mode 100644 index d45564c4f325d3..00000000000000 --- a/ports/ampl-mp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: ampl-mp -Version: 2019-03-21-1 -Description: An open-source library for mathematical programming diff --git a/ports/ampl-mp/disable-matlab-mex.patch b/ports/ampl-mp/disable-matlab-mex.patch index f1b8be443f31ce..6cfb9cb716aa93 100644 --- a/ports/ampl-mp/disable-matlab-mex.patch +++ b/ports/ampl-mp/disable-matlab-mex.patch @@ -1,11 +1,13 @@ ---- a/src/asl/CMakeLists.txt 2019-02-08 16:42:50.793071700 -0600 -+++ b/src/asl/CMakeLists.txt 2019-02-08 16:44:04.960894500 -0600 -@@ -266,7 +266,7 @@ endif () +diff --git a/src/asl/CMakeLists.txt b/src/asl/CMakeLists.txt +index b7d7ecf..c31a032 100644 +--- a/src/asl/CMakeLists.txt ++++ b/src/asl/CMakeLists.txt +@@ -59,7 +59,7 @@ endif () - target_link_libraries(asl ${CMAKE_DL_LIBS}) + target_link_libraries(aslmp ${CMAKE_DL_LIBS}) -find_package(MATLAB) +set(MATLAB_FOUND) - if (MATLAB_FOUND) + if (MATLAB_FOUND AND MATLAB_BUILD) set(matlab_asl asl) if (MSVC) diff --git a/ports/ampl-mp/fix-arm-build.patch b/ports/ampl-mp/fix-arm-build.patch new file mode 100644 index 00000000000000..443cdc457c8f35 --- /dev/null +++ b/ports/ampl-mp/fix-arm-build.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92089a3..d4c6762 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -257,9 +257,15 @@ if (CMAKE_CROSSCOMPILING) + COMMAND ${CMAKE_COMMAND} -E echo + "warning: cannot re-generate ${MP_EXPR_INFO_FILE}") + else () ++ if (ARITHCHK_EXEC) ++ add_custom_command(OUTPUT ${MP_EXPR_INFO_FILE} ++ COMMAND ${WINE} ${ARITHCHK_EXEC} ${MP_EXPR_INFO_FILE} ++ DEPENDS gen-expr-info) ++ else() + add_custom_command(OUTPUT ${MP_EXPR_INFO_FILE} + COMMAND ${WINE} $ ${MP_EXPR_INFO_FILE} + DEPENDS gen-expr-info) ++ endif() + endif () + + add_prefix(MP_HEADERS include/mp/ +@@ -359,3 +365,4 @@ endif() + install(DIRECTORY include/mp DESTINATION include) + install(TARGETS mp DESTINATION lib RUNTIME DESTINATION bin) + install(FILES LICENSE.rst DESTINATION share/mp) ++install(TARGETS gen-expr-info RUNTIME DESTINATION bin) +\ No newline at end of file +diff --git a/src/amplsig/CMakeLists.txt b/src/amplsig/CMakeLists.txt +index 81312e9..f44c847 100644 +--- a/src/amplsig/CMakeLists.txt ++++ b/src/amplsig/CMakeLists.txt +@@ -14,6 +14,6 @@ find_library(WS2_32_LIBRARY Ws2_32 + PATHS ${WIN_LIBRARY_DIR} NO_DEFAULT_PATH) + if (WS2_32_LIBRARY) + add_ampl_library(amplsig amplsig.cc) +- message(WS2_32_LIBRARY ${WS2_32_LIBRARY}) +- target_link_libraries(amplsig mp ${WS2_32_LIBRARY}) ++ message(WS2_32_LIBRARY ws2_32) ++ target_link_libraries(amplsig mp ws2_32) + endif () diff --git a/ports/ampl-mp/fix-build.patch b/ports/ampl-mp/fix-build.patch new file mode 100644 index 00000000000000..ad371ff241dfc0 --- /dev/null +++ b/ports/ampl-mp/fix-build.patch @@ -0,0 +1,42 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 904cfb1..13f11cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -61,6 +61,8 @@ set_cache(BUILD "" STRING + if (BUILD) + if (BUILD STREQUAL all) + set(MP_MODULES all) ++ elseif (BUILD STREQUAL no) ++ set(MP_MODULES) + else () + string(REGEX MATCHALL "[^,]+" MP_MODULES "${BUILD}") + endif () +@@ -200,7 +202,7 @@ function (add_mp_library name) + add_dependencies(${name} ${add_mp_library_DEPENDS}) + endif () + # Add library linked with dynamic runtime. +- if (MSVC) ++ if (0) + add_library(${name}-dynrt ${libtype} EXCLUDE_FROM_ALL + ${add_mp_library_UNPARSED_ARGUMENTS} ${dynrt-objects}) + target_compile_options(${name}-dynrt PUBLIC /MD$<$:d>) +@@ -308,16 +310,17 @@ if (RT_LIBRARY) + target_link_libraries(mp ${RT_LIBRARY}) + endif () + ++if (MP_VARIADIC_TEMPLATES) + # Check if variadic templates are working and not affected by GCC bug 39653: + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39653 + check_cxx_source_compiles(" + template + struct S { typedef typename S::type type; }; + int main() {}" MP_VARIADIC_TEMPLATES) +- +-if (MP_VARIADIC_TEMPLATES) ++ if (MP_VARIADIC_TEMPLATES) + add_executable(nl-example src/nl-example.cc) + target_link_libraries(nl-example mp) ++ endif() + endif () + + add_subdirectory(doc) diff --git a/ports/ampl-mp/fix-dependency-asl.patch b/ports/ampl-mp/fix-dependency-asl.patch new file mode 100644 index 00000000000000..f0c1755ae9c037 --- /dev/null +++ b/ports/ampl-mp/fix-dependency-asl.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 13f11cb..92089a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -323,9 +323,9 @@ check_cxx_source_compiles(" + endif() + endif () + ++find_package(unofficial-asl CONFIG REQUIRED) + add_subdirectory(doc) + add_subdirectory(src/amplsig) +-add_subdirectory(src/asl) + add_subdirectory(src/cp) + add_subdirectory(solvers) + +diff --git a/src/cp/cp.cc b/src/cp/cp.cc +index d4adc35..ca8f35b 100644 +--- a/src/cp/cp.cc ++++ b/src/cp/cp.cc +@@ -24,7 +24,7 @@ + #include + #include + #include "mp/format.h" +-#include "funcadd.h" ++#include + + namespace { + void error(arglist *al, const char *message) { diff --git a/ports/ampl-mp/install-targets.patch b/ports/ampl-mp/install-targets.patch index 8538920b7bbd6b..a84420fed1ae73 100644 --- a/ports/ampl-mp/install-targets.patch +++ b/ports/ampl-mp/install-targets.patch @@ -1,44 +1,23 @@ ---- a/CMakeLists.txt 2019-02-09 04:38:25.756325900 -0600 -+++ b/CMakeLists.txt 2019-02-09 04:39:55.299417600 -0600 -@@ -289,6 +289,8 @@ add_prefix(MP_SOURCES src/ - add_mp_library(mp ${MP_HEADERS} ${MP_SOURCES} ${MP_EXPR_INFO_FILE} - COMPILE_DEFINITIONS MP_DATE=${MP_DATE} MP_SYSINFO="${MP_SYSINFO}" - INCLUDE_DIRECTORIES src OBJECT_LIBRARIES format) -+set_property(TARGET mp PROPERTY -+ INTERFACE_INCLUDE_DIRECTORIES $) - set_target_properties(mp PROPERTIES - VERSION ${MP_VERSION} SOVERSION ${MP_VERSION_MAJOR}) - -@@ -385,5 +387,10 @@ if(BUILD_TESTING) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d4c6762..c7b15b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -197,7 +197,7 @@ function (add_mp_library name) + target_compile_definitions(${name} + PUBLIC ${add_mp_library_COMPILE_DEFINITIONS}) + target_include_directories(${name} +- PUBLIC ${add_mp_library_INCLUDE_DIRECTORIES}) ++ PUBLIC $ $) + if (add_mp_library_DEPENDS) + add_dependencies(${name} ${add_mp_library_DEPENDS}) + endif () +@@ -363,6 +363,7 @@ if(BUILD_TESTING) endif() install(DIRECTORY include/mp DESTINATION include) -install(TARGETS mp DESTINATION lib RUNTIME DESTINATION bin) -+install(TARGETS mp EXPORT unofficial-mp-targets -+ DESTINATION lib RUNTIME DESTINATION bin) ++install(TARGETS mp EXPORT unofficial-mp-config DESTINATION lib RUNTIME DESTINATION bin) install(FILES LICENSE.rst DESTINATION share/mp) -+install(EXPORT unofficial-mp-targets -+ FILE unofficial-mp-config.cmake -+ NAMESPACE unofficial::mp:: -+ DESTINATION share/unofficial-mp) ---- a/src/asl/CMakeLists.txt 2019-02-09 04:38:27.196322600 -0600 -+++ b/src/asl/CMakeLists.txt 2019-02-09 04:39:32.119889500 -0600 -@@ -235,6 +235,10 @@ add_mp_library(asl-extra OBJECT ${ASL_SO - - add_mp_library(asl STATIC OBJECT_LIBRARIES asl-core asl-extra - LIBRARIES mp INCLUDE_DIRECTORIES ${ASL_INCLUDE_DIRS}) -+set_property(TARGET asl PROPERTY -+ INTERFACE_INCLUDE_DIRECTORIES -+ $ -+ $) - - if (NOT WIN32) - target_link_libraries(asl m) -@@ -353,4 +357,6 @@ endif () - install(FILES ${ASL_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/arith.h - solvers/opcode.hd solvers/r_opn.hd - DESTINATION include/asl) --install(TARGETS asl tableproxy DESTINATION lib RUNTIME DESTINATION bin) -+install(TARGETS tableproxy DESTINATION lib RUNTIME DESTINATION bin) -+install(TARGETS asl EXPORT unofficial-mp-targets -+ DESTINATION lib RUNTIME DESTINATION bin) ++install(EXPORT unofficial-mp-config DESTINATION share/unofficial-mp) + install(TARGETS gen-expr-info RUNTIME DESTINATION bin) +\ No newline at end of file diff --git a/ports/ampl-mp/portfile.cmake b/ports/ampl-mp/portfile.cmake index 00d577e56adf91..730e687e62bf2d 100644 --- a/ports/ampl-mp/portfile.cmake +++ b/ports/ampl-mp/portfile.cmake @@ -1,47 +1,52 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "Cross-compiling is not supported") -endif() +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ampl/mp - REF 67875b71ef68511277ec2dc8224f613487cefce9 - SHA512 fad2496c10b843ddad7c4dba1eea1b4cd22e90be12dec2ad598fbd1ed5e1c492d92c5130490c7045ea608bc9ea2af191661c39b3bee3bc5159663f306ce50950 + REF bb7d616605dd23e4a453a834b0fc8c0a2a71b5aa + SHA512 558321f700a2ffe9d13f29f7c034825f5644a49c55da8490160d7ee8303484de5f9a636783387cc108bd238cdc3d2afa6b28cafecce73ee7893d792f5293712a HEAD_REF master PATCHES - disable-matlab-mex.patch - workaround-msvc-optimizer-ice.patch - install-targets.patch + disable-matlab-mex.patch + fix-build.patch + fix-dependency-asl.patch + fix-arm-build.patch # https://github.com/ampl/mp/issues/115 + install-targets.patch ) +if (NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET) + set(ARITHCHK_EXEC ${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/gen-expr-info${VCPKG_HOST_EXECUTABLE_SUFFIX}) + if (NOT EXISTS "${ARITHCHK_EXEC}") + message(FATAL_ERROR "Expected ${ARITHCHK_EXEC} to exist.") + endif() +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD=asl - -DBUILD_TESTING=OFF + -DBUILD=no + -DBUILD_TESTING=OFF + -DMP_VARIADIC_TEMPLATES=OFF + -DARITHCHK_EXEC=${ARITHCHK_EXEC} ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets( - CONFIG_PATH share/unofficial-mp - TARGET_PATH share/unofficial-mp -) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +vcpkg_copy_pdbs() + +vcpkg_copy_tools(TOOL_NAMES gen-expr-info AUTO_CLEAN) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-mp TARGET_PATH share/unofficial-mp) + file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/share/mp) - -configure_file(${SOURCE_PATH}/LICENSE.rst - ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + # remove amplsig.dll and cp.dll, see https://github.com/ampl/mp/issues/130 + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/bin +) -vcpkg_copy_pdbs() -vcpkg_test_cmake(PACKAGE_NAME unofficial-mp) +configure_file(${SOURCE_PATH}/LICENSE.rst ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) \ No newline at end of file diff --git a/ports/ampl-mp/vcpkg.json b/ports/ampl-mp/vcpkg.json new file mode 100644 index 00000000000000..8e97a5ce05982a --- /dev/null +++ b/ports/ampl-mp/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "ampl-mp", + "version-string": "2020-11-11", + "port-version": 1, + "description": "An open-source library for mathematical programming", + "homepage": "https://github.com/ampl/mp", + "supports": "!uwp", + "dependencies": [ + "ampl-asl", + { + "name": "ampl-mp", + "host": true + } + ] +} diff --git a/ports/ampl-mp/workaround-msvc-optimizer-ice.patch b/ports/ampl-mp/workaround-msvc-optimizer-ice.patch deleted file mode 100644 index 7e6d736bdc3eae..00000000000000 --- a/ports/ampl-mp/workaround-msvc-optimizer-ice.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/src/asl/solvers/avltree.c b/src/asl/solvers/avltree.c -index 7a9adaba..4dd97054 100644 ---- a/src/asl/solvers/avltree.c -+++ b/src/asl/solvers/avltree.c -@@ -54,6 +54,9 @@ AVL_Tree { - void (*Free)(void*); - }; - -+#if defined(_MSC_VER) && _MSC_VER < 1917 -+#pragma optimize("", off) -+#endif - AVL_Tree* - AVL_Tree_alloc2(void *v, AVL_Elcomp cmp, void *(*Malloc)(size_t), void (*Free)(void*)) - { -diff --git a/src/asl/solvers/sphes.c b/src/asl/solvers/sphes.c -index 326d997f..ae8952ed 100644 ---- a/src/asl/solvers/sphes.c -+++ b/src/asl/solvers/sphes.c -@@ -452,6 +452,9 @@ compar(const void *a, const void *b) - #undef del_mblk - #define del_mblk(b,c) Del_mblk_ASL(a,b,(Char*)(c)) - -+#if defined(_MSC_VER) && _MSC_VER < 1917 -+#pragma optimize("", off) -+#endif - static void - new_Hesoprod(ASL_pfgh *asl, ograd *L, ograd *R, real coef) - { diff --git a/ports/amqpcpp/CONTROL b/ports/amqpcpp/CONTROL deleted file mode 100644 index 4e8799805d14d9..00000000000000 --- a/ports/amqpcpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: amqpcpp -Version: 4.1.5 -Description: AMQP-CPP is a C++ library for communicating with a RabbitMQ message broker -Build-Depends: openssl (linux) diff --git a/ports/amqpcpp/portfile.cmake b/ports/amqpcpp/portfile.cmake index 7f4847903e5aad..e8c634342fc344 100644 --- a/ports/amqpcpp/portfile.cmake +++ b/ports/amqpcpp/portfile.cmake @@ -1,34 +1,33 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CopernicaMarketingSoftware/AMQP-CPP - REF v4.1.5 - SHA512 71c54ddf43230fb3e9726257b073d117a329030052f768f985c2e9ebde5a320f0042d2ef67604b87940bfa1ed61339c334af0362238d10f30845521dff8ce43c + REF 2749d36a9cf9def86fc8a30eceb0e3a11d85815d #v4.3.14 + SHA512 ee6df360963bb5714c7503e27a9ed0682d704a267ef615fa922bd1cb637d1c0867c9074d5aeef084621840ef39f495a4103f22bfd80b6b1dd325bc6061e9c2ca HEAD_REF master PATCHES find-openssl.patch ) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(VCPKG_TARGET_IS_LINUX) set(LINUX_TCP ON) else() set(LINUX_TCP OFF) endif() -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DAMQP-CPP_BUILD_SHARED=OFF -DAMQP-CPP_LINUX_TCP=${LINUX_TCP} ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH cmake) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/amqpcpp RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/amqpcpp/vcpkg.json b/ports/amqpcpp/vcpkg.json new file mode 100644 index 00000000000000..e248db9cc10765 --- /dev/null +++ b/ports/amqpcpp/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "amqpcpp", + "version": "4.3.14", + "description": "AMQP-CPP is a C++ library for communicating with a RabbitMQ message broker", + "homepage": "https://github.com/CopernicaMarketingSoftware/AMQP-CPP", + "supports": "!uwp", + "dependencies": [ + "openssl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/anax/CONTROL b/ports/anax/CONTROL deleted file mode 100644 index a672637cf6858a..00000000000000 --- a/ports/anax/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: anax -Version: 2.1.0-6 -Description: An open source C++ entity system. -Homepage: https://github.com/miguelmartin75/anax diff --git a/ports/anax/portfile.cmake b/ports/anax/portfile.cmake index bdecbf39e51a6f..411e0483078f4a 100644 --- a/ports/anax/portfile.cmake +++ b/ports/anax/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/anax/vcpkg.json b/ports/anax/vcpkg.json new file mode 100644 index 00000000000000..1b44cd38d6e519 --- /dev/null +++ b/ports/anax/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "anax", + "version-string": "2.1.0", + "port-version": 7, + "description": "An open source C++ entity system.", + "homepage": "https://github.com/miguelmartin75/anax" +} diff --git a/ports/angelscript/CONTROL b/ports/angelscript/CONTROL deleted file mode 100644 index 103dda42e5dc7b..00000000000000 --- a/ports/angelscript/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: angelscript -Version: 2.33.1-1 -Description: The AngelCode Scripting Library, or AngelScript as it is also known, is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts. It has been designed from the beginning to be an easy to use component, both for the application programmer and the script writer. - -Feature: addons -Description: Installs all addons for use in compiling scripts addons diff --git a/ports/angelscript/LICENSE b/ports/angelscript/LICENSE index 27105b90d71da2..ea549c6e657dd9 100644 --- a/ports/angelscript/LICENSE +++ b/ports/angelscript/LICENSE @@ -1,13 +1,13 @@ -AngelCode Scripting Library - -Copyright © 2003-2018 Andreas Jönsson - -This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. - - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - - This notice may not be removed or altered from any source distribution. +AngelCode Scripting Library + +Copyright © 2003-2018 Andreas Jönsson + +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + + The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + + Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + + This notice may not be removed or altered from any source distribution. diff --git a/ports/angelscript/mark-threads-private.patch b/ports/angelscript/mark-threads-private.patch index 567c19aa1a4b68..aaf28b437620bf 100644 --- a/ports/angelscript/mark-threads-private.patch +++ b/ports/angelscript/mark-threads-private.patch @@ -1,13 +1,13 @@ -diff --git a/angelscript/projects/cmake/CMakeLists.txt b/angelscript/projects/cmake/CMakeLists.txt -index 7c800c5..982ad8b 100644 ---- a/angelscript/projects/cmake/CMakeLists.txt -+++ b/angelscript/projects/cmake/CMakeLists.txt -@@ -145,7 +145,7 @@ endif() - - # Don't override the default library output path to avoid conflicts when building for multiple target platforms - #set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../lib) --target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} Threads::Threads) -+target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE Threads::Threads) - - set_target_properties(${ANGELSCRIPT_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION}) - +diff --git a/angelscript/projects/cmake/CMakeLists.txt b/angelscript/projects/cmake/CMakeLists.txt +index 7c800c5..982ad8b 100644 +--- a/angelscript/projects/cmake/CMakeLists.txt ++++ b/angelscript/projects/cmake/CMakeLists.txt +@@ -145,7 +145,7 @@ endif() + + # Don't override the default library output path to avoid conflicts when building for multiple target platforms + #set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../lib) +-target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} Threads::Threads) ++target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE Threads::Threads) + + set_target_properties(${ANGELSCRIPT_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION}) + diff --git a/ports/angelscript/portfile.cmake b/ports/angelscript/portfile.cmake index 3aea242b5e3b51..ab35b4c1b83e3d 100644 --- a/ports/angelscript/portfile.cmake +++ b/ports/angelscript/portfile.cmake @@ -1,38 +1,33 @@ -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.33.0.zip" - FILENAME "angelscript_2.33.0.zip" - SHA512 eaf972ecf965fe4f72e55755f5e796499018e918f93cfd835b1ca20f9338e299e8dbd707240341eef81ae920f07d2280646151f515f5990a62550689445c86f0 -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - mark-threads-private.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/angelscript/projects/cmake - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 -) - -vcpkg_install_cmake() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Angelscript) - -# Handle copyright -file(INSTALL ${CURRENT_PORT_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/angelscript RENAME copyright) - -# Copy the addon files -if("addons" IN_LIST FEATURES) - file(INSTALL ${SOURCE_PATH}/add_on/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/angelscript FILES_MATCHING PATTERN "*.h" PATTERN "*.cpp") -endif() - -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME angelscript) +vcpkg_fail_port_install(ON_ARCH "arm") + +vcpkg_download_distfile(ARCHIVE + URLS "https://angelcode.com/angelscript/sdk/files/angelscript_2.35.0.zip" + FILENAME "angelscript_2.35.0.zip" + SHA512 e54b58e78b21c2ff6aa34d5f55b18fcf8737d057c86aef8901ac0c11f14739fe7f1494f9bcfdbca6a8e54b6d0b36a04dd098780bcd02dea5764fd6d22984b6b0 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + mark-threads-private.patch + precxx11.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/angelscript/projects/cmake + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Angelscript) + +# Copy the addon files +if("addons" IN_LIST FEATURES) + file(INSTALL ${SOURCE_PATH}/add_on/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/angelscript FILES_MATCHING PATTERN "*.h" PATTERN "*.cpp") +endif() + +file(INSTALL ${CURRENT_PORT_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/angelscript/precxx11.patch b/ports/angelscript/precxx11.patch new file mode 100644 index 00000000000000..bd4a93325e963b --- /dev/null +++ b/ports/angelscript/precxx11.patch @@ -0,0 +1,78 @@ +commit 4684264c7ed39ff397f9c38c64370284ddac44b0 +Author: angelcode +Date: Thu Dec 10 19:13:44 2020 +0000 + + Changed code to be compatible with pre-C++11 + + git-svn-id: https://svn.code.sf.net/p/angelscript/code/trunk@2686 404ce1b2-830e-0410-a2e2-b09542c77caf + +diff --git a/angelscript/source/as_module.cpp b/angelscript/source/as_module.cpp +index 5ec55423..ddd3ed73 100644 +--- a/angelscript/source/as_module.cpp ++++ b/angelscript/source/as_module.cpp +@@ -1536,28 +1536,28 @@ int asCModule::UnbindAllImportedFunctions() + void asCModule::AddClassType(asCObjectType* type) + { + m_classTypes.PushLast(type); +- m_typeLookup.Insert({type->nameSpace, type->name}, type); ++ m_typeLookup.Insert(asSNameSpaceNamePair(type->nameSpace, type->name), type); + } + + // internal + void asCModule::AddEnumType(asCEnumType* type) + { + m_enumTypes.PushLast(type); +- m_typeLookup.Insert({type->nameSpace, type->name}, type); ++ m_typeLookup.Insert(asSNameSpaceNamePair(type->nameSpace, type->name), type); + } + + // internal + void asCModule::AddTypeDef(asCTypedefType* type) + { + m_typeDefs.PushLast(type); +- m_typeLookup.Insert({type->nameSpace, type->name}, type); ++ m_typeLookup.Insert(asSNameSpaceNamePair(type->nameSpace, type->name), type); + } + + // internal + void asCModule::AddFuncDef(asCFuncdefType* type) + { + m_funcDefs.PushLast(type); +- m_typeLookup.Insert({type->nameSpace, type->name}, type); ++ m_typeLookup.Insert(asSNameSpaceNamePair(type->nameSpace, type->name), type); + } + + // internal +@@ -1569,8 +1569,8 @@ void asCModule::ReplaceFuncDef(asCFuncdefType* type, asCFuncdefType* newType) + m_funcDefs[i] = newType; + + // Replace it in the lookup map too +- asSMapNode* result = nullptr; +- if(m_typeLookup.MoveTo(&result, {type->nameSpace, type->name})) ++ asSMapNode* result = 0; ++ if(m_typeLookup.MoveTo(&result, asSNameSpaceNamePair(type->nameSpace, type->name))) + { + asASSERT( result->value == type ); + result->value = newType; +@@ -1581,8 +1581,8 @@ void asCModule::ReplaceFuncDef(asCFuncdefType* type, asCFuncdefType* newType) + // internal + asCTypeInfo *asCModule::GetType(const asCString &type, asSNameSpace *ns) const + { +- asSMapNode* result = nullptr; +- if(m_typeLookup.MoveTo(&result, {ns, type})) ++ asSMapNode* result = 0; ++ if(m_typeLookup.MoveTo(&result, asSNameSpaceNamePair(ns, type))) + { + return result->value; + } +@@ -1592,8 +1592,8 @@ asCTypeInfo *asCModule::GetType(const asCString &type, asSNameSpace *ns) const + // internal + asCObjectType *asCModule::GetObjectType(const char *type, asSNameSpace *ns) const + { +- asSMapNode* result = nullptr; +- if(m_typeLookup.MoveTo(&result, {ns, type})) ++ asSMapNode* result = 0; ++ if(m_typeLookup.MoveTo(&result, asSNameSpaceNamePair(ns, type))) + { + return CastToObjectType(result->value); + } diff --git a/ports/angelscript/vcpkg.json b/ports/angelscript/vcpkg.json new file mode 100644 index 00000000000000..57d2d13a2c538a --- /dev/null +++ b/ports/angelscript/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "angelscript", + "version-string": "2.35.0", + "description": "The AngelCode Scripting Library, or AngelScript as it is also known, is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts. It has been designed from the beginning to be an easy to use component, both for the application programmer and the script writer.", + "homepage": "https://angelcode.com/angelscript", + "supports": "!arm", + "features": { + "addons": { + "description": "Installs all addons for use in compiling scripts addons" + } + } +} diff --git a/ports/angle/001-fix-uwp.patch b/ports/angle/001-fix-uwp.patch index 818282ee2fbc38..cba68d69be7503 100644 --- a/ports/angle/001-fix-uwp.patch +++ b/ports/angle/001-fix-uwp.patch @@ -1,274 +1,30 @@ -diff --git a/src/common/system_utils_win.cpp b/src/common/system_utils_win.cpp -index e4c146091..974b1b3ba 100644 ---- a/src/common/system_utils_win.cpp -+++ b/src/common/system_utils_win.cpp -@@ -110,7 +110,7 @@ class Win32Library : public Library - int ret = snprintf(buffer, MAX_PATH, "%s.%s", libraryName, GetSharedLibraryExtension()); - if (ret > 0 && ret < MAX_PATH) - { -- mModule = LoadLibraryA(buffer); -+ // mModule = LoadLibraryA(buffer); - } - } - -diff --git a/src/libANGLE/renderer/d3d/RendererD3D.cpp b/src/libANGLE/renderer/d3d/RendererD3D.cpp -index 2a8d0221b..362c95a6f 100644 ---- a/src/libANGLE/renderer/d3d/RendererD3D.cpp -+++ b/src/libANGLE/renderer/d3d/RendererD3D.cpp -@@ -229,7 +229,6 @@ GLenum DefaultGLErrorCode(HRESULT hr) - { - switch (hr) - { -- case D3DERR_OUTOFVIDEOMEMORY: - case E_OUTOFMEMORY: - return GL_OUT_OF_MEMORY; - default: -diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp -index 9da5cfdae..6eaab6aa7 100644 ---- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp -+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp -@@ -14,6 +14,7 @@ - - #include "common/tls.h" - #include "common/utilities.h" -+#include "common/debug.h" - #include "libANGLE/Buffer.h" - #include "libANGLE/Context.h" - #include "libANGLE/Display.h" -@@ -1189,10 +1190,11 @@ void Renderer11::generateDisplayExtensions(egl::DisplayExtensions *outExtensions - outExtensions->robustResourceInitialization = true; - - // Compositor Native Window capabilies require WinVer >= 1803 -- if (CompositorNativeWindow11::IsSupportedWinRelease()) -- { -- outExtensions->windowsUIComposition = true; -- } -+#ifdef ANGLE_ENABLE_WINDOWS_STORE -+ outExtensions->windowsUIComposition = NativeWindow11WinRT::IsSupportedWin10Release(); -+#else -+outExtensions->windowsUIComposition = CompositorNativeWindow11::IsSupportedWinRelease(); -+#endif - } - - angle::Result Renderer11::flush(Context11 *context11) -@@ -1266,16 +1268,24 @@ NativeWindowD3D *Renderer11::createNativeWindow(EGLNativeWindowType window, - const egl::Config *config, - const egl::AttributeMap &attribs) const - { -- auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window); -+#ifdef ANGLE_ENABLE_WINDOWS_STORE -+ auto useWinUiComp = window != nullptr && !NativeWindow11WinRT::IsValidNativeWindow(window); -+#else -+ auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window); -+#endif - - if (useWinUiComp) - { -- return new CompositorNativeWindow11(window, config->alphaSize > 0); -+#ifdef ANGLE_ENABLE_WINDOWS_STORE -+ return new NativeWindow11WinRT(window, config->alphaSize > 0); -+#else -+ return new CompositorNativeWindow11(window, config->alphaSize > 0); -+#endif - } - else - { - #ifdef ANGLE_ENABLE_WINDOWS_STORE -- UNUSED_VARIABLE(attribs); -+ ANGLE_UNUSED_VARIABLE(attribs); - return new NativeWindow11WinRT(window, config->alphaSize > 0); - #else - return new NativeWindow11Win32( diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp -index cb2f279e4..a8761e29c 100644 +index 7d3f078d6..fac057dd6 100644 --- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp +++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp -@@ -145,6 +145,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, - unsigned int width, - unsigned int height, - bool containsAlpha, -+ unsigned int samples, - IDXGISwapChain1 **swapChain) - { - if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 || -@@ -158,6 +159,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, - swapChainDesc.Height = height; - swapChainDesc.Format = format; - swapChainDesc.Stereo = FALSE; -+ swapChainDesc.SampleDesc.Count = samples; - swapChainDesc.SampleDesc.Count = 1; - swapChainDesc.SampleDesc.Quality = 0; - swapChainDesc.BufferUsage = -@@ -213,11 +215,9 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr displayProperties; -+ ComPtr displayProperties; ++ ComPtr displayInformationStatics; ++ ComPtr displayInformation; -- if (SUCCEEDED(GetActivationFactory( + if (SUCCEEDED(GetActivationFactory( - HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), - displayProperties.GetAddressOf()))) -+ if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), displayProperties.GetAddressOf()))) ++ HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), ++ displayInformationStatics.GetAddressOf()))) { float dpi = 96.0f; - if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi))) -diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h -index ae57cfb83..983a20ada 100644 ---- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h -+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h -@@ -36,6 +36,7 @@ class CoreWindowNativeWindow : public InspectableNativeWindow, - unsigned int width, - unsigned int height, - bool containsAlpha, -+ unsigned int samples, - IDXGISwapChain1 **swapChain) override; - - protected: -@@ -49,7 +50,7 @@ class CoreWindowNativeWindow : public InspectableNativeWindow, - ComPtr> mPropertyMap; - }; - --[uuid(7F924F66 - EBAE - 40E5 - A10B - B8F35E245190)] class CoreWindowSizeChangedHandler -+[uuid(7F924F66-EBAE-40E5-A10B-B8F35E245190)] class CoreWindowSizeChangedHandler - : public Microsoft::WRL::RuntimeClass< - Microsoft::WRL::RuntimeClassFlags, - IWindowSizeChangedEventHandler> -diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h -index 708e8a212..aa6c6f375 100644 ---- a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h -+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h -@@ -53,6 +53,7 @@ class InspectableNativeWindow - unsigned int width, - unsigned int height, - bool containsAlpha, -+ unsigned int samples, - IDXGISwapChain1 **swapChain) = 0; - - bool getClientRect(RECT *rect) -diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp -index 8972ca227..ed3576a8c 100644 ---- a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp -+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp -@@ -13,6 +13,8 @@ - #include "libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" - #include "libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" - -+#include -+ - using namespace Microsoft::WRL; - using namespace Microsoft::WRL::Wrappers; - -@@ -88,6 +90,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, - DXGI_FORMAT format, - UINT width, - UINT height, -+ UINT samples, - IDXGISwapChain **swapChain) - { - if (mImpl) -@@ -95,7 +98,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, - IDXGIFactory2 *factory2 = d3d11::DynamicCastComObject(factory); - IDXGISwapChain1 *swapChain1 = nullptr; - HRESULT result = -- mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, &swapChain1); -+ mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, samples, &swapChain1); - SafeRelease(factory2); - *swapChain = static_cast(swapChain1); - return result; -@@ -119,4 +122,44 @@ bool NativeWindow11WinRT::IsValidNativeWindow(EGLNativeWindowType window) - return IsCoreWindow(window) || IsSwapChainPanel(window) || IsEGLConfiguredPropertySet(window); - } - -+bool NativeWindow11WinRT::IsSupportedWin10Release() -+{ -+ HSTRING className, contractName; -+ HSTRING_HEADER classNameHeader, contractNameHeader; -+ boolean isSupported = false; -+ -+ const wchar_t *str = static_cast(RuntimeClass_Windows_Foundation_Metadata_ApiInformation); -+ unsigned int length; -+ SizeTToUInt32(::wcslen(str), &length); -+ HRESULT hr = WindowsCreateStringReference(RuntimeClass_Windows_Foundation_Metadata_ApiInformation, length, &classNameHeader, &className); -+ -+ if (FAILED(hr)) -+ { -+ return isSupported; -+ } -+ -+ Microsoft::WRL::ComPtr api; -+ -+ hr = RoGetActivationFactory(className, __uuidof(ABI::Windows::Foundation::Metadata::IApiInformationStatics), &api); -+ -+ if (FAILED(hr)) -+ { -+ return isSupported; -+ } -+ -+ str = static_cast(L"Windows.Foundation.UniversalApiContract"); -+ SizeTToUInt32(::wcslen(str), &length); -+ hr = WindowsCreateStringReference(L"Windows.Foundation.UniversalApiContract", length, &contractNameHeader, -+ &contractName); -+ -+ if (FAILED(hr)) -+ { -+ return isSupported; -+ } -+ -+ api->IsApiContractPresentByMajor(contractName, 6, &isSupported); -+ -+ return isSupported; -+} -+ - } // namespace rx -diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h -index eac5b21b7..36b20371e 100644 ---- a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h -+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h -@@ -34,11 +34,13 @@ class NativeWindow11WinRT : public NativeWindow11 - DXGI_FORMAT format, - UINT width, - UINT height, -+ UINT samples, - IDXGISwapChain **swapChain) override; - - void commitChange() override; - - static bool IsValidNativeWindow(EGLNativeWindowType window); -+ static bool IsSupportedWin10Release(); - - private: - bool mHasAlpha; -diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp -index af0beb635..9f7face1b 100644 ---- a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp -+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp -@@ -247,6 +247,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device, - unsigned int width, - unsigned int height, - bool containsAlpha, -+ unsigned int samples, - IDXGISwapChain1 **swapChain) - { - if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 || -diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h -index 09642eec5..1f2c090d5 100644 ---- a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h -+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h -@@ -28,6 +28,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, - unsigned int width, - unsigned int height, - bool containsAlpha, -+ unsigned int samples, - IDXGISwapChain1 **swapChain) override; - - protected: -@@ -43,7 +44,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, - ComPtr mSwapChain; - }; +- if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi))) ++ if (SUCCEEDED(displayInformationStatics->GetForCurrentView(&displayInformation))) + { +- return dpi; ++ if (SUCCEEDED(displayInformation->get_LogicalDpi(&dpi))) ++ { ++ return dpi; ++ } + } + } --[uuid(8ACBD974 - 8187 - 4508 - AD80 - AEC77F93CF36)] class SwapChainPanelSizeChangedHandler -+[uuid(8ACBD974-8187-4508-AD80-AEC77F93CF36)] class SwapChainPanelSizeChangedHandler - : public Microsoft::WRL::RuntimeClass< - Microsoft::WRL::RuntimeClassFlags, - ABI::Windows::UI::Xaml::ISizeChangedEventHandler> diff --git a/ports/angle/002-fix-builder-error.patch b/ports/angle/002-fix-builder-error.patch new file mode 100644 index 00000000000000..8c632d1b095e9c --- /dev/null +++ b/ports/angle/002-fix-builder-error.patch @@ -0,0 +1,28 @@ +diff --git a/src/gpu_info_util/SystemInfo_win.cpp b/src/gpu_info_util/SystemInfo_win.cpp +index f4bb137f2..86495013b 100644 +--- a/src/gpu_info_util/SystemInfo_win.cpp ++++ b/src/gpu_info_util/SystemInfo_win.cpp +@@ -6,11 +6,6 @@ + + // SystemInfo_win.cpp: implementation of the Windows-specific parts of SystemInfo.h + +-#include "gpu_info_util/SystemInfo_internal.h" +- +-#include "common/debug.h" +-#include "common/string_utils.h" +- + // Windows.h needs to be included first + #include + +@@ -19,6 +14,11 @@ + #include + #include + ++#include "gpu_info_util/SystemInfo_internal.h" ++ ++#include "common/debug.h" ++#include "common/string_utils.h" ++ + namespace angle + { + diff --git a/ports/angle/003-fix-mingw.patch b/ports/angle/003-fix-mingw.patch new file mode 100644 index 00000000000000..304d822ec58a86 --- /dev/null +++ b/ports/angle/003-fix-mingw.patch @@ -0,0 +1,22 @@ +diff --git a/src/common/mathutil.h b/src/common/mathutil.h +index 1d73bbf..c5b9cc8 100644 +--- a/src/common/mathutil.h ++++ b/src/common/mathutil.h +@@ -1073,7 +1073,7 @@ inline int BitCount(uint64_t bits) + # endif // defined(_M_IX86) || defined(_M_X64) + #endif // defined(_MSC_VER) && !defined(__clang__) + +-#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) ++#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__MINGW32__) + inline int BitCount(uint32_t bits) + { + return __builtin_popcount(bits); +@@ -1083,7 +1083,7 @@ inline int BitCount(uint64_t bits) + { + return __builtin_popcountll(bits); + } +-#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) ++#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__MINGW32__) + + inline int BitCount(uint8_t bits) + { diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index 7d791db8450ae2..70a2e214361748 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -14,7 +14,7 @@ else() endif() if(MSVC) - add_compile_options(/d2guard4 /Wv:18 /guard:cf /permissive) + add_compile_options(/d2guard4 /Wv:18 /guard:cf /permissive /bigobj) else() set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -27,30 +27,54 @@ endif() set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") set(CMAKE_STATIC_LIBRARY_PREFIX "") +if (WINDOWS_STORE) + set(WINRT_DEFINES -DANGLE_ENABLE_WINDOWS_UWP -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP) +else() + set(WINRT_DEFINES) +endif() add_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS + -DGL_SILENCE_DEPRECATION -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DANGLE_STANDALONE_BUILD - -DANGLE_ENABLE_DEBUG_ANNOTATIONS + ${WINRT_DEFINES} ) +add_compile_options("$<$:-DANGLE_ENABLE_DEBUG_ANNOTATIONS>") +if(WIN32) + add_definitions(-DANGLE_IS_WIN) +endif() +if(LINUX) + add_definitions(-DANGLE_IS_LINUX) +endif() +if(ANGLE_IS_64_BIT_CPU) + add_definitions(-DANGLE_IS_64_BIT_CPU) +elseif(ANGLE_IS_32_BIT_CPU) + add_definitions(-DANGLE_IS_32_BIT_CPU) +endif() -configure_file(commit.h include/id/commit.h COPYONLY) -include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) - +configure_file(angle_commit.h include/id/commit.h COPYONLY) +#include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) +include_directories("$" "$" "$" "$") ########## # angle::common -if(WIN32) - set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix|android_") +if(WINDOWS_DESKTOP) + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_apple|_mac|_ios|_posix|_winuwp") +elseif(WINDOWS_STORE) + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_apple|_mac|_ios|_posix|_win32") elseif(LINUX) - set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac|android_") + set(ANGLE_COMMON_PLATFORM_FILTER "_win|_apple|_mac|_ios") elseif(APPLE) - set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win|android_") + if(CMAKE_SYSTEM_NAME MATCHES "Darwin") # macOS + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win|_ios") + else() # other Apple platforms (iOS, etc) + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win|_mac") + endif() endif() file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" - "src/common/*.inl" + "src/common/*.inc" "src/common/*.cpp" "src/common/third_party/base/anglebase/*.h" "src/common/third_party/base/anglebase/*.cc" @@ -62,36 +86,233 @@ file(GLOB ANGLE_COMMON_SOURCES "src/common/third_party/smhasher/src/*.h" "src/common/third_party/smhasher/src/*.cpp") list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}") -add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) -target_include_directories(angle_common PUBLIC src/common/third_party/base) +add_library(angle_common OBJECT ${ANGLE_COMMON_SOURCES}) +target_include_directories(angle_common PUBLIC "$") add_library(angle::common ALIAS angle_common) +########## +# angle::compression +file(GLOB ANGLE_COMPRESSION_UTILS_SOURCES "third_party/zlib/google/compression_utils_portable.*") +find_package(ZLIB REQUIRED) +add_library(angle_compression_utils OBJECT ${ANGLE_COMPRESSION_UTILS_SOURCES}) +target_link_libraries(angle_compression_utils PUBLIC ZLIB::ZLIB) +target_compile_definitions(angle_compression_utils PRIVATE + -DUSE_SYSTEM_ZLIB +) +target_include_directories(angle_compression_utils INTERFACE "$") +add_library(angle::compression ALIAS angle_compression_utils) + ########## # angle::image_util -file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") -add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) +file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inc" "src/image_util/*.cpp") +add_library(angle_image_util OBJECT ${ANGLE_IMAGE_UTIL_SOURCES}) target_link_libraries(angle_image_util PRIVATE angle::common) add_library(angle::image_util ALIAS angle_image_util) ########## # angle::translator file(GLOB TRANSLATOR_SOURCES - "src/compiler/translator/glslang.l" - "src/compiler/translator/glslang.y" - "src/compiler/translator/*.h" - "src/compiler/translator/*.cpp" - "src/compiler/translator/tree_ops/*.h" + "src/compiler/translator/BaseTypes.h" + "src/compiler/translator/BuiltInFunctionEmulator.cpp" + "src/compiler/translator/BuiltInFunctionEmulator.h" + "src/compiler/translator/CallDAG.cpp" + "src/compiler/translator/CallDAG.h" + "src/compiler/translator/CodeGen.cpp" + "src/compiler/translator/CollectVariables.cpp" + "src/compiler/translator/CollectVariables.h" + "src/compiler/translator/Common.h" + "src/compiler/translator/Compiler.cpp" + "src/compiler/translator/Compiler.h" + "src/compiler/translator/ConstantUnion.cpp" + "src/compiler/translator/ConstantUnion.h" + "src/compiler/translator/Declarator.cpp" + "src/compiler/translator/Declarator.h" + "src/compiler/translator/Diagnostics.cpp" + "src/compiler/translator/Diagnostics.h" + "src/compiler/translator/DirectiveHandler.cpp" + "src/compiler/translator/DirectiveHandler.h" + "src/compiler/translator/ExtensionBehavior.cpp" + "src/compiler/translator/ExtensionBehavior.h" + "src/compiler/translator/FlagStd140Structs.cpp" + "src/compiler/translator/FlagStd140Structs.h" + "src/compiler/translator/FunctionLookup.cpp" + "src/compiler/translator/FunctionLookup.h" + "src/compiler/translator/HashNames.cpp" + "src/compiler/translator/HashNames.h" + "src/compiler/translator/ImmutableString.h" + "src/compiler/translator/ImmutableStringBuilder.cpp" + "src/compiler/translator/ImmutableStringBuilder.h" + "src/compiler/translator/InfoSink.cpp" + "src/compiler/translator/InfoSink.h" + "src/compiler/translator/Initialize.cpp" + "src/compiler/translator/Initialize.h" + "src/compiler/translator/InitializeDll.cpp" + "src/compiler/translator/InitializeDll.h" + "src/compiler/translator/InitializeGlobals.h" + "src/compiler/translator/IntermNode.cpp" + "src/compiler/translator/IntermNode.h" + "src/compiler/translator/IsASTDepthBelowLimit.cpp" + "src/compiler/translator/IsASTDepthBelowLimit.h" + "src/compiler/translator/Operator.cpp" + "src/compiler/translator/Operator.h" + "src/compiler/translator/OutputTree.cpp" + "src/compiler/translator/OutputTree.h" + "src/compiler/translator/ParseContext.cpp" + "src/compiler/translator/ParseContext.h" + "src/compiler/translator/ParseContext_ESSL_autogen.h" + "src/compiler/translator/ParseContext_complete_autogen.h" + "src/compiler/translator/ParseContext_interm.h" + "src/compiler/translator/PoolAlloc.cpp" + "src/compiler/translator/PoolAlloc.h" + "src/compiler/translator/Pragma.h" + "src/compiler/translator/QualifierTypes.cpp" + "src/compiler/translator/QualifierTypes.h" + "src/compiler/translator/Severity.h" + "src/compiler/translator/ShaderLang.cpp" + "src/compiler/translator/ShaderVars.cpp" + "src/compiler/translator/StaticType.h" + "src/compiler/translator/Symbol.cpp" + "src/compiler/translator/Symbol.h" + "src/compiler/translator/SymbolTable.cpp" + "src/compiler/translator/SymbolTable.h" + "src/compiler/translator/SymbolTable_autogen.h" + "src/compiler/translator/SymbolUniqueId.cpp" + "src/compiler/translator/SymbolUniqueId.h" + "src/compiler/translator/TranslatorESSL.h" + "src/compiler/translator/TranslatorGLSL.h" + "src/compiler/translator/TranslatorHLSL.h" + "src/compiler/translator/TranslatorMetal.h" + "src/compiler/translator/TranslatorVulkan.h" + "src/compiler/translator/Types.cpp" + "src/compiler/translator/Types.h" + "src/compiler/translator/ValidateAST.cpp" + "src/compiler/translator/ValidateAST.h" + "src/compiler/translator/ValidateBarrierFunctionCall.cpp" + "src/compiler/translator/ValidateBarrierFunctionCall.h" + "src/compiler/translator/ValidateClipCullDistance.cpp" + "src/compiler/translator/ValidateClipCullDistance.h" + "src/compiler/translator/ValidateGlobalInitializer.cpp" + "src/compiler/translator/ValidateGlobalInitializer.h" + "src/compiler/translator/ValidateLimitations.cpp" + "src/compiler/translator/ValidateLimitations.h" + "src/compiler/translator/ValidateMaxParameters.cpp" + "src/compiler/translator/ValidateMaxParameters.h" + "src/compiler/translator/ValidateOutputs.cpp" + "src/compiler/translator/ValidateOutputs.h" + "src/compiler/translator/ValidateSwitch.cpp" + "src/compiler/translator/ValidateSwitch.h" + "src/compiler/translator/ValidateVaryingLocations.cpp" + "src/compiler/translator/ValidateVaryingLocations.h" + "src/compiler/translator/VariablePacker.cpp" + "src/compiler/translator/VariablePacker.h" + "src/compiler/translator/blocklayout.cpp" + "src/compiler/translator/glslang.h" + "src/compiler/translator/glslang_lex_autogen.cpp" + "src/compiler/translator/glslang_tab_autogen.cpp" + "src/compiler/translator/glslang_tab_autogen.h" + "src/compiler/translator/glslang_wrapper.h" + "src/compiler/translator/length_limits.h" "src/compiler/translator/tree_ops/*.cpp" + "src/compiler/translator/tree_ops/*.h" + "src/compiler/translator/tree_ops/gl/ClampFragDepth.h" + "src/compiler/translator/tree_ops/gl/RegenerateStructNames.h" + "src/compiler/translator/tree_ops/gl/RewriteRepeatedAssignToSwizzled.h" + "src/compiler/translator/tree_ops/gl/UseInterfaceBlockFields.h" + "src/compiler/translator/tree_ops/gl/VectorizeVectorScalarArithmetic.h" + "src/compiler/translator/tree_ops/gl/mac/AddAndTrueToLoopCondition.h" + "src/compiler/translator/tree_ops/gl/mac/RewriteDoWhile.h" + "src/compiler/translator/tree_ops/gl/mac/UnfoldShortCircuitAST.h" + "src/compiler/translator/tree_ops/vulkan/EarlyFragmentTestsOptimization.h" "src/compiler/translator/tree_util/*.h" "src/compiler/translator/tree_util/*.cpp" + "src/compiler/translator/util.cpp" + "src/compiler/translator/util.h" "src/third_party/compiler/ArrayBoundsClamper.cpp" + "src/third_party/compiler/ArrayBoundsClamper.h" +) +list(FILTER TRANSLATOR_SOURCES EXCLUDE REGEX "_unittest") +file(GLOB TRANSLATOR_GLSL_BASE_SOURCES + "src/compiler/translator/OutputGLSLBase.cpp" + "src/compiler/translator/OutputGLSLBase.h" ) -add_library(angle_translator STATIC ${TRANSLATOR_SOURCES}) -target_compile_definitions(angle_translator PUBLIC - -DANGLE_ENABLE_ESSL - -DANGLE_ENABLE_GLSL - -DANGLE_ENABLE_HLSL +file(GLOB TRANSLATOR_GLSL_AND_VULKAN_BASE_SOURCES + "src/compiler/translator/BuiltinsWorkaroundGLSL.cpp" + "src/compiler/translator/BuiltinsWorkaroundGLSL.h" + "src/compiler/translator/OutputGLSL.cpp" + "src/compiler/translator/OutputGLSL.h" ) +file(GLOB TRANSLATOR_ESSL_SOURCES + "src/compiler/translator/OutputESSL.cpp" + "src/compiler/translator/OutputESSL.h" + "src/compiler/translator/TranslatorESSL.cpp" + "src/compiler/translator/tree_ops/gl/RecordConstantPrecision.cpp" + "src/compiler/translator/tree_ops/gl/RecordConstantPrecision.h" +) +file(GLOB TRANSLATOR_GLSL_SOURCES + "src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp" + "src/compiler/translator/BuiltInFunctionEmulatorGLSL.h" + "src/compiler/translator/ExtensionGLSL.cpp" + "src/compiler/translator/ExtensionGLSL.h" + "src/compiler/translator/TranslatorGLSL.cpp" + "src/compiler/translator/VersionGLSL.cpp" + "src/compiler/translator/VersionGLSL.h" + "src/compiler/translator/tree_ops/gl/ClampFragDepth.cpp" + "src/compiler/translator/tree_ops/gl/RegenerateStructNames.cpp" + "src/compiler/translator/tree_ops/gl/RewriteRepeatedAssignToSwizzled.cpp" + "src/compiler/translator/tree_ops/gl/UseInterfaceBlockFields.cpp" + "src/compiler/translator/tree_ops/gl/VectorizeVectorScalarArithmetic.cpp" + "src/compiler/translator/tree_ops/gl/mac/RewriteRowMajorMatrices.h" + "src/compiler/translator/tree_ops/gl/mac/RewriteUnaryMinusOperatorFloat.h" +) +file(GLOB TRANSLATOR_GLSL_MAC_SOURCES + "src/compiler/translator/tree_ops/gl/mac/AddAndTrueToLoopCondition.cpp" + "src/compiler/translator/tree_ops/gl/mac/RewriteDoWhile.cpp" + "src/compiler/translator/tree_ops/gl/mac/RewriteRowMajorMatrices.cpp" + "src/compiler/translator/tree_ops/gl/mac/RewriteUnaryMinusOperatorFloat.cpp" + "src/compiler/translator/tree_ops/gl/mac/UnfoldShortCircuitAST.cpp" +) +file(GLOB TRANSLATOR_HLSL_SOURCES + "src/compiler/translator/*HLSL.h" + "src/compiler/translator/*HLSL.cpp" + "src/compiler/translator/emulated_builtin_functions_hlsl_autogen.cpp" + "src/compiler/translator/tree_ops/d3d/*.cpp" + "src/compiler/translator/tree_ops/d3d/*.h" +) +if(ANDROID) + list(APPEND TRANSLATOR_SOURCES "src/compiler/translator/ImmutableString_ESSL_autogen.cpp" "src/compiler/translator/SymbolTable_ESSL_autogen.cpp") +else() + list(APPEND TRANSLATOR_SOURCES "src/compiler/translator/ImmutableString_autogen.cpp" "src/compiler/translator/SymbolTable_autogen.cpp") +endif() +set(ANGLE_ENABLE_ESSL TRUE) +set(ANGLE_ENABLE_GLSL TRUE) +set(ANGLE_ENABLE_HLSL TRUE) +set(_needs_glsl_base FALSE) +set(_needs_glsl_and_vulkan_base FALSE) +add_library(angle_translator OBJECT ${TRANSLATOR_SOURCES}) +if(ANGLE_ENABLE_ESSL) + set(_needs_glsl_base TRUE) + target_sources(angle_translator PRIVATE ${TRANSLATOR_ESSL_SOURCES}) + target_compile_definitions(angle_translator PUBLIC -DANGLE_ENABLE_ESSL) +endif() +if(ANGLE_ENABLE_GLSL) + set(_needs_glsl_base TRUE) + set(_needs_glsl_and_vulkan_base TRUE) + target_sources(angle_translator PRIVATE ${TRANSLATOR_GLSL_SOURCES}) + if(APPLE) + target_sources(angle_translator PRIVATE ${TRANSLATOR_GLSL_MAC_SOURCES}) + endif() + target_compile_definitions(angle_translator PUBLIC -DANGLE_ENABLE_GLSL) +endif() +if(ANGLE_ENABLE_HLSL) + target_sources(angle_translator PRIVATE ${TRANSLATOR_HLSL_SOURCES}) + target_compile_definitions(angle_translator PUBLIC -DANGLE_ENABLE_HLSL) +endif() +if(_needs_glsl_base) + target_sources(angle_translator PRIVATE ${TRANSLATOR_GLSL_BASE_SOURCES}) +endif() +if(_needs_glsl_and_vulkan_base) + target_sources(angle_translator PRIVATE ${TRANSLATOR_GLSL_AND_VULKAN_BASE_SOURCES}) +endif() target_link_libraries(angle_translator PRIVATE angle::common) add_library(angle::translator ALIAS angle_translator) @@ -101,7 +322,7 @@ file(GLOB PREPROCESSOR_SOURCES "src/compiler/preprocessor/*.h" "src/compiler/preprocessor/*.cpp" ) -add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES}) +add_library(angle_preprocessor OBJECT ${PREPROCESSOR_SOURCES}) target_link_libraries(angle_preprocessor PRIVATE angle::common) add_library(angle::preprocessor ALIAS angle_preprocessor) @@ -113,36 +334,35 @@ if(WINDOWS_DESKTOP OR LINUX OR APPLE) if(WINDOWS_DESKTOP) set(ANGLE_RENDERER_OPENGL_PLATFORM "src/libANGLE/renderer/gl/wgl/*.cpp" - "src/libANGLE/renderer/gl/wgl/*.inl" "src/libANGLE/renderer/gl/wgl/*.h" ) elseif(APPLE) set(ANGLE_RENDERER_OPENGL_PLATFORM "src/libANGLE/renderer/gl/cgl/*.mm" "src/libANGLE/renderer/gl/cgl/*.cpp" - "src/libANGLE/renderer/gl/cgl/*.inl" "src/libANGLE/renderer/gl/cgl/*.h" - "gpu_info_util/SystemInfo_mac.mm" + "gpu_info_util/SystemInfo_macos.mm" ) elseif(LINUX) set(ANGLE_RENDERER_OPENGL_PLATFORM "src/libANGLE/renderer/gl/glx/*.cpp" - "src/libANGLE/renderer/gl/glx/*.inl" "src/libANGLE/renderer/gl/glx/*.h" + "src/libANGLE/renderer/gl/egl/*.cpp" + "src/libANGLE/renderer/gl/egl/*.h" ) endif() file(GLOB LIBANGLE_GL_SOURCES "src/libANGLE/renderer/gl/*.cpp" - "src/libANGLE/renderer/gl/*.inl" + "src/libANGLE/renderer/gl/*.inc" "src/libANGLE/renderer/gl/*.h" ${ANGLE_RENDERER_OPENGL_PLATFORM} ) list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest") add_library(angle_renderer_opengl INTERFACE) - target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES}) - target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL) + target_sources(angle_renderer_opengl INTERFACE "$") + target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL -DANGLE_ENABLE_OPENGL_DESKTOP) add_library(angle::renderer::opengl ALIAS angle_renderer_opengl) endif() @@ -151,42 +371,50 @@ if(WIN32) ## All D3D Sources file(GLOB_RECURSE LIBANGLE_D3D_SOURCES "src/libANGLE/renderer/d3d/*.cpp" - "src/libANGLE/renderer/d3d/*.inl" + "src/libANGLE/renderer/d3d/*.inc" "src/libANGLE/renderer/d3d/*.h" ) list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest") + if(MINGW) + list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "CompositorNativeWindow11") + endif() ## WinRT D3D Renderer if(WINDOWS_STORE) set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES}) list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt") add_library(angle_renderer_winrt INTERFACE) - target_sources(angle_renderer_winrt INTERFACE ${LIBANGLE_D3D_WINRT_SOURCES}) + target_sources(angle_renderer_winrt INTERFACE "$") add_library(angle::renderer::winrt ALIAS angle_renderer_winrt) endif() ## Win32/d3d9 D3D Renderer if(WINDOWS_DESKTOP) set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES}) - list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32|converged") + list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32") find_library(D3D9_LIB NAMES d3d9) add_library(angle_renderer_win32 INTERFACE) - target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES}) + target_sources(angle_renderer_win32 INTERFACE "$") target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9) - target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB}) + target_link_libraries(angle_renderer_win32 INTERFACE d3d9) add_library(angle::renderer::win32 ALIAS angle_renderer_win32) endif() ## D3D11 Base renderer - list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32|converged") + list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32") find_library(DXGUID_LIB NAMES dxguid) find_library(D3D11_LIB NAMES d3d11) add_library(angle_renderer_d3d INTERFACE) - target_sources(angle_renderer_d3d INTERFACE ${LIBANGLE_D3D_SOURCES}) + target_sources(angle_renderer_d3d INTERFACE "$") target_compile_definitions(angle_renderer_d3d INTERFACE -DANGLE_ENABLE_D3D11 "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" - ) + ) + if(NOT MINGW) + target_compile_definitions(angle_renderer_d3d INTERFACE + -DANGLE_ENABLE_D3D11_COMPOSITOR_NATIVE_WINDOW + ) + endif() target_link_libraries(angle_renderer_d3d INTERFACE d3d11 dxguid) add_library(angle::renderer::d3d ALIAS angle_renderer_d3d) endif() @@ -197,12 +425,15 @@ file(GLOB ANGLE_GPU_INFO_UTIL_SOURCES "src/gpu_info_util/SystemInfo_internal.h" "src/gpu_info_util/SystemInfo.cpp" ) -add_library(angle_gpu_info_util STATIC ${ANGLE_GPU_INFO_UTIL_SOURCES}) +add_library(angle_gpu_info_util OBJECT ${ANGLE_GPU_INFO_UTIL_SOURCES}) if(WIN32) target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_win.cpp") target_link_libraries(angle_gpu_info_util PRIVATE setupapi.lib dxgi.lib) elseif(APPLE) - target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_mac.mm") + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_apple.mm") + if(CMAKE_SYSTEM_NAME MATCHES "Darwin") # macOS + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_macos.mm") + endif() find_library(IOKit IOKit) find_library(CoreFoundation CoreFoundation) find_library(CoreGraphics CoreGraphics) @@ -219,11 +450,17 @@ add_library(angle::gpu_info_util ALIAS angle_gpu_info_util) ## Core libANGLE library if(WIN32) - set(LIBANGLE_SOURCES_PLATFORM - "src/third_party/systeminfo/SystemInfo.cpp" + if(NOT WINDOWS_STORE) + set(LIBANGLE_SOURCES_PLATFORM + "src/third_party/systeminfo/SystemInfo.cpp" + ) + endif() +elseif(APPLE) + file(GLOB LIBANGLE_SOURCES_PLATFORM + "src/libANGLE/renderer/*.mm" ) else() - set(LIBANGLE_SOURCES_PLATFORM ) + set(LIBANGLE_SOURCES_PLATFORM) endif() file(GLOB LIBANGLE_SOURCES @@ -231,20 +468,47 @@ file(GLOB LIBANGLE_SOURCES "src/common/event_tracer.cpp" "src/libANGLE/*.cpp" - "src/libANGLE/*.inl" + "src/libANGLE/*.inc" "src/libANGLE/*.h" "src/libANGLE/renderer/*.cpp" - "src/libANGLE/renderer/*.inl" "src/libANGLE/renderer/*.h" "src/libANGLE/renderer/null/*.cpp" - "src/libANGLE/renderer/null/*.inl" "src/libANGLE/renderer/null/*.h" + # The frame capture headers are always visible to libANGLE. + "src/libANGLE/capture/*.h" + + # angle_frame_capture_disabled + "src/libANGLE/capture/FrameCapture_mock.cpp" + "src/libANGLE/capture/frame_capture_utils_mock.cpp" + + # angle_gl_enum_utils + "src/libANGLE/capture/gl_enum_utils.cpp" + "src/libANGLE/capture/gl_enum_utils_autogen.cpp" + ${LIBANGLE_SOURCES_PLATFORM} ) -list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") +list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest|glslang_wrapper|dxgi_|d3d_format") +if(WIN32) + set(LIBANGLE_D3D_FORMAT_TABLES_SOURCES_PLATFORM) + if(NOT WINDOWS_STORE) + list(APPEND LIBANGLE_D3D_FORMAT_TABLES_SOURCES_PLATFORM + "src/libANGLE/renderer/d3d_format.cpp" + "src/libANGLE/renderer/d3d_format.h" + ) + endif() + file(GLOB LIBANGLE_D3D_FORMAT_TABLES_SOURCES + "src/libANGLE/renderer/dxgi_format_map.h" + "src/libANGLE/renderer/dxgi_format_map_autogen.cpp" + "src/libANGLE/renderer/dxgi_support_table.h" + "src/libANGLE/renderer/dxgi_support_table_autogen.cpp" + + ${LIBANGLE_D3D_FORMAT_TABLES_SOURCES_PLATFORM} + ) + list(APPEND LIBANGLE_SOURCES "${LIBANGLE_D3D_FORMAT_TABLES_SOURCES}") +endif() if(LINUX OR APPLE) set(LIBANGLE_RENDERER_PLATFORM @@ -267,6 +531,9 @@ else() endif() if(LINUX) + find_package(X11) + include_directories(${X11_INCLUDE_DIR}) + list(APPEND LIBANGLE_RENDERER_PLATFORM ${X11_LIBRARIES}) set(LIBANGLE_RENDERER_COMPILEDEF -DANGLE_USE_X11 ) @@ -277,70 +544,194 @@ endif() add_library(libANGLE STATIC ${LIBANGLE_SOURCES}) target_link_libraries(libANGLE PRIVATE angle::common + angle::compression angle::image_util angle::gpu_info_util angle::translator angle::preprocessor ${LIBANGLE_RENDERER_PLATFORM} ) -target_include_directories(libANGLE PRIVATE "src/third_party/khronos") +target_include_directories(libANGLE PRIVATE "$") target_compile_definitions(libANGLE PRIVATE -DANGLE_ENABLE_NULL PUBLIC -DLIBANGLE_IMPLEMENTATION - ${LIBANGLE_RENDERER_COMPILEDEF} + ${LIBANGLE_RENDERER_COMPILEDEF} + -DANGLE_EXPORT= + -DANGLE_UTIL_EXPORT= + -DEGLAPI= + -DGL_APICALL= + -DGL_API= + -DANGLE_CAPTURE_ENABLED=0 ) add_library(angle::libANGLE ALIAS libANGLE) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libANGLE + PRIVATE -DLIBANGLE_UTIL_IMPLEMENTATION + ) +endif() ########## # libGLESv2 -file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2_autogen.def") +# Modified according to the file src/libGLESv2.gni +list(APPEND LIBGLESV2_SOURCES + "src/libGLESv2/egl_ext_stubs.cpp" + "src/libGLESv2/egl_ext_stubs_autogen.h" + "src/libGLESv2/egl_stubs.cpp" + "src/libGLESv2/egl_stubs_autogen.h" + "src/libGLESv2/entry_points_egl_autogen.cpp" + "src/libGLESv2/entry_points_egl_autogen.h" + "src/libGLESv2/entry_points_egl_ext_autogen.cpp" + "src/libGLESv2/entry_points_egl_ext_autogen.h" + "src/libGLESv2/entry_points_gles_1_0_autogen.cpp" + "src/libGLESv2/entry_points_gles_1_0_autogen.h" + "src/libGLESv2/entry_points_gles_2_0_autogen.cpp" + "src/libGLESv2/entry_points_gles_2_0_autogen.h" + "src/libGLESv2/entry_points_gles_3_0_autogen.cpp" + "src/libGLESv2/entry_points_gles_3_0_autogen.h" + "src/libGLESv2/entry_points_gles_3_1_autogen.cpp" + "src/libGLESv2/entry_points_gles_3_1_autogen.h" + "src/libGLESv2/entry_points_gles_3_2_autogen.cpp" + "src/libGLESv2/entry_points_gles_3_2_autogen.h" + "src/libGLESv2/entry_points_gles_ext_autogen.cpp" + "src/libGLESv2/entry_points_gles_ext_autogen.h" + "src/libGLESv2/global_state.cpp" + "src/libGLESv2/global_state.h" + "src/libGLESv2/libGLESv2_autogen.cpp" + "src/libGLESv2/proc_table_egl.h" + "src/libGLESv2/proc_table_egl_autogen.cpp" + "src/libGLESv2/resource.h" + "src/libGLESv2/libGLESv2_autogen.def" +) add_library(libGLESv2 ${LIBGLESV2_SOURCES}) target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE) target_compile_definitions(libGLESv2 PRIVATE -DLIBGLESV2_IMPLEMENTATION PUBLIC - -DGL_GLEXT_PROTOTYPES - -DGL_API= - -DGL_APICALL= - -DEGLAPI= - -DGL_API= + "-DGL_GLES_PROTOTYPES=1" + "-DGL_GLEXT_PROTOTYPES" + "-DEGL_EGL_PROTOTYPES=1" + "-DEGL_EGLEXT_PROTOTYPES" ) +if(BUILD_SHARED_LIBS) +else() + if(WIN32) + target_compile_definitions(libGLESv2 PRIVATE + "-DGL_API=" + "-DGL_APICALL=" + "-DEGLAPI=" + ) + else() + target_compile_definitions(libGLESv2 PRIVATE + "-DGL_API=__attribute__((visibility(\"default\")))" + "-DGL_APICALL=__attribute__((visibility(\"default\")))" + "-DEGLAPI=__attribute__((visibility(\"default\")))" + ) + endif() +endif() + target_include_directories(libGLESv2 PUBLIC "$") ########## # libEGL +if(WIN32) + set(libEGL_def + "src/libEGL/libEGL_autogen.def" + ) +endif() add_library(libEGL - "src/libEGL/libEGL.def" - "src/libEGL/libEGL.cpp" - "src/libEGL/libEGL.rc" + "src/libEGL/egl_loader_autogen.h" + "src/libEGL/libEGL_autogen.cpp" "src/libEGL/resource.h" + "src/libGLESv2/entry_points_egl_autogen.h" + "src/libGLESv2/entry_points_egl_ext_autogen.h" + ${libEGL_def} ) + target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) -target_include_directories(libEGL PUBLIC "$") -target_include_directories(libEGL PUBLIC "$") +target_include_directories(libEGL PUBLIC "$" "$") +target_compile_definitions(libEGL + PRIVATE + "-DLIBEGL_IMPLEMENTATION" + PUBLIC + "-DGL_GLES_PROTOTYPES=1" + "-DGL_GLEXT_PROTOTYPES" + "-DEGL_EGL_PROTOTYPES=1" + "-DEGL_EGLEXT_PROTOTYPES" +) +add_library(GL_VISIBILITY INTERFACE) +if(WIN32) + target_compile_definitions(GL_VISIBILITY INTERFACE + "-DGL_API=" + "-DGL_APICALL=") +else() + target_compile_definitions(GL_VISIBILITY INTERFACE + "-DGL_API=__attribute__((visibility(\"default\")))" + "-DGL_APICALL=__attribute__((visibility(\"default\")))") +endif() +target_link_libraries(libEGL PRIVATE GL_VISIBILITY) +target_link_libraries(libGLESv2 PRIVATE GL_VISIBILITY) +if(WIN32) + target_compile_definitions(libEGL PRIVATE + "-DEGLAPI=" + ) +else() + target_compile_definitions(libEGL PRIVATE + "-DEGLAPI=__attribute__((visibility(\"default\")))" + ) +endif() + +if(NOT BUILD_SHARED_LIBS) + add_definitions("-DANGLE_EXPORT=" "-DANGLE_UTIL_EXPORT=" "-DEGLAPI=" "-DGL_APICALL=" "-DGL_API=") +endif() -SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "") -SET_TARGET_PROPERTIES(libGLESv2 PROPERTIES PREFIX "") -SET_TARGET_PROPERTIES(libEGL PROPERTIES PREFIX "") +set_target_properties(libANGLE PROPERTIES PREFIX "") +set_target_properties(libGLESv2 PROPERTIES PREFIX "" IMPORT_PREFIX "") +set_target_properties(libEGL PROPERTIES PREFIX "" IMPORT_PREFIX "") -install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport +install(TARGETS libEGL libGLESv2 libANGLE angle_common angle_compression_utils angle_image_util angle_gpu_info_util angle_translator angle_preprocessor GL_VISIBILITY EXPORT ANGLEExport RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) +if(WINDOWS_DESKTOP) + install(TARGETS angle_renderer_d3d angle_renderer_win32 angle_renderer_opengl EXPORT ANGLEExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +elseif(WINDOWS_STORE) + install(TARGETS angle_renderer_d3d angle_renderer_winrt EXPORT ANGLEExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +else() + install(TARGETS angle_renderer_opengl EXPORT ANGLEExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +endif() + install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle) if(NOT DISABLE_INSTALL_HEADERS) install( DIRECTORY include/ DESTINATION include - FILES_MATCHING PATTERN "*.h" + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.inc" + PATTERN "CL" EXCLUDE PATTERN "GLSLANG" EXCLUDE - PATTERN "EGL" EXCLUDE + PATTERN "egl.h" EXCLUDE + PATTERN "eglext.h" EXCLUDE + PATTERN "eglplatform.h" EXCLUDE PATTERN "KHR" EXCLUDE + PATTERN "WGL" EXCLUDE PATTERN "export.h" EXCLUDE ) endif() diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL deleted file mode 100644 index faa26f276a4d0a..00000000000000 --- a/ports/angle/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: angle -Version: 2019-06-13 -Homepage: https://github.com/google/angle -Description: A conformant OpenGL ES implementation for Windows, Mac and Linux. - The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support. -Build-Depends: egl-registry diff --git a/ports/angle/commit.h b/ports/angle/angle_commit.h similarity index 100% rename from ports/angle/commit.h rename to ports/angle/angle_commit.h diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index 48a6f7a3ceef4d..ed604ecb420eb4 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -1,6 +1,7 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +if (VCPKG_TARGET_IS_LINUX) + message(WARNING "Building with a gcc version less than 6.1 is not supported.") + message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libx11-dev\n libmesa-dev\n libxi-dev\n libxext-dev\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libmesa-dev libxi-dev libxext-dev.") +endif() if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU) @@ -8,6 +9,8 @@ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU) elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU) +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU) else() message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() @@ -15,14 +18,40 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/angle - REF 0d3cf7085c8e953e78d4fa0656b26ee93d005452 - SHA512 91550749933e278a72ae1094178ea28b36ee2b2fa553549477596ee772d1a39653386b3f3a9f168b0840a1511b7d31384b4e2d53cd5b5629028ca9c5a18a9288 - PATCHES + REF d15be77864e18f407c317be6f6bc06ee2b7d070a # chromium/4472 + SHA512 aad8563ee65458a7865ec7c668d1f90ac2891583c569a22dcd2c557263b72b26386f56b74a7294398be2cf5c548df513159e4be53f3f096f19819ca06227d9ac + # On update check headers against opengl-registry + PATCHES 001-fix-uwp.patch + 002-fix-builder-error.patch + 003-fix-mingw.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/angle_commit.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/angle_commit.h DESTINATION ${SOURCE_PATH}/src/common) + +function(checkout_in_path_with_patches PATH URL REF PATCHES) + if(EXISTS "${PATH}") + return() + endif() + + vcpkg_from_git( + OUT_SOURCE_PATH DEP_SOURCE_PATH + URL "${URL}" + REF "${REF}" + PATCHES ${PATCHES} + ) + file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") + file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") +endfunction() + +checkout_in_path_with_patches( + "${SOURCE_PATH}/third_party/zlib" + "https://chromium.googlesource.com/chromium/src/third_party/zlib" + "09490503d0f201b81e03f5ca0ab8ba8ee76d4a8e" + "third-party-zlib-far-undef.patch" +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -38,4 +67,33 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/u vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/angle RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# File conflict with opengl-registry! Make sure headers are similar on Update! +# angle defines some additional entrypoints. +# opengl-registry probably needs an upstream update to account for those +# Due to that all angle headers get moved to include/angle. +# If you want to use those instead of the onces provided by opengl-registry make sure +# VCPKG_INSTALLED_DIR/include/angle is before VCPKG_INSTALLED_DIR/include +file(GLOB_RECURSE angle_includes "${CURRENT_PACKAGES_DIR}/include") +file(COPY ${angle_includes} DESTINATION "${CURRENT_PACKAGES_DIR}/include/angle") + +set(_double_files + include/GLES/egl.h + include/GLES/gl.h + include/GLES/glext.h + include/GLES/glplatform.h + include/GLES2/gl2.h + include/GLES2/gl2ext.h + include/GLES2/gl2platform.h + include/GLES3/gl3.h + include/GLES3/gl31.h + include/GLES3/gl32.h + include/GLES3/gl3platform.h) +foreach(_file ${_double_files}) + if(EXISTS "${CURRENT_PACKAGES_DIR}/${_file}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}") + endif() +endforeach() + + diff --git a/ports/angle/third-party-zlib-far-undef.patch b/ports/angle/third-party-zlib-far-undef.patch new file mode 100644 index 00000000000000..c92b058d238eb4 --- /dev/null +++ b/ports/angle/third-party-zlib-far-undef.patch @@ -0,0 +1,13 @@ +diff --git a/google/compression_utils_portable.h b/google/compression_utils_portable.h +--- a/google/compression_utils_portable.h ++++ b/google/compression_utils_portable.h +@@ -13,6 +13,9 @@ + * zlib. + */ + #if defined(USE_SYSTEM_ZLIB) ++# if defined(WIN32) && defined(FAR) ++# undef FAR ++# endif + #include + /* AOSP build requires relative paths. */ + #else diff --git a/ports/angle/vcpkg.json b/ports/angle/vcpkg.json new file mode 100644 index 00000000000000..e51cf097890bf8 --- /dev/null +++ b/ports/angle/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "angle", + "version-string": "chromium_4472", + "port-version": 2, + "description": [ + "A conformant OpenGL ES implementation for Windows, Mac and Linux.", + "The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support." + ], + "homepage": "https://github.com/google/angle", + "dependencies": [ + "egl-registry", + "opengl-registry", + "zlib" + ] +} diff --git a/ports/antlr4/CONTROL b/ports/antlr4/CONTROL deleted file mode 100644 index 46852dbf5a42c6..00000000000000 --- a/ports/antlr4/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: antlr4 -Version: 4.7.1-3 -Homepage: https://www.antlr.org -Description: ANother Tool for Language Recognition -Build-Depends: libuuid (!uwp&!windows&!osx) \ No newline at end of file diff --git a/ports/antlr4/export_guid.patch b/ports/antlr4/export_guid.patch index a92c034db401fa..4974718a7a355d 100644 --- a/ports/antlr4/export_guid.patch +++ b/ports/antlr4/export_guid.patch @@ -1,6 +1,6 @@ -diff -urN c/runtime/src/support/guid.h d/runtime/src/support/guid.h ---- c/runtime/src/support/guid.h 2017-07-01 09:51:22.000000000 +0800 -+++ d/runtime/src/support/guid.h 2018-09-05 10:16:23.847717700 +0800 +diff -urN a/runtime/src/support/guid.h b/runtime/src/support/guid.h +--- a/runtime/src/support/guid.h ++++ b/runtime/src/support/guid.h @@ -38,7 +38,7 @@ // 16 byte value that can be passed around by value. It also supports // conversion to string (via the stream operator <<) and conversion from a @@ -9,7 +9,7 @@ diff -urN c/runtime/src/support/guid.h d/runtime/src/support/guid.h +class ANTLR4CPP_PUBLIC Guid { public: - + @@ -90,7 +90,7 @@ // function would no longer be cross-platform if we parameterized the android // version. Instead, construction of the GuidGenerator may be different on diff --git a/ports/antlr4/fix_utfcpp_dependency.patch b/ports/antlr4/fix_utfcpp_dependency.patch new file mode 100644 index 00000000000000..629e12f38ec2c9 --- /dev/null +++ b/ports/antlr4/fix_utfcpp_dependency.patch @@ -0,0 +1,45 @@ +diff --git a/runtime/Cpp/runtime/CMakeLists.txt b/runtime/Cpp/runtime/CMakeLists.txt +index a8503bb61..e7b01b7cb 100644 +--- a/runtime/CMakeLists.txt ++++ b/runtime/CMakeLists.txt +@@ -1,17 +1,3 @@ +- +-include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) +- +-set(THIRDPARTY_DIR ${CMAKE_BINARY_DIR}/runtime/thirdparty) +-set(UTFCPP_DIR ${THIRDPARTY_DIR}/utfcpp) +-ExternalProject_Add( +- utfcpp +- GIT_REPOSITORY "git://github.com/nemtrif/utfcpp" +- GIT_TAG "v3.1.1" +- SOURCE_DIR ${UTFCPP_DIR} +- UPDATE_DISCONNECTED 1 +- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${UTFCPP_DIR}/install -Dgtest_force_shared_crt=ON +- TEST_AFTER_INSTALL 1 +- STEP_TARGETS build) + + + include_directories( +@@ -23,8 +13,6 @@ include_directories( + ${PROJECT_SOURCE_DIR}/runtime/src/tree + ${PROJECT_SOURCE_DIR}/runtime/src/tree/pattern + ${PROJECT_SOURCE_DIR}/runtime/src/tree/xpath +- ${UTFCPP_DIR}/install/include/utf8cpp +- ${UTFCPP_DIR}/install/include/utf8cpp/utf8 + ) + + +@@ -131,13 +119,6 @@ install(DIRECTORY "${PROJECT_SOURCE_DIR}/runtime/src/" + FILES_MATCHING PATTERN "*.h" + ) + +-install(FILES "${UTFCPP_DIR}/source/utf8.h" +- DESTINATION "include/antlr4-runtime") +-install(DIRECTORY "${UTFCPP_DIR}/source/utf8" +- DESTINATION "include/antlr4-runtime" +- COMPONENT dev +- FILES_MATCHING PATTERN "*.h" +- ) + + + diff --git a/ports/antlr4/fixed_build.patch b/ports/antlr4/fixed_build.patch index 72697a3885d089..e0f8ff91f0b5d1 100644 --- a/ports/antlr4/fixed_build.patch +++ b/ports/antlr4/fixed_build.patch @@ -1,28 +1,38 @@ diff -urN a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt ---- a/runtime/CMakeLists.txt 2017-11-29 09:51:54.000000000 +0800 -+++ b/runtime/CMakeLists.txt 2018-08-30 19:06:03.718401800 +0800 +--- a/runtime/CMakeLists.txt ++++ b/runtime/CMakeLists.txt @@ -25,7 +25,7 @@ add_library(antlr4_shared SHARED ${libantlrcpp_SRC}) add_library(antlr4_static STATIC ${libantlrcpp_SRC}) - + -set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here. +# set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here. message(STATUS "Output libraries to ${LIB_OUTPUT_DIR}") - + # make sure 'make' works fine even if ${LIB_OUTPUT_DIR} is deleted. -@@ -63,10 +63,10 @@ +@@ -63,15 +63,15 @@ set(extra_share_compile_flags "-DANTLR4CPP_EXPORTS") set(extra_static_compile_flags "-DANTLR4CPP_STATIC") endif(WIN32) --if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") -- target_compile_options(antlr4_shared PRIVATE "/MD$<$:d>") -- target_compile_options(antlr4_static PRIVATE "/MT$<$:d>") +-if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") +- if(WITH_STATIC_CRT) +- target_compile_options(antlr4_shared PRIVATE "/MT$<$:d>") +- target_compile_options(antlr4_static PRIVATE "/MT$<$:d>") +- else() +- target_compile_options(antlr4_shared PRIVATE "/MD$<$:d>") +- target_compile_options(antlr4_static PRIVATE "/MD$<$:d>") +- endif() -endif() -+# if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") -+# target_compile_options(antlr4_shared PRIVATE "/MD$<$:d>") -+# target_compile_options(antlr4_static PRIVATE "/MT$<$:d>") ++# if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") ++# if(WITH_STATIC_CRT) ++# target_compile_options(antlr4_shared PRIVATE "/MT$<$:d>") ++# target_compile_options(antlr4_static PRIVATE "/MT$<$:d>") ++# else() ++# target_compile_options(antlr4_shared PRIVATE "/MD$<$:d>") ++# target_compile_options(antlr4_static PRIVATE "/MD$<$:d>") ++# endif() +# endif() - + set(static_lib_suffix "") - if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") \ No newline at end of file diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake old mode 100755 new mode 100644 index b0749e12302a51..1770cabfc1dcac --- a/ports/antlr4/portfile.cmake +++ b/ports/antlr4/portfile.cmake @@ -1,15 +1,11 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") -set(VERSION 4.7.1) +set(VERSION 4.9.1) vcpkg_download_distfile(ARCHIVE URLS "http://www.antlr.org/download/antlr4-cpp-runtime-${VERSION}-source.zip" FILENAME "antlr4-cpp-runtime-${VERSION}-source.zip" - SHA512 24d53278db56b199e6787242f22339f74e07d2cd3ed56f851ad905b110c2ba3cb001e1e2fcbc8624f0e93e00ba1fe1b23630dd1a736558c694655aeb1c3129da + SHA512 fe33005f73f8d408fcea8ebab62c0def119bbe0c075f04a66404d0df258126eb6caf0a8bbac34d5c4c9e79d4aa8896f32698a560d4be7d71a32dcc3457245cee ) # license not exist in antlr folder. @@ -24,9 +20,11 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} NO_REMOVE_ONE_LEVEL REF ${VERSION} - PATCHES fixed_build.patch - uuid_discovery_fix.patch - export_guid.patch + PATCHES + fixed_build.patch + uuid_discovery_fix.patch + export_guid.patch + fix_utfcpp_dependency.patch ) vcpkg_configure_cmake( @@ -82,12 +80,6 @@ else() endif() endif() -file(GLOB HDRS LIST_DIRECTORIES true ${CURRENT_PACKAGES_DIR}/include/antlr4-runtime/*) -file(COPY ${HDRS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/antlr4-runtime) - vcpkg_copy_pdbs() -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/antlr4 RENAME copyright) - -message(STATUS "Installing done") \ No newline at end of file +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/antlr4/uuid_discovery_fix.patch b/ports/antlr4/uuid_discovery_fix.patch index 6d6e6fab73f643..818a9307be9f45 100644 --- a/ports/antlr4/uuid_discovery_fix.patch +++ b/ports/antlr4/uuid_discovery_fix.patch @@ -1,10 +1,9 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f4940c0..978b6ea 100644 +diff -urN a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -38,8 +38,10 @@ if(CMAKE_VERSION VERSION_EQUAL "3.3.0" OR +@@ -40,8 +40,10 @@ endif() - + if(CMAKE_SYSTEM_NAME MATCHES "Linux") - find_package(PkgConfig REQUIRED) - pkg_check_modules(UUID REQUIRED uuid) @@ -15,39 +14,15 @@ index f4940c0..978b6ea 100644 endif() if(APPLE) find_library(COREFOUNDATION_LIBRARY CoreFoundation) -@@ -115,7 +117,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_SYSTEM_NAME MATCHES - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - endif() - elseif ( MSVC_VERSION GREATER 1800 OR MSVC_VERSION EQUAL 1800 ) -- # Visual Studio 2012+ supports c++11 features -+ # Visual Studio 2012+ supports c++11 features - else () - message(FATAL_ERROR "Your C++ compiler does not support C++11.") - endif () -@@ -129,10 +131,10 @@ endif(WITH_DEMO) - if( EXISTS LICENSE.txt) - install(FILES LICENSE.txt - DESTINATION "share/doc/libantlr4") --elseif(EXISTS ../../LICENSE.txt) -+elseif(EXISTS ../../LICENSE.txt) - install(FILES ../../LICENSE.txt - DESTINATION "share/doc/libantlr4") - endif() - --install(FILES README.md VERSION -+install(FILES README.md VERSION - DESTINATION "share/doc/libantlr4") -diff --git a/runtime/src/support/guid.cpp b/runtime/src/support/guid.cpp -index b6105d7..5baadb0 100644 +diff -urN a/runtime/src/support/guid.cpp b/runtime/src/support/guid.cpp --- a/runtime/src/support/guid.cpp +++ b/runtime/src/support/guid.cpp -@@ -21,7 +21,7 @@ - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +@@ -22,6 +22,7 @@ THE SOFTWARE. */ -- + +#include "antlr4-common.h" #include "guid.h" - + #ifdef GUID_LIBUUID \ No newline at end of file diff --git a/ports/antlr4/vcpkg.json b/ports/antlr4/vcpkg.json new file mode 100644 index 00000000000000..22a33dc30588e8 --- /dev/null +++ b/ports/antlr4/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "antlr4", + "version-string": "4.9.1", + "port-version": 1, + "description": "ANother Tool for Language Recognition", + "homepage": "https://www.antlr.org", + "supports": "!uwp", + "dependencies": [ + { + "name": "libuuid", + "platform": "!uwp & !windows & !osx" + } + ] +} diff --git a/ports/any-lite/CONTROL b/ports/any-lite/CONTROL deleted file mode 100644 index 6eaf3d1670f5c8..00000000000000 --- a/ports/any-lite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: any-lite -Version: 0.2.0 -Description: A C++17-like any, a type-safe container for single values of any type for C++98, C++11 and later in a single-file header-only library diff --git a/ports/any-lite/portfile.cmake b/ports/any-lite/portfile.cmake index aba9051342954a..a1b509d65880c1 100644 --- a/ports/any-lite/portfile.cmake +++ b/ports/any-lite/portfile.cmake @@ -1,31 +1,21 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/any-lite - REF v0.2.0 - SHA512 703900d7bac96d41f903b6cabba4bce15ef3cf7ef0a6a66de76230498ededff110e43d68d4a3fd6996869b2edd001f69bd53039a214d06b774ce99518f384a68 + REF d45a83b8e49d09ff5e5b66c10a56c997946436d9 #v0.4.0 + SHA512 b73fe2d1e6de24e143337ef72f71949bf2ae4157a58a5c7e45dd0e9412dd798da6ef929fa09d104305483e769a603b37babd7ba65ab854a33483ab3ec8a921ec ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DANY_LITE_OPT_BUILD_TESTS=OFF -DANY_LITE_OPT_BUILD_EXAMPLES=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets( - CONFIG_PATH lib/cmake/${PORT} -) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) -file( REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug - ${CURRENT_PACKAGES_DIR}/lib -) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") -file( INSTALL - ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright -) +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/any-lite/vcpkg.json b/ports/any-lite/vcpkg.json new file mode 100644 index 00000000000000..31f836c51dd20c --- /dev/null +++ b/ports/any-lite/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "any-lite", + "version-semver": "0.4.0", + "description": "A C++17-like any, a type-safe container for single values of any type for C++98, C++11 and later in a single-file header-only library", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/anyrpc/portfile.cmake b/ports/anyrpc/portfile.cmake new file mode 100644 index 00000000000000..3090d2db9cfec8 --- /dev/null +++ b/ports/anyrpc/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sgieseking/anyrpc + REF b1949b3d40849229055ae75cf5334b9d08579502 + SHA512 8c674d29e80ec2522d6c1ec959663958ab4e1bf1135727c3c2aaa19e62a81ddbbd1e6a46f3e4679ee02894ad2ab26e70ca7e1e6c8750f3289994311069221b53 + HEAD_REF master + FILE_DISAMBIGUATOR 1 +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ANYRPC_LIB_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + -DBUILD_WITH_LOG4CPLUS=OFF + -DANYRPC_LIB_BUILD_SHARED=${ANYRPC_LIB_BUILD_SHARED} +) + +vcpkg_install_cmake() + +file(INSTALL "${SOURCE_PATH}/license" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs() diff --git a/ports/anyrpc/vcpkg.json b/ports/anyrpc/vcpkg.json new file mode 100644 index 00000000000000..02ffac66d9dc0a --- /dev/null +++ b/ports/anyrpc/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "anyrpc", + "version-date": "2021-08-24", + "description": "A multiprotocol remote procedure call system for C++.", + "homepage": "https://github.com/sgieseking/anyrpc" +} diff --git a/ports/aom/aom-install.diff b/ports/aom/aom-install.diff new file mode 100644 index 00000000000000..64c45df5489685 --- /dev/null +++ b/ports/aom/aom-install.diff @@ -0,0 +1,75 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 18190f647..f4b1b359d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,6 +23,9 @@ endif() + + project(AOM C CXX) + ++include(GNUInstallDirs) ++include(CMakePackageConfigHelpers) ++ + if(NOT EMSCRIPTEN) + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE +@@ -289,6 +292,52 @@ if(BUILD_SHARED_LIBS) + set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_static) + endif() + ++set(PUBLIC_HEADERS ++ aom/aom.h ++ aom/aom_codec.h ++ aom/aom_decoder.h ++ aom/aom_encoder.h ++ aom/aom_frame_buffer.h ++ aom/aom_image.h ++ aom/aom_integer.h ++ aom/aomcx.h ++ aom/aomdx.h ++) ++ ++set_target_properties(aom PROPERTIES ++ PUBLIC_HEADER "${PUBLIC_HEADERS}") ++ ++ ++target_include_directories(aom ++ PUBLIC $ ++ $) ++ ++install(TARGETS aom ++ EXPORT unofficial-aom-targets ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aom") ++ ++install(EXPORT unofficial-aom-targets ++ FILE unofficial-aom-targets.cmake ++ NAMESPACE unofficial:: ++ DESTINATION lib/cmake/aom) ++ ++configure_package_config_file(cmake/aom-config.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake ++ INSTALL_DESTINATION lib/cmake/aom ++ NO_SET_AND_CHECK_MACRO ++ NO_CHECK_REQUIRED_COMPONENTS_MACRO) ++ ++write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake ++ VERSION ${SO_FILE_VERSION} ++ COMPATIBILITY SameMajorVersion) ++ ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake ++ ${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake ++ DESTINATION lib/cmake/aom) ++ + # Setup dependencies. + setup_aom_dsp_targets() + setup_aom_mem_targets() +diff --git a/cmake/aom-config.cmake.in b/cmake/aom-config.cmake.in +new file mode 100644 +index 000000000..91cac3b5b +--- /dev/null ++++ b/cmake/aom-config.cmake.in +@@ -0,0 +1,2 @@ ++@PACKAGE_INIT@ ++include(${CMAKE_CURRENT_LIST_DIR}/unofficial-aom-targets.cmake) diff --git a/ports/aom/aom-rename-static.diff b/ports/aom/aom-rename-static.diff new file mode 100644 index 00000000000000..e38c73fb174789 --- /dev/null +++ b/ports/aom/aom-rename-static.diff @@ -0,0 +1,12 @@ +diff -pruN aom-3.0.0.o/CMakeLists.txt aom-3.0.0/CMakeLists.txt +--- aom-3.0.0.o/CMakeLists.txt 2021-04-15 20:05:52.695181200 +0300 ++++ aom-3.0.0/CMakeLists.txt 2021-04-15 22:34:16.147522600 +0300 +@@ -249,7 +249,7 @@ endif() + add_library(aom ${AOM_SOURCES} $) + if(BUILD_SHARED_LIBS) + add_library(aom_static STATIC ${AOM_SOURCES} $) +- set_target_properties(aom_static PROPERTIES OUTPUT_NAME aom) ++ set_target_properties(aom_static PROPERTIES OUTPUT_NAME aom_static) + + if(NOT MSVC) + # Extract version string and set VERSION/SOVERSION for the aom target. diff --git a/ports/aom/portfile.cmake b/ports/aom/portfile.cmake new file mode 100644 index 00000000000000..a3f84e8b295545 --- /dev/null +++ b/ports/aom/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "UWP") + +# NASM is required to build AOM +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(${NASM_EXE_PATH}) + +# Perl is required to build AOM +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_PATH}) + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL "https://aomedia.googlesource.com/aom" + REF 8f85bb1d686647d0f7dc1e7220f94f55193d2c89 + TAG v3.1.2 + PATCHES + aom-rename-static.diff + # Can be dropped when https://bugs.chromium.org/p/aomedia/issues/detail?id=3029 is merged into the upstream + aom-install.diff +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DENABLE_DOCS=OFF + -DENABLE_EXAMPLES=OFF + -DENABLE_TESTDATA=OFF + -DENABLE_TESTS=OFF + -DENABLE_TOOLS=OFF +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +# Move cmake configs +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +# Remove duplicate files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/aom/vcpkg.json b/ports/aom/vcpkg.json new file mode 100644 index 00000000000000..39edcf982d16ae --- /dev/null +++ b/ports/aom/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "aom", + "version-semver": "3.1.2", + "description": "AV1 codec library", + "homepage": "https://aomedia.googlesource.com/aom", + "supports": "!uwp & !arm", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/approval-tests-cpp/portfile.cmake b/ports/approval-tests-cpp/portfile.cmake new file mode 100644 index 00000000000000..b6b55b28e762dd --- /dev/null +++ b/ports/approval-tests-cpp/portfile.cmake @@ -0,0 +1,14 @@ +vcpkg_download_distfile(single_header + URLS https://github.com/approvals/ApprovalTests.cpp/releases/download/v.10.12.0/ApprovalTests.v.10.12.0.hpp + FILENAME ApprovalTests.v.10.12.0.hpp + SHA512 a6a5030cc4f438f218bb55c25124ed3df749d36a0f032ff21b3a68ee4334eb4562944a0f5f73d0c253d674517f8a819349371e248eca271ce5577236f1598b8c +) + +vcpkg_download_distfile(license_file + URLS https://raw.githubusercontent.com/approvals/ApprovalTests.cpp/v.10.12.0/LICENSE + FILENAME ApprovalTestsLicense.v.10.12.0 + SHA512 dc6b68d13b8cf959644b935f1192b02c71aa7a5cf653bd43b4480fa89eec8d4d3f16a2278ec8c3b40ab1fdb233b3173a78fd83590d6f739e0c9e8ff56c282557 +) + +file(INSTALL "${single_header}" DESTINATION "${CURRENT_PACKAGES_DIR}/include" RENAME ApprovalTests.hpp) +file(INSTALL "${license_file}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/approval-tests-cpp/vcpkg.json b/ports/approval-tests-cpp/vcpkg.json new file mode 100644 index 00000000000000..1c6ad01bb0d61f --- /dev/null +++ b/ports/approval-tests-cpp/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "approval-tests-cpp", + "version": "10.12.0", + "description": "Approval Tests allow you to verify a chunk of output (such as a file) in one operation as opposed to writing test assertions for each element.", + "homepage": "https://github.com/approvals/ApprovalTests.cpp" +} diff --git a/ports/apr-util/CONTROL b/ports/apr-util/CONTROL deleted file mode 100644 index 8dcd5af03f103e..00000000000000 --- a/ports/apr-util/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: apr-util -Version: 1.6.0-3 -Homepage: https://apr.apache.org/ -Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation -Build-Depends: expat, apr, openssl diff --git a/ports/apr-util/apr.patch b/ports/apr-util/apr.patch index 5a61cb9f9813b6..581907fffe2b1f 100644 --- a/ports/apr-util/apr.patch +++ b/ports/apr-util/apr.patch @@ -3,11 +3,11 @@ index 69e45541..19b86129 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") - MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") - ENDIF() - FOREACH(onelib ${APR_LIBRARIES}) -- IF(NOT EXISTS ${onelib}) -+ IF(${onelib} MATCHES "NOTFOUND") - MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.") - ENDIF() - ENDFOREACH() + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") + ENDIF() + FOREACH(onelib ${APR_LIBRARIES}) +- IF(NOT EXISTS ${onelib}) ++ IF(${onelib} MATCHES "NOTFOUND") + MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.") + ENDIF() + ENDFOREACH() diff --git a/ports/apr-util/portfile.cmake b/ports/apr-util/portfile.cmake index 0b1c2835103bb4..1065bdb7234c0c 100644 --- a/ports/apr-util/portfile.cmake +++ b/ports/apr-util/portfile.cmake @@ -1,47 +1,83 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-util-1.6.0) vcpkg_download_distfile(ARCHIVE - URLS "https://archive.apache.org/dist/apr/apr-util-1.6.0-win32-src.zip" - FILENAME "apr-util-1.6.0-win32-src.zip" - SHA512 98679ea181d3132020713481703bbefa0c174e0b2a0df65dfdd176e9771935e1f9455c4242bac19dded9414abe2b9d293fcc674ab16f96d8987bcf26346fce3a + URLS "http://archive.apache.org/dist/apr/apr-util-1.6.1.tar.bz2" + FILENAME "apr-util-1.6.1.tar.bz2" + SHA512 40eff8a37c0634f7fdddd6ca5e596b38de15fd10767a34c30bbe49c632816e8f3e1e230678034f578dd5816a94f246fb5dfdf48d644829af13bf28de3225205d + ) -vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + use-vcpkg-expat.patch + apr.patch + ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - use-vcpkg-expat.patch - apr.patch -) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(APU_DECLARE_EXPORT ON) + set(APU_DECLARE_STATIC OFF) + else() + set(APU_DECLARE_EXPORT OFF) + set(APU_DECLARE_STATIC ON) + endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DAPU_DECLARE_EXPORT=ON - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + OPTIONS + -DAPU_DECLARE_EXPORT=${APU_DECLARE_EXPORT} + -DAPU_DECLARE_STATIC=${APU_DECLARE_STATIC} + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON ) -else() - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DAPU_DECLARE_STATIC=ON - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + + vcpkg_install_cmake() + vcpkg_copy_pdbs() + + file(READ ${CURRENT_PACKAGES_DIR}/include/apu.h APU_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "defined(APU_DECLARE_EXPORT)" "1" APU_H "${APU_H}") + else() + string(REPLACE "defined(APU_DECLARE_STATIC)" "1" APU_H "${APU_H}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/apu.h "${APU_H}") + +else(VCPKG_TARGET_IS_WINDOWS) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} ) -endif() -vcpkg_install_cmake() + # To cross-compile you will need a triplet file that locates the tool chain and sets --host and --cache parameters of "./configure". + # The ${VCPKG_PLATFORM_TOOLSET}.cache file must have been generated on the targeted host using "./configure -C". + # For example, to target aarch64-linux-gnu, triplets/aarch64-linux-gnu.cmake should contain (beyond the standard content): + # set(VCPKG_PLATFORM_TOOLSET aarch64-linux-gnu) + # set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${MY_CROSS_DIR}/cmake/Toolchain-${VCPKG_PLATFORM_TOOLSET}.cmake) + # set(CONFIGURE_PARAMETER_1 --host=${VCPKG_PLATFORM_TOOLSET}) + # set(CONFIGURE_PARAMETER_2 --cache-file=${MY_CROSS_DIR}/autoconf/${VCPKG_PLATFORM_TOOLSET}.cache) + if(CONFIGURE_PARAMETER_1) + message(STATUS "Configuring apr-util with ${CONFIGURE_PARAMETER_1} ${CONFIGURE_PARAMETER_2} ${CONFIGURE_PARAMETER_3}") + else() + message(STATUS "Configuring apr-util") + endif() -file(READ ${CURRENT_PACKAGES_DIR}/include/apu.h APU_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "defined(APU_DECLARE_EXPORT)" "1" APU_H "${APU_H}") -else() - string(REPLACE "defined(APU_DECLARE_STATIC)" "1" APU_H "${APU_H}") -endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/apu.h "${APU_H}") + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + NO_DEBUG + OPTIONS + "--prefix=${CURRENT_INSTALLED_DIR}" + "--with-apr=${CURRENT_INSTALLED_DIR}/tools/apr" + "--with-openssl=${CURRENT_INSTALLED_DIR}" + "-with-expat=${CURRENT_INSTALLED_DIR}" + "${CONFIGURE_PARAMETER_1}" + "${CONFIGURE_PARAMETER_2}" + "${CONFIGURE_PARAMETER_3}" + ) + vcpkg_install_make() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/apr-util RENAME copyright) +endif() -vcpkg_copy_pdbs() +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/apr-util/use-vcpkg-expat.patch b/ports/apr-util/use-vcpkg-expat.patch index 8bfe3e24e0b069..8a35f2bc56896d 100644 --- a/ports/apr-util/use-vcpkg-expat.patch +++ b/ports/apr-util/use-vcpkg-expat.patch @@ -1,128 +1,124 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 43fdf49..56424c3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -27,8 +27,9 @@ OPTION(APR_HAS_LDAP "LDAP support" ON) - OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) - OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) - OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) --SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files") --SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with") -+ -+find_path(APR_INCLUDE_DIR apr.h) -+find_library(APR_LIBRARIES NAMES libapr-1 apr-1) - - IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") - MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") -@@ -75,8 +76,8 @@ CONFIGURE_FILE(include/apu_want.hw - COPYONLY) - - # TBD: --# SET(XMLLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xml/expat/lib) --SET(XMLLIB_LIBRARIES libexpat) -+find_path(XMLLIB_INCLUDE_DIR expat.h) -+find_library(XMLLIB_LIBRARIES NAMES expat) - - SET(LDAP_LIBRARIES) - IF(APR_HAS_LDAP) -@@ -217,11 +218,11 @@ SET(APR_TEST_SOURCES - test/testxml.c - ) - --SET(EXPAT_SOURCES -- xml/expat/lib/xmlrole.c -- xml/expat/lib/xmltok.c -- xml/expat/lib/xmlparse.c --) -+# SET(EXPAT_SOURCES -+# xml/expat/lib/xmlrole.c -+# xml/expat/lib/xmltok.c -+# xml/expat/lib/xmlparse.c -+# ) - - SET(install_targets) - SET(install_bin_pdb) -@@ -230,21 +231,25 @@ SET(dbd_drivers) - # Note: The WINNT definition on some targets is used only by libaprutil.rc. - - # static expat (not installed) --ADD_LIBRARY(libexpat STATIC ${EXPAT_SOURCES}) --SET_TARGET_PROPERTIES(libexpat PROPERTIES COMPILE_DEFINITIONS "XML_STATIC;COMPILED_FROM_DSP") -+# ADD_LIBRARY(libexpat STATIC ${EXPAT_SOURCES}) -+# SET_TARGET_PROPERTIES(libexpat PROPERTIES COMPILE_DEFINITIONS "XML_STATIC;COMPILED_FROM_DSP") - - # libaprutil-1 is shared, aprutil-1 is static -+if(BUILD_SHARED_LIBS) - ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) - SET(install_targets ${install_targets} libaprutil-1) - SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) - TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) - SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT") - -+else() - ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) - SET(install_targets ${install_targets} aprutil-1) - TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) - SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") -+endif() - -+if(BUILD_SHARED_LIBS) - IF(APU_HAVE_CRYPTO) - IF(NOT OPENSSL_FOUND) - MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") -@@ -270,7 +275,7 @@ IF(APU_HAVE_ODBC) - ENDIF() - - IF(APR_HAS_LDAP) -- ADD_LIBRARY(apr_ldap-1 SHARED ldap/apr_ldap_init.c ldap/apr_ldap_option.c -+ ADD_LIBRARY(apr_ldap-1 SHARED ldap/apr_ldap_init.c ldap/apr_ldap_option.c - ldap/apr_ldap_rebind.c libaprutil.rc) - SET(install_targets ${install_targets} apr_ldap-1) - SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) -@@ -281,6 +286,7 @@ IF(APR_HAS_LDAP) - ELSE() - SET(apr_ldap_libraries) - ENDIF() -+endif() - - IF(APR_BUILD_TESTAPR) - ENABLE_TESTING() -@@ -288,13 +294,13 @@ IF(APR_BUILD_TESTAPR) - ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose) - - # copy data files to build directory so that we can run programs from there -- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory -+ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory - ${PROJECT_BINARY_DIR}/data) -- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different -+ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml - ${PROJECT_BINARY_DIR}/data/billion-laughs.xml) - -- IF(TEST_STATIC_LIBS) -+ IF(NOT BUILD_SHARED_LIBS) - SET(whichapr aprutil-1) - SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC") - ELSE() -@@ -330,13 +336,15 @@ INSTALL(TARGETS ${install_targets} - ARCHIVE DESTINATION lib - ) - --IF(INSTALL_PDB) -- INSTALL(FILES ${install_bin_pdb} -- DESTINATION bin -- CONFIGURATIONS RelWithDebInfo Debug) --ENDIF() -+# IF(INSTALL_PDB) -+# INSTALL(FILES ${install_bin_pdb} -+# DESTINATION bin -+# CONFIGURATIONS RelWithDebInfo Debug) -+# ENDIF() - --INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) -+if(NOT DISABLE_INSTALL_HEADERS) -+ INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) -+endif() - - STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) - MESSAGE(STATUS "") +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9ae90b1..71a50b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,16 +21,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + + FIND_PACKAGE(OpenSSL) + +-FIND_PACKAGE(expat) +- + OPTION(APU_HAVE_CRYPTO "Crypto support" OFF) + OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON) + OPTION(APR_HAS_LDAP "LDAP support" ON) + OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) + OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) + OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) +-SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files") +-SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with") ++find_path(APR_INCLUDE_DIR apr.h) ++find_library(APR_LIBRARIES NAMES libapr-1 apr-1) + + IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") +@@ -61,13 +59,13 @@ IF(APR_HAS_LDAP) + SET(apr_has_ldap_10 1) + ENDIF() + +-IF(NOT EXPAT_FOUND) ++find_package(expat) ++set(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS}) ++set(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES}) ++IF(NOT XMLLIB_LIBRARIES) + MESSAGE(FATAL_ERROR "Expat is required, and it wasn't found!") + ENDIF() + +-SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS}) +-SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES}) +- + SET(LDAP_LIBRARIES) + IF(APR_HAS_LDAP) + SET(LDAP_LIBRARIES wldap32) +@@ -229,17 +227,21 @@ SET(dbd_drivers) + # Note: The WINNT definition on some targets is used only by libaprutil.rc. + + # libaprutil-1 is shared, aprutil-1 is static ++if(BUILD_SHARED_LIBS) + ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) + SET(install_targets ${install_targets} libaprutil-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) + TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) +-SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT") ++SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_IMPORT;XML_STATIC;WINNT") + ++else(BUILD_SHARED_LIBS) + ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) + SET(install_targets ${install_targets} aprutil-1) + TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) + SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") ++endif(BUILD_SHARED_LIBS) + ++if(BUILD_SHARED_LIBS) + IF(APU_HAVE_CRYPTO) + IF(NOT OPENSSL_FOUND) + MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") +@@ -249,7 +251,7 @@ IF(APU_HAVE_CRYPTO) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb) + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}") + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") +- SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_crypto_openssl") ++ SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_crypto_openssl") + TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES}) + ENDIF() + +@@ -260,8 +262,8 @@ IF(APU_HAVE_ODBC) + SET(dbd_drivers ${dbd_drivers} odbc) + TARGET_LINK_LIBRARIES(apr_dbd_odbc-1 libaprutil-1 ${APR_LIBRARIES} odbc32 odbccp32) + SET_PROPERTY(TARGET apr_dbd_odbc-1 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_odbc_driver) +- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;APU_DSO_MODULE_BUILD;WINNT") +- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_dbd_odbc") ++ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_IMPORT;APR_DECLARE_IMPORT;APU_DSO_MODULE_BUILD;WINNT") ++ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_dbd_odbc") + ENDIF() + + IF(APR_HAS_LDAP) +@@ -271,11 +273,12 @@ IF(APR_HAS_LDAP) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) + TARGET_LINK_LIBRARIES(apr_ldap-1 libaprutil-1 ${APR_LIBRARIES} ${LDAP_LIBRARIES}) + SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") +- SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_ldap") ++ SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_ldap") + SET(apr_ldap_libraries apr_ldap-1) + ELSE() + SET(apr_ldap_libraries) + ENDIF() ++endif(BUILD_SHARED_LIBS) + + IF(APR_BUILD_TESTAPR) + ENABLE_TESTING() +@@ -289,7 +292,7 @@ IF(APR_BUILD_TESTAPR) + ${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml + ${PROJECT_BINARY_DIR}/data/billion-laughs.xml) + +- IF(TEST_STATIC_LIBS) ++ IF(NOT BUILD_SHARED_LIBS) + SET(whichapr aprutil-1) + SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC") + ELSE() +@@ -325,13 +328,9 @@ INSTALL(TARGETS ${install_targets} + ARCHIVE DESTINATION lib + ) + +-IF(INSTALL_PDB) +- INSTALL(FILES ${install_bin_pdb} +- DESTINATION bin +- CONFIGURATIONS RelWithDebInfo Debug) +-ENDIF() +- +-INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) ++if(NOT DISABLE_INSTALL_HEADERS) ++ INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) ++endif() + + STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) + MESSAGE(STATUS "") diff --git a/ports/apr-util/vcpkg.json b/ports/apr-util/vcpkg.json new file mode 100644 index 00000000000000..aa7937210aa20c --- /dev/null +++ b/ports/apr-util/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "apr-util", + "version-string": "1.6.1", + "port-version": 4, + "description": "Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation", + "homepage": "https://apr.apache.org/", + "dependencies": [ + "apr", + "expat", + "openssl" + ] +} diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL deleted file mode 100644 index 41c7c453ac4635..00000000000000 --- a/ports/apr/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: apr -Version: 1.6.5-2 -Homepage: https://apr.apache.org/ -Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. - -Feature: private-headers -Description: Install non-standard files required for building Apache httpd diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index 6ef062bf368256..3b9bed66415f1c 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -2,58 +2,91 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() -include(vcpkg_common_functions) +set(VERSION 1.7.0) -set(VERSION 1.6.5) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-${VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://www.apache.org/dist/apr/apr-${VERSION}.tar.bz2" FILENAME "apr-${VERSION}.tar.bz2" - SHA512 d3511e320457b5531f565813e626e7941f6b82864852db6aa03dd298a65dbccdcdc4bd580f5314f8be45d268388edab25efe88cf8340b7d2897a4dbe9d0a41fc + SHA512 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148 ) -vcpkg_extract_source_archive(${ARCHIVE}) -if("private-headers" IN_LIST FEATURES) - set(INSTALL_PRIVATE_H ON) -else() - set(INSTALL_PRIVATE_H OFF) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DINSTALL_PDB=OFF - -DMIN_WINDOWS_VER=Windows7 - -DAPR_HAVE_IPV6=ON - -DAPR_INSTALL_PRIVATE_H=${INSTALL_PRIVATE_H} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} ) -vcpkg_install_cmake() +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + private-headers INSTALL_PRIVATE_H + ) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DINSTALL_PDB=OFF + -DMIN_WINDOWS_VER=Windows7 + -DAPR_HAVE_IPV6=ON + -DAPR_INSTALL_PRIVATE_H=${INSTALL_PRIVATE_H} + ${FEATURE_OPTIONS} + ) -# There is no way to suppress installation of the headers in debug builds. -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + vcpkg_install_cmake() -# Both dynamic and static are built, so keep only the one needed -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/apr-1.lib - ${CURRENT_PACKAGES_DIR}/lib/aprapp-1.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/apr-1.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/aprapp-1.lib) + # There is no way to suppress installation of the headers in debug builds. + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + # Both dynamic and static are built, so keep only the one needed + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/apr-1.lib + ${CURRENT_PACKAGES_DIR}/lib/aprapp-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/apr-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/aprapp-1.lib) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libapr-1.lib + ${CURRENT_PACKAGES_DIR}/lib/libaprapp-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libapr-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libaprapp-1.lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + + vcpkg_copy_pdbs() else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libapr-1.lib - ${CURRENT_PACKAGES_DIR}/lib/libaprapp-1.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/libapr-1.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/libaprapp-1.lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + # To cross-compile you will need a triplet file that locates the tool chain and sets --host and --cache parameters of "./configure". + # The ${VCPKG_PLATFORM_TOOLSET}.cache file must have been generated on the targeted host using "./configure -C". + # For example, to target aarch64-linux-gnu, triplets/aarch64-linux-gnu.cmake should contain (beyond the standard content): + # set(VCPKG_PLATFORM_TOOLSET aarch64-linux-gnu) + # set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${MY_CROSS_DIR}/cmake/Toolchain-${VCPKG_PLATFORM_TOOLSET}.cmake) + # set(CONFIGURE_PARAMETER_1 --host=${VCPKG_PLATFORM_TOOLSET}) + # set(CONFIGURE_PARAMETER_2 --cache-file=${MY_CROSS_DIR}/autoconf/${VCPKG_PLATFORM_TOOLSET}.cache) + if(CONFIGURE_PARAMETER_1) + message(STATUS "Configuring apr with ${CONFIGURE_PARAMETER_1} ${CONFIGURE_PARAMETER_2} ${CONFIGURE_PARAMETER_3}") + else() + message(STATUS "Configuring apr") + endif() + set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + NO_DEBUG + OPTIONS + "--prefix=${CURRENT_INSTALLED_DIR}" + "${CONFIGURE_PARAMETER_1}" + "${CONFIGURE_PARAMETER_2}" + "${CONFIGURE_PARAMETER_3}" + ) + + vcpkg_install_make() + + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/apr-1.pc + "-lapr-\${APR_MAJOR_VERSION}" "-lapr-1" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/lib/pkgconfig/apr-1.pc + "-lapr-\${APR_MAJOR_VERSION}" "-lapr-1" + ) + vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread rt dl uuid crypt) endif() # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/apr) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/apr/LICENSE ${CURRENT_PACKAGES_DIR}/share/apr/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -vcpkg_copy_pdbs() diff --git a/ports/apr/vcpkg.json b/ports/apr/vcpkg.json new file mode 100644 index 00000000000000..91fb9c71307363 --- /dev/null +++ b/ports/apr/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "apr", + "version": "1.7.0", + "port-version": 4, + "description": "The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems.", + "homepage": "https://apr.apache.org/", + "supports": "!uwp", + "features": { + "private-headers": { + "description": "Install non-standard files required for building Apache httpd" + } + } +} diff --git a/ports/apsi/portfile.cmake b/ports/apsi/portfile.cmake new file mode 100644 index 00000000000000..95f63b17bd0323 --- /dev/null +++ b/ports/apsi/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if("hexl" IN_LIST FEATURES) + vcpkg_fail_port_install(ON_ARCH "x86" "arm" "arm64") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/APSI + REF 7fbeefbd42f4884da95073d40de22ba46fc0f1f5 + SHA512 dfa4b7571b355646004d5b8823f250b56cda6e84d348a6a013f45fbf5c119e49bda28ac8a75f8ec06738814c50e34e66805994c7bc780ddfd57cc2067ffa745a + HEAD_REF main +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + log4cplus APSI_USE_LOG4CPLUS + zeromq APSI_USE_ZMQ +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + OPTIONS + "-DAPSI_BUILD_TESTS=OFF" + "-DAPSI_BUILD_CLI=OFF" + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME "APSI" CONFIG_PATH "lib/cmake/APSI-0.3") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") + +vcpkg_copy_pdbs() diff --git a/ports/apsi/vcpkg.json b/ports/apsi/vcpkg.json new file mode 100644 index 00000000000000..e3416047304d22 --- /dev/null +++ b/ports/apsi/vcpkg.json @@ -0,0 +1,57 @@ +{ + "name": "apsi", + "version-semver": "0.3.1", + "description": "APSI is a research library for asymmetric private set intersection.", + "homepage": "https://github.com/microsoft/APSI", + "supports": "static", + "dependencies": [ + "flatbuffers", + "jsoncpp", + "kuku", + { + "name": "seal", + "features": [ + "no-throw-tran" + ] + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "log4cplus", + "zeromq" + ], + "features": { + "hexl": { + "description": "Use Intel® HEXL to accelerate Microsoft SEAL.", + "dependencies": [ + { + "name": "seal", + "features": [ + "hexl", + "no-throw-tran" + ], + "platform": "x64" + } + ] + }, + "log4cplus": { + "description": "Use log4cplus for logging.", + "dependencies": [ + "log4cplus" + ] + }, + "zeromq": { + "description": "Use ZeroMQ for networking.", + "dependencies": [ + "cppzmq" + ] + } + } +} diff --git a/ports/arb/CONTROL b/ports/arb/CONTROL deleted file mode 100644 index 02baf69b8c9ea0..00000000000000 --- a/ports/arb/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: arb -Version: 2.16.0 -Homepage: https://github.com/fredrik-johansson/arb -Description: a C library for arbitrary-precision interval arithmetic -Build-Depends: flint diff --git a/ports/arb/fix-build-error.patch b/ports/arb/fix-build-error.patch deleted file mode 100644 index 7ed2428cfcd5b7..00000000000000 --- a/ports/arb/fix-build-error.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/acb_dirichlet/stieltjes.c b/acb_dirichlet/stieltjes.c -index ad6937b..4ca9690 100644 ---- a/acb_dirichlet/stieltjes.c -+++ b/acb_dirichlet/stieltjes.c -@@ -340,16 +340,16 @@ stieltjes_mag(double n) - return t; - } - --static double _hypot(double x, double y) { return sqrt(x * x + y * y); } -+static double __hypot(double x, double y) { return sqrt(x * x + y * y); } - - /* log2 magnitude of integrand at z = x+yi; alpha = a+bi */ - static double - integrand_mag(double n, double x, double y, double a, double b) - { - double t, u; -- t = log(_hypot(a - y, b + x)); -+ t = log(__hypot(a - y, b + x)); - u = atan2(b + x, a - y); -- t = log(_hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x; -+ t = log(__hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x; - return t * 1.44269504088896341; - } - diff --git a/ports/arb/portfile.cmake b/ports/arb/portfile.cmake index 3c119628353677..d4a984b3c7fd44 100644 --- a/ports/arb/portfile.cmake +++ b/ports/arb/portfile.cmake @@ -1,14 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fredrik-johansson/arb - REF 2.16.0 - SHA512 171c965aeb03cd2830df8a53990403c6da480a94d44385dadfbb2d02697f7c03e8b9a217094b0ad93f796d889a1564f4b9ae9db35ef9de90f61bb2e3220911be + REF ae6009e3e19bd309a2433467d1b2ddb7001cd1eb # 2.18.1 + SHA512 78e149f0d51ef8ab29afbad99fd24e3b59acfc509f626e89bdcd57d4a8478b84c3aa51e92f5e26f8a10a20c66d72d2eed50f0dfbfda4a5f5277988f9bac3fa48 HEAD_REF master - PATCHES fix-build-error.patch ) file(REMOVE ${SOURCE_PATH}/CMakeLists.txt) @@ -26,4 +23,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/arb RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/arb/vcpkg.json b/ports/arb/vcpkg.json new file mode 100644 index 00000000000000..142abb7b9bc502 --- /dev/null +++ b/ports/arb/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "arb", + "version-string": "2.18.1", + "port-version": 1, + "description": "a C library for arbitrary-precision interval arithmetic", + "homepage": "https://github.com/fredrik-johansson/arb", + "dependencies": [ + "flint" + ] +} diff --git a/ports/arcus/portfile.cmake b/ports/arcus/portfile.cmake new file mode 100644 index 00000000000000..d22a64d30bd114 --- /dev/null +++ b/ports/arcus/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Ultimaker/libArcus + REF 617f6f71572090f73cb44592b12f49567b539e5b #v4.10.0 + SHA512 cf0954d8b10d9f94165aa5c086d0e58c2925464f9fbe4252535c36d7e6bb12b767d89efb816c9e642f9cd7f0ec0d66d61ca21c5121a05340499d38d5d851f73b + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_PYTHON=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_STATIC=${ENABLE_STATIC} +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(PACKAGE_NAME Arcus CONFIG_PATH lib/cmake/Arcus) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) \ No newline at end of file diff --git a/ports/arcus/vcpkg.json b/ports/arcus/vcpkg.json new file mode 100644 index 00000000000000..bb3d46b35c32b2 --- /dev/null +++ b/ports/arcus/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "arcus", + "version-semver": "4.10.0", + "description": "This library contains C++ bindings for creating a socket in a thread and using this socket to send and receive messages based on the Protocol Buffers library.", + "homepage": "https://github.com/Ultimaker/libArcus", + "supports": "!uwp", + "dependencies": [ + "protobuf", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/argagg/CONTROL b/ports/argagg/CONTROL deleted file mode 100644 index d4265021d52621..00000000000000 --- a/ports/argagg/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: argagg -Version: 2019-01-25 -Description: A simple C++11 command line argument parser diff --git a/ports/argagg/portfile.cmake b/ports/argagg/portfile.cmake index 1f7ed54de5b760..54d32171adac65 100644 --- a/ports/argagg/portfile.cmake +++ b/ports/argagg/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vietjtnguyen/argagg - REF e678cebf90d8f132f5e54f19c6b95b75e655226c - SHA512 10085caaf9bfb507ae7117b61bfe6174dc2af91c347393c3cbb994fe5b824d4b439e1e0d2e2580dc34568d8046529acc211f76863be047d05d3845e9ff19ccbf + REF 0.4.6 + SHA512 7d8cf04a7c679518f01120830637c68719dd67a765457789eb4afedbead7be9efadc6bcdf640999329aaaf8659a5e5d1896f66587068cc668a7c49703aca3070 HEAD_REF master ) diff --git a/ports/argagg/vcpkg.json b/ports/argagg/vcpkg.json new file mode 100644 index 00000000000000..73dc92e5d6d58c --- /dev/null +++ b/ports/argagg/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "argagg", + "version-string": "0.4.6", + "port-version": 1, + "description": "A simple C++11 command line argument parser" +} diff --git a/ports/argh/CONTROL b/ports/argh/CONTROL deleted file mode 100644 index db804708f68e3f..00000000000000 --- a/ports/argh/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: argh -Version: 2018-12-18-1 -Description: Argh! A minimalist argument handler. diff --git a/ports/argh/portfile.cmake b/ports/argh/portfile.cmake index 40e7fbc8411763..ccaec1449ee011 100644 --- a/ports/argh/portfile.cmake +++ b/ports/argh/portfile.cmake @@ -1,13 +1,13 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO adishavit/argh REF a1edee559757e076e570b8f6c2f555d8d00b373c SHA512 a100c7ff20ef9ed39d53efeac5507a6ed59fb99ccba36ac4b5f8f5aaac6782f8e951b2f26b9b50f6c6fdbc53b5bceaabbb9dd9b9539f968fc1037733342e17a6 HEAD_REF master + PATCHES + remove_unnamespaced_license_file.patch # https://github.com/adishavit/argh/pull/51 ) vcpkg_configure_cmake( @@ -32,6 +32,3 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/README.md) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/argh/remove_unnamespaced_license_file.patch b/ports/argh/remove_unnamespaced_license_file.patch new file mode 100644 index 00000000000000..f6742c86c634b5 --- /dev/null +++ b/ports/argh/remove_unnamespaced_license_file.patch @@ -0,0 +1,67 @@ +From 83f364a2eb1b137453772ae9fcf5d7973770637f Mon Sep 17 00:00:00 2001 +From: Billy Robert O'Neal III +Date: Wed, 29 Apr 2020 13:01:31 -0700 +Subject: [PATCH] Don't install 'LICENSE' or 'README.md' directly to the + installation directory. + +This change unconditionally uses GNUInstallDirs which will correctly 'namespace' these files with the 'argh' project name. + +========= + +The names 'LICENSE' and 'README.md' are extremely common and likely to be taken by other ports. This happened in a recent full vcpkg catalog rebuild: + +Starting package 757/1254: qt-advanced-docking-system:x86-windows +Building package qt-advanced-docking-system[core]:x86-windows... +Could not locate cached archive: C:\agent\_work\1\s\archives\a1\a1507296ead5788137561997571557204aaac78f.zip +-- Downloading https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/archive/661d0c4356ab61d155b53718aa1bf6bab86dad13.tar.gz... +-- Extracting source C:/agent/_work/1/s/downloads/githubuser0xFFFF-Qt-Advanced-Docking-System-661d0c4356ab61d155b53718aa1bf6bab86dad13.tar.gz +-- Applying patch config_changes.patch +-- Using source at C:/agent/_work/1/s/buildtrees/qt-advanced-docking-system/src/bab86dad13-3088149a9b +-- Configuring x86-windows +-- Building x86-windows-dbg +-- Building x86-windows-rel +-- Installing: C:/agent/_work/1/s/packages/qt-advanced-docking-system_x86-windows/share/qt-advanced-docking-system/copyright +-- Performing post-build validation +-- Performing post-build validation done +Stored binary cache: C:\agent\_work\1\s\archives\a1\a1507296ead5788137561997571557204aaac78f.zip +Building package qt-advanced-docking-system[core]:x86-windows... done +Installing package qt-advanced-docking-system[core]:x86-windows... +The following files are already installed in C:/agent/_work/1/s/installed/x86-windows and are in conflict with qt-advanced-docking-system:x86-windows + +Installed by argh:x86-windows + license/LICENSE + +Elapsed time for package qt-advanced-docking-system:x86-windows: 11.09 s +--- + CMakeLists.txt | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 13bc879..f6264f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,19 +36,17 @@ endif() + + install(TARGETS argh EXPORT arghTargets) + ++include(GNUInstallDirs) ++install(FILES "${CMAKE_CURRENT_LIST_DIR}/argh.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++install(FILES "${CMAKE_CURRENT_LIST_DIR}/README.md" DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++ + if(CMAKE_SYSTEM_NAME STREQUAL Linux) + # this might be a bit too restrictive, since for other (BSD, ...) this might apply also + # but this can be fixed later in extra pull requests from people on the platform +- include(GNUInstallDirs) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/argh.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR}) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/README.md" DESTINATION ${CMAKE_INSTALL_DOCDIR}) + install(FILES argh-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/argh) + install(EXPORT arghTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/argh) + else() +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/argh.h" DESTINATION include) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION license) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/README.md" DESTINATION .) + install(FILES argh-config.cmake DESTINATION CMake) + install(EXPORT arghTargets DESTINATION CMake) + endif() diff --git a/ports/argh/vcpkg.json b/ports/argh/vcpkg.json new file mode 100644 index 00000000000000..38835e1cd37936 --- /dev/null +++ b/ports/argh/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "argh", + "version-string": "2018-12-18", + "port-version": 3, + "description": "Argh! A minimalist argument handler." +} diff --git a/ports/argparse/CONTROL b/ports/argparse/CONTROL deleted file mode 100644 index c7c33adac9a965..00000000000000 --- a/ports/argparse/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: argparse -Version: 2019-06-10 -Description: Argument parser for modern C++ -Homepage: https://github.com/p-ranav/argparse diff --git a/ports/argparse/portfile.cmake b/ports/argparse/portfile.cmake index 0ad21e10afb0d3..a313a920ed4526 100644 --- a/ports/argparse/portfile.cmake +++ b/ports/argparse/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO p-ranav/argparse - REF 2c71311b5fa49b7d65e6628375f2748d58830856 - SHA512 08a28a3fb424befe7df9a428fbad8e2687a1b331d7099bfaca2c3e04d8d4b4888e99d481226407bf90bfce282388545b09e4125128215cc95dc56fb313641bf6 + REF 9903a22904fed8176c4a1f69c4b691304b23c78e #2021-03-04 + SHA512 da50761471341d558ed0c336bf78f80a704ec25c15ace23fb3a92d81ddbf2e4c2fd4f6c4226f088382f41418d58d5ef9b57cdd6e9689be5d83dba6adb2ac0aba HEAD_REF master ) @@ -25,6 +23,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/argparse/vcpkg.json b/ports/argparse/vcpkg.json new file mode 100644 index 00000000000000..7e6be41e7d5a5f --- /dev/null +++ b/ports/argparse/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "argparse", + "version-date": "2021-03-04", + "description": "Argument parser for modern C++", + "homepage": "https://github.com/p-ranav/argparse", + "license": "MIT" +} diff --git a/ports/args/CONTROL b/ports/args/CONTROL deleted file mode 100644 index 8d9d88a5008100..00000000000000 --- a/ports/args/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: args -Version: 2019-05-01 -Homepage: https://github.com/Taywee/args -Description: A simple header-only C++ argument parser library. diff --git a/ports/args/portfile.cmake b/ports/args/portfile.cmake index a05612ba8b8e47..bb1b755069a053 100644 --- a/ports/args/portfile.cmake +++ b/ports/args/portfile.cmake @@ -1,28 +1,24 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Taywee/args - REF 623e52cb128cfc572ad4e79de8d5f8861d13d017 - SHA512 b951caed125fd937549db6702de8615eac0f380026ea4de5937721143b0929f5aa47ecc8068b7d9689822d303b25d6350f00a8e6346a53d51a0ea40872488533 + REF ae22269df734a2b0957a9ab4e37be41f61866dbe + SHA512 fe44bc6b7b81013ce649e3fa33c3d9503747a3c9044b70cf9eaf8ff780f2feabdabc261a33d29042daec19a598e3d60e318d3d415cbffb5fdcd2aabdd2ef39db HEAD_REF master ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DARGS_BUILD_UNITTESTS=OFF -DARGS_BUILD_EXAMPLE=OFF ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/args) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/args/LICENSE ${CURRENT_PACKAGES_DIR}/share/args/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) diff --git a/ports/args/vcpkg.json b/ports/args/vcpkg.json new file mode 100644 index 00000000000000..6fa75ad63650b1 --- /dev/null +++ b/ports/args/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "args", + "version-date": "2021-03-14", + "description": "A simple header-only C++ argument parser library.", + "homepage": "https://github.com/Taywee/args", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/argtable2/0001-fix-install-dirs.patch b/ports/argtable2/0001-fix-install-dirs.patch new file mode 100644 index 00000000000000..d852ffa624bbe4 --- /dev/null +++ b/ports/argtable2/0001-fix-install-dirs.patch @@ -0,0 +1,35 @@ +From 6594abbd953d0e26105fd6c982990eb702f27804 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:22:00 -0700 +Subject: [PATCH 1/2] fix install dirs + +--- + src/CMakeLists.txt | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 773c4c8..03e112c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,5 +1,4 @@ +-# for now, install in subdirectory of source directory by default +-SET( CMAKE_INSTALL_PREFIX .. ) ++include(GNUInstallDirs) + + IF( WIN32 ) + ADD_LIBRARY( argtable2 arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) +@@ -7,5 +6,9 @@ ELSE( WIN32 ) + ADD_LIBRARY( argtable2 arg_date.c arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_rex.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) + ENDIF( WIN32 ) + +-INSTALL( TARGETS argtable2 ARCHIVE DESTINATION lib) +-SET_TARGET_PROPERTIES( argtable2 PROPERTIES DEBUG_POSTFIX d ) ++INSTALL(TARGETS argtable2 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++INSTALL(FILES argtable2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +-- +2.24.3 (Apple Git-128) + diff --git a/ports/argtable2/0002-include-correct-headers.patch b/ports/argtable2/0002-include-correct-headers.patch new file mode 100644 index 00000000000000..f2e4d5f5ab1231 --- /dev/null +++ b/ports/argtable2/0002-include-correct-headers.patch @@ -0,0 +1,60 @@ +From 271423adb2900c8bf4aad5d73d7ef1efbb5c35d8 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:17:18 -0700 +Subject: [PATCH 2/2] include correct headers + +--- + src/arg_date.c | 4 +++- + src/arg_int.c | 1 + + src/getopt.c | 1 + + 3 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/arg_date.c b/src/arg_date.c +index 22b59e2..5004b42 100644 +--- a/src/arg_date.c ++++ b/src/arg_date.c +@@ -37,6 +37,8 @@ USA. + #include + #endif + ++#include ++ + #include "argtable2.h" + + /* local error codes */ +@@ -112,7 +114,7 @@ static void errorfn(struct arg_date *parent, FILE *fp, int errorcode, const char + char buff[200]; + + fprintf(fp,"illegal timestamp format \"%s\"\n",argval); +- bzero(&tm,sizeof(tm)); ++ memset(&tm, 0, sizeof(tm)); + strptime("1999-12-31 23:59:59","%F %H:%M:%S",&tm); + strftime(buff, sizeof(buff), parent->format, &tm); + printf("correct format is \"%s\"\n", buff); +diff --git a/src/arg_int.c b/src/arg_int.c +index 29c20e5..bc10012 100644 +--- a/src/arg_int.c ++++ b/src/arg_int.c +@@ -30,6 +30,7 @@ USA. + + #include "argtable2.h" + #include ++#include + + /* local error codes */ + enum {EMINCOUNT=1,EMAXCOUNT,EBADINT,EOVERFLOW}; +diff --git a/src/getopt.c b/src/getopt.c +index b208529..b13acc6 100644 +--- a/src/getopt.c ++++ b/src/getopt.c +@@ -47,6 +47,7 @@ + #endif + + #include ++#include + + /* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C +-- +2.24.3 (Apple Git-128) + diff --git a/ports/argtable2/CONTROL b/ports/argtable2/CONTROL deleted file mode 100644 index df44602ee97ace..00000000000000 --- a/ports/argtable2/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: argtable2 -Version: 2.13-2 -Description: Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss. diff --git a/ports/argtable2/fix-install-dirs.patch b/ports/argtable2/fix-install-dirs.patch deleted file mode 100644 index cc1b9254331a37..00000000000000 --- a/ports/argtable2/fix-install-dirs.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 3427487..a9b8be0 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -1,5 +1,4 @@ --# for now, install in subdirectory of source directory by default --SET( CMAKE_INSTALL_PREFIX .. ) -+include(GNUInstallDirs) - - IF( WIN32 ) - ADD_LIBRARY( argtable2 arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) -@@ -7,5 +6,9 @@ ELSE( WIN32 ) - ADD_LIBRARY( argtable2 arg_date.c arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_rex.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) - ENDIF( WIN32 ) - --INSTALL( TARGETS argtable2 ARCHIVE DESTINATION lib) --SET_TARGET_PROPERTIES( argtable2 PROPERTIES DEBUG_POSTFIX d ) -\ No newline at end of file -+INSTALL(TARGETS argtable2 -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+) -+INSTALL(FILES argtable2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/ports/argtable2/portfile.cmake b/ports/argtable2/portfile.cmake index 4cbec1278b3048..cf394f65a8e6a3 100644 --- a/ports/argtable2/portfile.cmake +++ b/ports/argtable2/portfile.cmake @@ -1,33 +1,26 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/argtable2-13) -vcpkg_download_distfile(ARCHIVE - URLS "http://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz" - FILENAME "argtable-2.13.zip" - SHA512 3d8303f3ba529e3241d918c0127a16402ece951efb964d14a06a3a7d29a252812ad3c44e96da28798871e9923e73a2cfe7ebc84139c1397817d632cae25c4585 -) - -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-dirs.patch" -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DCMAKE_DEBUG_POSTFIX=d -) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -# Remove duplicate include installs -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/argtable2 RENAME copyright) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO argtable/argtable + REF argtable-2.13 + FILENAME "argtable2-13.tar.gz" + SHA512 3d8303f3ba529e3241d918c0127a16402ece951efb964d14a06a3a7d29a252812ad3c44e96da28798871e9923e73a2cfe7ebc84139c1397817d632cae25c4585 + PATCHES + 0001-fix-install-dirs.patch + 0002-include-correct-headers.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/argtable2/vcpkg.json b/ports/argtable2/vcpkg.json new file mode 100644 index 00000000000000..54431fc6271f29 --- /dev/null +++ b/ports/argtable2/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "argtable2", + "version-string": "2.13", + "port-version": 9, + "description": "Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss.", + "homepage": "http://argtable.sourceforge.net", + "supports": "!uwp" +} diff --git a/ports/argtable3/portfile.cmake b/ports/argtable3/portfile.cmake new file mode 100644 index 00000000000000..5cb94bc151a9f6 --- /dev/null +++ b/ports/argtable3/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/argtable/argtable3/releases/download/v3.2.1.52f24e5/argtable-v3.2.1.52f24e5.tar.gz" + FILENAME "argtable-v3.2.1.52f24e5.tar.gz" + SHA512 cec77d56048b38bb7af8553cb660e745972bbd90378eeea4e928579af78190c8a41fdb29c972263e18955e3a497e09c42f705f7c4d548c3c523c5cb104c97a10 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DARGTABLE3_ENABLE_CONAN=OFF + -DARGTABLE3_ENABLE_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/argtable3/vcpkg.json b/ports/argtable3/vcpkg.json new file mode 100644 index 00000000000000..d28ccb74573c56 --- /dev/null +++ b/ports/argtable3/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "argtable3", + "version-string": "3.2.1", + "description": "A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options", + "homepage": "www.argtable.org" +} diff --git a/ports/argumentum/portfile.cmake b/ports/argumentum/portfile.cmake new file mode 100755 index 00000000000000..52d7d1c7420ae7 --- /dev/null +++ b/ports/argumentum/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mmahnic/argumentum + REF v0.3.1 + SHA512 96f3a2077dacabf95d06120e24a50147b153090ddb0b6da17c960f8fe6724567bcd3337409f4729e1d8d15058550ed9f34a861da16fb6c999207554154e411c1 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DARGUMENTUM_BUILD_EXAMPLES=OFF + -DARGUMENTUM_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Argumentum) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/ports/argumentum/vcpkg.json b/ports/argumentum/vcpkg.json new file mode 100644 index 00000000000000..282dbf6d3affc0 --- /dev/null +++ b/ports/argumentum/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "argumentum", + "version-string": "0.3.1", + "port-version": 1, + "description": "A C++17 command line argument parser inspired by Python argparse", + "homepage": "https://github.com/mmahnic/argumentum" +} diff --git a/ports/aricpp/portfile.cmake b/ports/aricpp/portfile.cmake new file mode 100644 index 00000000000000..816a9e6f46f02f --- /dev/null +++ b/ports/aricpp/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO daniele77/aricpp + REF v1.1.1 + SHA512 b1e02b9ba9afc1f3315e238cd61b98a8d28eee08ddbaccaf171aa77d27ecec2b3abfaa5aae6905f9c2a1c83b0095a135f2186c977a0ae0cfafb48e3690814183 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/aricpp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/aricpp/vcpkg.json b/ports/aricpp/vcpkg.json new file mode 100644 index 00000000000000..ee76880bff46a3 --- /dev/null +++ b/ports/aricpp/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "aricpp", + "version-semver": "1.1.1", + "description": "Asterisk ARI interface bindings for modern C++", + "homepage": "https://github.com/daniele77/aricpp", + "dependencies": [ + "boost-asio", + "boost-beast", + "boost-system", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/armadillo/CONTROL b/ports/armadillo/CONTROL deleted file mode 100644 index ef0c926a5bed8a..00000000000000 --- a/ports/armadillo/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: armadillo -Version: 2019-04-16-4 -Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use -Build-Depends: openblas (!osx), clapack (!osx) diff --git a/ports/armadillo/add-disable-find-package.patch b/ports/armadillo/add-disable-find-package.patch new file mode 100644 index 00000000000000..b5d67d5c21a741 --- /dev/null +++ b/ports/armadillo/add-disable-find-package.patch @@ -0,0 +1,60 @@ +diff --git a/cmake_aux/Modules/ARMA_FindARPACK.cmake b/cmake_aux/Modules/ARMA_FindARPACK.cmake +index 1a709ad..3029c25 100644 +--- a/cmake_aux/Modules/ARMA_FindARPACK.cmake ++++ b/cmake_aux/Modules/ARMA_FindARPACK.cmake +@@ -4,6 +4,10 @@ + # ARPACK_FOUND - system has ARPACK + # ARPACK_LIBRARY - Link this to use ARPACK + ++if(CMAKE_DISABLE_FIND_PACKAGE_ARPACK) ++ set(ARPACK_FOUND NO) ++ return() ++endif() + + find_library(ARPACK_LIBRARY + NAMES arpack +diff --git a/cmake_aux/Modules/ARMA_FindATLAS.cmake b/cmake_aux/Modules/ARMA_FindATLAS.cmake +index 491a361..e40a0ff 100644 +--- a/cmake_aux/Modules/ARMA_FindATLAS.cmake ++++ b/cmake_aux/Modules/ARMA_FindATLAS.cmake +@@ -1,3 +1,8 @@ ++if(CMAKE_DISABLE_FIND_PACKAGE_ATLAS) ++ set(ATLAS_FOUND NO) ++ return() ++endif() ++ + find_path(ATLAS_CBLAS_INCLUDE_DIR + NAMES cblas.h + PATHS /usr/include/atlas/ /usr/include/ /usr/local/include/atlas/ /usr/local/include/ +diff --git a/cmake_aux/Modules/ARMA_FindMKL.cmake b/cmake_aux/Modules/ARMA_FindMKL.cmake +index 0fd5b06..d6bcd49 100644 +--- a/cmake_aux/Modules/ARMA_FindMKL.cmake ++++ b/cmake_aux/Modules/ARMA_FindMKL.cmake +@@ -6,6 +6,11 @@ + ## the link below explains why we're linking only with mkl_rt + ## https://software.intel.com/en-us/articles/a-new-linking-model-single-dynamic-library-mkl_rt-since-intel-mkl-103 + ++if(CMAKE_DISABLE_FIND_PACKAGE_MKL) ++ set(MKL_FOUND NO) ++ return() ++endif() ++ + set(MKL_NAMES ${MKL_NAMES} mkl_rt) + #set(MKL_NAMES ${MKL_NAMES} mkl_lapack) + #set(MKL_NAMES ${MKL_NAMES} mkl_intel_thread) +diff --git a/cmake_aux/Modules/ARMA_FindSuperLU5.cmake b/cmake_aux/Modules/ARMA_FindSuperLU5.cmake +index abf046d..e496cb0 100644 +--- a/cmake_aux/Modules/ARMA_FindSuperLU5.cmake ++++ b/cmake_aux/Modules/ARMA_FindSuperLU5.cmake +@@ -5,6 +5,11 @@ + # SuperLU_LIBRARY - Link this to use SuperLU + # SuperLU_INCLUDE_DIR - directory of SuperLU headers + ++if(CMAKE_DISABLE_FIND_PACKAGE_SuperLU) ++ set(SuperLU_FOUND OFF) ++ return() ++endif() ++ + find_path(SuperLU_INCLUDE_DIR slu_ddefs.h + /usr/include/superlu/ + /usr/include/SuperLU/ diff --git a/ports/armadillo/fix-CMakePath.patch b/ports/armadillo/fix-CMakePath.patch index 58cca5c64be725..cfafc4f289ead3 100644 --- a/ports/armadillo/fix-CMakePath.patch +++ b/ports/armadillo/fix-CMakePath.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9fea721..e6a273d 100644 +index ea5516e..ecd14bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -473,7 +473,7 @@ install(EXPORT ArmadilloLibraryDepends DESTINATION +@@ -615,7 +615,7 @@ install(EXPORT ArmadilloLibraryDepends DESTINATION # and install it set(ARMADILLO_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}") set(ARMADILLO_LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}") diff --git a/ports/armadillo/portfile.cmake b/ports/armadillo/portfile.cmake index 4e5798f9b5c9e2..757065f6068047 100644 --- a/ports/armadillo/portfile.cmake +++ b/ports/armadillo/portfile.cmake @@ -1,44 +1,45 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -vcpkg_from_gitlab( - GITLAB_URL https://gitlab.com +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - REPO conradsnicta/armadillo-code - REF f00d3225b1c005775044369723f31cecc3cd6569 - SHA512 ca3574edf5de8c752867403c3856ed9569fbed2ce9729585cae59be5751493c2e71121319b0a812e2ea56baada6b6f62fbc84ce6f1efb362347e5fd4141ccf1b - HEAD_REF 9.400.x + REPO arma + FILENAME "armadillo-10.6.2.tar.xz" + SHA512 ae04e993830ca04e7eddfaf9c40a50fb9139b10b9667412f5a18707ac73ee529b8e3a5a91337782e4e01bae61207b44f24bdd8a77c6c2404011a06006d849aba PATCHES remove_custom_modules.patch - fix-CMakePath.patch + fix-CMakePath.patch + add-disable-find-package.patch ) -file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindBLAS.cmake) -file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindLAPACK.cmake) -file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindOpenBLAS.cmake) +file(REMOVE "${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindBLAS.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindLAPACK.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindOpenBLAS.cmake") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE OPTIONS -DDETECT_HDF5=false + -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=ON + -DCMAKE_DISABLE_FIND_PACKAGE_ARPACK=ON + -DCMAKE_DISABLE_FIND_PACKAGE_ATLAS=ON + -DCMAKE_DISABLE_FIND_PACKAGE_MKL=ON ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/Armadillo/CMake) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH share/Armadillo/CMake) vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(GLOB SHARE_CONTENT ${CURRENT_PACKAGES_DIR}/share/Armadillo) +file(GLOB SHARE_CONTENT "${CURRENT_PACKAGES_DIR}/share/Armadillo") list(LENGTH SHARE_CONTENT SHARE_LEN) if(SHARE_LEN EQUAL 0) # On case sensitive file system there is an extra empty directory created that should be removed - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Armadillo) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Armadillo") endif() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/armadillo) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/armadillo RENAME copyright) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/armadillo/remove_custom_modules.patch b/ports/armadillo/remove_custom_modules.patch index 0723dbeb549ff1..88631b573aab49 100644 --- a/ports/armadillo/remove_custom_modules.patch +++ b/ports/armadillo/remove_custom_modules.patch @@ -1,17 +1,23 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0959127..9fea721 100755 +index ab7dbed..ea5516e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -176,10 +176,9 @@ else() +@@ -324,15 +324,15 @@ if(APPLE) + else() + include(ARMA_FindMKL) - include(ARMA_FindACMLMP) - include(ARMA_FindACML) - include(ARMA_FindOpenBLAS) include(ARMA_FindATLAS) - include(ARMA_FindBLAS) - include(ARMA_FindLAPACK) -+ find_package(BLAS) -+ find_package(LAPACK) - message(STATUS " MKL_FOUND = ${MKL_FOUND}" ) - message(STATUS " ACMLMP_FOUND = ${ACMLMP_FOUND}" ) + if(ALLOW_FLEXIBLAS_LINUX AND (${CMAKE_SYSTEM_NAME} MATCHES "Linux")) + include(ARMA_FindFlexiBLAS) + endif() + ++ find_package(BLAS) ++ find_package(LAPACK) ++ + message(STATUS " MKL_FOUND = ${MKL_FOUND}" ) + message(STATUS " OpenBLAS_FOUND = ${OpenBLAS_FOUND}" ) + message(STATUS " ATLAS_FOUND = ${ATLAS_FOUND}" ) diff --git a/ports/armadillo/vcpkg.json b/ports/armadillo/vcpkg.json new file mode 100644 index 00000000000000..bf9db01cb4cf65 --- /dev/null +++ b/ports/armadillo/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "armadillo", + "version": "10.6.2", + "description": "Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use", + "homepage": "http://arma.sourceforge.net", + "dependencies": [ + "blas", + "lapack", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/arrayfire/build.patch b/ports/arrayfire/build.patch new file mode 100644 index 00000000000000..c5239389144ed4 --- /dev/null +++ b/ports/arrayfire/build.patch @@ -0,0 +1,226 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1f30a5b3..7b62e003 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -104,8 +104,6 @@ mark_as_advanced( + CUDA_HOST_COMPILER + CUDA_USE_STATIC_CUDA_RUNTIME + CUDA_rt_LIBRARY +- SPDLOG_BUILD_EXAMPLES +- SPDLOG_BUILD_TESTING + ADDR2LINE_PROGRAM + Backtrace_LIBRARY + AF_WITH_STATIC_MKL +@@ -159,9 +157,7 @@ if(NOT LAPACK_FOUND) + endif() + endif() + +-set(SPDLOG_BUILD_TESTING OFF CACHE INTERNAL "Disable testing in spdlog") +-add_subdirectory(extern/spdlog EXCLUDE_FROM_ALL) +-add_subdirectory(extern/glad) ++find_package(spdlog CONFIG REQUIRED) + add_subdirectory(src/backend/common) + add_subdirectory(src/api/c) + add_subdirectory(src/api/cpp) +@@ -269,10 +265,6 @@ install(DIRECTORY examples/ #NOTE The slash at the end is important + DESTINATION ${AF_INSTALL_EXAMPLE_DIR} + COMPONENT examples) + +-install(DIRECTORY assets/examples/ #NOTE The slash at the end is important +- DESTINATION ${AF_INSTALL_EXAMPLE_DIR} +- COMPONENT examples) +- + install(DIRECTORY "${ArrayFire_SOURCE_DIR}/LICENSES/" + DESTINATION LICENSES + COMPONENT licenses) +diff --git a/CMakeModules/AFInstallDirs.cmake b/CMakeModules/AFInstallDirs.cmake +index 2c7b96ea..b5006ee0 100644 +--- a/CMakeModules/AFInstallDirs.cmake ++++ b/CMakeModules/AFInstallDirs.cmake +@@ -7,8 +7,12 @@ include(GNUInstallDirs) + # NOTE: These paths are all relative to the project installation prefix. + + # Executables +-if(NOT DEFINED AF_INSTALL_BIN_DIR) +- set(AF_INSTALL_BIN_DIR "lib" CACHE PATH "Installation path for executables") ++if(CMAKE_BUILD_TYPE MATCHES Debug) ++ set(AF_INSTALL_BIN_DIR "${AF_BIN_DIR}/debug/bin") ++ message(STATUS " Setting install to debug path ${AF_INSTALL_BIN_DIR}") ++else() ++ set(AF_INSTALL_BIN_DIR "${AF_BIN_DIR}/bin") ++ message(STATUS " Setting install to release path ${AF_INSTALL_BIN_DIR}") + endif() + + # Libraries +diff --git a/CMakeModules/AFconfigure_forge_submodule.cmake b/CMakeModules/AFconfigure_forge_submodule.cmake +index d16849f0..36ab01b6 100644 +--- a/CMakeModules/AFconfigure_forge_submodule.cmake ++++ b/CMakeModules/AFconfigure_forge_submodule.cmake +@@ -39,13 +39,13 @@ if(AF_BUILD_FORGE) + COMPONENT common_backend_dependencies) + set_property(TARGET forge APPEND_STRING PROPERTY COMPILE_FLAGS " -w") + else(AF_BUILD_FORGE) +- set(FG_VERSION "1.0.0") ++ set(FG_VERSION "1.0.5") + set(FG_VERSION_MAJOR 1) + set(FG_VERSION_MINOR 0) +- set(FG_VERSION_PATCH 0) ++ set(FG_VERSION_PATCH 5) + set(FG_API_VERSION_CURRENT 10) + configure_file( +- ${PROJECT_SOURCE_DIR}/extern/forge/CMakeModules/version.h.in +- ${PROJECT_BINARY_DIR}/extern/forge/include/fg/version.h ++ ${AF_FORGE_PATH}/CMakeModules/version.h.in ++ ${AF_FORGE_PATH}/include/fg/version.h + ) + endif(AF_BUILD_FORGE) +diff --git a/src/api/unified/CMakeLists.txt b/src/api/unified/CMakeLists.txt +index 967eaa63..ff04392c 100644 +--- a/src/api/unified/CMakeLists.txt ++++ b/src/api/unified/CMakeLists.txt +@@ -96,7 +96,7 @@ target_include_directories(af + target_link_libraries(af + PRIVATE + cpp_api_interface +- spdlog ++ spdlog::spdlog spdlog::spdlog_header_only + Threads::Threads + Boost::boost + ${CMAKE_DL_LIBS} +diff --git a/src/backend/common/CMakeLists.txt b/src/backend/common/CMakeLists.txt +index c9fe0889..f97bf0e8 100644 +--- a/src/backend/common/CMakeLists.txt ++++ b/src/backend/common/CMakeLists.txt +@@ -77,12 +77,15 @@ else() + target_sources(afcommon_interface INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/module_loading_unix.cpp) + endif() + ++find_package(glad CONFIG REQUIRED) ++ + target_link_libraries(afcommon_interface + INTERFACE +- spdlog ++ spdlog::spdlog ++ spdlog::spdlog_header_only + Boost::boost +- af_glad_interface + ${CMAKE_DL_LIBS} ++ glad::glad + ) + + if(AF_BUILD_FORGE) +@@ -93,10 +96,9 @@ target_include_directories(afcommon_interface + INTERFACE + ${ArrayFire_SOURCE_DIR}/src/backend + ${ArrayFire_BINARY_DIR} ++ ${AF_FORGE_PATH}/include # passed via vcpkg + SYSTEM INTERFACE + $<$:${OPENGL_INCLUDE_DIR}> +- ${ArrayFire_SOURCE_DIR}/extern/forge/include +- ${ArrayFire_BINARY_DIR}/extern/forge/include + ) + + if(APPLE AND NOT USE_MKL) +diff --git a/src/backend/cpu/CMakeLists.txt b/src/backend/cpu/CMakeLists.txt +index 170bb0f3..c6e20177 100644 +--- a/src/backend/cpu/CMakeLists.txt ++++ b/src/backend/cpu/CMakeLists.txt +@@ -266,9 +266,10 @@ endif(AF_WITH_CPUID) + + target_sources(afcpu + PRIVATE +- ${CMAKE_CURRENT_SOURCE_DIR}/threads/async_queue.hpp +- ${CMAKE_CURRENT_SOURCE_DIR}/threads/event.hpp ++ ${AF_CPU_THREAD_PATH}/include/threads/async_queue.hpp ++ ${AF_CPU_THREAD_PATH}/include/threads/event.hpp + ) ++target_include_directories(afcpu PRIVATE ${AF_CPU_THREAD_PATH}/include) + + arrayfire_set_default_cxx_flags(afcpu) + +diff --git a/src/backend/cuda/CMakeLists.txt b/src/backend/cuda/CMakeLists.txt +index 7e3e4089..a3a53087 100644 +--- a/src/backend/cuda/CMakeLists.txt ++++ b/src/backend/cuda/CMakeLists.txt +@@ -110,7 +110,11 @@ cuda_include_directories( + ${COMMON_INTERFACE_DIRS} + ) + if(CUDA_VERSION_MAJOR VERSION_LESS 11) +- cuda_include_directories(${ArrayFire_SOURCE_DIR}/extern/cub) ++ find_path(CUB_INCLUDE_DIRS "cub/agent/agent_histogram.cuh") ++ if (${CUB_INCLUDE_DIRS} EQUAL "CUB_INCLUDE_DIRS-NOTFOUND") ++ set(CUB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/cub) ++ endif() ++ cuda_include_directories(${CUB_INCLUDE_DIRS}) + endif() + + file(GLOB jit_src "kernel/jit.cuh") +@@ -240,9 +244,14 @@ if(AF_WITH_NONFREE) + set(cxx_definitions -DAF_WITH_NONFREE_SIFT) + endif() + ++# New API of cuSparse was introduced in 10.1.168 for Linux and the older ++# 10.1.105 fix version doesn't it. Unfortunately, the new API was introduced in ++# in a fix release of CUDA - unconventionally. As CMake's FindCUDA module ++# doesn't provide patch/fix version number, we use 10.2 as the minimum ++# CUDA version to enable this new cuSparse API. + if(CUDA_VERSION_MAJOR VERSION_GREATER 10 OR + (UNIX AND +- CUDA_VERSION_MAJOR VERSION_EQUAL 10 AND CUDA_VERSION_MINOR VERSION_GREATER 0)) ++ CUDA_VERSION_MAJOR VERSION_EQUAL 10 AND CUDA_VERSION_MINOR VERSION_GREATER 1)) + list(APPEND cxx_definitions -DAF_USE_NEW_CUSPARSE_API) + endif() + +@@ -301,7 +310,7 @@ set_target_properties(af_cuda_static_cuda_library + + if(CUDA_VERSION_MAJOR VERSION_GREATER 10 OR + (UNIX AND +- CUDA_VERSION_MAJOR VERSION_EQUAL 10 AND CUDA_VERSION_MINOR VERSION_GREATER 0)) ++ CUDA_VERSION_MAJOR VERSION_EQUAL 10 AND CUDA_VERSION_MINOR VERSION_GREATER 1)) + target_compile_definitions(af_cuda_static_cuda_library PRIVATE AF_USE_NEW_CUSPARSE_API) + endif() + +diff --git a/src/backend/opencl/kernel/scan_by_key/CMakeLists.txt b/src/backend/opencl/kernel/scan_by_key/CMakeLists.txt +index 9a796c9e..d9864b00 100644 +--- a/src/backend/opencl/kernel/scan_by_key/CMakeLists.txt ++++ b/src/backend/opencl/kernel/scan_by_key/CMakeLists.txt +@@ -27,6 +27,7 @@ foreach(SBK_BINARY_OP ${SBK_BINARY_OPS}) + add_dependencies(opencl_scan_by_key_${SBK_BINARY_OP} + ${cl_kernel_targets} OpenCL::cl2hpp Boost::boost) + ++ find_package(glad CONFIG REQUIRED) + target_include_directories(opencl_scan_by_key_${SBK_BINARY_OP} + PRIVATE + . +@@ -39,9 +40,7 @@ foreach(SBK_BINARY_OP ${SBK_BINARY_OPS}) + $ + $ + $ +- $ +- ${ArrayFire_SOURCE_DIR}/extern/forge/include +- ${ArrayFire_BINARY_DIR}/extern/forge/include ++ $ + ) + + set_target_properties(opencl_scan_by_key_${SBK_BINARY_OP} +diff --git a/src/backend/opencl/kernel/sort_by_key/CMakeLists.txt b/src/backend/opencl/kernel/sort_by_key/CMakeLists.txt +index d618ff2f..9f517398 100644 +--- a/src/backend/opencl/kernel/sort_by_key/CMakeLists.txt ++++ b/src/backend/opencl/kernel/sort_by_key/CMakeLists.txt +@@ -32,14 +32,13 @@ foreach(SBK_TYPE ${SBK_TYPES}) + ../../../include + ${CMAKE_CURRENT_BINARY_DIR}) + ++ find_package(glad CONFIG REQUIRED) + target_include_directories(opencl_sort_by_key_${SBK_TYPE} + SYSTEM PRIVATE + $ + $ + $ +- $ +- ${ArrayFire_SOURCE_DIR}/extern/forge/include +- ${ArrayFire_BINARY_DIR}/extern/forge/include ++ $ + ) + + set_target_properties(opencl_sort_by_key_${SBK_TYPE} diff --git a/ports/arrayfire/portfile.cmake b/ports/arrayfire/portfile.cmake new file mode 100644 index 00000000000000..607d873f7d2cff --- /dev/null +++ b/ports/arrayfire/portfile.cmake @@ -0,0 +1,85 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arrayfire/arrayfire + REF 59ac7b980d1ae124aae914fb29cbf086c948954d # v3.7.3 + SHA512 e8c209a5249046cb8d68877463b4f4921cfc363ec2f9b070ba67c9e00cbe7b44d5db209922dabc47e53977ff918e7f0d289f85c7571a826c2050d0ee8deae3e0 + HEAD_REF master + PATCHES build.patch + ) + +# arrayfire cpu thread lib needed as a submodule for the CPU backend +vcpkg_from_github( + OUT_SOURCE_PATH CPU_THREADS_PATH + REPO arrayfire/threads + REF b666773940269179f19ef11c8f1eb77005e85d9a + SHA512 b3e8b54acf3a588b1f821c2774d5da2d8f8441962c6d99808d513f7117278b9066eb050b8b501bddbd3882e68eb5cc5da0b2fca54e15ab1923fe068a3fe834f5 + HEAD_REF master + ) + +# Get forge. We only need headers and aren't actually linking. +# We don't want to use the vcpkg dependency since it is broken in many +# environments - see https://github.com/microsoft/vcpkg/issues/14864. This +# can be relaxed when the issue is fixed. Forge and its dependencies +# are still runtime dependencies, so the user can use the graphics +# library by installing forge and freeimage. +vcpkg_from_github( + OUT_SOURCE_PATH FORGE_PATH + REPO arrayfire/forge + REF 1a0f0cb6371a8c8053ab5eb7cbe3039c95132389 # v1.0.5 + SHA512 8f8607421880a0f0013380eb5efb3a4f05331cd415d68c9cd84dd57eb727da1df6223fc6d65b106675d6aa09c3388359fab64443c31fadadf7641161be6b3b89 + HEAD_REF master +) + +################################### Build ################################### + +# Default flags +set(AF_DEFAULT_VCPKG_CMAKE_FLAGS + -DBUILD_TESTING=OFF + -DAF_BUILD_DOCS=OFF + -DAF_BUILD_EXAMPLES=OFF + -DUSE_CPU_MKL=ON + -DUSE_OPENCL_MKL=ON + -DAF_CPU_THREAD_PATH=${CPU_THREADS_PATH} # for building the arrayfire cpu threads lib + -DAF_FORGE_PATH=${FORGE_PATH} # forge headers for building the graphics lib + -DAF_BUILD_FORGE=OFF + -DAF_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share/${PORT} # for CMake configs/targets + ) + +# bin/dll directory for Windows non-static builds for the unified backend dll +if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(AF_BIN_DIR ${CURRENT_PACKAGES_DIR}) + list(APPEND AF_DEFAULT_VCPKG_CMAKE_FLAGS "-DAF_BIN_DIR=${AF_BIN_DIR}") +endif() + +if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(WARNING "NOTE: Windows support with static linkeage is still experimental.") +endif() + +# Determine which backend to build via specified feature +vcpkg_check_features( + OUT_FEATURE_OPTIONS AF_BACKEND_FEATURE_OPTIONS + FEATURES + unified AF_BUILD_UNIFIED + cpu AF_BUILD_CPU + cuda AF_BUILD_CUDA + opencl AF_BUILD_OPENCL +) + +# Build and install +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${AF_DEFAULT_VCPKG_CMAKE_FLAGS} + ${AF_BACKEND_FEATURE_OPTIONS} + ) +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Copyright and license +file(INSTALL ${SOURCE_PATH}/COPYRIGHT.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/arrayfire/vcpkg.json b/ports/arrayfire/vcpkg.json new file mode 100644 index 00000000000000..e6f2c8874f847d --- /dev/null +++ b/ports/arrayfire/vcpkg.json @@ -0,0 +1,45 @@ +{ + "name": "arrayfire", + "version-string": "3.7.3", + "port-version": 3, + "description": "ArrayFire is a general-purpose library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices.", + "supports": "x64", + "dependencies": [ + "boost-compute", + "boost-stacktrace", + "glad", + "spdlog" + ], + "default-features": [ + "cpu", + "unified" + ], + "features": { + "cpu": { + "description": "ArrayFire CPU backend", + "dependencies": [ + "intel-mkl" + ] + }, + "cuda": { + "description": "ArrayFire CUDA backend", + "dependencies": [ + "cub", + "cuda", + "cudnn" + ] + }, + "opencl": { + "description": "ArrayFire OpenCL backend", + "dependencies": [ + "opencl" + ] + }, + "unified": { + "description": "ArrayFire unified backend", + "dependencies": [ + "intel-mkl" + ] + } + } +} diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL deleted file mode 100644 index ea787e24a8811e..00000000000000 --- a/ports/arrow/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: arrow -Version: 0.14.1 -Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser -Homepage: https://github.com/apache/arrow -Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/arrow/all.patch b/ports/arrow/all.patch index 0675356fffbddc..a9b3a26280cabe 100644 --- a/ports/arrow/all.patch +++ b/ports/arrow/all.patch @@ -1,130 +1,13 @@ diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake -index 4ef2948..9c3c121 100644 +index cd8290d1b..12c52c184 100644 --- a/cpp/cmake_modules/BuildUtils.cmake +++ b/cpp/cmake_modules/BuildUtils.cmake -@@ -305,7 +305,7 @@ function(ADD_ARROW_LIB LIB_NAME) +@@ -427,7 +427,7 @@ function(ADD_ARROW_LIB LIB_NAME) target_include_directories(${LIB_NAME}_static PRIVATE ${ARG_PRIVATE_INCLUDES}) endif() -- if(MSVC) -+ if(MSVC AND 0) +- if(MSVC_TOOLCHAIN) ++ if(MSVC_TOOLCHAIN AND 0) set(LIB_NAME_STATIC ${LIB_NAME}_static) else() set(LIB_NAME_STATIC ${LIB_NAME}) -diff --git a/cpp/cmake_modules/FindLz4.cmake b/cpp/cmake_modules/FindLz4.cmake -index 8410916..a196b25 100644 ---- a/cpp/cmake_modules/FindLz4.cmake -+++ b/cpp/cmake_modules/FindLz4.cmake -@@ -19,14 +19,16 @@ if(MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX) - set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static") - endif() - --set(LZ4_STATIC_LIB_SUFFIX "${LZ4_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") -+if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(LZ4_LIB_NAME_DEBUG_SUFFIX d) -+endif() - --set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_STATIC_LIB_SUFFIX}) -+set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_MSVC_STATIC_LIB_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) - - if(LZ4_ROOT) - find_library( - LZ4_LIB -- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} -+ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} - "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATHS ${LZ4_ROOT} - PATH_SUFFIXES ${LIB_PATH_SUFFIXES} -@@ -43,14 +45,14 @@ else() - set(LZ4_INCLUDE_DIR "${LZ4_PC_INCLUDEDIR}") - - list(APPEND LZ4_PC_LIBRARY_DIRS "${LZ4_PC_LIBDIR}") -- find_library(LZ4_LIB lz4 -+ find_library(LZ4_LIB lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} - PATHS ${LZ4_PC_LIBRARY_DIRS} - NO_DEFAULT_PATH - PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) - else() - find_library( - LZ4_LIB -- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} -+ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} - "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) - find_path(LZ4_INCLUDE_DIR NAMES lz4.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) -diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThrift.cmake -index 87cc24e..4de0760 100644 ---- a/cpp/cmake_modules/FindThrift.cmake -+++ b/cpp/cmake_modules/FindThrift.cmake -@@ -54,6 +54,10 @@ if(MSVC AND NOT THRIFT_MSVC_STATIC_LIB_SUFFIX) - set(THRIFT_MSVC_STATIC_LIB_SUFFIX md) - endif() - -+if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(THRIFT_LIB_NAME_DEBUG_SUFFIX d) -+endif() -+ - if(Thrift_ROOT) - find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} - PATHS ${Thrift_ROOT} -@@ -71,15 +75,13 @@ else() - - list(APPEND THRIFT_PC_LIBRARY_DIRS "${THRIFT_PC_LIBDIR}") - -- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} -- PATHS ${THRIFT_PC_LIBRARY_DIRS} -- NO_DEFAULT_PATH) -+ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX} -+ PATHS ${THRIFT_PC_LIBRARY_DIRS}) - find_program(THRIFT_COMPILER thrift - HINTS ${THRIFT_PC_PREFIX} -- NO_DEFAULT_PATH - PATH_SUFFIXES "bin") - else() -- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} -+ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX} - PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib") - find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h PATH_SUFFIXES "include") - find_program(THRIFT_COMPILER thrift PATH_SUFFIXES "bin") -diff --git a/cpp/cmake_modules/FindZSTD.cmake b/cpp/cmake_modules/FindZSTD.cmake -index 8e47086..d7ce559 100644 ---- a/cpp/cmake_modules/FindZSTD.cmake -+++ b/cpp/cmake_modules/FindZSTD.cmake -@@ -19,14 +19,18 @@ if(MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX) - set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static") - endif() - --set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") -+if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(ZSTD_LIB_NAME_DEBUG_SUFFIX d) -+endif() -+ -+set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") - set(ZSTD_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX}) - - # First, find via if specified ZTD_ROOT - if(ZSTD_ROOT) - message(STATUS "Using ZSTD_ROOT: ${ZSTD_ROOT}") - find_library(ZSTD_LIB -- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" -+ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" - "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATHS ${ZSTD_ROOT} - PATH_SUFFIXES ${LIB_PATH_SUFFIXES} -@@ -44,14 +48,14 @@ else() - set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}") - - list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}") -- find_library(ZSTD_LIB zstd -+ find_library(ZSTD_LIB zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} - PATHS ${ZSTD_PC_LIBRARY_DIRS} - NO_DEFAULT_PATH - PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) - # Third, check all other CMake paths - else() - find_library(ZSTD_LIB -- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" -+ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" - "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) - find_path(ZSTD_INCLUDE_DIR NAMES zstd.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) diff --git a/ports/arrow/fix-dependencies.patch b/ports/arrow/fix-dependencies.patch new file mode 100644 index 00000000000000..3e22d18019e74b --- /dev/null +++ b/ports/arrow/fix-dependencies.patch @@ -0,0 +1,267 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index b5a39bf33..af1e16a9b 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -668,7 +668,7 @@ endif() + + if(ARROW_WITH_BROTLI) + # Order is important for static linking +- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon) ++ set(ARROW_BROTLI_LIBS unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon) + list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS}) + list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) + if(Brotli_SOURCE STREQUAL "SYSTEM") +@@ -684,9 +684,9 @@ if(ARROW_WITH_BZ2) + endif() + + if(ARROW_WITH_LZ4) +- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) ++ list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4) + if(Lz4_SOURCE STREQUAL "SYSTEM") +- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) ++ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS lz4::lz4) + endif() + endif() + +@@ -735,10 +735,10 @@ if(ARROW_S3) + endif() + + if(ARROW_WITH_UTF8PROC) +- list(APPEND ARROW_LINK_LIBS utf8proc::utf8proc) +- list(APPEND ARROW_STATIC_LINK_LIBS utf8proc::utf8proc) ++ list(APPEND ARROW_LINK_LIBS utf8proc) ++ list(APPEND ARROW_STATIC_LINK_LIBS utf8proc) + if(utf8proc_SOURCE STREQUAL "SYSTEM") +- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS utf8proc::utf8proc) ++ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS utf8proc) + endif() + endif() + +diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake +index e6852d9c2..fc0973ffa 100644 +--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake +@@ -53,7 +53,7 @@ set(ARROW_THIRDPARTY_DEPENDENCIES + AWSSDK + benchmark + Boost +- Brotli ++ unofficial-brotli + BZip2 + c-ares + gflags +@@ -61,14 +61,14 @@ set(ARROW_THIRDPARTY_DEPENDENCIES + gRPC + GTest + LLVM +- Lz4 ++ lz4 + ORC + re2 + Protobuf + RapidJSON + Snappy + Thrift +- utf8proc ++ unofficial-utf8proc + xsimd + ZLIB + zstd) +@@ -945,7 +945,7 @@ macro(build_snappy) + endmacro() + + if(ARROW_WITH_SNAPPY) +- resolve_dependency(Snappy PC_PACKAGE_NAMES snappy) ++ resolve_dependency(Snappy USE_CONFIG TRUE PC_PACKAGE_NAMES snappy) + if(${Snappy_SOURCE} STREQUAL "SYSTEM" AND NOT snappy_PC_FOUND) + get_target_property(SNAPPY_LIB Snappy::snappy IMPORTED_LOCATION) + string(APPEND ARROW_PC_LIBS_PRIVATE " ${SNAPPY_LIB}") +@@ -1014,10 +1014,16 @@ macro(build_brotli) + endmacro() + + if(ARROW_WITH_BROTLI) +- resolve_dependency(Brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) ++ set(unofficial-brotli_SOURCE "SYSTEM") ++ resolve_dependency(unofficial-brotli USE_CONFIG TRUE PC_PACKAGE_NAMES libbrotlidec libbrotlienc) + # TODO: Don't use global includes but rather target_include_directories +- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon +- INTERFACE_INCLUDE_DIRECTORIES) ++ if (BUILD_SHARED_LIBS) ++ get_target_property(BROTLI_INCLUDE_DIR unofficial::brotli::brotlicommon ++ INTERFACE_INCLUDE_DIRECTORIES) ++ else() ++ get_target_property(BROTLI_INCLUDE_DIR unofficial::brotli::brotlicommon-static ++ INTERFACE_INCLUDE_DIRECTORIES) ++ endif() + include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) + endif() + +@@ -1133,7 +1139,7 @@ macro(build_glog) + endmacro() + + if(ARROW_USE_GLOG) +- resolve_dependency(GLOG PC_PACKAGE_NAMES libglog) ++ resolve_dependency(glog USE_CONFIG TRUE PC_PACKAGE_NAMES libglog) + # TODO: Don't use global includes but rather target_include_directories + get_target_property(GLOG_INCLUDE_DIR glog::glog INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM ${GLOG_INCLUDE_DIR}) +@@ -1206,8 +1212,7 @@ endmacro() + if(ARROW_NEED_GFLAGS) + set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0") + resolve_dependency(gflags +- HAVE_ALT +- TRUE ++ USE_CONFIG TRUE + REQUIRED_VERSION + ${ARROW_GFLAGS_REQUIRED_VERSION} + IS_RUNTIME_DEPENDENCY +@@ -1309,6 +1314,7 @@ if(ARROW_WITH_THRIFT) + if(NOT Thrift_FOUND AND NOT THRIFT_FOUND) + # Thrift c++ code generated by 0.13 requires 0.11 or greater + resolve_dependency(Thrift ++ USE_CONFIG TRUE + REQUIRED_VERSION + 0.11.0 + PC_PACKAGE_NAMES +@@ -1413,6 +1419,7 @@ if(ARROW_WITH_PROTOBUF) + set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1") + endif() + resolve_dependency(Protobuf ++ USE_CONFIG TRUE + REQUIRED_VERSION + ${ARROW_PROTOBUF_REQUIRED_VERSION} + PC_PACKAGE_NAMES +@@ -1423,6 +1430,10 @@ if(ARROW_WITH_PROTOBUF) + endif() + + # TODO: Don't use global includes but rather target_include_directories ++ if (TARGET protobuf::libprotobuf) ++ get_target_property(PROTOBUF_INCLUDE_DIR protobuf::libprotobuf ++ INTERFACE_INCLUDE_DIRECTORIES) ++ endif() + include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR}) + + if(TARGET arrow::protobuf::libprotobuf) +@@ -1471,12 +1482,18 @@ if(ARROW_WITH_PROTOBUF) + + # Log protobuf paths as we often see issues with mixed sources for + # the libraries and protoc. ++ if (NOT TARGET protobuf::protoc) + get_target_property(PROTOBUF_PROTOC_EXECUTABLE ${ARROW_PROTOBUF_PROTOC} + IMPORTED_LOCATION) ++ endif() + message(STATUS "Found protoc: ${PROTOBUF_PROTOC_EXECUTABLE}") + # Protobuf_PROTOC_LIBRARY is set by all versions of FindProtobuf.cmake + message(STATUS "Found libprotoc: ${Protobuf_PROTOC_LIBRARY}") ++ if (NOT TARGET protobuf::libprotobuf) + get_target_property(PROTOBUF_LIBRARY ${ARROW_PROTOBUF_LIBPROTOBUF} IMPORTED_LOCATION) ++ else() ++ set(PROTOBUF_LIBRARY protobuf::libprotobuf) ++ endif() + message(STATUS "Found libprotobuf: ${PROTOBUF_LIBRARY}") + message(STATUS "Found protobuf headers: ${PROTOBUF_INCLUDE_DIR}") + endif() +@@ -1889,7 +1906,7 @@ endmacro() + if(ARROW_WITH_RAPIDJSON) + set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0") + resolve_dependency(RapidJSON +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_RAPIDJSON_REQUIRED_VERSION} +@@ -2024,10 +2041,11 @@ macro(build_lz4) + endmacro() + + if(ARROW_WITH_LZ4) +- resolve_dependency(Lz4 PC_PACKAGE_NAMES liblz4) ++ set(lz4_SOURCE "SYSTEM") ++ resolve_dependency(lz4 USE_CONFIG TRUE PC_PACKAGE_NAMES liblz4) + + # TODO: Don't use global includes but rather target_include_directories +- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(LZ4_INCLUDE_DIR lz4::lz4 INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) + endif() + +@@ -2090,7 +2108,7 @@ endmacro() + if(ARROW_WITH_ZSTD) + # ARROW-13384: ZSTD_minCLevel was added in v1.4.0, required by ARROW-13091 + resolve_dependency(zstd +- PC_PACKAGE_NAMES ++ USE_CONFIG TRUE PC_PACKAGE_NAMES + libzstd + REQUIRED_VERSION + 1.4.0) +@@ -2262,9 +2280,8 @@ macro(build_utf8proc) + endmacro() + + if(ARROW_WITH_UTF8PROC) +- resolve_dependency(utf8proc +- REQUIRED_VERSION +- "2.2.0" ++ resolve_dependency(unofficial-utf8proc ++ USE_CONFIG TRUE + PC_PACKAGE_NAMES + libutf8proc) + +@@ -2272,7 +2289,7 @@ if(ARROW_WITH_UTF8PROC) + + # TODO: Don't use global definitions but rather + # target_compile_definitions or target_link_libraries +- get_target_property(UTF8PROC_COMPILER_DEFINITIONS utf8proc::utf8proc ++ get_target_property(UTF8PROC_COMPILER_DEFINITIONS utf8proc + INTERFACE_COMPILER_DEFINITIONS) + if(UTF8PROC_COMPILER_DEFINITIONS) + add_definitions(-D${UTF8PROC_COMPILER_DEFINITIONS}) +@@ -2280,7 +2297,7 @@ if(ARROW_WITH_UTF8PROC) + + # TODO: Don't use global includes but rather + # target_include_directories or target_link_libraries +- get_target_property(UTF8PROC_INCLUDE_DIR utf8proc::utf8proc ++ get_target_property(UTF8PROC_INCLUDE_DIR utf8proc + INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM ${UTF8PROC_INCLUDE_DIR}) + endif() +@@ -2335,7 +2352,7 @@ endmacro() + + macro(build_grpc) + resolve_dependency(c-ares +- HAVE_ALT ++ USE_CONFIG + TRUE + PC_PACKAGE_NAMES + libcares) +@@ -2600,7 +2617,7 @@ endmacro() + if(ARROW_WITH_GRPC) + set(ARROW_GRPC_REQUIRED_VERSION "1.17.0") + resolve_dependency(gRPC +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_GRPC_REQUIRED_VERSION} +@@ -2610,6 +2627,10 @@ if(ARROW_WITH_GRPC) + # TODO: Don't use global includes but rather target_include_directories + get_target_property(GRPC_INCLUDE_DIR gRPC::grpc++ INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM ${GRPC_INCLUDE_DIR}) ++ if (ABSL_USE_CXX17) ++ message(STATUS "Found absl uses CXX17, enable CXX17 feature.") ++ set(CMAKE_CXX_STANDARD 17) ++ endif() + + if(GRPC_VENDORED) + set(GRPCPP_PP_INCLUDE TRUE) +diff --git a/cpp/src/arrow/adapters/orc/CMakeLists.txt b/cpp/src/arrow/adapters/orc/CMakeLists.txt +index ca901b07d..4512a175f 100644 +--- a/cpp/src/arrow/adapters/orc/CMakeLists.txt ++++ b/cpp/src/arrow/adapters/orc/CMakeLists.txt +@@ -29,7 +29,7 @@ set(ORC_MIN_TEST_LIBS + GTest::gtest_main + GTest::gtest + Snappy::snappy +- LZ4::lz4 ++ lz4::lz4 + ZLIB::ZLIB) + + if(ARROW_BUILD_STATIC) diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index 58b6f489cbb2d1..221b3e0d9cdb89 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -1,35 +1,86 @@ -include(vcpkg_common_functions) - -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - message(FATAL_ERROR "Apache Arrow only supports x64") -endif() +vcpkg_fail_port_install(ON_ARCH "x86" "arm" "arm64") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/arrow - REF apache-arrow-0.14.1 - SHA512 f5493a62becaaee9d26e05f33509f51c98e96a5efd5d5bbdffdf70456c254b62075f1c9bc63d1119289a22d00359dfe9862078a284f8e063ecf13bd338a50728 + REF apache-arrow-5.0.0 + SHA512 68f4377f654423e7ea47c8c0170ddb030d0b020b936ec435854e216392e6515d870287f410d0acd48b36dcfec61be4c4a95794857f1d91c66745f3c6ed748034 HEAD_REF master PATCHES all.patch + fix-dependencies.patch +) + +file(REMOVE ${SOURCE_PATH}/cpp/cmake_modules/Findzstd.cmake + ${SOURCE_PATH}/cpp/cmake_modules/FindBrotli.cmake + ${SOURCE_PATH}/cpp/cmake_modules/Find-c-aresAlt.cmake + ${SOURCE_PATH}/cpp/cmake_modules/FindLz4.cmake + ${SOURCE_PATH}/cpp/cmake_modules/FindSnappy.cmake + ${SOURCE_PATH}/cpp/cmake_modules/FindThrift.cmake + ${SOURCE_PATH}/cpp/cmake_modules/FindGLOG.cmake + ${SOURCE_PATH}/cpp/cmake_modules/Findutf8proc.cmake + ${SOURCE_PATH}/cpp/cmake_modules/FindRapidJSONAlt.cmake + ${SOURCE_PATH}/cpp/cmake_modules/FindgRPCAlt.cmake + ${SOURCE_PATH}/cpp/cmake_modules/FindgflagsAlt.cmake ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + csv ARROW_CSV + dataset ARROW_DATASET + filesystem ARROW_FILESYSTEM + flight ARROW_FLIGHT + json ARROW_JSON + orc ARROW_ORC + parquet ARROW_PARQUET + parquet PARQUET_REQUIRE_ENCRYPTION + s3 ARROW_S3 +) + +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + set(MALLOC_OPTIONS -DARROW_JEMALLOC=OFF) +elseif("jemalloc" IN_LIST FEATURES) + set(MALLOC_OPTIONS -DARROW_JEMALLOC=ON) +else() + set(MALLOC_OPTIONS -DARROW_JEMALLOC=OFF) +endif() + +if(VCPKG_TARGET_IS_WINDOWS AND ("mimalloc" IN_LIST FEATURES)) + set(MALLOC_OPTIONS ${MALLOC_OPTIONS} -DARROW_MIMALLOC=ON) +else() + set(MALLOC_OPTIONS ${MALLOC_OPTIONS} -DARROW_MIMALLOC=OFF) +endif() + string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED) string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ARROW_BUILD_STATIC) +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_DEPENDENCY_USE_SHARED) + +if(VCPKG_TARGET_IS_WINDOWS) + set(THRIFT_USE_SHARED OFF) +else() + set(THRIFT_USE_SHARED ${ARROW_DEPENDENCY_USE_SHARED}) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cpp PREFER_NINJA OPTIONS - -DARROW_DEPENDENCY_SOURCE=SYSTEM - -Duriparser_SOURCE=SYSTEM - -DARROW_BUILD_TESTS=off - -DARROW_PARQUET=ON - -DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC} + ${FEATURE_OPTIONS} + ${MALLOC_OPTIONS} -DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED} - -DARROW_GFLAGS_USE_SHARED=off - -DARROW_JEMALLOC=off - -DARROW_BUILD_UTILITIES=OFF + -DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC} + -DARROW_BUILD_TESTS=OFF + -DARROW_DEPENDENCY_SOURCE=SYSTEM + -DARROW_DEPENDENCY_USE_SHARED=${ARROW_DEPENDENCY_USE_SHARED} + -DARROW_THRIFT_USE_SHARED=${THRIFT_USE_SHARED} + -DBUILD_WARNING_LEVEL=PRODUCTION + -DARROW_WITH_BROTLI=ON + -DARROW_WITH_BZ2=ON + -DARROW_WITH_LZ4=ON + -DARROW_WITH_SNAPPY=ON + -DARROW_WITH_ZLIB=ON + -DARROW_WITH_ZSTD=ON + -DZSTD_MSVC_LIB_PREFIX= ) vcpkg_install_cmake() @@ -45,6 +96,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/arrow) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/arrow RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/arrow/vcpkg.json b/ports/arrow/vcpkg.json new file mode 100644 index 00000000000000..98b76849430e8e --- /dev/null +++ b/ports/arrow/vcpkg.json @@ -0,0 +1,88 @@ +{ + "name": "arrow", + "version": "5.0.0", + "description": "Cross-language development platform for in-memory analytics", + "homepage": "https://arrow.apache.org", + "supports": "x64", + "dependencies": [ + "boost-filesystem", + "boost-multiprecision", + "boost-system", + "brotli", + "bzip2", + "gflags", + "glog", + "lz4", + "openssl", + "re2", + "snappy", + "thrift", + "utf8proc", + "zlib", + "zstd" + ], + "default-features": [ + "csv", + "filesystem", + "json", + "parquet" + ], + "features": { + "csv": { + "description": "CSV support" + }, + "dataset": { + "description": "Dataset support" + }, + "filesystem": { + "description": "Filesystem support" + }, + "flight": { + "description": "Arrow Flight RPC support", + "dependencies": [ + "abseil", + "c-ares", + "grpc", + "protobuf" + ] + }, + "jemalloc": { + "description": "jemalloc allocator" + }, + "json": { + "description": "JSON support", + "dependencies": [ + "rapidjson" + ] + }, + "mimalloc": { + "description": "mimalloc allocator" + }, + "orc": { + "description": "ORC support", + "dependencies": [ + "orc" + ] + }, + "parquet": { + "description": "Parquet support" + }, + "s3": { + "description": "S3 support", + "dependencies": [ + { + "name": "aws-sdk-cpp", + "default-features": false, + "features": [ + "cognito-identity", + "config", + "identity-management", + "s3", + "sts", + "transfer" + ] + } + ] + } + } +} diff --git a/ports/ashes/fix-cast.patch b/ports/ashes/fix-cast.patch new file mode 100644 index 00000000000000..27db3d2eb8c7fd --- /dev/null +++ b/ports/ashes/fix-cast.patch @@ -0,0 +1,39 @@ +diff --git a/source/ashes/renderer/D3D11Renderer/ash_direct3d11.cpp b/source/ashes/renderer/D3D11Renderer/ash_direct3d11.cpp +index fb9a195a..3a97e126 100644 +--- a/source/ashes/renderer/D3D11Renderer/ash_direct3d11.cpp ++++ b/source/ashes/renderer/D3D11Renderer/ash_direct3d11.cpp +@@ -1688,7 +1688,7 @@ namespace ashes::d3d11 + VkPeerMemoryFeatureFlags * pPeerMemoryFeatures ) + { + reportUnsupported( device, "vkGetDeviceGroupPeerMemoryFeatures" ); +- *pPeerMemoryFeatures = VK_NULL_HANDLE; ++ *pPeerMemoryFeatures = static_cast(0); + } + + void VKAPI_CALL vkCmdSetDeviceMask( +diff --git a/source/ashes/renderer/GlRenderer/ash_opengl.cpp b/source/ashes/renderer/GlRenderer/ash_opengl.cpp +index 45a17148..eec2419f 100644 +--- a/source/ashes/renderer/GlRenderer/ash_opengl.cpp ++++ b/source/ashes/renderer/GlRenderer/ash_opengl.cpp +@@ -1700,7 +1700,7 @@ namespace ashes::gl + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures ) + { + reportUnsupported( device, "vkGetDeviceGroupPeerMemoryFeatures" ); +- *pPeerMemoryFeatures = VK_NULL_HANDLE; ++ *pPeerMemoryFeatures = static_cast(0); + } + + void VKAPI_CALL vkCmdSetDeviceMask( +diff --git a/source/ashes/renderer/TestRenderer/ash_test.cpp b/source/ashes/renderer/TestRenderer/ash_test.cpp +index 741dd75c..b34647b8 100644 +--- a/source/ashes/renderer/TestRenderer/ash_test.cpp ++++ b/source/ashes/renderer/TestRenderer/ash_test.cpp +@@ -1735,7 +1735,7 @@ namespace ashes::test + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures ) + { + reportUnsupported( device, "vkGetDeviceGroupPeerMemoryFeatures" ); +- *pPeerMemoryFeatures = VK_NULL_HANDLE; ++ *pPeerMemoryFeatures = static_cast(0); + } + + void VKAPI_CALL vkCmdSetDeviceMask( diff --git a/ports/ashes/portfile.cmake b/ports/ashes/portfile.cmake new file mode 100644 index 00000000000000..ef2fcf40fd31f2 --- /dev/null +++ b/ports/ashes/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" "iOS" "Android" ON_ARCH "x86" "arm") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DragonJoker/Ashes + REF 0f4e6d0ea308eb60ae32274acc9a4d345a4977ff + SHA512 0ce74780786d018e7a447c4e49d3cd83ad53b238a79fc484025e2034cd49a64253363cd592d2da367befa7cd5443b90eb1c5dae54b22756f7b4a0cdecb93c588 + PATCHES + fix-cast.patch +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_INSTALL_PREFIX=${CURRENT_INSTALLED_DIR} + -DPROJECTS_USE_PRECOMPILED_HEADERS=OFF + -DVCPKG_PACKAGE_BUILD=ON + -DASHES_BUILD_TEMPLATES=OFF + -DASHES_BUILD_TESTS=OFF + -DASHES_BUILD_INFO=OFF + -DASHES_BUILD_SAMPLES=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ashes) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ashes/vcpkg.json b/ports/ashes/vcpkg.json new file mode 100644 index 00000000000000..cc2567786f3c4a --- /dev/null +++ b/ports/ashes/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "ashes", + "version-date": "2021-06-18", + "description": "Drop-in replacement to Vulkan's shared library, allowing the use of OpenGL or Direct3D11 in addition to Vulkan.", + "homepage": "https://github.com/DragonJoker/Ashes", + "supports": "!osx & !linux & !ios & !android & !uwp & !x86 & !arm & !static", + "dependencies": [ + "opengl", + "spirv-cross", + "vulkan-headers" + ] +} diff --git a/ports/asio/CONTROL b/ports/asio/CONTROL deleted file mode 100644 index c0da68a9bc1cb8..00000000000000 --- a/ports/asio/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: asio -Version: 1.12.2-2 -Homepage: https://github.com/chriskohlhoff/asio -Description: Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach. diff --git a/ports/asio/portfile.cmake b/ports/asio/portfile.cmake index 6c6d438a1e7e0d..c3c2a22e50a167 100644 --- a/ports/asio/portfile.cmake +++ b/ports/asio/portfile.cmake @@ -1,34 +1,29 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO chriskohlhoff/asio - REF asio-1-12-2 - SHA512 7c2e213ff154bb2e5776b37906d437a62206f973316c94706e6d42e3c2f0866e7d97f3e40225ab5f28bf2c4a33fa0b38a4b75421aef86ddf9f2da0811caa2d00 + REF asio-1-19-2 + SHA512 a6d1c5534fef0fe5ac549e1bd20919d180fbfe4c146be40ec6ebfa862534b8551778b0e79a5ba822ed645535e010646909f02f9e1d1f385ed758f07f57351ea8 HEAD_REF master ) # Always use "ASIO_STANDALONE" to avoid boost dependency -file(READ "${SOURCE_PATH}/asio/include/asio/detail/config.hpp" _contents) -string(REPLACE "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)" _contents "${_contents}") -file(WRITE "${SOURCE_PATH}/asio/include/asio/detail/config.hpp" "${_contents}") +vcpkg_replace_string("${SOURCE_PATH}/asio/include/asio/detail/config.hpp" "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)") # CMake install -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/asio") +vcpkg_cmake_config_fixup() file(INSTALL - ${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/asio/ + "${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") # Handle copyright -file(INSTALL ${SOURCE_PATH}/asio/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - +file(INSTALL "${SOURCE_PATH}/asio/LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/asio/vcpkg.json b/ports/asio/vcpkg.json new file mode 100644 index 00000000000000..380eaea25da977 --- /dev/null +++ b/ports/asio/vcpkg.json @@ -0,0 +1,37 @@ +{ + "name": "asio", + "version": "1.19.2", + "description": "Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.", + "homepage": "https://github.com/chriskohlhoff/asio", + "documentation": "https://think-async.com/Asio/asio-1.18.0/doc/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "coroutine": { + "description": "Boost.Coroutine (optional) if you use spawn() to launch coroutines", + "dependencies": [ + "boost-coroutine" + ] + }, + "openssl": { + "description": "OpenSSL (optional) if you use Asio's SSL support.", + "dependencies": [ + "openssl" + ] + }, + "regex": { + "description": "Boost.Regex (optional) if you use any of the read_until() or async_read_until() overloads that take a boost::regex parameter.", + "dependencies": [ + "boost-regex" + ] + } + } +} diff --git a/ports/asiosdk/Findasiosdk.cmake b/ports/asiosdk/Findasiosdk.cmake new file mode 100644 index 00000000000000..b8f32f83078f7b --- /dev/null +++ b/ports/asiosdk/Findasiosdk.cmake @@ -0,0 +1,37 @@ +if(WIN32) +else(WIN32) + message(FATAL_ERROR "Findasiosdk.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" ) +endif(WIN32) + +find_path( + ASIOSDK_ROOT_DIR + asiosdk +) + +if (NOT "${ASIOSDK_ROOT_DIR}" STREQUAL "") + set(ASIOSDK_ROOT_DIR + ${ASIOSDK_ROOT_DIR}/asiosdk + ) +endif() + +find_path(ASIOSDK_INCLUDE_DIR + asio.h + PATHS + ${ASIOSDK_ROOT_DIR}/common +) + + +if (NOT "${ASIOSDK_ROOT_DIR}" STREQUAL "") + set (ASIOSDK_INCLUDE_DIR + ${ASIOSDK_ROOT_DIR}/common + ${ASIOSDK_ROOT_DIR}/host + ${ASIOSDK_ROOT_DIR}/hostpc + ) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(ASIOSDK DEFAULT_MSG ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR) + +MARK_AS_ADVANCED( + ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR +) diff --git a/ports/asiosdk/portfile.cmake b/ports/asiosdk/portfile.cmake new file mode 100644 index 00000000000000..85042eabf1c879 --- /dev/null +++ b/ports/asiosdk/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "Linux" "OSX" "uwp") + +set(VERSION 2.3.3) + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.steinberg.net/sdk_downloads/asiosdk_2.3.3_2019-06-14.zip" + FILENAME "asiosdk_2.3.3_2019-06-14-eac6c1a57829.zip" + SHA512 eac6c1a57829b7f722a681c54b2f6469d54695523f08f727d0dd6744dcd7fce4f3249c57689bb15ed7a8bcb912833b226439d800913e122e0ef9ab73672f6542 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} +) + +file(INSTALL ${SOURCE_PATH}/asio/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/asiosdk/asio) +file(INSTALL ${SOURCE_PATH}/common/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/asiosdk/common) +file(INSTALL ${SOURCE_PATH}/driver/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/asiosdk/driver) +file(INSTALL ${SOURCE_PATH}/host/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/asiosdk/host) +file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/changes.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${SOURCE_PATH}/Steinberg ASIO Logo Artwork.zip" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${SOURCE_PATH}/Steinberg ASIO 2.3.3 Licensing Agreement 2.0.1 - 2019.pdf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${SOURCE_PATH}/ASIO SDK 2.3.pdf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/Findasiosdk.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/asiosdk/usage b/ports/asiosdk/usage new file mode 100644 index 00000000000000..1afa2ae84df3dc --- /dev/null +++ b/ports/asiosdk/usage @@ -0,0 +1,4 @@ +The package asiosdk provides CMake integration: + + find_package(asiosdk REQUIRED) + target_include_directories( PRIVATE ${ASIOSDK_INCLUDE_DIRS}) diff --git a/ports/asiosdk/vcpkg-cmake-wrapper.cmake b/ports/asiosdk/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..df14d7c827e016 --- /dev/null +++ b/ports/asiosdk/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(ASIOSDK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${ASIOSDK_PREV_MODULE_PATH}) diff --git a/ports/asiosdk/vcpkg.json b/ports/asiosdk/vcpkg.json new file mode 100644 index 00000000000000..d4c04063f2fe19 --- /dev/null +++ b/ports/asiosdk/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "asiosdk", + "version": "2.3.3", + "port-version": 3, + "description": "ASIO is a low latency audio API from Steinberg.", + "homepage": "https://www.steinberg.net/en/company/developers.html", + "supports": "windows & !(arm | uwp)" +} diff --git a/ports/asmjit/CONTROL b/ports/asmjit/CONTROL deleted file mode 100644 index 5387b8a1cf4e93..00000000000000 --- a/ports/asmjit/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: asmjit -Version: 2019-03-29 -Homepage: https://github.com/asmjit/asmjit -Description: Complete x86/x64 JIT and Remote Assembler for C++ diff --git a/ports/asmjit/portfile.cmake b/ports/asmjit/portfile.cmake index fa7a5ed77097f7..a33a61c0d019e8 100644 --- a/ports/asmjit/portfile.cmake +++ b/ports/asmjit/portfile.cmake @@ -1,40 +1,32 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO asmjit/asmjit - REF fc251c914e77cd079e58982cdab00a47539d7fc5 - SHA512 3db4ed97ded545994ab2e75df5bb027832c3b7adf44bdabfb89a98af4cc51f5e48d4a353b9e99f205702258dfcec70257d6d6c08db78cec941019b3f8a48232a + REF 5bc166efdb419f88bd5b5774c62cfc4d08a0bfa4 # accessed on 2020-09-14 + SHA512 6e31617e62dccbec5fa4d8aeacb1076167f870578a0dd2915403d414f8fcaab16692968287f912dc41a2ec7d10a343d5b687144f04d2ec7adb2880044752543c HEAD_REF master ) - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DASMJIT_STATIC=1 - ) + set(ASMJIT_STATIC 1) else() - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - ) + set(ASMJIT_STATIC 0) endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DASMJIT_STATIC=${ASMJIT_STATIC} + ) vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/asmjit) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/asmjit RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/asmjit/vcpkg.json b/ports/asmjit/vcpkg.json new file mode 100644 index 00000000000000..929f37b421b192 --- /dev/null +++ b/ports/asmjit/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "asmjit", + "version-string": "2020-09-14", + "port-version": 1, + "description": "Complete x86/x64 JIT and Remote Assembler for C++", + "homepage": "https://github.com/asmjit/asmjit", + "supports": "!arm" +} diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL deleted file mode 100644 index 0b2d58a514d133..00000000000000 --- a/ports/assimp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: assimp -Version: 4.1.0-8 -Homepage: https://github.com/assimp/assimp -Description: The Open Asset import library -Build-Depends: zlib, rapidjson diff --git a/ports/assimp/build_fixes.patch b/ports/assimp/build_fixes.patch new file mode 100644 index 00000000000000..7590aec96fec6f --- /dev/null +++ b/ports/assimp/build_fixes.patch @@ -0,0 +1,626 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dcafb64..761040d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,7 +51,7 @@ IF(HUNTER_ENABLED) + add_definitions(-DASSIMP_USE_HUNTER) + ENDIF(HUNTER_ENABLED) + +-PROJECT( Assimp VERSION 5.0.0 ) ++PROJECT( Assimp VERSION 5.0.1 ) + + # All supported options ############################################### + +@@ -130,6 +130,16 @@ OPTION ( IGNORE_GIT_HASH + OFF + ) + ++find_package(Stb REQUIRED) ++include_directories(${Stb_INCLUDE_DIR}) ++find_package(utf8cpp CONFIG REQUIRED) ++link_libraries(utf8cpp) ++find_package(RapidJSON CONFIG REQUIRED) ++include_directories(${RAPIDJSON_INCLUDE_DIRS}) ++find_path(UNZIP_INCLUDE_DIRS "minizip/unzip.h") ++include_directories(${UNZIP_INCLUDE_DIRS}/minizip) ++include_directories(${CMAKE_CURRENT_SOURCE_DIR}/contrib) ++ + IF (IOS AND NOT HUNTER_ENABLED) + IF (NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "Release") +@@ -230,10 +240,8 @@ SET(LIBASSIMP-DEV_COMPONENT "libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_M + SET(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} ${LIBASSIMP-DEV_COMPONENT} assimp-dev) + SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names") + +-IF( UNIX ) + # Use GNUInstallDirs for Unix predefined directories + INCLUDE(GNUInstallDirs) +-ENDIF( UNIX ) + + # Grouped compiler settings + IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW) +@@ -253,7 +261,6 @@ ELSEIF(MSVC) + IF(MSVC12) + ADD_COMPILE_OPTIONS(/wd4351) + ENDIF() +- SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Ob2 /DEBUG:FULL /Zi") + ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) + IF(NOT HUNTER_ENABLED) + SET(CMAKE_CXX_FLAGS "-fPIC -std=c++11 ${CMAKE_CXX_FLAGS}") +@@ -352,35 +359,21 @@ IF (NOT TARGET uninstall) + ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") + ENDIF() + +-IF(HUNTER_ENABLED) +- set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}") ++ set(CONFIG_INSTALL_DIR "share/assimp") + set(INCLUDE_INSTALL_DIR "include") + +- set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") ++ string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE) ++ set(NAMESPACE "${PROJECT_NAME_LOWERCASE}::") + +- # Configuration +- set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake") +- set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake") +- set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") +- set(NAMESPACE "${PROJECT_NAME}::") ++ set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWERCASE}Config") ++ set(VERSION_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWERCASE}ConfigVersion.cmake") ++ set(NAMESPACE "${PROJECT_NAME_LOWERCASE}::") + +- # Include module with fuction 'write_basic_package_version_file' + include(CMakePackageConfigHelpers) +- +- # Note: PROJECT_VERSION is used as a VERSION +- write_basic_package_version_file("${VERSION_CONFIG}" COMPATIBILITY SameMajorVersion) +- +- # Use variables: +- # * TARGETS_EXPORT_NAME +- # * PROJECT_NAME +- configure_package_config_file( +- "cmake/assimp-hunter-config.cmake.in" +- "${PROJECT_CONFIG}" +- INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}" +- ) ++ write_basic_package_version_file("${VERSION_CONFIG}" VERSION ${${PROJECT_NAME}_VERSION} COMPATIBILITY SameMajorVersion) + + install( +- FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}" ++ FILES ${VERSION_CONFIG} + DESTINATION "${CONFIG_INSTALL_DIR}" + ) + +@@ -389,30 +382,6 @@ IF(HUNTER_ENABLED) + NAMESPACE "${NAMESPACE}" + DESTINATION "${CONFIG_INSTALL_DIR}" + ) +-ELSE(HUNTER_ENABLED) +- # cmake configuration files +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" @ONLY IMMEDIATE) +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake" @ONLY IMMEDIATE) +- IF (is_multi_config) +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-debug.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" @ONLY IMMEDIATE) +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-release.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake" @ONLY IMMEDIATE) +- SET(PACKAGE_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake") +- ELSEIF (CMAKE_BUILD_TYPE STREQUAL Debug) +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-debug.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" @ONLY IMMEDIATE) +- SET(PACKAGE_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake") +- ELSE() +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-release.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake" @ONLY IMMEDIATE) +- SET(PACKAGE_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake") +- ENDIF() +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config-version.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" @ONLY IMMEDIATE) +- #we should generated these scripts after CMake VERSION 3.0.2 using export(EXPORT ...) and write_basic_package_version_file(...) +- INSTALL(FILES +- "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake" +- ${PACKAGE_TARGETS_FILE} +- DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT}) +-ENDIF(HUNTER_ENABLED) + + FIND_PACKAGE( DirectX ) + +@@ -422,63 +391,19 @@ ENDIF( BUILD_DOCS ) + + # Look for system installed irrXML + IF ( SYSTEM_IRRXML ) +- FIND_PACKAGE( IrrXML REQUIRED ) ++ FIND_PACKAGE( irrlicht CONFIG REQUIRED ) + ENDIF( SYSTEM_IRRXML ) + + # Search for external dependencies, and build them from source if not found + # Search for zlib +-IF(HUNTER_ENABLED) +- hunter_add_package(ZLIB) +- find_package(ZLIB CONFIG REQUIRED) ++ find_package(ZLIB REQUIRED) + + add_definitions(-DASSIMP_BUILD_NO_OWN_ZLIB) + set(ZLIB_FOUND TRUE) +- set(ZLIB_LIBRARIES ZLIB::zlib) +- set(ASSIMP_BUILD_MINIZIP TRUE) +-ELSE(HUNTER_ENABLED) +- IF ( NOT ASSIMP_BUILD_ZLIB ) +- FIND_PACKAGE(ZLIB) +- ENDIF( NOT ASSIMP_BUILD_ZLIB ) +- +- IF( NOT ZLIB_FOUND ) +- MESSAGE(STATUS "compiling zlib from sources") +- INCLUDE(CheckIncludeFile) +- INCLUDE(CheckTypeSize) +- INCLUDE(CheckFunctionExists) +- +- # Explicitly turn off ASM686 and AMD64 cmake options. +- # The AMD64 option causes a build failure on MSVC and the ASM builds seem to have problems: +- # https://github.com/madler/zlib/issues/41#issuecomment-125848075 +- # Also prevents these options from "polluting" the cmake options if assimp is being +- # included as a submodule. +- set( ASM686 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) +- set( AMD64 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) +- +- # compile from sources +- ADD_SUBDIRECTORY(contrib/zlib) +- SET(ZLIB_FOUND 1) +- SET(ZLIB_LIBRARIES zlibstatic) +- SET(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib) +- # need to ensure we don't link with system zlib or minizip as well. +- SET(ASSIMP_BUILD_MINIZIP 1) +- ELSE(NOT ZLIB_FOUND) +- ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB) +- SET(ZLIB_LIBRARIES_LINKED -lz) +- ENDIF(NOT ZLIB_FOUND) ++ set(ZLIB_LIBRARIES ZLIB::ZLIB) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) +-ENDIF(HUNTER_ENABLED) + +-IF( NOT IOS ) +- IF( NOT ASSIMP_BUILD_MINIZIP ) +- use_pkgconfig(UNZIP minizip) +- ENDIF( NOT ASSIMP_BUILD_MINIZIP ) +-ELSE ( NOT IOS ) +- IF( NOT BUILD_SHARED_LIBS ) +- IF( NOT ASSIMP_BUILD_MINIZIP ) +- use_pkgconfig(UNZIP minizip) +- ENDIF( NOT ASSIMP_BUILD_MINIZIP ) +- ENDIF ( NOT BUILD_SHARED_LIBS ) +-ENDIF ( NOT IOS ) ++ find_package(minizip CONFIG REQUIRED) + + IF ( ASSIMP_NO_EXPORT ) + ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT) +@@ -633,7 +558,7 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES) + INCLUDE(DebSourcePPA) + ENDIF() + +-if(WIN32) ++if(0) + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/") + SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/") +@@ -677,4 +602,4 @@ if(WIN32) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) + ENDIF() + ENDIF(MSVC12 OR MSVC14 OR MSVC15 ) +-ENDIF (WIN32) ++ENDIF (0) +diff --git a/assimpTargets.cmake.in b/assimpTargets.cmake.in +index ab1a8d2..4b0729b 100644 +--- a/assimpTargets.cmake.in ++++ b/assimpTargets.cmake.in +@@ -5,6 +5,8 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + endif() + cmake_policy(PUSH) + cmake_policy(VERSION 2.6) ++# Required for the evaluation of "if(@BUILD_SHARED_LIBS@)" below to function ++cmake_policy(SET CMP0012 NEW) + #---------------------------------------------------------------- + # Generated CMake target import file. + #---------------------------------------------------------------- +diff --git a/code/3MF/D3MFExporter.cpp b/code/3MF/D3MFExporter.cpp +index 1f388ad..1ccd2aa 100644 +--- a/code/3MF/D3MFExporter.cpp ++++ b/code/3MF/D3MFExporter.cpp +@@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include ++# include + #endif + + namespace Assimp { +@@ -255,7 +255,7 @@ void D3MFExporter::writeBaseMaterials() { + hexDiffuseColor.clear(); + tmp.clear(); + hexDiffuseColor = "#"; +- ++ + tmp = DecimalToHexa( color.r ); + hexDiffuseColor += tmp; + tmp = DecimalToHexa( color.g ); +diff --git a/code/Blender/BlenderTessellator.h b/code/Blender/BlenderTessellator.h +index 518e56c..ec4a653 100644 +--- a/code/Blender/BlenderTessellator.h ++++ b/code/Blender/BlenderTessellator.h +@@ -147,7 +147,7 @@ namespace Assimp + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include "../contrib/poly2tri/poly2tri/poly2tri.h" ++# include + #endif + + namespace Assimp +diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt +index 55538d9..f5553e5 100644 +--- a/code/CMakeLists.txt ++++ b/code/CMakeLists.txt +@@ -862,89 +862,24 @@ SET( Extra_SRCS + SOURCE_GROUP( Extra FILES ${Extra_SRCS}) + + # irrXML +-IF(HUNTER_ENABLED) +- hunter_add_package(irrXML) + find_package(irrXML CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- # irrXML already included in contrib directory by parent CMakeLists.txt. +-ENDIF(HUNTER_ENABLED) +- +-# utf8 +-IF(HUNTER_ENABLED) +- hunter_add_package(utf8) +- find_package(utf8 CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- # utf8 is header-only, so Assimp doesn't need to do anything. +-ENDIF(HUNTER_ENABLED) + + # polyclipping +-IF(HUNTER_ENABLED) +- hunter_add_package(polyclipping) + find_package(polyclipping CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) + SET( Clipper_SRCS + ../contrib/clipper/clipper.hpp + ../contrib/clipper/clipper.cpp + ) + SOURCE_GROUP( Contrib\\Clipper FILES ${Clipper_SRCS}) +-ENDIF(HUNTER_ENABLED) + + # poly2tri +-IF(HUNTER_ENABLED) +- hunter_add_package(poly2tri) + find_package(poly2tri CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- SET( Poly2Tri_SRCS +- ../contrib/poly2tri/poly2tri/common/shapes.cc +- ../contrib/poly2tri/poly2tri/common/shapes.h +- ../contrib/poly2tri/poly2tri/common/utils.h +- ../contrib/poly2tri/poly2tri/sweep/advancing_front.h +- ../contrib/poly2tri/poly2tri/sweep/advancing_front.cc +- ../contrib/poly2tri/poly2tri/sweep/cdt.cc +- ../contrib/poly2tri/poly2tri/sweep/cdt.h +- ../contrib/poly2tri/poly2tri/sweep/sweep.cc +- ../contrib/poly2tri/poly2tri/sweep/sweep.h +- ../contrib/poly2tri/poly2tri/sweep/sweep_context.cc +- ../contrib/poly2tri/poly2tri/sweep/sweep_context.h +- ) +- SOURCE_GROUP( Contrib\\Poly2Tri FILES ${Poly2Tri_SRCS}) +-ENDIF(HUNTER_ENABLED) + + # minizip/unzip +-IF(HUNTER_ENABLED) +- hunter_add_package(minizip) + find_package(minizip CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- SET( unzip_SRCS +- ../contrib/unzip/crypt.h +- ../contrib/unzip/ioapi.c +- ../contrib/unzip/ioapi.h +- ../contrib/unzip/unzip.c +- ../contrib/unzip/unzip.h +- ) +- SOURCE_GROUP(Contrib\\unzip FILES ${unzip_SRCS}) +-ENDIF(HUNTER_ENABLED) + + # zip (https://github.com/kuba--/zip) +-IF(HUNTER_ENABLED) +- hunter_add_package(zip) +- find_package(zip CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- SET( ziplib_SRCS +- ../contrib/zip/src/miniz.h +- ../contrib/zip/src/zip.c +- ../contrib/zip/src/zip.h +- ) +- +- # TODO if cmake required version has been updated to >3.12.0, collapse this to the second case only +- if(${CMAKE_VERSION} VERSION_LESS "3.12.0") +- add_definitions(-DMINIZ_USE_UNALIGNED_LOADS_AND_STORES=0) +- else() +- add_compile_definitions(MINIZ_USE_UNALIGNED_LOADS_AND_STORES=0) +- endif() +- +- SOURCE_GROUP( ziplib FILES ${ziplib_SRCS} ) +-ENDIF(HUNTER_ENABLED) ++ find_package(kubazip CONFIG REQUIRED) + + # openddlparser + IF(HUNTER_ENABLED) +@@ -1021,13 +956,7 @@ ELSE () + ENDIF () + + # RapidJSON +-IF(HUNTER_ENABLED) +- hunter_add_package(RapidJSON) + find_package(RapidJSON CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- INCLUDE_DIRECTORIES( "../contrib/rapidjson/include" ) +- INCLUDE_DIRECTORIES( "../contrib" ) +-ENDIF(HUNTER_ENABLED) + + # VC2010 fixes + if(MSVC10) +@@ -1044,15 +973,6 @@ if ( MSVC ) + ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS ) + endif ( MSVC ) + +-IF(NOT HUNTER_ENABLED) +- if (UNZIP_FOUND) +- SET (unzip_compile_SRCS "") +- else (UNZIP_FOUND) +- SET (unzip_compile_SRCS ${unzip_SRCS}) +- INCLUDE_DIRECTORIES( "../contrib/unzip/" ) +- endif (UNZIP_FOUND) +-ENDIF(NOT HUNTER_ENABLED) +- + MESSAGE(STATUS "Enabled importer formats:${ASSIMP_IMPORTERS_ENABLED}") + MESSAGE(STATUS "Disabled importer formats:${ASSIMP_IMPORTERS_DISABLED}") + +@@ -1111,22 +1031,14 @@ TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC + $ + ) + +-IF(HUNTER_ENABLED) + TARGET_LINK_LIBRARIES(assimp +- PUBLIC + polyclipping::polyclipping + irrXML::irrXML +- openddlparser::openddl_parser +- poly2tri::poly2tri + minizip::minizip +- ZLIB::zlib +- RapidJSON::rapidjson +- utf8::utf8 +- zip::zip ++ ZLIB::ZLIB ++ kubazip::kubazip ++ poly2tri::poly2tri + ) +-ELSE(HUNTER_ENABLED) +- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} ) +-ENDIF(HUNTER_ENABLED) + + if(ASSIMP_ANDROID_JNIIOSYSTEM) + set(ASSIMP_ANDROID_JNIIOSYSTEM_PATH port/AndroidJNI) +@@ -1208,21 +1120,12 @@ ENDIF(APPLE) + + # Build against external unzip, or add ../contrib/unzip so + # assimp can #include "unzip.h" +-IF(NOT HUNTER_ENABLED) +- if (UNZIP_FOUND) +- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) +- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) +- else (UNZIP_FOUND) +- INCLUDE_DIRECTORIES("../") +- endif (UNZIP_FOUND) +-ENDIF(NOT HUNTER_ENABLED) + + # Add RT-extension library for glTF importer with Open3DGC-compression. + IF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC) + TARGET_LINK_LIBRARIES(assimp ${RT_LIBRARY}) + ENDIF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC) + +-IF(HUNTER_ENABLED) + INSTALL( TARGETS assimp + EXPORT "${TARGETS_EXPORT_NAME}" + LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +@@ -1231,14 +1134,6 @@ IF(HUNTER_ENABLED) + FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR} + COMPONENT ${LIBASSIMP_COMPONENT} + INCLUDES DESTINATION "include") +-ELSE(HUNTER_ENABLED) +-INSTALL( TARGETS assimp +- LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +- ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +- RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR} +- FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +- COMPONENT ${LIBASSIMP_COMPONENT}) +-ENDIF(HUNTER_ENABLED) + INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev) + INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev) + +diff --git a/code/Common/BaseImporter.cpp b/code/Common/BaseImporter.cpp +index b77bbfe..51cba43 100644 +--- a/code/Common/BaseImporter.cpp ++++ b/code/Common/BaseImporter.cpp +@@ -344,7 +344,7 @@ std::string BaseImporter::GetExtension( const std::string& file ) { + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include "../contrib/utf8cpp/source/utf8.h" ++# include + #endif + + // ------------------------------------------------------------------------------------------------ +@@ -364,8 +364,8 @@ void BaseImporter::ConvertToUTF8(std::vector& data) + data.resize(data.size()-3); + return; + } +- +- ++ ++ + // UTF 32 BE with BOM + if(*((uint32_t*)&data.front()) == 0xFFFE0000) { + +@@ -507,7 +507,7 @@ struct Assimp::BatchData { + , next_id(0xffff) + , validate( validate ) { + ai_assert( nullptr != pIO ); +- ++ + pImporter = new Importer(); + pImporter->SetIOHandler( pIO ); + } +diff --git a/code/Importer/IFC/IFCGeometry.cpp b/code/Importer/IFC/IFCGeometry.cpp +index d1c7aee..8e11373 100644 +--- a/code/Importer/IFC/IFCGeometry.cpp ++++ b/code/Importer/IFC/IFCGeometry.cpp +@@ -51,9 +51,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #ifdef ASSIMP_USE_HUNTER + # include +-# include ++# include "../contrib/clipper/clipper.hpp" + #else +-# include "../contrib/poly2tri/poly2tri/poly2tri.h" ++# include + # include "../contrib/clipper/clipper.hpp" + #endif + +diff --git a/code/Importer/IFC/IFCOpenings.cpp b/code/Importer/IFC/IFCOpenings.cpp +index d6c40b3..387c625 100644 +--- a/code/Importer/IFC/IFCOpenings.cpp ++++ b/code/Importer/IFC/IFCOpenings.cpp +@@ -51,9 +51,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #ifdef ASSIMP_USE_HUNTER + # include +-# include ++# include "../contrib/clipper/clipper.hpp" + #else +-# include "../contrib/poly2tri/poly2tri/poly2tri.h" ++# include + # include "../contrib/clipper/clipper.hpp" + #endif + +@@ -911,14 +911,14 @@ size_t CloseWindows(ContourVector& contours, + // compare base poly normal and contour normal to detect if we need to reverse the face winding + if(curmesh.mVertcnt.size() > 0) { + IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal(curmesh.mVerts.data(), curmesh.mVertcnt.front()); +- ++ + std::vector worldSpaceContourVtx(it->contour.size()); +- ++ + for(size_t a = 0; a < it->contour.size(); ++a) + worldSpaceContourVtx[a] = minv * IfcVector3(it->contour[a].x, it->contour[a].y, 0.0); +- ++ + IfcVector3 contourNormal = TempMesh::ComputePolygonNormal(worldSpaceContourVtx.data(), worldSpaceContourVtx.size()); +- ++ + reverseCountourFaces = (contourNormal * basePolyNormal) > 0.0; + } + +diff --git a/code/Importer/STEPParser/STEPFileEncoding.cpp b/code/Importer/STEPParser/STEPFileEncoding.cpp +index 101dcdf..3f12403 100644 +--- a/code/Importer/STEPParser/STEPFileEncoding.cpp ++++ b/code/Importer/STEPParser/STEPFileEncoding.cpp +@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include ++# include + #endif + + #include +diff --git a/code/MMD/MMDPmxParser.cpp b/code/MMD/MMDPmxParser.cpp +index 80f0986..47725e2 100644 +--- a/code/MMD/MMDPmxParser.cpp ++++ b/code/MMD/MMDPmxParser.cpp +@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include "../contrib/utf8cpp/source/utf8.h" ++# include + #endif + #include + +@@ -102,7 +102,7 @@ namespace pmx + const unsigned int targetSize = size * 3; // enough to encode + char *targetStart = new char[targetSize]; + std::memset(targetStart, 0, targetSize * sizeof(char)); +- ++ + utf8::utf16to8( sourceStart, sourceStart + size/2, targetStart ); + + std::string result(targetStart); +diff --git a/code/SIB/SIBImporter.cpp b/code/SIB/SIBImporter.cpp +index 20cdc80..46e9a32 100644 +--- a/code/SIB/SIBImporter.cpp ++++ b/code/SIB/SIBImporter.cpp +@@ -63,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # include + #else + //# include "../contrib/ConvertUTF/ConvertUTF.h" +-# include "../contrib/utf8cpp/source/utf8.h" ++# include + #endif + #include + #include +@@ -90,10 +90,10 @@ struct SIBChunk { + uint32_t Size; + } PACK_STRUCT; + +-enum { +- POS, +- NRM, +- UV, ++enum { ++ POS, ++ NRM, ++ UV, + N + }; + +diff --git a/code/X3D/FIReader.cpp b/code/X3D/FIReader.cpp +index 9bb2c69..525a084 100644 +--- a/code/X3D/FIReader.cpp ++++ b/code/X3D/FIReader.cpp +@@ -63,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include "../contrib/utf8cpp/source/utf8.h" ++# include + #endif + #include + #include +diff --git a/contrib/clipper/clipper.hpp b/contrib/clipper/clipper.hpp +index 7cdac6c..2728425 100644 +--- a/contrib/clipper/clipper.hpp ++++ b/contrib/clipper/clipper.hpp +@@ -302,5 +302,3 @@ class clipperException : public std::exception + } //ClipperLib namespace + + #endif //clipper_hpp +- +- +diff --git a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp +index 8d25aaa..e4bc306 100644 +--- a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp ++++ b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp +@@ -19,7 +19,7 @@ + #include + + #define STB_IMAGE_IMPLEMENTATION +-#include "contrib/stb_image/stb_image.h" ++#include + + #include + diff --git a/ports/assimp/dont-overwrite-prefix-path.patch b/ports/assimp/dont-overwrite-prefix-path.patch deleted file mode 100644 index fc58a99c5f9c5b..00000000000000 --- a/ports/assimp/dont-overwrite-prefix-path.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d781d1f..0d64d50 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -92,7 +92,6 @@ if (WIN32) - endif() - - IF(MSVC) -- set (CMAKE_PREFIX_PATH "D:\\libs\\devil") - OPTION( ASSIMP_INSTALL_PDB - "Install MSVC debug files." - ON diff --git a/ports/assimp/irrlicht.patch b/ports/assimp/irrlicht.patch new file mode 100644 index 00000000000000..3457056c4f07cc --- /dev/null +++ b/ports/assimp/irrlicht.patch @@ -0,0 +1,61 @@ +diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt +index f5553e5..5cffa0c 100644 +--- a/code/CMakeLists.txt ++++ b/code/CMakeLists.txt +@@ -862,7 +862,7 @@ SET( Extra_SRCS + SOURCE_GROUP( Extra FILES ${Extra_SRCS}) + + # irrXML +- find_package(irrXML CONFIG REQUIRED) ++ find_package(irrlicht CONFIG REQUIRED) + + # polyclipping + find_package(polyclipping CONFIG REQUIRED) +@@ -1033,7 +1033,7 @@ TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC + + TARGET_LINK_LIBRARIES(assimp + polyclipping::polyclipping +- irrXML::irrXML ++ Irrlicht + minizip::minizip + ZLIB::ZLIB + kubazip::kubazip +diff --git a/code/X3D/FIReader.cpp b/code/X3D/FIReader.cpp +index 525a084..0cbca48 100644 +--- a/code/X3D/FIReader.cpp ++++ b/code/X3D/FIReader.cpp +@@ -654,8 +654,8 @@ public: + return currentNodeType; + } + +- virtual int getAttributeCount() const /*override*/ { +- return static_cast(attributes.size()); ++ virtual unsigned int getAttributeCount() const /*override*/ { ++ return static_cast(attributes.size()); + } + + virtual const char* getAttributeName(int idx) const /*override*/ { +@@ -1733,7 +1733,7 @@ public: + return reader->getNodeType(); + } + +- virtual int getAttributeCount() const /*override*/ { ++ virtual unsigned int getAttributeCount() const /*override*/ { + return reader->getAttributeCount(); + } + +diff --git a/include/assimp/irrXMLWrapper.h b/include/assimp/irrXMLWrapper.h +index 77cfd5e..ba584a0 100644 +--- a/include/assimp/irrXMLWrapper.h ++++ b/include/assimp/irrXMLWrapper.h +@@ -133,8 +133,8 @@ public: + + // ---------------------------------------------------------------------------------- + //! Returns size of file in bytes +- virtual int getSize() { +- return (int)data.size(); ++ virtual long getSize() const override { ++ return (long)data.size(); + } + + private: diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index b690b79d043353..3527124ce163d5 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -1,28 +1,33 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO assimp/assimp - REF v4.1.0 - SHA512 5f1292de873ae16c9921d1d44f2871474d74c0ddfd76cc928a7d9b3e03aa6eca4cc72af0513da20a86d09c55d48646e610fd4a4f2b05364f08ad09cf27cbc67a + REF 8f0c6b04b2257a520aaab38421b2e090204b69df # v5.0.1 + SHA512 59b213428e2f7494cb5da423e6b2d51556318f948b00cea420090d74d4f5f0f8970d38dba70cd47b2ef35a1f57f9e15df8597411b6cd8732b233395080147c0f HEAD_REF master PATCHES - dont-overwrite-prefix-path.patch - uninitialized-variable.patch - remove-useless-path.patch + build_fixes.patch + irrlicht.patch ) file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/zlib ${SOURCE_PATH}/contrib/gtest ${SOURCE_PATH}/contrib/rapidjson) +file(REMOVE ${SOURCE_PATH}/cmake-modules/FindIrrXML.cmake) +#file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/clipper) # https://github.com/assimp/assimp/issues/788 +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/poly2tri) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/zlib) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/gtest) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/irrXML) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/rapidjson) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/stb_image) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/zip) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/unzip) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/utf8cpp) +#file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/Open3DGC) #TODO +#file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/openddlparser) #TODO set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(VCPKG_BUILD_SHARED_LIBS ON) -else() - set(VCPKG_BUILD_SHARED_LIBS OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ASSIMP_BUILD_SHARED_LIBS) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -30,43 +35,56 @@ vcpkg_configure_cmake( OPTIONS -DASSIMP_BUILD_TESTS=OFF -DASSIMP_BUILD_ASSIMP_VIEW=OFF -DASSIMP_BUILD_ZLIB=OFF - -DASSIMP_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} + -DASSIMP_BUILD_SHARED_LIBS=${ASSIMP_BUILD_SHARED_LIBS} -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_INSTALL_PDB=OFF - #-DSYSTEM_IRRXML=ON # Wait for the built-in irrxml to synchronize with port irrlich, add dependencies and enable this macro + -DSYSTEM_IRRXML=ON + -DIGNORE_GIT_HASH=ON ) vcpkg_install_cmake() -FILE(GLOB lib_cmake_directories RELATIVE "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}/lib/cmake/assimp-*") -list(GET lib_cmake_directories 0 lib_cmake_directory) -vcpkg_fixup_cmake_targets(CONFIG_PATH "${lib_cmake_directory}") +if(VCPKG_TARGET_IS_WINDOWS) + set(VCVER vc140 vc141 vc142 ) + set(CRT mt md) + set(DBG_NAMES) + set(REL_NAMES) + foreach(_ver IN LISTS VCVER) + foreach(_crt IN LISTS CRT) + list(APPEND DBG_NAMES assimp-${_ver}-${_crt}d) + list(APPEND REL_NAMES assimp-${_ver}-${_crt}) + endforeach() + endforeach() +endif() + +find_library(ASSIMP_REL NAMES assimp ${REL_NAMES} PATHS "${CURRENT_PACKAGES_DIR}/lib" NO_DEFAULT_PATH) +find_library(ASSIMP_DBG NAMES assimp assimpd ${DBG_NAMES} PATHS "${CURRENT_PACKAGES_DIR}/debug/lib" NO_DEFAULT_PATH) +if(ASSIMP_REL) + get_filename_component(ASSIMP_NAME_REL "${ASSIMP_REL}" NAME_WLE) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/assimp.pc" "-lassimp" "-l${ASSIMP_NAME_REL}") +endif() +if(ASSIMP_DBG) + get_filename_component(ASSIMP_NAME_DBG "${ASSIMP_DBG}" NAME_WLE) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/assimp.pc" "-lassimp" "-l${ASSIMP_NAME_DBG}") +endif() +vcpkg_fixup_cmake_targets() +vcpkg_fixup_pkgconfig() # Probably requires more fixing for static builds. See qt5-3d and the config changes below vcpkg_copy_pdbs() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) +file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimpConfig.cmake ASSIMP_CONFIG) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/assimpConfig.cmake " +include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +find_dependency(irrlicht CONFIG) +find_dependency(polyclipping CONFIG) +find_dependency(minizip CONFIG) +find_dependency(kubazip CONFIG) +find_dependency(poly2tri CONFIG) +find_dependency(utf8cpp CONFIG) +${ASSIMP_CONFIG}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG) -string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)" - "set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG}) - -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" - "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) - else() - string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" - "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib \${ASSIMP_LIBRARY_DIRS}/IrrXML.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib \${ASSIMP_LIBRARY_DIRS}/../debug/lib/IrrXMLd.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) - endif() -else() - string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" - "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/lib\${ASSIMP_LIBRARIES}.a \${ASSIMP_LIBRARY_DIRS}/libIrrXML.a \${ASSIMP_LIBRARY_DIRS}/libz.a debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/lib\${ASSIMP_LIBRARIES}d.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libIrrXMLd.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libz.a)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) -endif() - -file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake "${ASSIMP_CONFIG}") - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/assimp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/assimp/LICENSE ${CURRENT_PACKAGES_DIR}/share/assimp/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/assimp/remove-useless-path.patch b/ports/assimp/remove-useless-path.patch deleted file mode 100644 index d16494f98e0f18..00000000000000 --- a/ports/assimp/remove-useless-path.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4a20cee..4fcb8dd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -108,7 +108,6 @@ if (WIN32) - endif() - - IF(MSVC) -- SET (CMAKE_PREFIX_PATH "D:\\libs\\devil") - OPTION( ASSIMP_INSTALL_PDB - "Install MSVC debug files." - ON diff --git a/ports/assimp/uninitialized-variable.patch b/ports/assimp/uninitialized-variable.patch deleted file mode 100644 index f7b51c143a1b61..00000000000000 --- a/ports/assimp/uninitialized-variable.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h -index 916fb1f..a7bc178 100644 ---- a/contrib/zip/src/miniz.h -+++ b/contrib/zip/src/miniz.h -@@ -4420,7 +4420,7 @@ mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name - #ifndef MINIZ_NO_STDIO - mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags) - { -- mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes; -+ mz_uint uncomp_crc32 = MZ_CRC32_INIT, level = 0, num_alignment_padding_bytes; - mz_uint16 method = 0, dos_time = 0, dos_date = 0, ext_attributes = 0; - mz_uint64 local_dir_header_ofs, cur_archive_file_ofs, uncomp_size = 0, comp_size = 0; - size_t archive_name_size; diff --git a/ports/assimp/vcpkg.json b/ports/assimp/vcpkg.json new file mode 100644 index 00000000000000..3e573c17d5ac41 --- /dev/null +++ b/ports/assimp/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "assimp", + "version-string": "5.0.1", + "port-version": 5, + "description": "The Open Asset import library", + "homepage": "https://github.com/assimp/assimp", + "dependencies": [ + "irrlicht", + "kubazip", + "minizip", + "poly2tri", + "polyclipping", + "rapidjson", + "stb", + "utfcpp", + "zlib" + ] +} diff --git a/ports/asynch/portfile.cmake b/ports/asynch/portfile.cmake new file mode 100644 index 00000000000000..8f538a222a6816 --- /dev/null +++ b/ports/asynch/portfile.cmake @@ -0,0 +1,13 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO naasking/async.h + REF 080cbb257ab60ad06008c574d7feb94f8478efdd #Commits on Sep 21, 2019 + SHA512 4fe0229ffd8b3c6438294a419ccb213b4d28a0a04d834406b67120e9bc90d339ec91f3b3eb52d4e27c1f12add41e9347bffbea47868b0d7a1da40f784d113c71 + HEAD_REF master +) + +# Copy the single reusable library header +file(COPY ${SOURCE_PATH}/async/async.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/asynch/vcpkg.json b/ports/asynch/vcpkg.json new file mode 100644 index 00000000000000..0ee8a5df26a511 --- /dev/null +++ b/ports/asynch/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "asynch", + "version-string": "2019-09-21", + "port-version": 2, + "description": "Async.h - asynchronous, stackless subroutines.", + "homepage": "https://github.com/naasking/async.h" +} diff --git a/ports/asyncplusplus/CONTROL b/ports/asyncplusplus/CONTROL deleted file mode 100644 index eb82afe70feb29..00000000000000 --- a/ports/asyncplusplus/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: asyncplusplus -Version: 1.0-1 -Description: Async++ is a lightweight concurrency framework for C++11 diff --git a/ports/asyncplusplus/portfile.cmake b/ports/asyncplusplus/portfile.cmake index d348dc83e92ca0..d412f1148b8dc3 100644 --- a/ports/asyncplusplus/portfile.cmake +++ b/ports/asyncplusplus/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Amanieu/asyncplusplus - REF v1.0 - SHA512 bb1fc032d2d8de49b4505e0629d48e5cfa99edfcafbf17848f160ceb320bcd993f1549095248d1a0ef8fc1ec07ecbaad6b634a770ddc1974092d373a508a5fe3 + REF 172ca3f8e0df1b3f7f5ee8b8244e4ac67258b0d8 # v1.1 + SHA512 fd95b3349ceed4cab5cb0e146d2ccfe77c85318303015cf513037fc69c1ade7cfdb3dc81de8a90846c4387c5e31f5a70a64da770547c201dfe24d2c181be1933 HEAD_REF master ) @@ -30,5 +28,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/asyncplusplus) file(RENAME ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/LICENSE ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/copyright) - -vcpkg_test_cmake(PACKAGE_NAME Async++) diff --git a/ports/asyncplusplus/vcpkg.json b/ports/asyncplusplus/vcpkg.json new file mode 100644 index 00000000000000..d768e7bed2f86a --- /dev/null +++ b/ports/asyncplusplus/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "asyncplusplus", + "version-string": "1.1", + "port-version": 1, + "description": "Async++ is a lightweight concurrency framework for C++11", + "supports": "!uwp" +} diff --git a/ports/atk/CMakeLists.txt b/ports/atk/CMakeLists.txt deleted file mode 100644 index 41937fff940f17..00000000000000 --- a/ports/atk/CMakeLists.txt +++ /dev/null @@ -1,134 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(atk C) - -set(ATK_LIB_SUFFIX 1.0) -set(ATK_DLL_SUFFIX 1) -set(GLIB_LIB_VERSION 2.0) - -if(BUILD_SHARED_LIBS) - set(ATK_EXPORT_MACRO DLL_EXPORT) -endif() - -# generate atkmarshal.c and atkmarshal.h source files -# glib-genmarshal should be installed along with glib -find_program(GLIB_GENMARSHAL glib-genmarshal PATH_SUFFIXES glib) -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/atk) - -message("Generating atkmarshal.h: ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header") -execute_process( - COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/atk - OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/atk/atkmarshal.h -) - -message("Generating atkmarshal.c: ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body") -execute_process( - COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/atk - OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/atk/atkmarshal.c -) - -configure_file(config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) -add_definitions(-DHAVE_CONFIG_H) -include_directories(. ./atk ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/atk) - -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_VERSION}) -find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_VERSION}) -find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_VERSION}) -set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GOBJECT_LIBRARY} ${GLIB_GMODULE_LIBRARY}) - -find_path(LIBINTL_INCLUDE_DIR libintl.h) -find_library(LIBINTL_LIBRARY NAMES libintl intl) - -set(ATK_SOURCES - atk/atkaction.c - atk/atkcomponent.c - atk/atkdocument.c - atk/atkeditabletext.c - atk/atkgobjectaccessible.c - atk/atkhyperlink.c - atk/atkhyperlinkimpl.c - atk/atkhypertext.c - atk/atkimage.c - atk/atknoopobject.c - atk/atknoopobjectfactory.c - atk/atkobject.c - atk/atkobjectfactory.c - atk/atkplug.c - atk/atkprivate.c - atk/atkrange.c - atk/atkregistry.c - atk/atkrelation.c - atk/atkrelationset.c - atk/atkselection.c - atk/atksocket.c - atk/atkstate.c - atk/atkstateset.c - atk/atkstreamablecontent.c - atk/atktable.c - atk/atktablecell.c - atk/atktext.c - atk/atkutil.c - atk/atkmisc.c - atk/atkvalue.c - atk/atkversion.c - atk/atkwindow.c - atk/atk-enum-types.c) - -add_library(atk ${ATK_SOURCES}) -target_compile_definitions(atk PRIVATE ATK_COMPILATION ${ATK_EXPORT_MACRO} G_DISABLE_SINGLE_INCLUDES ATK_LOCALEDIR="/dummy/share/locale") -target_link_libraries(atk ${LIBINTL_LIBRARY} ${GLIB_LIBRARIES}) -target_include_directories(atk PRIVATE ${GLIB_INCLUDE_DIR} ${LIBINTL_INCLUDE_DIR}) - -set_target_properties(atk PROPERTIES - OUTPUT_NAME atk-${ATK_DLL_SUFFIX} - ARCHIVE_OUTPUT_NAME atk-${ATK_LIB_SUFFIX}) - -install(TARGETS atk RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) - -if(NOT ATK_SKIP_HEADERS) - install(FILES - atk/atk.h - atk/atkaction.h - atk/atkcomponent.h - atk/atkdocument.h - atk/atkeditabletext.h - atk/atkgobjectaccessible.h - atk/atkhyperlink.h - atk/atkhyperlinkimpl.h - atk/atkhypertext.h - atk/atknoopobject.h - atk/atknoopobjectfactory.h - atk/atkobject.h - atk/atkobjectfactory.h - atk/atkplug.h - atk/atkimage.h - atk/atkrange.h - atk/atkregistry.h - atk/atkrelation.h - atk/atkrelationtype.h - atk/atkrelationset.h - atk/atkselection.h - atk/atksocket.h - atk/atkstate.h - atk/atkstateset.h - atk/atkstreamablecontent.h - atk/atktable.h - atk/atktablecell.h - atk/atktext.h - atk/atkutil.h - atk/atkmisc.h - atk/atkvalue.h - atk/atkwindow.h - atk/atkversion.h - atk/atk-enum-types.h - atk/atkversion.h - DESTINATION include/atk) -endif() - -message(STATUS "Link-time dependencies:") -message(STATUS " " ${LIBINTL_LIBRARY}) -foreach(GL ${GLIB_LIBRARIES}) - message(STATUS " " ${GL}) -endforeach() diff --git a/ports/atk/CONTROL b/ports/atk/CONTROL deleted file mode 100644 index 66890b039da39c..00000000000000 --- a/ports/atk/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: atk -Version: 2.24.0-3 -Homepage: https://developer.gnome.org/atk/ -Description: GNOME Accessibility Toolkit -Build-Depends: glib, gettext diff --git a/ports/atk/fix-encoding.patch b/ports/atk/fix-encoding.patch deleted file mode 100644 index 8bfb38bd0c18fa..00000000000000 --- a/ports/atk/fix-encoding.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/atkversion.h b/atkversion.h -index 2634b0a..c57db2c 100644 ---- a/atkversion.h -+++ b/atkversion.h -@@ -3,7 +3,7 @@ - * Copyright (C) 2012 Igalia, S.L. - * Copyright (C) 2014 Chun-wei Fan - * -- * Author: Alejandro Piñeiro Iglesias -+ * Author: Alejandro Piñeiro Iglesias - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public diff --git a/ports/atk/portfile.cmake b/ports/atk/portfile.cmake index c3edfdf74b155d..c7db3633489d9d 100644 --- a/ports/atk/portfile.cmake +++ b/ports/atk/portfile.cmake @@ -1,31 +1,31 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) -set(ATK_VERSION 2.24.0) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/atk-${ATK_VERSION}) +set(ATK_VERSION 2.36.0) + vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/atk/2.24/atk-${ATK_VERSION}.tar.xz" + URLS "https://ftp.gnome.org/pub/GNOME/sources/atk/2.36/atk-${ATK_VERSION}.tar.xz" FILENAME "atk-${ATK_VERSION}.tar.xz" - SHA512 3ae0a4d5f28d5619d465135c685161f690732053bcb70a47669c951fbf389b5d2ccc5c7c73d4ee8c5a3b2df14e2f5b082e812a215f10a79b27b412d077f5e962) + SHA512 d0f18204eaf96511e8448e3dfbc4b6953a7cf8b816151fb7caf5592cf578572b1cdb16836fe2157b11e3ad018ef171f1ca1bfdf255bb31bb455716d7519fd634 +) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}/atk +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-encoding.patch) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +) -vcpkg_configure_cmake( +vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DCMAKE_PROGRAM_PATH=${CURRENT_INSTALLED_DIR}/tools/glib - OPTIONS_DEBUG - -DATK_SKIP_HEADERS=ON) + OPTIONS -Dintrospection=false + ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' +) +vcpkg_install_meson() -vcpkg_install_cmake() vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/atk) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/atk/COPYING ${CURRENT_PACKAGES_DIR}/share/atk/copyright) +vcpkg_fixup_pkgconfig() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/atk/vcpkg.json b/ports/atk/vcpkg.json new file mode 100644 index 00000000000000..d0a2e1f735a0ab --- /dev/null +++ b/ports/atk/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "atk", + "version": "2.36.0", + "port-version": 1, + "description": "GNOME Accessibility Toolkit", + "homepage": "https://developer.gnome.org/atk/", + "supports": "!arm", + "dependencies": [ + "gettext", + "glib", + { + "name": "glib", + "host": true + } + ] +} diff --git a/ports/atkmm/CONTROL b/ports/atkmm/CONTROL deleted file mode 100644 index 3900e1698fe2f5..00000000000000 --- a/ports/atkmm/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: atkmm -Version: 2.24.2-1 -Homepage: https://www.gtkmm.org -Description: atkmm is the official C++ interface for the ATK accessibility toolkit library. It may be used, for instance, by user interfaces implemented with gtkmm. -Build-Depends: glib, gettext, atk, glibmm diff --git a/ports/atkmm/README b/ports/atkmm/README deleted file mode 100644 index e3ac5c9167ad9a..00000000000000 --- a/ports/atkmm/README +++ /dev/null @@ -1,2 +0,0 @@ -atkmm is the C++ binding for the ATK library. -This module is part of the GNOME C++ bindings effort . diff --git a/ports/atkmm/fix_charset.patch b/ports/atkmm/fix_charset.patch deleted file mode 100644 index 60cd8fbcd6bc6e..00000000000000 --- a/ports/atkmm/fix_charset.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff --git a/MSVC_Net2013/atkmm.vcxproj b/MSVC_Net2013/atkmm.vcxproj -index 40f21cb..e9f5c5e 100644 ---- a/MSVC_Net2013/atkmm.vcxproj -+++ b/MSVC_Net2013/atkmm.vcxproj -@@ -22,21 +22,22 @@ - atkmm - {9FE0D5A6-458C-45C7-B954-2C3C1E6196C2} - Win32Proj -+ 8.1 - - - - DynamicLibrary -- MultiByte -+ Unicode - v120 - - - DynamicLibrary -- MultiByte -+ Unicode - v120 - - - DynamicLibrary -- MultiByte -+ Unicode - v120 - - -diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj -index d6f2798..aab7023 100644 ---- a/MSVC_Net2013/gendef.vcxproj -+++ b/MSVC_Net2013/gendef.vcxproj -@@ -21,21 +21,22 @@ - - {07324745-C9BE-4D65-B08A-9C88188C0C28} - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj -index 6225a66..7f61dc5 100644 ---- a/MSVC_Net2013/install.vcxproj -+++ b/MSVC_Net2013/install.vcxproj -@@ -22,28 +22,29 @@ - {2093D218-190E-4194-9421-3BA7CBF33B10} - install - Win32Proj -+ 8.1 - - - - Utility -- MultiByte -+ Unicode - true - v120 - - - Utility -- MultiByte -+ Unicode - v120 - - - Utility -- MultiByte -+ Unicode - true - v120 - - - Utility -- MultiByte -+ Unicode - v120 - - diff --git a/ports/atkmm/fix_properties.patch b/ports/atkmm/fix_properties.patch deleted file mode 100644 index a0392438690861..00000000000000 --- a/ports/atkmm/fix_properties.patch +++ /dev/null @@ -1,306 +0,0 @@ -diff --git a/MSVC_Net2013/atkmm-build-defines.props b/MSVC_Net2013/atkmm-build-defines.props -index 421f5c3..0275e6e 100644 ---- a/MSVC_Net2013/atkmm-build-defines.props -+++ b/MSVC_Net2013/atkmm-build-defines.props -@@ -5,8 +5,6 @@ - - - ATKMM_BUILD -- glibmm-vc$(VSVer)0-2_4.lib;sigc-vc$(VSVer)0-2_0.lib -- glibmm-vc$(VSVer)0-d-2_4.lib;sigc-vc$(VSVer)0-d-2_0.lib - - - <_PropertySheetDisplayName>panogmmbuilddefinesprops -@@ -15,25 +13,19 @@ - - - -- .\atkmm;..\atk;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) -+ .\atkmm;..\atk;.;%(AdditionalIncludeDirectories) - msvc_recommended_pragmas.h;%(ForcedIncludeFiles) - true - /d2Zi+ %(AdditionalOptions) - - -- atk-1.0.lib;gobject-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) -- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) -+ %(AdditionalDependencies) -+ %(AdditionalLibraryDirectories) - - - - - $(AtkMMBuildDefs) - -- -- $(CPPDepLibsRelease) -- -- -- $(CPPDepLibsDebug) -- - - -\ No newline at end of file -diff --git a/MSVC_Net2013/atkmm-version-paths.props b/MSVC_Net2013/atkmm-version-paths.props -index affd50f..675aa3e 100644 ---- a/MSVC_Net2013/atkmm-version-paths.props -+++ b/MSVC_Net2013/atkmm-version-paths.props -@@ -2,13 +2,9 @@ - - - 12 -- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) -- $(GlibEtcInstallRoot) - $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ - 1 - 6 -- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) -- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) - - - <_PropertySheetDisplayName>atkmmversionpathsprops -@@ -17,12 +13,6 @@ - - $(VSVer) - -- -- $(GlibEtcInstallRoot) -- -- -- $(CopyDir) -- - - $(DefDir) - -@@ -32,11 +22,5 @@ - - $(ApiMinorVersion) - -- -- $(ReleaseDllSuffix) -- -- -- $(DebugDllSuffix) -- - - -\ No newline at end of file -diff --git a/MSVC_Net2013/atkmm.vcxproj b/MSVC_Net2013/atkmm.vcxproj -index c3db50a..40f21cb 100644 ---- a/MSVC_Net2013/atkmm.vcxproj -+++ b/MSVC_Net2013/atkmm.vcxproj -@@ -41,7 +41,7 @@ - - - DynamicLibrary -- MultiByte -+ Unicode - v120 - - -diff --git a/MSVC_Net2013/atkmm.vcxproj.filters b/MSVC_Net2013/atkmm.vcxproj.filters -index f0fca22..6598996 100644 ---- a/MSVC_Net2013/atkmm.vcxproj.filters -+++ b/MSVC_Net2013/atkmm.vcxproj.filters -@@ -15,55 +15,143 @@ - - - -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ - - -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ - - -- -+ - Resource Files - - -diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj -index 554054c..d6f2798 100644 ---- a/MSVC_Net2013/gendef.vcxproj -+++ b/MSVC_Net2013/gendef.vcxproj -@@ -40,7 +40,7 @@ - - - Application -- MultiByte -+ Unicode - v120 - - diff --git a/ports/atkmm/msvc_recommended_pragmas.h b/ports/atkmm/msvc_recommended_pragmas.h deleted file mode 100644 index c0eb1d5edf4cd5..00000000000000 --- a/ports/atkmm/msvc_recommended_pragmas.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _MSC_VER -#pragma error "This header is for Microsoft VC only." -#endif /* _MSC_VER */ - -/* Make MSVC more pedantic, this is a recommended pragma list - * from _Win32_Programming_ by Rector and Newcomer. - */ -#pragma warning(error:4002) /* too many actual parameters for macro */ -#pragma warning(error:4003) /* not enough actual parameters for macro */ -#pragma warning(1:4010) /* single-line comment contains line-continuation character */ -#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ -#pragma warning(1:4016) /* no function return type; using int as default */ -#pragma warning(error:4020) /* too many actual parameters */ -#pragma warning(error:4021) /* too few actual parameters */ -#pragma warning(error:4027) /* function declared without formal parameter list */ -#pragma warning(error:4029) /* declared formal parameter list different from definition */ -#pragma warning(error:4033) /* 'function' must return a value */ -#pragma warning(error:4035) /* 'function' : no return value */ -#pragma warning(error:4045) /* array bounds overflow */ -#pragma warning(error:4047) /* different levels of indirection */ -#pragma warning(error:4049) /* terminating line number emission */ -#pragma warning(error:4053) /* An expression of type void was used as an operand */ -#pragma warning(error:4071) /* no function prototype given */ -#pragma warning(disable:4101) /* unreferenced local variable */ -#pragma warning(error:4150) - -#pragma warning(disable:4244) /* No possible loss of data warnings */ -#pragma warning(disable:4305) /* No truncation from int to char warnings */ - -#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ - -/* work around Microsoft's premature attempt to deprecate the C-Library */ -#define _CRT_SECURE_NO_WARNINGS -#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/atkmm/portfile.cmake b/ports/atkmm/portfile.cmake index 4bc4fd29976288..9f7a7256002306 100644 --- a/ports/atkmm/portfile.cmake +++ b/ports/atkmm/portfile.cmake @@ -1,67 +1,28 @@ -include(vcpkg_common_functions) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/atkmm-2.24.2) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/atkmm/2.24/atkmm-2.24.2.tar.xz" - FILENAME "atkmm-2.24.2.tar.xz" - SHA512 427714cdf3b10e3f9bc36df09c4b05608d295f5895fb1e079b9bd84afdf7bf1cfdec6794ced7f1e35bd430b76f87792df4ee63c515071a2ea6e3e51e672cdbe2 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch -) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) - -set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) -if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) - set(VS_PLATFORM "Win32") -endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/atkmm.sln - TARGET atkmm - PLATFORM ${VS_PLATFORM} - USE_VCPKG_INTEGRATION + URLS "https://ftp.gnome.org/pub/GNOME/sources/atkmm/2.36/atkmm-2.36.0.tar.xz" + FILENAME "atkmm-2.36.0.tar.xz" + SHA512 8527dfa50191919a7dcf6db6699767352cb0dac800d834ee39ed21694eee3136a41a7532d600b8b3c0fcea52da6129b623e8e61ada728d806aa61fdc8dc8dedf ) -# Handle headers -file(COPY ${SOURCE_PATH}/MSVC_Net2013/atkmm/atkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/atk/atkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file( - COPY - ${SOURCE_PATH}/atk/atkmm - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN *.h +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES ) -# Handle libraries -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/atkmm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/atkmm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/atkmm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/atkmm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Dbuild-documentation=false + -Dbuild-deprecated-api=true # Build deprecated API and include it in the library + -Dmsvc14x-parallel-installable=false) # Use separate DLL and LIB filenames for Visual Studio 2017 and 2019 +vcpkg_install_meson() -vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() -# Handle copyright and readme -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/atkmm RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/atkmm RENAME readme.txt) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/atkmm/vcpkg.json b/ports/atkmm/vcpkg.json new file mode 100644 index 00000000000000..c173ce9cee760d --- /dev/null +++ b/ports/atkmm/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "atkmm", + "version": "2.36.0", + "port-version": 1, + "description": "atkmm is the official C++ interface for the ATK accessibility toolkit library. It may be used, for instance, by user interfaces implemented with gtkmm.", + "homepage": "https://www.gtkmm.org", + "dependencies": [ + "atk", + "gettext", + "glib", + "glibmm" + ] +} diff --git a/ports/atlmfc/CONTROL b/ports/atlmfc/CONTROL deleted file mode 100644 index aff5c97aa6e235..00000000000000 --- a/ports/atlmfc/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: atlmfc -Version: 0 -Description: a stub package that ensures VS has ATL/MFC installed. diff --git a/ports/atlmfc/vcpkg.json b/ports/atlmfc/vcpkg.json new file mode 100644 index 00000000000000..5a8ce22d6b14e2 --- /dev/null +++ b/ports/atlmfc/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "atlmfc", + "version-string": "0", + "port-version": 1, + "description": "a stub package that ensures VS has ATL/MFC installed.", + "supports": "windows" +} diff --git a/ports/atomic-queue/portfile.cmake b/ports/atomic-queue/portfile.cmake new file mode 100644 index 00000000000000..49c5e057695cbf --- /dev/null +++ b/ports/atomic-queue/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO max0x7ba/atomic_queue + REF 7619054490efdbfe377bd528bc09b21f5cd38a02 + SHA512 0d145f461a5c978c4d6f6d8ec1f06f0c61f3d009e65eac12db806c2aa7941461f881b34b9c4dd9aeebd3206a4598e6081f89f983c389b2f5aecefefcbddd94b6 + HEAD_REF master +) + +file( + COPY + ${SOURCE_PATH}/include/atomic_queue/atomic_queue.h + ${SOURCE_PATH}/include/atomic_queue/atomic_queue_mutex.h + ${SOURCE_PATH}/include/atomic_queue/barrier.h + ${SOURCE_PATH}/include/atomic_queue/defs.h + ${SOURCE_PATH}/include/atomic_queue/spinlock.h + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/atomic_queue +) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/atomic-queue/vcpkg.json b/ports/atomic-queue/vcpkg.json new file mode 100644 index 00000000000000..7e7cbe56fa75f0 --- /dev/null +++ b/ports/atomic-queue/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "atomic-queue", + "version-date": "2021-05-03", + "description": "Minimalistic header-only thread-safe ultra-low-latency multiple-producer-multiple-consumer lockless queues based on circular buffer with std::atomic.", + "homepage": "https://github.com/max0x7ba/atomic_queue" +} diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index 9a6ad2377d9faa..b711c9f39cd9ee 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 3.8) project(aubio C) +option(WITH_DEPENDENCIES "Adds extra dependencies" ON) +option(BUILD_TOOLS "Build and install tools" ON) + add_definitions( -DHAVE_STDLIB_H=1 -DHAVE_STDIO_H=1 @@ -8,68 +11,65 @@ add_definitions( -DHAVE_STRING_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STDARG_H=1 + -DHAVE_ERRNO_H=1 -DHAVE_C99_VARARGS_MACROS=1 - - -DHAVE_SNDFILE=1 - -DHAVE_WAVWRITE=1 - -DHAVE_WAVREAD=1 - -DHAVE_LIBAV=1 - -DHAVE_SWRESAMPLE=1 - -D_CRT_SECURE_NO_WARNINGS=1 ) -set(CMAKE_DEBUG_POSTFIX d) +if(WITH_DEPENDENCIES) + add_definitions( + -DHAVE_SNDFILE=1 + -DHAVE_WAVWRITE=1 + -DHAVE_WAVREAD=1 + -DHAVE_LIBAV=1 + -DHAVE_SWRESAMPLE=1 + ) +endif() -option(BUILD_TOOLS "Build and install tools" ON) set(TOOLS_INSTALLDIR "bin" CACHE STRING "Target directory for installed tools") -find_path(LIBSNDFILE_H sndfile.h) -find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) -find_library(AVCODEC_LIB avcodec) -find_library(AVUTIL_LIB avutil) -find_library(AVDEVICE_LIB avdevice) -find_library(AVFILTER_LIB avfilter) -find_library(AVFORMAT_LIB avformat) -find_library(SWRESAMPLE_LIB swresample) -find_library(OGG_LIB ogg) -find_library(FLAC_LIB flac) -find_library(VORBIS_LIB vorbis) -find_library(VORBISENC_LIB vorbisenc) -find_package(BZip2 REQUIRED) -find_package(LibLZMA REQUIRED) - -include_directories(src ${LIBSNDFILE_H} ${LIBLZMA_INCLUDE_DIRS}) +if(WITH_DEPENDENCIES) + find_package(FFMPEG COMPONENTS avcodec avutil avformat swresample REQUIRED) + find_package(BZip2 REQUIRED) + find_package(LibLZMA REQUIRED) + find_package(SndFile REQUIRED) + + include_directories(${LIBLZMA_INCLUDE_DIRS}) +endif() + +include_directories(src) file(GLOB_RECURSE SOURCES src/*.c) -set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) +if(WIN32 AND NOT MINGW) + set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) +endif() + add_library(aubio ${SOURCES}) -target_link_libraries(aubio PUBLIC - ${LIBSNDFILE_LIB} - ${OGG_LIB} - ${FLAC_LIB} - ${VORBIS_LIB} - ${VORBISENC_LIB} - ${AVCODEC_LIB} - ${AVUTIL_LIB} - ${AVDEVICE_LIB} - ${AVFILTER_LIB} - ${AVFORMAT_LIB} - ${SWRESAMPLE_LIB} - BZip2::BZip2 - ${LIBLZMA_LIBRARIES} - ws2_32.lib - Secur32.lib - bcrypt.lib -) +if(WITH_DEPENDENCIES) + target_link_libraries(aubio PUBLIC + SndFile::sndfile + ${FFMPEG_LIBRARIES} + BZip2::BZip2 + ${LIBLZMA_LIBRARIES} + ) +endif() + +if(WIN32) + target_link_libraries(aubio PUBLIC ws2_32) +endif() -if(BUILD_TOOLS) +if(BUILD_TOOLS AND WITH_DEPENDENCIES) set(EXAMPLE_EXECS aubiomfcc aubionotes aubioonset aubiopitch aubioquiet aubiotrack) foreach(EXAMPLE_EXEC ${EXAMPLE_EXECS}) add_executable(${EXAMPLE_EXEC} examples/${EXAMPLE_EXEC}.c examples/utils.c examples/jackio.c) target_link_libraries(${EXAMPLE_EXEC} PRIVATE aubio) - target_compile_definitions(${EXAMPLE_EXEC} PRIVATE -DHAVE_WIN_HACKS=1) + if(WIN32) + target_compile_definitions(${EXAMPLE_EXEC} PRIVATE -DHAVE_WIN_HACKS=1) + target_link_libraries(${EXAMPLE_EXEC} PUBLIC ws2_32) + else() + target_compile_definitions(${EXAMPLE_EXEC} PRIVATE -DHAVE_UNISTD_H=1) + endif() endforeach() # Create and add fake config.h to avoid build errors (file is generated for # cross-platform requirements in waf build-system) @@ -83,19 +83,47 @@ if(BUILD_TOOLS) endif() install( - TARGETS aubio + TARGETS aubio EXPORT AubioTargets + INCLUDES DESTINATION include RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) -if(NOT DISABLE_INSTALL_HEADERS) - install( - DIRECTORY src/ - DESTINATION include/aubio - FILES_MATCHING - PATTERN "*.h" - PATTERN "*_priv.h" EXCLUDE - PATTERN "config.h" EXCLUDE - ) +install(EXPORT AubioTargets NAMESPACE Aubio:: DESTINATION share/aubio) + +install( + DIRECTORY src/ + DESTINATION include/aubio + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_priv.h" EXCLUDE + PATTERN "config.h" EXCLUDE +) + +# Create CMake configuration export file. +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake.in "@PACKAGE_INIT@\n") +if(WITH_DEPENDENCIES) +file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake.in " + include(CMakeFindDependencyMacro) + find_dependency(FFMPEG COMPONENTS avcodec avutil avformat swresample REQUIRED) + find_dependency(BZip2 REQUIRED) + find_dependency(LibLZMA REQUIRED) + find_dependency(SndFile REQUIRED) + ") endif() +file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake.in "include(\${CMAKE_CURRENT_LIST_DIR}/AubioTargets.cmake)") + +# Install CMake configuration export file. +include(CMakePackageConfigHelpers) +configure_package_config_file( + ${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake + INSTALL_DESTINATION share/aubio +) +install( + FILES + ${CMAKE_BINARY_DIR}/AubioConfig.cmake + DESTINATION + share/aubio +) diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL deleted file mode 100644 index 906fefe45477ce..00000000000000 --- a/ports/aubio/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: aubio -Version: 0.4.9 -Homepage: https://github.com/aubio/aubio -Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. -Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis, bzip2, liblzma diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index 177e890d58001f..e8d49dce4c0dbb 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -1,8 +1,5 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aubio-3c230fae309e9ea3298783368dd71bae6172359a) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aubio/aubio @@ -13,17 +10,26 @@ vcpkg_from_github( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_configure_cmake( +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools WITH_DEPENDENCIES +) + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} OPTIONS_RELEASE -DTOOLS_INSTALLDIR=tools/aubio -DBUILD_TOOLS=ON OPTIONS_DEBUG - -DDISABLE_INSTALL_HEADERS=1 -DBUILD_TOOLS=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") # Handle copyright and credentials file(COPY @@ -32,8 +38,8 @@ file(COPY ${SOURCE_PATH}/ChangeLog ${SOURCE_PATH}/README.md DESTINATION - ${CURRENT_PACKAGES_DIR}/share/aubio) + ${CURRENT_PACKAGES_DIR}/share/${PORT}) vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/aubio) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/aubio/COPYING ${CURRENT_PACKAGES_DIR}/share/aubio/copyright) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/ports/aubio/vcpkg.json b/ports/aubio/vcpkg.json new file mode 100644 index 00000000000000..dd977ac9242754 --- /dev/null +++ b/ports/aubio/vcpkg.json @@ -0,0 +1,42 @@ +{ + "name": "aubio", + "version-semver": "0.4.9", + "port-version": 7, + "description": "Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio.", + "homepage": "https://github.com/aubio/aubio", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "tools" + ], + "features": { + "tools": { + "description": "Build tools and add extra dependencies", + "dependencies": [ + "bzip2", + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avformat", + "swresample" + ] + }, + "libflac", + "liblzma", + "libogg", + "libsndfile", + "libvorbis" + ] + } + } +} diff --git a/ports/audiofile/fix-cmakeLists.patch b/ports/audiofile/fix-cmakeLists.patch new file mode 100644 index 00000000000000..a7551d6ade776f --- /dev/null +++ b/ports/audiofile/fix-cmakeLists.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d43c0c7..1bf21cf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,6 +4,8 @@ cmake_minimum_required (VERSION 3.12) + project ("AudioFile" VERSION 1.0.9 + DESCRIPTION "A simple C++ library for reading and writing audio files." + HOMEPAGE_URL "https://github.com/adamstark/AudioFile") ++option(BUILD_EXAMPLES "Build examples" OFF) ++option(BUILD_TESTS "Build tests" OFF) + + #=============================================================================== + include (GNUInstallDirs) +@@ -21,10 +23,20 @@ target_include_directories ( + target_compile_features (${PROJECT_NAME} INTERFACE cxx_std_11) + + #=============================================================================== ++if(BUILD_EXAMPLES) + add_subdirectory (examples) ++endif() + ++if(BUILD_TESTS) + enable_testing() + add_subdirectory (tests) +- ++endif() + #=============================================================================== +-set (CMAKE_SUPPRESS_REGENERATION true) +\ No newline at end of file ++set (CMAKE_SUPPRESS_REGENERATION true) ++ ++#install and export targets ++install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config) ++export(TARGETS ${PROJECT_NAME} FILE ${PROJECT_NAME}Config.cmake) ++install(EXPORT ${PROJECT_NAME}Config DESTINATION share/AudioFile FILE ${PROJECT_NAME}Config.cmake) ++#install headers ++install(FILES AudioFile.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +\ No newline at end of file diff --git a/ports/audiofile/portfile.cmake b/ports/audiofile/portfile.cmake new file mode 100644 index 00000000000000..df0fff37426b00 --- /dev/null +++ b/ports/audiofile/portfile.cmake @@ -0,0 +1,26 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO adamstark/AudioFile + REF b7dd84abd5763f64fcf74e58499c4b5d779a396d # 1.0.9 + SHA512 daadbf7badadee4a189453af137b1ea5a5ba3486780d02664d1516f379c3705155b1036a9f8f7acd49b6a82269a07e510edcd5e9de55c73f47250244a510ccbb + HEAD_REF master + PATCHES + fix-cmakeLists.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME AudioFile) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/audiofile/vcpkg.json b/ports/audiofile/vcpkg.json new file mode 100644 index 00000000000000..8d982a697255a3 --- /dev/null +++ b/ports/audiofile/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "audiofile", + "version": "1.0.9", + "description": "A simple header-only C++ library for reading and writing audio files.", + "homepage": "https://github.com/adamstark/AudioFile", + "license": "GPL-3.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aurora/CONTROL b/ports/aurora/CONTROL deleted file mode 100644 index b99aed73eb48e7..00000000000000 --- a/ports/aurora/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: aurora -Version: 2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933 -Homepage: https://github.com/Bromeon/Aurora -Description: Aurora is an open-source C++ library providing various rather uncommon C++ utilities diff --git a/ports/aurora/portfile.cmake b/ports/aurora/portfile.cmake index 32e3d804f90d47..bce54c2bcc2fcd 100644 --- a/ports/aurora/portfile.cmake +++ b/ports/aurora/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Bromeon/Aurora diff --git a/ports/aurora/vcpkg.json b/ports/aurora/vcpkg.json new file mode 100644 index 00000000000000..e0efe0331e641e --- /dev/null +++ b/ports/aurora/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "aurora", + "version-string": "2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933", + "port-version": 1, + "description": "Aurora is an open-source C++ library providing various rather uncommon C++ utilities", + "homepage": "https://github.com/Bromeon/Aurora" +} diff --git a/ports/autobahn/CONTROL b/ports/autobahn/CONTROL deleted file mode 100644 index 94152bb768e76f..00000000000000 --- a/ports/autobahn/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: autobahn -Version: 18.4.1 -Build-Depends: websocketpp, msgpack, boost-asio, boost-thread -Description: WAMP for C++ in Boost/Asio -Homepage: https://crossbar.io/autobahn diff --git a/ports/autobahn/portfile.cmake b/ports/autobahn/portfile.cmake index ea70941872e6e6..511ffb564c2ee6 100644 --- a/ports/autobahn/portfile.cmake +++ b/ports/autobahn/portfile.cmake @@ -1,6 +1,4 @@ #header-only library -include(vcpkg_common_functions) - set(USE_UPSTREAM OFF) if("upstream" IN_LIST FEATURES) set(USE_UPSTREAM ON) @@ -9,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO crossbario/autobahn-cpp - REF v18.4.1 - SHA512 a3325e06731698a2c5d8c233581f275a9b653e98b74e7382f83fc62111dec9d66bbd5803cc71e8b5125ecee6d380d3cf1c6e83926e06912888201c2aa4ab7a15 + REF 84972fc81181bde635329bf0474e3874cc5c9091 # v20.8.1 + SHA512 fcd094907826e035188d19efc80f3caa6c90d7d7bd2c5b6796aea9de3a02052bd049329cbe5cb242bba535e70c127842c66d34956e715b4f6f37ffc54c39c483 HEAD_REF master ) diff --git a/ports/autobahn/vcpkg.json b/ports/autobahn/vcpkg.json new file mode 100644 index 00000000000000..cc755ff05796cd --- /dev/null +++ b/ports/autobahn/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "autobahn", + "version-string": "20.8.1", + "port-version": 1, + "description": "WAMP for C++ in Boost/Asio", + "homepage": "https://crossbar.io/autobahn", + "dependencies": [ + "boost-asio", + "boost-thread", + "msgpack", + "websocketpp" + ] +} diff --git a/ports/autodock-vina/01-windows.patch b/ports/autodock-vina/01-windows.patch new file mode 100644 index 00000000000000..89c3bfd3ad408b --- /dev/null +++ b/ports/autodock-vina/01-windows.patch @@ -0,0 +1,12 @@ +diff --git a/src/lib/forcefield.h b/src/lib/forcefield.h +index 81bd4c1..44761e2 100644 +--- a/src/lib/forcefield.h ++++ b/src/lib/forcefield.h +@@ -24,6 +24,7 @@ + #define VINA_FORCEFIELD_H + + ++#include + #include + #include + #include diff --git a/ports/autodock-vina/CMakeLists.txt b/ports/autodock-vina/CMakeLists.txt new file mode 100644 index 00000000000000..2390d9753d318e --- /dev/null +++ b/ports/autodock-vina/CMakeLists.txt @@ -0,0 +1,100 @@ +cmake_minimum_required(VERSION 3.11) +cmake_policy(VERSION 3.11) + +project(autodock-vina) + +set(GIT_VERSION v1.2.2) +set(CMAKE_CXX_STANDARD 11) + +find_package(Boost REQUIRED COMPONENTS + filesystem + log + math_tr1 + program_options + random + serialization + thread + timer +) + +file(GLOB SRC_AUTODOCK_VINA_LIBS + "src/lib/*.cpp" +) + +file(GLOB SRC_AUTODOCK_VINA_SPLIT + "src/split/*.cpp" +) + +file(GLOB HEADERS + "src/lib/*.h" +) + +add_library(vina ${SRC_AUTODOCK_VINA_LIBS}) +add_library(vina_split ${SRC_AUTODOCK_VINA_SPLIT}) + +target_include_directories(vina + PUBLIC + $ + $ + PRIVATE + $ +) + +target_include_directories(vina_split + PUBLIC + $ + $ + PRIVATE + $ +) + +target_compile_definitions(vina + PUBLIC + -DVERSION=\"${GIT_VERSION}\" +) + +target_compile_definitions(vina_split + PUBLIC + -DVERSION=\"${GIT_VERSION}\" +) + +target_link_libraries(vina + PRIVATE + Boost::boost + Boost::filesystem + Boost::log + Boost::math_tr1 + Boost::program_options + Boost::random + Boost::serialization + Boost::thread + Boost::timer +) + +target_link_libraries(vina_split + PRIVATE + Boost::boost + Boost::filesystem + Boost::log + Boost::math_tr1 + Boost::program_options + Boost::random + Boost::serialization + Boost::thread + Boost::timer +) + +install(TARGETS vina EXPORT autodock-vina-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(TARGETS vina_split EXPORT autodock-vina-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(FILES ${HEADERS} DESTINATION include/autodock-vina) +install(EXPORT autodock-vina-config NAMESPACE autodock-vina::autodock-vina:: DESTINATION share/autodock-vina) diff --git a/ports/autodock-vina/portfile.cmake b/ports/autodock-vina/portfile.cmake new file mode 100644 index 00000000000000..7ba0823884ca91 --- /dev/null +++ b/ports/autodock-vina/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ccsb-scripps/AutoDock-Vina + REF v1.2.2 + SHA512 a6117137292b9b77afd3dff4a5ca31c65c9e85edd0b2351795fb2cccc06eca5b865b7dc054bb2859d0cf32abb6f6a72aaf62647e6d53709be879cc12a0336ba8 + HEAD_REF develop + PATCHES + 01-windows.patch +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file( + INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/autodock-vina/vcpkg.json b/ports/autodock-vina/vcpkg.json new file mode 100644 index 00000000000000..b3384a570262b6 --- /dev/null +++ b/ports/autodock-vina/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "autodock-vina", + "version-semver": "1.2.2", + "description": "AutoDock Vina is one of the fastest and most widely used open-source docking engines.", + "homepage": "http://vina.scripps.edu/", + "dependencies": [ + "boost-algorithm", + "boost-array", + "boost-filesystem", + "boost-lexical-cast", + "boost-log", + "boost-math", + "boost-optional", + "boost-program-options", + "boost-ptr-container", + "boost-random", + "boost-serialization", + "boost-static-assert", + "boost-thread", + "boost-timer", + "boost-utility", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/avcpp/0002-av_init_packet_deprecation.patch b/ports/avcpp/0002-av_init_packet_deprecation.patch new file mode 100644 index 00000000000000..a243b0dfef1183 --- /dev/null +++ b/ports/avcpp/0002-av_init_packet_deprecation.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a5fed05..7875b91 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,6 +24,11 @@ set (AVCPP_WARNING_OPTIONS + $<$: + /W4>) + ++# fixes vcpkg uwp failures due to /sdl ++if(MSVC) ++ add_compile_options(/wd4996) ++endif() ++ + # -pthread sets also some useful compile-time flags + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads) diff --git a/ports/avcpp/portfile.cmake b/ports/avcpp/portfile.cmake new file mode 100644 index 00000000000000..fcbf37585e8839 --- /dev/null +++ b/ports/avcpp/portfile.cmake @@ -0,0 +1,34 @@ +# avcpp doesn't export any symbols +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO h4tr3d/avcpp + REF fa9a1ef70bbf9e9f3963fbaa4540e8aac4ad8daa + SHA512 e0821d8e01e0fdb28d58564c87cafa7f9349b1b31dc90d4f2ea4c22c51fc16555f4a01f30d7575798138067921a011faa10e4d2ac2ac02acdf224546724e0338 + HEAD_REF master + PATCHES + 0002-av_init_packet_deprecation.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" AVCPP_ENABLE_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" AVCPP_ENABLE_SHARED) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DAV_ENABLE_STATIC=${AVCPP_ENABLE_STATIC} + -DAV_ENABLE_SHARED=${AVCPP_ENABLE_SHARED} + -DAV_BUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF +) +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/avcpp/vcpkg.json b/ports/avcpp/vcpkg.json new file mode 100644 index 00000000000000..9f1e0673844488 --- /dev/null +++ b/ports/avcpp/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "avcpp", + "version-date": "2021-06-14", + "description": "Wrapper for the FFmpeg that simplify usage it from C++ projects.", + "homepage": "https://github.com/h4tr3d/avcpp", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avdevice", + "avfilter", + "avformat", + "swresample", + "swscale" + ] + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/avisynthplus/portfile.cmake b/ports/avisynthplus/portfile.cmake new file mode 100644 index 00000000000000..af6641c3f97246 --- /dev/null +++ b/ports/avisynthplus/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AviSynth/AviSynthPlus + REF v3.7.0 + SHA512 0f2d5344c4472b810667b99d9e99a2ec8135923f4185dbd7e29ca65e696ce13500ea20ef09c995486573314149a671e1256a4dd0696c4ace8d3ec3716ffdcfc7 + HEAD_REF master +) + +vcpkg_download_distfile(GHC_ARCHIVE + URLS "https://github.com/gulrak/filesystem/archive/3f1c185ab414e764c694b8171d1c4d8c5c437517.zip" + FILENAME filesystem-3f1c185ab414e764c694b8171d1c4d8c5c437517.zip + SHA512 e3fe1e41b31f840ebc219fcd795e7be2973b80bb3843d6bb080786ad9e3e7f846a118673cb9e17d76bae66954e64e024a82622fb8cea7818d5d9357de661d3d1 +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/filesystem) +vcpkg_extract_source_archive(extracted_archive ARCHIVE "${GHC_ARCHIVE}") +file(RENAME "${extracted_archive}" "${SOURCE_PATH}/filesystem") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_PLUGINS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/distrib/gpl.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/avisynthplus/vcpkg.json b/ports/avisynthplus/vcpkg.json new file mode 100644 index 00000000000000..88e47ac016c0a5 --- /dev/null +++ b/ports/avisynthplus/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "avisynthplus", + "version-semver": "3.7.0", + "port-version": 1, + "description": "An improved version of the AviSynth frameserver, with improved features and developer friendliness", + "homepage": "http://avs-plus.net/", + "supports": "!arm & !uwp" +} diff --git a/ports/avro-c/CONTROL b/ports/avro-c/CONTROL deleted file mode 100644 index 4374814d526510..00000000000000 --- a/ports/avro-c/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: avro-c -Version: 1.8.2-2 -Homepage: https://github.com/apache/avro -Description: Apache Avro is a data serialization system -Build-Depends: jansson, liblzma, zlib diff --git a/ports/avro-c/avro-pr-217.patch b/ports/avro-c/avro-pr-217.patch deleted file mode 100644 index 9a5ddd3a855696..00000000000000 --- a/ports/avro-c/avro-pr-217.patch +++ /dev/null @@ -1,421 +0,0 @@ -diff --git a/lang/c/src/schema.c b/lang/c/src/schema.c -index 3ade1140e..97e3ff354 100644 ---- a/lang/c/src/schema.c -+++ b/lang/c/src/schema.c -@@ -2,17 +2,17 @@ - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. -- * The ASF licenses this file to you under the Apache License, Version 2.0 -+ * The ASF licenses this file to you under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at -- * -+ * - * http://www.apache.org/licenses/LICENSE-2.0 -- * -+ * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing -- * permissions and limitations under the License. -+ * permissions and limitations under the License. - */ - - #include "avro/allocation.h" -@@ -61,7 +61,7 @@ static int is_avro_id(const char *name) - } - } - /* -- * starts with [A-Za-z_] subsequent [A-Za-z0-9_] -+ * starts with [A-Za-z_] subsequent [A-Za-z0-9_] - */ - return 1; - } -@@ -199,7 +199,13 @@ static void avro_schema_free(avro_schema_t schema) - case AVRO_LINK:{ - struct avro_link_schema_t *link; - link = avro_schema_to_link(schema); -- avro_schema_decref(link->to); -+ /* Since we didn't increment the -+ * reference count of the target -+ * schema when we created the link, we -+ * should not decrement the reference -+ * count of the target schema when we -+ * free the link. -+ */ - avro_freet(struct avro_link_schema_t, link); - } - break; -@@ -727,7 +733,19 @@ avro_schema_t avro_schema_link(avro_schema_t to) - avro_set_error("Cannot allocate new link schema"); - return NULL; - } -- link->to = avro_schema_incref(to); -+ -+ /* Do not increment the reference count of target schema -+ * pointed to by the AVRO_LINK. AVRO_LINKs are only valid -+ * internal to a schema. The target schema pointed to by a -+ * link will be valid as long as the top-level schema is -+ * valid. Similarly, the link will be valid as long as the -+ * top-level schema is valid. Therefore the validity of the -+ * link ensures the validity of its target, and we don't need -+ * an additional reference count on the target. This mechanism -+ * of an implied validity also breaks reference count cycles -+ * for recursive schemas, which result in memory leaks. -+ */ -+ link->to = to; - avro_schema_init(&link->obj, AVRO_LINK); - return &link->obj; - } -@@ -807,7 +825,7 @@ avro_type_from_json_t(json_t *json, avro_type_t *type, - return EINVAL; - } - /* -- * TODO: gperf/re2c this -+ * TODO: gperf/re2c this - */ - if (strcmp(type_str, "string") == 0) { - *type = AVRO_STRING; -@@ -1259,7 +1277,7 @@ avro_schema_from_json_length(const char *jsontext, size_t length, - return avro_schema_from_json_root(root, schema); - } - --avro_schema_t avro_schema_copy(avro_schema_t schema) -+avro_schema_t avro_schema_copy_root(avro_schema_t schema, st_table *named_schemas) - { - long i; - avro_schema_t new_schema = NULL; -@@ -1276,7 +1294,7 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - case AVRO_BOOLEAN: - case AVRO_NULL: - /* -- * No need to copy primitives since they're static -+ * No need to copy primitives since they're static - */ - new_schema = schema; - break; -@@ -1288,6 +1306,10 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - new_schema = - avro_schema_record(record_schema->name, - record_schema->space); -+ if (save_named_schemas(new_schema, named_schemas)) { -+ avro_set_error("Cannot save enum schema"); -+ return NULL; -+ } - for (i = 0; i < record_schema->fields->num_entries; i++) { - union { - st_data_t data; -@@ -1295,10 +1317,11 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - } val; - st_lookup(record_schema->fields, i, &val.data); - avro_schema_t type_copy = -- avro_schema_copy(val.field->type); -+ avro_schema_copy_root(val.field->type, named_schemas); - avro_schema_record_field_append(new_schema, - val.field->name, - type_copy); -+ avro_schema_decref(type_copy); - } - } - break; -@@ -1309,6 +1332,10 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - avro_schema_to_enum(schema); - new_schema = avro_schema_enum_ns(enum_schema->name, - enum_schema->space); -+ if (save_named_schemas(new_schema, named_schemas)) { -+ avro_set_error("Cannot save enum schema"); -+ return NULL; -+ } - for (i = 0; i < enum_schema->symbols->num_entries; i++) { - union { - st_data_t data; -@@ -1329,6 +1356,10 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - avro_schema_fixed_ns(fixed_schema->name, - fixed_schema->space, - fixed_schema->size); -+ if (save_named_schemas(new_schema, named_schemas)) { -+ avro_set_error("Cannot save fixed schema"); -+ return NULL; -+ } - } - break; - -@@ -1337,11 +1368,12 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - struct avro_map_schema_t *map_schema = - avro_schema_to_map(schema); - avro_schema_t values_copy = -- avro_schema_copy(map_schema->values); -+ avro_schema_copy_root(map_schema->values, named_schemas); - if (!values_copy) { - return NULL; - } - new_schema = avro_schema_map(values_copy); -+ avro_schema_decref(values_copy); - } - break; - -@@ -1350,11 +1382,12 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - struct avro_array_schema_t *array_schema = - avro_schema_to_array(schema); - avro_schema_t items_copy = -- avro_schema_copy(array_schema->items); -+ avro_schema_copy_root(array_schema->items, named_schemas); - if (!items_copy) { - return NULL; - } - new_schema = avro_schema_array(items_copy); -+ avro_schema_decref(items_copy); - } - break; - -@@ -1372,12 +1405,13 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - avro_schema_t schema; - } val; - st_lookup(union_schema->branches, i, &val.data); -- schema_copy = avro_schema_copy(val.schema); -+ schema_copy = avro_schema_copy_root(val.schema, named_schemas); - if (avro_schema_union_append - (new_schema, schema_copy)) { - avro_schema_decref(new_schema); - return NULL; - } -+ avro_schema_decref(schema_copy); - } - } - break; -@@ -1386,12 +1420,12 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - { - struct avro_link_schema_t *link_schema = - avro_schema_to_link(schema); -- /* -- * TODO: use an avro_schema_copy of to instead of pointing to -- * the same reference -- */ -- avro_schema_incref(link_schema->to); -- new_schema = avro_schema_link(link_schema->to); -+ avro_schema_t to; -+ -+ to = find_named_schemas(avro_schema_name(link_schema->to), -+ avro_schema_namespace(link_schema->to), -+ named_schemas); -+ new_schema = avro_schema_link(to); - } - break; - -@@ -1401,6 +1435,23 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) - return new_schema; - } - -+avro_schema_t avro_schema_copy(avro_schema_t schema) -+{ -+ avro_schema_t new_schema; -+ st_table *named_schemas; -+ -+ named_schemas = st_init_strtable_with_size(DEFAULT_TABLE_SIZE); -+ if (!named_schemas) { -+ avro_set_error("Cannot allocate named schema map"); -+ return NULL; -+ } -+ -+ new_schema = avro_schema_copy_root(schema, named_schemas); -+ st_foreach(named_schemas, HASH_FUNCTION_CAST named_schema_free_foreach, 0); -+ st_free_table(named_schemas); -+ return new_schema; -+} -+ - avro_schema_t avro_schema_get_subschema(const avro_schema_t schema, - const char *name) - { -diff --git a/lang/c/tests/CMakeLists.txt b/lang/c/tests/CMakeLists.txt -index 445e689a7..0870ef5ec 100644 ---- a/lang/c/tests/CMakeLists.txt -+++ b/lang/c/tests/CMakeLists.txt -@@ -48,12 +48,14 @@ add_avro_test(test_data_structures) - add_avro_test(test_avro_schema) - add_avro_test(test_avro_schema_names) - add_avro_test(test_avro_values) -+add_avro_test(test_avro_766) - add_avro_test(test_avro_968) - add_avro_test(test_avro_984) - add_avro_test(test_avro_1034) - add_avro_test(test_avro_1084) - add_avro_test(test_avro_1087) - add_avro_test(test_avro_1165) -+add_avro_test(test_avro_1167) - add_avro_test(test_avro_1237) - add_avro_test(test_avro_1238) - add_avro_test(test_avro_1279) -diff --git a/lang/c/tests/test_avro_1167.c b/lang/c/tests/test_avro_1167.c -new file mode 100644 -index 000000000..869b37d17 ---- /dev/null -+++ b/lang/c/tests/test_avro_1167.c -@@ -0,0 +1,84 @@ -+/* -+ * Licensed to the Apache Software Foundation (ASF) under one or more -+ * contributor license agreements. See the NOTICE file distributed with -+ * this work for additional information regarding copyright ownership. -+ * The ASF licenses this file to you under the Apache License, Version 2.0 -+ * (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -+ * implied. See the License for the specific language governing -+ * permissions and limitations under the License. -+ */ -+ -+#include -+#include -+#include -+ -+/* To see the AVRO-1167 memory leak, run this test program through -+ * valgrind. The specific valgrind commandline to use from the -+ * avro-trunk/lang/c/tests directory is: -+ * valgrind -v --track-origins=yes --leak-check=full -+ * --show-reachable = yes ../build/tests/test_avro_1167 -+ */ -+ -+int main(int argc, char **argv) -+{ -+ const char *json = -+ "{" -+ " \"name\": \"repeated_subrecord_array\"," -+ " \"type\": \"record\"," -+ " \"fields\": [" -+ " { \"name\": \"subrecord_one\"," -+ " \"type\": {" -+ " \"name\": \"SubrecordType\"," -+ " \"type\": \"record\"," -+ " \"fields\": [" -+ " { \"name\": \"x\", \"type\": \"int\" }," -+ " { \"name\": \"y\", \"type\": \"int\" }" -+ " ]" -+ " }" -+ " }," -+ " { \"name\": \"subrecord_two\", \"type\": \"SubrecordType\" }," -+ " { \"name\": \"subrecord_array\", \"type\": {" -+ " \"type\":\"array\"," -+ " \"items\": \"SubrecordType\"" -+ " }" -+ " }" -+ " ]" -+ "}"; -+ -+ int rval; -+ avro_schema_t schema = NULL; -+ avro_schema_t schema_copy = NULL; -+ avro_schema_error_t error; -+ -+ (void) argc; -+ (void) argv; -+ -+ rval = avro_schema_from_json(json, strlen(json), &schema, &error); -+ if ( rval ) -+ { -+ printf("Failed to read schema from JSON.\n"); -+ exit(EXIT_FAILURE); -+ } -+ else -+ { -+ printf("Successfully read schema from JSON.\n"); -+ } -+ -+ schema_copy = avro_schema_copy( schema ); -+ if ( ! avro_schema_equal(schema, schema_copy) ) -+ { -+ printf("Failed avro_schema_equal(schema, schema_copy)\n"); -+ exit(EXIT_FAILURE); -+ } -+ -+ avro_schema_decref(schema); -+ avro_schema_decref(schema_copy); -+ return 0; -+} -diff --git a/lang/c/tests/test_avro_766.c b/lang/c/tests/test_avro_766.c -new file mode 100755 -index 000000000..4e21368c4 ---- /dev/null -+++ b/lang/c/tests/test_avro_766.c -@@ -0,0 +1,76 @@ -+/* -+ * Licensed to the Apache Software Foundation (ASF) under one or more -+ * contributor license agreements. See the NOTICE file distributed with -+ * this work for additional information regarding copyright ownership. -+ * The ASF licenses this file to you under the Apache License, Version 2.0 -+ * (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -+ * implied. See the License for the specific language governing -+ * permissions and limitations under the License. -+ */ -+ -+#include -+#include -+#include -+ -+/* To see the AVRO-766 memory leak, run this test program through -+ * valgrind. The specific valgrind commandline to use from the -+ * avro-trunk/lang/c/tests directory is: -+ * valgrind -v --track-origins=yes --leak-check=full -+ * --show-reachable = yes ../build/tests/test_avro_766 -+ */ -+int main(int argc, char **argv) -+{ -+ const char *json = -+ "{" -+ " \"type\": \"record\"," -+ " \"name\": \"list\"," -+ " \"fields\": [" -+ " { \"name\": \"x\", \"type\": \"int\" }," -+ " { \"name\": \"y\", \"type\": \"int\" }," -+ " { \"name\": \"next\", \"type\": [\"null\",\"list\"]}," -+ " { \"name\": \"arraylist\", \"type\": { \"type\":\"array\", \"items\": \"list\" } }" -+ " ]" -+ "}"; -+ -+ int rval; -+ avro_schema_t schema = NULL; -+ avro_schema_error_t error; -+ -+ (void) argc; -+ (void) argv; -+ -+ rval = avro_schema_from_json(json, strlen(json), &schema, &error); -+ if ( rval ) -+ { -+ printf("Failed to read schema from JSON.\n"); -+ exit(EXIT_FAILURE); -+ } -+ else -+ { -+ printf("Successfully read schema from JSON.\n"); -+ } -+ -+#define TEST_AVRO_1167 (1) -+ #if TEST_AVRO_1167 -+ { -+ avro_schema_t schema_copy = NULL; -+ schema_copy = avro_schema_copy( schema ); -+ if ( ! avro_schema_equal(schema, schema_copy) ) -+ { -+ printf("Failed avro_schema_equal(schema, schema_copy)\n"); -+ exit(EXIT_FAILURE); -+ } -+ avro_schema_decref(schema_copy); -+ } -+ #endif -+ -+ avro_schema_decref(schema); -+ return 0; -+} diff --git a/ports/avro-c/avro.patch b/ports/avro-c/avro.patch index 50c32a6d3c4d7b..4f8ae13766e461 100644 --- a/ports/avro-c/avro.patch +++ b/ports/avro-c/avro.patch @@ -1,52 +1,73 @@ -diff -ur a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt ---- a/lang/c/CMakeLists.txt 2017-04-17 19:56:17.000000000 -0400 -+++ b/lang/c/CMakeLists.txt 2017-11-12 20:03:13.776973800 -0500 -@@ -50,7 +50,7 @@ - else(UNIX) - # Hard code for win32 -- need to figure out how to port version.sh for - # Windows. -- set(LIBAVRO_VERSION "22:0:0") -+ set(LIBAVRO_VERSION "23:0:0") - endif(UNIX) - - -@@ -151,25 +151,24 @@ +diff --git a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt +index 11cbf01..620490d 100644 +--- a/lang/c/CMakeLists.txt ++++ b/lang/c/CMakeLists.txt +@@ -149,7 +149,10 @@ else (ZLIB_FOUND) + message("Disabled deflate codec. zlib not found.") + endif (ZLIB_FOUND) + +-find_package(Snappy) ++find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy PATH_SUFFIXES lib) ++find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd PATH_SUFFIXES debug/lib) ++find_path(SNAPPY_INCLUDE_DIR snappy-c.h) ++select_library_configurations(SNAPPY) + if (SNAPPY_FOUND AND ZLIB_FOUND) # Snappy borrows crc32 from zlib + set(SNAPPY_PKG libsnappy) + add_definitions(-DSNAPPY_CODEC) +@@ -161,32 +164,36 @@ else (SNAPPY_FOUND AND ZLIB_FOUND) message("Disabled snappy codec. libsnappy not found or zlib not found.") endif (SNAPPY_FOUND AND ZLIB_FOUND) -find_package(PkgConfig) -pkg_check_modules(LZMA liblzma) -if (LZMA_FOUND) -+find_package(LIBLZMA) -+if (LIBLZMA_FOUND) ++find_package(LibLZMA) ++if (LibLZMA_FOUND) ++ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") ++ set(SNAPPY_LIBRARIES ${SNAPPY_LIBRARIES} -lstdc++) ++ endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(LZMA_PKG liblzma) add_definitions(-DLZMA_CODEC) - include_directories(${LZMA_INCLUDE_DIRS}) - link_directories(${LZMA_LIBRARY_DIRS}) -+ include_directories(${LIBLZMA_INCLUDE_DIRS}) -+ link_directories(${LIBLZMA_LIBRARY_DIRS}) ++ include_directories(${LibLZMA_INCLUDE_DIRS}) ++ link_directories(${LibLZMA_LIBRARY_DIRS}) message("Enabled lzma codec") -else (LZMA_FOUND) -+else (LIBLZMA_FOUND) ++else (LibLZMA_FOUND) set(LZMA_PKG "") - set(LZMA_LIBRARIES "") +- set(LZMA_LIBRARIES "") ++ set(LibLZMA_LIBRARIES "") message("Disabled lzma codec. liblzma not found.") -endif (LZMA_FOUND) +endif (LIBLZMA_FOUND) -set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LZMA_LIBRARIES} ${SNAPPY_LIBRARIES}) -+set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LIBLZMA_LIBRARIES} ${SNAPPY_LIBRARIES}) ++set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LibLZMA_LIBRARIES} ${SNAPPY_LIBRARIES}) set(CODEC_PKG "@ZLIB_PKG@ @LZMA_PKG@ @SNAPPY_PKG@") # Jansson JSON library -pkg_check_modules(JANSSON jansson>=2.3) -+find_package(JANSSON REQUIRED) - if (JANSSON_FOUND) +-if (JANSSON_FOUND) ++find_path(JANSSON_INCLUDE_DIR NAMES jansson.h) ++find_library(JANSSON_LIBRARY NAMES jansson) ++if (JANSSON_LIBRARY) set(JANSSON_PKG libjansson) - include_directories(${JANSSON_INCLUDE_DIR}) -diff -ur a/lang/c/examples/quickstop.c b/lang/c/examples/quickstop.c ---- a/lang/c/examples/quickstop.c 2017-04-17 19:56:17.000000000 -0400 -+++ b/lang/c/examples/quickstop.c 2017-11-10 12:40:59.151301400 -0500 ++ set(JANSSON_LIBRARIES ${JANSSON_LIBRARY}) + include_directories(${JANSSON_INCLUDE_DIRS}) + link_directories(${JANSSON_LIBRARY_DIRS}) +-else (JANSSON_FOUND) ++else (JANSSON_LIBRARY) + message(FATAL_ERROR "libjansson >=2.3 not found") +-endif (JANSSON_FOUND) ++endif (JANSSON_LIBRARY) + + + add_subdirectory(src) +diff --git a/lang/c/examples/quickstop.c b/lang/c/examples/quickstop.c +index f18225b..78e2b1b 100644 +--- a/lang/c/examples/quickstop.c ++++ b/lang/c/examples/quickstop.c @@ -16,6 +16,7 @@ */ @@ -55,7 +76,7 @@ diff -ur a/lang/c/examples/quickstop.c b/lang/c/examples/quickstop.c #include #include -@@ -102,7 +103,7 @@ +@@ -102,7 +103,7 @@ int print_person(avro_file_reader_t db, avro_schema_t reader_schema) if (avro_record_get(person, "ID", &id_datum) == 0) { avro_int64_get(id_datum, &i64); @@ -64,29 +85,32 @@ diff -ur a/lang/c/examples/quickstop.c b/lang/c/examples/quickstop.c } if (avro_record_get(person, "First", &first_datum) == 0) { avro_string_get(first_datum, &p); -diff -ur a/lang/c/src/avro/msinttypes.h b/lang/c/src/avro/msinttypes.h ---- a/lang/c/src/avro/msinttypes.h 2017-04-17 19:56:17.000000000 -0400 -+++ b/lang/c/src/avro/msinttypes.h 2017-11-10 12:37:30.372271300 -0500 -@@ -54,6 +54,9 @@ +diff --git a/lang/c/src/avro/msinttypes.h b/lang/c/src/avro/msinttypes.h +index 29be14b..7efc702 100644 +--- a/lang/c/src/avro/msinttypes.h ++++ b/lang/c/src/avro/msinttypes.h +@@ -54,6 +54,10 @@ // 7.8 Format conversion of integer types +#if (_MSC_VER >= 1900) +# include +#else ++ typedef struct { intmax_t quot; intmax_t rem; -@@ -311,5 +314,6 @@ +@@ -311,5 +315,6 @@ imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) #define wcstoimax _wcstoi64 #define wcstoumax _wcstoui64 -+#endif ++#endif // (_MSC_VER >= 1900) #endif // _MSC_INTTYPES_H_ ] -diff -ur a/lang/c/src/avro/msstdint.h b/lang/c/src/avro/msstdint.h ---- a/lang/c/src/avro/msstdint.h 2017-04-17 19:56:17.000000000 -0400 -+++ b/lang/c/src/avro/msstdint.h 2017-11-10 10:44:14.011482500 -0500 +diff --git a/lang/c/src/avro/msstdint.h b/lang/c/src/avro/msstdint.h +index d02608a..54e8972 100644 +--- a/lang/c/src/avro/msstdint.h ++++ b/lang/c/src/avro/msstdint.h @@ -42,6 +42,10 @@ #include @@ -98,28 +122,45 @@ diff -ur a/lang/c/src/avro/msstdint.h b/lang/c/src/avro/msstdint.h // For Visual Studio 6 in C++ mode and for many Visual Studio versions when // compiling for ARM we should wrap include with 'extern "C++" {}' // or compiler give many errors like this: -@@ -243,5 +247,6 @@ +@@ -243,5 +247,6 @@ typedef uint64_t uintmax_t; #endif // __STDC_CONSTANT_MACROS ] -+#endif // _MSC_VER < 1900 ++#endif // (_MSC_VER >= 1900) #endif // _MSC_STDINT_H_ ] -diff -ur a/lang/c/src/avro_private.h b/lang/c/src/avro_private.h ---- a/lang/c/src/avro_private.h 2017-04-17 19:56:17.000000000 -0400 -+++ b/lang/c/src/avro_private.h 2017-11-10 10:32:33.414879700 -0500 -@@ -34,7 +34,7 @@ +diff --git a/lang/c/src/avro/platform.h b/lang/c/src/avro/platform.h +index 9293055..edfe1e0 100644 +--- a/lang/c/src/avro/platform.h ++++ b/lang/c/src/avro/platform.h +@@ -35,8 +35,10 @@ extern "C" { + // Defines for printing size_t. + #if defined(_WIN64) + #define PRIsz PRIu64 ++ typedef __int64 ssize_t; + #elif defined(_WIN32) + #define PRIsz PRIu32 ++ typedef long ssize_t; + #else // GCC + #define PRIsz "zu" + #endif +diff --git a/lang/c/src/avro_private.h b/lang/c/src/avro_private.h +index f97ef6b..6b29104 100644 +--- a/lang/c/src/avro_private.h ++++ b/lang/c/src/avro_private.h +@@ -34,7 +34,7 @@ extern "C" { #endif #ifdef _WIN32 -#define snprintf _snprintf -+ //#define snprintf _snprintf ++ // #define snprintf _snprintf #endif /* Note that AVRO_PLATFORM_IS_BIG_ENDIAN is *always* defined. It is -diff -ur a/lang/c/src/avroappend.c b/lang/c/src/avroappend.c ---- a/lang/c/src/avroappend.c 2017-04-17 19:56:17.000000000 -0400 -+++ b/lang/c/src/avroappend.c 2017-11-10 12:15:14.878275800 -0500 +diff --git a/lang/c/src/avroappend.c b/lang/c/src/avroappend.c +index 7243c60..39656ff 100644 +--- a/lang/c/src/avroappend.c ++++ b/lang/c/src/avroappend.c @@ -20,7 +20,7 @@ #include #include @@ -129,10 +170,11 @@ diff -ur a/lang/c/src/avroappend.c b/lang/c/src/avroappend.c #endif #include "avro.h" -diff -ur a/lang/c/src/codec.c b/lang/c/src/codec.c ---- a/lang/c/src/codec.c 2017-04-17 19:56:17.000000000 -0400 -+++ b/lang/c/src/codec.c 2017-11-10 11:09:08.033816100 -0500 -@@ -266,7 +266,7 @@ +diff --git a/lang/c/src/codec.c b/lang/c/src/codec.c +index 5b55b35..49789f2 100644 +--- a/lang/c/src/codec.c ++++ b/lang/c/src/codec.c +@@ -269,7 +269,7 @@ static int encode_deflate(avro_codec_t c, void * data, int64_t len) s->next_in = (Bytef*)data; s->avail_in = (uInt)len; @@ -141,7 +183,7 @@ diff -ur a/lang/c/src/codec.c b/lang/c/src/codec.c s->avail_out = (uInt)c->block_size; s->total_out = 0; -@@ -310,10 +310,10 @@ +@@ -313,10 +313,10 @@ static int decode_deflate(avro_codec_t c, void * data, int64_t len) c->used_size = 0; @@ -154,7 +196,7 @@ diff -ur a/lang/c/src/codec.c b/lang/c/src/codec.c s->avail_out = c->block_size; s->total_out = 0; -@@ -334,7 +334,7 @@ +@@ -337,7 +337,7 @@ static int decode_deflate(avro_codec_t c, void * data, int64_t len) if (err == Z_BUF_ERROR) { c->block_data = avro_realloc(c->block_data, c->block_size, c->block_size * 2); @@ -163,30 +205,31 @@ diff -ur a/lang/c/src/codec.c b/lang/c/src/codec.c s->avail_out += c->block_size; c->block_size = c->block_size * 2; } -@@ -437,7 +437,7 @@ +@@ -440,7 +440,7 @@ static int encode_lzma(avro_codec_t codec, void * data, int64_t len) return 1; } - ret = lzma_raw_buffer_encode(filters, NULL, data, len, codec->block_data, &written, codec->block_size); -+ ret = lzma_raw_buffer_encode(filters, NULL, (const uint8_t *)data, len, (uint8_t *)codec->block_data, &written, codec->block_size); ++ ret = lzma_raw_buffer_encode(filters, NULL, (const uint8_t*)data, len, (uint8_t*)codec->block_data, &written, codec->block_size); codec->used_size = written; -@@ -468,8 +468,8 @@ +@@ -471,8 +471,8 @@ static int decode_lzma(avro_codec_t codec, void * data, int64_t len) do { - ret = lzma_raw_buffer_decode(filters, NULL, data, - &read_pos, len, codec->block_data, &write_pos, -+ ret = lzma_raw_buffer_decode(filters, NULL, (const uint8_t *)data, -+ &read_pos, len, (uint8_t *)codec->block_data, &write_pos, ++ ret = lzma_raw_buffer_decode(filters, NULL, (const uint8_t*)data, ++ &read_pos, len, (uint8_t*)codec->block_data, &write_pos, codec->block_size); codec->used_size = write_pos; -diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c ---- a/lang/c/src/schema.c 2017-04-17 19:56:17.000000000 -0400 -+++ b/lang/c/src/schema.c 2017-11-10 11:45:45.268458000 -0500 -@@ -74,7 +74,7 @@ +diff --git a/lang/c/src/schema.c b/lang/c/src/schema.c +index 7b38900..50fa0db 100644 +--- a/lang/c/src/schema.c ++++ b/lang/c/src/schema.c +@@ -74,7 +74,7 @@ static int is_avro_id(const char *name) * namespace (as a newly allocated buffer using Avro's allocator). */ static char *split_namespace_name(const char *fullname, const char **name_out) { @@ -195,7 +238,7 @@ diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c if (last_dot == NULL) { *name_out = fullname; return NULL; -@@ -742,12 +742,12 @@ +@@ -770,12 +770,12 @@ avro_schema_t avro_schema_link_target(avro_schema_t schema) } static const char * @@ -212,7 +255,7 @@ diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c } else { full_name = avro_strdup(name); } -@@ -758,20 +758,20 @@ +@@ -786,20 +786,20 @@ static int save_named_schemas(const avro_schema_t schema, st_table *st) { const char *name = avro_schema_name(schema); @@ -237,7 +280,7 @@ diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c int rval = st_lookup(st, (st_data_t) full_name, &(val.data)); avro_str_free((char *)full_name); if (rval) { -@@ -784,7 +784,7 @@ +@@ -812,7 +812,7 @@ find_named_schemas(const char *name, const char *namespace, st_table *st) static int avro_type_from_json_t(json_t *json, avro_type_t *type, st_table *named_schemas, avro_schema_t *named_type, @@ -246,7 +289,7 @@ diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c { json_t *json_type; const char *type_str; -@@ -835,7 +835,7 @@ +@@ -863,7 +863,7 @@ avro_type_from_json_t(json_t *json, avro_type_t *type, *type = AVRO_MAP; } else if (strcmp(type_str, "fixed") == 0) { *type = AVRO_FIXED; @@ -255,7 +298,7 @@ diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c *type = AVRO_LINK; } else { avro_set_error("Unknown Avro \"type\": %s", type_str); -@@ -930,12 +930,12 @@ +@@ -954,15 +954,15 @@ avro_schema_from_json_t(json_t *json, avro_schema_t *schema, } if (strchr(fullname, '.')) { @@ -267,13 +310,18 @@ diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c + avro_str_free(namespaceX); } else if (json_is_string(json_namespace)) { - const char *namespace = json_string_value(json_namespace); -- *schema = avro_schema_record(fullname, namespace); +- if (strlen(namespace) == 0) { +- namespace = NULL; + const char *namespaceX = json_string_value(json_namespace); ++ if (strlen(namespaceX) == 0) { ++ namespaceX = NULL; + } +- *schema = avro_schema_record(fullname, namespace); + *schema = avro_schema_record(fullname, namespaceX); } else { *schema = avro_schema_record(fullname, parent_namespace); } -@@ -1026,13 +1026,13 @@ +@@ -1053,16 +1053,16 @@ avro_schema_from_json_t(json_t *json, avro_schema_t *schema, } if (strchr(fullname, '.')) { @@ -282,18 +330,23 @@ diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c - *schema = avro_schema_enum_ns(name, namespace); - avro_str_free(namespace); + char *namespaceX; -+ namespaceX = split_namespace_name(fullname, &name); ++ namespaceX = split_namespace_name(fullname, &name); + *schema = avro_schema_enum_ns(name, namespaceX); + avro_str_free(namespaceX); } else if (json_is_string(json_namespace)) { - const char *namespace = json_string_value(json_namespace); -- *schema = avro_schema_enum_ns(fullname, namespace); +- if (strlen(namespace) == 0) { +- namespace = NULL; + const char *namespaceX = json_string_value(json_namespace); ++ if (strlen(namespaceX) == 0) { ++ namespaceX = NULL; + } +- *schema = avro_schema_enum_ns(fullname, namespace); + *schema = avro_schema_enum_ns(fullname, namespaceX); } else { *schema = avro_schema_enum_ns(fullname, parent_namespace); } -@@ -1160,13 +1160,13 @@ +@@ -1190,16 +1190,16 @@ avro_schema_from_json_t(json_t *json, avro_schema_t *schema, fullname = json_string_value(json_name); if (strchr(fullname, '.')) { @@ -302,18 +355,23 @@ diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c - *schema = avro_schema_fixed_ns(name, namespace, (int64_t) size); - avro_str_free(namespace); + char *namespaceX; -+ namespaceX = split_namespace_name(fullname, &name); ++ namespaceX = split_namespace_name(fullname, &name); + *schema = avro_schema_fixed_ns(name, namespaceX, (int64_t) size); + avro_str_free(namespaceX); } else if (json_is_string(json_namespace)) { - const char *namespace = json_string_value(json_namespace); -- *schema = avro_schema_fixed_ns(fullname, namespace, (int64_t) size); +- if (strlen(namespace) == 0) { +- namespace = NULL; + const char *namespaceX = json_string_value(json_namespace); ++ if (strlen(namespaceX) == 0) { ++ namespaceX = NULL; + } +- *schema = avro_schema_fixed_ns(fullname, namespace, (int64_t) size); + *schema = avro_schema_fixed_ns(fullname, namespaceX, (int64_t) size); } else { *schema = avro_schema_fixed_ns(fullname, parent_namespace, (int64_t) size); } -@@ -1749,9 +1749,9 @@ +@@ -1821,9 +1821,9 @@ static int write_link(avro_writer_t out, const struct avro_link_schema_t *link, { int rval; check(rval, avro_write_str(out, "\"")); @@ -326,10 +384,22 @@ diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c check(rval, avro_write_str(out, ".")); } check(rval, avro_write_str(out, avro_schema_name(link->to))); -diff -ur a/lang/c/tests/test_avro_data.c b/lang/c/tests/test_avro_data.c ---- a/lang/c/tests/test_avro_data.c 2017-04-17 19:56:17.000000000 -0400 -+++ b/lang/c/tests/test_avro_data.c 2017-11-10 12:41:29.924190100 -0500 -@@ -112,7 +112,7 @@ +diff --git a/lang/c/tests/test_avro_data.c b/lang/c/tests/test_avro_data.c +index 1da09e6..714d5d8 100644 +--- a/lang/c/tests/test_avro_data.c ++++ b/lang/c/tests/test_avro_data.c +@@ -28,6 +28,10 @@ avro_writer_t writer; + + typedef int (*avro_test) (void); + ++#ifdef _WIN32 ++# define strcasecmp stricmp ++#endif ++ + /* + * Use a custom allocator that verifies that the size that we use to + * free an object matches the size that we use to allocate it. +@@ -112,7 +116,7 @@ write_read_check(avro_schema_t writers_schema, avro_datum_t datum, if (size != avro_writer_tell(writer)) { fprintf(stderr, "Unable to calculate size %s validate=%d " @@ -338,12 +408,3 @@ diff -ur a/lang/c/tests/test_avro_data.c b/lang/c/tests/test_avro_data.c type, validate, size, avro_writer_tell(writer), avro_strerror()); exit(EXIT_FAILURE); -@@ -142,7 +142,7 @@ - { - char *json = NULL; - avro_datum_to_json(datum, 1, &json); -- if (strcasecmp(json, expected) != 0) { -+ if (stricmp(json, expected) != 0) { - fprintf(stderr, "Unexpected JSON encoding: %s\n", json); - exit(EXIT_FAILURE); - } diff --git a/ports/avro-c/fix-build-error.patch b/ports/avro-c/fix-build-error.patch deleted file mode 100644 index 6e07310fabba18..00000000000000 --- a/ports/avro-c/fix-build-error.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/lang/c/src/CMakeLists.txt b/lang/c/src/CMakeLists.txt -index c21f1ce..accb0e3 100644 ---- a/lang/c/src/CMakeLists.txt -+++ b/lang/c/src/CMakeLists.txt -@@ -85,13 +85,13 @@ source_group(Avro FILES ${AVRO_SRC}) - string(REPLACE ":" "." LIBAVRO_DOT_VERSION ${LIBAVRO_VERSION}) - - add_library(avro-static STATIC ${AVRO_SRC}) --target_link_libraries(avro-static ${JANSSON_LIBRARIES} ${CODEC_LIBRARIES} ${THREADS_LIBRARIES}) -+target_link_libraries(avro-static jansson::jansson ${CODEC_LIBRARIES} ${THREADS_LIBRARIES}) - set_target_properties(avro-static PROPERTIES OUTPUT_NAME avro) - - if (NOT WIN32) - # TODO: Create Windows DLLs. See http://www.cmake.org/Wiki/BuildingWinDLL - add_library(avro-shared SHARED ${AVRO_SRC}) --target_link_libraries(avro-shared ${JANSSON_LIBRARIES} ${CODEC_LIBRARIES} ${THREADS_LIBRARIES}) -+target_link_libraries(avro-shared jansson::jansson ${CODEC_LIBRARIES} ${THREADS_LIBRARIES}) - set_target_properties(avro-shared PROPERTIES - OUTPUT_NAME avro - SOVERSION ${LIBAVRO_DOT_VERSION}) diff --git a/ports/avro-c/portfile.cmake b/ports/avro-c/portfile.cmake index 553e694d8a4d17..195d85543cae46 100644 --- a/ports/avro-c/portfile.cmake +++ b/ports/avro-c/portfile.cmake @@ -1,29 +1,21 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() +vcpkg_buildpath_length_warning(37) +vcpkg_fail_port_install(ON_TARGET "uwp" "osx") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/avro - REF release-1.8.2 - SHA512 a48cc353aadd45ad2c8593bf89ec3f1ddb0fcd364b79dd002a60a54d49cab714b46eee8bd6dc47b13588b9eead49c754dfe05f6aff735752fca8d2cd35ae8649 + REF release-1.9.2 + SHA512 6a6980901eea964c050eb3d61fadf28712e2f02c36985bf8e5176b668bba48985f6a666554a1964435448de29b18d790ab86b787d0288a22fd9cba00746a7846 HEAD_REF master PATCHES - avro.patch - avro-pr-217.patch - fix-build-error.patch # Since jansson updated, use jansson::jansson instead of the macro ${JANSSON_LIBRARIES} + avro.patch # Private vcpkg build fixes + snappy-pr-793.patch # Snappy build fixes for Windows (PR-793) ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/lang/c PREFER_NINJA OPTIONS - -DCMAKE_DISABLE_FIND_PACKAGE_Snappy=ON ) vcpkg_install_cmake() @@ -34,5 +26,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/lang/c/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/avro-c) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/avro-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/avro-c/copyright) +file(INSTALL ${SOURCE_PATH}/lang/c/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/avro-c/snappy-pr-793.patch b/ports/avro-c/snappy-pr-793.patch new file mode 100644 index 00000000000000..28909318dad9e2 --- /dev/null +++ b/ports/avro-c/snappy-pr-793.patch @@ -0,0 +1,56 @@ +diff -ru b/c/src/codec.c a/lang/c/src/codec.c +--- b/lang/c/src/codec.c 2020-01-23 16:18:15.119970300 +0200 ++++ a/lang/c/src/codec.c 2020-01-23 19:31:41.679834300 +0200 +@@ -24,6 +24,9 @@ + # elif defined(__FreeBSD__) + # include + # define __bswap_32 bswap32 ++# elif defined(_WIN32) ++# include ++# define __bswap_32 _byteswap_ulong + # else + # include + # endif +@@ -115,14 +118,14 @@ + return 1; + } + +- if (snappy_compress(data, len, c->block_data, &outlen) != SNAPPY_OK) ++ if (snappy_compress((const char *)data, len, (char*)c->block_data, &outlen) != SNAPPY_OK) + { + avro_set_error("Error compressing block with Snappy"); + return 1; + } + +- crc = __bswap_32(crc32(0, data, len)); +- memcpy(c->block_data+outlen, &crc, 4); ++ crc = __bswap_32(crc32(0, (const Bytef *)data, len)); ++ memcpy((char*)c->block_data+outlen, &crc, 4); + c->used_size = outlen+4; + + return 0; +@@ -133,7 +136,7 @@ + uint32_t crc; + size_t outlen; + +- if (snappy_uncompressed_length(data, len-4, &outlen) != SNAPPY_OK) { ++ if (snappy_uncompressed_length((const char*)data, len-4, &outlen) != SNAPPY_OK) { + avro_set_error("Uncompressed length error in snappy"); + return 1; + } +@@ -152,13 +155,13 @@ + return 1; + } + +- if (snappy_uncompress(data, len-4, c->block_data, &outlen) != SNAPPY_OK) ++ if (snappy_uncompress((const char*)data, len-4, (char*)c->block_data, &outlen) != SNAPPY_OK) + { + avro_set_error("Error uncompressing block with Snappy"); + return 1; + } + +- crc = __bswap_32(crc32(0, c->block_data, outlen)); ++ crc = __bswap_32(crc32(0, (const Bytef *)c->block_data, outlen)); + if (memcmp(&crc, (char*)data+len-4, 4)) + { + avro_set_error("CRC32 check failure uncompressing block with Snappy"); diff --git a/ports/avro-c/vcpkg.json b/ports/avro-c/vcpkg.json new file mode 100644 index 00000000000000..634b2c9482e21a --- /dev/null +++ b/ports/avro-c/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "avro-c", + "version-string": "1.9.2", + "port-version": 2, + "description": "Apache Avro is a data serialization system", + "homepage": "https://github.com/apache/avro", + "supports": "!(uwp | osx)", + "dependencies": [ + "jansson", + "liblzma", + "snappy", + "zlib" + ] +} diff --git a/ports/avro-cpp/fix-windows-build.patch b/ports/avro-cpp/fix-windows-build.patch new file mode 100644 index 00000000000000..b20706fdc1485c --- /dev/null +++ b/ports/avro-cpp/fix-windows-build.patch @@ -0,0 +1,33 @@ +diff --git a/lang/c++/impl/avrogencpp.cc b/lang/c++/impl/avrogencpp.cc +index 61570413..0b6b35a2 100644 +--- a/lang/c++/impl/avrogencpp.cc ++++ b/lang/c++/impl/avrogencpp.cc +@@ -804,8 +804,8 @@ static string readGuard(const string &filename) { + + int main(int argc, char **argv) { + const string NS("namespace"); +- const string OUT("output"); +- const string IN("input"); ++ const string OUT_FILE("output"); ++ const string IN_FILE("input"); + const string INCLUDE_PREFIX("include-prefix"); + const string NO_UNION_TYPEDEF("no-union-typedef"); + +@@ -817,14 +817,14 @@ int main(int argc, char **argv) { + po::store(po::parse_command_line(argc, argv, desc), vm); + po::notify(vm); + +- if (vm.count("help") || vm.count(IN) == 0 || vm.count(OUT) == 0) { ++ if (vm.count("help") || vm.count(IN_FILE) == 0 || vm.count(OUT_FILE) == 0) { + std::cout << desc << std::endl; + return 1; + } + + string ns = vm.count(NS) > 0 ? vm[NS].as() : string(); +- string outf = vm.count(OUT) > 0 ? vm[OUT].as() : string(); +- string inf = vm.count(IN) > 0 ? vm[IN].as() : string(); ++ string outf = vm.count(OUT_FILE) > 0 ? vm[OUT_FILE].as() : string(); ++ string inf = vm.count(IN_FILE) > 0 ? vm[IN_FILE].as() : string(); + string incPrefix = vm[INCLUDE_PREFIX].as(); + bool noUnion = vm.count(NO_UNION_TYPEDEF) != 0; + if (incPrefix == "-") { diff --git a/ports/avro-cpp/install.patch b/ports/avro-cpp/install.patch new file mode 100644 index 00000000000000..1035b3bf35c8f1 --- /dev/null +++ b/ports/avro-cpp/install.patch @@ -0,0 +1,106 @@ +diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt +index bf764ce4..e84524d0 100644 +--- a/lang/c++/CMakeLists.txt ++++ b/lang/c++/CMakeLists.txt +@@ -48,6 +48,8 @@ list(GET AVRO_VERSION 2 AVRO_VERSION_PATCH) + project (Avro-cpp) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}) + ++find_package(ZLIB REQUIRED) ++ + if (WIN32 AND NOT CYGWIN AND NOT MSYS) + add_definitions (/EHa) + add_definitions ( +@@ -125,12 +127,12 @@ set_target_properties (avrocpp PROPERTIES + set_target_properties (avrocpp_s PROPERTIES + VERSION ${AVRO_VERSION_MAJOR}.${AVRO_VERSION_MINOR}.${AVRO_VERSION_PATCH}) + +-target_link_libraries (avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) ++target_link_libraries (avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB) + target_include_directories(avrocpp PRIVATE ${SNAPPY_INCLUDE_DIR}) + + add_executable (precompile test/precompile.cc) + +-target_link_libraries (precompile avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) ++target_link_libraries (precompile avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB) + + macro (gen file ns) + add_custom_command (OUTPUT ${file}.hh +@@ -160,37 +162,42 @@ gen (primitivetypes pt) + gen (cpp_reserved_words cppres) + + add_executable (avrogencpp impl/avrogencpp.cc) +-target_link_libraries (avrogencpp avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) ++target_link_libraries (avrogencpp avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB) + +-enable_testing() ++if(BUILD_TESTING) ++ enable_testing() ++endif() + + macro (unittest name) + add_executable (${name} test/${name}.cc) +- target_link_libraries (${name} avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) ++ target_link_libraries (${name} avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB) + add_test (NAME ${name} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name}) + endmacro (unittest) + +-unittest (buffertest) +-unittest (unittest) +-unittest (SchemaTests) +-unittest (LargeSchemaTests) +-unittest (CodecTests) +-unittest (StreamTests) +-unittest (SpecificTests) +-unittest (DataFileTests) +-unittest (JsonTests) +-unittest (AvrogencppTests) +-unittest (CompilerTests) +-unittest (AvrogencppTestReservedWords) +- +-add_dependencies (AvrogencppTestReservedWords cpp_reserved_words_hh) +- +-add_dependencies (AvrogencppTests bigrecord_hh bigrecord_r_hh bigrecord2_hh +- tweet_hh +- union_array_union_hh union_map_union_hh union_conflict_hh +- recursive_hh reuse_hh circulardep_hh tree1_hh tree2_hh crossref_hh +- primitivetypes_hh empty_record_hh) ++if(BUILD_TESTING) ++ unittest (buffertest) ++ unittest (unittest) ++ unittest (SchemaTests) ++ unittest (LargeSchemaTests) ++ unittest (CodecTests) ++ unittest (StreamTests) ++ unittest (SpecificTests) ++ unittest (DataFileTests) ++ unittest (JsonTests) ++ unittest (AvrogencppTests) ++ unittest (CompilerTests) ++ unittest (AvrogencppTestReservedWords) ++ ++ add_dependencies (AvrogencppTestReservedWords cpp_reserved_words_hh) ++ ++ add_dependencies (AvrogencppTests bigrecord_hh bigrecord_r_hh bigrecord2_hh ++ tweet_hh ++ union_array_union_hh union_map_union_hh union_conflict_hh ++ recursive_hh reuse_hh circulardep_hh tree1_hh tree2_hh crossref_hh ++ primitivetypes_hh empty_record_hh) ++ ++endif() + + include (InstallRequiredSystemLibraries) + +@@ -201,9 +208,9 @@ include (CPack) + install (TARGETS avrocpp avrocpp_s + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +- RUNTIME DESTINATION lib) ++ RUNTIME DESTINATION bin) + +-install (TARGETS avrogencpp RUNTIME DESTINATION bin) ++install (TARGETS avrogencpp RUNTIME DESTINATION tools/bin) + + install (DIRECTORY api/ DESTINATION include/avro + FILES_MATCHING PATTERN *.hh) diff --git a/ports/avro-cpp/portfile.cmake b/ports/avro-cpp/portfile.cmake new file mode 100644 index 00000000000000..43a2fd27814ffe --- /dev/null +++ b/ports/avro-cpp/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/avro + REF 2ab8fa85d05f04387bd5d63b10ad1c8fd2243616 + SHA512 fd21f0919b0e5e884bdf4d66c4d5ba056f04c426b309ec0b5ab26642a5f6b00d46f4dd965431b10130bc5f0d81699e2195780e90e127f63049ee5763403ef7c8 + HEAD_REF master + PATCHES + install.patch + fix-windows-build.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + snappy CMAKE_DISABLE_FIND_PACKAGE_Snappy +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/lang/c++ + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_TESTING=OFF + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DAVRO_ADD_PROTECTOR_FLAGS=1 +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/lang/c++/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/avro-cpp/vcpkg.json b/ports/avro-cpp/vcpkg.json new file mode 100644 index 00000000000000..72cf168bc81c4f --- /dev/null +++ b/ports/avro-cpp/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "avro-cpp", + "version-date": "2021-06-01", + "description": "Apache Avro is a data serialization system", + "homepage": "https://github.com/apache/avro", + "supports": "!(windows & static)", + "dependencies": [ + "boost-crc", + "boost-filesystem", + "boost-format", + "boost-iostreams", + "boost-program-options", + "boost-random", + "boost-test", + "boost-thread", + "bzip2", + "liblzma", + "libzip", + "zlib", + "zstd" + ], + "features": { + "snappy": { + "description": "Support Snappy for compression", + "dependencies": [ + "snappy" + ] + } + } +} diff --git a/ports/aws-c-auth/fix-cmake-target-path.patch b/ports/aws-c-auth/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..4eb3068a5b8a9c --- /dev/null +++ b/ports/aws-c-auth/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6a00afa..eba3d43 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -118,7 +118,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-auth-config.cmake b/cmake/aws-c-auth-config.cmake +index 430c1d7..6adbe53 100644 +--- a/cmake/aws-c-auth-config.cmake ++++ b/cmake/aws-c-auth-config.cmake +@@ -5,9 +5,5 @@ find_dependency(aws-c-cal) + find_dependency(aws-c-io) + find_dependency(aws-c-http) + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/ports/aws-c-auth/portfile.cmake b/ports/aws-c-auth/portfile.cmake new file mode 100644 index 00000000000000..c304bad4d04491 --- /dev/null +++ b/ports/aws-c-auth/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-c-auth + REF 61b6524960ad5e0c7aa2e38b343425d5941781bf # v0.6.3 + SHA512 b5dda92e4a8796f3f1b8e2d326f57979a673f57325c921cdbc9c44273ada2f2a8eb6723f0292d223175ba4cca24508d2b635fad2af5ec7dd9e7b06db9588ede6 + HEAD_REF master + PATCHES fix-cmake-target-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-auth/cmake) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-auth" + "${CURRENT_PACKAGES_DIR}/lib/aws-c-auth" + ) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-c-auth/vcpkg.json b/ports/aws-c-auth/vcpkg.json new file mode 100644 index 00000000000000..1190e5ea9546ed --- /dev/null +++ b/ports/aws-c-auth/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "aws-c-auth", + "version": "0.6.3", + "description": "C99 library implementation of AWS client-side authentication: standard credentials providers and signing.", + "homepage": "https://github.com/awslabs/aws-c-auth", + "supports": "!arm & !uwp", + "dependencies": [ + "aws-c-common", + "aws-c-http", + { + "name": "s2n", + "platform": "!uwp & !windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-c-cal/fix-cmake-target-path.patch b/ports/aws-c-cal/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..25d6749b873012 --- /dev/null +++ b/ports/aws-c-cal/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6039819..b74b65c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -158,7 +158,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-cal-config.cmake b/cmake/aws-c-cal-config.cmake +index 73e7311..e87c43a 100644 +--- a/cmake/aws-c-cal-config.cmake ++++ b/cmake/aws-c-cal-config.cmake +@@ -7,9 +7,5 @@ if (NOT BYO_CRYPTO AND NOT WIN32 AND NOT APPLE) + find_dependency(LibCrypto) + endif() + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/ports/aws-c-cal/portfile.cmake b/ports/aws-c-cal/portfile.cmake new file mode 100644 index 00000000000000..20da8a95623321 --- /dev/null +++ b/ports/aws-c-cal/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-c-cal + REF aa89aa4950074babe84762413f39bd364ecaf944 # v0.5.11 + SHA512 b92ae3cb14d26dfe48cb903df56f7df91a4dc0ab2e5ea4f095c72b0b7e0a2582f1324c73eb42c080bcb0a59a3dfc37cd2912037fc8e5f7df8433899749fca63c + HEAD_REF master + PATCHES fix-cmake-target-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-cal/cmake) + +vcpkg_copy_tools( + TOOL_NAMES sha256_profile + AUTO_CLEAN +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-cal" + "${CURRENT_PACKAGES_DIR}/lib/aws-c-cal" + ) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-c-cal/vcpkg.json b/ports/aws-c-cal/vcpkg.json new file mode 100644 index 00000000000000..1045509244475d --- /dev/null +++ b/ports/aws-c-cal/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "aws-c-cal", + "version": "0.5.11", + "description": "C99 wrapper for cryptography primitives.", + "homepage": "https://github.com/awslabs/aws-c-cal", + "supports": "!arm & !uwp", + "dependencies": [ + "aws-c-common", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-c-common/CONTROL b/ports/aws-c-common/CONTROL deleted file mode 100644 index f9e0fc9afcfd58..00000000000000 --- a/ports/aws-c-common/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: aws-c-common -Version: 0.3.11-1 -Description: AWS common library for C diff --git a/ports/aws-c-common/disable-internal-crt-option.patch b/ports/aws-c-common/disable-internal-crt-option.patch index d82a00aaabed68..6fec4b214d190d 100644 --- a/ports/aws-c-common/disable-internal-crt-option.patch +++ b/ports/aws-c-common/disable-internal-crt-option.patch @@ -1,10 +1,10 @@ diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake -index 5ceb11c..9d0aa12 100644 +index 249b7d5..41a31e2 100644 --- a/cmake/AwsCFlags.cmake +++ b/cmake/AwsCFlags.cmake @@ -38,15 +38,6 @@ function(aws_set_common_properties target) - # Disable unknown pragma warnings - list(APPEND AWS_C_FLAGS /wd4068) + list(APPEND AWS_C_FLAGS /DAWS_SUPPORT_WIN7=1) + endif() - string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE) - if(STATIC_CRT) @@ -16,5 +16,5 @@ index 5ceb11c..9d0aa12 100644 - list(APPEND AWS_C_FLAGS "${_FLAGS}") - else() - list(APPEND AWS_C_FLAGS -Wall -Werror -Wstrict-prototypes) + list(APPEND AWS_C_FLAGS -Wall -Wstrict-prototypes) diff --git a/ports/aws-c-common/fix-cmake-target-path.patch b/ports/aws-c-common/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..9ab97f6798d6a5 --- /dev/null +++ b/ports/aws-c-common/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b01f56..3cc541d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -239,7 +239,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-common-config.cmake b/cmake/aws-c-common-config.cmake +index e495210..b7676c2 100644 +--- a/cmake/aws-c-common-config.cmake ++++ b/cmake/aws-c-common-config.cmake +@@ -4,9 +4,5 @@ if(WIN32 OR UNIX OR APPLE) + find_package(Threads REQUIRED) + endif() + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/ports/aws-c-common/fix-dependencey-build-error.patch b/ports/aws-c-common/fix-dependencey-build-error.patch deleted file mode 100644 index cfbf2611c967c5..00000000000000 --- a/ports/aws-c-common/fix-dependencey-build-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/aws/common/byte_buf.h b/include/aws/common/byte_buf.h -index 545b06d..c579c82 100644 ---- a/include/aws/common/byte_buf.h -+++ b/include/aws/common/byte_buf.h -@@ -21,6 +21,8 @@ - - #include - -+#pragma warning(disable: 4068) -+ - /** - * Represents a length-delimited binary string or buffer. If byte buffer points - * to constant memory or memory that should otherwise not be freed by this diff --git a/ports/aws-c-common/portfile.cmake b/ports/aws-c-common/portfile.cmake index 53d85abb08d640..a6463c21e72f7c 100644 --- a/ports/aws-c-common/portfile.cmake +++ b/ports/aws-c-common/portfile.cmake @@ -1,37 +1,33 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO awslabs/aws-c-common - REF v0.3.11 - SHA512 da845f748aecfff61209f542f4eac8d46738af52ce980d5c8315397f859429dfd9e4bf989ddf2fbe938d1efb33dce9c531c92cbe53388b1d1082d5caa97e8750 + REF fdd4a10243903260f412f587cc748f0ac79629b4 # v0.6.9 + SHA512 969c9b85af58fc144480f6548e78126cf3fe758951ecbdffb579163b9a505a7ea58c32430390102ff620e828bf241dd24c0167f205306949d36dcf4504efa09a HEAD_REF master PATCHES - fix-dependencey-build-error.patch # This patch fixes dependency port compilation failure disable-internal-crt-option.patch # Disable internal crt option because vcpkg contains crt processing flow + fix-cmake-target-path.patch # Shared libraries and static libraries are not built at the same time ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/aws-c-common/cmake) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-common/cmake) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake) file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-common - ${CURRENT_PACKAGES_DIR}/lib/aws-c-common - ) + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-common" + "${CURRENT_PACKAGES_DIR}/lib/aws-c-common" + ) vcpkg_copy_pdbs() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-c-common RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/share -) +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-c-common/vcpkg.json b/ports/aws-c-common/vcpkg.json new file mode 100644 index 00000000000000..4b629754e30a87 --- /dev/null +++ b/ports/aws-c-common/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "aws-c-common", + "version": "0.6.9", + "description": "AWS common library for C", + "homepage": "https://github.com/awslabs/aws-c-common", + "supports": "!arm & !uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-c-compression/fix-cmake-target-path.patch b/ports/aws-c-compression/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..035b96cae06245 --- /dev/null +++ b/ports/aws-c-compression/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e70e013..0639229 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,7 +88,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-compression-config.cmake b/cmake/aws-c-compression-config.cmake +index d919e90..707ce3a 100644 +--- a/cmake/aws-c-compression-config.cmake ++++ b/cmake/aws-c-compression-config.cmake +@@ -2,9 +2,5 @@ include(CMakeFindDependencyMacro) + + find_dependency(aws-c-common) + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/ports/aws-c-compression/portfile.cmake b/ports/aws-c-compression/portfile.cmake new file mode 100644 index 00000000000000..53c9d1e002248f --- /dev/null +++ b/ports/aws-c-compression/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-c-compression + REF 5fab8bc5ab5321d86f6d153b06062419080820ec # v0.2.14 + SHA512 0063d0d644824d858211840115c17a33bfc2b67799e886c530ea8a42071b7bfc67bb6cf8135c538a292b8a7a6276b1d24bb7649f37ce335bc16938f2fca5cb7d + HEAD_REF master + PATCHES fix-cmake-target-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-compression/cmake) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-compression" + "${CURRENT_PACKAGES_DIR}/lib/aws-c-compression" +) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-c-compression/vcpkg.json b/ports/aws-c-compression/vcpkg.json new file mode 100644 index 00000000000000..1a9c1573543807 --- /dev/null +++ b/ports/aws-c-compression/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "aws-c-compression", + "version": "0.2.14", + "description": "C99 implementation of huffman encoding/decoding", + "homepage": "https://github.com/awslabs/aws-c-compression", + "supports": "!arm & !uwp", + "dependencies": [ + "aws-c-common", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-c-event-stream/CONTROL b/ports/aws-c-event-stream/CONTROL deleted file mode 100644 index 25dd1c936bb232..00000000000000 --- a/ports/aws-c-event-stream/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: aws-c-event-stream -Version: 0.1.1 -Description: C99 implementation of the vnd.amazon.event-stream content-type. -Build-Depends: aws-c-common, aws-checksums \ No newline at end of file diff --git a/ports/aws-c-event-stream/fix-cmake-target-path.patch b/ports/aws-c-event-stream/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..37d28ca9bc5015 --- /dev/null +++ b/ports/aws-c-event-stream/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index daf434c..32d7851 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,7 +91,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-event-stream-config.cmake b/cmake/aws-c-event-stream-config.cmake +index 76adb84..7884368 100644 +--- a/cmake/aws-c-event-stream-config.cmake ++++ b/cmake/aws-c-event-stream-config.cmake +@@ -2,9 +2,5 @@ include(CMakeFindDependencyMacro) + find_dependency(aws-c-io) + find_dependency(aws-checksums) + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/ports/aws-c-event-stream/portfile.cmake b/ports/aws-c-event-stream/portfile.cmake index 8d1b0ec70bce25..c1c307aa9e9d8e 100644 --- a/ports/aws-c-event-stream/portfile.cmake +++ b/ports/aws-c-event-stream/portfile.cmake @@ -1,35 +1,32 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO awslabs/aws-c-event-stream - REF v0.1.1 - SHA512 974311cdface59bb5a95c7c249ad31cf694ebefd5c7b25f280f6817c6dc8d9ab1fdc8f75030099efe573be41a93676f199fda797d2a7bb41533f7e15f05de120 + REF e87537be561d753ec82e783bc0929b1979c585f8 # v0.2.7 + SHA512 651b05ba6d87ad8f65f6cf7e8940b7ea500722848f3e65c2de0bf84d2e6321d0aa1631d4f64a78cf5ed5ed5adac6805a4e91e5c31b3ae86e8c37afb38da4c786 HEAD_REF master + PATCHES fix-cmake-target-path.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA OPTIONS "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/aws-c-event-stream/cmake) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-event-stream/cmake) file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-event-stream - ${CURRENT_PACKAGES_DIR}/lib/aws-c-event-stream + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-event-stream" + "${CURRENT_PACKAGES_DIR}/lib/aws-c-event-stream" ) vcpkg_copy_pdbs() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-c-event-stream RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/share -) +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-c-event-stream/vcpkg.json b/ports/aws-c-event-stream/vcpkg.json new file mode 100644 index 00000000000000..de4c3296beea8e --- /dev/null +++ b/ports/aws-c-event-stream/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "aws-c-event-stream", + "version": "0.2.7", + "description": "C99 implementation of the vnd.amazon.event-stream content-type.", + "homepage": "https://github.com/awslabs/aws-c-event-stream", + "supports": "!arm & !uwp", + "dependencies": [ + "aws-c-cal", + "aws-c-common", + "aws-c-io", + "aws-checksums", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-c-http/fix-cmake-target-path.patch b/ports/aws-c-http/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..1e2f4020913c51 --- /dev/null +++ b/ports/aws-c-http/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7b0d8e5..d46b498 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -83,7 +83,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-http-config.cmake b/cmake/aws-c-http-config.cmake +index 8633305..eb7f364 100644 +--- a/cmake/aws-c-http-config.cmake ++++ b/cmake/aws-c-http-config.cmake +@@ -3,9 +3,5 @@ include(CMakeFindDependencyMacro) + find_dependency(aws-c-io) + find_dependency(aws-c-compression) + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/ports/aws-c-http/portfile.cmake b/ports/aws-c-http/portfile.cmake new file mode 100644 index 00000000000000..032f9a22481de2 --- /dev/null +++ b/ports/aws-c-http/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-c-http + REF 6ff61d621c374ab763f94584d26b1d29baa81c2e # v0.6.5 + SHA512 91a5f3c18e6c8d14368ad2b7275a1ebcc6398758f6b1f87ba6199998390a26e768e25c16b27f589e35371f7304b6784cfc21699ff724c811135f2f73732fe85b + HEAD_REF master + PATCHES fix-cmake-target-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-http/cmake) + +vcpkg_copy_tools( + TOOL_NAMES elasticurl + AUTO_CLEAN +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-http" + "${CURRENT_PACKAGES_DIR}/lib/aws-c-http" + ) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-c-http/vcpkg.json b/ports/aws-c-http/vcpkg.json new file mode 100644 index 00000000000000..af730c155b7974 --- /dev/null +++ b/ports/aws-c-http/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "aws-c-http", + "version": "0.6.5", + "description": "C99 implementation of the HTTP/1.1 and HTTP/2 specifications", + "homepage": "https://github.com/awslabs/aws-c-http", + "supports": "!arm & !uwp", + "dependencies": [ + "aws-c-cal", + "aws-c-common", + "aws-c-compression", + "aws-c-io", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-c-io/fix-cmake-target-path.patch b/ports/aws-c-io/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..ca5d575e443e71 --- /dev/null +++ b/ports/aws-c-io/fix-cmake-target-path.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a8a9099..a657782 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -215,7 +215,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-io-config.cmake b/cmake/aws-c-io-config.cmake +index d4bc525..72a78ec 100644 +--- a/cmake/aws-c-io-config.cmake ++++ b/cmake/aws-c-io-config.cmake +@@ -7,8 +7,4 @@ endif() + find_dependency(aws-c-common) + find_dependency(aws-c-cal) + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) diff --git a/ports/aws-c-io/portfile.cmake b/ports/aws-c-io/portfile.cmake new file mode 100644 index 00000000000000..6b9e7eba4975c7 --- /dev/null +++ b/ports/aws-c-io/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-c-io + REF 57b00febac48e78f8bf8cff4c82a249e6648842a # v0.10.7 + SHA512 ffcf5ba4ccdff23ca390fc4eb935f88040447589886348234aa1c24b531401521df99a6ac578c1679a3c1a06dfcef6deb833a0b9d53e31d42576a3ad03ade6fc + HEAD_REF master + PATCHES fix-cmake-target-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-io/cmake) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-io" + "${CURRENT_PACKAGES_DIR}/lib/aws-c-io" + ) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-c-io/vcpkg.json b/ports/aws-c-io/vcpkg.json new file mode 100644 index 00000000000000..411589807e7367 --- /dev/null +++ b/ports/aws-c-io/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "aws-c-io", + "version": "0.10.7", + "description": "Handles all IO and TLS work for application protocols.", + "homepage": "https://github.com/awslabs/aws-c-io", + "supports": "!arm & !uwp", + "dependencies": [ + "aws-c-cal", + "aws-c-common", + { + "name": "s2n", + "platform": "!uwp & !windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-c-mqtt/fix-cmake-target-path.patch b/ports/aws-c-mqtt/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..9490f42b90c38c --- /dev/null +++ b/ports/aws-c-mqtt/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3d80abb..36c027f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -94,7 +94,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-mqtt-config.cmake b/cmake/aws-c-mqtt-config.cmake +index 4a4dcbb..2ad48d2 100644 +--- a/cmake/aws-c-mqtt-config.cmake ++++ b/cmake/aws-c-mqtt-config.cmake +@@ -6,9 +6,5 @@ if (@MQTT_WITH_WEBSOCKETS@) + find_dependency(aws-c-http) + endif() + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/ports/aws-c-mqtt/portfile.cmake b/ports/aws-c-mqtt/portfile.cmake new file mode 100644 index 00000000000000..1df85966aa42fb --- /dev/null +++ b/ports/aws-c-mqtt/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-c-mqtt + REF 0a70bf814845e487b7e4862af7ad9e4a1199b5f4 # v0.7.6 + SHA512 9c8719004e9e4c56f270c5c5dcb41b5ecacb050dadf2a548ab2119a1a8f223c9117829346e2e86c8c77f6efe3502019085344fe4f470ccdd646dc87a3d4f4c3f + HEAD_REF master + PATCHES fix-cmake-target-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-mqtt/cmake) + +vcpkg_copy_tools( + TOOL_NAMES elastipubsub + AUTO_CLEAN +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-mqtt" + "${CURRENT_PACKAGES_DIR}/lib/aws-c-mqtt" + ) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-c-mqtt/vcpkg.json b/ports/aws-c-mqtt/vcpkg.json new file mode 100644 index 00000000000000..540a2c32d91b63 --- /dev/null +++ b/ports/aws-c-mqtt/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "aws-c-mqtt", + "version": "0.7.6", + "description": "C99 implementation of the MQTT 3.1.1 specification.", + "homepage": "https://github.com/awslabs/aws-c-mqtt", + "supports": "!arm & !uwp", + "dependencies": [ + { + "name": "s2n", + "platform": "!uwp & !windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-c-s3/fix-cmake-target-path.patch b/ports/aws-c-s3/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..cedeca96a9f7b7 --- /dev/null +++ b/ports/aws-c-s3/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 318b299..43f6d31 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -104,7 +104,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-s3-config.cmake b/cmake/aws-c-s3-config.cmake +index eb62a4b..24debd9 100644 +--- a/cmake/aws-c-s3-config.cmake ++++ b/cmake/aws-c-s3-config.cmake +@@ -3,8 +3,4 @@ include(CMakeFindDependencyMacro) + find_dependency(aws-c-auth) + find_dependency(aws-c-http) + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) +\ No newline at end of file diff --git a/ports/aws-c-s3/portfile.cmake b/ports/aws-c-s3/portfile.cmake new file mode 100644 index 00000000000000..e6193fa6501a78 --- /dev/null +++ b/ports/aws-c-s3/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-c-s3 + REF e38bdad12bd4c618e8d10489374d87e6ae3f7a19 # v0.1.25 + SHA512 1ed3313419416ce28373968cb692cf67230b1efced4e187cd5047b146db3bc769dc283dff1af2e41b05ad6f50cbeea58718a34945a93645abacca2515f2a6cf1 + HEAD_REF master + PATCHES fix-cmake-target-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-s3/cmake) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-s3" + "${CURRENT_PACKAGES_DIR}/lib/aws-c-s3" + ) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-c-s3/vcpkg.json b/ports/aws-c-s3/vcpkg.json new file mode 100644 index 00000000000000..041c095d1458c7 --- /dev/null +++ b/ports/aws-c-s3/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "aws-c-s3", + "version": "0.1.25", + "description": "C99 library implementation for communicating with the S3 service, designed for maximizing throughput on high bandwidth EC2 instances.", + "homepage": "https://github.com/awslabs/aws-c-s3", + "supports": "!arm & !uwp", + "dependencies": [ + "aws-c-auth", + "aws-c-cal", + "aws-c-common", + "aws-c-compression", + "aws-c-http", + "aws-c-io", + { + "name": "s2n", + "platform": "!uwp & !windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-checksums/CONTROL b/ports/aws-checksums/CONTROL deleted file mode 100644 index 19eb511f317c10..00000000000000 --- a/ports/aws-checksums/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: aws-checksums -Version: 0.1.3 -Description: Cross-Platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations. diff --git a/ports/aws-checksums/fix-cmake-target-path.patch b/ports/aws-checksums/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..101a5379f28b68 --- /dev/null +++ b/ports/aws-checksums/fix-cmake-target-path.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 888742b..efdd817 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,7 +140,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-checksums-config.cmake b/cmake/aws-checksums-config.cmake +index 6de2e44..84d55d1 100644 +--- a/cmake/aws-checksums-config.cmake ++++ b/cmake/aws-checksums-config.cmake +@@ -1,6 +1,2 @@ +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/ports/aws-checksums/portfile.cmake b/ports/aws-checksums/portfile.cmake index 4ac746d7ff987b..eaeab3ea9d39e2 100644 --- a/ports/aws-checksums/portfile.cmake +++ b/ports/aws-checksums/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO awslabs/aws-checksums - REF v0.1.3 - SHA512 79bf71a6c4c268b27efe8a6a3c4b90281da4ce7f6e4c1c62fce80b11a4756ecfd4dc2b19624ace3f54137113d0cb56a517de0b91dd6338ee8ca069756bca13f4 + REF 99bb0ad4b89d335d638536694352c45e0d2188f5 # v0.1.11 + SHA512 cb9c249496fd41fda1efb9330e823d8b965adca6c8f372a50fe97eda821e277780bf9af8f5977102c44121568993cca55edbb750967b41f323e07e06a93c50a8 HEAD_REF master + PATCHES fix-cmake-target-path.patch ) if (VCPKG_CRT_LINKAGE STREQUAL static) @@ -14,27 +13,27 @@ else() set(STATIC_CRT_LNK OFF) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA - OPTIONS -DSTATIC_CRT=${STATIC_CRT_LNK} + OPTIONS + "-DSTATIC_CRT=${STATIC_CRT_LNK}" + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/aws-checksums/cmake) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-checksums/cmake) file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/lib/aws-checksums - ${CURRENT_PACKAGES_DIR}/lib/aws-checksums + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-checksums" + "${CURRENT_PACKAGES_DIR}/lib/aws-checksums" ) vcpkg_copy_pdbs() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-checksums RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/share -) \ No newline at end of file +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-checksums/vcpkg.json b/ports/aws-checksums/vcpkg.json new file mode 100644 index 00000000000000..57f6ecc106d7b6 --- /dev/null +++ b/ports/aws-checksums/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "aws-checksums", + "version": "0.1.11", + "description": "Cross-Platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations.", + "homepage": "https://github.com/awslabs/aws-checksums", + "supports": "!arm & !windows", + "dependencies": [ + "aws-c-common", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-crt-cpp/fix-cmake-target-path.patch b/ports/aws-crt-cpp/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..69158ef742fb2a --- /dev/null +++ b/ports/aws-crt-cpp/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4d935e2..7b0501c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -338,7 +338,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/${TARGET_DIR}" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-crt-cpp-config.cmake b/cmake/aws-crt-cpp-config.cmake +index 4b20a07..faac626 100644 +--- a/cmake/aws-crt-cpp-config.cmake ++++ b/cmake/aws-crt-cpp-config.cmake +@@ -7,8 +7,4 @@ find_dependency(aws-c-auth) + find_dependency(aws-c-event-stream) + find_dependency(aws-c-s3) + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else () +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) +\ No newline at end of file diff --git a/ports/aws-crt-cpp/portfile.cmake b/ports/aws-crt-cpp/portfile.cmake new file mode 100644 index 00000000000000..ffef30e943ad6c --- /dev/null +++ b/ports/aws-crt-cpp/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-crt-cpp + REF 9ef58ff20df19e613c91c5f761e381c763da6810 # v0.15.1 + SHA512 3409b3e6a546ed585b90180807383e8731b36b0db149b5ff92701a43164c4282b1cea4a551bf4c7b1edec7b264098575cf919faee8a2520bb10bbae62258d463 + PATCHES + fix-cmake-target-path.patch +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + "-DSTATIC_CRT=${STATIC_CRT}" + "-DBUILD_DEPS=OFF" + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-crt-cpp/cmake) + +vcpkg_copy_tools( + TOOL_NAMES elasticurl_cpp + AUTO_CLEAN +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/aws-crt-cpp" + "${CURRENT_PACKAGES_DIR}/lib/aws-crt-cpp" +) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-crt-cpp/vcpkg.json b/ports/aws-crt-cpp/vcpkg.json new file mode 100644 index 00000000000000..fb109b1a441178 --- /dev/null +++ b/ports/aws-crt-cpp/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "aws-crt-cpp", + "version": "0.15.1", + "port-version": 1, + "description": "Cross-Platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations.", + "homepage": "https://github.com/awslabs/aws-crt-cpp", + "supports": "!arm & !uwp", + "dependencies": [ + "aws-c-auth", + "aws-c-cal", + "aws-c-common", + "aws-c-compression", + "aws-c-event-stream", + "aws-c-http", + "aws-c-io", + "aws-c-mqtt", + "aws-c-s3", + "aws-checksums", + { + "name": "s2n", + "platform": "!uwp & !windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/aws-lambda-cpp/CONTROL b/ports/aws-lambda-cpp/CONTROL deleted file mode 100644 index 53d7a917f2a1ee..00000000000000 --- a/ports/aws-lambda-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: aws-lambda-cpp -Version: 0.1.0-2 -Build-Depends: curl -Description: C++ Runtime for AWS Lambda. diff --git a/ports/aws-lambda-cpp/portfile.cmake b/ports/aws-lambda-cpp/portfile.cmake index 7ba33e8f1c7cd2..7c2cc06d72a71c 100644 --- a/ports/aws-lambda-cpp/portfile.cmake +++ b/ports/aws-lambda-cpp/portfile.cmake @@ -1,15 +1,10 @@ -include(vcpkg_common_functions) - -vcpkg_fail_port_install(MESSAGE "aws-lambda-cpp currently only supports Linux and Mac platforms" ON_TARGET "Windows") -#if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") -# message(FATAL_ERROR "aws-lambda-cpp currently only supports Linux and Mac platforms") -#endif() +vcpkg_fail_port_install(ON_TARGET "Windows" "OSX") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO awslabs/aws-lambda-cpp - REF v0.1.0 - SHA512 78b1ad1dcd88176a954c03b38cbb962c77488da6c75acb37a8b64cde147c030b02c6e51f0a974edb042e59c3c969d110d181ad097ef76f43255500b272a94454 + REF 55276cef2efe18fe13457ebf85df53a81d68be59 # v0.2.6 + SHA512 a865b8c5715e884c0aeb0972d88919084a37b4837ade55d7f4373422c1ffa06a550f6bfe62b6f69b9eb3a352b9a1d4114c72d754bce2d6d3727bebd029fe6631 HEAD_REF master ) @@ -25,5 +20,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-lambda-cpp RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/aws-lambda-cpp/vcpkg.json b/ports/aws-lambda-cpp/vcpkg.json new file mode 100644 index 00000000000000..c466c11a7c8689 --- /dev/null +++ b/ports/aws-lambda-cpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "aws-lambda-cpp", + "version-string": "0.2.6", + "port-version": 1, + "description": "C++ Runtime for AWS Lambda.", + "supports": "linux", + "dependencies": [ + "curl" + ] +} diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL deleted file mode 100644 index 81078404f32c65..00000000000000 --- a/ports/aws-sdk-cpp/CONTROL +++ /dev/null @@ -1,538 +0,0 @@ -Source: aws-sdk-cpp -Version: 1.7.116 -Homepage: https://github.com/aws/aws-sdk-cpp -Description: AWS SDK for C++ -Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows), aws-c-event-stream -Default-Features: dynamodb, s3, kinesis -# Automatically generated by generateFeatures.ps1 - -Feature: access-management -Description: C++ SDK for the AWS access-management service - -Feature: acm -Description: C++ SDK for the AWS acm service - -Feature: acm-pca -Description: C++ SDK for the AWS acm-pca service - -Feature: alexaforbusiness -Description: C++ SDK for the AWS alexaforbusiness service - -Feature: amplify -Description: C++ SDK for the AWS amplify service - -Feature: apigateway -Description: C++ SDK for the AWS apigateway service - -Feature: apigatewaymanagementapi -Description: C++ SDK for the AWS apigatewaymanagementapi service - -Feature: apigatewayv2 -Description: C++ SDK for the AWS apigatewayv2 service - -Feature: application-autoscaling -Description: C++ SDK for the AWS application-autoscaling service - -Feature: appmesh -Description: C++ SDK for the AWS appmesh service - -Feature: appstream -Description: C++ SDK for the AWS appstream service - -Feature: appsync -Description: C++ SDK for the AWS appsync service - -Feature: athena -Description: C++ SDK for the AWS athena service - -Feature: autoscaling -Description: C++ SDK for the AWS autoscaling service - -Feature: autoscaling-plans -Description: C++ SDK for the AWS autoscaling-plans service - -Feature: AWSMigrationHub -Description: C++ SDK for the AWS AWSMigrationHub service - -Feature: awstransfer -Description: C++ SDK for the AWS awstransfer service - -Feature: backup -Description: C++ SDK for the AWS backup service - -Feature: batch -Description: C++ SDK for the AWS batch service - -Feature: budgets -Description: C++ SDK for the AWS budgets service - -Feature: ce -Description: C++ SDK for the AWS ce service - -Feature: chime -Description: C++ SDK for the AWS chime service - -Feature: cloud9 -Description: C++ SDK for the AWS cloud9 service - -Feature: clouddirectory -Description: C++ SDK for the AWS clouddirectory service - -Feature: cloudformation -Description: C++ SDK for the AWS cloudformation service - -Feature: cloudfront -Description: C++ SDK for the AWS cloudfront service - -Feature: cloudhsm -Description: C++ SDK for the AWS cloudhsm service - -Feature: cloudhsmv2 -Description: C++ SDK for the AWS cloudhsmv2 service - -Feature: cloudsearch -Description: C++ SDK for the AWS cloudsearch service - -Feature: cloudsearchdomain -Description: C++ SDK for the AWS cloudsearchdomain service - -Feature: cloudtrail -Description: C++ SDK for the AWS cloudtrail service - -Feature: codebuild -Description: C++ SDK for the AWS codebuild service - -Feature: codecommit -Description: C++ SDK for the AWS codecommit service - -Feature: codedeploy -Description: C++ SDK for the AWS codedeploy service - -Feature: codepipeline -Description: C++ SDK for the AWS codepipeline service - -Feature: codestar -Description: C++ SDK for the AWS codestar service - -Feature: cognito-identity -Description: C++ SDK for the AWS cognito-identity service - -Feature: cognito-idp -Description: C++ SDK for the AWS cognito-idp service - -Feature: cognito-sync -Description: C++ SDK for the AWS cognito-sync service - -Feature: comprehend -Description: C++ SDK for the AWS comprehend service - -Feature: comprehendmedical -Description: C++ SDK for the AWS comprehendmedical service - -Feature: config -Description: C++ SDK for the AWS config service - -Feature: connect -Description: C++ SDK for the AWS connect service - -Feature: cur -Description: C++ SDK for the AWS cur service - -Feature: datapipeline -Description: C++ SDK for the AWS datapipeline service - -Feature: datasync -Description: C++ SDK for the AWS datasync service - -Feature: dax -Description: C++ SDK for the AWS dax service - -Feature: devicefarm -Description: C++ SDK for the AWS devicefarm service - -Feature: directconnect -Description: C++ SDK for the AWS directconnect service - -Feature: discovery -Description: C++ SDK for the AWS discovery service - -Feature: dlm -Description: C++ SDK for the AWS dlm service - -Feature: dms -Description: C++ SDK for the AWS dms service - -Feature: docdb -Description: C++ SDK for the AWS docdb service - -Feature: ds -Description: C++ SDK for the AWS ds service - -Feature: dynamodb -Description: C++ SDK for the AWS dynamodb service - -Feature: dynamodbstreams -Description: C++ SDK for the AWS dynamodbstreams service - -Feature: ec2 -Description: C++ SDK for the AWS ec2 service - -Feature: ecr -Description: C++ SDK for the AWS ecr service - -Feature: ecs -Description: C++ SDK for the AWS ecs service - -Feature: eks -Description: C++ SDK for the AWS eks service - -Feature: elasticache -Description: C++ SDK for the AWS elasticache service - -Feature: elasticbeanstalk -Description: C++ SDK for the AWS elasticbeanstalk service - -Feature: elasticfilesystem -Description: C++ SDK for the AWS elasticfilesystem service - -Feature: elasticloadbalancing -Description: C++ SDK for the AWS elasticloadbalancing service - -Feature: elasticloadbalancingv2 -Description: C++ SDK for the AWS elasticloadbalancingv2 service - -Feature: elasticmapreduce -Description: C++ SDK for the AWS elasticmapreduce service - -Feature: elastictranscoder -Description: C++ SDK for the AWS elastictranscoder service - -Feature: email -Description: C++ SDK for the AWS email service - -Feature: es -Description: C++ SDK for the AWS es service - -Feature: events -Description: C++ SDK for the AWS events service - -Feature: firehose -Description: C++ SDK for the AWS firehose service - -Feature: fms -Description: C++ SDK for the AWS fms service - -Feature: fsx -Description: C++ SDK for the AWS fsx service - -Feature: gamelift -Description: C++ SDK for the AWS gamelift service - -Feature: glacier -Description: C++ SDK for the AWS glacier service - -Feature: globalaccelerator -Description: C++ SDK for the AWS globalaccelerator service - -Feature: glue -Description: C++ SDK for the AWS glue service - -Feature: greengrass -Description: C++ SDK for the AWS greengrass service - -Feature: guardduty -Description: C++ SDK for the AWS guardduty service - -Feature: health -Description: C++ SDK for the AWS health service - -Feature: iam -Description: C++ SDK for the AWS iam service - -Feature: identity-management -Description: C++ SDK for the AWS identity-management service - -Feature: importexport -Description: C++ SDK for the AWS importexport service - -Feature: inspector -Description: C++ SDK for the AWS inspector service - -Feature: iot -Description: C++ SDK for the AWS iot service - -Feature: iot-data -Description: C++ SDK for the AWS iot-data service - -Feature: iot-jobs-data -Description: C++ SDK for the AWS iot-jobs-data service - -Feature: iot1click-devices -Description: C++ SDK for the AWS iot1click-devices service - -Feature: iot1click-projects -Description: C++ SDK for the AWS iot1click-projects service - -Feature: iotanalytics -Description: C++ SDK for the AWS iotanalytics service - -Feature: kafka -Description: C++ SDK for the AWS kafka service - -Feature: kinesis -Description: C++ SDK for the AWS kinesis service - -Feature: kinesis-video-archived-media -Description: C++ SDK for the AWS kinesis-video-archived-media service - -Feature: kinesis-video-media -Description: C++ SDK for the AWS kinesis-video-media service - -Feature: kinesisanalytics -Description: C++ SDK for the AWS kinesisanalytics service - -Feature: kinesisanalyticsv2 -Description: C++ SDK for the AWS kinesisanalyticsv2 service - -Feature: kinesisvideo -Description: C++ SDK for the AWS kinesisvideo service - -Feature: kms -Description: C++ SDK for the AWS kms service - -Feature: lambda -Description: C++ SDK for the AWS lambda service - -Feature: lex -Description: C++ SDK for the AWS lex service - -Feature: lex-models -Description: C++ SDK for the AWS lex-models service - -Feature: license-manager -Description: C++ SDK for the AWS license-manager service - -Feature: lightsail -Description: C++ SDK for the AWS lightsail service - -Feature: logs -Description: C++ SDK for the AWS logs service - -Feature: machinelearning -Description: C++ SDK for the AWS machinelearning service - -Feature: macie -Description: C++ SDK for the AWS macie service - -Feature: marketplace-entitlement -Description: C++ SDK for the AWS marketplace-entitlement service - -Feature: marketplacecommerceanalytics -Description: C++ SDK for the AWS marketplacecommerceanalytics service - -Feature: mediaconnect -Description: C++ SDK for the AWS mediaconnect service - -Feature: mediaconvert -Description: C++ SDK for the AWS mediaconvert service - -Feature: medialive -Description: C++ SDK for the AWS medialive service - -Feature: mediapackage -Description: C++ SDK for the AWS mediapackage service - -Feature: mediastore -Description: C++ SDK for the AWS mediastore service - -Feature: mediastore-data -Description: C++ SDK for the AWS mediastore-data service - -Feature: mediatailor -Description: C++ SDK for the AWS mediatailor service - -Feature: meteringmarketplace -Description: C++ SDK for the AWS meteringmarketplace service - -Feature: mobile -Description: C++ SDK for the AWS mobile service - -Feature: mobileanalytics -Description: C++ SDK for the AWS mobileanalytics service - -Feature: monitoring -Description: C++ SDK for the AWS monitoring service - -Feature: mq -Description: C++ SDK for the AWS mq service - -Feature: mturk-requester -Description: C++ SDK for the AWS mturk-requester service - -Feature: neptune -Description: C++ SDK for the AWS neptune service - -Feature: opsworks -Description: C++ SDK for the AWS opsworks service - -Feature: opsworkscm -Description: C++ SDK for the AWS opsworkscm service - -Feature: organizations -Description: C++ SDK for the AWS organizations service - -Feature: pi -Description: C++ SDK for the AWS pi service - -Feature: pinpoint -Description: C++ SDK for the AWS pinpoint service - -Feature: pinpoint-email -Description: C++ SDK for the AWS pinpoint-email service - -Feature: polly -Description: C++ SDK for the AWS polly service - -Feature: pricing -Description: C++ SDK for the AWS pricing service - -Feature: queues -Description: C++ SDK for the AWS queues service - -Feature: quicksight -Description: C++ SDK for the AWS quicksight service - -Feature: ram -Description: C++ SDK for the AWS ram service - -Feature: rds -Description: C++ SDK for the AWS rds service - -Feature: rds-data -Description: C++ SDK for the AWS rds-data service - -Feature: redshift -Description: C++ SDK for the AWS redshift service - -Feature: rekognition -Description: C++ SDK for the AWS rekognition service - -Feature: resource-groups -Description: C++ SDK for the AWS resource-groups service - -Feature: resourcegroupstaggingapi -Description: C++ SDK for the AWS resourcegroupstaggingapi service - -Feature: robomaker -Description: C++ SDK for the AWS robomaker service - -Feature: route53 -Description: C++ SDK for the AWS route53 service - -Feature: route53domains -Description: C++ SDK for the AWS route53domains service - -Feature: route53resolver -Description: C++ SDK for the AWS route53resolver service - -Feature: s3 -Description: C++ SDK for the AWS s3 service - -Feature: s3-encryption -Description: C++ SDK for the AWS s3-encryption service - -Feature: s3control -Description: C++ SDK for the AWS s3control service - -Feature: sagemaker -Description: C++ SDK for the AWS sagemaker service - -Feature: sagemaker-runtime -Description: C++ SDK for the AWS sagemaker-runtime service - -Feature: sdb -Description: C++ SDK for the AWS sdb service - -Feature: secretsmanager -Description: C++ SDK for the AWS secretsmanager service - -Feature: securityhub -Description: C++ SDK for the AWS securityhub service - -Feature: serverlessrepo -Description: C++ SDK for the AWS serverlessrepo service - -Feature: servicecatalog -Description: C++ SDK for the AWS servicecatalog service - -Feature: servicediscovery -Description: C++ SDK for the AWS servicediscovery service - -Feature: shield -Description: C++ SDK for the AWS shield service - -Feature: signer -Description: C++ SDK for the AWS signer service - -Feature: sms -Description: C++ SDK for the AWS sms service - -Feature: sms-voice -Description: C++ SDK for the AWS sms-voice service - -Feature: snowball -Description: C++ SDK for the AWS snowball service - -Feature: sns -Description: C++ SDK for the AWS sns service - -Feature: sqs -Description: C++ SDK for the AWS sqs service - -Feature: ssm -Description: C++ SDK for the AWS ssm service - -Feature: states -Description: C++ SDK for the AWS states service - -Feature: storagegateway -Description: C++ SDK for the AWS storagegateway service - -Feature: sts -Description: C++ SDK for the AWS sts service - -Feature: support -Description: C++ SDK for the AWS support service - -Feature: swf -Description: C++ SDK for the AWS swf service - -Feature: text-to-speech -Description: C++ SDK for the AWS text-to-speech service - -Feature: transcribe -Description: C++ SDK for the AWS transcribe service - -Feature: transfer -Description: C++ SDK for the AWS transfer service - -Feature: translate -Description: C++ SDK for the AWS translate service - -Feature: waf -Description: C++ SDK for the AWS waf service - -Feature: waf-regional -Description: C++ SDK for the AWS waf-regional service - -Feature: workdocs -Description: C++ SDK for the AWS workdocs service - -Feature: workmail -Description: C++ SDK for the AWS workmail service - -Feature: workspaces -Description: C++ SDK for the AWS workspaces service - -Feature: xray -Description: C++ SDK for the AWS xray service diff --git a/ports/aws-sdk-cpp/CONTROL.in b/ports/aws-sdk-cpp/CONTROL.in deleted file mode 100644 index 501e0e839eb12b..00000000000000 --- a/ports/aws-sdk-cpp/CONTROL.in +++ /dev/null @@ -1,5 +0,0 @@ -Source: aws-sdk-cpp -Version: 1.7.38 -Description: AWS SDK for C++ -Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows), aws-c-event-stream -Default-Features: dynamodb, s3, kinesis diff --git a/ports/aws-sdk-cpp/compute_build_only.cmake b/ports/aws-sdk-cpp/compute_build_only.cmake index 66576f241017fe..05a4649c825646 100644 --- a/ports/aws-sdk-cpp/compute_build_only.cmake +++ b/ports/aws-sdk-cpp/compute_build_only.cmake @@ -2,6 +2,9 @@ if("access-management" IN_LIST FEATURES) list(APPEND BUILD_ONLY access-management) endif() +if("accessanalyzer" IN_LIST FEATURES) + list(APPEND BUILD_ONLY accessanalyzer) +endif() if("acm" IN_LIST FEATURES) list(APPEND BUILD_ONLY acm) endif() @@ -11,9 +14,15 @@ endif() if("alexaforbusiness" IN_LIST FEATURES) list(APPEND BUILD_ONLY alexaforbusiness) endif() +if("amp" IN_LIST FEATURES) + list(APPEND BUILD_ONLY amp) +endif() if("amplify" IN_LIST FEATURES) list(APPEND BUILD_ONLY amplify) endif() +if("amplifybackend" IN_LIST FEATURES) + list(APPEND BUILD_ONLY amplifybackend) +endif() if("apigateway" IN_LIST FEATURES) list(APPEND BUILD_ONLY apigateway) endif() @@ -23,12 +32,30 @@ endif() if("apigatewayv2" IN_LIST FEATURES) list(APPEND BUILD_ONLY apigatewayv2) endif() +if("appconfig" IN_LIST FEATURES) + list(APPEND BUILD_ONLY appconfig) +endif() +if("appflow" IN_LIST FEATURES) + list(APPEND BUILD_ONLY appflow) +endif() +if("appintegrations" IN_LIST FEATURES) + list(APPEND BUILD_ONLY appintegrations) +endif() if("application-autoscaling" IN_LIST FEATURES) list(APPEND BUILD_ONLY application-autoscaling) endif() +if("application-insights" IN_LIST FEATURES) + list(APPEND BUILD_ONLY application-insights) +endif() +if("applicationcostprofiler" IN_LIST FEATURES) + list(APPEND BUILD_ONLY applicationcostprofiler) +endif() if("appmesh" IN_LIST FEATURES) list(APPEND BUILD_ONLY appmesh) endif() +if("apprunner" IN_LIST FEATURES) + list(APPEND BUILD_ONLY apprunner) +endif() if("appstream" IN_LIST FEATURES) list(APPEND BUILD_ONLY appstream) endif() @@ -38,13 +65,16 @@ endif() if("athena" IN_LIST FEATURES) list(APPEND BUILD_ONLY athena) endif() +if("auditmanager" IN_LIST FEATURES) + list(APPEND BUILD_ONLY auditmanager) +endif() if("autoscaling" IN_LIST FEATURES) list(APPEND BUILD_ONLY autoscaling) endif() if("autoscaling-plans" IN_LIST FEATURES) list(APPEND BUILD_ONLY autoscaling-plans) endif() -if("AWSMigrationHub" IN_LIST FEATURES) +if("awsmigrationhub" IN_LIST FEATURES) list(APPEND BUILD_ONLY AWSMigrationHub) endif() if("awstransfer" IN_LIST FEATURES) @@ -56,6 +86,9 @@ endif() if("batch" IN_LIST FEATURES) list(APPEND BUILD_ONLY batch) endif() +if("braket" IN_LIST FEATURES) + list(APPEND BUILD_ONLY braket) +endif() if("budgets" IN_LIST FEATURES) list(APPEND BUILD_ONLY budgets) endif() @@ -92,6 +125,9 @@ endif() if("cloudtrail" IN_LIST FEATURES) list(APPEND BUILD_ONLY cloudtrail) endif() +if("codeartifact" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codeartifact) +endif() if("codebuild" IN_LIST FEATURES) list(APPEND BUILD_ONLY codebuild) endif() @@ -101,12 +137,24 @@ endif() if("codedeploy" IN_LIST FEATURES) list(APPEND BUILD_ONLY codedeploy) endif() +if("codeguru-reviewer" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codeguru-reviewer) +endif() +if("codeguruprofiler" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codeguruprofiler) +endif() if("codepipeline" IN_LIST FEATURES) list(APPEND BUILD_ONLY codepipeline) endif() if("codestar" IN_LIST FEATURES) list(APPEND BUILD_ONLY codestar) endif() +if("codestar-connections" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codestar-connections) +endif() +if("codestar-notifications" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codestar-notifications) +endif() if("cognito-identity" IN_LIST FEATURES) list(APPEND BUILD_ONLY cognito-identity) endif() @@ -122,15 +170,33 @@ endif() if("comprehendmedical" IN_LIST FEATURES) list(APPEND BUILD_ONLY comprehendmedical) endif() +if("compute-optimizer" IN_LIST FEATURES) + list(APPEND BUILD_ONLY compute-optimizer) +endif() if("config" IN_LIST FEATURES) list(APPEND BUILD_ONLY config) endif() if("connect" IN_LIST FEATURES) list(APPEND BUILD_ONLY connect) endif() +if("connect-contact-lens" IN_LIST FEATURES) + list(APPEND BUILD_ONLY connect-contact-lens) +endif() +if("connectparticipant" IN_LIST FEATURES) + list(APPEND BUILD_ONLY connectparticipant) +endif() if("cur" IN_LIST FEATURES) list(APPEND BUILD_ONLY cur) endif() +if("customer-profiles" IN_LIST FEATURES) + list(APPEND BUILD_ONLY customer-profiles) +endif() +if("databrew" IN_LIST FEATURES) + list(APPEND BUILD_ONLY databrew) +endif() +if("dataexchange" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dataexchange) +endif() if("datapipeline" IN_LIST FEATURES) list(APPEND BUILD_ONLY datapipeline) endif() @@ -140,9 +206,15 @@ endif() if("dax" IN_LIST FEATURES) list(APPEND BUILD_ONLY dax) endif() +if("detective" IN_LIST FEATURES) + list(APPEND BUILD_ONLY detective) +endif() if("devicefarm" IN_LIST FEATURES) list(APPEND BUILD_ONLY devicefarm) endif() +if("devops-guru" IN_LIST FEATURES) + list(APPEND BUILD_ONLY devops-guru) +endif() if("directconnect" IN_LIST FEATURES) list(APPEND BUILD_ONLY directconnect) endif() @@ -167,18 +239,30 @@ endif() if("dynamodbstreams" IN_LIST FEATURES) list(APPEND BUILD_ONLY dynamodbstreams) endif() +if("ebs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ebs) +endif() if("ec2" IN_LIST FEATURES) list(APPEND BUILD_ONLY ec2) endif() +if("ec2-instance-connect" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ec2-instance-connect) +endif() if("ecr" IN_LIST FEATURES) list(APPEND BUILD_ONLY ecr) endif() +if("ecr-public" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ecr-public) +endif() if("ecs" IN_LIST FEATURES) list(APPEND BUILD_ONLY ecs) endif() if("eks" IN_LIST FEATURES) list(APPEND BUILD_ONLY eks) endif() +if("elastic-inference" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elastic-inference) +endif() if("elasticache" IN_LIST FEATURES) list(APPEND BUILD_ONLY elasticache) endif() @@ -203,18 +287,42 @@ endif() if("email" IN_LIST FEATURES) list(APPEND BUILD_ONLY email) endif() +if("emr-containers" IN_LIST FEATURES) + list(APPEND BUILD_ONLY emr-containers) +endif() if("es" IN_LIST FEATURES) list(APPEND BUILD_ONLY es) endif() +if("eventbridge" IN_LIST FEATURES) + list(APPEND BUILD_ONLY eventbridge) +endif() if("events" IN_LIST FEATURES) list(APPEND BUILD_ONLY events) endif() +if("finspace" IN_LIST FEATURES) + list(APPEND BUILD_ONLY finspace) +endif() +if("finspace-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY finspace-data) +endif() if("firehose" IN_LIST FEATURES) list(APPEND BUILD_ONLY firehose) endif() +if("fis" IN_LIST FEATURES) + list(APPEND BUILD_ONLY fis) +endif() if("fms" IN_LIST FEATURES) list(APPEND BUILD_ONLY fms) endif() +if("forecast" IN_LIST FEATURES) + list(APPEND BUILD_ONLY forecast) +endif() +if("forecastquery" IN_LIST FEATURES) + list(APPEND BUILD_ONLY forecastquery) +endif() +if("frauddetector" IN_LIST FEATURES) + list(APPEND BUILD_ONLY frauddetector) +endif() if("fsx" IN_LIST FEATURES) list(APPEND BUILD_ONLY fsx) endif() @@ -233,18 +341,36 @@ endif() if("greengrass" IN_LIST FEATURES) list(APPEND BUILD_ONLY greengrass) endif() +if("greengrassv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY greengrassv2) +endif() +if("groundstation" IN_LIST FEATURES) + list(APPEND BUILD_ONLY groundstation) +endif() if("guardduty" IN_LIST FEATURES) list(APPEND BUILD_ONLY guardduty) endif() if("health" IN_LIST FEATURES) list(APPEND BUILD_ONLY health) endif() +if("healthlake" IN_LIST FEATURES) + list(APPEND BUILD_ONLY healthlake) +endif() +if("honeycode" IN_LIST FEATURES) + list(APPEND BUILD_ONLY honeycode) +endif() if("iam" IN_LIST FEATURES) list(APPEND BUILD_ONLY iam) endif() if("identity-management" IN_LIST FEATURES) list(APPEND BUILD_ONLY identity-management) endif() +if("identitystore" IN_LIST FEATURES) + list(APPEND BUILD_ONLY identitystore) +endif() +if("imagebuilder" IN_LIST FEATURES) + list(APPEND BUILD_ONLY imagebuilder) +endif() if("importexport" IN_LIST FEATURES) list(APPEND BUILD_ONLY importexport) endif() @@ -269,9 +395,39 @@ endif() if("iotanalytics" IN_LIST FEATURES) list(APPEND BUILD_ONLY iotanalytics) endif() +if("iotdeviceadvisor" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iotdeviceadvisor) +endif() +if("iotevents" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iotevents) +endif() +if("iotevents-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iotevents-data) +endif() +if("iotfleethub" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iotfleethub) +endif() +if("iotsecuretunneling" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iotsecuretunneling) +endif() +if("iotsitewise" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iotsitewise) +endif() +if("iotthingsgraph" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iotthingsgraph) +endif() +if("iotwireless" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iotwireless) +endif() +if("ivs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ivs) +endif() if("kafka" IN_LIST FEATURES) list(APPEND BUILD_ONLY kafka) endif() +if("kendra" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kendra) +endif() if("kinesis" IN_LIST FEATURES) list(APPEND BUILD_ONLY kinesis) endif() @@ -281,6 +437,9 @@ endif() if("kinesis-video-media" IN_LIST FEATURES) list(APPEND BUILD_ONLY kinesis-video-media) endif() +if("kinesis-video-signaling" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesis-video-signaling) +endif() if("kinesisanalytics" IN_LIST FEATURES) list(APPEND BUILD_ONLY kinesisanalytics) endif() @@ -293,6 +452,9 @@ endif() if("kms" IN_LIST FEATURES) list(APPEND BUILD_ONLY kms) endif() +if("lakeformation" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lakeformation) +endif() if("lambda" IN_LIST FEATURES) list(APPEND BUILD_ONLY lambda) endif() @@ -302,21 +464,48 @@ endif() if("lex-models" IN_LIST FEATURES) list(APPEND BUILD_ONLY lex-models) endif() +if("lexv2-models" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lexv2-models) +endif() +if("lexv2-runtime" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lexv2-runtime) +endif() if("license-manager" IN_LIST FEATURES) list(APPEND BUILD_ONLY license-manager) endif() if("lightsail" IN_LIST FEATURES) list(APPEND BUILD_ONLY lightsail) endif() +if("location" IN_LIST FEATURES) + list(APPEND BUILD_ONLY location) +endif() if("logs" IN_LIST FEATURES) list(APPEND BUILD_ONLY logs) endif() +if("lookoutequipment" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lookoutequipment) +endif() +if("lookoutmetrics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lookoutmetrics) +endif() +if("lookoutvision" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lookoutvision) +endif() if("machinelearning" IN_LIST FEATURES) list(APPEND BUILD_ONLY machinelearning) endif() if("macie" IN_LIST FEATURES) list(APPEND BUILD_ONLY macie) endif() +if("macie2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY macie2) +endif() +if("managedblockchain" IN_LIST FEATURES) + list(APPEND BUILD_ONLY managedblockchain) +endif() +if("marketplace-catalog" IN_LIST FEATURES) + list(APPEND BUILD_ONLY marketplace-catalog) +endif() if("marketplace-entitlement" IN_LIST FEATURES) list(APPEND BUILD_ONLY marketplace-entitlement) endif() @@ -335,6 +524,9 @@ endif() if("mediapackage" IN_LIST FEATURES) list(APPEND BUILD_ONLY mediapackage) endif() +if("mediapackage-vod" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediapackage-vod) +endif() if("mediastore" IN_LIST FEATURES) list(APPEND BUILD_ONLY mediastore) endif() @@ -347,6 +539,12 @@ endif() if("meteringmarketplace" IN_LIST FEATURES) list(APPEND BUILD_ONLY meteringmarketplace) endif() +if("mgn" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mgn) +endif() +if("migrationhub-config" IN_LIST FEATURES) + list(APPEND BUILD_ONLY migrationhub-config) +endif() if("mobile" IN_LIST FEATURES) list(APPEND BUILD_ONLY mobile) endif() @@ -362,9 +560,21 @@ endif() if("mturk-requester" IN_LIST FEATURES) list(APPEND BUILD_ONLY mturk-requester) endif() +if("mwaa" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mwaa) +endif() if("neptune" IN_LIST FEATURES) list(APPEND BUILD_ONLY neptune) endif() +if("network-firewall" IN_LIST FEATURES) + list(APPEND BUILD_ONLY network-firewall) +endif() +if("networkmanager" IN_LIST FEATURES) + list(APPEND BUILD_ONLY networkmanager) +endif() +if("nimble" IN_LIST FEATURES) + list(APPEND BUILD_ONLY nimble) +endif() if("opsworks" IN_LIST FEATURES) list(APPEND BUILD_ONLY opsworks) endif() @@ -374,6 +584,18 @@ endif() if("organizations" IN_LIST FEATURES) list(APPEND BUILD_ONLY organizations) endif() +if("outposts" IN_LIST FEATURES) + list(APPEND BUILD_ONLY outposts) +endif() +if("personalize" IN_LIST FEATURES) + list(APPEND BUILD_ONLY personalize) +endif() +if("personalize-events" IN_LIST FEATURES) + list(APPEND BUILD_ONLY personalize-events) +endif() +if("personalize-runtime" IN_LIST FEATURES) + list(APPEND BUILD_ONLY personalize-runtime) +endif() if("pi" IN_LIST FEATURES) list(APPEND BUILD_ONLY pi) endif() @@ -389,6 +611,12 @@ endif() if("pricing" IN_LIST FEATURES) list(APPEND BUILD_ONLY pricing) endif() +if("qldb" IN_LIST FEATURES) + list(APPEND BUILD_ONLY qldb) +endif() +if("qldb-session" IN_LIST FEATURES) + list(APPEND BUILD_ONLY qldb-session) +endif() if("queues" IN_LIST FEATURES) list(APPEND BUILD_ONLY queues) endif() @@ -407,6 +635,9 @@ endif() if("redshift" IN_LIST FEATURES) list(APPEND BUILD_ONLY redshift) endif() +if("redshift-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY redshift-data) +endif() if("rekognition" IN_LIST FEATURES) list(APPEND BUILD_ONLY rekognition) endif() @@ -431,18 +662,39 @@ endif() if("s3" IN_LIST FEATURES) list(APPEND BUILD_ONLY s3) endif() +if("s3-crt" IN_LIST FEATURES) + list(APPEND BUILD_ONLY s3-crt) +endif() if("s3-encryption" IN_LIST FEATURES) list(APPEND BUILD_ONLY s3-encryption) endif() if("s3control" IN_LIST FEATURES) list(APPEND BUILD_ONLY s3control) endif() +if("s3outposts" IN_LIST FEATURES) + list(APPEND BUILD_ONLY s3outposts) +endif() if("sagemaker" IN_LIST FEATURES) list(APPEND BUILD_ONLY sagemaker) endif() +if("sagemaker-a2i-runtime" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sagemaker-a2i-runtime) +endif() +if("sagemaker-edge" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sagemaker-edge) +endif() +if("sagemaker-featurestore-runtime" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sagemaker-featurestore-runtime) +endif() if("sagemaker-runtime" IN_LIST FEATURES) list(APPEND BUILD_ONLY sagemaker-runtime) endif() +if("savingsplans" IN_LIST FEATURES) + list(APPEND BUILD_ONLY savingsplans) +endif() +if("schemas" IN_LIST FEATURES) + list(APPEND BUILD_ONLY schemas) +endif() if("sdb" IN_LIST FEATURES) list(APPEND BUILD_ONLY sdb) endif() @@ -455,12 +707,21 @@ endif() if("serverlessrepo" IN_LIST FEATURES) list(APPEND BUILD_ONLY serverlessrepo) endif() +if("service-quotas" IN_LIST FEATURES) + list(APPEND BUILD_ONLY service-quotas) +endif() if("servicecatalog" IN_LIST FEATURES) list(APPEND BUILD_ONLY servicecatalog) endif() +if("servicecatalog-appregistry" IN_LIST FEATURES) + list(APPEND BUILD_ONLY servicecatalog-appregistry) +endif() if("servicediscovery" IN_LIST FEATURES) list(APPEND BUILD_ONLY servicediscovery) endif() +if("sesv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sesv2) +endif() if("shield" IN_LIST FEATURES) list(APPEND BUILD_ONLY shield) endif() @@ -485,6 +746,21 @@ endif() if("ssm" IN_LIST FEATURES) list(APPEND BUILD_ONLY ssm) endif() +if("ssm-contacts" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ssm-contacts) +endif() +if("ssm-incidents" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ssm-incidents) +endif() +if("sso" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sso) +endif() +if("sso-admin" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sso-admin) +endif() +if("sso-oidc" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sso-oidc) +endif() if("states" IN_LIST FEATURES) list(APPEND BUILD_ONLY states) endif() @@ -500,12 +776,27 @@ endif() if("swf" IN_LIST FEATURES) list(APPEND BUILD_ONLY swf) endif() +if("synthetics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY synthetics) +endif() if("text-to-speech" IN_LIST FEATURES) list(APPEND BUILD_ONLY text-to-speech) endif() +if("textract" IN_LIST FEATURES) + list(APPEND BUILD_ONLY textract) +endif() +if("timestream-query" IN_LIST FEATURES) + list(APPEND BUILD_ONLY timestream-query) +endif() +if("timestream-write" IN_LIST FEATURES) + list(APPEND BUILD_ONLY timestream-write) +endif() if("transcribe" IN_LIST FEATURES) list(APPEND BUILD_ONLY transcribe) endif() +if("transcribestreaming" IN_LIST FEATURES) + list(APPEND BUILD_ONLY transcribestreaming) +endif() if("transfer" IN_LIST FEATURES) list(APPEND BUILD_ONLY transfer) endif() @@ -518,12 +809,24 @@ endif() if("waf-regional" IN_LIST FEATURES) list(APPEND BUILD_ONLY waf-regional) endif() +if("wafv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY wafv2) +endif() +if("wellarchitected" IN_LIST FEATURES) + list(APPEND BUILD_ONLY wellarchitected) +endif() if("workdocs" IN_LIST FEATURES) list(APPEND BUILD_ONLY workdocs) endif() +if("worklink" IN_LIST FEATURES) + list(APPEND BUILD_ONLY worklink) +endif() if("workmail" IN_LIST FEATURES) list(APPEND BUILD_ONLY workmail) endif() +if("workmailmessageflow" IN_LIST FEATURES) + list(APPEND BUILD_ONLY workmailmessageflow) +endif() if("workspaces" IN_LIST FEATURES) list(APPEND BUILD_ONLY workspaces) endif() diff --git a/ports/aws-sdk-cpp/generateFeatures.ps1 b/ports/aws-sdk-cpp/generateFeatures.ps1 index 8c8b1a342681f7..89265ddbd4cc2c 100644 --- a/ports/aws-sdk-cpp/generateFeatures.ps1 +++ b/ports/aws-sdk-cpp/generateFeatures.ps1 @@ -1,15 +1,35 @@ [CmdletBinding()] param( - [Parameter(Mandatory=$true)][string]$ExtractedSources, - [Parameter(Mandatory=$true)][string]$ControlFileIn, - [Parameter(Mandatory=$true)][string]$ControlFile, - [Parameter(Mandatory=$true)][string]$CMakeFragmentFile + [Parameter(Mandatory=$true)][string]$SourcesRef, + [Parameter(Mandatory=$false)][string]$PortDirectory = $PSScriptRoot, + [Parameter(Mandatory=$false)][string]$vcpkg = "$PSScriptRoot/../../vcpkg" ) +$ErrorActionPreference = "Stop" + +$ManifestIn = "$PortDirectory/vcpkg.in.json" +$ManifestOut = "$PortDirectory/vcpkg.json" +$CMakeFragmentFile = "$PortDirectory/compute_build_only.cmake" + +$ExtractedSources = "${env:TEMP}/aws-sdk-cpp-generateFeatures-$SourcesRef" +if (-not (Test-Path $ExtractedSources)) { + if (Test-Path "$ExtractedSources.tmp") { + Remove-Item -Force "$ExtractedSources.tmp" + } + git clone "https://github.com/aws/aws-sdk-cpp" "$ExtractedSources.tmp" | Out-Host + git -c "$ExtractedSources.tmp" checkout $SourcesRef + Move-Item "$ExtractedSources.tmp" "$ExtractedSources" +} +Write-Host "Using sources directory: $ExtractedSources" + + $subfolders = Get-Item $ExtractedSources\aws-cpp-sdk-* -$controltext = gc $ControlFileIn -$controltext += @("# Automatically generated by generateFeatures.ps1") +$manifest = Get-Content $ManifestIn | ConvertFrom-Json +$manifest | Add-Member ` + -NotePropertyName '$note' ` + -NotePropertyValue 'Automatically generated by generateFeatures.ps1' +$manifest | Add-Member -NotePropertyName 'features' -NotePropertyValue @{} $cmakefragmenttext = @("# Automatically generated by generateFeatures.ps1") @@ -20,32 +40,34 @@ function GetDescription($dir, $modulename) $descs = @(Select-String -Path "$dir\CMakeLists.txt" -Pattern "`"C\+\+ SDK for the AWS [^`"]*`"") if ($descs.count -eq 1) { $desc = $descs[0].Matches.Value -replace "`"","" - "Description: $desc" + "$desc" } - else { "Description: C++ SDK for the AWS $modulename service" } + else { "C++ SDK for the AWS $modulename service" } } - else { "Description: C++ SDK for the AWS $modulename service" } + else { "C++ SDK for the AWS $modulename service" } } -$subfolders | % { - $modulename = $_.name -replace "^aws-cpp-sdk-","" - if ($modulename -match "-tests`$") { return } - if ($modulename -match "-sample`$") { return } - if ($modulename -eq "core") { return } +foreach ($subfolder in $subfolders) +{ + $modulename = $subfolder.name -replace "^aws-cpp-sdk-","" + if ($modulename -match "-tests`$") { continue } + if ($modulename -match "-sample`$") { continue } + if ($modulename -eq "core") { continue } + + $lowermodulename = $modulename.ToLower() - $controltext += @("") - $controltext += @("Feature: $modulename") - $controltext += @(GetDescription $_ $modulename) + $manifest.features.Add("$lowermodulename", @{ description=(GetDescription $subfolder $modulename) }) $cmakefragmenttext += @( - "if(`"$modulename`" IN_LIST FEATURES)", + "if(`"$lowermodulename`" IN_LIST FEATURES)", " list(APPEND BUILD_ONLY $modulename)", "endif()" ) } -Write-Verbose ($controltext -join "`n") -[IO.File]::WriteAllText($ControlFile, ($controltext -join "`n")+"`n") +[IO.File]::WriteAllText($ManifestOut, (ConvertTo-Json -Depth 5 -InputObject $manifest)) Write-Verbose ($cmakefragmenttext -join "`n") [IO.File]::WriteAllText($CMakeFragmentFile, ($cmakefragmenttext -join "`n") +"`n") + +& $vcpkg format-manifest --feature-flags=-manifests $ManifestOut diff --git a/ports/aws-sdk-cpp/patch-relocatable-rpath.patch b/ports/aws-sdk-cpp/patch-relocatable-rpath.patch new file mode 100644 index 00000000000000..828647cc4365ce --- /dev/null +++ b/ports/aws-sdk-cpp/patch-relocatable-rpath.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a653e38628..76d6067646 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -142,7 +142,6 @@ else() + endif() + + # Add Linker search paths to RPATH so as to fix the problem where some linkers can't find cross-compiled dependent libraries in customer paths when linking executables. +-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) + + # build the sdk targets + project("aws-cpp-sdk-all" VERSION "${PROJECT_VERSION}" LANGUAGES CXX) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index dc7bc19fc2e64e..66cc714a668c82 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -1,49 +1,65 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() +vcpkg_buildpath_length_warning(37) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.7.116 - SHA512 2d10aebf1c10bb7e7a0efa1fd930b8743d9bce1d7d36f72c55fd13612be4fd30cf0a67ebe4f8d7c05146306084b10d8657ff26ac3bafaaa9efaa4c67707acb49 - HEAD_REF master + REF b0204a7b6a33211f533a175e987a755f714bf7f3 # 1.9.96 + SHA512 456d3fc256a5a26843ecf16014242514b165ae5fa35f088d57aa54a744d19e2c38bd0bed9b6a4b76948c8a49cf87a06a4c722be5a910ed41dfd9c9b9a66b398d + PATCHES + patch-relocatable-rpath.patch ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" FORCE_SHARED_CRT) -set(BUILD_ONLY core) - -include(${CMAKE_CURRENT_LIST_DIR}/compute_build_only.cmake) - -if(CMAKE_HOST_WIN32) - string(REPLACE ";" "\\\\\\;" BUILD_ONLY "${BUILD_ONLY}") +set(EXTRA_ARGS) +if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) + set(rpath "@loader_path") + set(EXTRA_ARGS + "-DCURL_HAS_H2_EXITCODE=0" + "-DCURL_HAS_H2_EXITCODE__TRYRUN_OUTPUT=\"\"" + "-DCURL_HAS_TLS_PROXY_EXITCODE=0" + "-DCURL_HAS_TLS_PROXY_EXITCODE__TRYRUN_OUTPUT=\"\"" + ) +elseif (VCPKG_TARGET_IS_ANDROID) + set(EXTRA_ARGS "-DTARGET_ARCH=ANDROID" + "-DGIT_EXECUTABLE=--invalid-git-executable--" + "-DGIT_FOUND=TRUE" + "-DNDK_DIR=$ENV{ANDROID_NDK_HOME}" + "-DANDROID_BUILD_ZLIB=FALSE" + "-DANDROID_BUILD_CURL=FALSE" + "-DANDROID_BUILD_OPENSSL=FALSE" + "-DENABLE_HW_OPTIMIZATION=OFF" + "-DCURL_HAS_H2_EXITCODE=0" + "-DCURL_HAS_H2_EXITCODE__TRYRUN_OUTPUT=\"\"" + "-DCURL_HAS_TLS_PROXY_EXITCODE=0" + "-DCURL_HAS_TLS_PROXY_EXITCODE__TRYRUN_OUTPUT=\"\"" + ) else() - string(REPLACE ";" "\\\\\\\\\\\;" BUILD_ONLY "${BUILD_ONLY}") + set(rpath "\$ORIGIN") endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DENABLE_UNITY_BUILD=ON - -DENABLE_TESTING=OFF - -DFORCE_SHARED_CRT=${FORCE_SHARED_CRT} - -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE - "-DBUILD_ONLY=${BUILD_ONLY}" - -DBUILD_DEPS=OFF -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +set(BUILD_ONLY core) +include(${CMAKE_CURRENT_LIST_DIR}/compute_build_only.cmake) -vcpkg_copy_pdbs() +foreach(TARGET IN LISTS BUILD_ONLY) + message(STATUS "Building ${TARGET}") + vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + ${EXTRA_ARGS} + "-DENABLE_UNITY_BUILD=ON" + "-DENABLE_TESTING=OFF" + "-DFORCE_SHARED_CRT=${FORCE_SHARED_CRT}" + "-DBUILD_ONLY=${TARGET}" + "-DBUILD_DEPS=OFF" + "-DCMAKE_INSTALL_RPATH=${rpath}" + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files + ) + vcpkg_cmake_install() + vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake) + vcpkg_copy_pdbs() +endforeach() file(GLOB_RECURSE AWS_TARGETS "${CURRENT_PACKAGES_DIR}/share/*/*-targets-*.cmake") foreach(AWS_TARGET IN LISTS AWS_TARGETS) @@ -63,13 +79,12 @@ foreach(AWS_CONFIG IN LISTS AWS_CONFIGS) endforeach() file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/share/AWSSDK - ${CURRENT_PACKAGES_DIR}/lib/pkgconfig - ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig - ${CURRENT_PACKAGES_DIR}/nuget - ${CURRENT_PACKAGES_DIR}/debug/nuget + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" + "${CURRENT_PACKAGES_DIR}/nuget" + "${CURRENT_PACKAGES_DIR}/debug/nuget" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -84,8 +99,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(REMOVE ${DEBUG_LIB_FILES}) endif() - file(APPEND ${CURRENT_PACKAGES_DIR}/include/aws/core/SDKConfig.h "#ifndef USE_IMPORT_EXPORT\n#define USE_IMPORT_EXPORT\n#endif") + file(APPEND "${CURRENT_PACKAGES_DIR}/include/aws/core/SDKConfig.h" "#ifndef USE_IMPORT_EXPORT\n#define USE_IMPORT_EXPORT\n#endif") endif() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright) +configure_file("${CURRENT_PORT_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/aws-sdk-cpp/usage b/ports/aws-sdk-cpp/usage new file mode 100644 index 00000000000000..13a822f1c0f4e2 --- /dev/null +++ b/ports/aws-sdk-cpp/usage @@ -0,0 +1,5 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: + + find_package(AWSSDK CONFIG COMPONENTS core dynamodb kinesis s3 REQUIRED) + target_include_directories(main PRIVATE ${AWSSDK_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${AWSSDK_LIBRARIES}) diff --git a/ports/aws-sdk-cpp/vcpkg.json b/ports/aws-sdk-cpp/vcpkg.json new file mode 100644 index 00000000000000..3007b888bb69e8 --- /dev/null +++ b/ports/aws-sdk-cpp/vcpkg.json @@ -0,0 +1,870 @@ +{ + "$note": "Automatically generated by generateFeatures.ps1", + "name": "aws-sdk-cpp", + "version": "1.9.96", + "port-version": 1, + "description": "AWS SDK for C++", + "homepage": "https://github.com/aws/aws-sdk-cpp", + "supports": "!arm & !uwp", + "dependencies": [ + "aws-crt-cpp", + { + "name": "curl", + "platform": "!uwp & !windows" + }, + { + "name": "openssl", + "platform": "!uwp & !windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "default-features": [ + "dynamodb", + "kinesis", + "s3" + ], + "features": { + "access-management": { + "description": "C++ SDK for the AWS access-management service" + }, + "accessanalyzer": { + "description": "C++ SDK for the AWS accessanalyzer service" + }, + "acm": { + "description": "C++ SDK for the AWS acm service" + }, + "acm-pca": { + "description": "C++ SDK for the AWS acm-pca service" + }, + "alexaforbusiness": { + "description": "C++ SDK for the AWS alexaforbusiness service" + }, + "amp": { + "description": "C++ SDK for the AWS amp service" + }, + "amplify": { + "description": "C++ SDK for the AWS amplify service" + }, + "amplifybackend": { + "description": "C++ SDK for the AWS amplifybackend service" + }, + "apigateway": { + "description": "C++ SDK for the AWS apigateway service" + }, + "apigatewaymanagementapi": { + "description": "C++ SDK for the AWS apigatewaymanagementapi service" + }, + "apigatewayv2": { + "description": "C++ SDK for the AWS apigatewayv2 service" + }, + "appconfig": { + "description": "C++ SDK for the AWS appconfig service" + }, + "appflow": { + "description": "C++ SDK for the AWS appflow service" + }, + "appintegrations": { + "description": "C++ SDK for the AWS appintegrations service" + }, + "application-autoscaling": { + "description": "C++ SDK for the AWS application-autoscaling service" + }, + "application-insights": { + "description": "C++ SDK for the AWS application-insights service" + }, + "applicationcostprofiler": { + "description": "C++ SDK for the AWS applicationcostprofiler service" + }, + "appmesh": { + "description": "C++ SDK for the AWS appmesh service" + }, + "apprunner": { + "description": "C++ SDK for the AWS apprunner service" + }, + "appstream": { + "description": "C++ SDK for the AWS appstream service" + }, + "appsync": { + "description": "C++ SDK for the AWS appsync service" + }, + "athena": { + "description": "C++ SDK for the AWS athena service" + }, + "auditmanager": { + "description": "C++ SDK for the AWS auditmanager service" + }, + "autoscaling": { + "description": "C++ SDK for the AWS autoscaling service" + }, + "autoscaling-plans": { + "description": "C++ SDK for the AWS autoscaling-plans service" + }, + "awsmigrationhub": { + "description": "C++ SDK for the AWS AWSMigrationHub service" + }, + "awstransfer": { + "description": "C++ SDK for the AWS awstransfer service" + }, + "backup": { + "description": "C++ SDK for the AWS backup service" + }, + "batch": { + "description": "C++ SDK for the AWS batch service" + }, + "braket": { + "description": "C++ SDK for the AWS braket service" + }, + "budgets": { + "description": "C++ SDK for the AWS budgets service" + }, + "ce": { + "description": "C++ SDK for the AWS ce service" + }, + "chime": { + "description": "C++ SDK for the AWS chime service" + }, + "cloud9": { + "description": "C++ SDK for the AWS cloud9 service" + }, + "clouddirectory": { + "description": "C++ SDK for the AWS clouddirectory service" + }, + "cloudformation": { + "description": "C++ SDK for the AWS cloudformation service" + }, + "cloudfront": { + "description": "C++ SDK for the AWS cloudfront service" + }, + "cloudhsm": { + "description": "C++ SDK for the AWS cloudhsm service" + }, + "cloudhsmv2": { + "description": "C++ SDK for the AWS cloudhsmv2 service" + }, + "cloudsearch": { + "description": "C++ SDK for the AWS cloudsearch service" + }, + "cloudsearchdomain": { + "description": "C++ SDK for the AWS cloudsearchdomain service" + }, + "cloudtrail": { + "description": "C++ SDK for the AWS cloudtrail service" + }, + "codeartifact": { + "description": "C++ SDK for the AWS codeartifact service" + }, + "codebuild": { + "description": "C++ SDK for the AWS codebuild service" + }, + "codecommit": { + "description": "C++ SDK for the AWS codecommit service" + }, + "codedeploy": { + "description": "C++ SDK for the AWS codedeploy service" + }, + "codeguru-reviewer": { + "description": "C++ SDK for the AWS codeguru-reviewer service" + }, + "codeguruprofiler": { + "description": "C++ SDK for the AWS codeguruprofiler service" + }, + "codepipeline": { + "description": "C++ SDK for the AWS codepipeline service" + }, + "codestar": { + "description": "C++ SDK for the AWS codestar service" + }, + "codestar-connections": { + "description": "C++ SDK for the AWS codestar-connections service" + }, + "codestar-notifications": { + "description": "C++ SDK for the AWS codestar-notifications service" + }, + "cognito-identity": { + "description": "C++ SDK for the AWS cognito-identity service" + }, + "cognito-idp": { + "description": "C++ SDK for the AWS cognito-idp service" + }, + "cognito-sync": { + "description": "C++ SDK for the AWS cognito-sync service" + }, + "comprehend": { + "description": "C++ SDK for the AWS comprehend service" + }, + "comprehendmedical": { + "description": "C++ SDK for the AWS comprehendmedical service" + }, + "compute-optimizer": { + "description": "C++ SDK for the AWS compute-optimizer service" + }, + "config": { + "description": "C++ SDK for the AWS config service" + }, + "connect": { + "description": "C++ SDK for the AWS connect service" + }, + "connect-contact-lens": { + "description": "C++ SDK for the AWS connect-contact-lens service" + }, + "connectparticipant": { + "description": "C++ SDK for the AWS connectparticipant service" + }, + "cur": { + "description": "C++ SDK for the AWS cur service" + }, + "customer-profiles": { + "description": "C++ SDK for the AWS customer-profiles service" + }, + "databrew": { + "description": "C++ SDK for the AWS databrew service" + }, + "dataexchange": { + "description": "C++ SDK for the AWS dataexchange service" + }, + "datapipeline": { + "description": "C++ SDK for the AWS datapipeline service" + }, + "datasync": { + "description": "C++ SDK for the AWS datasync service" + }, + "dax": { + "description": "C++ SDK for the AWS dax service" + }, + "detective": { + "description": "C++ SDK for the AWS detective service" + }, + "devicefarm": { + "description": "C++ SDK for the AWS devicefarm service" + }, + "devops-guru": { + "description": "C++ SDK for the AWS devops-guru service" + }, + "directconnect": { + "description": "C++ SDK for the AWS directconnect service" + }, + "discovery": { + "description": "C++ SDK for the AWS discovery service" + }, + "dlm": { + "description": "C++ SDK for the AWS dlm service" + }, + "dms": { + "description": "C++ SDK for the AWS dms service" + }, + "docdb": { + "description": "C++ SDK for the AWS docdb service" + }, + "ds": { + "description": "C++ SDK for the AWS ds service" + }, + "dynamodb": { + "description": "C++ SDK for the AWS dynamodb service" + }, + "dynamodbstreams": { + "description": "C++ SDK for the AWS dynamodbstreams service" + }, + "ebs": { + "description": "C++ SDK for the AWS ebs service" + }, + "ec2": { + "description": "C++ SDK for the AWS ec2 service" + }, + "ec2-instance-connect": { + "description": "C++ SDK for the AWS ec2-instance-connect service" + }, + "ecr": { + "description": "C++ SDK for the AWS ecr service" + }, + "ecr-public": { + "description": "C++ SDK for the AWS ecr-public service" + }, + "ecs": { + "description": "C++ SDK for the AWS ecs service" + }, + "eks": { + "description": "C++ SDK for the AWS eks service" + }, + "elastic-inference": { + "description": "C++ SDK for the AWS elastic-inference service" + }, + "elasticache": { + "description": "C++ SDK for the AWS elasticache service" + }, + "elasticbeanstalk": { + "description": "C++ SDK for the AWS elasticbeanstalk service" + }, + "elasticfilesystem": { + "description": "C++ SDK for the AWS elasticfilesystem service" + }, + "elasticloadbalancing": { + "description": "C++ SDK for the AWS elasticloadbalancing service" + }, + "elasticloadbalancingv2": { + "description": "C++ SDK for the AWS elasticloadbalancingv2 service" + }, + "elasticmapreduce": { + "description": "C++ SDK for the AWS elasticmapreduce service" + }, + "elastictranscoder": { + "description": "C++ SDK for the AWS elastictranscoder service" + }, + "email": { + "description": "C++ SDK for the AWS email service" + }, + "emr-containers": { + "description": "C++ SDK for the AWS emr-containers service" + }, + "es": { + "description": "C++ SDK for the AWS es service" + }, + "eventbridge": { + "description": "C++ SDK for the AWS eventbridge service" + }, + "events": { + "description": "C++ SDK for the AWS events service" + }, + "finspace": { + "description": "C++ SDK for the AWS finspace service" + }, + "finspace-data": { + "description": "C++ SDK for the AWS finspace-data service" + }, + "firehose": { + "description": "C++ SDK for the AWS firehose service" + }, + "fis": { + "description": "C++ SDK for the AWS fis service" + }, + "fms": { + "description": "C++ SDK for the AWS fms service" + }, + "forecast": { + "description": "C++ SDK for the AWS forecast service" + }, + "forecastquery": { + "description": "C++ SDK for the AWS forecastquery service" + }, + "frauddetector": { + "description": "C++ SDK for the AWS frauddetector service" + }, + "fsx": { + "description": "C++ SDK for the AWS fsx service" + }, + "gamelift": { + "description": "C++ SDK for the AWS gamelift service" + }, + "glacier": { + "description": "C++ SDK for the AWS glacier service" + }, + "globalaccelerator": { + "description": "C++ SDK for the AWS globalaccelerator service" + }, + "glue": { + "description": "C++ SDK for the AWS glue service" + }, + "greengrass": { + "description": "C++ SDK for the AWS greengrass service" + }, + "greengrassv2": { + "description": "C++ SDK for the AWS greengrassv2 service" + }, + "groundstation": { + "description": "C++ SDK for the AWS groundstation service" + }, + "guardduty": { + "description": "C++ SDK for the AWS guardduty service" + }, + "health": { + "description": "C++ SDK for the AWS health service" + }, + "healthlake": { + "description": "C++ SDK for the AWS healthlake service" + }, + "honeycode": { + "description": "C++ SDK for the AWS honeycode service" + }, + "iam": { + "description": "C++ SDK for the AWS iam service" + }, + "identity-management": { + "description": "C++ SDK for the AWS identity-management service" + }, + "identitystore": { + "description": "C++ SDK for the AWS identitystore service" + }, + "imagebuilder": { + "description": "C++ SDK for the AWS imagebuilder service" + }, + "importexport": { + "description": "C++ SDK for the AWS importexport service" + }, + "inspector": { + "description": "C++ SDK for the AWS inspector service" + }, + "iot": { + "description": "C++ SDK for the AWS iot service" + }, + "iot-data": { + "description": "C++ SDK for the AWS iot-data service" + }, + "iot-jobs-data": { + "description": "C++ SDK for the AWS iot-jobs-data service" + }, + "iot1click-devices": { + "description": "C++ SDK for the AWS iot1click-devices service" + }, + "iot1click-projects": { + "description": "C++ SDK for the AWS iot1click-projects service" + }, + "iotanalytics": { + "description": "C++ SDK for the AWS iotanalytics service" + }, + "iotdeviceadvisor": { + "description": "C++ SDK for the AWS iotdeviceadvisor service" + }, + "iotevents": { + "description": "C++ SDK for the AWS iotevents service" + }, + "iotevents-data": { + "description": "C++ SDK for the AWS iotevents-data service" + }, + "iotfleethub": { + "description": "C++ SDK for the AWS iotfleethub service" + }, + "iotsecuretunneling": { + "description": "C++ SDK for the AWS iotsecuretunneling service" + }, + "iotsitewise": { + "description": "C++ SDK for the AWS iotsitewise service" + }, + "iotthingsgraph": { + "description": "C++ SDK for the AWS iotthingsgraph service" + }, + "iotwireless": { + "description": "C++ SDK for the AWS iotwireless service" + }, + "ivs": { + "description": "C++ SDK for the AWS ivs service" + }, + "kafka": { + "description": "C++ SDK for the AWS kafka service" + }, + "kendra": { + "description": "C++ SDK for the AWS kendra service" + }, + "kinesis": { + "description": "C++ SDK for the AWS kinesis service" + }, + "kinesis-video-archived-media": { + "description": "C++ SDK for the AWS kinesis-video-archived-media service" + }, + "kinesis-video-media": { + "description": "C++ SDK for the AWS kinesis-video-media service" + }, + "kinesis-video-signaling": { + "description": "C++ SDK for the AWS kinesis-video-signaling service" + }, + "kinesisanalytics": { + "description": "C++ SDK for the AWS kinesisanalytics service" + }, + "kinesisanalyticsv2": { + "description": "C++ SDK for the AWS kinesisanalyticsv2 service" + }, + "kinesisvideo": { + "description": "C++ SDK for the AWS kinesisvideo service" + }, + "kms": { + "description": "C++ SDK for the AWS kms service" + }, + "lakeformation": { + "description": "C++ SDK for the AWS lakeformation service" + }, + "lambda": { + "description": "C++ SDK for the AWS lambda service" + }, + "lex": { + "description": "C++ SDK for the AWS lex service" + }, + "lex-models": { + "description": "C++ SDK for the AWS lex-models service" + }, + "lexv2-models": { + "description": "C++ SDK for the AWS lexv2-models service" + }, + "lexv2-runtime": { + "description": "C++ SDK for the AWS lexv2-runtime service" + }, + "license-manager": { + "description": "C++ SDK for the AWS license-manager service" + }, + "lightsail": { + "description": "C++ SDK for the AWS lightsail service" + }, + "location": { + "description": "C++ SDK for the AWS location service" + }, + "logs": { + "description": "C++ SDK for the AWS logs service" + }, + "lookoutequipment": { + "description": "C++ SDK for the AWS lookoutequipment service" + }, + "lookoutmetrics": { + "description": "C++ SDK for the AWS lookoutmetrics service" + }, + "lookoutvision": { + "description": "C++ SDK for the AWS lookoutvision service" + }, + "machinelearning": { + "description": "C++ SDK for the AWS machinelearning service" + }, + "macie": { + "description": "C++ SDK for the AWS macie service" + }, + "macie2": { + "description": "C++ SDK for the AWS macie2 service" + }, + "managedblockchain": { + "description": "C++ SDK for the AWS managedblockchain service" + }, + "marketplace-catalog": { + "description": "C++ SDK for the AWS marketplace-catalog service" + }, + "marketplace-entitlement": { + "description": "C++ SDK for the AWS marketplace-entitlement service" + }, + "marketplacecommerceanalytics": { + "description": "C++ SDK for the AWS marketplacecommerceanalytics service" + }, + "mediaconnect": { + "description": "C++ SDK for the AWS mediaconnect service" + }, + "mediaconvert": { + "description": "C++ SDK for the AWS mediaconvert service" + }, + "medialive": { + "description": "C++ SDK for the AWS medialive service" + }, + "mediapackage": { + "description": "C++ SDK for the AWS mediapackage service" + }, + "mediapackage-vod": { + "description": "C++ SDK for the AWS mediapackage-vod service" + }, + "mediastore": { + "description": "C++ SDK for the AWS mediastore service" + }, + "mediastore-data": { + "description": "C++ SDK for the AWS mediastore-data service" + }, + "mediatailor": { + "description": "C++ SDK for the AWS mediatailor service" + }, + "meteringmarketplace": { + "description": "C++ SDK for the AWS meteringmarketplace service" + }, + "mgn": { + "description": "C++ SDK for the AWS mgn service" + }, + "migrationhub-config": { + "description": "C++ SDK for the AWS migrationhub-config service" + }, + "mobile": { + "description": "C++ SDK for the AWS mobile service" + }, + "mobileanalytics": { + "description": "C++ SDK for the AWS mobileanalytics service" + }, + "monitoring": { + "description": "C++ SDK for the AWS monitoring service" + }, + "mq": { + "description": "C++ SDK for the AWS mq service" + }, + "mturk-requester": { + "description": "C++ SDK for the AWS mturk-requester service" + }, + "mwaa": { + "description": "C++ SDK for the AWS mwaa service" + }, + "neptune": { + "description": "C++ SDK for the AWS neptune service" + }, + "network-firewall": { + "description": "C++ SDK for the AWS network-firewall service" + }, + "networkmanager": { + "description": "C++ SDK for the AWS networkmanager service" + }, + "nimble": { + "description": "C++ SDK for the AWS nimble service" + }, + "opsworks": { + "description": "C++ SDK for the AWS opsworks service" + }, + "opsworkscm": { + "description": "C++ SDK for the AWS opsworkscm service" + }, + "organizations": { + "description": "C++ SDK for the AWS organizations service" + }, + "outposts": { + "description": "C++ SDK for the AWS outposts service" + }, + "personalize": { + "description": "C++ SDK for the AWS personalize service" + }, + "personalize-events": { + "description": "C++ SDK for the AWS personalize-events service" + }, + "personalize-runtime": { + "description": "C++ SDK for the AWS personalize-runtime service" + }, + "pi": { + "description": "C++ SDK for the AWS pi service" + }, + "pinpoint": { + "description": "C++ SDK for the AWS pinpoint service" + }, + "pinpoint-email": { + "description": "C++ SDK for the AWS pinpoint-email service" + }, + "polly": { + "description": "C++ SDK for the AWS polly service" + }, + "pricing": { + "description": "C++ SDK for the AWS pricing service" + }, + "qldb": { + "description": "C++ SDK for the AWS qldb service" + }, + "qldb-session": { + "description": "C++ SDK for the AWS qldb-session service" + }, + "queues": { + "description": "C++ SDK for the AWS queues service" + }, + "quicksight": { + "description": "C++ SDK for the AWS quicksight service" + }, + "ram": { + "description": "C++ SDK for the AWS ram service" + }, + "rds": { + "description": "C++ SDK for the AWS rds service" + }, + "rds-data": { + "description": "C++ SDK for the AWS rds-data service" + }, + "redshift": { + "description": "C++ SDK for the AWS redshift service" + }, + "redshift-data": { + "description": "C++ SDK for the AWS redshift-data service" + }, + "rekognition": { + "description": "C++ SDK for the AWS rekognition service" + }, + "resource-groups": { + "description": "C++ SDK for the AWS resource-groups service" + }, + "resourcegroupstaggingapi": { + "description": "C++ SDK for the AWS resourcegroupstaggingapi service" + }, + "robomaker": { + "description": "C++ SDK for the AWS robomaker service" + }, + "route53": { + "description": "C++ SDK for the AWS route53 service" + }, + "route53domains": { + "description": "C++ SDK for the AWS route53domains service" + }, + "route53resolver": { + "description": "C++ SDK for the AWS route53resolver service" + }, + "s3": { + "description": "C++ SDK for the AWS s3 service" + }, + "s3-crt": { + "description": "C++ SDK for the AWS s3-crt service" + }, + "s3-encryption": { + "description": "C++ SDK for the AWS s3-encryption service" + }, + "s3control": { + "description": "C++ SDK for the AWS s3control service" + }, + "s3outposts": { + "description": "C++ SDK for the AWS s3outposts service" + }, + "sagemaker": { + "description": "C++ SDK for the AWS sagemaker service" + }, + "sagemaker-a2i-runtime": { + "description": "C++ SDK for the AWS sagemaker-a2i-runtime service" + }, + "sagemaker-edge": { + "description": "C++ SDK for the AWS sagemaker-edge service" + }, + "sagemaker-featurestore-runtime": { + "description": "C++ SDK for the AWS sagemaker-featurestore-runtime service" + }, + "sagemaker-runtime": { + "description": "C++ SDK for the AWS sagemaker-runtime service" + }, + "savingsplans": { + "description": "C++ SDK for the AWS savingsplans service" + }, + "schemas": { + "description": "C++ SDK for the AWS schemas service" + }, + "sdb": { + "description": "C++ SDK for the AWS sdb service" + }, + "secretsmanager": { + "description": "C++ SDK for the AWS secretsmanager service" + }, + "securityhub": { + "description": "C++ SDK for the AWS securityhub service" + }, + "serverlessrepo": { + "description": "C++ SDK for the AWS serverlessrepo service" + }, + "service-quotas": { + "description": "C++ SDK for the AWS service-quotas service" + }, + "servicecatalog": { + "description": "C++ SDK for the AWS servicecatalog service" + }, + "servicecatalog-appregistry": { + "description": "C++ SDK for the AWS servicecatalog-appregistry service" + }, + "servicediscovery": { + "description": "C++ SDK for the AWS servicediscovery service" + }, + "sesv2": { + "description": "C++ SDK for the AWS sesv2 service" + }, + "shield": { + "description": "C++ SDK for the AWS shield service" + }, + "signer": { + "description": "C++ SDK for the AWS signer service" + }, + "sms": { + "description": "C++ SDK for the AWS sms service" + }, + "sms-voice": { + "description": "C++ SDK for the AWS sms-voice service" + }, + "snowball": { + "description": "C++ SDK for the AWS snowball service" + }, + "sns": { + "description": "C++ SDK for the AWS sns service" + }, + "sqs": { + "description": "C++ SDK for the AWS sqs service" + }, + "ssm": { + "description": "C++ SDK for the AWS ssm service" + }, + "ssm-contacts": { + "description": "C++ SDK for the AWS ssm-contacts service" + }, + "ssm-incidents": { + "description": "C++ SDK for the AWS ssm-incidents service" + }, + "sso": { + "description": "C++ SDK for the AWS sso service" + }, + "sso-admin": { + "description": "C++ SDK for the AWS sso-admin service" + }, + "sso-oidc": { + "description": "C++ SDK for the AWS sso-oidc service" + }, + "states": { + "description": "C++ SDK for the AWS states service" + }, + "storagegateway": { + "description": "C++ SDK for the AWS storagegateway service" + }, + "sts": { + "description": "C++ SDK for the AWS sts service" + }, + "support": { + "description": "C++ SDK for the AWS support service" + }, + "swf": { + "description": "C++ SDK for the AWS swf service" + }, + "synthetics": { + "description": "C++ SDK for the AWS synthetics service" + }, + "text-to-speech": { + "description": "C++ SDK for the AWS text-to-speech service" + }, + "textract": { + "description": "C++ SDK for the AWS textract service" + }, + "timestream-query": { + "description": "C++ SDK for the AWS timestream-query service" + }, + "timestream-write": { + "description": "C++ SDK for the AWS timestream-write service" + }, + "transcribe": { + "description": "C++ SDK for the AWS transcribe service" + }, + "transcribestreaming": { + "description": "C++ SDK for the AWS transcribestreaming service" + }, + "transfer": { + "description": "C++ SDK for the AWS transfer service" + }, + "translate": { + "description": "C++ SDK for the AWS translate service" + }, + "waf": { + "description": "C++ SDK for the AWS waf service" + }, + "waf-regional": { + "description": "C++ SDK for the AWS waf-regional service" + }, + "wafv2": { + "description": "C++ SDK for the AWS wafv2 service" + }, + "wellarchitected": { + "description": "C++ SDK for the AWS wellarchitected service" + }, + "workdocs": { + "description": "C++ SDK for the AWS workdocs service" + }, + "worklink": { + "description": "C++ SDK for the AWS worklink service" + }, + "workmail": { + "description": "C++ SDK for the AWS workmail service" + }, + "workmailmessageflow": { + "description": "C++ SDK for the AWS workmailmessageflow service" + }, + "workspaces": { + "description": "C++ SDK for the AWS workspaces service" + }, + "xray": { + "description": "C++ SDK for the AWS xray service" + } + } +} diff --git a/ports/azmq/CONTROL b/ports/azmq/CONTROL deleted file mode 100644 index 350bee2663b75e..00000000000000 --- a/ports/azmq/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: azmq -Version: 1.0.2 -Build-Depends: boost-asio, boost-assert, boost-config, boost-container, boost-format, boost-intrusive, boost-iterator, boost-lexical-cast, boost-logic, boost-optional, boost-random, boost-range, boost-regex, boost-system, boost-thread, boost-utility, zeromq -Description: Boost Asio style bindings for ZeroMQ - This library is built on top of ZeroMQ's standard C interface and is intended to work well with C++ applications which use the Boost libraries in general, and Asio in particular. - The main abstraction exposed by the library is azmq::socket which provides an Asio style socket interface to the underlying zeromq socket and interfaces with Asio's io_service(). The socket implementation participates in the io_service's reactor for asynchronous IO and may be freely mixed with other Asio socket types (raw TCP/UDP/Serial/etc.). diff --git a/ports/azmq/portfile.cmake b/ports/azmq/portfile.cmake index 867b688eecc56b..c2d333f608e321 100644 --- a/ports/azmq/portfile.cmake +++ b/ports/azmq/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/azmq - REF v1.0.2 - SHA512 6e60a670d070ddf84dbd406e88225ff12f84ce39e0e64e9aff4314e174506c286d72cfebb5e2e51eab221f6e163a17cce539d052cea3c18954ec495b096f087b + REF 6bb101eecb357ad9735ebc36e276b7526652d42d # commit on 2019-05-01 + SHA512 18812fd73c3c57aca8b17c2df0af01afb7864253d6ac6ce042e01ef04e81dd454438c9d01f5bb0fd7a4a445082a2eb3dd334ca1e05dafbe4ba602cad95ce7134 HEAD_REF master ) @@ -12,4 +10,4 @@ file(COPY ${SOURCE_PATH}/azmq DESTINATION ${CURRENT_PACKAGES_DIR}/include/) file(INSTALL ${SOURCE_PATH}/LICENSE-BOOST_1_0 - DESTINATION ${CURRENT_PACKAGES_DIR}/share/azmq RENAME copyright) + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/azmq/vcpkg.json b/ports/azmq/vcpkg.json new file mode 100644 index 00000000000000..6344423fa7ca8e --- /dev/null +++ b/ports/azmq/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "azmq", + "version-string": "2020-03-03", + "port-version": 1, + "description": [ + "Boost Asio style bindings for ZeroMQ", + "This library is built on top of ZeroMQ's standard C interface and is intended to work well with C++ applications which use the Boost libraries in general, and Asio in particular.", + "The main abstraction exposed by the library is azmq::socket which provides an Asio style socket interface to the underlying zeromq socket and interfaces with Asio's io_service(). The socket implementation participates in the io_service's reactor for asynchronous IO and may be freely mixed with other Asio socket types (raw TCP/UDP/Serial/etc.)." + ], + "homepage": "https://github.com/zeromq/azmq", + "dependencies": [ + "boost-asio", + "boost-assert", + "boost-config", + "boost-container", + "boost-format", + "boost-intrusive", + "boost-iterator", + "boost-lexical-cast", + "boost-logic", + "boost-optional", + "boost-random", + "boost-range", + "boost-regex", + "boost-system", + "boost-thread", + "boost-utility", + "zeromq" + ] +} diff --git a/ports/azure-c-shared-utility/CONTROL b/ports/azure-c-shared-utility/CONTROL deleted file mode 100644 index 08223a62cebf08..00000000000000 --- a/ports/azure-c-shared-utility/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: azure-c-shared-utility -Version: 2019-05-16.1 -Description: Azure C SDKs common code -Build-Depends: curl (linux), openssl (linux), azure-macro-utils-c, umock-c - -Feature: public-preview -Description: Azure C SDKs common code (public preview) diff --git a/ports/azure-c-shared-utility/disable-error.patch b/ports/azure-c-shared-utility/disable-error.patch new file mode 100644 index 00000000000000..b2fd2f8d2de5af --- /dev/null +++ b/ports/azure-c-shared-utility/disable-error.patch @@ -0,0 +1,26 @@ +diff --git a/configs/azure_iot_build_rules.cmake b/configs/azure_iot_build_rules.cmake +index be3e14fe..aa402902 100644 +--- a/configs/azure_iot_build_rules.cmake ++++ b/configs/azure_iot_build_rules.cmake +@@ -71,8 +71,6 @@ if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") + elseif(UNIX) #LINUX OR APPLE +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + if(NOT (IN_OPENWRT OR APPLE)) + set (CMAKE_C_FLAGS "-D_POSIX_C_SOURCE=200112L ${CMAKE_C_FLAGS}") + endif() +@@ -191,12 +189,6 @@ endfunction() + IF((WIN32) AND (NOT(MINGW))) + #windows needs this define + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +- # Make warning as error +- add_definitions(/WX) +-ELSE() +- # Make warning as error +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + ENDIF() + + diff --git a/ports/azure-c-shared-utility/fix-utilityFunctions-conditions-preview.patch b/ports/azure-c-shared-utility/fix-utilityFunctions-conditions-preview.patch new file mode 100644 index 00000000000000..c89d92f5844848 --- /dev/null +++ b/ports/azure-c-shared-utility/fix-utilityFunctions-conditions-preview.patch @@ -0,0 +1,248 @@ +diff --git a/configs/azure_c_shared_utilityFunctions.cmake b/configs/azure_c_shared_utilityFunctions.cmake +index e85defa..7f450ab 100644 +--- a/configs/azure_c_shared_utilityFunctions.cmake ++++ b/configs/azure_c_shared_utilityFunctions.cmake +@@ -2,11 +2,11 @@ + #Licensed under the MIT license. See LICENSE file in the project root for full license information. + + function(target_link_libraries_with_arg_prefix arg_prefix whatIsBuilding lib) +- if(${arg_prefix} STREQUAL "debug") ++ if(arg_prefix STREQUAL "debug") + target_link_libraries(${whatIsBuilding} debug ${lib}) +- elseif(${arg_prefix} STREQUAL "optimized") ++ elseif(arg_prefix STREQUAL "optimized") + target_link_libraries(${whatIsBuilding} optimized ${lib}) +- elseif(${arg_prefix} STREQUAL "general") ++ elseif(arg_prefix STREQUAL "general") + target_link_libraries(${whatIsBuilding} general ${lib}) + else() + target_link_libraries(${whatIsBuilding} ${lib}) +@@ -43,13 +43,13 @@ function(windows_unittests_add_dll whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -57,7 +57,7 @@ function(windows_unittests_add_dll whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) +@@ -90,13 +90,13 @@ function(windows_unittests_add_exe whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -104,7 +104,7 @@ function(windows_unittests_add_exe whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -150,14 +150,14 @@ function(linux_unittests_add_exe whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + set(skip_to_next TRUE) + #also unset all the other states + +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -165,7 +165,7 @@ function(linux_unittests_add_exe whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -184,7 +184,7 @@ function(linux_unittests_add_exe whatIsBuilding) + + if(${run_valgrind}) + find_program(VALGRIND_FOUND NAMES valgrind) +- if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) ++ if(VALGRIND_FOUND STREQUAL VALGRIND_FOUND-NOTFOUND) + message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") + else() + add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) +@@ -307,13 +307,13 @@ function(c_windows_unittests_add_dll whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -321,7 +321,7 @@ function(c_windows_unittests_add_dll whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) +@@ -369,13 +369,13 @@ function(c_windows_unittests_add_exe whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -383,7 +383,7 @@ function(c_windows_unittests_add_exe whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -429,13 +429,13 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -443,7 +443,7 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -462,7 +462,7 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + + if(${run_valgrind}) + find_program(VALGRIND_FOUND NAMES valgrind) +- if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) ++ if(VALGRIND_FOUND STREQUAL VALGRIND_FOUND-NOTFOUND) + message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") + else() + add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --gen-suppressions=all --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) +@@ -546,29 +546,29 @@ function(compile_c_test_artifacts_as whatIsBuilding compileAsWhat) + (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) + ) + if (${use_cppunittest}) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_dll) + compileTargetAsC99(${whatIsBuilding}_testsonly_lib) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_dll) + compileTargetAsC11(${whatIsBuilding}_testsonly_lib) + endif() + endif() +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + else() + if( + (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${nuget_e2e_tests}) + ) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + else() +@@ -581,10 +581,10 @@ function(compile_c_test_artifacts_as whatIsBuilding compileAsWhat) + (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR + (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) + ) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + endif() +@@ -641,8 +641,8 @@ function(set_platform_files c_shared_dir) + set(CONDITION_C_FILE ${c_shared_dir}/adapters/condition_win32.c PARENT_SCOPE) + endif() + if(use_etw) +- if(${use_etw} OR (${use_etw} STREQUAL "ON_WITH_CONSOLE")) +- if (${use_etw} STREQUAL "ON_WITH_CONSOLE") ++ if(use_etw OR (use_etw STREQUAL "ON_WITH_CONSOLE")) ++ if (use_etw STREQUAL "ON_WITH_CONSOLE") + set(XLOGGING_C_FILE ${c_shared_dir}/src/etwxlogging.c PARENT_SCOPE) + set(LOGGING_C_FILE ${c_shared_dir}/src/etwlogger_driver.c ${c_shared_dir}/src/consolelogger.c PARENT_SCOPE) + set(LOGGING_RC_FILE ${c_shared_dir}/res/etwlogger.rc CACHE INTERNAL "") diff --git a/ports/azure-c-shared-utility/fix-utilityFunctions-conditions.patch b/ports/azure-c-shared-utility/fix-utilityFunctions-conditions.patch new file mode 100644 index 00000000000000..7b60af94b9cd16 --- /dev/null +++ b/ports/azure-c-shared-utility/fix-utilityFunctions-conditions.patch @@ -0,0 +1,256 @@ +diff --git a/configs/azure_c_shared_utilityFunctions.cmake b/configs/azure_c_shared_utilityFunctions.cmake +index 6c2f415..e6133af 100644 +--- a/configs/azure_c_shared_utilityFunctions.cmake ++++ b/configs/azure_c_shared_utilityFunctions.cmake +@@ -2,11 +2,11 @@ + #Licensed under the MIT license. See LICENSE file in the project root for full license information. + + function(target_link_libraries_with_arg_prefix arg_prefix whatIsBuilding lib) +- if(${arg_prefix} STREQUAL "debug") ++ if(arg_prefix STREQUAL "debug") + target_link_libraries(${whatIsBuilding} debug ${lib}) +- elseif(${arg_prefix} STREQUAL "optimized") ++ elseif(arg_prefix STREQUAL "optimized") + target_link_libraries(${whatIsBuilding} optimized ${lib}) +- elseif(${arg_prefix} STREQUAL "general") ++ elseif(arg_prefix STREQUAL "general") + target_link_libraries(${whatIsBuilding} general ${lib}) + else() + target_link_libraries(${whatIsBuilding} ${lib}) +@@ -43,13 +43,13 @@ function(windows_unittests_add_dll whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -57,7 +57,7 @@ function(windows_unittests_add_dll whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) +@@ -90,13 +90,13 @@ function(windows_unittests_add_exe whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -104,7 +104,7 @@ function(windows_unittests_add_exe whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -150,14 +150,14 @@ function(linux_unittests_add_exe whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + set(skip_to_next TRUE) + #also unset all the other states + +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -165,7 +165,7 @@ function(linux_unittests_add_exe whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -184,7 +184,7 @@ function(linux_unittests_add_exe whatIsBuilding) + + if(${run_valgrind}) + find_program(VALGRIND_FOUND NAMES valgrind) +- if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) ++ if(VALGRIND_FOUND STREQUAL VALGRIND_FOUND-NOTFOUND) + message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") + else() + add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) +@@ -307,13 +307,13 @@ function(c_windows_unittests_add_dll whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -321,7 +321,7 @@ function(c_windows_unittests_add_dll whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) +@@ -369,13 +369,13 @@ function(c_windows_unittests_add_exe whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -383,7 +383,7 @@ function(c_windows_unittests_add_exe whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -429,13 +429,13 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -443,7 +443,7 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -462,7 +462,7 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + + if(${run_valgrind}) + find_program(VALGRIND_FOUND NAMES valgrind) +- if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) ++ if(VALGRIND_FOUND STREQUAL VALGRIND_FOUND-NOTFOUND) + message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") + else() + add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --gen-suppressions=all --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) +@@ -546,29 +546,29 @@ function(compile_c_test_artifacts_as whatIsBuilding compileAsWhat) + (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) + ) + if (${use_cppunittest}) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_dll) + compileTargetAsC99(${whatIsBuilding}_testsonly_lib) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_dll) + compileTargetAsC11(${whatIsBuilding}_testsonly_lib) + endif() + endif() +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + else() + if( + (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${nuget_e2e_tests}) + ) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + else() +@@ -581,10 +581,10 @@ function(compile_c_test_artifacts_as whatIsBuilding compileAsWhat) + (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR + (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) + ) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + endif() +@@ -641,15 +641,15 @@ function(set_platform_files c_shared_dir) + set(CONDITION_C_FILE ${c_shared_dir}/adapters/condition_win32.c PARENT_SCOPE) + endif() + +- if(${use_etw} STREQUAL "OFF") ++ if(use_etw STREQUAL "OFF") + set(XLOGGING_C_FILE ${c_shared_dir}/src/xlogging.c PARENT_SCOPE) + set(LOGGING_C_FILE ${c_shared_dir}/src/consolelogger.c PARENT_SCOPE) + set(LOGGING_H_FILE ${c_shared_dir}/inc/azure_c_shared_utility/consolelogger.h PARENT_SCOPE) +- elseif(${use_etw} STREQUAL "TRACELOGGING") ++ elseif(use_etw STREQUAL "TRACELOGGING") + set(XLOGGING_C_FILE ${c_shared_dir}/src/etwxlogging.c PARENT_SCOPE) + set(LOGGING_C_FILE ${c_shared_dir}/src/etwlogger_driver.c PARENT_SCOPE) + set(LOGGING_H_FILE ${c_shared_dir}/inc/azure_c_shared_utility/etwlogger_driver.h PARENT_SCOPE) +- elseif(${use_etw} STREQUAL "TRACELOGGING_WITH_CONSOLE") ++ elseif(use_etw STREQUAL "TRACELOGGING_WITH_CONSOLE") + set(XLOGGING_C_FILE ${c_shared_dir}/src/etwxlogging.c PARENT_SCOPE) + set(LOGGING_C_FILE ${c_shared_dir}/src/etwlogger_driver.c ${c_shared_dir}/src/consolelogger.c PARENT_SCOPE) + set(LOGGING_H_FILE ${c_shared_dir}/inc/azure_c_shared_utility/etwlogger_driver.h ${c_shared_dir}/inc/azure_c_shared_utility/consolelogger.h PARENT_SCOPE) diff --git a/ports/azure-c-shared-utility/no-double-expand-cmake.patch b/ports/azure-c-shared-utility/no-double-expand-cmake.patch deleted file mode 100644 index 3775ad6b513d26..00000000000000 --- a/ports/azure-c-shared-utility/no-double-expand-cmake.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 190ea87..a434cee 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -264,7 +264,7 @@ if(${use_applessl}) - include_directories(./pal/ios-osx/) - endif() - --if (WIN32 AND (${CMAKE_SYSTEM_VERSION} VERSION_EQUAL "10.0.17763.0" OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "10.0.17763.0")) -+if (WIN32 AND (CMAKE_SYSTEM_VERSION VERSION_EQUAL "10.0.17763.0" OR CMAKE_SYSTEM_VERSION VERSION_GREATER "10.0.17763.0")) - # Windows added support for UNIX domain sockets to the OS and SDK - # in the Oct 2018 update (10.0.17763.0, aka RS5) - add_definitions(-DAF_UNIX_ON_WINDOWS) diff --git a/ports/azure-c-shared-utility/portfile.cmake b/ports/azure-c-shared-utility/portfile.cmake index c43bf4451348e4..7bdb50aa127ccd 100644 --- a/ports/azure-c-shared-utility/portfile.cmake +++ b/ports/azure-c-shared-utility/portfile.cmake @@ -1,4 +1,4 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) @@ -6,19 +6,23 @@ if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-c-shared-utility - REF f0642196af85aeb4f2717d9cc11176290f321fb8 - SHA512 fd8ee6e2be11c13f7388e57eb9c98397b6cb026ca370131db55b6118908701cdff2a1eaabb89bfe84591d6ee17163d06b7b86ad615216203bcbf0c8595d45452 + REF 42574842914591aadc77701aac72f18cc72319ad + SHA512 dfe6ccede4bebdb3a39fbfea1dc55ddca57cced0d2656ee4bed1a5e5c9c434e1f2d892eb4e29bbb424cb9a02f2374a95fb9a020442bea580d39c242efad1b789 HEAD_REF master - PATCHES no-double-expand-cmake.patch + PATCHES + fix-utilityFunctions-conditions-preview.patch + disable-error.patch ) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-c-shared-utility - REF f0642196af85aeb4f2717d9cc11176290f321fb8 - SHA512 fd8ee6e2be11c13f7388e57eb9c98397b6cb026ca370131db55b6118908701cdff2a1eaabb89bfe84591d6ee17163d06b7b86ad615216203bcbf0c8595d45452 + REF 73a2039cc0de5ececf5755ebe731a6b5b98f85da + SHA512 6374b7b175a5c0206bee148c35eb6a3a79f1b149e87d2b51981a9fd1446809134a1aa0f28f4acf1318719ac5554f7bd8de225a5dca63eb6537012aed6b10e4cc HEAD_REF master - PATCHES no-double-expand-cmake.patch + PATCHES + fix-utilityFunctions-conditions.patch + disable-error.patch ) endif() @@ -38,9 +42,8 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_c_shared_uti file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/configs/azure_iot_build_rules.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility) +file(COPY ${SOURCE_PATH}/configs/azure_iot_build_rules.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) vcpkg_copy_pdbs() - diff --git a/ports/azure-c-shared-utility/vcpkg.json b/ports/azure-c-shared-utility/vcpkg.json new file mode 100644 index 00000000000000..7fa90c73e2cf17 --- /dev/null +++ b/ports/azure-c-shared-utility/vcpkg.json @@ -0,0 +1,46 @@ +{ + "name": "azure-c-shared-utility", + "version-date": "2021-09-09", + "description": "Azure C SDKs common code", + "homepage": "https://github.com/Azure/azure-c-shared-utility", + "supports": "!uwp", + "dependencies": [ + "azure-macro-utils-c", + { + "name": "curl", + "platform": "linux" + }, + { + "name": "openssl", + "platform": "linux" + }, + "umock-c" + ], + "features": { + "public-preview": { + "description": "Azure C SDKs common code (public preview)", + "dependencies": [ + { + "name": "azure-macro-utils-c", + "features": [ + "public-preview" + ] + }, + { + "name": "curl", + "platform": "linux" + }, + { + "name": "openssl", + "platform": "linux" + }, + { + "name": "umock-c", + "features": [ + "public-preview" + ] + } + ] + } + } +} diff --git a/ports/azure-core-cpp/portfile.cmake b/ports/azure-core-cpp/portfile.cmake new file mode 100644 index 00000000000000..2a5471e3e1d012 --- /dev/null +++ b/ports/azure-core-cpp/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-core_1.2.1 + SHA512 3628c4845eb1a842a06339a606fba8ae127f3744a097cc3ecd7552a052b9c932e0a008f8654a4affde68c483be38678a1728bf19d644c6ee04b2cd34f1513b32 +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + curl BUILD_TRANSPORT_CURL + winhttp BUILD_TRANSPORT_WINHTTP +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/core/azure-core/ + OPTIONS + ${FEATURE_OPTIONS} + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-core-cpp/vcpkg.json b/ports/azure-core-cpp/vcpkg.json new file mode 100644 index 00000000000000..b2dd3697330fb1 --- /dev/null +++ b/ports/azure-core-cpp/vcpkg.json @@ -0,0 +1,75 @@ +{ + "name": "azure-core-cpp", + "version-semver": "1.2.1", + "description": [ + "Microsoft Azure Core SDK for C++", + "This library provides shared primitives, abstractions, and helpers for modern Azure SDK client libraries written in the C++." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/core/azure-core", + "license": "MIT", + "dependencies": [ + { + "name": "openssl", + "platform": "!windows & !uwp" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "http" + ], + "features": { + "curl": { + "description": "Libcurl HTTP transport implementation", + "dependencies": [ + { + "name": "azure-core-cpp", + "default-features": false + }, + { + "name": "curl", + "default-features": false, + "features": [ + "ssl" + ] + } + ] + }, + "http": { + "description": "All HTTP transport implementations available on the platform", + "dependencies": [ + { + "name": "azure-core-cpp", + "default-features": false, + "features": [ + "curl" + ] + }, + { + "name": "azure-core-cpp", + "default-features": false, + "features": [ + "curl", + "winhttp" + ], + "platform": "windows & !uwp" + } + ] + }, + "winhttp": { + "description": "WinHTTP HTTP transport implementation", + "dependencies": [ + { + "name": "azure-core-cpp", + "default-features": false + } + ] + } + } +} diff --git a/ports/azure-identity-cpp/portfile.cmake b/ports/azure-identity-cpp/portfile.cmake new file mode 100644 index 00000000000000..417698981c134a --- /dev/null +++ b/ports/azure-identity-cpp/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-identity_1.1.0 + SHA512 83893ae2bc5edf7d63615e6017ea0474e9c620171e9320dabbe41d40b5659dca4f6d8a10599ec02054b2d3265eebfbd419ceab43669ba5ba0e04e72a38297a07 +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/identity/azure-identity/ + OPTIONS + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-identity-cpp/vcpkg.json b/ports/azure-identity-cpp/vcpkg.json new file mode 100644 index 00000000000000..ec0ea4dbb02bee --- /dev/null +++ b/ports/azure-identity-cpp/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "azure-identity-cpp", + "version-semver": "1.1.0", + "description": [ + "Microsoft Azure Identity SDK for C++", + "This library provides common authentication-related abstractions for Azure SDK." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/identity/azure-identity", + "license": "MIT", + "dependencies": [ + { + "name": "azure-core-cpp", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/azure-iot-sdk-c/CONTROL b/ports/azure-iot-sdk-c/CONTROL deleted file mode 100644 index 8cebc06013dfe8..00000000000000 --- a/ports/azure-iot-sdk-c/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: azure-iot-sdk-c -Version: 2019-07-01.1 -Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson, azure-uhttp-c, azure-macro-utils-c, umock-c -Description: A C99 SDK for connecting devices to Microsoft Azure IoT services - -Feature: public-preview -Description: A version of the azure-iot-sdk-c containing public-preview features. -Build-Depends: azure-uamqp-c[public-preview], azure-umqtt-c[public-preview], azure-c-shared-utility[public-preview], azure-uhttp-c[public-preview], azure-macro-utils-c, umock-c diff --git a/ports/azure-iot-sdk-c/fix-cmake.patch b/ports/azure-iot-sdk-c/fix-cmake.patch new file mode 100644 index 00000000000000..b75b4ca7c86e35 --- /dev/null +++ b/ports/azure-iot-sdk-c/fix-cmake.patch @@ -0,0 +1,40 @@ +diff --git a/provisioning_client/CMakeLists.txt b/provisioning_client/CMakeLists.txt +index c39188dca..d4ef43cb3 100644 +--- a/provisioning_client/CMakeLists.txt ++++ b/provisioning_client/CMakeLists.txt +@@ -359,7 +359,7 @@ if(${use_installed_dependencies}) + set(CMAKE_INSTALL_LIBDIR "lib") + endif() + +- install(TARGETS ${provisioning_libs} EXPORT azure_prov_sdksTargets ++ install(TARGETS ${provisioning_libs} EXPORT azure_iot_sdksTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/../bin +@@ -374,26 +374,6 @@ if(${use_installed_dependencies}) + VERSION ${PROV_SDK_VERSION} + COMPATIBILITY SameMajorVersion + ) +- +- configure_file("../configs/${PROJECT_NAME}Config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" +- COPYONLY +- ) +- +- install(EXPORT azure_prov_sdksTargets +- FILE +- "${PROJECT_NAME}Targets.cmake" +- DESTINATION +- ${package_location} +- ) +- +- install( +- FILES +- "../configs/${PROJECT_NAME}Config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" +- DESTINATION +- ${package_location} +- ) + else() + # Install Provisioning libs + if(NOT DEFINED CMAKE_INSTALL_LIBDIR) diff --git a/ports/azure-iot-sdk-c/portfile.cmake b/ports/azure-iot-sdk-c/portfile.cmake index 290dc304b62267..8e6043d9283b29 100644 --- a/ports/azure-iot-sdk-c/portfile.cmake +++ b/ports/azure-iot-sdk-c/portfile.cmake @@ -1,39 +1,50 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-iot-sdk-c - REF f3f9538960d9b29033e52522dd63e985ba970504 - SHA512 f8ce98d62425da4bec1c9e99b7b662a615d90a9407e03f7ce31a56fb8848f6bda1a39156bbabf351383e490dc3438d842136220dcf08efb1560e21d9ac76a0ba + REF cb2e8d390df56ffa31d08ca0a79ab58ff96160cc + SHA512 6798b17d6768b3ccbd0eb66719b50f364cd951736eb71110e2dc9deca054a1566ff88b9e8c5e9b52536e4308cad6cd3cbebff3282c123083e3afaee5535e724b HEAD_REF public-preview - PATCHES improve-external-deps.patch + PATCHES + improve-external-deps.patch + fix-cmake.patch + remove-werror.patch ) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-iot-sdk-c - REF b03cc5e0afb647934e45d4530d3e993476db3d3e - SHA512 7428c625dbacfd9ab612d5bbfad3c079074cd3834fe84a42db88e747aab2615140c0ca3035adc36b29ed8cf4bf487360522215ce03cee3e26254af925a68384a + REF 808a5595f98853a5f2eae2c67dd9b3608a2338ea + SHA512 29cb04679b75a48a8a69713045465c7c416755764ec80781405c8528abd8225654c3262ed3816fb03a13f7505f6c811afbdc5dabc79b676b4f727feaf11e0583 HEAD_REF master - PATCHES improve-external-deps.patch + PATCHES + improve-external-deps.patch + fix-cmake.patch + remove-werror.patch ) endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + use-prov-client hsm_type_symm_key + use-prov-client use_prov_client +) + file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/) file(COPY ${SOURCE_PATH}/configs/azure_iot_sdksFunctions.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmake/azure_iot_sdks/) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} -Dskip_samples=ON -Duse_installed_dependencies=ON -Duse_default_uuid=ON -Dbuild_as_dynamic=OFF -Duse_edge_modules=ON + -Dwarnings_as_errors=OFF ) vcpkg_install_cmake() @@ -42,7 +53,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_iot_sdks) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-iot-sdk-c/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) vcpkg_copy_pdbs() - diff --git a/ports/azure-iot-sdk-c/remove-werror.patch b/ports/azure-iot-sdk-c/remove-werror.patch new file mode 100644 index 00000000000000..694ae7929e89af --- /dev/null +++ b/ports/azure-iot-sdk-c/remove-werror.patch @@ -0,0 +1,18 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,14 +34,11 @@ + if (MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4232") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /wd4232") + # Make warning as error +- add_definitions(/WX) + else() + # Make warning as error +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + endif() + + IF(WIN32) + # windows needs this define + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + diff --git a/ports/azure-iot-sdk-c/vcpkg.json b/ports/azure-iot-sdk-c/vcpkg.json new file mode 100644 index 00000000000000..a04e188d8745c1 --- /dev/null +++ b/ports/azure-iot-sdk-c/vcpkg.json @@ -0,0 +1,61 @@ +{ + "name": "azure-iot-sdk-c", + "version-date": "2021-09-09", + "description": "A C99 SDK for connecting devices to Microsoft Azure IoT services", + "homepage": "https://github.com/Azure/azure-iot-sdk-c", + "dependencies": [ + "azure-c-shared-utility", + "azure-macro-utils-c", + "azure-uamqp-c", + "azure-uhttp-c", + "azure-umqtt-c", + "parson", + "umock-c" + ], + "features": { + "public-preview": { + "description": "A version of the azure-iot-sdk-c containing public-preview features.", + "dependencies": [ + { + "name": "azure-c-shared-utility", + "features": [ + "public-preview" + ] + }, + { + "name": "azure-macro-utils-c", + "features": [ + "public-preview" + ] + }, + { + "name": "azure-uamqp-c", + "features": [ + "public-preview" + ] + }, + { + "name": "azure-uhttp-c", + "features": [ + "public-preview" + ] + }, + { + "name": "azure-umqtt-c", + "features": [ + "public-preview" + ] + }, + { + "name": "umock-c", + "features": [ + "public-preview" + ] + } + ] + }, + "use-prov-client": { + "description": "Enables device provisioning client for DPS" + } + } +} diff --git a/ports/azure-kinect-sensor-sdk/fix-builds.patch b/ports/azure-kinect-sensor-sdk/fix-builds.patch new file mode 100644 index 00000000000000..750667eef279b8 --- /dev/null +++ b/ports/azure-kinect-sensor-sdk/fix-builds.patch @@ -0,0 +1,618 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4f002b5..d48f3f2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,8 +27,6 @@ option(K4A_BUILD_DOCS "Build K4A doxygen documentation" OFF) + option(K4A_MTE_VERSION "Skip FW version check" OFF) + option(K4A_SOURCE_LINK "Enable source linking on MSVC" OFF) + +-include(GitCommands) +- + # Set the project version + include(K4AProjectVersion) + +@@ -100,6 +98,43 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL + set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) + endif() + ++find_package(azure_c_shared_utility CONFIG REQUIRED) ++find_package(glfw3 CONFIG REQUIRED) ++find_package(cJSON CONFIG REQUIRED) ++find_package(GTest CONFIG REQUIRED) ++find_package(imgui CONFIG REQUIRED) ++find_package(EBML CONFIG REQUIRED) ++find_path(TURBOJPEG_INCLUDE_DIR NAMES turbojpeg.h PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" NO_DEFAULT_PATH REQUIRED) ++find_library(TURBOJPEG_LIBRARY_RELEASE NAMES turbojpeg PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH REQUIRED) ++add_library(libjpeg-turbo::libjpeg-turbo UNKNOWN IMPORTED) ++set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TURBOJPEG_INCLUDE_DIR}) ++set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY IMPORTED_LOCATION_RELEASE ${TURBOJPEG_LIBRARY_RELEASE}) ++if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib") ++ find_library(TURBOJPEG_LIBRARY_DEBUG NAMES turbojpeg PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH REQUIRED) ++ set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY IMPORTED_LOCATION_DEBUG ${TURBOJPEG_LIBRARY_DEBUG}) ++endif() ++find_package(Matroska CONFIG REQUIRED) ++add_definitions(-DMATROSKA_VERSION=2) ++find_package(libsoundio CONFIG REQUIRED) ++if (NOT WIN32) ++ find_package(libusb CONFIG REQUIRED) ++ find_package(libuvc CONFIG REQUIRED) ++ add_library(libuvc::libuvc ALIAS LibUVC::UVCStatic) ++ find_package(OpenSSL REQUIRED) ++ find_package(ZLIB REQUIRED) ++else() ++ find_library(LibUSB libusb-1.0 REQUIRED) ++endif() ++find_package(libyuv CONFIG REQUIRED) ++find_package(spdlog CONFIG REQUIRED) ++if (BUILD_TOOLS) ++ find_package(gl3w CONFIG REQUIRED) ++endif() ++# Fix embl error ++if ("MSVC") ++add_compile_options(/wd4828 /wd4251 /wd4275) ++endif() ++ + # Find all dependencies + add_subdirectory(extern) + +@@ -161,10 +196,16 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") + endif() + endif() + +-add_subdirectory(examples) +-add_subdirectory(src) +-add_subdirectory(tests) +-add_subdirectory(tools) ++if (BUILD_EXAMPLES) ++ add_subdirectory(examples) ++endif() ++ add_subdirectory(src) ++if (WITH_TEST) ++ add_subdirectory(tests) ++endif() ++if (BUILD_TOOLS) ++ add_subdirectory(tools) ++endif() + + if (K4A_BUILD_DOCS) + find_package(Doxygen 1.8.14 EXACT) +diff --git a/examples/viewer/opengl/CMakeLists.txt b/examples/viewer/opengl/CMakeLists.txt +index 166fe2a..a3db07f 100644 +--- a/examples/viewer/opengl/CMakeLists.txt ++++ b/examples/viewer/opengl/CMakeLists.txt +@@ -14,6 +14,6 @@ add_executable(viewer_opengl + + target_link_libraries(viewer_opengl PRIVATE + k4a::k4a +- glfw::glfw ++ glfw + imgui::imgui + ${OPENGL_LIBRARIES}) +\ No newline at end of file +diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt +index cb4f7b4..3d00084 100644 +--- a/extern/CMakeLists.txt ++++ b/extern/CMakeLists.txt +@@ -1,7 +1,6 @@ + # External dependencies are pulled in via submodules. Lets make sure the user + # has updated all the submodules +-if ((NOT K4A_TURNED_ON_GIT_SUBMODULES_RECURSE) OR +- (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/azure_c_shared/src/CMakeLists.txt")) ++if (0) + find_package(Git REQUIRED QUIET) + if (Git_FOUND) + get_git_dir(${K4A_SOURCE_DIR} GIT_DIR) +@@ -57,18 +56,4 @@ endif() + # lower than CMake 3.3 + set(CMAKE_POLICY_DEFAULT_CMP0063 NEW) + +-add_subdirectory(azure_c_shared) +-add_subdirectory(cjson) +-add_subdirectory(glfw) +-add_subdirectory(googletest) +-add_subdirectory(imgui) +-add_subdirectory(libebml) +-add_subdirectory(libjpeg-turbo) +-add_subdirectory(libmatroska) +-add_subdirectory(libsoundio) +-add_subdirectory(libyuv) +-add_subdirectory(libuvc) +-add_subdirectory(spdlog) +-if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") +- add_subdirectory(libusb) +-endif() ++ +diff --git a/src/allocator/CMakeLists.txt b/src/allocator/CMakeLists.txt +index 7140274..3bb6747 100644 +--- a/src/allocator/CMakeLists.txt ++++ b/src/allocator/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_allocator PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_allocator PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::image + k4ainternal::logging) + +diff --git a/src/calibration/CMakeLists.txt b/src/calibration/CMakeLists.txt +index e96b7d0..ed69f41 100644 +--- a/src/calibration/CMakeLists.txt ++++ b/src/calibration/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_calibration PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_calibration PUBLIC +- cJSON::cJSON ++ cjson + k4ainternal::logging) + + # Define alias for other targets to link against +diff --git a/src/calibration/calibration.c b/src/calibration/calibration.c +index bf5f34a..d37c4e6 100644 +--- a/src/calibration/calibration.c ++++ b/src/calibration/calibration.c +@@ -6,7 +6,7 @@ + + // Dependent libraries + #include +-#include ++#include + #include //cJSON.h need this set correctly. + + // System dependencies +diff --git a/src/capturesync/CMakeLists.txt b/src/capturesync/CMakeLists.txt +index a434593..bcb19ba 100644 +--- a/src/capturesync/CMakeLists.txt ++++ b/src/capturesync/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_capturesync PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_capturesync PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::logging) + + # Define alias for other targets to link against +diff --git a/src/dewrapper/CMakeLists.txt b/src/dewrapper/CMakeLists.txt +index 2756e43..f736fd1 100644 +--- a/src/dewrapper/CMakeLists.txt ++++ b/src/dewrapper/CMakeLists.txt +@@ -10,7 +10,7 @@ target_include_directories(k4a_dewrapper PUBLIC + ${K4A_PRIV_INCLUDE_DIR}) + + target_link_libraries(k4a_dewrapper PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::allocator + k4ainternal::calibration + k4ainternal::logging +diff --git a/src/image/CMakeLists.txt b/src/image/CMakeLists.txt +index c40999b..82406e2 100644 +--- a/src/image/CMakeLists.txt ++++ b/src/image/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_image PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_image PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::allocator + k4ainternal::logging) + +diff --git a/src/logging/CMakeLists.txt b/src/logging/CMakeLists.txt +index cbf0e4d..ca81c41 100644 +--- a/src/logging/CMakeLists.txt ++++ b/src/logging/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_logging PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_logging PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + spdlog::spdlog + k4ainternal::rwlock + k4ainternal::global +diff --git a/src/logging/logging.cpp b/src/logging/logging.cpp +index 05264c5..41185de 100644 +--- a/src/logging/logging.cpp ++++ b/src/logging/logging.cpp +@@ -24,6 +24,9 @@ + #pragma warning(disable : 4702) + #endif + #include ++#include ++#include ++#include + #ifdef _MSC_VER + #pragma warning(default : 4702) + #endif +diff --git a/src/queue/CMakeLists.txt b/src/queue/CMakeLists.txt +index 03d15f4..a42a135 100644 +--- a/src/queue/CMakeLists.txt ++++ b/src/queue/CMakeLists.txt +@@ -10,7 +10,7 @@ target_include_directories(k4a_queue PUBLIC + ${K4A_PRIV_INCLUDE_DIR}) + + target_link_libraries(k4a_queue PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::allocator + k4ainternal::logging + ) +diff --git a/src/record/internal/CMakeLists.txt b/src/record/internal/CMakeLists.txt +index 97c6cf3..e9f5b1a 100644 +--- a/src/record/internal/CMakeLists.txt ++++ b/src/record/internal/CMakeLists.txt +@@ -22,16 +22,16 @@ target_include_directories(k4a_playback PUBLIC + target_link_libraries(k4a_record PUBLIC + k4a::k4a + k4ainternal::logging +- ebml::ebml +- matroska::matroska ++ EBML::ebml ++ Matroska::matroska + ) + + target_link_libraries(k4a_playback PUBLIC + k4a::k4a + k4ainternal::logging +- ebml::ebml +- matroska::matroska +- libyuv::libyuv ++ EBML::ebml ++ Matroska::matroska ++ yuv + libjpeg-turbo::libjpeg-turbo + ) + +diff --git a/src/record/sdk/CMakeLists.txt b/src/record/sdk/CMakeLists.txt +index 2e23295..d150e70 100644 +--- a/src/record/sdk/CMakeLists.txt ++++ b/src/record/sdk/CMakeLists.txt +@@ -40,8 +40,8 @@ target_link_libraries(k4arecord PRIVATE + k4ainternal::record + k4ainternal::playback + k4ainternal::logging +- ebml::ebml +- matroska::matroska ++ EBML::ebml ++ Matroska::matroska + ) + + target_link_libraries(k4arecord PUBLIC +diff --git a/src/tewrapper/CMakeLists.txt b/src/tewrapper/CMakeLists.txt +index e4a696e..6ee6696 100644 +--- a/src/tewrapper/CMakeLists.txt ++++ b/src/tewrapper/CMakeLists.txt +@@ -10,7 +10,7 @@ target_include_directories(k4a_tewrapper PUBLIC + ${K4A_PRIV_INCLUDE_DIR}) + + target_link_libraries(k4a_tewrapper PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::logging + k4ainternal::deloader) + +diff --git a/src/usbcommand/CMakeLists.txt b/src/usbcommand/CMakeLists.txt +index f75bd55..5403216 100644 +--- a/src/usbcommand/CMakeLists.txt ++++ b/src/usbcommand/CMakeLists.txt +@@ -12,8 +12,8 @@ target_include_directories(k4a_usb_cmd PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_usb_cmd PUBLIC +- azure::aziotsharedutil +- LibUSB::LibUSB ++ aziotsharedutil ++ ${LibUSB} + k4ainternal::allocator + k4ainternal::image + k4ainternal::logging) +diff --git a/src/usbcommand/usb_cmd_priv.h b/src/usbcommand/usb_cmd_priv.h +index 0aa502c..0405b58 100644 +--- a/src/usbcommand/usb_cmd_priv.h ++++ b/src/usbcommand/usb_cmd_priv.h +@@ -20,7 +20,7 @@ + #include + + // Exteranl dependencis +-#include ++#include + + // Ensure we have LIBUSB_API_VERSION defined if not defined by libusb.h + #ifndef LIBUSB_API_VERSION +diff --git a/tests/Calibration/CMakeLists.txt b/tests/Calibration/CMakeLists.txt +index ea6a9dd..c107269 100644 +--- a/tests/Calibration/CMakeLists.txt ++++ b/tests/Calibration/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(calibration_ut calibration.cpp) + + target_link_libraries(calibration_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::calibration + k4ainternal::utcommon) + +diff --git a/tests/CaptureSync/CMakeLists.txt b/tests/CaptureSync/CMakeLists.txt +index 0a9a8e2..f7bff42 100644 +--- a/tests/CaptureSync/CMakeLists.txt ++++ b/tests/CaptureSync/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(capturesync_ut capturesync.cpp) + + target_link_libraries(capturesync_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::allocator + k4ainternal::capturesync + k4ainternal::image +diff --git a/tests/ColorTests/FunctionalTest/CMakeLists.txt b/tests/ColorTests/FunctionalTest/CMakeLists.txt +index 1e65ad7..709dfb0 100644 +--- a/tests/ColorTests/FunctionalTest/CMakeLists.txt ++++ b/tests/ColorTests/FunctionalTest/CMakeLists.txt +@@ -6,7 +6,7 @@ add_executable(color_ft color_ft.cpp) + target_link_libraries(color_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest +- azure::aziotsharedutil) ++ GTest::gtest ++ aziotsharedutil) + + k4a_add_tests(TARGET color_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/DepthTests/FunctionalTest/CMakeLists.txt b/tests/DepthTests/FunctionalTest/CMakeLists.txt +index 469c125..00f15f8 100644 +--- a/tests/DepthTests/FunctionalTest/CMakeLists.txt ++++ b/tests/DepthTests/FunctionalTest/CMakeLists.txt +@@ -6,7 +6,7 @@ add_executable(depth_ft depth_ft.cpp) + target_link_libraries(depth_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest +- azure::aziotsharedutil) ++ GTest::gtest ++ aziotsharedutil) + + k4a_add_tests(TARGET depth_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/ExternLibraries/azure_c_shared/CMakeLists.txt b/tests/ExternLibraries/azure_c_shared/CMakeLists.txt +index a487cde..44170f4 100644 +--- a/tests/ExternLibraries/azure_c_shared/CMakeLists.txt ++++ b/tests/ExternLibraries/azure_c_shared/CMakeLists.txt +@@ -6,7 +6,7 @@ add_executable(azure_c_shared_test + threading.cpp) + + target_link_libraries(azure_c_shared_test PRIVATE +- azure::aziotsharedutil +- gtest::gtest) ++ aziotsharedutil ++ GTest::gtest) + + k4a_add_tests(TARGET azure_c_shared_test TEST_TYPE UNIT) +diff --git a/tests/IMUTests/FunctionalTest/CMakeLists.txt b/tests/IMUTests/FunctionalTest/CMakeLists.txt +index cc6b3c2..d8762f6 100644 +--- a/tests/IMUTests/FunctionalTest/CMakeLists.txt ++++ b/tests/IMUTests/FunctionalTest/CMakeLists.txt +@@ -6,7 +6,7 @@ add_executable(imu_ft imu_ft.cpp) + target_link_libraries(imu_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest +- azure::aziotsharedutil) ++ GTest::gtest ++ aziotsharedutil) + + k4a_add_tests(TARGET imu_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/Transformation/CMakeLists.txt b/tests/Transformation/CMakeLists.txt +index 7f11a2f..c4ddaf8 100644 +--- a/tests/Transformation/CMakeLists.txt ++++ b/tests/Transformation/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(transformation_ut transformation.cpp) + + target_link_libraries(transformation_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::image + k4ainternal::transformation + k4ainternal::utcommon +diff --git a/tests/UnitTests/allocator_ut/CMakeLists.txt b/tests/UnitTests/allocator_ut/CMakeLists.txt +index 913a7d8..0b7baeb 100644 +--- a/tests/UnitTests/allocator_ut/CMakeLists.txt ++++ b/tests/UnitTests/allocator_ut/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(allocator_ut allocator.cpp) + + target_link_libraries(allocator_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::allocator + k4ainternal::image + k4ainternal::utcommon) +diff --git a/tests/UnitTests/dynlib_ut/CMakeLists.txt b/tests/UnitTests/dynlib_ut/CMakeLists.txt +index fbecc17..af73be2 100644 +--- a/tests/UnitTests/dynlib_ut/CMakeLists.txt ++++ b/tests/UnitTests/dynlib_ut/CMakeLists.txt +@@ -34,7 +34,7 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + endif() + + target_link_libraries(dynlib_ut PRIVATE +- gtest::gtest ++ GTest::gtest + k4ainternal::dynlib + k4ainternal::utcommon) + +diff --git a/tests/UnitTests/queue_ut/CMakeLists.txt b/tests/UnitTests/queue_ut/CMakeLists.txt +index cf9b040..ec4a024 100644 +--- a/tests/UnitTests/queue_ut/CMakeLists.txt ++++ b/tests/UnitTests/queue_ut/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(queue_ut queue.cpp) + + target_link_libraries(queue_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::allocator + k4ainternal::image + k4ainternal::queue +diff --git a/tests/UnitTests/utcommon/CMakeLists.txt b/tests/UnitTests/utcommon/CMakeLists.txt +index cca52c6..dfdd13d 100644 +--- a/tests/UnitTests/utcommon/CMakeLists.txt ++++ b/tests/UnitTests/utcommon/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_library(utcommon STATIC utcommon.cpp) + + target_link_libraries(utcommon PUBLIC +- gtest::gtest +- gtest::gmock ++ GTest::gtest ++ GTest::gmock + k4ainternal::logging + ) + +diff --git a/tests/example/CMakeLists.txt b/tests/example/CMakeLists.txt +index 3305a1a..be0b667 100644 +--- a/tests/example/CMakeLists.txt ++++ b/tests/example/CMakeLists.txt +@@ -3,6 +3,6 @@ + + add_executable(k4a_example_test test.cpp) + target_link_libraries(k4a_example_test PRIVATE k4a::k4a) +-target_link_libraries(k4a_example_test PRIVATE gtest::gtest) ++target_link_libraries(k4a_example_test PRIVATE GTest::gtest) + + k4a_add_tests(TARGET k4a_example_test HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/executables/CMakeLists.txt b/tests/executables/CMakeLists.txt +index 7b03d15..6c070ee 100644 +--- a/tests/executables/CMakeLists.txt ++++ b/tests/executables/CMakeLists.txt +@@ -17,12 +17,12 @@ target_compile_definitions(executables_ft_custom PRIVATE -DUSE_CUSTOM_TEST_CONFI + target_link_libraries(executables_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest) ++ GTest::gtest) + + target_link_libraries(executables_ft_custom PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest) ++ GTest::gtest) + + k4a_add_tests(TARGET executables_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) + k4a_add_tests(TARGET executables_ft_custom HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL_CUSTOM) +diff --git a/tests/global/CMakeLists.txt b/tests/global/CMakeLists.txt +index ea0a0e5..d85728d 100644 +--- a/tests/global/CMakeLists.txt ++++ b/tests/global/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(global_ft global.cpp) + + target_link_libraries(global_ft PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::global + k4ainternal::utcommon) + +diff --git a/tests/multidevice/CMakeLists.txt b/tests/multidevice/CMakeLists.txt +index 3fe044b..85f3058 100644 +--- a/tests/multidevice/CMakeLists.txt ++++ b/tests/multidevice/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(multidevice_ft multidevice.cpp) + + target_link_libraries(multidevice_ft PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4a::k4a + k4ainternal::utcommon) + +diff --git a/tests/projections/cpp/CMakeLists.txt b/tests/projections/cpp/CMakeLists.txt +index 2fdfa2c..09b5303 100644 +--- a/tests/projections/cpp/CMakeLists.txt ++++ b/tests/projections/cpp/CMakeLists.txt +@@ -6,6 +6,6 @@ add_executable(cpp_projection_ft cpp_projection_ft.cpp) + target_link_libraries(cpp_projection_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest) ++ GTest::gtest) + + k4a_add_tests(TARGET cpp_projection_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/rwlock/CMakeLists.txt b/tests/rwlock/CMakeLists.txt +index 5889435..c6c1f73 100644 +--- a/tests/rwlock/CMakeLists.txt ++++ b/tests/rwlock/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(rwlock_ft rwlock.cpp) + + target_link_libraries(rwlock_ft PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::rwlock + k4ainternal::utcommon) + +diff --git a/tests/throughput/CMakeLists.txt b/tests/throughput/CMakeLists.txt +index c544e1e..9489bf8 100644 +--- a/tests/throughput/CMakeLists.txt ++++ b/tests/throughput/CMakeLists.txt +@@ -6,8 +6,8 @@ add_executable(throughput_perf throughput_perf.cpp) + target_compile_definitions(throughput_perf PRIVATE _CRT_SECURE_NO_WARNINGS) + + target_link_libraries(throughput_perf PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4a::k4a + k4ainternal::logging + k4ainternal::utcommon) +diff --git a/tools/k4aviewer/CMakeLists.txt b/tools/k4aviewer/CMakeLists.txt +index 98578c0..6ab38d9 100644 +--- a/tools/k4aviewer/CMakeLists.txt ++++ b/tools/k4aviewer/CMakeLists.txt +@@ -60,10 +60,11 @@ set(EXTERNAL_LIBRARIES + imgui::imgui + libjpeg-turbo::libjpeg-turbo + libsoundio::libsoundio +- LibUSB::LibUSB +- libyuv::libyuv +- glfw::glfw ++ ${LibUSB} ++ yuv ++ glfw + ${OPENGL_LIBRARIES} ++ unofficial::gl3w::gl3w + ) + + # On Windows, we need to call into setupapi to get USB container ID information +diff --git a/tools/k4aviewer/k4aaudiomanager.cpp b/tools/k4aviewer/k4aaudiomanager.cpp +index 243c800..ef85d45 100644 +--- a/tools/k4aviewer/k4aaudiomanager.cpp ++++ b/tools/k4aviewer/k4aaudiomanager.cpp +@@ -11,7 +11,7 @@ + + // Library headers + // +-#include ++#include + + // Project headers + // diff --git a/ports/azure-kinect-sensor-sdk/fix-calibration-c.patch b/ports/azure-kinect-sensor-sdk/fix-calibration-c.patch new file mode 100644 index 00000000000000..59251912ae7a88 --- /dev/null +++ b/ports/azure-kinect-sensor-sdk/fix-calibration-c.patch @@ -0,0 +1,70 @@ +diff --git a/src/calibration/calibration.c b/src/calibration/calibration.c +index d37c4e6..ec477f5 100644 +--- a/src/calibration/calibration.c ++++ b/src/calibration/calibration.c +@@ -7,7 +7,6 @@ + // Dependent libraries + #include + #include +-#include //cJSON.h need this set correctly. + + // System dependencies + #include +@@ -637,27 +636,6 @@ k4a_result_t calibration_create_from_raw(char *raw_calibration, + + k4a_result_t result = K4A_RESULT_SUCCEEDED; + +-#ifdef _WIN32 +- int previous_thread_locale = -1; +- if (K4A_SUCCEEDED(result)) +- { +- previous_thread_locale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); +- result = K4A_RESULT_FROM_BOOL(previous_thread_locale == _ENABLE_PER_THREAD_LOCALE || +- previous_thread_locale == _DISABLE_PER_THREAD_LOCALE); +- } +- +- if (K4A_SUCCEEDED(result)) +- { +- result = K4A_RESULT_FROM_BOOL(setlocale(LC_ALL, "C") != NULL); +- } +- +-#else // NOT _WIN32 +- +- locale_t thread_locale = newlocale(LC_ALL_MASK, "C", (locale_t)0); +- locale_t previous_locale = uselocale(thread_locale); +- +-#endif +- + if (K4A_SUCCEEDED(result) && depth_calibration != NULL) + { + result = get_camera_calibration(raw_calibration, depth_calibration, "CALIBRATION_CameraLocationD0"); +@@ -680,29 +658,6 @@ k4a_result_t calibration_create_from_raw(char *raw_calibration, + "CALIBRATION_InertialSensorType_Accelerometer"); + } + +-#ifdef _WIN32 +- if (previous_thread_locale == _ENABLE_PER_THREAD_LOCALE || previous_thread_locale == _DISABLE_PER_THREAD_LOCALE) +- { +- if (K4A_FAILED(K4A_RESULT_FROM_BOOL(_configthreadlocale(previous_thread_locale) != -1))) +- { +- // Only set result to failed, don't let this call succeed and clear a failure that might have happened +- // already. +- result = K4A_RESULT_FAILED; +- } +- } +-#else // NOT _WIN32 +- if ((previous_locale != NULL) && (K4A_FAILED(K4A_RESULT_FROM_BOOL(uselocale(previous_locale) != NULL)))) +- { +- // Only set result to failed, don't let this call succeed and clear a failure that might have happened +- // already. +- result = K4A_RESULT_FAILED; +- } +- if (thread_locale) +- { +- freelocale(thread_locale); +- } +-#endif +- + return result; + } + diff --git a/ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch b/ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch new file mode 100644 index 00000000000000..543bfd2bb7c3a0 --- /dev/null +++ b/ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch @@ -0,0 +1,35 @@ +diff --git a/tools/k4aviewer/CMakeLists.txt b/tools/k4aviewer/CMakeLists.txt +index 6ab38d9..f31f570 100644 +--- a/tools/k4aviewer/CMakeLists.txt ++++ b/tools/k4aviewer/CMakeLists.txt +@@ -54,6 +54,8 @@ include_directories( + ${CMAKE_CURRENT_LIST_DIR} + ) + ++find_package(GLEW REQUIRED) ++ + set(EXTERNAL_LIBRARIES + k4a::k4a + k4a::k4arecord +@@ -65,6 +67,7 @@ set(EXTERNAL_LIBRARIES + glfw + ${OPENGL_LIBRARIES} + unofficial::gl3w::gl3w ++ GLEW::GLEW + ) + + # On Windows, we need to call into setupapi to get USB container ID information +diff --git a/tools/k4aviewer/k4asoundio_util.h b/tools/k4aviewer/k4asoundio_util.h +index c9c2718..011a76e 100644 +--- a/tools/k4aviewer/k4asoundio_util.h ++++ b/tools/k4aviewer/k4asoundio_util.h +@@ -16,7 +16,7 @@ + // This disables that behavior. + // + #define NOMINMAX +-#include ++#include + + // Project headers + // + \ No newline at end of file diff --git a/ports/azure-kinect-sensor-sdk/fix-linux.patch b/ports/azure-kinect-sensor-sdk/fix-linux.patch new file mode 100644 index 00000000000000..0dd8a15ae42cae --- /dev/null +++ b/ports/azure-kinect-sensor-sdk/fix-linux.patch @@ -0,0 +1,39 @@ +diff --git a/cmake/k4aCompilerFlags.cmake b/cmake/k4aCompilerFlags.cmake +index e938c907..ccea0a8e 100644 +--- a/cmake/k4aCompilerFlags.cmake ++++ b/cmake/k4aCompilerFlags.cmake +@@ -34,22 +34,16 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") + list(APPEND CLANG_ALL_WARNINGS "-Wno-extra-semi-stmt") # Allow semi-colons to be used after #define's + list(APPEND CLANG_ALL_WARNINGS "-Wno-atomic-implicit-seq-cst") # Allow use of __sync_add_and_fetch() atomic + endif() +- set(CLANG_WARNINGS_AS_ERRORS "-Werror") + add_compile_options(${CLANG_ALL_WARNINGS}) +- add_compile_options(${CLANG_WARNINGS_AS_ERRORS}) + elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") + set(GNU_ALL_WARNINGS "-Wall" "-Wextra") + list(APPEND GNU_ALL_WARNINGS "-Wno-missing-field-initializers") # Allow c structs without all fields initialized +- set(GNU_WARNINGS_AS_ERRORS "-Werror") + add_compile_options(${GNU_ALL_WARNINGS}) +- add_compile_options(${GNU_WARNINGS_AS_ERRORS}) + elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") + set(MSVC_ALL_WARNINGS "/W4" "/wd4200") #Note: allow zero length arrays +- set(MSVC_WARNINGS_AS_ERRORS "/WX") + string(REGEX REPLACE " /W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + string(REGEX REPLACE " /W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + add_compile_options(${MSVC_ALL_WARNINGS}) +- add_compile_options(${MSVC_WARNINGS_AS_ERRORS}) + else() + message(FATAL_ERROR "Unknown C++ compiler: ${CMAKE_CXX_COMPILER_ID}") + endif() +diff --git a/src/logging/logging.cpp b/src/logging/logging.cpp +index 05264c5f..6cd41d32 100644 +--- a/src/logging/logging.cpp ++++ b/src/logging/logging.cpp +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + // External dependencies + diff --git a/ports/azure-kinect-sensor-sdk/k4adeploy.ps1 b/ports/azure-kinect-sensor-sdk/k4adeploy.ps1 new file mode 100644 index 00000000000000..d6feb3b3285903 --- /dev/null +++ b/ports/azure-kinect-sensor-sdk/k4adeploy.ps1 @@ -0,0 +1,10 @@ +# Note: This function signature and behavior is depended upon by applocal.ps1 + +function deployAzureKinectSensorSDK([string]$targetBinaryDir, [string]$installedDir, [string]$targetBinaryName) { + if ($targetBinaryName -like "k4a.dll") { + if(Test-Path "$installedDir\tools\azure-kinect-sensor-sdk\depthengine_2_0.dll") { + Write-Verbose " Deploying Azure Kinect Sensor SDK Initialization" + deployBinary "$targetBinaryDir" "$installedDir\tools\azure-kinect-sensor-sdk\" "depthengine_2_0.dll" + } + } +} diff --git a/ports/azure-kinect-sensor-sdk/portfile.cmake b/ports/azure-kinect-sensor-sdk/portfile.cmake new file mode 100644 index 00000000000000..bffcf83e8fd725 --- /dev/null +++ b/ports/azure-kinect-sensor-sdk/portfile.cmake @@ -0,0 +1,97 @@ +set(VERSION 1.4.1) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/Azure-Kinect-Sensor-SDK + REF v${VERSION} + SHA512 ef94c072caae43b0a105b192013e09082d267d4064e6676fac981b52e7576a663f59fcb53f0afe66b425ef2cea0cb3aa224ff7be6485c0b5543ff9cdabd82d4d + HEAD_REF master + PATCHES + fix-builds.patch + fix-dependency-imgui.patch + fix-linux.patch + fix-calibration-c.patch +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + docs K4A_BUILD_DOCS + tool BUILD_TOOLS +) + +# .rc file needs windows.h, so do not use PREFER_NINJA here +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + OPTIONS ${FEATURE_OPTIONS} + -DK4A_SOURCE_LINK=OFF + -DK4A_MTE_VERSION=ON + -DBUILD_EXAMPLES=OFF + -DWITH_TEST=OFF + -DIMGUI_EXTERNAL_PATH=${CURRENT_INSTALLED_DIR}/include/bindings +) + +vcpkg_install_cmake() + +# Avoid deleting debug/lib/cmake when fixing the first cmake +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/debug/share) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/k4a TARGET_PATH share/k4a) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/k4arecord TARGET_PATH share/k4arecord) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if ("tool" IN_LIST FEATURES) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + file(GLOB AZURE_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(COPY ${AZURE_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${AZURE_TOOLS}) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(GLOB AZURE_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(REMOVE ${AZURE_TOOLS}) + endif() +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Install Depth Engine +vcpkg_download_distfile(ARCHIVE + URLS "https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.Sensor/${VERSION}" + FILENAME "azure-kinect-sensor-sdk_17630a00.zip" + SHA512 17630a00f4e9ff3ef68945b62021f6d0390030b43c120c207afe934075a7a87c5848be1f46f4c35c7ecd5698012452ffcbb67f739e9048857410ec7077e5e8c6 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH PACKAGE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(ARCHITECTURE "x86") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(ARCHITECTURE "amd64") +else () + message(FATAL_ERROR "this architecture is not supported.") +endif () + +if (VCPKG_TARGET_IS_LINUX) + file(COPY ${PACKAGE_PATH}/linux/lib/native/${VCPKG_TARGET_ARCHITECTURE}/release/libdepthengine.so.2.0 DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${PACKAGE_PATH}/linux/lib/native/${VCPKG_TARGET_ARCHITECTURE}/release/libdepthengine.so.2.0 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +else() + file(COPY ${PACKAGE_PATH}/lib/native/${ARCHITECTURE}/release/depthengine_2_0.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/azure-kinect-sensor-sdk) + file(COPY ${PACKAGE_PATH}/lib/native/${ARCHITECTURE}/release/depthengine_2_0.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/azure-kinect-sensor-sdk) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/k4adeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/azure-kinect-sensor-sdk) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/k4adeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/azure-kinect-sensor-sdk) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/azure-kinect-sensor-sdk/vcpkg.json b/ports/azure-kinect-sensor-sdk/vcpkg.json new file mode 100644 index 00000000000000..f20bbe2af61bf3 --- /dev/null +++ b/ports/azure-kinect-sensor-sdk/vcpkg.json @@ -0,0 +1,45 @@ +{ + "name": "azure-kinect-sensor-sdk", + "version": "1.4.1", + "port-version": 3, + "description": "Azure Kinect SDK is a cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.", + "homepage": "https://github.com/microsoft/Azure-Kinect-Sensor-SDK", + "supports": "linux & windows", + "dependencies": [ + "azure-c-shared-utility", + "cjson", + "ebml", + "glfw3", + "gtest", + "imgui", + "libjpeg-turbo", + "libsoundio", + "libusb", + { + "name": "libuvc", + "platform": "linux" + }, + "libyuv", + "matroska", + "spdlog" + ], + "features": { + "docs": { + "description": "Build K4A doxygen documentation." + }, + "tool": { + "description": "Build tools.", + "dependencies": [ + "gl3w", + "glew", + { + "name": "imgui", + "features": [ + "glfw-binding", + "opengl3-glew-binding" + ] + } + ] + } + } +} diff --git a/ports/azure-macro-utils-c/CONTROL b/ports/azure-macro-utils-c/CONTROL deleted file mode 100644 index 40aaa75fe9475c..00000000000000 --- a/ports/azure-macro-utils-c/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: azure-macro-utils-c -Version: 2019-05-16.1 -Description: A library of macros for the Azure IoT SDK Suite -Build-Depends: - diff --git a/ports/azure-macro-utils-c/portfile.cmake b/ports/azure-macro-utils-c/portfile.cmake index d516e59e9af5d4..225def8146bafd 100644 --- a/ports/azure-macro-utils-c/portfile.cmake +++ b/ports/azure-macro-utils-c/portfile.cmake @@ -1,14 +1,24 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Azure/azure-macro-utils-c - REF 38729b4b7ac3ea8b7d71e394782b861ecb25193e - SHA512 c9c820e74aee403d45f257359318d3435e5d6534afe821da5679bc462e26ad256dd01ed253a80ba1c58343f850ef1026280533a152c4b0465527f6537b3092d3 - HEAD_REF master -) +if("public-preview" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-macro-utils-c + REF 7523af934fc4d9423111e358f49b19314ec9c3e3 + SHA512 441d2420be319195ef50d0b03028e44c470adedc316dc338245cbc51ec2e78863cb42a9665d84a628056d212927abb5aeaf5c489e7c36b5257b16a28b3652e6e + HEAD_REF master + FILE_DISAMBIGUATOR 1 + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-macro-utils-c + REF 5926caf4e42e98e730e6d03395788205649a3ada + SHA512 8f9fd02012202db6cff5b647edbc8332a2c03963e80182a630af6a884f23df96b8e24d60e5412bfc2a0a7f43240a54f9597040aa28a9d3e1566755e1d52aac62 + HEAD_REF master + FILE_DISAMBIGUATOR 1 + ) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -28,5 +38,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-macro-utils-c/copyright COPYONLY) vcpkg_copy_pdbs() - - diff --git a/ports/azure-macro-utils-c/vcpkg.json b/ports/azure-macro-utils-c/vcpkg.json new file mode 100644 index 00000000000000..367a73a1746a22 --- /dev/null +++ b/ports/azure-macro-utils-c/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "azure-macro-utils-c", + "version-string": "2020-06-17", + "port-version": 3, + "description": "A library of macros for the Azure IoT SDK Suite", + "features": { + "public-preview": { + "description": "A library of macros for the Azure IoT SDK Suite (public-preview)" + } + } +} diff --git a/ports/azure-security-keyvault-common-cpp/portfile.cmake b/ports/azure-security-keyvault-common-cpp/portfile.cmake new file mode 100644 index 00000000000000..e0f4762f6539f1 --- /dev/null +++ b/ports/azure-security-keyvault-common-cpp/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-security-keyvault-common_4.0.0-beta.3 + SHA512 bdd5b59b8e1e53cde8df9b38881e067328e9b434cbf80cf63b2a0ef17e9e30c7b42c7439bb4ea47c412a566478c44364618b918af8139765d789101549f6062e +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/keyvault/azure-security-keyvault-common/ + PREFER_NINJA + OPTIONS + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-security-keyvault-common-cpp/vcpkg.json b/ports/azure-security-keyvault-common-cpp/vcpkg.json new file mode 100644 index 00000000000000..be5ed47776bda4 --- /dev/null +++ b/ports/azure-security-keyvault-common-cpp/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "azure-security-keyvault-common-cpp", + "version-semver": "4.0.0-beta.3", + "description": [ + "Microsoft Azure Common Key Vault SDK for C++", + "This library provides common Azure Key Vault related abstractions for Azure SDK." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/keyvault/azure-security-keyvault-common", + "license": "MIT", + "dependencies": [ + { + "name": "azure-core-cpp", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/azure-security-keyvault-keys-cpp/portfile.cmake b/ports/azure-security-keyvault-keys-cpp/portfile.cmake new file mode 100644 index 00000000000000..3852bb5ec4487d --- /dev/null +++ b/ports/azure-security-keyvault-keys-cpp/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-security-keyvault-keys_4.1.0 + SHA512 1292a7964a35ea97341f26e886f25a9ac11353105edcb45b074741564950f0bc7fcd4fc8be1cd9c68c645565c0248eb53cf7ca3d118bc3d32c29a32d7945a600 +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/keyvault/azure-security-keyvault-keys/ + OPTIONS + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-security-keyvault-keys-cpp/vcpkg.json b/ports/azure-security-keyvault-keys-cpp/vcpkg.json new file mode 100644 index 00000000000000..edd5070d5dc492 --- /dev/null +++ b/ports/azure-security-keyvault-keys-cpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "azure-security-keyvault-keys-cpp", + "version-semver": "4.1.0", + "description": [ + "Microsoft Azure Key Vault Keys SDK for C++", + "This library provides Azure Key Vault Keys SDK." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/keyvault/azure-security-keyvault-keys", + "license": "MIT", + "dependencies": [ + { + "name": "azure-core-cpp", + "default-features": false, + "version>=": "1.2.0" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/azure-security-keyvault-secrets-cpp/portfile.cmake b/ports/azure-security-keyvault-secrets-cpp/portfile.cmake new file mode 100644 index 00000000000000..3e6b1c84faa044 --- /dev/null +++ b/ports/azure-security-keyvault-secrets-cpp/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-security-keyvault-secrets_4.0.0-beta.1 + SHA512 dc40606fdd5f0c6934f9720fc9722346a5bff02093cd9a1805ca6a2356854a8648fcdf689e3456162b0b93dc85bea916ca1532547a4937113067deb5abdb3ff7 +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/keyvault/azure-security-keyvault-secrets/ + OPTIONS + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-security-keyvault-secrets-cpp/vcpkg.json b/ports/azure-security-keyvault-secrets-cpp/vcpkg.json new file mode 100644 index 00000000000000..f95d098002d357 --- /dev/null +++ b/ports/azure-security-keyvault-secrets-cpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "azure-security-keyvault-secrets-cpp", + "version-semver": "4.0.0-beta.1", + "description": [ + "Microsoft Azure Key Vault Secrets SDK for C++", + "This library provides Azure Key Vault Secrets SDK." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/keyvault/azure-security-keyvault-secrets", + "license": "MIT", + "dependencies": [ + { + "name": "azure-core-cpp", + "default-features": false, + "version>=": "1.2.0" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/azure-storage-blobs-cpp/portfile.cmake b/ports/azure-storage-blobs-cpp/portfile.cmake new file mode 100644 index 00000000000000..3d5acc48ab7764 --- /dev/null +++ b/ports/azure-storage-blobs-cpp/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-storage-blobs_12.2.0 + SHA512 9e833b41b33b5889cc1b84edc64efc38341db3d9ea28e771968c1ed56686975d0b688ea48d7649845030f6c8a6327f136f5f8c1a584996bdf6ce83564c30c91f +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/storage/azure-storage-blobs/ + OPTIONS + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-storage-blobs-cpp/vcpkg.json b/ports/azure-storage-blobs-cpp/vcpkg.json new file mode 100644 index 00000000000000..f806e967deadf6 --- /dev/null +++ b/ports/azure-storage-blobs-cpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "azure-storage-blobs-cpp", + "version-semver": "12.2.0", + "description": [ + "Microsoft Azure Storage Blobs SDK for C++", + "This library provides Azure Storage Blobs SDK." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-blobs", + "license": "MIT", + "dependencies": [ + { + "name": "azure-storage-common-cpp", + "default-features": false, + "version>=": "12.2.0" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/azure-storage-common-cpp/portfile.cmake b/ports/azure-storage-common-cpp/portfile.cmake new file mode 100644 index 00000000000000..9843c83a34a6b7 --- /dev/null +++ b/ports/azure-storage-common-cpp/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-storage-common_12.2.0 + SHA512 59d7c755c9aca09e49487765c5571da242bd6cbf426f6fd07a2d7235f4e5c894f6a36e209f08908d1e6fc97d64d60fd5e7f4dd87d88416e21b6591fc88674663 +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/storage/azure-storage-common/ + OPTIONS + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-storage-common-cpp/vcpkg.json b/ports/azure-storage-common-cpp/vcpkg.json new file mode 100644 index 00000000000000..d1729985a9654f --- /dev/null +++ b/ports/azure-storage-common-cpp/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "azure-storage-common-cpp", + "version-semver": "12.2.0", + "description": [ + "Microsoft Azure Common Storage SDK for C++", + "This library provides common Azure Storage-related abstractions for Azure SDK." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-common", + "license": "MIT", + "dependencies": [ + { + "name": "azure-core-cpp", + "default-features": false, + "version>=": "1.0.0" + }, + { + "name": "libxml2", + "platform": "!windows" + }, + { + "name": "openssl", + "platform": "!windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL deleted file mode 100644 index 563c3d15fc2b18..00000000000000 --- a/ports/azure-storage-cpp/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: azure-storage-cpp -Version: 6.1.0-2 -Build-Depends: cpprestsdk[core], atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp&!osx), gettext -Description: Microsoft Azure Storage Client SDK for C++ - A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. -Homepage: https://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/builtin-uuid-osx.patch b/ports/azure-storage-cpp/builtin-uuid-osx.patch deleted file mode 100644 index 1e2b918cc36e89..00000000000000 --- a/ports/azure-storage-cpp/builtin-uuid-osx.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake -index 9171f8c..b2c7b93 100644 ---- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake -+++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake -@@ -13,6 +13,11 @@ - # For details see the accompanying COPYING-CMAKE-SCRIPTS file. - # - -+if (APPLE) -+ set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/) -+ set(CMAKE_OSX_FRAMEWORK_HEADERS ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks/Kernel.framework/Headers) -+ set(UUID_LIBRARY "") -+endif() - - if (UUID_LIBRARIES AND UUID_INCLUDE_DIRS) - # in cache already -@@ -39,6 +44,7 @@ else (UUID_LIBRARIES AND UUID_INCLUDE_DIRS) - /opt/include - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include - /usr/freeware/include -+ ${CMAKE_OSX_FRAMEWORK_HEADERS} - ) - - find_library(UUID_LIBRARY -@@ -88,13 +94,13 @@ else (UUID_LIBRARIES AND UUID_INCLUDE_DIRS) - set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR}) - set(UUID_LIBRARIES ${UUID_LIBRARY}) - -- if (UUID_INCLUDE_DIRS AND UUID_LIBRARIES) -+ if (UUID_INCLUDE_DIRS AND (UUID_LIBRARIES OR APPLE)) - set(UUID_FOUND TRUE) - endif (UUID_INCLUDE_DIRS AND UUID_LIBRARIES) - - if (UUID_FOUND) - if (NOT UUID_FIND_QUIETLY) -- message(STATUS "Found UUID : ${UUID_LIBRARIES}") -+ message(STATUS "Found UUID : ${UUID_INCLUDE_DIRS} ${UUID_LIBRARIES}") - endif (NOT UUID_FIND_QUIETLY) - else (UUID_FOUND) - if (UUID_FIND_REQUIRED) diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index b558fa51d5838d..c091b31c0c0942 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -1,19 +1,12 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - -include(vcpkg_common_functions) +message(WARNING "azure-storage-cpp is no longer actively developed. Instead, users should migrate to the new sdk:azure-core-cpp") +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-storage-cpp - REF v6.1.0 - SHA512 bc6a1da6287301b5bb5c31694d508c46447b71043d5b94a90ffe79b6dc045bc111ed0bcf3a7840e096ddc3ef6badbeef7fb905242e272a9f82f483d849a43e61 + REF v7.5.0 + SHA512 83eabcaf2114c8af1cabbc96b6ef2b57c934a06f68e7a870adf336feaa19edd57aedaf8507d5c40500e46d4e77f5059f9286e319fe7cadeb9ffc8fa018fb030c HEAD_REF master - PATCHES - # on osx use the uuid.h that is part of the osx sdk - builtin-uuid-osx.patch - remove-gcov-dependency.patch ) vcpkg_configure_cmake( @@ -23,14 +16,17 @@ vcpkg_configure_cmake( -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF - -DGETTEXT_LIB_DIR=${CURRENT_INSTALLED_DIR}/include + OPTIONS_RELEASE + -DGETTEXT_LIB_DIR=${CURRENT_INSTALLED_DIR}/lib + OPTIONS_DEBUG + -DGETTEXT_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib ) vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-storage-cpp RENAME copyright) + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/azure-storage-cpp/remove-gcov-dependency.patch b/ports/azure-storage-cpp/remove-gcov-dependency.patch deleted file mode 100644 index 7083fe3fafe489..00000000000000 --- a/ports/azure-storage-cpp/remove-gcov-dependency.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -index 6443f8e..db20749 100644 ---- a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -@@ -63,9 +63,6 @@ if(UNIX OR WIN32) - ) - endif() - --if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") --endif() - if (APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}") - else() diff --git a/ports/azure-storage-cpp/vcpkg.json b/ports/azure-storage-cpp/vcpkg.json new file mode 100644 index 00000000000000..21180d49ff3332 --- /dev/null +++ b/ports/azure-storage-cpp/vcpkg.json @@ -0,0 +1,41 @@ +{ + "name": "azure-storage-cpp", + "version-string": "7.5.0", + "port-version": 2, + "description": [ + "[legacy] Microsoft Azure Storage Client SDK for C++", + "A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client." + ], + "homepage": "https://blogs.msdn.com/b/windowsazurestorage/", + "supports": "!uwp", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + }, + { + "name": "boost-locale", + "platform": "!windows & !uwp" + }, + { + "name": "boost-log", + "platform": "!windows & !uwp" + }, + { + "name": "cpprestsdk", + "default-features": false + }, + { + "name": "gettext", + "platform": "osx" + }, + { + "name": "libuuid", + "platform": "!windows & !uwp & !osx" + }, + { + "name": "libxml2", + "platform": "!windows & !uwp" + } + ] +} diff --git a/ports/azure-storage-files-datalake-cpp/portfile.cmake b/ports/azure-storage-files-datalake-cpp/portfile.cmake new file mode 100644 index 00000000000000..fad24c17114d32 --- /dev/null +++ b/ports/azure-storage-files-datalake-cpp/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-storage-files-datalake_12.2.0 + SHA512 42e5fd30f76236cbe055ed51fdba3672421e9ad329addc665df1b2d29d5ea1df016932b5d4c28c7a0dd820bbab09d4b245711a7020d4b9a1e96d05657c05b94b +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/storage/azure-storage-files-datalake/ + OPTIONS + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-storage-files-datalake-cpp/vcpkg.json b/ports/azure-storage-files-datalake-cpp/vcpkg.json new file mode 100644 index 00000000000000..b59f47fd39076a --- /dev/null +++ b/ports/azure-storage-files-datalake-cpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "azure-storage-files-datalake-cpp", + "version-semver": "12.2.0", + "description": [ + "Microsoft Azure Storage Files Data Lake SDK for C++", + "This library provides Azure Storage Files Data Lake SDK." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-files-datalake", + "license": "MIT", + "dependencies": [ + { + "name": "azure-storage-blobs-cpp", + "default-features": false, + "version>=": "12.2.0" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/azure-storage-files-shares-cpp/portfile.cmake b/ports/azure-storage-files-shares-cpp/portfile.cmake new file mode 100644 index 00000000000000..420ee8925c841b --- /dev/null +++ b/ports/azure-storage-files-shares-cpp/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-storage-files-shares_12.2.0 + SHA512 b3e0c0a6b4ab11ff9d4c3318a56621d4d6c453b393f692f5d61118a18c571fbb5a1b259c44bb2ba7ac14e056d3a30bde66e36601139d704baeb9cbc865c43ecd +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/storage/azure-storage-files-shares/ + OPTIONS + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-storage-files-shares-cpp/vcpkg.json b/ports/azure-storage-files-shares-cpp/vcpkg.json new file mode 100644 index 00000000000000..54807b9b469ca1 --- /dev/null +++ b/ports/azure-storage-files-shares-cpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "azure-storage-files-shares-cpp", + "version-semver": "12.2.0", + "description": [ + "Microsoft Azure Storage Files Shares SDK for C++", + "This library provides Azure Storage Files Shares SDK." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-files-shares", + "license": "MIT", + "dependencies": [ + { + "name": "azure-storage-common-cpp", + "default-features": false, + "version>=": "12.2.0" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/azure-storage-queues-cpp/portfile.cmake b/ports/azure-storage-queues-cpp/portfile.cmake new file mode 100644 index 00000000000000..8ede76b4e6a921 --- /dev/null +++ b/ports/azure-storage-queues-cpp/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-sdk-for-cpp + REF azure-storage-queues_12.0.0-beta.1 + SHA512 22c59e6fd6838caeb7af476a4547815115d51b26145bbb3083cf4ae6bd15a6e43d5892c02f97cfa09c5e279c219c6f0b600f65d5dd742495f72775850b7ed6e2 +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH}/sdk/storage/azure-storage-queues/ + OPTIONS + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() diff --git a/ports/azure-storage-queues-cpp/vcpkg.json b/ports/azure-storage-queues-cpp/vcpkg.json new file mode 100644 index 00000000000000..ffedcc26b01970 --- /dev/null +++ b/ports/azure-storage-queues-cpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "azure-storage-queues-cpp", + "version-semver": "12.0.0-beta.1", + "description": [ + "Microsoft Azure Storage Queues SDK for C++", + "This library provides Azure Storage Queues SDK." + ], + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-queues", + "license": "MIT", + "dependencies": [ + { + "name": "azure-storage-common-cpp", + "default-features": false, + "version>=": "12.2.0" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/azure-uamqp-c/CONTROL b/ports/azure-uamqp-c/CONTROL deleted file mode 100644 index db9200f4cca88d..00000000000000 --- a/ports/azure-uamqp-c/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: azure-uamqp-c -Version: 2019-05-16.1 -Build-Depends: azure-c-shared-utility, azure-macro-utils-c, umock-c -Description: AMQP library for C - -Feature: public-preview -Description: AMQP library for C (public preview) -Build-Depends: azure-c-shared-utility[public-preview], azure-macro-utils-c, umock-c diff --git a/ports/azure-uamqp-c/portfile.cmake b/ports/azure-uamqp-c/portfile.cmake index 517eca19a7e115..3b95f6447e6452 100644 --- a/ports/azure-uamqp-c/portfile.cmake +++ b/ports/azure-uamqp-c/portfile.cmake @@ -1,21 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uamqp-c - REF 5ceebf6ec8d1973cfa80804077c7cef23d3b36af - SHA512 6dc7ffc386339db54ff387760119ae5ffd564642cd18d0dc177e6302167cc3b40bdd0f4d9e50478db8d2760166b15058b53b9eb2d1c160f234693a59ac762a75 + REF 065ffdeeb47313ddbbc2a8e84ad52ab033e2e8d2 + SHA512 bade6fae2d5479b7690632dbcc58bda5dd871eb0aa63d6a56cb35e81630121b5148309cd3414e6339c1218ec59fc12ac318b4964d295b579f7a0cacf5593b7ba HEAD_REF master ) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uamqp-c - REF 5ceebf6ec8d1973cfa80804077c7cef23d3b36af - SHA512 6dc7ffc386339db54ff387760119ae5ffd564642cd18d0dc177e6302167cc3b40bdd0f4d9e50478db8d2760166b15058b53b9eb2d1c160f234693a59ac762a75 + REF b75cdb7e1736a388fe3e9fc2a99493aa1db6f43f + SHA512 a13da2bc8a471329cbcd63aaa6fb94265388f709bf8977d55017a6cdd5af21e3b08935498ff8bfebfa63791dfa04552806684fae82b664045a12d14a91df3183 HEAD_REF master ) endif() @@ -37,7 +35,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uamqp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-uamqp-c/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) vcpkg_copy_pdbs() - diff --git a/ports/azure-uamqp-c/vcpkg.json b/ports/azure-uamqp-c/vcpkg.json new file mode 100644 index 00000000000000..52dfd75fad1c85 --- /dev/null +++ b/ports/azure-uamqp-c/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "azure-uamqp-c", + "version-date": "2021-09-09", + "description": "AMQP library for C", + "homepage": "https://github.com/Azure/azure-uamqp-c", + "dependencies": [ + "azure-c-shared-utility", + "azure-macro-utils-c", + "umock-c" + ], + "features": { + "public-preview": { + "description": "AMQP library for C (public preview)", + "dependencies": [ + { + "name": "azure-c-shared-utility", + "features": [ + "public-preview" + ] + }, + { + "name": "azure-macro-utils-c", + "features": [ + "public-preview" + ] + }, + { + "name": "umock-c", + "features": [ + "public-preview" + ] + } + ] + } + } +} diff --git a/ports/azure-uhttp-c/CONTROL b/ports/azure-uhttp-c/CONTROL deleted file mode 100644 index f282a27f2db8e8..00000000000000 --- a/ports/azure-uhttp-c/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: azure-uhttp-c -Version: 2019-05-16.1 -Build-Depends: azure-c-shared-utility, azure-macro-utils-c, umock-c -Description: Azure HTTP Library written in C - -Feature: public-preview -Description: Azure HTTP Library written in C (public preview) -Build-Depends: azure-c-shared-utility[public-preview], azure-macro-utils-c, umock-c diff --git a/ports/azure-uhttp-c/portfile.cmake b/ports/azure-uhttp-c/portfile.cmake index af5afc87509c30..4a3105c021c8e1 100644 --- a/ports/azure-uhttp-c/portfile.cmake +++ b/ports/azure-uhttp-c/portfile.cmake @@ -1,21 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uhttp-c - REF b8976adff02e543fc00e7db59eae9ce78dd014fe - SHA512 65ddccc07831309c4f3f8546bb1a45a6eff84674013311a15c99389d4fc33eaf2ef3da6c7c8e4bb03d32955d12c978190e7badb597379a9fefda4ebcf18827ec + REF d84a20609a2b5a555920389451fb3c9a2ed3656c + SHA512 4eadd7e120082cc3bcf696d6cd16bc7ee8e1082380dd7583fba7fad1bb95109f3456890495e25ae7675e656ef721fa12eff22eeb96d8a4cf359be5c96889cbd6 HEAD_REF master ) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uhttp-c - REF b8976adff02e543fc00e7db59eae9ce78dd014fe - SHA512 65ddccc07831309c4f3f8546bb1a45a6eff84674013311a15c99389d4fc33eaf2ef3da6c7c8e4bb03d32955d12c978190e7badb597379a9fefda4ebcf18827ec + REF db8ac9c1353fe05cf6917e8ec8bcb866bf4a6f11 + SHA512 4c9b053bcdc1086dbba6883a887e5af1f6aa4572bfb1e36c3b07c9bb93c35b188cb31f510fca5c4b2a0557df446dd965eafda993eab7c04b4502ed07b269c148 HEAD_REF master ) endif() @@ -38,7 +36,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uhttp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-uhttp-c/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) vcpkg_copy_pdbs() - diff --git a/ports/azure-uhttp-c/vcpkg.json b/ports/azure-uhttp-c/vcpkg.json new file mode 100644 index 00000000000000..11f6fea12c3f02 --- /dev/null +++ b/ports/azure-uhttp-c/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "azure-uhttp-c", + "version-date": "2021-09-09", + "description": "Azure HTTP Library written in C", + "homepage": "https://github.com/Azure/azure-uhttp-c", + "dependencies": [ + "azure-c-shared-utility", + "azure-macro-utils-c", + "umock-c" + ], + "features": { + "public-preview": { + "description": "Azure HTTP Library written in C (public preview)", + "dependencies": [ + { + "name": "azure-c-shared-utility", + "features": [ + "public-preview" + ] + }, + { + "name": "azure-macro-utils-c", + "features": [ + "public-preview" + ] + }, + { + "name": "umock-c", + "features": [ + "public-preview" + ] + } + ] + } + } +} diff --git a/ports/azure-umqtt-c/CONTROL b/ports/azure-umqtt-c/CONTROL deleted file mode 100644 index 2138a45b15fc2b..00000000000000 --- a/ports/azure-umqtt-c/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: azure-umqtt-c -Version: 2019-05-16.1 -Build-Depends: azure-c-shared-utility, azure-macro-utils-c, umock-c -Description: General purpose library for communication over the mqtt protocol - -Feature: public-preview -Description: General purpose library for communication over the mqtt protocol (public preview) -Build-Depends: azure-c-shared-utility[public-preview], azure-macro-utils-c, umock-c diff --git a/ports/azure-umqtt-c/portfile.cmake b/ports/azure-umqtt-c/portfile.cmake index d64dd01d479fa1..a3e9246bb471f7 100644 --- a/ports/azure-umqtt-c/portfile.cmake +++ b/ports/azure-umqtt-c/portfile.cmake @@ -1,21 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-umqtt-c - REF c37883fbb05218fd940b87899a116af240f90c40 - SHA512 21bbe6dfafcc96d35775ab83a75334fbfd41a55a82a7da483d5ff179aa3792424851f250007c9603ef17c789d8b23b1a8b81580fc2cf793fd00b487c321fdba3 + REF 7557db6de094b67818d3c410dc95a3cf07cd86a6 + SHA512 f2577379f711e2576fdd6dfecbc4d8a0b26c7670a77bc468238e8dd5fa43f208db85eddd06dd570fde4219ba19304338c712f671c059c6cc10abb4892d58ae40 HEAD_REF master ) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-umqtt-c - REF c37883fbb05218fd940b87899a116af240f90c40 - SHA512 21bbe6dfafcc96d35775ab83a75334fbfd41a55a82a7da483d5ff179aa3792424851f250007c9603ef17c789d8b23b1a8b81580fc2cf793fd00b487c321fdba3 + REF 12cb55ee5a926a124f22ad737c7cec35f6af7165 + SHA512 ed7d5c5132cfaa46574e70a99ce0181208b772fa2dca9122c8d16918af29240a2060705a25b121785c210eb5a4b917588a1623aedfd0bf9a4cf39df601b05dea HEAD_REF master ) endif() @@ -37,7 +35,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/umqtt) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-umqtt-c/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) vcpkg_copy_pdbs() - diff --git a/ports/azure-umqtt-c/vcpkg.json b/ports/azure-umqtt-c/vcpkg.json new file mode 100644 index 00000000000000..1ccfb1699f46a8 --- /dev/null +++ b/ports/azure-umqtt-c/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "azure-umqtt-c", + "version-date": "2021-09-09", + "description": "General purpose library for communication over the mqtt protocol", + "homepage": "https://github.com/Azure/azure-umqtt-c", + "dependencies": [ + "azure-c-shared-utility", + "azure-macro-utils-c", + "umock-c" + ], + "features": { + "public-preview": { + "description": "General purpose library for communication over the mqtt protocol (public preview)", + "dependencies": [ + { + "name": "azure-c-shared-utility", + "features": [ + "public-preview" + ] + }, + { + "name": "azure-macro-utils-c", + "features": [ + "public-preview" + ] + }, + { + "name": "umock-c", + "features": [ + "public-preview" + ] + } + ] + } + } +} diff --git a/ports/b64/CMakeLists.txt b/ports/b64/CMakeLists.txt new file mode 100644 index 00000000000000..274fc0788b3048 --- /dev/null +++ b/ports/b64/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.20) +project(b64) + +if (BUILD_SHARED_LIBS) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/b64_dynamic_config.h ${CMAKE_CURRENT_BINARY_DIR}/b64_config.h) +else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/b64_static_config.h ${CMAKE_CURRENT_BINARY_DIR}/b64_config.h) +endif() + +set(SRC_DIR src) +set(INC_DIR include/b64) +set(SOURCE_FILES ${SRC_DIR}/cdecode.c ${SRC_DIR}/cencode.c) +set(HEADER_FILES ${INC_DIR}/cdecode.h ${INC_DIR}/cencode.h ${INC_DIR}/decode.h ${INC_DIR}/encode.h ${INC_DIR}/ccommon.h ${CMAKE_CURRENT_BINARY_DIR}/b64_config.h) + +add_library(b64 ${SOURCE_FILES} ${HEADER_FILES}) + +if (BUILD_SHARED_LIBS) + target_compile_definitions(b64 PRIVATE LIBB64_EXPORTS=1) +endif() + +target_include_directories(b64 PRIVATE include ${CMAKE_CURRENT_BINARY_DIR}) + +set_property(TARGET b64 + PROPERTY PUBLIC_HEADER ${HEADER_FILES}) + +install(TARGETS b64 + EXPORT b64-targets + LIBRARY DESTINATION lib + PUBLIC_HEADER DESTINATION include/b64 +) + +install(EXPORT b64-targets + FILE b64-targets.cmake + DESTINATION lib/cmake/b64) + diff --git a/ports/b64/b64_dynamic_config.h b/ports/b64/b64_dynamic_config.h new file mode 100644 index 00000000000000..b836ca2a5b7593 --- /dev/null +++ b/ports/b64/b64_dynamic_config.h @@ -0,0 +1,14 @@ +#ifndef B64_CONFIG_H +#define B64_CONFIG_H + +#ifdef _WIN32 + #ifdef LIBB64_EXPORTS + #define LIBB64 __declspec(dllexport) + #else + #define LIBB64 __declspec(dllimport) + #endif +#else +#define LIBB64 +#endif + +#endif diff --git a/ports/b64/b64_static_config.h b/ports/b64/b64_static_config.h new file mode 100644 index 00000000000000..f261c7cf219b02 --- /dev/null +++ b/ports/b64/b64_static_config.h @@ -0,0 +1,6 @@ +#ifndef B64_CONFIG_H +#define B64_CONFIG_H + +#define LIBB64 + +#endif diff --git a/ports/b64/portfile.cmake b/ports/b64/portfile.cmake new file mode 100644 index 00000000000000..dbe41a9372cf20 --- /dev/null +++ b/ports/b64/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libb64/libb64 + REF v2.0.0.1 + SHA512 72c2fd4c81575b505f4851cd3820b6a2d8e78cd031a1ed138ffe5667ca711558f43b515428971966f7a73ace7c9951f1f0b39c362a59fe4691958875775cce23 + HEAD_REF master + PATCHES "windows-fix.patch" +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/b64_dynamic_config.h" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/b64_static_config.h" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + + +# handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/b64/vcpkg.json b/ports/b64/vcpkg.json new file mode 100644 index 00000000000000..ba4dba7a21fd0d --- /dev/null +++ b/ports/b64/vcpkg.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "name": "b64", + "version": "2.0.0.1", + "description": "libb64 is a library of ANSI C routines for fast encoding/decoding data into and from a base64-encoded format", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/b64/windows-fix.patch b/ports/b64/windows-fix.patch new file mode 100644 index 00000000000000..ccabfad2e173c7 --- /dev/null +++ b/ports/b64/windows-fix.patch @@ -0,0 +1,130 @@ +diff --git a/include/b64/ccommon.h b/include/b64/ccommon.h +index 2b614df..0e46141 100644 +--- a/include/b64/ccommon.h ++++ b/include/b64/ccommon.h +@@ -10,11 +10,12 @@ For details, see http://sourceforge.net/projects/libb64 + + #define BASE64_VER_MAJOR 2 + #define BASE64_VER_MINOR 0 ++#include "b64_config.h" + + #ifndef HAVE_SIZE_T + #ifdef _WIN32 + #include +- #elseif defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) ++ #elif defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) + #include + #else + typedef unsigned long size_t; +diff --git a/include/b64/cdecode.h b/include/b64/cdecode.h +index d6ff24c..4553efc 100644 +--- a/include/b64/cdecode.h ++++ b/include/b64/cdecode.h +@@ -24,11 +24,11 @@ typedef struct + char plainchar; + } base64_decodestate; + +-extern void base64_init_decodestate(base64_decodestate* state_in); ++extern LIBB64 void base64_init_decodestate(base64_decodestate* state_in); + +-extern size_t base64_decode_maxlength(size_t encode_len); ++extern LIBB64 size_t base64_decode_maxlength(size_t encode_len); + +-extern int base64_decode_value(signed char value_in); +-extern size_t base64_decode_block(const char* code_in, const size_t length_in, void* plaintext_out, base64_decodestate* state_in); ++extern LIBB64 int base64_decode_value(signed char value_in); ++extern LIBB64 size_t base64_decode_block(const char* code_in, const size_t length_in, void* plaintext_out, base64_decodestate* state_in); + + #endif /* BASE64_CDECODE_H */ +diff --git a/include/b64/cencode.h b/include/b64/cencode.h +index 96b0cdb..1feb695 100644 +--- a/include/b64/cencode.h ++++ b/include/b64/cencode.h +@@ -31,12 +31,12 @@ typedef struct + char result; + } base64_encodestate; + +-extern void base64_init_encodestate(base64_encodestate* state_in); ++extern LIBB64 void base64_init_encodestate(base64_encodestate* state_in); + +-extern size_t base64_encode_length(size_t plain_len, base64_encodestate* state_in); ++extern LIBB64 size_t base64_encode_length(size_t plain_len, base64_encodestate* state_in); + +-extern char base64_encode_value(signed char value_in); +-extern size_t base64_encode_block(const void* plaintext_in, const size_t length_in, char* code_out, base64_encodestate* state_in); +-extern size_t base64_encode_blockend(char* code_out, base64_encodestate* state_in); ++extern LIBB64 char base64_encode_value(signed char value_in); ++extern LIBB64 size_t base64_encode_block(const void* plaintext_in, const size_t length_in, char* code_out, base64_encodestate* state_in); ++extern LIBB64 size_t base64_encode_blockend(char* code_out, base64_encodestate* state_in); + + #endif /* BASE64_CENCODE_H */ +diff --git a/include/b64/decode.h b/include/b64/decode.h +index b2362e5..dd772d4 100644 +--- a/include/b64/decode.h ++++ b/include/b64/decode.h +@@ -22,23 +22,23 @@ namespace base64 + base64_decodestate _state; + int _buffersize; + +- decoder(int buffersize_in = BUFFERSIZE) ++ LIBB64 decoder(int buffersize_in = BUFFERSIZE) + : _buffersize(buffersize_in) + { + base64_init_decodestate(&_state); + } + +- int decode(char value_in) ++ LIBB64 int decode(char value_in) + { + return base64_decode_value(value_in); + } + +- std::streamsize decode(const char* code_in, const std::streamsize length_in, char* plaintext_out) ++ LIBB64 std::streamsize decode(const char* code_in, const std::streamsize length_in, char* plaintext_out) + { + return base64_decode_block(code_in, static_cast(length_in), plaintext_out, &_state); + } + +- void decode(std::istream& istream_in, std::ostream& ostream_in) ++ LIBB64 void decode(std::istream& istream_in, std::ostream& ostream_in) + { + base64_init_decodestate(&_state); + // +diff --git a/include/b64/encode.h b/include/b64/encode.h +index c1a5f88..ff2c9b4 100644 +--- a/include/b64/encode.h ++++ b/include/b64/encode.h +@@ -22,28 +22,28 @@ namespace base64 + base64_encodestate _state; + int _buffersize; + +- encoder(int buffersize_in = BUFFERSIZE) ++ LIBB64 encoder(int buffersize_in = BUFFERSIZE) + : _buffersize(buffersize_in) + { + base64_init_encodestate(&_state); + } + +- int encode(char value_in) ++ LIBB64 int encode(char value_in) + { + return base64_encode_value(value_in); + } + +- std::streamsize encode(const char* code_in, const std::streamsize length_in, char* plaintext_out) ++ LIBB64 std::streamsize encode(const char* code_in, const std::streamsize length_in, char* plaintext_out) + { + return base64_encode_block(code_in, static_cast(length_in), plaintext_out, &_state); + } + +- int encode_end(char* plaintext_out) ++ LIBB64 int encode_end(char* plaintext_out) + { + return base64_encode_blockend(plaintext_out, &_state); + } + +- void encode(std::istream& istream_in, std::ostream& ostream_in) ++ LIBB64 void encode(std::istream& istream_in, std::ostream& ostream_in) + { + base64_init_encodestate(&_state); + // diff --git a/ports/basisu/CONTROL b/ports/basisu/CONTROL deleted file mode 100644 index f31edab0774dd7..00000000000000 --- a/ports/basisu/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: basisu -Version: 0.0.1-1 -Homepage: https://github.com/BinomialLLC/basis_universal -Description: Basis Universal is a supercompressed GPU texture and video compression format that outputs a highly compressed intermediate file format (.basis) that can be quickly transcoded to a wide variety of GPU texture compression formats. -Build-Depends: lodepng \ No newline at end of file diff --git a/ports/basisu/fix-addostream.patch b/ports/basisu/fix-addostream.patch new file mode 100644 index 00000000000000..cd9308bf59549a --- /dev/null +++ b/ports/basisu/fix-addostream.patch @@ -0,0 +1,12 @@ +diff --git a/src/encoder/basisu_enc.h b/src/encoder/basisu_enc.h +index 05656da..468f43b 100644 +--- a/src/encoder/basisu_enc.h ++++ b/src/encoder/basisu_enc.h +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #ifndef _WIN32 + #include diff --git a/ports/basisu/portfile.cmake b/ports/basisu/portfile.cmake index 7882f0d2267ed6..8873c52fc51344 100644 --- a/ports/basisu/portfile.cmake +++ b/ports/basisu/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jherico/basis_universal - REF 11aa181a4bbf051475a01a1e73e39bf388819215 - SHA512 62d7de6c6ca5e6235c8a377767389a7d5393e05bb5d0c024ce756e77d235132efa48280c9d529b6a91eddf0c906c3c84b6b78fdf339b1a47039b28d04161d2fe + REF 497875f756ed0e3eb62e0ff08d55c62242f4be74 + SHA512 2293b78620a7ed510dbecf48bcae5f4b8524fe9020f864c8e79cf94ea9d95d51dddf83a5b4ea29cc95db19f87137bfef1cb68b7fbc6387e08bb42898d81c9303 HEAD_REF master + PATCHES fix-addostream.patch ) vcpkg_configure_cmake( @@ -24,9 +23,8 @@ else() set(TOOL_NAME basisu_tool) endif() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/basisu) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(COPY ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/basisu) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/basisu/LICENSE ${CURRENT_PACKAGES_DIR}/share/basisu/copyright) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/basisu) diff --git a/ports/basisu/vcpkg.json b/ports/basisu/vcpkg.json new file mode 100644 index 00000000000000..a0fe5cc685326c --- /dev/null +++ b/ports/basisu/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "basisu", + "version-string": "1.11", + "port-version": 5, + "description": "Basis Universal is a supercompressed GPU texture and video compression format that outputs a highly compressed intermediate file format (.basis) that can be quickly transcoded to a wide variety of GPU texture compression formats.", + "homepage": "https://github.com/BinomialLLC/basis_universal", + "dependencies": [ + "lodepng" + ] +} diff --git a/ports/bcg729/portfile.cmake b/ports/bcg729/portfile.cmake new file mode 100644 index 00000000000000..4a6f5c6f63ad70 --- /dev/null +++ b/ports/bcg729/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BelledonneCommunications/bcg729 + REF 1.1.1 + SHA512 e8cc4b7486a9a29fb729ab9fd9e3c4a2155573f38cec16f5a53db3b416fc1119ea5f5a61243a8d37cb0b64580c5df1b632ff165dc7ff47421fa567dafffaacd8 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DENABLE_STATIC=${ENABLE_STATIC} + -DENABLE_SHARED=${ENABLE_SHARED} +) + +vcpkg_install_cmake() + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/bcg729/vcpkg.json b/ports/bcg729/vcpkg.json new file mode 100644 index 00000000000000..5896ad827eb48c --- /dev/null +++ b/ports/bcg729/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "bcg729", + "version-string": "1.1.1", + "description": "Bcg729 is an open source implementation of the ITU G.729 Annex A and B codec.", + "homepage": "https://github.com/BelledonneCommunications/bcg729" +} diff --git a/ports/bddisasm/portfile.cmake b/ports/bddisasm/portfile.cmake new file mode 100644 index 00000000000000..78cb08023b8a24 --- /dev/null +++ b/ports/bddisasm/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_fail_port_install(ON_ARCH "arm") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bitdefender/bddisasm + REF v1.34.2 + SHA512 4ddcae67721f6f1c5f0073aca3996325d4fbb148365a63b03e295fc2b00b1f4c73439a1fe6aab60ab9778e182b7acf2807df7c40079a1ca7916fbb5393245717 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBDD_INCLUDE_TOOL=OFF +) + +vcpkg_cmake_install() + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/bddisasm) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") diff --git a/ports/bddisasm/vcpkg.json b/ports/bddisasm/vcpkg.json new file mode 100644 index 00000000000000..c48346811fe744 --- /dev/null +++ b/ports/bddisasm/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "bddisasm", + "version": "1.34.2", + "maintainers": "Cristi Anichitei ", + "description": "bddisasm is a fast, lightweight, x86/x64 instruction decoder and emulator.", + "homepage": "https://github.com/bitdefender/bddisasm", + "documentation": "https://bddisasm.readthedocs.io/en/latest/", + "license": "Apache-2.0", + "supports": "!arm", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/bde/CONTROL b/ports/bde/CONTROL deleted file mode 100644 index 8fd05f2d040093..00000000000000 --- a/ports/bde/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: bde -Version: 3.2.0.0-1 -Description: Basic Development Environment - a set of foundational C++ libraries used at Bloomberg. diff --git a/ports/bde/portfile.cmake b/ports/bde/portfile.cmake index c3aed42fe2ef74..3acdd38205aef1 100644 --- a/ports/bde/portfile.cmake +++ b/ports/bde/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --library-type=static) @@ -58,8 +56,10 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") else() message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME) +if(VCPKG_TARGET_IS_WINDOWS) set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --msvc-runtime-type=static) +else() + set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") endif() # Configure debug diff --git a/ports/bde/vcpkg.json b/ports/bde/vcpkg.json new file mode 100644 index 00000000000000..4d7499c2fe0358 --- /dev/null +++ b/ports/bde/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "bde", + "version-string": "3.2.0.0", + "port-version": 3, + "description": "Basic Development Environment - a set of foundational C++ libraries used at Bloomberg.", + "supports": "!windows" +} diff --git a/ports/bdwgc/CONTROL b/ports/bdwgc/CONTROL deleted file mode 100644 index 9730760041bdde..00000000000000 --- a/ports/bdwgc/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: bdwgc -Version: 8.0.4-1 -Description: The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (libgc, bdwgc, boehm-gc) diff --git a/ports/bdwgc/portfile.cmake b/ports/bdwgc/portfile.cmake index 8fdbbf72a975bf..656de1d33faab9 100644 --- a/ports/bdwgc/portfile.cmake +++ b/ports/bdwgc/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ivmai/bdwgc diff --git a/ports/bdwgc/vcpkg.json b/ports/bdwgc/vcpkg.json new file mode 100644 index 00000000000000..ed88dc2a5ca837 --- /dev/null +++ b/ports/bdwgc/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "bdwgc", + "version-string": "8.0.4", + "port-version": 2, + "description": "The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (libgc, bdwgc, boehm-gc)" +} diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL deleted file mode 100644 index 0c889b94185a67..00000000000000 --- a/ports/beast/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: beast -Version: 0 -Build-Depends: boost-beast -Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/vcpkg.json b/ports/beast/vcpkg.json new file mode 100644 index 00000000000000..7fd6806ce5e75f --- /dev/null +++ b/ports/beast/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "beast", + "version-string": "0", + "port-version": 1, + "description": "HTTP/1 and WebSocket, header-only using Boost.Asio and C++11", + "homepage": "https://www.boost.org/doc/libs/release/libs/beast/", + "dependencies": [ + "boost-beast" + ] +} diff --git a/ports/behaviortree-cpp/001_port_fixes.patch b/ports/behaviortree-cpp/001_port_fixes.patch new file mode 100644 index 00000000000000..9897caa1881e74 --- /dev/null +++ b/ports/behaviortree-cpp/001_port_fixes.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a390aed..658f994 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -233,7 +233,7 @@ if( ZMQ_FOUND ) + endif() + + if(MSVC) +- target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W3 /WX) ++ target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W3 /wd4702) + else() + target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE + -Wall -Wextra -Werror=return-type) diff --git a/ports/behaviortree-cpp/002_fix_dependencies.patch b/ports/behaviortree-cpp/002_fix_dependencies.patch new file mode 100644 index 00000000000000..d554e37ce549ff --- /dev/null +++ b/ports/behaviortree-cpp/002_fix_dependencies.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 658f994..a04cf27 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,7 +14,7 @@ if(MSVC) + endif() + + #---- Include boost to add coroutines ---- +-find_package(Boost COMPONENTS coroutine QUIET) ++find_package(Boost REQUIRED) # coroutine2 is header-only + + if(Boost_FOUND) + string(REPLACE "." "0" Boost_VERSION_NODOT ${Boost_VERSION}) +@@ -46,17 +46,18 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON) + + #---- Find other packages ---- + find_package(Threads) +-find_package(ZMQ) ++find_package(cppzmq) + + list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES + ${CMAKE_THREAD_LIBS_INIT} + ${CMAKE_DL_LIBS} + ) + +-if( ZMQ_FOUND ) ++if( ZMQ_FOUND OR ON ) + message(STATUS "ZeroMQ found.") + add_definitions( -DZMQ_FOUND ) + list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp) ++ list(APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES cppzmq) + else() + message(WARNING "ZeroMQ NOT found. Skipping the build of [PublisherZMQ] and [bt_recorder].") + endif() diff --git a/ports/behaviortree-cpp/portfile.cmake b/ports/behaviortree-cpp/portfile.cmake new file mode 100644 index 00000000000000..0782dbdfba5c9d --- /dev/null +++ b/ports/behaviortree-cpp/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/3.5.6.tar.gz" + FILENAME "BehaviorTree.CPP.3.5.6.tar.gz" + SHA512 cd3b15eb7c5bab68239b697da166220b4df8dd7e6cf5e831f316d411e24be56c9ed74e54a3e3dd332164d740159eaf9ce62d005601fd65133809dab29430c9b7 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 001_port_fixes.patch + 002_fix_dependencies.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_ament_cmake=1 + -DCMAKE_DISABLE_FIND_PACKAGE_Curses=1 + -DBUILD_EXAMPLES=OFF + -DBUILD_UNIT_TESTS=OFF + -DBUILD_TOOLS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/BehaviorTreeV3/cmake TARGET_PATH share/behaviortreev3) +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/lib/BehaviorTreeV3" + "${CURRENT_PACKAGES_DIR}/debug/lib/BehaviorTreeV3" +) diff --git a/ports/behaviortree-cpp/vcpkg.json b/ports/behaviortree-cpp/vcpkg.json new file mode 100644 index 00000000000000..4632b9786ab203 --- /dev/null +++ b/ports/behaviortree-cpp/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "behaviortree-cpp", + "version": "3.5.6", + "port-version": 1, + "description": "Behavior Trees Library in C++.", + "homepage": "https://www.behaviortree.dev", + "supports": "!uwp", + "dependencies": [ + "boost-coroutine2", + "cppzmq" + ] +} diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL deleted file mode 100644 index 27c4c82562de6b..00000000000000 --- a/ports/benchmark/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: benchmark -Version: 1.5 -Homepage: https://github.com/google/benchmark -Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index 76cdfb43730d7d..096641a5785a9e 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -1,16 +1,13 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - -include(vcpkg_common_functions) +#https://github.com/google/benchmark/issues/661 +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/benchmark - REF v1.5.0 - SHA512 a0df9aa3d03f676e302c76d83b436de36eea0a8517ab50a8f5a11c74ccc68a1f5128fa02474901002d8e6b5a4d290ef0272a798ff4670eab3e2d78dc86bb6cd3 + REF e991355c02b93fe17713efe04cbc2e278e00fdbd # v1.5.5 + SHA512 aa4455fa0f8546ec5762f14065e0be6667b5874e6991ca6dd21dc7b29e38c7c74cfddb2c99c7a1ed2f7636aa7bdec8fc0fc1523967b179f5642c2dc2e968089c HEAD_REF master ) @@ -19,7 +16,6 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBENCHMARK_ENABLE_TESTING=OFF - -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() @@ -28,9 +24,10 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/benchmark) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/benchmark) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/benchmark/LICENSE ${CURRENT_PACKAGES_DIR}/share/benchmark/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/benchmark/vcpkg.json b/ports/benchmark/vcpkg.json new file mode 100644 index 00000000000000..bc666955193d94 --- /dev/null +++ b/ports/benchmark/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "benchmark", + "version-semver": "1.5.5", + "description": "A library to support the benchmarking of functions, similar to unit-tests.", + "homepage": "https://github.com/google/benchmark", + "supports": "!uwp" +} diff --git a/ports/bento4/CONTROL b/ports/bento4/CONTROL deleted file mode 100644 index eff84ed988f8ec..00000000000000 --- a/ports/bento4/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: bento4 -Version: 1.5.1-628 -Homepage: https://github.com/axiomatic-systems/Bento4 -Description: Bento4 is a C++ class library and tools designed to read and write ISO-MP4 files. This format is defined in international specifications ISO/IEC 14496-12, 14496-14 and 14496-15. - diff --git a/ports/bento4/portfile.cmake b/ports/bento4/portfile.cmake index b485fbb1913c56..0e5cb143b45773 100644 --- a/ports/bento4/portfile.cmake +++ b/ports/bento4/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/bento4/vcpkg.json b/ports/bento4/vcpkg.json new file mode 100644 index 00000000000000..d5278c24fb1fee --- /dev/null +++ b/ports/bento4/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "bento4", + "version-string": "1.5.1", + "port-version": 629, + "description": "Bento4 is a C++ class library and tools designed to read and write ISO-MP4 files. This format is defined in international specifications ISO/IEC 14496-12, 14496-14 and 14496-15.", + "homepage": "https://github.com/axiomatic-systems/Bento4" +} diff --git a/ports/berkeleydb/CONTROL b/ports/berkeleydb/CONTROL deleted file mode 100644 index c1416e07bffaf4..00000000000000 --- a/ports/berkeleydb/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: berkeleydb -Version: 4.8.30-2 -Homepage: https://download.oracle.com/ -Description: BDB - A high-performance embedded database for key/value data. diff --git a/ports/berkeleydb/fix-conflict-macro.patch b/ports/berkeleydb/fix-conflict-macro.patch new file mode 100644 index 00000000000000..c15d7edff9818f --- /dev/null +++ b/ports/berkeleydb/fix-conflict-macro.patch @@ -0,0 +1,123 @@ +diff --git a/dbinc/atomic.h b/dbinc/atomic.h +index 0034dcc..2dd5e03 100644 +--- a/dbinc/atomic.h ++++ b/dbinc/atomic.h +@@ -70,7 +70,7 @@ typedef struct { + * These have no memory barriers; the caller must include them when necessary. + */ + #define atomic_read(p) ((p)->value) +-#define atomic_init(p, val) ((p)->value = (val)) ++#define bdb_atomic_init(p, val) ((p)->value = (val)) + + #ifdef HAVE_ATOMIC_SUPPORT + +@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange( + #define atomic_dec(env, p) (--(p)->value) + #define atomic_compare_exchange(env, p, oldval, newval) \ + (DB_ASSERT(env, atomic_read(p) == (oldval)), \ +- atomic_init(p, (newval)), 1) ++ bdb_atomic_init(p, (newval)), 1) + #else + #define atomic_inc(env, p) __atomic_inc(env, p) + #define atomic_dec(env, p) __atomic_dec(env, p) +diff --git a/mp/mp_fget.c b/mp/mp_fget.c +index 5fdee5a..452ef17 100644 +--- a/mp/mp_fget.c ++++ b/mp/mp_fget.c +@@ -617,7 +617,7 @@ alloc: /* Allocate a new buffer header and data space. */ + + /* Initialize enough so we can call __memp_bhfree. */ + alloc_bhp->flags = 0; +- atomic_init(&alloc_bhp->ref, 1); ++ bdb_atomic_init(&alloc_bhp->ref, 1); + #ifdef DIAGNOSTIC + if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { + __db_errx(env, +@@ -911,7 +911,7 @@ alloc: /* Allocate a new buffer header and data space. */ + MVCC_MPROTECT(bhp->buf, mfp->stat.st_pagesize, + PROT_READ); + +- atomic_init(&alloc_bhp->ref, 1); ++ bdb_atomic_init(&alloc_bhp->ref, 1); + MUTEX_LOCK(env, alloc_bhp->mtx_buf); + alloc_bhp->priority = bhp->priority; + alloc_bhp->pgno = bhp->pgno; +diff --git a/mp/mp_mvcc.c b/mp/mp_mvcc.c +index 34467d2..b604388 100644 +--- a/mp/mp_mvcc.c ++++ b/mp/mp_mvcc.c +@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) + #else + memcpy(frozen_bhp, bhp, SSZA(BH, buf)); + #endif +- atomic_init(&frozen_bhp->ref, 0); ++ bdb_atomic_init(&frozen_bhp->ref, 0); + if (mutex != MUTEX_INVALID) + frozen_bhp->mtx_buf = mutex; + else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, +@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) + #endif + alloc_bhp->mtx_buf = mutex; + MUTEX_LOCK(env, alloc_bhp->mtx_buf); +- atomic_init(&alloc_bhp->ref, 1); ++ bdb_atomic_init(&alloc_bhp->ref, 1); + F_CLR(alloc_bhp, BH_FROZEN); + } + +diff --git a/mp/mp_region.c b/mp/mp_region.c +index e6cece9..e3e3382 100644 +--- a/mp/mp_region.c ++++ b/mp/mp_region.c +@@ -224,7 +224,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) + return (ret); + SH_TAILQ_INIT(&htab[i].hash_bucket); +- atomic_init(&htab[i].hash_page_dirty, 0); ++ bdb_atomic_init(&htab[i].hash_page_dirty, 0); + } + + /* +@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID : + mtx_base + i; + SH_TAILQ_INIT(&hp->hash_bucket); +- atomic_init(&hp->hash_page_dirty, 0); ++ bdb_atomic_init(&hp->hash_page_dirty, 0); + #ifdef HAVE_STATISTICS + hp->hash_io_wait = 0; + hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; +diff --git a/mutex/mut_method.c b/mutex/mut_method.c +index 2588763..56b6723 100644 +--- a/mutex/mut_method.c ++++ b/mutex/mut_method.c +@@ -426,7 +426,7 @@ atomic_compare_exchange(env, v, oldval, newval) + MUTEX_LOCK(env, mtx); + ret = atomic_read(v) == oldval; + if (ret) +- atomic_init(v, newval); ++ bdb_atomic_init(v, newval); + MUTEX_UNLOCK(env, mtx); + + return (ret); +diff --git a/mutex/mut_tas.c b/mutex/mut_tas.c +index f3922e0..934a654 100644 +--- a/mutex/mut_tas.c ++++ b/mutex/mut_tas.c +@@ -46,7 +46,7 @@ __db_tas_mutex_init(env, mutex, flags) + + #ifdef HAVE_SHARED_LATCHES + if (F_ISSET(mutexp, DB_MUTEX_SHARED)) +- atomic_init(&mutexp->sharecount, 0); ++ bdb_atomic_init(&mutexp->sharecount, 0); + else + #endif + if (MUTEX_INIT(&mutexp->tas)) { +@@ -486,7 +486,7 @@ __db_tas_mutex_unlock(env, mutex) + F_CLR(mutexp, DB_MUTEX_LOCKED); + /* Flush flag update before zeroing count */ + MEMBAR_EXIT(); +- atomic_init(&mutexp->sharecount, 0); ++ bdb_atomic_init(&mutexp->sharecount, 0); + } else { + DB_ASSERT(env, sharecount > 0); + MEMBAR_EXIT(); diff --git a/ports/berkeleydb/portfile.cmake b/ports/berkeleydb/portfile.cmake index 38f383d7b6b403..93d89fb3ebd8c2 100644 --- a/ports/berkeleydb/portfile.cmake +++ b/ports/berkeleydb/portfile.cmake @@ -1,17 +1,16 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/db-4.8.30.NC) +vcpkg_fail_port_install( ON_TARGET "uwp" "linux" "osx") vcpkg_download_distfile(ARCHIVE URLS "http://download.oracle.com/berkeley-db/db-4.8.30.NC.zip" FILENAME "db-4.8.30.NC.zip" SHA512 59c1d2d5a3551f988ab1dc063900572b67ad087537e0d71760de34601f9ebd4d5c070a49b809bec4a599a62417e9a162683ce0f6442deb1a0dadb80764bf6eab ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES fix-conflict-macro.patch +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -23,5 +22,4 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/berkeleydb RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/berkeleydb/vcpkg.json b/ports/berkeleydb/vcpkg.json new file mode 100644 index 00000000000000..318643530b6cc5 --- /dev/null +++ b/ports/berkeleydb/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "berkeleydb", + "version-string": "4.8.30", + "port-version": 6, + "description": "BDB - A high-performance embedded database for key/value data.", + "homepage": "https://download.oracle.com/", + "supports": "!(uwp | linux | osx)" +} diff --git a/ports/bext-di/portfile.cmake b/ports/bext-di/portfile.cmake new file mode 100644 index 00000000000000..8b123db7d2de4e --- /dev/null +++ b/ports/bext-di/portfile.cmake @@ -0,0 +1,17 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boost-ext/di + REF 6078f073feb8560127fbf0308b3794a551146252 # v1.2.0 + SHA512 d7876b10b0365a92095ee7edefdc9cb9a0e237baf2bad124a927f22ed6ec30e18802b20517bc032184f39b7b4d71f44e965bdcea074646871d0194bd4e851d43 + HEAD_REF cpp14 +) + +file(INSTALL ${SOURCE_PATH}/include/boost + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_download_distfile(LICENSE + URLS http://www.boost.org/LICENSE_1_0.txt + FILENAME "di-copyright" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/bext-di/vcpkg.json b/ports/bext-di/vcpkg.json new file mode 100644 index 00000000000000..3278462b4b5ada --- /dev/null +++ b/ports/bext-di/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "bext-di", + "version-string": "1.2.0", + "description": "C++14 Dependency Injection Library.", + "homepage": "https://github.com/boost-ext/di" +} diff --git a/ports/bext-ut/portfile.cmake b/ports/bext-ut/portfile.cmake new file mode 100644 index 00000000000000..14d456bc5b2ed9 --- /dev/null +++ b/ports/bext-ut/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boost-ext/ut + REF v1.1.8 + SHA512 0df2f8ce784dc69c3cca5554a8b2be7c1664dd66bf52e83f305db5fae84d416a851e9282e9a8cfe50fbcada85b17da00fb25c1228d9cca32226a18bae18acb83 + HEAD_REF master +) + +vcpkg_download_distfile(LICENSE_FILE + URLS https://www.boost.org/LICENSE_1_0.txt + FILENAME d6078467835dba893231.txt + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBOOST_UT_BUILD_BENCHMARKS=OFF + -DBOOST_UT_BUILD_EXAMPLES=OFF + -DBOOST_UT_BUILD_TESTS=OFF +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ut TARGET_PATH share/ut) + +configure_file("${LICENSE_FILE}" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) diff --git a/ports/bext-ut/vcpkg.json b/ports/bext-ut/vcpkg.json new file mode 100644 index 00000000000000..8a7c5d77f66132 --- /dev/null +++ b/ports/bext-ut/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "bext-ut", + "version": "1.1.8", + "description": "UT: C++20 μ(micro)/Unit Testing Framework", + "homepage": "https://boost-ext.github.io/ut/" +} diff --git a/ports/bfgroup-lyra/portfile.cmake b/ports/bfgroup-lyra/portfile.cmake new file mode 100644 index 00000000000000..c7c27bb14cf41a --- /dev/null +++ b/ports/bfgroup-lyra/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bfgroup/Lyra + REF 1.5 + SHA512 1f8e505a487a9421a59afed0ee0c68894fb479117ac20c0bbb8d77ccf50ab938a68c93068f26871b9ddff0a21732d8bb1c6cc997b295a2a39c9363d32e320b3b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets( + CONFIG_PATH share/lyra/cmake + TARGET_PATH share/lyra +) + +# Library is header-only, so no debug content. +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/bfgroup-lyra/vcpkg.json b/ports/bfgroup-lyra/vcpkg.json new file mode 100644 index 00000000000000..a7515048b8f30d --- /dev/null +++ b/ports/bfgroup-lyra/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "bfgroup-lyra", + "version-string": "1.5", + "port-version": 1, + "description": "A simple to use, composable, command line parser for C++ 11 and beyond", + "homepage": "https://bfgroup.github.io/Lyra/" +} diff --git a/ports/bigint/CMakeLists.txt b/ports/bigint/CMakeLists.txt index e4cccbe12a4736..fffc9419278220 100644 --- a/ports/bigint/CMakeLists.txt +++ b/ports/bigint/CMakeLists.txt @@ -1,14 +1,11 @@ -cmake_minimum_required(VERSION 3.8.0) -project(bigint) +cmake_minimum_required(VERSION 3.14.0) +project(bigint CXX) if(MSVC) - add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) endif() -include_directories(".") - -set( - bigint_srcs +set(BIGINT_SRCS BigUnsigned.cc BigInteger.cc BigIntegerAlgorithms.cc @@ -16,8 +13,7 @@ set( BigIntegerUtils.cc ) -set( - bigint_hh +set(BIGINT_HH NumberlikeArray.hh BigUnsigned.hh BigInteger.hh @@ -27,15 +23,20 @@ set( BigIntegerUtils.hh ) -add_library(bigint ${bigint_srcs}) +add_library(bigint ${BIGINT_SRCS}) +target_include_directories(bigint PUBLIC $ $) + +install( + TARGETS bigint + EXPORT bigint-config +) install( - TARGETS bigint - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + EXPORT bigint-config + NAMESPACE bigint:: + DESTINATION share/bigint ) if(NOT DISABLE_INSTALL_HEADERS) - install(FILES ${bigint_hh} DESTINATION include/bigint) + install(FILES ${BIGINT_HH} DESTINATION include/bigint) endif() diff --git a/ports/bigint/CONTROL b/ports/bigint/CONTROL deleted file mode 100644 index d862b4b5106678..00000000000000 --- a/ports/bigint/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: bigint -Version: 2010.04.30-3 -Homepage: https://mattmccutchen.net/bigint -Description: C++ Big Integer Library diff --git a/ports/bigint/fix-osx-usage.patch b/ports/bigint/fix-osx-usage.patch new file mode 100644 index 00000000000000..f387d7b297b838 --- /dev/null +++ b/ports/bigint/fix-osx-usage.patch @@ -0,0 +1,39 @@ +diff --git a/BigUnsigned.hh b/BigUnsigned.hh +index adf1c00..9228753 100644 +--- a/BigUnsigned.hh ++++ b/BigUnsigned.hh +@@ -20,7 +20,7 @@ public: + typedef unsigned long Blk; + + typedef NumberlikeArray::Index Index; +- NumberlikeArray::N; ++ using NumberlikeArray::N; + + protected: + // Creates a BigUnsigned with a capacity; for internal use. +@@ -84,8 +84,8 @@ public: + // BIT/BLOCK ACCESSORS + + // Expose these from NumberlikeArray directly. +- NumberlikeArray::getCapacity; +- NumberlikeArray::getLength; ++ using NumberlikeArray::getCapacity; ++ using NumberlikeArray::getLength; + + /* Returns the requested block, or 0 if it is beyond the length (as if + * the number had 0s infinitely to the left). */ +diff --git a/BigUnsignedInABase.hh b/BigUnsignedInABase.hh +index 8f9bdce..0ea89c6 100644 +--- a/BigUnsignedInABase.hh ++++ b/BigUnsignedInABase.hh +@@ -100,8 +100,8 @@ public: + Base getBase() const { return base; } + + // Expose these from NumberlikeArray directly. +- NumberlikeArray::getCapacity; +- NumberlikeArray::getLength; ++ using NumberlikeArray::getCapacity; ++ using NumberlikeArray::getLength; + + /* Returns the requested digit, or 0 if it is beyond the length (as if + * the number had 0s infinitely to the left). */ diff --git a/ports/bigint/portfile.cmake b/ports/bigint/portfile.cmake index 61ce15816e2c6a..7231697501a63d 100644 --- a/ports/bigint/portfile.cmake +++ b/ports/bigint/portfile.cmake @@ -1,14 +1,16 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bigint-2010.04.30) vcpkg_download_distfile(ARCHIVE URLS "https://mattmccutchen.net/bigint/bigint-2010.04.30.tar.bz2" FILENAME "bigint-2010.04.30.tar.bz2" SHA512 bb64380e51991f97a2489c04801ab4372f795b5e23870ad12d71087f1a2afba9b32f74dcdbdcb5228ebf0dd74a37185285bac7653dd3c62d6118d63c298689af ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES fix-osx-usage.patch +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -19,5 +21,6 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() -file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/bigint RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/bigint/vcpkg.json b/ports/bigint/vcpkg.json new file mode 100644 index 00000000000000..6a70944a6a0d1d --- /dev/null +++ b/ports/bigint/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "bigint", + "version-string": "2010.04.30", + "port-version": 7, + "description": "C++ Big Integer Library", + "homepage": "https://mattmccutchen.net/bigint" +} diff --git a/ports/binn/0001_fix_uwp.patch b/ports/binn/0001_fix_uwp.patch index c4f0b6658733a7..f43cdd2c85f5ac 100644 --- a/ports/binn/0001_fix_uwp.patch +++ b/ports/binn/0001_fix_uwp.patch @@ -2,27 +2,22 @@ diff --git a/src/binn.c b/src/binn.c index ef32f35..d12d473 100644 --- a/src/binn.c +++ b/src/binn.c -@@ -142,8 +142,8 @@ BINN_PRIVATE void copy_be64(u64 *pdest, u64 *psource) { +@@ -142,8 +142,14 @@ BINN_PRIVATE void copy_be64(u64 *pdest, u64 *psource) { /***************************************************************************/ #ifndef WIN32 --#define stricmp strcasecmp --#define strnicmp strncasecmp -+#define _stricmp strcasecmp -+#define _strnicmp strncasecmp + #define stricmp strcasecmp + #define strnicmp strncasecmp ++#define sprintf_s(b, n, ...) sprintf(b, __VA_ARGS__) ++#define strcpy_s(b, n, s) strcpy(b, s) ++#else ++#define stricmp _stricmp ++#define strnicmp _strnicmp ++#define strdup _strdup #endif BINN_PRIVATE BOOL IsValidBinnHeader(void *pbuf, int *ptype, int *pcount, int *psize, int *pheadersize); -@@ -614,7 +614,7 @@ BINN_PRIVATE unsigned char * SearchForKey(unsigned char *p, int header_size, int - if (p > plimit) break; - // Compare if the strings are equal. - if (len > 0) { -- if (strnicmp((char*)p, key, len) == 0) { // note that there is no null terminator here -+ if (_strnicmp((char*)p, key, len) == 0) { // note that there is no null terminator here - if (keylen == len) { - p += len; - return p; -@@ -1582,6 +1582,7 @@ BINN_PRIVATE BOOL binn_read_pair(int expected_type, void *ptr, int pos, int *pid +@@ -1582,6 +1588,7 @@ BINN_PRIVATE BOOL binn_read_pair(int expected_type, void *ptr, int pos, int *pid base = p; plimit = p + size - 1; p += header_size; @@ -30,40 +25,16 @@ index ef32f35..d12d473 100644 for (i = 0; i < count; i++) { switch (type) { -@@ -3147,15 +3148,15 @@ BINN_PRIVATE BOOL is_bool_str(char *str, BOOL *pbool) { - - if (str == NULL || pbool == NULL) return FALSE; - -- if (stricmp(str, "true") == 0) goto loc_true; -- if (stricmp(str, "yes") == 0) goto loc_true; -- if (stricmp(str, "on") == 0) goto loc_true; -- //if (stricmp(str, "1") == 0) goto loc_true; -+ if (_stricmp(str, "true") == 0) goto loc_true; -+ if (_stricmp(str, "yes") == 0) goto loc_true; -+ if (_stricmp(str, "on") == 0) goto loc_true; -+ //if (_stricmp(str, "1") == 0) goto loc_true; - -- if (stricmp(str, "false") == 0) goto loc_false; -- if (stricmp(str, "no") == 0) goto loc_false; -- if (stricmp(str, "off") == 0) goto loc_false; -- //if (stricmp(str, "0") == 0) goto loc_false; -+ if (_stricmp(str, "false") == 0) goto loc_false; -+ if (_stricmp(str, "no") == 0) goto loc_false; -+ if (_stricmp(str, "off") == 0) goto loc_false; -+ //if (_stricmp(str, "0") == 0) goto loc_false; - - if (is_integer(str)) { - vint = atoi64(str); -@@ -3333,7 +3334,7 @@ char * APIENTRY binn_get_str(binn *value) { +@@ -3333,7 +3340,7 @@ char * APIENTRY binn_get_str(binn *value) { if (type_family(value->type) == BINN_FAMILY_INT) { if (copy_int_value(value->ptr, &vint, value->type, BINN_INT64) == FALSE) return NULL; - sprintf(buf, "%" INT64_FORMAT, vint); -+ sprintf_s(buf, "%" INT64_FORMAT, vint); ++ sprintf_s(buf, sizeof buf, "%" INT64_FORMAT, vint); goto loc_convert_value; } -@@ -3341,15 +3342,15 @@ char * APIENTRY binn_get_str(binn *value) { +@@ -3341,14 +3348,14 @@ char * APIENTRY binn_get_str(binn *value) { case BINN_FLOAT: value->vdouble = value->vfloat; case BINN_DOUBLE: @@ -81,13 +52,3 @@ index ef32f35..d12d473 100644 + strcpy_s(buf, sizeof buf, "false"); goto loc_convert_value; } - -@@ -3358,7 +3359,7 @@ char * APIENTRY binn_get_str(binn *value) { - loc_convert_value: - - //value->vint64 = 0; -- value->ptr = strdup(buf); -+ value->ptr = _strdup(buf); - if (value->ptr == NULL) return NULL; - value->freefn = free; - value->type = BINN_STRING; diff --git a/ports/binn/CONTROL b/ports/binn/CONTROL deleted file mode 100644 index b6259b52e64879..00000000000000 --- a/ports/binn/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: binn -Version: 1.0 -Description: Binn is a binary data serialization format designed to be compact, fast and easy to use. \ No newline at end of file diff --git a/ports/binn/portfile.cmake b/ports/binn/portfile.cmake index e470f0f40b9496..1ce3a8cd51d2cd 100644 --- a/ports/binn/portfile.cmake +++ b/ports/binn/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO liteserver/binn - REF 38019c11e582e5078436b8257887e79a33db8b28 - SHA512 82c7ef211154303ebb4cb991e620da520231edd224de674d4dabc42760fd7b8b6dd7be167d6c0b6c04146ea7e077b0bcff14312be909cb4ebb1ec786863d3fb4 + REF b657ef3f38b37aa1e5dea88a9332889d0fbf3a81 # 3.0 + SHA512 14bf572152ec5343a161dea9ebfd2b63cd5ce48c0db3decf5591aa94ae7766771cf521ba22978e9ae8855feef694bad85951f3c4a29cb9ddd881918fc6d3722a HEAD_REF master PATCHES 0001_fix_uwp.patch diff --git a/ports/binn/vcpkg.json b/ports/binn/vcpkg.json new file mode 100644 index 00000000000000..09fc20cb203e7d --- /dev/null +++ b/ports/binn/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "binn", + "version-string": "3.0", + "port-version": 1, + "description": "Binn is a binary data serialization format designed to be compact, fast and easy to use." +} diff --git a/ports/bitmagic/portfile.cmake b/ports/bitmagic/portfile.cmake new file mode 100644 index 00000000000000..726277754c2952 --- /dev/null +++ b/ports/bitmagic/portfile.cmake @@ -0,0 +1,13 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tlk00/BitMagic + REF v7.2.0 + SHA512 74e7b32dcc66960a50e4976f82a0388d5e3b43c737c87277d5f2eac0f551866fca227704d61df867e6bd61e3dbc7b1de0e52ac48d732760f9dc7e50ecef9be6b + HEAD_REF master + +) + +file(GLOB HEADER_LIST "${SOURCE_PATH}/src/*.h") +file(INSTALL ${HEADER_LIST} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/bitmagic/vcpkg.json b/ports/bitmagic/vcpkg.json new file mode 100644 index 00000000000000..c6203e75567f13 --- /dev/null +++ b/ports/bitmagic/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "bitmagic", + "version-string": "7.2.0", + "port-version": 1, + "description": "Algorithms and tools for Algebra of Sets for information retrieval, indexing of databases, scientific algorithms, ranking, clustering, unsupervised machine learning and signal processing.", + "homepage": "http://bitmagic.io" +} diff --git a/ports/bitserializer-cpprestjson/CONTROL b/ports/bitserializer-cpprestjson/CONTROL deleted file mode 100644 index f75cd41a2ddace..00000000000000 --- a/ports/bitserializer-cpprestjson/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: bitserializer-cpprestjson -Version: 0.8 -Build-Depends: bitserializer, cpprestsdk -Description: This is an implementation of the BitSerializer archive for serialization JSON (based on CppRestSDK library). diff --git a/ports/bitserializer-cpprestjson/portfile.cmake b/ports/bitserializer-cpprestjson/portfile.cmake index 28430d5908fc96..0015715fb66c72 100644 --- a/ports/bitserializer-cpprestjson/portfile.cmake +++ b/ports/bitserializer-cpprestjson/portfile.cmake @@ -1,13 +1 @@ -include(vcpkg_common_functions) -vcpkg_from_bitbucket( - OUT_SOURCE_PATH SOURCE_PATH - REPO Pavel_Kisliak/BitSerializer - REF 0.8 - SHA512 6df5b3f7a472a55ba0aace22c44cb2adaf178fbc7f920dcaf7d7015f81badde98d64911ddb620e99a708214140d7c29561775c1b0fe60fef6f24d465a4eac093 - HEAD_REF master -) - -file(INSTALL ${SOURCE_PATH}/archives/bitserializer_cpprest_json DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bitserializer-cpprestjson RENAME copyright) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/bitserializer-cpprestjson/vcpkg.json b/ports/bitserializer-cpprestjson/vcpkg.json new file mode 100644 index 00000000000000..e12e04f042e611 --- /dev/null +++ b/ports/bitserializer-cpprestjson/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "bitserializer-cpprestjson", + "version-string": "alias", + "port-version": 1, + "description": "Deprecated alias for bitserializer-cpprestjson", + "dependencies": [ + { + "name": "bitserializer", + "features": [ + "cpprestjson-archive" + ] + } + ] +} diff --git a/ports/bitserializer-pugixml/portfile.cmake b/ports/bitserializer-pugixml/portfile.cmake new file mode 100644 index 00000000000000..0015715fb66c72 --- /dev/null +++ b/ports/bitserializer-pugixml/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/bitserializer-pugixml/vcpkg.json b/ports/bitserializer-pugixml/vcpkg.json new file mode 100644 index 00000000000000..8e705da12b69f1 --- /dev/null +++ b/ports/bitserializer-pugixml/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "bitserializer-pugixml", + "version-string": "alias", + "port-version": 1, + "description": "Deprecated alias for bitserializer-pugixml", + "dependencies": [ + { + "name": "bitserializer", + "features": [ + "pugixml-archive" + ] + } + ] +} diff --git a/ports/bitserializer-rapidjson/CONTROL b/ports/bitserializer-rapidjson/CONTROL deleted file mode 100644 index db65c52aefba6c..00000000000000 --- a/ports/bitserializer-rapidjson/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: bitserializer-rapidjson -Version: 0.8 -Build-Depends: bitserializer, rapidjson -Description: This is an implementation of the BitSerializer archive for serialization JSON (based on the RapidJson library). diff --git a/ports/bitserializer-rapidjson/portfile.cmake b/ports/bitserializer-rapidjson/portfile.cmake index 4050b73bc9a7b1..0015715fb66c72 100644 --- a/ports/bitserializer-rapidjson/portfile.cmake +++ b/ports/bitserializer-rapidjson/portfile.cmake @@ -1,13 +1 @@ -include(vcpkg_common_functions) -vcpkg_from_bitbucket( - OUT_SOURCE_PATH SOURCE_PATH - REPO Pavel_Kisliak/BitSerializer - REF 0.8 - SHA512 6df5b3f7a472a55ba0aace22c44cb2adaf178fbc7f920dcaf7d7015f81badde98d64911ddb620e99a708214140d7c29561775c1b0fe60fef6f24d465a4eac093 - HEAD_REF master -) - -file(INSTALL ${SOURCE_PATH}/archives/bitserializer_rapidjson DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bitserializer-rapidjson RENAME copyright) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/bitserializer-rapidjson/vcpkg.json b/ports/bitserializer-rapidjson/vcpkg.json new file mode 100644 index 00000000000000..2da6054e393980 --- /dev/null +++ b/ports/bitserializer-rapidjson/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "bitserializer-rapidjson", + "version-string": "alias", + "port-version": 1, + "description": "Deprecated alias for bitserializer-rapidjson", + "dependencies": [ + { + "name": "bitserializer", + "features": [ + "rapidjson-archive" + ] + } + ] +} diff --git a/ports/bitserializer-rapidyaml/portfile.cmake b/ports/bitserializer-rapidyaml/portfile.cmake new file mode 100644 index 00000000000000..0015715fb66c72 --- /dev/null +++ b/ports/bitserializer-rapidyaml/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/bitserializer-rapidyaml/vcpkg.json b/ports/bitserializer-rapidyaml/vcpkg.json new file mode 100644 index 00000000000000..590519df0b4620 --- /dev/null +++ b/ports/bitserializer-rapidyaml/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "bitserializer-rapidyaml", + "version-string": "alias", + "port-version": 1, + "description": "Deprecated alias for bitserializer-rapidyaml", + "supports": "!(arm | arm64 | osx)", + "dependencies": [ + { + "name": "bitserializer", + "features": [ + "rapidyaml-archive" + ] + } + ] +} diff --git a/ports/bitserializer/CONTROL b/ports/bitserializer/CONTROL deleted file mode 100644 index 35e02fe030844c..00000000000000 --- a/ports/bitserializer/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: bitserializer -Version: 0.8 -Description: The core part of library for serialization of arbitrary C++ types to various output formats. diff --git a/ports/bitserializer/portfile.cmake b/ports/bitserializer/portfile.cmake index 50eb93481b13fc..3b8e4184fdafad 100644 --- a/ports/bitserializer/portfile.cmake +++ b/ports/bitserializer/portfile.cmake @@ -1,13 +1,29 @@ -include(vcpkg_common_functions) vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH REPO Pavel_Kisliak/BitSerializer - REF 0.8 - SHA512 6df5b3f7a472a55ba0aace22c44cb2adaf178fbc7f920dcaf7d7015f81badde98d64911ddb620e99a708214140d7c29561775c1b0fe60fef6f24d465a4eac093 + REF 0.10 + SHA512 a8a5acf4f9cc83d3090a3b06efbca682f4e022b5206bc7859ba6738e4d49a7678aa55f431f1721d50b28d8bde126b672396baae27cbaa79f62e3dc237ae678e1 HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/core/bitserializer DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "cpprestjson-archive" BUILD_CPPRESTJSON_ARCHIVE + "rapidjson-archive" BUILD_RAPIDJSON_ARCHIVE + "pugixml-archive" BUILD_PUGIXML_ARCHIVE + "rapidyaml-archive" BUILD_RAPIDYAML_ARCHIVE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/bitserializer) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright -file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bitserializer RENAME copyright) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/bitserializer/vcpkg.json b/ports/bitserializer/vcpkg.json new file mode 100644 index 00000000000000..7bf83a25ea77f2 --- /dev/null +++ b/ports/bitserializer/vcpkg.json @@ -0,0 +1,41 @@ +{ + "name": "bitserializer", + "version": "0.10", + "port-version": 2, + "description": "Core part of C++ 17 library for serialization to JSON, XML, YAML", + "homepage": "https://bitbucket.org/Pavel_Kisliak/bitserializer", + "default-features": [ + "cpprestjson-archive", + "pugixml-archive", + "rapidjson-archive" + ], + "features": { + "cpprestjson-archive": { + "description": "Module for support JSON (implementation based on the CppRestSDK library)", + "dependencies": [ + "cpprestsdk" + ] + }, + "pugixml-archive": { + "description": "Module for support XML (implementation based on the PugiXml library)", + "dependencies": [ + "pugixml" + ] + }, + "rapidjson-archive": { + "description": "Module for support JSON (implementation based on the RapidJson library)", + "dependencies": [ + "rapidjson" + ] + }, + "rapidyaml-archive": { + "description": "Module for support YAML (implementation based on the RapidYaml library)", + "dependencies": [ + { + "name": "ryml", + "platform": "!arm & !arm64 & !osx" + } + ] + } + } +} diff --git a/ports/bitsery/CONTROL b/ports/bitsery/CONTROL deleted file mode 100644 index 3da15a7857b125..00000000000000 --- a/ports/bitsery/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: bitsery -Version: 4.6.0 -Description: Header only C++ binary serialization library diff --git a/ports/bitsery/fix-install-paths.patch b/ports/bitsery/fix-install-paths.patch deleted file mode 100755 index aa9130d8c57826..00000000000000 --- a/ports/bitsery/fix-install-paths.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8125a28..8daee28 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -34,9 +34,9 @@ install(TARGETS bitsery - install(EXPORT bitseryTargets - FILE "BitseryConfig.cmake" - NAMESPACE Bitsery:: -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/bitsery) -+ DESTINATION share/bitsery) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/BitseryConfigVersion.cmake -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/bitsery) -+ DESTINATION share/bitsery) - install(DIRECTORY include/bitsery - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - diff --git a/ports/bitsery/portfile.cmake b/ports/bitsery/portfile.cmake index bf3604a64db523..16fec4c35efa16 100644 --- a/ports/bitsery/portfile.cmake +++ b/ports/bitsery/portfile.cmake @@ -1,23 +1,20 @@ -include(vcpkg_common_functions) - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO fraillt/bitsery - REF v4.6.0 - SHA512 519aec8730f4b6f8d26aff17d984101990ade02888664eb2c40bc1085e4dcffbbe83b08216149da234c8195d1940ec06744f16312f60e362f7005b205aa829a6 - HEAD_REF master - PATCHES fix-install-paths.patch + OUT_SOURCE_PATH SOURCE_PATH + REPO fraillt/bitsery + REF c0fc083c9de805e5825d7553507569febf6a6f93 # v5.2.2 + SHA512 a4c8660f6e8dcb5162f6f75e0f1e4716032b8403e9461f42e0628955eb07dc7c17aec9f774f45c2c15cce28a231699a71815d3d6d7d0f34a1367ee1e2d944305 + HEAD_REF master ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" ) -vcpkg_install_cmake() +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) -# Delete redundant and empty directories -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") -# Install license -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/bitsery RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/bitsery/vcpkg.json b/ports/bitsery/vcpkg.json new file mode 100644 index 00000000000000..4fad8826041445 --- /dev/null +++ b/ports/bitsery/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "bitsery", + "version": "5.2.2", + "description": "Header only C++ binary serialization library", + "homepage": "https://github.com/fraillt/bitsery", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/blas/CMakeLists.txt b/ports/blas/CMakeLists.txt new file mode 100644 index 00000000000000..790f79e8baa70e --- /dev/null +++ b/ports/blas/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.17) + +project(Find_BLAS_external) +find_package(BLAS REQUIRED) diff --git a/ports/blas/portfile.cmake b/ports/blas/portfile.cmake new file mode 100644 index 00000000000000..f70aa46eabd3fb --- /dev/null +++ b/ports/blas/portfile.cmake @@ -0,0 +1,5 @@ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +# Make sure BLAS can be found +vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_PORT_DIR} + OPTIONS -DCMAKE_PREFIX_PATH="${CURRENT_PACKAGES_DIR}") diff --git a/ports/blas/vcpkg.json b/ports/blas/vcpkg.json new file mode 100644 index 00000000000000..aca4cf894e418c --- /dev/null +++ b/ports/blas/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "blas", + "version-string": "1", + "port-version": 1, + "description": "Metapackage for packages which provide BLAS", + "dependencies": [ + "openblas" + ] +} diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL deleted file mode 100644 index 8e91f8df6dca0a..00000000000000 --- a/ports/blaze/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: blaze -Version: 3.5 -Build-Depends: clapack (!osx), boost-exception -Homepage: https://bitbucket.org/blaze-lib/blaze -Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/ports/blaze/avoid-src-dir-generation.patch b/ports/blaze/avoid-src-dir-generation.patch deleted file mode 100644 index c57d6a4290332f..00000000000000 --- a/ports/blaze/avoid-src-dir-generation.patch +++ /dev/null @@ -1,113 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7ecc993..793ec34 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -63,8 +63,8 @@ endif() - #================================================================================================== - - find_package(LAPACK REQUIRED) --target_link_libraries(blaze INTERFACE ${LAPACK_LIBRARIES}) --target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) -+target_link_libraries(blaze INTERFACE $) -+target_compile_options(blaze INTERFACE $) - - - #================================================================================================== -@@ -72,7 +72,7 @@ target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) - #================================================================================================== - - find_package(Boost 1.54.0 REQUIRED) --target_include_directories(blaze INTERFACE ${Boost_INCLUDE_DIRS}) -+target_include_directories(blaze INTERFACE $) - - - #================================================================================================== -@@ -163,7 +163,7 @@ endif () - set(BLAZE_CACHE_SIZE ${BLAZE_CACHE_SIZE} CACHE STRING "Cache size of the CPU in bytes." FORCE) - - configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/CacheSize.h.in" -- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/CacheSize.h") -+ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/CacheSize.h") - - - #================================================================================================== -@@ -216,7 +216,7 @@ else () - endif () - - configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/BLAS.h.in" -- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/BLAS.h") -+ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/BLAS.h") - - - #================================================================================================== -@@ -227,7 +227,7 @@ set(BLAZE_TRANSPOSE_FLAG "columnVector" CACHE STRING "Specify the default transp - set_property(CACHE BLAZE_TRANSPOSE_FLAG PROPERTY STRINGS "columnVector;rowVector") - - configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/TransposeFlag.h.in" -- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/TransposeFlag.h") -+ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/TransposeFlag.h") - - - #================================================================================================== -@@ -238,7 +238,7 @@ set(BLAZE_STORAGE_ORDER "rowMajor" CACHE STRING "Specify the default storage ord - set_property(CACHE BLAZE_STORAGE_ORDER PROPERTY STRINGS "rowMajor;columnMajor") - - configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/StorageOrder.h.in" -- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/StorageOrder.h") -+ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/StorageOrder.h") - - - #================================================================================================== -@@ -254,7 +254,7 @@ else () - endif () - - configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/Vectorization.h.in" -- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/Vectorization.h") -+ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/Vectorization.h") - - - #================================================================================================== -@@ -300,7 +300,7 @@ elseif (BLAZE_SMP_THREADS STREQUAL "HPX") - endif () - - configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/SMP.h.in" -- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/SMP.h") -+ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/SMP.h") - - - #================================================================================================== -@@ -316,7 +316,7 @@ else () - endif () - - configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/Restrict.h.in" -- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/Restrict.h") -+ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/Restrict.h") - - - #================================================================================================== -@@ -346,7 +346,7 @@ else () - endif () - - configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/Optimizations.h.in" -- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/Optimizations.h") -+ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/Optimizations.h") - - - #================================================================================================== -@@ -364,7 +364,7 @@ else () - endif () - - configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/Inline.h.in" -- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/Inline.h") -+ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/Inline.h") - - - #================================================================================================== -@@ -379,6 +379,7 @@ write_basic_package_version_file( - COMPATIBILITY SameMajorVersion - ) - -+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/blaze DESTINATION include) - install(DIRECTORY blaze DESTINATION include) - install(TARGETS blaze EXPORT blazeTargets) - diff --git a/ports/blaze/fix-vm-build.patch b/ports/blaze/fix-vm-build.patch new file mode 100644 index 00000000000000..3936299e0a7a26 --- /dev/null +++ b/ports/blaze/fix-vm-build.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e5ab1f460..a23c6dbf5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -145,12 +145,13 @@ if (${BLAZE_CACHE_SIZE_AUTO}) + endif (flag EQUAL 0) + endif (APPLE) + +- if (flag) ++ string(REGEX MATCH "([0-9][0-9]+)" tmp ${tmp}) # Get a number containing at least 2 digits in the string tmp ++ ++ if (flag OR NOT tmp) + message("Cache size not found automatically. Using default value as cache size.") + set(tmp ${BLAZE_CACHE_SIZE_DEFAULT}) + endif (flag) + +- string(REGEX MATCH "([0-9][0-9]+)" tmp ${tmp}) # Get a number containing at least 2 digits in the string tmp + math(EXPR BLAZE_CACHE_SIZE ${tmp}*1024) # Convert to bytes (assuming that the value is given in kibibytes) + + endif (${BLAZE_CACHE_SIZE_AUTO}) diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake index 216a901092c2e6..8ef5792fd1891b 100644 --- a/ports/blaze/portfile.cmake +++ b/ports/blaze/portfile.cmake @@ -1,20 +1,18 @@ -include(vcpkg_common_functions) - vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH REPO blaze-lib/blaze - REF cac64f2b35002f74a8ad2410ce6fb562b2cd2371 - SHA512 89381d77e518cdea40b0aa5013b8c74cbd737a2ce8d2d6869df1789a8154d2170c692ce04cae907704808fcff4a52fe0860d3fa2ee898780ce650a294b10894f + REF 0380370f0626de2ad0ec7ea815803e22bbf6b42e + SHA512 47df2a291febf0565787ed9c4222ee1958d03c5b76c54923e4d8e44f75321c266e81d69ba4512a4ab07d7e431c065d025e01269cf9c1d5f0927f133885def4c7 HEAD_REF master PATCHES - avoid-src-dir-generation.patch + fix-vm-build.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBLAZE_SMP_THREADS=C++11 + -DBLAZE_SMP_THREADS=OpenMP ) vcpkg_install_cmake() @@ -24,5 +22,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/blaze/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/blaze) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/blaze/LICENSE ${CURRENT_PACKAGES_DIR}/share/blaze/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/blaze/vcpkg.json b/ports/blaze/vcpkg.json new file mode 100644 index 00000000000000..19a46638cbd977 --- /dev/null +++ b/ports/blaze/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "blaze", + "version-string": "3.8", + "port-version": 2, + "description": "Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic.", + "homepage": "https://bitbucket.org/blaze-lib/blaze", + "dependencies": [ + "boost-exception", + "lapack" + ] +} diff --git a/ports/blend2d/CONTROL b/ports/blend2d/CONTROL deleted file mode 100644 index 1854d386214a03..00000000000000 --- a/ports/blend2d/CONTROL +++ /dev/null @@ -1,10 +0,0 @@ -Source: blend2d -Version: beta_2019-07-16 -Description: Beta 2D Vector Graphics Powered by a JIT Compiler -Default-Features: jit, logging - -Feature: jit -Description: Default feature. Enables jit pipeline compilation. Not supported for ARM and UWP. - -Feature: logging -Description: Default feature. Enables logging. diff --git a/ports/blend2d/portfile.cmake b/ports/blend2d/portfile.cmake index 39f665afd9a6e6..4b50bf92c7d026 100644 --- a/ports/blend2d/portfile.cmake +++ b/ports/blend2d/portfile.cmake @@ -1,28 +1,28 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" ON_ARCH "wasm32" ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO blend2d/blend2d - REF 934d07161971aeef5c4ac3b15e69ff57929445ac - SHA512 71b17611c20a8a7d27a37b0984918ce4ed608d8d2d053d116cd4c0ca9b7fcad742f39ef9939d9addf600113c2ad399d1dc4ee72b5f036ccda58b7d4237316928 + REF 92ba4eaa2f22331bc9823ddb47f53dd8ce683c8b + SHA512 bb5585d0b73c2acc815a96d613c53c334b5f0d398e99cbaa7b7cf0c63b7a17d36a9f505779d9f5b549b6c6de69414183aadf1b2b8117552bdb273ad7167d761e HEAD_REF master ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_STATIC) -if(NOT ("jit" IN_LIST FEATURES)) - set(BLEND2D_BUILD_NO_JIT TRUE) -endif() -if(NOT ("logging" IN_LIST FEATURES)) - set(BLEND2D_BUILD_NO_LOGGING TRUE) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + jit BLEND2D_NO_JIT + logging BLEND2D_NO_JIT_LOGGING + tls BLEND2D_NO_TLS +) -if(NOT BLEND2D_BUILD_NO_JIT) +if(NOT BLEND2D_NO_JIT) vcpkg_from_github( OUT_SOURCE_PATH ASMJIT_SOURCE_PATH REPO asmjit/asmjit - REF 5d40561d14f93dc45613bfa03155d1dfb4f5825a - SHA512 88f16fc1ff8e9eb1b8d7441d7bd2e08d238a2104f3de94aaa16972faac704bf526996fa1556a3831701fb370f051df6839b4058690cf2f49ea5aeb1224c84fe0 + REF e7a728018e5d88ffa477430fa63bdebbf480fb02 + SHA512 99e0f40d6d90ff194cb9e3238c5090a7fb09f871eeaad24283c461214ef584002d4b00c066b303698f71c55b2ccdb926704ec485956d35fc70ea829eff4888a7 HEAD_REF master ) @@ -38,23 +38,20 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBLEND2D_STATIC=${BLEND2D_STATIC} - -DBLEND2D_BUILD_NO_JIT=${BLEND2D_BUILD_NO_JIT} - -DBLEND2D_BUILD_NO_LOGGING=${BLEND2D_BUILD_NO_LOGGING} + ${FEATURE_OPTIONS} ) - vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(BLEND2D_STATIC) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() - - # Handle copyright configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/blend2d/vcpkg.json b/ports/blend2d/vcpkg.json new file mode 100644 index 00000000000000..8c4eb58c2aeee9 --- /dev/null +++ b/ports/blend2d/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "blend2d", + "version-date": "2021-03-17", + "description": "Beta 2D Vector Graphics Powered by a JIT Compiler", + "homepage": "https://github.com/blend2d/blend2d", + "documentation": "https://blend2d.com/doc/index.html", + "supports": "!(arm | uwp)", + "default-features": [ + "jit", + "logging", + "tls" + ], + "features": { + "jit": { + "description": "Default feature. Enables jit pipeline compilation. Not supported for ARM and UWP." + }, + "logging": { + "description": "Default feature. Enables logging." + }, + "tls": { + "description": "Default feature. Enables use of thread_local feature. Disable for platforms where thread local storage is expensive or not supported." + } + } +} diff --git a/ports/blitz/portfile.cmake b/ports/blitz/portfile.cmake new file mode 100644 index 00000000000000..7e90f2a6456dcc --- /dev/null +++ b/ports/blitz/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO blitzpp/blitz + REF 839fc5e0f35b1c38a01cfd7a94e83de81e8a6b55 + SHA512 efb6b19691e23c95cf6abd59607bce299b0c02a12ce6be105a35ad8509ab564b8dac8d6363f048e547d199e117d2bdd0e4ef3046d3c411f669c0a453a0b75627 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path(${PYTHON2_DIR}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + -DBUILD_DOC=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/blitz/vcpkg.json b/ports/blitz/vcpkg.json new file mode 100644 index 00000000000000..22e8dd6e0bd098 --- /dev/null +++ b/ports/blitz/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "blitz", + "version-string": "2020-03-25", + "port-version": 1, + "description": "Blitz++ is a C++ template class library that provides high-performance multidimensional array containers for scientific computing.", + "homepage": "https://github.com/blitzpp/blitz", + "supports": "!(arm | arm64 | uwp)" +} diff --git a/ports/blosc/0002-export-blosc-config.patch b/ports/blosc/0002-export-blosc-config.patch new file mode 100644 index 00000000000000..31297f732d62c6 --- /dev/null +++ b/ports/blosc/0002-export-blosc-config.patch @@ -0,0 +1,66 @@ +diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt +index f4e5c29..24641ad 100644 +--- a/blosc/CMakeLists.txt ++++ b/blosc/CMakeLists.txt +@@ -122,14 +122,14 @@ endif (NOT DEACTIVATE_ZSTD) + + # targets + if (BUILD_SHARED) +- add_library(blosc_shared SHARED ${SOURCES}) +- set_target_properties(blosc_shared PROPERTIES OUTPUT_NAME blosc) +- set_target_properties(blosc_shared PROPERTIES ++ add_library(blosc SHARED ${SOURCES}) ++ #set_target_properties(blosc_shared PROPERTIES OUTPUT_NAME blosc) ++ set_target_properties(blosc PROPERTIES + VERSION ${version_string} + SOVERSION 1 # Change this when an ABI change happens + ) + set_property( +- TARGET blosc_shared ++ TARGET blosc + APPEND PROPERTY COMPILE_DEFINITIONS BLOSC_SHARED_LIBRARY) + endif() + +@@ -192,8 +192,8 @@ if (BUILD_TESTS) + endif() + + if (BUILD_SHARED) +- target_link_libraries(blosc_shared ${LIBS}) +- target_include_directories(blosc_shared PUBLIC ${BLOSC_INCLUDE_DIRS}) ++ target_link_libraries(blosc ${LIBS}) ++ target_include_directories(blosc PUBLIC $ $) + endif() + + if (BUILD_TESTS) +@@ -202,22 +202,24 @@ if (BUILD_TESTS) + endif() + + if(BUILD_STATIC) +- add_library(blosc_static STATIC ${SOURCES}) +- set_target_properties(blosc_static PROPERTIES OUTPUT_NAME blosc) ++ add_library(blosc STATIC ${SOURCES}) ++ #set_target_properties(blosc_static PROPERTIES OUTPUT_NAME blosc) + if (MSVC) +- set_target_properties(blosc_static PROPERTIES PREFIX lib) ++ #set_target_properties(blosc_static PROPERTIES PREFIX lib) + endif() +- target_link_libraries(blosc_static ${LIBS}) +- target_include_directories(blosc_static PUBLIC ${BLOSC_INCLUDE_DIRS}) ++ target_link_libraries(blosc ${LIBS}) ++ target_include_directories(blosc PUBLIC $ $) + endif(BUILD_STATIC) + + # install + if(BLOSC_INSTALL) + install(FILES blosc.h blosc-export.h DESTINATION include COMPONENT DEV) + if(BUILD_SHARED) +- install(TARGETS blosc_shared LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT LIB) ++ install(TARGETS blosc EXPORT blosc-config RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) + endif(BUILD_SHARED) + if(BUILD_STATIC) +- install(TARGETS blosc_static LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT DEV) ++ install(TARGETS blosc EXPORT blosc-config RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) + endif(BUILD_STATIC) + endif(BLOSC_INSTALL) ++ ++install(EXPORT blosc-config DESTINATION share/cmake/blosc) diff --git a/ports/blosc/CONTROL b/ports/blosc/CONTROL deleted file mode 100644 index 414685489872c1..00000000000000 --- a/ports/blosc/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: blosc -Version: 1.17.0-1 -Build-Depends: lz4, snappy, zlib, zstd -Homepage: https://github.com/Blosc/c-blosc -Description: A blocking, shuffling and loss-less compression library that can be faster than `memcpy()` diff --git a/ports/blosc/FindBlosc.cmake b/ports/blosc/FindBlosc.cmake deleted file mode 100644 index 11385d46d0458f..00000000000000 --- a/ports/blosc/FindBlosc.cmake +++ /dev/null @@ -1,33 +0,0 @@ -include(FindPackageHandleStandardArgs) - -find_path( - BLOSC_INCLUDE_DIRS - blosc.h -) - -get_filename_component(_prefix_path ${BLOSC_INCLUDE_DIRS} PATH) - -find_library( - BLOSC_LIBRARY_DEBUG - NAMES blosc - PATHS ${_prefix_path}/debug/lib - NO_DEFAULT_PATH -) - -find_library( - SNAPPY_LIBRARY_RELEASE - NAMES blosc - PATHS ${_prefix_path}/lib - NO_DEFAULT_PATH -) - -unset(_prefix_path) - -include(SelectLibraryConfigurations) -select_library_configurations(blosc) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - blosc - REQUIRED_VARS BLOSC_LIBRARIES BLOSC_INCLUDE_DIRS -) diff --git a/ports/blosc/portfile.cmake b/ports/blosc/portfile.cmake index aaf61eee0e8270..041548b478ae76 100644 --- a/ports/blosc/portfile.cmake +++ b/ports/blosc/portfile.cmake @@ -1,13 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Blosc/c-blosc - REF v1.17.0 - SHA512 7fe517e9d050a36839ddf963e718881533cc10a7c8963222b3167fd48ec84455614206c1cc2c248f52042a019262fa0419c4c1a828eb1ae64294c55bbaf56f6e + REF 9fae1c9acb659159321aca69aefcdbce663e2374 # v1.18.1 + SHA512 6cc77832100041aca8f320e44aa803adc0d3344b52742b995a3155b953e5d149534de65c8244d964448150b73715a81f54285d7d01f1b45d7b10fe07f5bdb141 HEAD_REF master PATCHES 0001-find-deps.patch + 0002-export-blosc-config.patch ) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -34,26 +33,11 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -if (BLOSC_SHARED) vcpkg_copy_pdbs() - if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/blosc.dll") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/blosc.dll ${CURRENT_PACKAGES_DIR}/bin/blosc.dll) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/blosc.dll") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/blosc.dll ${CURRENT_PACKAGES_DIR}/debug/bin/blosc.dll) - endif() -endif() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/blosc) # cleanup file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSES/BLOSC.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/blosc RENAME copyright) - -file(COPY - "${CMAKE_CURRENT_LIST_DIR}/FindBlosc.cmake" - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} -) diff --git a/ports/blosc/vcpkg.json b/ports/blosc/vcpkg.json new file mode 100644 index 00000000000000..f9b3e0513b9dae --- /dev/null +++ b/ports/blosc/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "blosc", + "version-string": "1.18.1", + "port-version": 2, + "description": "A blocking, shuffling and loss-less compression library that can be faster than `memcpy()`", + "homepage": "https://github.com/Blosc/c-blosc", + "dependencies": [ + "lz4", + "snappy", + "zlib", + "zstd" + ] +} diff --git a/ports/boinc/CMakeLists.txt b/ports/boinc/CMakeLists.txt new file mode 100644 index 00000000000000..635aa9011ab098 --- /dev/null +++ b/ports/boinc/CMakeLists.txt @@ -0,0 +1,233 @@ +cmake_minimum_required(VERSION 3.20) +project(boinc) + +find_package(OpenSSL REQUIRED) + +set(LIBBOINC_HEADERS_WIN + lib/boinc_win.h + lib/diagnostics_win.h + lib/idlemon.h + lib/stackwalker_imports.h + lib/stackwalker_win.h +) + +set(LIBBOINC_HEADERS_UNIX + lib/synch.h + lib/unix_util.h +) + +set(LIBBOINC_HEADERS_APPLE + lib/mac/dyld_gdb.h + lib/mac/mac_backtrace.h + lib/mac/mac_spawn.h + lib/mac/QBacktrace.h + lib/mac/QCrashReport.h + lib/mac/QMachOImage.h + lib/mac/QMachOImageList.h + lib/mac/QSymbols.h + lib/mac/QTaskMemory.h + lib/mac/mac_branding.h +) + +set(LIBBOINC_HEADERS_GENERIC + lib/app_ipc.h + lib/base64.h + lib/cal_boinc.h + lib/cc_config.h + lib/cert_sig.h + lib/common_defs.h + lib/coproc.h + lib/crypt.h + lib/diagnostics.h + lib/error_numbers.h + lib/filesys.h + lib/hostinfo.h + lib/keyword.h + lib/md5.h + lib/md5_file.h + lib/mem_usage.h + lib/mfile.h + lib/miofile.h + lib/network.h + lib/notice.h + lib/opencl_boinc.h + lib/parse.h + lib/prefs.h + lib/proc_control.h + lib/procinfo.h + lib/project_init.h + lib/proxy_info.h + lib/std_fixes.h + lib/str_replace.h + lib/str_util.h + lib/url.h + lib/util.h + lib/win_util.h + lib/wslinfo.h +) + +set(LIBBOINC_SOURCES_WIN + lib/boinc_win.cpp + lib/diagnostics_win.cpp + lib/idlemon_win.cpp + lib/procinfo_win.cpp + lib/stackwalker_win.cpp + lib/win_util.cpp +) + +set(LIBBOINC_SOURCES_UNIX + lib/procinfo_unix.cpp + lib/synch.cpp + lib/unix_util.cpp +) + +set(LIBBOINC_SOURCES_APPLE + lib/procinfo_mac.cpp + lib/mac/mac_backtrace.cpp + lib/mac/mac_spawn.cpp + lib/mac/QBacktrace.c + lib/mac/QCrashReport.c + lib/mac/QMachOImage.c + lib/mac/QMachOImageList.c + lib/mac/QSymbols.c + lib/mac/QTaskMemory.c + lib/mac/mac_branding.cpp +) + +set(LIBBOINC_SOURCES_GENERIC + lib/app_ipc.cpp + lib/base64.cpp + lib/cc_config.cpp + lib/cert_sig.cpp + lib/coproc.cpp + lib/crypt.cpp + lib/diagnostics.cpp + lib/filesys.cpp + lib/hostinfo.cpp + lib/keyword.cpp + lib/md5.cpp + lib/md5_file.cpp + lib/mem_usage.cpp + lib/mfile.cpp + lib/miofile.cpp + lib/network.cpp + lib/notice.cpp + lib/opencl_boinc.cpp + lib/parse.cpp + lib/prefs.cpp + lib/proc_control.cpp + lib/procinfo.cpp + lib/project_init.cpp + lib/proxy_info.cpp + lib/shmem.cpp + lib/str_util.cpp + lib/url.cpp + lib/util.cpp + lib/wslinfo.cpp +) + +set(LIBBOINCAPI_HEADERS + api/boinc_api.h +) + +set(LIBBOINCAPI_SOURCES_WIN + lib/boinc_win.cpp +) + +set(LIBBOINCAPI_SOURCES_GENERIC + api/boinc_api.cpp +) + +if(APPLE) + set(LIBBOINC_HEADERS ${LIBBOINC_HEADERS_GENERIC} ${LIBBOINC_HEADERS_APPLE}) + set(LIBBOINC_SOURCES ${LIBBOINC_SOURCES_GENERIC} ${LIBBOINC_SOURCES_APPLE}) + + set(LIBBOINCAPI_SOURCES ${LIBBOINCAPI_SOURCES_GENERIC}) +elseif(WIN32) + set(LIBBOINC_HEADERS ${LIBBOINC_HEADERS_GENERIC} ${LIBBOINC_HEADERS_WIN}) + set(LIBBOINC_SOURCES ${LIBBOINC_SOURCES_GENERIC} ${LIBBOINC_SOURCES_WIN}) + + set(LIBBOINCAPI_SOURCES ${LIBBOINCAPI_SOURCES_GENERIC} ${LIBBOINCAPI_SOURCES_WIN}) +elseif(UNIX) + set(LIBBOINC_HEADERS ${LIBBOINC_HEADERS_GENERIC} ${LIBBOINC_HEADERS_UNIX}) + set(LIBBOINC_SOURCES ${LIBBOINC_SOURCES_GENERIC} ${LIBBOINC_SOURCES_UNIX}) + + set(LIBBOINCAPI_SOURCES ${LIBBOINCAPI_SOURCES_GENERIC}) +endif() + +add_library(boinc ${LIBBOINC_SOURCES}) +add_library(boincapi ${LIBBOINCAPI_SOURCES}) + +if(WIN32 OR APPLE) + set_target_properties(boinc PROPERTIES PREFIX "lib") + set_target_properties(boinc PROPERTIES IMPORT_PREFIX "lib") + + set_target_properties(boincapi PROPERTIES PREFIX "lib") + set_target_properties(boincapi PROPERTIES IMPORT_PREFIX "lib") +endif() + +if(APPLE) + target_include_directories(boinc PUBLIC + $ + $ + ) + + target_include_directories(boincapi PUBLIC + $ + $ + ) +elseif(WIN32) + target_compile_definitions(boinc PUBLIC + -D_CRT_SECURE_NO_WARNINGS + -DWIN32 + -D_CONSOLE + ) + + target_compile_definitions(boincapi PUBLIC + -D_CRT_SECURE_NO_WARNINGS + -DWIN32 + -D_CONSOLE + ) + + target_include_directories(boinc PUBLIC + $ + ) + + target_include_directories(boincapi PUBLIC + $ + ) +elseif(UNIX) + target_include_directories(boinc PUBLIC + $ + ) + + target_include_directories(boincapi PUBLIC + $ + ) +endif() + +target_include_directories(boinc PUBLIC + $ + $ + $ +) + +target_include_directories(boincapi PUBLIC + $ + $/lib + $ +) + +target_link_libraries(boinc PRIVATE + OpenSSL::SSL + OpenSSL::Crypto +) + +install(TARGETS boinc boincapi EXPORT boinc-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) + +install(FILES ${LIBBOINC_HEADERS} ${LIBBOINCAPI_HEADERS} DESTINATION include/boinc) +install(EXPORT boinc-config NAMESPACE unofficial::boinc:: DESTINATION share/boinc) diff --git a/ports/boinc/portfile.cmake b/ports/boinc/portfile.cmake new file mode 100644 index 00000000000000..d2e17db124eeb7 --- /dev/null +++ b/ports/boinc/portfile.cmake @@ -0,0 +1,49 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BOINC/boinc + REF client_release/7.18/7.18.1 + SHA512 200587a0896aec6a7e7247132811141909aa333cb2bb9350c5ba016ffdf056413b1c5346361b311c087634b2d29cdbb204486385d8561a299b68739244c5a532 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if(VCPKG_TARGET_IS_LINUX) + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + NO_ADDITIONAL_PATHS + OPTIONS + ${OPTIONS} + --disable-server + --disable-client + --disable-manager + ) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.h DESTINATION ${SOURCE_PATH}/config-h-Release) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/config.h DESTINATION ${SOURCE_PATH}/config-h-Debug) + endif() +endif() + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/COPYING.LESSER" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME license) diff --git a/ports/boinc/vcpkg.json b/ports/boinc/vcpkg.json new file mode 100644 index 00000000000000..126e73dbfde6cf --- /dev/null +++ b/ports/boinc/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "boinc", + "version": "7.18.1", + "description": "Open-source software for volunteer computing and grid computing.", + "homepage": "https://boinc.berkeley.edu/", + "supports": "!(windows & arm) & !uwp", + "dependencies": [ + "openssl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/bond/CONTROL b/ports/bond/CONTROL deleted file mode 100644 index a4361dfb0420d4..00000000000000 --- a/ports/bond/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: bond -Maintainer: bond@microsoft.com -Version: 8.1.0-2 -Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services. -Homepage: https://github.com/Microsoft/bond -Build-Depends: rapidjson, boost-config, boost-utility, boost-assign diff --git a/ports/bond/fix-install-path.patch b/ports/bond/fix-install-path.patch index e5fa270c192374..643e0cfbfbf0d3 100644 --- a/ports/bond/fix-install-path.patch +++ b/ports/bond/fix-install-path.patch @@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index f2f8eaa..1b0c01c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -18,7 +18,7 @@ set (BOND_FIND_RAPIDJSON +@@ -23,7 +23,7 @@ set (BOND_FIND_RAPIDJSON # settings so that we don't apply our settings to third-party code. add_subdirectory (thirdparty) @@ -11,7 +11,7 @@ index f2f8eaa..1b0c01c 100644 set (BOND_IDL ${CMAKE_CURRENT_SOURCE_DIR}/idl) set (BOND_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/cpp/inc) -@@ -80,6 +80,6 @@ if (BOND_GBC_PATH) +@@ -85,6 +85,6 @@ if (BOND_GBC_PATH) install ( FILES ${BOND_GBC_PATH} @@ -35,7 +35,7 @@ index 1dff9d0..9a11575 100644 @@ -130,7 +130,7 @@ endif() install (FILES ${output} - PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE + PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - DESTINATION bin) + DESTINATION ${completion_dir}) diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index 921b1b8cc82f5c..0d424e78f43edd 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -1,64 +1,69 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bond-7.0.2) +set(BOND_VER 9.0.3) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/bond - REF 8.1.0 - SHA512 287a2d299036b57e0576903b1f5372bf8071243ada57153c4bf231cdc660faab1e70c60ddde57ac759d941b74af4ba25d81a5d58e8dbf391032b7b226c4cd18c + REF ${BOND_VER} + SHA512 3a7884eb00e6d0ab40c688f4a40cb2d3f356c48b38d48a9a08c756047a94b82619ef345483f42c3240732f5da06816b65a61acb83bfebb3c2c6b44099ce71bf9 HEAD_REF master - PATCHES fix-install-path.patch + PATCHES fix-install-path.patch skip-grpc-compilation.patch ) -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (VCPKG_TARGET_IS_WINDOWS) vcpkg_download_distfile(GBC_ARCHIVE - URLS "https://github.com/microsoft/bond/releases/download/8.1.0/gbc-8.1.0-amd64.zip" - FILENAME "gbc-8.1.0-amd64.zip" - SHA512 896c9a78fc714e0ea44c37ed36400ec8e5f52d495a8d81aa80834ff6cd6303c7c94e06129f7b2269416a9e0ffb61423e87406db798fb5be7ff00f14981530089 + URLS "https://github.com/microsoft/bond/releases/download/${BOND_VER}/gbc-${BOND_VER}-amd64.zip" + FILENAME "gbc-${BOND_VER}-amd64.zip" + SHA512 41a4e01a9a0f6246a3c07f516f2c0cfc8a837eff2166c2bb787877e409d6f55eeb6084e63aabc3502492775a3fa7e381bf37fde0bdfced50a9d0b39dfaca7dfd ) - + + # Clear the generator to prevent it from updating + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/tools/) # Extract the precompiled gbc - vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/) - set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc.exe) + vcpkg_extract_source_archive(extracted_tool_dir ARCHIVE "${GBC_ARCHIVE}" NO_REMOVE_ONE_LEVEL) + file(RENAME "${extracted_tool_dir}" "${CURRENT_BUILDTREES_DIR}/tools") - if (NOT EXISTS "${FETCHED_GBC_PATH}") - message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.") + set(FETCHED_GBC_PATH "${CURRENT_BUILDTREES_DIR}/tools/gbc-${BOND_VER}-amd64.exe") + if(NOT EXISTS "${FETCHED_GBC_PATH}") + message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exist, but it doesn't.") endif() - else() # According to the readme on https://github.com/microsoft/bond/ # The build needs a version of the Haskel Tool stack that is newer than some distros ship with. # For this reason the message is not guarded by checking to see if the tool is installed. message("\nA recent version of Haskell Tool Stack is required to build.\n For information on how to install see https://docs.haskellstack.org/en/stable/README/\n") - + endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + bond-over-grpc BOND_ENABLE_GRPC +) + vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DBOND_LIBRARIES_ONLY=TRUE - -DBOND_GBC_PATH=${FETCHED_GBC_PATH} - -DBOND_SKIP_GBC_TESTS=TRUE - -DBOND_ENABLE_COMM=FALSE - -DBOND_ENABLE_GRPC=FALSE - -DBOND_FIND_RAPIDJSON=TRUE + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBOND_LIBRARIES_ONLY=TRUE + -DBOND_GBC_PATH=${FETCHED_GBC_PATH} + -DBOND_SKIP_GBC_TESTS=TRUE + -DBOND_ENABLE_COMM=FALSE + -DBOND_FIND_RAPIDJSON=TRUE + -DBOND_STACK_OPTIONS=--allow-different-user + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/bond TARGET_PATH share/bond) -# Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/bond) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/bond/LICENSE ${CURRENT_PACKAGES_DIR}/share/bond/copyright) +vcpkg_copy_pdbs() # There's no way to supress installation of the headers in the debug build, # so we just delete them. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -vcpkg_copy_pdbs() +# Put the license file where vcpkg expects it +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/bond/skip-grpc-compilation.patch b/ports/bond/skip-grpc-compilation.patch new file mode 100644 index 00000000000000..10906b13137b6b --- /dev/null +++ b/ports/bond/skip-grpc-compilation.patch @@ -0,0 +1,11 @@ +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index f8c7bf3..e69de29 100644 +--- a/thirdparty/CMakeLists.txt ++++ b/thirdparty/CMakeLists.txt +@@ -1,6 +0,0 @@ +-include (Compiler) +- +-if (BOND_ENABLE_GRPC) +- cxx_add_compile_options (Clang -Wno-unused-value) +- add_subdirectory(grpc) +-endif() diff --git a/ports/bond/vcpkg.json b/ports/bond/vcpkg.json new file mode 100644 index 00000000000000..5155d3a4117b1d --- /dev/null +++ b/ports/bond/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "bond", + "version": "9.0.3", + "port-version": 2, + "description": "Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.", + "homepage": "https://github.com/Microsoft/bond", + "dependencies": [ + "boost-assign", + "boost-config", + "boost-locale", + "boost-utility", + "rapidjson" + ], + "features": { + "bond-over-grpc": { + "description": "Bond-over-gRPC provides code generation from Bond IDL service definitions to send Bond objects via gRPC.", + "dependencies": [ + "grpc" + ] + } + } +} diff --git a/ports/boolinq/CONTROL b/ports/boolinq/CONTROL deleted file mode 100644 index aa246d2dc5bbc9..00000000000000 --- a/ports/boolinq/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: boolinq -Version: 2019-07-22 -Description: Super tiny C++11 single-file header-only LINQ library -Homepage: https://github.com/k06a/boolinq diff --git a/ports/boolinq/portfile.cmake b/ports/boolinq/portfile.cmake index 35ad4994ff13b7..1d75e3e2d76735 100644 --- a/ports/boolinq/portfile.cmake +++ b/ports/boolinq/portfile.cmake @@ -1,12 +1,10 @@ # Single-file header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO k06a/boolinq - REF 1d09dc8b3df79801062e5c0e758572552fa4ce98 - SHA512 0714a97d09bb8299d39062803a8cd5de28834c372f7826afc36e17ea6aa90d2ec368d5bbb907914ad1ca5a65be41a5caeaa1583f66358577d7ea88d3c0906238 + REF d8456eae92508d8a14fb209e8aa6dc1a1ae6b56d #v3.0.1 + SHA512 587d91c05cc2f3a900c2614832fe61f4c60b0ffe8ca3af273736ef7eaf6aa57185b9aa62906bf7d26beffd1fad3790b49107fe68c72d924509ca744212fdaee1 HEAD_REF master ) diff --git a/ports/boolinq/vcpkg.json b/ports/boolinq/vcpkg.json new file mode 100644 index 00000000000000..7d0dfc1a826f33 --- /dev/null +++ b/ports/boolinq/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "boolinq", + "version": "3.0.1", + "description": "Super tiny C++11 single-file header-only LINQ library", + "homepage": "https://github.com/k06a/boolinq" +} diff --git a/ports/boost-accumulators/CONTROL b/ports/boost-accumulators/CONTROL deleted file mode 100644 index 0d0be2efd0be6f..00000000000000 --- a/ports/boost-accumulators/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-accumulators -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-interval, boost-iterator, boost-mpl, boost-numeric-conversion, boost-odeint, boost-parameter, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-ublas, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/accumulators -Description: Boost accumulators module diff --git a/ports/boost-accumulators/portfile.cmake b/ports/boost-accumulators/portfile.cmake index dc0cd61b1022e3..c89e31181c5280 100644 --- a/ports/boost-accumulators/portfile.cmake +++ b/ports/boost-accumulators/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/accumulators - REF boost-1.70.0 - SHA512 5f4b80082b033f1b5a8d2fa7f69410e334632d535011fefc6792331b2d77e27904b1cc7cef5a77891cec09cd329b08589552529c8feabb6b2da9676da3fc0dff + REF boost-1.76.0 + SHA512 51c5a64ec68274c77a674dfa15b106df2a341018498501a882d1fbeddcdee40944422184cf102986ce5c5fb1e7e5bf388566f94893a2bb6da98ec666fa20287d HEAD_REF master ) diff --git a/ports/boost-accumulators/vcpkg.json b/ports/boost-accumulators/vcpkg.json new file mode 100644 index 00000000000000..b0d7a0cc1e4e53 --- /dev/null +++ b/ports/boost-accumulators/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "boost-accumulators", + "version": "1.76.0", + "description": "Boost accumulators module", + "homepage": "https://github.com/boostorg/accumulators", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-circular-buffer", + "boost-concept-check", + "boost-config", + "boost-core", + "boost-detail", + "boost-fusion", + "boost-interval", + "boost-iterator", + "boost-mpl", + "boost-numeric-conversion", + "boost-odeint", + "boost-parameter", + "boost-preprocessor", + "boost-range", + "boost-serialization", + "boost-static-assert", + "boost-throw-exception", + "boost-tuple", + "boost-type-traits", + "boost-typeof", + "boost-ublas", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-algorithm/CONTROL b/ports/boost-algorithm/CONTROL deleted file mode 100644 index bda5627cbdae6e..00000000000000 --- a/ports/boost-algorithm/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-algorithm -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-iterator, boost-mpl, boost-range, boost-regex, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/algorithm -Description: Boost algorithm module diff --git a/ports/boost-algorithm/portfile.cmake b/ports/boost-algorithm/portfile.cmake index f0184ebba4b3f5..056fdcd511d43a 100644 --- a/ports/boost-algorithm/portfile.cmake +++ b/ports/boost-algorithm/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/algorithm - REF boost-1.70.0 - SHA512 3510cb1d837f04b26a009324ed123af756c2f47ec825e0148e11af4cf5a280e7df732552415015e18ccfb63e8077acebb5860c89af7dd3bb0fef878d67373aa2 + REF boost-1.76.0 + SHA512 1a421f88244e07de254ea8f050e74ed0b0de889ea7a39d95daaf1f55ec5455d9dc7bcb3ae55970885dc6cd5ac6b5f9637146420eadcc59a12fc2753c842207c3 HEAD_REF master ) diff --git a/ports/boost-algorithm/vcpkg.json b/ports/boost-algorithm/vcpkg.json new file mode 100644 index 00000000000000..98aa477b93bf89 --- /dev/null +++ b/ports/boost-algorithm/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "boost-algorithm", + "version": "1.76.0", + "description": "Boost algorithm module", + "homepage": "https://github.com/boostorg/algorithm", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-bind", + "boost-concept-check", + "boost-config", + "boost-core", + "boost-detail", + "boost-exception", + "boost-function", + "boost-iterator", + "boost-mpl", + "boost-range", + "boost-regex", + "boost-static-assert", + "boost-throw-exception", + "boost-tuple", + "boost-type-traits", + "boost-unordered", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-align/CONTROL b/ports/boost-align/CONTROL deleted file mode 100644 index 31d92ab53fb727..00000000000000 --- a/ports/boost-align/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-align -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/align -Description: Boost align module diff --git a/ports/boost-align/portfile.cmake b/ports/boost-align/portfile.cmake index bcb356a7f0dbee..c19f35cb6fe74c 100644 --- a/ports/boost-align/portfile.cmake +++ b/ports/boost-align/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/align - REF boost-1.70.0 - SHA512 862c7e440e9fef88430a18bc3916f236578dca16dbcbc007f23fdbbf114933342d1c4f2c763d189fec510210aa011f3ff9f6f326a0a46ab549857f8afe4f64a1 + REF boost-1.76.0 + SHA512 5b9f646512a79c7848989b5d9c2d1e67b3db86cc751d2e1034969412715c7d27a7558ecfececcad3db3ddb49a9b4ca664c9ae844f3e57b32d443549968e2ac9b HEAD_REF master ) diff --git a/ports/boost-align/vcpkg.json b/ports/boost-align/vcpkg.json new file mode 100644 index 00000000000000..6556e1dafdf306 --- /dev/null +++ b/ports/boost-align/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "boost-align", + "version": "1.76.0", + "description": "Boost align module", + "homepage": "https://github.com/boostorg/align", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-static-assert", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-any/CONTROL b/ports/boost-any/CONTROL deleted file mode 100644 index b7f37834e32c7e..00000000000000 --- a/ports/boost-any/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-any -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/any -Description: Boost any module diff --git a/ports/boost-any/portfile.cmake b/ports/boost-any/portfile.cmake index 05e18ee94a74f8..cbfc500920d099 100644 --- a/ports/boost-any/portfile.cmake +++ b/ports/boost-any/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/any - REF boost-1.70.0 - SHA512 ee0f9badba0d90807a8462fffc1c6880e06dd1cf43333a8f77c8b490007f4ebbdd30fae9046c18b2b8a48c2be8d0a28b3b4f3e8021a3b6491a319716aaa9bca3 + REF boost-1.76.0 + SHA512 38f0bf6dddcdf5ce5527d068057de1ce9594605d51dde8f1591decb6423a912be2047fd2ed1b77acf42eb22d5e44a29276db9e9a24fad1596c589a58354307ba HEAD_REF master ) diff --git a/ports/boost-any/vcpkg.json b/ports/boost-any/vcpkg.json new file mode 100644 index 00000000000000..ccddcf0a54d520 --- /dev/null +++ b/ports/boost-any/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-any", + "version": "1.76.0", + "description": "Boost any module", + "homepage": "https://github.com/boostorg/any", + "dependencies": [ + "boost-config", + "boost-core", + "boost-static-assert", + "boost-throw-exception", + "boost-type-index", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-array/CONTROL b/ports/boost-array/CONTROL deleted file mode 100644 index 442caaf0f67f6b..00000000000000 --- a/ports/boost-array/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-array -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/array -Description: Boost array module diff --git a/ports/boost-array/portfile.cmake b/ports/boost-array/portfile.cmake index 25f50d3f8b39ef..9dbcd35278b178 100644 --- a/ports/boost-array/portfile.cmake +++ b/ports/boost-array/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/array - REF boost-1.70.0 - SHA512 d741425add056b019c27b1bfc5f174d31945950f57a23be59dfa7f262902191142486112c1fa0002d58a4771e69c76435196d222aaddee148cc78796c5f3f05b + REF boost-1.76.0 + SHA512 76109a4c45ba9ec880fd419cb6287ffc7f78b141c3b42f8ac934317093fbb632376381895863fa874187252e3047cd9cf4501f3fef04b559fb90a66e3b6acb50 HEAD_REF master ) diff --git a/ports/boost-array/vcpkg.json b/ports/boost-array/vcpkg.json new file mode 100644 index 00000000000000..dd907b0d824ab4 --- /dev/null +++ b/ports/boost-array/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "boost-array", + "version": "1.76.0", + "description": "Boost array module", + "homepage": "https://github.com/boostorg/array", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-detail", + "boost-static-assert", + "boost-throw-exception", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-asio/CONTROL b/ports/boost-asio/CONTROL deleted file mode 100644 index 123d9f854e4b33..00000000000000 --- a/ports/boost-asio/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-asio -Version: 1.70.0-2 -Build-Depends: boost-array, boost-assert, boost-bind, boost-chrono, boost-compatibility, boost-config, boost-coroutine (!uwp), boost-date-time, boost-detail, boost-function, boost-integer, boost-regex, boost-smart-ptr, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, openssl -Homepage: https://github.com/boostorg/asio -Description: Boost asio module diff --git a/ports/boost-asio/portfile.cmake b/ports/boost-asio/portfile.cmake index f24dd1aeda5635..a2da348041f418 100644 --- a/ports/boost-asio/portfile.cmake +++ b/ports/boost-asio/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/asio - REF boost-1.70.0 - SHA512 394c7e557d97bbb8b98453846a098c8ab7f4eb92d752bd4089d2020e0d5060cff1e53f5e50b2f8910e64b66c934b2bde4a7137bd1a6050e8b1279c2e4576b2e5 + REF boost-1.76.0 + SHA512 d9706045510dc65dfb5d84fded39cb7bbbf44d9f1ba079efc3802962f30ba36ceb7b1610d47822348a910bbca857d0fee8ffef767921a9a75ee9565f9eb63a79 HEAD_REF master PATCHES windows_alloca_header.patch ) diff --git a/ports/boost-asio/vcpkg.json b/ports/boost-asio/vcpkg.json new file mode 100644 index 00000000000000..8effa61df868a9 --- /dev/null +++ b/ports/boost-asio/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "boost-asio", + "version": "1.76.0", + "description": "Boost asio module", + "homepage": "https://github.com/boostorg/asio", + "supports": "!emscripten", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-bind", + "boost-chrono", + "boost-config", + { + "name": "boost-coroutine", + "platform": "!arm & !uwp & !emscripten" + }, + "boost-date-time", + "boost-detail", + "boost-function", + "boost-regex", + "boost-smart-ptr", + "boost-system", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers", + "openssl" + ] +} diff --git a/ports/boost-assert/CONTROL b/ports/boost-assert/CONTROL deleted file mode 100644 index 9b2b6f1e521f80..00000000000000 --- a/ports/boost-assert/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-assert -Version: 1.70.0 -Build-Depends: boost-config, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/assert -Description: Boost assert module diff --git a/ports/boost-assert/portfile.cmake b/ports/boost-assert/portfile.cmake index a4e95199990875..b50ec9f1b11da2 100644 --- a/ports/boost-assert/portfile.cmake +++ b/ports/boost-assert/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/assert - REF boost-1.70.0 - SHA512 8bd823a51b5cdad0b016f4b319c64c0965112b163fd0f721830e26195bc2de4a7767308ae6fdc044c621dc0fb14f60f890a994c36de2942095453854288497eb + REF boost-1.76.0 + SHA512 bcd8d1fea358916d4ac8a707edee13bdc4b269a05f1456c3780fa525a2fe1438e8af1ca8689171da8bb3bb7ea2b02f0ed10ddc1204a5b52a885e2eebd1ba4f23 HEAD_REF master ) diff --git a/ports/boost-assert/vcpkg.json b/ports/boost-assert/vcpkg.json new file mode 100644 index 00000000000000..9e92a39cac3a48 --- /dev/null +++ b/ports/boost-assert/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "boost-assert", + "version": "1.76.0", + "description": "Boost assert module", + "homepage": "https://github.com/boostorg/assert", + "dependencies": [ + "boost-config", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-assign/CONTROL b/ports/boost-assign/CONTROL deleted file mode 100644 index 60d906bb8d0049..00000000000000 --- a/ports/boost-assign/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-assign -Version: 1.70.0 -Build-Depends: boost-array, boost-config, boost-detail, boost-move, boost-mpl, boost-preprocessor, boost-ptr-container, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/assign -Description: Boost assign module diff --git a/ports/boost-assign/portfile.cmake b/ports/boost-assign/portfile.cmake index 2a92e25130ec1c..3628044ae12d88 100644 --- a/ports/boost-assign/portfile.cmake +++ b/ports/boost-assign/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/assign - REF boost-1.70.0 - SHA512 bae75fe87fe6de3c9b20e89ee818b2927cc1e6de90776163376113ff0ca103a338850b915b143e8d6047f733c0fa9c7517ca73688e830485bb66062898d3142f + REF boost-1.76.0 + SHA512 fce24fed1b909d108176ed9c52e9c8dfd53aa7eab063f99d83bf7b0d37db64494c5d47fe60bcade57d59afb4da53c50c0101c4a14316b043e5a018444ed4e34a HEAD_REF master ) diff --git a/ports/boost-assign/vcpkg.json b/ports/boost-assign/vcpkg.json new file mode 100644 index 00000000000000..512d9b55aa7412 --- /dev/null +++ b/ports/boost-assign/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "boost-assign", + "version": "1.76.0", + "description": "Boost assign module", + "homepage": "https://github.com/boostorg/assign", + "dependencies": [ + "boost-array", + "boost-config", + "boost-detail", + "boost-move", + "boost-mpl", + "boost-preprocessor", + "boost-ptr-container", + "boost-range", + "boost-static-assert", + "boost-throw-exception", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-atomic/CONTROL b/ports/boost-atomic/CONTROL deleted file mode 100644 index ffa7c49a3696b0..00000000000000 --- a/ports/boost-atomic/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-atomic -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-integer, boost-modular-build-helper, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/atomic -Description: Boost atomic module diff --git a/ports/boost-atomic/portfile.cmake b/ports/boost-atomic/portfile.cmake index e311b24f49f80e..2c5f291955f93a 100644 --- a/ports/boost-atomic/portfile.cmake +++ b/ports/boost-atomic/portfile.cmake @@ -1,16 +1,25 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/atomic - REF boost-1.70.0 - SHA512 00a1fd7731705a3298a19c4a40795d8ab2147a4940e55257ad33e8b7181f9d9a90ebdc0c2bb4f95c1a06ace0a2a5d39762674c2cd6598205151890df3859b251 + REF boost-1.76.0 + SHA512 8677c5bd03f089b75f8fac891f9d0383510096c64490936b766a94fdbfd984cd550f41e3e7dbed76372ca81ab8264d2d5fc2dcaadb87a52b4ebb7b0aa3b6feeb HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE + "project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ]" + "project.load [ path.join [ path.make $(here:D) ] config/checks/architecture ]" + _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-atomic requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-atomic/vcpkg.json b/ports/boost-atomic/vcpkg.json new file mode 100644 index 00000000000000..4a684f35575602 --- /dev/null +++ b/ports/boost-atomic/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "boost-atomic", + "version": "1.76.0", + "description": "Boost atomic module", + "homepage": "https://github.com/boostorg/atomic", + "dependencies": [ + "boost-align", + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-predef", + "boost-preprocessor", + "boost-static-assert", + "boost-type-traits", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-beast/CONTROL b/ports/boost-beast/CONTROL deleted file mode 100644 index 7355df55bfdcdf..00000000000000 --- a/ports/boost-beast/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-beast -Version: 1.70.0 -Build-Depends: boost-align, boost-asio, boost-assert, boost-bind, boost-config, boost-container, boost-core, boost-endian, boost-intrusive, boost-logic, boost-mp11, boost-optional, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/beast -Description: Boost beast module diff --git a/ports/boost-beast/portfile.cmake b/ports/boost-beast/portfile.cmake index d65e4318e05640..b4d0f94efa4041 100644 --- a/ports/boost-beast/portfile.cmake +++ b/ports/boost-beast/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/beast - REF boost-1.70.0 - SHA512 7f0c36d80f26b47b902bf78e066dfa3b1fd5ef5e5088c00d2aabef16805531b993efa94a25d84e8d1321c41fc021d46da25cb3ffe49fa42ae67813af333f453d + REF boost-1.76.0 + SHA512 8fca87bdbd17ba7701fab6527043ff33c15b0c544b62448a2c269e4c0baab51fcedaf7f4bce746eb7a8d9390a37234aa96d0519fba7507d34656f20097a60c9e HEAD_REF master ) diff --git a/ports/boost-beast/vcpkg.json b/ports/boost-beast/vcpkg.json new file mode 100644 index 00000000000000..1373359a59f865 --- /dev/null +++ b/ports/boost-beast/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "boost-beast", + "version": "1.76.0", + "description": "Boost beast module", + "homepage": "https://github.com/boostorg/beast", + "supports": "!emscripten", + "dependencies": [ + { + "name": "boost-asio", + "platform": "!emscripten" + }, + "boost-assert", + "boost-bind", + "boost-config", + "boost-container", + "boost-core", + "boost-endian", + "boost-intrusive", + "boost-logic", + "boost-mp11", + "boost-optional", + "boost-smart-ptr", + "boost-static-assert", + "boost-system", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-bimap/CONTROL b/ports/boost-bimap/CONTROL deleted file mode 100644 index 681ea87f24b571..00000000000000 --- a/ports/boost-bimap/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-bimap -Version: 1.70.0 -Build-Depends: boost-concept-check, boost-config, boost-container-hash, boost-functional, boost-iterator, boost-lambda, boost-mpl, boost-multi-index, boost-preprocessor, boost-property-map, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/bimap -Description: Boost bimap module diff --git a/ports/boost-bimap/portfile.cmake b/ports/boost-bimap/portfile.cmake index 40f618a8f84bf7..cbd7bd71f1ec4a 100644 --- a/ports/boost-bimap/portfile.cmake +++ b/ports/boost-bimap/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/bimap - REF boost-1.70.0 - SHA512 9f6938bdbbd32a262cfd4c25b90930df6e0610aacff80a26b7a2caa38fdcaa309bdd7da0405e4529dfaf07314f887eb2b928db89aef1088fdbd7bd1da7bf5c0b + REF boost-1.76.0 + SHA512 efa156483c4b696bf88e1f752f1810916699254cb22038d7ea2f3399938dcaebf14795572a2a42558bed356e19d0be154443282bdadc20c8235a057ac5a72fb6 HEAD_REF master ) diff --git a/ports/boost-bimap/vcpkg.json b/ports/boost-bimap/vcpkg.json new file mode 100644 index 00000000000000..fc9dcd3c69a6c9 --- /dev/null +++ b/ports/boost-bimap/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "boost-bimap", + "version": "1.76.0", + "description": "Boost bimap module", + "homepage": "https://github.com/boostorg/bimap", + "dependencies": [ + "boost-concept-check", + "boost-config", + "boost-container-hash", + "boost-core", + "boost-functional", + "boost-iterator", + "boost-lambda", + "boost-mpl", + "boost-multi-index", + "boost-preprocessor", + "boost-property-map", + "boost-serialization", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-bind/CONTROL b/ports/boost-bind/CONTROL deleted file mode 100644 index 93418102fd2e31..00000000000000 --- a/ports/boost-bind/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-bind -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/bind -Description: Boost bind module diff --git a/ports/boost-bind/portfile.cmake b/ports/boost-bind/portfile.cmake index 5af3961be87954..9ce296fe9fe9ba 100644 --- a/ports/boost-bind/portfile.cmake +++ b/ports/boost-bind/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/bind - REF boost-1.70.0 - SHA512 951381fca83fe12382bb1388c9c9b4b8a6116300c55f46864550c5985c3f7b540f246601ddb57ed5b836075d942a999456d5f4557b28aa7fad83f82c0dc5573e + REF boost-1.76.0 + SHA512 a2e40c56d5092818bcddd22b90c6fe6705e2d322b9d96e5abb3524fa166e1d7fc6e5a9c98acf14409663a639c77274d12f9e9840eaa4c963b872c7363caa54ba HEAD_REF master ) diff --git a/ports/boost-bind/vcpkg.json b/ports/boost-bind/vcpkg.json new file mode 100644 index 00000000000000..f39026aa03363e --- /dev/null +++ b/ports/boost-bind/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "boost-bind", + "version": "1.76.0", + "description": "Boost bind module", + "homepage": "https://github.com/boostorg/bind", + "dependencies": [ + "boost-config", + "boost-core", + "boost-detail", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL deleted file mode 100644 index ce5473df572991..00000000000000 --- a/ports/boost-build/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: boost-build -Version: 1.70.0-1 -Homepage: https://github.com/boostorg/build -Description: Boost.Build diff --git a/ports/boost-build/arm64msvc.patch b/ports/boost-build/arm64msvc.patch deleted file mode 100644 index 47f30acfb567d1..00000000000000 --- a/ports/boost-build/arm64msvc.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam -index e6c0b60..62c3a41 100644 ---- a/src/tools/msvc.jam -+++ b/src/tools/msvc.jam -@@ -466,6 +466,7 @@ rule configure-version-specific ( toolset : version : conditions ) - toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-i386) : "/MACHINE:X86" ; - toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-ia64) : "/MACHINE:IA64" ; - toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-arm) : "/MACHINE:ARM" ; -+ toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-arm64) : "/MACHINE:ARM64" ; - - # Make sure that manifest will be generated even if there is no - # dependencies to put there. -@@ -1256,7 +1257,7 @@ local rule configure-really ( version ? : options * ) - local below-8.0 = [ MATCH "^([67]\\.)" : $(version) ] ; - local below-11.0 = [ MATCH "^([6789]\\.|10\\.)" : $(version) ] ; - -- local cpu = i386 amd64 ia64 arm ; -+ local cpu = i386 amd64 ia64 arm arm64 ; - if $(below-8.0) - { - cpu = i386 ; -@@ -1270,6 +1271,7 @@ local rule configure-really ( version ? : options * ) - local setup-i386 ; - local setup-ia64 ; - local setup-arm ; -+ local setup-arm64 ; - local setup-phone-i386 ; - local setup-phone-arm ; - -@@ -1327,6 +1329,7 @@ local rule configure-really ( version ? : options * ) - local default-setup-i386 = vcvars32.bat ; - local default-setup-ia64 = vcvarsx86_ia64.bat ; - local default-setup-arm = vcvarsx86_arm.bat ; -+ local default-setup-arm64 = vcvarsx86_arm64.bat ; - local default-setup-phone-i386 = vcvarsphonex86.bat ; - local default-setup-phone-arm = vcvarsphonex86_arm.bat ; - -@@ -1338,6 +1341,7 @@ local rule configure-really ( version ? : options * ) - local default-global-setup-options-i386 = x86 ; - local default-global-setup-options-ia64 = x86_ia64 ; - local default-global-setup-options-arm = x86_arm ; -+ local default-global-setup-options-arm64 = x86_arm64 ; - - # When using 64-bit Windows, and targeting 64-bit, it is possible to - # use a native 64-bit compiler, selected by the "amd64" & "ia64" -@@ -1418,6 +1422,7 @@ local rule configure-really ( version ? : options * ) - local default-assembler-i386 = "ml -coff" ; - local default-assembler-ia64 = ias ; - local default-assembler-ia64 = armasm ; -+ local default-assembler-arm64 = armasm64 ; - - assembler = [ feature.get-values : $(options) ] ; - -@@ -1932,6 +1937,9 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] - arm/ - arm/32 ; - -+.cpu-arch-arm64 = -+ arm/ -+ arm/64 ; - - # Supported CPU types (only Itanium optimization options are supported from - # VC++ 2005 on). See diff --git a/ports/boost-build/fix_options.patch b/ports/boost-build/fix_options.patch new file mode 100644 index 00000000000000..b63641b9e5b162 --- /dev/null +++ b/ports/boost-build/fix_options.patch @@ -0,0 +1,236 @@ +diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam +index bf07a93..cf04eba 100644 +--- a/src/tools/msvc.jam ++++ b/src/tools/msvc.jam +@@ -450,19 +450,19 @@ rule configure-version-specific ( toolset : version : conditions ) + # version 7.* explicitly or if we auto-detected the version ourselves. + if ! [ MATCH ^(6\\.) : $(version) ] + { +- toolset.flags $(toolset).compile CFLAGS $(conditions) : "/Zc:forScope" "/Zc:wchar_t" ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions) : "/Zc:forScope" "/Zc:wchar_t" ; + toolset.flags $(toolset).compile.c++ C++FLAGS $(conditions) : /wd4675 ; + + # Explicitly disable the 'function is deprecated' warning. Some msvc + # versions have a bug, causing them to emit the deprecation warning even + # with /W0. +- toolset.flags $(toolset).compile CFLAGS $(conditions)/off : /wd4996 ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/off : /wd4996 ; + + if [ MATCH "^([78]\\.)" : $(version) ] + { + # 64-bit compatibility warning deprecated since 9.0, see + # http://msdn.microsoft.com/en-us/library/yt4xw8fh.aspx +- toolset.flags $(toolset).compile CFLAGS $(conditions)/all : /Wp64 ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/all : /Wp64 ; + } + } + +@@ -471,17 +471,17 @@ rule configure-version-specific ( toolset : version : conditions ) + # variables and functions that have internal linkage + if ! [ version.version-less [ SPLIT_BY_CHARACTERS [ MATCH "^([0123456789.]+)" : $(version) ] : . ] : 12 ] + { +- toolset.flags $(toolset).compile CFLAGS $(conditions) : "/Zc:inline" ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions) : "/Zc:inline" ; + + # /Gy analog for variables: https://devblogs.microsoft.com/cppblog/introducing-gw-compiler-switch/ +- toolset.flags $(toolset).compile CFLAGS $(conditions)/speed $(conditions)/space : /Gw ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/speed $(conditions)/space : /Gw ; + } + + # 14.0 introduced /Zc:throwingNew opt-in flag that disables a workaround + # for not throwing operator new in VC up to 6.0 + if ! [ version.version-less [ SPLIT_BY_CHARACTERS [ MATCH "^([0123456789.]+)" : $(version) ] : . ] : 14 ] + { +- toolset.flags $(toolset).compile CFLAGS $(conditions) : "/Zc:throwingNew" ; ++ toolset.flags $(toolset).compile C++FLAGS $(conditions) : "/Zc:throwingNew" ; + } + + # +@@ -491,34 +491,34 @@ rule configure-version-specific ( toolset : version : conditions ) + if [ MATCH "^([67])" : $(version) ] + { + # 8.0 deprecates some of the options. +- toolset.flags $(toolset).compile CFLAGS $(conditions)/speed $(conditions)/space : /Ogiy /Gs ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/speed : /Ot ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/space : /Os ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/speed $(conditions)/space : /Ogiy /Gs ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/speed : /Ot ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/space : /Os ; + +- toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/ : /GB ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/i486 : /G4 ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/$(.cpu-type-g5) : /G5 ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/$(.cpu-type-g6) : /G6 ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-i386)/$(.cpu-type-g7) : /G7 ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/$(.cpu-arch-i386)/ : /GB ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/$(.cpu-arch-i386)/i486 : /G4 ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/$(.cpu-arch-i386)/$(.cpu-type-g5) : /G5 ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/$(.cpu-arch-i386)/$(.cpu-type-g6) : /G6 ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/$(.cpu-arch-i386)/$(.cpu-type-g7) : /G7 ; + + # Improve floating-point accuracy. Otherwise, some of C++ Boost's "math" + # tests will fail. +- toolset.flags $(toolset).compile CFLAGS $(conditions) : /Op ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions) : /Op ; + + # 7.1 and below have single-threaded static RTL. +- toolset.flags $(toolset).compile CFLAGS $(conditions)/off/static/single : /ML ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/on/static/single : /MLd ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/off/static/single : /ML ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/on/static/single : /MLd ; + } + else + { + # 8.0 and above adds some more options. +- toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-amd64)/ : "/favor:blend" ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-amd64)/$(.cpu-type-em64t) : "/favor:EM64T" ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/$(.cpu-arch-amd64)/$(.cpu-type-amd64) : "/favor:AMD64" ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/$(.cpu-arch-amd64)/ : "/favor:blend" ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/$(.cpu-arch-amd64)/$(.cpu-type-em64t) : "/favor:EM64T" ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/$(.cpu-arch-amd64)/$(.cpu-type-amd64) : "/favor:AMD64" ; + + # 8.0 and above only has multi-threaded static RTL. +- toolset.flags $(toolset).compile CFLAGS $(conditions)/off/static/single : /MT ; +- toolset.flags $(toolset).compile CFLAGS $(conditions)/on/static/single : /MTd ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/off/static/single : /MT ; ++ toolset.flags $(toolset).compile OPTIONS $(conditions)/on/static/single : /MTd ; + + # Specify target machine type so the linker will not need to guess. + toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-amd64) : "/MACHINE:X64" ; +@@ -614,7 +614,7 @@ rule compile.c ( targets + : sources * : properties * ) + { + set-setup-command $(targets) : $(properties) ; + C++FLAGS on $(targets[1]) = ; +- get-rspline $(targets) : -TC ; ++ get-rspline $(targets) : -TC CFLAGS ; + compile-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ; + } + +@@ -623,7 +623,7 @@ rule compile.c.preprocess ( targets + : sources * : properties * ) + { + set-setup-command $(targets) : $(properties) ; + C++FLAGS on $(targets[1]) = ; +- get-rspline $(targets) : -TC ; ++ get-rspline $(targets) : -TC CFLAGS ; + preprocess-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ; + } + +@@ -632,8 +632,8 @@ rule compile.c.pch ( targets + : sources * : properties * ) + { + set-setup-command $(targets) : $(properties) ; + C++FLAGS on $(targets[1]) = ; +- get-rspline $(targets[1]) : -TC ; +- get-rspline $(targets[2]) : -TC ; ++ get-rspline $(targets[1]) : -TC CFLAGS ; ++ get-rspline $(targets[2]) : -TC CFLAGS ; + local pch-source = [ on $(<) return $(PCH_SOURCE) ] ; + if $(pch-source) + { +@@ -716,14 +716,14 @@ actions compile-c-c++-pch-s + rule compile.c++ ( targets + : sources * : properties * ) + { + set-setup-command $(targets) : $(properties) ; +- get-rspline $(targets) : -TP ; ++ get-rspline $(targets) : -TP C++FLAGS ; + compile-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ; + } + + rule compile.c++.preprocess ( targets + : sources * : properties * ) + { + set-setup-command $(targets) : $(properties) ; +- get-rspline $(targets) : -TP ; ++ get-rspline $(targets) : -TP C++FLAGS ; + preprocess-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ; + } + +@@ -731,8 +731,8 @@ rule compile.c++.preprocess ( targets + : sources * : properties * ) + rule compile.c++.pch ( targets + : sources * : properties * ) + { + set-setup-command $(targets) : $(properties) ; +- get-rspline $(targets[1]) : -TP ; +- get-rspline $(targets[2]) : -TP ; ++ get-rspline $(targets[1]) : -TP C++FLAGS ; ++ get-rspline $(targets[2]) : -TP C++FLAGS ; + local pch-source = [ on $(<) return $(PCH_SOURCE) ] ; + if $(pch-source) + { +@@ -1691,10 +1691,10 @@ local rule default-path ( version ) + + + +-rule get-rspline ( target : lang-opt ) ++rule get-rspline ( target : lang-opt lang-flags ) + { + CC_RSPLINE on $(target) = [ on $(target) return $(lang-opt) -U$(UNDEFS) +- $(CFLAGS) $(C++FLAGS) $(OPTIONS) -c $(.nl)-D$(DEFINES) ++ $($(lang-flags)) $(OPTIONS) -c $(.nl)-D$(DEFINES) + $(.nl)\"-I$(INCLUDES:W)\" $(.nl)\"-FI$(FORCE_INCLUDES:W)\" ] ; + } + +@@ -1830,25 +1830,25 @@ local rule register-toolset-really ( ) + # Declare flags for compilation. + # + +- toolset.flags msvc.compile CFLAGS speed : /O2 ; +- toolset.flags msvc.compile CFLAGS space : /O1 ; ++ toolset.flags msvc.compile OPTIONS speed : /O2 ; ++ toolset.flags msvc.compile OPTIONS space : /O1 ; + +- toolset.flags msvc.compile CFLAGS $(.cpu-arch-ia64)/$(.cpu-type-itanium) : /G1 ; +- toolset.flags msvc.compile CFLAGS $(.cpu-arch-ia64)/$(.cpu-type-itanium2) : /G2 ; ++ toolset.flags msvc.compile OPTIONS $(.cpu-arch-ia64)/$(.cpu-type-itanium) : /G1 ; ++ toolset.flags msvc.compile OPTIONS $(.cpu-arch-ia64)/$(.cpu-type-itanium2) : /G2 ; + +- toolset.flags msvc.compile CFLAGS on/object : /Z7 ; +- toolset.flags msvc.compile CFLAGS on/database : /Zi ; +- toolset.flags msvc.compile CFLAGS off : /Od ; +- toolset.flags msvc.compile CFLAGS off : /Ob0 ; +- toolset.flags msvc.compile CFLAGS on : /Ob1 ; +- toolset.flags msvc.compile CFLAGS full : /Ob2 ; ++ toolset.flags msvc.compile OPTIONS on/object : /Z7 ; ++ toolset.flags msvc.compile OPTIONS on/database : /Zi ; ++ toolset.flags msvc.compile OPTIONS off : /Od ; ++ toolset.flags msvc.compile OPTIONS off : /Ob0 ; ++ toolset.flags msvc.compile OPTIONS on : /Ob1 ; ++ toolset.flags msvc.compile OPTIONS full : /Ob2 ; + +- toolset.flags msvc.compile CFLAGS on : /W3 ; +- toolset.flags msvc.compile CFLAGS off : /W0 ; +- toolset.flags msvc.compile CFLAGS all : /W4 ; +- toolset.flags msvc.compile CFLAGS extra : /W4 ; +- toolset.flags msvc.compile CFLAGS pedantic : /W4 ; +- toolset.flags msvc.compile CFLAGS on : /WX ; ++ toolset.flags msvc.compile OPTIONS on : /W3 ; ++ toolset.flags msvc.compile OPTIONS off : /W0 ; ++ toolset.flags msvc.compile OPTIONS all : /W4 ; ++ toolset.flags msvc.compile OPTIONS extra : /W4 ; ++ toolset.flags msvc.compile OPTIONS pedantic : /W4 ; ++ toolset.flags msvc.compile OPTIONS on : /WX ; + + toolset.flags msvc.compile C++FLAGS on/off/off : /EHs ; + toolset.flags msvc.compile C++FLAGS on/off/on : /EHsc ; +@@ -1862,16 +1862,16 @@ local rule register-toolset-really ( ) + # By default 8.0 enables rtti support while prior versions disabled it. We + # simply enable or disable it explicitly so we do not have to depend on this + # default behaviour. +- toolset.flags msvc.compile CFLAGS on : /GR ; +- toolset.flags msvc.compile CFLAGS off : /GR- ; +- toolset.flags msvc.compile CFLAGS off/shared : /MD ; +- toolset.flags msvc.compile CFLAGS on/shared : /MDd ; ++ toolset.flags msvc.compile C++FLAGS on : /GR ; ++ toolset.flags msvc.compile C++FLAGS off : /GR- ; ++ toolset.flags msvc.compile OPTIONS off/shared : /MD ; ++ toolset.flags msvc.compile OPTIONS on/shared : /MDd ; + +- toolset.flags msvc.compile CFLAGS off/static/multi : /MT ; +- toolset.flags msvc.compile CFLAGS on/static/multi : /MTd ; ++ toolset.flags msvc.compile OPTIONS off/static/multi : /MT ; ++ toolset.flags msvc.compile OPTIONS on/static/multi : /MTd ; + +- toolset.flags msvc.compile OPTIONS : ; +- toolset.flags msvc.compile.c++ OPTIONS : ; ++ toolset.flags msvc.compile CFLAGS : ; ++ toolset.flags msvc.compile.c++ C++FLAGS : ; + + toolset.flags msvc.compile PDB_CFLAG on/database : /Fd ; + diff --git a/ports/boost-build/portfile.cmake b/ports/boost-build/portfile.cmake index 77da8105783345..9bee6a0b09625b 100644 --- a/ports/boost-build/portfile.cmake +++ b/ports/boost-build/portfile.cmake @@ -1,24 +1,19 @@ -include(vcpkg_common_functions) - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - return() -elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") return() endif() -set(BOOST_VERSION 1.70.0) +set(BOOST_VERSION 1.75.0) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/build REF boost-${BOOST_VERSION} - SHA512 be4e410a9656313519e089977a24da8f633db2182985f5d60e07e489f9eac8c887e8cab7e3cbd13f2b747bc3d9dab2899f174be1eaac73cfd7895015fb6b9b58 + SHA512 dc5784cdcc908591a8c8814dac32849fb00b5f5b2d48de963d51a0571fd9f5a0419d6bb569f3375bf8fbfae28d680db4ce869604667b717023e76869836534f4 HEAD_REF master - PATCHES - # Add the support of arm64-windows - arm64msvc.patch + PATCHES + fix_options.patch ) vcpkg_download_distfile(ARCHIVE @@ -30,11 +25,16 @@ vcpkg_download_distfile(ARCHIVE vcpkg_download_distfile(BOOSTCPP_ARCHIVE URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/boostcpp.jam" FILENAME "boost-${BOOST_VERSION}-boostcpp.jam" - SHA512 7fac16c1f082821dd52cae39601f60bbdbd5ce043fbd19699da54c74fc5df1ed2ad6d3cefd3ae9a0a7697a2c34737f0c9e2b4bd3590c1f45364254875289cd17 + SHA512 8cf929fa4a602342c859a6bbd5f9dda783ac29431d951bcf6cae4cb14377c1b3aed90bacd902b0f7d1807591cf5e1a244cf8fc3c6cc6e0a4056db145b58f51df ) +# https://github.com/boostorg/boost/pull/206 +# do not add version suffix for android +file(READ "${BOOSTCPP_ARCHIVE}" _contents) +string(REPLACE "aix &&" "aix android &&" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/boostcpp.jam" "${_contents}") + file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright) -file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam) # This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}") @@ -55,8 +55,13 @@ file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_co message(STATUS "Bootstrapping...") if(CMAKE_HOST_WIN32) + if(VCPKG_TARGET_IS_MINGW) + set(TOOLSET mingw) + else() + set(TOOLSET msvc) + endif() vcpkg_execute_required_process( - COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" msvc + COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" ${TOOLSET} WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build LOGNAME bootstrap-${TARGET_TRIPLET} ) diff --git a/ports/boost-build/vcpkg.json b/ports/boost-build/vcpkg.json new file mode 100644 index 00000000000000..0abab074fa2417 --- /dev/null +++ b/ports/boost-build/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-build", + "version-string": "1.75.0", + "description": "Boost.Build", + "homepage": "https://github.com/boostorg/build", + "dependencies": [ + "boost-uninstall" + ] +} diff --git a/ports/boost-callable-traits/CONTROL b/ports/boost-callable-traits/CONTROL deleted file mode 100644 index 7539e399ea4a1c..00000000000000 --- a/ports/boost-callable-traits/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-callable-traits -Version: 2.3.2 -Build-Depends: boost-vcpkg-helpers -Homepage: https://github.com/boostorg/callable_traits -Description: Boost callable_traits module diff --git a/ports/boost-callable-traits/portfile.cmake b/ports/boost-callable-traits/portfile.cmake index 05e67919b3f2fa..80cd42a75da807 100644 --- a/ports/boost-callable-traits/portfile.cmake +++ b/ports/boost-callable-traits/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/callable_traits - REF 2.3.2 - SHA512 32d69cc0bdaecfcf69f9e6079f6b80738ea95937cb2ef802d4d26771745c0d7179c9074ed6312ef1c2d45cf1711979ecf9a8407677d18e625bfb859bca1aa319 + REF boost-1.76.0 + SHA512 9ccc62f33001179b9ab6576cc6ac9a3e1a8117a557fbdd65c7eec0b522aa1b7e5e4f31601205819d1e3507afa4e327cfd56d58589974404c8f9c14f970bad79f HEAD_REF master ) diff --git a/ports/boost-callable-traits/vcpkg.json b/ports/boost-callable-traits/vcpkg.json new file mode 100644 index 00000000000000..83bdb17a423aeb --- /dev/null +++ b/ports/boost-callable-traits/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-callable-traits", + "version": "1.76.0", + "description": "Boost callable_traits module", + "homepage": "https://github.com/boostorg/callable_traits", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-chrono/CONTROL b/ports/boost-chrono/CONTROL deleted file mode 100644 index f2a630bb322a85..00000000000000 --- a/ports/boost-chrono/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-chrono -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/chrono -Description: Boost chrono module diff --git a/ports/boost-chrono/portfile.cmake b/ports/boost-chrono/portfile.cmake index e2eb7a4aba6f82..a02bebd10822eb 100644 --- a/ports/boost-chrono/portfile.cmake +++ b/ports/boost-chrono/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/chrono - REF boost-1.70.0 - SHA512 a0498e5db8d3178479e08eb9b2b980447c5dc1b620ab45331fb42b1cdd94572feeb099498ac436f082fb850994e2f090123b8caffdec69e67cae23c94e8e6de9 + REF boost-1.76.0 + SHA512 ebfea42589e69152256fb175175d753fbb86f96d988fd2678e0df82d6bf7c2e226c8223280ab044cbb1533a690692e23134ee09f665db38a5d1a7e10dd79da22 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-chrono requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-chrono/vcpkg.json b/ports/boost-chrono/vcpkg.json new file mode 100644 index 00000000000000..234f656ddfe149 --- /dev/null +++ b/ports/boost-chrono/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "boost-chrono", + "version": "1.76.0", + "description": "Boost chrono module", + "homepage": "https://github.com/boostorg/chrono", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-detail", + "boost-integer", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-move", + "boost-mpl", + "boost-predef", + "boost-ratio", + "boost-static-assert", + "boost-system", + "boost-throw-exception", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-circular-buffer/CONTROL b/ports/boost-circular-buffer/CONTROL deleted file mode 100644 index aa6d7121764d5e..00000000000000 --- a/ports/boost-circular-buffer/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-circular-buffer -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-move, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/circular_buffer -Description: Boost circular_buffer module diff --git a/ports/boost-circular-buffer/portfile.cmake b/ports/boost-circular-buffer/portfile.cmake index f42f7d115e1e28..25afaf23f36b33 100644 --- a/ports/boost-circular-buffer/portfile.cmake +++ b/ports/boost-circular-buffer/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/circular_buffer - REF boost-1.70.0 - SHA512 c4aef9b30ed93000c663acb7536df6d7269be4e3a0c431daa2f5a0397505bc487c90259b0a24bb0145bf9c07fdecd8fbaa53ceca589f39a3b29f087d07f98113 + REF boost-1.76.0 + SHA512 0e85b0cd8d66552f8cbf2c90dcd3685d4666b2d4608f5352c68e3f1e03e68cdaf368777235b0cc6a17420e07c767c61ca026f753d1d1d6e35c6d7c3a11deac9f HEAD_REF master ) diff --git a/ports/boost-circular-buffer/vcpkg.json b/ports/boost-circular-buffer/vcpkg.json new file mode 100644 index 00000000000000..0edf67d872b34c --- /dev/null +++ b/ports/boost-circular-buffer/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "boost-circular-buffer", + "version": "1.76.0", + "description": "Boost circular_buffer module", + "homepage": "https://github.com/boostorg/circular_buffer", + "dependencies": [ + "boost-assert", + "boost-concept-check", + "boost-config", + "boost-core", + "boost-move", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-compatibility/CONTROL b/ports/boost-compatibility/CONTROL deleted file mode 100644 index 12d325b0680504..00000000000000 --- a/ports/boost-compatibility/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-compatibility -Version: 1.70.0 -Build-Depends: boost-vcpkg-helpers -Homepage: https://github.com/boostorg/compatibility -Description: Boost compatibility module diff --git a/ports/boost-compatibility/portfile.cmake b/ports/boost-compatibility/portfile.cmake index 41e26869988582..562fa62a5871ac 100644 --- a/ports/boost-compatibility/portfile.cmake +++ b/ports/boost-compatibility/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/compatibility - REF boost-1.70.0 - SHA512 17f6b96eb29f95110f180209c27418a38be1fabe99dd0b50d206e4a628c42e87ffae343a8761a689145be15ae973721e7916a7326db8f45a5d0c8a0fb5639f6b + REF boost-1.76.0 + SHA512 ca17b6a6021d7f87692a37aa8e558b76235095f6e7850432ebc3c945afe25c01ce0b7d26e8d239636ff38d2d697ba057b9109f8c06b7d70ae154a4b8223733ce HEAD_REF master ) diff --git a/ports/boost-compatibility/vcpkg.json b/ports/boost-compatibility/vcpkg.json new file mode 100644 index 00000000000000..cd59ff838f2a04 --- /dev/null +++ b/ports/boost-compatibility/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-compatibility", + "version": "1.76.0", + "description": "Boost compatibility module", + "homepage": "https://github.com/boostorg/compatibility", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-compute/CONTROL b/ports/boost-compute/CONTROL deleted file mode 100644 index 04534face9b945..00000000000000 --- a/ports/boost-compute/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-compute -Version: 1.70.0 -Build-Depends: boost-algorithm, boost-array, boost-assert, boost-chrono, boost-config, boost-core, boost-filesystem (!uwp), boost-function, boost-function-types, boost-fusion, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-preprocessor, boost-property-tree, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-thread (!arm), boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-uuid, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/compute -Description: Boost compute module diff --git a/ports/boost-compute/portfile.cmake b/ports/boost-compute/portfile.cmake index 2b756df4167181..7b85fd92a17a9c 100644 --- a/ports/boost-compute/portfile.cmake +++ b/ports/boost-compute/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/compute - REF boost-1.70.0 - SHA512 d21c722340abd0f16c007060cac18b98be3d3056fb784c359203012f20d8ec1edf62bbe41e30b0129a1c478050d78fb34c1750c14ac7610f2bb63911006fd197 + REF boost-1.76.0 + SHA512 93f20c281e71ba205fdfc458a40f437cec09c2c9593e41ccf59e927b2f9e6c2f31b89389605c5a1f5b4893097928f16ded38b794dccf95adbdfac68f4e016ad9 HEAD_REF master ) diff --git a/ports/boost-compute/vcpkg.json b/ports/boost-compute/vcpkg.json new file mode 100644 index 00000000000000..a994479bc81440 --- /dev/null +++ b/ports/boost-compute/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "boost-compute", + "version": "1.76.0", + "description": "Boost compute module", + "homepage": "https://github.com/boostorg/compute", + "dependencies": [ + "boost-algorithm", + "boost-array", + "boost-assert", + "boost-chrono", + "boost-config", + "boost-core", + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + "boost-function", + "boost-function-types", + "boost-fusion", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + "boost-mpl", + "boost-optional", + "boost-preprocessor", + "boost-property-tree", + "boost-proto", + "boost-range", + "boost-smart-ptr", + "boost-static-assert", + "boost-thread", + "boost-throw-exception", + "boost-tuple", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-uuid", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-concept-check/CONTROL b/ports/boost-concept-check/CONTROL deleted file mode 100644 index ca012575dd97d9..00000000000000 --- a/ports/boost-concept-check/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-concept-check -Version: 1.70.0 -Build-Depends: boost-config, boost-preprocessor, boost-static-assert, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/concept_check -Description: Boost concept_check module diff --git a/ports/boost-concept-check/portfile.cmake b/ports/boost-concept-check/portfile.cmake index f08d068643f38b..3b1b2373fc5174 100644 --- a/ports/boost-concept-check/portfile.cmake +++ b/ports/boost-concept-check/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/concept_check - REF boost-1.70.0 - SHA512 5b495c9c6c76eac54a72e5f5cde41ac3957470b21d47abde4df8f74207b175dcaf104adf37603de9ef0cca7fba1ac702429af995371714eea0b9cdcc361f2f8e + REF boost-1.76.0 + SHA512 f10bcd81ed88a036078188647a0b8aa2245d0c343fe29d4c13c16fe8dc551d843281bbe1fb903c71026c8183f02f57bbad2cbbf3eb6c3f4f885ec8773afb8bde HEAD_REF master ) diff --git a/ports/boost-concept-check/vcpkg.json b/ports/boost-concept-check/vcpkg.json new file mode 100644 index 00000000000000..4017b24b9ee32a --- /dev/null +++ b/ports/boost-concept-check/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "boost-concept-check", + "version": "1.76.0", + "description": "Boost concept_check module", + "homepage": "https://github.com/boostorg/concept_check", + "dependencies": [ + "boost-config", + "boost-preprocessor", + "boost-static-assert", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-config/CONTROL b/ports/boost-config/CONTROL deleted file mode 100644 index 1d680a096e4413..00000000000000 --- a/ports/boost-config/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-config -Version: 1.70.0 -Build-Depends: boost-compatibility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/config -Description: Boost config module diff --git a/ports/boost-config/portfile.cmake b/ports/boost-config/portfile.cmake index 5759efd7971e5a..31de221d14d9d3 100644 --- a/ports/boost-config/portfile.cmake +++ b/ports/boost-config/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/config - REF boost-1.70.0 - SHA512 c9132011f506b3803f736bc0f7498eb297bb2af7a9643f235055aa5d133c6cbbe04f11c88296a956acb9864ea8a5ea58df329df3dce1e0763ff0451f9e487fb4 + REF boost-1.76.0 + SHA512 cef30b35f4d791c9220aad28b347acb28ed87e58ecf319c9fe7dfdb0c36d8c2a1ba7f996fbf2da201a2c4fae8cf2ca1b45224754482c7ecb074cee382f33e7ab HEAD_REF master ) diff --git a/ports/boost-config/vcpkg.json b/ports/boost-config/vcpkg.json new file mode 100644 index 00000000000000..dd1e63c10f1274 --- /dev/null +++ b/ports/boost-config/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-config", + "version": "1.76.0", + "description": "Boost config module", + "homepage": "https://github.com/boostorg/config", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-container-hash/CONTROL b/ports/boost-container-hash/CONTROL deleted file mode 100644 index b2eb4a95d0d620..00000000000000 --- a/ports/boost-container-hash/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-container-hash -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-static-assert, boost-type-traits, boost-vcpkg-helpers -Description: Boost container_hash module diff --git a/ports/boost-container-hash/portfile.cmake b/ports/boost-container-hash/portfile.cmake index 16ae75279184c4..7fd29b82f630e8 100644 --- a/ports/boost-container-hash/portfile.cmake +++ b/ports/boost-container-hash/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/container_hash - REF boost-1.70.0 - SHA512 e08a01a0c4ede6b8e7be77c78e9a9c66680e7fc31ce64e3f43d2f535dfdcf6cce1d35cf7f0d120242bd749a7fd082d4b938c30e02438970be25613ee69b5baf1 + REF boost-1.76.0 + SHA512 59dbd3028e65ff5a499ebf316354eb4e46dcefa736d07954b9f99471cf0195b080821180925923814fad50f44e21f93e0a90b2d86ef3a6cf1b7d478a6d1122bf HEAD_REF master ) diff --git a/ports/boost-container-hash/vcpkg.json b/ports/boost-container-hash/vcpkg.json new file mode 100644 index 00000000000000..48f987d51f8fb8 --- /dev/null +++ b/ports/boost-container-hash/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-container-hash", + "version": "1.76.0", + "description": "Boost container_hash module", + "homepage": "https://github.com/boostorg/container_hash", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-detail", + "boost-integer", + "boost-static-assert", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-container/CONTROL b/ports/boost-container/CONTROL deleted file mode 100644 index b96609d6a607ce..00000000000000 --- a/ports/boost-container/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-container -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-container-hash, boost-core, boost-integer, boost-intrusive, boost-modular-build-helper, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/container -Description: Boost container module diff --git a/ports/boost-container/portfile.cmake b/ports/boost-container/portfile.cmake index 8e4d473e28e9db..133d7aecdbab2b 100644 --- a/ports/boost-container/portfile.cmake +++ b/ports/boost-container/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/container - REF boost-1.70.0 - SHA512 fd0fdf2c26c0dc6ac977c069584282ac1dc1a8b4dae3609766af1cd1f1587126e5ff7ad2feffeb6c20d0679c245679e6c963e202d4ab2f6a6c74721f2e52e0cf + REF boost-1.76.0 + SHA512 5e73508ea1bb67ccbb83785c1f7db4a92d0cf9435a6383394dd1aecd83f88697a16b054c762bdd4d06c3ec92629d1f4b89cf32d2fafefa0a0702318bc01d5dd4 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-container requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-container/vcpkg.json b/ports/boost-container/vcpkg.json new file mode 100644 index 00000000000000..c63d37c106d63f --- /dev/null +++ b/ports/boost-container/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "boost-container", + "version": "1.76.0", + "description": "Boost container module", + "homepage": "https://github.com/boostorg/container", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + "boost-intrusive", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-move", + "boost-static-assert", + "boost-type-traits", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-context/CONTROL b/ports/boost-context/CONTROL deleted file mode 100644 index 8e476df79cb605..00000000000000 --- a/ports/boost-context/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-context -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-pool, boost-predef, boost-smart-ptr, boost-thread (!arm), boost-vcpkg-helpers -Homepage: https://github.com/boostorg/context -Description: Boost context module diff --git a/ports/boost-context/b2-options.cmake.in b/ports/boost-context/b2-options.cmake.in new file mode 100644 index 00000000000000..a16d25fdbe95b7 --- /dev/null +++ b/ports/boost-context/b2-options.cmake.in @@ -0,0 +1,29 @@ + +if(@VCPKG_TARGET_IS_WINDOWS@) + list(APPEND B2_OPTIONS + abi=ms + binary-format=pe + ) +endif() + +if(@VCPKG_TARGET_IS_OSX@) + list(APPEND B2_OPTIONS + abi=sysv + binary-format=mach-o + ) +endif() + +if("@VCPKG_TARGET_IS_LINUX@" STREQUAL "ON" OR "@VCPKG_TARGET_IS_ANDROID@" STREQUAL "ON") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + list(APPEND B2_OPTIONS + abi=aapcs + ) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + list(APPEND B2_OPTIONS + abi=sysv + ) + endif() + list(APPEND B2_OPTIONS + binary-format=elf + ) +endif() diff --git a/ports/boost-context/portfile.cmake b/ports/boost-context/portfile.cmake index 7c79f3bb451498..df48741264584c 100644 --- a/ports/boost-context/portfile.cmake +++ b/ports/boost-context/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/context - REF boost-1.70.0 - SHA512 b180cc8e6fceb457495a9e4e8c6118bd9d32d11e8aa30c477efa6c58474d03573744348146c542c4436a80b7cbf1f4ffa73034f31aaa045f8a9fc020f299342e + REF boost-1.76.0 + SHA512 f004e38d63b73e96492ab7267a2e4c3b9993eebc7df6e17fbc5daeb4feb002ee8be815ad8db26ec954471678eefd3609d12a81a34adab3115032209002b663eb HEAD_REF master ) @@ -15,8 +13,19 @@ string(REPLACE "import ../../config/checks/config" "import config/checks/config" file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) -boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-context requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +configure_file( + "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake.in" + "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake" + @ONLY +) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake" +) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-context/vcpkg.json b/ports/boost-context/vcpkg.json new file mode 100644 index 00000000000000..22ccf155d784e9 --- /dev/null +++ b/ports/boost-context/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "boost-context", + "version": "1.76.0", + "port-version": 1, + "description": "Boost context module", + "homepage": "https://github.com/boostorg/context", + "supports": "!uwp & !emscripten", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-pool", + "boost-predef", + "boost-smart-ptr", + "boost-thread", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-contract/CONTROL b/ports/boost-contract/CONTROL deleted file mode 100644 index 7b03d05e2ae7f0..00000000000000 --- a/ports/boost-contract/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-contract -Version: 1.70.0 -Build-Depends: boost-any, boost-assert, boost-build, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-function-types, boost-modular-build-helper, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-thread (!arm), boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers -Description: Boost contract module diff --git a/ports/boost-contract/portfile.cmake b/ports/boost-contract/portfile.cmake index 8e034b9012f216..2317a74e0a88d2 100644 --- a/ports/boost-contract/portfile.cmake +++ b/ports/boost-contract/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/contract - REF boost-1.70.0 - SHA512 867717f13da8df87330849eef5068538c5ea650f58ab9df581081480f8cf5ffe255b7503ac59a0b14d2063ddb9239bcfc72e02e0a66f86e77d7a2f32099afc34 + REF boost-1.76.0 + SHA512 964290bd77ca345330e50ee76af6e976aba2190bf2186a5376f4fd4b581d2a62f4e5bf6d74938e36f9f06179471ba434721948e1190dd07e41b6b3b0deb9258f HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-contract requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-contract/vcpkg.json b/ports/boost-contract/vcpkg.json new file mode 100644 index 00000000000000..369eacd3266cb7 --- /dev/null +++ b/ports/boost-contract/vcpkg.json @@ -0,0 +1,34 @@ +{ + "name": "boost-contract", + "version": "1.76.0", + "description": "Boost contract module", + "homepage": "https://github.com/boostorg/contract", + "dependencies": [ + "boost-any", + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + "boost-exception", + "boost-function", + "boost-function-types", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-mpl", + "boost-optional", + "boost-preprocessor", + "boost-smart-ptr", + "boost-static-assert", + "boost-thread", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-conversion/CONTROL b/ports/boost-conversion/CONTROL deleted file mode 100644 index 194ae53474c118..00000000000000 --- a/ports/boost-conversion/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-conversion -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-throw-exception, boost-typeof, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/conversion -Description: Boost conversion module diff --git a/ports/boost-conversion/portfile.cmake b/ports/boost-conversion/portfile.cmake index cda3c164bceb28..1e22924881a47c 100644 --- a/ports/boost-conversion/portfile.cmake +++ b/ports/boost-conversion/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/conversion - REF boost-1.70.0 - SHA512 2d061273c85b9769e433184ff2b2a3ceaf3ff39e66fac62e34097f1a6288aa72d5801e34c93c8e80a3200bbd3129d70d73f656fc958b78694dea39799b42b287 + REF boost-1.76.0 + SHA512 2f14ad44d8fc8645704c1f9aeca7a824747c35422ee795faedc6ae78341d28f38f7100b063107a25fc62cb84a5cdedbe4a6308607168196322cde4abb1453bdd HEAD_REF master ) diff --git a/ports/boost-conversion/vcpkg.json b/ports/boost-conversion/vcpkg.json new file mode 100644 index 00000000000000..790eff2c6536bb --- /dev/null +++ b/ports/boost-conversion/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "boost-conversion", + "version": "1.76.0", + "description": "Boost conversion module", + "homepage": "https://github.com/boostorg/conversion", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-smart-ptr", + "boost-throw-exception", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-convert/CONTROL b/ports/boost-convert/CONTROL deleted file mode 100644 index a21fc8f537a51d..00000000000000 --- a/ports/boost-convert/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-convert -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-function-types, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-parameter, boost-range, boost-spirit, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/convert -Description: Boost convert module diff --git a/ports/boost-convert/portfile.cmake b/ports/boost-convert/portfile.cmake index 702206fc164694..693fca09a64832 100644 --- a/ports/boost-convert/portfile.cmake +++ b/ports/boost-convert/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/convert - REF boost-1.70.0 - SHA512 0edc789070a74d7abf57170fddfc70f4b79b62720d771a650d148cefbf70b78e1a0a43a2fd85d5be94f4cb8452ec0ed33dfcbf0621a7980161de451576ab083e + REF boost-1.76.0 + SHA512 104a220d275b16654f53edcd7048ef78123b38ac820d7bb3d76a0493fc31714d55706a61d0a1f7097daa5190b27c666c22beb19024bb15c52a365cd0cfcfd603 HEAD_REF master ) diff --git a/ports/boost-convert/vcpkg.json b/ports/boost-convert/vcpkg.json new file mode 100644 index 00000000000000..20bf35943bbe40 --- /dev/null +++ b/ports/boost-convert/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "boost-convert", + "version": "1.76.0", + "description": "Boost convert module", + "homepage": "https://github.com/boostorg/convert", + "dependencies": [ + "boost-config", + "boost-core", + "boost-function-types", + "boost-lexical-cast", + "boost-math", + "boost-mpl", + "boost-optional", + "boost-parameter", + "boost-range", + "boost-spirit", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-core/CONTROL b/ports/boost-core/CONTROL deleted file mode 100644 index af70d8a1422231..00000000000000 --- a/ports/boost-core/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-core -Version: 1.70.0 -Build-Depends: boost-config, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/core -Description: Boost core module diff --git a/ports/boost-core/portfile.cmake b/ports/boost-core/portfile.cmake index df3b3e7f33d680..fa1e14078d150c 100644 --- a/ports/boost-core/portfile.cmake +++ b/ports/boost-core/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/core - REF boost-1.70.0 - SHA512 955f788c7ec2a1988df261606da42915e42e321f200c9729f7b1aa503224b8fce4fb784c8693374d7a31a6a45f4082fe3b489853bee85a6ee06184f7fb898626 + REF boost-1.76.0 + SHA512 95fc5db2580ebd4d8de1a377c7b006e3f89e99c3613620334caa2747b82e28356bb8e023a79f53fca9425a6a9aa9af28b53eefc2cb7222f0f5c5447f448c0143 HEAD_REF master ) diff --git a/ports/boost-core/vcpkg.json b/ports/boost-core/vcpkg.json new file mode 100644 index 00000000000000..74767a24ee593b --- /dev/null +++ b/ports/boost-core/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "boost-core", + "version": "1.76.0", + "description": "Boost core module", + "homepage": "https://github.com/boostorg/core", + "dependencies": [ + "boost-config", + "boost-static-assert", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-coroutine/CONTROL b/ports/boost-coroutine/CONTROL deleted file mode 100644 index 5b5db2bdc25199..00000000000000 --- a/ports/boost-coroutine/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-coroutine -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-context (!uwp), boost-detail, boost-exception, boost-integer, boost-modular-build-helper, boost-move, boost-range, boost-system, boost-thread (!arm), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/coroutine -Description: Boost coroutine module diff --git a/ports/boost-coroutine/portfile.cmake b/ports/boost-coroutine/portfile.cmake index 88326a6dba5c44..6df9c62ce3a974 100644 --- a/ports/boost-coroutine/portfile.cmake +++ b/ports/boost-coroutine/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/coroutine - REF boost-1.70.0 - SHA512 e63e92c1e6013ab79df4312ace30d5e9989ec30f10c4e97fe366b0f60b50675fa91cc323508e81065400a66d4931c1f5cba51287e6c2fca5567495ade1b94d46 + REF boost-1.76.0 + SHA512 9554ef6a3200b7bd79d6ca953af65ae229e2c8649b2f4e67f911d0844924856163e0eb88fdce03e2c1cb120737e1a9f6cb8bf326ae0b44f161aac213b11b1640 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-coroutine requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-coroutine/vcpkg.json b/ports/boost-coroutine/vcpkg.json new file mode 100644 index 00000000000000..9fb993438be750 --- /dev/null +++ b/ports/boost-coroutine/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "boost-coroutine", + "version": "1.76.0", + "description": "Boost coroutine module", + "homepage": "https://github.com/boostorg/coroutine", + "supports": "!arm & !uwp & !emscripten", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + { + "name": "boost-context", + "platform": "!uwp & !emscripten" + }, + "boost-core", + "boost-detail", + "boost-exception", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-move", + "boost-system", + "boost-thread", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-coroutine2/CONTROL b/ports/boost-coroutine2/CONTROL deleted file mode 100644 index 96706e78aa02de..00000000000000 --- a/ports/boost-coroutine2/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-coroutine2 -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-context (!uwp), boost-detail, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/coroutine2 -Description: Boost coroutine2 module diff --git a/ports/boost-coroutine2/portfile.cmake b/ports/boost-coroutine2/portfile.cmake index 42e7601e4ad055..b2d9b451ba8a62 100644 --- a/ports/boost-coroutine2/portfile.cmake +++ b/ports/boost-coroutine2/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/coroutine2 - REF boost-1.70.0 - SHA512 8f087e33be6eeb1bea523abf871a6bb5252bcb0c40de3489d2713c8b242de97697e86fc2628fe0b0eefefef65307cdd0e0737ae7471fde083a2b09d7139f487c + REF boost-1.76.0 + SHA512 746f03de8f9b2108d95eca2d940462c16660db2021b0612966f0f3e46a5a0d16708a3ef19c605ee56574a5427a93d435597c7dc7a411c2ffbba117afd660b291 HEAD_REF master ) diff --git a/ports/boost-coroutine2/vcpkg.json b/ports/boost-coroutine2/vcpkg.json new file mode 100644 index 00000000000000..ff9ecae6219e3e --- /dev/null +++ b/ports/boost-coroutine2/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "boost-coroutine2", + "version": "1.76.0", + "description": "Boost coroutine2 module", + "homepage": "https://github.com/boostorg/coroutine2", + "supports": "!emscripten", + "dependencies": [ + "boost-assert", + "boost-config", + { + "name": "boost-context", + "platform": "!uwp & !emscripten" + }, + "boost-detail", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-crc/CONTROL b/ports/boost-crc/CONTROL deleted file mode 100644 index 33536aafab1310..00000000000000 --- a/ports/boost-crc/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-crc -Version: 1.70.0 -Build-Depends: boost-array, boost-compatibility, boost-config, boost-integer, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/crc -Description: Boost crc module diff --git a/ports/boost-crc/portfile.cmake b/ports/boost-crc/portfile.cmake index 6528e2d5924d7c..1685331f55e4f8 100644 --- a/ports/boost-crc/portfile.cmake +++ b/ports/boost-crc/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/crc - REF boost-1.70.0 - SHA512 7318072d20d80b747991194477d78177345ce67b618d9dd8bbb6a5432673244c04717d5f41f3bf50daf18ff33d612225cd9109578c07019922609a6db4cccb3e + REF boost-1.76.0 + SHA512 714041c7525dff54ca47d61482d691a06fbb8bf65c93cf87a34f522798657d2d4a01633c2d23c9688626b13e37e4f9f18ab66dccf1499518ba9927499f59e8b2 HEAD_REF master ) diff --git a/ports/boost-crc/vcpkg.json b/ports/boost-crc/vcpkg.json new file mode 100644 index 00000000000000..e87e147c25eb77 --- /dev/null +++ b/ports/boost-crc/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "boost-crc", + "version": "1.76.0", + "description": "Boost crc module", + "homepage": "https://github.com/boostorg/crc", + "dependencies": [ + "boost-array", + "boost-config", + "boost-integer", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-date-time/CONTROL b/ports/boost-date-time/CONTROL deleted file mode 100644 index 2c9a8392f5c8dd..00000000000000 --- a/ports/boost-date-time/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-date-time -Version: 1.70.0 -Build-Depends: boost-algorithm, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/date_time -Description: Boost date_time module diff --git a/ports/boost-date-time/portfile.cmake b/ports/boost-date-time/portfile.cmake index 9a128b701622e5..91971f2cc51e57 100644 --- a/ports/boost-date-time/portfile.cmake +++ b/ports/boost-date-time/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/date_time - REF boost-1.70.0 - SHA512 2ff8c459b3ec04fa6f57b8d94d052fbdc2b0c0774b064cbf681817a7dcc0239e1a6856e25674c9797668dcc2fab3b6f576a633286fcc8e5fe796d74c6f1a52a8 + REF boost-1.76.0 + SHA512 f3d2f78e595762b9d31241d3df3d89a54520557d9cbea945c85a0604ad4a1499382dcb7e55e2c33e45908cbca71d9eb36c9bf72ce1392b7dc24ee34e3b18ba02 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-date-time requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-date-time/vcpkg.json b/ports/boost-date-time/vcpkg.json new file mode 100644 index 00000000000000..36be9680caa6e8 --- /dev/null +++ b/ports/boost-date-time/vcpkg.json @@ -0,0 +1,34 @@ +{ + "name": "boost-date-time", + "version": "1.76.0", + "description": "Boost date_time module", + "homepage": "https://github.com/boostorg/date_time", + "dependencies": [ + "boost-algorithm", + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + "boost-io", + "boost-lexical-cast", + "boost-math", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-numeric-conversion", + "boost-range", + "boost-smart-ptr", + "boost-static-assert", + "boost-throw-exception", + "boost-tokenizer", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-detail/CONTROL b/ports/boost-detail/CONTROL deleted file mode 100644 index 0f31662939523d..00000000000000 --- a/ports/boost-detail/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-detail -Version: 1.70.0 -Build-Depends: boost-compatibility, boost-config, boost-preprocessor, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/detail -Description: Boost detail module diff --git a/ports/boost-detail/portfile.cmake b/ports/boost-detail/portfile.cmake index 48c0a04d4ce796..eff68f8902aa4f 100644 --- a/ports/boost-detail/portfile.cmake +++ b/ports/boost-detail/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/detail - REF boost-1.70.0 - SHA512 8cedb220dce3a4f6aaee13eacdd5c8246e707b724bd260d025b7ece9336dffaa645a3cf59f90ea02136a23126e9a93116485ad5d76e8b04d46e08f043c394018 + REF boost-1.76.0 + SHA512 c1958a1ef6ab2fd9fbf2a16d6a0a4a8e49237e66b36c1f8f515d4c84386c1e98bac6d519f1395628441b9a7cdf01b479ebd28dd203835992e99f614dee5b609b HEAD_REF master ) diff --git a/ports/boost-detail/vcpkg.json b/ports/boost-detail/vcpkg.json new file mode 100644 index 00000000000000..39db2d8557dcea --- /dev/null +++ b/ports/boost-detail/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "boost-detail", + "version": "1.76.0", + "description": "Boost detail module", + "homepage": "https://github.com/boostorg/detail", + "dependencies": [ + "boost-config", + "boost-preprocessor", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-di/CONTROL b/ports/boost-di/CONTROL deleted file mode 100644 index d7c9aea416fed4..00000000000000 --- a/ports/boost-di/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: boost-di -Version: 1.1.0 -Homepage: https://github.com/boost-experimental/di -Description: C++14 Dependency Injection Library. \ No newline at end of file diff --git a/ports/boost-di/portfile.cmake b/ports/boost-di/portfile.cmake deleted file mode 100644 index f6fe59a3faf45e..00000000000000 --- a/ports/boost-di/portfile.cmake +++ /dev/null @@ -1,22 +0,0 @@ -#header-only library -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/di-1.1.0) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/boost-experimental/di/archive/v1.1.0.tar.gz" - FILENAME "di-1.1.0.tar.gz" - SHA512 69f7b0567cffea9bf983aedd7eabd1a07ae20249cd56a13de98eaa0cc835cbe3b76e790da68489536dd07edeb99271a69111f4d0c6b0aa3721ce9f5ead848fe0 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -file(INSTALL ${SOURCE_PATH}/include/boost - DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -# boost-di license does not exist in source folder. -# it shares the boost license. -vcpkg_download_distfile(LICENSE - URLS http://www.boost.org/LICENSE_1_0.txt - FILENAME "boost-di-copyright" - SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 -) -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-di/copyright) diff --git a/ports/boost-disjoint-sets/CONTROL b/ports/boost-disjoint-sets/CONTROL deleted file mode 100644 index 56df8c910e0e15..00000000000000 --- a/ports/boost-disjoint-sets/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-disjoint-sets -Version: 1.70.0 -Build-Depends: boost-graph, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/disjoint_sets -Description: Boost disjoint_sets module diff --git a/ports/boost-disjoint-sets/portfile.cmake b/ports/boost-disjoint-sets/portfile.cmake deleted file mode 100644 index 68215afc8adcf8..00000000000000 --- a/ports/boost-disjoint-sets/portfile.cmake +++ /dev/null @@ -1,14 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO boostorg/disjoint_sets - REF boost-1.70.0 - SHA512 3d85e4f33491529dbc1082ab45d91b93e96d74253108c05f2d6542340c2cf9e4c817c6b9996d7de0e733f09e2e60eee038056db764e3e829662142f9dbe611ca - HEAD_REF master -) - -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) -boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-dll/CONTROL b/ports/boost-dll/CONTROL deleted file mode 100644 index ae2ee519dd3432..00000000000000 --- a/ports/boost-dll/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-dll -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-filesystem (!uwp), boost-function, boost-integer, boost-move, boost-mpl, boost-predef, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-throw-exception, boost-type-index, boost-type-traits, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/dll -Description: Boost dll module diff --git a/ports/boost-dll/portfile.cmake b/ports/boost-dll/portfile.cmake index 7d3765d6a6bbe0..c626a92c5950ef 100644 --- a/ports/boost-dll/portfile.cmake +++ b/ports/boost-dll/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/dll - REF boost-1.70.0 - SHA512 607bcbb31cc4f630bd921a62dd57c35ace268f8eb048bc4460fde85cd399c04bc2f6880a3e868b5a5e24de91a3db04066b89e952740b1d9b2e4f4704555f8226 + REF boost-1.76.0 + SHA512 df41f44a89d1f661b87f1863b0dc551a44040ccd002c9eab6728dc4ad4cc789853ab29c04ce6b17f0d94303cbd9f06ba53521c54f7ec614a061e2cb02db1462a HEAD_REF master ) diff --git a/ports/boost-dll/vcpkg.json b/ports/boost-dll/vcpkg.json new file mode 100644 index 00000000000000..cbf24031081932 --- /dev/null +++ b/ports/boost-dll/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "boost-dll", + "version": "1.76.0", + "description": "Boost dll module", + "homepage": "https://github.com/boostorg/dll", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + "boost-function", + "boost-move", + "boost-predef", + "boost-smart-ptr", + "boost-spirit", + "boost-static-assert", + "boost-system", + "boost-throw-exception", + "boost-type-index", + "boost-type-traits", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-dynamic-bitset/CONTROL b/ports/boost-dynamic-bitset/CONTROL deleted file mode 100644 index c7144e6079fe57..00000000000000 --- a/ports/boost-dynamic-bitset/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-dynamic-bitset -Version: 1.70.0 -Build-Depends: boost-serialization, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/dynamic_bitset -Description: Boost dynamic_bitset module diff --git a/ports/boost-dynamic-bitset/portfile.cmake b/ports/boost-dynamic-bitset/portfile.cmake index 84296b749d7fa0..9f02f766e3fbec 100644 --- a/ports/boost-dynamic-bitset/portfile.cmake +++ b/ports/boost-dynamic-bitset/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/dynamic_bitset - REF boost-1.70.0 - SHA512 a646b54f6c85f0810da3b7346919c8b04b8e993773d42ba866909e932682989e9a31f23c590c84ec64e9fe19ff377586b8487822c9e48234643dc021e5d51c62 + REF boost-1.76.0 + SHA512 5ca3153b18b2a57574c158e09af1bc3e79b769f73988de8d16fc16d4fddb375ce9aaebbee3204a8b5afaaafe6ca484d8a2d85162dec6a576c6bc52674c9d4a3f HEAD_REF master ) diff --git a/ports/boost-dynamic-bitset/vcpkg.json b/ports/boost-dynamic-bitset/vcpkg.json new file mode 100644 index 00000000000000..46a5834bd4b039 --- /dev/null +++ b/ports/boost-dynamic-bitset/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "boost-dynamic-bitset", + "version": "1.76.0", + "description": "Boost dynamic_bitset module", + "homepage": "https://github.com/boostorg/dynamic_bitset", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-detail", + "boost-functional", + "boost-integer", + "boost-move", + "boost-static-assert", + "boost-throw-exception", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-endian/CONTROL b/ports/boost-endian/CONTROL deleted file mode 100644 index a57b0e7dcb5df1..00000000000000 --- a/ports/boost-endian/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-endian -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-predef, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/endian -Description: Boost endian module diff --git a/ports/boost-endian/portfile.cmake b/ports/boost-endian/portfile.cmake index c99b8102728d21..b7451f6aa5e2f8 100644 --- a/ports/boost-endian/portfile.cmake +++ b/ports/boost-endian/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/endian - REF boost-1.70.0 - SHA512 4cf95f9b28dc7936a26c1dbc73419c9a1caa770d4b3d8a613dfc77182c98cd34432c51a40a19f7720a2f061743c30b11f7df7193c5d194313901977c51a130b7 + REF boost-1.76.0 + SHA512 8075e7127872d134954708287aef372f872937ecec50db91fd78cc9de33056ba732519a8f7f76ce9bbcfbec0894416b3f3738259ba93ad2cc47702e58366516f HEAD_REF master ) diff --git a/ports/boost-endian/vcpkg.json b/ports/boost-endian/vcpkg.json new file mode 100644 index 00000000000000..209e7119b5cc62 --- /dev/null +++ b/ports/boost-endian/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "boost-endian", + "version": "1.76.0", + "description": "Boost endian module", + "homepage": "https://github.com/boostorg/endian", + "dependencies": [ + "boost-config", + "boost-core", + "boost-static-assert", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-exception/CONTROL b/ports/boost-exception/CONTROL deleted file mode 100644 index 89927da4570c01..00000000000000 --- a/ports/boost-exception/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-exception -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-modular-build-helper, boost-smart-ptr, boost-tuple, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/exception -Description: Boost exception module diff --git a/ports/boost-exception/portfile.cmake b/ports/boost-exception/portfile.cmake index c0c42767469a71..4414015ea2904f 100644 --- a/ports/boost-exception/portfile.cmake +++ b/ports/boost-exception/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/exception - REF boost-1.70.0 - SHA512 6e8e40e9d5ee2478216f22279d00b835db3e0f43b8a5ff1e7bdbdab4479f86cff152f38a02171630e74ff6c61d58de7f6b9151496b18b9672be791dbd4b77e64 + REF boost-1.76.0 + SHA512 e77b6c6088ad7a5443b635d2336605eb5c04fa97849fae7150df2b2521fe47916bf5c17fead55eefa3aa278eb826ca22058c4145d01e09ccc41c0a7ccf961506 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-exception requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-exception/vcpkg.json b/ports/boost-exception/vcpkg.json new file mode 100644 index 00000000000000..aadce7d0c7c6f6 --- /dev/null +++ b/ports/boost-exception/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "boost-exception", + "version": "1.76.0", + "description": "Boost exception module", + "homepage": "https://github.com/boostorg/exception", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-smart-ptr", + "boost-tuple", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-fiber/CONTROL b/ports/boost-fiber/CONTROL deleted file mode 100644 index 2dc4f4e78996c9..00000000000000 --- a/ports/boost-fiber/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-fiber -Version: 1.70.0 -Build-Depends: boost-algorithm, boost-assert, boost-build, boost-config, boost-context (!uwp), boost-core, boost-detail, boost-filesystem (!uwp), boost-format, boost-intrusive, boost-modular-build-helper, boost-predef, boost-smart-ptr, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/fiber -Description: Boost fiber module diff --git a/ports/boost-fiber/portfile.cmake b/ports/boost-fiber/portfile.cmake index c327f0121e31ad..c9fbc34da7065e 100644 --- a/ports/boost-fiber/portfile.cmake +++ b/ports/boost-fiber/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/fiber - REF boost-1.70.0 - SHA512 d0f844808bf8644d3aad6db3cd44629c6355d6e7b028d99cecc104f97b5bcf765f4238c1c97f693af5693738813517a00c6e692840b24a2f59af376b4e7ac14f + REF boost-1.76.0 + SHA512 b7994427313de7959144b929806a947fae20087c7215df25e2925dbd553e2aa88d8f1c39a70cbbde61f111c005cded7a664961bf633f0251be4b204e42f1fcbb HEAD_REF master ) @@ -15,7 +13,10 @@ string(REPLACE "import ../../config/checks/config" "import config/checks/config" file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-fiber requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-fiber/vcpkg.json b/ports/boost-fiber/vcpkg.json new file mode 100644 index 00000000000000..97cace4b1d4093 --- /dev/null +++ b/ports/boost-fiber/vcpkg.json @@ -0,0 +1,35 @@ +{ + "name": "boost-fiber", + "version": "1.76.0", + "description": "Boost fiber module", + "homepage": "https://github.com/boostorg/fiber", + "supports": "!osx & !uwp & !arm & !emscripten", + "dependencies": [ + "boost-algorithm", + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + { + "name": "boost-context", + "platform": "!uwp & !emscripten" + }, + "boost-core", + "boost-detail", + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + "boost-format", + "boost-intrusive", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-predef", + "boost-smart-ptr", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-filesystem/CONTROL b/ports/boost-filesystem/CONTROL deleted file mode 100644 index 954ab287ac03a4..00000000000000 --- a/ports/boost-filesystem/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-filesystem -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-smart-ptr, boost-system, boost-type-traits, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/filesystem -Description: Boost filesystem module diff --git a/ports/boost-filesystem/portfile.cmake b/ports/boost-filesystem/portfile.cmake index af0af051785d70..55241314a0567b 100644 --- a/ports/boost-filesystem/portfile.cmake +++ b/ports/boost-filesystem/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/filesystem - REF boost-1.70.0 - SHA512 c08d439dac95543f242528ee09e0bc71685988705c2bc4d98cb71f521b7966f86b6bec0a8c689a188b5e6a1d8629b2eeefdcc856cbe2fa407612548e26ee291c + REF boost-1.76.0 + SHA512 1df89b441c2528844218e447e420c7c9aea0d72f8563ff20f86acebbc7d0d69ed9661422b3625e51005b975d73d7fac3efb69692e21ee13dd92fc1855f119088 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-filesystem requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-filesystem/vcpkg.json b/ports/boost-filesystem/vcpkg.json new file mode 100644 index 00000000000000..d5f6438d160daa --- /dev/null +++ b/ports/boost-filesystem/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "boost-filesystem", + "version": "1.76.0", + "description": "Boost filesystem module", + "homepage": "https://github.com/boostorg/filesystem", + "supports": "!uwp", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + "boost-functional", + "boost-io", + "boost-iterator", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-predef", + "boost-smart-ptr", + "boost-system", + "boost-type-traits", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-flyweight/CONTROL b/ports/boost-flyweight/CONTROL deleted file mode 100644 index 61c80822ffa422..00000000000000 --- a/ports/boost-flyweight/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-flyweight -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-functional, boost-interprocess, boost-mpl, boost-multi-index, boost-parameter, boost-preprocessor, boost-serialization, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/flyweight -Description: Boost flyweight module diff --git a/ports/boost-flyweight/portfile.cmake b/ports/boost-flyweight/portfile.cmake index 1f2d9a56171231..9d14c96eee7fd5 100644 --- a/ports/boost-flyweight/portfile.cmake +++ b/ports/boost-flyweight/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/flyweight - REF boost-1.70.0 - SHA512 5c8349be1c4c041362a9fb5d2c9da72aa52f2c36fdd88025753f042e6a37cce5818f5acbff4b8727e0997614945f9f9d6147241b52e7df2d2b308d0551da6cf6 + REF boost-1.76.0 + SHA512 f772c0e7c3efd66c191383c6490ace32294b34f67af569c885abb375c2afdbfeb64de810b50096a902d90bc9f05bae19323a8ec9546f0cc3b9021cdbc497e97a HEAD_REF master ) diff --git a/ports/boost-flyweight/vcpkg.json b/ports/boost-flyweight/vcpkg.json new file mode 100644 index 00000000000000..39b9f8965d383b --- /dev/null +++ b/ports/boost-flyweight/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "boost-flyweight", + "version": "1.76.0", + "description": "Boost flyweight module", + "homepage": "https://github.com/boostorg/flyweight", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-detail", + "boost-functional", + "boost-interprocess", + "boost-mpl", + "boost-multi-index", + "boost-parameter", + "boost-preprocessor", + "boost-serialization", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-foreach/CONTROL b/ports/boost-foreach/CONTROL deleted file mode 100644 index 3574b53c86a1ad..00000000000000 --- a/ports/boost-foreach/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-foreach -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-range, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/foreach -Description: Boost foreach module diff --git a/ports/boost-foreach/portfile.cmake b/ports/boost-foreach/portfile.cmake index b5a420c4201208..1c2ded7100758c 100644 --- a/ports/boost-foreach/portfile.cmake +++ b/ports/boost-foreach/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/foreach - REF boost-1.70.0 - SHA512 c63f427066e8f964c58a3e721a037346afd62a4df6c01fd76ebce9fac5634087ac80b06ed8dc70171be51380d7a2fe65727fdcf5fb1bd993e005ae4689fe0bdd + REF boost-1.76.0 + SHA512 b2d82918147aa9e22fba6ad798479fc4fca6a437a73c005cde715c5d19adf7320f986637a270742783d0d40bcadb11ae1cc7abbec4358363496d08b8c8d908e0 HEAD_REF master ) diff --git a/ports/boost-foreach/vcpkg.json b/ports/boost-foreach/vcpkg.json new file mode 100644 index 00000000000000..2f117a39234b5b --- /dev/null +++ b/ports/boost-foreach/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "boost-foreach", + "version": "1.76.0", + "description": "Boost foreach module", + "homepage": "https://github.com/boostorg/foreach", + "dependencies": [ + "boost-config", + "boost-core", + "boost-detail", + "boost-iterator", + "boost-mpl", + "boost-range", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-format/CONTROL b/ports/boost-format/CONTROL deleted file mode 100644 index 689d74729e94ce..00000000000000 --- a/ports/boost-format/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-format -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-optional, boost-smart-ptr, boost-throw-exception, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/format -Description: Boost format module diff --git a/ports/boost-format/portfile.cmake b/ports/boost-format/portfile.cmake index fb901824e09b06..33456281ba9e64 100644 --- a/ports/boost-format/portfile.cmake +++ b/ports/boost-format/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/format - REF boost-1.70.0 - SHA512 a36cc172fec72b5fd989d6e11d8f2f80f93138a99b03a7b1443663ff81ce2f302dd50f25e0308229de9dd6f59b8510151f27255cdafcac152b185c7174d11a86 + REF boost-1.76.0 + SHA512 7f988f0a3bf2e483d09edc7eb698128286b5c19bb9c4e39e9947ec4d1457b5c3d0b6d7b6f656dd9a2f96e4d372745d62843cd2836b12b96624059576c1905e3b HEAD_REF master ) diff --git a/ports/boost-format/vcpkg.json b/ports/boost-format/vcpkg.json new file mode 100644 index 00000000000000..e824cf9d2ba28c --- /dev/null +++ b/ports/boost-format/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "boost-format", + "version": "1.76.0", + "description": "Boost format module", + "homepage": "https://github.com/boostorg/format", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-detail", + "boost-optional", + "boost-smart-ptr", + "boost-throw-exception", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-function-types/CONTROL b/ports/boost-function-types/CONTROL deleted file mode 100644 index b71fffba52c50d..00000000000000 --- a/ports/boost-function-types/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-function-types -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/function_types -Description: Boost function_types module diff --git a/ports/boost-function-types/portfile.cmake b/ports/boost-function-types/portfile.cmake index f9f380a2001a2a..c0486271721c1d 100644 --- a/ports/boost-function-types/portfile.cmake +++ b/ports/boost-function-types/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/function_types - REF boost-1.70.0 - SHA512 6022a7045d39b18b76bd6ca57dd7e960d1242321a2c1adb5f9c7215e58ce472adfe2be40a4f3bd2f9d28e2fad30ad75ee896896dff15e5cfa446c085d9a5c9e2 + REF boost-1.76.0 + SHA512 d95ffacc507baf0bedb495f1ea7e0639a19db45b1d55f212dee1eea1e0a9de932e4b74da623200666eef5ead3aea60b66bf7f73cda845b95e54d26714dcdc2e6 HEAD_REF master ) diff --git a/ports/boost-function-types/vcpkg.json b/ports/boost-function-types/vcpkg.json new file mode 100644 index 00000000000000..539544f2f816ff --- /dev/null +++ b/ports/boost-function-types/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "boost-function-types", + "version": "1.76.0", + "description": "Boost function_types module", + "homepage": "https://github.com/boostorg/function_types", + "dependencies": [ + "boost-config", + "boost-core", + "boost-detail", + "boost-mpl", + "boost-preprocessor", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-function/CONTROL b/ports/boost-function/CONTROL deleted file mode 100644 index 310e9b497260d1..00000000000000 --- a/ports/boost-function/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-function -Version: 1.70.0 -Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-integer, boost-preprocessor, boost-throw-exception, boost-type-index, boost-typeof, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/function -Description: Boost function module diff --git a/ports/boost-function/portfile.cmake b/ports/boost-function/portfile.cmake index cc943013e87dfa..afce6022126d4d 100644 --- a/ports/boost-function/portfile.cmake +++ b/ports/boost-function/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/function - REF boost-1.70.0 - SHA512 d655792b1262ef039348b09328614acd954685726dcaeccf564ca0a4c36f25f0d764dfc2544cf2c08977d516610db8fdf22671d16881187163226953da22e654 + REF boost-1.76.0 + SHA512 d8ad636b47fc77208b3b438494c8bfc286938fd310e91adb9a55a099b552f70a86dfde263fcf100c77fe43b300050dd19c289802366beaa9bd36f38a8539b34e HEAD_REF master ) diff --git a/ports/boost-function/vcpkg.json b/ports/boost-function/vcpkg.json new file mode 100644 index 00000000000000..4d760713048b5b --- /dev/null +++ b/ports/boost-function/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "boost-function", + "version": "1.76.0", + "description": "Boost function module", + "homepage": "https://github.com/boostorg/function", + "dependencies": [ + "boost-assert", + "boost-bind", + "boost-config", + "boost-core", + "boost-integer", + "boost-preprocessor", + "boost-throw-exception", + "boost-type-index", + "boost-type-traits", + "boost-typeof", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-functional/CONTROL b/ports/boost-functional/CONTROL deleted file mode 100644 index 138c8c6e37f14f..00000000000000 --- a/ports/boost-functional/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-functional -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-iterator, boost-mpl, boost-preprocessor, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/functional -Description: Boost functional module diff --git a/ports/boost-functional/portfile.cmake b/ports/boost-functional/portfile.cmake index 9dbbb6b38b5e06..dba5df091fbffd 100644 --- a/ports/boost-functional/portfile.cmake +++ b/ports/boost-functional/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/functional - REF boost-1.70.0 - SHA512 ca32f1e0292835ff059e907e2392b059cdb85e1c1b7b7850f9e490d59ecd4d95d7cc2f6ebd548a167018b179812045104692e638334d35243da26117f8ccceb7 + REF boost-1.76.0 + SHA512 9b63cdbba4a997c04a887775dd4d351eb3fce55ebc6f620865f88f696d969cc56d47675c21ed7a976f19b64eee4875b0e47dd0949e56a576f19fb1a6c59fe31a HEAD_REF master ) diff --git a/ports/boost-functional/vcpkg.json b/ports/boost-functional/vcpkg.json new file mode 100644 index 00000000000000..df76a7e8763af7 --- /dev/null +++ b/ports/boost-functional/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-functional", + "version": "1.76.0", + "description": "Boost functional module", + "homepage": "https://github.com/boostorg/functional", + "dependencies": [ + "boost-config", + "boost-core", + "boost-mpl", + "boost-preprocessor", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-fusion/CONTROL b/ports/boost-fusion/CONTROL deleted file mode 100644 index 28305e0827ddc4..00000000000000 --- a/ports/boost-fusion/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-fusion -Version: 1.70.0 -Build-Depends: boost-config, boost-container-hash, boost-core, boost-detail, boost-function-types, boost-mpl, boost-preprocessor, boost-static-assert, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/fusion -Description: Boost fusion module diff --git a/ports/boost-fusion/portfile.cmake b/ports/boost-fusion/portfile.cmake index 23844aee702cde..707ca68e867574 100644 --- a/ports/boost-fusion/portfile.cmake +++ b/ports/boost-fusion/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/fusion - REF boost-1.70.0 - SHA512 709d374a225b0a92ccf52e2fcad02a182bd49bce372b1f57857b9b9409a2ee83c1f6f97f8b9e24ba5f1b22fc58f9a0895d56e83c2af772136216d2cdac237e48 + REF boost-1.76.0 + SHA512 4e8244962d5f165de9953f7669248002d36c82c213ae3e6374c2b997a3a39f151cf1bee2a5e5e45ae06f9ee7eb0322aeeb0ef7e4215d0829e9aa94f9000ee4b9 HEAD_REF master ) diff --git a/ports/boost-fusion/vcpkg.json b/ports/boost-fusion/vcpkg.json new file mode 100644 index 00000000000000..c32b2d333df5fb --- /dev/null +++ b/ports/boost-fusion/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "boost-fusion", + "version": "1.76.0", + "description": "Boost fusion module", + "homepage": "https://github.com/boostorg/fusion", + "dependencies": [ + "boost-config", + "boost-container-hash", + "boost-core", + "boost-detail", + "boost-function-types", + "boost-mpl", + "boost-preprocessor", + "boost-static-assert", + "boost-tuple", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-geometry/CONTROL b/ports/boost-geometry/CONTROL deleted file mode 100644 index a616793a962b2e..00000000000000 --- a/ports/boost-geometry/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-geometry -Version: 1.70.0 -Build-Depends: boost-algorithm, boost-array, boost-assert, boost-concept-check, boost-config, boost-container, boost-core, boost-detail, boost-function-types, boost-fusion, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multiprecision, boost-numeric-conversion, boost-polygon, boost-qvm, boost-range, boost-rational, boost-serialization, boost-smart-ptr, boost-static-assert, boost-thread (!arm), boost-throw-exception, boost-tokenizer, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/geometry -Description: Boost geometry module diff --git a/ports/boost-geometry/portfile.cmake b/ports/boost-geometry/portfile.cmake index dbe2412eb8e38e..0bba9bc932b396 100644 --- a/ports/boost-geometry/portfile.cmake +++ b/ports/boost-geometry/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/geometry - REF boost-1.70.0 - SHA512 78fd4f1f6f5956872c89f9b2d4cf20f7531ea55e50ad2dc33ee518e0f24a2e9a12e525ebbbb18ee884756e25cebb19307f199ddf1318dd4a07655e46e15d68dc + REF boost-1.76.0 + SHA512 2ae1af6337cbb820cef2c34c24b55fb032e4b57ead2a5fc5ee041a083f08e1c35c873e94a135d1c990809e1f160d19aedb31d8a1715f2c211361279fd9707236 HEAD_REF master ) diff --git a/ports/boost-geometry/vcpkg.json b/ports/boost-geometry/vcpkg.json new file mode 100644 index 00000000000000..573f8e2ded62b8 --- /dev/null +++ b/ports/boost-geometry/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "boost-geometry", + "version": "1.76.0", + "description": "Boost geometry module", + "homepage": "https://github.com/boostorg/geometry", + "dependencies": [ + "boost-algorithm", + "boost-array", + "boost-assert", + "boost-concept-check", + "boost-config", + "boost-container", + "boost-core", + "boost-function-types", + "boost-fusion", + "boost-integer", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + "boost-move", + "boost-mpl", + "boost-multiprecision", + "boost-numeric-conversion", + "boost-polygon", + "boost-qvm", + "boost-range", + "boost-rational", + "boost-serialization", + "boost-smart-ptr", + "boost-static-assert", + "boost-thread", + "boost-throw-exception", + "boost-tokenizer", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-variant", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-gil/CONTROL b/ports/boost-gil/CONTROL deleted file mode 100644 index 45c378a720af05..00000000000000 --- a/ports/boost-gil/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-gil -Version: 1.70.0 -Build-Depends: boost-assert, boost-concept-check, boost-config, boost-core, boost-filesystem (!uwp), boost-integer, boost-iterator, boost-mpl, boost-numeric-conversion, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/gil -Description: Boost gil module diff --git a/ports/boost-gil/portfile.cmake b/ports/boost-gil/portfile.cmake index 8957f3e6f1608e..ac480b26286ccf 100644 --- a/ports/boost-gil/portfile.cmake +++ b/ports/boost-gil/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/gil - REF boost-1.70.0 - SHA512 2b0149b690b9ae45e9e85fb1441b9d20f6f1238a710393f8acbda6cefb12483568f612eeaf5597d187edadf459d99bb8417c807b35360fb3596d107de73482cb + REF boost-1.76.0 + SHA512 ba3504fb8af75406c1e41d5f17fe8a31629949902cee75719890250bdbe45ab170d36e66f76e20dfe8612fb1888f152158bc21f4488e85a5a25ebc3aad18dd4d HEAD_REF master ) diff --git a/ports/boost-gil/vcpkg.json b/ports/boost-gil/vcpkg.json new file mode 100644 index 00000000000000..402b9e0fdd3188 --- /dev/null +++ b/ports/boost-gil/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "boost-gil", + "version": "1.76.0", + "description": "Boost gil module", + "homepage": "https://github.com/boostorg/gil", + "dependencies": [ + "boost-assert", + "boost-concept-check", + "boost-config", + "boost-core", + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + "boost-integer", + "boost-iterator", + "boost-mp11", + "boost-numeric-conversion", + "boost-preprocessor", + "boost-utility", + "boost-variant2", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-graph-parallel/CONTROL b/ports/boost-graph-parallel/CONTROL deleted file mode 100644 index f78581dc68c506..00000000000000 --- a/ports/boost-graph-parallel/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-graph-parallel -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container-hash, boost-detail, boost-dynamic-bitset, boost-filesystem (!uwp), boost-foreach, boost-function, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/graph_parallel -Description: Boost graph_parallel module diff --git a/ports/boost-graph-parallel/portfile.cmake b/ports/boost-graph-parallel/portfile.cmake index 10899ea8117bdf..03830932976c98 100644 --- a/ports/boost-graph-parallel/portfile.cmake +++ b/ports/boost-graph-parallel/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/graph_parallel - REF boost-1.70.0 - SHA512 31331fa45061c87061137c2b1bdcce60e0bf2de93d292a7598135eb7b1bdadb8b46be8ac0d89c583b004d2a543f6a06765eafea3875a60b0b38e2986e53adfd9 + REF boost-1.76.0 + SHA512 6328aa909cb611728e10cb23f666b68ce11d2a79130946e60da3ce664c5aa71da43e05269720455647f0b52f4b4d7e941ea1cfd1e203bf42a494a44f770185c2 HEAD_REF master ) diff --git a/ports/boost-graph-parallel/vcpkg.json b/ports/boost-graph-parallel/vcpkg.json new file mode 100644 index 00000000000000..7fbb59aa391fa4 --- /dev/null +++ b/ports/boost-graph-parallel/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "boost-graph-parallel", + "version": "1.76.0", + "description": "Boost graph_parallel module", + "homepage": "https://github.com/boostorg/graph_parallel", + "dependencies": [ + "boost-assert", + "boost-concept-check", + "boost-config", + "boost-container-hash", + "boost-detail", + "boost-dynamic-bitset", + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + "boost-foreach", + "boost-function", + "boost-graph", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + "boost-mpl", + "boost-optional", + "boost-property-map", + "boost-random", + "boost-serialization", + "boost-smart-ptr", + "boost-static-assert", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-variant", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-graph/CONTROL b/ports/boost-graph/CONTROL deleted file mode 100644 index 14d3555ad19aad..00000000000000 --- a/ports/boost-graph/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-graph -Version: 1.70.0 -Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-container-hash, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (!uwp), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive -Homepage: https://github.com/boostorg/graph -Description: Boost graph module diff --git a/ports/boost-graph/portfile.cmake b/ports/boost-graph/portfile.cmake index 9d62779d4131dc..bff59f5c57ce0b 100644 --- a/ports/boost-graph/portfile.cmake +++ b/ports/boost-graph/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/graph - REF boost-1.70.0 - SHA512 51f0cfed08ad19d1f4782ffeaa9e415f1b25fd49d89429105d45a2f2ac72314b12c4fd37793e9453c422e005c9c6159257313a3334df445f8e7fb4129822b73a + REF boost-1.76.0 + SHA512 4a5699193adea6ad2df7c1fc9152be58a1234e79fad03a92dd7eca32cac41d2295b1b529b876b7d179b21097baadd8663e68a7d237abcf4b255772ed18f42a1a HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-graph requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-graph/vcpkg.json b/ports/boost-graph/vcpkg.json new file mode 100644 index 00000000000000..eb3e7e79fd24e0 --- /dev/null +++ b/ports/boost-graph/vcpkg.json @@ -0,0 +1,62 @@ +{ + "name": "boost-graph", + "version": "1.76.0", + "description": "Boost graph module", + "homepage": "https://github.com/boostorg/graph", + "dependencies": [ + "boost-algorithm", + "boost-any", + "boost-array", + "boost-assert", + "boost-bimap", + "boost-bind", + { + "name": "boost-build", + "host": true + }, + "boost-concept-check", + "boost-config", + "boost-container-hash", + "boost-conversion", + "boost-core", + "boost-detail", + "boost-foreach", + "boost-function", + "boost-integer", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-move", + "boost-mpl", + "boost-multi-index", + "boost-optional", + "boost-parameter", + "boost-preprocessor", + "boost-property-map", + "boost-property-tree", + "boost-random", + "boost-range", + "boost-regex", + "boost-serialization", + "boost-smart-ptr", + "boost-spirit", + "boost-static-assert", + { + "name": "boost-test", + "platform": "!uwp" + }, + "boost-throw-exception", + "boost-tti", + "boost-tuple", + "boost-type-traits", + "boost-typeof", + "boost-unordered", + "boost-utility", + "boost-vcpkg-helpers", + "boost-xpressive" + ] +} diff --git a/ports/boost-hana/CONTROL b/ports/boost-hana/CONTROL deleted file mode 100644 index 26acfb0c13c48c..00000000000000 --- a/ports/boost-hana/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-hana -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/hana -Description: Boost hana module diff --git a/ports/boost-hana/portfile.cmake b/ports/boost-hana/portfile.cmake index 20b299ce812a70..324cc11bd7fca5 100644 --- a/ports/boost-hana/portfile.cmake +++ b/ports/boost-hana/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/hana - REF boost-1.70.0 - SHA512 0a927fe46988a7f8ebe8a799437009349270244206f3f146fa33f37e081fba34f431dfce3b5a07fd1e7f77050f11c45e60277f4555fdc8004251b603eb88fa17 + REF boost-1.76.0 + SHA512 839eb1684335ae541dd9342fda8ef5df5003b470922abd5fd72c175e03be4f0158d5cb2892bbce071358b641f5591a852c180f81ac3fb9777e2b88dd095491f2 HEAD_REF master ) diff --git a/ports/boost-hana/vcpkg.json b/ports/boost-hana/vcpkg.json new file mode 100644 index 00000000000000..1a075a79b978eb --- /dev/null +++ b/ports/boost-hana/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "boost-hana", + "version": "1.76.0", + "description": "Boost hana module", + "homepage": "https://github.com/boostorg/hana", + "dependencies": [ + "boost-config", + "boost-core", + "boost-fusion", + "boost-mpl", + "boost-tuple", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-heap/CONTROL b/ports/boost-heap/CONTROL deleted file mode 100644 index f0865f26536156..00000000000000 --- a/ports/boost-heap/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-heap -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-integer, boost-intrusive, boost-iterator, boost-parameter, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/heap -Description: Boost heap module diff --git a/ports/boost-heap/portfile.cmake b/ports/boost-heap/portfile.cmake index d4165de940da65..34a53fdf0bf84b 100644 --- a/ports/boost-heap/portfile.cmake +++ b/ports/boost-heap/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/heap - REF boost-1.70.0 - SHA512 5f264465ab572ccd804c1209948133033f8379bea549d671a10b8e5b9db74bf92c7c580f11b689bd553a5a252854e12179c9daf00d890ff37a913d0cba463806 + REF boost-1.76.0 + SHA512 11f16b0a573108d2c2f58ba9669371d2db5e6090f9d50abc367fd295fb5966a985793081e222742305e9cc86d950c8545f1afa0a855d43eab6cabf41a36e9335 HEAD_REF master ) diff --git a/ports/boost-heap/vcpkg.json b/ports/boost-heap/vcpkg.json new file mode 100644 index 00000000000000..a59c675fd3709f --- /dev/null +++ b/ports/boost-heap/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "boost-heap", + "version": "1.76.0", + "description": "Boost heap module", + "homepage": "https://github.com/boostorg/heap", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-bind", + "boost-concept-check", + "boost-config", + "boost-core", + "boost-intrusive", + "boost-iterator", + "boost-parameter", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-histogram/CONTROL b/ports/boost-histogram/CONTROL deleted file mode 100644 index a575718118f441..00000000000000 --- a/ports/boost-histogram/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-histogram -Version: 1.70.0 -Build-Depends: boost-assert, boost-callable-traits, boost-config, boost-core, boost-integer, boost-iterator, boost-mp11, boost-serialization, boost-throw-exception, boost-variant, boost-vcpkg-helpers -Description: Boost histogram module diff --git a/ports/boost-histogram/portfile.cmake b/ports/boost-histogram/portfile.cmake index 692adb09674a82..1246b2a273c887 100644 --- a/ports/boost-histogram/portfile.cmake +++ b/ports/boost-histogram/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/histogram - REF boost-1.70.0 - SHA512 0eb1b9c64de27e0364c965710208d85ce2e19c009d88c4969a53f11dfb774c38bcfe1ed48bdc896e6e695bb536879e0ef1ce3ed2c7e72e15c3e480c7b625623f + REF boost-1.76.0 + SHA512 0bef1cfbc328f73f14bd364902a157a519343ade5751466db3bfdfc63ab76490a9c7f11f8b6d0e24450646f7c26bb967f93719a0fb49f399de6e71b7a19827ff HEAD_REF master ) diff --git a/ports/boost-histogram/vcpkg.json b/ports/boost-histogram/vcpkg.json new file mode 100644 index 00000000000000..00e04b7a5d5e02 --- /dev/null +++ b/ports/boost-histogram/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "boost-histogram", + "version": "1.76.0", + "description": "Boost histogram module", + "homepage": "https://github.com/boostorg/histogram", + "dependencies": [ + "boost-config", + "boost-core", + "boost-mp11", + "boost-serialization", + "boost-throw-exception", + "boost-variant2", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-hof/CONTROL b/ports/boost-hof/CONTROL deleted file mode 100644 index 02262aaf919fe0..00000000000000 --- a/ports/boost-hof/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-hof -Version: 1.70.0 -Build-Depends: boost-vcpkg-helpers -Description: Boost hof module diff --git a/ports/boost-hof/portfile.cmake b/ports/boost-hof/portfile.cmake index acf7acbc8b96e4..7f07484da253f8 100644 --- a/ports/boost-hof/portfile.cmake +++ b/ports/boost-hof/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/hof - REF boost-1.70.0 - SHA512 93a0be0e6b435ca99e606098add9e784ce46925d352a35d9d928070f4deccf1091196fda16627c73f6eb008ff86996917346b83813dee6e94c8cd3927f5c7233 + REF boost-1.76.0 + SHA512 40d70bd531c1c69bcefe0105001ff9c423e23029197a60e46c163abf2b66c726e7d8411503c1201946a1d6d0aa8aef5caded9942968b7844023fbe023a1509c8 HEAD_REF master ) diff --git a/ports/boost-hof/vcpkg.json b/ports/boost-hof/vcpkg.json new file mode 100644 index 00000000000000..3695f5ac94f79c --- /dev/null +++ b/ports/boost-hof/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-hof", + "version": "1.76.0", + "description": "Boost hof module", + "homepage": "https://github.com/boostorg/hof", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-icl/CONTROL b/ports/boost-icl/CONTROL deleted file mode 100644 index 09e77e74476a7c..00000000000000 --- a/ports/boost-icl/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-icl -Version: 1.70.0 -Build-Depends: boost-assert, boost-concept-check, boost-config, boost-container, boost-date-time, boost-detail, boost-iterator, boost-move, boost-mpl, boost-range, boost-rational, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/icl -Description: Boost icl module diff --git a/ports/boost-icl/portfile.cmake b/ports/boost-icl/portfile.cmake index f8adcccae75810..ce5ffd240124a1 100644 --- a/ports/boost-icl/portfile.cmake +++ b/ports/boost-icl/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/icl - REF boost-1.70.0 - SHA512 440d2c657f0b3ff5c2755944e8eef0e068b16e84416fd7e3552dd976916b875a8cd73fae7ba205812593415a684d80791f86c7e262f3c5e3aa56711cff579722 + REF boost-1.76.0 + SHA512 e8561b8217cc8048b8bcaed49f827ec26ab6f0169050d299a5d85bd87bc2fcbc6cf9a078ff9de2751f8a419e9a1556f93b70742cec6bea2e88a353ce17db5e12 HEAD_REF master ) diff --git a/ports/boost-icl/vcpkg.json b/ports/boost-icl/vcpkg.json new file mode 100644 index 00000000000000..69d0c261f6d3dc --- /dev/null +++ b/ports/boost-icl/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "boost-icl", + "version": "1.76.0", + "description": "Boost icl module", + "homepage": "https://github.com/boostorg/icl", + "dependencies": [ + "boost-assert", + "boost-concept-check", + "boost-config", + "boost-container", + "boost-date-time", + "boost-detail", + "boost-iterator", + "boost-move", + "boost-mpl", + "boost-range", + "boost-rational", + "boost-static-assert", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-integer/CONTROL b/ports/boost-integer/CONTROL deleted file mode 100644 index 72fe9d83feba91..00000000000000 --- a/ports/boost-integer/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-integer -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/integer -Description: Boost integer module diff --git a/ports/boost-integer/portfile.cmake b/ports/boost-integer/portfile.cmake index 4edb497ee20a4f..618bafcf9e5a24 100644 --- a/ports/boost-integer/portfile.cmake +++ b/ports/boost-integer/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/integer - REF boost-1.70.0 - SHA512 914556323d480be24b9f59b3596702510d1188584eed70bc734e14ca3999a77d4119fc30eafe95548a99fc657467500193e250907f5dad5d05692d7c52607c12 + REF boost-1.76.0 + SHA512 d0df93ba10d4c6004c4b23aca512e3346c40cf6684d53059090b79dfcc633e89449beeae3b2f8f4e0c721076b55f92159dd5c6a7665405e426c66251ea2913a8 HEAD_REF master ) diff --git a/ports/boost-integer/vcpkg.json b/ports/boost-integer/vcpkg.json new file mode 100644 index 00000000000000..5f6bc4df062fb9 --- /dev/null +++ b/ports/boost-integer/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "boost-integer", + "version": "1.76.0", + "description": "Boost integer module", + "homepage": "https://github.com/boostorg/integer", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-detail", + "boost-static-assert", + "boost-throw-exception", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-interprocess/CONTROL b/ports/boost-interprocess/CONTROL deleted file mode 100644 index d1aebd1e0c756b..00000000000000 --- a/ports/boost-interprocess/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-interprocess -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/interprocess -Description: Boost interprocess module diff --git a/ports/boost-interprocess/portfile.cmake b/ports/boost-interprocess/portfile.cmake index dd50bbf7b6452d..f4f402123ab593 100644 --- a/ports/boost-interprocess/portfile.cmake +++ b/ports/boost-interprocess/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/interprocess - REF boost-1.70.0 - SHA512 1f496d61039a6cb9084a8bea1e70538fe36b81a76a7241de5e96735d98287ee82755593c1c07201b5b14cd70b515b47e134515864bf50f075cb76f669b0b31d3 + REF boost-1.76.0 + SHA512 853cb0d6a51d42223d2c242d03b339f723e18c54c7a1f4e2be841a85a816ebc1524f5b9b90441c054072d5a408a724ee8dbeac22997ef5dfb3cf78c87c2acf71 HEAD_REF master ) diff --git a/ports/boost-interprocess/vcpkg.json b/ports/boost-interprocess/vcpkg.json new file mode 100644 index 00000000000000..765d308702f400 --- /dev/null +++ b/ports/boost-interprocess/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "boost-interprocess", + "version": "1.76.0", + "description": "Boost interprocess module", + "homepage": "https://github.com/boostorg/interprocess", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-container", + "boost-core", + "boost-date-time", + "boost-detail", + "boost-integer", + "boost-intrusive", + "boost-move", + "boost-static-assert", + "boost-type-traits", + "boost-unordered", + "boost-utility", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-interval/CONTROL b/ports/boost-interval/CONTROL deleted file mode 100644 index 0c74b3e4902228..00000000000000 --- a/ports/boost-interval/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-interval -Version: 1.70.0 -Build-Depends: boost-compatibility, boost-config, boost-logic, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/interval -Description: Boost interval module diff --git a/ports/boost-interval/portfile.cmake b/ports/boost-interval/portfile.cmake index c1e5a4a292b194..88017359bff32b 100644 --- a/ports/boost-interval/portfile.cmake +++ b/ports/boost-interval/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/interval - REF boost-1.70.0 - SHA512 235bc027737963b9399c02b1ea5bc4e2024e439837f52f0d729c43df33c0202155ae1311ed114a7796ac24a5311f5c8f70deabc0a1cb8712c6bd02972bcfb974 + REF boost-1.76.0 + SHA512 72e7712634c314fe51733ecf8dcad5ddf6361cbae9df4471ec632b4b8c126a0965f3ded1a15c9229e2b2c817024cf27ec1febbe641b10fefa2572611ace5f4b7 HEAD_REF master ) diff --git a/ports/boost-interval/vcpkg.json b/ports/boost-interval/vcpkg.json new file mode 100644 index 00000000000000..fccc60b6609768 --- /dev/null +++ b/ports/boost-interval/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "boost-interval", + "version": "1.76.0", + "description": "Boost interval module", + "homepage": "https://github.com/boostorg/interval", + "dependencies": [ + "boost-config", + "boost-detail", + "boost-logic", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-intrusive/CONTROL b/ports/boost-intrusive/CONTROL deleted file mode 100644 index 18a831adc04956..00000000000000 --- a/ports/boost-intrusive/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-intrusive -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-container-hash, boost-core, boost-integer, boost-move, boost-static-assert, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/intrusive -Description: Boost intrusive module diff --git a/ports/boost-intrusive/portfile.cmake b/ports/boost-intrusive/portfile.cmake index 071df857a49808..9a7a4f0afe5baa 100644 --- a/ports/boost-intrusive/portfile.cmake +++ b/ports/boost-intrusive/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/intrusive - REF boost-1.70.0 - SHA512 6f8b68b6fbb3fb400d85b7525b0bd562b27760760d1f5057b59c0e208940de3da72ba61d98ea449851af2dc3296597a84a011c3087174d955832de24716cbd6c + REF boost-1.76.0 + SHA512 272ad56917b9f54d1a4ff578ac690766a692932ca7226a496b9a161d399c9a2e00f762db21924d7de6a446757f1dc5723af5e977a62ccfe408e4422c80cf76a8 HEAD_REF master ) diff --git a/ports/boost-intrusive/vcpkg.json b/ports/boost-intrusive/vcpkg.json new file mode 100644 index 00000000000000..2f043a7b6a6f10 --- /dev/null +++ b/ports/boost-intrusive/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "boost-intrusive", + "version": "1.76.0", + "description": "Boost intrusive module", + "homepage": "https://github.com/boostorg/intrusive", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-container-hash", + "boost-core", + "boost-move", + "boost-static-assert", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-io/CONTROL b/ports/boost-io/CONTROL deleted file mode 100644 index aa633c00b8d724..00000000000000 --- a/ports/boost-io/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-io -Version: 1.70.0 -Build-Depends: boost-detail, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/io -Description: Boost io module diff --git a/ports/boost-io/portfile.cmake b/ports/boost-io/portfile.cmake index ca85bb2d60b921..ba9c1f960b6607 100644 --- a/ports/boost-io/portfile.cmake +++ b/ports/boost-io/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/io - REF boost-1.70.0 - SHA512 9d879f365664b36a8d8574f9f305ebb44c2742975192565f67f37258b6597fd6a13aaa33727c078501ba6373405a53c8374fe800b0b9169bc92eee97b0947a91 + REF boost-1.76.0 + SHA512 e03511225fe52fb18842404f1218bf1cab4b36010d43c65ae8296a6b845e0dfce4b7efdb15c8784b54ad099cfe1ab46b535b628cff193d98662bb268d7db6d41 HEAD_REF master ) diff --git a/ports/boost-io/vcpkg.json b/ports/boost-io/vcpkg.json new file mode 100644 index 00000000000000..06a482f8d79bc7 --- /dev/null +++ b/ports/boost-io/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "boost-io", + "version": "1.76.0", + "description": "Boost io module", + "homepage": "https://github.com/boostorg/io", + "dependencies": [ + "boost-config", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-iostreams/CONTROL b/ports/boost-iostreams/CONTROL deleted file mode 100644 index e1dafa33b01d9c..00000000000000 --- a/ports/boost-iostreams/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-iostreams -Version: 1.70.0-1 -Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-mpl, boost-numeric-conversion, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, liblzma, zlib, zstd -Homepage: https://github.com/boostorg/iostreams -Description: Boost iostreams module diff --git a/ports/boost-iostreams/portfile.cmake b/ports/boost-iostreams/portfile.cmake index 6c9e41ace200ef..3c6838f269e7e5 100644 --- a/ports/boost-iostreams/portfile.cmake +++ b/ports/boost-iostreams/portfile.cmake @@ -1,31 +1,18 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/iostreams - REF boost-1.70.0 - SHA512 0b0d3b5408d389783d6538c6ed41d615dd0eda1a5c023ed490308b010ccdb34b34dfbb934caa9df5417168570b6d2963d95b0321ab9378dc43c8dc6d89aecf89 + REF boost-1.76.0 + SHA512 3107bc329adf835b4f8592ec2c8988b377910bc6a724ba2f378dccf9e050da14ef593e5927ad53029e3ed8a51febbbef36af3dc6e889999c4768d8b9c1616393 HEAD_REF master PATCHES Removeseekpos.patch ) -vcpkg_download_distfile(LICENSE - URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.70.0/LICENSE_1_0.txt" - FILENAME "boost_LICENSE_1_0.txt" - SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 -) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-iostreams RENAME copyright) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-iostreams requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-iostreams/vcpkg.json b/ports/boost-iostreams/vcpkg.json new file mode 100644 index 00000000000000..98d632ddbcf228 --- /dev/null +++ b/ports/boost-iostreams/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "boost-iostreams", + "version": "1.76.0", + "description": "Boost iostreams module", + "homepage": "https://github.com/boostorg/iostreams", + "supports": "!uwp", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + "boost-function", + "boost-integer", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-mpl", + "boost-numeric-conversion", + "boost-preprocessor", + "boost-range", + "boost-regex", + "boost-smart-ptr", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers", + "bzip2", + "liblzma", + "zlib", + "zstd" + ] +} diff --git a/ports/boost-iterator/CONTROL b/ports/boost-iterator/CONTROL deleted file mode 100644 index c13a8fdb9eb347..00000000000000 --- a/ports/boost-iterator/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-iterator -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-function-types, boost-fusion, boost-mpl, boost-optional, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/iterator -Description: Boost iterator module diff --git a/ports/boost-iterator/portfile.cmake b/ports/boost-iterator/portfile.cmake index bcf1b97d4eadb9..f55e4328eef63f 100644 --- a/ports/boost-iterator/portfile.cmake +++ b/ports/boost-iterator/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/iterator - REF boost-1.70.0 - SHA512 ef6b8ace53b73874efb80ba690bce03a13e86bb081282726de20a83efd5f2c58677f2c01f64a4733d81653e776074ef1a92ec67161aa5ba8ff0f3645b6df9fea + REF boost-1.76.0 + SHA512 0c890932dc16d87e350f3cfa0942aa92e9a590174d6f330259fe0b1eb2ead9ca3f1d0e0c2bb56e086e5eda9f2122e2eda2b67b52a4df8e614876a64ab014a300 HEAD_REF master ) diff --git a/ports/boost-iterator/vcpkg.json b/ports/boost-iterator/vcpkg.json new file mode 100644 index 00000000000000..df8348d3933b71 --- /dev/null +++ b/ports/boost-iterator/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "boost-iterator", + "version": "1.76.0", + "description": "Boost iterator module", + "homepage": "https://github.com/boostorg/iterator", + "dependencies": [ + "boost-assert", + "boost-concept-check", + "boost-config", + "boost-conversion", + "boost-core", + "boost-detail", + "boost-function-types", + "boost-fusion", + "boost-mpl", + "boost-optional", + "boost-smart-ptr", + "boost-static-assert", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-json/b2-options.cmake b/ports/boost-json/b2-options.cmake new file mode 100644 index 00000000000000..b05e7494f5392c --- /dev/null +++ b/ports/boost-json/b2-options.cmake @@ -0,0 +1,3 @@ +if(APPLE) + list(APPEND B2_OPTIONS cxxstd=11) +endif() \ No newline at end of file diff --git a/ports/boost-json/portfile.cmake b/ports/boost-json/portfile.cmake new file mode 100644 index 00000000000000..882daae7d4295a --- /dev/null +++ b/ports/boost-json/portfile.cmake @@ -0,0 +1,28 @@ +# Automatically generated by scripts/boost/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/json + REF boost-1.76.0 + SHA512 86807c1efafc582d41d6d46b0d83f95dcb4eebe071e8b6f25cb6c2706ee4c1f5be6dc70c5a28d76877390654889b3c02a77f655a132f715690f794be0336a00e + HEAD_REF master +) + +# see https://github.com/boostorg/json/issues/556 fore more details +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile" "import ../../config/checks/config" "import config/checks/config") +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile" "\n /boost//container/off" "") + +vcpkg_replace_string("${SOURCE_PATH}/Jamfile" "import ../config/checks/config" "import build/config/checks/config") +vcpkg_replace_string("${SOURCE_PATH}/Jamfile" "..//check_basic_alignas" "..//..//..//check_basic_alignas") + +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-json requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-json/vcpkg.json b/ports/boost-json/vcpkg.json new file mode 100644 index 00000000000000..e58aac4e250785 --- /dev/null +++ b/ports/boost-json/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "boost-json", + "version": "1.76.0", + "description": "Boost json module", + "homepage": "https://github.com/boostorg/json", + "dependencies": [ + "boost-align", + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-container", + "boost-exception", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-system", + "boost-throw-exception", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-lambda/CONTROL b/ports/boost-lambda/CONTROL deleted file mode 100644 index 645334323fed29..00000000000000 --- a/ports/boost-lambda/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-lambda -Version: 1.70.0 -Build-Depends: boost-bind, boost-config, boost-detail, boost-mpl, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/lambda -Description: Boost lambda module diff --git a/ports/boost-lambda/portfile.cmake b/ports/boost-lambda/portfile.cmake index d9ba5ff5b223d4..8a17fdb72f8b70 100644 --- a/ports/boost-lambda/portfile.cmake +++ b/ports/boost-lambda/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/lambda - REF boost-1.70.0 - SHA512 165b91102f0e344e4b3c58a6b1ead403613aaff9262d85fd8286640977aced9a9f1814e7cd8cd609769f6a15333aeb40b2aaa0705c2746e19b107283792a9e84 + REF boost-1.76.0 + SHA512 3cde15d39798398938a896b9bba624ff78ca3eb22ae04b3293f7f63fa5408bfac227ce191b0cee8753ca8f521e16b682b2d035125d75788815635586f122355a HEAD_REF master ) diff --git a/ports/boost-lambda/vcpkg.json b/ports/boost-lambda/vcpkg.json new file mode 100644 index 00000000000000..f8ae2329f4a342 --- /dev/null +++ b/ports/boost-lambda/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "boost-lambda", + "version": "1.76.0", + "description": "Boost lambda module", + "homepage": "https://github.com/boostorg/lambda", + "dependencies": [ + "boost-bind", + "boost-config", + "boost-core", + "boost-detail", + "boost-mpl", + "boost-preprocessor", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-leaf/portfile.cmake b/ports/boost-leaf/portfile.cmake new file mode 100644 index 00000000000000..7f158826071add --- /dev/null +++ b/ports/boost-leaf/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by scripts/boost/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/leaf + REF boost-1.76.0 + SHA512 3ab95ba1d75cb9137805e656d7331cbf9fa290400ee88dc4f2088d26983c6c948c4fc7f05615f3bf5b9533aab84b259ec2158a97b4447f619f907b5377571b55 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-leaf/vcpkg.json b/ports/boost-leaf/vcpkg.json new file mode 100644 index 00000000000000..72ee4ace096e2c --- /dev/null +++ b/ports/boost-leaf/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-leaf", + "version": "1.76.0", + "description": "Boost leaf module", + "homepage": "https://github.com/boostorg/leaf", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-lexical-cast/CONTROL b/ports/boost-lexical-cast/CONTROL deleted file mode 100644 index 9ca38af91aed31..00000000000000 --- a/ports/boost-lexical-cast/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-lexical-cast -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-detail, boost-integer, boost-numeric-conversion, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/lexical_cast -Description: Boost lexical_cast module diff --git a/ports/boost-lexical-cast/portfile.cmake b/ports/boost-lexical-cast/portfile.cmake index f203f29fd2e3d6..fae7b7fdbc06db 100644 --- a/ports/boost-lexical-cast/portfile.cmake +++ b/ports/boost-lexical-cast/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/lexical_cast - REF boost-1.70.0 - SHA512 20ff9790aa02177bb693a2c1bfd588725150a47cacb2d1048121982a6a2702e6dee30dcb3b4b3ae9c1dca269d144a08a085b0e229a9e2fbf0f7ae9b8ef25d31a + REF boost-1.76.0 + SHA512 80f3fe792e2f66fab4096c9d327091bce66f004b3355de0ee28c2c1ea438412fceae2a84799113f7e901393e86fa8dacddf6b6338d3e6265f528c636065dd06a HEAD_REF master ) diff --git a/ports/boost-lexical-cast/vcpkg.json b/ports/boost-lexical-cast/vcpkg.json new file mode 100644 index 00000000000000..5767a4253a41f7 --- /dev/null +++ b/ports/boost-lexical-cast/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "boost-lexical-cast", + "version": "1.76.0", + "description": "Boost lexical_cast module", + "homepage": "https://github.com/boostorg/lexical_cast", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-config", + "boost-container", + "boost-core", + "boost-detail", + "boost-integer", + "boost-numeric-conversion", + "boost-range", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-local-function/CONTROL b/ports/boost-local-function/CONTROL deleted file mode 100644 index b00904108d86b5..00000000000000 --- a/ports/boost-local-function/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-local-function -Version: 1.70.0 -Build-Depends: boost-config, boost-mpl, boost-preprocessor, boost-scope-exit, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/local_function -Description: Boost local_function module diff --git a/ports/boost-local-function/portfile.cmake b/ports/boost-local-function/portfile.cmake index d2b5048179c344..9b3f1bc7f11083 100644 --- a/ports/boost-local-function/portfile.cmake +++ b/ports/boost-local-function/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/local_function - REF boost-1.70.0 - SHA512 7debd9d083fedd8446e98565bcc2fcab5091ba931166030143abef2351918f8a46a83a004b28e5ab4b413101052036424ec82d7b99428bc0e07660722e2c50c4 + REF boost-1.76.0 + SHA512 e1637f892c70e0e7df67e1e9c28658787305b873198d9c1a60826d4bd581a0b866aa675339d7c85927bb74d74711d14eb8bbb47663ab69fa10945ca21a5ec220 HEAD_REF master ) diff --git a/ports/boost-local-function/vcpkg.json b/ports/boost-local-function/vcpkg.json new file mode 100644 index 00000000000000..74d77a16fbee09 --- /dev/null +++ b/ports/boost-local-function/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-local-function", + "version": "1.76.0", + "description": "Boost local_function module", + "homepage": "https://github.com/boostorg/local_function", + "dependencies": [ + "boost-config", + "boost-mpl", + "boost-preprocessor", + "boost-scope-exit", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-locale/0001-Fix-boost-ICU-support.patch b/ports/boost-locale/0001-Fix-boost-ICU-support.patch new file mode 100644 index 00000000000000..cd02f742e93bfc --- /dev/null +++ b/ports/boost-locale/0001-Fix-boost-ICU-support.patch @@ -0,0 +1,100 @@ +--- + libs/locale/build/Jamfile.v2 | 63 ++++++-------------------------------- + libs/locale/build/has_icu_test.cpp | 4 --- + libs/regex/build/Jamfile.v2 | 47 +++++++--------------------- + 3 files changed, 20 insertions(+), 94 deletions(-) + +diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2 +index 578e722..5f25917 100644 +--- a/build/Jamfile.v2 ++++ b/build/Jamfile.v2 +@@ -70,62 +70,17 @@ if $(ICU_LINK) + } + else + { +- searched-lib icuuc : : icuuc +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : msvc +- debug +- icuucd +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : this_is_an_invalid_library_name ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudata +- shared +- shared ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudt +- msvc +- shared +- shared ; +- +- searched-lib icudt : : this_is_an_invalid_library_name ; +- +- searched-lib icuin : : $(ICU_PATH)/lib +- icui18n +- shared +- shared ; +- +- searched-lib icuin : : msvc +- debug +- icuind +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : msvc +- release +- icuin +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : this_is_an_invalid_library_name ; +- +- explicit icuuc icudt icuin ; ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = $(ICU_PATH)/include +- icuuc/shared/shared +- icudt/shared/shared +- icuin/shared/shared +- $(ICU_PATH)/bin +- shared ; ++ icuuc ++ icuin ++ icudt ++ $(ICU_PATH)/bin ; + + + +diff --git a/libs/locale/build/has_icu_test.cpp b/libs/locale/build/has_icu_test.cpp +index 9419b30..ed9be05 100644 +--- a/build/has_icu_test.cpp ++++ b/build/has_icu_test.cpp +@@ -15,10 +15,6 @@ + #include + #include + +-#if defined(_MSC_VER) && !defined(_DLL) +-#error "Mixing ICU with a static runtime doesn't work" +-#endif +- + int main() + { + icu::Locale loc; +-- +2.12.2.windows.2 + diff --git a/ports/boost-locale/CONTROL b/ports/boost-locale/CONTROL deleted file mode 100644 index d2b5a4e5a9c8c9..00000000000000 --- a/ports/boost-locale/CONTROL +++ /dev/null @@ -1,10 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-locale -Version: 1.70.0-2 -Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-system, boost-thread, boost-type-traits, boost-unordered, boost-vcpkg-helpers, libiconv (!uwp&!windows) -Homepage: https://github.com/boostorg/locale -Description: Boost locale module - -Feature: icu -Description: ICU backend for Boost.Locale -Build-Depends: icu diff --git a/ports/boost-locale/allow-force-finding-iconv.patch b/ports/boost-locale/allow-force-finding-iconv.patch new file mode 100644 index 00000000000000..134cb81a13ea8c --- /dev/null +++ b/ports/boost-locale/allow-force-finding-iconv.patch @@ -0,0 +1,24 @@ +diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2 +index 88a8cb1..e6a6b7f 100644 +--- a/build/Jamfile.v2 ++++ b/build/Jamfile.v2 +@@ -17,6 +17,7 @@ import feature ; + # Features + + feature.feature boost.locale.iconv : on off : optional propagated ; ++feature.feature boost.locale.force-found-iconv : on off : optional propagated ; + feature.feature boost.locale.icu : on off : optional propagated ; + feature.feature boost.locale.posix : on off : optional propagated ; + feature.feature boost.locale.std : on off : optional propagated ; +@@ -164,6 +164,11 @@ local flags-result ; + + local found-iconv ; + ++ if on in $(properties) ++ { ++ found-iconv = true ; ++ } ++ + if on in $(properties) + || ! in $(properties:G) + && ! solaris in $(properties) diff --git a/ports/boost-locale/b2-options.cmake.in b/ports/boost-locale/b2-options.cmake.in new file mode 100644 index 00000000000000..865a0b1437861a --- /dev/null +++ b/ports/boost-locale/b2-options.cmake.in @@ -0,0 +1,43 @@ +set(_B2_OPTIONS_FEATURES "@FEATURES@") +if("icu" IN_LIST _B2_OPTIONS_FEATURES) + set(BOOST_LOCALE_ICU_FEATURE on) +else() + set(BOOST_LOCALE_ICU_FEATURE off) +endif() + +if(@VCPKG_TARGET_IS_WINDOWS@) + list(APPEND B2_OPTIONS + boost.locale.iconv=off + boost.locale.posix=off + /boost/locale//boost_locale + boost.locale.icu=${BOOST_LOCALE_ICU_FEATURE} + ) +elseif(@VCPKG_TARGET_IS_ANDROID@) + find_library(LIBICONV_LIBRARY iconv) + get_filename_component(LIBICONV_DIR "${LIBICONV_LIBRARY}" DIRECTORY) + get_filename_component(LIBICONV_DIR "${LIBICONV_DIR}" DIRECTORY) + + list(APPEND B2_OPTIONS + boost.locale.iconv=on + boost.locale.posix=off + /boost/locale//boost_locale + boost.locale.icu=${BOOST_LOCALE_ICU_FEATURE} + -sICONV_PATH=${LIBICONV_DIR} + ) +else() + find_library(LIBICONV_LIBRARY iconv) + get_filename_component(LIBICONV_DIR "${LIBICONV_LIBRARY}" DIRECTORY) + + list(APPEND B2_OPTIONS + boost.locale.iconv=on + boost.locale.posix=on + /boost/locale//boost_locale + boost.locale.icu=${BOOST_LOCALE_ICU_FEATURE} + -sICONV_PATH=${LIBICONV_DIR} + ) + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32") + list(APPEND B2_OPTIONS + boost.locale.force-found-iconv=on + ) + endif() +endif() diff --git a/ports/boost-locale/cmake-fragment.cmake b/ports/boost-locale/cmake-fragment.cmake deleted file mode 100644 index 11d3ed70ed7420..00000000000000 --- a/ports/boost-locale/cmake-fragment.cmake +++ /dev/null @@ -1,10 +0,0 @@ -find_library(LIBICONV_LIBRARY iconv) -get_filename_component(LIBICONV_DIR "${LIBICONV_LIBRARY}" DIRECTORY) - -list(APPEND B2_OPTIONS - boost.locale.iconv=on - boost.locale.posix=on - /boost/locale//boost_locale - boost.locale.icu=off - -sICONV_PATH=${LIBICONV_LIBRARY} -) diff --git a/ports/boost-locale/portfile.cmake b/ports/boost-locale/portfile.cmake index 8643ce7efcafde..981ce574329fe8 100644 --- a/ports/boost-locale/portfile.cmake +++ b/ports/boost-locale/portfile.cmake @@ -1,30 +1,28 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/locale - REF boost-1.70.0 - SHA512 38ae2619d6b63239930e04f986a2bc06bd3c5ab6e13d7825c2b6eb29eb9eb2f52d74546774b9eb0ba3a4e68a4d404908386794282c2f467e8b01baea8f24fb42 + REF boost-1.76.0 + SHA512 509de7eb111cb408d1e4f766ab60388a4ecf593cb644ab22572765d0e0c6197937d6da886627d341e3665bdaa697f2c8cc4adef2f298858f16d72ae1029e5dac HEAD_REF master + PATCHES + 0001-Fix-boost-ICU-support.patch + allow-force-finding-iconv.patch ) -if("icu" IN_LIST FEATURES) - set(BOOST_LOCALE_ICU on) -else() - set(BOOST_LOCALE_ICU off) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-locale requires a newer version of vcpkg in order to build.") endif() - -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +configure_file( + "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake.in" + "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake" + @ONLY +) boost_modular_build( SOURCE_PATH ${SOURCE_PATH} - BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/cmake-fragment.cmake" - OPTIONS - boost.locale.iconv=off - boost.locale.posix=off - /boost/locale//boost_locale - boost.locale.icu=${BOOST_LOCALE_ICU} + BOOST_CMAKE_FRAGMENT "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake" ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-locale/vcpkg.json b/ports/boost-locale/vcpkg.json new file mode 100644 index 00000000000000..014a13569aacf6 --- /dev/null +++ b/ports/boost-locale/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "boost-locale", + "version": "1.76.0", + "description": "Boost locale module", + "homepage": "https://github.com/boostorg/locale", + "supports": "!uwp", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-function", + "boost-iterator", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-smart-ptr", + "boost-static-assert", + "boost-system", + "boost-thread", + "boost-type-traits", + "boost-unordered", + "boost-vcpkg-helpers", + { + "name": "libiconv", + "platform": "!uwp & !windows & !mingw" + } + ], + "features": { + "icu": { + "description": "ICU backend for Boost.Locale", + "dependencies": [ + "icu" + ] + } + } +} diff --git a/ports/boost-lockfree/CONTROL b/ports/boost-lockfree/CONTROL deleted file mode 100644 index c7346cf6d06535..00000000000000 --- a/ports/boost-lockfree/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-lockfree -Version: 1.70.0 -Build-Depends: boost-align, boost-array, boost-assert, boost-atomic, boost-config, boost-core, boost-integer, boost-mpl, boost-parameter, boost-predef, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/lockfree -Description: Boost lockfree module diff --git a/ports/boost-lockfree/portfile.cmake b/ports/boost-lockfree/portfile.cmake index 99330838fd6c9f..8156322ee345ec 100644 --- a/ports/boost-lockfree/portfile.cmake +++ b/ports/boost-lockfree/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/lockfree - REF boost-1.70.0 - SHA512 565539cffb0b688b02cb86b750fb9854e0d0f7a34c5dca859d5965ccee8512c5e6db493e8f7bcdf3c58b3ec2730852ad79089e7717183f358b07c0c743186c5f + REF boost-1.76.0 + SHA512 eb4f387306e843ed4fa16e4a8709d6ef8a54280f42dd453347ad9485d301835541bf256edcf237aefc7da94029b044ad3b8bc429b5afdeeebda75fa9bf8df2bd HEAD_REF master ) diff --git a/ports/boost-lockfree/vcpkg.json b/ports/boost-lockfree/vcpkg.json new file mode 100644 index 00000000000000..f889222381526a --- /dev/null +++ b/ports/boost-lockfree/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "boost-lockfree", + "version": "1.76.0", + "description": "Boost lockfree module", + "homepage": "https://github.com/boostorg/lockfree", + "dependencies": [ + "boost-align", + "boost-array", + "boost-assert", + "boost-atomic", + "boost-config", + "boost-core", + "boost-integer", + "boost-mpl", + "boost-parameter", + "boost-predef", + "boost-static-assert", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-log/CONTROL b/ports/boost-log/CONTROL deleted file mode 100644 index bb1ce39549340d..00000000000000 --- a/ports/boost-log/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-log -Version: 1.70.0 -Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (!uwp), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (!arm), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive -Homepage: https://github.com/boostorg/log -Description: Boost log module diff --git a/ports/boost-log/portfile.cmake b/ports/boost-log/portfile.cmake index 968508e9e3122c..9b16049e95f5e8 100644 --- a/ports/boost-log/portfile.cmake +++ b/ports/boost-log/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/log - REF boost-1.70.0 - SHA512 6f1b2a7692ece60abf94cdc340cc2b5b2a6c4ebeb80c4092b7846a7670e19db174f7c0df02640469e07e916b5d37448c73c73bcb14bb1632c26204a0a1274e1a + REF boost-1.76.0 + SHA512 9d29404852d9e79241bd745757960563e11c854887d2aa2fad5a0306f7c327351a70f526ebb8e9c603c79c6979678ca220071e6a62e0148a2bd51f30af952f07 HEAD_REF master ) @@ -16,14 +14,17 @@ string(REPLACE " @select-arch-specific-sources" "#@sel file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") -file(READ ${SOURCE_PATH}/build/log-architecture.jam _contents) +file(READ ${SOURCE_PATH}/build/log-arch-config.jam _contents) string(REPLACE - "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" - "\nproject.load [ path.join [ path.make $(here:D) ] config/checks/architecture ] ;" + "project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ]" + "project.load [ path.join [ path.make $(here:D) ] config/checks/architecture ]" _contents "${_contents}") -file(WRITE ${SOURCE_PATH}/build/log-architecture.jam "${_contents}") +file(WRITE ${SOURCE_PATH}/build/log-arch-config.jam "${_contents}") -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-log requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-log/vcpkg.json b/ports/boost-log/vcpkg.json new file mode 100644 index 00000000000000..1b700bb911ca7d --- /dev/null +++ b/ports/boost-log/vcpkg.json @@ -0,0 +1,72 @@ +{ + "name": "boost-log", + "version": "1.76.0", + "description": "Boost log module", + "homepage": "https://github.com/boostorg/log", + "supports": "!uwp & !emscripten", + "dependencies": [ + "boost-align", + "boost-array", + { + "name": "boost-asio", + "platform": "!emscripten" + }, + "boost-assert", + "boost-atomic", + "boost-bind", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-container", + "boost-core", + "boost-date-time", + "boost-detail", + "boost-exception", + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + "boost-function-types", + "boost-fusion", + "boost-interprocess", + "boost-intrusive", + "boost-io", + "boost-iterator", + "boost-lexical-cast", + { + "name": "boost-locale", + "platform": "!uwp" + }, + "boost-math", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-move", + "boost-mpl", + "boost-optional", + "boost-parameter", + "boost-phoenix", + "boost-predef", + "boost-preprocessor", + "boost-property-tree", + "boost-proto", + "boost-random", + "boost-range", + "boost-regex", + "boost-smart-ptr", + "boost-spirit", + "boost-static-assert", + "boost-system", + "boost-thread", + "boost-throw-exception", + "boost-type-index", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers", + "boost-winapi", + "boost-xpressive" + ] +} diff --git a/ports/boost-logic/CONTROL b/ports/boost-logic/CONTROL deleted file mode 100644 index 7d6f02fbbffd0b..00000000000000 --- a/ports/boost-logic/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-logic -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/logic -Description: Boost logic module diff --git a/ports/boost-logic/portfile.cmake b/ports/boost-logic/portfile.cmake index 41fb1432b5fcab..2d2c461bc2772d 100644 --- a/ports/boost-logic/portfile.cmake +++ b/ports/boost-logic/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/logic - REF boost-1.70.0 - SHA512 6cf4e2fa0c63de2c226a2f57ed57d07ab73cc359ebf23711b636badb9a6924992ea9edc0f9bfeefd15531ca2d06bdb3667b49bcc2f9deec64af6eafd52e944d5 + REF boost-1.76.0 + SHA512 6795e97a02f1b02c115951a075338fb62bf7458e30bd297071940d5a68990f0860736b29a18adbcf6bd3ca8c1af4042ddf64054c2ba873e54da3cbd587c098c4 HEAD_REF master ) diff --git a/ports/boost-logic/vcpkg.json b/ports/boost-logic/vcpkg.json new file mode 100644 index 00000000000000..440963f50e1880 --- /dev/null +++ b/ports/boost-logic/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "boost-logic", + "version": "1.76.0", + "description": "Boost logic module", + "homepage": "https://github.com/boostorg/logic", + "dependencies": [ + "boost-config", + "boost-core", + "boost-detail", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-math/CONTROL b/ports/boost-math/CONTROL deleted file mode 100644 index a1ddd7c94da289..00000000000000 --- a/ports/boost-math/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-math -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-modular-build-helper, boost-mpl, boost-multiprecision, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/math -Description: Boost math module diff --git a/ports/boost-math/b2-options.cmake b/ports/boost-math/b2-options.cmake new file mode 100644 index 00000000000000..57388346841878 --- /dev/null +++ b/ports/boost-math/b2-options.cmake @@ -0,0 +1,3 @@ +if(APPLE) + list(APPEND B2_OPTIONS cxxstd=11) +endif() diff --git a/ports/boost-math/portfile.cmake b/ports/boost-math/portfile.cmake index 8938bfe9f6bf7a..9fbcba6a6d41ab 100644 --- a/ports/boost-math/portfile.cmake +++ b/ports/boost-math/portfile.cmake @@ -1,16 +1,26 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/math - REF boost-1.70.0 - SHA512 5573dc445196383ddb622514b5ea645076e1b2b94165d885c7c8924fc5d469d5f1c030817b36d9e7be78b47785a69bbcdac2da8f88817f1cd33ff47ded33dc70 + REF boost-1.76.0 + SHA512 50967b962ac4b3cfc799733e5cbbcc15215c27135368a739d2441a70aa6e4a7ccfb617bf3ccd571201568d8bacb209d2a98acbe0593cde7714c7da9faa09ee17 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) -boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile.v2" "import ../../config/checks/config" "import config/checks/config") +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile.v2" "check-target-builds ../config//has_gcc_visibility" "check-target-builds ../has_gcc_visibility.cpp") + +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") +file(COPY "${SOURCE_PATH}/config/has_gcc_visibility.cpp" DESTINATION "${SOURCE_PATH}/build/config") +file(COPY "${SOURCE_PATH}/config/has_gcc_visibility.cpp" DESTINATION "${SOURCE_PATH}/") +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-math requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-math/vcpkg.json b/ports/boost-math/vcpkg.json new file mode 100644 index 00000000000000..044d88f7a53380 --- /dev/null +++ b/ports/boost-math/vcpkg.json @@ -0,0 +1,35 @@ +{ + "name": "boost-math", + "version": "1.76.0", + "description": "Boost math module", + "homepage": "https://github.com/boostorg/math", + "dependencies": [ + "boost-algorithm", + "boost-array", + "boost-assert", + "boost-atomic", + { + "name": "boost-build", + "host": true + }, + "boost-concept-check", + "boost-config", + "boost-core", + "boost-detail", + "boost-integer", + "boost-lambda", + "boost-lexical-cast", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-predef", + "boost-range", + "boost-smart-ptr", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-metaparse/CONTROL b/ports/boost-metaparse/CONTROL deleted file mode 100644 index d5fd144287ced1..00000000000000 --- a/ports/boost-metaparse/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-metaparse -Version: 1.70.0 -Build-Depends: boost-config, boost-mpl, boost-predef, boost-preprocessor, boost-static-assert, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/metaparse -Description: Boost metaparse module diff --git a/ports/boost-metaparse/portfile.cmake b/ports/boost-metaparse/portfile.cmake index 13274cddead8ea..4056d81fe901b0 100644 --- a/ports/boost-metaparse/portfile.cmake +++ b/ports/boost-metaparse/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/metaparse - REF boost-1.70.0 - SHA512 dd8883843be1a6e3dc8368b13081fc3451de0ed85985cf752858d80aa62e0846b4687c16a6aa1b6dc1e5e30d0603168c48197f70f031cf21586ba729352f0f09 + REF boost-1.76.0 + SHA512 27a9cc14b97f815960682da087137e656479069a0a5d57b26f9fbd43467217ba34b0d2f2336318e2394190c5d34d95d4fa71c6b3a2f95ccdae5a6010299e5783 HEAD_REF master ) diff --git a/ports/boost-metaparse/vcpkg.json b/ports/boost-metaparse/vcpkg.json new file mode 100644 index 00000000000000..f91cd2f8c01599 --- /dev/null +++ b/ports/boost-metaparse/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "boost-metaparse", + "version": "1.76.0", + "description": "Boost metaparse module", + "homepage": "https://github.com/boostorg/metaparse", + "dependencies": [ + "boost-config", + "boost-mpl", + "boost-predef", + "boost-preprocessor", + "boost-static-assert", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt index cd5f46115f41a3..b38b0e3137fdef 100644 --- a/ports/boost-modular-build-helper/CMakeLists.txt +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -10,6 +10,7 @@ set(VCPKG_PLATFORM_TOOLSET external) set(B2_OPTIONS) if(DEFINED BOOST_CMAKE_FRAGMENT) + message(STATUS "Including ${BOOST_CMAKE_FRAGMENT}") include(${BOOST_CMAKE_FRAGMENT}) endif() @@ -34,10 +35,34 @@ else() list(APPEND B2_OPTIONS address-model=32) endif() +if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "s390x") + list(APPEND B2_OPTIONS architecture=s390x) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + list(APPEND B2_OPTIONS architecture=arm) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "ppc64le") + list(APPEND B2_OPTIONS architecture=power) +else() + list(APPEND B2_OPTIONS architecture=x86) +endif() + if(APPLE) - list(APPEND B2_OPTIONS target-os=darwin toolset=clang) + set(B2_TOOLSET clang) + list(APPEND B2_OPTIONS target-os=darwin) +elseif(WIN32) + set(B2_TOOLSET gcc) + list(APPEND B2_OPTIONS target-os=windows) +elseif(ANDROID) + set(B2_TOOLSET gcc) + list(APPEND B2_OPTIONS target-os=android) +else() + set(B2_TOOLSET gcc) + list(APPEND B2_OPTIONS target-os=linux) +endif() + +if(WIN32) + list(APPEND B2_OPTIONS threadapi=win32) else() - list(APPEND B2_OPTIONS target-os=linux toolset=gcc) + list(APPEND B2_OPTIONS threadapi=pthread) endif() # Properly handle compiler and linker flags passed by VCPKG @@ -59,6 +84,28 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") endif() endif() +if(APPLE) + if(CMAKE_OSX_DEPLOYMENT_TARGET) + set(CXXFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} ${CXXFLAGS}") + set(CFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} ${CFLAGS}") + set(LDFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} ${LDFLAGS}") + endif() + + if(CMAKE_OSX_SYSROOT) + set(CXXFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} ${CXXFLAGS}") + set(CFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} ${CFLAGS}") + set(LDFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} ${LDFLAGS}") + endif() + + # if specific architectures are set, configure them, + # if not set, this will still default to current arch + foreach(ARCH IN LISTS CMAKE_OSX_ARCHITECTURES) + set(CXXFLAGS "-arch ${ARCH} ${CXXFLAGS}") + set(CFLAGS "-arch ${ARCH} ${CFLAGS}") + set(LDFLAGS "-arch ${ARCH} ${LDFLAGS}") + endforeach() +endif() + string(STRIP "${CXXFLAGS}" CXXFLAGS) string(STRIP "${CFLAGS}" CFLAGS) string(STRIP "${LDFLAGS}" LDFLAGS) @@ -69,26 +116,40 @@ endif() if(NOT CFLAGS STREQUAL "") string(REPLACE " " " " CFLAGS "${CFLAGS}") endif() -if(NOT LDLAGS STREQUAL "") +if(NOT LDFLAGS STREQUAL "") string(REPLACE " " " " LDFLAGS "${LDFLAGS}") endif() #set(CXXFLAGS "${CXXFLAGS} -Wno-error=unused-command-line-argument") -if(CMAKE_CXX_COMPILER_TARGET) - set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET} ${CMAKE_CXX_COMPILER_TARGET}") +if(CMAKE_CXX_COMPILER_TARGET AND CMAKE_CXX_COMPILE_OPTIONS_TARGET) + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}") + set(LDFLAGS "${LDFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}") + else() + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET} ${CMAKE_CXX_COMPILER_TARGET}") + set(LDFLAGS "${LDFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET} ${CMAKE_CXX_COMPILER_TARGET}") + endif() endif() if(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN) - set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") + set(LDFLAGS "${LDFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") + else() + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") + set(LDFLAGS "${LDFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") + endif() endif() if(CMAKE_SYSROOT AND CMAKE_CXX_COMPILE_OPTIONS_SYSROOT) set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") + set(LDFLAGS "${LDFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") endif() foreach(INCDIR ${CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES}) set(CXXFLAGS "${CXXFLAGS} ${CMAKE_INCLUDE_FLAG_C}${CMAKE_INCLUDE_FLAG_C_SEP}${INCDIR}") endforeach() if(APPLE) - set(CXXFLAGS "${CXXFLAGS} -D_DARWIN_C_SOURCE") + set(CXXFLAGS "${CXXFLAGS} -D_DARWIN_C_SOURCE -std=c++11 -stdlib=libc++") + set(LDFLAGS "${LDFLAGS} -stdlib=libc++") endif() find_library(ZLIB_LIBPATH z) @@ -114,23 +175,15 @@ endif() configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY) -set(NUMBER_OF_PROCESSORS 1) -if(DEFINED ENV{NUMBER_OF_PROCESSORS}) - set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS}) -elseif(CMAKE_HOST_LINUX) - execute_process( - COMMAND nproc - OUTPUT_VARIABLE NUMBER_OF_PROCESSORS - ) - string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") - string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") -endif() +include(ProcessorCount) +ProcessorCount(NUMBER_OF_PROCESSORS) if(NOT NUMBER_OF_PROCESSORS) set(NUMBER_OF_PROCESSORS 1) endif() add_custom_target(boost ALL COMMAND "${B2_EXE}" + toolset=${B2_TOOLSET} --user-config=${CMAKE_CURRENT_BINARY_DIR}/user-config.jam --stagedir=${CMAKE_CURRENT_BINARY_DIR}/stage --build-dir=${CMAKE_CURRENT_BINARY_DIR} @@ -154,9 +207,7 @@ add_custom_target(boost ALL --hash -q - architecture=x86 threading=multi - threadapi=pthread debug-symbols=on stage diff --git a/ports/boost-modular-build-helper/CONTROL b/ports/boost-modular-build-helper/CONTROL deleted file mode 100644 index c72ccb30756569..00000000000000 --- a/ports/boost-modular-build-helper/CONTROL +++ /dev/null @@ -1,2 +0,0 @@ -Source: boost-modular-build-helper -Version: 1.70.0-2 diff --git a/ports/boost-modular-build-helper/Jamroot.jam b/ports/boost-modular-build-helper/Jamroot.jam index 7721973a930001..7917408c36d7a5 100644 --- a/ports/boost-modular-build-helper/Jamroot.jam +++ b/ports/boost-modular-build-helper/Jamroot.jam @@ -1,5 +1,5 @@ -constant BOOST_VERSION : 1.70.0 ; -constant BOOST_VERSION_ABI_TAG : 1_70 ; +constant BOOST_VERSION : 1.76.0 ; +constant BOOST_VERSION_ABI_TAG : 1_76 ; constant BOOST_JAMROOT_MODULE : $(__name__) ; import boostcpp ; @@ -11,7 +11,7 @@ project boost : requirements include&&"@CURRENT_INSTALLED_DIR@/include" BOOST_ALL_NO_LIB=1 @$(__name__).tag - @REQUIREMENTS@ + @B2_REQUIREMENTS@ ; rule boost-install ( libraries * ) @@ -29,15 +29,14 @@ rule tag ( name : type ? : property-set ) rule python-tag ( name : type ? : property-set ) { - return [ tag $(name) : $(type) : $(property-set) ] ; + return [ boostcpp.python-tag $(name) : $(type) : $(property-set) ] ; } if "@PORT@" != "boost-system" { use-project /boost/system : . ; - lib boost_system : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_RELEASE_SUFFIX@" release ; - lib boost_system : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_DEBUG_SUFFIX@" debug ; + lib boost_system : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_SUFFIX@" @VARIANT@ ; explicit boost_system ; use-project /boost : . ; @@ -48,8 +47,7 @@ if "@PORT@" != "boost-chrono" { use-project /boost/chrono : . ; - lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_chrono@BOOST_LIB_RELEASE_SUFFIX@" release ; - lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_chrono@BOOST_LIB_DEBUG_SUFFIX@" debug ; + lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_chrono@BOOST_LIB_SUFFIX@" @VARIANT@ ; explicit boost_chrono ; } @@ -57,8 +55,7 @@ if "@PORT@" != "boost-regex" { use-project /boost/regex : . ; - lib boost_regex : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_regex@BOOST_LIB_RELEASE_SUFFIX@" release ; - lib boost_regex : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_regex@BOOST_LIB_DEBUG_SUFFIX@" debug ; + lib boost_regex : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_regex@BOOST_LIB_SUFFIX@" @VARIANT@ ; explicit boost_regex ; } @@ -66,8 +63,7 @@ if "@PORT@" != "boost-date-time" { use-project /boost/date_time : . ; - lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_date_time@BOOST_LIB_RELEASE_SUFFIX@" release -/boost/date_time//boost_date_time ; - lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_date_time@BOOST_LIB_DEBUG_SUFFIX@" debug -/boost/date_time//boost_date_time ; + lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_date_time@BOOST_LIB_SUFFIX@" @VARIANT@ -/boost/date_time//boost_date_time ; explicit boost_date_time ; } @@ -75,8 +71,7 @@ if "@PORT@" != "boost-thread" { use-project /boost/thread : . ; - lib boost_thread : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_thread@BOOST_LIB_RELEASE_SUFFIX@" release : : /boost/date_time//boost_date_time ; - lib boost_thread : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_thread@BOOST_LIB_DEBUG_SUFFIX@" debug : : /boost/date_time//boost_date_time ; + lib boost_thread : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_thread@BOOST_LIB_SUFFIX@" @VARIANT@ : : /boost/date_time//boost_date_time ; explicit boost_thread ; } @@ -84,8 +79,7 @@ if "@PORT@" != "boost-timer" { use-project /boost/timer : . ; - lib boost_timer : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_timer@BOOST_LIB_RELEASE_SUFFIX@" release ; - lib boost_timer : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_timer@BOOST_LIB_DEBUG_SUFFIX@" debug ; + lib boost_timer : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_timer@BOOST_LIB_SUFFIX@" @VARIANT@ ; explicit boost_timer ; } @@ -93,8 +87,7 @@ if "@PORT@" != "boost-filesystem" { use-project /boost/filesystem : . ; - lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_filesystem@BOOST_LIB_RELEASE_SUFFIX@" release : : /boost/system//boost_system ; - lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_filesystem@BOOST_LIB_DEBUG_SUFFIX@" debug : : /boost/system//boost_system ; + lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_filesystem@BOOST_LIB_SUFFIX@" @VARIANT@ : : /boost/system//boost_system ; explicit boost_filesystem ; } @@ -102,8 +95,7 @@ if "@PORT@" != "boost-atomic" { use-project /boost/atomic : . ; - lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_RELEASE_SUFFIX@" release ; - lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_DEBUG_SUFFIX@" debug ; + lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_SUFFIX@" @VARIANT@ ; explicit boost_atomic ; } @@ -114,8 +106,7 @@ if "@PORT@" != "boost-context" use-project /boost/context : . ; - lib boost_context : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_context@BOOST_LIB_RELEASE_SUFFIX@" release ; - lib boost_context : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_context@BOOST_LIB_DEBUG_SUFFIX@" debug ; + lib boost_context : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_context@BOOST_LIB_SUFFIX@" @VARIANT@ ; explicit boost_context ; } @@ -123,8 +114,7 @@ if "@PORT@" != "boost-test" { use-project /boost/test : . ; - lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_unit_test_framework@BOOST_LIB_RELEASE_SUFFIX@" release ; - lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_unit_test_framework@BOOST_LIB_DEBUG_SUFFIX@" debug ; + lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_unit_test_framework@BOOST_LIB_SUFFIX@" @VARIANT@ ; explicit boost_unit_test_framework ; } @@ -132,8 +122,7 @@ if "@PORT@" != "boost-serialization" { use-project /boost/serialization : . ; - lib boost_serialization : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_RELEASE_SUFFIX@" release ; - lib boost_serialization : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_DEBUG_SUFFIX@" debug ; + lib boost_serialization : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_SUFFIX@" @VARIANT@ ; explicit boost_serialization ; } diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index 93e4b457fc6adf..f8a35a207af4f5 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -1,23 +1,26 @@ +get_filename_component(BOOST_BUILD_INSTALLED_DIR "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY) +get_filename_component(BOOST_BUILD_INSTALLED_DIR "${BOOST_BUILD_INSTALLED_DIR}" DIRECTORY) + function(boost_modular_build) - cmake_parse_arguments(_bm "" "SOURCE_PATH;REQUIREMENTS;BOOST_CMAKE_FRAGMENT" "OPTIONS" ${ARGN}) + cmake_parse_arguments(_bm "" "SOURCE_PATH;BOOST_CMAKE_FRAGMENT" "" ${ARGN}) if(NOT DEFINED _bm_SOURCE_PATH) message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.") endif() - # Todo: this serves too similar a purpose as vcpkg_find_acquire_program() - if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) - elseif(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) - else() - set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build") - endif() + # Next CMake variables may be overridden in the file specified in ${_bm_BOOST_CMAKE_FRAGMENT} + set(B2_OPTIONS) + set(B2_OPTIONS_DBG) + set(B2_OPTIONS_REL) + set(B2_REQUIREMENTS) # this variable is used in the Jamroot.jam - if(NOT EXISTS "${BOOST_BUILD_PATH}") - message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.") + if(DEFINED _bm_BOOST_CMAKE_FRAGMENT) + message(STATUS "Including ${_bm_BOOST_CMAKE_FRAGMENT}") + include(${_bm_BOOST_CMAKE_FRAGMENT}) endif() + set(BOOST_BUILD_PATH "${BOOST_BUILD_INSTALLED_DIR}/tools/boost-build") + if(EXISTS "${BOOST_BUILD_PATH}/b2.exe") set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe") elseif(EXISTS "${BOOST_BUILD_PATH}/b2") @@ -27,17 +30,20 @@ function(boost_modular_build) endif() if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - list(APPEND _bm_OPTIONS windows-api=store) + list(APPEND B2_OPTIONS windows-api=store) endif() - set(_bm_DIR ${CURRENT_INSTALLED_DIR}/share/boost-build) - - set(REQUIREMENTS ${_bm_REQUIREMENTS}) + set(_bm_DIR ${BOOST_BUILD_INSTALLED_DIR}/share/boost-build) if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(BOOST_LIB_PREFIX) - set(BOOST_LIB_RELEASE_SUFFIX -vc140-mt.lib) - set(BOOST_LIB_DEBUG_SUFFIX -vc140-mt-gd.lib) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v14.") + set(BOOST_LIB_RELEASE_SUFFIX -vc140-mt.lib) + set(BOOST_LIB_DEBUG_SUFFIX -vc140-mt-gd.lib) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(BOOST_LIB_RELEASE_SUFFIX -vc120-mt.lib) + set(BOOST_LIB_DEBUG_SUFFIX -vc120-mt-gd.lib) + endif() else() set(BOOST_LIB_PREFIX lib) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -46,6 +52,9 @@ function(boost_modular_build) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(BOOST_LIB_RELEASE_SUFFIX .dylib) set(BOOST_LIB_DEBUG_SUFFIX .dylib) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + set(BOOST_LIB_RELEASE_SUFFIX .dll.a) + set(BOOST_LIB_DEBUG_SUFFIX .dll.a) else() set(BOOST_LIB_RELEASE_SUFFIX .so) set(BOOST_LIB_DEBUG_SUFFIX .so) @@ -54,8 +63,6 @@ function(boost_modular_build) if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2") file(READ ${_bm_SOURCE_PATH}/build/Jamfile.v2 _contents) - #string(REPLACE "import ../../predef/check/predef" "import predef/check/predef" _contents "${_contents}") - #string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") string(REGEX REPLACE "\.\./\.\./([^/ ]+)/build//(boost_[^/ ]+)" "/boost/\\1//\\2" @@ -66,32 +73,57 @@ function(boost_modular_build) file(WRITE ${_bm_SOURCE_PATH}/build/Jamfile.v2 "${_contents}") endif() - configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) - # if(EXISTS "${CURRENT_INSTALLED_DIR}/share/boost-config/checks") - # file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${_bm_SOURCE_PATH}/build/config") - # endif() - # if(EXISTS "${CURRENT_INSTALLED_DIR}/share/boost-predef/check") - # file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-predef/check" DESTINATION "${_bm_SOURCE_PATH}/build/predef") - # endif() + function(unix_build BOOST_LIB_SUFFIX BUILD_TYPE BUILD_LIB_PATH) + message(STATUS "Building ${BUILD_TYPE}...") + set(BOOST_LIB_SUFFIX ${BOOST_LIB_SUFFIX}) + set(VARIANT ${BUILD_TYPE}) + set(BUILD_LIB_PATH ${BUILD_LIB_PATH}) + configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) - if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(configure_option) if(DEFINED _bm_BOOST_CMAKE_FRAGMENT) - set(fragment_option "-DBOOST_CMAKE_FRAGMENT=${_bm_BOOST_CMAKE_FRAGMENT}") + list(APPEND configure_option "-DBOOST_CMAKE_FRAGMENT=${_bm_BOOST_CMAKE_FRAGMENT}") endif() + vcpkg_configure_cmake( - SOURCE_PATH ${CURRENT_INSTALLED_DIR}/share/boost-build + SOURCE_PATH ${BOOST_BUILD_INSTALLED_DIR}/share/boost-build PREFER_NINJA OPTIONS + "-DPORT=${PORT}" + "-DFEATURES=${FEATURES}" + "-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}" "-DB2_EXE=${B2_EXE}" "-DSOURCE_PATH=${_bm_SOURCE_PATH}" "-DBOOST_BUILD_PATH=${BOOST_BUILD_PATH}" - ${fragment_option} + ${configure_option} ) vcpkg_install_cmake() + endfunction() + + if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(build_flag 0) + if(NOT DEFINED VCPKG_BUILD_TYPE) + set(build_flag 1) + set(VCPKG_BUILD_TYPE "release") + endif() + + if(VCPKG_BUILD_TYPE STREQUAL "release") + unix_build(${BOOST_LIB_RELEASE_SUFFIX} "release" "lib/") + endif() + + if(build_flag) + set(VCPKG_BUILD_TYPE "debug") + endif() + + if(VCPKG_BUILD_TYPE STREQUAL "debug") + unix_build(${BOOST_LIB_DEBUG_SUFFIX} "debug" "debug/lib/") + endif() if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/lib) message(FATAL_ERROR "No libraries were produced. This indicates a failure while building the boost library.") endif() + + configure_file(${BOOST_BUILD_INSTALLED_DIR}/share/boost-build/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage COPYONLY) return() endif() @@ -126,21 +158,16 @@ function(boost_modular_build) ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ) - if(DEFINED ENV{NUMBER_OF_PROCESSORS}) - set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS}) - else() - execute_process( - COMMAND nproc - OUTPUT_VARIABLE NUMBER_OF_PROCESSORS - ) - string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") - string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + include(ProcessorCount) + ProcessorCount(NUMBER_OF_PROCESSORS) + if(NOT NUMBER_OF_PROCESSORS) + set(NUMBER_OF_PROCESSORS 1) endif() ###################### # Generate configuration ###################### - list(APPEND _bm_OPTIONS + list(APPEND B2_OPTIONS -j${NUMBER_OF_PROCESSORS} --debug-configuration --debug-building @@ -149,94 +176,110 @@ function(boost_modular_build) --ignore-site-config --hash -q - -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}/include" - -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}/include" + "-sZLIB_INCLUDE=${CURRENT_INSTALLED_DIR}/include" + "-sBZIP2_INCLUDE=${CURRENT_INSTALLED_DIR}/include" + "-sLZMA_INCLUDE=${CURRENT_INSTALLED_DIR}/include" + "-sZSTD_INCLUDE=${CURRENT_INSTALLED_DIR}/include" threading=multi ) if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - list(APPEND _bm_OPTIONS threadapi=win32) + list(APPEND B2_OPTIONS threadapi=win32) else() - list(APPEND _bm_OPTIONS threadapi=pthread) + list(APPEND B2_OPTIONS threadapi=pthread) endif() - set(_bm_OPTIONS_DBG + list(APPEND B2_OPTIONS_DBG -sZLIB_BINARY=zlibd - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}/debug/lib" + "-sZLIB_LIBPATH=${CURRENT_INSTALLED_DIR}/debug/lib" -sBZIP2_BINARY=bz2d - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}/debug/lib" + "-sBZIP2_LIBPATH=${CURRENT_INSTALLED_DIR}/debug/lib" + -sLZMA_BINARY=lzmad + "-sLZMA_LIBPATH=${CURRENT_INSTALLED_DIR}/debug/lib" + -sZSTD_BINARY=zstdd + "-sZSTD_LIBPATH=${CURRENT_INSTALLED_DIR}/debug/lib" ) - - set(_bm_OPTIONS_REL + + list(APPEND B2_OPTIONS_REL -sZLIB_BINARY=zlib - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}/lib" + "-sZLIB_LIBPATH=${CURRENT_INSTALLED_DIR}/lib" -sBZIP2_BINARY=bz2 - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}/lib" + "-sBZIP2_LIBPATH=${CURRENT_INSTALLED_DIR}/lib" + -sLZMA_BINARY=lzma + "-sLZMA_LIBPATH=${CURRENT_INSTALLED_DIR}/lib" + -sZSTD_BINARY=zstd + "-sZSTD_LIBPATH=${CURRENT_INSTALLED_DIR}/lib" ) # Properly handle compiler and linker flags passed by VCPKG if(VCPKG_CXX_FLAGS) - list(APPEND _bm_OPTIONS cxxflags="${VCPKG_CXX_FLAGS}") + list(APPEND B2_OPTIONS "cxxflags=${VCPKG_CXX_FLAGS}") endif() if(VCPKG_CXX_FLAGS_RELEASE) - list(APPEND _bm_OPTIONS_REL cxxflags="${VCPKG_CXX_FLAGS_RELEASE}") + list(APPEND B2_OPTIONS_REL "cxxflags=${VCPKG_CXX_FLAGS_RELEASE}") endif() if(VCPKG_CXX_FLAGS_DEBUG) - list(APPEND _bm_OPTIONS_DBG cxxflags="${VCPKG_CXX_FLAGS_DEBUG}") + list(APPEND B2_OPTIONS_DBG "cxxflags=${VCPKG_CXX_FLAGS_DEBUG}") endif() - if(VCPKG_C_FLAGS) - list(APPEND _bm_OPTIONS cflags="${VCPKG_C_FLAGS}") + list(APPEND B2_OPTIONS "cflags=${VCPKG_C_FLAGS}") endif() if(VCPKG_C_FLAGS_RELEASE) - list(APPEND _bm_OPTIONS_REL cflags="${VCPKG_C_FLAGS_RELEASE}") + list(APPEND B2_OPTIONS_REL "cflags=${VCPKG_C_FLAGS_RELEASE}") endif() if(VCPKG_C_FLAGS_DEBUG) - list(APPEND _bm_OPTIONS_DBG cflags="${VCPKG_C_FLAGS_DEBUG}") + list(APPEND B2_OPTIONS_DBG "cflags=${VCPKG_C_FLAGS_DEBUG}") endif() - if(VCPKG_LINKER_FLAGS) - list(APPEND _bm_OPTIONS linkflags="${VCPKG_LINKER_FLAGS}") + list(APPEND B2_OPTIONS "linkflags=${VCPKG_LINKER_FLAGS}") endif() if(VCPKG_LINKER_FLAGS_RELEASE) - list(APPEND _bm_OPTIONS_REL linkflags="${VCPKG_LINKER_FLAGS_RELEASE}") + list(APPEND B2_OPTIONS_REL "linkflags=${VCPKG_LINKER_FLAGS_RELEASE}") endif() if(VCPKG_LINKER_FLAGS_DEBUG) - list(APPEND _bm_OPTIONS_DBG linkflags="${VCPKG_LINKER_FLAGS_DEBUG}") + list(APPEND B2_OPTIONS_DBG "linkflags=${VCPKG_LINKER_FLAGS_DEBUG}") endif() - # Add build type specific options if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - list(APPEND _bm_OPTIONS runtime-link=shared) + list(APPEND B2_OPTIONS runtime-link=shared) else() - list(APPEND _bm_OPTIONS runtime-link=static) + list(APPEND B2_OPTIONS runtime-link=static) endif() if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - list(APPEND _bm_OPTIONS link=shared) + list(APPEND B2_OPTIONS link=shared) else() - list(APPEND _bm_OPTIONS link=static) + list(APPEND B2_OPTIONS link=static) endif() if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") - list(APPEND _bm_OPTIONS address-model=64 architecture=x86) + list(APPEND B2_OPTIONS address-model=64 architecture=x86) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - list(APPEND _bm_OPTIONS address-model=32 architecture=arm) + list(APPEND B2_OPTIONS address-model=32 architecture=arm) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - list(APPEND _bm_OPTIONS address-model=64 architecture=arm) + list(APPEND B2_OPTIONS address-model=64 architecture=arm) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "s390x") + list(APPEND B2_OPTIONS address-model=64 architecture=s390x) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "ppc64le") + list(APPEND B2_OPTIONS address-model=64 architecture=power) else() - list(APPEND _bm_OPTIONS address-model=32 architecture=x86) + list(APPEND B2_OPTIONS address-model=32 architecture=x86) + + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND B2_OPTIONS "asmflags=/safeseh") + endif() + endif() file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT) - set(TOOLSET_OPTIONS " /EHsc -Zm800 -nologo") + set(TOOLSET_OPTIONS "/EHsc -Zm800 -nologo") if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") if(NOT VCPKG_PLATFORM_TOOLSET MATCHES "v140") find_path(PATH_TO_CL cl.exe) @@ -251,37 +294,52 @@ function(boost_modular_build) endif() endif() file(TO_NATIVE_PATH "${PLATFORM_WINMD_DIR}" PLATFORM_WINMD_DIR) - string(REPLACE "\\" "\\\\" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes + string(REPLACE "\\" "/" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes - set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl \"/AI\"${PLATFORM_WINMD_DIR}\"\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") - else() - set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -D_WIN32_WINNT=0x0602") + set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl /AI\"${PLATFORM_WINMD_DIR}\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") endif() - configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) - configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) - - if(VCPKG_PLATFORM_TOOLSET MATCHES "v14.") + set(MSVC_VERSION) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v143") + list(APPEND _bm_OPTIONS toolset=msvc) + set(MSVC_VERSION 14.3) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v142") + list(APPEND _bm_OPTIONS toolset=msvc) + set(MSVC_VERSION 14.2) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + list(APPEND _bm_OPTIONS toolset=msvc) + set(MSVC_VERSION 14.1) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") + list(APPEND _bm_OPTIONS toolset=msvc) + set(MSVC_VERSION 14.0) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v120") list(APPEND _bm_OPTIONS toolset=msvc) elseif(VCPKG_PLATFORM_TOOLSET MATCHES "external") - list(APPEND _bm_OPTIONS toolset=gcc) + list(APPEND B2_OPTIONS toolset=gcc) else() message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") endif() + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) + ###################### # Perform build + Package ###################### if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") message(STATUS "Building ${TARGET_TRIPLET}-rel") + set(BOOST_LIB_SUFFIX ${BOOST_LIB_RELEASE_SUFFIX}) + set(VARIANT "release") + set(BUILD_LIB_PATH "lib/") + configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") vcpkg_execute_required_process( COMMAND "${B2_EXE}" --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam - ${_bm_OPTIONS} - ${_bm_OPTIONS_REL} + ${B2_OPTIONS} + ${B2_OPTIONS_REL} variant=release debug-symbols=on WORKING_DIRECTORY ${_bm_SOURCE_PATH}/build @@ -292,14 +350,18 @@ function(boost_modular_build) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Building ${TARGET_TRIPLET}-dbg") + set(BOOST_LIB_SUFFIX ${BOOST_LIB_DEBUG_SUFFIX}) + set(VARIANT debug) + set(BUILD_LIB_PATH "debug/lib/") + configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") vcpkg_execute_required_process( COMMAND "${B2_EXE}" --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam - ${_bm_OPTIONS} - ${_bm_OPTIONS_DBG} + ${B2_OPTIONS} + ${B2_OPTIONS_DBG} variant=debug WORKING_DIRECTORY ${_bm_SOURCE_PATH}/build LOGNAME build-${TARGET_TRIPLET}-dbg @@ -351,14 +413,14 @@ function(boost_modular_build) string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries string(REPLACE "-vc142-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2019 and VS2015 binaries + string(REPLACE "-vc143-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2022 and VS2015 binaries string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs string(REPLACE "-sgyd-" "-gyd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs string(REPLACE "-x32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-1_70" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries - string(REPLACE "_python3-" "_python-" NEW_FILENAME ${NEW_FILENAME}) + string(REPLACE "-1_76" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") # nothing to do elseif(EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) @@ -368,5 +430,14 @@ function(boost_modular_build) endif() endforeach() + # boost-regex[icu] and boost-locale[icu] generate has_icu.lib + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/has_icu.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/has_icu.lib") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/has_icu.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/has_icu.lib") + endif() + vcpkg_copy_pdbs() + configure_file(${BOOST_BUILD_INSTALLED_DIR}/share/boost-build/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage COPYONLY) endfunction() diff --git a/ports/boost-modular-build-helper/portfile.cmake b/ports/boost-modular-build-helper/portfile.cmake index 6ed367434eda63..8224bb9575579a 100644 --- a/ports/boost-modular-build-helper/portfile.cmake +++ b/ports/boost-modular-build-helper/portfile.cmake @@ -7,6 +7,7 @@ file( ${CMAKE_CURRENT_LIST_DIR}/nothing.bat ${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build -) +) \ No newline at end of file diff --git a/ports/boost-modular-build-helper/usage b/ports/boost-modular-build-helper/usage new file mode 100644 index 00000000000000..89a0376daddec3 --- /dev/null +++ b/ports/boost-modular-build-helper/usage @@ -0,0 +1,4 @@ +The package boost is compatible with built-in CMake targets: + + find_package(Boost REQUIRED [COMPONENTS ...]) + target_link_libraries(main PRIVATE Boost::boost Boost:: Boost:: ...) diff --git a/ports/boost-modular-build-helper/user-config.jam b/ports/boost-modular-build-helper/user-config.jam index 78677c0ab2ec3c..afd1d7dc6ac06c 100644 --- a/ports/boost-modular-build-helper/user-config.jam +++ b/ports/boost-modular-build-helper/user-config.jam @@ -2,14 +2,15 @@ import toolset ; if "@VCPKG_PLATFORM_TOOLSET@" != "external" { - using msvc : : cl.exe : - "@NOTHING_BAT@" - @TOOLSET_OPTIONS@ - ; + using msvc : @MSVC_VERSION@ : cl.exe + : + "@NOTHING_BAT@" + @TOOLSET_OPTIONS@ + ; } else { - using gcc : 5.4.1 : @CMAKE_CXX_COMPILER@ + using @B2_TOOLSET@ : : @CMAKE_CXX_COMPILER@ : @CMAKE_RANLIB@ @CMAKE_AR@ @@ -23,8 +24,10 @@ else if "@PORT@" = "boost-python" { - using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_RELEASE@" ; - using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : on ; + using python : @VCPKG_PYTHON3_VERSION@ : : "@VCPKG_PYTHON3_INCLUDE@" : "@VCPKG_PYTHON3_LIBS_RELEASE@" ; + using python : @VCPKG_PYTHON3_VERSION@ : : "@VCPKG_PYTHON3_INCLUDE@" : "@VCPKG_PYTHON3_LIBS_DEBUG@" : on ; + using python : @VCPKG_PYTHON2_VERSION@ : : "@VCPKG_PYTHON2_INCLUDE@" : "@VCPKG_PYTHON2_LIBS_RELEASE@" ; + using python : @VCPKG_PYTHON2_VERSION@ : : "@VCPKG_PYTHON2_INCLUDE@" : "@VCPKG_PYTHON2_LIBS_DEBUG@" : on ; } if "@PORT@" = "boost-mpi" @@ -37,16 +40,45 @@ if "@PORT@" = "boost-mpi" project user-config : ; -lib advapi32 ; +if "@VCPKG_PLATFORM_TOOLSET@" != "external" +{ + lib advapi32 ; + + lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" release : : advapi32 ; + lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib" debug : : advapi32 ; + + lib icuin : : "@CURRENT_INSTALLED_DIR@/lib/icuin.lib" release : : ; + lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" debug : : ; -lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" release : : advapi32 ; -lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib" debug : : advapi32 ; + lib icudt : : "@CURRENT_INSTALLED_DIR@/lib/icudt.lib" release : : ; + lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" debug : : ; +} +else +{ + if "@CMAKE_SYSTEM_NAME@" = "Windows" # We are hopelessly stuck inside boost-modular-build-helper, only this works + { + lib icuuc : : icuuc "@CURRENT_INSTALLED_DIR@/lib" release : : ; + lib icuuc : : icuucd "@CURRENT_INSTALLED_DIR@/debug/lib" debug : : ; -lib icuin : : "@CURRENT_INSTALLED_DIR@/lib/icuin.lib" release : : ; -lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" debug : : ; + lib icuin : : icuin "@CURRENT_INSTALLED_DIR@/lib" release : : ; + lib icuin : : icuind "@CURRENT_INSTALLED_DIR@/debug/lib" debug : : ; -lib icudt : : "@CURRENT_INSTALLED_DIR@/lib/icudt.lib" release : : ; -lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" debug : : ; + lib icudt : : icudt "@CURRENT_INSTALLED_DIR@/lib" release : : ; + lib icudt : : icudtd "@CURRENT_INSTALLED_DIR@/debug/lib" debug : : ; + } + else + { + lib dl ; + lib icuuc : : icuuc "@CURRENT_INSTALLED_DIR@/lib" release : : dl ; + lib icuuc : : icuuc "@CURRENT_INSTALLED_DIR@/debug/lib" debug : : dl ; + + lib icuin : : icui18n "@CURRENT_INSTALLED_DIR@/lib" release : : ; + lib icuin : : icui18n "@CURRENT_INSTALLED_DIR@/debug/lib" debug : : ; + + lib icudt : : icudata "@CURRENT_INSTALLED_DIR@/lib" release : : ; + lib icudt : : icudata "@CURRENT_INSTALLED_DIR@/debug/lib" debug : : ; + } +} lib iconv : : "@LIBICONV_LIBRARY@" shared shared release : : ; lib iconv : : "@LIBICONV_LIBRARY@" shared shared debug : : ; diff --git a/ports/boost-modular-build-helper/vcpkg.json b/ports/boost-modular-build-helper/vcpkg.json new file mode 100644 index 00000000000000..192b420666ce5d --- /dev/null +++ b/ports/boost-modular-build-helper/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-modular-build-helper", + "version-string": "1.76.0", + "port-version": 1, + "dependencies": [ + "boost-build", + "boost-uninstall" + ] +} diff --git a/ports/boost-move/CONTROL b/ports/boost-move/CONTROL deleted file mode 100644 index 90b2f4a60a127d..00000000000000 --- a/ports/boost-move/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-move -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-static-assert, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/move -Description: Boost move module diff --git a/ports/boost-move/portfile.cmake b/ports/boost-move/portfile.cmake index a36d02705d6969..2ebcbc847c24de 100644 --- a/ports/boost-move/portfile.cmake +++ b/ports/boost-move/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/move - REF boost-1.70.0 - SHA512 09291516819adcfed88c490607a865c6ef4beadac9ee4f948bab90e8fc4f04d958de4601ffff1c9da19793eac6de68b0dd5dfa541cb6a5182d9246d5b06d80d4 + REF boost-1.76.0 + SHA512 f136696c88f398d27e97f77141f10c1ab80b0bccf9acdecc3c0e886c8f32e8e9bc9fe51ba563c814e20d71a15c01f70d96ffd88d5a6c5e297f568959492bc982 HEAD_REF master ) diff --git a/ports/boost-move/vcpkg.json b/ports/boost-move/vcpkg.json new file mode 100644 index 00000000000000..e197249a9bee88 --- /dev/null +++ b/ports/boost-move/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "boost-move", + "version": "1.76.0", + "description": "Boost move module", + "homepage": "https://github.com/boostorg/move", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-static-assert", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-mp11/CONTROL b/ports/boost-mp11/CONTROL deleted file mode 100644 index 3ae9d9e6ff9dc4..00000000000000 --- a/ports/boost-mp11/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-mp11 -Version: 1.70.0 -Build-Depends: boost-vcpkg-helpers -Homepage: https://github.com/boostorg/mp11 -Description: Boost mp11 module diff --git a/ports/boost-mp11/portfile.cmake b/ports/boost-mp11/portfile.cmake index e0979c6a2d5849..759f4849f57585 100644 --- a/ports/boost-mp11/portfile.cmake +++ b/ports/boost-mp11/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/mp11 - REF boost-1.70.0 - SHA512 d09415d5c69a1960c8af3c3e63a61aef62d2a35f00fe42e8dd8ad3eeb2f13eed48e0710485f444e79cfd7ab2fa3f72535e01d9b97337c89328b961fa20aeb047 + REF boost-1.76.0 + SHA512 fcdf427339f5e9a617d4ebcb5bbbf81eb6fd25568dbac64ad8f570df53997372d0c03e04b2c32d5ee704576a98008015f489d2a64726b50732da1cc3ab331531 HEAD_REF master ) diff --git a/ports/boost-mp11/vcpkg.json b/ports/boost-mp11/vcpkg.json new file mode 100644 index 00000000000000..4eb15cb1d83e83 --- /dev/null +++ b/ports/boost-mp11/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-mp11", + "version": "1.76.0", + "description": "Boost mp11 module", + "homepage": "https://github.com/boostorg/mp11", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-mpi/CONTROL b/ports/boost-mpi/CONTROL deleted file mode 100644 index 8440a2f9590baf..00000000000000 --- a/ports/boost-mpi/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-mpi -Version: 1.70.0-2 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, mpi -Homepage: https://github.com/boostorg/mpi -Description: Boost mpi module diff --git a/ports/boost-mpi/portfile.cmake b/ports/boost-mpi/portfile.cmake index 76a92ac7ce24df..e8d6079d95a885 100644 --- a/ports/boost-mpi/portfile.cmake +++ b/ports/boost-mpi/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/mpi - REF boost-1.70.0 - SHA512 be8c7abd31335b7290969179d95525855b11f79cacda0ee6d42d8fe130cbeec0768a8418b59ad1ad54c6e36a445622bd289aaabd74de297f576c70c90a871d7f + REF boost-1.76.0 + SHA512 42870fa1a8d85814aa125664bdadfd986112b6e9eb4b1007835f3434c4eacccad8971fc0767e9ac7b935068ed0c0031cea5820cbb79291d2b281ace565cd8bc5 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-mpi requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-mpi/vcpkg.json b/ports/boost-mpi/vcpkg.json new file mode 100644 index 00000000000000..3fadfc06003232 --- /dev/null +++ b/ports/boost-mpi/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "boost-mpi", + "version": "1.76.0", + "description": "Boost mpi module", + "homepage": "https://github.com/boostorg/mpi", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-foreach", + "boost-function", + "boost-graph", + "boost-integer", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-mpl", + "boost-optional", + { + "name": "boost-python", + "platform": "!uwp & !(arm & windows) & !emscripten" + }, + "boost-serialization", + "boost-smart-ptr", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers", + "mpi" + ] +} diff --git a/ports/boost-mpl/CONTROL b/ports/boost-mpl/CONTROL deleted file mode 100644 index d29e93e4d51358..00000000000000 --- a/ports/boost-mpl/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-mpl -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-predef, boost-preprocessor, boost-static-assert, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/mpl -Description: Boost mpl module diff --git a/ports/boost-mpl/portfile.cmake b/ports/boost-mpl/portfile.cmake index e33bcbfc73d117..982679e0146d15 100644 --- a/ports/boost-mpl/portfile.cmake +++ b/ports/boost-mpl/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/mpl - REF boost-1.70.0 - SHA512 3691a6ff9e31d8c7ee3010e2c3a6d806e02e2e71ff05e422bc7c17cf774a0a8ceb650f315bd8939275529f0c24f19df3efcd31b677894ea2c1af251b9ab20b3e + REF boost-1.76.0 + SHA512 90362fbe99563754c9b692466f61a0c5cfbb1bcb7c24d107d9e1525755b928cb9bb741768ba2dceaf4f44efd4c644cf1ea184d2ee3fbf419459dfc12a42430f1 HEAD_REF master ) diff --git a/ports/boost-mpl/vcpkg.json b/ports/boost-mpl/vcpkg.json new file mode 100644 index 00000000000000..999fbb596b40d4 --- /dev/null +++ b/ports/boost-mpl/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-mpl", + "version": "1.76.0", + "description": "Boost mpl module", + "homepage": "https://github.com/boostorg/mpl", + "dependencies": [ + "boost-config", + "boost-core", + "boost-detail", + "boost-predef", + "boost-preprocessor", + "boost-static-assert", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-msm/CONTROL b/ports/boost-msm/CONTROL deleted file mode 100644 index 6f9e70094d8d91..00000000000000 --- a/ports/boost-msm/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-msm -Version: 1.70.0 -Build-Depends: boost-any, boost-assert, boost-bind, boost-circular-buffer, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-parameter, boost-phoenix, boost-preprocessor, boost-proto, boost-serialization, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/msm -Description: Boost msm module diff --git a/ports/boost-msm/portfile.cmake b/ports/boost-msm/portfile.cmake index 16ec20b85c2be3..37b9e89a023720 100644 --- a/ports/boost-msm/portfile.cmake +++ b/ports/boost-msm/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/msm - REF boost-1.70.0 - SHA512 3e91a5be7bf9018c411902ebc6dd1c576a17f7d298ac3694073c12a003cb872fbde4756fbfb113d60d39dad6f683749cef26e21758c96967b06c34f31410467a + REF boost-1.76.0 + SHA512 88734ef44bd8b8fe41920ed2e2d0576c87b86604fe8bb33e5512e01719593287028475bbd1a597ba4b8d32bc7cc119e2c62d9efc8006f772abce0fb988f8e9d1 HEAD_REF master ) diff --git a/ports/boost-msm/vcpkg.json b/ports/boost-msm/vcpkg.json new file mode 100644 index 00000000000000..4704144e07136a --- /dev/null +++ b/ports/boost-msm/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "boost-msm", + "version": "1.76.0", + "description": "Boost msm module", + "homepage": "https://github.com/boostorg/msm", + "dependencies": [ + "boost-any", + "boost-assert", + "boost-bind", + "boost-circular-buffer", + "boost-config", + "boost-core", + "boost-function", + "boost-fusion", + "boost-mpl", + "boost-parameter", + "boost-phoenix", + "boost-preprocessor", + "boost-proto", + "boost-serialization", + "boost-tuple", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-multi-array/CONTROL b/ports/boost-multi-array/CONTROL deleted file mode 100644 index 6250f68add8450..00000000000000 --- a/ports/boost-multi-array/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-multi-array -Version: 1.70.0 -Build-Depends: boost-compatibility, boost-config, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/multi_array -Description: Boost multi_array module diff --git a/ports/boost-multi-array/portfile.cmake b/ports/boost-multi-array/portfile.cmake index 5285174aadca8c..625a9c98882736 100644 --- a/ports/boost-multi-array/portfile.cmake +++ b/ports/boost-multi-array/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/multi_array - REF boost-1.70.0 - SHA512 16e0468e94d8691d6b808364c3b75063f0f0b5b27495bad9cd8fc8029b72bd272b23d82ad6003c8ab4ffc1fef8aef6871c3492c639ab0628130eb7e72183235e + REF boost-1.76.0 + SHA512 1e6487b127e8205ba9ce790fefa39994bfe85417e9f87ef332e73f4465f8e26ea2ffc54e4d3096f6c7d48dd30768e910f6bf2ebd3b49d0ba490be7f0bda0c965 HEAD_REF master ) diff --git a/ports/boost-multi-array/vcpkg.json b/ports/boost-multi-array/vcpkg.json new file mode 100644 index 00000000000000..07804cbd4a2046 --- /dev/null +++ b/ports/boost-multi-array/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "boost-multi-array", + "version": "1.76.0", + "description": "Boost multi_array module", + "homepage": "https://github.com/boostorg/multi_array", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-concept-check", + "boost-config", + "boost-core", + "boost-functional", + "boost-iterator", + "boost-mpl", + "boost-static-assert", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-multi-index/CONTROL b/ports/boost-multi-index/CONTROL deleted file mode 100644 index 19a250e3e91c6e..00000000000000 --- a/ports/boost-multi-index/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-multi-index -Version: 1.70.0 -Build-Depends: boost-assert, boost-bind, boost-compatibility, boost-config, boost-container-hash, boost-core, boost-detail, boost-foreach, boost-functional, boost-integer, boost-iterator, boost-move, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/multi_index -Description: Boost multi_index module diff --git a/ports/boost-multi-index/portfile.cmake b/ports/boost-multi-index/portfile.cmake index f928aaec7bf16d..e8ac4693463505 100644 --- a/ports/boost-multi-index/portfile.cmake +++ b/ports/boost-multi-index/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/multi_index - REF boost-1.70.0 - SHA512 2068a3f7b493dcb5d3658e6c5d0134bd8009c90bea590fa97cc78d5b86386cfa42bb98a30b06c85270c2440ccc9aa092ec78fb9227bc9c90ad4e2d7480773e32 + REF boost-1.76.0 + SHA512 b7b19d5fb3f7c93009d7af6ab8e80694208f045d012778637bd57b018360311ce14d3921d0ee6163e0aaa01001a466c2b68cf32017361ef6c0c9858db14d8615 HEAD_REF master ) diff --git a/ports/boost-multi-index/vcpkg.json b/ports/boost-multi-index/vcpkg.json new file mode 100644 index 00000000000000..4bc77042b7982b --- /dev/null +++ b/ports/boost-multi-index/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "boost-multi-index", + "version": "1.76.0", + "description": "Boost multi_index module", + "homepage": "https://github.com/boostorg/multi_index", + "dependencies": [ + "boost-assert", + "boost-bind", + "boost-config", + "boost-container-hash", + "boost-core", + "boost-detail", + "boost-foreach", + "boost-functional", + "boost-integer", + "boost-iterator", + "boost-move", + "boost-mpl", + "boost-preprocessor", + "boost-serialization", + "boost-static-assert", + "boost-throw-exception", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-multiprecision/CONTROL b/ports/boost-multiprecision/CONTROL deleted file mode 100644 index 49d3fb4f012f80..00000000000000 --- a/ports/boost-multiprecision/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-multiprecision -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-config, boost-container-hash, boost-core, boost-functional, boost-integer, boost-lexical-cast, boost-mpl, boost-predef, boost-rational, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/multiprecision -Description: Boost multiprecision module diff --git a/ports/boost-multiprecision/portfile.cmake b/ports/boost-multiprecision/portfile.cmake index f6d1a3b5f82d6c..8002d71867e9fd 100644 --- a/ports/boost-multiprecision/portfile.cmake +++ b/ports/boost-multiprecision/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/multiprecision - REF boost-1.70.0 - SHA512 a583b0df0855146ad0ee841cfc9ad646be89b38cf0d895d9ba69f4e5b2013887343863678bfbaed055b55c54d2ebe4026dc38f2dc021b8c7f9f18bf540d9189c + REF boost-1.76.0 + SHA512 ced4b1d4f1f4549dcc5d9f1ea470af5fe69af79208e8609656d5d807c5c1f54b0835f0807eda476b8ac59103ba1045a0458ea124bfd61439aa3e3d56d011313d HEAD_REF master ) diff --git a/ports/boost-multiprecision/vcpkg.json b/ports/boost-multiprecision/vcpkg.json new file mode 100644 index 00000000000000..523e5fb2ce253c --- /dev/null +++ b/ports/boost-multiprecision/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "boost-multiprecision", + "version": "1.76.0", + "description": "Boost multiprecision module", + "homepage": "https://github.com/boostorg/multiprecision", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-config", + "boost-container-hash", + "boost-core", + "boost-functional", + "boost-integer", + "boost-lexical-cast", + "boost-predef", + "boost-rational", + "boost-throw-exception", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-nowide/b2-options.cmake b/ports/boost-nowide/b2-options.cmake new file mode 100644 index 00000000000000..cac0b0b9514b72 --- /dev/null +++ b/ports/boost-nowide/b2-options.cmake @@ -0,0 +1,3 @@ +if(APPLE) + list(APPEND B2_OPTIONS cxxstd=11) +endif() diff --git a/ports/boost-nowide/portfile.cmake b/ports/boost-nowide/portfile.cmake new file mode 100644 index 00000000000000..924d952de876c0 --- /dev/null +++ b/ports/boost-nowide/portfile.cmake @@ -0,0 +1,27 @@ +# Automatically generated by scripts/boost/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/nowide + REF boost-1.76.0 + SHA512 42acb8ef8d0c3ab01673814ada908dcfb6673c8fb6a4f056043b0a81bbeb9cc8bdd7b52febe0d06d5899d39af9717fa2e63f3678f7005e56d0bc4765e8a232c0 + HEAD_REF master +) + +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +string(REPLACE "check-target-builds ../config//cxx11_moveable_fstreams" "check-target-builds ../check_movable_fstreams.cpp" _contents "${_contents}") +string(REPLACE "check-target-builds ../config//lfs_support" "check-target-builds ../check_lfs_support.cpp" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") +file(COPY "${SOURCE_PATH}/config/check_lfs_support.cpp" "${SOURCE_PATH}/config/check_movable_fstreams.cpp" DESTINATION "${SOURCE_PATH}/build/config") +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-nowide requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-nowide/vcpkg.json b/ports/boost-nowide/vcpkg.json new file mode 100644 index 00000000000000..08d1daca387c9f --- /dev/null +++ b/ports/boost-nowide/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "boost-nowide", + "version": "1.76.0", + "description": "Boost nowide module", + "homepage": "https://github.com/boostorg/nowide", + "dependencies": [ + { + "name": "boost-build", + "host": true + }, + "boost-config", + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-numeric-conversion/CONTROL b/ports/boost-numeric-conversion/CONTROL deleted file mode 100644 index 702c4f5de2df87..00000000000000 --- a/ports/boost-numeric-conversion/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-numeric-conversion -Version: 1.70.0 -Build-Depends: boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-integer, boost-preprocessor, boost-throw-exception, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/numeric_conversion -Description: Boost numeric_conversion module diff --git a/ports/boost-numeric-conversion/portfile.cmake b/ports/boost-numeric-conversion/portfile.cmake index 8a71be47d17333..24ebf24f7205dd 100644 --- a/ports/boost-numeric-conversion/portfile.cmake +++ b/ports/boost-numeric-conversion/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/numeric_conversion - REF boost-1.70.0 - SHA512 05a936bd820c40a9ddf84f5c05790aa13191ff00ab2232a046bbef11bc0adb0eb60ec630ab9397ca841d7b12d74a74ca2c7b53c33780db8e9607b4b757fd901e + REF boost-1.76.0 + SHA512 cd659c91ae7f3b25e3d0b13b44c028fcc86295fe414fde70e5decbe1d8fcb1dbd233c6a36b90b33def4e0709075a41661aa311305329f38ba36810326306427b HEAD_REF master ) diff --git a/ports/boost-numeric-conversion/vcpkg.json b/ports/boost-numeric-conversion/vcpkg.json new file mode 100644 index 00000000000000..a25310104e6e18 --- /dev/null +++ b/ports/boost-numeric-conversion/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "boost-numeric-conversion", + "version": "1.76.0", + "description": "Boost numeric_conversion module", + "homepage": "https://github.com/boostorg/numeric_conversion", + "dependencies": [ + "boost-config", + "boost-conversion", + "boost-core", + "boost-detail", + "boost-mpl", + "boost-preprocessor", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-odeint/CONTROL b/ports/boost-odeint/CONTROL deleted file mode 100644 index a4c0381f768838..00000000000000 --- a/ports/boost-odeint/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-odeint -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-bind, boost-compute, boost-config, boost-core, boost-function, boost-fusion, boost-iterator, boost-math, boost-mpl, boost-multi-array, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-units, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/odeint -Description: Boost odeint module diff --git a/ports/boost-odeint/portfile.cmake b/ports/boost-odeint/portfile.cmake index 91b9ce949d58ea..0a7c9e2fb3685d 100644 --- a/ports/boost-odeint/portfile.cmake +++ b/ports/boost-odeint/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/odeint - REF boost-1.70.0 - SHA512 1edcd84ee3f9bb8a421971285fe18b6b30af720042f80e87d6178682bb2ec7163185be08e7648f2bb944562f9abafe8bf34fe520412b7f1bd02e7195670c964b + REF boost-1.76.0 + SHA512 8bc70dd31f948f467249caa4c67bf9dcb58bba524edd303cd4312037cff49409108c88321649ff31363da4897f8fa6053e4e5b632fbfe19f0529db4fdc734cd8 HEAD_REF master ) diff --git a/ports/boost-odeint/vcpkg.json b/ports/boost-odeint/vcpkg.json new file mode 100644 index 00000000000000..483ea6e86b8c1b --- /dev/null +++ b/ports/boost-odeint/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "boost-odeint", + "version": "1.76.0", + "description": "Boost odeint module", + "homepage": "https://github.com/boostorg/odeint", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-bind", + "boost-compute", + "boost-config", + "boost-core", + "boost-function", + "boost-fusion", + "boost-iterator", + "boost-math", + "boost-mpl", + "boost-multi-array", + "boost-preprocessor", + "boost-range", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-units", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-optional/CONTROL b/ports/boost-optional/CONTROL deleted file mode 100644 index b97a5df25411a5..00000000000000 --- a/ports/boost-optional/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-optional -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-move, boost-predef, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/optional -Description: Boost optional module diff --git a/ports/boost-optional/portfile.cmake b/ports/boost-optional/portfile.cmake index cb2556c23d32ed..0705d960add47d 100644 --- a/ports/boost-optional/portfile.cmake +++ b/ports/boost-optional/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/optional - REF boost-1.70.0 - SHA512 739fea7e373aa651268db2712cc2fb4ca18dce8c93626aa05f89657ae89b16ff755c1994d336ec7e72991120b01c9fed0310591cf78dc25c02bf42ce2b947a67 + REF boost-1.76.0 + SHA512 4802a27da00446384ae4c91075593f0d67628192d9f9cbc2378a190d1ef5491979c40934b3ac0e72145522847d0abbd1afd44345696cd936875189ab0013138c HEAD_REF master ) diff --git a/ports/boost-optional/vcpkg.json b/ports/boost-optional/vcpkg.json new file mode 100644 index 00000000000000..5cfaf9a3aba305 --- /dev/null +++ b/ports/boost-optional/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "boost-optional", + "version": "1.76.0", + "description": "Boost optional module", + "homepage": "https://github.com/boostorg/optional", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-detail", + "boost-move", + "boost-predef", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-outcome/CONTROL b/ports/boost-outcome/CONTROL deleted file mode 100644 index c97930c08ca203..00000000000000 --- a/ports/boost-outcome/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-outcome -Version: 1.70.0 -Build-Depends: boost-config, boost-throw-exception, boost-vcpkg-helpers -Description: Boost outcome module diff --git a/ports/boost-outcome/portfile.cmake b/ports/boost-outcome/portfile.cmake index c715bafb03a099..b434f1f22fdd50 100644 --- a/ports/boost-outcome/portfile.cmake +++ b/ports/boost-outcome/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/outcome - REF boost-1.70.0 - SHA512 7741d0aca8dd352a530f3b6a6878de492b5aca7f3ade7a86f17fa971dc054616dab0bb10c8d304a298b3e065ca16ab7dcd192d0fec4aaf237ed391390a93a0a8 + REF boost-1.76.0 + SHA512 0e15ccdbb06db9308524e4e11b75b6c1802aec0237d139bcc6929a2dbeeee1cec21f2819cb8a881ba4d9d1d1934a91527cbf4a0044de34f9ff2c3bfdd01cb543 HEAD_REF master ) diff --git a/ports/boost-outcome/vcpkg.json b/ports/boost-outcome/vcpkg.json new file mode 100644 index 00000000000000..fe9ab77a21c146 --- /dev/null +++ b/ports/boost-outcome/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "boost-outcome", + "version": "1.76.0", + "description": "Boost outcome module", + "homepage": "https://github.com/boostorg/outcome", + "dependencies": [ + "boost-config", + "boost-exception", + "boost-system", + "boost-throw-exception", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-parameter-python/CONTROL b/ports/boost-parameter-python/CONTROL deleted file mode 100644 index 3f047968d2e77d..00000000000000 --- a/ports/boost-parameter-python/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-parameter-python -Version: 1.70.0 -Build-Depends: boost-mpl, boost-parameter, boost-preprocessor, boost-python (windows), boost-vcpkg-helpers -Description: Boost parameter_python module diff --git a/ports/boost-parameter-python/portfile.cmake b/ports/boost-parameter-python/portfile.cmake index e29f53f517b4ae..79ef14dbaa5d9b 100644 --- a/ports/boost-parameter-python/portfile.cmake +++ b/ports/boost-parameter-python/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/parameter_python - REF boost-1.70.0 - SHA512 d2f43ca744bedfdeda806c0d1b24216f4926401059450d12485dc2175e8731991476c1bb530d28c631d9bc034c7ce184b62daffe0c3a6449fc619ff5e3e4e2cb + REF boost-1.76.0 + SHA512 d9e1cc0adae766e9c78fdd5002f2740902092f57f4c187f95e18d3cd9062bf8f9e5678caa9e7e2bc8a27d009302ba335ef8e7b7795a1e2577ab166c6adce9d7d HEAD_REF master ) diff --git a/ports/boost-parameter-python/vcpkg.json b/ports/boost-parameter-python/vcpkg.json new file mode 100644 index 00000000000000..104daca2d96c69 --- /dev/null +++ b/ports/boost-parameter-python/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "boost-parameter-python", + "version": "1.76.0", + "description": "Boost parameter_python module", + "homepage": "https://github.com/boostorg/parameter_python", + "supports": "!emscripten", + "dependencies": [ + "boost-mpl", + "boost-parameter", + "boost-preprocessor", + { + "name": "boost-python", + "platform": "!uwp & !(arm & windows) & !emscripten" + }, + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-parameter/CONTROL b/ports/boost-parameter/CONTROL deleted file mode 100644 index 0e11e2e8bf9d43..00000000000000 --- a/ports/boost-parameter/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-parameter -Version: 1.70.0 -Build-Depends: boost-config, boost-detail, boost-mpl, boost-optional, boost-preprocessor, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/parameter -Description: Boost parameter module diff --git a/ports/boost-parameter/portfile.cmake b/ports/boost-parameter/portfile.cmake index d3ba3c0e067707..2d9c1acc512241 100644 --- a/ports/boost-parameter/portfile.cmake +++ b/ports/boost-parameter/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/parameter - REF boost-1.70.0 - SHA512 a923427630563ebd77c0cdbbda37a4288e375f2ba1315a5596e8711b8854fb23e6984e88e1108b44cf6a909f6f8acc80867a34f86aed7ea6a18dbd766a93cc1a + REF boost-1.76.0 + SHA512 737dac55fac0e4e31e80fb4adfa75880a857a41007d2cdbfacb58f89171410b7136bae69cee590a9de3735b58dc9c9bbf8c724f3ef4b4ac4cf27f695f8efc640 HEAD_REF master ) diff --git a/ports/boost-parameter/vcpkg.json b/ports/boost-parameter/vcpkg.json new file mode 100644 index 00000000000000..d662d36a764c45 --- /dev/null +++ b/ports/boost-parameter/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "boost-parameter", + "version": "1.76.0", + "description": "Boost parameter module", + "homepage": "https://github.com/boostorg/parameter", + "dependencies": [ + "boost-config", + "boost-core", + "boost-function", + "boost-fusion", + "boost-mp11", + "boost-mpl", + "boost-optional", + "boost-preprocessor", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-pfr/portfile.cmake b/ports/boost-pfr/portfile.cmake new file mode 100644 index 00000000000000..7c6489e2771c84 --- /dev/null +++ b/ports/boost-pfr/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by scripts/boost/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/pfr + REF boost-1.76.0 + SHA512 cb6108970c50fff93677f70f4610376d1d917b372633c913290fcefbd92c24329717fd95060a9403afe19daf9a525ee129c88eed7ce5320dd44dd6c56c7ec63f + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-pfr/vcpkg.json b/ports/boost-pfr/vcpkg.json new file mode 100644 index 00000000000000..6c6cbf410192c2 --- /dev/null +++ b/ports/boost-pfr/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-pfr", + "version": "1.76.0", + "description": "Boost pfr module", + "homepage": "https://github.com/boostorg/pfr", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-phoenix/CONTROL b/ports/boost-phoenix/CONTROL deleted file mode 100644 index 4ef5e2b67b0300..00000000000000 --- a/ports/boost-phoenix/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-phoenix -Version: 1.70.0 -Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-predef, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/phoenix -Description: Boost phoenix module diff --git a/ports/boost-phoenix/portfile.cmake b/ports/boost-phoenix/portfile.cmake index eb5f0dffbc6800..9c3f00410bb765 100644 --- a/ports/boost-phoenix/portfile.cmake +++ b/ports/boost-phoenix/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/phoenix - REF boost-1.70.0 - SHA512 d8e42ecd1e93fc3e48a1b1f0de9d2054f73e5d591da71af09f664b94edfa612ff377c20d2d913ed3790bca4d5ff74d176c50e298f979c88e5db5bf80ea239f2d + REF boost-1.76.0 + SHA512 515895386647ea13a40045814f8f91989aa1ec257f139fff150401247fdf8684e8b1df73b18edd69ffeee87d6c25d4d895dbd6dbef54fec61ba0f192904eaad1 HEAD_REF master ) diff --git a/ports/boost-phoenix/vcpkg.json b/ports/boost-phoenix/vcpkg.json new file mode 100644 index 00000000000000..49196cb71e1b2a --- /dev/null +++ b/ports/boost-phoenix/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "boost-phoenix", + "version": "1.76.0", + "description": "Boost phoenix module", + "homepage": "https://github.com/boostorg/phoenix", + "dependencies": [ + "boost-assert", + "boost-bind", + "boost-config", + "boost-core", + "boost-detail", + "boost-function", + "boost-fusion", + "boost-mpl", + "boost-predef", + "boost-preprocessor", + "boost-proto", + "boost-range", + "boost-smart-ptr", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-poly-collection/CONTROL b/ports/boost-poly-collection/CONTROL deleted file mode 100644 index eccbe48353c5f7..00000000000000 --- a/ports/boost-poly-collection/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-poly-collection -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-iterator, boost-mp11, boost-mpl, boost-type-erasure (!arm), boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/poly_collection -Description: Boost poly_collection module diff --git a/ports/boost-poly-collection/portfile.cmake b/ports/boost-poly-collection/portfile.cmake index 9119ffba51aeb1..695cc40c86e141 100644 --- a/ports/boost-poly-collection/portfile.cmake +++ b/ports/boost-poly-collection/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/poly_collection - REF boost-1.70.0 - SHA512 c3ea37138000ed584ab1cc17441be7bce0962e542b9cf2af6cf3c76d78a9905e42d4ab6c32506ff7dbb44a25e8def60223c6075bc4b39e523d9c0b9fbf6cabb3 + REF boost-1.76.0 + SHA512 9bc910a72b232e8615d43e967f5a19d2b5910dcaf1641c71b9bbc67ea72e8fb96a834fab8657bce89be574ec9d56e298cb8f36d7663476a5604876fba6ae1cde HEAD_REF master ) diff --git a/ports/boost-poly-collection/vcpkg.json b/ports/boost-poly-collection/vcpkg.json new file mode 100644 index 00000000000000..50040ac1a376d1 --- /dev/null +++ b/ports/boost-poly-collection/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "boost-poly-collection", + "version": "1.76.0", + "description": "Boost poly_collection module", + "homepage": "https://github.com/boostorg/poly_collection", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-detail", + "boost-iterator", + "boost-mp11", + "boost-mpl", + "boost-type-erasure", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-polygon/CONTROL b/ports/boost-polygon/CONTROL deleted file mode 100644 index 1f0f0bc1217bd7..00000000000000 --- a/ports/boost-polygon/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-polygon -Version: 1.70.0 -Build-Depends: boost-config, boost-integer, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/polygon -Description: Boost polygon module diff --git a/ports/boost-polygon/portfile.cmake b/ports/boost-polygon/portfile.cmake index a8945fc3ce6117..6f81c5c16ff109 100644 --- a/ports/boost-polygon/portfile.cmake +++ b/ports/boost-polygon/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/polygon - REF boost-1.70.0 - SHA512 c4d07fc5a419442e614376197611d131ae05cb25127bb3e300e0e9eb5c1336b2bae99522460b69a61dfd05e5e4785cf9b0a33b61fa199c738a9e16cbde3c34d7 + REF boost-1.76.0 + SHA512 3b735ae15c75581297ad920a79c30ad3e58da4a747333ff9c6637ad10e08c536d0e9b495b20ecc743af98a9d46af92aa602b52aede50c1a77de84f121cd13a4a HEAD_REF master ) diff --git a/ports/boost-polygon/vcpkg.json b/ports/boost-polygon/vcpkg.json new file mode 100644 index 00000000000000..89a857b1bd939b --- /dev/null +++ b/ports/boost-polygon/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "boost-polygon", + "version": "1.76.0", + "description": "Boost polygon module", + "homepage": "https://github.com/boostorg/polygon", + "dependencies": [ + "boost-config", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-pool/CONTROL b/ports/boost-pool/CONTROL deleted file mode 100644 index 95fff6e7d79d61..00000000000000 --- a/ports/boost-pool/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-pool -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/pool -Description: Boost pool module diff --git a/ports/boost-pool/portfile.cmake b/ports/boost-pool/portfile.cmake index 72c3df4e0d3f4a..a2d4d2296f2ceb 100644 --- a/ports/boost-pool/portfile.cmake +++ b/ports/boost-pool/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/pool - REF boost-1.70.0 - SHA512 035a8fb9a0b4f4983a1da755182183ea636da4a87c58c9a9aa0e5b7f52eb4ac72c089cb34ca217a3bb7feb8475d3aafed78a7ab910078c11f4db5740809fe290 + REF boost-1.76.0 + SHA512 df25c5df62471b176699300aac2b8fdfced427ebcf76bf9ef4f17679e5dfd52c25c227e628654de487b3403ecbd64c4a864d1c2ef52d52b58f185c5acbe9588e HEAD_REF master ) diff --git a/ports/boost-pool/vcpkg.json b/ports/boost-pool/vcpkg.json new file mode 100644 index 00000000000000..8cdb410b3f8016 --- /dev/null +++ b/ports/boost-pool/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-pool", + "version": "1.76.0", + "description": "Boost pool module", + "homepage": "https://github.com/boostorg/pool", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-detail", + "boost-integer", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-predef/CONTROL b/ports/boost-predef/CONTROL deleted file mode 100644 index 018f5737c45af2..00000000000000 --- a/ports/boost-predef/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-predef -Version: 1.70.0 -Build-Depends: boost-vcpkg-helpers -Homepage: https://github.com/boostorg/predef -Description: Boost predef module diff --git a/ports/boost-predef/portfile.cmake b/ports/boost-predef/portfile.cmake index 489c5b7c7ecb51..50f64847e149e9 100644 --- a/ports/boost-predef/portfile.cmake +++ b/ports/boost-predef/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/predef - REF boost-1.70.0 - SHA512 2ff61f1beb2745151f64b2d63c0eedd5edad885c9561abde6464c470bc8b79ad5b61c9e949992ebde3ce877db0c24760cedacbdc87e86ca11bf5b0f2ca5fbeb2 + REF boost-1.76.0 + SHA512 89c04eff29e31010072fbe79c8d4ecb3baa0dd48cd8eba8847b836fe6d355a5e1243726156ff7343be11d849096049cdb9420d5238792ea116dbe8e2645f3bf6 HEAD_REF master ) diff --git a/ports/boost-predef/vcpkg.json b/ports/boost-predef/vcpkg.json new file mode 100644 index 00000000000000..2c571dccf6c461 --- /dev/null +++ b/ports/boost-predef/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-predef", + "version": "1.76.0", + "description": "Boost predef module", + "homepage": "https://github.com/boostorg/predef", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-preprocessor/CONTROL b/ports/boost-preprocessor/CONTROL deleted file mode 100644 index 6eacdff96315c2..00000000000000 --- a/ports/boost-preprocessor/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-preprocessor -Version: 1.70.0 -Build-Depends: boost-vcpkg-helpers -Homepage: https://github.com/boostorg/preprocessor -Description: Boost preprocessor module diff --git a/ports/boost-preprocessor/portfile.cmake b/ports/boost-preprocessor/portfile.cmake index 712b4a73b5d26c..b70eb0a1c3afbe 100644 --- a/ports/boost-preprocessor/portfile.cmake +++ b/ports/boost-preprocessor/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/preprocessor - REF boost-1.70.0 - SHA512 e5a0b7995e2be1aade07cfa0543d28cb90ea3704c745adb6db6095332150c588d48260c47990ba38f8d860d2964b87ef023f4958c6b67f9102e8bb877e1de95f + REF boost-1.76.0 + SHA512 f7849c57fe0985ba872e591133fed8adf24bfd337b04847d1a30c5978881a8cc2050ad43b4e9ce0bc32a593bd87c14e9f0433aeb7d0b61a9d05ec3bd9d53c7b7 HEAD_REF master ) diff --git a/ports/boost-preprocessor/vcpkg.json b/ports/boost-preprocessor/vcpkg.json new file mode 100644 index 00000000000000..c92339abe02d29 --- /dev/null +++ b/ports/boost-preprocessor/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-preprocessor", + "version": "1.76.0", + "description": "Boost preprocessor module", + "homepage": "https://github.com/boostorg/preprocessor", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-process/CONTROL b/ports/boost-process/CONTROL deleted file mode 100644 index 36d5b8ca69295a..00000000000000 --- a/ports/boost-process/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-process -Version: 1.70.0 -Build-Depends: boost-algorithm, boost-asio, boost-config, boost-core, boost-filesystem (!uwp), boost-fusion, boost-iterator, boost-move, boost-optional, boost-system, boost-tokenizer, boost-type-index, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/process -Description: Boost process module diff --git a/ports/boost-process/portfile.cmake b/ports/boost-process/portfile.cmake index 353b8d648cb91c..c59feceb935003 100644 --- a/ports/boost-process/portfile.cmake +++ b/ports/boost-process/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/process - REF boost-1.70.0 - SHA512 6265e0705e89ce2a9b3a0df212db76dd309a8bee905249070f0ebc3449207cfc9e30fa6b73dc1de83752c97a95dd214f9e922c87c0a5b03e7df978645620ea62 + REF boost-1.76.0 + SHA512 d704892dee6ca83b4234bea9b267dae7db8d78ee740b037e054ab15051de0e09ea9bb9707be545c3c6d423f4a58259300de563cee54c3c76f632f13ab6bdce21 HEAD_REF master ) diff --git a/ports/boost-process/vcpkg.json b/ports/boost-process/vcpkg.json new file mode 100644 index 00000000000000..580cfbfa6d77d6 --- /dev/null +++ b/ports/boost-process/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "boost-process", + "version": "1.76.0", + "description": "Boost process module", + "homepage": "https://github.com/boostorg/process", + "supports": "!emscripten", + "dependencies": [ + "boost-algorithm", + { + "name": "boost-asio", + "platform": "!emscripten" + }, + "boost-config", + "boost-core", + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + "boost-fusion", + "boost-iterator", + "boost-move", + "boost-optional", + "boost-system", + "boost-tokenizer", + "boost-type-index", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-program-options/CONTROL b/ports/boost-program-options/CONTROL deleted file mode 100644 index 25d37164e01bf1..00000000000000 --- a/ports/boost-program-options/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-program-options -Version: 1.70.0 -Build-Depends: boost-any, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/program_options -Description: Boost program_options module diff --git a/ports/boost-program-options/portfile.cmake b/ports/boost-program-options/portfile.cmake index be596617ee6466..77bc117b6653fc 100644 --- a/ports/boost-program-options/portfile.cmake +++ b/ports/boost-program-options/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/program_options - REF boost-1.70.0 - SHA512 1a7aef92a0f3de1769a1cb4cee86f47d3278c723bc2203d0db96fc3ae6b7b15c47f22e61375e670a4cd40ca74eea32356e5768ca4079926b1e56cba9fcc6ecc5 + REF boost-1.76.0 + SHA512 5cbd02923de60da9b8b4ac232daabc4b3ac8c07f46d8de1a69576c331d1f13951166d4c61649328c68405d7e4d2cb2bf5996521a53c211f5399bd67acb546bce HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-program-options requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-program-options/vcpkg.json b/ports/boost-program-options/vcpkg.json new file mode 100644 index 00000000000000..f4bab0e24d9a28 --- /dev/null +++ b/ports/boost-program-options/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "boost-program-options", + "version": "1.76.0", + "description": "Boost program_options module", + "homepage": "https://github.com/boostorg/program_options", + "dependencies": [ + "boost-any", + "boost-bind", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + "boost-function", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-smart-ptr", + "boost-static-assert", + "boost-throw-exception", + "boost-tokenizer", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-property-map/CONTROL b/ports/boost-property-map/CONTROL deleted file mode 100644 index 9592eee2f807d1..00000000000000 --- a/ports/boost-property-map/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-property-map -Version: 1.70.0 -Build-Depends: boost-any, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-multi-index, boost-optional, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/property_map -Description: Boost property_map module diff --git a/ports/boost-property-map/portfile.cmake b/ports/boost-property-map/portfile.cmake index 4200bb4d679a2b..c3e8e212730b1c 100644 --- a/ports/boost-property-map/portfile.cmake +++ b/ports/boost-property-map/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/property_map - REF boost-1.70.0 - SHA512 b4c9ab834ce9c3f09105e5814734fb16f2f4061331427904c04dbcac64ac91ea76c2edb3d63e036c5ea3dac699c1da247cbe8861380020373cc64eada9491990 + REF boost-1.76.0 + SHA512 aa9778cc00a11af811a8163ab1530b92d23ded36b48b1fa3edfeef0926530c9318be93da0c3e5c13691a841c288d5189145d89d4f1d321884dc1f0a84fc2feba HEAD_REF master ) diff --git a/ports/boost-property-map/vcpkg.json b/ports/boost-property-map/vcpkg.json new file mode 100644 index 00000000000000..d9960f408719fe --- /dev/null +++ b/ports/boost-property-map/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "boost-property-map", + "version": "1.76.0", + "description": "Boost property_map module", + "homepage": "https://github.com/boostorg/property_map", + "dependencies": [ + "boost-any", + "boost-assert", + "boost-bind", + "boost-concept-check", + "boost-config", + "boost-core", + "boost-function", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + "boost-mpl", + "boost-multi-index", + "boost-optional", + "boost-serialization", + "boost-smart-ptr", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-property-tree/CONTROL b/ports/boost-property-tree/CONTROL deleted file mode 100644 index f896ed5cdb5d47..00000000000000 --- a/ports/boost-property-tree/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-property-tree -Version: 1.70.0 -Build-Depends: boost-any, boost-assert, boost-bind, boost-compatibility, boost-config, boost-core, boost-format, boost-iterator, boost-mpl, boost-multi-index, boost-optional, boost-range, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/property_tree -Description: Boost property_tree module diff --git a/ports/boost-property-tree/portfile.cmake b/ports/boost-property-tree/portfile.cmake index ea8432c7ba6ea0..dd20b347b53560 100644 --- a/ports/boost-property-tree/portfile.cmake +++ b/ports/boost-property-tree/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/property_tree - REF boost-1.70.0 - SHA512 872aa8e7869048b04bc3714b3a50f13aa17c90733d22ca7585c4c0fe237c922a72018023a5a9d6ce6a9ea00c0dbd5cd88d3115f02d39a8b5ed3e110e2c7a03d5 + REF boost-1.76.0 + SHA512 bd138f9ead12144b2975cf961d9820d6df4729491c259123b15f49f85c54b0391093874a5f825fbc9fce6d67746cef0a0bde893b448d0e07489abec67aa1eee1 HEAD_REF master ) diff --git a/ports/boost-property-tree/vcpkg.json b/ports/boost-property-tree/vcpkg.json new file mode 100644 index 00000000000000..c01c411e2b19a8 --- /dev/null +++ b/ports/boost-property-tree/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "boost-property-tree", + "version": "1.76.0", + "description": "Boost property_tree module", + "homepage": "https://github.com/boostorg/property_tree", + "dependencies": [ + "boost-any", + "boost-assert", + "boost-bind", + "boost-config", + "boost-core", + "boost-format", + "boost-iterator", + "boost-mpl", + "boost-multi-index", + "boost-optional", + "boost-range", + "boost-serialization", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-proto/CONTROL b/ports/boost-proto/CONTROL deleted file mode 100644 index 6f16038c2ad1f9..00000000000000 --- a/ports/boost-proto/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-proto -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-fusion, boost-mpl, boost-preprocessor, boost-range, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/proto -Description: Boost proto module diff --git a/ports/boost-proto/portfile.cmake b/ports/boost-proto/portfile.cmake index 1d6a0594b8740e..e643b8bb4a7347 100644 --- a/ports/boost-proto/portfile.cmake +++ b/ports/boost-proto/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/proto - REF boost-1.70.0 - SHA512 63976484ce6895818715d4fa0073e526fca654a42a0353c1af66928faefb3764b0ec644f7876f38188ed7425cc3b75cb155cd75f1241fb2bb33938bb964a3ebf + REF boost-1.76.0 + SHA512 0acca1fe1e0d41f919fd721a60dedcba9c88fc490a37012cdda617272caac036a2f1686bbf8cc380b3989cee4e3cfce9fed4ebe3242ef9b7394b944212ba545d HEAD_REF master ) diff --git a/ports/boost-proto/vcpkg.json b/ports/boost-proto/vcpkg.json new file mode 100644 index 00000000000000..9adf4165390def --- /dev/null +++ b/ports/boost-proto/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "boost-proto", + "version": "1.76.0", + "description": "Boost proto module", + "homepage": "https://github.com/boostorg/proto", + "dependencies": [ + "boost-config", + "boost-core", + "boost-detail", + "boost-fusion", + "boost-mpl", + "boost-preprocessor", + "boost-range", + "boost-static-assert", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-ptr-container/CONTROL b/ports/boost-ptr-container/CONTROL deleted file mode 100644 index 573dd2cedbce96..00000000000000 --- a/ports/boost-ptr-container/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-ptr-container -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/ptr_container -Description: Boost ptr_container module diff --git a/ports/boost-ptr-container/portfile.cmake b/ports/boost-ptr-container/portfile.cmake index b61514cc87d962..da341f87842a19 100644 --- a/ports/boost-ptr-container/portfile.cmake +++ b/ports/boost-ptr-container/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/ptr_container - REF boost-1.70.0 - SHA512 b61e6b8d52d33d783163d8cad1aaaa1b092fc74b5022de235ab01fadab119c9ffb09f0d6a43f9154997b5cc12f60379a50e70d4ac65319eea965c6c6fea322a9 + REF boost-1.76.0 + SHA512 11a08ff378e0e70f18a79ded47c339eee9e1bf4fb7bd7ea5283f9d7b888112904453d8e6e3970993706f3d90069bd765bf848ec9a8b8edb0595f5b40f19ce1d8 HEAD_REF master ) diff --git a/ports/boost-ptr-container/vcpkg.json b/ports/boost-ptr-container/vcpkg.json new file mode 100644 index 00000000000000..1edc6dfe2fb379 --- /dev/null +++ b/ports/boost-ptr-container/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "boost-ptr-container", + "version": "1.76.0", + "description": "Boost ptr_container module", + "homepage": "https://github.com/boostorg/ptr_container", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-circular-buffer", + "boost-config", + "boost-core", + "boost-iterator", + "boost-mpl", + "boost-range", + "boost-serialization", + "boost-smart-ptr", + "boost-static-assert", + "boost-type-traits", + "boost-unordered", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-python/CONTROL b/ports/boost-python/CONTROL deleted file mode 100644 index 2dc872ec0997ac..00000000000000 --- a/ports/boost-python/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-python -Version: 1.70.0-1 -Build-Depends: boost-bind, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, python3 -Homepage: https://github.com/boostorg/python -Description: Boost python module diff --git a/ports/boost-python/b2-options.cmake b/ports/boost-python/b2-options.cmake new file mode 100644 index 00000000000000..3713424ed64706 --- /dev/null +++ b/ports/boost-python/b2-options.cmake @@ -0,0 +1,28 @@ +set(BUILD_PYTHON_VERSIONS) + +if("python2" IN_LIST FEATURES) + # Find Python2 libraries. Can't use find_package here, but we already know where everything is + file(GLOB VCPKG_PYTHON2_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python2.*") + set(VCPKG_PYTHON2_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") + set(VCPKG_PYTHON2_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") + string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON2_VERSION "${VCPKG_PYTHON2_INCLUDE}") + list(APPEND BUILD_PYTHON_VERSIONS "${VCPKG_PYTHON2_VERSION}") +endif() + +# Find Python3 libraries. Can't use find_package here, but we already know where everything is +file(GLOB VCPKG_PYTHON3_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python3.*") +set(VCPKG_PYTHON3_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") +set(VCPKG_PYTHON3_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") +string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON3_VERSION "${VCPKG_PYTHON3_INCLUDE}") +list(APPEND BUILD_PYTHON_VERSIONS "${VCPKG_PYTHON3_VERSION}") + +string(REPLACE ";" "," BUILD_PYTHON_VERSIONS "${BUILD_PYTHON_VERSIONS}") + +list(APPEND B2_OPTIONS + python=${BUILD_PYTHON_VERSIONS} +) +if(VCPKG_CXX_FLAGS_DEBUG MATCHES "BOOST_DEBUG_PYTHON") + list(APPEND B2_OPTIONS_DBG + python-debugging=on + ) +endif() diff --git a/ports/boost-python/portfile.cmake b/ports/boost-python/portfile.cmake index 912926d612acbb..097f770f2073e4 100644 --- a/ports/boost-python/portfile.cmake +++ b/ports/boost-python/portfile.cmake @@ -1,22 +1,20 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/python - REF boost-1.70.0 - SHA512 0e540f68713460c64f195f56af1cbd00ae4fa98adc91a83a0c1fdb7e60950cf282cab02b772f06e7c268c3cd294566d6abfa1d1aa545c687a256d6863870f72d + REF boost-1.76.0 + SHA512 ab2d99f752dced241045c597408d3a76f78c800717752dc091510542a754fb86140359fdab81b57ff8405d05a1814083c3ddfa032b0d692cc40c3af4af496e91 HEAD_REF master - PATCHES unwind-type.patch ) -# Find Python. Can't use find_package here, but we already know where everything is -file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") -set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") -set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") -string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}") -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) -boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-python requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-python/unwind-type.patch b/ports/boost-python/unwind-type.patch deleted file mode 100644 index 62e9c8185ba8b8..00000000000000 --- a/ports/boost-python/unwind-type.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/include/boost/python/detail/unwind_type.hpp b/include/boost/python/detail/unwind_type.hpp -index f6cdab6..da9633b 100644 ---- a/include/boost/python/detail/unwind_type.hpp -+++ b/include/boost/python/detail/unwind_type.hpp -@@ -11,7 +11,7 @@ - - namespace boost { namespace python { namespace detail { - --#ifndef _MSC_VER //if forward declared, msvc6.5 does not recognize them as inline -+#if !defined(_MSC_VER) || _MSC_VER >= 1915 //if forward declared, msvc6.5 does not recognize them as inline - // forward declaration, required (at least) by Tru64 cxx V6.5-042 - template - inline typename Generator::result_type -@@ -83,7 +83,7 @@ struct unwind_helper - - template - inline typename Generator::result_type --#ifndef _MSC_VER -+#if !defined(_MSC_VER) || _MSC_VER >= 1915 - unwind_type(U const& p, Generator*) - #else - unwind_type(U const& p, Generator* = 0) -@@ -148,7 +148,7 @@ struct unwind_helper2 - // why bother? - template - inline typename Generator::result_type --#ifndef _MSC_VER -+#if !defined(_MSC_VER) || _MSC_VER >= 1915 - unwind_type(boost::type*, Generator*) - #else - unwind_type(boost::type*p =0, Generator* =0) diff --git a/ports/boost-python/vcpkg.json b/ports/boost-python/vcpkg.json new file mode 100644 index 00000000000000..754db2e9cfff3d --- /dev/null +++ b/ports/boost-python/vcpkg.json @@ -0,0 +1,49 @@ +{ + "name": "boost-python", + "version": "1.76.0", + "port-version": 1, + "description": "Boost python module", + "homepage": "https://github.com/boostorg/python", + "supports": "!uwp & !(arm & windows) & !emscripten", + "dependencies": [ + "boost-bind", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-conversion", + "boost-core", + "boost-detail", + "boost-foreach", + "boost-function", + "boost-graph", + "boost-integer", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-mpl", + "boost-numeric-conversion", + "boost-preprocessor", + "boost-property-map", + "boost-smart-ptr", + "boost-static-assert", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers", + "python3" + ], + "features": { + "python2": { + "description": "Build with Python2 support", + "dependencies": [ + "python2" + ] + } + } +} diff --git a/ports/boost-qvm/CONTROL b/ports/boost-qvm/CONTROL deleted file mode 100644 index 0cdc846b474f26..00000000000000 --- a/ports/boost-qvm/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-qvm -Version: 1.70.0 -Build-Depends: boost-assert, boost-exception, boost-static-assert, boost-throw-exception, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/qvm -Description: Boost qvm module diff --git a/ports/boost-qvm/portfile.cmake b/ports/boost-qvm/portfile.cmake index a677cde90b51e4..eaf65eb1f2f9dc 100644 --- a/ports/boost-qvm/portfile.cmake +++ b/ports/boost-qvm/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/qvm - REF boost-1.70.0 - SHA512 ea777d15e35dc22057e6b3a6b95204bade5592ded3175a0462c497cfd2e204dcbbb564ab5d8b99adf38bdfd4f41ce0443af9cc82f863d1977068222880ef5aab + REF boost-1.76.0 + SHA512 98fc06a38ca220e53383295b0dae966272871e2d99ef23e2fb14790722ce36d75de158ef6d34bc44e99ee8692e33cae69762d2f058e88059e625574012e336ce HEAD_REF master ) diff --git a/ports/boost-qvm/vcpkg.json b/ports/boost-qvm/vcpkg.json new file mode 100644 index 00000000000000..9ead8ef80be78b --- /dev/null +++ b/ports/boost-qvm/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-qvm", + "version": "1.76.0", + "description": "Boost qvm module", + "homepage": "https://github.com/boostorg/qvm", + "dependencies": [ + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-random/CONTROL b/ports/boost-random/CONTROL deleted file mode 100644 index a76d33a7b992f5..00000000000000 --- a/ports/boost-random/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-random -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-dynamic-bitset, boost-integer, boost-io, boost-math, boost-modular-build-helper, boost-mpl, boost-multiprecision, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/random -Description: Boost random module diff --git a/ports/boost-random/portfile.cmake b/ports/boost-random/portfile.cmake index 9c426b5ef2aa50..1786248e6bdb6a 100644 --- a/ports/boost-random/portfile.cmake +++ b/ports/boost-random/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/random - REF boost-1.70.0 - SHA512 887c12de1235dd9ba5a211a23f6da6def14b0100060f94855ac187528a90cbeaf9202298476380ce436634b573f755820e32350f3af2436dddc14f94744c49d2 + REF boost-1.76.0 + SHA512 d34405b2b5d9e4de201b07d97a2440dbc49f54eba6e1f13f37a50f453d2e09ca7e0a0c2559706eab7f57651219325d2606cd29e91bff0710af269976504abb73 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-random requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-random/vcpkg.json b/ports/boost-random/vcpkg.json new file mode 100644 index 00000000000000..4f40f9d6c1798c --- /dev/null +++ b/ports/boost-random/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "boost-random", + "version": "1.76.0", + "description": "Boost random module", + "homepage": "https://github.com/boostorg/random", + "dependencies": [ + "boost-array", + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + "boost-dynamic-bitset", + "boost-integer", + "boost-io", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-range", + "boost-static-assert", + "boost-system", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-range/CONTROL b/ports/boost-range/CONTROL deleted file mode 100644 index bfb40f155654a4..00000000000000 --- a/ports/boost-range/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-range -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-concept-check, boost-config, boost-container-hash, boost-core, boost-detail, boost-integer, boost-iterator, boost-mpl, boost-optional, boost-preprocessor, boost-regex, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/range -Description: Boost range module diff --git a/ports/boost-range/portfile.cmake b/ports/boost-range/portfile.cmake index 5c6334c213ff78..aa78a1ae6c47b2 100644 --- a/ports/boost-range/portfile.cmake +++ b/ports/boost-range/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/range - REF boost-1.70.0 - SHA512 f6945ca391a577f6265d651cbcfd183e544b42db37a7fa21899f457c1ca94045865ce71ab9e0171a9aee3451575c18668b609da892d7676f2d9321e5db979371 + REF boost-1.76.0 + SHA512 dc7801aad1bb271c28d9a0ec6e132b5b6992d4638b90c007e392148903acb27ef9bfe1273d00db181416e0325beb756eac26f458a360740889c521b8f5424fb4 HEAD_REF master ) diff --git a/ports/boost-range/vcpkg.json b/ports/boost-range/vcpkg.json new file mode 100644 index 00000000000000..b17779eed83b05 --- /dev/null +++ b/ports/boost-range/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "boost-range", + "version": "1.76.0", + "description": "Boost range module", + "homepage": "https://github.com/boostorg/range", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-concept-check", + "boost-config", + "boost-container-hash", + "boost-conversion", + "boost-core", + "boost-detail", + "boost-iterator", + "boost-mpl", + "boost-numeric-conversion", + "boost-optional", + "boost-preprocessor", + "boost-regex", + "boost-static-assert", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-ratio/CONTROL b/ports/boost-ratio/CONTROL deleted file mode 100644 index ac2e082145f0b1..00000000000000 --- a/ports/boost-ratio/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-ratio -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-integer, boost-mpl, boost-rational, boost-static-assert, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/ratio -Description: Boost ratio module diff --git a/ports/boost-ratio/portfile.cmake b/ports/boost-ratio/portfile.cmake index 900a861bd6eab2..9c87047e74118c 100644 --- a/ports/boost-ratio/portfile.cmake +++ b/ports/boost-ratio/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/ratio - REF boost-1.70.0 - SHA512 0952107943f975644a81c2bf70c0a4c2580138a373d765ec9c037c33345436e210cc7f8f24fa2ddf0fe30cf7b25a592b8a62dc09ce95cd2326fef2647f355575 + REF boost-1.76.0 + SHA512 514fa35a91604ff823ee6c4736a5e5d6059ba445466884e2e58c38f6daba6e36c18f4071ca928bbc338036e67435d210d130822b122e029a3440c409507df201 HEAD_REF master ) diff --git a/ports/boost-ratio/vcpkg.json b/ports/boost-ratio/vcpkg.json new file mode 100644 index 00000000000000..e3f71c4a6a432f --- /dev/null +++ b/ports/boost-ratio/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-ratio", + "version": "1.76.0", + "description": "Boost ratio module", + "homepage": "https://github.com/boostorg/ratio", + "dependencies": [ + "boost-config", + "boost-core", + "boost-integer", + "boost-mpl", + "boost-rational", + "boost-static-assert", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-rational/CONTROL b/ports/boost-rational/CONTROL deleted file mode 100644 index 9ec2449965d072..00000000000000 --- a/ports/boost-rational/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-rational -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-integer, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/rational -Description: Boost rational module diff --git a/ports/boost-rational/portfile.cmake b/ports/boost-rational/portfile.cmake index fcb7f7027f71f2..61cf338a57ccc5 100644 --- a/ports/boost-rational/portfile.cmake +++ b/ports/boost-rational/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/rational - REF boost-1.70.0 - SHA512 b2b36bff63247d3456f4c0d298ea04eb285a283eed6278e71365b3b97c673e122e52608f143ec4fdcdb77d5bbda48326ce8785843f5458192054236330576a50 + REF boost-1.76.0 + SHA512 399c1f49a73701f6db9304ac476f88af50470d96d400a68695ed3b3f8462622b4dde671053c6b3fcdd6474e5c2e7527946b79a5ea378af77337eee3b0ed16680 HEAD_REF master ) diff --git a/ports/boost-rational/vcpkg.json b/ports/boost-rational/vcpkg.json new file mode 100644 index 00000000000000..b3d2a6091ef377 --- /dev/null +++ b/ports/boost-rational/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-rational", + "version": "1.76.0", + "description": "Boost rational module", + "homepage": "https://github.com/boostorg/rational", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-integer", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-regex/CONTROL b/ports/boost-regex/CONTROL deleted file mode 100644 index c5f323543e6778..00000000000000 --- a/ports/boost-regex/CONTROL +++ /dev/null @@ -1,10 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-regex -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-container-hash, boost-core, boost-detail, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-predef, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/regex -Description: Boost regex module - -Feature: icu -Description: ICU backend for Boost.Regex -Build-Depends: icu diff --git a/ports/boost-regex/b2-options.cmake b/ports/boost-regex/b2-options.cmake new file mode 100644 index 00000000000000..ecbbcf974b8d2a --- /dev/null +++ b/ports/boost-regex/b2-options.cmake @@ -0,0 +1,6 @@ +if("icu" IN_LIST FEATURES) + set(B2_REQUIREMENTS "/user-config//icuuc /user-config//icudt /user-config//icuin BOOST_HAS_ICU=1") + if(APPLE) + list(APPEND B2_OPTIONS cxxstd=11) + endif() +endif() diff --git a/ports/boost-regex/portfile.cmake b/ports/boost-regex/portfile.cmake index 54cb58dd53d8b6..e5c7381147b112 100644 --- a/ports/boost-regex/portfile.cmake +++ b/ports/boost-regex/portfile.cmake @@ -1,22 +1,20 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/regex - REF boost-1.70.0 - SHA512 691608b794a8ed293afe8d7d31fc6cf0ddebd3c850467c33e7572f1a22080b1407aa1c157631abd6e9a3eea0b8c9d6ef477dde1e39e8859d8d8fdd73b98fb301 + REF boost-1.76.0 + SHA512 03af2b4ced7e09c3cf14fe9d7befed41e2be1f6e999445d2c376f0a6fcf82fa29ee39d6bdab976d76281a388466d39e71cb9ea069bc8df079137427d4576e264 HEAD_REF master ) -if("icu" IN_LIST FEATURES) - set(REQUIREMENTS "/user-config//icuuc /user-config//icudt /user-config//icuin BOOST_HAS_ICU=1") -else() - set(REQUIREMENTS) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-regex requires a newer version of vcpkg in order to build.") endif() - -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) -boost_modular_build(SOURCE_PATH ${SOURCE_PATH} REQUIREMENTS "${REQUIREMENTS}") +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-regex/vcpkg.json b/ports/boost-regex/vcpkg.json new file mode 100644 index 00000000000000..96f3069106e911 --- /dev/null +++ b/ports/boost-regex/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "boost-regex", + "version": "1.76.0", + "description": "Boost regex module", + "homepage": "https://github.com/boostorg/regex", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-concept-check", + "boost-config", + "boost-container-hash", + "boost-core", + "boost-detail", + "boost-integer", + "boost-iterator", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-mpl", + "boost-predef", + "boost-smart-ptr", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ], + "features": { + "icu": { + "description": "ICU backend for Boost.Regex", + "dependencies": [ + "icu" + ] + } + } +} diff --git a/ports/boost-safe-numerics/CONTROL b/ports/boost-safe-numerics/CONTROL deleted file mode 100644 index 00e9cd75474c85..00000000000000 --- a/ports/boost-safe-numerics/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-safe-numerics -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-integer, boost-logic, boost-mp11, boost-vcpkg-helpers -Description: Boost safe_numerics module diff --git a/ports/boost-safe-numerics/portfile.cmake b/ports/boost-safe-numerics/portfile.cmake index 506b5f40b55cad..0994a9ba594f8a 100644 --- a/ports/boost-safe-numerics/portfile.cmake +++ b/ports/boost-safe-numerics/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/safe_numerics - REF boost-1.70.0 - SHA512 b5babfddc56f404602a5c071cef5505d534e1503ab08e9b6acc8e6fe4ebc87b9ae4db71d9c71cc3dcc739d17eea81ac0fe639f442db347e219be1acf39e6c2ef + REF boost-1.76.0 + SHA512 450b69bbd03713189d8ea0e309ffa3e397d832ef0422862b67a8bca9d4615698cc3380a19cdb7b97f53c32ceb7afd18f258f0be7552a5641bf83351ac41b3973 HEAD_REF master ) diff --git a/ports/boost-safe-numerics/vcpkg.json b/ports/boost-safe-numerics/vcpkg.json new file mode 100644 index 00000000000000..bbe3943bebc256 --- /dev/null +++ b/ports/boost-safe-numerics/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "boost-safe-numerics", + "version": "1.76.0", + "description": "Boost safe_numerics module", + "homepage": "https://github.com/boostorg/safe_numerics", + "dependencies": [ + "boost-concept-check", + "boost-config", + "boost-core", + "boost-integer", + "boost-logic", + "boost-mp11", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-scope-exit/CONTROL b/ports/boost-scope-exit/CONTROL deleted file mode 100644 index 0d088b73c21f11..00000000000000 --- a/ports/boost-scope-exit/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-scope-exit -Version: 1.70.0 -Build-Depends: boost-config, boost-detail, boost-function, boost-preprocessor, boost-typeof, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/scope_exit -Description: Boost scope_exit module diff --git a/ports/boost-scope-exit/portfile.cmake b/ports/boost-scope-exit/portfile.cmake index 46584e7814e1e8..cf95910f72e856 100644 --- a/ports/boost-scope-exit/portfile.cmake +++ b/ports/boost-scope-exit/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/scope_exit - REF boost-1.70.0 - SHA512 e75c746d0829bedf336acb1b4b36c8f2e75cdb650e8f0c18c3a1b3298e81efde643be941bf27cdb3855e9ecc1c6cd15e484c2e54529828ac1fd3b17df7f616c4 + REF boost-1.76.0 + SHA512 addc6040749187ca5c6d22d9c33ef839422658f80588841b2c722c508049e04c6b41a228c739066438c9562ffc1c35cc2ec3f3e4ea5b2443fdef532e5708d08f HEAD_REF master ) diff --git a/ports/boost-scope-exit/vcpkg.json b/ports/boost-scope-exit/vcpkg.json new file mode 100644 index 00000000000000..7f0b9400c711ad --- /dev/null +++ b/ports/boost-scope-exit/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "boost-scope-exit", + "version": "1.76.0", + "description": "Boost scope_exit module", + "homepage": "https://github.com/boostorg/scope_exit", + "dependencies": [ + "boost-config", + "boost-detail", + "boost-function", + "boost-preprocessor", + "boost-type-traits", + "boost-typeof", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-serialization/CONTROL b/ports/boost-serialization/CONTROL deleted file mode 100644 index 4d24cae11790cc..00000000000000 --- a/ports/boost-serialization/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-serialization -Version: 1.70.0 -Build-Depends: boost-array, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/serialization -Description: Boost serialization module diff --git a/ports/boost-serialization/portfile.cmake b/ports/boost-serialization/portfile.cmake index c1545ef1cef792..c0ffebaef8ed52 100644 --- a/ports/boost-serialization/portfile.cmake +++ b/ports/boost-serialization/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/serialization - REF boost-1.70.0 - SHA512 1df374bb3acfffde289d919941302ef988096d59745805ab118d2a31f628ef2fc3aa778bfe1f6434c75ce1db777805c8c092febbec9cb2080e0ed13d05d22156 + REF boost-1.76.0 + SHA512 ac9a0453f6244518a250c3d51f341b001618f2032b723467ad7a93aaf77a66d970d22b4a06072e98d4fc30b1b850c3cb9a7c7e3b46d6e4ea1adb2d9b55ff4b68 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-serialization requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-serialization/vcpkg.json b/ports/boost-serialization/vcpkg.json new file mode 100644 index 00000000000000..172efc1629264e --- /dev/null +++ b/ports/boost-serialization/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "boost-serialization", + "version": "1.76.0", + "description": "Boost serialization module", + "homepage": "https://github.com/boostorg/serialization", + "dependencies": [ + "boost-array", + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + "boost-function", + "boost-integer", + "boost-io", + "boost-iterator", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-move", + "boost-mpl", + "boost-optional", + "boost-predef", + "boost-preprocessor", + "boost-smart-ptr", + "boost-spirit", + "boost-static-assert", + "boost-type-traits", + "boost-unordered", + "boost-utility", + "boost-variant", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-signals/CONTROL b/ports/boost-signals/CONTROL deleted file mode 100644 index 5b58c978c09e90..00000000000000 --- a/ports/boost-signals/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-signals -Version: 1.68.0 -Build-Depends: boost-any, boost-build, boost-config, boost-core, boost-function, boost-iterator, boost-modular-build-helper, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/signals -Description: Boost signals module diff --git a/ports/boost-signals/portfile.cmake b/ports/boost-signals/portfile.cmake deleted file mode 100644 index a5df93cddc4fb3..00000000000000 --- a/ports/boost-signals/portfile.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO boostorg/signals - REF boost-1.68.0 - SHA512 3d5a26de28050e03779a26f6af5f96bdab0023d6be3047be9652a660c607e7839b46b3abb257ec5b1791e2e4dc5cbcbefe433244ddc6140ee64ae531b2c0b01d - HEAD_REF master -) - -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) -boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) -boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-signals2/CONTROL b/ports/boost-signals2/CONTROL deleted file mode 100644 index d4b23677801cf9..00000000000000 --- a/ports/boost-signals2/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-signals2 -Version: 1.70.0 -Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/signals2 -Description: Boost signals2 module diff --git a/ports/boost-signals2/portfile.cmake b/ports/boost-signals2/portfile.cmake index 4be1b4f89bea1b..f65973dd6784f3 100644 --- a/ports/boost-signals2/portfile.cmake +++ b/ports/boost-signals2/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/signals2 - REF boost-1.70.0 - SHA512 4b8db8941f70a3092992da11c7056916017f76d13c6445d3af4abe5f46dca7d8f3dc5d69e669cad607295b40ec387f65a54464166761a3e7503c841eb8f1aeac + REF boost-1.76.0 + SHA512 d298a325c35dc0eda9614b6e8a4e84e7ef240e83e2b5938bc521ac99e5095c13b7a4e6a48b1b30bf1c038dd4c3e43d23dd85c14473da942cf65c5723fbb1c954 HEAD_REF master ) diff --git a/ports/boost-signals2/vcpkg.json b/ports/boost-signals2/vcpkg.json new file mode 100644 index 00000000000000..caebbac00cca80 --- /dev/null +++ b/ports/boost-signals2/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "boost-signals2", + "version": "1.76.0", + "description": "Boost signals2 module", + "homepage": "https://github.com/boostorg/signals2", + "dependencies": [ + "boost-assert", + "boost-bind", + "boost-config", + "boost-core", + "boost-detail", + "boost-function", + "boost-iterator", + "boost-mpl", + "boost-optional", + "boost-parameter", + "boost-predef", + "boost-preprocessor", + "boost-smart-ptr", + "boost-throw-exception", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-variant", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-smart-ptr/CONTROL b/ports/boost-smart-ptr/CONTROL deleted file mode 100644 index dab71c99eb6bda..00000000000000 --- a/ports/boost-smart-ptr/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-smart-ptr -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-integer, boost-move, boost-predef, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/smart_ptr -Description: Boost smart_ptr module diff --git a/ports/boost-smart-ptr/portfile.cmake b/ports/boost-smart-ptr/portfile.cmake index 26b10dc1051869..83120dd9896b84 100644 --- a/ports/boost-smart-ptr/portfile.cmake +++ b/ports/boost-smart-ptr/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/smart_ptr - REF boost-1.70.0 - SHA512 c8b25aea25a01b96783ce5f2a9ce066cc2894b236b6f82e45a80913f67a37d113f3ffc0a5bbfa601e951b0a4dde8b12fb69dc7b07e551a206e28e48f6a4bd89c + REF boost-1.76.0 + SHA512 e6ac81d1da13daf080d67f046fae19e98ef4f1eeb17b65743b8ff52e4a28b15152b6fdf083662f9a2555694a93064f78fd0ec432bfe09d617d13fa7422e7f28b HEAD_REF master ) diff --git a/ports/boost-smart-ptr/vcpkg.json b/ports/boost-smart-ptr/vcpkg.json new file mode 100644 index 00000000000000..c50e9a2e6cb631 --- /dev/null +++ b/ports/boost-smart-ptr/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-smart-ptr", + "version": "1.76.0", + "description": "Boost smart_ptr module", + "homepage": "https://github.com/boostorg/smart_ptr", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-move", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-sort/CONTROL b/ports/boost-sort/CONTROL deleted file mode 100644 index db9a38674b4990..00000000000000 --- a/ports/boost-sort/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-sort -Version: 1.70.0 -Build-Depends: boost-integer, boost-range, boost-serialization, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/sort -Description: Boost sort module diff --git a/ports/boost-sort/portfile.cmake b/ports/boost-sort/portfile.cmake index 759291d6212dd6..08925d5f70eff5 100644 --- a/ports/boost-sort/portfile.cmake +++ b/ports/boost-sort/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/sort - REF boost-1.70.0 - SHA512 c9665e63eea1ec58d0fd664710b42161613efcd7f4123b94a829f38d7e0fe6309687c5c188ffcbd4986803992b119d1a00d759b2cd0e62a1ce76295510fe605e + REF boost-1.76.0 + SHA512 71fd8a9b5ccf29d5971bdb2b58288555a6a63c12b5463dcd0e11fc7132f0c620a77fde4492005204e8ef4a9084a9ecb29f6c9ad8e325227e491a99ba033f2080 HEAD_REF master ) diff --git a/ports/boost-sort/vcpkg.json b/ports/boost-sort/vcpkg.json new file mode 100644 index 00000000000000..ec6278f4915b07 --- /dev/null +++ b/ports/boost-sort/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "boost-sort", + "version": "1.76.0", + "description": "Boost sort module", + "homepage": "https://github.com/boostorg/sort", + "dependencies": [ + "boost-config", + "boost-range", + "boost-static-assert", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-spirit/CONTROL b/ports/boost-spirit/CONTROL deleted file mode 100644 index 89644cb6184bf5..00000000000000 --- a/ports/boost-spirit/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-spirit -Version: 1.70.0 -Build-Depends: boost-algorithm, boost-array, boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-endian, boost-filesystem (!uwp), boost-foreach, boost-function, boost-function-types, boost-fusion, boost-integer, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-move, boost-mpl, boost-optional, boost-phoenix, boost-pool, boost-predef, boost-preprocessor, boost-proto, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-thread (!arm), boost-throw-exception, boost-tti, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/spirit -Description: Boost spirit module diff --git a/ports/boost-spirit/portfile.cmake b/ports/boost-spirit/portfile.cmake index 4c7e202742e74d..829172d4836448 100644 --- a/ports/boost-spirit/portfile.cmake +++ b/ports/boost-spirit/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/spirit - REF boost-1.70.0 - SHA512 333e675b2742c55071d517e8dee0251d36b75ad4a11a70b48c74d060899710eb10e38afd20e9d40f28a041c792000c43c11208abad676ff923ca6d4866170a78 + REF boost-1.76.0 + SHA512 0ef312d514fac39636c9f7f1aff1746592eaf69be820d488503a99ce28530e2c987f7102f7d2928f31a263de5e1053500a29ec512684fac3489d0bc48a44cfa2 HEAD_REF master ) diff --git a/ports/boost-spirit/vcpkg.json b/ports/boost-spirit/vcpkg.json new file mode 100644 index 00000000000000..3ba81888f24125 --- /dev/null +++ b/ports/boost-spirit/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "boost-spirit", + "version": "1.76.0", + "description": "Boost spirit module", + "homepage": "https://github.com/boostorg/spirit", + "dependencies": [ + "boost-array", + "boost-assert", + "boost-config", + "boost-core", + "boost-detail", + "boost-endian", + "boost-foreach", + "boost-function", + "boost-function-types", + "boost-fusion", + "boost-integer", + "boost-io", + "boost-iterator", + "boost-move", + "boost-mpl", + "boost-optional", + "boost-phoenix", + "boost-pool", + "boost-preprocessor", + "boost-proto", + "boost-range", + "boost-regex", + "boost-smart-ptr", + "boost-static-assert", + "boost-thread", + "boost-throw-exception", + "boost-type-traits", + "boost-typeof", + "boost-unordered", + "boost-utility", + "boost-variant", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-stacktrace/CONTROL b/ports/boost-stacktrace/CONTROL deleted file mode 100644 index d1b709934b4ccb..00000000000000 --- a/ports/boost-stacktrace/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-stacktrace -Version: 1.70.0 -Build-Depends: boost-array, boost-build, boost-config, boost-container-hash, boost-core, boost-modular-build-helper, boost-predef, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/stacktrace -Description: Boost stacktrace module diff --git a/ports/boost-stacktrace/portfile.cmake b/ports/boost-stacktrace/portfile.cmake index 5efef9a4b49fd1..ccc0d595894e78 100644 --- a/ports/boost-stacktrace/portfile.cmake +++ b/ports/boost-stacktrace/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/stacktrace - REF boost-1.70.0 - SHA512 154c9caf3ff24f2a5f1d0af1dd5fcbc5b0b59039b30b495dd788086d731530ea724da496f639d995b700cb0a0c8ef0b9d03b63271386e2fe9bc935ef373d1fa7 + REF boost-1.76.0 + SHA512 4a3ea0279fd41f19755ea6f90d7bb0b271d1e6c43c6e631acd17104a200bd425b9dd58a9cfcd7b1b1203e86c5a9216507d8e033f125bd582c5b68564a2a8200f HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-stacktrace requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-stacktrace/vcpkg.json b/ports/boost-stacktrace/vcpkg.json new file mode 100644 index 00000000000000..ff1b17488b2c08 --- /dev/null +++ b/ports/boost-stacktrace/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "boost-stacktrace", + "version": "1.76.0", + "description": "Boost stacktrace module", + "homepage": "https://github.com/boostorg/stacktrace", + "supports": "!uwp", + "dependencies": [ + "boost-array", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-container-hash", + "boost-core", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-predef", + "boost-static-assert", + "boost-type-traits", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-statechart/CONTROL b/ports/boost-statechart/CONTROL deleted file mode 100644 index 242256a8c66199..00000000000000 --- a/ports/boost-statechart/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-statechart -Version: 1.70.0 -Build-Depends: boost-assert, boost-bind, boost-config, boost-conversion, boost-core, boost-detail, boost-function, boost-mpl, boost-smart-ptr, boost-static-assert, boost-thread (!arm), boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/statechart -Description: Boost statechart module diff --git a/ports/boost-statechart/portfile.cmake b/ports/boost-statechart/portfile.cmake index 47b354ea476a2f..d1271b2dd5937c 100644 --- a/ports/boost-statechart/portfile.cmake +++ b/ports/boost-statechart/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/statechart - REF boost-1.70.0 - SHA512 4a19b927898427c696afe3f9ae8ab7845e34075976d41d6d3845a3e4ccf17d16e3b9d1057400022d131b4f0258aeea230fc24c80f2ec55cc72e44b9573280753 + REF boost-1.76.0 + SHA512 3b9476d1b59ecaf867c19f106c4e6ff9e66c5b26f9793256a52b8dc47c26ca63dfd67dfef374b20596287764589d7b274bf88e079fc191ff186321946ae3050d HEAD_REF master ) diff --git a/ports/boost-statechart/vcpkg.json b/ports/boost-statechart/vcpkg.json new file mode 100644 index 00000000000000..b1a7d268751a57 --- /dev/null +++ b/ports/boost-statechart/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "boost-statechart", + "version": "1.76.0", + "description": "Boost statechart module", + "homepage": "https://github.com/boostorg/statechart", + "dependencies": [ + "boost-assert", + "boost-bind", + "boost-config", + "boost-conversion", + "boost-core", + "boost-detail", + "boost-function", + "boost-mpl", + "boost-smart-ptr", + "boost-static-assert", + "boost-thread", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-static-assert/CONTROL b/ports/boost-static-assert/CONTROL deleted file mode 100644 index 0c8f3a53220a0b..00000000000000 --- a/ports/boost-static-assert/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-static-assert -Version: 1.70.0 -Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/static_assert -Description: Boost static_assert module diff --git a/ports/boost-static-assert/portfile.cmake b/ports/boost-static-assert/portfile.cmake index 71c111d3b2ee76..ab617b641acda2 100644 --- a/ports/boost-static-assert/portfile.cmake +++ b/ports/boost-static-assert/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/static_assert - REF boost-1.70.0 - SHA512 712f47459f97892cb3dc0b366c198ceee2f57e10f2986e9bfef087448fe3b1de988ccad9222c0f21a42db757975d9714a79d58f1e5092af1daaf777887be703b + REF boost-1.76.0 + SHA512 efd94b25d66f9841d41c8ad22e751e8489fc78de68172554ec2a82be61b7163c6b90fff56ab8dcf14da7b03770c6f2d14f317be5abbef796dc4d4366efd6498f HEAD_REF master ) diff --git a/ports/boost-static-assert/vcpkg.json b/ports/boost-static-assert/vcpkg.json new file mode 100644 index 00000000000000..6a27f491a5f0ed --- /dev/null +++ b/ports/boost-static-assert/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "boost-static-assert", + "version": "1.76.0", + "description": "Boost static_assert module", + "homepage": "https://github.com/boostorg/static_assert", + "dependencies": [ + "boost-config", + "boost-detail", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-static-string/portfile.cmake b/ports/boost-static-string/portfile.cmake new file mode 100644 index 00000000000000..5b1936e93e8fae --- /dev/null +++ b/ports/boost-static-string/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by scripts/boost/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/static_string + REF boost-1.76.0 + SHA512 cf7908b40eddc0ef478479834ce73f3352c8f29729a77698f9ebfa4fdf944b2aafce82410977764b5bedf4bfc92e000fc2c7c0df4cbdf487e0bb790cd5f35111 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-static-string/vcpkg.json b/ports/boost-static-string/vcpkg.json new file mode 100644 index 00000000000000..0137445f012e54 --- /dev/null +++ b/ports/boost-static-string/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "boost-static-string", + "version": "1.76.0", + "description": "Boost static_string module", + "homepage": "https://github.com/boostorg/static_string", + "dependencies": [ + "boost-assert", + "boost-container-hash", + "boost-static-assert", + "boost-throw-exception", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-stl-interfaces/portfile.cmake b/ports/boost-stl-interfaces/portfile.cmake new file mode 100644 index 00000000000000..21d0f03fe9a70f --- /dev/null +++ b/ports/boost-stl-interfaces/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by scripts/boost/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/stl_interfaces + REF boost-1.76.0 + SHA512 6e260882bda4b57369fefbd4515273617b84708bd5b68f1e5ee77038b1a80e88efb43bddf1931ec6af346bfe25ae4afe7e282fb65712eb3959da88ff0d110ece + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-stl-interfaces/vcpkg.json b/ports/boost-stl-interfaces/vcpkg.json new file mode 100644 index 00000000000000..8939c1fa4d1001 --- /dev/null +++ b/ports/boost-stl-interfaces/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "boost-stl-interfaces", + "version": "1.76.0", + "description": "Boost stl_interfaces module", + "homepage": "https://github.com/boostorg/stl_interfaces", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-system/CONTROL b/ports/boost-system/CONTROL deleted file mode 100644 index 79089afd9215f0..00000000000000 --- a/ports/boost-system/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-system -Version: 1.70.0 -Build-Depends: boost-build, boost-config, boost-integer, boost-modular-build-helper, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/system -Description: Boost system module diff --git a/ports/boost-system/portfile.cmake b/ports/boost-system/portfile.cmake index 96fe084610c35f..bfc5dee5af2e2f 100644 --- a/ports/boost-system/portfile.cmake +++ b/ports/boost-system/portfile.cmake @@ -1,16 +1,19 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +# Automatically generated by scripts/boost/generate-ports.ps1 -include(vcpkg_common_functions) +vcpkg_buildpath_length_warning(37) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/system - REF boost-1.70.0 - SHA512 3ad8ee46b99bab77b2ec3cb70ad01ae56156361fd1ad9c54b36b059a19e3c523d222e556e23ec71a80db2d095d4e37bcd7dae7d0745b5eee6e85b6bf121be4fe + REF boost-1.76.0 + SHA512 7943bab559c0629fec008fca6e4377fb34ac45f809fd67250cda8a364f5a47149bbb3541d1e684a7f92903e7b3b90c1fb0f6902c7a827c1f69a3ab7b5da1facd HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-system requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-system/vcpkg.json b/ports/boost-system/vcpkg.json new file mode 100644 index 00000000000000..39ffb53b2f4394 --- /dev/null +++ b/ports/boost-system/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "boost-system", + "version": "1.76.0", + "description": "Boost system module", + "homepage": "https://github.com/boostorg/system", + "dependencies": [ + { + "name": "boost-build", + "host": true + }, + "boost-config", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-test/CONTROL b/ports/boost-test/CONTROL deleted file mode 100644 index e1c83b08a2c34b..00000000000000 --- a/ports/boost-test/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-test -Version: 1.70.0-2 -Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/test -Description: Boost test module diff --git a/ports/boost-test/portfile.cmake b/ports/boost-test/portfile.cmake index a949d2a6b32503..0f98c557d09b6f 100644 --- a/ports/boost-test/portfile.cmake +++ b/ports/boost-test/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/test - REF boost-1.70.0 - SHA512 5efda970fe5530ecb92a609f2aabb486c5a790206004ed72d4e854430a957d31ef016670b21be773aedaf80a203a18945febc1f8d9fdf9b55dbc05196fcbf450 + REF boost-1.76.0 + SHA512 87b4e949adefd840ca1ac61ad97b5798508742ef10ca12d05be0181150b5cd23fa25e473ff5cb077a55afb04d61846b96f7dae298c2dbb2deb71589e6dbcc968 HEAD_REF master ) @@ -15,7 +13,10 @@ string(REPLACE "import ../../predef/check/predef" "import predef/check/predef" _ file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-predef/check" DESTINATION "${SOURCE_PATH}/build/predef") -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-test requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-test/vcpkg.json b/ports/boost-test/vcpkg.json new file mode 100644 index 00000000000000..6b2c8edffbab63 --- /dev/null +++ b/ports/boost-test/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "boost-test", + "version": "1.76.0", + "description": "Boost test module", + "homepage": "https://github.com/boostorg/test", + "supports": "!uwp", + "dependencies": [ + "boost-algorithm", + "boost-assert", + "boost-bind", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-core", + "boost-detail", + "boost-exception", + "boost-function", + "boost-io", + "boost-iterator", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-mpl", + "boost-numeric-conversion", + "boost-optional", + "boost-preprocessor", + "boost-smart-ptr", + "boost-static-assert", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-thread/CONTROL b/ports/boost-thread/CONTROL deleted file mode 100644 index e38b6f31af7552..00000000000000 --- a/ports/boost-thread/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-thread -Version: 1.70.0-1 -Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-container-hash, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/thread -Description: Boost thread module diff --git a/ports/boost-thread/avoid-winapi.patch b/ports/boost-thread/avoid-winapi.patch deleted file mode 100644 index 2308600eaf7187..00000000000000 --- a/ports/boost-thread/avoid-winapi.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/boost/thread/win32/thread_primitives.hpp b/include/boost/thread/win32/thread_primitives.hpp -index e075140..d60ab36 100644 ---- a/include/boost/thread/win32/thread_primitives.hpp -+++ b/include/boost/thread/win32/thread_primitives.hpp -@@ -70,7 +70,7 @@ namespace boost - { - namespace win32 - { -- namespace detail { typedef ticks_type (BOOST_WINAPI_WINAPI_CC *gettickcount64_t)(); } -+ namespace detail { typedef ticks_type (__stdcall *gettickcount64_t)(); } - extern BOOST_THREAD_DECL boost::detail::win32::detail::gettickcount64_t gettickcount64; - - enum event_type diff --git a/ports/boost-thread/b2-options.cmake b/ports/boost-thread/b2-options.cmake index 07acc10b5c1f0e..198b23084e16ce 100644 --- a/ports/boost-thread/b2-options.cmake +++ b/ports/boost-thread/b2-options.cmake @@ -1 +1,2 @@ +set(B2_REQUIREMENTS "/boost/date_time//boost_date_time") list(APPEND B2_OPTIONS /boost/thread//boost_thread) diff --git a/ports/boost-thread/portfile.cmake b/ports/boost-thread/portfile.cmake index f17812eb38a1f6..564a247abe7b02 100644 --- a/ports/boost-thread/portfile.cmake +++ b/ports/boost-thread/portfile.cmake @@ -1,22 +1,20 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/thread - REF boost-1.70.0 - SHA512 2c29fc8f1ff805f126f162865c8bad51f8aa56942d54999fe0191bcf4bf8f472c070d7977e731ceb6d46ff9d0e6d39013a3df79bfe8f4ed4631906cd26c8537a + REF boost-1.76.0 + SHA512 ed833316025be8a52ccfb620b874f9b9956c778e453de01a657745563184efc123f461dd54dc048946df3319c1b512810a9ce1fb8940fd75771a171c95349e28 HEAD_REF master - PATCHES avoid-winapi.patch ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-thread requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build( SOURCE_PATH ${SOURCE_PATH} - REQUIREMENTS "/boost/date_time//boost_date_time" - OPTIONS /boost/thread//boost_thread - BOOST_CMAKE_FRAGMENT ${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-thread/vcpkg.json b/ports/boost-thread/vcpkg.json new file mode 100644 index 00000000000000..9e76367b9f2c2d --- /dev/null +++ b/ports/boost-thread/vcpkg.json @@ -0,0 +1,47 @@ +{ + "name": "boost-thread", + "version": "1.76.0", + "description": "Boost thread module", + "homepage": "https://github.com/boostorg/thread", + "dependencies": [ + "boost-algorithm", + "boost-assert", + "boost-atomic", + "boost-bind", + { + "name": "boost-build", + "host": true + }, + "boost-chrono", + "boost-concept-check", + "boost-config", + "boost-container", + "boost-container-hash", + "boost-core", + "boost-date-time", + "boost-detail", + "boost-exception", + "boost-function", + "boost-intrusive", + "boost-io", + "boost-lexical-cast", + "boost-math", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-move", + "boost-optional", + "boost-predef", + "boost-preprocessor", + "boost-smart-ptr", + "boost-static-assert", + "boost-system", + "boost-throw-exception", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-throw-exception/CONTROL b/ports/boost-throw-exception/CONTROL deleted file mode 100644 index 31502e60cf5a0b..00000000000000 --- a/ports/boost-throw-exception/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-throw-exception -Version: 1.70.0 -Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/throw_exception -Description: Boost throw_exception module diff --git a/ports/boost-throw-exception/portfile.cmake b/ports/boost-throw-exception/portfile.cmake index c3841366d74587..592e1402a47276 100644 --- a/ports/boost-throw-exception/portfile.cmake +++ b/ports/boost-throw-exception/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/throw_exception - REF boost-1.70.0 - SHA512 2b95ab70b141ea077c420c2fd6e139851aac6e6ccfb8a6772e7492066d3746f492f268a56ea79b2843e2631444d0a8dceba4551d98a3e315ef86017b307585fc + REF boost-1.76.0 + SHA512 875d7332eb2d80ff30a3bf51817d20260cae9fc598c3e51b0e1e1fe3627f86003a36da6a3a4fe957b943bb8afe33ba1fdb4931d067024a01cd3e6a34c13aa86f HEAD_REF master ) diff --git a/ports/boost-throw-exception/vcpkg.json b/ports/boost-throw-exception/vcpkg.json new file mode 100644 index 00000000000000..8718629dd0eaf3 --- /dev/null +++ b/ports/boost-throw-exception/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "boost-throw-exception", + "version": "1.76.0", + "description": "Boost throw_exception module", + "homepage": "https://github.com/boostorg/throw_exception", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-timer/CONTROL b/ports/boost-timer/CONTROL deleted file mode 100644 index 213ccc19c85a32..00000000000000 --- a/ports/boost-timer/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-timer -Version: 1.70.0 -Build-Depends: boost-build, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-modular-build-helper, boost-predef, boost-system, boost-throw-exception, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/timer -Description: Boost timer module diff --git a/ports/boost-timer/portfile.cmake b/ports/boost-timer/portfile.cmake index 805efc61991fad..fcca8cb5b98ec0 100644 --- a/ports/boost-timer/portfile.cmake +++ b/ports/boost-timer/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/timer - REF boost-1.70.0 - SHA512 d00d5637b420346d65530a2d6df43cd91e6ac222fd4710ee630bdcede5e00ea4b30a20aa2f9181244530a6f9a434b8421208f5936a0dddb9386d9105b4594263 + REF boost-1.76.0 + SHA512 c61fa1957a193600091959b49f5d84137ce8823fbe53bb3761bd40c9c0bd7d3660b7e449c0a903cdd6249e21d84ee19d86e26449aabe0df8404e400af946aa87 HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-timer requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-timer/vcpkg.json b/ports/boost-timer/vcpkg.json new file mode 100644 index 00000000000000..aceb8db8758337 --- /dev/null +++ b/ports/boost-timer/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "boost-timer", + "version": "1.76.0", + "description": "Boost timer module", + "homepage": "https://github.com/boostorg/timer", + "dependencies": [ + { + "name": "boost-build", + "host": true + }, + "boost-chrono", + "boost-config", + "boost-core", + "boost-io", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-predef", + "boost-system", + "boost-throw-exception", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-tokenizer/CONTROL b/ports/boost-tokenizer/CONTROL deleted file mode 100644 index 3b7497e82091d0..00000000000000 --- a/ports/boost-tokenizer/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-tokenizer -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-detail, boost-iterator, boost-mpl, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/tokenizer -Description: Boost tokenizer module diff --git a/ports/boost-tokenizer/portfile.cmake b/ports/boost-tokenizer/portfile.cmake index 5c0fccb26b8ffb..9d00409818a91a 100644 --- a/ports/boost-tokenizer/portfile.cmake +++ b/ports/boost-tokenizer/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tokenizer - REF boost-1.70.0 - SHA512 f1c48f599d9b0e8722d4b78a2def4760a48602838e03bc5a5e964ce4f78b7ffafad12ddd272fee1f576da06b231781e2fb95898ca7d1f09e68f9bbddcf4ee954 + REF boost-1.76.0 + SHA512 287916582c98aaf8c6549899f9258b1428a0c20942677cfe10b9285487918ac10a17cb7896eaceb800ed645587dcdbab5a58d3e7c18bb13eec230d00056fc453 HEAD_REF master ) diff --git a/ports/boost-tokenizer/vcpkg.json b/ports/boost-tokenizer/vcpkg.json new file mode 100644 index 00000000000000..f679818ddd174f --- /dev/null +++ b/ports/boost-tokenizer/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-tokenizer", + "version": "1.76.0", + "description": "Boost tokenizer module", + "homepage": "https://github.com/boostorg/tokenizer", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-detail", + "boost-iterator", + "boost-mpl", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-tti/CONTROL b/ports/boost-tti/CONTROL deleted file mode 100644 index f284303ea9255e..00000000000000 --- a/ports/boost-tti/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-tti -Version: 1.70.0 -Build-Depends: boost-config, boost-detail, boost-function-types, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/tti -Description: Boost tti module diff --git a/ports/boost-tti/portfile.cmake b/ports/boost-tti/portfile.cmake index 5ac42c6d1e1309..b61649bc632085 100644 --- a/ports/boost-tti/portfile.cmake +++ b/ports/boost-tti/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tti - REF boost-1.70.0 - SHA512 0933d8dac91052ad3a702130162e512f5c1c6a52e2d7bcbc96cd3424ca7eba6e51091e7a2639b17203ff3db84d22f8bf1c402567f471c26a87bc2468a7442e4c + REF boost-1.76.0 + SHA512 7ccc41099e3b800fab74d90ed47943e3358f4c0dd88c1fe901d9f81f601794e78a6d0df9c7ab04dd59261870820371d89a8d5bb5c4983143b48bd9d5a22394a2 HEAD_REF master ) diff --git a/ports/boost-tti/vcpkg.json b/ports/boost-tti/vcpkg.json new file mode 100644 index 00000000000000..d64351cea337bf --- /dev/null +++ b/ports/boost-tti/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "boost-tti", + "version": "1.76.0", + "description": "Boost tti module", + "homepage": "https://github.com/boostorg/tti", + "dependencies": [ + "boost-config", + "boost-detail", + "boost-function-types", + "boost-mpl", + "boost-preprocessor", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-tuple/CONTROL b/ports/boost-tuple/CONTROL deleted file mode 100644 index ba38ab26726663..00000000000000 --- a/ports/boost-tuple/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-tuple -Version: 1.70.0 -Build-Depends: boost-config, boost-core, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/tuple -Description: Boost tuple module diff --git a/ports/boost-tuple/portfile.cmake b/ports/boost-tuple/portfile.cmake index 985d651b177cff..5f731c81a0d0e1 100644 --- a/ports/boost-tuple/portfile.cmake +++ b/ports/boost-tuple/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tuple - REF boost-1.70.0 - SHA512 79baa5840f6533934c8c9dfd9e4a2af9705dd4e5243d4434ca9dd5edb5407805f8f28f1983e8883e62c735cb73b5743ba091263be0680a394216a83a0b387793 + REF boost-1.76.0 + SHA512 22c40d1c9f63cd22d0b632d81b15b30767273be019afe4ae8030cd9ac740e84f50e2db202b62448e9aa44bad2d8f0a3102e54cf1648b414ab7e30814c9da6219 HEAD_REF master ) diff --git a/ports/boost-tuple/vcpkg.json b/ports/boost-tuple/vcpkg.json new file mode 100644 index 00000000000000..3ec8a549cb5f1a --- /dev/null +++ b/ports/boost-tuple/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "boost-tuple", + "version": "1.76.0", + "description": "Boost tuple module", + "homepage": "https://github.com/boostorg/tuple", + "dependencies": [ + "boost-config", + "boost-core", + "boost-static-assert", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-type-erasure/CONTROL b/ports/boost-type-erasure/CONTROL deleted file mode 100644 index ef2b1699e7bb2c..00000000000000 --- a/ports/boost-type-erasure/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-type-erasure -Version: 1.70.0-1 -Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-modular-build-helper, boost-mp11, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-vmd -Homepage: https://github.com/boostorg/type_erasure -Description: Boost type_erasure module diff --git a/ports/boost-type-erasure/portfile.cmake b/ports/boost-type-erasure/portfile.cmake index ee6015fad6867b..b7afec0973ed29 100644 --- a/ports/boost-type-erasure/portfile.cmake +++ b/ports/boost-type-erasure/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/type_erasure - REF boost-1.70.0 - SHA512 b975d7efa5c50c711607c28bd8e4862754d589b2fc384e06170318debd7a1b3e72231409c5bebae44ac80f67ef8a8f466fda0e8775ad1473b7fd69c9c39c42c4 + REF boost-1.76.0 + SHA512 8f304de312dfb59d3d02d90f1806908bf91a74459c6ad156902bbc7d72ad326e98e07c43f6cef76b6b82ba37d3f074584722e04212100272cdea613e4c47104e HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-type-erasure requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-type-erasure/vcpkg.json b/ports/boost-type-erasure/vcpkg.json new file mode 100644 index 00000000000000..867e95e8879b2a --- /dev/null +++ b/ports/boost-type-erasure/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "boost-type-erasure", + "version": "1.76.0", + "description": "Boost type_erasure module", + "homepage": "https://github.com/boostorg/type_erasure", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-config", + "boost-detail", + "boost-fusion", + "boost-iterator", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-mp11", + "boost-mpl", + "boost-preprocessor", + "boost-smart-ptr", + "boost-thread", + "boost-throw-exception", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers", + "boost-vmd" + ] +} diff --git a/ports/boost-type-index/CONTROL b/ports/boost-type-index/CONTROL deleted file mode 100644 index 4f52f63681b6b4..00000000000000 --- a/ports/boost-type-index/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-type-index -Version: 1.70.0 -Build-Depends: boost-config, boost-container-hash, boost-core, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/type_index -Description: Boost type_index module diff --git a/ports/boost-type-index/portfile.cmake b/ports/boost-type-index/portfile.cmake index 365de0ca4c9732..64942aefe29881 100644 --- a/ports/boost-type-index/portfile.cmake +++ b/ports/boost-type-index/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/type_index - REF boost-1.70.0 - SHA512 e7c6c36c4c24045fcb9ddd3a804b051b1076bab92488927b0fb5b6e9f551c45c19c09a33e4002e843fd00500e40dd7511ff23124f73fe889883f79e35fbb4bd3 + REF boost-1.76.0 + SHA512 8103eea4f14f15046761adc0b438a182adb1cfc245f02dc8211b9a7985d67c859f88fae2de2d7aef8f2bd969dcaccc28515e1339c0207551fa44e43ff4d8fbbf HEAD_REF master ) diff --git a/ports/boost-type-index/vcpkg.json b/ports/boost-type-index/vcpkg.json new file mode 100644 index 00000000000000..ecc5bdaf5b9fe7 --- /dev/null +++ b/ports/boost-type-index/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "boost-type-index", + "version": "1.76.0", + "description": "Boost type_index module", + "homepage": "https://github.com/boostorg/type_index", + "dependencies": [ + "boost-config", + "boost-container-hash", + "boost-core", + "boost-preprocessor", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-type-traits/CONTROL b/ports/boost-type-traits/CONTROL deleted file mode 100644 index eeacc173677ce8..00000000000000 --- a/ports/boost-type-traits/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-type-traits -Version: 1.70.0-1 -Build-Depends: boost-config, boost-detail, boost-static-assert, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/type_traits -Description: Boost type_traits module diff --git a/ports/boost-type-traits/msvc-arm.patch b/ports/boost-type-traits/msvc-arm.patch deleted file mode 100644 index 7ef352087944da..00000000000000 --- a/ports/boost-type-traits/msvc-arm.patch +++ /dev/null @@ -1,440 +0,0 @@ -diff --git a/include/boost/type_traits/detail/is_function_cxx_11.hpp b/include/boost/type_traits/detail/is_function_cxx_11.hpp -index 432af4e..97f029a 100644 ---- a/include/boost/type_traits/detail/is_function_cxx_11.hpp -+++ b/include/boost/type_traits/detail/is_function_cxx_11.hpp -@@ -101,7 +101,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -118,7 +118,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -135,7 +135,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -152,7 +152,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -170,7 +170,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -187,7 +187,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -204,7 +204,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -221,7 +221,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -239,7 +239,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -256,7 +256,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -273,7 +273,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -290,7 +290,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - #ifndef __CLR_VER -@@ -381,7 +381,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -396,7 +396,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -411,7 +411,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -426,7 +426,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -442,7 +442,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -457,7 +457,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -472,7 +472,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -487,7 +487,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -503,7 +503,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -518,7 +518,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -533,7 +533,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -@@ -548,7 +548,7 @@ namespace boost { - template - struct is_function : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_function : public true_type {}; - template -diff --git a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp -index d88a004..f02693e 100644 ---- a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp -+++ b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp -@@ -113,7 +113,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -133,7 +133,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -153,7 +153,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -173,7 +173,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -193,7 +193,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -213,7 +213,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -233,7 +233,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -253,7 +253,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -273,7 +273,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -293,7 +293,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -313,7 +313,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -333,7 +333,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -424,7 +424,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -444,7 +444,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -464,7 +464,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -484,7 +484,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -504,7 +504,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -524,7 +524,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -544,7 +544,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -564,7 +564,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -584,7 +584,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -604,7 +604,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -624,7 +624,7 @@ namespace boost { - template - struct is_member_function_pointer : public true_type {}; - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER -@@ -645,7 +645,7 @@ namespace boost { - struct is_member_function_pointer : public true_type {}; - - #endif --#ifndef _M_AMD64 -+#ifdef _M_IX86 - template - struct is_member_function_pointer : public true_type {}; - #ifndef __CLR_VER diff --git a/ports/boost-type-traits/portfile.cmake b/ports/boost-type-traits/portfile.cmake index a3bc496b2bcaf5..10bf763268d956 100644 --- a/ports/boost-type-traits/portfile.cmake +++ b/ports/boost-type-traits/portfile.cmake @@ -1,15 +1,11 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/type_traits - REF boost-1.70.0 - SHA512 e9c672bb0e02cea9be8179908dfbb0c21903a7e6b9fade6e6666c01af97d81e489983143eedd668df446a1fb532d3c5298458c18efacd747ce66b77170d0da14 + REF boost-1.76.0 + SHA512 3dcaedf9dbb95c6b96ce5d836ad85c1a5cdf766a3421b3235dfa4a0e4db94d0322d714e03d53961a7a0cbe597bf0c7c8689c61a23274b2c9c70f90780b349659 HEAD_REF master - PATCHES - msvc-arm.patch ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/boost-type-traits/vcpkg.json b/ports/boost-type-traits/vcpkg.json new file mode 100644 index 00000000000000..93322f28eb885e --- /dev/null +++ b/ports/boost-type-traits/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "boost-type-traits", + "version": "1.76.0", + "description": "Boost type_traits module", + "homepage": "https://github.com/boostorg/type_traits", + "dependencies": [ + "boost-config", + "boost-detail", + "boost-static-assert", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-typeof/CONTROL b/ports/boost-typeof/CONTROL deleted file mode 100644 index aeca892fe15041..00000000000000 --- a/ports/boost-typeof/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-typeof -Version: 1.70.0 -Build-Depends: boost-config, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/typeof -Description: Boost typeof module diff --git a/ports/boost-typeof/portfile.cmake b/ports/boost-typeof/portfile.cmake index b3c26983439529..d162575d4bc275 100644 --- a/ports/boost-typeof/portfile.cmake +++ b/ports/boost-typeof/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/typeof - REF boost-1.70.0 - SHA512 ff55aa51b66275a18c8d83d95eadc66aa410fc0e21e3cfee9ecb70051fe7fb8015b17ebd54541ef0eb96f638aafa61bd77df40dcc6d460e9227040336c61ec5c + REF boost-1.76.0 + SHA512 3126a39a1e37cfe20d98f46ddecf88d8d6ed6f996a08087d47771d6eab8229b08ebc9e949e92363f109936de9ea9df1004f6df6d433f9b4957f8f7812d845da3 HEAD_REF master ) diff --git a/ports/boost-typeof/vcpkg.json b/ports/boost-typeof/vcpkg.json new file mode 100644 index 00000000000000..489c94e4ec3bca --- /dev/null +++ b/ports/boost-typeof/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "boost-typeof", + "version": "1.76.0", + "description": "Boost typeof module", + "homepage": "https://github.com/boostorg/typeof", + "dependencies": [ + "boost-config", + "boost-preprocessor", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-ublas/CONTROL b/ports/boost-ublas/CONTROL deleted file mode 100644 index 319b99bed394b5..00000000000000 --- a/ports/boost-ublas/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-ublas -Version: 1.70.0 -Build-Depends: boost-compute, boost-concept-check, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/ublas -Description: Boost ublas module diff --git a/ports/boost-ublas/portfile.cmake b/ports/boost-ublas/portfile.cmake index f81cbb420a882e..0e856f5d0fdabf 100644 --- a/ports/boost-ublas/portfile.cmake +++ b/ports/boost-ublas/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/ublas - REF boost-1.70.0 - SHA512 050be7c25c50b31274e6b19d2c882343ac6b065c093bab20f5c9ce4050db78886525299cc1814525f0ef7da6ae002aef0c3c1539f65e3d9646d0e399293b019e + REF boost-1.76.0 + SHA512 b685374b8871f0f2edb8b1d2431ca448a28285e8d267123ee2cc9abe39e97775eacb47fc7f098547da7e3537ded1a3ba2b9ae73a7774302bf7cbe50d558431dd HEAD_REF master ) diff --git a/ports/boost-ublas/vcpkg.json b/ports/boost-ublas/vcpkg.json new file mode 100644 index 00000000000000..1b0d943b44b5ed --- /dev/null +++ b/ports/boost-ublas/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "boost-ublas", + "version": "1.76.0", + "description": "Boost ublas module", + "homepage": "https://github.com/boostorg/ublas", + "dependencies": [ + "boost-compute", + "boost-concept-check", + "boost-config", + "boost-core", + "boost-iterator", + "boost-mpl", + "boost-range", + "boost-serialization", + "boost-smart-ptr", + "boost-static-assert", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-uninstall/portfile.cmake b/ports/boost-uninstall/portfile.cmake new file mode 100644 index 00000000000000..07fa297317943b --- /dev/null +++ b/ports/boost-uninstall/portfile.cmake @@ -0,0 +1,6 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +message(STATUS "\nPlease use the following command when you need to remove all boost ports/components:\n\ + \"./vcpkg remove boost-uninstall:${TARGET_TRIPLET} --recurse\"\n") + +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/boost/vcpkg-cmake-wrapper.cmake" @ONLY) \ No newline at end of file diff --git a/ports/boost-uninstall/vcpkg-cmake-wrapper.cmake b/ports/boost-uninstall/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..d3e5109b2ad842 --- /dev/null +++ b/ports/boost-uninstall/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +set(Boost_USE_STATIC_LIBS OFF) +set(Boost_USE_MULTITHREADED ON) +unset(Boost_USE_STATIC_RUNTIME) +set(Boost_NO_BOOST_CMAKE ON) +unset(Boost_USE_STATIC_RUNTIME CACHE) +if("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v120") + set(Boost_COMPILER "-vc120") +else() + set(Boost_COMPILER "-vc140") +endif() +_find_package(${ARGS}) \ No newline at end of file diff --git a/ports/boost-uninstall/vcpkg.json b/ports/boost-uninstall/vcpkg.json new file mode 100644 index 00000000000000..09bef55d69f2ac --- /dev/null +++ b/ports/boost-uninstall/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "boost-uninstall", + "version-string": "1.75.0", + "port-version": 1, + "description": "boost uninstall port", + "homepage": "https://boost.org" +} diff --git a/ports/boost-units/CONTROL b/ports/boost-units/CONTROL deleted file mode 100644 index 8e1fe4a8acf670..00000000000000 --- a/ports/boost-units/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-units -Version: 1.70.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-io, boost-lambda, boost-math, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/units -Description: Boost units module diff --git a/ports/boost-units/portfile.cmake b/ports/boost-units/portfile.cmake index ac58d72848086a..7ac447db4467a8 100644 --- a/ports/boost-units/portfile.cmake +++ b/ports/boost-units/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/units - REF boost-1.70.0 - SHA512 001bfe9ca2a6be94ec66c123ed983468cefebfebbee58f439bbb2a392fa152cb0818fc03a782bfd698693702df185242187d91ba6cbab8f742bb04d53cd1ca28 + REF boost-1.76.0 + SHA512 84eff531365db19254d52ef0cdc31631a6806b766a8d2be6f01aaf0b468b367c8cd9f4979d2c28434c19c6377f8be5a42851f0e90bb876501738b1da9245ebb4 HEAD_REF master ) diff --git a/ports/boost-units/vcpkg.json b/ports/boost-units/vcpkg.json new file mode 100644 index 00000000000000..7b5b94d2561cc3 --- /dev/null +++ b/ports/boost-units/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "boost-units", + "version": "1.76.0", + "description": "Boost units module", + "homepage": "https://github.com/boostorg/units", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-core", + "boost-integer", + "boost-io", + "boost-lambda", + "boost-math", + "boost-mpl", + "boost-preprocessor", + "boost-serialization", + "boost-static-assert", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-unordered/CONTROL b/ports/boost-unordered/CONTROL deleted file mode 100644 index d128e273fa5701..00000000000000 --- a/ports/boost-unordered/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-unordered -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-container-hash, boost-core, boost-detail, boost-functional, boost-move, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/unordered -Description: Boost unordered module diff --git a/ports/boost-unordered/portfile.cmake b/ports/boost-unordered/portfile.cmake index 69c681d9929b4a..4e443ec3261fd2 100644 --- a/ports/boost-unordered/portfile.cmake +++ b/ports/boost-unordered/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/unordered - REF boost-1.70.0 - SHA512 8fc3692777e6b7e997a888237628489bcac80b45ddb4ac2bf73809e7e689506ba8e2679915d8025369375610a7a63cf94f18bafb1fe638df57e76be468bae761 + REF boost-1.76.0 + SHA512 77047942a8561c84a196606fc4d6964687f52c7da52b419e69cc0f73a8751ba937393ff25e2a7d3fa9f0487df1c78f34cd633c9440a1b2c47da53cfe66d5b526 HEAD_REF master ) diff --git a/ports/boost-unordered/vcpkg.json b/ports/boost-unordered/vcpkg.json new file mode 100644 index 00000000000000..8675aff1b4e2af --- /dev/null +++ b/ports/boost-unordered/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "boost-unordered", + "version": "1.76.0", + "description": "Boost unordered module", + "homepage": "https://github.com/boostorg/unordered", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-container", + "boost-container-hash", + "boost-core", + "boost-detail", + "boost-functional", + "boost-move", + "boost-predef", + "boost-preprocessor", + "boost-smart-ptr", + "boost-throw-exception", + "boost-tuple", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-utility/CONTROL b/ports/boost-utility/CONTROL deleted file mode 100644 index 7f54df7de0e021..00000000000000 --- a/ports/boost-utility/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-utility -Version: 1.70.0 -Build-Depends: boost-config, boost-container-hash, boost-core, boost-detail, boost-integer, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/utility -Description: Boost utility module diff --git a/ports/boost-utility/portfile.cmake b/ports/boost-utility/portfile.cmake index 4297c262aa3ea9..6ae1500d91546a 100644 --- a/ports/boost-utility/portfile.cmake +++ b/ports/boost-utility/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/utility - REF boost-1.70.0 - SHA512 c81bb47c9d9d95b2a1e43f969b7ce91d148e207d4a5b5efe9d9ca5b0ef87f182216aae6e45c6bba52f8ba7b5d5601984c4551a5d84352d3d221433d8652c9570 + REF boost-1.76.0 + SHA512 48beacbe0853d4d8cd7c5099639c0e52595640ee31827a039f1b06bf6f13b108a86bb6bafe1eb2eee03ec2a2d4e9fa65d8ee87cb45522eaa89f6b6672024468a HEAD_REF master ) diff --git a/ports/boost-utility/vcpkg.json b/ports/boost-utility/vcpkg.json new file mode 100644 index 00000000000000..66b6454166ed4b --- /dev/null +++ b/ports/boost-utility/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "boost-utility", + "version": "1.76.0", + "description": "Boost utility module", + "homepage": "https://github.com/boostorg/utility", + "dependencies": [ + "boost-config", + "boost-container-hash", + "boost-core", + "boost-detail", + "boost-io", + "boost-preprocessor", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-uuid/CONTROL b/ports/boost-uuid/CONTROL deleted file mode 100644 index efc4b3094a26d1..00000000000000 --- a/ports/boost-uuid/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-uuid -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container-hash, boost-core, boost-integer, boost-io, boost-move, boost-numeric-conversion, boost-predef, boost-random, boost-serialization, boost-static-assert, boost-throw-exception, boost-tti, boost-type-traits, boost-vcpkg-helpers, boost-winapi -Homepage: https://github.com/boostorg/uuid -Description: Boost uuid module diff --git a/ports/boost-uuid/portfile.cmake b/ports/boost-uuid/portfile.cmake index f1baff5ee111cd..bfe621ed0469fc 100644 --- a/ports/boost-uuid/portfile.cmake +++ b/ports/boost-uuid/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/uuid - REF boost-1.70.0 - SHA512 8fa80562f79b6192d7086add50a6c89996106161df0e43a5738e460253cdb7f94c3a941e72fbce49c0ae5eca67429ca6eb42e08af647832941b624a82160e9cf + REF boost-1.76.0 + SHA512 9d0a4ee60cc941e8458a0796955860a2e760eff30bff0faa665a9e9dac78631af0f06a6b6d8146b73059d968f9cbc2065b341943bbaa6606bd6d02f4db9bfcb9 HEAD_REF master ) diff --git a/ports/boost-uuid/vcpkg.json b/ports/boost-uuid/vcpkg.json new file mode 100644 index 00000000000000..f703a3a6e6e7ba --- /dev/null +++ b/ports/boost-uuid/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "boost-uuid", + "version": "1.76.0", + "description": "Boost uuid module", + "homepage": "https://github.com/boostorg/uuid", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-container-hash", + "boost-conversion", + "boost-core", + "boost-io", + "boost-move", + "boost-numeric-conversion", + "boost-predef", + "boost-random", + "boost-serialization", + "boost-static-assert", + "boost-throw-exception", + "boost-tti", + "boost-type-traits", + "boost-vcpkg-helpers", + "boost-winapi" + ] +} diff --git a/ports/boost-variant/CONTROL b/ports/boost-variant/CONTROL deleted file mode 100644 index 5aec459fdf70f4..00000000000000 --- a/ports/boost-variant/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-variant -Version: 1.70.0 -Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-move, boost-mpl, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/variant -Description: Boost variant module diff --git a/ports/boost-variant/fix-regression-1.70.patch b/ports/boost-variant/fix-regression-1.70.patch deleted file mode 100644 index 79c0e2c23479a6..00000000000000 --- a/ports/boost-variant/fix-regression-1.70.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/include/boost/variant/detail/apply_visitor_unary.hpp b/include/boost/variant/detail/apply_visitor_unary.hpp -index 71610cb..c3a741e 100644 ---- a/include/boost/variant/detail/apply_visitor_unary.hpp -+++ b/include/boost/variant/detail/apply_visitor_unary.hpp -@@ -23,6 +23,7 @@ - # include - # include - # include -+# include - # include - # include - #endif -@@ -85,7 +86,7 @@ namespace detail { namespace variant { - // This class serves only metaprogramming purposes. none of its methods must be called at runtime! - template - struct result_multideduce1 { -- typedef typename Variant::types types; -+ typedef typename remove_reference::type::types types; - typedef typename boost::mpl::begin::type begin_it; - typedef typename boost::mpl::advance< - begin_it, boost::mpl::int_::type::value - 1> -@@ -95,14 +96,14 @@ struct result_multideduce1 { - struct deduce_impl { - typedef typename boost::mpl::next::type next_t; - typedef typename boost::mpl::deref::type value_t; -- typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< value_t >() ) -+ typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() ) - : boost::declval< typename deduce_impl::type >()) type; - }; - - template - struct deduce_impl { - typedef typename boost::mpl::deref::type value_t; -- typedef decltype(boost::declval< Visitor& >()( boost::declval< value_t >() )) type; -+ typedef decltype(boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )) type; - }; - - typedef typename deduce_impl::type type; -@@ -132,7 +133,7 @@ inline decltype(auto) apply_visitor(Visitor&& visitor, Visitable&& visitable, - boost::detail::variant::has_result_type - >::type* = 0) - { -- boost::detail::variant::result_wrapper1::type> cpp14_vis(::boost::forward(visitor)); -+ boost::detail::variant::result_wrapper1 cpp14_vis(::boost::forward(visitor)); - return ::boost::forward(visitable).apply_visitor(cpp14_vis); - } - diff --git a/ports/boost-variant/portfile.cmake b/ports/boost-variant/portfile.cmake index a1d8be5283a06c..e7768285453def 100644 --- a/ports/boost-variant/portfile.cmake +++ b/ports/boost-variant/portfile.cmake @@ -1,15 +1,11 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/variant - REF boost-1.70.0 - SHA512 e5a555c666bd692a5ed6e556a66d93db82707357ae5f7e62af8565e5bf56b134adefb3049c38af72f420a969308f120b8270a9e9187eac984b74573b8e9e1d75 + REF boost-1.76.0 + SHA512 d4c5afd1bda28021b4c1eaa0a98db16320144aec2595cf52564486da3c33d89b7a486ec35389af228169a37b928956b6e6405fe86c3dfb3f949cf3e26f372779 HEAD_REF master - PATCHES - fix-regression-1.70.patch ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/boost-variant/vcpkg.json b/ports/boost-variant/vcpkg.json new file mode 100644 index 00000000000000..0d3547aab4cb7b --- /dev/null +++ b/ports/boost-variant/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "boost-variant", + "version": "1.76.0", + "description": "Boost variant module", + "homepage": "https://github.com/boostorg/variant", + "dependencies": [ + "boost-assert", + "boost-bind", + "boost-config", + "boost-core", + "boost-detail", + "boost-functional", + "boost-integer", + "boost-move", + "boost-mpl", + "boost-preprocessor", + "boost-static-assert", + "boost-throw-exception", + "boost-type-index", + "boost-type-traits", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-variant2/portfile.cmake b/ports/boost-variant2/portfile.cmake new file mode 100644 index 00000000000000..5519083b326905 --- /dev/null +++ b/ports/boost-variant2/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by scripts/boost/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/variant2 + REF boost-1.76.0 + SHA512 5888d24d5ccfeea6d1e774f4388e9820a7fbc1e9899d8cee35942777df5120c959ea2cb16668ed7d5d7105f3fc42e4dbe5175ae98037a9ef80ac8f003742e50e + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-variant2/vcpkg.json b/ports/boost-variant2/vcpkg.json new file mode 100644 index 00000000000000..e4a06c5a0f7573 --- /dev/null +++ b/ports/boost-variant2/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "boost-variant2", + "version": "1.76.0", + "description": "Boost variant2 module", + "homepage": "https://github.com/boostorg/variant2", + "dependencies": [ + "boost-config", + "boost-detail", + "boost-mp11", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-vcpkg-helpers/.gitignore b/ports/boost-vcpkg-helpers/.gitignore deleted file mode 100644 index 6217c8eab5b95a..00000000000000 --- a/ports/boost-vcpkg-helpers/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -downloads/ -libs/ -boost/ \ No newline at end of file diff --git a/ports/boost-vcpkg-helpers/CONTROL b/ports/boost-vcpkg-helpers/CONTROL deleted file mode 100644 index 37f7081cfd3cbb..00000000000000 --- a/ports/boost-vcpkg-helpers/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: boost-vcpkg-helpers -Version: 5 -Description: a set of vcpkg-internal scripts used to modularize boost diff --git a/ports/boost-vcpkg-helpers/boost-modular-headers.cmake b/ports/boost-vcpkg-helpers/boost-modular-headers.cmake index 1a4b8574bc9a37..2be7c64464e3ba 100644 --- a/ports/boost-vcpkg-helpers/boost-modular-headers.cmake +++ b/ports/boost-vcpkg-helpers/boost-modular-headers.cmake @@ -15,10 +15,10 @@ function(boost_modular_headers) message(STATUS "Packaging headers done") vcpkg_download_distfile(ARCHIVE - URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.65.1/LICENSE_1_0.txt" + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.74.0/LICENSE_1_0.txt" FILENAME "boost_LICENSE_1_0.txt" SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 ) - + file(INSTALL ${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) endfunction() diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 deleted file mode 100644 index 8a6dc79d10ff5f..00000000000000 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ /dev/null @@ -1,408 +0,0 @@ -[CmdletBinding()] -param ( - $libraries = @(), - $version = "1.70.0" -) - -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition - -function TransformReference() -{ - param ( - [string]$library - ) - - if ($library -match "python|fiber") - { - # These two only work on windows desktop - "$library (windows)" - } - elseif ($library -match "thread|type[_-]erasure|contract") - { - # thread only works on x86-based processors - "$library (!arm)" - } - elseif ($library -match "iostreams|filesystem|context|stacktrace|coroutine`$|locale|test|wave|log`$") - { - "$library (!uwp)" - } - else - { - "$library" - } -} - -function Generate() -{ - param ( - [string]$Name, - [string]$Hash, - [bool]$NeedsBuild, - $Depends = @() - ) - - $controlDeps = ($Depends | sort) -join ", " - - $sanitizedName = $name -replace "_","-" - - $versionsuffix = "" - if ($Name -eq "python" -or $Name -eq "asio" -or $Name -eq "mpi") - { - $versionsuffix = "-1" - } - - if ($Name -eq "test") - { - $versionsuffix = "-2" - } - - mkdir "$scriptsDir/../boost-$sanitizedName" -erroraction SilentlyContinue | out-null - $controlLines = @( - "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" - "Source: boost-$sanitizedName" - "Version: $version$versionsuffix" - "Build-Depends: $controlDeps" - "Description: Boost $Name module" - ) - if ($Name -eq "locale") - { - $controlLines += @( - "" - "Feature: icu" - "Description: ICU backend for Boost.Locale" - "Build-Depends: icu" - ) - } - if ($Name -eq "regex") - { - $controlLines += @( - "" - "Feature: icu" - "Description: ICU backend for Boost.Regex" - "Build-Depends: icu" - ) - } - $controlLines | out-file -enc ascii "$scriptsDir/../boost-$sanitizedName/CONTROL" - - $portfileLines = @( - "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" - "" - "include(vcpkg_common_functions)" - "" - "vcpkg_from_github(" - " OUT_SOURCE_PATH SOURCE_PATH" - " REPO boostorg/$Name" - " REF boost-$version" - " SHA512 $Hash" - " HEAD_REF master" - ) - if ($Name -eq "thread") - { - $portfileLines += @(" PATCHES avoid-winapi.patch") - } - $portfileLines += @( - ")" - "" - ) - - if (Test-Path "$scriptsDir/post-source-stubs/$Name.cmake") - { - $portfileLines += @(get-content "$scriptsDir/post-source-stubs/$Name.cmake") - } - - if ($NeedsBuild) - { - if ($Name -eq "locale") - { - $portfileLines += @( - "if(`"icu`" IN_LIST FEATURES)" - " set(BOOST_LOCALE_ICU on)" - "else()" - " set(BOOST_LOCALE_ICU off)" - "endif()" - "" - "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" - "boost_modular_build(" - " SOURCE_PATH `${SOURCE_PATH}" - " BOOST_CMAKE_FRAGMENT `"`${CMAKE_CURRENT_LIST_DIR}/cmake-fragment.cmake`"" - " OPTIONS" - " boost.locale.iconv=off" - " boost.locale.posix=off" - " /boost/locale//boost_locale" - " boost.locale.icu=`${BOOST_LOCALE_ICU}" - ")" - ) - } - elseif ($Name -eq "regex") - { - $portfileLines += @( - "if(`"icu`" IN_LIST FEATURES)" - " set(REQUIREMENTS `"/user-config//icuuc /user-config//icudt /user-config//icuin BOOST_HAS_ICU=1`")" - "else()" - " set(REQUIREMENTS)" - "endif()" - "" - "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" - "boost_modular_build(SOURCE_PATH `${SOURCE_PATH} REQUIREMENTS `"`${REQUIREMENTS}`")" - ) - } - elseif ($Name -eq "thread") - { - $portfileLines += @( - "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" - "boost_modular_build(" - " SOURCE_PATH `${SOURCE_PATH}" - " REQUIREMENTS `"/boost/date_time//boost_date_time`"" - " OPTIONS /boost/thread//boost_thread" - " BOOST_CMAKE_FRAGMENT `${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" - ")" - ) - } - else - { - $portfileLines += @( - "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" - "boost_modular_build(SOURCE_PATH `${SOURCE_PATH})" - ) - } - } - $portfileLines += @( - "include(`${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)" - "boost_modular_headers(SOURCE_PATH `${SOURCE_PATH})" - ) - - if (Test-Path "$scriptsDir/post-build-stubs/$Name.cmake") - { - $portfileLines += @(get-content "$scriptsDir/post-build-stubs/$Name.cmake") - } - - $portfileLines | out-file -enc ascii "$scriptsDir/../boost-$sanitizedName/portfile.cmake" -} - -if (!(Test-Path "$scriptsDir/boost")) -{ - "Cloning boost..." - pushd $scriptsDir - try - { - git clone https://github.com/boostorg/boost --branch boost-$version - } - finally - { - popd - } -} -else -{ - pushd $scriptsDir/boost - try - { - git fetch - git checkout -f boost-$version - } - finally - { - popd - } -} - -$libraries_found = ls $scriptsDir/boost/libs -directory | % name | % { - if ($_ -match "numeric") - { - "numeric_conversion" - "interval" - "odeint" - "ublas" - "safe_numerics" - } - elseif ($_ -eq "headers") - { - } - else - { - $_ - } -} - -mkdir $scriptsDir/downloads -erroraction SilentlyContinue | out-null - -if ($libraries.Length -eq 0) -{ - $libraries = $libraries_found -} - -$libraries_in_boost_port = @() - -foreach ($library in $libraries) -{ - "Handling boost/$library..." - $archive = "$scriptsDir/downloads/$library-boost-$version.tar.gz" - if (!(Test-Path $archive)) - { - "Downloading boost/$library..." - & @(vcpkg fetch aria2)[-1] "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -d "$scriptsDir/downloads" -o "$library-boost-$version.tar.gz" - } - $hash = vcpkg hash $archive - $unpacked = "$scriptsDir/libs/$library-boost-$version" - if (!(Test-Path $unpacked)) - { - "Unpacking boost/$library..." - mkdir $scriptsDir/libs -erroraction SilentlyContinue | out-null - pushd $scriptsDir/libs - try - { - cmake -E tar xf $archive - } - finally - { - popd - } - } - pushd $unpacked - try - { - $groups = $( - findstr /si /C:"include ).*", "`$1" ` - -replace "/|\.hp?p?| ","" } | group | % name | % { - # mappings - Write-Verbose "${library}: $_" - if ($_ -match "aligned_storage") { "type_traits" } - elseif ($_ -match "noncopyable|ref|swap|get_pointer|checked_delete|visit_each") { "core" } - elseif ($_ -eq "type") { "core" } - elseif ($_ -match "unordered_") { "unordered" } - elseif ($_ -match "cstdint") { "integer" } - elseif ($_ -match "call_traits|operators|current_function|cstdlib|next_prior|compressed_pair") { "utility" } - elseif ($_ -match "^version|^workaround") { "config" } - elseif ($_ -match "enable_shared_from_this|shared_ptr|make_shared|make_unique|intrusive_ptr|scoped_ptr|pointer_to_other|weak_ptr|shared_array|scoped_array") { "smart_ptr" } - elseif ($_ -match "iterator_adaptors|generator_iterator|pointee") { "iterator" } - elseif ($_ -eq "regex_fwd") { "regex" } - elseif ($_ -eq "make_default") { "convert" } - elseif ($_ -eq "foreach_fwd") { "foreach" } - elseif ($_ -eq "cerrno") { "system" } - elseif ($_ -eq "archive") { "serialization" } - elseif ($_ -eq "none") { "optional" } - elseif ($_ -eq "integer_traits") { "integer" } - elseif ($_ -eq "limits") { "compatibility" } - elseif ($_ -eq "math_fwd") { "math" } - elseif ($_ -match "polymorphic_cast|implicit_cast") { "conversion" } - elseif ($_ -eq "nondet_random") { "random" } - elseif ($_ -eq "memory_order") { "atomic" } - elseif ($_ -eq "blank") { "detail" } - elseif ($_ -match "is_placeholder|mem_fn") { "bind" } - elseif ($_ -eq "exception_ptr") { "exception" } - elseif ($_ -eq "multi_index_container") { "multi_index" } - elseif ($_ -eq "lexical_cast") { "lexical_cast"; "math" } - elseif ($_ -match "token_iterator|token_functions") { "tokenizer" } - elseif ($_ -eq "numeric" -and $library -notmatch "numeric_conversion|interval|odeint|ublas") { "numeric_conversion"; "interval"; "odeint"; "ublas" } - else { $_ } - } | group | % name | ? { $_ -ne $library } - - #"`nFor ${library}:" - " [known] " + $($groups | ? { $libraries_found -contains $_ }) - " [unknown] " + $($groups | ? { $libraries_found -notcontains $_ }) - - $deps = @($groups | ? { $libraries_found -contains $_ }) - - $deps = @($deps | ? { - # Boost contains cycles, so remove a few dependencies to break the loop. - (($library -notmatch "core|assert|mpl|detail|throw_exception|type_traits|^exception") -or ($_ -notmatch "utility")) ` - -and ` - (($library -notmatch "range") -or ($_ -notmatch "algorithm"))` - -and ` - (($library -ne "config") -or ($_ -notmatch "integer"))` - -and ` - (($library -notmatch "multiprecision") -or ($_ -notmatch "random|math"))` - -and ` - (($library -notmatch "lexical_cast") -or ($_ -notmatch "math"))` - -and ` - (($library -notmatch "functional") -or ($_ -notmatch "function"))` - -and ` - (($library -notmatch "detail") -or ($_ -notmatch "static_assert|integer|mpl|type_traits"))` - -and ` - ($_ -notmatch "mpi")` - -and ` - (($library -notmatch "spirit") -or ($_ -notmatch "serialization"))` - -and ` - (($library -notmatch "throw_exception") -or ($_ -notmatch "^exception"))` - -and ` - (($library -notmatch "iostreams") -or ($_ -notmatch "random"))` - -and ` - (($library -notmatch "utility|concept_check") -or ($_ -notmatch "iterator")) - } | % { "boost-$_" -replace "_","-" } | % { - TransformReference $_ - }) - - $deps += @("boost-vcpkg-helpers") - - $needsBuild = $false - if ((Test-Path $unpacked/build/Jamfile.v2) -and $library -ne "metaparse" -and $library -ne "graph_parallel") - { - $deps += @("boost-build", "boost-modular-build-helper") - $needsBuild = $true - } - - if ($library -eq "python") - { - $deps += @("python3") - $needsBuild = $true - } - elseif ($library -eq "iostreams") - { - $deps += @("zlib", "bzip2", "liblzma") - } - elseif ($library -eq "locale") - { - $deps += @("libiconv (!uwp&!windows)") - } - elseif ($library -eq "asio") - { - $deps += @("openssl") - } - elseif ($library -eq "mpi") - { - $deps += @("mpi") - } - - Generate ` - -Name $library ` - -Hash $hash ` - -Depends $deps ` - -NeedsBuild $needsBuild - - $libraries_in_boost_port += @(TransformReference $library) - } - finally - { - popd - } -} - -if ($libraries_in_boost_port.length -gt 1) { - # Generate master boost control file which depends on each individual library - # mpi is excluded due to it having a dependency on msmpi - $boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" } | ? { $_ -notmatch "boost-mpi" }) -join ", " - - @( - "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" - "Source: boost" - "Version: $version" - "Description: Peer-reviewed portable C++ source libraries" - "Build-Depends: $boostDependsList" - "" - "Feature: mpi" - "Description: Build with MPI support" - "Build-Depends: boost-mpi" - ) | out-file -enc ascii $scriptsDir/../boost/CONTROL - - "set(VCPKG_POLICY_EMPTY_PACKAGE enabled)`n" | out-file -enc ascii $scriptsDir/../boost/portfile.cmake -} - -return diff --git a/ports/boost-vcpkg-helpers/portfile.cmake b/ports/boost-vcpkg-helpers/portfile.cmake index 32f501f24671f6..0233bda5aa7b1a 100644 --- a/ports/boost-vcpkg-helpers/portfile.cmake +++ b/ports/boost-vcpkg-helpers/portfile.cmake @@ -1,7 +1,8 @@ -file( - COPY ${CMAKE_CURRENT_LIST_DIR}/boost-modular-headers.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-vcpkg-helpers +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/boost-modular-headers.cmake + ${CMAKE_CURRENT_LIST_DIR}/usage + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} ) set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/log.cmake b/ports/boost-vcpkg-helpers/post-source-stubs/log.cmake deleted file mode 100644 index 78500ddc319c60..00000000000000 --- a/ports/boost-vcpkg-helpers/post-source-stubs/log.cmake +++ /dev/null @@ -1,13 +0,0 @@ -file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) -string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") -string(REPLACE " @select-arch-specific-sources" "#@select-arch-specific-sources" _contents "${_contents}") -file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") -file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") - -file(READ ${SOURCE_PATH}/build/log-architecture.jam _contents) -string(REPLACE - "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" - "\nproject.load [ path.join [ path.make $(here:D) ] config/checks/architecture ] ;" - _contents "${_contents}") -file(WRITE ${SOURCE_PATH}/build/log-architecture.jam "${_contents}") - diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/python.cmake b/ports/boost-vcpkg-helpers/post-source-stubs/python.cmake deleted file mode 100644 index 40b8e0a0b0e453..00000000000000 --- a/ports/boost-vcpkg-helpers/post-source-stubs/python.cmake +++ /dev/null @@ -1,5 +0,0 @@ -# Find Python. Can't use find_package here, but we already know where everything is -file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") -set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") -set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") -string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}") diff --git a/ports/boost-vcpkg-helpers/usage b/ports/boost-vcpkg-helpers/usage new file mode 100644 index 00000000000000..89a0376daddec3 --- /dev/null +++ b/ports/boost-vcpkg-helpers/usage @@ -0,0 +1,4 @@ +The package boost is compatible with built-in CMake targets: + + find_package(Boost REQUIRED [COMPONENTS ...]) + target_link_libraries(main PRIVATE Boost::boost Boost:: Boost:: ...) diff --git a/ports/boost-vcpkg-helpers/vcpkg.json b/ports/boost-vcpkg-helpers/vcpkg.json new file mode 100644 index 00000000000000..d22659efc64678 --- /dev/null +++ b/ports/boost-vcpkg-helpers/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "boost-vcpkg-helpers", + "version-string": "7", + "port-version": 2, + "description": "a set of vcpkg-internal scripts used to modularize boost", + "dependencies": [ + "boost-uninstall" + ] +} diff --git a/ports/boost-vmd/CONTROL b/ports/boost-vmd/CONTROL deleted file mode 100644 index 6c2bda21a43f3d..00000000000000 --- a/ports/boost-vmd/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-vmd -Version: 1.70.0 -Build-Depends: boost-preprocessor, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/vmd -Description: Boost vmd module diff --git a/ports/boost-vmd/portfile.cmake b/ports/boost-vmd/portfile.cmake index 0f8ac16c1fba79..1754882e45e58c 100644 --- a/ports/boost-vmd/portfile.cmake +++ b/ports/boost-vmd/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/vmd - REF boost-1.70.0 - SHA512 88290fb0718b4681f684ffabe756ae1f80fb91f658382444c1e71756ec8138e41db395601dbbd30081b7cda37076574b4de3a08384ced1142551ee04e3680128 + REF boost-1.76.0 + SHA512 a5abe1352bce1a8358230df914ad19acc99ecb6a077248274bf2aca956a0bd0f7b9490f38891c51e3ee3323b37878c4098e39b61ea86e63f0f915a81f8553283 HEAD_REF master ) diff --git a/ports/boost-vmd/vcpkg.json b/ports/boost-vmd/vcpkg.json new file mode 100644 index 00000000000000..125cc7fc56e08c --- /dev/null +++ b/ports/boost-vmd/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "boost-vmd", + "version": "1.76.0", + "description": "Boost vmd module", + "homepage": "https://github.com/boostorg/vmd", + "dependencies": [ + "boost-preprocessor", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-wave/CONTROL b/ports/boost-wave/CONTROL deleted file mode 100644 index 279eb57006a501..00000000000000 --- a/ports/boost-wave/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-wave -Version: 1.70.0 -Build-Depends: boost-assert, boost-build, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (!uwp), boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/wave -Description: Boost wave module diff --git a/ports/boost-wave/portfile.cmake b/ports/boost-wave/portfile.cmake index 189eccc574d048..db17a26737eccb 100644 --- a/ports/boost-wave/portfile.cmake +++ b/ports/boost-wave/portfile.cmake @@ -1,16 +1,17 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/wave - REF boost-1.70.0 - SHA512 0ad42a92f8a7361fd0ba99b319826b74aaf81b5ac2b85f9fc1cd4e065a3931924a13151cdc827e11e7ad34d4526ebfcb55f64d40e7b2eabb1ab7f72e02d304c0 + REF boost-1.76.0 + SHA512 eb44ee15a836d926fa24585389a7e3eb355141846401e9e9b3a69754235d8a99fa3a01107462b8e4081dff072be47222b7e52c510b2ca884dfdb65dfaff2fe1e HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR) + message(FATAL_ERROR "boost-wave requires a newer version of vcpkg in order to build.") +endif() +include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-wave/vcpkg.json b/ports/boost-wave/vcpkg.json new file mode 100644 index 00000000000000..2d07b287d25c8b --- /dev/null +++ b/ports/boost-wave/vcpkg.json @@ -0,0 +1,41 @@ +{ + "name": "boost-wave", + "version": "1.76.0", + "description": "Boost wave module", + "homepage": "https://github.com/boostorg/wave", + "supports": "!uwp", + "dependencies": [ + "boost-assert", + { + "name": "boost-build", + "host": true + }, + "boost-concept-check", + "boost-config", + "boost-core", + "boost-detail", + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + "boost-iterator", + "boost-lexical-cast", + "boost-math", + { + "name": "boost-modular-build-helper", + "host": true + }, + "boost-mpl", + "boost-multi-index", + "boost-optional", + "boost-pool", + "boost-preprocessor", + "boost-serialization", + "boost-smart-ptr", + "boost-spirit", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-winapi/CONTROL b/ports/boost-winapi/CONTROL deleted file mode 100644 index 985612d10192da..00000000000000 --- a/ports/boost-winapi/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-winapi -Version: 1.70.0 -Build-Depends: boost-config, boost-predef, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/winapi -Description: Boost winapi module diff --git a/ports/boost-winapi/portfile.cmake b/ports/boost-winapi/portfile.cmake index 0877a216faf90c..c95542ab5e58c7 100644 --- a/ports/boost-winapi/portfile.cmake +++ b/ports/boost-winapi/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/winapi - REF boost-1.70.0 - SHA512 aa14bbb4dad1a5fbbd0177918325cc8138268c7c311dca4aef9c4570b8630dceb4b5448e0fc440afca30bd9eef2cd37b5d99843f482131249065cf76d5654174 + REF boost-1.76.0 + SHA512 f16965928f0781123a17d13b0f73b1af33d22baa412f87acf4355c6f110318f424b535a559d366d61b111ed1f9eda9140e7cc357f50936e0f8049e1fd44bbe47 HEAD_REF master ) diff --git a/ports/boost-winapi/vcpkg.json b/ports/boost-winapi/vcpkg.json new file mode 100644 index 00000000000000..804e1be14e4933 --- /dev/null +++ b/ports/boost-winapi/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "boost-winapi", + "version": "1.76.0", + "description": "Boost winapi module", + "homepage": "https://github.com/boostorg/winapi", + "dependencies": [ + "boost-config", + "boost-predef", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-xpressive/CONTROL b/ports/boost-xpressive/CONTROL deleted file mode 100644 index d2960cf5b93b6d..00000000000000 --- a/ports/boost-xpressive/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-xpressive -Version: 1.70.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-exception, boost-fusion, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers -Homepage: https://github.com/boostorg/xpressive -Description: Boost xpressive module diff --git a/ports/boost-xpressive/portfile.cmake b/ports/boost-xpressive/portfile.cmake index 79bc1d026c057a..302004ee91da9d 100644 --- a/ports/boost-xpressive/portfile.cmake +++ b/ports/boost-xpressive/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/xpressive - REF boost-1.70.0 - SHA512 4b242c54b50331cf4bc5318610efe2269ea3794264bec832debb39fb77910d26bb576837b35dce829fb13674a5b427231406e059f7dcbe68f01ba6317af988f6 + REF boost-1.76.0 + SHA512 ce0ecfde6f1bbd0dcb0765a8a4648a6978e090f5563c7828e0bd95ea35e91788d1871965c3cec4f2a6d366cd9d2ef29f75b47474a8bfeb684873d074c002e1f1 HEAD_REF master ) diff --git a/ports/boost-xpressive/vcpkg.json b/ports/boost-xpressive/vcpkg.json new file mode 100644 index 00000000000000..99c4899e2017e0 --- /dev/null +++ b/ports/boost-xpressive/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "boost-xpressive", + "version": "1.76.0", + "description": "Boost xpressive module", + "homepage": "https://github.com/boostorg/xpressive", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-conversion", + "boost-core", + "boost-detail", + "boost-exception", + "boost-fusion", + "boost-integer", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + "boost-mpl", + "boost-numeric-conversion", + "boost-optional", + "boost-preprocessor", + "boost-proto", + "boost-range", + "boost-smart-ptr", + "boost-spirit", + "boost-static-assert", + "boost-throw-exception", + "boost-type-traits", + "boost-typeof", + "boost-utility", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost-yap/CONTROL b/ports/boost-yap/CONTROL deleted file mode 100644 index 48dea0e8d90c61..00000000000000 --- a/ports/boost-yap/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost-yap -Version: 1.70.0 -Build-Depends: boost-hana, boost-preprocessor, boost-type-index, boost-vcpkg-helpers -Description: Boost yap module diff --git a/ports/boost-yap/portfile.cmake b/ports/boost-yap/portfile.cmake index 1061140092b501..d2a6e23f92d55a 100644 --- a/ports/boost-yap/portfile.cmake +++ b/ports/boost-yap/portfile.cmake @@ -1,12 +1,10 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - -include(vcpkg_common_functions) +# Automatically generated by scripts/boost/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/yap - REF boost-1.70.0 - SHA512 f6211eed15eb28418513a525efc250993eed9aa940a20ed989e5f7af6c0890c06e3a0aa571e6825a8b15c62a7f238c7e269872f7b6c3bc3ab2e097a9f101fcf6 + REF boost-1.76.0 + SHA512 88c97e7b36748f925b2566c6308729b74419c118095de17011900497017bd3a0a445a0c29a0912da8852284b6fdf5d0e34bb63e7aa6790a9213b460ad57d1983 HEAD_REF master ) diff --git a/ports/boost-yap/vcpkg.json b/ports/boost-yap/vcpkg.json new file mode 100644 index 00000000000000..58313ddbf6a03d --- /dev/null +++ b/ports/boost-yap/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "boost-yap", + "version": "1.76.0", + "description": "Boost yap module", + "homepage": "https://github.com/boostorg/yap", + "dependencies": [ + "boost-hana", + "boost-preprocessor", + "boost-type-index", + "boost-vcpkg-helpers" + ] +} diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL deleted file mode 100644 index 54dfc3c7a643c4..00000000000000 --- a/ports/boost/CONTROL +++ /dev/null @@ -1,10 +0,0 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 -Source: boost -Version: 1.70.0 -Homepage: https://boost.org -Description: Peer-reviewed portable C++ source libraries -Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-container-hash, boost-context (!uwp), boost-contract (!arm), boost-conversion, boost-convert, boost-core, boost-coroutine (!uwp), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (!uwp), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-histogram, boost-hof, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (!uwp), boost-local-function, boost-lockfree, boost-log (!uwp), boost-logic, boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-safe-numerics, boost-optional, boost-outcome, boost-parameter, boost-parameter-python (windows), boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options, boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-safe-numerics, boost-scope-exit, boost-serialization, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (!uwp), boost-statechart, boost-static-assert, boost-system, boost-test (!uwp), boost-thread (!arm), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (!arm), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (!uwp), boost-winapi, boost-xpressive, boost-yap - -Feature: mpi -Description: Build with MPI support -Build-Depends: boost-mpi diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 0283a20857db3e..df3ab59c3ba7c0 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -1,2 +1,2 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - + diff --git a/ports/boost/vcpkg.json b/ports/boost/vcpkg.json new file mode 100644 index 00000000000000..2ea1d4d3b8f83d --- /dev/null +++ b/ports/boost/vcpkg.json @@ -0,0 +1,210 @@ +{ + "name": "boost", + "version": "1.76.0", + "description": "Peer-reviewed portable C++ source libraries", + "homepage": "https://boost.org", + "dependencies": [ + "boost-accumulators", + "boost-algorithm", + "boost-align", + "boost-any", + "boost-array", + { + "name": "boost-asio", + "platform": "!emscripten" + }, + "boost-assert", + "boost-assign", + "boost-atomic", + { + "name": "boost-beast", + "platform": "!emscripten" + }, + "boost-bimap", + "boost-bind", + "boost-callable-traits", + "boost-chrono", + "boost-circular-buffer", + "boost-compatibility", + "boost-compute", + "boost-concept-check", + "boost-config", + "boost-container", + "boost-container-hash", + { + "name": "boost-context", + "platform": "!uwp & !emscripten" + }, + "boost-contract", + "boost-conversion", + "boost-convert", + "boost-core", + { + "name": "boost-coroutine", + "platform": "!arm & !uwp & !emscripten" + }, + { + "name": "boost-coroutine2", + "platform": "!emscripten" + }, + "boost-crc", + "boost-date-time", + "boost-detail", + "boost-dll", + "boost-dynamic-bitset", + "boost-endian", + "boost-exception", + { + "name": "boost-fiber", + "platform": "!osx & !uwp & !arm & !emscripten" + }, + { + "name": "boost-filesystem", + "platform": "!uwp" + }, + "boost-flyweight", + "boost-foreach", + "boost-format", + "boost-function", + "boost-function-types", + "boost-functional", + "boost-fusion", + "boost-geometry", + "boost-gil", + "boost-graph", + "boost-graph-parallel", + "boost-hana", + "boost-heap", + "boost-histogram", + "boost-hof", + "boost-icl", + "boost-integer", + "boost-interprocess", + "boost-interval", + "boost-interval", + "boost-intrusive", + "boost-io", + { + "name": "boost-iostreams", + "platform": "!uwp" + }, + "boost-iterator", + "boost-json", + "boost-lambda", + "boost-leaf", + "boost-lexical-cast", + "boost-local-function", + { + "name": "boost-locale", + "platform": "!uwp" + }, + "boost-lockfree", + { + "name": "boost-log", + "platform": "!uwp & !emscripten" + }, + "boost-logic", + "boost-math", + "boost-metaparse", + "boost-move", + "boost-mp11", + "boost-mpl", + "boost-msm", + "boost-multi-array", + "boost-multi-index", + "boost-multiprecision", + "boost-nowide", + "boost-numeric-conversion", + "boost-numeric-conversion", + "boost-odeint", + "boost-odeint", + "boost-optional", + "boost-outcome", + "boost-parameter", + { + "name": "boost-parameter-python", + "platform": "!emscripten" + }, + "boost-pfr", + "boost-phoenix", + "boost-poly-collection", + "boost-polygon", + "boost-pool", + "boost-predef", + "boost-preprocessor", + { + "name": "boost-process", + "platform": "!emscripten" + }, + "boost-program-options", + "boost-property-map", + "boost-property-tree", + "boost-proto", + "boost-ptr-container", + { + "name": "boost-python", + "platform": "!uwp & !(arm & windows) & !emscripten" + }, + "boost-qvm", + "boost-random", + "boost-range", + "boost-ratio", + "boost-rational", + "boost-regex", + "boost-safe-numerics", + "boost-safe-numerics", + "boost-scope-exit", + "boost-serialization", + "boost-signals2", + "boost-smart-ptr", + "boost-sort", + "boost-spirit", + { + "name": "boost-stacktrace", + "platform": "!uwp" + }, + "boost-statechart", + "boost-static-assert", + "boost-static-string", + "boost-stl-interfaces", + "boost-system", + { + "name": "boost-test", + "platform": "!uwp" + }, + "boost-thread", + "boost-throw-exception", + "boost-timer", + "boost-tokenizer", + "boost-tti", + "boost-tuple", + "boost-type-erasure", + "boost-type-index", + "boost-type-traits", + "boost-typeof", + "boost-ublas", + "boost-ublas", + "boost-units", + "boost-unordered", + "boost-utility", + "boost-uuid", + "boost-variant", + "boost-variant2", + "boost-vmd", + { + "name": "boost-wave", + "platform": "!uwp" + }, + "boost-winapi", + "boost-xpressive", + "boost-yap" + ], + "features": { + "mpi": { + "description": "Build with MPI support", + "dependencies": [ + "boost-mpi" + ] + } + } +} diff --git a/ports/boringssl/0001-vcpkg.patch b/ports/boringssl/0001-vcpkg.patch new file mode 100644 index 00000000000000..f871dd92be529f --- /dev/null +++ b/ports/boringssl/0001-vcpkg.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 893bca7..83ff477 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -562,7 +562,7 @@ endif() + + # Add minimal googletest targets. The provided one has many side-effects, and + # googletest has a very straightforward build. +-add_library(boringssl_gtest third_party/googletest/src/gtest-all.cc) ++add_library(boringssl_gtest STATIC third_party/googletest/src/gtest-all.cc) + target_include_directories(boringssl_gtest PRIVATE third_party/googletest) + + include_directories(third_party/googletest/include) +@@ -649,3 +649,18 @@ add_custom_target( + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + DEPENDS all_tests bssl_shim handshaker fips_specific_tests_if_any + USES_TERMINAL) ++ ++install(TARGETS crypto ssl ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ ++option(INSTALL_HEADERS "Install headers" ON) ++if(INSTALL_HEADERS) ++ install(DIRECTORY include/ DESTINATION include) ++endif() ++ ++option(INSTALL_TOOLS "Install bssl executable" OFF) ++if(INSTALL_TOOLS) ++ install(TARGETS bssl DESTINATION tools/boringssl) ++endif() diff --git a/ports/boringssl/0002-disable-waring-4065.patch b/ports/boringssl/0002-disable-waring-4065.patch new file mode 100644 index 00000000000000..88ffffaf0bdaea --- /dev/null +++ b/ports/boringssl/0002-disable-waring-4065.patch @@ -0,0 +1,15 @@ +diff --git a/decrepit/CMakeLists.txt b/decrepit/CMakeLists.txt +index ef95a6b..0b52c05 100644 +--- a/decrepit/CMakeLists.txt ++++ b/decrepit/CMakeLists.txt +@@ -40,6 +40,10 @@ add_executable( + + add_dependencies(decrepit_test global_target) + ++if(MSVC) ++ target_compile_options(decrepit PRIVATE /wd4065) ++endif() ++ + target_link_libraries(decrepit_test test_support_lib boringssl_gtest decrepit + crypto) + if(WIN32) diff --git a/ports/boringssl/portfile.cmake b/ports/boringssl/portfile.cmake new file mode 100644 index 00000000000000..71cef4ed35058f --- /dev/null +++ b/ports/boringssl/portfile.cmake @@ -0,0 +1,51 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(FATAL_ERROR "Can't build BoringSSL if OpenSSL is installed. Please remove OpenSSL, and try to install BoringSSL again if you need it. Build will continue since BoringSSL is a drop-in replacement for OpenSSL") +endif() + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_EXE_PATH}) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(${NASM_EXE_PATH}) + +vcpkg_find_acquire_program(GO) +get_filename_component(GO_EXE_PATH ${GO} DIRECTORY) +vcpkg_add_to_path(${GO_EXE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools INSTALL_TOOLS +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/boringssl + REF 479adf98d54a21c1d154aac59b2ce120e1d1a6d6 + SHA512 74b5d001c0f5c1846b8818e9e668fa35de5171fc21a8f713d241f57b3e8abe42426fdc66b085cca1853b904def6f4bea573dfed40b8b1422894cca85b0b1a44a + HEAD_REF master + PATCHES + 0001-vcpkg.patch + 0002-disable-waring-4065.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + -DINSTALL_TOOLS=OFF +) + +vcpkg_install_cmake() + +if(IS_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boringssl) + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/boringssl") +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/boringssl/vcpkg.json b/ports/boringssl/vcpkg.json new file mode 100644 index 00000000000000..e3aaec032fd75d --- /dev/null +++ b/ports/boringssl/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "boringssl", + "version-date": "2021-06-23", + "description": "BoringSSl is a fork of OpenSSL developed by Google", + "homepage": "https://boringssl.googlesource.com/boringssl", + "supports": "!uwp", + "features": { + "tools": { + "description": "Build bssl executable" + } + } +} diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL deleted file mode 100644 index 48ee015498b7f7..00000000000000 --- a/ports/botan/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: botan -Version: 2.9.0-2 -Homepage: https://botan.randombit.net -Description: A cryptography library written in C++11 diff --git a/ports/botan/fix-build_error.patch b/ports/botan/fix-build_error.patch deleted file mode 100644 index 85cae86b0501e9..00000000000000 --- a/ports/botan/fix-build_error.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/src/lib/utils/filesystem.cpp b/src/lib/utils/filesystem.cpp -index 053c91e..8e0a271 100644 ---- a/src/lib/utils/filesystem.cpp -+++ b/src/lib/utils/filesystem.cpp -@@ -9,8 +9,10 @@ - #include - #include - -+#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING -+ - #if defined(BOTAN_TARGET_OS_HAS_STL_FILESYSTEM_MSVC) && defined(BOTAN_BUILD_COMPILER_IS_MSVC) -- #include -+ #include - #elif defined(BOTAN_HAS_BOOST_FILESYSTEM) - #include - #elif defined(BOTAN_TARGET_OS_HAS_POSIX1) -@@ -38,7 +40,7 @@ std::vector impl_stl_filesystem(const std::string& dir) - #if (_MSVC_LANG >= 201703L) - using namespace std::filesystem; - #else -- using namespace std::tr2::sys; -+ using namespace std::experimental::filesystem; - #endif - - std::vector out; diff --git a/ports/botan/fix-generate-build-path.patch b/ports/botan/fix-generate-build-path.patch new file mode 100644 index 00000000000000..455c1f1391897c --- /dev/null +++ b/ports/botan/fix-generate-build-path.patch @@ -0,0 +1,13 @@ +diff --git a/configure.py b/configure.py +index 89f87d4..ba7914f 100644 +--- a/configure.py ++++ b/configure.py +@@ -2076,7 +2076,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, + 'maintainer_mode': options.maintainer_mode, + + 'out_dir': build_dir, +- 'build_dir': build_paths.build_dir, ++ 'build_dir': os.path.abspath(build_paths.build_dir), + + 'doc_stamp_file': os.path.join(build_paths.build_dir, 'doc.stamp'), + 'makefile_path': os.path.join(build_paths.build_dir, '..', 'Makefile'), diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index 6d0c81c8d66905..4351791f3f1c15 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -1,15 +1,11 @@ -include(vcpkg_common_functions) - -set(BOTAN_VERSION 2.9.0) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO randombit/botan - REF 0129d3172ec419beb90a2b3487f6385a35da0742 - SHA512 a8328df5ad2693a96935d1d2202ddd6678a5ba9c63a8159acbe56f1c884fa5faaa71339e8f56284cfd00574a9b4f91bdb1fb22c36c8e899d9b4cbe881f4867d3 + REF d4bd416702a65eddcc14ee06b9c1b674631e6ae3 # 2.18.1 + SHA512 6c8a8a772ff926402aa77ea1156e8a6b8fcaa18514107c94e9d2c7c76daaf9a02ef8c5c249d1ddf56655bab0ecd0d91490d907fc2239259689662533089b09ad HEAD_REF master - PATCHES - fix-build_error.patch + PATCHES + fix-generate-build-path.patch ) if(CMAKE_HOST_WIN32) @@ -44,20 +40,29 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(BOTAN_FLAG_CPU x86) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(BOTAN_FLAG_CPU x86_64) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(BOTAN_FLAG_CPU arm32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(BOTAN_FLAG_CPU arm64) else() message(FATAL_ERROR "Unsupported architecture") endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + amalgamation BOTAN_AMALGAMATION +) + function(BOTAN_BUILD BOTAN_BUILD_TYPE) if(BOTAN_BUILD_TYPE STREQUAL "dbg") - set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR}/debug) + set(BOTAN_FLAG_PREFIX "${CURRENT_PACKAGES_DIR}/debug") set(BOTAN_FLAG_DEBUGMODE --debug-mode) set(BOTAN_DEBUG_SUFFIX "") set(BOTAN_MSVC_RUNTIME_SUFFIX "d") else() set(BOTAN_FLAG_DEBUGMODE) - set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR}) + set(BOTAN_FLAG_PREFIX "${CURRENT_PACKAGES_DIR}") set(BOTAN_MSVC_RUNTIME_SUFFIX "") endif() @@ -74,11 +79,16 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) ${BOTAN_FLAG_DEBUGMODE} "--distribution-info=vcpkg ${TARGET_TRIPLET}" --prefix=${BOTAN_FLAG_PREFIX} + --with-pkg-config --link-method=copy) if(CMAKE_HOST_WIN32) list(APPEND configure_arguments ${BOTAN_MSVC_RUNTIME}${BOTAN_MSVC_RUNTIME_SUFFIX}) endif() + if("-DBOTAN_AMALGAMATION=ON" IN_LIST FEATURE_OPTIONS) + list(APPEND configure_arguments --amalgamation) + endif() + vcpkg_execute_required_process( COMMAND "${PYTHON3}" "${SOURCE_PATH}/configure.py" ${configure_arguments} WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" @@ -97,45 +107,37 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) vcpkg_execute_required_process( COMMAND "${PYTHON3}" "${SOURCE_PATH}/src/scripts/install.py" --prefix=${BOTAN_FLAG_PREFIX} - --docdir=share + --bindir=${BOTAN_FLAG_PREFIX}/bin + --libdir=${BOTAN_FLAG_PREFIX}/lib + --pkgconfigdir=${BOTAN_FLAG_PREFIX}/lib + --includedir=${BOTAN_FLAG_PREFIX}/include WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" LOGNAME install-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND CMAKE_HOST_WIN32) - file(RENAME ${BOTAN_FLAG_PREFIX}/lib/botan${BOTAN_DEBUG_SUFFIX}.dll ${BOTAN_FLAG_PREFIX}/bin/botan${BOTAN_DEBUG_SUFFIX}.dll) - endif() - message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") endfunction() BOTAN_BUILD(rel) BOTAN_BUILD(dbg) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/botan) +file(RENAME "${CURRENT_PACKAGES_DIR}/include/botan-2/botan" "${CURRENT_PACKAGES_DIR}/include/botan") + +vcpkg_copy_pdbs() -set(cli_exe_name "botan") if(CMAKE_HOST_WIN32) - set(cli_exe_name "botan-cli.exe") + vcpkg_copy_tools(TOOL_NAMES botan-cli AUTO_CLEAN) +else() + vcpkg_copy_tools(TOOL_NAMES botan AUTO_CLEAN) endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${cli_exe_name} ${CURRENT_PACKAGES_DIR}/tools/botan/${cli_exe_name}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${cli_exe_name}) - -file(RENAME ${CURRENT_PACKAGES_DIR}/include/botan-2/botan ${CURRENT_PACKAGES_DIR}/include/botan) file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/include/botan-2 - ${CURRENT_PACKAGES_DIR}/share/botan-${BOTAN_VERSION}/manual) + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/include/botan-2" + "${CURRENT_PACKAGES_DIR}/share/doc") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() -vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/botan) - -file(RENAME ${CURRENT_PACKAGES_DIR}/share/botan-${BOTAN_VERSION}/ ${CURRENT_PACKAGES_DIR}/share/botan/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/botan/license.txt ${CURRENT_PACKAGES_DIR}/share/botan/copyright) +file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/botan/vcpkg.json b/ports/botan/vcpkg.json new file mode 100644 index 00000000000000..939b8399010a78 --- /dev/null +++ b/ports/botan/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "botan", + "version": "2.18.1", + "description": "A cryptography library written in C++11", + "homepage": "https://botan.randombit.net", + "supports": "!(windows & arm)", + "features": { + "amalgamation": { + "description": "Do an amalgamation build of the library" + } + } +} diff --git a/ports/box2d/CMakeLists.txt b/ports/box2d/CMakeLists.txt deleted file mode 100644 index 951554266690b7..00000000000000 --- a/ports/box2d/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -project(Box2d CXX) - -file(GLOB_RECURSE SOURCES Box2D/Box2D/*.cpp) - -add_library(Box2D ${SOURCES}) -target_include_directories(Box2D PUBLIC $ $) - -install(TARGETS Box2D - EXPORT unofficial-box2d-targets - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib -) - -install( - EXPORT unofficial-box2d-targets - FILE unofficial-box2d-config.cmake - NAMESPACE unofficial::box2d:: - DESTINATION share/unofficial-box2d -) diff --git a/ports/box2d/CONTROL b/ports/box2d/CONTROL deleted file mode 100644 index 98f6e2cbd5c7b0..00000000000000 --- a/ports/box2d/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: box2d -Version: 2.3.1-374664b-2 -Description: An open source C++ engine for simulating rigid bodies in 2D. -Homepage: https://box2d.org diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index 24da7f143951ca..e6004f07951690 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -1,32 +1,28 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO erincatto/Box2D - REF 374664b2a4ce2e7c24fbad6e1ed34bebcc9ab6bc - SHA512 39074bab01b36104aa685bfe39b40eb903d9dfb54cc3ba8098125db5291f55a8a9e578fc59563b2e8743abbbb26f419be7ae1524e235e7bd759257f99ff96bda + REF 9ebbbcd960ad424e03e5de6e66a40764c16f51bc #v2.4.1 + SHA512 d9fa387ce893ed1fb73f80006491202f2624ef6d0fb37daf92fbd1a7f9071c84da45e4b418b333566435bbbdfd3d5f68a42dfca02416e9a3a2b4db039f1c6151 HEAD_REF master ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DBOX2D_BUILD_UNIT_TESTS=OFF + -DBOX2D_BUILD_TESTBED=OFF ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-box2d TARGET_PATH share/unofficial-box2d) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file( - COPY ${SOURCE_PATH}/Box2D/Box2D - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN "*.h" -) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/box2d) vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/Box2D/License.txt ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/box2d/License.txt ${CURRENT_PACKAGES_DIR}/share/box2d/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/box2d/vcpkg.json b/ports/box2d/vcpkg.json new file mode 100644 index 00000000000000..38535d8fa8bfdf --- /dev/null +++ b/ports/box2d/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "box2d", + "version-semver": "2.4.1", + "port-version": 1, + "description": "An open source C++ engine for simulating rigid bodies in 2D", + "homepage": "https://box2d.org", + "supports": "!uwp" +} diff --git a/ports/breakpad/CMakeLists.txt b/ports/breakpad/CMakeLists.txt index 01c949251ee86d..3ff4bf3cd00ce7 100644 --- a/ports/breakpad/CMakeLists.txt +++ b/ports/breakpad/CMakeLists.txt @@ -11,7 +11,6 @@ add_definitions( -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE - -D_LIBCPP_VERSION ) set(CMAKE_DEBUG_POSTFIX d) @@ -20,52 +19,86 @@ string(COMPARE EQUAL "${CMAKE_BUILD_TYPE}" "Release" DEFAULT_INSTALL_HEADERS) option(INSTALL_HEADERS "Install header files" ${DEFAULT_INSTALL_HEADERS}) # libbreakpad target -file(GLOB_RECURSE LIBBREAKPAD_SOURCES src/processor/*.cc) -list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX - "_unittest|synth_minidump|/tests|/testdata|/linux|/mac|/android|/solaris|microdump_stackwalk|minidump_dump|minidump_stackwalk") +if(NOT CMAKE_SYSTEM_NAME STREQUAL Android) + file(GLOB_RECURSE LIBBREAKPAD_SOURCES src/processor/*.cc) + if(WIN32) + list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX + "_unittest|synth_minidump|/tests|/testdata|/linux|/mac|/android|/solaris|microdump_stackwalk|minidump_dump|minidump_stackwalk") + elseif(APPLE) + list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX + "_unittest|synth_minidump|/tests|/testdata|/linux|/windows|/android|/solaris|microdump_stackwalk|minidump_dump|minidump_stackwalk") + else() + list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX + "_unittest|synth_minidump|/tests|/testdata|/mac|/windows|/android|/solaris|microdump_stackwalk|minidump_dump|minidump_stackwalk") + endif() -find_library(LIBDISASM_LIB NAMES libdisasmd libdisasm) + find_library(LIBDISASM_LIB NAMES libdisasmd libdisasm) -add_library(libbreakpad ${LIBBREAKPAD_SOURCES}) -target_link_libraries(libbreakpad PRIVATE ${LIBDISASM_LIB}) + add_library(libbreakpad ${LIBBREAKPAD_SOURCES}) + target_link_libraries(libbreakpad PRIVATE ${LIBDISASM_LIB}) -target_include_directories(libbreakpad - PUBLIC - $ - $ -) + target_include_directories(libbreakpad + PUBLIC + $ + $ + ) -set(TARGETS libbreakpad) -if(WIN32) - # libbreakpad_client target does not currently work on non-windows + set(TARGETS libbreakpad) +endif() + +# libbreakpad_client target +if(CMAKE_SYSTEM_NAME STREQUAL Android) + file(READ "android/google_breakpad/Android.mk" android_mk) + string(REGEX MATCHALL "src/[^\n]*\\.cc" LIBBREAKPAD_CLIENT_SOURCES "${android_mk}") +else() if(WIN32) file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES src/client/windows/*.cc src/common/windows/*.cc) include_directories("$ENV{VSINSTALLDIR}/DIA SDK/include") elseif(APPLE) add_definitions(-DHAVE_MACH_O_NLIST_H) file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES src/client/mac/*.cc src/common/mac/*.cc) + list(APPEND LIBBREAKPAD_CLIENT_SOURCES src/common/mac/MachIPC.mm) else() add_definitions(-DHAVE_A_OUT_H) file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES src/client/linux/*.cc src/common/linux/*.cc) endif() file(GLOB LIBBREAKPAD_COMMON_SOURCES src/common/*.cc src/common/*.c src/client/*.cc) list(APPEND LIBBREAKPAD_CLIENT_SOURCES ${LIBBREAKPAD_COMMON_SOURCES}) - list(FILTER LIBBREAKPAD_CLIENT_SOURCES EXCLUDE REGEX "/tests|/unittests|_unittest") - if(WIN32) - list(FILTER LIBBREAKPAD_CLIENT_SOURCES EXCLUDE REGEX "language.cc|path_helper.cc|stabs_to_module.cc|stabs_reader.cc|minidump_file_writer.cc") +endif() +list(FILTER LIBBREAKPAD_CLIENT_SOURCES EXCLUDE REGEX "/sender|/tests|/unittests|/testcases|_unittest|_test") +if(WIN32) + list(FILTER LIBBREAKPAD_CLIENT_SOURCES EXCLUDE REGEX "language.cc|path_helper.cc|stabs_to_module.cc|stabs_reader.cc|minidump_file_writer.cc") +elseif(NOT APPLE) + try_compile(HAVE_GETCONTEXT ${CMAKE_BINARY_DIR}/check_getcontext ${CMAKE_CURRENT_LIST_DIR}/check_getcontext.cc OUTPUT_VARIABLE BUILD_OUT) + if (NOT HAVE_GETCONTEXT) + enable_language(ASM) + list(APPEND LIBBREAKPAD_CLIENT_SOURCES src/common/linux/breakpad_getcontext.S) endif() +endif() - add_library(libbreakpad_client ${LIBBREAKPAD_CLIENT_SOURCES}) +add_library(libbreakpad_client ${LIBBREAKPAD_CLIENT_SOURCES}) +if(WIN32) target_link_libraries(libbreakpad_client PRIVATE wininet.lib) - - target_include_directories(libbreakpad_client - PUBLIC - $ - $ - ) - list(APPEND TARGETS libbreakpad_client) +elseif(APPLE) + find_library(CoreFoundation_FRAMEWORK CoreFoundation) + target_link_libraries(libbreakpad_client PRIVATE ${CoreFoundation_FRAMEWORK}) +else() + find_library(PTHREAD_LIBRARIES pthread) + if(PTHREAD_LIBRARIES) + target_link_libraries(libbreakpad_client PRIVATE ${PTHREAD_LIBRARIES}) + endif() + if (HAVE_GETCONTEXT) + target_compile_definitions(libbreakpad_client PRIVATE HAVE_GETCONTEXT=1) + endif() endif() +target_include_directories(libbreakpad_client + PUBLIC + $ + $ +) +list(APPEND TARGETS libbreakpad_client) + # installation install(TARGETS ${TARGETS} EXPORT unofficial-breakpad-targets RUNTIME DESTINATION bin @@ -77,15 +110,22 @@ if(INSTALL_HEADERS) if(WIN32) set(HEADER_EXCLUDE_REGEX "/apple|/ios|/linux|/mac|/solaris|/android|/dwarf|/tests|/testdata|/unittests") elseif(APPLE) - set(HEADER_EXCLUDE_REGEX "/apple|/ios|/linux|/windows|/solaris|/android|/dwarf|/tests|/testdata|/unittests") + set(HEADER_EXCLUDE_REGEX "/apple|/ios|/linux|/windows|/solaris|/android|/dwarf|/tests|/testdata|/unittests|/sender|/testapp|/*proj|/gcov") else() set(HEADER_EXCLUDE_REGEX "/apple|/ios|/client/linux/data|/client/linux/sender|/windows|/mac|/solaris|/android|/dwarf|/tests|/testdata|/unittests") + install( + DIRECTORY src/third_party/lss + DESTINATION include/third_party + FILES_MATCHING PATTERN "*.h" + REGEX "${HEADER_EXCLUDE_REGEX}" EXCLUDE + ) endif() install( DIRECTORY src/client src/common src/google_breakpad DESTINATION include/ - FILES_MATCHING PATTERN "*.h" - REGEX "${HEADER_EXCLUDE_REGEX}" EXCLUDE + FILES_MATCHING + PATTERN "*.h" + REGEX ${HEADER_EXCLUDE_REGEX} EXCLUDE ) endif() diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL deleted file mode 100644 index 0f6ba1dcbfc395..00000000000000 --- a/ports/breakpad/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: breakpad -Version: 2019-05-08 -Build-Depends: libdisasm -Homepage: https://github.com/google/breakpad -Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/check_getcontext.cc b/ports/breakpad/check_getcontext.cc new file mode 100644 index 00000000000000..762147479f5c69 --- /dev/null +++ b/ports/breakpad/check_getcontext.cc @@ -0,0 +1,9 @@ +#include +#include + +int main() { + ucontext_t context; + getcontext(&context); + + return 0; +} diff --git a/ports/breakpad/fix-unique_ptr.patch b/ports/breakpad/fix-unique_ptr.patch new file mode 100644 index 00000000000000..4f81de3d9e850f --- /dev/null +++ b/ports/breakpad/fix-unique_ptr.patch @@ -0,0 +1,13 @@ +diff --git a/src/common/windows/pe_util.cc b/src/common/windows/pe_util.cc +index 9f9e8fa..d912635 100644 +--- a/src/common/windows/pe_util.cc ++++ b/src/common/windows/pe_util.cc +@@ -28,7 +28,7 @@ + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #include "pe_util.h" +- ++#include + #include + #include + #include diff --git a/ports/breakpad/fix-unordered_map.patch b/ports/breakpad/fix-unordered_map.patch new file mode 100644 index 00000000000000..0d131d2b8db3d7 --- /dev/null +++ b/ports/breakpad/fix-unordered_map.patch @@ -0,0 +1,14 @@ +diff --git a/src/common/unordered.h b/src/common/unordered.h +index c9cbd58..7743eda 100644 +--- a/src/common/unordered.h ++++ b/src/common/unordered.h +@@ -46,7 +46,8 @@ struct unordered_map : public __gnu_cxx::hash_map {}; + template > + struct unordered_set : public __gnu_cxx::hash_set {}; + +-#elif defined(_LIBCPP_VERSION) // c++11 ++#elif (__cplusplus >= 201103L) || defined(_LIBCPP_VERSION) || \ ++ (defined(_MSC_VER) && (_MSC_VER >= 1800)) // c++11 + #include + #include + using std::unordered_map; diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index 9bab01f233ea46..41a34342d178e2 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -1,16 +1,30 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad - REF 21b48a72aa50dde84149267f6b7402522b846b24 - SHA512 4ca2f877871c0a79c24ce4cc592dddb3ac4c2eac2a5962dad6d3d94edc91ac82afec3d7e4e7f81e7d9916eb83f8708e66759c38a6ef0e1b2c19691dd1518558a + REF 9c4671f2e3a63c0f155d9b2511192d0b5fa7f760 # accessed on 2020-09-14 + SHA512 4c9ed9b675a772f9a6a84692865381130901820cb395b725511e7a9e2cbf4aaa5212a9ef5f87086baf58bb9d729082232b564bd827a205f87b5c1ffc1c53892a HEAD_REF master + PATCHES + fix-unique_ptr.patch + fix-unordered_map.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +if(VCPKG_HOST_IS_LINUX OR VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID) + vcpkg_from_git( + OUT_SOURCE_PATH LSS_SOURCE_PATH + URL https://chromium.googlesource.com/linux-syscall-support + REF 7bde79cc274d06451bf65ae82c012a5d3e476b5a + ) + + file(RENAME ${LSS_SOURCE_PATH} ${SOURCE_PATH}/src/third_party/lss) +endif() + +file( + COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/check_getcontext.cc + DESTINATION ${SOURCE_PATH} +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -23,4 +37,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-breakpad TARGET_PATH shar vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/breakpad RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/breakpad/vcpkg.json b/ports/breakpad/vcpkg.json new file mode 100644 index 00000000000000..fc9efed3df96be --- /dev/null +++ b/ports/breakpad/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "breakpad", + "version-string": "2020-09-14", + "port-version": 3, + "description": "a set of client and server components which implement a crash-reporting system.", + "homepage": "https://github.com/google/breakpad", + "dependencies": [ + "libdisasm" + ] +} diff --git a/ports/brigand/CONTROL b/ports/brigand/CONTROL deleted file mode 100644 index 2fba63f77081d0..00000000000000 --- a/ports/brigand/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: brigand -Version: 1.3.0 -Homepage: https://github.com/edouarda/brigand -Description: Brigand is a light-weight, fully functional, instant-compile time C++ 11 meta-programming library. -Build-Depends: boost - diff --git a/ports/brigand/portfile.cmake b/ports/brigand/portfile.cmake index c7c17907f56266..22b7dc08fccb66 100644 --- a/ports/brigand/portfile.cmake +++ b/ports/brigand/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/brigand/vcpkg.json b/ports/brigand/vcpkg.json new file mode 100644 index 00000000000000..4f9d994120e30d --- /dev/null +++ b/ports/brigand/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "brigand", + "version-string": "1.3.0", + "port-version": 1, + "description": "Brigand is a light-weight, fully functional, instant-compile time C++ 11 meta-programming library.", + "homepage": "https://github.com/edouarda/brigand", + "dependencies": [ + "boost" + ] +} diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL deleted file mode 100644 index aef306101dd01d..00000000000000 --- a/ports/brotli/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: brotli -Version: 1.0.7 -Homepage: https://github.com/google/brotli -Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. diff --git a/ports/brotli/fix-arm-uwp.patch b/ports/brotli/fix-arm-uwp.patch new file mode 100644 index 00000000000000..7ed3fcd3dc88fe --- /dev/null +++ b/ports/brotli/fix-arm-uwp.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e6c6054..2c4b757 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,6 +124,8 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + add_definitions(-DOS_FREEBSD) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + add_definitions(-DOS_MACOSX) ++elseif(MSVC) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS) + endif() + + function(transform_sources_list INPUT_FILE OUTPUT_FILE) diff --git a/ports/brotli/fix-ios.patch b/ports/brotli/fix-ios.patch new file mode 100644 index 00000000000000..b3dee6aa03836d --- /dev/null +++ b/ports/brotli/fix-ios.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fcd9024..a717b87 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -225,6 +225,7 @@ if(NOT BROTLI_BUNDLED_MODE) + install( + TARGETS brotli + RUNTIME DESTINATION tools/brotli ++ BUNDLE DESTINATION tools/brotli + CONFIGURATIONS Release + ) + diff --git a/ports/brotli/install.patch b/ports/brotli/install.patch index 7896fbbb3321ad..af3d3f3ea8d2dd 100644 --- a/ports/brotli/install.patch +++ b/ports/brotli/install.patch @@ -1,56 +1,58 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ac55f6b..e016967 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -166,12 +166,11 @@ endforeach() - - foreach(lib brotlicommon brotlidec brotlienc brotlicommon-static brotlidec-static brotlienc-static) - target_link_libraries(${lib} ${LIBM_LIBRARY}) -- set_property(TARGET ${lib} APPEND PROPERTY INCLUDE_DIRECTORIES ${BROTLI_INCLUDE_DIRS}) - set_target_properties(${lib} PROPERTIES - VERSION "${BROTLI_ABI_COMPATIBILITY}.${BROTLI_ABI_AGE}.${BROTLI_ABI_REVISION}" - SOVERSION "${BROTLI_ABI_COMPATIBILITY}" - POSITION_INDEPENDENT_CODE TRUE) -- set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}") -+ set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$" $) - endforeach() - - target_link_libraries(brotlidec brotlicommon) -@@ -199,27 +198,35 @@ target_link_libraries(brotli ${BROTLI_LIBRARIES_STATIC}) - if(NOT BROTLI_BUNDLED_MODE) - install( - TARGETS brotli -- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -+ RUNTIME DESTINATION tools/brotli -+ CONFIGURATIONS Release - ) - -+ if(BUILD_SHARED_LIBS) - install( - TARGETS ${BROTLI_LIBRARIES_CORE} -+ EXPORT brotli - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ) -- -+ else() - install( - TARGETS ${BROTLI_LIBRARIES_CORE_STATIC} -+ EXPORT brotli - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ) -+ endif() - - install( - DIRECTORY ${BROTLI_INCLUDE_DIRS}/brotli - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -+ CONFIGURATIONS Release - ) -+ -+ install(EXPORT brotli FILE unofficial-brotli-config.cmake NAMESPACE unofficial::brotli:: DESTINATION share/unofficial-brotli) - endif() - - # Tests +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4ff3401..46492d0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -185,14 +185,13 @@ endforeach() + + foreach(lib IN LISTS BROTLI_SHARED_LIBS BROTLI_STATIC_LIBS) + target_link_libraries(${lib} ${LIBM_LIBRARY}) +- set_property(TARGET ${lib} APPEND PROPERTY INCLUDE_DIRECTORIES ${BROTLI_INCLUDE_DIRS}) + set_target_properties(${lib} PROPERTIES + VERSION "${BROTLI_ABI_COMPATIBILITY}.${BROTLI_ABI_AGE}.${BROTLI_ABI_REVISION}" + SOVERSION "${BROTLI_ABI_COMPATIBILITY}") + if(NOT BROTLI_EMSCRIPTEN) + set_target_properties(${lib} PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + endif() +- set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}") ++ set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$" $) + endforeach() + + if(NOT BROTLI_EMSCRIPTEN) +@@ -223,27 +222,35 @@ if(NOT BROTLI_EMSCRIPTEN) + if(NOT BROTLI_BUNDLED_MODE) + install( + TARGETS brotli +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ RUNTIME DESTINATION tools/brotli ++ CONFIGURATIONS Release + ) + ++ if(BUILD_SHARED_LIBS) + install( + TARGETS ${BROTLI_LIBRARIES_CORE} ++ EXPORT brotli + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ) +- ++ else() + install( + TARGETS ${BROTLI_LIBRARIES_CORE_STATIC} ++ EXPORT brotli + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ) ++ endif() + + install( + DIRECTORY ${BROTLI_INCLUDE_DIRS}/brotli + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ CONFIGURATIONS Release + ) ++ ++ install(EXPORT brotli FILE unofficial-brotli-config.cmake NAMESPACE unofficial::brotli:: DESTINATION share/unofficial-brotli) + endif() # BROTLI_BUNDLED_MODE + endif() # BROTLI_EMSCRIPTEN + diff --git a/ports/brotli/pkgconfig.patch b/ports/brotli/pkgconfig.patch new file mode 100644 index 00000000000000..c11e0d493ca7c4 --- /dev/null +++ b/ports/brotli/pkgconfig.patch @@ -0,0 +1,74 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b1c654b..fcd9024 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -390,7 +390,7 @@ function(generate_pkg_config_path outvar path) + set("${outvar}" "${${outvar}}" PARENT_SCOPE) + endfunction(generate_pkg_config_path) + +-function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION) ++function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION SHARED_TARGET STATIC_TARGET) + file(READ ${INPUT_FILE} TEXT) + + set(PREFIX "${CMAKE_INSTALL_PREFIX}") +@@ -404,15 +404,22 @@ function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION) + string(REGEX REPLACE "@includedir@" "${INCLUDEDIR}" TEXT ${TEXT}) + + string(REGEX REPLACE "@PACKAGE_VERSION@" "${VERSION}" TEXT ${TEXT}) ++ ++ if(BUILD_SHARED_LIBS) ++ set(LIB_NAME "${SHARED_TARGET}") ++ else() ++ set(LIB_NAME "${STATIC_TARGET}") ++ endif() ++ string(REGEX REPLACE "@lib_name@" "${LIB_NAME}" TEXT ${TEXT}) + + file(WRITE ${OUTPUT_FILE} ${TEXT}) + endfunction() + +-transform_pc_file("scripts/libbrotlicommon.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlicommon.pc" "${BROTLI_VERSION}") ++transform_pc_file("scripts/libbrotlicommon.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlicommon.pc" "${BROTLI_VERSION}" brotlicommon brotlicommon-static) + +-transform_pc_file("scripts/libbrotlidec.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlidec.pc" "${BROTLI_VERSION}") ++transform_pc_file("scripts/libbrotlidec.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlidec.pc" "${BROTLI_VERSION}" brotlidec brotlidec-static) + +-transform_pc_file("scripts/libbrotlienc.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc" "${BROTLI_VERSION}") ++transform_pc_file("scripts/libbrotlienc.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc" "${BROTLI_VERSION}" brotlienc brotlienc-static) + + if(NOT BROTLI_EMSCRIPTEN) + if(NOT BROTLI_BUNDLED_MODE) +diff --git a/scripts/libbrotlicommon.pc.in b/scripts/libbrotlicommon.pc.in +index 10ca969..7736344 100644 +--- a/scripts/libbrotlicommon.pc.in ++++ b/scripts/libbrotlicommon.pc.in +@@ -7,5 +7,5 @@ Name: libbrotlicommon + URL: https://github.com/google/brotli + Description: Brotli common dictionary library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -R${libdir} -lbrotlicommon ++Libs: -L${libdir} -l@lib_name@ + Cflags: -I${includedir} +diff --git a/scripts/libbrotlidec.pc.in b/scripts/libbrotlidec.pc.in +index e7c3124..a7dc8ce 100644 +--- a/scripts/libbrotlidec.pc.in ++++ b/scripts/libbrotlidec.pc.in +@@ -7,6 +7,6 @@ Name: libbrotlidec + URL: https://github.com/google/brotli + Description: Brotli decoder library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -R${libdir} -lbrotlidec ++Libs: -L${libdir} -l@lib_name@ + Requires.private: libbrotlicommon >= 1.0.2 + Cflags: -I${includedir} +diff --git a/scripts/libbrotlienc.pc.in b/scripts/libbrotlienc.pc.in +index 4dd0811..eb2712e 100644 +--- a/scripts/libbrotlienc.pc.in ++++ b/scripts/libbrotlienc.pc.in +@@ -7,6 +7,6 @@ Name: libbrotlienc + URL: https://github.com/google/brotli + Description: Brotli encoder library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -R${libdir} -lbrotlienc ++Libs: -L${libdir} -l@lib_name@ + Requires.private: libbrotlicommon >= 1.0.2 + Cflags: -I${includedir} diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index fa0413711a3fd1..9c1e3037dc5184 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -1,12 +1,14 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/brotli - REF v1.0.7 - SHA512 a82362aa36d2f2094bca0b2808d9de0d57291fb3a4c29d7c0ca0a37e73087ec5ac4df299c8c363e61106fccf2fe7f58b5cf76eb97729e2696058ef43b1d3930a + REF e61745a6b7add50d380cfd7d3883dd6c62fc2c71 # v1.0.9 + SHA512 303444695600b70ce59708e06bf21647d9b8dd33d772c53bbe49320f2f8f95ca8a7d6df2d29b7f36ff99001967e2d28380e0e305d778031940a3a5c6585f9a4f HEAD_REF master - PATCHES install.patch + PATCHES + install.patch + fix-arm-uwp.patch + pkgconfig.patch + fix-ios.patch ) vcpkg_configure_cmake( @@ -17,10 +19,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_copy_pdbs() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/brotli) vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-brotli TARGET_PATH share/unofficial-brotli) +vcpkg_fixup_pkgconfig() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-brotli) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brotli RENAME copyright) -vcpkg_copy_pdbs() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-brotli) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/brotli/vcpkg.json b/ports/brotli/vcpkg.json new file mode 100644 index 00000000000000..c5b7fc09dff7e5 --- /dev/null +++ b/ports/brotli/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "brotli", + "version-string": "1.0.9", + "port-version": 2, + "description": "a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling.", + "homepage": "https://github.com/google/brotli" +} diff --git a/ports/brpc/fix_boost_ptr.patch b/ports/brpc/fix_boost_ptr.patch new file mode 100644 index 00000000000000..4ced79422bc7ce --- /dev/null +++ b/ports/brpc/fix_boost_ptr.patch @@ -0,0 +1,14 @@ +diff --git a/src/brpc/policy/thrift_protocol.cpp b/src/brpc/policy/thrift_protocol.cpp +index eae081a0..39c92338 100755 +--- a/src/brpc/policy/thrift_protocol.cpp ++++ b/src/brpc/policy/thrift_protocol.cpp +@@ -45,8 +45,7 @@ + #if defined(_THRIFT_STDCXX_H_) + # define THRIFT_STDCXX apache::thrift::stdcxx + #else +- # define THRIFT_STDCXX boost +- # include ++ # define THRIFT_STDCXX std + #endif + #endif + diff --git a/ports/brpc/fix_thrift.patch b/ports/brpc/fix_thrift.patch new file mode 100644 index 00000000000000..699f42fb0aa0b9 --- /dev/null +++ b/ports/brpc/fix_thrift.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3deb7342..737f6a70 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -62,8 +62,10 @@ if(WITH_DEBUG_SYMBOLS) + endif() + + if(WITH_THRIFT) ++ find_package(Thrift CONFIG REQUIRED) ++ # target_link_libraries(main PRIVATE thrift::thrift thriftz::thriftz thriftnb::thriftnb) + set(THRIFT_CPP_FLAG "-DENABLE_THRIFT_FRAMED_PROTOCOL") +- set(THRIFT_LIB "thrift") ++ set(THRIFT_LIB "thrift::thrift") + endif() + + include(GNUInstallDirs) +@@ -196,9 +198,10 @@ set(DYNAMIC_LIB + ${LEVELDB_LIB} + ${PROTOC_LIB} + ${CMAKE_THREAD_LIBS_INIT} ++ ${OPENSSL_CRYPTO_LIBRARY} ++ ${OPENSSL_SSL_LIBRARY} + ${THRIFT_LIB} + ${THRIFTNB_LIB} +- ${OPENSSL_CRYPTO_LIBRARY} + dl + z) + diff --git a/ports/brpc/portfile.cmake b/ports/brpc/portfile.cmake new file mode 100644 index 00000000000000..3a1c1dce73eb00 --- /dev/null +++ b/ports/brpc/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_TARGET "windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/incubator-brpc + REF 1d6510aa50075cade5ed539ee09a11a1b8d7f990 # 0.9.7 + SHA512 9c9dbe2a202e58586010c56634bd371f6a9e3ff0d8c5341abbabd1f1dd204a3aec5e89061fa326b4fc8ae7202f9fc33f93a5acd845d18dab3915a3e2b81cbaf3 + HEAD_REF master + PATCHES + fix_boost_ptr.patch + fix_thrift.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_THRIFT=ON + -DWITH_MESALINK=OFF + -DWITH_GLOG=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/butil/third_party/superfasthash") + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/brpc/vcpkg.json b/ports/brpc/vcpkg.json new file mode 100644 index 00000000000000..61c1d27a3f32a9 --- /dev/null +++ b/ports/brpc/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "brpc", + "version-string": "0.9.7", + "port-version": 1, + "description": "Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services, called \"baidu-rpc\" inside Baidu.", + "homepage": "https://github.com/apache/incubator-brpc", + "supports": "!windows", + "dependencies": [ + "gflags", + "glog", + "leveldb", + "openssl", + { + "name": "protobuf", + "features": [ + "zlib" + ] + }, + "thrift" + ] +} diff --git a/ports/brunocodutra-metal/CONTROL b/ports/brunocodutra-metal/CONTROL deleted file mode 100644 index 9a0519df917fec..00000000000000 --- a/ports/brunocodutra-metal/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: brunocodutra-metal -Version: v2.0.1-1 -Description: A single header C++11 library designed to make you love template metaprogramming diff --git a/ports/brunocodutra-metal/portfile.cmake b/ports/brunocodutra-metal/portfile.cmake index 857fc7dea43941..92aa6d20446551 100644 --- a/ports/brunocodutra-metal/portfile.cmake +++ b/ports/brunocodutra-metal/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO brunocodutra/metal - REF v2.0.1 - SHA512 6aca54e2f2a6d99466d247dbd57706caef33d2399989c2eb14e99d1419922eff753acb53248f8684c1ed11bb87d79b2e850637190e8949f69e0f5ee7304281dc + REF 43256d2c7f5715d9dc029037bcd8512624ec7865 # v2.1.1 + SHA512 fc69e60b9c21d0215ca2c9ec27ab65d59115397e1d27c90fcdc35ccf8675546b1fbc3be0e6b8f69cd8eb848bac348ca0fe116f50a36ce8d1cbff0d646c4f05cb HEAD_REF master ) @@ -26,6 +24,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/brunocodutra-metal/vcpkg.json b/ports/brunocodutra-metal/vcpkg.json new file mode 100644 index 00000000000000..a4934eb54350a7 --- /dev/null +++ b/ports/brunocodutra-metal/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "brunocodutra-metal", + "version-string": "2.1.1", + "port-version": 1, + "description": "A single header C++11 library designed to make you love template metaprogramming" +} diff --git a/ports/brynet/CONTROL b/ports/brynet/CONTROL deleted file mode 100644 index 341076cba8bda1..00000000000000 --- a/ports/brynet/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: brynet -Version: 1.0.3 -Homepage: https://github.com/IronsDu/brynet -Description: A C++ cross platform high performance tcp network library, and support SSL/HTTP/Websocket. -Build-Depends: openssl diff --git a/ports/brynet/portfile.cmake b/ports/brynet/portfile.cmake index f707948ac067f2..f07030c495b88b 100644 --- a/ports/brynet/portfile.cmake +++ b/ports/brynet/portfile.cmake @@ -1,23 +1,13 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +#header-only library vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IronsDu/brynet - REF v1.0.3 - SHA512 8759b522da34be68a7ba0959ed3d85382965efe5080e4cdd403001f3911d36398b7fe9d039fd9fb485a0d557cec0fa53863a512eb88f13f3ff222b6e30642baf + REF b33f44df85ca56ca315a560239db3a09a1aef4d7 # v1.11.0 + SHA512 0eaa212ab75a7b51ab546dbca10357d1cbb611ccfe09e3246050518c808a65cecb1374b60e2289023462b96f8b67aa8d19010f446364fecbec64115752234e60 HEAD_REF master ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/include/brynet DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brynet) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/brynet/LICENSE ${CURRENT_PACKAGES_DIR}/share/brynet/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/brynet/vcpkg.json b/ports/brynet/vcpkg.json new file mode 100644 index 00000000000000..79dec2c58202d2 --- /dev/null +++ b/ports/brynet/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "brynet", + "version-string": "1.11.0", + "port-version": 1, + "description": "A C++ header only cross platform high performance tcp network library, and support SSL/HTTP/Websocket.", + "homepage": "https://github.com/IronsDu/brynet" +} diff --git a/ports/bshoshany-thread-pool/portfile.cmake b/ports/bshoshany-thread-pool/portfile.cmake new file mode 100644 index 00000000000000..b958693499299b --- /dev/null +++ b/ports/bshoshany-thread-pool/portfile.cmake @@ -0,0 +1,19 @@ +#header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bshoshany/thread-pool + REF v2.0.0 + SHA512 eac1674ea999d25d8d0b8f1b24714830330ba4d345e3f730e49359bae89d9259e429d48357a45f7b4355cbbe1a63f04e7fe2c4e0be08b3bbea51018c62721fcc + HEAD_REF master +) + +# Install headers (header-only): +file(GLOB HEADER_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/*.hpp") +file(INSTALL + "${HEADER_FILES}" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" + +) + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/bshoshany-thread-pool/vcpkg.json b/ports/bshoshany-thread-pool/vcpkg.json new file mode 100644 index 00000000000000..86058533b0954c --- /dev/null +++ b/ports/bshoshany-thread-pool/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "bshoshany-thread-pool", + "version": "2.0.0", + "description": "A C++17 Thread Pool for High-Performance Scientific Computing", + "homepage": "https://github.com/bshoshany/thread-pool" +} diff --git a/ports/bsio/portfile.cmake b/ports/bsio/portfile.cmake new file mode 100644 index 00000000000000..f88038d87f5b18 --- /dev/null +++ b/ports/bsio/portfile.cmake @@ -0,0 +1,19 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArkNX/bsio + REF v1.0.0 + SHA512 28b895b823d84203f4cec531ddd5bb49dc915e9a4eb26e064834d1e999b98e512b37d361e59029eb6d7e44fe99ba81f9c5729f119eab7eb928de1a1374f0b7df + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Dbsio_BUILD_EXAMPLES=OFF +) +vcpkg_cmake_install() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") diff --git a/ports/bsio/vcpkg.json b/ports/bsio/vcpkg.json new file mode 100644 index 00000000000000..fe8fad416fbeb8 --- /dev/null +++ b/ports/bsio/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "bsio", + "version": "1.0.0", + "description": "networking library, ans support HTTP/WebSocket, based on asio.", + "homepage": "https://github.com/ArkNX/bsio", + "dependencies": [ + "asio", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/buck-yeh-bux/portfile.cmake b/ports/buck-yeh-bux/portfile.cmake new file mode 100644 index 00000000000000..cfcaadc69698b9 --- /dev/null +++ b/ports/buck-yeh-bux/portfile.cmake @@ -0,0 +1,17 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64") +vcpkg_fail_port_install(ON_TARGET "linux" "uwp" "osx") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO buck-yeh/bux + REF 4636183159f74f350238e6ee59583b34f7e7aca9 # v1.4.1 + SHA512 319cd15c73ca469849cbc364635d7147cfa3fed57d6043b0cb2b52d504a253645518ec6254ddba51fc8cc32cc89e345458530628b331629cabce5b64d8723a6a + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/buck-yeh-bux/vcpkg.json b/ports/buck-yeh-bux/vcpkg.json new file mode 100644 index 00000000000000..3ae078499010a2 --- /dev/null +++ b/ports/buck-yeh-bux/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "buck-yeh-bux", + "version": "1.4.1", + "description": "A supplemental C++ library with functionalities not directly supported from Modern C++ standard.", + "homepage": "https://github.com/buck-yeh/bux", + "supports": "!(arm | uwp | osx | linux)", + "dependencies": [ + "fmt", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/bullet3/CONTROL b/ports/bullet3/CONTROL deleted file mode 100644 index d313255a5e94d6..00000000000000 --- a/ports/bullet3/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: bullet3 -Version: 2.88-1 -Homepage: https://github.com/bulletphysics/bullet3 -Description: Bullet Physics is a professional collision detection, rigid body, and soft body dynamics library - -Feature: multithreading -Description: Multithreading funcitonality for bullet3 \ No newline at end of file diff --git a/ports/bullet3/cmake-fix.patch b/ports/bullet3/cmake-fix.patch new file mode 100644 index 00000000000000..12457f4ca0fe7b --- /dev/null +++ b/ports/bullet3/cmake-fix.patch @@ -0,0 +1,515 @@ +diff --git a/BulletConfig.cmake.in b/BulletConfig.cmake.in +index f5dc7bd..50b3d67 100644 +--- a/BulletConfig.cmake.in ++++ b/BulletConfig.cmake.in +@@ -13,13 +13,23 @@ + # BULLET_LIBRARY_DIRS - List of directories containing Bullet' libraries + # BULLET_ROOT_DIR - The base directory of Bullet + # BULLET_VERSION_STRING - A human-readable string containing the version +- ++@PACKAGE_INIT@ + set ( BULLET_FOUND 1 ) +-set ( BULLET_USE_FILE "@BULLET_USE_FILE@" ) ++set_and_check ( BULLET_USE_FILE "@PACKAGE_BULLET_CONFIG_CMAKE_PATH@/UseBullet.cmake" ) + set ( BULLET_DEFINITIONS "@BULLET_DEFINITIONS@" ) +-set ( BULLET_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@" ) +-set ( BULLET_INCLUDE_DIRS "@INCLUDE_INSTALL_DIR@" ) ++set_and_check ( BULLET_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@" ) ++set_and_check ( BULLET_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@" ) + set ( BULLET_LIBRARIES "@BULLET_LIBRARIES@" ) +-set ( BULLET_LIBRARY_DIRS "@LIB_DESTINATION@" ) +-set ( BULLET_ROOT_DIR "@CMAKE_INSTALL_PREFIX@" ) +-set ( BULLET_VERSION_STRING "@BULLET_VERSION@" ) +\ No newline at end of file ++set_and_check ( BULLET_LIBRARY_DIRS "@PACKAGE_LIB_DESTINATION@" ) ++set_and_check ( BULLET_ROOT_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@" ) ++set ( BULLET_VERSION_STRING "@BULLET_VERSION@" ) ++# Load targets ++if(NOT TARGET Bullet3Common) ++ # ++ include("@PACKAGE_BULLET_CONFIG_CMAKE_PATH@/LinearMathTargets.cmake") ++ file(GLOB CONFIG_FILES "@PACKAGE_BULLET_CONFIG_CMAKE_PATH@/*Targets.cmake") ++ foreach(f IN LISTS CONFIG_FILES) ++ include(${f}) ++ endforeach() ++ set(_DIR) ++endif() +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a695b71..607edde 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.4.3) ++cmake_minimum_required(VERSION 3.0) + set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) + cmake_policy(SET CMP0017 NEW) + #this line has to appear before 'PROJECT' in order to be able to disable incremental linking +@@ -489,7 +489,14 @@ IF (BUILD_UNIT_TESTS) + SUBDIRS(test) + ENDIF() + +-set (BULLET_CONFIG_CMAKE_PATH lib${LIB_SUFFIX}/cmake/bullet ) ++include(CMakePackageConfigHelpers) ++write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/BulletConfigVersion.cmake" ++ VERSION ${BULLET_VERSION} ++ COMPATIBILITY AnyNewerVersion ++) ++ ++set (BULLET_CONFIG_CMAKE_PATH share/bullet ) + list (APPEND BULLET_DEFINITIONS ${BULLET_DOUBLE_DEF}) + list (APPEND BULLET_LIBRARIES LinearMath) + list (APPEND BULLET_LIBRARIES Bullet3Common) +@@ -497,16 +504,18 @@ list (APPEND BULLET_LIBRARIES BulletInverseDynamics) + list (APPEND BULLET_LIBRARIES BulletCollision) + list (APPEND BULLET_LIBRARIES BulletDynamics) + list (APPEND BULLET_LIBRARIES BulletSoftBody) +-set (BULLET_USE_FILE ${BULLET_CONFIG_CMAKE_PATH}/UseBullet.cmake) +-configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/BulletConfig.cmake.in +- ${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake +- @ONLY ESCAPE_QUOTES +- ) ++configure_package_config_file( ++ ${CMAKE_CURRENT_SOURCE_DIR}/BulletConfig.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake ++ PATH_VARS INCLUDE_INSTALL_DIR LIB_DESTINATION CMAKE_INSTALL_PREFIX BULLET_CONFIG_CMAKE_PATH ++ INSTALL_DESTINATION ${BULLET_CONFIG_CMAKE_PATH} ++) + OPTION(INSTALL_CMAKE_FILES "Install generated CMake files" ON) + + IF (INSTALL_CMAKE_FILES) + install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/UseBullet.cmake + ${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake ++ ${CMAKE_CURRENT_BINARY_DIR}/BulletConfigVersion.cmake + DESTINATION ${BULLET_CONFIG_CMAKE_PATH} + ) + ENDIF (INSTALL_CMAKE_FILES) +diff --git a/Extras/BulletRobotics/CMakeLists.txt b/Extras/BulletRobotics/CMakeLists.txt +index d2ab423..dabb504 100644 +--- a/Extras/BulletRobotics/CMakeLists.txt ++++ b/Extras/BulletRobotics/CMakeLists.txt +@@ -282,7 +282,7 @@ SET_TARGET_PROPERTIES(BulletRobotics PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(BulletRobotics PROPERTIES SOVERSION ${BULLET_VERSION}) + + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletRobotics BulletInverseDynamicsUtils BulletWorldImporter BulletFileLoader BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamics LinearMath Bullet3Common) ++ TARGET_LINK_LIBRARIES(BulletRobotics PUBLIC BulletInverseDynamicsUtils BulletWorldImporter BulletFileLoader BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamics LinearMath Bullet3Common) + ENDIF (BUILD_SHARED_LIBS) + + +diff --git a/Extras/BulletRoboticsGUI/CMakeLists.txt b/Extras/BulletRoboticsGUI/CMakeLists.txt +index 57ab97f..27b9992 100644 +--- a/Extras/BulletRoboticsGUI/CMakeLists.txt ++++ b/Extras/BulletRoboticsGUI/CMakeLists.txt +@@ -166,7 +166,7 @@ SET_TARGET_PROPERTIES(BulletRoboticsGUI PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(BulletRoboticsGUI PROPERTIES SOVERSION ${BULLET_VERSION}) + + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletRoboticsGUI BulletExampleBrowserLib BulletRobotics BulletInverseDynamicsUtils BulletWorldImporter BulletFileLoader BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamics LinearMath Bullet3Common) ++ TARGET_LINK_LIBRARIES(BulletRoboticsGUI PUBLIC BulletExampleBrowserLib BulletRobotics BulletInverseDynamicsUtils BulletWorldImporter BulletFileLoader BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamics LinearMath Bullet3Common) + ENDIF (BUILD_SHARED_LIBS) + + +diff --git a/Extras/ConvexDecomposition/CMakeLists.txt b/Extras/ConvexDecomposition/CMakeLists.txt +index 132a336..62babb0 100644 +--- a/Extras/ConvexDecomposition/CMakeLists.txt ++++ b/Extras/ConvexDecomposition/CMakeLists.txt +@@ -39,7 +39,7 @@ SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES SOVERSION ${BULLET_VERSION}) + + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(ConvexDecomposition BulletCollision LinearMath) ++ TARGET_LINK_LIBRARIES(ConvexDecomposition PUBLIC BulletCollision LinearMath) + ENDIF (BUILD_SHARED_LIBS) + + IF (INSTALL_EXTRA_LIBS) +diff --git a/Extras/InverseDynamics/CMakeLists.txt b/Extras/InverseDynamics/CMakeLists.txt +index 22e953a..59b733d 100644 +--- a/Extras/InverseDynamics/CMakeLists.txt ++++ b/Extras/InverseDynamics/CMakeLists.txt +@@ -22,7 +22,7 @@ SET_TARGET_PROPERTIES(BulletInverseDynamicsUtils PROPERTIES VERSION ${BULLET_VER + SET_TARGET_PROPERTIES(BulletInverseDynamicsUtils PROPERTIES SOVERSION ${BULLET_VERSION}) + + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletInverseDynamicsUtils BulletInverseDynamics BulletDynamics BulletCollision Bullet3Common LinearMath) ++ TARGET_LINK_LIBRARIES(BulletInverseDynamicsUtils PUBLIC BulletInverseDynamics BulletDynamics BulletCollision Bullet3Common LinearMath) + ENDIF (BUILD_SHARED_LIBS) + + IF (INSTALL_EXTRA_LIBS) +diff --git a/Extras/Serialize/BulletFileLoader/CMakeLists.txt b/Extras/Serialize/BulletFileLoader/CMakeLists.txt +index 9b5dce7..2f30385 100644 +--- a/Extras/Serialize/BulletFileLoader/CMakeLists.txt ++++ b/Extras/Serialize/BulletFileLoader/CMakeLists.txt +@@ -21,7 +21,7 @@ btBulletFile.h + ADD_LIBRARY(BulletFileLoader ${BulletFileLoader_SRCS} ${BulletFileLoader_HDRS}) + + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletFileLoader LinearMath) ++ TARGET_LINK_LIBRARIES(BulletFileLoader PUBLIC LinearMath) + ENDIF (BUILD_SHARED_LIBS) + + SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES VERSION ${BULLET_VERSION}) +diff --git a/Extras/Serialize/BulletWorldImporter/CMakeLists.txt b/Extras/Serialize/BulletWorldImporter/CMakeLists.txt +index b56b39a..1684651 100644 +--- a/Extras/Serialize/BulletWorldImporter/CMakeLists.txt ++++ b/Extras/Serialize/BulletWorldImporter/CMakeLists.txt +@@ -16,7 +16,7 @@ SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES SOVERSION ${BULLET_VERSION}) + + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletWorldImporter BulletDynamics BulletCollision BulletFileLoader LinearMath) ++ TARGET_LINK_LIBRARIES(BulletWorldImporter PUBLIC BulletDynamics BulletCollision BulletFileLoader LinearMath) + ENDIF (BUILD_SHARED_LIBS) + + IF (INSTALL_EXTRA_LIBS) +diff --git a/Extras/Serialize/BulletXmlWorldImporter/CMakeLists.txt b/Extras/Serialize/BulletXmlWorldImporter/CMakeLists.txt +index 9fd125e..889c30e 100644 +--- a/Extras/Serialize/BulletXmlWorldImporter/CMakeLists.txt ++++ b/Extras/Serialize/BulletXmlWorldImporter/CMakeLists.txt +@@ -18,7 +18,7 @@ SET_TARGET_PROPERTIES(BulletXmlWorldImporter PROPERTIES VERSION ${BULLET_VERSIO + SET_TARGET_PROPERTIES(BulletXmlWorldImporter PROPERTIES SOVERSION ${BULLET_VERSION}) + + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletXmlWorldImporter BulletWorldImporter BulletDynamics BulletCollision BulletFileLoader LinearMath) ++ TARGET_LINK_LIBRARIES(BulletXmlWorldImporter PUBLIC BulletWorldImporter BulletDynamics BulletCollision BulletFileLoader LinearMath) + ENDIF (BUILD_SHARED_LIBS) + + IF (INSTALL_EXTRA_LIBS) +diff --git a/src/Bullet3Collision/CMakeLists.txt b/src/Bullet3Collision/CMakeLists.txt +index 130095c..661a461 100644 +--- a/src/Bullet3Collision/CMakeLists.txt ++++ b/src/Bullet3Collision/CMakeLists.txt +@@ -69,9 +69,10 @@ IF (INSTALL_LIBS) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS Bullet3Collision DESTINATION .) ++ INSTALL(TARGETS Bullet3Collision EXPORT Bullet3CollisionTargets DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS Bullet3Collision ++ EXPORT Bullet3CollisionTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) +@@ -89,5 +90,7 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + #SET_PROPERTY(SOURCE ${Bullet3CollisionBroadPhase_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadPhaseCollision) + + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ INSTALL(EXPORT Bullet3CollisionTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/Bullet3Common/CMakeLists.txt b/src/Bullet3Common/CMakeLists.txt +index e899e67..e990b16 100644 +--- a/src/Bullet3Common/CMakeLists.txt ++++ b/src/Bullet3Common/CMakeLists.txt +@@ -37,15 +37,17 @@ SET(Bullet3Common_HDRS + ADD_LIBRARY(Bullet3Common ${Bullet3Common_SRCS} ${Bullet3Common_HDRS}) + SET_TARGET_PROPERTIES(Bullet3Common PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(Bullet3Common PROPERTIES SOVERSION ${BULLET_VERSION}) ++TARGET_INCLUDE_DIRECTORIES(Bullet3Common INTERFACE $) + + IF (INSTALL_LIBS) + IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS Bullet3Common DESTINATION .) ++ INSTALL(TARGETS Bullet3Common EXPORT Bullet3CommonTargets DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS Bullet3Common ++ EXPORT Bullet3CommonTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) +@@ -59,5 +61,7 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + SET_TARGET_PROPERTIES(Bullet3Common PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(Bullet3Common PROPERTIES PUBLIC_HEADER "${Bullet3Common_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ INSTALL(EXPORT Bullet3CommonTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/Bullet3Dynamics/CMakeLists.txt b/src/Bullet3Dynamics/CMakeLists.txt +index 94c120d..e83503a 100644 +--- a/src/Bullet3Dynamics/CMakeLists.txt ++++ b/src/Bullet3Dynamics/CMakeLists.txt +@@ -41,9 +41,10 @@ IF (INSTALL_LIBS) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS Bullet3Dynamics DESTINATION .) ++ INSTALL(TARGETS Bullet3Dynamics EXPORT Bullet3DynamicsTargets DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS Bullet3Dynamics ++ EXPORT Bullet3DynamicsTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) +@@ -57,5 +58,7 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + SET_TARGET_PROPERTIES(Bullet3Dynamics PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(Bullet3Dynamics PROPERTIES PUBLIC_HEADER "${Bullet3Dynamics_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ INSTALL(EXPORT Bullet3DynamicsTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/Bullet3Geometry/CMakeLists.txt b/src/Bullet3Geometry/CMakeLists.txt +index 8206872..e605d79 100644 +--- a/src/Bullet3Geometry/CMakeLists.txt ++++ b/src/Bullet3Geometry/CMakeLists.txt +@@ -27,9 +27,12 @@ IF (INSTALL_LIBS) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS Bullet3Geometry DESTINATION .) ++ INSTALL(TARGETS Bullet3Geometry ++ EXPORT Bullet3GeometryTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS Bullet3Geometry ++ EXPORT Bullet3GeometryTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) +@@ -43,5 +46,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + SET_TARGET_PROPERTIES(Bullet3Geometry PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(Bullet3Geometry PROPERTIES PUBLIC_HEADER "${Bullet3Geometry_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT Bullet3GeometryTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/Bullet3OpenCL/CMakeLists.txt b/src/Bullet3OpenCL/CMakeLists.txt +index 1da58d4..c1b21df 100644 +--- a/src/Bullet3OpenCL/CMakeLists.txt ++++ b/src/Bullet3OpenCL/CMakeLists.txt +@@ -44,7 +44,7 @@ ADD_LIBRARY(Bullet3OpenCL_clew ${Bullet3OpenCL_clew_SRCS} ${Bullet3OpenCL_clew_H + SET_TARGET_PROPERTIES(Bullet3OpenCL_clew PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(Bullet3OpenCL_clew PROPERTIES SOVERSION ${BULLET_VERSION}) + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(Bullet3OpenCL_clew LinearMath Bullet3Dynamics ${CMAKE_DL_LIBS}) ++ TARGET_LINK_LIBRARIES(Bullet3OpenCL_clew PUBLIC LinearMath Bullet3Dynamics ${CMAKE_DL_LIBS}) + ENDIF (BUILD_SHARED_LIBS) + + +@@ -53,9 +53,13 @@ IF (INSTALL_LIBS) + #INSTALL of other files requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS Bullet3OpenCL_clew DESTINATION .) ++ INSTALL(TARGETS BulletDynamics ++ EXPORT Bullet3OpenCLTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS Bullet3OpenCL_clew RUNTIME DESTINATION bin ++ INSTALL(TARGETS Bullet3OpenCL_clew ++ EXPORT Bullet3OpenCLTargets ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +@@ -73,5 +77,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" E + SET_PROPERTY(SOURCE ${BroadphaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadphaseCollision) + + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT Bullet3OpenCLTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/Bullet3Serialize/Bullet2FileLoader/CMakeLists.txt b/src/Bullet3Serialize/Bullet2FileLoader/CMakeLists.txt +index 1255766..67112b4 100644 +--- a/src/Bullet3Serialize/Bullet2FileLoader/CMakeLists.txt ++++ b/src/Bullet3Serialize/Bullet2FileLoader/CMakeLists.txt +@@ -35,9 +35,12 @@ IF (INSTALL_LIBS) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS Bullet2FileLoader DESTINATION .) ++ INSTALL(TARGETS Bullet2FileLoader ++ EXPORT Bullet2FileLoaderTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS Bullet2FileLoader ++ EXPORT Bullet2FileLoaderTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) +@@ -51,5 +54,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + SET_TARGET_PROPERTIES(Bullet2FileLoader PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(Bullet2FileLoader PROPERTIES PUBLIC_HEADER "${Bullet2FileLoader_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT Bullet2FileLoaderTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/BulletCollision/CMakeLists.txt b/src/BulletCollision/CMakeLists.txt +index f5d7255..d857637 100644 +--- a/src/BulletCollision/CMakeLists.txt ++++ b/src/BulletCollision/CMakeLists.txt +@@ -257,7 +257,7 @@ ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS}) + SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION}) + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletCollision LinearMath) ++ TARGET_LINK_LIBRARIES(BulletCollision PUBLIC LinearMath) + ENDIF (BUILD_SHARED_LIBS) + + +@@ -266,9 +266,13 @@ IF (INSTALL_LIBS) + #INSTALL of other files requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletCollision DESTINATION .) ++ INSTALL(TARGETS BulletCollision ++ EXPORT BulletCollisionTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletCollision RUNTIME DESTINATION bin ++ INSTALL(TARGETS BulletCollision ++ EXPORT BulletCollisionTargets ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +@@ -290,5 +294,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR}/BulletCollision) + SET_PROPERTY(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision) + + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT BulletCollisionTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/BulletDynamics/CMakeLists.txt b/src/BulletDynamics/CMakeLists.txt +index 3332440..d1a1147 100644 +--- a/src/BulletDynamics/CMakeLists.txt ++++ b/src/BulletDynamics/CMakeLists.txt +@@ -140,16 +140,21 @@ ADD_LIBRARY(BulletDynamics ${BulletDynamics_SRCS} ${BulletDynamics_HDRS}) + SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES SOVERSION ${BULLET_VERSION}) + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletDynamics BulletCollision LinearMath) ++ TARGET_LINK_LIBRARIES(BulletDynamics PUBLIC BulletCollision) + ENDIF (BUILD_SHARED_LIBS) ++TARGET_LINK_LIBRARIES(BulletDynamics PUBLIC LinearMath) + + IF (INSTALL_LIBS) + IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletDynamics DESTINATION .) ++ INSTALL(TARGETS BulletDynamics ++ EXPORT BulletDynamicsTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletDynamics RUNTIME DESTINATION bin ++ INSTALL(TARGETS BulletDynamics ++ EXPORT BulletDynamicsTargets ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +@@ -171,5 +176,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR}/BulletDynamics) + SET_PROPERTY(SOURCE ${Featherstone_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Featherstone) + SET_PROPERTY(SOURCE ${MLCPSolvers_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/MLCPSolvers) + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT BulletDynamicsTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/BulletInverseDynamics/CMakeLists.txt b/src/BulletInverseDynamics/CMakeLists.txt +index 3331c27..d4fad26 100644 +--- a/src/BulletInverseDynamics/CMakeLists.txt ++++ b/src/BulletInverseDynamics/CMakeLists.txt +@@ -33,7 +33,7 @@ ADD_LIBRARY(BulletInverseDynamics ${BulletInverseDynamics_SRCS} ${BulletInverseD + SET_TARGET_PROPERTIES(BulletInverseDynamics PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(BulletInverseDynamics PROPERTIES SOVERSION ${BULLET_VERSION}) + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletInverseDynamics Bullet3Common LinearMath) ++ TARGET_LINK_LIBRARIES(BulletInverseDynamics PUBLIC Bullet3Common LinearMath) + ENDIF (BUILD_SHARED_LIBS) + + +@@ -42,9 +42,13 @@ IF (INSTALL_LIBS) + #INSTALL of other files requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletInverseDynamics DESTINATION .) ++ INSTALL(TARGETS BulletInverseDynamics ++ EXPORT BulletInverseDynamicsTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletInverseDynamics RUNTIME DESTINATION bin ++ INSTALL(TARGETS BulletInverseDynamics ++ EXPORT BulletInverseDynamicsTargets ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +@@ -62,5 +66,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR}/BulletInverseDynamics) + SET_PROPERTY(SOURCE ${BulletInverseDynamicsDetails_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/details) + + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT BulletInverseDynamicsTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/BulletSoftBody/CMakeLists.txt b/src/BulletSoftBody/CMakeLists.txt +index 9452768..5068a30 100644 +--- a/src/BulletSoftBody/CMakeLists.txt ++++ b/src/BulletSoftBody/CMakeLists.txt +@@ -78,9 +78,13 @@ IF (INSTALL_LIBS) + IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletSoftBody DESTINATION .) ++ INSTALL(TARGETS BulletSoftBody ++ EXPORT BulletSoftBodyTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletSoftBody RUNTIME DESTINATION bin ++ INSTALL(TARGETS BulletSoftBody ++ EXPORT BulletSoftBodyTargets ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +@@ -93,5 +97,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES PUBLIC_HEADER "${BulletSoftBody_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT BulletSoftBodyTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/LinearMath/CMakeLists.txt b/src/LinearMath/CMakeLists.txt +index a0532c7..ecf06b3 100644 +--- a/src/LinearMath/CMakeLists.txt ++++ b/src/LinearMath/CMakeLists.txt +@@ -63,9 +63,10 @@ IF (INSTALL_LIBS) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS LinearMath DESTINATION .) ++ INSTALL(TARGETS LinearMath EXPORT LinearMathTargets DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS LinearMath ++ EXPORT LinearMathTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) +@@ -79,5 +80,7 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + SET_TARGET_PROPERTIES(LinearMath PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(LinearMath PROPERTIES PUBLIC_HEADER "${LinearMath_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ INSTALL(EXPORT LinearMathTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) diff --git a/ports/bullet3/portfile.cmake b/ports/bullet3/portfile.cmake index 031ddf23fa045f..886535ee995a70 100644 --- a/ports/bullet3/portfile.cmake +++ b/ports/bullet3/portfile.cmake @@ -1,43 +1,43 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO bulletphysics/bullet3 - REF 2.88 - SHA512 15face1940d496c96fd19a44139d11d2cbb629526c40432be4a0eef5fa9a532c842ec7318248c0359a080f2034111bf1a3c2d3a6fd789bec675bd368fac7bd93 + REF 3.17 + SHA512 a5105bf5f1dd365a64a350755c7d2c97942f74897a18dcdb3651e6732fd55cc1030a096f5808cf50575281f05e3ac09aa50a48d271a47b94cd61f5167a72b7cc HEAD_REF master + PATCHES cmake-fix.patch ) -set(BULLET_MULTITHREADING OFF) -if ("multithreading" IN_LIST FEATURES) - set(BULLET_MULTITHREADING ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + multithreading BULLET2_MULTITHREADING +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON - -DBUILD_DEMOS=OFF -DBUILD_CPU_DEMOS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_BULLET3=OFF -DBUILD_EXTRAS=OFF -DBUILD_UNIT_TESTS=OFF -DINSTALL_LIBS=ON - -DBULLET2_MULTITHREADING=${BULLET_MULTITHREADING} + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bullet/BulletInverseDynamics/details) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/bullet TARGET_PATH share/bullet) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/bullet/BulletInverseDynamics/details") vcpkg_copy_pdbs() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bullet3 RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/bullet3/usage b/ports/bullet3/usage new file mode 100644 index 00000000000000..43b6d667a36463 --- /dev/null +++ b/ports/bullet3/usage @@ -0,0 +1,4 @@ +The package bullet3 provides CMake targets: + +find_package(Bullet CONFIG REQUIRED) +target_link_libraries(main PRIVATE LinearMath Bullet3Common BulletDynamics BulletSoftBody) diff --git a/ports/bullet3/vcpkg.json b/ports/bullet3/vcpkg.json new file mode 100644 index 00000000000000..70c9be0ba1a999 --- /dev/null +++ b/ports/bullet3/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "bullet3", + "version": "3.17", + "port-version": 1, + "description": "Bullet Physics is a professional collision detection, rigid body, and soft body dynamics library", + "homepage": "https://github.com/bulletphysics/bullet3", + "features": { + "multithreading": { + "description": "Multithreading functionality for bullet3" + } + } +} diff --git a/ports/bustache/LICENSE b/ports/bustache/LICENSE new file mode 100644 index 00000000000000..6d2e4af1fcf09a --- /dev/null +++ b/ports/bustache/LICENSE @@ -0,0 +1,4 @@ +Copyright (c) 2014-2018 Jamboree + +Distributed under the Boost Software License, Version 1.0. (See accompanying +file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/ports/bustache/portfile.cmake b/ports/bustache/portfile.cmake new file mode 100644 index 00000000000000..24c885770f3900 --- /dev/null +++ b/ports/bustache/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jamboree/bustache + REF abb25ca189425783c6b7ec5c17c5284dccb59faf + SHA512 be00451f6a85edccacbdd5d8478d7af4f3162f9a9a31af876004237ca7f303c1262b2ea623e6ec595d73440dc14fcf22d185bc521fd3aca6e28ec43890d611c5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/bustache/cmake") + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" +) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/bustache/vcpkg.json b/ports/bustache/vcpkg.json new file mode 100644 index 00000000000000..92e11540891e97 --- /dev/null +++ b/ports/bustache/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "bustache", + "version-string": "1.1.0", + "port-version": 1, + "description": "C++11 implementation of {{ mustache }}", + "homepage": "https://github.com/jamboree/bustache", + "dependencies": [ + "boost-unordered", + "boost-utility" + ] +} diff --git a/ports/butteraugli/CONTROL b/ports/butteraugli/CONTROL deleted file mode 100644 index d210263c3b679c..00000000000000 --- a/ports/butteraugli/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: butteraugli -Version: 2019-05-08 -Homepage: https://github.com/google/butteraugli -Description: butteraugli estimates the psychovisual difference between two images -Build-Depends: libpng, libjpeg-turbo diff --git a/ports/butteraugli/portfile.cmake b/ports/butteraugli/portfile.cmake index a3fb2a19d84315..26ff21e4282de3 100644 --- a/ports/butteraugli/portfile.cmake +++ b/ports/butteraugli/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -8,16 +6,12 @@ vcpkg_from_github( REF 71b18b636b9c7d1ae0c1d3730b85b3c127eb4511 SHA512 2e73f8ad8953307eea956ed8bd828e110419d6d9f8a42685d225953d3a8017a79d0701bde0282459dc51198e75a99dcd99dd3c4e7ef065736c512a7b11ea0fdf HEAD_REF master + PATCHES + missing_header.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/missing_header.patch" - ) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -27,6 +21,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/butteraugli) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/butteraugli RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/butteraugli/vcpkg.json b/ports/butteraugli/vcpkg.json new file mode 100644 index 00000000000000..d11da192d644c3 --- /dev/null +++ b/ports/butteraugli/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "butteraugli", + "version-string": "2019-05-08", + "port-version": 2, + "description": "butteraugli estimates the psychovisual difference between two images", + "homepage": "https://github.com/google/butteraugli", + "dependencies": [ + "libjpeg-turbo", + "libpng" + ] +} diff --git a/ports/byte-lite/CONTROL b/ports/byte-lite/CONTROL deleted file mode 100644 index e16ff8e3c11fa7..00000000000000 --- a/ports/byte-lite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: byte-lite -Version: 0.2.0 -Description: A C++17-like byte type for C++98, C++11 and later in a single-file header-only library diff --git a/ports/byte-lite/portfile.cmake b/ports/byte-lite/portfile.cmake index 7fd9f562078498..d95c0cf4502ff9 100644 --- a/ports/byte-lite/portfile.cmake +++ b/ports/byte-lite/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/byte-lite diff --git a/ports/byte-lite/vcpkg.json b/ports/byte-lite/vcpkg.json new file mode 100644 index 00000000000000..64639b6867d684 --- /dev/null +++ b/ports/byte-lite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "byte-lite", + "version-string": "0.2.0", + "port-version": 1, + "description": "A C++17-like byte type for C++98, C++11 and later in a single-file header-only library" +} diff --git a/ports/bzip2/CONTROL b/ports/bzip2/CONTROL deleted file mode 100644 index 5f52faad484320..00000000000000 --- a/ports/bzip2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: bzip2 -Version: 1.0.6-4 -Homepage: http://www.bzip.org/ -Description: High-quality data compressor. diff --git a/ports/bzip2/bzip2.pc.in b/ports/bzip2/bzip2.pc.in new file mode 100644 index 00000000000000..91153c13b532be --- /dev/null +++ b/ports/bzip2/bzip2.pc.in @@ -0,0 +1,11 @@ +prefix=@BZIP2_PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: bzip2 +Description: bzip2 +Version: 1.0.6 +Requires: +Libs: -L${libdir} -l@bzname@ +Cflags: -I${includedir} \ No newline at end of file diff --git a/ports/bzip2/portfile.cmake b/ports/bzip2/portfile.cmake index 25e3df10f11ecb..36141ffcbc6e8b 100644 --- a/ports/bzip2/portfile.cmake +++ b/ports/bzip2/portfile.cmake @@ -1,42 +1,50 @@ -include(vcpkg_common_functions) -set(BZIP2_VERSION 1.0.6) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/past-due/bzip2-mirror/releases/download/v${BZIP2_VERSION}/bzip2-${BZIP2_VERSION}.tar.gz" - FILENAME "bzip2-${BZIP2_VERSION}.tar.gz" - SHA512 00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${BZIP2_VERSION} - PATCHES - fix-import-export-macros.patch -) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DBZIP2_SKIP_HEADERS=ON - -DBZIP2_SKIP_TOOLS=ON -) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -file(READ ${CURRENT_PACKAGES_DIR}/include/bzlib.h BZLIB_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "defined(BZ_IMPORT)" "0" BZLIB_H "${BZLIB_H}") -else() - string(REPLACE "defined(BZ_IMPORT)" "1" BZLIB_H "${BZLIB_H}") -endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/bzlib.h "${BZLIB_H}") - -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/bzip2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/bzip2/LICENSE ${CURRENT_PACKAGES_DIR}/share/bzip2/copyright) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) - -vcpkg_test_cmake(PACKAGE_NAME BZip2 MODULE) +set(BZIP2_VERSION 1.0.8) +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceware.org/pub/bzip2/bzip2-${BZIP2_VERSION}.tar.gz" + FILENAME "bzip2-${BZIP2_VERSION}.tar.gz" + SHA512 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES fix-import-export-macros.patch +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DBZIP2_SKIP_HEADERS=ON + -DBZIP2_SKIP_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(READ "${CURRENT_PACKAGES_DIR}/include/bzlib.h" BZLIB_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(BZ_IMPORT)" "0" BZLIB_H "${BZLIB_H}") +else() + string(REPLACE "defined(BZ_IMPORT)" "1" BZLIB_H "${BZLIB_H}") +endif() +file(WRITE "${CURRENT_PACKAGES_DIR}/include/bzlib.h" "${BZLIB_H}") + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(BZIP2_PREFIX "${CURRENT_INSTALLED_DIR}") + set(bzname bz2) + configure_file("${CMAKE_CURRENT_LIST_DIR}/bzip2.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/bzip2.pc" @ONLY) +endif() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(BZIP2_PREFIX "${CURRENT_INSTALLED_DIR}/debug") + set(bzname bz2d) + configure_file("${CMAKE_CURRENT_LIST_DIR}/bzip2.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/bzip2.pc" @ONLY) +endif() + +vcpkg_fixup_pkgconfig() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/bzip2/vcpkg.json b/ports/bzip2/vcpkg.json new file mode 100644 index 00000000000000..2f8b8aabf328a9 --- /dev/null +++ b/ports/bzip2/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "bzip2", + "version-semver": "1.0.8", + "port-version": 2, + "description": "bzip2 is a freely available, patent free, high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.", + "homepage": "https://sourceware.org/bzip2/", + "documentation": "https://sourceware.org/bzip2/docs.html" +} diff --git a/ports/c-ares/CONTROL b/ports/c-ares/CONTROL deleted file mode 100644 index c8a5f48542637b..00000000000000 --- a/ports/c-ares/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: c-ares -Version: 2019-5-2-1 -Homepage: https://github.com/c-ares/c-ares -Description: A C library for asynchronous DNS requests diff --git a/ports/c-ares/portfile.cmake b/ports/c-ares/portfile.cmake index 6d3769b1c2f94c..4e9ee82663d265 100644 --- a/ports/c-ares/portfile.cmake +++ b/ports/c-ares/portfile.cmake @@ -1,54 +1,44 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "c-ares does not currently support UWP.") -endif() - -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO c-ares/c-ares - REF 9f1fdbf5dd633f81352fac0d6bc0d0c4d45be459 - SHA512 2bb3696e839e37c6f2be4b979ae6d0eab2914d6f0ca043f688e3bb3071d2348cb64424049f019c16bc05d472dd61d5071e865edd229dce023a50f556a1961766 + REF cares-1_17_2 + SHA512 1111f1e7eeb0e5d9e70d1a7c8566145d0a5e6e71b020f3fcaa02ecdf1931553ddeff83fdc152a1f9c5a780078e8afe3670164b631df56eecd2b638210cc59bb3 HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(CARES_STATIC 1) - set(CARES_SHARED 0) -else() - set(CARES_STATIC 0) - set(CARES_SHARED 1) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS - -DCARES_STATIC=${CARES_STATIC} - -DCARES_SHARED=${CARES_SHARED} + -DCARES_STATIC=${BUILD_STATIC} + -DCARES_SHARED=${BUILD_SHARED} + -DCARES_BUILD_TOOLS=OFF + -DCARES_BUILD_TESTS=OFF + -DCARES_BUILD_CONTAINER_TESTS=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/c-ares) +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/c-ares) +vcpkg_fixup_pkgconfig() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - file(GLOB EXE_FILES - "${CURRENT_PACKAGES_DIR}/bin/*.exe" - "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe" + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/ares.h" + "#ifdef CARES_STATICLIB" "#if 1" ) - if (EXE_FILES) - file(REMOVE ${EXE_FILES}) - endif() endif() -vcpkg_copy_pdbs() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static OR NOT VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") # Empty folders +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/c-ares) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/c-ares/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/c-ares/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/c-ares/vcpkg.json b/ports/c-ares/vcpkg.json new file mode 100644 index 00000000000000..da731a90c76ef3 --- /dev/null +++ b/ports/c-ares/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "c-ares", + "version-semver": "1.17.2", + "port-version": 1, + "description": "A C library for asynchronous DNS requests", + "homepage": "https://github.com/c-ares/c-ares", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/c4core/portfile.cmake b/ports/c4core/portfile.cmake new file mode 100644 index 00000000000000..a2108192392237 --- /dev/null +++ b/ports/c4core/portfile.cmake @@ -0,0 +1,88 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# Get c4core src +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO biojppm/c4core + REF 636f507c33f0c79dce491aec066455ff384d49dc + SHA512 3282876be5883b047e8d25ee392f62d2e9ae79af8fdd65c11b1e36d2fdb0648230fe6c7fb57472a4cbced166979351f12494215aa664977a113b74c26bb6f19b + HEAD_REF master +) + +set(CM_COMMIT_HASH fe41e86552046c3df9ba73a40bf3d755df028c1e) + +# Get cmake scripts for c4core +vcpkg_download_distfile(CMAKE_ARCHIVE + URLS "https://github.com/biojppm/cmake/archive/${CM_COMMIT_HASH}.zip" + FILENAME "cmake-${CM_COMMIT_HASH}.zip" + SHA512 7292f9856d9c41581f2731e73fdf08880e0f4353b757da38a13ec89b62c5c8cb52b9efc1a9ff77336efa0b6809727c17649e607d8ecacc965a9b2a7a49925237 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_CMAKE + ARCHIVE ${CMAKE_ARCHIVE} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps" +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake") +file(RENAME ${SOURCE_PATH_CMAKE} "${SOURCE_PATH}/cmake") + +set(DB_COMMIT_HASH 78e525c6e74df6d62d782864a52c0d279dcee24f) + +vcpkg_download_distfile(DEBUGBREAK_ARCHIVE + URLS "https://github.com/biojppm/debugbreak/archive/${DB_COMMIT_HASH}.zip" + FILENAME "debugbreak-${DB_COMMIT_HASH}.zip" + SHA512 25f3d45b09ce362f736fac0f6d6a6c7f2053fec4975b32b0565288893e4658fd0648a7988c3a5fe0e373e92705d7a3970eaa7cfc053f375ffb75e80772d0df64 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_DEBUGBREAK + ARCHIVE ${DEBUGBREAK_ARCHIVE} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps" +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/src/c4/ext/debugbreak") +file(RENAME ${SOURCE_PATH_DEBUGBREAK} "${SOURCE_PATH}/src/c4/ext/debugbreak") + +set(FF_COMMIT_HASH 8159e8bcf63c1b92f5a51fb550f966e56624b209) + +vcpkg_download_distfile(FAST_FLOAT_ARCHIVE + URLS "https://github.com/biojppm/fast_float/archive/${FF_COMMIT_HASH}.zip" + FILENAME "fast_float-${FF_COMMIT_HASH}.zip" + SHA512 ae71f74d3bae782f62f037c034bea4e7f45462188c8285971c2959c6b2884d3bb58826681c0989f4290f26fa33237c1b63ceed77ed94f9e97c1cd01b4aa21cd3 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_FAST_FLOAT + ARCHIVE ${FAST_FLOAT_ARCHIVE} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps" +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/src/c4/ext/fast_float") +file(RENAME ${SOURCE_PATH_FAST_FLOAT} "${SOURCE_PATH}/src/c4/ext/fast_float") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/c4core) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/c4core) +endif() + +# Fix paths in config file +file(READ "${CURRENT_PACKAGES_DIR}/share/c4core/c4coreConfig.cmake" _contents) +string(REGEX REPLACE [[[ \t\r\n]*"\${PACKAGE_PREFIX_DIR}[\./\\]*"]] [["${PACKAGE_PREFIX_DIR}/../.."]] _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/c4core/c4coreConfig.cmake" "${_contents}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL + "${SOURCE_PATH}/LICENSE.txt" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/c4core/vcpkg.json b/ports/c4core/vcpkg.json new file mode 100644 index 00000000000000..e59d53476c3c8c --- /dev/null +++ b/ports/c4core/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "c4core", + "version-date": "2021-07-18", + "port-version": 1, + "description": "Library of low-level C++ utilities", + "homepage": "https://github.com/biojppm/c4core" +} diff --git a/ports/caf/CONTROL b/ports/caf/CONTROL deleted file mode 100644 index f4a4383571e471..00000000000000 --- a/ports/caf/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: caf -Version: 0.16.3 -Build-Depends: openssl -Description: an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more. diff --git a/ports/caf/portfile.cmake b/ports/caf/portfile.cmake index 2e34e888e9ec58..1c40312af350d3 100644 --- a/ports/caf/portfile.cmake +++ b/ports/caf/portfile.cmake @@ -1,15 +1,13 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO actor-framework/actor-framework - REF 0.16.3 - SHA512 f7e567264ea1686a431eacbf2a62f49c0f4467df073ec983ae622d9417c28124eb456eb40d6a70dbe062ad58333944924f04f7e3fee5a7b76917890d98bedce1 + REF f7d4fc7ac679e18ba385f64434f8015c3cea9cb5 # 0.17.6 + SHA512 8b4719c26dfad68eed6f2528263702e42f9865bb7a9f2d40909dc6c3fc20bb7259fe44a5f89390ba714c7f9359db2d171ff44685641962c24a70f4e2aa3f3f65 HEAD_REF master - PATCHES - openssl-version-override.patch + PATCHES + openssl-version-override.patch ) vcpkg_configure_cmake( @@ -29,6 +27,7 @@ vcpkg_configure_cmake( -DCAF_NO_OPENSSL=OFF -DCAF_NO_CURL_EXAMPLES=ON -DCAF_OPENSSL_VERSION_OVERRIDE=ON + -DCAF_ENABLE_UTILITY_TARGETS=OFF ) vcpkg_install_cmake() @@ -37,6 +36,10 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR file(INSTALL ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/caf RENAME copyright) + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(COPY ${SOURCE_PATH}/cmake/FindCAF.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) vcpkg_copy_pdbs() diff --git a/ports/caf/usage b/ports/caf/usage new file mode 100644 index 00000000000000..10083d8de8fdf7 --- /dev/null +++ b/ports/caf/usage @@ -0,0 +1,5 @@ +The package caf provides CMake targets: + + find_package(CAF REQUIRED COMPONENTS core io) + target_include_directories(main PRIVATE ${CAF_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${CAF_LIBRARIES}) \ No newline at end of file diff --git a/ports/caf/vcpkg-cmake-wrapper.cmake b/ports/caf/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..b01e408550c646 --- /dev/null +++ b/ports/caf/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(CAF_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${CAF_PREV_MODULE_PATH}) diff --git a/ports/caf/vcpkg.json b/ports/caf/vcpkg.json new file mode 100644 index 00000000000000..fea50a3a51c0b8 --- /dev/null +++ b/ports/caf/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "caf", + "version-string": "0.17.6", + "port-version": 2, + "description": "an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more.", + "homepage": "https://github.com/actor-framework/actor-framework", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/caffe2/CONTROL b/ports/caffe2/CONTROL deleted file mode 100644 index 4d72fb76450316..00000000000000 --- a/ports/caffe2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: caffe2 -Version: 0.8.1-3 -Build-Depends: lmdb, gflags, glog, eigen3, protobuf -Homepage: https://github.com/caffe2/caffe2 -Description: Caffe2 is a lightweight, modular, and scalable deep learning framework. diff --git a/ports/caffe2/portfile.cmake b/ports/caffe2/portfile.cmake index 930b04dd7a25c6..0b19b9eb994ece 100644 --- a/ports/caffe2/portfile.cmake +++ b/ports/caffe2/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) diff --git a/ports/caffe2/vcpkg.json b/ports/caffe2/vcpkg.json new file mode 100644 index 00000000000000..1f4f34d63e1045 --- /dev/null +++ b/ports/caffe2/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "caffe2", + "version-string": "0.8.1", + "port-version": 4, + "description": "Caffe2 is a lightweight, modular, and scalable deep learning framework.", + "homepage": "https://github.com/caffe2/caffe2", + "supports": "!x86", + "dependencies": [ + "eigen3", + "gflags", + "glog", + "lmdb", + "protobuf" + ] +} diff --git a/ports/cairo/0001-meson-fix-macOS-build-and-add-macOS-ci.patch b/ports/cairo/0001-meson-fix-macOS-build-and-add-macOS-ci.patch new file mode 100644 index 00000000000000..5bc6ca8855267a --- /dev/null +++ b/ports/cairo/0001-meson-fix-macOS-build-and-add-macOS-ci.patch @@ -0,0 +1,112 @@ +From d8d16562ec094593eba4446432e918704590ab20 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= +Date: Sat, 26 Sep 2020 19:25:21 +0100 +Subject: [PATCH] meson: fix macOS build and add macOS ci + +Fixes #441 +--- + .gitlab-ci.yml | 26 ++++++++++++++++++++ + meson.build | 61 ++++++++++++++++++++++------------------------- + meson_options.txt | 1 + + 3 files changed, 56 insertions(+), 32 deletions(-) + +diff --git a/meson.build b/meson.build +index 53a9af343..fe7757b1f 100644 +--- a/meson.build ++++ b/meson.build +@@ -371,37 +371,34 @@ if qtgui_dep.found() and false + deps += [qtgui_dep] + endif + +-# Untested +-if cc.has_header('ApplicationServices/ApplicationServices.h') +- if cc.has_header('CoreGraphics/CoreGraphics.h') +- quartz_extra_libs = ['-Xlinker', '-framework', '-Xlinker', 'CoreGraphics'] +- else +- quartz_extra_libs = ['-Xlinker', '-framework', '-Xlinker', 'ApplicationServices'] ++if host_machine.system() == 'darwin' and not get_option('quartz').disabled() ++ quartz_deps = dependency('appleframeworks', modules : ['CoreFoundation', 'ApplicationServices'], required: get_option('quartz')) ++ ++ if quartz_deps.found() ++ deps += [quartz_deps] ++ ++ feature_conf.set('CAIRO_HAS_QUARTZ_SURFACE', 1) ++ feature_conf.set('CAIRO_HAS_QUARTZ_FONT', 1) ++ feature_conf.set('CAIRO_HAS_QUARTZ_IMAGE_SURFACE', 1) ++ ++ built_features += [ ++ { ++ 'name': 'cairo-quartz', ++ 'description': 'Quartz surface backend', ++ 'deps': quartz_deps, ++ }, ++ { ++ 'name': 'cairo-quartz-image', ++ 'description': 'Quartz Image surface backend', ++ 'deps': quartz_deps, ++ }, ++ { ++ 'name': 'cairo-quartz-font', ++ 'description': 'Quartz font backend', ++ 'deps': quartz_deps, ++ }, ++ ] + endif +- +- extra_link_args += quartz_extra_libs +- +- feature_conf.set('CAIRO_HAS_QUARTZ_SURFACE', 1) +- feature_conf.set('CAIRO_HAS_QUARTZ_FONT', 1) +- feature_conf.set('CAIRO_HAS_QUARTZ_IMAGE_SURFACE', 1) +- +- built_features += [ +- { +- 'name': 'cairo-quartz', +- 'description': 'Quartz surface backend', +- 'libs': quartz_extra_libs, +- }, +- { +- 'name': 'cairo-quartz-image', +- 'description': 'Quartz Image surface backend', +- 'libs': quartz_extra_libs, +- }, +- { +- 'name': 'cairo-quartz-font', +- 'description': 'Quartz font backend', +- 'libs': quartz_extra_libs, +- }, +- ] + endif + + if host_machine.system() == 'windows' +@@ -887,13 +884,13 @@ foreach feature: built_features + feature_deps = feature.get('deps', []) + feature_libs = feature.get('libs', []) + feature_compile_deps = feature.get('compile-deps', []) +- pkgmod.generate(libraries: [libcairo] + feature_deps + feature_libs, ++ pkgmod.generate(libraries: [libcairo, feature_deps, feature_libs], + name: feature['name'], + description: feature['description'] + ' for cairo graphics library', + ) + meson.override_dependency(feature['name'], + declare_dependency(link_with: libcairo, +- dependencies: feature_deps + feature_compile_deps, ++ dependencies: [feature_deps, feature_compile_deps], + link_args: feature_libs, + ) + ) +diff --git a/meson_options.txt b/meson_options.txt +index ff11fe7ed..5cafe8bda 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -13,6 +13,7 @@ option('glesv3', type : 'feature', value : 'disabled') + option('drm', type : 'feature', value : 'disabled') + option('openvg', type : 'feature', value : 'disabled') + option('png', type : 'feature', value : 'auto') # png and svg surfaces ++option('quartz', type : 'feature', value : 'auto') + option('qt', type : 'feature', value : 'disabled') + option('tee', type : 'feature', value : 'disabled') + option('xcb', type : 'feature', value : 'auto') +-- +2.29.2 + diff --git a/ports/cairo/0001_fix_osx_defined.patch b/ports/cairo/0001_fix_osx_defined.patch deleted file mode 100644 index 7365dcce240aba..00000000000000 --- a/ports/cairo/0001_fix_osx_defined.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c -index 3b308757..36700ff0 100644 ---- a/src/cairo-ft-font.c -+++ b/src/cairo-ft-font.c -@@ -67,7 +67,7 @@ - #include FT_LCD_FILTER_H - #endif - --#if HAVE_UNISTD_H -+#if defined(HAVE_UNISTD_H) - #include - #else - #define access(p, m) 0 diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt deleted file mode 100644 index 750a9850d266f6..00000000000000 --- a/ports/cairo/CMakeLists.txt +++ /dev/null @@ -1,252 +0,0 @@ -cmake_minimum_required(VERSION 3.11) -project(cairo C) - -# Add include directories -include_directories(".") -if(CMAKE_SYSTEM_NAME STREQUAL "Windows") - include_directories("./win32") -endif() - -file(GLOB SOURCES -"cairo-analysis-surface.c" -"cairo-arc.c" -"cairo-array.c" -"cairo-atomic.c" -"cairo-base64-stream.c" -"cairo-base85-stream.c" -"cairo-bentley-ottmann.c" -"cairo-bentley-ottmann-rectangular.c" -"cairo-bentley-ottmann-rectilinear.c" -"cairo-botor-scan-converter.c" -"cairo-boxes.c" -"cairo-boxes-intersect.c" -"cairo.c" -"cairo-cache.c" -"cairo-clip.c" -"cairo-clip-boxes.c" -"cairo-clip-polygon.c" -"cairo-clip-region.c" -"cairo-clip-surface.c" -"cairo-color.c" -"cairo-composite-rectangles.c" -"cairo-compositor.c" -"cairo-contour.c" -"cairo-damage.c" -"cairo-debug.c" -"cairo-default-context.c" -"cairo-device.c" -"cairo-error.c" -"cairo-fallback-compositor.c" -"cairo-fixed.c" -"cairo-font-face.c" -"cairo-font-face-twin.c" -"cairo-font-face-twin-data.c" -"cairo-font-options.c" -"cairo-freelist.c" -"cairo-freed-pool.c" -"cairo-gstate.c" -"cairo-hash.c" -"cairo-hull.c" -"cairo-image-compositor.c" -"cairo-image-info.c" -"cairo-image-source.c" -"cairo-image-surface.c" -"cairo-line.c" -"cairo-lzw.c" -"cairo-matrix.c" -"cairo-mask-compositor.c" -"cairo-mesh-pattern-rasterizer.c" -"cairo-mempool.c" -"cairo-misc.c" -"cairo-mono-scan-converter.c" -"cairo-mutex.c" -"cairo-no-compositor.c" -"cairo-observer.c" -"cairo-output-stream.c" -"cairo-paginated-surface.c" -"cairo-path-bounds.c" -"cairo-path.c" -"cairo-path-fill.c" -"cairo-path-fixed.c" -"cairo-path-in-fill.c" -"cairo-path-stroke.c" -"cairo-path-stroke-boxes.c" -"cairo-path-stroke-polygon.c" -"cairo-path-stroke-traps.c" -"cairo-path-stroke-tristrip.c" -"cairo-pattern.c" -"cairo-pen.c" -"cairo-polygon.c" -"cairo-polygon-intersect.c" -"cairo-polygon-reduce.c" -"cairo-raster-source-pattern.c" -"cairo-recording-surface.c" -"cairo-rectangle.c" -"cairo-rectangular-scan-converter.c" -"cairo-region.c" -"cairo-rtree.c" -"cairo-scaled-font.c" -"cairo-shape-mask-compositor.c" -"cairo-slope.c" -"cairo-spans.c" -"cairo-spans-compositor.c" -"cairo-spline.c" -"cairo-stroke-dash.c" -"cairo-stroke-style.c" -"cairo-surface.c" -"cairo-surface-clipper.c" -"cairo-surface-fallback.c" -"cairo-surface-observer.c" -"cairo-surface-offset.c" -"cairo-surface-snapshot.c" -"cairo-surface-subsurface.c" -"cairo-surface-wrapper.c" -"cairo-time.c" -"cairo-tor-scan-converter.c" -"cairo-tor22-scan-converter.c" -"cairo-clip-tor-scan-converter.c" -"cairo-tag-attributes.c" -"cairo-tag-stack.c" -"cairo-toy-font-face.c" -"cairo-traps.c" -"cairo-tristrip.c" -"cairo-traps-compositor.c" -"cairo-unicode.c" -"cairo-user-font.c" -"cairo-version.c" -"cairo-wideint.c" -# generic font support -"cairo-cff-subset.c" -"cairo-scaled-font-subsets.c" -"cairo-truetype-subset.c" -"cairo-type1-fallback.c" -"cairo-type1-glyph-names.c" -"cairo-type1-subset.c" -"cairo-type3-glyph-surface.c" -# pdf -"cairo-pdf-interchange.c" -"cairo-pdf-operators.c" -"cairo-pdf-shading.c" -"cairo-pdf-surface.c" -# png -"cairo-png.c" -# ps surface -"cairo-ps-surface.c" -# deflate source -"cairo-deflate-stream.c" -# svg surface -"cairo-svg-surface.c" -# script surface -"cairo-script-surface.c" -# fontconfig + freetype -"cairo-ft-font.c" -) - -# win32 -file(GLOB PLATFORM_SOURCES_WIN32 -"win32/cairo-win32-debug.c" -"win32/cairo-win32-device.c" -"win32/cairo-win32-gdi-compositor.c" -"win32/cairo-win32-system.c" -"win32/cairo-win32-surface.c" -"win32/cairo-win32-display-surface.c" -"win32/cairo-win32-printing-surface.c" -"win32/cairo-win32-font.c" -) - -if(CMAKE_SYSTEM_NAME STREQUAL "Windows") - list(APPEND SOURCES ${PLATFORM_SOURCES_WIN32}) -endif() - -set(CMAKE_DEBUG_POSTFIX "d") - -find_package(Threads REQUIRED) -find_package(ZLIB REQUIRED) -find_package(PNG REQUIRED) -find_package(Freetype REQUIRED) -find_package(unofficial-glib CONFIG REQUIRED) -find_package(unofficial-fontconfig CONFIG REQUIRED) -find_package(unofficial-pixman CONFIG REQUIRED) - -# Cairo needs to be told which features of FreeType are availible -add_definitions( - -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1 - -DHAVE_FT_LIBRARY_SETLCDFILTER=1 - -DHAVE_FT_GLYPHSLOT_OBLIQUE=1 - -DHAVE_FT_LOAD_SFNT_TABLE=1 - -DHAVE_FT_GET_X11_FONT_FORMAT=1) - -# additional features for macOS -if((CMAKE_SYSTEM_NAME STREQUAL "Darwin") OR (CMAKE_SYSTEM_NAME STREQUAL "Linux")) - add_definitions( - -DHAVE_INTTYPES_H=1 - -DHAVE_STDINT_H=1 - -DHAVE_SYS_TYPES_H=1 - -DHAVE_UINT64_T=1 - -DHAVE_UNISTD_H=1 - -DCAIRO_HAS_PTHREAD=1 - -DCAIRO_HAS_REAL_PTHREAD=1) -endif() - -add_library(cairo ${SOURCES}) - -target_link_libraries(cairo PRIVATE ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 unofficial::fontconfig::fontconfig) - -if(CMAKE_SYSTEM_NAME STREQUAL "Windows") - target_link_libraries(cairo PRIVATE gdi32 msimg32 user32) -endif() - -# GObject support module - -set(CAIRO_GOBJECT_SOURCES - "../util/cairo-gobject/cairo-gobject-enums.c" - "../util/cairo-gobject/cairo-gobject-structs.c") - -# GObject support sources do not include header with export macro -if(BUILD_SHARED_LIBS) - set_source_files_properties( - "../util/cairo-gobject/cairo-gobject-enums.c" - "../util/cairo-gobject/cairo-gobject-structs.c" - PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)") -endif() - -add_library(cairo-gobject ${CAIRO_GOBJECT_SOURCES}) -target_link_libraries(cairo-gobject PRIVATE cairo unofficial::glib::gobject unofficial::glib::glib) - -if(MSVC) - # cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files - # NOTE: options only available to MSVC, clang in macOS doesn't understand these flags - target_compile_options(cairo PRIVATE - "/wd4244" "/wd4146" "/wd4312" "/wd4267" "/wd4996" "/wd4311" "/wd4334" "/wd4101" - ) - target_compile_options(cairo-gobject PRIVATE - "/wd4244" "/wd4146" "/wd4312" "/wd4267" "/wd4996" "/wd4311" "/wd4334" "/wd4101" - ) -endif() - -install(TARGETS cairo cairo-gobject - EXPORT cairo-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -install( - EXPORT cairo-targets - NAMESPACE unofficial::cairo:: - FILE unofficial-cairo-targets.cmake - DESTINATION share/unofficial-cairo -) - -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-cairo-config.cmake " -include(CMakeFindDependencyMacro) -find_dependency(ZLIB) -find_dependency(PNG) -find_dependency(Freetype) -find_dependency(unofficial-glib CONFIG) -find_dependency(unofficial-fontconfig CONFIG) -find_dependency(unofficial-pixman CONFIG) - -include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-cairo-targets.cmake) -") -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-cairo-config.cmake DESTINATION share/unofficial-cairo) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL deleted file mode 100644 index d53d5003da6b2f..00000000000000 --- a/ports/cairo/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: cairo -Version: 1.16.0-1 -Homepage: https://cairographics.org -Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. -Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairo/cairo-features.h b/ports/cairo/cairo-features.h deleted file mode 100644 index e3eb31c139ce85..00000000000000 --- a/ports/cairo/cairo-features.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef CAIRO_FEATURES_H -#define CAIRO_FEATURES_H -/* Chosen from the various possible defines in "../build/Makefile.win32.features.h"" - guided by "../build/Makefile.win32.features". Modify at your own risk. -*/ - -/* Always for Win32 */ -#ifdef _WIN32 -#define CAIRO_HAS_WIN32_SURFACE 1 -#define CAIRO_HAS_WIN32_FONT 1 -#endif - -/* Require libpng */ -#define CAIRO_HAS_PNG_FUNCTIONS 1 -#define CAIRO_HAS_PS_SURFACE 1 -#define CAIRO_HAS_PDF_SURFACE 1 - -// Likely available -#define CAIRO_HAS_SCRIPT_SURFACE 1 -#define CAIRO_HAS_SVG_SURFACE 1 - -/* Always available */ -#define CAIRO_HAS_IMAGE_SURFACE 1 -#define CAIRO_HAS_MIME_SURFACE 1 -#define CAIRO_HAS_RECORDING_SURFACE 1 -#define CAIRO_HAS_OBSERVER_SURFACE 1 -#define CAIRO_HAS_USER_FONT 1 - -/* Require GObject */ -#define CAIRO_HAS_GOBJECT_FUNCTIONS 1 - -/* Require FreeType */ -#define CAIRO_HAS_FT_FONT 1 - -/* Require FontConfig */ -#define CAIRO_HAS_FC_FONT 1 - -#endif diff --git a/ports/cairo/cairo_static_fix.patch b/ports/cairo/cairo_static_fix.patch new file mode 100644 index 00000000000000..8030679b1dfaf3 --- /dev/null +++ b/ports/cairo/cairo_static_fix.patch @@ -0,0 +1,92 @@ +diff --git a/util/cairo-fdr/meson.build b/util/cairo-fdr/meson.build +index 3cb66c678..b12b90036 100644 +--- a/util/cairo-fdr/meson.build ++++ b/util/cairo-fdr/meson.build +@@ -4,7 +4,7 @@ cairo_fdr_sources = [ + + libcairofdr = library('cairo-fdr', cairo_fdr_sources, + include_directories: [incbase, incsrc], +- c_args: ['-DHAVE_CONFIG_H'], ++ c_args: ['-DHAVE_CONFIG_H'] + static_definition, + dependencies: deps, + install: true, + install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'cairo'), +diff --git a/util/cairo-script/meson.build b/util/cairo-script/meson.build +index a782ec63f..7e21f6c04 100644 +--- a/util/cairo-script/meson.build ++++ b/util/cairo-script/meson.build +@@ -26,7 +26,7 @@ csi_trace_sources = [ + + libcairoscript = library('cairo-script-interpreter', + cairoscript_interpreter_sources, +- c_args: ['-DHAVE_CONFIG_H'], ++ c_args: ['-DHAVE_CONFIG_H'] + static_definition, + include_directories: [incbase, incsrc], + dependencies: deps, + link_with: [libcairo], +@@ -41,14 +41,14 @@ libcairoscript_dep = declare_dependency(link_with: libcairoscript, + include_directories: [incbase, inccairoscript]) + + csi_replay_exe = executable('csi-replay', csi_replay_sources, +- c_args: ['-DHAVE_CONFIG_H'], ++ c_args: ['-DHAVE_CONFIG_H'] + static_definition, + include_directories: [incbase, incsrc], + link_with: [libcairo, libcairoscript], + dependencies: deps, + ) + + csi_exec_exe = executable('csi-exec', csi_exec_sources, +- c_args: ['-DHAVE_CONFIG_H'], ++ c_args: ['-DHAVE_CONFIG_H'] + static_definition, + include_directories: [incbase, incsrc], + link_with: [libcairo, libcairoscript], + dependencies: deps, +@@ -56,7 +56,7 @@ csi_exec_exe = executable('csi-exec', csi_exec_sources, + + if feature_conf.get('CAIRO_HAS_SCRIPT_SURFACE', 0) == 1 and conf.get('HAVE_LIBGEN_H', 0) == 1 + csi_trace_exe = executable('csi-trace', csi_trace_sources, +- c_args: ['-DHAVE_CONFIG_H'], ++ c_args: ['-DHAVE_CONFIG_H'] + static_definition, + include_directories: [incbase, incsrc], + link_with: [libcairo, libcairoscript], + dependencies: deps, +diff --git a/util/cairo-trace/meson.build b/util/cairo-trace/meson.build +index e836f98cf..76ee372a2 100644 +--- a/util/cairo-trace/meson.build ++++ b/util/cairo-trace/meson.build +@@ -12,7 +12,7 @@ libcairotrace = library('cairo-trace', cairo_trace_sources, + include_directories: [incbase, incsrc], + dependencies: deps, + link_args: extra_link_args, +- c_args: ['-DSHARED_LIB_EXT="@0@"'.format(shared_lib_ext), '-DHAVE_CONFIG_H'] + pthread_c_args, ++ c_args: ['-DSHARED_LIB_EXT="@0@"'.format(shared_lib_ext), '-DHAVE_CONFIG_H'] + pthread_c_args + static_definition, + install: true, + install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'cairo'), + ) +diff --git a/util/meson.build b/util/meson.build +index 016955cea..a90363115 100644 +--- a/util/meson.build ++++ b/util/meson.build +@@ -2,6 +2,14 @@ subdir('cairo-missing') + + cairo_utils = [] + ++static_definition=[] ++if host_machine.system() == 'windows' ++ lib_default = get_option('default_library') ++ if lib_default == 'static' ++ static_definition=['-DCAIRO_WIN32_STATIC_BUILD'] ++ endif ++endif ++ + if feature_conf.get('CAIRO_HAS_GOBJECT_FUNCTIONS', 0) == 1 + subdir('cairo-gobject') + endif +@@ -55,6 +63,7 @@ foreach util : cairo_utils + include_directories: [incbase, incsrc, inccairoscript], + dependencies: deps + util_deps, + link_with: [libcairo, libcairoscript], ++ c_args: static_definition + ) + endforeach + diff --git a/ports/cairo/export-only-in-shared-build.patch b/ports/cairo/export-only-in-shared-build.patch deleted file mode 100644 index d8b46c1ee1a9cd..00000000000000 --- a/ports/cairo/export-only-in-shared-build.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/cairoint.h b/src/cairoint.h -index 4fedf86..dfa149e 100644 ---- a/src/cairoint.h -+++ b/src/cairoint.h -@@ -50,7 +50,9 @@ - #include "config.h" - #endif - --#ifdef _MSC_VER -+#if defined _MSC_VER && defined cairo_EXPORTS - #define cairo_public __declspec(dllexport) -+#else -+#define cairo_public - #endif - diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index ed120f07fd07df..61a7108b177eb2 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -1,63 +1,89 @@ -include(vcpkg_common_functions) -set(CAIRO_VERSION 1.16.0) +set(CAIRO_VERSION 1.17.4) -vcpkg_download_distfile(ARCHIVE - URLS "https://www.cairographics.org/releases/cairo-${CAIRO_VERSION}.tar.xz" - FILENAME "cairo-${CAIRO_VERSION}.tar.xz" - SHA512 9eb27c4cf01c0b8b56f2e15e651f6d4e52c99d0005875546405b64f1132aed12fbf84727273f493d84056a13105e065009d89e94a8bfaf2be2649e232b82377f -) -vcpkg_extract_source_archive_ex( +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${CAIRO_VERSION} - PATCHES - export-only-in-shared-build.patch - 0001_fix_osx_defined.patch + REPO cairo/cairo + REF 156cd3eaaebfd8635517c2baf61fcf3627ff7ec2 #v1.17.4 + SHA512 2c516ad3ffe56cf646b2435d6ef3cf25e8c05aeb13d95dd18a7d0510d134d9990cba1b376063352ff99483cfc4e5d2af849afd2f9538f9136f22d44d34be362c + HEAD_REF master + PATCHES 0001-meson-fix-macOS-build-and-add-macOS-ci.patch + cairo_static_fix.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src) -file(COPY ${CURRENT_PORT_DIR}/cairo-features.h DESTINATION ${SOURCE_PATH}/src) +if("fontconfig" IN_LIST FEATURES) + list(APPEND OPTIONS -Dfontconfig=enabled) +else() + list(APPEND OPTIONS -Dfontconfig=disabled) +endif() -vcpkg_configure_cmake( - PREFER_NINJA - SOURCE_PATH ${SOURCE_PATH}/src -) +if("freetype" IN_LIST FEATURES) + list(APPEND OPTIONS -Dfreetype=enabled) +else() + list(APPEND OPTIONS -Dfreetype=disabled) +endif() -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cairo TARGET_PATH share/unofficial-cairo) - -# Copy the appropriate header files. -foreach(FILE -"${SOURCE_PATH}/src/cairo.h" -"${SOURCE_PATH}/src/cairo-deprecated.h" -"${SOURCE_PATH}/src/cairo-features.h" -"${SOURCE_PATH}/src/cairo-pdf.h" -"${SOURCE_PATH}/src/cairo-ps.h" -"${SOURCE_PATH}/src/cairo-script.h" -"${SOURCE_PATH}/src/cairo-svg.h" -"${SOURCE_PATH}/cairo-version.h" -"${SOURCE_PATH}/src/cairo-win32.h" -"${SOURCE_PATH}/util/cairo-gobject/cairo-gobject.h" -"${SOURCE_PATH}/src/cairo-ft.h") - file(COPY ${FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/include) - file(COPY ${FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/include/cairo) -endforeach() - -foreach(FILE "${CURRENT_PACKAGES_DIR}/include/cairo.h" "${CURRENT_PACKAGES_DIR}/include/cairo/cairo.h") - file(READ ${FILE} CAIRO_H) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") - else() - string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}") +if ("x11" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature x11 only support UNIX.") endif() - file(WRITE ${FILE} "${CAIRO_H}") -endforeach() + message(WARNING "You will need to install Xorg dependencies to use feature x11:\napt install libx11-dev libxft-dev\n") + list(APPEND OPTIONS -Dxlib=enabled) +else() + list(APPEND OPTIONS -Dxlib=disabled) +endif() +list(APPEND OPTIONS -Dxcb=disabled) +list(APPEND OPTIONS -Dxlib-xcb=disabled) + +if("gobject" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Feature gobject currently only supports dynamic build.") + endif() + list(APPEND OPTIONS -Dglib=enabled) +else() + list(APPEND OPTIONS -Dglib=disabled) +endif() + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(ENV{CPP} "cl_cpp_wrapper") +endif() + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${OPTIONS} + -Dtests=disabled + -Dzlib=enabled + -Dpng=enabled + -Dspectre=auto + -Dsymbol-lookup=disabled + -Dgtk2-utils=disabled +) +vcpkg_install_meson() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +set(_file "${CURRENT_PACKAGES_DIR}/include/cairo/cairo.h") +file(READ ${_file} CAIRO_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") +else() + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}") +endif() +file(WRITE ${_file} "${CAIRO_H}") # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairo) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cairo/COPYING ${CURRENT_PACKAGES_DIR}/share/cairo/copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +#TODO: Fix script +#set(TOOLS) +#if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/cairo-trace${VCPKG_TARGET_EXECUTABLE_SUFFIX}") +# list(APPEND TOOLS cairo-trace) # sh script which needs to be fixed due to absolute paths in it. +#endif() +#vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN) -vcpkg_test_cmake(PACKAGE_NAME unofficial-cairo) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() diff --git a/ports/cairo/vcpkg.json b/ports/cairo/vcpkg.json new file mode 100644 index 00000000000000..e7de197c48ad64 --- /dev/null +++ b/ports/cairo/vcpkg.json @@ -0,0 +1,43 @@ +{ + "name": "cairo", + "version": "1.17.4", + "port-version": 2, + "description": "Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.", + "homepage": "https://cairographics.org", + "dependencies": [ + "dirent", + "expat", + "libpng", + "lzo", + "pixman", + "pthread", + "zlib" + ], + "default-features": [ + "fontconfig", + "freetype" + ], + "features": { + "fontconfig": { + "description": "build with fontconfig", + "dependencies": [ + "fontconfig" + ] + }, + "freetype": { + "description": "use the freetype font backend", + "dependencies": [ + "freetype" + ] + }, + "gobject": { + "description": "build gobject module", + "dependencies": [ + "glib" + ] + }, + "x11": { + "description": "build with x11 support" + } + } +} diff --git a/ports/cairomm/0001-fix-build.patch b/ports/cairomm/0001-fix-build.patch deleted file mode 100644 index 59e281d79d8b07..00000000000000 --- a/ports/cairomm/0001-fix-build.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b769f250a39df110db2615c0e0d85b52f2ab6e77 Mon Sep 17 00:00:00 2001 -From: Mikhail Paulyshka -Date: Sun, 12 Mar 2017 17:57:03 +0300 -Subject: [PATCH] Fix build - ---- - cairomm/win32_surface.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/cairomm/win32_surface.h b/cairomm/win32_surface.h -index 2e35b9a..c4454c4 100644 ---- a/cairomm/win32_surface.h -+++ b/cairomm/win32_surface.h -@@ -84,6 +84,8 @@ public: - */ - static RefPtr create(HDC hdc); - -+ static RefPtr create(Format format, int width, int height); -+ - /** Creates a device-independent-bitmap surface not associated with any - * particular existing surface or device context. The created bitmap will be - * unititialized. --- -2.11.0.windows.1 - diff --git a/ports/cairomm/CMakeLists.txt b/ports/cairomm/CMakeLists.txt deleted file mode 100644 index 1274a643167533..00000000000000 --- a/ports/cairomm/CMakeLists.txt +++ /dev/null @@ -1,109 +0,0 @@ -project(cairomm) -cmake_minimum_required(VERSION 3.4) - -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build/cmake") - -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -#get cairomm version -file (STRINGS "configure.ac" CONFIGURE_AC_INIT REGEX "AC_INIT\\(\\[cairomm\\], \\[.*\\].*" ) -string(REGEX REPLACE "AC_INIT\\(\\[.*\\], \\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].*" "\\1" VERSION ${CONFIGURE_AC_INIT}) -string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" CAIROMM_MAJOR_VERSION ${VERSION}) -string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" CAIROMM_MINOR_VERSION ${VERSION}) -string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CAIROMM_MICRO_VERSION ${VERSION}) -message(STATUS "Ciaromm version: ${CAIROMM_MAJOR_VERSION}.${CAIROMM_MINOR_VERSION}.${CAIROMM_MICRO_VERSION}") - -find_package(Cairo REQUIRED) -find_package(SigC++ REQUIRED) - -#configure -option(BUILD_SHARED_LIBS "Build the shared library" ON) - -option(CAIROMM_ENABLE_API_EXCEPTIONS "enable API exceptions" ON) -if(CAIROMM_ENABLE_API_EXCEPTIONS) - set(CAIROMM_EXCEPTIONS_ENABLED ON) -else() - set(CAIROMM_EXCEPTIONS_ENABLED OFF) -endif() - -configure_file("build/cmake/cairommconfig.h.cmake" "cairommconfig.h") -configure_file("build/cmake/cairomm.rc.cmake" "cairomm.rc" @ONLY) - -#build -set(cairomm_cc - cairomm/context.cc - cairomm/context_surface_quartz.cc - cairomm/context_surface_win32.cc - cairomm/context_surface_xlib.cc - cairomm/device.cc - cairomm/exception.cc - cairomm/fontface.cc - cairomm/fontoptions.cc - cairomm/matrix.cc - cairomm/path.cc - cairomm/pattern.cc - cairomm/private.cc - cairomm/quartz_font.cc - cairomm/quartz_surface.cc - cairomm/region.cc - cairomm/scaledfont.cc - cairomm/script.cc - cairomm/script_surface.cc - cairomm/surface.cc - cairomm/win32_font.cc - cairomm/win32_surface.cc - cairomm/xlib_surface.cc) - -set(cairomm_public_h - cairomm/cairomm.h - cairomm/context.h - cairomm/device.h - cairomm/enums.h - cairomm/exception.h - cairomm/fontface.h - cairomm/fontoptions.h - cairomm/matrix.h - cairomm/path.h - cairomm/pattern.h - cairomm/quartz_font.h - cairomm/quartz_surface.h - cairomm/refptr.h - cairomm/region.h - cairomm/scaledfont.h - cairomm/script.h - cairomm/script_surface.h - cairomm/surface.h - cairomm/types.h - cairomm/win32_font.h - cairomm/win32_surface.h - cairomm/xlib_surface.h) - -set(cairomm_private_h - cairomm/context_private.h - cairomm/private.h) - -set(cairomm_rc - ${CMAKE_BINARY_DIR}/cairomm.rc) - -add_library(cairomm-1.0 ${cairomm_cc} ${cairomm_rc}) -target_link_libraries(cairomm-1.0 ${CAIRO_LIBRARY} ${SIGC++_LIBRARY} ) -target_include_directories(cairomm-1.0 PRIVATE - ${CAIRO_INCLUDE_DIR} - ${SIGC++_INCLUDE_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}) - -install( - TARGETS cairomm-1.0 - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) - -install( - FILES ${cairomm_public_h} - DESTINATION include/cairomm) - -install( - FILES ${CMAKE_BINARY_DIR}/cairommconfig.h - DESTINATION include) diff --git a/ports/cairomm/CONTROL b/ports/cairomm/CONTROL deleted file mode 100644 index 4705065fc33b22..00000000000000 --- a/ports/cairomm/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: cairomm -Version: 1.15.3-3 -Homepage: https://www.cairographics.org -Description: A C++ wrapper for the cairo graphics library -Build-Depends: cairo, libsigcpp diff --git a/ports/cairomm/cmake/FindCairo.cmake b/ports/cairomm/cmake/FindCairo.cmake deleted file mode 100644 index 0a87fadf8df6fa..00000000000000 --- a/ports/cairomm/cmake/FindCairo.cmake +++ /dev/null @@ -1,131 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. -# -# revision: 2 -# See https://github.com/CMakePorts/CMakeFindPackages for updates -# -#.rst: -# FindCairo -# --------- -# -# Locate Cairo library -# -# This module defines -# -# :: -# CAIRO_FOUND - system has the CAIRO library -# CAIRO_INCLUDE_DIR - the CAIRO include directory -# CAIRO_LIBRARIES - The libraries needed to use CAIRO -# CAIRO_VERSION - This is set to $major.$minor.$revision (eg. 0.9.8) -# CAIRO_VERSION_STRING - This is set to $major.$minor.$revision (eg. 0.9.8) -# -# Authors: -# Copyright (c) Eric Wing -# Copyright (c) Alexander Neundorf -# Copyright (c) 2008 Joshua L. Blocher -# Copyright (c) 2012 Dmitry Baryshnikov -# Copyright (c) 2013-2017 Mikhail Paulyshka -# - - -if (NOT WIN32) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(_CAIRO cairo) - - SET(CAIRO_VERSION ${_CAIRO_VERSION}) - STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\1" num "${CAIRO_VERSION}") - MATH (EXPR CAIRO_VERSION_MAJOR "${num}") - STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\2" num "${CAIRO_VERSION}") - MATH (EXPR CAIRO_VERSION_MINOR "${num}") - STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\3" num "${CAIRO_VERSION}") - MATH (EXPR CAIRO_VERSION_MICRO "${num}") - endif (PKG_CONFIG_FOUND) -endif (NOT WIN32) - -set(_CAIRO_ROOT_HINTS_AND_PATHS - HINTS - $ENV{CAIRO} - $ENV{CAIRO_DIR} - ${CMAKE_FIND_ROOT_PATH} - ${CAIRO_ROOT_DIR} - PATHS - ${CMAKE_FIND_ROOT_PATH} - $ENV{CAIRO}/src - /usr - /usr/local -) - -find_path(CAIRO_INCLUDE_DIR - NAMES - cairo.h - HINTS - ${_CAIRO_INCLUDEDIR} - ${_CAIRO_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - include - "include/cairo" -) - -if(NOT CAIRO_LIBRARY) - FIND_LIBRARY(CAIRO_LIBRARY_RELEASE - NAMES - cairo - cairo-static - HINTS - ${_CAIRO_LIBDIR} - ${_CAIRO_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - "lib" - "local/lib" - ) - - FIND_LIBRARY(CAIRO_LIBRARY_DEBUG - NAMES - cairod - cairo-staticd - HINTS - ${_CAIRO_LIBDIR} - ${_CAIRO_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - "lib" - "local/lib" - ) - - include(SelectLibraryConfigurations) - select_library_configurations(CAIRO) -endif() -set(CAIRO_LIBRARIES ${CAIRO_LIBRARY}) - -if (NOT CAIRO_VERSION) - if (EXISTS "${CAIRO_INCLUDE_DIR}/cairo-version.h") - file(READ "${CAIRO_INCLUDE_DIR}/cairo-version.h" CAIRO_VERSION_CONTENT) - - string(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") - set(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}") - - string(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") - set(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}") - - string(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") - set(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}") - - set(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}") - set(CAIRO_VERSION_STRING CAIRO_VERSION) - endif () -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - CAIRO - REQUIRED_VARS - CAIRO_LIBRARIES - CAIRO_INCLUDE_DIR - VERSION_VAR - CAIRO_VERSION_STRING -) - -MARK_AS_ADVANCED( - CAIRO_INCLUDE_DIR - CAIRO_LIBRARY - CAIRO_LIBRARIES) diff --git a/ports/cairomm/cmake/FindSigC++.cmake b/ports/cairomm/cmake/FindSigC++.cmake deleted file mode 100644 index 8d65f70d9a67ad..00000000000000 --- a/ports/cairomm/cmake/FindSigC++.cmake +++ /dev/null @@ -1,111 +0,0 @@ -# - Try to find SIGC++ -# Once done this will define -# -# SIGC++_ROOT_DIR - Set this variable to the root installation of SIGC++ -# SIGC++_FOUND - system has SIGC++ -# SIGC++_INCLUDE_DIRS - the SIGC++ include directory -# SIGC++_LIBRARIES - Link these to use SIGC++ -# -# Copyright (c) 2008 Joshua L. Blocher -# Copyright (c) 2012 Dmitry Baryshnikov -# Copyright (c) 2013-2017 Mikhail Paulyshka -# -# Distributed under the OSI-approved BSD License -# - -if (NOT WIN32) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(_SIGC++ sigc++-2.0) - SET(SIGC++_VERSION ${_SIGC++_VERSION}) - endif (PKG_CONFIG_FOUND) -endif (NOT WIN32) - -SET(_SIGC++_ROOT_HINTS - $ENV{SIGC++} - ${CMAKE_FIND_ROOT_PATH} - ${SIGC++_ROOT_DIR} -) - -SET(_SIGC++_ROOT_PATHS - $ENV{SIGC++}/src - /usr - /usr/local -) - -SET(_SIGC++_ROOT_HINTS_AND_PATHS - HINTS ${_SIGC++_ROOT_HINTS} - PATHS ${_SIGC++_ROOT_PATHS} -) - -FIND_PATH(SIGC++_INCLUDE_DIR - NAMES - "sigc++/sigc++.h" - HINTS - ${_SIGC++_INCLUDEDIR} - ${_SIGC++_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - include - "include/sigc++-2.0" -) - -find_path(SIGC++_CONFIG_INCLUDE_DIR - NAMES - sigc++config.h - HINTS - ${_SIGC++_LIBDIR} - ${_SIGC++_INCLUDEDIR} - ${_SIGC++_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - include - lib - "sigc++-2.0/include" - "lib/sigc++-2.0" - "lib/sigc++-2.0/include" -) - -FIND_LIBRARY(SIGC++_LIBRARY - NAMES - sigc-2.0 - HINTS - ${_SIGC++_LIBDIR} - ${_SIGC++_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - "lib" - "local/lib" -) - -SET(SIGC++_LIBRARIES - ${SIGC++_LIBRARY} -) - -SET(SIGC++_INCLUDE_DIRS - ${SIGC++_INCLUDE_DIR} - ${SIGC++_CONFIG_INCLUDE_DIR} -) - -if (NOT SIGC++_VERSION) - if (EXISTS "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h") - file(READ "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h" SIGC++_VERSION_CONTENT) - - string(REGEX MATCH "#define +SIGCXX_MAJOR_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}") - set(SIGC++_VERSION_MAJOR "${CMAKE_MATCH_1}") - - string(REGEX MATCH "#define +SIGCXX_MINOR_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}") - set(SIGC++_VERSION_MINOR "${CMAKE_MATCH_1}") - - string(REGEX MATCH "#define +SIGCXX_MICRO_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}") - set(SIGC++_VERSION_MICRO "${CMAKE_MATCH_1}") - - set(SIGC++_VERSION "${SIGC++_VERSION_MAJOR}.${SIGC++_VERSION_MINOR}.${SIGC++_VERSION_MICRO}") - endif (EXISTS "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h") -endif(NOT SIGC++_VERSION) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SIGC++ - REQUIRED_VARS SIGC++_LIBRARIES SIGC++_INCLUDE_DIRS - VERSION_VAR SIGC++_VERSION - FAIL_MESSAGE "Could NOT find SIGC++, try to set the path to SIGC++ root folder in the system variable SIGC++" -) - -MARK_AS_ADVANCED(SIGC++_CONFIG_INCLUDE_DIR SIGC++_INCLUDE_DIR SIGC++_INCLUDE_DIRS SIGC++_LIBRARY SIGC++_LIBRARIES) diff --git a/ports/cairomm/cmake/cairomm.rc.cmake b/ports/cairomm/cmake/cairomm.rc.cmake deleted file mode 100644 index 4aa7a0a0598b4c..00000000000000 --- a/ports/cairomm/cmake/cairomm.rc.cmake +++ /dev/null @@ -1,71 +0,0 @@ - -#define APSTUDIO_READONLY_SYMBOLS - -#include - -#undef APSTUDIO_READONLY_SYMBOLS - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -VS_VERSION_INFO VERSIONINFO - FILEVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1 - PRODUCTVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "The cairomm development team (see AUTHORS)" - VALUE "FileDescription", "The official C++ wrapper for cairo" - VALUE "FileVersion", "@VERSION@" - VALUE "LegalCopyright", "Distribution is under the LGPL (see COPYING)" - VALUE "OriginalFilename", "cairomm-1.0" - VALUE "ProductName", "cairomm" - VALUE "ProductVersion", "@VERSION@" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (U.S.) resources - -#ifndef APSTUDIO_INVOKED - -#endif // not APSTUDIO_INVOKED diff --git a/ports/cairomm/cmake/cairommconfig.h.cmake b/ports/cairomm/cmake/cairommconfig.h.cmake deleted file mode 100644 index 526a70c4cc312c..00000000000000 --- a/ports/cairomm/cmake/cairommconfig.h.cmake +++ /dev/null @@ -1,13 +0,0 @@ -/* This file is part of cairomm. */ - -/* Defined when the --enable-api-exceptions configure argument was given */ -#cmakedefine CAIROMM_EXCEPTIONS_ENABLED 1 - -/* Major version number of cairomm. */ -#cmakedefine CAIROMM_MAJOR_VERSION @CAIROMM_MAJOR_VERSION@ - -/* Minor version number of cairomm. */ -#cmakedefine CAIROMM_MINOR_VERSION @CAIROMM_MINOR_VERSION@ - -/* Micro version number of cairomm. */ -#cmakedefine CAIROMM_MICRO_VERSION @CAIROMM_MICRO_VERSION@ diff --git a/ports/cairomm/portfile.cmake b/ports/cairomm/portfile.cmake index 8577056498e66d..c20887b0da9064 100644 --- a/ports/cairomm/portfile.cmake +++ b/ports/cairomm/portfile.cmake @@ -1,34 +1,41 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -set(CAIROMM_VERSION 1.15.3) -set(CAIROMM_HASH a2c28786dbd167179561d8f580eeb11d10634a36dfdb1adeefc0279acf83ee906f01f264cb924845fc4ab98da1afac71e1ead742f283c1a32368ca9af28e464a) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cairomm-${CAIROMM_VERSION}) +set(CAIROMM_VERSION 1.16.0) +set(CAIROMM_HASH 51929620feeac45377da5d486ea7a091bbd10ad8376fb16525328947b9e6ee740cdc8e8bd190a247b457cc9fec685a829c81de29b26cabaf95383ef04cce80d3) vcpkg_download_distfile(ARCHIVE - URLS "https://www.cairographics.org/releases/cairomm-${CAIROMM_VERSION}.tar.gz" - FILENAME "cairomm-${CAIROMM_VERSION}.tar.gz" + URLS "https://www.cairographics.org/releases/cairomm-${CAIROMM_VERSION}.tar.xz" + FILENAME "cairomm-${CAIROMM_VERSION}.tar.xz" SHA512 ${CAIROMM_HASH} ) -vcpkg_extract_source_archive(${ARCHIVE}) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}/build) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-build.patch") +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + undef.win32.patch # because WIN32 is used as an ENUM identifier. +) -vcpkg_configure_cmake( +vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + OPTIONS + -Dbuild-examples=false + -Dmsvc14x-parallel-installable=false # Use separate DLL and LIB filenames for Visual Studio 2017 and 2019 ) -vcpkg_install_cmake() +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairomm) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cairomm/COPYING ${CURRENT_PACKAGES_DIR}/share/cairomm/copyright) +if(VCPKG_LIBRARY_LINAKGE STREQUAL "static") + set(_file "${CURRENT_PACKAGES_DIR}/lib/cairomm-1.16/include/cairommconfig.h") + if(EXISTS "${_file}") + vcpkg_replace_string("${_file}" "# define CAIROMM_DLL 1" "# undef CAIROMM_DLL\n# define CAIROMM_STATIC_LIB 1") + endif() + set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/cairomm-1.16/include/cairommconfig.h") + if(EXISTS "${_file}") + vcpkg_replace_string("${_file}" "# define CAIROMM_DLL 1" "# undef CAIROMM_DLL\n# define CAIROMM_STATIC_LIB 1") + endif() +endif() diff --git a/ports/cairomm/undef.win32.patch b/ports/cairomm/undef.win32.patch new file mode 100644 index 00000000000000..e91db0bfe42b06 --- /dev/null +++ b/ports/cairomm/undef.win32.patch @@ -0,0 +1,12 @@ +diff --git a/cairomm/surface.h b/cairomm/surface.h +index c923e6086..8cfaa76a3 100644 +--- a/cairomm/surface.h ++++ b/cairomm/surface.h +@@ -49,6 +49,7 @@ + #include + #endif // CAIRO_HAS_GLITZ_SURFACE + ++#undef WIN32 + + namespace Cairo + { diff --git a/ports/cairomm/vcpkg.json b/ports/cairomm/vcpkg.json new file mode 100644 index 00000000000000..d760825a0ea7b7 --- /dev/null +++ b/ports/cairomm/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "cairomm", + "version": "1.16.0", + "description": "A C++ wrapper for the cairo graphics library", + "homepage": "https://www.cairographics.org", + "dependencies": [ + "cairo", + "libsigcpp" + ] +} diff --git a/ports/camport3/portfile.cmake b/ports/camport3/portfile.cmake new file mode 100644 index 00000000000000..a46d4ded934d6c --- /dev/null +++ b/ports/camport3/portfile.cmake @@ -0,0 +1,83 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(ON_LIBRARY_LINKAGE "static") + vcpkg_fail_port_install(ON_TARGET "uwp") + vcpkg_fail_port_install(ON_ARCH "arm" "arm64" "wasm32") +elseif(VCPKG_TARGET_IS_LINUX) + vcpkg_fail_port_install(ON_ARCH "wasm32") +else() + vcpkg_fail_port_install(ALWAYS) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO percipioxyz/camport3 + REF v1.5.3 + SHA512 efa41e75b4ed7147f94270765138aa226a92ec51c99157776e916ec178ad2a9fe55aa6e6e746be46e2f2178852f4c4f9323b515f5a1b151ac70c21f8f923d901 + HEAD_REF master +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY + ${SOURCE_PATH}/include/TYApi.h + ${SOURCE_PATH}/include/TYCoordinateMapper.h + ${SOURCE_PATH}/include/TYImageProc.h + ${SOURCE_PATH}/include/TyIsp.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if(VCPKG_TARGET_IS_WINDOWS) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) + file(COPY + ${SOURCE_PATH}/lib/win/hostapp/${VCPKG_TARGET_ARCHITECTURE}/tycam.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + file(COPY + ${SOURCE_PATH}/lib/win/hostapp/${VCPKG_TARGET_ARCHITECTURE}/tycam.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY + ${SOURCE_PATH}/lib/win/hostapp/${VCPKG_TARGET_ARCHITECTURE}/tycam.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(COPY + ${SOURCE_PATH}/lib/win/hostapp/${VCPKG_TARGET_ARCHITECTURE}/tycam.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + endif() + +elseif(VCPKG_TARGET_IS_LINUX) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set (CAMPORT3_ARCH "Aarch64") + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set (CAMPORT3_ARCH "armv7hf") + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set (CAMPORT3_ARCH "i686") + else() + set (CAMPORT3_ARCH ${VCPKG_TARGET_ARCHITECTURE}) + endif() + + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) + file(COPY + ${SOURCE_PATH}/lib/linux/lib_${CAMPORT3_ARCH}/libtycam.so + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY + ${SOURCE_PATH}/lib/linux/lib_${CAMPORT3_ARCH}/libtycam.so + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + endif() + +endif() + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/ports/camport3/vcpkg.json b/ports/camport3/vcpkg.json new file mode 100644 index 00000000000000..0bf92791f34cf6 --- /dev/null +++ b/ports/camport3/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "camport3", + "version-string": "1.5.3", + "port-version": 1, + "description": "percipio.xyz cameras SDK", + "homepage": "https://github.com/percipioxyz/camport3", + "supports": "((windows & !uwp & !arm & !arm64 & !static) | linux) & !wasm32" +} diff --git a/ports/capnproto/0001-fix-capnpc-extension-handling-on-Windows.patch b/ports/capnproto/0001-fix-capnpc-extension-handling-on-Windows.patch deleted file mode 100644 index d0544c625bbd03..00000000000000 --- a/ports/capnproto/0001-fix-capnpc-extension-handling-on-Windows.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6e142f270524d78689a119737660050561cf853e Mon Sep 17 00:00:00 2001 -From: Thomas Arcila -Date: Sat, 9 Mar 2019 19:00:24 -0500 -Subject: [PATCH] fix capnpc extension handling on Windows - ---- - c++/src/capnp/CMakeLists.txt | 2 +- - c++/src/capnp/compiler/capnp.c++ | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/c++/src/capnp/CMakeLists.txt b/c++/src/capnp/CMakeLists.txt -index 11cbf5af..20b99ed3 100644 ---- a/c++/src/capnp/CMakeLists.txt -+++ b/c++/src/capnp/CMakeLists.txt -@@ -182,7 +182,7 @@ if(NOT CAPNP_LITE) - install(TARGETS capnp_tool capnpc_cpp capnpc_capnp ${INSTALL_TARGETS_DEFAULT_ARGS}) - - # Symlink capnpc -> capnp -- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink capnp \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/capnpc\")") -+ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink capnp${CMAKE_EXECUTABLE_SUFFIX} \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/capnpc${CMAKE_EXECUTABLE_SUFFIX}\")") - endif() # NOT CAPNP_LITE - - # Tests ======================================================================== -diff --git a/c++/src/capnp/compiler/capnp.c++ b/c++/src/capnp/compiler/capnp.c++ -index 8e8c459b..d252fb12 100644 ---- a/c++/src/capnp/compiler/capnp.c++ -+++ b/c++/src/capnp/compiler/capnp.c++ -@@ -78,7 +78,7 @@ public: - : context(context), disk(kj::newDiskFilesystem()), loader(*this) {} - - kj::MainFunc getMain() { -- if (context.getProgramName().endsWith("capnpc")) { -+ if (context.getProgramName().endsWith("capnpc") || context.getProgramName().endsWith("capnpc.exe")) { - kj::MainBuilder builder(context, VERSION_STRING, - "Compiles Cap'n Proto schema files and generates corresponding source code in one or " - "more languages."); --- -2.19.1 - diff --git a/ports/capnproto/CONTROL b/ports/capnproto/CONTROL deleted file mode 100644 index 02cc080f17e634..00000000000000 --- a/ports/capnproto/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: capnproto -Version: 0.7.0-3 -Description: Data interchange format and capability-based RPC system -Homepage: https://capnproto.org/ -Build-Depends: zlib diff --git a/ports/capnproto/portfile.cmake b/ports/capnproto/portfile.cmake index 4e149a03565164..2a3aecc137de6f 100644 --- a/ports/capnproto/portfile.cmake +++ b/ports/capnproto/portfile.cmake @@ -1,18 +1,16 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP build is not supported.") +vcpkg_fail_port_install(ON_TARGET UWP) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(ON_ARCH arm arm64) endif() -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO capnproto/capnproto - REF v0.7.0 - SHA512 a3ea278ded6a866759c0517d16b99bd38ffea1c163ce63a3604b752d8bdaafbc38a600de94afe12db35e7f7f06e29cc94c911dc2e0ecec6fe1185452df2a2bd3 + REF 57a4ca5af5a7f55b768a9d9d6655250bffb1257f # v0.8.0 + SHA512 6550356a40a13d41fbeef3887027de1134c4bc37e4d79435e67da1f65665f3856f7cd663be392135cf4a08fffcfd4e171614026c20bfc5727adfd624b2d33e35 HEAD_REF master - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-capnpc-extension-handling-on-Windows.patch" ) vcpkg_configure_cmake( @@ -24,9 +22,7 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CapnProto) -file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools") -file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/capnproto") -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/capnproto) +vcpkg_copy_tools(TOOL_NAMES capnp capnpc-c++ capnpc-capnp AUTO_CLEAN) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) @@ -34,8 +30,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/capnproto) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/capnproto/LICENSE ${CURRENT_PACKAGES_DIR}/share/capnproto/copyright) - -# Disabled for now, see #5630 and #5635 -# vcpkg_test_cmake(PACKAGE_NAME CapnProto) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/capnproto/vcpkg.json b/ports/capnproto/vcpkg.json new file mode 100644 index 00000000000000..49b619ee57f1d3 --- /dev/null +++ b/ports/capnproto/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "capnproto", + "version-string": "0.8.0", + "port-version": 2, + "description": "Data interchange format and capability-based RPC system", + "homepage": "https://capnproto.org/", + "supports": "!uwp & !((arm | arm64) & windows)", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/capstone/CONTROL b/ports/capstone/CONTROL deleted file mode 100644 index d7d422d2578d11..00000000000000 --- a/ports/capstone/CONTROL +++ /dev/null @@ -1,49 +0,0 @@ -Source: capstone -Version: 4.0.1-120373dc -Homepage: https://github.com/aquynh/capstone -Description: Multi-architecture disassembly framework - -Feature: arm -Description: Capstone disassembly support for ARM - -Feature: arm64 -Description: Capstone disassembly support for ARM64 - -Feature: evm -Description: Capstone disassembly support for EVM - -Feature: m680x -Description: Capstone disassembly support for M680X - -Feature: m68k -Description: Capstone disassembly support for M68k - -Feature: mips -Description: Capstone disassembly support for MIPS - -Feature: ppc -Description: Capstone disassembly support for PowerPC - -Feature: sparc -Description: Capstone disassembly support for SPARC - -Feature: sysz -Description: Capstone disassembly support for SysZ - -Feature: tms320c64x -Description: Capstone disassembly support for TMS320C64X - -Feature: x86 -Description: Capstone disassembly support for x86 - -Feature: x86_reduce -Description: Capstone disassembly support for x86 without support for less used instructions - -Feature: xcore -Description: Capstone disassembly support for XCore - -Feature: diet -Description: Build Capstone in diet mode (reduced features for smaller size) - -Feature: osxkernel -Description: Support for emedding Capstone into OSX Kernel extensions diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index bd435110992939..bd28511cfec6ca 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -1,44 +1,32 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REF 120373dc9789875ccbc968397219a86598a4351e + REF 4.0.2 REPO "aquynh/capstone" - SHA512 90961176ab68110b0fea08f11a5ed6997dcd92ceeec568978003bfd01e2170479256f137e4f91be5e22a9bdebbe1f436c2849bde1d4e0bbd0b781f8562b58059 + SHA512 7f93534517307b737422a8825b66b2a1f3e1cca2049465d60ab12595940154aaf843ba40ed348fce58de58b990c19a0caef289060eb72898cb008a88c470970e HEAD_REF v4 ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CS_BUILD_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CS_BUILD_SHARED) - -function(check_feature name var) - set(${var} OFF PARENT_SCOPE) - if (${name} IN_LIST FEATURES) - set(${var} ON PARENT_SCOPE) - endif () -endfunction () - - -check_feature("arm" WITH_ARM_SUPPORT) -check_feature("arm64" WITH_ARM64_SUPPORT) -check_feature("evm" WITH_EVM_SUPPORT) -check_feature("m680x" WITH_M680X_SUPPORT) -check_feature("m68k" WITH_M68K_SUPPORT) -check_feature("mips" WITH_MIPS_SUPPORT) -check_feature("osxkernel" WITH_OSXKERNEL_SUPPORT) -check_feature("ppc" WITH_PPC_SUPPORT) -check_feature("sparc" WITH_SPARC_SUPPORT) -check_feature("sysz" WITH_SYSZ_SUPPORT) -check_feature("tms320c64x" WITH_C64X_SUPPORT) -check_feature("x86" WITH_X86_SUPPORT) -check_feature("x86_reduce" WITH_X86_REDUCE) -check_feature("xcore" WITH_XCORE_SUPPORT) - -check_feature("diet" CS_BUILD_DIET) - -if (WITH_X86_REDUCE AND NOT WITH_X86_SUPPORT) - set(WITH_X86_SUPPORT ON) -endif () +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "arm" CAPSTONE_ARM_SUPPORT + "arm64" CAPSTONE_ARM64_SUPPORT + "evm" CAPSTONE_EVM_SUPPORT + "m680x" CAPSTONE_M680X_SUPPORT + "m68k" CAPSTONE_M68K_SUPPORT + "mips" CAPSTONE_MIPS_SUPPORT + "osxkernel" CAPSTONE_OSXKERNEL_SUPPORT + "ppc" CAPSTONE_PPC_SUPPORT + "sparc" CAPSTONE_SPARC_SUPPORT + "sysz" CAPSTONE_SYSZ_SUPPORT + "tms320c64x" CAPSTONE_TMS320C64X_SUPPORT + "x86" CAPSTONE_X86_SUPPORT + "x86-reduce" CAPSTONE_X86_REDUCE + "xcore" CAPSTONE_XCORE_SUPPORT + "diet" CAPSTONE_BUILD_DIET +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -46,27 +34,11 @@ vcpkg_configure_cmake( OPTIONS -DCAPSTONE_BUILD_STATIC=${CS_BUILD_STATIC} -DCAPSTONE_BUILD_SHARED=${CS_BUILD_SHARED} - -DCAPSTONE_BUILD_DIET=${CS_BUILD_DIET} -DCAPSTONE_BUILD_TESTS=OFF -DCAPSTONE_BUILD_CSTOOL=OFF -DCAPSTONE_BUILD_STATIC_RUNTIME=OFF - - -DCAPSTONE_ARM_SUPPORT=${WITH_ARM_SUPPORT} - -DCAPSTONE_ARM64_SUPPORT=${WITH_ARM64_SUPPORT} - -DCAPSTONE_EVM_SUPPORT=${WITH_EVM_SUPPORT} - -DCAPSTONE_M680X_SUPPORT=${WITH_M680X_SUPPORT} - -DCAPSTONE_M68K_SUPPORT=${WITH_M68K_SUPPORT} - -DCAPSTONE_MIPS_SUPPORT=${WITH_MIPS_SUPPORT} - -DCAPSTONE_OSXKERNEL_SUPPORT=${WITH_OSXKERNEL_SUPPORT} - -DCAPSTONE_PPC_SUPPORT=${WITH_PPC_SUPPORT} - -DCAPSTONE_SPARC_SUPPORT=${WITH_SPARC_SUPPORT} - -DCAPSTONE_SYSZ_SUPPORT=${WITH_SYSZ_SUPPORT} - -DCAPSTONE_TMS320C64X_SUPPORT=${WITH_C64X_SUPPORT} - -DCAPSTONE_X86_SUPPORT=${WITH_X86_SUPPORT} - -DCAPSTONE_XCORE_SUPPORT=${WITH_XCORE_SUPPORT} - - -DCAPSTONE_X86_REDUCE=${WITH_X86_REDUCE} -DCAPSTONE_X86_ONLY=OFF + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -81,7 +53,4 @@ 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.TXT - DESTINATION ${CURRENT_PACKAGES_DIR}/share/capstone - RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/capstone/vcpkg.json b/ports/capstone/vcpkg.json new file mode 100644 index 00000000000000..770f479438cb16 --- /dev/null +++ b/ports/capstone/vcpkg.json @@ -0,0 +1,62 @@ +{ + "name": "capstone", + "version": "4.0.2", + "port-version": 2, + "description": "Multi-architecture disassembly framework", + "homepage": "https://github.com/aquynh/capstone", + "features": { + "arm": { + "description": "Capstone disassembly support for ARM" + }, + "arm64": { + "description": "Capstone disassembly support for ARM64" + }, + "diet": { + "description": "Build Capstone in diet mode (reduced features for smaller size)" + }, + "evm": { + "description": "Capstone disassembly support for EVM" + }, + "m680x": { + "description": "Capstone disassembly support for M680X" + }, + "m68k": { + "description": "Capstone disassembly support for M68k" + }, + "mips": { + "description": "Capstone disassembly support for MIPS" + }, + "osxkernel": { + "description": "Support for emedding Capstone into OSX Kernel extensions" + }, + "ppc": { + "description": "Capstone disassembly support for PowerPC" + }, + "sparc": { + "description": "Capstone disassembly support for SPARC" + }, + "sysz": { + "description": "Capstone disassembly support for SysZ" + }, + "tms320c64x": { + "description": "Capstone disassembly support for TMS320C64X" + }, + "x86": { + "description": "Capstone disassembly support for x86" + }, + "x86-reduce": { + "description": "Capstone disassembly support for x86 without support for less used instructions", + "dependencies": [ + { + "name": "capstone", + "features": [ + "x86" + ] + } + ] + }, + "xcore": { + "description": "Capstone disassembly support for XCore" + } + } +} diff --git a/ports/cartographer/CONTROL b/ports/cartographer/CONTROL deleted file mode 100644 index bf2916b69dea70..00000000000000 --- a/ports/cartographer/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: cartographer -Version: 1.0.0-1 -Build-Depends: ceres[suitesparse], gflags, glog, lua, cairo, boost-iostreams, gtest, protobuf -Homepage: https://github.com/googlecartographer/cartographer -Description: Google 2D & 3D SLAM package diff --git a/ports/cartographer/disable-C2338-cartographer.patch b/ports/cartographer/disable-C2338-cartographer.patch deleted file mode 100644 index 17452622d719ae..00000000000000 --- a/ports/cartographer/disable-C2338-cartographer.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 95bb132..fbd624d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -237,7 +237,7 @@ if(${BUILD_PROMETHEUS}) - target_compile_definitions(${PROJECT_NAME} PUBLIC USE_PROMETHEUS=1) - endif() - --set(TARGET_COMPILE_FLAGS "${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}") -+set(TARGET_COMPILE_FLAGS "-D_DISABLE_EXTENDED_ALIGNED_STORAGE ${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}") - set_target_properties(${PROJECT_NAME} PROPERTIES - COMPILE_FLAGS ${TARGET_COMPILE_FLAGS}) - diff --git a/ports/cartographer/fix-cmake-location.patch b/ports/cartographer/fix-cmake-location.patch new file mode 100644 index 00000000000000..b0eb12397fccd3 --- /dev/null +++ b/ports/cartographer/fix-cmake-location.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2e3a686be..f2a0c5d8e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -300,7 +300,7 @@ foreach(HDR ${INSTALL_GENERATED_HDRS}) + ) + endforeach() + +-set(CARTOGRAPHER_CMAKE_DIR share/cartographer/cmake) ++set(CARTOGRAPHER_CMAKE_DIR share/cartographer) + include(CMakePackageConfigHelpers) + configure_package_config_file( + cartographer-config.cmake.in +@@ -311,7 +311,7 @@ configure_package_config_file( + + install( + EXPORT CartographerExport +- DESTINATION share/cartographer/cmake/ ++ DESTINATION share/cartographer/ + FILE CartographerTargets.cmake + ) + diff --git a/ports/cartographer/fix-find-packages.patch b/ports/cartographer/fix-find-packages.patch index 3ab53bff96de6b..59e433c5fff55b 100644 --- a/ports/cartographer/fix-find-packages.patch +++ b/ports/cartographer/fix-find-packages.patch @@ -28,9 +28,9 @@ index 2e3a686..f36f15a 100644 -PKG_SEARCH_MODULE(CAIRO REQUIRED cairo>=1.12.16) +#include(FindPkgConfig) +#PKG_SEARCH_MODULE(CAIRO REQUIRED cairo>=1.12.16) -+if(CMAKE_BUILD_TYPE STREQUAL Debug) -+ set(CAIRO_LIB_SUFFIX d) -+endif() ++#if(CMAKE_BUILD_TYPE STREQUAL Debug) ++# set(CAIRO_LIB_SUFFIX d) ++#endif() +find_library(CAIRO_LIBRARY cairo${CAIRO_LIB_SUFFIX}) # Only build the documentation if we can find Sphinx. @@ -88,7 +88,7 @@ index 2e3a686..f36f15a 100644 -target_link_libraries(${PROJECT_NAME} PUBLIC gflags) +#target_link_libraries(${PROJECT_NAME} PUBLIC glog) +#target_link_libraries(${PROJECT_NAME} PUBLIC gflags) -+target_link_libraries(${PROJECT_NAME} PUBLIC ${CAIRO_LIBRARY}) ++#target_link_libraries(${PROJECT_NAME} PUBLIC ${CAIRO_LIBRARY}) target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC "${CAIRO_INCLUDE_DIRS}") diff --git a/ports/cartographer/portfile.cmake b/ports/cartographer/portfile.cmake index f8b1ddcd88166a..13e4a764195942 100644 --- a/ports/cartographer/portfile.cmake +++ b/ports/cartographer/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -10,8 +8,8 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-find-packages.patch - disable-C2338-cartographer.patch fix-build-error.patch + fix-cmake-location.patch ) vcpkg_configure_cmake( diff --git a/ports/cartographer/vcpkg.json b/ports/cartographer/vcpkg.json new file mode 100644 index 00000000000000..78acff4dd15afb --- /dev/null +++ b/ports/cartographer/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "cartographer", + "version": "1.0.0", + "port-version": 4, + "description": "Google 2D & 3D SLAM package", + "homepage": "https://github.com/googlecartographer/cartographer", + "dependencies": [ + "boost-iostreams", + "cairo", + { + "name": "ceres", + "features": [ + "suitesparse" + ] + }, + "gflags", + "glog", + "gtest", + "lua", + "protobuf" + ] +} diff --git a/ports/casclib/CONTROL b/ports/casclib/CONTROL deleted file mode 100644 index 4622f5200c6a7e..00000000000000 --- a/ports/casclib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: casclib -Version: 1.50-1 -Build-Depends: zlib -Description: An open-source implementation of library for reading CASC storage from Blizzard games since 2014 diff --git a/ports/casclib/ctype_for_mac.patch b/ports/casclib/ctype_for_mac.patch index 30f790c1f9b603..dc1a67dff70734 100644 --- a/ports/casclib/ctype_for_mac.patch +++ b/ports/casclib/ctype_for_mac.patch @@ -1,16 +1,11 @@ diff --git a/src/CascPort.h b/src/CascPort.h -index 87a2f2f..da74aef 100644 +index 3bd08d4..201f7dd 100644 --- a/src/CascPort.h +++ b/src/CascPort.h -@@ -79,14 +79,19 @@ - #include - #include - #include -- #include - #include -- #include +@@ -85,10 +85,17 @@ + #include #include -- #include + #include + #include #include + #include @@ -18,7 +13,7 @@ index 87a2f2f..da74aef 100644 + #include + #include #include -+ #include + #include + #include #include + #include diff --git a/ports/casclib/portfile.cmake b/ports/casclib/portfile.cmake index 9604ac618e70a7..a93b6f8573c5e6 100644 --- a/ports/casclib/portfile.cmake +++ b/ports/casclib/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ladislav-zezula/CascLib - REF 1.50 - SHA512 7e95e314f09e504566e6fa2b1742f986d17526fb0283af8ffb77681338c9a852d369cbd863512a20ddd3a277d10a9bf701d745f500a717826dd08e201eb6d80e + REF 1.50b + SHA512 f32cc592f454db4815c0dfd18a9c0076d85b1582e6974d241d1d4094269c42a978fa42186504988ced2c8f4a0b598f41e3ec8a95ddc3c0551af997e37708b1f5 HEAD_REF master PATCHES ctype_for_mac.patch diff --git a/ports/casclib/vcpkg.json b/ports/casclib/vcpkg.json new file mode 100644 index 00000000000000..a97d0344496a2f --- /dev/null +++ b/ports/casclib/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "casclib", + "version-string": "1.50b", + "port-version": 2, + "description": "An open-source implementation of library for reading CASC storage from Blizzard games since 2014", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/catch-classic/CONTROL b/ports/catch-classic/CONTROL deleted file mode 100644 index bce6fc1060982c..00000000000000 --- a/ports/catch-classic/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: catch-classic -Version: 1.12.2 -Homepage: https://github.com/catchorg/Catch2 -Description: A modern, header-only test framework for unit tests - This is specifically the legacy 1.x branch provided for compatibility - with older compilers. diff --git a/ports/catch-classic/portfile.cmake b/ports/catch-classic/portfile.cmake index 47f8ef16bdb6e9..097ba07daee0c0 100644 --- a/ports/catch-classic/portfile.cmake +++ b/ports/catch-classic/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(CATCH_VERSION v1.12.2) vcpkg_download_distfile(HEADER diff --git a/ports/catch-classic/vcpkg.json b/ports/catch-classic/vcpkg.json new file mode 100644 index 00000000000000..bfe9b7ef4aee9d --- /dev/null +++ b/ports/catch-classic/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "catch-classic", + "version-string": "1.12.2", + "port-version": 1, + "description": [ + "A modern, header-only test framework for unit tests", + "This is specifically the legacy 1.x branch provided for compatibility", + "with older compilers." + ], + "homepage": "https://github.com/catchorg/Catch2" +} diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL deleted file mode 100644 index f486f31b0f2a3d..00000000000000 --- a/ports/catch/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: catch -Version: alias -Build-Depends: catch2 -Description: Deprecated alias for Catch2 unit testing framework diff --git a/ports/catch/vcpkg.json b/ports/catch/vcpkg.json new file mode 100644 index 00000000000000..fccc6890420877 --- /dev/null +++ b/ports/catch/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "catch", + "version-string": "alias", + "port-version": 1, + "description": "Deprecated alias for Catch2 unit testing framework", + "dependencies": [ + "catch2" + ] +} diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL deleted file mode 100644 index 810b18dd1a00c2..00000000000000 --- a/ports/catch2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: catch2 -Version: 2.9.2 -Description: A modern, header-only test framework for unit testing. -Homepage: https://github.com/catchorg/Catch2 diff --git a/ports/catch2/fix-install-path.patch b/ports/catch2/fix-install-path.patch new file mode 100644 index 00000000000000..c60e74b93d9937 --- /dev/null +++ b/ports/catch2/fix-install-path.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0370ea3..7cef01a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -146,7 +146,7 @@ if (NOT_SUBPROJECT) + EXPORT + Catch2Targets + DESTINATION +- ${CMAKE_INSTALL_LIBDIR} ++ ${CMAKE_INSTALL_LIBDIR}/manual-link + ) + + +@@ -226,7 +226,7 @@ if (NOT_SUBPROJECT) + + ## Provide some pkg-config integration + set(PKGCONFIG_INSTALL_DIR +- "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig" ++ "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + CACHE PATH "Path where catch2.pc is installed" + ) + configure_file( diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index b19ebeab4977ce..140e1cba1f2fc2 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -1,30 +1,41 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO catchorg/Catch2 - REF v2.9.2 - SHA512 06430322dbeb637902f3bdc1c4df04e2525bc3ad9aea47aaf284b311401f26f489092971a2822d5a54041ef1d01d1b1bda3eedea2ba5041ae89903d8e56db121 + REF v2.13.7 + SHA512 1c3cbdecc6a3b59360a97789c4784d79d027e1b63bdc42b0e152c3272f7bad647fcd1490aa5caf67f968a6311dc9624b5a70d5eb3fbc1d5179d520e09b76c9ed HEAD_REF master + PATCHES fix-install-path.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DBUILD_TESTING=OFF -DCATCH_BUILD_EXAMPLES=OFF + -DCATCH_BUILD_STATIC_LIBRARY=${BUILD_STATIC} ) -vcpkg_install_cmake() +vcpkg_cmake_install() +if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME "${CURRENT_PACKAGES_DIR}/share/Catch2" "${CURRENT_PACKAGES_DIR}/share/catch2_") + file(RENAME "${CURRENT_PACKAGES_DIR}/share/catch2_" "${CURRENT_PACKAGES_DIR}/share/catch2") +endif() +if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/Catch2" "${CURRENT_PACKAGES_DIR}/debug/share/catch2_") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/catch2_" "${CURRENT_PACKAGES_DIR}/debug/share/catch2") +endif() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Catch2) +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/Catch2") +vcpkg_fixup_pkgconfig() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/catch2/catch.hpp) +if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/include/catch2/catch.hpp") message(FATAL_ERROR "Main includes have moved. Please update the forwarder.") endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include ") -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright) +file(WRITE "${CURRENT_PACKAGES_DIR}/include/catch.hpp" "#include ") +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/catch2/vcpkg.json b/ports/catch2/vcpkg.json new file mode 100644 index 00000000000000..83dd9ff3df7a61 --- /dev/null +++ b/ports/catch2/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "catch2", + "version-semver": "2.13.7", + "port-version": 1, + "description": "A modern, header-only test framework for unit testing.", + "homepage": "https://github.com/catchorg/Catch2", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/cccapstone/CONTROL b/ports/cccapstone/CONTROL deleted file mode 100644 index 8681f2328267ea..00000000000000 --- a/ports/cccapstone/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: cccapstone -Version: 9b4128ee1153e78288a1b5433e2c06a0d47a4c4e-1 -Homepage: https://github.com/zer0mem/cccapstone -Description: c++ bindings for capstone disasembly framework -Build-Depends: capstone diff --git a/ports/cccapstone/portfile.cmake b/ports/cccapstone/portfile.cmake index d653783c30f1eb..f68609498b8a02 100644 --- a/ports/cccapstone/portfile.cmake +++ b/ports/cccapstone/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REF 9b4128ee1153e78288a1b5433e2c06a0d47a4c4e diff --git a/ports/cccapstone/vcpkg.json b/ports/cccapstone/vcpkg.json new file mode 100644 index 00000000000000..239fdc3d1630ae --- /dev/null +++ b/ports/cccapstone/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "cccapstone", + "version-string": "9b4128ee1153e78288a1b5433e2c06a0d47a4c4e", + "port-version": 2, + "description": "c++ bindings for capstone disasembly framework", + "homepage": "https://github.com/zer0mem/cccapstone", + "dependencies": [ + "capstone" + ] +} diff --git a/ports/ccd/0001_fix_symbols_export.patch b/ports/ccd/0001_fix_symbols_export.patch deleted file mode 100644 index f9c47d79b1c687..00000000000000 --- a/ports/ccd/0001_fix_symbols_export.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 05b5718a364ac525c8766387bd74faf852f98589 Mon Sep 17 00:00:00 2001 -From: Mikhail Paulyshka -Date: Sun, 27 Aug 2017 03:39:53 +0300 -Subject: [PATCH] win32: export additional symbols, fixes FCL build on MSVC - ---- - src/ccd/vec3.h | 2 +- - src/support.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/ccd/vec3.h b/src/ccd/vec3.h -index b0c1b33..014531c 100644 ---- a/src/ccd/vec3.h -+++ b/src/ccd/vec3.h -@@ -93,7 +93,7 @@ typedef struct _ccd_vec3_t ccd_vec3_t; - /** - * Holds origin (0,0,0) - this variable is meant to be read-only! - */ --extern ccd_vec3_t *ccd_vec3_origin; -+extern _ccd_export ccd_vec3_t *ccd_vec3_origin; - - /** - * Array of points uniformly distributed on unit sphere. -diff --git a/src/support.h b/src/support.h -index 3372f5e..2e75df7 100644 ---- a/src/support.h -+++ b/src/support.h -@@ -37,7 +37,7 @@ _ccd_inline void ccdSupportCopy(ccd_support_t *, const ccd_support_t *s); - * Computes support point of obj1 and obj2 in direction dir. - * Support point is returned via supp. - */ --void __ccdSupport(const void *obj1, const void *obj2, -+_ccd_export void __ccdSupport(const void *obj1, const void *obj2, - const ccd_vec3_t *dir, const ccd_t *ccd, - ccd_support_t *supp); - --- -2.12.2.windows.2 - diff --git a/ports/ccd/CONTROL b/ports/ccd/CONTROL deleted file mode 100644 index 7820a1455c6c70..00000000000000 --- a/ports/ccd/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ccd -Version: 2.1-1 -Homepage: https://github.com/danfis/libccd -Description: Library for collision detection between two convex shapes diff --git a/ports/ccd/fix-static.patch b/ports/ccd/fix-static.patch new file mode 100644 index 00000000000000..cfb4d388cfd4b6 --- /dev/null +++ b/ports/ccd/fix-static.patch @@ -0,0 +1,13 @@ +diff --git a/src/ccd/ccd_export.h b/src/ccd/ccd_export.h +index e898d41..c6aa5fb 100644 +--- a/src/ccd/ccd_export.h ++++ b/src/ccd/ccd_export.h +@@ -1,7 +1,7 @@ + #ifndef CCD_EXPORT_H + #define CCD_EXPORT_H + +-#ifdef CCD_STATIC_DEFINE ++#if 1 + # define CCD_EXPORT + #else + # ifdef _MSC_VER diff --git a/ports/ccd/portfile.cmake b/ports/ccd/portfile.cmake index 45674918eccd1c..a465560caca020 100644 --- a/ports/ccd/portfile.cmake +++ b/ports/ccd/portfile.cmake @@ -1,4 +1,6 @@ -include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(STATIC_PATCH fix-static.patch) +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -6,16 +8,17 @@ vcpkg_from_github( REF v2.1 SHA512 ff037d9c4df50f09600cf9b3514b259b2850ff43f74817853f5665d22812891168f70bd3cc3969b2c9e3c706f6254991a65421476349607fbd04d894b217456d HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} + # Backport https://github.com/danfis/libccd/pull/70 to support Emscripten PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_fix_symbols_export.patch) + "support-emscripten.patch" + ${STATIC_PATCH} +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF ) vcpkg_install_cmake() @@ -23,8 +26,8 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/ccd) -file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccd RENAME copyright) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) + +file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ccd/support-emscripten.patch b/ports/ccd/support-emscripten.patch new file mode 100644 index 00000000000000..2fe689a7988316 --- /dev/null +++ b/ports/ccd/support-emscripten.patch @@ -0,0 +1,25 @@ +From c3616f28d33019047e8e71df8abeb0493159539e Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Sun, 17 May 2020 11:42:24 +0200 +Subject: [PATCH] Fix configuration with Emscripten + +In Emscripten there is no separate libm library, so there is no need to explicitly link it, +and in particular the find_library call would fail as there is not libm to find. +See https://stackoverflow.com/questions/24663915/how-can-i-link-libm-to-my-emscripten-port +--- + src/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 1407080..357ed76 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -48,7 +48,7 @@ target_include_directories(ccd PUBLIC + $ + $) + +-if(NOT WIN32) ++if(NOT WIN32 AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")) + find_library(LIBM_LIBRARY NAMES m) + if(NOT LIBM_LIBRARY) + message(FATAL_ERROR "Could NOT find required library LibM") diff --git a/ports/ccd/vcpkg.json b/ports/ccd/vcpkg.json new file mode 100644 index 00000000000000..43110c69d5ed9a --- /dev/null +++ b/ports/ccd/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ccd", + "version-string": "2.1-4", + "port-version": 2, + "description": "Library for collision detection between two convex shapes", + "homepage": "https://github.com/danfis/libccd" +} diff --git a/ports/ccfits/CONTROL b/ports/ccfits/CONTROL deleted file mode 100644 index f6eb51488b1241..00000000000000 --- a/ports/ccfits/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: ccfits -Version: 2.5-3 -Homepage: https://heasarc.gsfc.nasa.gov/fitsio/ccfits -Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++. -Build-Depends: cfitsio diff --git a/ports/ccfits/fix-dependency.patch b/ports/ccfits/fix-dependency.patch new file mode 100644 index 00000000000000..15cffeb4e692ae --- /dev/null +++ b/ports/ccfits/fix-dependency.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d72ae85..405d96b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,8 +22,8 @@ ENDIF() + + #add_subdirectory (src) + +-find_package(CFITSIO REQUIRED) +-INCLUDE_DIRECTORIES(${CFITSIO_INCLUDE_DIR}) ++find_package(unofficial-cfitsio CONFIG REQUIRED) ++set(CFITSIO_LIBRARY cfitsio) + + SET (LIB_TYPE STATIC) + IF (BUILD_SHARED_LIBS) diff --git a/ports/ccfits/portfile.cmake b/ports/ccfits/portfile.cmake index c3d2fef1e9c81f..e1876040130819 100644 --- a/ports/ccfits/portfile.cmake +++ b/ports/ccfits/portfile.cmake @@ -1,18 +1,15 @@ -include(vcpkg_common_functions) -#removes current source to prevent static builds from using patched source code -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits) - vcpkg_download_distfile(ARCHIVE URLS "https://heasarc.gsfc.nasa.gov/fitsio/ccfits/CCfits-2.5.tar.gz" FILENAME "CCfits-2.5.tar.gz" SHA512 63ab4d153063960510cf60651d5c832824cf85f937f84adc5390c7c2fb46eb8e9f5d8cda2554d79d24c7a4f1b6cf0b7a6e20958fb69920b65d7c362c0a5f26b5 ) + vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} OUT_SOURCE_PATH SOURCE_PATH - PATCHES dll_exports.patch + PATCHES + dll_exports.patch + fix-dependency.patch ) vcpkg_configure_cmake( @@ -42,5 +39,9 @@ foreach(HEADER IN LISTS HEADERS) file(WRITE "${HEADER}" "${_contents}") endforeach() +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/CCfits/CCfits.h + "#include \"longnam.h\"" "#include \"cfitsio/longnam.h\"" +) + # Handle copyright -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccfits RENAME copyright) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ccfits/vcpkg.json b/ports/ccfits/vcpkg.json new file mode 100644 index 00000000000000..d8280a15816d2b --- /dev/null +++ b/ports/ccfits/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "ccfits", + "version": "2.5", + "port-version": 7, + "description": "CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++.", + "homepage": "https://heasarc.gsfc.nasa.gov/fitsio/ccfits", + "dependencies": [ + "cfitsio" + ] +} diff --git a/ports/cctag/portfile.cmake b/ports/cctag/portfile.cmake new file mode 100644 index 00000000000000..36cf48c04c4950 --- /dev/null +++ b/ports/cctag/portfile.cmake @@ -0,0 +1,49 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alicevision/cctag + REF v1.0.0 + SHA512 49028356215dd703727b2eedd6aa72d81af84e5ca36f8dc7e9caf85a85c7f500b3eeaaa7369314a40049a72593d70049b709b453c30ff352d98ab0dea3afef76 + HEAD_REF develop +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + cuda CCTAG_WITH_CUDA + apps CCTAG_BUILD_APPS +) + +if("cuda" IN_LIST FEATURES) + include(${CURRENT_INSTALLED_DIR}/share/vcpkg_find_cuda/vcpkg_find_cuda.cmake) + vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT) + + message(STATUS "CUDA_TOOLKIT_ROOT ${CUDA_TOOLKIT_ROOT}") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DCCTAG_BUILD_TESTS:BOOL=OFF ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CCTag) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# remove test files +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/cctag/geometry/test" "${CURRENT_PACKAGES_DIR}/include/cctag/test") +# remove cuda headers +if(NOT "cuda" IN_LIST FEATURES) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/cctag/cuda") +endif() + + # move the bin directory to tools +if ("apps" IN_LIST FEATURES) + set(CCTAG_TOOLS detection regression simulation) + vcpkg_copy_tools(TOOL_NAMES ${CCTAG_TOOLS} AUTO_CLEAN) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/cctag RENAME copyright) \ No newline at end of file diff --git a/ports/cctag/vcpkg.json b/ports/cctag/vcpkg.json new file mode 100644 index 00000000000000..b90383fc79d1ed --- /dev/null +++ b/ports/cctag/vcpkg.json @@ -0,0 +1,52 @@ +{ + "name": "cctag", + "version-semver": "1.0.0", + "maintainers": "alicevision-team@googlegroups.com", + "description": "Computer vision library for detecting CCTag markers made up of concentric circles", + "homepage": "https://github.com/alicevision/CCTag", + "documentation": "https://cctag.readthedocs.io/", + "supports": "!(uwp | arm | arm64 | android | x86)", + "dependencies": [ + "boost-accumulators", + "boost-algorithm", + "boost-container", + "boost-date-time", + "boost-exception", + "boost-filesystem", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + "boost-mpl", + "boost-multi-array", + "boost-program-options", + "boost-ptr-container", + "boost-serialization", + "boost-spirit", + "boost-stacktrace", + "boost-static-assert", + "boost-test", + "boost-thread", + "boost-throw-exception", + "boost-timer", + "boost-type-traits", + "boost-unordered", + "eigen3", + "opencv3", + "tbb" + ], + "features": { + "apps": { + "description": "Sample applications for detecting CCTag markers in images and videos", + "dependencies": [ + "boost-program-options", + "boost-system" + ] + }, + "cuda": { + "description": "Enable Cuda support for faster detection", + "dependencies": [ + "cuda" + ] + } + } +} diff --git a/ports/cctz/CONTROL b/ports/cctz/CONTROL deleted file mode 100644 index a223586d63e3d3..00000000000000 --- a/ports/cctz/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: cctz -Version: 2.3-2 -Homepage: https://github.com/google/cctz -Build-Depends: benchmark -Description: two libraries that cooperate with to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner. diff --git a/ports/cctz/portfile.cmake b/ports/cctz/portfile.cmake index d429e7f52a13b9..195af4fe6c1765 100644 --- a/ports/cctz/portfile.cmake +++ b/ports/cctz/portfile.cmake @@ -2,8 +2,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/cctz/vcpkg.json b/ports/cctz/vcpkg.json new file mode 100644 index 00000000000000..aaf937dfb04e78 --- /dev/null +++ b/ports/cctz/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "cctz", + "version-string": "2.3", + "port-version": 3, + "description": "two libraries that cooperate with to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner.", + "homepage": "https://github.com/google/cctz", + "dependencies": [ + "benchmark" + ] +} diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL deleted file mode 100644 index c9670b14f82125..00000000000000 --- a/ports/celero/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: celero -Version: 2.5.0-1 -Homepage: https://github.com/DigitalInBlue/Celero -Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++. diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake index a3dd2ad932f081..e39bac92d716df 100644 --- a/ports/celero/portfile.cmake +++ b/ports/celero/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DigitalInBlue/Celero - REF 6f24a1d98db4fee41ddd2f615cf490a5b514795a - SHA512 7dc8cecd2aac7bd312bfa01013f290fbfac8a43d07cc0d884e9b446c29a6c233e800f9bd3d03551f6e3b1ee2424cf90571f16590b23fc9333900fcc82143d048 + REF 6208b63dcd4baeea6817d3e84f79fb04ad99c720 #2.8.2 + SHA512 13a486dafba394cc3e072292008d00e8a3e1b12b4fe7c82cf2ce43b3d24629d08b5762494c19da0a12b186a70114cba101553ed1b4cea90d090514307b06dec8 HEAD_REF master ) @@ -18,6 +16,7 @@ vcpkg_configure_cmake( -DCELERO_ENABLE_TESTS=OFF -DCELERO_RUN_EXAMPLE_ON_BUILD=OFF -DCELERO_COMPILE_DYNAMIC_LIBRARIES=${CELERO_COMPILE_DYNAMIC_LIBRARIES} + -DCELERO_TREAT_WARNINGS_AS_ERRORS=OFF ) vcpkg_install_cmake() @@ -25,6 +24,10 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/celero/Export.h "ifdef CELERO_STATIC" "if 1") +endif() + file(RENAME ${CURRENT_PACKAGES_DIR}/share/celero/celero-target.cmake ${CURRENT_PACKAGES_DIR}/share/celero/celero-config.cmake) -file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/celero RENAME copyright) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/celero/vcpkg.json b/ports/celero/vcpkg.json new file mode 100644 index 00000000000000..5296cfa17d4032 --- /dev/null +++ b/ports/celero/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "celero", + "version-string": "2.8.2", + "port-version": 1, + "description": "Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++.", + "homepage": "https://github.com/DigitalInBlue/Celero" +} diff --git a/ports/cello/CMakeLists.txt b/ports/cello/CMakeLists.txt new file mode 100644 index 00000000000000..b54507f07e0561 --- /dev/null +++ b/ports/cello/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.14) + +project(cello LANGUAGES C) + +include(GNUInstallDirs) + +file(GLOB cello_sources src/*.c) +add_library(cello ${cello_sources}) + +target_include_directories( + cello + PUBLIC + $ + $ +) + +set_target_properties(cello PROPERTIES PUBLIC_HEADER include/Cello.h) + +install(TARGETS cello EXPORT unofficial-cello-config) + +install( + EXPORT unofficial-cello-config + NAMESPACE unofficial::cello:: + DESTINATION share/unofficial-cello + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/ports/cello/portfile.cmake b/ports/cello/portfile.cmake new file mode 100644 index 00000000000000..279d5c4a86c35a --- /dev/null +++ b/ports/cello/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO orangeduck/Cello + REF da28eefbc95d8bd5628e5f1c4cc12bc1b13fef4f + SHA512 64825cf37223dd679b379d78475218a543690c3b78333acb906d42982261df4b9ada3a87bea183fad5e2cf220311904e657b0bf5051b141c389d5ee1d2974e5b + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/cello/vcpkg.json b/ports/cello/vcpkg.json new file mode 100644 index 00000000000000..ebb509e68f4ac3 --- /dev/null +++ b/ports/cello/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cello", + "version-string": "2019-07-23", + "port-version": 1, + "description": "Higher level programming in C", + "homepage": "http://libcello.org/" +} diff --git a/ports/cereal/CONTROL b/ports/cereal/CONTROL deleted file mode 100644 index 05175d91d255c3..00000000000000 --- a/ports/cereal/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cereal -Version: 1.2.2-2 -Homepage: https://github.com/USCiLab/cereal -Description: a header-only C++11 serialization library (built in support for binary, XML and JSon) diff --git a/ports/cereal/portfile.cmake b/ports/cereal/portfile.cmake index de056150d2a0f2..833655e6d1f294 100644 --- a/ports/cereal/portfile.cmake +++ b/ports/cereal/portfile.cmake @@ -1,13 +1,11 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO USCiLab/cereal - REF v1.2.2 - SHA512 9567b2e19add9446b24f8afd122eea09ba6ecd1a090335cf0ab31fdc8f64c6c97daa3d9eaf0801c36a770737488e0eebf81d96d7b7a65deed30da6130f2d47eb - HEAD_REF develop + REF v1.3.0 + SHA512 2bb640a222d4efe7c624c6ec3e755fecae00ef59e91c4db462e233546c5afe73c065ba1d16d9600f7cd3cc185593109148008b0b2b870208e2f1d6984fd40c72 + HEAD_REF master ) vcpkg_configure_cmake( diff --git a/ports/cereal/vcpkg.json b/ports/cereal/vcpkg.json new file mode 100644 index 00000000000000..432b330e26a826 --- /dev/null +++ b/ports/cereal/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cereal", + "version-string": "1.3.0", + "port-version": 1, + "description": "a header-only C++11 serialization library (built in support for binary, XML and JSon)", + "homepage": "https://github.com/USCiLab/cereal" +} diff --git a/ports/ceres/0001_cmakelists_fixes.patch b/ports/ceres/0001_cmakelists_fixes.patch index f269f05eefd852..bb594272374dd9 100644 --- a/ports/ceres/0001_cmakelists_fixes.patch +++ b/ports/ceres/0001_cmakelists_fixes.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 02c72b5..62d8c59 100644 +index 33e98b1..f275d68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -374,27 +374,7 @@ if (MINIGLOG) +@@ -426,27 +426,7 @@ if (MINIGLOG) GLOG_LIBRARY) else (MINIGLOG) unset(MINIGLOG_MAX_LOG_LEVEL CACHE) @@ -19,33 +19,28 @@ index 02c72b5..62d8c59 100644 - set(GLOG_GFLAGS_DEPENDENCY_MESSAGE - " Assuming glog was built with gflags support as gflags was found. " - "This will make gflags a public dependency of Ceres.") -- if (NOT GFLAGS_FOUND) +- if (NOT gflags_FOUND) - set(GLOG_GFLAGS_DEPENDENCY_MESSAGE - " Assuming glog was NOT built with gflags support as gflags was " - "not found. If glog was built with gflags, please set the " - "gflags search locations such that it can be found by Ceres. " - "Otherwise, Ceres may fail to link due to missing gflags symbols.") -- endif(NOT GFLAGS_FOUND) +- endif(NOT gflags_FOUND) - message("-- Found Google Log (glog)." ${GLOG_GFLAGS_DEPENDENCY_MESSAGE}) + find_package(Glog REQUIRED) endif (MINIGLOG) - + if (NOT SCHUR_SPECIALIZATIONS) -@@ -582,7 +562,7 @@ include_directories( - # Note that this is *not* propagated to clients, ie CERES_INCLUDE_DIRS - # used by clients after find_package(Ceres) does not identify Eigen as - # as system headers. --include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) -+include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}/Eigen) - - if (SUITESPARSE) - include_directories(${SUITESPARSE_INCLUDE_DIRS}) -@@ -917,8 +897,6 @@ install(FILES "${Ceres_BINARY_DIR}/CeresConfig-install.cmake" +@@ -760,12 +740,6 @@ install(FILES "${Ceres_BINARY_DIR}/CeresConfig-install.cmake" DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR}) install(FILES "${Ceres_BINARY_DIR}/CeresConfigVersion.cmake" - "${Ceres_SOURCE_DIR}/cmake/FindEigen.cmake" -- "${Ceres_SOURCE_DIR}/cmake/FindGlog.cmake" -- "${Ceres_SOURCE_DIR}/cmake/FindGflags.cmake" DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR}) - - # Create an uninstall target to remove all installed files. +-if (GLOG_FOUND AND NOT FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION) +- # Version of glog detected was not built with CMake, install our glog module +- # file to enable detection in CeresConfig. +- install(FILES "${Ceres_SOURCE_DIR}/cmake/FindGlog.cmake" +- DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR}) +-endif() + + if (PROVIDE_UNINSTALL_TARGET) + # Create an uninstall target to remove all installed files. diff --git a/ports/ceres/0002_use_glog_target.patch b/ports/ceres/0002_use_glog_target.patch index 6ca328a8ec1a40..5405ea53df2fb5 100644 --- a/ports/ceres/0002_use_glog_target.patch +++ b/ports/ceres/0002_use_glog_target.patch @@ -1,20 +1,20 @@ diff --git a/internal/ceres/CMakeLists.txt b/internal/ceres/CMakeLists.txt -index cc43fec..18b415b 100644 +index 3711222..8646bd0 100644 --- a/internal/ceres/CMakeLists.txt +++ b/internal/ceres/CMakeLists.txt -@@ -152,17 +152,9 @@ else (SCHUR_SPECIALIZATIONS) - endif (SCHUR_SPECIALIZATIONS) - - # Build the list of dependencies for Ceres based on the current configuration. +@@ -174,17 +174,9 @@ endif (SCHUR_SPECIALIZATIONS) + find_package(Threads QUIET) + list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES Threads::Threads) + -if (NOT MINIGLOG AND GLOG_FOUND) - list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES ${GLOG_LIBRARIES}) -- if (GFLAGS_FOUND) +- if (gflags_FOUND) - # If glog & gflags are both found, we assume that glog was built with - # gflags, as it is awkward to perform a try_compile() to verify this - # when gflags is an imported target (as it is in newer versions). - # As glog #includes gflags/gflags.h in glog/logging.h if compiled with - # gflags, it is thus a public dependency for Ceres in this case. -- list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES ${GFLAGS_LIBRARIES}) +- list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES gflags) - endif() -endif (NOT MINIGLOG AND GLOG_FOUND) +if (NOT MINIGLOG) diff --git a/ports/ceres/0003_fix_exported_ceres_config.patch b/ports/ceres/0003_fix_exported_ceres_config.patch index 5cc41013e8b44b..332ef595284066 100644 --- a/ports/ceres/0003_fix_exported_ceres_config.patch +++ b/ports/ceres/0003_fix_exported_ceres_config.patch @@ -1,92 +1,66 @@ diff --git a/cmake/CeresConfig.cmake.in b/cmake/CeresConfig.cmake.in -index d0380de..bf4c2eb 100644 +index e5e2976..be1083a 100644 --- a/cmake/CeresConfig.cmake.in +++ b/cmake/CeresConfig.cmake.in -@@ -237,85 +237,8 @@ endif (EIGEN_FOUND) - list(APPEND CERES_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}) +@@ -213,55 +213,13 @@ else (EIGEN3_FOUND) + endif (EIGEN3_FOUND) - # Glog. --# Flag set during configuration and build of Ceres. + # glog (and maybe gflags). +-# +-# Flags set during configuration and build of Ceres. -set(CERES_USES_MINIGLOG @MINIGLOG@) +-set(CERES_GLOG_VERSION @glog_VERSION@) +-set(CERES_GLOG_WAS_BUILT_WITH_CMAKE @FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION@) +- -set(CERES_USES_GFLAGS @GFLAGS@) +-set(CERES_GFLAGS_VERSION @gflags_VERSION@) +- -if (CERES_USES_MINIGLOG) -- set(MINIGLOG_INCLUDE_DIR ${CERES_INCLUDE_DIR}/ceres/internal/miniglog) -- if (NOT CERES_WAS_INSTALLED) -- # When Ceres was exported from the build tree, the miniglog headers -- # will be in Ceres internal source directory, not in the public headers -- # directory (they are copied with the public headers when installed). -- set(MINIGLOG_INCLUDE_DIR -- ${CERES_EXPORTED_SOURCE_DIR}/internal/ceres/miniglog) -- endif() -- if (NOT EXISTS ${MINIGLOG_INCLUDE_DIR}) -- ceres_report_not_found( -- "Failed to find miniglog headers in expected include directory: " -- "${MINIGLOG_INCLUDE_DIR}, but Ceres was compiled with MINIGLOG enabled " -- "(in place of glog).") -- endif (NOT EXISTS ${MINIGLOG_INCLUDE_DIR}) -- list(APPEND CERES_INCLUDE_DIRS ${MINIGLOG_INCLUDE_DIR}) - # Output message at standard log level (not the lower STATUS) so that - # the message is output in GUI during configuration to warn user. -- message("-- Found Ceres compiled with miniglog substitute " +- ceres_message("-- Found Ceres compiled with miniglog substitute " - "for glog, beware this will likely cause problems if glog is later linked.") --else (CERES_USES_MINIGLOG) -- # Append the locations of glog when Ceres was built to the search path hints. -- set(GLOG_WAS_BUILT_WITH_CMAKE @FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION@) -- if (GLOG_WAS_BUILT_WITH_CMAKE) -- set(glog_DIR @glog_DIR@) -- set(GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION TRUE) +-else(CERES_USES_MINIGLOG) +- if (CERES_GLOG_WAS_BUILT_WITH_CMAKE) +- find_package(glog ${CERES_GLOG_VERSION} CONFIG QUIET) +- set(GLOG_FOUND ${glog_FOUND}) - else() -- list(APPEND GLOG_INCLUDE_DIR_HINTS @GLOG_INCLUDE_DIR@) -- get_filename_component(CERES_BUILD_GLOG_LIBRARY_DIR @GLOG_LIBRARY@ PATH) +- # Version of glog against which Ceres was built was not built with CMake, +- # use the exported glog find_package() module from Ceres to find it again. +- # Append the locations of glog when Ceres was built to the search path hints. +- list(APPEND GLOG_INCLUDE_DIR_HINTS "@GLOG_INCLUDE_DIR@") +- get_filename_component(CERES_BUILD_GLOG_LIBRARY_DIR "@GLOG_LIBRARY@" PATH) - list(APPEND GLOG_LIBRARY_DIR_HINTS ${CERES_BUILD_GLOG_LIBRARY_DIR}) -- endif() - -- # Search quietly s/t we control the timing of the error message if not found. -- find_package(Glog QUIET) +- # Search quietly s/t we control the timing of the error message if not found. +- find_package(Glog QUIET) +- endif() ++include (CMakeFindDependencyMacro) ++find_dependency (glog NO_MODULE) + - if (GLOG_FOUND) -- message(STATUS "Found required Ceres dependency: glog") -- else (GLOG_FOUND) -- ceres_report_not_found("Missing required Ceres " -- "dependency: glog. Searched using GLOG_INCLUDE_DIR_HINTS: " -- "${GLOG_INCLUDE_DIR_HINTS} and glog_DIR: ${glog_DIR}.") -- endif (GLOG_FOUND) -- list(APPEND CERES_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS}) +- ceres_message(STATUS "Found required Ceres dependency: glog") +- else() +- ceres_report_not_found("Missing required Ceres dependency: glog.") +- endif() - - # gflags is only a public dependency of Ceres via glog, thus is not required - # if Ceres was built with MINIGLOG. - if (CERES_USES_GFLAGS) -- # If gflags was found as an imported CMake target, we need to call -- # find_packge(Gflags) again here, as imported CMake targets are not -- # re-exported. Without this, the 'gflags-shared' target name which is -- # present in CERES_LIBRARIES in this case would not be defined, and so -- # CMake will assume it is a library name (which it is not) and fail to link. -- # -- # Append the locations of gflags when Ceres was built to the search path -- # hints. -- set(GFLAGS_WAS_BUILT_WITH_CMAKE @FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION@) -- if (GFLAGS_WAS_BUILT_WITH_CMAKE) -- set(gflags_DIR @gflags_DIR@) -- set(GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION TRUE) -- else() -- list(APPEND GFLAGS_INCLUDE_DIR_HINTS @GFLAGS_INCLUDE_DIR@) -- get_filename_component(CERES_BUILD_GFLAGS_LIBRARY_DIR @GFLAGS_LIBRARY@ PATH) -- list(APPEND GFLAGS_LIBRARY_DIR_HINTS ${CERES_BUILD_GFLAGS_LIBRARY_DIR}) -- endif() -- - # Search quietly s/t we control the timing of the error message if not found. -- find_package(Gflags QUIET) -- if (GFLAGS_FOUND) -- message(STATUS "Found required Ceres dependency: gflags") +- find_package(gflags ${CERES_GFLAGS_VERSION} QUIET) +- if (gflags_FOUND AND TARGET gflags) +- ceres_message(STATUS "Found required Ceres dependency: gflags") - else() - ceres_report_not_found("Missing required Ceres " -- "dependency: gflags. Searched using GFLAGS_INCLUDE_DIR_HINTS: " -- "${GFLAGS_INCLUDE_DIR_HINTS} and gflags_DIR: ${gflags_DIR}.") +- "dependency: gflags (not found, or not found as exported CMake target).") - endif() -- list(APPEND CERES_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIR_HINTS}) - endif() --endif (CERES_USES_MINIGLOG) -+include (CMakeFindDependencyMacro) -+find_dependency (glog NO_MODULE) +-endif(CERES_USES_MINIGLOG) ++# SuiteSparse ++if (@SUITESPARSE@) ++ find_dependency(suitesparse CONFIG) ++endif() # Import exported Ceres targets, if they have not already been imported. if (NOT TARGET ceres AND NOT Ceres_BINARY_DIR) diff --git a/ports/ceres/0004_blas_linux_fix.patch b/ports/ceres/0004_blas_linux_fix.patch deleted file mode 100644 index 5fffee5e231cf4..00000000000000 --- a/ports/ceres/0004_blas_linux_fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/internal/ceres/blas.cc b/internal/ceres/blas.cc -index 3ba63bb..071a26e 100644 ---- a/internal/ceres/blas.cc -+++ b/internal/ceres/blas.cc -@@ -33,7 +33,7 @@ - #include "glog/logging.h" - - #ifndef CERES_NO_LAPACK --extern "C" void dsyrk_(char* uplo, -+extern "C" void dsyrk(char* uplo, - char* trans, - int* n, - int* k, -@@ -64,7 +64,7 @@ void BLAS::SymmetricRankKUpdate(int num_rows, - int k = transpose ? num_rows : num_cols; - int lda = k; - int ldc = n; -- dsyrk_(&uplo, -+ dsyrk(&uplo, - &trans, - &n, - &k, diff --git a/ports/ceres/0004_fix_lib_path_linux.patch b/ports/ceres/0004_fix_lib_path_linux.patch new file mode 100644 index 00000000000000..e2c9c56b4ffba1 --- /dev/null +++ b/ports/ceres/0004_fix_lib_path_linux.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f24ce30..8e5759b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -192,7 +192,7 @@ endif() + # install native libraries to lib64 rather than lib. Most distros seem to + # follow this convention with a couple notable exceptions (Debian-based and + # Arch-based distros) which we try to detect here. +-if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND ++if (0 AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND + NOT DEFINED LIB_SUFFIX AND + NOT CMAKE_CROSSCOMPILING AND + CMAKE_SIZEOF_VOID_P EQUAL "8" AND diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL deleted file mode 100644 index 850da31a627ebf..00000000000000 --- a/ports/ceres/CONTROL +++ /dev/null @@ -1,24 +0,0 @@ -Source: ceres -Version: 1.14.0-6 -Build-Depends: glog, eigen3 -Homepage: https://github.com/ceres-solver/ceres-solver -Description: non-linear optimization package - -Feature: lapack -Build-Depends: clapack (!osx) -Description: Use Lapack in Ceres - -Feature: suitesparse -Build-Depends: ceres[lapack], suitesparse[core] -Description: SuiteSparse support for Ceres - -Feature: cxsparse -Build-Depends: suitesparse[core] -Description: CXSparse support for Ceres - -Feature: eigensparse -Description: Use of Eigen as a sparse linear algebra library in Ceres - -Feature: tools -Build-Depends: gflags -Description: Ceres tools diff --git a/ports/ceres/find-package-required.patch b/ports/ceres/find-package-required.patch new file mode 100644 index 00000000000000..aae9cccdd47aa3 --- /dev/null +++ b/ports/ceres/find-package-required.patch @@ -0,0 +1,58 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b6a3d05..a78c027 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -245,7 +245,7 @@ if (EIGEN3_FOUND) + endif (EIGEN3_FOUND) + + if (LAPACK) +- find_package(LAPACK QUIET) ++ find_package(LAPACK REQUIRED) + if (LAPACK_FOUND) + message("-- Found LAPACK library: ${LAPACK_LIBRARIES}") + else (LAPACK_FOUND) +@@ -263,7 +263,7 @@ if (SUITESPARSE) + # built with SuiteSparse support. + + # Check for SuiteSparse and dependencies. +- find_package(SuiteSparse) ++ find_package(SuiteSparse REQUIRED) + if (SUITESPARSE_FOUND) + # On Ubuntu the system install of SuiteSparse (v3.4.0) up to at least + # Ubuntu 13.10 cannot be used to link shared libraries. +@@ -300,7 +300,7 @@ endif (SUITESPARSE) + # CXSparse. + if (CXSPARSE) + # Don't search with REQUIRED as we can continue without CXSparse. +- find_package(CXSparse) ++ find_package(CXSparse REQUIRED) + if (CXSPARSE_FOUND) + # By default, if CXSparse and all dependencies are found, Ceres is + # built with CXSparse support. +@@ -336,7 +336,7 @@ endif(NOT SUITESPARSE AND NOT CXSPARSE AND NOT EIGENSPARSE) + # GFlags. + if (GFLAGS) + # Don't search with REQUIRED as we can continue without gflags. +- find_package(gflags 2.2.0) ++ find_package(gflags REQUIRED) + if (gflags_FOUND) + if (TARGET gflags) + message("-- Found Google Flags (gflags) version ${gflags_VERSION}: ${gflags_DIR}") +@@ -537,7 +537,7 @@ else (NOT OPENMP AND NOT TBB AND NOT CXX11_THREADS) + set_ceres_threading_model("${CERES_THREADING_MODEL}") + + if (BUILD_BENCHMARKS) +- find_package(benchmark QUIET) ++ find_package(benchmark REQUIRED) + if (benchmark_FOUND) + message("-- Found Google benchmark library. Building Ceres benchmarks.") + else() +@@ -782,7 +782,7 @@ if (BUILD_DOCUMENTATION) + set(CERES_DOCS_INSTALL_DIR "share/doc/ceres" CACHE STRING + "Ceres docs install path relative to CMAKE_INSTALL_PREFIX") + +- find_package(Sphinx QUIET) ++ find_package(Sphinx REQUIRED) + if (NOT SPHINX_FOUND) + message("-- Failed to find Sphinx, disabling build of documentation.") + update_cache_variable(BUILD_DOCUMENTATION OFF) diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 66481fc0934f22..d0500faef27a05 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(MSVC_USE_STATIC_CRT_VALUE OFF) if(VCPKG_CRT_LINKAGE STREQUAL "static") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -8,81 +6,68 @@ if(VCPKG_CRT_LINKAGE STREQUAL "static") set(MSVC_USE_STATIC_CRT_VALUE ON) endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(ADDITIONAL_PATCH "0004_blas_linux_fix.patch") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ceres-solver/ceres-solver - REF 1.14.0 - SHA512 6dddddf5bd5834332a69add468578ad527e4d94fe85c9751ddf5fe9ad11a34918bdd9c994c49dd6ffc398333d0ac9752ac89aaef1293e2fe0a55524e303d415d + REF 2.0.0 + SHA512 6379666ef57af4ea85026644fa21365ce18fbaa12d50bd452bcdae0743a7b013effdd42c961e90c31815991bf315bd6904553dcc1a382ff5ed8c7abe9edf9a6c HEAD_REF master PATCHES 0001_cmakelists_fixes.patch 0002_use_glog_target.patch 0003_fix_exported_ceres_config.patch - ${ADDITIONAL_PATCH} + 0004_fix_lib_path_linux.patch + find-package-required.patch ) +file(REMOVE ${SOURCE_PATH}/cmake/FindCXSparse.cmake) file(REMOVE ${SOURCE_PATH}/cmake/FindGflags.cmake) file(REMOVE ${SOURCE_PATH}/cmake/FindGlog.cmake) -#file(REMOVE ${SOURCE_PATH}/cmake/FindEigen.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindEigen.cmake) file(REMOVE ${SOURCE_PATH}/cmake/FindSuiteSparse.cmake) -#file(REMOVE ${SOURCE_PATH}/cmake/FindTBB.cmake) - -set(SUITESPARSE OFF) -if("suitesparse" IN_LIST FEATURES) - set(SUITESPARSE ON) -endif() - -set(CXSPARSE OFF) -if("cxsparse" IN_LIST FEATURES) - set(CXSPARSE ON) -endif() -set(LAPACK OFF) -if("lapack" IN_LIST FEATURES) - set(LAPACK ON) -endif() - -set(EIGENSPARSE OFF) -if("eigensparse" IN_LIST FEATURES) - set(EIGENSPARSE ON) -endif() - -set(GFLAGS OFF) -if("tools" IN_LIST FEATURES) - set(GFLAGS ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "suitesparse" SUITESPARSE + "cxsparse" CXSPARSE + "lapack" LAPACK + "eigensparse" EIGENSPARSE + "tools" GFLAGS +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + ${FEATURE_OPTIONS} -DEXPORT_BUILD_DIR=ON + -DBUILD_BENCHMARKS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF - -DGFLAGS=${GFLAGS} - -DCXSPARSE=${CXSPARSE} - -DEIGENSPARSE=${EIGENSPARSE} - -DLAPACK=${LAPACK} - -DSUITESPARSE=${SUITESPARSE} + -DBUILD_BENCHMARKS=OFF + -DPROVIDE_UNINSTALL_TARGET=OFF -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE} + -DLIB_SUFFIX=${LIB_SUFFIX} ) vcpkg_install_cmake() -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_WINDOWS) vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) else() vcpkg_fixup_cmake_targets(CONFIG_PATH lib${LIB_SUFFIX}/cmake/Ceres) endif() +file(READ ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake CERES_CONFIG) +string(REPLACE "set_target_properties(ceres PROPERTIES INTERFACE_LINK_LIBRARIES Ceres::ceres)" + "set_target_properties(ceres PROPERTIES INTERFACE_LINK_LIBRARIES Ceres::ceres) + set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD_REQUIRED ON)" CERES_CONFIG "${CERES_CONFIG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake "${CERES_CONFIG}") vcpkg_copy_pdbs() # Changes target search path -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_WINDOWS) file(READ ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake CERES_TARGETS) string(REPLACE "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../" "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../../" CERES_TARGETS "${CERES_TARGETS}") @@ -98,6 +83,4 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# Handle copyright of suitesparse and metis -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ceres) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ceres/LICENSE ${CURRENT_PACKAGES_DIR}/share/ceres/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ceres/vcpkg.json b/ports/ceres/vcpkg.json new file mode 100644 index 00000000000000..b1be6bde6f749c --- /dev/null +++ b/ports/ceres/vcpkg.json @@ -0,0 +1,52 @@ +{ + "name": "ceres", + "version-semver": "2.0.0", + "port-version": 5, + "description": "non-linear optimization package", + "homepage": "https://github.com/ceres-solver/ceres-solver", + "dependencies": [ + "eigen3", + "glog" + ], + "features": { + "cxsparse": { + "description": "CXSparse support for Ceres", + "dependencies": [ + { + "name": "suitesparse", + "default-features": false + } + ] + }, + "eigensparse": { + "description": "Use of Eigen as a sparse linear algebra library in Ceres" + }, + "lapack": { + "description": "Use Lapack in Ceres", + "dependencies": [ + "lapack" + ] + }, + "suitesparse": { + "description": "SuiteSparse support for Ceres", + "dependencies": [ + { + "name": "ceres", + "features": [ + "lapack" + ] + }, + { + "name": "suitesparse", + "default-features": false + } + ] + }, + "tools": { + "description": "Ceres tools", + "dependencies": [ + "gflags" + ] + } + } +} diff --git a/ports/cfitsio/0001-fix-dependencies.patch b/ports/cfitsio/0001-fix-dependencies.patch new file mode 100644 index 00000000000000..d8df38548e7c3e --- /dev/null +++ b/ports/cfitsio/0001-fix-dependencies.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d6af49..9e7d2ee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -94,9 +94,8 @@ IF (NOT MSVC) + + # Find curl library, for HTTPS support: + IF (UseCurl) +- FIND_PACKAGE(CURL) ++ FIND_PACKAGE(CURL CONFIG REQUIRED) + IF (CURL_FOUND) +- INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR}) + ADD_DEFINITIONS(-DCFITSIO_HAVE_CURL) + ENDIF() + ENDIF() +@@ -128,18 +127,20 @@ SET(SRC_FILES + + # Only include zlib source files if we are building a shared library. + # Users will need to link their executable with zlib independently. +-IF (BUILD_SHARED_LIBS) ++IF (0) + set(SRC_FILES ${SRC_FILES} + zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/infback.c + zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c + zlib/uncompr.c zlib/zutil.c + ) ++ELSE() ++ FIND_PACKAGE(ZLIB REQUIRED) + ENDIF() + + ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES}) +-TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB}) ++TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} ZLIB::ZLIB) + IF (CURL_FOUND) +- TARGET_LINK_LIBRARIES(${LIB_NAME} ${CURL_LIBRARIES}) ++ TARGET_LINK_LIBRARIES(${LIB_NAME} CURL::libcurl) + ENDIF(CURL_FOUND) + + SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION}) diff --git a/ports/cfitsio/0002-export-cmake-targets.patch b/ports/cfitsio/0002-export-cmake-targets.patch new file mode 100644 index 00000000000000..ab3a46cfe4d36d --- /dev/null +++ b/ports/cfitsio/0002-export-cmake-targets.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9e7d2ee..5b37adc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,7 +24,7 @@ OPTION(UseCurl "UseCurl" ON) + + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}") + set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") +-set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/") ++set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/cfitsio") + + # Define project version + SET(${PROJECT_NAME}_MAJOR_VERSION 3) +@@ -138,19 +138,31 @@ ELSE() + ENDIF() + + ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES}) +-TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} ZLIB::ZLIB) ++TARGET_INCLUDE_DIRECTORIES(${LIB_NAME} PUBLIC $) ++TARGET_LINK_LIBRARIES(${LIB_NAME} PUBLIC ${PTHREADS_LIBRARY} ${M_LIB} ZLIB::ZLIB) + IF (CURL_FOUND) +- TARGET_LINK_LIBRARIES(${LIB_NAME} CURL::libcurl) ++ TARGET_LINK_LIBRARIES(${LIB_NAME} PUBLIC CURL::libcurl) + ENDIF(CURL_FOUND) + + SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION}) +-install(TARGETS ${LIB_NAME} DESTINATION ${LIB_DESTINATION}) + install(TARGETS ${LIB_NAME} ++ EXPORT unofficial-${LIB_NAME}-config + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + install(FILES ${H_FILES} DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) + ++set(CFITSIO_VERSION 3.49) ++include(CMakePackageConfigHelpers) ++write_basic_package_version_file(unofficial-${LIB_NAME}-version.cmake VERSION ${CFITSIO_VERSION} COMPATIBILITY ExactVersion) ++ ++install(FILES ${CMAKE_BINARY_DIR}/unofficial-${LIB_NAME}-version.cmake DESTINATION share/unofficial-${LIB_NAME}) ++ ++install( ++ EXPORT unofficial-${LIB_NAME}-config ++ DESTINATION share/unofficial-${LIB_NAME} ++) ++ + # Only build test code and executables if building a shared library: + IF (BUILD_SHARED_LIBS) + diff --git a/ports/cfitsio/0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch b/ports/cfitsio/0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch new file mode 100644 index 00000000000000..288a1d263cf8b9 --- /dev/null +++ b/ports/cfitsio/0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch @@ -0,0 +1,27 @@ +From af09ca45ad71a540aafc4989676e9a0b88bf2948 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Fri, 16 Oct 2020 12:28:37 -0700 +Subject: [PATCH] add `-Wno-error=implicit-funciton-declaration` to cmake + +--- + CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b37adc..fead70c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,6 +6,10 @@ SET(CMAKE_LEGACY_CYGWIN_WIN32 0) + PROJECT(CFITSIO) + CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) + ++if (NOT MSVC) ++ add_compile_options(-Wno-error=implicit-function-declaration) ++endif() ++ + # Allow @rpath token in target install name on Macs. + # See "cmake --help-policy CMP0042" for more information. + IF(POLICY CMP0042) +-- +2.28.0.windows.1 + diff --git a/ports/cfitsio/0004-pkg-config.patch b/ports/cfitsio/0004-pkg-config.patch new file mode 100644 index 00000000000000..65d98b56a629f6 --- /dev/null +++ b/ports/cfitsio/0004-pkg-config.patch @@ -0,0 +1,13 @@ +diff -urw cfitsio-3-7822097674.clean/cfitsio.pc.cmake cfitsio-3-7822097674/cfitsio.pc.cmake +--- cfitsio-3-7822097674.clean/cfitsio.pc.cmake 2020-08-12 20:01:04.000000000 +0200 ++++ cfitsio-3-7822097674/cfitsio.pc.cmake 2021-05-06 08:46:49.160351519 +0200 +@@ -6,7 +6,8 @@ + Name: cfitsio + Description: FITS File Subroutine Library + URL: https://heasarc.gsfc.nasa.gov/fitsio/ +-Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@ ++Version: @CFITSIO_VERSION@ ++Requires.private: @PKG_CONFIG_REQUIRES_PRIVATE@ + Libs: -L${libdir} @PKG_CONFIG_LIBS@ + Libs.private: -lm + Cflags: -I${includedir} diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL deleted file mode 100644 index 316269f88fdb3b..00000000000000 --- a/ports/cfitsio/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cfitsio -Version: 3.410-2 -Homepage: https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c -Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format diff --git a/ports/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake index e9caf61d168e0f..05821771a0b3a5 100644 --- a/ports/cfitsio/portfile.cmake +++ b/ports/cfitsio/portfile.cmake @@ -1,34 +1,73 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cfitsio) vcpkg_download_distfile(ARCHIVE - URLS "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3410.tar.gz" - FILENAME "cfitsio3410.tar.gz" - SHA512 b2ac31ab17e19eeeb4f1601f42f348402c0a4ab03725dbf74fe75eaabbee2f44f64f0c0ee7f0b2688bd93a9cc0dccf29f07e73b9148fff97fc78bebdbb5f6f0f + URLS "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz" + FILENAME "cfitsio-3.49.tar.gz" + SHA512 9836a4af3bbbfed1ea1b4c70b9d500ac485d7c3d8131eb8a25ee6ef6662f46ba52b5161c45c709ed9a601ff0e9ec36daa5650eaaf4f2cc7d6f4bb5640f10da15 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0001-fix-dependencies.patch + 0002-export-cmake-targets.patch + 0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch + 0004-pkg-config.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + curl UseCurl +) + +set(PKG_CONFIG_REQUIRES_PRIVATE zlib) +if ("curl" IN_LIST FEATURES) + set(FIND_CURL_DEPENDENCY "find_dependency(CURL CONFIG)") + string(APPEND PKG_CONFIG_REQUIRES_PRIVATE " libcurl") +endif() + +if ("pthreads" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_WINDOWS) + set(WITH_PTHREADS ON) + set(FIND_PTHREADS_DEPENDENCY "find_dependency(pthreads)") + else() + message(WARNING "Feature pthreads only support Windows, disable it now.") + set(WITH_PTHREADS OFF) + endif() +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DUSE_PTHREADS=${WITH_PTHREADS} + "-DPKG_CONFIG_REQUIRES_PRIVATE=${PKG_CONFIG_REQUIRES_PRIVATE}" + -DPKG_CONFIG_LIBS=-lcfitsio ) vcpkg_install_cmake() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cfitsio TARGET_PATH share/unofficial-cfitsio) -# Remove duplicate include files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/unistd.h) +file(READ ${CURRENT_PACKAGES_DIR}/share/unofficial-cfitsio/unofficial-cfitsio-config.cmake ASSIMP_CONFIG) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/unofficial-cfitsio/unofficial-cfitsio-config.cmake " +include(CMakeFindDependencyMacro) +${FIND_CURL_DEPENDENCY} +${FIND_PTHREADS_DEPENDENCY} +find_dependency(ZLIB) +${ASSIMP_CONFIG} +") -# cfitsio uses very common names for its headers, so they must be moved to a subdirectory -file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/cfitsio) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/cfitsio ${CURRENT_PACKAGES_DIR}/include/cfitsio) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/unofficial-cfitsio/unofficial-cfitsio-config.cmake + "cmake_policy(VERSION 2.6)" + "cmake_policy(VERSION 2.6)\r\n\ +# Required for the evaluation of \"if(@BUILD_SHARED_LIBS@)\" below to function\r\n\ +cmake_policy(SET CMP0012 NEW)\r\n" +) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - # move DLLs to bin directories for dynamic builds - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll) -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/unistd.h ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/FindPthreads.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-cfitsio) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cfitsio RENAME copyright) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cfitsio/vcpkg.json b/ports/cfitsio/vcpkg.json new file mode 100644 index 00000000000000..fe2794b54221db --- /dev/null +++ b/ports/cfitsio/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "cfitsio", + "version": "3.49", + "port-version": 1, + "description": "Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format", + "homepage": "https://heasarc.gsfc.nasa.gov/fitsio/", + "dependencies": [ + "zlib" + ], + "features": { + "curl": { + "description": "UseCurl", + "dependencies": [ + "curl" + ] + }, + "pthreads": { + "description": "Thread-safe build (using pthreads)", + "dependencies": [ + { + "name": "pthreads", + "platform": "windows" + } + ] + } + } +} diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL deleted file mode 100644 index 184d4f221f1b17..00000000000000 --- a/ports/cgal/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: cgal -Version: 4.14-2 -Build-Depends: mpfr, mpir, zlib, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random, boost-foreach, boost-graph, boost-heap, boost-logic, boost-multiprecision -Homepage: https://github.com/CGAL/cgal -Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. - -Feature: qt -Build-Depends: qt5-base, qt5-3d, qt5-svg, qt5-xmlpatterns, qt5-script, eigen3 -Description: Qt GUI support for CGAL diff --git a/ports/cgal/cgal_target_fix.patch b/ports/cgal/cgal_target_fix.patch deleted file mode 100644 index 2fa5155bb03c4d..00000000000000 --- a/ports/cgal/cgal_target_fix.patch +++ /dev/null @@ -1,49 +0,0 @@ -From a0bfaee9ebed49fb65c93d7fb00a0c24c1898841 Mon Sep 17 00:00:00 2001 -From: Laurent Rineau -Date: Fri, 10 May 2019 17:31:17 +0200 -Subject: [PATCH 1/2] Consider CGAL as an imported target - ---- - Installation/lib/cmake/CGAL/CGALConfig.cmake | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake -index c2b0aed549d..08d757aad7f 100644 ---- a/Installation/lib/cmake/CGAL/CGALConfig.cmake -+++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake -@@ -116,7 +116,11 @@ include(CGAL_setup_target_dependencies) - foreach(cgal_lib ${CGAL_LIBRARIES}) - set(WITH_${cgal_lib} TRUE) - if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib}) -- add_library(${cgal_lib} INTERFACE) -+ if(CGAL_BUILDING_LIBS) -+ add_library(${cgal_lib} INTERFACE) -+ else() -+ add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL) -+ endif() - if(NOT TARGET CGAL::${cgal_lib}) - add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib}) - endif() - -From c2e8365303b97669fe50ea2427c9943049575be4 Mon Sep 17 00:00:00 2001 -From: Laurent Rineau -Date: Fri, 10 May 2019 17:47:58 +0200 -Subject: [PATCH 2/2] Actually, it can only work with CMake>=3.11 - ---- - Installation/lib/cmake/CGAL/CGALConfig.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake -index 08d757aad7f..8ef95a85c94 100644 ---- a/Installation/lib/cmake/CGAL/CGALConfig.cmake -+++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake -@@ -116,7 +116,7 @@ include(CGAL_setup_target_dependencies) - foreach(cgal_lib ${CGAL_LIBRARIES}) - set(WITH_${cgal_lib} TRUE) - if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib}) -- if(CGAL_BUILDING_LIBS) -+ if(CGAL_BUILDING_LIBS OR CMAKE_VERSION VERSION_LESS "3.11") - add_library(${cgal_lib} INTERFACE) - else() - add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL) diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index e152f7b768a6b0..fcbbeb12c1f1c1 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -1,26 +1,17 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() +vcpkg_buildpath_length_warning(37) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CGAL/cgal - REF releases/CGAL-4.14 - SHA512 c70b3ad475f6b2c03ecb540e195b4d26a709205c511b0c705dfddb5b14ef372453ce1d4d49ed342fcd21ba654dea793e91c058afae626276bfb3cfd72bccb382 + REF v5.3 + SHA512 b4093b5f1b4802cffe5dd6a47a7382a59ed83d30bb8cafa5f3fa8daef4579c9f3caf208bc2a58b7a41cf61ed825d0e549c7c442e9f5977bd82f553b2dfe8748f HEAD_REF master - PATCHES - cgal_target_fix.patch ) -set(WITH_CGAL_Qt5 OFF) -if("qt" IN_LIST FEATURES) - set(WITH_CGAL_Qt5 ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + qt WITH_CGAL_Qt5 +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -28,7 +19,7 @@ vcpkg_configure_cmake( OPTIONS -DCGAL_HEADER_ONLY=ON -DCGAL_INSTALL_CMAKE_DIR=share/cgal - -DWITH_CGAL_Qt5=${WITH_CGAL_Qt5} + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -51,18 +42,15 @@ else() endforeach() endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/lib/cgal/CGALConfig.cmake "include (\$\{CMAKE_CURRENT_LIST_DIR\}/../../share/cgal/CGALConfig.cmake)") - -file(COPY ${SOURCE_PATH}/Installation/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cgal/LICENSE ${CURRENT_PACKAGES_DIR}/share/cgal/copyright) +file(INSTALL ${SOURCE_PATH}/Installation/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file( COPY ${SOURCE_PATH}/Installation/LICENSE.BSL - ${SOURCE_PATH}/Installation/LICENSE.FREE_USE + ${SOURCE_PATH}/Installation/LICENSE.RFL ${SOURCE_PATH}/Installation/LICENSE.GPL ${SOURCE_PATH}/Installation/LICENSE.LGPL - DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} ) -vcpkg_test_cmake(PACKAGE_NAME CGAL) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/cgal/usage b/ports/cgal/usage new file mode 100644 index 00000000000000..9ea12d70bee212 --- /dev/null +++ b/ports/cgal/usage @@ -0,0 +1,5 @@ +The package cgal provides CMake targets: + + find_package(CGAL CONFIG REQUIRED) + target_link_libraries(main PRIVATE CGAL::CGAL) + diff --git a/ports/cgal/vcpkg.json b/ports/cgal/vcpkg.json new file mode 100644 index 00000000000000..7883bf7c6ded50 --- /dev/null +++ b/ports/cgal/vcpkg.json @@ -0,0 +1,68 @@ +{ + "name": "cgal", + "version": "5.3", + "description": "The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry.", + "homepage": "https://github.com/CGAL/cgal", + "dependencies": [ + "boost-accumulators", + "boost-algorithm", + "boost-bimap", + "boost-callable-traits", + "boost-concept-check", + "boost-container", + "boost-core", + "boost-detail", + "boost-filesystem", + "boost-functional", + "boost-fusion", + "boost-geometry", + "boost-graph", + "boost-heap", + "boost-intrusive", + "boost-iostreams", + "boost-iterator", + "boost-lambda", + "boost-logic", + "boost-math", + "boost-mpl", + "boost-multi-index", + "boost-multiprecision", + "boost-numeric-conversion", + "boost-optional", + "boost-parameter", + "boost-pool", + "boost-preprocessor", + "boost-property-map", + "boost-property-tree", + "boost-ptr-container", + "boost-random", + "boost-range", + "boost-serialization", + "boost-spirit", + "boost-thread", + "boost-tuple", + "boost-type-traits", + "boost-units", + "boost-utility", + "boost-variant", + "gmp", + "mpfr", + "zlib" + ], + "features": { + "qt": { + "description": "Qt GUI support for CGAL", + "dependencies": [ + "eigen3", + "qt5-3d", + { + "name": "qt5-base", + "default-features": false + }, + "qt5-script", + "qt5-svg", + "qt5-xmlpatterns" + ] + } + } +} diff --git a/ports/cgicc/CMakeLists.txt b/ports/cgicc/CMakeLists.txt index 0a9ad3e13a4749..8a74f6bffb7c41 100644 --- a/ports/cgicc/CMakeLists.txt +++ b/ports/cgicc/CMakeLists.txt @@ -42,8 +42,8 @@ check_include_files (sys/types.h HAVE_SYS_TYPES_H) check_include_files (sys/utsname.h HAVE_SYS_UTSNAME_H) check_symbol_exists (uname sys/utsname.h HAVE_UNAME) check_include_files (unistd.h HAVE_UNISTD_H) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/CgiDefs.h.in ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/CgiDefs.h.in ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h @ONLY) add_definitions (-DHAVE_CONFIG_H) set (cgicc_SOURCES cgicc/CgiEnvironment.cpp @@ -104,6 +104,12 @@ set (cgicc_HEADERS include_directories (. ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) add_library (cgicc ${cgicc_SOURCES} ${cgicc_HEADERS}) +if (BUILD_SHARED_LIBS) + add_definitions(-DCGICC_EXPORTS) +else() + add_definitions(-DCGICC_STATIC) +endif() + install(TARGETS cgicc RUNTIME DESTINATION bin LIBRARY DESTINATION lib diff --git a/ports/cgicc/CONTROL b/ports/cgicc/CONTROL deleted file mode 100644 index 1e3716e0e821ce..00000000000000 --- a/ports/cgicc/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cgicc -Version: 3.2.19-2 -Homepage: https://www.gnu.org/software/cgicc/ -Description: GNU Cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web diff --git a/ports/cgicc/fix-define.patch b/ports/cgicc/fix-define.patch new file mode 100644 index 00000000000000..2c3f9bca137c6b --- /dev/null +++ b/ports/cgicc/fix-define.patch @@ -0,0 +1,22 @@ +diff --git a/cgicc/config.h.in b/cgicc/config.h.in +index 6870cc2..ee7b5b4 100644 +--- a/cgicc/config.h.in ++++ b/cgicc/config.h.in +@@ -76,7 +76,7 @@ + #undef HAVE__BOOL + + /* The host system cgicc was configured for */ +-#undef HOST ++#cmakedefine HOST "@HOST@" + + /* Define to the sub-directory where libtool stores uninstalled libraries. */ + #undef LT_OBJDIR +@@ -106,7 +106,7 @@ + #undef STDC_HEADERS + + /* Version number of package */ +-#undef VERSION ++#cmakedefine VERSION "@VERSION@" + + /* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ diff --git a/ports/cgicc/fix-static-build.patch b/ports/cgicc/fix-static-build.patch new file mode 100644 index 00000000000000..4bd21794cfc7b8 --- /dev/null +++ b/ports/cgicc/fix-static-build.patch @@ -0,0 +1,15 @@ +diff --git a/cgicc/CgiDefs.h.in b/cgicc/CgiDefs.h.in +index 71b70ad..3793cd8 100644 +--- a/cgicc/CgiDefs.h.in ++++ b/cgicc/CgiDefs.h.in +@@ -47,7 +47,9 @@ + #ifdef WIN32 + + // export library symbols +-# ifdef CGICC_EXPORTS ++# ifdef CGICC_STATIC ++# define CGICC_API ++# elif defined(CGICC_EXPORTS) + # define CGICC_API __declspec(dllexport) + # else + # define CGICC_API __declspec(dllimport) diff --git a/ports/cgicc/portfile.cmake b/ports/cgicc/portfile.cmake index 24447e884acb84..0be8d18258a31d 100644 --- a/ports/cgicc/portfile.cmake +++ b/ports/cgicc/portfile.cmake @@ -1,25 +1,41 @@ - -include(vcpkg_common_functions) +set(CGICC_VERSION 3.2.19) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cgicc-3.2.19) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnu.org/gnu/cgicc/cgicc-3.2.19.tar.gz" - FILENAME "cgicc-3.2.19.tar.gz" + URLS "https://ftp.gnu.org/gnu/cgicc/cgicc-${CGICC_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/cgicc/cgicc-${CGICC_VERSION}.tar.gz" + FILENAME "cgicc-${CGICC_VERSION}.tar.gz" SHA512 c361923cf3ac876bc3fc94dffd040d2be7cd44751d8534f4cfa3545e9f58a8ec35ebcd902a8ce6a19da0efe52db67506d8b02e5cc868188d187ce3092519abdf ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + fix-define.patch + fix-static-build.patch +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING.DOC DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgicc RENAME copyright) + +file(READ ${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h CGI_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "# ifdef CGICC_STATIC" "# if 0" CGI_H "${CGI_H}") +else() + string(REPLACE "# ifdef CGICC_STATIC" "# if 1" CGI_H "${CGI_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h "${CGI_H}") + + +file(INSTALL ${SOURCE_PATH}/COPYING.DOC DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cgicc/vcpkg.json b/ports/cgicc/vcpkg.json new file mode 100644 index 00000000000000..5d3b9b146aa632 --- /dev/null +++ b/ports/cgicc/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cgicc", + "version-string": "3.2.19", + "port-version": 5, + "description": "GNU Cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web", + "homepage": "https://www.gnu.org/software/cgicc/" +} diff --git a/ports/cgl/CMakeLists.txt b/ports/cgl/CMakeLists.txt new file mode 100644 index 00000000000000..ce859f1929517d --- /dev/null +++ b/ports/cgl/CMakeLists.txt @@ -0,0 +1,125 @@ +cmake_minimum_required(VERSION 3.11) + +project(Cgl LANGUAGES C CXX) + +set(PROJECT_VERSION 0.60.2) +set(PROJECT_VERSION_MAJOR 0) +set(PROJECT_VERSION_MINOR 60) +set(PROJECT_VERSION_PATCH 2) + +set(CMAKE_CXX_STANDARD 14) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/cgl" CACHE PATH "Path where cmake configs will be installed") + +# Make relative paths absolute (needed later on) +set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) +foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) + if(NOT IS_ABSOLUTE "${${var}}") + set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + endif() +endforeach() + +find_package(CoinUtils REQUIRED) +find_package(Osi REQUIRED) +find_package(Clp REQUIRED) + +file(GLOB CGL_SOURCES + Cgl/src/CglConfig.h + Cgl/src/*.hpp + Cgl/src/*.cpp + Cgl/src/CglAllDifferent/*.cpp + Cgl/src/CglAllDifferent/*.hpp + Cgl/src/CglBKClique/*.cpp + Cgl/src/CglBKClique/*.hpp + Cgl/src/CglClique/*.cpp + Cgl/src/CglClique/*.hpp + Cgl/src/CglCliqueMerging/*.cpp + Cgl/src/CglCliqueMerging/*.hpp + Cgl/src/CglDuplicateRow/*.cpp + Cgl/src/CglDuplicateRow/*.hpp + Cgl/src/CglFlowCover/*.cpp + Cgl/src/CglFlowCover/*.hpp + Cgl/src/CglGMI/*.cpp + Cgl/src/CglGMI/*.hpp + Cgl/src/CglGomory/*.cpp + Cgl/src/CglGomory/*.hpp + Cgl/src/CglKnapsackCover/*.cpp + Cgl/src/CglKnapsackCover/*.hpp + Cgl/src/CglLandP/*.cpp + Cgl/src/CglLandP/*.hpp + Cgl/src/CglLiftAndProject/*.cpp + Cgl/src/CglLiftAndProject/*.hpp + Cgl/src/CglMixedIntegerRounding/*.cpp + Cgl/src/CglMixedIntegerRounding/*.hpp + Cgl/src/CglMixedIntegerRounding2/*.cpp + Cgl/src/CglMixedIntegerRounding2/*.hpp + Cgl/src/CglOddHole/*.cpp + Cgl/src/CglOddHole/*.hpp + Cgl/src/CglOddHoleWC/*.cpp + Cgl/src/CglOddHoleWC/*.hpp + Cgl/src/CglPreProcess/*.cpp + Cgl/src/CglPreProcess/*.hpp + Cgl/src/CglProbing/*.cpp + Cgl/src/CglProbing/*.hpp + Cgl/src/CglRedSplit/*.cpp + Cgl/src/CglRedSplit/*.hpp + Cgl/src/CglRedSplit2/*.cpp + Cgl/src/CglRedSplit2/*.hpp + Cgl/src/CglResidualCapacity/*.cpp + Cgl/src/CglResidualCapacity/*.hpp + Cgl/src/CglSimpleRounding/*.cpp + Cgl/src/CglSimpleRounding/*.hpp + Cgl/src/CglTwomir/*.cpp + Cgl/src/CglTwomir/*.hpp + Cgl/src/CglZeroHalf/*.cpp + Cgl/src/CglZeroHalf/*.hpp) + +add_library(${PROJECT_NAME} ${CGL_SOURCES}) + +target_include_directories(${PROJECT_NAME} + PUBLIC + $ + $) + +target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH) +target_compile_definitions(${PROJECT_NAME} PUBLIC COIN_HAS_CLP) + +target_link_libraries(${PROJECT_NAME} PRIVATE Coin::CoinUtils Coin::Osi Coin::Clp) + +install(DIRECTORY Cgl/src/ + DESTINATION ${INSTALL_INCLUDE_DIR} + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hpp" + PATTERN "config_default.h" EXCLUDE) + +install(TARGETS ${PROJECT_NAME} + EXPORT "${PROJECT_NAME}Targets" + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin) + +include(CMakePackageConfigHelpers) + +set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake") +set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake") +set(namespace "Coin::") + +write_basic_package_version_file("${version_config}" + COMPATIBILITY SameMajorVersion) + +configure_package_config_file("Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION + "${INSTALL_CMAKE_DIR}") + +install(FILES "${project_config}" "${version_config}" + DESTINATION "${INSTALL_CMAKE_DIR}") + +install(EXPORT "${PROJECT_NAME}Targets" + NAMESPACE "${namespace}" + DESTINATION "${INSTALL_CMAKE_DIR}") \ No newline at end of file diff --git a/ports/cgl/Config.cmake.in b/ports/cgl/Config.cmake.in new file mode 100644 index 00000000000000..a9af95692a4563 --- /dev/null +++ b/ports/cgl/Config.cmake.in @@ -0,0 +1,5 @@ + +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") \ No newline at end of file diff --git a/ports/cgl/fix-c1083-error.patch b/ports/cgl/fix-c1083-error.patch new file mode 100644 index 00000000000000..bc5b62a002a88e --- /dev/null +++ b/ports/cgl/fix-c1083-error.patch @@ -0,0 +1,30 @@ +diff --git a/Cgl/src/CglLandP/CglLandP.cpp b/Cgl/src/CglLandP/CglLandP.cpp +index 2676790..af90a6e 100644 +--- a/Cgl/src/CglLandP/CglLandP.cpp ++++ b/Cgl/src/CglLandP/CglLandP.cpp +@@ -22,7 +22,7 @@ + #define CLONE_SI //Solver is cloned between two cuts + + #include "CoinTime.hpp" +-#include "CglGomory.hpp" ++#include "CglGomory/CglGomory.hpp" + #include "CoinFactorization.hpp" + #include + namespace LAP +diff --git a/Cgl/src/CglPreProcess/CglPreProcess.cpp b/Cgl/src/CglPreProcess/CglPreProcess.cpp +index 17cf372..8cb738f 100644 +--- a/Cgl/src/CglPreProcess/CglPreProcess.cpp ++++ b/Cgl/src/CglPreProcess/CglPreProcess.cpp +@@ -24,9 +24,9 @@ + #include "CoinHelperFunctions.hpp" + #include "CoinWarmStartBasis.hpp" + +-#include "CglProbing.hpp" +-#include "CglDuplicateRow.hpp" +-#include "CglClique.hpp" ++#include "CglProbing/CglProbing.hpp" ++#include "CglDuplicateRow/CglDuplicateRow.hpp" ++#include "CglClique/CglClique.hpp" + //#define PRINT_DEBUG 1 + //#define COIN_DEVELOP 1 + #ifdef COIN_DEVELOP diff --git a/ports/cgl/portfile.cmake b/ports/cgl/portfile.cmake new file mode 100644 index 00000000000000..97583b09701940 --- /dev/null +++ b/ports/cgl/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO coin-or/Cgl + REF 31797b2997219934db02a40d501c4b6d8efa7398 # 0.60.3 + SHA512 33e01acdfd2057541492f4e83c0554ed74489995c47cef0b954529d4603090d03457fdababb331132b3fd286c985e46a3c8e3abbdb2eed36e7eaa8102acd095e + PATCHES fix-c1083-error.patch +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/cgl/vcpkg.json b/ports/cgl/vcpkg.json new file mode 100644 index 00000000000000..7b72af7618fbfa --- /dev/null +++ b/ports/cgl/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "cgl", + "version": "0.60.3", + "description": "The COIN-OR Cut Generation Library (Cgl) is a collection of cut generators that can be used with other COIN-OR packages that make use of cuts, such as, among others, the linear solver Clp or the mixed integer linear programming solvers Cbc or BCP.", + "homepage": "https://github.com/coin-or/Cgl", + "dependencies": [ + "clp", + "coinutils", + "osi", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/cgltf/CONTROL b/ports/cgltf/CONTROL deleted file mode 100644 index 4967e5715c5a24..00000000000000 --- a/ports/cgltf/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cgltf -Version: 2019-04-30 -Description: Single-file glTF 2.0 parser written in C99 diff --git a/ports/cgltf/portfile.cmake b/ports/cgltf/portfile.cmake index 2d1569196dff35..54b8dade60c78a 100644 --- a/ports/cgltf/portfile.cmake +++ b/ports/cgltf/portfile.cmake @@ -1,16 +1,15 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jkuhlmann/cgltf - REF 093ef81bf63ec18ba6d9f61073da8881fb7619b3 - SHA512 8801c13ee98780e845c7d28b27d523af86ab2a49499bbb235ee67a91dfacda3c7fddc9503d91918001a432267f890e82c2204a9c1462c64467034d334b0eadf2 + REF 1bdc84d3bb81fa69bcf71ed5cafe63e58df1448a #v1.10 + SHA512 d7f06912a2654633e6d596805e09dbb315453837d066189091c78f7eb837a2caff1768d79f15e8b0536105ffeb67a46e7093e2d6b61091301754f4722c494ada HEAD_REF master ) -file(COPY ${SOURCE_PATH}/cgltf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY "${SOURCE_PATH}/cgltf.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") +file(COPY "${SOURCE_PATH}/cgltf_write.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) \ No newline at end of file diff --git a/ports/cgltf/vcpkg.json b/ports/cgltf/vcpkg.json new file mode 100644 index 00000000000000..aa9ebec52890df --- /dev/null +++ b/ports/cgltf/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "cgltf", + "version": "1.10", + "description": "Single-file glTF 2.0 loader and writer written in C99", + "homepage": "https://github.com/jkuhlmann/cgltf" +} diff --git a/ports/cgns/cgnsconfig.h b/ports/cgns/cgnsconfig.h new file mode 100644 index 00000000000000..7ebe18ac5ee9c8 --- /dev/null +++ b/ports/cgns/cgnsconfig.h @@ -0,0 +1,6 @@ +#ifndef CGNSCONFIG_H +#define CGNSCONFIG_H + +#include "cgnstypes.h" + +#endif \ No newline at end of file diff --git a/ports/cgns/hdf5.patch b/ports/cgns/hdf5.patch new file mode 100644 index 00000000000000..67d08fa2d88b2d --- /dev/null +++ b/ports/cgns/hdf5.patch @@ -0,0 +1,88 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d871a9dc8..d2c631023 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -232,46 +232,12 @@ if (CGNS_ENABLE_HDF5) + cmake_policy(SET CMP0074 NEW) + endif() + +- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) +- message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") +- if (HDF5_FOUND) +- if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) +- set (FIND_HDF_COMPONENTS C) +- +- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) +- message (STATUS "HDF5 libs:${HDF5_FOUND} C:${HDF5_C_FOUND}") +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) +- if (HDF5_BUILD_SHARED_LIBS) +- add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) +- else (HDF5_BUILD_SHARED_LIBS) +- add_definitions (-DH5_BUILT_AS_STATIC_LIB) +- endif (HDF5_BUILD_SHARED_LIBS) +- else (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) +- if (CGNS_BUILD_SHARED AND HDF5_shared_C_FOUND) +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) +- else (CGNS_BUILD_SHARED AND HDF5_shared_C_FOUND) +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) +- endif (CGNS_BUILD_SHARED AND HDF5_shared_C_FOUND) +- endif (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) +- +- else (HDF5_FOUND) +- find_package (HDF5) # Legacy find +- +- #Legacy find_package does not set HDF5_TOOLS_DIR, so we set it here +- set(HDF5_TOOLS_DIR ${HDF5_LIBRARY}/../bin) +- +- #Legacy find_package does not set HDF5_BUILD_SHARED_LIBS, so we set it here +- if (CGNS_BUILD_SHARED AND EXISTS "${HDF5_LIBRARY}/libhdf5${CMAKE_SHARED_LIBRARY_SUFFIX}") +- set (HDF5_BUILD_SHARED_LIBS 1) +- add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) +- else () +- set (HDF5_BUILD_SHARED_LIBS 0) +- add_definitions (-DH5_BUILT_AS_STATIC_LIB) +- endif () +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) +- +- endif (HDF5_FOUND) +- set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) ++ find_package (HDF5 CONFIG REQUIRED) ++ if (TARGET hdf5::hdf5-shared) ++ set (LINK_LIBS ${LINK_LIBS} hdf5::hdf5-shared) ++ else () ++ set (LINK_LIBS ${LINK_LIBS} hdf5::hdf5-static) ++ endif () + + if (HDF5_FOUND) + if (NOT DEFINED HDF5_INCLUDE_DIRS) +@@ -289,20 +255,10 @@ if (CGNS_ENABLE_HDF5) + endif (HDF5_FOUND) + + set(HDF5_NEED_ZLIB "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?") +- if(HDF5_NEED_ZLIB) +- find_library(ZLIB_LIBRARY z) +- mark_as_advanced(CLEAR ZLIB_LIBRARY) +- else (HDF5_NEED_ZLIB) +- mark_as_advanced(FORCE ZLIB_LIBRARY) +- endif(HDF5_NEED_ZLIB) ++ set(HDF5_NEED_ZLIB ${HDF5_ENABLE_Z_LIB_SUPPORT} CACHE INTERNAL "" FORCE) + + set(HDF5_NEED_SZIP "OFF" CACHE BOOL "Does the HDF5 library require linking to szip?") +- if (HDF5_NEED_SZIP) +- find_library(SZIP_LIBRARY szip) +- mark_as_advanced(CLEAR SZIP_LIBRARY) +- else (HDF5_NEED_SZIP) +- mark_as_advanced(FORCE SZIP_LIBRARY) +- endif (HDF5_NEED_SZIP) ++ set(HDF5_NEED_SZIP ${HDF5_ENABLE_SZIP_SUPPORT} CACHE INTERNAL "" FORCE) + + # Check if HDF5 version is 1.8 or greater + if (HDF5_VERSION VERSION_LESS "1.8.0") +@@ -310,6 +266,7 @@ if (CGNS_ENABLE_HDF5) + endif (HDF5_VERSION VERSION_LESS "1.8.0") + + set(HDF5_NEED_MPI "OFF" CACHE BOOL "Does the HDF5 library require linking to mpi? (Only true if using parallel HDF5)") ++ set(HDF5_NEED_MPI ${HDF5_ENABLE_PARALLEL} CACHE INTERNAL "" FORCE) + set(MPI_INC) + set(MPI_LIBS) + if (HDF5_NEED_MPI) diff --git a/ports/cgns/linux_lfs.patch b/ports/cgns/linux_lfs.patch new file mode 100644 index 00000000000000..3ccda64e27a304 --- /dev/null +++ b/ports/cgns/linux_lfs.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 46446da8a..a3d8cd98f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -82,6 +82,7 @@ if (CGNS_ENABLE_LFS) + else (WIN32) + check_symbol_exists(open64 "sys/types.h;sys/stat.h;unistd.h" HAVE_OPEN64) + check_symbol_exists(lseek64 "sys/types.h;unistd.h" HAVE_LSEEK64) ++ add_definitions(-D_FILE_OFFSET_BITS=64 -D__LARGEFILE64_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) + endif (WIN32) + if (HAVE_OPEN64) + add_definitions(-DHAVE_OPEN64) diff --git a/ports/cgns/portfile.cmake b/ports/cgns/portfile.cmake new file mode 100644 index 00000000000000..bb75a9485ceae7 --- /dev/null +++ b/ports/cgns/portfile.cmake @@ -0,0 +1,82 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CGNS/CGNS + REF 86b686bce292eef7782cfb56b6acdb5123c96f49 # v4.2.0 + SHA512 88df741acc1b650724bcbeb82ab0f7e593bf01e0a30c04b14b9915f4ea4331725cc24b87715dd08d93d5a3708660ca7f7874bc0a9c5505b76471802cf033e35d + HEAD_REF develop + PATCHES + hdf5.patch + linux_lfs.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + fortran CGNS_ENABLE_FORTRAN + tests CGNS_ENABLE_TESTS + hdf5 CGNS_ENABLE_HDF5 + lfs CGNS_ENABLE_LFS + legacy CGNS_ENABLE_LEGACY +) + +if(VCPKG_TARGET_ARCHITECTURE MATCHES "64") + list(APPEND CGNS_BUILD_OPTS "-DCGNS_ENABLE_64BIT=ON") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=ON;-DCGNS_USE_SHARED=ON") +else() + list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=OFF;-DCGNS_USE_SHARED=OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${FEATURE_OPTIONS} + ${CGNS_BUILD_OPTS} +) + +vcpkg_install_cmake() + +file(INSTALL ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/include/cgnsconfig.h) + +file(INSTALL ${CURRENT_PORT_DIR}/cgnsconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) # the include is all that is needed + +set(TOOLS cgnscheck cgnscompress cgnsconvert cgnsdiff cgnslist cgnsnames) + +foreach(tool ${TOOLS}) + set(suffix ${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + endif() +endforeach() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +IF(EXISTS ${CURRENT_PACKAGES_DIR}/debug) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/debug/include/cgnsconfig.h) +endif() + +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/include/cgnsconfig.h) +file(GLOB_RECURSE BATCH_FILES ${CURRENT_PACKAGES_DIR}/bin/*.bat) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# # Moves all .cmake files from /debug/share/cgns/ to /share/cgns/ +# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details +# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/cgns) + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cgns/vcpkg.json b/ports/cgns/vcpkg.json new file mode 100644 index 00000000000000..c738b9a3b6d904 --- /dev/null +++ b/ports/cgns/vcpkg.json @@ -0,0 +1,64 @@ +{ + "name": "cgns", + "version-semver": "4.2.0", + "description": "The CFD General Notation System (CGNS) provides a standard for recording and recovering computer data associated with the numerical solution of fluid dynamics equations.", + "homepage": "http://cgns.org/", + "default-features": [ + "hdf5", + "lfsselector" + ], + "features": { + "fortran": { + "description": "Enable fortran support (not yet implemented)" + }, + "hdf5": { + "description": "Enable hdf5 support", + "dependencies": [ + { + "name": "hdf5", + "default-features": false, + "features": [ + "tools" + ] + } + ] + }, + "legacy": { + "description": "Enable legacy support" + }, + "lfs": { + "description": "Enable LFS support" + }, + "lfsselector": { + "description": "Selector for LFS", + "dependencies": [ + { + "name": "cgns", + "default-features": false, + "features": [ + "lfs" + ], + "platform": "!osx" + } + ] + }, + "mpi": { + "description": "Enable MPI support", + "dependencies": [ + { + "name": "hdf5", + "default-features": false, + "features": [ + "parallel" + ] + } + ] + }, + "tests": { + "description": "Build tests" + }, + "tools": { + "description": "Build tools" + } + } +} diff --git a/ports/chaiscript/CONTROL b/ports/chaiscript/CONTROL deleted file mode 100644 index fd55e973eb9a12..00000000000000 --- a/ports/chaiscript/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: chaiscript -Version: 6.1.0 -Homepage: https://github.com/ChaiScript/ChaiScript -Description: Embedded Scripting Language Designed for C++ diff --git a/ports/chaiscript/portfile.cmake b/ports/chaiscript/portfile.cmake index a3611b0e18dbb6..6ee7170e575cf3 100644 --- a/ports/chaiscript/portfile.cmake +++ b/ports/chaiscript/portfile.cmake @@ -1,16 +1,3 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ChaiScript/ChaiScript @@ -21,5 +8,4 @@ vcpkg_from_github( file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/chaiscript RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/chaiscript/vcpkg.json b/ports/chaiscript/vcpkg.json new file mode 100644 index 00000000000000..e4362e804165b2 --- /dev/null +++ b/ports/chaiscript/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "chaiscript", + "version-string": "6.1.0", + "port-version": 2, + "description": "Embedded Scripting Language Designed for C++", + "homepage": "https://github.com/ChaiScript/ChaiScript" +} diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL deleted file mode 100644 index 0f496998ee5d30..00000000000000 --- a/ports/chakracore/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: chakracore -Version: 1.11.12 -Homepage: https://github.com/Microsoft/ChakraCore -Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/fix-debug-linux-build.patch b/ports/chakracore/fix-debug-linux-build.patch new file mode 100644 index 00000000000000..10c1ca5e7e947e --- /dev/null +++ b/ports/chakracore/fix-debug-linux-build.patch @@ -0,0 +1,13 @@ +diff --git a/lib/Common/Memory/RecyclerObjectGraphDumper.cpp b/lib/Common/Memory/RecyclerObjectGraphDumper.cpp +index 0885df3fb..12bdfb96e 100644 +--- a/lib/Common/Memory/RecyclerObjectGraphDumper.cpp ++++ b/lib/Common/Memory/RecyclerObjectGraphDumper.cpp +@@ -58,7 +58,7 @@ void RecyclerObjectGraphDumper::BeginDumpObject(void * objectAddress) + { + Assert(false); + this->dumpObjectTypeInfo = nullptr; +- this->dumpObjectIsArray = nullptr; ++ this->dumpObjectIsArray = 0; + } + } + #endif diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index 924bc1e91e73da..62277ecebe3f95 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -1,76 +1,150 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "UWP is not currently supported.") -endif() - -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/ChakraCore - REF v1.11.12 - SHA512 6ff8b8fa379bd290d547ca9900c5aca47b6148f0112e58c11ab757fb2a9080119be59611fb5cb73fabae99802e8df2da35d7b8f1c351a32b452444d090d3b069 - HEAD_REF master -) - -find_path(COR_H_PATH cor.h) -if(COR_H_PATH MATCHES "NOTFOUND") - message(FATAL_ERROR "Could not find . Ensure the NETFXSDK is installed.") -endif() -get_filename_component(NETFXSDK_PATH "${COR_H_PATH}/../.." ABSOLUTE) - -set(BUILDTREE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -file(REMOVE_RECURSE ${BUILDTREE_PATH}) -file(COPY ${SOURCE_PATH}/ DESTINATION ${BUILDTREE_PATH}) - -set(CHAKRA_RUNTIME_LIB "static_library") # ChakraCore only supports static CRT linkage - -vcpkg_build_msbuild( - PROJECT_PATH ${BUILDTREE_PATH}/Build/Chakra.Core.sln - OPTIONS - "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" - "/p:CustomBeforeMicrosoftCommonTargets=${CMAKE_CURRENT_LIST_DIR}/no-warning-as-error.props" - "/p:RuntimeLib=${CHAKRA_RUNTIME_LIB}" -) - -file(INSTALL - ${BUILDTREE_PATH}/lib/jsrt/ChakraCore.h - ${BUILDTREE_PATH}/lib/jsrt/ChakraCommon.h - ${BUILDTREE_PATH}/lib/jsrt/ChakraCommonWindows.h - ${BUILDTREE_PATH}/lib/jsrt/ChakraDebug.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) - file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/chakracore) -endif() - -vcpkg_copy_pdbs() -file(INSTALL - ${SOURCE_PATH}/LICENSE.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/ChakraCore RENAME copyright) +vcpkg_fail_port_install(ON_TARGET osx uwp) +if(WIN32) + vcpkg_fail_port_install(ON_CRT_LINKAGE static ON_LIBRARY_LINKAGE static) +endif() +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/ChakraCore + REF 385409ee4b634b860e090606a28acbc99f4d2567 + SHA512 ef47db988c4ddd77fa87f4c5e1ac91d9f6b31b35aa6934d8b2863ee1274776d90a2b85dbad51eef069c96777d3cd7729349b89f23eda8c61b4cb637150bead71 + HEAD_REF master + PATCHES + fix-debug-linux-build.patch +) + +if(WIN32) + find_path(COR_H_PATH cor.h) + if(COR_H_PATH MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find . Ensure the NETFXSDK is installed.") + endif() + get_filename_component(NETFXSDK_PATH "${COR_H_PATH}/../.." ABSOLUTE) +endif() + +set(BUILDTREE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(REMOVE_RECURSE ${BUILDTREE_PATH}) +file(COPY ${SOURCE_PATH}/ DESTINATION ${BUILDTREE_PATH}) + +if(WIN32) + set(CHAKRA_RUNTIME_LIB "static_library") # ChakraCore only supports static CRT linkage + vcpkg_build_msbuild( + PROJECT_PATH "${BUILDTREE_PATH}/Build/Chakra.Core.sln" + OPTIONS + "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" + "/p:CustomBeforeMicrosoftCommonTargets=${CMAKE_CURRENT_LIST_DIR}/no-warning-as-error.props" + "/p:RuntimeLib=${CHAKRA_RUNTIME_LIB}" + ) +else() + if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(CHAKRACORE_TARGET_ARCH amd64) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(CHAKRACORE_TARGET_ARCH x86) + endif() + + if (VCPKG_TARGET_IS_LINUX) + message(WARNING "${PORT} requires Clang from the system package manager, this can be installed on Ubuntu systems via sudo apt install clang") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND configs "debug") + execute_process( + COMMAND bash "build.sh" "--arch=${CHAKRACORE_TARGET_ARCH}" "--debug" + WORKING_DIRECTORY "${BUILDTREE_PATH}" + + OUTPUT_VARIABLE CHAKRA_BUILD_SH_OUT + ERROR_VARIABLE CHAKRA_BUILD_SH_ERR + RESULT_VARIABLE CHAKRA_BUILD_SH_RES + ECHO_OUTPUT_VARIABLE + ECHO_ERROR_VARIABLE + ) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + list(APPEND configs "release") + execute_process( + COMMAND bash "build.sh" "--arch=${CHAKRACORE_TARGET_ARCH}" + WORKING_DIRECTORY "${BUILDTREE_PATH}" + OUTPUT_VARIABLE CHAKRA_BUILD_SH_OUT + ERROR_VARIABLE CHAKRA_BUILD_SH_ERR + RESULT_VARIABLE CHAKRA_BUILD_SH_RES + ECHO_OUTPUT_VARIABLE + ECHO_ERROR_VARIABLE + ) + endif() +endif() + +file(INSTALL + "${BUILDTREE_PATH}/lib/Jsrt/ChakraCore.h" + "${BUILDTREE_PATH}/lib/Jsrt/ChakraCommon.h" + "${BUILDTREE_PATH}/lib/Jsrt/ChakraDebug.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" +) +if(WIN32) + file(INSTALL + "${BUILDTREE_PATH}/lib/Jsrt/ChakraCommonWindows.h" + "${BUILDTREE_PATH}/lib/Jsrt/ChakraCoreWindows.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" + ) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL + "${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll" + "${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb" + DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" + ) + file(INSTALL + "${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib" + DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" + ) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL + "${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll" + "${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb" + DESTINATION "${CURRENT_PACKAGES_DIR}/bin" + ) + file(INSTALL + "${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib" + DESTINATION "${CURRENT_PACKAGES_DIR}/lib" + ) + file(INSTALL + "${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe" + "${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe" + "${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/chakracore" + ) + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/chakracore") + endif() +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(out_file libChakraCore.so) + else() + set(out_file lib/libChakraCoreStatic.a) + endif() + + set(destination_dir_debug "${CURRENT_PACKAGES_DIR}/debug/bin") + set(destination_dir_release "${CURRENT_PACKAGES_DIR}/bin") + set(out_dir_debug "${BUILDTREE_PATH}/out/Debug") + set(out_dir_release "${BUILDTREE_PATH}/out/Release") + foreach(config ${configs}) + file(INSTALL + ${out_dir_${config}}/${out_file} + DESTINATION ${destination_dir_${config}} + ) + endforeach() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL + "${out_dir_release}/ch" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/chakracore" + ) + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/chakracore") + endif() +endif() + +vcpkg_copy_pdbs() + +file(INSTALL + "${SOURCE_PATH}/LICENSE.txt" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/chakracore" + RENAME copyright +) diff --git a/ports/chakracore/vcpkg.json b/ports/chakracore/vcpkg.json new file mode 100644 index 00000000000000..316fefa0a97c7b --- /dev/null +++ b/ports/chakracore/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "chakracore", + "version-string": "2021-04-22", + "description": "Core part of the Chakra Javascript engine", + "homepage": "https://github.com/Microsoft/ChakraCore", + "supports": "!osx & !uwp & (linux | !static)" +} diff --git a/ports/charls/0001_cmake.patch b/ports/charls/0001_cmake.patch deleted file mode 100644 index 7f50a98e60298a..00000000000000 --- a/ports/charls/0001_cmake.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1aa40a8..1051997 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -33,6 +33,7 @@ option (BUILD_TESTING "Build tests" ON) - if (WIN32) - if (BUILD_SHARED_LIBS) - add_definitions(-D CHARLS_DLL) -+ set_source_files_properties(src/interface.cpp PROPERTIES COMPILE_FLAGS -DCHARLS_DLL_BUILD) - else() - add_definitions(-D CHARLS_STATIC) - endif() diff --git a/ports/charls/CONTROL b/ports/charls/CONTROL deleted file mode 100644 index e8fabbf2286938..00000000000000 --- a/ports/charls/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: charls -Version: 2.0.0-2 -Homepage: https://github.com/team-charls/charls -Description: CharLS, a C++ JPEG-LS library implementation. diff --git a/ports/charls/portfile.cmake b/ports/charls/portfile.cmake index 0f622c7e31369f..436d11a8e06f88 100644 --- a/ports/charls/portfile.cmake +++ b/ports/charls/portfile.cmake @@ -1,28 +1,24 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/charls-2.0.0) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/team-charls/charls/archive/2.0.0.tar.gz" - FILENAME "charls-2.0.0.tar.gz" - SHA512 0a2862fad6d65b941c81f5f838db1fdc6a4625887281ddbf27e21be9084f607d27c8a27d246d6252e08358b2ed4aa0c2b7407048ca559fb40e94313ca72487dd -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO team-charls/charls + REF 0bafe4ecdc591f633303ad0d32f3f6c38d099802 #v2.2.0 + SHA512 56acb0085a4f653660166c11982934d7f8c8836db63339aaca700aabade2bf7cff8cba77f9f04a68bbc119b5b15800bf01ffb10628703fb2188f6e654d0e5f22 + HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_TESTING=OFF + -DCHARLS_BUILD_TESTS=OFF + -DCHARLS_BUILD_SAMPLES=OFF + -DCHARLS_BUILD_FUZZ_TEST=OFF ) vcpkg_install_cmake() - +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/charls) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/charls RENAME copyright) -vcpkg_copy_pdbs() \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/charls/vcpkg.json b/ports/charls/vcpkg.json new file mode 100644 index 00000000000000..b03c6bcdd25a8b --- /dev/null +++ b/ports/charls/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "charls", + "version-string": "2.2.0", + "port-version": 1, + "description": "CharLS, a C++ JPEG-LS library implementation.", + "homepage": "https://github.com/team-charls/charls" +} diff --git a/ports/chartdir/Config.cmake.in b/ports/chartdir/Config.cmake.in new file mode 100644 index 00000000000000..d943c4a819f6f9 --- /dev/null +++ b/ports/chartdir/Config.cmake.in @@ -0,0 +1,21 @@ + +get_filename_component(_chartdir_root "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_chartdir_root "${_chartdir_root}" PATH) +get_filename_component(_chartdir_root "${_chartdir_root}" PATH) + +set(_chartdir_lib "${_chartdir_root}/lib/@CHARTDIR_LIB@") +if (EXISTS "${_chartdir_lib}") + + add_library(chartdir UNKNOWN IMPORTED) + set_target_properties(chartdir PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_chartdir_root}/include") + set_target_properties(chartdir PROPERTIES IMPORTED_LOCATION "${_chartdir_lib}") + set_property(TARGET chartdir APPEND PROPERTY IMPORTED_CONFIGURATIONS) + +else() + + set(chartdir_FOUND FALSE) + +endif() +unset(_chartdir_lib) + +unset(_chartdir_root) diff --git a/ports/chartdir/chartdir.h b/ports/chartdir/chartdir.h new file mode 100644 index 00000000000000..2fa308a0717e1d --- /dev/null +++ b/ports/chartdir/chartdir.h @@ -0,0 +1,6 @@ +#ifndef __CHARTDIR_H__ +#define __CHARTDIR_H__ + +#include + +#endif // __CHARTDIR_H__ diff --git a/ports/chartdir/portfile.cmake b/ports/chartdir/portfile.cmake new file mode 100644 index 00000000000000..b8447ca8457bf3 --- /dev/null +++ b/ports/chartdir/portfile.cmake @@ -0,0 +1,94 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +if(TRIPLET_SYSTEM_ARCH MATCHES "arm" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR VCPKG_LIBRARY_LINKAGE STREQUAL static) + + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +elseif(VCPKG_TARGET_IS_WINDOWS) + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.advsofteng.net/chartdir_cpp_win.zip" + FILENAME "chartdir_cpp_win-7.0.0.zip" + SHA512 38d9dae641c0341ccee4709138afd37ad4718c34def70a0dc569956bf9c3488d0d66072f604dca4663dc80bd09446a2ba27ef3806fc3b87dda6aaa5453a7316f + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF 7.0.0 + ) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(LIBDIR "${SOURCE_PATH}/lib64") + else() + set(LIBDIR "${SOURCE_PATH}/lib32") + endif() + + file(COPY "${LIBDIR}/chartdir70.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY "${LIBDIR}/chartdir70.lib" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY "${LIBDIR}/chartdir70.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY "${LIBDIR}/chartdir70.lib" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + set(CHARTDIR_LIB "chartdir70.lib") + +elseif(VCPKG_TARGET_IS_OSX) + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://www.advsofteng.net/chartdir_cpp_mac.tar.gz" + FILENAME "chartdir_cpp_mac-7.0.0.tar.gz" + SHA512 3f00a4eb7c6b7fc1ebd4856c287ca9a76ca4ce813b4203350526c7ef10c946baa3768446178b664af8e8222275f10f9ee6f5f87cf1e23f23c4a221f431864744 + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF 7.0.0 + ) + + file(COPY "${SOURCE_PATH}/lib/libchartdir.7.dylib" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY "${SOURCE_PATH}/lib/libchartdir.7.dylib" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + set(CHARTDIR_LIB "libchartdir.7.dylib") + +elseif(VCPKG_TARGET_IS_LINUX) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.advsofteng.net/chartdir_cpp_linux_64.tar.gz" + FILENAME "chartdir_cpp_linux_64-7.0.0.tar.gz" + SHA512 e7e71b64b3a756b6df174758c392ab4c9310b4d265e521dccbd009eeefd46e021a74572e7212de5564725df20ddf189e1599e88a116b426f1256f7d34b0131aa + ) + + else() + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.advsofteng.net/chartdir_cpp_linux.tar.gz" + FILENAME "chartdir_cpp_linux-7.0.0.tar.gz" + SHA512 bf749c9821a901a7071964f22aabb606f90dc853907720a05252165d63d27aa31d10f0aa62995ab92085bb790f3830063fd8042331195b0153a9d49e8a92e871 + ) + + endif() + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF 7.0.0 + ) + + file(COPY "${SOURCE_PATH}/lib/libchartdir.so.7.0.0" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY "${SOURCE_PATH}/lib/libchartdir.so.7.0.0" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + set(CHARTDIR_LIB "libchartdir.so.7.0.0") + + file(COPY ${SOURCE_PATH}/lib/fonts DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +endif() + +file(GLOB HEADERS "${SOURCE_PATH}/include/*.h") +file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/chartdir.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/chartdir-config.cmake @ONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/chartdir/usage b/ports/chartdir/usage new file mode 100644 index 00000000000000..a270b780ec7524 --- /dev/null +++ b/ports/chartdir/usage @@ -0,0 +1,4 @@ +The package chartdir provides CMake targets: + + find_package(chartdir CONFIG REQUIRED) + target_link_libraries(main PRIVATE chartdir) diff --git a/ports/chartdir/vcpkg.json b/ports/chartdir/vcpkg.json new file mode 100644 index 00000000000000..800a311cbbf728 --- /dev/null +++ b/ports/chartdir/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "chartdir", + "version": "7.0.0", + "description": "ChartDirector is a powerful chart component for creating professional looking charts for web and windows applications.", + "homepage": "https://www.advsofteng.com/" +} diff --git a/ports/check/CONTROL b/ports/check/CONTROL deleted file mode 100644 index 8deb787bcd0ac2..00000000000000 --- a/ports/check/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: check -Version: 0.12.0-2 -Description: A unit testing framework for C diff --git a/ports/check/fix-build-debug-mode.patch b/ports/check/fix-build-debug-mode.patch deleted file mode 100644 index edf43006018138..00000000000000 --- a/ports/check/fix-build-debug-mode.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0d66a5d..3b9a72d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -39,10 +39,6 @@ set(CHECK_VERSION - - set(MEMORY_LEAKING_TESTS_ENABLED 1) - --############################################################################### --# Set build features --set(CMAKE_BUILD_TYPE Debug) -- - ############################################################################### - # Option - option(CHECK_ENABLE_TESTS diff --git a/ports/check/fix-lib-path.patch b/ports/check/fix-lib-path.patch new file mode 100644 index 00000000000000..1951c2bfe7c98f --- /dev/null +++ b/ports/check/fix-lib-path.patch @@ -0,0 +1,45 @@ +diff --git a/doc/example/src/CMakeLists.txt b/doc/example/src/CMakeLists.txt +index b5e211e..2a92a1a 100644 +--- a/doc/example/src/CMakeLists.txt ++++ b/doc/example/src/CMakeLists.txt +@@ -18,7 +18,7 @@ target_link_libraries(main money) + + install(TARGETS money + RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ LIBRARY DESTINATION lib/manual-link ++ ARCHIVE DESTINATION lib/manual-link) + + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/money.h DESTINATION include) +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 38cbc53..d8a4272 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -75,5 +75,11 @@ set(HEADERS libcompat.h) + + add_library(compat STATIC ${SOURCES} ${HEADERS}) + ++install(TARGETS compat ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib/manual-link ++ ARCHIVE DESTINATION lib/manual-link ++) ++ + # vim: shiftwidth=2:softtabstop=2:tabstop=2:expandtab:autoindent + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 4a02dbe..ade4cfd 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -191,8 +191,8 @@ if(NOT THIS_IS_SUBPROJECT) + install(TARGETS check checkShared + EXPORT check-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/manual-link ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/manual-link + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + endif() diff --git a/ports/check/portfile.cmake b/ports/check/portfile.cmake index f7561db1998999..b01006cf63990c 100644 --- a/ports/check/portfile.cmake +++ b/ports/check/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libcheck/check - REF 0.12.0 - SHA512 f7b6452b69f999a90e86a8582d980c0c1b74ba5629ee34455724463ba62bfe3501ad0415aa771170f5c638a7a253f123bf87cbef25aadc6569a7a3a4d10fce90 + REF 11970a7e112dfe243a2e68773f014687df2900e8 # 0.15.2 + SHA512 210c9617fa1c1ce16bef983b0e6cb587b1774c3f7ce27a53ca7799642dc7a14be8de567d69dc0e57845684c6f7991d772c73654f63c8755afda3b37a35c7156e HEAD_REF master - PATCHES - fix-build-debug-mode.patch + PATCHES fix-lib-path.patch ) vcpkg_configure_cmake( @@ -16,13 +14,16 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/check.cmake ${CURRENT_PACKAGES_DIR}/cmake/check-config.cmake) -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/check) + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() # cleanup file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/check RENAME copyright) - -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/check/vcpkg.json b/ports/check/vcpkg.json new file mode 100644 index 00000000000000..d94e11b6862262 --- /dev/null +++ b/ports/check/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "check", + "version-string": "0.15.2", + "port-version": 1, + "description": "A unit testing framework for C", + "homepage": "https://github.com/libcheck/check" +} diff --git a/ports/chipmunk/CONTROL b/ports/chipmunk/CONTROL deleted file mode 100644 index 0a4d6a62f59b01..00000000000000 --- a/ports/chipmunk/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: chipmunk -Version: 7.0.2 -Homepage: https://github.com/slembcke/Chipmunk2D -Description: A fast and lightweight 2D game physics library. \ No newline at end of file diff --git a/ports/chipmunk/portfile.cmake b/ports/chipmunk/portfile.cmake index 5b64777676766b..f0f72cd6cb1425 100644 --- a/ports/chipmunk/portfile.cmake +++ b/ports/chipmunk/portfile.cmake @@ -1,75 +1,39 @@ -include(vcpkg_common_functions) - -#architecture detection -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(CHIPMUNK_ARCH Win32) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(CHIPMUNK_ARCH x64) -else() - message(FATAL_ERROR "unsupported architecture") -endif() - -#linking -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(CHIPMUNK_CONFIGURATION_SUFFIX " DLL") -else() - if (VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(CHIPMUNK_CONFIGURATION_SUFFIX "") - else() - set(CHIPMUNK_CONFIGURATION_SUFFIX " SCRT") - endif() -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO slembcke/Chipmunk2D - REF Chipmunk-7.0.2 - SHA512 3a697a73f854b36c53ea99390878094e91a44a0c6a19ebb0cd6726474b9b4f219085944efba4a7ae6faec1def3b9d58a02f159bea15724a7f5235bb645b91dba + REF 87340c216bf97554dc552371bbdecf283f7c540e + SHA512 9094017755e9c140aa5bf8a1b5502077ae4fb2b0a3e12f1114e86d8591a6188f89822ecc578a2b5e95f61c555018f1b3273fe50e833fe2daf30e94b180a3d07c HEAD_REF master ) -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/msvc/vc14/chipmunk/chipmunk.vcxproj - RELEASE_CONFIGURATION "Release${CHIPMUNK_CONFIGURATION_SUFFIX}" - DEBUG_CONFIGURATION "Debug${CHIPMUNK_CONFIGURATION_SUFFIX}" +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_DEMOS=OFF + -DBUILD_SHARED=${KEYSTONE_BUILD_SHARED} + -DBUILD_STATIC=${KEYSTONE_BUILD_STATIC} + -DINSTALL_STATIC=${KEYSTONE_BUILD_STATIC} ) -message(STATUS "Installing") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL - "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Debug${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.dll" - "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Debug${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.dll" - "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) -else() - file(INSTALL - "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) +vcpkg_install_cmake() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +endif() + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) +if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DLLS}) endif() -file(INSTALL - "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Debug${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.lib" - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file(INSTALL - "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.lib" - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) file(INSTALL ${SOURCE_PATH}/include/chipmunk DESTINATION ${CURRENT_PACKAGES_DIR}/include ) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/chipmunk RENAME copyright) - -message(STATUS "Installing done") +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/chipmunk/vcpkg.json b/ports/chipmunk/vcpkg.json new file mode 100644 index 00000000000000..07bda6fcb914a8 --- /dev/null +++ b/ports/chipmunk/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "chipmunk", + "version-string": "7.0.3", + "port-version": 2, + "description": "A fast and lightweight 2D game physics library.", + "homepage": "https://github.com/slembcke/Chipmunk2D" +} diff --git a/ports/chmlib/CONTROL b/ports/chmlib/CONTROL deleted file mode 100644 index cde69a41e714e6..00000000000000 --- a/ports/chmlib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: chmlib -Version: 0.40-3 -Homepage: https://www.jedrea.com/chmlib/ -Description: CHMLIB is a library for dealing with Microsoft ITSS/CHM format files. Right now, it is a very simple library, but sufficient for dealing with all of the .chm files I've come across. Due to the fairly well-designed indexing built into this particular file format, even a small library is able to gain reasonably good performance indexing into ITSS archives. diff --git a/ports/chmlib/portfile.cmake b/ports/chmlib/portfile.cmake index 99313c5cd301d7..32ac77243b491c 100644 --- a/ports/chmlib/portfile.cmake +++ b/ports/chmlib/portfile.cmake @@ -1,11 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(CHMLIB_VERSION chmlib-0.40) set(CHMLIB_FILENAME ${CHMLIB_VERSION}.zip) set(CHMLIB_URL http://www.jedrea.com/chmlib/${CHMLIB_FILENAME}) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${CHMLIB_VERSION}) vcpkg_download_distfile( ARCHIVE @@ -13,7 +10,11 @@ vcpkg_download_distfile( FILENAME ${CHMLIB_FILENAME} SHA512 ad3b0d49fcf99e724c0c38b9c842bae9508d0e4ad47122b0f489c113160f5344223d311abb79f25cbb0b662bb00e2925d338d60dd20a0c309bda2822cda4cd24 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/chmlib/vcpkg.json b/ports/chmlib/vcpkg.json new file mode 100644 index 00000000000000..f3fcf3d84c7e16 --- /dev/null +++ b/ports/chmlib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "chmlib", + "version-string": "0.40", + "port-version": 5, + "description": "CHMLIB is a library for dealing with Microsoft ITSS/CHM format files. Right now, it is a very simple library, but sufficient for dealing with all of the .chm files I've come across. Due to the fairly well-designed indexing built into this particular file format, even a small library is able to gain reasonably good performance indexing into ITSS archives.", + "homepage": "https://www.jedrea.com/chmlib/" +} diff --git a/ports/chromaprint/fix_lrintf_detection.patch b/ports/chromaprint/fix_lrintf_detection.patch new file mode 100644 index 00000000000000..27248f0c802236 --- /dev/null +++ b/ports/chromaprint/fix_lrintf_detection.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3a0eecb..4fa5e8d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,7 @@ set_property(CACHE FFT_LIB PROPERTY STRINGS avfft fftw3 fftw3f kissfft vdsp) + + include(CMakePushCheckState) + include(CheckFunctionExists) ++include(CheckSymbolExists) + include(CheckCXXCompilerFlag) + + find_package(Threads) +@@ -37,8 +38,8 @@ endif() + + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_LIBRARIES -lm) +-check_function_exists(lrintf HAVE_LRINTF) +-check_function_exists(round HAVE_ROUND) ++check_symbol_exists(lrintf math.h HAVE_LRINTF) ++check_symbol_exists(round math.h HAVE_ROUND) + cmake_pop_check_state() + + add_definitions( diff --git a/ports/chromaprint/portfile.cmake b/ports/chromaprint/portfile.cmake new file mode 100644 index 00000000000000..286edaeb38ae4c --- /dev/null +++ b/ports/chromaprint/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO acoustid/chromaprint + REF v1.5.0 + SHA512 333114949928abdf5d4b11aba1db6ec487eebe526324c68d903b3fa80a3af87a28d942af765a2f873e63a1bf222b658b6438cd10cde4446f61b26ea91f537469 + PATCHES + fix_lrintf_detection.patch # submitted upstream as https://github.com/acoustid/chromaprint/pull/85 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/chromaprint/vcpkg.json b/ports/chromaprint/vcpkg.json new file mode 100644 index 00000000000000..271532380431c5 --- /dev/null +++ b/ports/chromaprint/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "chromaprint", + "version": "1.5.0", + "port-version": 1, + "description": "C library for generating audio fingerprints used by AcoustID", + "homepage": "https://github.com/acoustid/chromaprint", + "license": "LGPL-2.1-or-later", + "dependencies": [ + "ffmpeg" + ] +} diff --git a/ports/chromium-base/chromium-baseConfig.cmake.in b/ports/chromium-base/chromium-baseConfig.cmake.in new file mode 100644 index 00000000000000..95ce316c655f04 --- /dev/null +++ b/ports/chromium-base/chromium-baseConfig.cmake.in @@ -0,0 +1,81 @@ +if(TARGET chromium-base) + return() +endif() + +set(DEFINITIONS_DBG @DEFINITIONS_DBG@) +set(DEFINITIONS_REL @DEFINITIONS_DBG@) + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +add_library(chromium-base INTERFACE IMPORTED GLOBAL) +add_library(chromium-base::chromium-base ALIAS chromium-base) + +set(LIBRARIES_ chromium_base chromium_base_static dynamic_annotations double_conversion) + +if(WIN32) + list(APPEND LIBRARIES_ + cfgmgr32 + powrprof + propsys + setupapi + userenv + wbemuuid + winmm + advapi32 + comdlg32 + dbghelp + dnsapi + gdi32 + msimg32 + odbc32 + odbccp32 + oleaut32 + shell32 + shlwapi + user32 + usp10 + uuid + version + wininet + winspool + ws2_32 + delayimp + kernel32 + ole32) +elseif(APPLE) + list(APPEND LIBRARIES_ + ApplicationServices + AppKit + CoreFoundation + IOKit + OpenDirectory + Security + bsm + pmenergy + pmsample) +endif() + +foreach(LIB_NAME ${LIBRARIES_}) + find_library(_LIB NAMES ${LIB_NAME} ${LIB_NAME}.dll) + target_link_libraries(chromium-base INTERFACE ${_LIB}) + unset(_LIB CACHE) +endforeach() + +if(UNIX AND NOT APPLE) + target_link_libraries(chromium-base INTERFACE -ldl -latomic -lpthread) +endif() + +target_include_directories(chromium-base + INTERFACE ${_IMPORT_PREFIX}/include/chromium-base) + +target_compile_definitions(chromium-base INTERFACE + $<$:${DEFINITIONS_DBG}> + $<$:${DEFINITIONS_REL}>) + +target_compile_features(chromium-base INTERFACE cxx_std_14) diff --git a/ports/chromium-base/portfile.cmake b/ports/chromium-base/portfile.cmake new file mode 100644 index 00000000000000..6f6d9728cd6b1b --- /dev/null +++ b/ports/chromium-base/portfile.cmake @@ -0,0 +1,156 @@ +vcpkg_fail_port_install( + ON_ARCH "x86" "arm" "arm64" + ON_TARGET "UWP") + +# Patches may be provided at the end +function(checkout_in_path PATH URL REF) + if(EXISTS "${PATH}") + file(GLOB FILES "${PATH}") + list(LENGTH FILES COUNT) + if(COUNT GREATER 0) + return() + endif() + file(REMOVE_RECURSE "${PATH}") + endif() + + vcpkg_from_git( + OUT_SOURCE_PATH DEP_SOURCE_PATH + URL "${URL}" + REF "${REF}" + PATCHES "${ARGN}" + ) + file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") + file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") +endfunction() + +# Commits are based on https://chromium.googlesource.com/chromium/src/+/refs/tags/86.0.4199.1 +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/25ce732") +file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party") + +set(CHROMIUM_GIT "https://chromium.googlesource.com/chromium/src") +checkout_in_path( + "${SOURCE_PATH}/base" + "${CHROMIUM_GIT}/base" + "25ce73258703a5ac018da0e203fb3d4a98c2136e" + res/0001-base.patch) +checkout_in_path( + "${SOURCE_PATH}/build" + "${CHROMIUM_GIT}/build" + "312532ee66abdacbe58afb5df7ddf05e3a6399f9" + res/0002-build.patch) +checkout_in_path( + "${SOURCE_PATH}/third_party/apple_apsl" + "${CHROMIUM_GIT}/third_party/apple_apsl" + "4cc25bbf65194f6726f7f10da0a885818e35d53e") +checkout_in_path( + "${SOURCE_PATH}/third_party/ced" + "${CHROMIUM_GIT}/third_party/ced" + "4cd87a44674edd9fe1f01c4cb5f1b73907ce4236") +checkout_in_path( + "${SOURCE_PATH}/third_party/modp_b64" + "${CHROMIUM_GIT}/third_party/modp_b64" + "509f005fa65e652dc4a6f636da6fa1002b6dce16") + +set(RES "${CMAKE_CURRENT_LIST_DIR}/res") +file(COPY "${RES}/.gn" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/BUILD.gn" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/build_overrides" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/testing" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/tools" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/gclient_args.gni" DESTINATION "${SOURCE_PATH}/build/config") +file(COPY "${RES}/LASTCHANGE.committime" DESTINATION "${SOURCE_PATH}/build/util") +file(COPY "${RES}/icu" DESTINATION "${SOURCE_PATH}/third_party") +file(COPY "${RES}/libxml" DESTINATION "${SOURCE_PATH}/third_party") +file(COPY "${RES}/protobuf" DESTINATION "${SOURCE_PATH}/third_party") +file(COPY "${RES}/fontconfig" DESTINATION "${SOURCE_PATH}/third_party") +file(COPY "${RES}/test_fonts" DESTINATION "${SOURCE_PATH}/third_party") + +set(OPTIONS "\ + use_custom_libcxx=false \ + clang_use_chrome_plugins=false \ + forbid_non_component_debug_builds=false \ + treat_warnings_as_errors=false") +set(DEFINITIONS "") + +if(WIN32) + # Windows 10 SDK >= (10.0.19041.0) is required + # https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk + SET(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled) + set(ENV{DEPOT_TOOLS_WIN_TOOLCHAIN} 0) + set(OPTIONS "${OPTIONS} use_lld=false") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux) + set(OPTIONS "${OPTIONS} use_allocator=\"none\" use_sysroot=false use_glib=false") +endif() + +# Find the directory that contains "bin/clang" +# Note: Only clang-cl is supported on Windows, see https://crbug.com/988071 +vcpkg_find_acquire_program(CLANG) +if(CLANG MATCHES "-NOTFOUND") + message(FATAL_ERROR "Clang is required.") +endif() +get_filename_component(CLANG "${CLANG}" DIRECTORY) +get_filename_component(CLANG "${CLANG}" DIRECTORY) +if((WIN32 AND NOT EXISTS "${CLANG}/bin/clang-cl.exe") OR + (APPLE AND NOT EXISTS "${CLANG}/bin/clang")) + message(FATAL_ERROR "Clang needs to be inside a bin directory.") +endif() +set(OPTIONS "${OPTIONS} clang_base_path=\"${CLANG}\"") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS "${OPTIONS} is_component_build=true") + list(APPEND DEFINITIONS COMPONENT_BUILD) +else() + set(OPTIONS "${OPTIONS} is_component_build=false") +endif() + +if(APPLE) + set(OPTIONS "${OPTIONS} enable_dsyms=true") +endif() + +set(OPTIONS_DBG "${OPTIONS} is_debug=true symbol_level=2") +set(OPTIONS_REL "${OPTIONS} is_debug=false symbol_level=0") +set(DEFINITIONS_DBG ${DEFINITIONS}) +set(DEFINITIONS_REL ${DEFINITIONS}) + +vcpkg_configure_gn( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG "${OPTIONS_DBG}" + OPTIONS_RELEASE "${OPTIONS_REL}" +) + +# Prevent a ninja re-config loop +set(NINJA_REBUILD "build build.ninja: gn\n generator = 1\n depfile = build.ninja.d") +vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/build.ninja" "${NINJA_REBUILD}" "") +vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja" "${NINJA_REBUILD}" "") + +set(TARGETS + base base:base_static + base/third_party/dynamic_annotations + base/third_party/double_conversion) + +if(WIN32) + list(APPEND TARGETS base/win:pe_image) +endif() + +vcpkg_install_gn( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS ${TARGETS} +) + +# Install includes +set(PACKAGES_INCLUDE_DIR "${CURRENT_PACKAGES_DIR}/include/${PORT}") +file(GLOB_RECURSE INCLUDE_FILES LIST_DIRECTORIES false RELATIVE "${SOURCE_PATH}" "${SOURCE_PATH}/*.h") +foreach(file_ ${INCLUDE_FILES}) + configure_file("${SOURCE_PATH}/${file_}" "${PACKAGES_INCLUDE_DIR}/${file_}" COPYONLY) +endforeach() + +configure_file("${CMAKE_CURRENT_LIST_DIR}/chromium-baseConfig.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/chromium-baseConfig.cmake" @ONLY) + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/third_party/ced/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/ports/chromium-base/res/.gn b/ports/chromium-base/res/.gn new file mode 100644 index 00000000000000..4fcb7c405ff334 --- /dev/null +++ b/ports/chromium-base/res/.gn @@ -0,0 +1 @@ +buildconfig = "//build/config/BUILDCONFIG.gn" \ No newline at end of file diff --git a/ports/chromium-base/res/0001-base.patch b/ports/chromium-base/res/0001-base.patch new file mode 100644 index 00000000000000..ca8c059756d80f --- /dev/null +++ b/ports/chromium-base/res/0001-base.patch @@ -0,0 +1,101 @@ +diff --git a/BUILD.gn b/BUILD.gn +index 7b7cd51..2961688 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -155,6 +155,7 @@ if (is_android) { + # test code (test support and anything in the test directory) which should use + # source_set as is recommended for GN targets). + jumbo_component("base") { ++ output_name = "chromium_base" + if (is_nacl || is_ios) { + # Link errors related to malloc functions if libbase for nacl is + # compiled with jumbo: https://crbug.com/775959. +@@ -162,6 +163,11 @@ jumbo_component("base") { + never_build_jumbo = true + } + ++ if (!is_component_build) { ++ complete_static_lib = true ++ configs -= [ "//build/config/compiler:thin_archive" ] ++ } ++ + sources = [ + "allocator/allocator_check.cc", + "allocator/allocator_check.h", +@@ -1638,7 +1644,7 @@ jumbo_component("base") { + "hash/md5_constexpr_internal.h", + "hash/sha1.h", + ] +- if (is_nacl) { ++ if (true) { + sources += [ + "hash/md5_nacl.cc", + "hash/md5_nacl.h", +@@ -2298,6 +2304,7 @@ buildflag_header("tracing_buildflags") { + # library. Note that this library cannot depend on base because base depends on + # base_static. + static_library("base_static") { ++ output_name = "chromium_base_static" + sources = [ + "base_switches.cc", + "base_switches.h", +@@ -2325,7 +2332,7 @@ static_library("base_static") { + } + + component("i18n") { +- output_name = "base_i18n" ++ output_name = "chromium_base_i18n" + sources = [ + "i18n/base_i18n_export.h", + "i18n/base_i18n_switches.cc", +diff --git a/gtest_prod_util.h b/gtest_prod_util.h +index 2ca267e..0a0b6df 100644 +--- a/gtest_prod_util.h ++++ b/gtest_prod_util.h +@@ -5,7 +5,8 @@ + #ifndef BASE_GTEST_PROD_UTIL_H_ + #define BASE_GTEST_PROD_UTIL_H_ + +-#include "testing/gtest/include/gtest/gtest_prod.h" // nogncheck ++#define FRIEND_TEST(test_case_name, test_name)\ ++friend class test_case_name##_##test_name##_Test + + // This is a wrapper for gtest's FRIEND_TEST macro that friends + // test with all possible prefixes. This is very helpful when changing the test +diff --git a/hash/md5.h b/hash/md5.h +index 8a49f08..24acdab 100644 +--- a/hash/md5.h ++++ b/hash/md5.h +@@ -11,7 +11,7 @@ + #include "base/strings/string_piece.h" + #include "build/build_config.h" + +-#if defined(OS_NACL) ++#if true + #include "base/hash/md5_nacl.h" + #else + #include "base/hash/md5_boringssl.h" +diff --git a/hash/md5_nacl.cc b/hash/md5_nacl.cc +index 827bbbd..4b22c59 100644 +--- a/hash/md5_nacl.cc ++++ b/hash/md5_nacl.cc +@@ -22,6 +22,7 @@ + */ + + #include ++#include + + #include "base/hash/md5.h" + +diff --git a/profiler/stack_copier_signal.cc b/profiler/stack_copier_signal.cc +index 5a7d8b9..f959f2f 100644 +--- a/profiler/stack_copier_signal.cc ++++ b/profiler/stack_copier_signal.cc +@@ -6,6 +6,7 @@ + + #include + #include ++#include + #include + #include + diff --git a/ports/chromium-base/res/0002-build.patch b/ports/chromium-base/res/0002-build.patch new file mode 100644 index 00000000000000..94568d1690e317 --- /dev/null +++ b/ports/chromium-base/res/0002-build.patch @@ -0,0 +1,144 @@ +diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn +index 4cc6bfc..9ea83a9 100644 +--- a/config/BUILDCONFIG.gn ++++ b/config/BUILDCONFIG.gn +@@ -657,6 +657,7 @@ template("component") { + # See http://crbug.com/594610 + forward_variables_from(invoker, [ "visibility" ]) + forward_variables_from(invoker, "*", [ "visibility" ]) ++ not_needed("*") + } + } + +diff --git a/config/clang/BUILD.gn b/config/clang/BUILD.gn +index 960726e..87886dc 100644 +--- a/config/clang/BUILD.gn ++++ b/config/clang/BUILD.gn +@@ -38,5 +38,7 @@ config("extra_warnings") { + "-Wstring-conversion", + + "-Wtautological-overlap-compare", ++ "-Wno-unknown-warning-option", ++ "-Wno-unknown-pragmas" + ] + } +diff --git a/config/mac/sdk_info.py b/config/mac/sdk_info.py +index 1ad11d3..99b21f9 100644 +--- a/config/mac/sdk_info.py ++++ b/config/mac/sdk_info.py +@@ -61,10 +61,15 @@ def FillXcodeVersion(settings, developer_dir): + settings['xcode_build'] = version_plist['ProductBuildVersion'] + return + +- lines = subprocess.check_output(['xcodebuild', '-version']).splitlines() +- settings['xcode_version'] = FormatVersion(lines[0].split()[-1]) +- settings['xcode_version_int'] = int(settings['xcode_version'], 10) +- settings['xcode_build'] = lines[-1].split()[-1] ++ try: ++ lines = subprocess.check_output(['xcodebuild', '-version']).splitlines() ++ settings['xcode_version'] = FormatVersion(lines[0].split()[-1]) ++ settings['xcode_version_int'] = int(settings['xcode_version'], 10) ++ settings['xcode_build'] = lines[-1].split()[-1] ++ except: ++ settings['xcode_version'] = "" ++ settings['xcode_version_int'] = 0 ++ settings['xcode_build'] = "" + + + def FillMachineOSBuild(settings): +diff --git a/mac/find_sdk.py b/mac/find_sdk.py +index 58362bf..a6069b6 100755 +--- a/mac/find_sdk.py ++++ b/mac/find_sdk.py +@@ -68,6 +68,8 @@ def main(): + dev_dir = out.rstrip() + sdk_dir = os.path.join( + dev_dir, 'Platforms/MacOSX.platform/Developer/SDKs') ++ if not os.path.isdir(sdk_dir): ++ sdk_dir = os.path.join(dev_dir, 'SDKs') + + if not os.path.isdir(sdk_dir): + raise SdkError('Install Xcode, launch it, accept the license ' + +@@ -87,7 +89,10 @@ def main(): + + if options.print_bin_path: + bin_path = 'Toolchains/XcodeDefault.xctoolchain/usr/bin/' +- print(os.path.join(dev_dir, bin_path)) ++ if os.path.isdir(os.path.join(dev_dir, bin_path)): ++ print(os.path.join(dev_dir, bin_path)) ++ else: ++ print(os.path.join(dev_dir, 'usr/bin/')) + + return best_sdk + +diff --git a/toolchain/mac/BUILD.gn b/toolchain/mac/BUILD.gn +index 8fdada0..8d5e6b7 100644 +--- a/toolchain/mac/BUILD.gn ++++ b/toolchain/mac/BUILD.gn +@@ -184,9 +184,9 @@ template("mac_toolchain") { + # If dSYMs are enabled, this flag will be added to the link tools. + if (_enable_dsyms) { + dsym_switch = " -Wcrl,dsym,{{root_out_dir}} " +- dsym_switch += "-Wcrl,dsymutilpath," + +- rebase_path("//tools/clang/dsymutil/bin/dsymutil", +- root_build_dir) + " " ++ # dsym_switch += "-Wcrl,dsymutilpath," + ++ # rebase_path("//tools/clang/dsymutil/bin/dsymutil", ++ # root_build_dir) + " " + + dsym_output_dir = + "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.dSYM" +diff --git a/toolchain/win/BUILD.gn b/toolchain/win/BUILD.gn +index be08930..04fb374 100644 +--- a/toolchain/win/BUILD.gn ++++ b/toolchain/win/BUILD.gn +@@ -98,7 +98,7 @@ template("msvc_toolchain") { + } else { + lld_link = "lld-link" + } +- prefix = rebase_path("$clang_base_path/bin", root_build_dir) ++ prefix = "$clang_base_path/bin" + + # lld-link includes a replacement for lib.exe that can produce thin + # archives and understands bitcode (for lto builds). +@@ -190,7 +190,7 @@ template("msvc_toolchain") { + # amount of data to parse and store in .ninja_deps. We do this on non-Windows too, + # and already make sure rebuilds after win sdk / libc++ / clang header updates happen via + # changing commandline flags. +- show_includes = "/showIncludes:user" ++ show_includes = "" + } else { + show_includes = "/showIncludes" + } +@@ -235,7 +235,7 @@ template("msvc_toolchain") { + + if (toolchain_args.current_cpu == "arm64") { + if (is_clang) { +- prefix = rebase_path("$clang_base_path/bin", root_build_dir) ++ prefix = "$clang_base_path/bin" + ml = "${clang_prefix}${prefix}/${clang_cl} --target=arm64-windows" + if (host_os == "win") { + # Flip the slashes so that copy/paste of the command works. +@@ -444,11 +444,9 @@ template("win_toolchains") { + + msvc_toolchain("win_clang_" + target_name) { + environment = "environment." + toolchain_arch +- prefix = rebase_path("$clang_base_path/bin", root_build_dir) ++ prefix = "$clang_base_path/bin" + cl = "${clang_prefix}$prefix/${clang_cl}" +- _clang_lib_dir = +- rebase_path("$clang_base_path/lib/clang/$clang_version/lib/windows", +- root_build_dir) ++ _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib/windows" + if (host_os == "win") { + # Flip the slashes so that copy/paste of the command works. + cl = string_replace(cl, "/", "\\") +@@ -459,7 +457,7 @@ template("win_toolchains") { + + sys_include_flags = "${win_toolchain_data.include_flags_imsvc}" + sys_lib_flags = +- "-libpath:$_clang_lib_dir ${win_toolchain_data.libpath_flags}" ++ "-libpath:\"$_clang_lib_dir\" ${win_toolchain_data.libpath_flags}" + + toolchain_args = { + if (defined(invoker.toolchain_args)) { diff --git a/ports/chromium-base/res/BUILD.gn b/ports/chromium-base/res/BUILD.gn new file mode 100644 index 00000000000000..01d935ba02527f --- /dev/null +++ b/ports/chromium-base/res/BUILD.gn @@ -0,0 +1,5 @@ +static_library("chromium-base") { + deps = [ + "//base", + ] +} diff --git a/ports/chromium-base/res/LASTCHANGE.committime b/ports/chromium-base/res/LASTCHANGE.committime new file mode 100644 index 00000000000000..6acbbf6910963e --- /dev/null +++ b/ports/chromium-base/res/LASTCHANGE.committime @@ -0,0 +1 @@ +1594430814 \ No newline at end of file diff --git a/ports/chromium-base/res/build_overrides/build.gni b/ports/chromium-base/res/build_overrides/build.gni new file mode 100644 index 00000000000000..47ac036443fb64 --- /dev/null +++ b/ports/chromium-base/res/build_overrides/build.gni @@ -0,0 +1,16 @@ +import("//build/config/gclient_args.gni") + +# Some non-Chromium builds don't support building java targets. +enable_java_templates = true + +# Don't use Chromium's third_party/binutils. +linux_use_bundled_binutils_override = false + +# Tracing requires //third_party/perfetto. +enable_base_tracing = false + +# Skip assertions about 4GiB file size limit. See https://crbug.com/648948. +ignore_elf32_limitations = false + +# Use the system install of Xcode for tools like ibtool, libtool, etc. +use_system_xcode = true diff --git a/ports/chromium-base/res/fontconfig/BUILD.gn b/ports/chromium-base/res/fontconfig/BUILD.gn new file mode 100644 index 00000000000000..5c26eaf19c3ed9 --- /dev/null +++ b/ports/chromium-base/res/fontconfig/BUILD.gn @@ -0,0 +1 @@ +component("fontconfig") {} \ No newline at end of file diff --git a/ports/chromium-base/res/gclient_args.gni b/ports/chromium-base/res/gclient_args.gni new file mode 100644 index 00000000000000..bd1145a79d5413 --- /dev/null +++ b/ports/chromium-base/res/gclient_args.gni @@ -0,0 +1,7 @@ +build_with_chromium = true +checkout_android = false +checkout_android_native_support = false +checkout_ios_webkit = false +checkout_nacl = false +checkout_oculus_sdk = false +checkout_openxr = false \ No newline at end of file diff --git a/ports/chromium-base/res/icu/BUILD.gn b/ports/chromium-base/res/icu/BUILD.gn new file mode 100644 index 00000000000000..22356981f3b55b --- /dev/null +++ b/ports/chromium-base/res/icu/BUILD.gn @@ -0,0 +1,2 @@ +component("icuuc") {} +component("icu") {} \ No newline at end of file diff --git a/ports/chromium-base/res/icu/config.gni b/ports/chromium-base/res/icu/config.gni new file mode 100644 index 00000000000000..4e9ad6a5ee9f93 --- /dev/null +++ b/ports/chromium-base/res/icu/config.gni @@ -0,0 +1,3 @@ +declare_args() { + icu_use_data_file = false +} \ No newline at end of file diff --git a/ports/chromium-base/res/libxml/BUILD.gn b/ports/chromium-base/res/libxml/BUILD.gn new file mode 100644 index 00000000000000..b48056ab882c4f --- /dev/null +++ b/ports/chromium-base/res/libxml/BUILD.gn @@ -0,0 +1,2 @@ +component("libxml_utils") {} +component("xml_reader") {} \ No newline at end of file diff --git a/ports/fontconfig/include/alias/fcalias.h b/ports/chromium-base/res/protobuf/proto_library.gni similarity index 100% rename from ports/fontconfig/include/alias/fcalias.h rename to ports/chromium-base/res/protobuf/proto_library.gni diff --git a/ports/chromium-base/res/test_fonts/BUILD.gn b/ports/chromium-base/res/test_fonts/BUILD.gn new file mode 100644 index 00000000000000..b95c104e1f372a --- /dev/null +++ b/ports/chromium-base/res/test_fonts/BUILD.gn @@ -0,0 +1 @@ +component("test_fonts") {} \ No newline at end of file diff --git a/ports/chromium-base/res/testing/gmock/BUILD.gn b/ports/chromium-base/res/testing/gmock/BUILD.gn new file mode 100644 index 00000000000000..acd0ec30c0963d --- /dev/null +++ b/ports/chromium-base/res/testing/gmock/BUILD.gn @@ -0,0 +1 @@ +component("gmock") {} \ No newline at end of file diff --git a/ports/chromium-base/res/testing/gtest/BUILD.gn b/ports/chromium-base/res/testing/gtest/BUILD.gn new file mode 100644 index 00000000000000..2463cc7c0d82d3 --- /dev/null +++ b/ports/chromium-base/res/testing/gtest/BUILD.gn @@ -0,0 +1 @@ +component("gtest") {} \ No newline at end of file diff --git a/ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni b/ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni new file mode 100644 index 00000000000000..6e2a4c20fea4e1 --- /dev/null +++ b/ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni @@ -0,0 +1 @@ +import("//testing/test.gni") \ No newline at end of file diff --git a/ports/chromium-base/res/testing/test.gni b/ports/chromium-base/res/testing/test.gni new file mode 100644 index 00000000000000..2d6f8c10352558 --- /dev/null +++ b/ports/chromium-base/res/testing/test.gni @@ -0,0 +1,20 @@ +template("test") { + not_needed(invoker, "*") + not_needed("*") +} + +set_defaults("test") { + configs = [ + "//build/config/compiler:chromium_code" + ] +} + +template("fuzzer_test") { + not_needed(invoker, "*") + not_needed("*") +} + +template("protoc_convert") { + not_needed(invoker, "*") + not_needed("*") +} \ No newline at end of file diff --git a/ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn b/ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn new file mode 100644 index 00000000000000..5c2c1f68e14e66 --- /dev/null +++ b/ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn @@ -0,0 +1 @@ +config("chrome") {} \ No newline at end of file diff --git a/ports/fontconfig/include/alias/fcftalias.h b/ports/chromium-base/res/tools/win/DebugVisualizers/chrome.natvis similarity index 100% rename from ports/fontconfig/include/alias/fcftalias.h rename to ports/chromium-base/res/tools/win/DebugVisualizers/chrome.natvis diff --git a/ports/chromium-base/vcpkg.json b/ports/chromium-base/vcpkg.json new file mode 100644 index 00000000000000..6ca5e8a9e14dc1 --- /dev/null +++ b/ports/chromium-base/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "chromium-base", + "version-string": "86.0.4199.1", + "port-version": 2, + "description": "Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.", + "homepage": "https://chromium.googlesource.com/chromium/src", + "supports": "x64 & (osx | windows | linux) & !uwp" +} diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL deleted file mode 100644 index 93a2e4ee708f60..00000000000000 --- a/ports/cimg/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cimg -Version: 2.6.2 -Homepage: https://github.com/dtschump/CImg -Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake index 0d168fa11c53e1..8e128a33e64244 100644 --- a/ports/cimg/portfile.cmake +++ b/ports/cimg/portfile.cmake @@ -1,23 +1,21 @@ -include(vcpkg_common_functions) - vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH - REPO "dtschump/CImg" - REF v.2.6.2 + REPO dtschump/CImg + REF b33dcc8f9f1acf1f276ded92c04f8231f6c23fcd # v2.9.9 + SHA512 327c72320e7cac386ba72d417c45b9e8b40df34650370c34e687c362731919af1b447b2ee498f21278d4af155f0d9dbfabd222856d5f18c2e05569fa638a5909 HEAD_REF master - SHA512 6571c646c2d1c007212b3c8cd6794ff1722a0ffc4fcbbe26499cf1e74d3490e893cac5868c5b513602b336b5609316cd7f67c2e1f89b04fe79df5f93b9c6be7a) +) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" ) -vcpkg_install_cmake() +vcpkg_cmake_install() # Move cmake files, ensuring they will be 3 directories up the import prefix -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cimg) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") -file(INSTALL ${SOURCE_PATH}/Licence_CeCILL-C_V1-en.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cimg RENAME copyright) -file(INSTALL ${SOURCE_PATH}/Licence_CeCILL_V2-en.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cimg RENAME copyright2) +file(INSTALL "${SOURCE_PATH}/Licence_CeCILL-C_V1-en.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${SOURCE_PATH}/Licence_CeCILL_V2-en.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright2) diff --git a/ports/cimg/vcpkg.json b/ports/cimg/vcpkg.json new file mode 100644 index 00000000000000..cc1c448bd89e83 --- /dev/null +++ b/ports/cimg/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "cimg", + "version": "2.9.9", + "description": "The CImg Library is a small, open-source, and modern C++ toolkit for image processing", + "homepage": "https://github.com/dtschump/CImg", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/cityhash/CMakeLists.txt b/ports/cityhash/CMakeLists.txt new file mode 100644 index 00000000000000..f2e08336c7c48c --- /dev/null +++ b/ports/cityhash/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.13) +project(cityhash CXX) + +add_library(cityhash STATIC src/city.cc) + +target_include_directories(cityhash PUBLIC + $ + $ +) + +install(TARGETS cityhash EXPORT cityhash-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(EXPORT cityhash-config DESTINATION share/cmake/cityhash) +install(FILES src/city.h DESTINATION include) diff --git a/ports/cityhash/config.h b/ports/cityhash/config.h new file mode 100644 index 00000000000000..190c1da3886567 --- /dev/null +++ b/ports/cityhash/config.h @@ -0,0 +1,118 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 if the compiler supports __builtin_expect. */ +#if WIN32 || WIN64 +# define HAVE_BUILTIN_EXPECT 0 +#else +# define HAVE_BUILTIN_EXPECT 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "cityhash-discuss@googlegroups.com" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "CityHash" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "CityHash 1.1.1" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "cityhash" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.1.1" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + +/* Define for Solaris 2.5.1 so the uint64_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT64_T */ + +/* Define for Solaris 2.5.1 so the uint8_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT8_T */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + +/* Define to the type of an unsigned integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint64_t */ + +/* Define to the type of an unsigned integer type of width exactly 8 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint8_t */ diff --git a/ports/cityhash/portfile.cmake b/ports/cityhash/portfile.cmake new file mode 100644 index 00000000000000..b5b784723842a5 --- /dev/null +++ b/ports/cityhash/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/cityhash + REF 8af9b8c2b889d80c22d6bc26ba0df1afb79a30db + SHA512 5878a6a4f8ee99593412d446d96c05be1f89fa7771eca49ff4a52ce181de8199ba558170930996d36f6df80a65889d93c81ab2611868b015d8db913e2ecd2eb9 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if(VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/src) +else() + file(MAKE_DIRECTORY ${SOURCE_PATH}/out) + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure + WORKING_DIRECTORY ${SOURCE_PATH}/out + LOGNAME configure-${TARGET_TRIPLET} + ) + file(COPY ${SOURCE_PATH}/out/config.h DESTINATION ${SOURCE_PATH}/src) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/cityhash) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/cityhash/copyright COPYONLY) diff --git a/ports/cityhash/vcpkg.json b/ports/cityhash/vcpkg.json new file mode 100644 index 00000000000000..bcd255aed32eb9 --- /dev/null +++ b/ports/cityhash/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cityhash", + "version-string": "2013-01-08", + "port-version": 1, + "description": "CityHash, a family of hash functions for strings.", + "homepage": "https://github.com/google/cityhash" +} diff --git a/ports/civetweb/CONTROL b/ports/civetweb/CONTROL deleted file mode 100644 index b24a4ffeca1ee0..00000000000000 --- a/ports/civetweb/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: civetweb -Version: 2019-07-05 -Description: Easy to use, powerful, C/C++ embeddable web server. diff --git a/ports/civetweb/portfile.cmake b/ports/civetweb/portfile.cmake index 17a0d7f455a9af..7a0837a8bc657d 100644 --- a/ports/civetweb/portfile.cmake +++ b/ports/civetweb/portfile.cmake @@ -1,30 +1,33 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() +vcpkg_fail_port_install(MESSAGE "${PORT} does not currently support UWP" ON_TARGET "UWP") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO civetweb/civetweb - REF 2c1caa6e690bfe3b435a10c372ab2dcd14b872e8 - SHA512 bfd37906f85c10649108f83e755f28f058c0c27b0d597e6eb82f097db7fa043f6014984f1735c904d0e01c8a5e0dc45f1c57c1fb45b08bce78f42539e19160d6 + REF eefb26f82b233268fc98577d265352720d477ba4 # v1.15 + SHA512 5ce962e31b3c07b7110cbc645458dba9c0e26e693fbe3b4a7ffe8a28563827049a22fc5596a911fbcea4d88a9adbef3f82000ff61027ff4387f40e4a4045c26d HEAD_REF master ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + ssl CIVETWEB_ENABLE_SSL +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + # PREFER_NINJA - See https://github.com/civetweb/civetweb/issues/1024 OPTIONS -DCIVETWEB_BUILD_TESTING=OFF + -DCIVETWEB_ENABLE_DEBUG_TOOLS=OFF -DCIVETWEB_ENABLE_ASAN=OFF -DCIVETWEB_ENABLE_CXX=ON -DCIVETWEB_ENABLE_IPV6=ON -DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF - -DCIVETWEB_ENABLE_SSL=OFF + -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF -DCIVETWEB_ENABLE_WEBSOCKETS=ON + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -32,8 +35,9 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/civetweb) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/civetweb/copyright COPYONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/civetweb/vcpkg.json b/ports/civetweb/vcpkg.json new file mode 100644 index 00000000000000..f39eea59c5374c --- /dev/null +++ b/ports/civetweb/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "civetweb", + "version": "1.15", + "description": "Easy to use, powerful, C/C++ embeddable web server.", + "homepage": "https://github.com/civetweb/civetweb", + "supports": "!uwp", + "features": { + "ssl": { + "description": "Enable SSL support", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/cjson/CONTROL b/ports/cjson/CONTROL deleted file mode 100644 index f8eada28ba5992..00000000000000 --- a/ports/cjson/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: cjson -Version: 1.7.12 -Description: Ultralightweight JSON parser in ANSI C - -Feature: utils -Description: Enable building the cJSON_Utils library diff --git a/ports/cjson/fix-install-path.patch b/ports/cjson/fix-install-path.patch deleted file mode 100644 index 96a65d996d4eea..00000000000000 --- a/ports/cjson/fix-install-path.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 033a882..6e2b2e4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -149,7 +149,13 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/library_config/libcjson.pc.in" - - install(FILES cJSON.h DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/cjson") - install (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcjson.pc" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") --install(TARGETS "${CJSON_LIB}" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" EXPORT "${CJSON_LIB}") -+install(TARGETS "${CJSON_LIB}" -+ EXPORT "${CJSON_LIB}" -+ ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" -+ LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" -+ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" -+ INCLUDES DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}" -+) - if (BUILD_SHARED_AND_STATIC_LIBS) - install(TARGETS "${CJSON_LIB}-static" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") - endif() -@@ -186,7 +192,13 @@ if(ENABLE_CJSON_UTILS) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/library_config/libcjson_utils.pc.in" - "${CMAKE_CURRENT_BINARY_DIR}/libcjson_utils.pc" @ONLY) - -- install(TARGETS "${CJSON_UTILS_LIB}" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" EXPORT "${CJSON_UTILS_LIB}") -+ install(TARGETS "${CJSON_UTILS_LIB}" -+ EXPORT "${CJSON_UTILS_LIB}" -+ ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" -+ LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" -+ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" -+ INCLUDES DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}" -+ ) - if (BUILD_SHARED_AND_STATIC_LIBS) - install(TARGETS "${CJSON_UTILS_LIB}-static" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") - endif() diff --git a/ports/cjson/portfile.cmake b/ports/cjson/portfile.cmake index 753c4ed2a1b149..52e84654a91386 100644 --- a/ports/cjson/portfile.cmake +++ b/ports/cjson/portfile.cmake @@ -1,25 +1,23 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DaveGamble/cJSON - REF v1.7.12 - SHA512 d767b7261eff3a1a50ea46cc5573f9504f5734a891ea211ad348835bfb4b80acf7f744da2d34bb1fa270cd4d44576c21bc6f52c0604b7e6ffdeb61ecb396b376 + REF 95368da1a13c1ced5507bb5b0a457729af34837c + SHA512 e50fb7857573fac39bc9659004bd71483156677b4b1c7dd801470469162d1af2b1e3803fb4f1291b2b5defefb005ddd78b0efb01965626eecc00bc78b5f98c72 HEAD_REF master - PATCHES - fix-install-path.patch ) -if("utils" IN_LIST FEATURES) - set(ENABLE_CJSON_UTILS ON) -else() - set(ENABLE_CJSON_UTILS OFF) -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + utils ENABLE_CJSON_UTILS +) if(CMAKE_HOST_WIN32) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_PUBLIC_SYMBOLS) + string(COMPARE NOTEQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DENABLE_HIDDEN_SYMBOLS) else() set(ENABLE_PUBLIC_SYMBOLS OFF) + set(DENABLE_HIDDEN_SYMBOLS OFF) endif() vcpkg_configure_cmake( @@ -29,10 +27,11 @@ vcpkg_configure_cmake( -DBUILD_SHARED_AND_STATIC_LIBS=OFF -DCJSON_OVERRIDE_BUILD_SHARED_LIBS=OFF -DENABLE_PUBLIC_SYMBOLS=${ENABLE_PUBLIC_SYMBOLS} + -DENABLE_HIDDEN_SYMBOLS=${DENABLE_HIDDEN_SYMBOLS} -DENABLE_TARGET_EXPORT=ON # Export CMake config files - -DENABLE_CJSON_UTILS=${ENABLE_CJSON_UTILS} -DENABLE_CJSON_TEST=OFF -DENABLE_FUZZING=OFF + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -58,6 +57,3 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/include/cjson/cJSON.h "${_contents}") # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/cjson/vcpkg.json b/ports/cjson/vcpkg.json new file mode 100644 index 00000000000000..92bec5fb2db973 --- /dev/null +++ b/ports/cjson/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "cjson", + "version-date": "2019-11-30", + "port-version": 2, + "description": "Ultralightweight JSON parser in ANSI C", + "homepage": "https://github.com/DaveGamble/cJSON", + "features": { + "utils": { + "description": "Enable building the cJSON_Utils library" + } + } +} diff --git a/ports/clamav/build.patch b/ports/clamav/build.patch new file mode 100644 index 00000000000000..ee94a710bb43fc --- /dev/null +++ b/ports/clamav/build.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/FindCURSES.cmake b/cmake/FindCURSES.cmake +index a0755c697..f60735a91 100644 +--- a/cmake/FindCURSES.cmake ++++ b/cmake/FindCURSES.cmake +@@ -107,7 +107,7 @@ else() + set(CURSES_INCLUDE "") + + find_library(CURSES_LIBRARY +- NAMES curses ++ NAMES curses pdcurses + PATHS ${PC_PDCurses_LIBRARY_DIRS} + ) + +diff --git a/cmake/FindPthreadW32.cmake b/cmake/FindPthreadW32.cmake +index 4fded1eb7..0d44af310 100644 +--- a/cmake/FindPthreadW32.cmake ++++ b/cmake/FindPthreadW32.cmake +@@ -54,7 +54,7 @@ find_path(PThreadW32_INCLUDE_DIR + PATH_SUFFIXES pthreadw32 + ) + find_library(PThreadW32_LIBRARY +- NAMES pthreadVC2 ++ NAMES pthreadVC2 pthreadVC3 + PATHS ${PC_PThreadW32_LIBRARY_DIRS} + ) + diff --git a/ports/clamav/cmakefiles.patch b/ports/clamav/cmakefiles.patch new file mode 100644 index 00000000000000..cca4e6effbe1b0 --- /dev/null +++ b/ports/clamav/cmakefiles.patch @@ -0,0 +1,136 @@ +diff --git a/freshclam/CMakeLists.txt b/freshclam/CMakeLists.txt +index 545d5d4ba..59cbbc4ce 100644 +--- a/freshclam/CMakeLists.txt ++++ b/freshclam/CMakeLists.txt +@@ -28,18 +28,8 @@ target_link_libraries(freshclam-bin + ClamAV::libfreshclam + ClamAV::libclamav + ClamAV::shared ) +-if(WIN32) +- install(TARGETS freshclam-bin DESTINATION ${CMAKE_INSTALL_PREFIX}) +-else() +- install(TARGETS freshclam-bin DESTINATION ${CMAKE_INSTALL_BINDIR}) +-endif() + +-# Install an empty database directory +-if(WIN32) +- INSTALL(CODE "FILE(MAKE_DIRECTORY \${ENV}\${CMAKE_INSTALL_PREFIX}/database)") +-else() +- INSTALL(CODE "FILE(MAKE_DIRECTORY \${ENV}\${CMAKE_INSTALL_PREFIX}/share/clamav)") +-endif() ++install(TARGETS freshclam-bin) + + # now we rename resman-bin executable to resman using target properties + set_target_properties( freshclam-bin +diff --git a/libclamav/CMakeLists.txt b/libclamav/CMakeLists.txt +index bb14510db..136ea308a 100644 +--- a/libclamav/CMakeLists.txt ++++ b/libclamav/CMakeLists.txt +@@ -564,11 +564,7 @@ if(ENABLE_SHARED_LIB) + else() + target_link_libraries( clamav PUBLIC Iconv::Iconv ) + endif() +- if(WIN32) +- install(TARGETS clamav DESTINATION ${CMAKE_INSTALL_PREFIX}) +- else() +- install(TARGETS clamav DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- endif() ++ install(TARGETS clamav) + + if(LLVM_FOUND) + target_link_directories( clamav PRIVATE ${LLVM_LIBRARY_DIRS} ) +@@ -609,11 +605,7 @@ if(ENABLE_STATIC_LIB) + COMPILE_FLAGS "${WARNCFLAGS}" + VERSION ${LIBCLAMAV_VERSION} SOVERSION ${LIBCLAMAV_SOVERSION}) + target_compile_definitions(clamav_static PUBLIC clamav_staticLIB) +- if(WIN32) +- install(TARGETS clamav_static DESTINATION ${CMAKE_INSTALL_PREFIX}) +- else() +- install(TARGETS clamav_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- endif() ++ install(TARGETS clamav_static) + + add_library( ClamAV::libclamav_static ALIAS clamav_static ) + endif() +diff --git a/libclammspack/CMakeLists.txt b/libclammspack/CMakeLists.txt +index 1b5edbd4d..bba781d76 100644 +--- a/libclammspack/CMakeLists.txt ++++ b/libclammspack/CMakeLists.txt +@@ -73,11 +73,7 @@ endif() + target_sources( mspack + PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}/mspack/mspack.h" ) +-if(WIN32) +- install(TARGETS mspack DESTINATION ${CMAKE_INSTALL_PREFIX}) +-else() +- install(TARGETS mspack DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-endif() ++install(TARGETS mspack) + + # Public (forwarded) dependencies. + target_link_libraries( mspack +diff --git a/libclamunrar/CMakeLists.txt b/libclamunrar/CMakeLists.txt +index 03dbc3387..267690b1c 100644 +--- a/libclamunrar/CMakeLists.txt ++++ b/libclamunrar/CMakeLists.txt +@@ -90,10 +90,6 @@ target_link_libraries( clamunrar + PUBLIC + unrar_obj ) + +-if(WIN32) +- install(TARGETS clamunrar DESTINATION ${CMAKE_INSTALL_PREFIX}) +-else() +- install(TARGETS clamunrar DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-endif() ++install(TARGETS clamunrar) + + add_library( ClamAV::libclamunrar ALIAS clamunrar ) +diff --git a/libclamunrar_iface/CMakeLists.txt b/libclamunrar_iface/CMakeLists.txt +index 42f81544d..61f21da33 100644 +--- a/libclamunrar_iface/CMakeLists.txt ++++ b/libclamunrar_iface/CMakeLists.txt +@@ -55,11 +55,7 @@ if(ENABLE_UNRAR) + PUBLIC + ClamAV::libclamunrar_iface_iface) + +- if(WIN32) +- install(TARGETS clamunrar_iface DESTINATION ${CMAKE_INSTALL_PREFIX}) +- else() +- install(TARGETS clamunrar_iface DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- endif() ++ install(TARGETS clamunrar_iface) + + add_library( ClamAV::libclamunrar_iface ALIAS clamunrar_iface ) +-endif() +\ No newline at end of file ++endif() +diff --git a/libfreshclam/CMakeLists.txt b/libfreshclam/CMakeLists.txt +index 6fb711818..27321ceb4 100644 +--- a/libfreshclam/CMakeLists.txt ++++ b/libfreshclam/CMakeLists.txt +@@ -65,11 +65,7 @@ if(ENABLE_SHARED_LIB) + set_target_properties(freshclam PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}" + VERSION ${LIBFRESHCLAM_VERSION} SOVERSION ${LIBFRESHCLAM_SOVERSION}) +- if(WIN32) +- install(TARGETS freshclam DESTINATION ${CMAKE_INSTALL_PREFIX}) +- else() +- install(TARGETS freshclam DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- endif() ++ install(TARGETS freshclam) + + add_library( ClamAV::libfreshclam ALIAS freshclam ) + endif() +@@ -88,11 +84,7 @@ if(ENABLE_STATIC_LIB) + COMPILE_FLAGS "${WARNCFLAGS}" + VERSION ${LIBFRESHCLAM_VERSION} SOVERSION ${LIBFRESHCLAM_SOVERSION}) + target_compile_definitions(freshclam_static PUBLIC freshclam_staticLIB) +- if(WIN32) +- install(TARGETS freshclam_static DESTINATION ${CMAKE_INSTALL_PREFIX}) +- else() +- install(TARGETS freshclam_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- endif() ++ install(TARGETS freshclam_static) + + add_library( ClamAV::libfreshclam_static ALIAS freshclam_static ) + endif() diff --git a/ports/clamav/curl.patch b/ports/clamav/curl.patch new file mode 100644 index 00000000000000..444f61da362464 --- /dev/null +++ b/ports/clamav/curl.patch @@ -0,0 +1,38 @@ +commit 59516af244a840aa95a8f15f978ac24ec97178cf +Author: jzaddach +Date: Fri Nov 27 14:24:31 2020 +0100 + + Fix curl usage + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e85d03e20..9f1cd42c5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -685,7 +685,7 @@ endif() + + add_subdirectory( libclamav ) + +-if(NOT LIBCLAMAV_ONLY) ++if(NOT ENABLE_LIBCLAMAV_ONLY) + add_subdirectory( shared ) + + add_subdirectory( libfreshclam ) +diff --git a/shared/CMakeLists.txt b/shared/CMakeLists.txt +index d9c8b6bfe..30df5a1a4 100644 +--- a/shared/CMakeLists.txt ++++ b/shared/CMakeLists.txt +@@ -59,9 +59,13 @@ target_link_libraries( shared_obj + PUBLIC + ClamAV::libclamav + ZLIB::ZLIB +- CURL::libcurl + OpenSSL::SSL + OpenSSL::Crypto ) ++if(CURL_FOUND) ++ target_link_libraries( shared_obj ++ PUBLIC ++ CURL::libcurl ) ++endif() + if(WIN32) + target_link_libraries( shared_obj + PUBLIC diff --git a/ports/clamav/mspack.patch b/ports/clamav/mspack.patch new file mode 100644 index 00000000000000..5677887634891c --- /dev/null +++ b/ports/clamav/mspack.patch @@ -0,0 +1,44 @@ +diff --git a/cmake/FindMSPack.cmake b/cmake/FindMSPack.cmake +index cad448f..4ce4f87 100644 +--- a/cmake/FindMSPack.cmake ++++ b/cmake/FindMSPack.cmake +@@ -50,7 +50,7 @@ find_path(MSPack_INCLUDE_DIR + PATH_SUFFIXES mspack + ) + find_library(MSPack_LIBRARY +- NAMES mspack ++ NAMES libmspack + PATHS ${PC_MSPack_LIBRARY_DIRS} + ) + +diff --git a/libclamav/CMakeLists.txt b/libclamav/CMakeLists.txt +index 136ea30..72db826 100644 +--- a/libclamav/CMakeLists.txt ++++ b/libclamav/CMakeLists.txt +@@ -504,7 +504,7 @@ target_link_libraries( clamav_obj + yara + tomsfastmath + bytecode_runtime +- ClamAV::libmspack ++ ${MSPack_LIBRARIES} + ClamAV::libclamunrar_iface_iface + OpenSSL::SSL + OpenSSL::Crypto +@@ -547,7 +547,7 @@ if(ENABLE_SHARED_LIB) + yara + tomsfastmath + bytecode_runtime +- ClamAV::libmspack ++ ${MSPack_LIBRARIES} + ClamAV::libclamunrar_iface_iface + OpenSSL::SSL + OpenSSL::Crypto +@@ -588,7 +588,7 @@ if(ENABLE_STATIC_LIB) + yara + tomsfastmath + bytecode_runtime +- ClamAV::libmspack ++ ${MSPack_LIBRARIES} + ClamAV::libclamunrar_iface_iface + OpenSSL::SSL + OpenSSL::Crypto diff --git a/ports/clamav/portfile.cmake b/ports/clamav/portfile.cmake new file mode 100644 index 00000000000000..ceb1ce7f573101 --- /dev/null +++ b/ports/clamav/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Cisco-Talos/clamav-devel + REF clamav-0.103.0 + SHA512 e7ff4d98e0615a9fec0752bbfa2b882ae95034a8e01d0f7cc635ee520ff917c3be2a2d3273caa2fc1598e7d5ec4fd60d59b517cb439c5454d32447f8c8d7ba5a + FILE_DISAMBIGUATOR 1 + HEAD_REF master + PATCHES + "build.patch" + "cmakefiles.patch" + "curl.patch" + "mspack.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_LIBCLAMAV_ONLY=ON + -DENABLE_DOCS=OFF + -DENABLE_SHARED_LIB=ON + -DENABLE_STATIC_LIB=OFF + -DENABLE_EXTERNAL_MSPACK=ON +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# On Linux, clamav will still build and install clamav-config +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +vcpkg_copy_pdbs() diff --git a/ports/clamav/vcpkg.json b/ports/clamav/vcpkg.json new file mode 100644 index 00000000000000..dd6cbc928755da --- /dev/null +++ b/ports/clamav/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "clamav", + "version-semver": "0.103.0", + "port-version": 2, + "description": "ClamAV is an open-source anti-virus toolkit.", + "homepage": "https://www.clamav.net", + "supports": "!uwp & !static", + "dependencies": [ + "bzip2", + "json-c", + "libmspack", + "libxml2", + "openssl", + "pcre2", + "pthreads", + "zlib" + ] +} diff --git a/ports/clapack/CONTROL b/ports/clapack/CONTROL deleted file mode 100644 index 9e7328e70ab19a..00000000000000 --- a/ports/clapack/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: clapack -Version: 3.2.1-10 -Homepage: https://www.netlib.org/clapack -Description: CLAPACK (f2c'ed version of LAPACK) -Build-Depends: openblas (!osx) diff --git a/ports/clapack/FindLAPACK.cmake b/ports/clapack/FindLAPACK.cmake index 0b5924ff4a4280..aa546e672be054 100644 --- a/ports/clapack/FindLAPACK.cmake +++ b/ports/clapack/FindLAPACK.cmake @@ -1,468 +1,239 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindLAPACK ----------- - -Find LAPACK library - -This module finds an installed fortran library that implements the -LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). - -The approach follows that taken for the autoconf macro file, -acx_lapack.m4 (distributed at -http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html). - -Input Variables -^^^^^^^^^^^^^^^ - -The following variables may be set to influence this module's behavior: - -``BLA_STATIC`` - if ``ON`` use static linkage - -``BLA_VENDOR`` - If set, checks only the specified vendor, if not set checks all the - possibilities. List of vendors valid in this module: - - * ``Intel10_32`` (intel mkl v10 32 bit) - * ``Intel10_64lp`` (intel mkl v10+ 64 bit, threaded code, lp64 model) - * ``Intel10_64lp_seq`` (intel mkl v10+ 64 bit, sequential code, lp64 model) - * ``Intel10_64ilp`` (intel mkl v10+ 64 bit, threaded code, ilp64 model) - * ``Intel10_64ilp_seq`` (intel mkl v10+ 64 bit, sequential code, ilp64 model) - * ``Intel`` (obsolete versions of mkl 32 and 64 bit) - * ``OpenBLAS`` - * ``FLAME`` - * ``ACML`` - * ``Apple`` - * ``NAS`` - * ``Generic`` - -``BLA_F95`` - if ``ON`` tries to find BLAS95/LAPACK95 - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -``LAPACK_FOUND`` - library implementing the LAPACK interface is found -``LAPACK_LINKER_FLAGS`` - uncached list of required linker flags (excluding -l and -L). -``LAPACK_LIBRARIES`` - uncached list of libraries (using full path name) to link against - to use LAPACK -``LAPACK95_LIBRARIES`` - uncached list of libraries (using full path name) to link against - to use LAPACK95 -``LAPACK95_FOUND`` - library implementing the LAPACK95 interface is found - -.. note:: - - C or CXX must be enabled to use Intel MKL - - For example, to use Intel MKL libraries and/or Intel compiler: - - .. code-block:: cmake - - set(BLA_VENDOR Intel10_64lp) - find_package(LAPACK) -#]=======================================================================] - -set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - -# Check the language being used -if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED) ) - if(LAPACK_FIND_REQUIRED) - message(FATAL_ERROR "FindLAPACK requires Fortran, C, or C++ to be enabled.") - else() - message(STATUS "Looking for LAPACK... - NOT found (Unsupported languages)") - return() - endif() -endif() - -if (CMAKE_Fortran_COMPILER_LOADED) -include(${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake) -else () -include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) -endif () -include(${CMAKE_ROOT}/Modules/CMakePushCheckState.cmake) -include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) - -cmake_push_check_state() -set(CMAKE_REQUIRED_QUIET ${LAPACK_FIND_QUIETLY}) - -set(LAPACK_FOUND FALSE) -set(LAPACK95_FOUND FALSE) - -# TODO: move this stuff to separate module - -macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads) -# This macro checks for the existence of the combination of fortran libraries -# given by _list. If the combination is found, this macro checks (using the -# Check_Fortran_Function_Exists macro) whether can link against that library -# combination using the name of a routine given by _name using the linker -# flags given by _flags. If the combination of libraries is found and passes -# the link test, LIBRARIES is set to the list of complete library paths that -# have been found. Otherwise, LIBRARIES is set to FALSE. - -# N.B. _prefix is the prefix applied to the names of all cached variables that -# are generated internally and marked advanced by this macro. - -set(_libraries_work TRUE) -set(${LIBRARIES}) -set(${LIBRARIES}_RELEASE) -set(_combined_name) -if (NOT _libdir) - if (WIN32) - set(_libdir ENV LIB) - elseif (APPLE) - set(_libdir ENV DYLD_LIBRARY_PATH) - else () - set(_libdir ENV LD_LIBRARY_PATH) - endif () -endif () - -list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") - -foreach(_library ${_list}) - set(_combined_name ${_combined_name}_${_library}) - - if(_libraries_work) - if (BLA_STATIC) - if (WIN32) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif () - if (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - else () - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif () - else () - if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - # for ubuntu's libblas3gf and liblapack3gf packages - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) - endif () - endif () - find_library(${_prefix}_${_library}_LIBRARY_RELEASE - NAMES ${_library} - PATHS ${_libdir} - ) - mark_as_advanced(${_prefix}_${_library}_LIBRARY_RELEASE) - find_library(${_prefix}_${_library}_LIBRARY_DEBUG - NAMES ${_library}d - PATHS ${_libdir} - ) - mark_as_advanced(${_prefix}_${_library}_LIBRARY_DEBUG) - select_library_configurations(${_prefix}_${_library}) - if(NOT ${_prefix}_${_library}_LIBRARY_RELEASE MATCHES "NOTFOUND") - set(${LIBRARIES}_RELEASE ${${LIBRARIES}_RELEASE} ${${_prefix}_${_library}_LIBRARY_RELEASE}) - endif() - set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) - set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) - endif() -endforeach() - -if(_libraries_work) - # Test this combination of libraries. - if(NOT "${_blas}" STREQUAL "") - string(GENEX_STRIP "${_blas}" _test_blas) - endif() - if(UNIX AND BLA_STATIC) - set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group" ${${LIBRARIES}_RELEASE} ${_test_blas} "-Wl,--end-group" ${_threads}) - else() - set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}_RELEASE} ${_test_blas} ${_threads}) - endif() - #message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") - #message("DEBUG: _test_blas = ${_test_blas} former ${_blas}") - if (NOT CMAKE_Fortran_COMPILER_LOADED) - check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) - else () - check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) - endif () - set(CMAKE_REQUIRED_LIBRARIES) - set(_test_blas) - set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) -# message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") -endif() - - if(_libraries_work) - set(${LIBRARIES} ${${LIBRARIES}} "${_blas}" ${_threads}) - else() - set(${LIBRARIES} FALSE) - endif() - -endmacro() - - -set(LAPACK_LINKER_FLAGS) -set(LAPACK_LIBRARIES) -set(LAPACK95_LIBRARIES) - - -if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - find_package(BLAS) -else() - find_package(BLAS REQUIRED) -endif() - - -if(BLAS_FOUND) - set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) - if (NOT $ENV{BLA_VENDOR} STREQUAL "") - set(BLA_VENDOR $ENV{BLA_VENDOR}) - else () - if(NOT BLA_VENDOR) - set(BLA_VENDOR "All") - endif() - endif () - -#intel lapack -if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") - if (NOT WIN32) - set(LAPACK_mkl_LM "-lm") - set(LAPACK_mkl_LDL "-ldl") - endif () - if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) - if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - find_PACKAGE(Threads) - else() - find_package(Threads REQUIRED) - endif() - - if (BLA_VENDOR MATCHES "_64ilp") - set(LAPACK_mkl_ILP_MODE "ilp64") - else () - set(LAPACK_mkl_ILP_MODE "lp64") - endif () - - set(LAPACK_SEARCH_LIBS "") - - if (BLA_F95) - set(LAPACK_mkl_SEARCH_SYMBOL "cheev_f95") - set(_LIBRARIES LAPACK95_LIBRARIES) - set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES}) - - # old - list(APPEND LAPACK_SEARCH_LIBS - "mkl_lapack95") - # new >= 10.3 - list(APPEND LAPACK_SEARCH_LIBS - "mkl_intel_c") - list(APPEND LAPACK_SEARCH_LIBS - "mkl_lapack95_${LAPACK_mkl_ILP_MODE}") - else() - set(LAPACK_mkl_SEARCH_SYMBOL "cheev") - set(_LIBRARIES LAPACK_LIBRARIES) - set(_BLAS_LIBRARIES ${BLAS_LIBRARIES}) - - # old - list(APPEND LAPACK_SEARCH_LIBS - "mkl_lapack") - endif() - - # First try empty lapack libs - if (NOT ${_LIBRARIES}) - check_lapack_libraries( - ${_LIBRARIES} - LAPACK - ${LAPACK_mkl_SEARCH_SYMBOL} - "" - "" - "${_BLAS_LIBRARIES}" - "" - ) - endif () - # Then try the search libs - foreach (IT ${LAPACK_SEARCH_LIBS}) - if (NOT ${_LIBRARIES}) - check_lapack_libraries( - ${_LIBRARIES} - LAPACK - ${LAPACK_mkl_SEARCH_SYMBOL} - "" - "${IT}" - "${_BLAS_LIBRARIES}" - "${CMAKE_THREAD_LIBS_INIT};${LAPACK_mkl_LM};${LAPACK_mkl_LDL}" - ) - endif () - endforeach () - - unset(LAPACK_mkl_ILP_MODE) - unset(LAPACK_mkl_SEARCH_SYMBOL) - unset(LAPACK_mkl_LM) - unset(LAPACK_mkl_LDL) - endif () -endif() - -if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "goto2" - "${BLAS_LIBRARIES}" - "" - ) - endif() -endif () - -if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "openblas" - "${BLAS_LIBRARIES}" - "" - ) - endif() -endif () - -if (BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All") - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "flame" - "${BLAS_LIBRARIES}" - "" - ) - endif() -endif () - -#acml lapack - if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All") - if (BLAS_LIBRARIES MATCHES ".+acml.+") - set (LAPACK_LIBRARIES ${BLAS_LIBRARIES}) - endif () - endif () - -# Apple LAPACK library? -if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "Accelerate" - "${BLAS_LIBRARIES}" - "" - ) - endif() -endif () -if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") - if ( NOT LAPACK_LIBRARIES ) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "vecLib" - "${BLAS_LIBRARIES}" - "" - ) - endif () -endif () -# Generic LAPACK library? -if (BLA_VENDOR STREQUAL "Generic" OR - BLA_VENDOR STREQUAL "ATLAS" OR - BLA_VENDOR STREQUAL "All") - if ( NOT LAPACK_LIBRARIES ) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "lapack" - "${BLAS_LIBRARIES}" - "" - ) - endif () - if ( NOT LAPACK_LIBRARIES ) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "lapack;libf2c" - "${BLAS_LIBRARIES}" - "" - ) - endif () - if ( NOT LAPACK_LIBRARIES ) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "lapack;f2c" - "${BLAS_LIBRARIES}" - "" - ) - endif () -endif () - -else() - message(STATUS "LAPACK requires BLAS") -endif() - -if(BLA_F95) - if(LAPACK95_LIBRARIES) - set(LAPACK95_FOUND TRUE) - else() - set(LAPACK95_FOUND FALSE) - endif() - if(NOT LAPACK_FIND_QUIETLY) - if(LAPACK95_FOUND) - message(STATUS "A library with LAPACK95 API found.") - else() - if(LAPACK_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with LAPACK95 API not found. Please specify library location." - ) - else() - message(STATUS - "A library with LAPACK95 API not found. Please specify library location." - ) - endif() - endif() - endif() - set(LAPACK_FOUND "${LAPACK95_FOUND}") - set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}") -else() - if(LAPACK_LIBRARIES) - set(LAPACK_FOUND TRUE) - else() - set(LAPACK_FOUND FALSE) - endif() - - if(NOT LAPACK_FIND_QUIETLY) - if(LAPACK_FOUND) - message(STATUS "A library with LAPACK API found.") - else() - if(LAPACK_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with LAPACK API not found. Please specify library location." - ) - else() - message(STATUS - "A library with LAPACK API not found. Please specify library location." - ) - endif() - endif() - endif() -endif() - -cmake_pop_check_state() -set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) +#.rst: +# clapack config for vcpkg +# ------------ +# +# Find the clapack includes and library. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This script defines the following variables: +# +# ``CLAPACK_FOUND`` +# True if clapack library found +# +# ``CLAPACK_VERSION`` +# Containing the clapack version tag (manually defined) +# +# ``CLAPACK_INCLUDE_DIR`` +# Location of clapack headers +# +# ``CLAPACK_LIBRARY`` +# List of libraries to link with when using clapack +# +# Result Targets +# ^^^^^^^^^^^^^^ +# +# This script defines the following targets: +# +# ``clapack::clapack`` +# Target to use clapack +# +# Compatibility Variables +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# This script defines the following variables for compatibility reasons: +# +# ``F2C_FOUND`` +# True if f2c (fortran-to-c wrap layer) library found +# +# ``F2C_INCLUDE_DIR`` +# Location of clapack headers +# +# ``F2C_LIBRARY`` +# Library containing the fortran-to-c wrap layer, necessary for clapack and automatically included when used +# +# ``LAPACK_FOUND`` +# True if clapack library found +# +# ``LAPACK_VERSION`` +# Containing the clapack version tag (manually defined) +# +# ``LAPACK_INCLUDE_DIR`` +# Location of clapack headers +# +# ``LAPACK_LIBRARY`` +# List of libraries to link with when using clapack +# +# Compatibility Targets +# ^^^^^^^^^^^^^^ +# +# This script defines the following targets for compatibility reasons: +# +# ``lapack`` +# Target to use lapack + +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) +include(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake) + +set(CLAPACK_VERSION "3.2.1") + +set(CMAKE_THREAD_PREFER_PTHREAD TRUE) +find_dependency(Threads) + +if(UNIX) + find_library(ADDITIONAL_LAPACK_LIBRARY m) + set(PTHREAD_LINK_NAME "-pthread") +endif() + +if(NOT F2C_LIBRARY) + find_library(F2C_LIBRARY_RELEASE NAMES f2c libf2c) + find_library(F2C_LIBRARY_DEBUG NAMES f2cd libf2cd) + select_library_configurations(F2C) + + #keep a list of "pure" f2c libs, without dependencies + set(oF2C_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE}) + set(oF2C_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG}) + set(oF2C_LIBRARY ${F2C_LIBRARY}) + + list(APPEND F2C_LIBRARY ${ADDITIONAL_LAPACK_LIBRARY}) +endif() + +if(NOT LAPACK_LIBRARY) + find_library(LAPACK_LIBRARY_RELEASE NAMES lapack) + find_library(LAPACK_LIBRARY_DEBUG NAMES lapackd) + + #keep a list of "pure" lapack libs, without dependencies + set(oLAPACK_LIBRARY_RELEASE ${LAPACK_LIBRARY_RELEASE}) + set(oLAPACK_LIBRARY_DEBUG ${LAPACK_LIBRARY_DEBUG}) + select_library_configurations(oLAPACK) + + list(APPEND LAPACK_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE}) + list(APPEND LAPACK_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG}) + + find_dependency(OpenBLAS) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_RELEASE) + if(NOT _loc) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_RELEASE) + endif() + set(LAPACK_BLAS_LIBRARY_RELEASE ${_loc}) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_DEBUG) + if(NOT _loc) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_DEBUG) + endif() + set(LAPACK_BLAS_LIBRARY_DEBUG ${_loc}) + select_library_configurations(LAPACK_BLAS) + list(APPEND LAPACK_LIBRARY_RELEASE ${LAPACK_BLAS_LIBRARY_RELEASE}) + list(APPEND LAPACK_LIBRARY_DEBUG ${LAPACK_BLAS_LIBRARY_DEBUG}) + + select_library_configurations(LAPACK) + if(UNIX) + list(APPEND LAPACK_LIBRARY ${PTHREAD_LINK_NAME}) + endif() +endif() + +if(NOT F2C_INCLUDE_DIR) + find_path(F2C_INCLUDE_DIR NAMES f2c.h) +endif() + +if(NOT LAPACK_INCLUDE_DIR) + find_path(LAPACK_INCLUDE_DIR NAMES clapack.h) +endif() + +list(APPEND LAPACK_INCLUDE_DIR ${F2C_INCLUDE_DIR}) +set(LAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) +set(LAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) +set(CLAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) +set(CLAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) +set(F2C_INCLUDE_DIRS "${F2C_INCLUDE_DIR}" CACHE PATH "" FORCE) + +set(LAPACK_DLL_DIR ${LAPACK_INCLUDE_DIR}) +list(TRANSFORM LAPACK_DLL_DIR APPEND "/../bin") +message(STATUS "LAPACK_DLL_DIR: ${LAPACK_DLL_DIR}") + +if(WIN32) + find_file(LAPACK_LIBRARY_RELEASE_DLL NAMES lapack.dll PATHS ${LAPACK_DLL_DIR}) + find_file(LAPACK_LIBRARY_DEBUG_FOLDER NAMES lapackd.dll PATHS ${LAPACK_DLL_DIR}) + find_file(F2C_LIBRARY_RELEASE_DLL NAMES f2c.dll libf2c.dll PATHS ${LAPACK_DLL_DIR}) + find_file(F2C_LIBRARY_DEBUG_DLL NAMES f2cd.dll libf2cd.dll PATHS ${LAPACK_DLL_DIR}) +endif() + +set(LAPACK_BLAS_LIBRARY "${LAPACK_BLAS_LIBRARY}" CACHE STRING "" FORCE) +set(F2C_LIBRARIES "${F2C_LIBRARY}" CACHE STRING "" FORCE) +set(LAPACK_VERSION "${CLAPACK_VERSION}" CACHE STRING "" FORCE) +set(LAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) +set(CLAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) +set(CLAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) + +set(LAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) +set(F2C_LIBRARY "${F2C_LIBRARY}" CACHE STRING "" FORCE) +set(LAPACK_LIBRARY_RELEASE "${LAPACK_LIBRARY_RELEASE}" CACHE STRING "" FORCE) +set(LAPACK_LIBRARY_DEBUG "${LAPACK_LIBRARY_DEBUG}" CACHE STRING "" FORCE) +set(F2C_LIBRARY_RELEASE "${F2C_LIBRARY_RELEASE}" CACHE STRING "" FORCE) +set(F2C_LIBRARY_DEBUG "${F2C_LIBRARY_DEBUG}" CACHE STRING "" FORCE) + +find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARY LAPACK_INCLUDE_DIR) +mark_as_advanced(LAPACK_INCLUDE_DIR LAPACK_LIBRARY) + +#TARGETS +if(CLAPACK_FOUND AND NOT TARGET clapack::clapack) + if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}") + add_library(clapack::clapack SHARED IMPORTED) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}") + set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + else() + add_library(clapack::clapack UNKNOWN IMPORTED) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG}") + set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + endif() +endif() + +# Ensure consistency with both CMake's vanilla as well as lapack-reference's FindLAPACK.cmake module and register the LAPACK::LAPACK target +if(CLAPACK_FOUND AND NOT TARGET LAPACK::LAPACK) + if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}") + add_library(LAPACK::LAPACK SHARED IMPORTED) + set_target_properties(LAPACK::LAPACK PROPERTIES + IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}") + set_property(TARGET LAPACK::LAPACK APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(LAPACK::LAPACK PROPERTIES + IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + else() + add_library(LAPACK::LAPACK UNKNOWN IMPORTED) + set_target_properties(LAPACK::LAPACK PROPERTIES + IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG}") + set_property(TARGET LAPACK::LAPACK APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(LAPACK::LAPACK PROPERTIES + IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + endif() +endif() + +# Preserve backwards compatibility and also register the 'lapack' target +if(CLAPACK_FOUND AND NOT TARGET lapack) + add_library(lapack ALIAS LAPACK::LAPACK) +endif() diff --git a/ports/clapack/arith_linux64.h b/ports/clapack/arith_linux64.h new file mode 100644 index 00000000000000..1bc8dcee8d51b8 --- /dev/null +++ b/ports/clapack/arith_linux64.h @@ -0,0 +1,9 @@ +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#define Long int +#define Intcast (int)(long) +#define Double_Align +#define X64_bit_pointers +#define NO_LONG_LONG +#define QNaN0 0x0 +#define QNaN1 0xfff80000 diff --git a/ports/clapack/arith_osx.h b/ports/clapack/arith_osx.h new file mode 100644 index 00000000000000..9365338494261d --- /dev/null +++ b/ports/clapack/arith_osx.h @@ -0,0 +1,12 @@ +/* Suitable for macOS on x86_64 and arm64 */ +/* Not suitable for 32-bit macOS */ + +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#define Long int +#define Intcast (int)(long) +#define Double_Align +#define X64_bit_pointers +#define NANCHECK +#define QNaN0 0x0 +#define QNaN1 0x7ff80000 diff --git a/ports/clapack/arith_win32.h b/ports/clapack/arith_win32.h new file mode 100644 index 00000000000000..68b45b9eaf47c0 --- /dev/null +++ b/ports/clapack/arith_win32.h @@ -0,0 +1,8 @@ +/* Windows 32-bit */ + +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#define Double_Align +#define NANCHECK +#define QNaN0 0x0 +#define QNaN1 0x7ff80000 diff --git a/ports/clapack/arith_win64.h b/ports/clapack/arith_win64.h new file mode 100644 index 00000000000000..359639521e2a81 --- /dev/null +++ b/ports/clapack/arith_win64.h @@ -0,0 +1,9 @@ +/* Windows 64-bit */ + +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#define Double_Align +#define X64_bit_pointers +#define NANCHECK +#define QNaN0 0x0 +#define QNaN1 0x7ff80000 diff --git a/ports/clapack/fix-ConfigFile.patch b/ports/clapack/fix-ConfigFile.patch new file mode 100644 index 00000000000000..295c2bc1cf2ecb --- /dev/null +++ b/ports/clapack/fix-ConfigFile.patch @@ -0,0 +1,7 @@ +diff --git a/clapack-config.cmake.in b/clapack-config.cmake.in +index cd19f1d..49af4f0 100644 +--- a/clapack-config.cmake.in ++++ b/clapack-config.cmake.in +@@ -1 +1 @@ +-include("@CLAPACK_BINARY_DIR@/clapack-targets.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/clapack-targets.cmake") diff --git a/ports/clapack/fix-install.patch b/ports/clapack/fix-install.patch new file mode 100644 index 00000000000000..b475c6b8591211 --- /dev/null +++ b/ports/clapack/fix-install.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 414ac8e..db58b4e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,7 +19,7 @@ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE) + add_subdirectory(F2CLIBS) + add_subdirectory(SRC) + set(CLAPACK_VERSION 3.2.1) +-export(TARGETS f2c lapack FILE ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-targets.cmake) ++install(EXPORT clapack-targets FILE clapack-targets.cmake DESTINATION share/clapack) + configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in + ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-config-version.cmake @ONLY) + configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in +diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt +index 6fa3598..c855e38 100644 +--- a/F2CLIBS/libf2c/CMakeLists.txt ++++ b/F2CLIBS/libf2c/CMakeLists.txt +@@ -63,8 +63,9 @@ set_property(TARGET f2c PROPERTY PREFIX lib) + if(UNIX) + target_link_libraries(f2c m) + endif() +-install(TARGETS f2c ++install(TARGETS f2c EXPORT clapack-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ ARCHIVE DESTINATION lib ++ INCLUDES DESTINATION include) + +diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt +index 07dc8c7..2355225 100644 +--- a/SRC/CMakeLists.txt ++++ b/SRC/CMakeLists.txt +@@ -377,8 +377,9 @@ if(BUILD_COMPLEX16) + endif() + add_library(lapack ${ALLOBJ} ${ALLXOBJ}) + target_link_libraries(lapack ${BLAS_LIBRARIES} f2c) +-install(TARGETS lapack ++install(TARGETS lapack EXPORT clapack-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ ARCHIVE DESTINATION lib ++ INCLUDES DESTINATION include) + diff --git a/ports/clapack/portfile.cmake b/ports/clapack/portfile.cmake index 90169d79b209f9..986335e6d0a489 100644 --- a/ports/clapack/portfile.cmake +++ b/ports/clapack/portfile.cmake @@ -1,4 +1,6 @@ -include(vcpkg_common_functions) +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/lapack-reference/copyright") + message(FATAL_ERROR "Can't build ${PORT} if lapack-reference is installed. Please remove lapack-reference:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() vcpkg_check_linkage(ONLY_STATIC_LIBRARY) @@ -13,13 +15,41 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} PATCHES remove_internal_blas.patch + fix-ConfigFile.patch + fix-install.patch + support-uwp.patch ) +set(ARITH_PATH) +if(DEFINED CLAPACK_ARITH_PATH) + set(ARITH_PATH "-DARITH_PATH=${CLAPACK_ARITH_PATH}") +elseif(NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET) + if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + if(VCPKG_TARGET_ARCHITECTURE MATCHES "^x64$|^arm64$") + set(ARITH_PATH "-DARITH_PATH=${CMAKE_CURRENT_LIST_DIR}/arith_win64.h") + else() + set(ARITH_PATH "-DARITH_PATH=${CMAKE_CURRENT_LIST_DIR}/arith_win32.h") + endif() + elseif(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) + set(ARITH_PATH "-DARITH_PATH=${CMAKE_CURRENT_LIST_DIR}/arith_osx.h") + elseif(VCPKG_TARGET_IS_LINUX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARITH_PATH "-DARITH_PATH=${CMAKE_CURRENT_LIST_DIR}/arith_linux64.h") + else() + message(WARNING +"Unable to cross-compile clapack for ${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_CMAKE_SYSTEM_NAME}. +No arith.h is available and arithchk must be executed for the target. +To fix this issue, define CLAPACK_ARITH_PATH in your triplet to the location of a pre-generated arith.h file. + +Continuing with trying to run arithchk anyway.") + endif() +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DCMAKE_DEBUG_POSTFIX=d + ${ARITH_PATH} ) vcpkg_install_cmake() @@ -28,11 +58,10 @@ vcpkg_copy_pdbs() #TODO: fix the official exported targets, since they are broken (luckily it seems that no-one uses them for now) vcpkg_fixup_cmake_targets(CONFIG_PATH share/clapack) -#we install a cmake wrapper since the official FindLAPACK module in cmake does find clapack easily, unfortunately... -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Install clapack wrappers. +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/clapack RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/clapack/support-uwp.patch b/ports/clapack/support-uwp.patch new file mode 100644 index 00000000000000..6f229ade268dc0 --- /dev/null +++ b/ports/clapack/support-uwp.patch @@ -0,0 +1,87 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index db58b4e..0fb61a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,6 +15,9 @@ if(NOT USE_BLAS_WRAP) + # _zrotg_ seems to be missing in the wrap header + add_definitions(-DNO_BLAS_WRAP) + endif() ++if (MSVC) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) ++endif() + include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE) + add_subdirectory(F2CLIBS) + add_subdirectory(SRC) +diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt +index 094614a..e5b40ab 100644 +--- a/F2CLIBS/libf2c/CMakeLists.txt ++++ b/F2CLIBS/libf2c/CMakeLists.txt +@@ -44,12 +44,19 @@ if(UNIX) + endif() + set_target_properties(arithchk PROPERTIES COMPILE_DEFINITIONS + "NO_FPINIT;NO_LONG_LONG") ++ ++if (ARITH_PATH) ++configure_file( ++ "${ARITH_PATH}" ++ "${CMAKE_CURRENT_BINARY_DIR}/arith.h" ++ COPYONLY) ++else() + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h + COMMAND arithchk > ${CMAKE_CURRENT_BINARY_DIR}/arith.h + DEPENDS arithchk + ) +- ++endif() + + set(OFILES ${MISC} ${POW} ${CX} ${DCX} ${REAL} ${DBL} ${INT} + ${HALF} ${CMP} ${EFL} ${CHAR} ${I77} ${TIME}) +diff --git a/F2CLIBS/libf2c/inquire.c b/F2CLIBS/libf2c/inquire.c +index 5936a67..4846d41 100644 +--- a/F2CLIBS/libf2c/inquire.c ++++ b/F2CLIBS/libf2c/inquire.c +@@ -32,7 +32,7 @@ integer f_inqu(inlist *a) + { byfile=1; + g_char(a->infile,a->infilen,buf); + #ifdef NON_UNIX_STDIO +- x = access(buf,0) ? -1 : 0; ++ x = _access(buf,0) ? -1 : 0; + for(i=0,p=NULL;inext) + if (nl == y->nl) + return y; +@@ -308,7 +308,7 @@ x_rsne(cilist *a) + char buf[64]; + hashtab *ht; + Vardesc *v; +- dimen *dn, *dn0, *dn1; ++ dimen *dn = NULL, *dn0 = NULL, *dn1; + ftnlen *dims, *dims1; + ftnlen b, b0, b1, ex, no, nomax, size, span; + ftnint no1, no2, type; diff --git a/ports/clapack/vcpkg-cmake-wrapper.cmake b/ports/clapack/vcpkg-cmake-wrapper.cmake index 26a0a1624b854d..cb2e08fdfad6d6 100644 --- a/ports/clapack/vcpkg-cmake-wrapper.cmake +++ b/ports/clapack/vcpkg-cmake-wrapper.cmake @@ -1,2 +1,11 @@ -include(${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake) +message(STATUS "Using VCPKG FindLAPACK from package 'clapack'") +set(LAPACK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH}) diff --git a/ports/clapack/vcpkg.json b/ports/clapack/vcpkg.json new file mode 100644 index 00000000000000..f0fd61e8f63342 --- /dev/null +++ b/ports/clapack/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "clapack", + "version-string": "3.2.1", + "port-version": 19, + "description": "CLAPACK (f2c'ed version of LAPACK)", + "homepage": "https://www.netlib.org/clapack", + "dependencies": [ + "blas" + ] +} diff --git a/ports/clara/CONTROL b/ports/clara/CONTROL deleted file mode 100644 index cb0c84df3571d3..00000000000000 --- a/ports/clara/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: clara -Version: 2019-03-29 -Homepage: https://github.com/philsquared/Clara -Description: A simple to use command line parser for C++ \ No newline at end of file diff --git a/ports/clara/portfile.cmake b/ports/clara/portfile.cmake index 583a07b53e7634..7b4799844eadd4 100644 --- a/ports/clara/portfile.cmake +++ b/ports/clara/portfile.cmake @@ -1,9 +1,8 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO philsquared/Clara - REF e3061072fd5a3739fbd11e56ecb7fef5fbd33e04 - SHA512 5ad4b4842153e11b3e82579858c159a85c9ef76e8278ef97befecaedcd79508e89a3fcb5f5b5c3f0ac48064d5627e08cdd2a1db046a95f5b2d55d7b8a4437a92 + REF v1.1.5 + SHA512 10aed7452eaf95c785899086118181615d29496d9f6e5b7054005b565afb642fcdf18b87ebb2dae4e9e365c434be9463c1a5d1a4c4ab17b95a87b89a7f7e3b08 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/clara/vcpkg.json b/ports/clara/vcpkg.json new file mode 100644 index 00000000000000..7752fb5201856b --- /dev/null +++ b/ports/clara/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "clara", + "version-string": "1.1.5", + "port-version": 1, + "description": "A simple to use command line parser for C++", + "homepage": "https://github.com/philsquared/Clara" +} diff --git a/ports/clblas/CONTROL b/ports/clblas/CONTROL deleted file mode 100644 index 3837fcbca9abd5..00000000000000 --- a/ports/clblas/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: clblas -Version: 2.12-2 -Build-Depends: opencl -Description: clBLAS is an OpenCL 1.2 accelerated BLAS (Basic Linear Algebra Subsystem) library. diff --git a/ports/clblas/Fix-BuildDLL.patch b/ports/clblas/Fix-BuildDLL.patch new file mode 100644 index 00000000000000..f717c28dc4cbaf --- /dev/null +++ b/ports/clblas/Fix-BuildDLL.patch @@ -0,0 +1,16 @@ +diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt +index f2d5a88..8f84133 100644 +--- a/src/library/CMakeLists.txt ++++ b/src/library/CMakeLists.txt +@@ -910,11 +910,6 @@ endif( ) + + include( InstallRequiredSystemLibraries ) + +-# Install necessary runtime files for debug builds +-install( PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} +- CONFIGURATIONS Debug +- DESTINATION ${CLBLAS_RUNTIME_DESTINATION} ) +- + # Install all *.pdb files for debug builds + install( DIRECTORY ${PROJECT_BINARY_DIR}/staging/ + DESTINATION ${CLBLAS_RUNTIME_DESTINATION} diff --git a/ports/clblas/portfile.cmake b/ports/clblas/portfile.cmake index 5619cea8fdd70a..eeeb71c3f75a4a 100644 --- a/ports/clblas/portfile.cmake +++ b/ports/clblas/portfile.cmake @@ -1,23 +1,17 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO clMathLibraries/clBLAS REF v2.12 SHA512 5d9b0c58adde69e83d95e9c713e0cdc5f64785fe7e05553a14c57fa483c4ef39e9dc780c26880a7f15924967d5ce4ea29035c29d63eac7ee5a2ae5ddacac2b72 HEAD_REF master + PATCHES + cmake.patch + Fix-BuildDLL.patch ) # v2.12 has a very old FindOpenCL.cmake using OPENCL_ vs. OpenCL_ var names # conflicting with the built-in, more modern FindOpenCL.cmake -file( - REMOVE ${SOURCE_PATH}/src/FindOpenCL.cmake -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch -) +file(REMOVE ${SOURCE_PATH}/src/FindOpenCL.cmake) vcpkg_find_acquire_program(PYTHON3) @@ -37,22 +31,20 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL - "${SOURCE_PATH}/LICENSE" - DESTINATION - ${CURRENT_PACKAGES_DIR}/share/clblas - RENAME copyright -) - -file(REMOVE +if(VCPKG_TARGET_IS_WINDOWS) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/clBLAS-tune.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/clBLAS-tune.exe ${CURRENT_PACKAGES_DIR}/bin/clBLAS-tune.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/concrt140d.dll - ${CURRENT_PACKAGES_DIR}/debug/bin/msvcp140d.dll - ${CURRENT_PACKAGES_DIR}/debug/bin/vcruntime140d.dll -) + ) +endif() -vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clBLAS) +endif() vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION ${CURRENT_PACKAGES_DIR}/share/clblas RENAME copyright) diff --git a/ports/clblas/vcpkg.json b/ports/clblas/vcpkg.json new file mode 100644 index 00000000000000..975a0982bc7600 --- /dev/null +++ b/ports/clblas/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "clblas", + "version-string": "2.12", + "port-version": 5, + "description": "clBLAS is an OpenCL 1.2 accelerated BLAS (Basic Linear Algebra Subsystem) library.", + "dependencies": [ + "opencl" + ] +} diff --git a/ports/clblast/CONTROL b/ports/clblast/CONTROL deleted file mode 100644 index 6b8d1c4513fda7..00000000000000 --- a/ports/clblast/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: clblast -Version: 1.5.0 -Build-Depends: opencl -Description: A modern, lightweight, performant and tunable OpenCL BLAS library written in C++11. \ No newline at end of file diff --git a/ports/clblast/portfile.cmake b/ports/clblast/portfile.cmake index d21e1e471e1d9e..6eb78772a5b736 100644 --- a/ports/clblast/portfile.cmake +++ b/ports/clblast/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CNugteren/CLBlast - REF 1.5.0 - SHA512 4d2ba302b3d1c449a5aaeeae97e3d0c03d8baec55276e66f80398fe87f11047f68cec6196eba1228cbfd2911bff9cf5cf5550df925d3b0f3e6ad91302817655c + REF 8433985051c0fb9758fd8dfe7d19cc8eaca630e1 # 1.5.1 + SHA512 17eedfc9fff98c9aafc1b47bf2bc0d29fe38e057fa5142cfe534c168b5bafe7ad092cc7fa4db20926101d024caa5ad47cfd2c1d8f18a071195288015f68f12a1 HEAD_REF master ) @@ -18,28 +16,29 @@ vcpkg_install_cmake() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/clblast.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/clblast.dll ${CURRENT_PACKAGES_DIR}/bin/clblast.dll) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/clblast.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/clblast.dll ${CURRENT_PACKAGES_DIR}/debug/bin/clblast.dll) -endif() - -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -if(EXE OR DEBUG_EXE) - file(REMOVE ${EXE} ${DEBUG_EXE}) +if(VCPKG_TARGET_IS_WINDOWS) + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/clblast.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/clblast.dll ${CURRENT_PACKAGES_DIR}/bin/clblast.dll) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/clblast.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/clblast.dll ${CURRENT_PACKAGES_DIR}/debug/bin/clblast.dll) + endif() + file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + if(EXE OR DEBUG_EXE) + file(REMOVE ${EXE} ${DEBUG_EXE}) + endif() endif() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clblast) vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/clblast) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/clblast/LICENSE ${CURRENT_PACKAGES_DIR}/share/clblast/copyright) \ No newline at end of file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/clblast/vcpkg.json b/ports/clblast/vcpkg.json new file mode 100644 index 00000000000000..1bf12a26b2e004 --- /dev/null +++ b/ports/clblast/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "clblast", + "version-string": "1.5.1", + "port-version": 1, + "description": "A modern, lightweight, performant and tunable OpenCL BLAS library written in C++11.", + "dependencies": [ + "opencl" + ] +} diff --git a/ports/clfft/CONTROL b/ports/clfft/CONTROL deleted file mode 100644 index 4cc887f47f0147..00000000000000 --- a/ports/clfft/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: clfft -Version: 2.12.2-1 -Build-Depends: opencl -Homepage: https://github.com/clMathLibraries/clFFT -Description: clFFT is an OpenCL 1.2 accelerated Fast Fourier Transform library. diff --git a/ports/clfft/portfile.cmake b/ports/clfft/portfile.cmake index 6ef4ec6f77f34c..592a84b1c50d21 100644 --- a/ports/clfft/portfile.cmake +++ b/ports/clfft/portfile.cmake @@ -1,16 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO clMathLibraries/clFFT REF v2.12.2 SHA512 19e9a4e06f76ae7c7808d1188677d5553c43598886a75328b7801ab2ca68e35206839a58fe2f958a44a6f7c83284dc9461cd0e21c37d1042bf82e24aad066be8 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/tweak-install.patch + PATCHES + tweak-install.patch ) vcpkg_configure_cmake( @@ -26,12 +21,12 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL - "${SOURCE_PATH}/LICENSE" - DESTINATION - ${CURRENT_PACKAGES_DIR}/share/clfft/copyright -) - -vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clFFT) +endif() vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION ${CURRENT_PACKAGES_DIR}/share/clfft/copyright) diff --git a/ports/clfft/vcpkg.json b/ports/clfft/vcpkg.json new file mode 100644 index 00000000000000..c3e287507552c4 --- /dev/null +++ b/ports/clfft/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "clfft", + "version-string": "2.12.2", + "port-version": 3, + "description": "clFFT is an OpenCL 1.2 accelerated Fast Fourier Transform library.", + "homepage": "https://github.com/clMathLibraries/clFFT", + "dependencies": [ + "opencl" + ] +} diff --git a/ports/cli/CONTROL b/ports/cli/CONTROL deleted file mode 100644 index a7db9c2edbef90..00000000000000 --- a/ports/cli/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cli -Version: 1.1-1 -Description: A library for interactive command line interfaces in modern C++ -Build-Depends: boost-asio diff --git a/ports/cli/portfile.cmake b/ports/cli/portfile.cmake index c83f75dd80d4f6..e8e1ffc7a4baef 100644 --- a/ports/cli/portfile.cmake +++ b/ports/cli/portfile.cmake @@ -1,20 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO daniele77/cli - REF v1.1.0 - SHA512 a3aeac666567359521d625442f5a03b35ea1e6cf7bd63cdc52dfea20397a1726ce34aeab08ffd7181b9390fb791c56e5aba0260e300329ff327282f1547940c8 + REF v2.0.0 + SHA512 8a3e42d02f8bf757628fb876ccfa376771bbe66e7820d7fd5b34119fca262129f5122e67d939e0898b5964a162a8fd4538d5e6ffa96c4935a8c3979e5d5dbd9d HEAD_REF master ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cli) +vcpkg_cmake_install() + +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cli) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cli RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/cli/vcpkg.json b/ports/cli/vcpkg.json new file mode 100644 index 00000000000000..dc433aa91304e1 --- /dev/null +++ b/ports/cli/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "cli", + "version-semver": "2.0.0", + "description": "A library for interactive command line interfaces in modern C++", + "homepage": "https://github.com/daniele77/cli", + "dependencies": [ + "boost-asio", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/cli11/CONTROL b/ports/cli11/CONTROL deleted file mode 100644 index e478049c12858b..00000000000000 --- a/ports/cli11/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cli11 -Version: 1.8.0 -Description: CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface. -Homepage: https://github.com/CLIUtils/CLI11 diff --git a/ports/cli11/portfile.cmake b/ports/cli11/portfile.cmake index b1096cbacea63e..78776fdbebdfd0 100644 --- a/ports/cli11/portfile.cmake +++ b/ports/cli11/portfile.cmake @@ -1,29 +1,24 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CLIUtils/CLI11 - REF v1.8.0 - SHA512 80071573e3eee524df1ed8cd1fc23c0e197f3ba113db361cb3c2cb843109ddb1c35a65bcb989364bc53d872a80f180e4859f9598da443b870a6260f991705182 + REF 0d06d21b56eadef9dcb24907ee2866b2b6f0babe #version 2.0.0 + SHA512 1952ce0e9fd3bc6646f00abdd7f0f7bae541c383b691a985b0f70ca53fe80a9acbcf68c07c59e021c92aae7b1e062fd7ffe4c9f9b198b95525dde3a1ce83c2f5 HEAD_REF master ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DCLI11_TESTING=OFF - -DCLI11_EXAMPLES=OFF + -DCLI11_BUILD_EXAMPLES=OFF + -DCLI11_BUILD_DOCS=OFF + -DCLI11_BUILD_TESTS=OFF ) -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CLI11) +vcpkg_cmake_install() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CLI11) +vcpkg_fixup_pkgconfig() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cli11 RENAME copyright) - -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME cli11) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/cli11/vcpkg.json b/ports/cli11/vcpkg.json new file mode 100644 index 00000000000000..93f45475d5a495 --- /dev/null +++ b/ports/cli11/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "cli11", + "version-semver": "2.0.0", + "description": "CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.", + "homepage": "https://github.com/CLIUtils/CLI11", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/clickhouse-cpp/fix-error-C4996.patch b/ports/clickhouse-cpp/fix-error-C4996.patch new file mode 100644 index 00000000000000..8da054b57f4994 --- /dev/null +++ b/ports/clickhouse-cpp/fix-error-C4996.patch @@ -0,0 +1,15 @@ +diff --git a/clickhouse/CMakeLists.txt b/clickhouse/CMakeLists.txt +index 7e10ffd..cbbffdc 100644 +--- a/clickhouse/CMakeLists.txt ++++ b/clickhouse/CMakeLists.txt +@@ -31,6 +31,10 @@ SET ( clickhouse-cpp-lib-src + query.cpp + ) + ++if (MSVC) ++ add_compile_options(/wd4996) ++endif() ++ + ADD_LIBRARY (clickhouse-cpp-lib SHARED ${clickhouse-cpp-lib-src}) + SET_TARGET_PROPERTIES(clickhouse-cpp-lib PROPERTIES LINKER_LANGUAGE CXX) + TARGET_LINK_LIBRARIES (clickhouse-cpp-lib diff --git a/ports/clickhouse-cpp/fix-error-c2668.patch b/ports/clickhouse-cpp/fix-error-c2668.patch new file mode 100644 index 00000000000000..4ad1df95364850 --- /dev/null +++ b/ports/clickhouse-cpp/fix-error-c2668.patch @@ -0,0 +1,13 @@ +diff --git a/clickhouse/columns/decimal.cpp b/clickhouse/columns/decimal.cpp +index 7334bb1..41d43b6 100644 +--- a/clickhouse/columns/decimal.cpp ++++ b/clickhouse/columns/decimal.cpp +@@ -27,7 +27,7 @@ inline bool mulOverflow(const Int128 & l, const T & r, Int128 * result) + + #else + template +-inline bool getSignBit(const T & v) ++inline bool getSignBit(const T & (long double v)) + { + return std::signbit(v); + } diff --git a/ports/clickhouse-cpp/portfile.cmake b/ports/clickhouse-cpp/portfile.cmake new file mode 100644 index 00000000000000..5837fb88f9d546 --- /dev/null +++ b/ports/clickhouse-cpp/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ClickHouse/clickhouse-cpp + REF 1415b5936a2ac2f084850b09057e05fb5798b2f1 #v1.5.0 + SHA512 222b31b16744af64f0a874ec956568adcecb553e43f8d4a2d16c00d55b31015d917a4dc7bb30d5430a894459b1be5e05b292e2d0918bf6f5609046a60539f80f + HEAD_REF master + PATCHES + fix-error-c2668.patch + fix-error-C4996.patch #fix x64-uwp error:std::uncaught_exception() is deprecated in C++17 +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/ports/clickhouse-cpp/vcpkg.json b/ports/clickhouse-cpp/vcpkg.json new file mode 100644 index 00000000000000..e3a5b37f190989 --- /dev/null +++ b/ports/clickhouse-cpp/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "clickhouse-cpp", + "version": "1.5.0", + "description": "C++ client for Yandex ClickHouse", + "homepage": "https://github.com/ClickHouse/clickhouse-cpp", + "dependencies": [ + "cityhash", + "lz4", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/clipp/CONTROL b/ports/clipp/CONTROL deleted file mode 100644 index ed8084936b8074..00000000000000 --- a/ports/clipp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: clipp -Version: 2019-04-30 -Description: command line interfaces for modern C++ \ No newline at end of file diff --git a/ports/clipp/portfile.cmake b/ports/clipp/portfile.cmake index ff86dbb3f28555..4793be823071b1 100644 --- a/ports/clipp/portfile.cmake +++ b/ports/clipp/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "muellan/clipp" diff --git a/ports/clipp/vcpkg.json b/ports/clipp/vcpkg.json new file mode 100644 index 00000000000000..e5fc0850cc518d --- /dev/null +++ b/ports/clipp/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "clipp", + "version-string": "2019-04-30", + "port-version": 1, + "description": "command line interfaces for modern C++" +} diff --git a/ports/clockutils/CONTROL b/ports/clockutils/CONTROL deleted file mode 100644 index c555fd4182263b..00000000000000 --- a/ports/clockutils/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: clockutils -Version: 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-3 -Homepage: https://github.com/ClockworkOrigins/clockUtils -Description: A lightweight c++ library for commonly needed tasks. Optimized for simplicity and speed. diff --git a/ports/clockutils/portfile.cmake b/ports/clockutils/portfile.cmake index 7511158de503f1..3c49b79be6608f 100644 --- a/ports/clockutils/portfile.cmake +++ b/ports/clockutils/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ClockworkOrigins/clockUtils diff --git a/ports/clockutils/vcpkg.json b/ports/clockutils/vcpkg.json new file mode 100644 index 00000000000000..066a9ccac7549c --- /dev/null +++ b/ports/clockutils/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "clockutils", + "version-string": "1.1.1-3651f232c27074c4ceead169e223edf5f00247c5", + "port-version": 4, + "description": "A lightweight c++ library for commonly needed tasks. Optimized for simplicity and speed.", + "homepage": "https://github.com/ClockworkOrigins/clockUtils" +} diff --git a/ports/clp/CONTROL b/ports/clp/CONTROL deleted file mode 100644 index adf2036bfab3bf..00000000000000 --- a/ports/clp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: clp -Version: 1.17.2-2 -Description: Clp (Coin-or linear programming) is an open-source linear programming solver written in C++. It is primarily meant to be used as a callable library, but a basic, stand-alone executable version is also available. -Build-Depends: coinutils, osi diff --git a/ports/clp/portfile.cmake b/ports/clp/portfile.cmake index 945a381995fbe0..055ceea186f18a 100644 --- a/ports/clp/portfile.cmake +++ b/ports/clp/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO coin-or/Clp - REF releases/1.17.2 - SHA512 70c44f19fca58c64a745c22b6687f7885dfc88196e1dcb0c3be5b7187ccb541a7e85513eb448dd26a163dd78596c57762f4b103d4027056cf53c5c5a994dc35f + REF 756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb # releases/1.17.6 + SHA512 579f6f47a4878ce82b69474880ef0796893279a8dac6e40feb7c29c5249180704c9b7a6443e717190b85811af3f1768d097511de2aa99396f725d6d02eb1a621 ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/clp/vcpkg.json b/ports/clp/vcpkg.json new file mode 100644 index 00000000000000..7e598d1997df65 --- /dev/null +++ b/ports/clp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "clp", + "version-string": "1.17.6", + "port-version": 1, + "description": "Clp (Coin-or linear programming) is an open-source linear programming solver written in C++. It is primarily meant to be used as a callable library, but a basic, stand-alone executable version is also available.", + "dependencies": [ + "coinutils", + "osi" + ] +} diff --git a/ports/clrng/001-build-fixup.patch b/ports/clrng/001-build-fixup.patch new file mode 100644 index 00000000000000..4bdd727ee82f39 --- /dev/null +++ b/ports/clrng/001-build-fixup.patch @@ -0,0 +1,124 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 65f51db..f010bb8 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -31,7 +31,7 @@ + # ######################################################################## + + +-cmake_minimum_required( VERSION 2.8.10 ) ++cmake_minimum_required( VERSION 3.0 ) + + if( CMAKE_GENERATOR MATCHES "NMake" ) + option( NMAKE_COMPILE_VERBOSE "Print compile and link strings to the console" OFF ) +@@ -127,7 +127,6 @@ if( BUILD64 ) + set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE ) + message( STATUS "64bit build - FIND_LIBRARY_USE_LIB64_PATHS TRUE" ) + +- set( SUFFIX_LIB_DEFAULT "64" ) + else( ) + set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE ) + message( STATUS "32bit build - FIND_LIBRARY_USE_LIB64_PATHS FALSE" ) +@@ -161,7 +160,8 @@ set( SUFFIX_BIN ${SUFFIX_BIN_DEFAULT} CACHE STRING "String to append to 'bin' in + #endif( ) + + # This will define OPENCL_FOUND +-find_package( OpenCL ) ++find_package( OpenCL REQUIRED ) ++find_package( Threads REQUIRED ) + + if( (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) ) + message( STATUS "Cmake version 2.8 or greater needed to use GTest" ) +@@ -170,7 +170,7 @@ else() + find_package( GTest ) + + # Hack to get googletest v1.6 to work with vs2012 +- if( MSVC11 ) ++ if( 0 ) + add_definitions( "/D_VARIADIC_MAX=10" ) + endif( ) + endif() +@@ -196,7 +196,7 @@ get_filename_component( C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME_WE ) + # message( "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} ) + + # Set common compile and link options +-if( MSVC ) ++if( 0 ) + # Following options for nMake + message( STATUS "Detected MSVS Ver: " ${MSVC_VERSION} ) + +@@ -206,6 +206,7 @@ if( MSVC ) + string( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}" ) + + elseif( CMAKE_COMPILER_IS_GNUCXX ) ++ if( 0 ) + message( STATUS "Detected GNU fortran compiler." ) + EXEC_PROGRAM( ${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE vnum ) + STRING(REGEX REPLACE ".*([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" vnum ${vnum}) +@@ -216,6 +217,7 @@ elseif( CMAKE_COMPILER_IS_GNUCXX ) + + set( CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}" ) + set( CMAKE_C_FLAGS "-std=c11 -Wall -pedantic-errors -pthread ${CMAKE_C_FLAGS}" ) ++ endif() + + if( BUILD64 ) + set( CMAKE_CXX_FLAGS "-m64 ${CMAKE_CXX_FLAGS}" ) +diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt +index dbe479d..8717e58 100644 +--- a/src/library/CMakeLists.txt ++++ b/src/library/CMakeLists.txt +@@ -62,8 +62,6 @@ set( clRNG.Headers private.h + + set( clRNG.Files ${clRNG.Source} ${clRNG.Headers} ) + +-# Include standard OpenCL headers +-include_directories( ${OPENCL_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/include ../include ) + + if(BUILD_SHARED_LIBRARY) + add_library( clRNG SHARED ${clRNG.Files} ) +@@ -72,6 +70,15 @@ else() + endif() + target_link_libraries( clRNG ${OPENCL_LIBRARIES} ) + ++target_link_libraries( clRNG PUBLIC ++ OpenCL::OpenCL ++ Threads::Threads ++) ++target_include_directories( clRNG PUBLIC ++ $ ++ $ ++) ++ + set_target_properties( clRNG PROPERTIES VERSION ${CLRNG_VERSION} ) + set_target_properties( clRNG PROPERTIES SOVERSION ${CLRNG_SOVERSION} ) + set_target_properties( clRNG PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" ) +@@ -89,7 +96,7 @@ install( TARGETS clRNG + EXPORT clRNG-Targets + RUNTIME DESTINATION bin${SUFFIX_BIN} + LIBRARY DESTINATION lib${SUFFIX_LIB} +- ARCHIVE DESTINATION lib${SUFFIX_LIB}/import ++ ARCHIVE DESTINATION lib${SUFFIX_LIB} + ) + + # CMake config files for clRNG +@@ -139,9 +146,9 @@ endif( ) + include( InstallRequiredSystemLibraries ) + + # Install necessary runtime files for debug builds +-install( PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} +- CONFIGURATIONS Debug +- DESTINATION ${CLRNG_RUNTIME_DESTINATION} ) ++#install( PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ++# CONFIGURATIONS Debug ++# DESTINATION ${CLRNG_RUNTIME_DESTINATION} ) + + # Install all *.pdb files for debug builds + install( DIRECTORY ${PROJECT_BINARY_DIR}/staging/ +@@ -152,6 +159,6 @@ install( DIRECTORY ${PROJECT_BINARY_DIR}/staging/ + + # Install a snapshot of the source as it was for this build; useful for the .pdb's + install( DIRECTORY ${PROJECT_SOURCE_DIR} +- DESTINATION ${CLRNG_RUNTIME_DESTINATION} ++ DESTINATION "." + OPTIONAL + CONFIGURATIONS Debug ) diff --git a/ports/clrng/portfile.cmake b/ports/clrng/portfile.cmake new file mode 100644 index 00000000000000..d6a390a3e3f670 --- /dev/null +++ b/ports/clrng/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_fail_port_install(ON_ARCH "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO clMathLibraries/clRNG + REF 4a16519ddf52ee0a5f0b7e6288b0803b9019c13b + SHA512 28bda5d2a156e7394917f8c40bd1e8e7b52cf680abc0ef50c2650b1d546c0a1d0bd47ceeccce3cd7c79c90a15494c3d27829e153613a7d8e18267ce7262eeb6e + HEAD_REF master + PATCHES + 001-build-fixup.patch +) + +file(REMOVE ${SOURCE_PATH}/src/FindOpenCL.cmake) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT VCPKG_CMAKE_SYSTEM_NAME) + set(R123_SSE_FLAG [[-DCMAKE_C_FLAGS="/DR123_USE_SSE=0"]]) +endif() + +# We only have x64 and x86 as valid archs, as arm64 fails fast +string(COMPARE EQUAL "${VCPKG_TARGET_ARCHITECTURE}" "x64" BUILD64) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBRARY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA + OPTIONS + -DBUILD_SHARED_LIBRARY=${BUILD_SHARED_LIBRARY} + -DBUILD64=${BUILD64} + -DBUILD_TEST=OFF + -DBUILD_CLIENT=OFF + ${R123_SSE_FLAG} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file( + REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clRNG) + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/clrng/vcpkg.json b/ports/clrng/vcpkg.json new file mode 100644 index 00000000000000..a7415ab0bf8832 --- /dev/null +++ b/ports/clrng/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "clrng", + "version-string": "2020-12-01", + "port-version": 1, + "description": "clRNG is a library for uniform random number generation in OpenCL.", + "homepage": "https://github.com/clMathLibraries/clRNG", + "supports": "!arm64", + "dependencies": [ + "opencl" + ] +} diff --git a/ports/clue/CMakeLists.txt b/ports/clue/CMakeLists.txt new file mode 100644 index 00000000000000..451d414b8097cf --- /dev/null +++ b/ports/clue/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.5) + +project(clue VERSION 1.0.0 LANGUAGES CXX) + +option(CLUE_BUILD_TEST "Build tests for clue" OFF) +option(CLUE_BUILD_EXAMPLE "Build examples" OFF) + +include(GNUInstallDirs) +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/clue.hpp") + +if(CLUE_BUILD_TEST) + file(GLOB TEST_SOURCES "tests/*.cpp") + add_executable(test_clue ${TEST_SOURCES}) + target_include_directories(test_clue PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/tests) + install(TARGETS test_clue + RUNTIME DESTINATION tools) +endif() + +if(CLUE_BUILD_EXAMPLE) + file(GLOB EXAMPLES "examples/*.cpp") + install(FILES ${EXAMPLES} DESTINATION examples) +endif() + +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/clue.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +# end of file \ No newline at end of file diff --git a/ports/clue/portfile.cmake b/ports/clue/portfile.cmake new file mode 100644 index 00000000000000..3b9715f9e98932 --- /dev/null +++ b/ports/clue/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/clue + REF v1.0.0-alpha.7 + SHA512 4f0d1115dcf16412239e1ac158be210403f93596b76c91100ae81be3d4f4cb04dda525101850356a7195b219c826305a82cab7a96b1bc1e2cefaa7860a853e73 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test CLUE_BUILD_TEST +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/clue/vcpkg.json b/ports/clue/vcpkg.json new file mode 100644 index 00000000000000..105741b0955ea8 --- /dev/null +++ b/ports/clue/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "clue", + "version-string": "1.0.0-alpha.7", + "port-version": 1, + "description": "clue is a C++03 header-only library to log messages with a severity and optional module identifier.", + "homepage": "https://github.com/martinmoene/clue", + "features": { + "test": { + "description": "Build test" + } + } +} diff --git a/ports/cmark/CONTROL b/ports/cmark/CONTROL deleted file mode 100644 index 8528ca5793954b..00000000000000 --- a/ports/cmark/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cmark -Version: 0.29.0 -Description: CommonMark parsing and rendering library diff --git a/ports/cmark/add-feature-tools.patch b/ports/cmark/add-feature-tools.patch new file mode 100644 index 00000000000000..5410ff68b58dac --- /dev/null +++ b/ports/cmark/add-feature-tools.patch @@ -0,0 +1,54 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3a78d0b..7065c89 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -52,6 +52,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmark_version.h.in + include(GNUInstallDirs) + include (GenerateExportHeader) + ++if (BUILD_TOOLS) + add_executable(${PROGRAM} ${PROGRAM_SOURCES}) + cmark_add_compile_options(${PROGRAM}) + set_target_properties(${PROGRAM} PROPERTIES +@@ -65,6 +66,7 @@ if (CMARK_STATIC) + elseif (CMARK_SHARED) + target_link_libraries(${PROGRAM} ${LIBRARY}) + endif() ++endif() + + # -fvisibility=hidden + set(CMAKE_C_VISIBILITY_PRESET hidden) +@@ -114,23 +116,30 @@ if (CMARK_STATIC) + list(APPEND CMARK_INSTALL ${STATICLIBRARY}) + endif() + +-if (MSVC) ++if (MSVC AND BUILD_TOOLS) + set_property(TARGET ${PROGRAM} + APPEND PROPERTY LINK_FLAGS /INCREMENTAL:NO) +-endif(MSVC) ++endif(MSVC AND BUILD_TOOLS) + + if(NOT MSVC OR CMAKE_HOST_SYSTEM_NAME STREQUAL Windows) + set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON) + include(InstallRequiredSystemLibraries) + endif() + +-install(TARGETS ${PROGRAM} ${CMARK_INSTALL} ++install(TARGETS ${CMARK_INSTALL} + EXPORT cmark-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + ++if (BUILD_TOOLS) ++ install(TARGETS ${PROGRAM} ++ EXPORT cmark-targets ++ RUNTIME DESTINATION tools/cmark ++ ) ++endif() ++ + if(CMARK_SHARED OR CMARK_STATIC) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcmark.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc @ONLY) diff --git a/ports/cmark/portfile.cmake b/ports/cmark/portfile.cmake index da7ac329ffc23a..b263deaca9e5ac 100644 --- a/ports/cmark/portfile.cmake +++ b/ports/cmark/portfile.cmake @@ -1,44 +1,48 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO commonmark/cmark - REF 0.29.0 - SHA512 06eb110cfd90c9e980c022b7588e28864d15a4da5d07d61ad4b27c6de47367492b9e58e9434e62b07517aa6dc484f17af13916808be3188f38c37d20cbf33112 + REF 977b128291c0cf6c5053cdcf2ac72e627f09c105 #0.30.1 + SHA512 ff8139fbb45549d6bea70e11c35ae1d8cf6108d0141688cc2b878afa6247147e0c15ac885e6ed8fa2263534dc79e88e398b30d3d3ae800f13dcdd878114adac8 HEAD_REF master PATCHES - "${CMAKE_CURRENT_LIST_DIR}/rename-shared-lib.patch" + add-feature-tools.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CMARK_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CMARK_SHARED) -vcpkg_configure_cmake( +if ("tools" IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "${PORT} does no support to build tools on UWP") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools BUILD_TOOLS +) + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS + ${FEATURE_OPTIONS} -DCMARK_TESTS=OFF -DCMARK_SHARED=${CMARK_SHARED} -DCMARK_STATIC=${CMARK_STATIC} ) -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_cmake_install() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmark RENAME copyright) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cmark) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_fixup_pkgconfig() -if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/cmark.exe) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/cmark.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/cmark/) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/cmark) +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES cmark SEARCH_DIR "${CURRENT_PACKAGES_DIR}/tools/cmark" AUTO_CLEAN) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT EXISTS ${CURRENT_PACKAGES_DIR}/bin/cmark) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/cmark.exe ${CURRENT_PACKAGES_DIR}/debug/bin/cmark.exe) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/cmark/rename-shared-lib.patch b/ports/cmark/rename-shared-lib.patch deleted file mode 100644 index 79439aae128aa0..00000000000000 --- a/ports/cmark/rename-shared-lib.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index d5a1936..acff569 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -83,7 +83,6 @@ if (CMARK_SHARED) - add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES}) - # Include minor version and patch level in soname for now. - set_target_properties(${LIBRARY} PROPERTIES -- OUTPUT_NAME "cmark" - SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} - VERSION ${PROJECT_VERSION}) - diff --git a/ports/cmark/vcpkg.json b/ports/cmark/vcpkg.json new file mode 100644 index 00000000000000..bfb1999a602bcd --- /dev/null +++ b/ports/cmark/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "cmark", + "version-semver": "0.30.1", + "description": "CommonMark parsing and rendering library", + "homepage": "https://github.com/commonmark/cmark", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tools": { + "description": "Build tools" + } + } +} diff --git a/ports/cmcstl2/CONTROL b/ports/cmcstl2/CONTROL deleted file mode 100644 index 42b652ce4dd71f..00000000000000 --- a/ports/cmcstl2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cmcstl2 -Version: 2019-07-20 -Description: An implementation of C++ Extensions for Ranges -Homepage: https://github.com/CaseyCarter/cmcstl2 diff --git a/ports/cmcstl2/portfile.cmake b/ports/cmcstl2/portfile.cmake index e2a0b9a3f5d9b3..d1e7125a5e296e 100644 --- a/ports/cmcstl2/portfile.cmake +++ b/ports/cmcstl2/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaseyCarter/cmcstl2 @@ -26,6 +24,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/cmcstl2/vcpkg.json b/ports/cmcstl2/vcpkg.json new file mode 100644 index 00000000000000..df0d6a2a52add9 --- /dev/null +++ b/ports/cmcstl2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cmcstl2", + "version-string": "2019-07-20", + "port-version": 1, + "description": "An implementation of C++ Extensions for Ranges", + "homepage": "https://github.com/CaseyCarter/cmcstl2" +} diff --git a/ports/cmocka/CONTROL b/ports/cmocka/CONTROL deleted file mode 100644 index 042cf23a7ed885..00000000000000 --- a/ports/cmocka/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cmocka -Version: 1.1.5-1 -Description: An elegant unit testing framework for C with support for mock objects diff --git a/ports/cmocka/fix-uwp.patch b/ports/cmocka/fix-uwp.patch deleted file mode 100644 index cb3828b1c2cd47..00000000000000 --- a/ports/cmocka/fix-uwp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/cmocka.c b/src/cmocka.c -index 6bfc831..4c1c04b 100644 ---- a/src/cmocka.c -+++ b/src/cmocka.c -@@ -3356,7 +3356,7 @@ int _run_tests(const UnitTest * const tests, const size_t number_of_tests) { - int _run_group_tests(const UnitTest * const tests, const size_t number_of_tests) - { - UnitTestFunction setup = NULL; -- const char *setup_name; -+ const char *setup_name = NULL; - size_t num_setups = 0; - UnitTestFunction teardown = NULL; - const char *teardown_name = NULL; diff --git a/ports/cmocka/portfile.cmake b/ports/cmocka/portfile.cmake index a448d3a70c58a8..220868ebb3ec26 100644 --- a/ports/cmocka/portfile.cmake +++ b/ports/cmocka/portfile.cmake @@ -1,28 +1,20 @@ -include(vcpkg_common_functions) - vcpkg_from_gitlab( GITLAB_URL https://gitlab.com OUT_SOURCE_PATH SOURCE_PATH REPO cmocka/cmocka - REF cmocka-1.1.5 - SHA512 4e305e500f448676be5503972c49089c51f38b47d8129add2205608ed73f9de8b911aee83c00da4ef52c0179a5b5ba0e3386f3bca839f18e7ab21787184d9990 + REF 672c5cee79eb412025c3dd8b034e611c1f119055 + SHA512 e02ffe780698ce3930aceb1b927f7d48c932c6bb251a32b1f4ab44ecb4ff6bfe5c2a6b9e2dfede49cd4cc1d68a8bb903ef1d26c28536abf3581a9d803287aa0a HEAD_REF master - PATCHES - shared-lib.patch - static-lib.patch - fix-uwp.patch ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIB) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DWITH_CMOCKERY_SUPPORT=ON -DUNIT_TESTING=OFF -DWITH_EXAMPLES=OFF - -DBUILD_STATIC_LIB=${BUILD_STATIC_LIB} - -DWITH_STATIC_LIB=${BUILD_STATIC_LIB} + -DPICKY_DEVELOPER=OFF ) vcpkg_install_cmake() @@ -31,18 +23,6 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} -) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# Install usage -configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) - -# CMake integration test -#vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cmocka/shared-lib.patch b/ports/cmocka/shared-lib.patch deleted file mode 100644 index 8c2f76277bd66f..00000000000000 --- a/ports/cmocka/shared-lib.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 5684685..8555169 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -30,7 +30,7 @@ if (WIN32) - cmocka.def - ) - endif (WIN32) -- -+if (BUILD_SHARED_LIBS) - add_library(${CMOCKA_SHARED_LIBRARY} SHARED ${cmocka_SRCS}) - - target_include_directories(${CMOCKA_SHARED_LIBRARY} -@@ -82,7 +82,7 @@ install(TARGETS - ${CMAKE_INSTALL_BINDIR} - COMPONENT - ${PROJECT_NAME}) -- -+endif (BUILD_SHARED_LIBS) - if (BUILD_STATIC_LIB) - add_library(${CMOCKA_STATIC_LIBRARY} STATIC ${cmocka_SRCS}) - diff --git a/ports/cmocka/static-lib.patch b/ports/cmocka/static-lib.patch deleted file mode 100644 index f879fe25bd1f75..00000000000000 --- a/ports/cmocka/static-lib.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 00e568e..6e3489a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -77,9 +77,17 @@ install( - - # cmake config files - if (WIN32) -+ if (BUILD_SHARED_LIBS) - set(CMOCKA_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}) -+ else() -+ set(CMOCKA_LIBRARY_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}${CMOCKA_STATIC_LIBRARY}${CMAKE_IMPORT_LIBRARY_SUFFIX}) -+ endif() - else() -+ if (BUILD_SHARED_LIBS) - set(CMOCKA_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) -+ else() -+ set(CMOCKA_LIBRARY_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}${CMOCKA_STATIC_LIBRARY}${CMAKE_STATIC_LIBRARY_SUFFIX}) -+ endif() - endif() - - set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE INTERNAL "") diff --git a/ports/cmocka/usage b/ports/cmocka/usage deleted file mode 100644 index 59f2a5da8b63b4..00000000000000 --- a/ports/cmocka/usage +++ /dev/null @@ -1,5 +0,0 @@ -The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: - - find_package(@PORT@ CONFIG REQUIRED) - target_include_directories(main PRIVATE ${CMOCKA_INCLUDE_DIR}) - target_link_libraries(main PRIVATE ${CMOCKA_LIBRARIES}) diff --git a/ports/cmocka/vcpkg-cmake-wrapper.cmake b/ports/cmocka/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index 49b486ff83b493..00000000000000 --- a/ports/cmocka/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,10 +0,0 @@ -_find_package(${ARGS}) - -get_filename_component(_cmocka_lib_name ${CMOCKA_LIBRARY} NAME) - -set(CMOCKA_LIBRARY - debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/${_cmocka_lib_name} - optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/${_cmocka_lib_name} -) - -set(CMOCKA_LIBRARIES ${CMOCKA_LIBRARY}) diff --git a/ports/cmocka/vcpkg.json b/ports/cmocka/vcpkg.json new file mode 100644 index 00000000000000..d7bcbcf49635a2 --- /dev/null +++ b/ports/cmocka/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cmocka", + "version-string": "2020-08-01", + "description": "An elegant unit testing framework for C with support for mock objects", + "homepage": "https://cmocka.org/", + "license": "Apache-2.0" +} diff --git a/ports/cnl/CONTROL b/ports/cnl/CONTROL deleted file mode 100644 index 8daea5ae60981d..00000000000000 --- a/ports/cnl/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cnl -Version: 2019-06-23 -Description: A Compositional Numeric Library for C++ diff --git a/ports/cnl/disable-test.patch b/ports/cnl/disable-test.patch new file mode 100644 index 00000000000000..58ecad53552ba9 --- /dev/null +++ b/ports/cnl/disable-test.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 73111fc..a0cb3db 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,8 +9,8 @@ project(cnl) + + cmake_minimum_required(VERSION 3.5.1) + +-include(CTest) +-add_subdirectory("test") ++# include(CTest) ++# add_subdirectory("test") + + # the CNL library + add_library(Cnl INTERFACE) diff --git a/ports/cnl/portfile.cmake b/ports/cnl/portfile.cmake index 885cad137bc0ba..13ba7327585ffb 100644 --- a/ports/cnl/portfile.cmake +++ b/ports/cnl/portfile.cmake @@ -1,13 +1,12 @@ # header-only library - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO johnmcfarlane/cnl - REF 48428242e72b8239cb14c963e40f724929d54df7 - SHA512 c7e012d99409977137a44915dd7a4df5014b6e8540ceee3e82492052541ce77a254d79e624d766b510e7d3a6b17a9d9b02391c6993ae55d3904334116e747983 - HEAD_REF develop + REF 2dde6e62e608a4adc3c5504f067575efa4910568 #v1.1.7 + SHA512 33a81ea726802c71a684bcd002b5119cde4db471ebc9ba02cd15c7487ab468eeca09fb8dcaed953e3f3cded2cd813a903f808d97527b0ec7f393647b64a22572 + HEAD_REF main + PATCHES + disable-test.patch ) vcpkg_configure_cmake( @@ -23,6 +22,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/cnl/vcpkg.json b/ports/cnl/vcpkg.json new file mode 100644 index 00000000000000..930fcdeed6706b --- /dev/null +++ b/ports/cnl/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cnl", + "version-string": "1.1.7", + "port-version": 1, + "description": "A Compositional Numeric Library for C++", + "homepage": "https://github.com/johnmcfarlane/cnl" +} diff --git a/ports/co/portfile.cmake b/ports/co/portfile.cmake new file mode 100644 index 00000000000000..a4b4a08d5799d9 --- /dev/null +++ b/ports/co/portfile.cmake @@ -0,0 +1,34 @@ +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + vcpkg_fail_port_install(ON_ARCH "arm" ON_TAREGT "uwp") +endif() + +# It's not safe to use dynamic library, as we hooked some system APIs in CO. +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO idealvin/co + REF 82b9f75dcd114c69d2b9c2c5a13ce2c3b95ba99f #v2.0.1 + SHA512 ec33c5b920adf8b5e5500ed7c9768bd595ba2b568b604f26f953ddb5d04e411e8a2ea05b213595a44cafbadf90c1e1661208855301b2b47295ccc6e20f36e8d8 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + libcurl WITH_LIBCURL + openssl WITH_OPENSSL +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/co/vcpkg.json b/ports/co/vcpkg.json new file mode 100644 index 00000000000000..70adff17214b58 --- /dev/null +++ b/ports/co/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "co", + "version-semver": "2.0.1", + "description": "A go-style coroutine library in C++11 and more", + "homepage": "https://github.com/idealvin/co", + "supports": "!uwp & !(arm & windows)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "features": { + "libcurl": { + "description": "libcurl with OpenSSL support", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "openssl" + ] + } + ] + }, + "openssl": { + "description": "SSL support (OpenSSL)", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/coin/disable-cpackd.patch b/ports/coin/disable-cpackd.patch new file mode 100644 index 00000000000000..81afeb668d26d2 --- /dev/null +++ b/ports/coin/disable-cpackd.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f32f6ffe3..639fc4109 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -815,4 +815,4 @@ endif() + + # ############################################################################ + # New CPACK section, please see the README file inside cpack.d directory. +-add_subdirectory(cpack.d) ++#add_subdirectory(cpack.d) diff --git a/ports/coin/portfile.cmake b/ports/coin/portfile.cmake new file mode 100644 index 00000000000000..830bd64f9770bf --- /dev/null +++ b/ports/coin/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Coin3D/coin + REF Coin-4.0.0 + SHA512 8a0289cab3e02a7417022fe659ec30a2dd705b9bacb254e0269ada9155c76c6aea0285c475cd6e663f5d7f2b49e60244b16baac7188d57e3d7f8ab08d228f21f + HEAD_REF master + PATCHES + disable-cpackd.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(COIN_BUILD_SHARED_LIBS OFF) +else() + set(COIN_BUILD_SHARED_LIBS ON) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(COIN_BUILD_MSVC_STATIC_RUNTIME OFF) +elseif(VCPKG_CRT_LINKAGE STREQUAL static) + set(COIN_BUILD_MSVC_STATIC_RUNTIME ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOIN_BUILD_DOCUMENTATION=OFF + -DCOIN_BUILD_MSVC_STATIC_RUNTIME=${COIN_BUILD_MSVC_STATIC_RUNTIME} + -DCOIN_BUILD_SHARED_LIBS=${COIN_BUILD_SHARED_LIBS} + -DCOIN_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Coin-4.0.0) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Coin/profiler) diff --git a/ports/coin/vcpkg.json b/ports/coin/vcpkg.json new file mode 100644 index 00000000000000..c9f254f77d2243 --- /dev/null +++ b/ports/coin/vcpkg.json @@ -0,0 +1,65 @@ +{ + "name": "coin", + "version-string": "4.0.0", + "port-version": 3, + "description": "A high-level 3D visualization library with Open Inventor 2.1 API", + "homepage": "https://github.com/coin3d/coin", + "supports": "!(arm | arm64 | uwp)", + "dependencies": [ + "boost-assert", + "boost-config", + "boost-lexical-cast", + "boost-math", + "boost-smart-ptr", + "boost-static-assert", + "opengl-registry" + ], + "default-features": [ + "simage", + "zlib" + ], + "features": { + "bzip2": { + "description": "Support bzip2 compressed fonts", + "dependencies": [ + "bzip2", + { + "name": "freetype", + "features": [ + "bzip2" + ] + } + ] + }, + "fontconfig": { + "description": "Use fontconfig for font support", + "dependencies": [ + "fontconfig" + ] + }, + "freetype": { + "description": "Use freetype for font support", + "dependencies": [ + "freetype" + ] + }, + "openal": { + "description": "Use OpenAL for sound support in VRML97", + "dependencies": [ + "openal-soft" + ] + }, + "simage": { + "description": "Use simage for loading images (textures), audio, and animations", + "dependencies": [ + "simage" + ] + }, + "zlib": { + "description": "Use zlib for reading/writing compressed files", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/coinutils/CONTROL b/ports/coinutils/CONTROL deleted file mode 100644 index 13db5a93720cf8..00000000000000 --- a/ports/coinutils/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: coinutils -Version: 2.11.2-2 -Description: CoinUtils (Coin-or Utilities) is an open-source collection of classes and functions that are generally useful to more than one COIN-OR project diff --git a/ports/coinutils/portfile.cmake b/ports/coinutils/portfile.cmake index 23a2a673d016de..dc479dbd194dc4 100644 --- a/ports/coinutils/portfile.cmake +++ b/ports/coinutils/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO coin-or/CoinUtils - REF releases/2.11.2 - SHA512 4ffc1458676daffc46f2448c8962156f1f6a14d41f176462ebb695487ae3e96ae159e078f8f28ac5df4cd22544b3f19f09692725976624454d106ad33d31e30b + REF f709081c9b57cc2dd32579d804b30689ca789982 # releases/2.11.4 + SHA512 1c2e7f796524d67d87253bc7938c1a6db3c8266acec6b6399aeb83c0fb253b77507e6b5e84f16b0b8e40098aef94676499f396d1c7f653b1e04cbadca7620185 ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/coinutils/vcpkg.json b/ports/coinutils/vcpkg.json new file mode 100644 index 00000000000000..2f71443767ea45 --- /dev/null +++ b/ports/coinutils/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "coinutils", + "version-string": "2.11.4", + "port-version": 1, + "description": "CoinUtils (Coin-or Utilities) is an open-source collection of classes and functions that are generally useful to more than one COIN-OR project" +} diff --git a/ports/collada-dom/CONTROL b/ports/collada-dom/CONTROL deleted file mode 100644 index 31ded7253240b0..00000000000000 --- a/ports/collada-dom/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: collada-dom -Version: 2.5.0-2 -Description: The COLLADA Document Object Model (DOM) is an application programming interface (API) that provides a C++ object representation of a COLLADA XML instance document. -Build-Depends: zlib, libxml2, minizip, pcre, uriparser, boost-filesystem, boost-system diff --git a/ports/collada-dom/fix-shared-keyword.patch b/ports/collada-dom/fix-shared-keyword.patch new file mode 100644 index 00000000000000..1066622ad840ef --- /dev/null +++ b/ports/collada-dom/fix-shared-keyword.patch @@ -0,0 +1,13 @@ +diff --git a/dom/CMakeLists.txt b/dom/CMakeLists.txt +index 62e1b8a..7ff49b5 100644 +--- a/dom/CMakeLists.txt ++++ b/dom/CMakeLists.txt +@@ -28,7 +28,7 @@ if( OPT_COLLADA14 ) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.4 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} COMPONENT ${COMPONENT_PREFIX}-dev PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) + endif() + +-add_library(collada-dom SHARED ${COLLADA_BASE_SOURCES}) ++add_library(collada-dom ${COLLADA_BASE_SOURCES}) + target_link_libraries(collada-dom ${COLLADA_LIBS}) + set_target_properties(collada-dom PROPERTIES + COMPILE_FLAGS "${COLLADA_COMPILE_FLAGS}" diff --git a/ports/collada-dom/portfile.cmake b/ports/collada-dom/portfile.cmake index 20ee9fffad1639..84c236dab08fc7 100644 --- a/ports/collada-dom/portfile.cmake +++ b/ports/collada-dom/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/collada-dom-2.5.0) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rdiankov/collada-dom @@ -9,7 +7,8 @@ vcpkg_from_github( PATCHES vs-version-detection.patch use-uriparser.patch - use-vcpkg-minizip.patch + use-vcpkg-minizip.patch + fix-shared-keyword.patch ) vcpkg_configure_cmake( @@ -24,6 +23,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/collada_dom-2.5) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(INSTALL ${SOURCE_PATH}/licenses/license_e.txt DESTINATION - ${CURRENT_PACKAGES_DIR}/share/collada-dom - RENAME copyright) +file(INSTALL ${SOURCE_PATH}/licenses/license_e.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/collada-dom/vcpkg.json b/ports/collada-dom/vcpkg.json new file mode 100644 index 00000000000000..e929b4a076eed0 --- /dev/null +++ b/ports/collada-dom/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "collada-dom", + "version-string": "2.5.0", + "port-version": 5, + "description": "The COLLADA Document Object Model (DOM) is an application programming interface (API) that provides a C++ object representation of a COLLADA XML instance document.", + "homepage": "https://github.com/rdiankov/collada-dom", + "dependencies": [ + "boost-filesystem", + "boost-system", + "libxml2", + "minizip", + "pcre", + "uriparser", + "zlib" + ] +} diff --git a/ports/colmap/fix-dependency-freeimage.patch b/ports/colmap/fix-dependency-freeimage.patch new file mode 100644 index 00000000000000..29b591e34127fa --- /dev/null +++ b/ports/colmap/fix-dependency-freeimage.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b05097c..cdd8ca4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -96,7 +96,8 @@ find_package(Boost REQUIRED COMPONENTS + + find_package(Eigen3 REQUIRED) + +-find_package(FreeImage REQUIRED) ++find_package(freeimage CONFIG REQUIRED) ++set(FREEIMAGE_LIBRARIES freeimage::FreeImage) + + find_package(Glog REQUIRED) + diff --git a/ports/colmap/portfile.cmake b/ports/colmap/portfile.cmake new file mode 100644 index 00000000000000..4ab35bbc32a882 --- /dev/null +++ b/ports/colmap/portfile.cmake @@ -0,0 +1,90 @@ +set(COLMAP_REF "3.6") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO colmap/colmap + REF ${COLMAP_REF} + SHA512 9a4b4f2a49891ce8ac32ab1f2e9b859336326bada889e6de49c017a069884bb6c8ab8a2ae430d955e58fc22377c63e8fba9ce80ff959713e2878e29814d44632 + HEAD_REF dev + PATCHES fix-dependency-freeimage.patch +) + +if (NOT TRIPLET_SYSTEM_ARCH STREQUAL "x64" AND ("cuda" IN_LIST FEATURES OR "cuda-redist" IN_LIST FEATURES)) + message(FATAL_ERROR "Feature cuda and cuda-redist require x64 triplet.") +endif() + +# set GIT_COMMIT_ID and GIT_COMMIT_DATE +if(DEFINED VCPKG_HEAD_VERSION) + set(GIT_COMMIT_ID "${VCPKG_HEAD_VERSION}") +else() + set(GIT_COMMIT_ID "${COLMAP_REF}") +endif() + +string(TIMESTAMP COLMAP_GIT_COMMIT_DATE "%Y-%m-%d") + +set(CUDA_ENABLED OFF) +set(TESTS_ENABLED OFF) + +if("cuda" IN_LIST FEATURES) + set(CUDA_ENABLED ON) +endif() + +if("cuda-redist" IN_LIST FEATURES) + set(CUDA_ENABLED ON) + set(CUDA_ARCHS "Common") +endif() + +if("tests" IN_LIST FEATURES) + set(TESTS_ENABLED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCUDA_ENABLED=${CUDA_ENABLED} + -DCUDA_ARCHS=${CUDA_ARCHS} + -DTESTS_ENABLED=${TESTS_ENABLED} + -DGIT_COMMIT_ID=${GIT_COMMIT_ID} + -DGIT_COMMIT_DATE=${COLMAP_GIT_COMMIT_DATE} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(GLOB TOOL_FILENAMES "${CURRENT_PACKAGES_DIR}/bin/*") +foreach(TOOL_FILENAME ${TOOL_FILENAMES}) + get_filename_component(TEST_TOOL_NAME ${TOOL_FILENAME} NAME_WLE) + list(APPEND COLMAP_TOOL_NAMES "${TEST_TOOL_NAME}") +endforeach() + +vcpkg_copy_tools(TOOL_NAMES ${COLMAP_TOOL_NAMES} AUTO_CLEAN) + +# remove empty folders and unused files +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/exe + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/lib/Graclus/multilevelLib + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/tools + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/media + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/shaders + ${CURRENT_PACKAGES_DIR}/include/colmap/exe + ${CURRENT_PACKAGES_DIR}/include/colmap/lib/Graclus/multilevelLib + ${CURRENT_PACKAGES_DIR}/include/colmap/tools + ${CURRENT_PACKAGES_DIR}/include/colmap/ui/media + ${CURRENT_PACKAGES_DIR}/include/colmap/ui/shaders + ${CURRENT_PACKAGES_DIR}/COLMAP.bat + ${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat + ${CURRENT_PACKAGES_DIR}/debug/COLMAP.bat + ${CURRENT_PACKAGES_DIR}/debug/RUN_TESTS.bat + ${CURRENT_PACKAGES_DIR}/debug/bin +) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/ports/colmap/usage b/ports/colmap/usage new file mode 100644 index 00000000000000..b71316b3cf81a3 --- /dev/null +++ b/ports/colmap/usage @@ -0,0 +1,10 @@ +For example, under Windows, execute COLMAP as: + + \packages\colmap_\tools\colmap\colmap.exe gui + \packages\colmap_\tools\colmap\colmap.exe mapper + \packages\colmap_\tools\colmap\colmap.exe ... + +The package colmap provides CMake integration: + + find_package(COLMAP REQUIRED) + target_link_libraries(main ${COLMAP_LIBRARIES}) diff --git a/ports/colmap/vcpkg.json b/ports/colmap/vcpkg.json new file mode 100644 index 00000000000000..5a43d64f86129f --- /dev/null +++ b/ports/colmap/vcpkg.json @@ -0,0 +1,53 @@ +{ + "name": "colmap", + "version-string": "3.6", + "port-version": 1, + "description": "COLMAP is a general-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline with a graphical and command-line interface. It offers a wide range of features for reconstruction of ordered and unordered image collections. The software is licensed under the new BSD license.", + "homepage": "https://colmap.github.io/", + "license": "BSD-3-Clause", + "dependencies": [ + "boost-filesystem", + "boost-graph", + "boost-program-options", + "boost-regex", + "boost-system", + "boost-test", + { + "name": "ceres", + "features": [ + "lapack", + "suitesparse" + ] + }, + { + "name": "cgal", + "features": [ + "qt" + ] + }, + "eigen3", + "freeimage", + "gflags", + "glew", + "glog", + "qt5-base", + "suitesparse" + ], + "features": { + "cuda": { + "description": "CUDA support for current compute architecture of this machine.", + "dependencies": [ + "cuda" + ] + }, + "cuda-redist": { + "description": "Redistributable CUDA support for common supported compute architectures.", + "dependencies": [ + "cuda" + ] + }, + "tests": { + "description": "Enable TESTS." + } + } +} diff --git a/ports/comms-ublox/fix-comms.patch b/ports/comms-ublox/fix-comms.patch new file mode 100644 index 00000000000000..d9620a4aa5811a --- /dev/null +++ b/ports/comms-ublox/fix-comms.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e2b69fe..aff5917 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,6 +66,7 @@ endif () + ###################################################################### + + # Use external CommsChampion project or compile it in place ++if(FALSE) + set (CC_EXTERNAL_TGT "comms_champion_external") + if (OPT_BUILD_TEST OR OPT_BUILD_PLUGIN) + set (external_cc_needed TRUE) +@@ -107,6 +108,10 @@ elseif (external_cc_needed) + find_package(CommsChampion NO_MODULE) + set (cc_compile_file "${OPT_CC_MAIN_INSTALL_DIR}/lib/LibComms/cmake/CC_Compile.cmake") + endif () ++else() ++ find_package(LibComms CONFIG REQUIRED) ++ set(cc_compile_file "${LibComms_DIR}/CC_Compile.cmake") ++endif() + + if (EXISTS ${cc_compile_file}) + # Set compiler flags diff --git a/ports/comms-ublox/portfile.cmake b/ports/comms-ublox/portfile.cmake new file mode 100644 index 00000000000000..d5fd4bcea27fa0 --- /dev/null +++ b/ports/comms-ublox/portfile.cmake @@ -0,0 +1,30 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO commschamp/cc.ublox.generated + REF v0.20.2 + SHA512 5672d964ea3e505837e44a5fd928069a219a5731764cb54bfe8609e39c6c6dd0059660bcde317c6c60cd1bd8d1f7942d2faa022095bf651817568291bc6a7569 + HEAD_REF master + PATCHES + fix-comms.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DOPT_BUILD_TEST=OFF + -DOPT_BUILD_PLUGIN=OFF + -DOPT_NO_COMMS=ON + -DOPT_EXTERNALS_UPDATE_DISCONNECTED=ON +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/ublox/cmake TARGET_PATH share/ublox) +# currently this is only a header only library. after moving lib/ublox to share this lib path will be empty +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/comms-ublox/vcpkg.json b/ports/comms-ublox/vcpkg.json new file mode 100644 index 00000000000000..93668cae03b2ca --- /dev/null +++ b/ports/comms-ublox/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "comms-ublox", + "version-semver": "0.20.2", + "description": "UBLOX (UBX) protocol definition, generated out of cc.ublox.commsdsl", + "homepage": "https://commschamp.github.io/", + "documentation": "https://github.com/commschamp/cc.ublox.generated", + "dependencies": [ + "comms" + ] +} diff --git a/ports/comms/portfile.cmake b/ports/comms/portfile.cmake new file mode 100644 index 00000000000000..3ec544e2fb4816 --- /dev/null +++ b/ports/comms/portfile.cmake @@ -0,0 +1,62 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO commschamp/comms_champion + REF v3.4 + SHA512 573afbc0aebd72d8a047067410f0f54588675c4cbad37f824edbb6d8303e9c191c573ac9325bf5fec575dffd3d05562c04e75c1e5b748a34d01056bc8b766fb1 + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools CC_BUILD_TOOLS_LIBRARY + tools CC_INSTALL_TOOLS_LIBRARY + tools CC_BUILD_TOOLS + tools CC_INSTALL_TOOLS +) + +# check before configure +if("tools" IN_LIST FEATURES) + vcpkg_fail_port_install(ON_LIBRARY_LINKAGE "static" MESSAGE "Feature 'Tools' can't be built statically") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DCC_INSTALL_COMMS_LIB=ON + -DCC_BUILD_UNIT_TESTS=OFF + -DCC_WARN_AS_ERR=OFF + -DCC_BUILD_DEMO_PROTOCOL=OFF + -DCC_INSTALL_DEMO_PROTOCOL=OFF +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(PACKAGE_NAME "LibComms" CONFIG_PATH "lib/LibComms/cmake" ) + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES cc_dump cc_view + AUTO_CLEAN + ) + file(INSTALL "${CURRENT_PACKAGES_DIR}/lib/CommsChampion/plugin" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/lib/CommsChampion/plugin") + vcpkg_cmake_config_fixup(PACKAGE_NAME "CommsChampion" CONFIG_PATH "lib/CommsChampion/cmake") + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/LibComms") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/CommsChampion") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/LibComms") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/CommsChampion") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +else() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +endif() + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY) diff --git a/ports/comms/usage b/ports/comms/usage new file mode 100644 index 00000000000000..9273c02836ec10 --- /dev/null +++ b/ports/comms/usage @@ -0,0 +1,4 @@ +The package comms provides CMake targets: + + find_package(LibComms CONFIG REQUIRED) + target_link_libraries(main PRIVATE cc::comms) diff --git a/ports/comms/vcpkg.json b/ports/comms/vcpkg.json new file mode 100644 index 00000000000000..677032b1179745 --- /dev/null +++ b/ports/comms/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "comms", + "version-semver": "3.4.0", + "description": "COMMS is the C++(11) headers only, platform independent library, which makes the implementation of a communication protocol to be an easy and relatively quick process.", + "homepage": "https://commschamp.github.io/", + "documentation": "https://github.com/commschamp/comms_champion", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tools": { + "description": "Builds CommsChampion tools", + "dependencies": [ + "qt5-base" + ] + } + } +} diff --git a/ports/commsdsl/portfile.cmake b/ports/commsdsl/portfile.cmake new file mode 100644 index 00000000000000..60cb2bbbc1116e --- /dev/null +++ b/ports/commsdsl/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO commschamp/commsdsl + REF v3.6.4 + SHA512 dd997bb063baf4e6bc15666539e8d3e8cf435cfda88e8b115b8a1568c8c77cc2ca6dbf1a77ae2fcf9b24f68cb35aa2ae583852cf887fbc85f74e868230374055 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DCOMMSDSL_NO_COMMS_CHAMPION=ON + -DCOMMSDSL_BUILD_APPS=ON + -DCOMMSDSL_INSTALL_APPS=ON + -DCOMMSDSL_CHECKOUT_COMMS_CHAMPION=OFF + -DCOMMSDSL_BUILD_UNIT_TESTS=OFF + -DCOMMSDSL_WARN_AS_ERR=OFF +) +vcpkg_install_cmake() + +vcpkg_copy_tools( + TOOL_NAMES commsdsl2comms + AUTO_CLEAN +) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/LibCommsdsl/cmake TARGET_PATH share/LibCommsdsl) +# after fixing the following dirs are empty +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/LibCommsdsl") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/LibCommsdsl") + +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.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/commsdsl/vcpkg.json b/ports/commsdsl/vcpkg.json new file mode 100644 index 00000000000000..ebfbd0c7254d43 --- /dev/null +++ b/ports/commsdsl/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "commsdsl", + "version-semver": "3.6.4", + "description": "DSL schemas parser and code generator for CommsChampion Ecosystem", + "homepage": "https://commschamp.github.io/", + "documentation": "https://github.com/commschamp/commsdsl", + "supports": "!uwp & !static", + "dependencies": [ + "boost-algorithm", + "boost-filesystem", + "boost-program-options", + "libxml2" + ] +} diff --git a/ports/concurrencpp/fix-include-path.patch b/ports/concurrencpp/fix-include-path.patch new file mode 100644 index 00000000000000..7b2da192009a17 --- /dev/null +++ b/ports/concurrencpp/fix-include-path.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 351aa65..ab06584 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -94,7 +94,7 @@ include(CMakePackageConfigHelpers) + include(GNUInstallDirs) + + set(concurrencpp_directory "concurrencpp-${PROJECT_VERSION}") +-set(concurrencpp_include_directory "${CMAKE_INSTALL_INCLUDEDIR}/${concurrencpp_directory}") ++set(concurrencpp_include_directory "${CMAKE_INSTALL_INCLUDEDIR}") + + install(TARGETS concurrencpp + EXPORT concurrencppTargets diff --git a/ports/concurrencpp/portfile.cmake b/ports/concurrencpp/portfile.cmake new file mode 100644 index 00000000000000..43578ea8849048 --- /dev/null +++ b/ports/concurrencpp/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO David-Haim/concurrencpp + REF v.0.1.3 + SHA512 2f4530ba93d768a7a1ae14c532c8ef443745e48cceeca8a0e9da9f91633876ae4971caad70eeff9e18c7a45e8cf7c0b7bb79720a62026850244fb2377ad10df7 + HEAD_REF master + PATCHES + fix-include-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/concurrencpp-0.1.3) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/concurrencpp RENAME copyright) diff --git a/ports/concurrencpp/vcpkg.json b/ports/concurrencpp/vcpkg.json new file mode 100644 index 00000000000000..c4c8482f1de4b0 --- /dev/null +++ b/ports/concurrencpp/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "concurrencpp", + "version-string": "0.1.3", + "description": "concurrencpp is a tasking library for C++ allowing developers to write highly concurrent applications easily and safely by using tasks, executors and coroutines.", + "homepage": "https://github.com/David-Haim/concurrencpp/", + "supports": "(windows & static) | linux | osx", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/concurrentqueue/CONTROL b/ports/concurrentqueue/CONTROL deleted file mode 100644 index 34080b423c440c..00000000000000 --- a/ports/concurrentqueue/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: concurrentqueue -Version: 1.0.0-beta-dea078c -Description: A fast multi-producer, multi-consumer lock-free concurrent queue for C++11 diff --git a/ports/concurrentqueue/portfile.cmake b/ports/concurrentqueue/portfile.cmake index 29069c153d609d..ed5c189f9c00c8 100644 --- a/ports/concurrentqueue/portfile.cmake +++ b/ports/concurrentqueue/portfile.cmake @@ -1,11 +1,9 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cameron314/concurrentqueue - REF dea078cf5b6e742cd67a0d725e36f872feca4de4 - SHA512 edd47bcc025ffab7ac62cea168a9672a20cdbe139267426e97553fa1c796f1547d8414915518ee6be34a68d05e8a8171291f958c5eac0434ea8ba953bff85dbe + REF 3747268264d0fa113e981658a99ceeae4dad05b7# v1.0.3 + SHA512 798d61e8e5b87cd1870df20410db18e2fcbc5e4e1d849308663cc0403a0d50d29b72428fc0a39231ae8bcb460c946559bde0f2d22584c335fe849cbcbe607ec2 HEAD_REF master ) @@ -27,7 +25,6 @@ configure_file( @ONLY ) -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/concurrentqueue RENAME copyright) - file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/concurrentqueue) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/concurrentqueue/vcpkg.json b/ports/concurrentqueue/vcpkg.json new file mode 100644 index 00000000000000..f091937d608593 --- /dev/null +++ b/ports/concurrentqueue/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "concurrentqueue", + "version": "1.0.3", + "description": "A fast multi-producer, multi-consumer lock-free concurrent queue for C++11", + "homepage": "https://github.com/cameron314/concurrentqueue" +} diff --git a/ports/console-bridge/CONTROL b/ports/console-bridge/CONTROL deleted file mode 100644 index 47870b72e9355f..00000000000000 --- a/ports/console-bridge/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: console-bridge -Version: 0.3.2-4 -Homepage: https://github.com/ros/console_bridge -Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages. diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake index 8b99e125be7d51..cd43cf0df3effe 100644 --- a/ports/console-bridge/portfile.cmake +++ b/ports/console-bridge/portfile.cmake @@ -1,18 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ros/console_bridge - REF 0.3.2 - SHA512 41fa5340d7ba79c887ef73eb4fda7b438ed91febd224934ae4658697e4c9e43357207e1b3e191ecce3c97cb9a87b0556372832735a268261bc798cc7683aa207 + REF 0a6c16ed68750837c32ed1cedee9fca7d61d4364 # 1.0.1 + SHA512 8b856bf8c0eec7d7f3f87e10c4de2b99369bd35cab5f9dd5ea3813fdd5a3fd4e7cd31b2336746920e093a515ad1175fd5af79f9d2f6a4648b1814b3131a1ef03 HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/static-macro.patch -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -29,6 +22,10 @@ else() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/console_bridge) endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + vcpkg_fixup_pkgconfig() +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(READ ${SOURCE_PATH}/src/console.cpp _contents) @@ -36,10 +33,10 @@ string(SUBSTRING "${_contents}" 0 2000 license) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/console-bridge) file(WRITE ${CURRENT_PACKAGES_DIR}/share/console-bridge/copyright "${license}") -file(READ ${CURRENT_PACKAGES_DIR}/include/console_bridge/exportdecl.h _contents) +file(READ ${CURRENT_PACKAGES_DIR}/include/console_bridge_export.h _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC" "if 1" _contents "${_contents}") + string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC_DEFINE" "if 1" _contents "${_contents}") else() - string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC" "if 0" _contents "${_contents}") + string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC_DEFINE" "if 0" _contents "${_contents}") endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/console_bridge/exportdecl.h "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/console_bridge_export.h "${_contents}") diff --git a/ports/console-bridge/static-macro.patch b/ports/console-bridge/static-macro.patch deleted file mode 100644 index 31e4053aab46dc..00000000000000 --- a/ports/console-bridge/static-macro.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 604b2ab..e98b51c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -37,6 +37,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS) - option(BUILD_SHARED_LIBS "Build dynamically-linked binaries" ON) - endif() - -+if(NOT BUILD_SHARED_LIBS) -+ add_definitions(-DCONSOLE_BRIDGE_STATIC) -+endif() -+ - add_library(${PROJECT_NAME} src/console.cpp) - set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION - ${CONSOLE_BRIDGE_MAJOR_VERSION}.${CONSOLE_BRIDGE_MINOR_VERSION}) diff --git a/ports/console-bridge/vcpkg.json b/ports/console-bridge/vcpkg.json new file mode 100644 index 00000000000000..d841bb9e868798 --- /dev/null +++ b/ports/console-bridge/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "console-bridge", + "version-string": "1.0.1", + "port-version": 2, + "description": "a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages.", + "homepage": "https://github.com/ros/console_bridge" +} diff --git a/ports/constexpr-contracts/portfile.cmake b/ports/constexpr-contracts/portfile.cmake new file mode 100644 index 00000000000000..d189ba43d9e5a1 --- /dev/null +++ b/ports/constexpr-contracts/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cjdb/constexpr-contracts + REF 58154e9010cb80aad4e95ef6f1835ebd7db3780a # commit 2020-05-25 + SHA512 b634267a4044cd712c8e52f65cd305f437864cab591f2b22104581f70b305ba52889dd46724e6047386463a010ee78fdd951411ea3691b5725d52d13f7adda76 + HEAD_REF main +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/constexpr-contracts) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/constexpr-contracts/vcpkg.json b/ports/constexpr-contracts/vcpkg.json new file mode 100644 index 00000000000000..1e5da41352de0e --- /dev/null +++ b/ports/constexpr-contracts/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "constexpr-contracts", + "version-string": "2020-08-09", + "port-version": 1, + "description": "A constexpr-friendly, optimisation-friendly contracts library.", + "homepage": "https://github.com/cjdb/constexpr-contracts" +} diff --git a/ports/constexpr/CONTROL b/ports/constexpr/CONTROL deleted file mode 100644 index 78dc70aa42ae1a..00000000000000 --- a/ports/constexpr/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: constexpr -Version: 1.0-1 -Homepage: https://github.com/elbeno/constexpr -Description: Small MIT License Library of general stdlib functions written as C++11 constexpr functions. diff --git a/ports/constexpr/portfile.cmake b/ports/constexpr/portfile.cmake index e56b57e6179adb..65773ccec22496 100644 --- a/ports/constexpr/portfile.cmake +++ b/ports/constexpr/portfile.cmake @@ -1,6 +1,4 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO elbeno/constexpr diff --git a/ports/constexpr/vcpkg.json b/ports/constexpr/vcpkg.json new file mode 100644 index 00000000000000..85a8a46c97d8fc --- /dev/null +++ b/ports/constexpr/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "constexpr", + "version-string": "1.0", + "port-version": 2, + "description": "Small MIT License Library of general stdlib functions written as C++11 constexpr functions.", + "homepage": "https://github.com/elbeno/constexpr" +} diff --git a/ports/continuable/fix-cmakelists.patch b/ports/continuable/fix-cmakelists.patch new file mode 100644 index 00000000000000..a2d73ad5b1d7ec --- /dev/null +++ b/ports/continuable/fix-cmakelists.patch @@ -0,0 +1,55 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,13 +23,6 @@ cmake_minimum_required(VERSION 3.11) + + project(continuable VERSION 4.0.0 LANGUAGES C CXX) + +-if (CTI_CONTINUABLE_IS_FIND_INCLUDED) +- set(CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT OFF) +-else() +- string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} +- CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) +-endif() +- + option(CTI_CONTINUABLE_WITH_INSTALL + "Add the continuable install targets" + ${CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT}) +@@ -80,7 +73,7 @@ if(NOT TARGET Threads::Threads) + find_package(Threads REQUIRED) + endif() + +-if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) ++if (FALSE) + include(cmake/CMakeLists.txt) + add_subdirectory(dep) + else() +@@ -90,7 +83,7 @@ else() + endif() + + # continuable-base +-if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) ++if (TRUE) + add_library(continuable-base INTERFACE) + else() + add_library(continuable-base INTERFACE IMPORTED GLOBAL) +@@ -146,7 +139,7 @@ if (CTI_CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS) + CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS) + endif() + +-if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) ++if (TRUE) + add_library(continuable INTERFACE) + else() + add_library(continuable INTERFACE IMPORTED GLOBAL) +@@ -168,8 +161,8 @@ if (CTI_CONTINUABLE_WITH_INSTALL) + # Headers and license files + install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/continuable" + DESTINATION "include") +- install(FILES "LICENSE.txt" DESTINATION .) +- install(FILES "Readme.md" DESTINATION .) ++ install(FILES "LICENSE.txt" DESTINATION share/${PROJECT_NAME} RENAME copyright) ++ install(FILES "Readme.md" DESTINATION share/${PROJECT_NAME}) + + # Config.cmake + write_basic_package_version_file( diff --git a/ports/continuable/portfile.cmake b/ports/continuable/portfile.cmake new file mode 100644 index 00000000000000..e4dd72c839bf96 --- /dev/null +++ b/ports/continuable/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Naios/continuable + REF 4.1.0 + SHA512 b80b1c13b068382553b727fd3b346323e2051b1c92237efa151ba8ec92b6d722ca993ae4bbf0e6e308a92834ae92011a179e74fcf713a09beaa48676f7d08340 + HEAD_REF master + PATCHES + fix-cmakelists.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCTI_CONTINUABLE_WITH_INSTALL=ON + -DCTI_CONTINUABLE_WITH_TESTS=OFF + -DCTI_CONTINUABLE_WITH_EXAMPLES=OFF + -DCTI_CONTINUABLE_WITH_BENCHMARKS=OFF + -DCTI_CONTINUABLE_WITH_NO_EXCEPTIONS=OFF + -DCTI_CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS=ON + -DCTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE=ON + -DCTI_CONTINUABLE_WITH_CPP_LATEST=ON # requires cxx_std_17 +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug +) diff --git a/ports/continuable/vcpkg.json b/ports/continuable/vcpkg.json new file mode 100644 index 00000000000000..d62451c96ad0c8 --- /dev/null +++ b/ports/continuable/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "continuable", + "version-string": "4.1.0", + "description": "C++14 asynchronous allocation aware futures (supporting then, exception handling, coroutines and connections)", + "homepage": "https://naios.github.io/continuable/", + "dependencies": [ + "function2" + ] +} diff --git a/ports/coolprop/CONTROL b/ports/coolprop/CONTROL deleted file mode 100644 index 4f5390ca1eb72f..00000000000000 --- a/ports/coolprop/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: coolprop -Version: 6.1.0-4 -Homepage: https://github.com/CoolProp/CoolProp -Description: Thermophysical properties for the masses -Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers diff --git a/ports/coolprop/fix-builderror.patch b/ports/coolprop/fix-builderror.patch new file mode 100644 index 00000000000000..0c2f9c4ca2428f --- /dev/null +++ b/ports/coolprop/fix-builderror.patch @@ -0,0 +1,13 @@ +diff --git a/src/ODEIntegrators.cpp b/src/ODEIntegrators.cpp +index 4152f01..e5986ca 100644 +--- a/src/ODEIntegrators.cpp ++++ b/src/ODEIntegrators.cpp +@@ -4,6 +4,8 @@ + #include "CPstrings.h" + #include "Exceptions.h" + #include ++#undef max ++#undef min + + bool ODEIntegrators::AdaptiveRK54(AbstractODEIntegrator &ode, double tstart, double tend, double hmin, double hmax, double eps_allowed, double step_relax) + { diff --git a/ports/coolprop/fix-dependency.patch b/ports/coolprop/fix-dependency.patch new file mode 100644 index 00000000000000..69d3f180623a47 --- /dev/null +++ b/ports/coolprop/fix-dependency.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2d61aff..80ac50a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -237,10 +237,10 @@ list(REMOVE_ITEM APP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/Tests/CoolProp-Te + list(REMOVE_ITEM APP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/CoolPropLib.cpp") + + set (APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}") +-list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/Eigen") +-list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/msgpack-c/include") +-list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/fmtlib/include") +-list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/fmtlib") # should be deprecated ++find_package(Eigen3 CONFIG REQUIRED) ++find_package(msgpack CONFIG REQUIRED) ++find_package(fmt CONFIG REQUIRED) ++link_libraries(Eigen3::Eigen msgpackc msgpackc-cxx fmt::fmt) + list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include") + list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") + diff --git a/ports/coolprop/fix-install.patch b/ports/coolprop/fix-install.patch new file mode 100644 index 00000000000000..73732f4dbd1d66 --- /dev/null +++ b/ports/coolprop/fix-install.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80ac50a..36819dd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -493,13 +493,13 @@ IF ( COOLPROP_OBJECT_LIBRARY OR COOLPROP_STATIC_LIBRARY OR COOLPROP_SHARED_LIBRA + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY RELEASE_POSTFIX ) + modify_msvc_flags("/MD") # Note that the default is not used if ${COOLPROP_MSVC_REL} or ${COOLPROP_MSVC_DBG} is set + ENDIF (MSVC) +- INSTALL(TARGETS ${LIB_NAME} DESTINATION static_library/${CMAKE_SYSTEM_NAME}/${BITNESS}bit_${CMAKE_CXX_COMPILER_ID}_${CMAKE_CXX_COMPILER_VERSION} ) +- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_HEADER} DESTINATION static_library) ++ INSTALL(TARGETS ${LIB_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_HEADER} DESTINATION include) + ELSEIF (COOLPROP_SHARED_LIBRARY) + LIST(APPEND APP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_SOURCE}") + ADD_LIBRARY(${LIB_NAME} SHARED ${APP_SOURCES} ${COOLPROP_LIBRARY_EXPORTS}) +- INSTALL(TARGETS ${LIB_NAME} DESTINATION shared_library/${CMAKE_SYSTEM_NAME}/${BITNESS}bit${CONVENTION} ) +- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_HEADER} DESTINATION shared_library) ++ INSTALL(TARGETS ${LIB_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_HEADER} DESTINATION include) + SET_PROPERTY (TARGET ${LIB_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS " -DCOOLPROP_LIB") + # Now all the compiler specific settings for Visual Studio + IF (MSVC) +@@ -732,7 +732,7 @@ if (COOLPROP_EES_MODULE) + VERBATIM + ) + # install the generated library and the other files +- install(TARGETS COOLPROP_EES DESTINATION "${CMAKE_INSTALL_PREFIX}/EES/${CMAKE_SYSTEM_NAME}") ++ install(TARGETS COOLPROP_EES RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/wrappers/EES/CoolProp.htm" DESTINATION "${CMAKE_INSTALL_PREFIX}/EES/${CMAKE_SYSTEM_NAME}") + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/wrappers/EES/CoolProp.LIB" DESTINATION "${CMAKE_INSTALL_PREFIX}/EES/${CMAKE_SYSTEM_NAME}") + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/wrappers/EES/CoolProp_EES_Sample.EES" DESTINATION "${CMAKE_INSTALL_PREFIX}/EES/${CMAKE_SYSTEM_NAME}") diff --git a/ports/coolprop/fmt-fix.patch b/ports/coolprop/fmt-fix.patch index bf2d11deb57d36..9baeb2c628bbc2 100644 --- a/ports/coolprop/fmt-fix.patch +++ b/ports/coolprop/fmt-fix.patch @@ -1,39 +1,39 @@ -diff --git a/include/CPstrings.h b/include/CPstrings.h -index 2e5a5af..87f6b7c 100644 ---- a/include/CPstrings.h -+++ b/include/CPstrings.h -@@ -5,6 +5,8 @@ - #include - #include - #include -+ #include -+ #include - - #if !defined(NO_CPPFORMAT) - #ifndef FMT_HEADER_ONLY -@@ -13,9 +15,6 @@ - #include "fmt/format.h" // For addition of the string formatting functions and macros from cppformat - #include "fmt/printf.h" // For sprintf - #undef FMT_HEADER_ONLY --#else -- #include -- #include - #endif - - #include "Exceptions.h" -@@ -57,11 +56,11 @@ - // Missing string formatting function, this old guy is needed for ancient gcc compilers on PowerPC for VxWorks - inline std::string format(const char* fmt, ...); - #else -- // Missing std::string formatting function - provided by the cppformat library -- inline std::string format(const char *format, fmt::ArgList args) { -- return fmt::sprintf(format, args); -+ template -+ std::string format(const Args & ... args) -+ { -+ return fmt::sprintf(args...); - } -- FMT_VARIADIC(std::string, format, const char *) - #endif - - // Missing string split - like in Python +diff --git a/include/CPstrings.h b/include/CPstrings.h +index b99820a..fe6a2aa 100644 +--- a/include/CPstrings.h ++++ b/include/CPstrings.h +@@ -6,6 +6,8 @@ + #include + #include + #include ++ #include ++ #include + + #if !defined(NO_FMTLIB) + #ifndef FMT_HEADER_ONLY +@@ -14,9 +16,6 @@ + #include "fmt/format.h" // For addition of the string formatting functions and macros from fmtlib + #include "fmt/printf.h" // For sprintf + #undef FMT_HEADER_ONLY +-#else +- #include +- #include + #endif + + #include "Exceptions.h" +@@ -58,11 +57,11 @@ + // Missing string formatting function, this old guy is needed for ancient gcc compilers on PowerPC for VxWorks + inline std::string format(const char* fmt, ...); + #else +- // Missing std::string formatting function - provided by the fmtlib library +- inline std::string format(const char *format, fmt::ArgList args) { +- return fmt::sprintf(format, args); ++ template ++ std::string format(const Args & ... args) ++ { ++ return fmt::sprintf(args...); + } +- FMT_VARIADIC(std::string, format, const char *) + // For latest FMTLIB + /*template + inline std::string format(const char *format_str, const Args & ... args) { diff --git a/ports/coolprop/portfile.cmake b/ports/coolprop/portfile.cmake index 2406ea819f2d16..a1e7b978de3dbe 100644 --- a/ports/coolprop/portfile.cmake +++ b/ports/coolprop/portfile.cmake @@ -1,19 +1,21 @@ -include(vcpkg_common_functions) set(PORT_VERSION 6.1.0) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CoolProp/CoolProp - REF 0e934e842e9ce83eea64fda1d4ab8e59adf9d8cd - SHA512 a44eafc84f2b88259d7bcf6cfa81daeb81ea9d55bd356e59b3ef77b6f68ea405961c7cb54ba899e3896bb2a02d3e01119a4a51f72899126c8da6081fa2ece948 + REF f5ebb4e655add4c23bb327ab5209f3dbf919bc6d # v6.4.1 + SHA512 916d00777fe56035171ed0a6cbe09b8d4487317772802e4fe9b43f5965f3212dcb3754e18fe1db9c748a4d17facbbe6cb2244451cf5cf66334465760fc1701b7 HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fmt-fix.patch + fmt-fix.patch + fix-builderror.patch + fix-dependency.patch + fix-install.patch ) vcpkg_find_acquire_program(PYTHON2) get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PYTHON2_DIR}") +vcpkg_add_to_path(${PYTHON2_DIR}) file(REMOVE_RECURSE ${SOURCE_PATH}/externals) @@ -88,36 +90,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(TARGET_FOLDER "shared_library") -else() - set(TARGET_FOLDER "static_library") +if (VCPKG_TARGET_IS_WINDOWS AND COOLPROP_SHARED_LIBRARY) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/CoolPropLib.h + "#if defined(COOLPROP_LIB)" "#if 1" + ) endif() -file(GLOB_RECURSE COOLPROP_HEADERS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.h") -file(INSTALL ${COOLPROP_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -file(GLOB_RECURSE COOLPROP_LIBS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.lib") -file(GLOB_RECURSE COOLPROP_DLLS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.dll") - -file(INSTALL ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if(COOLPROP_DLLS) - file(INSTALL ${COOLPROP_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() - -file(GLOB_RECURSE COOLPROP_DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.lib") -file(GLOB_RECURSE COOLPROP_DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.dll") - -file(INSTALL ${COOLPROP_DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -if(COOLPROP_DEBUG_DLLS) - file(INSTALL ${COOLPROP_DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER} ${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") # Handle copyright -file( - INSTALL ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/coolprop - RENAME copyright -) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/coolprop/vcpkg.json b/ports/coolprop/vcpkg.json new file mode 100644 index 00000000000000..acd6b2f17ff339 --- /dev/null +++ b/ports/coolprop/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "coolprop", + "version-semver": "6.4.1", + "port-version": 1, + "description": "Thermophysical properties for the masses", + "homepage": "https://github.com/CoolProp/CoolProp", + "dependencies": [ + "catch", + "eigen3", + "fmt", + "if97", + "msgpack", + "pybind11", + "rapidjson", + "refprop-headers" + ] +} diff --git a/ports/coroutine/CONTROL b/ports/coroutine/CONTROL deleted file mode 100644 index 075a32b260acd6..00000000000000 --- a/ports/coroutine/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: coroutine -Version: 1.4.1-1 -Build-Depends: ms-gsl -Description: C++ coroutine helper/example library diff --git a/ports/coroutine/add-noexcept-to-frame.patch b/ports/coroutine/add-noexcept-to-frame.patch new file mode 100644 index 00000000000000..fe5c6c6d34997b --- /dev/null +++ b/ports/coroutine/add-noexcept-to-frame.patch @@ -0,0 +1,13 @@ +--- a/interface/coroutine/frame.h ++++ a/interface/coroutine/frame.h +@@ -119,8 +119,8 @@ + return *this; + } + // 17.12.3.2, export/import +- static /*constexpr*/ coroutine_handle from_address(void* _Addr) { ++ static /*constexpr*/ coroutine_handle from_address(void* _Addr) noexcept { + coroutine_handle _Result{}; + _Result._Ptr = reinterpret_cast(_Addr); + return _Result; + } + diff --git a/ports/coroutine/fix-errorC7651.patch b/ports/coroutine/fix-errorC7651.patch new file mode 100644 index 00000000000000..42c4291a500006 --- /dev/null +++ b/ports/coroutine/fix-errorC7651.patch @@ -0,0 +1,68 @@ +diff --git a/modules/portable/frame.cpp b/modules/portable/frame.cpp +index 2cedf81..f413f28 100644 +--- a/modules/portable/frame.cpp ++++ b/modules/portable/frame.cpp +@@ -77,13 +77,31 @@ size_t _coro_done(void*); + // + // intrinsic: Clang/GCC + // +-extern "C" { +-bool __builtin_coro_done(void*); +-void __builtin_coro_resume(void*); +-void __builtin_coro_destroy(void*); +-// void* __builtin_coro_promise(void* ptr, int align, bool p); ++//extern "C" { ++template ++void resume_wrapper(void *p) ++{ ++ if constexpr (B) ++ __builtin_coro_resume(p); ++} ++ ++template ++void destroy_wrapper(void *p) ++{ ++ if constexpr(B) ++ __builtin_coro_destroy(p); + } + ++template ++bool done_wrapper(void *p) ++{ ++ if constexpr(B) ++ return __builtin_coro_done(p); ++ return false; ++} ++// void* __builtin_coro_promise(void* ptr, int align, bool p); ++//} ++ + bool _coro_finished(portable_coro_prefix* _Handle); + + #if defined(__clang__) +@@ -124,7 +142,7 @@ bool portable_coro_done(portable_coro_prefix* _Handle) { + if constexpr (is_msvc) { + return _coro_finished(_Handle); + } else if constexpr (is_clang) { +- return __builtin_coro_done(_Handle); ++ return done_wrapper(_Handle); + } + return false; // follow `noop_coroutine` + } +@@ -133,7 +151,7 @@ void portable_coro_resume(portable_coro_prefix* _Handle) { + if constexpr (is_msvc) { + _coro_resume(_Handle); + } else if constexpr (is_clang) { +- __builtin_coro_resume(_Handle); ++ resume_wrapper(_Handle); + } + } + +@@ -141,7 +159,7 @@ void portable_coro_destroy(portable_coro_prefix* _Handle) { + if constexpr (is_msvc) { + _coro_destroy(_Handle); + } else if constexpr (is_clang) { +- __builtin_coro_destroy(_Handle); ++ destroy_wrapper(_Handle); + } + } + diff --git a/ports/coroutine/portfile.cmake b/ports/coroutine/portfile.cmake index f8bf5cdcffba1b..1326b5a7dd5993 100644 --- a/ports/coroutine/portfile.cmake +++ b/ports/coroutine/portfile.cmake @@ -1,39 +1,34 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") -if(${VCPKG_TARGET_ARCHITECTURE} MATCHES x86) - message(FATAL_ERROR "This library doesn't support x86 arch. Please use x64 instead. If it is critical, create an issue at the repo: github.com/luncliff/coroutine") +if(VCPKG_TARGET_IS_LINUX) + message("Warning: `coroutine` requires libc++ and Clang or GCC 10+ on Linux") endif() -# changed to 1.4.2 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO luncliff/coroutine - REF 1.4.2 - SHA512 fc2544116a5bee97b8ef1501fc7f1b805248f0a0c601111f1a317e813aa1d3f9a2e08ab1b140cc36e22d9c90249301110ec5b5e55a40fb39217cf5f40998920d + REF 1.5.0 + SHA512 61b91fdc641b6905b884e99c5bf193ec2cf6962144ab3baafdb9432115757d96f3797f116b30356f0d21417b23082bc908f75042721caeab3329c4910b654594 HEAD_REF master + PATCHES + fix-errorC7651.patch + add-noexcept-to-frame.patch ) -# package: 'ms-gsl' -set(GSL_INCLUDE_DIR ${CURRENT_INSTALLED_DIR}/include - CACHE PATH "path to include C++ core guideline support library" FORCE) -message(STATUS "Using ms-gsl at ${GSL_INCLUDE_DIR}") - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DGSL_INCLUDE_DIR=${GSL_INCLUDE_DIR} - -DTEST_DISABLED=True + -DGSL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DBUILD_TESTING=False ) - vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() -file( - INSTALL ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/coroutine - RENAME copyright +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright ) +vcpkg_copy_pdbs() -# removed duplicates in debug file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/coroutine/vcpkg.json b/ports/coroutine/vcpkg.json new file mode 100644 index 00000000000000..8c557f6fa91578 --- /dev/null +++ b/ports/coroutine/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "coroutine", + "version-string": "1.5.0", + "port-version": 2, + "description": "C++ 20 Coroutines helper/example library", + "homepage": "https://github.com/luncliff/coroutine", + "supports": "!uwp", + "dependencies": [ + "ms-gsl" + ] +} diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL deleted file mode 100644 index 3cf18ab10a4447..00000000000000 --- a/ports/corrade/CONTROL +++ /dev/null @@ -1,20 +0,0 @@ -Source: corrade -Version: 2019.01-1 -Description: C++11/C++14 multiplatform utility library -Homepage: https://magnum.graphics/corrade/ -Default-Features: interconnect, pluginmanager, testsuite, utility - -Feature: interconnect -Description: Interconnect library -Build-Depends: corrade[utility] - -Feature: pluginmanager -Description: PluginManager library -Build-Depends: corrade[utility] - -Feature: testsuite -Description: TestSuite library -Build-Depends: corrade[utility] - -Feature: utility -Description: Utility library diff --git a/ports/corrade/fix-vs2019.patch b/ports/corrade/fix-vs2019.patch new file mode 100644 index 00000000000000..abf9a3a6e5c995 --- /dev/null +++ b/ports/corrade/fix-vs2019.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e0cc288..e5a4648 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -195,7 +195,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + set(MSVC2017_COMPATIBILITY ON) + message(WARNING "MSVC 2017 detected, automatically enabling MSVC2017_COMPATIBILITY. Note that some features may not be available with this compiler.") + endif() +- elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.30") ++ elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.31") + if(NOT MSVC2019_COMPATIBILITY) + set(MSVC2019_COMPATIBILITY ON) + message(WARNING "MSVC 2019 detected, automatically enabling MSVC2019_COMPATIBILITY. Note that some features may not be available with this compiler.") diff --git a/ports/corrade/fixC2666.patch b/ports/corrade/fixC2666.patch deleted file mode 100644 index e6e2ffccc888cc..00000000000000 --- a/ports/corrade/fixC2666.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/modules/UseCorrade.cmake b/modules/UseCorrade.cmake -index 744d5a1..129e75f 100644 ---- a/modules/UseCorrade.cmake -+++ b/modules/UseCorrade.cmake -@@ -164,7 +164,10 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_SIMULATE_ID STREQUAL " - # "dllexport and extern are incompatible on an explicit instantiation". - # Why the error is emitted only on classes? Functions are okay with - # dllexport extern?! -- "/wd4910") -+ "/wd4910" -+ -+ #Add the /permissive- option -+ "/permissive-") - set(CORRADE_PEDANTIC_COMPILER_DEFINITIONS - # Disabling warning for not using "secure-but-not-standard" STL algos - "_CRT_SECURE_NO_WARNINGS" "_SCL_SECURE_NO_WARNINGS" diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 40011f3d055829..187374a6de1999 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -1,49 +1,36 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade - REF v2019.01 - SHA512 63468ee0a9362d92d61e2bc77fb8c3e455761894998393910f6bce4111b0ec74db8fe2a8658cec1292c5ceb26e57e005324b34f1ec343d4216abf3a955eaa97e + REF v2020.06 + SHA512 94cc8959b0ee43ecd8d13a25307e7829d53dc6601628d97c32288d1704e2c0835b755bffc06b2105e6aa5a612f119a60e83cb475860b51e6a35999215c100227 HEAD_REF master - PATCHES fixC2666.patch + PATCHES fix-vs2019.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) # Handle features -set(_COMPONENT_FLAGS "") +set(_COMPONENTS "") foreach(_feature IN LISTS ALL_FEATURES) # Uppercase the feature name and replace "-" with "_" string(TOUPPER "${_feature}" _FEATURE) string(REPLACE "-" "_" _FEATURE "${_FEATURE}") - # Turn "-DWITH_*=" ON or OFF depending on whether the feature - # is in the list. - if(_feature IN_LIST FEATURES) - list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") - else() - list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + # Final feature is empty, ignore it + if(_feature) + list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE}) endif() endforeach() -if(NOT VCPKG_CMAKE_SYSTEM_NAME) - # building for Windows desktop - if (VCPKG_PLATFORM_TOOLSET STREQUAL "v142" AND NOT VCPKG_USE_HEAD_VERSION) - message("**********") - message("WARNING: Visual Studio 2019 is not official supported by Corrade/Magnum team. Please use --head version if you intend to have upstream support.") - message("**********") - set(_CUSTOM_BUILD_FLAGS "-DCORRADE_MSVC2017_COMPATIBILITY=ON") - endif() -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES ${_COMPONENTS}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS + ${FEATURE_OPTIONS} -DUTILITY_USE_ANSI_COLORS=ON -DBUILD_STATIC=${BUILD_STATIC} - ${_CUSTOM_BUILD_FLAGS} - ${_COMPONENT_FLAGS} ) vcpkg_install_cmake() @@ -54,21 +41,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Install tools if("utility" IN_LIST FEATURES) - file(GLOB EXES - ${CURRENT_PACKAGES_DIR}/bin/corrade-rc - ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe - ) - # Drop a copy of tools - file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade) - - # Tools require dlls - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade) - - file(GLOB TO_REMOVE - ${CURRENT_PACKAGES_DIR}/bin/corrade-rc* - ${CURRENT_PACKAGES_DIR}/debug/bin/corrade-rc*) - file(REMOVE ${TO_REMOVE}) + vcpkg_copy_tools(TOOL_NAMES "corrade-rc" AUTO_CLEAN) endif() # Ensure no empty folders are left behind @@ -89,10 +63,8 @@ elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING - DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade) -file(RENAME - ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING - ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/corrade/vcpkg.json b/ports/corrade/vcpkg.json new file mode 100644 index 00000000000000..83940abbc521ca --- /dev/null +++ b/ports/corrade/vcpkg.json @@ -0,0 +1,51 @@ +{ + "name": "corrade", + "version-string": "2020.06", + "port-version": 2, + "description": "C++11/C++14 multiplatform utility library.", + "homepage": "https://magnum.graphics/corrade/", + "default-features": [ + "interconnect", + "pluginmanager", + "testsuite", + "utility" + ], + "features": { + "interconnect": { + "description": "Interconnect library", + "dependencies": [ + { + "name": "corrade", + "features": [ + "utility" + ] + } + ] + }, + "pluginmanager": { + "description": "PluginManager library", + "dependencies": [ + { + "name": "corrade", + "features": [ + "utility" + ] + } + ] + }, + "testsuite": { + "description": "TestSuite library", + "dependencies": [ + { + "name": "corrade", + "features": [ + "utility" + ] + } + ] + }, + "utility": { + "description": "Utility library" + } + } +} diff --git a/ports/cpp-base64/portfile.cmake b/ports/cpp-base64/portfile.cmake new file mode 100644 index 00000000000000..2e4defadce450d --- /dev/null +++ b/ports/cpp-base64/portfile.cmake @@ -0,0 +1,13 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ReneNyffenegger/cpp-base64 + REF V2.rc.08 # V2.rc.08 + SHA512 8d115c3341bee31c3d83f5ad07d457a507f42d58bb5db8d9ead213494f7f25065eeeac06226f9cc34235c0360eb893e7bc66a95aa3bfbc9ea0d179f5a0b7af0a + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/base64.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(COPY ${SOURCE_PATH}/base64.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cpp-base64/vcpkg.json b/ports/cpp-base64/vcpkg.json new file mode 100644 index 00000000000000..b0918e770ff11e --- /dev/null +++ b/ports/cpp-base64/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "cpp-base64", + "version-string": "V2.rc.08", + "description": "Base64 encoding and decoding with c++.", + "homepage": "https://github.com/ReneNyffenegger/cpp-base64/" +} diff --git a/ports/cpp-httplib/CONTROL b/ports/cpp-httplib/CONTROL deleted file mode 100644 index 66d4938f025c47..00000000000000 --- a/ports/cpp-httplib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cpp-httplib -Version: 0.2.0 -Homepage: https://github.com/yhirose/cpp-httplib -Description: A single file C++11 header-only HTTP/HTTPS server and client library diff --git a/ports/cpp-httplib/portfile.cmake b/ports/cpp-httplib/portfile.cmake index 9e85b57e302f0f..966e7189bbd662 100644 --- a/ports/cpp-httplib/portfile.cmake +++ b/ports/cpp-httplib/portfile.cmake @@ -1,12 +1,9 @@ -include(vcpkg_common_functions) - -set(VERSION 0.2.0) - +# Header-only library vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO yhirose/cpp-httplib - REF 2f8479016fa9af9a63056571992b31c32741d89b - SHA512 2f17a6a95c849a5c873a65e8da8bf85311f0152e439a973354c24d02ee9e6c3b0f3a456b60f90637ea4588d9ac09f7e41f42199de61315754e5fe9eecbb657ed + REF v0.9.4 + SHA512 472f4ce4ff5ba4b2e175120deb0a3ccc4c7b124e9349fd7709e1439fcdcfbc83ff0fb71d58367f38e042c4a64600936755432bd4de3e0065b2810dc5bc7d3c86 HEAD_REF master ) @@ -16,8 +13,4 @@ file( ) # Handle copyright -configure_file( - ${SOURCE_PATH}/LICENSE - ${CURRENT_PACKAGES_DIR}/share/cpp-httplib/copyright - COPYONLY -) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cpp-httplib/vcpkg.json b/ports/cpp-httplib/vcpkg.json new file mode 100644 index 00000000000000..9b1f01585eb0f4 --- /dev/null +++ b/ports/cpp-httplib/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "cpp-httplib", + "version": "0.9.4", + "description": "A single file C++11 header-only HTTP/HTTPS server and client library", + "homepage": "https://github.com/yhirose/cpp-httplib" +} diff --git a/ports/cpp-ipc/portfile.cmake b/ports/cpp-ipc/portfile.cmake new file mode 100644 index 00000000000000..0f3d3981cbfd5b --- /dev/null +++ b/ports/cpp-ipc/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_fail_port_install(ON_TARGET "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mutouyun/cpp-ipc + REF df3cf1b4c42143e6675c6fb0f33f85a48b7c7701 #v1.0.0 + SHA512 de319d48ac396f567b2f5faae87a264b9ebfbaf0559a3e00de61facd6a3f2de1739e064c6e037ad694111ed211c0fb9ea6ec2db0259c100e2bafe553c15ed2f6 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBIPC_BUILD_SHARED_LIBS) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" LIBIPC_USE_STATIC_CRT) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DLIBIPC_BUILD_SHARED_LIBS:BOOL=${LIBIPC_BUILD_SHARED_LIBS} + -DLIBIPC_USE_STATIC_CRT:BOOL=${LIBIPC_USE_STATIC_CRT} + -DLIBIPC_BUILD_TESTS:BOOL=OFF + -DLIBIPC_BUILD_DEMOS:BOOL=OFF +) + +vcpkg_cmake_install() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/cpp-ipc") + vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpp-ipc) +elseif(EXISTS "${CURRENT_PACKAGES_DIR}/share/cpp-ipc") + vcpkg_cmake_config_fixup(CONFIG_PATH share/cpp-ipc) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libipc/export.h" "#elif defined(LIBIPC_LIBRARY_SHARED_USING__)" "#elif 1") +endif() + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") \ No newline at end of file diff --git a/ports/cpp-ipc/vcpkg.json b/ports/cpp-ipc/vcpkg.json new file mode 100644 index 00000000000000..5e42a0a659da50 --- /dev/null +++ b/ports/cpp-ipc/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "cpp-ipc", + "version": "1.0.0", + "description": "C++ IPC Library: A high-performance inter-process communication using shared memory on Linux/Windows.", + "homepage": "https://github.com/mutouyun/cpp-ipc", + "supports": "!osx", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/cpp-netlib/CONTROL b/ports/cpp-netlib/CONTROL deleted file mode 100644 index 9d33aa289e5989..00000000000000 --- a/ports/cpp-netlib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cpp-netlib -Version: 0.13.0-2 -Build-Depends: boost -Description: A collection of network-related routines/implementations geared towards providing a robust cross-platform networking library diff --git a/ports/cpp-netlib/portfile.cmake b/ports/cpp-netlib/portfile.cmake index abea253d8e1bde..adfe9ad29b46d0 100644 --- a/ports/cpp-netlib/portfile.cmake +++ b/ports/cpp-netlib/portfile.cmake @@ -1,36 +1,35 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cpp-netlib/cpp-netlib - REF cpp-netlib-0.13.0-final - SHA512 1839bf1acb7917acd2957f1008a44ed26a38849afb5843bfa0d5c557dde530afab4183d8d273a87d6416aad2b3a59fdecdef5fbb62bc91ed484486c80a1de5eb + REF 31d304cdf52b485f465ada433d8905171b61cbff + SHA512 6d157e6d950dd76a6d16b9c13d4d29f188d9f540eb0b44ab169016e1d7a360995e51d9923b532503a17dd2c8e0e2a38b2f9b531db03b33239e7fb9ca4d047b0c HEAD_REF master + # Updator's note: cpp-netlib has many templates that are not fully instantiated when not building examples. + # This patch specifically fixes one of those issues + # To test updates, enable building examples below (may also require patching out uses of cxxopts) + PATCHES stream-handler-executor.patch ) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DCPP-NETLIB_BUILD_TESTS=off - -DCPP-NETLIB_BUILD_EXAMPLES=off - +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCPP-NETLIB_BUILD_TESTS=OFF + -DCPP-NETLIB_BUILD_EXAMPLES=OFF ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/cppnetlib) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cppnetlib) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cppnetlib TARGET_PATH share/cppnetlib) endif() file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cpp-netlib/stream-handler-executor.patch b/ports/cpp-netlib/stream-handler-executor.patch new file mode 100644 index 00000000000000..7152f23491b54c --- /dev/null +++ b/ports/cpp-netlib/stream-handler-executor.patch @@ -0,0 +1,27 @@ +diff --git a/boost/network/protocol/stream_handler.hpp b/boost/network/protocol/stream_handler.hpp +index ffb09b8..f3b3e99 100644 +--- a/boost/network/protocol/stream_handler.hpp ++++ b/boost/network/protocol/stream_handler.hpp +@@ -41,6 +40,7 @@ typedef boost::asio::ssl::context ssl_context; + + struct stream_handler { + public: ++ typedef tcp_socket::executor_type executor_type; + stream_handler(std::shared_ptr socket) + : tcp_sock_(std::move(socket)), ssl_enabled(false) {} + +@@ -52,12 +52,12 @@ struct stream_handler { + stream_handler(boost::asio::io_service& io, + std::shared_ptr ctx = + std::shared_ptr()) { +- tcp_sock_ = std::make_shared(boost::ref(io)); ++ tcp_sock_ = std::make_shared(io.get_executor()); + ssl_enabled = false; + if (ctx) { + /// SSL is enabled + ssl_sock_ = +- std::make_shared(boost::ref(io), boost::ref(*ctx)); ++ std::make_shared(io.get_executor(), boost::ref(*ctx)); + ssl_enabled = true; + } + } diff --git a/ports/cpp-netlib/vcpkg.json b/ports/cpp-netlib/vcpkg.json new file mode 100644 index 00000000000000..22a7c7b9ed3087 --- /dev/null +++ b/ports/cpp-netlib/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "cpp-netlib", + "version-string": "0.13.0", + "port-version": 5, + "description": "A collection of network-related routines/implementations geared towards providing a robust cross-platform networking library", + "homepage": "https://cpp-netlib.org/", + "supports": "!uwp", + "dependencies": [ + "boost-asio", + "boost-assign", + "boost-logic", + "boost-program-options", + "boost-scope-exit", + "boost-smart-ptr", + "boost-spirit" + ] +} diff --git a/ports/cpp-peglib/CONTROL b/ports/cpp-peglib/CONTROL deleted file mode 100644 index 6a6ed9ad5df903..00000000000000 --- a/ports/cpp-peglib/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cpp-peglib -Version: 0.1.0 -Description: C++11 header-only PEG (Parsing Expression Grammars) library. diff --git a/ports/cpp-peglib/portfile.cmake b/ports/cpp-peglib/portfile.cmake index 25c74c022088c0..75bf34fd9d9fc5 100644 --- a/ports/cpp-peglib/portfile.cmake +++ b/ports/cpp-peglib/portfile.cmake @@ -1,5 +1,4 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO yhirose/cpp-peglib diff --git a/ports/cpp-peglib/vcpkg.json b/ports/cpp-peglib/vcpkg.json new file mode 100644 index 00000000000000..b7e97849632314 --- /dev/null +++ b/ports/cpp-peglib/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "cpp-peglib", + "version-string": "0.1.0", + "port-version": 1, + "description": "C++11 header-only PEG (Parsing Expression Grammars) library." +} diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL deleted file mode 100644 index 7d8823866f6341..00000000000000 --- a/ports/cpp-redis/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: cpp-redis -Version: 4.3.1-1 -Build-Depends: tacopie -Homepage: https://github.com/Cylix/cpp_redis -Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/ports/cpp-redis/portfile.cmake b/ports/cpp-redis/portfile.cmake index ee19a65100c288..6a8144b58a8ce5 100644 --- a/ports/cpp-redis/portfile.cmake +++ b/ports/cpp-redis/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO Cylix/cpp_redis + REPO cpp-redis/cpp_redis REF 4.3.1 SHA512 abf372542c53f37f504b3211b840b100d07a8f4b2e7f5584cc7550ab16ed617838e2df79064374c7a409458d8567f4834686318ea3a40249c767e36c744c7a47 HEAD_REF master @@ -53,10 +51,10 @@ if(FILES_TO_REMOVE) file(REMOVE_RECURSE ${FILES_TO_REMOVE}) endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-redis RENAME copyright) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/cpp-redis/vcpkg.json b/ports/cpp-redis/vcpkg.json new file mode 100644 index 00000000000000..a0b08e18a7cff3 --- /dev/null +++ b/ports/cpp-redis/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "cpp-redis", + "version-string": "4.3.1", + "port-version": 3, + "description": "cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining.", + "homepage": "https://github.com/cpp-redis/cpp_redis", + "dependencies": [ + "tacopie" + ] +} diff --git a/ports/cpp-taskflow/CONTROL b/ports/cpp-taskflow/CONTROL deleted file mode 100644 index 69b58ea81d8c1f..00000000000000 --- a/ports/cpp-taskflow/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cpp-taskflow -Version: 2.2.0 -Description: Fast Parallel Tasking Programming Library using Modern C++. diff --git a/ports/cpp-taskflow/portfile.cmake b/ports/cpp-taskflow/portfile.cmake index 5160d02a260a31..0988d57b20164e 100644 --- a/ports/cpp-taskflow/portfile.cmake +++ b/ports/cpp-taskflow/portfile.cmake @@ -1,29 +1,2 @@ -# header-only library - -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO cpp-taskflow/cpp-taskflow - REF v2.2.0 - SHA512 c075f1b7e4dd6ed6d9561b860b660ee4b28eddb321d8aa8746fbec45b1039ab686700156e4273da5a4ac7af0707975331befd9bf3e51f18925ea3a9a60083549 - HEAD_REF master -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DTF_BUILD_EXAMPLES=OFF - -DTF_BUILD_TESTS=OFF - -DTF_BUILD_BENCHMARKS=OFF -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) - -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/cpp-taskflow/copyright COPYONLY) +message(WARNING "The port 'cpp-taskflow' has been replaced with 'taskflow'.") +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/cpp-taskflow/vcpkg.json b/ports/cpp-taskflow/vcpkg.json new file mode 100644 index 00000000000000..ca690bb21f0996 --- /dev/null +++ b/ports/cpp-taskflow/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "cpp-taskflow", + "version-string": "2.6.0", + "port-version": 1, + "description": "Fast Parallel Tasking Programming Library using Modern C++.", + "homepage": "https://github.com/taskflow/taskflow", + "dependencies": [ + "taskflow" + ] +} diff --git a/ports/cppad/pkgconfig-fix.patch b/ports/cppad/pkgconfig-fix.patch new file mode 100644 index 00000000000000..6688fc9d7f90f1 --- /dev/null +++ b/ports/cppad/pkgconfig-fix.patch @@ -0,0 +1,63 @@ +diff --git a/pkgconfig/CMakeLists.txt b/pkgconfig/CMakeLists.txt +index db8b65902..b1224a01d 100644 +--- a/pkgconfig/CMakeLists.txt ++++ b/pkgconfig/CMakeLists.txt +@@ -42,8 +42,9 @@ ENDIF( cppad_has_ipopt ) + # cppad_pkgconfig_cflags + # cppad_pkgconfig_cflags_uninstalled + # +-SET(cppad_pkgconfig_cflags "-I${cppad_abs_includedir}" ) +-SET(cppad_pkgconfig_cflags_uninstalled "-I${cppad_SOURCE_DIR}" ) ++SET(cppad_pkgconfig_includedir "${cmake_install_includedirs}" ) ++SET(cppad_pkgconfig_cflags_uninstalled "-I${cppad_SOURCE_DIR}" ) ++SET(cppad_pkgconfig_libdir "${cmake_install_libdirs}" ) + # ---------------------------------------------------------------------------- + # cppad_pkgconfig_libs + # cppad_pkgconfig_libs_uninstalled +@@ -74,7 +75,7 @@ IF( "${libs}" STREQUAL "" ) + SET(cppad_pkgconfig_libs "") + SET(cppad_pkgconfig_libs_uninstalled "") + ELSE( "${libs}" STREQUAL "" ) +- SET(cppad_pkgconfig_libs "-L${cppad_abs_libdir} ${libs}") ++ SET(cppad_pkgconfig_libs "-L\${libdir} ${libs}") + SET(cppad_pkgconfig_libs_uninstalled "${uninstalled} ${libs}") + ENDIF( "${libs}" STREQUAL "" ) + # +@@ -84,10 +85,12 @@ ENDIF( "${libs}" STREQUAL "" ) + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/cppad.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/cppad.pc ++ @ONLY + ) + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/cppad-uninstalled.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/cppad-uninstalled.pc ++ @ONLY + ) + # During install copy cppad.pc to datadir and libdir + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppad.pc +diff --git a/pkgconfig/cppad.pc.in b/pkgconfig/cppad.pc.in +index a202e3fb3..1c34c1e08 100644 +--- a/pkgconfig/cppad.pc.in ++++ b/pkgconfig/cppad.pc.in +@@ -12,12 +12,19 @@ + # This file is used with pkg-config to include CppAD after it is installed + # + # Entries set by top source directory CMakeLists.txt file ++ ++prefix=${pcfiledir}/../.. ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@cppad_pkgconfig_libdir@ ++includedir=${prefix}/@cppad_pkgconfig_includedir@ ++ + Name: cppad + Description: @cppad_description@ + Version: @cppad_version@ + URL: @cppad_url@ ++ + # + # Entries set by pkgconfig/CMakeLists.txt file +-Cflags: @cppad_pkgconfig_cflags@ ++Cflags: -I${includedir} + Libs: @cppad_pkgconfig_libs@ + Requires: @cppad_pkgconfig_requires@ diff --git a/ports/cppad/portfile.cmake b/ports/cppad/portfile.cmake new file mode 100644 index 00000000000000..1a041d48f4c86e --- /dev/null +++ b/ports/cppad/portfile.cmake @@ -0,0 +1,40 @@ +# the compilation fails on arm and uwp. Please check the related issue: +# https://github.com/microsoft/vcpkg/pull/12560#issuecomment-668412073 +vcpkg_fail_port_install(ON_TARGET "uwp" and "arm") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO coin-or/CppAD + REF 90c510458b61049c51f937fc6ed2e611fbb17b8b #20210000.7 + SHA512 112a4663a3e13f2d852c4ce4e57f6bee2dc7584915fcbab75972568258faab0d4a5761c4eaa4c664543cb8674e8e70c0623054c07dff933f9513a47f1c7d6261 + HEAD_REF master + PATCHES + windows-fix.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -Dcppad_prefix=${CURRENT_PACKAGES_DIR} + OPTIONS_RELEASE + -Dcmake_install_libdirs=lib + -Dcppad_debug_which:STRING=debug_none + OPTIONS_DEBUG + -Dcmake_install_libdirs=debug/lib +) + +vcpkg_cmake_install() + +# Install the pkgconfig file +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/pkgconfig/cppad.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/pkgconfig/cppad.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") +endif() + +vcpkg_fixup_pkgconfig() + +# Add the copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/cppad/vcpkg.json b/ports/cppad/vcpkg.json new file mode 100644 index 00000000000000..fdc3cad7a44d2f --- /dev/null +++ b/ports/cppad/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "cppad", + "version-string": "20210000.7", + "description": "CppAD: A Package for Differentiation of C++ Algorithms", + "homepage": "https://github.com/coin-or/CppAD", + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/cppad/windows-fix.patch b/ports/cppad/windows-fix.patch new file mode 100644 index 00000000000000..585e3294e08426 --- /dev/null +++ b/ports/cppad/windows-fix.patch @@ -0,0 +1,48 @@ +diff --git a/include/cppad/local/cppad_colpack.hpp b/include/cppad/local/cppad_colpack.hpp +index ee96ab5fe..6dd022180 100644 +--- a/include/cppad/local/cppad_colpack.hpp ++++ b/include/cppad/local/cppad_colpack.hpp +@@ -59,7 +59,7 @@ it is not the case that both + This routine tries to minimize, with respect to the choice of colors, + the number of colors. + */ +-extern void cppad_colpack_general( ++CPPAD_LIB_EXPORT void cppad_colpack_general( + CppAD::vector& color , + size_t m , + size_t n , +@@ -91,7 +91,7 @@ The properties of this coloring have not yet been determined; see + Efficient Computation of Sparse Hessians Using Coloring + and Automatic Differentiation (pdf/ad/gebemedhin14.pdf) + */ +-extern void cppad_colpack_symmetric( ++CPPAD_LIB_EXPORT void cppad_colpack_symmetric( + CppAD::vector& color , + size_t n , + const CppAD::vector& adolc_pattern +diff --git a/include/cppad/local/graph/json_parser.hpp b/include/cppad/local/graph/json_parser.hpp +index 17bcc7c7e..a28d2c045 100644 +--- a/include/cppad/local/graph/json_parser.hpp ++++ b/include/cppad/local/graph/json_parser.hpp +@@ -42,7 +42,7 @@ Upon return it is a $cref cpp_ad_graph$$ representation of this function. + $head Prototype$$ + $srccode%hpp% */ + namespace CppAD { namespace local { namespace graph { +- void json_parser( ++ CPPAD_LIB_EXPORT void json_parser( + const std::string& json , + cpp_graph& graph_obj + ); +diff --git a/include/cppad/local/graph/json_writer.hpp b/include/cppad/local/graph/json_writer.hpp +index 36a4cb39f..299c56cc0 100644 +--- a/include/cppad/local/graph/json_writer.hpp ++++ b/include/cppad/local/graph/json_writer.hpp +@@ -41,7 +41,7 @@ This is a $code cpp_graph$$ object. + $head Prototype$$ + $srccode%hpp% */ + namespace CppAD { namespace local { namespace graph { +- void json_writer( ++ CPPAD_LIB_EXPORT void json_writer( + std::string& json , + const cpp_graph& graph_obj + ); diff --git a/ports/cppcms/CONTROL b/ports/cppcms/CONTROL deleted file mode 100644 index 35296edc15eac1..00000000000000 --- a/ports/cppcms/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: cppcms -Version: 1.2.1 -Homepage: https://github.com/artyom-beilis/cppcms -Description: CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development -Build-Depends: icu, pcre, openssl, zlib diff --git a/ports/cppcms/portfile.cmake b/ports/cppcms/portfile.cmake index e6c6cfa2a68131..d25c1b18ef6328 100644 --- a/ports/cppcms/portfile.cmake +++ b/ports/cppcms/portfile.cmake @@ -1,4 +1,4 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install( ON_TARGET "linux" "osx") vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) @@ -6,16 +6,17 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO artyom-beilis/cppcms REF b72b19915794d1af63c9a9e9bea58e20a4ad93d4 - SHA512 e99d34d14fbde22be725ac2c0bec069fb584e45c66767af75efaf454ca61a7a5e57434bf86109f910884c72202b8cf98fe16505e7d3d30d9218abd4d8b27d5df + SHA512 e99d34d14fbde22be725ac2c0bec069fb584e45c66767af75efaf454ca61a7a5e57434bf86109f910884c72202b8cf98fe16505e7d3d30d9218abd4d8b27d5df ) vcpkg_find_acquire_program(PYTHON2) -get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DCMAKE_PROGRAM_PATH=${PYTHON2_DIR} -DUSE_WINDOWS6_API=ON + OPTIONS + -DPYTHON=${PYTHON2} # Switch to python3 on the next update + -DUSE_WINDOWS6_API=ON ) vcpkg_install_cmake() @@ -26,6 +27,4 @@ file(REMOVE ${EXE_DEBUG_FILES}) file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(REMOVE ${EXE_FILES}) -# Handle copyright -file(COPY ${SOURCE_PATH}/MIT.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppcms) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppcms/MIT.TXT ${CURRENT_PACKAGES_DIR}/share/cppcms/copyright) +file(INSTALL ${SOURCE_PATH}/MIT.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cppcms/vcpkg.json b/ports/cppcms/vcpkg.json new file mode 100644 index 00000000000000..0991668efc1a9d --- /dev/null +++ b/ports/cppcms/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "cppcms", + "version-string": "1.2.1", + "port-version": 3, + "description": "CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development", + "homepage": "https://github.com/artyom-beilis/cppcms", + "supports": "!(linux | osx)", + "dependencies": [ + "icu", + "openssl", + "pcre", + "zlib" + ] +} diff --git a/ports/cppcodec/CONTROL b/ports/cppcodec/CONTROL deleted file mode 100644 index 32f72bf2ff3e0c..00000000000000 --- a/ports/cppcodec/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cppcodec -Version: 0.2 -Description: Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32. \ No newline at end of file diff --git a/ports/cppcodec/portfile.cmake b/ports/cppcodec/portfile.cmake index b445f4d47474e3..63e1b95855cebe 100644 --- a/ports/cppcodec/portfile.cmake +++ b/ports/cppcodec/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tplgy/cppcodec diff --git a/ports/cppcodec/vcpkg.json b/ports/cppcodec/vcpkg.json new file mode 100644 index 00000000000000..0713dfd7f0fd8a --- /dev/null +++ b/ports/cppcodec/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "cppcodec", + "version-string": "0.2", + "port-version": 1, + "description": "Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32." +} diff --git a/ports/cppcoro/CMakeLists.txt b/ports/cppcoro/CMakeLists.txt new file mode 100644 index 00000000000000..975dae4f26dd6c --- /dev/null +++ b/ports/cppcoro/CMakeLists.txt @@ -0,0 +1,202 @@ +cmake_minimum_required(VERSION 3.8) +project(cppcoro VERSION 2020.2 LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) + +add_library(cppcoro + lib/async_mutex.cpp + lib/lightweight_manual_reset_event.cpp + lib/async_auto_reset_event.cpp + lib/async_manual_reset_event.cpp + lib/auto_reset_event.cpp + lib/auto_reset_event.hpp + lib/cancellation_registration.cpp + lib/cancellation_source.cpp + lib/cancellation_state.cpp + lib/cancellation_state.hpp + lib/cancellation_token.cpp + lib/spin_mutex.cpp + lib/spin_mutex.hpp + lib/spin_wait.cpp + lib/spin_wait.hpp + lib/static_thread_pool.cpp + lib/ip_address.cpp + lib/ip_endpoint.cpp + lib/ipv4_address.cpp + lib/ipv4_endpoint.cpp + lib/ipv6_address.cpp + lib/ipv6_endpoint.cpp +) + +if(APPLE) + message(STATUS "using sysroot: ${CMAKE_OSX_SYSROOT}") +elseif(WIN32) + message(STATUS "using platform: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") + # for now, build in single target + target_sources(cppcoro + PRIVATE + lib/win32.cpp + lib/file.cpp + lib/file_read_operation.cpp + lib/file_write_operation.cpp + lib/read_only_file.cpp + lib/read_write_file.cpp + lib/readable_file.cpp + lib/writable_file.cpp + lib/write_only_file.cpp + lib/socket.cpp + lib/socket_accept_operation.cpp + lib/socket_connect_operation.cpp + lib/socket_send_operation.cpp + lib/socket_send_to_operation.cpp + lib/socket_disconnect_operation.cpp + lib/socket_helpers.cpp + lib/socket_helpers.hpp + lib/socket_recv_from_operation.cpp + lib/socket_recv_operation.cpp + lib/io_service.cpp + ) +elseif(CMAKE_SYSTEM_NAME MATCHES "Linux") + message(STATUS "using system: ${CMAKE_HOST_SYSTEM_VERSION}") +endif() + +target_include_directories(cppcoro +PUBLIC + $ + $ +) + +if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + if(WIN32) + message(FATAL_ERROR " doesn't support clang-cl compiler") + else() + target_compile_options(cppcoro + PUBLIC + -std=c++1z -fcoroutines-ts + -stdlib=libc++ + ) + target_link_libraries(cppcoro + PUBLIC + c++ pthread + ) + endif() + +elseif(MSVC) + target_compile_options(cppcoro + PUBLIC + /await + PRIVATE + "/analyze:max_paths 512" + -D_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING=1 + ) + if(CMAKE_GENERATOR_PLATFORM STREQUAL x64) + target_compile_options(cppcoro + PUBLIC + /await:heapelide + ) + endif() + +endif() + +if(WIN32) + target_link_libraries(cppcoro + PUBLIC + kernel32 synchronization ws2_32 mswsock + # msvcrt[d] msvcprt[d] vcruntime ucrt + ) +elseif(APPLE) + +elseif(CMAKE_SYSTEM_NAME MATCHES Linux) + target_link_libraries(cppcoro + PUBLIC + c++ # stdc++ # expect libc++ instead of libstdc++ + ) +endif() + +install(DIRECTORY include/cppcoro + DESTINATION include +) + +install(TARGETS cppcoro + EXPORT ${PROJECT_NAME}-config + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(EXPORT ${PROJECT_NAME}-config + DESTINATION share/${PROJECT_NAME} +) + +include(CMakePackageConfigHelpers) +set(VERSION_FILE_PATH ${CMAKE_BINARY_DIR}/cmake/${PROJECT_NAME}-config-version.cmake) +write_basic_package_version_file(${VERSION_FILE_PATH} + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion +) + +install(FILES ${VERSION_FILE_PATH} + DESTINATION share/${PROJECT_NAME} +) + +if(NOT BUILD_TESTING) + return() +endif() +enable_testing() +find_package(Threads REQUIRED) + +add_executable(cppcoro_test + test/main.cpp test/counted.cpp + test/generator_tests.cpp + # test/recursive_generator_tests.cpp # clang crash + test/async_generator_tests.cpp + test/async_auto_reset_event_tests.cpp + test/async_manual_reset_event_tests.cpp + test/async_mutex_tests.cpp + test/async_latch_tests.cpp + test/cancellation_token_tests.cpp + test/task_tests.cpp + test/sequence_barrier_tests.cpp + test/shared_task_tests.cpp + test/sync_wait_tests.cpp + test/single_consumer_async_auto_reset_event_tests.cpp + test/single_producer_sequencer_tests.cpp + test/multi_producer_sequencer_tests.cpp + test/when_all_tests.cpp + test/when_all_ready_tests.cpp + test/ip_address_tests.cpp + test/ip_endpoint_tests.cpp + test/ipv4_address_tests.cpp + test/ipv4_endpoint_tests.cpp + test/ipv6_address_tests.cpp + test/ipv6_endpoint_tests.cpp + test/static_thread_pool_tests.cpp +) + +target_link_libraries(cppcoro_test +PRIVATE + cppcoro + Threads::Threads +) + +find_package(doctest CONFIG REQUIRED) +get_target_property(DOCTEST_INCLUDE_DIR doctest::doctest + INTERFACE_INCLUDE_DIRECTORIES +) +message(STATUS "using doctest: ${DOCTEST_INCLUDE_DIR}") +target_link_libraries(cppcoro_test +PRIVATE + doctest::doctest +) + +if(WIN32) + target_sources(cppcoro_test + PRIVATE + test/scheduling_operator_tests.cpp + test/io_service_tests.cpp + test/file_tests.cpp + test/socket_tests.cpp + ) +endif() + +add_test(NAME test_all COMMAND cppcoro_test --duration=true ) \ No newline at end of file diff --git a/ports/cppcoro/portfile.cmake b/ports/cppcoro/portfile.cmake new file mode 100644 index 00000000000000..7938a65ba067c3 --- /dev/null +++ b/ports/cppcoro/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(VCPKG_TARGET_IS_LINUX) + message("Warning: cppcoro requires libc++ and Clang on Linux. See https://github.com/microsoft/vcpkg/pull/10693#issuecomment-610394650.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lewissbaker/cppcoro + REF 92892f31d0c41b8e34e6292d7c9d99228da5c501 + SHA512 d1997b7449f1c5c0790575d0755ffbb5f9eef13a7610f3ec666a585bdbb93bb1553f79214c1023a1ef23aaeef64078ca6ee3784107645d7a75c7bba943c10b84 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=False +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/cppcoro/vcpkg.json b/ports/cppcoro/vcpkg.json new file mode 100644 index 00000000000000..e5e116dc85e503 --- /dev/null +++ b/ports/cppcoro/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "cppcoro", + "version-string": "2020-2-28", + "port-version": 2, + "description": "A library of C++ coroutine abstractions for the Coroutines TS", + "homepage": "https://github.com/lewissbaker/cppcoro", + "supports": "!uwp" +} diff --git a/ports/cppfs/CONTROL b/ports/cppfs/CONTROL deleted file mode 100644 index d94532e8a8051c..00000000000000 --- a/ports/cppfs/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: cppfs -Version: 1.2.0-1 -Description: Cross-platform C++ file system library supporting multiple backends - -Feature: ssh -Description: SSH backend for cppfs -Build-Depends: libssh2,openssl,zlib diff --git a/ports/cppfs/portfile.cmake b/ports/cppfs/portfile.cmake index b108c55749309f..ce7c696ad478c9 100644 --- a/ports/cppfs/portfile.cmake +++ b/ports/cppfs/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cginternals/cppfs - REF v1.2.0 - SHA512 2e831978dd87bd40d14e5b6f5089f3a962481d41959bfd62db543339d05e306315a1167c3bc06b372517357cc314f7d06ac19605f9a2d5b4edddc9a1f3fa8d03 + REF 156d72e2cf0a9b12bdce369fc5b5d98fb5dffe2d # v1.3.0 + SHA512 da1e09f79d9e65e7676784f47196645aabe1e1284f0ea5e48e845a244f5d49f5ea4b032f9e2e38c8e6a29657ebe636c9b1c9a4601c4bbc7637e7f592c52a8961 HEAD_REF master PATCHES LibCrypto-fix.patch @@ -40,5 +38,3 @@ vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppfs RENAME copyright) - -vcpkg_test_cmake(PACKAGE_NAME cppfs) diff --git a/ports/cppfs/vcpkg.json b/ports/cppfs/vcpkg.json new file mode 100644 index 00000000000000..75db6fc3e70457 --- /dev/null +++ b/ports/cppfs/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "cppfs", + "version-string": "1.3.0", + "port-version": 1, + "description": "Cross-platform C++ file system library supporting multiple backends", + "supports": "!uwp", + "features": { + "ssh": { + "description": "SSH backend for cppfs", + "dependencies": [ + "libssh2", + "openssl", + "zlib" + ] + } + } +} diff --git a/ports/cppgraphqlgen/CONTROL b/ports/cppgraphqlgen/CONTROL deleted file mode 100644 index 67b17b7fc705fa..00000000000000 --- a/ports/cppgraphqlgen/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cppgraphqlgen -Version: 3.0.2 -Build-Depends: boost-filesystem (!uwp&!windows), boost-program-options, pegtl, rapidjson -Description: C++ GraphQL schema service generator diff --git a/ports/cppgraphqlgen/portfile.cmake b/ports/cppgraphqlgen/portfile.cmake index b4f22868eedbe2..476d68956f38e3 100644 --- a/ports/cppgraphqlgen/portfile.cmake +++ b/ports/cppgraphqlgen/portfile.cmake @@ -1,29 +1,37 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/cppgraphqlgen - REF v3.0.2 - SHA512 ae2e94e7cb8853c88d2dbf226dec52e30fb16d1889f14f94d2a585dd2be1985e58ac8c16765b970c4417c08d519b32514080d90bfab7e34b66dc7c32b9f9caa6 - HEAD_REF master + REF v3.6.0 + SHA512 148751b1db1b3e917e74ef93fe3533a29153f0b5d1a20544eda32d0376e2c6f5cfc2d60fbc9d077d595e7072d0b6a36dbf8f2524903db40b576ee48196b2c3e8 + HEAD_REF main ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DGRAPHQL_BUILD_TESTS=OFF -DGRAPHQL_UPDATE_SAMPLES=OFF - OPTIONS_RELEASE -DGRAPHQL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share -DGRAPHQL_INSTALL_TOOLS_DIR=${CURRENT_PACKAGES_DIR}/tools - OPTIONS_DEBUG -DGRAPHQL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/debug/share -DGRAPHQL_INSTALL_TOOLS_DIR=${CURRENT_PACKAGES_DIR}/debug/tools + OPTIONS + -DGRAPHQL_BUILD_TESTS=OFF + -DGRAPHQL_UPDATE_VERSION=OFF + -DGRAPHQL_UPDATE_SAMPLES=OFF + -DGRAPHQL_INSTALL_CONFIGURATIONS=Release + OPTIONS_RELEASE + -DGRAPHQL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share + -DGRAPHQL_INSTALL_TOOLS_DIR=${CURRENT_PACKAGES_DIR}/tools + OPTIONS_DEBUG + -DGRAPHQL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/debug/share + -DGRAPHQL_INSTALL_TOOLS_DIR=${CURRENT_PACKAGES_DIR}/debug/tools ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/cppgraphqlgen) +vcpkg_copy_tools( + TOOL_NAMES schemagen + SEARCH_DIR ${CURRENT_PACKAGES_DIR}/tools/cppgraphqlgen) vcpkg_copy_pdbs() -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppgraphqlgen/copyright COPYONLY) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_test_cmake(PACKAGE_NAME cppgraphqlgen) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cppgraphqlgen/vcpkg.json b/ports/cppgraphqlgen/vcpkg.json new file mode 100644 index 00000000000000..ace8b4ea886daf --- /dev/null +++ b/ports/cppgraphqlgen/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "cppgraphqlgen", + "version-semver": "3.6.0", + "description": "C++ GraphQL schema service generator", + "homepage": "https://github.com/microsoft/cppgraphqlgen", + "dependencies": [ + "boost-program-options", + "pegtl", + "rapidjson" + ] +} diff --git a/ports/cppitertools/CONTROL b/ports/cppitertools/CONTROL deleted file mode 100644 index 8c5f387ec84011..00000000000000 --- a/ports/cppitertools/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cppitertools -Version: 2019-04-14-2 -Description: Range-based for loop add-ons inspired by the Python builtins and itertools library -Build-Depends: boost-optional diff --git a/ports/cppitertools/fix-cmake-install-dir.patch b/ports/cppitertools/fix-cmake-install-dir.patch new file mode 100644 index 00000000000000..e3591f9baa01d6 --- /dev/null +++ b/ports/cppitertools/fix-cmake-install-dir.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3caa411..775ce02 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,7 +14,7 @@ add_library(cppitertools::cppitertools ALIAS cppitertools) + + target_include_directories(cppitertools INTERFACE + $ +- $ ++ $ + ) + + +@@ -37,5 +37,5 @@ install(EXPORT cppitertools-targets + DESTINATION ${cppitertools_INSTALL_CMAKE_DIR}/cppitertools + ) + +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppitertools-config-version.cmake DESTINATION ${cppitertools_INSTALL_CMAKE_DIR}) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppitertools-config-version.cmake DESTINATION ${cppitertools_INSTALL_CMAKE_DIR}/cppitertools) + install(DIRECTORY . DESTINATION ${cppitertools_INSTALL_INCLUDE_DIR}/cppitertools) diff --git a/ports/cppitertools/portfile.cmake b/ports/cppitertools/portfile.cmake index f19069a3b1f04f..8d92a0f2292dea 100644 --- a/ports/cppitertools/portfile.cmake +++ b/ports/cppitertools/portfile.cmake @@ -1,20 +1,25 @@ -# header-only library - -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO ryanhaining/cppitertools - REF 97bfd33cdc268426b20f189c13d3ed88f5e1f4c2 - SHA512 7b8926cf00b5be17fa89a1d1aea883e60848187bb00d637c40a20f6e11811add4785f2f461e530a6cd557d3be16490799ffcd7ea90bd7b58fdca549c3df03e8c - HEAD_REF master -) - -file(GLOB INCLUDE_FILES ${SOURCE_PATH}/*.hpp) -file(GLOB INCLUDE_INTERNAL_FILES ${SOURCE_PATH}/internal/*.hpp) - -file(COPY ${INCLUDE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${INCLUDE_INTERNAL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/internal) - -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ryanhaining/cppitertools + REF 539a5be8359c4330b3f88ed1821f32bb5c89f5f6 + SHA512 cab0cb8a6b711824c13ca013b3349b9decb84f2dab6305bfb1bdd013f7426d5b199c127dadabeaaafc2e7ff6ad442222dd0fffee9aaacfa27d3aeb82c344ae4f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dcppitertools_INSTALL_CMAKE_DIR=share +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/share/cppitertools-config-version.cmake) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppitertools + RENAME copyright) diff --git a/ports/cppitertools/vcpkg.json b/ports/cppitertools/vcpkg.json new file mode 100644 index 00000000000000..8f643e6bc1b66f --- /dev/null +++ b/ports/cppitertools/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "cppitertools", + "version-string": "2.1", + "port-version": 1, + "description": "Range-based for loop add-ons inspired by the Python builtins and itertools library", + "homepage": "https://github.com/ryanhaining/cppitertools", + "dependencies": [ + "boost-optional" + ] +} diff --git a/ports/cppkafka/fix-dynamic.patch b/ports/cppkafka/fix-dynamic.patch new file mode 100644 index 00000000000000..f18a0fbf76e731 --- /dev/null +++ b/ports/cppkafka/fix-dynamic.patch @@ -0,0 +1,12 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5d31078..b1d3634 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -43,6 +43,7 @@ target_include_directories(cppkafka PUBLIC ${PROJECT_SOURCE_DIR}/include) + + install( + TARGETS cppkafka ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + COMPONENT dev diff --git a/ports/cppkafka/portfile.cmake b/ports/cppkafka/portfile.cmake new file mode 100644 index 00000000000000..ccaee4ed4dcc48 --- /dev/null +++ b/ports/cppkafka/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mfontanini/cppkafka + REF v0.3.1 + SHA512 60d01ce1dd9bd9119676be939ed5ab03539abb1f945c1b31e432edfe0f06542778f7fef37696f5ff19c53024f44d5cbd8aeddbbb231c38b098e05285d3ff0cab + HEAD_REF master + PATCHES fix-dynamic.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(CPPKAFKA_BUILD_SHARED OFF) +else() + set(CPPKAFKA_BUILD_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCPPKAFKA_BUILD_SHARED=${CPPKAFKA_BUILD_SHARED} + -DCPPKAFKA_DISABLE_TESTS=ON + -DCPPKAFKA_DISABLE_EXAMPLES=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/cppkafka/vcpkg.json b/ports/cppkafka/vcpkg.json new file mode 100644 index 00000000000000..00473d9725c836 --- /dev/null +++ b/ports/cppkafka/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "cppkafka", + "version-string": "0.3.1", + "port-version": 3, + "description": "cppkafka allows C++ applications to consume and produce messages using the Apache Kafka protocol. The library is built on top of librdkafka, and provides a high level API that uses modern C++ features to make it easier to write code while keeping the wrapper's performance overhead to a minimum.", + "homepage": "https://github.com/mfontanini/cppkafka", + "dependencies": [ + "boost-program-options", + "librdkafka" + ] +} diff --git a/ports/cppmicroservices/CONTROL b/ports/cppmicroservices/CONTROL deleted file mode 100644 index 9a53e06b16a304..00000000000000 --- a/ports/cppmicroservices/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cppmicroservices -Version: 4.0.0-pre1 -Description: An OSGi-like C++ dynamic module system and service registry diff --git a/ports/cppmicroservices/fix-dependency-gtest.patch b/ports/cppmicroservices/fix-dependency-gtest.patch new file mode 100644 index 00000000000000..9eb9459f10127b --- /dev/null +++ b/ports/cppmicroservices/fix-dependency-gtest.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 136edff..9d29522 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -288,6 +288,10 @@ if(US_COMPILER_APPLE_CLANG OR US_COMPILER_CLANG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() + ++# Dependency ++find_package(GTest CONFIG REQUIRED) ++link_libraries(GTest::gtest GTest::gmock) ++ + #----------------------------------------------------------------------------- + # Testing configuration + #----------------------------------------------------------------------------- +@@ -338,7 +342,7 @@ if(US_BUILD_TESTING) + endif() + + if(US_USE_SYSTEM_GTEST) +- find_package(GTest REQUIRED) ++ find_package(GTest CONFIG REQUIRED) + else() + # This keeps GTest CMake variables hidden from users unless they explicitly want to view/modify them. + us_cache_var(BUILD_GMOCK ON BOOL "Build GMock" ADVANCED FORCE) diff --git a/ports/cppmicroservices/fix-warning-c4834.patch b/ports/cppmicroservices/fix-warning-c4834.patch new file mode 100644 index 00000000000000..893b28d30e827f --- /dev/null +++ b/ports/cppmicroservices/fix-warning-c4834.patch @@ -0,0 +1,25 @@ +diff --git a/httpservice/src/ServletContainer.cpp b/httpservice/src/ServletContainer.cpp +index b4af8c9..8713066 100644 +--- a/httpservice/src/ServletContainer.cpp ++++ b/httpservice/src/ServletContainer.cpp +@@ -279,7 +279,9 @@ void ServletContainer::SetContextPath(const std::string& path) + + std::string ServletContainer::GetContextPath() const + { +- return Lock(d->m_Mutex), d->m_ContextPath; ++ Lock l(d->m_Mutex); ++ US_UNUSED(l); ++ return d->m_ContextPath; + } + + void ServletContainer::Start() +@@ -306,6 +308,8 @@ std::shared_ptr ServletContainer::GetContext( + std::string ServletContainer::GetContextPath( + const ServletContext* /*context*/) const + { +- return Lock(d->m_Mutex), d->m_ContextPath; ++ Lock l(d->m_Mutex); ++ US_UNUSED(l); ++ return d->m_ContextPath; + } + } diff --git a/ports/cppmicroservices/portfile.cmake b/ports/cppmicroservices/portfile.cmake index d0edb63745a86b..47c209a8773a77 100644 --- a/ports/cppmicroservices/portfile.cmake +++ b/ports/cppmicroservices/portfile.cmake @@ -1,10 +1,13 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "CppMicroServices/CppMicroservices" - REF b322441568f903ef96c0ccb03e2611d052ceb4e0 - SHA512 1673dfe9dba913890ec93e351263a924437a0d739a5858dcdc07650e1aaca30c3b4fcce59e32b201c1d65e15eb82e27912d759e4d07ecc149ae8a4f9eb1669bc + REF b4d3d404df01d67dfd7fc36111bc5de50e1b89d6 # v3.4.0 + SHA512 b4a55f7c86cae25e936a237108b82824458b123fa1c14d4e0218c72c444a6d7f0db8900409af321225ec818f5691894b01fd311c606463386e7ce8e81e3656c8 HEAD_REF development - PATCHES werror.patch + PATCHES + werror.patch + fix-dependency-gtest.patch + fix-warning-c4834.patch ) vcpkg_configure_cmake( @@ -13,20 +16,21 @@ vcpkg_configure_cmake( OPTIONS -DTOOLS_INSTALL_DIR:STRING=tools/cppmicroservices -DAUXILIARY_INSTALL_DIR:STRING=share/cppmicroservices + -DUS_USE_SYSTEM_GTEST=TRUE ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppmicroservices RENAME copyright) - vcpkg_fixup_cmake_targets() +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + # CppMicroServices uses a custom resource compiler to compile resources # the zipped resources are then appended to the target which cause the linker to crash # when compiling a static library if(NOT BUILD_SHARED_LIBS) set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -endif() +endif() \ No newline at end of file diff --git a/ports/cppmicroservices/vcpkg.json b/ports/cppmicroservices/vcpkg.json new file mode 100644 index 00000000000000..1c28245eb77d89 --- /dev/null +++ b/ports/cppmicroservices/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "cppmicroservices", + "version-string": "3.4.0", + "port-version": 3, + "description": "An OSGi-like C++ dynamic module system and service registry", + "homepage": "https://github.com/CppMicroServices/CppMicroServices", + "dependencies": [ + "gtest" + ] +} diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL deleted file mode 100644 index 8771646738e2b6..00000000000000 --- a/ports/cpprestsdk/CONTROL +++ /dev/null @@ -1,23 +0,0 @@ -Source: cpprestsdk -Version: 2.10.14-1 -Build-Depends: openssl (!uwp&!windows), boost-system (!uwp&!windows), boost-date-time (!uwp&!windows), boost-regex (!uwp&!windows), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows), boost-asio (!uwp&!windows) -Homepage: https://github.com/Microsoft/cpprestsdk -Description: C++11 JSON, REST, and OAuth library - The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. -Default-Features: default-features - -Feature: default-features -Build-Depends: cpprestsdk[brotli] (windows), cpprestsdk[core], cpprestsdk[compression], cpprestsdk[websockets] -Description: Features installed by default - -Feature: compression -Build-Depends: zlib -Description: HTTP Compression support - -Feature: websockets -Build-Depends: cpprestsdk[core], cpprestsdk[compression], websocketpp (!uwp), openssl (!uwp), boost-system (!uwp), boost-date-time (!uwp), boost-regex (!uwp) -Description: Websockets support - -Feature: brotli -Build-Depends: cpprestsdk[core], cpprestsdk[compression], brotli -Description: Brotli compression support diff --git a/ports/cpprestsdk/fix-find-openssl.patch b/ports/cpprestsdk/fix-find-openssl.patch new file mode 100644 index 00000000000000..ec420e6771a060 --- /dev/null +++ b/ports/cpprestsdk/fix-find-openssl.patch @@ -0,0 +1,18 @@ +diff --git a/Release/cmake/cpprest_find_openssl.cmake b/Release/cmake/cpprest_find_openssl.cmake +index 9333663..c1df089 100644 +--- a/Release/cmake/cpprest_find_openssl.cmake ++++ b/Release/cmake/cpprest_find_openssl.cmake +@@ -36,8 +36,11 @@ function(cpprest_find_openssl) + # Prefer a homebrew version of OpenSSL over the one in /usr/lib + file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl*/*) + # Prefer the latest (make the latest one first) +- list(REVERSE OPENSSL_ROOT_DIR) +- list(GET OPENSSL_ROOT_DIR 0 OPENSSL_ROOT_DIR) ++ if(OPENSSL_ROOT_DIR) ++ # Prefer the latest (make the latest one first) ++ list(REVERSE OPENSSL_ROOT_DIR) ++ list(GET OPENSSL_ROOT_DIR 0 OPENSSL_ROOT_DIR) ++ endif() + endif() + # This should prevent linking against the system provided 0.9.8y + message(STATUS "OPENSSL_ROOT_DIR = ${OPENSSL_ROOT_DIR}") diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index 4a6dad14287371..4682018089808b 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -1,59 +1,53 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/cpprestsdk - REF v2.10.14 - SHA512 7208b8c31e42a9bda2bf1d5c65527e54e3f946ec57743aaf7058c12a311de78de354d5ff859f35b3a8936c8964ac5695a692e234f3365edc426cf9580f76cd4f + REF 122d09549201da5383321d870bed45ecb9e168c5 + SHA512 c9ded33d3c67880e2471e479a38b40a14a9ff45d241e928b6339eca697b06ad621846260eca47b6b1b8a2bc9ab7bf4fea8d3e8e795cd430d8839beb530e16dd7 HEAD_REF master + PATCHES fix-find-openssl.patch ) set(OPTIONS) -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_TARGET_IS_UWP) SET(WEBSOCKETPP_PATH "${CURRENT_INSTALLED_DIR}/share/websocketpp") list(APPEND OPTIONS -DWEBSOCKETPP_CONFIG=${WEBSOCKETPP_PATH} -DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH}) endif() -set(CPPREST_EXCLUDE_BROTLI ON) -if ("brotli" IN_LIST FEATURES) - set(CPPREST_EXCLUDE_BROTLI OFF) -endif() - -set(CPPREST_EXCLUDE_COMPRESSION ON) -if ("compression" IN_LIST FEATURES) - set(CPPREST_EXCLUDE_COMPRESSION OFF) -endif() - -set(CPPREST_EXCLUDE_WEBSOCKETS ON) -if("websockets" IN_LIST FEATURES) - set(CPPREST_EXCLUDE_WEBSOCKETS OFF) -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + brotli CPPREST_EXCLUDE_BROTLI + compression CPPREST_EXCLUDE_COMPRESSION + websockets CPPREST_EXCLUDE_WEBSOCKETS +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/Release PREFER_NINJA OPTIONS ${OPTIONS} + ${FEATURE_OPTIONS} -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF - -DCPPREST_EXCLUDE_BROTLI=${CPPREST_EXCLUDE_BROTLI} - -DCPPREST_EXCLUDE_COMPRESSION=${CPPREST_EXCLUDE_COMPRESSION} - -DCPPREST_EXCLUDE_WEBSOCKETS=${CPPREST_EXCLUDE_WEBSOCKETS} -DCPPREST_EXPORT_DIR=share/cpprestsdk -DWERROR=OFF + -DPKG_CONFIG_EXECUTABLE=FALSE OPTIONS_DEBUG -DCPPREST_INSTALL_HEADERS=OFF ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/cpprestsdk) +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/${PORT}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/share ${CURRENT_PACKAGES_DIR}/lib/share) -file(INSTALL - ${SOURCE_PATH}/license.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpprestsdk RENAME copyright) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/cpprest/details/cpprest_compat.h + "#ifdef _NO_ASYNCRTIMP" "#if 1") +endif() -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cpprestsdk/vcpkg.json b/ports/cpprestsdk/vcpkg.json new file mode 100644 index 00000000000000..d33e61ed9345aa --- /dev/null +++ b/ports/cpprestsdk/vcpkg.json @@ -0,0 +1,122 @@ +{ + "name": "cpprestsdk", + "version-string": "2.10.18", + "description": [ + "C++11 JSON, REST, and OAuth library", + "The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services." + ], + "homepage": "https://github.com/Microsoft/cpprestsdk", + "dependencies": [ + { + "name": "boost-asio", + "platform": "!uwp & !windows" + }, + { + "name": "boost-chrono", + "platform": "!uwp & !windows" + }, + { + "name": "boost-date-time", + "platform": "!uwp & !windows" + }, + { + "name": "boost-filesystem", + "platform": "!uwp & !windows" + }, + { + "name": "boost-random", + "platform": "!uwp & !windows" + }, + { + "name": "boost-regex", + "platform": "!uwp & !windows" + }, + { + "name": "boost-system", + "platform": "!uwp & !windows" + }, + { + "name": "boost-thread", + "platform": "!uwp & !windows" + }, + { + "name": "openssl", + "platform": "!uwp & !windows" + } + ], + "default-features": [ + "default-features" + ], + "features": { + "brotli": { + "description": "Brotli compression support", + "dependencies": [ + "brotli", + { + "name": "cpprestsdk", + "default-features": false, + "features": [ + "compression" + ] + } + ] + }, + "compression": { + "description": "HTTP Compression support", + "dependencies": [ + "zlib" + ] + }, + "default-features": { + "description": "Features installed by default", + "dependencies": [ + { + "name": "cpprestsdk", + "default-features": false, + "features": [ + "compression" + ] + }, + { + "name": "cpprestsdk", + "features": [ + "brotli" + ], + "platform": "windows" + } + ] + }, + "websockets": { + "description": "Websockets support", + "dependencies": [ + { + "name": "boost-date-time", + "platform": "!uwp" + }, + { + "name": "boost-regex", + "platform": "!uwp" + }, + { + "name": "boost-system", + "platform": "!uwp" + }, + { + "name": "cpprestsdk", + "default-features": false, + "features": [ + "compression" + ] + }, + { + "name": "openssl", + "platform": "!uwp" + }, + { + "name": "websocketpp", + "platform": "!uwp" + } + ] + } + } +} diff --git a/ports/cpptoml/CONTROL b/ports/cpptoml/CONTROL deleted file mode 100644 index 2409ddbd215210..00000000000000 --- a/ports/cpptoml/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cpptoml -Version: v0.1.1 -Description: A header-only library for parsing TOML configuration files. diff --git a/ports/cpptoml/portfile.cmake b/ports/cpptoml/portfile.cmake index 093feb9aa760ee..62ea5fdec4453f 100644 --- a/ports/cpptoml/portfile.cmake +++ b/ports/cpptoml/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO skystrife/cpptoml diff --git a/ports/cpptoml/vcpkg.json b/ports/cpptoml/vcpkg.json new file mode 100644 index 00000000000000..13afe69b4caa2c --- /dev/null +++ b/ports/cpptoml/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "cpptoml", + "version-string": "v0.1.1", + "port-version": 1, + "description": "A header-only library for parsing TOML configuration files." +} diff --git a/ports/cppunit/0001-static-crt-linkage.patch b/ports/cppunit/0001-static-crt-linkage.patch deleted file mode 100644 index f058c32f9383bc..00000000000000 --- a/ports/cppunit/0001-static-crt-linkage.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/src/cppunit/cppunit.vcxproj b/src/cppunit/cppunit.vcxproj -index 0367d20..f799518 100644 ---- a/src/cppunit/cppunit.vcxproj -+++ b/src/cppunit/cppunit.vcxproj -@@ -84,7 +84,7 @@ - - - -- MultiThreadedDLL -+ MultiThreaded - OnlyExplicitInline - true - true -@@ -119,7 +119,7 @@ - - - -- MultiThreadedDLL -+ MultiThreaded - OnlyExplicitInline - true - true -@@ -154,7 +154,7 @@ - - - -- MultiThreadedDebugDLL -+ MultiThreadedDebug - Default - false - Disabled -@@ -189,7 +189,7 @@ - - - -- MultiThreadedDebugDLL -+ MultiThreadedDebug - Default - false - Disabled diff --git a/ports/cppunit/CMakeLists.txt b/ports/cppunit/CMakeLists.txt new file mode 100644 index 00000000000000..68b684db8bab83 --- /dev/null +++ b/ports/cppunit/CMakeLists.txt @@ -0,0 +1,51 @@ +project(cppunit) +cmake_minimum_required(VERSION 2.8.12) + +set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" + CACHE PATH "Installation directory for executables" +) +set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" + CACHE PATH "Installation directory for libraries" +) +set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" + CACHE PATH "Installation directory for headers" +) + +file(GLOB CPPUNIT_SRC RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/src/cppunit/*.cpp") +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) + +set(DLLPLUGINTESTER_SRC + ${CMAKE_CURRENT_SOURCE_DIR}/src/DllPlugInTester/CommandLineParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/DllPlugInTester/DllPlugInTester.cpp +) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/DllPlugInTester) + +if(WIN32) + set(CMAKE_DEBUG_POSTFIX d) +endif() + +if(BUILD_SHARED_LIBS) + add_library(cppunit SHARED ${CPPUNIT_SRC}) + add_definitions(-DCPPUNIT_BUILD_DLL) +else() + add_library(cppunit STATIC ${CPPUNIT_SRC}) +endif() + +add_executable(DllPlugInTester ${DLLPLUGINTESTER_SRC}) +target_link_libraries(DllPlugInTester cppunit) + +install(TARGETS cppunit + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" +) + +install(TARGETS DllPlugInTester + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" +) + +install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/cppunit" + DESTINATION "${INSTALL_INC_DIR}" +) diff --git a/ports/cppunit/CONTROL b/ports/cppunit/CONTROL deleted file mode 100644 index b7d8968d72ab08..00000000000000 --- a/ports/cppunit/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cppunit -Version: 1.14.0 -Description: CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests. \ No newline at end of file diff --git a/ports/cppunit/CppUnitConfig.cmake b/ports/cppunit/CppUnitConfig.cmake new file mode 100644 index 00000000000000..b3e6146d1bb00e --- /dev/null +++ b/ports/cppunit/CppUnitConfig.cmake @@ -0,0 +1,83 @@ + +include(SelectLibraryConfigurations) + +find_path(CppUnit_INCLUDE_DIR TestCase.h PATH_SUFFIXES cppunit) +find_library(CppUnit_LIBRARY_RELEASE NAMES cppunit PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib" NO_DEFAULT_PATH) +find_library(CppUnit_LIBRARY_DEBUG NAMES cppunitd cppunit PATHS "${CMAKE_CURRENT_LIST_DIR}/../../debug/lib" NO_DEFAULT_PATH) +select_library_configurations(CppUnit) + +if(NOT CppUnit_LIBRARY) + set(CppUnit_FOUND FALSE) + set(CPPUNIT_FOUND FALSE) + return() +endif() + +if(WIN32) + find_file(CppUnit_LIBRARY_RELEASE_DLL NAMES cppunit.dll PATHS "${CMAKE_CURRENT_LIST_DIR}/../../bin" NO_DEFAULT_PATH) + find_file(CppUnit_LIBRARY_DEBUG_DLL NAMES cppunitd.dll PATHS "${CMAKE_CURRENT_LIST_DIR}/../../debug/bin" NO_DEFAULT_PATH) +endif() + +# Manage Release Windows shared +if(EXISTS "${CppUnit_LIBRARY_RELEASE_DLL}") + add_library(CppUnit SHARED IMPORTED) + set_target_properties(CppUnit PROPERTIES + IMPORTED_CONFIGURATIONS Release + IMPORTED_LOCATION_RELEASE "${CppUnit_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB_RELEASE "${CppUnit_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${CppUnit_INCLUDE_DIR}" + ) +endif() + +# Manage Debug Windows shared +if(EXISTS "${CppUnit_LIBRARY_DEBUG_DLL}") + if(EXISTS "${CppUnit_LIBRARY_RELEASE_DLL}") + set_target_properties(CppUnit PROPERTIES + IMPORTED_CONFIGURATIONS "Release;Debug" + IMPORTED_LOCATION_RELEASE "${CppUnit_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB_RELEASE "${CppUnit_LIBRARY_RELEASE}" + IMPORTED_LOCATION_DEBUG "${CppUnit_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${CppUnit_LIBRARY_DEBUG}" + INTERFACE_INCLUDE_DIRECTORIES "${CppUnit_INCLUDE_DIR}" + ) + else() + add_library(CppUnit SHARED IMPORTED) + set_target_properties(CppUnit PROPERTIES + IMPORTED_CONFIGURATIONS Debug + IMPORTED_LOCATION_DEBUG "${CppUnit_LIBRARY_DEBUG_DLL" + IMPORTED_IMPLIB_DEBUG "${CppUnit_LIBRARY_DEBUG}" + INTERFACE_INCLUDE_DIRECTORIES "${CppUnit_INCLUDE_DIR}" + ) + endif() +endif() + +# Manage Release Windows static and Linux shared/static +if((NOT EXISTS "${CppUnit_LIBRARY_RELEASE_DLL}") AND (EXISTS "${CppUnit_LIBRARY_RELEASE}")) + add_library(CppUnit UNKNOWN IMPORTED) + set_target_properties(CppUnit PROPERTIES + IMPORTED_CONFIGURATIONS Release + IMPORTED_LOCATION_RELEASE "${CppUnit_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${CppUnit_INCLUDE_DIR}" + ) +endif() + +# Manage Debug Windows static and Linux shared/static +if((NOT EXISTS "${CppUnit_LIBRARY_DEBUG_DLL}") AND (EXISTS "${CppUnit_LIBRARY_DEBUG}")) + if(EXISTS "${CppUnit_LIBRARY_RELEASE}") + set_target_properties(CppUnit PROPERTIES + IMPORTED_CONFIGURATIONS "Release;Debug" + IMPORTED_LOCATION_RELEASE "${CppUnit_LIBRARY_RELEASE}" + IMPORTED_LOCATION_DEBUG "${CppUnit_LIBRARY_DEBUG}" + INTERFACE_INCLUDE_DIRECTORIES "${CppUnit_INCLUDE_DIR}" + ) + else() + add_library(CppUnit UNKNOWN IMPORTED) + set_target_properties(CppUnit PROPERTIES + IMPORTED_CONFIGURATIONS Debug + IMPORTED_LOCATION_DEBUG "${CppUnit_LIBRARY_DEBUG}" + INTERFACE_INCLUDE_DIRECTORIES "${CppUnit_INCLUDE_DIR}" + ) + endif() +endif() + +set(CppUnit_FOUND TRUE) +set(CPPUNIT_FOUND TRUE) \ No newline at end of file diff --git a/ports/cppunit/portfile.cmake b/ports/cppunit/portfile.cmake index 7a936d655a58dd..85beec6928dab5 100644 --- a/ports/cppunit/portfile.cmake +++ b/ports/cppunit/portfile.cmake @@ -1,58 +1,65 @@ -include(vcpkg_common_functions) -set(VERSION 1.14.0) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}/cppunit-${VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "http://dev-www.libreoffice.org/src/cppunit-${VERSION}.tar.gz" - FILENAME "cppunit-${VERSION}.tar.gz" - SHA512 4ea1da423c6f7ab37e4144689f593396829ce74d43872d6b10709c1ad5fbda4ee945842f7e9803592520ef81ac713e95a3fe130295bf048cd32a605d1959882e -) - -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) -vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) - -if (VCPKG_CRT_LINKAGE STREQUAL static) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - # Make sure cppunit static lib uses static CRT linkage - ${CMAKE_CURRENT_LIST_DIR}/0001-static-crt-linkage.patch - ) -endif() - -if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - set(BUILD_ARCH "Win32") - set(OUTPUT_DIR "Win32") -elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") - set(BUILD_ARCH "x64") -else() - message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/src/cppunit/cppunit_dll.vcxproj - PLATFORM ${BUILD_ARCH}) -elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/src/cppunit/cppunit.vcxproj - PLATFORM ${BUILD_ARCH}) -endif() - -file(COPY ${SOURCE_PATH}/include/cppunit DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY ${SOURCE_PATH}/lib/cppunitd_dll.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY ${SOURCE_PATH}/lib/cppunitd_dll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(COPY ${SOURCE_PATH}/lib/cppunit_dll.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${SOURCE_PATH}/lib/cppunit_dll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(COPY ${SOURCE_PATH}/lib/cppunitd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(COPY ${SOURCE_PATH}/lib/cppunit.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -endif() - -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppunit) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppunit/COPYING ${CURRENT_PACKAGES_DIR}/share/cppunit/copyright) - -vcpkg_copy_pdbs() \ No newline at end of file +# UWP is not supported +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_download_distfile(ARCHIVE + URLS "http://dev-www.libreoffice.org/src/cppunit-1.15.1.tar.gz" + FILENAME "cppunit-1.15.1.tar.gz" + SHA512 0feb47faec451357bb4c4e287efa17bb60fd3ad966d5350e9f25b414aaab79e94921024b0c0497672f8d3eeb22a599213d2d71d9e1d28b243b3e37f3a9a43691 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +if(VCPKG_TARGET_IS_WINDOWS) + # Use a simple CMakeLists.txt to build CppUnit on windows + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) + + vcpkg_install_cmake() + + # Move EXE to 'tools' + vcpkg_copy_tools(TOOL_NAMES DllPlugInTester AUTO_CLEAN) +else() + # Use a configure on unix. It should be doable to use the cmake, but may require some patching + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(LINKAGE_DYNAMIC yes) + set(LINKAGE_STATIC no) + else() + set(LINKAGE_DYNAMIC no) + set(LINKAGE_STATIC yes) + endif() + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + "--enable-shared=${LINKAGE_DYNAMIC}" + "--enable-static=${LINKAGE_STATIC}" + "--prefix=${CURRENT_INSTALLED_DIR}" + "--disable-doxygen" + OPTIONS_DEBUG + "--enable-debug" + ) + + vcpkg_install_make() +endif() + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Install CppUnitConfig.cmake +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/CppUnitConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Cleanup +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) \ No newline at end of file diff --git a/ports/cppunit/vcpkg.json b/ports/cppunit/vcpkg.json new file mode 100644 index 00000000000000..3dbcc9ccfa1147 --- /dev/null +++ b/ports/cppunit/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cppunit", + "version-string": "1.15.1", + "description": "Unit testing framework module for the C++ programming language", + "homepage": "https://www.freedesktop.org/wiki/Software/cppunit", + "supports": "!uwp" +} diff --git a/ports/cpputest/fix-arm-build-error.patch b/ports/cpputest/fix-arm-build-error.patch new file mode 100644 index 00000000000000..5b017cb63246ae --- /dev/null +++ b/ports/cpputest/fix-arm-build-error.patch @@ -0,0 +1,20 @@ +diff --git a/tests/CppUTest/CMakeLists.txt b/tests/CppUTest/CMakeLists.txt +index 7df07c1..d7317aa 100644 +--- a/tests/CppUTest/CMakeLists.txt ++++ b/tests/CppUTest/CMakeLists.txt +@@ -56,4 +56,4 @@ add_executable(CppUTestTests ${CppUTestTests_src}) + cpputest_normalize_test_output_location(CppUTestTests) + target_link_libraries(CppUTestTests CppUTest ${THREAD_LIB}) + +-cpputest_buildtime_discover_tests(CppUTestTests) ++#cpputest_buildtime_discover_tests(CppUTestTests) +diff --git a/tests/CppUTestExt/CMakeLists.txt b/tests/CppUTestExt/CMakeLists.txt +index b83ceb2..2abf274 100644 +--- a/tests/CppUTestExt/CMakeLists.txt ++++ b/tests/CppUTestExt/CMakeLists.txt +@@ -37,4 +37,4 @@ endif (MINGW) + add_executable(CppUTestExtTests ${CppUTestExtTests_src}) + cpputest_normalize_test_output_location(CppUTestExtTests) + target_link_libraries(CppUTestExtTests CppUTest CppUTestExt ${THREAD_LIB} ${CPPUNIT_EXTERNAL_LIBRARIES}) +-cpputest_buildtime_discover_tests(CppUTestExtTests) ++#cpputest_buildtime_discover_tests(CppUTestExtTests) diff --git a/ports/cpputest/portfile.cmake b/ports/cpputest/portfile.cmake new file mode 100644 index 00000000000000..4745ea469588aa --- /dev/null +++ b/ports/cpputest/portfile.cmake @@ -0,0 +1,60 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpputest/cpputest + REF 4699da9942a1bdcc33e2a8c8a48e863b0f18188e + SHA512 6f588691f1b4092b3be8167ab09f3a4a64c34715ac9397210724121d161024a43b12a88198b02b0cc8da7d72406670daaf375bb64cc4cf92c8bd2479e7a881bc + HEAD_REF master + PATCHES + fix-arm-build-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/CppUTest/cmake TARGET_PATH share/CppUTest) +if (EXISTS ${CURRENT_PACKAGES_DIR}/lib/CppUTest) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/CppUTest) +endif() + +if (EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/CppUTest) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/CppUTest) +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(GLOB CPPUTEST_LIBS ${CURRENT_PACKAGES_DIR}/lib/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(COPY ${CPPUTEST_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${CPPUTEST_LIBS}) + + file(READ ${CURRENT_PACKAGES_DIR}/share/CppUTest/CppUTestTargets-release.cmake RELEASE_CONFIG) + # Replace CppUTestExt first + string(REPLACE "\${_IMPORT_PREFIX}/lib/" + "\${_IMPORT_PREFIX}/lib/manual-link/" RELEASE_CONFIG "${RELEASE_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/CppUTest/CppUTestTargets-release.cmake "${RELEASE_CONFIG}") +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(GLOB CPPUTEST_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(COPY ${CPPUTEST_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${CPPUTEST_LIBS}) + + file(READ ${CURRENT_PACKAGES_DIR}/share/CppUTest/CppUTestTargets-debug.cmake DEBUG_CONFIG) + # Replace CppUTestExt first + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/" + "\${_IMPORT_PREFIX}/debug/lib/manual-link/" DEBUG_CONFIG "${DEBUG_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/CppUTest/CppUTestTargets-debug.cmake "${DEBUG_CONFIG}") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cpputest/vcpkg.json b/ports/cpputest/vcpkg.json new file mode 100644 index 00000000000000..3e5867d70766b3 --- /dev/null +++ b/ports/cpputest/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cpputest", + "version-string": "2019-9-16", + "port-version": 2, + "description": "CppUTest unit testing and mocking framework for C/C++.", + "homepage": "https://github.com/cpputest/cpputest" +} diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL deleted file mode 100644 index df7cff03ea37f1..00000000000000 --- a/ports/cppwinrt/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cppwinrt -Version: fall_2017_creators_update_for_vs_15.3-2 -Homepage: https://github.com/Microsoft/cppwinrt -Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake index ec1cb060395ca0..a875a5a5e84b84 100644 --- a/ports/cppwinrt/portfile.cmake +++ b/ports/cppwinrt/portfile.cmake @@ -1,21 +1,10 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/cppwinrt - REF fall_2017_creators_update_for_vs_15.3 - SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 - HEAD_REF master +find_path(CPPWINRT_BASE_H + NAMES winrt/base.h + PATHS $ENV{INCLUDE} ) -# Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) +if(NOT CPPWINRT_BASE_H) + message(FATAL_ERROR "Unable to locate cppwinrt. Please install Windows SDK version 10.0.17134.0 or newer.") +endif() -# Copy the cppwinrt header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.16299.0/winrt/*) -file( - COPY ${HEADER_FILES} - DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt - REGEX "\.(gitattributes|gitignore)$" EXCLUDE -) +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/cppwinrt/vcpkg.json b/ports/cppwinrt/vcpkg.json new file mode 100644 index 00000000000000..7ff77b5d7502a7 --- /dev/null +++ b/ports/cppwinrt/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cppwinrt", + "version-string": "windows-sdk", + "description": "C++/WinRT is a standard C++ language projection for the Windows Runtime.", + "homepage": "https://github.com/Microsoft/cppwinrt", + "supports": "windows" +} diff --git a/ports/cppzmq/CONTROL b/ports/cppzmq/CONTROL deleted file mode 100644 index c98e464ca10603..00000000000000 --- a/ports/cppzmq/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: cppzmq -Version: 4.4.1 -Build-Depends: zeromq -Homepage: https://github.com/zeromq/cppzmq -Description: lightweight messaging kernel, C++ bindings diff --git a/ports/cppzmq/portfile.cmake b/ports/cppzmq/portfile.cmake index 52c4126c487b2e..aa968e8a3fc9e2 100644 --- a/ports/cppzmq/portfile.cmake +++ b/ports/cppzmq/portfile.cmake @@ -1,25 +1,28 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/cppzmq - REF v4.4.1 - SHA512 5178a24413e44a6d99e57db7c9859c72279304272baa0e1fb810174cdf592cb567cab98428ef3ab611042bdf4bc506867421662409d1f0d82c233cb83ebdb801 + REF 76bf169fd67b8e99c1b0e6490029d9cd5ef97666 # v4.7.1 + SHA512 03d7444b36937521e2826c7dd2f6cf55d820d0e4d66c30e3947527e13ba2d7cd68f426b5bfedb5a0d0deb4245893a872d5132b68ef966063d72fcd95e42e3eed HEAD_REF master ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + draft ENABLE_DRAFTS +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DCPPZMQ_BUILD_TESTS=OFF + OPTIONS ${FEATURE_OPTIONS} + -DCPPZMQ_BUILD_TESTS=OFF ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/cppzmq) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/cppzmq/libzmq-pkg-config) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/${PORT}/libzmq-pkg-config) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppzmq) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppzmq/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppzmq/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cppzmq/vcpkg.json b/ports/cppzmq/vcpkg.json new file mode 100644 index 00000000000000..db7ce81fbe8e1f --- /dev/null +++ b/ports/cppzmq/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "cppzmq", + "version": "4.7.1", + "port-version": 2, + "description": "lightweight messaging kernel, C++ bindings", + "homepage": "https://github.com/zeromq/cppzmq", + "dependencies": [ + "zeromq" + ], + "features": { + "draft": { + "description": "Build and install draft" + } + } +} diff --git a/ports/cpr/001-cpr-config.patch b/ports/cpr/001-cpr-config.patch index 9b9b11352d5372..0b972c9b046b2f 100644 --- a/ports/cpr/001-cpr-config.patch +++ b/ports/cpr/001-cpr-config.patch @@ -1,94 +1,32 @@ -diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt -index a6db5bd..90bec48 100644 ---- a/cpr/CMakeLists.txt -+++ b/cpr/CMakeLists.txt -@@ -1,47 +1,46 @@ --message(STATUS "Using CURL_INCLUDE_DIRS: ${CURL_INCLUDE_DIRS}.") --include_directories( -- ${CPR_INCLUDE_DIRS} -- ${CURL_INCLUDE_DIRS}) -- - add_library(${CPR_LIBRARIES} -+ auth.cpp -+ cookies.cpp -+ cprtypes.cpp -+ digest.cpp -+ error.cpp -+ multipart.cpp -+ parameters.cpp -+ payload.cpp -+ proxies.cpp -+ session.cpp -+ timeout.cpp -+ util.cpp -+ ssl_options.cpp -+) -+ -+target_link_libraries( ${CPR_LIBRARIES} -+ PUBLIC ${CURL_LIBRARIES} -+) -+ -+target_include_directories(${CPR_LIBRARIES} -+ PUBLIC -+ $ -+ $ -+ PRIVATE -+ $ -+) -+ - -- # Source files -- auth.cpp -- cookies.cpp -- cprtypes.cpp -- digest.cpp -- error.cpp -- multipart.cpp -- parameters.cpp -- payload.cpp -- proxies.cpp -- session.cpp -- timeout.cpp -- util.cpp -- ssl_options.cpp -+set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") -+install( -+ TARGETS ${CPR_LIBRARIES} -+ EXPORT ${TARGETS_EXPORT_NAME} -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+) - -- # Header files (useful in IDEs) -- "${CPR_INCLUDE_DIRS}/cpr/api.h" -- "${CPR_INCLUDE_DIRS}/cpr/auth.h" -- "${CPR_INCLUDE_DIRS}/cpr/body.h" -- "${CPR_INCLUDE_DIRS}/cpr/cookies.h" -- "${CPR_INCLUDE_DIRS}/cpr/cpr.h" -- "${CPR_INCLUDE_DIRS}/cpr/cprtypes.h" -- "${CPR_INCLUDE_DIRS}/cpr/curlholder.h" -- "${CPR_INCLUDE_DIRS}/cpr/defines.h" -- "${CPR_INCLUDE_DIRS}/cpr/digest.h" -- "${CPR_INCLUDE_DIRS}/cpr/error.h" -- "${CPR_INCLUDE_DIRS}/cpr/max_redirects.h" -- "${CPR_INCLUDE_DIRS}/cpr/multipart.h" -- "${CPR_INCLUDE_DIRS}/cpr/parameters.h" -- "${CPR_INCLUDE_DIRS}/cpr/payload.h" -- "${CPR_INCLUDE_DIRS}/cpr/proxies.h" -- "${CPR_INCLUDE_DIRS}/cpr/response.h" -- "${CPR_INCLUDE_DIRS}/cpr/session.h" -- "${CPR_INCLUDE_DIRS}/cpr/timeout.h" -- "${CPR_INCLUDE_DIRS}/cpr/util.h" -- "${CPR_INCLUDE_DIRS}/cpr/ssl_options.h") -+install( -+ EXPORT ${TARGETS_EXPORT_NAME} -+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -+) - --message(STATUS "Using CURL_LIBRARIES: ${CURL_LIBRARIES}.") --target_link_libraries(${CPR_LIBRARIES} -- ${CURL_LIBRARIES}) -+if (NOT DISABLE_INSTALL_HEADERS) -+ install(DIRECTORY ${CPR_INCLUDE_DIRS}/cpr DESTINATION include) -+endif() +diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt +index 8061a14..e8daf19 100644 +--- a/cpr/CMakeLists.txt ++++ b/cpr/CMakeLists.txt +@@ -21,6 +21,7 @@ add_library(cpr + + add_library(cpr::cpr ALIAS cpr) + ++target_include_directories(cpr PUBLIC $) + target_link_libraries(cpr PUBLIC CURL::libcurl) # todo should be private, but first dependencys in ssl_options need to be removed + + # Set version for shared libraries. +@@ -29,4 +30,18 @@ set_target_properties(cpr + VERSION ${${PROJECT_NAME}_VERSION} + SOVERSION ${${PROJECT_NAME}_VERSION_MAJOR}) + +-install(TARGETS cpr) ++set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") ++install(TARGETS cpr ++ EXPORT ${TARGETS_EXPORT_NAME} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ ++install( ++ EXPORT ${TARGETS_EXPORT_NAME} ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" ++) ++ ++if (NOT DISABLE_INSTALL_HEADERS) ++ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../include/cpr DESTINATION include) ++endif() diff --git a/ports/cpr/002_cpr_fixcase.patch b/ports/cpr/002_cpr_fixcase.patch deleted file mode 100644 index 4dbc9711951349..00000000000000 --- a/ports/cpr/002_cpr_fixcase.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cpr/error.cpp b/cpr/error.cpp -index 713cb10..4143f93 100644 ---- a/cpr/error.cpp -+++ b/cpr/error.cpp -@@ -38,8 +38,6 @@ ErrorCode Error::getErrorCodeForCurlError(std::int32_t curl_code) { - return ErrorCode::SSL_LOCAL_CERTIFICATE_ERROR; - case CURLE_SSL_CIPHER: - return ErrorCode::GENERIC_SSL_ERROR; -- case CURLE_SSL_CACERT: -- return ErrorCode::SSL_CACERT_ERROR; - case CURLE_USE_SSL_FAILED: - return ErrorCode::GENERIC_SSL_ERROR; - case CURLE_SSL_ENGINE_INITFAILED: diff --git a/ports/cpr/CONTROL b/ports/cpr/CONTROL deleted file mode 100644 index de5c3478f552f1..00000000000000 --- a/ports/cpr/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: cpr -Version: 1.3.0-7 -Homepage: https://github.com/whoshuu/cpr -Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project. -Build-Depends: curl[core] diff --git a/ports/cpr/cprConfig.cmake b/ports/cpr/cprConfig.cmake index 501fcd96a82b1d..85e433c4b94700 100644 --- a/ports/cpr/cprConfig.cmake +++ b/ports/cpr/cprConfig.cmake @@ -25,3 +25,7 @@ endmacro() include("${CMAKE_CURRENT_LIST_DIR}/cprTargets.cmake") check_required_components("cpr") + +include(CMakeFindDependencyMacro) +find_dependency(ZLIB REQUIRED) +find_dependency(CURL REQUIRED) diff --git a/ports/cpr/enable-install.patch b/ports/cpr/enable-install.patch deleted file mode 100644 index 250199e5a24fe4..00000000000000 --- a/ports/cpr/enable-install.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt -index a6db5bd..b4982d1 100644 ---- a/cpr/CMakeLists.txt -+++ b/cpr/CMakeLists.txt -@@ -45,3 +45,12 @@ add_library(${CPR_LIBRARIES} - message(STATUS "Using CURL_LIBRARIES: ${CURL_LIBRARIES}.") - target_link_libraries(${CPR_LIBRARIES} - ${CURL_LIBRARIES}) -+ -+install(TARGETS ${CPR_LIBRARIES} -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+) -+if(NOT DISABLE_INSTALL_HEADERS) -+ install(DIRECTORY ${CPR_INCLUDE_DIRS}/cpr DESTINATION include) -+endif() diff --git a/ports/cpr/fix-uwp.patch b/ports/cpr/fix-uwp.patch new file mode 100644 index 00000000000000..e91eb62b5f8f45 --- /dev/null +++ b/ports/cpr/fix-uwp.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8575b2f..87de55c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,7 +46,7 @@ message(STATUS "=======================================================") + include(GNUInstallDirs) + include(FetchContent) + include(cmake/code_coverage.cmake) +-include(cmake/sanitizer.cmake) ++#include(cmake/sanitizer.cmake) + include(cmake/gcc_analyze.cmake) + + # SSL diff --git a/ports/cpr/portfile.cmake b/ports/cpr/portfile.cmake index 9e2c40a0dc9201..9d99ebe045ee04 100644 --- a/ports/cpr/portfile.cmake +++ b/ports/cpr/portfile.cmake @@ -1,24 +1,26 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +if(VCPKG_TARGET_IS_UWP) + set(UWP_PATCH fix-uwp.patch) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO whoshuu/cpr - REF 1.3.0 - SHA512 fd08f8a592a5e1fb8dc93158a4850b81575983c08527fb415f65bd9284f93c804c8680d16c548744583cd26b9353a7d4838269cfc59ccb6003da8941f620c273 + REF f4622efcb59d84071ae11404ae61bd821c1c344b # v1.6.2 + SHA512 7835b7613529798b5edaefc99c907bbc7144133a1fac62a2c9af09c8c7a09b2ea1864544c4c0385969ad3dc64806b8d258abbcd39add2004ed8428741286ff20 HEAD_REF master PATCHES 001-cpr-config.patch - 002_cpr_fixcase.patch + ${UWP_PATCH} ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_CPR_TESTS=OFF - -DUSE_SYSTEM_CURL=ON + -DCPR_BUILD_TESTS=OFF + -DCPR_FORCE_USE_SYSTEM_CURL=ON OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) @@ -33,5 +35,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpr) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cpr/LICENSE ${CURRENT_PACKAGES_DIR}/share/cpr/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cpr/vcpkg.json b/ports/cpr/vcpkg.json new file mode 100644 index 00000000000000..5a648e2908cf04 --- /dev/null +++ b/ports/cpr/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "cpr", + "version-semver": "1.6.2", + "description": "C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project.", + "homepage": "https://github.com/whoshuu/cpr", + "dependencies": [ + { + "name": "curl", + "default-features": false + } + ] +} diff --git a/ports/cpu-features/make_list_cpu_features_optional.patch b/ports/cpu-features/make_list_cpu_features_optional.patch new file mode 100644 index 00000000000000..bceeb6f64af206 --- /dev/null +++ b/ports/cpu-features/make_list_cpu_features_optional.patch @@ -0,0 +1,70 @@ +From 68ece3bba0d79ab721a0c50ee1e6014a37f759dc Mon Sep 17 00:00:00 2001 +From: Wei Dai +Date: Mon, 24 May 2021 10:02:07 -0700 +Subject: [PATCH] Added an option to disable the executable target + list_cpu_feature. + +--- + CMakeLists.txt | 23 ++++++++++++++++++----- + 1 file changed, 18 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f9daeac..48eea0e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,8 @@ if(NOT CMAKE_BUILD_TYPE) + FORCE) + endif(NOT CMAKE_BUILD_TYPE) + ++# An option to disable the executable target list_cpu_features. ++option(BUILD_EXECUTABLE "Build list_cpu_features executable." ON) + # BUILD_TESTING is a standard CMake variable, but we declare it here to make it + # prominent in the GUI. + option(BUILD_TESTING "Enable test (depends on googletest)." OFF) +@@ -157,9 +159,11 @@ add_library(CpuFeature::cpu_features ALIAS cpu_features) + # program : list_cpu_features + # + +-add_executable(list_cpu_features ${PROJECT_SOURCE_DIR}/src/utils/list_cpu_features.c) +-target_link_libraries(list_cpu_features PRIVATE cpu_features) +-add_executable(CpuFeature::list_cpu_features ALIAS list_cpu_features) ++if(BUILD_EXECUTABLE) ++ add_executable(list_cpu_features ${PROJECT_SOURCE_DIR}/src/utils/list_cpu_features.c) ++ target_link_libraries(list_cpu_features PRIVATE cpu_features) ++ add_executable(CpuFeature::list_cpu_features ALIAS list_cpu_features) ++endif() + + # + # ndk_compat +@@ -223,17 +227,26 @@ if(BUILD_TESTING) + endif() + + # +-# Install cpu_features and list_cpu_features ++# Install cpu_features and optionally list_cpu_features + # + + include(GNUInstallDirs) +-install(TARGETS cpu_features list_cpu_features ++install(TARGETS cpu_features + EXPORT CpuFeaturesTargets + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cpu_features + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) ++if(BUILD_EXECUTABLE) ++ install(TARGETS list_cpu_features ++ EXPORT CpuFeaturesTargets ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cpu_features ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ) ++endif() + install(EXPORT CpuFeaturesTargets + NAMESPACE CpuFeatures:: + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CpuFeatures +-- +2.25.1 + diff --git a/ports/cpu-features/portfile.cmake b/ports/cpu-features/portfile.cmake new file mode 100644 index 00000000000000..0e7602fdc4e397 --- /dev/null +++ b/ports/cpu-features/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/cpu_features + REF a8397ba4591237c17d18e4acc091f5f3ebe7391e # 0.6.0 + SHA512 71a583e8190699d6df3dfa2857886089265cdfbcb916d9828a3611a1d6d23487464d6448b900b49637f015dd7d4e18bb206e0249af0932928f8ced13a081d42b + HEAD_REF master + PATCHES make_list_cpu_features_optional.patch +) + +# If feature "tools" is not specified, disable building/exporting executable targets. +# This is necessary so that downstream find_package(CpuFeatures) does not fail. +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools BUILD_EXECUTABLE +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME "CpuFeatures" CONFIG_PATH "lib/cmake/CpuFeatures") + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES "list_cpu_features" AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/cpu-features/vcpkg.json b/ports/cpu-features/vcpkg.json new file mode 100644 index 00000000000000..8980a30b5db2e5 --- /dev/null +++ b/ports/cpu-features/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "cpu-features", + "version": "0.6.0", + "description": "A cross-platform C library to retrieve CPU features (such as available instructions) at runtime", + "homepage": "https://github.com/google/cpu_features", + "license": "Apache-2.0", + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tools": { + "description": "list_cpu_features command line tool" + } + } +} diff --git a/ports/cpuid/fix-install-headers.patch b/ports/cpuid/fix-install-headers.patch new file mode 100644 index 00000000000000..d5c9c8641d30e2 --- /dev/null +++ b/ports/cpuid/fix-install-headers.patch @@ -0,0 +1,13 @@ +diff --git a/libcpuid/CMakeLists.txt b/libcpuid/CMakeLists.txt +index 96533ac..d71953f 100644 +--- a/libcpuid/CMakeLists.txt ++++ b/libcpuid/CMakeLists.txt +@@ -75,7 +75,7 @@ install(TARGETS cpuid + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + RUNTIME DESTINATION "bin" +- INCLUDES DESTINATION "include") ++ PUBLIC_HEADER DESTINATION "include") + + install(FILES "${project_config}" "${version_config}" + DESTINATION "${config_install_dir}" diff --git a/ports/cpuid/portfile.cmake b/ports/cpuid/portfile.cmake new file mode 100644 index 00000000000000..00f374a928fedd --- /dev/null +++ b/ports/cpuid/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO anrieff/libcpuid + REF 179fbcb713566c2084a1903729b6eebba68a4424 #0.5.1 + SHA512 76eef8147a9ed2f116ddfd07ab95f76126bee0e23d0e6b5be54d157a1456b769fb698a4799a43c5f81ac12368d76fe8904bff735a698342ad8ee41d43e72645b + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DENABLE_DOCS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpuid) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/cpuid/vcpkg.json b/ports/cpuid/vcpkg.json new file mode 100644 index 00000000000000..7e8a6aa4eef397 --- /dev/null +++ b/ports/cpuid/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "cpuid", + "version": "0.5.1", + "description": "Provides CPU identification for the x86 (and x86_64)", + "homepage": "https://github.com/anrieff/libcpuid", + "supports": "x86 | x64", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/cpuinfo/fix-install.patch b/ports/cpuinfo/fix-install.patch new file mode 100644 index 00000000000000..86080f52290151 --- /dev/null +++ b/ports/cpuinfo/fix-install.patch @@ -0,0 +1,81 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e2d7d53..6d380e9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,6 +15,28 @@ OPTION(CPUINFO_BUILD_UNIT_TESTS "Build cpuinfo unit tests" ON) + OPTION(CPUINFO_BUILD_MOCK_TESTS "Build cpuinfo mock tests" ON) + OPTION(CPUINFO_BUILD_BENCHMARKS "Build cpuinfo micro-benchmarks" ON) + ++# Configuration ++set(config_install_dir "lib/cmake/unofficial-${PROJECT_NAME}") ++set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") ++set(project_config "${generated_dir}/unofficial-${PROJECT_NAME}Config.cmake") ++set(targets_export_name "unofficial-${PROJECT_NAME}Targets") ++set(namespace "unofficial::${PROJECT_NAME}::") ++ ++# Include module with fuction 'write_basic_package_version_file' ++include(CMakePackageConfigHelpers) ++configure_package_config_file( ++ "cmake/Config.cmake.in" ++ "${project_config}" ++ INSTALL_DESTINATION "${config_install_dir}" ++) ++install(FILES "${project_config}" ++ DESTINATION "${config_install_dir}" ++) ++install(EXPORT "${targets_export_name}" ++ NAMESPACE "${namespace}" ++ DESTINATION "${config_install_dir}" ++) ++ + # ---[ CMake options + INCLUDE(GNUInstallDirs) + +@@ -210,7 +232,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$") + TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE _WIN32_WINNT=0x0601) + ENDIF() + SET_TARGET_PROPERTIES(cpuinfo PROPERTIES PUBLIC_HEADER include/cpuinfo.h) +-TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC include) ++TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC $ $) + TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PRIVATE src) + TARGET_INCLUDE_DIRECTORIES(cpuinfo_internals BEFORE PUBLIC include src) + IF(CPUINFO_LOG_LEVEL STREQUAL "default") +@@ -261,6 +283,7 @@ TARGET_LINK_LIBRARIES(cpuinfo PRIVATE clog) + TARGET_LINK_LIBRARIES(cpuinfo_internals PRIVATE clog) + + INSTALL(TARGETS cpuinfo ++ EXPORT "${targets_export_name}" + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in +new file mode 100644 +index 0000000..9b4c9ee +--- /dev/null ++++ b/cmake/Config.cmake.in +@@ -0,0 +1,4 @@ ++@PACKAGE_INIT@ ++ ++include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") ++check_required_components("@PROJECT_NAME@") +diff --git a/deps/clog/CMakeLists.txt b/deps/clog/CMakeLists.txt +index 083f519..43b5c78 100644 +--- a/deps/clog/CMakeLists.txt ++++ b/deps/clog/CMakeLists.txt +@@ -57,7 +57,7 @@ SET_TARGET_PROPERTIES(clog PROPERTIES + C_EXTENSIONS NO) + CLOG_TARGET_RUNTIME_LIBRARY(clog) + SET_TARGET_PROPERTIES(clog PROPERTIES PUBLIC_HEADER include/clog.h) +-TARGET_INCLUDE_DIRECTORIES(clog BEFORE PUBLIC include) ++TARGET_INCLUDE_DIRECTORIES(clog PUBLIC $ $) + IF(CLOG_LOG_TO_STDIO) + TARGET_COMPILE_DEFINITIONS(clog PRIVATE CLOG_LOG_TO_STDIO=1) + ELSE() +@@ -68,6 +68,7 @@ IF(ANDROID AND NOT CLOG_LOG_TO_STDIO) + ENDIF() + + INSTALL(TARGETS clog ++ EXPORT ${targets_export_name} + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") diff --git a/ports/cpuinfo/portfile.cmake b/ports/cpuinfo/portfile.cmake new file mode 100644 index 00000000000000..c670c0459b0d54 --- /dev/null +++ b/ports/cpuinfo/portfile.cmake @@ -0,0 +1,47 @@ +# On Windows, we can get a cpuinfo.dll, but it exports no symbols. +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pytorch/cpuinfo + REF 5916273f79a21551890fd3d56fc5375a78d1598d + SHA512 50e537b61d991e8579577fb1ecf8d9ceb2171dbad96dfe159a062eadfdc0b2372b94988fc6f223c20e327453c7f55042ee06779f5b5fe0922f4470f746c9686b + HEAD_REF master + PATCHES + fix-install.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools CPUINFO_BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DCPUINFO_BUILD_TOOLS=OFF + -DCPUINFO_LOG_LEVEL=debug + OPTIONS_RELEASE + ${FEATURE_OPTIONS} + -DCPUINFO_LOG_LEVEL=default + OPTIONS + -DCPUINFO_BUILD_UNIT_TESTS=OFF + -DCPUINFO_BUILD_MOCK_TESTS=OFF + -DCPUINFO_BUILD_BENCHMARKS=OFF +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES cache-info cpuid-dump cpu-info isa-info + AUTO_CLEAN + ) +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/cpuinfo/vcpkg.json b/ports/cpuinfo/vcpkg.json new file mode 100644 index 00000000000000..a67a77bae077b1 --- /dev/null +++ b/ports/cpuinfo/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "cpuinfo", + "version-date": "2021-04-04", + "description": "CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)", + "homepage": "https://github.com/pytorch/cpuinfo", + "features": { + "tools": { + "description": "Build cpuinfo command-line tools" + } + } +} diff --git a/ports/cr/portfile.cmake b/ports/cr/portfile.cmake new file mode 100644 index 00000000000000..d6d536759df7a2 --- /dev/null +++ b/ports/cr/portfile.cmake @@ -0,0 +1,15 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fungos/cr + REF 66b76e24611c3b87566e5365e8c422387bc85916 + SHA512 002162461ecf131d717f7567cf13ee1345b7b359bb17c0801f4246c472c1b180f4f8937e9a3f4c186d95c41c20ffcc5ba5e953f197f344fb1000f51d8c4ee473 + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/cr.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cr/vcpkg.json b/ports/cr/vcpkg.json new file mode 100644 index 00000000000000..a80ef70595a9d8 --- /dev/null +++ b/ports/cr/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cr", + "version-string": "2020-04-26", + "port-version": 1, + "description": "cr.h: A Simple C Hot Reload Header-only Library", + "homepage": "https://fungos.github.io/cr-simple-c-hot-reload/" +} diff --git a/ports/crashpad/crashpadConfig.cmake.in b/ports/crashpad/crashpadConfig.cmake.in new file mode 100644 index 00000000000000..1c95bf1b77eef7 --- /dev/null +++ b/ports/crashpad/crashpadConfig.cmake.in @@ -0,0 +1,31 @@ +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +add_library(crashpad INTERFACE) +add_library(crashpad::crashpad ALIAS crashpad) + +set(CRASHPAD_LIBRARIES client util base) + +if(WIN32) + target_compile_definitions(crashpad INTERFACE NOMINMAX) +elseif(APPLE) + list(APPEND CRASHPAD_LIBRARIES ApplicationServices + CoreFoundation Foundation IOKit Security bsm) +endif() + +foreach(LIB_NAME ${CRASHPAD_LIBRARIES}) + find_library(_LIB ${LIB_NAME}) + target_link_libraries(crashpad INTERFACE ${_LIB}) + unset(_LIB CACHE) +endforeach() + +find_package(ZLIB REQUIRED) +target_link_libraries(crashpad INTERFACE ZLIB::ZLIB) + +target_include_directories(crashpad + INTERFACE ${_IMPORT_PREFIX}/include/crashpad) diff --git a/ports/crashpad/portfile.cmake b/ports/crashpad/portfile.cmake new file mode 100644 index 00000000000000..30026d5c151a0a --- /dev/null +++ b/ports/crashpad/portfile.cmake @@ -0,0 +1,129 @@ +vcpkg_fail_port_install( + ON_ARCH "x86" "arm" "arm64" + ON_TARGET "UWP" "LINUX") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://chromium.googlesource.com/crashpad/crashpad + REF 9a31d3f8e9815774026a753a1ff6155347cd549f +) + +function(checkout_in_path PATH URL REF) + if(EXISTS "${PATH}") + return() + endif() + + vcpkg_from_git( + OUT_SOURCE_PATH DEP_SOURCE_PATH + URL "${URL}" + REF "${REF}" + ) + file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") + file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") +endfunction() + +# mini_chromium contains the toolchains and build configuration +checkout_in_path( + "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium" + "https://chromium.googlesource.com/chromium/mini_chromium" + "c426ff98e1d9e9d59777fe8b883a5c0ceeca9ca3" +) + +function(replace_gn_dependency INPUT_FILE OUTPUT_FILE LIBRARY_NAMES) + unset(_LIBRARY_DEB CACHE) + find_library(_LIBRARY_DEB NAMES ${LIBRARY_NAMES} + PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" + NO_DEFAULT_PATH) + + if(_LIBRARY_DEB MATCHES "-NOTFOUND") + message(FATAL_ERROR "Could not find debug library with names: ${LIBRARY_NAMES}") + endif() + + unset(_LIBRARY_REL CACHE) + find_library(_LIBRARY_REL NAMES ${LIBRARY_NAMES} + PATHS "${CURRENT_INSTALLED_DIR}/lib" + NO_DEFAULT_PATH) + + if(_LIBRARY_REL MATCHES "-NOTFOUND") + message(FATAL_ERROR "Could not find library with names: ${LIBRARY_NAMES}") + endif() + + set(_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include") + + file(REMOVE "${OUTPUT_FILE}") + configure_file("${INPUT_FILE}" "${OUTPUT_FILE}" @ONLY) +endfunction() + +replace_gn_dependency( + "${CMAKE_CURRENT_LIST_DIR}/zlib.gn" + "${SOURCE_PATH}/third_party/zlib/BUILD.gn" + "z;zlib;zlibd" +) + +set(OPTIONS_DBG "is_debug=true") +set(OPTIONS_REL "") + +if(CMAKE_HOST_WIN32) + # Load toolchains + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + endif() + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + + foreach(_VAR CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS + CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE) + string(STRIP "${${_VAR}}" ${_VAR}) + endforeach() + + set(OPTIONS_DBG "${OPTIONS_DBG} \ + extra_cflags_c=\"${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}\" \ + extra_cflags_cc=\"${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}\"") + + set(OPTIONS_REL "${OPTIONS_REL} \ + extra_cflags_c=\"${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}\" \ + extra_cflags_cc=\"${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}\"") + + set(DISABLE_WHOLE_PROGRAM_OPTIMIZATION "\ + extra_cflags=\"/GL-\" \ + extra_ldflags=\"/LTCG:OFF\" \ + extra_arflags=\"/LTCG:OFF\"") + + set(OPTIONS_DBG "${OPTIONS_DBG} ${DISABLE_WHOLE_PROGRAM_OPTIMIZATION}") + set(OPTIONS_REL "${OPTIONS_REL} ${DISABLE_WHOLE_PROGRAM_OPTIMIZATION}") +endif() + +vcpkg_configure_gn( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG "${OPTIONS_DBG}" + OPTIONS_RELEASE "${OPTIONS_REL}" +) + +vcpkg_install_gn( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS client util third_party/mini_chromium/mini_chromium/base handler:crashpad_handler +) + +message(STATUS "Installing headers...") +set(PACKAGES_INCLUDE_DIR "${CURRENT_PACKAGES_DIR}/include/${PORT}") +function(install_headers DIR) + file(COPY "${DIR}" DESTINATION "${PACKAGES_INCLUDE_DIR}" FILES_MATCHING PATTERN "*.h") +endfunction() +install_headers("${SOURCE_PATH}/client") +install_headers("${SOURCE_PATH}/util") +install_headers("${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/base") +install_headers("${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/build") + +# remove empty directories +file(REMOVE_RECURSE + "${PACKAGES_INCLUDE_DIR}/util/net/testdata" + "${PACKAGES_INCLUDE_DIR}/build/ios") + +configure_file("${CMAKE_CURRENT_LIST_DIR}/crashpadConfig.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/crashpadConfig.cmake" @ONLY) + +vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json new file mode 100644 index 00000000000000..a470314994806f --- /dev/null +++ b/ports/crashpad/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "crashpad", + "version-string": "2020-03-18", + "port-version": 1, + "description": [ + "Crashpad is a crash-reporting system.", + "Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss." + ], + "homepage": "https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md", + "supports": "x64 & (osx | windows)", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/crashpad/zlib.gn b/ports/crashpad/zlib.gn new file mode 100644 index 00000000000000..5b551a30ac9d30 --- /dev/null +++ b/ports/crashpad/zlib.gn @@ -0,0 +1,15 @@ +import("../../build/crashpad_buildconfig.gni") + +config("zlib_config") { + defines = [ "CRASHPAD_ZLIB_SOURCE_EXTERNAL" ] + include_dirs = [ "@_INCLUDE_DIR@" ] +} + +source_set("zlib") { + public_configs = [ ":zlib_config" ] + if(is_debug) { + libs = [ "@_LIBRARY_DEB@" ] + } else { + libs = [ "@_LIBRARY_REL@" ] + } +} \ No newline at end of file diff --git a/ports/crashrpt/001-add-install-target-and-find-deps.patch b/ports/crashrpt/001-add-install-target-and-find-deps.patch new file mode 100644 index 00000000000000..2d983800d4a58a --- /dev/null +++ b/ports/crashrpt/001-add-install-target-and-find-deps.patch @@ -0,0 +1,809 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 44d7df0..ed9e3d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,9 @@ set (CRASHRPT_VER 1403) + # Build options + option(CRASHRPT_BUILD_SHARED_LIBS "If set (default), CrashRpt modules are built as dynamic-link libraries, otherwise as static libs." ON) + option(CRASHRPT_LINK_CRT_AS_DLL "If set (default), CrashRpt modules link C run-time (CRT) as multi-threaded dynamic libraries, otherwise as multi-threaded static libs." ON) ++option(CRASHRPT_BUILD_PROBE "If set (default), CrashRpt builds the CrashRptProbe project." ON) ++option(CRASHRPT_BUILD_DEMOS "If set (default), CrashRpt builds the demo projects." ON) ++option(CRASHRPT_BUILD_TESTS "If set (default), CrashRpt builds the test projects." ON) + + # Set output directory for executable files + if(CMAKE_CL_64) +@@ -94,19 +97,65 @@ macro(fix_default_compiler_settings_) + + endmacro() + ++find_package(ZLIB REQUIRED) ++find_package(PNG REQUIRED) ++find_package(Ogg REQUIRED) ++find_package(JPEG REQUIRED) ++ ++find_library(THEORA_LIBRARY theora) ++if(NOT THEORA_LIBRARY) ++ message(FATAL_ERROR "theora library not found") ++endif() ++ ++find_path(THEORA_INCLUDE_DIR theora/theora.h) ++if(NOT THEORA_INCLUDE_DIR) ++ message(FATAL_ERROR "theora include dir not found") ++endif() ++ ++find_library(TINYXML_LIBRARY NAMES tinyxml) ++if(NOT TINYXML_LIBRARY) ++ message(FATAL_ERROR "tinyxml library not found") ++endif() ++ ++find_path(TINYXML_INCLUDE_DIR tinyxml.h) ++if(NOT TINYXML_INCLUDE_DIR) ++ message(FATAL_ERROR "tinyxml include dir not found") ++endif() ++ ++find_path(WTL_INCLUDE_DIR wtl/atlapp.h) ++if(NOT WTL_INCLUDE_DIR) ++ message(FATAL_ERROR "WTL include dir not found") ++endif() ++ ++find_library(DBGHELP_LIBRARY dbghelp) ++if(NOT DBGHELP_LIBRARY) ++ message(FATAL_ERROR "dbghelp library not found") ++endif() ++ ++find_path(DBGHELP_INCLUDE_DIR dbghelp.h) ++if(NOT DBGHELP_INCLUDE_DIR) ++ message(FATAL_ERROR "dbghelp include dir not found") ++endif() ++ + # Other CMakeLists are located in project subdirectories + ++if(CRASHRPT_BUILD_DEMOS) + add_subdirectory("demos/ConsoleDemo") + add_subdirectory("demos/WTLDemo") + add_subdirectory("demos/MFCDemo") ++endif() + + add_subdirectory("reporting/crashrpt") + add_subdirectory("reporting/crashsender") + ++if(CRASHRPT_BUILD_PROBE) + add_subdirectory("processing/crashrptprobe") + add_subdirectory("processing/crprober") ++endif() + ++if(CRASHRPT_BUILD_TESTS) + add_subdirectory("tests") ++endif() + + # Set output directory for LIB files + if(CMAKE_CL_64) +@@ -117,13 +166,13 @@ else(CMAKE_CL_64) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/thirdparty/lib) + endif(CMAKE_CL_64) + +-add_subdirectory("thirdparty/tinyxml") +-add_subdirectory("thirdparty/jpeg") +-add_subdirectory("thirdparty/libpng") ++#add_subdirectory("thirdparty/tinyxml") ++#add_subdirectory("thirdparty/jpeg") ++#add_subdirectory("thirdparty/libpng") + add_subdirectory("thirdparty/minizip") +-add_subdirectory("thirdparty/zlib") +-add_subdirectory("thirdparty/libogg") +-add_subdirectory("thirdparty/libtheora") ++#add_subdirectory("thirdparty/zlib") ++#add_subdirectory("thirdparty/libogg") ++#add_subdirectory("thirdparty/libtheora") + + + +diff --git a/demos/ConsoleDemo/CMakeLists.txt b/demos/ConsoleDemo/CMakeLists.txt +index e47ef4c..4df7b12 100644 +--- a/demos/ConsoleDemo/CMakeLists.txt ++++ b/demos/ConsoleDemo/CMakeLists.txt +@@ -12,12 +12,12 @@ fix_default_compiler_settings_() + # Add include dir + include_directories(${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/reporting/CrashRpt +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl +- ${CMAKE_SOURCE_DIR}/thirdparty/zlib ++ ${WTL_INCLUDE_DIR} ++ ${ZLIB_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/thirdparty/minizip +- ${CMAKE_SOURCE_DIR}/thirdparty/jpeg +- ${CMAKE_SOURCE_DIR}/thirdparty/libpng +- ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml ) ++ ${JPEG_INCLUDE_DIR} ++ ${PNG_INCLUDE_DIRS} ++ ${TINYXML_INCLUDE_DIR} ) + + # Add executable build target + add_executable(ConsoleDemo ${source_files} ${header_files}) +@@ -26,3 +26,7 @@ add_executable(ConsoleDemo ${source_files} ${header_files}) + target_link_libraries(ConsoleDemo CrashRpt) + + set_target_properties(ConsoleDemo PROPERTIES DEBUG_POSTFIX d ) ++ ++install(TARGETS ConsoleDemo ++ RUNTIME DESTINATION tools/crashrpt ++) +diff --git a/demos/MFCDemo/CMakeLists.txt b/demos/MFCDemo/CMakeLists.txt +index a250ecc..ade93cb 100644 +--- a/demos/MFCDemo/CMakeLists.txt ++++ b/demos/MFCDemo/CMakeLists.txt +@@ -44,7 +44,7 @@ if(CMAKE_CL_64) + ADD_CUSTOM_COMMAND( + TARGET WTLDemo + POST_BUILD +- COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" ++ #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\\crashrpt_lang.ini\"" +@@ -53,9 +53,13 @@ else(CMAKE_CL_64) + ADD_CUSTOM_COMMAND( + TARGET WTLDemo + POST_BUILD +- COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\"" ++ #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\crashrpt_lang.ini\"" + ) +-endif(CMAKE_CL_64) +\ No newline at end of file ++endif(CMAKE_CL_64) ++ ++install(TARGETS MFCDemo ++ RUNTIME DESTINATION tools/crashrpt ++) +diff --git a/demos/WTLDemo/AboutDlg.h b/demos/WTLDemo/AboutDlg.h +index 83eaac0..e96d1c2 100644 +--- a/demos/WTLDemo/AboutDlg.h ++++ b/demos/WTLDemo/AboutDlg.h +@@ -33,7 +33,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once + #include "stdafx.h" + #include +-#include ++#include + #include "CrashRpt.h" + + class CAboutDlg : public CDialogImpl +diff --git a/demos/WTLDemo/CMakeLists.txt b/demos/WTLDemo/CMakeLists.txt +index 40aaefb..42c0f5a 100644 +--- a/demos/WTLDemo/CMakeLists.txt ++++ b/demos/WTLDemo/CMakeLists.txt +@@ -19,7 +19,7 @@ fix_default_compiler_settings_() + + # Add include dir + include_directories(${CMAKE_SOURCE_DIR}/include +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl) ++ ${WTL_INCLUDE_DIR}) + + # Add executable build target + add_executable(WTLDemo WIN32 ${source_files} ${header_files}) +@@ -36,7 +36,7 @@ if(CMAKE_CL_64) + ADD_CUSTOM_COMMAND( + TARGET WTLDemo + POST_BUILD +- COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" ++ #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\\crashrpt_lang.ini\"" +@@ -45,9 +45,13 @@ else(CMAKE_CL_64) + ADD_CUSTOM_COMMAND( + TARGET WTLDemo + POST_BUILD +- COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\"" ++ #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\crashrpt_lang.ini\"" + ) +-endif(CMAKE_CL_64) +\ No newline at end of file ++endif(CMAKE_CL_64) ++ ++install(TARGETS WTLDemo ++ RUNTIME DESTINATION tools/crashrpt ++) +diff --git a/demos/WTLDemo/DocumentDlg.h b/demos/WTLDemo/DocumentDlg.h +index afce8fe..9b47728 100644 +--- a/demos/WTLDemo/DocumentDlg.h ++++ b/demos/WTLDemo/DocumentDlg.h +@@ -33,7 +33,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once + #include "stdafx.h" + #include +-#include ++#include + #include "CrashRpt.h" + + class CDocumentDlg : public CDialogImpl +diff --git a/demos/WTLDemo/WTLDemo.rc b/demos/WTLDemo/WTLDemo.rc +index c651841..71f4b39 100644 +--- a/demos/WTLDemo/WTLDemo.rc ++++ b/demos/WTLDemo/WTLDemo.rc +@@ -7,7 +7,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "atlres.h" ++#include "wtl/atlres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -32,7 +32,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""atlres.h""\r\n" ++ "#include ""wtl/atlres.h""\r\n" + "\0" + END + +diff --git a/demos/WTLDemo/stdafx.h b/demos/WTLDemo/stdafx.h +index a601446..658d9e5 100644 +--- a/demos/WTLDemo/stdafx.h ++++ b/demos/WTLDemo/stdafx.h +@@ -16,10 +16,10 @@ be found in the Authors.txt file in the root of the source tree. + #pragma once + + // Change these values to use different versions +-#define WINVER 0x0500 ++#define WINVER 0x0501 + #define _WIN32_WINNT 0x0501 +-#define _WIN32_IE 0x0501 +-#define _RICHEDIT_VER 0x0200 ++#define _WIN32_IE 0x0600 ++#define _RICHEDIT_VER 0x0300 + + #include + #if ( _ATL_VER < 0x0800 ) +@@ -52,18 +52,18 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + + extern CAppModule _Module; + + #include + +-#include +-#include +-#include ++#include ++#include ++#include + + #define _WTL_USE_CSTRING +-#include ++#include + + #if _MSC_VER>=1400 + #if defined _M_IX86 +diff --git a/processing/crashrptprobe/CMakeLists.txt b/processing/crashrptprobe/CMakeLists.txt +index a6c692a..c513c6d 100644 +--- a/processing/crashrptprobe/CMakeLists.txt ++++ b/processing/crashrptprobe/CMakeLists.txt +@@ -21,11 +21,11 @@ fix_default_compiler_settings_() + include_directories( ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/reporting/crashrpt + ${CMAKE_SOURCE_DIR}/reporting/crashsender +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl +- ${CMAKE_SOURCE_DIR}/thirdparty/zlib ++ ${WTL_INCLUDE_DIR} ++ ${ZLIB_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/thirdparty/minizip +- ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml +- ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/include) ++ ${TINYXML_INCLUDE_DIR} ++ ${DBGHELP_INCLUDE_DIR}) + + # Add library build target + if(CRASHRPT_BUILD_SHARED_LIBS) +@@ -34,15 +34,15 @@ else(CRASHRPT_BUILD_SHARED_LIBS) + add_library(CrashRptProbe STATIC ${source_files} ${header_files}) + endif(CRASHRPT_BUILD_SHARED_LIBS) + +-if(CMAKE_CL_64) +- link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 ) +- target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64/dbghelp.lib) +-else(CMAKE_CL_64) +- link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib ) +- target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/dbghelp.lib) +-endif(CMAKE_CL_64) ++#if(CMAKE_CL_64) ++# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 ) ++# target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64/dbghelp.lib) ++#else(CMAKE_CL_64) ++# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib ) ++# target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/dbghelp.lib) ++#endif(CMAKE_CL_64) + +-target_link_libraries(CrashRptProbe zlib minizip tinyxml Rpcrt4.lib shell32.lib gdi32.lib version.lib psapi.lib) ++target_link_libraries(CrashRptProbe ZLIB::ZLIB minizip ${TINYXML_LIBRARY} ${DBGHELP_LIBRARY} Rpcrt4.lib shell32.lib gdi32.lib version.lib psapi.lib) + + if(CRASHRPT_BUILD_SHARED_LIBS) + +@@ -58,4 +58,11 @@ else(CRASHRPT_BUILD_SHARED_LIBS) + + endif(CRASHRPT_BUILD_SHARED_LIBS) + ++set_target_properties(CrashRptProbe PROPERTIES PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/include/CrashRptProbe.h) + ++INSTALL(TARGETS CrashRptProbe ++ PUBLIC_HEADER DESTINATION include/crashrpt ++ LIBRARY ++ ARCHIVE ++ RUNTIME ++) +diff --git a/processing/crashrptprobe/CrashRptProbe.rc b/processing/crashrptprobe/CrashRptProbe.rc +index a08f63e..e12b8e9 100644 +--- a/processing/crashrptprobe/CrashRptProbe.rc ++++ b/processing/crashrptprobe/CrashRptProbe.rc +@@ -7,7 +7,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "atlres.h" ++#include "wtl/atlres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -32,7 +32,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""atlres.h""\r\n" ++ "#include ""wtl/atlres.h""\r\n" + "\0" + END + +diff --git a/processing/crashrptprobe/stdafx.h b/processing/crashrptprobe/stdafx.h +index 2b027b2..0b60659 100644 +--- a/processing/crashrptprobe/stdafx.h ++++ b/processing/crashrptprobe/stdafx.h +@@ -70,13 +70,13 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + extern CAppModule _Module; + #include + + // CString-related includes + #define _WTL_USE_CSTRING +-#include ++#include + + #if _MSC_VER<1400 + #define WCSNCPY_S(strDest, sizeInBytes, strSource, count) wcsncpy(strDest, strSource, count) +diff --git a/processing/crprober/CMakeLists.txt b/processing/crprober/CMakeLists.txt +index 046ba57..255e200 100644 +--- a/processing/crprober/CMakeLists.txt ++++ b/processing/crprober/CMakeLists.txt +@@ -18,4 +18,8 @@ add_executable(crprober ${source_files} ${header_files}) + # Add input link libraries + target_link_libraries(crprober CrashRptProbe) + +-set_target_properties(crprober PROPERTIES DEBUG_POSTFIX d ) +\ No newline at end of file ++set_target_properties(crprober PROPERTIES DEBUG_POSTFIX d ) ++ ++install(TARGETS crprober ++ RUNTIME DESTINATION tools/crashrpt ++) +diff --git a/reporting/crashrpt/CMakeLists.txt b/reporting/crashrpt/CMakeLists.txt +index 42d40e2..c7e4fd6 100644 +--- a/reporting/crashrpt/CMakeLists.txt ++++ b/reporting/crashrpt/CMakeLists.txt +@@ -18,7 +18,7 @@ add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE) + fix_default_compiler_settings_() + + # Add include dir +-include_directories( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/thirdparty/wtl) ++include_directories( ${CMAKE_SOURCE_DIR}/include ${WTL_INCLUDE_DIR}) + + # Add library build target + if(CRASHRPT_BUILD_SHARED_LIBS) +@@ -55,3 +55,11 @@ else(CRASHRPT_BUILD_SHARED_LIBS) + RELEASE_POSTFIX LIB ) + endif(CRASHRPT_BUILD_SHARED_LIBS) + ++set_target_properties(CrashRpt PROPERTIES PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/include/CrashRpt.h) ++ ++INSTALL(TARGETS CrashRpt ++ PUBLIC_HEADER DESTINATION include/crashrpt ++ LIBRARY ++ ARCHIVE ++ RUNTIME ++) +diff --git a/reporting/crashrpt/CrashRpt.rc b/reporting/crashrpt/CrashRpt.rc +index 95e7502..a8c821b 100644 +--- a/reporting/crashrpt/CrashRpt.rc ++++ b/reporting/crashrpt/CrashRpt.rc +@@ -7,7 +7,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "atlres.h" ++#include "wtl/atlres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -32,7 +32,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""atlres.h""\r\n" ++ "#include ""wtl/atlres.h""\r\n" + "\0" + END + +diff --git a/reporting/crashrpt/StdAfx.h b/reporting/crashrpt/StdAfx.h +index 77d8c36..13bbe50 100644 +--- a/reporting/crashrpt/StdAfx.h ++++ b/reporting/crashrpt/StdAfx.h +@@ -19,7 +19,7 @@ be found in the Authors.txt file in the root of the source tree. + #define WINVER 0x0501 + #define _WIN32_WINNT 0x0501 + #define _WIN32_IE 0x0600 +-#define _RICHEDIT_VER 0x0200 ++#define _RICHEDIT_VER 0x0300 + + #include + #include +@@ -54,12 +54,12 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + extern CAppModule _Module; + #include + // CString-related includes + #define _WTL_USE_CSTRING +-#include ++#include + #include + #include + #include +diff --git a/reporting/crashsender/CMakeLists.txt b/reporting/crashsender/CMakeLists.txt +index 9b444c5..aa4ab8a 100644 +--- a/reporting/crashsender/CMakeLists.txt ++++ b/reporting/crashsender/CMakeLists.txt +@@ -22,27 +22,27 @@ fix_default_compiler_settings_() + # Add include dir + include_directories( ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/reporting/CrashRpt +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl +- ${CMAKE_SOURCE_DIR}/thirdparty/zlib ++ ${WTL_INCLUDE_DIR} + ${CMAKE_SOURCE_DIR}/thirdparty/minizip +- ${CMAKE_SOURCE_DIR}/thirdparty/jpeg +- ${CMAKE_SOURCE_DIR}/thirdparty/libpng +- ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml +- ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/include +- ${CMAKE_SOURCE_DIR}/thirdparty/libogg/include +- ${CMAKE_SOURCE_DIR}/thirdparty/libtheora/include) +- +-if(NOT CMAKE_CL_64) +- link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib ) +-else(NOT CMAKE_CL_64) +- link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 ) +-endif(NOT CMAKE_CL_64) ++ ${ZLIB_INCLUDE_DIRS} ++ ${JPEG_INCLUDE_DIR} ++ ${PNG_INCLUDE_DIRS} ++ ${TINYXML_INCLUDE_DIR} ++ ${DBGHELP_INCLUDE_DIR} ++ ${OGG_INCLUDE_DIRS} ++ ${THEORA_INCLUDE_DIR}) ++ ++#if(NOT CMAKE_CL_64) ++# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib ) ++#else(NOT CMAKE_CL_64) ++# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 ) ++#endif(NOT CMAKE_CL_64) + + # Add executable build target + add_executable(CrashSender WIN32 ${source_files} ${header_files}) + + # Add input link libraries +-target_link_libraries(CrashSender zlib minizip libjpeg libpng tinyxml libogg libtheora WS2_32.lib Dnsapi.lib wininet.lib Rpcrt4.lib Gdi32.lib shell32.lib Comdlg32.lib version.lib psapi.lib) ++target_link_libraries(CrashSender ZLIB::ZLIB minizip ${JPEG_LIBRARIES} PNG::PNG ${TINYXML_LIBRARY} Ogg::ogg ${THEORA_LIBRARY} WS2_32.lib Dnsapi.lib wininet.lib Rpcrt4.lib Gdi32.lib shell32.lib Comdlg32.lib version.lib psapi.lib) + + # Add compiler flags (/MP for multi-processor compilation, /Os to favor small code) + set_target_properties(CrashRpt PROPERTIES COMPILE_FLAGS "/Os") +@@ -52,4 +52,12 @@ set_target_properties(CrashRpt PROPERTIES COMPILE_FLAGS "/Os") + + set_target_properties(CrashSender PROPERTIES + DEBUG_POSTFIX ${CRASHRPT_VER}d +- RELEASE_POSTFIX ${CRASHRPT_VER} ) +\ No newline at end of file ++ RELEASE_POSTFIX ${CRASHRPT_VER} ) ++ ++install(TARGETS CrashSender ++ RUNTIME DESTINATION tools/crashrpt ++) ++ ++file(GLOB LANG_FILES "${CMAKE_SOURCE_DIR}/lang_files/crashrpt_lang_*.ini") ++install(FILES ${LANG_FILES} DESTINATION tools/crashrpt) ++install(FILES "${CMAKE_SOURCE_DIR}/lang_files/crashrpt_lang_EN.ini" DESTINATION tools/crashrpt RENAME crashrpt_lang.ini) +diff --git a/reporting/crashsender/CrashSender.rc b/reporting/crashsender/CrashSender.rc +index 0502962..e10e269 100644 +--- a/reporting/crashsender/CrashSender.rc ++++ b/reporting/crashsender/CrashSender.rc +@@ -7,7 +7,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "atlres.h" ++#include "wtl/atlres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -243,7 +243,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""atlres.h""\r\n" ++ "#include ""wtl/atlres.h""\r\n" + "\0" + END + +diff --git a/reporting/crashsender/ErrorReportSender.cpp b/reporting/crashsender/ErrorReportSender.cpp +index ac9603c..64cf2b5 100644 +--- a/reporting/crashsender/ErrorReportSender.cpp ++++ b/reporting/crashsender/ErrorReportSender.cpp +@@ -722,9 +722,9 @@ BOOL CErrorReportSender::CreateMiniDump() + CompiledApiVer.Reserved = 0; + LPAPI_VERSION pActualApiVer = lpImagehlpApiVersionEx(&CompiledApiVer); + pActualApiVer; +- ATLASSERT(CompiledApiVer.MajorVersion==pActualApiVer->MajorVersion); +- ATLASSERT(CompiledApiVer.MinorVersion==pActualApiVer->MinorVersion); +- ATLASSERT(CompiledApiVer.Revision==pActualApiVer->Revision); ++ //ATLASSERT(CompiledApiVer.MajorVersion==pActualApiVer->MajorVersion); ++ //ATLASSERT(CompiledApiVer.MinorVersion==pActualApiVer->MinorVersion); ++ //ATLASSERT(CompiledApiVer.Revision==pActualApiVer->Revision); + } + + // Write minidump to the file +@@ -1086,7 +1086,7 @@ BOOL CErrorReportSender::CreateCrashDescriptionXML(CErrorReportInfo& eri) + goto cleanup; + } + +- doc.useMicrosoftBOM = true; ++ //doc.useMicrosoftBOM = true; + bool bSave = doc.SaveFile(f); + if(!bSave) + { +diff --git a/reporting/crashsender/FilePreviewCtrl.cpp b/reporting/crashsender/FilePreviewCtrl.cpp +index e71aafc..5650291 100644 +--- a/reporting/crashsender/FilePreviewCtrl.cpp ++++ b/reporting/crashsender/FilePreviewCtrl.cpp +@@ -365,7 +365,7 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName) + if (!png_ptr) + goto cleanup; + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + goto cleanup; + + info_ptr = png_create_info_struct(png_ptr); +@@ -389,7 +389,7 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName) + width = png_get_image_width(png_ptr, info_ptr); + height = png_get_image_height(png_ptr, info_ptr); + +- if(info_ptr->channels==3) ++ if (png_get_channels(png_ptr, info_ptr) == 3) + { + png_set_strip_16(png_ptr); + png_set_packing(png_ptr); +@@ -408,14 +408,14 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName) + pBMI = (BITMAPINFO*)new BYTE[sizeof(BITMAPINFO)+256*4]; + memset(pBMI, 0, sizeof(BITMAPINFO)+256*4); + pBMI->bmiHeader.biSize = sizeof(BITMAPINFO); +- pBMI->bmiHeader.biBitCount = 8*info_ptr->channels; ++ pBMI->bmiHeader.biBitCount = 8 * png_get_channels(png_ptr, info_ptr); + pBMI->bmiHeader.biWidth = width; + pBMI->bmiHeader.biHeight = height; + pBMI->bmiHeader.biPlanes = 1; + pBMI->bmiHeader.biCompression = BI_RGB; + pBMI->bmiHeader.biSizeImage = rowbytes*height; + +- if( info_ptr->channels == 1 ) ++ if (png_get_channels(png_ptr, info_ptr) == 1) + { + RGBQUAD* palette = pBMI->bmiColors; + +@@ -431,7 +431,7 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName) + + for(y=height-1; y>=0; y--) + { +- png_read_rows(png_ptr, &row, png_bytepp_NULL, 1); ++ png_read_rows(png_ptr, &row, NULL, 1); + + { + CAutoLock lock(&m_csLock); +diff --git a/reporting/crashsender/ScreenCap.cpp b/reporting/crashsender/ScreenCap.cpp +index c183c19..8f5643d 100644 +--- a/reporting/crashsender/ScreenCap.cpp ++++ b/reporting/crashsender/ScreenCap.cpp +@@ -11,6 +11,7 @@ be found in the Authors.txt file in the root of the source tree. + #include "stdafx.h" + #include "ScreenCap.h" + #include "Utility.h" ++#include "zlib.h" + + // Disable warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable + #pragma warning(disable:4611) +diff --git a/reporting/crashsender/stdafx.h b/reporting/crashsender/stdafx.h +index f087ff4..4494d3a 100644 +--- a/reporting/crashsender/stdafx.h ++++ b/reporting/crashsender/stdafx.h +@@ -19,7 +19,7 @@ be found in the Authors.txt file in the root of the source tree. + #define WINVER 0x0501 + #define _WIN32_WINNT 0x0501 + #define _WIN32_IE 0x0600 +-#define _RICHEDIT_VER 0x0200 ++#define _RICHEDIT_VER 0x0300 + + typedef __int64 off_t, _off_t; + #define _OFF_T_DEFINED +@@ -61,19 +61,19 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + + extern CAppModule _Module; + + #include + +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include + + #define _WTL_USE_CSTRING +-#include ++#include + + #include + #include +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index f7bfede..9358bef 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -32,7 +32,7 @@ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG") + # Add include dir + include_directories( ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/reporting/CrashRpt +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl ) ++ ${WTL_INCLUDE_DIR} ) + + # Add executable build target + add_executable(Tests ${source_files} ${header_files}) +@@ -42,3 +42,10 @@ target_link_libraries(Tests CrashRpt CrashRptProbe) + + set_target_properties(Tests PROPERTIES DEBUG_POSTFIX d ) + #set_target_properties(Tests PROPERTIES COMPILE_FLAGS "/Zi" LINK_FLAGS "/DEBUG") ++ ++install(TARGETS Tests ++ RUNTIME DESTINATION tools/crashrpt ++) ++ ++install(FILES "${CMAKE_SOURCE_DIR}/demos/WTLDemo/dummy.ini" DESTINATION tools/crashrpt) ++install(FILES "${CMAKE_SOURCE_DIR}/demos/WTLDemo/dummy.log" DESTINATION tools/crashrpt) +diff --git a/tests/stdafx.h b/tests/stdafx.h +index f12675b..0ec2117 100644 +--- a/tests/stdafx.h ++++ b/tests/stdafx.h +@@ -19,7 +19,7 @@ be found in the Authors.txt file in the root of the source tree. + #define WINVER 0x0501 + #define _WIN32_WINNT 0x0501 + #define _WIN32_IE 0x0600 +-#define _RICHEDIT_VER 0x0200 ++#define _RICHEDIT_VER 0x0300 + + #include + #include +@@ -58,15 +58,15 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + + extern CAppModule _Module; + + #include + +-#include +-#include +-#include ++#include ++#include ++#include + #include + #include + #include +@@ -75,7 +75,7 @@ extern CAppModule _Module; + #include + + #define _WTL_USE_CSTRING +-#include ++#include + + #if _MSC_VER<1400 + #define _TCSCPY_S(strDestination, numberOfElements, strSource) _tcscpy(strDestination, strSource) +diff --git a/thirdparty/libpng/CMakeLists.txt b/thirdparty/libpng/CMakeLists.txt +index b358c4e..e0f7a33 100644 +--- a/thirdparty/libpng/CMakeLists.txt ++++ b/thirdparty/libpng/CMakeLists.txt +@@ -7,7 +7,7 @@ aux_source_directory( . source_files ) + add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE /wd4244 /wd4267) + + # Add include dir +-include_directories( ${CMAKE_SOURCE_DIR}/thirdparty/zlib ) ++include_directories( ${ZLIB_INCLUDE_DIRS} ) + + fix_default_compiler_settings_() + +@@ -15,6 +15,6 @@ fix_default_compiler_settings_() + add_library(libpng STATIC ${source_files}) + + # Add linker input libraries +-target_link_libraries(libpng zlib) ++target_link_libraries(libpng ZLIB::ZLIB) + + set_target_properties(libpng PROPERTIES DEBUG_POSTFIX d ) +\ No newline at end of file +diff --git a/thirdparty/libtheora/CMakeLists.txt b/thirdparty/libtheora/CMakeLists.txt +index 896fb47..f3cf5eb 100644 +--- a/thirdparty/libtheora/CMakeLists.txt ++++ b/thirdparty/libtheora/CMakeLists.txt +@@ -8,7 +8,7 @@ aux_source_directory( ./lib/x86_vc x86_source_files ) + add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE /wd4244 /wd4700 /wd4214 /wd4554 /wd4018 /wd4100 /wd4132 /wd4389 /wd4127 /wd4701 /wd4245 /wd4267 /wd4334) + + # Add include dir +-include_directories( ${CMAKE_SOURCE_DIR}/thirdparty/libogg/include ++include_directories( ${OGG_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/thirdparty/libtheora/include) + + fix_default_compiler_settings_() +diff --git a/thirdparty/minizip/CMakeLists.txt b/thirdparty/minizip/CMakeLists.txt +index 5f4d0af..2b015c9 100644 +--- a/thirdparty/minizip/CMakeLists.txt ++++ b/thirdparty/minizip/CMakeLists.txt +@@ -7,7 +7,7 @@ aux_source_directory( . source_files ) + add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE /wd4127 /wd4131 /wd4100 /wd4189 /wd4244) + + # Add include dir +-include_directories( ${CMAKE_SOURCE_DIR}/thirdparty/zlib ) ++include_directories( ${ZLIB_INCLUDE_DIRS} ) + + fix_default_compiler_settings_() + +@@ -15,6 +15,6 @@ fix_default_compiler_settings_() + add_library(minizip STATIC ${source_files}) + + # Add linker input libraries +-target_link_libraries(minizip zlib) ++target_link_libraries(minizip ZLIB::ZLIB) + + set_target_properties(minizip PROPERTIES DEBUG_POSTFIX d ) +\ No newline at end of file diff --git a/ports/crashrpt/portfile.cmake b/ports/crashrpt/portfile.cmake new file mode 100644 index 00000000000000..ffc83aa98b1976 --- /dev/null +++ b/ports/crashrpt/portfile.cmake @@ -0,0 +1,54 @@ +vcpkg_fail_port_install(ON_TARGET "OSX" "Linux" "UWP") + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(ARCH_DIR "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(ARCH_DIR "x64/") +else() + vcpkg_fail_port_install(MESSAGE "${PORT} only supports x86 and x64 architectures" ALWAYS) +endif() + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://git.code.sf.net/p/crashrpt/code + REF 4616504670be5a425a525376648d912a72ce18f2 + PATCHES + 001-add-install-target-and-find-deps.patch +) + +# Remove vendored dependencies to ensure they are not picked up by the build +# Vendored minizip is still used since it contains modifications needed for CrashRpt +foreach(DEPENDENCY dbghelp jpeg libogg libpng libtheora tinyxml wtl zlib) + if(EXISTS ${SOURCE_PATH}/thirdparty/${DEPENDENCY}) + file(REMOVE_RECURSE ${SOURCE_PATH}/thirdparty/${DEPENDENCY}) + endif() +endforeach() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CRASHRPT_BUILD_SHARED_LIBS) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" CRASHRPT_LINK_CRT_AS_DLL) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + probe CRASHRPT_BUILD_PROBE + tests CRASHRPT_BUILD_TESTS + demos CRASHRPT_BUILD_DEMOS +) + +# PREFER_NINJA is not used below since CrashSender fails to build with errors like this one: +# C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\ATLMFC\include\atlconv.h(788): error C2440: 'return': cannot convert from 'LPCTSTR' to 'LPCOLESTR' +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + # PREFER_NINJA + OPTIONS + -DCRASHRPT_BUILD_SHARED_LIBS=${CRASHRPT_BUILD_SHARED_LIBS} + -DCRASHRPT_LINK_CRT_AS_DLL=${CRASHRPT_LINK_CRT_AS_DLL} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/crashrpt/vcpkg.json b/ports/crashrpt/vcpkg.json new file mode 100644 index 00000000000000..3ed55e7312b515 --- /dev/null +++ b/ports/crashrpt/vcpkg.json @@ -0,0 +1,37 @@ +{ + "name": "crashrpt", + "version": "1.4.3", + "port-version": 1, + "description": "A crash reporting system for Windows applications", + "homepage": "http://crashrpt.sourceforge.net/", + "dependencies": [ + "dbghelp", + "libjpeg-turbo", + "libogg", + "libpng", + "libtheora", + "tinyxml", + "wtl", + "zlib" + ], + "features": { + "demos": { + "description": "Demo applications for CrashRptProbe" + }, + "probe": { + "description": "The CrashRptProbe library" + }, + "tests": { + "description": "Test application for crashrpt", + "dependencies": [ + { + "name": "crashrpt", + "default-features": false, + "features": [ + "probe" + ] + } + ] + } + } +} diff --git a/ports/crc32c/0001_export_symbols.patch b/ports/crc32c/0001_export_symbols.patch deleted file mode 100644 index 691e8603f9c09d..00000000000000 --- a/ports/crc32c/0001_export_symbols.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 80b7d17..6ab78e2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,6 +15,10 @@ set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) - -+# When compiling a Windows DLL export all symbols, just like Unix shared -+# objects do. -+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -+ - # https://github.com/izenecloud/cmake/blob/master/SetCompilerWarningAll.cmake - if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - # Use the highest warning level for Visual Studio. diff --git a/ports/crc32c/CONTROL b/ports/crc32c/CONTROL deleted file mode 100644 index 764a0f2d83b0e4..00000000000000 --- a/ports/crc32c/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: crc32c -Version: 1.0.7-1 -Homepage: https://github.com/google/crc32c -Description: CRC32C implementation with support for CPU-specific acceleration instructions. diff --git a/ports/crc32c/portfile.cmake b/ports/crc32c/portfile.cmake index a15961f94d7e65..ccd8ca47b00ac6 100644 --- a/ports/crc32c/portfile.cmake +++ b/ports/crc32c/portfile.cmake @@ -1,12 +1,11 @@ -include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/crc32c - REF 1.0.7 - SHA512 fe384ea15976b1317b7f6be3a447ae2cf25e0baa80f6c5e1231719a2af8863bc156b3d33156f24eca85504083730937f81fb624311d27e94ba3d2456bf3d34fa + REF ba741856254e3c6f6c7bcf0704fe1344a668a227 # 1.1.1 + SHA512 129e7cf36a92f6d953b4545e673860b0d956aa0ecf89ae98dfcfdff03031482d03f9036d11d0546446f1e73f65548cdd87065759dc6efd39f0fd9c58234ebb24 HEAD_REF master - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_export_symbols.patch ) vcpkg_configure_cmake( @@ -30,4 +29,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/crc32c RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/crc32c/vcpkg.json b/ports/crc32c/vcpkg.json new file mode 100644 index 00000000000000..b8bd8e5b9ec348 --- /dev/null +++ b/ports/crc32c/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "crc32c", + "version-string": "1.1.1", + "port-version": 1, + "description": "CRC32C implementation with support for CPU-specific acceleration instructions.", + "homepage": "https://github.com/google/crc32c" +} diff --git a/ports/crfsuite/CMakeLists.txt b/ports/crfsuite/CMakeLists.txt new file mode 100644 index 00000000000000..05dfa88d06a267 --- /dev/null +++ b/ports/crfsuite/CMakeLists.txt @@ -0,0 +1,71 @@ +cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +PROJECT(crfsuite) + +file(GLOB SOURCE_FILE_CQDB + "lib/cqdb/src/*.c" +) +file(GLOB HEADERS_FILE_CQDB + "lib/cqdb/include/*.h" +) + +file(GLOB SOURCE_FILE_CRF + "lib/crf/src/*.c" +) +file(GLOB HEADERS_FILE_CRF + "lib/crf/src/*.h" +) +file(GLOB SOURCE_FILE_FRONTEND + "frontend/*.c" +) +file(GLOB HEADERS_FILE_FRONTEND + "frontend/*.h" +) +file(GLOB SOURCE_FILE + "swig/*.cpp" + "frontend/*.c" +) +file(GLOB HEADERS_FILE + "include/*.h" + "include/*.hpp" + "frontend/*.h" +) + +find_library(LBFGS_LIBRARY lbfgs) + +include_directories(lib/cqdb/include/) +include_directories(include/) +include_directories(win32/liblbfgs/) + +add_library(cqdb STATIC ${SOURCE_FILE_CQDB} ${HEADERS_FILE_CQDB}) +add_library(crf STATIC ${SOURCE_FILE_CRF} ${HEADERS_FILE_CRF}) +add_library(crfsuite STATIC ${SOURCE_FILE} ${HEADERS_FILE}) + +target_link_libraries(crf PUBLIC cqdb ${LBFGS_LIBRARY}) +target_link_libraries(crfsuite PUBLIC crf) + +install(TARGETS cqdb crf crfsuite + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if (WIN32) + add_executable(frontend ${SOURCE_FILE_FRONTEND} ${HEADERS_FILE_FRONTEND}) + target_link_libraries(frontend PUBLIC crf) + install(TARGETS frontend + RUNTIME DESTINATION tools + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) +endif() + + +install( + FILES + ${HEADERS_FILE} + ${HEADERS_FILE_CQDB} + ${HEADERS_FILE_CRF} + ${HEADERS_FILE_FRONTEND} + DESTINATION + include/crfsuite + ) diff --git a/ports/crfsuite/portfile.cmake b/ports/crfsuite/portfile.cmake new file mode 100644 index 00000000000000..19b2399bed3e21 --- /dev/null +++ b/ports/crfsuite/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET uwp) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chokkan/crfsuite + REF 5d1bd3b803bb26582ed5cc274d6b5af6cc7f9cae + SHA512 e7f329f96fb0dc0e347b3e7a3e26b23ceb45e6fae7b59ace05633a24d58a31665826ebc5280e5a864f50598772791e4b5b3e7da7f46994655cbe03806f823f73 + HEAD_REF master +) + + +list(REMOVE_ITEM SOURCE_FILE "${SOURCE_PATH}/win32/liblbfgs/lbfgs.lib") +list(REMOVE_ITEM SOURCE_FILE "${SOURCE_PATH}/win32/liblbfgs/lbfgs_debug.lib") + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFIX_NINJA +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/crfsuite/vcpkg.json b/ports/crfsuite/vcpkg.json new file mode 100644 index 00000000000000..aa62f95bf1b0ba --- /dev/null +++ b/ports/crfsuite/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "crfsuite", + "version-date": "2019-07-21", + "port-version": 1, + "description": "CRFSuite is an implementation of Conditional Random Fields (CRFs) for labeling sequential data.", + "homepage": "http://www.chokkan.org/software/crfsuite/", + "supports": "!uwp", + "dependencies": [ + "liblbfgs" + ] +} diff --git a/ports/croncpp/0001-fix-cmake.patch b/ports/croncpp/0001-fix-cmake.patch new file mode 100644 index 00000000000000..735c9df34a7072 --- /dev/null +++ b/ports/croncpp/0001-fix-cmake.patch @@ -0,0 +1,82 @@ +From 30db118abd484c59efada27d9d6956b5f68bcee6 Mon Sep 17 00:00:00 2001 +From: Robert Kesterson +Date: Fri, 4 Sep 2020 16:31:55 +0000 +Subject: [PATCH] vcpkg + +--- + CMakeLists.txt | 47 +++++++++++++++++++++++++++++++++++++++++++-- + croncppConfig.cmake | 1 + + 2 files changed, 46 insertions(+), 2 deletions(-) + create mode 100644 croncppConfig.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9114b39..8d46e6b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.7.0) +-project(croncpp) ++project(croncpp VERSION 1.0.0) + + if(WIN32) + message(status "Setting MSVC flags") +@@ -24,4 +24,47 @@ if(BUILD_TESTS) + endif() + + add_subdirectory(benchmark) +-add_subdirectory(test) +\ No newline at end of file ++add_subdirectory(test) ++ ++add_library( croncpp INTERFACE ) ++add_library( croncpp::croncpp ALIAS croncpp ) ++ ++include(GNUInstallDirs) ++target_include_directories( croncpp INTERFACE ++ $ ++ $ ) ++ ++if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) ++ # public headers will get installed: ++ set_target_properties( croncpp PROPERTIES PUBLIC_HEADER include/croncpp.h ) ++endif () ++ ++ ++set( version_config "${CMAKE_CURRENT_BINARY_DIR}/croncppConfigVersion.cmake" ) ++ ++include( CMakePackageConfigHelpers ) ++write_basic_package_version_file( "${version_config}" ++ VERSION ${PROJECT_VERSION} ++ COMPATIBILITY SameMajorVersion ) ++ ++message(STATUS "CMAKE_INSTALL_INCLUDEDIR = ${CMAKE_INSTALL_INCLUDEDIR}") ++ ++install( TARGETS croncpp ++ EXPORT croncppConfig ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/croncpp ) ++export( TARGETS croncpp NAMESPACE croncpp:: FILE croncppTargets.cmake ) ++if (CMAKE_VERSION VERSION_LESS 3.15) ++ install( ++ FILES include/croncpp.h ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/croncpp ) ++endif () ++ ++set( CONFIG_LOC "share/croncpp" ) ++ ++install( EXPORT croncppConfig ++ FILE croncppTargets.cmake ++ NAMESPACE croncpp:: ++ DESTINATION ${CONFIG_LOC} ) ++install ( ++ FILES croncppConfig.cmake "${version_config}" ++ DESTINATION ${CONFIG_LOC}) +diff --git a/croncppConfig.cmake b/croncppConfig.cmake +new file mode 100644 +index 0000000..3c4702c +--- /dev/null ++++ b/croncppConfig.cmake +@@ -0,0 +1 @@ ++include( "${CMAKE_CURRENT_LIST_DIR}/croncppTargets.cmake" ) +-- +2.20.1 + diff --git a/ports/croncpp/portfile.cmake b/ports/croncpp/portfile.cmake new file mode 100644 index 00000000000000..ebf35895bc3732 --- /dev/null +++ b/ports/croncpp/portfile.cmake @@ -0,0 +1,23 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mariusbancila/croncpp + REF 11cce4666a06c40346c7ba380ddd90c53806809d #master on 9/4/2020 + SHA512 8f4d892ce90d8eca3711b21728bb599bf64857b20c0b143c5277687d0b6e5d5b8bf3e6dc7f9e8d028ba4e5ee711a5a9e750bcc2f771177d2f659c0c19e12207a + HEAD_REF master + PATCHES 0001-fix-cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/croncpp RENAME copyright) diff --git a/ports/croncpp/vcpkg.json b/ports/croncpp/vcpkg.json new file mode 100644 index 00000000000000..d1b9e05dea43a6 --- /dev/null +++ b/ports/croncpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "croncpp", + "version-string": "2020-09-04", + "port-version": 2, + "description": "croncpp is a C++17 header-only cross-platform library for handling CRON expressions.", + "homepage": "https://github.com/mariusbancila/croncpp" +} diff --git a/ports/crossguid/CONTROL b/ports/crossguid/CONTROL deleted file mode 100644 index 574d444d22a2bf..00000000000000 --- a/ports/crossguid/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: crossguid -Version: 0.2.2-2018-06-16-1 -Build-Depends: libuuid (!windows&!uwp&!osx&!android) -Description: CrossGuid is a minimal, cross platform, C++ GUID library. diff --git a/ports/crossguid/portfile.cmake b/ports/crossguid/portfile.cmake index 5ee715e5820761..7e9b0c76f1ba84 100644 --- a/ports/crossguid/portfile.cmake +++ b/ports/crossguid/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/crossguid/vcpkg.json b/ports/crossguid/vcpkg.json new file mode 100644 index 00000000000000..0532bad6633d36 --- /dev/null +++ b/ports/crossguid/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "crossguid", + "version-string": "0.2.2-2018-06-16", + "port-version": 2, + "description": "CrossGuid is a minimal, cross platform, C++ GUID library.", + "dependencies": [ + { + "name": "libuuid", + "platform": "!windows & !uwp & !osx & !android" + } + ] +} diff --git a/ports/crow/CONTROL b/ports/crow/CONTROL deleted file mode 100644 index 96efb27bf16fea..00000000000000 --- a/ports/crow/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: crow -Version: 0.1-1 -Homepage: https://github.com/ipkn/crow -Description: Very fast and easy to use C++ micro web framework diff --git a/ports/crow/portfile.cmake b/ports/crow/portfile.cmake index ff6f84d90d2b1a..ea9d0f80b71994 100644 --- a/ports/crow/portfile.cmake +++ b/ports/crow/portfile.cmake @@ -1,12 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO ipkn/crow - REF v0.1 - SHA512 5a97c5b8cda3ffe79001aa382d4391eddde30027401bbb1d9c85c70ea715f556d3659f5eac0b9d9192c19d13718f19ad6bdf49d67bef03b21e75300d60e7d02a + REPO CrowCpp/crow + REF 7e47d4c7ee548c5fd954efd82cfeed330a7823ea #0.3+2 + SHA512 47822ccdfb259a65bde8fed0c29bb8e58bc2f29896ff186c03098eb897985307e7477aa03808a42db01df245054411f05f95c6d9ae6477d75dd94399af3bb130 + FILE_DISAMBIGUATOR 1 HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/crow RENAME copyright) +file(INSTALL "${SOURCE_PATH}/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/crow/vcpkg.json b/ports/crow/vcpkg.json new file mode 100644 index 00000000000000..0e75a7943ecf29 --- /dev/null +++ b/ports/crow/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "crow", + "version": "0.3.2", + "port-version": 1, + "description": "Very fast and easy to use C++ micro web framework", + "homepage": "https://github.com/CrowCpp/crow" +} diff --git a/ports/cryptopp/CONTROL b/ports/cryptopp/CONTROL deleted file mode 100644 index 04c25da704b660..00000000000000 --- a/ports/cryptopp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cryptopp -Version: 8.1.0-2 -Homepage: https://github.com/weidai11/cryptopp -Description: Crypto++ is a free C++ class library of cryptographic schemes. diff --git a/ports/cryptopp/cmake.patch b/ports/cryptopp/cmake.patch index 699ebd564f5017..8502ff17c0183e 100644 --- a/ports/cryptopp/cmake.patch +++ b/ports/cryptopp/cmake.patch @@ -1,13 +1,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8cf9fa2..86a756b 100644 +index 1683961..f63c71e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -336,9 +336,13 @@ if (MSVC) - if (CMAKE_SYSTEM_VERSION MATCHES "10\\.0.*") - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS "_WIN32_WINNT=0x0A00") - endif () -- list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FI\"winapifamily.h\"") -+ list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FIwinapifamily.h") +@@ -395,6 +395,10 @@ if (MSVC) + list(APPEND CRYPTOPP_COMPILE_OPTIONS /FI winapifamily.h) endif () +if(WINDOWS_STORE) diff --git a/ports/cryptopp/missing-flags.patch b/ports/cryptopp/missing-flags.patch deleted file mode 100644 index 3492192331837c..00000000000000 --- a/ports/cryptopp/missing-flags.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b49fff6..f753e75 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -639,6 +639,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU - set_source_files_properties(${SRC_DIR}/simeck_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/simon128_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/speck128_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") -+ set_source_files_properties(${SRC_DIR}/keccak_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - if (CRYPTOPP_IA32_SSE41 AND NOT DISABLE_SSE4) - set_source_files_properties(${SRC_DIR}/blake2s_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1") - set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1") -@@ -648,6 +649,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU - if (CRYPTOPP_IA32_SSE42 AND NOT DISABLE_SSE4) - set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2") - if (CRYPTOPP_IA32_CLMUL AND NOT DISABLE_AES) -+ set_source_files_properties(${SRC_DIR}/gf2n_simd.cpp PROPERTIES COMPILE_FLAGS "-mpclmul") - set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3 -mpclmul") - endif () - if (CRYPTOPP_IA32_AES AND NOT DISABLE_AES) diff --git a/ports/cryptopp/patch.patch b/ports/cryptopp/patch.patch index 937738d5b4b472..c202564e9eab14 100644 --- a/ports/cryptopp/patch.patch +++ b/ports/cryptopp/patch.patch @@ -1,8 +1,8 @@ -diff --git a/config.h b/config.h -index f06992a2..be6eda31 100644 ---- a/config.h -+++ b/config.h -@@ -814,6 +814,7 @@ NAMESPACE_END +diff --git a/config_os.h b/config_os.h +index da27de22..9703f77d 100644 +--- a/config_os.h ++++ b/config_os.h +@@ -126,6 +126,7 @@ #endif #ifdef CRYPTOPP_WIN32_AVAILABLE diff --git a/ports/cryptopp/portfile.cmake b/ports/cryptopp/portfile.cmake index 728436d59e4437..03612d3057aeb7 100644 --- a/ports/cryptopp/portfile.cmake +++ b/ports/cryptopp/portfile.cmake @@ -1,24 +1,20 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH CMAKE_SOURCE_PATH REPO noloader/cryptopp-cmake - REF b97d72f083fefa249e46ae3c15a2c294e615fca2 - SHA512 e6c65bb81a47009fa568c957beea65c37f2283bdc5afad6a45983f685c0b9c9c01ac4bb334d45dacbdc74f9d834b316c09cbb16d3ead7fb48737fbad76ff3f8d + REF CRYPTOPP_8_5_0 + SHA512 758633786c81f5a34ade0ab99983b3262bb3a028b086e734b1f8ddb618c801453d517f67176178936f87ec36a91fca93fba9bcaec4301705138954e6eb49d136 HEAD_REF master PATCHES cmake.patch - simon-speck.patch - missing-flags.patch ) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO weidai11/cryptopp - REF CRYPTOPP_8_1_0 - SHA512 2b09b30c53a8f95a9c3204a48867174c70a1e97171854122f4d8454b25d5af9b94cab2c210dd9857c7db66df881849183e82b6155b80bfef6e69dac8efd2ea9a + REF CRYPTOPP_8_5_0 + SHA512 e8dd210c9e9d4925edc456e4d68780deaa224d85e11394ad5da835dcb1a1e6b3e899aa473acf20449f9721116960884b6d88b29335479b305bb7e29faa87e6c0 HEAD_REF master PATCHES patch.patch ) @@ -26,14 +22,29 @@ vcpkg_from_github( file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -# disable assembly on OSX to fix broken build -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") +if("pem-pack" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH PEM_PACK_SOURCE_PATH + REPO noloader/cryptopp-pem + REF 095f08ff2ef9bca7b81036a59f2395e4f08ce2e8 + SHA512 49912758a635faca1f49665ac9552b20576b46e0283aaabc19bb012bdc80586106452018e5088b9b46967717982ca6022ca968edc4cac96a7506d2b1a3e4bf13 + HEAD_REF master + ) + + file(GLOB PEM_PACK_FILES + ${PEM_PACK_SOURCE_PATH}/*.h + ${PEM_PACK_SOURCE_PATH}/*.cpp + ) + file(COPY ${PEM_PACK_FILES} DESTINATION ${SOURCE_PATH}) +endif() + +# disable assembly on ARM Windows to fix broken build +if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE MATCHES "^arm") set(CRYPTOPP_DISABLE_ASM "ON") else() set(CRYPTOPP_DISABLE_ASM "OFF") endif() - # Dynamic linking should be avoided for Crypto++ to reduce the attack surface, # so generate a static lib for both dynamic and static vcpkg targets. # See also: diff --git a/ports/cryptopp/simon-speck.patch b/ports/cryptopp/simon-speck.patch deleted file mode 100644 index a1d911930aced1..00000000000000 --- a/ports/cryptopp/simon-speck.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7d64977..4ec3ebd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -497,6 +497,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU - set_source_files_properties(${SRC_DIR}/simeck-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/simon128-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/speck128-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") -+ set_source_files_properties(${SRC_DIR}/simon-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") -+ set_source_files_properties(${SRC_DIR}/speck-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - if (CRYPTOPP_IA32_SSE41 AND NOT DISABLE_SSE4) - set_source_files_properties(${SRC_DIR}/blake2-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1") - set_source_files_properties(${SRC_DIR}/simon64-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1") diff --git a/ports/cryptopp/vcpkg.json b/ports/cryptopp/vcpkg.json new file mode 100644 index 00000000000000..e75fa21625bf38 --- /dev/null +++ b/ports/cryptopp/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "cryptopp", + "version-string": "8.5.0", + "port-version": 1, + "description": "Crypto++ is a free C++ class library of cryptographic schemes.", + "homepage": "https://github.com/weidai11/cryptopp", + "features": { + "pem-pack": { + "description": "Crypto++ with PEM pack" + } + } +} diff --git a/ports/cspice/CMakeLists.txt b/ports/cspice/CMakeLists.txt new file mode 100644 index 00000000000000..899a94033bb727 --- /dev/null +++ b/ports/cspice/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 3.1) +project(cspice LANGUAGES C) + +set(SOVERSION 66) + +# Include all *.c files from the library +file(GLOB CSPICE_SOURCE ${PROJECT_SOURCE_DIR}/cspice/src/cspice/*.c) +set(INCLUDE_PATH "${PROJECT_SOURCE_DIR}/cspice/include") + +if (_STATIC_BUILD) + add_library(cspice STATIC ${CSPICE_SOURCE}) +else() + add_library(cspice SHARED ${CSPICE_SOURCE}) +endif() +target_include_directories(cspice PUBLIC "${INCLUDE_PATH}") + +if (WIN32) + target_compile_definitions(cspice PUBLIC "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO;_CRT_SECURE_NO_WARNINGS") + set_target_properties(cspice PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) +elseif (UNIX) + target_compile_definitions(cspice PUBLIC "NON_UNIX_STDIO") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + target_compile_options(cspice PUBLIC -m64 -ansi -fPIC) + elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + target_compile_options(cspice PUBLIC -m32 -ansi -fPIC) + endif() + target_compile_options(cspice PRIVATE -Wno-error=implicit-function-declaration) +endif () + +if (NOT _SKIP_HEADERS) + file(GLOB SPICE_HEADERS ${INCLUDE_PATH}/*.h) + install(FILES ${SPICE_HEADERS} DESTINATION include) +endif() + +set_target_properties( + cspice + PROPERTIES SOVERSION ${SOVERSION} +) + +install( + TARGETS cspice + EXPORT cspice + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) diff --git a/ports/cspice/License.txt b/ports/cspice/License.txt new file mode 100644 index 00000000000000..dcec937a1172ac --- /dev/null +++ b/ports/cspice/License.txt @@ -0,0 +1,16 @@ +This software and any related materials were created by the California +Institute of Technology (Caltech) under U.S. government contract with the +National Aeronautics and Space Administration (NASA). The software is +Technology and Software Publicly Available under U.S. export laws and is +provided "as-is" to the recipient without warranty of any kind, including any +warranties of performance or merchantability or fitness for particular use or +purpose (as set forth in United States UCC§2312-§2313) or for any purpose +whatsoever, for the software and related materials, however used. In no event +shall Caltech, its Jet Propulsion Laboratory, or NASA be liable for any damages +and/or costs, including, but not limited to, incidental or consequential +damages of any kind, including economic damage or injury to property and lost +profits, regardless of whether Caltech, JPL, or NASA be advised, have reason to +know, or, in fact, shall know of the possibility. Recipient bears all risk +relating to quality and performance of the software and any related materials, +and agrees to indemnify Caltech and NASA for all third-party claims resulting +from the actions of recipient in the use of the software. diff --git a/ports/cspice/isatty.patch b/ports/cspice/isatty.patch new file mode 100644 index 00000000000000..a6d201d7754515 --- /dev/null +++ b/ports/cspice/isatty.patch @@ -0,0 +1,19 @@ +--- a/cspice/src/cspice/fio.h 2019-11-01 20:51:53.198400000 +0300 ++++ b/cspice/src/cspice/fio.h 2019-11-01 21:19:58.123200000 +0300 +@@ -1,3 +1,6 @@ ++#ifdef _WIN32 ++#include /* for isatty() */ ++#endif + #include "stdio.h" + #include "errno.h" + #ifndef NULL +@@ -75,7 +76,9 @@ + extern int (*f__donewrec)(void), t_putc(int), x_wSL(void); + extern void b_char(char*,char*,ftnlen), g_char(char*,ftnlen,char*); + extern int c_sfe(cilist*), z_rnew(void); ++#ifndef _WIN32 + extern int isatty(int); ++#endif + extern int err__fl(int,int,char*); + extern int xrd_SL(void); + extern int f__putbuf(int); diff --git a/ports/cspice/mktemp.patch b/ports/cspice/mktemp.patch new file mode 100644 index 00000000000000..5a7cc0ee004144 --- /dev/null +++ b/ports/cspice/mktemp.patch @@ -0,0 +1,11 @@ +--- a/cspice/src/cspice/open.c 2019-11-02 10:57:10.073886963 +0300 ++++ b/cspice/src/cspice/open.c 2019-11-02 10:57:49.230398941 +0300 +@@ -324,7 +324,7 @@ + #ifdef NON_ANSI_STDIO + + (void) strcpy(buf,"tmp.FXXXXXX"); +- (void) mktemp(buf); ++ fclose(mktemp(buf)); + goto replace; + + #else diff --git a/ports/cspice/portfile.cmake b/ports/cspice/portfile.cmake new file mode 100644 index 00000000000000..667785cac5a019 --- /dev/null +++ b/ports/cspice/portfile.cmake @@ -0,0 +1,81 @@ +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Windows_VisualC_32bit/packages/cspice.zip" + FILENAME "cspice_32bit.zip" + SHA512 4f6129b26543729f4eb4f8240b43ca87530db9c6d9a5c0e3f43faf30561eaad95dcf507e3fecfd1c3d4388ccaa4e22a76df7bf7945b6ce9a68eb3b4893885992 + ) + elseif (VCPKG_TARGET_IS_OSX) + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacIntel_OSX_AppleC_32bit/packages/cspice.tar.Z" + FILENAME "cspice_32bit.tar.Z" + SHA512 bd5cc20206e48b3712c5077a2beb05c98cd58a25ce374ed363699a04998eb8ba93e42b5f7c2104c5296db95b3bccdc7cc9b6a2ba45875454d0c3914834aa4c42 + ) + else () + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Linux_GCC_32bit/packages/cspice.tar.Z" + FILENAME "cspice_32bit.tar.Z" + SHA512 b387bc2cfca4deccc451d198af49564ea0b19cf665ba143d39196ed532639cbc11aad7e1d63f71f1bb88d72c0e6ac30757b6e1babca9e0ee3b92f9c205c1b908 + ) + endif() +else() + if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Windows_VisualC_64bit/packages/cspice.zip" + FILENAME "cspice_64bit.zip" + SHA512 7b5353c638fdba67ed2e9fd21c4f78ac56c0afba408caa70f910f23bb025f6dc822fbaa7d6d7fa277d1038f835e6a962563f4b11a6adf63150d48354959e3c62 + ) + elseif (VCPKG_TARGET_IS_OSX) + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z" + FILENAME "cspice_64bit.tar.Z" + SHA512 0d4ef95dfa65d127c1d6f9cf1f637d41ca6680660ee3003f357652f12ed9d04a21888ef796f347ba90354a445b5aea9ffca7dedc6c1617f253b0002683d54a0f + ) + else () + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Linux_GCC_64bit/packages/cspice.tar.Z" + FILENAME "cspice_64bit.tar.Z" + SHA512 7d090e9196596436740b53180a7c6ca885c12e301771a83fc62d625a63691129c69012cb0385a6c8f246cc5edf1c1af57ffac8a9d766061e1bde8584c57c6ca4 + ) + endif() +endif() + +set(PATCHES isatty.patch) +if (NOT VCPKG_TARGET_IS_WINDOWS) + set(PATCHES ${PATCHES} mktemp.patch) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + PATCHES ${PATCHES} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(_STATIC_BUILD ON) +endif() + +if (VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}") + set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -D_STATIC_BUILD=${_STATIC_BUILD} + OPTIONS_DEBUG -D_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file( + INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/ports/cspice/vcpkg.json b/ports/cspice/vcpkg.json new file mode 100644 index 00000000000000..abbf6dfaf58792 --- /dev/null +++ b/ports/cspice/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cspice", + "version-string": "66", + "port-version": 5, + "description": "NASA C SPICE toolkit", + "homepage": "https://naif.jpl.nasa.gov/naif/toolkit_C.html" +} diff --git a/ports/ctbignum/CONTROL b/ports/ctbignum/CONTROL deleted file mode 100644 index 977abc21fe4c53..00000000000000 --- a/ports/ctbignum/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: ctbignum -Version: 2019-08-02 -Homepage: https://github.com/niekbouman/ctbignum -Description: This is a header-only template library for fixed-width "small big-integer" computations, for use during run-time as well as compile-time. -Build-Depends: boost - diff --git a/ports/ctbignum/portfile.cmake b/ports/ctbignum/portfile.cmake index 6d297117f7d11f..9bafbc9bac6658 100644 --- a/ports/ctbignum/portfile.cmake +++ b/ports/ctbignum/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO niekbouman/ctbignum diff --git a/ports/ctbignum/vcpkg.json b/ports/ctbignum/vcpkg.json new file mode 100644 index 00000000000000..093dfbcfbf6b38 --- /dev/null +++ b/ports/ctbignum/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "ctbignum", + "version-string": "2019-08-02", + "port-version": 1, + "description": "This is a header-only template library for fixed-width \"small big-integer\" computations, for use during run-time as well as compile-time.", + "homepage": "https://github.com/niekbouman/ctbignum", + "dependencies": [ + "boost" + ] +} diff --git a/ports/ctemplate/CONTROL b/ports/ctemplate/CONTROL deleted file mode 100644 index 00abc1f960dde9..00000000000000 --- a/ports/ctemplate/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ctemplate -Version: 2017-06-23-44b7c5-4 -Homepage: https://github.com/OlafvdSpek/ctemplate -Description: C++ CTemplate system diff --git a/ports/ctemplate/portfile.cmake b/ports/ctemplate/portfile.cmake index d5d8b39608b41f..f55a7c7e031e05 100644 --- a/ports/ctemplate/portfile.cmake +++ b/ports/ctemplate/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OlafvdSpek/ctemplate - REF 4b7e6c52dc7cbb4d51c9abcebcbac91ec256a62b - SHA512 9317fb26f22892b0bc2ca17cbccb5b084091050aa88766b4ed673a690bc4cdb9cd882134fbcd7ed3ee156f6a6937218717765143796d7e98b532355867ed042b + REF 1c397b63e62dc6547054f4711c27918aedce4c2d # accessed on 2020-09-14 + SHA512 9691393cbb89972e95dba3cb802d0a0379f8f45cddc696e4ce223eb94887b3be46a9d999cac161069261ef63ba26fbdc392c53c3f977e1a7ae51768caa7739ea HEAD_REF master ) diff --git a/ports/ctemplate/vcpkg.json b/ports/ctemplate/vcpkg.json new file mode 100644 index 00000000000000..110b0c58ae1474 --- /dev/null +++ b/ports/ctemplate/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ctemplate", + "version-string": "2020-09-14", + "port-version": 1, + "description": "C++ CTemplate system", + "homepage": "https://github.com/OlafvdSpek/ctemplate" +} diff --git a/ports/ctp/portfile.cmake b/ports/ctp/portfile.cmake new file mode 100644 index 00000000000000..65c61802cdf71e --- /dev/null +++ b/ports/ctp/portfile.cmake @@ -0,0 +1,97 @@ +message(STATUS "Note: the downloading server may only be avilable from 8:00AM-5:00PM (UTC+8), Mon-Fri (except public holidays in China)") + +vcpkg_fail_port_install(ON_TARGET "OSX" "UWP" ON_ARCH "arm") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_download_distfile(TRADEAPI_ARCHIVE + URLS "http://www.sfit.com.cn/DocumentDown/api_3/5_2_2/v6.6.1_P1_tradeapi.zip" + FILENAME "v6.6.1_P1_tradeapi.zip" + SHA512 04d8ba233394fea04dacfa4bcb8758d9e068025ab3d963f6a89dcdfb79bbe10d58c10a71f630a039e130e4f8dfdc05cb4d1a52fd23d908f0798e43792d656cc4 +) + +if("datacollect" IN_LIST FEATURES) + # Data collect library is not included in this version, and official release note said we should get it from traderapi_v6.3.19_P1 + vcpkg_download_distfile(DATACOLLECT_ARCHIVE + URLS "http://www.sfit.com.cn/DocumentDown/api_3/5_2_2/traderapi_v6.3.19_P1.zip" + FILENAME "traderapi_v6.3.19_P1.zip" + SHA512 ce44d761b2aebaaf131b91bcfc2fa0d5466c023310bcae1f03297fe228f62d2c281c09a82bb4068ae92ddd3d5ba00359b7b44b8c44af1181fff1954317d24bbb + ) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH TRADEAPI_UNPACK_PATH + ARCHIVE ${TRADEAPI_ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +if("datacollect" IN_LIST FEATURES) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH DATACOLLECT_UNPACK_PATH + ARCHIVE ${DATACOLLECT_ARCHIVE} + NO_REMOVE_ONE_LEVEL + ) +endif() + + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(TRADEAPI_SOURCE_PATH "${TRADEAPI_UNPACK_PATH}/v6.6.1_P1_20210406_winApi/tradeapi/20210406_tradeapi_se_windows") +elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(TRADEAPI_SOURCE_PATH "${TRADEAPI_UNPACK_PATH}/v6.6.1_P1_20210406_winApi/tradeapi/20210406_tradeapi64_se_windows") +elseif(VCPKG_TARGET_IS_LINUX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH TRADEAPI_LINUX_TAR_PATH + ARCHIVE "${TRADEAPI_UNPACK_PATH}/v6.6.1_P1_20210406_api_tradeapi_linux64.tar" + ) + set(TRADEAPI_SOURCE_PATH "${TRADEAPI_LINUX_TAR_PATH}/v6.6.1_P1_20210406_api_tradeapi_se_linux64") +else() + message(FATAL_ERROR "${TARGET_TRIPLET} is not a supported platform" ) +endif() + +if("datacollect" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(DATACOLLECT_SOURCE_PATH "${DATACOLLECT_UNPACK_PATH}/v6.3.19_P1_20200106_winApi/20200106_clientdll_windows") + elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(DATACOLLECT_SOURCE_PATH "${DATACOLLECT_UNPACK_PATH}/v6.3.19_P1_20200106_winApi/20200106_clientdll64_windows") + elseif(VCPKG_TARGET_IS_LINUX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH DATACOLLECT_LINUX_TAR_PATH + ARCHIVE "${DATACOLLECT_UNPACK_PATH}/v6.3.19_P1_20200106_api.tar" + ) + set(DATACOLLECT_SOURCE_PATH "${DATACOLLECT_LINUX_TAR_PATH}/v6.3.19_P1_20200106_api_clientdatacollectdll_linux64") + else() + message(FATAL_ERROR "${TARGET_TRIPLET} is not a supported platform" ) + endif() +endif() + + +file(INSTALL ${TRADEAPI_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") + +if(VCPKG_TARGET_IS_WINDOWS) + file(INSTALL ${TRADEAPI_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib") + file(INSTALL ${TRADEAPI_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") + file(INSTALL ${TRADEAPI_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.lib") + file(INSTALL ${TRADEAPI_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll") +elseif(VCPKG_TARGET_IS_LINUX) + file(INSTALL ${TRADEAPI_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.so") + file(INSTALL ${TRADEAPI_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.so") +endif() + +file(INSTALL ${TRADEAPI_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} FILES_MATCHING PATTERN "*.xml") +file(INSTALL ${TRADEAPI_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} FILES_MATCHING PATTERN "*.dtd") + +if("datacollect" IN_LIST FEATURES) + file(INSTALL ${DATACOLLECT_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") + + if(VCPKG_TARGET_IS_WINDOWS) + file(INSTALL ${DATACOLLECT_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib") + file(INSTALL ${DATACOLLECT_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") + file(INSTALL ${DATACOLLECT_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.lib") + file(INSTALL ${DATACOLLECT_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll") + elseif(VCPKG_TARGET_IS_LINUX) + file(INSTALL ${DATACOLLECT_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.so") + file(INSTALL ${DATACOLLECT_SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.so") + endif() + +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "Copyright By Shanghai Futures Information Technology Co.,Ltd") diff --git a/ports/ctp/vcpkg.json b/ports/ctp/vcpkg.json new file mode 100644 index 00000000000000..640df906dcf762 --- /dev/null +++ b/ports/ctp/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "ctp", + "version-string": "6.6.1_P1_20210406_se", + "port-version": 1, + "description": "The Comprehensive Transaction Platform (CTP) is a future brokerage management system developed specially for futures companies. CTP API client library allows users to connect to CTP gateway for algorithmic trading.", + "homepage": "http://www.sfit.com.cn/index.htm", + "features": { + "datacollect": { + "description": "Data collect support of CTP" + } + } +} diff --git a/ports/ctre/CONTROL b/ports/ctre/CONTROL deleted file mode 100644 index 1dfd8f0946d842..00000000000000 --- a/ports/ctre/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: ctre -Version: 2.6.4 -Description: A Compile time PCRE (almost) compatible regular expression matcher diff --git a/ports/ctre/portfile.cmake b/ports/ctre/portfile.cmake index d3de402a4e73c5..112ad13d5c8126 100644 --- a/ports/ctre/portfile.cmake +++ b/ports/ctre/portfile.cmake @@ -1,15 +1,20 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO hanickadot/compile-time-regular-expressions - REF v2.6.4 - SHA512 421122787e3220c5c8935e0d80f06b3d9ba953fface3dc7f4a6e1aadf9fa75468394eb0d2b679f263c17f2b849fd191eff9b532c781278d75a9c54a109dd3ecb - HEAD_REF master + REF v3.4.1 + SHA512 a7b44df9c30fb46373e34d8b98fe3ef3fd0486d33ba4d7bbf58a29eef05b22b8c903bf79ae539008a564f46e0bdee3e7700819d8d072c00537f8d175af59be3e + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DCTRE_BUILD_TESTS=OFF + -DCTRE_BUILD_PACKAGE=OFF ) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "share/cmake/ctre") -# Install header files -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ctre RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ctre/vcpkg.json b/ports/ctre/vcpkg.json new file mode 100644 index 00000000000000..724d2c9b167fa5 --- /dev/null +++ b/ports/ctre/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "ctre", + "version-semver": "3.4.1", + "description": "A Compile time PCRE (almost) compatible regular expression matcher", + "homepage": "https://github.com/hanickadot/compile-time-regular-expressions", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/cub/CONTROL b/ports/cub/CONTROL deleted file mode 100644 index 7c62c25a2dbfd1..00000000000000 --- a/ports/cub/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cub -Version: 1.8.0 -Description: CUB is a flexible library of cooperative threadblock primitives and other utilities for CUDA kernel programming -Build-Depends: cuda diff --git a/ports/cub/portfile.cmake b/ports/cub/portfile.cmake index 302bfb706e6cad..d15c623f8b643e 100644 --- a/ports/cub/portfile.cmake +++ b/ports/cub/portfile.cmake @@ -1,12 +1,11 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO NVlabs/cub - REF v1.8.0 - SHA512 c4ba51ca4e369c8ef87bc411aa011470478fcc2526b667f088e9ac8c62e6532dc2368e869f5147b56f22b3e8718c7276434c3294d9d67cb3a92c700d163e8fa7 + REF 7cdf6dfc7ed60e4f44d025b84ea8260755f298e6 #v1.12.0 + SHA512 aff3ba375a33844efdc57f8ba190e8880db6247bc1245340b2fe87f8933d3abfcbc7dcdffffd45cf00db4981cd2e37029061fca7161554a4c7c779a7d414aada HEAD_REF master ) file(COPY ${SOURCE_PATH}/cub/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/cub) -configure_file(${SOURCE_PATH}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/cub/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/cub/vcpkg.json b/ports/cub/vcpkg.json new file mode 100644 index 00000000000000..85f29e6fb1fa9c --- /dev/null +++ b/ports/cub/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "cub", + "version": "1.12.0", + "description": "CUB is a flexible library of cooperative threadblock primitives and other utilities for CUDA kernel programming", + "homepage": "https://github.com/NVIDIA/cub", + "dependencies": [ + "cuda" + ] +} diff --git a/ports/cuda/CONTROL b/ports/cuda/CONTROL deleted file mode 100644 index 271869e8b5a6df..00000000000000 --- a/ports/cuda/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: cuda -Version: 9.0 -Description: A parallel computing platform and programming model \ No newline at end of file diff --git a/ports/cuda/portfile.cmake b/ports/cuda/portfile.cmake index 7cc1773dbbc37a..a4b202cd9b1a18 100644 --- a/ports/cuda/portfile.cmake +++ b/ports/cuda/portfile.cmake @@ -1,47 +1,13 @@ -# Due to the complexity involved, this package doesn't install CUDA. It instead verifies that CUDA is installed. +# This package doesn't install CUDA. It instead verifies that CUDA is installed. # Other packages can depend on this package to declare a dependency on CUDA. # If this package is installed, we assume that CUDA is properly installed. -find_program(NVCC - NAMES nvcc nvcc.exe - PATHS - ENV CUDA_PATH - ENV CUDA_BIN_PATH - PATH_SUFFIXES bin bin64 - DOC "Toolkit location." - NO_DEFAULT_PATH - ) +#note: this port must be kept in sync with CUDNN and NCCL ports: every time one is upgraded, the other must be too -set(error_code 1) -if (NVCC) - execute_process( - COMMAND ${NVCC} --version - OUTPUT_VARIABLE NVCC_OUTPUT - RESULT_VARIABLE error_code) -endif() +include(${CMAKE_CURRENT_LIST_DIR}/vcpkg_find_cuda.cmake) -set(CUDA_REQUIRED_VERSION "V9.0.0") +vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT) -if (error_code) - message(FATAL_ERROR "Could not find CUDA. Before continuing, please download and install CUDA (${CUDA_REQUIRED_VERSION} or higher) from:" - "\n https://developer.nvidia.com/cuda-downloads\n" - "\nAlso ensure vcpkg has been rebuilt with the latest version (v0.0.104 or later)") -endif() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg_find_cuda.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -# Sample output: -# NVIDIA (R) Cuda compiler driver -# Copyright (c) 2005-2016 NVIDIA Corporation -# Built on Sat_Sep__3_19:05:48_CDT_2016 -# Cuda compilation tools, release 8.0, V8.0.44 -string(REGEX MATCH "V([0-9]+)\\.([0-9]+)\\.([0-9]+)" CUDA_VERSION ${NVCC_OUTPUT}) -message(STATUS "Found CUDA ${CUDA_VERSION}") -set(CUDA_VERSION_MAJOR ${CMAKE_MATCH_1}) -#set(CUDA_VERSION_MINOR ${CMAKE_MATCH_2}) -#set(CUDA_VERSION_PATCH ${CMAKE_MATCH_3}) - -if (CUDA_VERSION_MAJOR LESS 9) - message(FATAL_ERROR "CUDA ${CUDA_VERSION} but ${CUDA_REQUIRED_VERSION} is required. Please download and install a more recent version of CUDA from:" - "\n https://developer.nvidia.com/cuda-downloads\n") -endif() - -SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/cuda/vcpkg.json b/ports/cuda/vcpkg.json new file mode 100644 index 00000000000000..a448794d30090d --- /dev/null +++ b/ports/cuda/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cuda", + "version-string": "10.1", + "port-version": 8, + "description": "A parallel computing platform and programming model", + "homepage": "https://developer.nvidia.com/cuda-toolkit" +} diff --git a/ports/cuda/vcpkg_find_cuda.cmake b/ports/cuda/vcpkg_find_cuda.cmake new file mode 100644 index 00000000000000..64b7585404c89f --- /dev/null +++ b/ports/cuda/vcpkg_find_cuda.cmake @@ -0,0 +1,93 @@ +function(vcpkg_find_cuda) + cmake_parse_arguments(PARSE_ARGV 0 vfc "" "OUT_CUDA_TOOLKIT_ROOT;OUT_CUDA_VERSION" "") + + if(NOT vfc_OUT_CUDA_TOOLKIT_ROOT) + message(FATAL_ERROR "vcpkg_find_cuda() requres an OUT_CUDA_TOOLKIT_ROOT argument") + endif() + + set(CUDA_REQUIRED_VERSION "10.1.0") + + set(CUDA_PATHS + ENV CUDA_PATH + ENV CUDA_HOME + ENV CUDA_BIN_PATH + ENV CUDA_TOOLKIT_ROOT_DIR) + + if (VCPKG_TARGET_IS_WINDOWS) + find_program(NVCC + NAMES nvcc.exe + PATHS + ${CUDA_PATHS} + PATH_SUFFIXES bin bin64 + DOC "Toolkit location." + NO_DEFAULT_PATH + ) + else() + if (VCPKG_TARGET_IS_LINUX) + set(platform_base "/usr/local/cuda-") + else() + set(platform_base "/Developer/NVIDIA/CUDA-") + endif() + + file(GLOB possible_paths "${platform_base}*") + set(FOUND_PATH ) + foreach (p ${possible_paths}) + # Extract version number from end of string + string(REGEX MATCH "[0-9][0-9]?\\.[0-9]$" p_version ${p}) + if (IS_DIRECTORY ${p} AND p_version) + if (p_version VERSION_GREATER_EQUAL CUDA_REQUIRED_VERSION) + set(FOUND_PATH ${p}) + break() + endif() + endif() + endforeach() + + find_program(NVCC + NAMES nvcc + PATHS + ${CUDA_PATHS} + PATHS ${FOUND_PATH} + PATH_SUFFIXES bin bin64 + DOC "Toolkit location." + NO_DEFAULT_PATH + ) + endif() + + set(error_code 1) + if (NVCC) + execute_process( + COMMAND ${NVCC} --version + OUTPUT_VARIABLE NVCC_OUTPUT + RESULT_VARIABLE error_code) + endif() + + + if (error_code) + message(STATUS "Executing ${NVCC} --version resulted in error: ${error_code}") + message(FATAL_ERROR "Could not find CUDA. Before continuing, please download and install CUDA (v${CUDA_REQUIRED_VERSION} or higher) from:" + "\n https://developer.nvidia.com/cuda-downloads\n") + endif() + + # Sample output: + # NVIDIA (R) Cuda compiler driver + # Copyright (c) 2005-2016 NVIDIA Corporation + # Built on Sat_Sep__3_19:05:48_CDT_2016 + # Cuda compilation tools, release 8.0, V8.0.44 + string(REGEX MATCH "V([0-9]+)\\.([0-9]+)\\.([0-9]+)" CUDA_VERSION ${NVCC_OUTPUT}) + message(STATUS "Found CUDA ${CUDA_VERSION}") + set(CUDA_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(CUDA_VERSION_MINOR "${CMAKE_MATCH_2}") + set(CUDA_VERSION_MAJOR_MINOR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}") + + if (CUDA_VERSION_MAJOR_MINOR VERSION_LESS CUDA_REQUIRED_VERSION) + message(FATAL_ERROR "CUDA v${CUDA_VERSION_MAJOR_MINOR} found, but v${CUDA_REQUIRED_VERSION} is required. Please download and install a more recent version of CUDA from:" + "\n https://developer.nvidia.com/cuda-downloads\n") + endif() + + get_filename_component(CUDA_TOOLKIT_ROOT "${NVCC}" DIRECTORY) + get_filename_component(CUDA_TOOLKIT_ROOT "${CUDA_TOOLKIT_ROOT}" DIRECTORY) + set(${vfc_OUT_CUDA_TOOLKIT_ROOT} "${CUDA_TOOLKIT_ROOT}" PARENT_SCOPE) + if(DEFINED vfc_OUT_CUDA_VERSION) + set(${vfc_OUT_CUDA_VERSION} "${CUDA_VERSION_MAJOR_MINOR}" PARENT_SCOPE) + endif() +endfunction() diff --git a/ports/cudnn/FindCUDNN.cmake b/ports/cudnn/FindCUDNN.cmake new file mode 100644 index 00000000000000..4e013bca705da4 --- /dev/null +++ b/ports/cudnn/FindCUDNN.cmake @@ -0,0 +1,103 @@ +# Distributed under the OSI-approved BSD 3-Clause License. + +#.rst: +# FindCUDNN +# -------- +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module will set the following variables in your project:: +# +# ``CUDNN_FOUND`` +# True if CUDNN found on the local system +# +# ``CUDNN_INCLUDE_DIRS`` +# Location of CUDNN header files. +# +# ``CUDNN_LIBRARIES`` +# The CUDNN libraries. +# +# ``CuDNN::CuDNN`` +# The CUDNN target +# + +include(FindPackageHandleStandardArgs) + +find_path(CUDNN_INCLUDE_DIR NAMES cudnn.h cudnn_v8.h cudnn_v7.h + HINTS $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} /usr/include + PATH_SUFFIXES cuda/include include) +find_library(CUDNN_LIBRARY NAMES cudnn cudnn8 cudnn7 + HINTS $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} /usr/lib/x86_64-linux-gnu/ + PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64 cuda/lib/x64) +if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn.h CUDNN_HEADER_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_v8.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn_v8.h CUDNN_HEADER_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_v7.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn_v7.h CUDNN_HEADER_CONTENTS) +endif() +if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version_v8.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version_v8.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version_v7.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version_v7.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +endif() +if(CUDNN_HEADER_CONTENTS) + string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)" + _CUDNN_VERSION_MAJOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1" + _CUDNN_VERSION_MAJOR "${_CUDNN_VERSION_MAJOR}") + string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)" + _CUDNN_VERSION_MINOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1" + _CUDNN_VERSION_MINOR "${_CUDNN_VERSION_MINOR}") + string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)" + _CUDNN_VERSION_PATCH "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1" + _CUDNN_VERSION_PATCH "${_CUDNN_VERSION_PATCH}") + if(NOT _CUDNN_VERSION_MAJOR) + set(_CUDNN_VERSION "?") + else() + set(_CUDNN_VERSION "${_CUDNN_VERSION_MAJOR}.${_CUDNN_VERSION_MINOR}.${_CUDNN_VERSION_PATCH}") + endif() +endif() + +set(CUDNN_INCLUDE_DIRS ${CUDNN_INCLUDE_DIR}) +set(CUDNN_LIBRARIES ${CUDNN_LIBRARY}) +mark_as_advanced(CUDNN_LIBRARY CUDNN_INCLUDE_DIR) + +find_package_handle_standard_args(CUDNN + REQUIRED_VARS CUDNN_INCLUDE_DIR CUDNN_LIBRARY + VERSION_VAR CUDNN_VERSION +) + +if(WIN32) + set(CUDNN_DLL_DIR ${CUDNN_INCLUDE_DIR}) + list(TRANSFORM CUDNN_DLL_DIR APPEND "/../bin") + find_file(CUDNN_LIBRARY_DLL NAMES cudnn64_${CUDNN_VERSION_MAJOR}.dll PATHS ${CUDNN_DLL_DIR}) +endif() + +if( CUDNN_FOUND AND NOT TARGET CuDNN::CuDNN ) + if( EXISTS "${CUDNN_LIBRARY_DLL}" ) + add_library( CuDNN::CuDNN SHARED IMPORTED ) + set_target_properties( CuDNN::CuDNN PROPERTIES + IMPORTED_LOCATION "${CUDNN_LIBRARY_DLL}" + IMPORTED_IMPLIB "${CUDNN_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CUDNN_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + else() + add_library( CuDNN::CuDNN UNKNOWN IMPORTED ) + set_target_properties( CuDNN::CuDNN PROPERTIES + IMPORTED_LOCATION "${CUDNN_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CUDNN_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + endif() +endif() diff --git a/ports/cudnn/portfile.cmake b/ports/cudnn/portfile.cmake new file mode 100644 index 00000000000000..5fd95634c40a3e --- /dev/null +++ b/ports/cudnn/portfile.cmake @@ -0,0 +1,76 @@ +if(VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "This port is only for Windows Desktop or Linux") +endif() + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + message(FATAL_ERROR "This port is only for x64 architectures") +endif() + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +set(MINIMUM_CUDNN_VERSION "7.6.5") + +include(${CURRENT_INSTALLED_DIR}/share/cuda/vcpkg_find_cuda.cmake) +vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT OUT_CUDA_VERSION CUDA_VERSION) + +# Try to find CUDNN if it exists; only download if it doesn't exist +find_path(CUDNN_INCLUDE_DIR NAMES cudnn.h cudnn_v8.h cudnn_v7.h + HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} /usr/include + PATH_SUFFIXES cuda/include include) +message(STATUS "CUDNN_INCLUDE_DIR: ${CUDNN_INCLUDE_DIR}") +find_library(CUDNN_LIBRARY NAMES cudnn cudnn8 cudnn7 + HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} /usr/lib/x86_64-linux-gnu/ + PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64 cuda/lib/x64) +message(STATUS "CUDNN_LIBRARY: ${CUDNN_LIBRARY}") +if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn.h CUDNN_HEADER_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_v8.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn_v8.h CUDNN_HEADER_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_v7.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn_v7.h CUDNN_HEADER_CONTENTS) +endif() +if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version_v8.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version_v8.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version_v7.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version_v7.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +endif() +if(CUDNN_HEADER_CONTENTS) + string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)" + _CUDNN_VERSION_MAJOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1" + _CUDNN_VERSION_MAJOR "${_CUDNN_VERSION_MAJOR}") + string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)" + _CUDNN_VERSION_MINOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1" + _CUDNN_VERSION_MINOR "${_CUDNN_VERSION_MINOR}") + string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)" + _CUDNN_VERSION_PATCH "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1" + _CUDNN_VERSION_PATCH "${_CUDNN_VERSION_PATCH}") + if(NOT _CUDNN_VERSION_MAJOR) + set(_CUDNN_VERSION "?") + else() + set(_CUDNN_VERSION "${_CUDNN_VERSION_MAJOR}.${_CUDNN_VERSION_MINOR}.${_CUDNN_VERSION_PATCH}") + endif() +endif() + +if (CUDNN_INCLUDE_DIR AND CUDNN_LIBRARY AND _CUDNN_VERSION VERSION_GREATER_EQUAL MINIMUM_CUDNN_VERSION) + message(STATUS "Found CUDNN ${_CUDNN_VERSION} located on system: (include ${CUDNN_INCLUDE_DIR} lib: ${CUDNN_LIBRARY})") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +elseif(VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Please download CUDNN from official sources (such as https://developer.nvidia.com/rdp/cudnn-download ) and extract the zip into your CUDA_TOOLKIT_ROOT (${CUDA_TOOLKIT_ROOT}). (For example: tar.exe -xvf cudnn-11.2-windows-x64-v8.1.1.33.zip --strip 1 --directory \"${CUDA_TOOLKIT_ROOT}\"") +else() + message(FATAL_ERROR "Please install CUDNN using your system package manager (the same way you installed CUDA). For example: apt install libcudnn8-dev.") +endif() + +file(INSTALL "${CURRENT_PORT_DIR}/FindCUDNN.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/ports/cudnn/usage b/ports/cudnn/usage new file mode 100644 index 00000000000000..f528e015469108 --- /dev/null +++ b/ports/cudnn/usage @@ -0,0 +1,10 @@ +The package cudnn provides CMake variables: + + find_package(CUDNN REQUIRED) + target_link_libraries(main PRIVATE ${CUDNN_LIBRARIES}) + target_include_directories(main PRIVATE ${CUDNN_INCLUDE_DIRS}) + +Or the following CMake target: + + find_package(CUDNN REQUIRED) + target_link_libraries(main PRIVATE CuDNN::CuDNN) diff --git a/ports/cudnn/vcpkg-cmake-wrapper.cmake b/ports/cudnn/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..5a69edec56201c --- /dev/null +++ b/ports/cudnn/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(CUDNN_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${CUDNN_PREV_MODULE_PATH}) diff --git a/ports/cudnn/vcpkg.json b/ports/cudnn/vcpkg.json new file mode 100644 index 00000000000000..7c52ccc7ac8219 --- /dev/null +++ b/ports/cudnn/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "cudnn", + "version": "7.6.5", + "port-version": 4, + "description": "NVIDIA's cuDNN deep neural network acceleration library.", + "homepage": "https://developer.nvidia.com/cudnn", + "supports": "(windows | linux) & x64", + "dependencies": [ + "cuda" + ] +} diff --git a/ports/cunit/CONTROL b/ports/cunit/CONTROL deleted file mode 100644 index 93049499217a73..00000000000000 --- a/ports/cunit/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cunit -Version: 2.1.3-2 -Homepage: https://sourceforge.net/projects/cunit/ -Description: CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces diff --git a/ports/cunit/portfile.cmake b/ports/cunit/portfile.cmake index 7e4a977af13b41..88b9be6b5bac40 100644 --- a/ports/cunit/portfile.cmake +++ b/ports/cunit/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CUnit-2.1-3) -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit-2.1-3.tar.bz2" - FILENAME "CUnit-2.1-3.tar.bz2" - SHA512 547b417109332446dfab8fda17bf4ccd2da841dc93f824dc90a20635bcf1fb80fb2176500d8a0906940f3f3d3e2f77b2d70a71090c9ab84ad9af43f3582bc487 +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO cunit/CUnit + REF 2.1-3 + FILENAME "CUnit-2.1-3.tar.bz2" + SHA512 547b417109332446dfab8fda17bf4ccd2da841dc93f824dc90a20635bcf1fb80fb2176500d8a0906940f3f3d3e2f77b2d70a71090c9ab84ad9af43f3582bc487 ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -18,6 +16,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cunit RENAME copyright) - vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cunit/vcpkg.json b/ports/cunit/vcpkg.json new file mode 100644 index 00000000000000..c3b2d3032e7128 --- /dev/null +++ b/ports/cunit/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cunit", + "version-string": "2.1.3", + "port-version": 7, + "description": "CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces", + "homepage": "https://sourceforge.net/projects/cunit/" +} diff --git a/ports/curl/0001_cmake.patch b/ports/curl/0001_cmake.patch deleted file mode 100644 index 33ede7b909f93a..00000000000000 --- a/ports/curl/0001_cmake.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake -index 84822db..0d62194 100644 ---- a/CMake/FindLibSSH2.cmake -+++ b/CMake/FindLibSSH2.cmake -@@ -12,7 +12,7 @@ endif() - find_path(LIBSSH2_INCLUDE_DIR libssh2.h - ) - --find_library(LIBSSH2_LIBRARY NAMES ssh2 -+find_library(LIBSSH2_LIBRARY NAMES ssh2 libssh2 - ) - - if(LIBSSH2_INCLUDE_DIR) diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch index 565903ad2cf449..c1572624a3775f 100644 --- a/ports/curl/0002_fix_uwp.patch +++ b/ports/curl/0002_fix_uwp.patch @@ -1,92 +1,16 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 38b7b7d..5b3d33e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -897,7 +897,9 @@ check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) - check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME) +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 62b7b33..8a4bd71 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -107,6 +107,10 @@ endif() - # symbol exists in win32, but function does not. --if(WIN32) -+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -+ add_definitions(-D_WIN32_WINNT=0x0A00 -DHAVE_STRUCT_POLLFD -D_WINSOCK_DEPRECATED_NO_WARNINGS) -+elseif(WIN32) - if(ENABLE_INET_PTON) - check_function_exists(inet_pton HAVE_INET_PTON) - # _WIN32_WINNT_VISTA (0x0600) -diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c -index 8337c72..41867b2 100644 ---- a/lib/curl_gethostname.c -+++ b/lib/curl_gethostname.c -@@ -21,6 +21,7 @@ - ***************************************************************************/ - - #include "curl_setup.h" -+#include "curl/curl.h" - - #include "curl_gethostname.h" - -@@ -64,9 +65,10 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) - #ifdef DEBUGBUILD + target_link_libraries(${LIB_NAME} ${CURL_LIBS}) - /* Override host name when environment variable CURL_GETHOSTNAME is set */ -- const char *force_hostname = getenv("CURL_GETHOSTNAME"); -+ char *force_hostname = curl_getenv("CURL_GETHOSTNAME"); - if(force_hostname) { - strncpy(name, force_hostname, namelen); -+ free(force_hostname); - err = 0; - } - else { -diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c -index e7060eb..9cd76f7 100644 ---- a/lib/curl_ntlm_core.c -+++ b/lib/curl_ntlm_core.c -@@ -726,10 +726,11 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, - - /* Calculate the timestamp */ - #ifdef DEBUGBUILD -- char *force_timestamp = getenv("CURL_FORCETIME"); -- if(force_timestamp) -+ char *force_timestamp = curl_getenv("CURL_FORCETIME"); -+ if(force_timestamp) { - tw = CURL_OFF_T_C(11644473600) * 10000000; -- else -+ free(force_timestamp); -+ } - #endif - tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; - -diff --git a/lib/ftp.c b/lib/ftp.c -index 825aaaa..3b96670 100644 ---- a/lib/ftp.c -+++ b/lib/ftp.c -@@ -4262,7 +4262,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) - /* prevpath is "raw" so we convert the input path before we compare the - strings */ - size_t dlen; -- char *path; -+ char *path = NULL; - CURLcode result = - Curl_urldecode(conn->data, ftp->path, 0, &path, &dlen, TRUE); - if(result) { -diff --git a/lib/rand.c b/lib/rand.c -index 6ee45fe..b2d712d 100644 ---- a/lib/rand.c -+++ b/lib/rand.c -@@ -44,7 +44,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) - static bool seeded = FALSE; ++if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS) ++endif() ++ + if(WIN32) + add_definitions(-D_USRDLL) + endif() - #ifdef CURLDEBUG -- char *force_entropy = getenv("CURL_ENTROPY"); -+ char *force_entropy = curl_getenv("CURL_ENTROPY"); - if(force_entropy) { - if(!seeded) { - unsigned int seed = 0; -@@ -58,6 +58,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) - else - randseed++; - *rnd = randseed; -+ free(force_entropy); - return CURLE_OK; - } - #endif diff --git a/ports/curl/0003_fix_libraries.patch b/ports/curl/0003_fix_libraries.patch deleted file mode 100644 index a06e7b544aa034..00000000000000 --- a/ports/curl/0003_fix_libraries.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 490cc19ef8..23fe34f614 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -330,7 +330,7 @@ if(CMAKE_USE_WINSSL) - set(SSL_ENABLED ON) - set(USE_SCHANNEL ON) # Windows native SSL/TLS support - set(USE_WINDOWS_SSPI ON) # CMAKE_USE_WINSSL implies CURL_WINDOWS_SSPI -- list(APPEND CURL_LIBS "crypt32") -+ list(APPEND CURL_LIBS "crypt32" "advapi32") - endif() - if(CURL_WINDOWS_SSPI) - set(USE_WINDOWS_SSPI ON) diff --git a/ports/curl/0004_nghttp2_staticlib.patch b/ports/curl/0004_nghttp2_staticlib.patch deleted file mode 100644 index 69c1854f965a93..00000000000000 --- a/ports/curl/0004_nghttp2_staticlib.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 490cc19..51c0a92 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -388,6 +388,9 @@ if(USE_NGHTTP2) - find_package(NGHTTP2 REQUIRED) - include_directories(${NGHTTP2_INCLUDE_DIRS}) - list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES}) -+ if(NOT BUILD_SHARED_LIBS) -+ add_definitions(-DNGHTTP2_STATICLIB) -+ endif() - endif() - - if(NOT CURL_DISABLE_LDAP) diff --git a/ports/curl/0005_remove_imp_suffix.patch b/ports/curl/0005_remove_imp_suffix.patch index 356af2d52987b8..83ec1051336796 100644 --- a/ports/curl/0005_remove_imp_suffix.patch +++ b/ports/curl/0005_remove_imp_suffix.patch @@ -1,13 +1,14 @@ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index eca9a8a..6f72955 100644 +index 1d71e14..62b7b33 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt -@@ -97,7 +97,7 @@ endif() - set_target_properties(${LIB_NAME} PROPERTIES PREFIX "") - set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "") +@@ -128,7 +128,7 @@ if(CURL_HAS_LTO) + INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE) + endif() -if(WIN32) +if(WIN32 AND 0) if(BUILD_SHARED_LIBS) - # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib" - set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib") + if(MSVC) + # Add "_imp" as a suffix before the extension to avoid conflicting with + # the statically linked "libcurl.lib" diff --git a/ports/curl/0006_fix_tool_depends.patch b/ports/curl/0006_fix_tool_depends.patch new file mode 100644 index 00000000000000..a918b08e2d752c --- /dev/null +++ b/ports/curl/0006_fix_tool_depends.patch @@ -0,0 +1,22 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 26e3cfe..74d00dd 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -61,6 +61,8 @@ if(MSVC) + list(APPEND CURL_FILES curl.rc) + endif() + ++find_package(ZLIB REQUIRED) ++ + # CURL_FILES comes from Makefile.inc + add_executable( + ${EXE_NAME} +@@ -91,7 +93,7 @@ include_directories( + ) + + #Build curl executable +-target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS}) ++target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS} ZLIB::ZLIB) + + ################################################################################ + diff --git a/ports/curl/0007_disable_tool_export_curl_target.patch b/ports/curl/0007_disable_tool_export_curl_target.patch new file mode 100644 index 00000000000000..689104a938cc18 --- /dev/null +++ b/ports/curl/0007_disable_tool_export_curl_target.patch @@ -0,0 +1,18 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 74d00dd..5838805 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -103,8 +103,8 @@ target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS} ZLIB::ZLIB) + + #INCLUDE(ModuleInstall OPTIONAL) + +-install(TARGETS ${EXE_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) +-export(TARGETS ${EXE_NAME} +- APPEND FILE ${PROJECT_BINARY_DIR}/curl-target.cmake +- NAMESPACE ${PROJECT_NAME}:: +-) ++install(TARGETS ${EXE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) ++#export(TARGETS ${EXE_NAME} ++# APPEND FILE ${PROJECT_BINARY_DIR}/curl-target.cmake ++# NAMESPACE ${PROJECT_NAME}:: ++#) diff --git a/ports/curl/0011_fix_static_build.patch b/ports/curl/0011_fix_static_build.patch new file mode 100644 index 00000000000000..a50fa287f54cfe --- /dev/null +++ b/ports/curl/0011_fix_static_build.patch @@ -0,0 +1,13 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 8a4bd71..1927fb0 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -111,7 +111,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS) + endif() + +-if(WIN32) ++if(WIN32 AND BUILD_SHARED_LIBS) + add_definitions(-D_USRDLL) + endif() + diff --git a/ports/curl/0012-fix-dependency-idn2.patch b/ports/curl/0012-fix-dependency-idn2.patch new file mode 100644 index 00000000000000..9388f91a0b2497 --- /dev/null +++ b/ports/curl/0012-fix-dependency-idn2.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9f6de81..6702845 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -632,6 +632,9 @@ endif() + option(USE_LIBIDN2 "Use libidn2 for IDN support" ON) + set(HAVE_LIBIDN2 OFF) + if(USE_LIBIDN2) ++ set(HAVE_LIBIDN2 TRUE) ++ list(APPEND CURL_LIBS ${LIBIDN2_LIBRARIES}) ++elseif(0) + check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2) + endif() + diff --git a/ports/curl/0020-fix-pc-file.patch b/ports/curl/0020-fix-pc-file.patch new file mode 100644 index 00000000000000..c9967ac2c22c92 --- /dev/null +++ b/ports/curl/0020-fix-pc-file.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b2e428..ea430f4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1462,7 +1462,26 @@ set(includedir "\${prefix}/include") + set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}") + set(LIBCURL_LIBS "") + set(libdir "${CMAKE_INSTALL_PREFIX}/lib") +-foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) ++function(flatten input output) ++ set(output_libs "${${output}}") ++ set(input_libs "${${input}}") ++ while(input_libs) ++ list(POP_BACK input_libs lib) ++ if(NOT "${lib}" IN_LIST output_libs) ++ if(TARGET "${lib}") ++ get_target_property(link_libs "${lib}" INTERFACE_LINK_LIBRARIES) ++ if(link_libs) ++ flatten(link_libs output_libs) ++ endif() ++ endif() ++ list(PREPEND output_libs "${lib}") ++ endif() ++ endwhile() ++ set("${output}" "${output_libs}" PARENT_SCOPE) ++endfunction() ++set(CURL_LIBS_FLAT "") ++flatten(CURL_LIBS CURL_LIBS_FLAT) ++foreach(_lib ${CURL_LIBS_FLAT}) + if(TARGET "${_lib}") + set(_libname "${_lib}") + get_target_property(_libtype "${_libname}" TYPE) +@@ -1473,12 +1492,26 @@ foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) + # this information in the .pc file. + continue() + endif() ++ set(_lib NOTFOUND) ++ if(DEFINED CMAKE_BUILD_TYPE) ++ string(TOUPPER "${CMAKE_BUILD_TYPE}" config) ++ get_target_property(_lib "${_libname}" IMPORTED_LOCATION_${config}) ++ endif() ++ if(NOT _lib) + get_target_property(_lib "${_libname}" LOCATION) ++ endif() + if(NOT _lib) + message(WARNING "Bad lib in library list: ${_libname}") + continue() + endif() + endif() ++ if(_lib MATCHES "^(.*)/([^/]*)[.]framework$") ++ if(CMAKE_MATCH_1 IN_LIST CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES) ++ set(_lib "-framework ${CMAKE_MATCH_2}") ++ else() ++ set(_lib "-framework ${_lib}") ++ endif() ++ endif() + if(_lib MATCHES ".*/.*" OR _lib MATCHES "^-") + set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}") + else() diff --git a/ports/curl/0021-normaliz.patch b/ports/curl/0021-normaliz.patch new file mode 100644 index 00000000000000..ca331cf9afdfac --- /dev/null +++ b/ports/curl/0021-normaliz.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d209be..9f6de81 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -638,7 +638,7 @@ endif() + if(WIN32) + option(USE_WIN32_IDN "Use WinIDN for IDN support" OFF) + if(USE_WIN32_IDN) +- list(APPEND CURL_LIBS "Normaliz") ++ list(APPEND CURL_LIBS "normaliz") + set(WANT_IDN_PROTOTYPES ON) + endif() + endif() diff --git a/ports/curl/0022-deduplicate-libs.patch b/ports/curl/0022-deduplicate-libs.patch new file mode 100644 index 00000000000000..bd027d4cb41442 --- /dev/null +++ b/ports/curl/0022-deduplicate-libs.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09d82f1..f0d99e6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1507,6 +1507,7 @@ else() + set(ENABLE_SHARED "no") + set(ENABLE_STATIC "yes") + set(LIBCURL_NO_SHARED "${LIBCURL_LIBS}") ++ set(LIBCURL_LIBS "") + endif() + # "a" (Linux) or "lib" (Windows) + string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}") +diff --git a/curl-config.in b/curl-config.in +index 8b4a29a..e756ae8 100644 +--- a/curl-config.in ++++ b/curl-config.in +@@ -172,7 +172,7 @@ while test $# -gt 0; do + + --static-libs) + if test "X@ENABLE_STATIC@" != "Xno" ; then +- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ ++ echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_NO_SHARED@ + else + echo "curl was built with static libraries disabled" >&2 + exit 1 diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL deleted file mode 100644 index 72d5d3e669be63..00000000000000 --- a/ports/curl/CONTROL +++ /dev/null @@ -1,49 +0,0 @@ -Source: curl -Version: 7.65.2-1 -Build-Depends: zlib -Homepage: https://github.com/curl/curl -Description: A library for transferring data with URLs -Default-Features: ssl - -Feature: tool -Description: Builds curl executable - -Feature: non-http -Description: Enables protocols beyond HTTP/HTTPS/HTTP2 - -Feature: http2 -Build-Depends: nghttp2, curl[ssl] -Description: HTTP2 support - -Feature: ssl -Build-Depends: curl[openssl] (!windows&!osx), curl[winssl] (windows), curl[sectransp] (osx) -Description: Default SSL backend - -Feature: ssh -Build-Depends: curl[openssl], libssh2, curl[non-http] -Description: SSH support via libssh2 - -# SSL backends -Feature: openssl -Build-Depends: openssl -Description: SSL support (OpenSSL) - -Feature: winssl -Description: SSL support (Secure Channel / "WinSSL") - -Feature: mbedtls -Build-Depends: mbedtls -Description: SSL support (mbedTLS) - -Feature: sectransp -Description: SSL support (sectransp) - -Feature: c-ares -Build-Depends: c-ares -Description: c-ares support - -Feature:sspi -Description: SSPI support - -Feature: brotli -Description: brotli support (brotli) \ No newline at end of file diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 49d4d12e6dd208..c92abb39e7b915 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -1,192 +1,144 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF curl-7_65_2 - SHA512 8e06377a6d8837a4c2cd96f978f0ac848b9472500fd25983bb1f9e5f52d9d6f7ff0c71d443587a979cf80fd19412bb64b9362b774cf91e02479fdfad7e085b16 + REF 8e82f2a04a238c54ba91e553e9a8452e6d405965 #curl-7_79_0 + SHA512 0a13bc9bf85ddbf958661f7f197aff9b57c4218ce9fa81cf419f97f2cebf7df0ded9f47b55b5e9b1615065145c5f5059c2e7d986240297cb5970b3b4a39fa031 HEAD_REF master PATCHES - 0001_cmake.patch 0002_fix_uwp.patch - 0003_fix_libraries.patch - 0004_nghttp2_staticlib.patch 0005_remove_imp_suffix.patch + 0006_fix_tool_depends.patch + 0007_disable_tool_export_curl_target.patch + 0011_fix_static_build.patch + 0012-fix-dependency-idn2.patch + 0020-fix-pc-file.patch + 0021-normaliz.patch # for mingw on case-sensitive file system + 0022-deduplicate-libs.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) -# Support HTTP2 TLS Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. -set(HTTP2_OPTIONS) -if("http2" IN_LIST FEATURES) - set(HTTP2_OPTIONS -DUSE_NGHTTP2=ON) -endif() - -# SSL -set(USE_OPENSSL OFF) -if("openssl" IN_LIST FEATURES) - set(USE_OPENSSL ON) -endif() - -set(USE_WINSSL OFF) -if("winssl" IN_LIST FEATURES) - if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "winssl is not supported on non-Windows platforms") +# schannel will enable sspi, but sspi do not support uwp +foreach(feature IN ITEMS "schannel" "sspi" "tool" "winldap") + if(feature IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "Feature ${feature} is not supported on UWP.") endif() - set(USE_WINSSL ON) -endif() +endforeach() -set(USE_MBEDTLS OFF) -if("mbedtls" IN_LIST FEATURES) - set(USE_MBEDTLS ON) +if("sectransp" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "sectransp is not supported on non-Apple platforms") endif() -set(USE_SECTRANSP OFF) -set(SECTRANSP_OPTIONS) -if("sectransp" IN_LIST FEATURES) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")) - message(FATAL_ERROR "sectransp is not supported on non-Apple platforms") +foreach(feature IN ITEMS "winldap" "winidn") + if(feature IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature ${feature} is not supported on non-Windows platforms.") endif() - set(USE_SECTRANSP ON) - set(SECTRANSP_OPTIONS - -DCURL_CA_PATH=none - ) -endif() - - -# SSH -set(USE_LIBSSH2 OFF) -if("ssh" IN_LIST FEATURES) - set(USE_LIBSSH2 ON) -endif() - -# HTTP/HTTPS only -# Note that `HTTP_ONLY` curl option disables everything including HTTPS, which is not an option. -set(USE_HTTP_ONLY ON) -if("non-http" IN_LIST FEATURES) - set(USE_HTTP_ONLY OFF) -endif() - -# curl exe -set(BUILD_CURL_EXE OFF) -if("tool" IN_LIST FEATURES) - set(BUILD_CURL_EXE ON) -endif() - -# c-ares -set(USE_ARES OFF) -if("c-ares" IN_LIST FEATURES) - set(USE_ARES ON) -endif() +endforeach() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + # Support HTTP2 TLS Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. + http2 USE_NGHTTP2 + openssl CMAKE_USE_OPENSSL + mbedtls CMAKE_USE_MBEDTLS + ssh CMAKE_USE_LIBSSH2 + tool BUILD_CURL_EXE + c-ares ENABLE_ARES + sspi CURL_WINDOWS_SSPI + brotli CURL_BROTLI + schannel CMAKE_USE_SCHANNEL + sectransp CMAKE_USE_SECTRANSP + idn2 USE_LIBIDN2 + winidn USE_WIN32_IDN + winldap USE_WIN32_LDAP + INVERTED_FEATURES + non-http HTTP_ONLY + winldap CURL_DISABLE_LDAP # Only WinLDAP support ATM +) -# SSPI -set(USE_WINDOWS_SSPI OFF) -if("sspi" IN_LIST FEATURES) - set(USE_WINDOWS_SSPI ON) +set(OPTIONS_RELEASE "") +set(OPTIONS_DEBUG "") +if("idn2" IN_LIST FEATURES) + x_vcpkg_pkgconfig_get_modules(PREFIX libidn2 MODULES libidn2 LIBS) + list(APPEND OPTIONS_RELEASE "-DLIBIDN2_LIBRARIES=${libidn2_LIBS_RELEASE}") + list(APPEND OPTIONS_DEBUG "-DLIBIDN2_LIBRARIES=${libidn2_LIBS_DEBUG}") endif() -# brotli -set(HAVE_BROTLI OFF) -if("brotli" IN_LIST FEATURES) - set(HAVE_BROTLI ON) +set(SECTRANSP_OPTIONS "") +if("sectransp" IN_LIST FEATURES) + set(SECTRANSP_OPTIONS -DCURL_CA_PATH=none) endif() # UWP targets -set(UWP_OPTIONS) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +set(UWP_OPTIONS "") +if(VCPKG_TARGET_IS_UWP) set(UWP_OPTIONS - -DUSE_WIN32_LDAP=OFF -DCURL_DISABLE_TELNET=ON -DENABLE_IPV6=OFF -DENABLE_UNIX_SOCKETS=OFF ) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} ${UWP_OPTIONS} ${SECTRANSP_OPTIONS} - ${HTTP2_OPTIONS} -DBUILD_TESTING=OFF - -DBUILD_CURL_EXE=${BUILD_CURL_EXE} -DENABLE_MANUAL=OFF -DCURL_STATICLIB=${CURL_STATICLIB} - -DCMAKE_USE_OPENSSL=${USE_OPENSSL} - -DCMAKE_USE_WINSSL=${USE_WINSSL} - -DCMAKE_USE_MBEDTLS=${USE_MBEDTLS} - -DCMAKE_USE_SECTRANSP=${USE_SECTRANSP} - -DCMAKE_USE_LIBSSH2=${USE_LIBSSH2} - -DHTTP_ONLY=${USE_HTTP_ONLY} - -DENABLE_ARES=${USE_ARES} - -DCURL_WINDOWS_SSPI=${USE_WINDOWS_SSPI} - -DCURL_BROTLI=${HAVE_BROTLI} -DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON + -DENABLE_DEBUG=ON + -DCURL_CA_FALLBACK=ON OPTIONS_RELEASE - -DBUILD_CURL_EXE=${BUILD_CURL_EXE} + ${OPTIONS_RELEASE} OPTIONS_DEBUG - -DBUILD_CURL_EXE=OFF - -DENABLE_DEBUG=ON + ${OPTIONS_DEBUG} ) +vcpkg_cmake_install() +vcpkg_copy_pdbs() -vcpkg_install_cmake() - -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/CURL) - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CURL) -elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/curl) - vcpkg_fixup_cmake_targets() -else() - message(FATAL_ERROR "Could not locate the curl config files") +if ("tool" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES curl AUTO_CLEAN) endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -# the native CMAKE_EXECUTABLE_SUFFIX does not work in portfiles, so emulate it -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # Windows - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CURL) -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/curl${EXECUTABLE_SUFFIX}") - file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/curl") - file(RENAME "${CURRENT_PACKAGES_DIR}/bin/curl${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/curl/curl${EXECUTABLE_SUFFIX}") - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/curl) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ "${CURRENT_PACKAGES_DIR}/share/curl/CURLTargets-release.cmake" RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin/curl${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/curl/curl${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") - file(WRITE "${CURRENT_PACKAGES_DIR}/share/curl/CURLTargets-release.cmake" "${RELEASE_MODULE}") - endif() +#Fix install path +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}" "\${prefix}") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "\nprefix=\${prefix}" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../.. && pwd -P)]=]) +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/curl-config") +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_PACKAGES_DIR}" "\${prefix}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "\nprefix=\${prefix}/debug" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../../.. && pwd -P)]=]) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "-lcurl" "-lcurl-d") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "curl." "curl-d.") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/curl-config") endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib OR EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib) - # Because vcpkg only ever installs one or the other, there is no need to have the libraries be different names. - # Using the same name improves compatibility, because downstream projects can always rely on "libcurl.lib" - message(FATAL_ERROR "Curl's import library name should be consistent with the static library name.") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -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) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/curl/curl.h" + "#ifdef CURL_STATICLIB" + "#if 1" + ) endif() -file(READ ${CURRENT_PACKAGES_DIR}/include/curl/curl.h CURL_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "#ifdef CURL_STATICLIB" "#if 1" CURL_H "${CURL_H}") -else() - string(REPLACE "#ifdef CURL_STATICLIB" "#if 0" CURL_H "${CURL_H}") +vcpkg_fixup_pkgconfig() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc" " -lcurl" " -lcurl-d") endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/curl/curl.h "${CURL_H}") - -vcpkg_copy_pdbs() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -vcpkg_test_cmake(PACKAGE_NAME CURL MODULE) +file(INSTALL "${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/curl/usage b/ports/curl/usage deleted file mode 100644 index d43e7112eedbd2..00000000000000 --- a/ports/curl/usage +++ /dev/null @@ -1,5 +0,0 @@ -The package curl is compatible with built-in CMake targets: - - find_package(CURL REQUIRED) - target_link_libraries(main PRIVATE ${CURL_LIBRARIES}) - target_include_directories(main PRIVATE ${CURL_INCLUDE_DIRS}) diff --git a/ports/curl/vcpkg-cmake-wrapper.cmake b/ports/curl/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..955d9353aca299 --- /dev/null +++ b/ports/curl/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,44 @@ +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +cmake_policy(SET CMP0012 NEW) + +_find_package(${ARGS} CONFIG) + +if(TARGET CURL::libcurl) + set(CURL_FOUND TRUE) + + get_target_property(_curl_include_dirs CURL::libcurl INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(_curl_link_libraries CURL::libcurl INTERFACE_LINK_LIBRARIES) + + if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + get_target_property(_curl_location_debug CURL::libcurl IMPORTED_IMPLIB_DEBUG) + get_target_property(_curl_location_release CURL::libcurl IMPORTED_IMPLIB_RELEASE) + endif() + + if(NOT _curl_location_debug AND NOT _curl_location_release) + get_target_property(_curl_location_debug CURL::libcurl IMPORTED_LOCATION_DEBUG) + get_target_property(_curl_location_release CURL::libcurl IMPORTED_LOCATION_RELEASE) + endif() + + if(NOT _curl_link_libraries) + set(_curl_link_libraries) + endif() + + set(CURL_INCLUDE_DIRS "${_curl_include_dirs}") + set(CURL_LIBRARY_DEBUG "${_curl_location_debug}") + set(CURL_LIBRARY_RELEASE "${_curl_location_release}") + + #For builds which rely on CURL_LIBRAR(Y/IES) + include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + select_library_configurations(CURL) + + set(CURL_LIBRARIES ${CURL_LIBRARY} ${_curl_link_libraries}) + set(CURL_VERSION_STRING "${CURL_VERSION}") + + set(_curl_include_dirs) + set(_curl_link_libraries) + set(_curl_location_debug) + set(_curl_location_release) +endif() diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json new file mode 100644 index 00000000000000..bb65d74acc9709 --- /dev/null +++ b/ports/curl/vcpkg.json @@ -0,0 +1,191 @@ +{ + "name": "curl", + "version": "7.79.0", + "description": "A library for transferring data with URLs", + "homepage": "https://github.com/curl/curl", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "default-features": [ + "non-http", + "ssl" + ], + "features": { + "brotli": { + "description": "brotli support (brotli)", + "dependencies": [ + "brotli" + ] + }, + "c-ares": { + "description": "c-ares support", + "dependencies": [ + "c-ares" + ] + }, + "http2": { + "description": "HTTP2 support", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "ssl" + ] + }, + "nghttp2" + ] + }, + "idn": { + "description": "Default IDN support", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "winidn" + ], + "platform": "windows" + }, + { + "name": "curl", + "default-features": false, + "features": [ + "idn2" + ], + "platform": "!windows" + } + ] + }, + "idn2": { + "description": "idn2 support (libidn2)", + "dependencies": [ + "libidn2", + { + "name": "vcpkg-pkgconfig-get-modules", + "host": true + } + ] + }, + "mbedtls": { + "description": "SSL support (mbedTLS)", + "dependencies": [ + "mbedtls" + ] + }, + "non-http": { + "description": "Enables protocols beyond HTTP/HTTPS/HTTP2" + }, + "openssl": { + "description": "SSL support (OpenSSL)", + "dependencies": [ + "openssl" + ] + }, + "schannel": { + "description": "SSL support (Secure Channel)", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "sspi" + ] + } + ] + }, + "sectransp": { + "description": "SSL support (sectransp)" + }, + "ssh": { + "description": "SSH support via libssh2", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "non-http" + ] + }, + { + "name": "curl", + "default-features": false, + "features": [ + "openssl" + ] + }, + "libssh2" + ] + }, + "ssl": { + "description": "Default SSL backend", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "sectransp" + ], + "platform": "osx" + }, + { + "name": "curl", + "default-features": false, + "features": [ + "schannel" + ], + "platform": "(windows & !uwp) | mingw" + }, + { + "name": "curl", + "default-features": false, + "features": [ + "openssl" + ], + "platform": "(uwp | !windows) & !osx & !mingw" + } + ] + }, + "sspi": { + "description": "SSPI support" + }, + "tool": { + "description": "Builds curl executable" + }, + "winidn": { + "description": "WinIDN support" + }, + "winldap": { + "description": "LDAP support (WinLDAP). This feature does not include LDAPS support.", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "non-http" + ] + } + ] + }, + "winssl": { + "description": "Legacy name for schannel", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "schannel" + ] + } + ] + } + } +} diff --git a/ports/curlpp/CONTROL b/ports/curlpp/CONTROL deleted file mode 100644 index 1c6c07f3255739..00000000000000 --- a/ports/curlpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: curlpp -Version: 2018-06-15 -Description: C++ wrapper around libcURL -Build-Depends: curl diff --git a/ports/curlpp/fix-cmake.patch b/ports/curlpp/fix-cmake.patch index 3930b65c27d4ce..a7cd79413eebc6 100644 --- a/ports/curlpp/fix-cmake.patch +++ b/ports/curlpp/fix-cmake.patch @@ -29,7 +29,7 @@ index 8b183a0..a801ae8 100644 -SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES PREFIX "lib") -target_link_libraries(${PROJECT_NAME}_static ${CURL_LIBRARIES} ${CONAN_LIBS}) +SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "lib") -+target_link_libraries(${PROJECT_NAME} ${CURL_LIBRARIES} ${CONAN_LIBS}) ++target_link_libraries(${PROJECT_NAME} CURL::libcurl) +endif() + +target_include_directories(${PROJECT_NAME} PUBLIC $) diff --git a/ports/curlpp/fix-findzliberror.patch b/ports/curlpp/fix-findzliberror.patch new file mode 100644 index 00000000000000..4876d0f25c0519 --- /dev/null +++ b/ports/curlpp/fix-findzliberror.patch @@ -0,0 +1,9 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c42943c..12d402c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,3 +1,4 @@ ++cmake_minimum_required(VERSION 2.8) + project(curlpp) + + diff --git a/ports/curlpp/portfile.cmake b/ports/curlpp/portfile.cmake index aaa9c51ab00d2a..9611908db85c0a 100644 --- a/ports/curlpp/portfile.cmake +++ b/ports/curlpp/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jpbarrette/curlpp @@ -8,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-cmake.patch + fix-findzliberror.patch ) vcpkg_configure_cmake( @@ -17,10 +16,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets( - CONFIG_PATH lib/cmake/${PORT} - TARGET_PATH share/unofficial-${PORT} -) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT} TARGET_PATH share/unofficial-${PORT}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -29,19 +25,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ) - - configure_file( - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - ${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT} - @ONLY - ) endif() -# Handle copyright -configure_file(${SOURCE_PATH}/doc/LICENSE - ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - vcpkg_copy_pdbs() -# CMake integration test -#vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(INSTALL ${SOURCE_PATH}/doc/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}) + diff --git a/ports/curlpp/vcpkg-cmake-wrapper.cmake b/ports/curlpp/vcpkg-cmake-wrapper.cmake index 0bffdc6b4355aa..a7f88cd72cc9d2 100644 --- a/ports/curlpp/vcpkg-cmake-wrapper.cmake +++ b/ports/curlpp/vcpkg-cmake-wrapper.cmake @@ -1,35 +1,5 @@ -_find_package(${ARGS}) - -if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") - if(TARGET unofficial::curlpp::curlpp) - # Fix CURL dependencies. See: - # https://github.com/Microsoft/vcpkg/issues/4312 - - set(_libs "") - - find_package(CURL REQUIRED) - - set(ZLIB_ROOT ${CMAKE_PREFIX_PATH}) # Prefer Zlib installed via `vcpkg` - find_package(ZLIB) - unset(ZLIB_ROOT) - - list(APPEND _libs ${CURL_LIBRARIES} ZLIB::ZLIB) - - find_package(OpenSSL QUIET) - if(OPENSSL_FOUND) - list(APPEND _libs OpenSSL::SSL OpenSSL::Crypto) - endif() - - find_package(Threads REQUIRED) - list(APPEND _libs Threads::Threads) - - if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - list(APPEND _libs Ws2_32 Crypt32) - endif() - - set_target_properties( - unofficial::curlpp::curlpp - PROPERTIES INTERFACE_LINK_LIBRARIES "${_libs}" - ) - endif() -endif() +set(FIND_CURLPP_ARGS ${ARGS}) +include(CMakeFindDependencyMacro) +find_dependency(CURL) + +_find_package(${FIND_CURLPP_ARGS}) diff --git a/ports/curlpp/vcpkg.json b/ports/curlpp/vcpkg.json new file mode 100644 index 00000000000000..9ca5d29edc3770 --- /dev/null +++ b/ports/curlpp/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "curlpp", + "version-string": "2018-06-15", + "port-version": 4, + "description": "C++ wrapper around libcURL", + "dependencies": [ + "curl" + ] +} diff --git a/ports/cute-headers/portfile.cmake b/ports/cute-headers/portfile.cmake new file mode 100644 index 00000000000000..2153db229213bf --- /dev/null +++ b/ports/cute-headers/portfile.cmake @@ -0,0 +1,30 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO RandyGaul/cute_headers + REF 4f765abf4a59660e72f9f49c444371ba373e834b + SHA512 e898520dc668ce9d1f51c748da1c674f9fa0540bac7a0d10a45fde5ebb0ca6573dc5178ce41199a138e3153343b1ff0c589bc7908a8edcd4a7753d5a1440030b + HEAD_REF master +) + +file(GLOB CUTE_HEADERS_FILES ${SOURCE_PATH}/*.h) +file(COPY ${CUTE_HEADERS_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(STRINGS "${SOURCE_PATH}/cute_math2d.h" SOURCE_LINES) +list(REVERSE SOURCE_LINES) + +set(line_no 0) +foreach(line ${SOURCE_LINES}) + math(EXPR line_no "${line_no} + 1") + if(line STREQUAL "/*") + break() + endif() +endforeach() + +list(SUBLIST SOURCE_LINES 0 ${line_no} SOURCE_LINES) +list(REVERSE SOURCE_LINES) +list(JOIN SOURCE_LINES "\n" _contents) + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${_contents}") diff --git a/ports/cute-headers/vcpkg.json b/ports/cute-headers/vcpkg.json new file mode 100644 index 00000000000000..bd12b94b48cb45 --- /dev/null +++ b/ports/cute-headers/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cute-headers", + "version-string": "2019-09-20", + "port-version": 1, + "description": "Collection of cross-platform one-file C/C++ libraries with no dependencies", + "homepage": "https://github.com/RandyGaul/cute_headers" +} diff --git a/ports/cutelyst2/CONTROL b/ports/cutelyst2/CONTROL deleted file mode 100644 index 8d5ce89a0f5f60..00000000000000 --- a/ports/cutelyst2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cutelyst2 -Version: 2.8.0 -Description: A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework -Build-Depends: qt5-base diff --git a/ports/cutelyst2/portfile.cmake b/ports/cutelyst2/portfile.cmake index 320059cd9cfa8a..98d84ed31f020e 100644 --- a/ports/cutelyst2/portfile.cmake +++ b/ports/cutelyst2/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cutelyst/cutelyst - REF c020f115b392bb8e22bed1e1669724102a31ab0c #v2.8.0 - SHA512 79b440f6dc0a78bc6b3ea83b496a4a9fd7bb016ea2492393c53d82af2c304291ac62a11af96bb05b1fc6422bf2012bec501bb8eb4bd770c54ad166d119891bc1 + REF 526aef6b4c1a48f8e91d59607763fade9157d01f # v2.12.0 + SHA512 0960801ae8d772a93e3f2dcd221f919ff28000076cecd4d1a2ff7b6e62575805738292257e63a48e455f6fc0bc446c90214fc33679ea1deb17b0c31d6f125e2a HEAD_REF master PATCHES fix-static-build.patch ) diff --git a/ports/cutelyst2/vcpkg.json b/ports/cutelyst2/vcpkg.json new file mode 100644 index 00000000000000..2a0bdda3f7d737 --- /dev/null +++ b/ports/cutelyst2/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "cutelyst2", + "version-string": "2.12.0", + "port-version": 1, + "description": "A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/cwalk/portfile.cmake b/ports/cwalk/portfile.cmake new file mode 100644 index 00000000000000..419b81efb98f77 --- /dev/null +++ b/ports/cwalk/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO likle/cwalk + REF v1.2.5 + SHA512 904e095e375d0c98dedbb17ddf805397387f8f473a708b310ba3086bbd4445bde7d0a037fbe9caed97c9cc793219a3d976cef010d76a32812c4fe2b3b7cde575 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cwalk) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/cwalk/vcpkg.json b/ports/cwalk/vcpkg.json new file mode 100644 index 00000000000000..c7d9b713e43018 --- /dev/null +++ b/ports/cwalk/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "cwalk", + "version-string": "1.2.5", + "description": "Path library for C/C++. Cross-Platform for Windows, MacOS and Linux. Supports UNIX and Windows path styles on those platforms.", + "homepage": "https://likle.github.io/cwalk/" +} diff --git a/ports/cxxopts/CONTROL b/ports/cxxopts/CONTROL deleted file mode 100644 index 53da6cd4e087f9..00000000000000 --- a/ports/cxxopts/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: cxxopts -Version: 2.2.0 -Homepage: https://github.com/jarro2783/cxxopts -Description: This is a lightweight C++ option parser library, supporting the standard GNU style syntax for options diff --git a/ports/cxxopts/fix-uwp-error.patch b/ports/cxxopts/fix-uwp-error.patch new file mode 100644 index 00000000000000..da1d4559572488 --- /dev/null +++ b/ports/cxxopts/fix-uwp-error.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 440490b..0ceb003 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,6 +54,8 @@ endif() + + add_library(cxxopts INTERFACE) + ++add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ + # optionally, enable unicode support using the ICU library + set(CXXOPTS_USE_UNICODE_HELP FALSE CACHE BOOL "Use ICU Unicode library") + if(CXXOPTS_USE_UNICODE_HELP) diff --git a/ports/cxxopts/portfile.cmake b/ports/cxxopts/portfile.cmake index b1c6697ede003f..552e877d287c25 100644 --- a/ports/cxxopts/portfile.cmake +++ b/ports/cxxopts/portfile.cmake @@ -1,10 +1,11 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jarro2783/cxxopts - REF v2.2.0 - SHA512 9f5182b3a86b3d47d1ce5e1e222ab596fce59d3b2dcc0ab2c3802338d5e0f3e6556f2a5ff2accb32cae7e2db41ac5a361c93bf0256f9e44c316eaa4b47c19efa + REF 302302b30839505703d37fb82f536c53cf9172fa # v2.2.1 + SHA512 ba4fe586772979929e090310557b1cba66c7350593ae170e3c7bd6577cf147b20dbe3ba834f2ed6e1044a1b38d5166bfd0491ab573df68e678ff2dc792a3c442 HEAD_REF master + PATCHES + fix-uwp-error.patch ) vcpkg_configure_cmake( diff --git a/ports/cxxopts/vcpkg.json b/ports/cxxopts/vcpkg.json new file mode 100644 index 00000000000000..213f5cefcc357d --- /dev/null +++ b/ports/cxxopts/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cxxopts", + "version-string": "2.2.1", + "port-version": 1, + "description": "This is a lightweight C++ option parser library, supporting the standard GNU style syntax for options", + "homepage": "https://github.com/jarro2783/cxxopts" +} diff --git a/ports/czmq/CONTROL b/ports/czmq/CONTROL deleted file mode 100644 index 4d68f15b17fa0a..00000000000000 --- a/ports/czmq/CONTROL +++ /dev/null @@ -1,27 +0,0 @@ -Source: czmq -Version: 2019-06-10-3 -Build-Depends: zeromq -Description: High-level C binding for ZeroMQ -Homepage: https://github.com/zeromq/czmq - -Feature: tool -Description: Build and install czmq tools (zmakecert) - -Feature: draft -Description: Build and install draft APIs - -Feature: curl -Description: Build with libcurl -Build-Depends: curl - -Feature: lz4 -Description: Build with lz4 -Build-Depends: lz4 - -Feature: httpd -Description: Build with HTTP server support (libmicrohttpd) -Build-Depends: libmicrohttpd - -Feature: uuid -Description: Build with libuuid -Build-Depends: libuuid (!windows&!uwp&!osx) diff --git a/ports/czmq/Findlibcurl.cmake b/ports/czmq/Findlibcurl.cmake index 6c943e2d71c738..6a8f90bbd4b98d 100644 --- a/ports/czmq/Findlibcurl.cmake +++ b/ports/czmq/Findlibcurl.cmake @@ -1,51 +1,11 @@ -find_path( - LIBCURL_INCLUDE_DIRS - NAMES curl/curl.h -) - -find_library( - LIBCURL_LIBRARY_DEBUG - NAMES libcurl-d_imp libcurl-d curl-d curl -) - -find_library( - LIBCURL_LIBRARY_RELEASE - NAMES libcurl_imp libcurl curl -) - -include(SelectLibraryConfigurations) -select_library_configurations(LIBCURL) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - LIBCURL - REQUIRED_VARS LIBCURL_LIBRARIES LIBCURL_INCLUDE_DIRS -) - -# CURL dependencies -# https://github.com/Microsoft/vcpkg/issues/4312 -# https://github.com/microsoft/vcpkg/commit/ee325d14276e7bd7961e94e58293b02d6e9e92da -# https://github.com/microsoft/vcpkg/pull/6698 -if (LIBCURL_FOUND) - find_package(OpenSSL QUIET) - find_package(ZLIB QUIET) - - if (OPENSSL_FOUND) - list(APPEND LIBCURL_LIBRARIES - OpenSSL::SSL - OpenSSL::Crypto - ) - endif () - - if (ZLIB_FOUND) - list(APPEND LIBCURL_LIBRARIES - ZLIB::ZLIB - ) - endif () - - if (WIN32) - list(APPEND LIBCURL_LIBRARIES - Crypt32 - ) - endif () -endif () +find_package(CURL CONFIG QUIET) + +if(CURL_FOUND) + set(LIBCURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS}) + set(LIBCURL_LIBRARIES CURL::libcurl) + set(LIBCURL_FOUND TRUE) + message(STATUS "Found libcurl: ${LIBCURL_LIBRARIES}") +else() + set(LIBCURL_FOUND FALSE) + message(STATUS "Could not find libcurl") +endif() diff --git a/ports/czmq/Findlibmicrohttpd.cmake b/ports/czmq/Findlibmicrohttpd.cmake index 476cb2add52825..c7d0b4c19f3b2b 100644 --- a/ports/czmq/Findlibmicrohttpd.cmake +++ b/ports/czmq/Findlibmicrohttpd.cmake @@ -1,17 +1,17 @@ -find_path(LIBMICROHTTPD_INCLUDE_DIRS NAMES microhttpd.h) +find_path(LIBMICROHTTPD_INCLUDE_DIR NAMES microhttpd.h) -get_filename_component(_prefix_path ${LIBMICROHTTPD_INCLUDE_DIRS} PATH) +get_filename_component(_prefix_path ${LIBMICROHTTPD_INCLUDE_DIR} PATH) find_library( LIBMICROHTTPD_LIBRARY_DEBUG - NAMES libmicrohttpd microhttpd + NAMES libmicrohttpd-dll_d libmicrohttpd microhttpd PATHS ${_prefix_path}/debug/lib NO_DEFAULT_PATH ) find_library( LIBMICROHTTPD_LIBRARY_RELEASE - NAMES libmicrohttpd microhttpd + NAMES libmicrohttpd-dll libmicrohttpd microhttpd PATHS ${_prefix_path}/lib NO_DEFAULT_PATH ) @@ -24,5 +24,9 @@ select_library_configurations(LIBMICROHTTPD) include(FindPackageHandleStandardArgs) find_package_handle_standard_args( LIBMICROHTTPD - REQUIRED_VARS LIBMICROHTTPD_LIBRARIES LIBMICROHTTPD_INCLUDE_DIRS + REQUIRED_VARS LIBMICROHTTPD_LIBRARY LIBMICROHTTPD_INCLUDE_DIR ) + +if(LIBMICROHTTPD_FOUND) + set(LIBMICROHTTPD_INCLUDE_DIRS ${LIBMICROHTTPD_INCLUDE_DIR}) +endif() diff --git a/ports/czmq/Findlibzmq.cmake b/ports/czmq/Findlibzmq.cmake index 706f063c388716..80ce140e7c991e 100644 --- a/ports/czmq/Findlibzmq.cmake +++ b/ports/czmq/Findlibzmq.cmake @@ -2,9 +2,5 @@ find_package(ZeroMQ CONFIG REQUIRED) set(LIBZMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR}) set(LIBZMQ_LIBRARIES libzmq libzmq-static) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - LIBZMQ - REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS -) +set(LIBZMQ_FOUND TRUE) +message(STATUS "Found libzmq: ${LIBZMQ_LIBRARIES}") diff --git a/ports/czmq/Findlz4.cmake b/ports/czmq/Findlz4.cmake index 8ce17c5bd7f878..bb97973681d24e 100644 --- a/ports/czmq/Findlz4.cmake +++ b/ports/czmq/Findlz4.cmake @@ -1,4 +1,4 @@ -find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) +find_path(LZ4_INCLUDE_DIR NAMES lz4.h) find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) find_library(LZ4_LIBRARY_RELEASE NAMES lz4) @@ -9,5 +9,9 @@ select_library_configurations(LZ4) include(FindPackageHandleStandardArgs) find_package_handle_standard_args( LZ4 - REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS + REQUIRED_VARS LZ4_LIBRARY LZ4_INCLUDE_DIR ) + +if(LZ4_FOUND) + set(LZ4_INCLUDE_DIRS ${LZ4_INCLUDE_DIR}) +endif() diff --git a/ports/czmq/Finduuid.cmake b/ports/czmq/Finduuid.cmake index ba89aab56765a0..96e61e057ba65d 100644 --- a/ports/czmq/Finduuid.cmake +++ b/ports/czmq/Finduuid.cmake @@ -1,9 +1,9 @@ find_path( - UUID_INCLUDE_DIRS + UUID_INCLUDE_DIR NAMES uuid/uuid.h ) -get_filename_component(_prefix_path ${UUID_INCLUDE_DIRS} PATH) +get_filename_component(_prefix_path ${UUID_INCLUDE_DIR} PATH) find_library( UUID_LIBRARY_DEBUG @@ -27,5 +27,9 @@ select_library_configurations(UUID) include(FindPackageHandleStandardArgs) find_package_handle_standard_args( UUID - REQUIRED_VARS UUID_LIBRARIES UUID_INCLUDE_DIRS + REQUIRED_VARS UUID_LIBRARY UUID_INCLUDE_DIR ) + +if(UUID_FOUND) + set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR}) +endif() diff --git a/ports/czmq/fix-dependencies.patch b/ports/czmq/fix-dependencies.patch index bb57247dcbd6fd..4612b8939e95a8 100644 --- a/ports/czmq/fix-dependencies.patch +++ b/ports/czmq/fix-dependencies.patch @@ -1,8 +1,8 @@ diff --git a/builds/cmake/Config.cmake.in b/builds/cmake/Config.cmake.in -index 9c15f36a..e1475cd6 100644 +index 9c15f36a..5afff016 100644 --- a/builds/cmake/Config.cmake.in +++ b/builds/cmake/Config.cmake.in -@@ -1,4 +1,14 @@ +@@ -1,4 +1,12 @@ @PACKAGE_INIT@ +include(CMakeFindDependencyMacro) @@ -10,10 +10,8 @@ index 9c15f36a..e1475cd6 100644 +find_dependency(ZeroMQ) + +if ("@CZMQ_WITH_LIBCURL@" AND "@LIBCURL_FOUND@") -+ find_dependency(OpenSSL) -+ find_dependency(ZLIB) ++ find_dependency(CURL) +endif () -+ + include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") check_required_components("@PROJECT_NAME@") diff --git a/ports/czmq/portfile.cmake b/ports/czmq/portfile.cmake index 2545feea52407d..a24d0be9a6de83 100644 --- a/ports/czmq/portfile.cmake +++ b/ports/czmq/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/czmq - REF 7e29cf95305551daad197e32423d9cff5f9b6893 - SHA512 7d79494c904f5276c9d1e4a193a63882dc622a6db8998b9719de4aec8b223b3a8b3c92ea02be81f39afc12c1a883b310fd3662ea27ed736b0b9c7092b4843a18 + REF v4.2.1 + SHA512 65a21f7bd5935b119e1b24ce3b2ce8462031ab7c9a4ba587bb99fe618c9f8cb672cfa202993ddd79e0fb0f154ada06560b79a1b4f762fcce8f88f2f450ecee01 HEAD_REF master PATCHES fix-dependencies.patch @@ -17,28 +15,27 @@ foreach(_cmake_module Findlz4.cmake Finduuid.cmake ) - configure_file( + file(COPY ${CMAKE_CURRENT_LIST_DIR}/${_cmake_module} - ${SOURCE_PATH}/${_cmake_module} - COPYONLY + DESTINATION ${SOURCE_PATH} ) endforeach() string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - draft ENABLE_DRAFTS - tool BUILD_TOOLS - curl CZMQ_WITH_LIBCURL - httpd CZMQ_WITH_LIBMICROHTTPD - lz4 CZMQ_WITH_LZ4 - uuid CZMQ_WITH_UUID +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + draft ENABLE_DRAFTS + curl CZMQ_WITH_LIBCURL + httpd CZMQ_WITH_LIBMICROHTTPD + lz4 CZMQ_WITH_LZ4 + uuid CZMQ_WITH_UUID ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA DISABLE_PARALLEL_CONFIGURE OPTIONS -DCZMQ_BUILD_SHARED=${BUILD_SHARED} @@ -47,35 +44,31 @@ vcpkg_configure_cmake( ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) + vcpkg_cmake_config_fixup(CONFIG_PATH CMake) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/${PORT}) - vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT}) + vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/${PORT}) endif() +vcpkg_fixup_pkgconfig() + file(COPY - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" ) -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() - if ("tool" IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/zmakecert${EXECUTABLE_SUFFIX} - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tools(TOOL_NAMES zmakecert) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_clean_executables_in_bin(FILE_NAMES zmakecert) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/czmq_library.h @@ -84,18 +77,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) ) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - file(REMOVE - ${CURRENT_PACKAGES_DIR}/debug/bin/zmakecert${EXECUTABLE_SUFFIX} - ${CURRENT_PACKAGES_DIR}/bin/zmakecert${EXECUTABLE_SUFFIX}) -endif() - # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/czmq/vcpkg.json b/ports/czmq/vcpkg.json new file mode 100644 index 00000000000000..326c881d6bf6ae --- /dev/null +++ b/ports/czmq/vcpkg.json @@ -0,0 +1,53 @@ +{ + "name": "czmq", + "version-semver": "4.2.1", + "description": "High-level C binding for ZeroMQ", + "homepage": "https://github.com/zeromq/czmq", + "license": "MPL-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zeromq" + ], + "features": { + "curl": { + "description": "Build with libcurl", + "dependencies": [ + "curl" + ] + }, + "draft": { + "description": "Build and install draft APIs" + }, + "httpd": { + "description": "Build with HTTP server support (libmicrohttpd)", + "dependencies": [ + "libmicrohttpd" + ] + }, + "lz4": { + "description": "Build with lz4", + "dependencies": [ + "lz4" + ] + }, + "tool": { + "description": "Build and install czmq tools (zmakecert)" + }, + "uuid": { + "description": "Build with libuuid", + "dependencies": [ + { + "name": "libuuid", + "platform": "!windows & !uwp & !osx" + } + ] + } + } +} diff --git a/ports/d3d12-memory-allocator/CMakeLists.txt b/ports/d3d12-memory-allocator/CMakeLists.txt new file mode 100644 index 00000000000000..884610b06184cc --- /dev/null +++ b/ports/d3d12-memory-allocator/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.0) +project(d3d12-memory-allocator) + +add_library(${PROJECT_NAME} STATIC + "src/D3D12MemAlloc.h" + "src/D3D12MemAlloc.cpp" +) + +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "src/D3D12MemAlloc.h") +#target_include_directories(${PROJECT_NAME} PRIVATE "src/") + +install( + TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-config + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION include/ +) +install( + EXPORT ${PROJECT_NAME}-config DESTINATION cmake/ + NAMESPACE "unofficial::" +) \ No newline at end of file diff --git a/ports/d3d12-memory-allocator/portfile.cmake b/ports/d3d12-memory-allocator/portfile.cmake new file mode 100644 index 00000000000000..89a4093bb4e6df --- /dev/null +++ b/ports/d3d12-memory-allocator/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator + REF 10f148cef0dfd34ae1a9373b9396beb1581c992a + SHA512 c99934a606ce5a5c9c59e05faf2e659bfad2e485b58aaf00f38219a6c89f17b62033f4a69935915f0d5269a4f0ecba41037b044913ae6f4077fa981eaab470c8 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH cmake/) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/d3d12-memory-allocator/vcpkg.json b/ports/d3d12-memory-allocator/vcpkg.json new file mode 100644 index 00000000000000..b31b48509a0dab --- /dev/null +++ b/ports/d3d12-memory-allocator/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "d3d12-memory-allocator", + "version-date": "2021-05-05", + "description": "Easy to integrate D3d12 memory allocation library from GPUOpen", + "homepage": "https://gpuopen.com/gaming-product/d3d12-memory-allocator/", + "license": "MIT", + "supports": "windows", + "dependencies": [ + "directx-headers", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/d3dx12/portfile.cmake b/ports/d3dx12/portfile.cmake new file mode 100644 index 00000000000000..467685cffef943 --- /dev/null +++ b/ports/d3dx12/portfile.cmake @@ -0,0 +1,22 @@ +set(VERSION may2021) + +# The official D3DX12.H is hosted on https://github.com/microsoft/DirectX-Headers. +# +# This port uses the version from directx-vs-templates instead because it is compatible with multiple +# versions of the Windows 10 SDK. The official version only supports the 'latest' Windows 10 SDK. + +message(NOTICE "Consider using the 'directx-headers' port instead. See https://aka.ms/directx12agility") + +vcpkg_download_distfile(D3DX12_H + URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/${VERSION}/d3d12game_win32_dr/d3dx12.h" + FILENAME "directx-vs-templates-${VERSION}-d3dx12.h" + SHA512 b053a8e6593c701a0827f8a52f20e160070b8b71242fd60a57617e46b87e909e11f814fc15b084b4f83b7ff5b9a562280da64a77cee3a171ef17839315df4245 +) +vcpkg_download_distfile(LICENSE + URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/${VERSION}/LICENSE" + FILENAME "directx-vs-templates-${VERSION}-LICENSE" + SHA512 ce7d8ec7bfb58ef36a95b20f6f0fc4e3cd4923bb3ac6bd1f62e8215df2ee83d2a594ce84b15951310f05a819a0370468af781e73a10e536d23965421466851f4 +) + +file(INSTALL "${D3DX12_H}" DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME d3dx12.h) +file(INSTALL "${LICENSE}" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/d3dx12/vcpkg.json b/ports/d3dx12/vcpkg.json new file mode 100644 index 00000000000000..1886ec5a1fed18 --- /dev/null +++ b/ports/d3dx12/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "d3dx12", + "version-string": "may2021", + "description": "The D3D12 Helper Library", + "homepage": "https://docs.microsoft.com/en-us/windows/win32/direct3d12/helper-structures-and-functions-for-d3d12" +} diff --git a/ports/darknet/CONTROL b/ports/darknet/CONTROL deleted file mode 100644 index 6979c310c823a1..00000000000000 --- a/ports/darknet/CONTROL +++ /dev/null @@ -1,23 +0,0 @@ -Source: darknet -Version: 0.2.5-6 -Description: Darknet is an open source neural network framework written in C and CUDA. You only look once (YOLO) is a state-of-the-art, real-time object detection system, best example of darknet functionalities. -Build-Depends: pthreads (windows), stb -Default-Features: weights - -Feature: opencv -Build-Depends: opencv[ffmpeg] -Description: Build darknet with support for OpenCV - -Feature: cuda -Build-Depends: cuda -Description: Build darknet with support for CUDA - -Feature: weights -Description: Download pre-built weights for test - -Feature: weights-train -Description: Download pre-built weights for training - -Feature: opencv-cuda -Build-Depends: darknet[opencv], darknet[cuda] -Description: Build darknet with support for a CUDA-enabled OpenCV diff --git a/ports/darknet/portfile.cmake b/ports/darknet/portfile.cmake index a18c97a911743a..cd1f9716f3a133 100644 --- a/ports/darknet/portfile.cmake +++ b/ports/darknet/portfile.cmake @@ -1,26 +1,23 @@ -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - message(FATAL_ERROR "darknet does not support ARM") -endif() - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "darknet does not support UWP") -endif() - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO AlexeyAB/darknet - REF b2d795e34e1d734d0f451ce9847a0e6b68c32351 - SHA512 1964aa0d768d37fc614983718aede8b29e562fd8120116b7cd7a1331bb8a3256e28c01cdff6f19bbe7b9d6289b3292188205f362bae38393cee33d8a2e6a5273 + REF 5853e51d604712918bd2fb23bab0ec82d19a88f9 + SHA512 d61e94209d66db3b71ad14d83c83a4d562879119b67881e9eacc60efb16e44496b291000c8c545055db5ae0e542cfb149fdbed2058584962fa52b604353ddccd HEAD_REF master ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - "cuda" ENABLE_CUDA - "opencv" ENABLE_OPENCV + FEATURES + cuda ENABLE_CUDA + cudnn ENABLE_CUDNN ) +#do not move following features to vcpkg_check_features because they break themselves: one off will turn off the others even if true +set(ENABLE_OPENCV FALSE) +if ("opencv-base" IN_LIST FEATURES OR "opencv2-base" IN_LIST FEATURES OR "opencv3-base" IN_LIST FEATURES OR "opencv-cuda" IN_LIST FEATURES OR "opencv2-cuda" IN_LIST FEATURES OR "opencv3-cuda" IN_LIST FEATURES) + set(ENABLE_OPENCV TRUE) +endif() + if ("cuda" IN_LIST FEATURES) if (NOT VCPKG_CMAKE_SYSTEM_NAME AND NOT ENV{CUDACXX}) #CMake looks for nvcc only in PATH and CUDACXX env vars for the Ninja generator. Since we filter path on vcpkg and CUDACXX env var is not set by CUDA installer on Windows, CMake cannot find CUDA when using Ninja generator, so we need to manually enlight it if necessary (https://gitlab.kitware.com/cmake/cmake/issues/19173). Otherwise we could just disable Ninja and use MSBuild, but unfortunately CUDA installer does not integrate with some distributions of MSBuild (like the ones inside Build Tools), making CUDA unavailable otherwise in those cases, which we want to avoid @@ -28,78 +25,30 @@ if ("cuda" IN_LIST FEATURES) endif() endif() -if("weights" IN_LIST FEATURES) - vcpkg_download_distfile(YOLOV3_WEIGHTS - URLS "https://pjreddie.com/media/files/yolov3.weights" - FILENAME "darknet-cache/yolov3.weights" - SHA512 293c70e404ff0250d7c04ca1e5e053fc21a78547e69b5b329d34f25981613e59b982d93fff2c352915ef7531d6c3b02a9b0b38346d05c51d6636878d8883f2c1 - ) - vcpkg_download_distfile(YOLOV2_WEIGHTS - URLS "https://pjreddie.com/media/files/yolov2.weights" - FILENAME "darknet-cache/yolov2.weights" - SHA512 5271da2dd2da915172ddd034c8e894877e7066051f105ae82e25e185a2b4e4157d2b9514653c23780e87346f2b20df6363018b7e688aba422e2dacf1d2fbf6ab - ) - vcpkg_download_distfile(YOLOV3-TINY_WEIGHTS - URLS "https://pjreddie.com/media/files/yolov3-tiny.weights" - FILENAME "darknet-cache/yolov3-tiny.weights" - SHA512 981a56459515f727bb7b3d3341b95f4117499b6726eab2798e1c3e524de1ee8ed0d954c11b27bbbb926da2cc955526a194eddf69c55d65923994ab2e8af07042 - ) - vcpkg_download_distfile(YOLOV2-TINY_WEIGHTS - URLS "https://pjreddie.com/media/files/yolov2-tiny.weights" - FILENAME "darknet-cache/yolov2-tiny.weights" - SHA512 f0857a7a02cf4322354d288c9afa0b87321b23082b719bc84ea64e2f3556cc1fafeb836ee5bf9fb6dcf448839061b93623a067dfde7afa1338636865ea88989a - ) -endif() - -if("weights-train" IN_LIST FEATURES) - vcpkg_download_distfile(IMAGENET_CONV_WEIGHTS_V3 - URLS "https://pjreddie.com/media/files/darknet53.conv.74" - FILENAME "darknet-cache/darknet53.conv.74" - SHA512 8983e1c129e2d6e8e3da0cc0781ecb7a07813830ef5a87c24b53100df6a5f23db6c6e6a402aec78025a93fe060b75d1958f1b8f7439a04b54a3f19c81e2ae99b - ) - vcpkg_download_distfile(IMAGENET_CONV_WEIGHTS_V2 - URLS "https://pjreddie.com/media/files/darknet19_448.conv.23" - FILENAME "darknet-cache/darknet19_448.conv.23" - SHA512 8016f5b7ddc15c5d7dad231592f5351eea65f608ebdb204f545034dde904e11962f693080dfeb5a4510e7b71bdda151a9121ba0f8a243018d680f01b1efdbd31 - ) -endif() - #make sure we don't use any integrated pre-built library nor any unnecessary CMake module file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty) file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindPThreads_windows.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindCUDNN.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindStb.cmake) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - DISABLE_PARALLEL_CONFIGURE #since darknet configures a file inside source tree, it is better to disable parallel configure + DISABLE_PARALLEL_CONFIGURE PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} -DINSTALL_BIN_DIR:STRING=bin -DINSTALL_LIB_DIR:STRING=lib - ${FEATURE_OPTIONS} + -DENABLE_OPENCV:BOOL=${ENABLE_OPENCV} ) vcpkg_install_cmake() - -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") +vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES darknet uselib) +if ("opencv-cuda" IN_LIST FEATURES OR "opencv3-cuda" IN_LIST FEATURES) + vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES uselib_track) endif() -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/darknet${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/uselib${EXECUTABLE_SUFFIX}) -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin/uselib_track${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/uselib_track${EXECUTABLE_SUFFIX}) -endif() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/darknet/) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/darknet${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/darknet/darknet${EXECUTABLE_SUFFIX}) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uselib${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/darknet/uselib${EXECUTABLE_SUFFIX}) -if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/uselib_track${EXECUTABLE_SUFFIX}) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uselib_track${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/darknet/uselib_track${EXECUTABLE_SUFFIX}) -endif() -file(COPY ${SOURCE_PATH}/cfg DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) -file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/darknet) +file(COPY ${SOURCE_PATH}/cfg DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) @@ -107,21 +56,9 @@ endif() vcpkg_fixup_cmake_targets() -file(COPY ${SOURCE_PATH}/cmake/Modules/FindCUDNN.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/darknet) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/darknet RENAME copyright) - -if("weights" IN_LIST FEATURES) - file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov3.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) - file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov2.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) - file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov3-tiny.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) - file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov2-tiny.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) -endif() - -if("weights-train" IN_LIST FEATURES) - file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/darknet53.conv.74 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) - file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/darknet19_448.conv.23 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) -endif() +file(INSTALL ${SOURCE_PATH}/scripts/download_weights.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/scripts) +message(STATUS "To download weight files, please go to ${CURRENT_INSTALLED_DIR}/tools/${PORT}/scripts and run ./download_weights.ps1") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/darknet/vcpkg.json b/ports/darknet/vcpkg.json new file mode 100644 index 00000000000000..d599397c63f908 --- /dev/null +++ b/ports/darknet/vcpkg.json @@ -0,0 +1,116 @@ +{ + "name": "darknet", + "version-date": "2021-04-16", + "port-version": 1, + "description": "Darknet is an open source neural network framework written in C and CUDA. You only look once (YOLO) is a state-of-the-art, real-time object detection system, best example of darknet functionalities.", + "homepage": "https://github.com/alexeyab/darknet", + "dependencies": [ + "pthreads", + "stb" + ], + "features": { + "cuda": { + "description": "Build darknet with support for CUDA", + "dependencies": [ + "cuda" + ] + }, + "cudnn": { + "description": "Build darknet with support for cuDNN", + "dependencies": [ + "cuda", + "cudnn" + ] + }, + "full": { + "description": "Build darknet fully featured", + "dependencies": [ + { + "name": "darknet", + "features": [ + "cuda", + "cudnn", + "opencv-cuda" + ] + } + ] + }, + "opencv-base": { + "description": "Build darknet with support for latest version of OpenCV", + "dependencies": [ + { + "name": "opencv", + "features": [ + "contrib", + "dnn", + "ffmpeg" + ] + } + ] + }, + "opencv-cuda": { + "description": "Build darknet with support for latest version of CUDA-enabled OpenCV", + "dependencies": [ + { + "name": "opencv", + "features": [ + "contrib", + "cuda", + "dnn", + "ffmpeg" + ] + } + ] + }, + "opencv2-base": { + "description": "Build darknet with support for OpenCV2", + "dependencies": [ + { + "name": "opencv2", + "features": [ + "ffmpeg" + ] + } + ] + }, + "opencv2-cuda": { + "description": "Build darknet with support for CUDA-enabled OpenCV2", + "dependencies": [ + { + "name": "opencv2", + "features": [ + "cuda", + "ffmpeg" + ] + } + ] + }, + "opencv3-base": { + "description": "Build darknet with support for OpenCV3", + "dependencies": [ + { + "name": "opencv3", + "features": [ + "contrib", + "dnn", + "ffmpeg" + ] + } + ] + }, + "opencv3-cuda": { + "description": "Build darknet with support for CUDA-enabled OpenCV3", + "dependencies": [ + { + "name": "opencv3", + "features": [ + "contrib", + "cuda", + "dnn", + "ffmpeg" + ] + } + ] + } + } +} diff --git a/ports/darts-clone/CONTROL b/ports/darts-clone/CONTROL deleted file mode 100644 index a0bfad433cd9f4..00000000000000 --- a/ports/darts-clone/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: darts-clone -Version: 1767ab87cffe-1 -Description: A static double-array trie structure diff --git a/ports/darts-clone/portfile.cmake b/ports/darts-clone/portfile.cmake index d7eb7941c17dbb..7ed6e4d5920086 100644 --- a/ports/darts-clone/portfile.cmake +++ b/ports/darts-clone/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) vcpkg_check_linkage( ONLY_STATIC_LIBRARY ) diff --git a/ports/darts-clone/vcpkg.json b/ports/darts-clone/vcpkg.json new file mode 100644 index 00000000000000..e99a2315ff725a --- /dev/null +++ b/ports/darts-clone/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "darts-clone", + "version-string": "1767ab87cffe", + "port-version": 2, + "description": "A static double-array trie structure" +} diff --git a/ports/dartsim/1478.patch b/ports/dartsim/1478.patch new file mode 100644 index 00000000000000..ce6dbd1268addd --- /dev/null +++ b/ports/dartsim/1478.patch @@ -0,0 +1,25 @@ +From 6d03ee61c38e2b07b2dbb85f0ba61d2a76956e3b Mon Sep 17 00:00:00 2001 +From: Steve Peters +Date: Fri, 24 Jul 2020 17:24:42 -0700 +Subject: [PATCH] Don't force CMAKE_INSTALL_PREFIX on windows + +Fixes #1477. + +Signed-off-by: Steve Peters +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6552bedc162..47df721559b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,7 +51,7 @@ initialize_component_helpers(${PROJECT_NAME}) + + # System install paths on Windows + if(WIN32) +- set(CMAKE_INSTALL_PREFIX "C:/Golems" CACHE PATH "Install prefix" FORCE) ++ set(CMAKE_INSTALL_PREFIX "C:/Golems" CACHE PATH "Install prefix") + endif() + + #=============================================================================== diff --git a/ports/dartsim/1497.patch b/ports/dartsim/1497.patch new file mode 100644 index 00000000000000..3f2b6b5b31151c --- /dev/null +++ b/ports/dartsim/1497.patch @@ -0,0 +1,50 @@ +From 9fde9124927789ca2399f99c1be9b101ed1e8550 Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Thu, 3 Sep 2020 17:28:01 +0200 +Subject: [PATCH] CMake: Add DART_SKIP_ advanced option + +Add DART_SKIP_ option to permit to specify that +a dependecy should not used even if it is found in the system. +--- + cmake/DARTMacros.cmake | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +diff --git a/cmake/DARTMacros.cmake b/cmake/DARTMacros.cmake +index 8b1a89292ee..409b02bd742 100644 +--- a/cmake/DARTMacros.cmake ++++ b/cmake/DARTMacros.cmake +@@ -127,7 +127,9 @@ endfunction() + + #=============================================================================== + macro(dart_check_optional_package variable component dependency) +- if(${${variable}_FOUND}) ++ option(DART_SKIP_${variable} "If ON, do not use ${variable} even if it is found." OFF) ++ mark_as_advanced(DART_SKIP_${variable}) ++ if(${${variable}_FOUND} AND NOT ${DART_SKIP_${variable}}) + set(HAVE_${variable} TRUE CACHE BOOL "Check if ${variable} found." FORCE) + if(DART_VERBOSE) + message(STATUS "Looking for ${dependency} - version ${${variable}_VERSION}" +@@ -135,12 +137,17 @@ macro(dart_check_optional_package variable component dependency) + endif() + else() + set(HAVE_${variable} FALSE CACHE BOOL "Check if ${variable} found." FORCE) +- if(ARGV3) # version +- message(STATUS "Looking for ${dependency} - NOT found, to use" +- " ${component}, please install ${dependency} (>= ${ARGV3})") +- else() +- message(STATUS "Looking for ${dependency} - NOT found, to use" +- " ${component}, please install ${dependency}") ++ if(NOT ${${variable}_FOUND}) ++ if(ARGV3) # version ++ message(STATUS "Looking for ${dependency} - NOT found, to use" ++ " ${component}, please install ${dependency} (>= ${ARGV3})") ++ else() ++ message(STATUS "Looking for ${dependency} - NOT found, to use" ++ " ${component}, please install ${dependency}") ++ endif() ++ elseif(${DART_SKIP_${variable}} AND DART_VERBOSE) ++ message(STATUS "Not using ${dependency} - version ${${variable}_VERSION}" ++ " even if found because DART_SKIP_${variable} is ON.") + endif() + return() + endif() diff --git a/ports/dartsim/disable_unit_tests_examples_and_tutorials.patch b/ports/dartsim/disable_unit_tests_examples_and_tutorials.patch new file mode 100644 index 00000000000000..08119ce39f457d --- /dev/null +++ b/ports/dartsim/disable_unit_tests_examples_and_tutorials.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e32147d..5c85186 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -279,6 +279,7 @@ add_subdirectory(dart) + + set(DART_IN_SOURCE_BUILD TRUE) + ++if (0) + if(TARGET dart AND NOT DART_BUILD_DARTPY) + + # Add a "tests" target to build unit tests. +@@ -330,6 +331,7 @@ if(TARGET dart AND NOT DART_BUILD_DARTPY) + endif(DART_VERBOSE) + + endif() ++endif() + + if (DART_BUILD_DARTPY) + add_subdirectory(python) diff --git a/ports/dartsim/portfile.cmake b/ports/dartsim/portfile.cmake new file mode 100644 index 00000000000000..c208482f1f44fa --- /dev/null +++ b/ports/dartsim/portfile.cmake @@ -0,0 +1,42 @@ +# Shared library support is broken upstream (https://github.com/dartsim/dart/issues/1005#issuecomment-375406260) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dartsim/dart + REF v6.9.4 + SHA512 a9e8712a294286772ee1e3c3899aac7d202f1d3c2b9242ebeaddb2a142787b192d5421a6e3f889dd9ff9ca9e9106b1f893a0c8ab2e1656b04fac6d0be13494ba + HEAD_REF release-6.9 + PATCHES + 1478.patch + 1497.patch + disable_unit_tests_examples_and_tutorials.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DDART_VERBOSE=ON + -DDART_MSVC_DEFAULT_OPTIONS=ON + -DDART_SKIP_DOXYGEN=ON + -DDART_SKIP_FLANN=ON + -DDART_SKIP_IPOPT=ON + -DDART_SKIP_NLOPT=ON + -DDART_SKIP_OPENGL=ON + -DDART_SKIP_pagmo=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/dart/cmake TARGET_PATH share/dart) + +# Remove pkg-config file as they are broken upstream (https://github.com/dartsim/dart/issues/1496) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/dartsim/vcpkg.json b/ports/dartsim/vcpkg.json new file mode 100644 index 00000000000000..5f4c00b1865905 --- /dev/null +++ b/ports/dartsim/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "dartsim", + "version": "6.9.4", + "port-version": 1, + "description": "Dynamic Animation and Robotics Toolkit", + "homepage": "https://dartsim.github.io/", + "dependencies": [ + "assimp", + "boost-algorithm", + "boost-filesystem", + "boost-functional", + "boost-lexical-cast", + "boost-math", + "boost-optional", + "boost-regex", + "boost-system", + "bullet3", + "ccd", + "eigen3", + "fcl", + "octomap", + "ode", + "tinyxml2", + "urdfdom" + ] +} diff --git a/ports/dataframe/portfile.cmake b/ports/dataframe/portfile.cmake new file mode 100644 index 00000000000000..a2a453ef0e84bf --- /dev/null +++ b/ports/dataframe/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hosseinmoein/DataFrame + REF 1.17.0 + SHA512 8f402c9298d50102984d4b52f830cd995cbbc1cb20f65a8d371e7b013e78c9211b40c2cec38dd97ecfe7d425d54fdaf8a876522db2dc6562194946fc73f7663b + HEAD_REF master +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_TESTING:BOOL=OFF +) + +vcpkg_install_cmake() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/dataframe) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/DataFrame TARGET_PATH share/dataframe) + +endif() +vcpkg_fixup_pkgconfig() + +file( REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include +) + +file( INSTALL + ${SOURCE_PATH}/License DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/ports/dataframe/vcpkg.json b/ports/dataframe/vcpkg.json new file mode 100644 index 00000000000000..902221408efda9 --- /dev/null +++ b/ports/dataframe/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "dataframe", + "version-string": "1.17.0", + "port-version": 1, + "description": "This is a C++ statistical library that provides an interface similar to Pandas package in Python", + "homepage": "https://github.com/hosseinmoein/DataFrame", + "supports": "!uwp" +} diff --git a/ports/date/0001-fix-uwp.patch b/ports/date/0001-fix-uwp.patch new file mode 100644 index 00000000000000..b414722cd85f9d --- /dev/null +++ b/ports/date/0001-fix-uwp.patch @@ -0,0 +1,13 @@ +diff --git i/include/date/date.h w/include/date/date.h +index fce6200..6a77ad4 100644 +--- i/include/date/date.h ++++ w/include/date/date.h +@@ -82,7 +82,7 @@ + #ifdef _MSC_VER + # pragma warning(push) + // warning C4127: conditional expression is constant +-# pragma warning(disable : 4127) ++# pragma warning(disable : 4127 4996) + #endif + + namespace date diff --git a/ports/date/0002-fix-cmake-3.14.patch b/ports/date/0002-fix-cmake-3.14.patch new file mode 100644 index 00000000000000..9d117231ca3503 --- /dev/null +++ b/ports/date/0002-fix-cmake-3.14.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad74900..42d55af 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,7 +72,7 @@ target_sources( date INTERFACE + $ + $ + ) +-if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) ++if (0) + # public headers will get installed: + set_target_properties( date PROPERTIES PUBLIC_HEADER include/date/date.h ) + endif () +@@ -115,7 +115,6 @@ if( BUILD_TZ_LIB ) + endif( ) + set_target_properties( date-tz PROPERTIES + POSITION_INDEPENDENT_CODE ON +- PUBLIC_HEADER "${TZ_HEADERS}" + VERSION "${PROJECT_VERSION}" + SOVERSION "${PROJECT_VERSION}" ) + if( NOT MSVC ) +@@ -140,8 +139,8 @@ write_basic_package_version_file( "${version_config}" + COMPATIBILITY SameMajorVersion ) + + install( TARGETS date +- EXPORT dateConfig +- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) ++ EXPORT dateConfig ) ++install( FILES include/date/date.h ${TZ_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) + export( TARGETS date NAMESPACE date:: FILE dateTargets.cmake ) + if (CMAKE_VERSION VERSION_LESS 3.15) + install( diff --git a/ports/date/0003-find-dependency-pthread.patch b/ports/date/0003-find-dependency-pthread.patch new file mode 100644 index 00000000000000..72c6c765a15b54 --- /dev/null +++ b/ports/date/0003-find-dependency-pthread.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/dateConfig.cmake b/cmake/dateConfig.cmake +index 20f86e8..2198ad1 100644 +--- a/cmake/dateConfig.cmake ++++ b/cmake/dateConfig.cmake +@@ -1,8 +1,8 @@ + include( CMakeFindDependencyMacro ) + include( "${CMAKE_CURRENT_LIST_DIR}/dateTargets.cmake" ) +-if( NOT MSVC AND TARGET date::tz ) ++if( NOT MSVC AND TARGET date::date-tz ) + find_dependency( Threads REQUIRED) +- get_target_property( _tzill date::tz INTERFACE_LINK_LIBRARIES ) ++ get_target_property( _tzill date::date-tz INTERFACE_LINK_LIBRARIES ) + if( _tzill AND "${_tzill}" MATCHES "libcurl" ) + find_dependency( CURL ) + endif( ) diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt deleted file mode 100644 index bacbf271630e2d..00000000000000 --- a/ports/date/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -cmake_minimum_required(VERSION 3.5.1) -project(tz CXX) - -set(CMAKE_CXX_STANDARD 11) -if(MSVC) - add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) -endif() - -option(HAS_REMOTE_API "" 0) - -add_definitions(-DNOMINMAX -DHAS_REMOTE_API=${HAS_REMOTE_API}) - -add_library(date INTERFACE) -target_include_directories(date INTERFACE $) - -add_library(tz src/tz.cpp) -target_include_directories(tz PUBLIC $ $) - -if(HAS_REMOTE_API) - find_package(CURL REQUIRED) - target_include_directories(tz PUBLIC $) - target_link_libraries(tz PUBLIC ${CURL_LIBRARIES}) -endif() - -if(BUILD_SHARED_LIBS) - target_compile_definitions(tz PRIVATE -DDATE_BUILD_DLL) -endif() - -install( - TARGETS tz date - EXPORT tz - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-date-config.cmake" "include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-date-targets.cmake)\n") - -install(EXPORT tz FILE unofficial-date-targets.cmake NAMESPACE unofficial::date:: DESTINATION share/unofficial-date) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-date-config.cmake DESTINATION share/unofficial-date) - -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES include/date/date.h include/date/tz.h include/date/julian.h include/date/iso_week.h include/date/islamic.h DESTINATION include/date) -endif() diff --git a/ports/date/CONTROL b/ports/date/CONTROL deleted file mode 100644 index 03cd721cbdaef4..00000000000000 --- a/ports/date/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: date -Version: 2019-05-18-1 -Homepage: https://github.com/HowardHinnant/date -Description: A date and time library based on the C++11/14/17 header - -Feature: remote-api -Description: support automatic download of tz data -Build-Depends: curl diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index c82db3330b375d..215f1ef2a24d9b 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -1,6 +1,4 @@ -include(vcpkg_common_functions) - -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_WINDOWS) message(WARNING "You will need to also install https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml into your install location.\n" "See https://howardhinnant.github.io/date/tz.html" @@ -10,37 +8,37 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO HowardHinnant/date - REF ed0368fc75427ef05cefdf19a39b60d7bed2f039 - SHA512 5f6a0d7e094fd1ab7b6a1ea9a96e467138220e9207e2eda68f71b68d6c56759e7470fabdfa920d92876e9c9b466e56ea8102333f407a46bb4cba43a2dfeb5e3a + REF cac99da8dc88be719a728dc1b597b0ac307c1800 #3.0.0 + SHA512 07bac40c9d92ed92f05ab71b07c203fc341cd35999f1eab16d584bf77ff69e2cdc106931b2faf0dcfc5a311ee55e8445a81fd97c62f4672957b6aac1b24a08fd HEAD_REF master + PATCHES + 0001-fix-uwp.patch + 0002-fix-cmake-3.14.patch + 0003-find-dependency-pthread.patch +) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + remote-api USE_SYSTEM_TZ_DB ) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -set(HAS_REMOTE_API 0) -if("remote-api" IN_LIST FEATURES) - set(HAS_REMOTE_API 1) -endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DHAS_REMOTE_API=${HAS_REMOTE_API} - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_TZ_LIB=ON ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-date TARGET_PATH share/unofficial-date) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/date) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/date TARGET_PATH share/date) +endif() vcpkg_copy_pdbs() -set(HEADER "${CURRENT_PACKAGES_DIR}/include/date/tz.h") -file(READ "${HEADER}" _contents) -string(REPLACE "#define TZ_H" "#define TZ_H\n#undef HAS_REMOTE_API\n#define HAS_REMOTE_API ${HAS_REMOTE_API}" _contents "${_contents}") -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "ifdef DATE_BUILD_DLL" "if 1" _contents "${_contents}") -endif() -file(WRITE "${HEADER}" "${_contents}") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright) diff --git a/ports/date/vcpkg.json b/ports/date/vcpkg.json new file mode 100644 index 00000000000000..cbca5d9b0495c8 --- /dev/null +++ b/ports/date/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "date", + "version-string": "3.0.0", + "port-version": 3, + "description": "A date and time library based on the C++17 header", + "homepage": "https://github.com/HowardHinnant/date", + "features": { + "remote-api": { + "description": "support automatic download of tz data", + "dependencies": [ + "curl" + ] + } + } +} diff --git a/ports/dav1d/patch_underscore_prefix.patch b/ports/dav1d/patch_underscore_prefix.patch new file mode 100644 index 00000000000000..30506faf59ed00 --- /dev/null +++ b/ports/dav1d/patch_underscore_prefix.patch @@ -0,0 +1,13 @@ +diff --git a/meson.build b/meson.build +index 07b2586..02acd91 100644 +--- a/meson.build ++++ b/meson.build +@@ -370,7 +370,7 @@ endif + + cdata.set10('ARCH_PPC64LE', host_machine.cpu() == 'ppc64le') + +-if cc.symbols_have_underscore_prefix() ++if cc.symbols_have_underscore_prefix() or (host_machine.cpu_family() == 'x86' and host_machine.system() == 'windows') + cdata.set10('PREFIX', true) + cdata_asm.set10('PREFIX', true) + endif diff --git a/ports/dav1d/portfile.cmake b/ports/dav1d/portfile.cmake new file mode 100644 index 00000000000000..cc109ff43926d7 --- /dev/null +++ b/ports/dav1d/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "x86" ON_TARGET "uwp") + +vcpkg_from_gitlab( + GITLAB_URL https://code.videolan.org + OUT_SOURCE_PATH SOURCE_PATH + REPO videolan/dav1d + REF 0.8.2 + SHA512 2f48c88fdbe627f089eb378f43b8f18e1c5cff4645148ee7e14b8f3f8e9d690b28e58fc9cb466e7a9a4c147f06b0d34c47c132070acefbd01abe23cd3c6047d8 + PATCHES + "patch_underscore_prefix.patch" +) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(${NASM_EXE_PATH}) + +set(LIBRARY_TYPE ${VCPKG_LIBRARY_LINKAGE}) +if (LIBRARY_TYPE STREQUAL "dynamic") + set(LIBRARY_TYPE "shared") +endif(LIBRARY_TYPE STREQUAL "dynamic") + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --default-library=${LIBRARY_TYPE} + -Denable_tests=false + -Denable_tools=false +) + +vcpkg_install_meson() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/ports/dav1d/vcpkg.json b/ports/dav1d/vcpkg.json new file mode 100644 index 00000000000000..aa63b1a8ceeff2 --- /dev/null +++ b/ports/dav1d/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "dav1d", + "version-semver": "0.8.2", + "port-version": 1, + "description": "dav1d is a new open-source AV1 decoder developed by the VideoLAN and FFmpeg communities and sponsored by the Alliance for Open Media.", + "homepage": "https://code.videolan.org/videolan/dav1d", + "supports": "!(uwp | arm | x86)", + "dependencies": [ + "tool-meson" + ] +} diff --git a/ports/daw-header-libraries/portfile.cmake b/ports/daw-header-libraries/portfile.cmake new file mode 100644 index 00000000000000..5bd908cebe8a01 --- /dev/null +++ b/ports/daw-header-libraries/portfile.cmake @@ -0,0 +1,18 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO beached/header_libraries + REF bd372e81e04e256a6ba88217c4b99a3601fb5ef7 #v1.29.7 + SHA512 7aad017e70e79c3244011cbcb719afb385a639e1e4d37955be074bd1d2f501052dcae9347d094a8ef970f3762ebdfe33c90318b2e6891f4b354e823acfee7188 + HEAD_REF master +) + +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +# remove empty lib and debug/lib directories (and duplicate files from debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/daw-header-libraries/vcpkg.json b/ports/daw-header-libraries/vcpkg.json new file mode 100644 index 00000000000000..d203e9597fb968 --- /dev/null +++ b/ports/daw-header-libraries/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "daw-header-libraries", + "version-semver": "1.29.7", + "description": "Set of header-only algorithms used in daw-utf8-range and daw-json-link.", + "homepage": "https://github.com/beached/header_libraries", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/daw-json-link/portfile.cmake b/ports/daw-json-link/portfile.cmake new file mode 100644 index 00000000000000..c9f417ef89ada4 --- /dev/null +++ b/ports/daw-json-link/portfile.cmake @@ -0,0 +1,40 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO beached/daw_json_link + REF 828565f48bd077e776fcef322457186d8f01e7eb #v2.10.2 + SHA512 8c870d778c9abb295d323ae913d9e2bb0255f176c7e4f1d8cdf424af9bbe4c5eb650436065bb47e3e8745ff1c12234959526c8dcdf2c169ab55af4b150e6b477 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DDAW_USE_PACKAGE_MANAGEMENT=ON +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH share/${PORT}/cmake) + +# remove empty lib and debug/lib directories (and duplicate files from debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") + +# Append the json-link and dragonbox license information into a single +# copyright file (they are both Boost v1.0 but it is good to be clear). +file(APPEND "${SOURCE_PATH}/copyright" [=[+----------------------------------------------------------------------------+ +| json-link copywrite | ++----------------------------------------------------------------------------+ +]=]) +file(READ "${SOURCE_PATH}/LICENSE" json_link_copywrite) +file(APPEND "${SOURCE_PATH}/copyright" ${json_link_copywrite}) +file(APPEND "${SOURCE_PATH}/copyright" [=[ + + ++----------------------------------------------------------------------------+ +| dragonbox copywrite | ++----------------------------------------------------------------------------+ +]=]) + +file(READ "${SOURCE_PATH}/LICENSE_Dragonbox" dragonbox_copywrite) +file(APPEND "${SOURCE_PATH}/copyright" ${dragonbox_copywrite}) +file(INSTALL "${SOURCE_PATH}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/daw-json-link/vcpkg.json b/ports/daw-json-link/vcpkg.json new file mode 100644 index 00000000000000..c9470ecc86eecc --- /dev/null +++ b/ports/daw-json-link/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "daw-json-link", + "version-semver": "2.10.2", + "description": "Perhaps the fastest JSON deserializer/serializer posssible or at least close to it.", + "homepage": "https://github.com/beached/daw_json_link", + "dependencies": [ + "daw-utf-range", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/daw-utf-range/portfile.cmake b/ports/daw-utf-range/portfile.cmake new file mode 100644 index 00000000000000..cabdf720be05c4 --- /dev/null +++ b/ports/daw-utf-range/portfile.cmake @@ -0,0 +1,22 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO beached/utf_range + REF cd45b91a1530a68ce019b876a32b1694b4031613 #v2.2.0 + SHA512 21943b488b4efb8696bfe95f80c8043beed8f5f3cc9a34cfb95d34186d6a0ac2354943ebfd767bd6df42837c29e3c467a107d2f8556a7f719833d43f566afa40 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DDAW_USE_PACKAGE_MANAGEMENT=ON +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +# remove empty lib and debug/lib directories (and duplicate files from debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/daw-utf-range/vcpkg.json b/ports/daw-utf-range/vcpkg.json new file mode 100644 index 00000000000000..60581e13dc3942 --- /dev/null +++ b/ports/daw-utf-range/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "daw-utf-range", + "version-semver": "2.2.0", + "description": "Header-only utf8 string range used by daw-json-link. Includes a constexpr/noexcept modified version of utfcpp.", + "homepage": "https://github.com/beached/header_libraries", + "dependencies": [ + "daw-header-libraries", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/dbg-macro/CONTROL b/ports/dbg-macro/CONTROL deleted file mode 100644 index 80a2e3165e9b24..00000000000000 --- a/ports/dbg-macro/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: dbg-macro -Version: 2019-07-11 -Description: A dbg(...) macro for C++ -Homepage: https://github.com/sharkdp/dbg-macro diff --git a/ports/dbg-macro/portfile.cmake b/ports/dbg-macro/portfile.cmake index 3aee7268dd9f8e..5c013e9d110280 100644 --- a/ports/dbg-macro/portfile.cmake +++ b/ports/dbg-macro/portfile.cmake @@ -1,7 +1,5 @@ # single header file library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sharkdp/dbg-macro diff --git a/ports/dbg-macro/vcpkg.json b/ports/dbg-macro/vcpkg.json new file mode 100644 index 00000000000000..23cdf24d15fd63 --- /dev/null +++ b/ports/dbg-macro/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "dbg-macro", + "version-string": "2019-07-11", + "port-version": 1, + "description": "A dbg(...) macro for C++", + "homepage": "https://github.com/sharkdp/dbg-macro" +} diff --git a/ports/dbghelp/portfile.cmake b/ports/dbghelp/portfile.cmake new file mode 100644 index 00000000000000..832bec6d74c498 --- /dev/null +++ b/ports/dbghelp/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_fail_port_install(ON_TARGET "OSX" "Linux") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_get_windows_sdk(WINDOWS_SDK) + +if (WINDOWS_SDK VERSION_GREATER "10") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Debuggers\\lib\\${TRIPLET_SYSTEM_ARCH}\\dbghelp.lib") + message("LIBFILEPATH: ${LIBFILEPATH}") + set(DLLFILEPATH "$ENV{WindowsSdkDir}Debuggers\\${TRIPLET_SYSTEM_ARCH}\\dbghelp.dll") + message("DLLFILEPATH: ${DLLFILEPATH}") + set(HEADERPATH "$ENV{WindowsSdkDir}Debuggers\\inc\\dbghelp.h") + message("HEADERPATH: ${HEADERPATH}") +else() + message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") +endif() + +if (NOT EXISTS "${LIBFILEPATH}" OR NOT EXISTS "${DLLFILEPATH}" OR NOT EXISTS "${HEADERPATH}") + message(FATAL_ERROR "Cannot find debugging tools in Windows SDK ${WINDOWS_SDK}. Please reinstall the Windows SDK and select \"Debugging Tools\".") +endif() + +file(INSTALL ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${DLLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(INSTALL ${DLLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(INSTALL ${HEADERPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") diff --git a/ports/dbghelp/vcpkg.json b/ports/dbghelp/vcpkg.json new file mode 100644 index 00000000000000..cb7786a83e03b1 --- /dev/null +++ b/ports/dbghelp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "dbghelp", + "version-string": "0.0", + "port-version": 1, + "description": "Windows Debug Help Library", + "supports": "windows" +} diff --git a/ports/dbow2/CONTROL b/ports/dbow2/CONTROL deleted file mode 100644 index 4b5c4c1e048e4a..00000000000000 --- a/ports/dbow2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: dbow2 -Version: 2019-08-05 -Homepage: https://github.com/dorian3d/DBoW2 -Description: DBoW2 is an improved version of the DBow library, an open source C++ library for indexing and converting images into a bag-of-word representation. -Build-Depends: opencv diff --git a/ports/dbow2/portfile.cmake b/ports/dbow2/portfile.cmake index c569e89ac0f49f..1518c782075e8b 100644 --- a/ports/dbow2/portfile.cmake +++ b/ports/dbow2/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/dbow2/vcpkg.json b/ports/dbow2/vcpkg.json new file mode 100644 index 00000000000000..6f0fec46d324ab --- /dev/null +++ b/ports/dbow2/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "dbow2", + "version-string": "2019-08-05", + "port-version": 1, + "description": "DBoW2 is an improved version of the DBow library, an open source C++ library for indexing and converting images into a bag-of-word representation.", + "homepage": "https://github.com/dorian3d/DBoW2", + "dependencies": [ + "opencv" + ] +} diff --git a/ports/dbow3/fix_cmake.patch b/ports/dbow3/fix_cmake.patch new file mode 100644 index 00000000000000..0b802425e3279a --- /dev/null +++ b/ports/dbow3/fix_cmake.patch @@ -0,0 +1,2496 @@ +From d72cb42f5147f7648c462ee1b211070c1691a887 Mon Sep 17 00:00:00 2001 +From: Ramadan +Date: Thu, 15 Aug 2019 12:27:19 +0200 +Subject: [PATCH 1/2] Fix CMakeLists.txt and installation + +--- + .gitignore | 249 ++++++++++ + CMakeLists.txt | 275 +---------- + Lib/CMakeLists.txt | 99 ++++ + Lib/DBow3Config.cmake | 4 + + {src => Lib/include/DBow3}/BowVector.h | 1 + + {src => Lib/include/DBow3}/DBoW3.h | 0 + {src => Lib/include/DBow3}/Database.h | 0 + {src => Lib/include/DBow3}/DescManip.h | 0 + {src => Lib/include/DBow3}/FeatureVector.h | 0 + {src => Lib/include/DBow3}/QueryResults.h | 0 + {src => Lib/include/DBow3}/ScoringObject.h | 0 + {src => Lib/include/DBow3}/Vocabulary.h | 0 + {src => Lib/include/DBow3}/exports.h | 16 +- + {src => Lib/include/DBow3}/quicklz.h | 0 + {src => Lib/include/DBow3}/timers.h | 0 + {src => Lib/src}/BowVector.cpp | 2 +- + {src => Lib/src}/Database.cpp | 2 +- + {src => Lib/src}/DescManip.cpp | 546 ++++++++++----------- + {src => Lib/src}/FeatureVector.cpp | 2 +- + {src => Lib/src}/QueryResults.cpp | 2 +- + {src => Lib/src}/ScoringObject.cpp | 4 +- + {src => Lib/src}/Vocabulary.cpp | 8 +- + {src => Lib/src}/quicklz.c | 2 +- + cmake/instructionSet.cmake | 13 + + cmake_uninstall.cmake.in | 28 -- + config.cmake.in | 36 -- + {utils => examples}/CMakeLists.txt | 0 + {utils => examples}/create_voc_step0.cpp | 252 +++++----- + {utils => examples}/create_voc_step1.cpp | 142 +++--- + {utils => examples}/demo_general.cpp | 404 +++++++-------- + {utils => examples}/images/image0.png | Bin + {utils => examples}/images/image1.png | Bin + {utils => examples}/images/image2.png | Bin + {utils => examples}/images/image3.png | Bin + src/CMakeLists.txt | 35 -- + orbvoc.dbow3 => voc/orbvoc.dbow3 | Bin + 36 files changed, 1072 insertions(+), 1050 deletions(-) + create mode 100644 .gitignore + create mode 100644 Lib/CMakeLists.txt + create mode 100644 Lib/DBow3Config.cmake + rename {src => Lib/include/DBow3}/BowVector.h (99%) + rename {src => Lib/include/DBow3}/DBoW3.h (100%) + rename {src => Lib/include/DBow3}/Database.h (100%) + rename {src => Lib/include/DBow3}/DescManip.h (100%) + rename {src => Lib/include/DBow3}/FeatureVector.h (100%) + rename {src => Lib/include/DBow3}/QueryResults.h (100%) + rename {src => Lib/include/DBow3}/ScoringObject.h (100%) + rename {src => Lib/include/DBow3}/Vocabulary.h (100%) + rename {src => Lib/include/DBow3}/exports.h (78%) + rename {src => Lib/include/DBow3}/quicklz.h (100%) + rename {src => Lib/include/DBow3}/timers.h (100%) + rename {src => Lib/src}/BowVector.cpp (99%) + rename {src => Lib/src}/Database.cpp (99%) + rename {src => Lib/src}/DescManip.cpp (96%) + rename {src => Lib/src}/FeatureVector.cpp (98%) + rename {src => Lib/src}/QueryResults.cpp (97%) + rename {src => Lib/src}/ScoringObject.cpp (99%) + rename {src => Lib/src}/Vocabulary.cpp (99%) + rename {src => Lib/src}/quicklz.c (99%) + create mode 100644 cmake/instructionSet.cmake + delete mode 100644 cmake_uninstall.cmake.in + delete mode 100644 config.cmake.in + rename {utils => examples}/CMakeLists.txt (100%) + rename {utils => examples}/create_voc_step0.cpp (97%) + rename {utils => examples}/create_voc_step1.cpp (97%) + rename {utils => examples}/demo_general.cpp (96%) + rename {utils => examples}/images/image0.png (100%) + rename {utils => examples}/images/image1.png (100%) + rename {utils => examples}/images/image2.png (100%) + rename {utils => examples}/images/image3.png (100%) + delete mode 100644 src/CMakeLists.txt + rename orbvoc.dbow3 => voc/orbvoc.dbow3 (100%) + +diff --git a/.gitignore b/.gitignore +new file mode 100644 +index 0000000..8c4285e +--- /dev/null ++++ b/.gitignore +@@ -0,0 +1,249 @@ ++## Ignore Visual Studio temporary files, build results, and ++## files generated by popular Visual Studio add-ons. ++ ++# User-specific files ++*.suo ++*.user ++*.userosscache ++*.sln.docstates ++ ++# User-specific files (MonoDevelop/Xamarin Studio) ++*.userprefs ++ ++# Build results ++[Dd]ebug/ ++[Dd]ebugPublic/ ++[Rr]elease/ ++[Rr]eleases/ ++[Xx]64/ ++[Xx]86/ ++[Bb]uild/ ++bld/ ++[Bb]in/ ++[Oo]bj/ ++ ++# Visual Studio 2015 cache/options directory ++.vs/ ++out/ ++# Uncomment if you have tasks that create the project's static files in wwwroot ++#wwwroot/ ++ ++# MSTest test Results ++[Tt]est[Rr]esult*/ ++[Bb]uild[Ll]og.* ++ ++# NUNIT ++*.VisualState.xml ++TestResult.xml ++ ++# Build Results of an ATL Project ++[Dd]ebugPS/ ++[Rr]eleasePS/ ++dlldata.c ++ ++# DNX ++project.lock.json ++artifacts/ ++ ++*_i.c ++*_p.c ++*_i.h ++*.ilk ++*.meta ++*.obj ++*.pch ++*.pdb ++*.pgc ++*.pgd ++*.rsp ++*.sbr ++*.tlb ++*.tli ++*.tlh ++*.tmp ++*.tmp_proj ++*.log ++*.vspscc ++*.vssscc ++.builds ++*.pidb ++*.svclog ++*.scc ++*.tlog ++*.idb ++# Chutzpah Test files ++_Chutzpah* ++ ++# Visual C++ cache files ++ipch/ ++*.aps ++*.ncb ++*.opendb ++*.opensdf ++*.sdf ++*.cachefile ++*.VC.db ++ ++# Visual Studio profiler ++*.psess ++*.vsp ++*.vspx ++*.sap ++ ++# TFS 2012 Local Workspace ++$tf/ ++ ++# Guidance Automation Toolkit ++*.gpState ++ ++# ReSharper is a .NET coding add-in ++_ReSharper*/ ++*.[Rr]e[Ss]harper ++*.DotSettings.user ++ ++# JustCode is a .NET coding add-in ++.JustCode ++ ++# TeamCity is a build add-in ++_TeamCity* ++ ++# DotCover is a Code Coverage Tool ++*.dotCover ++ ++# NCrunch ++_NCrunch_* ++.*crunch*.local.xml ++nCrunchTemp_* ++ ++# MightyMoose ++*.mm.* ++AutoTest.Net/ ++ ++# Web workbench (sass) ++.sass-cache/ ++ ++# Installshield output folder ++[Ee]xpress/ ++ ++# DocProject is a documentation generator add-in ++DocProject/buildhelp/ ++DocProject/Help/*.HxT ++DocProject/Help/*.HxC ++DocProject/Help/*.hhc ++DocProject/Help/*.hhk ++DocProject/Help/*.hhp ++DocProject/Help/Html2 ++DocProject/Help/html ++ ++# Click-Once directory ++publish/ ++ ++# Publish Web Output ++*.[Pp]ublish.xml ++*.azurePubxml ++ ++# TODO: Un-comment the next line if you do not want to checkin ++# your web deploy settings because they may include unencrypted ++# passwords ++#*.pubxml ++*.publishproj ++ ++# NuGet Packages ++*.nupkg ++# The packages folder can be ignored because of Package Restore ++**/packages/* ++# except build/, which is used as an MSBuild target. ++!**/packages/build/ ++# Uncomment if necessary however generally it will be regenerated when needed ++#!**/packages/repositories.config ++# NuGet v3's project.json files produces more ignoreable files ++*.nuget.props ++*.nuget.targets ++ ++# Microsoft Azure Build Output ++csx/ ++*.build.csdef ++ ++# Microsoft Azure Emulator ++ecf/ ++rcf/ ++ ++# Microsoft Azure ApplicationInsights config file ++ApplicationInsights.config ++ ++# Windows Store app package directory ++AppPackages/ ++BundleArtifacts/ ++ ++# Visual Studio cache files ++# files ending in .cache can be ignored ++*.[Cc]ache ++# but keep track of directories ending in .cache ++!*.[Cc]ache/ ++ ++# Others ++ClientBin/ ++[Ss]tyle[Cc]op.* ++~$* ++*~ ++*.dbmdl ++*.dbproj.schemaview ++*.pfx ++*.publishsettings ++node_modules/ ++orleans.codegen.cs ++ ++# RIA/Silverlight projects ++Generated_Code/ ++ ++# Backup & report files from converting an old project file ++# to a newer Visual Studio version. Backup files are not needed, ++# because we have git ;-) ++_UpgradeReport_Files/ ++Backup*/ ++UpgradeLog*.XML ++UpgradeLog*.htm ++ ++# SQL Server files ++*.mdf ++*.ldf ++ ++# Business Intelligence projects ++*.rdl.data ++*.bim.layout ++*.bim_*.settings ++ ++# Microsoft Fakes ++FakesAssemblies/ ++ ++# GhostDoc plugin setting file ++*.GhostDoc.xml ++ ++# Node.js Tools for Visual Studio ++.ntvs_analysis.dat ++ ++# Visual Studio 6 build log ++*.plg ++ ++# Visual Studio 6 workspace options file ++*.opt ++ ++# Visual Studio LightSwitch build output ++**/*.HTMLClient/GeneratedArtifacts ++**/*.DesktopClient/GeneratedArtifacts ++**/*.DesktopClient/ModelManifest.xml ++**/*.Server/GeneratedArtifacts ++**/*.Server/ModelManifest.xml ++_Pvt_Extensions ++ ++# LightSwitch generated files ++GeneratedArtifacts/ ++ModelManifest.xml ++ ++# Paket dependency manager ++.paket/paket.exe ++ ++# FAKE - F# Make ++.fake/ ++html ++xml +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9541cd7..a2a563a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,268 +1,25 @@ +-# ---------------------------------------------------------------------------- +-# Basic Configuration +-# ---------------------------------------------------------------------------- +-CMAKE_MINIMUM_REQUIRED(VERSION 2.8) ++cmake_minimum_required(VERSION 3.10) + +-set(CMAKE_CXX_STANDARD 11) ++project(DBow3 VERSION 1.0.0) + +-PROJECT(DBoW3) +-set(PROJECT_VERSION "0.0.1") +-string(REGEX MATCHALL "[0-9]" PROJECT_VERSION_PARTS "${PROJECT_VERSION}") +-list(GET PROJECT_VERSION_PARTS 0 PROJECT_VERSION_MAJOR) +-list(GET PROJECT_VERSION_PARTS 1 PROJECT_VERSION_MINOR) +-list(GET PROJECT_VERSION_PARTS 2 PROJECT_VERSION_PATCH) +-set(PROJECT_SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") ++option(BUILD_EXAMPLES "Set to ON to build examples" OFF) ++option(BUILD_TESTS "Set to ON to build tests" OFF) ++option(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON) + +-message("LIB_INSTALL_DIR: ${LIB_INSTALL_DIR}") ++# OpenCV ++option(USE_OPENCV_CONTRIB "Set on to use opencv-contrib" ON) + +-#------------------------------------------------------ +-# Build type +-#------------------------------------------------------ ++# Optimization ++option(USE_SIMD "Set on to enabel avx optimization" ON) + +-IF(NOT CMAKE_BUILD_TYPE ) +- SET( CMAKE_BUILD_TYPE "Release" ) +-ENDIF() + +-#------------------------------------------------------ +-# Lib Names and Dirs +-#------------------------------------------------------ ++add_subdirectory(Lib) + +-if(WIN32) +- # Postfix of DLLs: +- SET(PROJECT_DLLVERSION "${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR}${PROJECT_VERSION_PATCH}") +- SET(RUNTIME_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH "Directory for dlls and binaries") +- SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH "Directory for binaries") +- SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH "Directory for dlls") +-else() +- # Postfix of so's: +- set(PROJECT_DLLVERSION) +- set(LIB_INSTALL_DIR lib CACHE STRING "Install location of libraries (e.g. lib32 or lib64 for multilib installations)") +- SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/cmake/ /usr/${LIB_INSTALL_DIR}/cmake ) +-endif() ++if(BUILD_EXAMPLES) ++ add_subdirectory(examples) ++endif(BUILD_EXAMPLES) + ++if(BUILD_TESTS) ++ add_subdirectory(tests) ++endif(BUILD_TESTS) + +- +-# +-OPTION(BUILD_UTILS "Set to OFF to not build utils" ON) +-OPTION(USE_CONTRIB "Set to ON if contrib are installed" OFF) +-OPTION(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON) +- +-# ---------------------------------------------------------------------------- +-# Find Dependencies +-# ---------------------------------------------------------------------------- +-find_package(OpenCV REQUIRED) +-IF(USE_CONTRIB) +-add_definitions(-DUSE_CONTRIB) +-ENDIF() +-if(NOT OpenCV_VERSION VERSION_LESS "3.0") +- ADD_DEFINITIONS(-DOPENCV_VERSION_3) +- SET(OPENCV_VERSION_3 ON) +-ELSE() +- SET(OPENCV_VERSION_3 OFF) +-ENDIF() +- +-include_directories(${OpenCV_INCLUDE_DIRS}) +- +-SET(REQUIRED_LIBRARIES ${REQUIRED_LIBRARIES} ${OpenCV_LIBS}) +- +-# ---------------------------------------------------------------------------- +-# PROJECT CONFIGURATION +-# force some variables that could be defined in the command line to be written to cache +-# ---------------------------------------------------------------------------- +-OPTION(INSTALL_DOC "Set to ON to build/install Documentation" OFF) +-IF (INSTALL_DOC) +- FIND_PACKAGE(Doxygen REQUIRED) +- MESSAGE( STATUS "INSTALL_DOC: ${INSTALL_DOC} ") +- INCLUDE("${PROJECT_SOURCE_DIR}/generateDoc.cmake") +- GENERATE_DOCUMENTATION(${PROJECT_SOURCE_DIR}/dox.in) +-ENDIF() +- +-# ---------------------------------------------------------------------------- +-# Uninstall target, for "make uninstall" +-# ---------------------------------------------------------------------------- +-CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) +-ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") +- +-# ---------------------------------------------------------------------------- +-# create configuration file from .in file (If you use windows take care with paths) +-# ---------------------------------------------------------------------------- +- +-CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/config.cmake.in" "${PROJECT_BINARY_DIR}/Find${PROJECT_NAME}.cmake") +-CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/config.cmake.in" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake") +-INSTALL(FILES "${PROJECT_BINARY_DIR}/Find${PROJECT_NAME}.cmake" DESTINATION ${LIB_INSTALL_DIR}/cmake/ ) +-INSTALL(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" DESTINATION ${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} ) +- +- +- +- +-# ---------------------------------------------------------------------------- +-# Program Optimization and debug (Extracted from OpenCV) +-# ---------------------------------------------------------------------------- +-set(WARNINGS_ARE_ERRORS OFF CACHE BOOL "Treat warnings as errors") +-set(WHOLE_PROGRAM_OPTIMIZATION OFF CACHE BOOL "Flags for whole program optimization.") +- +-set(EXTRA_C_FLAGS "") +-set(EXTRA_C_FLAGS_RELEASE "") +-set(EXTRA_C_FLAGS_DEBUG "") +-set(EXTRA_EXE_LINKER_FLAGS "") +-set(EXTRA_EXE_LINKER_FLAGS_RELEASE "") +-set(EXTRA_EXE_LINKER_FLAGS_DEBUG "") +- +-IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW) +- set(ENABLE_PROFILING OFF CACHE BOOL "Enable profiling in the GCC compiler (Add flags: -g -pg)") +- set(USE_OMIT_FRAME_POINTER ON CACHE BOOL "Enable -fomit-frame-pointer for GCC") +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES arm*) # We can use only -O2 because the -O3 causes gcc crash +- set(USE_O2 ON CACHE BOOL "Enable -O2 for GCC") +- set(USE_FAST_MATH OFF CACHE BOOL "Enable -ffast-math for GCC") +- endif() +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES powerpc*) +- set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC") +- set(USE_POWERPC ON CACHE BOOL "Enable PowerPC for GCC") +- endif () +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64*) +- set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC") +- set(USE_FAST_MATH OFF CACHE BOOL "Enable -ffast-math for GCC") +- set(USE_MMX ON CACHE BOOL "Enable MMX for GCC") +- set(USE_SSE ON CACHE BOOL "Enable SSE for GCC") +- set(USE_SSE2 ON CACHE BOOL "Enable SSE2 for GCC") +- set(USE_SSE3 ON CACHE BOOL "Enable SSE3 for GCC") +- endif() +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES x86) +- set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC") +- set(USE_FAST_MATH OFF CACHE BOOL "Enable -ffast-math for GCC") +- set(USE_MMX ON CACHE BOOL "Enable MMX for GCC") +- set(USE_SSE OFF CACHE BOOL "Enable SSE for GCC") +- set(USE_SSE2 OFF CACHE BOOL "Enable SSE2 for GCC") +- set(USE_SSE3 OFF CACHE BOOL "Enable SSE3 for GCC") +- endif () +- +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wall") +- +- if(WARNINGS_ARE_ERRORS) +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") +- endif() +- +- # The -Wno-long-long is required in 64bit systems when including sytem headers. +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*) +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-long-long") +- endif() +- +- # Whole program optimization +- if(WHOLE_PROGRAM_OPTIMIZATION) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -fwhole-program --combine") +- endif() +- +- # Other optimizations +- if(USE_OMIT_FRAME_POINTER) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -fomit-frame-pointer") +- endif() +- if(USE_O2) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -O2") +- endif() +- if(USE_O3) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -O3") +- endif() +- if(USE_FAST_MATH) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -ffast-math") +- endif() +- if(USE_POWERPC) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -mcpu=G3 -mtune=G5") +- endif() +- if(USE_MMX) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -mmmx") +- endif() +- if(USE_SSE) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -msse") +- endif() +- if(USE_SSE2) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -msse2") +- endif() +- if(USE_SSE3 AND NOT MINGW) # SSE3 should be disabled under MingW because it generates compiler errors +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -msse3") +- endif() +- +- if(ENABLE_PROFILING) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -pg -g") +- else() +- if(NOT APPLE) +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -ffunction-sections") +- endif() +- endif() +- +- +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -DNDEBUG ") +- set(EXTRA_C_FLAGS_DEBUG "-g3 -O0 -DDEBUG -D_DEBUG -W -Wextra -Wno-return-type ") +- +- MESSAGE( STATUS "-------------------------------------------------------------------------------" ) +- message( STATUS "GNU COMPILER") +- MESSAGE( STATUS "-------------------------------------------------------------------------------" ) +- +- +- +- +-ELSE() # MSVC +- +- +-ENDIF()#END OF COMPILER SPECIFIC OPTIONS +-SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS_RELEASE}") +-SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS_DEBUG}") +-SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -std=c++11") +-SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -std=c++11") +-set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS_DEBUG}") +-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_DEBUG}") +-SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_EXE_LINKER_FLAGS}") +-SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${EXTRA_EXE_LINKER_FLAGS_RELEASE}") +-SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${EXTRA_EXE_LINKER_FLAGS_DEBUG}") +- +- +- +-#------------------------------------------------ +-# DIRS +-#------------------------------------------------ +-ADD_SUBDIRECTORY(src) +-IF (BUILD_UTILS) +-ADD_SUBDIRECTORY(utils) +-ENDIF() +- +-IF (BUILD_TESTS) +-ADD_SUBDIRECTORY(tests) +-ENDIF() +- +- +-# ---------------------------------------------------------------------------- +-# display status message for important variables +-# ---------------------------------------------------------------------------- +-message( STATUS ) +-MESSAGE( STATUS "-------------------------------------------------------------------------------" ) +-message( STATUS "General configuration for ${PROJECT_NAME} ${PROJECT_VERSION}") +-MESSAGE( STATUS "-------------------------------------------------------------------------------" ) +-message(" Built as dynamic libs?:" ${BUILD_SHARED_LIBS}) +-message(" Compiler:" "${CMAKE_COMPILER}" "${CMAKE_CXX_COMPILER}") +- +-message( STATUS "Build Type: ${CMAKE_BUILD_TYPE}") +-message( STATUS "C++ flags (Release): ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") +-message( STATUS "C++ flags (Debug): ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") +-message( STATUS "C++ flags (Relase+Debug): ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") +- +-message( STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") +-message( STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}") +- +-MESSAGE( STATUS ) +-MESSAGE( STATUS "CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}" ) +-MESSAGE( STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}" ) +-MESSAGE( STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}" ) +-MESSAGE( STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}" ) +-MESSAGE( STATUS "BUILD_UTILS= ${BUILD_UTILS}" ) +-MESSAGE( STATUS "BUILD_TESTS= ${BUILD_TESTS}" ) +-MESSAGE( STATUS "OPENCV_DIR= ${OpenCV_DIR} VERSION=${OpenCV_VERSION}" ) +- +-MESSAGE( STATUS "USE_CONTRIB= ${USE_CONTRIB}" ) +- +-MESSAGE( STATUS ) +-MESSAGE( STATUS "OpenCV_LIB_DIR=${OpenCV_LIB_DIR}") +-MESSAGE( STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}") +- +-MESSAGE( STATUS ) +-MESSAGE( STATUS ) +-MESSAGE( STATUS "Change a value with: cmake -D=" ) +-MESSAGE( STATUS ) +diff --git a/Lib/CMakeLists.txt b/Lib/CMakeLists.txt +new file mode 100644 +index 0000000..e56077b +--- /dev/null ++++ b/Lib/CMakeLists.txt +@@ -0,0 +1,99 @@ ++cmake_minimum_required(VERSION 3.10) ++ ++find_package(OpenCV REQUIRED) ++ ++find_package(OpenMP REQUIRED) ++ ++include(${CMAKE_SOURCE_DIR}/cmake/instructionSet.cmake) ++ ++if(BUILD_SHARED_LIBS) ++ add_library(DBow3 SHARED) ++ ++ target_compile_definitions(DBow3 ++ PUBLIC ++ DBOW_API ++ ) ++ ++else() ++ add_library(DBow3 STATIC) ++endif() ++ ++add_library(DBow3::DBow3 ALIAS DBow3) ++ ++target_sources(DBow3 ++ PRIVATE ++ src/BowVector.cpp ++ src/Database.cpp ++ src/DescManip.cpp ++ src/FeatureVector.cpp ++ src/QueryResults.cpp ++ src/ScoringObject.cpp ++ src/Vocabulary.cpp ++ src/quicklz.c ++) ++ ++target_include_directories(DBow3 ++ PUBLIC ++ $ ++ $ ++) ++ ++target_link_libraries(DBow3 ++ PUBLIC ++ OpenMP::OpenMP_CXX ++) ++ ++if(USE_OPENCV_CONTRIB) ++target_link_libraries(DBow3 ++ PUBLIC ++ ${OpenCV_LIBS} ++) ++ ++target_include_directories(DBow3 ++ PUBLIC ++ ${OpenCV_INCLUDE_DIR} ++) ++endif() ++ ++if(USE_SIMD) ++ target_link_libraries(DBow3 ++ PRIVATE ++ SIMD::SSE4.1 ++ ) ++endif() ++ ++target_compile_definitions(DBow3 ++ PUBLIC ++ NOMINMAX ++ _USE_MATH_DEFINES ++) ++ ++target_compile_features(DBow3 ++ PRIVATE ++ cxx_std_14 ++) ++ ++ ++install(TARGETS DBow3 EXPORT DBow3Targets ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ RUNTIME DESTINATION bin ++ INCLUDES DESTINATION include ++) ++ ++install (DIRECTORY include/ DESTINATION include) ++ ++install(EXPORT DBow3Targets ++ FILE DBow3Targets.cmake ++ NAMESPACE DBow3:: ++ DESTINATION cmake/DBow3 ++) ++ ++include(CMakePackageConfigHelpers) ++ ++write_basic_package_version_file(DBow3ConfigVersion.cmake ++ COMPATIBILITY SameMajorVersion ++) ++ ++install(FILES DBow3Config.cmake ${CMAKE_CURRENT_BINARY_DIR}/DBow3ConfigVersion.cmake ++ DESTINATION cmake/DBow3) +\ No newline at end of file +diff --git a/Lib/DBow3Config.cmake b/Lib/DBow3Config.cmake +new file mode 100644 +index 0000000..9720a14 +--- /dev/null ++++ b/Lib/DBow3Config.cmake +@@ -0,0 +1,4 @@ ++include(CMakeFindDependencyMacro) ++find_dependency(OpenCV) ++find_dependency(OpenMP) ++include("${CMAKE_CURRENT_LIST_DIR}/FbowTargets.cmake") +\ No newline at end of file +diff --git a/src/BowVector.h b/Lib/include/DBow3/BowVector.h +similarity index 99% +rename from src/BowVector.h +rename to Lib/include/DBow3/BowVector.h +index d8c17e0..cdbf517 100644 +--- a/src/BowVector.h ++++ b/Lib/include/DBow3/BowVector.h +@@ -12,6 +12,7 @@ + + #include + #include ++#include + #include "exports.h" + #if _WIN32 + #include +diff --git a/src/DBoW3.h b/Lib/include/DBow3/DBoW3.h +similarity index 100% +rename from src/DBoW3.h +rename to Lib/include/DBow3/DBoW3.h +diff --git a/src/Database.h b/Lib/include/DBow3/Database.h +similarity index 100% +rename from src/Database.h +rename to Lib/include/DBow3/Database.h +diff --git a/src/DescManip.h b/Lib/include/DBow3/DescManip.h +similarity index 100% +rename from src/DescManip.h +rename to Lib/include/DBow3/DescManip.h +diff --git a/src/FeatureVector.h b/Lib/include/DBow3/FeatureVector.h +similarity index 100% +rename from src/FeatureVector.h +rename to Lib/include/DBow3/FeatureVector.h +diff --git a/src/QueryResults.h b/Lib/include/DBow3/QueryResults.h +similarity index 100% +rename from src/QueryResults.h +rename to Lib/include/DBow3/QueryResults.h +diff --git a/src/ScoringObject.h b/Lib/include/DBow3/ScoringObject.h +similarity index 100% +rename from src/ScoringObject.h +rename to Lib/include/DBow3/ScoringObject.h +diff --git a/src/Vocabulary.h b/Lib/include/DBow3/Vocabulary.h +similarity index 100% +rename from src/Vocabulary.h +rename to Lib/include/DBow3/Vocabulary.h +diff --git a/src/exports.h b/Lib/include/DBow3/exports.h +similarity index 78% +rename from src/exports.h +rename to Lib/include/DBow3/exports.h +index c324953..a31b317 100644 +--- a/src/exports.h ++++ b/Lib/include/DBow3/exports.h +@@ -35,17 +35,15 @@ or implied, of Rafael Muñoz Salinas. + #define _CRT_SECURE_NO_DEPRECATE /* to avoid multiple Visual Studio 2005 warnings */ + #endif + +-#if (defined WIN32 || defined _WIN32 || defined WINCE) && defined DBOW_DSO_EXPORTS +- #define DBOW_API __declspec(dllexport) +- #pragma warning ( disable : 4251 ) //disable warning to templates with dll linkage. +- #pragma warning ( disable : 4290 ) //disable warning due to exception specifications. +- #pragma warning ( disable : 4996 ) //disable warning regarding unsafe vsprintf. +- #pragma warning ( disable : 4244 ) //disable warning convesions with lost of data. +- ++#ifdef _WIN32 ++# ifdef DBOW_API ++# define DBOW_API __declspec(dllexport) ++# else ++# define DBOW_API __declspec(dllimport) ++# endif + #else +- #define DBOW_API ++# define DBOW_API + #endif + +- + #define DBOW_VERSION "3.0.0" + #endif +diff --git a/src/quicklz.h b/Lib/include/DBow3/quicklz.h +similarity index 100% +rename from src/quicklz.h +rename to Lib/include/DBow3/quicklz.h +diff --git a/src/timers.h b/Lib/include/DBow3/timers.h +similarity index 100% +rename from src/timers.h +rename to Lib/include/DBow3/timers.h +diff --git a/src/BowVector.cpp b/Lib/src/BowVector.cpp +similarity index 99% +rename from src/BowVector.cpp +rename to Lib/src/BowVector.cpp +index d132213..f61d421 100644 +--- a/src/BowVector.cpp ++++ b/Lib/src/BowVector.cpp +@@ -13,7 +13,7 @@ + #include + #include + +-#include "BowVector.h" ++#include "DBow3/BowVector.h" + + namespace DBoW3 { + +diff --git a/src/Database.cpp b/Lib/src/Database.cpp +similarity index 99% +rename from src/Database.cpp +rename to Lib/src/Database.cpp +index d8a1b81..25610a0 100644 +--- a/src/Database.cpp ++++ b/Lib/src/Database.cpp +@@ -1,4 +1,4 @@ +-#include "Database.h" ++#include "DBow3/Database.h" + + namespace DBoW3{ + +diff --git a/src/DescManip.cpp b/Lib/src/DescManip.cpp +similarity index 96% +rename from src/DescManip.cpp +rename to Lib/src/DescManip.cpp +index d6331af..430ce2b 100644 +--- a/src/DescManip.cpp ++++ b/Lib/src/DescManip.cpp +@@ -1,273 +1,273 @@ +-/** +- * File: DescManip.cpp +- * Date: June 2012 +- * Author: Dorian Galvez-Lopez +- * Description: functions for ORB descriptors +- * License: see the LICENSE.txt file +- * +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "DescManip.h" +- +-using namespace std; +- +-namespace DBoW3 { +- +-// -------------------------------------------------------------------------- +- +-void DescManip::meanValue(const std::vector &descriptors, +- cv::Mat &mean) +-{ +- +- if(descriptors.empty()) return; +- +- if(descriptors.size() == 1) +- { +- mean = descriptors[0].clone(); +- return; +- } +- //binary descriptor +- if (descriptors[0].type()==CV_8U ){ +- //determine number of bytes of the binary descriptor +- int L= getDescSizeBytes( descriptors[0]); +- vector sum( L * 8, 0); +- +- for(size_t i = 0; i < descriptors.size(); ++i) +- { +- const cv::Mat &d = descriptors[i]; +- const unsigned char *p = d.ptr(); +- +- for(int j = 0; j < d.cols; ++j, ++p) +- { +- if(*p & (1 << 7)) ++sum[ j*8 ]; +- if(*p & (1 << 6)) ++sum[ j*8 + 1 ]; +- if(*p & (1 << 5)) ++sum[ j*8 + 2 ]; +- if(*p & (1 << 4)) ++sum[ j*8 + 3 ]; +- if(*p & (1 << 3)) ++sum[ j*8 + 4 ]; +- if(*p & (1 << 2)) ++sum[ j*8 + 5 ]; +- if(*p & (1 << 1)) ++sum[ j*8 + 6 ]; +- if(*p & (1)) ++sum[ j*8 + 7 ]; +- } +- } +- +- mean = cv::Mat::zeros(1, L, CV_8U); +- unsigned char *p = mean.ptr(); +- +- const int N2 = (int)descriptors.size() / 2 + descriptors.size() % 2; +- for(size_t i = 0; i < sum.size(); ++i) +- { +- if(sum[i] >= N2) +- { +- // set bit +- *p |= 1 << (7 - (i % 8)); +- } +- +- if(i % 8 == 7) ++p; +- } +- } +- //non binary descriptor +- else{ +- assert(descriptors[0].type()==CV_32F );//ensure it is float +- +- mean.create(1, descriptors[0].cols,descriptors[0].type()); +- mean.setTo(cv::Scalar::all(0)); +- float inv_s =1./double( descriptors.size()); +- for(size_t i=0;i(); // a & b are actually CV_8U +- pb = b.ptr(); +- +- uint64_t v, ret = 0; +- for(size_t i = 0; i < a.cols / sizeof(uint64_t); ++i, ++pa, ++pb) +- { +- v = *pa ^ *pb; +- v = v - ((v >> 1) & (uint64_t)~(uint64_t)0/3); +- v = (v & (uint64_t)~(uint64_t)0/15*3) + ((v >> 2) & +- (uint64_t)~(uint64_t)0/15*3); +- v = (v + (v >> 4)) & (uint64_t)~(uint64_t)0/255*15; +- ret += (uint64_t)(v * ((uint64_t)~(uint64_t)0/255)) >> +- (sizeof(uint64_t) - 1) * CHAR_BIT; +- } +- +- return ret; +- } +- else{ +- double sqd = 0.; +- assert(a.type()==CV_32F); +- assert(a.rows==1); +- const float *a_ptr=a.ptr(0); +- const float *b_ptr=b.ptr(0); +- for(int i = 0; i < a.cols; i ++) +- sqd += (a_ptr[i ] - b_ptr[i ])*(a_ptr[i ] - b_ptr[i ]); +- return sqd; +- } +-} +- +- +- +- +-// -------------------------------------------------------------------------- +- +-std::string DescManip::toString(const cv::Mat &a) +-{ +- stringstream ss; +- //introduce a magic value to distinguish from DBOw2 +- ss<<"dbw3 "; +- //save size and type +- +- +- ss <(); +- for(int i = 0; i < a.cols; ++i, ++p) +- ss << (int)*p << " "; +- }else{ +- +- const float *p = a.ptr(); +- for(int i = 0; i < a.cols; ++i, ++p) +- ss << *p << " "; +- +- } +- +- return ss.str(); +-} +- +-// -------------------------------------------------------------------------- +- +-void DescManip::fromString(cv::Mat &a, const std::string &s) +-{ +- +- //check if the dbow3 is present +- string ss_aux;ss_aux.reserve(10); +- for(size_t i=0;i<10 && i data;data.reserve(100); +- while( ss>>val) data.push_back(val); +- //copy to a +- a.create(1,data.size(),CV_8UC1); +- memcpy(a.ptr(0),&data[0],data.size()); +- } +- else { +- char szSign[10]; +- int type,cols; +- stringstream ss(s); +- ss >> szSign >> type >> cols; +- a.create(1, cols, type); +- if(type==CV_8UC1){ +- unsigned char *p = a.ptr(); +- int n; +- for(int i = 0; i < a.cols; ++i, ++p) +- if ( ss >> n) *p = (unsigned char)n; +- } +- else{ +- float *p = a.ptr(); +- for(int i = 0; i < a.cols; ++i, ++p) +- if ( !(ss >> *p))cerr<<"Error reading. Unexpected EOF. DescManip::fromString"< &descriptors, +- cv::Mat &mat) +-{ +- if(descriptors.empty()) +- { +- mat.release(); +- return; +- } +- +- if(descriptors[0].type()==CV_8UC1){ +- +- const size_t N = descriptors.size(); +- int L=getDescSizeBytes(descriptors[0]); +- mat.create(N, L*8, CV_32F); +- float *p = mat.ptr(); +- +- for(size_t i = 0; i < N; ++i) +- { +- const int C = descriptors[i].cols; +- const unsigned char *desc = descriptors[i].ptr(); +- +- for(int j = 0; j < C; ++j, p += 8) +- { +- p[0] = (desc[j] & (1 << 7) ? 1 : 0); +- p[1] = (desc[j] & (1 << 6) ? 1 : 0); +- p[2] = (desc[j] & (1 << 5) ? 1 : 0); +- p[3] = (desc[j] & (1 << 4) ? 1 : 0); +- p[4] = (desc[j] & (1 << 3) ? 1 : 0); +- p[5] = (desc[j] & (1 << 2) ? 1 : 0); +- p[6] = (desc[j] & (1 << 1) ? 1 : 0); +- p[7] = desc[j] & (1); +- } +- } +- } +- else{ +- assert(descriptors[0].type()==CV_32F); +- const int N = descriptors.size(); +- int L=descriptors[0].cols; +- mat.create(N, L, CV_32F); +- for(int i = 0; i < N; ++i) +- memcpy(mat.ptr(i),descriptors[i].ptr(0),sizeof(float)*L); +- } +-} +- +-void DescManip::toStream(const cv::Mat &m,std::ostream &str){ +- assert(m.rows==1 || m.isContinuous()); +- int type=m.type(); +- int cols=m.cols; +- int rows=m.rows; +- str.write((char*)&cols,sizeof(cols)); +- str.write((char*)&rows,sizeof(rows)); +- str.write((char*)&type,sizeof(type)); +- str.write((char*)m.ptr(0),m.elemSize()*m.cols); +-} +- +-void DescManip::fromStream(cv::Mat &m,std::istream &str){ +- int type,cols,rows; +- str.read((char*)&cols,sizeof(cols)); +- str.read((char*)&rows,sizeof(rows)); +- str.read((char*)&type,sizeof(type)); +- m.create(rows,cols,type); +- str.read((char*)m.ptr(0),m.elemSize()*m.cols); +-} +- +- +-// -------------------------------------------------------------------------- +- +-} // namespace DBoW3 +- ++/** ++ * File: DescManip.cpp ++ * Date: June 2012 ++ * Author: Dorian Galvez-Lopez ++ * Description: functions for ORB descriptors ++ * License: see the LICENSE.txt file ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "DBow3/DescManip.h" ++ ++using namespace std; ++ ++namespace DBoW3 { ++ ++// -------------------------------------------------------------------------- ++ ++void DescManip::meanValue(const std::vector &descriptors, ++ cv::Mat &mean) ++{ ++ ++ if(descriptors.empty()) return; ++ ++ if(descriptors.size() == 1) ++ { ++ mean = descriptors[0].clone(); ++ return; ++ } ++ //binary descriptor ++ if (descriptors[0].type()==CV_8U ){ ++ //determine number of bytes of the binary descriptor ++ int L= getDescSizeBytes( descriptors[0]); ++ vector sum( L * 8, 0); ++ ++ for(size_t i = 0; i < descriptors.size(); ++i) ++ { ++ const cv::Mat &d = descriptors[i]; ++ const unsigned char *p = d.ptr(); ++ ++ for(int j = 0; j < d.cols; ++j, ++p) ++ { ++ if(*p & (1 << 7)) ++sum[ j*8 ]; ++ if(*p & (1 << 6)) ++sum[ j*8 + 1 ]; ++ if(*p & (1 << 5)) ++sum[ j*8 + 2 ]; ++ if(*p & (1 << 4)) ++sum[ j*8 + 3 ]; ++ if(*p & (1 << 3)) ++sum[ j*8 + 4 ]; ++ if(*p & (1 << 2)) ++sum[ j*8 + 5 ]; ++ if(*p & (1 << 1)) ++sum[ j*8 + 6 ]; ++ if(*p & (1)) ++sum[ j*8 + 7 ]; ++ } ++ } ++ ++ mean = cv::Mat::zeros(1, L, CV_8U); ++ unsigned char *p = mean.ptr(); ++ ++ const int N2 = (int)descriptors.size() / 2 + descriptors.size() % 2; ++ for(size_t i = 0; i < sum.size(); ++i) ++ { ++ if(sum[i] >= N2) ++ { ++ // set bit ++ *p |= 1 << (7 - (i % 8)); ++ } ++ ++ if(i % 8 == 7) ++p; ++ } ++ } ++ //non binary descriptor ++ else{ ++ assert(descriptors[0].type()==CV_32F );//ensure it is float ++ ++ mean.create(1, descriptors[0].cols,descriptors[0].type()); ++ mean.setTo(cv::Scalar::all(0)); ++ float inv_s =1./double( descriptors.size()); ++ for(size_t i=0;i(); // a & b are actually CV_8U ++ pb = b.ptr(); ++ ++ uint64_t v, ret = 0; ++ for(size_t i = 0; i < a.cols / sizeof(uint64_t); ++i, ++pa, ++pb) ++ { ++ v = *pa ^ *pb; ++ v = v - ((v >> 1) & (uint64_t)~(uint64_t)0/3); ++ v = (v & (uint64_t)~(uint64_t)0/15*3) + ((v >> 2) & ++ (uint64_t)~(uint64_t)0/15*3); ++ v = (v + (v >> 4)) & (uint64_t)~(uint64_t)0/255*15; ++ ret += (uint64_t)(v * ((uint64_t)~(uint64_t)0/255)) >> ++ (sizeof(uint64_t) - 1) * CHAR_BIT; ++ } ++ ++ return ret; ++ } ++ else{ ++ double sqd = 0.; ++ assert(a.type()==CV_32F); ++ assert(a.rows==1); ++ const float *a_ptr=a.ptr(0); ++ const float *b_ptr=b.ptr(0); ++ for(int i = 0; i < a.cols; i ++) ++ sqd += (a_ptr[i ] - b_ptr[i ])*(a_ptr[i ] - b_ptr[i ]); ++ return sqd; ++ } ++} ++ ++ ++ ++ ++// -------------------------------------------------------------------------- ++ ++std::string DescManip::toString(const cv::Mat &a) ++{ ++ stringstream ss; ++ //introduce a magic value to distinguish from DBOw2 ++ ss<<"dbw3 "; ++ //save size and type ++ ++ ++ ss <(); ++ for(int i = 0; i < a.cols; ++i, ++p) ++ ss << (int)*p << " "; ++ }else{ ++ ++ const float *p = a.ptr(); ++ for(int i = 0; i < a.cols; ++i, ++p) ++ ss << *p << " "; ++ ++ } ++ ++ return ss.str(); ++} ++ ++// -------------------------------------------------------------------------- ++ ++void DescManip::fromString(cv::Mat &a, const std::string &s) ++{ ++ ++ //check if the dbow3 is present ++ string ss_aux;ss_aux.reserve(10); ++ for(size_t i=0;i<10 && i data;data.reserve(100); ++ while( ss>>val) data.push_back(val); ++ //copy to a ++ a.create(1,data.size(),CV_8UC1); ++ memcpy(a.ptr(0),&data[0],data.size()); ++ } ++ else { ++ char szSign[10]; ++ int type,cols; ++ stringstream ss(s); ++ ss >> szSign >> type >> cols; ++ a.create(1, cols, type); ++ if(type==CV_8UC1){ ++ unsigned char *p = a.ptr(); ++ int n; ++ for(int i = 0; i < a.cols; ++i, ++p) ++ if ( ss >> n) *p = (unsigned char)n; ++ } ++ else{ ++ float *p = a.ptr(); ++ for(int i = 0; i < a.cols; ++i, ++p) ++ if ( !(ss >> *p))cerr<<"Error reading. Unexpected EOF. DescManip::fromString"< &descriptors, ++ cv::Mat &mat) ++{ ++ if(descriptors.empty()) ++ { ++ mat.release(); ++ return; ++ } ++ ++ if(descriptors[0].type()==CV_8UC1){ ++ ++ const size_t N = descriptors.size(); ++ int L=getDescSizeBytes(descriptors[0]); ++ mat.create(N, L*8, CV_32F); ++ float *p = mat.ptr(); ++ ++ for(size_t i = 0; i < N; ++i) ++ { ++ const int C = descriptors[i].cols; ++ const unsigned char *desc = descriptors[i].ptr(); ++ ++ for(int j = 0; j < C; ++j, p += 8) ++ { ++ p[0] = (desc[j] & (1 << 7) ? 1 : 0); ++ p[1] = (desc[j] & (1 << 6) ? 1 : 0); ++ p[2] = (desc[j] & (1 << 5) ? 1 : 0); ++ p[3] = (desc[j] & (1 << 4) ? 1 : 0); ++ p[4] = (desc[j] & (1 << 3) ? 1 : 0); ++ p[5] = (desc[j] & (1 << 2) ? 1 : 0); ++ p[6] = (desc[j] & (1 << 1) ? 1 : 0); ++ p[7] = desc[j] & (1); ++ } ++ } ++ } ++ else{ ++ assert(descriptors[0].type()==CV_32F); ++ const int N = descriptors.size(); ++ int L=descriptors[0].cols; ++ mat.create(N, L, CV_32F); ++ for(int i = 0; i < N; ++i) ++ memcpy(mat.ptr(i),descriptors[i].ptr(0),sizeof(float)*L); ++ } ++} ++ ++void DescManip::toStream(const cv::Mat &m,std::ostream &str){ ++ assert(m.rows==1 || m.isContinuous()); ++ int type=m.type(); ++ int cols=m.cols; ++ int rows=m.rows; ++ str.write((char*)&cols,sizeof(cols)); ++ str.write((char*)&rows,sizeof(rows)); ++ str.write((char*)&type,sizeof(type)); ++ str.write((char*)m.ptr(0),m.elemSize()*m.cols); ++} ++ ++void DescManip::fromStream(cv::Mat &m,std::istream &str){ ++ int type,cols,rows; ++ str.read((char*)&cols,sizeof(cols)); ++ str.read((char*)&rows,sizeof(rows)); ++ str.read((char*)&type,sizeof(type)); ++ m.create(rows,cols,type); ++ str.read((char*)m.ptr(0),m.elemSize()*m.cols); ++} ++ ++ ++// -------------------------------------------------------------------------- ++ ++} // namespace DBoW3 ++ +diff --git a/src/FeatureVector.cpp b/Lib/src/FeatureVector.cpp +similarity index 98% +rename from src/FeatureVector.cpp +rename to Lib/src/FeatureVector.cpp +index 880eab1..a9cd792 100644 +--- a/src/FeatureVector.cpp ++++ b/Lib/src/FeatureVector.cpp +@@ -7,7 +7,7 @@ + * + */ + +-#include "FeatureVector.h" ++#include "DBow3/FeatureVector.h" + #include + #include + #include +diff --git a/src/QueryResults.cpp b/Lib/src/QueryResults.cpp +similarity index 97% +rename from src/QueryResults.cpp +rename to Lib/src/QueryResults.cpp +index 7062400..b852979 100644 +--- a/src/QueryResults.cpp ++++ b/Lib/src/QueryResults.cpp +@@ -9,7 +9,7 @@ + + #include + #include +-#include "QueryResults.h" ++#include "DBow3/QueryResults.h" + + using namespace std; + +diff --git a/src/ScoringObject.cpp b/Lib/src/ScoringObject.cpp +similarity index 99% +rename from src/ScoringObject.cpp +rename to Lib/src/ScoringObject.cpp +index 7cf0812..adde8e9 100644 +--- a/src/ScoringObject.cpp ++++ b/Lib/src/ScoringObject.cpp +@@ -8,8 +8,8 @@ + */ + + #include +-#include "Vocabulary.h" +-#include "BowVector.h" ++#include "DBow3/Vocabulary.h" ++#include "DBow3/BowVector.h" + + using namespace DBoW3; + +diff --git a/src/Vocabulary.cpp b/Lib/src/Vocabulary.cpp +similarity index 99% +rename from src/Vocabulary.cpp +rename to Lib/src/Vocabulary.cpp +index 9f0eff3..6ccbbea 100644 +--- a/src/Vocabulary.cpp ++++ b/Lib/src/Vocabulary.cpp +@@ -1,8 +1,8 @@ +-#include "Vocabulary.h" +-#include "DescManip.h" +-#include "quicklz.h" ++#include "DBow3/Vocabulary.h" ++#include "DBow3/DescManip.h" ++#include "DBow3/quicklz.h" + #include +-#include "timers.h" ++#include "DBow3/timers.h" + namespace DBoW3{ + // -------------------------------------------------------------------------- + +diff --git a/src/quicklz.c b/Lib/src/quicklz.c +similarity index 99% +rename from src/quicklz.c +rename to Lib/src/quicklz.c +index 3742129..bd3cb11 100644 +--- a/src/quicklz.c ++++ b/Lib/src/quicklz.c +@@ -9,7 +9,7 @@ + + // 1.5.0 final + +-#include "quicklz.h" ++#include "DBow3/quicklz.h" + + #if QLZ_VERSION_MAJOR != 1 || QLZ_VERSION_MINOR != 5 || QLZ_VERSION_REVISION != 0 + #error quicklz.c and quicklz.h have different versions +diff --git a/cmake/instructionSet.cmake b/cmake/instructionSet.cmake +new file mode 100644 +index 0000000..d0febeb +--- /dev/null ++++ b/cmake/instructionSet.cmake +@@ -0,0 +1,13 @@ ++add_library( ++ SSE4.1 ++ INTERFACE ++) ++ ++add_library(SIMD::SSE4.1 ALIAS SSE4.1) ++ ++target_compile_options( ++ SSE4.1 ++ INTERFACE ++ $<$:-msse4.1;-march=native> ++ $<$:/arch:AVX2> ++) +diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in +deleted file mode 100644 +index 81482da..0000000 +--- a/cmake_uninstall.cmake.in ++++ /dev/null +@@ -1,28 +0,0 @@ +-# ----------------------------------------------- +-# File that provides "make uninstall" target +-# We use the file 'install_manifest.txt' +-# ----------------------------------------------- +-IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +- MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +-ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +- +-FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +-STRING(REGEX REPLACE "\n" ";" files "${files}") +-FOREACH(file ${files}) +- MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") +-# IF(EXISTS "$ENV{DESTDIR}${file}") +-# EXEC_PROGRAM( +-# "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" +-# OUTPUT_VARIABLE rm_out +-# RETURN_VALUE rm_retval +-# ) +- EXECUTE_PROCESS(COMMAND rm $ENV{DESTDIR}${file}) +-# IF(NOT "${rm_retval}" STREQUAL 0) +-# MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") +-# ENDIF(NOT "${rm_retval}" STREQUAL 0) +-# ELSE(EXISTS "$ENV{DESTDIR}${file}") +-# MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") +-# ENDIF(EXISTS "$ENV{DESTDIR}${file}") +-ENDFOREACH(file) +- +- +diff --git a/config.cmake.in b/config.cmake.in +deleted file mode 100644 +index 9d15feb..0000000 +--- a/config.cmake.in ++++ /dev/null +@@ -1,36 +0,0 @@ +-# =================================================================================== +-# @PROJECT_NAME@ CMake configuration file +-# +-# ** File generated automatically, do not modify ** +-# +-# Usage from an external project: +-# In your CMakeLists.txt, add these lines: +-# +-# FIND_PACKAGE(@PROJECT_NAME@ REQUIRED ) +-# TARGET_LINK_LIBRARIES(MY_TARGET_NAME ${@PROJECT_NAME@_LIBS}) +-# +-# This file will define the following variables: +-# - @PROJECT_NAME@_LIBS : The list of libraries to links against. +-# - @PROJECT_NAME@_LIB_DIR : The directory where lib files are. Calling LINK_DIRECTORIES +-# with this path is NOT needed. +-# - @PROJECT_NAME@_VERSION : The version of this PROJECT_NAME build. Example: "1.2.0" +-# - @PROJECT_NAME@_VERSION_MAJOR : Major version part of VERSION. Example: "1" +-# - @PROJECT_NAME@_VERSION_MINOR : Minor version part of VERSION. Example: "2" +-# - @PROJECT_NAME@_VERSION_PATCH : Patch version part of VERSION. Example: "0" +-# +-# =================================================================================== +-INCLUDE_DIRECTORIES("@CMAKE_INSTALL_PREFIX@/include") +-SET(@PROJECT_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include") +- +-LINK_DIRECTORIES("@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@") +-SET(@PROJECT_NAME@_LIB_DIR "@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@") +- +-SET(@PROJECT_NAME@_LIBS @REQUIRED_LIBRARIES@ @PROJECT_NAME@@PROJECT_DLLVERSION@) +-SET(@PROJECT_NAME@_LIBRARIES @REQUIRED_LIBRARIES@ @PROJECT_NAME@@PROJECT_DLLVERSION@) +- +-SET(@PROJECT_NAME@_FOUND YES) +-SET(@PROJECT_NAME@_FOUND "YES") +-SET(@PROJECT_NAME@_VERSION @PROJECT_VERSION@) +-SET(@PROJECT_NAME@_VERSION_MAJOR @PROJECT_VERSION_MAJOR@) +-SET(@PROJECT_NAME@_VERSION_MINOR @PROJECT_VERSION_MINOR@) +-SET(@PROJECT_NAME@_VERSION_PATCH @PROJECT_VERSION_PATCH@) +diff --git a/utils/CMakeLists.txt b/examples/CMakeLists.txt +similarity index 100% +rename from utils/CMakeLists.txt +rename to examples/CMakeLists.txt +diff --git a/utils/create_voc_step0.cpp b/examples/create_voc_step0.cpp +similarity index 97% +rename from utils/create_voc_step0.cpp +rename to examples/create_voc_step0.cpp +index 4fd78f6..c48a3c4 100644 +--- a/utils/create_voc_step0.cpp ++++ b/examples/create_voc_step0.cpp +@@ -1,126 +1,126 @@ +- +-//First step of creating a vocabulary is extracting features from a set of images. We save them to a file for next step +-#include +-#include +- +-// DBoW3 +-#include "DBoW3.h" +- +-// OpenCV +-#include +-#include +-#include +-#ifdef USE_CONTRIB +-#include +-#include +-#endif +-#include "DescManip.h" +- +-using namespace DBoW3; +-using namespace std; +- +- +-//command line parser +-class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readImagePaths(int argc,char **argv,int start){ +- vector paths; +- for(int i=start;i loadFeatures( std::vector path_to_images,string descriptor="") throw (std::exception){ +- //select detector +- cv::Ptr fdetector; +- if (descriptor=="orb") fdetector=cv::ORB::create(); +- else if (descriptor=="brisk") fdetector=cv::BRISK::create(); +-#ifdef OPENCV_VERSION_3 +- else if (descriptor=="akaze") fdetector=cv::AKAZE::create(); +-#endif +-#ifdef USE_CONTRIB +- else if(descriptor=="surf" ) fdetector=cv::xfeatures2d::SURF::create(400, 4, 2, EXTENDED_SURF); +-#endif +- +- else throw std::runtime_error("Invalid descriptor"); +- assert(!descriptor.empty()); +- vector features; +- +- +- cout << "Extracting features..." << endl; +- for(size_t i = 0; i < path_to_images.size(); ++i) +- { +- vector keypoints; +- cv::Mat descriptors; +- cout<<"reading image: "<detectAndCompute(image, cv::Mat(), keypoints, descriptors); +- features.push_back(descriptors); +- cout<<"done detecting features"< &features){ +- +- //test it is not created +- std::ifstream ifile(filename); +- if (ifile.is_open()){cerr<<"ERROR::: Output File "<(0),f.total()*f.elemSize()); +- } +-} +- +-// ---------------------------------------------------------------------------- +- +-int main(int argc,char **argv) +-{ +- +- try{ +- CmdLineParser cml(argc,argv); +- if (cml["-h"] || argc==1){ +- cerr<<"Usage: descriptor_name output image0 image1 ... \n\t descriptors:brisk,surf,orb(default),akaze(only if using opencv 3)"< features= loadFeatures(images,descriptor); +- +- //save features to file +- saveToFile(argv[2],features); +- +- }catch(std::exception &ex){ +- cerr< ++#include ++ ++// DBoW3 ++#include "DBoW3.h" ++ ++// OpenCV ++#include ++#include ++#include ++#ifdef USE_CONTRIB ++#include ++#include ++#endif ++#include "DescManip.h" ++ ++using namespace DBoW3; ++using namespace std; ++ ++ ++//command line parser ++class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readImagePaths(int argc,char **argv,int start){ ++ vector paths; ++ for(int i=start;i loadFeatures( std::vector path_to_images,string descriptor="") throw (std::exception){ ++ //select detector ++ cv::Ptr fdetector; ++ if (descriptor=="orb") fdetector=cv::ORB::create(); ++ else if (descriptor=="brisk") fdetector=cv::BRISK::create(); ++#ifdef OPENCV_VERSION_3 ++ else if (descriptor=="akaze") fdetector=cv::AKAZE::create(); ++#endif ++#ifdef USE_CONTRIB ++ else if(descriptor=="surf" ) fdetector=cv::xfeatures2d::SURF::create(400, 4, 2, EXTENDED_SURF); ++#endif ++ ++ else throw std::runtime_error("Invalid descriptor"); ++ assert(!descriptor.empty()); ++ vector features; ++ ++ ++ cout << "Extracting features..." << endl; ++ for(size_t i = 0; i < path_to_images.size(); ++i) ++ { ++ vector keypoints; ++ cv::Mat descriptors; ++ cout<<"reading image: "<detectAndCompute(image, cv::Mat(), keypoints, descriptors); ++ features.push_back(descriptors); ++ cout<<"done detecting features"< &features){ ++ ++ //test it is not created ++ std::ifstream ifile(filename); ++ if (ifile.is_open()){cerr<<"ERROR::: Output File "<(0),f.total()*f.elemSize()); ++ } ++} ++ ++// ---------------------------------------------------------------------------- ++ ++int main(int argc,char **argv) ++{ ++ ++ try{ ++ CmdLineParser cml(argc,argv); ++ if (cml["-h"] || argc==1){ ++ cerr<<"Usage: descriptor_name output image0 image1 ... \n\t descriptors:brisk,surf,orb(default),akaze(only if using opencv 3)"< features= loadFeatures(images,descriptor); ++ ++ //save features to file ++ saveToFile(argv[2],features); ++ ++ }catch(std::exception &ex){ ++ cerr< +-#include +- +-// DBoW3 +-#include "DBoW3.h" +- +-// OpenCV +-#include +-using namespace DBoW3; +-using namespace std; +- +-//command line parser +-class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readFeaturesFromFile(string filename){ +-vector features; +- //test it is not created +- std::ifstream ifile(filename); +- if (!ifile.is_open()){cerr<<"could not open input file"<(0),features[i].total()*features[i].elemSize()); +- } +- return features; +-} +- +-// ---------------------------------------------------------------------------- +- +-int main(int argc,char **argv) +-{ +- +- try{ +- CmdLineParser cml(argc,argv); +- if (cml["-h"] || argc!=3){ +- cerr<<"Usage: features output_voc.yml[.gz]"< ++#include ++ ++// DBoW3 ++#include "DBoW3.h" ++ ++// OpenCV ++#include ++using namespace DBoW3; ++using namespace std; ++ ++//command line parser ++class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readFeaturesFromFile(string filename){ ++vector features; ++ //test it is not created ++ std::ifstream ifile(filename); ++ if (!ifile.is_open()){cerr<<"could not open input file"<(0),features[i].total()*features[i].elemSize()); ++ } ++ return features; ++} ++ ++// ---------------------------------------------------------------------------- ++ ++int main(int argc,char **argv) ++{ ++ ++ try{ ++ CmdLineParser cml(argc,argv); ++ if (cml["-h"] || argc!=3){ ++ cerr<<"Usage: features output_voc.yml[.gz]"< +-#include +- +-// DBoW3 +-#include "DBoW3.h" +- +-// OpenCV +-#include +-#include +-#include +-#ifdef USE_CONTRIB +-#include +-#include +-#endif +-#include "DescManip.h" +- +-using namespace DBoW3; +-using namespace std; +- +- +-//command line parser +-class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readImagePaths(int argc,char **argv,int start){ +- vector paths; +- for(int i=start;i loadFeatures( std::vector path_to_images,string descriptor="") throw (std::exception){ +- //select detector +- cv::Ptr fdetector; +- if (descriptor=="orb") fdetector=cv::ORB::create(); +- else if (descriptor=="brisk") fdetector=cv::BRISK::create(); +-#ifdef OPENCV_VERSION_3 +- else if (descriptor=="akaze") fdetector=cv::AKAZE::create(); +-#endif +-#ifdef USE_CONTRIB +- else if(descriptor=="surf" ) fdetector=cv::xfeatures2d::SURF::create(400, 4, 2, EXTENDED_SURF); +-#endif +- +- else throw std::runtime_error("Invalid descriptor"); +- assert(!descriptor.empty()); +- vector features; +- +- +- cout << "Extracting features..." << endl; +- for(size_t i = 0; i < path_to_images.size(); ++i) +- { +- vector keypoints; +- cv::Mat descriptors; +- cout<<"reading image: "<detectAndCompute(image, cv::Mat(), keypoints, descriptors); +- features.push_back(descriptors); +- cout<<"done detecting features"< &features) +-{ +- // branching factor and depth levels +- const int k = 9; +- const int L = 3; +- const WeightingType weight = TF_IDF; +- const ScoringType score = L1_NORM; +- +- DBoW3::Vocabulary voc(k, L, weight, score); +- +- cout << "Creating a small " << k << "^" << L << " vocabulary..." << endl; +- voc.create(features); +- cout << "... done!" << endl; +- +- cout << "Vocabulary information: " << endl +- << voc << endl << endl; +- +- // lets do something with this vocabulary +- cout << "Matching images against themselves (0 low, 1 high): " << endl; +- BowVector v1, v2; +- for(size_t i = 0; i < features.size(); i++) +- { +- voc.transform(features[i], v1); +- for(size_t j = 0; j < features.size(); j++) +- { +- voc.transform(features[j], v2); +- +- double score = voc.score(v1, v2); +- cout << "Image " << i << " vs Image " << j << ": " << score << endl; +- } +- } +- +- // save the vocabulary to disk +- cout << endl << "Saving vocabulary..." << endl; +- voc.save("small_voc.yml.gz"); +- cout << "Done" << endl; +-} +- +-////// ---------------------------------------------------------------------------- +- +-void testDatabase(const vector &features) +-{ +- cout << "Creating a small database..." << endl; +- +- // load the vocabulary from disk +- Vocabulary voc("small_voc.yml.gz"); +- +- Database db(voc, false, 0); // false = do not use direct index +- // (so ignore the last param) +- // The direct index is useful if we want to retrieve the features that +- // belong to some vocabulary node. +- // db creates a copy of the vocabulary, we may get rid of "voc" now +- +- // add images to the database +- for(size_t i = 0; i < features.size(); i++) +- db.add(features[i]); +- +- cout << "... done!" << endl; +- +- cout << "Database information: " << endl << db << endl; +- +- // and query the database +- cout << "Querying the database: " << endl; +- +- QueryResults ret; +- for(size_t i = 0; i < features.size(); i++) +- { +- db.query(features[i], ret, 4); +- +- // ret[0] is always the same image in this case, because we added it to the +- // database. ret[1] is the second best match. +- +- cout << "Searching for Image " << i << ". " << ret << endl; +- } +- +- cout << endl; +- +- // we can save the database. The created file includes the vocabulary +- // and the entries added +- cout << "Saving database..." << endl; +- db.save("small_db.yml.gz"); +- cout << "... done!" << endl; +- +- // once saved, we can load it again +- cout << "Retrieving database once again..." << endl; +- Database db2("small_db.yml.gz"); +- cout << "... done! This is: " << endl << db2 << endl; +-} +- +- +-// ---------------------------------------------------------------------------- +- +-int main(int argc,char **argv) +-{ +- +- try{ +- CmdLineParser cml(argc,argv); +- if (cml["-h"] || argc<=2){ +- cerr<<"Usage: descriptor_name image0 image1 ... \n\t descriptors:brisk,surf,orb ,akaze(only if using opencv 3)"< features= loadFeatures(images,descriptor); +- testVocCreation(features); +- +- +- testDatabase(features); +- +- }catch(std::exception &ex){ +- cerr< ++#include ++ ++// DBoW3 ++#include "DBoW3.h" ++ ++// OpenCV ++#include ++#include ++#include ++#ifdef USE_CONTRIB ++#include ++#include ++#endif ++#include "DescManip.h" ++ ++using namespace DBoW3; ++using namespace std; ++ ++ ++//command line parser ++class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readImagePaths(int argc,char **argv,int start){ ++ vector paths; ++ for(int i=start;i loadFeatures( std::vector path_to_images,string descriptor="") throw (std::exception){ ++ //select detector ++ cv::Ptr fdetector; ++ if (descriptor=="orb") fdetector=cv::ORB::create(); ++ else if (descriptor=="brisk") fdetector=cv::BRISK::create(); ++#ifdef OPENCV_VERSION_3 ++ else if (descriptor=="akaze") fdetector=cv::AKAZE::create(); ++#endif ++#ifdef USE_CONTRIB ++ else if(descriptor=="surf" ) fdetector=cv::xfeatures2d::SURF::create(400, 4, 2, EXTENDED_SURF); ++#endif ++ ++ else throw std::runtime_error("Invalid descriptor"); ++ assert(!descriptor.empty()); ++ vector features; ++ ++ ++ cout << "Extracting features..." << endl; ++ for(size_t i = 0; i < path_to_images.size(); ++i) ++ { ++ vector keypoints; ++ cv::Mat descriptors; ++ cout<<"reading image: "<detectAndCompute(image, cv::Mat(), keypoints, descriptors); ++ features.push_back(descriptors); ++ cout<<"done detecting features"< &features) ++{ ++ // branching factor and depth levels ++ const int k = 9; ++ const int L = 3; ++ const WeightingType weight = TF_IDF; ++ const ScoringType score = L1_NORM; ++ ++ DBoW3::Vocabulary voc(k, L, weight, score); ++ ++ cout << "Creating a small " << k << "^" << L << " vocabulary..." << endl; ++ voc.create(features); ++ cout << "... done!" << endl; ++ ++ cout << "Vocabulary information: " << endl ++ << voc << endl << endl; ++ ++ // lets do something with this vocabulary ++ cout << "Matching images against themselves (0 low, 1 high): " << endl; ++ BowVector v1, v2; ++ for(size_t i = 0; i < features.size(); i++) ++ { ++ voc.transform(features[i], v1); ++ for(size_t j = 0; j < features.size(); j++) ++ { ++ voc.transform(features[j], v2); ++ ++ double score = voc.score(v1, v2); ++ cout << "Image " << i << " vs Image " << j << ": " << score << endl; ++ } ++ } ++ ++ // save the vocabulary to disk ++ cout << endl << "Saving vocabulary..." << endl; ++ voc.save("small_voc.yml.gz"); ++ cout << "Done" << endl; ++} ++ ++////// ---------------------------------------------------------------------------- ++ ++void testDatabase(const vector &features) ++{ ++ cout << "Creating a small database..." << endl; ++ ++ // load the vocabulary from disk ++ Vocabulary voc("small_voc.yml.gz"); ++ ++ Database db(voc, false, 0); // false = do not use direct index ++ // (so ignore the last param) ++ // The direct index is useful if we want to retrieve the features that ++ // belong to some vocabulary node. ++ // db creates a copy of the vocabulary, we may get rid of "voc" now ++ ++ // add images to the database ++ for(size_t i = 0; i < features.size(); i++) ++ db.add(features[i]); ++ ++ cout << "... done!" << endl; ++ ++ cout << "Database information: " << endl << db << endl; ++ ++ // and query the database ++ cout << "Querying the database: " << endl; ++ ++ QueryResults ret; ++ for(size_t i = 0; i < features.size(); i++) ++ { ++ db.query(features[i], ret, 4); ++ ++ // ret[0] is always the same image in this case, because we added it to the ++ // database. ret[1] is the second best match. ++ ++ cout << "Searching for Image " << i << ". " << ret << endl; ++ } ++ ++ cout << endl; ++ ++ // we can save the database. The created file includes the vocabulary ++ // and the entries added ++ cout << "Saving database..." << endl; ++ db.save("small_db.yml.gz"); ++ cout << "... done!" << endl; ++ ++ // once saved, we can load it again ++ cout << "Retrieving database once again..." << endl; ++ Database db2("small_db.yml.gz"); ++ cout << "... done! This is: " << endl << db2 << endl; ++} ++ ++ ++// ---------------------------------------------------------------------------- ++ ++int main(int argc,char **argv) ++{ ++ ++ try{ ++ CmdLineParser cml(argc,argv); ++ if (cml["-h"] || argc<=2){ ++ cerr<<"Usage: descriptor_name image0 image1 ... \n\t descriptors:brisk,surf,orb ,akaze(only if using opencv 3)"< features= loadFeatures(images,descriptor); ++ testVocCreation(features); ++ ++ ++ testDatabase(features); ++ ++ }catch(std::exception &ex){ ++ cerr< +Date: Thu, 15 Aug 2019 14:00:28 +0200 +Subject: [PATCH 2/2] Fix DBow3Config.cmake + +--- + Lib/DBow3Config.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/DBow3Config.cmake b/Lib/DBow3Config.cmake +index 9720a14..da63d5e 100644 +--- a/Lib/DBow3Config.cmake ++++ b/Lib/DBow3Config.cmake +@@ -1,4 +1,4 @@ + include(CMakeFindDependencyMacro) + find_dependency(OpenCV) + find_dependency(OpenMP) +-include("${CMAKE_CURRENT_LIST_DIR}/FbowTargets.cmake") +\ No newline at end of file ++include("${CMAKE_CURRENT_LIST_DIR}/DBow3Targets.cmake") +\ No newline at end of file diff --git a/ports/dbow3/portfile.cmake b/ports/dbow3/portfile.cmake new file mode 100644 index 00000000000000..3b209b0f35d2d6 --- /dev/null +++ b/ports/dbow3/portfile.cmake @@ -0,0 +1,32 @@ +#the port produces some empty dlls when building shared libraries, since some components do not export anything, breaking the internal build itself +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rmsalinas/DBow3 + REF master + SHA512 16e6789b77e8b42428d156ae5efa667861fa8ef2e85b54e3dd1d28e6f8dc7d119e973234c77cac82e775080fb9c859640d04159659a7d63941325e13e40b2814 + PATCHES + fix_cmake.patch +) + + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_SIMD=ON + -DUSE_OPENCV_CONTRIB=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake/DBow3) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/DBow3 RENAME copyright) +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/dbow3/vcpkg.json b/ports/dbow3/vcpkg.json new file mode 100644 index 00000000000000..4e213ba47b46bc --- /dev/null +++ b/ports/dbow3/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "dbow3", + "version-string": "1.0.0", + "port-version": 1, + "description": "DBoW3 is an improved version of the DBow2 library, an open source C++ library for indexing and converting images into a bag-of-word representation.", + "dependencies": [ + { + "name": "opencv3", + "features": [ + "contrib" + ] + } + ] +} diff --git a/ports/dcmtk/CONTROL b/ports/dcmtk/CONTROL deleted file mode 100644 index 1ae67841e39668..00000000000000 --- a/ports/dcmtk/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: dcmtk -Version: 3.6.4-1 -Description: This DICOM ToolKit (DCMTK) package consists of source code, documentation and installation instructions for a set of software libraries and applications implementing part of the DICOM/MEDICOM Standard. diff --git a/ports/dcmtk/dcmtk.patch b/ports/dcmtk/dcmtk.patch index cca14e28e28e00..7f2c95a40be398 100644 --- a/ports/dcmtk/dcmtk.patch +++ b/ports/dcmtk/dcmtk.patch @@ -1,16 +1,16 @@ -diff --git a/CMake/dcmtkPrepare.cmake b/CMake/dcmtkPrepare.cmake -index e9f77b5..4f7ebe3 100644 ---- a/CMake/dcmtkPrepare.cmake -+++ b/CMake/dcmtkPrepare.cmake -@@ -192,9 +192,9 @@ include(GNUInstallDirs) - # CMake's files (DCMTKTarget.cmake, DCMTKConfigVersion.cmake and DCMTKConfig.cmake) are installed - # to different installation paths under Unix- and Windows-based systems - if(UNIX) -- set(DCMTK_INSTALL_CMKDIR "${CMAKE_INSTALL_LIBDIR}/cmake/dcmtk") -+ SET(DCMTK_INSTALL_CMKDIR "share/dcmtk") - elseif(WIN32) -- set(DCMTK_INSTALL_CMKDIR "cmake") -+ SET(DCMTK_INSTALL_CMKDIR "share/dcmtk") - endif() - - #----------------------------------------------------------------------------- +diff --git a/CMake/dcmtkPrepare.cmake b/CMake/dcmtkPrepare.cmake +index 23a9278..15e9391 100644 +--- a/CMake/dcmtkPrepare.cmake ++++ b/CMake/dcmtkPrepare.cmake +@@ -210,9 +210,9 @@ include(GNUInstallDirs) + # CMake's files (DCMTKTarget.cmake, DCMTKConfigVersion.cmake and DCMTKConfig.cmake) are installed + # to different installation paths under Unix- and Windows-based systems + if(UNIX) +- set(DCMTK_INSTALL_CMKDIR "${CMAKE_INSTALL_LIBDIR}/cmake/dcmtk") ++ set(DCMTK_INSTALL_CMKDIR "share/dcmtk") + elseif(WIN32) +- set(DCMTK_INSTALL_CMKDIR "cmake") ++ set(DCMTK_INSTALL_CMKDIR "share/dcmtk") + endif() + + #----------------------------------------------------------------------------- diff --git a/ports/dcmtk/portfile.cmake b/ports/dcmtk/portfile.cmake index 39a7dc2c8c0d92..a9b60e95a92de0 100644 --- a/ports/dcmtk/portfile.cmake +++ b/ports/dcmtk/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DCMTK/dcmtk - REF 1967b13134308f311e6a827e616958c6a4da5bc9 - SHA512 a63a773e339081720adb0f3260a3b21ee11cde8009b321c3f45eeb40402ff29bd580926fb44f0dd784ba8369e2597933196bdaa324517d91fa5201b11b7504c0 + REF 6cb30bd7fb42190e0188afbd8cb961c62a6fb9c9 # DCMTK-3.6.6 + SHA512 3fbd524bc0b9dced2cdddca850c88d8785ca5f333c5f1598ffbffb8e5c33d11eebdce9ed935245048ac45a7ccd7bd9e4ca79eaacf752cba64a5534b76e5efcdb HEAD_REF master PATCHES ${CMAKE_CURRENT_LIST_DIR}/dcmtk.patch ) @@ -30,7 +28,7 @@ vcpkg_configure_cmake( -DDCMTK_ENABLE_CXX11=ON -DDCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS=ON -DDCMTK_WIDE_CHAR_MAIN_FUNCTION=ON - -DCMAKE_DEBUG_POSTFIX="d" + -DCMAKE_DEBUG_POSTFIX=d OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF diff --git a/ports/dcmtk/vcpkg.json b/ports/dcmtk/vcpkg.json new file mode 100644 index 00000000000000..a75b5a7bd4bf44 --- /dev/null +++ b/ports/dcmtk/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "dcmtk", + "version-string": "3.6.6", + "port-version": 1, + "description": "This DICOM ToolKit (DCMTK) package consists of source code, documentation and installation instructions for a set of software libraries and applications implementing part of the DICOM/MEDICOM Standard." +} diff --git a/ports/debug-assert/portfile.cmake b/ports/debug-assert/portfile.cmake new file mode 100644 index 00000000000000..41f9385fff7018 --- /dev/null +++ b/ports/debug-assert/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO foonathan/debug_assert + REF 0144b6532ec80349780ffac3cf85a92d87eb7b1b + SHA512 16cf38406d5f71585b763ff8af59b09c7b8b05372b07714cdc82f6f27292597c0b6d9025f823515744f8235b326b95e1d630af34db4a0e15d4ded79364290630 + HEAD_REF v1.3.3 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDEBUG_ASSERT_INSTALL=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/debug_assert TARGET_PATH share/debug_assert) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/debug-assert/vcpkg.json b/ports/debug-assert/vcpkg.json new file mode 100644 index 00000000000000..413b23d303d7c8 --- /dev/null +++ b/ports/debug-assert/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "debug-assert", + "version-string": "1.3.3", + "description": "Provides flexible DEBUG_ASSERT() macro.", + "homepage": "https://github.com/foonathan/debug_assert" +} diff --git a/ports/decimal-for-cpp/CONTROL b/ports/decimal-for-cpp/CONTROL deleted file mode 100644 index d1801e22a52d32..00000000000000 --- a/ports/decimal-for-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: decimal-for-cpp -Version:1.16 -Description: Decimal data type support, for COBOL-like fixed-point operations on currency values. - diff --git a/ports/decimal-for-cpp/portfile.cmake b/ports/decimal-for-cpp/portfile.cmake index 41af6a158dba91..cbb464ad10b709 100644 --- a/ports/decimal-for-cpp/portfile.cmake +++ b/ports/decimal-for-cpp/portfile.cmake @@ -1,16 +1,11 @@ -#header-only library - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO vpiotr/decimal_for_cpp - REF 375633343aa0af812a3ebf4bd06adaeff112ead4 - SHA512 7692fbb1643ed77b0b44fee1cf9a603fa257a5cf64ea66193c571fca61d138c6465a359db21955a4e2a234677f1806d47e05811daf2954004b108e09d3c8d4fa - HEAD_REF master - ) + REPO vpiotr/decimal_for_cpp + REF 375633343aa0af812a3ebf4bd06adaeff112ead4 + SHA512 7692fbb1643ed77b0b44fee1cf9a603fa257a5cf64ea66193c571fca61d138c6465a359db21955a4e2a234677f1806d47e05811daf2954004b108e09d3c8d4fa + HEAD_REF master +) -file(COPY ${SOURCE_PATH}/include/decimal.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/include/decimal.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/decimal-for-cpp) file(COPY ${SOURCE_PATH}/doc/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp/license.txt ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp/copyright) - diff --git a/ports/decimal-for-cpp/vcpkg.json b/ports/decimal-for-cpp/vcpkg.json new file mode 100644 index 00000000000000..16ba18fc3a9a3a --- /dev/null +++ b/ports/decimal-for-cpp/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "decimal-for-cpp", + "version-string": "1.16", + "port-version": 2, + "description": "Decimal data type support, for COBOL-like fixed-point operations on currency values." +} diff --git a/ports/detours/CONTROL b/ports/detours/CONTROL deleted file mode 100644 index 4998741bde60cb..00000000000000 --- a/ports/detours/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: detours -Version: 4.0.1 -Description: Detours is a software package for monitoring and instrumenting API calls on Windows. \ No newline at end of file diff --git a/ports/detours/portfile.cmake b/ports/detours/portfile.cmake index 038f8637cdda66..9b57b1326dda59 100644 --- a/ports/detours/portfile.cmake +++ b/ports/detours/portfile.cmake @@ -1,11 +1,8 @@ -include(vcpkg_common_functions) -find_program(NMAKE nmake) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/Detours + REPO microsoft/Detours REF v4.0.1 SHA512 0a9c21b8222329add2de190d2e94d99195dfa55de5a914b75d380ffe0fb787b12e016d0723ca821001af0168fd1643ffd2455298bf3de5fdc155b3393a3ccc87 HEAD_REF master @@ -13,16 +10,17 @@ vcpkg_from_github( find-jmp-bounds-arm64.patch ) -set(ENV{DETOURS_TARGET_PROCESSOR} "${VCPKG_TARGET_ARCHITECTURE}") - -vcpkg_execute_required_process( - COMMAND ${NMAKE} - WORKING_DIRECTORY ${SOURCE_PATH}/src - LOGNAME build-${TARGET_TRIPLET} +vcpkg_build_nmake( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH "src" + PROJECT_NAME "Makefile" + OPTIONS "PROCESSOR_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}" + OPTIONS_RELEASE "DETOURS_CONFIG=Release" + OPTIONS_DEBUG "DETOURS_CONFIG=Debug" ) -# Detours does not differentiate between Release and Debug builds, use the same binaries for both. -file(INSTALL ${SOURCE_PATH}/lib.${VCPKG_TARGET_ARCHITECTURE}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SOURCE_PATH}/lib.${VCPKG_TARGET_ARCHITECTURE}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib.${VCPKG_TARGET_ARCHITECTURE}Release/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib.${VCPKG_TARGET_ARCHITECTURE}Debug/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/include DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME detours) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/detours/vcpkg.json b/ports/detours/vcpkg.json new file mode 100644 index 00000000000000..2813febbd9d93d --- /dev/null +++ b/ports/detours/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "detours", + "version-string": "4.0.1", + "port-version": 3, + "description": "Detours is a software package for monitoring and instrumenting API calls on Windows.", + "homepage": "https://github.com/microsoft/Detours" +} diff --git a/ports/devicenameresolver/CONTROL b/ports/devicenameresolver/CONTROL deleted file mode 100644 index 1accbf8c5fe3f5..00000000000000 --- a/ports/devicenameresolver/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: devicenameresolver -Version: 2016-06-26-0850d88fa6-1 -Description: a little library that resolves a path from a (virtual) device name. diff --git a/ports/devicenameresolver/portfile.cmake b/ports/devicenameresolver/portfile.cmake index 743da3e6aba0fa..c62478202a6a05 100644 --- a/ports/devicenameresolver/portfile.cmake +++ b/ports/devicenameresolver/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_bitbucket( diff --git a/ports/devicenameresolver/vcpkg.json b/ports/devicenameresolver/vcpkg.json new file mode 100644 index 00000000000000..b52d9c4fd4a569 --- /dev/null +++ b/ports/devicenameresolver/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "devicenameresolver", + "version-string": "2016-06-26-0850d88fa6", + "port-version": 2, + "description": "a little library that resolves a path from a (virtual) device name." +} diff --git a/ports/devil/0003_fix-openexr.patch b/ports/devil/0003_fix-openexr.patch index d8038e4cf8af24..2465bb905bf226 100644 --- a/ports/devil/0003_fix-openexr.patch +++ b/ports/devil/0003_fix-openexr.patch @@ -1,91 +1,35 @@ ---- a/DevIL/src-IL/cmake/FindOpenEXR.cmake -+++ b/DevIL/src-IL/cmake/FindOpenEXR.cmake -@@ -1,64 +1,13 @@ --# Locate OpenEXR --# This module defines --# OPENEXR_LIBRARIES --# OPENEXR_FOUND, if false, do not try to link to OpenEXR --# OPENEXR_INCLUDE_DIR, where to find the headers --# --# $OPENEXR_DIR is an environment variable that would --# correspond to the ./configure --prefix=$OPENEXR_DIR --# --# Created by Robert Osfield. -+include(FindPackageHandleStandardArgs) - -+find_path(OPENEXR_INCLUDE_PATHS NAMES ImfRgbaFile.h PATH_SUFFIXES OpenEXR) - --FIND_PATH(OPENEXR_INCLUDE_DIR ImfIO.h -- $ENV{OPENEXR_DIR}/include -- $ENV{OPENEXR_DIR} -- ~/Library/Frameworks -- /Library/Frameworks -- /usr/local/include -- /usr/include -- /sw/include # Fink -- /opt/local/include # DarwinPorts -- /opt/csw/include # Blastwave -- /opt/include -- /usr/freeware/include --) -+find_library(OPENEXR_HALF_LIBRARY NAMES Half) -+find_library(OPENEXR_IEX_LIBRARY NAMES Iex-2_2) -+find_library(OPENEXR_IMATH_LIBRARY NAMES Imath-2_2) -+find_library(OPENEXR_ILMIMF_LIBRARY NAMES IlmImf-2_2) -+find_library(OPENEXR_ILMTHREAD_LIBRARY NAMES IlmThread-2_2) - --# Macro to find exr libraries (deduplicating search paths) --# example: OPENEXR_FIND_VAR(OPENEXR_IlmImf_LIBRARY IlmImf) --MACRO(OPENEXR_FIND_VAR varname libname) -- FIND_LIBRARY( ${varname} -- NAMES ${libname} -- PATHS -- $ENV{OPENEXR_DIR}/lib -- $ENV{OPENEXR_DIR} -- ~/Library/Frameworks -- /Library/Frameworks -- /usr/local/lib -- /usr/lib -- /sw/lib -- /opt/local/lib -- /opt/csw/lib -- /opt/lib -- /usr/freeware/lib64 -- ) --ENDMACRO(OPENEXR_FIND_VAR) -+set(OPENEXR_LIBRARIES ${OPENEXR_HALF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY}) - --# Macro to find exr libraries (and debug versions) --# example: OPENEXR_FIND(IlmImf) --MACRO(OPENEXR_FIND libname) -- OPENEXR_FIND_VAR(OPENEXR_${libname}_LIBRARY ${libname}) -- OPENEXR_FIND_VAR(OPENEXR_${libname}_LIBRARY_DEBUG ${libname}d) --ENDMACRO(OPENEXR_FIND) +diff --git a/DevIL/src-IL/CMakeLists.txt b/DevIL/src-IL/CMakeLists.txt +index 02e4f03..4accaa1 100644 +--- a/DevIL/src-IL/CMakeLists.txt ++++ b/DevIL/src-IL/CMakeLists.txt +@@ -235,8 +235,12 @@ target_link_libraries(IL ${libs}) + + # generate config.h + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.cmake.in ${CMAKE_CURRENT_SOURCE_DIR}/include/config.h) - --OPENEXR_FIND(IlmImf) --OPENEXR_FIND(IlmThread) --OPENEXR_FIND(Iex) --OPENEXR_FIND(Half) - --SET(OPENEXR_FOUND "NO") --IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY) -- SET(OPENEXR_LIBRARIES ${OPENEXR_IlmImf_LIBRARY} ${OPENEXR_IlmThread_LIBRARY} ${OPENEXR_Half_LIBRARY} ${OPENEXR_Iex_LIBRARY} ) -- SET(OPENEXR_LIBRARIES_VARS OPENEXR_IlmImf_LIBRARY OPENEXR_IlmThread_LIBRARY OPENEXR_Half_LIBRARY OPENEXR_Iex_LIBRARY ) -- SET(OPENEXR_FOUND "YES") --ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY) -+find_package_handle_standard_args(OPENEXR REQUIRED_VARS OPENEXR_LIBRARIES OPENEXR_INCLUDE_PATHS) ++add_definitions(-DHAVE_CONFIG_H) ++if(WIN32) ++ if(BUILD_SHARED_LIBS) ++ add_definitions(-DOPENEXR_DLL) ++ endif() ++endif() + + # generate pkg-config file + # TODO: add Requires.private or Libs.private +diff --git a/DevIL/src-IL/src/il_exr.cpp b/DevIL/src-IL/src/il_exr.cpp +index bbb3978..3916c6f 100644 --- a/DevIL/src-IL/src/il_exr.cpp +++ b/DevIL/src-IL/src/il_exr.cpp -@@ -15,14 +15,14 @@ +@@ -14,15 +14,10 @@ + #include "il_internal.h" #ifndef IL_NO_EXR - #ifndef HAVE_CONFIG_H // We are probably on a Windows box . +-#ifndef HAVE_CONFIG_H // We are probably on a Windows box . -//#define OPENEXR_DLL -#define HALF_EXPORTS -+#define OPENEXR_DLL -+//#define HALF_EXPORTS - #endif //HAVE_CONFIG_H - +-#endif //HAVE_CONFIG_H +- #include "il_exr.h" -#include -#include @@ -96,6 +40,8 @@ //#include //#include //#include +diff --git a/DevIL/src-IL/include/il_exr.h b/DevIL/src-IL/include/il_exr.h +index 3d880c4..04d721a 100644 --- a/DevIL/src-IL/include/il_exr.h +++ b/DevIL/src-IL/include/il_exr.h @@ -15,7 +15,7 @@ diff --git a/ports/devil/0004_compatible-jasper-2-0-20.patch b/ports/devil/0004_compatible-jasper-2-0-20.patch new file mode 100644 index 00000000000000..5cb23637503db4 --- /dev/null +++ b/ports/devil/0004_compatible-jasper-2-0-20.patch @@ -0,0 +1,52 @@ +diff --git a/DevIL/src-IL/src/il_jp2.cpp b/DevIL/src-IL/src/il_jp2.cpp +index 730afee..a419c14 100644 +--- a/DevIL/src-IL/src/il_jp2.cpp ++++ b/DevIL/src-IL/src/il_jp2.cpp +@@ -313,20 +313,31 @@ ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILimage *Image) + } + + +- +-static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt) ++#ifdef __APPLE__ ++static int iJp2_file_read(void *obj, char *buf, unsigned int cnt) ++#else ++static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, unsigned int cnt) ++#endif + { + obj; +- return iread(buf, 1, cnt); ++ return iread((void*)buf, 1, cnt); + } + +-static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt) ++#ifdef __APPLE__ ++static int iJp2_file_write(void *obj, const char *buf, unsigned int cnt) ++#else ++static int iJp2_file_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt) ++#endif + { + obj; + return iwrite(buf, 1, cnt); + } + ++#ifdef __APPLE__ + static long iJp2_file_seek(jas_stream_obj_t *obj, long offset, int origin) ++#else ++static long iJp2_file_seek(void *obj, long offset, int origin) ++#endif + { + obj; + +@@ -343,7 +354,11 @@ static long iJp2_file_seek(jas_stream_obj_t *obj, long offset, int origin) + return 0; // Failed + } + ++#ifdef __APPLE__ ++static int iJp2_file_close(void *obj) ++#else + static int iJp2_file_close(jas_stream_obj_t *obj) ++#endif + { + obj; + return 0; // We choose when we want to close the file. diff --git a/ports/devil/0005-fix-pkgconfig.patch b/ports/devil/0005-fix-pkgconfig.patch new file mode 100644 index 00000000000000..d45af68f720ae4 --- /dev/null +++ b/ports/devil/0005-fix-pkgconfig.patch @@ -0,0 +1,52 @@ +diff --git a/DevIL/src-IL/CMakeLists.txt b/DevIL/src-IL/CMakeLists.txt +index 4accaa1..c3a1874 100644 +--- a/DevIL/src-IL/CMakeLists.txt ++++ b/DevIL/src-IL/CMakeLists.txt +@@ -160,6 +160,27 @@ if(WIN32) + # Linux uses libIL.so, libILU.so, and libILUT.so, but Windows uses + # DevIL.dll, ILU.dll, and ILUT.dll. + set_target_properties(IL PROPERTIES OUTPUT_NAME "DevIL") ++ ++ configure_file(${CMAKE_CURRENT_LIST_DIR}/pkgconfig/IL.pc.cmake.in ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/DevIL.pc.cmake.in COPYONLY) ++ ++ file(READ ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/DevIL.pc.cmake.in PKGCONFIG_FILE) ++ string(REPLACE "IL" "DevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ file(WRITE ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/DevIL.pc.cmake.in "${PKGCONFIG_FILE}") ++ ++ file(READ ${CMAKE_CURRENT_LIST_DIR}/../src-ILU/pkgconfig/ILU.pc.cmake.in PKGCONFIG_FILE) ++ string(REPLACE "Requires: IL" "Requires: DevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ string(REPLACE "Libs.private: -lIL" "Libs.private: -lDevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ file(WRITE ${CMAKE_CURRENT_LIST_DIR}/../src-ILU/pkgconfig/ILU.pc.cmake.in "${PKGCONFIG_FILE}") ++ ++ file(READ ${CMAKE_CURRENT_LIST_DIR}/../src-ILUT/pkgconfig/ILUT.pc.cmake.in PKGCONFIG_FILE) ++ string(REPLACE "Requires: IL" "Requires: DevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ string(REPLACE "Libs.private: -lIL" "Libs.private: -lDevIL" PKGCONFIG_FILE "${PKGCONFIG_FILE}") ++ file(WRITE ${CMAKE_CURRENT_LIST_DIR}/../src-ILUT/pkgconfig/ILUT.pc.cmake.in "${PKGCONFIG_FILE}") ++ set(PKGCFG_IN_FILE pkgconfig/DevIL.pc.cmake.in) ++ set(PKGCFG_FILE DevIL.pc) ++else(WIN32) ++ set(PKGCFG_IN_FILE pkgconfig/IL.pc.cmake.in) ++ set(PKGCFG_FILE IL.pc) + endif(WIN32) + + if(UNICODE) +@@ -246,8 +267,8 @@ endif() + # TODO: add Requires.private or Libs.private + # (needed to support static linking?) + # TODO: sort out version number +-configure_file( pkgconfig/IL.pc.cmake.in +- ${CMAKE_CURRENT_BINARY_DIR}/IL.pc @ONLY) ++configure_file( ${PKGCFG_IN_FILE} ++ ${CMAKE_CURRENT_BINARY_DIR}/${PKGCFG_FILE} @ONLY) + + + # Installation +@@ -259,7 +280,7 @@ install (TARGETS IL + install (FILES ../include/IL/il.h DESTINATION include/IL) + + install(FILES +- ${CMAKE_CURRENT_BINARY_DIR}/IL.pc ++ ${CMAKE_CURRENT_BINARY_DIR}/${PKGCFG_FILE} + DESTINATION lib/pkgconfig + ) + diff --git a/ports/devil/0006-fix-ilut-header.patch b/ports/devil/0006-fix-ilut-header.patch new file mode 100644 index 00000000000000..5af04e897def2e --- /dev/null +++ b/ports/devil/0006-fix-ilut-header.patch @@ -0,0 +1,12 @@ +diff --git a/DevIL/src-ILUT/CMakeLists.txt b/DevIL/src-ILUT/CMakeLists.txt +index 398d3c1..617c8d8 100644 +--- a/DevIL/src-ILUT/CMakeLists.txt ++++ b/DevIL/src-ILUT/CMakeLists.txt +@@ -77,6 +77,7 @@ install (TARGETS ILUT + RUNTIME DESTINATION bin + ) + install (FILES ../include/IL/ilut.h DESTINATION include/IL) ++install (FILES ../include/IL/ilut_config.h DESTINATION include/IL) + + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/ILUT.pc diff --git a/ports/devil/CONTROL b/ports/devil/CONTROL deleted file mode 100644 index 8c65b2ddf5bab2..00000000000000 --- a/ports/devil/CONTROL +++ /dev/null @@ -1,30 +0,0 @@ -Source: devil -Version: 1.8.0-4 -Build-Depends: -Homepage: https://github.com/DentonW/DevIL -Description: A full featured cross-platform image library -Default-Features: libpng, tiff, libjpeg, openexr, jasper, lcms - -Feature: libpng -Build-Depends: libpng -Description: Use Libpng for .png (and some .ico) - -Feature: tiff -Build-Depends: tiff -Description: Use Libtiff for .tif support - -Feature: libjpeg -Build-Depends: libjpeg-turbo -Description: Use Libjpeg for .jpg (and some .blp) support - -Feature: openexr -Build-Depends: openexr -Description: Use openexr - -Feature: jasper -Build-Depends: jasper -Description: Use JasPer for .jp2 (and some .icns) support - -Feature: lcms -Build-Depends: lcms -Description: Use Little CMS for color profiles diff --git a/ports/devil/portfile.cmake b/ports/devil/portfile.cmake index db994489534f0a..bb5d4357bb015d 100644 --- a/ports/devil/portfile.cmake +++ b/ports/devil/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DentonW/DevIL @@ -11,73 +9,41 @@ vcpkg_from_github( 0002_fix-missing-mfc-includes.patch 0003_fix-openexr.patch enable-static.patch + 0004_compatible-jasper-2-0-20.patch + 0005-fix-pkgconfig.patch + 0006-fix-ilut-header.patch ) -set(IL_NO_PNG 1) -if("libpng" IN_LIST FEATURES) - set(IL_NO_PNG 0) -endif() - -set(IL_NO_TIF 1) -if("tiff" IN_LIST FEATURES) - set(IL_NO_TIF 0) -endif() - -set(IL_NO_JPG 1) -if("libjpeg" IN_LIST FEATURES) - set(IL_NO_JPG 0) -endif() - -set(IL_NO_EXR 1) -if("openexr" IN_LIST FEATURES) - set(IL_NO_EXR 0) -endif() - -set(IL_NO_JP2 1) -if("jasper" IN_LIST FEATURES) - set(IL_NO_JP2 0) -endif() - -set(IL_NO_MNG 1) -#if("libmng" IN_LIST FEATURES) -# set(IL_NO_MNG 0) -#endif() - -set(IL_NO_LCMS 1) -if("lcms" IN_LIST FEATURES) - set(IL_NO_LCMS 0) -endif() - -set(IL_USE_DXTC_NVIDIA 0) -#if("nvtt" IN_LIST FEATURES) -# set(IL_USE_DXTC_NVIDIA 1) -#endif() - -set(IL_USE_DXTC_SQUISH 0) -#if("libsquish" IN_LIST FEATURES) -# set(IL_USE_DXTC_SQUISH 1) -#endif() +file(REMOVE ${SOURCE_PATH}/DevIL/src-IL/cmake/FindOpenEXR.cmake) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + INVERTED_FEATURES + libpng IL_NO_PNG + tiff IL_NO_TIF + libjpeg IL_NO_JPG + openexr IL_NO_EXR + jasper IL_NO_JP2 + lcms IL_NO_LCMS +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/DevIL PREFER_NINJA DISABLE_PARALLEL_CONFIGURE OPTIONS - -DIL_NO_PNG=${IL_NO_PNG} - -DIL_NO_TIF=${IL_NO_TIF} - -DIL_NO_JPG=${IL_NO_JPG} - -DIL_NO_EXR=${IL_NO_EXR} - -DIL_NO_JP2=${IL_NO_JP2} - -DIL_NO_MNG=${IL_NO_MNG} - -DIL_NO_LCMS=${IL_NO_LCMS} - -DIL_USE_DXTC_NVIDIA=${IL_USE_DXTC_NVIDIA} - -DIL_USE_DXTC_SQUISH=${IL_USE_DXTC_SQUISH} + ${FEATURE_OPTIONS} + -DIL_NO_MNG=ON + -DIL_USE_DXTC_NVIDIA=OFF + -DIL_USE_DXTC_SQUISH=OFF ) vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/devil RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/devil/vcpkg.json b/ports/devil/vcpkg.json new file mode 100644 index 00000000000000..2d716cbe65147b --- /dev/null +++ b/ports/devil/vcpkg.json @@ -0,0 +1,53 @@ +{ + "name": "devil", + "version": "1.8.0", + "port-version": 8, + "description": "A full featured cross-platform image library", + "homepage": "https://github.com/DentonW/DevIL", + "default-features": [ + "jasper", + "lcms", + "libjpeg", + "libpng", + "openexr", + "tiff" + ], + "features": { + "jasper": { + "description": "Use JasPer for .jp2 (and some .icns) support", + "dependencies": [ + "jasper" + ] + }, + "lcms": { + "description": "Use Little CMS for color profiles", + "dependencies": [ + "lcms" + ] + }, + "libjpeg": { + "description": "Use Libjpeg for .jpg (and some .blp) support", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "libpng": { + "description": "Use Libpng for .png (and some .ico)", + "dependencies": [ + "libpng" + ] + }, + "openexr": { + "description": " Use openexr", + "dependencies": [ + "openexr" + ] + }, + "tiff": { + "description": "Use Libtiff for .tif support", + "dependencies": [ + "tiff" + ] + } + } +} diff --git a/ports/dimcli/CONTROL b/ports/dimcli/CONTROL deleted file mode 100644 index 12078257a7bf1f..00000000000000 --- a/ports/dimcli/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: dimcli -Version: 4.1.0-1 -Homepage: https://github.com/gknowles/dimcli -Description: C++ command line parser toolkit diff --git a/ports/dimcli/fix-NameBoolean.patch b/ports/dimcli/fix-NameBoolean.patch index 35eb64d681ed24..a0d9afb5615609 100644 --- a/ports/dimcli/fix-NameBoolean.patch +++ b/ports/dimcli/fix-NameBoolean.patch @@ -1,63 +1,63 @@ -diff --git a/libs/dimcli/cli.cpp b/libs/dimcli/cli.cpp -index 9e67c12..c96bd24 100644 ---- a/libs/dimcli/cli.cpp -+++ b/libs/dimcli/cli.cpp -@@ -388,8 +388,8 @@ GroupConfig const & Cli::Config::findGrpOrDie(Cli const & cli) { - ***/ - - //=========================================================================== --Cli::OptBase::OptBase(string const & names, bool boolean) -- : m_bool{boolean} -+Cli::OptBase::OptBase(string const & names, bool in_boolean) -+ : m_bool{in_boolean} - , m_names{names} - { - // set m_fromName and assert if names is malformed -@@ -486,12 +486,12 @@ static bool includeName( - OptName const & name, - NameListType type, - Cli::OptBase const & opt, -- bool boolean, -+ bool in_boolean, - bool inverted - ) { - if (name.opt != &opt) - return false; -- if (boolean) { -+ if (in_boolean) { - if (type == kNameEnable) - return !name.invert; - if (type == kNameDisable) -diff --git a/libs/dimcli/cli.h b/libs/dimcli/cli.h -index 2c1615c..3e4f405 100644 ---- a/libs/dimcli/cli.h -+++ b/libs/dimcli/cli.h -@@ -818,7 +818,7 @@ public: - }; - - public: -- OptBase(std::string const & keys, bool boolean); -+ OptBase(std::string const & keys, bool in_boolean); - virtual ~OptBase() {} - - //----------------------------------------------------------------------- -@@ -952,7 +952,7 @@ inline void Cli::OptBase::setValueDesc() { - template - class Cli::OptShim : public OptBase { - public: -- OptShim(std::string const & keys, bool boolean); -+ OptShim(std::string const & keys, bool in_boolean); - OptShim(OptShim const &) = delete; - OptShim & operator=(OptShim const &) = delete; - -@@ -1100,8 +1100,8 @@ protected: - - //=========================================================================== - template --Cli::OptShim::OptShim(std::string const & keys, bool boolean) -- : OptBase(keys, boolean) -+Cli::OptShim::OptShim(std::string const & keys, bool in_boolean) -+ : OptBase(keys, in_boolean) - { - setValueDesc(); - } +diff --git a/libs/dimcli/cli.cpp b/libs/dimcli/cli.cpp +index 45dac3b..6129884 100644 +--- a/libs/dimcli/cli.cpp ++++ b/libs/dimcli/cli.cpp +@@ -392,8 +392,8 @@ GroupConfig const & Cli::Config::findGrpOrDie(Cli const & cli) { + ***/ + + //=========================================================================== +-Cli::OptBase::OptBase(string const & names, bool boolean) +- : m_bool{boolean} ++Cli::OptBase::OptBase(string const & names, bool in_boolean) ++ : m_bool{in_boolean} + , m_names{names} + { + // set m_fromName and assert if names is malformed +@@ -526,12 +526,12 @@ static bool includeName( + OptName const & name, + NameListType type, + Cli::OptBase const & opt, +- bool boolean, ++ bool in_boolean, + bool inverted + ) { + if (name.opt != &opt) + return false; +- if (boolean) { ++ if (in_boolean) { + if (type == kNameEnable) + return !name.invert; + if (type == kNameDisable) +diff --git a/libs/dimcli/cli.h b/libs/dimcli/cli.h +index d4941dc..fa8d526 100644 +--- a/libs/dimcli/cli.h ++++ b/libs/dimcli/cli.h +@@ -777,7 +777,7 @@ public: + }; + + public: +- OptBase(std::string const & keys, bool boolean); ++ OptBase(std::string const & keys, bool in_boolean); + virtual ~OptBase() {} + + //----------------------------------------------------------------------- +@@ -1062,7 +1062,7 @@ std::string Cli::OptBase::toValueDesc() const { + template + class Cli::OptShim : public OptBase { + public: +- OptShim(std::string const & keys, bool boolean); ++ OptShim(std::string const & keys, bool in_boolean); + OptShim(OptShim const &) = delete; + OptShim & operator=(OptShim const &) = delete; + +@@ -1249,8 +1249,8 @@ protected: + + //=========================================================================== + template +-Cli::OptShim::OptShim(std::string const & keys, bool boolean) +- : OptBase(keys, boolean) ++Cli::OptShim::OptShim(std::string const & keys, bool in_boolean) ++ : OptBase(keys, in_boolean) + { + if (std::is_arithmetic::value) + this->imbue(std::locale("")); diff --git a/ports/dimcli/portfile.cmake b/ports/dimcli/portfile.cmake index 2d231117cad2f9..ceb07c04466756 100644 --- a/ports/dimcli/portfile.cmake +++ b/ports/dimcli/portfile.cmake @@ -1,14 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gknowles/dimcli - REF v4.1.0 - SHA512 5de010b5abfda9e6996bba8c621e03ae0cf81dbc2f69cd859e2ebf7b1706c451f7f8e142299784646d89ca3c3e5803e8711215680b8bdb8eb663158bff3b4f3d + REF a4dbb4b1c8a3825fc304bbbad3438dbe1840feae # v5.0.2 + SHA512 25cc9002fd46856854545934f385d8578f207b1ce01802a172e49e008cdf1db0db11db7cefeef18258b99c13570af9193e83f5826613d8b0a118d7bae3f0d03f HEAD_REF master - PATCHES - fix-NameBoolean.patch ) + set(staticCrt OFF) if(VCPKG_CRT_LINKAGE STREQUAL "static") set(staticCrt ON) @@ -28,8 +25,4 @@ vcpkg_install_cmake() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") # Handle copyright -file( - INSTALL "${SOURCE_PATH}/LICENSE" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/dimcli" - RENAME copyright -) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/dimcli" RENAME copyright) diff --git a/ports/dimcli/vcpkg.json b/ports/dimcli/vcpkg.json new file mode 100644 index 00000000000000..319d33cc888fe7 --- /dev/null +++ b/ports/dimcli/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "dimcli", + "version-string": "5.0.2", + "port-version": 1, + "description": "C++ command line parser toolkit", + "homepage": "https://github.com/gknowles/dimcli" +} diff --git a/ports/directx-headers/portfile.cmake b/ports/directx-headers/portfile.cmake new file mode 100644 index 00000000000000..8d1bb0beb68916 --- /dev/null +++ b/ports/directx-headers/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_fail_port_install(ON_TARGET "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectX-Headers + REF v1.4.9 + SHA512 439d28a8344ef3a012428f53fcb9d2d9823d51c61786363d87f8ba15921326c220478b2557aab3f641a2406f1e5f299a8e21a82547febff3b9cd7b26b09b1c22 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DDXHEADERS_BUILD_TEST=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/directx-headers/cmake) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/directx-headers/vcpkg.json b/ports/directx-headers/vcpkg.json new file mode 100644 index 00000000000000..66658e2f48d721 --- /dev/null +++ b/ports/directx-headers/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "directx-headers", + "version": "1.4.9", + "description": "Official DirectX 12 Headers", + "homepage": "https://devblogs.microsoft.com/directx/", + "supports": "windows | linux" +} diff --git a/ports/directxmath/portfile.cmake b/ports/directxmath/portfile.cmake new file mode 100644 index 00000000000000..b9a509edafcf5e --- /dev/null +++ b/ports/directxmath/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectXMath + REF jan2021 + SHA512 8288f9e4d30b4947e98122f298ca25b8e2f82091c1257d3a0fd4d8de44c4c9a97d4549c105b388afbefad11ad6f30429e875e3e70eb4aa7865be6d4c08d6d1f3 + HEAD_REF master + FILE_DISAMBIGUATOR 2 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_download_distfile( + SAL_HEADER + URLS "https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h" + FILENAME "sal.h" + SHA512 1643571673195d9eb892d2f2ac76eac7113ef7aa0ca116d79f3e4d3dc9df8a31600a9668b7e7678dfbe5a76906f9e0734ef8d6db0903ccc68fc742dd8238d8b0 + ) + + file(INSTALL + ${DOWNLOADS}/sal.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXMath) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/directxmath/vcpkg.json b/ports/directxmath/vcpkg.json new file mode 100644 index 00000000000000..e0ffe0e44029fe --- /dev/null +++ b/ports/directxmath/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "directxmath", + "version-string": "jan2021", + "port-version": 1, + "description": "DirectXMath SIMD C++ math library", + "homepage": "https://github.com/Microsoft/DirectXMath", + "documentation": "https://docs.microsoft.com/en-us/windows/win32/dxmath/directxmath-portal", + "license": "MIT" +} diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL deleted file mode 100644 index 331466f5371299..00000000000000 --- a/ports/directxmesh/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: directxmesh -Version: jun2019-1 -Homepage: https://github.com/Microsoft/DirectXMesh -Description: DirectXMesh geometry processing library \ No newline at end of file diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index 3cf71872795e05..baf22e54baa492 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/portfile.cmake @@ -1,67 +1,65 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "DirectXMesh only supports dynamic CRT linkage") -endif() +vcpkg_fail_port_install(ON_TARGET "OSX") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXMesh - REF jun2019 - SHA512 6d42cd4d3e34e7f3bd5cee1a9ad90c9f89eafa55951a0a8d776034a05caa06b0fd17629547d14c8f2b4d0c5fafdbd24ae05c2a6582b5d069093d6b4dadac09a0 + REF jun2021 + SHA512 ed61e14bb217bdff803ad95bfffe31aac7ff0a3f78b963aac183c61233374def4c0b052d1bf9b0d03900fc5be052e1d8fe8de00e81f01349eff1a564d55be610 HEAD_REF master ) -IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSE() - SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -ENDIF() - -if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140") - set(VS_VERSION "2015") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141") - set(VS_VERSION "2017") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142") - set(VS_VERSION "2019") -else() - message(FATAL_ERROR "Unsupported platform toolset.") +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + dx12 BUILD_DX12 +) + +if (VCPKG_HOST_IS_LINUX) + message(WARNING "Build ${PORT} requires GCC version 9 or later") endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(SLN_NAME "Windows10_${VS_VERSION}") +if(VCPKG_TARGET_IS_UWP) + set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF) else() - set(SLN_NAME "Desktop_${VS_VERSION}") + set(EXTRA_OPTIONS -DBUILD_TOOLS=ON) endif() -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/DirectXMesh_${SLN_NAME}.sln - PLATFORM ${BUILD_ARCH} +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS} ) -file(INSTALL - ${SOURCE_PATH}/DirectXMesh/DirectXMesh.h - ${SOURCE_PATH}/DirectXMesh/DirectXMesh.inl - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64)) + vcpkg_download_distfile( + MESHCONVERT_EXE + URLS "https://github.com/Microsoft/DirectXMesh/releases/download/jun2021/meshconvert.exe" + FILENAME "meshconvert-jun2021.exe" + SHA512 2a5e1eb69f24fd321d372dcd790970a15957757eacd0a861001299409ff56372bc890c2d8baba32368c81eeb63cdd7aef514c57bca1e7e4e3f7bdf494c3453a0 + ) + + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxmesh/") + + file(INSTALL + ${MESHCONVERT_EXE} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxmesh/) + + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert-jun2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert.exe) + +elseif((VCPKG_TARGET_IS_WINDOWS) AND (NOT VCPKG_TARGET_IS_UWP)) + + vcpkg_copy_tools( + TOOL_NAMES meshconvert + SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake + ) -file(INSTALL - ${SOURCE_PATH}/DirectXMesh/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXMesh.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL - ${SOURCE_PATH}/DirectXMesh/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXMesh.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxmesh) - file(MAKE_DIRECTORY ${TOOL_PATH}) - file(INSTALL - ${SOURCE_PATH}/Meshconvert/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/Meshconvert.exe - DESTINATION ${TOOL_PATH}) endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/directxmesh) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/directxmesh/LICENSE ${CURRENT_PACKAGES_DIR}/share/directxmesh/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/directxmesh/vcpkg.json b/ports/directxmesh/vcpkg.json new file mode 100644 index 00000000000000..4eb6c26beaa6c4 --- /dev/null +++ b/ports/directxmesh/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "directxmesh", + "version-string": "jun2021", + "description": "DirectXMesh geometry processing library", + "homepage": "http://go.microsoft.com/fwlink/?LinkID=324981", + "documentation": "https://github.com/microsoft/DirectXMesh/wiki", + "license": "MIT", + "supports": "windows | linux", + "dependencies": [ + "directx-headers", + "directxmath" + ], + "features": { + "dx12": { + "description": "Build with DirectX12 support for Windows 10" + } + } +} diff --git a/ports/directxsdk/portfile.cmake b/ports/directxsdk/portfile.cmake new file mode 100644 index 00000000000000..f684800f49d36b --- /dev/null +++ b/ports/directxsdk/portfile.cmake @@ -0,0 +1,148 @@ +vcpkg_fail_port_install(ON_TARGET "LINUX" "OSX" "UWP" "ANDROID" ON_ARCH "arm") + +message(WARNING "Build ${PORT} is deprecated, untested in CI, and requires the use of the DirectSetup legacy REDIST solution. See https://aka.ms/dxsdk for more information.") + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe" + FILENAME "DXSDK_Jun10_SHA256.exe" + SHA512 24e1e9bda319b780124b865f4640822cfc44e4d18fbdcc8456d48fe54081652ce4ddb63d3bd8596351057cbae50fc824b8297e99f0f7c97547153162562ba73f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +# See https://walbourn.github.io/the-zombie-directx-sdk/ +set(INC_DIR "${SOURCE_PATH}/Include") +set(LIB_DIR "${SOURCE_PATH}/Lib/${VCPKG_TARGET_ARCHITECTURE}") + +set(HEADERS + ${INC_DIR}/audiodefs.h + ${INC_DIR}/comdecl.h + ${INC_DIR}/D3DX10.h + ${INC_DIR}/d3dx10async.h + ${INC_DIR}/D3DX10core.h + ${INC_DIR}/D3DX10math.h + ${INC_DIR}/D3DX10math.inl + ${INC_DIR}/D3DX10mesh.h + ${INC_DIR}/D3DX10tex.h + ${INC_DIR}/D3DX11.h + ${INC_DIR}/D3DX11async.h + ${INC_DIR}/D3DX11core.h + ${INC_DIR}/D3DX11tex.h + ${INC_DIR}/d3dx9.h + ${INC_DIR}/d3dx9anim.h + ${INC_DIR}/d3dx9core.h + ${INC_DIR}/d3dx9effect.h + ${INC_DIR}/d3dx9math.h + ${INC_DIR}/d3dx9math.inl + ${INC_DIR}/d3dx9mesh.h + ${INC_DIR}/d3dx9shader.h + ${INC_DIR}/d3dx9shape.h + ${INC_DIR}/d3dx9tex.h + ${INC_DIR}/d3dx9xof.h + ${INC_DIR}/D3DX_DXGIFormatConvert.inl + ${INC_DIR}/dsetup.h + ${INC_DIR}/dxdiag.h + ${INC_DIR}/DxErr.h + ${INC_DIR}/dxfile.h + ${INC_DIR}/dxsdkver.h + ${INC_DIR}/PIXPlugin.h + ${INC_DIR}/rmxfguid.h + ${INC_DIR}/rmxftmpl.h + ${INC_DIR}/xact3.h + ${INC_DIR}/xact3d3.h + ${INC_DIR}/xact3wb.h + ${INC_DIR}/XDSP.h + ${INC_DIR}/xma2defs.h) + +set(DEBUG_LIBS + ${LIB_DIR}/d3dx10d.lib + ${LIB_DIR}/d3dx11d.lib + ${LIB_DIR}/d3dx9d.lib +) +set(RELEASE_LIBS + ${LIB_DIR}/d3dx10.lib + ${LIB_DIR}/d3dx11.lib + ${LIB_DIR}/d3dx9.lib +) +set(OTHER_LIBS + ${LIB_DIR}/d3dxof.lib + ${LIB_DIR}/DxErr.lib +) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL "x86") + list(APPEND OTHER_LIBS ${LIB_DIR}/dsetup.lib) +endif() + +set(XINPUT13_HEADER ${INC_DIR}/XInput.h) +set(XINPUT13_LIB ${LIB_DIR}/XInput.lib) + +set(XAUDIO27_HEADERS + ${INC_DIR}/X3DAudio.h + ${INC_DIR}/XAPO.h + ${INC_DIR}/XAPOBase.h + ${INC_DIR}/XAPOFX.h + ${INC_DIR}/XAudio2.h + ${INC_DIR}/XAudio2fx.h) +set(XAUDIO27_DEBUG_LIBS ${LIB_DIR}/xapobased.lib) +set(XAUDIO27_RELEASE_LIBS ${LIB_DIR}/xapobase.lib) +set(XAUDIO27_OTHER_LIBS + ${LIB_DIR}/X3DAudio.lib + ${LIB_DIR}/XAPOFX.lib +) + +set(XP_HEADERS + ${INC_DIR}/D3D10.h + ${INC_DIR}/D3D10effect.h + ${INC_DIR}/d3d10misc.h + ${INC_DIR}/d3d10sdklayers.h + ${INC_DIR}/D3D10shader.h + ${INC_DIR}/D3D10_1.h + ${INC_DIR}/D3D10_1shader.h + ${INC_DIR}/D3D11.h + ${INC_DIR}/D3D11SDKLayers.h + ${INC_DIR}/D3D11Shader.h + ${INC_DIR}/D3Dcommon.h + ${INC_DIR}/D3Dcompiler.h + ${INC_DIR}/D3DCSX.h + ${INC_DIR}/D3DX_DXGIFormatConvert.inl + ${INC_DIR}/xnamath.h + ${INC_DIR}/xnamathconvert.inl + ${INC_DIR}/xnamathmatrix.inl + ${INC_DIR}/xnamathmisc.inl + ${INC_DIR}/xnamathvector.inl) + +set(XP_DEBUG_LIBS ${LIB_DIR}/D3DCSXd.lib) +set(XP_RELEASE_LIBS ${LIB_DIR}/D3DCSX.lib) +set(XP_OTHER_LIBS + ${LIB_DIR}/d3dcompiler.lib + ${LIB_DIR}/dxguid.lib +) + + +#install(DIRECTORY "${SOURCE_PATH}/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(COPY ${RELEASE_LIBS} ${OTHER_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${DEBUG_LIBS} ${OTHER_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +if(("xinput1-3" IN_LIST FEATURES) OR ("xp" IN_LIST FEATURES)) + file(COPY ${XINPUT13_HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + file(COPY ${XINPUT13_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${XINPUT13_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +if(("xaudio2-7" IN_LIST FEATURES) OR ("xp" IN_LIST FEATURES)) + file(COPY ${XAUDIO27_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + file(COPY ${XAUDIO27_RELEASE_LIBS} ${XAUDIO27_OTHER_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${XAUDIO27_DEBUG_LIBS} ${XAUDIO27_OTHER_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +if("xp" IN_LIST FEATURES) + file(COPY ${XP_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + file(COPY ${XP_RELEASE_LIBS} ${XP_OTHER_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${XP_DEBUG_LIBS} ${XP_OTHER_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/Documentation/License Agreements/DirectX SDK EULA.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/directxsdk/vcpkg.json b/ports/directxsdk/vcpkg.json new file mode 100644 index 00000000000000..b43961e7ce9981 --- /dev/null +++ b/ports/directxsdk/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "directxsdk", + "version-string": "jun10", + "port-version": 3, + "description": "Legacy DirectX SDK", + "homepage": "https://docs.microsoft.com/en-us/windows/win32/directx-sdk--august-2009-", + "supports": "windows & !uwp & !arm", + "features": { + "xaudio2-7": { + "description": "Include headers/libs for legacy XAudio 2.7 (prefer use of XAudio2Redist)" + }, + "xinput1-3": { + "description": "Include headers for legacy XInput 1.3 (prefer use of XInput 9.1.0 or 1.4)" + }, + "xp": { + "description": "Include headers/libs needed for Windows 7.1A targeting Windows XP / Server 2003" + } + } +} diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL deleted file mode 100644 index 4eb03bb015240c..00000000000000 --- a/ports/directxtex/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: directxtex -Version: jun2019-1 -Homepage: https://github.com/Microsoft/DirectXTex -Description: DirectXTex texture processing library \ No newline at end of file diff --git a/ports/directxtex/enable_openexr_support.patch b/ports/directxtex/enable_openexr_support.patch new file mode 100644 index 00000000000000..2fef1f9d7dfefe --- /dev/null +++ b/ports/directxtex/enable_openexr_support.patch @@ -0,0 +1,22 @@ +diff --git a/DirectXTexEXR.cpp b/DirectXTexEXR.cpp +index 9ac601f..204bde2 100644 +--- a/DirectXTex/DirectXTexEXR.cpp ++++ b/DirectXTex/DirectXTexEXR.cpp +@@ -8,7 +8,7 @@ + //-------------------------------------------------------------------------------------- + + //Uncomment if you add DirectXTexEXR to your copy of the DirectXTex library +-//#include "DirectXTexP.h" ++#include "DirectXTexP.h" + + #include "DirectXTexEXR.h" + +@@ -56,7 +56,7 @@ using namespace DirectX; + using PackedVector::XMHALF4; + + // Comment out this first anonymous namespace if you add the include of DirectXTexP.h above +-#ifdef WIN32 ++#if 0 + namespace + { + struct handle_closer { void operator()(HANDLE h) { assert(h != INVALID_HANDLE_VALUE); if (h) CloseHandle(h); } }; diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index a58d531698bb58..e3efa28f1314a9 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -1,72 +1,110 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "DirectXTex only supports dynamic CRT linkage") -endif() - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/DirectXTex - REF jun2019 - SHA512 036a4593f8117e622cd6f609aea5bad734f9c3fc239984ec4f970cb6634ac3097cdb5ed2e467d3b1549e2340bcfe10ee4925b4e3691cf7f729ca538d3724c26e - HEAD_REF master -) - -IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSE() - SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -ENDIF() - -if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140") - set(VS_VERSION "2015") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141") - set(VS_VERSION "2017") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142") - set(VS_VERSION "2019") -else() - message(FATAL_ERROR "Unsupported platform toolset.") -endif() - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(SLN_NAME "Windows10_${VS_VERSION}") -else() - set(SLN_NAME "Desktop_${VS_VERSION}") -endif() - -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/DirectXTex_${SLN_NAME}.sln - PLATFORM ${BUILD_ARCH} -) - -file(INSTALL - ${SOURCE_PATH}/DirectXTex/DirectXTex.h - ${SOURCE_PATH}/DirectXTex/DirectXTex.inl - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) -file(INSTALL - ${SOURCE_PATH}/DirectXTex/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTex.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL - ${SOURCE_PATH}/DirectXTex/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTex.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtex) - file(MAKE_DIRECTORY ${TOOL_PATH}) - file(INSTALL - ${SOURCE_PATH}/Texdiag/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/texdiag.exe - DESTINATION ${TOOL_PATH}) - file(INSTALL - ${SOURCE_PATH}/Texconv/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/Texconv.exe - DESTINATION ${TOOL_PATH}) - file(INSTALL - ${SOURCE_PATH}/Texassemble/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/Texassemble.exe - DESTINATION ${TOOL_PATH}) -endif() - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/DirectXTex) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/DirectXTex/LICENSE ${CURRENT_PACKAGES_DIR}/share/DirectXTex/copyright) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install(ON_TARGET "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectXTex + REF aug2021 + SHA512 72b688848ad7645e018bb7dc3a3179ea3857e8349185ad53ad583b17aca555554ce44773a4b900ad163b2fd8551c28c3503b88333d8cff8f8d3ee03017bad35d + HEAD_REF master +) + +if("openexr" IN_LIST FEATURES) + vcpkg_download_distfile( + DIRECTXTEX_EXR_HEADER + URLS "https://raw.githubusercontent.com/wiki/Microsoft/DirectXTex/DirectXTexEXR.h" + FILENAME "DirectXTexEXR-2.h" + SHA512 54163820996f7f3c47d0e34da7d717ba51a4363458d77e8f3750d2b6b38bcf803f199b913b4fd7b8dcdd3f520cd0c2bb42a9f79d30f5805fccdece6af368dd12 + ) + + vcpkg_download_distfile( + DIRECTXTEX_EXR_SOURCE + URLS "https://raw.githubusercontent.com/wiki/Microsoft/DirectXTex/DirectXTexEXR.cpp" + FILENAME "DirectXTexEXR-2.cpp" + SHA512 fbf5a330961f3ac80e4425e8451e9a696240cd89fabca744a19f1f110ae188bae7d8eb5b058aaf66015066d919d4f581b14494d78d280147b23355d8a32745b9 + ) + + file(COPY ${DIRECTXTEX_EXR_HEADER} DESTINATION ${SOURCE_PATH}/DirectXTex) + file(COPY ${DIRECTXTEX_EXR_SOURCE} DESTINATION ${SOURCE_PATH}/DirectXTex) + file(RENAME ${SOURCE_PATH}/DirectXTex/DirectXTexEXR-2.h ${SOURCE_PATH}/DirectXTex/DirectXTexEXR.h) + file(RENAME ${SOURCE_PATH}/DirectXTex/DirectXTexEXR-2.cpp ${SOURCE_PATH}/DirectXTex/DirectXTexEXR.cpp) + vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES enable_openexr_support.patch) +endif() + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + dx12 BUILD_DX12 + openexr ENABLE_OPENEXR_SUPPORT +) + +if (VCPKG_HOST_IS_LINUX) + message(WARNING "Build ${PORT} requires GCC version 9 or later") +endif() + +if(VCPKG_TARGET_IS_UWP) + set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF) +else() + set(EXTRA_OPTIONS -DBUILD_TOOLS=ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + ${EXTRA_OPTIONS} + -DBC_USE_OPENMP=ON + -DBUILD_DX11=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64) AND (NOT ("openexr" IN_LIST FEATURES))) + vcpkg_download_distfile( + TEXASSEMBLE_EXE + URLS "https://github.com/Microsoft/DirectXTex/releases/download/aug2021/texassemble.exe" + FILENAME "texassemble-aug2021.exe" + SHA512 11b07da257d7ea394fa789210b2985656bf28a0b6117d5380d9639ffc0a460a0e6c4bdbb24256dcf3b4d75088b4b5386951a7de856fecb99e73dfe326b4bfe45 + ) + + vcpkg_download_distfile( + TEXCONV_EXE + URLS "https://github.com/Microsoft/DirectXTex/releases/download/aug2021/texconv.exe" + FILENAME "texconv-aug2021.exe" + SHA512 c11bc77a36d5989189519793f3a44c15f1e01b3e0a6254bffca4ee6f96c933a6add34ffc7e409f3c3f97d862816006d3ca440876a4af200f035353d096902c5b + ) + + vcpkg_download_distfile( + TEXDIAG_EXE + URLS "https://github.com/Microsoft/DirectXTex/releases/download/aug2021/texdiag.exe" + FILENAME "texdiag-aug2021.exe" + SHA512 73ae5fbc20ff7d970891d8e4029f1400f5d16675912cc4af97f9ef0e563dc77fa89690989e80eec5fd033975cf67d350be5a547d08fc5fecbabd4577603eef80 + ) + + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtex/") + + file(INSTALL + ${TEXASSEMBLE_EXE} + ${TEXCONV_EXE} + ${TEXDIAG_EXE} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxtex/) + + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxtex/texassemble-aug2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxtex/texassemble.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxtex/texconv-aug2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxtex/texconv.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxtex/texdiag-aug2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxtex/texadiag.exe) + +elseif((VCPKG_TARGET_IS_WINDOWS) AND (NOT VCPKG_TARGET_IS_UWP)) + + vcpkg_copy_tools( + TOOL_NAMES texassemble texconv texdiag + SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake + ) + +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/directxtex/vcpkg.json b/ports/directxtex/vcpkg.json new file mode 100644 index 00000000000000..441c18d442bc07 --- /dev/null +++ b/ports/directxtex/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "directxtex", + "version-string": "aug2021", + "description": "DirectXTex texture processing library", + "homepage": "https://github.com/Microsoft/DirectXTex", + "documentation": "https://github.com/microsoft/DirectXTex/wiki", + "license": "MIT", + "supports": "windows | linux", + "dependencies": [ + "directx-headers", + "directxmath" + ], + "features": { + "dx12": { + "description": "Build with DirectX12 support for Windows 10" + }, + "openexr": { + "description": "Enable OpenEXR support", + "dependencies": [ + "openexr" + ] + } + } +} diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL deleted file mode 100644 index cbe291a8f27f2a..00000000000000 --- a/ports/directxtk/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: directxtk -Version: jun2019-1 -Homepage: https://github.com/Microsoft/DirectXTK -Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/ports/directxtk/fix-invalid-configuration.patch b/ports/directxtk/fix-invalid-configuration.patch deleted file mode 100644 index 785fd009acc62f..00000000000000 --- a/ports/directxtk/fix-invalid-configuration.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/DirectXTK_Windows10.sln b/DirectXTK_Windows10.sln -index 8962307..9e3b8a7 100644 ---- a/DirectXTK_Windows10.sln -+++ b/DirectXTK_Windows10.sln -@@ -15,11 +15,11 @@ Global - Debug|ARM = Debug|ARM - Debug|ARM64 = Debug|ARM64 - Debug|x64 = Debug|x64 -- Debug|x86 = Debug|x86 -+ Debug|Win32 = Debug|Win32 - Release|ARM = Release|ARM - Release|ARM64 = Release|ARM64 - Release|x64 = Release|x64 -- Release|x86 = Release|x86 -+ Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|ARM.ActiveCfg = Debug|ARM -@@ -28,16 +28,16 @@ Global - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|ARM64.Build.0 = Debug|ARM64 - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x64.ActiveCfg = Debug|x64 - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x64.Build.0 = Debug|x64 -- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x86.ActiveCfg = Debug|Win32 -- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x86.Build.0 = Debug|Win32 -+ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|Win32.ActiveCfg = Debug|Win32 -+ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|Win32.Build.0 = Debug|Win32 - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM.ActiveCfg = Release|ARM - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM.Build.0 = Release|ARM - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM64.ActiveCfg = Release|ARM64 - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM64.Build.0 = Release|ARM64 - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x64.ActiveCfg = Release|x64 - {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x64.Build.0 = Release|x64 -- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x86.ActiveCfg = Release|Win32 -- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x86.Build.0 = Release|Win32 -+ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|Win32.ActiveCfg = Release|Win32 -+ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index df5e7a02b5374b..2698b9b2dcccba 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -1,69 +1,72 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "DirectXTK only supports dynamic CRT linkage") -endif() +vcpkg_fail_port_install(ON_TARGET "OSX" "Linux") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTK - REF jun2019 - SHA512 211b18ee0755802a5d44b58da2485276cabdee222d2f5fd7b42bad0bf75810e3ac1bd319b90891d9cc0345b124631ad37588422af9120cece9fa0ed769033e77 + REF aug2021 + SHA512 ed4ff5c8a1f12e2489a4ddb653a0d8097da4a901498852ada5595959f6e6275531e11ca20d8ce16da19f3ac37193b23edf7c9c1b6d6a78a8810e8f0d399ca4b8 HEAD_REF master ) -IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSE() - SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -ENDIF() - -if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140") - set(VS_VERSION "2015") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141") - set(VS_VERSION "2017") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142") - set(VS_VERSION "2019") -else() - message(FATAL_ERROR "Unsupported platform toolset.") -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + xaudio2-9 BUILD_XAUDIO_WIN10 + xaudio2-8 BUILD_XAUDIO_WIN8 + xaudio2redist BUILD_XAUDIO_WIN7 +) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(SLN_NAME "Windows10_${VS_VERSION}") +if(VCPKG_TARGET_IS_UWP) + set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF) else() - set(SLN_NAME "Desktop_${VS_VERSION}") + set(EXTRA_OPTIONS -DBUILD_TOOLS=ON) endif() -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/DirectXTK_${SLN_NAME}.sln - PLATFORM ${BUILD_ARCH} +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS} ) -file(INSTALL - ${SOURCE_PATH}/Inc/ - DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK -) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64)) + vcpkg_download_distfile( + MAKESPRITEFONT_EXE + URLS "https://github.com/Microsoft/DirectXTK/releases/download/aug2021/MakeSpriteFont.exe" + FILENAME "makespritefont-aug2021.exe" + SHA512 a84786f57f7f26c4ab0cd446136d79c19a74296f5074396854c81ad67aedfccfe76e15025ba9bcfcabb993f0bb7247ca536d55b4574192efb3e7c2069abf70d7 + ) + + vcpkg_download_distfile( + XWBTOOL_EXE + URLS "https://github.com/Microsoft/DirectXTK/releases/download/aug2021/XWBTool.exe" + FILENAME "xwbtool-aug2021.exe" + SHA512 3dd1ebd04db21517f74453727512783141b997d33efc1a47236c9ff343310da17b4add4c4ba6e138ad35095fb77f4207e7458a9e51ee3f4872fc0e0cf62be5b5 + ) + + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtk/") + + file(INSTALL + ${MAKESPRITEFONT_EXE} + ${XWBTOOL_EXE} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxtk/) + + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxtk/makespritefont-aug2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxtk/makespritefont.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool-aug2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool.exe) + +elseif(NOT VCPKG_TARGET_IS_UWP) + + vcpkg_copy_tools( + TOOL_NAMES XWBTool + SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake + ) -file(INSTALL - ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -file(INSTALL - ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(DXTK_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtk) - file(MAKE_DIRECTORY ${DXTK_TOOL_PATH}) - file(INSTALL - ${SOURCE_PATH}/MakeSpriteFont/bin/Release/MakeSpriteFont.exe - DESTINATION ${DXTK_TOOL_PATH}) - file(INSTALL - ${SOURCE_PATH}/XWBTool/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/XWBTool.exe - DESTINATION ${DXTK_TOOL_PATH}) endif() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/directxtk RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/directxtk/vcpkg.json b/ports/directxtk/vcpkg.json new file mode 100644 index 00000000000000..f8b042df669569 --- /dev/null +++ b/ports/directxtk/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "directxtk", + "version-string": "aug2021", + "description": "A collection of helper classes for writing DirectX 11.x code in C++.", + "homepage": "https://github.com/Microsoft/DirectXTK", + "documentation": "https://github.com/microsoft/DirectXTK/wiki", + "license": "MIT", + "supports": "windows", + "dependencies": [ + "directxmath" + ], + "features": { + "xaudio2-8": { + "description": "Build with XAudio 2.8 support for Windows 8.x or later" + }, + "xaudio2-9": { + "description": "Build with XAudio 2.9 support for Windows 10" + }, + "xaudio2redist": { + "description": "Build with XAudio2Redist support for Windows 7 SP1 or later", + "dependencies": [ + { + "name": "xaudio2redist", + "platform": "!uwp & !arm" + } + ] + } + } +} diff --git a/ports/directxtk12/CONTROL b/ports/directxtk12/CONTROL deleted file mode 100644 index 2d7c849c2e5955..00000000000000 --- a/ports/directxtk12/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: directxtk12 -Version: jun2019-1 -Homepage: https://github.com/Microsoft/DirectXTK12 -Description: A collection of helper classes for writing DirectX 12 code in C++. diff --git a/ports/directxtk12/portfile.cmake b/ports/directxtk12/portfile.cmake index 114165fb460fe3..3eabb68b622fd8 100644 --- a/ports/directxtk12/portfile.cmake +++ b/ports/directxtk12/portfile.cmake @@ -1,57 +1,50 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "DirectXTK12 only supports dynamic CRT linkage") -endif() +vcpkg_fail_port_install(ON_TARGET "OSX" "Linux") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTK12 - REF jun2019 - SHA512 f635746ff92cf3b60b96f74f5ada5fb8409d1ac6e2729d24ebf0ebb275e26d373ec0ccdfbb66a3cb967267da86de4d70304d1f3326b738f94f5a8fc0d43a8c97 + REF aug2021 + SHA512 9d0234d7f8d631fa7cb434487bb1fbb4a52760550962f8ebd5a8c09b33cc2b328651b0c0355057e9b172b7445c86b083f33967ee7918a5eeaf19b3e4915dfe00 HEAD_REF master ) -IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSE() - SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -ENDIF() - -if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140") - set(VS_VERSION "2015") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141") - set(VS_VERSION "2017") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142") - set(VS_VERSION "2019") -else() - message(FATAL_ERROR "Unsupported platform toolset.") -endif() - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(SLN_NAME "Windows10_${VS_VERSION}") -else() - set(SLN_NAME "Desktop_${VS_VERSION}_Win10") -endif() - -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/DirectXTK_${SLN_NAME}.sln -) - -file(INSTALL - ${SOURCE_PATH}/Inc/ - DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK12 +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_XAUDIO_WIN10=ON ) -file(INSTALL - ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK12.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64)) + vcpkg_download_distfile( + MAKESPRITEFONT_EXE + URLS "https://github.com/Microsoft/DirectXTK12/releases/download/aug2021/MakeSpriteFont.exe" + FILENAME "makespritefont-aug2021.exe" + SHA512 a84786f57f7f26c4ab0cd446136d79c19a74296f5074396854c81ad67aedfccfe76e15025ba9bcfcabb993f0bb7247ca536d55b4574192efb3e7c2069abf70d7 + ) + + vcpkg_download_distfile( + XWBTOOL_EXE + URLS "https://github.com/Microsoft/DirectXTK12/releases/download/aug2021/XWBTool.exe" + FILENAME "xwbtool-aug2021.exe" + SHA512 3dd1ebd04db21517f74453727512783141b997d33efc1a47236c9ff343310da17b4add4c4ba6e138ad35095fb77f4207e7458a9e51ee3f4872fc0e0cf62be5b5 + ) + + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtk12/") + + file(INSTALL + ${MAKESPRITEFONT_EXE} + ${XWBTOOL_EXE} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxtk12/) + + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxtk12/makespritefont-aug2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxtk12/makespritefont.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxtk12/xwbtool-aug2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxtk12/xwbtool.exe) +endif() -file(INSTALL - ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK12.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/directxtk12 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/directxtk12/vcpkg.json b/ports/directxtk12/vcpkg.json new file mode 100644 index 00000000000000..9a701bea536573 --- /dev/null +++ b/ports/directxtk12/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "directxtk12", + "version-string": "aug2021", + "description": "A collection of helper classes for writing DirectX 12 code in C++.", + "homepage": "https://github.com/Microsoft/DirectXTK12", + "documentation": "https://github.com/microsoft/DirectXTK12/wiki", + "license": "MIT", + "supports": "windows", + "dependencies": [ + "directx-headers", + "directxmath" + ] +} diff --git a/ports/dirent/CONTROL b/ports/dirent/CONTROL deleted file mode 100644 index b8444bc98985a5..00000000000000 --- a/ports/dirent/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: dirent -Version: 1.23.2 -Homepage: https://github.com/tronkko/dirent -Description: Dirent is a C/C++ programming interface that allows programmers to retrieve information about files and directories under Linux/UNIX. This project provides Linux compatible Dirent interface for Microsoft Windows. diff --git a/ports/dirent/portfile.cmake b/ports/dirent/portfile.cmake index 80aab02f05cb88..945f6017af0f1f 100644 --- a/ports/dirent/portfile.cmake +++ b/ports/dirent/portfile.cmake @@ -3,7 +3,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStor return() endif() -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tronkko/dirent @@ -14,3 +13,5 @@ vcpkg_from_github( file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/dirent RENAME copyright) vcpkg_copy_pdbs() + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/ports/dirent/vcpkg.json b/ports/dirent/vcpkg.json new file mode 100644 index 00000000000000..82a21b2ced5ca7 --- /dev/null +++ b/ports/dirent/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "dirent", + "version-string": "1.23.2", + "port-version": 1, + "description": "Dirent is a C/C++ programming interface that allows programmers to retrieve information about files and directories under Linux/UNIX. This project provides Linux compatible Dirent interface for Microsoft Windows.", + "homepage": "https://github.com/tronkko/dirent" +} diff --git a/ports/discord-game-sdk/CMakeLists.txt b/ports/discord-game-sdk/CMakeLists.txt new file mode 100644 index 00000000000000..f5a1d5136b5f87 --- /dev/null +++ b/ports/discord-game-sdk/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.5) + +project(discord_game_sdk_cpp) + +find_library(SDK_LIB + "discord_game_sdk" + PATHS "${SDK_LIB_FOLDER}" + NO_DEFAULT_PATH +) + +file(GLOB SRC_FILES "${PROJECT_SOURCE_DIR}/cpp/*.cpp") +file(GLOB_RECURSE HDR_FILES "${PROJECT_SOURCE_DIR}/*.h") + +add_library(discord_game_sdk_cpp STATIC ${SRC_FILES}) +target_link_libraries(discord_game_sdk_cpp PUBLIC ${SDK_LIB}) +set_property(TARGET discord_game_sdk_cpp PROPERTY CXX_STANDARD 11) + +install(TARGETS discord_game_sdk_cpp ARCHIVE) +install(FILES ${HDR_FILES} DESTINATION "include/discord-game-sdk") \ No newline at end of file diff --git a/ports/discord-game-sdk/copyright b/ports/discord-game-sdk/copyright new file mode 100644 index 00000000000000..78b9e4fbff85fe --- /dev/null +++ b/ports/discord-game-sdk/copyright @@ -0,0 +1 @@ +Your use of the GameSDK is bound by the Discord Developer Terms of Service, whose text is available online at https://discord.com/developers/docs/legal. diff --git a/ports/discord-game-sdk/include-cstdint.patch b/ports/discord-game-sdk/include-cstdint.patch new file mode 100644 index 00000000000000..6e61c4c252d915 --- /dev/null +++ b/ports/discord-game-sdk/include-cstdint.patch @@ -0,0 +1,25 @@ +From 91fab7c4b8f7da3182f07f5392ebe9388f979157 Mon Sep 17 00:00:00 2001 +From: Maki +Date: Wed, 3 Jun 2020 01:40:58 +0100 +Subject: [PATCH] Include cstdint + +--- + cpp/types.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cpp/types.h b/cpp/types.h +index 8c7cc2b..122dc71 100644 +--- a/cpp/types.h ++++ b/cpp/types.h +@@ -3,6 +3,8 @@ + #include "ffi.h" + #include "event.h" + ++#include ++ + namespace discord { + + enum class Result { +-- +2.26.2 + diff --git a/ports/discord-game-sdk/portfile.cmake b/ports/discord-game-sdk/portfile.cmake new file mode 100644 index 00000000000000..ab85a7d72b7aa4 --- /dev/null +++ b/ports/discord-game-sdk/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "android" "uwp") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(MESSAGE "The GameSDK only supports x86 on Windows." ALWAYS) +endif() + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS https://dl-game-sdk.discordapp.net/2.5.6/discord_game_sdk.zip + FILENAME discord_game_sdk.zip + SHA512 4c8f72c7bdf92bc969fb86b96ea0d835e01b9bab1a2cc27ae00bdac1b9733a1303ceadfe138c24a7609b76d61d49999a335dd596cf3f335d894702e2aa23406f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + PATCHES + include-cstdint.patch # allows compiling on newer versions of GCC +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION ${SOURCE_PATH}) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCH_FOLDER "x86") +else(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCH_FOLDER "x86_64") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" RENAME "discord_game_sdk.lib") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" RENAME "discord_game_sdk.lib") +elseif(VCPKG_TARGET_IS_OSX) + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dylib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" RENAME "libdiscord_game_sdk.dylib") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dylib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" RENAME "libdiscord_game_sdk.dylib") +elseif(VCPKG_TARGET_IS_LINUX) + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.so" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" RENAME "libdiscord_game_sdk.so") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.so" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" RENAME "libdiscord_game_sdk.so") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DSDK_LIB_FOLDER=${CURRENT_PACKAGES_DIR}/lib" +) +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/discord-game-sdk/usage b/ports/discord-game-sdk/usage new file mode 100644 index 00000000000000..11faa0c98492de --- /dev/null +++ b/ports/discord-game-sdk/usage @@ -0,0 +1,12 @@ +The package discord-game-sdk does not provides CMake integration: + + find_library(GAME_SDK discord_game_sdk) + target_link_libraries( PRIVATE ${GAME_SDK}) + + find_path(GAME_SDK_INCLUDE discord-game-sdk/discord.h) + target_include_directories( PRIVATE ${GAME_SDK_INCLUDE}) + +The C++ SDK source code is compiled in a static library: + + find_library(CPP_GAME_SDK discord_game_sdk_cpp) + target_link_libraries( PRIVATE ${CPP_GAME_SDK}) diff --git a/ports/discord-game-sdk/vcpkg.json b/ports/discord-game-sdk/vcpkg.json new file mode 100644 index 00000000000000..3a35dc4592c66e --- /dev/null +++ b/ports/discord-game-sdk/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "discord-game-sdk", + "version": "2.5.6", + "port-version": 3, + "description": "The Discord GameSDK is an easy drop-in SDK to help you manage all the hard things that come with making a game.", + "homepage": "https://discord.com/developers/docs/game-sdk/sdk-starter-guide", + "supports": "((x64 & (windows | osx | linux)) | (x86 & windows)) & !uwp & !static" +} diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL deleted file mode 100644 index 094c4eaa39e3a9..00000000000000 --- a/ports/discord-rpc/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: discord-rpc -Version: 3.4.0 -Homepage: https://github.com/discordapp/discord-rpc -Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. -Build-Depends: rapidjson diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake index b4d191bf8bbb78..9553f4de94107e 100644 --- a/ports/discord-rpc/portfile.cmake +++ b/ports/discord-rpc/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO discordapp/discord-rpc diff --git a/ports/discord-rpc/vcpkg.json b/ports/discord-rpc/vcpkg.json new file mode 100644 index 00000000000000..12ab91796302b3 --- /dev/null +++ b/ports/discord-rpc/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "discord-rpc", + "version-string": "3.4.0", + "port-version": 1, + "description": "Rich Presence allows you to leverage the totally overhauled \"Now Playing\" section in a Discord user's profile to help people play your game together.", + "homepage": "https://github.com/discordapp/discord-rpc", + "dependencies": [ + "rapidjson" + ] +} diff --git a/ports/discount/CONTROL b/ports/discount/CONTROL deleted file mode 100644 index 51c8b5e90b32f2..00000000000000 --- a/ports/discount/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: discount -Version: 2.2.6 -Homepage: https://github.com/Orc/discount -Description: DISCOUNT is a implementation of John Gruber & Aaron Swartz's Markdown markup language. diff --git a/ports/discount/portfile.cmake b/ports/discount/portfile.cmake index 6a40d51051a3d4..bac98be811c119 100644 --- a/ports/discount/portfile.cmake +++ b/ports/discount/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - # No dynamic link for MSVC vcpkg_check_linkage(ONLY_STATIC_LIBRARY) diff --git a/ports/discount/vcpkg.json b/ports/discount/vcpkg.json new file mode 100644 index 00000000000000..7fcbc5103fc27c --- /dev/null +++ b/ports/discount/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "discount", + "version-string": "2.2.6", + "port-version": 1, + "description": "DISCOUNT is a implementation of John Gruber & Aaron Swartz's Markdown markup language.", + "homepage": "https://github.com/Orc/discount" +} diff --git a/ports/discreture/portfile.cmake b/ports/discreture/portfile.cmake new file mode 100644 index 00000000000000..51bec5feb3d650 --- /dev/null +++ b/ports/discreture/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mraggi/discreture + REF eeeec31c814e6a9a8506a6bfd6a5b35704350605 + SHA512 de1c7d74d337605fd9b9d1f3ee6637b4afd179d495de243b21168b0a4376b83c0519b4cced985af694850755ab1e3caca5087b3ca0cd6ccb3b73b10bd6b25b49 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/discreture/usage b/ports/discreture/usage new file mode 100644 index 00000000000000..00af38177a664b --- /dev/null +++ b/ports/discreture/usage @@ -0,0 +1,4 @@ +The package discreture is header only and can be used from CMake via: + + find_path(DISCRETURE_INCLUDE_DIRS "discreture.hpp") + target_include_directories(main PRIVATE ${DISCRETURE_INCLUDE_DIRS}) \ No newline at end of file diff --git a/ports/discreture/vcpkg.json b/ports/discreture/vcpkg.json new file mode 100644 index 00000000000000..f5869ba4cf5dd6 --- /dev/null +++ b/ports/discreture/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "discreture", + "version-string": "2020-01-29", + "port-version": 1, + "description": "A modern C++ library for efficiently and easily iterating through common combinatorial objects, such as combinations, permutations, partitions and more.", + "homepage": "https://github.com/mraggi/discreture", + "dependencies": [ + "boost-container", + "boost-iterator" + ] +} diff --git a/ports/distorm/CONTROL b/ports/distorm/CONTROL deleted file mode 100644 index 21dc439237787b..00000000000000 --- a/ports/distorm/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: distorm -Version: 2018-08-26-16e6f435-1 -Description: Powerful Disassembler Library For x86/AMD64 \ No newline at end of file diff --git a/ports/distorm/portfile.cmake b/ports/distorm/portfile.cmake index 9afec4e495f219..0b3cc5046ee1fd 100644 --- a/ports/distorm/portfile.cmake +++ b/ports/distorm/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gdabah/distorm - REF 16e6f43509616234b8478187c00569a65f15287c - SHA512 2ecbacaaf07a07cf725adf25732807476fdaa1d3a44994a90c70ddbd2ec3db4c75c88b28188f8a48a0fb7b4fe79ae4f7b717cf72b3a0154232310ed56677a9a3 + REF v3.4.1 + SHA512 0e9f8b62bc190ef7d516f1902b6003adef9c7d5d4a5f985fb0bdfc5d4838b2805e2b8836b02d5eccdb3401e814417de615dec675aed9e606c93122ca8a0d2083 HEAD_REF master ) diff --git a/ports/distorm/vcpkg.json b/ports/distorm/vcpkg.json new file mode 100644 index 00000000000000..e83775d893ada3 --- /dev/null +++ b/ports/distorm/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "distorm", + "version-string": "3.4.1", + "port-version": 1, + "description": "Powerful Disassembler Library For x86/AMD64" +} diff --git a/ports/dlfcn-win32/CONTROL b/ports/dlfcn-win32/CONTROL deleted file mode 100644 index 453ecf9e4dc660..00000000000000 --- a/ports/dlfcn-win32/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: dlfcn-win32 -Version: 1.1.1-2 -Homepage: https://github.com/dlfcn-win32/dlfcn-win32 -Description: dlfcn-win32 is an implementation of dlfcn for Windows. diff --git a/ports/dlfcn-win32/portfile.cmake b/ports/dlfcn-win32/portfile.cmake index d67fb00fe12a24..1e1fdccb1414ce 100644 --- a/ports/dlfcn-win32/portfile.cmake +++ b/ports/dlfcn-win32/portfile.cmake @@ -1,24 +1,12 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) set(SOURCE_VERSION 1.1.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dlfcn-win32-${SOURCE_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/dlfcn-win32/dlfcn-win32/archive/v${SOURCE_VERSION}.zip" - FILENAME "dlfcn-win32-v${SOURCE_VERSION}.zip" - SHA512 581043784d8c1b1b43c88c0da302f79d70e1d33e95977a355d849b8f8c45194b55fdc28e36a3f3ed192eca8fee6b00cb8bf1d1d1fc08b94d53be6f73bea6e09a + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dlfcn-win32/dlfcn-win32 + REF v${SOURCE_VERSION} + SHA512 557729511546f574487f8c7de437c53bcf5ae11640349c338ead9965a4ac0f937de647839b63c821003be54dca5bcbf28f2899d2348acf7dfef31e487da1cba1 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -36,6 +24,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlfcn-win32) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlfcn-win32/COPYING ${CURRENT_PACKAGES_DIR}/share/dlfcn-win32/copyright) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/ports/dlfcn-win32/vcpkg.json b/ports/dlfcn-win32/vcpkg.json new file mode 100644 index 00000000000000..505674d5b232c0 --- /dev/null +++ b/ports/dlfcn-win32/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "dlfcn-win32", + "version-string": "1.1.1", + "port-version": 5, + "description": "dlfcn-win32 is an implementation of dlfcn for Windows.", + "homepage": "https://github.com/dlfcn-win32/dlfcn-win32" +} diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL deleted file mode 100644 index 2342c57379c662..00000000000000 --- a/ports/dlib/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: dlib -Version: 19.17-1 -Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas (!osx), clapack (!osx) -Homepage: https://github.com/davisking/dlib -Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ - -Feature: cuda -Build-Depends: cuda -Description: CUDA support for dlib diff --git a/ports/dlib/fix-mac-jpeg.patch b/ports/dlib/fix-mac-jpeg.patch deleted file mode 100644 index 5f961264bf648e..00000000000000 --- a/ports/dlib/fix-mac-jpeg.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt ---- a/dlib/CMakeLists.txt -+++ b/dlib/CMakeLists.txt -@@ -480,7 +480,7 @@ - set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARY}) - CHECK_FUNCTION_EXISTS(jpeg_read_header LIBJPEG_IS_GOOD) - endif() -- if (JPEG_FOUND AND LIBJPEG_IS_GOOD AND NOT APPLE) -+ if (JPEG_FOUND AND LIBJPEG_IS_GOOD) - include_directories(${JPEG_INCLUDE_DIR}) - set (dlib_needed_libraries ${dlib_needed_libraries} ${JPEG_LIBRARY}) - else() diff --git a/ports/dlib/fix-sqlite3-fftw-linkage.patch b/ports/dlib/fix-sqlite3-fftw-linkage.patch index 84ab0c26535a5a..41ba700b420872 100644 --- a/ports/dlib/fix-sqlite3-fftw-linkage.patch +++ b/ports/dlib/fix-sqlite3-fftw-linkage.patch @@ -15,8 +15,8 @@ diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt - set(DLIB_LINK_WITH_SQLITE3 OFF CACHE STRING ${DLIB_LINK_WITH_SQLITE3_STR} FORCE ) - endif() - mark_as_advanced(sqlite sqlite_path) -+ find_package(sqlite3 CONFIG) -+ set(dlib_needed_libraries ${dlib_needed_libraries} sqlite3 ) ++ find_package(unofficial-sqlite3 CONFIG) ++ set(dlib_needed_libraries ${dlib_needed_libraries} unofficial::sqlite3::sqlite3) endif() @@ -49,7 +49,7 @@ diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt + find_dependency(FFTW3 CONFIG) +endif() +if("@DLIB_LINK_WITH_SQLITE3@") -+ find_dependency(sqlite3 CONFIG) ++ find_dependency(unofficial-sqlite3 CONFIG) +endif() + set(dlib_LIBRARIES dlib::dlib) diff --git a/ports/dlib/force_finding_packages.patch b/ports/dlib/force_finding_packages.patch index cd8be16073294c..558b75f1fe881d 100644 --- a/ports/dlib/force_finding_packages.patch +++ b/ports/dlib/force_finding_packages.patch @@ -1,147 +1,44 @@ ---- a/dlib/CMakeLists.txt -+++ b/dlib/CMakeLists.txt -@@ -430,70 +430,9 @@ - endif() +diff --git a/dlib/cmake_utils/find_libjpeg.cmake b/dlib/cmake_utils/find_libjpeg.cmake +index 3b9e656..d741f31 100644 +--- a/dlib/cmake_utils/find_libjpeg.cmake ++++ b/dlib/cmake_utils/find_libjpeg.cmake +@@ -14,7 +14,7 @@ if (DEFINED JPEG_FOUND) + return() + endif() - if (DLIB_PNG_SUPPORT) -- # try to find libpng -- find_package(PNG QUIET) -- # Make sure there isn't something wrong with the version of LIBPNG -- # installed on this system. Also never link to anything from anaconda -- # since it's probably broken. -- if (PNG_FOUND AND NOT ("${PNG_INCLUDE_DIR}" MATCHES "(.*)(Ana|ana|mini)conda(.*)") AND NOT BUILDING_PYTHON_IN_MSVC) -- set(CMAKE_REQUIRED_LIBRARIES ${PNG_LIBRARIES}) -- CHECK_FUNCTION_EXISTS(png_create_read_struct LIBPNG_IS_GOOD) -- endif() -- if (PNG_FOUND AND LIBPNG_IS_GOOD) -- include_directories(${PNG_INCLUDE_DIR}) -- set (dlib_needed_libraries ${dlib_needed_libraries} ${PNG_LIBRARIES}) -- set(REQUIRES_LIBS " libpng") -- else() -- # If we can't find libpng then statically compile it in. -- include_directories(external/libpng external/zlib) -- set(source_files ${source_files} -- external/libpng/arm/arm_init.c -- external/libpng/arm/filter_neon_intrinsics.c -- external/libpng/png.c -- external/libpng/pngerror.c -- external/libpng/pngget.c -- external/libpng/pngmem.c -- external/libpng/pngpread.c -- external/libpng/pngread.c -- external/libpng/pngrio.c -- external/libpng/pngrtran.c -- external/libpng/pngrutil.c -- external/libpng/pngset.c -- external/libpng/pngtrans.c -- external/libpng/pngwio.c -- external/libpng/pngwrite.c -- external/libpng/pngwtran.c -- external/libpng/pngwutil.c -- external/zlib/adler32.c -- external/zlib/compress.c -- external/zlib/crc32.c -- external/zlib/deflate.c -- external/zlib/gzclose.c -- external/zlib/gzlib.c -- external/zlib/gzread.c -- external/zlib/gzwrite.c -- external/zlib/infback.c -- external/zlib/inffast.c -- external/zlib/inflate.c -- external/zlib/inftrees.c -- external/zlib/trees.c -- external/zlib/uncompr.c -- external/zlib/zutil.c -- ) -- -- include(cmake_utils/check_if_neon_available.cmake) -- if (ARM_NEON_IS_AVAILABLE) -- message (STATUS "NEON instructions will be used for libpng.") -- enable_language(ASM) -- set(source_files ${source_files} -- external/libpng/arm/arm_init.c -- external/libpng/arm/filter_neon_intrinsics.c -- external/libpng/arm/filter_neon.S -- ) -- set_source_files_properties(external/libpng/arm/filter_neon.S PROPERTIES COMPILE_FLAGS "${CMAKE_ASM_FLAGS} ${CMAKE_CXX_FLAGS} -x assembler-with-cpp") -- endif() -- set(REQUIRES_LIBS "") -- endif() -+ find_package(PNG REQUIRED) -+ include_directories(${PNG_INCLUDE_DIR}) -+ set (dlib_needed_libraries ${dlib_needed_libraries} ${PNG_LIBRARIES}) - set(source_files ${source_files} - image_loader/png_loader.cpp - image_saver/save_png.cpp -@@ -501,68 +440,8 @@ - endif() +-find_package(JPEG QUIET) ++find_package(JPEG REQUIRED) + + if(JPEG_FOUND) + set(JPEG_TEST_CMAKE_FLAGS +@@ -31,7 +31,7 @@ if(JPEG_FOUND) + message (STATUS "Found system copy of libjpeg: ${JPEG_LIBRARY}") + if(NOT test_for_libjpeg_worked) + set(JPEG_FOUND 0) +- message (STATUS "System copy of libjpeg is broken or too old. Will build our own libjpeg and use that instead.") ++ message (FATAL_ERROR "System copy of libjpeg is broken or too old. Will build our own libjpeg and use that instead.") + endif() + endif() + +diff --git a/dlib/cmake_utils/find_libpng.cmake b/dlib/cmake_utils/find_libpng.cmake +index 1b35604..489a4c8 100644 +--- a/dlib/cmake_utils/find_libpng.cmake ++++ b/dlib/cmake_utils/find_libpng.cmake +@@ -14,7 +14,7 @@ if (DEFINED PNG_FOUND) + return() + endif() + +-find_package(PNG QUIET) ++find_package(PNG REQUIRED) + + if(PNG_FOUND) + set(PNG_TEST_CMAKE_FLAGS +@@ -31,7 +31,7 @@ if(PNG_FOUND) + message (STATUS "Found system copy of libpng: ${PNG_LIBRARIES}") + if(NOT test_for_libpng_worked) + set(PNG_FOUND 0) +- message (STATUS "System copy of libpng is broken. Will build our own libpng and use that instead.") ++ message (FATAL_ERROR "System copy of libpng is broken. Will build our own libpng and use that instead.") + endif() + endif() - if (DLIB_JPEG_SUPPORT) -- # try to find libjpeg -- find_package(JPEG QUIET) -- # Make sure there isn't something wrong with the version of libjpeg -- # installed on this system. Also don't use the installed libjpeg -- # if this is an APPLE system because apparently it's broken (as of 2015/01/01). -- if (JPEG_FOUND AND NOT ("${JPEG_INCLUDE_DIR}" MATCHES "(.*)(Ana|ana|mini)conda(.*)") AND NOT BUILDING_PYTHON_IN_MSVC) -- set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARY}) -- CHECK_FUNCTION_EXISTS(jpeg_read_header LIBJPEG_IS_GOOD) -- endif() -- if (JPEG_FOUND AND LIBJPEG_IS_GOOD) -- include_directories(${JPEG_INCLUDE_DIR}) -- set (dlib_needed_libraries ${dlib_needed_libraries} ${JPEG_LIBRARY}) -- else() -- # If we can't find libjpeg then statically compile it in. -- add_definitions(-DDLIB_JPEG_STATIC) -- set(source_files ${source_files} -- external/libjpeg/jcomapi.cpp -- external/libjpeg/jdapimin.cpp -- external/libjpeg/jdapistd.cpp -- external/libjpeg/jdatasrc.cpp -- external/libjpeg/jdcoefct.cpp -- external/libjpeg/jdcolor.cpp -- external/libjpeg/jddctmgr.cpp -- external/libjpeg/jdhuff.cpp -- external/libjpeg/jdinput.cpp -- external/libjpeg/jdmainct.cpp -- external/libjpeg/jdmarker.cpp -- external/libjpeg/jdmaster.cpp -- external/libjpeg/jdmerge.cpp -- external/libjpeg/jdphuff.cpp -- external/libjpeg/jdpostct.cpp -- external/libjpeg/jdsample.cpp -- external/libjpeg/jerror.cpp -- external/libjpeg/jidctflt.cpp -- external/libjpeg/jidctfst.cpp -- external/libjpeg/jidctint.cpp -- external/libjpeg/jidctred.cpp -- external/libjpeg/jmemmgr.cpp -- external/libjpeg/jmemnobs.cpp -- external/libjpeg/jquant1.cpp -- external/libjpeg/jquant2.cpp -- external/libjpeg/jutils.cpp -- external/libjpeg/jcapimin.cpp -- external/libjpeg/jdatadst.cpp -- external/libjpeg/jcparam.cpp -- external/libjpeg/jcapistd.cpp -- external/libjpeg/jcmarker.cpp -- external/libjpeg/jcinit.cpp -- external/libjpeg/jcmaster.cpp -- external/libjpeg/jcdctmgr.cpp -- external/libjpeg/jccoefct.cpp -- external/libjpeg/jccolor.cpp -- external/libjpeg/jchuff.cpp -- external/libjpeg/jcmainct.cpp -- external/libjpeg/jcphuff.cpp -- external/libjpeg/jcprepct.cpp -- external/libjpeg/jcsample.cpp -- external/libjpeg/jfdctint.cpp -- external/libjpeg/jfdctflt.cpp -- external/libjpeg/jfdctfst.cpp -- ) -- endif() -+ find_package(JPEG REQUIRED) -+ include_directories(${JPEG_INCLUDE_DIR}) - set(source_files ${source_files} - image_loader/jpeg_loader.cpp - image_saver/save_jpeg.cpp diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 114c9b9346f6bf..481554b90e49e9 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -1,15 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO davisking/dlib - REF v19.17 - SHA512 8574f48d0cc55685d494b3933079c16526fc7cfa3df85a76d51a1f13bebeccf3b6d7247981b53bd1c9e6e664e42245e518cefadf3420be1ab25b5dd6b8d55441 + REF v19.21 + SHA512 57133cdcbc5017d324a368ff36a628de55001f1ec0b3ac078b4ad49a63c8c9fb48674617c6a5838ca4e381a6b001fe4aa5a7b3353eb288c58062d2a8fc7b171e HEAD_REF master PATCHES - fix-mac-jpeg.patch fix-sqlite3-fftw-linkage.patch force_finding_packages.patch find_blas.patch @@ -24,22 +21,22 @@ file(READ "${SOURCE_PATH}/dlib/CMakeLists.txt" DLIB_CMAKE) string(REPLACE "PNG_LIBRARY" "PNG_LIBRARIES" DLIB_CMAKE "${DLIB_CMAKE}") file(WRITE "${SOURCE_PATH}/dlib/CMakeLists.txt" "${DLIB_CMAKE}") -set(WITH_CUDA OFF) -if("cuda" IN_LIST FEATURES) - set(WITH_CUDA ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "sqlite3" DLIB_LINK_WITH_SQLITE3 + "fftw3" DLIB_USE_FFTW + "cuda" DLIB_USE_CUDA +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DDLIB_LINK_WITH_SQLITE3=ON - -DDLIB_USE_FFTW=ON + ${FEATURE_OPTIONS} -DDLIB_PNG_SUPPORT=ON -DDLIB_JPEG_SUPPORT=ON -DDLIB_USE_BLAS=ON -DDLIB_USE_LAPACK=ON - -DDLIB_USE_CUDA=${WITH_CUDA} -DDLIB_GIF_SUPPORT=OFF -DDLIB_USE_MKL_FFT=OFF -DCMAKE_DEBUG_POSTFIX=d @@ -67,6 +64,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cu file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cpp11) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_avx) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_sse4) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_libjpeg) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_libpng) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm) # Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead. @@ -76,6 +75,5 @@ string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLI file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h "${_contents}") # Handle copyright -file(COPY ${SOURCE_PATH}/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/dlib/copyright) +file(INSTALL ${SOURCE_PATH}/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) diff --git a/ports/dlib/vcpkg.json b/ports/dlib/vcpkg.json new file mode 100644 index 00000000000000..bb60944f8d3111 --- /dev/null +++ b/ports/dlib/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "dlib", + "version": "19.21", + "port-version": 5, + "description": "Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++", + "homepage": "https://github.com/davisking/dlib", + "dependencies": [ + "blas", + "lapack", + "libjpeg-turbo", + "libpng" + ], + "default-features": [ + "fftw3", + "sqlite3" + ], + "features": { + "cuda": { + "description": "CUDA support for dlib", + "dependencies": [ + "cuda", + "cudnn" + ] + }, + "fftw3": { + "description": "fftw3 support for dlib", + "dependencies": [ + "fftw3" + ] + }, + "sqlite3": { + "description": "sqlite3 support for dlib", + "dependencies": [ + "sqlite3" + ] + } + } +} diff --git a/ports/dmlc/portfile.cmake b/ports/dmlc/portfile.cmake new file mode 100644 index 00000000000000..3e4c7baeb39e13 --- /dev/null +++ b/ports/dmlc/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dmlc/dmlc-core + REF d3fd7c5e9b9c280d3081ada3fb62705547c00bf1 + SHA512 6887d52ddd00949866c27bea3c860abb8a7ecf61feeac79d67d260635e9c3e490b6f0538cbc0ccc1f03e90ab4094bfc0fcb938adb3fb5afe9fea813d47cc7430 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openmp ENABLE_OPENMP +) + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(DMLC_FORCE_SHARED_CRT ON) +else() + set(DMLC_FORCE_SHARED_CRT OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DDMLC_FORCE_SHARED_CRT=${DMLC_FORCE_SHARED_CRT} + -DUSE_OPENMP=${ENABLE_OPENMP} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/dmlc) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/dmlc/vcpkg.json b/ports/dmlc/vcpkg.json new file mode 100644 index 00000000000000..36a4e03953a68a --- /dev/null +++ b/ports/dmlc/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "dmlc", + "version-date": "2019-08-12", + "port-version": 6, + "description": "DMLC-Core is the backbone library to support all DMLC projects, offers the bricks to build efficient and scalable distributed machine learning libraries.", + "homepage": "https://github.com/dmlc/dmlc-core", + "supports": "!uwp", + "features": { + "openmp": { + "description": "Build with openmp" + } + } +} diff --git a/ports/docopt/CONTROL b/ports/docopt/CONTROL deleted file mode 100644 index b6599438c24345..00000000000000 --- a/ports/docopt/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: docopt -Version: 2018-11-01 -Description: Command line arguments parser that will make you smile (C++11 port). diff --git a/ports/docopt/portfile.cmake b/ports/docopt/portfile.cmake index ec3a764d6251a1..03c6fd63735c4c 100644 --- a/ports/docopt/portfile.cmake +++ b/ports/docopt/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO docopt/docopt.cpp diff --git a/ports/docopt/vcpkg.json b/ports/docopt/vcpkg.json new file mode 100644 index 00000000000000..8e17436c418154 --- /dev/null +++ b/ports/docopt/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "docopt", + "version-string": "2018-11-01", + "port-version": 1, + "description": "Command line arguments parser that will make you smile (C++11 port)." +} diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL deleted file mode 100644 index 135b8a4d8b722e..00000000000000 --- a/ports/doctest/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: doctest -Version: 2.3.3 -Homepage: https://github.com/onqtam/doctest -Description: The fastest feature-rich C++ single-header testing framework for unit tests and TDD diff --git a/ports/doctest/portfile.cmake b/ports/doctest/portfile.cmake index 7c9c4bfed80fed..356b63909187bb 100644 --- a/ports/doctest/portfile.cmake +++ b/ports/doctest/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO onqtam/doctest - REF 2.3.3 - SHA512 9ef94de93906f3c43918f232b3baa64756fdaee883afc5b2e785e76b108f1aa0d526a49dac58ffb0475ebfd8d8394ef266aec499c29282eea9a2752fb60b663f + REF f0ab4e793fa863d4a5929ff263ddd3bebec8767e #version 2.4.5 + SHA512 7107787bc10e842b796b0d4dbe6d364ec6ca84813f00f48a07c4c91eb2fc71bd01779715296955dac2219b681f33721f3be46cb884997b4d84bf366122a620d6 HEAD_REF master ) @@ -20,7 +18,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/doctest) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) -configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/doctest/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) \ No newline at end of file diff --git a/ports/doctest/vcpkg.json b/ports/doctest/vcpkg.json new file mode 100644 index 00000000000000..4a4cdaad24d3aa --- /dev/null +++ b/ports/doctest/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "doctest", + "version-string": "2.4.5", + "port-version": 1, + "description": "The fastest feature-rich C++ single-header testing framework for unit tests and TDD", + "homepage": "https://github.com/onqtam/doctest" +} diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL deleted file mode 100644 index c6860524d67c5d..00000000000000 --- a/ports/double-conversion/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: double-conversion -Version: 3.1.4 -Homepage: https://github.com/google/double-conversion -Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index d7fd15f219a5f0..5ede45da1add0f 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/double-conversion - REF v3.1.4 - SHA512 715a34ace2ff74b79d80a8c003c16cfbf958ebc92264e28cc572e1a12a786e1df9678abb46f032c2be387495e1a3d02957b12fa4a245ec6cfe19ca637519ac3c + REF v3.1.5 + SHA512 0aeabdbfa06c3c4802905ac4bf8c2180840577677b47d45e1c91034fe07746428c9db79260ce6bdbdf8b584746066cea9247ba43a9c38155caf1ef44e214180a HEAD_REF master ) diff --git a/ports/double-conversion/vcpkg.json b/ports/double-conversion/vcpkg.json new file mode 100644 index 00000000000000..541bf7701b881c --- /dev/null +++ b/ports/double-conversion/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "double-conversion", + "version-string": "3.1.5", + "port-version": 1, + "description": "Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles.", + "homepage": "https://github.com/google/double-conversion" +} diff --git a/ports/dpdk/CONTROL b/ports/dpdk/CONTROL deleted file mode 100644 index 056800d295c3fc..00000000000000 --- a/ports/dpdk/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: dpdk -Version: 19.02 -Description: A set of libraries and drivers for fast packet processing - diff --git a/ports/dpdk/portfile.cmake b/ports/dpdk/portfile.cmake index 603ecd327c7794..9ac5fa161f3c58 100644 --- a/ports/dpdk/portfile.cmake +++ b/ports/dpdk/portfile.cmake @@ -1,5 +1,3 @@ -INCLUDE(vcpkg_common_functions) - IF (NOT VCPKG_CMAKE_SYSTEM_NAME OR NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") MESSAGE(FATAL_ERROR "Intel dpdk currently only supports Linux/BSD platforms") ENDIF () @@ -43,5 +41,3 @@ FILE(INSTALL ${REAL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/dpdkConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${SOURCE_PATH}/license/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/ports/dpdk/vcpkg.json b/ports/dpdk/vcpkg.json new file mode 100644 index 00000000000000..111defe838e75b --- /dev/null +++ b/ports/dpdk/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "dpdk", + "version-string": "19.02", + "port-version": 1, + "description": "A set of libraries and drivers for fast packet processing", + "supports": "linux" +} diff --git a/ports/draco/CONTROL b/ports/draco/CONTROL deleted file mode 100644 index ace5fc65097478..00000000000000 --- a/ports/draco/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: draco -Version: 1.3.5 -Homepage: https://github.com/google/draco -Description: A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. -Build-Depends: diff --git a/ports/draco/fix-build-error-in-gcc11.patch b/ports/draco/fix-build-error-in-gcc11.patch new file mode 100644 index 00000000000000..94f24ff6dcf68b --- /dev/null +++ b/ports/draco/fix-build-error-in-gcc11.patch @@ -0,0 +1,28 @@ +diff --git a/src/draco/core/hash_utils.h b/src/draco/core/hash_utils.h +index dd910d0..aa61523 100644 +--- a/src/draco/core/hash_utils.h ++++ b/src/draco/core/hash_utils.h +@@ -17,10 +17,9 @@ + + #include + ++#include + #include + +-// TODO(fgalligan): Move this to core. +- + namespace draco { + + template +diff --git a/src/draco/io/parser_utils.cc b/src/draco/io/parser_utils.cc +index 3c302b9..adca2ac 100644 +--- a/src/draco/io/parser_utils.cc ++++ b/src/draco/io/parser_utils.cc +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + namespace draco { + namespace parser { diff --git a/ports/draco/fix-compile-error-uwp.patch b/ports/draco/fix-compile-error-uwp.patch index df0b1df22cf0d9..b098fd715542d2 100644 --- a/ports/draco/fix-compile-error-uwp.patch +++ b/ports/draco/fix-compile-error-uwp.patch @@ -1,11 +1,11 @@ diff --git a/src/draco/io/parser_utils.cc b/src/draco/io/parser_utils.cc -index 0a22ba1..9862949 100644 +index 6e42a58..3c302b9 100644 --- a/src/draco/io/parser_utils.cc +++ b/src/draco/io/parser_utils.cc -@@ -150,7 +150,9 @@ bool ParseSignedInt(DecoderBuffer *buffer, int32_t *value) { - uint32_t v; - if (!ParseUnsignedInt(buffer, &v)) +@@ -160,7 +160,9 @@ bool ParseSignedInt(DecoderBuffer *buffer, int32_t *value) { + if (!ParseUnsignedInt(buffer, &v)) { return false; + } - *value = (sign < 0) ? -v : v; + if (sign < 0) + v *= -1; @@ -13,3 +13,18 @@ index 0a22ba1..9862949 100644 return true; } +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7e79da7..c4d9880 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -153,6 +153,10 @@ if(ENABLE_EXTRA_SPEED) + endif() + endif() + ++if (MSVC) ++ add_compile_options(/wd4996) ++endif() ++ + # Generate a version file containing repository info. + include(FindGit) + find_package(Git) diff --git a/ports/draco/fix-uwperror.patch b/ports/draco/fix-uwperror.patch index ff643103e57718..54e2cc9ab32697 100644 --- a/ports/draco/fix-uwperror.patch +++ b/ports/draco/fix-uwperror.patch @@ -1,8 +1,8 @@ diff --git a/src/draco/core/bit_utils.h b/src/draco/core/bit_utils.h -index f63cd07..0f6baaf 100644 +index a102095..b6ba69b 100644 --- a/src/draco/core/bit_utils.h +++ b/src/draco/core/bit_utils.h -@@ -26,6 +26,8 @@ +@@ -27,6 +27,8 @@ #include #endif // defined(_MSC_VER) diff --git a/ports/draco/portfile.cmake b/ports/draco/portfile.cmake index 22d332f98ae25f..2d2f7eee1a5022 100644 --- a/ports/draco/portfile.cmake +++ b/ports/draco/portfile.cmake @@ -1,16 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/draco - REF 1.3.5 - SHA512 f99fcbec60fbd1683d8aacc35ff8ad9ee1c84374132ad4cc8c0f56662f5d33f940f89028cf3e577cde3314fd0766c124f61798121e4127e888f302e9efe1a004 + REF 83b0922745981a35be16e2907bdbb749ebf2bf43 # 1.3.6 + SHA512 29b270d749c5c0efcf791aaae7e33e2ae4404103ad8849d73aaca71492a3780d2fcaec01ec225da886bce2ab20ec14b8cf2d9e0976810cdaee557f97b3b0d9b8 HEAD_REF master PATCHES fix-compile-error-uwp.patch - fix-uwperror.patch + fix-uwperror.patch + fix-build-error-in-gcc11.patch # Remove this patch in next release ) vcpkg_configure_cmake( @@ -40,5 +39,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_copy_pdbs() # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/draco) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/draco/LICENSE ${CURRENT_PACKAGES_DIR}/share/draco/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/draco/vcpkg.json b/ports/draco/vcpkg.json new file mode 100644 index 00000000000000..68a63f721269ab --- /dev/null +++ b/ports/draco/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "draco", + "version": "1.3.6", + "port-version": 2, + "description": " A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.", + "homepage": "https://github.com/google/draco" +} diff --git a/ports/drlibs/CONTROL b/ports/drlibs/CONTROL deleted file mode 100644 index 284f99c3503205..00000000000000 --- a/ports/drlibs/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: drlibs -Version: 2019-08-12 -Homepage: https://github.com/mackron/dr_libs -Description: A collection of public domain single-file libraries for C/C++. diff --git a/ports/drlibs/portfile.cmake b/ports/drlibs/portfile.cmake index 3c50aff940ac45..79347587e3911c 100644 --- a/ports/drlibs/portfile.cmake +++ b/ports/drlibs/portfile.cmake @@ -1,5 +1,4 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mackron/dr_libs diff --git a/ports/drlibs/vcpkg.json b/ports/drlibs/vcpkg.json new file mode 100644 index 00000000000000..717933aa06d5a2 --- /dev/null +++ b/ports/drlibs/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "drlibs", + "version-string": "2019-08-12", + "port-version": 1, + "description": "A collection of public domain single-file libraries for C/C++.", + "homepage": "https://github.com/mackron/dr_libs" +} diff --git a/ports/drogon/drogon_config.patch b/ports/drogon/drogon_config.patch new file mode 100644 index 00000000000000..61b7c964a49a61 --- /dev/null +++ b/ports/drogon/drogon_config.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/templates/DrogonConfig.cmake.in b/cmake/templates/DrogonConfig.cmake.in +index a21122a..6367259 100644 +--- a/cmake/templates/DrogonConfig.cmake.in ++++ b/cmake/templates/DrogonConfig.cmake.in +@@ -19,7 +19,7 @@ find_dependency(UUID REQUIRED) + endif(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND NOT WIN32) + find_dependency(ZLIB REQUIRED) + if(@pg_FOUND@) +-find_dependency(pg) ++find_dependency(PostgreSQL) + endif() + if(@SQLite3_FOUND@) + find_dependency(SQLite3) diff --git a/ports/drogon/portfile.cmake b/ports/drogon/portfile.cmake new file mode 100644 index 00000000000000..897b79985d897a --- /dev/null +++ b/ports/drogon/portfile.cmake @@ -0,0 +1,60 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO an-tao/drogon + REF v1.7.1 + SHA512 8a7cb8aa87cc48b130a5b47558b3c9e2a0af13cd8b76681e42d14a366dac75c88e389f2e2fe03b4f0f1e0e31971a47eee2bf5df8fcb4b79f8ed00d2a592315b6 + HEAD_REF master + PATCHES + vcpkg.patch + resolv.patch + drogon_config.patch + static-brotli.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + ctl BUILD_CTL + mysql BUILD_MYSQL + orm BUILD_ORM + postgres BUILD_POSTGRESQL + postgres LIBPQ_BATCH_MODE + redis BUILD_REDIS + sqlite3 BUILD_SQLITE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_EXAMPLES=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +# Fix CMake files +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Drogon) + +vcpkg_fixup_pkgconfig() + +# Copy drogon_ctl +if("ctl" IN_LIST FEATURES) + message("copying tools") + vcpkg_copy_tools(TOOL_NAMES drogon_ctl + AUTO_CLEAN) +endif() + +# # 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/ports/drogon/resolv.patch b/ports/drogon/resolv.patch new file mode 100644 index 00000000000000..55bf6e50c25575 --- /dev/null +++ b/ports/drogon/resolv.patch @@ -0,0 +1,13 @@ +diff --git a/drogon_ctl/CMakeLists.txt b/drogon_ctl/CMakeLists.txt +--- a/drogon_ctl/CMakeLists.txt ++++ b/drogon_ctl/CMakeLists.txt +@@ -39,6 +39,9 @@ + if(WIN32) + target_link_libraries(drogon_ctl PRIVATE ws2_32 Rpcrt4) + endif(WIN32) ++if(APPLE) ++ target_link_libraries(drogon_ctl PRIVATE resolv) ++endif() + message(STATUS "bin:" ${INSTALL_BIN_DIR}) + install(TARGETS drogon_ctl RUNTIME DESTINATION ${INSTALL_BIN_DIR}) + if(WIN32) diff --git a/ports/drogon/static-brotli.patch b/ports/drogon/static-brotli.patch new file mode 100644 index 00000000000000..a44a40cc59ebd9 --- /dev/null +++ b/ports/drogon/static-brotli.patch @@ -0,0 +1,17 @@ +diff --git a/cmake_modules/FindBrotli.cmake b/cmake_modules/FindBrotli.cmake +index da5b6d2..6b631ab 100755 +--- a/cmake_modules/FindBrotli.cmake ++++ b/cmake_modules/FindBrotli.cmake +@@ -23,9 +23,9 @@ include(FindPackageHandleStandardArgs) + + find_path(BROTLI_INCLUDE_DIR "brotli/decode.h") + +-find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon) +-find_library(BROTLIDEC_LIBRARY NAMES brotlidec) +-find_library(BROTLIENC_LIBRARY NAMES brotlienc) ++find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon brotlicommon-static) ++find_library(BROTLIDEC_LIBRARY NAMES brotlidec brotlidec-static) ++find_library(BROTLIENC_LIBRARY NAMES brotlienc brotlienc-static) + + find_package_handle_standard_args(Brotli + REQUIRED_VARS diff --git a/ports/drogon/vcpkg.json b/ports/drogon/vcpkg.json new file mode 100644 index 00000000000000..55544ebccda7ff --- /dev/null +++ b/ports/drogon/vcpkg.json @@ -0,0 +1,84 @@ +{ + "name": "drogon", + "version-semver": "1.7.1", + "port-version": 2, + "description": "A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows", + "homepage": "https://github.com/an-tao/drogon", + "documentation": "https://drogon.docsforge.com/master/overview/", + "license": "MIT", + "dependencies": [ + "brotli", + "jsoncpp", + { + "name": "libuuid", + "platform": "!windows" + }, + "trantor", + "zlib" + ], + "features": { + "ctl": { + "description": "Build drogon_ctl tool." + }, + "mysql": { + "description": "Support reading and writing from/to MySQL databases.", + "dependencies": [ + { + "name": "drogon", + "features": [ + "orm" + ] + }, + { + "name": "libmariadb", + "features": [ + "iconv" + ], + "platform": "osx" + }, + { + "name": "libmariadb", + "platform": "!osx" + } + ] + }, + "orm": { + "description": "Build with Object-relational mapping support." + }, + "postgres": { + "description": "Support reading and writing from/to Postgres databases.", + "dependencies": [ + { + "name": "drogon", + "features": [ + "orm" + ] + }, + "libpq" + ] + }, + "redis": { + "description": "Support reading and writing from/to Redis databases.", + "dependencies": [ + { + "name": "drogon", + "features": [ + "orm" + ] + } + ] + }, + "sqlite3": { + "description": "Support reading and writing from/to Sqlite databases.", + "dependencies": [ + { + "name": "drogon", + "features": [ + "orm" + ] + }, + "sqlite3" + ] + } + } +} diff --git a/ports/drogon/vcpkg.patch b/ports/drogon/vcpkg.patch new file mode 100644 index 00000000000000..8aedabdec1c7fc --- /dev/null +++ b/ports/drogon/vcpkg.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7465e46..9650a59 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -99,9 +99,9 @@ if (WIN32) + PRIVATE $) + endif (WIN32) + +-add_subdirectory(trantor) ++find_package(Trantor CONFIG REQUIRED) + +-target_link_libraries(${PROJECT_NAME} PUBLIC trantor) ++target_link_libraries(${PROJECT_NAME} PUBLIC Trantor::Trantor) + + if (NOT WIN32) + if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") +@@ -205,11 +205,10 @@ endif (NOT WIN32) + + if (BUILD_POSTGRESQL) + # find postgres +- find_package(pg) +- if (pg_FOUND) +- message(STATUS "libpq inc path:" ${PG_INCLUDE_DIRS}) +- message(STATUS "libpq lib:" ${PG_LIBRARIES}) +- target_link_libraries(${PROJECT_NAME} PRIVATE pg_lib) ++ find_package(PostgreSQL REQUIRED) ++ if(PostgreSQL_FOUND) ++ set(pg_FOUND true) ++ target_link_libraries(${PROJECT_NAME} PRIVATE PostgreSQL::PostgreSQL) + set(DROGON_SOURCES ${DROGON_SOURCES} + orm_lib/src/postgresql_impl/PostgreSQLResultImpl.cc) + if (LIBPQ_BATCH_MODE) +@@ -228,7 +227,7 @@ if (BUILD_POSTGRESQL) + set(DROGON_SOURCES ${DROGON_SOURCES} + orm_lib/src/postgresql_impl/PgConnection.cc) + endif (libpq_supports_batch) +- endif (pg_FOUND) ++ endif (PostgreSQL_FOUND) + endif (BUILD_POSTGRESQL) + + if (BUILD_MYSQL) diff --git a/ports/dtl/CONTROL b/ports/dtl/CONTROL deleted file mode 100644 index cd4109d0460a91..00000000000000 --- a/ports/dtl/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: dtl -Version: 1.19 -Description: Diff template library diff --git a/ports/dtl/portfile.cmake b/ports/dtl/portfile.cmake index d6636099103992..d36e30760eda63 100644 --- a/ports/dtl/portfile.cmake +++ b/ports/dtl/portfile.cmake @@ -1,5 +1,4 @@ #header-only library -include(vcpkg_common_functions) include(CMakePackageConfigHelpers) vcpkg_from_github( diff --git a/ports/dtl/vcpkg.json b/ports/dtl/vcpkg.json new file mode 100644 index 00000000000000..d4a6964742dfb3 --- /dev/null +++ b/ports/dtl/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "dtl", + "version-string": "1.19", + "port-version": 1, + "description": "Diff template library" +} diff --git a/ports/duckx/CONTROL b/ports/duckx/CONTROL deleted file mode 100644 index 59dda99b72eb4e..00000000000000 --- a/ports/duckx/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: duckx -Version: 2019-08-06 -Homepage: https://github.com/amiremohamadi/DuckX -Description: DuckX is a library for creation of Office docx files. diff --git a/ports/duckx/portfile.cmake b/ports/duckx/portfile.cmake index 66bcdff25088a1..be1170ea35a434 100644 --- a/ports/duckx/portfile.cmake +++ b/ports/duckx/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO amiremohamadi/DuckX - REF 98c946ad13559c03e9c7f2b050b9f70d5caf509e - SHA512 20e8970a1faff6e2ff5bc106bd038396d05ace3517ac83583712263870c4b007ebc407b5d69c482f7117ac155aa85f9928d5ee524f75897e8e12eb3659d16c15 + REF v1.0.0 + SHA512 21db28f5c62a5695363cb844ce0ca45057433dd622dad44278459dd0582c92a8ca98d8bf597955426636ad31776abdcfdbe51a7fbfe256cfa8adcb8a2fd9410d ) vcpkg_configure_cmake( diff --git a/ports/duckx/vcpkg.json b/ports/duckx/vcpkg.json new file mode 100644 index 00000000000000..f38749088ba67a --- /dev/null +++ b/ports/duckx/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "duckx", + "version-string": "1.0.0", + "port-version": 1, + "description": "DuckX is a library for creation of Office docx files.", + "homepage": "https://github.com/amiremohamadi/DuckX" +} diff --git a/ports/duilib/CONTROL b/ports/duilib/CONTROL deleted file mode 100644 index cb4c7ed3fadcfb..00000000000000 --- a/ports/duilib/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: duilib -Version: 2019-4-28-2 -Description: Duilib is a free open source DirectUI interface library under Windows. It is widely accepted by major Internet companies due to its simple and easy to expand design and stable and efficient implementation. It is widely used in IM, video client, stock market software, navigation software, and mobile phone assistive software. Duilib is still evolving, and will continue to improve in many aspects such as documentation, examples, animations, and rendering engines. diff --git a/ports/duilib/enable-unicode-for-vcpkg.patch b/ports/duilib/enable-unicode-for-vcpkg.patch new file mode 100644 index 00000000000000..1d0aa02da604d3 --- /dev/null +++ b/ports/duilib/enable-unicode-for-vcpkg.patch @@ -0,0 +1,15 @@ +diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt +index 835d430..b178984 100644 +--- a/DuiLib/CMakeLists.txt ++++ b/DuiLib/CMakeLists.txt +@@ -2,6 +2,9 @@ + #Author Qi Gao(monkgau@gmail.com) + #Created: 2012/09/16 + ++#if use vcpkg to build, need to add extra unicode definitions ++add_definitions(-DUNICODE -D_UNICODE) ++ + aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} Root_src) + aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Control Control_src) + aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Core Core_src) + diff --git a/ports/duilib/portfile.cmake b/ports/duilib/portfile.cmake index 5556d22cdb8e54..272691914c7bc0 100644 --- a/ports/duilib/portfile.cmake +++ b/ports/duilib/portfile.cmake @@ -1,16 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO duilib/duilib - REF d7f3a331a0fc6ba48429cd9e5c427570cc73bc35 - SHA512 6381cac467d42e4811859411a5fa620e52075622e8fbec38a6ab320c33bc7d6fdddc809c150d6a10cc40c55a651345bda9387432898d24957b6ab0f5c4b5391c + REF d7f3a331a0fc6ba48429cd9e5c427570cc73bc35 + SHA512 6381cac467d42e4811859411a5fa620e52075622e8fbec38a6ab320c33bc7d6fdddc809c150d6a10cc40c55a651345bda9387432898d24957b6ab0f5c4b5391c HEAD_REF master PATCHES "fix-post-build-errors.patch" "fix-arm-build.patch" "fix-encoding.patch" "enable-static.patch" + "enable-unicode-for-vcpkg.patch" ) vcpkg_configure_cmake( @@ -35,4 +34,4 @@ else() file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/duilib.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/duilib RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/duilib/vcpkg.json b/ports/duilib/vcpkg.json new file mode 100644 index 00000000000000..6c08b75db2ad4b --- /dev/null +++ b/ports/duilib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "duilib", + "version-string": "2019-4-28", + "port-version": 4, + "description": "Duilib is a free open source DirectUI interface library under Windows. It is widely accepted by major Internet companies due to its simple and easy to expand design and stable and efficient implementation. It is widely used in IM, video client, stock market software, navigation software, and mobile phone assistive software. Duilib is still evolving, and will continue to improve in many aspects such as documentation, examples, animations, and rendering engines.", + "homepage": "https://github.com/duilib/duilib" +} diff --git a/ports/duktape/CMakeLists.txt b/ports/duktape/CMakeLists.txt index 3a9c869dece0cd..746aaa910b70d0 100644 --- a/ports/duktape/CMakeLists.txt +++ b/ports/duktape/CMakeLists.txt @@ -1,21 +1,55 @@ -project (duktape) +cmake_minimum_required(VERSION 3.13) -file(GLOB_RECURSE DUKTAPE_SOURCES "src/*.c") -file(GLOB_RECURSE DUKTAPE_HEADERS "src/*.h") -if (BUILD_SHARED_LIBS) - add_definitions(-DDUK_F_DLL_BUILD) -endif () +set(duktape_MAJOR_VERSION 2) +set(duktape_MINOR_VERSION 4) +set(duktape_PATCH_VERSION 0) +set(duktape_VERSION ${duktape_MAJOR_VERSION}.${duktape_MINOR_VERSION}.${duktape_PATCH_VERSION}) + +option(CMAKE_VERBOSE_MAKEFILE "Create verbose makefile" OFF) +option(BUILD_SHARED_LIBS "Create duktape as a shared library" ON) -include_directories("src/") +project(duktape VERSION ${duktape_VERSION}) + +file(GLOB_RECURSE DUKTAPE_SOURCES "${CMAKE_CURRENT_LIST_DIR}/src/*.c") +file(GLOB_RECURSE DUKTAPE_HEADERS "${CMAKE_CURRENT_LIST_DIR}/src/*.h") add_library(duktape ${DUKTAPE_SOURCES} ${DUKTAPE_HEADERS}) +target_include_directories(duktape PRIVATE "${CMAKE_CURRENT_LIST_DIR}/src") +set_target_properties(duktape PROPERTIES PUBLIC_HEADER "${DUKTAPE_HEADERS}") +set_target_properties(duktape PROPERTIES VERSION ${duktape_VERSION}) +set_target_properties(duktape PROPERTIES SOVERSION ${duktape_MAJOR_VERSION}) -set_target_properties("duktape" PROPERTIES PUBLIC_HEADER "${DUKTAPE_HEADERS}") +if (BUILD_SHARED_LIBS) + target_compile_definitions(duktape PRIVATE -DDUK_F_DLL_BUILD) +endif () install(TARGETS duktape - EXPORT duktape-targets + EXPORT duktapeTargets ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib" RUNTIME DESTINATION "bin" - PUBLIC_HEADER DESTINATION "include") + PUBLIC_HEADER DESTINATION "include" + COMPONENT dev +) + +install(EXPORT duktapeTargets + FILE duktapeTargets.cmake + NAMESPACE duktape:: + DESTINATION "share/duktape" +) + +export(PACKAGE duktape) + +include(CMakePackageConfigHelpers) +write_basic_package_version_file("${PROJECT_BINARY_DIR}/duktapeConfigVersion.cmake" + COMPATIBILITY SameMajorVersion +) + +configure_file(duktapeConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/duktapeConfig.cmake" @ONLY) +install(FILES + "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/duktapeConfig.cmake" + "${PROJECT_BINARY_DIR}/duktapeConfigVersion.cmake" + DESTINATION "share/duktape" +) diff --git a/ports/duktape/CONTROL b/ports/duktape/CONTROL deleted file mode 100644 index 08c822fadfecb3..00000000000000 --- a/ports/duktape/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: duktape -Version: 2.3.0-2 -Homepage: https://github.com/svaarala/duktape -Description: Embeddable Javascript engine with a focus on portability and compact footprint. -Build-Depends: diff --git a/ports/duktape/duk_config.h.patch b/ports/duktape/duk_config.h.patch deleted file mode 100644 index d0be961ce7ad2f..00000000000000 --- a/ports/duktape/duk_config.h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/duk_config.h b/src/duk_config.h -index a942563..8d3d309 100644 ---- a/src/duk_config.h -+++ b/src/duk_config.h -@@ -64,7 +64,7 @@ - - /* DLL build detection */ - /* not configured for DLL build */ --#undef DUK_F_DLL_BUILD -+// #undef DUK_F_DLL_BUILD - - /* Apple OSX, iOS */ - #if defined(__APPLE__) diff --git a/ports/duktape/duktapeConfig.cmake b/ports/duktape/duktapeConfig.cmake.in similarity index 100% rename from ports/duktape/duktapeConfig.cmake rename to ports/duktape/duktapeConfig.cmake.in diff --git a/ports/duktape/portfile.cmake b/ports/duktape/portfile.cmake index fe2c9a494ebbde..abdc8aa1d7ce23 100644 --- a/ports/duktape/portfile.cmake +++ b/ports/duktape/portfile.cmake @@ -1,72 +1,76 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(VCPKG_TARGET_IS_LINUX) message("${PORT} currently requires the following tools from the system package manager:\n python-yaml\n\nThis can be installed on Ubuntu systems via apt-get install python-yaml PYTHON2-yaml (depending on your current python default interpreter)") -endif() +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO svaarala/duktape - REF v2.3.0 - SHA512 dd715eab481b948cf71d3ad16d2544166eb53da0df8936a4ac9c33e1f1277ef6efe542782a4c7f689f6c0c8963d7094749af455ff6a8c59593aa56ebb57e5c6f + REF 6001888049cb42656f8649db020e804bcdeca6a7 # v2.5.0 + SHA512 ffbc7f1b16b7469ddfc0af0054a7891ffda128cc099e693773c6b4597ee6a96f8a08d354f7a7cf3a1f16369bef7b7a94c2670a617ec0355cc3614f56e1668dc4 HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/duktapeConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/duktapeConfig.cmake.in DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -if(CMAKE_HOST_WIN32) +if (VCPKG_TARGET_IS_WINDOWS) set(EXECUTABLE_SUFFIX ".exe") + set(PYTHON_OPTION "") else() set(EXECUTABLE_SUFFIX "") + set(PYTHON_OPTION "--user") endif() vcpkg_find_acquire_program(PYTHON2) get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) vcpkg_add_to_path("${PYTHON2_DIR}") + if(NOT EXISTS ${PYTHON2_DIR}/easy_install${EXECUTABLE_SUFFIX}) if(NOT EXISTS ${PYTHON2_DIR}/Scripts/pip${EXECUTABLE_SUFFIX}) - vcpkg_download_distfile(GET_PIP - URLS "https://bootstrap.pypa.io/get-pip.py" - FILENAME "tools/python/python2/get-pip.py" - SHA512 99520d223819708b8f6e4b839d1fa215e4e8adc7fcd0db6c25a0399cf2fa10034b35673cf450609303646d12497f301ef53b7e7cc65c78e7bce4af0c673555ad + vcpkg_from_github( + OUT_SOURCE_PATH PYFILE_PATH + REPO pypa/get-pip + REF 309a56c5fd94bd1134053a541cb4657a4e47e09d #2019-08-25 + SHA512 bb4b0745998a3205cd0f0963c04fb45f4614ba3b6fcbe97efe8f8614192f244b7ae62705483a5305943d6c8fedeca53b2e9905aed918d2c6106f8a9680184c7a + HEAD_REF master ) - execute_process(COMMAND ${PYTHON2_DIR}/python${EXECUTABLE_SUFFIX} ${PYTHON2_DIR}/get-pip.py) + execute_process(COMMAND ${PYTHON2_DIR}/python${EXECUTABLE_SUFFIX} ${PYFILE_PATH}/get-pip.py ${PYTHON_OPTION}) endif() - execute_process(COMMAND ${PYTHON2_DIR}/Scripts/pip${EXECUTABLE_SUFFIX} install pyyaml) + execute_process(COMMAND ${PYTHON2_DIR}/Scripts/pip${EXECUTABLE_SUFFIX} install pyyaml ${PYTHON_OPTION}) else() execute_process(COMMAND ${PYTHON2_DIR}/easy_install${EXECUTABLE_SUFFIX} pyyaml) endif() -execute_process(COMMAND ${PYTHON2} ${SOURCE_PATH}/tools/configure.py --source-directory ${SOURCE_PATH}/src-input --output-directory ${SOURCE_PATH}/src --config-metadata ${SOURCE_PATH}/config -DDUK_USE_FASTINT) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - duk_config.h.patch +vcpkg_execute_required_process( + COMMAND ${PYTHON2} tools/configure.py --source-directory src-input --output-directory src --config-metadata config -DDUK_USE_FASTINT + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME pre-configure ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(DUK_CONFIG_H_PATH "${SOURCE_PATH}/src/duk_config.h") + file(READ ${DUK_CONFIG_H_PATH} CONTENT) + string(REPLACE "#undef DUK_F_DLL_BUILD" "#define DUK_F_DLL_BUILD" CONTENT "${CONTENT}") + file(WRITE ${DUK_CONFIG_H_PATH} "${CONTENT}") +else() + set(DUK_CONFIG_H_PATH "${SOURCE_PATH}/src/duk_config.h") + file(READ ${DUK_CONFIG_H_PATH} CONTENT) + string(REPLACE "#define DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD" CONTENT "${CONTENT}") + file(WRITE ${DUK_CONFIG_H_PATH} "${CONTENT}") +endif() + vcpkg_configure_cmake( PREFER_NINJA SOURCE_PATH ${SOURCE_PATH} ) vcpkg_install_cmake() +vcpkg_copy_pdbs() -set(DUK_CONFIG_H_PATH "${CURRENT_PACKAGES_DIR}/include/duk_config.h") -file(READ ${DUK_CONFIG_H_PATH} CONTENT) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD\n#define DUK_F_DLL_BUILD" CONTENT "${CONTENT}") -else() - string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD" CONTENT "${CONTENT}") -endif() -file(WRITE ${DUK_CONFIG_H_PATH} "${CONTENT}") - -# Remove debug include file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Copy copright information -file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/duktape" RENAME "copyright") - +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/duktape/vcpkg.json b/ports/duktape/vcpkg.json new file mode 100644 index 00000000000000..59a78b9d6dcc7f --- /dev/null +++ b/ports/duktape/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "duktape", + "version-string": "2.5.0", + "port-version": 2, + "description": "Embeddable Javascript engine with a focus on portability and compact footprint.", + "homepage": "https://github.com/svaarala/duktape" +} diff --git a/ports/dx/CONTROL b/ports/dx/CONTROL deleted file mode 100644 index d5ad978721d06e..00000000000000 --- a/ports/dx/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: dx -Version: 1.0.1-1 -Homepage: https://github.com/sdcb/dx -Description: A modern C++ library for DirectX programming \ No newline at end of file diff --git a/ports/dx/portfile.cmake b/ports/dx/portfile.cmake index ee8eadcc7b5016..61500c5c0c143a 100644 --- a/ports/dx/portfile.cmake +++ b/ports/dx/portfile.cmake @@ -1,6 +1,4 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sdcb/dx diff --git a/ports/dx/vcpkg.json b/ports/dx/vcpkg.json new file mode 100644 index 00000000000000..ddee4841024627 --- /dev/null +++ b/ports/dx/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "dx", + "version-string": "1.0.1", + "port-version": 2, + "description": "A modern C++ library for DirectX programming", + "homepage": "https://github.com/sdcb/dx" +} diff --git a/ports/dxsdk-d3dx/portfile.cmake b/ports/dxsdk-d3dx/portfile.cmake new file mode 100644 index 00000000000000..7061c52db61719 --- /dev/null +++ b/ports/dxsdk-d3dx/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "${PORT} only supports Windows.") +endif() + +message(WARNING "Use of ${PORT} is not recommended for new projects. See https://aka.ms/dxsdk for more information.") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +set(VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT enabled) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.nuget.org/api/v2/package/Microsoft.DXSDK.D3DX/9.29.952.8" + FILENAME "dxsdk-d3dx.9.29.952.8.zip" + SHA512 9f6a95ed858555c1c438a85219ede32c82729068b21dd7ecf11de01cf3cdd525b2f04a58643bfcc14c48a29403dc1c80246f0a12a1ef4377b91b855f6d6d7986 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH PACKAGE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +file(GLOB HEADER_FILES ${PACKAGE_PATH}/build/native/include/*.h ${PACKAGE_PATH}/build/native/include/*.inl) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +file(COPY ${PACKAGE_PATH}/build/native/release/lib/${VCPKG_TARGET_ARCHITECTURE}/d3dx9.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) +file(COPY ${PACKAGE_PATH}/build/native/release/lib/${VCPKG_TARGET_ARCHITECTURE}/d3dx10.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) +file(COPY ${PACKAGE_PATH}/build/native/release/lib/${VCPKG_TARGET_ARCHITECTURE}/d3dx11.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) +file(COPY ${PACKAGE_PATH}/build/native/debug/lib/${VCPKG_TARGET_ARCHITECTURE}/d3dx9d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +file(COPY ${PACKAGE_PATH}/build/native/debug/lib/${VCPKG_TARGET_ARCHITECTURE}/d3dx10d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +file(COPY ${PACKAGE_PATH}/build/native/debug/lib/${VCPKG_TARGET_ARCHITECTURE}/d3dx11d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) + +file(COPY ${PACKAGE_PATH}/build/native/release/bin/${VCPKG_TARGET_ARCHITECTURE}/D3DCompiler_43.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/) +file(COPY ${PACKAGE_PATH}/build/native/release/bin/${VCPKG_TARGET_ARCHITECTURE}/D3DX9_43.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/) +file(COPY ${PACKAGE_PATH}/build/native/release/bin/${VCPKG_TARGET_ARCHITECTURE}/d3dx10_43.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/) +file(COPY ${PACKAGE_PATH}/build/native/release/bin/${VCPKG_TARGET_ARCHITECTURE}/d3dx11_43.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/) +file(COPY ${PACKAGE_PATH}/build/native/debug/bin/${VCPKG_TARGET_ARCHITECTURE}/D3DCompiler_43.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) +file(COPY ${PACKAGE_PATH}/build/native/debug/bin/${VCPKG_TARGET_ARCHITECTURE}/D3DX9d_43.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) +file(COPY ${PACKAGE_PATH}/build/native/debug/bin/${VCPKG_TARGET_ARCHITECTURE}/D3DX10d_43.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) +file(COPY ${PACKAGE_PATH}/build/native/debug/bin/${VCPKG_TARGET_ARCHITECTURE}/D3DX11d_43.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) + +file(INSTALL ${PACKAGE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/dxsdk-d3dx/vcpkg.json b/ports/dxsdk-d3dx/vcpkg.json new file mode 100644 index 00000000000000..93a3ccaa3667f9 --- /dev/null +++ b/ports/dxsdk-d3dx/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "dxsdk-d3dx", + "version": "9.29.952.8", + "description": "Redistributable package for the legacy DirectX SDK's D3DX9, D3DX10, and/or D3DX11 utility libraries.", + "homepage": "https://walbourn.github.io/legacy-d3dx-on-nuget/", + "supports": "windows & !arm & !uwp & !static" +} diff --git a/ports/dxut/CONTROL b/ports/dxut/CONTROL deleted file mode 100644 index 60046288274ff8..00000000000000 --- a/ports/dxut/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: dxut -Version: 11.14-3 -Homepage: https://github.com/Microsoft/DXUT -Description: A "GLUT"-like framework for Direct3D 11.x Win32 desktop applications \ No newline at end of file diff --git a/ports/dxut/portfile.cmake b/ports/dxut/portfile.cmake index f89fe3982a2314..118bedd7b35238 100644 --- a/ports/dxut/portfile.cmake +++ b/ports/dxut/portfile.cmake @@ -1,51 +1,23 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "DXUT only supports dynamic CRT linkage") -endif() - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DXUT-sept2016) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/Microsoft/DXUT/archive/sept2016.tar.gz" - FILENAME "DXUT-sept2016.tar.gz" - SHA512 190006c194284a1f5d614477896b0469a59ece05dff37477dadbe98808a5c33e274c0c1bb1390f22d1b5e06c9f534f4b50d6002157b2a391e01c2192b8e08869 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) - -IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSE() - SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -ENDIF() +vcpkg_fail_port_install(ON_TARGET "LINUX" "OSX" "UWP" "ANDROID") -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/DXUT_2015.sln - PLATFORM ${BUILD_ARCH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/DXUT + REF jun2021 + SHA512 4c95cefcf685e95b26677d0aba3d118df7860e3bf1b99b567013d326f890a3f67657be2c60677d3d996cccacce30f70d0c2fc60a692372053cce50318fa79a70 + HEAD_REF master ) -file(INSTALL - ${SOURCE_PATH}/Core/ - ${SOURCE_PATH}/Optional/ - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN "*.h" +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/include/Bin) - -file(INSTALL - ${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Release/DXUT.lib - ${SOURCE_PATH}/Optional/Bin/Desktop_2015/${BUILD_ARCH}/Release/DXUTOpt.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -file(INSTALL - ${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DXUT.lib - ${SOURCE_PATH}/Optional/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DXUTOpt.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -vcpkg_copy_pdbs() +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -file(INSTALL ${SOURCE_PATH}/MIT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dxut RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -message(STATUS "Installing done") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/dxut/vcpkg.json b/ports/dxut/vcpkg.json new file mode 100644 index 00000000000000..ede994b81c61cd --- /dev/null +++ b/ports/dxut/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "dxut", + "version": "11.26", + "description": "A \"GLUT\"-like framework for Direct3D 11.x Win32 desktop applications", + "homepage": "https://github.com/Microsoft/DXUT", + "documentation": "https://github.com/microsoft/DXUT/wiki", + "license": "MIT", + "supports": "windows & !uwp", + "dependencies": [ + "directxmath" + ] +} diff --git a/ports/eabase/EABaseConfig.cmake.in b/ports/eabase/EABaseConfig.cmake.in new file mode 100644 index 00000000000000..afc9b104a01072 --- /dev/null +++ b/ports/eabase/EABaseConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +# Provide path for scripts +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + +include(${CMAKE_CURRENT_LIST_DIR}/EABaseTargets.cmake) \ No newline at end of file diff --git a/ports/eabase/fix_cmake_install.patch b/ports/eabase/fix_cmake_install.patch new file mode 100644 index 00000000000000..ea83e66b201d87 --- /dev/null +++ b/ports/eabase/fix_cmake_install.patch @@ -0,0 +1,75 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 89c6703..ab8e553 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,6 +4,9 @@ + cmake_minimum_required(VERSION 3.1) + project(EABase CXX) + ++include(GNUInstallDirs) ++include(CMakePackageConfigHelpers) ++ + #------------------------------------------------------------------------------------------- + # Options + #------------------------------------------------------------------------------------------- +@@ -22,13 +25,51 @@ endif() + add_definitions(-D_CHAR16T) + + if (NOT EABASE_BUILD_TESTS) +- #------------------------------------------------------------------------------------------- +- # Header only library +- #------------------------------------------------------------------------------------------- +- add_library(EABase INTERFACE) +- +- #------------------------------------------------------------------------------------------- +- # Include dirs +- #------------------------------------------------------------------------------------------- +- target_include_directories(EABase INTERFACE include/Common) ++ #------------------------------------------------------------------------------------------- ++ # Header only library ++ #------------------------------------------------------------------------------------------- ++ add_library(EABase INTERFACE) ++ add_library(EABase::EABase ALIAS EABase) ++ ++ #------------------------------------------------------------------------------------------- ++ # Include dirs ++ #------------------------------------------------------------------------------------------- ++ target_include_directories(EABase INTERFACE ++ $ ++ $ ++ ) ++ ++ # create and install an export set for eabase target as EABase::EABase ++ set(EABase_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EABase") ++ ++ configure_package_config_file( ++ EABaseConfig.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/EABaseConfig.cmake ++ INSTALL_DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION} ++ ) ++ ++ # create and install an export set for Terra target as Terra ++ install( ++ TARGETS EABase EXPORT EABaseTargets ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ ++ ++ install(EXPORT EABaseTargets DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION}) ++ ++ write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfigVersion.cmake" ++ VERSION 2.09.12 ++ COMPATIBILITY SameMajorVersion ++ ) ++ ++ install(TARGETS EABase LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++ install(DIRECTORY "include/Common/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++ ++ install( ++ FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfig.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfigVersion.cmake" ++ DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION} ++ ) + endif() diff --git a/ports/eabase/portfile.cmake b/ports/eabase/portfile.cmake new file mode 100644 index 00000000000000..8ebb2ab1498f72 --- /dev/null +++ b/ports/eabase/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO electronicarts/EABase + REF d1be0a1d0fc01a9bf8f3f2cea75018df0d2410ee + SHA512 84a11bea06aecbf9a659d92b1ac904b99b2b82023650f4f376b5e68a744f631c5dbdd53d25f746ffb01b428415ac86e4fb8ba758db844acf80560fabe4d77733 + HEAD_REF master + PATCHES + fix_cmake_install.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/EABaseConfig.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DEABASE_BUILD_TESTS:BOOL=OFF +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EABase) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/eabase/vcpkg.json b/ports/eabase/vcpkg.json new file mode 100644 index 00000000000000..d9032602ca520d --- /dev/null +++ b/ports/eabase/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "eabase", + "version-string": "2.09.12", + "port-version": 2, + "description": "Electronic Arts Base. EABase is a small set of header files that define platform-independent data types and macros.", + "homepage": "https://github.com/electronicarts/EABase" +} diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL deleted file mode 100644 index 5e0c40bf7c238c..00000000000000 --- a/ports/eastl/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: eastl -Version: 3.14.00 -Homepage: https://github.com/electronicarts/EASTL -Description: Electronic Arts Standard Template Library. - It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations. diff --git a/ports/eastl/EASTLConfig.cmake.in b/ports/eastl/EASTLConfig.cmake.in new file mode 100644 index 00000000000000..92fb2b18dd9416 --- /dev/null +++ b/ports/eastl/EASTLConfig.cmake.in @@ -0,0 +1,9 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) +find_dependency(EABase CONFIG REQUIRED) + +# Provide path for scripts +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + +include(${CMAKE_CURRENT_LIST_DIR}/EASTLTargets.cmake) \ No newline at end of file diff --git a/ports/eastl/fix_cmake_install.patch b/ports/eastl/fix_cmake_install.patch index b67e26f1282968..a2dbfd8215744d 100644 --- a/ports/eastl/fix_cmake_install.patch +++ b/ports/eastl/fix_cmake_install.patch @@ -1,19 +1,75 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index b8171cd..c771e77 100644 +index e8700dc..6d3e2f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -41,6 +41,7 @@ add_definitions(-DEASTL_OPENSOURCE=1) +@@ -4,12 +4,17 @@ + cmake_minimum_required(VERSION 3.1) + project(EASTL CXX) + ++include(GNUInstallDirs) ++include(CMakePackageConfigHelpers) ++ #------------------------------------------------------------------------------------------- - # Include dirs + # Options #------------------------------------------------------------------------------------------- -+include_directories(APPEND test/packages) - target_include_directories(EASTL PUBLIC include) + option(EASTL_BUILD_BENCHMARK "Enable generation of build files for benchmark" OFF) + option(EASTL_BUILD_TESTS "Enable generation of build files for tests" OFF) ++find_package(EABase CONFIG REQUIRED) ++ + #------------------------------------------------------------------------------------------- + # Compiler Flags + #------------------------------------------------------------------------------------------- +@@ -41,7 +46,10 @@ add_definitions(-DEASTL_OPENSOURCE=1) #------------------------------------------------------------------------------------------- -@@ -48,3 +49,6 @@ target_include_directories(EASTL PUBLIC include) + # Include dirs + #------------------------------------------------------------------------------------------- +-target_include_directories(EASTL PUBLIC include) ++target_include_directories(EASTL PUBLIC ++ $ ++ $ ++ ) + #------------------------------------------------------------------------------------------- - target_link_libraries(EASTL EABase) + # Dependencies +@@ -50,5 +58,39 @@ if (NOT TARGET EABase) + add_subdirectory(test/packages/EABase) + endif() + +-target_link_libraries(EASTL EABase) ++target_link_libraries(EASTL PUBLIC EABase) ++ ++# create and install an export set for eabase target as EABase::EABase ++set(EASTL_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EASTL") ++ ++configure_package_config_file( ++ EASTLConfig.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/EASTLConfig.cmake ++ INSTALL_DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION} ++) ++ ++# create and install an export set for Terra target as Terra ++install( ++ TARGETS EASTL EXPORT EASTLTargets ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++ ++ ++install(EXPORT EASTLTargets DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION}) ++ ++write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfigVersion.cmake" ++ VERSION 3.16.05 ++ COMPATIBILITY SameMajorVersion ++) ++ ++install(TARGETS EASTL LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++ ++install( ++ FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfig.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfigVersion.cmake" ++ DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION} ++) -+install(TARGETS EASTL DESTINATION lib) -+install(DIRECTORY include/EASTL DESTINATION include) -+install(DIRECTORY test/packages/EABase DESTINATION include) diff --git a/ports/eastl/fix_uwp.patch b/ports/eastl/fix_uwp.patch deleted file mode 100644 index 4fd144a1300b61..00000000000000 --- a/ports/eastl/fix_uwp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/Common/EABase/config/eaplatform.h b/include/Common/EABase/config/eaplatform.h -index 8b16146..54079ab 100644 ---- a/include/Common/EABase/config/eaplatform.h -+++ b/include/Common/EABase/config/eaplatform.h -@@ -125,7 +125,7 @@ - #endif - - --#elif defined(EA_PLATFORM_XBOXONE) || defined(_DURANGO) || defined(EA_PLATFORM_CAPILANO) || (defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || WINAPI_FAMILY == WINAPI_FAMILY_TV_TITLE)) -+#elif defined(EA_PLATFORM_XBOXONE) || defined(_DURANGO) || defined(EA_PLATFORM_CAPILANO) || (defined(WINAPI_FAMILY) && WINAPI_FAMILY && (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || WINAPI_FAMILY == WINAPI_FAMILY_TV_TITLE)) - // XBox One - // Durango was Microsoft's code-name for the platform, which is now obsolete. - // Microsoft uses _DURANGO instead of some variation of _XBOX, though it's not natively defined by the compiler. diff --git a/ports/eastl/fixchar8_t.patch b/ports/eastl/fixchar8_t.patch deleted file mode 100644 index 51fcfe69a564e5..00000000000000 --- a/ports/eastl/fixchar8_t.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/scripts/CMake/CommonCppFlags.cmake b/scripts/CMake/CommonCppFlags.cmake -index 566fbee..4fcca61 100644 ---- a/scripts/CMake/CommonCppFlags.cmake -+++ b/scripts/CMake/CommonCppFlags.cmake -@@ -54,7 +54,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - message(FATAL_ERROR "Building with a gcc version less than 4.7.3 is not supported.") - endif() - elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest /W4 /permissive-") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest /W4 /permissive- /Zc:char8_t-") - endif() - - diff --git a/ports/eastl/portfile.cmake b/ports/eastl/portfile.cmake index e1c1a0d449a603..1bef06c771a740 100644 --- a/ports/eastl/portfile.cmake +++ b/ports/eastl/portfile.cmake @@ -1,31 +1,16 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO electronicarts/EABase - REF 6f27a2f7aa21f2d71ae8c6bc1d889d0119677a56 - SHA512 9176fb2d508cf023c3c16c61a511196a2f6af36172145544bba44062a00ca7591e54e4fc16ac13562ef0e2d629b626f398bff3669b4cdb7ba0068548d6a53883 - HEAD_REF master - PATCHES - fix_uwp.patch -) - -set(EABASE_PATH ${SOURCE_PATH}) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO electronicarts/EASTL - REF dcd2b838d52de13691999aff8faeaa8f284928ac - SHA512 9756ee47a30447f17ceb45fb5143d6e80905636cf709c171059a83f74094fb25391c896de0ea5e063cdad4e7334c5f963c75b1c34ad539fd24175983a2054159 + REF 41bd2e4466e33b979d2afc37f9b98dacf1eab50b #v 3.17.03 + SHA512 3011a0a08701b683e22cc624167b4f65fce8b16d0f7a03675f6a1d5b02313c5b763bcc6c8091f65728ed60ceee8d585cbdb1968a35fb24954f4f66afabb23865 HEAD_REF master PATCHES - fixchar8_t.patch # can be removed after electronicarts/EASTL#274 is resolved fix_cmake_install.patch ) -file(COPY ${EABASE_PATH}/include/Common/EABase/ DESTINATION ${SOURCE_PATH}/test/packages/EABase) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/EASTLConfig.cmake.in DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -37,10 +22,15 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EASTL) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl RENAME copyright) -file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# CommonCppFlags used by EAThread +file(INSTALL ${SOURCE_PATH}/scripts/CMake/CommonCppFlags.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/eastl/vcpkg.json b/ports/eastl/vcpkg.json new file mode 100644 index 00000000000000..9fd13a0c858b0b --- /dev/null +++ b/ports/eastl/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "eastl", + "version-string": "3.17.03", + "port-version": 1, + "description": "Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.", + "homepage": "https://github.com/electronicarts/EASTL", + "dependencies": [ + "eabase" + ] +} diff --git a/ports/easycl/CONTROL b/ports/easycl/CONTROL deleted file mode 100644 index ad61f226040c8f..00000000000000 --- a/ports/easycl/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: easycl -Version: 0.3 -Homepage: https://github.com/architector1324/EasyCL -Build-Depends: opencl -Description: OpenCL based lightweight c++ computing library diff --git a/ports/easycl/portfile.cmake b/ports/easycl/portfile.cmake index 694a853bb6e1b0..554639473b2b24 100644 --- a/ports/easycl/portfile.cmake +++ b/ports/easycl/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO architector1324/EasyCL diff --git a/ports/easycl/vcpkg.json b/ports/easycl/vcpkg.json new file mode 100644 index 00000000000000..2df4f360900dbf --- /dev/null +++ b/ports/easycl/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "easycl", + "version-string": "0.3", + "port-version": 1, + "description": "OpenCL based lightweight c++ computing library", + "homepage": "https://github.com/architector1324/EasyCL", + "dependencies": [ + "opencl" + ] +} diff --git a/ports/easyhook/CONTROL b/ports/easyhook/CONTROL deleted file mode 100644 index a47eb803dfccc5..00000000000000 --- a/ports/easyhook/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: easyhook -Version: 2.7.6789.0 -Homepage: https://github.com/EasyHook/EasyHook -Description: This project supports extending (hooking) unmanaged code (APIs) with pure managed ones, from within a fully managed environment on 32- or 64-bit Windows Vista x64, Windows Server 2008 x64, Windows 7, Windows 8.1, and Windows 10. \ No newline at end of file diff --git a/ports/easyhook/portfile.cmake b/ports/easyhook/portfile.cmake index d74457880a3912..983c4a5099b251 100644 --- a/ports/easyhook/portfile.cmake +++ b/ports/easyhook/portfile.cmake @@ -1,14 +1,6 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP" ON_ARCH "arm" ON_LIBRARY_LINKAGE "static") -if (NOT VCPKG_TARGET_IS_WINDOWS) - message(FATAL_ERROR "easyhook only support windows.") -endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "easyhook can only be built as dynamic library.") -endif() - -message(".Net framework 4.0 is required, please install it before install easyhook.") +message(WARNING ".Net framework 4.0 is required, please install it before install easyhook.") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -19,20 +11,50 @@ vcpkg_from_github( PATCHES fix-build.patch ) +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BUILD_ARCH "Win32") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(BUILD_ARCH "x64") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH EasyHook.sln TARGET EasyHookDll RELEASE_CONFIGURATION "netfx4-Release" DEBUG_CONFIGURATION "netfx4-Debug" + PLATFORM ${BUILD_ARCH} ) +# Remove the mismatch rebuild library +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/AUX_ULIB_x64.LIB") + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/AUX_ULIB_x64.LIB") + endif() +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/AUX_ULIB_x86.LIB") + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/AUX_ULIB_x86.LIB") + endif() +endif() + # These libraries are useless, so remove. -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/EasyHook.dll ${CURRENT_PACKAGES_DIR}/bin/EasyHook.pdb) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/EasyHook.dll ${CURRENT_PACKAGES_DIR}/debug/bin/EasyHook.pdb) +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/EasyHook.dll" "${CURRENT_PACKAGES_DIR}/bin/EasyHook.pdb") +endif() +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/EasyHook.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/EasyHook.pdb") +endif() # Install includes -file(INSTALL ${SOURCE_PATH}/Public/easyhook.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/easyhook) +file(INSTALL "${SOURCE_PATH}/Public/easyhook.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/easyhook") # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/easyhook RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/easyhook/vcpkg.json b/ports/easyhook/vcpkg.json new file mode 100644 index 00000000000000..bac2a88d414412 --- /dev/null +++ b/ports/easyhook/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "easyhook", + "version": "2.7.6789.0", + "port-version": 1, + "description": "This project supports extending (hooking) unmanaged code (APIs) with pure managed ones, from within a fully managed environment on 32- or 64-bit Windows Vista x64, Windows Server 2008 x64, Windows 7, Windows 8.1, and Windows 10.", + "homepage": "https://github.com/EasyHook/EasyHook", + "supports": "windows & !(static | arm | uwp)" +} diff --git a/ports/easyloggingpp/CONTROL b/ports/easyloggingpp/CONTROL deleted file mode 100644 index a10dbb2d668bc3..00000000000000 --- a/ports/easyloggingpp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: easyloggingpp -Version: 9.96.7-1 -Description: Easylogging++ is a single header efficient logging library for C++ applications. \ No newline at end of file diff --git a/ports/easyloggingpp/portfile.cmake b/ports/easyloggingpp/portfile.cmake index 56ba406b73c9b9..6df99d27d3ec59 100644 --- a/ports/easyloggingpp/portfile.cmake +++ b/ports/easyloggingpp/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/easyloggingpp/vcpkg.json b/ports/easyloggingpp/vcpkg.json new file mode 100644 index 00000000000000..8f7066d5531c5a --- /dev/null +++ b/ports/easyloggingpp/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "easyloggingpp", + "version-string": "9.96.7", + "port-version": 2, + "description": "Easylogging++ is a single header efficient logging library for C++ applications." +} diff --git a/ports/eathread/EAThreadConfig.cmake.in b/ports/eathread/EAThreadConfig.cmake.in new file mode 100644 index 00000000000000..9ab444e5bbb73e --- /dev/null +++ b/ports/eathread/EAThreadConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +# Provide path for scripts +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + +include(${CMAKE_CURRENT_LIST_DIR}/EAThreadTargets.cmake) \ No newline at end of file diff --git a/ports/eathread/fix_cmake_install.patch b/ports/eathread/fix_cmake_install.patch new file mode 100644 index 00000000000000..bc3327951999ab --- /dev/null +++ b/ports/eathread/fix_cmake_install.patch @@ -0,0 +1,75 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 34fc37a..60d201a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,15 +4,21 @@ + cmake_minimum_required(VERSION 3.1) + project(EAThread CXX) + ++include(GNUInstallDirs) ++include(CMakePackageConfigHelpers) ++ + #------------------------------------------------------------------------------------------- + # Options + #------------------------------------------------------------------------------------------- + option(EATHREAD_BUILD_TESTS "Enable generation of build files for tests" OFF) + ++find_package(EABase CONFIG REQUIRED) ++find_package(EASTL CONFIG REQUIRED) ++ + #------------------------------------------------------------------------------------------- + # Compiler Flags + #------------------------------------------------------------------------------------------- +-set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/test/packages/EASTL/scripts/CMake") ++set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${_VCPKG_ROOT_DIR}/installed/${VCPKG_TARGET_TRIPLET}/share/eastl") + include(CommonCppFlags) + + #------------------------------------------------------------------------------------------- +@@ -34,10 +40,45 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS) + #------------------------------------------------------------------------------------------- + # Export Include Directories + #------------------------------------------------------------------------------------------- +-target_include_directories(EAThread PUBLIC include) ++target_include_directories(EAThread PUBLIC ++ $ ++ $ ++ ) + + #------------------------------------------------------------------------------------------- + # Package Dependencies + #------------------------------------------------------------------------------------------- +-target_link_libraries(EAThread EABase) ++target_link_libraries(EAThread PUBLIC EABase) ++ ++# create and install an export set for eabase target as EABase::EABase ++set(EAThread_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EAThread") ++ ++configure_package_config_file( ++ EAThreadConfig.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfig.cmake ++ INSTALL_DESTINATION ${EAThread_CMAKE_CONFIG_DESTINATION} ++) ++ ++# create and install an export set for Terra target as Terra ++install( ++ TARGETS EAThread EXPORT EAThreadTargets ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++ ++install(EXPORT EAThreadTargets DESTINATION ${EAThread_CMAKE_CONFIG_DESTINATION}) ++ ++write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfigVersion.cmake" ++ VERSION 3.16.01 ++ COMPATIBILITY SameMajorVersion ++) ++ ++install(TARGETS EAThread LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + ++install( ++ FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfig.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfigVersion.cmake" ++ DESTINATION ${EAThread_CMAKE_CONFIG_DESTINATION} ++) diff --git a/ports/eathread/portfile.cmake b/ports/eathread/portfile.cmake new file mode 100644 index 00000000000000..5d4d9669a91d15 --- /dev/null +++ b/ports/eathread/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO electronicarts/EAThread + REF e4367a36f2e55d10b2b994bfbae8edf21f15bafd + SHA512 cd5a2aa6cdfe6fa538067919aa49e5ecd901898e12929dc852068ce66efe386032eb1fe667ea7d9b7a3d73a7bef1d90a683c0b90b6fb0d6d9a27950b05c4ab6a + HEAD_REF master + PATCHES + fix_cmake_install.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/EAThreadConfig.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DEATHREAD_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EAThread) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/eathread) diff --git a/ports/eathread/vcpkg.json b/ports/eathread/vcpkg.json new file mode 100644 index 00000000000000..b5ad4d3cf3f6a9 --- /dev/null +++ b/ports/eathread/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "eathread", + "version-string": "1.32.09", + "port-version": 2, + "description": "Electronic Arts Thread Library. EAThread implements a unified cross-platform interface for multithreaded programming on various platforms.", + "homepage": "https://github.com/electronicarts/EAThread", + "dependencies": [ + "eabase", + "eastl" + ] +} diff --git a/ports/ebml/CONTROL b/ports/ebml/CONTROL deleted file mode 100644 index 0b2aac43262731..00000000000000 --- a/ports/ebml/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ebml -Version: 1.3.9 -Homepage: https://github.com/Matroska-Org/libebml -Description: a C++ libary to parse EBML files diff --git a/ports/ebml/portfile.cmake b/ports/ebml/portfile.cmake index 578e5d5e23ff31..944dcb00ce4928 100644 --- a/ports/ebml/portfile.cmake +++ b/ports/ebml/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() @@ -7,8 +5,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Matroska-Org/libebml - REF release-1.3.9 - SHA512 3ae22ed491024b276edde9237df0e41a8e5a4e142ec6783c77d5286d7825fb59be62f336d07f7042baac8fc7ac004ad7cc4605754c5801d65547449ea04c287f + REF 6145c5700d894312c4dd47ba6c1ace72075b0692 # release-1.4.0 + SHA512 74132d4605ec8b75e72fa58ca4c04c5aa980aae4b028032d34fde14eff406c814518168ae7bfec5cdaf026d914a019b1fcac1458c40537c4964a46989c1283d0 HEAD_REF master ) diff --git a/ports/ebml/vcpkg.json b/ports/ebml/vcpkg.json new file mode 100644 index 00000000000000..764a42e798d008 --- /dev/null +++ b/ports/ebml/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "ebml", + "version-string": "1.4.0", + "port-version": 1, + "description": "a C++ library to parse EBML files", + "homepage": "https://github.com/Matroska-Org/libebml", + "supports": "!uwp" +} diff --git a/ports/ecm/CONTROL b/ports/ecm/CONTROL deleted file mode 100644 index 4f98c2290eb681..00000000000000 --- a/ports/ecm/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ecm -Version: 5.60.0-1 -Homepage: https://github.com/KDE/extra-cmake-modules -Description: Extra CMake Modules (ECM), extra modules and scripts for CMake diff --git a/ports/ecm/fix_canberra.patch b/ports/ecm/fix_canberra.patch new file mode 100644 index 00000000000000..dcfcaba6f0a40e --- /dev/null +++ b/ports/ecm/fix_canberra.patch @@ -0,0 +1,39 @@ +From 203c65c562453385e3ffc4485844b15e80b93107 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Fri, 17 Sep 2021 00:07:08 +0200 +Subject: [PATCH] FindCanberra: link against target provided by pkgconfig + +target_link_libraries() against the target generated by +pkg_check_modules() so that the additional linker options are not +lost, such as the additional libraries to link against when +building statically. + +BUG: 442555 +--- + find-modules/FindCanberra.cmake | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/find-modules/FindCanberra.cmake b/find-modules/FindCanberra.cmake +index c54adf99..f9561118 100644 +--- a/find-modules/FindCanberra.cmake ++++ b/find-modules/FindCanberra.cmake +@@ -34,7 +34,7 @@ Since 5.56.0. + #]=======================================================================] + + find_package(PkgConfig QUIET) +-pkg_check_modules(PC_Canberra libcanberra QUIET) ++pkg_check_modules(PC_Canberra REQUIRED IMPORTED_TARGET libcanberra QUIET) + + find_library(Canberra_LIBRARIES + NAMES canberra +@@ -66,6 +66,7 @@ if(Canberra_FOUND AND NOT TARGET Canberra::Canberra) + INTERFACE_COMPILE_OPTIONS "${PC_Canberra_CFLAGS}" + INTERFACE_INCLUDE_DIRECTORIES "${Canberra_INCLUDE_DIRS}" + ) ++ target_link_libraries(Canberra::Canberra INTERFACE PkgConfig::PC_Canberra) + endif() + + mark_as_advanced(Canberra_LIBRARIES Canberra_INCLUDE_DIRS Canberra_VERSION) +-- +GitLab + diff --git a/ports/ecm/portfile.cmake b/ports/ecm/portfile.cmake index ab92b308621cb7..53acd4d8dd1d43 100644 --- a/ports/ecm/portfile.cmake +++ b/ports/ecm/portfile.cmake @@ -1,31 +1,30 @@ -#cmake-only scripts -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDE/extra-cmake-modules - REF v5.60.0 - SHA512 98c7cbb0a84fbd4806cdf84538cb16717cbbb13fa5cce5c4bf9a507a699c579fa6f88af5091b3d311bdd504a119d6147114b2fad5de2dfd5f18448bca60cdc92 + REF v5.84.0 + SHA512 d49397bcf0d49a95c86c9d9a4e653015ee8b3ef1261b2842439bba7ff3363ac06351fa2df4035c2cb36397d2fc64375a14966ada29f231df51ba26d8e196d6ef HEAD_REF master + PATCHES + fix_canberra.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DBUILD_HTML_DOCS=OFF - -DBUILD_MAN_DOCS=OFF - -DBUILD_QTHELP_DOCS=OFF - -DBUILD_TESTING=OFF +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() # Remove debug files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING-CMAKE-SCRIPTS DESTINATION ${CURRENT_PACKAGES_DIR}/share/ecm) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ecm/COPYING-CMAKE-SCRIPTS ${CURRENT_PACKAGES_DIR}/share/ecm/copyright) +file(INSTALL "${SOURCE_PATH}/COPYING-CMAKE-SCRIPTS" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) # Allow empty include directory set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/ecm/usage b/ports/ecm/usage new file mode 100644 index 00000000000000..b0c8e7b7190347 --- /dev/null +++ b/ports/ecm/usage @@ -0,0 +1,9 @@ +The package ecm provides CMake targets: + + find_package(ECM CONFIG REQUIRED NO_MODULE) + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + include(KDEInstallDirs) + include(KDECompilerSettings) + include(KDECMakeSettings) + +For more infomation, see https://api.kde.org/ecm/ diff --git a/ports/ecm/vcpkg.json b/ports/ecm/vcpkg.json new file mode 100644 index 00000000000000..bc120806eed8cb --- /dev/null +++ b/ports/ecm/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "ecm", + "version": "5.84.0", + "port-version": 1, + "description": "Extra CMake Modules (ECM), extra modules and scripts for CMake", + "homepage": "https://github.com/KDE/extra-cmake-modules", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/ecos/CMakeLists.txt b/ports/ecos/CMakeLists.txt new file mode 100644 index 00000000000000..231b31f2e7269c --- /dev/null +++ b/ports/ecos/CMakeLists.txt @@ -0,0 +1,49 @@ +cmake_minimum_required(VERSION 3.14) +project(ecos C) + +#include(GNUInstallDirs) + +set(EXTERNAL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/external) + +set(SUITESPARSE ${EXTERNAL_SRC}/SuiteSparse_config) +add_library(ecos-suitesparse INTERFACE) +target_sources(ecos-suitesparse INTERFACE $ $) +target_include_directories(ecos-suitesparse INTERFACE $ $) +target_compile_definitions(ecos-suitesparse INTERFACE DLONG LDL_LONG) + +set(AMD_SRC ${EXTERNAL_SRC}/amd/src) +set(AMD_INCLUDE ${EXTERNAL_SRC}/amd/include) +add_library(ecos-amd STATIC + ${AMD_SRC}/amd_1.c ${AMD_SRC}/amd_2.c ${AMD_SRC}/amd_aat.c ${AMD_SRC}/amd_control.c ${AMD_SRC}/amd_defaults.c ${AMD_SRC}/amd_dump.c ${AMD_SRC}/amd_global.c ${AMD_SRC}/amd_info.c ${AMD_SRC}/amd_order.c ${AMD_SRC}/amd_post_tree.c ${AMD_SRC}/amd_postorder.c ${AMD_SRC}/amd_preprocess.c ${AMD_SRC}/amd_valid.c +) +file(GLOB AMD_HEADERS ${EXTERNAL_SRC}/amd/include/*.h) +target_include_directories(ecos-amd PUBLIC $ $) +target_link_libraries(ecos-amd ecos-suitesparse) + + +add_library(ecos-ldl STATIC + ${EXTERNAL_SRC}/ldl/src/ldl.c +) +file(GLOB LDL_HEADERS ${EXTERNAL_SRC}/ldl/include/*.h) +target_include_directories(ecos-ldl PUBLIC $ $) +target_link_libraries(ecos-ldl ecos-suitesparse) + + +add_library(ecos STATIC + src/cone.c src/ecos.c src/expcone.c src/preproc.c src/splamm.c src/wright_omega.c src/ctrlc.c src/equil.c src/kkt.c src/spla.c src/timer.c +) +file(GLOB ECOS_HEADERS include/*.h) +target_include_directories(ecos PUBLIC $ $) +target_link_libraries(ecos ecos-amd ecos-ldl) + +install(FILES ${SUITESPARSE}/SuiteSparse_config.h DESTINATION "include/ecos/") +install(FILES ${ECOS_HEADERS} DESTINATION "include/ecos/") +install(FILES ${LDL_HEADERS} DESTINATION "include/ecos/") +install(FILES ${AMD_HEADERS} DESTINATION "include/ecos/") + +install(TARGETS ecos ecos-amd ecos-ldl ecos-suitesparse EXPORT ecos-targets) +install( + EXPORT ecos-targets + FILE ecos-config.cmake + DESTINATION share/ecos/ +) \ No newline at end of file diff --git a/ports/ecos/portfile.cmake b/ports/ecos/portfile.cmake new file mode 100644 index 00000000000000..213d3266f5a37b --- /dev/null +++ b/ports/ecos/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO embotech/ecos + REF v2.0.8 + SHA512 c1adb188d6b2c400f817de15272472adfd013e2a174f49ec0bb2f7f889f26ba2b7ea165d9bedac3031bd2da7a770f2a285ad825d5b22ccc6cf43c756a20f844f + HEAD_REF develop +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ecos RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/ecos") \ No newline at end of file diff --git a/ports/ecos/vcpkg.json b/ports/ecos/vcpkg.json new file mode 100644 index 00000000000000..a6e6dfbe0b517b --- /dev/null +++ b/ports/ecos/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "ecos", + "version-string": "2.0.8", + "port-version": 1, + "description": "A lightweight conic solver for second-order cone programming." +} diff --git a/ports/ecsutil/CONTROL b/ports/ecsutil/CONTROL deleted file mode 100644 index 9621f8781423be..00000000000000 --- a/ports/ecsutil/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ecsutil -Version: 1.0.7.2 -Description: Native Windows SDK for accessing ECS via the S3 HTTP protocol. -Build-Depends: atlmfc (windows) diff --git a/ports/ecsutil/NoLibSyms.patch b/ports/ecsutil/NoLibSyms.patch deleted file mode 100644 index e4f7e77bdfc7d8..00000000000000 --- a/ports/ecsutil/NoLibSyms.patch +++ /dev/null @@ -1,41 +0,0 @@ - ECSUtil/ECSUtil.vcxproj | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/ECSUtil/ECSUtil.vcxproj b/ECSUtil/ECSUtil.vcxproj -index 05c5726..4b5de57 100644 ---- a/ECSUtil/ECSUtil.vcxproj -+++ b/ECSUtil/ECSUtil.vcxproj -@@ -289,7 +289,7 @@ - true - false - false -- ProgramDatabase -+ None - - - Windows -@@ -317,7 +317,7 @@ - true - false - false -- ProgramDatabase -+ None - - - Windows -@@ -462,6 +462,7 @@ - true - false - false -+ None - - - Windows -@@ -493,6 +494,7 @@ - true - false - false -+ None - - - Windows diff --git a/ports/ecsutil/portfile.cmake b/ports/ecsutil/portfile.cmake index eeb9eca53ab3ac..5cbf085bf81e51 100644 --- a/ports/ecsutil/portfile.cmake +++ b/ports/ecsutil/portfile.cmake @@ -1,56 +1,47 @@ -include(vcpkg_common_functions) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(PLATFORM x86) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(PLATFORM x64) -else() - message(FATAL_ERROR "Unsupported architecture") -endif() - -if(VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "Unsupported platform. ECSUTIL currently only supports windows desktop.") -endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(ECSUtil_CONFIGURATION_RELEASE Release) - set(ECSUtil_CONFIGURATION_DEBUG Debug) -else() - if (VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(ECSUtil_CONFIGURATION_RELEASE "Release Lib") - set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib") - else() - set(ECSUtil_CONFIGURATION_RELEASE "Release Lib Static") - set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib Static") - endif() -endif() - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO EMCECS/ecs-object-client-windows-cpp - REF v1.0.7.2 - SHA512 2505db74b370271bd9ad8e73248e3d29384ad9a6f1c8246203abe82f99ea8f75419482031024127361358c339955fd2a029a5c77f5ce6e7a35c18f1fc0635c88 - HEAD_REF master - PATCHES NoLibSyms.patch -) - -vcpkg_install_msbuild( - SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH ECSUtil.sln - PLATFORM ${PLATFORM} - LICENSE_SUBPATH license.txt - TARGET ECSUtil - RELEASE_CONFIGURATION ${ECSUtil_CONFIGURATION_RELEASE} - DEBUG_CONFIGURATION ${ECSUtil_CONFIGURATION_DEBUG} -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -file(COPY ${SOURCE_PATH}/ECSUtil DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/ECSUtil/res ${CURRENT_PACKAGES_DIR}/tools) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/NatvisAddIn.dll ${CURRENT_PACKAGES_DIR}/debug/bin/NatvisAddIn.dll) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() + +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "UWP" "Linux" "OSX") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM x86) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(ECSUtil_CONFIGURATION_RELEASE Release) + set(ECSUtil_CONFIGURATION_DEBUG Debug) +else() + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(ECSUtil_CONFIGURATION_RELEASE "Release Lib") + set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib") + else() + set(ECSUtil_CONFIGURATION_RELEASE "Release Lib Static") + set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib Static") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO EMCECS/ecs-object-client-windows-cpp + REF af9fd3cc0be5eacfeb431ca4607d3b73dd318353 # v1.0.7.15 + SHA512 091f4b4870d5bdcbd46c35b2d75e927c9da69e2aba9a24b36504ab9fa3e33fba6eec2a8a5b649fc3ad793e3043c3f2702b753341f74d87de1a7f96c251839c69 + HEAD_REF master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH ECSUtil.sln + PLATFORM ${PLATFORM} + LICENSE_SUBPATH license.txt + TARGET ECSUtil + RELEASE_CONFIGURATION ${ECSUtil_CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${ECSUtil_CONFIGURATION_DEBUG} +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(COPY ${SOURCE_PATH}/ECSUtil DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/ECSUtil/res ${CURRENT_PACKAGES_DIR}/tools) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/NatvisAddIn.dll ${CURRENT_PACKAGES_DIR}/debug/bin/NatvisAddIn.dll) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() diff --git a/ports/ecsutil/vcpkg.json b/ports/ecsutil/vcpkg.json new file mode 100644 index 00000000000000..fc372275695bda --- /dev/null +++ b/ports/ecsutil/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "ecsutil", + "version-string": "1.0.7.15", + "port-version": 1, + "description": "Native Windows SDK for accessing ECS via the S3 HTTP protocol.", + "homepage": "https://github.com/EMCECS/ecs-object-client-windows-cpp", + "supports": "windows & (x64 | x86)", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + } + ] +} diff --git a/ports/edlib/fix-cmake-install.patch b/ports/edlib/fix-cmake-install.patch new file mode 100644 index 00000000000000..8081bba782c661 --- /dev/null +++ b/ports/edlib/fix-cmake-install.patch @@ -0,0 +1,64 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 767d808..21f0cfc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -74,14 +74,42 @@ if (NOT WIN32) # If on windows, do not build binaries that do not support window + target_link_libraries(edlib-aligner edlib) + endif() + +- +-# Create target 'install' for installing libraries. +-install(TARGETS edlib DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-install(FILES edlib/include/edlib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +- + # configure and install pkg-config file + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/edlib.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/edlib-1.pc + @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/edlib-1.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ ++### Additional config for VCPKG ++include(CMakePackageConfigHelpers) ++set(EDLIB_CMAKE_DIR "lib/cmake/edlib" CACHE STRING ++ "Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.") ++set(version_config "${PROJECT_BINARY_DIR}/edlib-config-version.cmake") ++set(project_config "${PROJECT_BINARY_DIR}/edlib-config.cmake") ++set(targets_export_name edlib-targets) ++ ++# Generate the version, config and target files into the build directory. ++write_basic_package_version_file( ++ ${version_config} ++ VERSION ${VERSION} ++ COMPATIBILITY AnyNewerVersion) ++configure_package_config_file( ++ ${PROJECT_SOURCE_DIR}/edlib-config.cmake.in ++ ${project_config} ++ INSTALL_DESTINATION ${EDLIB_CMAKE_DIR}) ++export(TARGETS edlib NAMESPACE edlib:: ++ FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake) ++ ++# Install version, config and target files. ++install( ++ FILES ${project_config} ${version_config} ++ DESTINATION ${EDLIB_CMAKE_DIR}) ++install(EXPORT ${targets_export_name} DESTINATION ${EDLIB_CMAKE_DIR} ++ NAMESPACE edlib::) ++ ++### // ++ ++# Create target 'install' for installing libraries. ++install(TARGETS edlib EXPORT ${targets_export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(FILES edlib/include/edlib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +\ No newline at end of file +diff --git a/edlib-config.cmake.in b/edlib-config.cmake.in +new file mode 100644 +index 0000000..f2cc030 +--- /dev/null ++++ b/edlib-config.cmake.in +@@ -0,0 +1,4 @@ ++@PACKAGE_INIT@ ++ ++include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake) ++check_required_components(edlib) +\ No newline at end of file diff --git a/ports/edlib/portfile.cmake b/ports/edlib/portfile.cmake new file mode 100644 index 00000000000000..788320015ec262 --- /dev/null +++ b/ports/edlib/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Martinsos/edlib + REF v1.2.6 + SHA512 75b470c1403113e5f0895b3c1bb4163e65c6e04ccf41a75297a5b4cc915a567567ebcc79f3b9ea74b5e7188adfab2eceda5ac75e2d861aef8b3fefc6d4f39200 + HEAD_REF master + PATCHES + fix-cmake-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/edlib) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/edlib/vcpkg.json b/ports/edlib/vcpkg.json new file mode 100644 index 00000000000000..1676dd9339786c --- /dev/null +++ b/ports/edlib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "edlib", + "version-string": "1.2.6", + "port-version": 1, + "description": "Lightweight, super fast C/C++ (& Python) library for sequence alignment using edit (Levenshtein) distance.", + "homepage": "https://github.com/Martinsos/edlib" +} diff --git a/ports/effects11/portfile.cmake b/ports/effects11/portfile.cmake new file mode 100644 index 00000000000000..e5ebf84abc7af0 --- /dev/null +++ b/ports/effects11/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install(ON_TARGET "LINUX" "OSX" "ANDROID") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/FX11 + REF feb2021 + SHA512 bdf35347582646e782c20a96180c8286786da46583527b76b2d348cd76a75285a31ebb88297962cd279c09bbd416c15c0d25ae91881ffebbf9e8ce2f21912f16 + HEAD_REF master + FILE_DISAMBIGUATOR 1 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/effects11/vcpkg.json b/ports/effects11/vcpkg.json new file mode 100644 index 00000000000000..4edddcd8d3cae0 --- /dev/null +++ b/ports/effects11/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "effects11", + "version": "11.26", + "port-version": 1, + "description": "Effects for Direct3D 11 (FX11) is a management runtime for authoring HLSL shaders, render state, and runtime variables together.", + "homepage": "https://github.com/Microsoft/FX11", + "documentation": "https://github.com/microsoft/FX11/wiki", + "license": "MIT", + "supports": "windows" +} diff --git a/ports/effolkronium-random/CONTROL b/ports/effolkronium-random/CONTROL deleted file mode 100644 index 77facd63b6b57f..00000000000000 --- a/ports/effolkronium-random/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: effolkronium-random -Version: 1.3.0 -Description: Random with a modern C++ API diff --git a/ports/effolkronium-random/portfile.cmake b/ports/effolkronium-random/portfile.cmake index d6e3cbba89e477..f5b283a1a1bd4f 100644 --- a/ports/effolkronium-random/portfile.cmake +++ b/ports/effolkronium-random/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO effolkronium/random - REF v1.3.0 - SHA512 68bd42e696a784832376950df7df9ddc8fc52ad073f44eddc7bcc2547278096ad3ec6463ce3a0e2e60a223e0852e68be4c2e9bcec4b237b9017ac2b03d5be812 + REF ead633a312d1a41baae72c22f0b2fd28b1853558 # v1.3.1 + SHA512 598e6edfc124f4619ea37292ea01c67ce87181476957137175cf9e9ca3c9cf44dfde3c2cebc0e57b4c8497058a320f8ce535f66bad5f8db5ceacc0cedd40936e HEAD_REF master ) diff --git a/ports/effolkronium-random/vcpkg.json b/ports/effolkronium-random/vcpkg.json new file mode 100644 index 00000000000000..39d13104477ee9 --- /dev/null +++ b/ports/effolkronium-random/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "effolkronium-random", + "version-string": "1.3.1", + "port-version": 1, + "description": "Random with a modern C++ API" +} diff --git a/ports/efsw/portfile.cmake b/ports/efsw/portfile.cmake new file mode 100644 index 00000000000000..289d4354d403a9 --- /dev/null +++ b/ports/efsw/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SpartanJ/efsw + REF b62d04829bb0a6f3cacc7859e0b046a3c053bc50 + SHA512 fc16ef6ad330941dc0a1112ce645b57bd126d353556d50f45fadf150f25edd42c1d4946bc54d629d94c208d67d4ce17dbf5d1079cbeed51f0f6b1ccbe2199132 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVERBOSE=OFF + -DBUILD_TEST_APP=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/efsw) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/efsw/vcpkg.json b/ports/efsw/vcpkg.json new file mode 100644 index 00000000000000..a001ada8f61327 --- /dev/null +++ b/ports/efsw/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "efsw", + "version-string": "2020-06-08", + "port-version": 2, + "description": "efsw is a C++ cross-platform file system watcher and notifier.", + "homepage": "https://github.com/SpartanJ/efsw", + "supports": "!uwp" +} diff --git a/ports/egl-registry/CONTROL b/ports/egl-registry/CONTROL deleted file mode 100644 index dc7cdec795e240..00000000000000 --- a/ports/egl-registry/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: egl-registry -Version: 2018-06-30-1 -Description: the EGL API and Extension Registry diff --git a/ports/egl-registry/portfile.cmake b/ports/egl-registry/portfile.cmake index ee6fc23dc8079a..bfdca5b71d7535 100644 --- a/ports/egl-registry/portfile.cmake +++ b/ports/egl-registry/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/EGL-Registry - REF e2562a9e7f567b837cdf96cf8b12e7fc0d88cc30 - SHA512 8c380c26f6afc0ce2ab2dd2fe834daae0d0dbe9e2bd55ab30c80f8dfa5e234f1902e5735c4d8acf016f03924a46431b9bb794bb77f1f091c56905a98c38f5d04 + REF 11478904448bbdf5757b798c856a525aa2b351b1 + SHA512 f1e54810cb2948e9d8798d65507069bba4ee6534d719e792db11e36d600ef37e59a34262809d8b1e41160ae1e45a283fa322cd9d9a647985c48a6d7d6d1706ee HEAD_REF master ) @@ -18,11 +16,11 @@ file( file( COPY ${SOURCE_PATH}/api/egl.xml - DESTINATION ${CURRENT_PACKAGES_DIR}/share/egl-registry + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} ) file( INSTALL ${SOURCE_PATH}/sdk/docs/man/copyright.xml - DESTINATION ${CURRENT_PACKAGES_DIR}/share/egl-registry + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright ) diff --git a/ports/egl-registry/vcpkg.json b/ports/egl-registry/vcpkg.json new file mode 100644 index 00000000000000..229edb6773d8dd --- /dev/null +++ b/ports/egl-registry/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "egl-registry", + "version-string": "2020-02-20", + "port-version": 1, + "description": "the EGL API and Extension Registry", + "homepage": "https://github.com/KhronosGroup/EGL-Registry" +} diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL deleted file mode 100644 index 898b9ae713d410..00000000000000 --- a/ports/eigen3/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: eigen3 -Version: 3.3.7-2 -Homepage: https://bitbucket.org/eigen/eigen -Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. diff --git a/ports/eigen3/disable_pkgconfig_absolute_path_check.patch b/ports/eigen3/disable_pkgconfig_absolute_path_check.patch new file mode 100644 index 00000000000000..cfa96434059774 --- /dev/null +++ b/ports/eigen3/disable_pkgconfig_absolute_path_check.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dbb9bcf..84c413c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -407,11 +407,13 @@ set(PKGCONFIG_INSTALL_DIR + CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where eigen3.pc is installed" + ) + ++if(0) + foreach(var INCLUDE_INSTALL_DIR CMAKEPACKAGE_INSTALL_DIR PKGCONFIG_INSTALL_DIR) + if(IS_ABSOLUTE "${${var}}") + message(FATAL_ERROR "${var} must be relative to CMAKE_PREFIX_PATH. Got: ${${var}}") + endif() + endforeach() ++endif() + + # similar to set_target_properties but append the property instead of overwriting it + macro(ei_add_target_property target prop value) diff --git a/ports/eigen3/fix-cuda-error.patch b/ports/eigen3/fix-cuda-error.patch new file mode 100644 index 00000000000000..9123806df07563 --- /dev/null +++ b/ports/eigen3/fix-cuda-error.patch @@ -0,0 +1,30 @@ +diff --git a/Eigen/src/Core/arch/CUDA/Half.h b/Eigen/src/Core/arch/CUDA/Half.h +index 755e620..85e445b 100644 +--- a/Eigen/src/Core/arch/CUDA/Half.h ++++ b/Eigen/src/Core/arch/CUDA/Half.h +@@ -209,7 +209,11 @@ namespace half_impl { + // conversion steps back and forth. + + EIGEN_STRONG_INLINE __device__ half operator + (const half& a, const half& b) { ++#if defined(EIGEN_CUDACC_VER) && EIGEN_CUDACC_VER >= 90000 ++ return __hadd(::__half(a), ::__half(b)); ++#else + return __hadd(a, b); ++#endif + } + EIGEN_STRONG_INLINE __device__ half operator * (const half& a, const half& b) { + return __hmul(a, b); +@@ -218,9 +222,13 @@ EIGEN_STRONG_INLINE __device__ half operator - (const half& a, const half& b) { + return __hsub(a, b); + } + EIGEN_STRONG_INLINE __device__ half operator / (const half& a, const half& b) { ++#if defined(EIGEN_CUDACC_VER) && EIGEN_CUDACC_VER >= 90000 ++ return __hdiv(a, b); ++#else + float num = __half2float(a); + float denom = __half2float(b); + return __float2half(num / denom); ++#endif + } + EIGEN_STRONG_INLINE __device__ half operator - (const half& a) { + return __hneg(a); diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake index ef613537363afa..4b1a74f9ebd8f1 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -1,18 +1,15 @@ -include(vcpkg_common_functions) +vcpkg_buildpath_length_warning(37) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() - -vcpkg_from_github( +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com OUT_SOURCE_PATH SOURCE_PATH - REPO eigenteam/eigen-git-mirror - REF 3.3.7 - SHA512 270ab9b5c22e09aa0e70d1a26995523c5c21fb0f09da45c137c11ab4c7700fe2bdb2b343c1e063bea4be5ae61d2313ff29ebbcad519dc355a568792b4a6e9e48 + REPO libeigen/eigen + REF 3.3.9 + SHA512 16244cc89f2e1879543232b965cbf653b3ccf10e967c8c437a41e27d8320392bdf584d8c24b8a97406ab7d1481d5154da74e0702ec1334ae6a46de83f4573a46 HEAD_REF master + PATCHES + disable_pkgconfig_absolute_path_check.patch + fix-cuda-error.patch # issue https://gitlab.com/libeigen/eigen/-/issues/1526 ) vcpkg_configure_cmake( @@ -20,24 +17,22 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBUILD_TESTING=OFF + -DEIGEN_BUILD_PKGCONFIG=ON OPTIONS_RELEASE -DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/eigen3 + -DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib/pkgconfig OPTIONS_DEBUG -DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/share/eigen3 + -DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ) vcpkg_install_cmake() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) - -file(READ "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" EIGEN_TARGETS) -string(REPLACE "set(_IMPORT_PREFIX " "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE) #" EIGEN_TARGETS "${EIGEN_TARGETS}") -file(WRITE "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" "${EIGEN_TARGETS}") +vcpkg_fixup_cmake_targets() +vcpkg_fixup_pkgconfig() file(GLOB INCLUDES ${CURRENT_PACKAGES_DIR}/include/eigen3/*) # Copy the eigen header files to conventional location for user-wide MSBuild integration file(COPY ${INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -# Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/COPYING.README DESTINATION ${CURRENT_PACKAGES_DIR}/share/eigen3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/eigen3/COPYING.README ${CURRENT_PACKAGES_DIR}/share/eigen3/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/eigen3/vcpkg.json b/ports/eigen3/vcpkg.json new file mode 100644 index 00000000000000..bf355b87c9e16e --- /dev/null +++ b/ports/eigen3/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "eigen3", + "version-string": "3.3.9", + "port-version": 1, + "description": "C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.", + "homepage": "http://eigen.tuxfamily.org" +} diff --git a/ports/elfio/portfile.cmake b/ports/elfio/portfile.cmake new file mode 100644 index 00000000000000..cee90231bbd68a --- /dev/null +++ b/ports/elfio/portfile.cmake @@ -0,0 +1,17 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO serge1/ELFIO + REF Release_3.9 + SHA512 479c4132ac3575940bd1e8190ba5253e54ae57f38319d7bca75ea85ee2f744f5d5b460d2d4ceb17eca0d0561c6e281673f050bbdab2f5ff526c031c220876bf1) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}/cmake) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/elfio/vcpkg.json b/ports/elfio/vcpkg.json new file mode 100644 index 00000000000000..c49ffbe49529fc --- /dev/null +++ b/ports/elfio/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "elfio", + "version": "3.9", + "description": "A header-only C++ library intended for reading and generating files in the ELF binary format.", + "homepage": "https://github.com/serge1/ELFIO" +} diff --git a/ports/elfutils/configure.ac.patch b/ports/elfutils/configure.ac.patch new file mode 100644 index 00000000000000..f3372b01626ed8 --- /dev/null +++ b/ports/elfutils/configure.ac.patch @@ -0,0 +1,49 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index e462e7d7a..7f68d0348 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -41,8 +41,8 @@ CLEANFILES += make-debug-archive + + if BUILD_STATIC + libasm = ../libasm/libasm.a +-libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread +-libelf = ../libelf/libelf.a -lz ++libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) -ldl -lpthread ++libelf = ../libelf/libelf.a $(zip_LIBS) + else + libasm = ../libasm/libasm.so + libdw = ../libdw/libdw.so +diff --git a/configure.ac b/configure.ac +index 5a2dc373e..b1928831e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -383,7 +383,7 @@ AM_CONDITIONAL(TESTS_RPATH, test "$tests_use_rpath" = yes) + dnl zlib is mandatory. + save_LIBS="$LIBS" + LIBS= +-eu_ZIPLIB(zlib,ZLIB,z,gzdirect,gzip) ++eu_ZIPLIB(zlib,ZLIB,[z zlib zlibd],gzdirect,gzip) + AS_IF([test "x$with_zlib" = xno], [AC_MSG_ERROR([zlib not found but is required])]) + LIBS="$save_LIBS" + +@@ -391,13 +391,13 @@ dnl Test for bzlib and xz/lzma, gives BZLIB/LZMALIB .am + dnl conditional and config.h USE_BZLIB/USE_LZMALIB/USE_ZSTD #define. + save_LIBS="$LIBS" + LIBS= +-eu_ZIPLIB(bzlib,BZLIB,bz2,BZ2_bzdopen,bzip2) ++eu_ZIPLIB(bzlib,BZLIB,[bz2 bz2d],BZ2_bzdopen,bzip2) + # We need this since bzip2 doesn't have a pkgconfig file. + BZ2_LIB="$LIBS" + AC_SUBST([BZ2_LIB]) +-eu_ZIPLIB(lzma,LZMA,lzma,lzma_auto_decoder,[LZMA (xz)]) ++eu_ZIPLIB(lzma,LZMA,[lzma lzmad],lzma_auto_decoder,[LZMA (xz)]) + AS_IF([test "x$with_lzma" = xyes], [LIBLZMA="liblzma"], [LIBLZMA=""]) + AC_SUBST([LIBLZMA]) +-eu_ZIPLIB(zstd,ZSTD,zstd,ZSTD_decompress,[ZSTD (zst)]) ++eu_ZIPLIB(zstd,ZSTD,[zstd zstdd zstd_static zstd_staticd],ZSTD_decompress,[ZSTD (zst)]) + AS_IF([test "x$with_zstd" = xyes], [LIBZSTD="libzstd"], [LIBLZSTD=""]) + AC_SUBST([LIBZSTD]) +-zip_LIBS="$LIBS" ++zip_LIBS="$LIBS $ac_cv_search_lzma_auto_decoder $ac_cv_search_BZ2_bzdopen $ac_cv_search_gzdirect $ac_cv_search_ZSTD_decompress" + LIBS="$save_LIBS" + AC_SUBST([zip_LIBS]) diff --git a/ports/elfutils/portfile.cmake b/ports/elfutils/portfile.cmake new file mode 100644 index 00000000000000..7b7aae50e13240 --- /dev/null +++ b/ports/elfutils/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://sourceware.org/git/elfutils + REF 25d048684a82f9ba701c6939b7f28c3543bb7991 #elfutils-0.182 + + PATCHES configure.ac.patch +) + +vcpkg_find_acquire_program(FLEX) +get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY ) +vcpkg_add_to_path(PREPEND "${FLEX_DIR}") +vcpkg_find_acquire_program(BISON) +get_filename_component(BISON_DIR "${BISON}" DIRECTORY ) +vcpkg_add_to_path(PREPEND "${BISON_DIR}") + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS --disable-debuginfod + --enable-libdebuginfod=dummy + --with-zlib + --with-bzlib + --with-lzma + --with-zstd + --enable-maintainer-mode + OPTIONS_RELEASE + ac_cv_null_dereference=no # deactivating Werror due to null dereferences since NDEBUG is passed and asserts thus disabled/removed +) + +vcpkg_install_make() +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libdebuginfod.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libdebuginfod.pc") #--disable-debuginfod +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/locale) + +# Remove files with wrong linkage +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(_lib_suffix "${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") +else() + set(_lib_suffix "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") +endif() +file(GLOB_RECURSE TO_REMOVE "${CURRENT_PACKAGES_DIR}/lib/*${_lib_suffix}" "${CURRENT_PACKAGES_DIR}/debug/lib/*${_lib_suffix}") +file(REMOVE ${TO_REMOVE}) + +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static OR NOT VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() diff --git a/ports/elfutils/vcpkg.json b/ports/elfutils/vcpkg.json new file mode 100644 index 00000000000000..ba686648fb8fd4 --- /dev/null +++ b/ports/elfutils/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "elfutils", + "version-string": "0.182", + "port-version": 1, + "description": "elfutils is a collection of utilities and libraries to read, create and modify ELF binary files, find and handle DWARF debug data, symbols, thread state and stacktraces for processes and core files on GNU/Linux.", + "homepage": "https://sourceware.org/elfutils/", + "supports": "!windows", + "dependencies": [ + "bzip2", + "liblzma", + "zlib", + "zstd" + ] +} diff --git a/ports/embree2/CONTROL b/ports/embree2/CONTROL deleted file mode 100644 index 0fe3df484025aa..00000000000000 --- a/ports/embree2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: embree2 -Version: 2.17.7 -Homepage: https://github.com/embree/embree -Description: High Performance Ray Tracing Kernels. -Build-Depends: tbb diff --git a/ports/embree2/cmake_policy.patch b/ports/embree2/cmake_policy.patch new file mode 100644 index 00000000000000..ed4d339e380569 --- /dev/null +++ b/ports/embree2/cmake_policy.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index afa704d..96dc4f8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,6 +57,9 @@ IF(COMMAND cmake_policy) + if (POLICY CMP0042) + cmake_policy(SET CMP0042 OLD) + endif() ++ if (POLICY CMP0001) ++ cmake_policy(SET CMP0001 OLD) ++ endif() + ENDIF(COMMAND cmake_policy) + + MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY) diff --git a/ports/embree2/portfile.cmake b/ports/embree2/portfile.cmake index 446f379f0650ec..fc1e8384ea7745 100644 --- a/ports/embree2/portfile.cmake +++ b/ports/embree2/portfile.cmake @@ -1,28 +1,25 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO embree/embree REF v2.17.7 SHA512 3ea548e5ed85f68dc1f9dfe864711f9b731e0df8a2258257f77db08bbdbe3a9014a626313e3ff41174f3b26f09dc8ff523900119ff4c8465bfff53f621052873 HEAD_REF devel2 + PATCHES + cmake_policy.patch ) -file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake) +file(REMOVE "${SOURCE_PATH}/common/cmake/FindTBB.cmake") -if(VCPKG_CRT_LINKAGE STREQUAL static) - set(EMBREE_STATIC_RUNTIME ON) -else() - set(EMBREE_STATIC_RUNTIME OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" EMBREE_STATIC_LIB) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" EMBREE_STATIC_RUNTIME) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" DISABLE_PARALLEL_CONFIGURE - PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DEMBREE_ISPC_SUPPORT=OFF -DEMBREE_TUTORIALS=OFF + -DEMBREE_STATIC_LIB=${EMBREE_STATIC_LIB} -DEMBREE_STATIC_RUNTIME=${EMBREE_STATIC_RUNTIME} "-DTBB_LIBRARIES=TBB::tbb" "-DTBB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include" @@ -30,23 +27,27 @@ vcpkg_configure_cmake( # just wait, the release build of embree is insanely slow in MSVC # a single file will took about 2-10 min -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() # these cmake files do not seem to contain helpful configuration for find libs, just remove them -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config-version.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config-version.cmake) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/models) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/models) - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/embree2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree2/doc) - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/embree2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/embree2/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/embree2/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/embree-config.cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/embree-config-version.cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/embree-config.cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/embree-config-version.cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake" "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/uninstall.command" "${CURRENT_PACKAGES_DIR}/debug/uninstall.command") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/models") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/models") + +if("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/embree2") +file(RENAME "${CURRENT_PACKAGES_DIR}/share/doc" "${CURRENT_PACKAGES_DIR}/share/embree2/doc") + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/embree2/vcpkg.json b/ports/embree2/vcpkg.json new file mode 100644 index 00000000000000..e7fdad98dc3a0f --- /dev/null +++ b/ports/embree2/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "embree2", + "version-semver": "2.17.7", + "port-version": 3, + "description": "High Performance Ray Tracing Kernels.", + "homepage": "https://github.com/embree/embree", + "dependencies": [ + "tbb", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/embree3/CONTROL b/ports/embree3/CONTROL deleted file mode 100644 index 77d06de9b072d3..00000000000000 --- a/ports/embree3/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: embree3 -Version: 3.5.2 -Description: High Performance Ray Tracing Kernels. -Build-Depends: tbb diff --git a/ports/embree3/cmake_policy.patch b/ports/embree3/cmake_policy.patch new file mode 100644 index 00000000000000..0ae3a074da8927 --- /dev/null +++ b/ports/embree3/cmake_policy.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06f49a8..fdaaee7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -69,6 +69,9 @@ IF(COMMAND cmake_policy) + if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) + endif() ++ if (POLICY CMP0001) ++ cmake_policy(SET CMP0001 OLD) ++ endif() + ENDIF(COMMAND cmake_policy) + + MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY) diff --git a/ports/embree3/fix-path.patch b/ports/embree3/fix-path.patch new file mode 100755 index 00000000000000..80b4b5be22ab69 --- /dev/null +++ b/ports/embree3/fix-path.patch @@ -0,0 +1,85 @@ +diff --git a/common/algorithms/CMakeLists.txt b/common/algorithms/CMakeLists.txt +index 680c3ec..fea4a37 100644 +--- a/common/algorithms/CMakeLists.txt ++++ b/common/algorithms/CMakeLists.txt +@@ -20,8 +20,11 @@ SET_PROPERTY(TARGET algorithms APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}") + # ideally we would use target_link_libraries to provide the algorithms target + # with the TBB include directory information. Howeve, this is only possible in + # very recent versions of TBB and therefore we use the target property instead ++if (0) + GET_TARGET_PROPERTY(tasking_include_dirs tasking INCLUDE_DIRECTORIES) + if (tasking_include_dirs) + TARGET_INCLUDE_DIRECTORIES(algorithms PUBLIC "${tasking_include_dirs}") + GET_TARGET_PROPERTY(algorithms_include_dirs algorithms INCLUDE_DIRECTORIES) + endif() ++endif() ++TARGET_LINK_LIBRARIES(algorithms PUBLIC tasking) +\ No newline at end of file +diff --git a/common/cmake/embree-config.cmake b/common/cmake/embree-config.cmake +index 2c08cd7..5087ca0 100644 +--- a/common/cmake/embree-config.cmake ++++ b/common/cmake/embree-config.cmake +@@ -5,8 +5,6 @@ SET(EMBREE_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/@EMBREE_RELATIVE_ROOT_DIR@) + GET_FILENAME_COMPONENT(EMBREE_ROOT_DIR "${EMBREE_ROOT_DIR}" ABSOLUTE) + + SET(EMBREE_INCLUDE_DIRS ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_INCLUDEDIR@) +-SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_FULLNAME@) +-SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY}) + + SET(EMBREE_VERSION @EMBREE_VERSION@) + SET(EMBREE_VERSION_MAJOR @EMBREE_VERSION_MAJOR@) +@@ -22,7 +20,6 @@ SET(EMBREE_ISA_AVX2 @EMBREE_ISA_AVX2@) + SET(EMBREE_ISA_AVX512 @EMBREE_ISA_AVX512@) + SET(EMBREE_ISA_AVX512SKX @EMBREE_ISA_AVX512@) # just for compatibility + +-SET(EMBREE_BUILD_TYPE @CMAKE_BUILD_TYPE@) + SET(EMBREE_ISPC_SUPPORT @EMBREE_ISPC_SUPPORT@) + SET(EMBREE_STATIC_LIB @EMBREE_STATIC_LIB@) + SET(EMBREE_TUTORIALS @EMBREE_TUTORIALS@) +@@ -54,8 +51,6 @@ IF (EMBREE_STATIC_LIB) + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/lexers-targets.cmake") + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/tasking-targets.cmake") + +- add_library(TBB::tbb SHARED IMPORTED) +- set_target_properties(TBB::tbb PROPERTIES IMPORTED_LOCATION "${EMBREE_ROOT_DIR}/@EMBREE_INSTALLED_TBB@") + + ENDIF() + +diff --git a/common/cmake/package.cmake b/common/cmake/package.cmake +index 5429436..8c89f5b 100644 +--- a/common/cmake/package.cmake ++++ b/common/cmake/package.cmake +@@ -24,7 +24,7 @@ ENDIF() + # Install MSVC runtime + ############################################################## + +-IF (WIN32) ++IF (0) + SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) + INCLUDE(InstallRequiredSystemLibraries) + LIST(FILTER CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS INCLUDE REGEX ".*msvcp[0-9]+\.dll|.*vcruntime[0-9]+\.dll|.*vcruntime[0-9]+_[0-9]+\.dll") +diff --git a/common/tasking/CMakeLists.txt b/common/tasking/CMakeLists.txt +index 3085096..258d24e 100644 +--- a/common/tasking/CMakeLists.txt ++++ b/common/tasking/CMakeLists.txt +@@ -10,7 +10,7 @@ ELSEIF (TASKING_TBB) + if (NOT ${EMBREE_TBB_ROOT} STREQUAL "") + set(TBB_ROOT ${EMBREE_TBB_ROOT}) + endif() +- FIND_PACKAGE(TBB REQUIRED tbb) ++ FIND_PACKAGE(TBB CONFIG REQUIRED tbb) + + ############################################################## + # Create tasking target and link against TBB. Also set include directory +@@ -18,10 +18,7 @@ ELSEIF (TASKING_TBB) + # with the TBB header files + ############################################################## + ADD_LIBRARY(tasking STATIC taskschedulertbb.cpp) +- TARGET_LINK_LIBRARIES(tasking PUBLIC TBB) +- TARGET_INCLUDE_DIRECTORIES(tasking PUBLIC "${TBB_INCLUDE_DIRS}") +- +- include(installTBB) ++ TARGET_LINK_LIBRARIES(tasking PUBLIC TBB::tbb) + + ELSEIF (TASKING_PPL) + ADD_LIBRARY(tasking STATIC taskschedulerppl.cpp) diff --git a/ports/embree3/fix-static-usage.patch b/ports/embree3/fix-static-usage.patch new file mode 100644 index 00000000000000..28e1e28b35b36b --- /dev/null +++ b/ports/embree3/fix-static-usage.patch @@ -0,0 +1,26 @@ +diff --git a/common/cmake/embree-config.cmake b/common/cmake/embree-config.cmake +index 5087ca0..fdf8135 100644 +--- a/common/cmake/embree-config.cmake ++++ b/common/cmake/embree-config.cmake +@@ -52,6 +52,21 @@ IF (EMBREE_STATIC_LIB) + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/tasking-targets.cmake") + + ++ IF(EMBREE_ISA_SSE42) ++ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_sse42-targets.cmake") ++ ENDIF() ++ IF(EMBREE_ISA_AVX) ++ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx-targets.cmake") ++ ENDIF() ++ IF(EMBREE_ISA_AVX2) ++ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx2-targets.cmake") ++ ENDIF() ++ IF(EMBREE_ISA_AVX512KNL) ++ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx512knl-targets.cmake") ++ ENDIF() ++ IF(EMBREE_ISA_AVX512SKX) ++ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx512skx-targets.cmake") ++ ENDIF() + ENDIF() + + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree-targets.cmake") diff --git a/ports/embree3/fix-targets-file-not-found.patch b/ports/embree3/fix-targets-file-not-found.patch new file mode 100644 index 00000000000000..91665d552b4448 --- /dev/null +++ b/ports/embree3/fix-targets-file-not-found.patch @@ -0,0 +1,18 @@ +diff --git a/common/cmake/package.cmake b/common/cmake/package.cmake +index 8c89f5b..55cb2af 100644 +--- a/common/cmake/package.cmake ++++ b/common/cmake/package.cmake +@@ -114,10 +114,10 @@ ENDIF() + # SET(EMBREE_CMAKEEXPORT_DIR "cmake") + # SET(EMBREE_RELATIVE_ROOT_DIR ".") + #ELSE() +-SET(EMBREE_CMAKECONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}") +-SET(EMBREE_CMAKEEXPORT_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}") ++SET(EMBREE_CMAKECONFIG_DIR "share/embree") ++SET(EMBREE_CMAKEEXPORT_DIR "share/embree") + IF (WIN32) +- SET(EMBREE_RELATIVE_ROOT_DIR "../../../") ++ SET(EMBREE_RELATIVE_ROOT_DIR "../..") + ELSE() + FILE(RELATIVE_PATH EMBREE_RELATIVE_ROOT_DIR "/${EMBREE_CMAKECONFIG_DIR}" "/") + ENDIF() diff --git a/ports/embree3/portfile.cmake b/ports/embree3/portfile.cmake old mode 100644 new mode 100755 index 142be6cd6e38e3..8134b25d8512a1 --- a/ports/embree3/portfile.cmake +++ b/ports/embree3/portfile.cmake @@ -1,52 +1,77 @@ -include(vcpkg_common_functions) +set(EMBREE3_VERSION 3.12.2) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO embree/embree - REF v3.5.2 - SHA512 f00403c8bc76428088a38990117245b5b11ac90a2df21fa12c2d5c2e8af45fb3708abb705c612e0d9d7b0cfe4edb51c8b9630b60081b39fcb4370f31ee37acc7 + REF v${EMBREE3_VERSION} + SHA512 a63b483a92f4653e07a21ed3b545d86003295e0aacd8ec7a40ee72bad7bb70c6ea019af511e78c5c598336b162d53e296e9c87150c0adce6463b058e7a5394d4 HEAD_REF master + PATCHES + fix-path.patch + fix-static-usage.patch + cmake_policy.patch + fix-targets-file-not-found.patch ) -file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake) +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} static EMBREE_STATIC_LIB) +string(COMPARE EQUAL ${VCPKG_CRT_LINKAGE} static EMBREE_STATIC_RUNTIME) -if(VCPKG_CRT_LINKAGE STREQUAL static) - set(EMBREE_STATIC_RUNTIME ON) -else() - set(EMBREE_STATIC_RUNTIME OFF) +if (NOT VCPKG_TARGET_IS_OSX) + if ("avx512" IN_LIST FEATURES) + message(FATAL_ERROR "Microsoft Visual C++ Compiler does not support feature avx512 officially.") + endif() + + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + avx EMBREE_ISA_AVX + avx2 EMBREE_ISA_AVX2 + avx512 EMBREE_ISA_AVX512 + sse2 EMBREE_ISA_SSE2 + sse42 EMBREE_ISA_SSE42 + ) +elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(LENGTH FEATURES FEATURE_COUNT) + if (FEATURE_COUNT GREATER 2) + message(WARNING [[ +Using Embree as static library is not supported with AppleClang >= 9.0 when multiple ISAs are selected. +Please install embree3 with only one feature using command "./vcpkg install embree3[core,FEATURE_NAME]" +Only set feature avx automaticlly. + ]]) + set(FEATURE_OPTIONS + -DEMBREE_ISA_AVX=ON + -DEMBREE_ISA_AVX2=OFF + -DEMBREE_ISA_AVX512=OFF + -DEMBREE_ISA_SSE2=OFF + -DEMBREE_ISA_SSE42=OFF + ) + endif() endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} DISABLE_PARALLEL_CONFIGURE - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} -DEMBREE_ISPC_SUPPORT=OFF -DEMBREE_TUTORIALS=OFF -DEMBREE_STATIC_RUNTIME=${EMBREE_STATIC_RUNTIME} - "-DTBB_LIBRARIES=TBB::tbb" - "-DTBB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include" + -DEMBREE_STATIC_LIB=${EMBREE_STATIC_LIB} ) -# just wait, the release build of embree is insanely slow in MSVC -# a single file will took about 2-10 min vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/embree TARGET_PATH share/embree) -# these cmake files do not seem to contain helpful configuration for find libs, just remove them -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config-version.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config-version.cmake) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/models) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/models) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/embree3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree3/doc) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() +if(APPLE) + file(REMOVE "${CURRENT_PACKAGES_DIR}/uninstall.command" "${CURRENT_PACKAGES_DIR}/debug/uninstall.command") +endif() +file(RENAME "${CURRENT_PACKAGES_DIR}/share/doc" "${CURRENT_PACKAGES_DIR}/share/${PORT}/") -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/embree3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/embree3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/embree3/copyright) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/embree3/usage b/ports/embree3/usage new file mode 100755 index 00000000000000..8622f121d74664 --- /dev/null +++ b/ports/embree3/usage @@ -0,0 +1,4 @@ +The package embree3 provides CMake targets: + + find_package(embree 3 CONFIG REQUIRED) + target_link_libraries(main PRIVATE embree) diff --git a/ports/embree3/vcpkg.json b/ports/embree3/vcpkg.json new file mode 100644 index 00000000000000..80e51d51436e94 --- /dev/null +++ b/ports/embree3/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "embree3", + "version-semver": "3.12.2", + "port-version": 2, + "description": "High Performance Ray Tracing Kernels.", + "homepage": "https://github.com/embree/embree", + "dependencies": [ + "tbb" + ], + "default-features": [ + "avx", + "avx2", + "sse2", + "sse42" + ], + "features": { + "avx": { + "description": "Enables AVX ISA." + }, + "avx2": { + "description": "Enables AVX2 ISA." + }, + "avx512": { + "description": "Enables AVX512 ISA." + }, + "sse2": { + "description": "Enables SSE2 ISA." + }, + "sse42": { + "description": "Enables SSE4.2 ISA." + } + } +} diff --git a/ports/enet/CONTROL b/ports/enet/CONTROL deleted file mode 100644 index 7d2a87bf5e3d27..00000000000000 --- a/ports/enet/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: enet -Version: 1.3.13 -Homepage: https://github.com/lsalzman/enet -Description: Reliable UDP networking library - diff --git a/ports/enet/portfile.cmake b/ports/enet/portfile.cmake index 2a7fa4585c35d4..065a00ba9e4e3b 100644 --- a/ports/enet/portfile.cmake +++ b/ports/enet/portfile.cmake @@ -1,21 +1,8 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO "lsalzman/enet" - REF f7c46f03fd8d883ac2811948aa71c7623069d070 + REF e0e7045b7e056b454b5093cb34df49dc4cee0bee # v1.3.17 HEAD_REF master - SHA512 2d5593ea56473b38479921fd0849318bf3ecb233f92fa487ba395a0bb7e6a3997109287867a67c66721f761a30cceab4ba4709080a93ed977b7650b10cab1936 + SHA512 006a78edcc2059d8cee47a163d308dd02120a54f9c203401b83eb6cb4ab3e56cf09988d3c35b436a1e9f74c01296995ae6fdd46f6d354fe8261cf19cdde3df5d ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -32,7 +19,6 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/enet RENAME copyright) +vcpkg_copy_pdbs() -vcpkg_copy_pdbs() \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/enet/vcpkg.json b/ports/enet/vcpkg.json new file mode 100644 index 00000000000000..3b920e909a7425 --- /dev/null +++ b/ports/enet/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "enet", + "version": "1.3.17", + "description": "Reliable UDP networking library", + "homepage": "https://github.com/lsalzman/enet" +} diff --git a/ports/ensmallen/CONTROL b/ports/ensmallen/CONTROL deleted file mode 100644 index 024a7617bdd2b9..00000000000000 --- a/ports/ensmallen/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: ensmallen -Version: 1.15.1 -Description: A header-only C++ library for mathematical optimization. -Build-Depends: openblas (!osx), clapack (!osx), armadillo - diff --git a/ports/ensmallen/disable_tests.patch b/ports/ensmallen/disable_tests.patch deleted file mode 100644 index 80dd7e8691071c..00000000000000 --- a/ports/ensmallen/disable_tests.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1577be5..b0171b2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -57,6 +57,7 @@ install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/ensmallen_bits" - install(FILES ${CMAKE_SOURCE_DIR}/include/ensmallen.hpp - DESTINATION "${CMAKE_INSTALL_PREFIX}/include") - --enable_testing() -- --add_subdirectory(tests) -+# Disable tests -+#enable_testing() -+# -+#add_subdirectory(tests) diff --git a/ports/ensmallen/portfile.cmake b/ports/ensmallen/portfile.cmake index edded904a59a17..2e1a71e1e123a6 100644 --- a/ports/ensmallen/portfile.cmake +++ b/ports/ensmallen/portfile.cmake @@ -1,21 +1,21 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mlpack/ensmallen - REF 8bea8d214b40be3cb42e817328c0791541fbcd6c - SHA512 b075b763c136c1d2d5088c533a8557e3d425da7bcfeb3748063c1e3225e58969eddfc5bd786cb02f29f71ea5e3288327481a0961f64b1d2ff1251a0f59c07779 + REF 9bd4bc25275066fa03173f65e1cbd789472e8f9b # 2.17.0 + SHA512 8b665e6307e73ad3273eb28c17ec62e8d0d968623d41b5460771be41a74f6a8088ddadb1764b9b4dc496dbceae6e791895cee0997de8614dc9a7426b6db663e0 HEAD_REF master - PATCHES - disable_tests.patch ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() -file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ensmallen RENAME copyright) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ensmallen) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL "${SOURCE_PATH}/COPYRIGHT.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ensmallen/vcpkg.json b/ports/ensmallen/vcpkg.json new file mode 100644 index 00000000000000..f5648353cbf4b3 --- /dev/null +++ b/ports/ensmallen/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "ensmallen", + "version-semver": "2.17.0", + "description": "A header-only C++ library for mathematical optimization", + "homepage": "https://github.com/mlpack/ensmallen", + "dependencies": [ + "armadillo", + "blas", + "lapack", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/entityx/CONTROL b/ports/entityx/CONTROL deleted file mode 100644 index 9585262b88c88f..00000000000000 --- a/ports/entityx/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: entityx -Version: 1.3.0-1 -Description: EntityX - A fast, type-safe C++ Entity-Component system. -Homepage: https://github.com/alecthomas/entityx diff --git a/ports/entityx/enable-std14.patch b/ports/entityx/enable-std14.patch deleted file mode 100644 index 06eff08ee8e5be..00000000000000 --- a/ports/entityx/enable-std14.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 23f5063..1fa10b8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -24,6 +24,7 @@ set(ENTITYX_BUILD_SHARED true CACHE BOOL "Build shared libraries?") - include(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) - include(CheckCXXSourceCompiles) - -+set(CMAKE_CXX_STANDARD 14) - # Default compiler args - if(0) - if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "(GNU|.*Clang)") diff --git a/ports/entityx/portfile.cmake b/ports/entityx/portfile.cmake index b55f5f602a3b7e..d0f83eef4f08d3 100644 --- a/ports/entityx/portfile.cmake +++ b/ports/entityx/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -8,8 +6,6 @@ vcpkg_from_github( REF 1.3.0 SHA512 724a3f421f802e60a1106ff8a69435c9a9da14e35c3e88565bbc17bff3a17f2d9771818aac83320cc4f14de0ec770a66f1eb7cbf4318f43abd516c63e077c07d HEAD_REF master - PATCHES - enable-std14.patch ) vcpkg_configure_cmake( diff --git a/ports/entityx/vcpkg.json b/ports/entityx/vcpkg.json new file mode 100644 index 00000000000000..101eb1fa0b6cfa --- /dev/null +++ b/ports/entityx/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "entityx", + "version-string": "1.3.0", + "port-version": 3, + "description": "EntityX - A fast, type-safe C++ Entity-Component system.", + "homepage": "https://github.com/alecthomas/entityx" +} diff --git a/ports/entt/CONTROL b/ports/entt/CONTROL deleted file mode 100644 index 4ce029aef9514e..00000000000000 --- a/ports/entt/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: entt -Version: 3.0.0-1 -Description: Gaming meets modern C++ - a fast and reliable entity-component system and much more. -Homepage: https://github.com/skypjack/entt diff --git a/ports/entt/portfile.cmake b/ports/entt/portfile.cmake index 3aed9147fea384..f683c1a096f7f8 100644 --- a/ports/entt/portfile.cmake +++ b/ports/entt/portfile.cmake @@ -1,20 +1,25 @@ -#header-only library -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO skypjack/entt - REF v3.0.0 - SHA512 4c68d202bf00cb3f317bcf6e3c0d281e97718f6e4e198b2e280ec8bbfb7d1493e369ec30d2aea40aec3dbb5715a03bf445d1ea4f033621531e63998800bf2564 - HEAD_REF master -) +if ("experimental" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skypjack/entt + HEAD_REF experimental + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skypjack/entt + REF 2d5a3f24aa6dc38ed0c4eee9d4d625586d8e921e #v3.8.0 + SHA512 36b7be2550be5a919548e5c91db218ed9b062804d4f43073d6fc6b432fa2d358b5d36098490359ca2392370b2bf1b99d20e564504eaac619f5cd7f9612d91e2e + HEAD_REF master + ) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} DISABLE_PARALLEL_CONFIGURE PREFER_NINJA OPTIONS - -DBUILD_TESTING=OFF + -DENTT_BUILD_TESTING=OFF ) vcpkg_install_cmake() @@ -22,10 +27,10 @@ vcpkg_install_cmake() if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/entt) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/EnTT/cmake) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/entt RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/entt/vcpkg.json b/ports/entt/vcpkg.json new file mode 100644 index 00000000000000..43beae304f298c --- /dev/null +++ b/ports/entt/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "entt", + "version": "3.8.0", + "port-version": 1, + "description": "Gaming meets modern C++ - a fast and reliable entity-component system and much more", + "homepage": "https://github.com/skypjack/entt", + "features": { + "experimental": { + "description": "Use experimental features right away" + } + } +} diff --git a/ports/epsilon/0003-Fix-build-error.patch b/ports/epsilon/0003-Fix-build-error.patch new file mode 100644 index 00000000000000..73309b74785e28 --- /dev/null +++ b/ports/epsilon/0003-Fix-build-error.patch @@ -0,0 +1,52 @@ +diff --git a/makefile.vc b/makefile.vc +index cd0fc5a..7ce6861 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -32,6 +32,12 @@ epsilon.lib: $(LIBOBJ) + + $(EPSILON_DLL): epsilon_i.lib + ++!IFNDEF DEBUG ++POPTLIB=$(LIBPATH)popt.lib ++!ELSE ++POPTLIB=$(LIBPATH)poptd.lib ++!ENDIF ++ + epsilon_i.lib: $(LIBOBJ) + link /debug /dll /def:libepsilon.def /out:$(EPSILON_DLL) \ + /implib:epsilon_i.lib $(LIBOBJ) +@@ -48,8 +54,8 @@ $(EPSILON_EXE): $(EPSILON_DLL) src\epsilon.obj \ + src\cmd_truncate_file.obj src\cmd_decode_file.obj \ + src\cmd_encode_file.obj src\misc.obj \ + src\psi.obj src\pbm.obj \ +- ..\popt\lib\libpopt.lib +- /Fe$(EPSILON_EXE) ++ $(POPTLIB) \ ++ /Fe"$(EPSILON_EXE)" + if exist $(EPSILON_EXE).manifest mt -manifest \ + $(EPSILON_EXE).manifest -outputresource:$(EPSILON_EXE);1 + +@@ -71,8 +77,9 @@ install: all + -mkdir $(INSTDIR)\bin + -mkdir $(INSTDIR)\lib + -mkdir $(INSTDIR)\include ++ -mkdir $(INSTDIR)\tools + copy *.dll $(INSTDIR)\bin + copy *.lib $(INSTDIR)\lib +- copy *.exe $(INSTDIR)\bin ++ copy *.exe $(INSTDIR)\tools + copy lib\epsilon.h $(INSTDIR)\include + +diff --git a/src/misc.h b/src/misc.h +index 9023dce..d8ce602 100644 +--- a/src/misc.h ++++ b/src/misc.h +@@ -30,7 +30,7 @@ extern "C" { + #endif + + /* Use _snprintf instead of snprintf under MSVC compiler */ +-#if defined(_WIN32) && !defined(__MINGW32__) ++#if 0 + #define snprintf _snprintf + #endif + diff --git a/ports/epsilon/CONTROL b/ports/epsilon/CONTROL deleted file mode 100644 index 3b740a976950b1..00000000000000 --- a/ports/epsilon/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: epsilon -Version: 0.9.2 -Homepage: https://sourceforge.net/projects/epsilon-project/ -Description: EPSILON is an Open Source wavelet image compressor, that is aimed on parallel and robust image processing. \ No newline at end of file diff --git a/ports/epsilon/portfile.cmake b/ports/epsilon/portfile.cmake index 70aee7e1ecaae5..525974ab575546 100644 --- a/ports/epsilon/portfile.cmake +++ b/ports/epsilon/portfile.cmake @@ -1,26 +1,17 @@ -include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/epsilon-project/epsilon/0.9.2/epsilon-0.9.2.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fepsilon-project%2Ffiles%2Fepsilon%2F0.9.2%2Fepsilon-0.9.2.tar.gz%2Fdownload%3Fuse_mirror%3Dayera" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO epsilon-project/epsilon + REF 0.9.2 FILENAME "epsilon-0.9.2.tar.gz" - SHA512 95f427c68a4a4eb784f7d484d87fc573133983510f6b030663f88955e2446490a07b1343ae4668251b466f67cf9a79bd834b933c57c5ed12327f32174f20ac0f) - -# Extract source into archictecture specific directory, because GDALs' nmake based build currently does not -# support out of source builds. -set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/epsilon-0.9.2) -set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/epsilon-0.9.2) - -foreach(BUILD_TYPE debug release) - vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/epsilon-0.9.2 - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-VS2015-provides-snprintf.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch - ) -endforeach() + SHA512 95f427c68a4a4eb784f7d484d87fc573133983510f6b030663f88955e2446490a07b1343ae4668251b466f67cf9a79bd834b933c57c5ed12327f32174f20ac0f + PATCHES + 0001-VS2015-provides-snprintf.patch + 0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch + 0003-Fix-build-error.patch +) -find_program(NMAKE nmake REQUIRED) if (VCPKG_CRT_LINKAGE STREQUAL static) set(CL_FLAGS_REL "/MT /Ox /fp:precise") set(CL_FLAGS_DBG "/MTd /Zi") @@ -31,69 +22,27 @@ else() set(TARGET_LIB epsilon_i.lib) endif() -################ -# Release build -################ -message(STATUS "Building ${TARGET_TRIPLET}-rel") -file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) -vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc - "INSTDIR=\"${INST_DIR_REL}\"" - MSVC_VER=1900 - CRT_FLAGS=${CL_FLAGS_REL} - INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} - ${TARGET_LIB} - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME nmake-build-${TARGET_TRIPLET}-release -) -message(STATUS "Building ${TARGET_TRIPLET}-rel done") - -################ -# Debug build -################ -message(STATUS "Building ${TARGET_TRIPLET}-dbg") -file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) -vcpkg_execute_required_process( - COMMAND ${NMAKE} /G -f makefile.vc - "INSTDIR=\"${INST_DIR_DBG}\"" +vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" + OPTIONS_DEBUG + INSTDIR="${CURRENT_PACKAGES_DIR}/debug" MSVC_VER=1900 CRT_FLAGS=${CL_FLAGS_DBG} DEBUG=1 - INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} ${TARGET_LIB} - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug + LIBPATH="${CURRENT_INSTALLED_DIR}/debug/lib/" + OPTIONS_RELEASE + INSTDIR="${CURRENT_PACKAGES_DIR}" + MSVC_VER=1900 + CRT_FLAGS=${CL_FLAGS_REL} + ${TARGET_LIB} + LIBPATH="${CURRENT_INSTALLED_DIR}/lib/" ) -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") -message(STATUS "Packaging ${TARGET_TRIPLET}") -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/epsilon/filters) -if (VCPKG_CRT_LINKAGE STREQUAL dynamic) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(INSTALL ${SOURCE_PATH_RELEASE}/epsilon.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin/) - file(INSTALL ${SOURCE_PATH_DEBUG}/epsilon.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(INSTALL ${SOURCE_PATH_RELEASE}/epsilon_i.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH_DEBUG}/epsilon_i.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) -else() - file(INSTALL ${SOURCE_PATH_RELEASE}/epsilon.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH_DEBUG}/epsilon.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) -endif() -file(COPY ${SOURCE_PATH_RELEASE}/lib/epsilon.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include/) -file(GLOB FILTERS ${SOURCE_PATH_RELEASE}/filters/*.filter) -file(INSTALL ${FILTERS} - DESTINATION ${CURRENT_PACKAGES_DIR}/share/epsilon/filters/) vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH_RELEASE}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/epsilon/ RENAME copyright) -message(STATUS "Packaging ${TARGET_TRIPLET} done") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/epsilon/vcpkg.json b/ports/epsilon/vcpkg.json new file mode 100644 index 00000000000000..de99c7e705b810 --- /dev/null +++ b/ports/epsilon/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "epsilon", + "version-string": "0.9.2", + "port-version": 5, + "description": "EPSILON is an Open Source wavelet image compressor, that is aimed on parallel and robust image processing.", + "homepage": "https://sourceforge.net/projects/epsilon-project/", + "dependencies": [ + "libpopt" + ] +} diff --git a/ports/esaxx/CONTROL b/ports/esaxx/CONTROL deleted file mode 100644 index 48b7eebecc3ab2..00000000000000 --- a/ports/esaxx/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: esaxx -Version: ca7cb332011ec37 -Description: This library provides the implementation of enhanced suffix array. diff --git a/ports/esaxx/portfile.cmake b/ports/esaxx/portfile.cmake index 93e24ff3665a99..c81a2b1f538e62 100644 --- a/ports/esaxx/portfile.cmake +++ b/ports/esaxx/portfile.cmake @@ -1,6 +1,4 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO hillbig/esaxx diff --git a/ports/esaxx/vcpkg.json b/ports/esaxx/vcpkg.json new file mode 100644 index 00000000000000..74c69bddfb63ec --- /dev/null +++ b/ports/esaxx/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "esaxx", + "version-string": "ca7cb332011ec37", + "port-version": 1, + "description": "This library provides the implementation of enhanced suffix array." +} diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL deleted file mode 100644 index 7c61e4ebd6a0d2..00000000000000 --- a/ports/evpp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: evpp -Version: 0.7.0 -Homepage: https://github.com/Qihoo360/evpp -Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. -Build-Depends: glog, libevent, rapidjson diff --git a/ports/evpp/fix-linux-build.patch b/ports/evpp/fix-linux-build.patch new file mode 100644 index 00000000000000..b5673b27c49cd3 --- /dev/null +++ b/ports/evpp/fix-linux-build.patch @@ -0,0 +1,112 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7872fc8..2a06614 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,7 +47,11 @@ string (REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}") + if (UNIX) + SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb -D_DEBUG -DGOOGLE_STRIP_LOG=0") + SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -ggdb -DNDEBUG -DGOOGLE_STRIP_LOG=1") +- SET(DEPENDENT_LIBRARIES event glog pthread) ++ find_package(glog CONFIG REQUIRED) ++ find_path(GLOG_INCLUDE_DIRS logging.h PATH_SUFFIXES glog) ++ find_package(Libevent CONFIG REQUIRED) ++ list(APPEND DEPENDENT_INCLUDE_DIRS "${GLOG_INCLUDE_DIRS}/../") ++ SET(DEPENDENT_LIBRARIES libevent::core libevent::extra libevent::openssl glog::glog pthread) + else (UNIX) + SET(DEPENDENT_LIBRARIES event glog) + endif (UNIX) +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index 469ed1c..8219424 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -2,7 +2,7 @@ + include_directories(${PROJECT_SOURCE_DIR}/apps ${PROJECT_SOURCE_DIR}/3rdparty) + + if (UNIX) +-set(LIBRARIES evpp_concurrentqueue event glog pthread) ++set(LIBRARIES evpp_concurrentqueue libevent::core libevent::extra libevent::openssl glog::glog pthread) + link_directories("/home/s/safe/lib" ${PROJECT_BUILD_DIR}/lib) + else(UNIX) + set(LIBRARIES evpp_static event glog) +diff --git a/benchmark/http/libevent/CMakeLists.txt b/benchmark/http/libevent/CMakeLists.txt +index 1148616..0356b71 100644 +--- a/benchmark/http/libevent/CMakeLists.txt ++++ b/benchmark/http/libevent/CMakeLists.txt +@@ -1,3 +1,3 @@ + + add_executable(benchmark_http_libevent libevent_http_bench.c) +-target_link_libraries(benchmark_http_libevent event) ++target_link_libraries(benchmark_http_libevent libevent::core libevent::extra libevent::openssl) +diff --git a/benchmark/ioevent/libevent/CMakeLists.txt b/benchmark/ioevent/libevent/CMakeLists.txt +index dfa51a3..de4849d 100644 +--- a/benchmark/ioevent/libevent/CMakeLists.txt ++++ b/benchmark/ioevent/libevent/CMakeLists.txt +@@ -1,3 +1,3 @@ + + add_executable(benchmark_ioevent_libevent libevent_ioevent_bench.c) +-target_link_libraries(benchmark_ioevent_libevent event) ++target_link_libraries(benchmark_ioevent_libevent libevent::core libevent::extra libevent::openssl) +diff --git a/benchmark/throughput/libevent/CMakeLists.txt b/benchmark/throughput/libevent/CMakeLists.txt +index 21dab84..aefe698 100644 +--- a/benchmark/throughput/libevent/CMakeLists.txt ++++ b/benchmark/throughput/libevent/CMakeLists.txt +@@ -1,5 +1,5 @@ + add_executable(benchmark_tcp_libevent_client client.c) +-target_link_libraries(benchmark_tcp_libevent_client event) ++target_link_libraries(benchmark_tcp_libevent_client libevent::core libevent::extra libevent::openssl) + + add_executable(benchmark_tcp_libevent_server server.c) +-target_link_libraries(benchmark_tcp_libevent_server event) ++target_link_libraries(benchmark_tcp_libevent_server libevent::core libevent::extra libevent::openssl) +diff --git a/examples/recipes/self_control_timer/basic_01/CMakeLists.txt b/examples/recipes/self_control_timer/basic_01/CMakeLists.txt +index 7834db4..82294c5 100644 +--- a/examples/recipes/self_control_timer/basic_01/CMakeLists.txt ++++ b/examples/recipes/self_control_timer/basic_01/CMakeLists.txt +@@ -1,7 +1,7 @@ + file(GLOB SRCS *.cc *.h) + + add_executable(example_recipes_self_control_timer_basic_01 ${SRCS}) +-target_link_libraries(example_recipes_self_control_timer_basic_01 event) ++target_link_libraries(example_recipes_self_control_timer_basic_01 libevent::core libevent::extra libevent::openssl) + + + +diff --git a/examples/recipes/self_control_timer/basic_02/CMakeLists.txt b/examples/recipes/self_control_timer/basic_02/CMakeLists.txt +index a8be419..0329ccc 100644 +--- a/examples/recipes/self_control_timer/basic_02/CMakeLists.txt ++++ b/examples/recipes/self_control_timer/basic_02/CMakeLists.txt +@@ -1,7 +1,7 @@ + file(GLOB SRCS *.cc *.h) + + add_executable(example_recipes_self_control_timer_basic_02 ${SRCS}) +-target_link_libraries(example_recipes_self_control_timer_basic_02 event) ++target_link_libraries(example_recipes_self_control_timer_basic_02 libevent::core libevent::extra libevent::openssl) + + + +diff --git a/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt b/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt +index 1cae9bb..218b771 100644 +--- a/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt ++++ b/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt +@@ -1,7 +1,7 @@ + file(GLOB SRCS *.cc *.h) + + add_executable(example_recipes_self_control_timer_cancel_03 ${SRCS}) +-target_link_libraries(example_recipes_self_control_timer_cancel_03 event) ++target_link_libraries(example_recipes_self_control_timer_cancel_03 libevent::core libevent::extra libevent::openssl) + + + +diff --git a/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt b/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt +index 749c584..e7c658e 100644 +--- a/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt ++++ b/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt +@@ -1,7 +1,7 @@ + file(GLOB SRCS *.cc *.h) + + add_executable(example_recipes_self_control_timer_periodic_04 ${SRCS}) +-target_link_libraries(example_recipes_self_control_timer_periodic_04 event) ++target_link_libraries(example_recipes_self_control_timer_periodic_04 libevent::core libevent::extra libevent::openssl) + + + diff --git a/ports/evpp/fix-osx-build.patch b/ports/evpp/fix-osx-build.patch new file mode 100644 index 00000000000000..47c758fdeee635 --- /dev/null +++ b/ports/evpp/fix-osx-build.patch @@ -0,0 +1,45 @@ +diff --git a/evpp/server_status.h b/evpp/server_status.h +index 3a83725..f28f833 100644 +--- a/evpp/server_status.h ++++ b/evpp/server_status.h +@@ -25,7 +25,7 @@ public: + }; + + std::string StatusToString() const { +- H_CASE_STRING_BIGIN(status_); ++ H_CASE_STRING_BIGIN(+status_); + H_CASE_STRING(kNull); + H_CASE_STRING(kInitialized); + H_CASE_STRING(kRunning); +diff --git a/evpp/sockets.cc b/evpp/sockets.cc +index 333c05c..c547d88 100644 +--- a/evpp/sockets.cc ++++ b/evpp/sockets.cc +@@ -22,6 +22,14 @@ std::string strerror(int e) { + } + + return empty_string; ++#elif defined(__APPLE__) ++ char buf[2048] = {}; ++ strerror_r(e, buf, sizeof(buf) - 1); ++ const char* s = buf; ++ if (s) { ++ return std::string(s); ++ } ++ return std::string(); + #else + char buf[2048] = {}; + const char* s = strerror_r(e, buf, sizeof(buf) - 1); +diff --git a/evpp/tcp_conn.cc b/evpp/tcp_conn.cc +index b7678d0..527b2b9 100644 +--- a/evpp/tcp_conn.cc ++++ b/evpp/tcp_conn.cc +@@ -309,7 +309,7 @@ void TCPConn::SetTCPNoDelay(bool on) { + } + + std::string TCPConn::StatusToString() const { +- H_CASE_STRING_BIGIN(status_); ++ H_CASE_STRING_BIGIN(+status_); + H_CASE_STRING(kDisconnected); + H_CASE_STRING(kConnecting); + H_CASE_STRING(kConnected); diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake index b20642bdd6e717..b3edaf3aadf9cc 100644 --- a/ports/evpp/portfile.cmake +++ b/ports/evpp/portfile.cmake @@ -1,45 +1,29 @@ -include(vcpkg_common_functions) - -set(EVPP_LOCAL_TEST OFF) - set(EVPP_VERSION 0.7.0) -if (EVPP_LOCAL_TEST) - set(EVPP_HASH bfefb3f7c1f620fbca2c3d94e2e7c39aa963156a084caf39bcc348a9380f97c73c9ee965126434d71c8b14836e669d554ed98632b3bb38eb65b421fd8eff49b2) - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp) - vcpkg_download_distfile(ARCHIVE - URLS "http://127.0.0.1:8000/evpp.zip" - FILENAME "evpp-${EVPP_VERSION}.zip" - SHA512 ${EVPP_HASH} - ) - vcpkg_extract_source_archive(${ARCHIVE}) -else () - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Qihoo360/evpp - REF v${EVPP_VERSION} - SHA512 ddcef8d2af6b3c46473d755c0f0994d63d56240ea85d6b44ceb6b77724c3c56bbf1156f7188e270fb5f9f36f25bfc2f96669d7249a34c921922671e3fe267e88 - HEAD_REF master - ) - file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-rapidjson-1-1.patch - ) -endif () +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Qihoo360/evpp + REF v${EVPP_VERSION} + SHA512 ddcef8d2af6b3c46473d755c0f0994d63d56240ea85d6b44ceb6b77724c3c56bbf1156f7188e270fb5f9f36f25bfc2f96669d7249a34c921922671e3fe267e88 + HEAD_REF master + PATCHES + fix-rapidjson-1-1.patch + fix-linux-build.patch + fix-osx-build.patch +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DEVPP_VCPKG_BUILD=ON + OPTIONS + -DEVPP_VCPKG_BUILD=ON ) vcpkg_install_cmake() -# remove duplicated include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/evpp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/evpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/evpp/copyright) - +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/evpp/vcpkg.json b/ports/evpp/vcpkg.json new file mode 100644 index 00000000000000..ee95a96a78957d --- /dev/null +++ b/ports/evpp/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "evpp", + "version-string": "0.7.0", + "port-version": 5, + "description": "A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols.", + "homepage": "https://github.com/Qihoo360/evpp", + "dependencies": [ + { + "name": "boost-lockfree", + "platform": "!windows" + }, + { + "name": "concurrentqueue", + "platform": "!windows" + }, + "glog", + { + "name": "libevent", + "platform": "windows" + }, + { + "name": "libevent", + "features": [ + "openssl" + ], + "platform": "!windows" + }, + "rapidjson" + ] +} diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL deleted file mode 100644 index 1868de82d01cdc..00000000000000 --- a/ports/exiv2/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: exiv2 -Version: 0.27.1-1 -Build-Depends: zlib, expat, libiconv, gettext -Description: Image metadata library and tools -Homepage: https://www.exiv2.org - -Feature: unicode -Description: Compile with unicode support on windows diff --git a/ports/exiv2/fix-ninja-error.patch b/ports/exiv2/fix-ninja-error.patch new file mode 100644 index 00000000000000..71f52f5615e62e --- /dev/null +++ b/ports/exiv2/fix-ninja-error.patch @@ -0,0 +1,42 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index c52b352..b19c438 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -149,7 +149,7 @@ set_target_properties( exiv2lib_int PROPERTIES + + target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR}) + target_include_directories(exiv2lib PRIVATE +- $ ++ ${PROJECT_SOURCE_DIR}/xmpsdk/include + ${ZLIB_INCLUDE_DIR} + ) + +@@ -215,7 +215,7 @@ else() + endif() + + if( EXIV2_ENABLE_PNG ) +- target_link_libraries( exiv2lib PRIVATE $) ++ target_link_libraries( exiv2lib PRIVATE ${ZLIB_LIBRARIES}) + endif() + + if( EXIV2_ENABLE_NLS ) +diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt +index a22698f..ca6ffe0 100644 +--- a/xmpsdk/CMakeLists.txt ++++ b/xmpsdk/CMakeLists.txt +@@ -27,13 +27,12 @@ add_library(exiv2-xmp STATIC + ) + + target_link_libraries(exiv2-xmp +- PRIVATE +- $ ++ PRIVATE ${EXPAT_LIBRARY} + ) + + target_include_directories(exiv2-xmp + PRIVATE +- $ ++ ${PROJECT_SOURCE_DIR}/xmpsdk/include + ${EXPAT_INCLUDE_DIR} + ) + diff --git a/ports/exiv2/iconv.patch b/ports/exiv2/iconv.patch deleted file mode 100644 index dcea70b8635520..00000000000000 --- a/ports/exiv2/iconv.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/cmake/findDependencies.cmake -+++ b/cmake/findDependencies.cmake -@@ -36,5 +36,5 @@ - - - if (EXIV2_ENABLE_NLS) -- find_package(Intl REQUIRED) -+ find_package(unofficial-gettext CONFIG) - endif( ) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 91469b6..4c51068 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -208,14 +208,14 @@ - endif() - - if( EXIV2_ENABLE_NLS ) -- target_link_libraries(exiv2lib PRIVATE ${Intl_LIBRARIES}) -- target_include_directories(exiv2lib PRIVATE ${Intl_INCLUDE_DIRS}) -+ target_link_libraries(exiv2lib PRIVATE unofficial::gettext::libintl) - # Definition needed for translations - target_compile_definitions(exiv2lib PUBLIC EXV_LOCALEDIR="/../${CMAKE_INSTALL_LOCALEDIR}") - endif() - --if( ICONV_FOUND ) -- target_link_libraries( exiv2lib PRIVATE Iconv::Iconv ) --endif() -+if(NOT TARGET unofficial::iconv::libiconv) -+ find_package(unofficial-iconv CONFIG) -+endif() -+target_link_libraries( exiv2lib PRIVATE unofficial::iconv::libiconv ) - - - - diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index d9e1ecb4d92239..ff544138e5448c 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -1,38 +1,66 @@ -include(vcpkg_common_functions) +#https://github.com/Exiv2/exiv2/issues/1063 +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 0.27.1 - SHA512 1b637138cee019122d98ae3c54e84416ba1a90531b3f541748697c9f1a8faee18699f10cef5a63bf60b8588e8c670925cbac3ad6c82e41160442f8a66380d407 + REF 15098f4ef50cc721ad0018218acab2ff06e60beb #v0.27.4 + SHA512 4be0a9c4c64c65a9ca85291ba2cf54efacc5a88dae534c2d9252986df4e12212899c33093b07695369108e3763b3d74592a6153d832743694ec95c9a03c7e2c3 HEAD_REF master PATCHES - iconv.patch + fix-ninja-error.patch ) -if((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND ("unicode" IN_LIST FEATURES)) - set(enable_win_unicode TRUE) -elseif() - set(enable_win_unicode FALSE) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + unicode EXIV2_ENABLE_WIN_UNICODE + xmp EXIV2_ENABLE_XMP + video EXIV2_ENABLE_VIDEO + png EXIV2_ENABLE_PNG + nls EXIV2_ENABLE_NLS +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" EXIV2_CRT_DYNAMIC) + +if("unicode" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature unicode only supports Windows platform.") endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DEXIV2_ENABLE_WIN_UNICODE:BOOL=${enable_win_unicode} - -DEXIV2_BUILD_EXIV2_COMMAND:BOOL=FALSE - -DEXIV2_BUILD_UNIT_TESTS:BOOL=FALSE - -DEXIV2_BUILD_SAMPLES:BOOL=FALSE -# -DEXIV2_ENABLE_NLS:BOOL=OFF + ${FEATURE_OPTIONS} + -DEXIV2_BUILD_EXIV2_COMMAND=OFF + -DEXIV2_BUILD_UNIT_TESTS=OFF + -DEXIV2_BUILD_SAMPLES=OFF + -DEXIV2_BUILD_DOC=OFF + -DEXIV2_ENABLE_EXTERNAL_XMP=OFF + -DEXIV2_ENABLE_PRINTUCS2=OFF + -DEXIV2_ENABLE_LENSDATA=ON + -DEXIV2_ENABLE_DYNAMIC_RUNTIME=${EXIV2_CRT_DYNAMIC} + -DEXIV2_ENABLE_WEBREADY=OFF + -DEXIV2_ENABLE_CURL=OFF + -DEXIV2_ENABLE_SSH=OFF + -DEXIV2_ENABLE_BMFF=OFF + -DEXIV2_TEAM_EXTRA_WARNINGS=OFF + -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF + -DEXIV2_TEAM_PACKAGING=OFF + -DEXIV2_TEAM_USE_SANITIZERS=OFF ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/exiv2/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/exiv2) +vcpkg_fixup_pkgconfig() +if("nls" IN_LIST FEATURES) + set(EXIV2_ENABLE_NLS ON) +else() + set(EXIV2_ENABLE_NLS OFF) +endif() configure_file( ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - ${CURRENT_PACKAGES_DIR}/share/exiv2 + ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY ) @@ -47,5 +75,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() # Handle copyright -file(COPY ${SOURCE_PATH}/ABOUT-NLS DESTINATION ${CURRENT_PACKAGES_DIR}/share/exiv2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/exiv2/ABOUT-NLS ${CURRENT_PACKAGES_DIR}/share/exiv2/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/exiv2/vcpkg-cmake-wrapper.cmake b/ports/exiv2/vcpkg-cmake-wrapper.cmake index 76e941f2016d62..62f4ecca347b39 100644 --- a/ports/exiv2/vcpkg-cmake-wrapper.cmake +++ b/ports/exiv2/vcpkg-cmake-wrapper.cmake @@ -1,11 +1,16 @@ _find_package(${ARGS}) if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") - find_package(unofficial-iconv CONFIG REQUIRED) - find_package(unofficial-gettext CONFIG REQUIRED) + find_package(Iconv REQUIRED) + if(@EXIV2_ENABLE_NLS@) + find_package(Intl REQUIRED) + endif() if(TARGET exiv2lib) set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES - unofficial::iconv::libiconv - unofficial::gettext::libintl) + Iconv::Iconv + ) + if(@EXIV2_ENABLE_NLS@) + set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${Intl_LIBRARIES}) + endif() endif() endif() diff --git a/ports/exiv2/vcpkg.json b/ports/exiv2/vcpkg.json new file mode 100644 index 00000000000000..5ed357690aab2e --- /dev/null +++ b/ports/exiv2/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "exiv2", + "version": "0.27.4", + "port-version": 2, + "description": "Image metadata library and tools", + "homepage": "https://www.exiv2.org", + "supports": "!uwp", + "dependencies": [ + "libiconv" + ], + "features": { + "nls": { + "description": "Build native language support", + "dependencies": [ + "gettext" + ] + }, + "png": { + "description": "Build with png support (requires libz)", + "dependencies": [ + "libpng", + "zlib" + ] + }, + "unicode": { + "description": "Compile with unicode support on windows" + }, + "video": { + "description": "Build video support into library" + }, + "xmp": { + "description": "Build with XMP metadata support", + "dependencies": [ + "expat" + ] + } + } +} diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL deleted file mode 100644 index 68629eb2d49004..00000000000000 --- a/ports/expat/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: expat -Version: 2.2.7 -Homepage: https://github.com/libexpat/libexpat -Description: XML parser library written in C diff --git a/ports/expat/pkgconfig.patch b/ports/expat/pkgconfig.patch new file mode 100644 index 00000000000000..98ea4b2df9c1fb --- /dev/null +++ b/ports/expat/pkgconfig.patch @@ -0,0 +1,13 @@ +diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt +index cd12a99..03c2c4d 100644 +--- a/expat/CMakeLists.txt ++++ b/expat/CMakeLists.txt +@@ -419,6 +419,8 @@ expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL + # + # pkg-config file + # ++string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UPPER) ++set(_EXPAT_OUTPUT_NAME ${_EXPAT_OUTPUT_NAME}${CMAKE_${BUILD_TYPE_UPPER}_POSTFIX}) + if(EXPAT_BUILD_PKGCONFIG) + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\${prefix}") diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 7b97fb3de8f244..4de88bce1134b6 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -1,14 +1,14 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() +set (EX_VERSION 2.4.1) -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libexpat/libexpat - REF R_2_2_7 - SHA512 11b1f9a135c4501ef0112e17da8381e956366165a11a384daedd4cdef9a00c3112c8f6ff8c8f6d3b5e7b71b9a73041f23beac0f27e9cfafe1ec0266d95870408 - HEAD_REF master) + REF a28238bdeebc087071777001245df1876a11f5ee #v2.4.1 + SHA512 2c22f2dfab50644637a7777229849c91630ae8c50683df6ad6409d473690ce01b59ce9f98e66b0aeac8c650507f04edbb5d9738130c88b87bbc1adb7831c22a9 + HEAD_REF master + PATCHES + pkgconfig.patch +) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(EXPAT_LINKAGE ON) @@ -20,28 +20,31 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/expat PREFER_NINJA OPTIONS - -DBUILD_examples=OFF - -DBUILD_tests=OFF - -DBUILD_tools=OFF - -DBUILD_shared=${EXPAT_LINKAGE} + -DEXPAT_BUILD_EXAMPLES=OFF + -DEXPAT_BUILD_TESTS=OFF + -DEXPAT_BUILD_TOOLS=OFF + -DEXPAT_SHARED_LIBS=${EXPAT_LINKAGE} + -DEXPAT_BUILD_PKGCONFIG=ON ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat RENAME copyright) - -vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/expat-${EX_VERSION}) +vcpkg_fixup_pkgconfig() -# CMake's FindExpat currently doesn't look for expatd.lib -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib) -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(READ ${CURRENT_PACKAGES_DIR}/include/expat_external.h EXPAT_EXTERNAL_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "!defined(XML_STATIC)" "/* vcpkg static build !defined(XML_STATIC) */ 0" EXPAT_EXTERNAL_H "${EXPAT_EXTERNAL_H}") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/expat_external.h + "! defined(XML_STATIC)" + "/* vcpkg static build ! defined(XML_STATIC) */ 0" + ) endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/expat_external.h "${EXPAT_EXTERNAL_H}") -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat) +vcpkg_copy_pdbs() + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/expat/usage b/ports/expat/usage deleted file mode 100644 index a2d35a66e39bf8..00000000000000 --- a/ports/expat/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package expat is compatible with built-in CMake targets: - - find_package(EXPAT REQUIRED) - target_link_libraries(main PRIVATE EXPAT::EXPAT) diff --git a/ports/expat/vcpkg-cmake-wrapper.cmake b/ports/expat/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..4d3e9e05d9c84d --- /dev/null +++ b/ports/expat/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,27 @@ +include(SelectLibraryConfigurations) + +set(EXPATNAMES expat expatw libexpat libexpatw) +set(DEBUGNAMES) +foreach(_CRT "" MT MD) + foreach(name IN LISTS EXPATNAMES) + list(APPEND EXPATNAMES ${name}${_CRT}) + list(APPEND DEBUGNAMES ${name}d${_CRT}) + endforeach() +endforeach() + +find_library(EXPAT_LIBRARY_DEBUG NAMES ${DEBUGNAMES} ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) +find_library(EXPAT_LIBRARY_RELEASE NAMES ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) +select_library_configurations(EXPAT) +set(EXPAT_LIBRARY "${EXPAT_LIBRARIES}" CACHE STRING "" FORCE) +_find_package(${ARGS}) +if(EXPAT_FOUND AND TARGET EXPAT::EXPAT) + if(EXPAT_LIBRARY_DEBUG) + set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}") + endif() + if(EXPAT_LIBRARY_RELEASE) + set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}") + endif() +endif() + +unset(EXPATNAMES) +unset(DEBUGNAMES) \ No newline at end of file diff --git a/ports/expat/vcpkg.json b/ports/expat/vcpkg.json new file mode 100644 index 00000000000000..6444ec7d2a62e0 --- /dev/null +++ b/ports/expat/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "expat", + "version-semver": "2.4.1", + "description": "XML parser library written in C", + "homepage": "https://github.com/libexpat/libexpat" +} diff --git a/ports/expected-lite/CONTROL b/ports/expected-lite/CONTROL deleted file mode 100644 index 315f1d01aa12ba..00000000000000 --- a/ports/expected-lite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: expected-lite -Version: 0.3.0 -Description: Expected objects in C++11 and later in a single-file header-only library diff --git a/ports/expected-lite/portfile.cmake b/ports/expected-lite/portfile.cmake index b8f1ac4405f294..fcd73e9b74c39b 100644 --- a/ports/expected-lite/portfile.cmake +++ b/ports/expected-lite/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/expected-lite diff --git a/ports/expected-lite/vcpkg.json b/ports/expected-lite/vcpkg.json new file mode 100644 index 00000000000000..f80f0abfff0012 --- /dev/null +++ b/ports/expected-lite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "expected-lite", + "version-string": "0.3.0", + "port-version": 1, + "description": "Expected objects in C++11 and later in a single-file header-only library" +} diff --git a/ports/exprtk/CONTROL b/ports/exprtk/CONTROL deleted file mode 100644 index d55d903ae701c3..00000000000000 --- a/ports/exprtk/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: exprtk -Version: 2019-03-29 -Homepage: https://github.com/ArashPartow/exprtk -Description: Simple to use, easy to integrate and extremely efficient run-time C++ mathematical expression parser and evaluation engine. diff --git a/ports/exprtk/copyright b/ports/exprtk/copyright index ee372c989c48c7..f360b8332b9f60 100644 --- a/ports/exprtk/copyright +++ b/ports/exprtk/copyright @@ -1,4 +1,4 @@ -Copyright 1999-2018 Arash Partow +Copyright 1999-2021 Arash Partow http://www.partow.net/programming/exprtk/index.html Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/ports/exprtk/portfile.cmake b/ports/exprtk/portfile.cmake index c82f9cfa579a94..8ebab1b62db09a 100644 --- a/ports/exprtk/portfile.cmake +++ b/ports/exprtk/portfile.cmake @@ -1,11 +1,9 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/exprtk - REF 9fad72832c70348725c073e369a3321781001766 - SHA512 6a2a4bdc331806bb5f97737316cc126ab5e8ec75626dd5a63e854a24b7ae41cddccfee8ea09168ed0d272a92dd89cfc9878507ecf70c3f03d5b4f5e53d877727 + REF ca5c577917646ddba3f71ce6d5dd7d01f351ee80 + SHA512 bb4e36cec74c5e583c417000e4b20dc878572f0eeceffdae021dcdc0cc3e4186be150ca446722ce6a497c9cd4f8bbe51098894207ce711b33139fffb5dd2f6a4 ) file(COPY ${SOURCE_PATH}/exprtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/exprtk) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/exprtk/vcpkg.json b/ports/exprtk/vcpkg.json new file mode 100644 index 00000000000000..9a1d1a1a288028 --- /dev/null +++ b/ports/exprtk/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "exprtk", + "version-string": "2021-01-01", + "port-version": 1, + "description": "Simple to use, easy to integrate and extremely efficient run-time C++ mathematical expression parser and evaluation engine.", + "homepage": "http://www.partow.net/programming/exprtk/index.html" +} diff --git a/ports/ezc3d/portfile.cmake b/ports/ezc3d/portfile.cmake new file mode 100644 index 00000000000000..0972f6f56f2577 --- /dev/null +++ b/ports/ezc3d/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO pyomeca/ezc3d + REF Release_1.3.7 + SHA512 5beb0909a4ddc56f5965b5f2edcfd2c8d68d473b172778ebe21bc134e1b4931cac1e6529676866d4238b41041658041a72ccd44879b9685d85f857a4e0df23ec + HEAD_REF dev +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLE=OFF +) + +vcpkg_install_cmake() + +if (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/ezc3d/cmake") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake") +endif() + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# # Remove duplicated include directory +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs() diff --git a/ports/ezc3d/vcpkg.json b/ports/ezc3d/vcpkg.json new file mode 100644 index 00000000000000..57fb3b5d9fa7cc --- /dev/null +++ b/ports/ezc3d/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "ezc3d", + "version-string": "1.3.7", + "description": "C3D reader/writer", + "homepage": "https://github.com/pyomeca/ezc3d" +} diff --git a/ports/faad2/0001-Fix-non-x86-msvc.patch b/ports/faad2/0001-Fix-non-x86-msvc.patch new file mode 100644 index 00000000000000..821dfb09b5e12b --- /dev/null +++ b/ports/faad2/0001-Fix-non-x86-msvc.patch @@ -0,0 +1,13 @@ +diff --git a/libfaad/common.h b/libfaad/common.h +index 897a0f0..8b78807 100644 +--- a/libfaad/common.h ++++ b/libfaad/common.h +@@ -313,7 +313,7 @@ char *strchr(), *strrchr(); + } + + +- #if defined(_WIN32) && !defined(_WIN64) && !defined(__MINGW32__) ++ #if defined(_WIN32) && defined(_M_IX86) && !defined(__MINGW32__) + #ifndef HAVE_LRINTF + #define HAS_LRINTF + static INLINE int lrintf(float f) diff --git a/ports/faad2/0002-Fix-unary-minus.patch b/ports/faad2/0002-Fix-unary-minus.patch new file mode 100644 index 00000000000000..28e11603fa25e4 --- /dev/null +++ b/ports/faad2/0002-Fix-unary-minus.patch @@ -0,0 +1,24 @@ +diff --git a/libfaad/decoder.c b/libfaad/decoder.c +index 4f4b011..9bed248 100644 +--- a/libfaad/decoder.c ++++ b/libfaad/decoder.c +@@ -239,7 +239,7 @@ static int latmCheck(latm_header *latm, bitfile *ld) + while (ld->bytes_left) + { + bits = faad_latm_frame(latm, ld); +- if(bits==-1U) ++ if(bits==0xFFFFFFFF) + bad++; + else + { +diff --git a/libfaad/syntax.c b/libfaad/syntax.c +index c992543..be8c541 100644 +--- a/libfaad/syntax.c ++++ b/libfaad/syntax.c +@@ -2644,5 +2644,5 @@ uint32_t faad_latm_frame(latm_header *latm, bitfile *ld) + return (len*8)-(endpos-initpos); + //faad_getbits(ld, initpos-endpos); //go back to initpos, but is valid a getbits(-N) ? + } +- return -1U; ++ return 0xFFFFFFFF; + } diff --git a/ports/faad2/0003-Initialize-pointers.patch b/ports/faad2/0003-Initialize-pointers.patch new file mode 100644 index 00000000000000..29c572597a70a0 --- /dev/null +++ b/ports/faad2/0003-Initialize-pointers.patch @@ -0,0 +1,28 @@ +diff --git a/frontend/main.c b/frontend/main.c +index e1d3c7d..25881c7 100644 +--- a/frontend/main.c ++++ b/frontend/main.c +@@ -462,9 +462,9 @@ static int decodeAACfile(char *aacfile, char *sndfile, char *adts_fn, int to_std + unsigned char channels; + void *sample_buffer; + +- audio_file *aufile; ++ audio_file *aufile = NULL; + +- FILE *adtsFile; ++ FILE *adtsFile = NULL; + unsigned char *adtsData; + int adtsDataSize; + +@@ -796,9 +796,9 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std + + long sampleId, startSampleId; + +- audio_file *aufile; ++ audio_file *aufile = NULL; + +- FILE *adtsFile; ++ FILE *adtsFile = NULL; + unsigned char *adtsData; + int adtsDataSize; + diff --git a/ports/faad2/CMakeLists.txt b/ports/faad2/CMakeLists.txt new file mode 100644 index 00000000000000..70f9c587974464 --- /dev/null +++ b/ports/faad2/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.1) +project (faad VERSION 2.9.1) + +option(FAAD_BUILD_BINARIES "Build faad2 binaries" OFF) + +file(GLOB_RECURSE FAAD_SOURCES "${CMAKE_CURRENT_LIST_DIR}/libfaad/*.c") +file(GLOB_RECURSE FAAD_HEADERS "${CMAKE_CURRENT_LIST_DIR}/libfaad/*.h") + +if (BUILD_SHARED_LIBS) + list(APPEND FAAD_SOURCES "${CMAKE_CURRENT_LIST_DIR}/project/msvc/libfaad2.def") +endif () + +add_definitions(-DSTDC_HEADERS -DPACKAGE_VERSION=\"${PROJECT_VERSION}\" -D_CRT_SECURE_NO_WARNINGS -DHAVE_LRINTF) +include_directories( + "${CMAKE_CURRENT_LIST_DIR}/include" + "${CMAKE_CURRENT_LIST_DIR}/libfaad" +) +add_library(faad ${FAAD_SOURCES} ${FAAD_HEADERS}) + +if (FAAD_BUILD_BINARIES) + include_directories( + "${CMAKE_CURRENT_LIST_DIR}/frontend" + ) + add_executable(faad_decoder + "${CMAKE_SOURCE_DIR}/frontend/audio.c" + "${CMAKE_SOURCE_DIR}/frontend/main.c" + "${CMAKE_SOURCE_DIR}/frontend/mp4read.c" + "${CMAKE_SOURCE_DIR}/frontend/unicode_support.c" + ) + target_link_libraries(faad_decoder PRIVATE faad shell32) +endif () + +install( + TARGETS faad + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib" + RUNTIME DESTINATION "bin" + ) diff --git a/ports/faad2/portfile.cmake b/ports/faad2/portfile.cmake new file mode 100644 index 00000000000000..9daa8d49268f11 --- /dev/null +++ b/ports/faad2/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Windows platform." ON_TARGET "Linux" "OSX") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO knik0/faad2 + REF 043d37b60cdded2abed7c4054f954e # 2_9_1 + SHA512 8658256bbcb3ce641eef67c4f5d22d54b348805a06b2954718a44910861a9882371c887feb085060c524f955993ae26c211c6bb4fb8d95f9e9d1d0b5dca0ebe4 + HEAD_REF master + PATCHES + 0001-Fix-non-x86-msvc.patch # https://github.com/knik0/faad2/pull/42 + 0002-Fix-unary-minus.patch # https://github.com/knik0/faad2/pull/43 + 0003-Initialize-pointers.patch # https://github.com/knik0/faad2/pull/44 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + build-decoder FAAD_BUILD_BINARIES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/faad2/vcpkg.json b/ports/faad2/vcpkg.json new file mode 100644 index 00000000000000..856b88daf4161b --- /dev/null +++ b/ports/faad2/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "faad2", + "version-string": "2.9.1", + "port-version": 3, + "description": "Freeware Advanced Audio (AAC) Decoder", + "homepage": "https://sourceforge.net/projects/faac/", + "features": { + "build-decoder": { + "description": "Build the embedded decoder executable" + } + } +} diff --git a/ports/fadbad/CONTROL b/ports/fadbad/CONTROL deleted file mode 100644 index 103890c0ed6d85..00000000000000 --- a/ports/fadbad/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fadbad -Version: 2.1.0 -Homepage: https://www.fadbad.com/ -Description: FADBAD++ Templates for Automatic Differentiation diff --git a/ports/fadbad/portfile.cmake b/ports/fadbad/portfile.cmake index af97219623d809..35c0ff8f5cb698 100644 --- a/ports/fadbad/portfile.cmake +++ b/ports/fadbad/portfile.cmake @@ -1,11 +1,13 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FADBAD++) vcpkg_download_distfile(ARCHIVE URLS "http://www.fadbad.com/download/FADBAD++-2.1.tar.gz" FILENAME "FADBAD++-2.1.tar.gz" SHA512 7a82c51c03acb0806d673853f391379ea974e304c831ee15ef05a90c30661736ff572481b5b8254b2646c63968043ee90a06cba88261b87fc34d01f92403360a ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) file(INSTALL ${SOURCE_PATH}/tadiff.h diff --git a/ports/fadbad/vcpkg.json b/ports/fadbad/vcpkg.json new file mode 100644 index 00000000000000..162be37066f264 --- /dev/null +++ b/ports/fadbad/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fadbad", + "version-string": "2.1.0", + "port-version": 1, + "description": "FADBAD++ Templates for Automatic Differentiation", + "homepage": "https://www.fadbad.com/" +} diff --git a/ports/faiss/fix-dependencies.patch b/ports/faiss/fix-dependencies.patch new file mode 100644 index 00000000000000..81b9fd58fcd5c7 --- /dev/null +++ b/ports/faiss/fix-dependencies.patch @@ -0,0 +1,39 @@ +diff --git a/cmake/faiss-config.cmake.in b/cmake/faiss-config.cmake.in +index 43ea9d4..437a7f8 100644 +--- a/cmake/faiss-config.cmake.in ++++ b/cmake/faiss-config.cmake.in +@@ -4,4 +4,7 @@ + # This source code is licensed under the BSD-style license found in the + # LICENSE file in the root directory of this source tree. + ++find_dependency(OpenMP REQUIRED) ++find_dependency(BLAS REQUIRED) ++find_dependency(LAPACK REQUIRED) + include("${CMAKE_CURRENT_LIST_DIR}/faiss-targets.cmake") +diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt +index 30d573f..9af8baf 100644 +--- a/faiss/CMakeLists.txt ++++ b/faiss/CMakeLists.txt +@@ -212,17 +212,17 @@ target_link_libraries(faiss PRIVATE OpenMP::OpenMP_CXX) + target_link_libraries(faiss_avx2 PRIVATE OpenMP::OpenMP_CXX) + + find_package(MKL) +-if(MKL_FOUND) ++if(0) + target_link_libraries(faiss PRIVATE ${MKL_LIBRARIES}) + target_link_libraries(faiss_avx2 PRIVATE ${MKL_LIBRARIES}) + else() + find_package(BLAS REQUIRED) +- target_link_libraries(faiss PRIVATE ${BLAS_LIBRARIES}) +- target_link_libraries(faiss_avx2 PRIVATE ${BLAS_LIBRARIES}) ++ target_link_libraries(faiss PRIVATE BLAS::BLAS) ++ target_link_libraries(faiss_avx2 PRIVATE BLAS::BLAS) + + find_package(LAPACK REQUIRED) +- target_link_libraries(faiss PRIVATE ${LAPACK_LIBRARIES}) +- target_link_libraries(faiss_avx2 PRIVATE ${LAPACK_LIBRARIES}) ++ target_link_libraries(faiss PRIVATE LAPACK::LAPACK) ++ target_link_libraries(faiss_avx2 PRIVATE LAPACK::LAPACK) + endif() + + install(TARGETS faiss diff --git a/ports/faiss/portfile.cmake b/ports/faiss/portfile.cmake new file mode 100644 index 00000000000000..f2670da79aca36 --- /dev/null +++ b/ports/faiss/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_fail_port_install(ON_ARCH "x86" ON_TARGET "uwp" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebookresearch/faiss + REF cff072b78ef019998990c6ba02df83dd7d3c8d38 # v1.7.1 + SHA512 08d4acf30b6a2a0f326cb71035b58e65f05e70817edbf9dda7d5f8b53d4fb722909c2412d42dca4d88d0576a3da528c2db869fb4fd6fb2343b7acad80066051d + HEAD_REF master + PATCHES + fix-dependencies.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + gpu FAISS_ENABLE_GPU +) + +if ("${FAISS_ENABLE_GPU}") + if (NOT VCPKG_CMAKE_SYSTEM_NAME AND NOT ENV{CUDACXX}) + set(ENV{CUDACXX} "$ENV{CUDA_PATH}/bin/nvcc.exe") + endif() +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DFAISS_ENABLE_PYTHON=OFF # Requires SWIG + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/faiss/vcpkg.json b/ports/faiss/vcpkg.json new file mode 100644 index 00000000000000..dfc5e14b17f442 --- /dev/null +++ b/ports/faiss/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "faiss", + "version-semver": "1.7.1", + "description": "Faiss is a library for efficient similarity search and clustering of dense vectors.", + "homepage": "https://github.com/facebookresearch/faiss", + "license": "MIT", + "supports": "!uwp & !osx & !x86", + "dependencies": [ + "lapack", + "openblas", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "gpu": { + "description": "Whether to enable GPU support", + "dependencies": [ + "cuda" + ] + } + } +} diff --git a/ports/fakeit/portfile.cmake b/ports/fakeit/portfile.cmake new file mode 100644 index 00000000000000..c65b97f893a633 --- /dev/null +++ b/ports/fakeit/portfile.cmake @@ -0,0 +1,14 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eranpeer/FakeIt + REF 2.0.7 + SHA512 b718c2283217a643b7b67ba4c141cc8ea4d18835181d261abfe6f09e9be99af755fa482c0fa17def0e99c97dc11bb95b2da390e9a55c9a50a50c4d98c0071168 + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/single_header/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fakeit/vcpkg.json b/ports/fakeit/vcpkg.json new file mode 100644 index 00000000000000..a4021968275226 --- /dev/null +++ b/ports/fakeit/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fakeit", + "version": "2.0.7", + "description": "FakeIt is a simple mocking framework for C++. It supports GCC, Clang and MS Visual C++.", + "homepage": "https://github.com/eranpeer/FakeIt" +} diff --git a/ports/fann/CONTROL b/ports/fann/CONTROL deleted file mode 100644 index 20fc0dde666d0f..00000000000000 --- a/ports/fann/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: fann -Version: 2.2.0-1 -Description: Fast Artificial Neural Network (FANN) Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks. diff --git a/ports/fann/fix-installation.patch b/ports/fann/fix-installation.patch new file mode 100644 index 00000000000000..270f0877a42fe7 --- /dev/null +++ b/ports/fann/fix-installation.patch @@ -0,0 +1,70 @@ +diff --git a/cmake/Modules/DefineInstallationPaths.cmake b/cmake/Modules/DefineInstallationPaths.cmake +index 644cf1b..81e7c74 100644 +--- a/cmake/Modules/DefineInstallationPaths.cmake ++++ b/cmake/Modules/DefineInstallationPaths.cmake +@@ -3,7 +3,7 @@ if (UNIX) + MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME") + SET(APPLICATION_NAME ${PROJECT_NAME}) + ENDIF (NOT APPLICATION_NAME) +- ++if (0) + # Suffix for Linux + SET(LIB_SUFFIX + CACHE STRING "Define suffix of directory name (32/64)" +@@ -122,9 +122,10 @@ if (UNIX) + CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)" + FORCE + ) ++endif() + endif (UNIX) + +-if (WIN32) ++if (0) + # Same same + SET(BIN_INSTALL_DIR .) + SET(SBIN_INSTALL_DIR .) +@@ -134,5 +135,5 @@ if (WIN32) + SET(ICON_INSTALL_DIR .) + SET(SOUND_INSTALL_DIR .) + SET(LOCALE_INSTALL_DIR lang) +-endif (WIN32) ++endif (0) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index fade00c..a4e6c3f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -14,7 +14,7 @@ floatfann.c + ADD_LIBRARY(floatfann SHARED ${floatfann_LIB_SRCS}) + + SET_TARGET_PROPERTIES(floatfann PROPERTIES VERSION ${VERSION} SOVERSION 2 ) +-INSTALL(TARGETS floatfann DESTINATION ${LIB_INSTALL_DIR} ) ++INSTALL(TARGETS floatfann RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) + + + ########### next target ############### +@@ -26,7 +26,7 @@ doublefann.c + ADD_LIBRARY(doublefann SHARED ${doublefann_LIB_SRCS}) + + SET_TARGET_PROPERTIES(doublefann PROPERTIES VERSION ${VERSION} SOVERSION 2 ) +-INSTALL(TARGETS doublefann DESTINATION ${LIB_INSTALL_DIR} ) ++INSTALL(TARGETS doublefann RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) + + + ########### next target ############### +@@ -38,7 +38,7 @@ fixedfann.c + ADD_LIBRARY(fixedfann SHARED ${fixedfann_LIB_SRCS}) + + SET_TARGET_PROPERTIES(fixedfann PROPERTIES VERSION ${VERSION} SOVERSION 2 ) +-INSTALL(TARGETS fixedfann DESTINATION ${LIB_INSTALL_DIR} ) ++INSTALL(TARGETS fixedfann RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) + + + ########### next target ############### +@@ -50,5 +50,5 @@ floatfann.c + ADD_LIBRARY(fann SHARED ${fann_LIB_SRCS}) + + SET_TARGET_PROPERTIES(fann PROPERTIES VERSION ${VERSION} SOVERSION 2 ) +-INSTALL(TARGETS fann DESTINATION ${LIB_INSTALL_DIR} ) ++INSTALL(TARGETS fann RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) + diff --git a/ports/fann/fix-uwp-build.patch b/ports/fann/fix-uwp-build.patch new file mode 100644 index 00000000000000..dd42358bd4d38b --- /dev/null +++ b/ports/fann/fix-uwp-build.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b91f6fb..22c39d7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,6 +22,10 @@ SET(PKGCONFIG_INSTALL_DIR /lib/pkgconfig) + + INSTALL_FILES( ${PKGCONFIG_INSTALL_DIR} FILES fann.pc ) + ++if (MSVC) ++ add_compile_options(/wd4996) ++endif() ++ + ADD_SUBDIRECTORY( src ) + + ################# cpack ################ diff --git a/ports/fann/portfile.cmake b/ports/fann/portfile.cmake index de4af3550c8344..716bf3e8b94579 100644 --- a/ports/fann/portfile.cmake +++ b/ports/fann/portfile.cmake @@ -1,5 +1,4 @@ -include(vcpkg_common_functions) - +# Official design vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( @@ -8,43 +7,55 @@ vcpkg_from_github( REF 2.2.0 SHA512 b307539a39d93078a489710ac77aa8c6e324f3cf5ef80299ce257d10c043913764abef83aceac5278a5bd243b1ee245b4e8331a9e13c774aa63c9cb604f86bdd HEAD_REF master + PATCHES + fix-installation.patch + fix-uwp-build.patch ) +set(INSTALL_BASE_DIR_DBG ${CURRENT_PACKAGES_DIR}/debug) +set(INSTALL_BASE_DIR_REL ${CURRENT_PACKAGES_DIR}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS_DEBUG + -DBIN_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/bin + -DSBIN_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/sbin + -DLIB_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/bin + -DEXEC_INSTALL_PREFIX=${INSTALL_BASE_DIR_DBG}/tools/${PORT} + -DXDG_APPS_DIR=${INSTALL_BASE_DIR_DBG}/tools/${PORT} + -DPLUGIN_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/tools/${PORT} + -DSHARE_INSTALL_PREFIX=${INSTALL_BASE_DIR_DBG}/share/${PORT} + -DDATA_INSTALL_PREFIX=${INSTALL_BASE_DIR_DBG}/share/${PORT} + -DHTML_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/share/${PORT}/doc + -DICON_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/share/${PORT}/data/icons + -DSOUND_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/share/${PORT}/sounds + -DLOCALE_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/share/${PORT}/locale + -DSYSCONF_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/share/${PORT}/etc + -DINFO_INSTALL_DIR=${INSTALL_BASE_DIR_DBG}/share/${PORT}/info + OPTIONS_RELEASE + -DBIN_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/bin + -DSBIN_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/sbin + -DLIB_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/bin + -DEXEC_INSTALL_PREFIX=${INSTALL_BASE_DIR_REL}/tools/${PORT} + -DXDG_APPS_DIR=${INSTALL_BASE_DIR_REL}/tools/${PORT} + -DPLUGIN_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/tools/${PORT} + -DSHARE_INSTALL_PREFIX=${INSTALL_BASE_DIR_REL}/share/${PORT} + -DDATA_INSTALL_PREFIX=${INSTALL_BASE_DIR_REL}/share/${PORT} + -DHTML_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/share/${PORT}/doc + -DICON_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/share/${PORT}/data/icons + -DSOUND_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/share/${PORT}/sounds + -DLOCALE_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/share/${PORT}/locale + -DSYSCONF_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/share/${PORT}/etc + -DINFO_INSTALL_DIR=${INSTALL_BASE_DIR_REL}/share/${PORT}/info ) -vcpkg_install_cmake() -if(NOT VCPKG_CMAKE_SYSTEM_NAME) - # Finish Directories - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/fann.dll ${CURRENT_PACKAGES_DIR}/bin/fann.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/doublefann.dll ${CURRENT_PACKAGES_DIR}/bin/doublefann.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/fixedfann.dll ${CURRENT_PACKAGES_DIR}/bin/fixedfann.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/floatfann.dll ${CURRENT_PACKAGES_DIR}/bin/floatfann.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/fann.lib ${CURRENT_PACKAGES_DIR}/lib/fann.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/doublefann.lib ${CURRENT_PACKAGES_DIR}/lib/doublefann.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/fixedfann.lib ${CURRENT_PACKAGES_DIR}/lib/fixedfann.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/floatfann.lib ${CURRENT_PACKAGES_DIR}/lib/floatfann.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/fann.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fann.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/doublefann.dll ${CURRENT_PACKAGES_DIR}/debug/bin/doublefann.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/fixedfann.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fixedfann.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/floatfann.dll ${CURRENT_PACKAGES_DIR}/debug/bin/floatfann.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/fann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/fann.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/doublefann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/doublefann.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/fixedfann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/fixedfann.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/floatfann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/floatfann.lib) - - # Remove useless config file and include path - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -endif() - -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +vcpkg_install_cmake() vcpkg_copy_pdbs() + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/fann/vcpkg.json b/ports/fann/vcpkg.json new file mode 100644 index 00000000000000..c4bc01717c8b4e --- /dev/null +++ b/ports/fann/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fann", + "version": "2.2.0", + "port-version": 2, + "description": "Fast Artificial Neural Network (FANN) Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks.", + "homepage": "https://github.com/libfann/fann" +} diff --git a/ports/farmhash/farmhashConfig.cmake b/ports/farmhash/farmhashConfig.cmake new file mode 100644 index 00000000000000..b7b4cd1b0e8229 --- /dev/null +++ b/ports/farmhash/farmhashConfig.cmake @@ -0,0 +1,16 @@ +function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + set(${NAMESPACE}_${LIB_NAME}_FOUND 1) +endfunction() + +get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) + +set_library_target("GOOGLE" "farmhash" "${ROOT}/debug/lib/libfarmhash.a" "${ROOT}/lib/libfarmhash.a" "${ROOT}/include/") diff --git a/ports/farmhash/portfile.cmake b/ports/farmhash/portfile.cmake new file mode 100644 index 00000000000000..801e0570651319 --- /dev/null +++ b/ports/farmhash/portfile.cmake @@ -0,0 +1,27 @@ +#Requires a compiler which understands '__builtin_unreachable': +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/farmhash + REF 0d859a811870d10f53a594927d0d0b97573ad06d + SHA512 7bc14931e488464c1cedbc17551fb90a8cec494d0e0860db9df8efff09000fd8d91e01060dd5c5149b1104ac4ac8bf7eb57e5b156b05ef42636938edad1518f1 + HEAD_REF master +) + +if((VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) AND NOT ENV{CXX_FLAGS}) # This should be a compiler check + set(ENV{CXXFLAGS} "-maes -msse4.2") +endif() +file(REMOVE_RECURSE "${SOURCE_PATH}/configure") +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_make() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/farmhashConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/ports/farmhash/usage b/ports/farmhash/usage new file mode 100644 index 00000000000000..6ec1706dc56715 --- /dev/null +++ b/ports/farmhash/usage @@ -0,0 +1,4 @@ +The package farmhash is compatible with built-in CMake targets: + + FIND_PACKAGE(farmhash REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE GOOGLE::farmhash) for linkage \ No newline at end of file diff --git a/ports/farmhash/vcpkg.json b/ports/farmhash/vcpkg.json new file mode 100644 index 00000000000000..1d85ed1a1a219f --- /dev/null +++ b/ports/farmhash/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "farmhash", + "version-string": "1.1", + "port-version": 3, + "description": "FarmHash, a family of hash functions.", + "homepage": "https://github.com/google/farmhash", + "supports": "!arm" +} diff --git a/ports/fast-cpp-csv-parser/CONTROL b/ports/fast-cpp-csv-parser/CONTROL deleted file mode 100644 index a9766a66a20958..00000000000000 --- a/ports/fast-cpp-csv-parser/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fast-cpp-csv-parser -Version: 2019-08-14 -Description: A small, easy-to-use and fast header-only library for reading comma separated value (CSV) files -Homepage: https://github.com/ben-strasser/fast-cpp-csv-parser diff --git a/ports/fast-cpp-csv-parser/portfile.cmake b/ports/fast-cpp-csv-parser/portfile.cmake index be3ef7e888c6eb..212c97ed947a9d 100644 --- a/ports/fast-cpp-csv-parser/portfile.cmake +++ b/ports/fast-cpp-csv-parser/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ben-strasser/fast-cpp-csv-parser - REF 78f413248fdeea27368481c4a1d48c059ac36680 - SHA512 f8eb477e0b5e82f5b5d7bdf045094dcc59433e7b6305a1e16e45c2c24f4bbb7f6e9540e17a8ffafce29ea2ebe3a2647174824abe80da5f2054f7df3d7da8c28d + REF 75600d0b77448e6c410893830df0aec1dbacf8e3 + SHA512 aab418e98eb895dabd6369b186b7a55beddb84b89e358395a9f125829074916eff9086d80f9cd342d1bfd91acacc7103875c970a84164b75fff259cc93729285 HEAD_REF master ) diff --git a/ports/fast-cpp-csv-parser/vcpkg.json b/ports/fast-cpp-csv-parser/vcpkg.json new file mode 100644 index 00000000000000..8e2640a61f564d --- /dev/null +++ b/ports/fast-cpp-csv-parser/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fast-cpp-csv-parser", + "version-string": "2021-01-03", + "port-version": 1, + "description": "A small, easy-to-use and fast header-only library for reading comma separated value (CSV) files", + "homepage": "https://github.com/ben-strasser/fast-cpp-csv-parser" +} diff --git a/ports/fast-float/portfile.cmake b/ports/fast-float/portfile.cmake new file mode 100644 index 00000000000000..4044e5871c0632 --- /dev/null +++ b/ports/fast-float/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fastfloat/fast_float + REF v0.8.0 + SHA512 d3f39457859ff0132f773222db3684f9b1d4a8ed549dfceb7cfb12d8f5871f5282dfa9eb01d39646cf93ed42dd640cb6487831ec15079b4b154f5002ac74edd7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/FastFloat TARGET_PATH share/FastFloat) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") \ No newline at end of file diff --git a/ports/fast-float/vcpkg.json b/ports/fast-float/vcpkg.json new file mode 100644 index 00000000000000..d750f44b2981b3 --- /dev/null +++ b/ports/fast-float/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fast-float", + "version-string": "0.8.0", + "description": "Fast and exact implementation of the C++ from_chars functions for float and double types: 4x faster than strtod", + "homepage": "https://github.com/fastfloat/fast_float" +} diff --git a/ports/fastcdr/CONTROL b/ports/fastcdr/CONTROL deleted file mode 100644 index 4d3dc062c805a6..00000000000000 --- a/ports/fastcdr/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: fastcdr -Version: 1.0.9-1 -Description: eProsima FastCDR is a C++ library that provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard. diff --git a/ports/fastcdr/portfile.cmake b/ports/fastcdr/portfile.cmake index f4f2f81f090447..1bd5034a716bf3 100644 --- a/ports/fastcdr/portfile.cmake +++ b/ports/fastcdr/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO eProsima/Fast-CDR - REF v1.0.9 - SHA512 2825e61fc4736c9364fc3130f649798cec11fcb56dc5e202c17731121ad8a2795f0fbf8acb5d8d662181bc470e7a3e95a5027283872714be505bb2562c2e2312 + REF 065d49248bd4afbae670836ee1f1c718b9760dde # v1.0.15 + SHA512 1e011f1848abace94299368a5150f9f7513a676ccdc2b2247cebcb098f7b397e9bd20f5663bc35ea9921b1c91654af39e19b867b73c38bdc5612e0e2b926743a HEAD_REF master PATCHES install-cmake.patch ) @@ -13,21 +11,17 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DLICENSE_INSTALL_DIR=share/fastcdr -DCMAKE_DISABLE_FIND_PACKAGE_GTest=ON ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/fastcdr/cmake) - -file(READ "${CURRENT_PACKAGES_DIR}/share/fastcdr/fastcdr-config.cmake" _contents) -string(REPLACE "include(\${fastcdr_LIB_DIR}/fastcdr/cmake/fastcdr-targets.cmake)" "include(\${CMAKE_CURRENT_LIST_DIR}/fastcdr-targets.cmake)" _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/share/fastcdr/fastcdr-config.cmake" "${_contents}") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fastcdr) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/lib/fastcdr ${CURRENT_PACKAGES_DIR}/debug/lib/fastcdr) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(READ ${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h EPROSIMA_AUTO_LINK_H) @@ -39,6 +33,4 @@ else() file(WRITE ${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h "${FASTCDR_H}") endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/fastcdr) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/fastcdr/license ${CURRENT_PACKAGES_DIR}/share/fastcdr/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fastcdr/vcpkg.json b/ports/fastcdr/vcpkg.json new file mode 100644 index 00000000000000..0f2241e4ebd021 --- /dev/null +++ b/ports/fastcdr/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fastcdr", + "version-semver": "1.0.15", + "port-version": 1, + "description": "eProsima FastCDR is a C++ library that provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard.", + "homepage": "https://github.com/eProsima/Fast-CDR" +} diff --git a/ports/fastcgi/portfile.cmake b/ports/fastcgi/portfile.cmake new file mode 100644 index 00000000000000..eb0536ce6a420b --- /dev/null +++ b/ports/fastcgi/portfile.cmake @@ -0,0 +1,68 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FastCGI-Archives/fcgi2 + REF fc8c6547ae38faf9926205a23075c47fbd4370c8 + SHA512 7f27b1060fbeaf0de9b8a43aa4ff954a004c49e99f7d6ea11119a438fcffe575fb469ba06262e71ac8132f92e74189e2097fd049595a6a61d4d5a5bac2733f7a + HEAD_REF master +) + +if (VCPKG_TARGET_IS_WINDOWS) + # Check build system first + find_program(NMAKE nmake REQUIRED) + + list(APPEND NMAKE_OPTIONS_REL + CFG=release + ) + + list(APPEND NMAKE_OPTIONS_DBG + CFG=debug + ) + + file(RENAME ${SOURCE_PATH}/include/fcgi_config_x86.h ${SOURCE_PATH}/include/fcgi_config.h) + vcpkg_build_nmake( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH libfcgi + PROJECT_NAME libfcgi.mak + OPTIONS_RELEASE + "${NMAKE_OPTIONS_REL}" + OPTIONS_DEBUG + "${NMAKE_OPTIONS_DBG}" + ) + + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/include DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME ${PORT}) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libfcgi/Release/libfcgi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libfcgi/Debug/libfcgi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + if (NOT VCPKG_CRT_LINKAGE STREQUAL static) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libfcgi/Release/libfcgi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libfcgi/Debug/libfcgi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + +elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) # Build in UNIX + # Check build system first + if(VCPKG_TARGET_IS_OSX) + message("${PORT} currently requires the following library from the system package manager:\n gettext\n automake\n libtool\n\nIt can be installed with brew install gettext automake libtool") + else() + message("${PORT} currently requires the following library from the system package manager:\n gettext\n automake\n libtool\n libtool-bin\n\nIt can be installed with apt-get install gettext automake libtool libtool-bin") + endif() + + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + COPY_SOURCE + ) + + vcpkg_install_make() + + # switch ${PORT} into /${PORT} + file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/include2) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) + file(RENAME ${CURRENT_PACKAGES_DIR}/include2 ${CURRENT_PACKAGES_DIR}/include/${PORT}) + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +else() # Other build system + vcpkg_fail_port_install(ALWAYS) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.TERMS DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fastcgi/vcpkg.json b/ports/fastcgi/vcpkg.json new file mode 100644 index 00000000000000..83d7fa763362b2 --- /dev/null +++ b/ports/fastcgi/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fastcgi", + "version-string": "2020-09-11", + "port-version": 1, + "description": "The FastCGI interface combines the best aspects of CGI and vendor APIs. Like CGI, FastCGI applications run in separate, isolated processes.", + "homepage": "https://fastcgi-archives.github.io/" +} diff --git a/ports/fastfeat/CONTROL b/ports/fastfeat/CONTROL deleted file mode 100644 index 9349930346eb11..00000000000000 --- a/ports/fastfeat/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: fastfeat -Version: 391d5e9-1 -Description: FAST feature detectors in C diff --git a/ports/fastfeat/portfile.cmake b/ports/fastfeat/portfile.cmake index 7fd35b9f8404dd..18ec525ca25e7d 100644 --- a/ports/fastfeat/portfile.cmake +++ b/ports/fastfeat/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edrosten/fast-C-src diff --git a/ports/fastfeat/vcpkg.json b/ports/fastfeat/vcpkg.json new file mode 100644 index 00000000000000..550c8b70822556 --- /dev/null +++ b/ports/fastfeat/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fastfeat", + "version-string": "391d5e9", + "port-version": 2, + "description": "FAST feature detectors in C" +} diff --git a/ports/fastlz/CONTROL b/ports/fastlz/CONTROL deleted file mode 100644 index 98b53557e335d2..00000000000000 --- a/ports/fastlz/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fastlz -Version: 1.0-3 -Homepage: https://github.com/ariya/FastLZ -Description: A lightning-fast lossless compression library diff --git a/ports/fastlz/portfile.cmake b/ports/fastlz/portfile.cmake index 38c71aadeddb5a..b9923d374d6d57 100644 --- a/ports/fastlz/portfile.cmake +++ b/ports/fastlz/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ariya/FastLZ - REF f1217348a868bdb9ee0730244475aee05ab329c5 - SHA512 444465aa5d830f54b86112cbd0431099d8e1a11d46bd02e1dc5dc0b3d772736624287e6bc328159195197d0d08cb659d39c59c5336ffa432032f3798e04f4440 + REF c3bdfad9e0094d0fb15c12cd300e647c13dc85f9 #2021-5-10 + SHA512 cb1c7e365e955f4cabfcb0bebf9cb57e88e81183fc0bec0713a88acee6bc3aeb31cdf8fa0b56b4b7c63f220ab7b50c299b13df15912a3b4a01ec70dd2a9513f7 HEAD_REF master ) @@ -22,6 +20,4 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fastlz) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/fastlz/LICENSE ${CURRENT_PACKAGES_DIR}/share/fastlz/copyright) -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fastlz/vcpkg.json b/ports/fastlz/vcpkg.json new file mode 100644 index 00000000000000..c27e1a60124250 --- /dev/null +++ b/ports/fastlz/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fastlz", + "version-date": "2021-05-10", + "description": "A lightning-fast lossless compression library", + "homepage": "https://github.com/ariya/FastLZ" +} diff --git a/ports/fastrtps/CONTROL b/ports/fastrtps/CONTROL deleted file mode 100644 index c80f7638c70b26..00000000000000 --- a/ports/fastrtps/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fastrtps -Version: 1.5.0-2 -Description: Eprosima Fast RTPS is a C++ implementation of the RTPS (Real Time Publish Subscribe) protocol, which provides publisher-subscriber communications over unreliable transports such as UDP, as defined and maintained by the Object Management Group (OMG) consortium. -Build-Depends: openssl, asio, tinyxml2 \ No newline at end of file diff --git a/ports/fastrtps/fix-install.patch b/ports/fastrtps/fix-install.patch deleted file mode 100644 index 4777ae3ee70b08..00000000000000 --- a/ports/fastrtps/fix-install.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt -index a1e91fd..f5578cd 100644 ---- a/src/cpp/CMakeLists.txt -+++ b/src/cpp/CMakeLists.txt -@@ -416,7 +416,8 @@ if(MSVC OR MSVC_IDE) - PATTERN "*.pdb" - ) - -- if(NOT (("${MSVC_ARCH}" STREQUAL "i86Win32VS2013") OR ("${MSVC_ARCH}" STREQUAL "x64Win64VS2013"))) -+ if(NOT (("${MSVC_ARCH}" STREQUAL "i86Win32VS2013") OR ("${MSVC_ARCH}" STREQUAL "x64Win64VS2013") -+ OR ("${MSVC_ARCH}" STREQUAL "i86Win32VS2015") OR ("${MSVC_ARCH}" STREQUAL "x64Win64VS2015"))) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_static.dir/Debug/${PROJECT_NAME}_static.pdb - DESTINATION ${LIB_INSTALL_DIR}${DIR_EXTENSION} - COMPONENT libraries_${MSVC_ARCH} diff --git a/ports/fastrtps/namespace_tinyxml2.patch b/ports/fastrtps/namespace_tinyxml2.patch deleted file mode 100644 index 3df65996f491af..00000000000000 --- a/ports/fastrtps/namespace_tinyxml2.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cmake/modules/FindTinyXML2.cmake b/cmake/modules/FindTinyXML2.cmake -index 24aa98a..4e2188e 100644 ---- a/cmake/modules/FindTinyXML2.cmake -+++ b/cmake/modules/FindTinyXML2.cmake -@@ -7,10 +7,10 @@ option(TINYXML2_FROM_SOURCE "Integrate TinyXML2 source code inside Fast RTPS" OF - find_package(TinyXML2 CONFIG QUIET) - if(TinyXML2_FOUND) - message(STATUS "Found TinyXML2: ${TinyXML2_DIR}") -- if(NOT TINYXML2_LIBRARY AND TARGET tinyxml2) -+ if(NOT TINYXML2_LIBRARY AND TARGET tinyxml2::tinyxml2) - # in this case, we're probably using TinyXML2 version 5.0.0 or greater - # in which case tinyxml2 is an exported target and we should use that -- set(TINYXML2_LIBRARY tinyxml2) -+ set(TINYXML2_LIBRARY tinyxml2::tinyxml2) - endif() - else() - if(THIRDPARTY) diff --git a/ports/fastrtps/portfile.cmake b/ports/fastrtps/portfile.cmake index 9aed75f5bffa87..9f72b5d6f9cce4 100644 --- a/ports/fastrtps/portfile.cmake +++ b/ports/fastrtps/portfile.cmake @@ -1,14 +1,9 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO eProsima/Fast-RTPS - REF b1779b608c7b5b2dcb101728f4213c58bdde74ee # waiting for next release - SHA512 9ec4a1e41296df1c0bc00926d925e0947602fabb68e9b28311e92739b0e1909a2993b15fc05eb31aeb9842ed50127f8d56571d09e57dd64ac6f37d0fed6cea73 + REPO eProsima/Fast-DDS + REF 40568fa4784e846f95c461608d43a2b57eaef55b # v2.0.1 + SHA512 a0cb48713a41ba3562c98dfc176508779e70e35b573428ac0a74c74254aa34c583bd545169f3a3961172bfc9e7bb14d08b5d56569e176fe8248d714bec5813a4 HEAD_REF master - PATCHES - fix-install.patch - namespace_tinyxml2.patch ) vcpkg_configure_cmake( @@ -19,13 +14,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/fastrtps/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/fastrtps/cmake TARGET_PATH share/fastrtps) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/examples) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/examples) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/fastrtps) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/fastrtps) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/fastrtps/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fastrtps/vcpkg.json b/ports/fastrtps/vcpkg.json new file mode 100644 index 00000000000000..c214822af39368 --- /dev/null +++ b/ports/fastrtps/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "fastrtps", + "version-string": "2.0.1", + "port-version": 1, + "description": "Eprosima Fast RTPS is a C++ implementation of the RTPS (Real Time Publish Subscribe) protocol, which provides publisher-subscriber communications over unreliable transports such as UDP, as defined and maintained by the Object Management Group (OMG) consortium.", + "homepage": "https://www.eprosima.com/", + "dependencies": [ + "asio", + "fastcdr", + "foonathan-memory", + "openssl", + "tinyxml2" + ] +} diff --git a/ports/fbgemm/fix-cmakelists.patch b/ports/fbgemm/fix-cmakelists.patch new file mode 100644 index 00000000000000..1d26e80a9628ec --- /dev/null +++ b/ports/fbgemm/fix-cmakelists.patch @@ -0,0 +1,146 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6f19a16..3c758d2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") + include(GNUInstallDirs) + + # function to extract filelists from defs.bzl file +-find_package(PythonInterp) + function(get_filelist name outputvar) + execute_process( + COMMAND "${PYTHON_EXECUTABLE}" -c +@@ -19,9 +18,6 @@ endfunction() + + project(fbgemm VERSION 0.1 LANGUAGES CXX C) + +-set(FBGEMM_LIBRARY_TYPE "default" CACHE STRING +- "Type of library (shared, static, or default) to build") +-set_property(CACHE FBGEMM_LIBRARY_TYPE PROPERTY STRINGS default static shared) + option(FBGEMM_BUILD_TESTS "Build fbgemm unit tests" ON) + option(FBGEMM_BUILD_BENCHMARKS "Build fbgemm benchmarks" ON) + option(FBGEMM_BUILD_DOCS "Build fbgemm documentation" OFF) +@@ -101,18 +97,11 @@ set_target_properties(fbgemm_generic fbgemm_avx2 fbgemm_avx512 PROPERTIES + #2) MSVC uses /MD in default cxx compiling flags, + #need to change it to /MT in static case + if(MSVC) +- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267 /wd4305 /wd4309") +- if(FBGEMM_LIBRARY_TYPE STREQUAL "static") ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267 /wd4305 /wd4309 /wd4703") ++ if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(fbgemm_generic PRIVATE ASMJIT_STATIC) + target_compile_definitions(fbgemm_avx2 PRIVATE ASMJIT_STATIC) + target_compile_definitions(fbgemm_avx512 PRIVATE ASMJIT_STATIC) +- foreach(flag_var +- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE +- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) +- if(${flag_var} MATCHES "/MD") +- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") +- endif(${flag_var} MATCHES "/MD") +- endforeach(flag_var) + endif() + target_compile_options(fbgemm_avx2 PRIVATE "/arch:AVX2") + target_compile_options(fbgemm_avx512 PRIVATE "/arch:AVX512") +@@ -145,7 +134,8 @@ message(WARNING "CMAKE_CXX_FLAGS_DEBUG is ${CMAKE_CXX_FLAGS_DEBUG}") + message(WARNING "CMAKE_CXX_FLAGS_RELEASE is ${CMAKE_CXX_FLAGS_RELEASE}") + message(WARNING "==========") + +-if(NOT TARGET asmjit) ++find_package(asmjit CONFIG REQUIRED) # target 'asmjit::asmjit' ++if(FALSE) + #Download asmjit from github if ASMJIT_SRC_DIR is not specified. + if(NOT DEFINED ASMJIT_SRC_DIR) + set(ASMJIT_SRC_DIR "${FBGEMM_SOURCE_DIR}/third_party/asmjit" +@@ -164,7 +154,8 @@ if(NOT TARGET asmjit) + set_property(TARGET asmjit PROPERTY POSITION_INDEPENDENT_CODE ON) + endif() + +-if(NOT TARGET cpuinfo) ++find_package(unofficial-cpuinfo CONFIG REQUIRED) # target 'unofficial::cpuinfo::cpuinfo' ++if(FALSE) + #Download cpuinfo from github if CPUINFO_SOURCE_DIR is not specified. + if(NOT DEFINED CPUINFO_SOURCE_DIR) + set(CPUINFO_SOURCE_DIR "${FBGEMM_SOURCE_DIR}/third_party/cpuinfo" +@@ -185,49 +176,38 @@ endif() + target_include_directories(fbgemm_generic BEFORE + PUBLIC $ + PUBLIC $ +- PRIVATE "${ASMJIT_SRC_DIR}/src" +- PRIVATE "${CPUINFO_SOURCE_DIR}/include") ++) ++target_link_libraries(fbgemm_generic PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo) + + target_include_directories(fbgemm_avx2 BEFORE + PUBLIC $ + PUBLIC $ +- PRIVATE "${ASMJIT_SRC_DIR}/src" +- PRIVATE "${CPUINFO_SOURCE_DIR}/include") ++) ++target_link_libraries(fbgemm_avx2 PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo) + + target_include_directories(fbgemm_avx512 BEFORE + PUBLIC $ + PUBLIC $ +- PRIVATE "${ASMJIT_SRC_DIR}/src" +- PRIVATE "${CPUINFO_SOURCE_DIR}/include") +- +-if(FBGEMM_LIBRARY_TYPE STREQUAL "default") +- add_library(fbgemm +- $ +- $ +- $) +-elseif(FBGEMM_LIBRARY_TYPE STREQUAL "shared") +- add_library(fbgemm SHARED +- $ +- $ +- $) ++) ++target_link_libraries(fbgemm_avx512 PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo) ++ ++add_library(fbgemm ++ $ ++ $ ++ $) ++if(BUILD_SHARED_LIBS) + set_property(TARGET fbgemm_generic PROPERTY POSITION_INDEPENDENT_CODE ON) + set_property(TARGET fbgemm_avx2 PROPERTY POSITION_INDEPENDENT_CODE ON) + set_property(TARGET fbgemm_avx512 PROPERTY POSITION_INDEPENDENT_CODE ON) + set_target_properties(fbgemm PROPERTIES + CXX_VISIBILITY_PRESET hidden) +-elseif(FBGEMM_LIBRARY_TYPE STREQUAL "static") +- add_library(fbgemm STATIC +- $ +- $ +- $) ++else() + #MSVC need to define FBGEMM_STATIC for fbgemm_generic also to + #avoid generating _dllimport functions. + target_compile_definitions(fbgemm_generic PRIVATE FBGEMM_STATIC) + target_compile_definitions(fbgemm_avx2 PRIVATE FBGEMM_STATIC) + target_compile_definitions(fbgemm_avx512 PRIVATE FBGEMM_STATIC) + target_compile_definitions(fbgemm PRIVATE FBGEMM_STATIC) +-else() +- message(FATAL_ERROR "Unsupported library type ${FBGEMM_LIBRARY_TYPE}") + endif() + + if(USE_SANITIZER) +@@ -239,9 +219,7 @@ target_include_directories(fbgemm BEFORE + PUBLIC $ + PUBLIC $) + +-target_link_libraries(fbgemm $ +- $) +-add_dependencies(fbgemm asmjit cpuinfo) ++target_link_libraries(fbgemm PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo) + + install(TARGETS fbgemm EXPORT fbgemmLibraryConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -254,7 +232,7 @@ install(FILES ${FBGEMM_PUBLIC_HEADERS} + install(EXPORT fbgemmLibraryConfig DESTINATION share/cmake/fbgemm + FILE fbgemmLibraryConfig.cmake) + +-if(MSVC) ++if(FALSE) + if(FBGEMM_LIBRARY_TYPE STREQUAL "shared") + install( + FILES $ $ diff --git a/ports/fbgemm/portfile.cmake b/ports/fbgemm/portfile.cmake new file mode 100644 index 00000000000000..ee0da8e8081363 --- /dev/null +++ b/ports/fbgemm/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_ARCH "x86" ON_TARGET "uwp") + +# The project's CMakeLists.txt uses Python to select source files. Check if it is available in advance. +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pytorch/fbgemm + REF 51bc2ecc7086980fd9e6190163b04486cd37ac2a + SHA512 43e59ff25ec9365061be6a8db7ec592f096e74897e338dd3e17401f2188986cf3b7e26f82f7c1e2adf34496fb32cb4b50d40731bee3bf9fa5b1f2ac92a09e671 + PATCHES + fix-cmakelists.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DUSE_SANITIZER=OFF + -DFBGEMM_BUILD_TESTS=OFF + -DFBGEMM_BUILD_BENCHMARKS=OFF + -DPYTHON_EXECUTABLE=${PYTHON3} # inject the path instead of find_package(Python) +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(PACKAGE_NAME fbgemmLibrary CONFIG_PATH share/cmake/${PORT}) + +# this internal header is required by pytorch +file(INSTALL "${SOURCE_PATH}/src/RefImplementations.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/fbgemm/src") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/fbgemm/vcpkg.json b/ports/fbgemm/vcpkg.json new file mode 100644 index 00000000000000..aeddbfe0dc1f91 --- /dev/null +++ b/ports/fbgemm/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "fbgemm", + "version-date": "2021-03-18", + "port-version": 2, + "description": "FB (Facebook) + GEMM (General Matrix-Matrix Multiplication)", + "homepage": "https://code.fb.com/ml-applications/fbgemm/", + "supports": "!(x86 | uwp)", + "dependencies": [ + "asmjit", + "cpuinfo", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/fbthrift/fix-sodium-target.patch b/ports/fbthrift/fix-sodium-target.patch new file mode 100644 index 00000000000000..89d32e53db647d --- /dev/null +++ b/ports/fbthrift/fix-sodium-target.patch @@ -0,0 +1,16 @@ +diff --git a/build/fbcode_builder/CMake/FindSodium.cmake b/build/fbcode_builder/CMake/FindSodium.cmake +index c664ccbe3..3c3f1245c 100644 +--- a/build/fbcode_builder/CMake/FindSodium.cmake ++++ b/build/fbcode_builder/CMake/FindSodium.cmake +@@ -254,7 +254,10 @@ if(sodium_USE_STATIC_LIBS) + else() + set(_LIB_TYPE SHARED) + endif() +-add_library(sodium ${_LIB_TYPE} IMPORTED) ++ ++if(NOT TARGET sodium) ++ add_library(sodium ${_LIB_TYPE} IMPORTED) ++endif() + + set_target_properties(sodium PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${sodium_INCLUDE_DIR}" diff --git a/ports/fbthrift/fix-zlib.patch b/ports/fbthrift/fix-zlib.patch new file mode 100644 index 00000000000000..d9a185ad1ffeaa --- /dev/null +++ b/ports/fbthrift/fix-zlib.patch @@ -0,0 +1,100 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 150671504a9..7b248a0105e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,7 +106,7 @@ if(lib_only OR build_all) + find_package(fizz CONFIG REQUIRED) + find_package(fmt CONFIG REQUIRED) + find_package(wangle CONFIG REQUIRED) +- find_package(Zlib REQUIRED) ++ find_package(ZLIB REQUIRED) + find_package(Zstd REQUIRED) + # https://cmake.org/cmake/help/v3.9/module/FindThreads.html + set(THREADS_PREFER_PTHREAD_FLAG ON) +@@ -115,7 +115,6 @@ if(lib_only OR build_all) + ${LIBGFLAGS_INCLUDE_DIR} + ${GLOG_INCLUDE_DIRS} + ${OPENSSL_INCLUDE_DIR} +- ${ZLIB_INCLUDE_DIRS} + ${ZSTD_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ) +diff --git a/thrift/cmake/FBThriftConfig.cmake.in b/thrift/cmake/FBThriftConfig.cmake.in +index 69b29b948c5..e1297ed18c3 100644 +--- a/thrift/cmake/FBThriftConfig.cmake.in ++++ b/thrift/cmake/FBThriftConfig.cmake.in +@@ -28,6 +28,8 @@ else() + set_and_check(FBTHRIFT_COMPILER "@PACKAGE_BIN_INSTALL_DIR@/thrift1") + endif() + ++find_dependency(ZLIB REQUIRED) ++ + if (NOT TARGET FBThrift::thriftcpp2) + include("${FBTHRIFT_CMAKE_DIR}/FBThriftTargets.cmake") + endif() +diff --git a/thrift/cmake/FindZlib.cmake b/thrift/cmake/FindZlib.cmake +deleted file mode 100644 +index c15525b411f..00000000000 +--- a/thrift/cmake/FindZlib.cmake ++++ /dev/null +@@ -1,46 +0,0 @@ +-# Copyright (c) Facebook, Inc. and its affiliates. +-# +-# Licensed under the Apache License, Version 2.0 (the "License"); +-# you may not use this file except in compliance with the License. +-# You may obtain a copy of the License at +-# +-# http://www.apache.org/licenses/LICENSE-2.0 +-# +-# Unless required by applicable law or agreed to in writing, software +-# distributed under the License is distributed on an "AS IS" BASIS, +-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-# See the License for the specific language governing permissions and +-# limitations under the License. +- +-# +-# - Try to find Facebook zstd library +-# This will define +-# ZLIB_FOUND +-# ZLIB_INCLUDE_DIR +-# ZLIB_LIBRARIES +-# +- +-find_path( +- ZLIB_INCLUDE_DIRS zlib.h +- HINTS +- $ENV{ZLIB_ROOT}/include +- ${ZLIB_ROOT}/include +-) +- +-find_library( +- ZLIB_LIBRARIES z zlib +- HINTS +- $ENV{ZLIB_ROOT}/lib +- ${ZLIB_ROOT}/lib +-) +- +-# For some reason ZLIB_FOUND is never marked as TRUE +-set(ZLIB_FOUND TRUE) +-mark_as_advanced(ZLIB_INCLUDE_DIRS ZLIB_LIBRARIES) +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(Zstd ZLIB_INCLUDE_DIRS ZLIB_LIBRARIES) +- +-if(ZLIB_FOUND AND NOT ZLIB_FIND_QUIETLY) +- message(STATUS "ZLIB: ${ZLIB_INCLUDE_DIRS}") +-endif() +diff --git a/thrift/lib/cpp/CMakeLists.txt b/thrift/lib/cpp/CMakeLists.txt +index 681622594c9..3df0b5717db 100644 +--- a/thrift/lib/cpp/CMakeLists.txt ++++ b/thrift/lib/cpp/CMakeLists.txt +@@ -77,8 +77,8 @@ target_link_libraries( + thrift-core + rpcmetadata + Folly::folly ++ ZLIB::ZLIB + ${OPENSSL_LIBRARIES} +- ${ZLIB_LIBRARIES} + ${ZSTD_LIBRARIES} + ) + diff --git a/ports/fbthrift/portfile.cmake b/ports/fbthrift/portfile.cmake new file mode 100644 index 00000000000000..016fac181af6a6 --- /dev/null +++ b/ports/fbthrift/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm") + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/fbthrift + REF v2021.06.14.00 + SHA512 e59465adcd57722626e5a4407529b164472cde3942bd100b3d6e92c5057f88f1a8544b7181a01e05ed3077ffd2b3811b687aa6741d08aedef6b79aea02305798 + HEAD_REF master + PATCHES + fix-sodium-target.patch # fixed in master + fix-zlib.patch # fixed in master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBISON_EXECUTABLE=${BISON} + -DFLEX_EXECUTABLE=${FLEX} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fbthrift) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# There should be no empty directories in vcpkg/packages/fbthrift_x64-linux +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/transport/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/util/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/server/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/common/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/core/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/inmemory/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/protocol/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/extensions/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/frozen/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/reflection/docs + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/util/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/benchmark + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/thrift/annotation +) + +vcpkg_copy_tools(TOOL_NAMES thrift1 AUTO_CLEAN) +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fbthrift/vcpkg.json b/ports/fbthrift/vcpkg.json new file mode 100644 index 00000000000000..4e9237e2c5f6ed --- /dev/null +++ b/ports/fbthrift/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "fbthrift", + "version-string": "2021.06.14.00", + "description": "Facebook's branch of Apache Thrift, including a new C++ server.", + "homepage": "https://github.com/facebook/fbthrift", + "supports": "x64", + "dependencies": [ + "boost-context", + "boost-filesystem", + "boost-program-options", + "boost-regex", + "boost-system", + "boost-thread", + "fizz", + "fmt", + "folly", + "gflags", + "glog", + "openssl", + "wangle", + "zlib", + "zstd" + ] +} diff --git a/ports/fcl/0001_fix_package_detection.patch b/ports/fcl/0001_fix_package_detection.patch deleted file mode 100644 index 9ae1b60e52389a..00000000000000 --- a/ports/fcl/0001_fix_package_detection.patch +++ /dev/null @@ -1,81 +0,0 @@ -From c43e3771cc2ec314191e5d4a5b485aab258c1b18 Mon Sep 17 00:00:00 2001 -From: Mikhail Paulyshka -Date: Sun, 27 Aug 2017 04:12:36 +0300 -Subject: [PATCH] use cmake-exports for package detection - ---- - CMakeLists.txt | 48 +++--------------------------------------------- - 1 file changed, 3 insertions(+), 45 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5a4a559..8978b61 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -65,32 +65,11 @@ if(FCL_COVERALLS) - endif() - - # Find Octomap (optional) --find_package(PkgConfig QUIET) -- - option(FCL_WITH_OCTOMAP "octomap library support" ON) - set(FCL_HAVE_OCTOMAP 0) - if(FCL_WITH_OCTOMAP) -- if(PKG_CONFIG_FOUND) -- pkg_check_modules(OCTOMAP QUIET octomap) -- endif() -- if(NOT OCTOMAP_FOUND) -- # if pkgconfig is not installed, then fall back on more fragile detection -- # of octomap -- find_path(OCTOMAP_INCLUDE_DIRS octomap.h -- PATH_SUFFIXES octomap) -- find_library(OCTOMAP_LIBRARY_DIRS -- ${CMAKE_SHARED_LIBRARY_PREFIX}octomap${CMAKE_SHARED_LIBRARY_SUFFIX}) -- if(OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS) -- set(OCTOMAP_LIBRARIES "octomap;octomath") -- endif() -- endif() -- if (OCTOMAP_FOUND OR (OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)) -- string(REPLACE "." ";" VERSION_LIST ${OCTOMAP_VERSION}) -- list(GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION) -- list(GET VERSION_LIST 1 OCTOMAP_MINOR_VERSION) -- list(GET VERSION_LIST 2 OCTOMAP_PATCH_VERSION) -- include_directories(${OCTOMAP_INCLUDE_DIRS}) -- link_directories(${OCTOMAP_LIBRARY_DIRS}) -+ find_package(OCTOMAP REQUIRED) -+ if (OCTOMAP_FOUND) - set(FCL_HAVE_OCTOMAP 1) - message(STATUS "FCL uses Octomap") - else() -@@ -116,28 +95,7 @@ endif() - include_directories(BEFORE "include") - include_directories("${CMAKE_CURRENT_BINARY_DIR}/include") - --if(PKG_CONFIG_FOUND) -- pkg_check_modules(CCD ccd) -- # check to see if the pkg is installed under the libccd name -- if(NOT CCD_FOUND) -- pkg_check_modules(CCD libccd) -- endif() --endif() -- --if(NOT CCD_FOUND) -- # if pkgconfig is not installed, then fall back on more fragile detection -- # of ccd -- find_path(CCD_INCLUDE_DIRS ccd/ccd.h) -- find_library(CCD_LIBRARY -- ${CMAKE_SHARED_LIBRARY_PREFIX}ccd${CMAKE_SHARED_LIBRARY_SUFFIX}) -- if(CCD_INCLUDE_DIRS AND CCD_LIBRARY) -- set(CCD_LIBRARIES "${CCD_LIBRARY}") -- else() -- message(FATAL_ERROR "Libccd is required by FCL") -- endif() --endif() --include_directories(${CCD_INCLUDE_DIRS}) --link_directories(${CCD_LIBRARY_DIRS}) -+find_package(CCD REQUIRED) - - add_subdirectory(include/fcl) - add_subdirectory(src) --- -2.12.2.windows.2 - diff --git a/ports/fcl/0002-fix_dependencies.patch b/ports/fcl/0002-fix_dependencies.patch deleted file mode 100644 index 34b069291bcdad..00000000000000 --- a/ports/fcl/0002-fix_dependencies.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 5ce1f77..1f3e863 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -10,8 +10,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES - SOVERSION ${FCL_ABI_VERSION}) - - target_link_libraries(${PROJECT_NAME} -- PUBLIC ${OCTOMAP_LIBRARIES} -- PRIVATE ${CCD_LIBRARIES} -+ PUBLIC octomap octomath ccd - PRIVATE ${Boost_LIBRARIES}) - - target_include_directories(${PROJECT_NAME} INTERFACE diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL deleted file mode 100644 index aaae4f57b1dc71..00000000000000 --- a/ports/fcl/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: fcl -Version: 0.5.0-6 -Homepage: https://github.com/flexible-collision-library/fcl -Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles -Build-Depends: ccd, octomap diff --git a/ports/fcl/portfile.cmake b/ports/fcl/portfile.cmake index 65ff738d0130fd..0bd74661d48ebd 100644 --- a/ports/fcl/portfile.cmake +++ b/ports/fcl/portfile.cmake @@ -1,33 +1,32 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO flexible-collision-library/fcl - REF 54e9619bc2b084ee50e986ac3308160d663481c4 - SHA512 11bfa3fdeeda6766769a34d2248ca32b6b13ecb32b412c068aa1c7aa3495d55b3f7a82a93621965904f9813c3fd0f128a84f796ae5731d2ff15b85935a0e1261 - HEAD_REF fcl-0.5 + REF 97455a46de121fb7c0f749e21a58b1b54cd2c6be # 0.6.1 + SHA512 1ed1f43866a2da045fcb82ec54a7812c3fc46306386bc04ccf33b5e169773743b2985997373a63bf480098a321600321fdf5061b1448b48e993cf92cad032891 + HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_fix_package_detection.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-fix_dependencies.patch) - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(FCL_STATIC_LIBRARY ON) else() set(FCL_STATIC_LIBRARY OFF) endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(FCL_USE_X64_SSE ON) +else() + set(FCL_USE_X64_SSE OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DFCL_STATIC_LIBRARY=${FCL_STATIC_LIBRARY} -DFCL_BUILD_TESTS=OFF + -DFCL_USE_X64_SSE=${FCL_USE_X64_SSE} ) vcpkg_install_cmake() @@ -39,12 +38,6 @@ else() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fcl) endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(READ ${CURRENT_PACKAGES_DIR}/share/fcl/fclConfig.cmake FCL_CONFIG) -string(REPLACE "unset(_expectedTargets)" - "unset(_expectedTargets)\n\nfind_package(octomap REQUIRED)\nfind_package(ccd REQUIRED)" FCL_CONFIG "${FCL_CONFIG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/fcl/fclConfig.cmake "${FCL_CONFIG}") - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fcl RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fcl/vcpkg.json b/ports/fcl/vcpkg.json new file mode 100644 index 00000000000000..e722e46d2329cc --- /dev/null +++ b/ports/fcl/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "fcl", + "version-string": "0.6.1", + "port-version": 1, + "description": "a library for performing three types of proximity queries on a pair of geometric models composed of triangles", + "homepage": "https://github.com/flexible-collision-library/fcl", + "dependencies": [ + "ccd", + "eigen3", + "octomap" + ] +} diff --git a/ports/fdk-aac/CMakeLists.txt b/ports/fdk-aac/CMakeLists.txt deleted file mode 100644 index a7f6c09b2c197a..00000000000000 --- a/ports/fdk-aac/CMakeLists.txt +++ /dev/null @@ -1,203 +0,0 @@ -cmake_minimum_required(VERSION 3.8.0) - -project(fdk-aac) - -set(AACDEC_SRC - libAACdec/src/aacdec_drc.cpp - libAACdec/src/aacdec_hcr.cpp - libAACdec/src/aacdecoder.cpp - libAACdec/src/aacdec_pns.cpp - libAACdec/src/aac_ram.cpp - libAACdec/src/block.cpp - libAACdec/src/channelinfo.cpp - libAACdec/src/ldfiltbank.cpp - libAACdec/src/rvlcbit.cpp - libAACdec/src/rvlc.cpp - libAACdec/src/aacdec_hcr_bit.cpp - libAACdec/src/aacdec_hcrs.cpp - libAACdec/src/aacdecoder_lib.cpp - libAACdec/src/aacdec_tns.cpp - libAACdec/src/aac_rom.cpp - libAACdec/src/channel.cpp - libAACdec/src/conceal.cpp - libAACdec/src/pulsedata.cpp - libAACdec/src/rvlcconceal.cpp - libAACdec/src/stereo.cpp -) - -set(AACENC_SRC - libAACenc/src/aacenc.cpp - libAACenc/src/aacEnc_ram.cpp - libAACenc/src/band_nrg.cpp - libAACenc/src/block_switch.cpp - libAACenc/src/grp_data.cpp - libAACenc/src/metadata_main.cpp - libAACenc/src/pre_echo_control.cpp - libAACenc/src/quantize.cpp - libAACenc/src/tonality.cpp - libAACenc/src/aacEnc_rom.cpp - libAACenc/src/bandwidth.cpp - libAACenc/src/channel_map.cpp - libAACenc/src/intensity.cpp - libAACenc/src/ms_stereo.cpp - libAACenc/src/psy_configuration.cpp - libAACenc/src/sf_estim.cpp - libAACenc/src/transform.cpp - libAACenc/src/aacenc_lib.cpp - libAACenc/src/aacenc_tns.cpp - libAACenc/src/bit_cnt.cpp - libAACenc/src/chaosmeasure.cpp - libAACenc/src/line_pe.cpp - libAACenc/src/noisedet.cpp - libAACenc/src/psy_main.cpp - libAACenc/src/spreading.cpp - libAACenc/src/aacenc_pns.cpp - libAACenc/src/adj_thr.cpp - libAACenc/src/bitenc.cpp - libAACenc/src/dyn_bits.cpp - libAACenc/src/metadata_compressor.cpp - libAACenc/src/pnsparam.cpp - libAACenc/src/qc_main.cpp -) - -set(FDK_SRC - libFDK/src/autocorr2nd.cpp - libFDK/src/dct.cpp - libFDK/src/FDK_bitbuffer.cpp - libFDK/src/FDK_core.cpp - libFDK/src/FDK_crc.cpp - libFDK/src/FDK_hybrid.cpp - libFDK/src/FDK_tools_rom.cpp - libFDK/src/FDK_trigFcts.cpp - libFDK/src/fft.cpp - libFDK/src/fft_rad2.cpp - libFDK/src/fixpoint_math.cpp - libFDK/src/mdct.cpp - libFDK/src/qmf.cpp - libFDK/src/scale.cpp -) - -set(MPEGTPDEC_SRC - libMpegTPDec/src/tpdec_adif.cpp - libMpegTPDec/src/tpdec_adts.cpp - libMpegTPDec/src/tpdec_asc.cpp - libMpegTPDec/src/tpdec_drm.cpp - libMpegTPDec/src/tpdec_latm.cpp - libMpegTPDec/src/tpdec_lib.cpp -) - -set( MPEGTPENC_SRC - libMpegTPEnc/src/tpenc_adif.cpp - libMpegTPEnc/src/tpenc_adts.cpp - libMpegTPEnc/src/tpenc_asc.cpp - libMpegTPEnc/src/tpenc_latm.cpp - libMpegTPEnc/src/tpenc_lib.cpp -) - -set( PCMUTILS_SRC - libPCMutils/src/limiter.cpp - libPCMutils/src/pcmutils_lib.cpp -) - -set(SBRDEC_SRC - libSBRdec/src/env_calc.cpp - libSBRdec/src/env_dec.cpp - libSBRdec/src/env_extr.cpp - libSBRdec/src/huff_dec.cpp - libSBRdec/src/lpp_tran.cpp - libSBRdec/src/psbitdec.cpp - libSBRdec/src/psdec.cpp - libSBRdec/src/psdec_hybrid.cpp - libSBRdec/src/sbr_crc.cpp - libSBRdec/src/sbr_deb.cpp - libSBRdec/src/sbr_dec.cpp - libSBRdec/src/sbrdec_drc.cpp - libSBRdec/src/sbrdec_freq_sca.cpp - libSBRdec/src/sbrdecoder.cpp - libSBRdec/src/sbr_ram.cpp - libSBRdec/src/sbr_rom.cpp -) - -set(SBRENC_SRC - libSBRenc/src/bit_sbr.cpp - libSBRenc/src/env_bit.cpp - libSBRenc/src/fram_gen.cpp - libSBRenc/src/mh_det.cpp - libSBRenc/src/ps_bitenc.cpp - libSBRenc/src/ps_encode.cpp - libSBRenc/src/resampler.cpp - libSBRenc/src/sbr_encoder.cpp - libSBRenc/src/sbr_ram.cpp - libSBRenc/src/ton_corr.cpp - libSBRenc/src/code_env.cpp - libSBRenc/src/env_est.cpp - libSBRenc/src/invf_est.cpp - libSBRenc/src/nf_est.cpp - libSBRenc/src/ps_main.cpp - libSBRenc/src/sbrenc_freq_sca.cpp - libSBRenc/src/sbr_misc.cpp - libSBRenc/src/sbr_rom.cpp - libSBRenc/src/tran_det.cpp -) - -set(SYS_SRC - libSYS/src/cmdl_parser.cpp - libSYS/src/conv_string.cpp - libSYS/src/genericStds.cpp - libSYS/src/wav_file.cpp -) - -set( - libfdk_aac_SOURCES - ${AACDEC_SRC} ${AACENC_SRC} - ${MPEGTPDEC_SRC} ${MPEGTPENC_SRC} - ${SBRDEC_SRC} ${SBRENC_SRC} - ${PCMUTILS_SRC} ${FDK_SRC} ${SYS_SRC} - fdk-aac.def -) - -include_directories( - . - win32 - libAACdec/include - libAACenc/include - libSBRdec/include - libSBRenc/include - libMpegTPDec/include - libMpegTPEnc/include - libSYS/include - libFDK/include - libPCMutils/include -) - -add_library(fdk-aac ${libfdk_aac_SOURCES}) - -add_executable(aac-enc aac-enc.c wavreader.c) - -target_link_libraries(aac-enc fdk-aac) - -install( - TARGETS fdk-aac - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_TOOLS) - install ( - TARGETS aac-enc - RUNTIME DESTINATION tools/fdk-aac - ) -endif() - -if(NOT DISABLE_INSTALL_HEADERS) - install( - FILES - libAACdec/include/aacdecoder_lib.h - libAACenc/include/aacenc_lib.h - libSYS/include/FDK_audio.h - libSYS/include/genericStds.h - libSYS/include/machine_type.h - DESTINATION include - ) -endif() diff --git a/ports/fdk-aac/CONTROL b/ports/fdk-aac/CONTROL deleted file mode 100644 index c7262f86132d2b..00000000000000 --- a/ports/fdk-aac/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fdk-aac -Version: 2018-07-08-1 -Homepage: https://github.com/mstorsjo/fdk-aac -Description: A standalone library of the Fraunhofer FDK AAC code diff --git a/ports/fdk-aac/fdk-aac.def b/ports/fdk-aac/fdk-aac.def deleted file mode 100644 index 8690b69b6fe38c..00000000000000 --- a/ports/fdk-aac/fdk-aac.def +++ /dev/null @@ -1,19 +0,0 @@ -EXPORTS -aacDecoder_AncDataGet -aacDecoder_AncDataInit -aacDecoder_Close -aacDecoder_ConfigRaw -aacDecoder_DecodeFrame -aacDecoder_Fill -aacDecoder_GetFreeBytes -aacDecoder_GetLibInfo -aacDecoder_GetStreamInfo -aacDecoder_Open -aacDecoder_SetParam -aacEncClose -aacEncEncode -aacEncGetLibInfo -aacEncInfo -aacEncOpen -aacEncoder_GetParam -aacEncoder_SetParam diff --git a/ports/fdk-aac/portfile.cmake b/ports/fdk-aac/portfile.cmake index 000c00b1fb67a8..4b44fb0626885b 100644 --- a/ports/fdk-aac/portfile.cmake +++ b/ports/fdk-aac/portfile.cmake @@ -1,25 +1,36 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO mstorsjo/fdk-aac - REF e45ae429b9ca8f234eb861338a75b2d89cde206a - SHA512 e4d0ec632a67642312bd0c812849601452d4ba45b31bc2f2a9392bba5fe2320b2099c5c7077c9571ea270804979039182060dc1acacdc397ca2a9b8ca43301a3 - HEAD_REF master +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES + FEATURES + he-aac HE_AAC ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/fdk-aac.def DESTINATION ${SOURCE_PATH}) +if(HE_AAC) + vcpkg_from_github( + REPO mstorsjo/fdk-aac + REF v2.0.2 + SHA512 616207e85035d1659a2b7808ca6ec02ef53c1c4b39eb280fe861f82a4cf548e5db2ac381c496bad37dfc2b8c6677fe704d9fd8449e43d1f93d3e636239e0191b + HEAD_REF master + OUT_SOURCE_PATH SOURCE_PATH + ) +else() + vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org/ + REPO wtaymans/fdk-aac-stripped + REF 585981a49f2186b0d2e47c64bf6b5abf539395f8 # corresponds to v2.0.2 tag in mstorsjo/fdk-aac GitHub repository + HEAD_REF stripped4 + SHA512 e0e56396ed0be427302ed4b54fc6e8dc522a172c288b7c1ec40cc3a9ceb13518ca7bbb874bc71b88b2a91e0bbbe4ad0bab6910efa1db63d91e6370976641bac4 + OUT_SOURCE_PATH SOURCE_PATH + ) +endif() -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON + OPTIONS_RELEASE -DBUILD_PROGRAMS=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fdk-aac) -file(INSTALL ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fdk-aac RENAME copyright) +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}") +file(INSTALL "${SOURCE_PATH}/NOTICE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/fdk-aac/vcpkg.json b/ports/fdk-aac/vcpkg.json new file mode 100644 index 00000000000000..046d06500152d3 --- /dev/null +++ b/ports/fdk-aac/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "fdk-aac", + "version-semver": "2.0.2", + "port-version": 1, + "description": "A standalone Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android. Uses a fork without HE-AAC, HE-AACv2, or xHE-AAC support to avoid patent licensing and GPL compatibility issues when built without the he-aac option.", + "homepage": "https://gitlab.freedesktop.org/wtaymans/fdk-aac-stripped", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "he-aac": { + "description": "Support patent-encumbered HE-AAC, HE-AACv2, and xHE-AAC codec profiles. Do not distribute binaries with this option without the relevant patent licenses if you are in a jurisdiction that recognizes software patents. Might not be compatible with the GPL depending on legal interpretation. Refer to https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112" + } + } +} diff --git a/ports/fdlibm/CONTROL b/ports/fdlibm/CONTROL deleted file mode 100644 index 14bc9ad645b536..00000000000000 --- a/ports/fdlibm/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: fdlibm -Version: 5.3-4 -Description: FDLIBM (Freely Distributable LIBM) is a C math library for machines that support IEEE 754 floating-point arithmetic diff --git a/ports/fdlibm/portfile.cmake b/ports/fdlibm/portfile.cmake index 7bbd21f065bf41..f822cef95bd944 100644 --- a/ports/fdlibm/portfile.cmake +++ b/ports/fdlibm/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL https://android.googlesource.com/platform/external/fdlibm diff --git a/ports/fdlibm/vcpkg.json b/ports/fdlibm/vcpkg.json new file mode 100644 index 00000000000000..f90a637c991e71 --- /dev/null +++ b/ports/fdlibm/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fdlibm", + "version-string": "5.3", + "port-version": 5, + "description": "FDLIBM (Freely Distributable LIBM) is a C math library for machines that support IEEE 754 floating-point arithmetic" +} diff --git a/ports/ffmpeg/0001-create-lib-libraries.patch b/ports/ffmpeg/0001-create-lib-libraries.patch new file mode 100644 index 00000000000000..493e24c1bb02f0 --- /dev/null +++ b/ports/ffmpeg/0001-create-lib-libraries.patch @@ -0,0 +1,25 @@ +diff --git a/configure b/configure +index 34c2adb..1c8008a 100755 +--- a/configure ++++ b/configure +@@ -5352,15 +5352,17 @@ case $target_os in + ;; + win32|win64) + disable symver +- if enabled shared; then ++# if enabled shared; then + # Link to the import library instead of the normal static library + # for shared libs. + LD_LIB='%.lib' + # Cannot build both shared and static libs with MSVC or icl. +- disable static +- fi ++# disable static ++# fi + enabled x86_32 && check_ldflags -LARGEADDRESSAWARE + shlibdir_default="$bindir_default" ++ LIBPREF="" ++ LIBSUF=".lib" + SLIBPREF="" + SLIBSUF=".dll" + SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' diff --git a/ports/ffmpeg/0003-fix-windowsinclude.patch b/ports/ffmpeg/0003-fix-windowsinclude.patch new file mode 100644 index 00000000000000..8ac04c8656bf0c --- /dev/null +++ b/ports/ffmpeg/0003-fix-windowsinclude.patch @@ -0,0 +1,13 @@ +diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c +index 9cfbc45..e3447e6 100644 +--- a/fftools/cmdutils.c ++++ b/fftools/cmdutils.c +@@ -63,6 +63,8 @@ + #include + #endif + #ifdef _WIN32 ++#define _WIN32_WINNT 0x0502 ++#define WIN32_LEAN_AND_MEAN + #include + #endif + diff --git a/ports/ffmpeg/0004-fix-debug-build.patch b/ports/ffmpeg/0004-fix-debug-build.patch new file mode 100644 index 00000000000000..f1ea01e6b513e5 --- /dev/null +++ b/ports/ffmpeg/0004-fix-debug-build.patch @@ -0,0 +1,43 @@ +diff --git a/configure b/configure +index bd2de34..fba948a 100755 +--- a/configure ++++ b/configure +@@ -3993,6 +3993,9 @@ for opt do + --libfuzzer=*) + libfuzzer_path="$optval" + ;; ++ --debug) ++ enable debug_configure ++ ;; + *) + optname="${opt%%=*}" + optname="${optname#--}" +@@ -6152,8 +6153,13 @@ + + enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion || + check_lib zlib zlib.h zlibVersion -lz; } +-enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2 +-enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma ++if enabled debug_configure; then ++ enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2d ++ enabled lzma && check_lib lzma lzma.h lzma_version_number -llzmad ++else ++ enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2 ++ enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma ++fi + + # On some systems dynamic loading requires no extra linker flags + check_lib libdl dlfcn.h "dlopen dlsym" || check_lib libdl dlfcn.h "dlopen dlsym" -ldl +@@ -6350,7 +6350,11 @@ enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8 + enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer + enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init || + require libsmbclient libsmbclient.h smbc_init -lsmbclient; } +-enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ ++if enabled debug_configure; then ++ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappyd -lstdc++ ++else ++ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ ++fi + enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr + enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init + enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init diff --git a/ports/ffmpeg/0006-fix-StaticFeatures.patch b/ports/ffmpeg/0006-fix-StaticFeatures.patch new file mode 100644 index 00000000000000..ce5c2f9e38f6e5 --- /dev/null +++ b/ports/ffmpeg/0006-fix-StaticFeatures.patch @@ -0,0 +1,49 @@ +diff --git a/configure b/configure +index 3bdcfc6..00b2f13 100644 +--- a/configure ++++ b/configure +@@ -6351,7 +6351,8 @@ if enabled libmfx; then + fi + + enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load +-enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs ++enabled libmp3lame && { check_lib libmp3lame lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs || ++ require libmp3lame lame/lame.h lame_set_VBR_quality -llibmp3lame-static -llibmpghip-static $libm_extralibs; } + enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine || + require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; } + enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei || +@@ -6392,7 +6393,7 @@ if enabled debug_configure; then + else + enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ + fi +-enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr ++enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr -lm + enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init + enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init + enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket +@@ -6460,6 +6461,8 @@ enabled openal && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" + enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel || + check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL || + check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL || ++ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -lAdvapi32 -lOle32 -lCfgmgr32|| ++ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -pthread -ldl || + die "ERROR: opencl not found"; } && + { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" || + test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" || +@@ -6479,6 +6482,7 @@ enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OP + check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || + check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 || + check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || ++ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -llibssl -llibcrypto -lws2_32 -lgdi32 -lcrypt32 -lAdvapi32 -lUser32|| + die "ERROR: openssl not found"; } + enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init + enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create && +@@ -6707,7 +6711,7 @@ enabled amf && + if enabled libc_iconv; then + check_func_headers iconv.h iconv + elif enabled iconv; then +- check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv ++ check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv || check_lib iconv iconv.h iconv -liconv -llibcharset + fi + + enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel" diff --git a/ports/ffmpeg/0007-fix-lib-naming.patch b/ports/ffmpeg/0007-fix-lib-naming.patch new file mode 100644 index 00000000000000..7e4aa7102e67d8 --- /dev/null +++ b/ports/ffmpeg/0007-fix-lib-naming.patch @@ -0,0 +1,15 @@ +diff --git a/configure b/configure +index d6c4388..75b96c3 100644 +--- a/configure ++++ b/configure +@@ -4378,6 +4378,10 @@ msvc_common_flags(){ + -march=*) ;; + -lz) echo zlib.lib ;; + -lx264) echo libx264.lib ;; ++ -lx265) echo libx265.lib ;; ++ -lmp3lame) echo libmp3lame.lib ;; ++ -liconv) echo iconv.lib ;; ++ -lm) ;; + -lstdc++) ;; + -l*) echo ${flag#-l}.lib ;; + -LARGEADDRESSAWARE) echo $flag ;; diff --git a/ports/ffmpeg/0009-Fix-fdk-detection.patch b/ports/ffmpeg/0009-Fix-fdk-detection.patch new file mode 100644 index 00000000000000..3d280fd2b33aa5 --- /dev/null +++ b/ports/ffmpeg/0009-Fix-fdk-detection.patch @@ -0,0 +1,14 @@ +diff --git a/configure b/configure +index b137669dd3..34c92230f4 100755 +--- a/configure ++++ b/configure +@@ -6331,7 +6331,7 @@ enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2. + enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new + enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion + enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || +- { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac && ++ { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac -lm -lstdc++ && + warn "using libfdk without pkg-config"; } } + flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite" + enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs + diff --git a/ports/ffmpeg/0010-Fix-x264-detection.patch b/ports/ffmpeg/0010-Fix-x264-detection.patch new file mode 100644 index 00000000000000..2cbf85eaf81a8b --- /dev/null +++ b/ports/ffmpeg/0010-Fix-x264-detection.patch @@ -0,0 +1,14 @@ +diff --git a/configure b/configure +index b137669dd3..34a2e644c4 100755 +--- a/configure ++++ b/configure +@@ -6443,7 +6443,7 @@ enabled libwebp && { + enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion + enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } + enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode || +- { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" && ++ { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs -ldl" && + warn "using libx264 without pkg-config"; } } && + require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && + check_cpp_condition libx262 x264.h "X264_MPEG2" + diff --git a/ports/ffmpeg/0011-Fix-x265-detection.patch b/ports/ffmpeg/0011-Fix-x265-detection.patch new file mode 100644 index 00000000000000..69c6380a1f8379 --- /dev/null +++ b/ports/ffmpeg/0011-Fix-x265-detection.patch @@ -0,0 +1,17 @@ +diff --git a/configure b/configure +index 34a2e644c4..0ea64bd306 100755 +--- a/configure ++++ b/configure +@@ -6447,7 +6447,10 @@ enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x + warn "using libx264 without pkg-config"; } } && + require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && + check_cpp_condition libx262 x264.h "X264_MPEG2" +-enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get && ++enabled libx265 && { check_pkg_config libx265 x265 x265.h x265_api_get || ++ { { check_lib libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++ -lgcc_s -lgcc -lrt -lnuma" || ++ require libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++"; } && ++ warn "using libx265 without pkg-config"; } } && + require_cpp_condition libx265 x265.h "X265_BUILD >= 70" + enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" + enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get + diff --git a/ports/ffmpeg/0012-Fix-ssl-110-detection.patch b/ports/ffmpeg/0012-Fix-ssl-110-detection.patch new file mode 100644 index 00000000000000..e9dd21553913aa --- /dev/null +++ b/ports/ffmpeg/0012-Fix-ssl-110-detection.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index 2be953f7e7..e075949ffc 100755 +--- a/configure ++++ b/configure +@@ -6497,6 +6497,7 @@ enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR + enabled omx && require_headers OMX_Core.h + enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl || + check_pkg_config openssl openssl openssl/ssl.h SSL_library_init || ++ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto $pthreads_extralibs -ldl || + check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto || + check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || + check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 || + diff --git a/ports/ffmpeg/0013-define-WINVER.patch b/ports/ffmpeg/0013-define-WINVER.patch new file mode 100644 index 00000000000000..295a738e74f7e7 --- /dev/null +++ b/ports/ffmpeg/0013-define-WINVER.patch @@ -0,0 +1,15 @@ +diff --color -Naur src_old/libavcodec/mf_utils.c src/libavcodec/mf_utils.c +--- src_old/libavcodec/mf_utils.c 2020-07-11 05:26:17.000000000 +0700 ++++ src/libavcodec/mf_utils.c 2020-11-13 12:55:57.226976400 +0700 +@@ -22,6 +22,11 @@ + #define _WIN32_WINNT 0x0602 + #endif + ++#if !defined(WINVER) || WINVER < 0x0602 ++#undef WINVER ++#define WINVER 0x0602 ++#endif ++ + #include "mf_utils.h" + #include "libavutil/pixdesc.h" + diff --git a/ports/ffmpeg/0014-avfilter-dependency-fix.patch b/ports/ffmpeg/0014-avfilter-dependency-fix.patch new file mode 100644 index 00000000000000..bc9dc0219dd44a --- /dev/null +++ b/ports/ffmpeg/0014-avfilter-dependency-fix.patch @@ -0,0 +1,23 @@ +diff --git a/configure b/configure +index a092a6b457..41e55b4101 100755 +--- a/configure ++++ b/configure +@@ -3666,6 +3666,18 @@ vpp_qsv_filter_select="qsvvpp" + xfade_opencl_filter_deps="opencl" + yadif_cuda_filter_deps="ffnvcodec" + yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm" ++ametadata_filter_deps="avformat" ++metadata_filter_deps="avformat" ++headphone_filter_deps="avcodec" ++headphone_filter_select="fft" ++showspatial_filter_deps="avcodec" ++showspatial_filter_select="fft" ++superequalizer_filter_deps="avcodec" ++superequalizer_filter_select="rdft" ++surround_filter_deps="avcodec" ++surround_filter_select="rdft" ++sinc_filter_deps="avcodec" ++sinc_filter_select="rdft" + + # examples + avio_list_dir_deps="avformat avutil" diff --git a/ports/ffmpeg/0015-Fix-xml2-detection.patch b/ports/ffmpeg/0015-Fix-xml2-detection.patch new file mode 100644 index 00000000000000..7d2f148b09ea7e --- /dev/null +++ b/ports/ffmpeg/0015-Fix-xml2-detection.patch @@ -0,0 +1,17 @@ + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 900505756b..8d1388a347 100755 +--- a/configure ++++ b/configure +@@ -6476,7 +6476,7 @@ enabled libzmq && require_pkg_config libzmq "libzmq >= 4.2.1" zmq.h z + enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new && + { test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" || + enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; } +-enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion ++enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml/xmlversion.h xmlCheckVersion + enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init || + check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init || + check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto || + diff --git a/ports/ffmpeg/0016-configure-dnn-needs-avformat.patch b/ports/ffmpeg/0016-configure-dnn-needs-avformat.patch new file mode 100644 index 00000000000000..e789e5bec27f02 --- /dev/null +++ b/ports/ffmpeg/0016-configure-dnn-needs-avformat.patch @@ -0,0 +1,25 @@ +From 7ca15b7f337b00a71384f748d05fce89fcf15a8d Mon Sep 17 00:00:00 2001 +From: "Matthias C. M. Troffaes" +Date: Tue, 4 May 2021 13:03:17 +0100 +Subject: [PATCH] configure: dnn needs avformat + +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 9e45c0822c..8725a94f8a 100755 +--- a/configure ++++ b/configure +@@ -2660,7 +2660,7 @@ cbs_vp9_select="cbs" + dct_select="rdft" + dirac_parse_select="golomb" + dnn_suggest="libtensorflow libopenvino" +-dnn_deps="swscale" ++dnn_deps="avformat swscale" + error_resilience_select="me_cmp" + faandct_deps="faan" + faandct_select="fdctdsp" +-- +2.25.1 + diff --git a/ports/ffmpeg/0017-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch b/ports/ffmpeg/0017-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch new file mode 100644 index 00000000000000..c80e51ad757971 --- /dev/null +++ b/ports/ffmpeg/0017-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch @@ -0,0 +1,44 @@ +From 6dd12a7210fb4cf2e69b6c83628021d83ba132c3 Mon Sep 17 00:00:00 2001 +From: "Don C. Bigler" +Date: Fri, 4 Dec 2020 12:39:55 -0500 +Subject: [PATCH] Patch for ticket #9019 CUDA Compile Broken Using MSVC + +Signed-off-by: Don C. Bigler +--- + compat/cuda/ptx2c.sh | 7 ++++--- + configure | 1 + + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/compat/cuda/ptx2c.sh b/compat/cuda/ptx2c.sh +index 48452379c2..1c486dc30e 100755 +--- a/compat/cuda/ptx2c.sh ++++ b/compat/cuda/ptx2c.sh +@@ -26,9 +26,10 @@ OUT="$1" + IN="$2" + NAME="$(basename "$IN" | sed 's/\..*//')" + +-printf "const char %s_ptx[] = \\" "$NAME" > "$OUT" ++printf "const char %s_ptx[] = {\\" "$NAME" > "$OUT" + echo >> "$OUT" +-sed -e "$(printf 's/\r//g')" -e 's/["\\]/\\&/g' -e "$(printf 's/^/\t"/')" -e 's/$/\\n"/' < "$IN" >> "$OUT" +-echo ";" >> "$OUT" ++xxd -i < "$IN" >> "$OUT" ++echo " ,0x00" >> "$OUT" ++echo "};" >> "$OUT" + + exit 0 +diff --git a/configure b/configure +index 1b1b140d6f..048e02355f 100755 +--- a/configure ++++ b/configure +@@ -1050,6 +1050,7 @@ test_nvcc(){ + tmpo_=$TMPO + [ -x "$(command -v cygpath)" ] && tmpcu_=$(cygpath -m $tmpcu_) && tmpo_=$(cygpath -m $tmpo_) + test_cmd $nvcc $nvccflags "$@" $NVCC_C $(nvcc_o $tmpo_) $tmpcu_ ++ test_cmd xxd + } + + check_nvcc() { +-- +2.26.2.windows.1 + diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL deleted file mode 100644 index abf59b857355f2..00000000000000 --- a/ports/ffmpeg/CONTROL +++ /dev/null @@ -1,50 +0,0 @@ -Source: ffmpeg -Version: 4.1-10 -Homepage: https://ffmpeg.org -Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. - FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. - -Feature: ffmpeg -Description: build the ffmpeg.exe application - -Feature: ffserver -Description: ffserver appplication support in ffmpeg - -Feature: ffplay -Description: ffplay appplication support in ffmpeg - -Feature: ffprobe -Description: ffprobe appplication support in ffmpeg - -Feature: openssl -Build-Depends: openssl, ffmpeg[nonfree] -Description: openssl support in ffmpeg - -Feature: lzma -Build-Depends: liblzma -Description: lzma support in ffmpeg - -Feature: bzip2 -Build-Depends: bzip2 -Description: bzip2 support in ffmpeg - -Feature: vpx -Build-Depends: libvpx -Description: WebM VP8/VP9 support in ffmpeg - -Feature: x264 -Build-Depends: x264, ffmpeg[gpl] -Description: x264 support in ffmpeg - -Feature: opencl -Build-Depends: opencl -Description: opencl support in ffmpeg - -Feature: nonfree -Description: allow nonfree and unredistributable libraries - -Feature: gpl -Description: allow GPL licensed libraries - -Feature: avresample -Description: Libav audio resampling library support in ffmpeg diff --git a/ports/ffmpeg/FindFFMPEG.cmake b/ports/ffmpeg/FindFFMPEG.cmake deleted file mode 100644 index b3c1873406ce66..00000000000000 --- a/ports/ffmpeg/FindFFMPEG.cmake +++ /dev/null @@ -1,171 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. -# -#.rst: -# FindFFMPEG -# -------- -# -# Find the FFPMEG libraries -# -# Result Variables -# ^^^^^^^^^^^^^^^^ -# -# The following variables will be defined: -# -# ``FFMPEG_FOUND`` -# True if FFMPEG found on the local system -# -# ``FFMPEG_INCLUDE_DIRS`` -# Location of FFMPEG header files -# -# ``FFMPEG_LIBRARY_DIRS`` -# Location of FFMPEG libraries -# -# ``FFMPEG_LIBRARIES`` -# List of the FFMPEG libraries found -# -# Hints -# ^^^^^ -# -# ``FFMPEG_ROOT`` -# Set this variable to a directory that contains a FFMPEG installation -# -# - -include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) -include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) -include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake) - -set(FFMPEG_VERSION "4.1") - -find_dependency(Threads) -#list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS Threads::Threads) -if(UNIX) - list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread) -endif() - -# Platform dependent libraries required by FFMPEG -if(WIN32) - if(NOT CYGWIN) - list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS wsock32 ws2_32 Secur32) - endif() -else() - list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS m) -endif() - -macro(FFMPEG_FIND varname shortname headername) - if(NOT FFMPEG_${varname}_INCLUDE_DIRS) - find_path(FFMPEG_${varname}_INCLUDE_DIRS NAMES lib${shortname}/${headername} ${headername} PATH_SUFFIXES ffmpeg) - endif() - if(NOT FFMPEG_${varname}_LIBRARY) - find_library(FFMPEG_${varname}_LIBRARY_RELEASE NAMES ${shortname} PATH_SUFFIXES ffmpeg ffmpeg/lib) - get_filename_component(FFMPEG_${varname}_LIBRARY_RELEASE_DIR ${FFMPEG_${varname}_LIBRARY_RELEASE} DIRECTORY) - find_library(FFMPEG_${varname}_LIBRARY_DEBUG NAMES ${shortname}d ${shortname} PATHS debug PATH_SUFFIXES ffmpeg ffmpeg/lib ffmpeg/debug/lib debug/ffmpeg/lib) - get_filename_component(FFMPEG_${varname}_LIBRARY_DEBUG_DIR ${FFMPEG_${varname}_LIBRARY_DEBUG} DIRECTORY) - select_library_configurations(FFMPEG_${varname}) - endif() - if (FFMPEG_${varname}_LIBRARY AND FFMPEG_${varname}_INCLUDE_DIRS) - set(FFMPEG_${varname}_FOUND 1) - list(APPEND FFMPEG_LIBRARY_DIRS ${FFMPEG_${varname}_LIBRARY_RELEASE_DIR} ${FFMPEG_${varname}_LIBRARY_DEBUG_DIR}) - endif() -endmacro(FFMPEG_FIND) - -macro(FFMPEG_FIND_GENEX varname shortname headername) - if(NOT FFMPEG_${varname}_INCLUDE_DIRS) - find_path(FFMPEG_${varname}_INCLUDE_DIRS NAMES lib${shortname}/${headername} ${headername} PATH_SUFFIXES ffmpeg) - endif() - if(NOT FFMPEG_${varname}_LIBRARY) - find_library(FFMPEG_${varname}_LIBRARY_RELEASE NAMES ${shortname} PATH_SUFFIXES ffmpeg ffmpeg/lib) - get_filename_component(FFMPEG_${varname}_LIBRARY_RELEASE_DIR ${FFMPEG_${varname}_LIBRARY_RELEASE} DIRECTORY) - find_library(FFMPEG_${varname}_LIBRARY_DEBUG NAMES ${shortname}d ${shortname} PATHS debug PATH_SUFFIXES ffmpeg ffmpeg/lib ffmpeg/debug/lib debug/ffmpeg/lib) - get_filename_component(FFMPEG_${varname}_LIBRARY_DEBUG_DIR ${FFMPEG_${varname}_LIBRARY_DEBUG} DIRECTORY) - set(FFMPEG_${varname}_LIBRARY "$<$:${FFMPEG_${varname}_LIBRARY_DEBUG}>$<$:${FFMPEG_${varname}_LIBRARY_RELEASE}>" CACHE STRING "") - set(FFMPEG_${varname}_LIBRARIES ${FFMPEG_${varname}_LIBRARY} CACHE STRING "") - endif() - if (FFMPEG_${varname}_LIBRARY AND FFMPEG_${varname}_INCLUDE_DIRS) - set(FFMPEG_${varname}_FOUND 1) - list(APPEND FFMPEG_LIBRARY_DIRS ${FFMPEG_${varname}_LIBRARY_RELEASE_DIR} ${FFMPEG_${varname}_LIBRARY_DEBUG_DIR}) - endif() -endmacro(FFMPEG_FIND_GENEX) - -if(WIN32) - if(NOT FFMPEG_${varname}_INCLUDE_DIRS) - find_path(FFMPEG_stdint_INCLUDE_DIRS NAMES stdint.h PATH_SUFFIXES ffmpeg) - endif() - if (FFMPEG_stdint_INCLUDE_DIRS) - set(STDINT_OK TRUE) - endif() - FFMPEG_FIND_GENEX(libzlib zlib zlib.h) -else() - set(STDINT_OK TRUE) - FFMPEG_FIND_GENEX(libzlib z zlib.h) -endif() - -if(APPLE) - find_library(VT_UNIT VideoToolbox) - if (NOT VT_UNIT) - message(FATAL_ERROR "VideoToolbox not found") - endif() - find_library(AT_UNIT AudioToolbox) - if (NOT AT_UNIT) - message(FATAL_ERROR "AudioToolbox not found") - endif() - find_library(SEC_UNIT Security) - if (NOT SEC_UNIT) - message(FATAL_ERROR "Security not found") - endif() - find_library(CF_UNIT CoreFoundation) - if (NOT CF_UNIT) - message(FATAL_ERROR "CoreFoundation not found") - endif() - find_library(CM_UNIT CoreMedia) - if (NOT CM_UNIT) - message(FATAL_ERROR "CoreMedia not found") - endif() - find_library(CV_UNIT CoreVideo) - if (NOT CV_UNIT) - message(FATAL_ERROR "CoreVideo not found") - endif() - find_package(Iconv QUIET) - list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${VT_UNIT} ${AT_UNIT} ${SEC_UNIT} ${CF_UNIT} ${CM_UNIT} ${CV_UNIT} ${Iconv_LIBRARIES}) -endif() - -FFMPEG_FIND(libavcodec avcodec avcodec.h) -FFMPEG_FIND(libavdevice avdevice avdevice.h) -FFMPEG_FIND(libavfilter avfilter avfilter.h) -FFMPEG_FIND(libavformat avformat avformat.h) -FFMPEG_FIND(libavutil avutil avutil.h) -FFMPEG_FIND(libswresample swresample swresample.h) -FFMPEG_FIND(libswscale swscale swscale.h) - -if (FFMPEG_libavcodec_FOUND AND FFMPEG_libavdevice_FOUND AND FFMPEG_libavfilter_FOUND AND FFMPEG_libavformat_FOUND AND FFMPEG_libavutil_FOUND AND FFMPEG_libswresample_FOUND AND FFMPEG_libswscale_FOUND AND FFMPEG_libzlib_FOUND AND STDINT_OK) - list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_libavformat_INCLUDE_DIRS} ${FFMPEG_libavdevice_INCLUDE_DIRS} ${FFMPEG_libavcodec_INCLUDE_DIRS} ${FFMPEG_libavutil_INCLUDE_DIRS} ${FFMPEG_libswscale_INCLUDE_DIRS} ${FFMPEG_stdint_INCLUDE_DIRS}) - list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS) - list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS) - - set(FFMPEG_libavformat_VERSION "${FFMPEG_VERSION}" CACHE STRING "") - set(FFMPEG_libavdevice_VERSION "${FFMPEG_VERSION}" CACHE STRING "") - set(FFMPEG_libavcodec_VERSION "${FFMPEG_VERSION}" CACHE STRING "") - set(FFMPEG_libavutil_VERSION "${FFMPEG_VERSION}" CACHE STRING "") - set(FFMPEG_libswscale_VERSION "${FFMPEG_VERSION}" CACHE STRING "") - set(FFMPEG_libavfilter_VERSION "${FFMPEG_VERSION}" CACHE STRING "") - set(FFMPEG_libswresample_VERSION "${FFMPEG_VERSION}" CACHE STRING "") - - list(APPEND FFMPEG_LIBRARIES - ${FFMPEG_libavformat_LIBRARY} - ${FFMPEG_libavdevice_LIBRARY} - ${FFMPEG_libavcodec_LIBRARY} - ${FFMPEG_libavutil_LIBRARY} - ${FFMPEG_libswscale_LIBRARY} - ${FFMPEG_libavfilter_LIBRARY} - ${FFMPEG_libswresample_LIBRARY} - ${FFMPEG_libzlib_LIBRARY} - ${FFMPEG_PLATFORM_DEPENDENT_LIBS} - ) - set(FFMPEG_LIBRARY ${FFMPEG_LIBRARIES}) - - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "") - set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "") - set(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBRARY_DIRS} CACHE STRING "") -endif() - -find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_LIBRARY_DIRS FFMPEG_INCLUDE_DIRS) diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in new file mode 100644 index 00000000000000..0c98b655884f97 --- /dev/null +++ b/ports/ffmpeg/FindFFMPEG.cmake.in @@ -0,0 +1,165 @@ +# Distributed under the OSI-approved BSD 3-Clause License. +# +#.rst: +# FindFFMPEG +# -------- +# +# Find the FFPMEG libraries +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# The following variables will be defined: +# +# ``FFMPEG_FOUND`` +# True if FFMPEG found on the local system +# +# ``FFMPEG_INCLUDE_DIRS`` +# Location of FFMPEG header files +# +# ``FFMPEG_LIBRARY_DIRS`` +# Location of FFMPEG libraries +# +# ``FFMPEG_LIBRARIES`` +# List of the FFMPEG libraries found +# +# + +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) +include(CMakeFindDependencyMacro) + +if(NOT FFMPEG_FOUND) + +# Compute the installation path relative to this file. +get_filename_component(SEARCH_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(SEARCH_PATH "${SEARCH_PATH}" PATH) +get_filename_component(SEARCH_PATH "${SEARCH_PATH}" PATH) +if(SEARCH_PATH STREQUAL "/") + set(SEARCH_PATH "") +endif() + +set(FFMPEG_VERSION "@FFMPEG_VERSION@") + +function(append_dependencies out) + cmake_parse_arguments(PARSE_ARGV 1 "arg" "DEBUG" "NAMES" "") + if(${arg_DEBUG}) + set(config DEBUG) + set(path "${CURRENT_INSTALLED_DIR}/debug/lib/") + else() + set(config RELEASE) + set(path "${CURRENT_INSTALLED_DIR}/lib/") + endif() + foreach(lib_name ${arg_NAMES}) + if("${lib_name}" STREQUAL "-pthread") + list(APPEND ${out} "-pthread") + elseif("${lib_name}" STREQUAL "-pthreads") + list(APPEND ${out} "-pthreads") + elseif("${lib_name}" STREQUAL "gcc") + list(APPEND ${out} "-lgcc") + elseif("${lib_name}" STREQUAL "gcc_s") + list(APPEND ${out} "-lgcc_s") + elseif("${lib_name}" STREQUAL "stdc++") + list(APPEND ${out} "-lstdc++") + else() + # first look in ${path} specifically to ensure we find the right release/debug variant + find_library(FFMPEG_DEPENDENCY_${lib_name}_${config} NAMES "${lib_name}" PATHS "${path}" NO_DEFAULT_PATH) + # if not found there, must be a system dependency, so look elsewhere + find_library(FFMPEG_DEPENDENCY_${lib_name}_${config} NAMES "${lib_name}" REQUIRED) + list(APPEND ${out} "${FFMPEG_DEPENDENCY_${lib_name}_${config}}") + endif() + endforeach() + set("${out}" "${${out}}" PARENT_SCOPE) +endfunction() + +macro(FFMPEG_FIND varname shortname headername) + if(NOT FFMPEG_${varname}_INCLUDE_DIRS) + find_path(FFMPEG_${varname}_INCLUDE_DIRS NAMES lib${shortname}/${headername} ${headername} PATHS ${SEARCH_PATH}/include NO_DEFAULT_PATH) + endif() + if(NOT FFMPEG_${varname}_LIBRARY) + find_library(FFMPEG_${varname}_LIBRARY_RELEASE NAMES ${shortname} PATHS ${SEARCH_PATH}/lib/ NO_DEFAULT_PATH) + find_library(FFMPEG_${varname}_LIBRARY_DEBUG NAMES ${shortname}d ${shortname} PATHS ${SEARCH_PATH}/debug/lib/ NO_DEFAULT_PATH) + get_filename_component(FFMPEG_${varname}_LIBRARY_RELEASE_DIR ${FFMPEG_${varname}_LIBRARY_RELEASE} DIRECTORY) + get_filename_component(FFMPEG_${varname}_LIBRARY_DEBUG_DIR ${FFMPEG_${varname}_LIBRARY_DEBUG} DIRECTORY) + select_library_configurations(FFMPEG_${varname}) + set(FFMPEG_${varname}_LIBRARY ${FFMPEG_${varname}_LIBRARY} CACHE STRING "") + endif() + if (FFMPEG_${varname}_LIBRARY AND FFMPEG_${varname}_INCLUDE_DIRS) + set(FFMPEG_${varname}_FOUND TRUE BOOL) + list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_${varname}_INCLUDE_DIRS}) + list(APPEND FFMPEG_LIBRARIES ${FFMPEG_${varname}_LIBRARY}) + list(APPEND FFMPEG_LIBRARY_DIRS ${FFMPEG_${varname}_LIBRARY_RELEASE_DIR} ${FFMPEG_${varname}_LIBRARY_DEBUG_DIR}) + endif() +endmacro(FFMPEG_FIND) + +if(@ENABLE_AVDEVICE@) + FFMPEG_FIND(libavdevice avdevice avdevice.h) +endif() +if(@ENABLE_AVFILTER@) + FFMPEG_FIND(libavfilter avfilter avfilter.h) +endif() +if(@ENABLE_AVFORMAT@) + FFMPEG_FIND(libavformat avformat avformat.h) +endif() +if(@ENABLE_AVCODEC@) + FFMPEG_FIND(libavcodec avcodec avcodec.h) +endif() +if(@ENABLE_AVRESAMPLE@) + FFMPEG_FIND(libavresample avresample avresample.h) +endif() +if(@ENABLE_POSTPROC@) + FFMPEG_FIND(libpostproc postproc postprocess.h) +endif() +if(@ENABLE_SWRESAMPLE@) + FFMPEG_FIND(libswresample swresample swresample.h) +endif() +if(@ENABLE_SWSCALE@) + FFMPEG_FIND(libswscale swscale swscale.h) +endif() +FFMPEG_FIND(libavutil avutil avutil.h) + +if (FFMPEG_libavutil_FOUND) + list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS) + list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS) + set(FFMPEG_libavutil_VERSION "@LIBAVUTIL_VERSION@" CACHE STRING "") + + if(FFMPEG_libavcodec_FOUND) + set(FFMPEG_libavcodec_VERSION "@LIBAVCODEC_VERSION@" CACHE STRING "") + endif() + if(FFMPEG_libavdevice_FOUND) + set(FFMPEG_libavdevice_VERSION "@LIBAVDEVICE_VERSION@" CACHE STRING "") + endif() + if(FFMPEG_libavfilter_FOUND) + set(FFMPEG_libavfilter_VERSION "@LIBAVFILTER_VERSION@" CACHE STRING "") + endif() + if(FFMPEG_libavformat_FOUND) + set(FFMPEG_libavformat_VERSION "@LIBAVFORMAT_VERSION@" CACHE STRING "") + endif() + if(FFMPEG_libavresample_FOUND) + set(FFMPEG_libavresample_VERSION "@LIBAVRESAMPLE_VERSION@" CACHE STRING "") + endif() + if(FFMPEG_libswresample_FOUND) + set(FFMPEG_libswresample_VERSION "@LIBSWRESAMPLE_VERSION@" CACHE STRING "") + endif() + if(FFMPEG_libswscale_FOUND) + set(FFMPEG_libswscale_VERSION "@LIBSWSCALE_VERSION@" CACHE STRING "") + endif() + + append_dependencies(FFMPEG_DEPS_LIBRARY_RELEASE NAMES "@FFMPEG_DEPENDENCIES_RELEASE@") + append_dependencies(FFMPEG_DEPS_LIBRARY_DEBUG NAMES "@FFMPEG_DEPENDENCIES_DEBUG@" DEBUG) + if(FFMPEG_DEPS_LIBRARY_RELEASE OR FFMPEG_DEPS_LIBRARY_DEBUG) + select_library_configurations(FFMPEG_DEPS) + list(APPEND FFMPEG_LIBRARIES ${FFMPEG_DEPS_LIBRARY}) + endif() + + set(FFMPEG_LIBRARY ${FFMPEG_LIBRARIES}) + + set(FFMPEG_FOUND TRUE CACHE BOOL "") + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "") + set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "") + set(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBRARY_DIRS} CACHE STRING "") +endif() + +find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_LIBRARY_DIRS FFMPEG_INCLUDE_DIRS) + +endif() diff --git a/ports/ffmpeg/build.sh b/ports/ffmpeg/build.sh deleted file mode 100644 index 048d9ec08d250c..00000000000000 --- a/ports/ffmpeg/build.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/bash -set -e -export PATH=/usr/bin:$PATH -# Export HTTP(S)_PROXY as http(s)_proxy: -if [ "$HTTP_PROXY" ]; then - export http_proxy=$HTTP_PROXY -fi -if [ "$HTTPS_PROXY" ]; then - export https_proxy=$HTTPS_PROXY -fi - -PATH_TO_BUILD_DIR="`cygpath "$1"`" -PATH_TO_SRC_DIR="`cygpath "$2"`" -PATH_TO_PACKAGE_DIR="`cygpath "$3"`" -# Note: $4 is extra configure options - -cd "$PATH_TO_BUILD_DIR" -echo "=== CONFIGURING ===" -"$PATH_TO_SRC_DIR/configure" --toolchain=msvc "--prefix=$PATH_TO_PACKAGE_DIR" $4 -echo "=== BUILDING ===" -make -j6 -echo "=== INSTALLING ===" -make install diff --git a/ports/ffmpeg/build.sh.in b/ports/ffmpeg/build.sh.in new file mode 100644 index 00000000000000..b7e53982c14f2c --- /dev/null +++ b/ports/ffmpeg/build.sh.in @@ -0,0 +1,126 @@ +#!/bin/sh + +set -e + +export PATH="/usr/bin:$PATH" + +command -v cygpath >/dev/null && have_cygpath=1 + +cygpath() { + if [ -n "$have_cygpath" ]; then + command cygpath "$@" + else + eval _p='$'$# + printf '%s\n' "$_p" + fi +} + +move_binary() { + SOURCE=$1 + TARGET=$2 + BINARY=$3 + + # run lipo over the command to check whether it really + # is a binary that we need to merge architectures + lipo $SOURCE/$BINARY -info &> /dev/null || return 0 + + # get the directory name the file is in + DIRNAME=$(dirname $BINARY) + + # ensure the directory to move the binary to exists + mkdir -p $TARGET/$DIRNAME + + # now finally move the binary + mv $SOURCE/$BINARY $TARGET/$BINARY +} + +move_binaries() { + SOURCE=$1 + TARGET=$2 + + [ ! -d $SOURCE ] && return 0 + pushd $SOURCE + + for BINARY in $(find . -type f); do + move_binary $SOURCE $TARGET $BINARY + done + + popd +} + +merge_binaries() { + TARGET=$1 + SOURCE=$2 + + shift + shift + + pushd $SOURCE/$1 + BINARIES=$(find . -type f) + popd + + for BINARY in $BINARIES; do + COMMAND="lipo -create -output $TARGET/$BINARY" + + for ARCH in $@; do + COMMAND="$COMMAND -arch $ARCH $SOURCE/$ARCH/$BINARY" + done + + $($COMMAND) + done +} + +export PKG_CONFIG_PATH="$(cygpath -p "${PKG_CONFIG_PATH}")" + +# Export HTTP(S)_PROXY as http(s)_proxy: +[ -n "$HTTP_PROXY" ] && export http_proxy="$HTTP_PROXY" +[ -n "$HTTPS_PROXY" ] && export https_proxy="$HTTPS_PROXY" + +PATH_TO_BUILD_DIR=$( cygpath "@BUILD_DIR@") +PATH_TO_SRC_DIR=$( cygpath "@SOURCE_PATH@") +PATH_TO_PACKAGE_DIR=$(cygpath "@INST_PREFIX@") + +JOBS=@VCPKG_CONCURRENCY@ + +OSX_ARCHS="@OSX_ARCHS@" +OSX_ARCH_COUNT=0@OSX_ARCH_COUNT@ + +# Default to hardware concurrency if unset. +: ${JOBS:=$(nproc)} + +build_ffmpeg() { + echo "=== CONFIGURING ===" + + sh "$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" @CONFIGURE_OPTIONS@ $@ + + echo "=== BUILDING ===" + + make -j${JOBS} + + echo "=== INSTALLING ===" + + make install +} + +cd "$PATH_TO_BUILD_DIR" + +if [ $OSX_ARCH_COUNT -gt 1 ]; then + for ARCH in $OSX_ARCHS; do + echo "=== CLEANING FOR $ARCH ===" + + make clean && make distclean + + build_ffmpeg --enable-cross-compile --arch=$ARCH --extra-cflags=-arch --extra-cflags=$ARCH --extra-ldflags=-arch --extra-ldflags=$ARCH + + echo "=== COLLECTING BINARIES FOR $ARCH ===" + + move_binaries $PATH_TO_PACKAGE_DIR/lib $PATH_TO_BUILD_DIR/stage/$ARCH/lib + move_binaries $PATH_TO_PACKAGE_DIR/bin $PATH_TO_BUILD_DIR/stage/$ARCH/bin + done + + echo "=== MERGING ARCHITECTURES ===" + + merge_binaries $PATH_TO_PACKAGE_DIR $PATH_TO_BUILD_DIR/stage $OSX_ARCHS +else + build_ffmpeg +fi diff --git a/ports/ffmpeg/build_linux.sh b/ports/ffmpeg/build_linux.sh deleted file mode 100644 index b24be1346d3c45..00000000000000 --- a/ports/ffmpeg/build_linux.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/bash -set -e -export PATH=/usr/bin:$PATH -# Export HTTP(S)_PROXY as http(s)_proxy: -if [ "$HTTP_PROXY" ]; then - export http_proxy=$HTTP_PROXY -fi -if [ "$HTTPS_PROXY" ]; then - export https_proxy=$HTTPS_PROXY -fi - -PATH_TO_BUILD_DIR=$1 -PATH_TO_SRC_DIR=$2 -PATH_TO_PACKAGE_DIR=$3 -# Note: $4 is extra configure options - -cd "$PATH_TO_BUILD_DIR" -echo "=== CONFIGURING ===" -"$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" $4 -echo "=== BUILDING ===" -make -j6 -echo "=== INSTALLING ===" -make install diff --git a/ports/ffmpeg/create-lib-libraries.patch b/ports/ffmpeg/create-lib-libraries.patch deleted file mode 100644 index ccad5ff8c8eb28..00000000000000 --- a/ports/ffmpeg/create-lib-libraries.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5f7c72d6c93fb1f4a730e2315fff6e5eb9bb95c8 Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Wed, 27 Sep 2017 15:50:40 +0200 -Subject: [PATCH] configure: create .lib static libraries using MSVC compiler - (instead of .a) - ---- - configure | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/configure b/configure -index ba38a73906..0a3f308323 100755 ---- a/configure -+++ b/configure -@@ -4890,15 +4890,17 @@ - ;; - win32|win64) - disable symver -- if enabled shared; then -+# if enabled shared; then - # Link to the import library instead of the normal static library - # for shared libs. - LD_LIB='%.lib' - # Cannot build both shared and static libs with MSVC or icl. -- disable static -- fi -+# disable static -+# fi - enabled x86_32 && check_ldflags -LARGEADDRESSAWARE - shlibdir_default="$bindir_default" -+ LIBPREF="" -+ LIBSUF=".lib" - SLIBPREF="" - SLIBSUF=".dll" - SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' --- -2.14.1.windows.1 - diff --git a/ports/ffmpeg/detect-openssl.patch b/ports/ffmpeg/detect-openssl.patch deleted file mode 100644 index affd37d15013de..00000000000000 --- a/ports/ffmpeg/detect-openssl.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 18de5c60ae0a987680681d5a0602009b428504fa Mon Sep 17 00:00:00 2001 -From: Gilles Khouzam -Date: Mon, 19 Jun 2017 16:33:38 -0700 -Subject: [PATCH] Add better detection for Openssl on Windows. - -Look for libeay32 and ssleay32 as another detection mechanism ---- - configure | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/configure b/configure -index a1818dc..1cf2a7c 100755 ---- a/configure -+++ b/configure -@@ -6127,6 +6127,7 @@ - check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || - check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 || - check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || -+ check_lib openssl openssl/ssl.h SSL_library_init -llibeay32 -lssleay32 || - die "ERROR: openssl not found"; } - enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create && - require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.7" rockchip/rk_mpi.h mpp_create && diff --git a/ports/ffmpeg/fix-debug-build.patch b/ports/ffmpeg/fix-debug-build.patch deleted file mode 100644 index 324eb79f97ef3e..00000000000000 --- a/ports/ffmpeg/fix-debug-build.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/configure b/configure -index 7c5b8a1..181fc47 100644 ---- a/configure -+++ b/configure -@@ -3906,6 +3906,9 @@ for opt do - --libfuzzer=*) - libfuzzer_path="$optval" - ;; -+ --debug) -+ enable debug_configure -+ ;; - *) - optname="${opt%%=*}" - optname="${optname#--}" -@@ -6037,8 +6040,13 @@ fi - - enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion || - check_lib zlib zlib.h zlibVersion -lz; } --enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2 --enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma -+if enabled debug_configure; then -+ enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2d -+ enabled lzma && check_lib lzma lzma.h lzma_version_number -llzmad -+else -+ enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2 -+ enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma -+fi - - # On some systems dynamic loading requires no extra linker flags - check_lib libdl dlfcn.h "dlopen dlsym" || check_lib libdl dlfcn.h "dlopen dlsym" -ldl diff --git a/ports/ffmpeg/fix_libvpx_windows_linking.patch b/ports/ffmpeg/fix_libvpx_windows_linking.patch deleted file mode 100644 index 805cd7e78c20a9..00000000000000 --- a/ports/ffmpeg/fix_libvpx_windows_linking.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git "a/configure" "b/configure" -index c8be177..2fef830 100644 ---- "a/configure" -+++ "b/configure" -@@ -5098,6 +5098,8 @@ case "$arch" in - ;; - esac - -+libvpx_name=vpx -+ - # OS specific - case $target_os in - aix) -@@ -5269,6 +5271,15 @@ case $target_os in - enabled x86_64 && objformat="win64" || objformat="win32" - ranlib=: - enable dos_paths -+ if [ -z "${extra_cflags##*-MDd*}" ]; then -+ libvpx_name=vpxmdd -+ elif [ -z "${extra_cflags##*-MD*}" ]; then -+ libvpx_name=vpxmd -+ elif [ -z "${extra_cflags##*-MTd*}" ]; then -+ libvpx_name=vpxmtd -+ elif [ -z "${extra_cflags##*-MT*}" ]; then -+ libvpx_name=vpxmt -+ fi - ;; - cygwin*) - target_os=cygwin -@@ -6153,21 +6164,21 @@ enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h - enabled libvpx && { - enabled libvpx_vp8_decoder && { - check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx || -- check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx || -+ check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -l$libvpx_name || - die "ERROR: libvpx decoder version must be >=1.4.0"; - } - enabled libvpx_vp8_encoder && { - check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx || -- check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx || -+ check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -l$libvpx_name || - die "ERROR: libvpx encoder version must be >=1.4.0"; - } - enabled libvpx_vp9_decoder && { - check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx || -- check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs" -+ check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs" - } - enabled libvpx_vp9_encoder && { - check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx || -- check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs" -+ check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs" - } - if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then - die "libvpx enabled but no supported decoders found" diff --git a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch b/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch deleted file mode 100644 index 09ee1219fe2df7..00000000000000 --- a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/fftools/cmdutils.c 2017-07-29 19:49:29.000000000 +0200 -+++ b/fftools/cmdutils.c 2018-09-02 20:31:42.509408400 +0200 -@@ -62,6 +62,8 @@ - #include - #endif - #ifdef _WIN32 -+#define _WIN32_WINNT 0x0600 -+#define WIN32_LEAN_AND_MEAN - #include - #endif - diff --git a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch b/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch deleted file mode 100644 index 69d725e2a17446..00000000000000 --- a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/fftools/ffmpeg.c 2017-07-29 19:49:29.000000000 +0200 -+++ b/fftools/ffmpeg.c 2018-09-02 20:32:27.666725200 +0200 -@@ -23,6 +23,11 @@ - * multimedia converter based on the FFmpeg libraries - */ - -+#define _WIN32_WINNT 0x0502 // Must be less than 0x0600, because otherwise WinSock2.h defines "pollfd" which then gets redefined in "os_support.h". -+ // I suppose that "HAVE_STRUCT_POLLFD" should be 1, but it happens to be 0. Sorry, this is somewhat beyond me. -+#define WIN32_LEAN_AND_MEAN -+ -+ - #include "config.h" - #include - #include diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 079880ab304f4f..d4451b4029f44a 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -1,67 +1,232 @@ -include(vcpkg_common_functions) +#Check for unsupported features -vcpkg_download_distfile(ARCHIVE - URLS "http://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2" - FILENAME "ffmpeg-4.1.tar.bz2" - SHA512 ccf6d07268dc47e08ca619eb182a003face2a8ee73ec1a28157330dd7de1df88939def1fc1c7e6b6ac7b59752cdad84657d589b2fafb73e14e5ef03fb6e33417 -) +if("ffmpeg" IN_LIST FEATURES) + vcpkg_fail_port_install(ON_TARGET "UWP" MESSAGE "Feature 'ffmpeg' does not support 'uwp'") +endif() + +if("ffplay" IN_LIST FEATURES) + vcpkg_fail_port_install(ON_TARGET "UWP" MESSAGE "Feature 'ffplay' does not support 'uwp'") +endif() + +if("ffprobe" IN_LIST FEATURES) + vcpkg_fail_port_install(ON_TARGET "UWP" MESSAGE "Feature 'ffprobe' does not support 'uwp'") +endif() -vcpkg_extract_source_archive_ex( + +if("ass" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "Feature 'ass' does not support 'uwp | arm'") + endif() +endif() + +if("avisynthplus" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR (NOT VCPKG_TARGET_IS_WINDOWS) OR (VCPKG_LIBRARY_LINKAGE STREQUAL "static")) + message(FATAL_ERROR "Feature 'avisynthplus' does not support '!windows | arm | uwp | static'") + endif() +endif() + +if("dav1d" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "Feature 'dav1d' does not support 'uwp | arm | x86 | osx'") + endif() +endif() + +if("fontconfig" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP OR (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")) + message(FATAL_ERROR "Feature 'fontconfig' does not support 'uwp | arm | (windows & static)'") + endif() +endif() + +if("fribidi" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "Feature 'fribidi' does not support 'uwp | arm'") + endif() +endif() + +if("ilbc" IN_LIST FEATURES) + if ((VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") AND VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "Feature 'ilbc' does not support 'uwp & arm'") + endif() +endif() + +if("modplug" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "Feature 'modplug' does not support 'uwp'") + endif() +endif() + +if("nvcodec" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR ((NOT VCPKG_TARGET_IS_WINDOWS) AND (NOT VCPKG_TARGET_IS_LINUX))) + message(FATAL_ERROR "Feature 'nvcodec' does not support '!(windows | linux) | uwp | arm'") + endif() +endif() + +if("opencl" IN_LIST FEATURES) + vcpkg_fail_port_install(ON_TARGET "UWP" MESSAGE "Feature 'opencl' does not support 'uwp'") +endif() + +if("opengl" IN_LIST FEATURES) + if (((VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") AND VCPKG_TARGET_IS_WINDOWS) OR VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "Feature 'opengl' does not support 'uwp | (windows & arm)") + endif() +endif() + +if("openh264" IN_LIST FEATURES) + vcpkg_fail_port_install(ON_TARGET "UWP" MESSAGE "Feature 'openh264' does not support 'uwp'") +endif() + +if("sdl2" IN_LIST FEATURES) + vcpkg_fail_port_install(ON_TARGET "OSX" MESSAGE "Feature 'sdl2' does not support 'osx'") +endif() + +if("ssh" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP OR VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Feature 'ssh' does not support 'uwp | arm | static'") + endif() +endif() + +if("tensorflow" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP OR VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + message(FATAL_ERROR "Feature 'tensorflow' does not support 'x86 | arm | uwp | static'") + endif() +endif() + +if("tesseract" IN_LIST FEATURES) + if (((VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") AND VCPKG_TARGET_IS_WINDOWS) OR VCPKG_TARGET_IS_UWP OR VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Feature 'tesseract' does not support 'uwp | (windows & arm) | static'") + endif() +endif() + +if("wavpack" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + message(FATAL_ERROR "Feature 'wavpack' does not support 'arm'") + endif() +endif() + +if("x264" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + message(FATAL_ERROR "Feature 'x264' does not support 'arm'") + endif() +endif() + +if("x265" IN_LIST FEATURES) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "Feature 'x265' does not support 'uwp | arm'") + endif() +endif() + +if("xml2" IN_LIST FEATURES) + if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Feature 'xml2' does not support 'static'") + endif() +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + set(PATCHES 0017-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch) # https://trac.ffmpeg.org/ticket/9019 +endif() +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + REPO ffmpeg/ffmpeg + REF n4.4 + SHA512 ae7426ca476df9fa9dba52cab06c38e484f835653fb2da57e7c06f5589d887c0854ee17df93a2f57191d498c1264cb1c69312cf0a8214b476800382e2d260c4b + HEAD_REF master PATCHES - create-lib-libraries.patch - detect-openssl.patch - fix_windowsinclude-in-ffmpegexe-1.patch - fix_windowsinclude-in-ffmpegexe-2.patch - fix_libvpx_windows_linking.patch - fix-debug-build.patch + 0001-create-lib-libraries.patch + 0003-fix-windowsinclude.patch + 0004-fix-debug-build.patch + 0006-fix-StaticFeatures.patch + 0007-fix-lib-naming.patch + 0009-Fix-fdk-detection.patch + 0010-Fix-x264-detection.patch + 0011-Fix-x265-detection.patch + 0012-Fix-ssl-110-detection.patch + 0013-define-WINVER.patch + 0014-avfilter-dependency-fix.patch # http://ffmpeg.org/pipermail/ffmpeg-devel/2021-February/275819.html + 0015-Fix-xml2-detection.patch + 0016-configure-dnn-needs-avformat.patch # http://ffmpeg.org/pipermail/ffmpeg-devel/2021-May/279926.html + ${PATCHES} ) -if (${SOURCE_PATH} MATCHES " ") +if (SOURCE_PATH MATCHES " ") message(FATAL_ERROR "Error: ffmpeg will not build with spaces in the path. Please use a directory with no spaces") endif() -vcpkg_find_acquire_program(YASM) -get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) -if(VCPKG_TARGET_IS_WINDOWS) - set(SEP ";") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + # ffmpeg nasm build gives link error on x86, so fall back to yasm + vcpkg_find_acquire_program(YASM) + get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) + vcpkg_add_to_path(${YASM_EXE_PATH}) +else() + vcpkg_find_acquire_program(NASM) + get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) + vcpkg_add_to_path(${NASM_EXE_PATH}) +endif() + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) #We're assuming that if we're building for Windows we're using MSVC set(INCLUDE_VAR "INCLUDE") set(LIB_PATH_VAR "LIB") else() - set(SEP ":") set(INCLUDE_VAR "CPATH") set(LIB_PATH_VAR "LIBRARY_PATH") endif() -if(VCPKG_TARGET_IS_WINDOWS) - set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") +set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect") - set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPTIONS "${OPTIONS} --disable-asm --disable-x86asm") +endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPTIONS "${OPTIONS} --enable-asm --disable-x86asm") +endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(OPTIONS "${OPTIONS} --enable-asm --enable-x86asm") +endif() +if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make) + vcpkg_acquire_msys(MSYS_ROOT + DIRECT_PACKAGES + # Required for "cpp.exe" preprocessor + "https://repo.msys2.org/msys/x86_64/gcc-9.3.0-1-x86_64.pkg.tar.xz" + 76af0192a092278e6b26814b2d92815a2c519902a3fec056b057faec19623b1770ac928a59a39402db23cfc23b0d7601b7f88b367b27269361748c69d08654b2 + "https://repo.msys2.org/msys/x86_64/isl-0.22.1-1-x86_64.pkg.tar.xz" + f4db50d00bad0fa0abc6b9ad965b0262d936d437a9faa35308fa79a7ee500a474178120e487b2db2259caf51524320f619e18d92acf4f0b970b5cbe5cc0f63a2 + "https://repo.msys2.org/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz" + b607da40d3388b440f2a09e154f21966cd55ad77e02d47805f78a9dee5de40226225bf0b8335fdfd4b83f25ead3098e9cb974d4f202f28827f8468e30e3b790d + "https://repo.msys2.org/msys/x86_64/mpc-1.1.0-1-x86_64.pkg.tar.xz" + 7d0715c41c27fdbf91e6dcc73d6b8c02ee62c252e027f0a17fa4bfb974be8a74d8e3a327ef31c2460721902299ef69a7ef3c7fce52c8f02ce1cb47f0b6e073e9 + "https://repo.msys2.org/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst" + d64fa60e188124591d41fc097d7eb51d7ea4940bac05cdcf5eafde951ed1eaa174468f5ede03e61106e1633e3428964b34c96de76321ed8853b398fbe8c4d072 + "https://repo.msys2.org/msys/x86_64/gmp-6.2.0-1-x86_64.pkg.tar.xz" + 1389a443e775bb255d905665dd577bef7ed71d51a8c24d118097f8119c08c4dfe67505e88ddd1e9a3764dd1d50ed8b84fa34abefa797d257e90586f0cbf54de8 + ) else() - vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make) + vcpkg_acquire_msys(MSYS_ROOT) endif() - set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + set(SHELL ${MSYS_ROOT}/usr/bin/bash.exe) + if(VCPKG_TARGET_IS_MINGW) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(OPTIONS "--target-os=mingw32 ${OPTIONS}") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(OPTIONS "--target-os=mingw64 ${OPTIONS}") + endif() + else() + set(OPTIONS "--toolchain=msvc ${OPTIONS}") + endif() else() - set(ENV{PATH} "$ENV{PATH}:${YASM_EXE_PATH}") - set(BASH /bin/bash) - set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/build_linux.sh) + set(SHELL /bin/sh) endif() -set(ENV{${INCLUDE_VAR}} "${CURRENT_INSTALLED_DIR}/include${SEP}$ENV{${INCLUDE_VAR}}") +set(ENV{${INCLUDE_VAR}} "${CURRENT_INSTALLED_DIR}/include${VCPKG_HOST_PATH_SEPARATOR}$ENV{${INCLUDE_VAR}}") set(_csc_PROJECT_PATH ffmpeg) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -set(OPTIONS "--enable-asm --enable-yasm --disable-doc --enable-debug") -set(OPTIONS "${OPTIONS} --enable-runtime-cpudetect") +set(FFMPEG_PKGCONFIG_MODULES libavutil) if("nonfree" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-nonfree") @@ -71,10 +236,8 @@ if("gpl" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-gpl") endif() -if("openssl" IN_LIST FEATURES) - set(OPTIONS "${OPTIONS} --enable-openssl") -else() - set(OPTIONS "${OPTIONS} --disable-openssl") +if("version3" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-version3") endif() if("ffmpeg" IN_LIST FEATURES) @@ -95,166 +258,655 @@ else() set(OPTIONS "${OPTIONS} --disable-ffprobe") endif() +if("avcodec" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avcodec") + set(ENABLE_AVCODEC ON) + list(APPEND FFMPEG_PKGCONFIG_MODULES libavcodec) +else() + set(OPTIONS "${OPTIONS} --disable-avcodec") + set(ENABLE_AVCODEC OFF) +endif() + +if("avdevice" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avdevice") + set(ENABLE_AVDEVICE ON) + list(APPEND FFMPEG_PKGCONFIG_MODULES libavdevice) +else() + set(OPTIONS "${OPTIONS} --disable-avdevice") + set(ENABLE_AVDEVICE OFF) +endif() + +if("avformat" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avformat") + set(ENABLE_AVFORMAT ON) + list(APPEND FFMPEG_PKGCONFIG_MODULES libavformat) +else() + set(OPTIONS "${OPTIONS} --disable-avformat") + set(ENABLE_AVFORMAT OFF) +endif() + +if("avfilter" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avfilter") + set(ENABLE_AVFILTER ON) + list(APPEND FFMPEG_PKGCONFIG_MODULES libavfilter) +else() + set(OPTIONS "${OPTIONS} --disable-avfilter") + set(ENABLE_AVFILTER OFF) +endif() + +if("postproc" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-postproc") + set(ENABLE_POSTPROC ON) + list(APPEND FFMPEG_PKGCONFIG_MODULES libpostproc) +else() + set(OPTIONS "${OPTIONS} --disable-postproc") + set(ENABLE_POSTPROC OFF) +endif() + +if("swresample" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-swresample") + set(ENABLE_SWRESAMPLE ON) + list(APPEND FFMPEG_PKGCONFIG_MODULES libswresample) +else() + set(OPTIONS "${OPTIONS} --disable-swresample") + set(ENABLE_SWRESAMPLE OFF) +endif() + +if("swscale" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-swscale") + set(ENABLE_SWSCALE ON) + list(APPEND FFMPEG_PKGCONFIG_MODULES libswscale) +else() + set(OPTIONS "${OPTIONS} --disable-swscale") + set(ENABLE_SWSCALE OFF) +endif() + +set(ENABLE_AVRESAMPLE OFF) +if("avresample" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avresample") + set(ENABLE_AVRESAMPLE ON) + list(APPEND FFMPEG_PKGCONFIG_MODULES libavresample) +endif() + +set(STATIC_LINKAGE OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(STATIC_LINKAGE ON) +endif() + +if("ass" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libass") +else() + set(OPTIONS "${OPTIONS} --disable-libass") +endif() + +if("avisynthplus" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avisynth") +else() + set(OPTIONS "${OPTIONS} --disable-avisynth") +endif() + +if("bzip2" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-bzlib") +else() + set(OPTIONS "${OPTIONS} --disable-bzlib") +endif() + +if("dav1d" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libdav1d") +else() + set(OPTIONS "${OPTIONS} --disable-libdav1d") +endif() + +if("fdk-aac" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libfdk-aac") +else() + set(OPTIONS "${OPTIONS} --disable-libfdk-aac") +endif() + +if("fontconfig" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libfontconfig") +else() + set(OPTIONS "${OPTIONS} --disable-libfontconfig") +endif() + +if("freetype" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libfreetype") +else() + set(OPTIONS "${OPTIONS} --disable-libfreetype") +endif() + +if("fribidi" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libfribidi") +else() + set(OPTIONS "${OPTIONS} --disable-libfribidi") +endif() + +if("iconv" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-iconv") +else() + set(OPTIONS "${OPTIONS} --disable-iconv") +endif() + +if("ilbc" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libilbc") +else() + set(OPTIONS "${OPTIONS} --disable-libilbc") +endif() + +if("lzma" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-lzma") +else() + set(OPTIONS "${OPTIONS} --disable-lzma") +endif() + +if("mp3lame" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libmp3lame") +else() + set(OPTIONS "${OPTIONS} --disable-libmp3lame") +endif() + +if("modplug" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libmodplug") +else() + set(OPTIONS "${OPTIONS} --disable-libmodplug") +endif() + +if("nvcodec" IN_LIST FEATURES) + #Note: the --enable-cuda option does not actually require the cuda sdk or toolset port dependency as ffmpeg uses runtime detection and dynamic loading + set(OPTIONS "${OPTIONS} --enable-cuda --enable-nvenc --enable-nvdec --enable-cuvid --enable-ffnvcodec") +else() + set(OPTIONS "${OPTIONS} --disable-cuda --disable-nvenc --disable-nvdec --disable-cuvid --disable-ffnvcodec") +endif() + +if("opencl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-opencl") +else() + set(OPTIONS "${OPTIONS} --disable-opencl") +endif() + +if("opengl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-opengl") +else() + set(OPTIONS "${OPTIONS} --disable-opengl") +endif() + +if("openh264" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libopenh264") +else() + set(OPTIONS "${OPTIONS} --disable-libopenh264") +endif() + +if("openjpeg" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libopenjpeg") +else() + set(OPTIONS "${OPTIONS} --disable-libopenjpeg") +endif() + +if("openssl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-openssl") +else() + set(OPTIONS "${OPTIONS} --disable-openssl") +endif() + +if("opus" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libopus") +else() + set(OPTIONS "${OPTIONS} --disable-libopus") +endif() + +if("sdl2" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-sdl2") +else() + set(OPTIONS "${OPTIONS} --disable-sdl2") +endif() + +if("snappy" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libsnappy") +else() + set(OPTIONS "${OPTIONS} --disable-libsnappy") +endif() + +if("soxr" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libsoxr") +else() + set(OPTIONS "${OPTIONS} --disable-libsoxr") +endif() + +if("speex" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libspeex") +else() + set(OPTIONS "${OPTIONS} --disable-libspeex") +endif() + +if("ssh" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libssh") +else() + set(OPTIONS "${OPTIONS} --disable-libssh") +endif() + +if("tensorflow" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libtensorflow") +else() + set(OPTIONS "${OPTIONS} --disable-libtensorflow") +endif() + +if("tesseract" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libtesseract") +else() + set(OPTIONS "${OPTIONS} --disable-libtesseract") +endif() + +if("theora" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libtheora") +else() + set(OPTIONS "${OPTIONS} --disable-libtheora") +endif() + +if("vorbis" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libvorbis") +else() + set(OPTIONS "${OPTIONS} --disable-libvorbis") +endif() + if("vpx" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-libvpx") else() set(OPTIONS "${OPTIONS} --disable-libvpx") endif() +if("webp" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libwebp") +else() + set(OPTIONS "${OPTIONS} --disable-libwebp") +endif() + if("x264" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-libx264") else() set(OPTIONS "${OPTIONS} --disable-libx264") endif() -if("opencl" IN_LIST FEATURES) - set(OPTIONS "${OPTIONS} --enable-opencl") +if("x265" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libx265") else() - set(OPTIONS "${OPTIONS} --disable-opencl") + set(OPTIONS "${OPTIONS} --disable-libx265") endif() -if("lzma" IN_LIST FEATURES) - set(OPTIONS "${OPTIONS} --enable-lzma") +if("xml2" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libxml2") else() - set(OPTIONS "${OPTIONS} --disable-lzma") + set(OPTIONS "${OPTIONS} --disable-libxml2") endif() -if("bzip2" IN_LIST FEATURES) - set(OPTIONS "${OPTIONS} --enable-bzlib") +if("zlib" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-zlib") else() - set(OPTIONS "${OPTIONS} --disable-bzlib") + set(OPTIONS "${OPTIONS} --disable-zlib") endif() -if("avresample" IN_LIST FEATURES) - set(OPTIONS "${OPTIONS} --enable-avresample") +vcpkg_cmake_get_vars(cmake_vars_file) +include("${cmake_vars_file}") + +if (VCPKG_TARGET_IS_OSX) + # if the sysroot isn't set in the triplet we fall back to whatever CMake detected for us + if ("${VCPKG_OSX_SYSROOT}" STREQUAL "") + set(VCPKG_OSX_SYSROOT ${VCPKG_DETECTED_CMAKE_OSX_SYSROOT}) + endif() + + set(OPTIONS "${OPTIONS} --disable-vdpau") # disable vdpau in OSX + set(OPTIONS "${OPTIONS} --extra-cflags=\"-isysroot ${VCPKG_OSX_SYSROOT}\"") + set(OPTIONS "${OPTIONS} --extra-ldflags=\"-isysroot ${VCPKG_OSX_SYSROOT}\"") + + list(JOIN VCPKG_OSX_ARCHITECTURES " " OSX_ARCHS) + LIST(LENGTH VCPKG_OSX_ARCHITECTURES OSX_ARCH_COUNT) endif() set(OPTIONS_CROSS "") if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") - vcpkg_find_acquire_program(GASPREPROCESSOR) - foreach(GAS_PATH ${GASPREPROCESSOR}) - get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) - set(ENV{PATH} "$ENV{PATH};${GAS_ITEM_PATH}") - endforeach(GAS_PATH) + if(VCPKG_TARGET_IS_WINDOWS) + set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") + vcpkg_find_acquire_program(GASPREPROCESSOR) + foreach(GAS_PATH ${GASPREPROCESSOR}) + get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) + set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${GAS_ITEM_PATH}") + endforeach(GAS_PATH) + elseif(VCPKG_TARGET_IS_OSX AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "${VCPKG_DETECTED_CMAKE_SYSTEM_PROCESSOR}") # VCPKG_TARGET_ARCHITECTURE = arm64 + # get the number of architectures requested + list(LENGTH VCPKG_OSX_ARCHITECTURES ARCHITECTURE_COUNT) + + # ideally we should check the CMAKE_HOST_SYSTEM_PROCESSOR, but that seems to be + # broken when inside a vcpkg port, so we only set it when doing a simple build + # for a single platform. multi-platform builds use a different script + if (ARCHITECTURE_COUNT LESS 2) + message(STATUS "Building on host: ${CMAKE_SYSTEM_PROCESSOR}") + set(OPTIONS_CROSS " --enable-cross-compile --target-os=darwin --arch=arm64 --extra-ldflags=-arch --extra-ldflags=arm64 --extra-cflags=-arch --extra-cflags=arm64 --extra-cxxflags=-arch --extra-cxxflags=arm64") + endif() + endif() elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + if(VCPKG_TARGET_IS_OSX) + set(OPTIONS_CROSS " --enable-cross-compile --target-os=darwin --arch=x86_64 --extra-ldflags=-arch --extra-ldflags=x86_64 --extra-cflags=-arch --extra-cflags=x86_64 --extra-cxxflags=-arch --extra-cxxflags=x86_64") + endif() elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") else() message(FATAL_ERROR "Unsupported architecture") endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_UWP) set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") set(OPTIONS "${OPTIONS} --disable-programs") set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") endif() -set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html +set(OPTIONS_DEBUG "--debug") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html set(OPTIONS_RELEASE "") set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}") -set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(OPTIONS "${OPTIONS} --disable-static --enable-shared") - if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if (VCPKG_TARGET_IS_UWP) set(OPTIONS "${OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") endif() endif() -message(STATUS "Building Options: ${OPTIONS}") - -if(VCPKG_TARGET_IS_WINDOWS) +if(VCPKG_TARGET_IS_MINGW) + set(OPTIONS "${OPTIONS} --extra_cflags=-D_WIN32_WINNT=0x0601") +elseif(VCPKG_TARGET_IS_WINDOWS) + set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0") if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd --debug") + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd") set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MD --extra-cxxflags=-MD") else() - set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd --debug") + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd") set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MT --extra-cxxflags=-MT") endif() endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(OPTIONS "${OPTIONS} --pkg-config-flags=--static") +endif() + set(ENV_LIB_PATH "$ENV{${LIB_PATH_VAR}}") -# Relase build -if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) - message(STATUS "Building Relase Options: ${OPTIONS_RELEASE}") - set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/lib${SEP}${ENV_LIB_PATH}") +message(STATUS "Building Options: ${OPTIONS}") + +# Release build +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building Release Options: ${OPTIONS_RELEASE}") + set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/lib${VCPKG_HOST_PATH_SEPARATOR}${ENV_LIB_PATH}") + set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}") + set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") + set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig") message(STATUS "Building ${_csc_PROJECT_PATH} for Release") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + + set(BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + set(CONFIGURE_OPTIONS "${OPTIONS} ${OPTIONS_RELEASE}") + set(INST_PREFIX "${CURRENT_PACKAGES_DIR}") + + configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY) + vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" # BUILD DIR - "${SOURCE_PATH}" # SOURCE DIR - "${CURRENT_PACKAGES_DIR}" # PACKAGE DIR - "${OPTIONS} ${OPTIONS_RELEASE}" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + COMMAND ${SHELL} ./build.sh + WORKING_DIRECTORY ${BUILD_DIR} LOGNAME build-${TARGET_TRIPLET}-rel ) endif() # Debug build -if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Building Debug Options: ${OPTIONS_DEBUG}") - set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/debug/lib${SEP}${ENV_LIB_PATH}") + set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/debug/lib${VCPKG_HOST_PATH_SEPARATOR}${ENV_LIB_PATH}") + set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}") + set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") + set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig") message(STATUS "Building ${_csc_PROJECT_PATH} for Debug") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + set(BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + set(CONFIGURE_OPTIONS "${OPTIONS} ${OPTIONS_DEBUG}") + set(INST_PREFIX "${CURRENT_PACKAGES_DIR}/debug") + + configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY) + vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" # BUILD DIR - "${SOURCE_PATH}" # SOURCE DIR - "${CURRENT_PACKAGES_DIR}/debug" # PACKAGE DIR - "${OPTIONS} ${OPTIONS_DEBUG}" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + COMMAND ${SHELL} ./build.sh + WORKING_DIRECTORY ${BUILD_DIR} LOGNAME build-${TARGET_TRIPLET}-dbg ) endif() -file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/debug/lib/*.def) +if(VCPKG_TARGET_IS_WINDOWS) + file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/debug/lib/*.def) + + if(NOT VCPKG_TARGET_IS_MINGW) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(LIB_MACHINE_ARG /machine:ARM) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(LIB_MACHINE_ARG /machine:ARM64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(LIB_MACHINE_ARG /machine:x86) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(LIB_MACHINE_ARG /machine:x64) + else() + message(FATAL_ERROR "Unsupported target architecture") + endif() + + foreach(DEF_FILE ${DEF_FILES}) + get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY) + get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME) + string(REGEX REPLACE "-[0-9]*\\.def" "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" OUT_FILE_NAME "${DEF_FILE_NAME}") + file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE) + file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE) + message(STATUS "Generating ${OUT_FILE_NATIVE}") + vcpkg_execute_required_process( + COMMAND lib.exe /def:${DEF_FILE_NATIVE} /out:${OUT_FILE_NATIVE} ${LIB_MACHINE_ARG} + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR} + LOGNAME libconvert-${TARGET_TRIPLET} + ) + endforeach() + endif() -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(LIB_MACHINE_ARG /machine:ARM) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(LIB_MACHINE_ARG /machine:ARM64) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(LIB_MACHINE_ARG /machine:x86) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(LIB_MACHINE_ARG /machine:x64) -else() - message(FATAL_ERROR "Unsupported target architecture") -endif() - -foreach(DEF_FILE ${DEF_FILES}) - get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY) - get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME) - string(REGEX REPLACE "-[0-9]*\\.def" ".lib" OUT_FILE_NAME "${DEF_FILE_NAME}") - file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE) - file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE) - message(STATUS "Generating ${OUT_FILE_NATIVE}") - vcpkg_execute_required_process( - COMMAND lib.exe /def:${DEF_FILE_NATIVE} /out:${OUT_FILE_NATIVE} ${LIB_MACHINE_ARG} - WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR} - LOGNAME libconvert-${TARGET_TRIPLET} - ) -endforeach() + file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp) + file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + if(VCPKG_TARGET_IS_MINGW) + file(GLOB LIB_FILES_2 ${CURRENT_PACKAGES_DIR}/bin/*.lib ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) + endif() + list(APPEND FILES_TO_REMOVE ${EXP_FILES} ${LIB_FILES} ${LIB_FILES_2} ${DEF_FILES}) + if(FILES_TO_REMOVE) + file(REMOVE ${FILES_TO_REMOVE}) + endif() +endif() -file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp) -file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) -file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -set(FILES_TO_REMOVE ${EXP_FILES} ${LIB_FILES} ${DEF_FILES} ${EXE_FILES}) -list(LENGTH FILES_TO_REMOVE FILES_TO_REMOVE_LEN) -if(FILES_TO_REMOVE_LEN GREATER 0) - file(REMOVE ${FILES_TO_REMOVE}) +if("ffmpeg" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES ffmpeg AUTO_CLEAN) +endif() +if("ffprobe" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES ffprobe AUTO_CLEAN) endif() +if("ffplay" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES ffplay AUTO_CLEAN) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + vcpkg_copy_pdbs() +if (VCPKG_TARGET_IS_WINDOWS) + set(_dirs "/") + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND _dirs "/debug/") + endif() + foreach(_debug IN LISTS _dirs) + foreach(PKGCONFIG_MODULE IN LISTS FFMPEG_PKGCONFIG_MODULES) + set(PKGCONFIG_FILE "${CURRENT_PACKAGES_DIR}${_debug}lib/pkgconfig/${PKGCONFIG_MODULE}.pc") + # remove redundant cygwin style -libpath entries + execute_process( + COMMAND "${MSYS_ROOT}/usr/bin/cygpath.exe" -u "${CURRENT_INSTALLED_DIR}" + OUTPUT_VARIABLE CYG_INSTALLED_DIR + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + vcpkg_replace_string("${PKGCONFIG_FILE}" "-libpath:${CYG_INSTALLED_DIR}${_debug}lib/pkgconfig/../../lib " "") + # transform libdir, includedir, and prefix paths from cygwin style to windows style + file(READ "${PKGCONFIG_FILE}" PKGCONFIG_CONTENT) + foreach(PATH_NAME prefix libdir includedir) + string(REGEX MATCH "${PATH_NAME}=[^\n]*" PATH_VALUE "${PKGCONFIG_CONTENT}") + string(REPLACE "${PATH_NAME}=" "" PATH_VALUE "${PATH_VALUE}") + if(NOT PATH_VALUE) + message(FATAL_ERROR "failed to find pkgconfig variable ${PATH_NAME}") + endif() + execute_process( + COMMAND "${MSYS_ROOT}/usr/bin/cygpath.exe" -w "${PATH_VALUE}" + OUTPUT_VARIABLE FIXED_PATH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + file(TO_CMAKE_PATH "${FIXED_PATH}" FIXED_PATH) + vcpkg_replace_string("${PKGCONFIG_FILE}" "${PATH_NAME}=${PATH_VALUE}" "${PATH_NAME}=${FIXED_PATH}") + endforeach() + # list libraries with -l flag (so pkgconf knows they are libraries and not just linker flags) + foreach(LIBS_ENTRY Libs Libs.private) + string(REGEX MATCH "${LIBS_ENTRY}: [^\n]*" LIBS_VALUE "${PKGCONFIG_CONTENT}") + if(NOT LIBS_VALUE) + message(FATAL_ERROR "failed to find pkgconfig entry ${LIBS_ENTRY}") + endif() + string(REPLACE "${LIBS_ENTRY}: " "" LIBS_VALUE "${LIBS_VALUE}") + if(LIBS_VALUE) + set(LIBS_VALUE_OLD "${LIBS_VALUE}") + string(REGEX REPLACE "([^ ]+)[.]lib" "-l\\1" LIBS_VALUE "${LIBS_VALUE}") + set(LIBS_VALUE_NEW "${LIBS_VALUE}") + vcpkg_replace_string("${PKGCONFIG_FILE}" "${LIBS_ENTRY}: ${LIBS_VALUE_OLD}" "${LIBS_ENTRY}: ${LIBS_VALUE_NEW}") + endif() + endforeach() + endforeach() + endforeach() +endif() + +vcpkg_fixup_pkgconfig() + +# Handle dependencies + +x_vcpkg_pkgconfig_get_modules(PREFIX FFMPEG_PKGCONFIG MODULES ${FFMPEG_PKGCONFIG_MODULES} LIBS) + +function(append_dependencies_from_libs out) + cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "LIBS" "") + string(REGEX REPLACE "[ ]+" ";" contents "${arg_LIBS}") + list(FILTER contents EXCLUDE REGEX "^-framework$") + list(FILTER contents EXCLUDE REGEX "^-L.+") + list(FILTER contents EXCLUDE REGEX "^-libpath:.+") + list(TRANSFORM contents REPLACE "^-Wl,-framework," "-l") + list(FILTER contents EXCLUDE REGEX "^-Wl,.+") + list(TRANSFORM contents REPLACE "^-l" "") + list(FILTER contents EXCLUDE REGEX "^avresample$") + list(FILTER contents EXCLUDE REGEX "^avutil$") + list(FILTER contents EXCLUDE REGEX "^avcodec$") + list(FILTER contents EXCLUDE REGEX "^avdevice$") + list(FILTER contents EXCLUDE REGEX "^avfilter$") + list(FILTER contents EXCLUDE REGEX "^avformat$") + list(FILTER contents EXCLUDE REGEX "^postproc$") + list(FILTER contents EXCLUDE REGEX "^swresample$") + list(FILTER contents EXCLUDE REGEX "^swscale$") + if(VCPKG_TARGET_IS_WINDOWS) + list(TRANSFORM contents TOLOWER) + endif() + if(contents) + list(APPEND "${out}" "${contents}") + set("${out}" "${${out}}" PARENT_SCOPE) + endif() +endfunction() + +append_dependencies_from_libs(FFMPEG_DEPENDENCIES_RELEASE LIBS "${FFMPEG_PKGCONFIG_LIBS_RELEASE}") +append_dependencies_from_libs(FFMPEG_DEPENDENCIES_DEBUG LIBS "${FFMPEG_PKGCONFIG_LIBS_DEBUG}") + +# must remove duplicates from the front to respect link order so reverse first +list(REVERSE FFMPEG_DEPENDENCIES_RELEASE) +list(REVERSE FFMPEG_DEPENDENCIES_DEBUG) +list(REMOVE_DUPLICATES FFMPEG_DEPENDENCIES_RELEASE) +list(REMOVE_DUPLICATES FFMPEG_DEPENDENCIES_DEBUG) +list(REVERSE FFMPEG_DEPENDENCIES_RELEASE) +list(REVERSE FFMPEG_DEPENDENCIES_DEBUG) + +message("Dependencies (release): ${FFMPEG_DEPENDENCIES_RELEASE}") +message("Dependencies (debug): ${FFMPEG_DEPENDENCIES_DEBUG}") + +# Handle version strings + +function(extract_regex_from_file out) + cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "FILE;REGEX" "") + file(READ "${arg_FILE}" contents) + if (contents MATCHES "${arg_REGEX}") + if(NOT CMAKE_MATCH_COUNT EQUAL 1) + message(FATAL_ERROR "Could not identify match group in regular expression \"${arg_REGEX}\"") + endif() + else() + message(FATAL_ERROR "Could not find line matching \"${arg_REGEX}\" in file \"${arg_FILE}\"") + endif() + set("${out}" "${CMAKE_MATCH_1}" PARENT_SCOPE) +endfunction() + +function(extract_version_from_component out) + cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "COMPONENT" "") + string(TOLOWER "${arg_COMPONENT}" component_lower) + string(TOUPPER "${arg_COMPONENT}" component_upper) + extract_regex_from_file(major_version + FILE "${SOURCE_PATH}/${component_lower}/version.h" + REGEX "#define ${component_upper}_VERSION_MAJOR[ ]+([0-9]+)" + ) + extract_regex_from_file(minor_version + FILE "${SOURCE_PATH}/${component_lower}/version.h" + REGEX "#define ${component_upper}_VERSION_MINOR[ ]+([0-9]+)" + ) + extract_regex_from_file(micro_version + FILE "${SOURCE_PATH}/${component_lower}/version.h" + REGEX "#define ${component_upper}_VERSION_MICRO[ ]+([0-9]+)" + ) + set("${out}" "${major_version}.${minor_version}.${micro_version}" PARENT_SCOPE) +endfunction() + +extract_regex_from_file(FFMPEG_VERSION + FILE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libavutil/ffversion.h" + REGEX "#define FFMPEG_VERSION[ ]+\"(.+)\"" +) + +extract_version_from_component(LIBAVUTIL_VERSION + COMPONENT libavutil) +extract_version_from_component(LIBAVCODEC_VERSION + COMPONENT libavcodec) +extract_version_from_component(LIBAVDEVICE_VERSION + COMPONENT libavdevice) +extract_version_from_component(LIBAVFILTER_VERSION + COMPONENT libavfilter) +extract_version_from_component( LIBAVFORMAT_VERSION + COMPONENT libavformat) +extract_version_from_component(LIBAVRESAMPLE_VERSION + COMPONENT libavresample) +extract_version_from_component(LIBSWRESAMPLE_VERSION + COMPONENT libswresample) +extract_version_from_component(LIBSWSCALE_VERSION + COMPONENT libswscale) + # Handle copyright -# TODO: Examine build log and confirm that this license matches the build output -file(INSTALL ${SOURCE_PATH}/COPYING.LGPLv2.1 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(STRINGS ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-out.log LICENSE_STRING REGEX "License: .*" LIMIT_COUNT 1) +if(LICENSE_STRING STREQUAL "License: LGPL version 2.1 or later") + set(LICENSE_FILE "COPYING.LGPLv2.1") +elseif(LICENSE_STRING STREQUAL "License: LGPL version 3 or later") + set(LICENSE_FILE "COPYING.LGPLv3") +elseif(LICENSE_STRING STREQUAL "License: GPL version 2 or later") + set(LICENSE_FILE "COPYING.GPLv2") +elseif(LICENSE_STRING STREQUAL "License: GPL version 3 or later") + set(LICENSE_FILE "COPYING.GPLv3") +elseif(LICENSE_STRING STREQUAL "License: nonfree and unredistributable") + set(LICENSE_FILE "COPYING.NONFREE") + file(WRITE ${SOURCE_PATH}/${LICENSE_FILE} ${LICENSE_STRING}) +else() + message(FATAL_ERROR "Failed to identify license (${LICENSE_STRING})") +endif() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +configure_file(${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/FindFFMPEG.cmake @ONLY) file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/${LICENSE_FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ffmpeg/usage b/ports/ffmpeg/usage new file mode 100644 index 00000000000000..6ef6c3bd07a319 --- /dev/null +++ b/ports/ffmpeg/usage @@ -0,0 +1,6 @@ +To use ffmpeg add the following to your CMake project: + + find_package(FFMPEG REQUIRED) + target_include_directories(main PRIVATE ${FFMPEG_INCLUDE_DIRS}) + target_link_directories(main PRIVATE ${FFMPEG_LIBRARY_DIRS}) + target_link_libraries(main PRIVATE ${FFMPEG_LIBRARIES}) diff --git a/ports/ffmpeg/vcpkg-cmake-wrapper.cmake b/ports/ffmpeg/vcpkg-cmake-wrapper.cmake index 322387565d03e8..170bf63336c3d8 100644 --- a/ports/ffmpeg/vcpkg-cmake-wrapper.cmake +++ b/ports/ffmpeg/vcpkg-cmake-wrapper.cmake @@ -1,8 +1,8 @@ set(FFMPEG_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -if(NOT FFMPEG_LIBRARIES) - _find_package(${ARGS}) -endif() +cmake_policy(SET CMP0012 NEW) + +_find_package(${ARGS}) set(CMAKE_MODULE_PATH ${FFMPEG_PREV_MODULE_PATH}) diff --git a/ports/ffmpeg/vcpkg.json b/ports/ffmpeg/vcpkg.json new file mode 100644 index 00000000000000..29870bdc9e0b65 --- /dev/null +++ b/ports/ffmpeg/vcpkg.json @@ -0,0 +1,600 @@ +{ + "name": "ffmpeg", + "version": "4.4", + "port-version": 14, + "description": [ + "a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.", + "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations." + ], + "homepage": "https://ffmpeg.org", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-pkgconfig-get-modules", + "host": true + } + ], + "default-features": [ + "avcodec", + "avdevice", + "avfilter", + "avformat", + "swresample", + "swscale" + ], + "features": { + "all": { + "description": "Build with all allowed dependencies selected that are compatible with the lgpl license", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avdevice", + "avfilter", + "avformat", + "avresample", + "bzip2", + "freetype", + "iconv", + "lzma", + "mp3lame", + "openjpeg", + "opus", + "snappy", + "soxr", + "speex", + "swresample", + "swscale", + "theora", + "vorbis", + "vpx", + "webp", + "zlib" + ] + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "sdl2" + ], + "platform": "!osx" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "modplug" + ], + "platform": "!uwp" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "opencl" + ], + "platform": "!uwp" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "openh264" + ], + "platform": "!uwp" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "xml2" + ], + "platform": "!static" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "ilbc" + ], + "platform": "!(arm & uwp)" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "ass" + ], + "platform": "!(uwp | arm)" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "fribidi" + ], + "platform": "!(uwp | arm)" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "ssh" + ], + "platform": "!(uwp | arm) & !static" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "opengl" + ], + "platform": "!uwp & !(windows & arm)" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "dav1d" + ], + "platform": "!(uwp | arm | x86 | osx)" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "tensorflow" + ], + "platform": "!(x86 | arm | uwp) & !static" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "nvcodec" + ], + "platform": "(windows | linux) & !uwp & !arm" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "tesseract" + ], + "platform": "!uwp & !(windows & arm) & !static" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "fontconfig" + ], + "platform": "!(windows & static) & !(uwp | arm)" + } + ] + }, + "all-gpl": { + "description": "Build with all allowed dependencies selected that are compatible with the gpl license", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "all", + "gpl", + "postproc" + ] + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "x264" + ], + "platform": "!arm" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "x265" + ], + "platform": "!arm & !uwp" + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avisynthplus" + ], + "platform": "windows & !arm & !uwp & !static" + } + ] + }, + "all-nonfree": { + "description": "Build with all allowed dependencies selected with a non-redistributable license", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "all-gpl", + "fdk-aac", + "nonfree", + "openssl" + ] + } + ] + }, + "ass": { + "description": "Libass subtitles rendering, needed for subtitles and ass filter support in ffmpeg", + "dependencies": [ + "libass" + ] + }, + "avcodec": { + "description": "Build the avcodec library" + }, + "avdevice": { + "description": "Build the avdevice library", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avformat" + ] + } + ] + }, + "avfilter": { + "description": "Build the avfilter library" + }, + "avformat": { + "description": "Build the avformat library", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec" + ] + } + ] + }, + "avisynthplus": { + "description": "Reading of AviSynth script files", + "dependencies": [ + "avisynthplus", + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "gpl" + ] + } + ] + }, + "avresample": { + "description": "Build the avresample library" + }, + "bzip2": { + "description": "Bzip2 support", + "dependencies": [ + "bzip2" + ] + }, + "dav1d": { + "description": "AV1 decoding via libdav1d", + "dependencies": [ + "dav1d" + ] + }, + "fdk-aac": { + "description": "AAC de/encoding via libfdk-aac, **including GPL-incompatible patent-encumbered HE-AAC**. If you do not require HE-AAC, use the built-in FFmpeg AAC codec.", + "dependencies": [ + { + "name": "fdk-aac", + "default-features": false, + "features": [ + "he-aac" + ] + }, + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "nonfree" + ] + } + ] + }, + "ffmpeg": { + "description": "Build the ffmpeg application", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avfilter", + "avformat" + ] + } + ] + }, + "ffplay": { + "description": "Build the ffplay application", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avfilter", + "avformat", + "sdl2", + "swresample", + "swscale" + ] + } + ] + }, + "ffprobe": { + "description": "Build the ffprobe application", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avformat" + ] + } + ] + }, + "fontconfig": { + "description": "Useful for drawtext filter", + "dependencies": [ + "fontconfig" + ] + }, + "freetype": { + "description": "Needed for drawtext filter", + "dependencies": [ + "freetype" + ] + }, + "fribidi": { + "description": "Improves drawtext filter", + "dependencies": [ + "fribidi" + ] + }, + "gpl": { + "description": "Allow use of GPL code, the resulting libs and binaries will be under GPL" + }, + "iconv": { + "description": "Iconv support", + "dependencies": [ + "libiconv" + ] + }, + "ilbc": { + "description": "iLBC de/encoding via libilbc", + "dependencies": [ + "libilbc" + ] + }, + "lzma": { + "description": "lzma support", + "dependencies": [ + "liblzma" + ] + }, + "modplug": { + "description": "ModPlug via libmodplug", + "dependencies": [ + "libmodplug" + ] + }, + "mp3lame": { + "description": "MP3 encoding via libmp3lame", + "dependencies": [ + "mp3lame" + ] + }, + "nonfree": { + "description": "Allow use of nonfree code, the resulting libs and binaries will be unredistributable" + }, + "nvcodec": { + "description": "Nvidia video decoding/encoding acceleration", + "dependencies": [ + "ffnvcodec" + ] + }, + "opencl": { + "description": "OpenCL processing", + "dependencies": [ + "opencl" + ] + }, + "opengl": { + "description": "OpenGL rendering", + "dependencies": [ + "opengl", + "opengl-registry" + ] + }, + "openh264": { + "description": "H.264 de/encoding via openh264", + "dependencies": [ + "openh264" + ] + }, + "openjpeg": { + "description": "JPEG 2000 de/encoding via OpenJPEG", + "dependencies": [ + "openjpeg" + ] + }, + "openssl": { + "description": "Needed for https support if gnutls, libtls or mbedtls is not used", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "nonfree" + ] + }, + "openssl" + ] + }, + "opus": { + "description": "Opus de/encoding via libopus", + "dependencies": [ + "opus" + ] + }, + "postproc": { + "description": "Build the postproc library", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "gpl" + ] + } + ] + }, + "sdl2": { + "description": "Sdl2 support", + "dependencies": [ + "sdl2" + ] + }, + "snappy": { + "description": "Snappy compression, needed for hap encoding", + "dependencies": [ + "snappy" + ] + }, + "soxr": { + "description": "Include libsoxr resampling", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "swresample" + ] + }, + "soxr" + ] + }, + "speex": { + "description": "Speex de/encoding via libspeex", + "dependencies": [ + "speex" + ] + }, + "ssh": { + "description": "SFTP protocol via libssh", + "dependencies": [ + "libssh" + ] + }, + "swresample": { + "description": "Build the swresample library" + }, + "swscale": { + "description": "Build the swscale library" + }, + "tensorflow": { + "description": "TensorFlow as a DNN module backend for DNN based filters like sr", + "dependencies": [ + "tensorflow" + ] + }, + "tesseract": { + "description": "Tesseract, needed for ocr filter", + "dependencies": [ + "tesseract" + ] + }, + "theora": { + "description": "Theora encoding via libtheora", + "dependencies": [ + "libtheora" + ] + }, + "version3": { + "description": "Upgrade (L)GPL to version 3" + }, + "vorbis": { + "description": "Vorbis en/decoding via libvorbis, native implementation exists", + "dependencies": [ + "libvorbis" + ] + }, + "vpx": { + "description": "VP8 and VP9 de/encoding via libvpx", + "dependencies": [ + "libvpx" + ] + }, + "webp": { + "description": "WebP encoding via libwebp", + "dependencies": [ + "libwebp" + ] + }, + "x264": { + "description": "H.264 encoding via x264", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "gpl" + ] + }, + "x264" + ] + }, + "x265": { + "description": "HEVC encoding via x265", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "gpl" + ] + }, + "x265" + ] + }, + "xml2": { + "description": "XML parsing using the C library libxml2, needed for dash demuxing support", + "dependencies": [ + "libxml2" + ] + }, + "zlib": { + "description": "zlib support", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/ffnvcodec/LICENSE.txt b/ports/ffnvcodec/LICENSE.txt new file mode 100644 index 00000000000000..a9121567759efa --- /dev/null +++ b/ports/ffnvcodec/LICENSE.txt @@ -0,0 +1,169 @@ +GNU LESSER GENERAL PUBLIC LICENSE +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + +a) The modified work must itself be a software library. +b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. +c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. +d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + +a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) +b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. +c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. +d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. +e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. +b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Libraries +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + +one line to give the library's name and an idea of what it does. +Copyright (C) year name of author + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library `Frob' (a library for tweaking knobs) written +by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice +That's all there is to it! \ No newline at end of file diff --git a/ports/ffnvcodec/build.sh b/ports/ffnvcodec/build.sh new file mode 100644 index 00000000000000..416c6bd8f93f29 --- /dev/null +++ b/ports/ffnvcodec/build.sh @@ -0,0 +1,18 @@ +#!/usr/bin/bash + +# Deploys the ffnvcodec.pc file to the MSYS rootfs so that pkgconfig can find it. + +set -e +export PATH=/usr/bin:$PATH + +SOURCE_PATH="$1" +CURRENT_PACKAGES_DIR="$2" + +pushd ${SOURCE_PATH} + +# Create ffnvcodec.pc +make PREFIX=${CURRENT_PACKAGES_DIR} +make install PREFIX=${CURRENT_PACKAGES_DIR} + + +popd diff --git a/ports/ffnvcodec/copyright b/ports/ffnvcodec/copyright new file mode 100644 index 00000000000000..07c1bc4d77f452 --- /dev/null +++ b/ports/ffnvcodec/copyright @@ -0,0 +1,26 @@ +/* + * This copyright notice applies to this header file only: + * + * Copyright (c) 2010-2019 NVIDIA Corporation + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the software, and to permit persons to whom the + * software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ diff --git a/ports/ffnvcodec/portfile.cmake b/ports/ffnvcodec/portfile.cmake new file mode 100644 index 00000000000000..1b67cba6fa5520 --- /dev/null +++ b/ports/ffnvcodec/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FFmpeg/nv-codec-headers + REF b641a195edbe3ac9788e681e22c2e2fad8aacddb # 11.1.5.0 + SHA512 e8b4c21ddc9c39dadd9b69ebdfcf38cf1e61f19ffb88d0a4d9086ddbf69285d2c8c946bb02bde3ee943accae559a72468f096718ad69ac03a43746c1eb0ed483 + HEAD_REF master +) + +# ==================================================== +# Install the pkgconfig info for the `nvcodec` package +# ==================================================== + +# Windows +if(VCPKG_TARGET_IS_WINDOWS) + set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make pkg-config) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + + message(STATUS "Building ${_csc_PROJECT_PATH} for Release") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + + # Make and deploy the ffnvcodec.pc file using MSYS + # (so that FFmpeg can find it in the MSYS rootfs) + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}" + "${SOURCE_PATH}" + "${CURRENT_PACKAGES_DIR}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} + LOGNAME build-${TARGET_TRIPLET} + ) + + file(INSTALL "${SOURCE_PATH}/ffnvcodec.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") + +# Linux, etc. +else() + FIND_PROGRAM(MAKE make) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") + ENDIF () + + vcpkg_execute_required_process( + COMMAND make PREFIX=$${CURRENT_PACKAGES_DIR} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME make-${TARGET_TRIPLET} + ) + + # FFmpeg uses pkgconfig to find ffnvcodec.pc, so install it where + # FFMpeg's call to pkgconfig expects to find it. + file(INSTALL "${SOURCE_PATH}/ffnvcodec.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") + file(INSTALL "${SOURCE_PATH}/ffnvcodec.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") +endif() + +vcpkg_fixup_pkgconfig() + +# Install the files to their default vcpkg locations +file(INSTALL "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}") +file(INSTALL "${CURRENT_PORT_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/ffnvcodec/vcpkg.json b/ports/ffnvcodec/vcpkg.json new file mode 100644 index 00000000000000..7ef678a4b8095c --- /dev/null +++ b/ports/ffnvcodec/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ffnvcodec", + "version": "11.1.5.0", + "description": "FFmpeg version of Nvidia Codec SDK headers.", + "homepage": "https://github.com/FFmpeg/nv-codec-headers", + "supports": "(windows | linux) & !uwp" +} diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL deleted file mode 100644 index 4d378d8c390757..00000000000000 --- a/ports/fftw3/CONTROL +++ /dev/null @@ -1,22 +0,0 @@ -Source: fftw3 -Version: 3.3.8-6 -Homepage: https://www.fftw.org/ -Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). - -Feature: openmp -Description: Builds openmp enabled lib - -Feature: sse -Description: Builds part of the library with sse - -Feature: sse2 -Description: Builds part of the library with sse2, sse - -Feature: avx -Description: Builds part of the library with avx, sse2, sse - -Feature: avx2 -Description: Builds part of the library with avx2, fma, avx, sse2, sse - -Feature: threads -Description: Enable threads in fftw3 diff --git a/ports/fftw3/aligned_malloc.patch b/ports/fftw3/aligned_malloc.patch new file mode 100644 index 00000000000000..447ded62b6b9ae --- /dev/null +++ b/ports/fftw3/aligned_malloc.patch @@ -0,0 +1,38 @@ +diff --git a/cmake.config.h.in b/cmake.config.h.in +index 1f4c505..fd763cc 100644 +--- a/cmake.config.h.in ++++ b/cmake.config.h.in +@@ -112,6 +112,10 @@ + you don't. */ + #cmakedefine01 HAVE_DECL_POSIX_MEMALIGN + ++/* Define to 1 if you have the declaration of `_aligned_malloc', and to 0 if you ++ don't. */ ++#cmakedefine01 HAVE_DECL_ALIGNED_MALLOC ++ + /* Define to 1 if you have the declaration of `sinl', and to 0 if you don't. + */ + #cmakedefine01 HAVE_DECL_SINL +@@ -184,6 +188,9 @@ + /* Define to 1 if you have the `memalign' function. */ + #cmakedefine HAVE_MEMALIGN 1 + ++/* Define to 1 if you have the `_aligned_malloc' function. */ ++#cmakedefine HAVE_ALIGNED_MALLOC 1 ++ + /* Define to 1 if you have the `memmove' function. */ + #cmakedefine HAVE_MEMMOVE 1 + +diff --git a/kernel/kalloc.c b/kernel/kalloc.c +index e42f6f3..ffc2257 100644 +--- a/kernel/kalloc.c ++++ b/kernel/kalloc.c +@@ -103,7 +103,7 @@ void *X(kernel_malloc)(size_t n) + # undef real_free + # define real_free _mm_free + +-# elif defined(_MSC_VER) ++# elif defined(_MSC_VER) || defined (HAVE_ALIGNED_MALLOC) + /* MS Visual C++ 6.0 with a "Processor Pack" supports SIMD + and _aligned_malloc/free (uses malloc.h) */ + p = (void *) _aligned_malloc(n, MIN_ALIGNMENT); diff --git a/ports/fftw3/fftw3_arch_fix.patch b/ports/fftw3/fftw3_arch_fix.patch index 922d86b9765c7b..0f1a7e5ae664a8 100644 --- a/ports/fftw3/fftw3_arch_fix.patch +++ b/ports/fftw3/fftw3_arch_fix.patch @@ -2,6 +2,23 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 95bd537a..245acc8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -66,6 +66,8 @@ + check_prototype_definition (sinl "long double sinl( long double arg )" "0" math.h HAVE_DECL_SINL) + check_prototype_definition (memalign "void *memalign(size_t alignment, size_t size)" "0" malloc.h HAVE_DECL_MEMALIGN) + check_prototype_definition (posix_memalign "int posix_memalign(void **memptr, size_t alignment, size_t size)" "0" stdlib.h HAVE_DECL_POSIX_MEMALIGN) ++check_prototype_definition (_aligned_malloc "void* __cdecl _aligned_malloc(size_t _Size, size_t _Alignment)" "0" malloc.h HAVE_DECL_ALIGNED_MALLOC) ++ + + include (CheckSymbolExists) + check_symbol_exists (clock_gettime time.h HAVE_CLOCK_GETTIME) +@@ -75,6 +77,7 @@ + check_symbol_exists (srand48 stdlib.h HAVE_SRAND48) + check_symbol_exists (memalign malloc.h HAVE_MEMALIGN) + check_symbol_exists (posix_memalign stdlib.h HAVE_POSIX_MEMALIGN) ++check_symbol_exists (_aligned_malloc malloc.h HAVE_ALIGNED_MALLOC) + check_symbol_exists (mach_absolute_time mach/mach_time.h HAVE_MACH_ABSOLUTE_TIME) + check_symbol_exists (alloca alloca.h HAVE_ALLOCA) + if (NOT HAVE_ALLOCA) @@ -131,6 +131,7 @@ endif () include (CheckCCompilerFlag) diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 91f8f34a65e787..c9802469591173 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -1,9 +1,7 @@ -include(vcpkg_common_functions) - vcpkg_download_distfile(ARCHIVE - URLS "http://www.fftw.org/fftw-3.3.8.tar.gz" - FILENAME "fftw-3.3.8.tar.gz" - SHA512 ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38 + URLS "http://www.fftw.org/fftw-3.3.9.tar.gz" + FILENAME "fftw-3.3.9.tar.gz" + SHA512 52ebc2a33063a41fd478f6ea2acbf3b511867f736591d273dd57f9dfca5d3e0b0c73157921b3a36f1a7cfd741a8a6bde0fd80de578040ae730ea168b5ba466cf ) vcpkg_extract_source_archive_ex( @@ -13,50 +11,20 @@ vcpkg_extract_source_archive_ex( omp_test.patch patch_targets.patch fftw3_arch_fix.patch + aligned_malloc.patch ) -if ("openmp" IN_LIST FEATURES) - set(ENABLE_OPENMP ON) -else() - set(ENABLE_OPENMP OFF) -endif() - -if ("avx" IN_LIST FEATURES) - set(HAVE_AVX ON) - set(HAVE_SSE ON) - set(HAVE_SSE2 ON) -else() - set(HAVE_AVX OFF) -endif() - -if ("avx2" IN_LIST FEATURES) - set(HAVE_AVX2 ON) - set(HAVE_FMA ON) - set(HAVE_SSE ON) - set(HAVE_SSE2 ON) -else() - set(HAVE_AVX2 OFF) - set(HAVE_FMA OFF) -endif() - -if ("sse" IN_LIST FEATURES) - set(HAVE_SSE ON) -else() - set(HAVE_SSE OFF) -endif() - -if ("sse2" IN_LIST FEATURES) - set(HAVE_SSE2 ON) - set(HAVE_SSE ON) -else() - set(HAVE_SSE2 OFF) -endif() - -if ("threads" IN_LIST FEATURES) - set(HAVE_THREADS ON) -else() - set(HAVE_THREADS OFF) -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openmp ENABLE_OPENMP + threads ENABLE_THREADS + threads WITH_COMBINED_THREADS + avx2 ENABLE_AVX2 + avx ENABLE_AVX + sse2 ENABLE_SSE2 + sse ENABLE_SSE +) set(ENABLE_FLOAT_CMAKE fftw3f) set(ENABLE_LONG_DOUBLE_CMAKE fftw3l) @@ -64,9 +32,8 @@ set(ENABLE_DEFAULT_PRECISION_CMAKE fftw3) foreach(PRECISION ENABLE_FLOAT ENABLE_LONG_DOUBLE ENABLE_DEFAULT_PRECISION) if(PRECISION STREQUAL "ENABLE_LONG_DOUBLE") - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -D${PRECISION}=ON -DENABLE_OPENMP=${ENABLE_OPENMP} @@ -75,42 +42,31 @@ foreach(PRECISION ENABLE_FLOAT ENABLE_LONG_DOUBLE ENABLE_DEFAULT_PRECISION) -DBUILD_TESTS=OFF ) else() - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -D${PRECISION}=ON - -DENABLE_OPENMP=${ENABLE_OPENMP} - -DHAVE_SSE=${HAVE_SSE} - -DHAVE_SSE2=${HAVE_SSE2} - -DHAVE_AVX=${HAVE_AVX} - -DHAVE_AVX2=${HAVE_AVX2} - -DHAVE_FMA=${HAVE_FMA} - -DENABLE_THREADS=${HAVE_THREADS} - -DWITH_COMBINED_THREADS=${HAVE_THREADS} + ${FEATURE_OPTIONS} -DBUILD_TESTS=OFF ) endif() - vcpkg_install_cmake() + vcpkg_cmake_install() vcpkg_copy_pdbs() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/${${PRECISION}_CMAKE}) + vcpkg_cmake_config_fixup(PACKAGE_NAME ${${PRECISION}_CMAKE} CONFIG_PATH lib/cmake) endforeach() -file(READ ${SOURCE_PATH}/api/fftw3.h _contents) +file(READ "${SOURCE_PATH}/api/fftw3.h" _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") string(REPLACE "defined(FFTW_DLL)" "0" _contents "${_contents}") else() string(REPLACE "defined(FFTW_DLL)" "1" _contents "${_contents}") endif() -file(WRITE ${SOURCE_PATH}/include/fftw3.h "${_contents}") +file(WRITE "${SOURCE_PATH}/include/fftw3.h" "${_contents}") -# Cleanup -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fftw3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/fftw3/COPYING ${CURRENT_PACKAGES_DIR}/share/fftw3/copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/fftw3/vcpkg.json b/ports/fftw3/vcpkg.json new file mode 100644 index 00000000000000..646e2627e932d3 --- /dev/null +++ b/ports/fftw3/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "fftw3", + "version-string": "3.3.9", + "description": "FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).", + "homepage": "https://www.fftw.org/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "avx": { + "description": "Builds part of the library with avx, sse2, sse" + }, + "avx2": { + "description": "Builds part of the library with avx2, fma, avx, sse2, sse" + }, + "openmp": { + "description": "Builds openmp enabled lib" + }, + "sse": { + "description": "Builds part of the library with sse" + }, + "sse2": { + "description": "Builds part of the library with sse2, sse" + }, + "threads": { + "description": "Enable threads in fftw3" + } + } +} diff --git a/ports/fftwpp/portfile.cmake b/ports/fftwpp/portfile.cmake new file mode 100644 index 00000000000000..b24c5652d329a7 --- /dev/null +++ b/ports/fftwpp/portfile.cmake @@ -0,0 +1,34 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dealias/fftwpp + REF d05a2812995a52a3834140fd3ddd2e80bf8fcd42 + SHA512 851c79245eb61ebebfde97e7a8f3b9c061e84c9df571b5a7cafc3e959941e7b0792923e0ddefde4739582932d135c578c703195017da4bd34872adce7ab8c5ee + HEAD_REF master +) + +# fftwpp is a header-only library +set (FFWTPP_SOURCE_FILES + ${SOURCE_PATH}/Array.h + ${SOURCE_PATH}/Array.cc + ${SOURCE_PATH}/Complex.h + ${SOURCE_PATH}/Complex.cc + ${SOURCE_PATH}/align.h + ${SOURCE_PATH}/cmult-sse2.h + ${SOURCE_PATH}/convolution.h + ${SOURCE_PATH}/convolution.cc + ${SOURCE_PATH}/fftw++.h + ${SOURCE_PATH}/fftw++.cc + ${SOURCE_PATH}/seconds.h + ${SOURCE_PATH}/statistics.h + ${SOURCE_PATH}/transposeoptions.h +) + +set(FFWTPP_DOXY_CFG ${SOURCE_PATH}/fftw++.doxycfg) + +file(INSTALL ${FFWTPP_SOURCE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${FFWTPP_DOXY_CFG} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fftwpp/vcpkg.json b/ports/fftwpp/vcpkg.json new file mode 100644 index 00000000000000..e702a1b933d0af --- /dev/null +++ b/ports/fftwpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "fftwpp", + "version-string": "2019-12-19", + "port-version": 1, + "description": "FFTW++ is a C++ header/MPI transpose for Version 3 of the highly optimized FFTW (http://www.fftw.org) Fourier Transform library.", + "homepage": "https://www.fftw.org/", + "dependencies": [ + "fftw3" + ] +} diff --git a/ports/field3d/0001_fix_build_errors.patch b/ports/field3d/0001_fix_build_errors.patch new file mode 100644 index 00000000000000..95149e39d893fd --- /dev/null +++ b/ports/field3d/0001_fix_build_errors.patch @@ -0,0 +1,148 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1610c2e..b012008 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -31,25 +31,17 @@ + + # Author : Nicholas Yue yue.nicholas@gmail.com + +-CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) ++CMAKE_MINIMUM_REQUIRED( VERSION 3.17 ) + + PROJECT ( field3d ) + + set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake ) + + FIND_PACKAGE (Doxygen) +-FIND_PACKAGE (HDF5 COMPONENTS C) +-IF ( CMAKE_HOST_WIN32 ) +-# f3dinfo relies on program_options but don't include it, since +-# for some reason, unlike all the other boost components, a link is +-# forced via a pragma. +-FIND_PACKAGE (Boost COMPONENTS regex thread) +-ELSE () +-FIND_PACKAGE (Boost COMPONENTS regex thread program_options system) +-FIND_PACKAGE (MPI) +-ENDIF () ++FIND_PACKAGE (HDF5 COMPONENTS C REQUIRED) ++FIND_PACKAGE (Boost COMPONENTS regex thread program_options system REQUIRED) + +-FIND_PACKAGE (ILMBase) ++FIND_PACKAGE (OpenEXR REQUIRED) + + # Allow the developer to select if Dynamic or Static libraries are built + OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" ON) +@@ -79,26 +71,14 @@ IF ( CMAKE_HOST_UNIX ) + ENDIF ( ) + IF ( CMAKE_HOST_WIN32 ) + ADD_DEFINITIONS ( +- -D_HAS_ITERATOR_DEBUGGING=0 + -D_CRT_SECURE_NO_WARNINGS=1 + ) + ENDIF ( ) + + SET ( LIB_TYPE SHARED ) + IF ( NOT BUILD_SHARED_LIBS ) +- IF ( CMAKE_HOST_WIN32 ) +- # User wants to build static libraries, so change the LIB_TYPE variable to CMake keyword 'STATIC' + SET ( LIB_TYPE STATIC ) + ADD_DEFINITIONS( -DFIELD3D_STATIC ) +- ENDIF() +-ELSE () +- IF ( CMAKE_HOST_WIN32 ) +- ADD_DEFINITIONS ( +- -DOPENEXR_DLL +- -D_HDF5USEDLL_ +- -DHDF5CPP_USEDLL +- ) +- ENDIF() + ENDIF ( NOT BUILD_SHARED_LIBS ) + + ADD_LIBRARY ( Field3D ${LIB_TYPE} +@@ -147,24 +128,22 @@ IF ( CMAKE_HOST_UNIX ) + ${MPI_LIBRARIES} ) + ENDIF ( MPI_FOUND ) + LIST ( APPEND Field3D_Libraries_Shared +- Iex Half IlmThread Imath + pthread dl z ) + SET ( Field3D_DSO_Libraries ${Field3D_Libraries_Shared} ) + SET ( Field3D_BIN_Libraries Field3D ${Field3D_Libraries_Shared} + ${Boost_LIBRARIES} ) + ENDIF ( ) + IF ( CMAKE_HOST_WIN32 ) +- # Add OpenEXR and zlib release/debug +- FOREACH ( lib Iex Half IlmThread Imath zdll ) ++ FOREACH ( lib zlib ) + LIST ( APPEND Field3D_Libraries_Shared + optimized ${lib} +- debug ${lib}_d ) ++ debug ${lib}d ) + ENDFOREACH() + SET ( Field3D_DSO_Libraries ${Field3D_Libraries_Shared} Shlwapi.lib) + SET ( Field3D_BIN_Libraries Field3D ${Boost_LIBRARIES} ) + ENDIF () + +-TARGET_LINK_LIBRARIES ( Field3D ${Field3D_DSO_Libraries} ${Boost_LIBRARIES}) ++TARGET_LINK_LIBRARIES ( Field3D ${Field3D_DSO_Libraries} ${Boost_LIBRARIES} OpenEXR::IlmImf) + + # Parase version and soversion from export/ns.h + +@@ -214,33 +193,7 @@ ADD_EXECUTABLE ( f3dinfo + + TARGET_LINK_LIBRARIES ( f3dinfo ${Field3D_BIN_Libraries} ) + +-# field3d - sparse_field_io +-ADD_EXECUTABLE ( sparse_field_io +- apps/sample_code/sparse_field_io/main.cpp +- ) +- +-TARGET_LINK_LIBRARIES ( sparse_field_io ${Field3D_BIN_Libraries} ) +- +-# field3d - read +-ADD_EXECUTABLE ( read +- apps/sample_code/read/main.cpp +- ) + +-TARGET_LINK_LIBRARIES ( read ${Field3D_BIN_Libraries} ) +- +-# field3d - mixed_types +-ADD_EXECUTABLE ( mixed_types +- apps/sample_code/mixed_types/main.cpp +- ) +- +-TARGET_LINK_LIBRARIES ( mixed_types ${Field3D_BIN_Libraries} ) +- +-# field3d - create_and_write +-ADD_EXECUTABLE ( create_and_write +- apps/sample_code/create_and_write/main.cpp +- ) +- +-TARGET_LINK_LIBRARIES ( create_and_write ${Field3D_BIN_Libraries} ) + + IF (DOXYGEN_FOUND) + ADD_CUSTOM_TARGET ( doc +@@ -249,7 +202,7 @@ IF (DOXYGEN_FOUND) + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} + ) + IF (INSTALL_DOCS) +- INSTALL (DIRECTORY ++ INSTALL (DIRECTORY + ${CMAKE_HOME_DIRECTORY}/docs + DESTINATION ${CMAKE_INSTALL_PREFIX} + ) +@@ -263,12 +216,11 @@ INSTALL ( TARGETS + + FILE(GLOB Field3d_Includes "${CMAKE_CURRENT_SOURCE_DIR}/export/*.h") + +-INSTALL ( FILES +- ${Field3d_Includes} ++INSTALL ( FILES ++ ${Field3d_Includes} + DESTINATION include/Field3D + ) + +-INSTALL ( TARGETS f3dinfo ++INSTALL ( TARGETS f3dinfo + RUNTIME DESTINATION bin + ) +- diff --git a/ports/field3d/0002_improve_win_compatibility.patch b/ports/field3d/0002_improve_win_compatibility.patch new file mode 100644 index 00000000000000..08167be692f4c0 --- /dev/null +++ b/ports/field3d/0002_improve_win_compatibility.patch @@ -0,0 +1,43 @@ +diff --git a/include/UtilFoundation.h b/include/UtilFoundation.h +index 2eb6290..a449b5b 100644 +--- a/include/UtilFoundation.h ++++ b/include/UtilFoundation.h +@@ -90,6 +90,9 @@ + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif ++#ifndef NOMINMAX ++#define NOMINMAX ++#endif + + // needed for mutex stuff + #include +diff --git a/src/FieldMapping.cpp b/src/FieldMapping.cpp +index b1f1a1f..90612b1 100644 +--- a/src/FieldMapping.cpp ++++ b/src/FieldMapping.cpp +@@ -49,9 +49,6 @@ + #include "FieldMapping.h" + #include "Types.h" + +-#ifdef WIN32 +-#define isnan(__x__) _isnan(__x__) +-#endif + + //----------------------------------------------------------------------------// + +diff --git a/src/Log.cpp b/src/Log.cpp +index f78229c..d095a50 100644 +--- a/src/Log.cpp ++++ b/src/Log.cpp +@@ -40,8 +40,9 @@ + */ + + //----------------------------------------------------------------------------// +- ++#ifndef _WIN32 + #include ++#endif + #include + #include + diff --git a/ports/field3d/0003_hdf5_api.patch b/ports/field3d/0003_hdf5_api.patch new file mode 100644 index 00000000000000..183a49c9e6e071 --- /dev/null +++ b/ports/field3d/0003_hdf5_api.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b57057f..e809880 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,6 +35,7 @@ CMAKE_MINIMUM_REQUIRED( VERSION 3.17 ) + + PROJECT ( field3d ) + ++add_definitions(-DH5_USE_110_API) + set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake ) + + FIND_PACKAGE (Doxygen) diff --git a/ports/field3d/portfile.cmake b/ports/field3d/portfile.cmake new file mode 100644 index 00000000000000..a23e042494b94a --- /dev/null +++ b/ports/field3d/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO imageworks/Field3D + REF 0cf75ad982917e0919f59e5cb3d483517d06d7da + SHA512 e6f137013dd7b64b51b2ec3cc3ed8f4dbfadb85858946f08393653d78136cf8f93ae124716db11358e325c5e64ba04802afd4b89ca36ad65a14dd3db17f3072c + HEAD_REF master + PATCHES + 0001_fix_build_errors.patch + 0002_improve_win_compatibility.patch + 0003_hdf5_api.patch # Switches the HDF5 default API for this port to 1.10 +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindILMBase.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DINSTALL_DOCS:BOOL=OFF" +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/field3d/vcpkg.json b/ports/field3d/vcpkg.json new file mode 100644 index 00000000000000..21ca20bdc1e486 --- /dev/null +++ b/ports/field3d/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "field3d", + "version-string": "1.7.3", + "port-version": 2, + "description": "An open source library for storing voxel data. It provides C++ classes that handle in-memory storage and a file format based on HDF5 that allows the C++ objects to be written to and read from disk.", + "homepage": "https://github.com/imageworks/Field3D", + "supports": "!uwp", + "dependencies": [ + "boost-foreach", + "boost-format", + "boost-program-options", + "boost-regex", + "boost-system", + "boost-test", + "boost-thread", + "boost-timer", + "hdf5", + "openexr" + ] +} diff --git a/ports/fixed-string/portfile.cmake b/ports/fixed-string/portfile.cmake new file mode 100644 index 00000000000000..760d2d0a632d90 --- /dev/null +++ b/ports/fixed-string/portfile.cmake @@ -0,0 +1,27 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO unterumarmung/fixed_string + REF v0.1.0 + SHA512 759c228e3bc4bc06d58b59bc19756ceb27a6f6104cb0c58288bf3156ca0958e6099741870fa09ba88a5572d17988529992cc5198faab30847118665e626c2ea4 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFIXED_STRING_OPT_BUILD_EXAMPLES=OFF + -DFIXED_STRING_OPT_BUILD_TESTS=OFF + -DFIXED_STRING_OPT_INSTALL=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fixed_string TARGET_PATH share/fixed_string) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/fixed-string/vcpkg.json b/ports/fixed-string/vcpkg.json new file mode 100644 index 00000000000000..b7ed3e4d7aee68 --- /dev/null +++ b/ports/fixed-string/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fixed-string", + "version-string": "0.1.0", + "port-version": 1, + "description": "Header-only C++17 library provides a string class with std::array fixed-size semantic.", + "homepage": "https://github.com/unterumarmung/fixed_string" +} diff --git a/ports/fizz/CONTROL b/ports/fizz/CONTROL deleted file mode 100644 index ab3acb20ef1d61..00000000000000 --- a/ports/fizz/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fizz -Version: 2019.05.20.00-1 -Build-Depends: folly, openssl, libsodium, zlib -Description: a TLS 1.3 implementation by Facebook diff --git a/ports/fizz/find-zlib.patch b/ports/fizz/find-zlib.patch deleted file mode 100644 index 34e93168e0721f..00000000000000 --- a/ports/fizz/find-zlib.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt -index 0c95883..52585aa 100644 ---- a/fizz/CMakeLists.txt -+++ b/fizz/CMakeLists.txt -@@ -86,6 +86,9 @@ else() - list(APPEND FIZZ_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - endif() - -+find_package(ZLIB REQUIRED) -+list(APPEND FIZZ_SHINY_DEPENDENCIES ZLIB::ZLIB) -+ - set(FIZZ_HEADER_DIRS - base - client diff --git a/ports/fizz/fix-build_error.patch b/ports/fizz/fix-build_error.patch deleted file mode 100644 index e85f16c6e49c0c..00000000000000 --- a/ports/fizz/fix-build_error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt -index 7f8769a..debac4e 100644 ---- a/fizz/CMakeLists.txt -+++ b/fizz/CMakeLists.txt -@@ -81,7 +81,7 @@ if(TARGET event) - message(STATUS "Found libevent from package config") - list(APPEND FIZZ_SHINY_DEPENDENCIES event) - else() -- find_package(Libevent MODULE REQUIRED) -+ find_package(Libevent CONFIG REQUIRED) - list(APPEND FIZZ_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FIZZ_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - endif() diff --git a/ports/fizz/fix-zlib.patch b/ports/fizz/fix-zlib.patch new file mode 100644 index 00000000000000..88b6fabe9d727d --- /dev/null +++ b/ports/fizz/fix-zlib.patch @@ -0,0 +1,36 @@ +diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt +index 485e38fc..471d61a5 100644 +--- a/fizz/CMakeLists.txt ++++ b/fizz/CMakeLists.txt +@@ -87,6 +87,8 @@ else() + list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR}) + endif() + ++find_package(ZLIB REQUIRED) ++ + find_package(Libevent CONFIG QUIET) + if(TARGET event) + message(STATUS "Found libevent from package config") +@@ -246,6 +248,7 @@ target_link_libraries(fizz + ${OPENSSL_LIBRARIES} + sodium + Threads::Threads ++ ZLIB::ZLIB + PRIVATE + ${GLOG_LIBRARIES} + ${GFLAGS_LIBRARIES} +diff --git a/fizz/cmake/fizz-config.cmake.in b/fizz/cmake/fizz-config.cmake.in +index d9918469..679b0e61 100644 +--- a/fizz/cmake/fizz-config.cmake.in ++++ b/fizz/cmake/fizz-config.cmake.in +@@ -25,7 +25,10 @@ endif() + + set(FIZZ_LIBRARIES fizz::fizz) + ++include(CMakeFindDependencyMacro) + find_dependency(Sodium) ++find_dependency(folly CONFIG) ++find_dependency(ZLIB) + + if (NOT fizz_FIND_QUIETLY) + message(STATUS "Found fizz: ${PACKAGE_PREFIX_DIR}") diff --git a/ports/fizz/portfile.cmake b/ports/fizz/portfile.cmake index 16459cbf48c10b..8af6d336fdc7d8 100644 --- a/ports/fizz/portfile.cmake +++ b/ports/fizz/portfile.cmake @@ -1,22 +1,18 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebookincubator/fizz - REF 6d26a1be8d7a20d8d89c374ee3dc5c452d18c18d - SHA512 bc6aa17a97fdfc53d0a247b876cbd1fea8214608b7e463dcf21e34df65015fe77e617c5a6c6bfa84b87e60e56b6aeb89aa2d8d774f97fc1f76f415869948a48a + REF v2021.06.14.00 + SHA512 ff55f933d55031128b5355707fd025649ad90d261d91ec5f9d793433a77e63d3c2527a7f0111d6a3151667ab29f4117f96a505bcb80c1a4a99bd60346f05f4de HEAD_REF master PATCHES - find-zlib.patch - fix-build_error.patch + fix-zlib.patch ) # Prefer installed config files file(REMOVE ${SOURCE_PATH}/fizz/cmake/FindGflags.cmake - ${SOURCE_PATH}/fizz/cmake/FindLibevent.cmake ${SOURCE_PATH}/fizz/cmake/FindGlog.cmake ) @@ -33,17 +29,12 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fizz) vcpkg_copy_pdbs() -file(READ ${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake _contents) -string(REPLACE "lib/cmake/fizz" "share/fizz" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake -"include(CMakeFindDependencyMacro) -find_dependency(folly CONFIG) -find_dependency(ZLIB) -${_contents}") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake" "lib/cmake/fizz" "share/fizz") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fizz RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/fizz/tool/test" "${CURRENT_PACKAGES_DIR}/include/fizz/util/test") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/fizz/vcpkg.json b/ports/fizz/vcpkg.json new file mode 100644 index 00000000000000..efc70e89783540 --- /dev/null +++ b/ports/fizz/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "fizz", + "version-string": "2021.06.14.00", + "description": "a TLS 1.3 implementation by Facebook", + "homepage": "https://github.com/facebookincubator/fizz", + "dependencies": [ + "fmt", + "folly", + "libsodium", + "openssl", + "zstd" + ] +} diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL deleted file mode 100644 index b1aa872355f55e..00000000000000 --- a/ports/flann/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: flann -Version: 2019-04-07-1 -Homepage: https://github.com/mariusmuja/flann -Build-Depends: lz4 -Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/fix-build-error.patch b/ports/flann/fix-build-error.patch index f4867cba95a8b6..4f48aee556607a 100644 --- a/ports/flann/fix-build-error.patch +++ b/ports/flann/fix-build-error.patch @@ -1,90 +1,64 @@ +From c111a280591aa542914ca845c0be6099a94315ad Mon Sep 17 00:00:00 2001 +From: Lars Glud +Date: Tue, 16 Mar 2021 10:40:06 +0100 +Subject: [PATCH] fix build error + +--- + CMakeLists.txt | 8 ++- + cmake/Config.cmake.in | 5 ++ + src/cpp/CMakeLists.txt | 149 ++++++++++++++++++++++++----------------- + 3 files changed, 96 insertions(+), 66 deletions(-) + diff --git a/CMakeLists.txt b/CMakeLists.txt -index f4b94d2..7ff331a 100644 +index f4b94d2..33b2c26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -146,8 +146,7 @@ if (BUILD_CUDA_LIB) +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 2.8.12) + + if(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) +@@ -49,6 +49,8 @@ set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) + # set output path for tests + set(TEST_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/test) + ++option(BUILD_DYNAMIC "Build shared version of libs" ON) ++option(BUILD_STATIC "Build static version of libs" ON) + option(BUILD_C_BINDINGS "Build C bindings" ON) + option(BUILD_PYTHON_BINDINGS "Build Python bindings" ON) + option(BUILD_MATLAB_BINDINGS "Build Matlab bindings" ON) +@@ -146,8 +148,8 @@ if (BUILD_CUDA_LIB) endif(CUDA_FOUND) endif(BUILD_CUDA_LIB) -find_package(PkgConfig REQUIRED) -pkg_check_modules(LZ4 REQUIRED liblz4) -+find_package(lz4 REQUIRED) ++find_package(PkgConfig) ++find_package(lz4 CONFIG REQUIRED) #set the C/C++ include path to the "include" directory include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src/cpp) diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in -index 6b95a71..778aec4 100644 +index 6b95a71..e8bb3f7 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in -@@ -3,3 +3,5 @@ - include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") - check_required_components("flann") +@@ -1,5 +1,10 @@ + @PACKAGE_INIT@ ++# Get definition of 'find_dependency' macro +include(CMakeFindDependencyMacro) ++# Find lz4. This will create 'lz4::lz4' target +find_dependency(lz4) -\ No newline at end of file -diff --git a/cmake/flann_utils.cmake b/cmake/flann_utils.cmake -index afe4742..8aef8e0 100644 ---- a/cmake/flann_utils.cmake -+++ b/cmake/flann_utils.cmake -@@ -1,8 +1,7 @@ - macro(GET_OS_INFO) - string(REGEX MATCH "Linux" OS_IS_LINUX ${CMAKE_SYSTEM_NAME}) -- set(FLANN_LIB_INSTALL_DIR "lib${LIB_SUFFIX}") -- set(FLANN_INCLUDE_INSTALL_DIR -- "include/${PROJECT_NAME_LOWER}-${FLANN_MAJOR_VERSION}.${FLANN_MINOR_VERSION}") -+ set(FLANN_LIB_INSTALL_DIR "lib") -+ set(FLANN_INCLUDE_INSTALL_DIR "include") - endmacro(GET_OS_INFO) - - -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 3f4655a..bc1d758 100644 ---- a/examples/CMakeLists.txt -+++ b/examples/CMakeLists.txt -@@ -1,9 +1,10 @@ - add_custom_target(examples ALL) - -+find_package(lz4 REQUIRED) ++ + include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") + check_required_components("flann") - if (BUILD_C_BINDINGS) - add_executable(flann_example_c flann_example.c) -- target_link_libraries(flann_example_c -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) -+ target_link_libraries(flann_example_c lz4::lz4) - target_link_libraries(flann_example_c flann) - set_target_properties(flann_example_c PROPERTIES COMPILE_FLAGS -std=c99) - -@@ -15,7 +16,7 @@ if (HDF5_FOUND) - include_directories(${HDF5_INCLUDE_DIR}) - - add_executable(flann_example_cpp flann_example.cpp) -- target_link_libraries(flann_example_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) -+ target_link_libraries(flann_example_cpp lz4::lz4) - target_link_libraries(flann_example_cpp ${HDF5_LIBRARIES} flann_cpp) - if (HDF5_IS_PARALLEL) - target_link_libraries(flann_example_cpp ${MPI_LIBRARIES}) -@@ -27,7 +28,7 @@ if (HDF5_FOUND) - - if (USE_MPI AND HDF5_IS_PARALLEL) - add_executable(flann_example_mpi flann_example_mpi.cpp) -- target_link_libraries(flann_example_mpi -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) -+ target_link_libraries(flann_example_mpi lz4::lz4) - target_link_libraries(flann_example_mpi flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES}) - - add_dependencies(examples flann_example_mpi) diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt -index b421abb..78f9a64 100644 +index b421abb..474cd7e 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt -@@ -1,6 +1,6 @@ - #include_directories(${CMAKE_SOURCE_DIR}/include algorithms ext util nn .) - --add_definitions(-D_FLANN_VERSION=${FLANN_VERSION}) -+add_definitions(-D_FLANN_VERSION=${FLANN_VERSION} -std=c++11) - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h) - -@@ -8,12 +8,11 @@ file(GLOB_RECURSE C_SOURCES flann.cpp) +@@ -8,13 +8,7 @@ file(GLOB_RECURSE C_SOURCES flann.cpp) file(GLOB_RECURSE CPP_SOURCES flann_cpp.cpp) file(GLOB_RECURSE CU_SOURCES *.cu) @@ -94,30 +68,49 @@ index b421abb..78f9a64 100644 - set_target_properties(flann_cpp_s PROPERTIES COMPILE_FLAGS -fPIC) -endif() -set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC FLANN_USE_CUDA) -+find_package(lz4 REQUIRED) -+set(CMAKE_POSITION_INDEPENDENT_CODE ON) -+add_library(flann_cpp STATIC ${CPP_SOURCES}) -+target_link_libraries(flann_cpp PRIVATE lz4::lz4) -+set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) - +- ++#Set flags if we build CUDA versions if (BUILD_CUDA_LIB) SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-DFLANN_USE_CUDA") -@@ -25,45 +24,9 @@ if (BUILD_CUDA_LIB) + if(CMAKE_COMPILER_IS_GNUCC) +@@ -25,75 +19,93 @@ if (BUILD_CUDA_LIB) else() set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};" ) endif() - cuda_add_library(flann_cuda_s STATIC ${CU_SOURCES}) - set_property(TARGET flann_cuda_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) --endif() -- + endif() + -if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) - add_library(flann_cpp SHARED "") - set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive) -- ++if(BUILD_STATIC) ++ add_library(flann_cpp_s STATIC ${CPP_SOURCES}) ++ target_link_libraries(flann_cpp_s PUBLIC lz4::lz4) ++ set_property(TARGET flann_cpp_s PROPERTY OUTPUT_NAME flann_cpp) ++ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) ++ set_target_properties(flann_cpp_s PROPERTIES COMPILE_FLAGS -fPIC) ++ endif() ++ ++ if (BUILD_CUDA_LIB) ++ cuda_add_library(flann_cuda_s STATIC ${CU_SOURCES}) ++ target_link_libraries(flann_cuda_s lz4::lz4) ++ set_property(TARGET flann_cuda_s PROPERTY OUTPUT_NAME flann_cuda) ++ set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC FLANN_USE_CUDA) ++ endif() ++endif() + - if (BUILD_CUDA_LIB) - cuda_add_library(flann_cuda SHARED "") -- set_target_properties(flann_cuda PROPERTIES LINKER_LANGUAGE CXX) ++if(BUILD_DYNAMIC) ++ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) ++ add_library(flann_cpp SHARED ${CPP_SOURCES}) ++ set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX) ++ target_link_libraries(flann_cpp PUBLIC lz4::lz4) ++ if (BUILD_CUDA_LIB) ++ cuda_add_library(flann_cuda SHARED ${CU_SOURCES}) + set_target_properties(flann_cuda PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(flann_cuda -Wl,-whole-archive flann_cuda_s -Wl,-no-whole-archive) - set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) - # target_link_libraries(flann_cuda cudpp_x86_64) @@ -129,7 +122,7 @@ index b421abb..78f9a64 100644 - set_target_properties(flann_cpp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS YES) - if (BUILD_CUDA_LIB) - cuda_add_library(flann_cuda SHARED ${CPP_SOURCES}) -- set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) + set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) - endif() -endif() - @@ -145,64 +138,139 @@ index b421abb..78f9a64 100644 - SOVERSION ${FLANN_SOVERSION} - DEFINE_SYMBOL FLANN_EXPORTS - ) -+ cuda_add_library(flann_cuda STATIC ${CU_SOURCES}) -+ set_property(TARGET flann_cuda PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) -+ set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) ++ endif() ++ else() ++ add_library(flann_cpp SHARED ${CPP_SOURCES}) ++ target_link_libraries(flann_cpp PUBLIC lz4::lz4) ++ # export lz4 headers, so that MSVC to creates flann_cpp.lib ++ set_target_properties(flann_cpp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS YES) ++ if (BUILD_CUDA_LIB) ++ cuda_add_library(flann_cuda SHARED ${CU_SOURCES}) ++ target_link_libraries(flann_cuda lz4::lz4) ++ set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) ++ endif() ++ endif() ++ ++ set_target_properties(flann_cpp PROPERTIES ++ VERSION ${FLANN_VERSION} ++ SOVERSION ${FLANN_SOVERSION} ++ DEFINE_SYMBOL FLANN_EXPORTS ++ ) ++ ++ if (BUILD_CUDA_LIB) ++ set_target_properties(flann_cuda PROPERTIES ++ VERSION ${FLANN_VERSION} ++ SOVERSION ${FLANN_SOVERSION} ++ DEFINE_SYMBOL FLANN_EXPORTS ++ ) ++ endif() endif() +- + if (USE_MPI AND HDF5_IS_PARALLEL) +- add_executable(flann_mpi_server flann/mpi/flann_mpi_server.cpp) +- target_link_libraries(flann_mpi_server flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES}) ++ if(BUILD_DYNAMIC) ++ add_executable(flann_mpi_server flann/mpi/flann_mpi_server.cpp) ++ target_link_libraries(flann_mpi_server flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES}) -@@ -80,6 +43,7 @@ endif() +- add_executable(flann_mpi_client flann/mpi/flann_mpi_client.cpp) +- target_link_libraries(flann_mpi_client flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES}) ++ add_executable(flann_mpi_client flann/mpi/flann_mpi_client.cpp) ++ target_link_libraries(flann_mpi_client flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES}) +- install (TARGETS flann_mpi_client flann_mpi_server +- DESTINATION bin) ++ install (TARGETS flann_mpi_client flann_mpi_server ++ DESTINATION bin) ++ endif() + endif() +- if (BUILD_C_BINDINGS) -+ if (0) ++ if(BUILD_STATIC) add_library(flann_s STATIC ${C_SOURCES}) - target_link_libraries(flann_s -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) +- target_link_libraries(flann_s -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) ++ target_link_libraries(flann_s PUBLIC lz4::lz4) ++ set_property(TARGET flann_s PROPERTY OUTPUT_NAME flann) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) -@@ -105,6 +69,10 @@ if (BUILD_C_BINDINGS) + set_target_properties(flann_s PROPERTIES COMPILE_FLAGS -fPIC) + endif() + set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) +- ++ endif() ++ ++ if(BUILD_DYNAMIC) + if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann SHARED "") ++ add_library(flann SHARED ${C_SOURCES}) ++ target_link_libraries(flann PUBLIC lz4::lz4) + set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) +- target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) + else() + add_library(flann SHARED ${C_SOURCES}) +- target_link_libraries(flann -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) ++ target_link_libraries(flann PUBLIC lz4::lz4) + + if(MINGW AND OPENMP_FOUND) + target_link_libraries(flann gomp) +@@ -105,20 +117,31 @@ if (BUILD_C_BINDINGS) SOVERSION ${FLANN_SOVERSION} DEFINE_SYMBOL FLANN_EXPORTS ) -+ endif() -+ add_library(flann STATIC ${C_SOURCES}) -+ target_link_libraries(flann PRIVATE lz4::lz4) -+ set_property(TARGET flann PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) ++ endif() endif() if(WIN32) -@@ -118,9 +86,9 @@ endif(WIN32) +-if (BUILD_C_BINDINGS AND BUILD_MATLAB_BINDINGS) +- install ( +- TARGETS flann +- RUNTIME DESTINATION share/flann/matlab +- ) +-endif() ++ if (BUILD_C_BINDINGS AND BUILD_MATLAB_BINDINGS) ++ install ( ++ TARGETS flann ++ RUNTIME DESTINATION share/flann/matlab ++ ) ++ endif() + endif(WIN32) ++if(BUILD_STATIC) ++ list(APPEND FLANN_TARGETS_CPP "flann_cpp_s") ++ list(APPEND FLANN_TARGETS_C "flann_s") ++ list(APPEND FLANN_TARGETS_CUDA "flann_cuda_s") ++endif() ++if(BUILD_DYNAMIC) ++ list(APPEND FLANN_TARGETS_CPP "flann_cpp") ++ list(APPEND FLANN_TARGETS_C "flann") ++ list(APPEND FLANN_TARGETS_CUDA "flann_cuda") ++endif() install ( - TARGETS flann_cpp flann_cpp_s -+ TARGETS flann_cpp ++ TARGETS ${FLANN_TARGETS_CPP} EXPORT ${targets_export_name} -- INCLUDES DESTINATION include -+ INCLUDES DESTINATION ${FLANN_INCLUDE_INSTALL_DIR} + INCLUDES DESTINATION include RUNTIME DESTINATION bin - LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} -@@ -128,9 +96,9 @@ install ( +@@ -128,7 +151,7 @@ install ( if (BUILD_CUDA_LIB) install ( - TARGETS flann_cuda flann_cuda_s -+ TARGETS flann_cuda ++ TARGETS ${FLANN_TARGETS_CUDA} EXPORT ${targets_export_name} -- INCLUDES DESTINATION include -+ INCLUDES DESTINATION ${FLANN_INCLUDE_INSTALL_DIR} + INCLUDES DESTINATION include RUNTIME DESTINATION bin - LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} -@@ -139,9 +107,9 @@ endif() +@@ -139,7 +162,7 @@ endif() if (BUILD_C_BINDINGS) install ( - TARGETS flann flann_s -+ TARGETS flann ++ TARGETS ${FLANN_TARGETS_C} EXPORT ${targets_export_name} -- INCLUDES DESTINATION include -+ INCLUDES DESTINATION ${FLANN_INCLUDE_INSTALL_DIR} + INCLUDES DESTINATION include RUNTIME DESTINATION bin - LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} +-- +2.29.2.windows.2 + diff --git a/ports/flann/fix-dependency-hdf5.patch b/ports/flann/fix-dependency-hdf5.patch new file mode 100644 index 00000000000000..39df0a31302a63 --- /dev/null +++ b/ports/flann/fix-dependency-hdf5.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7ff331a..155cabe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -75,11 +75,17 @@ if (NOT PYTHON_EXECUTABLE) + endif() + endif() + ++if (WITH_HDF5) + find_hdf5() +-if (NOT HDF5_FOUND) +- message(WARNING "hdf5 library not found, some tests will not be run") ++if (NOT hdf5_FOUND) ++ message(ERROR "hdf5 library not found") + else() +- include_directories(${HDF5_INCLUDE_DIR}) ++ if (TARGET hdf5::hdf5-shared) ++ link_libraries(hdf5::hdf5-shared) ++ elseif (TARGET hdf5::hdf5-static) ++ link_libraries(hdf5::hdf5-static) ++ endif() ++endif() + endif() + + if (USE_MPI OR HDF5_IS_PARALLEL) +diff --git a/cmake/flann_utils.cmake b/cmake/flann_utils.cmake +index 8aef8e0..747414f 100644 +--- a/cmake/flann_utils.cmake ++++ b/cmake/flann_utils.cmake +@@ -21,21 +21,8 @@ endmacro(DISSECT_VERSION) + + # workaround a FindHDF5 bug + macro(find_hdf5) +- find_package(HDF5) +- +- set( HDF5_IS_PARALLEL FALSE ) +- foreach( _dir ${HDF5_INCLUDE_DIRS} ) +- if( EXISTS "${_dir}/H5pubconf.h" ) +- file( STRINGS "${_dir}/H5pubconf.h" +- HDF5_HAVE_PARALLEL_DEFINE +- REGEX "HAVE_PARALLEL 1" ) +- if( HDF5_HAVE_PARALLEL_DEFINE ) +- set( HDF5_IS_PARALLEL TRUE ) +- endif() +- endif() +- endforeach() +- set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL +- "HDF5 library compiled with parallel IO support" ) ++ find_package(hdf5 CONFIG) ++ set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL}) + mark_as_advanced( HDF5_IS_PARALLEL ) + endmacro(find_hdf5) + diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index ec9637212fdcd4..d70669b5ff8957 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -1,23 +1,33 @@ -include(vcpkg_common_functions) - #the port uses inside the CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS, which is discouraged by vcpkg. -#Since it's its author choice, we should not disallow it, but unfortunately looks like it's broken, so we block it anyway... -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO mariusmuja/flann + REPO flann-lib/flann REF 1d04523268c388dabf1c0865d69e1b638c8c7d9d SHA512 61e322222c2daa0b9677095e5ca231cba7c305ce754ad8e659eee350111c1e04351181c3af04e45ab6e5c9edea49c7b9ec6499bb0dbc080b87af36eb11c6ef7c HEAD_REF master - PATCHES fix-build-error.patch + PATCHES + fix-build-error.patch + fix-dependency-hdf5.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + hdf5 WITH_HDF5 + cuda WITH_CUDA ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FLANN_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" FLANN_BUILD_DYNAMIC) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA DISABLE_PARALLEL_CONFIGURE - OPTIONS + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_DYNAMIC=${FLANN_BUILD_DYNAMIC} + -DBUILD_STATIC=${FLANN_BUILD_STATIC} + -DBUILD_CUDA_LIB=${WITH_CUDA} -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_DOC=OFF @@ -33,5 +43,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/COPYING ${CURRENT_PACKAGES_DIR}/share/flann/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann RENAME copyright) diff --git a/ports/flann/vcpkg.json b/ports/flann/vcpkg.json new file mode 100644 index 00000000000000..1221c9be98c49c --- /dev/null +++ b/ports/flann/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "flann", + "version-date": "2019-04-07", + "port-version": 2, + "description": "Fast Library for Approximate Nearest Neighbors", + "homepage": "https://github.com/mariusmuja/flann", + "dependencies": [ + "lz4" + ], + "features": { + "cuda": { + "description": "CUDA support for FLANN", + "dependencies": [ + "cuda" + ] + }, + "hdf5": { + "description": "Build with hdf5", + "dependencies": [ + "hdf5" + ] + } + } +} diff --git a/ports/flashlight-cpu/fix-dependencies.patch b/ports/flashlight-cpu/fix-dependencies.patch new file mode 100644 index 00000000000000..6d4c1b40e4288e --- /dev/null +++ b/ports/flashlight-cpu/fix-dependencies.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d9eacb..b530743 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -183,7 +183,7 @@ if (FL_BUILD_CORE) + + # If cereal is found in a user-defined location, use it rather than + # downloading from source +- find_package(cereal) ++ find_package(cereal CONFIG REQUIRED) + if (NOT TARGET cereal AND NOT cereal_FOUND AND FL_BUILD_STANDALONE) + message(STATUS "cereal NOT found. Will download from source") + set(CEREAL_INSTALL_PATH ${FL_INSTALL_INC_DIR}/cereal) +@@ -206,7 +206,6 @@ if (FL_BUILD_CORE) + message(STATUS "Found cereal") + target_link_libraries(flashlight PRIVATE cereal) + endif() +- setup_install_find_module(${CMAKE_MODULE_PATH}/Findcereal.cmake) + + # -------------------- Locate Backend-specific Dependencies -------------------- + # TODO: rather than conditionally searching for backend-specific dependencies, +diff --git a/cmake/flashlightConfig.cmake.in b/cmake/flashlightConfig.cmake.in +index 00f9442..f265b8f 100644 +--- a/cmake/flashlightConfig.cmake.in ++++ b/cmake/flashlightConfig.cmake.in +@@ -36,6 +36,7 @@ if (@FL_BUILD_LIBRARIES@) + endif() + # Core dependencies + if (@FL_BUILD_CORE@) ++ find_dependency(cereal CONFIG) + find_dependency(ArrayFire 3.7.1) + endif() + if (@FL_BUILD_DISTRIBUTED@) diff --git a/ports/flashlight-cpu/portfile.cmake b/ports/flashlight-cpu/portfile.cmake new file mode 100644 index 00000000000000..cf4f1cdcc3a987 --- /dev/null +++ b/ports/flashlight-cpu/portfile.cmake @@ -0,0 +1,88 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/flashlight") + message(FATAL_ERROR "Only one of flashlight-cpu and flashlight-cuda" + "can be installed at once. Uninstall and try again:" + "\n vcpkg remove flashlight-cuda\n") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO flashlight/flashlight + REF 626914e79073c5547513de649af706f7e2b796ad # 0.3 branch tip + SHA512 a22057cfa4cfe7acd95cbc5445a30870cce3cdde89066d1d75f40be0d73b069a49e89b226fe5337488cfe5618dd25958679c0636a3e4008312f01606328becfa + HEAD_REF master + PATCHES fix-dependencies.patch +) + +################################### Build ################################### +# Default flags +set(FL_DEFAULT_VCPKG_CMAKE_FLAGS + -DFL_BUILD_TESTS=OFF + -DFL_BUILD_EXAMPLES=OFF + -DFL_BACKEND=CPU # this port is CPU-backend only + -DFL_BUILD_STANDALONE=OFF +) + +# Determine which components to build via specified feature +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + lib FL_BUILD_LIBRARIES + fl FL_BUILD_CORE + asr FL_BUILD_APP_ASR + imgclass FL_BUILD_APP_IMGCLASS + lm FL_BUILD_APP_LM + objdet FL_BUILD_APP_OBJDET +) + +# Build and install +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FL_DEFAULT_VCPKG_CMAKE_FLAGS} + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DFL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/debug/share/flashlight + OPTIONS_RELEASE + -DFL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share/flashlight +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/flashlight TARGET_PATH share/flashlight) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Binaries/tools +set(FLASHLIGHT_TOOLS "") +if ("imgclass" IN_LIST FEATURES) + list(APPEND FLASHLIGHT_TOOLS + fl_img_imagenet_resnet34 + fl_img_imagenet_eval + fl_img_imagenet_vit + ) +endif() +if ("asr" IN_LIST FEATURES) + list(APPEND FLASHLIGHT_TOOLS + fl_asr_train + fl_asr_test + fl_asr_decode + fl_asr_align + fl_asr_voice_activity_detection_ctc + fl_asr_arch_benchmark + ) +endif() +if ("lm" IN_LIST FEATURES) + list(APPEND FLASHLIGHT_TOOLS + fl_lm_dictionary_builder + fl_lm_train + fl_lm_test + ) +endif() +list(LENGTH FLASHLIGHT_TOOLS NUM_TOOLS) +if (NUM_TOOLS GREATER 0) + vcpkg_copy_tools(TOOL_NAMES ${FLASHLIGHT_TOOLS} AUTO_CLEAN) +endif() + +# Copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/flashlight-cpu/vcpkg.json b/ports/flashlight-cpu/vcpkg.json new file mode 100644 index 00000000000000..98a934d244dff8 --- /dev/null +++ b/ports/flashlight-cpu/vcpkg.json @@ -0,0 +1,96 @@ +{ + "name": "flashlight-cpu", + "version": "0.3", + "port-version": 2, + "description": "A C++ standalone library for machine learning. CPU backend.", + "homepage": "https://github.com/facebookresearch/flashlight", + "supports": "!(windows | osx)", + "default-features": [ + "fl" + ], + "features": { + "asr": { + "description": "flashlight asr app", + "dependencies": [ + { + "name": "flashlight-cpu", + "features": [ + "fl", + "lib" + ] + }, + "gflags", + "libsndfile" + ] + }, + "fl": { + "description": "flashlight core autograd and neural net library", + "dependencies": [ + { + "name": "arrayfire", + "features": [ + "cpu" + ] + }, + "cereal", + { + "name": "gloo", + "features": [ + "mpi" + ] + }, + "onednn", + "openmpi", + "stb" + ] + }, + "imgclass": { + "description": "flashlight image classification app", + "dependencies": [ + { + "name": "flashlight-cpu", + "features": [ + "fl", + "lib" + ] + }, + "gflags" + ] + }, + "lib": { + "description": "flashlight libraries", + "dependencies": [ + "fftw3", + "intel-mkl", + "kenlm" + ] + }, + "lm": { + "description": "flashlight lm app", + "dependencies": [ + { + "name": "flashlight-cpu", + "features": [ + "fl", + "lib" + ] + }, + "gflags" + ] + }, + "objdet": { + "description": "flashlight object detection app", + "dependencies": [ + { + "name": "flashlight-cpu", + "features": [ + "fl", + "imgclass", + "lib" + ] + }, + "gflags" + ] + } + } +} diff --git a/ports/flashlight-cuda/portfile.cmake b/ports/flashlight-cuda/portfile.cmake new file mode 100644 index 00000000000000..9935ea94eb1914 --- /dev/null +++ b/ports/flashlight-cuda/portfile.cmake @@ -0,0 +1,87 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/flashlight") + message(FATAL_ERROR "Only one of flashlight-cpu and flashlight-cuda" + "can be installed at once. Uninstall and try again:" + "\n vcpkg remove flashlight-cuda\n") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO flashlight/flashlight + REF 626914e79073c5547513de649af706f7e2b796ad # 0.3 branch tip + SHA512 a22057cfa4cfe7acd95cbc5445a30870cce3cdde89066d1d75f40be0d73b069a49e89b226fe5337488cfe5618dd25958679c0636a3e4008312f01606328becfa + HEAD_REF master +) + +################################### Build ################################### +# Default flags +set(FL_DEFAULT_VCPKG_CMAKE_FLAGS + -DFL_BUILD_TESTS=OFF + -DFL_BUILD_EXAMPLES=OFF + -DFL_BACKEND=CUDA # this port is CUDA-backend only + -DFL_BUILD_STANDALONE=OFF +) + +# Determine which components to build via specified feature +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + lib FL_BUILD_LIBRARIES + fl FL_BUILD_CORE + asr FL_BUILD_APP_ASR + imgclass FL_BUILD_APP_IMGCLASS + lm FL_BUILD_APP_LM + objdet FL_BUILD_APP_OBJDET +) + +# Build and install +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FL_DEFAULT_VCPKG_CMAKE_FLAGS} + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DFL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/debug/share/flashlight + OPTIONS_RELEASE + -DFL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share/flashlight +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/flashlight TARGET_PATH share/flashlight) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Binaries/tools +set(FLASHLIGHT_TOOLS "") +if ("imgclass" IN_LIST FEATURES) + list(APPEND FLASHLIGHT_TOOLS + fl_img_imagenet_resnet34 + fl_img_imagenet_eval + fl_img_imagenet_vit + ) +endif() +if ("asr" IN_LIST FEATURES) + list(APPEND FLASHLIGHT_TOOLS + fl_asr_train + fl_asr_test + fl_asr_decode + fl_asr_align + fl_asr_voice_activity_detection_ctc + fl_asr_arch_benchmark + ) +endif() +if ("lm" IN_LIST FEATURES) + list(APPEND FLASHLIGHT_TOOLS + fl_lm_dictionary_builder + fl_lm_train + fl_lm_test + ) +endif() +list(LENGTH FLASHLIGHT_TOOLS NUM_TOOLS) +if (NUM_TOOLS GREATER 0) + vcpkg_copy_tools(TOOL_NAMES ${FLASHLIGHT_TOOLS} AUTO_CLEAN) +endif() + +# Copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/flashlight-cuda/vcpkg.json b/ports/flashlight-cuda/vcpkg.json new file mode 100644 index 00000000000000..c0e0a026f4cd22 --- /dev/null +++ b/ports/flashlight-cuda/vcpkg.json @@ -0,0 +1,94 @@ +{ + "name": "flashlight-cuda", + "version": "0.3", + "port-version": 2, + "description": "A C++ standalone library for machine learning. CUDA backend.", + "homepage": "https://github.com/facebookresearch/flashlight", + "supports": "!(windows | osx)", + "default-features": [ + "fl" + ], + "features": { + "asr": { + "description": "flashlight asr app", + "dependencies": [ + { + "name": "flashlight-cuda", + "features": [ + "fl", + "lib" + ] + }, + "gflags", + "libsndfile" + ] + }, + "fl": { + "description": "flashlight core autograd and neural net library", + "dependencies": [ + { + "name": "arrayfire", + "features": [ + "cuda" + ] + }, + "cereal", + "cuda", + "cudnn", + "nccl", + "openmpi", + "stb" + ] + }, + "imgclass": { + "description": "flashlight image classification app", + "dependencies": [ + { + "name": "flashlight-cuda", + "features": [ + "fl", + "lib" + ] + }, + "gflags" + ] + }, + "lib": { + "description": "flashlight libraries", + "dependencies": [ + "cub", + "cuda", + "fftw3", + "intel-mkl", + "kenlm" + ] + }, + "lm": { + "description": "flashlight lm app", + "dependencies": [ + { + "name": "flashlight-cuda", + "features": [ + "fl", + "lib" + ] + }, + "gflags" + ] + }, + "objdet": { + "description": "flashlight object detection app", + "dependencies": [ + { + "name": "flashlight-cuda", + "features": [ + "fl", + "imgclass", + "lib" + ] + }, + "gflags" + ] + } + } +} diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL deleted file mode 100644 index 3baf26b02f97fc..00000000000000 --- a/ports/flatbuffers/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: flatbuffers -Version: 1.11.0-1 -Description: Memory Efficient Serialization Library - FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility. -Homepage: https://google.github.io/flatbuffers/ diff --git a/ports/flatbuffers/fix-uwp-build.patch b/ports/flatbuffers/fix-uwp-build.patch index 7d8fe93a340663..44513b9e8ba6dc 100644 --- a/ports/flatbuffers/fix-uwp-build.patch +++ b/ports/flatbuffers/fix-uwp-build.patch @@ -1,12 +1,12 @@ diff --git a/src/util.cpp b/src/util.cpp -index c1bb197..658e116 100644 +index 3670a019..fb5d884f 100644 --- a/src/util.cpp +++ b/src/util.cpp -@@ -239,9 +239,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) { - #ifdef _MSC_VER - __pragma(warning(disable : 4996)); // _CRT_SECURE_NO_WARNINGS - #endif -+#if _WIN32_WINNT < 0x0A00 +@@ -255,9 +255,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) { + #ifdef _MSC_VER + __pragma(warning(disable : 4996)); // _CRT_SECURE_NO_WARNINGS + #endif ++#if _WIN32_WINNT < 0x0A00 auto env_str = std::getenv(var_name); if (!env_str) return false; if (_value) *_value = std::string(env_str); diff --git a/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch b/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch index 38e1f12ec091bb..8bd99db36613e6 100644 --- a/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch +++ b/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 119855a..945085a 100644 +index ec782239..f163b64d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -155,7 +155,7 @@ set(FlatBuffers_GRPCTest_SRCS +@@ -216,7 +216,7 @@ set(FlatBuffers_GRPCTest_SRCS # source_group(Compiler FILES ${FlatBuffers_Compiler_SRCS}) # source_group(Tests FILES ${FlatBuffers_Tests_SRCS}) diff --git a/ports/flatbuffers/no-werror.patch b/ports/flatbuffers/no-werror.patch index b354e229d6e93a..dcc5cde41181fb 100644 --- a/ports/flatbuffers/no-werror.patch +++ b/ports/flatbuffers/no-werror.patch @@ -1,13 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 119855a..6269362 100644 +index ec782239..57566c5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -172,13 +172,17 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) +@@ -233,13 +233,17 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) "${CMAKE_CXX_FLAGS} -std=c++0x") endif(CYGWIN) set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow") -+ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=shadow") ++ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=shadow") set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast") if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake index c619ac9ee5c7ef..5cf7ab6bbae9a1 100644 --- a/ports/flatbuffers/portfile.cmake +++ b/ports/flatbuffers/portfile.cmake @@ -1,21 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/flatbuffers - REF v1.11.0 - SHA512 cbb2e1e6885255cc950e2fa8248b56a8bc2c6e52f6fc7ed9066e6ae5a1d53f1263594b83f4b944a672cf9d0e1e800e51ce7fa423eff45abf5056269879c286fe + REF v2.0.0 + SHA512 26a06b572c0e4c9685743bd2d2162ac7dcd74b9324624cc3f3ef5b154c0cee7c52a04b77cdc184245d2d6ae38dfdcc4fd66001c318aa8ca001d2bf1d85d66a89 HEAD_REF master PATCHES ignore_use_of_cmake_toolchain_file.patch no-werror.patch - fix-uwp-build.patch + fix-uwp-build.patch ) set(OPTIONS) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_IOS) list(APPEND OPTIONS -DFLATBUFFERS_BUILD_FLATC=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF) endif() @@ -40,12 +38,11 @@ if(flatc_path) ${flatc_path} ${CURRENT_PACKAGES_DIR}/tools/flatbuffers/${flatc_executable} ) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/flatbuffers) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/flatbuffers) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/flatbuffers) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/flatbuffers/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/flatbuffers/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/flatbuffers/vcpkg.json b/ports/flatbuffers/vcpkg.json new file mode 100644 index 00000000000000..76d6c2a5df1f78 --- /dev/null +++ b/ports/flatbuffers/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "flatbuffers", + "version-string": "2.0.0", + "port-version": 1, + "description": [ + "Memory Efficient Serialization Library", + "FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility." + ], + "homepage": "https://google.github.io/flatbuffers/" +} diff --git a/ports/flint/CONTROL b/ports/flint/CONTROL deleted file mode 100644 index 9b45b660898cdc..00000000000000 --- a/ports/flint/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: flint -Version: 2.5.2-3 -Homepage: https://www.flintlib.org/ -Description: Fast Library for Number Theory -Build-Depends: mpir, mpfr, pthreads, gettimeofday diff --git a/ports/flint/portfile.cmake b/ports/flint/portfile.cmake index 9a9d5136b20273..4852dcbeceb565 100644 --- a/ports/flint/portfile.cmake +++ b/ports/flint/portfile.cmake @@ -1,20 +1,18 @@ -include(vcpkg_common_functions) - set(FLINT_VERSION 2.5.2) set(FLINT_HASH "8606b369af505d5fcedd05d95fcd04afac2a916fc5291501c56785891cfdb2f9bc98700b2d05afd1d9482fb96df2a8c8bf1cd0e5696df46775df9fa743eb900b") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flint-${FLINT_VERSION}) -vcpkg_download_distfile(ARCHIVE_FILE +vcpkg_download_distfile(ARCHIVE URLS "http://www.flintlib.org/flint-${FLINT_VERSION}.zip" FILENAME "flint-${FLINT_VERSION}.zip" SHA512 ${FLINT_HASH} ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/lib_flint.patch" - "${CMAKE_CURRENT_LIST_DIR}/dll_flint.patch" +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + lib_flint.patch + dll_flint.patch ) set(MSVC_VERSION 14) diff --git a/ports/flint/vcpkg.json b/ports/flint/vcpkg.json new file mode 100644 index 00000000000000..520dc5a810f38f --- /dev/null +++ b/ports/flint/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "flint", + "version-string": "2.5.2", + "port-version": 5, + "description": "Fast Library for Number Theory", + "homepage": "https://www.flintlib.org/", + "dependencies": [ + "gettimeofday", + "mpfr", + "mpir", + "pthreads" + ] +} diff --git a/ports/fltk/CONTROL b/ports/fltk/CONTROL deleted file mode 100644 index da9d7223aec1e6..00000000000000 --- a/ports/fltk/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: fltk -Version: 1.3.4-6 -Homepage: https://www.fltk.org/ -Description: FLTK (pronounced fulltick) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation. -Build-Depends: zlib, libpng, libjpeg-turbo diff --git a/ports/fltk/add-link-libraries.patch b/ports/fltk/add-link-libraries.patch deleted file mode 100644 index 547c9717ca22c3..00000000000000 --- a/ports/fltk/add-link-libraries.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMake/macros.cmake b/CMake/macros.cmake -index 4def62d..27b4901 100644 ---- a/CMake/macros.cmake -+++ b/CMake/macros.cmake -@@ -67,6 +67,8 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES) - COMPILE_DEFINITIONS "FL_DLL" - ) - endif (${LIBTYPE} STREQUAL "SHARED") -+ -+ target_link_libraries(${LIBRARY_NAME} gdi32 gdiplus user32 advapi32 ole32 shell32 comdlg32) - endif (MSVC) - - install(TARGETS ${LIBRARY_NAME} diff --git a/ports/fltk/config-path.patch b/ports/fltk/config-path.patch new file mode 100644 index 00000000000000..946f4462bf4858 --- /dev/null +++ b/ports/fltk/config-path.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/setup.cmake b/CMake/setup.cmake +index 60b7da1..6831d29 100644 +--- a/CMake/setup.cmake ++++ b/CMake/setup.cmake +@@ -65,6 +65,8 @@ else () + set (FLTK_CONFIG_PATH ${FLTK_DATADIR}/fltk) + endif (WIN32 AND NOT CYGWIN) + ++set(FLTK_CONFIG_PATH share/fltk) ++ + include(TestBigEndian) + TEST_BIG_ENDIAN(WORDS_BIGENDIAN) + diff --git a/ports/fltk/findlibsfix.patch b/ports/fltk/findlibsfix.patch index 6c2a7158a23acf..80cfa7fa076820 100644 --- a/ports/fltk/findlibsfix.patch +++ b/ports/fltk/findlibsfix.patch @@ -1,23 +1,21 @@ diff --git a/CMake/resources.cmake b/CMake/resources.cmake -index 37c0c08..b1f52d1 100644 +index 57173f2..149aa62 100644 --- a/CMake/resources.cmake +++ b/CMake/resources.cmake -@@ -26,10 +26,10 @@ find_file(HAVE_DLFCN_H dlfcn.h) - find_file(HAVE_FREETYPE_H freetype.h PATH_SUFFIXES freetype2 freetype2/freetype) - find_file(HAVE_GL_GL_H GL/gl.h) - find_file(HAVE_GL_GLU_H GL/glu.h) --find_file(HAVE_LIBPNG_PNG_H libpng/png.h) -+#find_file(HAVE_LIBPNG_PNG_H libpng/png.h) - find_file(HAVE_LOCALE_H locale.h) - find_file(HAVE_OPENGL_GLU_H OpenGL/glu.h) --find_file(HAVE_PNG_H png.h) -+#find_file(HAVE_PNG_H png.h) - find_file(HAVE_PTHREAD_H pthread.h) - find_file(HAVE_STDIO_H stdio.h) - find_file(HAVE_STRINGS_H strings.h) -@@ -38,6 +38,17 @@ find_file(HAVE_SYS_STDTYPES_H sys/stdtypes.h) - find_file(HAVE_X11_XREGION_H X11/Xregion.h) - find_path(HAVE_XDBE_H Xdbe.h PATH_SUFFIXES X11/extensions extensions) +@@ -52,10 +52,8 @@ include (FindPkgConfig) + fl_find_header (HAVE_ALSA_ASOUNDLIB_H alsa/asoundlib.h) + fl_find_header (HAVE_DLFCN_H dlfcn.h) + fl_find_header (HAVE_GL_GLU_H GL/glu.h) +-fl_find_header (HAVE_LIBPNG_PNG_H libpng/png.h) + fl_find_header (HAVE_LOCALE_H locale.h) + fl_find_header (HAVE_OPENGL_GLU_H OpenGL/glu.h) +-fl_find_header (HAVE_PNG_H png.h) + fl_find_header (HAVE_STDIO_H stdio.h) + fl_find_header (HAVE_STRINGS_H strings.h) + fl_find_header (HAVE_SYS_SELECT_H sys/select.h) +@@ -64,6 +62,17 @@ fl_find_header (HAVE_SYS_STDTYPES_H sys/stdtypes.h) + fl_find_header (HAVE_X11_XREGION_H "X11/Xlib.h;X11/Xregion.h") + fl_find_header (HAVE_XDBE_H "X11/Xlib.h;X11/extensions/Xdbe.h") +find_package(PNG REQUIRED) +if(PNG_FOUND) @@ -30,22 +28,20 @@ index 37c0c08..b1f52d1 100644 + set(LIB_zlib ${ZLIB_LIBRARIES}) +endif() + - if (MSVC) - message(STATUS "Note: The following three headers should all be found!") - message(STATUS "HAVE_GL_GL_H = '${HAVE_GL_GL_H}'") -@@ -92,12 +103,12 @@ find_library(LIB_freetype freetype) - find_library(LIB_GL GL) - find_library(LIB_MesaGL MesaGL) - find_library(LIB_jpeg jpeg) --find_library(LIB_png png) --find_library(LIB_zlib z) -+#find_library(LIB_png png) -+#find_library(LIB_zlib z) + if (WIN32 AND NOT CYGWIN) + # we don't use pthreads on Windows (except for Cygwin, see options.cmake) + set (HAVE_PTHREAD_H 0) +@@ -171,12 +180,10 @@ find_library (LIB_GL GL) + find_library (LIB_MesaGL MesaGL) + find_library (LIB_GLEW GLEW) + find_library (LIB_jpeg jpeg) +-find_library (LIB_png png) +-find_library (LIB_zlib z) - mark_as_advanced(LIB_CAIRO LIB_dl LIB_fontconfig LIB_freetype) - mark_as_advanced(LIB_GL LIB_MesaGL) --mark_as_advanced(LIB_jpeg LIB_png LIB_zlib) -+mark_as_advanced(LIB_jpeg) + mark_as_advanced (LIB_dl LIB_fontconfig LIB_freetype) + mark_as_advanced (LIB_GL LIB_MesaGL LIB_GLEW) +-mark_as_advanced (LIB_jpeg LIB_png LIB_zlib) ++mark_as_advanced (LIB_jpeg) ####################################################################### # functions diff --git a/ports/fltk/fix-system-link.patch b/ports/fltk/fix-system-link.patch new file mode 100644 index 00000000000000..45a4c3521f8a3d --- /dev/null +++ b/ports/fltk/fix-system-link.patch @@ -0,0 +1,16 @@ +diff --git a/CMake/fl_add_library.cmake b/CMake/fl_add_library.cmake +index 6fa2fc5..e5ba493 100644 +--- a/CMake/fl_add_library.cmake ++++ b/CMake/fl_add_library.cmake +@@ -38,6 +38,11 @@ macro (FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES) + add_library(${TARGET_NAME} ${LIBTYPE} ${LIBFILES}) + + target_include_directories(${TARGET_NAME} PUBLIC $) ++ ++ if (APPLE) ++ find_library(Cocoa Cocoa) ++ target_link_libraries(${TARGET_NAME} $<$:${Cocoa}>) ++ endif() + + # target properties for all libraries + diff --git a/ports/fltk/fltk_version.dat b/ports/fltk/fltk_version.dat new file mode 100644 index 00000000000000..8ed486ab78b528 --- /dev/null +++ b/ports/fltk/fltk_version.dat @@ -0,0 +1 @@ +1.3.7 \ No newline at end of file diff --git a/ports/fltk/include.patch b/ports/fltk/include.patch new file mode 100644 index 00000000000000..d460134dc156aa --- /dev/null +++ b/ports/fltk/include.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/fl_add_library.cmake b/CMake/fl_add_library.cmake +index 29baa95..6fa2fc5 100644 +--- a/CMake/fl_add_library.cmake ++++ b/CMake/fl_add_library.cmake +@@ -36,6 +36,8 @@ macro (FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES) + endif (MSVC) + + add_library(${TARGET_NAME} ${LIBTYPE} ${LIBFILES}) ++ ++ target_include_directories(${TARGET_NAME} PUBLIC $) + + # target properties for all libraries + diff --git a/ports/fltk/portfile.cmake b/ports/fltk/portfile.cmake index 5b7e246a39bb1d..9a32c019e3c0df 100644 --- a/ports/fltk/portfile.cmake +++ b/ports/fltk/portfile.cmake @@ -1,98 +1,79 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fltk-1.3.4-1) -vcpkg_download_distfile(ARCHIVE - URLS "http://fltk.org/pub/fltk/1.3.4/fltk-1.3.4-1-source.tar.gz" - FILENAME "fltk.tar.gz" - SHA512 0be1c8e6bb7a8c7ef484941a73868d5e40b90e97a8e5dc747bac2be53a350621975406ecfd4a9bcee8eeb7afd886e75bf7a6d6478fd6c56d16e54059f22f0891 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fltk-1.3.4-1 - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/findlibsfix.patch" - "${CMAKE_CURRENT_LIST_DIR}/add-link-libraries.patch" -) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_SHARED ON) -else() - set(BUILD_SHARED OFF) -endif() - -if (VCPKG_TARGET_ARCHITECTURE MATCHES "arm" OR VCPKG_TARGET_ARCHITECTURE MATCHES "arm64") - set(OPTION_USE_GL "-DOPTION_USE_GL=OFF") -else() - set(OPTION_USE_GL) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DOPTION_BUILD_EXAMPLES=OFF - -DOPTION_USE_SYSTEM_ZLIB=ON - -DOPTION_USE_SYSTEM_LIBPNG=ON - -DOPTION_USE_SYSTEM_LIBJPEG=ON - -DOPTION_BUILD_SHARED_LIBS=${BUILD_SHARED} - ${OPTION_USE_GL} -) - -vcpkg_install_cmake() - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/CMAKE - ${CURRENT_PACKAGES_DIR}/debug/CMAKE - ${CURRENT_PACKAGES_DIR}/debug/include -) - -file(COPY ${CURRENT_PACKAGES_DIR}/bin/fluid.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/fltk) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fluid.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fltk-config) - -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fluid.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fltk-config) - -vcpkg_copy_pdbs() - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fltk) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/bin - ) -else() - file(GLOB SHARED_LIBS "${CURRENT_PACKAGES_DIR}/lib/*_SHARED.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*_SHAREDd.lib") - file(GLOB STATIC_LIBS "${CURRENT_PACKAGES_DIR}/lib/*.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib") - list(FILTER STATIC_LIBS EXCLUDE REGEX "_SHAREDd?\\.lib\$") - file(REMOVE ${STATIC_LIBS}) - foreach(SHARED_LIB ${SHARED_LIBS}) - string(REGEX REPLACE "_SHARED(d?)\\.lib\$" "\\1.lib" NEWNAME ${SHARED_LIB}) - file(RENAME ${SHARED_LIB} ${NEWNAME}) - endforeach() -endif() - -foreach(FILE Fl_Export.H fl_utf8.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} FLTK_HEADER) - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - string(REPLACE "defined(FL_DLL)" "0" FLTK_HEADER "${FLTK_HEADER}") - else() - string(REPLACE "defined(FL_DLL)" "1" FLTK_HEADER "${FLTK_HEADER}") - endif() - file(WRITE ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} "${FLTK_HEADER}") -endforeach() - -file(INSTALL - ${SOURCE_PATH}/COPYING - DESTINATION ${CURRENT_PACKAGES_DIR}/share/fltk - RENAME copyright -) +# FLTK has many improperly shared global variables that get duplicated into every DLL +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fltk/fltk + REF release-1.3.7 + SHA512 aad131027e88fac3fe73d7e0abfc2602cdc195388f14b29b58d654cb49b780e6ff2ef4270935730b45cd3d366f9e8c8fa3c27a4f17b1f6e8c8fd1f9a0a73c308 + PATCHES + findlibsfix.patch + config-path.patch + include.patch + fix-system-link.patch +) + +# Remove these 2 lines when the next update +file(COPY ${CMAKE_CURRENT_LIST_DIR}/fltk_version.dat DESTINATION ${SOURCE_PATH}) +file(REMOVE ${SOURCE_PATH}/VERSION) + +if (VCPKG_TARGET_ARCHITECTURE MATCHES "arm" OR VCPKG_TARGET_ARCHITECTURE MATCHES "arm64") + set(OPTION_USE_GL "-DOPTION_USE_GL=OFF") +else() + set(OPTION_USE_GL "-DOPTION_USE_GL=ON") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFLTK_BUILD_TEST=OFF + -DOPTION_LARGE_FILE=ON + -DOPTION_USE_THREADS=ON + -DOPTION_USE_SYSTEM_ZLIB=ON + -DOPTION_USE_SYSTEM_LIBPNG=ON + -DOPTION_USE_SYSTEM_LIBJPEG=ON + -DOPTION_BUILD_SHARED_LIBS=OFF + -DFLTK_CONFIG_PATH=share/fltk + ${OPTION_USE_GL} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/fltk) + +vcpkg_copy_pdbs() + +if(VCPKG_TARGET_IS_OSX) + vcpkg_copy_tools(TOOL_NAMES fluid.app fltk-config AUTO_CLEAN) +elseif(VCPKG_TARGET_IS_WINDOWS) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fltk-config ${CURRENT_PACKAGES_DIR}/debug/bin/fltk-config) + vcpkg_copy_tools(TOOL_NAMES fluid AUTO_CLEAN) +else() + vcpkg_copy_tools(TOOL_NAMES fluid fltk-config AUTO_CLEAN) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/bin + ) +endif() +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +foreach(FILE Fl_Export.H fl_utf8.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} FLTK_HEADER) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "defined(FL_DLL)" "0" FLTK_HEADER "${FLTK_HEADER}") + else() + string(REPLACE "defined(FL_DLL)" "1" FLTK_HEADER "${FLTK_HEADER}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} "${FLTK_HEADER}") +endforeach() + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/fltk/vcpkg.json b/ports/fltk/vcpkg.json new file mode 100644 index 00000000000000..0dcc3f21e4f099 --- /dev/null +++ b/ports/fltk/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "fltk", + "version": "1.3.7", + "description": "FLTK (pronounced fulltick) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation.", + "homepage": "https://www.fltk.org/", + "dependencies": [ + "libjpeg-turbo", + "libpng", + "zlib" + ] +} diff --git a/ports/fluidlite/portfile.cmake b/ports/fluidlite/portfile.cmake new file mode 100644 index 00000000000000..707fcd720b8a7c --- /dev/null +++ b/ports/fluidlite/portfile.cmake @@ -0,0 +1,31 @@ +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/fluidsynth/settings.h") + message(FATAL_ERROR "Can't build fluidlite if fluidsynth is installed. Please remove fluidsynth, and try to install fluidlite again if you need it.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO divideconcept/FluidLite + REF fdd05bad03cdb24d1f78b5fe3453842890c1b0e8 + SHA512 8118bec2cb5ee48b8064ed2111610f1917ee8e6f1dc213121b2311d056da21d7f618ef50735e7653d2cccf1e96652f3ccf026101fccb9863448008918add53e0 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FLUIDLITE_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" FLUIDLITE_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFLUIDLITE_BUILD_STATIC=${FLUIDLITE_BUILD_STATIC} + -DFLUIDLITE_BUILD_SHARED=${FLUIDLITE_BUILD_SHARED} + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON +) + +vcpkg_install_cmake() + +# Remove unnecessary files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fluidlite/vcpkg.json b/ports/fluidlite/vcpkg.json new file mode 100644 index 00000000000000..4e0bb02ad9f921 --- /dev/null +++ b/ports/fluidlite/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fluidlite", + "version-string": "2020-08-27", + "port-version": 1, + "description": "FluidLite is a very light version of FluidSynth designed to be hardware, platform and external dependency independant.", + "homepage": "https://github.com/divideconcept/FluidLite" +} diff --git a/ports/fluidsynth/CONTROL b/ports/fluidsynth/CONTROL deleted file mode 100644 index fc79995bc93342..00000000000000 --- a/ports/fluidsynth/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fluidsynth -Version: 2.0.5 -Description: FluidSynth reads and handles MIDI events from the MIDI input device. It is the software analogue of a MIDI synthesizer. FluidSynth can also play midifiles using a Soundfont. -Build-Depends: glib \ No newline at end of file diff --git a/ports/fluidsynth/force-x86-gentables.patch b/ports/fluidsynth/force-x86-gentables.patch new file mode 100644 index 00000000000000..7f909ec510d36c --- /dev/null +++ b/ports/fluidsynth/force-x86-gentables.patch @@ -0,0 +1,38 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 356bb73..b4c43d7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -410,14 +410,23 @@ set (GENTAB_BDIR ${CMAKE_CURRENT_BINARY_DIR}/gentables) + # To fix cross-compiling fluidsynth from Win32 to ARM (using vcpkg), we need to pass the current generator + # on to the external project, otherwise (for some unknown reason) the target compiler will be used rather + # than the host compiler. +-ExternalProject_Add(gentables +- DOWNLOAD_COMMAND "" +- SOURCE_DIR ${GENTAB_SDIR} +- BINARY_DIR ${GENTAB_BDIR} +- CONFIGURE_COMMAND +- "${CMAKE_COMMAND}" -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE} -G "${CMAKE_GENERATOR}" -B "${GENTAB_BDIR}" "${GENTAB_SDIR}" +- BUILD_COMMAND +- "${CMAKE_COMMAND}" --build "${GENTAB_BDIR}" +- INSTALL_COMMAND ${GENTAB_BDIR}/make_tables.exe "${CMAKE_BINARY_DIR}/" +-) ++if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) ++ ExternalProject_Add(gentables ++ DOWNLOAD_COMMAND "" ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables ++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables ++ CONFIGURE_COMMAND ++ "${CMAKE_COMMAND}" "${CMAKE_CURRENT_SOURCE_DIR}/gentables" -G "${CMAKE_GENERATOR}" -A Win32 -B "${CMAKE_CURRENT_BINARY_DIR}/gentables" ++ BUILD_COMMAND ++ "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/gentables" ++ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" ++ ) ++else() ++ ExternalProject_Add(gentables ++ DOWNLOAD_COMMAND "" ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables ++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables ++ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" ++ ) ++endif() + add_dependencies(libfluidsynth-OBJ gentables) diff --git a/ports/fluidsynth/portfile.cmake b/ports/fluidsynth/portfile.cmake index 5060faa8ee9c80..d5f4030fa7de29 100644 --- a/ports/fluidsynth/portfile.cmake +++ b/ports/fluidsynth/portfile.cmake @@ -1,34 +1,41 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fluidsynth-1.1.10) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO FluidSynth/fluidsynth - REF v2.0.5 - SHA512 5344ac889d2927dc2465bae40096d756a9bf9b1100e287ba0621c55ffc76f9cb8fa763f6bc832d701cd0ad2997965cf344f58ae4b3dd445eb3491e3659c093d9 + REF 90a6c52e1c347d1c4283b0de9f860ed2fbc413bc #v2.2.1 + SHA512 311a078e95204baf9b348fb8c83370003982fad59553de945437fec7647c9237dd4382f9f8f70080ed472745c66fe528764cd898581d628ab4422427c3d58b3a HEAD_REF master + PATCHES + force-x86-gentables.patch ) +set(feature_list dbus jack libinstpatch libsndfile midishare opensles oboe oss sdl2 pulseaudio readline lash alsa systemd coreaudio coremidi dart) +set(FEATURE_OPTIONS) +foreach(_feature IN LISTS feature_list) + list(APPEND FEATURE_OPTIONS -Denable-${_feature}:BOOL=OFF) +endforeach() + +vcpkg_find_acquire_program(PKGCONFIG) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -Denable-pkgconfig=0 + OPTIONS + ${FEATURE_OPTIONS} + -DPKG_CONFIG_EXECUTABLE=${PKGCONFIG} + OPTIONS_DEBUG + -Denable-debug:BOOL=ON ) vcpkg_install_cmake() # Copy fluidsynth.exe to tools dir -file(COPY ${CURRENT_PACKAGES_DIR}/bin/fluidsynth.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/fluidsynth) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fluidsynth) +vcpkg_copy_tools(TOOL_NAMES fluidsynth AUTO_CLEAN) # Remove unnecessary files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fluidsynth.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fluidsynth.exe) +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/fluidsynth RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fluidsynth/vcpkg.json b/ports/fluidsynth/vcpkg.json new file mode 100644 index 00000000000000..cdb9226e7c5827 --- /dev/null +++ b/ports/fluidsynth/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "fluidsynth", + "version": "2.2.1", + "description": "FluidSynth reads and handles MIDI events from the MIDI input device. It is the software analogue of a MIDI synthesizer. FluidSynth can also play midifiles using a Soundfont.", + "homepage": "https://github.com/FluidSynth/fluidsynth", + "dependencies": [ + "glib" + ] +} diff --git a/ports/fmem/CONTROL b/ports/fmem/CONTROL deleted file mode 100644 index 25f24652aeb2c4..00000000000000 --- a/ports/fmem/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: fmem -Version: c-libs-2ccee3d2fb -Description: A cross-platform library for opening memory-backed libc streams. diff --git a/ports/fmem/portfile.cmake b/ports/fmem/portfile.cmake index b3b5faa8329127..36e4e45f3bb41e 100644 --- a/ports/fmem/portfile.cmake +++ b/ports/fmem/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO c-libs/fmem diff --git a/ports/fmem/vcpkg.json b/ports/fmem/vcpkg.json new file mode 100644 index 00000000000000..17d54850a86e42 --- /dev/null +++ b/ports/fmem/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fmem", + "version-string": "c-libs-2ccee3d2fb", + "port-version": 1, + "description": "A cross-platform library for opening memory-backed libc streams." +} diff --git a/ports/fmi4cpp/CONTROL b/ports/fmi4cpp/CONTROL deleted file mode 100644 index 4659e9d1a175b3..00000000000000 --- a/ports/fmi4cpp/CONTROL +++ /dev/null @@ -1,14 +0,0 @@ -Source: fmi4cpp -Version: 0.7.0-1 -Description: FMI 2.0 implementation written in modern C++ -Build-Depends: boost-property-tree, libzip[openssl] - -Feature: curl -Build-Depends: curl -Description: Allows loading FMUs from URL - -Feature: odeint -Build-Depends: boost-ublas, boost-odeint -Description: Adds support for wrapping Model Exchange models as Co-simulation models using odeint solvers - - diff --git a/ports/fmi4cpp/portfile.cmake b/ports/fmi4cpp/portfile.cmake index ad45b5abe43d02..02a9bdc31251b0 100644 --- a/ports/fmi4cpp/portfile.cmake +++ b/ports/fmi4cpp/portfile.cmake @@ -1,17 +1,3 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO NTNU-IHB/FMI4cpp @@ -40,7 +26,7 @@ vcpkg_configure_cmake( -DFMI4CPP_BUILD_TESTS=OFF -DFMI4CPP_BUILD_EXAMPLES=OFF -DFMI4CPP_WITH_CURL=${WITH_CURL} - -DFMI4CPP_WITH_ODEINT=${WITH_ODEINT} + -DFMI4CPP_WITH_ODEINT=${WITH_ODEINT} ) vcpkg_install_cmake() @@ -49,7 +35,8 @@ vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmi4cpp RENAME copyright) - vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + + diff --git a/ports/fmi4cpp/vcpkg.json b/ports/fmi4cpp/vcpkg.json new file mode 100644 index 00000000000000..298fa7cf41f2ec --- /dev/null +++ b/ports/fmi4cpp/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "fmi4cpp", + "version-string": "0.7.0", + "port-version": 3, + "description": "FMI 2.0 implementation written in modern C++", + "homepage": "https://github.com/NTNU-IHB/FMI4cpp", + "dependencies": [ + "boost-property-tree", + { + "name": "libzip", + "features": [ + "openssl" + ] + } + ], + "features": { + "curl": { + "description": "Allows loading FMUs from URL", + "dependencies": [ + "curl" + ] + }, + "odeint": { + "description": "Adds support for wrapping Model Exchange models as Co-simulation models using odeint solvers", + "dependencies": [ + "boost-odeint", + "boost-ublas" + ] + } + } +} diff --git a/ports/fmilib/0001-remove-install-prefix.patch b/ports/fmilib/0001-remove-install-prefix.patch new file mode 100644 index 00000000000000..42ba75701e5a15 --- /dev/null +++ b/ports/fmilib/0001-remove-install-prefix.patch @@ -0,0 +1,48 @@ +From 04bb359c724308e30268840c64932ea1d05b9077 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 10:00:23 -0700 +Subject: [PATCH 1/2] remove install prefix + +--- + CMakeLists.txt | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f7372bf..f3c11f1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,7 +26,6 @@ set(FMILIBRARYHOME ${FMILibrary_SOURCE_DIR}) + set(FMILIBRARYBUILD ${FMILibrary_BINARY_DIR}) + + # User configuration options and parameters +-SET(FMILIB_INSTALL_PREFIX ${FMILibrary_BINARY_DIR}/../install CACHE PATH "Prefix prepended to install directories") + set(FMILIB_THIRDPARTYLIBS ${FMILibrary_SOURCE_DIR}/ThirdParty CACHE PATH "Path to the ThirdParty library dir" ) + set(FMILIB_FMI_STANDARD_HEADERS ${FMILIB_THIRDPARTYLIBS}/FMI/default CACHE PATH "Path to the FMI standard headers dir" ) + +@@ -84,7 +83,6 @@ IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE ${FMILIB_DEFAULT_BUILD_TYPE}) + ENDIF(NOT CMAKE_BUILD_TYPE) + +-SET(CMAKE_INSTALL_PREFIX ${FMILIB_INSTALL_PREFIX} CACHE INTERNAL "Prefix prepended to install directories" FORCE) + + # debug_message is used to trace the build script + function(debug_message) +@@ -350,7 +348,6 @@ endfunction() + + if(FMILIB_GENERATE_DOXYGEN_DOC) + +- file(MAKE_DIRECTORY "${FMILIB_INSTALL_PREFIX}/doc") + + set(DOXYFILE_IN ${FMILIBRARYHOME}/Config.cmake/fmilib_doxydoc.conf CACHE INTERNAL "Doxygen config file") + set(DOXYFILE_IMAGE_DIR "${FMILIBRARYHOME}/images" CACHE INTERNAL "Doxygen images" FORCE) +@@ -372,7 +369,6 @@ if(FMILIB_GENERATE_DOXYGEN_DOC) + set(DOXYFILE_SOURCE_DIR "${FMILIBRARYBUILD}/doc" CACHE INTERNAL "Doxygen default source dir" FORCE) + set(DOXYFILE_EXTRA_SOURCES "${DOXYFILE_EXTRA_SOURCES} \"${FMILIBRARYHOME}/Test\"") + +- set(DOXYFILE_OUTPUT_DIR "${FMILIB_INSTALL_PREFIX}/doc") + + set(DOXYFILE_STRIP_FROM_PATH "${FMILIBRARYHOME}") + +-- +2.24.3 (Apple Git-128) + diff --git a/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch b/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch new file mode 100644 index 00000000000000..a39617e4743a70 --- /dev/null +++ b/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch @@ -0,0 +1,20 @@ +From 080876bf3735efeedaab0b211d2be7b3c3524d97 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 10:03:30 -0700 +Subject: [PATCH 2/2] include sys/stat.h for mkdir + +--- + ThirdParty/Minizip/minizip/miniunz.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/ThirdParty/Minizip/minizip/miniunz.c b/ThirdParty/Minizip/minizip/miniunz.c +index 2264705..e0167d5 100644 +--- a/ThirdParty/Minizip/minizip/miniunz.c ++++ b/ThirdParty/Minizip/minizip/miniunz.c +@@ -53,5 +53,6 @@ + #else + # include + # include ++# include + #endif + diff --git a/ports/fmilib/CONTROL b/ports/fmilib/CONTROL deleted file mode 100644 index 4037af50699026..00000000000000 --- a/ports/fmilib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fmilib -Version: 2.0.3-1 -Description: FMI library is intended as a foundation for applications interfacing FMUs (Functional Mockup Units) that follow FMI Standard. This version of the library supports FMI 1.0 and FMI2.0. -Homepage: https://www.fmi-standard.org/ diff --git a/ports/fmilib/LICENSE b/ports/fmilib/LICENSE deleted file mode 100644 index 27d973645c4ac6..00000000000000 --- a/ports/fmilib/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -License -------- - -Copyright (C) 2012 Modelon AB - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -- Neither the name of the Modelon AB nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MODELON AB BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/ports/fmilib/portfile.cmake b/ports/fmilib/portfile.cmake index 46912d440da034..6164254aac5baa 100644 --- a/ports/fmilib/portfile.cmake +++ b/ports/fmilib/portfile.cmake @@ -1,25 +1,18 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FMILibrary-2.0.3) vcpkg_download_distfile(ARCHIVE URLS "https://jmodelica.org/fmil/FMILibrary-2.0.3-src.zip" FILENAME "FMILibrary-2.0.3-src.zip" SHA512 86e4b5019d8f2a76b01141411845d977fb3949617604de0b34351f23647e3e8b378477de184e1c4f2f59297bc4c7de3155e0edba9099b8924594a36b37b04cc8 ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0001-remove-install-prefix.patch + 0002-include-sys-stat.h-for-mkdir.patch +) # Note that if you have configured and built both static and shared library on Windows # but want to link with the static library compile time define "FMILIB_BUILDING_LIBRARY" must be set. @@ -57,141 +50,18 @@ else() SET(FMILIB_BUILD_SHARED_LIB ON) endif() -SET(OPTIONS - -DFMILIB_BUILD_TESTS=OFF - -DFMILIB_BUILD_STATIC_LIB=${FMILIB_BUILD_STATIC_LIB} - -DFMILIB_BUILD_SHARED_LIB=${FMILIB_BUILD_SHARED_LIB} - -DFMILIB_BUILDING_LIBRARY=${FMILIB_BUILDING_LIBRARY} - -DFMILIB_BUILD_WITH_STATIC_RTLIB=${FMILIB_BUILD_WITH_STATIC_RTLIB} +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFMILIB_BUILD_TESTS=OFF + -DFMILIB_BUILD_STATIC_LIB=${FMILIB_BUILD_STATIC_LIB} + -DFMILIB_BUILD_SHARED_LIB=${FMILIB_BUILD_SHARED_LIB} + -DFMILIB_BUILDING_LIBRARY=${FMILIB_BUILDING_LIBRARY} + -DFMILIB_BUILD_WITH_STATIC_RTLIB=${FMILIB_BUILD_WITH_STATIC_RTLIB} ) -# Reset package dir -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}) - -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - - if(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") - set(GENERATOR "Visual Studio 12 2013") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") - set(GENERATOR "Visual Studio 12 2013 Win64") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") - set(GENERATOR "Visual Studio 12 2013 ARM") - - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(GENERATOR "Visual Studio 14 2015") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(GENERATOR "Visual Studio 14 2015 ARM") - - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(GENERATOR "Visual Studio 15 2017") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(GENERATOR "Visual Studio 15 2017 ARM") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(GENERATOR "Visual Studio 15 2017") - else() - message(FATAL_ERROR "Unable to determine appropriate generator for: ${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}") - endif() - -endif() - -foreach(BUILDTYPE "rel" "dbg") - - message("Building ${TARGET_TRIPLET}-${BUILDTYPE}...") - - string(COMPARE EQUAL ${BUILDTYPE} "rel" RELEASE_BUILD) - - SET(BUILD_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILDTYPE}) - - # Reset working dir - file(REMOVE_RECURSE ${BUILD_DIR}) - file(MAKE_DIRECTORY ${BUILD_DIR}) - - SET(FMILIB_INSTALL_PREFIX ${CURRENT_PACKAGES_DIR}) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - SET(OPTIONS ${OPTIONS} -G ${GENERATOR}) - endif() - if(NOT RELEASE_BUILD) - STRING(APPEND FMILIB_INSTALL_PREFIX "/debug") - endif() - - # Step 1: Configure - vcpkg_execute_required_process(COMMAND - cmake - -DFMILIB_INSTALL_PREFIX=${FMILIB_INSTALL_PREFIX} - -DFMILIB_DEFAULT_BUILD_TYPE_RELEASE=${RELEASE_BUILD} - ${OPTIONS} - ${SOURCE_PATH} - WORKING_DIRECTORY - ${BUILD_DIR} - ) - - # Step 2: Build - # Custom build - becouse vcpkg_configure_cmake() + vcpkg_install_cmake() fails on Linux for some unknown reason - if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - find_program(MAKE make) - if(NOT MAKE) - message(FATAL_ERROR "Could not find make. Please install it through your package manager.") - endif() - vcpkg_execute_required_process(COMMAND make "install" WORKING_DIRECTORY ${BUILD_DIR}) - else() - if(RELEASE_BUILD) - SET(CONFIG "MinSizeRel") - else() - SET(CONFIG "Debug") - endif() - vcpkg_execute_required_process(COMMAND - cmake - --build . - --config ${CONFIG} - --target "install" - WORKING_DIRECTORY - ${BUILD_DIR} - ) - endif() - - if (RELEASE_BUILD) - - # remove /doc folder - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) - - # Move .dll files (if any) from /lib to /bin - file(GLOB TMP ${CURRENT_PACKAGES_DIR}/lib/*.dll) - if (TMP) - file(COPY ${TMP} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${TMP}) - - # Add bin to path - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin;$ENV{PATH}") - endif() - - else() - - # remove duplicate folders in /debug - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) - - # Move .dll files (if any) from /lib to /bin - file(GLOB TMP ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) - if (TMP) - file(COPY ${TMP} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${TMP}) - - # Add bin to path - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin;$ENV{PATH}") - endif() - - endif() - - message("Building ${TARGET_TRIPLET}-${BUILDTYPE}... Done") - -endforeach() - +vcpkg_install_cmake() vcpkg_copy_pdbs() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmilib RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fmilib/vcpkg.json b/ports/fmilib/vcpkg.json new file mode 100644 index 00000000000000..6f0afd8aab9f9d --- /dev/null +++ b/ports/fmilib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fmilib", + "version-string": "2.0.3", + "port-version": 4, + "description": "FMI library is intended as a foundation for applications interfacing FMUs (Functional Mockup Units) that follow FMI Standard. This version of the library supports FMI 1.0 and FMI2.0.", + "homepage": "https://www.fmi-standard.org/" +} diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL deleted file mode 100644 index c789e86f8aa396..00000000000000 --- a/ports/fmt/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fmt -Version: 5.3.0-2 -Homepage: https://github.com/fmtlib/fmt -Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/fix-write-batch.patch b/ports/fmt/fix-write-batch.patch new file mode 100644 index 00000000000000..7c17d603772860 --- /dev/null +++ b/ports/fmt/fix-write-batch.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f21cf45..691a632 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -157,7 +157,7 @@ if (MASTER_PROJECT AND CMAKE_GENERATOR MATCHES "Visual Studio") + join(netfxpath + "C:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\" + ".NETFramework\\v4.0") +- file(WRITE run-msbuild.bat " ++ file(WRITE ${CMAKE_BINARY_DIR}/run-msbuild.bat " + ${MSBUILD_SETUP} + ${CMAKE_MAKE_PROGRAM} -p:FrameworkPathOverride=\"${netfxpath}\" %*") + endif () diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index f1778d985a427b..39208f6fb544a2 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -1,47 +1,65 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fmtlib/fmt - REF 5.3.0 - SHA512 9ef0f3d328681253c1e1776576d54d67dec49c19fd7fc422ae63c3610b01a3f05f6e83cdf5e913dfd09bac42e52fe35c38ebe1ea91f4207d226a32aaf69eb4a8 + REF d141cdbeb0fb422a3fb7173b285fd38e0d1772dc # v8.0.1 + SHA512 1171f0305bed07497d2957b4053e8802030f448921c5bc1b066345dc1e77fbdb96d2c7f323452a32278ae4adb01e69e80b816119b0821e37d50980800e7406f8 HEAD_REF master + PATCHES + fix-write-batch.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DFMT_CMAKE_DIR=share/fmt -DFMT_TEST=OFF -DFMT_DOC=OFF ) -vcpkg_install_cmake() -file(INSTALL ${SOURCE_PATH}/LICENSE.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmt RENAME copyright) +vcpkg_cmake_install() +file(INSTALL "${SOURCE_PATH}/LICENSE.rst" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/bin/fmt.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmtd.dll) + if(VCPKG_TARGET_IS_WINDOWS) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/fmtd.dll") + endif() + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/fmt.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/fmt.dll" "${CURRENT_PACKAGES_DIR}/bin/fmt.dll") + endif() + endif() endif() - # Force FMT_SHARED to 1 - file(READ ${CURRENT_PACKAGES_DIR}/include/fmt/core.h FMT_CORE_H) - string(REPLACE "defined(FMT_SHARED)" "1" FMT_CORE_H "${FMT_CORE_H}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/fmt/core.h "${FMT_CORE_H}") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fmt/core.h + "defined(FMT_SHARED)" + "1" + ) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -vcpkg_fixup_cmake_targets() +vcpkg_cmake_config_fixup() +vcpkg_fixup_pkgconfig() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) - file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake FMT_DEBUG_MODULE) - string(REPLACE "lib/fmtd.dll" "bin/fmtd.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE}) - file(WRITE ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake "${FMT_DEBUG_MODULE}") - file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake FMT_RELEASE_MODULE) - string(REPLACE "lib/fmt.dll" "bin/fmt.dll" FMT_RELEASE_MODULE ${FMT_RELEASE_MODULE}) - file(WRITE ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake "${FMT_RELEASE_MODULE}") +if(VCPKG_TARGET_IS_WINDOWS) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake + "lib/fmtd.dll" + "bin/fmtd.dll" + ) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake + "lib/fmt.dll" + "bin/fmt.dll" + ) + endif() endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +# Handle post-build CMake instructions vcpkg_copy_pdbs() +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/fmt/usage b/ports/fmt/usage new file mode 100644 index 00000000000000..e5a9d70480699d --- /dev/null +++ b/ports/fmt/usage @@ -0,0 +1,8 @@ +The package fmt provides CMake targets: + + find_package(fmt CONFIG REQUIRED) + target_link_libraries(main PRIVATE fmt::fmt) + + # Or use the header-only version + find_package(fmt CONFIG REQUIRED) + target_link_libraries(main PRIVATE fmt::fmt-header-only) diff --git a/ports/fmt/vcpkg.json b/ports/fmt/vcpkg.json new file mode 100644 index 00000000000000..67e7d2041a63d0 --- /dev/null +++ b/ports/fmt/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "fmt", + "version-semver": "8.0.1", + "description": "Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams.", + "homepage": "https://github.com/fmtlib/fmt", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL deleted file mode 100644 index 268039ac797def..00000000000000 --- a/ports/folly/CONTROL +++ /dev/null @@ -1,30 +0,0 @@ -Source: folly -Version: 2019.05.20.00-1 -Homepage: https://github.com/facebook/folly -Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows -Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread, boost-smart-ptr -Default-Features: zlib - -Feature: zlib -Build-Depends: zlib -Description: Support zlib for compression - -Feature: bzip2 -Build-Depends: bzip2 -Description: Support bzip2 for compression - -Feature: lzma -Build-Depends: liblzma -Description: Support LZMA for compression - -Feature: zstd -Build-Depends: zstd -Description: Support zstd for compression - -Feature: snappy -Build-Depends: snappy -Description: Support Snappy for compression - -Feature: lz4 -Build-Depends: lz4 -Description: Support lz4 for compression diff --git a/ports/folly/boost-1.70.patch b/ports/folly/boost-1.70.patch index 97c01116d5fe51..bca0c99e0c8ffe 100644 --- a/ports/folly/boost-1.70.patch +++ b/ports/folly/boost-1.70.patch @@ -1,23 +1,22 @@ diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp -index d75e012..03019f3 100644 +index 2126ec0..ef82ade 100644 --- a/folly/portability/PThread.cpp +++ b/folly/portability/PThread.cpp -@@ -18,6 +18,9 @@ - - #if !FOLLY_HAVE_PTHREAD && _WIN32 - #include // @manual -+#include +@@ -20,6 +20,8 @@ + #include + #include + #include +#include +#include #include -@@ -684,7 +687,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) { - // function, which we don't want to do. - boost::detail::set_tss_data( - realKey, +@@ -691,7 +693,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) { + boost::detail::thread::cleanup_caller_t(), + boost::detail::thread::cleanup_func_t(), + #else - boost::shared_ptr(), + 0,0, + #endif const_cast(value), false); - return 0; diff --git a/ports/folly/disable-non-underscore-posix-names.patch b/ports/folly/disable-non-underscore-posix-names.patch index bbe79481cfafea..ad36fad7ad05f2 100644 --- a/ports/folly/disable-non-underscore-posix-names.patch +++ b/ports/folly/disable-non-underscore-posix-names.patch @@ -1,27 +1,34 @@ diff --git a/folly/portability/Windows.h b/folly/portability/Windows.h -index f7990ca..b22fac5 100644 +index 86fd0f9..ccad11e 100644 --- a/folly/portability/Windows.h +++ b/folly/portability/Windows.h -@@ -26,16 +26,12 @@ - // These have to be this way because we define our own versions - // of close(), because the normal Windows versions don't handle - // sockets at all. +@@ -32,24 +32,17 @@ + // disabled to ensure all of the normal names get declared properly. + #include + -#ifndef __STDC__ -/* nolint */ -#define __STDC__ 1 + #pragma push_macro("_CRT_DECLARE_NONSTDC_NAMES") + #ifdef _CRT_DECLARE_NONSTDC_NAMES + #undef _CRT_DECLARE_NONSTDC_NAMES + #endif ++ ++#include + #pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES") +-#undef _CRT_INTERNAL_NONSTDC_NAMES -#include // @manual nolint -#include // @manual nolint -#undef __STDC__ ++#define _CRT_INTERNAL_NONSTDC_NAMES 0 ++#include ++#include + #pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES") +-#pragma pop_macro("_CRT_DECLARE_NONSTDC_NAMES") -#else -#include // @manual nolint -#include // @manual nolint -#endif -+#include -+#pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES") -+#define _CRT_INTERNAL_NONSTDC_NAMES 0 -+#include -+#include -+#pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES") #if defined(min) || defined(max) #error Windows.h needs to be included by this header, or else NOMINMAX needs \ diff --git a/ports/folly/find-double-conversion.patch b/ports/folly/find-double-conversion.patch deleted file mode 100644 index 53f49e831db6b7..00000000000000 --- a/ports/folly/find-double-conversion.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 1522db2..5ed2ea9 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -17,9 +17,17 @@ find_package(Boost 1.51.0 MODULE - list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) - --find_package(DoubleConversion MODULE REQUIRED) --list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) --list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) -+find_package(double-conversion CONFIG REQUIRED) -+if (double-conversion_FOUND) -+ message(STATUS "Found double-conversion from package config") -+ set(FOLLY_HAVE_DOUBLE_CONVERSION ON) -+ # How to obtain link libraries from target? double-conversion doesn't set property INTERFACE_LINK_LIBRARIES -+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) -+else() -+ find_package(DoubleConversion MODULE) -+ list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) -+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) -+endif() - - set(FOLLY_HAVE_LIBGFLAGS OFF) - find_package(gflags CONFIG REQUIRED) diff --git a/ports/folly/fix-windows-minmax.patch b/ports/folly/fix-windows-minmax.patch new file mode 100644 index 00000000000000..1fc69a43a83e5b --- /dev/null +++ b/ports/folly/fix-windows-minmax.patch @@ -0,0 +1,12 @@ +diff --git a/CMake/FollyCompilerMSVC.cmake b/CMake/FollyCompilerMSVC.cmake +index ec2ce1a1d..16deda71c 100644 +--- a/CMake/FollyCompilerMSVC.cmake ++++ b/CMake/FollyCompilerMSVC.cmake +@@ -289,6 +289,7 @@ function(apply_folly_compile_options_to_target THETARGET) + # And the extra defines: + target_compile_definitions(${THETARGET} + PUBLIC ++ NOMINMAX + _CRT_NONSTDC_NO_WARNINGS # Don't deprecate posix names of functions. + _CRT_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps. + _SCL_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps. diff --git a/ports/folly/missing-include-atomic.patch b/ports/folly/missing-include-atomic.patch deleted file mode 100644 index 54c1a48170509e..00000000000000 --- a/ports/folly/missing-include-atomic.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp -index 2891c4c..7c98975 100644 ---- a/folly/portability/PThread.cpp -+++ b/folly/portability/PThread.cpp -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - - #include - #include diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 2317c780e44772..21df520bf86dd1 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -1,7 +1,7 @@ -include(vcpkg_common_functions) - -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - message(FATAL_ERROR "Folly only supports the x64 architecture.") +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "x86" "arm" "arm64") +else() + vcpkg_fail_port_install(ON_ARCH "x86" "arm") endif() vcpkg_check_linkage(ONLY_STATIC_LIBRARY) @@ -14,14 +14,14 @@ vcpkg_add_to_path("${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF 354223ec1602913667c52cee1ce0782a82cb0cad - SHA512 53dd401e5fe8aebf35bec7c1b49e45a7abf152ad12f7392f31653f9e644207d0926424948ad2d7974bf3e5eabaa97e3e9113f1318883bfc99b968b3700b19023 + REF v2021.06.14.00 + SHA512 aee5adc1a44d9b193f3f41b5fc9fa7575c677d8bf27ed3a3b612a2fbe53505f82481ce78f13fb41ae3ca81ca25446426fbdfdc578f503f919b4af5abe56ad71c HEAD_REF master PATCHES - missing-include-atomic.patch - boost-1.70.patch reorder-glog-gflags.patch disable-non-underscore-posix-names.patch + boost-1.70.patch + fix-windows-minmax.patch ) file(COPY @@ -89,10 +89,11 @@ FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/folly/folly-config.cmake "include(CMakeFindDependencyMacro) find_dependency(Threads) find_dependency(glog CONFIG) +find_dependency(gflags CONFIG REQUIRED) +find_dependency(ZLIB) ${_contents}") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/folly) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/folly/LICENSE ${CURRENT_PACKAGES_DIR}/share/folly/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/folly/reorder-glog-gflags.patch b/ports/folly/reorder-glog-gflags.patch index 85fd1d9fbf8799..38ddbc166f2830 100644 --- a/ports/folly/reorder-glog-gflags.patch +++ b/ports/folly/reorder-glog-gflags.patch @@ -1,22 +1,22 @@ diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index e0bbcbb..fb45331 100644 +index 92b8ce7..04589ed 100644 --- a/CMake/folly-deps.cmake +++ b/CMake/folly-deps.cmake -@@ -24,6 +24,11 @@ find_package(DoubleConversion MODULE REQUIRED) +@@ -52,6 +52,11 @@ find_package(DoubleConversion MODULE REQUIRED) list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) -+find_package(Glog MODULE) ++find_package(Glog CONFIG REQUIRED) +set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) -+list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) ++list(APPEND FOLLY_LINK_LIBRARIES glog::glog) +list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) + find_package(Gflags MODULE) set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) -@@ -31,11 +36,6 @@ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR}) - list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBGFLAGS_LIBRARY}) - list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR}) + if(LIBGFLAGS_FOUND) +@@ -61,11 +66,6 @@ if(LIBGFLAGS_FOUND) + set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR}) + endif() -find_package(Glog MODULE) -set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) diff --git a/ports/folly/vcpkg.json b/ports/folly/vcpkg.json new file mode 100644 index 00000000000000..453e08e9c36c1e --- /dev/null +++ b/ports/folly/vcpkg.json @@ -0,0 +1,69 @@ +{ + "name": "folly", + "version-string": "2021.06.14.00", + "port-version": 1, + "description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows", + "homepage": "https://github.com/facebook/folly", + "supports": "x64 | (arm64 & !windows)", + "dependencies": [ + "boost-chrono", + "boost-context", + "boost-conversion", + "boost-crc", + "boost-date-time", + "boost-filesystem", + "boost-multi-index", + "boost-program-options", + "boost-regex", + "boost-smart-ptr", + "boost-system", + "boost-thread", + "double-conversion", + "fmt", + "gflags", + "glog", + "libevent", + "openssl" + ], + "default-features": [ + "zlib" + ], + "features": { + "bzip2": { + "description": "Support bzip2 for compression", + "dependencies": [ + "bzip2" + ] + }, + "lz4": { + "description": "Support lz4 for compression", + "dependencies": [ + "lz4" + ] + }, + "lzma": { + "description": "Support LZMA for compression", + "dependencies": [ + "liblzma" + ] + }, + "snappy": { + "description": "Support Snappy for compression", + "dependencies": [ + "snappy" + ] + }, + "zlib": { + "description": "Support zlib for compression", + "dependencies": [ + "zlib" + ] + }, + "zstd": { + "description": "Support zstd for compression", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/ports/font-chef/portfile.cmake b/ports/font-chef/portfile.cmake new file mode 100644 index 00000000000000..2ae280bdcf67f1 --- /dev/null +++ b/ports/font-chef/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mobius3/font-chef + REF v1.0.1 + SHA512 0d73d095a2f6346cde5fc58a07be7cbe2c180ab5c83a4af21f765a6be1e9dcc5a403fa1d4c64f71dad5609eb72c8b05df8606b4035fceadca74fe6a87bb8efef + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${PORT}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/font-chef/vcpkg.json b/ports/font-chef/vcpkg.json new file mode 100644 index 00000000000000..0203b566112afa --- /dev/null +++ b/ports/font-chef/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "font-chef", + "version-string": "1.0.1", + "port-version": 1, + "description": "A font cooking library", + "homepage": "https://github.com/mobius3/font-chef" +} diff --git a/ports/fontconfig/CMakeLists.txt b/ports/fontconfig/CMakeLists.txt deleted file mode 100644 index 1692e7856a724f..00000000000000 --- a/ports/fontconfig/CMakeLists.txt +++ /dev/null @@ -1,96 +0,0 @@ -cmake_minimum_required(VERSION 3.11) -project(fontconfig C) - -add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DHAVE_CONFIG_H) - -# find dependencies -find_package(unofficial-iconv CONFIG REQUIRED) -find_package(Freetype REQUIRED) -find_package(EXPAT REQUIRED) - -add_library(fontconfig - src/fcatomic.c - src/fcblanks.c - src/fccache.c - src/fccfg.c - src/fccharset.c - src/fccompat.c - src/fcdbg.c - src/fcdefault.c - src/fcdir.c - src/fcformat.c - src/fcfreetype.c - src/fcfs.c - src/fcinit.c - src/fclang.c - src/fclist.c - src/fcmatch.c - src/fcmatrix.c - src/fcname.c - src/fcobjs.c - src/fcpat.c - src/fcrange.c - src/fcserialize.c - src/fcstat.c - src/fcstr.c - src/fcweight.c - src/fcxml.c - src/ftglue.c) - -if(WIN32) - set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__declspec(dllexport)") -else() - set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__attribute__((visibility(\"default\")))") -endif() - -target_include_directories(fontconfig PRIVATE . - ${FC_INCLUDE_DIR}/alias - ${EXPAT_INCLUDE_DIR}) -if(WIN32) - target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/win32) -else() - target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/unix) -endif() - -target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype EXPAT::EXPAT) - -install(TARGETS fontconfig - EXPORT fontconfig-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - -if(NOT FC_SKIP_HEADERS) - install(FILES - fontconfig/fontconfig.h - fontconfig/fcfreetype.h - fontconfig/fcprivate.h - DESTINATION include/fontconfig) -endif() - -if(NOT FC_SKIP_TOOLS) - set(FC_DEFAULT_FONTS WINDOWSFONTDIR) - set(FC_FONTPATH) - set(FC_CACHEDIR WINDOWSTEMPDIR_FONTCONFIG_CACHE) - set(CONFIGDIR ./fonts/conf.d) - configure_file(fonts.conf.in ${CMAKE_SOURCE_DIR}/fonts.conf @ONLY) - install(FILES fonts.conf DESTINATION tools/fontconfig/fonts) - install(DIRECTORY conf.d DESTINATION tools/fontconfig/fonts FILES_MATCHING PATTERN "*.conf") -endif() - -install( - EXPORT fontconfig-targets - NAMESPACE unofficial::fontconfig:: - FILE unofficial-fontconfig-targets.cmake - DESTINATION share/unofficial-fontconfig -) - -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-fontconfig-config.cmake " -include(CMakeFindDependencyMacro) -find_dependency(unofficial-iconv CONFIG) -find_dependency(Freetype) -find_dependency(EXPAT) - -include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-fontconfig-targets.cmake) -") -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-fontconfig-config.cmake DESTINATION share/unofficial-fontconfig) diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL deleted file mode 100644 index fbcc3f53674b8b..00000000000000 --- a/ports/fontconfig/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: fontconfig -Version: 2.12.4-9 -Homepage: https://www.freedesktop.org/software/fontconfig/front.html -Description: Library for configuring and customizing font access. -Build-Depends: freetype, expat, libiconv, dirent diff --git a/ports/fontconfig/fcobjtypehash.patch b/ports/fontconfig/fcobjtypehash.patch deleted file mode 100644 index bf86ca3b099877..00000000000000 --- a/ports/fontconfig/fcobjtypehash.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/src/fcobjs.c b/src/fcobjs.c -index 33bba8d..e6b0808 100644 ---- a/src/fcobjs.c -+++ b/src/fcobjs.c -@@ -24,11 +24,13 @@ - - #include "fcint.h" - -+#if 0 - static unsigned int - FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len); - - static const struct FcObjectTypeInfo * - FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len); -+#endif - - #include "fcobjshash.h" - diff --git a/ports/fontconfig/include/alias/fcaliastail.h b/ports/fontconfig/include/alias/fcaliastail.h deleted file mode 100644 index a9eae81f2aaf25..00000000000000 --- a/ports/fontconfig/include/alias/fcaliastail.h +++ /dev/null @@ -1 +0,0 @@ -/* intentionally empty */ diff --git a/ports/fontconfig/include/alias/fcftaliastail.h b/ports/fontconfig/include/alias/fcftaliastail.h deleted file mode 100644 index a9eae81f2aaf25..00000000000000 --- a/ports/fontconfig/include/alias/fcftaliastail.h +++ /dev/null @@ -1 +0,0 @@ -/* intentionally empty */ diff --git a/ports/fontconfig/include/unix/config.h b/ports/fontconfig/include/unix/config.h deleted file mode 100644 index 5b5da37926d3cb..00000000000000 --- a/ports/fontconfig/include/unix/config.h +++ /dev/null @@ -1,376 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -#define FC_CACHEDIR "./" - -/* The normal alignment of `double', in bytes. */ -#define ALIGNOF_DOUBLE 8 - -/* The normal alignment of `void *', in bytes. */ -#if defined(_WIN64) -#define ALIGNOF_VOID_P 8 -#else -#define ALIGNOF_VOID_P 4 -#endif - -/* Use libxml2 instead of Expat */ -/* #undef ENABLE_LIBXML2 */ - -/* Additional font directories */ -#define FC_ADD_FONTS "yes" - -/* Architecture prefix to use for cache file names */ -/* #undef FC_ARCHITECTURE */ - -/* System font directory */ -#define FC_DEFAULT_FONTS "" - -/* The type of len parameter of the gperf hash/lookup function */ -#define FC_GPERF_SIZE_T size_t - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like `struct s { int n; double - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. When computing the size of such an object, don't use 'sizeof - (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' - instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with - MSVC and with C++ compilers. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -/* #undef HAVE_DOPRNT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `fstatfs' function. */ -/* #undef HAVE_FSTATFS */ - -/* Define to 1 if you have the `fstatvfs' function. */ -/* #undef HAVE_FSTATVFS */ - -/* FT_Bitmap_Size structure includes y_ppem field */ -#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 - -/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ -#define HAVE_FT_GET_BDF_PROPERTY 1 - -/* Define to 1 if you have the `FT_Get_Next_Char' function. */ -#define HAVE_FT_GET_NEXT_CHAR 1 - -/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ -#define HAVE_FT_GET_PS_FONT_INFO 1 - -/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ -#define HAVE_FT_GET_X11_FONT_FORMAT 1 - -/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ -#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 - -/* Define to 1 if you have the `FT_Select_Size' function. */ -#define HAVE_FT_SELECT_SIZE 1 - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getopt' function. */ -#define HAVE_GETOPT 1 - -/* Define to 1 if you have the `getopt_long' function. */ -#define HAVE_GETOPT_LONG 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Have Intel __sync_* atomic primitives */ -#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `link' function. */ -/* #undef HAVE_LINK */ - -/* Define to 1 if you have the `lrand48' function. */ -/* #undef HAVE_LRAND48 */ - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mkdtemp' function. */ -/* #undef HAVE_MKDTEMP */ - -/* Define to 1 if you have the `mkostemp' function. */ -/* #undef HAVE_MKOSTEMP */ - -/* Define to 1 if you have the `mkstemp' function. */ -#define HAVE_MKSTEMP 1 - -/* Define to 1 if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the 'posix_fadvise' function. */ -/* #undef HAVE_POSIX_FADVISE */ - -/* Have POSIX threads */ -#define HAVE_PTHREAD 1 - -/* Have PTHREAD_PRIO_INHERIT. */ -/* #undef HAVE_PTHREAD_PRIO_INHERIT */ - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -/* #undef HAVE_RANDOM */ - -/* Define to 1 if you have the `random_r' function. */ -/* #undef HAVE_RANDOM_R */ - -/* Define to 1 if you have the `rand_r' function. */ -/* #undef HAVE_RAND_R */ - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SCHED_H */ - -/* Have sched_yield */ -/* #undef HAVE_SCHED_YIELD */ - -/* Have Solaris __machine_*_barrier and atomic_* operations */ -/* #undef HAVE_SOLARIS_ATOMIC_OPS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if `d_type' is a member of `struct dirent'. */ -/* #undef HAVE_STRUCT_DIRENT_D_TYPE */ - -/* Define to 1 if `f_flags' is a member of `struct statfs'. */ -/* #undef HAVE_STRUCT_STATFS_F_FLAGS */ - -/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ -/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ - -/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ -/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ - -/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ -/* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ - -/* Define to 1 if `st_mtim' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_MTIM */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MOUNT_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATVFS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VFS_H */ - -/* Define to 1 if `usLowerOpticalPointSize' is a member of `TT_OS2'. */ -#define HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE 1 - -/* Define to 1 if `usUpperOpticalPointSize' is a member of `TT_OS2'. */ -#define HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* Can use #warning in C files */ -#define HAVE_WARNING_CPP_DIRECTIVE 1 - -/* Use xmlparse.h instead of expat.h */ -/* #undef HAVE_XMLPARSE_H */ - -/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ -#define HAVE_XML_SETDOCTYPEDECLHANDLER 1 - -/* Define to 1 if you have the `_mktemp_s' function. */ -/* #undef HAVE__MKTEMP_S */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "fontconfig" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "fontconfig" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "fontconfig 2.12.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "fontconfig" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "2.12.3" - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -/* #undef PTHREAD_CREATE_JOINABLE */ - -/* The size of `char', as computed by sizeof. */ -/* #undef SIZEOF_CHAR */ - -/* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ - -/* The size of `long', as computed by sizeof. */ -/* #undef SIZEOF_LONG */ - -/* The size of `short', as computed by sizeof. */ -/* #undef SIZEOF_SHORT */ - -/* The size of `void*', as computed by sizeof. */ -/* #undef SIZEOF_VOIDP */ - -/* The size of `void *', as computed by sizeof. */ -#if defined(_WIN64) -#define SIZEOF_VOIDP 8 -#define SIZEOF_VOID_P 8 -#else -#define SIZEOF_VOIDP 4 -#define SIZEOF_VOID_P 4 -#endif - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Use iconv. */ -#define USE_ICONV 1 - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Version number of package */ -#define VERSION "2.12.3" - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -#define FONTCONFIG_PATH "/etc/fonts" - -#include "config-fixups.h" diff --git a/ports/fontconfig/include/win32/config.h b/ports/fontconfig/include/win32/config.h deleted file mode 100644 index 0fbdead6e46672..00000000000000 --- a/ports/fontconfig/include/win32/config.h +++ /dev/null @@ -1,374 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -#define FC_CACHEDIR "./" - -/* The normal alignment of `double', in bytes. */ -#define ALIGNOF_DOUBLE 8 - -/* The normal alignment of `void *', in bytes. */ -#if defined(_WIN64) -#define ALIGNOF_VOID_P 8 -#else -#define ALIGNOF_VOID_P 4 -#endif - -/* Use libxml2 instead of Expat */ -/* #undef ENABLE_LIBXML2 */ - -/* Additional font directories */ -#define FC_ADD_FONTS "yes" - -/* Architecture prefix to use for cache file names */ -/* #undef FC_ARCHITECTURE */ - -/* System font directory */ -#define FC_DEFAULT_FONTS "WINDOWSFONTDIR" - -/* The type of len parameter of the gperf hash/lookup function */ -#define FC_GPERF_SIZE_T size_t - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like `struct s { int n; double - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. When computing the size of such an object, don't use 'sizeof - (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' - instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with - MSVC and with C++ compilers. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -/* #undef HAVE_DOPRNT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `fstatfs' function. */ -/* #undef HAVE_FSTATFS */ - -/* Define to 1 if you have the `fstatvfs' function. */ -/* #undef HAVE_FSTATVFS */ - -/* FT_Bitmap_Size structure includes y_ppem field */ -#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 - -/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ -#define HAVE_FT_GET_BDF_PROPERTY 1 - -/* Define to 1 if you have the `FT_Get_Next_Char' function. */ -#define HAVE_FT_GET_NEXT_CHAR 1 - -/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ -#define HAVE_FT_GET_PS_FONT_INFO 1 - -/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ -#define HAVE_FT_GET_X11_FONT_FORMAT 1 - -/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ -#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 - -/* Define to 1 if you have the `FT_Select_Size' function. */ -#define HAVE_FT_SELECT_SIZE 1 - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getopt' function. */ -#define HAVE_GETOPT 1 - -/* Define to 1 if you have the `getopt_long' function. */ -#define HAVE_GETOPT_LONG 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Have Intel __sync_* atomic primitives */ -#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `link' function. */ -/* #undef HAVE_LINK */ - -/* Define to 1 if you have the `lrand48' function. */ -/* #undef HAVE_LRAND48 */ - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mkdtemp' function. */ -/* #undef HAVE_MKDTEMP */ - -/* Define to 1 if you have the `mkostemp' function. */ -/* #undef HAVE_MKOSTEMP */ - -/* Define to 1 if you have the `mkstemp' function. */ -/* #undef HAVE_MKSTEMP */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the 'posix_fadvise' function. */ -/* #undef HAVE_POSIX_FADVISE */ - -/* Have POSIX threads */ -/* #undef HAVE_PTHREAD */ - -/* Have PTHREAD_PRIO_INHERIT. */ -/* #undef HAVE_PTHREAD_PRIO_INHERIT */ - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -/* #undef HAVE_RANDOM */ - -/* Define to 1 if you have the `random_r' function. */ -/* #undef HAVE_RANDOM_R */ - -/* Define to 1 if you have the `rand_r' function. */ -/* #undef HAVE_RAND_R */ - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SCHED_H */ - -/* Have sched_yield */ -/* #undef HAVE_SCHED_YIELD */ - -/* Have Solaris __machine_*_barrier and atomic_* operations */ -/* #undef HAVE_SOLARIS_ATOMIC_OPS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if `d_type' is a member of `struct dirent'. */ -/* #undef HAVE_STRUCT_DIRENT_D_TYPE */ - -/* Define to 1 if `f_flags' is a member of `struct statfs'. */ -/* #undef HAVE_STRUCT_STATFS_F_FLAGS */ - -/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ -/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ - -/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ -/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ - -/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ -/* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ - -/* Define to 1 if `st_mtim' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_MTIM */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MOUNT_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATVFS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VFS_H */ - -/* Define to 1 if `usLowerOpticalPointSize' is a member of `TT_OS2'. */ -#define HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE 1 - -/* Define to 1 if `usUpperOpticalPointSize' is a member of `TT_OS2'. */ -#define HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* Can use #warning in C files */ -#define HAVE_WARNING_CPP_DIRECTIVE 1 - -/* Use xmlparse.h instead of expat.h */ -/* #undef HAVE_XMLPARSE_H */ - -/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ -#define HAVE_XML_SETDOCTYPEDECLHANDLER 1 - -/* Define to 1 if you have the `_mktemp_s' function. */ -#define HAVE__MKTEMP_S 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "fontconfig" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "fontconfig" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "fontconfig 2.12.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "fontconfig" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "2.12.3" - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -/* #undef PTHREAD_CREATE_JOINABLE */ - -/* The size of `char', as computed by sizeof. */ -/* #undef SIZEOF_CHAR */ - -/* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ - -/* The size of `long', as computed by sizeof. */ -/* #undef SIZEOF_LONG */ - -/* The size of `short', as computed by sizeof. */ -/* #undef SIZEOF_SHORT */ - -/* The size of `void*', as computed by sizeof. */ -/* #undef SIZEOF_VOIDP */ - -/* The size of `void *', as computed by sizeof. */ -#if defined(_WIN64) -#define SIZEOF_VOIDP 8 -#define SIZEOF_VOID_P 8 -#else -#define SIZEOF_VOIDP 4 -#define SIZEOF_VOID_P 4 -#endif - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Use iconv. */ -#define USE_ICONV 1 - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Version number of package */ -#define VERSION "2.12.3" - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -#include "config-fixups.h" diff --git a/ports/fontconfig/include/win32/unistd.h b/ports/fontconfig/include/win32/unistd.h deleted file mode 100644 index 7d04abe2925b08..00000000000000 --- a/ports/fontconfig/include/win32/unistd.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Minimal unistd.h, just to get fontconfig to compile */ -#ifndef UNISTD_H -#define UNISTD_H - -#include - -#ifndef R_OK -#define R_OK 4 -#endif - -#ifndef W_OK -#define W_OK 2 -#endif - -#ifndef F_OK -#define F_OK 0 -#endif - -typedef int mode_t; - -#endif \ No newline at end of file diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index 772e741fd3c700..78cb81111b2c47 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -1,51 +1,90 @@ - -include(vcpkg_common_functions) - -set(FONTCONFIG_VERSION 2.12.4) -vcpkg_download_distfile(ARCHIVE - URLS "https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.gz" - FILENAME "fontconfig-${FONTCONFIG_VERSION}.tar.gz" - SHA512 2be3ee0e8e0e3b62571135a3cae06e456c289dd1ad40ef2a7c780406418ee5efce863a833eca5a8ef55bc737a0ea04ef562bba6fd27e174ae43e42131b52810d -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${FONTCONFIG_VERSION} - PATCHES fcobjtypehash.patch -) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DFC_INCLUDE_DIR=${CMAKE_CURRENT_LIST_DIR}/include - OPTIONS_DEBUG - -DFC_SKIP_TOOLS=ON - -DFC_SKIP_HEADERS=ON -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-fontconfig TARGET_PATH share/unofficial-fontconfig) - -vcpkg_copy_pdbs() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - foreach(HEADER fcfreetype.h fontconfig.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} FC_HEADER) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - string(REPLACE "#define FcPublic" "#define FcPublic __declspec(dllimport)" FC_HEADER "${FC_HEADER}") - else() - string(REPLACE "#define FcPublic" "#define FcPublic __attribute__((visibility(\"default\")))" FC_HEADER "${FC_HEADER}") - endif() - file(WRITE ${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} "${FC_HEADER}") - endforeach() -endif() - -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/fontconfig/COPYING ${CURRENT_PACKAGES_DIR}/share/fontconfig/copyright) - -vcpkg_test_cmake(PACKAGE_NAME unofficial-fontconfig) +set(FONTCONFIG_VERSION 2.13.94) + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org + OUT_SOURCE_PATH SOURCE_PATH + REPO fontconfig/fontconfig + REF ${FONTCONFIG_VERSION} + SHA512 815f999146970c7f0e6c15a21f218d4b3f75b26d4ef14d36711bc0a1de19e59cc62d6a2c53993dd38b963ae30820c4db29f103380d5001886d55b6a7df361154 + HEAD_REF master +) + +vcpkg_find_acquire_program(GPERF) +get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) +vcpkg_add_to_path(${GPERF_PATH}) + +vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_install_meson(ADD_BIN_TO_PATH) + +vcpkg_copy_pdbs() +#Fix missing libintl static dependency +if(NOT VCPKG_TARGET_IS_MINGW AND VCPKG_TARGET_IS_WINDOWS) + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/fontconfig.pc" "-liconv" "-liconv -lintl") + endif() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/fontconfig.pc" "-liconv" "-liconv -lintl") +endif() +vcpkg_fixup_pkgconfig() + +# Fix paths in debug pc file. +set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/fontconfig.pc") +if(EXISTS "${_file}") + file(READ "${_file}" _contents) + string(REPLACE "/etc" "/../etc" _contents "${_contents}") + string(REPLACE "/var" "/../var" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") +endif() + +# Make path to cache in fonts.conf relative +set(_file "${CURRENT_PACKAGES_DIR}/etc/fonts/fonts.conf") +if(EXISTS "${_file}") + file(READ "${_file}" _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}/var/cache/fontconfig" "./../../var/cache/fontconfig" _contents "${_contents}") + string(REPLACE "/var" "/../var" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/etc") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + if(VCPKG_TARGET_IS_WINDOWS) + set(DEFINE_FC_PUBLIC "#define FcPublic __declspec(dllimport)") + else() + set(DEFINE_FC_PUBLIC "#define FcPublic __attribute__((visibility(\"default\")))") + endif() + foreach(HEADER fcfreetype.h fontconfig.h) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER}" + "#define FcPublic" + "${DEFINE_FC_PUBLIC}" + ) + endforeach() +endif() + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + + +# Build the fontconfig cache +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(ENV{FONTCONFIG_PATH} "${CURRENT_PACKAGES_DIR}/etc/fonts") + set(ENV{FONTCONFIG_FILE} "${CURRENT_PACKAGES_DIR}/etc/fonts/fonts.conf") + vcpkg_execute_required_process(COMMAND "${CURRENT_PACKAGES_DIR}/bin/fc-cache${VCPKG_TARGET_EXECUTABLE_SUFFIX}" --verbose + WORKING_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin" + LOGNAME fc-cache-${TARGET_TRIPLET}) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + # Unnecessary make rule creating the fontconfig cache dir on windows. + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}LOCAL_APPDATA_FONTCONFIG_CACHE") +endif() + +if(NOT VCPKG_TARGET_IS_LINUX) + set(VCPKG_TARGET_IS_LINUX 0) # To not leave empty AND statements in the wrapper +endif() +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) + +vcpkg_copy_tools( + TOOL_NAMES fc-match fc-cat fc-list fc-pattern fc-query fc-scan fc-cache fc-validate fc-conflist + AUTO_CLEAN +) diff --git a/ports/fontconfig/vcpkg-cmake-wrapper.cmake.in b/ports/fontconfig/vcpkg-cmake-wrapper.cmake.in new file mode 100644 index 00000000000000..ab2b5679b681e1 --- /dev/null +++ b/ports/fontconfig/vcpkg-cmake-wrapper.cmake.in @@ -0,0 +1,46 @@ +_find_package(${ARGS}) +if(Fontconfig_FOUND) # theoretically this could be skipped. If the wrapper is installed it should be found! + find_package(Freetype) + if(Freetype_FOUND AND TARGET Fontconfig::Fontconfig) + if(TARGET Freetype::Freetype) + set_property(TARGET Fontconfig::Fontconfig APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Freetype::Freetype") + else() + # TODO link Freetype libraries to the target if the target Freetype::Freetype is not defined; + endif() + endif() + if(FREETYPE_LIBRARIES) + list(APPEND Fontconfig_LIBRARIES "${FREETYPE_LIBRARIES}") + endif() + find_package(EXPAT) + if(EXPAT_FOUND AND TARGET Fontconfig::Fontconfig) + set_property(TARGET Fontconfig::Fontconfig APPEND PROPERTY INTERFACE_LINK_LIBRARIES "EXPAT::EXPAT") + endif() + if(EXPAT_LIBRARIES) + list(APPEND Fontconfig_LIBRARIES "${EXPAT_LIBRARIES}") + endif() + include(SelectLibraryConfigurations) + find_library(Fontconfig_LIBRARY_DEBUG NAMES fontconfig fontconfigd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH) + find_library(Fontconfig_LIBRARY_RELEASE NAMES fontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + select_library_configurations(Fontconfig) + if(@VCPKG_TARGET_IS_LINUX@) + find_library(UUID_LIBRARY_DEBUG NAMES uuid uuidd uuid_d NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH) + find_library(UUID_LIBRARY_RELEASE NAMES uuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + select_library_configurations(UUID) + endif() + if(Fontconfig_LIBRARY_DEBUG AND TARGET Fontconfig::Fontconfig) + set_target_properties(Fontconfig::Fontconfig PROPERTIES IMPORTED_LOCATION_DEBUG "${Fontconfig_LIBRARY_DEBUG}") + if(UUID_LIBRARY_DEBUG AND @VCPKG_TARGET_IS_LINUX@) + set_property(TARGET Fontconfig::Fontconfig APPEND PROPERTY INTERFACE_LINK_LIBRARIES "$<$:${UUID_LIBRARY_DEBUG}>") + endif() + endif() + if(Fontconfig_LIBRARY_RELEASE AND TARGET Fontconfig::Fontconfig) + set_target_properties(Fontconfig::Fontconfig PROPERTIES IMPORTED_LOCATION_RELEASE "${Fontconfig_LIBRARY_RELEASE}") + if(UUID_LIBRARY_RELEASE AND @VCPKG_TARGET_IS_LINUX@) + set_property(TARGET Fontconfig::Fontconfig APPEND PROPERTY INTERFACE_LINK_LIBRARIES "$<$>:${UUID_LIBRARY_RELEASE}>") + endif() + endif() + + if(UUID_LIBRARIES AND @VCPKG_TARGET_IS_LINUX@) + list(APPEND Fontconfig_LIBRARIES "${UUID_LIBRARIES}") + endif() +endif() diff --git a/ports/fontconfig/vcpkg.json b/ports/fontconfig/vcpkg.json new file mode 100644 index 00000000000000..c0e13fdb83c94a --- /dev/null +++ b/ports/fontconfig/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "fontconfig", + "version": "2.13.94", + "description": "Library for configuring and customizing font access.", + "homepage": "https://www.freedesktop.org/software/fontconfig/front.html", + "dependencies": [ + "dirent", + "expat", + "freetype", + "gettext", + "json-c", + "libiconv", + { + "name": "libuuid", + "platform": "!windows & !osx & !mingw" + }, + "pthread" + ] +} diff --git a/ports/foonathan-memory/portfile.cmake b/ports/foonathan-memory/portfile.cmake new file mode 100644 index 00000000000000..170eb43692f439 --- /dev/null +++ b/ports/foonathan-memory/portfile.cmake @@ -0,0 +1,125 @@ +# WINDOWS_EXPORT_ALL_SYMBOLS doesn't work. +# unresolved external symbol "public: static unsigned int const foonathan::memory::detail::memory_block_stack::implementation_offset +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO foonathan/memory + REF 885a9d97bebe9a2f131d21d3c0928c42ab377c8b + SHA512 7ce78a6e67d590a41b7f8a3d4ae0f6c1fa157c561b718a63973dffc000df74a9f0a0d7955a099e84fbeb3cf4085092eb866a6b8cec8bafd50bdcee94d069f65d + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH COMP_SOURCE_PATH + REPO foonathan/compatibility + REF cd142129e30f5b3e6c6d96310daf94242c0b03bf + SHA512 1d144f82ec46dcc546ee292846330d39536a3145e5a5d8065bda545f55699aeb9a4ef7dea5e5f684ce2327fad210488fe6bb4ba7f84ceac867ac1c72b90c6d69 + HEAD_REF master +) + +file(COPY ${COMP_SOURCE_PATH}/comp_base.cmake DESTINATION ${SOURCE_PATH}/cmake/comp) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tool FOONATHAN_MEMORY_BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF + -DFOONATHAN_MEMORY_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/foonathan_memory) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/foonathan_memory/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/foonathan_memory/cmake TARGET_PATH share/foonathan_memory) +endif() + +vcpkg_copy_pdbs() + +# Place header files into the right folders +# The original layout is not a problem for CMake-based project. +file(COPY + ${CURRENT_PACKAGES_DIR}/include/foonathan_memory/foonathan + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) +file(GLOB + COMP_INCLUDE_FILES + ${CURRENT_PACKAGES_DIR}/include/foonathan_memory/comp/foonathan/*.hpp +) +file(COPY + ${COMP_INCLUDE_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/foonathan +) +file(COPY + ${CURRENT_PACKAGES_DIR}/include/foonathan_memory/config_impl.hpp + DESTINATION ${CURRENT_PACKAGES_DIR}/include/foonathan/memory +) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/include/foonathan_memory +) +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/foonathan_memory/foonathan_memory-config.cmake + "\${_IMPORT_PREFIX}/include/foonathan_memory/comp;\${_IMPORT_PREFIX}/include/foonathan_memory" + "\${_IMPORT_PREFIX}/include" +) +# Place header files into the right folders - Done! + +# The Debug version of this lib is built with: +# #define FOONATHAN_MEMORY_DEBUG_FILL 1 +# and Release version is built with: +# #define FOONATHAN_MEMORY_DEBUG_FILL 0 +# We only have the Release version header files installed, however. +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/foonathan/memory/detail/debug_helpers.hpp + "#if FOONATHAN_MEMORY_DEBUG_FILL" + "#ifndef NDEBUG //#if FOONATHAN_MEMORY_DEBUG_FILL" +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/LICENSE + ${CURRENT_PACKAGES_DIR}/debug/README.md + ${CURRENT_PACKAGES_DIR}/LICENSE + ${CURRENT_PACKAGES_DIR}/README.md +) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR + VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX}) + file(COPY + ${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} + ) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ) + else() + file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/debug/bin/nodesize_dbg${EXECUTABLE_SUFFIX} + ) + endif() +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/foonathan-memory/vcpkg.json b/ports/foonathan-memory/vcpkg.json new file mode 100644 index 00000000000000..e668bd94f54734 --- /dev/null +++ b/ports/foonathan-memory/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "foonathan-memory", + "version-string": "2019-07-21", + "port-version": 2, + "description": "STL compatible C++ memory allocator library", + "homepage": "https://foonathan.net/doc/memory/", + "default-features": [ + "tool" + ], + "features": { + "tool": { + "description": "Build foonathan memory tool" + } + } +} diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL deleted file mode 100644 index 82de142c10a358..00000000000000 --- a/ports/forest/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: forest -Version: 12.0.3 -Homepage: https://github.com/xorz57/forest -Description: Template Library of Tree Data Structures in C++17 diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake deleted file mode 100644 index b32febeaed9877..00000000000000 --- a/ports/forest/portfile.cmake +++ /dev/null @@ -1,15 +0,0 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO xorz57/forest - REF 12.0.3 - SHA512 9a693569c1d169e0c87d88150ae223d71d9491c9ed8774fdfdeee3b6a10f25d74b0653766d04095711bc76c7a4ecbec6f98dfad6846323f5f3bd701574843f53 - HEAD_REF master -) - -# Handle headers -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/forest RENAME copyright) diff --git a/ports/forge/CONTROL b/ports/forge/CONTROL deleted file mode 100644 index 595f6d2a2dd9f2..00000000000000 --- a/ports/forge/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: forge -Version: 1.0.4-1 -Description: Helps with high performance visualizations involving OpenGL-CUDA/OpenCL interop. -Build-Depends: glfw3, glm, glbinding, freetype, boost-functional, freeimage, fontconfig (!windows) diff --git a/ports/forge/cmake_config.patch b/ports/forge/cmake_config.patch new file mode 100644 index 00000000000000..4775ec0d156d0e --- /dev/null +++ b/ports/forge/cmake_config.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeModules/ForgeConfig.cmake.in b/CMakeModules/ForgeConfig.cmake.in +index 6fb18ac..5a3b000 100644 +--- a/CMakeModules/ForgeConfig.cmake.in ++++ b/CMakeModules/ForgeConfig.cmake.in +@@ -83,3 +83,22 @@ if ((TARGET Forge::forge AND Forge_BINARY_EXISTS) OR TARGET forge) + else () + set(Forge_FOUND OFF) + endif () ++ ++if(Forge_FOUND) ++ # Check for dependencies when Forge binary and cmake files are found ++ include(CMakeFindDependencyMacro) ++ ++ find_dependency(glad CONFIG) ++ find_dependency(glfw3 CONFIG) ++ find_dependency(freetype CONFIG) ++ find_dependency(freeimage CONFIG) ++ find_dependency(OpenGL) ++ ++ if(NOT WIN32) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(fontconfig REQUIRED) ++ if(NOT fontconfig_FOUND) ++ message(FATAL_ERROR "Please install Fontconfig dependency") ++ endif() ++ endif() ++endif() diff --git a/ports/forge/fix-static_build.patch b/ports/forge/fix-static_build.patch deleted file mode 100644 index 67f498cd8e9792..00000000000000 --- a/ports/forge/fix-static_build.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/extern/glad/CMakeLists.txt b/extern/glad/CMakeLists.txt -index c8c8d86..27adf86 100644 ---- a/extern/glad/CMakeLists.txt -+++ b/extern/glad/CMakeLists.txt -@@ -2,15 +2,19 @@ add_library(forge_glad_interface INTERFACE) - - target_include_directories(forge_glad_interface - INTERFACE -- ${CMAKE_CURRENT_SOURCE_DIR}/include -+ $ - ) - - target_sources(forge_glad_interface - INTERFACE -- ${CMAKE_CURRENT_SOURCE_DIR}/src/glad.c -+ $ - ) - - target_link_libraries(forge_glad_interface - INTERFACE -- ${CMAKE_DL_LIBS} -+ $ - ) -+ -+if (NOT BUILD_SHARED_LIBS) -+ install(TARGETS forge_glad_interface EXPORT ForgeTargets) -+endif () -\ No newline at end of file diff --git a/ports/forge/portfile.cmake b/ports/forge/portfile.cmake index 24df90dce44615..956de3d37472e4 100644 --- a/ports/forge/portfile.cmake +++ b/ports/forge/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") message(FATAL_ERROR "This port currently only supports x64 architecture") endif() @@ -7,33 +5,33 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO arrayfire/forge - REF 650bf611de102a2cc0c32dba7646f8128f0300c8 - SHA512 2093464db0f3a7f0178f65bed37986a4df1117f1d7ad65157d525584490cdf234475f01ed1a2003a9e54bdc3b9e2e450808044a264c2284d67b8c2a353400027 + REF v1.0.8 + SHA512 08e5eb89d80f7fa3310f0eb37481492b5c1dfff00b33c308169862d8b25cf93ad1d9c0db78667c0207a7f6f8ca4046c196bd3a987af839ea1864b49c738ee8e3 HEAD_REF master - PATCHES fix-static_build.patch + PATCHES cmake_config.patch ) +file(REMOVE ${SOURCE_PATH}/CMakeModules/FindOpenGL.cmake) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DFG_BUILD_DOCS=OFF -DFG_BUILD_EXAMPLES=OFF -DFG_INSTALL_BIN_DIR=bin - -DFG_WITH_FREEIMAGE=OFF + -DFG_INSTALL_CMAKE_DIR=share/Forge ) vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/Forge TARGET_PATH share/Forge) file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/bin/* ${CURRENT_PACKAGES_DIR}/debug/bin/*) list(FILTER DLLS EXCLUDE REGEX "forge\\.dll\$") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/examples ${CURRENT_PACKAGES_DIR}/examples ${DLLS} ) -file(INSTALL ${SOURCE_PATH}/.github/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/forge RENAME copyright) +file(INSTALL ${SOURCE_PATH}/.github/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/forge/vcpkg.json b/ports/forge/vcpkg.json new file mode 100644 index 00000000000000..afd8df8d39098f --- /dev/null +++ b/ports/forge/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "forge", + "version-semver": "1.0.8", + "description": "An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend.", + "homepage": "https://github.com/arrayfire/forge", + "supports": "x64", + "dependencies": [ + "boost-functional", + { + "name": "fontconfig", + "platform": "!windows" + }, + "freeimage", + "freetype", + "glad", + "glfw3", + "glm" + ] +} diff --git a/ports/fp16/find-psimd.patch b/ports/fp16/find-psimd.patch new file mode 100644 index 00000000000000..6eeed9aa714ac6 --- /dev/null +++ b/ports/fp16/find-psimd.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,7 +33,8 @@ SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps + SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps + CACHE PATH "Confu-style dependencies binary directory") + +-IF(NOT DEFINED PSIMD_SOURCE_DIR) ++find_path(PSIMD_INCLUDE_DIRS "psimd.h") ++IF(FALSE) + MESSAGE(STATUS "Downloading PSimd to ${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd (define PSIMD_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -76,7 +77,7 @@ ELSE() + ENDIF() + TARGET_INCLUDE_DIRECTORIES(fp16 INTERFACE + $ +- $) ++ $ $) + + INSTALL(FILES include/fp16.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +@@ -90,7 +91,7 @@ INSTALL(FILES + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fp16) + + # ---[ Configure psimd +-IF(NOT TARGET psimd) ++IF(FALSE) + ADD_SUBDIRECTORY( + "${PSIMD_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd") diff --git a/ports/fp16/portfile.cmake b/ports/fp16/portfile.cmake new file mode 100644 index 00000000000000..101255b8b908bf --- /dev/null +++ b/ports/fp16/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Maratyszcza/fp16 + REF 4dfe081cf6bcd15db339cf2680b9281b8451eeb3 + SHA512 e79a1f6f8d4aeca85982158d5b070923d31d4f2062ed84cfa6f26c47a34f2e8ac49e0f330b7d49f5732d5e1eec6e7afccdac43645070060fb7827e2ce261dd3e + PATCHES + find-psimd.patch +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFP16_BUILD_TESTS=OFF + -DFP16_BUILD_BENCHMARKS=OFF +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/fp16/vcpkg.json b/ports/fp16/vcpkg.json new file mode 100644 index 00000000000000..76eac902f7e055 --- /dev/null +++ b/ports/fp16/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "fp16", + "version-date": "2021-02-21", + "description": "Header-only library for conversion to/from half-precision floating point formats", + "homepage": "https://github.com/Maratyszcza/FP16", + "dependencies": [ + "psimd" + ] +} diff --git a/ports/fplus/portfile.cmake b/ports/fplus/portfile.cmake new file mode 100644 index 00000000000000..5969cd318c5ad1 --- /dev/null +++ b/ports/fplus/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Dobiasd/FunctionalPlus + REF v0.2.14-p0 + SHA512 f6232140fc343521bc484c7fa1a9d4942fbfc078be1cefa7b34c33632ec23d55827d13319f7b7a5535c5eedeb3161e15f84ecb80aa110685dbfc2c932c57284b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFPLUS_BUILD_EXAMPLES=OFF + -DFunctionalPlus_INSTALL_CMAKEDIR=share/FunctionalPlus +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/fplus/vcpkg.json b/ports/fplus/vcpkg.json new file mode 100644 index 00000000000000..0e4c7ad713ab45 --- /dev/null +++ b/ports/fplus/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fplus", + "version-semver": "0.2.14-p0", + "description": "Functional Programming Library for C++. Write concise and readable C++ code", + "homepage": "https://github.com/Dobiasd/FunctionalPlus" +} diff --git a/ports/freealut/cmake_builds.patch b/ports/freealut/cmake_builds.patch new file mode 100644 index 00000000000000..187b32669589d3 --- /dev/null +++ b/ports/freealut/cmake_builds.patch @@ -0,0 +1,114 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 963c530..656ce14 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + # cmake project file by Prakash Punnoor + # improved by Ryan Pavlik +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 2.8.12) + + project(Alut C) + +@@ -27,7 +27,6 @@ include_directories(${Alut_SOURCE_DIR}/include) + + # What to build? + option(BUILD_EXAMPLES "build example applications" ON) +-option(BUILD_STATIC "build static library too" OFF) + option(BUILD_TESTS "build the test-suite" ON) + + # How to build it? +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b72d1a1..5fc6cdc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -39,35 +39,7 @@ set(ALUT_HEADERS + ../include/AL/alut.h) + source_group(APIHeader FILES ${ALUT_HEADERS}) + +- +-if(BUILD_STATIC) +- # we can't create a static library with the same name +- # as the shared one, so we copy it over after creation +- add_library(alut_static STATIC ${ALUT_SOURCES} ${ALUT_INTERNAL_HEADERS} ${ALUT_HEADERS}) +- target_link_libraries(alut_static ${OPENAL_LIBRARY} ${ADD_LIBS}) +- if(UNIX) +- target_link_libraries(alut_static m) +- endif() +- if(NOT WIN32) +- # TODO this is an inelegant hack... +- add_custom_command(TARGET +- alut_static +- POST_BUILD +- COMMAND +- ${CMAKE_COMMAND} +- ARGS +- -E +- copy +- ${CMAKE_BINARY_DIR}/src/${CMAKE_STATIC_LIBRARY_PREFIX}alut_static${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_BINARY_DIR}/src/${CMAKE_STATIC_LIBRARY_PREFIX}alut${CMAKE_STATIC_LIBRARY_SUFFIX}) +- install_files(/lib${LIB_SUFFIX} +- FILES +- ${CMAKE_STATIC_LIBRARY_PREFIX}alut${CMAKE_STATIC_LIBRARY_SUFFIX}) +- endif() +-endif() +- +- +-add_library(alut SHARED ${ALUT_SOURCES} ${ALUT_INTERNAL_HEADERS} ${ALUT_HEADERS}) ++add_library(alut ${ALUT_SOURCES} ${ALUT_INTERNAL_HEADERS} ${ALUT_HEADERS}) + set_property(TARGET + alut + PROPERTY +@@ -80,12 +52,40 @@ set_target_properties(alut + SOVERSION + ${MAJOR_VERSION}) + target_link_libraries(alut ${OPENAL_LIBRARY}) ++target_include_directories(alut PUBLIC ${OPENAL_INCLUDE_DIR}) + if(UNIX) + target_link_libraries(alut m) + endif() ++if(NOT BUILD_SHARED_LIBS) ++ target_compile_definitions(alut PUBLIC ALUT_BUILD_STATIC) ++endif() + + install(TARGETS alut ++ EXPORT "FreeALUTTargets" + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + RUNTIME DESTINATION bin +- PUBLIC_HEADER DESTINATION include/AL) ++ PUBLIC_HEADER DESTINATION include/AL ++ ) ++ ++include(CMakePackageConfigHelpers) ++ ++set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/FreeALUTConfigVersion.cmake") ++set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/FreeALUTConfig.cmake") ++set(namespace "FreeALUT::") ++ ++write_basic_package_version_file("${version_config}" ++ COMPATIBILITY SameMajorVersion ++ VERSION ${PACKAGE_VERSION}) ++ ++configure_package_config_file("Config.cmake.in" ++ "${project_config}" ++ INSTALL_DESTINATION ++ lib${LIB_SUFFIX}/cmake/freealut) ++ ++install(FILES "${project_config}" "${version_config}" ++ DESTINATION lib${LIB_SUFFIX}/cmake/freealut) ++ ++install(EXPORT "FreeALUTTargets" ++ NAMESPACE "${namespace}" ++ DESTINATION lib${LIB_SUFFIX}/cmake/freealut) +diff --git a/src/Config.cmake.in b/src/Config.cmake.in +new file mode 100644 +index 0000000..2a20f59 +--- /dev/null ++++ b/src/Config.cmake.in +@@ -0,0 +1,5 @@ ++ ++@PACKAGE_INIT@ ++ ++include("${CMAKE_CURRENT_LIST_DIR}/FreeALUTTargets.cmake") ++check_required_components("FreeALUT") diff --git a/ports/freealut/portfile.cmake b/ports/freealut/portfile.cmake new file mode 100644 index 00000000000000..668b64e3a02bfe --- /dev/null +++ b/ports/freealut/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vancegroup/freealut + REF fc814e316c2bfa6e05b723b8cc9cb276da141aae + SHA512 046990cc13822ca6eea0b8e412aa95a994b881429e0b15cefee379f08bd9636d4a4598292a8d46b30c3cd06814bfaeae3298e8ef4087a46eede344f3880e9fed + HEAD_REF master + PATCHES + cmake_builds.patch + unix_headers.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF +) + +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/share" + "${CURRENT_PACKAGES_DIR}/debug/include" + ) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/freealut-config") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/freealut-config") +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/freealut-config") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/freealut-config") +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/freealut/unix_headers.patch b/ports/freealut/unix_headers.patch new file mode 100644 index 00000000000000..aabf69e7740ec5 --- /dev/null +++ b/ports/freealut/unix_headers.patch @@ -0,0 +1,32 @@ +diff --git a/include/AL/alut.h b/include/AL/alut.h +index 4b05a3c..1084604 100644 +--- a/include/AL/alut.h ++++ b/include/AL/alut.h +@@ -1,24 +1,18 @@ + #if !defined(AL_ALUT_H) + #define AL_ALUT_H + +-#if defined(_MSC_VER) + #include + #include +-#elif defined(__APPLE__) +-#include +-#include +-#else +-#include +-#include +-#endif + + #if defined(__cplusplus) + extern "C" { + #endif + + #if defined(_WIN32) && !defined(_XBOX) +- #if defined (ALUT_BUILD_LIBRARY) ++ #if defined(ALUT_BUILD_LIBRARY) + #define ALUT_API __declspec(dllexport) ++ #elif defined(ALUT_BUILD_STATIC) ++ #define ALUT_API extern + #else + #define ALUT_API __declspec(dllimport) + #endif diff --git a/ports/freealut/vcpkg.json b/ports/freealut/vcpkg.json new file mode 100644 index 00000000000000..81739956c98f74 --- /dev/null +++ b/ports/freealut/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "freealut", + "version": "1.1.0", + "port-version": 1, + "description": [ + "FreeALUT is a free implementation of OpenAL's ALUT standard.", + "ALUT is a set of portable functions which remove the annoying details of getting an audio application started. It is the OpenAL counterpart of what GLUT is for OpenGL. " + ], + "homepage": "https://github.com/vancegroup/freealut", + "supports": "!uwp", + "dependencies": [ + "openal-soft", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL deleted file mode 100644 index 7489109c49fdea..00000000000000 --- a/ports/freeglut/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: freeglut -Version: 3.0.0-7 -Homepage: https://sourceforge.net/projects/freeglut/ -Description: Open source implementation of GLUT with source and binary backwards compatibility. diff --git a/ports/freeglut/fix-debug-macro.patch b/ports/freeglut/fix-debug-macro.patch new file mode 100644 index 00000000000000..69f9e82bcea802 --- /dev/null +++ b/ports/freeglut/fix-debug-macro.patch @@ -0,0 +1,35 @@ +diff --git a/include/GL/freeglut_std.h b/include/GL/freeglut_std.h +index a658c7c..a5efb3b 100644 +--- a/include/GL/freeglut_std.h ++++ b/include/GL/freeglut_std.h +@@ -70,7 +70,7 @@ + + /* Link with Win32 static freeglut lib */ + # if FREEGLUT_LIB_PRAGMAS +-# ifdef NDEBUG ++# if defined(NDEBUG) || !defined(_DEBUG) + # pragma comment (lib, "freeglut_static.lib") + # else + # pragma comment (lib, "freeglut_staticd.lib") +@@ -88,7 +88,7 @@ + + /* Link with Win32 shared freeglut lib */ + # if FREEGLUT_LIB_PRAGMAS +-# ifdef NDEBUG ++# if defined(NDEBUG) || !defined(_DEBUG) + # pragma comment (lib, "freeglut.lib") + # else + # pragma comment (lib, "freeglutd.lib") +diff --git a/src/blackberry/fg_main_blackberry.c b/src/blackberry/fg_main_blackberry.c +index a1b9cbb..a20c53d 100644 +--- a/src/blackberry/fg_main_blackberry.c ++++ b/src/blackberry/fg_main_blackberry.c +@@ -31,7 +31,7 @@ + #include "fg_internal.h" + #include "egl/fg_window_egl.h" + +-#ifdef NDEBUG ++#if defined(NDEBUG) || !defined(_DEBUG) + #define LOGI(...) + #endif + diff --git a/ports/freeglut/gcc10.patch b/ports/freeglut/gcc10.patch new file mode 100644 index 00000000000000..dc5193b6ac090f --- /dev/null +++ b/ports/freeglut/gcc10.patch @@ -0,0 +1,31 @@ +diff --git a/src/fg_gl2.h b/src/fg_gl2.h +index ab8ba5c..a1a52da 100644 +--- a/src/fg_gl2.h ++++ b/src/fg_gl2.h +@@ -67,13 +67,19 @@ typedef void (APIENTRY *FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); + typedef void (APIENTRY *FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint); + typedef void (APIENTRY *FGH_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); + +-FGH_PFNGLGENBUFFERSPROC fghGenBuffers; +-FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers; +-FGH_PFNGLBINDBUFFERPROC fghBindBuffer; +-FGH_PFNGLBUFFERDATAPROC fghBufferData; +-FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray; +-FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray; +-FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer; ++#if __GNUC__ > 9 ++#define FG_ATTRIBUTE_COMMON __attribute__((__common__)) ++#else ++#define FG_ATTRIBUTE_COMMON ++#endif ++ ++FGH_PFNGLGENBUFFERSPROC FG_ATTRIBUTE_COMMON fghGenBuffers; ++FGH_PFNGLDELETEBUFFERSPROC FG_ATTRIBUTE_COMMON fghDeleteBuffers; ++FGH_PFNGLBINDBUFFERPROC FG_ATTRIBUTE_COMMON fghBindBuffer; ++FGH_PFNGLBUFFERDATAPROC FG_ATTRIBUTE_COMMON fghBufferData; ++FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC FG_ATTRIBUTE_COMMON fghEnableVertexAttribArray; ++FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC FG_ATTRIBUTE_COMMON fghDisableVertexAttribArray; ++FGH_PFNGLVERTEXATTRIBPOINTERPROC FG_ATTRIBUTE_COMMON fghVertexAttribPointer; + + # endif + diff --git a/ports/freeglut/macOS_Xquartz.patch b/ports/freeglut/macOS_Xquartz.patch index 423b3b90180719..c154dceb554bab 100644 --- a/ports/freeglut/macOS_Xquartz.patch +++ b/ports/freeglut/macOS_Xquartz.patch @@ -1,11 +1,11 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index f68b27f..4339858 100644 +index 6f403af..ce6f9f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -220,6 +220,16 @@ ENDIF() +@@ -258,6 +258,16 @@ ENDIF() IF(FREEGLUT_GLES) - ADD_DEFINITIONS(-DFREEGLUT_GLES) - LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) + LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) +ELSEIF(APPLE) + # on OSX FindOpenGL uses framework version of OpenGL, but we need X11 version + FIND_PATH(GLX_INCLUDE_DIR GL/glx.h diff --git a/ports/freeglut/no_x64_enforcement.patch b/ports/freeglut/no_x64_enforcement.patch new file mode 100755 index 00000000000000..d98332366402ae --- /dev/null +++ b/ports/freeglut/no_x64_enforcement.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt.orig b/CMakeLists.txt +index 6f403af..d1ba4e7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -418,12 +418,6 @@ IF(WIN32) + IF(FREEGLUT_REPLACE_GLUT) + SET_TARGET_PROPERTIES(freeglut_static PROPERTIES OUTPUT_NAME ${LIBNAME}) + ENDIF() +- # need to set machine:x64 for linker, at least for VC10, and +- # doesn't hurt for older compilers: +- # http://public.kitware.com/Bug/view.php?id=11240#c22768 +- IF (CMAKE_CL_64) +- SET_TARGET_PROPERTIES(freeglut_static PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64") +- ENDIF() + ENDIF() + ELSE() + # on UNIX we need to make sure: diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake old mode 100644 new mode 100755 index ab95e3165a1002..8a872e6b6edc53 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -1,20 +1,18 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freeglut-3.0.0) -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/freeglut/freeglut/3.0.0/freeglut-3.0.0.tar.gz" - FILENAME "freeglut-3.0.0.tar.gz" - SHA512 9c45d5b203b26a7ff92331b3e080a48e806c92fbbe7c65d9262dd18c39cd6efdad8a795a80f499a2d23df84b4909dbd7c1bab20d7dd3555d3d88782ce9dd15b0 +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO freeglut/freeglut + REF 3.2.1 + FILENAME "freeglut-3.2.1.tar.gz" + SHA512 aced4bbcd36269ce6f4ee1982e0f9e3fffbf18c94f785d3215ac9f4809b992e166c7ada496ed6174e13d77c0f7ef3ca4c57d8a282e96cbbe6ff086339ade3b08 + PATCHES + use_targets_to_export_x11_dependency.patch + macOS_Xquartz.patch + gcc10.patch + fix-debug-macro.patch + no_x64_enforcement.patch ) -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - use_targets_to_export_x11_dependency.patch - macOS_Xquartz.patch -) - -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_TARGET_IS_WINDOWS) message("Freeglut currently requires the following libraries from the system package manager:\n opengl\n glu\n libx11\n xrandr\n xi\n xxf86vm\n\nThese can be installed on Ubuntu systems via apt-get install libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev\nOn macOS Xquartz is required.") endif() @@ -45,21 +43,31 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeGLUT) # Rename static lib (otherwise it's incompatible with FindGLUT.cmake) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglutd.lib) + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) + endif() + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglutd.lib) + endif() endif() + + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h" + "ifdef FREEGLUT_STATIC" + "if 1 //ifdef FREEGLUT_STATIC" + ) endif() # Clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeglut) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/freeglut/COPYING ${CURRENT_PACKAGES_DIR}/share/freeglut/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/freeglut/use_targets_to_export_x11_dependency.patch b/ports/freeglut/use_targets_to_export_x11_dependency.patch index 9933efd44e4305..2f9e6b1bf29f52 100644 --- a/ports/freeglut/use_targets_to_export_x11_dependency.patch +++ b/ports/freeglut/use_targets_to_export_x11_dependency.patch @@ -1,29 +1,23 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0d3260b..edf034a 100644 +index 6f403af..4ced28a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -257,8 +257,6 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC) +@@ -72,7 +72,7 @@ SET(FREEGLUT_HEADERS + include/GL/freeglut_ext.h + include/GL/freeglut_std.h + ) +-IF(FREEGLUT_REPLACE_GLUT) ++IF(TRUE) + LIST(APPEND FREEGLUT_HEADERS + include/GL/glut.h + ) +@@ -312,8 +312,7 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC) INCLUDE(CheckIncludeFiles) - IF(UNIX AND NOT(ANDROID OR BLACKBERRY)) + IF(UNIX AND NOT(ANDROID OR BLACKBERRY OR FREEGLUT_WAYLAND)) FIND_PACKAGE(X11 REQUIRED) -- INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR}) -- LIST(APPEND LIBS ${X11_LIBRARIES}) +- INCLUDE_DIRECTORIES(${X11_X11_INCLUDE_PATH}) +- LIST(APPEND LIBS ${X11_X11_LIB}) ++ LIST(APPEND LIBS X11::X11) IF(X11_Xrandr_FOUND) SET(HAVE_X11_EXTENSIONS_XRANDR_H TRUE) LIST(APPEND LIBS ${X11_Xrandr_LIB}) -@@ -339,9 +337,15 @@ ENDIF() - - IF(FREEGLUT_BUILD_SHARED_LIBS) - ADD_LIBRARY(freeglut SHARED ${FREEGLUT_SRCS}) -+ IF(UNIX AND NOT(ANDROID OR BLACKBERRY)) -+ TARGET_LINK_LIBRARIES(freeglut PRIVATE X11::X11) -+ ENDIF() - ENDIF() - IF(FREEGLUT_BUILD_STATIC_LIBS) - ADD_LIBRARY(freeglut_static STATIC ${FREEGLUT_SRCS}) -+ IF(UNIX AND NOT(ANDROID OR BLACKBERRY)) -+ TARGET_LINK_LIBRARIES(freeglut_static PRIVATE X11::X11) -+ ENDIF() - ENDIF() - - diff --git a/ports/freeglut/vcpkg.json b/ports/freeglut/vcpkg.json new file mode 100644 index 00000000000000..9c53e4f6bcf217 --- /dev/null +++ b/ports/freeglut/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "freeglut", + "version-string": "3.2.1", + "port-version": 6, + "description": "Open source implementation of GLUT with source and binary backwards compatibility.", + "homepage": "https://sourceforge.net/projects/freeglut/" +} diff --git a/ports/freeimage/CMakeLists.txt b/ports/freeimage/CMakeLists.txt index af3d1c37fd8145..2c2fb129ee4931 100644 --- a/ports/freeimage/CMakeLists.txt +++ b/ports/freeimage/CMakeLists.txt @@ -9,11 +9,7 @@ if(MSVC) set(CMAKE_CXX_FLAGS "/wd4828 ${CMAKE_CXX_FLAGS}") endif() -if(BUILD_SHARED_LIBS) - add_definitions("-DOPENEXR_DLL") -endif() - -find_package(zlib REQUIRED) +find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) find_package(JPEG REQUIRED) find_package(TIFF REQUIRED) @@ -83,7 +79,7 @@ else() endif() list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) -add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS}) +add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/FreeImage.rc) if(BUILD_SHARED_LIBS) target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS) @@ -100,8 +96,8 @@ target_include_directories(FreeImage PRIVATE ${REAL_SOURCE_DIR} ${WEBP_INCLUDE_DIRS} ${JXR_INCLUDE_DIRS} ${LibRaw_INCLUDE_DIRS} - ${OpenEXR_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR}) + ${CMAKE_CURRENT_BINARY_DIR} + PUBLIC $) target_link_libraries(FreeImage ${ZLIB_LIBRARIES} @@ -112,7 +108,7 @@ target_link_libraries(FreeImage ${ZLIB_LIBRARIES} ${WEBP_LIBRARIES} ${JXR_LIBRARIES} ${LibRaw_LIBRARIES} - ${OpenEXR_LIBRARIES}) + OpenEXR::IlmImf) target_compile_definitions(FreeImage PRIVATE ${PNG_DEFINITIONS}) @@ -131,24 +127,37 @@ endif() target_include_directories(FreeImagePlus PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus ${CMAKE_CURRENT_BINARY_DIR} - ${REAL_SOURCE_DIR}) + ${REAL_SOURCE_DIR} + PUBLIC $) target_link_libraries(FreeImagePlus PUBLIC FreeImage) list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h) -install(TARGETS FreeImage +install(TARGETS FreeImage FreeImagePlus + EXPORT freeimage-targets COMPONENT runtime - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) - -install(TARGETS FreeImagePlus - COMPONENT runtime-cpp - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) - + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + +install(EXPORT freeimage-targets NAMESPACE freeimage:: DESTINATION share/freeimage) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/freeimage-config.cmake" +"include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +find_dependency(PNG) +find_dependency(JPEG) +find_dependency(TIFF) +find_dependency(OpenJPEG) +find_dependency(WebP) +find_dependency(JXR) +find_dependency(LibRaw) +find_dependency(OpenEXR) +include(\"\${CMAKE_CURRENT_LIST_DIR}/freeimage-targets.cmake\") +") + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freeimage-config.cmake DESTINATION share/freeimage) if(INSTALL_HEADERS) install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) endif() diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL deleted file mode 100644 index c911df6c7e3d5c..00000000000000 --- a/ports/freeimage/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: freeimage -Version: 3.18.0-7 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp[all] (!uwp), libraw, jxrlib, openexr -Homepage: https://sourceforge.net/projects/freeimage/ -Description: Support library for graphics image formats diff --git a/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch b/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch index 28d0e3a42be9dc..c22828deee7504 100644 --- a/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch +++ b/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch @@ -1,20 +1,38 @@ diff --git a/Source/FreeImage.h b/Source/FreeImage.h -index e2d1c5a..cc66b7d 100644 +index 12182cd..ebd0453 100644 --- a/Source/FreeImage.h +++ b/Source/FreeImage.h -@@ -410,7 +410,11 @@ FI_ENUM(FREE_IMAGE_FORMAT) { +@@ -410,16 +410,20 @@ FI_ENUM(FREE_IMAGE_FORMAT) { FIF_DDS = 24, FIF_GIF = 25, FIF_HDR = 26, - FIF_FAXG3 = 27, +- FIF_SGI = 28, +- FIF_EXR = 29, +- FIF_J2K = 30, +- FIF_JP2 = 31, +- FIF_PFM = 32, +- FIF_PICT = 33, +- FIF_RAW = 34, +- FIF_WEBP = 35, +- FIF_JXR = 36 +/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of + FreeImage, since it requires usage of the vendored copy of libtiff. */ +#if 0 + FIF_FAXG3 = 27, +#endif - FIF_SGI = 28, - FIF_EXR = 29, - FIF_J2K = 30, ++ FIF_SGI = 27, ++ FIF_EXR = 28, ++ FIF_J2K = 29, ++ FIF_JP2 = 30, ++ FIF_PFM = 31, ++ FIF_PICT = 32, ++ FIF_RAW = 33, ++ FIF_WEBP = 34, ++ FIF_JXR = 35 + }; + + /** Image type used in FreeImage. @@ -476,6 +480,9 @@ FI_ENUM(FREE_IMAGE_DITHER) { /** Lossless JPEG transformations Constants used in FreeImage_JPEGTransform @@ -33,7 +51,7 @@ index e2d1c5a..cc66b7d 100644 /** Tone mapping operators. Constants used in FreeImage_ToneMapping. -@@ -1077,6 +1085,9 @@ DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, +@@ -1089,6 +1097,9 @@ DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, // JPEG lossless transformation routines // -------------------------------------------------------------------------- @@ -43,7 +61,7 @@ index e2d1c5a..cc66b7d 100644 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); -@@ -1085,7 +1096,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, +@@ -1097,7 +1108,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); @@ -53,7 +71,7 @@ index e2d1c5a..cc66b7d 100644 // -------------------------------------------------------------------------- // Image manipulation toolkit diff --git a/Source/FreeImage/Plugin.cpp b/Source/FreeImage/Plugin.cpp -index 57ebffd..a93440f 100644 +index 11e7294..0119ba7 100644 --- a/Source/FreeImage/Plugin.cpp +++ b/Source/FreeImage/Plugin.cpp @@ -263,7 +263,11 @@ FreeImage_Initialise(BOOL load_local_plugins_only) { diff --git a/ports/freeimage/portfile.cmake b/ports/freeimage/portfile.cmake index dc57a5691e3eac..ce1b86821cc544 100644 --- a/ports/freeimage/portfile.cmake +++ b/ports/freeimage/portfile.cmake @@ -1,28 +1,23 @@ -include(${CMAKE_TRIPLET_FILE}) -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FreeImage) -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/freeimage/FreeImage3180.zip" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO freeimage/Source%20Distribution + REF 3.18.0 FILENAME "FreeImage3180.zip" SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818 -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/disable-plugins-depending-on-internal-third-party-libraries.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-external-jpeg.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-external-jxrlib.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-external-libtiff.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-external-openjpeg.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-external-png-zlib.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-external-rawlib.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-external-webp.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-external-openexr.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-freeimage-config-include.patch" - "${CMAKE_CURRENT_LIST_DIR}/fix-function-overload.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-typedef-as-already-declared.patch" + PATCHES + disable-plugins-depending-on-internal-third-party-libraries.patch + use-external-jpeg.patch + use-external-jxrlib.patch + use-external-libtiff.patch + use-external-openjpeg.patch + use-external-png-zlib.patch + use-external-rawlib.patch + use-external-webp.patch + use-external-openexr.patch + use-freeimage-config-include.patch + fix-function-overload.patch + use-typedef-as-already-declared.patch + use-functions-to-override-libtiff-warning-error-handlers.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -44,17 +39,13 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/OpenEXR) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DVCPKG_ROOT_DIR=${VCPKG_ROOT_DIR} - -DTARGET_TRIPLET=${TARGET_TRIPLET} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF ) vcpkg_install_cmake() - -# Handle copyright -file(COPY ${SOURCE_PATH}/license-fi.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeimage) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/freeimage/license-fi.txt ${CURRENT_PACKAGES_DIR}/share/freeimage/copyright) +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/license-fi.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/freeimage/use-external-png-zlib.patch b/ports/freeimage/use-external-png-zlib.patch index fc7837e4349ab5..da489b6b82cd45 100644 --- a/ports/freeimage/use-external-png-zlib.patch +++ b/ports/freeimage/use-external-png-zlib.patch @@ -9,7 +9,7 @@ index ba2ef17..c3c5cd6 100644 -#include "../ZLib/zlib.h" -#include "../LibPNG/png.h" +#include -+#include ++#include // ---------------------------------------------------------- diff --git a/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch b/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch new file mode 100644 index 00000000000000..270331e26c07ce --- /dev/null +++ b/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch @@ -0,0 +1,31 @@ +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index a9fcf0e..b1f7b32 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -258,7 +258,7 @@ static void + msdosWarningHandler(const char* module, const char* fmt, va_list ap) { + } + +-TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler; ++//TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler; + + static void + msdosErrorHandler(const char* module, const char* fmt, va_list ap) { +@@ -273,7 +273,7 @@ msdosErrorHandler(const char* module, const char* fmt, va_list ap) { + */ + } + +-TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler; ++//TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler; + + // ---------------------------------------------------------- + +@@ -2659,6 +2659,8 @@ InitTIFF(Plugin *plugin, int format_id) { + // Set up the callback for extended TIFF directory tag support (see XTIFF.cpp) + // Must be called before using libtiff + XTIFFInitialize(); ++ TIFFSetWarningHandler(msdosWarningHandler); ++ TIFFSetErrorHandler(msdosErrorHandler); + + plugin->format_proc = Format; + plugin->description_proc = Description; diff --git a/ports/freeimage/vcpkg.json b/ports/freeimage/vcpkg.json new file mode 100644 index 00000000000000..3d68598ad5da2f --- /dev/null +++ b/ports/freeimage/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "freeimage", + "version": "3.18.0", + "port-version": 21, + "description": "Support library for graphics image formats", + "homepage": "https://sourceforge.net/projects/freeimage/", + "dependencies": [ + "jxrlib", + "libjpeg-turbo", + "libpng", + "libraw", + { + "name": "libwebp", + "platform": "!uwp" + }, + "openexr", + "openjpeg", + "tiff", + "zlib" + ] +} diff --git a/ports/freeopcua/CONTROL b/ports/freeopcua/CONTROL deleted file mode 100644 index 9ff43924137cc8..00000000000000 --- a/ports/freeopcua/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: freeopcua -Version: 20190125-2 -Description: OPC-UA server and client library written in C++ and with a lot of code auto-generated from xml specification using python. -Build-Depends: boost-asio,boost-system,boost-program-options,boost-filesystem,boost-thread,boost-format,boost-foreach,boost-property-tree,boost-date-time diff --git a/ports/freeopcua/fix-std-headers.patch b/ports/freeopcua/fix-std-headers.patch new file mode 100644 index 00000000000000..d846a6176cdee0 --- /dev/null +++ b/ports/freeopcua/fix-std-headers.patch @@ -0,0 +1,24 @@ +diff --git a/include/opc/ua/protocol/utils.h b/include/opc/ua/protocol/utils.h +index e23bffe..5c8c2ad 100644 +--- a/include/opc/ua/protocol/utils.h ++++ b/include/opc/ua/protocol/utils.h +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + namespace OpcUa + { +diff --git a/src/core/model_impl.h b/src/core/model_impl.h +index 0f548c5..c29626b 100644 +--- a/src/core/model_impl.h ++++ b/src/core/model_impl.h +@@ -20,6 +20,7 @@ + #pragma once + + #include ++#include + + namespace OpcUa + { diff --git a/ports/freeopcua/portfile.cmake b/ports/freeopcua/portfile.cmake index 57ca771ce282f6..76e9508370b729 100644 --- a/ports/freeopcua/portfile.cmake +++ b/ports/freeopcua/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO FreeOpcUa/freeopcua @@ -14,6 +12,7 @@ vcpkg_from_github( serverObj.patch include_asio_first.patch boost-1.70.patch + fix-std-headers.patch ) vcpkg_configure_cmake( diff --git a/ports/freeopcua/vcpkg.json b/ports/freeopcua/vcpkg.json new file mode 100644 index 00000000000000..b2cd24b19acfd2 --- /dev/null +++ b/ports/freeopcua/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "freeopcua", + "version-string": "20190125", + "port-version": 4, + "description": "OPC-UA server and client library written in C++ and with a lot of code auto-generated from xml specification using python.", + "dependencies": [ + "boost-asio", + "boost-date-time", + "boost-filesystem", + "boost-foreach", + "boost-format", + "boost-program-options", + "boost-property-tree", + "boost-system", + "boost-thread" + ] +} diff --git a/ports/freerdp/CONTROL b/ports/freerdp/CONTROL deleted file mode 100644 index c5c3d657e57d2e..00000000000000 --- a/ports/freerdp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: freerdp -Version: 2.0.0-rc4-2 -Homepage: https://github.com/FreeRDP/FreeRDP -Description: A free implementation of the Remote Desktop Protocol (RDP) -Build-Depends: openssl diff --git a/ports/freerdp/fix-include-path.patch b/ports/freerdp/fix-include-path.patch new file mode 100644 index 00000000000000..dc65230806b4cc --- /dev/null +++ b/ports/freerdp/fix-include-path.patch @@ -0,0 +1,52 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 97ba2f9..64a2f33 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,7 +107,7 @@ else() + endif() + message("FREERDP_VERSION=${FREERDP_VERSION_FULL}") + +-set(FREERDP_INCLUDE_DIR "include/freerdp${FREERDP_VERSION_MAJOR}/") ++set(FREERDP_INCLUDE_DIR "include/") + + # Compatibility options + if(DEFINED STATIC_CHANNELS) +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index a020dc5..0bc1157 100644 +--- a/include/CMakeLists.txt ++++ b/include/CMakeLists.txt +@@ -19,7 +19,7 @@ + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/version.h) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/build-config.h) +-set(FREERDP_INSTALL_INCLUDE_DIR include/freerdp${FREERDP_VERSION_MAJOR}/freerdp) ++set(FREERDP_INSTALL_INCLUDE_DIR include/freerdp) + + file(GLOB FREERDP_HEADERS "freerdp/*.h") + install(FILES ${FREERDP_HEADERS} DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers) +diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt +index a94090a..08b6b88 100644 +--- a/winpr/CMakeLists.txt ++++ b/winpr/CMakeLists.txt +@@ -215,7 +215,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") + + SetFreeRDPCMakeInstallDir(WINPR_CMAKE_INSTALL_DIR "WinPR${WINPR_VERSION_MAJOR}") + +- set(WINPR_INCLUDE_DIR "include/winpr${WINPR_VERSION_MAJOR}") ++ set(WINPR_INCLUDE_DIR "include") + + configure_package_config_file(WinPRConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/WinPRConfig.cmake + INSTALL_DESTINATION ${WINPR_CMAKE_INSTALL_DIR} +diff --git a/winpr/include/CMakeLists.txt b/winpr/include/CMakeLists.txt +index 452383d..3faab0c 100644 +--- a/winpr/include/CMakeLists.txt ++++ b/winpr/include/CMakeLists.txt +@@ -17,7 +17,7 @@ + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/winpr/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/version.h) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/winpr/wtypes.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/wtypes.h) +-set(WINPR_INSTALL_INCLUDE_DIR include/winpr${WINPR_VERSION_MAJOR}/winpr) ++set(WINPR_INSTALL_INCLUDE_DIR include/winpr) + + file(GLOB WINPR_HEADERS "winpr/*.h") + install(FILES ${WINPR_HEADERS} DESTINATION ${WINPR_INSTALL_INCLUDE_DIR} COMPONENT headers) diff --git a/ports/freerdp/fix-libusb.patch b/ports/freerdp/fix-libusb.patch new file mode 100644 index 00000000000000..51f98b4719c443 --- /dev/null +++ b/ports/freerdp/fix-libusb.patch @@ -0,0 +1,45 @@ +diff --git a/channels/urbdrc/client/libusb/libusb_udevice.c b/channels/urbdrc/client/libusb/libusb_udevice.c +index 814540756..56809fe45 100644 +--- a/channels/urbdrc/client/libusb/libusb_udevice.c ++++ b/channels/urbdrc/client/libusb/libusb_udevice.c +@@ -232,7 +232,7 @@ static void async_transfer_user_data_free(ASYNC_TRANSFER_USER_DATA* user_data) + } + } + +-static void func_iso_callback(struct libusb_transfer* transfer) ++static void LIBUSB_CALL func_iso_callback(struct libusb_transfer* transfer) + { + ASYNC_TRANSFER_USER_DATA* user_data = (ASYNC_TRANSFER_USER_DATA*)transfer->user_data; + const UINT32 streamID = stream_id_from_buffer(transfer); +@@ -331,7 +331,7 @@ static const LIBUSB_ENDPOINT_DESCEIPTOR* func_get_ep_desc(LIBUSB_CONFIG_DESCRIPT + return NULL; + } + +-static void func_bulk_transfer_cb(struct libusb_transfer* transfer) ++static void LIBUSB_CALL func_bulk_transfer_cb(struct libusb_transfer* transfer) + { + ASYNC_TRANSFER_USER_DATA* user_data; + uint32_t streamID; +diff --git a/channels/urbdrc/client/libusb/libusb_udevman.c b/channels/urbdrc/client/libusb/libusb_udevman.c +index 1638b8c13..b1440f300 100644 +--- a/channels/urbdrc/client/libusb/libusb_udevman.c ++++ b/channels/urbdrc/client/libusb/libusb_udevman.c +@@ -580,7 +580,7 @@ static BOOL device_is_filtered(struct libusb_device* dev, + return filtered; + } + +-static int hotplug_callback(struct libusb_context* ctx, struct libusb_device* dev, ++static int LIBUSB_CALL hotplug_callback(struct libusb_context* ctx, struct libusb_device* dev, + libusb_hotplug_event event, void* user_data) + { + VID_PID_PAIR pair; +@@ -859,7 +859,7 @@ static BOOL poll_libusb_events(UDEVMAN* udevman) + return rc > 0; + } + +-static DWORD poll_thread(LPVOID lpThreadParameter) ++static DWORD __stdcall poll_thread(LPVOID lpThreadParameter) + { + libusb_hotplug_callback_handle handle; + UDEVMAN* udevman = (UDEVMAN*)lpThreadParameter; + \ No newline at end of file diff --git a/ports/freerdp/fix-linux-build.patch b/ports/freerdp/fix-linux-build.patch new file mode 100644 index 00000000000000..92f2cd4c14d547 --- /dev/null +++ b/ports/freerdp/fix-linux-build.patch @@ -0,0 +1,13 @@ +diff --git a/winpr/tools/makecert-cli/CMakeLists.txt b/winpr/tools/makecert-cli/CMakeLists.txt +index 48fda5b..4e15a22 100644 +--- a/winpr/tools/makecert-cli/CMakeLists.txt ++++ b/winpr/tools/makecert-cli/CMakeLists.txt +@@ -42,7 +42,7 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + + set(${MODULE_PREFIX}_LIBS winpr-tools) + +-target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} winpr) ++target_link_libraries(${MODULE_NAME} ${OPENSSL_LIBRARIES} ${${MODULE_PREFIX}_LIBS} winpr) + + set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Tools") + diff --git a/ports/freerdp/install-dirs.patch b/ports/freerdp/install-dirs.patch new file mode 100644 index 00000000000000..175be0ecf7525a --- /dev/null +++ b/ports/freerdp/install-dirs.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e67ef9..4ef3e8e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,7 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-cmake_minimum_required(VERSION 2.8) ++cmake_minimum_required(VERSION 3.11) + + project(FreeRDP C CXX) + \ No newline at end of file diff --git a/ports/freerdp/openssl_threads.patch b/ports/freerdp/openssl_threads.patch new file mode 100644 index 00000000000000..ca312df4015e4f --- /dev/null +++ b/ports/freerdp/openssl_threads.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 97ba2f9..fc36185 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -907,6 +907,7 @@ if(OPENSSL_FOUND) + add_definitions("-DWITH_OPENSSL") + message(STATUS "Using OpenSSL Version: ${OPENSSL_VERSION}") + include_directories(${OPENSSL_INCLUDE_DIR}) ++ list(APPEND OPENSSL_LIBRARIES Threads::Threads) + endif() + + if(MBEDTLS_FOUND) diff --git a/ports/freerdp/portfile.cmake b/ports/freerdp/portfile.cmake index ca42af8a0980c5..3bce91d81f570a 100644 --- a/ports/freerdp/portfile.cmake +++ b/ports/freerdp/portfile.cmake @@ -1,15 +1,26 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO FreeRDP/FreeRDP - REF 2.0.0-rc4 - SHA512 b4a4d4a58d09010bc45fb90cca148dc4421a4cf0cd5caf288aa702212ef081f14fc418b91f1b79ec8631f582c9ebcdd3031d3333b6a892adb29c402492abb649 + REF 647a48dfa7b19ef6bbfa68a69b5d87717541ef21 #2.4.0 + SHA512 c72072df6f2b3ebc1b632f2e3b40bdcc732e25e7c4ef97b93bc5c5351566b553f682b615e6383ac7c5a1b5ecf8ed0fa9a305ea8c904031d4c78d7c3179323032 HEAD_REF master PATCHES DontInstallSystemRuntimeLibs.patch + fix-linux-build.patch + openssl_threads.patch + fix-include-path.patch + fix-libusb.patch ) +if (NOT VCPKG_TARGET_IS_WINDOWS) + message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libxfixes-dev\n") +endif() +set(FREERDP_WITH_CLIENT) +if (VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX) + set(FREERDP_WITH_CLIENT -DWITH_CLIENT=OFF) +endif() + +set(FREERDP_CRT_LINKAGE) if(VCPKG_CRT_LINKAGE STREQUAL "static") set(FREERDP_CRT_LINKAGE -DMSVC_RUNTIME=static) endif() @@ -19,11 +30,18 @@ file(WRITE "${SOURCE_PATH}/.source_version" "${SOURCE_VERSION}-vcpkg") file(REMOVE ${SOURCE_PATH}/cmake/FindOpenSSL.cmake) # Remove outdated Module +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + urbdrc CHANNEL_URBDRC +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS ${FREERDP_CRT_LINKAGE} + ${FREERDP_WITH_CLIENT} + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -41,16 +59,23 @@ endif() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(RENAME "${CURRENT_PACKAGES_DIR}/lib/freerdp-client2.dll" "${CURRENT_PACKAGES_DIR}/bin/freerdp-client2.dll") - file(RENAME "${CURRENT_PACKAGES_DIR}/lib/freerdp2.dll" "${CURRENT_PACKAGES_DIR}/bin/freerdp2.dll") - file(RENAME "${CURRENT_PACKAGES_DIR}/lib/winpr-tools2.dll" "${CURRENT_PACKAGES_DIR}/bin/winpr-tools2.dll") - file(RENAME "${CURRENT_PACKAGES_DIR}/lib/winpr2.dll" "${CURRENT_PACKAGES_DIR}/bin/winpr2.dll") - - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/freerdp-client2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/freerdp-client2.dll") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/freerdp2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/freerdp2.dll") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/winpr-tools2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/winpr-tools2.dll") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/winpr2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/winpr2.dll") + file(GLOB_RECURSE FREERDP_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") + foreach(FREERDP_DLL ${FREERDP_DLLS}) + file(COPY ${FREERDP_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${FREERDP_DLL}) + endforeach() + + file(GLOB_RECURSE FREERDP_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") + foreach(FREERDP_DLL ${FREERDP_DLLS}) + file(COPY ${FREERDP_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${FREERDP_DLL}) + endforeach() else() + file(GLOB_RECURSE FREERDP_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*") + foreach(FREERDP_TOOL ${FREERDP_TOOLS}) + file(COPY ${FREERDP_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${FREERDP_TOOL}) + endforeach() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() @@ -61,14 +86,55 @@ foreach(PACKAGE FreeRDP-Client2 FreeRDP2 WinPR2) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE} ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE}_temp/${PACKAGE}) endforeach() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP-Client2_temp/FreeRDP-Client2 TARGET_PATH share/freerdp-client) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WinPR2_temp/WinPR2 TARGET_PATH share/winpr) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP-Client2_temp/FreeRDP-Client2 TARGET_PATH share/FreeRDP-Client) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2 TARGET_PATH share/FreeRDP) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WinPR2_temp/WinPR2 TARGET_PATH share/WinPR) + +vcpkg_fixup_pkgconfig(SKIP_CHECK) + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-debug.cmake + "debug/lib/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-debug.cmake + "debug/lib/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-release.cmake + "lib/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-release.cmake + "lib/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP/FreeRDPTargets-debug.cmake + "debug/lib/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP/FreeRDPTargets-release.cmake + "lib/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP-Client/FreeRDP-ClientTargets-debug.cmake + "debug/lib/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP-Client/FreeRDP-ClientTargets-release.cmake + "lib/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(GLOB OBJS ${CURRENT_PACKAGES_DIR}/debug/*.lib) + file(REMOVE ${OBJS}) + file(GLOB OBJS ${CURRENT_PACKAGES_DIR}/*.lib) + file(REMOVE ${OBJS}) +endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/freerdp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/freerdp/LICENSE ${CURRENT_PACKAGES_DIR}/share/freerdp/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/freerdp/vcpkg.json b/ports/freerdp/vcpkg.json new file mode 100644 index 00000000000000..7186615cda4255 --- /dev/null +++ b/ports/freerdp/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "freerdp", + "version-semver": "2.4.0", + "description": "A free implementation of the Remote Desktop Protocol (RDP)", + "homepage": "https://github.com/FreeRDP/FreeRDP", + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "glib", + "platform": "!windows" + }, + "openssl" + ], + "features": { + "urbdrc": { + "description": "USB redirection channel support", + "dependencies": [ + "libusb" + ] + } + } +} diff --git a/ports/freetds/CONTROL b/ports/freetds/CONTROL deleted file mode 100644 index 4a7a008bb5d986..00000000000000 --- a/ports/freetds/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: freetds -Version: 1.1.6 -Description: Implementation of the Tabular Data Stream protocol -Default-Features: openssl - -Feature: openssl -Build-Depends: openssl -Description: OpenSSL support diff --git a/ports/freetds/portfile.cmake b/ports/freetds/portfile.cmake index 65b8afde4c4f92..c3f0b5f948e05a 100644 --- a/ports/freetds/portfile.cmake +++ b/ports/freetds/portfile.cmake @@ -1,30 +1,37 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# +vcpkg_fail_port_install(ON_TARGET "uwp" "linux" "osx") -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetds-1.1.6) -vcpkg_download_distfile(ARCHIVE - URLS "https://www.freetds.org/files/stable/freetds-1.1.6.tar.bz2" - FILENAME "freetds-1.1.6.tar.bz2" - SHA512 160c8638302fd36a3f42d031dbd58525cde899b64d320f6187ce5865ea2c049a1af63be419623e4cd18ccf229dd2ee7ec509bc5721c3371de0f31710dad7470d +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO freetds/freetds + REF 16f7a6280c7a19bfe5c60e5d61cc08e3f2dff991 # See https://github.com/microsoft/vcpkg/pull/14120#issuecomment-715896755 + HEAD_REF master + SHA512 34ff10764156bac24444a74b636fafa56adc0097a62a3f3249d4bc09a0cdcaa88aa0c4f26761260c56dd47edf738ff68f647e045f32cac28e0be7f6760f7f90b ) -vcpkg_extract_source_archive(${ARCHIVE}) -set(BUILD_freetds_openssl OFF) -if("openssl" IN_LIST FEATURES) - set(BUILD_freetds_openssl ON) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openssl WITH_OPENSSL +) + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_PATH}) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_find_acquire_program(GPERF) + get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) + vcpkg_add_to_path(${GPERF_PATH}) +else() + if (NOT EXISTS /usr/bin/gperf) + message(FATAL_ERROR "freetds requires gperf, these can be installed on Ubuntu systems via apt-get install gperf.") + endif() endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DWITH_OPENSSL=${BUILD_freetds_openssl} + DISABLE_PARALLEL_CONFIGURE + OPTIONS ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -64,6 +71,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetds) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/freetds/COPYING ${CURRENT_PACKAGES_DIR}/share/freetds/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/freetds/vcpkg.json b/ports/freetds/vcpkg.json new file mode 100644 index 00000000000000..b653876fcb2600 --- /dev/null +++ b/ports/freetds/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "freetds", + "version-string": "1.2.11", + "port-version": 1, + "description": "Implementation of the Tabular Data Stream protocol", + "homepage": "https://www.freetds.org", + "supports": "windows & !uwp", + "default-features": [ + "openssl" + ], + "features": { + "openssl": { + "description": "OpenSSL support", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/freetype-gl/0001-Use-external-Glew-and-Freetype.patch b/ports/freetype-gl/0001-Use-external-Glew-and-Freetype.patch deleted file mode 100644 index 6c33f9e0e5cd73..00000000000000 --- a/ports/freetype-gl/0001-Use-external-Glew-and-Freetype.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 653dae652bac66e4e96a94ba8ebfabb2227738b7 Mon Sep 17 00:00:00 2001 -From: Daniel Olivier -Date: Thu, 19 Oct 2017 21:26:09 -0400 -Subject: [PATCH] Use external Glew and Freetype - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4eb55e9..2546de6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -74,13 +74,6 @@ if(NOT HAVE_M_PI) - endif() - endif() - --if(NOT MINGW AND (WIN32 OR WIN64)) -- set(GLEW_ROOT_DIR -- ${CMAKE_CURRENT_SOURCE_DIR}/windows/glew) -- set(ENV{FREETYPE_DIR} -- ${CMAKE_CURRENT_SOURCE_DIR}/windows/freetype) --endif() -- - find_package(OpenGL REQUIRED) - find_package(Freetype REQUIRED) - \ No newline at end of file diff --git a/ports/freetype-gl/CONTROL b/ports/freetype-gl/CONTROL deleted file mode 100644 index 57af93cbc74bd0..00000000000000 --- a/ports/freetype-gl/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: freetype-gl -Version: 2019-03-29-1 -Homepage: https://github.com/rougier/freetype-gl -Description: OpenGL text using one vertex buffer, one texture and FreeType -Build-Depends: glew, freetype diff --git a/ports/freetype-gl/glew.patch b/ports/freetype-gl/glew.patch new file mode 100644 index 00000000000000..01b7f616d9c940 --- /dev/null +++ b/ports/freetype-gl/glew.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1c2e89fba..9e2d112c4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,7 +92,7 @@ include_directories( + ${OPENGL_INCLUDE_DIRS} + ${FREETYPE_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} +- ${GLEW_INCLUDE_PATH} ++ ${GLEW_INCLUDE_DIRS} + ) + + if(MSVC) diff --git a/ports/freetype-gl/portfile.cmake b/ports/freetype-gl/portfile.cmake index c23a21da9d895d..59815437b4cf9d 100644 --- a/ports/freetype-gl/portfile.cmake +++ b/ports/freetype-gl/portfile.cmake @@ -1,14 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rougier/freetype-gl - REF a91a3dda326ceaf66b7279bf64ba07014d3f81b8 - SHA512 8e04573dfb400e14e2c1d3a2cd851a66f8218ccfdaa4f701ed9369d7f040d7028582e72af9b236af42d9d3c6c128014670e8ae0261c6f4770affd1aea1454b1e + REF 1a8c007f3fe7b1441f9e5616bc23d7455f4b07dd # accessed on 2020-09-14 + SHA512 ce858b5d5e892162daf6f5bff3476938e15cb9f04adbf2dc2b4c538bfda56b023278b3acb62940a9388c46b89edfd22c9c1c99891f8fcf9d926ffedb8af2b38e HEAD_REF master - PATCHES 0001-Use-external-Glew-and-Freetype.patch + PATCHES glew.patch ) # make sure that no "internal" libraries are used by removing them @@ -40,15 +38,16 @@ file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/freetyp # LIB file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" ) file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" ) + file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) diff --git a/ports/freetype-gl/vcpkg.json b/ports/freetype-gl/vcpkg.json new file mode 100644 index 00000000000000..6ac62331cbd916 --- /dev/null +++ b/ports/freetype-gl/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "freetype-gl", + "version-string": "2020-09-14", + "port-version": 1, + "description": "OpenGL text using one vertex buffer, one texture and FreeType", + "homepage": "https://github.com/rougier/freetype-gl", + "dependencies": [ + "freetype", + "glew" + ] +} diff --git a/ports/freetype/0001-Fix-install-command.patch b/ports/freetype/0001-Fix-install-command.patch deleted file mode 100644 index feee3aefa57e69..00000000000000 --- a/ports/freetype/0001-Fix-install-command.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ad8ded0..32324d6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -407,6 +407,7 @@ endif () - include(GNUInstallDirs) - - if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) -+ if(UNIX) - install( - # Note the trailing slash in the argument to `DIRECTORY'! - DIRECTORY ${PROJECT_SOURCE_DIR}/include/ -@@ -420,6 +421,19 @@ if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) - ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config - COMPONENT headers) -+ else() -+ install( -+ # Note the trailing slash in the argument to `DIRECTORY'! -+ DIRECTORY ${PROJECT_SOURCE_DIR}/include/ -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2 -+ COMPONENT headers -+ PATTERN "internal" EXCLUDE -+ PATTERN "ftoption.h" EXCLUDE) -+ install( -+ FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config -+ COMPONENT headers) -+ endif() - endif () - - if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) diff --git a/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch b/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch deleted file mode 100644 index 65f9631ca10c66..00000000000000 --- a/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a418c44..db48e9f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -156,6 +156,8 @@ option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF) - option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF) - option(FT_WITH_HARFBUZZ "Improve auto-hinting of OpenType fonts." OFF) - -+# vcpkg config install path -+option(CONFIG_INSTALL_PATH "location to install cmake config files" lib/cmake/freetype) - - # Disallow in-source builds - if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") -@@ -488,7 +490,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - COMPONENT libraries) - install( - EXPORT freetype-targets -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype -+ DESTINATION ${CONFIG_INSTALL_PATH} - FILE freetype-config.cmake - COMPONENT headers) - endif () diff --git a/ports/freetype/0005-Fix-DLL-EXPORTS.patch b/ports/freetype/0005-Fix-DLL-EXPORTS.patch deleted file mode 100644 index 7ea02bbedc7d3f..00000000000000 --- a/ports/freetype/0005-Fix-DLL-EXPORTS.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ede5daf..46c1e55 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -151,6 +151,9 @@ set(LIBRARY_SOVERSION "6") - # optionally found anyway. Use `-DCMAKE_DISABLE_FIND_PACKAGE_x=TRUE` to disable - # searching for a packge entirely (x is the CMake package name, so "BZip2" - # instead of "BZIP2"). -+if (ENABLE_DLL_EXPORT) -+ ADD_DEFINITIONS(-DDLL_EXPORT) -+endif() - option(FT_WITH_ZLIB "Use system zlib instead of internal library." OFF) - option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF) - option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF) diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL deleted file mode 100644 index 20d4bb93c614bd..00000000000000 --- a/ports/freetype/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: freetype -Version: 2.10.1-1 -Build-Depends: zlib, bzip2, libpng -Homepage: https://www.freetype.org/ -Description: A library to render fonts. diff --git a/ports/freetype/brotli-static.patch b/ports/freetype/brotli-static.patch new file mode 100644 index 00000000000000..8ef7fd5e3b3c8a --- /dev/null +++ b/ports/freetype/brotli-static.patch @@ -0,0 +1,24 @@ +diff --git a/builds/cmake/FindBrotliDec.cmake b/builds/cmake/FindBrotliDec.cmake +index 46356b1fd..ed4cc2409 100644 +--- a/builds/cmake/FindBrotliDec.cmake ++++ b/builds/cmake/FindBrotliDec.cmake +@@ -35,10 +35,18 @@ find_path(BROTLIDEC_INCLUDE_DIRS + PATH_SUFFIXES brotli) + + find_library(BROTLIDEC_LIBRARIES +- NAMES brotlidec ++ NAMES brotlidec brotlidec-static + HINTS ${PC_BROTLIDEC_LIBDIR} + ${PC_BROTLIDEC_LIBRARY_DIRS}) + ++find_library(BROTLICOMMON_LIBRARIES ++ NAMES brotlicommon-static ++ HINTS ${PC_BROTLIDEC_LIBDIR} ++ ${PC_BROTLIDEC_LIBRARY_DIRS}) ++ ++if(BROTLICOMMON_LIBRARIES) ++ set(BROTLIDEC_LIBRARIES ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES}) ++endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args( diff --git a/ports/freetype/fix-bzip2-pc.patch b/ports/freetype/fix-bzip2-pc.patch new file mode 100644 index 00000000000000..dac43924c07e24 --- /dev/null +++ b/ports/freetype/fix-bzip2-pc.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cb1b9a0f2..53d0bfc68 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -503,7 +503,7 @@ endif () + if (BZIP2_FOUND) + target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES}) + target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS +- list(APPEND PKG_CONFIG_LIBS_PRIVATE "-lbz2") ++ list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "bzip2") + endif () + if (PNG_FOUND) + target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES}) diff --git a/ports/freetype/fix-exports.patch b/ports/freetype/fix-exports.patch new file mode 100644 index 00000000000000..44dea78010d1f0 --- /dev/null +++ b/ports/freetype/fix-exports.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cb1b9a0f2..edca5d579 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -496,7 +496,7 @@ set(PKG_CONFIG_REQUIRED_PRIVATE "") + set(PKG_CONFIG_LIBS_PRIVATE "") + + if (ZLIB_FOUND) +- target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES}) ++ target_link_libraries(freetype PRIVATE ZLIB::ZLIB) + target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS}) + list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "zlib") + endif () +@@ -596,12 +596,25 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) + install( + EXPORT freetype-targets + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype +- FILE freetype-config.cmake + COMPONENT headers) + install( + FILES ${PROJECT_BINARY_DIR}/freetype-config-version.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype + COMPONENT headers) ++ ++ if(ZLIB_FOUND) ++ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/freetype-config.cmake" ++[[include(CMakeFindDependencyMacro) ++find_dependency(ZLIB) ++include("${CMAKE_CURRENT_LIST_DIR}/freetype-targets.cmake") ++]]) ++ else() ++ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/freetype-config.cmake" ++[[include("${CMAKE_CURRENT_LIST_DIR}/freetype-targets.cmake") ++]]) ++ endif() ++ ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freetype-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype) + endif () + + diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index d1822481f2140d..bac143343e2c20 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -1,83 +1,101 @@ -include(vcpkg_common_functions) +set(FT_VERSION 2.11.0) -set(FT_VERSION 2.10.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.xz" "https://downloads.sourceforge.net/project/freetype/freetype2/${FT_VERSION}/freetype-${FT_VERSION}.tar.xz" - FILENAME "freetype-${FT_VERSION}.tar.xz" - SHA512 c7a565b0ab3dce81927008a6965d5c7540f0dc973fcefdc1677c2e65add8668b4701c2958d25593cb41f706f4488765365d40b93da71dbfa72907394f28b2650 +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO freetype/freetype2 + REF ${FT_VERSION} + FILENAME freetype-${FT_VERSION}.tar.xz + SHA512 bf1991f3c382832586be1d21ae73c20840ee8546807ba60d0eb0215134545656c0c8de488f27357d4a4f6497d7cb540998cda98ec59061a3e640036fb209147d + PATCHES + 0003-Fix-UWP.patch + fix-bzip2-pc.patch # we have a bzip2 file that we can use - https://gitlab.freedesktop.org/freetype/freetype/-/commit/b2aeca5fda870751f3c9d645e0dca4c80fa1ae5a + brotli-static.patch + fix-exports.patch ) -vcpkg_extract_source_archive_ex( -OUT_SOURCE_PATH SOURCE_PATH -ARCHIVE ${ARCHIVE} -REF ${FT_VERSION} -PATCHES - 0001-Fix-install-command.patch - 0002-Add-CONFIG_INSTALL_PATH-option.patch - 0003-Fix-UWP.patch - 0005-Fix-DLL-EXPORTS.patch +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + zlib FT_WITH_ZLIB + bzip2 FT_WITH_BZIP2 + png FT_WITH_PNG + brotli FT_WITH_BROTLI + INVERTED_FEATURES + zlib CMAKE_DISABLE_FIND_PACKAGE_ZLIB + bzip2 CMAKE_DISABLE_FIND_PACKAGE_BZip2 + png CMAKE_DISABLE_FIND_PACKAGE_PNG + brotli CMAKE_DISABLE_FIND_PACKAGE_BrotliDec ) - -if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") - set(ENABLE_DLL_EXPORT OFF) -else() - set(ENABLE_DLL_EXPORT ON) -endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DCONFIG_INSTALL_PATH=share/freetype - -DFT_WITH_ZLIB=ON - -DFT_WITH_BZIP2=ON - -DFT_WITH_PNG=ON - -DFT_WITH_HARFBUZZ=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE - -DENABLE_DLL_EXPORT=${ENABLE_DLL_EXPORT} + -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=ON + ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/freetype) +# Rename for easy usage (VS integration; CMake and autotools will not care) file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/freetype ${CURRENT_PACKAGES_DIR}/include/freetype) file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/ft2build.h ${CURRENT_PACKAGES_DIR}/include/ft2build.h) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/freetype2) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config-debug.cmake DEBUG_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") - string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" DEBUG_MODULE "${DEBUG_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-debug.cmake "${DEBUG_MODULE}") -endif() +# Fix the include dir [freetype2 -> freetype] +file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-targets.cmake CONFIG_MODULE) +string(REPLACE "\${_IMPORT_PREFIX}/include/freetype2" "\${_IMPORT_PREFIX}/include" CONFIG_MODULE "${CONFIG_MODULE}") +string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlicommon-static.lib" [[\$<\$>:${_IMPORT_PREFIX}/lib/brotlicommon-static.lib>;\$<\$:${_IMPORT_PREFIX}/debug/lib/brotlicommon-static.lib>]] CONFIG_MODULE "${CONFIG_MODULE}") +string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec-static.lib" [[\$<\$>:${_IMPORT_PREFIX}/lib/brotlidec-static.lib>;\$<\$:${_IMPORT_PREFIX}/debug/lib/brotlidec-static.lib>]] CONFIG_MODULE "${CONFIG_MODULE}") +string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}") +string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-targets.cmake "${CONFIG_MODULE}") -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake RELEASE_MODULE) - string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" RELEASE_MODULE "${RELEASE_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake "${RELEASE_MODULE}") +find_library(FREETYPE_DEBUG NAMES freetyped PATHS "${CURRENT_PACKAGES_DIR}/debug/lib/" NO_DEFAULT_PATH) +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc") + file(READ "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc" _contents) + if(FREETYPE_DEBUG) + string(REPLACE "-lfreetype" "-lfreetyped" _contents "${_contents}") + endif() + string(REPLACE "-I\${includedir}/freetype2" "-I\${includedir}" _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc" "${_contents}") endif() - -# Fix the include dir [freetype2 -> freetype] -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config.cmake CONFIG_MODULE) -else() #if(VCPKG_BUILD_TYPE STREQUAL "release") - file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake CONFIG_MODULE) +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc") + file(READ "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc" _contents) + string(REPLACE "-I\${includedir}/freetype2" "-I\${includedir}" _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc" "${_contents}") endif() -string(REPLACE "\${_IMPORT_PREFIX}/include/freetype2" "\${_IMPORT_PREFIX}/include;\${_IMPORT_PREFIX}/include/freetype" CONFIG_MODULE "${CONFIG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake "${CONFIG_MODULE}") +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if("zlib" IN_LIST FEATURES) + set(USE_ZLIB ON) + endif() + + if("bzip2" IN_LIST FEATURES) + set(USE_BZIP2 ON) + endif() + + if("png" IN_LIST FEATURES) + set(USE_PNG ON) + endif() + + if("brotli" IN_LIST FEATURES) + set(USE_BROTLI ON) + endif() + + configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +endif() + file(COPY - ${SOURCE_PATH}/docs/LICENSE.TXT ${SOURCE_PATH}/docs/FTL.TXT ${SOURCE_PATH}/docs/GPLv2.TXT - ${CMAKE_CURRENT_LIST_DIR}/usage - DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} ) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/freetype/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/freetype/copyright) -vcpkg_copy_pdbs() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype) -endif() +file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/freetype/usage b/ports/freetype/usage deleted file mode 100644 index 458a9dd88f1348..00000000000000 --- a/ports/freetype/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package freetype is compatible with built-in CMake targets: - - find_package(Freetype REQUIRED) - target_link_libraries(main PRIVATE Freetype::Freetype) diff --git a/ports/freetype/vcpkg-cmake-wrapper.cmake b/ports/freetype/vcpkg-cmake-wrapper.cmake index c08499f2d3da75..2f4656bf143995 100644 --- a/ports/freetype/vcpkg-cmake-wrapper.cmake +++ b/ports/freetype/vcpkg-cmake-wrapper.cmake @@ -1,10 +1,65 @@ _find_package(${ARGS}) -find_package(ZLIB) -find_package(PNG) -find_package(BZip2) + +if(@USE_ZLIB@) + find_package(ZLIB) +endif() + +if(@USE_BZIP2@) + find_package(BZip2) +endif() + +if(@USE_PNG@) + find_package(PNG) +endif() + +if(@USE_BROTLI@) + find_library(BROTLIDEC_LIBRARY_RELEASE NAMES brotlidec brotlidec-static PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) + find_library(BROTLIDEC_LIBRARY_DEBUG NAMES brotlidec brotlidec-static brotlidecd brotlidec-staticd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) + find_library(BROTLICOMMON_LIBRARY_RELEASE NAMES brotlicommon brotlicommon-static PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) + find_library(BROTLICOMMON_LIBRARY_DEBUG NAMES brotlicommon brotlicommon-static brotlicommond brotlicommon-staticd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) + include(SelectLibraryConfigurations) + select_library_configurations(BROTLIDEC) + select_library_configurations(BROTLICOMMON) +endif(@USE_BROTLI@) + if(TARGET Freetype::Freetype) - set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2 PNG::PNG ZLIB::ZLIB) + if(@USE_ZLIB@) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) + endif() + + if(@USE_BZIP2@) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2) + endif() + + if(@USE_PNG@) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES PNG::PNG) + endif() + if(@USE_BROTLI@) + if(BROTLIDEC_LIBRARY_DEBUG) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<$:${BROTLIDEC_LIBRARY_DEBUG}>) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<$:${BROTLICOMMON_LIBRARY_DEBUG}>) + endif() + if(BROTLIDEC_LIBRARY_RELEASE) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<$>:${BROTLIDEC_LIBRARY_RELEASE}>) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<$>:${BROTLICOMMON_LIBRARY_RELEASE}>) + endif() + endif() endif() + if(FREETYPE_LIBRARIES) - list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) + if(@USE_ZLIB@) + list(APPEND FREETYPE_LIBRARIES ${ZLIB_LIBRARIES}) + endif() + + if(@USE_BZIP2@) + list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES}) + endif() + + if(@USE_PNG@) + list(APPEND FREETYPE_LIBRARIES ${PNG_LIBRARIES}) + endif() + + if(@USE_BROTLI@) + list(APPEND FREETYPE_LIBRARIES ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES}) + endif() endif() diff --git a/ports/freetype/vcpkg.json b/ports/freetype/vcpkg.json new file mode 100644 index 00000000000000..137163537ab7a6 --- /dev/null +++ b/ports/freetype/vcpkg.json @@ -0,0 +1,48 @@ +{ + "name": "freetype", + "version-semver": "2.11.0", + "description": "A library to render fonts.", + "homepage": "https://www.freetype.org/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "brotli", + "bzip2", + "png", + "zlib" + ], + "features": { + "brotli": { + "description": "Support decompression of WOFF2 streams", + "dependencies": [ + "brotli" + ] + }, + "bzip2": { + "description": "Support bzip2 compressed fonts.", + "dependencies": [ + "bzip2" + ] + }, + "png": { + "description": "Support PNG compressed OpenType embedded bitmaps.", + "dependencies": [ + "libpng" + ] + }, + "zlib": { + "description": "Use zlib instead of internal library for DEFLATE", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/freexl/CONTROL b/ports/freexl/CONTROL deleted file mode 100644 index dc4ec446ad00b2..00000000000000 --- a/ports/freexl/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: freexl -Version: 1.0.4-2 -Homepage: https://www.gaia-gis.it/gaia-sins/freexl-sources -Description: FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet -Build-Depends: libiconv - diff --git a/ports/freexl/fix-pc-file.patch b/ports/freexl/fix-pc-file.patch new file mode 100644 index 00000000000000..5a429026de0010 --- /dev/null +++ b/ports/freexl/fix-pc-file.patch @@ -0,0 +1,26 @@ +diff --git a/configure.ac b/configure.ac +index a44dbf4..55bd768 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -64,9 +64,11 @@ AC_CONFIG_FILES([Makefile \ + AC_CHECK_HEADERS(iconv.h,, [AC_MSG_ERROR([cannot find iconv.h, bailing out])]) + # on some systems "iconv()" lives in libc. On others it lives in libiconv + # on older systems "libiconv()" lives in libiconv ++SAVED_LIBS="${LIBS}" + AC_SEARCH_LIBS(iconv,iconv,, + AC_SEARCH_LIBS(libiconv,iconv,,AC_MSG_ERROR(['libiconv' is required but it doesn't seem to be installed on this system.]),)) + AC_SEARCH_LIBS(locale_charset,charset,, + AC_SEARCH_LIBS(nl_langinfo,c,,AC_MSG_ERROR(['libcharset' is required but it doesn't seem to be installed on this system.]),)) ++AC_SUBST(ICONV_LIBS, "${LIBS%${SAVED_LIBS}}") + + AC_OUTPUT + +diff --git a/freexl.pc.in b/freexl.pc.in +index 5813e68..8fc671d 100644 +--- a/freexl.pc.in ++++ b/freexl.pc.in +@@ -10,3 +10,4 @@ Description: a simple library extracting data from .xls (Excel BIFF) files + Version: @VERSION@ + Libs: -L${libdir} -lfreexl -lm + Cflags: -I${includedir} ++Libs.private: @ICONV_LIBS@ diff --git a/ports/freexl/portfile.cmake b/ports/freexl/portfile.cmake index e770d61f1dfae1..12834382f8a214 100644 --- a/ports/freexl/portfile.cmake +++ b/ports/freexl/portfile.cmake @@ -1,180 +1,70 @@ -include(vcpkg_common_functions) set(FREEXL_VERSION_STR "1.0.4") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freexl-${FREEXL_VERSION_STR}) + vcpkg_download_distfile(ARCHIVE URLS "http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-${FREEXL_VERSION_STR}.tar.gz" FILENAME "freexl-${FREEXL_VERSION_STR}.tar.gz" SHA512 d72561f7b82e0281cb211fbf249e5e45411a7cdd009cfb58da3696f0a0341ea7df210883bfde794be28738486aeb4ffc67ec2c98fd2acde5280e246e204ce788 ) -if (CMAKE_HOST_WIN32) - vcpkg_extract_source_archive(${ARCHIVE}) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-sources.patch - ) - find_program(NMAKE nmake) - - set(LIBS_ALL_DBG - "\"${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib\" \ - \"${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib\"" - ) - set(LIBS_ALL_REL - "\"${CURRENT_INSTALLED_DIR}/lib/libiconv.lib\" \ - \"${CURRENT_INSTALLED_DIR}/lib/libcharset.lib\"" - ) +vcpkg_extract_source_archive_ex( + ARCHIVE "${ARCHIVE}" + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + fix-makefiles.patch + fix-sources.patch + fix-pc-file.patch +) - if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(CL_FLAGS_DBG "/MDd /Zi") - set(CL_FLAGS_REL "/MD /Ox") - else() - set(CL_FLAGS_DBG "/MTd /Zi") - set(CL_FLAGS_REL "/MT /Ox") - endif() - - - ################ - # Debug build - ################ - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(LIBS_ALL_DBG + "\"${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib\" \ + \"${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib\"" ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - vcpkg_copy_pdbs() - endif() - - ################ - # Release build - ################ - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Building ${TARGET_TRIPLET}-rel") - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-release + set(LIBS_ALL_REL + "\"${CURRENT_INSTALLED_DIR}/lib/iconv.lib\" \ + \"${CURRENT_INSTALLED_DIR}/lib/charset.lib\"" ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") - endif() - - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl RENAME copyright) - - if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib) - else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) - endif() - endif() - -elseif (CMAKE_HOST_UNIX OR CMAKE_HOST_APPLE) # Build in UNIX - - # Check build system first - find_program(MAKE make) - if (NOT MAKE) - message(FATAL_ERROR "MAKE not found") - endif() - - # CI error logs appear to indicate that it doesn't like ./configure in the same source dir - # so extract the source into separate debug/release source directories - set(SOURCE_ROOT_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug) - set(SOURCE_ROOT_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release) - set(SOURCE_PATH_DEBUG ${SOURCE_ROOT_DEBUG}/freexl-${FREEXL_VERSION_STR}) - set(SOURCE_PATH_RELEASE ${SOURCE_ROOT_RELEASE}/freexl-${FREEXL_VERSION_STR}) - - file(REMOVE_RECURSE ${SOURCE_ROOT_DEBUG}) - file(REMOVE_RECURSE ${SOURCE_ROOT_RELEASE}) - - vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_ROOT_DEBUG}) - vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_ROOT_RELEASE}) - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - ################ - # Release build - ################ - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release) - file(MAKE_DIRECTORY ${OUT_PATH_RELEASE}) - vcpkg_execute_required_process( - COMMAND "${SOURCE_PATH_RELEASE}/configure" --prefix=${OUT_PATH_RELEASE} "${FREEXL_CONFIGURE_ARGS_REL}" - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME config-${TARGET_TRIPLET}-rel - ) - - message(STATUS "Building ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND make - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME make-build-${TARGET_TRIPLET}-release - ) - - message(STATUS "Installing ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND make install - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME make-install-${TARGET_TRIPLET}-release - ) - - file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) - file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR}) - file(COPY ${SOURCE_PATH_RELEASE}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl) - file(RENAME ${CURRENT_PACKAGES_DIR}/share/freexl/COPYING ${CURRENT_PACKAGES_DIR}/share/freexl/copyright) - message(STATUS "Installing ${TARGET_TRIPLET}-rel done") + + vcpkg_install_nmake( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG + INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}/debug" + INST_DIR="${CURRENT_PACKAGES_DIR}/debug" + "LINK_FLAGS=/debug" + "LIBS_ALL=${LIBS_ALL_DBG}" + OPTIONS_RELEASE + INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" + INST_DIR="${CURRENT_PACKAGES_DIR}" + "LINK_FLAGS=" + "LIBS_ALL=${LIBS_ALL_REL}" + ) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib") + else() + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/freexl.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib" "${CURRENT_PACKAGES_DIR}/lib/freexl.lib") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib") + endif() endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - ################ - # Debug build - ################ - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - set(OUT_PATH_DEBUG ${SOURCE_PATH_DEBUG}/../../make-build-${TARGET_TRIPLET}-debug) - file(MAKE_DIRECTORY ${OUT_PATH_DEBUG}) - vcpkg_execute_required_process( - COMMAND "${SOURCE_PATH_DEBUG}/configure" --prefix=${OUT_PATH_DEBUG} "${FREEXL_CONFIGURE_ARGS_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME config-${TARGET_TRIPLET}-debug - ) - - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND make - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME make-build-${TARGET_TRIPLET}-debug - ) +else() # Build in UNIX - message(STATUS "Installing ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND make install - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME make-install-${TARGET_TRIPLET}-debug - ) - - file(COPY ${OUT_PATH_DEBUG}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) - message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") - endif() + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + ) + vcpkg_install_make() + vcpkg_fixup_pkgconfig() -else()# Other build system - message(FATAL_ERROR "Unsupported build system.") endif() -message(STATUS "Packaging ${TARGET_TRIPLET} done") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/freexl/vcpkg.json b/ports/freexl/vcpkg.json new file mode 100644 index 00000000000000..3a19e577078c0a --- /dev/null +++ b/ports/freexl/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "freexl", + "version-string": "1.0.4", + "port-version": 12, + "description": "FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet", + "homepage": "https://www.gaia-gis.it/gaia-sins/freexl-sources", + "dependencies": [ + "libiconv" + ] +} diff --git a/ports/fribidi/CONTROL b/ports/fribidi/CONTROL deleted file mode 100644 index 098748ee808c04..00000000000000 --- a/ports/fribidi/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: fribidi -Version: 58c6cb3 -Description: GNU FriBidi is an implementation of the Unicode Bidirectional Algorithm (bidi) diff --git a/ports/fribidi/portfile.cmake b/ports/fribidi/portfile.cmake index 5b45a17b164a70..7e71fe68e2ba2c 100644 --- a/ports/fribidi/portfile.cmake +++ b/ports/fribidi/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fribidi/fribidi - REF 58c6cb390a9a18c98b2cbaac555d8ea9352a9e4f - SHA512 1ec9c19faa87886786ce1589e2c66cab173b48e34d0e43487becc8606001f21f6ed17d0abd1c322fbbcaeb96a47ed882cad228be2e9beb019020ca2a475fc298 + REF 5464c284034da9c058269377b7f5013bb089f553 # v1.0.10 + SHA512 82e42b022f23d6ecebac5071f997c9f46db6aa41c36f87a7f1a28a79b4ccaada10d68b233bbf687c552fc94d91f4b47161e0ef4909fd1de0b483089f1d1377f9 HEAD_REF master ) @@ -12,23 +10,22 @@ vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} OPTIONS -Ddocs=false - --backend=ninja + -Dbin=false + -Dtests=false ) vcpkg_install_meson() +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() -file(GLOB EXE_FILES - "${CURRENT_PACKAGES_DIR}/bin/*.exe" - "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe" -) -if (EXE_FILES) - file(REMOVE ${EXE_FILES}) -endif() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +# Define static macro +file(READ ${CURRENT_PACKAGES_DIR}/include/fribidi/fribidi-common.h FRIBIDI_COMMON_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "#ifndef FRIBIDI_LIB_STATIC" "#if 0" FRIBIDI_COMMON_H "${FRIBIDI_COMMON_H}") +else() + string(REPLACE "#ifndef FRIBIDI_LIB_STATIC" "#if 1" FRIBIDI_COMMON_H "${FRIBIDI_COMMON_H}") endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/fribidi/fribidi-common.h "${FRIBIDI_COMMON_H}") # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fribidi RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/fribidi/vcpkg.json b/ports/fribidi/vcpkg.json new file mode 100644 index 00000000000000..130fbe0de0f9cb --- /dev/null +++ b/ports/fribidi/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "fribidi", + "version-string": "1.0.10", + "port-version": 3, + "description": "GNU FriBidi is an implementation of the Unicode Bidirectional Algorithm (bidi)", + "supports": "!(uwp | arm)", + "dependencies": [ + "tool-meson" + ] +} diff --git a/ports/frozen/portfile.cmake b/ports/frozen/portfile.cmake new file mode 100644 index 00000000000000..d3f125b10aeb3a --- /dev/null +++ b/ports/frozen/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO serge-sans-paille/frozen + REF 867b33916044ced463ed42874b2aa1514ef66bec + SHA512 0cace261bf6068a382dc7c2d2b1c7d50de882e966adcdaaee7c358cc2e55b736d41c6ce2cefb30c231f550e4576cfdc5b2a10379a8affa084f1eb9202db7200e + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Dfrozen.benchmark=OFF + -Dfrozen.coverage=OFF + -Dfrozen.installation=ON + -Dfrozen.tests=OFF +) +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/frozen) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/frozen/vcpkg.json b/ports/frozen/vcpkg.json new file mode 100644 index 00000000000000..b10042839725c1 --- /dev/null +++ b/ports/frozen/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "frozen", + "version-date": "2021-04-22", + "description": "Header-only library that provides 0 cost initialization for immutable containers and various algorithms. Frozen provides:immutable (a.k.a. frozen), constexpr-compatible versions of std::set, std::unordered_set, std::map and std::unordered_map and 0-cost initialization version of std::search for frozen needles using Boyer-Moore or Knuth-Morris-Pratt algorithms.", + "homepage": "https://github.com/serge-sans-paille/frozen", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/frugally-deep/portfile.cmake b/ports/frugally-deep/portfile.cmake new file mode 100644 index 00000000000000..1350a728cfe785 --- /dev/null +++ b/ports/frugally-deep/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Dobiasd/frugally-deep + REF v0.15.10-p0 + SHA512 e665df59c83fea5fc0a89158639c83f9c72cba1fc8c61086032db60c395606dab4e9085f1380714e4f8a82c1f2b143aa22ff6212d9180c368283e1965e6dea87 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + double FDEEP_USE_DOUBLE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFDEEP_BUILD_UNITTEST=OFF + -DFDEEP_USE_TOOLCHAIN=ON + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/frugally-deep TARGET_PATH share/${PORT}) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/frugally-deep/vcpkg.json b/ports/frugally-deep/vcpkg.json new file mode 100644 index 00000000000000..8dfe3eca9a2615 --- /dev/null +++ b/ports/frugally-deep/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "frugally-deep", + "version-semver": "0.15.10-p0", + "description": "Header-only library for using Keras models in C++.", + "homepage": "https://github.com/Dobiasd/frugally-deep", + "dependencies": [ + "eigen3", + "fplus", + "nlohmann-json" + ], + "features": { + "double": { + "description": "Use double precision" + } + } +} diff --git a/ports/fruit/CONTROL b/ports/fruit/CONTROL deleted file mode 100644 index 4e7bd9f8dc5dd8..00000000000000 --- a/ports/fruit/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fruit -Version: 3.4.0-1 -Description: Fruit, a dependency injection framework for C++ by Google - diff --git a/ports/fruit/portfile.cmake b/ports/fruit/portfile.cmake index a945e63bdd0c79..8fc652387ed297 100644 --- a/ports/fruit/portfile.cmake +++ b/ports/fruit/portfile.cmake @@ -1,9 +1,9 @@ -include(vcpkg_common_functions) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/fruit - REF v3.4.0 - SHA512 d78c76432c77acc4cc6ccf3fd9627a3fb2a0aa55d1baf7346422e9f1c1e048237d136588b44cfa943b542b43adbbb62fcd524e4a1cb870e9ffe8b7cf4dadb35d + REF 29c9fd265cfa72ee72fb64257fe4b72198d87264 # v3.6.0 + SHA512 1a8f5b126492dd81fe40bbedd0ead839fd25dac6ea569dd51879e288a4c5850c6618754547ac201d82875781ee0490261372df7a0d1cf50e90c3a9b9da9aaed4 HEAD_REF master ) @@ -13,10 +13,11 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DFRUIT_USES_BOOST=False + -DFRUIT_TESTS_USE_PRECOMPILED_HEADERS=OFF ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/fruit/copyright COPYONLY) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fruit/vcpkg.json b/ports/fruit/vcpkg.json new file mode 100644 index 00000000000000..b182643b35a5bb --- /dev/null +++ b/ports/fruit/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fruit", + "version-string": "3.6.0", + "port-version": 1, + "description": "Fruit, a dependency injection framework for C++ by Google", + "homepage": "https://github.com/google/fruit" +} diff --git a/ports/ftgl/01_disable_doxygen.patch b/ports/ftgl/01_disable_doxygen.patch new file mode 100644 index 00000000000000..5443554e7bf63d --- /dev/null +++ b/ports/ftgl/01_disable_doxygen.patch @@ -0,0 +1,30 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 303fcae..718ae88 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,15 +35,16 @@ ENDIF(BUILD_SHARED_LIBS) + + ADD_CUSTOM_TARGET(doc) + +-FIND_PACKAGE(Doxygen) +-IF(DOXYGEN_FOUND) +- ADD_CUSTOM_TARGET(doxygen +- ${DOXYGEN_EXECUTABLE} +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +- COMMENT "Doxygen ...") +- ADD_DEPENDENCIES(doc doxygen) +- +-ENDIF(DOXYGEN_FOUND) ++IF (WIN32) # doxygen only have windows package in vcpkg now. ++ FIND_PACKAGE(Doxygen) ++ IF(DOXYGEN_FOUND) ++ ADD_CUSTOM_TARGET(doxygen ++ ${DOXYGEN_EXECUTABLE} ++ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} ++ COMMENT "Doxygen ...") ++ ADD_DEPENDENCIES(doc doxygen) ++ ENDIF(DOXYGEN_FOUND) ++ENDIF() + + SUBDIRS(src) + diff --git a/ports/ftgl/02_enable-cpp11-std.patch b/ports/ftgl/02_enable-cpp11-std.patch new file mode 100644 index 00000000000000..37ae283afd3fde --- /dev/null +++ b/ports/ftgl/02_enable-cpp11-std.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 718ae88..e53e0da 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,9 @@ + CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + + PROJECT(FTGL) ++set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD_REQUIRED ON) ++ + SET(CMAKE_MODULE_PATH ${FTGL_SOURCE_DIR}) + + SET(VERSION_SERIES 2) diff --git a/ports/ftgl/CONTROL b/ports/ftgl/CONTROL deleted file mode 100644 index b8e652144b490a..00000000000000 --- a/ports/ftgl/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: ftgl -Version: 2.4.0-1 -Description: FTGL is a free open source library to enable developers to use arbitrary fonts in their OpenGL (www.opengl.org) applications. - Unlike other OpenGL font libraries FTGL uses standard font file formats so doesn't need a preprocessing step to convert the high quality font data into a lesser quality, proprietary format. - FTGL uses the Freetype (www.freetype.org) font library to open and 'decode' the fonts. It then takes that output and stores it in a format most efficient for OpenGL rendering. -Build-Depends: freetype, opengl diff --git a/ports/ftgl/portfile.cmake b/ports/ftgl/portfile.cmake index 65df89b20225f4..9208cb086e3fad 100644 --- a/ports/ftgl/portfile.cmake +++ b/ports/ftgl/portfile.cmake @@ -1,25 +1,32 @@ -include(vcpkg_common_functions) -vcpkg_find_acquire_program(DOXYGEN) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO frankheckenbach/ftgl +if (VCPKG_TARGET_IS_WINDOWS) + # doxygen only have windows package in vcpkg now. + vcpkg_find_acquire_program(DOXYGEN) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO frankheckenbach/ftgl REF 483639219095ad080538e07ceb5996de901d4e74 - SHA512 d5bf95db8db6a5c9f710bd274cb9bb82e3e67569e8f3ec55b36e068636a09252e6f191e36d8279e61b5d12408c065ce51829fc38d4d7afe5bda724752d2f084f - HEAD_REF master - PATCHES Fix-headersFilePath.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -vcpkg_test_cmake(PACKAGE_NAME FTGL) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ftgl) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ftgl/COPYING ${CURRENT_PACKAGES_DIR}/share/ftgl/copyright) + SHA512 d5bf95db8db6a5c9f710bd274cb9bb82e3e67569e8f3ec55b36e068636a09252e6f191e36d8279e61b5d12408c065ce51829fc38d4d7afe5bda724752d2f084f + HEAD_REF master + PATCHES + Fix-headersFilePath.patch + 01_disable_doxygen.patch + 02_enable-cpp11-std.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else () + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ftgl/vcpkg.json b/ports/ftgl/vcpkg.json new file mode 100644 index 00000000000000..e40f6f2cc19a30 --- /dev/null +++ b/ports/ftgl/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "ftgl", + "version-string": "2.4.0", + "port-version": 3, + "description": [ + "FTGL is a free open source library to enable developers to use arbitrary fonts in their OpenGL (www.opengl.org) applications.", + "Unlike other OpenGL font libraries FTGL uses standard font file formats so doesn't need a preprocessing step to convert the high quality font data into a lesser quality, proprietary format.", + "FTGL uses the Freetype (www.freetype.org) font library to open and 'decode' the fonts. It then takes that output and stores it in a format most efficient for OpenGL rendering." + ], + "homepage": "https://github.com/frankheckenbach/ftgl", + "dependencies": [ + "freetype", + "opengl" + ] +} diff --git a/ports/ftxui/portfile.cmake b/ports/ftxui/portfile.cmake new file mode 100644 index 00000000000000..bdb21781fc95c0 --- /dev/null +++ b/ports/ftxui/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArthurSonzogni/FTXUI + REF 3d5e4eb6ca11a0827bff68a04f4bf68ca9820e20 + SHA512 670b0e5d95f7e6132ca7115005efdb1dee645146af82566af3e48bfff64d82dbc058c2f524b8b9d1d92182e4835ff6024067f0eab8dd6204514efa0207b3d33c + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DFTXUI_BUILD_EXAMPLES=OFF + -DFTXUI_ENABLE_INSTALL=ON + -DFTXUI_BUILD_TESTS=OFF + -DFTXUI_BUILD_DOCS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ftxui/vcpkg.json b/ports/ftxui/vcpkg.json new file mode 100644 index 00000000000000..34557d19ac9c94 --- /dev/null +++ b/ports/ftxui/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "ftxui", + "version-date": "2021-06-17", + "description": "C++ Functional Terminal User Interface", + "homepage": "https://github.com/ArthurSonzogni/FTXUI", + "license": "MIT", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/function2/disable-testing.patch b/ports/function2/disable-testing.patch new file mode 100644 index 00000000000000..c17403c33f8aac --- /dev/null +++ b/ports/function2/disable-testing.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 684abe0..32a5cf6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -75,7 +75,9 @@ if (FU2_IS_TOP_LEVEL_PROJECT) + install(EXPORT "${PROJECT_NAME}Targets" + NAMESPACE ${PROJECT_NAME}:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") ++endif() + ++if(0) + # Setup CPack for bundling + set(CPACK_GENERATOR "ZIP") + set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) diff --git a/ports/function2/portfile.cmake b/ports/function2/portfile.cmake new file mode 100644 index 00000000000000..f3b06e923e255b --- /dev/null +++ b/ports/function2/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Naios/function2 + REF 02ca99831de59c7c3a4b834789260253cace0ced # 4.2.0 + SHA512 5b14d95584586c7365119f5171c86c7556ce402ae3c5db09e4e54e1225fc71e40f88ab77188986ecf9dac5eecbfd6330c5a7ecfe0375cb37773d007ebef1ba93 + HEAD_REF master + PATCHES + disable-testing.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE ${CURRENT_PACKAGES_DIR}/Readme.md) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Put the installed licence file where vcpkg expects it +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + +vcpkg_copy_pdbs() diff --git a/ports/function2/vcpkg.json b/ports/function2/vcpkg.json new file mode 100644 index 00000000000000..6bea8f2aaa7235 --- /dev/null +++ b/ports/function2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "function2", + "version-string": "4.2.0", + "port-version": 1, + "description": "Improved drop-in replacement to std::function", + "homepage": "https://github.com/Naios/function2" +} diff --git a/ports/functions-framework-cpp/portfile.cmake b/ports/functions-framework-cpp/portfile.cmake new file mode 100644 index 00000000000000..73aff324cba56b --- /dev/null +++ b/ports/functions-framework-cpp/portfile.cmake @@ -0,0 +1,31 @@ +# TODO(coryan) - fix support for DLLs +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GoogleCloudPlatform/functions-framework-cpp + REF v1.0.0 + SHA512 caaf39014cc651f0f929fce60059592ce17dfa67ac3d93104d97b96c7a1e06e85c0945dfdff6169ac5a5193be84631e27b35877a4d5b022a7319f6476efa17be + HEAD_REF main +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/functions-framework-cpp/vcpkg.json b/ports/functions-framework-cpp/vcpkg.json new file mode 100644 index 00000000000000..9a11c01441d6bc --- /dev/null +++ b/ports/functions-framework-cpp/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "functions-framework-cpp", + "version": "1.0.0", + "description": "Functions Framework for C++.", + "homepage": "https://github.com/GoogleCloudPlatform/functions-framework-cpp/", + "license": "Apache-2.0", + "dependencies": [ + "abseil", + "boost-beast", + "boost-program-options", + "boost-serialization", + "nlohmann-json" + ] +} diff --git a/ports/fuzzylite/CONTROL b/ports/fuzzylite/CONTROL deleted file mode 100644 index 4749c14232ee8c..00000000000000 --- a/ports/fuzzylite/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: fuzzylite -Version: 6.0-2 -Homepage: https://github.com/fuzzylite/fuzzylite -Description: A fuzzy logic control library in C++ diff --git a/ports/fuzzylite/portfile.cmake b/ports/fuzzylite/portfile.cmake index c4b70a72fd0e49..cd79ecc7cdbb07 100644 --- a/ports/fuzzylite/portfile.cmake +++ b/ports/fuzzylite/portfile.cmake @@ -1,9 +1,3 @@ -include(vcpkg_common_functions) - -if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fuzzylite/fuzzylite @@ -42,4 +36,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fuzzylite-static-debug.lib ${CURRENT_PACKAGES_DIR}/debug/lib/fuzzylite-debug.lib) endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fuzzylite RENAME copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fl/fuzzylite.h + "#elif defined(FL_IMPORT_LIBRARY)" + "#elif 1" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/fuzzylite/vcpkg.json b/ports/fuzzylite/vcpkg.json new file mode 100644 index 00000000000000..2bddccc38c22ce --- /dev/null +++ b/ports/fuzzylite/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "fuzzylite", + "version-string": "6.0", + "port-version": 4, + "description": "A fuzzy logic control library in C++", + "homepage": "https://github.com/fuzzylite/fuzzylite" +} diff --git a/ports/fxdiv/portfile.cmake b/ports/fxdiv/portfile.cmake new file mode 100644 index 00000000000000..a62cefcd8e261d --- /dev/null +++ b/ports/fxdiv/portfile.cmake @@ -0,0 +1,18 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Maratyszcza/fxdiv + REF 63058eff77e11aa15bf531df5dd34395ec3017c8 + SHA512 da33eab4d006645f383a1f24fc3e747db3aeb0613219297ec0ae69aa2617f07ba050ebd6a64a8cbde6d25481f176d0ec3b9753a95d1fbcead2136595f3e50e97 +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFXDIV_BUILD_TESTS=OFF + -DFXDIV_BUILD_BENCHMARKS=OFF +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/fxdiv/vcpkg.json b/ports/fxdiv/vcpkg.json new file mode 100644 index 00000000000000..e120815ee41831 --- /dev/null +++ b/ports/fxdiv/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "fxdiv", + "version-string": "2021-02-21", + "description": "C99/C++ header-only library for division via fixed-point multiplication by inverse", + "homepage": "https://github.com/Maratyszcza/FXdiv" +} diff --git a/ports/g2o/CONTROL b/ports/g2o/CONTROL deleted file mode 100644 index 0e6b43f7d0605b..00000000000000 --- a/ports/g2o/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: g2o -Version: 20170730_git-5 -Build-Depends: suitesparse, eigen3, clapack (!osx), ceres -Description: g2o: A General Framework for Graph Optimization -Homepage: https://openslam.org/g2o.html diff --git a/ports/g2o/portfile.cmake b/ports/g2o/portfile.cmake index 312bbc8e8a38fd..010a10ccf255a1 100644 --- a/ports/g2o/portfile.cmake +++ b/ports/g2o/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO RainerKuemmerle/g2o - REF 20170730_git - SHA512 a85e3f79e6a8bd0f81a9a1a7a01227779100d9f4ebd0ae9c03537bbdcc246018f292b53045f027bbe28ecf63b98de2f22f5528c992c93c9790eb6a3a40995903 + REF fcba4eaca6f20d9a5792404cc8ef303aeb8ba5d2 + SHA512 41e5a6d40db10d66182653d56f937f29264bf4f9412dfa651be949caeb055741c9d9ba75a122180892aafe7d45b334d50470284121148c0561e1d49f6ba5e20a HEAD_REF master ) @@ -23,9 +21,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -if(VCPKG_USE_HEAD_VERSION) - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g2o) -endif() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g2o) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(GLOB_RECURSE HEADERS "${CURRENT_PACKAGES_DIR}/include/*") @@ -44,6 +40,4 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/doc/license-bsd.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/g2o/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/g2o/license-bsd.txt ${CURRENT_PACKAGES_DIR}/share/g2o/copyright) +file(INSTALL ${SOURCE_PATH}/doc/license-bsd.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/g2o/vcpkg.json b/ports/g2o/vcpkg.json new file mode 100644 index 00000000000000..b81b5d65c9f8fc --- /dev/null +++ b/ports/g2o/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "g2o", + "version-string": "2020-02-07", + "port-version": 2, + "description": "g2o: A General Framework for Graph Optimization", + "homepage": "https://openslam.org/g2o.html", + "dependencies": [ + "ceres", + "eigen3", + "lapack", + "suitesparse" + ] +} diff --git a/ports/g3log/CONTROL b/ports/g3log/CONTROL deleted file mode 100644 index aeeee688cb4783..00000000000000 --- a/ports/g3log/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: g3log -Version: 2019-07-29 -Description: Asynchronous logger with Dynamic Sinks -Homepage: https://github.com/KjellKod/g3log diff --git a/ports/g3log/portfile.cmake b/ports/g3log/portfile.cmake index f0ae8a23aeda5c..a9dc7c4c44fad9 100644 --- a/ports/g3log/portfile.cmake +++ b/ports/g3log/portfile.cmake @@ -1,10 +1,10 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KjellKod/g3log - REF f1491791785101d4ae948f8ecee7e9cc3e6b0be8 - SHA512 852ed7c9eb2345f02414be7fb7dfbd4be340dcbf8abc4e6ba6327d181cf10e33969279166151b4eeab78b290d3fecbf4a5094696c412f7b2ab815df415652bd8 + REF 2fca06ff6da5c67465b591f4d45e8fd14d531142 #v1.3.4 + SHA512 8dba89e5a08e44d585478470725e25e37486685d8fe4d3cb5e97c81013389c95d96bdde658244e425008169bc8a9fc2d34a065b83b110c62e73d3ccab9b2b9e1 HEAD_REF master ) @@ -12,7 +12,7 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" G3_SHARED_LIB) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" G3_SHARED_RUNTIME) # https://github.com/KjellKod/g3log#prerequisites -set(VERSION "1.3.2-80") +set(VERSION "1.3.4") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -30,12 +30,9 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g3logger TARGET_PATH share/g3logger) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g3log) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME g3logger) diff --git a/ports/g3log/vcpkg.json b/ports/g3log/vcpkg.json new file mode 100644 index 00000000000000..7770e4a22aa786 --- /dev/null +++ b/ports/g3log/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "g3log", + "version": "1.3.4", + "port-version": 1, + "description": "Asynchronous logger with Dynamic Sinks", + "homepage": "https://github.com/KjellKod/g3log", + "supports": "!(arm | uwp)" +} diff --git a/ports/gainput/CONTROL b/ports/gainput/CONTROL deleted file mode 100644 index 65b347dee85215..00000000000000 --- a/ports/gainput/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gainput -Version: 1.0.0-1 -Homepage: https://github.com/jkuhlmann/gainput -Description: Gainput is a multiplatform C++ input library, supporting mouse, keyboard and controllers diff --git a/ports/gainput/install_as_cmake_package.patch b/ports/gainput/install_as_cmake_package.patch new file mode 100644 index 00000000000000..aaee43a2f9d9b7 --- /dev/null +++ b/ports/gainput/install_as_cmake_package.patch @@ -0,0 +1,69 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 14d5e85..cb7232f 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -30,19 +30,27 @@ if (GAINPUT_BUILD_SHARED) + endif (GAINPUT_BUILD_SHARED) + + if (GAINPUT_BUILD_STATIC) +- message(STATUS "..Building shared libraries (-DGAINPUT_BUILD_STATIC=OFF to disable)") ++ message(STATUS "..Building static libraries (-DGAINPUT_BUILD_STATIC=OFF to disable)") + add_library(gainputstatic STATIC ${sources} ${mmsources}) + set_target_properties(gainputstatic PROPERTIES DEBUG_POSTFIX -d FOLDER gainput) + set(install_libs ${install_libs} gainputstatic) + endif (GAINPUT_BUILD_STATIC) + + if(WIN32) +- target_link_libraries(gainput ${XINPUT} ws2_32) +- target_link_libraries(gainputstatic ${XINPUT} ws2_32) ++ if (GAINPUT_BUILD_SHARED) ++ target_link_libraries(gainput ${XINPUT} ws2_32) ++ endif(GAINPUT_BUILD_SHARED) ++ if(GAINPUT_BUILD_STATIC) ++ target_link_libraries(gainputstatic ${XINPUT} ws2_32) ++ endif(GAINPUT_BUILD_STATIC) + add_definitions(-DGAINPUT_LIB_DYNAMIC=1) + elseif(ANDROID) +- target_link_libraries(gainputstatic native_app_glue log android) +- target_link_libraries(gainput native_app_glue log android) ++ if (GAINPUT_BUILD_SHARED) ++ target_link_libraries(gainput native_app_glue log android) ++ endif(GAINPUT_BUILD_SHARED) ++ if(GAINPUT_BUILD_STATIC) ++ target_link_libraries(gainputstatic native_app_glue log android) ++ endif(GAINPUT_BUILD_STATIC) + elseif(APPLE) + find_library(FOUNDATION Foundation) + find_library(IOKIT IOKit) +@@ -65,6 +73,14 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR) + endif(NOT DEFINED CMAKE_INSTALL_LIBDIR) + set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + ++foreach(t ${install_libs}) ++ target_include_directories( ++ ${t} ++ INTERFACE $ ++ $ ++ ) ++endforeach() ++ + install( + DIRECTORY "include/gainput" + DESTINATION "include" +@@ -73,7 +89,15 @@ install( + + install( + TARGETS ${install_libs} ++ EXPORT unofficial-${PROJECT_NAME}-Targets + LIBRARY DESTINATION "${libdir}" + ARCHIVE DESTINATION "${libdir}" + RUNTIME DESTINATION "bin" + ) ++ ++install( ++ EXPORT unofficial-${PROJECT_NAME}-Targets ++ FILE unofficial-${PROJECT_NAME}Config.cmake ++ NAMESPACE unofficial::${PROJECT_NAME}:: ++ DESTINATION share/unofficial-${PROJECT_NAME} ++) +\ No newline at end of file diff --git a/ports/gainput/portfile.cmake b/ports/gainput/portfile.cmake index c1f1f61589b55b..65ded761c2b5b4 100644 --- a/ports/gainput/portfile.cmake +++ b/ports/gainput/portfile.cmake @@ -1,47 +1,37 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gainput-1.0.0) -vcpkg_download_distfile(ARCHIVE - URLS "http://github.com/jkuhlmann/gainput/archive/v1.0.0.zip" - FILENAME "gainput-1.0.0.zip" - SHA512 dab221290560298693f54bebced1da5ec3dfae2d2adbfd6ceb17b5b28dc2a637a49e479d49fe98680915b29beb5dd2d5c74258598233a053230696186593c88e +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jkuhlmann/gainput + REF v1.0.0 + SHA512 56fdc4c0613d7260861885b270ebe9e624e940175f41e3ac82516e2eb0d6d229e405fbcc2e54608e7d6751c1d8658b5b5e186153193badc6487274cb284a8cd6 + HEAD_REF master + PATCHES + "install_as_cmake_package.patch" ) -vcpkg_extract_source_archive(${ARCHIVE}) - +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(GAINPUT_BUILD_SHARED OFF) + set(GAINPUT_BUILD_STATIC ON) +else() + set(GAINPUT_BUILD_SHARED ON) + set(GAINPUT_BUILD_STATIC OFF) +endif() +if(APPLE) + set(GAINPUT_BUILD_SHARED ON) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DGAINPUT_TESTS=OFF - -DGAINPUT_SAMPLES=OFF - # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA + OPTIONS + -DGAINPUT_BUILD_SHARED=${GAINPUT_BUILD_SHARED} + -DGAINPUT_BUILD_STATIC=${GAINPUT_BUILD_STATIC} + -DGAINPUT_TESTS=OFF + -DGAINPUT_SAMPLES=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-gainput TARGET_PATH share/unofficial-gainput) vcpkg_copy_pdbs() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gainput RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gainputstatic.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gainputstatic.lib ${CURRENT_PACKAGES_DIR}/lib/gainput.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gainputstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gainputd.lib) - endif() -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/gainput/vcpkg.json b/ports/gainput/vcpkg.json new file mode 100644 index 00000000000000..85da1c0d174149 --- /dev/null +++ b/ports/gainput/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "gainput", + "version-string": "1.0.0", + "port-version": 4, + "description": "Gainput is a multiplatform C++ input library, supporting mouse, keyboard and controllers", + "homepage": "https://github.com/jkuhlmann/gainput" +} diff --git a/ports/gamedev-framework/portfile.cmake b/ports/gamedev-framework/portfile.cmake new file mode 100644 index 00000000000000..efdd5f2d450d4d --- /dev/null +++ b/ports/gamedev-framework/portfile.cmake @@ -0,0 +1,52 @@ +if (VCPKG_HOST_IS_LINUX) + message(WARNING "gamedev-framework requires gcc version 8.3 or later.") +endif() + +vcpkg_fail_port_install( + ON_ARCH "arm" +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GamedevFramework/gf + HEAD_REF master + REF v0.20.0 + SHA512 57b0e87f8713268d7bd4e68fb65f57715af6617582e3ce342a10a66f2ebfeeacdd11e1df0abbd13a2d1d9e6222def94bcf7b522ef5411043668e4c6f0fea1dd7 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGF_VCPKG=ON + -DGF_USE_EMBEDDED_LIBS=OFF + -DGF_BUILD_GAMES=OFF + -DGF_BUILD_EXAMPLES=OFF + -DGF_BUILD_DOCUMENTATION=OFF + -DGF_SINGLE_COMPILTATION_UNIT=ON + -DBUILD_TESTING=OFF + -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} + OPTIONS_RELEASE -DGF_DEBUG=OFF + OPTIONS_DEBUG -DGF_DEBUG=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gf TARGET_PATH share/gf) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/share/doc" + "${CURRENT_PACKAGES_DIR}/debug/bin/gf_info.exe" + "${CURRENT_PACKAGES_DIR}/bin/gf_info.exe" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gamedev-framework/vcpkg.json b/ports/gamedev-framework/vcpkg.json new file mode 100644 index 00000000000000..fe42c33a4a762c --- /dev/null +++ b/ports/gamedev-framework/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "gamedev-framework", + "version-semver": "0.20.0", + "maintainers": [ + "Julien Bernard ", + "Arthur Hugeat " + ], + "description": "gamedev-framework is a framework to build 2D games in C++17", + "homepage": "https://gamedevframework.github.io/", + "license": "Zlib", + "supports": "!arm", + "dependencies": [ + "boost-algorithm", + "boost-container", + "boost-filesystem", + "boost-heap", + "freetype", + "pugixml", + "sdl2", + "stb", + "zlib" + ] +} diff --git a/ports/gamenetworkingsockets/portfile.cmake b/ports/gamenetworkingsockets/portfile.cmake new file mode 100644 index 00000000000000..c0b2e487d0b197 --- /dev/null +++ b/ports/gamenetworkingsockets/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ValveSoftware/GameNetworkingSockets + REF 9875f39ad3fae8c913daa310c7ff0a7a54b1e6c2 # v1.3.0 + SHA512 edf814ef10a11b67045d90d589a3bd6471fa46bc3f16cf1e83d1806df6bb48306dcda4096a2ff80fee78b24ce36d164cd46808680c9f5f8f546455fce7bf9aa0 + HEAD_REF master +) + +set(CRYPTO_BACKEND OpenSSL) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGAMENETWORKINGSOCKETS_BUILD_TESTS=OFF + -DGAMENETWORKINGSOCKETS_BUILD_EXAMPLES=OFF + -DUSE_CRYPTO=${CRYPTO_BACKEND} + -DUSE_CRYPTO25519=${CRYPTO_BACKEND} +) + +vcpkg_install_cmake() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/GameNetworkingSockets" TARGET_PATH "share/GameNetworkingSockets") +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs() diff --git a/ports/gamenetworkingsockets/vcpkg.json b/ports/gamenetworkingsockets/vcpkg.json new file mode 100644 index 00000000000000..84aff5eaeadb5c --- /dev/null +++ b/ports/gamenetworkingsockets/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "gamenetworkingsockets", + "version": "1.3.0", + "description": "GameNetworkingSockets is a basic transport layer for games.", + "homepage": "https://github.com/ValveSoftware/GameNetworkingSockets", + "license": "BSD-3-Clause", + "supports": "!(static & windows) & !uwp & !(arm64 & windows)", + "dependencies": [ + "openssl", + "protobuf" + ] +} diff --git a/ports/gamma/CMakeLists.txt b/ports/gamma/CMakeLists.txt index 1f1581ba1c236b..45f0ba78b47ac1 100644 --- a/ports/gamma/CMakeLists.txt +++ b/ports/gamma/CMakeLists.txt @@ -3,8 +3,7 @@ cmake_minimum_required (VERSION 3.0) project (gamma) # dependent on libsndfile and portaudio -find_path(LIBSNDFILE_H sndfile.h) -find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) +find_package(SndFile CONFIG REQUIRED) find_path(PORTAUDIO_H portaudio.h) find_library(PORTAUDIO_LIB NAMES portaudio) @@ -25,10 +24,10 @@ set(SOURCEFILES src/Timer.cpp src/SoundFile.cpp) -include_directories(. Gamma ${CMAKE_INSTALL_FULL_INCLUDEDIR} ${PORTAUDIO_H} ${LIBSNDFILE_H}) +include_directories(. Gamma ${CMAKE_INSTALL_FULL_INCLUDEDIR} ${PORTAUDIO_H}) add_library (gamma ${SOURCEFILES}) -target_link_libraries(gamma PUBLIC ${LIBSNDFILE_LIB} ${PORTAUDIO_LIB}) +target_link_libraries(gamma PUBLIC SndFile::sndfile ${PORTAUDIO_LIB}) install( TARGETS gamma diff --git a/ports/gamma/CONTROL b/ports/gamma/CONTROL deleted file mode 100644 index 7e9a41e99048ba..00000000000000 --- a/ports/gamma/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gamma -Version: gamma-2018-01-27-1 -Build-Depends: libsndfile, portaudio -Description: Gamma is a cross-platform, C++ library for doing generic synthesis and filtering of signals. It is oriented towards real-time sound and graphics applications, but is equally useful for non-real-time tasks. Gamma is designed to be "light-footed" in terms of memory and processing making it highly suitable for plug-in development or embedding in other C++ projects. diff --git a/ports/gamma/portfile.cmake b/ports/gamma/portfile.cmake index a96a32d3ced885..0437842d85219d 100644 --- a/ports/gamma/portfile.cmake +++ b/ports/gamma/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(GAMMA_RELEASE_TAG "cc442ad0c5da369966cd937a96925c7b9a04e9e5") @@ -24,4 +22,4 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/gamma RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gamma/vcpkg.json b/ports/gamma/vcpkg.json new file mode 100644 index 00000000000000..9e13ebd52ce97b --- /dev/null +++ b/ports/gamma/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "gamma", + "version-string": "gamma-2018-01-27", + "port-version": 3, + "description": "Gamma is a cross-platform, C++ library for doing generic synthesis and filtering of signals. It is oriented towards real-time sound and graphics applications, but is equally useful for non-real-time tasks. Gamma is designed to be \"light-footed\" in terms of memory and processing making it highly suitable for plug-in development or embedding in other C++ projects.", + "homepage": "https://github.com/LancePutnam/Gamma", + "dependencies": [ + "libsndfile", + "portaudio" + ] +} diff --git a/ports/gasol/fix-install.patch b/ports/gasol/fix-install.patch new file mode 100644 index 00000000000000..5d2be99d7923df --- /dev/null +++ b/ports/gasol/fix-install.patch @@ -0,0 +1,19 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 0cba691..51e47a3 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,3 +1,13 @@ + file(GLOB GASol_SRC *.cpp) + add_library(GASol STATIC ${GASol_SRC}) + ++file(GLOB GASol_INCLUDES *.h) ++ ++install(FILES ${GASol_INCLUDES} DESTINATION include) ++ ++install( ++ TARGETS GASol ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) +\ No newline at end of file diff --git a/ports/gasol/gasol.patch b/ports/gasol/gasol.patch new file mode 100644 index 00000000000000..92d484e2a3f1e1 --- /dev/null +++ b/ports/gasol/gasol.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a21f65..a4cede0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,11 +15,15 @@ set(CMAKE_CXX_EXTENSIONS OFF) + # Find OpenMP. + find_package(OpenMP) + if (OPENMP_FOUND) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -fPIC -Wall -Wextra -Werror -pedantic") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -fPIC -pedantic") + else() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wextra -Werror -pedantic") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pedantic") + endif() + ++if(CMAKE_COMPILER_IS_GNUCXX) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror") ++endif(CMAKE_COMPILER_IS_GNUCXX) ++ + if (COV) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") + endif() +@@ -39,7 +43,7 @@ endif() + add_subdirectory(src) + + # GASol test dir. +-add_subdirectory(unittest) ++# add_subdirectory(unittest) + + # GASol run dir. + add_subdirectory(example) diff --git a/ports/gasol/portfile.cmake b/ports/gasol/portfile.cmake new file mode 100644 index 00000000000000..5d3ed6b59665ec --- /dev/null +++ b/ports/gasol/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PytLab/GASol + REF 05af009bca2903c1cc491c9a6eed01bc3c936637 + SHA512 a8546bf565a389b919dd1dd5b88b4985c1803cbb09fab0715d1b0abfda92a6bf3adea7e4b3329ad82a6f6892f1747a73a632687fd79fb77c937e7ba07c62268a + HEAD_REF master + PATCHES + gasol.patch + fix-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gasol/vcpkg.json b/ports/gasol/vcpkg.json new file mode 100644 index 00000000000000..8b979704f3cbed --- /dev/null +++ b/ports/gasol/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "gasol", + "version-string": "2018-01-04", + "port-version": 1, + "description": "A general Genetic Algorithm Solver in C++", + "homepage": "https://github.com/PytLab/GASol " +} diff --git a/ports/gaussianlib/CONTROL b/ports/gaussianlib/CONTROL deleted file mode 100644 index 7f0be1d5a719f5..00000000000000 --- a/ports/gaussianlib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gaussianlib -Version: 2019-08-04 -Description: Basic linear algebra C++ library for 2D and 3D applications -Homepage: https://github.com/LukasBanana/GaussianLib diff --git a/ports/gaussianlib/portfile.cmake b/ports/gaussianlib/portfile.cmake index 219196738ef88a..45f6b7ff4c1110 100644 --- a/ports/gaussianlib/portfile.cmake +++ b/ports/gaussianlib/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO LukasBanana/GaussianLib diff --git a/ports/gaussianlib/vcpkg.json b/ports/gaussianlib/vcpkg.json new file mode 100644 index 00000000000000..81ed9e4467c035 --- /dev/null +++ b/ports/gaussianlib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "gaussianlib", + "version-string": "2019-08-04", + "port-version": 1, + "description": "Basic linear algebra C++ library for 2D and 3D applications", + "homepage": "https://github.com/LukasBanana/GaussianLib" +} diff --git a/ports/gcem/CONTROL b/ports/gcem/CONTROL deleted file mode 100644 index 095da5e8ea6d1d..00000000000000 --- a/ports/gcem/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: gcem -Version: 1.12.0 -Description: A C++ compile-time math library using generalized constant expressions diff --git a/ports/gcem/portfile.cmake b/ports/gcem/portfile.cmake index 3d27f4dcd4a509..7d7a7124aa4a83 100644 --- a/ports/gcem/portfile.cmake +++ b/ports/gcem/portfile.cmake @@ -1,9 +1,8 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kthohr/gcem - REF v1.12.0 - SHA512 cb28dce44e8aac2a4369bc1dd796243f0f9ff25bdd2effcff198b6e4ad1161ed4d33d2fdc7aca0ca9b538c769c1ae36ebfd7fcfbefd289bb1a62cdbea1957f74 + REF a20b0fc0206ff7d99a96fe4afdfe8205b01c8220 # v1.13.1 + SHA512 baede14856ddcf8f132c7a16b19d4d646a1fc2d5e3a536a46694a8d7c656ce4ffb2fd61f50a1df78ce7ed31528828152b4e881fe10bcead553985b6103018804 HEAD_REF master ) @@ -20,5 +19,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gcem) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gcem/LICENSE ${CURRENT_PACKAGES_DIR}/share/gcem/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gcem/vcpkg.json b/ports/gcem/vcpkg.json new file mode 100644 index 00000000000000..ef9aef7151a9ff --- /dev/null +++ b/ports/gcem/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "gcem", + "version-string": "1.13.1", + "port-version": 1, + "description": "A C++ compile-time math library using generalized constant expressions" +} diff --git a/ports/gdal/0001-Fix-debug-crt-flags.patch b/ports/gdal/0001-Fix-debug-crt-flags.patch index 266fc435532aee..4640cf7f04d022 100644 --- a/ports/gdal/0001-Fix-debug-crt-flags.patch +++ b/ports/gdal/0001-Fix-debug-crt-flags.patch @@ -1,6 +1,16 @@ ---- a/nmake.opt Fri Dec 14 22:34:20 2018 -+++ b/nmake.opt Wed Mar 27 11:00:00 2019 -@@ -133,7 +133,17 @@ +diff --git a/nmake.opt b/nmake.opt +index 468d2ba1a..e75a081f7 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -148,16 +148,26 @@ GDAL_PDB = $(GDAL_ROOT)\gdal$(VERSION)$(POSTFIX).pdb + !ENDIF + + !IFDEF WITH_PDB +-CXX_PDB_FLAGS=/Zi /Fd$(GDAL_PDB) ++CXX_PDB_FLAGS=/Z7 /Fd$(GDAL_PDB) + !ELSE + CXX_PDB_FLAGS= + !ENDIF +# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) +# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well @@ -14,9 +24,20 @@ + !IFNDEF OPTFLAGS !IF "$(DEBUG)" == "0" --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG !ELSE --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG !ENDIF + !ENDIF # OPTFLAGS + +@@ -175,7 +185,7 @@ OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) /MDd /EH + # 4351: new behavior: elements of array 'array' will be default initialized (needed for https://trac.osgeo.org/gdal/changeset/35593) + # 4611: interaction between '_setjmp' and C++ object destruction is non-portable + # +-WARNFLAGS = /W4 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4351 /wd4611 ++WARNFLAGS = /W3 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4351 /wd4611 + + !ENDIF + diff --git a/ports/gdal/0002-Fix-build.patch b/ports/gdal/0002-Fix-build.patch new file mode 100644 index 00000000000000..13fa32562d74ab --- /dev/null +++ b/ports/gdal/0002-Fix-build.patch @@ -0,0 +1,38 @@ +diff --git a/makefile.vc b/makefile.vc +index 9e0bd44..8559f79 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -84,7 +84,7 @@ staticlib: $(LIB_DEPENDS) + call < - #include - #include -+#include - - CPL_CVSID("$Id: ogrlinestring.cpp 61153d33d7f055c3442ff728adbfa8e09582464b 2019-03-10 14:23:51 +0100 Even Rouault $") - diff --git a/ports/gdal/0004-Fix-cfitsio.patch b/ports/gdal/0004-Fix-cfitsio.patch new file mode 100644 index 00000000000000..0a878c07b56335 --- /dev/null +++ b/ports/gdal/0004-Fix-cfitsio.patch @@ -0,0 +1,13 @@ +diff --git a/frmts/fits/fitsdataset.cpp b/frmts/fits/fitsdataset.cpp +index c3f4a4e1f..eb29a92b1 100644 +--- a/frmts/fits/fitsdataset.cpp ++++ b/frmts/fits/fitsdataset.cpp +@@ -38,7 +38,7 @@ + #include "ogrsf_frmts.h" + + #include +-#include ++#include + + #include + #include diff --git a/ports/gdal/0005-Fix-configure.patch b/ports/gdal/0005-Fix-configure.patch new file mode 100644 index 00000000000000..c0f35523b3ba73 --- /dev/null +++ b/ports/gdal/0005-Fix-configure.patch @@ -0,0 +1,303 @@ +diff --git a/configure.ac b/configure.ac +index bd85e06..b88676a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -45,6 +45,8 @@ dnl Compute the canonical host-system (the system we are building for) + dnl type variable $host + AC_CANONICAL_HOST + ++PKG_PROG_PKG_CONFIG([0.21]) ++ + dnl Enable as much warnings as possible + AX_CFLAGS_WARN_ALL(C_WFLAGS) + AX_CXXFLAGS_WARN_ALL(CXX_WFLAGS) +@@ -1274,12 +1276,15 @@ AC_MSG_CHECKING([for libtiff]) + + if test "x${with_libtiff}" = "xyes" -o "x${with_libtiff}" = "x" ; then + +- dnl Only automatically pick up the external libtiff if it is >= 4.0. +- AC_CHECK_LIB(tiff,TIFFScanlineSize64,TIFF_SETTING=external HAVE_BIGTIFF=yes,TIFF_SETTING=internal HAVE_BIGTIFF=yes,) ++ PKG_CHECK_MODULES([TIFF],[libtiff-4 > 4.0], [TIFF_SETTING=external], [TIFF_SETTING=internal HAVE_BIGTIFF=yes]) + + if test "$TIFF_SETTING" = "external" ; then +- LIBS="-ltiff $LIBS" + AC_MSG_RESULT([using pre-installed libtiff.]) ++ EXTRA_INCLUDES="$TIFF_CFLAGS $EXTRA_INCLUDES" ++ SAVED_LIBS="$LIBS" ++ LIBS="$TIFF_LIBS" ++ AC_SEARCH_LIBS(TIFFScanlineSize64,[],HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) ++ LIBS="$TIFF_LIBS $SAVED_LIBS" + else + AC_MSG_RESULT([using internal TIFF code.]) + fi +@@ -1333,22 +1338,28 @@ AC_ARG_WITH(curl, + dnl Clear some cache variables + unset ac_cv_path_LIBCURL + ++LIBCURL_MODVERSION= + if test "`basename xx/$with_curl`" = "curl-config" ; then + LIBCURL_CONFIG="$with_curl" + elif test "$with_curl" = "no" ; then + LIBCURL_CONFIG=no ++elif test "$with_curl" = "yes" -o "$with_curl" = "" ; then ++ PKG_CHECK_EXISTS([libcurl], [LIBCURL_CONFIG="${PKG_CONFIG} libcurl"], [LIBCURL_CONFIG=false]) ++ LIBCURL_MODVERSION=`$LIBCURL_CONFIG --modversion` + else + AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no) + fi + + if test "$LIBCURL_CONFIG" != "no" ; then + +- CURL_VERNUM=`$LIBCURL_CONFIG --vernum` +- CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` ++ CURL_VER="`$LIBCURL_CONFIG --version | awk '{print $2}'`$LIBCURL_MODVERSION" + + AC_MSG_RESULT([ found libcurl version $CURL_VER]) + +- AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) ++ SAVED_LIBS="$LIBS" ++ LIBS=`$LIBCURL_CONFIG --libs` ++ AC_SEARCH_LIBS(curl_global_init,[],CURL_SETTING=yes,CURL_SETTING=no,) ++ LIBS="$SAVED_LIBS" + + fi + +@@ -1362,7 +1373,9 @@ dnl Proj depends on it so it must appear before. + dnl --------------------------------------------------------------------------- + + SQLITE3_REQ_VERSION="3.0.0" +-AX_LIB_SQLITE3($SQLITE3_REQ_VERSION) ++AC_CHECK_LIB(sqlite3,sqlite3_open,HAVE_SQLITE3=yes,AC_MSG_ERROR([vcpkg sqlite3 not found]),) ++SQLITE3_CFLAGS= ++SQLITE3_LDFLAGS=-lsqlite3 + + if test "$HAVE_SQLITE3" = "yes"; then + LIBS="$SQLITE3_LDFLAGS $LIBS" +@@ -1570,6 +1583,19 @@ dnl --------------------------------------------------------------------------- + AC_ARG_WITH(liblzma,[ --with-liblzma[=ARG] Include liblzma support (ARG=yes/no)],,) + + if test "$with_liblzma" = "yes" ; then ++ PKG_CHECK_MODULES([LIBLZMA],[liblzma],[HAVE_LIBLZMA_PC=yes],[HAVE_LIBLZMA_PC=no]) ++ SAVED_LIBS="$LIBS" ++ LIBS="$LIBLZMA_LIBS" ++ AC_SEARCH_LIBS(lzma_code,[],LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) ++ if test "$LIBLZMA_SETTING" = "yes" ; then ++ LIBS="$LIBLZMA_LIBS $SAVED_LIBS" ++ elif test "$HAVE_LIBLZMA_PC" = "yes" ; then ++ AC_MSG_ERROR([vcpkg liblzma broken]) ++ else ++ LIBS="$SAVED_LIBS" ++ fi ++ ++elif false; then + AC_CHECK_LIB(lzma,lzma_code,LIBLZMA_SETTING=yes,LIBLZMA_SETTING=no,) + AC_CHECK_HEADERS(lzma.h) + +@@ -1592,6 +1618,19 @@ dnl --------------------------------------------------------------------------- + AC_ARG_WITH(zstd,[ --with-zstd[=ARG] Include zstd support (ARG=yes/no/installation_prefix)],,) + + if test "$with_zstd" = "" -o "$with_zstd" = "yes" ; then ++ PKG_CHECK_MODULES([ZSTD],[libzstd],[HAVE_LIBZSTD_PC=yes],[HAVE_LIBZSTD_PC=no]) ++ SAVED_LIBS="$LIBS" ++ LIBS="$ZSTD_LIBS" ++ AC_SEARCH_LIBS(ZSTD_decompressStream,[],ZSTD_SETTING=yes,ZSTD_SETTING=no,) ++ if test "$ZSTD_SETTING" = "yes" ; then ++ LIBS="$ZSTD_LIBS $SAVED_LIBS" ++ elif test "$HAVE_LIBZSTD_PC" = "yes" ; then ++ AC_MSG_ERROR([vcpkg libzstd broken]) ++ else ++ LIBS="$SAVED_LIBS" ++ fi ++ ++elif false; then + AC_CHECK_LIB(zstd,ZSTD_decompressStream,ZSTD_SETTING=yes,ZSTD_SETTING=no,) + + if test "$ZSTD_SETTING" = "yes" ; then +@@ -1893,6 +1932,12 @@ else + SAVED_LIBS="${LIBS}" + LIBS="${PG_LIB}" + AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no) ++ if test "${HAVE_PG}" = "no" ; then ++ unset ac_cv_lib_pq_PQconnectdb ++ PG_LIB="${PG_LIB} -lpgcommon -lpgport" ++ LIBS="${PG_LIB} ${SAVED_LIBS}" ++ AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no,[-lpgcommon -lpgport]) ++ fi + LIBS="${SAVED_LIBS}" + if test "${HAVE_PG}" = "yes" ; then + LIBS="${PG_LIB} ${LIBS}" +@@ -2253,6 +2298,15 @@ AC_ARG_WITH(geotiff,[ --with-geotiff=ARG Libgeotiff library to use (ARG=inte + + if test "$with_geotiff" = "yes" -o "$with_geotiff" = "" ; then + ++ AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=internal) ++ if test $GEOTIFF_SETTING = "external" ; then ++ LIBS="-lgeotiff $LIBS" ++ else ++ AC_MSG_ERROR([vcpkg geotiff broken]) ++ fi ++ ++elif false; then ++ + if test "$TIFF_SETTING" = "internal" ; then + GEOTIFF_SETTING=internal + else +@@ -3002,7 +3056,7 @@ elif test "$with_hdf5" = "yes" -o "$with_hdf5" = "" ; then + # Test that the package found is for the right architecture + saved_LIBS="$LIBS" + LIBS="$HDF5_LIBS" +- AC_CHECK_LIB(hdf5,H5Fopen, [HAVE_HDF5=yes], [HAVE_HDF5=no]) ++ AC_SEARCH_LIBS(H5Fopen,[],[HAVE_HDF5=yes],[HAVE_HDF5=no],) + LIBS="$saved_LIBS" + + if test "$HAVE_HDF5" = "yes"; then +@@ -3132,6 +3186,24 @@ if test "$with_netcdf" = "no" ; then + + echo "netCDF support disabled." + ++elif true ; then ++ ++ PKG_CHECK_MODULES([NETCDF],[netcdf],[HAVE_NETCDF_PC=yes],[HAVE_NETCDF_PC=no]) ++ SAVED_LIBS="$LIBS" ++ LIBS="$NETCDF_LIBS" ++ AC_SEARCH_LIBS(nc_open,[],NETCDF_SETTING=yes,NETCDF_SETTING=no,) ++ if test "$NETCDF_SETTING" = "yes" ; then ++ LIBS="$NETCDF_LIBS $SAVED_LIBS" ++ EXTRA_INCLUDES="$NETCDF_CFLAGS $EXTRA_INCLUDES" ++ PKG_CHECK_VAR([NETCDF_ROOT],[netcdf],[prefix],,) ++ PKG_CHECK_VAR([NETCDF_INCLUDEDIR],[netcdf],[includedir],,) ++ NETCDF_NCCONFIG= ++ elif test "$HAVE_NETCDF_PC" = "yes" ; then ++ AC_MSG_ERROR([vcpkg netcdf-c broken]) ++ else ++ LIBS="$SAVED_LIBS" ++ fi ++ + else + + dnl find nc-config location +@@ -3352,6 +3424,21 @@ if test "$with_openjpeg" = "no" ; then + + AC_MSG_NOTICE([OpenJPEG (JPEG2000) support disabled.]) + ++elif true ; then ++ ++ PKG_CHECK_MODULES([OPENJPEG],[libopenjp2 >= 2.1.0],[HAVE_LIBOPENJP2_PC=yes],[HAVE_LIBOPENJP2_PC=no]) ++ SAVED_LIBS="$LIBS" ++ LIBS="$OPENJPEG_LIBS" ++ AC_SEARCH_LIBS(opj_setup_decoder,[],HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,) ++ if test "$HAVE_OPENJPEG" = "yes" ; then ++ EXTRA_INCLUDES="$OPENJPEG_CFLAGS $EXTRA_INCLUDES" ++ LIBS="$OPENJPEG_LIBS $SAVED_LIBS" ++ elif test "$HAVE_LIBOPENJP2_PC" = "yes" ; then ++ AC_MSG_ERROR([vcpkg libopenjpeg broken]) ++ else ++ LIBS="$SAVED_LIBS" ++ fi ++ + else + + PKG_PROG_PKG_CONFIG([0.21]) +@@ -4043,7 +4130,9 @@ dnl --------------------------------------------------------------------------- + + dnl Expat 1.95.0 released in 2000-09-28 + EXPAT_REQ_VERSION="1.95.0" +-AX_LIB_EXPAT($EXPAT_REQ_VERSION) ++AC_CHECK_LIB(expat,XML_ParserCreate,HAVE_EXPAT=yes,AC_MSG_ERROR([vcpkg expat not found])) ++EXPAT_LDFLAGS="-lexpat" ++EXPAT_INCLUDE="" + + if test "$HAVE_EXPAT" = "yes"; then + LIBS="$EXPAT_LDFLAGS $LIBS" +@@ -4066,7 +4155,13 @@ dnl Check for Google libkml support. + dnl --------------------------------------------------------------------------- + + LIBKML_REQ_VERSION="1.3.0" ++if test "x${with_libkml}" = "xno"; then ++ echo "libkml support disabled." ++ HAVE_LIBKML="no" ++ LIBKML_CFLAGS= ++else + AX_LIB_LIBKML($LIBKML_REQ_VERSION) ++fi + + if test "$HAVE_LIBKML" = "yes"; then + LIBS="$LIBKML_LDFLAGS $LIBS" +@@ -4244,8 +4339,8 @@ else + dnl Add curl to LIBS; it might be local to DODS or generally installed + if test -x $DODS_BIN/curl-config; then + LIBS="$LIBS `$DODS_BIN/curl-config --libs`" +- elif which curl-config > /dev/null 2>&1; then +- LIBS="$LIBS `curl-config --libs`" ++ elif test "$CURL_SETTING" = "yes"; then ++ LIBS="$LIBS $CURL_LIB" + else + AC_MSG_ERROR([You gave a dods root, but I can't find curl!]) + fi +@@ -4287,7 +4382,7 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then + if test "${HAVE_LIBXML2}" = "yes"; then + SAVED_LIBS="${LIBS}" + LIBS="${LIBXML2_LIBS}" +- AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) ++ AC_SEARCH_LIBS(xmlParseDoc,[],HAVE_LIBXML2=yes,HAVE_LIBXML2=no,) + LIBS="${SAVED_LIBS}" + fi + +@@ -4536,6 +4631,22 @@ WEBP_SETTING=no + + if test "$with_webp" = "yes" -o "$with_webp" = "" ; then + ++ PKG_CHECK_MODULES([WEBP],[libwebp],[HAVE_LIBWEBP_PC=yes],[HAVE_LIBWEBP_PC=no]) ++ SAVED_LIBS="$LIBS" ++ LIBS="$WEBP_LIBS" ++ AC_SEARCH_LIBS(WebPDecodeRGB,[],WEBP_SETTING=yes,WEBP_SETTING=no,) ++ ++ if test "$WEBP_SETTING" = "yes" ; then ++ LIBS="$WEBP_LIBS $SAVED_LIBS" ++ elif test "$HAVE_LIBWEBP_PC" = "yes" ; then ++ AC_MSG_ERROR([vcpkg libwebp broken]) ++ else ++ echo "libwebp not found - WEBP support disabled" ++ LIBS="$SAVED_LIBS" ++ fi ++ ++elif false ; then ++ + AC_CHECK_LIB(webp,WebPDecodeRGB,WEBP_SETTING=yes,WEBP_SETTING=no,) + + if test "$WEBP_SETTING" = "yes" ; then +@@ -4567,7 +4678,7 @@ dnl --------------------------------------------------------------------------- + dnl Check if geos library is available. + dnl --------------------------------------------------------------------------- + +-GEOS_INIT(3.1.0) ++PKG_CHECK_MODULES(GEOS,geos >= 3.1.0,HAVE_GEOS=yes,AC_MSG_ERROR([vcpkg geos not found])) + HAVE_GEOS_RESULT="no" + if test "${HAVE_GEOS}" = "yes" ; then + +@@ -4812,6 +4923,16 @@ dnl --------------------------------------------------------------------------- + + AC_ARG_WITH(libjson-c,[ --with-libjson-c[=ARG] Include libjson-c support (ARG=internal or libjson-c directory)],,) + ++PKG_CHECK_MODULES([JSONC],[json-c],[HAVE_JSONC=yes],[HAVE_JSONC=no]) ++SAVED_LIBS="$LIBS" ++LIBS="$JSONC_LIBS" ++AC_SEARCH_LIBS(json_object_set_serializer,[],LIBJSONC_SETTING=external,LIBJSONC_SETTING=,) ++if test "$LIBJSONC_SETTING" = "external" ; then ++ LIBS="$JSONC_LIBS $SAVED_LIBS" ++ JSON_INCLUDE="$JSONC_CFLAGS" ++else ++ LIBS="$SAVED_LIBS" ++ + if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjson_c" = "yes" ; then + AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,) + elif test "$with_libjson_c" = "internal" ; then +@@ -4840,6 +4961,8 @@ else + AC_MSG_RESULT([using internal libjson-c code]) + fi + ++fi # json-c.pc ++ + AC_SUBST(LIBJSONC_SETTING,$LIBJSONC_SETTING) + AC_SUBST(JSON_INCLUDE,$JSON_INCLUDE) + diff --git a/ports/gdal/0006-Fix-mingw-dllexport.patch b/ports/gdal/0006-Fix-mingw-dllexport.patch new file mode 100644 index 00000000000000..7091f921ab58f5 --- /dev/null +++ b/ports/gdal/0006-Fix-mingw-dllexport.patch @@ -0,0 +1,13 @@ +diff --git a/port/cpl_port.h b/port/cpl_port.h +index 9e3ebbb..130af04 100644 +--- a/port/cpl_port.h ++++ b/port/cpl_port.h +@@ -343,7 +343,7 @@ typedef unsigned int GUIntptr_t; + #endif + + #ifndef CPL_DLL +-#if defined(_MSC_VER) && !defined(CPL_DISABLE_DLL) ++#if defined(WIN32) && !defined(CPL_DISABLE_DLL) + # ifdef GDAL_COMPILATION + # define CPL_DLL __declspec(dllexport) + # else diff --git a/ports/gdal/0007-Control-tools.patch b/ports/gdal/0007-Control-tools.patch new file mode 100644 index 00000000000000..7c2b8ce7243e2a --- /dev/null +++ b/ports/gdal/0007-Control-tools.patch @@ -0,0 +1,83 @@ +diff --git a/GDALmake.opt.in b/GDALmake.opt.in +index 07955b2..0d79ac3 100644 +--- a/GDALmake.opt.in ++++ b/GDALmake.opt.in +@@ -660,3 +660,6 @@ O_OBJ = $(foreach file,$(OBJ),../o/$(file)) + + %-clean: + $(MAKE) -C $* clean ++ ++ ++BUILD_TOOLS = @BUILD_TOOLS@ +\ No newline at end of file +diff --git a/apps/GNUmakefile b/apps/GNUmakefile +index 9624cf7..f91403d 100644 +--- a/apps/GNUmakefile ++++ b/apps/GNUmakefile +@@ -43,6 +43,11 @@ NON_DEFAULT_LIST = multireadtest$(EXE) dumpoverviews$(EXE) \ + gdaltorture$(EXE) gdal2ogr$(EXE) test_ogrsf$(EXE) \ + gdalasyncread$(EXE) testreprojmulti$(EXE) + ++ifeq ($(BUILD_TOOLS),no) ++BIN_LIST = ++NON_DEFAULT_LIST = ++endif ++ + default: gdal-config-inst gdal-config $(BIN_LIST) + + all: default $(NON_DEFAULT_LIST) +diff --git a/apps/makefile.vc b/apps/makefile.vc +index 6e1fc9b..66f9b29 100644 +--- a/apps/makefile.vc ++++ b/apps/makefile.vc +@@ -20,6 +20,7 @@ GNM_PROGRAMS = gnmmanage.exe gnmanalyse.exe + !ENDIF + + ++!IF "$(BUILD_TOOLS)" == "1" + default: gdal_translate.exe gdalinfo.exe gdaladdo.exe gdalwarp.exe \ + nearblack.exe gdalmanage.exe gdalenhance.exe gdaltransform.exe\ + gdaldem.exe gdallocationinfo.exe gdalsrsinfo.exe gdalmdiminfo.exe \ +@@ -28,6 +29,10 @@ default: gdal_translate.exe gdalinfo.exe gdaladdo.exe gdalwarp.exe \ + all: default multireadtest.exe \ + dumpoverviews.exe gdalwarpsimple.exe gdalflattenmask.exe \ + gdaltorture.exe gdal2ogr.exe test_ogrsf.exe ++!ELSE ++default: ++all: ++!ENDIF + OBJ = commonutils.obj gdalinfo_lib.obj gdal_translate_lib.obj gdalwarp_lib.obj ogr2ogr_lib.obj \ + gdaldem_lib.obj nearblack_lib.obj gdal_grid_lib.obj gdal_rasterize_lib.obj gdalbuildvrt_lib.obj \ + gdalmdiminfo_lib.obj gdalmdimtranslate_lib.obj +@@ -223,5 +228,9 @@ clean: + -del *.manifest + -del *.exp + ++!IF "$(BUILD_TOOLS)" == "1" + install: default + copy *.exe $(BINDIR) ++!ELSE ++install: ++!ENDIF +\ No newline at end of file +diff --git a/configure.ac b/configure.ac +index b88676a..0a46a9c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -6150,6 +6150,16 @@ case "${host_os}" in + ;; + esac + ++BUILD_TOOLS=yes ++AC_ARG_WITH([tools], AS_HELP_STRING([--with-tools], [Build the tools]),,) ++if test "$with_tools" = "yes"; then ++ AC_MSG_RESULT([enabled]) ++else ++ BUILD_TOOLS=no ++ AC_MSG_RESULT([disabled by user]) ++fi ++AC_SUBST(BUILD_TOOLS,$BUILD_TOOLS) ++ + AC_OUTPUT(GDALmake.opt) + + dnl --------------------------------------------------------------------------- diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL deleted file mode 100644 index bf5acc08d4d5e1..00000000000000 --- a/ports/gdal/CONTROL +++ /dev/null @@ -1,13 +0,0 @@ -Source: gdal -Version: 2.4.1-7 -Homepage: https://gdal.org/ -Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. -Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib - -Feature: mysql-libmariadb -Build-Depends: libmariadb -Description: Add mysql support using libmariadb - -Feature: libspatialite -Build-Depends: libspatialite -Description: Create or update SpatiaLite databases using libspatialite diff --git a/ports/gdal/dependency_win.cmake b/ports/gdal/dependency_win.cmake new file mode 100644 index 00000000000000..6bb6202d2f04d2 --- /dev/null +++ b/ports/gdal/dependency_win.cmake @@ -0,0 +1,237 @@ +macro(find_dependency_win) + # Setup proj4 libraries + include path + set(PROJ_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include") + set(PROJ_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/proj.lib") + set(PROJ_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib") + + # Setup libpng libraries + include path + set(PNG_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include") + set(PNG_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libpng16.lib" ) + set(PNG_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.lib" ) + + # Setup zlib libraries + include path + set(ZLIB_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + set(ZLIB_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/zlib.lib" ) + set(ZLIB_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib" ) + + # Setup geos libraries + include path + set(GEOS_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + set(GEOS_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib" ) + set(GEOS_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib" ) + + # Setup expat libraries + include path + set(EXPAT_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpatMD.lib" ) + set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatdMD.lib" ) + else() + set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpat.lib" ) + set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd.lib" ) + endif() + + # Setup curl libraries + include path + set(CURL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib") + set(CURL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib" ) + elseif(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib") + set(CURL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib" ) + endif() + if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib") + set(CURL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib" ) + elseif(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib") + set(CURL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib" ) + endif() + + # Setup sqlite3 libraries + include path + set(SQLITE_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + set(SQLITE_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib" ) + set(SQLITE_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib" ) + + # Setup PostgreSQL libraries + include path + set(PGSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + set(PGSQL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libpq.lib" ) + set(PGSQL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpq.lib" ) + + set(TMP_REL "${CURRENT_INSTALLED_DIR}/lib/libpgcommon.lib" ) + set(TMP_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpgcommon.lib" ) + set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}") + set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}") + + set(TMP_REL "${CURRENT_INSTALLED_DIR}/lib/libpgport.lib" ) + set(TMP_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpgport.lib" ) + set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}") + set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}") + + # Setup OpenJPEG libraries + include path + set(OPENJPEG_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + set(OPENJPEG_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/openjp2.lib" ) + set(OPENJPEG_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/openjp2.lib" ) + + # Setup WebP libraries + include path + set(WEBP_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + set(WEBP_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/webp.lib" ) + set(WEBP_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/webpd.lib" ) + + # Setup libxml2 libraries + include path + set(XML2_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + set(XML2_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib" ) + set(XML2_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib" ) + + # Setup liblzma libraries + include path + set(LZMA_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" ) + set(LZMA_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/lzma.lib" ) + set(LZMA_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib" ) + + # Setup openssl libraries path + set(OPENSSL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/lib/libssl.lib" ) + set(OPENSSL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.lib" ) + + # Setup libiconv libraries path + set(ICONV_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/lib/charset.lib" ) + set(ICONV_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib" ) + + # Setup jpeg libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/jpeg.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" JPEG_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/jpeg.lib" JPEG_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/jpegd.lib" JPEG_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS JPEG_EXTERNAL_LIB=1) + list(APPEND NMAKE_OPTIONS JPEGDIR=${JPEG_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL JPEG_LIB=${JPEG_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG JPEG_LIB=${JPEG_LIBRARY_DBG}) + endif() + + # Setup zstd libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/zstd.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" ZSTD_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/zstd.lib" ZSTD_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/zstdd.lib" ZSTD_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS ZSTD_CFLAGS=-I${ZSTD_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL ZSTD_LIBS=${ZSTD_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG ZSTD_LIBS=${ZSTD_LIBRARY_DBG}) + endif() + + # Setup tiff libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/tiff.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" TIFF_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/tiff.lib" TIFF_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/tiffd.lib" TIFF_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS TIFF_INC=-I${TIFF_INCLUDE}) + list(APPEND NMAKE_OPTIONS TIFF_OPTS=-DBIGTIFF_SUPPORT) + list(APPEND NMAKE_OPTIONS_REL TIFF_LIB=${TIFF_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG TIFF_LIB=${TIFF_LIBRARY_DBG}) + endif() + + # Setup geotiff libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/geotiff_i.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" GEOTIFF_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geotiff_i.lib" GEOTIFF_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geotiff_d_i.lib" GEOTIFF_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS GEOTIFF_INC=-I${GEOTIFF_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL GEOTIFF_LIB=${GEOTIFF_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG GEOTIFF_LIB=${GEOTIFF_LIBRARY_DBG}) + endif() + + # Setup Xerces libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/xerces-c_3.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" XERCES_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" XERCES_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/xerces-c_3.lib" XERCES_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/xerces-c_3D.lib" XERCES_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS ILI_ENABLED=YES) + list(APPEND NMAKE_OPTIONS XERCES_DIR=${XERCES_DIR}) + list(APPEND NMAKE_OPTIONS "XERCES_INCLUDE=-I${XERCES_INCLUDE} -I${XERCES_INCLUDE}/xercesc") + list(APPEND NMAKE_OPTIONS_REL XERCES_LIB=${XERCES_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG XERCES_LIB=${XERCES_LIBRARY_DBG}) + endif() + + # Setup freexl libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/freexl.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" FREEXL_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/freexl.lib" FREEXL_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib" FREEXL_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS FREEXL_CFLAGS=-I${FREEXL_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL FREEXL_LIBS=${FREEXL_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG FREEXL_LIBS=${FREEXL_LIBRARY_DBG}) + endif() + + # Setup Cryptopp libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/cryptopp-static.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" CRYPTOPP_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/cryptopp-static.lib" CRYPTOPP_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/cryptopp-static.lib" CRYPTOPP_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS CRYPTOPP_INC=-I${CRYPTOPP_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL CRYPTOPP_LIB=${CRYPTOPP_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG CRYPTOPP_LIB=${CRYPTOPP_LIBRARY_DBG}) + endif() + + # Setup netcdf libraries + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/netcdf.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" NETCDF_INCLUDE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/netcdf.lib" NETCDF_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/netcdf.lib" NETCDF_LIBRARY_DBG) + list(APPEND NMAKE_OPTIONS NETCDF_PLUGIN=NO) + list(APPEND NMAKE_OPTIONS NETCDF_SETTING=yes) + list(APPEND NMAKE_OPTIONS NETCDF_INC_DIR=${NETCDF_INCLUDE}) + list(APPEND NMAKE_OPTIONS_REL NETCDF_LIB=${NETCDF_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG NETCDF_LIB=${NETCDF_LIBRARY_DBG}) + endif() + endif() + + # Setup libkml libraries + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/kmlbase.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" LIBKML_DIR) + list(APPEND NMAKE_OPTIONS LIBKML_DIR=${LIBKML_DIR}) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" LIBKML_INCLUDE) + list(APPEND NMAKE_OPTIONS LIBKML_INCLUDE=-I${LIBKML_INCLUDE}) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlbase.lib" KMLBASE_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlbase.lib" KMLBASE_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlconvenience.lib" KMLCONVENIENCE_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlconvenience.lib" KMLCONVENIENCE_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmldom.lib" KMLDOM_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmldom.lib" KMLDOM_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlengine.lib" KMLENGINE_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlengine.lib" KMLENGINE_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlregionator.lib" KMLREGIONATOR_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlregionator.lib" KMLREGIONATOR_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlxsd.lib" KMLXSD_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlxsd.lib" KMLXSD_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/bz2.lib" BZIP2_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/bz2d.lib" BZIP2_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/minizip.lib" MINIZIP_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/minizip.lib" MINIZIP_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/uriparser.lib" URIPARSER_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/uriparser.lib" URIPARSER_DBG) + list(APPEND NMAKE_OPTIONS_REL "LIBKML_LIBS=${KMLBASE_REL} ${KMLCONVENIENCE_REL} ${KMLDOM_REL} ${KMLENGINE_REL} ${KMLREGIONATOR_REL} ${KMLXSD_REL} ${BZIP2_REL} ${MINIZIP_REL} ${URIPARSER_REL} ${EXPAT_LIBRARY_REL} ${ZLIB_LIBRARY_REL}") + list(APPEND NMAKE_OPTIONS_DBG "LIBKML_LIBS=${KMLBASE_DBG} ${KMLCONVENIENCE_DBG} ${KMLDOM_DBG} ${KMLENGINE_DBG} ${KMLREGIONATOR_DBG} ${KMLXSD_DBG} ${BZIP2_DBG} ${MINIZIP_DBG} ${URIPARSER_DBG} ${EXPAT_LIBRARY_DBG} ${ZLIB_LIBRARY_DBG}") + endif() + + if("mysql-libmysql" IN_LIST FEATURES OR "mysql-libmariadb" IN_LIST FEATURES) + # Setup MySQL libraries + include path + if("mysql-libmysql" IN_LIST FEATURES) + set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql" ) + set(MYSQL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib" ) + set(MYSQL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib" ) + endif() + + if("mysql-libmariadb" IN_LIST FEATURES) + set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql" ) + set(MYSQL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib" ) + set(MYSQL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib" ) + endif() + endif() + + if ("libspatialite" IN_LIST FEATURES) + # Setup spatialite libraries + include path + set(SPATIALITE_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/spatialite" ) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(SPATIALITE_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/librttopo.lib" "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib") + set(SPATIALITE_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/librttopo.lib" "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib") + else() + set(SPATIALITE_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib" ) + set(SPATIALITE_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib" ) + endif() + set(HAVE_SPATIALITE "-DHAVE_SPATIALITE") + endif() +endmacro() \ No newline at end of file diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index e212a42ed6ed70..10d1e42fca12a7 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -1,412 +1,378 @@ -# vcpkg portfile.cmake for GDAL -# -# NOTE: update the version and checksum for new GDAL release -include(vcpkg_common_functions) - -set(GDAL_VERSION_STR "2.4.1") -set(GDAL_VERSION_PKG "241") -set(GDAL_VERSION_LIB "204") -set(GDAL_PACKAGE_SUM "edb9679ee6788334cf18971c803615ac9b1c72bc0c96af8fd4852cb7e8f58e9c4f3d9cb66406bc8654419612e1a7e9d0e62f361712215f4a50120f646bb0a738") +vcpkg_fail_port_install(ON_ARCH "arm") -if (TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR "ARM is currently not supported.") -endif() +# NOTE: update the version and checksum for new GDAL release +set(GDAL_VERSION_STR "3.2.2") +set(GDAL_VERSION_PKG "322") +set(GDAL_PACKAGE_SUM "ce319e06c78bd076228b3710c127cdbd37c7d6fb23966b47df7287eaffe86a05d4ddcc78494c8bfcaf4db98a71f2ed50a01fb3ca2fe1c10cf0d2e812683c8e53") vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/gdal/${GDAL_VERSION_STR}/gdal${GDAL_VERSION_PKG}.zip" FILENAME "gdal${GDAL_VERSION_PKG}.zip" SHA512 ${GDAL_PACKAGE_SUM} -) - -# Extract source into architecture specific directory, because GDALs' nmake based build currently does not -# support out of source builds. -set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-${GDAL_VERSION_STR}) -set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-${GDAL_VERSION_STR}) + ) -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - list(APPEND BUILD_TYPES "release") -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - list(APPEND BUILD_TYPES "debug") +set(GDAL_PATCHES + 0001-Fix-debug-crt-flags.patch + 0002-Fix-build.patch + 0004-Fix-cfitsio.patch + 0005-Fix-configure.patch + 0007-Control-tools.patch + ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND GDAL_PATCHES 0006-Fix-mingw-dllexport.patch) endif() -foreach(BUILD_TYPE IN LISTS BUILD_TYPES) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) - vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) +vcpkg_extract_source_archive_ex( + ARCHIVE "${ARCHIVE}" + OUT_SOURCE_PATH SOURCE_PATH + PATCHES ${GDAL_PATCHES} + ) + +if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(NATIVE_DATA_DIR "${CURRENT_PACKAGES_DIR}/share/gdal") + set(NATIVE_HTML_DIR "${CURRENT_PACKAGES_DIR}/share/gdal/html") + + include("${CMAKE_CURRENT_LIST_DIR}/dependency_win.cmake") + find_dependency_win() + + set(NMAKE_OPTIONS "") + set(NMAKE_OPTIONS_REL "") + set(NMAKE_OPTIONS_DBG "") + + if("mysql-libmysql" IN_LIST FEATURES OR "mysql-libmariadb" IN_LIST FEATURES) + list(APPEND NMAKE_OPTIONS "MYSQL_INC_DIR=${MYSQL_INCLUDE_DIR}") + list(APPEND NMAKE_OPTIONS_REL "MYSQL_LIB=${MYSQL_LIBRARY_REL}") + list(APPEND NMAKE_OPTIONS_DBG "MYSQL_LIB=${MYSQL_LIBRARY_DBG}") + endif() + + list(APPEND NMAKE_OPTIONS + "DATADIR=${NATIVE_DATA_DIR}" + "HTMLDIR=${NATIVE_HTML_DIR}" + "GEOS_DIR=${GEOS_INCLUDE_DIR}" + "GEOS_CFLAGS=-I${GEOS_INCLUDE_DIR} -DHAVE_GEOS" + "PROJ_INCLUDE=-I${PROJ_INCLUDE_DIR}" + "EXPAT_DIR=${EXPAT_INCLUDE_DIR}" + "EXPAT_INCLUDE=-I${EXPAT_INCLUDE_DIR}" + "CURL_INC=-I${CURL_INCLUDE_DIR}" + "SQLITE_INC=-I${SQLITE_INCLUDE_DIR} ${HAVE_SPATIALITE}" + "PG_INC_DIR=${PGSQL_INCLUDE_DIR}" + OPENJPEG_ENABLED=YES + "OPENJPEG_CFLAGS=-I${OPENJPEG_INCLUDE_DIR}" + OPENJPEG_VERSION=20100 + WEBP_ENABLED=YES + "WEBP_CFLAGS=-I${WEBP_INCLUDE_DIR}" + "LIBXML2_INC=-I${XML2_INCLUDE_DIR}" + PNG_EXTERNAL_LIB=1 + "PNGDIR=${PNG_INCLUDE_DIR}" + "ZLIB_INC=-I${ZLIB_INCLUDE_DIR}" + ZLIB_EXTERNAL_LIB=1 + ACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 + MSVC_VER=1900 + ) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + list(APPEND NMAKE_OPTIONS WIN64=YES) + endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-static-build.patch - ) + list(APPEND NMAKE_OPTIONS CURL_CFLAGS=-DCURL_STATICLIB) + list(APPEND NMAKE_OPTIONS DLLBUILD=0) + list(APPEND NMAKE_OPTIONS "PROJ_FLAGS=-DPROJ_STATIC -DPROJ_VERSION=5") else() - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch - ) + # Enables PDBs for release and debug builds + list(APPEND NMAKE_OPTIONS WITH_PDB=1) + list(APPEND NMAKE_OPTIONS DLLBUILD=1) endif() - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR}/ogr - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-std-fabs.patch - ) -endforeach() - -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - # Check build system first - find_program(NMAKE nmake REQUIRED) - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal" NATIVE_DATA_DIR) - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal/html" NATIVE_HTML_DIR) - - # Setup proj4 libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PROJ_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/proj.lib" PROJ_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/projd.lib" PROJ_LIBRARY_DBG) - - # Setup libpng libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PNG_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpng16.lib" PNG_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.lib" PNG_LIBRARY_DBG) - - # Setup zlib libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" ZLIB_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/zlib.lib" ZLIB_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib" ZLIB_LIBRARY_DBG) - - # Setup geos libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" GEOS_INCLUDE_DIR) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libgeos.lib" GEOS_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libgeosd.lib" GEOS_LIBRARY_DBG) - else() - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" GEOS_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" GEOS_LIBRARY_DBG) - endif() - - # Setup expat libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" EXPAT_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/expat.lib" EXPAT_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib" EXPAT_LIBRARY_DBG) - - # Setup curl libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" CURL_INCLUDE_DIR) - if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib") - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib" CURL_LIBRARY_REL) - elseif(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib") - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib" CURL_LIBRARY_REL) - endif() - if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib") - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib" CURL_LIBRARY_DBG) - elseif(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib") - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib" CURL_LIBRARY_DBG) - endif() - - # Setup sqlite3 libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" SQLITE_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib" SQLITE_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib" SQLITE_LIBRARY_DBG) - - # Setup PostgreSQL libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PGSQL_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpq.lib" PGSQL_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.lib" PGSQL_LIBRARY_DBG) - - # Setup OpenJPEG libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" OPENJPEG_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/openjp2.lib" OPENJPEG_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/openjp2.lib" OPENJPEG_LIBRARY_DBG) - - # Setup WebP libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" WEBP_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/webp.lib" WEBP_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/webpd.lib" WEBP_LIBRARY_DBG) - - # Setup libxml2 libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" XML2_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib" XML2_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib" XML2_LIBRARY_DBG) - - # Setup liblzma libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" LZMA_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/lzma.lib" LZMA_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/lzma.lib" LZMA_LIBRARY_DBG) - - if("mysql-libmysql" IN_LIST FEATURES OR "mysql-libmariadb" IN_LIST FEATURES) - # Setup MySQL libraries + include path - if("mysql-libmysql" IN_LIST FEATURES) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/mysql" MYSQL_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib" MYSQL_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib" MYSQL_LIBRARY_DBG) - endif() - - if("mysql-libmariadb" IN_LIST FEATURES) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/mysql" MYSQL_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib" MYSQL_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib" MYSQL_LIBRARY_DBG) - endif() - - list(APPEND NMAKE_OPTIONS MYSQL_INC_DIR=${MYSQL_INCLUDE_DIR}) - list(APPEND NMAKE_OPTIONS_REL MYSQL_LIB=${MYSQL_LIBRARY_REL}) - list(APPEND NMAKE_OPTIONS_DBG MYSQL_LIB=${MYSQL_LIBRARY_DBG}) - endif() - - if ("libspatialite" IN_LIST FEATURES) - # Setup spatialite libraries + include path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/spatialite" SPATIALITE_INCLUDE_DIR) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib" SPATIALITE_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib" SPATIALITE_LIBRARY_DBG) - set(HAVE_SPATIALITE "-DHAVE_SPATIALITE") - endif() - - list(APPEND NMAKE_OPTIONS - GDAL_HOME=${NATIVE_PACKAGES_DIR} - DATADIR=${NATIVE_DATA_DIR} - HTMLDIR=${NATIVE_HTML_DIR} - GEOS_DIR=${GEOS_INCLUDE_DIR} - "GEOS_CFLAGS=-I${GEOS_INCLUDE_DIR} -DHAVE_GEOS" - PROJ_INCLUDE=-I${PROJ_INCLUDE_DIR} - EXPAT_DIR=${EXPAT_INCLUDE_DIR} - EXPAT_INCLUDE=-I${EXPAT_INCLUDE_DIR} - CURL_INC=-I${CURL_INCLUDE_DIR} - "SQLITE_INC=-I${SQLITE_INCLUDE_DIR} ${HAVE_SPATIALITE}" - PG_INC_DIR=${PGSQL_INCLUDE_DIR} - OPENJPEG_ENABLED=YES - OPENJPEG_CFLAGS=-I${OPENJPEG_INCLUDE_DIR} - OPENJPEG_VERSION=20100 - WEBP_ENABLED=YES - WEBP_CFLAGS=-I${WEBP_INCLUDE_DIR} - LIBXML2_INC=-I${XML2_INCLUDE_DIR} - PNG_EXTERNAL_LIB=1 - PNGDIR=${PNG_INCLUDE_DIR} - ZLIB_INC=-I${ZLIB_INCLUDE_DIR} - ZLIB_EXTERNAL_LIB=1 - MSVC_VER=1900 - ) - - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - list(APPEND NMAKE_OPTIONS WIN64=YES) - endif() - - if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - list(APPEND NMAKE_OPTIONS PROJ_FLAGS=-DPROJ_STATIC) - list(APPEND NMAKE_OPTIONS CURL_CFLAGS=-DCURL_STATICLIB) - else() - # Enables PDBs for release and debug builds - list(APPEND NMAKE_OPTIONS WITH_PDB=1) - endif() - - if (VCPKG_CRT_LINKAGE STREQUAL static) - set(LINKAGE_FLAGS "/MT") - else() - set(LINKAGE_FLAGS "/MD") - endif() - - list(APPEND NMAKE_OPTIONS_REL - ${NMAKE_OPTIONS} - CXX_CRT_FLAGS=${LINKAGE_FLAGS} - PROJ_LIBRARY=${PROJ_LIBRARY_REL} - PNG_LIB=${PNG_LIBRARY_REL} - GEOS_LIB=${GEOS_LIBRARY_REL} - EXPAT_LIB=${EXPAT_LIBRARY_REL} - "CURL_LIB=${CURL_LIBRARY_REL} wsock32.lib wldap32.lib winmm.lib" - "SQLITE_LIB=${SQLITE_LIBRARY_REL} ${SPATIALITE_LIBRARY_REL}" - OPENJPEG_LIB=${OPENJPEG_LIBRARY_REL} - WEBP_LIBS=${WEBP_LIBRARY_REL} - LIBXML2_LIB=${XML2_LIBRARY_REL} - ZLIB_LIB=${ZLIB_LIBRARY_REL} - ) - if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") - # Static Build does not like PG_LIB - list(APPEND NMAKE_OPTIONS_REL PG_LIB=${PGSQL_LIBRARY_REL}) - endif() - - list(APPEND NMAKE_OPTIONS_DBG - ${NMAKE_OPTIONS} - CXX_CRT_FLAGS="${LINKAGE_FLAGS}d" - PROJ_LIBRARY=${PROJ_LIBRARY_DBG} - PNG_LIB=${PNG_LIBRARY_DBG} - GEOS_LIB=${GEOS_LIBRARY_DBG} - EXPAT_LIB=${EXPAT_LIBRARY_DBG} - "CURL_LIB=${CURL_LIBRARY_DBG} wsock32.lib wldap32.lib winmm.lib" - "SQLITE_LIB=${SQLITE_LIBRARY_DBG} ${SPATIALITE_LIBRARY_DBG}" - OPENJPEG_LIB=${OPENJPEG_LIBRARY_DBG} - WEBP_LIBS=${WEBP_LIBRARY_DBG} - LIBXML2_LIB=${XML2_LIBRARY_DBG} - ZLIB_LIB=${ZLIB_LIBRARY_DBG} - DEBUG=1 - ) - if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") - # Static Build does not like PG_LIB - list(APPEND NMAKE_OPTIONS_DBG PG_LIB=${PGSQL_LIBRARY_DBG}) - endif() - # Begin build process - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - ################ - # Release build - ################ - message(STATUS "Building ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc - "${NMAKE_OPTIONS_REL}" - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME nmake-build-${TARGET_TRIPLET}-release - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - ################ - # Debug build - ################ - - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${NMAKE} /G -f makefile.vc - "${NMAKE_OPTIONS_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - endif() - - message(STATUS "Packaging ${TARGET_TRIPLET}") - - if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/gdal/html) - endif() - - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc - "${NMAKE_OPTIONS_REL}" - "install" - "devinstall" - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME nmake-install-${TARGET_TRIPLET} - ) - - if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib) - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(COPY ${SOURCE_PATH_RELEASE}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + + if (VCPKG_CRT_LINKAGE STREQUAL "static") + set(LINKAGE_FLAGS "/MT") + else() + set(LINKAGE_FLAGS "/MD") endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(COPY ${SOURCE_PATH_DEBUG}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) + list(APPEND NMAKE_OPTIONS_REL + ${NMAKE_OPTIONS} + "GDAL_HOME=${CURRENT_PACKAGES_DIR}" + "CXX_CRT_FLAGS=${LINKAGE_FLAGS}" + "PROJ_LIBRARY=${PROJ_LIBRARY_REL}" + "PNG_LIB=${PNG_LIBRARY_REL}" + "GEOS_LIB=${GEOS_LIBRARY_REL}" + "EXPAT_LIB=${EXPAT_LIBRARY_REL}" + "CURL_LIB=${CURL_LIBRARY_REL} wsock32.lib wldap32.lib winmm.lib" + "SQLITE_LIB=${SQLITE_LIBRARY_REL} ${SPATIALITE_LIBRARY_REL}" + "OPENJPEG_LIB=${OPENJPEG_LIBRARY_REL}" + "WEBP_LIBS=${WEBP_LIBRARY_REL}" + "LIBXML2_LIB=${XML2_LIBRARY_REL} ${ICONV_LIBRARY_REL} ${LZMA_LIBRARY_REL}" + "ZLIB_LIB=${ZLIB_LIBRARY_REL}" + "PG_LIB=${PGSQL_LIBRARY_REL} Secur32.lib Shell32.lib Advapi32.lib Crypt32.lib Gdi32.lib ${OPENSSL_LIBRARY_REL}" + ) + + list(APPEND NMAKE_OPTIONS_DBG + ${NMAKE_OPTIONS} + "GDAL_HOME=${CURRENT_PACKAGES_DIR}/debug" + "CXX_CRT_FLAGS=${LINKAGE_FLAGS}d" + "PROJ_LIBRARY=${PROJ_LIBRARY_DBG}" + "PNG_LIB=${PNG_LIBRARY_DBG}" + "GEOS_LIB=${GEOS_LIBRARY_DBG}" + "EXPAT_LIB=${EXPAT_LIBRARY_DBG}" + "CURL_LIB=${CURL_LIBRARY_DBG} wsock32.lib wldap32.lib winmm.lib" + "SQLITE_LIB=${SQLITE_LIBRARY_DBG} ${SPATIALITE_LIBRARY_DBG}" + "OPENJPEG_LIB=${OPENJPEG_LIBRARY_DBG}" + "WEBP_LIBS=${WEBP_LIBRARY_DBG}" + "LIBXML2_LIB=${XML2_LIBRARY_DBG} ${ICONV_LIBRARY_DBG} ${LZMA_LIBRARY_DBG}" + "ZLIB_LIB=${ZLIB_LIBRARY_DBG}" + "PG_LIB=${PGSQL_LIBRARY_DBG} Secur32.lib Shell32.lib Advapi32.lib Crypt32.lib Gdi32.lib ${OPENSSL_LIBRARY_DBG}" + DEBUG=1 + ) + + if("tools" IN_LIST FEATURES) + list(APPEND NMAKE_OPTIONS_REL "BUILD_TOOLS=1") + else() + list(APPEND NMAKE_OPTIONS_REL "BUILD_TOOLS=0") + endif() + list(APPEND NMAKE_OPTIONS_DBG "BUILD_TOOLS=0") + + # Begin build process + vcpkg_install_nmake( + SOURCE_PATH "${SOURCE_PATH}" + TARGET devinstall + OPTIONS_RELEASE + "${NMAKE_OPTIONS_REL}" + OPTIONS_DEBUG + "${NMAKE_OPTIONS_DBG}" + ) + + if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/gdal/html") endif() - else() + if("tools" IN_LIST FEATURES) + set(GDAL_EXES + gdal_contour + gdal_create + gdal_grid + gdal_rasterize + gdal_translate + gdal_viewshed + gdaladdo + gdalbuildvrt + gdaldem + gdalenhance + gdalinfo + gdallocationinfo + gdalmanage + gdalmdiminfo + gdalmdimtranslate + gdalsrsinfo + gdaltindex + gdaltransform + gdalwarp + gnmanalyse + gnmmanage + nearblack + ogr2ogr + ogrinfo + ogrlineref + ogrtindex + testepsg + ) + # vcpkg_copy_tools removed the bin directories for us so no need to remove again + vcpkg_copy_tools(TOOL_NAMES ${GDAL_EXES} AUTO_CLEAN) + elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + endif() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/share/gdal/html") - set(GDAL_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/gdal) - file(MAKE_DIRECTORY ${GDAL_TOOL_PATH}) + vcpkg_copy_pdbs() - file(GLOB GDAL_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) - file(COPY ${GDAL_TOOLS} DESTINATION ${GDAL_TOOL_PATH}) - file(REMOVE_RECURSE ${GDAL_TOOLS}) + if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/gdal204.pdb") + endif() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) +else() + # See https://github.com/microsoft/vcpkg/issues/16990 + file(TOUCH "${SOURCE_PATH}/config.rpath") + + set(CONF_OPTS + --with-hide-internal-symbols=yes + --with-perl=no + --with-python=no + --with-java=no + ) + set(CONF_CHECKS "") + function(add_config option check) + list(APPEND CONF_OPTS "${option}") + set(CONF_OPTS "${CONF_OPTS}" PARENT_SCOPE) + list(APPEND CONF_CHECKS "${check}") + set(CONF_CHECKS "${CONF_CHECKS}" PARENT_SCOPE) + endfunction() + # parameters in the same order as the dependencies in vcpkg.json + add_config("--with-cfitsio=yes" "CFITSIO support: external") + add_config("--with-curl=yes" "cURL support .wms/wcs/....:yes") + add_config("--with-expat=yes" "Expat support: yes") + add_config("--with-geos=yes" "GEOS support: yes") + add_config("--with-gif=yes" "LIBGIF support: external") + add_config("--with-hdf5=yes" "HDF5 support: yes") + add_config("--with-libjson=yes" "checking for JSONC... yes") + add_config("--with-geotiff=yes" "LIBGEOTIFF support: external") + add_config("--with-jpeg=yes" "LIBJPEG support: external") + add_config("--with-liblzma=yes" "LIBLZMA support: yes") + add_config("--with-png=yes" "LIBPNG support: external") + add_config("--with-pg=yes" "PostgreSQL support: yes") + add_config("--with-webp=yes" "WebP support: yes") + add_config("--with-xml2=yes" "libxml2 support: yes") + add_config("--with-netcdf=yes" "NetCDF support: yes") + add_config("--with-openjpeg=yes" "OpenJPEG support: yes") + add_config("--with-proj=yes" "PROJ >= 6: yes") + add_config("--with-sqlite3=yes" "SQLite support: yes") + add_config("--with-libtiff=yes" "LIBTIFF support: external") + add_config("--with-libz=yes" "LIBZ support: external") + add_config("--with-zstd=yes" "ZSTD support: yes") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND CONF_OPTS --without-libtool --without-ld-shared) + endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) + if("system-libraries" IN_LIST FEATURES) + set(DISABLE_SYSTEM_LIBRARIES OFF) + else() + set(DISABLE_SYSTEM_LIBRARIES ON) endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(COPY ${SOURCE_PATH_DEBUG}/gdal${GDAL_VERSION_LIB}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) + + if ("libspatialite" IN_LIST FEATURES) + add_config("--with-spatialite=yes" "SpatiaLite support: yes") + elseif(DISABLE_SYSTEM_LIBRARIES) + add_config("--with-spatialite=no" "SpatiaLite support: no") endif() - endif() - - # Copy over PDBs - vcpkg_copy_pdbs() - - if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal204.pdb) - endif() - -elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") # Build in UNIX - # Check build system first - find_program(MAKE make) - if (NOT MAKE) - message(FATAL_ERROR "MAKE not found") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - ################ - # Release build - ################ - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release) - file(MAKE_DIRECTORY ${OUT_PATH_RELEASE}) - vcpkg_execute_required_process( - COMMAND "${SOURCE_PATH_RELEASE}/configure" --prefix=${OUT_PATH_RELEASE} - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND make - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME make-build-${TARGET_TRIPLET}-release - ) + if ("mysql-libmariadb" IN_LIST FEATURES) + add_config("--with-mysql=yes" "MySQL support: yes") + elseif(DISABLE_SYSTEM_LIBRARIES) + add_config("--with-mysql=no" "MySQL support: no") + endif() - message(STATUS "Installing ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND make install - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME make-install-${TARGET_TRIPLET}-release - ) + if(DISABLE_SYSTEM_LIBRARIES) + list(APPEND CONF_OPTS + # Too much: --disable-all-optional-drivers + # alphabetical order + --with-armadillo=no + --with-charls=no + --with-crypto=no + --with-cryptopp=no + --with-dds=no + --with-dods-root=no + --with-ecw=no + --with-epsilon=no + --with-exr=no + --with-fgdb=no + --with-fme=no + --with-freexl=no + --with-grass=no + --with-gta=no + --with-hdf4=no + --with-hdfs=no + --with-heif=no + --with-idb=no + --with-ingres=no + --with-jasper=no + --with-jp2lura=no + --with-kakadu=no + --with-kea=no + --with-libdeflate=no + --with-libgrass=no + --with-libkml=no + --with-mdb=no + --with-mrsid=no + --with-mrsid_lidar=no + --with-msg=no + --with-mongocxx=no + --with-mongocxxv3=no + --with-oci=no + --with-odbc=no + --with-ogdi=no + --with-opencl=no + --with-pcidsk=no + --with-pcraster=no + --with-pcre=no + --with-pdfium=no + --with-podofo=no + --with-poppler=no + --with-qhull=no + --with-rasdaman=no + --with-rasterlite2=no + --with-rdb=no + --with-sfcgal=no + --with-sosi=no + --with-teigha=no + --with-tiledb=no + --with-xerces=no + ) + endif() - file(REMOVE_RECURSE ${OUT_PATH_RELEASE}/lib/gdalplugins) - file(COPY ${OUT_PATH_RELEASE}/lib/pkgconfig DESTINATION ${OUT_PATH_RELEASE}/share/gdal) - file(REMOVE_RECURSE ${OUT_PATH_RELEASE}/lib/pkgconfig) - file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) - file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR}) - file(COPY ${OUT_PATH_RELEASE}/share DESTINATION ${CURRENT_PACKAGES_DIR}) - message(STATUS "Installing ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - ################ - # Debug build - ################ - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - set(OUT_PATH_DEBUG ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-debug) - file(MAKE_DIRECTORY ${OUT_PATH_DEBUG}) - vcpkg_execute_required_process( - COMMAND "${SOURCE_PATH_DEBUG}/configure" --prefix=${OUT_PATH_DEBUG} - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME config-${TARGET_TRIPLET}-debug - ) + # proj needs a C++ runtime library + if(VCPKG_TARGET_IS_OSX) + list(APPEND CONF_OPTS "--with-proj-extra-lib-for-test=-lc++") + else() + list(APPEND CONF_OPTS "--with-proj-extra-lib-for-test=-lstdc++") + endif() - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND make - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME make-build-${TARGET_TRIPLET}-debug - ) + if("tools" IN_LIST FEATURES) + list(APPEND CONF_OPTS "--with-tools=yes") + else() + list(APPEND CONF_OPTS "--with-tools=no") + endif() - message(STATUS "Installing ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND make -j install - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME make-install-${TARGET_TRIPLET}-debug - ) + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + COPY_SOURCE + OPTIONS + ${CONF_OPTS} + OPTIONS_DEBUG + --enable-debug + --with-tools=no + ) + + # Verify configuration results (tightly coupled to vcpkg_configure_make) + function(check_config logfile) + set(failed_checks "") + file(READ "${logfile}" log) + foreach(check IN LISTS CONF_CHECKS) + if(NOT log MATCHES "${check}") + string(APPEND failed_checks "\n ${check}") + endif() + endforeach() + if(failed_checks) + get_filename_component(file "${logfile}" NAME_WE) + message(FATAL_ERROR "${file}: Configuration failed for ${failed_checks}") + endif() + endfunction() + foreach(suffix IN ITEMS rel dbg) + set(log "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-${suffix}-out.log") + if(EXISTS "${log}") + check_config("${log}") + endif() + endforeach() + + vcpkg_install_make(MAKEFILE GNUmakefile) + + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/lib/gdalplugins" + "${CURRENT_PACKAGES_DIR}/debug/lib/gdalplugins" + "${CURRENT_PACKAGES_DIR}/debug/share" + ) + + vcpkg_fixup_pkgconfig() + set(pc_file_debug "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gdal.pc") + if(EXISTS "${pc_file_debug}") + vcpkg_replace_string("${pc_file_debug}" "${prefix}/../../include" "${prefix}/../include") + vcpkg_replace_string("${pc_file_debug}" "${exec_prefix}/include" "${prefix}/../include") + endif() - file(REMOVE_RECURSE ${OUT_PATH_DEBUG}/lib/gdalplugins) - file(REMOVE_RECURSE ${OUT_PATH_DEBUG}/lib/pkgconfig) - file(COPY ${OUT_PATH_DEBUG}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) - message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") - endif() -else() # Other build system - message(FATAL_ERROR "Unsupport build system.") endif() +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) + # Handle copyright -configure_file(${SOURCE_PATH_RELEASE}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/gdal/copyright COPYONLY) +file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/gdal/usage b/ports/gdal/usage new file mode 100644 index 00000000000000..63a67bc07d0748 --- /dev/null +++ b/ports/gdal/usage @@ -0,0 +1,5 @@ +The package GDAL provides CMake targets: + + find_package(GDAL REQUIRED) + target_include_directories(main PRIVATE ${GDAL_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${GDAL_LIBRARIES}) diff --git a/ports/gdal/vcpkg-cmake-wrapper.cmake b/ports/gdal/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..77e48eb4ad90e7 --- /dev/null +++ b/ports/gdal/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,100 @@ +include(SelectLibraryConfigurations) + +find_path(GDAL_INCLUDE_DIR + NAMES gdal.h + PATHS "${CMAKE_CURRENT_LIST_DIR}/../../include" + NO_DEFAULT_PATH +) +find_library(GDAL_LIBRARY_DEBUG + NAMES gdal_d gdal_i_d gdal + NAMES_PER_DIR + PATHS "${CMAKE_CURRENT_LIST_DIR}/../../debug/lib" + NO_DEFAULT_PATH +) +find_library(GDAL_LIBRARY_RELEASE + NAMES gdal_i gdal + NAMES_PER_DIR + PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib" + NO_DEFAULT_PATH +) +select_library_configurations(GDAL) + +if(NOT GDAL_INCLUDE_DIR OR NOT GDAL_LIBRARY) + message(FATAL_ERROR "Installation of vcpkg port gdal is broken.") +endif() + +set(GDAL_LIBRARY "${GDAL_LIBRARY}" CACHE STRING "") + +set(FindGDAL_SKIP_GDAL_CONFIG TRUE) + +_find_package(${ARGS}) + +set(_gdal_dep_find_args "") +if(";${ARGS};" MATCHES ";REQUIRED;") + list(APPEND _gdal_dep_find_args "REQUIRED") +endif() +function(_gdal_add_dependency target package) + find_package(${package} ${ARGN} ${_gdal_dep_find_args}) + if(${package}_FOUND) + foreach(suffix IN ITEMS "" "-shared" "_shared" "-static" "_static" "-NOTFOUND") + set(dependency "${target}${suffix}") + if(TARGET ${dependency}) + break() + endif() + endforeach() + if(NOT TARGET ${dependency}) + string(TOUPPER ${package} _gdal_deps_package) + if(DEFINED ${_gdal_deps_package}_LIBRARIES) + set(dependency ${${_gdal_deps_package}_LIBRARIES}) + elseif(DEFINED ${package}_LIBRARIES) + set(dependency ${${package}_LIBRARIES}) + elseif(DEFINED ${_gdal_deps_package}_LIBRARY) + set(dependency ${${_gdal_deps_package}_LIBRARY}) + elseif(DEFINED ${package}_LIBRARY) + set(dependency ${${package}_LIBRARY}) + endif() + endif() + if(dependency) + if(TARGET GDAL::GDAL) # CMake 3.14 + set_property(TARGET GDAL::GDAL APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${dependency}) + endif() + if(NOT GDAL_LIBRARIES STREQUAL "GDAL::GDAL") + set(GDAL_LIBRARIES "${GDAL_LIBRARIES};${dependency}" PARENT_SCOPE) + endif() + else() + message(WARNING "Did not find which libraries are exported by ${package}") + set(GDAL_FOUND false PARENT_SCOPE) + endif() + else() + set(GDAL_FOUND false PARENT_SCOPE) + endif() +endfunction() +if(GDAL_FOUND) + _gdal_add_dependency(cfitsio unofficial-cfitsio CONFIG) + _gdal_add_dependency(CURL::libcurl CURL CONFIG) + _gdal_add_dependency(expat::expat expat CONFIG) + _gdal_add_dependency(GEOS::geos_c geos CONFIG) + _gdal_add_dependency(GIF::GIF GIF) + _gdal_add_dependency(hdf5::hdf5 hdf5 CONFIG) + if(NOT WIN32) + _gdal_add_dependency(json-c::json-c json-c CONFIG) + endif() + _gdal_add_dependency(geotiff_library geotiff CONFIG) + _gdal_add_dependency(JPEG::JPEG JPEG) + _gdal_add_dependency(liblzma::liblzma liblzma CONFIG) + _gdal_add_dependency(png libpng CONFIG) + _gdal_add_dependency(PostgreSQL::PostgreSQL PostgreSQL) + _gdal_add_dependency(WebP::webp WebP CONFIG) + _gdal_add_dependency(LibXml2::LibXml2 LibXml2) + _gdal_add_dependency(netCDF::netcdf netCDF CONFIG) + _gdal_add_dependency(openjp2 OpenJPEG CONFIG) + _gdal_add_dependency(PROJ::proj PROJ4 CONFIG) + _gdal_add_dependency(unofficial::sqlite3::sqlite3 unofficial-sqlite3 CONFIG) + _gdal_add_dependency(TIFF::TIFF TIFF) + _gdal_add_dependency(ZLIB::ZLIB ZLIB) + _gdal_add_dependency(zstd::libzstd zstd CONFIG) + list(FIND ARGS "REQUIRED" required) + if(NOT GDAL_FOUND AND NOT required EQUAL "-1") + message(FATAL_ERROR "Failed to find dependencies of GDAL") + endif() +endif() diff --git a/ports/gdal/vcpkg.json b/ports/gdal/vcpkg.json new file mode 100644 index 00000000000000..12e83cb84d850b --- /dev/null +++ b/ports/gdal/vcpkg.json @@ -0,0 +1,55 @@ +{ + "name": "gdal", + "version-semver": "3.2.2", + "port-version": 5, + "description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data", + "homepage": "https://gdal.org", + "supports": "!arm", + "dependencies": [ + "cfitsio", + "curl", + "expat", + "geos", + "giflib", + "hdf5", + { + "name": "json-c", + "platform": "!windows" + }, + "libgeotiff", + "libjpeg-turbo", + "liblzma", + "libpng", + "libpq", + "libwebp", + "libxml2", + "netcdf-c", + "openjpeg", + "proj4", + "sqlite3", + "tiff", + "zlib", + "zstd" + ], + "features": { + "libspatialite": { + "description": "Create or update SpatiaLite databases using libspatialite", + "dependencies": [ + "libspatialite" + ] + }, + "mysql-libmariadb": { + "description": "Add mysql support using libmariadb", + "dependencies": [ + "libmariadb" + ] + }, + "system-libraries": { + "$supports": "!windows", + "description": "Include drivers which need additional libraries" + }, + "tools": { + "description": "Builds gdal and ogr executables" + } + } +} diff --git a/ports/gdcm/CONTROL b/ports/gdcm/CONTROL deleted file mode 100644 index 3b49ddec4c52d2..00000000000000 --- a/ports/gdcm/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gdcm -Version: 3.0.0-4 -Description: Grassroots DICOM library -Build-Depends: zlib, expat, openjpeg diff --git a/ports/gdcm/Fix-Cmake_DIR.patch b/ports/gdcm/Fix-Cmake_DIR.patch new file mode 100644 index 00000000000000..189b28e05a09b2 --- /dev/null +++ b/ports/gdcm/Fix-Cmake_DIR.patch @@ -0,0 +1,41 @@ +diff --git a/CMake/ExportConfiguration/GDCMConfig.cmake.in b/CMake/ExportConfiguration/GDCMConfig.cmake.in +index f8e9d0b..ab28546 100644 +--- a/CMake/ExportConfiguration/GDCMConfig.cmake.in ++++ b/CMake/ExportConfiguration/GDCMConfig.cmake.in +@@ -33,28 +33,28 @@ if(GDCM_USE_VTK) + set(GDCM_VTK_DIR "@GDCM_VTK_DIR_CONFIG@") + endif() + +-get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +-if(EXISTS ${SELF_DIR}/GDCMTargets.cmake) ++get_filename_component(GDCM_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) ++if(EXISTS ${GDCM_SELF_DIR}/GDCMTargets.cmake) + # This is an install tree +- include(${SELF_DIR}/GDCMTargets.cmake) +- get_filename_component(GDCM_INCLUDE_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE) ++ include(${GDCM_SELF_DIR}/GDCMTargets.cmake) ++ get_filename_component(GDCM_INCLUDE_ROOT "${GDCM_SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE) + set(GDCM_INCLUDE_DIRS ${GDCM_INCLUDE_ROOT}) +- get_filename_component(GDCM_LIB_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE) ++ get_filename_component(GDCM_LIB_ROOT "${GDCM_SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE) + set(GDCM_LIBRARY_DIRS ${GDCM_LIB_ROOT}) + else() +- if(EXISTS ${SELF_DIR}/GDCMExports.cmake) ++ if(EXISTS ${GDCM_SELF_DIR}/GDCMExports.cmake) + # This is a build tree + set( GDCM_INCLUDE_DIRS "@GDCM_INCLUDE_PATH@") + set(GDCM_LIBRARY_DIRS "@GDCM_LIBRARY_DIR@") + +- include(${SELF_DIR}/GDCMExports.cmake) ++ include(${GDCM_SELF_DIR}/GDCMExports.cmake) + + else() + message(FATAL_ERROR "ooops") + endif() + endif() + +-set(GDCM_USE_FILE ${SELF_DIR}/UseGDCM.cmake) ++set(GDCM_USE_FILE ${GDCM_SELF_DIR}/UseGDCM.cmake) + + # Backward compatible part: + set(GDCM_FOUND TRUE) diff --git a/ports/gdcm/portfile.cmake b/ports/gdcm/portfile.cmake index b5e825a373f966..b5c72d619f1746 100644 --- a/ports/gdcm/portfile.cmake +++ b/ports/gdcm/portfile.cmake @@ -1,16 +1,17 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO malaterre/GDCM - REF v3.0.0 - SHA512 2ac076dd49011234f4431ffe67fcba84a1ca9042ec5fc4dfc8aed2ed16bec5f499fa7aa666e5630796afc266ce76741d931cca333534b55fdc477e25a9189d33 + REF c0824c0ae66e9f9e3c8bddba8b65238c1c28481d # v3.0.7 + SHA512 1889f18f7164e1395e2cf5fe29b6ccd615f9a31433d1a7bda19cac472b20bc52018ef45bd9d9ca72ecb248c9fd5d895b94bfd111157693f70e0b90cf7b582edd HEAD_REF master PATCHES use-openjpeg-config.patch fix-share-path.patch + Fix-Cmake_DIR.patch ) file(REMOVE ${SOURCE_PATH}/CMake/FindOpenJPEG.cmake) @@ -43,14 +44,14 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ) -file(READ ${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake GDCM_TARGETS) -string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" - "set(CMAKE_IMPORT_FILE_VERSION 1) -find_package(OpenJPEG QUIET)" GDCM_TARGETS "${GDCM_TARGETS}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake "${GDCM_TARGETS}") +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake + "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1) + find_package(OpenJPEG QUIET)" +) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gdcm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/gdcm/vcpkg.json b/ports/gdcm/vcpkg.json new file mode 100644 index 00000000000000..78e3866995ac26 --- /dev/null +++ b/ports/gdcm/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "gdcm", + "version-string": "3.0.7", + "port-version": 2, + "description": "Grassroots DICOM library", + "homepage": "https://github.com/malaterre/GDCM", + "supports": "!uwp & !(windows & (arm | arm64))", + "dependencies": [ + "expat", + "openjpeg", + "zlib" + ] +} diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL deleted file mode 100644 index e7f43b1609f8ce..00000000000000 --- a/ports/gdcm2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gdcm2 -Version: deprecated -Homepage: https://github.com/malaterre/GDCM -Description: This port was renamed to gdcm. The gdcm2 name is deprecated. -Build-Depends: gdcm \ No newline at end of file diff --git a/ports/gdcm2/vcpkg.json b/ports/gdcm2/vcpkg.json new file mode 100644 index 00000000000000..bdbe890c59bdc3 --- /dev/null +++ b/ports/gdcm2/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "gdcm2", + "version-string": "deprecated", + "port-version": 1, + "description": "This port was renamed to gdcm. The gdcm2 name is deprecated.", + "homepage": "https://github.com/malaterre/GDCM", + "dependencies": [ + "gdcm" + ] +} diff --git a/ports/gdk-pixbuf/CMakeLists.txt b/ports/gdk-pixbuf/CMakeLists.txt deleted file mode 100644 index 04524cb4fe1821..00000000000000 --- a/ports/gdk-pixbuf/CMakeLists.txt +++ /dev/null @@ -1,143 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(gdk-pixbuf C) - -set(GDK_PIXBUF_LIB_SUFFIX 2.0) -set(GDK_PIXBUF_DLL_SUFFIX 2) -set(GDK_PIXBUF_BINARY_VERSION 2.10.0) -set(GLIB_LIB_VERSION 2.0) - -find_package(ZLIB REQUIRED) -find_package(PNG REQUIRED) - -find_package(unofficial-glib CONFIG REQUIRED) -find_path(GLIB_INCLUDE_DIR glib.h) - -if(WIN32) - find_package(unofficial-gettext CONFIG REQUIRED) - find_path(LIBINTL_INCLUDE_DIR libintl.h) - configure_file(${CMAKE_SOURCE_DIR}/config.h.win32 ${CMAKE_SOURCE_DIR}/config.h COPYONLY) -else() - configure_file(${CMAKE_SOURCE_DIR}/config.h.linux ${CMAKE_SOURCE_DIR}/config.h COPYONLY) -endif() -include_directories(. ./gdk-pixbuf) - -set(SOURCES - gdk-pixbuf/gdk-pixbuf.c - gdk-pixbuf/gdk-pixbuf-animation.c - gdk-pixbuf/gdk-pixbuf-data.c - gdk-pixbuf/gdk-pixbuf-io.c - gdk-pixbuf/gdk-pixbuf-loader.c - gdk-pixbuf/gdk-pixbuf-scale.c - gdk-pixbuf/gdk-pixbuf-simple-anim.c - gdk-pixbuf/gdk-pixbuf-scaled-anim.c - gdk-pixbuf/gdk-pixbuf-util.c - gdk-pixbuf/gdk-pixdata.c - gdk-pixbuf/gdk-pixbuf-enum-types.c - gdk-pixbuf/gdk-pixbuf-marshal.c - gdk-pixbuf/io-ani.c - gdk-pixbuf/io-ani-animation.c - gdk-pixbuf/io-icns.c - gdk-pixbuf/io-pnm.c - gdk-pixbuf/io-png.c - gdk-pixbuf/io-qtif.c - gdk-pixbuf/io-tga.c - gdk-pixbuf/gdk-pixbuf-buffer-queue.c - gdk-pixbuf/io-xpm.c - gdk-pixbuf/io-xbm.c - gdk-pixbuf/pixops/pixops.c -) -if(WIN32) - list(APPEND SOURCES - gdk-pixbuf/io-gdip-animation.c - gdk-pixbuf/io-gdip-bmp.c - gdk-pixbuf/io-gdip-emf.c - gdk-pixbuf/io-gdip-gif.c - gdk-pixbuf/io-gdip-ico.c - gdk-pixbuf/io-gdip-jpeg.c - gdk-pixbuf/io-gdip-tiff.c - gdk-pixbuf/io-gdip-utils.c - gdk-pixbuf/io-gdip-wmf.c -) -endif() -add_library(gdk-pixbuf ${SOURCES}) - -target_include_directories(gdk-pixbuf PRIVATE - ${GLIB_INCLUDE_DIR} - ${PNG_INCLUDE_DIRS} - ${ZLIB_INCLUDE_DIRS} - ${LIBINTL_INCLUDE_DIR}) - -set(LIBS - unofficial::glib::gio unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject - ${ZLIB_LIBRARIES} - ${PNG_LIBRARIES} -) -if(WIN32) - list(APPEND LIBS Gdiplus unofficial::gettext::libintl) -else() - list(APPEND LIBS m) -endif() - -target_link_libraries(gdk-pixbuf ${LIBS}) - -set(DEFS - HAVE_CONFIG_H - GDK_PIXBUF_COMPILATION - GDK_PIXBUF_ENABLE_BACKEND - DLL_EXPORT - GDK_PIXBUF_RELOCATABLE - GDK_PIXBUF_PREFIX="/dummy" - GDK_PIXBUF_BINARY_VERSION="${GDK_PIXBUF_BINARY_VERSION}" - INCLUDE_ani - INCLUDE_tga - INCLUDE_xbm - INCLUDE_png - INCLUDE_qtif - INCLUDE_pnm - INCLUDE_icns - INCLUDE_xpm - G_DISABLE_SINGLE_INCLUDES - GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) -if(WIN32) - list(APPEND DEFS INCLUDE_gdiplus) -endif() -target_compile_definitions(gdk-pixbuf PRIVATE ${DEFS}) - -set_target_properties(gdk-pixbuf PROPERTIES - OUTPUT_NAME gdk_pixbuf-${GDK_PIXBUF_DLL_SUFFIX} - ARCHIVE_OUTPUT_NAME gdk_pixbuf-${GDK_PIXBUF_LIB_SUFFIX}) - -install(TARGETS gdk-pixbuf - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) - -macro(gdk_add_tool TOOL_NAME) - add_executable(${TOOL_NAME} ${ARGN}) - target_include_directories(${TOOL_NAME} PRIVATE ${GLIB_INCLUDE_DIR}) - target_link_libraries(${TOOL_NAME} gdk-pixbuf ${GLIB_LIBRARIES}) - install(TARGETS ${TOOL_NAME} RUNTIME DESTINATION tools/gdk-pixbuf) -endmacro() - -if(NOT GDK_SKIP_TOOLS) - gdk_add_tool(gdk-pixbuf-csource gdk-pixbuf/gdk-pixbuf-csource.c) - gdk_add_tool(gdk-pixbuf-pixdata gdk-pixbuf/gdk-pixbuf-pixdata.c) -endif() - -if(NOT GDK_SKIP_HEADERS) - INSTALL(FILES - gdk-pixbuf/gdk-pixbuf.h - gdk-pixbuf/gdk-pixbuf-autocleanups.h - gdk-pixbuf/gdk-pixbuf-core.h - gdk-pixbuf/gdk-pixbuf-transform.h - gdk-pixbuf/gdk-pixbuf-io.h - gdk-pixbuf/gdk-pixbuf-animation.h - gdk-pixbuf/gdk-pixbuf-simple-anim.h - gdk-pixbuf/gdk-pixbuf-loader.h - gdk-pixbuf/gdk-pixbuf-enum-types.h - gdk-pixbuf/gdk-pixbuf-marshal.h - gdk-pixbuf/gdk-pixbuf-features.h - gdk-pixbuf/gdk-pixdata.h - gdk-pixbuf/gdk-pixbuf-macros.h - DESTINATION include/gdk-pixbuf) -endif() diff --git a/ports/gdk-pixbuf/CONTROL b/ports/gdk-pixbuf/CONTROL deleted file mode 100644 index 7fa34b21ad4008..00000000000000 --- a/ports/gdk-pixbuf/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gdk-pixbuf -Version: 2.36.9-3 -Homepage: https://developer.gnome.org/gdk-pixbuf/ -Description: Image loading library. -Build-Depends: gettext, zlib, libpng, glib diff --git a/ports/gdk-pixbuf/config.h.linux b/ports/gdk-pixbuf/config.h.linux deleted file mode 100644 index f6738732821365..00000000000000 --- a/ports/gdk-pixbuf/config.h.linux +++ /dev/null @@ -1,158 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 to replace the build-time prefix in modules */ -/* #undef GDK_PIXBUF_RELOCATABLE */ - -/* Define if gio can sniff image data */ -#define GDK_PIXBUF_USE_GIO_MIME 1 - -/* The prefix for our gettext translation domains. */ -#define GETTEXT_PACKAGE "gdk-pixbuf" - -/* Define to 1 if you have the `bind_textdomain_codeset' function. */ -#define HAVE_BIND_TEXTDOMAIN_CODESET 1 - -/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYCURRENT */ - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -#define HAVE_DCGETTEXT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#define HAVE_GETTEXT 1 - -/* Define if you have the iconv() function and it works. */ -/* #undef HAVE_ICONV */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if libm has lrint */ -#define HAVE_LRINT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 is libjpeg supports progressive JPEG */ -#define HAVE_PROGRESSIVE_JPEG 1 - -/* Define to 1 if libm has round */ -#define HAVE_ROUND 1 - -/* Define to 1 if you have the `setrlimit' function. */ -#define HAVE_SETRLIMIT 1 - -/* Define to 1 if sigsetjmp is available */ -#define HAVE_SIGSETJMP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if sys/sysinfo.h is available */ -#define HAVE_SYS_SYSINFO_H 1 - -/* Define to 1 if sys/systeminfo.h is available */ -/* #undef HAVE_SYS_SYSTEMINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Define to 1 if it's a darwin platform */ -/* #undef OS_DARWIN */ - -/* Define to 1 if it's a Linux platform */ -#define OS_LINUX 1 - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=gdk-pixbuf" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gdk-pixbuf" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gdk-pixbuf 2.36.9" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gdk-pixbuf" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "2.36.9" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if gmodule works and should be used */ -#define USE_GMODULE 1 - -/* Whether to load modules via .la files rather than directly */ -/* #undef USE_LA_MODULES */ - -/* Define to 1 if medialib is available and should be used */ -/* #undef USE_MEDIALIB */ - -/* Define to 1 if medialib 2.5 is available */ -/* #undef USE_MEDIALIB25 */ - -/* Define to 1 if MMX is available and should be used */ -/* #undef USE_MMX */ - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* defines how to decorate public symbols while building */ -#define _GDK_PIXBUF_EXTERN __attribute__((visibility("default"))) extern - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ diff --git a/ports/gdk-pixbuf/fix_build.patch b/ports/gdk-pixbuf/fix_build.patch new file mode 100644 index 00000000000000..2afdd9c86c4741 --- /dev/null +++ b/ports/gdk-pixbuf/fix_build.patch @@ -0,0 +1,67 @@ +diff --git a/build-aux/post-install.bat b/build-aux/post-install.bat +index 6994d49e1..b4789dd62 100644 +--- a/build-aux/post-install.bat ++++ b/build-aux/post-install.bat +@@ -7,8 +7,8 @@ set binary_version=%3 + set libdir_windows=%libdir:/=\% + + if not "%DESTDIR%" == "" goto warn_msg +-if not exist %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\ mkdir %libdir_windows%\gdk-pixbuf-2.0\%binary_version% +-%bindir%\gdk-pixbuf-query-loaders > %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\loaders.cache ++if not exist %libdir_windows%\..\gdk-pixbuf-2.0\%binary_version%\ mkdir %libdir_windows%\..\gdk-pixbuf-2.0\%binary_version% ++%bindir%\gdk-pixbuf-query-loaders > %libdir_windows%\..\gdk-pixbuf-2.0\%binary_version%\loaders.cache + + goto end + +@@ -18,7 +18,7 @@ echo *** Warning: loaders.cache not built + echo *** + echo *** You should generate this file manually on the host system + echo *** using: +-echo *** gdk-pixbuf-query-loaders ^> %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\loaders.cache ++echo *** gdk-pixbuf-query-loaders ^> %libdir_windows%\..\gdk-pixbuf-2.0\%binary_version%\loaders.cache + echo *** + + :end +diff --git a/build-aux/post-install.sh b/build-aux/post-install.sh +index 661bceeef..0b1a46527 100644 +--- a/build-aux/post-install.sh ++++ b/build-aux/post-install.sh +@@ -5,14 +5,14 @@ libdir="$2" + binary_version="$3" + + if [ -z "$DESTDIR" ]; then +- mkdir -p "$libdir/gdk-pixbuf-2.0/$binary_version" +- $bindir/gdk-pixbuf-query-loaders > "$libdir/gdk-pixbuf-2.0/$binary_version/loaders.cache" ++ mkdir -p "$libdir/../gdk-pixbuf-2.0/$binary_version" ++ $bindir/gdk-pixbuf-query-loaders > "$libdir/../gdk-pixbuf-2.0/$binary_version/loaders.cache" + else + echo "***" + echo "*** Warning: loaders.cache not built" + echo "***" + echo "*** You should generate this file manually on the host system" + echo "*** using:" +- echo "*** gdk-pixbuf-query-loaders > $libdir/gdk-pixbuf-2.0/$binary_version/loaders.cache" ++ echo "*** gdk-pixbuf-query-loaders > $libdir/../gdk-pixbuf-2.0/$binary_version/loaders.cache" + echo "***" + fi +diff --git a/meson.build b/meson.build +index c38607029..4b5df91ae 100644 +--- a/meson.build ++++ b/meson.build +@@ -308,12 +310,12 @@ endif + # Don't check and build the jpeg loader if native_windows_loaders is true + if get_option('jpeg') and not native_windows_loaders + if cc.has_header('jpeglib.h') +- jpeg_dep = cc.find_library('jpeg', required: false) +- if cc.get_id() == 'msvc' and not jpeg_dep.found() ++ jpeg_dep = dependency('libjpeg', required: false) ++ #if cc.get_id() == 'msvc' and not jpeg_dep.found() + # The IJG JPEG library builds the .lib file as libjpeg.lib in its MSVC build system, + # so look for it as well when jpeg.lib cannot be found +- jpeg_dep = cc.find_library('libjpeg', required: false) +- endif ++ # jpeg_dep = cc.find_library('libjpeg', required: false) ++ #endif + if jpeg_dep.found() and cc.has_function('jpeg_destroy_decompress', dependencies: jpeg_dep) + enabled_loaders += 'jpeg' + loaders_deps += jpeg_dep diff --git a/ports/gdk-pixbuf/fix_build_error_windows.patch b/ports/gdk-pixbuf/fix_build_error_windows.patch new file mode 100644 index 00000000000000..b6f6332dac9189 --- /dev/null +++ b/ports/gdk-pixbuf/fix_build_error_windows.patch @@ -0,0 +1,21 @@ +diff --git a/meson.build b/meson.build +index b39c55d..4b050c7 100644 +--- a/meson.build ++++ b/meson.build +@@ -89,8 +89,14 @@ if cc.has_function('round', dependencies: mathlib_dep) + gdk_pixbuf_conf.set('HAVE_ROUND', 1) + endif + +-if cc.has_function('lrint', dependencies: mathlib_dep) +- gdk_pixbuf_conf.set('HAVE_LRINT', 1) ++if cc.get_id() == 'msvc' ++ if cc.has_function('lrint', dependencies: mathlib_dep, args: '-Oi-') ++ gdk_pixbuf_conf.set('HAVE_LRINT', 1) ++ endif ++else ++ if cc.has_function('lrint', dependencies: mathlib_dep) ++ gdk_pixbuf_conf.set('HAVE_LRINT', 1) ++ endif + endif + + if cc.has_function('bind_textdomain_codeset', prefix: '#include ') diff --git a/ports/gdk-pixbuf/portfile.cmake b/ports/gdk-pixbuf/portfile.cmake index ef65115d00a181..bf16064f89e9ea 100644 --- a/ports/gdk-pixbuf/portfile.cmake +++ b/ports/gdk-pixbuf/portfile.cmake @@ -1,29 +1,71 @@ -include(vcpkg_common_functions) +set(GDK_PIXBUF_VERSION 2.42) +set(GDK_PIXBUF_PATCH 2) -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - -set(GDK_PIXBUF_VERSION 2.36) -set(GDK_PIXBUF_PATCH 9) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/${GDK_PIXBUF_VERSION}/gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz" + URLS "https://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/${GDK_PIXBUF_VERSION}/gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz" FILENAME "gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz" - SHA512 ab8f2cda4490012936b094a1321e64b85e1fa1f8d070fae135a514f87f695201b845f4192e4a02954e2767d44314c0a95d727118853528182952d15890130261) - -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.linux ${SOURCE_PATH}/config.h.linux) + SHA512 f341d032ea410efed7a35f8ca6a7389bf988f663dae16e774d114d6f11611e9e182c835e90d752b71c258c905cc5c4c785ea697feed5e6921a2a676c9deaa5f2 +) -vcpkg_configure_cmake( +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix_build.patch + fix_build_error_windows.patch +) +if(VCPKG_TARGET_IS_WINDOWS) + #list(APPEND OPTIONS -Dnative_windows_loaders=true) # Use Windows system components to handle BMP, EMF, GIF, ICO, JPEG, TIFF and WMF images, overriding jpeg and tiff. To build this into gdk-pixbuf, pass in windows" with the other loaders to build in or use "all" with the builtin_loaders option +endif() +vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DGDK_SKIP_HEADERS=ON - -DGDK_SKIP_TOOLS=ON) + OPTIONS + -Dman=false # Whether to generate man pages (requires xlstproc) + -Dgtk_doc=false # Whether to generate the API reference (requires GTK-Doc) + -Ddocs=false + -Dpng=true # Enable PNG loader (requires libpng) + -Dtiff=true # Enable TIFF loader (requires libtiff), disabled on Windows if "native_windows_loaders" is used + -Djpeg=true # Enable JPEG loader (requires libjpeg), disabled on Windows if "native_windows_loaders" is used + -Dintrospection=disabled # Whether to generate the API introspection data (requires GObject-Introspection) + -Drelocatable=true # Whether to enable application bundle relocation support + -Dinstalled_tests=false + -Dgio_sniffing=false # Perform file type detection using GIO (Unused on MacOS and Windows) + -Dbuiltin_loaders=all # since it is unclear where loadable plugins should be located; + # Comma-separated list of loaders to build into gdk-pixbuf, or "none", or "all" to build all buildable loaders into gdk-pixbuf + ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + ) +vcpkg_install_meson(ADD_BIN_TO_PATH) + +# Fix paths in pc file. +set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gdk-pixbuf-2.0.pc") +if(EXISTS "${_file}") + file(READ "${_file}" _contents) + string(REPLACE [[${bindir}]] "\${bindir}/../../tools/${PORT}" _contents "${_contents}") + string(REPLACE [[gdk_pixbuf_binarydir=${libdir}/gdk-pixbuf-2.0/2.10.0]] "gdk_pixbuf_binarydir=\${libdir}/../gdk-pixbuf-2.0/2.10.0" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") +endif() +set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gdk-pixbuf-2.0.pc") +if(EXISTS "${_file}") + file(READ "${_file}" _contents) + string(REPLACE [[${bindir}]] "\${bindir}/../tools/${PORT}" _contents "${_contents}") + string(REPLACE [[gdk_pixbuf_binarydir=${libdir}/gdk-pixbuf-2.0/2.10.0]] "gdk_pixbuf_binarydir=\${libdir}/../gdk-pixbuf-2.0/2.10.0" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") +endif() + +vcpkg_fixup_pkgconfig() + +set(TOOL_NAMES gdk-pixbuf-csource gdk-pixbuf-pixdata gdk-pixbuf-query-loaders gdk-pixbuf-thumbnailer) + +if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_TARGET_IS_WINDOWS) + list(REMOVE_ITEM TOOL_NAMES gdk-pixbuf-thumbnailer) +endif() -vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/gdk-pixbuf) +vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gdk-pixbuf) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gdk-pixbuf/COPYING ${CURRENT_PACKAGES_DIR}/share/gdk-pixbuf/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/gdk-pixbuf/vcpkg.json b/ports/gdk-pixbuf/vcpkg.json new file mode 100644 index 00000000000000..ca65da57a9f2f3 --- /dev/null +++ b/ports/gdk-pixbuf/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "gdk-pixbuf", + "version": "2.42.2", + "port-version": 1, + "description": "Image loading library.", + "homepage": "https://developer.gnome.org/gdk-pixbuf/", + "dependencies": [ + "gettext", + "glib", + { + "name": "glib", + "host": true + }, + "libpng", + "tiff", + "zlib" + ] +} diff --git a/ports/genann/CONTROL b/ports/genann/CONTROL deleted file mode 100644 index 6397319bba1272..00000000000000 --- a/ports/genann/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: genann -Version: 2019-07-10 -Homepage: https://github.com/codeplea/genann -Description: Genann is a minimal, well-tested library for training and using feedforward artificial neural networks (ANN) in C. diff --git a/ports/genann/portfile.cmake b/ports/genann/portfile.cmake index 4f1c21d0625fc2..56bcd4aeefc31b 100644 --- a/ports/genann/portfile.cmake +++ b/ports/genann/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/genann/vcpkg.json b/ports/genann/vcpkg.json new file mode 100644 index 00000000000000..7e9de881533bc8 --- /dev/null +++ b/ports/genann/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "genann", + "version-string": "2019-07-10", + "port-version": 1, + "description": "Genann is a minimal, well-tested library for training and using feedforward artificial neural networks (ANN) in C.", + "homepage": "https://github.com/codeplea/genann" +} diff --git a/ports/geogram/CONTROL b/ports/geogram/CONTROL deleted file mode 100644 index 4eb40eee04619b..00000000000000 --- a/ports/geogram/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: geogram -Version: 1.6.9-7 -Homepage: https://gforge.inria.fr/projects/geogram/ -Description: Geogram is a programming library of geometric algorithms. -Build-Depends: openblas (!osx), clapack (!osx) - -Feature: graphics -Description: Build viewers and geogram_gfx library. -Build-Depends: glfw3 diff --git a/ports/geogram/fix-cmake-config-and-install.patch b/ports/geogram/fix-cmake-config-and-install.patch index 2c7790923f1426..8eb16c364bec17 100644 --- a/ports/geogram/fix-cmake-config-and-install.patch +++ b/ports/geogram/fix-cmake-config-and-install.patch @@ -1,9 +1,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 17dc02e..e489d75 100644 +index 2e54997..169e33c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -42,7 +42,7 @@ set(VORPALINE_VERSION_MINOR 6) - set(VORPALINE_VERSION_PATCH 9) +@@ -51,7 +51,7 @@ set(VORPALINE_VERSION_MINOR 7) + set(VORPALINE_VERSION_PATCH 5) set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH}) -set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR}) @@ -11,7 +11,7 @@ index 17dc02e..e489d75 100644 # Determine the current Build-OS (Build-platform without the compiler info) string(REGEX REPLACE "-[^-]+$" "" VORPALINE_OS ${VORPALINE_PLATFORM}) -@@ -106,6 +106,11 @@ if(GEOGRAM_WITH_VORPALINE) +@@ -113,6 +113,11 @@ if(GEOGRAM_WITH_VORPALINE) add_subdirectory(src/lib/vorpalib) endif() @@ -23,7 +23,7 @@ index 17dc02e..e489d75 100644 add_subdirectory(src/lib/third_party) if(GEOGRAM_WITH_GRAPHICS) -@@ -138,8 +143,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt) +@@ -145,8 +150,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt) # FindGeogram.cmake @@ -70,10 +70,10 @@ index 17dc02e..e489d75 100644 # Configure CPack diff --git a/src/lib/geogram/CMakeLists.txt b/src/lib/geogram/CMakeLists.txt -index d90bc48..927f857 100644 +index 49cb2ba..82c2f39 100755 --- a/src/lib/geogram/CMakeLists.txt +++ b/src/lib/geogram/CMakeLists.txt -@@ -47,7 +47,14 @@ if(WIN32) +@@ -62,7 +62,14 @@ if(WIN32) endif() # Install the library @@ -90,10 +90,10 @@ index d90bc48..927f857 100644 # Install include files for the standard devkit install( diff --git a/src/lib/geogram_gfx/CMakeLists.txt b/src/lib/geogram_gfx/CMakeLists.txt -index f319b93..e24039d 100644 +index b155975..ad66440 100755 --- a/src/lib/geogram_gfx/CMakeLists.txt +++ b/src/lib/geogram_gfx/CMakeLists.txt -@@ -33,14 +33,21 @@ if(VORPALINE_BUILD_DYNAMIC) +@@ -47,14 +47,21 @@ if(VORPALINE_BUILD_DYNAMIC) endif() # Install the library @@ -117,7 +117,7 @@ index f319b93..e24039d 100644 ) # Install include files for the full devkit -@@ -48,7 +55,7 @@ install( +@@ -62,7 +69,7 @@ install( DIRECTORY . DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx COMPONENT devkit-full @@ -127,7 +127,7 @@ index f319b93..e24039d 100644 install( diff --git a/src/lib/third_party/numerics/CMakeLists.txt b/src/lib/third_party/numerics/CMakeLists.txt -index 5789cd2..e4262e3 100644 +index c9c3a6e..f16d7ec 100644 --- a/src/lib/third_party/numerics/CMakeLists.txt +++ b/src/lib/third_party/numerics/CMakeLists.txt @@ -10,16 +10,19 @@ endif() @@ -154,7 +154,7 @@ index 5789cd2..e4262e3 100644 target_link_libraries(geogram_num_3rdparty m) endif() diff --git a/src/lib/third_party/numerics/LIBF2C/getarg_.c b/src/lib/third_party/numerics/LIBF2C/getarg_.c -index 2b69a1e..a504538 100644 +index 2b69a1e..1cde8b6 100755 --- a/src/lib/third_party/numerics/LIBF2C/getarg_.c +++ b/src/lib/third_party/numerics/LIBF2C/getarg_.c @@ -17,20 +17,20 @@ VOID getarg_(n, s, ls) ftnint *n; char *s; ftnlen ls; @@ -193,7 +193,7 @@ index 2b69a1e..a504538 100644 } #endif diff --git a/src/lib/third_party/numerics/LIBF2C/iargc_.c b/src/lib/third_party/numerics/LIBF2C/iargc_.c -index 2f29da0..50b00de 100644 +index 2f29da0..50b00de 100755 --- a/src/lib/third_party/numerics/LIBF2C/iargc_.c +++ b/src/lib/third_party/numerics/LIBF2C/iargc_.c @@ -9,8 +9,9 @@ ftnint iargc_() diff --git a/ports/geogram/fix-windows-dynamic.patch b/ports/geogram/fix-windows-dynamic.patch new file mode 100644 index 00000000000000..8df3b906f1f55b --- /dev/null +++ b/ports/geogram/fix-windows-dynamic.patch @@ -0,0 +1,11 @@ +diff --git a/src/lib/geogram/CMakeLists.txt b/src/lib/geogram/CMakeLists.txt +index 49cb2ba..82c2f39 100755 +--- a/src/lib/geogram/CMakeLists.txt ++++ b/src/lib/geogram/CMakeLists.txt +@@ -62,3 +62,6 @@ if(WIN32) + endif() ++if(WIN32 AND VORPALINE_BUILD_DYNAMIC) ++ target_compile_definitions(geogram PUBLIC GEO_DYNAMIC_LIBS) ++endif() + + # Install the library diff --git a/ports/geogram/portfile.cmake b/ports/geogram/portfile.cmake index 5da48ff893eade..8618b0412b2dc1 100644 --- a/ports/geogram/portfile.cmake +++ b/ports/geogram/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - -set(GEOGRAM_VERSION 1.6.9) +set(GEOGRAM_VERSION 1.7.5) +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_download_distfile(ARCHIVE - URLS "https://gforge.inria.fr/frs/download.php/file/37779/geogram_${GEOGRAM_VERSION}.tar.gz" - FILENAME "geogram_${GEOGRAM_VERSION}.tar.gz" - SHA512 1b5c7540bef734c1908f213f26780aba63b4911a8022d5eb3f7c90eabe2cb69efd1f298b30cdc8e2c636a5b37c8c25832dd4aad0b7c2ff5f0a5b5caa17970136 + URLS "https://gforge.inria.fr/frs/download.php/file/38314/geogram_${GEOGRAM_VERSION}.tar.gz" + FILENAME "geogram_${GEOGRAM_VERSION}_47dcbb8.tar.gz" + SHA512 47dcbb8a5c4e5f791feb8d9b209b04b575b0757e8b89de09c82ef2324a36d4056a1f3001537038c8a752045b0e6b6eedf5421ad49132214c0f60163ff095c36f ) vcpkg_extract_source_archive_ex( @@ -14,39 +13,46 @@ vcpkg_extract_source_archive_ex( REF ${GEOGRAM_VERSION} PATCHES fix-cmake-config-and-install.patch + fix-windows-dynamic.patch ) file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake) -set(GEOGRAM_WITH_GRAPHICS OFF) -if("graphics" IN_LIST FEATURES) - set(GEOGRAM_WITH_GRAPHICS ON) -endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "graphics" GEOGRAM_WITH_GRAPHICS +) if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(VORPALINE_BUILD_DYNAMIC FALSE) - if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") + if (VCPKG_TARGET_IS_WINDOWS) set(VORPALINE_PLATFORM Win-vs-generic) endif() - if (VCPKG_CMAKE_SYSTEM_NAME MATCHES "Linux") + if (VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS) + message("geogram on Windows with CRT dynamic linkage only supports dynamic library linkage. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) + set(VORPALINE_PLATFORM Win-vs-dynamic-generic) + endif() + if (VCPKG_TARGET_IS_LINUX) message("geogram on Linux only supports dynamic library linkage. Building dynamic.") set(VCPKG_LIBRARY_LINKAGE dynamic) set(VORPALINE_PLATFORM Linux64-gcc-dynamic ) endif() - if (VCPKG_CMAKE_SYSTEM_NAME MATCHES "Darwin") + if (VCPKG_TARGET_IS_OSX) message("geogram on Darwin only supports dynamic library linkage. Building dynamic.") set(VCPKG_LIBRARY_LINKAGE dynamic) set(VORPALINE_PLATFORM Darwin-clang-dynamic) endif() else() set(VORPALINE_BUILD_DYNAMIC TRUE) - if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") + if (VCPKG_TARGET_IS_WINDOWS) set(VORPALINE_PLATFORM Win-vs-generic) endif() - if (VCPKG_CMAKE_SYSTEM_NAME MATCHES "Linux") + if (VCPKG_TARGET_IS_LINUX) set(VORPALINE_PLATFORM Linux64-gcc-dynamic ) endif() - if (VCPKG_CMAKE_SYSTEM_NAME MATCHES "Darwin") + if (VCPKG_TARGET_IS_OSX) set(VORPALINE_PLATFORM Darwin-clang-dynamic) endif() endif() @@ -57,11 +63,11 @@ vcpkg_configure_cmake( #PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DVORPALINE_BUILD_DYNAMIC=${VORPALINE_BUILD_DYNAMIC} - -DGEOGRAM_WITH_GRAPHICS=${GEOGRAM_WITH_GRAPHICS} -DGEOGRAM_LIB_ONLY=ON -DGEOGRAM_USE_SYSTEM_GLFW3=ON -DVORPALINE_PLATFORM=${VORPALINE_PLATFORM} -DGEOGRAM_WITH_VORPALINE=OFF + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -73,6 +79,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/geogram/GeogramTargets.cmake + [[INTERFACE_INCLUDE_DIRECTORIES "/src/lib;${_IMPORT_PREFIX}/include"]] + [[INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"]] + ) + # Handle copyright -file(COPY ${SOURCE_PATH}/doc/devkit/license.dox DESTINATION ${CURRENT_PACKAGES_DIR}/share/geogram) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/geogram/license.dox ${CURRENT_PACKAGES_DIR}/share/geogram/copyright) +file(INSTALL ${SOURCE_PATH}/doc/devkit/license.dox DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/geogram/vcpkg.json b/ports/geogram/vcpkg.json new file mode 100644 index 00000000000000..f3d3175b2e4248 --- /dev/null +++ b/ports/geogram/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "geogram", + "version-string": "1.7.5", + "port-version": 4, + "description": "Geogram is a programming library of geometric algorithms.", + "homepage": "https://gforge.inria.fr/projects/geogram/", + "supports": "!uwp", + "dependencies": [ + "blas", + "lapack" + ], + "features": { + "graphics": { + "description": "Build viewers and geogram_gfx library.", + "dependencies": [ + "glfw3" + ] + } + } +} diff --git a/ports/geographiclib/CONTROL b/ports/geographiclib/CONTROL deleted file mode 100644 index 1c4c5a17d0d5ed..00000000000000 --- a/ports/geographiclib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: geographiclib -Version: 1.47-patch1-6 -Homepage: https://sourceforge.net/projects/geographiclib/ -Description: a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems. diff --git a/ports/geographiclib/cxx-library-only.patch b/ports/geographiclib/cxx-library-only.patch new file mode 100644 index 00000000000000..d1201794b55597 --- /dev/null +++ b/ports/geographiclib/cxx-library-only.patch @@ -0,0 +1,139 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eb08bd48..88552153 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -196,6 +196,11 @@ else () + set (DEVELOPER OFF) + endif () + ++set (INSTALL_TOOL_DIR "tools/geographiclib") ++file (RELATIVE_PATH PROJECT_LIB_DIR ++ "${CMAKE_INSTALL_PREFIX}/${INSTALL_TOOL_DIR}" ++ "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") ++ + if (NOT MSVC) + # Set the run time path for shared libraries for non-Windows machines. + # (1) include link path for external packages (not needed with +@@ -207,7 +212,7 @@ if (NOT MSVC) + # (2) include installed path for GeographicLib. + if (NOT APPLE) + # Use relative path so that package is relocatable +- set (CMAKE_INSTALL_RPATH "\$ORIGIN/../lib${LIB_SUFFIX}") ++ set (CMAKE_INSTALL_RPATH "\$ORIGIN/${PROJECT_LIB_DIR}") + else () + # cmake 2.8.12 introduced a way to make the package relocatable. + # See also INSTALL_RPATH property on the tools. +@@ -434,12 +439,12 @@ endif () + # documentation files into the source tree. Skip Apple here because + # man/makeusage.sh uses "head --lines -4" to drop the last 4 lines of a + # file and there's no simple equivalent for MacOSX +-if (NOT WIN32 AND NOT APPLE) ++if (NOT WIN32 AND NOT APPLE AND FALSE) + find_program (HAVE_POD2MAN pod2man) + find_program (HAVE_POD2HTML pod2html) + find_program (HAVE_COL col) + endif () +-if (HAVE_POD2MAN AND HAVE_POD2HTML AND HAVE_COL) ++if (HAVE_POD2MAN AND HAVE_POD2HTML AND HAVE_COL AND FALSE) + set (MAINTAINER ON) + else () + set (MAINTAINER OFF) +@@ -466,25 +471,34 @@ if (WIN32) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") + endif () + ++if (SKIP_TOOLS) ++ set (TOOLS) ++ set (SCRIPTS) ++else () + # The list of tools (to be installed into, e.g., /usr/local/bin) + set (TOOLS CartConvert ConicProj GeodesicProj GeoConvert GeodSolve + GeoidEval Gravity MagneticField Planimeter RhumbSolve TransverseMercatorProj) + # The list of scripts (to be installed into, e.g., /usr/local/sbin) + set (SCRIPTS geographiclib-get-geoids geographiclib-get-gravity + geographiclib-get-magnetic) ++endif () + + set_property (GLOBAL PROPERTY USE_FOLDERS ON) + + # The list of subdirectories to process + add_subdirectory (src) + add_subdirectory (include/GeographicLib) ++if (NOT SKIP_TOOLS) + add_subdirectory (tools) ++endif () ++if (FALSE) + add_subdirectory (man) + add_subdirectory (doc) + add_subdirectory (js) + add_subdirectory (matlab) + add_subdirectory (python/geographiclib) + add_subdirectory (examples) ++endif () + if (MSVC AND BUILD_NETGEOGRAPHICLIB) + if (GEOGRAPHICLIB_PRECISION EQUAL 2) + set (NETGEOGRAPHICLIB_LIBRARIES NETGeographicLib) +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index fd0669f2..4744e08d 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -56,13 +56,7 @@ export (TARGETS + # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative + # path to the root from there. (Note that the whole install tree can + # be relocated.) +-if (COMMON_INSTALL_PATH) +- # Install under lib${LIB_SUFFIX} so that 32-bit and 64-bit packages +- # can be installed on a single machine. +- set (INSTALL_CMAKE_DIR "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}") +-else () +- set (INSTALL_CMAKE_DIR "cmake") +-endif () ++set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME_LOWER}") + # Find root of install tree relative to INSTALL_CMAKE_DIR + file (RELATIVE_PATH PROJECT_ROOT_DIR + "${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}") +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index 3fa8ec6a..92c73946 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -1,7 +1,7 @@ + # Build the tools... + + # Where to find the *.usage files for the --help option. +-include_directories (${PROJECT_BINARY_DIR}/man) ++include_directories (${PROJECT_SOURCE_DIR}/man) + # Only needed if target_compile_definitions is not supported + add_definitions (${PROJECT_DEFINITIONS}) + +@@ -16,7 +16,7 @@ foreach (TOOL ${TOOLS}) + add_dependencies (tools ${TOOL}) + + set_source_files_properties (${TOOL}.cpp PROPERTIES +- OBJECT_DEPENDS ${PROJECT_BINARY_DIR}/man/${TOOL}.usage) ++ OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/man/${TOOL}.usage) + + target_link_libraries (${TOOL} ${PROJECT_LIBRARIES} ${HIGHPREC_LIBRARIES}) + +@@ -31,11 +31,11 @@ endif () + if (APPLE) + # Ensure that the package is relocatable + set_target_properties (${TOOLS} PROPERTIES +- INSTALL_RPATH "@loader_path/../lib${LIB_SUFFIX}") ++ INSTALL_RPATH "@loader_path/${PROJECT_LIB_DIR}") + endif () + + # Specify where the tools are installed, adding them to the export targets +-install (TARGETS ${TOOLS} EXPORT targets DESTINATION bin) ++install (TARGETS ${TOOLS} DESTINATION "${INSTALL_TOOL_DIR}") + + if (MSVC AND PACKAGE_DEBUG_LIBS) + # Possibly don't EXPORT the debug versions of the tools and then this +@@ -55,7 +55,7 @@ set_property (TARGET tools ${TOOLS} PROPERTY FOLDER tools) + # systems. This needs to substitute ${GEOGRAPHICLIB_DATA} as the + # default data directory. These are installed under sbin, because it is + # expected to be run with write access to /usr/local. +-if (NOT WIN32) ++if (NOT WIN32 AND FALSE) + foreach (SCRIPT ${SCRIPTS}) + configure_file (${SCRIPT}.sh scripts/${SCRIPT} @ONLY) + add_custom_command (OUTPUT ${SCRIPT} diff --git a/ports/geographiclib/portfile.cmake b/ports/geographiclib/portfile.cmake index 8f4a716dce012b..3b7bd3f51fa256 100644 --- a/ports/geographiclib/portfile.cmake +++ b/ports/geographiclib/portfile.cmake @@ -1,58 +1,54 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "https://jaist.dl.sourceforge.net/project/geographiclib/distrib/GeographicLib-1.47-patch1.zip" - FILENAME "geographiclib-1.47-patch1.zip" - SHA512 d8fdfd7ae093057ec1a4ab922457fe71a3fb9975df5b673c276d62a0e9c4f212dc63652830b9d89e3890bc96aafd335992943cf6a1bce8260acf932d1eb7abfd -) -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge ( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - remove-tools-and-fix-version.patch + REPO geographiclib + REF distrib + FILENAME "GeographicLib-1.52.tar.gz" + SHA512 98a4d33764db4a4755851a7db639fd9e055dcf4f1f949258e112fce2e198076b5896fcae2c1ea36b37fe1000d28eec326636a730e70f25bc19a1610423ba6859 + PATCHES cxx-library-only.patch +) + +vcpkg_check_features ( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + "tools" SKIP_TOOLS +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set (LIB_TYPE "SHARED") +else () + set (LIB_TYPE "STATIC") +endif () + +if (tools IN_LIST FEATURES) + vcpkg_fail_port_install ( + MESSAGE "Cannot build GeographicLib tools for UWP" + ON_TARGET uwp + ) +endif () + +vcpkg_configure_cmake ( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + "-DGEOGRAPHICLIB_LIB_TYPE=${LIB_TYPE}" + ${FEATURE_OPTIONS} + PREFER_NINJA # Disable this option if project cannot be built with Ninja ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DGEOGRAPHICLIB_LIB_TYPE=SHARED - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 - ) -else() - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DGEOGRAPHICLIB_LIB_TYPE=STATIC - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 - ) -endif() - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -vcpkg_copy_pdbs() - -file(COPY ${CURRENT_PACKAGES_DIR}/lib/pkgconfig DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(INSTALL ${SOURCE_PATH}/00README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib RENAME readme) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib RENAME copyright) +vcpkg_install_cmake () +vcpkg_fixup_cmake_targets (CONFIG_PATH share/geographiclib) +vcpkg_copy_pdbs () + +if (tools IN_LIST FEATURES) + vcpkg_copy_tool_dependencies (${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif () + +file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) +file (INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + +# Install usage +configure_file (${CMAKE_CURRENT_LIST_DIR}/usage + ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) diff --git a/ports/geographiclib/remove-tools-and-fix-version.patch b/ports/geographiclib/remove-tools-and-fix-version.patch deleted file mode 100644 index d4f94e02c000b9..00000000000000 --- a/ports/geographiclib/remove-tools-and-fix-version.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e79923b..3448362 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -437,13 +437,13 @@ set_property (GLOBAL PROPERTY USE_FOLDERS ON) - # The list of subdirectories to process - add_subdirectory (src) - add_subdirectory (include/GeographicLib) --add_subdirectory (tools) --add_subdirectory (man) --add_subdirectory (doc) --add_subdirectory (js) --add_subdirectory (matlab) --add_subdirectory (python/geographiclib) --add_subdirectory (examples) -+# add_subdirectory (tools) -+# add_subdirectory (man) -+# add_subdirectory (doc) -+# add_subdirectory (js) -+# add_subdirectory (matlab) -+# add_subdirectory (python/geographiclib) -+# add_subdirectory (examples) - if (MSVC AND BUILD_NETGEOGRAPHICLIB) - if (GEOGRAPHICLIB_PRECISION EQUAL 2) - set (NETGEOGRAPHICLIB_LIBRARIES NETGeographicLib) -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 0c8ad64..7dc4096 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -14,10 +14,10 @@ configure_file (project-config.cmake.in - configure_file (project-config-version.cmake.in - "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake" @ONLY) - export (TARGETS -- ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS} -+ ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} - FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-targets.cmake") - export (TARGETS -- ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS} -+ ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} - NAMESPACE ${PROJECT_NAME}:: - FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-namespace-targets.cmake") - -diff --git a/cmake/project-config-version.cmake.in b/cmake/project-config-version.cmake.in -index 3b3b9e8..bc2ce19 100644 ---- a/cmake/project-config-version.cmake.in -+++ b/cmake/project-config-version.cmake.in -@@ -18,10 +18,10 @@ elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR - # since a multi-architecture library is built for that platform). - set (REASON "sizeof(*void) = @CMAKE_SIZEOF_VOID_P@") - set (PACKAGE_VERSION_UNSUITABLE TRUE) --elseif (MSVC AND NOT MSVC_VERSION STREQUAL "@MSVC_VERSION@") -+#elseif (MSVC AND NOT MSVC_VERSION STREQUAL "@MSVC_VERSION@") - # Reject if there's a mismatch in MSVC compiler versions -- set (REASON "_MSC_VER = @MSVC_VERSION@") -- set (PACKAGE_VERSION_UNSUITABLE TRUE) -+# set (REASON "_MSC_VER = @MSVC_VERSION@") -+# set (PACKAGE_VERSION_UNSUITABLE TRUE) - elseif (NOT CMAKE_CROSSCOMPILING STREQUAL "@CMAKE_CROSSCOMPILING@") - # Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING} - set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@") diff --git a/ports/geographiclib/usage b/ports/geographiclib/usage new file mode 100644 index 00000000000000..b4834435d5954b --- /dev/null +++ b/ports/geographiclib/usage @@ -0,0 +1,4 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: + + find_package (GeographicLib CONFIG REQUIRED) + target_link_libraries (main PRIVATE ${GeographicLib_LIBRARIES}) diff --git a/ports/geographiclib/vcpkg.json b/ports/geographiclib/vcpkg.json new file mode 100644 index 00000000000000..df18eaf32021b4 --- /dev/null +++ b/ports/geographiclib/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "geographiclib", + "version": "1.52", + "description": "GeographicLib, a C++ library for performing geographic conversions", + "homepage": "https://geographiclib.sourceforge.io", + "features": { + "tools": { + "description": "The GeographicLib tools" + } + } +} diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL deleted file mode 100644 index 3366b6a5e6368d..00000000000000 --- a/ports/geos/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: geos -Version: 3.6.3-3 -Homepage: https://www.osgeo.org/projects/geos/ -Description: Geometry Engine Open Source diff --git a/ports/geos/dont-build-astyle.patch b/ports/geos/dont-build-astyle.patch new file mode 100644 index 00000000000000..0d5561d2a307a5 --- /dev/null +++ b/ports/geos/dont-build-astyle.patch @@ -0,0 +1,12 @@ +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index f0f616e..8a81a2a 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -40,7 +40,6 @@ if(NOT MSVC) + + endif() + +-add_subdirectory(astyle) + + # if(UNIX OR MINGW) + diff --git a/ports/geos/dont-build-docs.patch b/ports/geos/dont-build-docs.patch new file mode 100644 index 00000000000000..fcd2742c8cd75a --- /dev/null +++ b/ports/geos/dont-build-docs.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b78ca54b..507df2af 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -264,7 +264,6 @@ add_subdirectory(benchmarks) + #----------------------------------------------------------------------------- + # Documentation/Examples + #----------------------------------------------------------------------------- +-add_subdirectory(doc) + + #----------------------------------------------------------------------------- + # Install and export targets - support 'make install' or equivalent diff --git a/ports/geos/fix-static-deps.patch b/ports/geos/fix-static-deps.patch new file mode 100644 index 00000000000000..680e185eb78395 --- /dev/null +++ b/ports/geos/fix-static-deps.patch @@ -0,0 +1,68 @@ +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index 8a81a2a..724a68c 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -13,6 +13,15 @@ + + + if(NOT MSVC) ++ # C++ libraries needed even for the C API, for geos-config and geos.pc. ++ set(cxx_libs "") ++ foreach(lib IN ITEMS stdc++ c++) ++ if(lib IN_LIST CMAKE_CXX_IMPLICIT_LINK_LIBRARIES) ++ string(APPEND cxx_libs "-l${lib} ") ++ break() ++ endif() ++ endforeach() ++ + # Consider CMAKE_INSTALL_PREFIX with spaces + string(REPLACE " " "\\ " ESCAPED_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) + configure_file( +diff --git a/tools/geos-config.cmake b/tools/geos-config.cmake +index 4c546b5..4bdbc47 100644 +--- a/tools/geos-config.cmake ++++ b/tools/geos-config.cmake +@@ -29,6 +29,12 @@ if test $# -eq 0; then + usage 1 1>&2 + fi + ++if test "@BUILD_SHARED_LIBS@" = "ON"; then ++ extra_libs= ++else ++ extra_libs="-lgeos -lm @cxx_libs@" ++fi ++ + while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; +@@ -47,16 +53,16 @@ while test $# -gt 0; do + echo -L${libdir} -lgeos-@GEOS_VERSION_MAJOR@ + ;; + --clibs) +- echo -L${libdir} -lgeos_c ++ echo -L${libdir} -lgeos_c ${extra_libs} + ;; + --cclibs) +- echo -L${libdir} -lgeos ++ echo -L${libdir} -lgeos ${extra_libs#-lgeos } + ;; + --static-clibs) +- echo -L${libdir} -lgeos_c -lgeos -lm ++ echo -L${libdir} -lgeos_c -lgeos -lm @cxx_libs@ + ;; + --static-cclibs) +- echo -L${libdir} -lgeos -lm ++ echo -L${libdir} -lgeos -lm @cxx_libs@ + ;; + --cflags) + echo -I${prefix}/include +diff --git a/tools/geos.pc.cmake b/tools/geos.pc.cmake +index 53f43d9..0ebd4d5 100644 +--- a/tools/geos.pc.cmake ++++ b/tools/geos.pc.cmake +@@ -9,4 +9,4 @@ Requires: + Version: @GEOS_VERSION@ + Cflags: -I${includedir} + Libs: -L${libdir} -lgeos_c +-Libs.private: -lgeos ++Libs.private: -lgeos @cxx_libs@ diff --git a/ports/geos/geos_c-static-support.patch b/ports/geos/geos_c-static-support.patch deleted file mode 100644 index 148e63057faa3f..00000000000000 --- a/ports/geos/geos_c-static-support.patch +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 927a0fe..8e6c3ea 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -66,11 +66,7 @@ if(NOT MSVC) - "Set to ON|OFF (default) to build GEOS with assert() macro enabled" OFF) - endif() - --option(GEOS_BUILD_STATIC -- "Set to OFF|ON (default) to build GEOS static libraries" ON) -- --option(GEOS_BUILD_SHARED -- "Set to OFF|ON (default) to build GEOS shared libraries" ON) -+option(BUILD_SHARED_LIBS "Build GEOS as a shared library" ON) - - if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - option(GEOS_ENABLE_FLOATSTORE -diff --git a/capi/CMakeLists.txt b/capi/CMakeLists.txt -index 859722b..b6e44b6 100644 ---- a/capi/CMakeLists.txt -+++ b/capi/CMakeLists.txt -@@ -23,15 +23,23 @@ file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group iss - - if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK) - # if building OS X framework, CAPI built into C++ library -- add_library(geos_c SHARED ${geos_c_SOURCES}) -+ add_library(geos_c ${geos_c_SOURCES}) - - target_link_libraries(geos_c geos) - - if (WIN32) -- set_target_properties(geos_c -- PROPERTIES -- VERSION ${CAPI_VERSION} -- CLEAN_DIRECT_OUTPUT 1) -+ if(BUILD_SHARED_LIBS) -+ set_target_properties(geos_c -+ PROPERTIES -+ VERSION ${CAPI_VERSION} -+ CLEAN_DIRECT_OUTPUT 1) -+ else() -+ set_target_properties(geos_c -+ PROPERTIES -+ OUTPUT_NAME "geos_c" -+ PREFIX "lib" -+ CLEAN_DIRECT_OUTPUT 1) -+ endif() - else() - set_target_properties(geos_c - PROPERTIES -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 4a1e688..a33b5f6 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -23,7 +23,7 @@ if(GEOS_ENABLE_MACOSX_FRAMEWORK) - ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_c.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_ts_c.cpp) - -- add_library(GEOS SHARED ${geos_SOURCES} ${geos_c_SOURCES}) -+ add_library(GEOS ${geos_SOURCES} ${geos_c_SOURCES}) - - math(EXPR CVERSION "${VERSION_MAJOR} + 1") - # VERSION = current version, SOVERSION = compatibility version -@@ -61,37 +61,27 @@ if(GEOS_ENABLE_MACOSX_FRAMEWORK) - - else() - -- if(GEOS_BUILD_SHARED) -- add_library(geos SHARED ${geos_SOURCES} ${geos_ALL_HEADERS}) -+ add_library(geos ${geos_SOURCES} ${geos_ALL_HEADERS}) - -+ if(BUILD_SHARED_LIBS) - set_target_properties(geos - PROPERTIES - DEFINE_SYMBOL GEOS_DLL_EXPORT - VERSION ${VERSION} - CLEAN_DIRECT_OUTPUT 1) -- -- install(TARGETS geos -- RUNTIME DESTINATION bin -- LIBRARY DESTINATION lib -- ARCHIVE DESTINATION lib) -- endif() -- -- if(GEOS_BUILD_STATIC) -- add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS}) -- -- set_target_properties(geos-static -+ else() -+ set_target_properties(geos - PROPERTIES - OUTPUT_NAME "geos" - PREFIX "lib" - CLEAN_DIRECT_OUTPUT 1) -- -- install(TARGETS geos-static -- RUNTIME DESTINATION bin -- LIBRARY DESTINATION lib -- ARCHIVE DESTINATION lib) -- - endif() - -+ install(TARGETS geos -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) -+ - endif() # (GEOS_ENABLE_MACOSX_FRAMEWORK) - - # if(APPLE) diff --git a/ports/geos/make-geos-config-relocatable.patch b/ports/geos/make-geos-config-relocatable.patch new file mode 100644 index 00000000000000..f3d97b6c2cdfe9 --- /dev/null +++ b/ports/geos/make-geos-config-relocatable.patch @@ -0,0 +1,16 @@ +diff --git a/tools/geos-config.cmake b/tools/geos-config.cmake +index 6730e215..4c546b5c 100644 +--- a/tools/geos-config.cmake ++++ b/tools/geos-config.cmake +@@ -1,7 +1,9 @@ + #!/bin/sh + +-prefix=@ESCAPED_INSTALL_PREFIX@ +-libdir=${prefix}/lib ++DIRNAME=$(dirname $0) ++TOOLS=$(dirname $DIRNAME) ++prefix=$(CDPATH= cd -- "${DIRNAME%/tools/geos/*}" && pwd -P) ++libdir=${prefix}${TOOLS##*/geos}/lib + + usage() + { diff --git a/ports/geos/pc-file-libs-private.patch b/ports/geos/pc-file-libs-private.patch new file mode 100644 index 00000000000000..51302aeb1ad4f4 --- /dev/null +++ b/ports/geos/pc-file-libs-private.patch @@ -0,0 +1,12 @@ +diff --git a/tools/geos.pc.cmake b/tools/geos.pc.cmake +index 0a9df7fb..53f43d90 100644 +--- a/tools/geos.pc.cmake ++++ b/tools/geos.pc.cmake +@@ -9,3 +9,4 @@ Requires: + Version: @GEOS_VERSION@ + Cflags: -I${includedir} + Libs: -L${libdir} -lgeos_c ++Libs.private: -lgeos +-- +2.17.1 + diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake index 673b159f85572c..017db495338b5a 100644 --- a/ports/geos/portfile.cmake +++ b/ports/geos/portfile.cmake @@ -1,44 +1,68 @@ -include(vcpkg_common_functions) - -set(GEOS_VERSION 3.6.3) +set(GEOS_VERSION 3.9.1) vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2" FILENAME "geos-${GEOS_VERSION}.tar.bz2" - SHA512 f88adcf363433e247a51fb1a2c0b53f39b71aba8a6c01dd08aa416c2e980fe274a195e6edcb5bb5ff8ea81b889da14a1a8fb2849e04669aeba3b6d55754dc96a + SHA512 7ea131685cd110ec5e0cb7c214b52b75397371e75f011e1410b6770b6a48ca492a02337d86a7be35c852ef94604fe9d6f49634c79d4946df611aaa4f5cbaee28 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + ARCHIVE "${ARCHIVE}" REF ${GEOS_VERSION} - PATCHES geos_c-static-support.patch + PATCHES + dont-build-docs.patch + dont-build-astyle.patch + pc-file-libs-private.patch + make-geos-config-relocatable.patch + fix-static-deps.patch ) # NOTE: GEOS provides CMake as optional build configuration, it might not be actively # maintained, so CMake build issues may happen between releases. -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +if(VCPKG_TARGET_IS_MINGW) + set(_CMAKE_EXTRA_OPTIONS "-DDISABLE_GEOS_INLINE=ON") +else() + set(_CMAKE_EXTRA_OPTIONS "") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DCMAKE_DEBUG_POSTFIX=d - -DGEOS_ENABLE_TESTS=False + -DBUILD_TESTING=OFF + -DBUILD_BENCHMARKS=OFF + ${_CMAKE_EXTRA_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/GEOS) +vcpkg_fixup_pkgconfig() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +function(geos_add_debug_postfix config_file) + file(READ "${config_file}" contents) + string(REGEX REPLACE "(-lgeos(_c)?)d?([^-_d])" "\\1d\\3" fixed_contents "${contents}") + file(WRITE "${config_file}" "${fixed_contents}") +endfunction() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/geos.pc") + geos_add_debug_postfix("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/geos.pc") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/geos-config") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/geos-config") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/geos-config") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config") + geos_add_debug_postfix("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/geos-config) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/geos) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/geos-config ${CURRENT_PACKAGES_DIR}/share/geos/geos-config) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/geos-config) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() # Handle copyright -configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright COPYONLY) +configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/geos/copyright" COPYONLY) vcpkg_copy_pdbs() +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/geos/usage b/ports/geos/usage new file mode 100644 index 00000000000000..139e40dd27eb92 --- /dev/null +++ b/ports/geos/usage @@ -0,0 +1,10 @@ +The package geos provides CMake targets: + + # C API (provides long-term ABI stability) + find_package(GEOS CONFIG REQUIRED) + target_link_libraries(main PRIVATE GEOS::geos_c) + + # C++ API (will likely change across versions) + find_package(GEOS CONFIG REQUIRED) + target_link_libraries(main PRIVATE GEOS::geos) + diff --git a/ports/geos/vcpkg.json b/ports/geos/vcpkg.json new file mode 100644 index 00000000000000..0df73d3c4906bd --- /dev/null +++ b/ports/geos/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "geos", + "version": "3.9.1", + "port-version": 2, + "description": "Geometry Engine Open Source", + "homepage": "https://www.osgeo.org/projects/geos/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/geotrans/CMakeLists.txt b/ports/geotrans/CMakeLists.txt index ba2af586863397..f2deeda14050df 100644 --- a/ports/geotrans/CMakeLists.txt +++ b/ports/geotrans/CMakeLists.txt @@ -3,98 +3,107 @@ project(geotrans CXX) file(GLOB_RECURSE DTCC_CPP CCS/src/dtcc/*.cpp) include_directories( +CCS/src/CoordinateConversion CCS/src/dtcc -CCS/src/dtcc/Enumerations -CCS/src/dtcc/Exception CCS/src/dtcc/CoordinateSystemParameters CCS/src/dtcc/CoordinateSystems CCS/src/dtcc/CoordinateSystems/albers -CCS/src/dtcc/CoordinateSystems/bonne -CCS/src/dtcc/CoordinateSystems/datum -CCS/src/dtcc/CoordinateSystems/ellipse -CCS/src/dtcc/CoordinateSystems/geocent -CCS/src/dtcc/CoordinateSystems/grinten -CCS/src/dtcc/CoordinateSystems/mercator -CCS/src/dtcc/CoordinateSystems/misc -CCS/src/dtcc/CoordinateSystems/nzmg -CCS/src/dtcc/CoordinateSystems/polarst -CCS/src/dtcc/CoordinateSystems/stereogr -CCS/src/dtcc/CoordinateSystems/trcyleqa -CCS/src/dtcc/CoordinateSystems/utm CCS/src/dtcc/CoordinateSystems/azeq -CCS/src/dtcc/CoordinateSystems/cassini -CCS/src/dtcc/CoordinateSystems/eckert4 -CCS/src/dtcc/CoordinateSystems/eqdcyl -CCS/src/dtcc/CoordinateSystems/georef -CCS/src/dtcc/CoordinateSystems/lambert -CCS/src/dtcc/CoordinateSystems/mgrs -CCS/src/dtcc/CoordinateSystems/mollweid -CCS/src/dtcc/CoordinateSystems/omerc -CCS/src/dtcc/CoordinateSystems/polycon -CCS/src/dtcc/CoordinateSystems/threads -CCS/src/dtcc/CoordinateSystems/ups -CCS/src/dtcc/CoordinateSystems/webmerc CCS/src/dtcc/CoordinateSystems/bng +CCS/src/dtcc/CoordinateSystems/bonne +CCS/src/dtcc/CoordinateSystems/cassini CCS/src/dtcc/CoordinateSystems/cyleqa +CCS/src/dtcc/CoordinateSystems/datum +CCS/src/dtcc/CoordinateSystems/eckert4 CCS/src/dtcc/CoordinateSystems/eckert6 +CCS/src/dtcc/CoordinateSystems/ellipse +CCS/src/dtcc/CoordinateSystems/eqdcyl CCS/src/dtcc/CoordinateSystems/gars +CCS/src/dtcc/CoordinateSystems/geocent +CCS/src/dtcc/CoordinateSystems/georef CCS/src/dtcc/CoordinateSystems/gnomonic +CCS/src/dtcc/CoordinateSystems/grinten +CCS/src/dtcc/CoordinateSystems/lambert CCS/src/dtcc/CoordinateSystems/loccart +CCS/src/dtcc/CoordinateSystems/locspher +CCS/src/dtcc/CoordinateSystems/mercator +CCS/src/dtcc/CoordinateSystems/mgrs CCS/src/dtcc/CoordinateSystems/miller +CCS/src/dtcc/CoordinateSystems/misc +CCS/src/dtcc/CoordinateSystems/mollweid CCS/src/dtcc/CoordinateSystems/neys +CCS/src/dtcc/CoordinateSystems/nzmg +CCS/src/dtcc/CoordinateSystems/omerc CCS/src/dtcc/CoordinateSystems/orthogr +CCS/src/dtcc/CoordinateSystems/polarst +CCS/src/dtcc/CoordinateSystems/polycon CCS/src/dtcc/CoordinateSystems/sinusoid +CCS/src/dtcc/CoordinateSystems/spherical +CCS/src/dtcc/CoordinateSystems/stereogr +CCS/src/dtcc/CoordinateSystems/threads CCS/src/dtcc/CoordinateSystems/tranmerc +CCS/src/dtcc/CoordinateSystems/trcyleqa +CCS/src/dtcc/CoordinateSystems/ups CCS/src/dtcc/CoordinateSystems/usng +CCS/src/dtcc/CoordinateSystems/utm +CCS/src/dtcc/CoordinateSystems/webmerc CCS/src/dtcc/CoordinateTuples +CCS/src/dtcc/Enumerations +CCS/src/dtcc/Exception ) set(DTCC_INCLUDES +include/CoordinateConversion include/dtcc/ -include/dtcc/Enumerations -include/dtcc/Exception include/dtcc/CoordinateSystemParameters include/dtcc/CoordinateSystems include/dtcc/CoordinateSystems/albers -include/dtcc/CoordinateSystems/bonne -include/dtcc/CoordinateSystems/datum -include/dtcc/CoordinateSystems/ellipse -include/dtcc/CoordinateSystems/geocent -include/dtcc/CoordinateSystems/grinten -include/dtcc/CoordinateSystems/mercator -include/dtcc/CoordinateSystems/misc -include/dtcc/CoordinateSystems/nzmg -include/dtcc/CoordinateSystems/polarst -include/dtcc/CoordinateSystems/stereogr -include/dtcc/CoordinateSystems/trcyleqa -include/dtcc/CoordinateSystems/utm include/dtcc/CoordinateSystems/azeq -include/dtcc/CoordinateSystems/cassini -include/dtcc/CoordinateSystems/eckert4 -include/dtcc/CoordinateSystems/eqdcyl -include/dtcc/CoordinateSystems/georef -include/dtcc/CoordinateSystems/lambert -include/dtcc/CoordinateSystems/mgrs -include/dtcc/CoordinateSystems/mollweid -include/dtcc/CoordinateSystems/omerc -include/dtcc/CoordinateSystems/polycon -include/dtcc/CoordinateSystems/threads -include/dtcc/CoordinateSystems/ups -include/dtcc/CoordinateSystems/webmerc include/dtcc/CoordinateSystems/bng +include/dtcc/CoordinateSystems/bonne +include/dtcc/CoordinateSystems/cassini include/dtcc/CoordinateSystems/cyleqa +include/dtcc/CoordinateSystems/datum +include/dtcc/CoordinateSystems/eckert4 include/dtcc/CoordinateSystems/eckert6 +include/dtcc/CoordinateSystems/ellipse +include/dtcc/CoordinateSystems/eqdcyl include/dtcc/CoordinateSystems/gars +include/dtcc/CoordinateSystems/geocent +include/dtcc/CoordinateSystems/georef include/dtcc/CoordinateSystems/gnomonic +include/dtcc/CoordinateSystems/grinten +include/dtcc/CoordinateSystems/lambert include/dtcc/CoordinateSystems/loccart +include/dtcc/CoordinateSystems/locspher +include/dtcc/CoordinateSystems/mercator +include/dtcc/CoordinateSystems/mgrs include/dtcc/CoordinateSystems/miller +include/dtcc/CoordinateSystems/misc +include/dtcc/CoordinateSystems/mollweid include/dtcc/CoordinateSystems/neys +include/dtcc/CoordinateSystems/nzmg +include/dtcc/CoordinateSystems/omerc include/dtcc/CoordinateSystems/orthogr +include/dtcc/CoordinateSystems/polarst +include/dtcc/CoordinateSystems/polycon include/dtcc/CoordinateSystems/sinusoid +include/dtcc/CoordinateSystems/spherical +include/dtcc/CoordinateSystems/stereogr +include/dtcc/CoordinateSystems/threads include/dtcc/CoordinateSystems/tranmerc +include/dtcc/CoordinateSystems/trcyleqa +include/dtcc/CoordinateSystems/ups include/dtcc/CoordinateSystems/usng +include/dtcc/CoordinateSystems/utm +include/dtcc/CoordinateSystems/webmerc include/dtcc/CoordinateTuples +include/dtcc/Enumerations +include/dtcc/Exception ) +if(WIN32) + add_definitions(-DLITTLE_ENDIAN) +endif() add_library(MSPdtcc ${DTCC_CPP}) add_library(MSPCoordinateConversionService CCS/src/CoordinateConversion/CoordinateConversionService.cpp ${DTCC_CPP}) diff --git a/ports/geotrans/CONTROL b/ports/geotrans/CONTROL deleted file mode 100644 index 1d3373aaee5f68..00000000000000 --- a/ports/geotrans/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: geotrans -Version: 3.7 -Description: Geotrans is a library that allows you convert geographic coordinates among a wide variety of coordinate systems, map projections, and datums. diff --git a/ports/geotrans/portfile.cmake b/ports/geotrans/portfile.cmake index 4b63ba58a8ea65..6b56785bcc7ab8 100644 --- a/ports/geotrans/portfile.cmake +++ b/ports/geotrans/portfile.cmake @@ -1,13 +1,11 @@ -include(vcpkg_common_functions) - set(VCPKG_LIBRARY_LINKAGE "dynamic") # We specify the Linux URL, but the only difference between the Windows/Linux packages are the included libraries # which we re-build anyway. There is no source only package provided or it would be preferred (and smaller). vcpkg_download_distfile(ARCHIVE - URLS "http://earth-info.nga.mil/GandG/geotrans/geotrans3.7/linux_dev.tgz" - FILENAME "geotrans-3.7.tgz" - SHA512 20bdc870026e95154f1d7f9560cbfa2c0b2dc39042aa544f093b502a0609121cb47df5729248e0d79ccf8f9908bf01bbcea8e777ae4f45e25472b7ce2bcb9742 + URLS "https://earth-info.nga.mil/php/download.php?file=wgs-mastertgz" + FILENAME "geotrans-3.8-master.tgz" + SHA512 359704ee9700762111006d126872feab9f644af0cebd433a657473347ea48f4eb172681f5f564fbca171bbf58fe0e8fb0829597403958770b7d22ad380afeac3 ) vcpkg_extract_source_archive_ex( @@ -17,7 +15,6 @@ vcpkg_extract_source_archive_ex( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -27,15 +24,14 @@ vcpkg_install_cmake() configure_file( ${CMAKE_CURRENT_LIST_DIR}/geotrans-config.in.cmake - ${CURRENT_PACKAGES_DIR}/share/geotrans/geotrans-config.cmake + ${CURRENT_PACKAGES_DIR}/share/${PORT}/geotrans-config.cmake @ONLY ) configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY) - # Handle copyright -file(INSTALL ${SOURCE_PATH}/GEOTRANS3/docs/MSP_Geotrans_Terms_Of_Use.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotrans RENAME copyright) +file(INSTALL ${SOURCE_PATH}/GEOTRANS3/docs/MSP_Geotrans_Terms_Of_Use.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) # Install the geo model data -file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotrans) +file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/ports/geotrans/vcpkg.json b/ports/geotrans/vcpkg.json new file mode 100644 index 00000000000000..ba21e7c0503cd5 --- /dev/null +++ b/ports/geotrans/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "geotrans", + "version": "3.8", + "port-version": 1, + "description": "GEOTRANS is an application that allows you to convert geographic coordinates among a wide variety of coordinate systems, map projections, grids, and datums. GEOTRANS runs in Microsoft Windows and LINUX environments.", + "homepage": "https://earth-info.nga.mil/GandG/update/index.php?action=home", + "supports": "!uwp" +} diff --git a/ports/getdns/ignore_copying.patch b/ports/getdns/ignore_copying.patch new file mode 100644 index 00000000000000..87dc5c6d5047cc --- /dev/null +++ b/ports/getdns/ignore_copying.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 10d10b99..fda6fa3c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1087,6 +1087,6 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/getdns DESTINATION include) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION share/man) + + set(docdir share/doc/getdns) +-install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir}) ++install(FILES AUTHORS ChangeLog LICENSE NEWS README.md DESTINATION ${docdir}) + install(FILES spec/index.html DESTINATION ${docdir}/spec) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/getdns.pc DESTINATION lib/pkgconfig) diff --git a/ports/getdns/install_dlls.patch b/ports/getdns/install_dlls.patch new file mode 100644 index 00000000000000..8c3024b2516430 --- /dev/null +++ b/ports/getdns/install_dlls.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 10d10b99..35761647 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1065,15 +1065,15 @@ if (ENABLE_STATIC) + endif () + endif () + if (ENABLE_SHARED) +- install(TARGETS getdns_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ install(TARGETS getdns_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + if (USE_LIBEV) +- install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + endif () + if (USE_LIBEVENT2) +- install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + endif () + if (USE_LIBUV) +- install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + endif () + endif () + if (BUILD_GETDNS_QUERY) diff --git a/ports/getdns/openssl_depend_libs.patch b/ports/getdns/openssl_depend_libs.patch new file mode 100644 index 00000000000000..6969b431966fca --- /dev/null +++ b/ports/getdns/openssl_depend_libs.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7d22d3ca..7784ab58 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -335,7 +335,7 @@ check_include_file(openssl/rand.h HAVE_OPENSSL_RAND_H) + check_include_file(openssl/conf.h HAVE_OPENSSL_CONF_H) + check_include_file(openssl/engine.h HAVE_OPENSSL_ENGINE_H) + +-set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) ++set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES} ${getdns_system_libs}) + check_function_exists(DSA_SIG_set0 HAVE_DSA_SIG_SET0) + check_function_exists(DSA_set0_pqg HAVE_DSA_SET0_PQG) + check_function_exists(DSA_set0_key HAVE_DSA_SET0_KEY) diff --git a/ports/getdns/portfile.cmake b/ports/getdns/portfile.cmake new file mode 100644 index 00000000000000..6c9a85e56e96ac --- /dev/null +++ b/ports/getdns/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(GETDNS_VERSION 1.6.0) +set(GETDNS_HASH 4d3a67cd76e7ce53a31c9b92607d7768381a1f916e7950fe4e69368fa585d38dbfc04975630fbe8d8bd14f4bebf83a3516e063b5b54e0922548edc0952ee7b4e) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" GETDNS_ENABLE_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" GETDNS_ENABLE_SHARED) + +vcpkg_download_distfile(ARCHIVE + URLS "https://getdnsapi.net/dist/getdns-${GETDNS_VERSION}.tar.gz" + FILENAME "getdns-${GETDNS_VERSION}.tar.gz" + SHA512 ${GETDNS_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GETDNS_VERSION} + PATCHES + "openssl_depend_libs.patch" + "ignore_copying.patch" + "install_dlls.patch" +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + libevent BUILD_LIBEVENT2 + libuv BUILD_LIBUV +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_GETDNS_QUERY=OFF + -DBUILD_GETDNS_SERVER_MON=OFF + -DENABLE_STATIC=${GETDNS_ENABLE_STATIC} + -DENABLE_SHARED=${GETDNS_ENABLE_SHARED} + ${FEATURE_OPTIONS} +) +vcpkg_install_cmake() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +vcpkg_copy_pdbs() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/getdns/vcpkg.json b/ports/getdns/vcpkg.json new file mode 100644 index 00000000000000..05fceec365b2b3 --- /dev/null +++ b/ports/getdns/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "getdns", + "version-string": "1.6.0", + "port-version": 1, + "description": "GetDNS is a modern asynchronous DNS API", + "homepage": "https://getdnsapi.net/", + "supports": "!uwp & windows", + "dependencies": [ + "libidn2", + "openssl" + ], + "features": { + "libevent": { + "description": "libevent event loop integration", + "dependencies": [ + "libevent" + ] + }, + "libuv": { + "description": "libuv event loop integration", + "dependencies": [ + "libuv" + ] + } + } +} diff --git a/ports/getopt-win32/CONTROL b/ports/getopt-win32/CONTROL deleted file mode 100644 index ba14d4909ba88d..00000000000000 --- a/ports/getopt-win32/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: getopt-win32 -Version: 0.1 -Description: An implementation of getopt. -Homepage: https://github.com/libimobiledevice-win32 diff --git a/ports/getopt-win32/portfile.cmake b/ports/getopt-win32/portfile.cmake index 50ffc2b88ab688..2e80cf943e8363 100644 --- a/ports/getopt-win32/portfile.cmake +++ b/ports/getopt-win32/portfile.cmake @@ -1,11 +1,7 @@ -include(vcpkg_common_functions) - if(VCPKG_CMAKE_SYSTEM_NAME) message(FATAL_ERROR "getopt-win32 only supports building on Windows Desktop") endif() -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libimobiledevice-win32/getopt @@ -14,11 +10,38 @@ vcpkg_from_github( HEAD_REF master ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND OPTIONS "/p:ConfigurationType=StaticLibrary") +else() + list(APPEND OPTIONS "/p:ConfigurationType=DynamicLibrary") +endif() + +set(_file "${SOURCE_PATH}/getopt.vcxproj") +file(READ "${_file}" _contents) +if(VCPKG_CRT_LINKAGE STREQUAL static) + string(REPLACE "MultiThreadedDLL" "MultiThreaded" _contents "${_contents}") + string(REPLACE "MultiThreadedDebugDLL" "MultiThreadedDebug" _contents "${_contents}") +else() + string(REPLACE "MultiThreaded" "MultiThreadedDLL" _contents "${_contents}") + string(REPLACE "MultiThreadedDebug" "MultiThreadedDebugDLL" _contents "${_contents}") +endif() +file(WRITE "${_file}" "${_contents}") + + + vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH getopt.vcxproj LICENSE_SUBPATH LICENSE + OPTIONS ${OPTIONS} ) # Copy header -file(COPY ${SOURCE_PATH}/getopt.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +file(COPY "${SOURCE_PATH}/getopt.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/") +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/getopt.h" + " #define __GETOPT_H_" " #define __GETOPT_H_\n #define STATIC_GETOPT" + ) +endif() + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/ports/getopt-win32/vcpkg.json b/ports/getopt-win32/vcpkg.json new file mode 100644 index 00000000000000..8f68d57f2959d6 --- /dev/null +++ b/ports/getopt-win32/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "getopt-win32", + "version-string": "0.1", + "port-version": 1, + "description": "An implementation of getopt.", + "homepage": "https://github.com/libimobiledevice-win32", + "supports": "windows" +} diff --git a/ports/getopt/CONTROL b/ports/getopt/CONTROL deleted file mode 100644 index bae137bbd5ccc3..00000000000000 --- a/ports/getopt/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: getopt -Version: 0 -Description: The getopt and getopt_long functions automate some of the chore involved in parsing typical unix command line options. -Build-Depends: getopt-win32 (windows) diff --git a/ports/getopt/vcpkg.json b/ports/getopt/vcpkg.json new file mode 100644 index 00000000000000..cd31a24416feb4 --- /dev/null +++ b/ports/getopt/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "getopt", + "version-string": "0", + "port-version": 1, + "description": "The getopt and getopt_long functions automate some of the chore involved in parsing typical unix command line options.", + "supports": "!uwp", + "dependencies": [ + { + "name": "getopt-win32", + "platform": "windows" + } + ] +} diff --git a/ports/gettext/0001-Fix-macro-definitions.patch b/ports/gettext/0001-Fix-macro-definitions.patch deleted file mode 100644 index eeed3a0ce22498..00000000000000 --- a/ports/gettext/0001-Fix-macro-definitions.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/gettext-runtime/intl/xsize.h b/gettext-runtime/intl/xsize.h -index c256665..7400ea1 100644 ---- a/gettext-runtime/intl/xsize.h -+++ b/gettext-runtime/intl/xsize.h -@@ -27,6 +27,12 @@ - # include - #endif - -+#if defined _WIN32 -+# define _GL_INLINE_HEADER_BEGIN -+# define _GL_INLINE_HEADER_END -+# define _GL_INLINE static inline -+#endif -+ - #ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." - #endif diff --git a/ports/gettext/0002-Fix-uwp-build.patch b/ports/gettext/0002-Fix-uwp-build.patch index 1541315447881a..ba98e2665d5d4f 100644 --- a/ports/gettext/0002-Fix-uwp-build.patch +++ b/ports/gettext/0002-Fix-uwp-build.patch @@ -5,7 +5,7 @@ index aeb1c4e9..2ac531be 100644 @@ -33,7 +33,13 @@ extern void _nl_locale_name_canonicalize (char *name); #endif - #if defined _WIN32 || defined __WIN32__ + #if defined _WIN32 -# define WIN32_NATIVE +# if !defined(WINAPI_FAMILY) +# define WIN32_NATIVE @@ -22,10 +22,10 @@ index 670b8e6c..035a96bd 100644 --- "a/gettext-runtime/intl/localcharset.c" +++ "b/gettext-runtime/intl/localcharset.c" @@ -36,6 +36,16 @@ - # define WINDOWS_NATIVE + # include #endif -+#if defined _WIN32 || defined __WIN32__ ++#if defined _WIN32 +# if !defined(WINAPI_FAMILY) +# define HAVE_ACP +# else @@ -38,32 +38,32 @@ index 670b8e6c..035a96bd 100644 #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # ifndef OS2 -@@ -361,7 +371,7 @@ STATIC +@@ -830,7 +830,7 @@ STATIC const char * locale_charset (void) { - const char *codeset; + const char *codeset = NULL; - const char *aliases; - #if !(defined WINDOWS_NATIVE || defined OS2) -@@ -457,7 +467,7 @@ locale_charset (void) + /* This function must be multithread-safe. To achieve this without using + thread-local storage, we use a simple strcpy or memcpy to fill this static +@@ -912,7 +912,7 @@ locale_charset (void) + /* The canonical name cannot be determined. */ + codeset = ""; - # endif - --#elif defined WINDOWS_NATIVE -+#elif defined WINDOWS_NATIVE && defined HAVE_ACP - - static char buf[2 + 10 + 1]; +-# elif defined WINDOWS_NATIVE ++# elif defined WINDOWS_NATIVE && defined HAVE_ACP + char buf[2 + 10 + 1]; + static char resultbuf[2 + 10 + 1]; diff --git "a/gettext-runtime/intl/localename.c" "b/gettext-runtime/intl/localename.c" index 108dd6f1..ace3aa88 100644 --- "a/gettext-runtime/intl/localename.c" +++ "b/gettext-runtime/intl/localename.c" -@@ -54,7 +54,13 @@ +@@ -75,10 +75,16 @@ #endif - #if defined _WIN32 || defined __WIN32__ + #if defined _WIN32 && !defined __CYGWIN__ -# define WINDOWS_NATIVE +# if !defined(WINAPI_FAMILY) +# define WINDOWS_NATIVE @@ -72,6 +72,9 @@ index 108dd6f1..ace3aa88 100644 +# define WINDOWS_NATIVE +# endif +# endif + # if !defined IN_LIBINTL + # include "glthread/lock.h" + # endif #endif #if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ diff --git a/ports/gettext/0003-Fix-win-unicode-paths.patch b/ports/gettext/0003-Fix-win-unicode-paths.patch new file mode 100644 index 00000000000000..d8e52719f43e37 --- /dev/null +++ b/ports/gettext/0003-Fix-win-unicode-paths.patch @@ -0,0 +1,60 @@ +diff --git "a/gettext-runtime/intl/loadmsgcat.c" "b/gettext-runtime/intl/loadmsgcat.c" +index 63351523..c078de3f 100644 +--- a/gettext-runtime/intl/loadmsgcat.c ++++ b/gettext-runtime/intl/loadmsgcat.c +@@ -388,6 +388,55 @@ char *alloca (); + # define munmap(addr, len) __munmap (addr, len) + #endif + ++#ifdef _WIN32 ++/* Provide wrapper of "open" for Windows that supports UTF-8 filenames. */ ++# ifndef WIN32_LEAN_AND_MEAN ++# define WIN32_LEAN_AND_MEAN ++# endif ++# ifndef WIN32_EXTRA_LEAN ++# define WIN32_EXTRA_LEAN ++# endif ++# undef NOMINMAX ++# define NOMINMAX ++# include // For: MultiByteToWideChar ++# include ++# include ++ ++int _open_utf8_windows_wrapper( ++ const char *filename, ++ int flags ++) ++{ ++ int wstr_len = -1; ++ wchar_t* pUtf16FileName = NULL; ++ int fh = -1; ++ ++ // on Windows, convert the filename from UTF-8 to UTF-16 ++ wstr_len = MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0); ++ if (wstr_len <= 0) ++ { ++ // MultiByteToWideChar failed ++ errno = ENOENT; ++ return -1; ++ } ++ pUtf16FileName = malloc(wstr_len * sizeof(wchar_t)); ++ if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, pUtf16FileName, wstr_len) == 0) ++ { ++ // MultiByteToWideChar failed ++ free(pUtf16FileName); ++ errno = ENOENT; ++ return -1; ++ } ++ ++ // and call _wopen ++ fh = _wopen(pUtf16FileName, flags); ++ ++ free(pUtf16FileName); ++ return fh; ++} ++# define open(name, flags) _open_utf8_windows_wrapper(name, flags) ++#endif // #ifdef _WIN32 ++ + /* For those losing systems which don't have `alloca' we have to add + some additional code emulating it. */ + #ifdef HAVE_ALLOCA diff --git a/ports/gettext/CMakeLists.txt b/ports/gettext/CMakeLists.txt deleted file mode 100644 index 1ec9aa285ee5d8..00000000000000 --- a/ports/gettext/CMakeLists.txt +++ /dev/null @@ -1,150 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(libintl C) - -find_package(unofficial-iconv REQUIRED) - -set(CMAKE_STATIC_LIBRARY_PREFIX) -set(CMAKE_SHARED_LIBRARY_PREFIX) - -if(WIN32) - set(HAVE_POSIX_PRINTF 0) - set(HAVE_SNPRINTF 0) - set(HAVE_ASPRINTF 0) - set(HAVE_WPRINTF 0) - set(HAVE_NEWLOCALE 0) - - configure_file(intl/libgnuintl.win32.h config/libgnuintl.h COPYONLY) - configure_file(config.win32.h config/config.h COPYONLY) -else() - set(HAVE_POSIX_PRINTF 1) - set(HAVE_SNPRINTF 1) - set(HAVE_ASPRINTF 1) - set(HAVE_WPRINTF 1) - set(HAVE_NEWLOCALE 1) - add_definitions(-DHAVE_NEWLOCALE=1) - add_definitions(-DHAVE_NEWLOCALE=1) - - set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - set(THREADS_PREFER_PTHREAD_FLAG TRUE) - find_package(Threads REQUIRED) - if(NOT CMAKE_USE_PTHREADS_INIT) - message(FATAL_ERROR "Error: Only pthreads is currently supported.") - endif() - - include(CheckFunctionExists) - include(CheckIncludeFiles) - - if(APPLE) - set(HAVE_CFLOCALECOPYCURRENT 1) - set(HAVE_CFPREFERENCESCOPYAPPVALUE 1) - endif() - check_function_exists(dcgettext HAVE_DCGETTEXT) - check_include_files(features.h HAVE_FEATURES_H) - check_function_exists(gettext HAVE_GETTEXT) - check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H) - check_function_exists(mempcpy HAVE_MEMPCPY) - check_include_files(xlocale.h HAVE_XLOCALE_H) - - configure_file(intl/libgnuintl.in.h config/libgnuintl.h @ONLY) - configure_file(config.unix.h.in config/config.h @ONLY) -endif() - -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/config/libgnuintl.h" DESTINATION include RENAME libintl.h) -endif() - -file(READ "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" _contents) -if(NOT WIN32) - string(REPLACE "/* #undef HAVE_STPCPY */" "#define HAVE_STPCPY 1" _contents "${_contents}") -endif() -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" "${_contents}") - -FILE(GLOB SOURCES - "intl/bindtextdom.c" - "intl/dcgettext.c" - "intl/dcigettext.c" - "intl/dcngettext.c" - "intl/dgettext.c" - "intl/dngettext.c" - "intl/explodename.c" - "intl/finddomain.c" - "intl/gettext.c" - "intl/hash-string.c" - "intl/intl-compat.c" - "intl/l10nflist.c" - "intl/langprefs.c" - "intl/loadmsgcat.c" - "intl/localealias.c" - "intl/localename.c" - "intl/lock.c" - "intl/log.c" - "intl/ngettext.c" - "intl/osdep.c" - "intl/plural-exp.c" - "intl/plural.c" - "intl/printf.c" - "intl/relocatable.c" - "intl/textdomain.c" - "intl/version.c" -) -if(NOT WIN32) - list(APPEND SOURCES "intl/setlocale.c") -endif() - -set(LOCALDIR "c:/gettext") - -add_definitions(-DLOCALEDIR=\"${LOCALDIR}\") -add_definitions(-DLOCALE_ALIAS_PATH=\"${LOCALDIR}\") -add_definitions(-DLIBDIR=\"${LOCALDIR}\") -add_definitions(-DINSTALLDIR=\"${LOCALDIR}\") -if(BUILD_SHARED_LIBS) - add_definitions(-DBUILDING_DLL) -endif() -add_definitions("-DBUILDING_LIBINTL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY") - -add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -D_CRT_SECURE_NO_WARNINGS") - -add_library(libintl ${SOURCES}) -target_link_libraries(libintl PRIVATE unofficial::iconv::libcharset unofficial::iconv::libiconv) - -target_include_directories(libintl PUBLIC - $ - $ -) - -if(APPLE) - find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED) - target_link_libraries(libintl PRIVATE ${COREFOUNDATION_LIBRARY}) -endif() -if(NOT WIN32) - target_link_libraries(libintl PRIVATE Threads::Threads) -endif() -if (WIN32) - target_link_libraries(libintl PRIVATE Advapi32.lib) -endif() - -install(TARGETS libintl - EXPORT unofficial-gettext-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION bin - ARCHIVE DESTINATION lib -) - -install( - EXPORT unofficial-gettext-targets - FILE unofficial-gettext-targets.cmake - NAMESPACE unofficial::gettext:: - DESTINATION share/unofficial-gettext -) - -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-gettext-config.cmake" " -include(CMakeFindDependencyMacro) -find_dependency(unofficial-iconv) -find_dependency(Threads) -include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-targets.cmake) -") - -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-gettext-config.cmake - DESTINATION share/unofficial-gettext -) \ No newline at end of file diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL deleted file mode 100644 index a6adfefc63e888..00000000000000 --- a/ports/gettext/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gettext -Version: 0.19-10 -Homepage: https://www.gnu.org/software/gettext/ -Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. Provides libintl. -Build-Depends: libiconv diff --git a/ports/gettext/Makefile b/ports/gettext/Makefile new file mode 100644 index 00000000000000..b2b36d2ab5658c --- /dev/null +++ b/ports/gettext/Makefile @@ -0,0 +1,70 @@ +all: build-gettext-runtime-intl build-gettext-runtime-po build-gettext-runtime-src +all: build-gettext-tools build-gettext-tools-gnulib build-gettext-tools-its build-gettext-tools-m4 build-gettext-tools-misc build-gettext-tools-po build-gettext-tools-projects build-gettext-tools-styles +all: build-libtextstyle + +install: install-gettext-runtime-intl install-gettext-runtime-po install-gettext-runtime-src +install: install-gettext-tools install-gettext-tools-gnulib install-gettext-tools-its install-gettext-tools-m4 install-gettext-tools-misc install-gettext-tools-po install-gettext-tools-projects install-gettext-tools-styles +install: install-libtextstyle + +build-intl: + $(MAKE) -C intl all +install-intl: + $(MAKE) -C intl install + +build-gettext-runtime-gnulib: build-gettext-runtime-intl + $(MAKE) -C gettext-runtime/gnulib-lib all +build-gettext-runtime-intl: + $(MAKE) -C gettext-runtime/intl all +build-gettext-runtime-po: + $(MAKE) -C gettext-runtime/po all +build-gettext-runtime-src: build-gettext-runtime-intl build-gettext-runtime-gnulib + $(MAKE) -C gettext-runtime/src all +build-gettext-tools: build-gettext-runtime-intl build-libtextstyle build-gettext-tools-gnulib build-gettext-tools-intl build-gettext-tools-libgrep build-gnulib-local + $(MAKE) -C gettext-tools/src all +build-gettext-tools-gnulib: build-gettext-tools-intl + $(MAKE) -C gettext-tools/gnulib-lib all +build-gettext-tools-libgrep: build-gettext-tools-gnulib + $(MAKE) -C gettext-tools/libgrep all +build-gettext-tools-intl: + $(MAKE) -C gettext-tools/intl all +build-gettext-tools-its: + $(MAKE) -C gettext-tools/its all +build-gettext-tools-m4: + $(MAKE) -C gettext-tools/m4 all +build-gettext-tools-misc: + $(MAKE) -C gettext-tools/misc all +build-gettext-tools-po: + $(MAKE) -C gettext-tools/po all +build-gettext-tools-projects: + $(MAKE) -C gettext-tools/projects all +build-gettext-tools-styles: + $(MAKE) -C gettext-tools/styles all +build-gnulib-local: + $(MAKE) -C gnulib-local all +build-libtextstyle: + $(MAKE) -C libtextstyle/lib all + +install-gettext-runtime-intl: + $(MAKE) -C gettext-runtime/intl install +install-gettext-runtime-po: + $(MAKE) -C gettext-runtime/po install +install-gettext-runtime-src: + $(MAKE) -C gettext-runtime/src install +install-gettext-tools: + $(MAKE) -C gettext-tools/src install +install-gettext-tools-gnulib: + $(MAKE) -C gettext-tools/gnulib-lib install +install-gettext-tools-its: + $(MAKE) -C gettext-tools/its install +install-gettext-tools-m4: + $(MAKE) -C gettext-tools/m4 install +install-gettext-tools-misc: + $(MAKE) -C gettext-tools/misc install +install-gettext-tools-po: + $(MAKE) -C gettext-tools/po install +install-gettext-tools-projects: + $(MAKE) -C gettext-tools/projects install +install-gettext-tools-styles: + $(MAKE) -C gettext-tools/styles install +install-libtextstyle: + $(MAKE) -C libtextstyle/lib install diff --git a/ports/gettext/android.patch b/ports/gettext/android.patch new file mode 100644 index 00000000000000..6f2a7d43faf95f --- /dev/null +++ b/ports/gettext/android.patch @@ -0,0 +1,12 @@ +diff --color -ruN a/gettext-runtime/intl/dcigettext.c src/gettext-runtime/intl/dcigettext.c +--- a/gettext-runtime/intl/dcigettext.c 2021-05-26 16:27:55.420544597 +0200 ++++ src/gettext-runtime/intl/dcigettext.c 2021-05-26 16:29:14.546516701 +0200 +@@ -143,7 +143,7 @@ + # else + # if VMS + # define getcwd(buf, max) (getcwd) (buf, max, 0) +-# else ++# elif !(defined(__clang__) && defined(__BIONIC_FORTIFY)) + char *getcwd (); + # endif + # endif diff --git a/ports/gettext/config.unix.h.in b/ports/gettext/config.unix.h.in deleted file mode 100644 index 9f00a6fcda47bb..00000000000000 --- a/ports/gettext/config.unix.h.in +++ /dev/null @@ -1,1009 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) - -/* Define to the number of bits in type 'sig_atomic_t'. */ -#define BITSIZEOF_SIG_ATOMIC_T 32 - -/* Define to the number of bits in type 'size_t'. */ -#define BITSIZEOF_SIZE_T sizeof(size_t) - -/* Define to the number of bits in type 'wchar_t'. */ -#define BITSIZEOF_WCHAR_T 32 - -/* Define to the number of bits in type 'wint_t'. */ -#define BITSIZEOF_WINT_T 32 - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define if pnet is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_PNET */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if // is a file system root distinct from /. */ -/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define if gettimeofday clobbers the localtime buffer. */ -/* #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the `argz_count' function. */ -/* #undef HAVE_ARGZ_COUNT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARGZ_H */ - -/* Define to 1 if you have the `argz_next' function. */ -/* #undef HAVE_ARGZ_NEXT */ - -/* Define to 1 if you have the `argz_stringify' function. */ -/* #undef HAVE_ARGZ_STRINGIFY */ - -/* Define to 1 if you have the `asprintf' function. */ -#define HAVE_ASPRINTF 1 - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -#define HAVE_BUILTIN_EXPECT 1 - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -#cmakedefine HAVE_CFLOCALECOPYCURRENT 1 - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -#cmakedefine HAVE_CFPREFERENCESCOPYAPPVALUE 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -#cmakedefine HAVE_DCGETTEXT 1 - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. - */ -#define HAVE_DECL_GETENV 1 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBSINIT */ - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 1 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 1 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 0 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if you have the declaration of environ. */ -/* #undef HAVE_ENVIRON_DECL */ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_FEATURES_H 1 - -/* Define to 1 if you have the `fwprintf' function. */ -#define HAVE_FWPRINTF 1 - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getegid' function. */ -#define HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `getgid' function. */ -#define HAVE_GETGID 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GETOPT_H 1 - -/* Define to 1 if you have the `getopt_long_only' function. */ -#define HAVE_GETOPT_LONG_ONLY 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#cmakedefine HAVE_GETTEXT 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `getuid' function. */ -#define HAVE_GETUID 1 - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define if you have and nl_langinfo(CODESET). */ -#define HAVE_LANGINFO_CODESET 1 - -/* Define if your file defines LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -#define HAVE_LSTAT 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MACH_O_DYLD_H 1 - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -#define HAVE_MAP_ANONYMOUS 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -#define HAVE_MBSINIT 1 - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -#cmakedefine HAVE_MEMPCPY 1 - -/* Define to 1 if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */ - -/* Define to 1 if you have the `munmap' function. */ -#define HAVE_MUNMAP 1 - -/* Define to 1 if you have the `newlocale' function. */ -#cmakedefine HAVE_NEWLOCALE 1 - -/* Define if your printf() function supports format strings with positions. */ -#define HAVE_POSIX_PRINTF 1 - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -#define HAVE_PTHREAD_MUTEX_RECURSIVE 1 - -/* Define if the POSIX multithreading library has read/write locks. */ -#define HAVE_PTHREAD_RWLOCK 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `readlink' function. */ -#define HAVE_READLINK 1 - -/* Define to 1 if you have the `readlinkat' function. */ -#define HAVE_READLINKAT 1 - -/* Define to 1 if you have the `realpath' function. */ -#define HAVE_REALPATH 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -#define HAVE_SIGSET_T 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -#define HAVE_STPCPY 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `symlink' function. */ -#define HAVE_SYMLINK 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIMEB_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `towlower' function. */ -#define HAVE_TOWLOWER 1 - -/* Define to 1 if you have the `tsearch' function. */ -#define HAVE_TSEARCH 1 - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -#define HAVE_USELOCALE 1 - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -#define HAVE_WCWIDTH 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINSOCK2_H */ - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_XLOCALE_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_ftime' function. */ -/* #undef HAVE__FTIME */ - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -/* #undef HAVE__SET_INVALID_PARAMETER_HANDLER */ - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -/* #define INSTALLPREFIX "/usr/local" */ - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -/* #undef MBRTOWC_RETVAL_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-runtime" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-runtime" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-runtime 0.19" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-runtime" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.19" - -/* Define if exists and defines unusable PRI* macros. */ -/* #undef PRI_MACROS_BROKEN */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -#define PTRDIFF_T_SUFFIX - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if stat needs help when passed a directory name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_DIR */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -#define SIG_ATOMIC_T_SUFFIX - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -#define SIZE_T_SUFFIX ul - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX - -/* Define if the POSIX multithreading library can be used. */ -#define USE_POSIX_THREADS 1 - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Define if the GNU Pth multithreading library can be used. */ -/* #undef USE_PTH_THREADS */ - -/* Define if references to the GNU Pth multithreading library should be made - weak. */ -/* #undef USE_PTH_THREADS_WEAK */ - -/* Define if the old Solaris multithreading library can be used. */ -/* #undef USE_SOLARIS_THREADS */ - -/* Define if references to the old Solaris multithreading library should be - made weak. */ -/* #undef USE_SOLARIS_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on OS X. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -/* #undef USE_WINDOWS_THREADS */ - -/* Version number of package */ -#define VERSION "0.19" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -#define WCHAR_T_SUFFIX - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -#define WINT_T_SUFFIX - -/* Define when --enable-shared is used on mingw or Cygwin. */ -/* #undef WOE32DLL */ - -/* Enable large inode numbers on Mac OS X 10.5. */ -#define _DARWIN_USE_64_BIT_INODE 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct - stat.st_size becomes 64-bit. */ -/* #undef _GL_WINDOWS_64_BIT_ST_SIZE */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -/* #undef _NETBSD_SOURCE */ - -/* The _Noreturn keyword of C11. */ -#if ! (defined _Noreturn \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) -# define _Noreturn __attribute__ ((__noreturn__)) -# elif defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress the use of extern inline on problematic Apple configurations. - OS X 10.8 and earlier mishandle it; see, e.g., - . - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Perhaps Apple will fix this some day. */ -#if (defined __APPLE__ \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_APPLE_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_APPLE_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_APPLE_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif - /* Suppress GCC's bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - . */ -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -/* #undef gid_t */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* Define to `int' if does not define. */ -/* #undef mode_t */ - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -/* #undef nlink_t */ - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define as a signed type of the same size as size_t. */ -/* #undef ssize_t */ - -/* Define to `int' if doesn't define. */ -/* #undef uid_t */ - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_UNUSED -#endif -/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name - is a misnomer outside of parameter lists. */ -#define _UNUSED_PARAMETER_ _GL_UNUSED - -/* The __pure__ attribute was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* The __const__ attribute was added in gcc 2.95. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST /* empty */ -#endif - - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#ifdef __EMX__ -# include "intl/os2compat.h" -#endif - diff --git a/ports/gettext/config.win32.h b/ports/gettext/config.win32.h deleted file mode 100644 index b68467cf3605fa..00000000000000 --- a/ports/gettext/config.win32.h +++ /dev/null @@ -1,673 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -#ifndef WIN32 -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -# define _GL_INLINE static inline -#endif - -/* Disable function deprecated warnings */ -#define _CRT_NONSTDC_NO_WARNINGS - -/* Define to the number of bits in type 'ptrdiff_t'. */ -#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) - -/* Define to the number of bits in type 'sig_atomic_t'. */ -#define BITSIZEOF_SIG_ATOMIC_T 32 - -/* Define to the number of bits in type 'size_t'. */ -#define BITSIZEOF_SIZE_T sizeof(size_t) - -/* Define to the number of bits in type 'wchar_t'. */ -#define BITSIZEOF_WCHAR_T 16 - -/* Define to the number of bits in type 'wint_t'. */ -#define BITSIZEOF_WINT_T 16 - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define if pnet is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_PNET */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the filesystem. */ -#define ENABLE_RELOCATABLE 1 - -/* Define to 1 when using the gnulib module fwriteerror. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the `argz_count' function. */ -/* #undef HAVE_ARGZ_COUNT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARGZ_H */ - -/* Define to 1 if you have the `argz_next' function. */ -/* #undef HAVE_ARGZ_NEXT */ - -/* Define to 1 if you have the `argz_stringify' function. */ -/* #undef HAVE_ARGZ_STRINGIFY */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYCURRENT */ - -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `canonicalize_file_name', and to - 0 if you don't. */ -#define HAVE_DECL_CANONICALIZE_FILE_NAME 0 - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. - */ -#define HAVE_DECL_GETENV 1 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. - */ -#define HAVE_DECL_STRDUP 1 - -/* Define to 1 if you have the declaration of `strerror', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRERROR */ - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 0 - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define to 1 if you have the `fwprintf' function. */ -#define HAVE_FWPRINTF 1 - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -/* #undef HAVE_ICONV */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ICONV_H */ - -/* Define if your compiler supports the #include_next directive. */ -/* #undef HAVE_INCLUDE_NEXT */ - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the system has the type `long long int'. */ -/* #undef HAVE_LONG_LONG_INT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ -/* #undef HAVE_MBRTOWC */ - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `memchr' function. */ -#define HAVE_MEMCHR 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if you have and it defines the NL_LOCALE_NAME macro if - _GNU_SOURCE is defined. */ -/* #undef HAVE_NL_LOCALE_NAME */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -#define HAVE_SIGNED_SIG_ATOMIC_T 1 - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define to 1 if stdbool.h conforms to C99. */ -/* #undef HAVE_STDBOOL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type `unsigned long long int'. */ -/* #undef HAVE_UNSIGNED_LONG_LONG_INT */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if the system has the type `_Bool'. */ -/* #undef HAVE__BOOL */ - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -/* #undef ICONV_CONST */ - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -/* #define INSTALLPREFIX "/usr/local" */ - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#define NO_MINUS_C_MINUS_O 1 - -/* Name of package */ -#define PACKAGE "gettext-runtime" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if exists and defines unusable PRI* macros. */ -/* #undef PRI_MACROS_BROKEN */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -#define PTRDIFF_T_SUFFIX - -/* Define this to 1 if strerror is broken. */ -/* #undef REPLACE_STRERROR */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -#define SIG_ATOMIC_T_SUFFIX - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#if defined(_WIN32) -#define SIZE_MAX (((1UL << 31) - 1) * 2 + 1) -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -#define SIZE_T_SUFFIX u - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Define if the GNU Pth multithreading library can be used. */ -/* #undef USE_PTH_THREADS */ - -/* Define if references to the GNU Pth multithreading library should be made - weak. */ -/* #undef USE_PTH_THREADS_WEAK */ - -/* Define if the old Solaris multithreading library can be used. */ -/* #undef USE_SOLARIS_THREADS */ - -/* Define if references to the old Solaris multithreading library should be - made weak. */ -/* #undef USE_SOLARIS_THREADS_WEAK */ - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 0 - -/* Define if the Win32 multithreading API can be used. */ -#define USE_WIN32_THREADS 1 - -/* Version number of package */ -#define VERSION "0.17" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -#define WCHAR_T_SUFFIX - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -#define WINT_T_SUFFIX - -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to a replacement function name for realpath(). */ -#define realpath rpl_realpath - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict -/* Work around a bug in Sun C++: it does not support _Restrict, even - though the corresponding Sun C compiler does, which causes - "#define restrict _Restrict" in the previous line. Perhaps some future - version of Sun C++ will work with _Restrict; if so, it'll probably - define __RESTRICT, just as Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define as a signed type of the same size as size_t. */ -#ifdef _WIN64 -#define ssize_t __int64 -#elif _WIN32 -#define ssize_t __int32 -#endif - -/* Define to rpl_strnlen if the replacement function should be used. */ -#define strnlen rpl_strnlen - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#if 0 -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init libintl_lock_init -#define glthread_lock_lock libintl_lock_lock -#define glthread_lock_unlock libintl_lock_unlock -#define glthread_lock_destroy libintl_lock_destroy -#define glthread_rwlock_init libintl_rwlock_init -#define glthread_rwlock_rdlock libintl_rwlock_rdlock -#define glthread_rwlock_wrlock libintl_rwlock_wrlock -#define glthread_rwlock_unlock libintl_rwlock_unlock -#define glthread_rwlock_destroy libintl_rwlock_destroy -#define glthread_recursive_lock_init libintl_recursive_lock_init -#define glthread_recursive_lock_lock libintl_recursive_lock_lock -#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock -#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy -#define glthread_once libintl_once -#define glthread_once_call libintl_once_call -#define glthread_once_singlethreaded libintl_once_singlethreaded -#endif - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#ifdef __EMX__ -# include "intl/os2compat.h" -#endif - diff --git a/ports/gettext/gettext-tools_woe32dll_gettextsrc-exports.c.patch b/ports/gettext/gettext-tools_woe32dll_gettextsrc-exports.c.patch new file mode 100644 index 00000000000000..1eedbecd2b290f --- /dev/null +++ b/ports/gettext/gettext-tools_woe32dll_gettextsrc-exports.c.patch @@ -0,0 +1,14 @@ +X-Git-Url: https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blobdiff_plain;f=gettext-tools%2Fwoe32dll%2Fgettextsrc-exports.c;h=6d760895961db57e013552b6b3f248bfa8eb17c2;hp=4477ae8d4b2e887592d4019432b91ea31b84ba59;hb=7cf68dffb2adb76375bfb0781e277510523a1f3e;hpb=3564f5f885544514bd2e345c36b74e5d91cad3e8 + +diff --git a/gettext-tools/woe32dll/gettextsrc-exports.c b/gettext-tools/woe32dll/gettextsrc-exports.c +index 4477ae8..6d76089 100644 +--- a/gettext-tools/woe32dll/gettextsrc-exports.c ++++ b/gettext-tools/woe32dll/gettextsrc-exports.c +@@ -50,6 +50,7 @@ VARIABLE(formatstring_python) + VARIABLE(formatstring_python_brace) + VARIABLE(formatstring_qt) + VARIABLE(formatstring_qt_plural) ++VARIABLE(formatstring_ruby) + VARIABLE(formatstring_scheme) + VARIABLE(formatstring_sh) + VARIABLE(formatstring_smalltalk) diff --git a/ports/gettext/install-autopoint.cmake b/ports/gettext/install-autopoint.cmake new file mode 100644 index 00000000000000..45f806b4a7b712 --- /dev/null +++ b/ports/gettext/install-autopoint.cmake @@ -0,0 +1,49 @@ +function(install_autopoint) + # variables for configuring autopoint.in + set(PACKAGE "gettext-tools") + set(VERSION "${GETTEXT_VERSION}") + set(ARCHIVE_VERSION "${GETTEXT_VERSION}") + set(ARCHIVE_FORMAT "dirgz") + set(bindir [[${prefix}/tools/gettext/bin]]) + set(datadir [[${datarootdir}]]) + set(exec_prefix [[${prefix}]]) + set(PATH_SEPARATOR ":") + set(RELOCATABLE "yes") + + file(STRINGS "${SOURCE_PATH}/gettext-tools/configure" + VERSIONS_FROM_CONFIGURE + REGEX "^ *(ARCHIVE_VERSION|VERSION)=.*$" + ) + foreach(LINE IN LISTS VERSIONS_FROM_CONFIGURE) + if(LINE MATCHES "^ *(ARCHIVE_VERSION|VERSION)='?([0-9.]+)'?$") + set(${CMAKE_MATCH_1} "${CMAKE_MATCH_2}") + endif() + endforeach() + + set(WORKING_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") + file(MAKE_DIRECTORY "${WORKING_DIR}") + + # autopoint script + configure_file("${SOURCE_PATH}/gettext-tools/misc/autopoint.in" "${WORKING_DIR}/autopoint" @ONLY) + + # data tarball + if(WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES gzip) + vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") + endif() + file(COPY "${SOURCE_PATH}/gettext-tools/misc/archive.dir.tar" DESTINATION "${WORKING_DIR}") + vcpkg_execute_required_process( + COMMAND gzip -f archive.dir.tar + WORKING_DIRECTORY "${WORKING_DIR}" + LOGNAME gzip-${TARGET_TRIPLET} + ) + + # installation + file(INSTALL "${WORKING_DIR}/autopoint" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin" + FILE_PERMISSIONS + OWNER_WRITE OWNER_READ OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE + ) + file(INSTALL "${WORKING_DIR}/archive.dir.tar.gz" DESTINATION "${CURRENT_PACKAGES_DIR}/share/gettext/gettext") +endfunction() diff --git a/ports/gettext/libgnuintl.win32.h b/ports/gettext/libgnuintl.win32.h deleted file mode 100644 index 440da4d5941261..00000000000000 --- a/ports/gettext/libgnuintl.win32.h +++ /dev/null @@ -1,423 +0,0 @@ -/* Message catalogs for internationalization. -Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Library General Public License as published -by the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -USA. */ - -#ifndef _LIBINTL_H -#define _LIBINTL_H 1 - -#if defined(_WIN32) && defined(libintl_EXPORTS) -#define LIBINTL_DLL_EXPORTED __declspec(dllexport) -#else -#define LIBINTL_DLL_EXPORTED -#endif - -#include - -/* The LC_MESSAGES locale category is the category used by the functions -gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. -On systems that don't define it, use an arbitrary value instead. -On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) -then includes (i.e. this file!) and then only defines -LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES -in this case. */ -#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) -# define LC_MESSAGES 1729 -#endif - -/* We define an additional symbol to signal that we use the GNU -implementation of gettext. */ -#define __USE_GNU_GETTEXT 1 - -/* Provide information about the supported file formats. Returns the -maximum minor revision number supported for a given major revision. */ -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ - ((major) == 0 || (major) == 1 ? 1 : -1) - -/* Resolve a platform specific conflict on DJGPP. GNU gettext takes -precedence over _conio_gettext. */ -#ifdef __DJGPP__ -# undef gettext -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - - /* Version number: (major<<16) + (minor<<8) + subminor */ -#define LIBINTL_VERSION 0x001100 - extern LIBINTL_DLL_EXPORTED int libintl_version; - - - /* We redirect the functions to those prefixed with "libintl_". This is - necessary, because some systems define gettext/textdomain/... in the C - library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). - If we used the unprefixed names, there would be cases where the - definition in the C library would override the one in the libintl.so - shared library. Recall that on ELF systems, the symbols are looked - up in the following order: - 1. in the executable, - 2. in the shared libraries specified on the link command line, in order, - 3. in the dependencies of the shared libraries specified on the link - command line, - 4. in the dlopen()ed shared libraries, in the order in which they were - dlopen()ed. - The definition in the C library would override the one in libintl.so if - either - * -lc is given on the link command line and -lintl isn't, or - * -lc is given on the link command line before -lintl, or - * libintl.so is a dependency of a dlopen()ed shared library but not - linked to the executable at link time. - Since Solaris gettext() behaves differently than GNU gettext(), this - would be unacceptable. - - The redirection happens by default through macros in C, so that &gettext - is independent of the compilation unit, but through inline functions in - C++, in order not to interfere with the name mangling of class fields or - class methods called 'gettext'. */ - - /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. - If he doesn't, we choose the method. A third possible method is - _INTL_REDIRECT_ASM, supported only by GCC. */ -#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) -# if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) -# define _INTL_REDIRECT_ASM -# else -# ifdef __cplusplus -# define _INTL_REDIRECT_INLINE -# else -# define _INTL_REDIRECT_MACROS -# endif -# endif -#endif - /* Auxiliary macros. */ -#ifdef _INTL_REDIRECT_ASM -# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) -# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring -# define _INTL_STRINGIFY(prefix) #prefix -#else -# define _INTL_ASM(cname) -#endif - - /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return - its n-th argument literally. This enables GCC to warn for example about - printf (gettext ("foo %y")). */ -#if __GNUC__ >= 3 && !(__APPLE_CC__ > 1 && defined __cplusplus) -# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) -#else -# define _INTL_MAY_RETURN_STRING_ARG(n) -#endif - - /* Look up MSGID in the current default message catalog for the current - LC_MESSAGES locale. If not found, returns MSGID itself (the default - text). */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_gettext(const char *__msgid) - _INTL_MAY_RETURN_STRING_ARG(1); - static inline char *gettext(const char *__msgid) - { - return libintl_gettext(__msgid); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define gettext libintl_gettext -#endif - extern LIBINTL_DLL_EXPORTED char *gettext(const char *__msgid) - _INTL_ASM(libintl_gettext) - _INTL_MAY_RETURN_STRING_ARG(1); -#endif - - /* Look up MSGID in the DOMAINNAME message catalog for the current - LC_MESSAGES locale. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dgettext(const char *__domainname, const char *__msgid) - _INTL_MAY_RETURN_STRING_ARG(2); - static inline char *dgettext(const char *__domainname, const char *__msgid) - { - return libintl_dgettext(__domainname, __msgid); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dgettext libintl_dgettext -#endif - extern LIBINTL_DLL_EXPORTED char *dgettext(const char *__domainname, const char *__msgid) - _INTL_ASM(libintl_dgettext) - _INTL_MAY_RETURN_STRING_ARG(2); -#endif - - /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY - locale. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dcgettext(const char *__domainname, const char *__msgid, - int __category) - _INTL_MAY_RETURN_STRING_ARG(2); - static inline char *dcgettext(const char *__domainname, const char *__msgid, - int __category) - { - return libintl_dcgettext(__domainname, __msgid, __category); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dcgettext libintl_dcgettext -#endif - extern LIBINTL_DLL_EXPORTED char *dcgettext(const char *__domainname, const char *__msgid, - int __category) - _INTL_ASM(libintl_dcgettext) - _INTL_MAY_RETURN_STRING_ARG(2); -#endif - - - /* Similar to `gettext' but select the plural form corresponding to the - number N. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_ngettext(const char *__msgid1, const char *__msgid2, - unsigned long int __n) - _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); - static inline char *ngettext(const char *__msgid1, const char *__msgid2, - unsigned long int __n) - { - return libintl_ngettext(__msgid1, __msgid2, __n); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define ngettext libintl_ngettext -#endif - extern LIBINTL_DLL_EXPORTED char *ngettext(const char *__msgid1, const char *__msgid2, - unsigned long int __n) - _INTL_ASM(libintl_ngettext) - _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); -#endif - - /* Similar to `dgettext' but select the plural form corresponding to the - number N. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dngettext(const char *__domainname, const char *__msgid1, - const char *__msgid2, unsigned long int __n) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); - static inline char *dngettext(const char *__domainname, const char *__msgid1, - const char *__msgid2, unsigned long int __n) - { - return libintl_dngettext(__domainname, __msgid1, __msgid2, __n); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dngettext libintl_dngettext -#endif - extern LIBINTL_DLL_EXPORTED char *dngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n) - _INTL_ASM(libintl_dngettext) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); -#endif - - /* Similar to `dcgettext' but select the plural form corresponding to the - number N. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dcngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); - static inline char *dcngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) - { - return libintl_dcngettext(__domainname, __msgid1, __msgid2, __n, __category); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dcngettext libintl_dcngettext -#endif - extern LIBINTL_DLL_EXPORTED char *dcngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) - _INTL_ASM(libintl_dcngettext) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); -#endif - - - - /* Set the current default message catalog to DOMAINNAME. - If DOMAINNAME is null, return the current default. - If DOMAINNAME is "", reset to the default of "messages". */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_textdomain(const char *__domainname); - static inline char *textdomain(const char *__domainname) - { - return libintl_textdomain(__domainname); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define textdomain libintl_textdomain -#endif - extern LIBINTL_DLL_EXPORTED char *textdomain(const char *__domainname) - _INTL_ASM(libintl_textdomain); -#endif - - /* Specify that the DOMAINNAME message catalog will be found - in DIRNAME rather than in the system locale data base. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_bindtextdomain(const char *__domainname, - const char *__dirname); - static inline char *bindtextdomain(const char *__domainname, - const char *__dirname) - { - return libintl_bindtextdomain(__domainname, __dirname); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bindtextdomain libintl_bindtextdomain -#endif - extern LIBINTL_DLL_EXPORTED char *bindtextdomain(const char *__domainname, const char *__dirname) - _INTL_ASM(libintl_bindtextdomain); -#endif - - /* Specify the character encoding in which the messages from the - DOMAINNAME message catalog will be returned. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_bind_textdomain_codeset(const char *__domainname, - const char *__codeset); - static inline char *bind_textdomain_codeset(const char *__domainname, - const char *__codeset) - { - return libintl_bind_textdomain_codeset(__domainname, __codeset); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bind_textdomain_codeset libintl_bind_textdomain_codeset -#endif - extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset(const char *__domainname, - const char *__codeset) - _INTL_ASM(libintl_bind_textdomain_codeset); -#endif - - - - /* Support for format strings with positions in *printf(), following the - POSIX/XSI specification. - Note: These replacements for the *printf() functions are visible only - in source files that #include or #include "gettext.h". - Packages that use *printf() in source files that don't refer to _() - or gettext() but for which the format string could be the return value - of _() or gettext() need to add this #include. Oh well. */ - -#if !0 - -#include -#include - - /* Get va_list. */ -#if __STDC__ || defined __cplusplus || defined _MSC_VER -# include -#else -# include -#endif - -#undef fprintf -#define fprintf libintl_fprintf - extern LIBINTL_DLL_EXPORTED int fprintf(FILE *, const char *, ...); -#undef vfprintf -#define vfprintf libintl_vfprintf - extern LIBINTL_DLL_EXPORTED int vfprintf(FILE *, const char *, va_list); - -#undef printf -#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ - /* Don't break __attribute__((format(printf,M,N))). - This redefinition is only possible because the libc in NetBSD, Cygwin, - mingw does not have a function __printf__. */ -# define libintl_printf __printf__ -#endif -#define printf libintl_printf - extern LIBINTL_DLL_EXPORTED int printf(const char *, ...); -#undef vprintf -#define vprintf libintl_vprintf - extern LIBINTL_DLL_EXPORTED int vprintf(const char *, va_list); - -#undef sprintf -#define sprintf libintl_sprintf - extern LIBINTL_DLL_EXPORTED int sprintf(char *, const char *, ...); -#undef vsprintf -#define vsprintf libintl_vsprintf - extern LIBINTL_DLL_EXPORTED int vsprintf(char *, const char *, va_list); - -#if 0 - -#undef snprintf -#define snprintf libintl_snprintf - extern LIBINTL_DLL_EXPORTED int snprintf(char *, size_t, const char *, ...); -#undef vsnprintf -#define vsnprintf libintl_vsnprintf - extern LIBINTL_DLL_EXPORTED int vsnprintf(char *, size_t, const char *, va_list); - -#endif - -#if 0 - -#undef asprintf -#define asprintf libintl_asprintf - extern LIBINTL_DLL_EXPORTED int asprintf(char **, const char *, ...); -#undef vasprintf -#define vasprintf libintl_vasprintf - extern LIBINTL_DLL_EXPORTED int vasprintf(char **, const char *, va_list); - -#endif - -#if 0 - -#undef fwprintf -#define fwprintf libintl_fwprintf - extern LIBINTL_DLL_EXPORTED int fwprintf(FILE *, const wchar_t *, ...); -#undef vfwprintf -#define vfwprintf libintl_vfwprintf - extern LIBINTL_DLL_EXPORTED int vfwprintf(FILE *, const wchar_t *, va_list); - -#undef wprintf -#define wprintf libintl_wprintf - extern LIBINTL_DLL_EXPORTED int wprintf(const wchar_t *, ...); -#undef vwprintf -#define vwprintf libintl_vwprintf - extern LIBINTL_DLL_EXPORTED int vwprintf(const wchar_t *, va_list); - -#undef swprintf -#define swprintf libintl_swprintf - extern LIBINTL_DLL_EXPORTED int swprintf(wchar_t *, size_t, const wchar_t *, ...); -#undef vswprintf -#define vswprintf libintl_vswprintf - extern LIBINTL_DLL_EXPORTED int vswprintf(wchar_t *, size_t, const wchar_t *, va_list); - -#endif - -#endif - - - /* Support for relocatable packages. */ - - /* Sets the original and the current installation prefix of the package. - Relocation simply replaces a pathname starting with the original prefix - by the corresponding pathname with the current prefix instead. Both - prefixes should be directory names without trailing slash (i.e. use "" - instead of "/"). */ -#define libintl_set_relocation_prefix libintl_set_relocation_prefix - extern LIBINTL_DLL_EXPORTED void - libintl_set_relocation_prefix(const char *orig_prefix, - const char *curr_prefix); - - -#ifdef __cplusplus -} -#endif - -#endif /* libintl.h */ \ No newline at end of file diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index d7283cc905f8c5..0c351d73505490 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -1,51 +1,159 @@ -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-gettext) - return() +if(VCPKG_TARGET_IS_LINUX AND NOT EXISTS "/usr/include/libintl.h") + message(FATAL_ERROR "When targeting Linux, `libintl.h` is expected to come from the C Runtime Library (glibc). " + "Please use \"sudo apt-get install libc-dev\" or the equivalent to install development files." + ) endif() -#Based on https://github.com/winlibs/gettext +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) -include(vcpkg_common_functions) +#Based on https://github.com/winlibs/gettext -set(GETTEXT_VERSION 0.19) +set(GETTEXT_VERSION 0.21) vcpkg_download_distfile(ARCHIVE URLS "https://ftp.gnu.org/pub/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz" FILENAME "gettext-${GETTEXT_VERSION}.tar.gz" - SHA512 a5db035c582ff49d45ee6eab9466b2bef918e413a882019c204a9d8903cb3770ddfecd32c971ea7c7b037c7b69476cf7c56dcabc8b498b94ab99f132516c9922 + SHA512 bbe590c5dd3580c75bf30ff768da99a88eb8d466ec1ac9eea20be4cab4357ecf72448e6b81b47425e39d50fa6320ba426632914d7898dfebb4f159abc39c31d1 ) +set(PATCHES "") +if(VCPKG_TARGET_IS_UWP) + set(PATCHES uwp_remove_localcharset.patch) +endif() vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${GETTEXT_VERSION} + ARCHIVE "${ARCHIVE}" + REF "${GETTEXT_VERSION}" PATCHES - 0001-Fix-macro-definitions.patch 0002-Fix-uwp-build.patch + 0003-Fix-win-unicode-paths.patch + rel_path.patch + android.patch + gettext-tools_woe32dll_gettextsrc-exports.c.patch + ${PATCHES} ) +vcpkg_find_acquire_program(BISON) +get_filename_component(BISON_PATH "${BISON}" DIRECTORY) +vcpkg_add_to_path("${BISON_PATH}") -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_LIST_DIR}/config.win32.h - ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in - DESTINATION ${SOURCE_PATH}/gettext-runtime +set(OPTIONS + --enable-relocatable #symbol duplication with glib-init.c? + --enable-c++ + --disable-acl + --disable-csharp + --disable-curses + --disable-java + --disable-openmp ) -file(REMOVE ${SOURCE_PATH}/gettext-runtime/intl/libgnuintl.h ${SOURCE_PATH}/gettext-runtime/config.h) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/libgnuintl.win32.h DESTINATION ${SOURCE_PATH}/gettext-runtime/intl) +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND OPTIONS + # Avoid unnecessary test. + --with-included-glib + # This is required. For some reason these do not get correctly identified for release builds. + ac_cv_func_wcslen=yes + ac_cv_func_memmove=yes + # The following are required for a full gettext built (libintl and tools). + gl_cv_func_printf_directive_n=no # segfaults otherwise with popup window + ac_cv_func_memset=yes # not detected in release builds + ac_cv_header_pthread_h=no + ac_cv_header_dirent_h=no + ) +endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/gettext-runtime - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) +# These functions scope any changes to VCPKG_BUILD_TYPE +function(build_libintl_and_tools) + cmake_parse_arguments(arg "" "BUILD_TYPE" "" ${ARGN}) + if(DEFINED arg_BUILD_TYPE) + set(VCPKG_BUILD_TYPE "${arg_BUILD_TYPE}") + endif() + vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}" + DETERMINE_BUILD_TRIPLET + USE_WRAPPERS + ADD_BIN_TO_PATH # So configure can check for working iconv + ADDITIONAL_MSYS_PACKAGES gzip + OPTIONS + ${OPTIONS} + ) + vcpkg_install_make(MAKEFILE "${CMAKE_CURRENT_LIST_DIR}/Makefile") +endfunction() -vcpkg_install_cmake() +function(build_libintl_only) + cmake_parse_arguments(arg "" "BUILD_TYPE" "" ${ARGN}) + if(DEFINED arg_BUILD_TYPE) + set(VCPKG_BUILD_TYPE "${arg_BUILD_TYPE}") + endif() + vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}/gettext-runtime" + DETERMINE_BUILD_TRIPLET + USE_WRAPPERS + ADD_BIN_TO_PATH # So configure can check for working iconv + OPTIONS + ${OPTIONS} + ) + vcpkg_install_make( + MAKEFILE "${CMAKE_CURRENT_LIST_DIR}/Makefile" + BUILD_TARGET build-intl + INSTALL_TARGET install-intl + ) +endfunction() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-gettext TARGET_PATH share/unofficial-gettext) +if("tools" IN_LIST FEATURES) + # Minimization of gettext tools build time by: + # - building tools only for release configuration + # - custom top-level Makefile + # - configuration cache + list(APPEND OPTIONS "--cache-file=../config.cache-${TARGET_TRIPLET}") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}") + build_libintl_and_tools(BUILD_TYPE "release") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") + file(GLOB tool_libs + LIST_DIRECTORIES false + "${CURRENT_PACKAGES_DIR}/bin/*" + "${CURRENT_PACKAGES_DIR}/lib/*" + ) + list(FILTER tool_libs EXCLUDE REGEX "intl[^/\\\\]*$") + file(REMOVE ${tool_libs}) + file(GLOB tool_includes + LIST_DIRECTORIES true + "${CURRENT_PACKAGES_DIR}/include/*" + ) + list(FILTER tool_includes EXCLUDE REGEX "intl[^/\\\\]*$") + file(REMOVE_RECURSE ${tool_includes}) + if(VCPKG_TARGET_IS_LINUX) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + elseif(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}.release") + file(RENAME "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}.release") + file(READ "${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}" config_cache) + string(REGEX REPLACE "\nac_cv_env[^\n]*" "" config_cache "${config_cache}") # Eliminate build type flags + file(WRITE "${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}" "${config_cache}") + build_libintl_only(BUILD_TYPE "debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}.release/debug") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}") + file(RENAME "${CURRENT_PACKAGES_DIR}.release" "${CURRENT_PACKAGES_DIR}") + endif() +else() + if(VCPKG_TARGET_IS_LINUX) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + else() + list(APPEND OPTIONS "--config-cache") + build_libintl_only() + endif() + # A fast installation of the autopoint tool and data, needed for autotools + include("${CMAKE_CURRENT_LIST_DIR}/install-autopoint.cmake") + install_autopoint() +endif() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettext) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gettext/COPYING ${CURRENT_PACKAGES_DIR}/share/gettext/copyright) +configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/gettext/copyright" COPYONLY) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") vcpkg_copy_pdbs() + +if(NOT VCPKG_TARGET_IS_LINUX) + file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/intl") +endif() +if("tools" IN_LIST FEATURES AND NOT VCPKG_CROSSCOMPILING) + file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/gettext") +endif() diff --git a/ports/gettext/rel_path.patch b/ports/gettext/rel_path.patch new file mode 100644 index 00000000000000..c0301cc75cce31 --- /dev/null +++ b/ports/gettext/rel_path.patch @@ -0,0 +1,31 @@ +diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in +index 3a24eee5d..56b36d5ff 100644 +--- a/gettext-tools/misc/autopoint.in ++++ b/gettext-tools/misc/autopoint.in +@@ -27,8 +27,9 @@ archive_version=@ARCHIVE_VERSION@ + + # Set variables + # - gettext_datadir directory where the data files are stored. +-prefix="@prefix@" +-datarootdir="@datarootdir@" ++ ++prefix="$(dirname "$0")/../../../" ++datarootdir="${prefix}/share/gettext" + : ${gettext_datadir="@datadir@/gettext"} + : ${AUTOM4TE=autom4te} + +diff --git a/gettext-tools/misc/gettextize.in b/gettext-tools/misc/gettextize.in +index c78c308bf..175ad57e7 100644 +--- a/gettext-tools/misc/gettextize.in ++++ b/gettext-tools/misc/gettextize.in +@@ -27,8 +27,8 @@ archive_version=@ARCHIVE_VERSION@ + + # Set variables + # - gettext_datadir directory where the data files are stored. +-prefix="@prefix@" +-datarootdir="@datarootdir@" ++prefix="$(dirname "$0")/../../../" ++datarootdir="${prefix}/share/gettext" + : ${gettext_datadir="@datadir@/gettext"} + : ${AUTOM4TE=autom4te} + diff --git a/ports/gettext/unofficial-gettext-config.cmake b/ports/gettext/unofficial-gettext-config.cmake deleted file mode 100644 index 3b872142af7b8d..00000000000000 --- a/ports/gettext/unofficial-gettext-config.cmake +++ /dev/null @@ -1 +0,0 @@ -add_library(unofficial::gettext::libintl INTERFACE IMPORTED) diff --git a/ports/gettext/uwp_remove_localcharset.patch b/ports/gettext/uwp_remove_localcharset.patch new file mode 100644 index 00000000000000..285f81cf19eafa --- /dev/null +++ b/ports/gettext/uwp_remove_localcharset.patch @@ -0,0 +1,79 @@ +diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in +index 7999d3456..b3ef40340 100644 +--- a/gettext-runtime/intl/Makefile.in ++++ b/gettext-runtime/intl/Makefile.in +@@ -252,7 +252,7 @@ am__libgnuintl_la_SOURCES_DIST = bindtextdom.c dcgettext.c dgettext.c \ + gettext.c finddomain.c hash-string.c loadmsgcat.c \ + localealias.c textdomain.c l10nflist.c explodename.c \ + dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \ +- plural-exp.c localcharset.c threadlib.c lock.c relocatable.c \ ++ plural-exp.c threadlib.c lock.c relocatable.c \ + langprefs.c localename.c localename-table.c log.c printf.c \ + setlocale.c setlocale-lock.c setlocale_null.c version.c \ + xsize.c osdep.c intl-compat.c windows-mutex.c windows-rwlock.c \ +@@ -264,7 +264,7 @@ am__objects_2 = bindtextdom.lo dcgettext.lo dgettext.lo gettext.lo \ + finddomain.lo hash-string.lo loadmsgcat.lo localealias.lo \ + textdomain.lo l10nflist.lo explodename.lo dcigettext.lo \ + dcngettext.lo dngettext.lo ngettext.lo plural.lo plural-exp.lo \ +- localcharset.lo threadlib.lo lock.lo relocatable.lo \ ++ threadlib.lo lock.lo relocatable.lo \ + langprefs.lo localename.lo localename-table.lo log.lo \ + printf.lo setlocale.lo setlocale-lock.lo setlocale_null.lo \ + version.lo xsize.lo osdep.lo intl-compat.lo $(am__objects_1) +@@ -282,7 +282,7 @@ am__libintl_la_SOURCES_DIST = bindtextdom.c dcgettext.c dgettext.c \ + gettext.c finddomain.c hash-string.c loadmsgcat.c \ + localealias.c textdomain.c l10nflist.c explodename.c \ + dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \ +- plural-exp.c localcharset.c threadlib.c lock.c relocatable.c \ ++ plural-exp.c threadlib.c lock.c relocatable.c \ + langprefs.c localename.c localename-table.c log.c printf.c \ + setlocale.c setlocale-lock.c setlocale_null.c version.c \ + xsize.c osdep.c intl-compat.c windows-mutex.c windows-rwlock.c \ +@@ -1387,7 +1387,7 @@ AUTOMAKE_OPTIONS = 1.10 gnu no-dependencies + + # Miscellaneous files. + EXTRA_DIST = gmo.h gettextP.h hash-string.h loadinfo.h plural-exp.h \ +- eval-plural.h localcharset.h lock.h windows-mutex.h \ ++ eval-plural.h lock.h windows-mutex.h \ + windows-rwlock.h windows-recmutex.h windows-once.h \ + windows-initguard.h relocatable.h arg-nonnull.h attribute.h \ + filename.h flexmember.h localename-table.in.h setlocale_null.h \ +@@ -1543,7 +1543,7 @@ LIBINTLSOURCES = bindtextdom.c dcgettext.c dgettext.c gettext.c \ + finddomain.c hash-string.c loadmsgcat.c localealias.c \ + textdomain.c l10nflist.c explodename.c dcigettext.c \ + dcngettext.c dngettext.c ngettext.c plural.y plural-exp.c \ +- localcharset.c threadlib.c lock.c relocatable.c langprefs.c \ ++ threadlib.c lock.c relocatable.c langprefs.c \ + localename.c localename-table.c log.c printf.c setlocale.c \ + setlocale-lock.c setlocale_null.c version.c xsize.c osdep.c \ + intl-compat.c $(am__append_2) +@@ -2016,8 +2016,6 @@ plural.lo: $(srcdir)/plural.c + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/plural.c + plural-exp.lo: $(srcdir)/plural-exp.c + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/plural-exp.c +-localcharset.lo: $(srcdir)/localcharset.c +- $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/localcharset.c + threadlib.lo: $(srcdir)/threadlib.c + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/threadlib.c + lock.lo: $(srcdir)/lock.c +@@ -2074,7 +2072,6 @@ dngettext.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo + ngettext.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h $(srcdir)/lock.h $(srcdir)/windows-mutex.h $(srcdir)/windows-rwlock.h $(srcdir)/windows-recmutex.h $(srcdir)/windows-once.h $(srcdir)/windows-initguard.h + plural.lo: ../config.h $(srcdir)/plural-exp.h $(PLURAL_DEPS) + plural-exp.lo: ../config.h $(srcdir)/plural-exp.h +-localcharset.lo: ../config.h $(srcdir)/localcharset.h + threadlib.lo: ../config.h + lock.lo: ../config.h $(srcdir)/lock.h $(srcdir)/windows-mutex.h $(srcdir)/windows-rwlock.h $(srcdir)/windows-recmutex.h $(srcdir)/windows-once.h $(srcdir)/windows-initguard.h + relocatable.lo: ../config.h $(srcdir)/relocatable.h +diff --git a/gettext-runtime/intl/localcharset.c b/gettext-runtime/intl/localcharset.c +index 1a1627888..3e6582f17 100644 +--- a/gettext-runtime/intl/localcharset.c ++++ b/gettext-runtime/intl/localcharset.c +@@ -1021,7 +1021,7 @@ locale_charset (void) + + # else + +-# error "Add code for other platforms here." ++//# error "Add code for other platforms here." + + # endif + diff --git a/ports/gettext/vcpkg-cmake-wrapper.cmake b/ports/gettext/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..03bcb0569defbc --- /dev/null +++ b/ports/gettext/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,14 @@ +_find_package(${ARGS}) + +if(Intl_FOUND AND Intl_LIBRARIES) + include(SelectLibraryConfigurations) + find_library(Intl_LIBRARY_DEBUG NAMES intl libintl intl-8 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(Intl_LIBRARY_RELEASE NAMES intl libintl intl-8 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + unset(Intl_LIBRARIES) + unset(Intl_LIBRARIES CACHE) + select_library_configurations(Intl) + find_package(Iconv) # Since CMake 3.11 + if(Iconv_FOUND AND NOT Iconv_IS_BUILT_IN) + list(APPEND Intl_LIBRARIES ${Iconv_LIBRARIES}) + endif() +endif() diff --git a/ports/gettext/vcpkg-port-config.cmake b/ports/gettext/vcpkg-port-config.cmake new file mode 100644 index 00000000000000..67a636bd3f4eee --- /dev/null +++ b/ports/gettext/vcpkg-port-config.cmake @@ -0,0 +1,6 @@ +get_filename_component(gettext_tools_dir "${CMAKE_CURRENT_LIST_DIR}/../../tools/gettext/bin" ABSOLUTE) +if(CMAKE_HOST_WIN32) + set(ENV{PATH} "$ENV{PATH};${gettext_tools_dir}") +else() + set(ENV{PATH} "$ENV{PATH}:${gettext_tools_dir}") +endif() diff --git a/ports/gettext/vcpkg.json b/ports/gettext/vcpkg.json new file mode 100644 index 00000000000000..bd1f1d4b6c9857 --- /dev/null +++ b/ports/gettext/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "gettext", + "version": "0.21", + "port-version": 6, + "description": "GNU gettext provides libintl and a set of tools to help produce multi-lingual messages.", + "homepage": "https://www.gnu.org/software/gettext/", + "dependencies": [ + "libiconv" + ], + "features": { + "tools": { + "description": "Build gettext tools" + } + } +} diff --git a/ports/gettimeofday/CMakeLists.txt b/ports/gettimeofday/CMakeLists.txt index 4ec5b43a0f2c22..1f8d891aef7e10 100644 --- a/ports/gettimeofday/CMakeLists.txt +++ b/ports/gettimeofday/CMakeLists.txt @@ -5,8 +5,8 @@ add_library(gettimeofday gettimeofday.c gettimeofday.def) install(TARGETS gettimeofday RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib/manual-link + LIBRARY DESTINATION lib/manual-link ) if(CMAKE_BUILD_TYPE STREQUAL "Release") diff --git a/ports/gettimeofday/CONTROL b/ports/gettimeofday/CONTROL deleted file mode 100644 index 3ae7e068220ce6..00000000000000 --- a/ports/gettimeofday/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: gettimeofday -Version: 2017-10-14-2 -Description: An implementation of gettimeofday for WIN32 diff --git a/ports/gettimeofday/portfile.cmake b/ports/gettimeofday/portfile.cmake index 51c88c9896b473..0d08bacc8197f9 100644 --- a/ports/gettimeofday/portfile.cmake +++ b/ports/gettimeofday/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_configure_cmake( SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} PREFER_NINJA @@ -8,4 +6,4 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettimeofday RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gettimeofday/vcpkg.json b/ports/gettimeofday/vcpkg.json new file mode 100644 index 00000000000000..9528e9a2c57b4b --- /dev/null +++ b/ports/gettimeofday/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "gettimeofday", + "version-string": "2017-10-14", + "port-version": 4, + "description": "An implementation of gettimeofday for WIN32" +} diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL deleted file mode 100644 index 4cd423293a8a26..00000000000000 --- a/ports/gflags/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gflags -Version: 2.2.2-1 -Homepage: https://github.com/gflags/gflags -Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 87053f84995a33..e0d9e1dab01d2d 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -2,8 +2,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gflags/gflags @@ -22,6 +20,7 @@ vcpkg_configure_cmake( -DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF -DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF -DBUILD_gflags_nothreads_LIB:BOOL=OFF + -DGFLAGS_USE_TARGET_NAMESPACE:BOOL=ON -DCMAKE_DEBUG_POSTFIX=d ) @@ -35,6 +34,8 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/COPYING.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/gflags/usage b/ports/gflags/usage new file mode 100644 index 00000000000000..67fb74789b6786 --- /dev/null +++ b/ports/gflags/usage @@ -0,0 +1,4 @@ +The package gflags provides CMake targets: + + find_package(gflags CONFIG REQUIRED) + target_link_libraries(main PRIVATE gflags::gflags) diff --git a/ports/gflags/vcpkg-cmake-wrapper.cmake b/ports/gflags/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..55b3fc8dc54aa5 --- /dev/null +++ b/ports/gflags/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +set(GFLAGS_USE_TARGET_NAMESPACE ON) + +_find_package(${ARGS}) + +foreach(tgt gflags gflags_shared gflags_static) + if (NOT TARGET ${tgt} AND TARGET "gflags::${tgt}") + add_library(${tgt} INTERFACE IMPORTED) + target_link_libraries(${tgt} INTERFACE "gflags::${tgt}") + endif() +endforeach(tgt) diff --git a/ports/gflags/vcpkg.json b/ports/gflags/vcpkg.json new file mode 100644 index 00000000000000..5b020a81eb4c65 --- /dev/null +++ b/ports/gflags/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "gflags", + "version-string": "2.2.2", + "port-version": 4, + "description": "A C++ library that implements commandline flags processing", + "homepage": "https://github.com/gflags/gflags", + "supports": "!uwp" +} diff --git a/ports/ghc-filesystem/portfile.cmake b/ports/ghc-filesystem/portfile.cmake new file mode 100644 index 00000000000000..781933c2c25a5a --- /dev/null +++ b/ports/ghc-filesystem/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gulrak/filesystem + REF v1.5.4 + HEAD_REF master + SHA512 01fb69ce46259d25d152667943c20e013c90e005647ca1c9c64e0721882236079bac160c04b5edf310e1163bdf8cb6fc0343680de686a1329777027008c301bf +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DGHC_FILESYSTEM_BUILD_TESTING=OFF + -DGHC_FILESYSTEM_BUILD_EXAMPLES=OFF + -DGHC_FILESYSTEM_WITH_INSTALL=ON +) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup( + PACKAGE_NAME ghc_filesystem + CONFIG_PATH lib/cmake/ghc_filesystem +) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) diff --git a/ports/ghc-filesystem/vcpkg.json b/ports/ghc-filesystem/vcpkg.json new file mode 100644 index 00000000000000..648a6fdd90e26d --- /dev/null +++ b/ports/ghc-filesystem/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "ghc-filesystem", + "version": "1.5.4", + "port-version": 1, + "description": "An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD", + "homepage": "https://github.com/gulrak/filesystem", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/gherkin-c/CONTROL b/ports/gherkin-c/CONTROL deleted file mode 100644 index e1533180f8c772..00000000000000 --- a/ports/gherkin-c/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: gherkin-c -Version: 2019-10-07-1 -Description: Gherkin parser/compiler in C diff --git a/ports/gherkin-c/portfile.cmake b/ports/gherkin-c/portfile.cmake index adb13076d8aca5..68c2049d14980d 100644 --- a/ports/gherkin-c/portfile.cmake +++ b/ports/gherkin-c/portfile.cmake @@ -1,9 +1,7 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO c-libs/gherkin-c - REF dd180edc7d092311f2e90a0c4957061156d39dd3 + REF dd180edc7d092311f2e90a0c4957061156d39dd3 SHA512 c6b38ab0e7a0fd1061d86b0ff9d9140f8c3d6f15cfc1673e947254c6c03a66d3e6aae5b267b074aa10fa30ba2850190c9e9ea7c12e340e4f8c5575b9bf31bab3 HEAD_REF master ) diff --git a/ports/gherkin-c/vcpkg.json b/ports/gherkin-c/vcpkg.json new file mode 100644 index 00000000000000..462f19b78e5bf5 --- /dev/null +++ b/ports/gherkin-c/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "gherkin-c", + "version-string": "2019-10-07", + "port-version": 2, + "description": "Gherkin parser/compiler in C" +} diff --git a/ports/giflib/CMakeLists.txt b/ports/giflib/CMakeLists.txt index a5b084ffcc3934..a5c69381a45801 100644 --- a/ports/giflib/CMakeLists.txt +++ b/ports/giflib/CMakeLists.txt @@ -2,23 +2,36 @@ cmake_minimum_required(VERSION 3.4) project(giflib C) +set(GIFLIB_EXPORTS "NOTFOUND" CACHE FILEPATH "The path of the DEF file listing the DLL exports.") + set(GIFLIB_HEADERS - lib/gif_lib.h + gif_lib.h ) set(GIFLIB_SOURCES - lib/dgif_lib.c - lib/egif_lib.c - lib/gif_err.c - lib/gif_font.c - lib/gif_hash.c - lib/gifalloc.c - lib/openbsd-reallocarray.c - lib/quantize.c + dgif_lib.c + egif_lib.c + gifalloc.c + gif_err.c + gif_font.c + gif_hash.c + openbsd-reallocarray.c ) add_definitions(-D_CRT_SECURE_NO_WARNINGS) + +include(CheckSymbolExists) +check_symbol_exists(reallocarray "stdlib.h" HAVE_REALLOCARRAY) +if(HAVE_REALLOCARRAY) + add_definitions(-DHAVE_REALLOCARRAY) +endif() + add_library(gif ${GIFLIB_SOURCES}) +if(BUILD_SHARED_LIBS AND WIN32) + target_sources(gif PRIVATE "${GIFLIB_EXPORTS}") +else() + set(UNUSED "${GIFLIB_EXPORTS}") +endif() if (NOT GIFLIB_SKIP_HEADERS) install(FILES ${GIFLIB_HEADERS} DESTINATION include) diff --git a/ports/giflib/CONTROL b/ports/giflib/CONTROL deleted file mode 100644 index 4de8f8e224a9d3..00000000000000 --- a/ports/giflib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: giflib -Version: 5.1.4-3 -Homepage: https://sourceforge.net/projects/giflib/ -Description: A library for reading and writing gif images. diff --git a/ports/giflib/disable-GifDrawBoxedText8x8-win32.patch b/ports/giflib/disable-GifDrawBoxedText8x8-win32.patch new file mode 100644 index 00000000000000..095edb3cec7685 --- /dev/null +++ b/ports/giflib/disable-GifDrawBoxedText8x8-win32.patch @@ -0,0 +1,36 @@ +diff --git a/gif_font.c b/gif_font.c +index d90783c..b682c7a 100644 +--- a/gif_font.c ++++ b/gif_font.c +@@ -204,6 +204,7 @@ GifDrawRectangle(SavedImage *Image, + memset(bp + (i * Image->ImageDesc.Width), color, (size_t)w); + } + ++#if !defined(_WIN32) + void + GifDrawBoxedText8x8(SavedImage *Image, + const int x, const int y, +@@ -257,5 +258,6 @@ GifDrawBoxedText8x8(SavedImage *Image, + border + LineCount * GIF_FONT_HEIGHT + border, fg); + } + } ++#endif + + /* end */ +diff --git a/gif_lib.h b/gif_lib.h +index ebdbd3c..41bf7a2 100644 +--- a/gif_lib.h ++++ b/gif_lib.h +@@ -290,10 +290,12 @@ extern void GifDrawRectangle(SavedImage *Image, + const int x, const int y, + const int w, const int d, const int color); + ++#if !defined(_WIN32) + extern void GifDrawBoxedText8x8(SavedImage *Image, + const int x, const int y, + const char *legend, + const int border, const int bg, const int fg); ++#endif + + #ifdef __cplusplus + } diff --git a/ports/giflib/exports.def b/ports/giflib/exports.def new file mode 100644 index 00000000000000..d385493734fe42 --- /dev/null +++ b/ports/giflib/exports.def @@ -0,0 +1,55 @@ +EXPORTS + DGifCloseFile @1 + DGifExtensionToGCB @2 + DGifGetCode @3 + DGifGetCodeNext @4 + DGifGetExtension @5 + DGifGetExtensionNext @6 + DGifGetImageDesc @7 + DGifGetLZCodes @8 + DGifGetLine @9 + DGifGetPixel @10 + DGifGetRecordType @11 + DGifGetScreenDesc @12 + DGifOpen @13 + DGifOpenFileHandle @14 + DGifOpenFileName @15 + DGifSavedExtensionToGCB @16 + DGifSlurp @17 + EGifCloseFile @18 + EGifGCBToExtension @19 + EGifGCBToSavedExtension @20 + EGifGetGifVersion @21 + EGifOpen @22 + EGifOpenFileHandle @23 + EGifOpenFileName @24 + EGifPutCode @25 + EGifPutCodeNext @26 + EGifPutComment @27 + EGifPutExtension @28 + EGifPutExtensionBlock @29 + EGifPutExtensionLeader @30 + EGifPutExtensionTrailer @31 + EGifPutImageDesc @32 + EGifPutLine @33 + EGifPutPixel @34 + EGifPutScreenDesc @35 + EGifSetGifVersion @36 + EGifSpew @37 + FreeLastSavedImage @38 + GifAddExtensionBlock @39 + GifApplyTranslation @40 + GifAsciiTable8x8 @41 DATA + GifBitSize @42 + GifDrawBox @43 + ; needs strtok_r: GifDrawBoxedText8x8 @44 + GifDrawRectangle @45 + GifDrawText8x8 @46 + GifErrorString @47 + GifFreeExtensions @48 + GifFreeMapObject @49 + GifFreeSavedImages @50 + GifMakeMapObject @51 + GifMakeSavedImage @52 + GifUnionColorMap @53 + openbsd_reallocarray @54 diff --git a/ports/giflib/fix-compile-error.patch b/ports/giflib/fix-compile-error.patch index 93cf467ff2d45a..970b05576fbdf2 100644 --- a/ports/giflib/fix-compile-error.patch +++ b/ports/giflib/fix-compile-error.patch @@ -1,8 +1,8 @@ -diff --git a/lib/dgif_lib.c b/lib/dgif_lib.c -index fddc0d2..7a6ab9c 100644 ---- a/lib/dgif_lib.c -+++ b/lib/dgif_lib.c -@@ -54,7 +54,7 @@ DGifOpenFileName(const char *FileName, int *Error) +diff --git a/dgif_lib.c b/dgif_lib.c +index 82fc097..3bb302b 100644 +--- a/dgif_lib.c ++++ b/dgif_lib.c +@@ -58,7 +58,7 @@ DGifOpenFileName(const char *FileName, int *Error) int FileHandle; GifFileType *GifFile; @@ -11,7 +11,7 @@ index fddc0d2..7a6ab9c 100644 if (Error != NULL) *Error = D_GIF_ERR_OPEN_FAILED; return NULL; -@@ -81,7 +81,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) +@@ -85,7 +85,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) if (GifFile == NULL) { if (Error != NULL) *Error = D_GIF_ERR_NOT_ENOUGH_MEM; @@ -20,7 +20,7 @@ index fddc0d2..7a6ab9c 100644 return NULL; } -@@ -95,7 +95,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) +@@ -99,7 +99,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) if (Private == NULL) { if (Error != NULL) *Error = D_GIF_ERR_NOT_ENOUGH_MEM; @@ -29,7 +29,7 @@ index fddc0d2..7a6ab9c 100644 free((char *)GifFile); return NULL; } -@@ -106,7 +106,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) +@@ -110,7 +110,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) _setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */ #endif /* _WIN32 */ @@ -38,11 +38,11 @@ index fddc0d2..7a6ab9c 100644 /*@-mustfreeonly@*/ GifFile->Private = (void *)Private; -diff --git a/lib/egif_lib.c b/lib/egif_lib.c -index f30b61b..18dc4a2 100644 ---- a/lib/egif_lib.c -+++ b/lib/egif_lib.c -@@ -60,10 +60,10 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) +diff --git a/egif_lib.c b/egif_lib.c +index 6219af0..8ddda1b 100644 +--- a/egif_lib.c ++++ b/egif_lib.c +@@ -67,10 +67,10 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) GifFileType *GifFile; if (TestExistence) @@ -55,7 +55,7 @@ index f30b61b..18dc4a2 100644 S_IREAD | S_IWRITE); if (FileHandle == -1) { -@@ -73,7 +73,7 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) +@@ -80,7 +80,7 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) } GifFile = EGifOpenFileHandle(FileHandle, Error); if (GifFile == (GifFileType *) NULL) @@ -64,7 +64,7 @@ index f30b61b..18dc4a2 100644 return GifFile; } -@@ -118,7 +118,7 @@ EGifOpenFileHandle(const int FileHandle, int *Error) +@@ -125,7 +125,7 @@ EGifOpenFileHandle(const int FileHandle, int *Error) _setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */ #endif /* _WIN32 */ @@ -73,4 +73,3 @@ index f30b61b..18dc4a2 100644 GifFile->Private = (void *)Private; Private->FileHandle = FileHandle; - diff --git a/ports/giflib/msvc-guard-unistd-h.patch b/ports/giflib/msvc-guard-unistd-h.patch index 5140e6ee3eebb0..36cef449151791 100644 --- a/ports/giflib/msvc-guard-unistd-h.patch +++ b/ports/giflib/msvc-guard-unistd-h.patch @@ -1,46 +1,8 @@ -diff -Naur a/lib/dgif_lib.c b/lib/dgif_lib.c ---- a/lib/dgif_lib.c 2016-04-02 21:34:00.000000000 +0600 -+++ b/lib/dgif_lib.c 2017-04-21 07:06:48.781271400 +0700 -@@ -12,7 +12,9 @@ - #include - #include - #include -+#ifndef _MSC_VER - #include -+#endif - #include - #include - -diff -Naur a/lib/egif_lib.c b/lib/egif_lib.c ---- a/lib/egif_lib.c 2016-01-22 16:36:36.000000000 +0600 -+++ b/lib/egif_lib.c 2017-04-21 07:07:08.728159900 +0700 -@@ -8,7 +8,9 @@ - - *****************************************************************************/ - -+#ifndef _MSC_VER - #include -+#endif - #include - #include - #include -diff -Naur a/lib/gif_hash.c b/lib/gif_hash.c ---- a/lib/gif_hash.c 2014-05-16 17:46:53.000000000 +0700 -+++ b/lib/gif_hash.c 2017-04-21 07:07:17.718719500 +0700 -@@ -11,7 +11,9 @@ - - *****************************************************************************/ - -+#ifndef _MSC_VER - #include -+#endif - #include - #include - #include -diff -Naur a/lib/gif_hash.h b/lib/gif_hash.h ---- a/lib/gif_hash.h 2014-05-16 17:46:53.000000000 +0700 -+++ b/lib/gif_hash.h 2017-04-21 07:07:32.316346800 +0700 -@@ -7,7 +7,9 @@ +diff --git a/gif_hash.h b/gif_hash.h +index 6a1b585..e6712e8 100644 +--- a/gif_hash.h ++++ b/gif_hash.h +@@ -9,7 +9,9 @@ SPDX-License-Identifier: MIT #ifndef _GIF_HASH_H_ #define _GIF_HASH_H_ diff --git a/ports/giflib/portfile.cmake b/ports/giflib/portfile.cmake index 7ca1478f7f9207..8a58b690a18fce 100644 --- a/ports/giflib/portfile.cmake +++ b/ports/giflib/portfile.cmake @@ -1,37 +1,32 @@ -include(vcpkg_common_functions) +set(GIFLIB_VERSION 5.2.1) -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -set(GIFLIB_VERSION 5.1.4) -vcpkg_download_distfile(ARCHIVE - URLS "https://nchc.dl.sourceforge.net/project/giflib/giflib-${GIFLIB_VERSION}.tar.bz2" - FILENAME "giflib-${GIFLIB_VERSION}.tar.bz2" - SHA512 32b5e342056c210e6478e9cb3b6ceec9594dcfaf34feea1eb4dad633a081ed4465bceee578c19165907cb47cb83912ac359ceea666a8e07dbbb5420f9928f96d -) - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) - set(ADDITIONAL_PATCH "fix-compile-error.patch") +set(EXTRA_PATCHES "") +if (VCPKG_TARGET_IS_WINDOWS) + list(APPEND EXTRA_PATCHES fix-compile-error.patch) endif() -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${GIFLIB_VERSION} + REPO "giflib" + FILENAME "giflib-${GIFLIB_VERSION}.tar.gz" + SHA512 4550e53c21cb1191a4581e363fc9d0610da53f7898ca8320f0d3ef6711e76bdda2609c2df15dc94c45e28bff8de441f1227ec2da7ea827cb3c0405af4faa4736 PATCHES msvc-guard-unistd-h.patch - ${ADDITIONAL_PATCH} + disable-GifDrawBoxedText8x8-win32.patch # MSVC doesn't have strtok_r + ${EXTRA_PATCHES} ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + "-DGIFLIB_EXPORTS=${CMAKE_CURRENT_LIST_DIR}/exports.def" OPTIONS_DEBUG -DGIFLIB_SKIP_HEADERS=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/giflib RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/giflib/vcpkg.json b/ports/giflib/vcpkg.json new file mode 100644 index 00000000000000..965fa663bc77a1 --- /dev/null +++ b/ports/giflib/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "giflib", + "version": "5.2.1", + "description": "A library for reading and writing gif images.", + "homepage": "https://sourceforge.net/projects/giflib/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/ginkgo/portfile.cmake b/ports/ginkgo/portfile.cmake new file mode 100644 index 00000000000000..b2926fa9aec741 --- /dev/null +++ b/ports/ginkgo/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_download_distfile(WINDOWS_SYMBOLS_PATCH + URLS https://github.com/ginkgo-project/ginkgo/commit/7481b2fffb51d73492ef9017045450b29b820f81.diff + FILENAME 7481b2fffb51d73492ef9017045450b29b820f81.diff + SHA512 f81c57aacc30680383ccfb21ca08987d8ea19a23c0c7bbc5ae590c3c7eca4eed72cea84410357e080e5bb35f08f6b57834b3cdace6d91cc3fde0a1930aa4270a +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ginkgo-project/ginkgo + REF v1.4.0 + SHA512 9bfcb2c415c7a1a70cf8e49f20adf62d02cab83bb23b6fcecfeaeeb322b2d4e1ad8d8fa6582735073753f9a05eac8688b9bd1ff1d4203957c1a80702d117e807 + HEAD_REF master + PATCHES + ${WINDOWS_SYMBOLS_PATCH} +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openmp GINKGO_BUILD_OMP + cuda GINKGO_BUILD_CUDA +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DGINKGO_BUILD_REFERENCE=ON + -DGINKGO_BUILD_TESTS=OFF + -DGINKGO_BUILD_EXAMPLES=OFF + -DGINKGO_BUILD_HIP=OFF + -DGINKGO_BUILD_DPCPP=OFF + -DGINKGO_BUILD_HWLOC=OFF + -DGINKGO_BUILD_BENCHMARKS=OFF + -DGINKGO_DEVEL_TOOLS=OFF + -DGINKGO_SKIP_DEPENDENCY_UPDATE=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DGinkgo_NAME=ginkgo + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Ginkgo) +vcpkg_fixup_pkgconfig() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/ginkgo" RENAME copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/ginkgo") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/ginkgo/usage b/ports/ginkgo/usage new file mode 100644 index 00000000000000..5dfe203f7c2098 --- /dev/null +++ b/ports/ginkgo/usage @@ -0,0 +1,4 @@ +The package ginkgo provides CMake targets: + + find_package(Ginkgo CONFIG REQUIRED) + target_link_libraries(main PRIVATE Ginkgo::ginkgo) diff --git a/ports/ginkgo/vcpkg.json b/ports/ginkgo/vcpkg.json new file mode 100644 index 00000000000000..c7db13df5531a5 --- /dev/null +++ b/ports/ginkgo/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "ginkgo", + "version-semver": "1.4.0", + "description": "Ginkgo is a high-performance linear algebra library for manycore systems, with a focus on sparse solution of linear systems. Note that the OpenMP feature is not available on Windows.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "cuda": { + "description": "Build the CUDA backend of Ginkgo", + "dependencies": [ + "cuda" + ] + }, + "openmp": { + "description": "Build the OpenMP backend of Ginkgo" + } + } +} diff --git a/ports/gl2ps/CONTROL b/ports/gl2ps/CONTROL deleted file mode 100644 index deb9483aaffb4f..00000000000000 --- a/ports/gl2ps/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gl2ps -Version: 1.4.0-3 -Homepage: https://gitlab.onelab.info/gl2ps/gl2ps -Description: OpenGL to PostScript Printing Library -Build-Depends: freeglut, zlib, libpng diff --git a/ports/gl2ps/portfile.cmake b/ports/gl2ps/portfile.cmake index eaee5627050fdf..d18d2fcb4ba401 100644 --- a/ports/gl2ps/portfile.cmake +++ b/ports/gl2ps/portfile.cmake @@ -1,11 +1,9 @@ -include(vcpkg_common_functions) - vcpkg_from_gitlab( GITLAB_URL http://gitlab.onelab.info OUT_SOURCE_PATH SOURCE_PATH REPO gl2ps/gl2ps - REF gl2ps_1_4_0 - SHA512 ee10e3fd312eae896934c39b8d115f28017874f918e4dd3350ca8f7cbf47dfc44101a5c6eb8826707620fcc336ca51ddc4eb7bf653af4b27651277625bac3cce + REF gl2ps_1_4_2 + SHA512 cb4abd79f6790e229a0b05a6d12e4bd4d24885c89c4cb8644e49b0459361565c5c5379b53d85f59eeaba16144d3288dbd06c90f55a739f0928a788224ccb8085 HEAD_REF master PATCHES separate-static-dynamic-build.patch ) @@ -19,5 +17,5 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING.GL2PS DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright) -file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright.LGPL) +file(INSTALL ${SOURCE_PATH}/COPYING.GL2PS DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright.LGPL) diff --git a/ports/gl2ps/separate-static-dynamic-build.patch b/ports/gl2ps/separate-static-dynamic-build.patch index fe2267e6aa6b6a..8bc8f291089ef8 100644 --- a/ports/gl2ps/separate-static-dynamic-build.patch +++ b/ports/gl2ps/separate-static-dynamic-build.patch @@ -1,64 +1,61 @@ -diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" -index 40da57e..39acf6b 100644 ---- "a/CMakeLists.txt" -+++ "b/CMakeLists.txt" -@@ -1,34 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0001c4f..36ec0f7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,33 +1,41 @@ # GL2PS, an OpenGL to PostScript Printing Library # Copyright (C) 1999-2017 C. Geuzaine --# -+# ++ + # # This program is free software; you can redistribute it and/or # modify it under the terms of either: --# -+# ++ + # # a) the GNU Library General Public License as published by the Free # Software Foundation, either version 2 of the License, or (at your # option) any later version; or --# -+# ++ + # # b) the GL2PS License as published by Christophe Geuzaine, either # version 2 of the License, or (at your option) any later version. --# -+# ++ + # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either # the GNU Library General Public License or the GL2PS License for # more details. --# -+# ++ + # # You should have received a copy of the GNU Library General Public # License along with this library in the file named "COPYING.LGPL"; # if not, write to the Free Software Foundation, Inc., 675 Mass Ave, # Cambridge, MA 02139, USA. --# -+# ++ + # # You should have received a copy of the GL2PS License with this # library in the file named "COPYING.GL2PS"; if not, I will be glad # to provide one. --# -+# ++ + # # For the latest info about gl2ps and a full list of contributors, # see http://www.geuz.org/gl2ps/. --# -+# ++ + # # Please report all bugs and problems to . - cmake_minimum_required(VERSION 2.4 FATAL_ERROR) -@@ -55,8 +55,8 @@ set(GL2PS_EXTRA_VERSION "" CACHE STRING "GL2PS extra version string") - set(GL2PS_VERSION "${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}") +@@ -59,7 +67,7 @@ set(GL2PS_VERSION "${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}") set(GL2PS_VERSION "${GL2PS_VERSION}.${GL2PS_PATCH_VERSION}${GL2PS_EXTRA_VERSION}") --execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE + execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE - OUTPUT_STRIP_TRAILING_WHITESPACE) -+execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE +OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT DATE) set(DATE "unknown") - endif(NOT DATE) -@@ -113,84 +113,93 @@ endif(MATH_LIBRARY) - - include_directories(${EXTERNAL_INCLUDES}) + endif() +@@ -138,30 +146,30 @@ if(APPLE) + endif() + endif() -if(OPENGL_FOUND) - add_library(lib STATIC gl2ps.c gl2ps.h) @@ -66,17 +63,16 @@ index 40da57e..39acf6b 100644 - - add_library(shared SHARED gl2ps.c gl2ps.h) - target_link_libraries(shared ${EXTERNAL_LIBRARIES}) -- set_target_properties(shared PROPERTIES OUTPUT_NAME gl2ps) -- set_target_properties(shared PROPERTIES +- set_target_properties(shared PROPERTIES OUTPUT_NAME gl2ps - VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION} - SOVERSION ${GL2PS_MAJOR_VERSION}) -- if(MSVC) -- set_target_properties(shared PROPERTIES COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS") -- endif(MSVC) -- -- install(TARGETS lib shared DESTINATION lib${LIB_SUFFIX}) --endif(OPENGL_FOUND) -+ +- if(WIN32 OR CYGWIN) +- set_target_properties(shared PROPERTIES +- COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS") +- endif() +- install(TARGETS lib shared RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib${LIB_SUFFIX} +- ARCHIVE DESTINATION lib${LIB_SUFFIX}) +add_library(gl2ps gl2ps.c gl2ps.h) +target_link_libraries(gl2ps ${EXTERNAL_LIBRARIES}) +set_target_properties(gl2ps PROPERTIES @@ -85,8 +81,8 @@ index 40da57e..39acf6b 100644 + +if(BUILD_SHARED_LIBS) + target_compile_definitions(gl2ps PRIVATE -DGL2PSDLL -DGL2PSDLL_EXPORTS) -+endif() -+ + endif() + +install( + TARGETS gl2ps + RUNTIME DESTINATION bin @@ -94,23 +90,45 @@ index 40da57e..39acf6b 100644 + ARCHIVE DESTINATION lib +) + - if(WIN32) - set(GL2PS_DOC .) + set(GL2PS_DOC share/gl2ps/docs) - else(WIN32) + else() set(GL2PS_DOC share/doc/gl2ps) - endif(WIN32) + endif() +if(NOT DISABLE_INSTALL_HEADERS) install(FILES gl2ps.h DESTINATION include) install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION ${GL2PS_DOC}) install(FILES ${CMAKE_SOURCE_DIR}/COPYING.LGPL DESTINATION ${GL2PS_DOC}) - install(FILES ${CMAKE_SOURCE_DIR}/COPYING.GL2PS DESTINATION ${GL2PS_DOC}) +@@ -169,30 +177,36 @@ install(FILES ${CMAKE_SOURCE_DIR}/COPYING.GL2PS DESTINATION ${GL2PS_DOC}) install(FILES ${CMAKE_SOURCE_DIR}/gl2psTest.c DESTINATION ${GL2PS_DOC}) install(FILES ${CMAKE_SOURCE_DIR}/gl2psTestSimple.c DESTINATION ${GL2PS_DOC}) -+endif() -+ + +-if(GLUT_FOUND) +- add_executable(gl2psTest WIN32 gl2psTest.c) +- target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES}) +- add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c) +- target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES}) + endif() + +-find_package(LATEX) +-if(PDFLATEX_COMPILER) +- add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR}) +- add_custom_target(pdf ALL DEPENDS gl2ps.pdf) +- install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC}) +- find_program(TTH tth) +- if(TTH) +- add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf +- COMMAND ${CMAKE_COMMAND} -E copy_if_different +- ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex +- COMMAND ${TTH} ARGS -w1 gl2ps.tex) +- add_custom_target(html DEPENDS gl2ps.html) +- endif() +if(BUILD_TESTS) + + if(GLUT_FOUND) @@ -139,62 +157,38 @@ index 40da57e..39acf6b 100644 + endif(TTH) + endif(PDFLATEX_COMPILER) + -+endif() - --if(GLUT_FOUND) -- add_executable(gl2psTest WIN32 gl2psTest.c) -- target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES}) -- add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c) -- target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES}) --endif(GLUT_FOUND) -- --find_package(LATEX) --if(PDFLATEX_COMPILER) -- add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex -- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex -- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex -- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex -- COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR}) -- add_custom_target(pdf ALL DEPENDS gl2ps.pdf) -- install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC}) -- find_program(TTH tth) -- if(TTH) -- add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf -- COMMAND ${CMAKE_COMMAND} -E copy_if_different -- ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex -- COMMAND ${TTH} ARGS -w1 gl2ps.tex) -- add_custom_target(html DEPENDS gl2ps.html) -- endif(TTH) --endif(PDFLATEX_COMPILER) + endif() set(CPACK_PACKAGE_VENDOR "Christophe Geuzaine") - set(CPACK_PACKAGE_VERSION_MAJOR ${GL2PS_MAJOR_VERSION}) - set(CPACK_PACKAGE_VERSION_MINOR ${GL2PS_MINOR_VERSION}) +@@ -201,27 +215,22 @@ set(CPACK_PACKAGE_VERSION_MINOR ${GL2PS_MINOR_VERSION}) set(CPACK_PACKAGE_VERSION_PATCH ${GL2PS_PATCH_VERSION}) set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README.txt) --set(CPACK_PACKAGE_DESCRIPTION_SUMMARY + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY - "An OpenGL to PostScript (and PDF, and SVG...) printing library") --set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) +-if(GL2PS_EXTRA_VERSION MATCHES "-git.*") # so that we'll overwrite the archives +- set(CPACK_PACKAGE_FILE_NAME gl2ps-git-${GL2PS_OS}) +- set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-git) +-else() ++ "An OpenGL to PostScript (and PDF, and SVG...) printing library") + set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) +- set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}) +-endif() -set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps") -set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL) -set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt) -set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt) -set(CPACK_PACKAGE_EXECUTABLE "gl2ps;gl2ps") -set(CPACK_STRIP_FILES TRUE) --set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-source) -set(CPACK_SOURCE_GENERATOR TGZ) -set(CPACK_SOURCE_IGNORE_FILES "TODO.txt" "${CMAKE_BINARY_DIR}" "/CVS/" -- "/.svn" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/") +- "/.svn" "/.git" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/") -if(WIN32) - set(CPACK_GENERATOR ZIP) --else(WIN32) +-else() - set(CPACK_GENERATOR TGZ) --endif(WIN32) +-endif() - -include(CPack) -+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY -+ "An OpenGL to PostScript (and PDF, and SVG...) printing library") -+ set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) + set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps") + set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL) + set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt) diff --git a/ports/gl2ps/vcpkg.json b/ports/gl2ps/vcpkg.json new file mode 100644 index 00000000000000..4230bc45cbd86a --- /dev/null +++ b/ports/gl2ps/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "gl2ps", + "version-string": "1.4.2", + "port-version": 1, + "description": "OpenGL to PostScript Printing Library", + "homepage": "https://gitlab.onelab.info/gl2ps/gl2ps", + "dependencies": [ + "freeglut", + "libpng", + "zlib" + ] +} diff --git a/ports/gl3w/CONTROL b/ports/gl3w/CONTROL deleted file mode 100644 index 7ce058fbce0e69..00000000000000 --- a/ports/gl3w/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gl3w -Version: 2018-05-31-1 -Homepage: https://github.com/skaslev/gl3w -Description: Simple OpenGL core profile loading -Build-Depends: opengl-registry diff --git a/ports/gl3w/portfile.cmake b/ports/gl3w/portfile.cmake index ca35eb2bf1d785..1cf3e0f2beba9f 100644 --- a/ports/gl3w/portfile.cmake +++ b/ports/gl3w/portfile.cmake @@ -1,31 +1,34 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO skaslev/gl3w REF 99ed321100d37032cb6bfa7dd8dea85f10c86132 SHA512 217f65644c73c33383b09893fa5ede066cc4b1cddab051feac11d7e939dba14ed637b297ea42a0426bc0a1a3bc665998a91c27ca10d28704ce9e2d3d90e73595 HEAD_REF master + PATCHES + 0001-enable-shared-build.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CURRENT_INSTALLED_DIR}/include/GL/glcorearb.h DESTINATION ${SOURCE_PATH}/include/GL) +# Download khrplatform.h with vcpkg instead of gl3w_gen.py so that our downloader settings are used +vcpkg_download_distfile(KHRPLATFORM_H + URLS "https://www.khronos.org/registry/EGL/api/KHR/khrplatform.h" + FILENAME khrplatform.h + SHA512 93d9075718eddb69c44482acdc72bbbd3511741272a6124d05ab1ef0702ef03e918501403b6fd334faf2c61f3332f34b7730158aa090db3d448c32b5dd9d9e67 + ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-enable-shared-build.patch -) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CURRENT_INSTALLED_DIR}/include/GL/glcorearb.h" DESTINATION "${SOURCE_PATH}/include/GL") +file(COPY "${KHRPLATFORM_H}" DESTINATION "${SOURCE_PATH}/include/KHR") vcpkg_find_acquire_program(PYTHON3) vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${SOURCE_PATH}/gl3w_gen.py - WORKING_DIRECTORY ${SOURCE_PATH} + COMMAND "${PYTHON3}" "${SOURCE_PATH}/gl3w_gen.py" + WORKING_DIRECTORY "${SOURCE_PATH}" LOGNAME gl3w-gen ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) @@ -35,10 +38,7 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(HEADER ${CURRENT_PACKAGES_DIR}/include/GL/gl3w.h) - file(READ ${HEADER} _contents) - string(REPLACE "#define GL3W_API" "#define GL3W_API __declspec(dllimport)" _contents "${_contents}") - file(WRITE ${HEADER} "${_contents}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/GL/gl3w.h" "#define GL3W_API" "#define GL3W_API __declspec(dllimport)") endif() -file(INSTALL ${SOURCE_PATH}/UNLICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl3w RENAME copyright) +file(INSTALL "${SOURCE_PATH}/UNLICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/gl3w/vcpkg.json b/ports/gl3w/vcpkg.json new file mode 100644 index 00000000000000..f38702da242839 --- /dev/null +++ b/ports/gl3w/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "gl3w", + "version-date": "2018-05-31", + "port-version": 3, + "description": "Simple OpenGL core profile loading", + "homepage": "https://github.com/skaslev/gl3w", + "dependencies": [ + "opengl-registry" + ] +} diff --git a/ports/glad/CONTROL b/ports/glad/CONTROL deleted file mode 100644 index 98a4271956c145..00000000000000 --- a/ports/glad/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: glad -Version: 0.1.30 -Description: Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs. -Build-Depends: egl-registry, opengl-registry diff --git a/ports/glad/encoding.patch b/ports/glad/encoding.patch new file mode 100644 index 00000000000000..0497cc79ae2153 --- /dev/null +++ b/ports/glad/encoding.patch @@ -0,0 +1,13 @@ +diff --git a/glad/__main__.py b/glad/__main__.py +index e7c0544a5..1e10dcc60 100644 +--- a/glad/__main__.py ++++ b/glad/__main__.py +@@ -32,7 +32,7 @@ def main(): + if reproducible: + logger.info('reproducible build, using packaged specification: \'%s.xml\'', value) + try: +- return spec_cls.from_file(glad.files.open_local(value + '.xml')) ++ return spec_cls.from_file(glad.files.open_local(value + '.xml', encoding='utf-8-sig')) + except IOError: + raise ValueError('unable to open reproducible copy of {}.xml, ' + 'try dropping --reproducible'.format(value)) diff --git a/ports/glad/find_python.patch b/ports/glad/find_python.patch new file mode 100644 index 00000000000000..c1f13229b486fd --- /dev/null +++ b/ports/glad/find_python.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c4031a6..6a106e9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,16 +23,6 @@ project(GLAD VERSION 0.1.34 LANGUAGES C) + + set(GLAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +-# Find the python interpreter, set the PYTHON_EXECUTABLE variable +-if (CMAKE_VERSION VERSION_LESS 3.12) +- # this logic is deprecated in CMake after 3.12 +- find_package(PythonInterp REQUIRED) +-else() +- # the new hotness. This will preferentially find Python3 instead of Python2 +- find_package(Python) +- set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) +-endif() +- + # Options + set(GLAD_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE STRING "Output directory") + set(GLAD_PROFILE "compatibility" CACHE STRING "OpenGL profile") diff --git a/ports/glad/portfile.cmake b/ports/glad/portfile.cmake index eb1a226e9e035e..e29d97d561ba18 100644 --- a/ports/glad/portfile.cmake +++ b/ports/glad/portfile.cmake @@ -1,21 +1,119 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Dav1dde/glad - REF v0.1.30 - SHA512 2db0f75e5859be039bf4dcbea239dd6d35bdc92e69912e807dfacdb01581c73b6a5eb0f0889f2ffcd705415abe5f28cf204b4010d08f5477b51c0ce3ae6a35b5 + REF 7ece538856bf124d798ab323c8e1e64ebb83cb50 + SHA512 f6a8ba7d0d09b89c23b6f76962d3e6eef1babc8e1a659e238d30e143eb33ccba424957e5a6d46d99a714bfa2967523b193586d0ff24e29ad8d86c92c9faf9c02 HEAD_REF master + PATCHES encoding.patch find_python.patch +) + +if(NOT GLAD_PROFILE) + set(GLAD_PROFILE "compatibility") +endif() +message(STATUS "This version of glad uses the compatibility profile. To use the core profile instead, create an overlay port of this with GLAD_PROFILE set to 'core' or set GLAD_PROFILE to 'core' in a custom triplet.") +message(STATUS "This recipe is at ${CMAKE_CURRENT_LIST_DIR}") +message(STATUS "See the overlay ports documentation at https://github.com/microsoft/vcpkg/blob/master/docs/specifications/ports-overlay.md") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + extensions GLAD_ALL_EXTENSIONS + INVERTED_FEATURES + loader GLAD_NO_LOADER ) +set(GLAD_SPEC "gl") + +if("egl" IN_LIST FEATURES) + string(APPEND GLAD_SPEC ",egl") +endif() + +if("wgl" IN_LIST FEATURES) + string(APPEND GLAD_SPEC ",wgl") +endif() + +if("glx" IN_LIST FEATURES) + string(APPEND GLAD_SPEC ",glx") +endif() + +# This needs to be ordered highest to lowest for it to be correct! +if("gl-api-latest" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=") +elseif("gl-api-46" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=4.6") +elseif("gl-api-45" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=4.5") +elseif("gl-api-44" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=4.4") +elseif("gl-api-43" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=4.3") +elseif("gl-api-42" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=4.2") +elseif("gl-api-41" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=4.1") +elseif("gl-api-40" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=4.0") +elseif("gl-api-33" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=3.3") +elseif("gl-api-32" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=3.2") +elseif("gl-api-31" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=3.1") +elseif("gl-api-30" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=3.0") +elseif("gl-api-21" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=2.1") +elseif("gl-api-20" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=2.0") +elseif("gl-api-15" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=1.5") +elseif("gl-api-14" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=1.4") +elseif("gl-api-13" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=1.3") +elseif("gl-api-12" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=1.2") +elseif("gl-api-11" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=1.1") +elseif("gl-api-10" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gl=1.0") +endif() + +# This needs to be ordered highest to lowest for it to be correct! +if("gles1-api-latest" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gles1=") +elseif("gles1-api-10" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gles1=1.0") +endif() + +# This needs to be ordered highest to lowest for it to be correct! +if("gles2-api-latest" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gles2=") +elseif("gles2-api-32" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gles2=3.2") +elseif("gles2-api-31" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gles2=3.1") +elseif("gles2-api-30" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gles2=3.0") +elseif("gles2-api-20" IN_LIST FEATURES) + LIST(APPEND GLAD_API "gles2=2.0") +endif() + +# This needs to be ordered highest to lowest for it to be correct! +if("glsc2-api-latest" IN_LIST FEATURES) + LIST(APPEND GLAD_API "glsc2=") +elseif("glsc2-api-20" IN_LIST FEATURES) + LIST(APPEND GLAD_API "glsc2=2.0") +endif() + +string(REPLACE ";" "," GLAD_API "${GLAD_API}") + vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) -vcpkg_add_to_path("${PYTHON3_DIR}") file(COPY ${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h + ${CURRENT_INSTALLED_DIR}/include/EGL/eglplatform.h ${CURRENT_INSTALLED_DIR}/share/egl-registry/egl.xml ${CURRENT_INSTALLED_DIR}/share/opengl-registry/gl.xml ${CURRENT_INSTALLED_DIR}/share/opengl-registry/glx.xml @@ -23,23 +121,29 @@ file(COPY DESTINATION ${SOURCE_PATH}/glad/files ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DGLAD_NO_LOADER=OFF -DGLAD_EXPORT=OFF -DGLAD_INSTALL=ON -DGLAD_REPRODUCIBLE=ON - -DGLAD_SPEC="gl" # {gl,egl,glx,wgl} - -DGLAD_PROFILE="compatibility" # {core,compatibility} + -DGLAD_SPEC=${GLAD_SPEC} + -DGLAD_API=${GLAD_API} + -DGLAD_PROFILE=${GLAD_PROFILE} + -DPYTHON_EXECUTABLE=${PYTHON3} + ${FEATURE_OPTIONS} OPTIONS_DEBUG -DGLAD_GENERATOR="c-debug" + OPTIONS_RELEASE + -DGLAD_GENERATOR="c" ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glad) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glad) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/KHR) -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/glad/copyright COPYONLY) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/EGL) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/glad/vcpkg.json b/ports/glad/vcpkg.json new file mode 100644 index 00000000000000..8843c744b68757 --- /dev/null +++ b/ports/glad/vcpkg.json @@ -0,0 +1,353 @@ +{ + "name": "glad", + "version": "0.1.34", + "port-version": 1, + "description": "Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.", + "homepage": "https://github.com/Dav1dde/glad", + "documentation": "https://github.com/Dav1dde/glad/wiki", + "license": "MIT", + "dependencies": [ + "egl-registry", + "opengl-registry", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "loader" + ], + "features": { + "egl": { + "description": "Use `egl` spec instead of `gl`." + }, + "extensions": { + "description": "Enables all extensions." + }, + "gl-api-10": { + "description": "Imports extensions from OpenGL API specification version 1.0." + }, + "gl-api-11": { + "description": "Imports extensions from OpenGL API specification version 1.1.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-10" + ] + } + ] + }, + "gl-api-12": { + "description": "Imports extensions from OpenGL API specification version 1.2.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-11" + ] + } + ] + }, + "gl-api-13": { + "description": "Imports extensions from OpenGL API specification version 1.3.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-12" + ] + } + ] + }, + "gl-api-14": { + "description": "Imports extensions from OpenGL API specification version 1.4.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-13" + ] + } + ] + }, + "gl-api-15": { + "description": "Imports extensions from OpenGL API specification version 1.5.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-14" + ] + } + ] + }, + "gl-api-20": { + "description": "Imports extensions from OpenGL API specification version 2.0.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-15" + ] + } + ] + }, + "gl-api-21": { + "description": "Imports extensions from OpenGL API specification version 2.1.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-20" + ] + } + ] + }, + "gl-api-30": { + "description": "Imports extensions from OpenGL API specification version 3.0.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-21" + ] + } + ] + }, + "gl-api-31": { + "description": "Imports extensions from OpenGL API specification version 3.1.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-30" + ] + } + ] + }, + "gl-api-32": { + "description": "Imports extensions from OpenGL API specification version 3.2.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-31" + ] + } + ] + }, + "gl-api-33": { + "description": "Imports extensions from OpenGL API specification version 3.3.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-32" + ] + } + ] + }, + "gl-api-40": { + "description": "Imports extensions from OpenGL API specification version 4.0.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-33" + ] + } + ] + }, + "gl-api-41": { + "description": "Imports extensions from OpenGL API specification version 4.1.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-40" + ] + } + ] + }, + "gl-api-42": { + "description": "Imports extensions from OpenGL API specification version 4.2.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-41" + ] + } + ] + }, + "gl-api-43": { + "description": "Imports extensions from OpenGL API specification version 4.3.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-42" + ] + } + ] + }, + "gl-api-44": { + "description": "Imports extensions from OpenGL API specification version 4.4.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-43" + ] + } + ] + }, + "gl-api-45": { + "description": "Imports extensions from OpenGL API specification version 4.5.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-44" + ] + } + ] + }, + "gl-api-46": { + "description": "Imports extensions from OpenGL API specification version 4.6.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-45" + ] + } + ] + }, + "gl-api-latest": { + "description": "Imports extensions from latest OpenGL API specification version.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gl-api-46" + ] + } + ] + }, + "gles1-api-10": { + "description": "Imports extensions from OpenGL ES 1 specification version 1.0." + }, + "gles1-api-latest": { + "description": "Imports extensions from latest OpenGL ES 1 specification.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gles1-api-10" + ] + } + ] + }, + "gles2-api-20": { + "description": "Imports extensions from OpenGL ES 2 specification version 2.0." + }, + "gles2-api-30": { + "description": "Imports extensions from OpenGL ES 2 specification version 3.0.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gles2-api-20" + ] + } + ] + }, + "gles2-api-31": { + "description": "Imports extensions from OpenGL ES 2 specification version 3.1.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gles2-api-30" + ] + } + ] + }, + "gles2-api-32": { + "description": "Imports extensions from OpenGL ES 2 specification version 3.2.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gles2-api-31" + ] + } + ] + }, + "gles2-api-latest": { + "description": "Imports extensions from latest OpenGL ES 2 specification.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "gles2-api-32" + ] + } + ] + }, + "glsc2-api-20": { + "description": "Imports extensions from OpenGL SC API specification version 2.0." + }, + "glsc2-api-latest": { + "description": "Imports extensions from latest OpenGL SC API specification.", + "dependencies": [ + { + "name": "glad", + "default-features": false, + "features": [ + "glsc2-api-20" + ] + } + ] + }, + "glx": { + "description": "Use `glx` spec instead of `gl`. Only available with the X Window System." + }, + "loader": { + "description": "Generate loader logic." + }, + "wgl": { + "description": "Use `wgl` spec instead of `gl`. Only available for Windows and UWP platforms." + } + } +} diff --git a/ports/glbinding/CONTROL b/ports/glbinding/CONTROL deleted file mode 100644 index 5bef7210a16266..00000000000000 --- a/ports/glbinding/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: glbinding -Version: 3.1.0-2 -Description: glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API -Homepage: https://github.com/cginternals/glbinding -Build-Depends: egl-registry diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake index 863426282be11b..6aa2e4e393e0e5 100644 --- a/ports/glbinding/portfile.cmake +++ b/ports/glbinding/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cginternals/glbinding @@ -57,3 +56,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/KHR) # Handle copyright file(RENAME ${CURRENT_PACKAGES_DIR}/share/glbinding/LICENSE ${CURRENT_PACKAGES_DIR}/share/glbinding/copyright) +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/glbinding/usage @ONLY) diff --git a/ports/glbinding/usage b/ports/glbinding/usage new file mode 100644 index 00000000000000..010a5c6da3e848 --- /dev/null +++ b/ports/glbinding/usage @@ -0,0 +1,4 @@ +The package glbinding:@TARGET_TRIPLET@ provides CMake targets: + + find_package(glbinding CONFIG REQUIRED) + target_link_libraries(main PRIVATE glbinding::glbinding glbinding::glbinding-aux) diff --git a/ports/glbinding/vcpkg.json b/ports/glbinding/vcpkg.json new file mode 100644 index 00000000000000..4a13308968ca2a --- /dev/null +++ b/ports/glbinding/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "glbinding", + "version-string": "3.1.0", + "port-version": 3, + "description": "glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API", + "homepage": "https://github.com/cginternals/glbinding", + "dependencies": [ + "egl-registry" + ] +} diff --git a/ports/glew/CONTROL b/ports/glew/CONTROL deleted file mode 100644 index 41df4d08ce3bc2..00000000000000 --- a/ports/glew/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: glew -Version: 2.1.0-5 -Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. -Homepage: https://github.com/nigels-com/glew diff --git a/ports/glew/fix-LNK2019.patch b/ports/glew/fix-LNK2019.patch index d45e61a8806319..8b628fa88e29cb 100644 --- a/ports/glew/fix-LNK2019.patch +++ b/ports/glew/fix-LNK2019.patch @@ -1,13 +1,17 @@ -diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt -index 5081e0f..f76725a 100644 ---- a/build/cmake/CMakeLists.txt -+++ b/build/cmake/CMakeLists.txt -@@ -108,7 +108,7 @@ if (MSVC) - target_compile_options (glew PRIVATE -GS-) - target_compile_options (glew_s PRIVATE -GS-) - # remove stdlib dependency -- target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry) -+ # target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry) - string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) - elseif (WIN32 AND ((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))) - # remove stdlib dependency on windows with GCC and Clang (for similar reasons +diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt +index 419c243..f81fab4 100644 +--- a/build/cmake/CMakeLists.txt ++++ b/build/cmake/CMakeLists.txt +@@ -120,9 +120,9 @@ if (MSVC) + target_compile_options (glew PRIVATE -GS-) + target_compile_options (glew_s PRIVATE -GS-) + # remove stdlib dependency +- target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry) +- target_link_libraries (glew LINK_PRIVATE libvcruntime.lib) +- target_link_libraries (glew LINK_PRIVATE msvcrt.lib ) ++ #target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry) ++ #target_link_libraries (glew LINK_PRIVATE libvcruntime.lib) ++ #target_link_libraries (glew LINK_PRIVATE msvcrt.lib ) + string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) + elseif (WIN32 AND ((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))) + # remove stdlib dependency on windows with GCC and Clang (for similar reasons diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index 818ee52ea8abdd..dc64a2aca978e1 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -1,32 +1,36 @@ -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew-58abdfb190) +if(VCPKG_TARGET_IS_LINUX) + message(WARNING "${PORT} requires the following libraries from the system package manager:\n libxmu-dev\n libxi-dev\n libgl-dev\n\nThese can be installed on Ubuntu systems via apt-get install libxmu-dev libxi-dev libgl-dev.") +endif() -# Don't change to vcpkg_from_github! The github-auto-generated archives are missing some files. +# Don't change to vcpkg_from_github! The sources in the git repository (archives) are missing some files that are distributed inside releases. # More info: https://github.com/nigels-com/glew/issues/31 and https://github.com/nigels-com/glew/issues/13 -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz" - FILENAME "glew-2.1.0.tgz" - SHA512 9a9b4d81482ccaac4b476c34ed537585ae754a82ebb51c3efa16d953c25cc3931be46ed2e49e79c730cd8afc6a1b78c97d52cd714044a339c3bc29734cd4d2ab +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz" + FILENAME "glew-2.2.0.tgz" + SHA512 57453646635609d54f62fb32a080b82b601fd471fcfd26e109f479b3fef6dfbc24b83f4ba62916d07d62cd06d1409ad7aa19bc1cd7cf3639c103c815b8be31d1 ) + vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH ${SOURCE_PATH} - ARCHIVE ${ARCHIVE_FILE} + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} REF glew - PATCHES fix-LNK2019.patch + PATCHES + fix-LNK2019.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/build/cmake - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/build/cmake" DISABLE_PARALLEL_CONFIGURE OPTIONS -DBUILD_UTILS=OFF - ) +) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glew) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glew) +# Skip check the required dependency opengl +vcpkg_fixup_pkgconfig(SKIP_CHECK) +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) set(_targets_cmake_files) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake") @@ -41,17 +45,18 @@ foreach(FILE ${_targets_cmake_files}) file(WRITE ${FILE} "${_contents}") endforeach() -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib ${CURRENT_PACKAGES_DIR}/lib/glew32.lib) +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libglew32.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libglew32.lib" "${CURRENT_PACKAGES_DIR}/lib/glew32.lib") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/glew32d.lib") endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/glew32d.lib) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - foreach(FILE ${CURRENT_PACKAGES_DIR}/include/GL/glew.h ${CURRENT_PACKAGES_DIR}/include/GL/wglew.h ${CURRENT_PACKAGES_DIR}/include/GL/glxew.h) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + foreach(FILE "${CURRENT_PACKAGES_DIR}/include/GL/glew.h" "${CURRENT_PACKAGES_DIR}/include/GL/wglew.h" "${CURRENT_PACKAGES_DIR}/include/GL/glxew.h") file(READ ${FILE} _contents) string(REPLACE "#ifdef GLEW_STATIC" "#if 1" _contents "${_contents}") file(WRITE ${FILE} "${_contents}") @@ -60,8 +65,9 @@ endif() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/glew/vcpkg-cmake-wrapper.cmake b/ports/glew/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..6ad9ae434af5b6 --- /dev/null +++ b/ports/glew/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,25 @@ +include(SelectLibraryConfigurations) +_find_package(GLEW CONFIG) +if(GLEW_FOUND AND TARGET GLEW::GLEW AND NOT DEFINED GLEW_INCLUDE_DIRS) + get_target_property(GLEW_INCLUDE_DIRS GLEW::GLEW INTERFACE_INCLUDE_DIRECTORIES) + set(GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIRS}) + get_target_property(_GLEW_DEFS GLEW::GLEW INTERFACE_COMPILE_DEFINITIONS) + if("${_GLEW_DEFS}" MATCHES "GLEW_STATIC") + get_target_property(GLEW_LIBRARY_DEBUG GLEW::GLEW IMPORTED_LOCATION_DEBUG) + get_target_property(GLEW_LIBRARY_RELEASE GLEW::GLEW IMPORTED_LOCATION_RELEASE) + else() + get_target_property(GLEW_LIBRARY_DEBUG GLEW::GLEW IMPORTED_IMPLIB_DEBUG) + get_target_property(GLEW_LIBRARY_RELEASE GLEW::GLEW IMPORTED_IMPLIB_RELEASE) + endif() + get_target_property(_GLEW_LINK_INTERFACE GLEW::GLEW IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE) # same for debug and release + list(APPEND GLEW_LIBRARIES ${_GLEW_LINK_INTERFACE}) + list(APPEND GLEW_LIBRARY ${_GLEW_LINK_INTERFACE}) + select_library_configurations(GLEW) + if("${_GLEW_DEFS}" MATCHES "GLEW_STATIC") + set(GLEW_STATIC_LIBRARIES ${GLEW_LIBRARIES}) + else() + set(GLEW_SHARED_LIBRARIES ${GLEW_LIBRARIES}) + endif() + unset(_GLEW_DEFS) + unset(_GLEW_LINK_INTERFACE) +endif() \ No newline at end of file diff --git a/ports/glew/vcpkg.json b/ports/glew/vcpkg.json new file mode 100644 index 00000000000000..7468ecadf894a3 --- /dev/null +++ b/ports/glew/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "glew", + "version-string": "2.2.0", + "description": "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library.", + "homepage": "https://github.com/nigels-com/glew", + "dependencies": [ + "opengl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/glfw3/CONTROL b/ports/glfw3/CONTROL deleted file mode 100644 index 6cbc41564ae00a..00000000000000 --- a/ports/glfw3/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: glfw3 -Version: 3.3-1 -Homepage: https://github.com/glfw/glfw -Description: GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc. diff --git a/ports/glfw3/move-cmake-min-req.patch b/ports/glfw3/move-cmake-min-req.patch deleted file mode 100644 index 7b5c595df85b7b..00000000000000 --- a/ports/glfw3/move-cmake-min-req.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b1476bd..00fc0b9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,8 +1,8 @@ - set(CMAKE_LEGACY_CYGWIN_WIN32 OFF) - -+cmake_minimum_required(VERSION 2.8.12) - project(GLFW C) - --cmake_minimum_required(VERSION 2.8.12) - - if (NOT CMAKE_VERSION VERSION_LESS "3.0") - # Until all major package systems have moved to CMake 3, diff --git a/ports/glfw3/portfile.cmake b/ports/glfw3/portfile.cmake index c8948628fea7eb..0b9d9d6314d0c2 100644 --- a/ports/glfw3/portfile.cmake +++ b/ports/glfw3/portfile.cmake @@ -1,21 +1,20 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO glfw/glfw - REF 3.3 - SHA512 e74bb7ba0c1c3a524a193c4fb5a2d13ba0e75f8e309612ea19cdcc944859d6e2fe29d8b2e3db76236e1011b637564ddd5f4a176dcccfeb84d09bda060f08f774 + REF 814b7929c5add4b0541ccad26fb81f28b71dc4d8 #v3.3.4 + SHA512 8e34d011ab49940b405998312af4807e4c9837a44d95d873cb3723e7c141da6a10c1dfaf1652f03b31b911f0ae4515ded52cac02844435dc374b93d376921e43 HEAD_REF master - PATCHES move-cmake-min-req.patch ) -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_LINUX) message( "GLFW3 currently requires the following libraries from the system package manager: xinerama xcursor + xorg + libglu1-mesa -These can be installed on Ubuntu systems via sudo apt install libxinerama-dev libxcursor-dev") +These can be installed on Ubuntu systems via sudo apt install libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev") endif() vcpkg_configure_cmake( @@ -31,22 +30,10 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glfw3) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_pkgconfig() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/glfw3.dll OR EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/bin/glfw3.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glfw3.dll) - foreach(_conf release debug) - file(READ ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-${_conf}.cmake _contents) - string(REPLACE "lib/glfw3.dll" "bin/glfw3.dll" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-${_conf}.cmake "${_contents}") - endforeach() - endif() -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/glfw3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/glfw3/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/glfw3/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/glfw3/vcpkg.json b/ports/glfw3/vcpkg.json new file mode 100644 index 00000000000000..f152921cc8251d --- /dev/null +++ b/ports/glfw3/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "glfw3", + "version-semver": "3.3.4", + "description": "GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.", + "homepage": "https://github.com/glfw/glfw" +} diff --git a/ports/gli/CONTROL b/ports/gli/CONTROL deleted file mode 100644 index 6ba55d18d8d464..00000000000000 --- a/ports/gli/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gli -Version: dd17acf -Build-Depends: glm -Description: OpenGL Image (GLI) -Homepage: https://gli.g-truc.net diff --git a/ports/gli/disable-test.patch b/ports/gli/disable-test.patch new file mode 100644 index 00000000000000..d6bf0d7ce4a6e8 --- /dev/null +++ b/ports/gli/disable-test.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6eb1a68..610c0bc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -71,7 +71,7 @@ endmacro(addExternalPackageGTC) + # Add subdirectory + + add_subdirectory(gli) +-add_subdirectory(test) ++#add_subdirectory(test) + #add_subdirectory(doc) + + ################################ diff --git a/ports/gli/portfile.cmake b/ports/gli/portfile.cmake index beae5e530deb0c..5168aca1e5d738 100644 --- a/ports/gli/portfile.cmake +++ b/ports/gli/portfile.cmake @@ -1,19 +1,28 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO g-truc/gli - REF dd17acf9cc7fc6e6abe9f9ec69949eeeee1ccd82 - SHA512 9e3a4ab9ee73d5c271b8346cf81339cd3cd0c20d20991524b816313b6a99e8d3a01863316a38cf1a52ef9c5b31d689ecccf6248b12d1d270460c048bf904650b + REF 779b99ac6656e4d30c3b24e96e0136a59649a869 + SHA512 6e7ab46b7943cb185c8c1f6e45b765f5463e03628973043a0e8b866458ccceb5249f69a2a77b5e69c73f3ace85af96c7b9b2137685ceb6d0fcb67e491a49be69 HEAD_REF master + PATCHES + disable-test.patch ) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gli) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/gli/CMakeLists.txt) + # Put the license file where vcpkg expects it # manual.md contains the "licenses" section for the project -file(COPY ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/gli/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gli/manual.md ${CURRENT_PACKAGES_DIR}/share/gli/copyright) - -# Copy the glm header files -file(GLOB HEADER_FILES "${SOURCE_PATH}/gli/*.hpp" "${SOURCE_PATH}/gli/core") -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/gli) +file(INSTALL ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/gli/vcpkg.json b/ports/gli/vcpkg.json new file mode 100644 index 00000000000000..e1d746619608c9 --- /dev/null +++ b/ports/gli/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "gli", + "version-date": "2021-07-06", + "description": "OpenGL Image (GLI)", + "homepage": "https://gli.g-truc.net", + "dependencies": [ + "glm" + ] +} diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt deleted file mode 100644 index ccc2a77e2d05a1..00000000000000 --- a/ports/glib/CMakeLists.txt +++ /dev/null @@ -1,348 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(glib C) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_C_STANDARD 11) - -if(MSVC) - add_compile_options(/utf-8) -endif() -set(GLIB_DLL_SUFFIX 2) -set(GLIB_LIB_SUFFIX 2.0) - -if(CMAKE_BUILD_TYPE STREQUAL Debug) - add_definitions(-DG_ENABLE_DEBUG) -endif() - -if(BUILD_SHARED_LIBS) - add_definitions(-DDLL_EXPORT) -endif() - -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) - -# find dependencies - -# zlib -find_package(ZLIB REQUIRED) -# pcre -find_path(PCRE_INCLUDE_DIR pcre.h) -if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(PCRE_SUFFIX d) -endif() -find_library(PCRE_LIBRARY NAMES pcre${PCRE_SUFFIX} pcre) -# libiconv -find_package(unofficial-iconv REQUIRED) -# libffi -find_path(FFI_INCLUDE_DIR ffi.h) -find_library(FFI_LIBRARY NAMES ffi libffi) -get_filename_component(LIB_DIR "${FFI_LIBRARY}" DIRECTORY) -if(APPLE) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - find_library(FOUNDATION_LIBRARY Foundation) - find_library(CORESERVICES_LIBRARY CoreServices) - link_libraries(${CORESERVICES_LIBRARY} ${COREFOUNDATION_LIBRARY} ${FOUNDATION_LIBRARY}) -endif() - -if(WIN32 OR APPLE) - # libintl(gettext) - find_path(LIBINTL_INCLUDE_DIR libintl.h) - find_library(LIBINTL_LIBRARY NAMES intl libintl) -else() - set(LIBINTL_INCLUDE_DIR) - set(LIBINTL_LIBRARY) -endif() - -if(WIN32) - set(LIBRESOLV_LIBRARY) -else() - find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv) -endif() - -#prepare config files -if(WIN32) - configure_file(config.h.win32 ${CMAKE_BINARY_DIR}/config/config.h COPYONLY) - configure_file(glib/glibconfig.h.win32 ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h COPYONLY) - configure_file(gmodule/gmoduleconf.h.win32 ${CMAKE_BINARY_DIR}/config/gmodule/gmoduleconf.h COPYONLY) - configure_file(gio/gnetworking.h.win32 ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h COPYONLY) - add_definitions(-DHAVE_CONFIG_H) -else() - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config) - set(ENV{LIBFFI_LIBS} "${FFI_LIBRARY}") - set(ENV{PCRE_LIBS} "${PCRE_LIBRARY}") - set(ENV{LIBFFI_CFLAGS} "-I${FFI_INCLUDE_DIR}") - set(ENV{PCRE_CFLAGS} "-I${PCRE_INCLUDE_DIR}") - set(ENV{MSGFMT} "/bin/echo") - set(ENV{GMSGFMT} "/bin/echo") - if(NOT EXISTS "${CMAKE_BINARY_DIR}/config/config.h") - string(TOUPPER UPPER_CONFIG "${CMAKE_BUILD_TYPE}") - set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CONFIG}} -I${PCRE_INCLUDE_DIR}") - set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${UPPER_CONFIG}} -I${PCRE_INCLUDE_DIR}") - if(BUILD_SHARED_LIBS) - set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${UPPER_CONFIG}} -L${LIB_DIR}") - else() - set(LDFLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_${UPPER_CONFIG}} -L${LIB_DIR}") - endif() - - string(STRIP "${CXXFLAGS}" CXXFLAGS) - string(STRIP "${CFLAGS}" CFLAGS) - string(STRIP "${LDFLAGS}" LDFLAGS) - execute_process( - COMMAND "${CMAKE_SOURCE_DIR}/configure" - --disable-libelf - --disable-libmount - "CPPFLAGS=${CXXFLAGS}" - "CFLAGS=${CFLAGS}" - "LDFLAGS=${LDFLAGS}" - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config - RESULT_VARIABLE res - ) - if(NOT res EQUAL 0) - message(FATAL_ERROR "Configure failed.") - endif() - endif() - add_definitions("-DGIO_MODULE_DIR=\"gio/modules\"") -endif() - -include_directories(${CMAKE_BINARY_DIR}/config ${CMAKE_BINARY_DIR}/config/glib ${CMAKE_BINARY_DIR}/config/gio ${CMAKE_BINARY_DIR}/config/gmodule) -include_directories(. glib) - -# This macro purposely doesn't find nodes with sources that have additional properties set -# Most of such files in glib are PCRE sources which we don't use anyway -macro(extract_vcproj_sources VC_PROJECT OUT_VAR) - file(READ ${VC_PROJECT} ${VC_PROJECT}-CONTENTS) - STRING(REPLACE "\n" ";" ${VC_PROJECT}-CONTENTS "${${VC_PROJECT}-CONTENTS}") # split by lines - foreach(LINE ${${VC_PROJECT}-CONTENTS}) - if(LINE MATCHES "") - string(REPLACE "" "" LINE ${LINE}) - string(STRIP ${LINE} LINE) - file(TO_CMAKE_PATH ${LINE} LINE) - list(APPEND ${OUT_VAR} ${LINE}) - endif() - endforeach() -endmacro() - -# main module -extract_vcproj_sources(win32/vs14/glib.vcxproj GLIB_SOURCES) -list(APPEND GLIB_SOURCES glib/libcharset/localcharset.c) # modified internal version with prefixed symbols -if(NOT WIN32) - list(FILTER GLIB_SOURCES EXCLUDE REGEX "win32.c\$|win32-helper.c\$") - list(APPEND GLIB_SOURCES "glib/gthread-posix.c" "glib/giounix.c" "glib/gspawn.c" "glib/glib-unix.c") -endif() -add_library(glib ${GLIB_SOURCES}) -target_compile_definitions(glib PRIVATE GLIB_COMPILATION G_LOG_DOMAIN="GLib" LIBDIR="") -target_link_libraries(glib PRIVATE ${PCRE_LIBRARY} unofficial::iconv::libiconv unofficial::iconv::libcharset ${LIBINTL_LIBRARY}) -if(WIN32) - target_compile_definitions(glib PRIVATE USE_SYSTEM_PCRE) - target_link_libraries(glib PRIVATE ws2_32 winmm advapi32 ole32 shell32) -else() - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) - target_link_libraries(glib PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) -endif() -target_include_directories(glib PRIVATE ${PCRE_INCLUDE_DIR} ${ICONV_INCLUDE_DIR}) -target_include_directories(glib PUBLIC $ $) -list(APPEND GLIB_TARGETS glib) -if(NOT GLIB_SKIP_HEADERS) - install(FILES glib/glib.h glib/glib-object.h ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h DESTINATION include) - - file(GLOB GLIB_HEADERS glib/*.h) - list(FILTER GLIB_HEADERS EXCLUDE REGEX "/glib.h\$|/glib-object.h\$|private.h\$") - install(FILES ${GLIB_HEADERS} DESTINATION include/glib) - - file(GLOB GLIB_DEP_HEADERS glib/deprecated/*.h) - install(FILES ${GLIB_DEP_HEADERS} DESTINATION include/glib/deprecated) -endif() - -# gthread -add_library(gthread gthread/gthread-impl.c) -target_compile_definitions(gthread PRIVATE G_LOG_DOMAIN="GThread") -target_link_libraries(gthread PRIVATE glib ${LIBINTL_LIBRARY}) -target_include_directories(gthread PRIVATE ${LIBINTL_INCLUDE_DIR}) -list(APPEND GLIB_TARGETS gthread) - -# gobject -extract_vcproj_sources(win32/vs14/gobject.vcxproj GOBJECT_SOURCES) -add_library(gobject ${GOBJECT_SOURCES}) -target_compile_definitions(gobject PRIVATE GOBJECT_COMPILATION G_LOG_DOMAIN="GLib-GObject") -target_link_libraries(gobject PRIVATE gthread glib ${FFI_LIBRARY}) -target_include_directories(gobject PRIVATE ${FFI_INCLUDE_DIR} PUBLIC $) -list(APPEND GLIB_TARGETS gobject) -if(NOT GLIB_SKIP_HEADERS) - file(GLOB GOBJECT_HEADERS gobject/*.h gobject/gobjectnotifyqueue.c) - list(FILTER GOBJECT_HEADERS EXCLUDE REGEX "private.h\$") - install(FILES ${GOBJECT_HEADERS} DESTINATION include/gobject) -endif() - -# gmodule -add_library(gmodule gmodule/gmodule.c) -target_compile_definitions(gmodule PRIVATE G_LOG_DOMAIN="GModule") -target_link_libraries(gmodule PRIVATE glib ${LIBINTL_LIBRARY}) -target_include_directories(gmodule PUBLIC $) -target_include_directories(gmodule PRIVATE ${LIBINTL_INCLUDE_DIR} PUBLIC $) -list(APPEND GLIB_TARGETS gmodule) -if(NOT GLIB_SKIP_HEADERS) - install(FILES gmodule/gmodule.h DESTINATION include) -endif() - -# gio subdirs -if(NOT WIN32) - file(GLOB XDGMIME_SOURCES gio/xdgmime/*.c) - add_library(xdgmime ${XDGMIME_SOURCES}) - target_compile_definitions(xdgmime PRIVATE -DXDG_PREFIX=_gio_xdg) - list(APPEND GLIB_TARGETS xdgmime) -endif() - -if(NOT WIN32 AND NOT APPLE) - file(GLOB INOTIFY_SOURCES gio/inotify/*.c) - add_library(inotify ${INOTIFY_SOURCES}) - target_link_libraries(inotify PRIVATE gmodule) - target_compile_definitions(inotify PRIVATE -DG_LOG_DOMAIN=\"GLib-GIO\" -DGIO_COMPILATION -DG_DISABLE_DEPRECATED) - list(APPEND GLIB_TARGETS inotify) -endif() - -if(APPLE) - file(GLOB KQUEUE_SOURCES gio/kqueue/*.c) - add_library(kqueue ${KQUEUE_SOURCES}) - target_link_libraries(kqueue PRIVATE gmodule) - target_compile_definitions(kqueue PRIVATE -DG_LOG_DOMAIN=\"GLib-GIO\" -DGIO_COMPILATION -DG_DISABLE_DEPRECATED) - list(APPEND GLIB_TARGETS kqueue) -endif() - -# gio -extract_vcproj_sources(win32/vs14/gio.vcxproj GIO_SOURCES) -if(NOT WIN32) - file(GLOB GIO_UNIX_SOURCES "gio/gunix*.c" "gio/g*notificationbackend.c" "gio/g*portal*.c") - list(APPEND GIO_SOURCES ${GIO_UNIX_SOURCES}) - list(APPEND GIO_SOURCES - "gio/gcontenttype.c" - "gio/gfiledescriptorbased.c" - "gio/gnetworkmonitornm.c" - "gio/xdp-dbus.c" - ) - list(FILTER GIO_SOURCES EXCLUDE REGEX "/gwin32[^/]+\$|win32/[^/]+\$|win32.c\$|gregistrysettingsbackend.c\$") - if(APPLE) - set_property(SOURCE - gio/gcocoanotificationbackend.c - gio/gosxappinfo.c - gio/gnextstepsettingsbackend.c - PROPERTY COMPILE_FLAGS "-x objective-c") - list(APPEND GIO_SOURCES - "gio/gnextstepsettingsbackend.c" - "gio/gosxappinfo.c" - ) - else() - list(APPEND GIO_SOURCES - "gio/gnetworkmonitornetlink.c" - "gio/gdesktopappinfo.c" - ) - list(FILTER GIO_SOURCES EXCLUDE REGEX "gcocoanotificationbackend.c\$") - endif() -endif() -if(NOT GLIB_SKIP_HEADERS) - file(GLOB GIO_HEADERS gio/*.h) - list(FILTER GIO_HEADERS EXCLUDE REGEX "private.h\$") - install(FILES ${GIO_HEADERS} ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h DESTINATION include/gio) -endif() -add_library(gio ${GIO_SOURCES}) -target_compile_definitions(gio PRIVATE GIO_COMPILATION G_LOG_DOMAIN="GLib-GIO") -target_link_libraries(gio PRIVATE glib gmodule gobject ZLIB::ZLIB ${LIBRESOLV_LIBRARY} ${LIBINTL_LIBRARY}) -target_include_directories(gio PUBLIC $ $) -if(WIN32) - target_link_libraries(gio PRIVATE ws2_32 shlwapi dnsapi iphlpapi advapi32 shell32) -elseif(APPLE) - target_link_libraries(gio PRIVATE xdgmime kqueue) -else() - target_link_libraries(gio PRIVATE xdgmime inotify) -endif() -list(APPEND GLIB_TARGETS gio) - -foreach(GTARGET ${GLIB_TARGETS}) - set_target_properties(${GTARGET} PROPERTIES - OUTPUT_NAME ${GTARGET}-${GLIB_DLL_SUFFIX} - ARCHIVE_OUTPUT_NAME ${GTARGET}-${GLIB_LIB_SUFFIX}) -endforeach() - -macro(add_glib_tool TOOL_NAME) - add_executable(${TOOL_NAME} ${ARGN}) - if(WIN32) - target_link_libraries(${TOOL_NAME} glib ${LIBINTL_LIBRARY} shell32) - else() - target_link_libraries(${TOOL_NAME} glib ${LIBINTL_LIBRARY}) - endif() - target_compile_definitions(${TOOL_NAME} PRIVATE GLIB_COMPILATION) - list(APPEND GLIB_TOOLS ${TOOL_NAME}) -endmacro() - -macro(add_gio_tool TOOL_NAME) - add_executable(${TOOL_NAME} ${ARGN}) - target_link_libraries(${TOOL_NAME} PRIVATE glib gio gobject gmodule ${LIBINTL_LIBRARY}) - target_include_directories(${TOOL_NAME} PRIVATE gmodule gio) - target_compile_definitions(${TOOL_NAME} PRIVATE GIO_COMPILATION) - list(APPEND GLIB_TOOLS ${TOOL_NAME}) -endmacro() - -if(NOT GLIB_SKIP_TOOLS) - configure_file(gobject/glib-mkenums.in ${CMAKE_SOURCE_DIR}/gobject/glib-mkenums @ONLY) # uses GLIB_VERSION - install(FILES gobject/glib-mkenums DESTINATION tools/glib) - - configure_file(gio/gdbus-2.0/codegen/gdbus-codegen.in ${CMAKE_SOURCE_DIR}/gio/gdbus-2.0/codegen/gdbus-codegen COPYONLY) - install(FILES gio/gdbus-2.0/codegen/gdbus-codegen DESTINATION tools/glib) - file(GLOB CODEGEN_SOURCES gio/gdbus-2.0/codegen/*.py) - install(FILES ${CODEGEN_SOURCES} DESTINATION tools/glib/codegen) - - add_gio_tool(gdbus gio/gdbus-tool.c) - add_gio_tool(gio-querymodules gio/gio-querymodules.c) - file(GLOB GIO_TOOL_SOURCES gio/gio-tool*.c) - add_gio_tool(gio-tool ${GIO_TOOL_SOURCES}) - set_target_properties(gio-tool PROPERTIES OUTPUT_NAME gio) - add_gio_tool(glib-compile-resources gio/glib-compile-resources.c gio/gvdb/gvdb-builder.c) - add_gio_tool(glib-compile-schemas gio/glib-compile-schemas.c gio/gvdb/gvdb-builder.c) - add_gio_tool(gresource gio/gresource-tool.c) - add_gio_tool(gsettings gio/gsettings-tool.c) - - if(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(WIN win32) - else() - set(WIN win64) - endif() - - add_glib_tool(glib-genmarshal gobject/glib-genmarshal.c) - if(WIN32) - add_glib_tool(gspawn-${WIN}-helper WIN32 glib/gspawn-win32-helper.c) - add_glib_tool(gspawn-${WIN}-helper-console glib/gspawn-win32-helper-console.c) - endif() - - install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools/glib) -endif() - -install( - TARGETS ${GLIB_TARGETS} - EXPORT glib - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib -) -install( - EXPORT glib - NAMESPACE unofficial::glib:: - FILE unofficial-glib-targets.cmake - DESTINATION share/unofficial-glib -) -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/unofficial-glib-config.in.cmake - ${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-glib-config.cmake - @ONLY -) -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-glib-config.cmake - DESTINATION share/unofficial-glib -) - -message(STATUS "Link-time dependencies:") -message(STATUS " " ${ZLIB_LIBRARIES}) -message(STATUS " " ${PCRE_LIBRARY}) -message(STATUS " " ${ICONV_LIBRARY}) -message(STATUS " " ${CHARSET_LIBRARY}) -message(STATUS " " ${FFI_LIBRARY}) -message(STATUS " " ${LIBINTL_LIBRARY}) diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL deleted file mode 100644 index e589ba426fbd66..00000000000000 --- a/ports/glib/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: glib -Version: 2.52.3-14-2 -Homepage: https://developer.gnome.org/glib/ -Description: Portable, general-purpose utility library. -Build-Depends: zlib, pcre, libffi, gettext, libiconv diff --git a/ports/glib/arm64-defines.patch b/ports/glib/arm64-defines.patch deleted file mode 100644 index c1b5181c65c077..00000000000000 --- a/ports/glib/arm64-defines.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff --git a/config.h.win32 b/config.h.win32 -index 999641d65..531843e0e 100644 ---- a/config.h.win32 -+++ b/config.h.win32 -@@ -728,7 +728,7 @@ - - /* The size of `void *', as computed by sizeof. */ - #ifdef _MSC_VER --#if (defined(_M_X64) || defined(_M_AMD64)) -+#if (defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64)) - #define SIZEOF_VOID_P 8 - #elif (defined(_M_IX86)) - #define SIZEOF_VOID_P 4 -diff --git a/config.h.win32.in b/config.h.win32.in -index eaf7e2818..049c5e9f4 100644 ---- a/config.h.win32.in -+++ b/config.h.win32.in -@@ -728,7 +728,7 @@ - - /* The size of `void *', as computed by sizeof. */ - #ifdef _MSC_VER --#if (defined(_M_X64) || defined(_M_AMD64)) -+#if (defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64)) - #define SIZEOF_VOID_P 8 - #elif (defined(_M_IX86)) - #define SIZEOF_VOID_P 4 -diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c -index 9b3619cb1..6400572a2 100644 ---- a/gio/gdbusaddress.c -+++ b/gio/gdbusaddress.c -@@ -1469,7 +1469,7 @@ get_session_address_dbus_launch (GError **error) - wcscat (args, rundll_path); - wcscat (args, L"\" "); - wcscat (args, gio_path_short); --#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) -+#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) - wcscat (args, L",g_win32_run_session_bus"); - #elif defined (_MSC_VER) - wcscat (args, L",_g_win32_run_session_bus@16"); -diff --git a/glib/gatomic.c b/glib/gatomic.c -index e3e49fab4..e257e4377 100644 ---- a/glib/gatomic.c -+++ b/glib/gatomic.c -@@ -474,7 +474,7 @@ gsize - #elif defined (G_PLATFORM_WIN32) - - #include --#if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64) && !(defined _MSC_VER && _MSC_VER <= 1200) -+#if !defined(_M_ARM64) && !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64) && !(defined _MSC_VER && _MSC_VER <= 1200) - #define InterlockedAnd _InterlockedAnd - #define InterlockedOr _InterlockedOr - #define InterlockedXor _InterlockedXor -diff --git a/glib/glibconfig.h.win32 b/glib/glibconfig.h.win32 -index d9f893a15..b75a86f10 100644 ---- a/glib/glibconfig.h.win32 -+++ b/glib/glibconfig.h.win32 -@@ -68,7 +68,7 @@ typedef unsigned __int64 guint64; - #define G_GINT64_FORMAT "I64i" - #define G_GUINT64_FORMAT "I64u" - --#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) -+#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) - - #define GLIB_SIZEOF_VOID_P 8 - #define GLIB_SIZEOF_LONG 4 -diff --git a/glib/glibconfig.h.win32.in b/glib/glibconfig.h.win32.in -index 9a91c5e96..f0b88c976 100644 ---- a/glib/glibconfig.h.win32.in -+++ b/glib/glibconfig.h.win32.in -@@ -68,7 +68,7 @@ typedef unsigned __int64 guint64; - #define G_GINT64_FORMAT "I64i" - #define G_GUINT64_FORMAT "I64u" - --#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) -+#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) - - #define GLIB_SIZEOF_VOID_P 8 - #define GLIB_SIZEOF_LONG 4 diff --git a/ports/glib/cmake/install_headers.cmake b/ports/glib/cmake/install_headers.cmake deleted file mode 100644 index 7840f34ab983b4..00000000000000 --- a/ports/glib/cmake/install_headers.cmake +++ /dev/null @@ -1,255 +0,0 @@ -# generated from glib-install.props -install(FILES glib/glib.h DESTINATION include) -install(FILES ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h DESTINATION include) -install(FILES glib/glib-object.h DESTINATION include) -install(FILES glib/deprecated/gallocator.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/gcache.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/gcompletion.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/gmain.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/grel.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/gthread.h DESTINATION include/glib/deprecated) -install(FILES glib/glib-autocleanups.h DESTINATION include/glib) -install(FILES glib/galloca.h DESTINATION include/glib) -install(FILES glib/garray.h DESTINATION include/glib) -install(FILES glib/gasyncqueue.h DESTINATION include/glib) -install(FILES glib/gatomic.h DESTINATION include/glib) -install(FILES glib/gbacktrace.h DESTINATION include/glib) -install(FILES glib/gbase64.h DESTINATION include/glib) -install(FILES glib/gbitlock.h DESTINATION include/glib) -install(FILES glib/gbookmarkfile.h DESTINATION include/glib) -install(FILES glib/gbytes.h DESTINATION include/glib) -install(FILES glib/gcharset.h DESTINATION include/glib) -install(FILES glib/gchecksum.h DESTINATION include/glib) -install(FILES glib/gconvert.h DESTINATION include/glib) -install(FILES glib/gdataset.h DESTINATION include/glib) -install(FILES glib/gdate.h DESTINATION include/glib) -install(FILES glib/gdatetime.h DESTINATION include/glib) -install(FILES glib/gdir.h DESTINATION include/glib) -install(FILES glib/genviron.h DESTINATION include/glib) -install(FILES glib/gerror.h DESTINATION include/glib) -install(FILES glib/gfileutils.h DESTINATION include/glib) -install(FILES glib/ggettext.h DESTINATION include/glib) -install(FILES glib/ghash.h DESTINATION include/glib) -install(FILES glib/ghmac.h DESTINATION include/glib) -install(FILES glib/ghook.h DESTINATION include/glib) -install(FILES glib/ghostutils.h DESTINATION include/glib) -install(FILES glib/gi18n.h DESTINATION include/glib) -install(FILES glib/gi18n-lib.h DESTINATION include/glib) -install(FILES glib/giochannel.h DESTINATION include/glib) -install(FILES glib/gkeyfile.h DESTINATION include/glib) -install(FILES glib/glist.h DESTINATION include/glib) -install(FILES glib/gmacros.h DESTINATION include/glib) -install(FILES glib/gmain.h DESTINATION include/glib) -install(FILES glib/gmappedfile.h DESTINATION include/glib) -install(FILES glib/gmarkup.h DESTINATION include/glib) -install(FILES glib/gmem.h DESTINATION include/glib) -install(FILES glib/gmessages.h DESTINATION include/glib) -install(FILES glib/gnode.h DESTINATION include/glib) -install(FILES glib/goption.h DESTINATION include/glib) -install(FILES glib/gpattern.h DESTINATION include/glib) -install(FILES glib/gpoll.h DESTINATION include/glib) -install(FILES glib/gprimes.h DESTINATION include/glib) -install(FILES glib/gqsort.h DESTINATION include/glib) -install(FILES glib/gquark.h DESTINATION include/glib) -install(FILES glib/gqueue.h DESTINATION include/glib) -install(FILES glib/grand.h DESTINATION include/glib) -install(FILES glib/gregex.h DESTINATION include/glib) -install(FILES glib/gscanner.h DESTINATION include/glib) -install(FILES glib/gsequence.h DESTINATION include/glib) -install(FILES glib/gshell.h DESTINATION include/glib) -install(FILES glib/gslice.h DESTINATION include/glib) -install(FILES glib/gslist.h DESTINATION include/glib) -install(FILES glib/gspawn.h DESTINATION include/glib) -install(FILES glib/gstdio.h DESTINATION include/glib) -install(FILES glib/gstrfuncs.h DESTINATION include/glib) -install(FILES glib/gtestutils.h DESTINATION include/glib) -install(FILES glib/gstring.h DESTINATION include/glib) -install(FILES glib/gstringchunk.h DESTINATION include/glib) -install(FILES glib/gthread.h DESTINATION include/glib) -install(FILES glib/gthreadpool.h DESTINATION include/glib) -install(FILES glib/gtimer.h DESTINATION include/glib) -install(FILES glib/gtimezone.h DESTINATION include/glib) -install(FILES glib/gtrashstack.h DESTINATION include/glib) -install(FILES glib/gtree.h DESTINATION include/glib) -install(FILES glib/gtypes.h DESTINATION include/glib) -install(FILES glib/gunicode.h DESTINATION include/glib) -install(FILES glib/gurifuncs.h DESTINATION include/glib) -install(FILES glib/gutils.h DESTINATION include/glib) -install(FILES glib/guuid.h DESTINATION include/glib) -install(FILES glib/gvarianttype.h DESTINATION include/glib) -install(FILES glib/gvariant.h DESTINATION include/glib) -install(FILES glib/gversion.h DESTINATION include/glib) -install(FILES glib/gversionmacros.h DESTINATION include/glib) -install(FILES glib/gwin32.h DESTINATION include/glib) -install(FILES glib/gprintf.h DESTINATION include/glib) -install(FILES gmodule/gmodule.h DESTINATION include) -install(FILES gobject/gobject-autocleanups.h DESTINATION include/gobject) -install(FILES gobject/glib-types.h DESTINATION include/gobject) -install(FILES gobject/gbinding.h DESTINATION include/gobject) -install(FILES gobject/gboxed.h DESTINATION include/gobject) -install(FILES gobject/gclosure.h DESTINATION include/gobject) -install(FILES gobject/genums.h DESTINATION include/gobject) -install(FILES gobject/gmarshal.h DESTINATION include/gobject) -install(FILES gobject/gobject.h DESTINATION include/gobject) -install(FILES gobject/gparam.h DESTINATION include/gobject) -install(FILES gobject/gparamspecs.h DESTINATION include/gobject) -install(FILES gobject/gsignal.h DESTINATION include/gobject) -install(FILES gobject/gsourceclosure.h DESTINATION include/gobject) -install(FILES gobject/gtype.h DESTINATION include/gobject) -install(FILES gobject/gtypemodule.h DESTINATION include/gobject) -install(FILES gobject/gtypeplugin.h DESTINATION include/gobject) -install(FILES gobject/gvalue.h DESTINATION include/gobject) -install(FILES gobject/gvaluearray.h DESTINATION include/gobject) -install(FILES gobject/gvaluecollector.h DESTINATION include/gobject) -install(FILES gobject/gvaluetypes.h DESTINATION include/gobject) -install(FILES gobject/gobjectnotifyqueue.c DESTINATION include/gobject) -install(FILES gio/gappinfo.h DESTINATION include/gio) -install(FILES gio/gasyncinitable.h DESTINATION include/gio) -install(FILES gio/gasyncresult.h DESTINATION include/gio) -install(FILES gio/gbufferedinputstream.h DESTINATION include/gio) -install(FILES gio/gbufferedoutputstream.h DESTINATION include/gio) -install(FILES gio/gbytesicon.h DESTINATION include/gio) -install(FILES gio/gcancellable.h DESTINATION include/gio) -install(FILES gio/gcontenttype.h DESTINATION include/gio) -install(FILES gio/gcharsetconverter.h DESTINATION include/gio) -install(FILES gio/gconverter.h DESTINATION include/gio) -install(FILES gio/gconverterinputstream.h DESTINATION include/gio) -install(FILES gio/gconverteroutputstream.h DESTINATION include/gio) -install(FILES gio/gdatagrambased.h DESTINATION include/gio) -install(FILES gio/gdatainputstream.h DESTINATION include/gio) -install(FILES gio/gdataoutputstream.h DESTINATION include/gio) -install(FILES gio/gdrive.h DESTINATION include/gio) -install(FILES gio/gemblem.h DESTINATION include/gio) -install(FILES gio/gemblemedicon.h DESTINATION include/gio) -install(FILES gio/gfile.h DESTINATION include/gio) -install(FILES gio/gfileattribute.h DESTINATION include/gio) -install(FILES gio/gfileenumerator.h DESTINATION include/gio) -install(FILES gio/gfileicon.h DESTINATION include/gio) -install(FILES gio/gfileinfo.h DESTINATION include/gio) -install(FILES gio/gfileinputstream.h DESTINATION include/gio) -install(FILES gio/gfilemonitor.h DESTINATION include/gio) -install(FILES gio/gfilenamecompleter.h DESTINATION include/gio) -install(FILES gio/gfileoutputstream.h DESTINATION include/gio) -install(FILES gio/gfileiostream.h DESTINATION include/gio) -install(FILES gio/gfilterinputstream.h DESTINATION include/gio) -install(FILES gio/gfilteroutputstream.h DESTINATION include/gio) -install(FILES gio/gicon.h DESTINATION include/gio) -install(FILES gio/ginetaddress.h DESTINATION include/gio) -install(FILES gio/ginetaddressmask.h DESTINATION include/gio) -install(FILES gio/ginetsocketaddress.h DESTINATION include/gio) -install(FILES gio/ginputstream.h DESTINATION include/gio) -install(FILES gio/ginitable.h DESTINATION include/gio) -install(FILES gio/gio.h DESTINATION include/gio) -install(FILES gio/gio-autocleanups.h DESTINATION include/gio) -install(FILES gio/giotypes.h DESTINATION include/gio) -install(FILES gio/gioenums.h DESTINATION include/gio) -install(FILES gio/gioerror.h DESTINATION include/gio) -install(FILES gio/giomodule.h DESTINATION include/gio) -install(FILES gio/gioscheduler.h DESTINATION include/gio) -install(FILES gio/giostream.h DESTINATION include/gio) -install(FILES gio/gloadableicon.h DESTINATION include/gio) -install(FILES gio/gmount.h DESTINATION include/gio) -install(FILES gio/gmemoryinputstream.h DESTINATION include/gio) -install(FILES gio/gmemoryoutputstream.h DESTINATION include/gio) -install(FILES gio/gmountoperation.h DESTINATION include/gio) -install(FILES gio/gnativevolumemonitor.h DESTINATION include/gio) -install(FILES gio/gnetworkaddress.h DESTINATION include/gio) -install(FILES gio/gnetworkmonitor.h DESTINATION include/gio) -install(FILES gio/gnetworkservice.h DESTINATION include/gio) -install(FILES gio/goutputstream.h DESTINATION include/gio) -install(FILES gio/gpermission.h DESTINATION include/gio) -install(FILES gio/gpollableinputstream.h DESTINATION include/gio) -install(FILES gio/gpollableoutputstream.h DESTINATION include/gio) -install(FILES gio/gpollableutils.h DESTINATION include/gio) -install(FILES gio/gproxyaddress.h DESTINATION include/gio) -install(FILES gio/gproxy.h DESTINATION include/gio) -install(FILES gio/gproxyaddressenumerator.h DESTINATION include/gio) -install(FILES gio/gproxyresolver.h DESTINATION include/gio) -install(FILES gio/gresolver.h DESTINATION include/gio) -install(FILES gio/gresource.h DESTINATION include/gio) -install(FILES gio/gseekable.h DESTINATION include/gio) -install(FILES gio/gsimpleasyncresult.h DESTINATION include/gio) -install(FILES gio/gsimpleiostream.h DESTINATION include/gio) -install(FILES gio/gsimplepermission.h DESTINATION include/gio) -install(FILES gio/gsocket.h DESTINATION include/gio) -install(FILES gio/gsocketaddress.h DESTINATION include/gio) -install(FILES gio/gsocketaddressenumerator.h DESTINATION include/gio) -install(FILES gio/gsocketclient.h DESTINATION include/gio) -install(FILES gio/gsocketconnectable.h DESTINATION include/gio) -install(FILES gio/gsocketconnection.h DESTINATION include/gio) -install(FILES gio/gsocketcontrolmessage.h DESTINATION include/gio) -install(FILES gio/gsocketlistener.h DESTINATION include/gio) -install(FILES gio/gsocketservice.h DESTINATION include/gio) -install(FILES gio/gsrvtarget.h DESTINATION include/gio) -install(FILES gio/gsimpleproxyresolver.h DESTINATION include/gio) -install(FILES gio/gtask.h DESTINATION include/gio) -install(FILES gio/gsubprocess.h DESTINATION include/gio) -install(FILES gio/gsubprocesslauncher.h DESTINATION include/gio) -install(FILES gio/gtcpconnection.h DESTINATION include/gio) -install(FILES gio/gtcpwrapperconnection.h DESTINATION include/gio) -install(FILES gio/gthreadedsocketservice.h DESTINATION include/gio) -install(FILES gio/gthemedicon.h DESTINATION include/gio) -install(FILES gio/gtlsbackend.h DESTINATION include/gio) -install(FILES gio/gtlscertificate.h DESTINATION include/gio) -install(FILES gio/gtlsclientconnection.h DESTINATION include/gio) -install(FILES gio/gtlsconnection.h DESTINATION include/gio) -install(FILES gio/gtlsdatabase.h DESTINATION include/gio) -install(FILES gio/gtlsfiledatabase.h DESTINATION include/gio) -install(FILES gio/gtlsinteraction.h DESTINATION include/gio) -install(FILES gio/gtlspassword.h DESTINATION include/gio) -install(FILES gio/gtlsserverconnection.h DESTINATION include/gio) -install(FILES gio/gdtlsconnection.h DESTINATION include/gio) -install(FILES gio/gdtlsclientconnection.h DESTINATION include/gio) -install(FILES gio/gdtlsserverconnection.h DESTINATION include/gio) -install(FILES gio/gvfs.h DESTINATION include/gio) -install(FILES gio/gvolume.h DESTINATION include/gio) -install(FILES gio/gvolumemonitor.h DESTINATION include/gio) -install(FILES gio/gzlibcompressor.h DESTINATION include/gio) -install(FILES gio/gzlibdecompressor.h DESTINATION include/gio) -install(FILES gio/glistmodel.h DESTINATION include/gio) -install(FILES gio/gliststore.h DESTINATION include/gio) -install(FILES gio/gapplication.h DESTINATION include/gio) -install(FILES gio/gapplicationcommandline.h DESTINATION include/gio) -install(FILES gio/gactiongroup.h DESTINATION include/gio) -install(FILES gio/gactionmap.h DESTINATION include/gio) -install(FILES gio/gsimpleactiongroup.h DESTINATION include/gio) -install(FILES gio/gremoteactiongroup.h DESTINATION include/gio) -install(FILES gio/gactiongroupexporter.h DESTINATION include/gio) -install(FILES gio/gdbusactiongroup.h DESTINATION include/gio) -install(FILES gio/gaction.h DESTINATION include/gio) -install(FILES gio/gpropertyaction.h DESTINATION include/gio) -install(FILES gio/gsimpleaction.h DESTINATION include/gio) -install(FILES gio/gmenumodel.h DESTINATION include/gio) -install(FILES gio/gmenu.h DESTINATION include/gio) -install(FILES gio/gmenuexporter.h DESTINATION include/gio) -install(FILES gio/gdbusmenumodel.h DESTINATION include/gio) -install(FILES gio/gnotification.h DESTINATION include/gio) -install(FILES gio/gsettingsbackend.h DESTINATION include/gio) -install(FILES gio/gsettingsschema.h DESTINATION include/gio) -install(FILES gio/gsettings.h DESTINATION include/gio) -install(FILES gio/gdbusauthobserver.h DESTINATION include/gio) -install(FILES gio/gcredentials.h DESTINATION include/gio) -install(FILES gio/gdbusutils.h DESTINATION include/gio) -install(FILES gio/gdbuserror.h DESTINATION include/gio) -install(FILES gio/gdbusaddress.h DESTINATION include/gio) -install(FILES gio/gdbusconnection.h DESTINATION include/gio) -install(FILES gio/gdbusmessage.h DESTINATION include/gio) -install(FILES gio/gdbusnameowning.h DESTINATION include/gio) -install(FILES gio/gdbusnamewatching.h DESTINATION include/gio) -install(FILES gio/gdbusproxy.h DESTINATION include/gio) -install(FILES gio/gdbusintrospection.h DESTINATION include/gio) -install(FILES gio/gdbusmethodinvocation.h DESTINATION include/gio) -install(FILES gio/gdbusserver.h DESTINATION include/gio) -install(FILES gio/gdbusinterface.h DESTINATION include/gio) -install(FILES gio/gdbusinterfaceskeleton.h DESTINATION include/gio) -install(FILES gio/gdbusobject.h DESTINATION include/gio) -install(FILES gio/gdbusobjectskeleton.h DESTINATION include/gio) -install(FILES gio/gdbusobjectproxy.h DESTINATION include/gio) -install(FILES gio/gdbusobjectmanager.h DESTINATION include/gio) -install(FILES gio/gdbusobjectmanagerclient.h DESTINATION include/gio) -install(FILES gio/gdbusobjectmanagerserver.h DESTINATION include/gio) -install(FILES gio/gtestdbus.h DESTINATION include/gio) -install(FILES gio/gioenumtypes.h DESTINATION include/gio) -install(FILES ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h DESTINATION include/gio) -install(FILES gio/gwin32inputstream.h DESTINATION include/gio) -install(FILES gio/gwin32outputstream.h DESTINATION include/gio) diff --git a/ports/glib/cmake/unofficial-glib-config.in.cmake b/ports/glib/cmake/unofficial-glib-config.in.cmake deleted file mode 100644 index ea87ea0b230bca..00000000000000 --- a/ports/glib/cmake/unofficial-glib-config.in.cmake +++ /dev/null @@ -1,7 +0,0 @@ -include(CMakeFindDependencyMacro) -find_dependency(unofficial-iconv) -if(NOT WIN32) - find_dependency(Threads) -endif() - -include("${CMAKE_CURRENT_LIST_DIR}/unofficial-glib-targets.cmake") diff --git a/ports/glib/fix-arm-builds.patch b/ports/glib/fix-arm-builds.patch deleted file mode 100644 index 257ee75c6b35c9..00000000000000 --- a/ports/glib/fix-arm-builds.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/gio/tests/plugin_resources.c b/gio/tests/plugin_resources.c -index 4c1b0214b..bbfc7ae07 100644 ---- a/gio/tests/plugin_resources.c -+++ b/gio/tests/plugin_resources.c -@@ -80,13 +80,13 @@ GResource *_g_plugin_get_resource (void) - */ - - /* We need to account for differences between the mangling of symbols -- * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed -- * with an underscore but symbols on x64 are not. -+ * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed -+ * with an underscore but symbols on x64/ARM/ARM64 are not. - */ --#ifdef _WIN64 --#define G_MSVC_SYMBOL_PREFIX "" --#else -+#ifdef _M_IX86 - #define G_MSVC_SYMBOL_PREFIX "_" -+#else -+#define G_MSVC_SYMBOL_PREFIX "" - #endif - - #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX) -diff --git a/glib/gconstructor.h b/glib/gconstructor.h -index dccb0314c..fa1139302 100644 ---- a/glib/gconstructor.h -+++ b/glib/gconstructor.h -@@ -40,13 +40,13 @@ - */ - - /* We need to account for differences between the mangling of symbols -- * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed -- * with an underscore but symbols on x64 are not. -+ * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed -+ * with an underscore but symbols on x64/ARM/ARM64 are not. - */ --#ifdef _WIN64 --#define G_MSVC_SYMBOL_PREFIX "" --#else -+#ifdef _M_IX86 - #define G_MSVC_SYMBOL_PREFIX "_" -+#else -+#define G_MSVC_SYMBOL_PREFIX "" - #endif - - #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX) diff --git a/ports/glib/fix-libintl-detection.patch b/ports/glib/fix-libintl-detection.patch new file mode 100644 index 00000000000000..0ee0063b4c46de --- /dev/null +++ b/ports/glib/fix-libintl-detection.patch @@ -0,0 +1,13 @@ +diff --git a/meson.build b/meson.build +--- a/meson.build ++++ b/meson.build +@@ -2029,6 +2029,9 @@ else + libintl = disabler() + endif + endif ++ if not libintl.found() ++ libintl = dependency('Intl', required : false, method : 'cmake') ++ endif + if not libintl.found() + libintl = subproject('proxy-libintl').get_variable('intl_dep') + libintl_deps = [libintl] + libintl_deps diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index 44a49932032f59..1a0d01a09751c8 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -1,20 +1,18 @@ -include(vcpkg_common_functions) - # Glib uses winapi functions not available in WindowsStore -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds are currently not supported.") -endif() +vcpkg_fail_port_install(ON_TARGET "UWP") # Glib relies on DllMain on Windows -if (NOT VCPKG_CMAKE_SYSTEM_NAME) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + #remove if merged: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1655 endif() -set(GLIB_VERSION 2.52.3) +set(GLIB_MAJOR_MINOR 2.66) +set(GLIB_PATCH 4) vcpkg_download_distfile(ARCHIVE - URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.52/glib-${GLIB_VERSION}.tar.xz" - FILENAME "glib-${GLIB_VERSION}.tar.xz" - SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017) + URLS "https://ftp.gnome.org/pub/gnome/sources/glib/${GLIB_MAJOR_MINOR}/glib-${GLIB_MAJOR_MINOR}.${GLIB_PATCH}.tar.xz" + FILENAME "glib-${GLIB_MAJOR_MINOR}.${GLIB_PATCH}.tar.xz" + SHA512 b3bc3e6e5cca793139848940e5c0894f1c7e3bd3a770b213a1ea548ac54a2432aebb140ed54518712fb8af36382b3b13d5f7ffd3d87ff63cba9e2f55434f7260) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH @@ -22,31 +20,107 @@ vcpkg_extract_source_archive_ex( REF ${GLIB_VERSION} PATCHES use-libiconv-on-windows.patch - arm64-defines.patch - fix-arm-builds.patch + fix-libintl-detection.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}) -file(REMOVE_RECURSE ${SOURCE_PATH}/glib/pcre) -file(WRITE ${SOURCE_PATH}/glib/pcre/Makefile.in) -file(REMOVE ${SOURCE_PATH}/glib/win_iconv.c) -vcpkg_configure_cmake( +if (selinux IN_LIST FEATURES) + if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT EXISTS "/usr/include/selinux") + message("Selinux was not found in its typical system location. Your build may fail. You can install Selinux with \"apt-get install selinux\".") + endif() + list(APPEND OPTIONS -Dselinux=enabled) +else() + list(APPEND OPTIONS -Dselinux=disabled) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND OPTIONS -Diconv=external) +else() + #list(APPEND OPTIONS -Diconv=libc) ? +endif() + +vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS - -DGLIB_VERSION=${GLIB_VERSION} - OPTIONS_DEBUG - -DGLIB_SKIP_HEADERS=ON - -DGLIB_SKIP_TOOLS=ON + -Dbuild_tests=false + -Dinstalled_tests=false + ${OPTIONS} + -Dinternal_pcre=false ) +#-Dnls=true +#-Dlibelf=false +#-Dlibmount=false +#-Dxattr=true? -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-glib TARGET_PATH share/unofficial-glib) +vcpkg_install_meson(ADD_BIN_TO_PATH) vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/glib) -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/glib) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/glib/COPYING ${CURRENT_PACKAGES_DIR}/share/glib/copyright) +set(GLIB_TOOLS gdbus + gio + gio-querymodules + glib-compile-resources + glib-compile-schemas + gobject-query + gresource + gsettings + ) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + if(NOT VCPKG_TARGET_IS_OSX) + list(APPEND GLIB_TOOLS gapplication) + endif() + list(APPEND GLIB_TOOLS glib-gettextize gtester) +endif() +set(GLIB_SCRIPTS gdbus-codegen glib-genmarshal glib-mkenums gtester-report) + + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64|arm64") + list(APPEND GLIB_TOOLS gspawn-win64-helper${VCPKG_EXECUTABLE_SUFFIX} + gspawn-win64-helper-console${VCPKG_EXECUTABLE_SUFFIX}) +elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + list(APPEND GLIB_TOOLS gspawn-win32-helper${VCPKG_EXECUTABLE_SUFFIX} + gspawn-win32-helper-console${VCPKG_EXECUTABLE_SUFFIX}) +endif() +vcpkg_copy_tools(TOOL_NAMES ${GLIB_TOOLS} AUTO_CLEAN) +foreach(script IN LISTS GLIB_SCRIPTS) + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${script}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${script}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${script}") +endforeach() + +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() + +IF(VCPKG_TARGET_IS_WINDOWS) + set(SYSTEM_LIBRARIES dnsapi iphlpapi winmm lshlwapi) +else() + set(SYSTEM_LIBRARIES resolv mount blkid selinux) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gio-2.0.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gio-2.0.pc" "\${bindir}" "\${bindir}/../tools/${PORT}") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gio-2.0.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gio-2.0.pc" "\${bindir}" "\${bindir}/../../tools/${PORT}") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glib-2.0.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glib-2.0.pc" "\${bindir}" "\${bindir}/../tools/${PORT}") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glib-2.0.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glib-2.0.pc" "\${bindir}" "\${bindir}/../../tools/${PORT}") +endif() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES}) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Fix python scripts +set(_file "${CURRENT_PACKAGES_DIR}/tools/${PORT}/gdbus-codegen") +file(READ "${_file}" _contents) +string(REPLACE "elif os.path.basename(filedir) == 'bin':" "elif os.path.basename(filedir) == 'tools':" _contents "${_contents}") +string(REPLACE "path = os.path.join(filedir, '..', 'share', 'glib-2.0')" "path = os.path.join(filedir, '../..', 'share', 'glib-2.0')" _contents "${_contents}") +string(REPLACE "path = os.path.join(filedir, '..')" "path = os.path.join(filedir, '../../share/glib-2.0')" _contents "${_contents}") +string(REPLACE "path = os.path.join('${CURRENT_PACKAGES_DIR}/share', 'glib-2.0')" "path = os.path.join('unuseable/share', 'glib-2.0')" _contents "${_contents}") + +file(WRITE "${_file}" "${_contents}") diff --git a/ports/glib/use-libiconv-on-windows.patch b/ports/glib/use-libiconv-on-windows.patch index 927de0bb1d161e..a8ccde0a5ff6c5 100644 --- a/ports/glib/use-libiconv-on-windows.patch +++ b/ports/glib/use-libiconv-on-windows.patch @@ -12,3 +12,17 @@ index 3deac78..134ded9 100644 #endif #ifdef G_PLATFORM_WIN32 +diff --git a/meson.build b/meson.build +index d938ddf51..2ba256115 100644 +--- a/meson.build ++++ b/meson.build +@@ -1914,7 +1914,8 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack) + # the built-in implementation + iconv_opt = get_option('iconv') + if host_system == 'windows' +- libiconv = [] ++ libiconv = [cc.find_library('iconv')] ++ found_iconv = true + # We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need + # any external library for it + if iconv_opt != 'auto' diff --git a/ports/glib/vcpkg.json b/ports/glib/vcpkg.json new file mode 100644 index 00000000000000..16e6b397867f99 --- /dev/null +++ b/ports/glib/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "glib", + "version": "2.66.4", + "description": "Portable, general-purpose utility library.", + "homepage": "https://developer.gnome.org/glib/", + "supports": "!uwp & !(windows & static)", + "dependencies": [ + "dirent", + "gettext", + "libffi", + "libiconv", + "pcre", + "tool-meson", + "zlib" + ], + "features": { + "selinux": { + "description": "Build with selinux support." + } + } +} diff --git a/ports/glibmm/CMakeLists.txt b/ports/glibmm/CMakeLists.txt index 10839260a14628..3e34075d9dfe70 100644 --- a/ports/glibmm/CMakeLists.txt +++ b/ports/glibmm/CMakeLists.txt @@ -3,6 +3,10 @@ project(glibmm) set(CMAKE_CXX_STANDARD 17) +set(GLIBMM_DLL_SUFFIX 2) +set(GLIBMM_LIB_SUFFIX 2.0) +set(GLIBMM_EXTRA_LIB_SUFFIX 2.4) + find_path(GLIB_INCLUDE_DIR NAMES glib.h) find_library(GLIB_LIBRARY NAMES glib-2.0) find_library(GIO_LIBRARY NAMES gio-2.0) @@ -26,12 +30,9 @@ link_libraries( ${FFI_LIBRARY} ) -if(APPLE) - find_library(LIBINTL_LIBRARY NAMES intl) -endif() - -find_package(unofficial-iconv REQUIRED) -link_libraries(${LIBINTL_LIBRARY} unofficial::iconv::libiconv) +find_package(Intl REQUIRED) +find_package(Iconv REQUIRED) +link_libraries(${Intl_LIBRARIES} Iconv::Iconv) if(APPLE) find_library(COREFOUNDATION_LIBRARY CoreFoundation) @@ -85,6 +86,25 @@ file(GLOB GLIBMM_SOURCES glib/glibmm/*.cc) add_library(glibmm ${GLIBMM_SOURCES}) target_compile_definitions(glibmm PRIVATE -DGLIBMM_BUILD) target_include_directories(glibmm PUBLIC glib ${CMAKE_BINARY_DIR}/config/glib) +set_target_properties(glibmm PROPERTIES OUTPUT_NAME glibmm-${GLIBMM_DLL_SUFFIX} ARCHIVE_OUTPUT_NAME glibmm-${GLIBMM_LIB_SUFFIX}) + +set(GLIBMM_EXTRA_SOURCES tools/extra_defs_gen/generate_extra_defs.cc) +add_library(glibmm_generate_extra_defs ${GLIBMM_EXTRA_SOURCES}) +target_include_directories(glibmm_generate_extra_defs PUBLIC glib ${CMAKE_BINARY_DIR}/config/glib) +set_target_properties(glibmm_generate_extra_defs PROPERTIES + OUTPUT_NAME glibmm_generate_extra_defs-${GLIBMM_EXTRA_LIB_SUFFIX} + ARCHIVE_OUTPUT_NAME glibmm_generate_extra_defs-${GLIBMM_EXTRA_LIB_SUFFIX}) + +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +set(libdir ${CMAKE_INSTALL_PREFIX}/lib) +set(includedir ${CMAKE_INSTALL_PREFIX}/include) +set(GLIBMM_API_VERSION 2.0) +set(GLIBMM_MODULE_NAME glibmm) +set(PACKAGE_VERSION 2.52.1) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/glib/glibmm.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/glibmm.pc" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glibmm.pc" DESTINATION lib/pkgconfig) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glibmm.pc" DESTINATION lib/pkgconfig RENAME glibmm-2.4.pc) file(GLOB GIOMM_SOURCES gio/giomm/*.cc) if(WIN32) @@ -96,7 +116,7 @@ target_link_libraries(giomm PUBLIC glibmm) target_include_directories(giomm PUBLIC gio ${CMAKE_BINARY_DIR}/config/gio) install( - TARGETS glibmm giomm + TARGETS glibmm giomm glibmm_generate_extra_defs RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib @@ -116,6 +136,11 @@ if(NOT DISABLE_INSTALL_HEADERS) DESTINATION include FILES_MATCHING PATTERN *.h ) + install( + DIRECTORY tools/extra_defs_gen/ + DESTINATION include/glibmm_generate_extra_defs/ + FILES_MATCHING PATTERN *.h + ) endif() if(NOT DISABLE_EXAMPLES) diff --git a/ports/glibmm/CONTROL b/ports/glibmm/CONTROL deleted file mode 100644 index 4b2b8283f40d80..00000000000000 --- a/ports/glibmm/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: glibmm -Version: 2.52.1-9 -Description: This is glibmm, a C++ API for parts of glib that are useful for C++. -Homepage: https://www.gtkmm.org. -Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib, libsigcpp diff --git a/ports/glibmm/fix-define-glibmmconfig.patch b/ports/glibmm/fix-define-glibmmconfig.patch deleted file mode 100644 index 90b97d9072a7a4..00000000000000 --- a/ports/glibmm/fix-define-glibmmconfig.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/MSVC_Net2013/glibmm/glibmmconfig.h b/MSVC_Net2013/glibmm/glibmmconfig.h -index 61bb83e..7dbe809 100644 ---- a/MSVC_Net2013/glibmm/glibmmconfig.h -+++ b/MSVC_Net2013/glibmm/glibmmconfig.h -@@ -7,12 +7,17 @@ - # if defined(_MSC_VER) - # define GLIBMM_MSC 1 - # define GLIBMM_WIN32 1 --# define GLIBMM_DLL 1 -+# if !defined(GLIBMM_STATIC_LIB) -+# define GLIBMM_DLL 1 -+# endif - # elif defined(__CYGWIN__) - # define GLIBMM_CONFIGURE 1 - # elif defined(__MINGW32__) - # define GLIBMM_WIN32 1 - # define GLIBMM_CONFIGURE 1 -+# if !defined(GLIBMM_STATIC_LIB) -+# define GLIBMM_DLL 1 -+# endif - # else - /* AIX clR compiler complains about this even though it doesn't get this far */ - # error "Unknown architecture (send me gcc --dumpspecs or equiv)" -@@ -108,6 +113,7 @@ - # define GLIBMM_HAVE_WIDE_STREAM 1 - # define GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS 1 - # define GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 1 -+# define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS 1 - # define GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION 1 - # define GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS 1 - # define GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC 1 -@@ -140,11 +146,6 @@ - * it to be defined. Remove after grace period. */ - #define GLIBMM_USING_STD(Symbol) - --/* Enable DLL-specific stuff only when not building a static library */ --#if !defined(__CYGWIN__) && defined(__MINGW32__) && !defined(GLIBMM_STATIC_LIB) --# define GLIBMM_DLL 1 --#endif -- - #ifdef GLIBMM_DLL - # if defined(GLIBMM_BUILD) && defined(_WINDLL) - /* Do not dllexport as it is handled by gendef on MSVC */ diff --git a/ports/glibmm/glibmm-api-variant.patch b/ports/glibmm/glibmm-api-variant.patch deleted file mode 100644 index bb00ac3f5dc96c..00000000000000 --- a/ports/glibmm/glibmm-api-variant.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/glib/glibmm/varianttype.h b/glib/glibmm/varianttype.h -index a232e70..64eb4a1 100644 ---- a/glib/glibmm/varianttype.h -+++ b/glib/glibmm/varianttype.h -@@ -500,54 +500,79 @@ public: - - }; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_BOOL; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_BYTE; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_INT16; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_UINT16; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_INT32; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_UINT32; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_INT64; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_UINT64; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_DOUBLE; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_STRING; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_OBJECT_PATH; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_SIGNATURE; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_VARIANT; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_HANDLE; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_UNIT; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_ANY; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_BASIC; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_MAYBE; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_ARRAY; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_TUPLE; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_DICT_ENTRY; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_DICTIONARY; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_STRING_ARRAY; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_BYTESTRING; - -+GLIBMM_API - extern const VariantType VARIANT_TYPE_BYTESTRING_ARRAY; - - diff --git a/ports/glibmm/portfile.cmake b/ports/glibmm/portfile.cmake index 460e32cac90bff..a6a4307dde3075 100644 --- a/ports/glibmm/portfile.cmake +++ b/ports/glibmm/portfile.cmake @@ -1,40 +1,28 @@ -include(vcpkg_common_functions) - # Glib uses winapi functions not available in WindowsStore -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds are currently not supported.") -endif() +vcpkg_fail_port_install(ON_TARGET "UWP") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glibmm-2.52.1) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.52/glibmm-2.52.1.tar.xz" - FILENAME "glibmm-2.52.1.tar.xz" - SHA512 702158762cb28972b315ab98dc00a62e532bda08b6e76dc2a2556e8cb381c2021290891887a4af2fbff5a62bab4d50581be73037dc8e0dc47d5febd6cbeb7bda + URLS "https://ftp.gnome.org/pub/GNOME/sources/glibmm/2.68/glibmm-2.68.1.tar.xz" + FILENAME "glibmm-2.68.1.tar.xz" + SHA512 ca164f986da651e66bb5b98a760853e73d57ff84e035809d4c3b2c0a1b6ddf8ca68ffc49a71d0e0b2e14eca1c00e2e727e3bf3821e0b2b3a808397c3d33c6d5c ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/glibmm-api-variant.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-define-glibmmconfig.patch +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( +vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DWARNINGS_HEADER=${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h - OPTIONS_DEBUG - -DDISABLE_INSTALL_HEADERS=ON + OPTIONS + -Dbuild-examples=false + -Dmsvc14x-parallel-installable=false ) - -vcpkg_install_cmake() - +vcpkg_install_meson() vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + # Handle copyright and readme -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/glibmm RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/glibmm RENAME readme.txt) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${SOURCE_PATH}/README" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME readme.txt) diff --git a/ports/glibmm/vcpkg.json b/ports/glibmm/vcpkg.json new file mode 100644 index 00000000000000..feb01216f9a978 --- /dev/null +++ b/ports/glibmm/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "glibmm", + "version": "2.68.1", + "description": "This is glibmm, a C++ API for parts of glib that are useful for C++.", + "homepage": "https://www.gtkmm.org.", + "supports": "!uwp", + "dependencies": [ + "gettext", + "glib", + "libffi", + "libiconv", + "libsigcpp-3", + "pcre", + "zlib" + ] +} diff --git a/ports/glm/CMakeLists.txt b/ports/glm/CMakeLists.txt index 678604b8670f79..c8a92c151de436 100644 --- a/ports/glm/CMakeLists.txt +++ b/ports/glm/CMakeLists.txt @@ -15,7 +15,9 @@ install( ) install( - EXPORT glm-config DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glm + EXPORT glm-config + NAMESPACE glm:: + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glm ) install( diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL deleted file mode 100644 index ccf64caa15bda8..00000000000000 --- a/ports/glm/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: glm -Version: 0.9.9.5-3 -Description: OpenGL Mathematics (GLM) -Homepage: https://glm.g-truc.net diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index d38589a88b0a8d..40d5115acece90 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO g-truc/glm - REF 0.9.9.5 - SHA512 3b329acf5144aab1c0f47f8045d34e097699bd6685118ad8322c5ce23afdcb44ba2bb07e49301db06355b8eef7d4340b72251d55e113b533740d1e6ef6609911 + REF bf71a834948186f4097caa076cd2663c69a10e1e #v0.9.9.8 + SHA512 226266c02af616a96fb19ee32cf3f98347daa43a4fde5d618d36b38709dce1280de126c542524d40725ecf70359edcc5b60660554c65ce246514501fb4c9c87c HEAD_REF master ) @@ -21,5 +19,4 @@ vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/manual.md ${CURRENT_PACKAGES_DIR}/share/glm/copyright) +file(INSTALL ${SOURCE_PATH}/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/glm/vcpkg.json b/ports/glm/vcpkg.json new file mode 100644 index 00000000000000..45a3b3c71a262d --- /dev/null +++ b/ports/glm/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "glm", + "version-string": "0.9.9.8", + "port-version": 1, + "description": "OpenGL Mathematics (GLM)", + "homepage": "https://glm.g-truc.net" +} diff --git a/ports/globjects/CONTROL b/ports/globjects/CONTROL deleted file mode 100644 index 0de66a3b29e0f4..00000000000000 --- a/ports/globjects/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: globjects -Version: 1.1.0-2 -Build-Depends: glbinding, glm -Description: C++ library strictly wrapping OpenGL objects. -Homepage: https://github.com/cginternals/globjects diff --git a/ports/globjects/fix-dependency-glm.patch b/ports/globjects/fix-dependency-glm.patch new file mode 100644 index 00000000000000..e867da1b10fa17 --- /dev/null +++ b/ports/globjects/fix-dependency-glm.patch @@ -0,0 +1,13 @@ +diff --git a/source/globjects/CMakeLists.txt b/source/globjects/CMakeLists.txt +index 71e92d8..b8b4408 100644 +--- a/source/globjects/CMakeLists.txt ++++ b/source/globjects/CMakeLists.txt +@@ -359,7 +359,7 @@ target_link_libraries(${target} + + PUBLIC + ${DEFAULT_LIBRARIES} +- glm ++ glm::glm + glbinding::glbinding + glbinding::glbinding-aux + diff --git a/ports/globjects/portfile.cmake b/ports/globjects/portfile.cmake index 524014a8b9a97f..4103fd3ab44e5e 100644 --- a/ports/globjects/portfile.cmake +++ b/ports/globjects/portfile.cmake @@ -1,12 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cginternals/globjects REF dc68b09a53ec20683d3b3a12ed8d9cb12602bb9a SHA512 5145df795a73a8d74e983e143fd57441865f3082860efb89a3aa8c4d64c2eb6f0256a8049ccd5479dd77e53ef6638d9c903b29a8ef2b41a076003d9595912500 HEAD_REF master - PATCHES system-install.patch + PATCHES + system-install.patch + fix-dependency-glm.patch ) vcpkg_configure_cmake( @@ -28,7 +28,7 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/globjects/globjects-config.cmake "inclu find_dependency(glm) find_dependency(glbinding) -include(\${CMAKE_CURRENT_LIST_DIR}/cmake/globjects/globjects-export.cmake) +include(\${CMAKE_CURRENT_LIST_DIR}/globjects-export.cmake) ") # Handle copyright diff --git a/ports/globjects/vcpkg.json b/ports/globjects/vcpkg.json new file mode 100644 index 00000000000000..8878d28659a741 --- /dev/null +++ b/ports/globjects/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "globjects", + "version-string": "1.1.0", + "port-version": 4, + "description": "C++ library strictly wrapping OpenGL objects", + "homepage": "https://github.com/cginternals/globjects", + "dependencies": [ + "glbinding", + "glm" + ] +} diff --git a/ports/glog/CONTROL b/ports/glog/CONTROL deleted file mode 100644 index a94938acd53d25..00000000000000 --- a/ports/glog/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: glog -Version: 0.4.0-1 -Homepage: https://github.com/google/glog -Description: C++ implementation of the Google logging module -Build-Depends: gflags diff --git a/ports/glog/portfile.cmake b/ports/glog/portfile.cmake index 978539217ab6cd..8487cc19219055 100644 --- a/ports/glog/portfile.cmake +++ b/ports/glog/portfile.cmake @@ -1,13 +1,3 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/glog @@ -21,6 +11,8 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF ) vcpkg_install_cmake() @@ -31,6 +23,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/glog) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/glog/COPYING ${CURRENT_PACKAGES_DIR}/share/glog/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/glog/vcpkg.json b/ports/glog/vcpkg.json new file mode 100644 index 00000000000000..6a0da077d82841 --- /dev/null +++ b/ports/glog/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "glog", + "version-string": "0.4.0", + "port-version": 4, + "description": "C++ implementation of the Google logging module", + "homepage": "https://github.com/google/glog", + "dependencies": [ + "gflags" + ] +} diff --git a/ports/gloo/portfile.cmake b/ports/gloo/portfile.cmake new file mode 100644 index 00000000000000..cc168af4a3ce59 --- /dev/null +++ b/ports/gloo/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebookincubator/gloo + REF 1da21174054eaabbbd189b7f657ea24842d821e2 + SHA512 ebd8369e413aee739a3928f8e6738c15708f009e0cd5a3763b8cadbe6f6d0a9d758585a7a2b0f7dd6d39a12882ff2f9497ab2d4edcebd4eb2a7237ab857f317e + HEAD_REF master + ) + +# Determine which backend to build via specified feature +vcpkg_check_features( + OUT_FEATURE_OPTIONS GLOO_FEATURE_OPTIONS + FEATURES + mpi USE_MPI + redis USE_REDIS + ) + +if ("cuda" IN_LIST FEATURES) + list(APPEND GLOO_FEATURE_OPTIONS "-DUSE_CUDA=1" "-DUSE_NCCL=1") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${GLOO_FEATURE_OPTIONS} + ) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/Gloo) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gloo/vcpkg.json b/ports/gloo/vcpkg.json new file mode 100644 index 00000000000000..15c4593c1d3c43 --- /dev/null +++ b/ports/gloo/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "gloo", + "version-string": "20201203", + "description": "Collective communications library with various primitives for multi-machine training.", + "homepage": "https://github.com/facebookincubator/gloo", + "supports": "x64 & linux", + "features": { + "cuda": { + "description": "for CUDA aware algorithms", + "dependencies": [ + "cuda", + "nccl" + ] + }, + "mpi": { + "description": "for coordinating machine rendezvous through MPI", + "dependencies": [ + "openmpi" + ] + }, + "redis": { + "description": "for coordinating machine rendezvous through Redis", + "dependencies": [ + "hiredis" + ] + } + } +} diff --git a/ports/glslang/CMakeLists-targets.patch b/ports/glslang/CMakeLists-targets.patch deleted file mode 100644 index 36e923d9262b1f..00000000000000 --- a/ports/glslang/CMakeLists-targets.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake -index 2097881..f6320a9 100644 ---- a/ChooseMSVCCRT.cmake -+++ b/ChooseMSVCCRT.cmake -@@ -102,4 +102,3 @@ set(MSVC_CRT - MT - MTd) - --choose_msvc_crt(MSVC_CRT) -diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt -index 5bb3f0e..90ba3be 100644 ---- a/OGLCompilersDLL/CMakeLists.txt -+++ b/OGLCompilersDLL/CMakeLists.txt -@@ -9,6 +9,7 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS OGLCompiler -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(TARGETS OGLCompiler EXPORT glslangConfig -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt -index 1997e74..e2a0229 100644 ---- a/SPIRV/CMakeLists.txt -+++ b/SPIRV/CMakeLists.txt -@@ -46,7 +46,6 @@ endif(ENABLE_NV_EXTENSIONS) - add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) - set_property(TARGET SPIRV PROPERTY FOLDER glslang) - set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) --target_include_directories(SPIRV PUBLIC ..) - - if (ENABLE_SPVREMAPPER) - add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) -@@ -78,13 +77,13 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- if(BUILD_SHARED_LIBS) -+ if(BUILD_SHARED_LIBS OR TRUE) - if (ENABLE_SPVREMAPPER) - install(TARGETS SPVRemapper - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() -- install(TARGETS SPIRV -+ install(TARGETS SPIRV EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - else() -diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt -index 5f51476..7f11498 100644 ---- a/glslang/CMakeLists.txt -+++ b/glslang/CMakeLists.txt -@@ -86,7 +86,6 @@ add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${H - set_property(TARGET glslang PROPERTY FOLDER glslang) - set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON) - target_link_libraries(glslang OGLCompiler OSDependent) --target_include_directories(glslang PUBLIC ..) - - if(WIN32 AND BUILD_SHARED_LIBS) - set_target_properties(glslang PROPERTIES PREFIX "") -@@ -105,10 +104,15 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- if(BUILD_SHARED_LIBS) -- install(TARGETS glslang -+ if(BUILD_SHARED_LIBS OR TRUE) -+ install(TARGETS glslang EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install( -+ EXPORT glslangConfig -+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/glslang" -+ NAMESPACE glslang:: -+ ) - else() - install(TARGETS glslang - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt -index e652f45..a9673fe 100644 ---- a/glslang/OSDependent/Unix/CMakeLists.txt -+++ b/glslang/OSDependent/Unix/CMakeLists.txt -@@ -20,6 +20,6 @@ else() - endif() - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS OSDependent -+ install(TARGETS OSDependent EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(ENABLE_GLSLANG_INSTALL) -diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt -index f918d7a..329800f 100644 ---- a/hlsl/CMakeLists.txt -+++ b/hlsl/CMakeLists.txt -@@ -32,8 +32,8 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- if(BUILD_SHARED_LIBS) -- install(TARGETS HLSL -+ if(BUILD_SHARED_LIBS OR TRUE) -+ install(TARGETS HLSL EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - else() diff --git a/ports/glslang/CMakeLists-windows.patch b/ports/glslang/CMakeLists-windows.patch deleted file mode 100644 index 76ccf6077c75c2..00000000000000 --- a/ports/glslang/CMakeLists-windows.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt -index f257418..82a3f3c 100644 ---- a/glslang/OSDependent/Windows/CMakeLists.txt -+++ b/glslang/OSDependent/Windows/CMakeLists.txt -@@ -15,6 +15,6 @@ if(WIN32) - endif(WIN32) - - if(ENABLE_GLSLANG_INSTALL) -- install(TARGETS OSDependent -+ install(TARGETS OSDependent EXPORT glslangConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(ENABLE_GLSLANG_INSTALL) diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL deleted file mode 100644 index 2d16ad41b7303e..00000000000000 --- a/ports/glslang/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: glslang -Version: 2019-03-05 -Homepage: https://github.com/KhronosGroup/glslang -Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator \ No newline at end of file diff --git a/ports/glslang/always-install-resource-limits.patch b/ports/glslang/always-install-resource-limits.patch new file mode 100644 index 00000000000000..56c34dfc44386a --- /dev/null +++ b/ports/glslang/always-install-resource-limits.patch @@ -0,0 +1,13 @@ +diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt +index 751d1cd71..0f5cf0dc0 100644 +--- a/StandAlone/CMakeLists.txt ++++ b/StandAlone/CMakeLists.txt +@@ -98,7 +98,7 @@ if(ENABLE_GLSLANG_INSTALL) + install(EXPORT spirv-remapTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + endif() + +- if(BUILD_SHARED_LIBS) ++ if(BUILD_SHARED_LIBS OR TRUE) + install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/ports/glslang/copyright b/ports/glslang/copyright deleted file mode 100644 index dfffea6a8c1226..00000000000000 --- a/ports/glslang/copyright +++ /dev/null @@ -1,35 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//Copyright (C) 2012-2013 LunarG, Inc. -// -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// diff --git a/ports/glslang/glslang-config.cmake b/ports/glslang/glslang-config.cmake new file mode 100644 index 00000000000000..5eb356151f53ae --- /dev/null +++ b/ports/glslang/glslang-config.cmake @@ -0,0 +1,7 @@ +include(CMakeFindDependencyMacro) + +find_dependency(Threads) + +foreach(targets OGLCompiler OSDependent glslang glslang-default-resource-limits glslangValidator HLSL SPIRV spirv-remap SPVRemapper) + include("${CMAKE_CURRENT_LIST_DIR}/${targets}Targets.cmake" OPTIONAL) +endforeach() diff --git a/ports/glslang/ignore-crt.patch b/ports/glslang/ignore-crt.patch new file mode 100644 index 00000000000000..0835b49a9f2239 --- /dev/null +++ b/ports/glslang/ignore-crt.patch @@ -0,0 +1,9 @@ +diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake +index b1561263..b6c8c3a6 100644 +--- a/ChooseMSVCCRT.cmake ++++ b/ChooseMSVCCRT.cmake +@@ -135,4 +135,3 @@ set(MSVC_CRT + MT + MTd) + +-choose_msvc_crt(MSVC_CRT) diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index 003aa26aac2592..08609f2a7e8e2f 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -1,32 +1,55 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/glslang - REF f88e5824d2cfca5edc58c7c2101ec9a4ec36afac - SHA512 92dc287e8930db6e00bde23b770f763dc3cf8a405a37b682bbd65e1dbde1f1f5161543fcc70b09eef07a5ce8bbe8f368ef84ac75003c122f42d1f6b9eaa8bd50 + REF 2fb89a0072ae7316af1c856f22663fde4928128a #11.6.0 + SHA512 e22b85bb0c98d35c80f06dd6352d98c34ea0b965c5bec077d122d9aa346293672a11aec4964b410db8a6050c70dbc0a46fbbb599e178424d78234608075c110e HEAD_REF master PATCHES - CMakeLists-targets.patch - CMakeLists-windows.patch + ignore-crt.patch + always-install-resource-limits.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DCMAKE_DEBUG_POSTFIX=d -DSKIP_GLSLANG_INSTALL=OFF +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY) +vcpkg_add_to_path("${PYTHON_PATH}") + +if(VCPKG_TARGET_IS_IOS) + # this case will report error since all executable will require BUNDLE DESTINATION + set(BUILD_BINARIES OFF) +else() + set(BUILD_BINARIES ON) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DSKIP_GLSLANG_INSTALL=OFF + -DBUILD_EXTERNAL=OFF + -DENABLE_GLSLANG_BINARIES=${BUILD_BINARIES} ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake) -file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_copy_pdbs() -# Handle copyright -file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/glslang) +if(NOT BUILD_BINARIES) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") +else() + vcpkg_copy_tools(TOOL_NAMES glslangValidator spirv-remap AUTO_CLEAN) +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/bin") + +if(EXISTS "${CURRENT_PACKAGES_DIR}/share/glslang/glslang-config.cmake" OR EXISTS "${CURRENT_PACKAGES_DIR}/share/glslang/glslangConfig.cmake") + message(FATAL_ERROR "glslang has been updated to provide a -config file -- please remove the vcpkg provided version from the portfile") +endif() + +file(COPY + "${CMAKE_CURRENT_LIST_DIR}/glslang-config.cmake" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" +) -vcpkg_test_cmake(PACKAGE_NAME glslang) +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/glslang/vcpkg.json b/ports/glslang/vcpkg.json new file mode 100644 index 00000000000000..e17f25a972bfca --- /dev/null +++ b/ports/glslang/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "glslang", + "version": "11.6.0", + "description": "Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator", + "homepage": "https://github.com/KhronosGroup/glslang", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/glui/install-one-flavor.patch b/ports/glui/install-one-flavor.patch new file mode 100644 index 00000000000000..fb66d92c7f0448 --- /dev/null +++ b/ports/glui/install-one-flavor.patch @@ -0,0 +1,70 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c0f7d32..8446f3c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,6 +59,22 @@ target_include_directories(glui_obj + # create static *and* shared libraries without double compilation + set_target_properties( glui_obj PROPERTIES POSITION_INDEPENDENT_CODE 1) + ++if (MSVC) ++ target_compile_options(glui_obj ++ PRIVATE ++ /D_CRT_SECURE_NO_WARNINGS ++ /wd4244 ++ /wd4305 ++ ) ++endif() ++ ++if(BUILD_SHARED_LIBS) ++ if(WIN32) ++ target_compile_definitions(glui_obj ++ PRIVATE GLUI_BUILDING_LIB ++ PUBLIC GLUIDLL ++ ) ++ endif() + add_library(glui SHARED $) + target_include_directories(glui + PUBLIC +@@ -71,7 +87,7 @@ set_target_properties(glui PROPERTIES + DEBUG_POSTFIX "d" + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION}) +- ++else() + add_library(glui_static STATIC $) + target_include_directories(glui_static + PUBLIC +@@ -81,7 +97,9 @@ target_include_directories(glui_static + ${GLUT_INCLUDE_DIR}) + target_link_libraries(glui_static PUBLIC ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) + set_target_properties(glui_static PROPERTIES DEBUG_POSTFIX "d") ++endif() + ++if(GLUI_BUILD_EXAMPLES) + add_executable(ppm2array tools/ppm.cpp tools/ppm2array.cpp) + target_link_libraries(ppm2array) + +@@ -97,7 +115,7 @@ add_executable(example5 example/example5.cpp) + target_link_libraries(example5 glui_static ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) + add_executable(example6 example/example6.cpp) + target_link_libraries(example6 glui_static ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) +- ++endif() + + + #### +@@ -130,8 +148,13 @@ configure_package_config_file( + ) + + # Targets: ++if(BUILD_SHARED_LIBS) ++ set(glui_target glui) ++else() ++ set(glui_target glui_static) ++endif() + install( +- TARGETS glui_static glui ++ TARGETS ${glui_target} + EXPORT "${targets_export_name}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" diff --git a/ports/glui/portfile.cmake b/ports/glui/portfile.cmake new file mode 100644 index 00000000000000..a3b37a597141b3 --- /dev/null +++ b/ports/glui/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libglui/glui + REF 093edc777c02118282910bdee59f8db1bd46a84d + SHA512 650e169a6a55cd7d599176ac0767cd95b511fbc0a9b27aab2fa4f94a6395fa1a5762b6c23f5f1a9fc5ac9ce70c44fee4e4cbb6d6afd2307130cedfb80aae877a + HEAD_REF master + PATCHES + install-one-flavor.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/GL/glui.h + "ifdef GLUIDLL" + "if 1 //ifdef GLUIDLL" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/glui/vcpkg-cmake-wrapper.cmake b/ports/glui/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..6fefefc7c989c9 --- /dev/null +++ b/ports/glui/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET glui::glui AND NOT TARGET glui::glui_static) + add_library(glui::glui_static INTERFACE IMPORTED) + set_target_properties(glui::glui_static PROPERTIES INTERFACE_LINK_LIBRARIES glui::glui) +elseif(TARGET glui::glui_static AND NOT TARGET glui::glui) + add_library(glui::glui INTERFACE IMPORTED) + set_target_properties(glui::glui PROPERTIES INTERFACE_LINK_LIBRARIES glui::glui_static) +endif() diff --git a/ports/glui/vcpkg.json b/ports/glui/vcpkg.json new file mode 100644 index 00000000000000..c585a4f2bfbc88 --- /dev/null +++ b/ports/glui/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "glui", + "version-string": "2019-11-30", + "port-version": 1, + "description": "GLUI is a GLUT-based C++ user interface library", + "homepage": "https://github.com/libglui/glui", + "dependencies": [ + "freeglut" + ] +} diff --git a/ports/gmime/CMakeLists.txt b/ports/gmime/CMakeLists.txt index b6bead6dadd6ef..b957e4656e5fba 100644 --- a/ports/gmime/CMakeLists.txt +++ b/ports/gmime/CMakeLists.txt @@ -5,9 +5,10 @@ project(gmime C) set(GMIME_DLL_SUFFIX 3) set(GMIME_LIB_SUFFIX 3.0) -find_package(zlib REQUIRED) -find_package(unofficial-glib CONFIG REQUIRED) -find_package(unofficial-iconv REQUIRED) +find_package(ZLIB REQUIRED) +find_package(PkgConfig REQUIRED) +pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 IMPORTED_TARGET) +find_package(Iconv REQUIRED) find_library(IDN_LIBRARY NAMES libidn2) @@ -17,6 +18,7 @@ if(MSVC) endif() add_definitions(-DHAVE_CONFIG_H) +add_definitions(-DG_DISABLE_DEPRECATED) add_definitions(-DG_LOG_DOMAIN="GMime") # Source files @@ -44,8 +46,8 @@ set_target_properties(${PROJECT_NAME} PROPERTIES ) target_include_directories(${PROJECT_NAME} PRIVATE . ./util) -target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::iconv::libiconv ZLIB::ZLIB ${IDN_LIBRARY}) -target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::glib::gobject unofficial::glib::gio unofficial::glib::glib) +target_link_libraries(${PROJECT_NAME} PRIVATE Iconv::Iconv ZLIB::ZLIB ${IDN_LIBRARY}) +target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::GLIB2) target_link_libraries(${PROJECT_NAME} PRIVATE Ws2_32.lib) install(TARGETS ${PROJECT_NAME} diff --git a/ports/gmime/CONTROL b/ports/gmime/CONTROL deleted file mode 100644 index 2b1a9842f786a6..00000000000000 --- a/ports/gmime/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gmime -Version: 3.2.3-1 -Build-Depends: zlib, glib, libiconv, libidn2 -Homepage: https://developer.gnome.org/gmime/ -Description: GMime is a C/C++ library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME). diff --git a/ports/gmime/config.h b/ports/gmime/config.h deleted file mode 100644 index a53c1537af03d0..00000000000000 --- a/ports/gmime/config.h +++ /dev/null @@ -1,184 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if GMime should enable GpgME PGP and S/MIME support. */ -/* #undef ENABLE_CRYPTO */ - -/* Define if GMime should enable warning output. */ -/* #undef ENABLE_WARNINGS */ - -/* Define to the GMime version */ -#define GMIME_VERSION "@LIB_VERSION@" - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the `fsync' function. */ -/* #undef HAVE_FSYNC */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getdomainname' function. */ -/* #undef HAVE_GETDOMAINNAME */ - -/* Define to 1 if you have the `gethostname' function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define to 1 if you have the header with the GNU `getopt_long' - function. */ -#define HAVE_GETOPT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 to use auto-detected iconv-friendly charset names. */ -/* #undef HAVE_ICONV_DETECT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `msync' function. */ -/* #undef HAVE_MSYNC */ - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the `poll' function. */ -/* #undef HAVE_POLL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_POLL_H */ - -/* Define to 1 if you have the `select' function. */ -/* #undef HAVE_SELECT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define if struct utsname has a domainname member */ -/* #undef HAVE_UTSNAME_DOMAINNAME */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define to 1 if GNU Libidn should be used. */ -#define LIBIDN 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Define with a value if your does not define MAXHOSTNAMELEN */ -/* #undef MAXHOSTNAMELEN */ - -/* Define to 0 if your system does not have the O_LARGEFILE flag */ -/* #undef O_LARGEFILE */ - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://github.com/jstedfast/gmime/issues" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gmime" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gmime @LIB_VERSION@" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmime" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "@LIB_VERSION@" - -/* The size of `off_t', as computed by sizeof. */ -/* #undef SIZEOF_OFF_T */ - -/* The size of `size_t', as computed by sizeof. */ -/* #undef SIZEOF_SIZE_T */ - -/* The size of `ssize_t', as computed by sizeof. */ -/* #undef SIZEOF_SSIZE_T */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Using GNU libiconv */ -/* #undef USE_LIBICONV_GNU */ - -/* Using a native implementation of iconv in a separate library */ -#define USE_LIBICONV_NATIVE 1 - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to `int' if does not define. */ -/* #undef mode_t */ - -/* Define to `unsigned long int' if does not define. */ -/* #undef nfds_t */ - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to `int' if does not define. */ -#define ssize_t intptr_t - -#ifdef _MSC_VER -#pragma warning(disable: 4018) -#pragma warning(disable: 4101) -#endif diff --git a/ports/gmime/gmime.def b/ports/gmime/gmime.def deleted file mode 100644 index 3f04d4e04e152a..00000000000000 --- a/ports/gmime/gmime.def +++ /dev/null @@ -1,636 +0,0 @@ -EXPORTS - -g_mime_application_pkcs7_mime_decrypt -g_mime_application_pkcs7_mime_encrypt -g_mime_application_pkcs7_mime_get_smime_type -g_mime_application_pkcs7_mime_get_type -g_mime_application_pkcs7_mime_new -g_mime_application_pkcs7_mime_sign -g_mime_application_pkcs7_mime_verify -g_mime_certificate_get_created -g_mime_certificate_get_digest_algo -g_mime_certificate_get_email -g_mime_certificate_get_expires -g_mime_certificate_get_fingerprint -g_mime_certificate_get_id_validity -g_mime_certificate_get_issuer_name -g_mime_certificate_get_issuer_serial -g_mime_certificate_get_key_id -g_mime_certificate_get_name -g_mime_certificate_get_pubkey_algo -g_mime_certificate_get_trust -g_mime_certificate_get_type -g_mime_certificate_get_user_id -g_mime_certificate_list_add -g_mime_certificate_list_clear -g_mime_certificate_list_contains -g_mime_certificate_list_get_certificate -g_mime_certificate_list_get_type -g_mime_certificate_list_index_of -g_mime_certificate_list_insert -g_mime_certificate_list_length -g_mime_certificate_list_new -g_mime_certificate_list_remove -g_mime_certificate_list_remove_at -g_mime_certificate_list_set_certificate -g_mime_certificate_new -g_mime_certificate_set_created -g_mime_certificate_set_digest_algo -g_mime_certificate_set_email -g_mime_certificate_set_expires -g_mime_certificate_set_fingerprint -g_mime_certificate_set_id_validity -g_mime_certificate_set_issuer_name -g_mime_certificate_set_issuer_serial -g_mime_certificate_set_key_id -g_mime_certificate_set_name -g_mime_certificate_set_pubkey_algo -g_mime_certificate_set_trust -g_mime_certificate_set_user_id -g_mime_charset_best -g_mime_charset_best_name -g_mime_charset_can_encode -g_mime_charset_canon_name -g_mime_charset_iconv_name -g_mime_charset_init -g_mime_charset_iso_to_windows -g_mime_charset_language -g_mime_charset_locale_name -g_mime_charset_map_init -g_mime_charset_map_shutdown -g_mime_charset_name -g_mime_charset_step -g_mime_check_version -g_mime_content_disposition_encode -g_mime_content_disposition_get_disposition -g_mime_content_disposition_get_parameter -g_mime_content_disposition_get_parameters -g_mime_content_disposition_get_type -g_mime_content_disposition_is_attachment -g_mime_content_disposition_new -g_mime_content_disposition_parse -g_mime_content_disposition_set_disposition -g_mime_content_disposition_set_parameter -g_mime_content_encoding_from_string -g_mime_content_encoding_to_string -g_mime_content_type_encode -g_mime_content_type_get_media_subtype -g_mime_content_type_get_media_type -g_mime_content_type_get_mime_type -g_mime_content_type_get_parameter -g_mime_content_type_get_parameters -g_mime_content_type_get_type -g_mime_content_type_is_type -g_mime_content_type_new -g_mime_content_type_parse -g_mime_content_type_set_media_subtype -g_mime_content_type_set_media_type -g_mime_content_type_set_parameter -g_mime_crypto_context_decrypt -g_mime_crypto_context_digest_id -g_mime_crypto_context_digest_name -g_mime_crypto_context_encrypt -g_mime_crypto_context_export_keys -g_mime_crypto_context_get_encryption_protocol -g_mime_crypto_context_get_key_exchange_protocol -g_mime_crypto_context_get_request_password -g_mime_crypto_context_get_signature_protocol -g_mime_crypto_context_get_type -g_mime_crypto_context_import_keys -g_mime_crypto_context_new -g_mime_crypto_context_register -g_mime_crypto_context_set_request_password -g_mime_crypto_context_shutdown -g_mime_crypto_context_sign -g_mime_crypto_context_verify -g_mime_data_wrapper_get_encoding -g_mime_data_wrapper_get_stream -g_mime_data_wrapper_get_type -g_mime_data_wrapper_new -g_mime_data_wrapper_new_with_stream -g_mime_data_wrapper_set_encoding -g_mime_data_wrapper_set_stream -g_mime_data_wrapper_write_to_stream -g_mime_decrypt_result_get_cipher -g_mime_decrypt_result_get_mdc -g_mime_decrypt_result_get_recipients -g_mime_decrypt_result_get_session_key -g_mime_decrypt_result_get_signatures -g_mime_decrypt_result_get_type -g_mime_decrypt_result_new -g_mime_decrypt_result_set_cipher -g_mime_decrypt_result_set_mdc -g_mime_decrypt_result_set_recipients -g_mime_decrypt_result_set_session_key -g_mime_decrypt_result_set_signatures -g_mime_encoding_base64_decode_step -g_mime_encoding_base64_encode_close -g_mime_encoding_base64_encode_step -g_mime_encoding_flush -g_mime_encoding_init_decode -g_mime_encoding_init_encode -g_mime_encoding_outlen -g_mime_encoding_quoted_decode_step -g_mime_encoding_quoted_encode_close -g_mime_encoding_quoted_encode_step -g_mime_encoding_reset -g_mime_encoding_step -g_mime_encoding_uudecode_step -g_mime_encoding_uuencode_close -g_mime_encoding_uuencode_step -g_mime_filter_backup -g_mime_filter_basic_get_type -g_mime_filter_basic_new -g_mime_filter_best_charset -g_mime_filter_best_encoding -g_mime_filter_best_get_type -g_mime_filter_best_new -g_mime_filter_charset_get_type -g_mime_filter_charset_new -g_mime_filter_checksum_get_digest -g_mime_filter_checksum_get_string -g_mime_filter_checksum_get_type -g_mime_filter_checksum_new -g_mime_filter_complete -g_mime_filter_copy -g_mime_filter_dos2unix_get_type -g_mime_filter_dos2unix_new -g_mime_filter_enriched_get_type -g_mime_filter_enriched_new -g_mime_filter_filter -g_mime_filter_from_get_type -g_mime_filter_from_new -g_mime_filter_get_type -g_mime_filter_gzip_get_comment -g_mime_filter_gzip_get_filename -g_mime_filter_gzip_get_type -g_mime_filter_gzip_new -g_mime_filter_gzip_set_comment -g_mime_filter_gzip_set_filename -g_mime_filter_html_get_type -g_mime_filter_html_new -g_mime_filter_openpgp_new -g_mime_filter_openpgp_get_data_type -g_mime_filter_openpgp_get_begin_offset -g_mime_filter_openpgp_get_end_offset -g_mime_filter_openpgp_get_type -g_mime_filter_reset -g_mime_filter_set_size -g_mime_filter_smtp_data_get_type -g_mime_filter_smtp_data_new -g_mime_filter_strip_get_type -g_mime_filter_strip_new -g_mime_filter_unix2dos_get_type -g_mime_filter_unix2dos_new -g_mime_filter_windows_get_type -g_mime_filter_windows_is_windows_charset -g_mime_filter_windows_new -g_mime_filter_windows_real_charset -g_mime_filter_yenc_get_crc -g_mime_filter_yenc_get_pcrc -g_mime_filter_yenc_get_type -g_mime_filter_yenc_new -g_mime_filter_yenc_set_crc -g_mime_filter_yenc_set_state -g_mime_format_options_add_hidden_header -g_mime_format_options_clear_hidden_headers -g_mime_format_options_clone -g_mime_format_options_create_newline_filter -g_mime_format_options_free -g_mime_format_options_get_default -g_mime_format_options_get_newline -g_mime_format_options_get_newline_format -g_mime_format_options_get_param_encoding_method -g_mime_format_options_get_type -g_mime_format_options_is_hidden_header -g_mime_format_options_new -g_mime_format_options_remove_hidden_header -g_mime_format_options_set_newline_format -g_mime_format_options_set_param_encoding_method -g_mime_gpg_context_get_type -g_mime_gpg_context_new -g_mime_header_format_addrlist -g_mime_header_format_content_disposition -g_mime_header_format_content_type -g_mime_header_format_default -g_mime_header_format_message_id -g_mime_header_format_received -g_mime_header_format_references -g_mime_header_get_name -g_mime_header_get_offset -g_mime_header_get_raw_name -g_mime_header_get_raw_value -g_mime_header_get_type -g_mime_header_get_value -g_mime_header_list_append -g_mime_header_list_clear -g_mime_header_list_contains -g_mime_header_list_get_count -g_mime_header_list_get_header -g_mime_header_list_get_header_at -g_mime_header_list_get_type -g_mime_header_list_new -g_mime_header_list_prepend -g_mime_header_list_remove -g_mime_header_list_remove_at -g_mime_header_list_set -g_mime_header_list_to_string -g_mime_header_list_write_to_stream -g_mime_header_set_raw_value -g_mime_header_set_value -g_mime_header_write_to_stream -g_mime_iconv_close -g_mime_iconv_locale_to_utf8 -g_mime_iconv_locale_to_utf8_length -g_mime_iconv_open -g_mime_iconv_strdup -g_mime_iconv_strndup -g_mime_iconv_utf8_to_locale -g_mime_iconv_utf8_to_locale_length -g_mime_init -g_mime_locale_charset -g_mime_locale_language -g_mime_message_add_mailbox -g_mime_message_foreach -g_mime_message_get_addresses -g_mime_message_get_all_recipients -g_mime_message_get_autocrypt_gossip_headers -g_mime_message_get_autocrypt_gossip_headers_from_inner_part -g_mime_message_get_autocrypt_header -g_mime_message_get_bcc -g_mime_message_get_body -g_mime_message_get_cc -g_mime_message_get_date -g_mime_message_get_from -g_mime_message_get_message_id -g_mime_message_get_mime_part -g_mime_message_get_reply_to -g_mime_message_get_sender -g_mime_message_get_subject -g_mime_message_get_to -g_mime_message_get_type -g_mime_message_new -g_mime_message_part_get_message -g_mime_message_part_get_type -g_mime_message_part_new -g_mime_message_part_new_with_message -g_mime_message_part_set_message -g_mime_message_partial_get_id -g_mime_message_partial_get_number -g_mime_message_partial_get_total -g_mime_message_partial_get_type -g_mime_message_partial_new -g_mime_message_partial_reconstruct_message -g_mime_message_partial_split_message -g_mime_message_set_date -g_mime_message_set_message_id -g_mime_message_set_mime_part -g_mime_message_set_subject -g_mime_multipart_add -g_mime_multipart_clear -g_mime_multipart_contains -g_mime_multipart_encrypted_decrypt -g_mime_multipart_encrypted_encrypt -g_mime_multipart_encrypted_get_type -g_mime_multipart_encrypted_new -g_mime_multipart_foreach -g_mime_multipart_get_boundary -g_mime_multipart_get_count -g_mime_multipart_get_epilogue -g_mime_multipart_get_part -g_mime_multipart_get_prologue -g_mime_multipart_get_subpart_from_content_id -g_mime_multipart_get_type -g_mime_multipart_index_of -g_mime_multipart_insert -g_mime_multipart_new -g_mime_multipart_new_with_subtype -g_mime_multipart_remove -g_mime_multipart_remove_at -g_mime_multipart_replace -g_mime_multipart_set_boundary -g_mime_multipart_set_epilogue -g_mime_multipart_set_prologue -g_mime_multipart_signed_get_type -g_mime_multipart_signed_new -g_mime_multipart_signed_sign -g_mime_multipart_signed_verify -g_mime_object_append_header -g_mime_object_encode -g_mime_object_get_content_disposition -g_mime_object_get_content_disposition_parameter -g_mime_object_get_content_id -g_mime_object_get_content_type -g_mime_object_get_content_type_parameter -g_mime_object_get_disposition -g_mime_object_get_header -g_mime_object_get_header_list -g_mime_object_get_headers -g_mime_object_get_type -g_mime_object_new -g_mime_object_new_type -g_mime_object_prepend_header -g_mime_object_register_type -g_mime_object_remove_header -g_mime_object_set_content_disposition -g_mime_object_set_content_disposition_parameter -g_mime_object_set_content_id -g_mime_object_set_content_type -g_mime_object_set_content_type_parameter -g_mime_object_set_disposition -g_mime_object_set_header -g_mime_object_to_string -g_mime_object_write_to_stream -g_mime_param_get_charset -g_mime_param_get_encoding_method -g_mime_param_get_lang -g_mime_param_get_name -g_mime_param_get_type -g_mime_param_get_value -g_mime_param_list_clear -g_mime_param_list_encode -g_mime_param_list_get_parameter -g_mime_param_list_get_parameter_at -g_mime_param_list_get_type -g_mime_param_list_length -g_mime_param_list_new -g_mime_param_list_parse -g_mime_param_list_remove -g_mime_param_list_remove_at -g_mime_param_list_set_parameter -g_mime_param_set_charset -g_mime_param_set_encoding_method -g_mime_param_set_lang -g_mime_param_set_value -g_mime_parser_construct_message -g_mime_parser_construct_part -g_mime_parser_eos -g_mime_parser_get_format -g_mime_parser_get_headers_begin -g_mime_parser_get_headers_end -g_mime_parser_get_mbox_marker -g_mime_parser_get_mbox_marker_offset -g_mime_parser_get_persist_stream -g_mime_parser_get_respect_content_length -g_mime_parser_get_type -g_mime_parser_init_with_stream -g_mime_parser_new -g_mime_parser_new_with_stream -g_mime_parser_options_clone -g_mime_parser_options_free -g_mime_parser_options_get_address_compliance_mode -g_mime_parser_options_get_allow_addresses_without_domain -g_mime_parser_options_get_default -g_mime_parser_options_get_fallback_charsets -g_mime_parser_options_get_parameter_compliance_mode -g_mime_parser_options_get_rfc2047_compliance_mode -g_mime_parser_options_get_type -g_mime_parser_options_get_warning_callback -g_mime_parser_options_new -g_mime_parser_options_set_address_compliance_mode -g_mime_parser_options_set_allow_addresses_without_domain -g_mime_parser_options_set_fallback_charsets -g_mime_parser_options_set_parameter_compliance_mode -g_mime_parser_options_set_rfc2047_compliance_mode -g_mime_parser_options_set_warning_callback -g_mime_parser_set_format -g_mime_parser_set_header_regex -g_mime_parser_set_persist_stream -g_mime_parser_set_respect_content_length -g_mime_parser_tell -g_mime_part_get_best_content_encoding -g_mime_part_get_content -g_mime_part_get_content_description -g_mime_part_get_content_encoding -g_mime_part_get_content_id -g_mime_part_get_content_location -g_mime_part_get_content_md5 -g_mime_part_get_filename -g_mime_part_get_openpgp_data -g_mime_part_get_type -g_mime_part_is_attachment -g_mime_part_iter_clone -g_mime_part_iter_free -g_mime_part_iter_get_current -g_mime_part_iter_get_parent -g_mime_part_iter_get_path -g_mime_part_iter_get_toplevel -g_mime_part_iter_get_type -g_mime_part_iter_is_valid -g_mime_part_iter_jump_to -g_mime_part_iter_new -g_mime_part_iter_next -g_mime_part_iter_prev -g_mime_part_iter_remove -g_mime_part_iter_replace -g_mime_part_iter_reset -g_mime_part_new -g_mime_part_new_with_type -g_mime_part_openpgp_decrypt -g_mime_part_openpgp_encrypt -g_mime_part_openpgp_sign -g_mime_part_openpgp_verify -g_mime_part_set_content -g_mime_part_set_content_description -g_mime_part_set_content_encoding -g_mime_part_set_content_id -g_mime_part_set_content_location -g_mime_part_set_content_md5 -g_mime_part_set_filename -g_mime_part_set_openpgp_data -g_mime_part_verify_content_md5 -g_mime_pkcs7_context_get_type -g_mime_pkcs7_context_new -g_mime_references_append -g_mime_references_clear -g_mime_references_copy -g_mime_references_free -g_mime_references_get_message_id -g_mime_references_get_type -g_mime_references_length -g_mime_references_new -g_mime_references_parse -g_mime_references_set_message_id -g_mime_shutdown -g_mime_signature_get_certificate -g_mime_signature_get_created -g_mime_signature_get_expires -g_mime_signature_get_status -g_mime_signature_get_type -g_mime_signature_list_add -g_mime_signature_list_clear -g_mime_signature_list_contains -g_mime_signature_list_get_signature -g_mime_signature_list_get_type -g_mime_signature_list_index_of -g_mime_signature_list_insert -g_mime_signature_list_length -g_mime_signature_list_new -g_mime_signature_list_remove -g_mime_signature_list_remove_at -g_mime_signature_list_set_signature -g_mime_signature_new -g_mime_signature_set_certificate -g_mime_signature_set_created -g_mime_signature_set_expires -g_mime_signature_set_status -g_mime_stream_buffer_get_type -g_mime_stream_buffer_gets -g_mime_stream_buffer_new -g_mime_stream_buffer_readln -g_mime_stream_cat_add_source -g_mime_stream_cat_get_type -g_mime_stream_cat_new -g_mime_stream_close -g_mime_stream_construct -g_mime_stream_eos -g_mime_stream_file_get_owner -g_mime_stream_file_get_type -g_mime_stream_file_new -g_mime_stream_file_new_with_bounds -g_mime_stream_file_open -g_mime_stream_file_set_owner -g_mime_stream_filter_add -g_mime_stream_filter_get_owner -g_mime_stream_filter_get_type -g_mime_stream_filter_new -g_mime_stream_filter_remove -g_mime_stream_filter_set_owner -g_mime_stream_flush -g_mime_stream_fs_get_owner -g_mime_stream_fs_get_type -g_mime_stream_fs_new -g_mime_stream_fs_new_with_bounds -g_mime_stream_fs_open -g_mime_stream_fs_set_owner -g_mime_stream_get_type -g_mime_stream_gio_get_owner -g_mime_stream_gio_get_type -g_mime_stream_gio_new -g_mime_stream_gio_new_with_bounds -g_mime_stream_gio_set_owner -g_mime_stream_length -g_mime_stream_mem_get_byte_array -g_mime_stream_mem_get_owner -g_mime_stream_mem_get_type -g_mime_stream_mem_new -g_mime_stream_mem_new_with_buffer -g_mime_stream_mem_new_with_byte_array -g_mime_stream_mem_set_byte_array -g_mime_stream_mem_set_owner -g_mime_stream_mmap_get_owner -g_mime_stream_mmap_get_type -g_mime_stream_mmap_new -g_mime_stream_mmap_new_with_bounds -g_mime_stream_mmap_set_owner -g_mime_stream_null_set_count_newlines -g_mime_stream_null_get_count_newlines -g_mime_stream_null_get_type -g_mime_stream_null_new -g_mime_stream_pipe_get_owner -g_mime_stream_pipe_get_type -g_mime_stream_pipe_new -g_mime_stream_pipe_set_owner -g_mime_stream_printf -g_mime_stream_read -g_mime_stream_reset -g_mime_stream_seek -g_mime_stream_set_bounds -g_mime_stream_substream -g_mime_stream_tell -g_mime_stream_write -g_mime_stream_write_string -g_mime_stream_write_to_stream -g_mime_stream_writev -g_mime_text_part_get_charset -g_mime_text_part_get_text -g_mime_text_part_get_type -g_mime_text_part_new -g_mime_text_part_new_with_subtype -g_mime_text_part_set_charset -g_mime_text_part_set_text -g_mime_utils_best_encoding -g_mime_utils_decode_8bit -g_mime_utils_decode_message_id -g_mime_utils_generate_message_id -g_mime_utils_header_decode_date -g_mime_utils_header_decode_phrase -g_mime_utils_header_decode_text -g_mime_utils_header_encode_phrase -g_mime_utils_header_encode_text -g_mime_utils_header_format_date -g_mime_utils_header_printf -g_mime_utils_header_unfold -g_mime_utils_quote_string -g_mime_utils_structured_header_fold -g_mime_utils_text_is_8bit -g_mime_utils_unquote_string -g_mime_utils_unstructured_header_fold -g_mime_ydecode_step -g_mime_yencode_close -g_mime_yencode_step -gmime_binary_age -gmime_error_quark -gmime_gpgme_error_quark -gmime_interface_age -gmime_major_version -gmime_micro_version -gmime_minor_version -internet_address_get_charset -internet_address_get_name -internet_address_get_type -internet_address_group_add_member -internet_address_group_get_members -internet_address_group_get_type -internet_address_group_new -internet_address_group_set_members -internet_address_list_add -internet_address_list_append -internet_address_list_clear -internet_address_list_contains -internet_address_list_encode -internet_address_list_get_address -internet_address_list_get_type -internet_address_list_index_of -internet_address_list_insert -internet_address_list_length -internet_address_list_new -internet_address_list_parse -internet_address_list_prepend -internet_address_list_remove -internet_address_list_remove_at -internet_address_list_set_address -internet_address_list_to_string -internet_address_mailbox_get_addr -internet_address_mailbox_get_idn_addr -internet_address_mailbox_get_type -internet_address_mailbox_new -internet_address_mailbox_set_addr -internet_address_set_charset -internet_address_set_name -internet_address_to_string -g_mime_autocrypt_header_new -g_mime_autocrypt_header_new_from_string -g_mime_autocrypt_header_get_address -g_mime_autocrypt_header_set_address -g_mime_autocrypt_header_set_address_from_string -g_mime_autocrypt_header_get_address_as_string -g_mime_autocrypt_header_get_prefer_encrypt -g_mime_autocrypt_header_set_prefer_encrypt -g_mime_autocrypt_header_get_keydata -g_mime_autocrypt_header_set_keydata -g_mime_autocrypt_header_get_effective_date -g_mime_autocrypt_header_set_effective_date -g_mime_autocrypt_header_is_complete -g_mime_autocrypt_header_to_string -g_mime_autocrypt_header_compare -g_mime_autocrypt_header_clone -g_mime_autocrypt_header_list_new -g_mime_autocrypt_header_list_add_missing_addresses -g_mime_autocrypt_header_list_add -g_mime_autocrypt_header_list_get_count -g_mime_autocrypt_header_list_get_header_at -g_mime_autocrypt_header_list_get_header_for_address -g_mime_autocrypt_header_list_remove_incomplete -g_mime_autocrypt_header_get_type -g_mime_autocrypt_header_list_get_type diff --git a/ports/gmime/portfile.cmake b/ports/gmime/portfile.cmake index 29dcd68b0af330..d1e145a8381afa 100644 --- a/ports/gmime/portfile.cmake +++ b/ports/gmime/portfile.cmake @@ -1,14 +1,12 @@ -include(vcpkg_common_functions) - set(LIB_NAME gmime) -set(LIB_VERSION 3.2.3) +set(LIB_VERSION 3.2.6) set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.xz) vcpkg_download_distfile(ARCHIVE URLS "https://download.gnome.org/sources/gmime/3.2/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" - SHA512 abaf9059baf0c045d5b62757953ee2fa0779462eb32142bb41be40c376fc7ac2b3e4a56fd66177fbbe1dca35c6168a251542b14a844125c2cfcc9a99888179b4 + SHA512 a60d3f9f1aa8490865c22cd9539544e9c9f3ceb4037b9749cf9e5c279f97aa88fc4cd077bf2aff314ba0db2a1b7bbe76f9b1ca5a17fffcbd6315ecebc5414a3d ) vcpkg_extract_source_archive_ex( @@ -20,14 +18,15 @@ vcpkg_extract_source_archive_ex( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) # We can use file supplied with original sources -configure_file(${SOURCE_PATH}/build/vs2010/unistd.h ${SOURCE_PATH} COPYONLY) - -configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH}) -configure_file(${CMAKE_CURRENT_LIST_DIR}/gmime.def ${SOURCE_PATH} COPYONLY) - +configure_file(${SOURCE_PATH}/build/vs2017/unistd.h ${SOURCE_PATH} COPYONLY) +configure_file(${SOURCE_PATH}/build/vs2017/config.h ${SOURCE_PATH} COPYONLY) +configure_file(${SOURCE_PATH}/build/vs2017/gmime.def ${SOURCE_PATH} COPYONLY) +vcpkg_find_acquire_program(PKGCONFIG) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DPKG_CONFIG_EXECUTABLE=${PKGCONFIG} ) vcpkg_install_cmake() diff --git a/ports/gmime/vcpkg.json b/ports/gmime/vcpkg.json new file mode 100644 index 00000000000000..356f24e44e7277 --- /dev/null +++ b/ports/gmime/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "gmime", + "version": "3.2.6", + "port-version": 2, + "description": "GMime is a C/C++ library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME).", + "homepage": "https://developer.gnome.org/gmime/", + "supports": "windows", + "dependencies": [ + "glib", + "libiconv", + "libidn2", + "zlib" + ] +} diff --git a/ports/gmmlib/CONTROL b/ports/gmmlib/CONTROL deleted file mode 100644 index ae6f760a980c5e..00000000000000 --- a/ports/gmmlib/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: gmmlib -Version: 19.1.2 -Description: intel's graphics memory management library diff --git a/ports/gmmlib/portfile.cmake b/ports/gmmlib/portfile.cmake index d3bf8dbec18b02..b09ba8c84c4307 100644 --- a/ports/gmmlib/portfile.cmake +++ b/ports/gmmlib/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "Intel gmmlib currently only supports Linux platforms") endif() @@ -9,8 +7,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO intel/gmmlib - REF intel-gmmlib-19.1.2 - SHA512 fcc0beedfc3716b6204627f7daa5e0a5aec720b2a29ab2f8262b613a11d31bfe14dc8476513515d8470cf7d66f58d109ed4d5cf203e041228f53a64cb4a6c243 + REF f6c91364b0911a7513e9543fd874360ec8901742 # intel-gmmlib-20.3.1 + SHA512 c46d5cba30db1d06134d2606ad9806a84b0e1248313a61c5d073fc5fe7570b864a4d5e9cf73dc6832102ace476839dbff1e3782f08a4cdcb62c04c40708a5710 HEAD_REF master ) diff --git a/ports/gmmlib/vcpkg.json b/ports/gmmlib/vcpkg.json new file mode 100644 index 00000000000000..613b45e830a184 --- /dev/null +++ b/ports/gmmlib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "gmmlib", + "version-string": "20.3.1", + "port-version": 1, + "description": "intel's graphics memory management library", + "supports": "linux" +} diff --git a/ports/gmp/adddef.patch b/ports/gmp/adddef.patch new file mode 100644 index 00000000000000..c2276ffc10b2d6 --- /dev/null +++ b/ports/gmp/adddef.patch @@ -0,0 +1,12 @@ +diff --git a/SMP/libgmp.def b/SMP/libgmp.def +index 289f0e2d1..632274ab2 100644 +--- a/SMP/libgmp.def ++++ b/SMP/libgmp.def +@@ -16,6 +16,7 @@ __gmp_randclear + __gmp_urandomb_ui + __gmp_urandomm_ui + __gmp_asprintf ++__gmp_vasprintf + __gmp_fprintf + __gmp_printf + __gmp_snprintf diff --git a/ports/gmp/portfile.cmake b/ports/gmp/portfile.cmake new file mode 100644 index 00000000000000..5356098f429d1f --- /dev/null +++ b/ports/gmp/portfile.cmake @@ -0,0 +1,116 @@ +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/gmp.h" OR "${CURRENT_INSTALLED_DIR}/include/gmpxx.h") + message(FATAL_ERROR "Can't build ${PORT} if mpir is installed. Please remove mpir, and try install ${PORT} again if you need it.") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/gmp + REF 0018c44e8dfcc3b64b43e0aea4b3f419f0b65fd0 #v6.2.1-2 + SHA512 2405e2536ca9fe0b890f44f54c936ac0e4b5a9ebe6a19e1c48a9c21b7211d2a1b45865852e3c65a98a6735216a4e27bea75c0fd6e52efeed4baecd95da9895a5 + HEAD_REF master + PATCHES + vs.build.patch + runtime.patch + adddef.patch + ) + + yasm_tool_helper(OUT_VAR YASM) + file(TO_NATIVE_PATH "${YASM}" YASM) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CONFIGURATION_RELEASE ReleaseDLL) + set(CONFIGURATION_DEBUG DebugDLL) + else() + set(CONFIGURATION_RELEASE Release) + set(CONFIGURATION_DEBUG Debug) + endif() + + if(VCPKG_TARGET_IS_UWP) + string(APPEND CONFIGURATION_RELEASE WinRT) + string(APPEND CONFIGURATION_DEBUG WinRT) + endif() + + #Setup YASM integration + set(_porjectfile) + if(VCPKG_TARGET_IS_UWP) + set(_porjectfile "${SOURCE_PATH}/SMP/libgmp_winrt.vcxproj") + else() + set(_porjectfile "${SOURCE_PATH}/SMP/libgmp.vcxproj") + endif() + set(_file "${_porjectfile}") + file(READ "${_file}" _contents) + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REPLACE [[]] + "" + _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") + + vcpkg_install_msbuild( + USE_VCPKG_INTEGRATION + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH SMP/libgmp.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} + LICENSE_SUBPATH COPYING.LESSERv3 + TARGET Rebuild + RELEASE_CONFIGURATION ${CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${CONFIGURATION_DEBUG} + SKIP_CLEAN + OPTIONS "/p:YasmPath=${YASM}" + ) + get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME) + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}/msvc/include" "${CURRENT_PACKAGES_DIR}/include") + set(PACKAGE_VERSION 6.2.1) + set(PACKAGE_NAME gmp) + set(prefix "${CURRENT_INSTALLED_DIR}") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/include") + set(LIBS -lgmp) + configure_file("${SOURCE_PATH}/gmp.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gmp.pc" @ONLY) + configure_file("${SOURCE_PATH}/gmpxx.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gmpxx.pc" @ONLY) + set(prefix "${CURRENT_INSTALLED_DIR}/debug") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/../include") + set(LIBS -lgmpd) + configure_file("${SOURCE_PATH}/gmp.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gmp.pc" @ONLY) + configure_file("${SOURCE_PATH}/gmpxx.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gmpxx.pc" @ONLY) + vcpkg_fixup_pkgconfig() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gmp.h" + "#if defined(DLL_EXPORT) && defined(NO_ASM)" + "#if 1") + endif() +else() + vcpkg_download_distfile( + ARCHIVE + URLS https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz + FILENAME gmp-6.2.1.tar.xz + SHA512 c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84 + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF gmp-6.2.1 + PATCHES + tools.patch + ) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS ${OPTIONS} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + # # Handle copyright + file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endif() diff --git a/ports/gmp/runtime.patch b/ports/gmp/runtime.patch new file mode 100644 index 00000000000000..f219e3dc740043 --- /dev/null +++ b/ports/gmp/runtime.patch @@ -0,0 +1,180 @@ +diff --git a/SMP/smp.props b/SMP/smp.props +index fc70bd8..d515523 100644 +--- a/SMP/smp.props ++++ b/SMP/smp.props +@@ -86,7 +86,7 @@ + + + +- lib$(RootNamespace)d ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -94,7 +94,7 @@ + MSB8012 + + +- lib$(RootNamespace)d ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -118,7 +118,7 @@ + MSB8012 + + +- lib$(RootNamespace) ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -126,7 +126,7 @@ + MSB8012 + + +- lib$(RootNamespace) ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -159,6 +159,7 @@ + $(OutDir)\lib\x86\$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebug + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -177,6 +178,7 @@ + $(OutDir)\lib\x64\$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -196,6 +198,7 @@ + $(IntDir)$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x86\$(TargetName)$(TargetExt) +@@ -219,6 +222,7 @@ + $(IntDir)$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -248,6 +252,7 @@ + SingleFile + $(OutDir)\lib\x86\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreaded + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -273,6 +278,7 @@ + SingleFile + $(OutDir)\lib\x64\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -297,6 +303,7 @@ + $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true +@@ -328,6 +335,7 @@ + $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true +diff --git a/SMP/smp_winrt.props b/SMP/smp_winrt.props +index cb5f090..19b2b8d 100644 +--- a/SMP/smp_winrt.props ++++ b/SMP/smp_winrt.props +@@ -97,7 +97,7 @@ + + + +- lib$(RootNamespace)d_winrt ++ l$(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -105,7 +105,7 @@ + MSB8012 + + +- lib$(RootNamespace)d_winrt ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -113,7 +113,7 @@ + MSB8012 + + +- $(RootNamespace)d_winrt ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -121,7 +121,7 @@ + MSB8012 + + +- $(RootNamespace)d_winrt ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -129,7 +129,7 @@ + MSB8012 + + +- lib$(RootNamespace)_winrt ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -137,7 +137,7 @@ + MSB8012 + + +- lib$(RootNamespace)_winrt ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -145,7 +145,7 @@ + MSB8012 + + +- $(RootNamespace)_winrt ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -153,7 +153,7 @@ + MSB8012 + + +- $(RootNamespace)_winrt ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated diff --git a/ports/gmp/tools.patch b/ports/gmp/tools.patch new file mode 100644 index 00000000000000..193f3835b80990 --- /dev/null +++ b/ports/gmp/tools.patch @@ -0,0 +1,58 @@ +diff --git a/Makefile.am b/Makefile.am +index 1c24694..656aa3a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -349,7 +349,7 @@ fac_table.h: gen-fac$(EXEEXT_FOR_BUILD) + BUILT_SOURCES += fac_table.h + + gen-fac$(EXEEXT_FOR_BUILD): gen-fac$(U_FOR_BUILD).c bootstrap.c +- $(CC_FOR_BUILD) `test -f 'gen-fac$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fac$(U_FOR_BUILD).c -o gen-fac$(EXEEXT_FOR_BUILD) ++ $(CC_FOR_BUILD) `test -f 'gen-fac$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fac$(U_FOR_BUILD).c $(CFLAGS) -o gen-fac$(EXEEXT_FOR_BUILD) + DISTCLEANFILES += gen-fac$(EXEEXT_FOR_BUILD) + EXTRA_DIST += gen-fac.c + +@@ -363,7 +363,7 @@ mpn/fib_table.c: gen-fib$(EXEEXT_FOR_BUILD) + BUILT_SOURCES += mpn/fib_table.c + + gen-fib$(EXEEXT_FOR_BUILD): gen-fib$(U_FOR_BUILD).c bootstrap.c +- $(CC_FOR_BUILD) `test -f 'gen-fib$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fib$(U_FOR_BUILD).c -o gen-fib$(EXEEXT_FOR_BUILD) ++ $(CC_FOR_BUILD) `test -f 'gen-fib$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fib$(U_FOR_BUILD).c $(CFLAGS) -o gen-fib$(EXEEXT_FOR_BUILD) + DISTCLEANFILES += gen-fib$(EXEEXT_FOR_BUILD) + EXTRA_DIST += gen-fib.c + +@@ -377,7 +377,7 @@ mpn/mp_bases.c: gen-bases$(EXEEXT_FOR_BUILD) + BUILT_SOURCES += mpn/mp_bases.c + + gen-bases$(EXEEXT_FOR_BUILD): gen-bases$(U_FOR_BUILD).c bootstrap.c +- $(CC_FOR_BUILD) `test -f 'gen-bases$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-bases$(U_FOR_BUILD).c -o gen-bases$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) ++ $(CC_FOR_BUILD) `test -f 'gen-bases$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-bases$(U_FOR_BUILD).c $(CFLAGS) -o gen-bases$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) + DISTCLEANFILES += gen-bases$(EXEEXT_FOR_BUILD) + EXTRA_DIST += gen-bases.c + +@@ -387,7 +387,7 @@ trialdivtab.h: gen-trialdivtab$(EXEEXT_FOR_BUILD) + BUILT_SOURCES += trialdivtab.h + + gen-trialdivtab$(EXEEXT_FOR_BUILD): gen-trialdivtab$(U_FOR_BUILD).c bootstrap.c +- $(CC_FOR_BUILD) `test -f 'gen-trialdivtab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-trialdivtab$(U_FOR_BUILD).c -o gen-trialdivtab$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) ++ $(CC_FOR_BUILD) `test -f 'gen-trialdivtab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-trialdivtab$(U_FOR_BUILD).c $(CFLAGS) -o gen-trialdivtab$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) + DISTCLEANFILES += gen-trialdivtab$(EXEEXT_FOR_BUILD) + EXTRA_DIST += gen-trialdivtab.c + +@@ -397,7 +397,7 @@ mpn/jacobitab.h: gen-jacobitab$(EXEEXT_FOR_BUILD) + BUILT_SOURCES += mpn/jacobitab.h + + gen-jacobitab$(EXEEXT_FOR_BUILD): gen-jacobitab$(U_FOR_BUILD).c +- $(CC_FOR_BUILD) `test -f 'gen-jacobitab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-jacobitab$(U_FOR_BUILD).c -o gen-jacobitab$(EXEEXT_FOR_BUILD) ++ $(CC_FOR_BUILD) `test -f 'gen-jacobitab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-jacobitab$(U_FOR_BUILD).c $(CFLAGS) -o gen-jacobitab$(EXEEXT_FOR_BUILD) + DISTCLEANFILES += gen-jacobitab$(EXEEXT_FOR_BUILD) + EXTRA_DIST += gen-jacobitab.c + +@@ -407,7 +407,7 @@ mpn/perfsqr.h: gen-psqr$(EXEEXT_FOR_BUILD) + BUILT_SOURCES += mpn/perfsqr.h + + gen-psqr$(EXEEXT_FOR_BUILD): gen-psqr$(U_FOR_BUILD).c bootstrap.c +- $(CC_FOR_BUILD) `test -f 'gen-psqr$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-psqr$(U_FOR_BUILD).c -o gen-psqr$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) ++ $(CC_FOR_BUILD) `test -f 'gen-psqr$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-psqr$(U_FOR_BUILD).c $(CFLAGS) -o gen-psqr$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) + DISTCLEANFILES += gen-psqr$(EXEEXT_FOR_BUILD) + EXTRA_DIST += gen-psqr.c + diff --git a/ports/gmp/vcpkg.json b/ports/gmp/vcpkg.json new file mode 100644 index 00000000000000..3f9b609b33b19b --- /dev/null +++ b/ports/gmp/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "gmp", + "version-string": "6.2.1", + "port-version": 6, + "description": "The GNU Multiple Precision Arithmetic Library", + "homepage": "https://gmplib.org", + "supports": "!(windows & (arm | arm64))", + "dependencies": [ + { + "name": "vs-yasm", + "host": true, + "platform": "windows" + }, + { + "name": "yasm-tool", + "host": true, + "platform": "windows" + } + ] +} diff --git a/ports/gmp/vs.build.patch b/ports/gmp/vs.build.patch new file mode 100644 index 00000000000000..4c04d0c1659645 --- /dev/null +++ b/ports/gmp/vs.build.patch @@ -0,0 +1,172 @@ +diff --git a/SMP/smp.props b/SMP/smp.props +index e2ed214..fc70bd8 100644 +--- a/SMP/smp.props ++++ b/SMP/smp.props +@@ -87,7 +87,7 @@ + + + lib$(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -95,7 +95,7 @@ + + + lib$(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -103,7 +103,7 @@ + + + $(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -111,7 +111,7 @@ + + + $(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -119,7 +119,7 @@ + + + lib$(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -127,7 +127,7 @@ + + + lib$(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -135,7 +135,7 @@ + + + $(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -143,7 +143,7 @@ + + + $(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +diff --git a/SMP/smp_winrt.props b/SMP/smp_winrt.props +index 9b453a5..cb5f090 100644 +--- a/SMP/smp_winrt.props ++++ b/SMP/smp_winrt.props +@@ -98,7 +98,7 @@ + + + lib$(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -106,7 +106,7 @@ + + + lib$(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -114,7 +114,7 @@ + + + $(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -122,7 +122,7 @@ + + + $(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -130,7 +130,7 @@ + + + lib$(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -138,7 +138,7 @@ + + + lib$(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -146,7 +146,7 @@ + + + $(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -154,7 +154,7 @@ + + + $(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +diff --git a/gmp.pc.in b/gmp.pc.in +index bf1c799..d0c81be 100644 +--- a/gmp.pc.in ++++ b/gmp.pc.in +@@ -8,4 +8,4 @@ Description: GNU Multiple Precision Arithmetic Library + URL: https://gmplib.org + Version: @PACKAGE_VERSION@ + Cflags: -I${includedir} +-Libs: -L${libdir} -lgmp ++Libs: -L${libdir} @LIBS@ +diff --git a/gmpxx.pc.in b/gmpxx.pc.in +index 181cc70..2b697ce 100644 +--- a/gmpxx.pc.in ++++ b/gmpxx.pc.in +@@ -9,4 +9,4 @@ URL: https://gmplib.org + Version: @PACKAGE_VERSION@ + Requires: gmp + Cflags: -I${includedir} +-Libs: -L${libdir} -lgmpxx ++Libs: -L${libdir} @LIBS@ diff --git a/ports/google-cloud-cpp-common/portfile.cmake b/ports/google-cloud-cpp-common/portfile.cmake new file mode 100644 index 00000000000000..065116c276adcf --- /dev/null +++ b/ports/google-cloud-cpp-common/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/google-cloud-cpp-common/vcpkg.json b/ports/google-cloud-cpp-common/vcpkg.json new file mode 100644 index 00000000000000..12377d6c8166ae --- /dev/null +++ b/ports/google-cloud-cpp-common/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "google-cloud-cpp-common", + "version-string": "alias", + "port-version": 1, + "description": "Deprecated, use google-cloud-cpp instead", + "dependencies": [ + "google-cloud-cpp" + ] +} diff --git a/ports/google-cloud-cpp-spanner/portfile.cmake b/ports/google-cloud-cpp-spanner/portfile.cmake new file mode 100644 index 00000000000000..065116c276adcf --- /dev/null +++ b/ports/google-cloud-cpp-spanner/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/google-cloud-cpp-spanner/vcpkg.json b/ports/google-cloud-cpp-spanner/vcpkg.json new file mode 100644 index 00000000000000..87f8b18c587f6f --- /dev/null +++ b/ports/google-cloud-cpp-spanner/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "google-cloud-cpp-spanner", + "version-string": "alias", + "port-version": 1, + "description": "Deprecated, use google-cloud-cpp instead", + "dependencies": [ + "google-cloud-cpp" + ] +} diff --git a/ports/google-cloud-cpp/CONTROL b/ports/google-cloud-cpp/CONTROL deleted file mode 100644 index a844f9749bdf27..00000000000000 --- a/ports/google-cloud-cpp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: google-cloud-cpp -Version: 0.12.0 -Build-Depends: grpc, curl[ssl], crc32c, googleapis -Description: C++ Client Libraries for Google Cloud Platform APIs. -Homepage: https://github.com/googleapis/google-cloud-cpp diff --git a/ports/google-cloud-cpp/portfile.cmake b/ports/google-cloud-cpp/portfile.cmake index e9ffdd0146e55a..22a0829e5757d3 100644 --- a/ports/google-cloud-cpp/portfile.cmake +++ b/ports/google-cloud-cpp/portfile.cmake @@ -1,31 +1,40 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO googleapis/google-cloud-cpp - REF v0.12.0 - SHA512 14d83e099b9d425475b963b6b4fe11c1881988afc90d87a63b2a0d17cd18f3000f725fa230b6b7487e14e383e7f3c5803122dbadd9dacdeeadc541b55074a805 + REF v1.31.1 + SHA512 c172280cc934978505524d53bc804dc9079af21a1357f347b0bd3554d25cc2d57dec3869f1ba01f9eacaa1367feede84ae158fa3e9039b0e6bb87f7c27717bb1 HEAD_REF master ) +vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/grpc") + +set(GOOGLE_CLOUD_CPP_ENABLE "${FEATURES}") +list(REMOVE_ITEM GOOGLE_CLOUD_CPP_ENABLE "core") +list(REMOVE_ITEM GOOGLE_CLOUD_CPP_ENABLE "googleapis") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA DISABLE_PARALLEL_CONFIGURE OPTIONS - -DGOOGLE_CLOUD_CPP_DEPENDENCY_PROVIDER=package + "-DGOOGLE_CLOUD_CPP_ENABLE=${GOOGLE_CLOUD_CPP_ENABLE}" -DGOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK=OFF - -DBUILD_TESTING=OFF + -DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF + -DGOOGLE_CLOUD_CPP_ENABLE_CCACHE=OFF + -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF + -DBUILD_TESTING=OFF ) -vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/google-cloud-cpp RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/google-cloud-cpp/vcpkg.json b/ports/google-cloud-cpp/vcpkg.json new file mode 100644 index 00000000000000..430fc44f41c761 --- /dev/null +++ b/ports/google-cloud-cpp/vcpkg.json @@ -0,0 +1,134 @@ +{ + "name": "google-cloud-cpp", + "version": "1.31.1", + "description": "C++ Client Libraries for Google Cloud Platform APIs.", + "homepage": "https://github.com/googleapis/google-cloud-cpp", + "license": "Apache-2.0", + "supports": "!uwp", + "dependencies": [ + "abseil" + ], + "default-features": [ + "bigquery", + "bigtable", + "iam", + "pubsub", + "spanner", + "storage" + ], + "features": { + "bigquery": { + "description": "The Google Cloud BigQuery C++ client library", + "dependencies": [ + "grpc", + { + "name": "grpc", + "host": true + }, + "protobuf", + { + "name": "protobuf", + "host": true + } + ] + }, + "bigtable": { + "description": "The Google Cloud Bigtable C++ client library", + "dependencies": [ + "grpc", + { + "name": "grpc", + "host": true + }, + "protobuf", + { + "name": "protobuf", + "host": true + } + ] + }, + "experimental-storage-grpc": { + "description": "The GCS+gRPC plugin", + "dependencies": [ + { + "name": "google-cloud-cpp", + "default-features": false, + "features": [ + "storage" + ] + }, + "grpc", + { + "name": "grpc", + "host": true + }, + "protobuf", + { + "name": "protobuf", + "host": true + } + ] + }, + "firestore": { + "description": "Community contributions to interact with Firestore" + }, + "iam": { + "description": "The Google Cloud IAM C++ client library", + "dependencies": [ + "grpc", + { + "name": "grpc", + "host": true + }, + "protobuf", + { + "name": "protobuf", + "host": true + } + ] + }, + "pubsub": { + "description": "The Google Cloud Bigtable C++ client library", + "dependencies": [ + "grpc", + { + "name": "grpc", + "host": true + }, + "protobuf", + { + "name": "protobuf", + "host": true + } + ] + }, + "spanner": { + "description": "The Google Cloud Spanner C++ client library", + "dependencies": [ + "grpc", + { + "name": "grpc", + "host": true + }, + "protobuf", + { + "name": "protobuf", + "host": true + } + ] + }, + "storage": { + "description": "The Google Cloud Storage C++ client library", + "dependencies": [ + "crc32c", + { + "name": "curl", + "features": [ + "ssl" + ] + }, + "nlohmann-json" + ] + } + } +} diff --git a/ports/googleapis/CONTROL b/ports/googleapis/CONTROL deleted file mode 100644 index 194cd39f52d994..00000000000000 --- a/ports/googleapis/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: googleapis -Version: 0.1.3 -Build-Depends: grpc, protobuf -Description: C++ Proto Libraries for Google APIs. -Homepage: https://github.com/googleapis/cpp-cmakefiles diff --git a/ports/googleapis/portfile.cmake b/ports/googleapis/portfile.cmake index 969ec95fb9d685..065116c276adcf 100644 --- a/ports/googleapis/portfile.cmake +++ b/ports/googleapis/portfile.cmake @@ -1,32 +1 @@ -include(vcpkg_common_functions) - -if (VCPKG_TARGET_IS_UWP) - message(FATAL_ERROR "Package `googleapis` doesn't support UWP") -endif() - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO googleapis/cpp-cmakefiles - REF v0.1.3 - SHA512 5c6be5af731d97dcf754b1f643c35a1c806e6b976a3dd027dd80ee15f86c6d70f772dcecbf2da5597a4e8d8d9639813c2d2f66dd7112b8039c14c3a49ec6c4db - HEAD_REF master -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake(ADD_BIN_TO_PATH) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/googleapis RENAME copyright) - -vcpkg_copy_pdbs() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/googleapis/vcpkg.json b/ports/googleapis/vcpkg.json new file mode 100644 index 00000000000000..37755f8dbe5cf9 --- /dev/null +++ b/ports/googleapis/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "googleapis", + "version-string": "alias", + "port-version": 1, + "description": "Deprecated, use google-cloud-cpp instead.", + "dependencies": [ + "google-cloud-cpp" + ] +} diff --git a/ports/gperf/CMakeLists.txt b/ports/gperf/CMakeLists.txt new file mode 100644 index 00000000000000..d9cad0d8955a1c --- /dev/null +++ b/ports/gperf/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.0) +project(gperf LANGUAGES C CXX) + +include(CheckCXXSourceCompiles) +include(GNUInstallDirs) + +CHECK_CXX_SOURCE_COMPILES("int main(int n) { int dynamic_array[n]; }" HAVE_DYNAMIC_ARRAY) + +set(LIBGP_SOURCES + lib/getline.cc + lib/getline.h + lib/getopt.c + lib/getopt.h + lib/getopt1.c + lib/hash.cc + lib/hash.h) +add_library(gp STATIC ${LIBGP_SOURCES}) +target_include_directories(gp PUBLIC "${CMAKE_SOURCE_DIR}/lib") + +set(GPERF_SOURCES + src/bool-array.cc + src/bool-array.h + src/bool-array.icc + src/hash-table.cc + src/hash-table.h + src/input.cc + src/input.h + src/keyword-list.cc + src/keyword-list.h + src/keyword-list.icc + src/keyword.cc + src/keyword.h + src/keyword.icc + src/main.cc + src/options.cc + src/options.h + src/options.icc + src/output.cc + src/output.h + src/positions.cc + src/positions.h + src/positions.icc + src/search.cc + src/search.h + src/version.cc + src/version.h) +add_executable(gperf ${GPERF_SOURCES}) +target_link_libraries(gperf gp) +target_include_directories(gperf PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") + +configure_file(config.h.in config.h @ONLY) + +install(TARGETS gperf RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/ports/gperf/config.h.in b/ports/gperf/config.h.in new file mode 100644 index 00000000000000..f1f643d7bdf539 --- /dev/null +++ b/ports/gperf/config.h.in @@ -0,0 +1 @@ +#cmakedefine HAVE_DYNAMIC_ARRAY @HAVE_DYNAMIC_ARRAY@ diff --git a/ports/gperf/portfile.cmake b/ports/gperf/portfile.cmake new file mode 100644 index 00000000000000..8531426fca02a2 --- /dev/null +++ b/ports/gperf/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +vcpkg_download_distfile(ARCHIVE + URLS http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz + FILENAME gperf-3.1.tar.gz + SHA512 855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_RELEASE -DCMAKE_INSTALL_BINDIR=tools +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() diff --git a/ports/gperf/vcpkg.json b/ports/gperf/vcpkg.json new file mode 100644 index 00000000000000..248f4da4c3f794 --- /dev/null +++ b/ports/gperf/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "gperf", + "version-string": "3.1", + "port-version": 2, + "description": "GNU perfect hash function generator", + "homepage": "https://www.gnu.org/software/gperf/" +} diff --git a/ports/gperftools/CMakeLists.txt b/ports/gperftools/CMakeLists.txt new file mode 100644 index 00000000000000..a4bf860af362df --- /dev/null +++ b/ports/gperftools/CMakeLists.txt @@ -0,0 +1,211 @@ +cmake_minimum_required(VERSION 3.5) + +project(gperftools LANGUAGES C CXX) + +include(GNUInstallDirs) + +option(GPERFTOOLS_BUILD_TOOLS "Build tools" ON) + +if(WIN32) # TODO: MINGW, MSYS + option(GPERFTOOLS_WIN32_OVERRIDE "Override allocators" OFF) +endif() + +set(deprecated_public_headers + src/google/heap-checker.h + src/google/heap-profiler.h + src/google/malloc_extension.h + src/google/malloc_extension_c.h + src/google/malloc_hook.h + src/google/malloc_hook_c.h + src/google/profiler.h + src/google/stacktrace.h +) + +set(gperftools_public_headers + src/gperftools/heap-checker.h + src/gperftools/heap-profiler.h + src/gperftools/malloc_extension.h + src/gperftools/malloc_extension_c.h + src/gperftools/malloc_hook.h + src/gperftools/malloc_hook_c.h + src/gperftools/nallocx.h + src/gperftools/profiler.h + src/gperftools/stacktrace.h +) + +if(WIN32) # TODO: MINGW, MSYS + list(APPEND deprecated_public_headers + src/windows/google/tcmalloc.h + ) + + list(APPEND gperftools_public_headers + src/windows/gperftools/tcmalloc.h + ) + + set(libtcmalloc_minimal_headers + src/addressmap-inl.h + src/base/arm_instruction_set_select.h + src/base/atomicops-internals-arm-generic.h + src/base/atomicops-internals-arm-v6plus.h + src/base/atomicops-internals-gcc.h + src/base/atomicops-internals-linuxppc.h + src/base/atomicops-internals-macosx.h + src/base/atomicops-internals-mips.h + src/base/atomicops-internals-windows.h + src/base/atomicops-internals-x86.h + src/base/atomicops.h + src/base/basictypes.h + src/base/commandlineflags.h + src/base/googleinit.h + src/base/logging.h + src/base/low_level_alloc.h + src/base/spinlock.h + src/base/spinlock_internal.h + src/base/spinlock_linux-inl.h + src/base/spinlock_posix-inl.h + src/base/spinlock_win32-inl.h + src/base/stl_allocator.h + src/base/sysinfo.h + src/base/thread_annotations.h + src/central_freelist.h + src/common.h + src/gperftools/heap-checker.h + src/gperftools/heap-profiler.h + src/gperftools/malloc_extension.h + src/gperftools/malloc_hook.h + src/gperftools/profiler.h + src/gperftools/stacktrace.h + src/heap-profile-table.h + src/internal_logging.h + src/malloc_hook-inl.h + src/memory_region_map.h + src/packed-cache-inl.h + src/pagemap.h + src/page_heap.h + src/page_heap_allocator.h + src/raw_printer.h + src/sampler.h + src/span.h + src/stacktrace_win32-inl.h + src/stack_trace_table.h + src/static_vars.h + src/symbolize.h + src/system-alloc.h + src/tcmalloc.h + src/thread_cache.h + src/windows/config.h + src/windows/mini_disassembler.h + src/windows/mini_disassembler_types.h + src/windows/port.h + src/windows/preamble_patcher.h + ) + + set(libtcmalloc_minimal_sources + src/base/dynamic_annotations.c + src/base/logging.cc + src/base/low_level_alloc.cc + src/base/spinlock.cc + src/base/spinlock_internal.cc + src/base/sysinfo.cc + src/central_freelist.cc + src/common.cc + src/fake_stacktrace_scope.cc + src/heap-profile-table.cc + src/internal_logging.cc + src/malloc_extension.cc + src/malloc_hook.cc + src/memory_region_map.cc + src/page_heap.cc + src/raw_printer.cc + src/sampler.cc + src/span.cc + src/stacktrace.cc + src/stack_trace_table.cc + src/static_vars.cc + src/symbolize.cc + src/thread_cache.cc + src/windows/ia32_modrm_map.cc + src/windows/ia32_opcode_map.cc + src/windows/mini_disassembler.cc + src/windows/port.cc + src/windows/preamble_patcher.cc + src/windows/preamble_patcher_with_stub.cc + src/windows/system-alloc.cc + ) + + if(GPERFTOOLS_WIN32_OVERRIDE) + list(APPEND libtcmalloc_minimal_sources src/windows/override_functions.cc) + else() + list(APPEND libtcmalloc_minimal_sources src/windows/patch_functions.cc) + endif() + + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + source_group("Header Files" FILES ${libtcmalloc_minimal_headers}) + source_group("Source Files" FILES ${libtcmalloc_minimal_sources}) + + if(GPERFTOOLS_WIN32_OVERRIDE) + add_library(libtcmalloc_minimal + STATIC + ${libtcmalloc_minimal_headers} + ${libtcmalloc_minimal_sources} + ) + else() + add_library(libtcmalloc_minimal + ${libtcmalloc_minimal_headers} + ${libtcmalloc_minimal_sources} + ) + endif() + + target_compile_definitions( + libtcmalloc_minimal + PRIVATE + $<$: + WIN32_OVERRIDE_ALLOCATORS + PERFTOOLS_DLL_DECL= + > + ) + + target_compile_options( + libtcmalloc_minimal + PRIVATE + $<$: + /wd4141 + /wd4251 + > + ) + + target_include_directories( + libtcmalloc_minimal + PUBLIC + $ + ) + + install(FILES ${deprecated_public_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/google + ) + + install(FILES ${gperftools_public_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gperftools + ) + + install(TARGETS libtcmalloc_minimal + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + + if(GPERFTOOLS_BUILD_TOOLS) + add_executable(addr2line-pdb src/windows/addr2line-pdb.c) + target_link_libraries(addr2line-pdb PRIVATE DbgHelp) + + add_executable(nm-pdb src/windows/nm-pdb.c) + target_link_libraries(nm-pdb PRIVATE DbgHelp) + + install(TARGETS addr2line-pdb nm-pdb DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() +else() +endif() diff --git a/ports/gperftools/portfile.cmake b/ports/gperftools/portfile.cmake new file mode 100644 index 00000000000000..01ee219ff6877c --- /dev/null +++ b/ports/gperftools/portfile.cmake @@ -0,0 +1,83 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gperftools/gperftools + REF fe62a0baab87ba3abca12f4a621532bf67c9a7d2 + SHA512 fc0fb2c56d38046ac7bc2d36863dabf073b7aede7ce18916228d7b9f64cf33ae754708bff028353ada52bf4b79a7cd3e3334c1558a9ba64b06326b1537faf690 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + if(override IN_LIST FEATURES) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "${PORT}[override] only supports static library linkage. Building static library.") + vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT) + endif() + endif() + + vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + override GPERFTOOLS_WIN32_OVERRIDE + tools GPERFTOOLS_BUILD_TOOLS + ) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + ${FEATURE_OPTIONS} + ) + + vcpkg_install_cmake() + + vcpkg_copy_pdbs() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(GLOB gperf_public_headers ${CURRENT_PACKAGES_DIR}/include/gperftools/*.h) + + foreach(gperf_header ${gperf_public_headers}) + vcpkg_replace_string(${gperf_header} "__declspec(dllimport)" "") + endforeach() + endif() + + if(tools IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES addr2line-pdb nm-pdb AUTO_CLEAN) + endif() +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_OPTS --enable-shared --disable-static) + else() + set(BUILD_OPTS --enable-static --disable-shared) + endif() + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + ${BUILD_OPTS} + ) + + vcpkg_install_make() + + if(tools IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES pprof pprof-symbolize AUTO_CLEAN) + endif() + + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ) + + # https://github.com/microsoft/vcpkg/pull/8750#issuecomment-625590773 + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + endif() +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gperftools/vcpkg.json b/ports/gperftools/vcpkg.json new file mode 100644 index 00000000000000..8d12a9b734f4b9 --- /dev/null +++ b/ports/gperftools/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "gperftools", + "version-string": "2019-09-02", + "port-version": 1, + "description": "A set of tools for performance profiling and memory checking", + "homepage": "https://github.com/gperftools/gperftools", + "supports": "!(arm | arm64 | uwp)", + "features": { + "override": { + "description": "Override allocators" + }, + "tools": { + "description": "Build gperftools CLI tools" + } + } +} diff --git a/ports/gpgme/disable-docs.patch b/ports/gpgme/disable-docs.patch new file mode 100644 index 00000000000000..b45ca6ec618122 --- /dev/null +++ b/ports/gpgme/disable-docs.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.am b/Makefile.am +index 1772d69..9bf9863 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -45,7 +45,7 @@ else + tests = + endif + +-SUBDIRS = src ${tests} doc lang ++SUBDIRS = src ${tests} lang + + # Fix the version of the spec file. + dist-hook: gen-ChangeLog diff --git a/ports/gpgme/disable-tests.patch b/ports/gpgme/disable-tests.patch new file mode 100644 index 00000000000000..c7158508f82eb9 --- /dev/null +++ b/ports/gpgme/disable-tests.patch @@ -0,0 +1,51 @@ +From b05747aea79083106b27ac7d829db3e65e192682 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Thu, 29 Oct 2020 13:23:56 -0400 +Subject: [PATCH] cpp,python: Respect --disable-gpg-test for tests + +* lang/cpp/Makefile.am: Respect --disable-gpg-test +* lang/python/Makefile.am: Respect --disable-gpg-test + +This is similar to the qt that had it already enabled +--- + lang/cpp/Makefile.am | 8 +++++++- + lang/python/Makefile.am | 8 +++++++- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/lang/cpp/Makefile.am b/lang/cpp/Makefile.am +index 724da6ca..70ca7462 100644 +--- a/lang/cpp/Makefile.am ++++ b/lang/cpp/Makefile.am +@@ -18,6 +18,12 @@ + # License along with this program; if not, see . + # SPDX-License-Identifier: LGPL-2.1-or-later + +-SUBDIRS = src tests ++if RUN_GPG_TESTS ++tests = tests ++else ++tests = ++endif ++ ++SUBDIRS = src ${tests} + + EXTRA_DIST = README +diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am +index 845b7b17..68b98e8e 100644 +--- a/lang/python/Makefile.am ++++ b/lang/python/Makefile.am +@@ -23,7 +23,13 @@ EXTRA_DIST = \ + gpgme.i \ + helpers.c helpers.h private.h + +-SUBDIRS = . tests examples doc src ++if RUN_GPG_TESTS ++tests = tests ++else ++tests = ++endif ++ ++SUBDIRS = . ${tests} examples doc src + + .PHONY: prepare + prepare: copystamp diff --git a/ports/gpgme/portfile.cmake b/ports/gpgme/portfile.cmake new file mode 100644 index 00000000000000..bf4c34bbbcd3a0 --- /dev/null +++ b/ports/gpgme/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports unix platform" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gpg/gpgme + REF gpgme-1.14.0 + SHA512 b4608fd1d9a4122d8886917274e323afc9a30494c13a3dea51e17e9779f925bf8d67e584434d6a13018f274a6cbcf0a5e36f2fea794a065906bbb556b765398e + HEAD_REF master + PATCHES + disable-tests.patch + disable-docs.patch +) + +list(REMOVE_ITEM FEATURES core) +string(REPLACE ";" "," LANGUAGES "${FEATURES}") + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --disable-gpgconf-test + --disable-gpg-test + --disable-gpgsm-test + --disable-g13-test + --enable-languages=${LANGUAGES} + --with-libgpg-error-prefix=${CURRENT_INSTALLED_DIR}/tools/libgpg-error + --with-libassuan-prefix=${CURRENT_INSTALLED_DIR}/tools/libassuan +) + +vcpkg_install_make() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Gpgmepp) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gpgme/vcpkg.json b/ports/gpgme/vcpkg.json new file mode 100644 index 00000000000000..1c36254c618f07 --- /dev/null +++ b/ports/gpgme/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "gpgme", + "version-string": "1.14.0", + "port-version": 1, + "description": "A library designed to make access to GnuPG easier for applications", + "homepage": "https://gnupg.org/software/gpgme/index.html", + "supports": "!windows", + "dependencies": [ + "libassuan", + "libgpg-error" + ], + "default-features": [ + "cpp" + ], + "features": { + "cpp": { + "description": "C++ bindings" + } + } +} diff --git a/ports/gppanel/00001-fix-build.patch b/ports/gppanel/00001-fix-build.patch new file mode 100644 index 00000000000000..bf394d63f79c48 --- /dev/null +++ b/ports/gppanel/00001-fix-build.patch @@ -0,0 +1,24 @@ +diff --git a/gpPanel/gpPanel.cpp b/gpPanel/gpPanel.cpp +index 7af20b5..908523c 100644 +--- a/gpPanel/gpPanel.cpp ++++ b/gpPanel/gpPanel.cpp +@@ -720,8 +720,8 @@ void gpPanel::OnMenuItemPrintPreview(wxCommandEvent& event) + gpLayer_s *gp = GetLayerByMenuId(event.GetId() ); + if(gp==NULL)return; + +- mpPrintout *plotPrint = new mpPrintout(gp->m_plot, gp->layer->GetName()); +- mpPrintout *plotPrintPreview = new mpPrintout(gp->m_plot, gp->layer->GetName()); ++ mpPrintout *plotPrint = new mpPrintout(gp->m_plot, gp->layer->GetName().c_str()); ++ mpPrintout *plotPrintPreview = new mpPrintout(gp->m_plot, gp->layer->GetName().c_str()); + + wxPrintPreview *preview = new wxPrintPreview(plotPrintPreview, plotPrint); + +@@ -765,7 +765,7 @@ void gpPanel::OnMenuItemSaveScreenshot(wxCommandEvent& event) + if(index!=-1) + { + wxString reso = aChoices.Item(index); +- if( reso.CompareTo(_("custom")) == 0 ){ ++ if( reso.CompareTo(_("custom").c_str()) == 0 ){ + reso = wxGetTextFromUser(_("Write image resolution (format: [width]x[height]"), _("Custom resolution for image"), _("640x480"), this); + } + if(reso.Find('x') != -1) diff --git a/ports/gppanel/CMakeLists.txt b/ports/gppanel/CMakeLists.txt new file mode 100644 index 00000000000000..e300f285409121 --- /dev/null +++ b/ports/gppanel/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.13) +project(gpPanel CXX) + +set(wxWidgets_EXCLUDE_COMMON_LIBRARIES TRUE) +find_package(wxWidgets REQUIRED COMPONENTS core base) +include(${wxWidgets_USE_FILE}) + +file(GLOB_RECURSE SOURCES "gpPanel/*.cpp") +file(GLOB HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/include" "include/*.h") + +add_library(gpPanel STATIC ${SOURCES}) +target_compile_definitions(gpPanel PRIVATE _CRT_SECURE_NO_WARNINGS) + +target_include_directories(gpPanel PUBLIC + $ + $ +) + +target_link_libraries(gpPanel PRIVATE ${wxWidgets_LIBRARIES}) + +install(TARGETS gpPanel EXPORT gpPanel-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(EXPORT gpPanel-config DESTINATION share/cmake/gpPanel) + +foreach(HEADER ${HEADERS}) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install(FILES include/${HEADER} DESTINATION include/gpPanel/${HEADER_DIR}) +endforeach() diff --git a/ports/gppanel/portfile.cmake b/ports/gppanel/portfile.cmake new file mode 100644 index 00000000000000..b05377133fc6b4 --- /dev/null +++ b/ports/gppanel/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO woollybah/gppanel + REF f58a9028f7c9a8e9b4324ff2165951f558365f90 + SHA512 4ec5fbef4c487d351c60f48b0c0e41c5d077989ab96f827b9fd5ef01c167d50f39a313bd82db1b5df19d14025983e83db4d19cc4048c1c50fc8ef9128de15575 + HEAD_REF master + PATCHES 00001-fix-build.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/gpPanel) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/gppanel/copyright COPYONLY) diff --git a/ports/gppanel/vcpkg.json b/ports/gppanel/vcpkg.json new file mode 100644 index 00000000000000..2493d41a8172b7 --- /dev/null +++ b/ports/gppanel/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "gppanel", + "version-date": "2020-05-20", + "port-version": 1, + "description": "gpPanel is chart library for wxWidget. It inheritance from wxPanel and use modified wxMathPlot library at chart engine.", + "homepage": "https://github.com/woollybah/gppanel", + "dependencies": [ + "wxwidgets" + ] +} diff --git a/ports/graphene/portfile.cmake b/ports/graphene/portfile.cmake new file mode 100644 index 00000000000000..8b50663679bb62 --- /dev/null +++ b/ports/graphene/portfile.cmake @@ -0,0 +1,35 @@ + +set(VERSION 1.10.2) + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.gnome.org/sources/graphene/1.10/graphene-${VERSION}.tar.xz" + FILENAME "graphene-${VERSION}.tar.xz" + SHA512 a8a8ef1e4ccffee2313a18b9b8dda06c7ede6d49fdde8578694500634e3c90278fd30af7d88938d5ecb08c519cc3e09d21fe69d0f21cb766e056ceedbb3eafb0 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Dgtk_doc=false #Enable generating the API reference (depends on GTK-Doc) + -Dgobject_types=true #Enable GObject types (depends on GObject) + -Dintrospection=false #Enable GObject Introspection (depends on GObject)' + -Dtests=false + -Dinstalled_tests=false + ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' +) + +vcpkg_install_meson() + +vcpkg_copy_pdbs() + +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/graphene/vcpkg.json b/ports/graphene/vcpkg.json new file mode 100644 index 00000000000000..8849b4d42d4ce9 --- /dev/null +++ b/ports/graphene/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "graphene", + "version": "1.10.2", + "port-version": 1, + "description": "A thin layer of types for graphic libraries.", + "homepage": "https://www.gtk.org/", + "supports": "!(arm & windows)", + "dependencies": [ + "gettext", + "glib", + { + "name": "glib", + "host": true + } + ] +} diff --git a/ports/graphicsmagick/CMakeLists.txt b/ports/graphicsmagick/CMakeLists.txt index cf375e96da7c7e..7e6be2992629fb 100644 --- a/ports/graphicsmagick/CMakeLists.txt +++ b/ports/graphicsmagick/CMakeLists.txt @@ -50,6 +50,7 @@ string(REPLACE "#undef HAVE_VSNPRINTF" "#define HAVE_VSNPRINTF" CONFIG_H "${CONF string(REPLACE "#undef MagickLibSubdir" "#define MagickLibSubdir \"magick\"" CONFIG_H "${CONFIG_H}") string(REPLACE "#undef MagickLibConfigSubDir" "#define MagickLibConfigSubDir \"magick/config\"" CONFIG_H "${CONFIG_H}") string(REPLACE "#undef MagickShareConfigSubDir" "#define MagickShareConfigSubDir \"magick/config\"" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef HAVE_STDINT_H" "#define HAVE_STDINT_H" CONFIG_H "${CONFIG_H}") endif () file(WRITE "magick/magick_config.h" "${CONFIG_H}") @@ -111,7 +112,7 @@ add_library(graphicsmagick coders/art.c coders/avs.c Magick++/lib/Pixels.cpp Magick++/lib/STL.cpp Magick++/lib/Thread.cpp Magick++/lib/TypeMetric.cpp wand/drawing_wand.c wand/magick_compat.c wand/magick_wand.c wand/pixel_wand.c - jbig/libjbig/jbig.c jbig/libjbig/jbig_tab.c) + jbig/libjbig/jbig.c jbig/libjbig/jbig_ar.c jbig/libjbig/jbig85.c) TARGET_LINK_LIBRARIES(graphicsmagick PRIVATE ZLIB::ZLIB @@ -248,7 +249,7 @@ if (INSTALL_HEADERS) install(FILES magick/widget.h DESTINATION include/magick) install(FILES magick/xwindow.h DESTINATION include/magick) - install(FILES Magick++/lib/Magick++.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++.h DESTINATION include) install(FILES Magick++/lib/Magick++/Blob.h DESTINATION include/Magick++) install(FILES Magick++/lib/Magick++/BlobRef.h DESTINATION include/Magick++) diff --git a/ports/graphicsmagick/CONTROL b/ports/graphicsmagick/CONTROL deleted file mode 100644 index 350ccd1785b482..00000000000000 --- a/ports/graphicsmagick/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: graphicsmagick -Maintainer: josuegomes@gmail.com -Version: 1.3.32-1 -Build-Depends: zlib, bzip2, freetype, libjpeg-turbo, libpng, tiff -Homepage: https://sourceforge.net/projects/graphicsmagick/ -Description: Image processing library diff --git a/ports/graphicsmagick/disable_graphicsmagick_modules.patch b/ports/graphicsmagick/disable_graphicsmagick_modules.patch index bfb91d0fdc7b72..3ef17410643069 100644 --- a/ports/graphicsmagick/disable_graphicsmagick_modules.patch +++ b/ports/graphicsmagick/disable_graphicsmagick_modules.patch @@ -1,11 +1,16 @@ ---- a/magick/studio.h 2018-06-23 14:13:49.191541000 -0400 -+++ b/magick/studio.h 2018-09-02 11:50:41.856753700 -0400 -@@ -414,7 +414,7 @@ - #endif +--- a/magick/studio.h 2019-12-24 13:18:50.000000000 -0200 ++++ b/magick/studio.h 2020-01-08 20:43:08.325889700 -0200 +@@ -470,10 +470,10 @@ + */ - #if defined(HasLTDL) || ( defined(MSWINDOWS) && defined(_DLL) ) + #if defined(HasLTDL) -# define SupportMagickModules +//# define SupportMagickModules + #elif !defined(__MINGW32__) && !defined(__MINGW64__) + # if defined(MSWINDOWS) && defined(_DLL) +-# define SupportMagickModules ++//# define SupportMagickModules + # endif #endif - #if defined(_MAGICKMOD_) + \ No newline at end of file diff --git a/ports/graphicsmagick/portfile.cmake b/ports/graphicsmagick/portfile.cmake index 1764b30e724ea8..11b1252dc6ee36 100644 --- a/ports/graphicsmagick/portfile.cmake +++ b/ports/graphicsmagick/portfile.cmake @@ -1,17 +1,11 @@ -include(vcpkg_common_functions) +set(GM_VERSION 1.3.36) -set(GM_VERSION 1.3.32) - -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/${GM_VERSION}/GraphicsMagick-${GM_VERSION}-windows-source.7z" - FILENAME "GraphicsMagick-${GM_VERSION}-windows-source.7z" - SHA512 1636f704bac65587d6526a10e7002a6158f951643a4e9eb936b0b734c1eb187155aa4d67febe897f9a2397ecadff736ba84cfe21704348e2d8481af01eff02f6 -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF "${GM_VERSION}" + REPO graphicsmagick/graphicsmagick + REF ${GM_VERSION} + FILENAME "GraphicsMagick-${GM_VERSION}-windows-source.7z" + SHA512 4976816acb9d348b83cc33c1ad2b0a3f9c4174c8983b3a3f867bcd6369984bea34b203a4e168f52f556c94288b9340db1357f614e8ff3a8802bef859378bdd31 PATCHES # GM always requires a dynamic BZIP2. This patch makes this dependent if _DLL is defined dynamic_bzip2.patch @@ -38,18 +32,16 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-graphicsmagick TARGET_PATH share/unofficial-graphicsmagick) # copy license -file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphicsmagick) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/copyright) +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) # copy config -file(COPY ${SOURCE_PATH}/config/colors.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/config) -file(COPY ${SOURCE_PATH}/config/log.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/config) -file(COPY ${SOURCE_PATH}/config/modules.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/config) +file(COPY ${SOURCE_PATH}/config/colors.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/config) +file(COPY ${SOURCE_PATH}/config/log.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/config) +file(COPY ${SOURCE_PATH}/config/modules.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/config) file(READ ${SOURCE_PATH}/config/type-windows.mgk.in TYPE_MGK) string(REPLACE "@windows_font_dir@" "$ENV{SYSTEMROOT}/Fonts/" TYPE_MGK "${TYPE_MGK}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/config/type.mgk "${TYPE_MGK}") +configure_file(${SOURCE_PATH}/config/delegates.mgk.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/config/delegates.mgk @ONLY) vcpkg_copy_pdbs() - -vcpkg_test_cmake(PACKAGE_NAME unofficial-graphicsmagick) diff --git a/ports/graphicsmagick/vcpkg.json b/ports/graphicsmagick/vcpkg.json new file mode 100644 index 00000000000000..7e8ef699e00f45 --- /dev/null +++ b/ports/graphicsmagick/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "graphicsmagick", + "version-string": "1.3.36", + "port-version": 1, + "description": "Image processing library", + "homepage": "https://sourceforge.net/projects/graphicsmagick/", + "dependencies": [ + "bzip2", + "freetype", + "libjpeg-turbo", + "libpng", + "tiff", + "zlib" + ] +} diff --git a/ports/graphite2/CONTROL b/ports/graphite2/CONTROL deleted file mode 100644 index faf867a9732e9d..00000000000000 --- a/ports/graphite2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: graphite2 -Version: 1.3.12-1 -Homepage: https://github.com/silnrsi/graphite -Description: Graphite is a "smart font" system developed specifically to handle the complexities of lesser-known languages of the world. - Graphite2 is a rework of the original Graphite engine that is faster, smaller, and uses an API that is better suited to the layout architecture of most text-processing applications. diff --git a/ports/graphite2/disable-tests.patch b/ports/graphite2/disable-tests.patch index ccb2ac8226c29d..d1c1fd97187de6 100644 --- a/ports/graphite2/disable-tests.patch +++ b/ports/graphite2/disable-tests.patch @@ -1,33 +1,48 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a4c648e..db90735 100644 +index 496712d..3df05c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -80,11 +80,13 @@ if (BUILD_SHARED_LIBS) - endif (BUILD_SHARED_LIBS) +@@ -82,10 +82,12 @@ if (BUILD_SHARED_LIBS) + endif() add_subdirectory(src) +-add_subdirectory(tests) +-add_subdirectory(doc) +-if (NOT GRAPHITE2_NFILEFACE) +- add_subdirectory(gr2fonttest) +if(NOT DISABLE_TESTS) - add_subdirectory(tests) - add_subdirectory(doc) - if (NOT GRAPHITE2_NFILEFACE) - add_subdirectory(gr2fonttest) - endif (NOT GRAPHITE2_NFILEFACE) -+endif() ++ add_subdirectory(tests) ++ add_subdirectory(doc) ++ if (NOT GRAPHITE2_NFILEFACE) ++ add_subdirectory(gr2fonttest) ++ endif() + endif() set(version 3.0.1) - set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 89a59af..c72be21 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -141,7 +141,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - LINKER_LANGUAGE C) - target_link_libraries(graphite2 c) - include(Graphite) -- nolib_test(stdc++ $) -+ if(NOT DISABLE_TESTS) -+ nolib_test(stdc++ $) -+ endif() - set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") - CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") - endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b6ac26b..851a97f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -127,9 +127,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + endif () + endif() + include(Graphite) +- if (BUILD_SHARED_LIBS) ++ if (NOT DISABLE_TESTS) + nolib_test(stdc++ $) +- endif () ++ endif() + set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") + CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") + endif() +@@ -144,7 +144,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + endif() + target_link_libraries(graphite2 c) + include(Graphite) +- nolib_test(stdc++ $) ++ if (NOT DISABLE_TESTS) ++ nolib_test(stdc++ $) ++ endif() + set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") + CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") + endif() diff --git a/ports/graphite2/portfile.cmake b/ports/graphite2/portfile.cmake index 679d9567955a47..44fe08ba6abc1d 100644 --- a/ports/graphite2/portfile.cmake +++ b/ports/graphite2/portfile.cmake @@ -1,11 +1,8 @@ - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO silnrsi/graphite - REF 1.3.12 - SHA512 d0aed05b54445a9664435d5aef9d78fc07a89be23d18b7b1339d37412b09faca6da3dc1e72524e4b114724b76aa6f36934e8ab1a01bd0752e353efa075c9e643 + REF 92f59dcc52f73ce747f1cdc831579ed2546884aa # 1.3.14 + SHA512 011855576124b2f9ae9d7d3a0dfc5489794cf82b81bebc02c11c9cca350feb9fbb411844558811dff1ebbacac58a24a7cf56a374fc2c27e97a5fb4795a01486e HEAD_REF master PATCHES disable-tests.patch ) @@ -24,5 +21,5 @@ vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphite2) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphite2 RENAME copyright) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/graphite2/vcpkg.json b/ports/graphite2/vcpkg.json new file mode 100644 index 00000000000000..cd5e479f4029d4 --- /dev/null +++ b/ports/graphite2/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "graphite2", + "version-string": "1.3.14", + "port-version": 1, + "description": [ + "Graphite is a \"smart font\" system developed specifically to handle the complexities of lesser-known languages of the world.", + "Graphite2 is a rework of the original Graphite engine that is faster, smaller, and uses an API that is better suited to the layout architecture of most text-processing applications." + ], + "homepage": "https://github.com/silnrsi/graphite" +} diff --git a/ports/graphqlparser/CONTROL b/ports/graphqlparser/CONTROL deleted file mode 100644 index 128c494989cbe3..00000000000000 --- a/ports/graphqlparser/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: graphqlparser -Version: 0.7.0-1 -Description: A GraphQL query parser in C++ with C and C++ APIs diff --git a/ports/graphqlparser/portfile.cmake b/ports/graphqlparser/portfile.cmake index a90959f5db9a22..92e36911089508 100644 --- a/ports/graphqlparser/portfile.cmake +++ b/ports/graphqlparser/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO graphql/libgraphqlparser @@ -9,6 +7,7 @@ vcpkg_from_github( PATCHES win-cmake.patch static-compile-fix.patch + remove-invalid-bison-directive.patch ) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") diff --git a/ports/graphqlparser/remove-invalid-bison-directive.patch b/ports/graphqlparser/remove-invalid-bison-directive.patch new file mode 100644 index 00000000000000..0e0b896dcb566b --- /dev/null +++ b/ports/graphqlparser/remove-invalid-bison-directive.patch @@ -0,0 +1,13 @@ +diff --git a/parser.ypp b/parser.ypp +index 2afbcac..baa9cab 100644 +--- a/parser.ypp ++++ b/parser.ypp +@@ -7,8 +7,6 @@ + * of patent rights can be found in the PATENTS file in the same directory. + */ + +-%require "3" +- + %skeleton "lalr1.cc" + + %defines diff --git a/ports/graphqlparser/vcpkg.json b/ports/graphqlparser/vcpkg.json new file mode 100644 index 00000000000000..d859a1f19f7567 --- /dev/null +++ b/ports/graphqlparser/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "graphqlparser", + "version-string": "0.7.0", + "port-version": 2, + "description": "A GraphQL query parser in C++ with C and C++ APIs" +} diff --git a/ports/greatest/CONTROL b/ports/greatest/CONTROL deleted file mode 100644 index 05c679d8ec19de..00000000000000 --- a/ports/greatest/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: greatest -Version: 1.4.2 -Description: Single-file testing system for C -Homepage: https://github.com/silentbicycle/greatest diff --git a/ports/greatest/portfile.cmake b/ports/greatest/portfile.cmake index 479287ccbf581a..2fcfd0645ce046 100644 --- a/ports/greatest/portfile.cmake +++ b/ports/greatest/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO silentbicycle/greatest diff --git a/ports/greatest/vcpkg.json b/ports/greatest/vcpkg.json new file mode 100644 index 00000000000000..c7a179ff5d3221 --- /dev/null +++ b/ports/greatest/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "greatest", + "version-string": "1.4.2", + "port-version": 1, + "description": "Single-file testing system for C", + "homepage": "https://github.com/silentbicycle/greatest" +} diff --git a/ports/grpc/00001-fix-uwp.patch b/ports/grpc/00001-fix-uwp.patch index 6f7f2d90fff808..80146babb0cb11 100644 --- a/ports/grpc/00001-fix-uwp.patch +++ b/ports/grpc/00001-fix-uwp.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8ba68c4a13..258a1609f6 100644 +index 1911144984..8f78306f77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -90,6 +90,9 @@ if(UNIX) +@@ -181,6 +181,9 @@ if(UNIX) endif() if(WIN32) set(_gRPC_PLATFORM_WINDOWS ON) @@ -11,18 +11,18 @@ index 8ba68c4a13..258a1609f6 100644 + endif() endif() - set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) -@@ -107,6 +110,9 @@ if (MSVC) - add_definitions(/wd4267) + # Use C99 standard +@@ -219,6 +222,9 @@ if(MSVC) + set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4267") # TODO(jtattermusch): needed to build boringssl with VS2017, revisit later - add_definitions(/wd4987 /wd4774 /wd4819 /wd4996 /wd4619) + set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4987 /wd4774 /wd4819 /wd4996 /wd4619") + if(_gRPC_PLATFORM_UWP) + add_definitions(-DGRPC_ARES=0) + endif() endif() - - if (gRPC_USE_PROTO_LITE) -@@ -177,6 +183,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR}) + if (MINGW) + add_definitions(-D_WIN32_WINNT=0x600) +@@ -286,6 +292,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR}) # ``.proto`` files # function(protobuf_generate_grpc_cpp) @@ -33,77 +33,27 @@ index 8ba68c4a13..258a1609f6 100644 if(NOT ARGN) message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files") return() -@@ -218,6 +228,7 @@ function(protobuf_generate_grpc_cpp) - endforeach() - endfunction() +@@ -358,6 +368,7 @@ if (gRPC_BUILD_GRPC_RUBY_PLUGIN) + list(APPEND _gRPC_PLUGIN_LIST grpc_ruby_plugin) + endif () +if(NOT _gRPC_PLATFORM_UWP) add_custom_target(plugins - DEPENDS - grpc_cpp_plugin -@@ -247,6 +258,8 @@ add_custom_target(tools_cxx + DEPENDS ${_gRPC_PLUGIN_LIST} + ) +@@ -376,6 +387,7 @@ add_custom_target(tools_cxx + add_custom_target(tools DEPENDS tools_c tools_cxx) - +endif() -+ - if (gRPC_BUILD_TESTS) - add_custom_target(buildtests_c) - add_dependencies(buildtests_c algorithm_test) -@@ -4029,7 +4042,6 @@ foreach(_hdr - DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" - ) - endforeach() --endif (gRPC_BUILD_CODEGEN) - - if (gRPC_BUILD_CODEGEN) - -@@ -4040,6 +4052,7 @@ if (gRPC_INSTALL) - ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} - ) - endif() -+endif (gRPC_BUILD_CODEGEN) - - endif (gRPC_BUILD_CODEGEN) - if (gRPC_BUILD_TESTS) -@@ -4163,7 +4176,7 @@ foreach(_hdr - DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" - ) - endforeach() --endif (gRPC_BUILD_CODEGEN) -+ - - if (gRPC_BUILD_CODEGEN) - -@@ -4174,6 +4187,7 @@ if (gRPC_INSTALL) - ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} - ) - endif() -+endif (gRPC_BUILD_CODEGEN) - endif (gRPC_BUILD_CODEGEN) - if (gRPC_BUILD_TESTS) -@@ -5196,7 +5210,6 @@ foreach(_hdr - DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" - ) - endforeach() --endif (gRPC_BUILD_CODEGEN) - - if (gRPC_BUILD_CODEGEN) - -@@ -5207,6 +5220,7 @@ if (gRPC_INSTALL) - ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} - ) - endif() -+endif (gRPC_BUILD_CODEGEN) - - endif (gRPC_BUILD_CODEGEN) - if (gRPC_BUILD_TESTS) + protobuf_generate_grpc_cpp( + src/proto/grpc/channelz/channelz.proto diff --git a/src/core/lib/iomgr/resource_quota.cc b/src/core/lib/iomgr/resource_quota.cc -index dffac348c5..a59becb046 100644 +index dbe84e3466..cda40b6435 100644 --- a/src/core/lib/iomgr/resource_quota.cc +++ b/src/core/lib/iomgr/resource_quota.cc -@@ -940,7 +940,7 @@ void grpc_resource_user_alloc(grpc_resource_user* resource_user, size_t size, +@@ -945,7 +945,7 @@ bool grpc_resource_user_alloc(grpc_resource_user* resource_user, size_t size, void grpc_resource_user_free(grpc_resource_user* resource_user, size_t size) { gpr_mu_lock(&resource_user->mu); grpc_resource_quota* resource_quota = resource_user->resource_quota; @@ -113,36 +63,24 @@ index dffac348c5..a59becb046 100644 bool was_zero_or_negative = resource_user->free_pool <= 0; resource_user->free_pool += static_cast(size); diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc -index 55efe0e9dd..f538f26edf 100644 +index 59432cff36..fed574d5bc 100644 --- a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +++ b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc -@@ -60,6 +60,8 @@ bool check_bios_data(const char* bios_data_file) { - - static void init_mu(void) { gpr_mu_init(&g_mu); } - +@@ -39,6 +39,7 @@ bool check_bios_data(const char*) { return false; } + bool check_windows_registry_product_name(HKEY root_key, + const char* reg_key_path, + const char* reg_key_name) { +#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP -+ - static bool run_powershell() { - SECURITY_ATTRIBUTES sa; - sa.nLength = sizeof(sa); -@@ -97,8 +99,12 @@ static bool run_powershell() { - CloseHandle(h); - return true; - } -+#endif + const size_t kProductNameBufferSize = 256; + char const expected_substr[] = "Google"; - bool grpc_alts_is_running_on_gcp() { -+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) -+ g_is_on_compute_engine = false; -+#else - gpr_once_init(&g_once, init_mu); - gpr_mu_lock(&g_mu); - if (!g_compute_engine_detection_done) { -@@ -108,6 +114,7 @@ bool grpc_alts_is_running_on_gcp() { - g_compute_engine_detection_done = true; +@@ -71,6 +72,9 @@ bool check_windows_registry_product_name(HKEY root_key, } - gpr_mu_unlock(&g_mu); + + return strstr(buffer, expected_substr) != nullptr; ++#else ++ return false; +#endif - return g_is_on_compute_engine; } + } // namespace internal diff --git a/ports/grpc/00002-static-linking-in-linux.patch b/ports/grpc/00002-static-linking-in-linux.patch index e8005edaa815cf..8999a24aea09ac 100644 --- a/ports/grpc/00002-static-linking-in-linux.patch +++ b/ports/grpc/00002-static-linking-in-linux.patch @@ -1,16 +1,16 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3839e22..91720a9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -99,6 +99,11 @@ set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) - - add_definitions(-DPB_FIELD_32BIT) - -+if (gRPC_STATIC_LINKING AND NOT _gRPC_PLATFORM_WINDOWS) -+ # Force to static link -+ set(CMAKE_EXE_LINKER_FLAGS "-Bstatic") -+endif() -+ - if (MSVC) - include(cmake/msvc_static_runtime.cmake) - add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8f78306f77..e09f8fcc1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -211,6 +211,11 @@ if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + endif() + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") + ++if (gRPC_STATIC_LINKING AND NOT _gRPC_PLATFORM_WINDOWS) ++ # Force to static link ++ set(CMAKE_EXE_LINKER_FLAGS "-Bstatic") ++endif() ++ + if(MSVC) + include(cmake/msvc_static_runtime.cmake) + add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS) diff --git a/ports/grpc/00003-undef-base64-macro.patch b/ports/grpc/00003-undef-base64-macro.patch index 193b1fd38ebcd8..3f540a53444cc9 100644 --- a/ports/grpc/00003-undef-base64-macro.patch +++ b/ports/grpc/00003-undef-base64-macro.patch @@ -1,13 +1,13 @@ -diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc -index 29c1e56..29de9d8 100644 ---- a/src/core/lib/transport/transport.cc -+++ b/src/core/lib/transport/transport.cc -@@ -96,6 +96,8 @@ void grpc_stream_ref_init(grpc_stream_refcount* refcount, int initial_refs, - refcount, &refcount->slice_refcount); - } - -+#undef move64 -+ - static void move64(uint64_t* from, uint64_t* to) { - *to += *from; - *from = 0; +diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc +index 99a32980aa..f55db67113 100644 +--- a/src/core/lib/transport/transport.cc ++++ b/src/core/lib/transport/transport.cc +@@ -97,6 +97,8 @@ void grpc_stream_ref_init(grpc_stream_refcount* refcount, int /*initial_refs*/, + refcount, &refcount->slice_refcount); + } + ++#undef move64 ++ + static void move64(uint64_t* from, uint64_t* to) { + *to += *from; + *from = 0; diff --git a/ports/grpc/00004-link-gdi32-on-windows.patch b/ports/grpc/00004-link-gdi32-on-windows.patch index 8aede465634143..e30e94f3d9ec33 100644 --- a/ports/grpc/00004-link-gdi32-on-windows.patch +++ b/ports/grpc/00004-link-gdi32-on-windows.patch @@ -1,13 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e820737201..3eb4795660 100644 +index e09f8fcc1e..ec1714687e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -158,7 +158,7 @@ elseif(UNIX) +@@ -278,7 +278,7 @@ elseif(UNIX) endif() - if(WIN32 AND MSVC) -- set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32) -+ set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32 gdi32) + if(WIN32) +- set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32 crypt32) ++ set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32 crypt32 gdi32) endif() # Create directory for generated .proto files diff --git a/ports/grpc/00005-fix-uwp-error.patch b/ports/grpc/00005-fix-uwp-error.patch new file mode 100644 index 00000000000000..ff86f68febe3fa --- /dev/null +++ b/ports/grpc/00005-fix-uwp-error.patch @@ -0,0 +1,34 @@ +diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc +index 0dacbfef3e..0743a1b003 100644 +--- a/src/core/lib/slice/slice.cc ++++ b/src/core/lib/slice/slice.cc +@@ -234,6 +234,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr p, + size_t len) { + uint8_t* ptr = reinterpret_cast(p.get()); + grpc_slice slice; ++ memset(&slice, 0, sizeof(grpc_slice)); + if (len <= sizeof(slice.data.inlined.bytes)) { + slice.refcount = nullptr; + slice.data.inlined.length = len; +@@ -253,7 +254,7 @@ grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr p) { + } + + grpc_slice grpc_slice_from_cpp_string(std::string str) { +- grpc_slice slice; ++ grpc_slice slice = { 0 }; + if (str.size() <= sizeof(slice.data.inlined.bytes)) { + slice.refcount = nullptr; + slice.data.inlined.length = str.size(); +diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc +index c94551545d..3fd9797316 100644 +--- a/src/core/lib/surface/server.cc ++++ b/src/core/lib/surface/server.cc +@@ -878,7 +878,7 @@ grpc_call_error Server::QueueRequestedCall(size_t cq_idx, RequestedCall* rc) { + GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown")); + return GRPC_CALL_OK; + } +- RequestMatcherInterface* rm; ++ RequestMatcherInterface* rm = nullptr; + switch (rc->type) { + case RequestedCall::Type::BATCH_CALL: + rm = unregistered_request_matcher_.get(); diff --git a/ports/grpc/00009-use-system-upb.patch b/ports/grpc/00009-use-system-upb.patch new file mode 100644 index 00000000000000..32946ceef92823 --- /dev/null +++ b/ports/grpc/00009-use-system-upb.patch @@ -0,0 +1,86 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c87e35a..24b619f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -84,6 +84,9 @@ set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package") + set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library") + set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package") + ++set(gRPC_UPB_PROVIDER "module" CACHE STRING "Provider of upb library") ++set_property(CACHE gRPC_UPB_PROVIDER PROPERTY STRINGS "module" "package") ++ + set(gRPC_PROTOBUF_PACKAGE_TYPE "" CACHE STRING "Algorithm for searching protobuf package") + set_property(CACHE gRPC_PROTOBUF_PACKAGE_TYPE PROPERTY STRINGS "CONFIG" "MODULE") + +@@ -2079,7 +2082,6 @@ target_link_libraries(grpc + gpr + ${_gRPC_SSL_LIBRARIES} + address_sorting +- upb + ) + if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC) + target_link_libraries(grpc "-framework CoreFoundation") +@@ -2624,7 +2626,6 @@ target_link_libraries(grpc_unsecure + absl::statusor + gpr + address_sorting +- upb + ) + if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC) + target_link_libraries(grpc_unsecure "-framework CoreFoundation") +@@ -3805,7 +3806,7 @@ if(gRPC_INSTALL) + endif() + + endif() +- ++if (gRPC_UPB_PROVIDER STREQUAL "module") + add_library(upb + third_party/upb/upb/decode_fast.c + third_party/upb/upb/decode.c +@@ -3863,7 +3864,7 @@ if(gRPC_INSTALL) + ) + endif() + +- ++endif() + + add_executable(check_epollexclusive + test/build/check_epollexclusive.c +diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in +index 3623f4a..df6ced5 100644 +--- a/cmake/gRPCConfig.cmake.in ++++ b/cmake/gRPCConfig.cmake.in +@@ -8,6 +8,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) + @_gRPC_FIND_CARES@ + @_gRPC_FIND_ABSL@ + @_gRPC_FIND_RE2@ ++@_gRPC_FIND_UPB@ + + # Targets + include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake) +diff --git a/cmake/upb.cmake b/cmake/upb.cmake +index f2a0e50..c1c65f5 100644 +--- a/cmake/upb.cmake ++++ b/cmake/upb.cmake +@@ -12,9 +12,21 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + ++set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated") ++if (gRPC_UPB_PROVIDER STREQUAL "module") ++ + set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb) + + set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}") + set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated") + + set(_gRPC_UPB_LIBRARIES upb) ++ ++ ++elseif(gRPC_UPB_PROVIDER STREQUAL "package") ++ find_package(upb CONFIG REQUIRED) ++ set(_gRPC_UPB_LIBRARIES upb::upb) ++ set(_gRPC_UPB_INCLUDE_DIR) ++ set(upb ${_gRPC_UPB_LIBRARIES}) ++ set(_gRPC_FIND_UPB "if(NOT upb_FOUND)\n find_package(upb CONFIG REQUIRED)\nendif()") ++endif() diff --git a/ports/grpc/00010-add-feature-absl-sync.patch b/ports/grpc/00010-add-feature-absl-sync.patch new file mode 100644 index 00000000000000..e208070a9f960f --- /dev/null +++ b/ports/grpc/00010-add-feature-absl-sync.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 24b619f..f7a11b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2076,6 +2076,8 @@ target_link_libraries(grpc + ${_gRPC_UPB_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + absl::flat_hash_map ++ absl::time ++ absl::synchronization + absl::inlined_vector + absl::bind_front + absl::statusor +@@ -2623,6 +2625,8 @@ target_link_libraries(grpc_unsecure + ${_gRPC_ALLTARGETS_LIBRARIES} + absl::flat_hash_map + absl::inlined_vector ++ absl::time ++ absl::synchronization + absl::statusor + gpr + address_sorting +diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake +index 078d495..b6f50bd 100644 +--- a/cmake/abseil-cpp.cmake ++++ b/cmake/abseil-cpp.cmake +@@ -37,4 +37,7 @@ elseif(gRPC_ABSL_PROVIDER STREQUAL "package") + # Use "CONFIG" as there is no built-in cmake module for absl. + find_package(absl REQUIRED CONFIG) + set(_gRPC_FIND_ABSL "if(NOT absl_FOUND)\n find_package(absl CONFIG)\nendif()") ++ if (gRPC_ABSL_SYNC_ENABLE) ++ add_definitions(-DGPR_ABSEIL_SYNC=1) ++ endif() + endif() diff --git a/ports/grpc/00011-fix-csharp_plugin.patch b/ports/grpc/00011-fix-csharp_plugin.patch new file mode 100644 index 00000000000000..fb258f9006d109 --- /dev/null +++ b/ports/grpc/00011-fix-csharp_plugin.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ae77375eae..ad8815d2f9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1960,10 +1960,14 @@ endif() + + if(gRPC_BUILD_CSHARP_EXT) + +-add_library(grpc_csharp_ext SHARED ++add_library(grpc_csharp_ext + src/csharp/ext/grpc_csharp_ext.c + ) + ++if (WIN32 AND BUILD_SHARED_LIBS) ++ target_compile_definitions(grpc_csharp_ext PUBLIC GPR_WINDOWS) ++endif() ++ + set_target_properties(grpc_csharp_ext PROPERTIES + VERSION ${gRPC_CORE_VERSION} + SOVERSION ${gRPC_CORE_SOVERSION} +@@ -1977,6 +1981,12 @@ if(WIN32 AND MSVC) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL + ) ++ ++ install(TARGETS grpc_csharp_ext ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) + endif() + endif() + diff --git a/ports/grpc/00012-fix-use-cxx17.patch b/ports/grpc/00012-fix-use-cxx17.patch new file mode 100644 index 00000000000000..ea425c9635a835 --- /dev/null +++ b/ports/grpc/00012-fix-use-cxx17.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4573027..4615602 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -271,6 +271,12 @@ include(cmake/upb.cmake) + include(cmake/xxhash.cmake) + include(cmake/zlib.cmake) + ++ ++if (ABSL_USE_CXX17) ++ message(STATUS "Found absl uses CXX17, enable CXX17 feature.") ++ set(CMAKE_CXX_STANDARD 17) ++endif() ++ + if(_gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_IOS) + set(_gRPC_ALLTARGETS_LIBRARIES ${CMAKE_DL_LIBS} m pthread) + elseif(_gRPC_PLATFORM_ANDROID) diff --git a/ports/grpc/00013-build-upbdefs.patch b/ports/grpc/00013-build-upbdefs.patch new file mode 100644 index 00000000000000..9a601ec5aea7fc --- /dev/null +++ b/ports/grpc/00013-build-upbdefs.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/upb.cmake b/cmake/upb.cmake +index 59d6813..1ce8bce 100644 +--- a/cmake/upb.cmake ++++ b/cmake/upb.cmake +@@ -24,8 +24,21 @@ set(_gRPC_UPB_LIBRARIES upb) + + elseif(gRPC_UPB_PROVIDER STREQUAL "package") + find_package(upb CONFIG REQUIRED) +- set(_gRPC_UPB_LIBRARIES upb::upb) ++ set(_gRPC_UPB_LIBRARIES upb) + set(_gRPC_UPB_INCLUDE_DIR) +- set(upb ${_gRPC_UPB_LIBRARIES}) ++ add_library(upb STATIC ++ ${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c ++ ${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c ++ ) ++ set_target_properties(upb PROPERTIES OUTPUT_NAME grpc_upbdefs) ++ target_include_directories(upb PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated") ++ target_link_libraries(upb PUBLIC upb::all_libs) ++ if(gRPC_INSTALL) ++ install(TARGETS upb EXPORT gRPCTargets ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) ++ endif() + set(_gRPC_FIND_UPB "if(NOT upb_FOUND)\n find_package(upb CONFIG REQUIRED)\nendif()") + endif() diff --git a/ports/grpc/00014-pkgconfig-upbdefs.patch b/ports/grpc/00014-pkgconfig-upbdefs.patch new file mode 100644 index 00000000000000..fd5a8356396a12 --- /dev/null +++ b/ports/grpc/00014-pkgconfig-upbdefs.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3808016..059a16b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15516,7 +15516,7 @@ generate_pkgconfig( + "high performance general RPC framework" + "${gRPC_CORE_VERSION}" + "gpr openssl" +- "-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz -labsl_statusor -labsl_status -labsl_raw_hash_set -labsl_hashtablez_sampler -labsl_synchronization -labsl_time -labsl_time_zone -labsl_civil_time -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_exponential_biased -labsl_cord -labsl_str_format_internal -labsl_hash -labsl_bad_variant_access -labsl_bad_optional_access -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_int128 -labsl_city -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" ++ "-lgrpc -laddress_sorting -lre2 -lupb_fastdecode -lupb_json -lupb_pb -lupb_handlers -lupb_textformat -lupb_reflection -lupb -lcares -lz -labsl_statusor -labsl_status -labsl_raw_hash_set -labsl_hashtablez_sampler -labsl_synchronization -labsl_time -labsl_time_zone -labsl_civil_time -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_exponential_biased -labsl_cord -labsl_str_format_internal -labsl_hash -labsl_bad_variant_access -labsl_bad_optional_access -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_int128 -labsl_city -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "" + "grpc.pc") + diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL deleted file mode 100644 index 079fd91f6c1d34..00000000000000 --- a/ports/grpc/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: grpc -Version: 1.21.1-1 -Build-Depends: zlib, openssl, protobuf, c-ares (!uwp) -Homepage: https://github.com/grpc/grpc -Description: An RPC library and framework diff --git a/ports/grpc/gRPCTargets-vcpkg-tools.cmake b/ports/grpc/gRPCTargets-vcpkg-tools.cmake new file mode 100644 index 00000000000000..08e3ee3afc4011 --- /dev/null +++ b/ports/grpc/gRPCTargets-vcpkg-tools.cmake @@ -0,0 +1,10 @@ +file(GLOB GRPC_PLUGINS "${_IMPORT_PREFIX}/../@HOST_TRIPLET@/tools/grpc/grpc_*_plugin*") + +foreach(PLUGIN ${GRPC_PLUGINS}) + get_filename_component(PLUGIN_NAME "${PLUGIN}" NAME_WE) + add_executable(gRPC::${PLUGIN_NAME} IMPORTED) + set_property(TARGET gRPC::${PLUGIN_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(gRPC::${PLUGIN_NAME} PROPERTIES + IMPORTED_LOCATION_RELEASE "${PLUGIN}" + ) +endforeach() diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 2dca1c34ceced6..39aa2c5a95de81 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -1,56 +1,52 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) +if(VCPKG_TARGET_IS_WINDOWS) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) endif() -# This snippet is a workaround for users who are upgrading from an extremely old version of this -# port, which cloned directly into `src\` -if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF 75475f090875e737ad6909a6057c59577f0c79b1 - SHA512 db9ff82dee38cb0f4ba10874d10bf6cb20c8a4d49e7dd24bcd9f71388c54c782ee12fda6f1bfedd79ad988b0275d3f96df4686217465acfafcfb5e4c30093a5b + REF 44c40ac23023b7b3dd82744372c06817cc203898 # v1.37.0 + SHA512 dacd85b3a94cb759a086239aa2661f1b93728a1554ebc0f10c42aeb49c0d6309963832324773c3a153c3d2fcf807cb55b0e197b128e0a4e199c9e19a3976abd6 HEAD_REF master PATCHES 00001-fix-uwp.patch 00002-static-linking-in-linux.patch 00003-undef-base64-macro.patch 00004-link-gdi32-on-windows.patch + 00005-fix-uwp-error.patch + 00009-use-system-upb.patch + 00010-add-feature-absl-sync.patch + 00011-fix-csharp_plugin.patch + snprintf.patch + 00012-fix-use-cxx17.patch + 00013-build-upbdefs.patch + 00014-pkgconfig-upbdefs.patch ) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(gRPC_BUILD_CODEGEN OFF) -else() - set(gRPC_BUILD_CODEGEN ON) +if(NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET) + vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/grpc") endif() -if(VCPKG_CRT_LINKAGE STREQUAL "static") - set(gRPC_MSVC_STATIC_RUNTIME ON) -else() - set(gRPC_MSVC_STATIC_RUNTIME OFF) -endif() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" gRPC_MSVC_STATIC_RUNTIME) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" gRPC_STATIC_LINKING) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(gRPC_STATIC_LINKING ON) -else() - set(gRPC_STATIC_LINKING OFF) -endif() - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_UWP) set(cares_CARES_PROVIDER OFF) else() set(cares_CARES_PROVIDER "package") endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + absl-sync gRPC_ABSL_SYNC_ENABLE + codegen gRPC_BUILD_CODEGEN +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DgRPC_STATIC_LINKING=${gRPC_STATIC_LINKING} @@ -58,29 +54,47 @@ vcpkg_configure_cmake( -DgRPC_ZLIB_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package + -DgRPC_ABSL_PROVIDER=package + -DgRPC_UPB_PROVIDER=package + -DgRPC_RE2_PROVIDER=package -DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG -DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER} -DgRPC_GFLAGS_PROVIDER=none -DgRPC_BENCHMARK_PROVIDER=none -DgRPC_INSTALL_CSHARP_EXT=OFF - -DgRPC_INSTALL_BINDIR:STRING=tools/grpc + -DgRPC_INSTALL_BINDIR:STRING=bin -DgRPC_INSTALL_LIBDIR:STRING=lib -DgRPC_INSTALL_INCLUDEDIR:STRING=include -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc - -DgRPC_BUILD_CODEGEN=${gRPC_BUILD_CODEGEN} + -D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX} + -DPROTOBUF_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX} ) vcpkg_install_cmake(ADD_BIN_TO_PATH) vcpkg_fixup_cmake_targets() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright) - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc) -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools") +if (gRPC_BUILD_CODEGEN) + vcpkg_copy_tools( + AUTO_CLEAN + TOOL_NAMES + grpc_php_plugin + grpc_python_plugin + grpc_node_plugin + grpc_objective_c_plugin + grpc_csharp_plugin + grpc_cpp_plugin + grpc_ruby_plugin + ) +else() + configure_file(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets-vcpkg-tools.cmake ${CURRENT_PACKAGES_DIR}/share/grpc/gRPCTargets-vcpkg-tools.cmake @ONLY) +endif() # Ignore the C# extension DLL in bin/ SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) diff --git a/ports/grpc/snprintf.patch b/ports/grpc/snprintf.patch new file mode 100644 index 00000000000000..d1fd52e48d893f --- /dev/null +++ b/ports/grpc/snprintf.patch @@ -0,0 +1,12 @@ +diff --git a/src/core/tsi/alts/crypt/aes_gcm.cc b/src/core/tsi/alts/crypt/aes_gcm.cc +index 02b1ac4492..191f462277 100644 +--- a/src/core/tsi/alts/crypt/aes_gcm.cc ++++ b/src/core/tsi/alts/crypt/aes_gcm.cc +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include + diff --git a/ports/grpc/vcpkg-cmake-wrapper.cmake b/ports/grpc/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..9adf0288084d31 --- /dev/null +++ b/ports/grpc/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,2 @@ +list(REMOVE_AT ARGS 0) +_find_package(gRPC ${ARGS}) # Shouldn't this be fixed downstream instead of using a Wrapper? \ No newline at end of file diff --git a/ports/grpc/vcpkg.json b/ports/grpc/vcpkg.json new file mode 100644 index 00000000000000..1b7dfac45b0fc0 --- /dev/null +++ b/ports/grpc/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "grpc", + "version-semver": "1.37.0", + "port-version": 3, + "description": "An RPC library and framework", + "homepage": "https://github.com/grpc/grpc", + "dependencies": [ + "abseil", + { + "name": "c-ares", + "platform": "!uwp" + }, + { + "name": "grpc", + "host": true, + "features": [ + "codegen" + ] + }, + "openssl", + "protobuf", + { + "name": "protobuf", + "host": true + }, + "re2", + "upb", + "zlib" + ], + "features": { + "absl-sync": { + "description": "Use abseil synchronization module" + }, + "codegen": { + "description": "Build code generator machinery" + } + } +} diff --git a/ports/grppi/fix-build-error.patch b/ports/grppi/fix-build-error.patch new file mode 100644 index 00000000000000..edbdc3ad544a4d --- /dev/null +++ b/ports/grppi/fix-build-error.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09f1f9b..9ef62e9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,7 +13,7 @@ message(STATUS "CMAKE_CXX_COMPILER_ID: " ${CMAKE_CXX_COMPILER_ID} ) + + set(CMAKE_CXX_STANDARD 14) + +-add_compile_options(-Wall -Werror -pedantic -pedantic-errors -Wextra -Weffc++) ++add_compile_options(-Wall -Werror -pedantic -pedantic-errors -Wextra) + + # Set specific options depending on compiler + if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" ) diff --git a/ports/grppi/fix-support-other-compilers.patch b/ports/grppi/fix-support-other-compilers.patch new file mode 100644 index 00000000000000..d347b26747a7d3 --- /dev/null +++ b/ports/grppi/fix-support-other-compilers.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09f1f9b..e7b562b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,22 +20,19 @@ if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" ) + if(NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 3.9.0)) + message(FATAL_ERROR "Clang version " ${CMAKE_CXX_COMPILER_VERSION} + " not supported. Upgrade to 3.9 or above.") +- else() +- message( STATUS "C++ Compiler is Clang" ) + endif() + elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") + if(NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 6.0)) + message(FATAL_ERROR "g++ version " ${CMAKE_CXX_COMPILER_VERSION} + " not supported. Upgrade to 6.0 or above.") + else() +- message( STATUS "C++ Compiler is GNU") + if (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 7.0) + #g++ 7 warns in non C++17 for over-aligned new otherwise + add_compile_options(-faligned-new) + endif() + endif() + elseif ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" ) +- message(FATAL_ERROR "Intel compiler is not currently supported") ++ message(WARNING "Intel compiler is not currently supported") + # if(NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 16.0)) + # message( FATAL_ERROR "Intel version " ${CMAKE_CXX_COMPILER_VERSION} + # " not supported. Upgrade to 16.0 or above.") +@@ -43,12 +40,11 @@ elseif ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" ) + # message( STATUS "C++ Compiler is Intel" ) + # message( WARNING "WARNING: GrPPI has not been fully tested with Intel compiler." ) + # endif() +-else() +- message( FATAL_ERROR "Unsupported compiler: " +- ${CMAKE_CXX_COMPILER_ID} +- ${CMAKE_CXX_COMPILER_VERSION}) + endif() + ++message(STATUS "C++ Compiler is " ${CMAKE_CXX_COMPILER_ID} ++ " version " ${CMAKE_CXX_COMPILER_VERSION}) ++ + # GrPPI library + include_directories("${CMAKE_SOURCE_DIR}/include") + diff --git a/ports/grppi/portfile.cmake b/ports/grppi/portfile.cmake new file mode 100644 index 00000000000000..058f39fd0a55ba --- /dev/null +++ b/ports/grppi/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arcosuc3m/grppi + REF v0.4.0 + SHA512 f8235af6832958de420a68d4465a6c63701ab4385f3430d32f77c1d5e8212001262aad1a8aae04261ba889d592798cd3963843b190d325bddc1fe7dcc4aebd7d + HEAD_REF master + PATCHES + fix-build-error.patch + fix-support-other-compilers.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGRPPI_DOXY_ENABLE=OFF + -DGRPPI_EXAMPLE_APPLICATIONS_ENABLE=OFF + -DGRPPI_UNIT_TEST_ENABLE=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/grppi/vcpkg.json b/ports/grppi/vcpkg.json new file mode 100644 index 00000000000000..1cc832ab3ed7e1 --- /dev/null +++ b/ports/grppi/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "grppi", + "version-string": "0.4.0", + "port-version": 1, + "description": "GrPPI is an open source generic and reusable parallel pattern programming interface developed at University Carlos III of Madrid.", + "homepage": "https://github.com/arcosuc3m/grppi" +} diff --git a/ports/gsl-lite/CONTROL b/ports/gsl-lite/CONTROL deleted file mode 100644 index 33149992dd0be8..00000000000000 --- a/ports/gsl-lite/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gsl-lite -Version: 0.28.0 -Homepage: https://github.com/martinmoene/gsl-lite -Description: A single-file header-only version of ISO C++ Guideline Support Library (GSL) for C++98, C++11 and later diff --git a/ports/gsl-lite/portfile.cmake b/ports/gsl-lite/portfile.cmake index 9bcae7d062a39d..a37ea6144282ba 100644 --- a/ports/gsl-lite/portfile.cmake +++ b/ports/gsl-lite/portfile.cmake @@ -1,18 +1,28 @@ -include(vcpkg_common_functions) - -set(GSL_LITE_VERSION v0.28.0) - -vcpkg_download_distfile(HEADER - URLS "https://github.com/martinmoene/gsl-lite/releases/download/${GSL_LITE_VERSION}/gsl-lite.hpp" - FILENAME "gsl-lite-${GSL_LITE_VERSION}.hpp" - SHA512 2c9705c9d17b5acbd7eb2f4a93a6fd07f9ce31e81a41d2ca6a961ed484d771742d7960305bbb20b82d810013c7473c9afa58c71468a15466e00c879449d38ba5 -) - -vcpkg_download_distfile(LICENSE - URLS "https://github.com/martinmoene/gsl-lite/raw/${GSL_LITE_VERSION}/LICENSE" - FILENAME "gsl-lite-LICENSE-${GSL_LITE_VERSION}.txt" - SHA512 1feff12bda27a5ec52440a7624de54d841faf3e254fff04ab169b7f312e685f4bfe71236de8b8ef759111ae95bdb69e05f2e8318773b0aff4ba24ea9568749bb -) - -file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME gsl-lite.hpp) -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsl-lite RENAME copyright) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gsl-lite/gsl-lite + REF e1c381746c2625a76227255f999ae9f14a062208 + SHA512 36b7ee945e384f1d425287a780953bf979782aa799547d08fb32e05c4671050278de34d857807de4c7e42b215900457014c49e89b7f330d522609f7cc10d47f8 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/gsl-lite") + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/gsl-lite.hpp "#ifndef GSL_LITE_HPP_VCPKG_COMPAT_HEADER_INCLUDED +#define GSL_LITE_HPP_VCPKG_COMPAT_HEADER_INCLUDED +#pragma message(\"The header is deprecated and provided by Vcpkg for compatibility only; please include instead.\") +#include +#endif // GSL_LITE_HPP_VCPKG_COMPAT_HEADER_INCLUDED") + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/lib" + "${CURRENT_PACKAGES_DIR}/debug" +) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/gsl-lite/vcpkg.json b/ports/gsl-lite/vcpkg.json new file mode 100644 index 00000000000000..543db28de6d590 --- /dev/null +++ b/ports/gsl-lite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "gsl-lite", + "version": "0.38.1", + "description": "A single-file header-only implementation of ISO C++ Guidelines Support Library (GSL) for C++98, C++11 and later.", + "homepage": "https://github.com/gsl-lite/gsl-lite/" +} diff --git a/ports/gsl/CMakeLists.txt b/ports/gsl/CMakeLists.txt index 0027fe29166ef2..2d37f37e98bd98 100644 --- a/ports/gsl/CMakeLists.txt +++ b/ports/gsl/CMakeLists.txt @@ -9,7 +9,8 @@ function(extract_from_makefile PATTERN RETURN FILEPATH) string(REGEX MATCH "${PATTERN}" CONTENTS "${MAKEFILE_CONTENT}") set(CONTENTS ${CMAKE_MATCH_1}) # Split string into list - string(REGEX REPLACE "[ \t]+" ";" CONTENTS "${CONTENTS}") + string(REGEX REPLACE "([\t ]+(\\\\\n)?)+" ";" CONTENTS "${CONTENTS}") + string(REGEX REPLACE "[\t ]*\\\\\n[\t ]*;" "" CONTENTS "${CONTENTS}") if("${CONTENTS}" STREQUAL "") message(AUTHOR_WARNING "No match for \"${PATTERN}\" found in file ${FILEPATH}") endif() @@ -19,8 +20,8 @@ endfunction(extract_from_makefile) # Function to extract C sources from makefile function(extract_sources SUBFOLDER ALLSOURCES) - extract_from_makefile("lib[a-zA-Z1-9_]*_la_SOURCES[ \t]*=[ \t]*([^\n]*)" SOURCEFILES "${SUBFOLDER}/Makefile.am") - # Add the folder in front of the file names + extract_from_makefile("lib[a-zA-Z1-9_]*_la_SOURCES[ \t]*=[ \t]*(((\\\\\n)?[^\n])*)" SOURCEFILES "${SUBFOLDER}/Makefile.am") + # Add the folder in front of the file names string(REGEX REPLACE "([^;]+)" "${SUBFOLDER}/\\1" SOURCEFILES "${SOURCEFILES}") # Return set(${ALLSOURCES} ${${ALLSOURCES}} ${SOURCEFILES} PARENT_SCOPE) @@ -28,7 +29,7 @@ endfunction(extract_sources) set(SOURCES) set(CBLAS_SOURCES) -extract_from_makefile("SUBDIRS = ([^\n]*)" FOLDERS "./Makefile.am") +extract_from_makefile("SUBDIRS = (((\\\\\n)?[^\n])*)" FOLDERS "./Makefile.am") extract_sources("." SOURCES) foreach(DIR IN LISTS FOLDERS) if("${DIR}" STREQUAL "cblas") diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL deleted file mode 100644 index af68d6f027b8be..00000000000000 --- a/ports/gsl/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gsl -Version: 2.4-3 -Homepage: https://www.gnu.org/software/gsl/ -Description: The GNU Scientific Library is a numerical library for C and C++ programmers diff --git a/ports/gsl/portfile.cmake b/ports/gsl/portfile.cmake index 12c0526bcd410a..b722393fe80a17 100644 --- a/ports/gsl/portfile.cmake +++ b/ports/gsl/portfile.cmake @@ -1,23 +1,21 @@ -include(vcpkg_common_functions) -set(GSL_VERSION 2.4) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gsl-${GSL_VERSION}) +set(GSL_VERSION 2.6) vcpkg_download_distfile(ARCHIVE - URLS "ftp://ftp.gnu.org/gnu/gsl/gsl-${GSL_VERSION}.tar.gz" + URLS "https://ftp.gnu.org/gnu/gsl/gsl-${GSL_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gsl/gsl-${GSL_VERSION}.tar.gz" FILENAME "gsl-${GSL_VERSION}.tar.gz" - SHA512 12442b023dd959e8b22a9c486646b5cedec7fdba0daf2604cda365cf96d10d99aefdec2b42e59c536cc071da1525373454e5ed6f4b15293b305ca9b1dc6db130 + SHA512 0be8240715f0b86aba2c63d9f12da4dba4719d4e350e9308d279e0dd3b2f0519ea26fd2e38a17f3e8cf43aacbaa2455207a7ca0d6c305f3b8725e8ece2250a74 ) -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-configure.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-add-fp-control.patch + 0001-configure.patch + 0002-add-fp-control.patch ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -25,9 +23,8 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -# Handle copyright -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsl) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsl/COPYING ${CURRENT_PACKAGES_DIR}/share/gsl/copyright) - vcpkg_copy_pdbs() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) \ No newline at end of file diff --git a/ports/gsl/vcpkg-cmake-wrapper.cmake b/ports/gsl/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..7a3ea854cf5135 --- /dev/null +++ b/ports/gsl/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS}) +if(GSL_FOUND AND TARGET GSL::gsl) + set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Release ) + set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Release ) + if( EXISTS "${GSL_LIBRARY_DEBUG}" AND EXISTS "${GSL_CBLAS_LIBRARY_DEBUG}") + set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( GSL::gsl PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_LIBRARY_DEBUG}" ) + set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( GSL::gslcblas PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG}" ) + endif() +endif() \ No newline at end of file diff --git a/ports/gsl/vcpkg.json b/ports/gsl/vcpkg.json new file mode 100644 index 00000000000000..092f208c2d61c4 --- /dev/null +++ b/ports/gsl/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "gsl", + "version-string": "2.6", + "port-version": 2, + "description": "The GNU Scientific Library is a numerical library for C and C++ programmers", + "homepage": "https://www.gnu.org/software/gsl/" +} diff --git a/ports/gsoap/CONTROL b/ports/gsoap/CONTROL deleted file mode 100644 index e9abd951653720..00000000000000 --- a/ports/gsoap/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gsoap -Version: 2.8.87-1 -Build-Depends: curl -Description: The gSOAP toolkit is a C and C++ software development toolkit for SOAP and REST XML Web services and generic C/C++ XML data bindings. \ No newline at end of file diff --git a/ports/gsoap/portfile.cmake b/ports/gsoap/portfile.cmake index fb45d3950da5db..3ba596bc424097 100644 --- a/ports/gsoap/portfile.cmake +++ b/ports/gsoap/portfile.cmake @@ -1,32 +1,22 @@ -include(vcpkg_common_functions) -set(GSOAP_VERSION 2.8) -set(GSOAP_SUB_VERSION .87) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gsoap-${GSOAP_VERSION}) +message(FATAL_ERROR "gsoap does not offer permanent public downloads of its sources; all versions except the latest are removed from sourceforge. Therefore, vcpkg cannot support this library directly in the central catalog. If you would like to use gsoap, you can use this port as a starting point (${CMAKE_CURRENT_LIST_DIR}) and update it to use a permanent commercial copy or the latest public download. Do not report issues with this library to the vcpkg GitHub.") -vcpkg_download_distfile(ARCHIVE - URLS "https://ayera.dl.sourceforge.net/project/gsoap2/gsoap-${GSOAP_VERSION}/gsoap_${GSOAP_VERSION}${GSOAP_SUB_VERSION}.zip" - FILENAME "gsoap_${GSOAP_VERSION}${GSOAP_SUB_VERSION}.zip" - SHA512 638bf9b2b8aca5facba518f136ad5af5bda41f2b92ee345ee6989d73223a571ce5ddab23c0b65259e9fd524039250d861defc8cfc2fc0a366a578ce3629b9ca4 -) +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP" ON_ARCH "arm" "arm64") -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix-build-in-windows.patch" + REPO gsoap2 + REF gsoap-2.8 + FILENAME "gsoap_2.8.112.zip" + SHA512 0c2562891a738916235f1d4b19d8419d96d0466ca4b729766551183c7b9b90cbe35bbf7fe126b3ea6b18138cbf591c9a9b5b73ddea7152ccdd2f790777c2b6d8 + PATCHES fix-build-in-windows.patch ) -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(BUILD_ARCH "Win32") -else() - message("gsoap only supported Win32") - set(BUILD_ARCH "Win32") -endif() +set(BUILD_ARCH "Win32") # Handle binary files and includes file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/gsoap ${CURRENT_PACKAGES_DIR}/debug/tools) -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (VCPKG_TARGET_IS_WINDOWS) vcpkg_build_msbuild( USE_VCPKG_INTEGRATION PROJECT_PATH ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/soapcpp2.sln @@ -53,15 +43,20 @@ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) file(COPY ${SOURCE_PATH}/gsoap/stdsoap2.h ${SOURCE_PATH}/gsoap/stdsoap2.c ${SOURCE_PATH}/gsoap/stdsoap2.cpp ${SOURCE_PATH}/gsoap/dom.c ${SOURCE_PATH}/gsoap/dom.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) # Handle import files -file(COPY ${SOURCE_PATH}/gsoap/import DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsoap) +file(COPY ${SOURCE_PATH}/gsoap/import DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Handle custom files +file(COPY ${SOURCE_PATH}/gsoap/custom DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) # Handle plugin files -file(COPY ${SOURCE_PATH}/gsoap/plugin DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsoap) +file(COPY ${SOURCE_PATH}/gsoap/plugin DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Cleanup surplus empty directory +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/gsoap/plugin/.deps") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt ${SOURCE_PATH}/INSTALL.txt ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsoap) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsoap/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/gsoap/copyright) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsoap/INSTALL.txt ${CURRENT_PACKAGES_DIR}/share/gsoap/install) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsoap/README.txt ${CURRENT_PACKAGES_DIR}/share/gsoap/readme) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/INSTALL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME install) +file(INSTALL ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME readme) vcpkg_copy_pdbs() diff --git a/ports/gsoap/vcpkg.json b/ports/gsoap/vcpkg.json new file mode 100644 index 00000000000000..ffa37c5d2b5aab --- /dev/null +++ b/ports/gsoap/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "gsoap", + "version": "2.8.112", + "description": "The gSOAP toolkit is a C and C++ software development toolkit for SOAP and REST XML Web services and generic C/C++ XML data bindings.", + "homepage": "https://sourceforge.net/projects/gsoap2/", + "supports": "!(linux | osx | arm | uwp)" +} diff --git a/ports/gstreamer/plugins-base-use-zlib.patch b/ports/gstreamer/plugins-base-use-zlib.patch new file mode 100644 index 00000000000000..57b997ca7d9d8c --- /dev/null +++ b/ports/gstreamer/plugins-base-use-zlib.patch @@ -0,0 +1,13 @@ +diff --git a/gst-libs/gst/tag/meson.build b/gst-libs/gst/tag/meson.build +index 5ec3739..a6cff8d 100644 +--- a/gst-libs/gst/tag/meson.build ++++ b/gst-libs/gst/tag/meson.build +@@ -70,7 +70,7 @@ endif + core_conf.set('HAVE_ISO_CODES', have_iso_codes) + + # could drop optional zlib dep and use g_zlib_decompressor_new() +-zlib_dep = dependency('zlib', required : false) ++zlib_dep = dependency('zlib', required : true) + if not zlib_dep.found() + zlib_dep = cc.find_library('z', required : false) + if not zlib_dep.found() or not cc.has_header('zlib.h') diff --git a/ports/gstreamer/plugins-good-use-zlib.patch b/ports/gstreamer/plugins-good-use-zlib.patch new file mode 100644 index 00000000000000..efea351f165ea6 --- /dev/null +++ b/ports/gstreamer/plugins-good-use-zlib.patch @@ -0,0 +1,13 @@ +diff --git a/meson.build b/meson.build +index 9de3b01..091a7f0 100644 +--- a/meson.build ++++ b/meson.build +@@ -326,7 +326,7 @@ if have_gstgl + endif + endif + +-zlib_dep = dependency('zlib', required : false) ++zlib_dep = dependency('zlib', required : true) + if not zlib_dep.found() + zlib_dep = cc.find_library('z', required : false) + if not zlib_dep.found() or not cc.has_header('zlib.h') diff --git a/ports/gstreamer/portfile.cmake b/ports/gstreamer/portfile.cmake new file mode 100644 index 00000000000000..add14ef7ddb88f --- /dev/null +++ b/ports/gstreamer/portfile.cmake @@ -0,0 +1,262 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "emscripten" "wasm32" "android" "ios") + +vcpkg_from_github( + OUT_SOURCE_PATH GST_BUILD_SOURCE_PATH + REPO gstreamer/gst-build + REF 1.18.4 + SHA512 9b3927ba1a2ba1e384f2141c454978f582087795a70246709ed60875bc983a42eef54f3db7617941b8dacc20c434f81ef9931834861767d7a4dc09d42beeb900 + HEAD_REF master +) +vcpkg_from_github( + OUT_SOURCE_PATH GST_SOURCE_PATH + REPO gstreamer/gstreamer + REF 1.18.4 + SHA512 684a7ce93143a0c3e0ce627ab2bf1451d49735b4bab273f308bc3b48d8312f7c13c0afa7e71f3a3a7274b90373215636dd8ff0076f143cbe26061de0c4efa102 + HEAD_REF master +) +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND PLUGIN_BASE_PATCHES plugins-base-use-zlib.patch) + list(APPEND PLUGIN_GOOD_PATCHES plugins-good-use-zlib.patch) +endif() +vcpkg_from_github( + OUT_SOURCE_PATH GST_PLUGIN_BASE_SOURCE_PATH + REPO gstreamer/gst-plugins-base + REF 1.18.4 + SHA512 b89924e90f880195740421f2eec3f2a667b96f6ca92ccaf87da246e9c9fd13646bf6235376844c012414a79d38dfaea8f10d56ffec900fe0b9cb8f19e722f05e + HEAD_REF master + PATCHES ${PLUGIN_BASE_PATCHES} +) +vcpkg_from_github( + OUT_SOURCE_PATH GST_PLUGIN_GOOD_SOURCE_PATH + REPO gstreamer/gst-plugins-good + REF 1.18.4 + SHA512 d97f4b76b6fc089b7675a9b10cabf4c704d71d663a23f34133a2671761d98e931aa87df7158f663cd9ebb6a8febd9ab1833aef7eb8be2ef2b54fad288bd0ae66 + HEAD_REF master + PATCHES ${PLUGIN_GOOD_PATCHES} +) +vcpkg_from_github( + OUT_SOURCE_PATH GST_PLUGIN_BAD_SOURCE_PATH + REPO gstreamer/gst-plugins-bad + REF 1.18.4 + SHA512 0bf5344fbef883dbe0908495c9a50cd3bf915c5d328cf2768532ff077a9aa4255747f417a310c16c3ea86fcb79ac6ba4bf37375ff84776985451ab47b9d9ac6e + HEAD_REF master +) +vcpkg_from_github( + OUT_SOURCE_PATH GST_PLUGIN_UGLY_SOURCE_PATH + REPO gstreamer/gst-plugins-ugly + REF 1.18.4 + SHA512 01413155d21f654a90bcf7235b5605c244d3700632ae6c56cafbbabfb11192a09c2ab01c4662ab452eabb004b09c9ec2efa72024db8be5863054d25569034a03 + HEAD_REF master +) +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org + OUT_SOURCE_PATH GST_MESON_PORTS_SOURCE_PATH + REPO gstreamer/meson-ports/gl-headers + REF 5c8c7c0d3ca1f0b783272dac0b95e09414e49bc8 # master commit. Date 2021-04-21 + SHA512 d001535e1c1b5bb515ac96c7d15b25ca51460a5af0c858df53b11c7bae87c4a494e4a1b1b9c3c41a5989001db083645dde2054b82acbbeab7f9939308b676f9c + HEAD_REF master +) + +file(RENAME ${GST_SOURCE_PATH} ${GST_BUILD_SOURCE_PATH}/subprojects/gstreamer) +file(RENAME ${GST_PLUGIN_BASE_SOURCE_PATH} ${GST_BUILD_SOURCE_PATH}/subprojects/gst-plugins-base) +file(RENAME ${GST_PLUGIN_GOOD_SOURCE_PATH} ${GST_BUILD_SOURCE_PATH}/subprojects/gst-plugins-good) +file(RENAME ${GST_PLUGIN_BAD_SOURCE_PATH} ${GST_BUILD_SOURCE_PATH}/subprojects/gst-plugins-bad) +file(RENAME ${GST_PLUGIN_UGLY_SOURCE_PATH} ${GST_BUILD_SOURCE_PATH}/subprojects/gst-plugins-ugly) +file(RENAME ${GST_MESON_PORTS_SOURCE_PATH} ${GST_BUILD_SOURCE_PATH}/subprojects/gl-headers) + +if(VCPKG_TARGET_IS_OSX) + # In Darwin platform, there can be an old version of `bison`, + # Which can't be used for `gst-build`. It requires 2.4+ + vcpkg_find_acquire_program(BISON) + execute_process( + COMMAND ${BISON} --version + OUTPUT_VARIABLE BISON_OUTPUT + ) + string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" BISON_VERSION "${BISON_OUTPUT}") + set(BISON_MAJOR ${CMAKE_MATCH_1}) + set(BISON_MINOR ${CMAKE_MATCH_2}) + message(STATUS "Using bison: ${BISON_MAJOR}.${BISON_MINOR}.${CMAKE_MATCH_3}") + if(NOT (BISON_MAJOR GREATER_EQUAL 2 AND BISON_MINOR GREATER_EQUAL 4)) + message(WARNING "'bison' upgrade is required. Please check the https://stackoverflow.com/a/35161881") + endif() +endif() + +# make tools like 'glib-mkenums' visible +get_filename_component(GLIB_TOOL_DIR ${CURRENT_INSTALLED_DIR}/tools/glib ABSOLUTE) +message(STATUS "Using glib tools: ${GLIB_TOOL_DIR}") +vcpkg_add_to_path(PREPEND ${GLIB_TOOL_DIR}) + +if("plugins-bad" IN_LIST FEATURES) + # requires 'libdrm', 'dssim', 'libmicrodns' + message(FATAL_ERROR "The feature 'plugins-bad' is not supported in this port version") + set(PLUGIN_BAD_SUPPORT enabled) +else() + set(PLUGIN_BAD_SUPPORT disabled) +endif() +if("plugins-ugly" IN_LIST FEATURES) + set(PLUGIN_UGLY_SUPPORT enabled) +else() + set(PLUGIN_UGLY_SUPPORT disabled) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(LIBRARY_LINKAGE "shared") +else() + set(LIBRARY_LINKAGE "static") +endif() + +# gst-build's meson configuration needs git. Make the tool visible. +vcpkg_find_acquire_program(GIT) +get_filename_component(GIT_DIR "${GIT}" DIRECTORY) +vcpkg_add_to_path("${GIT_DIR}") + +# +# check scripts/cmake/vcpkg_configure_meson.cmake +# --wrap-mode=nodownload +# +# References +# https://github.com/GStreamer/gst-build/blob/1.18.4/meson_options.txt +# https://github.com/GStreamer/gst-plugins-base/blob/1.18.4/meson_options.txt +# https://github.com/GStreamer/gst-plugins-good/blob/1.18.4/meson_options.txt +# https://github.com/GStreamer/gst-plugins-bad/blob/1.18.4/meson_options.txt +# https://github.com/GStreamer/gst-plugins-ugly/blob/1.18.4/meson_options.txt +# +vcpkg_configure_meson( + SOURCE_PATH ${GST_BUILD_SOURCE_PATH} + OPTIONS + # gstreamer + -Dgstreamer:default_library=${LIBRARY_LINKAGE} + -Dgstreamer:check=disabled + -Dgstreamer:libunwind=disabled + -Dgstreamer:libdw=disabled + -Dgstreamer:dbghelp=disabled + -Dgstreamer:bash-completion=disabled + -Dgstreamer:coretracers=disabled + -Dgstreamer:examples=disabled + -Dgstreamer:tests=disabled + -Dgstreamer:benchmarks=disabled + -Dgstreamer:tools=disabled + -Dgstreamer:gtk_doc=disabled + -Dgstreamer:introspection=disabled + -Dgstreamer:nls=disabled + # gst-plugins-base + -Dgst-plugins-base:default_library=${LIBRARY_LINKAGE} + -Dgst-plugins-base:examples=disabled + -Dgst-plugins-base:tests=disabled + -Dgst-plugins-base:tools=disabled + -Dgst-plugins-base:introspection=disabled + -Dgst-plugins-base:nls=disabled + -Dgst-plugins-base:orc=disabled + # gst-plugins-good + -Dgst-plugins-good:default_library=${LIBRARY_LINKAGE} + -Dgst-plugins-good:qt5=disabled + -Dgst-plugins-good:soup=disabled + -Dgst-plugins-good:cairo=auto # cairo[gobject] + -Dgst-plugins-good:speex=auto # speex + -Dgst-plugins-good:taglib=auto # taglib + -Dgst-plugins-good:vpx=auto # libvpx + -Dgst-plugins-good:examples=disabled + -Dgst-plugins-good:tests=disabled + -Dgst-plugins-good:nls=disabled + -Dgst-plugins-good:orc=disabled + # gst-plugins-bad + -Dbad=${PLUGIN_BAD_SUPPORT} + -Dgst-plugins-bad:default_library=${LIBRARY_LINKAGE} + -Dgst-plugins-bad:opencv=disabled + -Dgst-plugins-bad:hls-crypto=openssl + -Dgst-plugins-bad:examples=disabled + -Dgst-plugins-bad:tests=disabled + -Dgst-plugins-bad:introspection=disabled + -Dgst-plugins-bad:nls=${LIBRARY_LINKAGE} + -Dgst-plugins-bad:orc=disabled + # gst-plugins-ugly + -Dugly=${PLUGIN_UGLY_SUPPORT} + -Dgst-plugins-ugly:default_library=${LIBRARY_LINKAGE} + -Dgst-plugins-ugly:tests=disabled + -Dgst-plugins-ugly:nls=disabled + -Dgst-plugins-ugly:orc=disabled + # see ${GST_BUILD_SOURCE_PATH}/meson_options.txt + -Dpython=disabled + -Dlibav=disabled + -Dlibnice=disabled # libnice + -Ddevtools=disabled + -Dges=disabled + -Drtsp_server=disabled + -Domx=disabled + -Dvaapi=disabled + -Dsharp=disabled + -Drs=disabled + -Dgst-examples=disabled + -Dtls=disabled + -Dtests=disabled # common options + -Dexamples=disabled + -Dintrospection=disabled + -Dnls=disabled + -Dorc=disabled + -Ddoc=disabled + -Dgtk_doc=disabled + -Ddevtools=disabled + OPTIONS_DEBUG + -Dgstreamer:gst_debug=true # plugins will reference this value + OPTIONS_RELEASE + -Dgstreamer:gst_debug=false + -Dgstreamer:gobject-cast-checks=disabled + -Dgstreamer:glib-asserts=disabled + -Dgstreamer:glib-checks=disabled + -Dgstreamer:extra-checks=disabled + -Dgst-plugins-base:gobject-cast-checks=disabled + -Dgst-plugins-base:glib-asserts=disabled + -Dgst-plugins-base:glib-checks=disabled + -Dgst-plugins-good:gobject-cast-checks=disabled + -Dgst-plugins-good:glib-asserts=disabled + -Dgst-plugins-good:glib-checks=disabled + -Dgst-plugins-bad:gobject-cast-checks=disabled + -Dgst-plugins-bad:glib-asserts=disabled + -Dgst-plugins-bad:glib-checks=disabled +) +if(VCPKG_TARGET_IS_WINDOWS) + # note: can't find where z.lib comes from. replace it to appropriate library name manually + get_filename_component(BUILD_NINJA_DBG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/build.ninja ABSOLUTE) + vcpkg_replace_string(${BUILD_NINJA_DBG} "z.lib" "zlibd.lib") + get_filename_component(BUILD_NINJA_REL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja ABSOLUTE) + vcpkg_replace_string(${BUILD_NINJA_REL} "z.lib" "zlib.lib") + vcpkg_replace_string(${BUILD_NINJA_REL} "\"-Wno-unused\"" "") # todo: may need a patch for `gst_debug=false` +endif() +vcpkg_install_meson() + +# Remove duplicated GL headers (we already have `opengl-registry`) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/KHR + ${CURRENT_PACKAGES_DIR}/include/GL +) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/include/gst/gl/gstglconfig.h + ${CURRENT_PACKAGES_DIR}/include/gstreamer-1.0/gst/gl/gstglconfig.h +) + +file(INSTALL ${GST_BUILD_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/libexec + ${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/include + ${CURRENT_PACKAGES_DIR}/libexec + ${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/include +) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/bin + ) + set(PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX}) + set(SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/${PREFIX}gstreamer-full-1.0${SUFFIX} + ${CURRENT_PACKAGES_DIR}/lib/${PREFIX}gstreamer-full-1.0${SUFFIX} + ) +endif() +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB DBG_BINS ${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/*.dll + ${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/*.pdb + ) + file(COPY ${DBG_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(GLOB REL_BINS ${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/*.dll + ${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/*.pdb + ) + file(COPY ${REL_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DBG_BINS} ${REL_BINS}) +endif() \ No newline at end of file diff --git a/ports/gstreamer/vcpkg.json b/ports/gstreamer/vcpkg.json new file mode 100644 index 00000000000000..b1207ae3748e0d --- /dev/null +++ b/ports/gstreamer/vcpkg.json @@ -0,0 +1,75 @@ +{ + "name": "gstreamer", + "version": "1.18.4", + "description": "GStreamer open-source multimedia framework core library", + "homepage": "https://gstreamer.freedesktop.org/", + "license": "LGPL-2.0", + "supports": "(windows | osx) & (x64 | x86)", + "dependencies": [ + { + "name": "cairo", + "features": [ + "gobject" + ], + "platform": "windows | osx" + }, + { + "name": "freetype", + "features": [ + "brotli", + "png", + "zlib" + ] + }, + { + "name": "glib", + "host": true + }, + "graphene", + "libnice", + "libxml2", + { + "name": "opengl-registry", + "platform": "windows | osx" + }, + "openssl", + "tool-meson", + { + "name": "yasm-tool-helper", + "platform": "windows" + } + ], + "default-features": [ + "plugins-good", + "plugins-ugly" + ], + "features": { + "plugins-bad": { + "description": "'Bad' GStreamer plugins and helper libraries", + "dependencies": [ + "openh264" + ] + }, + "plugins-good": { + "description": "'Good' GStreamer plugins and helper libraries", + "dependencies": [ + "bzip2", + "jack2", + "libflac", + "libjpeg-turbo", + "libpng", + "libraw", + "libvpx", + "mpg123", + "speex", + "taglib" + ] + }, + "plugins-ugly": { + "description": "'Ugly' GStreamer plugins and helper libraries", + "dependencies": [ + "x264" + ] + } + } +} diff --git a/ports/gtest/0002-Fix-z7-override.patch b/ports/gtest/0002-Fix-z7-override.patch deleted file mode 100644 index cf875084cb7bfc..00000000000000 --- a/ports/gtest/0002-Fix-z7-override.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake -index 99725b7..3c25b0a 100644 ---- a/googletest/cmake/internal_utils.cmake -+++ b/googletest/cmake/internal_utils.cmake -@@ -66,7 +66,7 @@ macro(config_compiler_and_linker) - if (MSVC) - # Newlines inside flags variables break CMake's NMake generator. - # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds. -- set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi") -+ set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J") - set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32") - set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN") - set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1") diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL deleted file mode 100644 index 97b5ad3a8447bc..00000000000000 --- a/ports/gtest/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gtest -Version: 2019-08-14 -Homepage: https://github.com/google/googletest -Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/fix-main-lib-path.patch b/ports/gtest/fix-main-lib-path.patch new file mode 100644 index 00000000000000..8b4349f7f1daa8 --- /dev/null +++ b/ports/gtest/fix-main-lib-path.patch @@ -0,0 +1,68 @@ +diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt +index e7df8ec..1ecd596 100644 +--- a/googlemock/CMakeLists.txt ++++ b/googlemock/CMakeLists.txt +@@ -120,7 +120,8 @@ endif() + ######################################################################## + # + # Install rules +-install_project(gmock gmock_main) ++install_project(gmock) ++install_project(gmock_main) + + ######################################################################## + # +diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt +index abdd98b..7d1c01d 100644 +--- a/googletest/CMakeLists.txt ++++ b/googletest/CMakeLists.txt +@@ -148,7 +148,8 @@ target_link_libraries(gtest_main PUBLIC gtest) + ######################################################################## + # + # Install rules +-install_project(gtest gtest_main) ++install_project(gtest) ++install_project(gtest_main) + + ######################################################################## + # +diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake +index 8d8d60a..b08ce28 100644 +--- a/googletest/cmake/internal_utils.cmake ++++ b/googletest/cmake/internal_utils.cmake +@@ -315,11 +315,15 @@ function(install_project) + install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + # Install the project targets. ++ set (LIB_INSTALL_DST ${CMAKE_INSTALL_LIBDIR}) ++ if (${ARGN} MATCHES "_main") ++ set (LIB_INSTALL_DST ${CMAKE_INSTALL_LIBDIR}/manual-link) ++ endif() + install(TARGETS ${ARGN} + EXPORT ${targets_export_name} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++ ARCHIVE DESTINATION "${LIB_INSTALL_DST}" ++ LIBRARY DESTINATION "${LIB_INSTALL_DST}") + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + # Install PDBs + foreach(t ${ARGN}) +@@ -328,7 +332,7 @@ function(install_project) + get_target_property(t_pdb_output_directory ${t} PDB_OUTPUT_DIRECTORY) + install(FILES + "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<$:${t_pdb_name_debug}>$<$>:${t_pdb_name}>.pdb" +- DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ DESTINATION ${LIB_INSTALL_DST} + OPTIONAL) + endforeach() + endif() +@@ -338,7 +342,7 @@ function(install_project) + configure_file("${PROJECT_SOURCE_DIR}/cmake/${t}.pc.in" + "${configured_pc}" @ONLY) + install(FILES "${configured_pc}" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ DESTINATION "${LIB_INSTALL_DST}/pkgconfig") + endforeach() + endif() + endfunction() diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index c6fd0162c634dc..0053f5d5b4544b 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if (EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) endif() @@ -7,11 +5,11 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/googletest - REF 90a443f9c2437ca8a682a1ac625eba64e1d74a8a - SHA512 fc874a7977f11be58dc63993b520b4ae6ca43654fb5250c8b56df62a21f4dca8fcbdc81dfa106374b2bb7c59bc88952fbfc0e3ae4c7d63fdb502afbaeb39c822 + REF release-1.11.0 + SHA512 6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28 HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-z7-override.patch + fix-main-lib-path.patch ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT) @@ -27,7 +25,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GTest) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GTest TARGET_PATH share/GTest) file( INSTALL @@ -47,7 +45,6 @@ file( ) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/googletest/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtest RENAME copyright) if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) @@ -77,4 +74,4 @@ endif() vcpkg_copy_pdbs() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gtest/usage b/ports/gtest/usage index d40782e0ef2d5e..3ed19445388fd6 100644 --- a/ports/gtest/usage +++ b/ports/gtest/usage @@ -1,6 +1,8 @@ The package gtest is compatible with built-in CMake targets: enable_testing() - find_package(GTest MODULE REQUIRED) - target_link_libraries(main PRIVATE GTest::GTest GTest::Main) + + find_package(GTest CONFIG REQUIRED) + target_link_libraries(main PRIVATE GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main) + add_test(AllTestsInMain main) diff --git a/ports/gtest/vcpkg.json b/ports/gtest/vcpkg.json new file mode 100644 index 00000000000000..1d2a266ccdb79d --- /dev/null +++ b/ports/gtest/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "gtest", + "version-semver": "1.11.0", + "description": "GoogleTest and GoogleMock testing frameworks", + "homepage": "https://github.com/google/googletest" +} diff --git a/ports/gtk/CMakeLists.txt b/ports/gtk/CMakeLists.txt deleted file mode 100644 index 9c265c7e597426..00000000000000 --- a/ports/gtk/CMakeLists.txt +++ /dev/null @@ -1,177 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(gtk+ C) - -configure_file(config.h.win32 ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY) -configure_file(gdk/gdkconfig.h.win32_broadway ${CMAKE_CURRENT_SOURCE_DIR}/gdk/gdkconfig.h COPYONLY) - -set(GLIB_LIB_SUFFIX 2.0) -set(PANGO_LIB_SUFFIX 1.0) -set(ATK_LIB_SUFFIX 1.0) -set(GDK_PIXBUF_LIB_SUFFIX 2.0) -if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(CAIRO_LIB_SUFFIX d) -endif() - -if (WIN32) - # Set utf-8 charset to avoid compile error C2001 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8") -endif() - -# find dependencies -# glib -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_SUFFIX}) -find_library(GLIB_GIO_LIBRARY gio-${GLIB_LIB_SUFFIX}) -find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_SUFFIX}) -find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_SUFFIX}) -set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GIO_LIBRARY} ${GLIB_GMODULE_LIBRARY} ${GLIB_GOBJECT_LIBRARY}) - -# pango -find_path(PANGO_INCLUDE_DIR pango/pango.h) -find_library(PANGO_LIBRARY pango-${PANGO_LIB_SUFFIX}) -find_library(PANGO_CAIRO_LIBRARY pangocairo-${PANGO_LIB_SUFFIX}) -find_library(PANGO_WIN32_LIBRARY pangowin32-${PANGO_LIB_SUFFIX}) -set(PANGO_LIBRARIES ${PANGO_LIBRARY} ${PANGO_CAIRO_LIBRARY} ${PANGO_WIN32_LIBRARY}) -# cairo -find_library(CAIRO_LIBRARY cairo${CAIRO_LIB_SUFFIX}) -find_library(CAIRO_GOBJECT_LIBRARY cairo-gobject${CAIRO_LIB_SUFFIX}) -set(CAIRO_LIBRARIES ${CAIRO_LIBRARY} ${CAIRO_GOBJECT_LIBRARY}) -find_path(CAIRO_INCLUDE_DIR cairo.h) - -# atk -find_path(ATK_INCLUDE_DIR atk/atk.h) -find_library(ATK_LIBRARY atk-${ATK_LIB_SUFFIX}) - -# gdk-pixbuf -find_path(GDK_PIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h) -find_library(GDK_PIXBUF_LIBRARY gdk_pixbuf-${GDK_PIXBUF_LIB_SUFFIX}) - -# epoxy -find_path(EPOXY_INCLUDE_DIR epoxy/common.h) -find_library(EPOXY_LIBRARY epoxy) - -# gettext -find_path(LIBINTL_INCLUDE_DIR libintl.h) -find_library(LIBINTL_LIBRARY NAMES intl libintl) - -set(GTK_REQUIRED_LIBRARIES - ${LIBINTL_LIBRARY} - ${EPOXY_LIBRARY} - ${GLIB_LIBRARIES} - ${CAIRO_LIBRARIES} - ${PANGO_LIBRARIES} - ${GDK_PIXBUF_LIBRARY} - ${ATK_LIBRARY}) - -set(GTK_REQUIRED_INCLUDE_DIR - ${LIBINTL_INCLUDE_DIR} - ${EPOXY_INCLUDE_DIR} - ${GLIB_INCLUDE_DIR} - ${GDK_PIXBUF_INCLUDE_DIR} - ${CAIRO_INCLUDE_DIR} - ${PANGO_INCLUDE_DIR} - ${ATK_INCLUDE_DIR}) - -# defines expected by all modules -add_definitions( - -DHAVE_CONFIG_H - -DG_DISABLE_SINGLE_INCLUDES - -DATK_DISABLE_SINGLE_INCLUDES - -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES - -DGTK_DISABLE_SINGLE_INCLUDES - -D_USE_MATH_DEFINES) - -add_definitions(-DG_ENABLE_DEBUG) -if(CMAKE_BUILD_TYPE STREQUAL Debug) - add_definitions(-DG_ENABLE_CONSISTENCY_CHECKS) -else() - add_definitions(-DG_DISABLE_CAST_CHECKS) -endif() - -macro(extract_vcproj_sources VC_PROJECT OUT_VAR) - file(READ ${VC_PROJECT} ${VC_PROJECT}-CONTENTS) - STRING(REPLACE "\n" ";" ${VC_PROJECT}-CONTENTS "${${VC_PROJECT}-CONTENTS}") # split by lines - foreach(LINE ${${VC_PROJECT}-CONTENTS}) - if(LINE MATCHES "") - string(REPLACE "" "" LINE ${LINE}) - string(STRIP ${LINE} LINE) - file(TO_CMAKE_PATH ${LINE} LINE) - list(APPEND ${OUT_VAR} ${LINE}) - endif() - endforeach() -endmacro() - -# build 'win32' gdk backend -extract_vcproj_sources(build/win32/vs14/gdk3-win32.vcxproj GDK_WIN32_SOURCES) -add_library(gdk-3-win32 STATIC ${GDK_WIN32_SOURCES}) -target_compile_definitions(gdk-3-win32 PRIVATE - GDK_COMPILATION G_LOG_DOMAIN="Gdk" INSIDE_GDK_WIN32) -target_include_directories(gdk-3-win32 PRIVATE . ./gdk ./gdk/win32 ${GTK_REQUIRED_INCLUDE_DIR}) - -# build 'broadway' gdk backend -extract_vcproj_sources(build/win32/vs14/gdk3-broadway.vcxproj GDK_BROADWAY_SOURCES) -add_library(gdk-3-broadway STATIC ${GDK_BROADWAY_SOURCES}) -target_compile_definitions(gdk-3-broadway PRIVATE - GDK_COMPILATION G_LOG_DOMAIN="Gdk") -target_include_directories(gdk-3-broadway PRIVATE . ./gdk ./gdk/broadway ${GTK_REQUIRED_INCLUDE_DIR}) - -macro(gtk_add_module MODULE_NAME) - add_library(${MODULE_NAME} ${ARGN}) - target_include_directories(${MODULE_NAME} PRIVATE . ./gdk ./gtk ${GTK_REQUIRED_INCLUDE_DIR}) - target_link_libraries(${MODULE_NAME} ${GTK_REQUIRED_LIBRARIES}) - set_target_properties(${MODULE_NAME} PROPERTIES - ARCHIVE_OUTPUT_NAME ${MODULE_NAME}.0) - install(TARGETS ${MODULE_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) -endmacro() - -extract_vcproj_sources(build/win32/vs14/gdk-3.vcxproj GDK_SOURCES) -gtk_add_module(gdk-3 ${GDK_SOURCES}) -target_compile_definitions(gdk-3 PRIVATE GDK_COMPILATION) -target_include_directories(gdk-3 PRIVATE ./gdk/win32 ./gdk/broadway) -target_link_libraries(gdk-3 gdk-3-win32 gdk-3-broadway winmm dwmapi setupapi imm32 ws2_32) - -extract_vcproj_sources(build/win32/vs14/gtk-3.vcxproj GTK_SOURCES) -set_source_files_properties(gtk/inspector/visual.c PROPERTIES COMPILE_FLAGS "/FImath.h") -gtk_add_module(gtk-3 ${GTK_SOURCES}) -target_compile_definitions(gtk-3 PRIVATE - GTK_COMPILATION - G_LOG_DOMAIN="Gtk" - GTK_HOST="i686-pc" - GTK_PRINT_BACKENDS="file" - GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED - INCLUDE_IM_am_et - INCLUDE_IM_cedilla - INCLUDE_IM_cyrillic_translit - INCLUDE_IM_ime - INCLUDE_IM_inuktitut - INCLUDE_IM_ipa - INCLUDE_IM_multipress - INCLUDE_IM_thai - INCLUDE_IM_ti_er - INCLUDE_IM_ti_et - INCLUDE_IM_viqr - GTK_LIBDIR="/dummy/lib" - GTK_DATADIR="/dummy/share" - GTK_DATA_PREFIX="/dummy" - GTK_SYSCONFDIR="/dummy/etc" - MULTIPRESS_CONFDIR="/dummy/etc/gtk-3.0" - MULTIPRESS_LOCALEDIR="/dummy/share/locale" - GTK_VERSION="${GTK_VERSION}/etc" - GTK_BINARY_VERSION="3.0.0/etc" - GDK_DISABLE_DEPRECATED - ISOLATION_AWARE_ENABLED) -target_link_libraries(gtk-3 gdk-3 winspool comctl32 imm32) -target_compile_options(gtk-3 PRIVATE "/wd4828" PRIVATE "/wd4244" PRIVATE "/wd4305" PRIVATE "/wd4018") - -extract_vcproj_sources(build/win32/vs14/gailutil-3.vcxproj GAILUTIL_SOURCES) -gtk_add_module(gailutil-3 ${GAILUTIL_SOURCES}) -target_compile_definitions(gailutil-3 PRIVATE GTK_DISABLE_DEPRECATED GDK_DISABLE_DEPRECATED) -target_link_libraries(gailutil-3 gtk-3 gdk-3) -set_target_properties(gailutil-3 PROPERTIES - LINK_FLAGS \"/DEF:${CMAKE_CURRENT_SOURCE_DIR}/libgail-util/gailutil.def\") - -if(NOT GTK_SKIP_HEADERS) - set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) - include(install_headers) -endif() diff --git a/ports/gtk/CONTROL b/ports/gtk/CONTROL deleted file mode 100644 index 56e660c5cbeee3..00000000000000 --- a/ports/gtk/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gtk -Version: 3.22.19-3 -Homepage: https://www.gtk.org/ -Description: Portable library for creating graphical user interfaces. -Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext diff --git a/ports/gtk/build.patch b/ports/gtk/build.patch new file mode 100644 index 00000000000000..9b01b2c43374e2 --- /dev/null +++ b/ports/gtk/build.patch @@ -0,0 +1,47 @@ +diff --git a/meson.build b/meson.build +index 9fe9cd5ac..19a19e5c6 100644 +--- a/meson.build ++++ b/meson.build +@@ -845,24 +845,24 @@ subdir('po-properties') + subdir('docs/tools') + subdir('docs/reference') + +-if not meson.is_cross_build() +- if meson.version().version_compare('>=0.57.0') +- gnome.post_install( +- glib_compile_schemas: true, +- gio_querymodules: gio_module_dirs, +- gtk_update_icon_cache: true, +- ) +- else +- meson.add_install_script('build-aux/meson/post-install.py', +- gtk_api_version, +- gtk_binary_version, +- gtk_libdir, +- gtk_datadir, +- gtk_bindir) +- endif +-else +- message('Not executing post-install steps automatically when cross compiling') +-endif ++#if not meson.is_cross_build() ++# if meson.version().version_compare('>=0.57.0') ++# gnome.post_install( ++# glib_compile_schemas: true, ++# gio_querymodules: gio_module_dirs, ++# gtk_update_icon_cache: true, ++# ) ++# else ++# meson.add_install_script('build-aux/meson/post-install.py', ++# gtk_api_version, ++# gtk_binary_version, ++# gtk_libdir, ++# gtk_datadir, ++# gtk_bindir) ++# endif ++#else ++# message('Not executing post-install steps automatically when cross compiling') ++#endif + + if not meson.is_subproject() + meson.add_dist_script('build-aux/meson/dist-data.py') diff --git a/ports/gtk/cmake/install_headers.cmake b/ports/gtk/cmake/install_headers.cmake deleted file mode 100644 index ca2a273e44473e..00000000000000 --- a/ports/gtk/cmake/install_headers.cmake +++ /dev/null @@ -1,376 +0,0 @@ -install(FILES gdk/win32/gdkwin32.h DESTINATION include/gdk) -install(FILES gdk/gdk.h DESTINATION include/gdk) -install(FILES gdk/gdk-autocleanup.h DESTINATION include/gdk) -install(FILES gdk/gdkapplaunchcontext.h DESTINATION include/gdk) -install(FILES gdk/gdkcairo.h DESTINATION include/gdk) -install(FILES gdk/gdkcursor.h DESTINATION include/gdk) -install(FILES gdk/gdkdevice.h DESTINATION include/gdk) -install(FILES gdk/gdkdevicepad.h DESTINATION include/gdk) -install(FILES gdk/gdkdevicetool.h DESTINATION include/gdk) -install(FILES gdk/gdkdevicemanager.h DESTINATION include/gdk) -install(FILES gdk/gdkdisplay.h DESTINATION include/gdk) -install(FILES gdk/gdkdisplaymanager.h DESTINATION include/gdk) -install(FILES gdk/gdkdnd.h DESTINATION include/gdk) -install(FILES gdk/gdkdrawingcontext.h DESTINATION include/gdk) -install(FILES gdk/gdkevents.h DESTINATION include/gdk) -install(FILES gdk/gdkframetimings.h DESTINATION include/gdk) -install(FILES gdk/gdkglcontext.h DESTINATION include/gdk) -install(FILES gdk/gdkkeys.h DESTINATION include/gdk) -install(FILES gdk/gdkkeysyms.h DESTINATION include/gdk) -install(FILES gdk/gdkkeysyms-compat.h DESTINATION include/gdk) -install(FILES gdk/gdkmain.h DESTINATION include/gdk) -install(FILES gdk/gdkmonitor.h DESTINATION include/gdk) -install(FILES gdk/gdkpango.h DESTINATION include/gdk) -install(FILES gdk/gdkframeclock.h DESTINATION include/gdk) -install(FILES gdk/gdkpixbuf.h DESTINATION include/gdk) -install(FILES gdk/gdkprivate.h DESTINATION include/gdk) -install(FILES gdk/gdkproperty.h DESTINATION include/gdk) -install(FILES gdk/gdkrectangle.h DESTINATION include/gdk) -install(FILES gdk/gdkrgba.h DESTINATION include/gdk) -install(FILES gdk/gdkscreen.h DESTINATION include/gdk) -install(FILES gdk/gdkseat.h DESTINATION include/gdk) -install(FILES gdk/gdkselection.h DESTINATION include/gdk) -install(FILES gdk/gdktestutils.h DESTINATION include/gdk) -install(FILES gdk/gdkthreads.h DESTINATION include/gdk) -install(FILES gdk/gdktypes.h DESTINATION include/gdk) -install(FILES gdk/gdkvisual.h DESTINATION include/gdk) -install(FILES gdk/gdkwindow.h DESTINATION include/gdk) -install(FILES gdk/deprecated/gdkcolor.h DESTINATION include/gdk/deprecated) -install(FILES gdk/gdkconfig.h DESTINATION include/gdk) -install(FILES gdk/gdkenumtypes.h DESTINATION include/gdk) -install(FILES gdk/gdkversionmacros.h DESTINATION include/gdk) -install(FILES gdk/win32/gdkwin32cursor.h DESTINATION include/gdk/win32) -install(FILES gdk/win32/gdkwin32display.h DESTINATION include/gdk/win32) -install(FILES gdk/win32/gdkwin32displaymanager.h DESTINATION include/gdk/win32) -install(FILES gdk/win32/gdkwin32dnd.h DESTINATION include/gdk/win32) -install(FILES gdk/win32/gdkwin32glcontext.h DESTINATION include/gdk/win32) -install(FILES gdk/win32/gdkwin32keys.h DESTINATION include/gdk/win32) -install(FILES gdk/win32/gdkwin32misc.h DESTINATION include/gdk/win32) -install(FILES gdk/win32/gdkwin32monitor.h DESTINATION include/gdk/win32) -install(FILES gdk/win32/gdkwin32screen.h DESTINATION include/gdk/win32) -install(FILES gdk/win32/gdkwin32window.h DESTINATION include/gdk/win32) -install(FILES gtk/gtk.h DESTINATION include/gtk) -install(FILES gtk/gtk-autocleanups.h DESTINATION include/gtk) -install(FILES gtk/gtkx.h DESTINATION include/gtk) -install(FILES gtk/gtkx-autocleanups.h DESTINATION include/gtk) -install(FILES gtk/gtk-a11y.h DESTINATION include/gtk) -install(FILES gtk/gtkaboutdialog.h DESTINATION include/gtk) -install(FILES gtk/gtkaccelgroup.h DESTINATION include/gtk) -install(FILES gtk/gtkaccellabel.h DESTINATION include/gtk) -install(FILES gtk/gtkaccelmap.h DESTINATION include/gtk) -install(FILES gtk/gtkaccessible.h DESTINATION include/gtk) -install(FILES gtk/gtkactionable.h DESTINATION include/gtk) -install(FILES gtk/gtkactionbar.h DESTINATION include/gtk) -install(FILES gtk/gtkadjustment.h DESTINATION include/gtk) -install(FILES gtk/gtkappchooser.h DESTINATION include/gtk) -install(FILES gtk/gtkappchooserbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkappchooserdialog.h DESTINATION include/gtk) -install(FILES gtk/gtkappchooserwidget.h DESTINATION include/gtk) -install(FILES gtk/gtkapplication.h DESTINATION include/gtk) -install(FILES gtk/gtkapplicationwindow.h DESTINATION include/gtk) -install(FILES gtk/gtkaspectframe.h DESTINATION include/gtk) -install(FILES gtk/gtkassistant.h DESTINATION include/gtk) -install(FILES gtk/gtkbbox.h DESTINATION include/gtk) -install(FILES gtk/gtkbin.h DESTINATION include/gtk) -install(FILES gtk/gtkbindings.h DESTINATION include/gtk) -install(FILES gtk/gtkborder.h DESTINATION include/gtk) -install(FILES gtk/gtkbox.h DESTINATION include/gtk) -install(FILES gtk/gtkbuilder.h DESTINATION include/gtk) -install(FILES gtk/gtkbuildable.h DESTINATION include/gtk) -install(FILES gtk/gtkbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkcalendar.h DESTINATION include/gtk) -install(FILES gtk/gtkcellarea.h DESTINATION include/gtk) -install(FILES gtk/gtkcellareacontext.h DESTINATION include/gtk) -install(FILES gtk/gtkcellareabox.h DESTINATION include/gtk) -install(FILES gtk/gtkcelleditable.h DESTINATION include/gtk) -install(FILES gtk/gtkcelllayout.h DESTINATION include/gtk) -install(FILES gtk/gtkcellrenderer.h DESTINATION include/gtk) -install(FILES gtk/gtkcellrendereraccel.h DESTINATION include/gtk) -install(FILES gtk/gtkcellrenderercombo.h DESTINATION include/gtk) -install(FILES gtk/gtkcellrendererpixbuf.h DESTINATION include/gtk) -install(FILES gtk/gtkcellrendererprogress.h DESTINATION include/gtk) -install(FILES gtk/gtkcellrendererspin.h DESTINATION include/gtk) -install(FILES gtk/gtkcellrendererspinner.h DESTINATION include/gtk) -install(FILES gtk/gtkcellrenderertext.h DESTINATION include/gtk) -install(FILES gtk/gtkcellrenderertoggle.h DESTINATION include/gtk) -install(FILES gtk/gtkcellview.h DESTINATION include/gtk) -install(FILES gtk/gtkcheckbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkcheckmenuitem.h DESTINATION include/gtk) -install(FILES gtk/gtkclipboard.h DESTINATION include/gtk) -install(FILES gtk/gtkcolorbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkcolorchooser.h DESTINATION include/gtk) -install(FILES gtk/gtkcolorchooserwidget.h DESTINATION include/gtk) -install(FILES gtk/gtkcolorchooserdialog.h DESTINATION include/gtk) -install(FILES gtk/gtkcolorutils.h DESTINATION include/gtk) -install(FILES gtk/gtkcombobox.h DESTINATION include/gtk) -install(FILES gtk/gtkcomboboxtext.h DESTINATION include/gtk) -install(FILES gtk/gtkcontainer.h DESTINATION include/gtk) -install(FILES gtk/gtkcssprovider.h DESTINATION include/gtk) -install(FILES gtk/gtkcsssection.h DESTINATION include/gtk) -install(FILES gtk/gtkdebug.h DESTINATION include/gtk) -install(FILES gtk/gtkdialog.h DESTINATION include/gtk) -install(FILES gtk/gtkdnd.h DESTINATION include/gtk) -install(FILES gtk/gtkdragdest.h DESTINATION include/gtk) -install(FILES gtk/gtkdragsource.h DESTINATION include/gtk) -install(FILES gtk/gtkdrawingarea.h DESTINATION include/gtk) -install(FILES gtk/gtkeditable.h DESTINATION include/gtk) -install(FILES gtk/gtkentry.h DESTINATION include/gtk) -install(FILES gtk/gtkentrybuffer.h DESTINATION include/gtk) -install(FILES gtk/gtkentrycompletion.h DESTINATION include/gtk) -install(FILES gtk/gtkenums.h DESTINATION include/gtk) -install(FILES gtk/gtkeventbox.h DESTINATION include/gtk) -install(FILES gtk/gtkeventcontroller.h DESTINATION include/gtk) -install(FILES gtk/gtkexpander.h DESTINATION include/gtk) -install(FILES gtk/gtkfilechooser.h DESTINATION include/gtk) -install(FILES gtk/gtkfilechooserbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkfilechooserdialog.h DESTINATION include/gtk) -install(FILES gtk/gtkfilechoosernative.h DESTINATION include/gtk) -install(FILES gtk/gtkfilechooserwidget.h DESTINATION include/gtk) -install(FILES gtk/gtkfilefilter.h DESTINATION include/gtk) -install(FILES gtk/gtkfixed.h DESTINATION include/gtk) -install(FILES gtk/gtkflowbox.h DESTINATION include/gtk) -install(FILES gtk/gtkfontbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkfontchooser.h DESTINATION include/gtk) -install(FILES gtk/gtkfontchooserdialog.h DESTINATION include/gtk) -install(FILES gtk/gtkfontchooserwidget.h DESTINATION include/gtk) -install(FILES gtk/gtkframe.h DESTINATION include/gtk) -install(FILES gtk/gtkgesture.h DESTINATION include/gtk) -install(FILES gtk/gtkgesturedrag.h DESTINATION include/gtk) -install(FILES gtk/gtkgesturelongpress.h DESTINATION include/gtk) -install(FILES gtk/gtkgesturemultipress.h DESTINATION include/gtk) -install(FILES gtk/gtkgesturepan.h DESTINATION include/gtk) -install(FILES gtk/gtkgesturerotate.h DESTINATION include/gtk) -install(FILES gtk/gtkgesturesingle.h DESTINATION include/gtk) -install(FILES gtk/gtkgestureswipe.h DESTINATION include/gtk) -install(FILES gtk/gtkgesturezoom.h DESTINATION include/gtk) -install(FILES gtk/gtkglarea.h DESTINATION include/gtk) -install(FILES gtk/gtkgrid.h DESTINATION include/gtk) -install(FILES gtk/gtkheaderbar.h DESTINATION include/gtk) -install(FILES gtk/gtkicontheme.h DESTINATION include/gtk) -install(FILES gtk/gtkiconview.h DESTINATION include/gtk) -install(FILES gtk/gtkimage.h DESTINATION include/gtk) -install(FILES gtk/gtkimcontext.h DESTINATION include/gtk) -install(FILES gtk/gtkimcontextinfo.h DESTINATION include/gtk) -install(FILES gtk/gtkimcontextsimple.h DESTINATION include/gtk) -install(FILES gtk/gtkimmodule.h DESTINATION include/gtk) -install(FILES gtk/gtkimmulticontext.h DESTINATION include/gtk) -install(FILES gtk/gtkinfobar.h DESTINATION include/gtk) -install(FILES gtk/gtkinvisible.h DESTINATION include/gtk) -install(FILES gtk/gtklabel.h DESTINATION include/gtk) -install(FILES gtk/gtklayout.h DESTINATION include/gtk) -install(FILES gtk/gtklevelbar.h DESTINATION include/gtk) -install(FILES gtk/gtklinkbutton.h DESTINATION include/gtk) -install(FILES gtk/gtklistbox.h DESTINATION include/gtk) -install(FILES gtk/gtkliststore.h DESTINATION include/gtk) -install(FILES gtk/gtklockbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkmain.h DESTINATION include/gtk) -install(FILES gtk/gtkmenu.h DESTINATION include/gtk) -install(FILES gtk/gtkmenubar.h DESTINATION include/gtk) -install(FILES gtk/gtkmenubutton.h DESTINATION include/gtk) -install(FILES gtk/gtkmenuitem.h DESTINATION include/gtk) -install(FILES gtk/gtkmenushell.h DESTINATION include/gtk) -install(FILES gtk/gtkmenutoolbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkmessagedialog.h DESTINATION include/gtk) -install(FILES gtk/gtkmodelbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkmodules.h DESTINATION include/gtk) -install(FILES gtk/gtkmountoperation.h DESTINATION include/gtk) -install(FILES gtk/gtknativedialog.h DESTINATION include/gtk) -install(FILES gtk/gtknotebook.h DESTINATION include/gtk) -install(FILES gtk/gtkoffscreenwindow.h DESTINATION include/gtk) -install(FILES gtk/gtkorientable.h DESTINATION include/gtk) -install(FILES gtk/gtkoverlay.h DESTINATION include/gtk) -install(FILES gtk/gtkpadcontroller.h DESTINATION include/gtk) -install(FILES gtk/gtkpagesetup.h DESTINATION include/gtk) -install(FILES gtk/gtkpaned.h DESTINATION include/gtk) -install(FILES gtk/gtkpapersize.h DESTINATION include/gtk) -install(FILES gtk/gtkplacessidebar.h DESTINATION include/gtk) -install(FILES gtk/gtkplug.h DESTINATION include/gtk) -install(FILES gtk/gtkpopover.h DESTINATION include/gtk) -install(FILES gtk/gtkpopovermenu.h DESTINATION include/gtk) -install(FILES gtk/gtkprintcontext.h DESTINATION include/gtk) -install(FILES gtk/gtkprintoperation.h DESTINATION include/gtk) -install(FILES gtk/gtkprintoperationpreview.h DESTINATION include/gtk) -install(FILES gtk/gtkprintsettings.h DESTINATION include/gtk) -install(FILES gtk/gtkprogressbar.h DESTINATION include/gtk) -install(FILES gtk/gtkradiobutton.h DESTINATION include/gtk) -install(FILES gtk/gtkradiomenuitem.h DESTINATION include/gtk) -install(FILES gtk/gtkradiotoolbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkrange.h DESTINATION include/gtk) -install(FILES gtk/gtkrecentchooser.h DESTINATION include/gtk) -install(FILES gtk/gtkrecentchooserdialog.h DESTINATION include/gtk) -install(FILES gtk/gtkrecentchoosermenu.h DESTINATION include/gtk) -install(FILES gtk/gtkrecentchooserwidget.h DESTINATION include/gtk) -install(FILES gtk/gtkrecentfilter.h DESTINATION include/gtk) -install(FILES gtk/gtkrecentmanager.h DESTINATION include/gtk) -install(FILES gtk/gtkrender.h DESTINATION include/gtk) -install(FILES gtk/gtkrevealer.h DESTINATION include/gtk) -install(FILES gtk/gtkscale.h DESTINATION include/gtk) -install(FILES gtk/gtkscalebutton.h DESTINATION include/gtk) -install(FILES gtk/gtkscrollable.h DESTINATION include/gtk) -install(FILES gtk/gtkscrollbar.h DESTINATION include/gtk) -install(FILES gtk/gtkscrolledwindow.h DESTINATION include/gtk) -install(FILES gtk/gtksearchbar.h DESTINATION include/gtk) -install(FILES gtk/gtksearchentry.h DESTINATION include/gtk) -install(FILES gtk/gtkselection.h DESTINATION include/gtk) -install(FILES gtk/gtkseparator.h DESTINATION include/gtk) -install(FILES gtk/gtkseparatormenuitem.h DESTINATION include/gtk) -install(FILES gtk/gtkseparatortoolitem.h DESTINATION include/gtk) -install(FILES gtk/gtksettings.h DESTINATION include/gtk) -install(FILES gtk/gtkshortcutlabel.h DESTINATION include/gtk) -install(FILES gtk/gtkshortcutsgroup.h DESTINATION include/gtk) -install(FILES gtk/gtkshortcutssection.h DESTINATION include/gtk) -install(FILES gtk/gtkshortcutsshortcut.h DESTINATION include/gtk) -install(FILES gtk/gtkshortcutswindow.h DESTINATION include/gtk) -install(FILES gtk/gtkshow.h DESTINATION include/gtk) -install(FILES gtk/gtkstacksidebar.h DESTINATION include/gtk) -install(FILES gtk/gtksizegroup.h DESTINATION include/gtk) -install(FILES gtk/gtksizerequest.h DESTINATION include/gtk) -install(FILES gtk/gtksocket.h DESTINATION include/gtk) -install(FILES gtk/gtkspinbutton.h DESTINATION include/gtk) -install(FILES gtk/gtkspinner.h DESTINATION include/gtk) -install(FILES gtk/gtkstack.h DESTINATION include/gtk) -install(FILES gtk/gtkstackswitcher.h DESTINATION include/gtk) -install(FILES gtk/gtkstatusbar.h DESTINATION include/gtk) -install(FILES gtk/gtkstylecontext.h DESTINATION include/gtk) -install(FILES gtk/gtkstyleprovider.h DESTINATION include/gtk) -install(FILES gtk/gtkswitch.h DESTINATION include/gtk) -install(FILES gtk/gtktestutils.h DESTINATION include/gtk) -install(FILES gtk/gtktextattributes.h DESTINATION include/gtk) -install(FILES gtk/gtktextbuffer.h DESTINATION include/gtk) -install(FILES gtk/gtktextbufferrichtext.h DESTINATION include/gtk) -install(FILES gtk/gtktextchild.h DESTINATION include/gtk) -install(FILES gtk/gtktextdisplay.h DESTINATION include/gtk) -install(FILES gtk/gtktextiter.h DESTINATION include/gtk) -install(FILES gtk/gtktextmark.h DESTINATION include/gtk) -install(FILES gtk/gtktexttag.h DESTINATION include/gtk) -install(FILES gtk/gtktexttagtable.h DESTINATION include/gtk) -install(FILES gtk/gtktextview.h DESTINATION include/gtk) -install(FILES gtk/gtktogglebutton.h DESTINATION include/gtk) -install(FILES gtk/gtktoggletoolbutton.h DESTINATION include/gtk) -install(FILES gtk/gtktoolbar.h DESTINATION include/gtk) -install(FILES gtk/gtktoolbutton.h DESTINATION include/gtk) -install(FILES gtk/gtktoolitem.h DESTINATION include/gtk) -install(FILES gtk/gtktoolitemgroup.h DESTINATION include/gtk) -install(FILES gtk/gtktoolpalette.h DESTINATION include/gtk) -install(FILES gtk/gtktoolshell.h DESTINATION include/gtk) -install(FILES gtk/gtktooltip.h DESTINATION include/gtk) -install(FILES gtk/gtktreednd.h DESTINATION include/gtk) -install(FILES gtk/gtktreemodel.h DESTINATION include/gtk) -install(FILES gtk/gtktreemodelfilter.h DESTINATION include/gtk) -install(FILES gtk/gtktreemodelsort.h DESTINATION include/gtk) -install(FILES gtk/gtktreeselection.h DESTINATION include/gtk) -install(FILES gtk/gtktreesortable.h DESTINATION include/gtk) -install(FILES gtk/gtktreestore.h DESTINATION include/gtk) -install(FILES gtk/gtktreeview.h DESTINATION include/gtk) -install(FILES gtk/gtktreeviewcolumn.h DESTINATION include/gtk) -install(FILES gtk/gtktypes.h DESTINATION include/gtk) -install(FILES gtk/gtkviewport.h DESTINATION include/gtk) -install(FILES gtk/gtkvolumebutton.h DESTINATION include/gtk) -install(FILES gtk/gtkwidget.h DESTINATION include/gtk) -install(FILES gtk/gtkwidgetpath.h DESTINATION include/gtk) -install(FILES gtk/gtkwindow.h DESTINATION include/gtk) -install(FILES gtk/gtkwindowgroup.h DESTINATION include/gtk) -install(FILES gtk/gtktextlayout.h DESTINATION include/gtk) -install(FILES gtk/gtktypebuiltins.h DESTINATION include/gtk) -install(FILES gtk/gtkversion.h DESTINATION include/gtk) -install(FILES gtk/a11y/gtk-a11y-autocleanups.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkarrowaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkbooleancellaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkbuttonaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkcellaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkcellaccessibleparent.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkcheckmenuitemaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkcomboboxaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkcontaineraccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkcontainercellaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkentryaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkexpanderaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkflowboxaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkflowboxchildaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkframeaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkiconviewaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkimageaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkimagecellaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtklabelaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtklevelbaraccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtklinkbuttonaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtklistboxaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtklistboxrowaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtklockbuttonaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkmenuaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkmenubuttonaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkmenuitemaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkmenushellaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtknotebookaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtknotebookpageaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkpanedaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkpopoveraccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkprogressbaraccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkradiobuttonaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkradiomenuitemaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkrangeaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkrenderercellaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkscaleaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkscalebuttonaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkscrolledwindowaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkspinbuttonaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkspinneraccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkstatusbaraccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkstackaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkswitchaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtktextcellaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtktextviewaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtktogglebuttonaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtktoplevelaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtktreeviewaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkwidgetaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/a11y/gtkwindowaccessible.h DESTINATION include/gtk/a11y) -install(FILES gtk/deprecated/gtkactivatable.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkaction.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkactiongroup.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkalignment.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkarrow.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkcolorsel.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkcolorseldialog.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkfontsel.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkgradient.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkhandlebox.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkhbbox.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkhbox.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkhpaned.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkhscale.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkhscrollbar.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkhseparator.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkhsv.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkiconfactory.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkimagemenuitem.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkmisc.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtknumerableicon.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkradioaction.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkrc.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkrecentaction.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkstatusicon.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkstock.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkstyle.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkstyleproperties.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtksymboliccolor.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtktable.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtktearoffmenuitem.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkthemingengine.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtktoggleaction.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkuimanager.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkvbbox.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkvbox.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkvscale.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkvscrollbar.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkvseparator.h DESTINATION include/gtk/deprecated) -install(FILES gtk/deprecated/gtkvpaned.h DESTINATION include/gtk/deprecated) -install(FILES libgail-util/gailmisc.h DESTINATION include/libgail-util) -install(FILES libgail-util/gailtextutil.h DESTINATION include/libgail-util) -install(FILES libgail-util/gail-util.h DESTINATION include/libgail-util) -install(FILES gdk/broadway/gdkbroadway.h DESTINATION include/gdk) -install(FILES gdk/broadway/gdkbroadwaydisplay.h DESTINATION include/gdk/broadway) -install(FILES gdk/broadway/gdkbroadwaywindow.h DESTINATION include/gdk/broadway) -install(FILES gdk/broadway/gdkbroadwaycursor.h DESTINATION include/gdk/broadway) -install(FILES gdk/broadway/gdkbroadwaymonitor.h DESTINATION include/gdk/broadway) -install(FILES gdk/broadway/gdkbroadwayvisual.h DESTINATION include/gdk/broadway) diff --git a/ports/gtk/portfile.cmake b/ports/gtk/portfile.cmake index b915ce5f383106..ca9c0cae01e16e 100644 --- a/ports/gtk/portfile.cmake +++ b/ports/gtk/portfile.cmake @@ -1,37 +1,128 @@ -include(vcpkg_common_functions) -set(GTK_VERSION 3.22.19) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtk+-${GTK_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-${GTK_VERSION}.tar.xz" - FILENAME "gtk+-${GTK_VERSION}.tar.xz" - SHA512 c83198794433ee6eb29f8740d59bd7056cd36808b4bff1a99563ab1a1742e6635dab4f2a8be33317f74d3b336f0d1adc28dd91410da056b50a08c215f184dce2) - -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}) - -# generate sources using python script installed with glib -if(NOT EXISTS ${SOURCE_PATH}/gtk/gtkdbusgenerated.h OR NOT EXISTS ${SOURCE_PATH}/gtk/gtkdbusgenerated.c) - vcpkg_find_acquire_program(PYTHON3) - set(GLIB_TOOL_DIR ${CURRENT_INSTALLED_DIR}/tools/glib) +set(GTK_VERSION 4.3.0) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${GLIB_TOOL_DIR}/gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml - WORKING_DIRECTORY ${SOURCE_PATH}/gtk - LOGNAME source-gen) +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.gnome.org/ + OUT_SOURCE_PATH SOURCE_PATH + REPO GNOME/gtk + REF 40ebed3a03aef096addc0af09fec4ec529d882a0 #v4.3.0 + SHA512 6f68e1e2f18a4bf0299f0563ccf091cbee3a1dc1db0819565216d50f98f3f3ad4904eef746357d9bc2fdac8a5e29c5cbed5d4df5dd0f89bb941f7438ae3cd096 + HEAD_REF master # branch name + PATCHES build.patch +) + +vcpkg_find_acquire_program(PKGCONFIG) +get_filename_component(PKGCONFIG_DIR "${PKGCONFIG}" DIRECTORY ) +vcpkg_add_to_path("${PKGCONFIG_DIR}") # Post install script runs pkg-config so it needs to be on PATH +vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/glib/") + +set(x11 false) +set(win32 false) +set(osx false) +if(VCPKG_TARGET_IS_LINUX) + set(OPTIONS -Dwayland-backend=false) # CI missing at least wayland-protocols + set(x11 true) + # Enable the wayland gdk backend (only when building on Unix except for macOS) +elseif(VCPKG_TARGET_IS_WINDOWS) + set(win32 true) +elseif(VCPKG_TARGET_IS_OSX) + set(osx true) endif() -vcpkg_configure_cmake( +list(APPEND OPTIONS -Dx11-backend=${x11}) #Enable the X11 gdk backend (only when building on Unix) +list(APPEND OPTIONS -Dbroadway-backend=false) #Enable the broadway (HTML5) gdk backend +list(APPEND OPTIONS -Dwin32-backend=${win32}) #Enable the Windows gdk backend (only when building on Windows) +list(APPEND OPTIONS -Dmacos-backend=${osx}) #Enable the macOS gdk backend (only when building on macOS) + +vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS - -DGTK_VERSION=${GTK_VERSION} - OPTIONS_DEBUG - -DGTK_SKIP_HEADERS=ON) + ${OPTIONS} + -Ddemos=false + -Dbuild-examples=false + -Dbuild-tests=false + -Dinstall-tests=false + -Dgtk_doc=false + -Dman-pages=false + -Dintrospection=disabled + -Dsassc=enabled # Rebuild themes using sassc + -Dmedia-ffmpeg=disabled # Build the ffmpeg media backend + -Dmedia-gstreamer=disabled # Build the gstreamer media backend + -Dprint-cups=disabled # Build the cups print backend + -Dprint-cloudprint=disabled # Build the cloudprint print backend + -Dvulkan=disabled # Enable support for the Vulkan graphics API + -Dxinerama=disabled # Enable support for the X11 Xinerama extension + -Dcloudproviders=disabled # Enable the cloudproviders support + -Dsysprof=disabled # include tracing support for sysprof + -Dtracker=disabled # Enable Tracker3 filechooser search + -Dcolord=disabled # Build colord support for the CUPS printing backend + ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}' + gdbus-codegen='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/gdbus-codegen' + glib-compile-schemas='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-schemas${VCPKG_HOST_EXECUTABLE_SUFFIX}' + sassc='${CURRENT_INSTALLED_DIR}/tools/sassc/bin/sassc${VCPKG_HOST_EXECUTABLE_SUFFIX}' + ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}' + gdbus-codegen='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/gdbus-codegen' + glib-compile-schemas='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-schemas${VCPKG_HOST_EXECUTABLE_SUFFIX}' + sassc='${CURRENT_INSTALLED_DIR}/tools/sassc/bin/sassc${VCPKG_HOST_EXECUTABLE_SUFFIX}' +) + +vcpkg_install_meson() + +# If somebody finds out how to access and forward env variables to +# the meson install script be my guest. Nevertheless the script still +# needs manual execution in the crosscompiling case. +vcpkg_find_acquire_program(PYTHON3) +foreach(_config release debug) + if(_config STREQUAL "release") + set(_short rel) + set(_path_suffix) + else() + set(_short dbg) + set(_path_suffix /debug) + endif() + if(NOT EXISTS "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib") + continue() + endif() + message(STATUS "Running post install script: ${TARGET_TRIPLET}-${_short}") + + set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${_path_suffix}/lib/pkgconfig/") + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}") + #file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0/4.0.0/media") + #file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0/4.0.0/immodules") + #file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0/4.0.0/printbackends") + vcpkg_execute_required_process( + COMMAND "${PYTHON3}" "${SOURCE_PATH}/build-aux/meson/post-install.py" 4.0 4.0.0 "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib" "${CURRENT_PACKAGES_DIR}${_path_suffix}/share" "${CURRENT_PACKAGES_DIR}${_path_suffix}/bin" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME post-install-${TARGET_TRIPLET}-${_short} + ) + unset(ENV{PKG_CONFIG_PATH}) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0") + #file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}${_path_suffix}/bin/gtk-4.0") + #file(RENAME "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0/" "${CURRENT_PACKAGES_DIR}${_path_suffix}/bin/gtk-4.0") + message(STATUS "Post install ${TARGET_TRIPLET}-${_short} done") +endforeach() -vcpkg_install_cmake() vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtk) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gtk/COPYING ${CURRENT_PACKAGES_DIR}/share/gtk/copyright) +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +set(TOOL_NAMES gtk4-builder-tool + gtk4-encode-symbolic-svg + gtk4-query-settings + gtk4-update-icon-cache) +if(VCPKG_TARGET_IS_LINUX) + list(APPEND TOOL_NAMES gtk4-launch) +endif() +vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) + +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() diff --git a/ports/gtk/vcpkg.json b/ports/gtk/vcpkg.json new file mode 100644 index 00000000000000..ca024dccb50121 --- /dev/null +++ b/ports/gtk/vcpkg.json @@ -0,0 +1,35 @@ +{ + "name": "gtk", + "version": "4.3.0", + "description": "Portable library for creating graphical user interfaces.", + "homepage": "https://www.gtk.org/", + "dependencies": [ + "atk", + { + "name": "cairo", + "default-features": false, + "features": [ + "gobject" + ] + }, + { + "name": "cairo", + "default-features": false, + "features": [ + "x11" + ], + "platform": "linux" + }, + "gdk-pixbuf", + "gettext", + "glib", + { + "name": "glib", + "host": true + }, + "graphene", + "libepoxy", + "pango", + "sassc" + ] +} diff --git a/ports/gtkmm/CONTROL b/ports/gtkmm/CONTROL deleted file mode 100644 index 6ac1eede214b14..00000000000000 --- a/ports/gtkmm/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gtkmm -Version: 3.22.2-1 -Homepage: https://www.gtkmm.org/ -Description: gtkmm is the official C++ interface for the popular GUI library GTK+. -Build-Depends: glib, atk, gtk, gdk-pixbuf, pango, cairo, libepoxy, gettext, glibmm, atkmm, cairomm, pangomm diff --git a/ports/gtkmm/COPYING b/ports/gtkmm/COPYING deleted file mode 100644 index 4362b49151d7b3..00000000000000 --- a/ports/gtkmm/COPYING +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/ports/gtkmm/README b/ports/gtkmm/README deleted file mode 100644 index ea1d8e0a66139c..00000000000000 --- a/ports/gtkmm/README +++ /dev/null @@ -1,3 +0,0 @@ -This is gtkmm, the C++ API for GTK+. -See http://www.gtkmm.org/ - diff --git a/ports/gtkmm/fix_charset.patch b/ports/gtkmm/fix_charset.patch deleted file mode 100644 index 027d74f99c30a8..00000000000000 --- a/ports/gtkmm/fix_charset.patch +++ /dev/null @@ -1,2053 +0,0 @@ -diff --git a/MSVC_Net2013/gdkmm.vcxproj b/MSVC_Net2013/gdkmm.vcxproj -index d9d08ac..8c6b528 100644 ---- a/MSVC_Net2013/gdkmm.vcxproj -+++ b/MSVC_Net2013/gdkmm.vcxproj -@@ -1,266 +1,267 @@ --??? -- -- -- -- Debug -- Win32 -- -- -- Debug -- x64 -- -- -- Release -- Win32 -- -- -- Release -- x64 -- -- -- -- gdkmm -- {976C8F9C-1A1D-4E23-B79E-EC9091BBEA0E} -- Win32Proj -- -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- true -- true -- true -- true -- $(ProjectName)$(DebugDllSuffix) -- $(ProjectName)$(DebugDllSuffix) -- $(ProjectName)$(ReleaseDllSuffix) -- $(ProjectName)$(ReleaseDllSuffix) -- -- -- -- %(AdditionalOptions) -- Disabled -- _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- true -- -- -- Level3 -- EditAndContinue -- -- -- Generate gdkmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -- -- -+??? -+ -+ -+ -+ Debug -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ gdkmm -+ {976C8F9C-1A1D-4E23-B79E-EC9091BBEA0E} -+ Win32Proj -+ 8.1 -+ -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ true -+ true -+ true -+ true -+ $(ProjectName)$(DebugDllSuffix) -+ $(ProjectName)$(DebugDllSuffix) -+ $(ProjectName)$(ReleaseDllSuffix) -+ $(ProjectName)$(ReleaseDllSuffix) -+ -+ -+ -+ %(AdditionalOptions) -+ Disabled -+ _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ true -+ -+ -+ Level3 -+ EditAndContinue -+ -+ -+ Generate gdkmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll -- $(IntDir)\$(ProjectName).def -- true -- false -- -- -- -- -- -- -- %(AdditionalOptions) -- $(GdkMMBuildDefs);%(PreprocessorDefinitions) -- MultiThreadedDLL -- true -- -- -- Level3 -- ProgramDatabase -- -- -- Generate gdkmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -- -- -+ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll -+ $(IntDir)\$(ProjectName).def -+ true -+ false -+ -+ -+ -+ -+ -+ -+ %(AdditionalOptions) -+ $(GdkMMBuildDefs);%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ true -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate gdkmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll -- $(IntDir)\$(ProjectName).def -- true -- true -- false -- -- -- -- -- -- -- X64 -- -- -- %(AdditionalOptions) -- Disabled -- _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- true -- -- -- Level3 -- ProgramDatabase -- -- -- Generate gdkmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -- -- -+ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll -+ $(IntDir)\$(ProjectName).def -+ true -+ true -+ false -+ -+ -+ -+ -+ -+ -+ X64 -+ -+ -+ %(AdditionalOptions) -+ Disabled -+ _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ true -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate gdkmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll -- $(IntDir)\$(ProjectName).def -- true -- false -- -- -- MachineX64 -- -- -- -- -- X64 -- -- -- %(AdditionalOptions) -- $(GdkMMBuildDefs);%(PreprocessorDefinitions) -- MultiThreadedDLL -- true -- -- -- Level3 -- ProgramDatabase -- -- -- Generate gdkmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -- -- -+ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll -+ $(IntDir)\$(ProjectName).def -+ true -+ false -+ -+ -+ MachineX64 -+ -+ -+ -+ -+ X64 -+ -+ -+ %(AdditionalOptions) -+ $(GdkMMBuildDefs);%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ true -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate gdkmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll -- $(IntDir)\$(ProjectName).def -- false -- true -- true -- -- -- MachineX64 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- {07324745-c9be-4d65-b08a-9c88188c0c28} -- false -- -- -- -- -- -- -\ No newline at end of file -+ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll -+ $(IntDir)\$(ProjectName).def -+ false -+ true -+ true -+ -+ -+ MachineX64 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ {07324745-c9be-4d65-b08a-9c88188c0c28} -+ false -+ -+ -+ -+ -+ -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj -index 33dfe5e..01b9271 100644 ---- a/MSVC_Net2013/gendef.vcxproj -+++ b/MSVC_Net2013/gendef.vcxproj -@@ -21,26 +21,27 @@ - - {07324745-C9BE-4D65-B08A-9C88188C0C28} - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -diff --git a/MSVC_Net2013/gtkmm.vcxproj b/MSVC_Net2013/gtkmm.vcxproj -index 2c732f8..ad9d312 100644 ---- a/MSVC_Net2013/gtkmm.vcxproj -+++ b/MSVC_Net2013/gtkmm.vcxproj -@@ -1,700 +1,701 @@ --??? -- -- -- -- Debug -- Win32 -- -- -- Debug -- x64 -- -- -- Release -- Win32 -- -- -- Release -- x64 -- -- -- -- gtkmm -- {907B8D15-7E12-4136-A7E6-B6ED5E055D39} -- gtkmm -- Win32Proj -- -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- true -- true -- true -- true -- $(ProjectName)$(DebugDllSuffix) -- $(ProjectName)$(DebugDllSuffix) -- $(ProjectName)$(ReleaseDllSuffix) -- $(ProjectName)$(ReleaseDllSuffix) -- -- -- -- %(AdditionalOptions) -- Disabled -- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) -+??? -+ -+ -+ -+ Debug -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ gtkmm -+ {907B8D15-7E12-4136-A7E6-B6ED5E055D39} -+ gtkmm -+ Win32Proj -+ 8.1 -+ -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ true -+ true -+ true -+ true -+ $(ProjectName)$(DebugDllSuffix) -+ $(ProjectName)$(DebugDllSuffix) -+ $(ProjectName)$(ReleaseDllSuffix) -+ $(ProjectName)$(ReleaseDllSuffix) -+ -+ -+ -+ %(AdditionalOptions) -+ Disabled -+ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) - _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- true -- -- -- Level3 -- EditAndContinue -- -- -- Generate gtkmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -- -- -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ true -+ -+ -+ Level3 -+ EditAndContinue -+ -+ -+ Generate gtkmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -+ -+ - legacy_stdio_definitions.lib;%(AdditionalDependencies) -- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll -- $(IntDir)\$(ProjectName).def -- true -- false -- -- -- -- -- -- -- %(AdditionalOptions) -- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) -+ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll -+ $(IntDir)\$(ProjectName).def -+ true -+ false -+ -+ -+ -+ -+ -+ -+ %(AdditionalOptions) -+ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) - $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) -- MultiThreadedDLL -- true -- -- -- Level3 -- ProgramDatabase -- -- -- Generate gtkmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -- -- -+ MultiThreadedDLL -+ true -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate gtkmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -+ -+ - legacy_stdio_definitions.lib;%(AdditionalDependencies) -- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll -- $(IntDir)\$(ProjectName).def -- false -- true -- true -- -- -- -- -- -- -- X64 -- -- -- %(AdditionalOptions) -- Disabled -- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) -+ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll -+ $(IntDir)\$(ProjectName).def -+ false -+ true -+ true -+ -+ -+ -+ -+ -+ -+ X64 -+ -+ -+ %(AdditionalOptions) -+ Disabled -+ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) - _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- true -- -- -- Level3 -- ProgramDatabase -- -- -- Generate gtkmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -- -- -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ true -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate gtkmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -+ -+ - legacy_stdio_definitions.lib;%(AdditionalDependencies) -- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll -- $(IntDir)\$(ProjectName).def -- true -- false -- -- -- MachineX64 -- -- -- -- -- X64 -- -- -- %(AdditionalOptions) -- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) -+ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll -+ $(IntDir)\$(ProjectName).def -+ true -+ false -+ -+ -+ MachineX64 -+ -+ -+ -+ -+ X64 -+ -+ -+ %(AdditionalOptions) -+ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) - $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) -- MultiThreadedDLL -- true -- -- -- Level3 -- ProgramDatabase -- -- -- Generate gtkmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -- -- -+ MultiThreadedDLL -+ true -+ -+ -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate gtkmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj -+ -+ - legacy_stdio_definitions.lib;%(AdditionalDependencies) -- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll -- $(IntDir)\$(ProjectName).def -- true -- true -- false -- -- -- MachineX64 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- {976c8f9c-1a1d-4e23-b79e-ec9091bbea0e} -- false -- -- -- {07324745-c9be-4d65-b08a-9c88188c0c28} -- false -- -- -- -- -- -- -\ No newline at end of file -+ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll -+ $(IntDir)\$(ProjectName).def -+ true -+ true -+ false -+ -+ -+ MachineX64 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ {976c8f9c-1a1d-4e23-b79e-ec9091bbea0e} -+ false -+ -+ -+ {07324745-c9be-4d65-b08a-9c88188c0c28} -+ false -+ -+ -+ -+ -+ -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/gtkmm3-demo.vcxproj b/MSVC_Net2013/gtkmm3-demo.vcxproj -index 9c33d45..84a988a 100644 ---- a/MSVC_Net2013/gtkmm3-demo.vcxproj -+++ b/MSVC_Net2013/gtkmm3-demo.vcxproj -@@ -23,26 +23,27 @@ - {5A8BBE25-E8D8-487B-AD2D-690438F09FA1} - gtkmm3-demo - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -251,4 +252,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj -index 1df2f4b..a484bd6 100644 ---- a/MSVC_Net2013/install.vcxproj -+++ b/MSVC_Net2013/install.vcxproj -@@ -22,28 +22,29 @@ - {2093D218-190E-4194-9421-3BA7CBF33B10} - install - Win32Proj -+ 8.1 - - - - Utility -- MultiByte -+ Unicode - true - v120 - - - Utility -- MultiByte -+ Unicode - v120 - - - Utility -- MultiByte -+ Unicode - true - v120 - - - Utility -- MultiByte -+ Unicode - v120 - - diff --git a/ports/gtkmm/fix_properties.patch b/ports/gtkmm/fix_properties.patch deleted file mode 100644 index 3db0a30e5719d4..00000000000000 --- a/ports/gtkmm/fix_properties.patch +++ /dev/null @@ -1,2423 +0,0 @@ -diff --git a/MSVC_Net2013/gdkmm.vcxproj b/MSVC_Net2013/gdkmm.vcxproj -index dd495a0..94c6396 100644 ---- a/MSVC_Net2013/gdkmm.vcxproj -+++ b/MSVC_Net2013/gdkmm.vcxproj -@@ -93,7 +93,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj - - -- $(CPPDepLibsDebug);%(AdditionalDependencies) -+ %(AdditionalDependencies) - $(OutDir)$(ProjectName)$(DebugDllSuffix).dll - $(IntDir)\$(ProjectName).def - true -@@ -118,7 +118,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj - - -- $(CPPDepLibsRelease);%(AdditionalDependencies) -+ %(AdditionalDependencies) - $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll - $(IntDir)\$(ProjectName).def - true -@@ -150,7 +150,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj - - -- $(CPPDepLibsDebug);%(AdditionalDependencies) -+ %(AdditionalDependencies) - $(OutDir)$(ProjectName)$(DebugDllSuffix).dll - $(IntDir)\$(ProjectName).def - true -@@ -179,7 +179,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj - - -- $(CPPDepLibsRelease);%(AdditionalDependencies) -+ %(AdditionalDependencies) - $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll - $(IntDir)\$(ProjectName).def - false -@@ -263,4 +263,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/gdkmm.vcxproj.filters b/MSVC_Net2013/gdkmm.vcxproj.filters -index 826f785..da390e5 100644 ---- a/MSVC_Net2013/gdkmm.vcxproj.filters -+++ b/MSVC_Net2013/gdkmm.vcxproj.filters -@@ -15,71 +15,183 @@ - - - -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ - - -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ - - - - Resource Files - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/gtkmm-build-defines.props b/MSVC_Net2013/gtkmm-build-defines.props -index 880cbf7..2cb24a3 100644 ---- a/MSVC_Net2013/gtkmm-build-defines.props -+++ b/MSVC_Net2013/gtkmm-build-defines.props -@@ -4,10 +4,8 @@ - - - -- GDKMM_BUILD -- GTKMM_BUILD -- pangomm-vc$(VSVer)0-1_4.lib;giomm-vc$(VSVer)0-2_4.lib;glibmm-vc$(VSVer)0-2_4.lib;cairomm-vc$(VSVer)0-1_0.lib;sigc-vc$(VSVer)0-2_0.lib -- pangomm-vc$(VSVer)0-d-1_4.lib;giomm-vc$(VSVer)0-d-2_4.lib;glibmm-vc$(VSVer)0-d-2_4.lib;cairomm-vc$(VSVer)0-d-1_0.lib;sigc-vc$(VSVer)0-d-2_0.lib -+ GDKMM_BUILD;_WINDLL -+ GTKMM_BUILD;_WINDLL - - - <_PropertySheetDisplayName>glibmmbuilddefinesprops -@@ -16,15 +14,15 @@ - - - -- .\gdkmm;..;..\gdk;$(GlibEtcInstallRoot)\include\pangomm-1.4;$(GlibEtcInstallRoot)\lib\pangomm-1.4\include;$(GlibEtcInstallRoot)\include\giomm-2.4;$(GlibEtcInstallRoot)\lib\giomm-2.4\include;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\cairomm-1.0;$(GlibEtcInstallRoot)\lib\cairomm-1.0\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\gtk-3.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) -+ .\gdkmm;..;..\gdk;.;%(AdditionalIncludeDirectories) - msvc_recommended_pragmas.h;%(ForcedIncludeFiles) - 4250;%(DisableSpecificWarnings) - true - /d2Zi+ %(AdditionalOptions) - - -- gtk-3.0.lib;gdk-3.0.lib;gdk_pixbuf-2.0.lib;gobject-2.0.lib;gio-2.0.lib;glib-2.0.lib;epoxy.lib;%(AdditionalDependencies) -- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) -+ %(AdditionalDependencies) -+ %(AdditionalLibraryDirectories) - - - -@@ -34,11 +32,5 @@ - - $(GtkMMBuildDefs) - -- -- $(CPPDepLibsRelease) -- -- -- $(CPPDepLibsDebug) -- - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/gtkmm-version-paths.props b/MSVC_Net2013/gtkmm-version-paths.props -index f0c2834..968562a 100644 ---- a/MSVC_Net2013/gtkmm-version-paths.props -+++ b/MSVC_Net2013/gtkmm-version-paths.props -@@ -2,13 +2,9 @@ - - - 12 -- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) -- $(GlibEtcInstallRoot) - $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ - 3 - 0 -- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) -- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) - - - <_PropertySheetDisplayName>glibmmversionpathsprops -@@ -17,12 +13,6 @@ - - $(VSVer) - -- -- $(GlibEtcInstallRoot) -- -- -- $(CopyDir) -- - - $(DefDir) - -@@ -32,11 +22,5 @@ - - $(ApiMinorVersion) - -- -- $(ReleaseDllSuffix) -- -- -- $(DebugDllSuffix) -- - - -\ No newline at end of file -diff --git a/MSVC_Net2013/gtkmm.vcxproj b/MSVC_Net2013/gtkmm.vcxproj -index 8093886..ec56ed1 100644 ---- a/MSVC_Net2013/gtkmm.vcxproj -+++ b/MSVC_Net2013/gtkmm.vcxproj -@@ -80,7 +80,7 @@ - %(AdditionalOptions) - Disabled - .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) -- _DEBUG;$(GtkMMBuildDefs);%(PreprocessorDefinitions) -+ _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL -@@ -95,7 +95,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj - - -- atkmm-vc$(VSVer)0-d-1_6.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) -+ legacy_stdio_definitions.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName)$(DebugDllSuffix).dll - $(IntDir)\$(ProjectName).def - true -@@ -108,7 +108,7 @@ - - %(AdditionalOptions) - .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) -- $(GtkMMBuildDefs);%(PreprocessorDefinitions) -+ $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) - MultiThreadedDLL - true - -@@ -121,7 +121,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj - - -- atkmm-vc$(VSVer)0-1_6.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) -+ legacy_stdio_definitions.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll - $(IntDir)\$(ProjectName).def - false -@@ -139,7 +139,7 @@ - %(AdditionalOptions) - Disabled - .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) -- _DEBUG;$(GtkMMBuildDefs);%(PreprocessorDefinitions) -+ _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);) - true - EnableFastChecks - MultiThreadedDebugDLL -@@ -154,7 +154,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj - - -- atkmm-vc$(VSVer)0-d-1_6.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) -+ legacy_stdio_definitions.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName)$(DebugDllSuffix).dll - $(IntDir)\$(ProjectName).def - true -@@ -171,7 +171,7 @@ - - %(AdditionalOptions) - .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) -- $(GtkMMBuildDefs);%(PreprocessorDefinitions) -+ $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) - MultiThreadedDLL - true - -@@ -184,7 +184,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj - - -- atkmm-vc$(VSVer)0-1_6.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) -+ legacy_stdio_definitions.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll - $(IntDir)\$(ProjectName).def - true -@@ -697,4 +697,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/gtkmm.vcxproj.filters b/MSVC_Net2013/gtkmm.vcxproj.filters -index 5237502..5e8bd36 100644 ---- a/MSVC_Net2013/gtkmm.vcxproj.filters -+++ b/MSVC_Net2013/gtkmm.vcxproj.filters -@@ -14,496 +14,1459 @@ - - - -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Header Files -- Header Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Header Files -- Header Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ - - -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Source Files -- Source Files -- Source Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Source Files -- Source Files -- Source Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ - - - - Resource Files - - -- -+ -\ No newline at end of file diff --git a/ports/gtkmm/msvc_recommended_pragmas.h b/ports/gtkmm/msvc_recommended_pragmas.h deleted file mode 100644 index c0eb1d5edf4cd5..00000000000000 --- a/ports/gtkmm/msvc_recommended_pragmas.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _MSC_VER -#pragma error "This header is for Microsoft VC only." -#endif /* _MSC_VER */ - -/* Make MSVC more pedantic, this is a recommended pragma list - * from _Win32_Programming_ by Rector and Newcomer. - */ -#pragma warning(error:4002) /* too many actual parameters for macro */ -#pragma warning(error:4003) /* not enough actual parameters for macro */ -#pragma warning(1:4010) /* single-line comment contains line-continuation character */ -#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ -#pragma warning(1:4016) /* no function return type; using int as default */ -#pragma warning(error:4020) /* too many actual parameters */ -#pragma warning(error:4021) /* too few actual parameters */ -#pragma warning(error:4027) /* function declared without formal parameter list */ -#pragma warning(error:4029) /* declared formal parameter list different from definition */ -#pragma warning(error:4033) /* 'function' must return a value */ -#pragma warning(error:4035) /* 'function' : no return value */ -#pragma warning(error:4045) /* array bounds overflow */ -#pragma warning(error:4047) /* different levels of indirection */ -#pragma warning(error:4049) /* terminating line number emission */ -#pragma warning(error:4053) /* An expression of type void was used as an operand */ -#pragma warning(error:4071) /* no function prototype given */ -#pragma warning(disable:4101) /* unreferenced local variable */ -#pragma warning(error:4150) - -#pragma warning(disable:4244) /* No possible loss of data warnings */ -#pragma warning(disable:4305) /* No truncation from int to char warnings */ - -#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ - -/* work around Microsoft's premature attempt to deprecate the C-Library */ -#define _CRT_SECURE_NO_WARNINGS -#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/gtkmm/portfile.cmake b/ports/gtkmm/portfile.cmake index d3fc01bb75082e..5287256224432e 100644 --- a/ports/gtkmm/portfile.cmake +++ b/ports/gtkmm/portfile.cmake @@ -1,101 +1,30 @@ -# Glibmm uses winapi functions not available in WindowsStore, so gtkmm -# also -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) -message(FATAL_ERROR "Error: UWP builds are currently not supported.") -endif() +vcpkg_fail_port_install(ON_TARGET "uwp") -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtkmm-3.22.2) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/gtkmm/3.22/gtkmm-3.22.2.tar.xz" - FILENAME "gtkmm-3.22.2.tar.xz" - SHA512 6e96b543e459481145ee0f56f31a7ad2466bd8ccdd2abf3205998aecede73d235149ca6e5ba6e8d20a4fd5345e310870d81ac2a716d4f78d1460ed685badbdc2 + URLS "https://ftp.gnome.org/pub/GNOME/sources/gtkmm/4.0/gtkmm-4.0.1.tar.xz" + FILENAME "gtkmm-4.0.1.tar.xz" + SHA512 5b9f9f32fe85ee7a281c9d3d3b266b1265924926058d778f48302808812cad7047c09440c317497fa0069816984d3556868a703a5488e0bfd8cd26fc64afcb1b ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) - -set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) -if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) - set(VS_PLATFORM "Win32") -endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/gtkmm.sln - TARGET gtkmm - PLATFORM ${VS_PLATFORM} - USE_VCPKG_INTEGRATION +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Dmsvc14x-parallel-installable=false # Use separate DLL and LIB filenames for Visual Studio 2017 and 2019 + -Dbuild-tests=false + -Dbuild-demos=false + ADDITIONAL_NATIVE_BINARIES glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}' + ADDITIONAL_CROSS_BINARIES glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}' ) -# Handle headers -file(COPY ${SOURCE_PATH}/MSVC_Net2013/gdkmm/gdkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/gdk/gdkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file( - COPY - ${SOURCE_PATH}/gdk/gdkmm - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN *.h -) -file(COPY ${SOURCE_PATH}/MSVC_Net2013/gtkmm/gtkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/gtk/gtkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file( - COPY - ${SOURCE_PATH}/gtk/gtkmm - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN *.h -) - -# Handle libraries -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gdkmm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gdkmm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gtkmm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gtkmm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gdkmm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gdkmm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gtkmm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gtkmm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) +vcpkg_install_meson() vcpkg_copy_pdbs() -# Handle copyright and readme -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtkmm RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtkmm RENAME readme.txt) +vcpkg_fixup_pkgconfig() + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/gtkmm/vcpkg.json b/ports/gtkmm/vcpkg.json new file mode 100644 index 00000000000000..f394a6c8009038 --- /dev/null +++ b/ports/gtkmm/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "gtkmm", + "version": "4.0.1", + "description": "gtkmm is the official C++ interface for the popular GUI library GTK+.", + "homepage": "https://www.gtkmm.org/", + "supports": "!uwp", + "dependencies": [ + "atk", + "atkmm", + "cairo", + "cairomm", + "gdk-pixbuf", + "gettext", + "glib", + { + "name": "glib", + "host": true + }, + "glibmm", + "gtk", + "libepoxy", + "pango", + "pangomm" + ] +} diff --git a/ports/gts/CONTROL b/ports/gts/CONTROL deleted file mode 100644 index 917d66bf86e43b..00000000000000 --- a/ports/gts/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: gts -Version: 0.7.6-1 -Homepage: https://github.com/finetjul/gts -Description: A Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles -Build-Depends: glib diff --git a/ports/gts/fix-M_PI-in-windows.patch b/ports/gts/fix-M_PI-in-windows.patch new file mode 100644 index 00000000000000..d573ef080ff918 --- /dev/null +++ b/ports/gts/fix-M_PI-in-windows.patch @@ -0,0 +1,28 @@ +diff --git a/src/curvature.c b/src/curvature.c +index 70f6af2..a5c0187 100644 +--- a/src/curvature.c ++++ b/src/curvature.c +@@ -17,6 +17,9 @@ + * Boston, MA 02111-1307, USA. + */ + ++#ifdef _WIN32 ++#define _USE_MATH_DEFINES ++#endif + #include + #include "gts.h" + +diff --git a/src/triangle.c b/src/triangle.c +index 1d82869..47170c6 100644 +--- a/src/triangle.c ++++ b/src/triangle.c +@@ -17,6 +17,9 @@ + * Boston, MA 02111-1307, USA. + */ + ++#ifdef _WIN32 ++#define _USE_MATH_DEFINES ++#endif + #include + #include "gts.h" + diff --git a/ports/gts/fix-pkgconfig.patch b/ports/gts/fix-pkgconfig.patch new file mode 100644 index 00000000000000..59deeca22fd57b --- /dev/null +++ b/ports/gts/fix-pkgconfig.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f458c35..8035507 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,3 +124,11 @@ INSTALL(FILES + src/gtsconfig.h + DESTINATION include COMPONENT Development + ) ++ ++set(prefix ${CMAKE_INSTALL_PREFIX}) ++set(exec_prefix ${CMAKE_INSTALL_PREFIX}) ++set(libdir ${CMAKE_INSTALL_PREFIX}/lib) ++set(includedir ${CMAKE_INSTALL_PREFIX}/include) ++ ++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gts.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gts.pc" @ONLY) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gts.pc" DESTINATION lib/pkgconfig) +\ No newline at end of file +diff --git a/gts.pc.in b/gts.pc.in +index 39626d7..bcd4014 100644 +--- a/gts.pc.in ++++ b/gts.pc.in +@@ -7,5 +7,5 @@ Name: GTS + Description: GNU Triangulated Surface Library + Version: @VERSION@ + Requires: glib-2.0,gthread-2.0,gmodule-2.0 +-Libs: -L${libdir} @LIBS@ -lgts -lm ++Libs: -L${libdir} @LIBS@ -lgts + Cflags: -I${includedir} diff --git a/ports/gts/glib2.patch b/ports/gts/glib2.patch new file mode 100644 index 00000000000000..60de77c70d9e16 --- /dev/null +++ b/ports/gts/glib2.patch @@ -0,0 +1,54 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 941e9b96b..ea031828d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -85,30 +85,35 @@ include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/src + ) + +-find_library(glib_LIBRARY NAMES glib libglib glib-2.0 libglib-2.0 +- HINTS ${glib_BINARY_DIR}) ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(GLIB2 glib-2.0 IMPORTED_TARGET) + +-get_filename_component(glib_LIBRARY_DIR ${glib_LIBRARY} DIRECTORY) +-get_filename_component(glib_LIBRARY_NAME ${glib_LIBRARY} NAME) +-string(REGEX REPLACE "\\.[^.]*$" "" glib_LIBRARY_NAME ${glib_LIBRARY_NAME}) ++# find_library(glib_LIBRARY NAMES glib libglib glib-2.0 libglib-2.0 ++ # HINTS ${glib_BINARY_DIR}) + +-find_path(glib_H NAMES glib.h +- HINTS ${glib_LIBRARY_DIR}/../include) +-get_filename_component(glib_INCLUDE_DIR ${glib_H} DIRECTORY) ++# get_filename_component(glib_LIBRARY_DIR ${glib_LIBRARY} DIRECTORY) ++# get_filename_component(glib_LIBRARY_NAME ${glib_LIBRARY} NAME) ++# string(REGEX REPLACE "\\.[^.]*$" "" glib_LIBRARY_NAME ${glib_LIBRARY_NAME}) + +-set(glib_CONFIG_H) +-find_path(glib_CONFIG_H NAMES glibconfig.h +- HINTS ${glib_LIBRARY_DIR}/${glib_LIBRARY_NAME}/include) ++# find_path(glib_H NAMES glib.h ++ # HINTS ${glib_LIBRARY_DIR}/../include) ++# get_filename_component(glib_INCLUDE_DIR ${glib_H} DIRECTORY) + +-get_filename_component(glibconfig_INCLUDE_DIR ${glib_CONFIG_H} DIRECTORY) +-include_directories(${glib_INCLUDE_DIR} ${glib_CONFIG_H}) ++# set(glib_CONFIG_H) ++# find_path(glib_CONFIG_H NAMES glibconfig.h ++ # HINTS ${glib_LIBRARY_DIR}/${glib_LIBRARY_NAME}/include) ++ ++# get_filename_component(glibconfig_INCLUDE_DIR ${glib_CONFIG_H} DIRECTORY) ++# include_directories(${glib_INCLUDE_DIR} ${glib_CONFIG_H}) ++include_directories(${GLIB2_INCLUDE_DIRS}) + + if (NOT WIN32 AND BUILD_SHARED_LIBS) + add_definitions(/DGTS_COMPILATION) + endif() + + add_library(${kit} SHARED ${srcs}) +-target_link_libraries(${kit} ${glib_LIBRARY}) ++target_include_directories(${kit} PUBLIC ${GLIB2_INCLUDE_DIRS}) ++target_link_libraries(${kit} PkgConfig::GLIB2) + + if(MSVC) + SET_TARGET_PROPERTIES(${kit} PROPERTIES LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/src/gts.def\"") diff --git a/ports/gts/portfile.cmake b/ports/gts/portfile.cmake index 71a62e756a2eae..98ea07a8fab5ae 100644 --- a/ports/gts/portfile.cmake +++ b/ports/gts/portfile.cmake @@ -1,25 +1,29 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO finetjul/gts - REF c4da61ae075f355d9ecc9f2d4767acf777f54c2b + REF c4da61ae075f355d9ecc9f2d4767acf777f54c2b #0.7.6 SHA512 e53d11213c26cbda08ae62e6388aee0a14d2884de72268ad25d10a23e77baa53a2b1151c5cc7643b059ded82b8edf0da79144c3108949fdc515168cac13ffca9 HEAD_REF master + PATCHES + fix-M_PI-in-windows.patch + support-unix.patch + fix-pkgconfig.patch + glib2.patch ) - +vcpkg_find_acquire_program(PKGCONFIG) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + OPTIONS + -DPKG_CONFIG_EXECUTABLE=${PKGCONFIG} ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gts RENAME copyright) - +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/gts/support-unix.patch b/ports/gts/support-unix.patch new file mode 100644 index 00000000000000..597b4f54520004 --- /dev/null +++ b/ports/gts/support-unix.patch @@ -0,0 +1,190 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c35100c..f458c35 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.1) + add_executable(predicates_init src/predicates_init.c) + + execute_process( +- COMMAND predicates_init.exe ++ COMMAND predicates_init + OUTPUT_FILE predicates_init.h + OUTPUT_VARIABLE OUTVAR) + +@@ -12,6 +12,31 @@ MESSAGE("${OUTVAR}") + set(kit gts) + project(${kit}) + ++if (NOT WIN32) ++ set(CPP_HAS_WARNING 1) ++ set(HAVE_DLFCN_H 1) ++ set(HAVE_FLOATINGPOINT_H 1) ++ set(HAVE_FPU_CONTROL_H 1) ++ set(HAVE_GETOPT_H 1) ++ set(HAVE_GETOPT_LONG 1) ++ set(HAVE_INTTYPES_H 1) ++ set(HAVE_MEMORY_H 1) ++ set(HAVE_STDINT_H 1) ++ set(HAVE_STDLIB_H 1) ++ set(HAVE_STRINGS_H 1) ++ set(HAVE_STRING_H 1) ++ set(HAVE_SYS_STAT_H 1) ++ set(HAVE_SYS_TYPES_H 1) ++ set(HAVE_UNISTD_H 1) ++ set(PACKAGE_BUGREPORT 0) ++ set(PACKAGE_NAME "gts") ++ set(PACKAGE_STRING "0.7.6") ++ set(PACKAGE_TARNAME "gts") ++ set(PACKAGE_URL "") ++ set(PACKAGE_VERSION "0.7.6") ++ set(STDC_HEADERS) ++endif() ++ + set(srcs + src/bbtree.c + src/boolean.c +@@ -49,7 +74,11 @@ set(srcs + src/vopt.c + ) + ++if (WIN32) + configure_file(src/config.h.win32 config.h) ++else() ++configure_file(config.h.in config.h @ONLY) ++endif() + + SET(CMAKE_INCLUDE_CURRENT_DIR ON) + include_directories( +@@ -74,7 +103,9 @@ find_path(glib_CONFIG_H NAMES glibconfig.h + get_filename_component(glibconfig_INCLUDE_DIR ${glib_CONFIG_H} DIRECTORY) + include_directories(${glib_INCLUDE_DIR} ${glib_CONFIG_H}) + ++if (NOT WIN32 AND BUILD_SHARED_LIBS) + add_definitions(/DGTS_COMPILATION) ++endif() + + add_library(${kit} SHARED ${srcs}) + target_link_libraries(${kit} ${glib_LIBRARY}) +diff --git a/config.h.in b/config.h.in +index ad95945..fe6c945 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -1,89 +1,89 @@ + /* config.h.in. Generated from configure.ac by autoheader. */ + + /* Define if C preprocessor supports warning directive. */ +-#undef CPP_HAS_WARNING ++#cmakedefine CPP_HAS_WARNING @CPP_HAS_WARNING@ + + /* Binary age */ +-#undef GTS_BINARY_AGE ++#define GTS_BINARY_AGE 0 + + /* Interface age */ +-#undef GTS_INTERFACE_AGE ++#define GTS_INTERFACE_AGE 0 + + /* Major version */ +-#undef GTS_MAJOR_VERSION ++#define GTS_MAJOR_VERSION 0 + + /* Micro version */ +-#undef GTS_MICRO_VERSION ++#define GTS_MICRO_VERSION 0 + + /* Minor version */ +-#undef GTS_MINOR_VERSION ++#define GTS_MINOR_VERSION 6 + + /* Define to 1 if you have the header file. */ +-#undef HAVE_DLFCN_H ++#cmakedefine HAVE_DLFCN_H @HAVE_DLFCN_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_FLOATINGPOINT_H ++#cmakedefine HAVE_FLOATINGPOINT_H @HAVE_FLOATINGPOINT_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_FPU_CONTROL_H ++#cmakedefine HAVE_FPU_CONTROL_H @HAVE_FPU_CONTROL_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_GETOPT_H ++#cmakedefine HAVE_GETOPT_H @HAVE_GETOPT_H@ + + /* Define to 1 if you have the `getopt_long' function. */ +-#undef HAVE_GETOPT_LONG ++#cmakedefine HAVE_GETOPT_LONG @HAVE_GETOPT_LONG@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_INTTYPES_H ++#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_MEMORY_H ++#cmakedefine HAVE_MEMORY_H @HAVE_MEMORY_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STDINT_H ++#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STDLIB_H ++#cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STRINGS_H ++#cmakedefine HAVE_STRINGS_H @HAVE_STRINGS_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STRING_H ++#cmakedefine HAVE_STRING_H @HAVE_STRING_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_STAT_H ++#cmakedefine HAVE_SYS_STAT_H @HAVE_SYS_STAT_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_TYPES_H ++#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_UNISTD_H ++#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@ + + /* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +-#undef LT_OBJDIR ++#cmakedefine LT_OBJDIR @LT_OBJDIR@ + + /* Define if netpbm include files are in netpbm/. */ +-#undef NETPBM_INCLUDE ++#cmakedefine NETPBM_INCLUDE @NETPBM_INCLUDE@ + + /* Define to the address where bug reports for this package should be sent. */ +-#undef PACKAGE_BUGREPORT ++#cmakedefine PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@ + + /* Define to the full name of this package. */ +-#undef PACKAGE_NAME ++#cmakedefine PACKAGE_NAME @PACKAGE_NAME@ + + /* Define to the full name and version of this package. */ +-#undef PACKAGE_STRING ++#cmakedefine PACKAGE_STRING @PACKAGE_STRING@ + + /* Define to the one symbol short name of this package. */ +-#undef PACKAGE_TARNAME ++#cmakedefine PACKAGE_TARNAME @PACKAGE_TARNAME@ + + /* Define to the home page for this package. */ +-#undef PACKAGE_URL ++#cmakedefine PACKAGE_URL @PACKAGE_URL@ + + /* Define to the version of this package. */ +-#undef PACKAGE_VERSION ++#cmakedefine PACKAGE_VERSION @PACKAGE_VERSION@ + + /* Define to 1 if you have the ANSI C header files. */ +-#undef STDC_HEADERS ++#cmakedefine STDC_HEADERS @STDC_HEADERS@ diff --git a/ports/gts/vcpkg.json b/ports/gts/vcpkg.json new file mode 100644 index 00000000000000..45de1e6a448c62 --- /dev/null +++ b/ports/gts/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "gts", + "version": "0.7.6", + "port-version": 4, + "description": "A Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles", + "homepage": "https://github.com/finetjul/gts", + "dependencies": [ + "glib" + ] +} diff --git a/ports/guetzli/CONTROL b/ports/guetzli/CONTROL deleted file mode 100644 index 8fe11f58dfe4af..00000000000000 --- a/ports/guetzli/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: guetzli -Version: 2018-07-30-2 -Homepage: https://github.com/google/guetzli -Description: Perceptual JPEG encoder -Build-Depends: libpng, butteraugli diff --git a/ports/guetzli/portfile.cmake b/ports/guetzli/portfile.cmake index 5e104146100f03..d2260241845425 100644 --- a/ports/guetzli/portfile.cmake +++ b/ports/guetzli/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/guetzli - REF 0b78c7cc8b1b6cbaaf3d08b1facb599bcec1d101 - SHA512 54c5198c4c066858dd1377a32e765f46a589f3444bea303b54326453d0e8e71f959d3aaf2c72f4714fd27891f4d93288e7fa96baf1fd10f127929c1fcfa5ae1c + REF 214f2bb42abf5a577c079d00add5d6cc470620d3 # accessed on 2020-09-14 + SHA512 841cb14df4d27d3227e0ef8ecff6bd8a222d791abfc8fb593bf68996ed8861a9cc483f1a9b140023a247a5b1a350197601ca75a990507aaafa1b2dd03f8577d0 HEAD_REF master PATCHES butteraugli.patch ) diff --git a/ports/guetzli/vcpkg.json b/ports/guetzli/vcpkg.json new file mode 100644 index 00000000000000..63228967765c94 --- /dev/null +++ b/ports/guetzli/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "guetzli", + "version-string": "2020-09-14", + "port-version": 1, + "description": "Perceptual JPEG encoder", + "homepage": "https://github.com/google/guetzli", + "dependencies": [ + "butteraugli", + "libpng" + ] +} diff --git a/ports/gumbo/CONTROL b/ports/gumbo/CONTROL deleted file mode 100644 index c6741b93417a92..00000000000000 --- a/ports/gumbo/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: gumbo -Version: 0.10.1-3 -Homepage: https://github.com/google/gumbo-parser -Description: An HTML5 parsing library in pure C99 diff --git a/ports/gumbo/portfile.cmake b/ports/gumbo/portfile.cmake index 715decc2339cc0..55ece8267fbae3 100644 --- a/ports/gumbo/portfile.cmake +++ b/ports/gumbo/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/gumbo/vcpkg.json b/ports/gumbo/vcpkg.json new file mode 100644 index 00000000000000..650c5b6f385e30 --- /dev/null +++ b/ports/gumbo/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "gumbo", + "version-string": "0.10.1", + "port-version": 4, + "description": "An HTML5 parsing library in pure C99", + "homepage": "https://github.com/google/gumbo-parser" +} diff --git a/ports/gzip-hpp/portfile.cmake b/ports/gzip-hpp/portfile.cmake new file mode 100644 index 00000000000000..c490c726e58d80 --- /dev/null +++ b/ports/gzip-hpp/portfile.cmake @@ -0,0 +1,14 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/gzip-hpp + REF v0.1.0 + SHA512 4f332f08e842583b421932f14ee736a64d090ac22fd4e4654e5d84667c2fd6dcd73206b27b7c0c4f364104af7f4a5ad765c38125574bc239fa93b0b0ec4dad56 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/gzip DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/gzip-hpp/vcpkg.json b/ports/gzip-hpp/vcpkg.json new file mode 100644 index 00000000000000..96cb8d6f073b10 --- /dev/null +++ b/ports/gzip-hpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "gzip-hpp", + "version-string": "0.1.0", + "port-version": 1, + "description": "Gzip header-only C++ library", + "homepage": "https://github.com/mapbox/gzip-hpp/", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/h3/portfile.cmake b/ports/h3/portfile.cmake new file mode 100644 index 00000000000000..880bcb98fc3990 --- /dev/null +++ b/ports/h3/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uber/h3 + REF 26a6409156ba8539b2b332f799486572f1f8bab2 #v3.6.3 + SHA512 ee3450a5720951254fcdd9bb3acc4b33ed4a58c214e1ed8a091791674b57f0a48de76f0483b31b0b2ad9c316af6a5fcb0c3b72428b8f6380d6b6f717aaed73d7 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_BENCHMARKS=OFF + -DBUILD_FILTERS=OFF + -DBUILD_GENERATORS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/h3/vcpkg.json b/ports/h3/vcpkg.json new file mode 100644 index 00000000000000..6e1c8ebeec31f4 --- /dev/null +++ b/ports/h3/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "h3", + "version-semver": "3.7.2", + "description": "A Hexagonal Hierarchical Geospatial Indexing System", + "homepage": "https://github.com/uber/h3", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/h5py-lzf/0001-disable-H5PLget_plugin-api.patch b/ports/h5py-lzf/0001-disable-H5PLget_plugin-api.patch new file mode 100644 index 00000000000000..12f89845fc1528 --- /dev/null +++ b/ports/h5py-lzf/0001-disable-H5PLget_plugin-api.patch @@ -0,0 +1,16 @@ +diff --git a/lzf/lzf_filter.c b/lzf/lzf_filter.c +index 951b1e4c..b2fbffc1 100644 +--- a/lzf/lzf_filter.c ++++ b/lzf/lzf_filter.c +@@ -93,9 +93,9 @@ static const H5Z_class_t filter_class = { + + #include "H5PLextern.h" + +-H5PL_type_t H5PLget_plugin_type(void){ return H5PL_TYPE_FILTER; } ++//H5PL_type_t H5PLget_plugin_type(void){ return H5PL_TYPE_FILTER; } + +-const void *H5PLget_plugin_info(void){ return &filter_class; } ++//const void *H5PLget_plugin_info(void){ return &filter_class; } + + #endif + #endif diff --git a/ports/h5py-lzf/CMakeLists.txt b/ports/h5py-lzf/CMakeLists.txt new file mode 100644 index 00000000000000..3ef3950c7239e5 --- /dev/null +++ b/ports/h5py-lzf/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.13) +project(h5py-lzf) + +find_package(hdf5 CONFIG REQUIRED) + +add_library(h5py-lzf STATIC lzf_filter.c lzf/lzf_c.c lzf/lzf_d.c) +target_include_directories(h5py-lzf PUBLIC $) +target_link_libraries(h5py-lzf PRIVATE libzstd $) +install(TARGETS h5py-lzf EXPORT h5py-lzf-config ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +install(EXPORT h5py-lzf-config DESTINATION share/cmake/h5py-lzf) +install(FILES lzf_filter.h lzf/lzf.h DESTINATION include) diff --git a/ports/h5py-lzf/portfile.cmake b/ports/h5py-lzf/portfile.cmake new file mode 100644 index 00000000000000..71b4709b8627ff --- /dev/null +++ b/ports/h5py-lzf/portfile.cmake @@ -0,0 +1,34 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(link_hdf5_SHARED 0) +else() + set(link_hdf5_SHARED 1) +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO h5py/h5py + REF 81ba118ee66b97a94678e8f5675c4114649dfda4 + SHA512 c789abdc563f8d2535f0a2ef5e233eb862281559a9cdc3ec560dd69b4d403b6f923f5390390da54851e1bfef1be8de7f80999c25a7f3ac4962ee0620179c6420 + HEAD_REF master + PATCHES + 0001-disable-H5PLget_plugin-api.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/lzf) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/lzf + PREFER_NINJA + OPTIONS + -Dlink_hdf5_SHARED=${link_hdf5_SHARED} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/lzf/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/h5py-lzf/vcpkg.json b/ports/h5py-lzf/vcpkg.json new file mode 100644 index 00000000000000..eb203ee5fdd13c --- /dev/null +++ b/ports/h5py-lzf/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "h5py-lzf", + "version-string": "2019-12-04", + "port-version": 1, + "description": "The LZF filter is an alternative DEFLATE-style compressor for HDF5 datasets, using the free LZF library by Marc Alexander Lehmann.", + "homepage": "https://github.com/h5py/h5py/tree/master/lzf", + "dependencies": [ + "hdf5" + ] +} diff --git a/ports/halide/CONTROL b/ports/halide/CONTROL deleted file mode 100644 index cd7008837d701d..00000000000000 --- a/ports/halide/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: halide -Version: release_2018_02_15-1 -Homepage: https://github.com/halide/Halide -Description: Halide is a programming language designed to make it easier to write high-performance image processing code on modern machines. diff --git a/ports/halide/portfile.cmake b/ports/halide/portfile.cmake index 6c6e6fe9dbb684..486726c289e395 100644 --- a/ports/halide/portfile.cmake +++ b/ports/halide/portfile.cmake @@ -1,85 +1,75 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(TARGET_ARCHITECTURE 32) - set(FILE_HASH 4de27307f3355c318f21497a5b8641d215dbfbe2beb55472b9108e96aa9190300a5a8559f0c5e2788b56103f8284807e293ca362dee22adba62ae0f3b021766f) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(TARGET_ARCHITECTURE 64) - set(FILE_HASH a751c263335cbef725554b9a9b7b71811c0872d97109af5339124cb1db291a6f7e0bfb712f19982829477bf4fa2ad3c70ca5353b73697d1984504257b0894798) -else() - message(FATAL_ERROR "Error: halide does not support the ${VCPKG_TARGET_ARCHITECTURE} architecture.") -endif() - -set(COMMIT_HASH 46d8e9e0cdae456489f1eddfd6d829956fc3c843) -set(RELEASE_DATE 2018_02_15) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/halide-win-${TARGET_ARCHITECTURE}-distro-trunk-${COMMIT_HASH}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/halide/Halide/releases/download/release_${RELEASE_DATE}/halide-win-${TARGET_ARCHITECTURE}-distro-trunk-${COMMIT_HASH}.zip" - FILENAME "halide-win-${TARGET_ARCHITECTURE}-distro-trunk-${COMMIT_HASH}.zip" - SHA512 ${FILE_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO halide/Halide + REF 5dabcaa9effca1067f907f6c8ea212f3d2b1d99a # v12.0.1 + SHA512 5ab44703850885561337e23d8b538a5adfe1611e24e8daa4a1313756b4f9dfeb54e89bf8400d46a3340c00234402681b4f44ba3ed5322027fd6cb5dfbd525acd + HEAD_REF release/12.x ) -vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) -vcpkg_download_distfile(LICENSE - URLS "https://raw.githubusercontent.com/halide/Halide/release_${RELEASE_DATE}/LICENSE.txt" - FILENAME "halide-release_${RELEASE_DATE}-LICENSE.txt" - SHA512 bf11aa011ce872bcd51fe8d350f7238ad1eceb61eb7af788a2d78a6cfdfa9095abeeb2d230ead5c5299d245d6507a7b4374e3294703c126dcdae531db5a5ba7a +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + target-aarch64 TARGET_AARCH64 + target-amdgpu TARGET_AMDGPU + target-arm TARGET_ARM + target-d3d12compute TARGET_D3D12COMPUTE + target-hexagon TARGET_HEXAGON + target-metal TARGET_METAL + target-mips TARGET_MIPS + target-nvptx TARGET_NVPTX + target-opencl TARGET_OPENCL + target-powerpc TARGET_POWERPC + target-riscv TARGET_RISCV + target-x86 TARGET_X86 ) -set(SOURCE_PATH ${SOURCE_PATH}/halide) - -file( - INSTALL - "${SOURCE_PATH}/include/Halide.h" - "${SOURCE_PATH}/include/HalideBuffer.h" - "${SOURCE_PATH}/include/HalideRuntime.h" - "${SOURCE_PATH}/include/HalideRuntimeCuda.h" - "${SOURCE_PATH}/include/HalideRuntimeHexagonHost.h" - "${SOURCE_PATH}/include/HalideRuntimeMetal.h" - "${SOURCE_PATH}/include/HalideRuntimeOpenCL.h" - "${SOURCE_PATH}/include/HalideRuntimeOpenGL.h" - "${SOURCE_PATH}/include/HalideRuntimeOpenGLCompute.h" - "${SOURCE_PATH}/include/HalideRuntimeQurt.h" - DESTINATION - ${CURRENT_PACKAGES_DIR}/include +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${FEATURE_OPTIONS} + -DWITH_DOCS=NO + -DWITH_PYTHON_BINDINGS=NO + -DWITH_TESTS=NO + -DWITH_TUTORIALS=NO + -DWITH_UTILS=NO + -DCMAKE_INSTALL_LIBDIR=bin + -DCMAKE_INSTALL_DATADIR=share/${PORT} + -DHalide_INSTALL_CMAKEDIR=share/${PORT} + -DHalide_INSTALL_HELPERSDIR=share/HalideHelpers + -DHalide_INSTALL_PLUGINDIR=bin ) -file( - INSTALL - "${SOURCE_PATH}/tools/halide_image_io.h" - DESTINATION - ${CURRENT_PACKAGES_DIR}/include -) +# ADD_BIN_TO_PATH needed to compile autoschedulers, +# which use Halide.dll (and deps) during the build. +vcpkg_cmake_install(ADD_BIN_TO_PATH) -file( - INSTALL - "${SOURCE_PATH}/Release/Halide.lib" - DESTINATION - ${CURRENT_PACKAGES_DIR}/lib +vcpkg_copy_tools( + TOOL_NAMES + featurization_to_sample + get_host_target + retrain_cost_model + weightsdir_to_weightsfile + AUTO_CLEAN ) -file( - INSTALL - "${SOURCE_PATH}/Debug/Halide.lib" - DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/lib +# Release mode MODULE targets in CMake don't get PDBs. +# Exclude those to avoid warning with default globs. +vcpkg_copy_pdbs( + BUILD_PATHS + "${CURRENT_PACKAGES_DIR}/bin/Halide.dll" + "${CURRENT_PACKAGES_DIR}/debug/bin/*.dll" ) -file( - INSTALL - "${SOURCE_PATH}/Release/Halide.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/bin -) +vcpkg_cmake_config_fixup() +vcpkg_cmake_config_fixup(PACKAGE_NAME HalideHelpers) -file( - INSTALL - "${SOURCE_PATH}/Debug/Halide.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/bin -) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/tutorial) + +file(GLOB readmes "${CURRENT_PACKAGES_DIR}/share/${PORT}/*.md") +file(REMOVE ${readmes}) -file(INSTALL "${LICENSE}" DESTINATION ${CURRENT_PACKAGES_DIR}/share/halide RENAME copyright) +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage COPYONLY) diff --git a/ports/halide/usage b/ports/halide/usage new file mode 100644 index 00000000000000..591e497db458ef --- /dev/null +++ b/ports/halide/usage @@ -0,0 +1,14 @@ +The package halide provides CMake targets: + + find_package(Halide REQUIRED) + + # JIT mode: + target_link_libraries(main PRIVATE Halide::Halide) + + # AOT mode: + target_link_libraries(gen PRIVATE Halide::Generator) + add_halide_library(filter FROM gen) + target_link_libraries(main PRIVATE filter) + +For more information see: + https://github.com/halide/Halide/blob/v12.0.1/README_cmake.md diff --git a/ports/halide/vcpkg.json b/ports/halide/vcpkg.json new file mode 100644 index 00000000000000..baa99449ae8893 --- /dev/null +++ b/ports/halide/vcpkg.json @@ -0,0 +1,207 @@ +{ + "name": "halide", + "version": "12.0.1", + "port-version": 1, + "description": "Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines.", + "homepage": "https://github.com/halide/Halide", + "supports": "!uwp", + "dependencies": [ + { + "name": "llvm", + "features": [ + "clang", + "enable-rtti", + "tools" + ] + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "jit" + ], + "features": { + "jit": { + "description": "Include targets required for jit compilation", + "dependencies": [ + { + "name": "halide", + "default-features": false, + "features": [ + "target-aarch64" + ], + "platform": "arm64" + }, + { + "name": "halide", + "default-features": false, + "features": [ + "target-x86" + ], + "platform": "x86 | x64" + }, + { + "name": "halide", + "default-features": false, + "features": [ + "target-arm" + ], + "platform": "arm & !arm64" + }, + { + "name": "halide", + "features": [ + "target-all" + ], + "platform": "!x86 & !x64 & !arm & !arm64" + } + ] + }, + "target-aarch64": { + "description": "Include AArch64 target", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-aarch64" + ] + } + ] + }, + "target-all": { + "description": "Include all targets", + "dependencies": [ + { + "name": "halide", + "default-features": false, + "features": [ + "target-aarch64", + "target-amdgpu", + "target-arm", + "target-d3d12compute", + "target-hexagon", + "target-metal", + "target-mips", + "target-nvptx", + "target-opencl", + "target-powerpc", + "target-riscv", + "target-x86" + ] + } + ] + }, + "target-amdgpu": { + "description": "Include AMDGPU target", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-amdgpu" + ] + } + ] + }, + "target-arm": { + "description": "Include ARM target", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-arm" + ] + } + ] + }, + "target-d3d12compute": { + "description": "Include Direct3D 12 Compute target" + }, + "target-hexagon": { + "description": "Include Hexagon target", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-hexagon" + ] + } + ] + }, + "target-metal": { + "description": "Include Metal target" + }, + "target-mips": { + "description": "Include Mips target", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-mips" + ] + } + ] + }, + "target-nvptx": { + "description": "Include NVPTX target", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-nvptx" + ] + } + ] + }, + "target-opencl": { + "description": "Include OpenCL-C target" + }, + "target-powerpc": { + "description": "Include PowerPC target", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-powerpc" + ] + } + ] + }, + "target-riscv": { + "description": "Include RISCV target", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-riscv" + ] + } + ] + }, + "target-x86": { + "description": "Include X86 target", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-x86" + ] + } + ] + } + } +} diff --git a/ports/happly/portfile.cmake b/ports/happly/portfile.cmake new file mode 100644 index 00000000000000..f10a673b4430bd --- /dev/null +++ b/ports/happly/portfile.cmake @@ -0,0 +1,13 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nmwsharp/happly + REF 88f79725d32d78e0e637ebf42d8432d519e1c7d0 + SHA512 79f2be2d4f5583bc4ea63d92af142fc1a59c91610dee5d2bbbd3fbfb6ff6cd697cd6cc6d740ac3878278257f550c739832b2ecf10887b0607045e9f09a35c92c + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/happly.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/happly/vcpkg.json b/ports/happly/vcpkg.json new file mode 100644 index 00000000000000..d9439a11c6e43f --- /dev/null +++ b/ports/happly/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "happly", + "version-date": "2021-03-19", + "description": "A header-only C++ reader/writer for the PLY file format.", + "homepage": "https://github.com/nmwsharp/happly" +} diff --git a/ports/harfbuzz/0001-circumvent-samefile-error.patch b/ports/harfbuzz/0001-circumvent-samefile-error.patch new file mode 100755 index 00000000000000..40aaac0b4d2d68 --- /dev/null +++ b/ports/harfbuzz/0001-circumvent-samefile-error.patch @@ -0,0 +1,42 @@ +diff --git a/src/gen-harfbuzzcc.py b/src/gen-harfbuzzcc.py +index b25bcc7..f3bc87a 100644 +--- a/src/gen-harfbuzzcc.py ++++ b/src/gen-harfbuzzcc.py +@@ -15,4 +15,8 @@ with open (OUTPUT, "wb") as f: + f.write ("".join ('#include "{}"\n'.format (os.path.basename (x)) for x in sources if x.endswith (".cc")).encode ()) + + # copy it also to src/ +-shutil.copyfile (OUTPUT, os.path.join (CURRENT_SOURCE_DIR, os.path.basename (OUTPUT))) ++src = OUTPUT ++dst = os.path.join (CURRENT_SOURCE_DIR, os.path.basename (OUTPUT)) ++# Avoid SameFileError ++if not os.path.samefile(src, dst): ++ shutil.copyfile (src, dst) +diff --git a/src/gen-hb-version.py b/src/gen-hb-version.py +index 879811f..c376721 100644 +--- a/src/gen-hb-version.py ++++ b/src/gen-hb-version.py +@@ -33,4 +33,8 @@ with open (INPUT, "r", encoding='utf-8') as template: + .encode ()) + + # copy it also to src/ +-shutil.copyfile (OUTPUT, os.path.join (CURRENT_SOURCE_DIR, os.path.basename (OUTPUT))) ++src = OUTPUT ++dst = os.path.join(CURRENT_SOURCE_DIR, os.path.basename (OUTPUT)) ++# Avoid SameFileError if src and dst is the same ++if not os.path.samefile(src, dst): ++ shutil.copyfile (src, dst) +diff --git a/src/gen-ragel-artifacts.py b/src/gen-ragel-artifacts.py +index d22e03a..2b1e819 100644 +--- a/src/gen-ragel-artifacts.py ++++ b/src/gen-ragel-artifacts.py +@@ -22,4 +22,8 @@ hh = rl.replace ('.rl', '.hh') + subprocess.Popen (ragel.split() + ['-e', '-F1', '-o', hh, rl], cwd=outdir).wait () + + # copy it also to src/ +-shutil.copyfile (os.path.join (outdir, hh), os.path.join (CURRENT_SOURCE_DIR, hh)) ++src = os.path.join (outdir, hh) ++dst = os.path.join (CURRENT_SOURCE_DIR, hh) ++# Avoid SameFileError ++if not os.path.samefile(src, dst): ++ shutil.copyfile (src, dst) diff --git a/ports/harfbuzz/0001-fix-cmake-export.patch b/ports/harfbuzz/0001-fix-cmake-export.patch deleted file mode 100644 index c3264dfd532c62..00000000000000 --- a/ports/harfbuzz/0001-fix-cmake-export.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 019e205..8a464a5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -795,7 +795,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - ) - install(EXPORT harfbuzzConfig - NAMESPACE harfbuzz:: -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/harfbuzz -+ DESTINATION share/harfbuzz - ) - if (HB_BUILD_UTILS) - if (WIN32 AND BUILD_SHARED_LIBS) diff --git a/ports/harfbuzz/0003-remove-broken-test.patch b/ports/harfbuzz/0003-remove-broken-test.patch deleted file mode 100644 index 2a3b234eed27dd..00000000000000 --- a/ports/harfbuzz/0003-remove-broken-test.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc -index 85993d1..3e8e642 100644 ---- a/src/hb-coretext.cc -+++ b/src/hb-coretext.cc -@@ -1059,21 +1059,6 @@ resize_and_retry: - buffer->len += num_glyphs; - } - -- /* Mac OS 10.6 doesn't have kCTTypesetterOptionForcedEmbeddingLevel, -- * or if it does, it doesn't respect it. So we get runs with wrong -- * directions. As such, disable the assert... It wouldn't crash, but -- * cursoring will be off... -- * -- * https://crbug.com/419769 -- */ -- if (false) -- { -- /* Make sure all runs had the expected direction. */ -- HB_UNUSED bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); -- assert (bool (status_and & kCTRunStatusRightToLeft) == backward); -- assert (bool (status_or & kCTRunStatusRightToLeft) == backward); -- } -- - buffer->clear_positions (); - - unsigned int count = buffer->len; diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL deleted file mode 100644 index 8952d04d4b903f..00000000000000 --- a/ports/harfbuzz/CONTROL +++ /dev/null @@ -1,21 +0,0 @@ -Source: harfbuzz -Version: 2.5.3 -Description: HarfBuzz OpenType text shaping engine -Homepage: https://github.com/behdad/harfbuzz -Build-Depends: freetype, ragel, gettext (osx) -Default-Features: ucdn - -Feature: graphite2 -Build-Depends: graphite2 -Description: Graphite2 shaper support - -Feature: icu -Build-Depends: icu -Description: icu support for harfbuzz - -Feature: ucdn -Description: Builtin (UCDN) Unicode callbacks support - -Feature: glib -Build-Depends: glib -Description: Glib Unicode callbacks support diff --git a/ports/harfbuzz/find-package-freetype-2.patch b/ports/harfbuzz/find-package-freetype-2.patch deleted file mode 100644 index 608e9c890eeb66..00000000000000 --- a/ports/harfbuzz/find-package-freetype-2.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index defd5d6..03f9d4e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -267,7 +267,7 @@ set (subset_project_headers - - ## Find and include needed header folders and libraries - if (HB_HAVE_FREETYPE) -- include (FindFreetype) -+ find_package(Freetype REQUIRED) - if (NOT FREETYPE_FOUND) - message(FATAL_ERROR "HB_HAVE_FREETYPE was set, but we failed to find it. Maybe add a CMAKE_PREFIX_PATH= to your Freetype2 install prefix") - endif () diff --git a/ports/harfbuzz/glib-cmake.patch b/ports/harfbuzz/glib-cmake.patch deleted file mode 100644 index ddbc9671237820..00000000000000 --- a/ports/harfbuzz/glib-cmake.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2d6e77e8..36e4b4e6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -306,22 +306,14 @@ endif () - if (HB_HAVE_GLIB) - add_definitions(-DHAVE_GLIB) - -- # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindGLIB.cmake -- find_package(PkgConfig) -- pkg_check_modules(PC_GLIB QUIET glib-2.0) -- -- find_library(GLIB_LIBRARIES NAMES glib-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS}) -- find_path(GLIBCONFIG_INCLUDE_DIR NAMES glibconfig.h HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0/include) -- find_path(GLIB_INCLUDE_DIR NAMES glib.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0) -- -- include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR}) -+ find_package(Threads REQUIRED) -+ find_package(unofficial-iconv REQUIRED) -+ find_package(unofficial-glib CONFIG REQUIRED) - - list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc) - list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h) - -- list(APPEND THIRD_PARTY_LIBS ${GLIB_LIBRARIES}) -- -- mark_as_advanced(GLIB_LIBRARIES GLIBCONFIG_INCLUDE_DIR GLIB_INCLUDE_DIR) -+ list(APPEND THIRD_PARTY_LIBS unofficial::glib::glib) - endif () - - if (HB_HAVE_ICU) diff --git a/ports/harfbuzz/harfbuzzConfig.cmake.in b/ports/harfbuzz/harfbuzzConfig.cmake.in new file mode 100644 index 00000000000000..a142735cf2a927 --- /dev/null +++ b/ports/harfbuzz/harfbuzzConfig.cmake.in @@ -0,0 +1,61 @@ +# For old projects where the minimum CMake version is lower than 3.3. +cmake_policy(SET CMP0057 NEW) + +if(TARGET harfbuzz) + return() +endif() + +add_library(harfbuzz INTERFACE IMPORTED GLOBAL) +add_library(harfbuzz::harfbuzz ALIAS harfbuzz) + +find_library(HARFBUZZ_LIBRARY_DEBUG NAMES harfbuzz PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) +if(HARFBUZZ_LIBRARY_DEBUG) + target_link_libraries(harfbuzz INTERFACE $<$:${HARFBUZZ_LIBRARY_DEBUG}>) +endif() + +find_library(HARFBUZZ_LIBRARY_RELEASE NAMES harfbuzz PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) +if(HARFBUZZ_LIBRARY_RELEASE) + target_link_libraries(harfbuzz INTERFACE $<$>:${HARFBUZZ_LIBRARY_RELEASE}>) +endif() + +set(HARFBUZZ_FEATURES @FEATURES@) + +if(APPLE) + find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices) + target_link_libraries(harfbuzz INTERFACE ${APPLICATIONSERVICES_LIBRARY}) +endif() + +find_package(freetype CONFIG REQUIRED) +target_link_libraries(harfbuzz INTERFACE freetype) + +if ("graphite2" IN_LIST HARFBUZZ_FEATURES) + find_library(GRAPHITE2_LIBRARY_DEBUG NAMES graphite2 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) + if(GRAPHITE2_LIBRARY_DEBUG) + target_link_libraries(harfbuzz INTERFACE $<$:${GRAPHITE2_LIBRARY_DEBUG}>) + endif() + + find_library(GRAPHITE2_LIBRARY_RELEASE NAMES graphite2 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) + if(GRAPHITE2_LIBRARY_RELEASE) + target_link_libraries(harfbuzz INTERFACE $<$>:${GRAPHITE2_LIBRARY_RELEASE}>) + endif() +endif() + +if ("glib" IN_LIST HARFBUZZ_FEATURES) + find_library(GLIB_LIBRARY_DEBUG NAMES glib glib-2.0 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) + if(GLIB_LIBRARY_DEBUG) + target_link_libraries(harfbuzz INTERFACE $<$:${GLIB_LIBRARY_DEBUG}>) + endif() + + find_library(GLIB_LIBRARY_RELEASE NAMES glib glib-2.0 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) + if(GLIB_LIBRARY_RELEASE) + target_link_libraries(harfbuzz INTERFACE $<$>:${GLIB_LIBRARY_RELEASE}>) + endif() +endif() + +if ("icu" IN_LIST HARFBUZZ_FEATURES) + find_package(ICU 61 COMPONENTS uc REQUIRED) + target_link_libraries(harfbuzz INTERFACE ICU::uc) +endif() + +get_filename_component(_INSTALL_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) +target_include_directories(harfbuzz INTERFACE ${_INSTALL_DIR}/include/harfbuzz) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 98e6b15af8d7eb..bb5cdc37f68a78 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -1,91 +1,83 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO harfbuzz/harfbuzz - REF 2.5.3 - SHA512 d541463b3647fc2c7ddaa29aedcea1c3bde5e26e0d529384d66d630af3aaf2a4befb3c4d47c93833f099339a0f951fb132011a02c57fc00ba543bd1b17026ffa + REF 9aa6f8a93f035dd0a1e3978da495d830049480c8 # 2.9.0 + SHA512 7ef82298e6f5e0d8a78bb6a408e2ec0a4016c7931ef69d52e75ed8e9e0b31628f2ae5ea913dcbfa7d5159412ae487400ea1391254477064ba8fb1aa0cdbe5ed9 HEAD_REF master PATCHES - 0001-fix-cmake-export.patch + # This patch is a workaround that is needed until the following issues are resolved upstream: + # - https://github.com/mesonbuild/meson/issues/8375 + # - https://github.com/harfbuzz/harfbuzz/issues/2870 + # Details: https://github.com/microsoft/vcpkg/issues/16262 + 0001-circumvent-samefile-error.patch 0002-fix-uwp-build.patch - 0003-remove-broken-test.patch - # This patch is required for propagating the full list of static dependencies from freetype - find-package-freetype-2.patch - # This patch is required for propagating the full list of dependencies from glib - glib-cmake.patch ) -file(READ ${SOURCE_PATH}/CMakeLists.txt _contents) - -if("${_contents}" MATCHES "include \\(FindFreetype\\)") - message(FATAL_ERROR "Harfbuzz's cmake must not directly include() FindFreetype.") -endif() - -if("${_contents}" MATCHES "find_library\\(GLIB_LIBRARIES") - message(FATAL_ERROR "Harfbuzz's cmake must not directly find_library() glib.") -endif() - -SET(HB_HAVE_ICU "OFF") if("icu" IN_LIST FEATURES) - SET(HB_HAVE_ICU "ON") + list(APPEND FEATURE_OPTIONS -Dicu=enabled) # Enable ICU library unicode functions +else() + list(APPEND FEATURE_OPTIONS -Dicu=disabled) endif() - -SET(HB_HAVE_GRAPHITE2 "OFF") if("graphite2" IN_LIST FEATURES) - SET(HB_HAVE_GRAPHITE2 "ON") + list(APPEND FEATURE_OPTIONS -Dgraphite=enabled) #Enable Graphite2 complementary shaper +else() + list(APPEND FEATURE_OPTIONS -Dgraphite=disabled) endif() - -## Unicode callbacks - -# Builtin (UCDN) -set(BUILTIN_UCDN OFF) -if("ucdn" IN_LIST FEATURES) - set(BUILTIN_UCDN ON) +if("coretext" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -Dcoretext=enabled) # Enable CoreText shaper backend on macOS + if(NOT VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "Feature 'coretext' os only available on OSX") + endif() +else() + list(APPEND FEATURE_OPTIONS -Dcoretext=disabled) endif() - -# Glib -set(HAVE_GLIB OFF) if("glib" IN_LIST FEATURES) - set(HAVE_GLIB ON) + list(APPEND FEATURE_OPTIONS -Dglib=enabled) # Enable GLib unicode functions + list(APPEND FEATURE_OPTIONS -Dgobject=enabled) #Enable GObject bindings +else() + list(APPEND FEATURE_OPTIONS -Dglib=disabled) + list(APPEND FEATURE_OPTIONS -Dgobject=disabled) endif() +list(APPEND FEATURE_OPTIONS -Dfreetype=enabled) #Enable freetype interop helpers +#if(VCPKG_TARGET_IS_WINDOWS) + #link errors in qt5-base. probably requires changes to the pc files generated by meson + #list(APPEND FEATURE_OPTIONS -Dgdi=enabled) # enable gdi helpers and uniscribe shaper backend (windows only) +#endif() -# At least one Unicode callback must be specified, or harfbuzz compilation fails -if(NOT (BUILTIN_UCDN OR HAVE_GLIB)) - message(FATAL_ERROR "Error: At least one Unicode callback must be specified (ucdn, glib).") -endif() -vcpkg_configure_cmake( +vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DHB_HAVE_FREETYPE=ON - -DHB_BUILTIN_UCDN=${BUILTIN_UCDN} - -DHB_HAVE_ICU=${HB_HAVE_ICU} - -DHB_HAVE_GLIB=${HAVE_GLIB} - -DHB_HAVE_GRAPHITE2=${HB_HAVE_GRAPHITE2} - -DHB_BUILD_TESTS=OFF - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON + OPTIONS ${FEATURE_OPTIONS} + -Dcairo=disabled # Use Cairo graphics library + -Dintrospection=disabled # Generate gobject-introspection bindings (.gir/.typelib files) + -Ddocs=disabled # Generate documentation with gtk-doc + -Dtests=disabled + -Dbenchmark=disabled + ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() - +vcpkg_install_meson() vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() -if (HAVE_GLIB) - # Propagate dependency on glib downstream - file(READ "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" _contents) - file(WRITE "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" " -include(CMakeFindDependencyMacro) -find_dependency(unofficial-glib CONFIG) - -${_contents} -") -endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake") +configure_file("${CMAKE_CURRENT_LIST_DIR}/harfbuzzConfig.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/harfbuzzConfig.cmake" @ONLY) # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -vcpkg_test_cmake(PACKAGE_NAME harfbuzz) +if("glib" IN_LIST FEATURES) + list(APPEND TOOL_NAMES hb-subset hb-shape hb-ot-shape-closure) +endif() +if(TOOL_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() diff --git a/ports/harfbuzz/vcpkg.json b/ports/harfbuzz/vcpkg.json new file mode 100644 index 00000000000000..4bab551741e0e2 --- /dev/null +++ b/ports/harfbuzz/vcpkg.json @@ -0,0 +1,43 @@ +{ + "name": "harfbuzz", + "version-semver": "2.9.0", + "description": "HarfBuzz OpenType text shaping engine", + "homepage": "https://github.com/harfbuzz/harfbuzz", + "dependencies": [ + { + "name": "freetype", + "default-features": false + }, + { + "name": "gettext", + "platform": "osx" + } + ], + "features": { + "coretext": { + "description": "Enable CoreText shaper backend on macOS" + }, + "glib": { + "description": "Glib Unicode callbacks support", + "dependencies": [ + "glib", + { + "name": "glib", + "host": true + } + ] + }, + "graphite2": { + "description": "Graphite2 shaper support", + "dependencies": [ + "graphite2" + ] + }, + "icu": { + "description": "icu support for harfbuzz", + "dependencies": [ + "icu" + ] + } + } +} diff --git a/ports/hayai/CONTROL b/ports/hayai/CONTROL deleted file mode 100644 index 7943d301b92b88..00000000000000 --- a/ports/hayai/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: hayai -Version: 2019-08-10 -Description: C++ benchmarking framework -Homepage: https://github.com/nickbruun/hayai diff --git a/ports/hayai/portfile.cmake b/ports/hayai/portfile.cmake index c175d6633cb58c..4fa698d18f9a71 100644 --- a/ports/hayai/portfile.cmake +++ b/ports/hayai/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -65,6 +63,3 @@ endif() # Handle copyright configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/hayai/vcpkg.json b/ports/hayai/vcpkg.json new file mode 100644 index 00000000000000..847c0d2fc1d704 --- /dev/null +++ b/ports/hayai/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "hayai", + "version-string": "2019-08-10", + "port-version": 1, + "description": "C++ benchmarking framework", + "homepage": "https://github.com/nickbruun/hayai" +} diff --git a/ports/hazelcast-cpp-client/portfile.cmake b/ports/hazelcast-cpp-client/portfile.cmake new file mode 100644 index 00000000000000..d7f7278b65fa18 --- /dev/null +++ b/ports/hazelcast-cpp-client/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hazelcast/hazelcast-cpp-client + REF v4.2.0 + SHA512 7dc91968c95930d966c9bf005c0756c3702b9f27d96543bd6beffd20be36f9d9840676be2e9473b68f5cfa420c39c6feef0d7538270c798633aad5d0714df56c + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openssl WITH_OPENSSL + example BUILD_EXAMPLES +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/hazelcast-cpp-client) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/hazelcast-cpp-client/vcpkg.json b/ports/hazelcast-cpp-client/vcpkg.json new file mode 100644 index 00000000000000..42879c11df3cca --- /dev/null +++ b/ports/hazelcast-cpp-client/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "hazelcast-cpp-client", + "version-semver": "4.2.0", + "description": "C++ client library for Hazelcast in-memory database.", + "homepage": "https://github.com/hazelcast/hazelcast-cpp-client", + "documentation": "http://hazelcast.github.io/hazelcast-cpp-client/index.html", + "supports": "!uwp", + "dependencies": [ + "boost-any", + "boost-asio", + "boost-chrono", + "boost-format", + "boost-optional", + "boost-property-tree", + "boost-system", + "boost-thread", + "boost-uuid" + ], + "features": { + "example": { + "description": "Build examples for Hazelcast C++ client" + }, + "openssl": { + "description": "Build hazelcast C++ client with SSL support", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL deleted file mode 100644 index 542062c5067a10..00000000000000 --- a/ports/hdf5/CONTROL +++ /dev/null @@ -1,12 +0,0 @@ -Source: hdf5 -Version: 1.10.5-8 -Homepage: https://www.hdfgroup.org/downloads/hdf5/ -Description: HDF5 is a data model, library, and file format for storing and managing data -Build-Depends: zlib, szip - -Feature: parallel -Description: parallel support for HDF5 -Build-Depends: mpi - -Feature: cpp -Description: Builds cpp lib diff --git a/ports/hdf5/hdf5_config.patch b/ports/hdf5/hdf5_config.patch index 012424cf1b50ff..553a02346abc6c 100644 --- a/ports/hdf5/hdf5_config.patch +++ b/ports/hdf5/hdf5_config.patch @@ -1,28 +1,31 @@ -diff --git a/hdf5-config.cmake.in_old b/hdf5-config.cmake.in -index 3bd9e1dc..d95897d3 100644 ---- a/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in -+++ b/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in -@@ -108,11 +108,19 @@ set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@) +diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in +index b5a12a650..a8cbacb1c 100644 +--- a/config/cmake/hdf5-config.cmake.in ++++ b/config/cmake/hdf5-config.cmake.in +@@ -54,7 +54,10 @@ set (${HDF5_PACKAGE_NAME}_PARALLEL_FILTERED_WRITES "@PARALLEL_FILTERED_WRITES@") + #----------------------------------------------------------------------------- + # Dependencies + #----------------------------------------------------------------------------- ++include(CMakeFindDependencyMacro) ++ + if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL) ++ find_dependency(MPI) + set (${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_DIRS@") + set (${HDF5_PACKAGE_NAME}_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@") + if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN) +@@ -110,11 +113,11 @@ set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@) # project which has already built hdf5 as a subproject #----------------------------------------------------------------------------- if (NOT TARGET "@HDF5_PACKAGE@") -- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib") +- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) - include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) -+ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND NOT TARGET "zlib") -+ if(${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) -+ #include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) -+ else() -+ #find_package(@ZLIB_PACKAGE_NAME@ REQUIRED) -+ endif() ++ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT) ++ find_dependency(ZLIB) endif () -- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip") +- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) - include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) -+ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND NOT TARGET "szip") -+ if(${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) -+ include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) -+ else() -+ find_package(@SZIP_PACKAGE_NAME@ REQUIRED) -+ endif() ++ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT) ++ find_dependency(szip) endif () include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) endif () diff --git a/ports/hdf5/mingw-import-libs.patch b/ports/hdf5/mingw-import-libs.patch new file mode 100644 index 00000000000000..f328fa1d2a5302 --- /dev/null +++ b/ports/hdf5/mingw-import-libs.patch @@ -0,0 +1,30 @@ +diff -urw a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake +--- a/config/cmake_ext_mod/HDFMacros.cmake 2020-03-03 00:03:12.000000000 +0100 ++++ b/config/cmake_ext_mod/HDFMacros.cmake 2021-05-12 07:56:13.703041807 +0200 +@@ -144,7 +144,7 @@ + endif () + + #----- Use MSVC Naming conventions for Shared Libraries +- if (MINGW AND ${libtype} MATCHES "SHARED") ++ if (FALSE AND MINGW AND ${libtype} MATCHES "SHARED") + set_target_properties (${libtarget} PROPERTIES + IMPORT_SUFFIX ".lib" + IMPORT_PREFIX "" +@@ -168,7 +168,7 @@ + + if (${libtype} MATCHES "SHARED") + if (WIN32) +- if (MINGW) ++ if (FALSE AND MINGW) + set_target_properties (${libtarget} PROPERTIES + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}.lib" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" +@@ -180,7 +180,7 @@ + ) + endif () + else () +- if (MINGW) ++ if (FALSE AND MINGW) + set_target_properties (${libtarget} PROPERTIES + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}.lib" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" diff --git a/ports/hdf5/pkgconfig-link-order.patch b/ports/hdf5/pkgconfig-link-order.patch new file mode 100644 index 00000000000000..66349c66c9b108 --- /dev/null +++ b/ports/hdf5/pkgconfig-link-order.patch @@ -0,0 +1,11 @@ +diff --git a/config/cmake/libhdf5.pc.in b/config/cmake/libhdf5.pc.in +index 4a2ebaa..3cb42d2 100644 +--- a/config/cmake/libhdf5.pc.in ++++ b/config/cmake/libhdf5.pc.in +@@ -10,5 +10,5 @@ Version: @_PKG_CONFIG_VERSION@ + Cflags: -I${includedir} + Libs: -L${libdir} @_PKG_CONFIG_SH_LIBS@ + Requires: @_PKG_CONFIG_REQUIRES@ +-Libs.private: @_PKG_CONFIG_LIBS_PRIVATE@ @_PKG_CONFIG_LIBS@ ++Libs.private: @_PKG_CONFIG_LIBS@ @_PKG_CONFIG_LIBS_PRIVATE@ + Requires.private: @_PKG_CONFIG_REQUIRES_PRIVATE@ diff --git a/ports/hdf5/pkgconfig-requires.patch b/ports/hdf5/pkgconfig-requires.patch new file mode 100644 index 00000000000000..5c670b422e22d0 --- /dev/null +++ b/ports/hdf5/pkgconfig-requires.patch @@ -0,0 +1,51 @@ +diff -urN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2020-03-03 00:03:12.000000000 +0100 ++++ b/CMakeLists.txt 2021-05-15 15:02:03.496210691 +0200 +@@ -682,6 +682,9 @@ + if (MPI_C_LINK_FLAGS) + set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") + endif () ++ if(UNIX) ++ set(ompi-c_PC_LIBS_PRIVATE ${MPI_C_LIBRARIES}) ++ endif() + endif () + + #option (DEFAULT_API_VERSION "Enable v1.12 API (v16, v18, v110, v112)" "v112") +diff -urN a/CMakeFilters.cmake b/CMakeFilters.cmake +--- a/CMakeFilters.cmake 2020-03-03 00:03:12.000000000 +0100 ++++ b/CMakeFilters.cmake 2021-05-15 12:35:58.453641554 +0200 +@@ -55,6 +55,7 @@ + if (ZLIB_FOUND) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES}) + set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${ZLIB_LIBRARIES}) ++ set (zlib_PC_LIBS_PRIVATE "${ZLIB_LIBRARIES}") + endif () + endif () + endif () +@@ -130,6 +131,7 @@ + set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_SHARED_LIBRARY}) + endif () + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY}) ++ set (szip_PC_LIBS_PRIVATE "${SZIP_STATIC_LIBRARY}") + INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS}) + message (STATUS "Filter SZIP is ON") + if (H5_HAVE_FILTER_SZIP) +diff -urN a/src/CMakeLists.txt b/src/CMakeLists.txt +--- a/src/CMakeLists.txt 2020-03-03 00:03:12.000000000 +0100 ++++ b/src/CMakeLists.txt 2021-05-15 12:41:34.762354040 +0200 +@@ -1259,6 +1259,15 @@ + + set (_PKG_CONFIG_REQUIRES) + set (_PKG_CONFIG_REQUIRES_PRIVATE) ++set(_PKG_CONFIG_LIBS_PRIVATE " ${_PKG_CONFIG_LIBS_PRIVATE} ") ++foreach(_module IN ITEMS ompi-c szip zlib) ++ if(${_module}_PC_LIBS_PRIVATE) ++ foreach(_lib IN LISTS ${_module}_PC_LIBS_PRIVATE) ++ string(REPLACE " -l${_lib} " " " _PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE}") ++ endforeach() ++ string(APPEND _PKG_CONFIG_REQUIRES_PRIVATE " ${_module}") ++ endif() ++endforeach() + + configure_file ( + ${HDF_RESOURCES_DIR}/libhdf5.pc.in diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index 1a148c2c327e3c..cd85ab359c5dcd 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -1,66 +1,158 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() +# highfive should be updated together with hdf5 -include(vcpkg_common_functions) -vcpkg_download_distfile(ARCHIVE - URLS "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/CMake-hdf5-1.10.5.tar.gz" - FILENAME "CMake-hdf5-1.10.5.tar.gz" - SHA512 a25ea28d7a511f9184d97b5b8cd4c6d52dcdcad2bffd670e24a1c9a6f98b03108014a853553fa2b00d4be7523128b5fd6a4454545e3b17ff8c66fea16a09e962 -) +vcpkg_fail_port_install(ON_TARGET "UWP") -vcpkg_extract_source_archive_ex( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF hdf5 + REPO HDFGroup/hdf5 + REF hdf5-1_12_0 + SHA512 d84df1ea72dc6fa038440a370e1b1ff523364474e7f214b967edc26d3191b2ef4fe1d9273c4a086a5945f1ad1ab6aa8dbcda495898e7967b2b73fd93dd5071e0 + HEAD_REF develop PATCHES hdf5_config.patch + szip.patch + mingw-import-libs.patch + pkgconfig-requires.patch + pkgconfig-link-order.patch ) -set(SOURCE_PATH ${SOURCE_PATH}/hdf5-1.10.5) -if ("parallel" IN_LIST FEATURES) - set(ENABLE_PARALLEL ON) -else() - set(ENABLE_PARALLEL OFF) +if ("parallel" IN_LIST FEATURES AND "cpp" IN_LIST FEATURES) + message(FATAL_ERROR "Feature Parallel and C++ options are mutually exclusive.") endif() -if ("cpp" IN_LIST FEATURES) - set(ENABLE_CPP ON) -else() - set(ENABLE_CPP OFF) +if ("fortran" IN_LIST FEATURE) + message(WARNING "Fortran is not yet official supported within VCPKG. Build will most likly fail if ninja 1.10 and a Fortran compiler are not available.") endif() -file(REMOVE ${SOURCE_PATH}/config/cmake_ext_mod/FindSZIP.cmake)#Outdated; does not find debug szip +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + parallel HDF5_ENABLE_PARALLEL + tools HDF5_BUILD_TOOLS + cpp HDF5_BUILD_CPP_LIB + szip HDF5_ENABLE_SZIP_SUPPORT + szip HDF5_ENABLE_SZIP_ENCODING + zlib HDF5_ENABLE_Z_LIB_SUPPORT + fortran HDF5_BUILD_FORTRAN + threadsafe HDF5_ENABLE_THREADSAFE +) + +file(REMOVE "${SOURCE_PATH}/config/cmake_ext_mod/FindSZIP.cmake")#Outdated; does not find debug szip + +if(FEATURES MATCHES "tools" AND VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND FEATURE_OPTIONS -DBUILD_STATIC_EXECS=ON) +endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} +if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND FEATURE_OPTIONS + -DBUILD_STATIC_LIBS=OFF + -DONLY_SHARED_LIBS=ON) +endif() + + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" DISABLE_PARALLEL_CONFIGURE PREFER_NINJA OPTIONS + ${FEATURE_OPTIONS} -DBUILD_TESTING=OFF -DHDF5_BUILD_EXAMPLES=OFF - -DHDF5_BUILD_TOOLS=OFF - -DHDF5_BUILD_CPP_LIB=${ENABLE_CPP} - -DHDF5_ENABLE_PARALLEL=${ENABLE_PARALLEL} - -DHDF5_ENABLE_Z_LIB_SUPPORT=ON - -DHDF5_ENABLE_SZIP_SUPPORT=ON - -DHDF5_ENABLE_SZIP_ENCODING=ON -DHDF5_INSTALL_DATA_DIR=share/hdf5/data -DHDF5_INSTALL_CMAKE_DIR=share + -DHDF_PACKAGE_NAMESPACE:STRING=hdf5:: ) - -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets() +vcpkg_cmake_config_fixup() -#Linux build create additional scripts here. I dont know what they are doing so I am deleting them and hope for the best -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +set(debug_suffix debug) +if(VCPKG_TARGET_IS_WINDOWS) + set(debug_suffix D) endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hdf5-1.12.0.pc") + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hdf5-1.12.0.pc" + "-lhdf5" + "-lhdf5_${debug_suffix}" + ) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hdf5_hl-1.12.0.pc") + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hdf5_hl-1.12.0.pc" + "-lhdf5_hl" + "-lhdf5_hl_${debug_suffix}" + ) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hdf5_cpp-1.12.0.pc") + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hdf5_cpp-1.12.0.pc" + "-lhdf5_cpp" + "-lhdf5_cpp_${debug_suffix}" + ) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hdf5_cpp-1.12.0.pc" + "Requires.private: hdf5" + "" + ) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/hdf5_cpp-1.12.0.pc") + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/hdf5_cpp-1.12.0.pc" + "Requires.private: hdf5" + "" + ) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hdf5_hl_cpp-1.12.0.pc") + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/hdf5_hl_cpp-1.12.0.pc" + "-lhdf5_hl_cpp" + "-lhdf5_hl_cpp_${debug_suffix}" + ) +endif() +set(PKG_FILES hdf5 hdf5_hl hdf5_cpp hdf5_hl_cpp) +foreach(PC_FILE IN LISTS PKG_FILES) + set(SUBPATHS "/debug/lib/pkgconfig" "/lib/pkgconfig") + foreach(SUBPATH IN LISTS SUBPATHS) + if(EXISTS "${CURRENT_PACKAGES_DIR}${SUBPATH}/${PC_FILE}-1.12.0.pc") + file(RENAME "${CURRENT_PACKAGES_DIR}${SUBPATH}/${PC_FILE}-1.12.0.pc" "${CURRENT_PACKAGES_DIR}${SUBPATH}/${PC_FILE}.pc") + endif() + endforeach() +endforeach() +vcpkg_fixup_pkgconfig() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(READ "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" contents) +string(REPLACE [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/bin"]] [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/tools/hdf5"]] contents ${contents}) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" ${contents}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(FEATURES MATCHES "tools") + set(TOOLS h5cc h5hlcc h5c++ h5hlc++ h5copy h5diff h5dump h5ls h5stat gif2h5 h52gif h5clear h5debug h5format_convert h5jam h5unjam h5ls h5mkgrp h5repack h5repart h5watch ph5diff h5import) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(TOOL_SUFFIXES "-shared${VCPKG_TARGET_EXECUTABLE_SUFFIX};${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + else() + set(TOOL_SUFFIXES "-static${VCPKG_TARGET_EXECUTABLE_SUFFIX};${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + endif() + + foreach(tool IN LISTS TOOLS) + foreach(suffix IN LISTS TOOL_SUFFIXES) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + endif() + endforeach() + endforeach() + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/share/hdf5/data/COPYING ${CURRENT_PACKAGES_DIR}/share/hdf5/copyright) -configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/hdf5/vcpkg-cmake-wrapper.cmake @ONLY) +file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/data/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) diff --git a/ports/hdf5/szip.patch b/ports/hdf5/szip.patch new file mode 100644 index 00000000000000..9dede42470d33e --- /dev/null +++ b/ports/hdf5/szip.patch @@ -0,0 +1,16 @@ +diff -urN a/CMakeFilters.cmake b/CMakeFilters.cmake +--- a/CMakeFilters.cmake 2021-05-15 19:07:48.160044927 +0200 ++++ b/CMakeFilters.cmake 2021-05-15 19:22:56.993970332 +0200 +@@ -104,7 +104,11 @@ + find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) + if (NOT SZIP_FOUND) + find_package (SZIP) # Legacy find +- if (SZIP_FOUND) ++ if (DEFINED SZIP_SHARED_LIBRARY AND NOT DEFINED SZIP_STATIC_LIBRARY) ++ set (SZIP_STATIC_LIBRARY "${SZIP_SHARED_LIBRARY}") ++ elseif (DEFINED SZIP_STATIC_LIBRARY AND NOT DEFINED SZIP_SHARED_LIBRARY) ++ set (SZIP_SHARED_LIBRARY "${SZIP_STATIC_LIBRARY}") ++ elseif (SZIP_FOUND) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES}) + set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_LIBRARIES}) + endif () diff --git a/ports/hdf5/vcpkg.json b/ports/hdf5/vcpkg.json new file mode 100644 index 00000000000000..3912a629ea26c9 --- /dev/null +++ b/ports/hdf5/vcpkg.json @@ -0,0 +1,57 @@ +{ + "name": "hdf5", + "version": "1.12.0", + "port-version": 4, + "description": "HDF5 is a data model, library, and file format for storing and managing data", + "homepage": "https://www.hdfgroup.org/downloads/hdf5/", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "szip", + "zlib" + ], + "features": { + "cpp": { + "description": "Builds cpp lib" + }, + "fortran": { + "description": "Build with fortran" + }, + "parallel": { + "description": "parallel support for HDF5", + "dependencies": [ + "mpi" + ] + }, + "szip": { + "description": "Build with szip", + "dependencies": [ + "szip" + ] + }, + "threadsafe": { + "description": "thread safety for HDF5", + "dependencies": [ + "pthreads" + ] + }, + "tools": { + "description": "Build hdf tools" + }, + "zlib": { + "description": "Build with zlib", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/healpix/fix-dependency.patch b/ports/healpix/fix-dependency.patch new file mode 100644 index 00000000000000..87d7336f536e64 --- /dev/null +++ b/ports/healpix/fix-dependency.patch @@ -0,0 +1,13 @@ +diff --git a/src/cxx/configure.ac b/src/cxx/configure.ac +index 63f05d7..e284f0d 100644 +--- a/src/cxx/configure.ac ++++ b/src/cxx/configure.ac +@@ -175,7 +175,7 @@ CXXCFLAGS_NO_C="$CXXCFLAGS $CPPFLAGS" + LDCCFLAGS="$LDFLAGS $CCFLAGS" + LDCXXFLAGS="$LDFLAGS $CXXCFLAGS" + +-AC_CHECK_LIB([cfitsio],[ffgnrwll],,AC_MSG_ERROR([could not find the cfitsio library]),[-lm]) ++AC_CHECK_LIB([cfitsio -lz],[ffgnrwll],,AC_MSG_ERROR([could not find the cfitsio library]),[-lm -lz]) + AC_CHECK_HEADERS([fitsio.h],,AC_MSG_ERROR([could not find the cfitsio header file]),) + + AC_SUBST(SILENT_RULE) diff --git a/ports/healpix/portfile.cmake b/ports/healpix/portfile.cmake new file mode 100644 index 00000000000000..dde1ac3c170adc --- /dev/null +++ b/ports/healpix/portfile.cmake @@ -0,0 +1,44 @@ +set(HEALPIX_VER 3.50) +set(HEALPIX_PACK_NAME ${HEALPIX_VER}_2018Dec10) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO healpix + REF Healpix_${HEALPIX_VER} + FILENAME "Healpix_${HEALPIX_PACK_NAME}.tar.gz" + SHA512 29fe680d757bd94651bf029654257cb67286643aad510df4c2f0b06245174411376ec1beca64feebfac14a6fc0194525170635842916d79dcaddeddd9ac6f6c7 + PATCHES fix-dependency.patch +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH src/cxx + COPY_SOURCE + OPTIONS + --with-libcfitsio-include=${CURRENT_INSTALLED_DIR}/include/cfitsio + --with-libcfitsio-lib=${CURRENT_INSTALLED_DIR}/lib +) + +vcpkg_build_make(BUILD_TARGET compile_all) +#vcpkg_fixup_pkgconfig() + +# Install manually because healpix has no install target +set(OBJ_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/auto") +file(GLOB_RECURSE HEALPIX_LIBS ${OBJ_DIR}/lib/*) +file(INSTALL ${HEALPIX_LIBS} DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + +file(GLOB_RECURSE HEALPIX_INCLUDES ${OBJ_DIR}/include/*) +file(INSTALL ${HEALPIX_INCLUDES} DESTINATION "${CURRENT_PACKAGES_DIR}/include") + +file(GLOB_RECURSE HEALPIX_TOOLS ${OBJ_DIR}/bin/*) +file(INSTALL ${HEALPIX_TOOLS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + +if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/") + set(OBJ_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/auto") + file(GLOB_RECURSE HEALPIX_LIBS ${OBJ_DIR}/lib/*) + file(INSTALL ${HEALPIX_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/healpix/vcpkg.json b/ports/healpix/vcpkg.json new file mode 100644 index 00000000000000..15b383f089fb74 --- /dev/null +++ b/ports/healpix/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "healpix", + "version-string": "1.12.10", + "port-version": 8, + "description": "HEALPix is an acronym for Hierarchical Equal Area isoLatitude Pixelation of a sphere.", + "homepage": "http://healpix.sourceforge.net/", + "supports": "linux", + "dependencies": [ + "cfitsio" + ] +} diff --git a/ports/hedley/CONTROL b/ports/hedley/CONTROL deleted file mode 100644 index 08b5e02b11c445..00000000000000 --- a/ports/hedley/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: hedley -Version: 2019-05-08-1 -Description: A C/C++ header to help move #ifdefs out of your code diff --git a/ports/hedley/portfile.cmake b/ports/hedley/portfile.cmake index e06e9630a86270..db9d49abcd7615 100644 --- a/ports/hedley/portfile.cmake +++ b/ports/hedley/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nemequ/hedley - REF 1b74d9bc892137b3f006d04ff905098b900116d0 - SHA512 8f3e4fc081fb33cc3a3d637eb09863e80fa94b5e46ecf6507aabe6a5b0648881a96c8cf2ef01b4146ecd3a14908ef87f3204960514af6c91d00c93bea18eda41 + REF 8fb0604a8095f6c907378cc3f0391520ae843f6f + SHA512 3ce102d348f96bd8c7d44bc7119a8f637041f613e1e6a578c15e24c56f79dbcb0b1bce93bc8779a90cc2e34ab74d09f29d240b4519d592973c59da49923460da HEAD_REF master ) diff --git a/ports/hedley/vcpkg.json b/ports/hedley/vcpkg.json new file mode 100644 index 00000000000000..636c91c53ccf37 --- /dev/null +++ b/ports/hedley/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "hedley", + "version": "15", + "description": "A C/C++ header to help move #ifdefs out of your code", + "homepage": "https://nemequ.github.io/hedley/" +} diff --git a/ports/hexl/portfile.cmake b/ports/hexl/portfile.cmake new file mode 100644 index 00000000000000..74d6735d5264ab --- /dev/null +++ b/ports/hexl/portfile.cmake @@ -0,0 +1,38 @@ +# This library only supports "x64" architecture +vcpkg_fail_port_install(ON_ARCH "x86" "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO intel/hexl + REF df6c26fdd2f2752e2bfa17981be113ff32946375 + SHA512 c4353410091b019dad05326818d66bc74b438a26ec28192da20f13581781556b7aad11c3e9c2c2c9ed7ec66bc422152e2a2811206109b39939f30c91952ef765 + HEAD_REF 1.2.1 +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(HEXL_SHARED OFF) +else() + set(HEXL_SHARED ON) +endif() + +vcpkg_find_acquire_program(GIT) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + OPTIONS + "-DHEXL_BENCHMARK=OFF" + "-DHEXL_COVERAGE=OFF" + "-DHEXL_TESTING=OFF" + "-DHEXL_SHARED_LIB=${HEXL_SHARED}" +) + +vcpkg_cmake_install() +vcpkg_fixup_pkgconfig() +vcpkg_cmake_config_fixup(PACKAGE_NAME "HEXL" CONFIG_PATH "lib/cmake/hexl-1.2.1") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") + +vcpkg_copy_pdbs() diff --git a/ports/hexl/vcpkg.json b/ports/hexl/vcpkg.json new file mode 100644 index 00000000000000..490851451424fc --- /dev/null +++ b/ports/hexl/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "hexl", + "version": "1.2.1", + "description": "Intel® HEXL is an open-source library which provides efficient implementations of integer arithmetic on Galois fields.", + "homepage": "https://github.com/intel/hexl", + "supports": "x64 & !(windows & !static)", + "dependencies": [ + "cpu-features", + "easyloggingpp", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/hffix/CMakeLists.txt b/ports/hffix/CMakeLists.txt new file mode 100644 index 00000000000000..1f3a5284631ca1 --- /dev/null +++ b/ports/hffix/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.10) + +set(PROJECT_NAME hffix) +project(${PROJECT_NAME}) + +include(GNUInstallDirs) + +add_library(hffix INTERFACE) +target_include_directories(hffix INTERFACE + $ + $ +) + +install( + FILES + ${CMAKE_SOURCE_DIR}/include/hffix.hpp + ${CMAKE_SOURCE_DIR}/include/hffix_fields.hpp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +install( + TARGETS hffix + EXPORT hffix-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) +install(EXPORT hffix-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} NAMESPACE ${PROJECT_NAME}::) \ No newline at end of file diff --git a/ports/hffix/portfile.cmake b/ports/hffix/portfile.cmake new file mode 100644 index 00000000000000..6a421d731d1e73 --- /dev/null +++ b/ports/hffix/portfile.cmake @@ -0,0 +1,23 @@ +# header only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jamesdbrock/hffix + REF v1.0.0 + SHA512 0043b789e6ffdc32eaf2736a8621dd7fd54e1a16aae33bb1d5f642da1b04d150ed42d8f9ddd046013242164854d9091540452153f09459d05f9bf4a186c7b860 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/hffix/vcpkg.json b/ports/hffix/vcpkg.json new file mode 100644 index 00000000000000..64e8946e9612e7 --- /dev/null +++ b/ports/hffix/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "hffix", + "version-string": "1.0.0", + "port-version": 1, + "description": "Financial Information Exchange Protocol C++ Library", + "homepage": "https://jamesdbrock.github.io/hffix" +} diff --git a/ports/hfsm2/CONTROL b/ports/hfsm2/CONTROL deleted file mode 100644 index 4677f8b088d096..00000000000000 --- a/ports/hfsm2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: hfsm2 -Version: beta7 -Homepage: https://github.com/andrew-gresyk/HFSM2 -Description: Header-only heriarchical FSM framework in C++14, with fully statically-defined structure (no dynamic allocations), built with variadic templates. -Build-Depends: catch2 diff --git a/ports/hfsm2/portfile.cmake b/ports/hfsm2/portfile.cmake index 0970d01116460e..48275078bf789e 100644 --- a/ports/hfsm2/portfile.cmake +++ b/ports/hfsm2/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO andrew-gresyk/HFSM2 diff --git a/ports/hfsm2/vcpkg.json b/ports/hfsm2/vcpkg.json new file mode 100644 index 00000000000000..6486dfaa5f7e81 --- /dev/null +++ b/ports/hfsm2/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "hfsm2", + "version-string": "beta7", + "port-version": 1, + "description": "Header-only heriarchical FSM framework in C++14, with fully statically-defined structure (no dynamic allocations), built with variadic templates.", + "homepage": "https://github.com/andrew-gresyk/HFSM2", + "dependencies": [ + "catch2" + ] +} diff --git a/ports/hidapi/hidapi-config.cmake b/ports/hidapi/hidapi-config.cmake new file mode 100644 index 00000000000000..126685a89d7cea --- /dev/null +++ b/ports/hidapi/hidapi-config.cmake @@ -0,0 +1,48 @@ +# - try to find HIDAPI library +# from http://www.signal11.us/oss/hidapi/ +# +# Cache Variables: (probably not for direct use in your scripts) +# HIDAPI_INCLUDE_DIR +# HIDAPI_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# HIDAPI_FOUND +# HIDAPI_INCLUDE_DIRS +# HIDAPI_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# hacking FindHIDAPI.cmake as hidapi-config.cmake + +find_library(HIDAPI_LIBRARY + NAMES hidapi hidapi-libusb) + +find_path(HIDAPI_INCLUDE_DIR + NAMES hidapi.h + PATH_SUFFIXES + hidapi) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(HIDAPI + DEFAULT_MSG + HIDAPI_LIBRARY + HIDAPI_INCLUDE_DIR) + +if(HIDAPI_FOUND) + set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}") + + set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}") +endif() + +mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY) diff --git a/ports/hidapi/portfile.cmake b/ports/hidapi/portfile.cmake new file mode 100644 index 00000000000000..1e13ee197ea808 --- /dev/null +++ b/ports/hidapi/portfile.cmake @@ -0,0 +1,70 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libusb/hidapi + REF hidapi-0.10.1 + SHA512 0479706c631775483378070ff7170542725678eabc202a5bd07436c951fd766e01743417999ac3fb2b5436c865f6ace2cfced1f210fa3a3e88c19ceb3bbe0534 + HEAD_REF master + PATCHES remove-duplicate-AC_CONFIG_MACRO_DIR.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + file(READ "${SOURCE_PATH}/windows/hidapi.vcxproj" _contents) + if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic") + string(REGEX REPLACE + "MultiThreadedDebug" + "MultiThreadedDebugDLL" + _contents "${_contents}") + string(REGEX REPLACE + "MultiThreaded" + "MultiThreadedDLL" + _contents "${_contents}") + else() + string(REGEX REPLACE + "MultiThreadedDebugDLL" + "MultiThreadedDebug" + _contents "${_contents}") + string(REGEX REPLACE + "MultiThreadedDLL" + "MultiThreaded" + _contents "${_contents}") + endif() + + if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") + string(REPLACE + "StaticLibrary" + "DynamicLibrary" + _contents "${_contents}") + else() + string(REPLACE + "DynamicLibrary" + "StaticLibrary" + _contents "${_contents}") + endif() + file(WRITE "${SOURCE_PATH}/windows/hidapi.vcxproj" "${_contents}") + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH windows/hidapi.vcxproj + INCLUDES_SUBPATH hidapi ALLOW_ROOT_INCLUDES + LICENSE_SUBPATH LICENSE-bsd.txt # use BSD license + ) + + file(COPY ${CMAKE_CURRENT_LIST_DIR}/hidapi-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +else(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + ) + + vcpkg_install_make() + + vcpkg_copy_pdbs() + + vcpkg_fixup_pkgconfig() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + + file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endif() diff --git a/ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch b/ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch new file mode 100644 index 00000000000000..0eae649af75d28 --- /dev/null +++ b/ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch @@ -0,0 +1,12 @@ +diff --git a/configure.ac b/configure.ac +index 220909a..77da67a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -13,7 +13,6 @@ LTLDFLAGS="-version-info ${lt_current}:${lt_revision}:${lt_age}" + + AC_CONFIG_MACRO_DIR([m4]) + AM_INIT_AUTOMAKE([foreign -Wall -Werror]) +-AC_CONFIG_MACRO_DIR([m4]) + + m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + LT_INIT diff --git a/ports/hidapi/vcpkg.json b/ports/hidapi/vcpkg.json new file mode 100644 index 00000000000000..b4b1f1a73117f6 --- /dev/null +++ b/ports/hidapi/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "hidapi", + "version-semver": "0.10.1", + "port-version": 2, + "description": "A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac and Windows.", + "homepage": "https://github.com/libusb/hidapi", + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "libusb", + "platform": "!windows" + } + ] +} diff --git a/ports/highfive/CONTROL b/ports/highfive/CONTROL deleted file mode 100644 index 6152bdf3d901a8..00000000000000 --- a/ports/highfive/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: highfive -Version: 2.0 -Homepage: https://github.com/BlueBrain/HighFive -Description: HighFive is a modern C++/C++11 friendly interface for libhdf5 -Build-Depends: hdf5 diff --git a/ports/highfive/fix-dependency-hdf5.patch b/ports/highfive/fix-dependency-hdf5.patch new file mode 100644 index 00000000000000..0220435fd3cbf1 --- /dev/null +++ b/ports/highfive/fix-dependency-hdf5.patch @@ -0,0 +1,19 @@ +diff --git a/CMake/HighFiveTargetDeps.cmake b/CMake/HighFiveTargetDeps.cmake +index 51bc7b2..f04bf4c 100644 +--- a/CMake/HighFiveTargetDeps.cmake ++++ b/CMake/HighFiveTargetDeps.cmake +@@ -10,7 +10,13 @@ if(NOT TARGET libdeps) + if(NOT DEFINED HDF5_C_LIBRARIES) + set(HDF5_NO_FIND_PACKAGE_CONFIG_FILE TRUE) # Consistency + set(HDF5_PREFER_PARALLEL ${HIGHFIVE_PARALLEL_HDF5}) +- find_package(HDF5 REQUIRED) ++ find_package(hdf5 CONFIG REQUIRED) ++ set(HIGHFIVE_PARALLEL_HDF5 ${HDF5_ENABLE_PARALLEL}) ++ if(TARGET hdf5::hdf5-shared) ++ set(HDF5_C_LIBRARIES hdf5::hdf5-shared) ++ elseif(TARGET hdf5::hdf5-static) ++ set(HDF5_C_LIBRARIES hdf5::hdf5-static) ++ endif() + endif() + + if(HIGHFIVE_PARALLEL_HDF5 AND NOT HDF5_IS_PARALLEL) diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake index db6f4a0129576c..025d30014253f8 100644 --- a/ports/highfive/portfile.cmake +++ b/ports/highfive/portfile.cmake @@ -1,31 +1,44 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO BlueBrain/HighFive - REF v2.0 - SHA512 d6bc38ae421adfa3cb9ee761ec92819bebe385cb100a8227bd9ff436cd7ae31725a96264a7963cfe5ce806cdd3b7978a8a630e9312c1567f6df6029062c6b8a0 + REF v2.3 + SHA512 5bf8bc6d3a57be39a4fd15f28f8c839706e2c8d6e2270f45ea39c28a2ac1e3c7f31ed2f48390a45a868c714c85f03f960a0bc8fad945c80b41f495e6f4aca36a HEAD_REF master + PATCHES fix-dependency-hdf5.patch ) -if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") - set(HDF5_USE_STATIC_LIBRARIES ON) -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + boost HIGHFIVE_USE_BOOST + tests HIGHFIVE_UNIT_TESTS + xtensor HIGHFIVE_USE_XTENSOR +) -vcpkg_configure_cmake( +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" HDF5_USE_STATIC_LIBRARIES) + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS - -DHIGHFIVE_UNIT_TESTS=OFF + ${FEATURE_OPTIONS} -DHIGHFIVE_EXAMPLES=OFF - -DUSE_BOOST=OFF - -DHIGH_FIVE_DOCUMENTATION=OFF + -DHIGHFIVE_BUILD_DOCS=OFF -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} ) -vcpkg_install_cmake() +vcpkg_cmake_install() + +if("tests" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES + tests_high_five_base + tests_high_five_easy + tests_high_five_multi_dims + SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/tests/unit" # Tools are not installed so release version tools are manually copied + ) +endif() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/HighFive/CMake) +vcpkg_cmake_config_fixup(CONFIG_PATH share/HighFive/CMake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) if(NOT (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") @@ -33,4 +46,4 @@ if(NOT (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Windows endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/highfive/vcpkg.json b/ports/highfive/vcpkg.json new file mode 100644 index 00000000000000..a89959aa70f8c1 --- /dev/null +++ b/ports/highfive/vcpkg.json @@ -0,0 +1,46 @@ +{ + "name": "highfive", + "version": "2.3", + "description": "HighFive is a modern header-only C++/C++11 friendly interface for libhdf5", + "homepage": "https://github.com/BlueBrain/HighFive", + "license": "BSL-1.0", + "dependencies": [ + "hdf5", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "boost": { + "description": "Enables Boost support", + "dependencies": [ + "boost-multi-array", + "boost-serialization", + "boost-ublas" + ] + }, + "tests": { + "description": "Build unit tests", + "dependencies": [ + "boost-test", + { + "name": "highfive", + "features": [ + "boost" + ] + } + ] + }, + "xtensor": { + "description": "Enable xtensor testing", + "dependencies": [ + "xtensor" + ] + } + } +} diff --git a/ports/hiredis/fix-feature-example.patch b/ports/hiredis/fix-feature-example.patch new file mode 100644 index 00000000000000..2e5259930f2c67 --- /dev/null +++ b/ports/hiredis/fix-feature-example.patch @@ -0,0 +1,66 @@ +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index dd3a313..8c69d3a 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -19,16 +19,30 @@ if (LIBEV) + TARGET_LINK_LIBRARIES(example-libev hiredis ev) + ENDIF() + +-FIND_PATH(LIBEVENT event.h) +-if (LIBEVENT) ++FIND_PACKAGE(Libevent CONFIG REQUIRED) ++FIND_PATH(LIBEVENT_INCLUDES evutil.h) ++if (BUILD_SHARED_LIBS) ++ set(LIBEVENT_LIBS ${LIBEVENT_SHARED_LIBRARIES}) ++else() ++ set(LIBEVENT_LIBS ${LIBEVENT_STATIC_LIBRARIES}) ++endif() ++if (UNIX) + ADD_EXECUTABLE(example-libevent example-libevent) +- TARGET_LINK_LIBRARIES(example-libevent hiredis event) ++ TARGET_LINK_LIBRARIES(example-libevent hiredis ${LIBEVENT_LIBS}) ++ TARGET_INCLUDE_DIRECTORIES(example-libevent PRIVATE ${LIBEVENT_INCLUDES}) + ENDIF() + ++FIND_LIBRARY(UV_LIBRARY libuv) + FIND_PATH(LIBUV uv.h) + IF (LIBUV) + ADD_EXECUTABLE(example-libuv example-libuv.c) +- TARGET_LINK_LIBRARIES(example-libuv hiredis uv) ++ if(WIN32) ++ set(LIB_LISTS Iphlpapi.lib Psapi.lib Userenv.lib) ++ else() ++ set(LIB_LISTS) ++ endif() ++ TARGET_LINK_LIBRARIES(example-libuv hiredis ${UV_LIBRARY} ${LIB_LISTS}) ++ TARGET_INCLUDE_DIRECTORIES(example-libuv PRIVATE ${LIBUV}) + ENDIF() + + IF (APPLE) +@@ -38,12 +52,24 @@ IF (APPLE) + ENDIF() + + IF (ENABLE_SSL) ++ FIND_PACKAGE(OpenSSL REQUIRED) ++ IF (WIN32) ++ FIND_PACKAGE(pthreads REQUIRED) ++ SET(THREADS_LIBS PThreads4W::PThreads4W) ++ ELSE() ++ FIND_PACKAGE(Threads) ++ SET(THREADS_LIBS ${CMAKE_THREAD_LIBS_INIT}) ++ ENDIF() + ADD_EXECUTABLE(example-ssl example-ssl.c) +- TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl) ++ if(WIN32) ++ TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl OpenSSL::SSL OpenSSL::Crypto ${THREADS_LIBS} crypt32.lib) ++ else() ++ TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl OpenSSL::SSL OpenSSL::Crypto ${THREADS_LIBS}) ++ endif() + ENDIF() + + ADD_EXECUTABLE(example example.c) +-TARGET_LINK_LIBRARIES(example hiredis) ++TARGET_LINK_LIBRARIES(example hiredis ${LIBEVENT_LIBS}) + + ADD_EXECUTABLE(example-push example-push.c) + TARGET_LINK_LIBRARIES(example-push hiredis) diff --git a/ports/hiredis/fix-include-path.patch b/ports/hiredis/fix-include-path.patch new file mode 100644 index 00000000000000..8bfeae09d7eb9a --- /dev/null +++ b/ports/hiredis/fix-include-path.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7eafeb8..623c586 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,7 +49,7 @@ IF(WIN32 OR MINGW) + TARGET_LINK_LIBRARIES(hiredis PRIVATE ws2_32) + ENDIF() + +-TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $ $) ++TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $ $) + + CONFIGURE_FILE(hiredis.pc.in hiredis.pc @ONLY) + diff --git a/ports/hiredis/fix-timeval.patch b/ports/hiredis/fix-timeval.patch new file mode 100644 index 00000000000000..f389de5042f44d --- /dev/null +++ b/ports/hiredis/fix-timeval.patch @@ -0,0 +1,16 @@ +diff --git a/async_private.h b/async_private.h +index d0133ae..7760b60 100644 +--- a/async_private.h ++++ b/async_private.h +@@ -32,6 +32,11 @@ + #ifndef __HIREDIS_ASYNC_PRIVATE_H + #define __HIREDIS_ASYNC_PRIVATE_H + ++#ifdef _WIN32 ++#include ++#include ++#endif ++ + #define _EL_ADD_READ(ctx) \ + do { \ + refreshTimeout(ctx); \ diff --git a/ports/hiredis/portfile.cmake b/ports/hiredis/portfile.cmake new file mode 100644 index 00000000000000..d0b273c77197c4 --- /dev/null +++ b/ports/hiredis/portfile.cmake @@ -0,0 +1,40 @@ +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO redis/hiredis + REF v1.0.0 + SHA512 eb56201121eecdbfc8d42e8c2c141ae77bea248eeb36687ac6835c9b2404f5475beb351c4d8539d552db4d88e933bb2bd5b73f165e62b130bb11aeff39928e69 + HEAD_REF master + PATCHES + fix-feature-example.patch + support-static-in-win.patch + fix-timeval.patch + fix-include-path.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + ssl ENABLE_SSL + example ENABLE_EXAMPLES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets() +if("ssl" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/hiredis_ssl TARGET_PATH share/hiredis_ssl) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/hiredis/support-static-in-win.patch b/ports/hiredis/support-static-in-win.patch new file mode 100644 index 00000000000000..47ea4bef666f00 --- /dev/null +++ b/ports/hiredis/support-static-in-win.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9e78894..87aba5b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,4 +22,4 @@ PROJECT(hiredis VERSION "${VERSION}") + ENDIF() + +-ADD_LIBRARY(hiredis SHARED ${hiredis_sources}) ++ADD_LIBRARY(hiredis ${hiredis_sources}) + +@@ -60,5 +60,5 @@ IF(ENABLE_SSL) + SET(hiredis_ssl_sources + ssl.c) +- ADD_LIBRARY(hiredis_ssl SHARED ++ ADD_LIBRARY(hiredis_ssl + ${hiredis_ssl_sources}) + diff --git a/ports/hiredis/vcpkg.json b/ports/hiredis/vcpkg.json new file mode 100644 index 00000000000000..862214eb8b0944 --- /dev/null +++ b/ports/hiredis/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "hiredis", + "version": "1.0.0", + "port-version": 1, + "description": "Hiredis is a minimalistic C client library for the Redis database.", + "homepage": "https://github.com/redis/hiredis", + "features": { + "example": { + "description": "Build example", + "dependencies": [ + "libevent", + "libuv", + "pthread" + ] + }, + "ssl": { + "description": "Build hiredis_ssl for SSL support", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL deleted file mode 100644 index 99cc84d6f35846..00000000000000 --- a/ports/hpx/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: hpx -Version: 1.3.0-1 -Build-Depends: hwloc, boost-accumulators, boost-algorithm, boost-asio, boost-assign, boost-bimap, boost-chrono, boost-config, boost-context, boost-dynamic-bitset, boost-exception, boost-filesystem, boost-iostreams, boost-lockfree, boost-program-options, boost-range, boost-spirit, boost-system, boost-throw-exception, boost-variant, boost-winapi -Homepage: https://github.com/STEllAR-GROUP/hpx -Description: The C++ Standards Library for Concurrency and Parallelism - HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index 80e79bac647f30..e8bbd3a569f20d 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -1,21 +1,18 @@ -include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO STEllAR-GROUP/hpx - REF 1.3.0 - SHA512 e55ca0c6fe1716b6ee72b0c4a9234a1136455ddc2f5509925395a80442d564b0db251968fef53d202a1f5140e12d0941d0173ab20a7b181632eac20cb925bf31 - HEAD_REF master + REF 1.7.1 + SHA512 6bdb294da393a198abf81d5f63799a066334755eed0fda40bbfc4e9a774b6e19a3e5ad7ab45c989d31f3797e7b547bb552c29f51b552d9a79d166f86aee375a3 + HEAD_REF stable ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - "-DBOOST_ROOT=${CURRENT_INSTALLED_DIR}/share/boost" - "-DHWLOC_ROOT=${CURRENT_INSTALLED_DIR}/share/hwloc" -DHPX_WITH_VCPKG=ON -DHPX_WITH_TESTS=OFF -DHPX_WITH_EXAMPLES=OFF @@ -42,13 +39,19 @@ foreach(CMAKE_FILE IN LISTS CMAKE_FILES) file(WRITE ${CMAKE_FILE} "${_contents}") endforeach() -file(READ "${CURRENT_PACKAGES_DIR}/share/hpx/HPXMacros.cmake" _contents) -string(REPLACE "set(CMAKE_MODULE_PATH \${CMAKE_MODULE_PATH} \"\${CMAKE_CURRENT_LIST_DIR}/../../lib/cmake/HPX\")" "list(APPEND CMAKE_MODULE_PATH \"\${CMAKE_CURRENT_LIST_DIR}\")" _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/share/hpx/HPXMacros.cmake" "${_contents}") +vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/share/${PORT}/HPXConfig.cmake" + "set(HPX_BUILD_TYPE \"Release\")" + "set(HPX_BUILD_TYPE \"\${CMAKE_BUILD_TYPE}\")") + +vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/share/${PORT}/HPXMacros.cmake" + "set(CMAKE_MODULE_PATH \${CMAKE_MODULE_PATH}" + "list(APPEND CMAKE_MODULE_PATH") file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx RENAME copyright) + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) if(DLLS) @@ -74,13 +77,11 @@ if(DLLS) file(REMOVE ${DLLS}) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/bazel) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bazel) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) diff --git a/ports/hpx/vcpkg.json b/ports/hpx/vcpkg.json new file mode 100644 index 00000000000000..f628a848af6644 --- /dev/null +++ b/ports/hpx/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "hpx", + "version-semver": "1.7.1", + "description": [ + "The C++ Standards Library for Concurrency and Parallelism", + "HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case." + ], + "homepage": "https://github.com/STEllAR-GROUP/hpx", + "dependencies": [ + "asio", + "boost-accumulators", + "boost-config", + "boost-context", + "boost-dynamic-bitset", + "boost-exception", + "boost-filesystem", + "boost-iostreams", + "boost-lockfree", + "boost-range", + "boost-spirit", + "boost-system", + "boost-throw-exception", + "boost-variant", + "boost-winapi", + "hwloc" + ] +} diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL deleted file mode 100644 index d97927cd278083..00000000000000 --- a/ports/http-parser/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: http-parser -Version: 2.9.2-1 -Homepage: https://github.com/nodejs/http-parser -Description: HTTP Parser. diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake index f3cc67ec1ef1bd..9aa59177357e4d 100644 --- a/ports/http-parser/portfile.cmake +++ b/ports/http-parser/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nodejs/http-parser - REF v2.9.2 - SHA512 fe21ba46c9297b55a6382497b689da2af88999a9a5716ffef0731057ce1bb053056e4f20147284c78338e48ed1a793a0270fe0edfe3f4b589926e3ede603d023 + REF 2343fd6b5214b2ded2cdcf76de2bf60903bb90cd # v2.9.4 + SHA512 9fb95794d2c278c933e9bff0284befd1a8c8cf8ddda8e9929669f3134246d7fe81b54293359164d947f9278e2dd28b87d29a8ad8f523ed659d62713d782c7e46 HEAD_REF master ) diff --git a/ports/http-parser/vcpkg.json b/ports/http-parser/vcpkg.json new file mode 100644 index 00000000000000..bd316b2a24a0ea --- /dev/null +++ b/ports/http-parser/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "http-parser", + "version-string": "2.9.4", + "port-version": 1, + "description": "HTTP Parser.", + "homepage": "https://github.com/nodejs/http-parser" +} diff --git a/ports/hungarian/CONTROL b/ports/hungarian/CONTROL deleted file mode 100644 index 96dd5f7991be10..00000000000000 --- a/ports/hungarian/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: hungarian -Version: v0.1.3 -Description: C-implementation of the Hungarian Method: finding the optimal assignment (assigning a set of jobs to a set of machines) in O(n^3), where n=max{#jobs, #machines}. The implementation is a sligntly enhanced version of the implementation provided by the Stanford GraphBase diff --git a/ports/hungarian/portfile.cmake b/ports/hungarian/portfile.cmake index 0d550756e72fbf..dc02cdb2eb7e48 100644 --- a/ports/hungarian/portfile.cmake +++ b/ports/hungarian/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_download_distfile(ARCHIVE diff --git a/ports/hungarian/vcpkg.json b/ports/hungarian/vcpkg.json new file mode 100644 index 00000000000000..3d74f6cde35d7b --- /dev/null +++ b/ports/hungarian/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "hungarian", + "version-string": "v0.1.3", + "port-version": 1, + "description": "C-implementation of the Hungarian Method: finding the optimal assignment (assigning a set of jobs to a set of machines) in O(n^3), where n=max{#jobs, #machines}. The implementation is a sligntly enhanced version of the implementation provided by the Stanford GraphBase" +} diff --git a/ports/hunspell/0002-disable-test.patch b/ports/hunspell/0002-disable-test.patch new file mode 100644 index 00000000000000..e475cba85f45c8 --- /dev/null +++ b/ports/hunspell/0002-disable-test.patch @@ -0,0 +1,36 @@ +diff --git a/msvc/Hunspell.sln b/msvc/Hunspell.sln +index 5607c8d..dabd755 100644 +--- a/msvc/Hunspell.sln ++++ b/msvc/Hunspell.sln +@@ -5,8 +5,6 @@ VisualStudioVersion = 14.0.25420.1 + MinimumVisualStudioVersion = 10.0.40219.1 + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libhunspell", "libhunspell.vcxproj", "{53609BB3-D874-465C-AF7B-DF626DB0D89B}" + EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testparser", "testparser.vcxproj", "{611BF6C7-332A-49BB-B2A3-80AFD5B785D9}" +-EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hunspell", "hunspell.vcxproj", "{6A0453F4-B12A-4810-B9A2-8AB059316ED7}" + EndProject + Global +@@ -37,22 +35,6 @@ Global + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|Win32.Build.0 = Release|Win32 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|x64.ActiveCfg = Release|x64 + {53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|x64.Build.0 = Release|x64 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Debug_dll|Win32.ActiveCfg = Debug|Win32 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Debug_dll|Win32.Build.0 = Debug|Win32 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Debug_dll|x64.ActiveCfg = Debug|x64 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Debug_dll|x64.Build.0 = Debug|x64 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Debug|Win32.ActiveCfg = Debug|Win32 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Debug|Win32.Build.0 = Debug|Win32 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Debug|x64.ActiveCfg = Debug|x64 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Debug|x64.Build.0 = Debug|x64 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Release_dll|Win32.ActiveCfg = Release|Win32 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Release_dll|Win32.Build.0 = Release|Win32 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Release_dll|x64.ActiveCfg = Release|x64 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Release_dll|x64.Build.0 = Release|x64 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Release|Win32.ActiveCfg = Release|Win32 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Release|Win32.Build.0 = Release|Win32 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Release|x64.ActiveCfg = Release|x64 +- {611BF6C7-332A-49BB-B2A3-80AFD5B785D9}.Release|x64.Build.0 = Release|x64 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug_dll|Win32.Build.0 = Debug|Win32 + {6A0453F4-B12A-4810-B9A2-8AB059316ED7}.Debug_dll|x64.ActiveCfg = Debug|x64 diff --git a/ports/hunspell/0003-fix-win-build.patch b/ports/hunspell/0003-fix-win-build.patch new file mode 100644 index 00000000000000..a8fe442db8020e --- /dev/null +++ b/ports/hunspell/0003-fix-win-build.patch @@ -0,0 +1,80 @@ +diff --git a/msvc/hunspell.vcxproj b/msvc/hunspell.vcxproj +index ca39388..d4817a5 100644 +--- a/msvc/hunspell.vcxproj ++++ b/msvc/hunspell.vcxproj +@@ -91,7 +91,7 @@ + W32;WIN32;_DEBUG;_CONSOLE;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + + $(IntDir)$(ProjectName).pdb + Level4 +@@ -112,7 +112,7 @@ + ..\src\hunspell;..\src\parsers;.;%(AdditionalIncludeDirectories) + W32;WIN32;_DEBUG;_CONSOLE;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + + + Level4 +@@ -134,7 +134,7 @@ + AnySuitable + ..\src\hunspell;..\src\parsers;.;%(AdditionalIncludeDirectories) + W32;WIN32;NDEBUG;_CONSOLE;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) +- MultiThreadedDLL ++ MultiThreaded + + $(IntDir)$(ProjectName).pdb + Level4 +@@ -157,7 +157,7 @@ + AnySuitable + ..\src\hunspell;..\src\parsers;.;%(AdditionalIncludeDirectories) + W32;WIN32;NDEBUG;_CONSOLE;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) +- MultiThreadedDLL ++ MultiThreaded + + + $(IntDir)$(ProjectName).pdb +diff --git a/msvc/libhunspell.vcxproj b/msvc/libhunspell.vcxproj +index a0772da..9a875ca 100644 +--- a/msvc/libhunspell.vcxproj ++++ b/msvc/libhunspell.vcxproj +@@ -166,7 +166,7 @@ + WIN32;_DEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + + $(IntDir)$(ProjectName).pdb + Level4 +@@ -187,7 +187,7 @@ + WIN32;_DEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + + + Level4 +@@ -206,7 +206,7 @@ + ..\src\hunspell;.;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true +- MultiThreadedDLL ++ MultiThreaded + true + + $(IntDir)$(ProjectName).pdb +@@ -232,7 +232,7 @@ + ..\src\hunspell;.;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true +- MultiThreadedDLL ++ MultiThreaded + true + + diff --git a/ports/hunspell/CMakeLists.txt b/ports/hunspell/CMakeLists.txt deleted file mode 100644 index 7794d36cfbc2e6..00000000000000 --- a/ports/hunspell/CMakeLists.txt +++ /dev/null @@ -1,155 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(hunspell) - -#get hunspell version -file(STRINGS "configure.ac" CONFIGURE_AC_INIT REGEX "AC_INIT\\(\\[hunspell\\],\\[.*\\].*" ) -string(REGEX REPLACE "AC_INIT\\(\\[.*\\],\\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].*" "\\1" VERSION ${CONFIGURE_AC_INIT}) -message(STATUS "Hunspell version: ${VERSION}") - -option(BUILD_SHARED_LIBS "Build shared libs" OFF) -option(ENABLE_NLS "Define if translation of program messages to the user's native language is requested" OFF) -option(HUNSPELL_WARNING_ON "Define if you need warning messages" OFF) - -if(NOT BUILD_SHARED_LIBS) - add_definitions(-DHUNSPELL_STATIC) -endif() - -if(MSVC) - add_definitions(-D_CRT_SECURE_NO_WARNINGS) -endif() - -include_directories("src/hunspell") -include_directories("src/parsers") - -#libhunspell -set(LIBHUNSPELL_SRCS - src/hunspell/affentry.cxx - src/hunspell/affixmgr.cxx - src/hunspell/csutil.cxx - src/hunspell/hashmgr.cxx - src/hunspell/hunspell.cxx - src/hunspell/suggestmgr.cxx - src/hunspell/phonet.cxx - src/hunspell/filemgr.cxx - src/hunspell/hunzip.cxx - src/hunspell/replist.cxx - src/hunspell/affentry.hxx - src/hunspell/htypes.hxx - src/hunspell/affixmgr.hxx - src/hunspell/csutil.hxx - src/hunspell/atypes.hxx - src/hunspell/suggestmgr.hxx - src/hunspell/baseaffix.hxx - src/hunspell/hashmgr.hxx - src/hunspell/langnum.hxx - src/hunspell/phonet.hxx - src/hunspell/filemgr.hxx - src/hunspell/hunzip.hxx - src/hunspell/replist.hxx -) - -set(LIBHUNSPELL_HDRS - src/hunspell/hunspell.hxx - src/hunspell/hunspell.h - src/hunspell/hunvisapi.h - src/hunspell/w_char.hxx - src/hunspell/atypes.hxx - src/hunspell/csutil.hxx - src/hunspell/htypes.hxx -) - -#hunspell/libhunspell -add_library(libhunspell ${LIBHUNSPELL_HDRS} ${LIBHUNSPELL_SRCS}) -target_compile_definitions(libhunspell PRIVATE -DBUILDING_LIBHUNSPELL) -install(TARGETS libhunspell - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin -) - -#parsers/libparsers -set(LIBPARSERS_SRCS - src/parsers/firstparser.cxx - src/parsers/xmlparser.cxx - src/parsers/latexparser.cxx - src/parsers/manparser.cxx - src/parsers/textparser.cxx - src/parsers/htmlparser.cxx - src/parsers/odfparser.cxx -) -add_library(libparsers OBJECT ${LIBPARSERS_SRCS}) - -#parsers/testparser -set(TESTPARSER_SRCS - src/parsers/firstparser.cxx - src/parsers/firstparser.hxx - src/parsers/xmlparser.cxx - src/parsers/xmlparser.hxx - src/parsers/latexparser.cxx - src/parsers/latexparser.hxx - src/parsers/manparser.cxx - src/parsers/manparser.hxx - src/parsers/testparser.cxx - src/parsers/textparser.cxx - src/parsers/textparser.hxx - src/parsers/htmlparser.cxx - src/parsers/htmlparser.hxx - src/parsers/odfparser.hxx - src/parsers/odfparser.cxx -) - -if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_BUILD_TYPE STREQUAL "Release") - add_executable(testparser ${TESTPARSER_SRCS}) - target_link_libraries(testparser libhunspell) - - #tools/analyze - add_executable(analyze "src/tools/analyze.cxx") - target_link_libraries(analyze libhunspell) - - #tools/chmorph - add_executable(chmorph "src/tools/chmorph.cxx" $) - target_link_libraries(chmorph libhunspell) - - #tools/hunspell - include(CheckIncludeFile) - check_include_file("curses.h" HAVE_CURSES_H) - check_include_file("langinfo.h" HAVE_LANGINFO_CODESET) - check_include_file("libintl.h" HAVE_LIBINTL_H) - check_include_file("locale.h" HAVE_LOCALE_H) - check_include_file("ncursesw/curses.h" HAVE_NCURSESW_H) - check_include_file("unistd.h" HAVE_UNISTD_H) - configure_file("config.h.in" "config.h") - - add_executable(hunspell "src/tools/hunspell.cxx" $) - target_include_directories(hunspell PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") - target_link_libraries(hunspell libhunspell) - - #tools/munch - add_executable(munch "src/tools/munch.cxx") - - #tools/unmunch - add_executable(unmunch "src/tools/unmunch.cxx") - - #tools/hzip - #add_executable(hzip "src/tools/hzip.cxx") - #target_link_libraries(hzip libhunspell) - - #tools/hunzip - add_executable(hunzip "src/tools/hunzip.cxx") - target_link_libraries(hunzip libhunspell) - - install( - TARGETS - hunspell - testparser - analyze - chmorph - munch - unmunch - # hzip - hunzip - DESTINATION tools/hunspell - ) -endif() - -install(FILES ${LIBHUNSPELL_HDRS} DESTINATION "include/hunspell/") diff --git a/ports/hunspell/CONTROL b/ports/hunspell/CONTROL deleted file mode 100644 index d907a55362af52..00000000000000 --- a/ports/hunspell/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: hunspell -Version: 1.7.0 -Homepage: https://github.com/hunspell/hunspell -Description: The most popular spellchecking library. diff --git a/ports/hunspell/config.h.in b/ports/hunspell/config.h.in deleted file mode 100644 index c659d1c5253d29..00000000000000 --- a/ports/hunspell/config.h.in +++ /dev/null @@ -1,35 +0,0 @@ - -/* Define to 1 if translation of program messages to the user's native language is requested. */ -#cmakedefine ENABLE_NLS 1 - -/* "Define if you have the header" */ -#cmakedefine HAVE_CURSES_H 1 - -/* Define if you have the iconv() function. */ -#cmakedefine HAVE_ICONV 1 - -/* Define if you have and nl_langinfo(CODESET). */ -#cmakedefine HAVE_LANGINFO_CODESET 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LIBINTL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LOCALE_H 1 - -/* "Define if you have the header" */ -#cmakedefine HAVE_NCURSESW_H 1 - -/* "Define if you have fancy command input editing with Readline" */ -#cmakedefine HAVE_READLINE 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H 1 - -/* Define if you need warning messages */ -#cmakedefine HUNSPELL_WARNING_ON 1 - -/* Define as const if the declaration of iconv() needs const. */ -#cmakedefine ICONV_CONST const - -#cmakedefine VERSION "@VERSION@" \ No newline at end of file diff --git a/ports/hunspell/portfile.cmake b/ports/hunspell/portfile.cmake index 67a4ff09edb7af..053d1dda4f70c4 100644 --- a/ports/hunspell/portfile.cmake +++ b/ports/hunspell/portfile.cmake @@ -1,4 +1,4 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -6,29 +6,93 @@ vcpkg_from_github( REF v1.7.0 SHA512 8149b2e8b703a0610c9ca5160c2dfad3cf3b85b16b3f0f5cfcb7ebb802473b2d499e8e2d0a637a97a37a24d62424e82d3880809210d3f043fa17a4970d47c903 HEAD_REF master - PATCHES 0001_fix_unistd.patch + PATCHES + 0001_fix_unistd.patch + 0002-disable-test.patch + 0003-fix-win-build.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools BUILD_TOOLS ) -vcpkg_install_cmake() +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + file(REMOVE "${SOURCE_PATH}/README") #README is a symlink + + #architecture detection + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(HUNSPELL_ARCH Win32) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(HUNSPELL_ARCH x64) + else() + message(FATAL_ERROR "unsupported architecture") + endif() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(HUNSPELL_CONFIGURATION _dll) + else() + set(HUNSPELL_CONFIGURATION ) + endif() + + if("tools" IN_LIST FEATURES) + set(HSP_TARGET hunspell) + else() + set(HSP_TARGET libhunspell) + endif() + + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "msvc/Hunspell.sln" + INCLUDES_SUBPATH src/hunspell + PLATFORM ${HUNSPELL_ARCH} + RELEASE_CONFIGURATION Release${HUNSPELL_CONFIGURATION} + DEBUG_CONFIGURATION Debug${HUNSPELL_CONFIGURATION} + ALLOW_ROOT_INCLUDES + ) +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(ENV{CFLAGS} "$ENV{CFLAGS} -DHUNSPELL_STATIC") + set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -DHUNSPELL_STATIC") + endif() + if(NOT "tools" IN_LIST FEATURES) # Building the tools is not possible on windows! + file(READ "${SOURCE_PATH}/src/Makefile.am" _contents) + string(REPLACE " parsers tools" "" _contents "${_contents}") + file(WRITE "${SOURCE_PATH}/src/Makefile.am" "${_contents}") + endif() + vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin") + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + AUTOCONFIG + ADDITIONAL_MSYS_PACKAGES gzip + ) + #install-pkgconfDATA: + vcpkg_build_make(BUILD_TARGET dist LOGFILE_ROOT build-dist) + vcpkg_install_make() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") + vcpkg_fixup_pkgconfig() +endif() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if (VCPKG_TARGET_IS_WINDOWS) + set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunvisapi.h") + else() + set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunspell/hunvisapi.h") + endif() + vcpkg_replace_string( + ${HUNSPELL_EXPORT_HDR} + "#if defined(HUNSPELL_STATIC)" + "#if 1" + ) +endif() -file(COPY ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.LESSER ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright-lgpl) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.MPL ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright-mpl) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING.LESSER" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright-lgpl) +file(INSTALL "${SOURCE_PATH}/COPYING.MPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright-mpl) diff --git a/ports/hunspell/vcpkg.json b/ports/hunspell/vcpkg.json new file mode 100644 index 00000000000000..c89c4ca94ac102 --- /dev/null +++ b/ports/hunspell/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "hunspell", + "version": "1.7.0", + "port-version": 5, + "description": "The most popular spellchecking library.", + "homepage": "https://github.com/hunspell/hunspell", + "supports": "!((arm | uwp) & windows)", + "dependencies": [ + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "libiconv" + ], + "features": { + "tools": { + "description": "Build hunspell tools" + } + } +} diff --git a/ports/hwloc/CMakeLists.txt b/ports/hwloc/CMakeLists.txt index 1b2e1c802d72cd..9407322a696eed 100644 --- a/ports/hwloc/CMakeLists.txt +++ b/ports/hwloc/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.0) project(hwloc LANGUAGES C - VERSION 1.11.7) + VERSION 2.2.0) configure_file(contrib/windows/hwloc_config.h include/hwloc/autogen/config.h COPYONLY) configure_file(contrib/windows/static-components.h include/static-components.h COPYONLY) @@ -18,24 +18,24 @@ endif() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/private/autogen/config.h "${PRIVATE_CONFIG_H}") add_library(libhwloc - src/base64.c - src/bind.c - src/bitmap.c - src/components.c - src/distances.c - src/diff.c - src/misc.c - src/pci-common.c - src/topology-custom.c - src/topology-noos.c - src/topology-synthetic.c - src/topology-windows.c - src/topology-x86.c - src/topology-xml-nolibxml.c - src/topology-xml.c - src/topology.c - src/traversal.c - src/dolib.c) + hwloc/base64.c + hwloc/bind.c + hwloc/bitmap.c + hwloc/components.c + hwloc/distances.c + hwloc/diff.c + hwloc/misc.c + hwloc/pci-common.c + hwloc/shmem.c + hwloc/topology-noos.c + hwloc/topology-synthetic.c + hwloc/topology-windows.c + hwloc/topology-x86.c + hwloc/topology-xml-nolibxml.c + hwloc/topology-xml.c + hwloc/topology.c + hwloc/traversal.c + hwloc/dolib.c) set_target_properties(libhwloc PROPERTIES DEFINE_SYMBOL _USRDLL) @@ -45,7 +45,7 @@ add_executable(hwloc-info target_link_libraries(hwloc-info PRIVATE libhwloc) foreach(Target IN ITEMS libhwloc hwloc-info) - target_include_directories(${Target} PRIVATE ./include ./src ${CMAKE_CURRENT_BINARY_DIR}/include) + target_include_directories(${Target} PRIVATE ./include ./hwloc ${CMAKE_CURRENT_BINARY_DIR}/include) target_compile_definitions(${Target} PRIVATE _CRT_SECURE_NO_WARNINGS) endforeach(Target) diff --git a/ports/hwloc/CONTROL b/ports/hwloc/CONTROL deleted file mode 100644 index f754a0fd840be9..00000000000000 --- a/ports/hwloc/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: hwloc -Version: 1.11.7-3 -Homepage: https://github.com/open-mpi/hwloc -Description: Portable Hardware Locality (hwloc) - The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, InfiniBand HCAs or GPUs. diff --git a/ports/hwloc/portfile.cmake b/ports/hwloc/portfile.cmake index 64a18ddc733f99..47036a028b8928 100644 --- a/ports/hwloc/portfile.cmake +++ b/ports/hwloc/portfile.cmake @@ -1,35 +1,54 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "UWP builds not supported") -endif() +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO open-mpi/hwloc - REF hwloc-1.11.7 - SHA512 bc3a74c60bfbed1e860c2fe2b5b49956eca5cfd9c00a262f6cd3026a42ae8b5411fa296e471a95cba657d943b8853675442e796e648034398af3015e5f59476e) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + REF 263908a2c1f21c0e221a8d1f6472daf3a1fc07b9 # hwloc-2.2.0 + SHA512 87f3d267781fd1f8907b0c080868b56943c7c2caecae5c0fbe9a55f8c5e9453bb6b7892834ba37696c1ebadd8d7bfdd5e513ea72a075211b808a1d5803ea4b8e +) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DHWLOC_SKIP_INCLUDES=ON) +if (VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) + + vcpkg_install_cmake() + + file(READ ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h PUBLIC_CONFIG_H) + string(REPLACE "defined( DECLSPEC_EXPORTS )" "0" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined( _USRDLL )" "0" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") + else() + string(REPLACE "defined( _USRDLL )" "1" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h "${PUBLIC_CONFIG_H}") + + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/tools) +else() + message(WARNING "${PORT} currently requires the following tool from the system package manager:\n libtool") -vcpkg_install_cmake() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + --disable-libxml2 + --disable-opencl + ) + + vcpkg_install_make() + + file(GLOB HWLOC_EXEC ${CURRENT_PACKAGES_DIR}/bin) + message("HWLOC_EXEC: ${HWLOC_EXEC}") + if (HWLOC_EXEC) + file(COPY ${HWLOC_EXEC} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(READ ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h PUBLIC_CONFIG_H) -string(REPLACE "defined( DECLSPEC_EXPORTS )" "0" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "defined( _USRDLL )" "0" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") -else() - string(REPLACE "defined( _USRDLL )" "1" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h "${PUBLIC_CONFIG_H}") - -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/tools) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/hwloc) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/hwloc/COPYING ${CURRENT_PACKAGES_DIR}/share/hwloc/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/hwloc/vcpkg.json b/ports/hwloc/vcpkg.json new file mode 100644 index 00000000000000..bcd406ad024ee5 --- /dev/null +++ b/ports/hwloc/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "hwloc", + "version-string": "2.2.0", + "port-version": 1, + "description": [ + "Portable Hardware Locality (hwloc)", + "The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, InfiniBand HCAs or GPUs." + ], + "homepage": "https://github.com/open-mpi/hwloc", + "supports": "!(uwp | arm | arm64)" +} diff --git a/ports/hyperscan/0001-remove-Werror.patch b/ports/hyperscan/0001-remove-Werror.patch new file mode 100644 index 00000000000000..0b3f53177fc738 --- /dev/null +++ b/ports/hyperscan/0001-remove-Werror.patch @@ -0,0 +1,27 @@ +From e2c0779de8096623be874c5fa0d275113b9d1204 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 14:44:36 -0700 +Subject: [PATCH] remove Werror + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 83197af..d27eb76 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -235,8 +235,8 @@ else() + if (NOT RELEASE_BUILD) + # -Werror is most useful during development, don't potentially break + # release builds +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") +- set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") ++ #set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") ++ #set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") + endif() + + if (DISABLE_ASSERTS) +-- +2.24.3 (Apple Git-128) + diff --git a/ports/hyperscan/CONTROL b/ports/hyperscan/CONTROL deleted file mode 100644 index bf45c223859ad4..00000000000000 --- a/ports/hyperscan/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: hyperscan -Version: 5.0.1-1 -Description: A regular expression library with O(length of input) match times that takes advantage of Intel hardware to provide blazing speed. -Build-Depends: boost-array, boost-chrono, boost-config, boost-core, boost-detail, boost-functional, boost-regex, boost-system, boost-thread, boost-type-traits, boost-unordered, boost-utility, boost-dynamic-bitset, boost-random, boost-graph, boost-multi-array, boost-icl, boost-ptr-container, python3, ragel \ No newline at end of file diff --git a/ports/hyperscan/portfile.cmake b/ports/hyperscan/portfile.cmake index be8410b38550d2..2aec198d3a5caa 100644 --- a/ports/hyperscan/portfile.cmake +++ b/ports/hyperscan/portfile.cmake @@ -1,41 +1,28 @@ -# Build with 'vcpkg.exe install hyperscan:x86-windows-static-release'; Hyperscan doesn't support dynamic libraries on Windows. -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +set(HYPERSCAN_VERSION 5.3.0) -set(HYPERSCAN_VERSION 5.1.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/intel/hyperscan/archive/v${HYPERSCAN_VERSION}.zip" - FILENAME "v${HYPERSCAN_VERSION}.zip" - SHA512 89a826c1e66175f1781f57d0d430f2d5d245ab590acc4b5df6638c5f6fe43914db028f8bc86e566ea27b55883c91be0d8da079b3d7547899f7cf540b52a3cf0a -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${HYPERSCAN_VERSION}) - -vcpkg_find_acquire_program(PYTHON3) + REPO intel/hyperscan + REF v${HYPERSCAN_VERSION} + SHA512 a4d85ffd2264e8e6745340ba51431361775a1e7a2da78edd31f6f53552ac61fdef718710ae53a254b7d5000f9ec1aafe7a48d9c55e76f5c6822486150bbc6c56 + HEAD_REF master + PATCHES + 0001-remove-Werror.patch +) -# Add python3 to path -get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY) -vcpkg_add_to_path(PREPEND ${PYTHON_PATH}) -vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/bin) -vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/debug/bin) vcpkg_find_acquire_program(PYTHON3) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS "-DPYTHON_EXECUTABLE=${PYTHON3}" ) vcpkg_install_cmake() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/hyperscan RENAME copyright) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME hs) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/hyperscan/vcpkg.json b/ports/hyperscan/vcpkg.json new file mode 100644 index 00000000000000..bddb221f39bd8f --- /dev/null +++ b/ports/hyperscan/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "hyperscan", + "version-string": "5.3.0", + "port-version": 2, + "description": "A regular expression library with O(length of input) match times that takes advantage of Intel hardware to provide blazing speed.", + "homepage": "https://www.hyperscan.io", + "supports": "!arm", + "dependencies": [ + "boost-array", + "boost-chrono", + "boost-config", + "boost-core", + "boost-crc", + "boost-detail", + "boost-dynamic-bitset", + "boost-functional", + "boost-graph", + "boost-icl", + "boost-multi-array", + "boost-ptr-container", + "boost-random", + "boost-regex", + "boost-system", + "boost-thread", + "boost-type-traits", + "boost-unordered", + "boost-utility", + "pcre", + "ragel" + ] +} diff --git a/ports/hypodermic/disable_hypodermic_tests.patch b/ports/hypodermic/disable_hypodermic_tests.patch new file mode 100644 index 00000000000000..2f06ff9458dcfa --- /dev/null +++ b/ports/hypodermic/disable_hypodermic_tests.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b6358a..5f55bc2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,7 +76,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS} ${WARNING_FLAGS}") + + + add_subdirectory(Hypodermic) +-add_subdirectory(Hypodermic.Tests) ++#add_subdirectory(Hypodermic.Tests) + + + # uninstall target diff --git a/ports/hypodermic/portfile.cmake b/ports/hypodermic/portfile.cmake new file mode 100644 index 00000000000000..9e1f2fd981de4c --- /dev/null +++ b/ports/hypodermic/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ybainier/Hypodermic + REF 3e86a5a1fd5e8279d6ca461f9f398fa3f3c2eddc # v2.5.2 + SHA512 1af2a94037aa5bf8c65aceb4a2e941f7f6d016422d345f86280085115e9bb871387370158b1a83891be8efdadd4eea0a1f8905225ebee64c000ec9023a9f212e + HEAD_REF master + PATCHES + "disable_hypodermic_tests.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug +) + + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/hypodermic/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hypodermic/LICENSE ${CURRENT_PACKAGES_DIR}/share/hypodermic/copyright) diff --git a/ports/hypodermic/vcpkg.json b/ports/hypodermic/vcpkg.json new file mode 100644 index 00000000000000..c36a5eec7fa024 --- /dev/null +++ b/ports/hypodermic/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "hypodermic", + "version-string": "2.5.2", + "description": "Hypodermic is a non-intrusive header only IoC container for C++", + "homepage": "https://github.com/ybainier/Hypodermic", + "license": "MIT", + "dependencies": [ + "boost-algorithm", + "boost-config", + "boost-format", + "boost-range", + "boost-signals2", + "boost-system", + "boost-test" + ] +} diff --git a/ports/hypre/CONTROL b/ports/hypre/CONTROL deleted file mode 100644 index 91d281589a325b..00000000000000 --- a/ports/hypre/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: hypre -Version: 2.11.2-2 -Homepage: https://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods -Description: SCALABLE LINEAR SOLVERS AND MULTIGRID METHODS -Build-Depends: mpi diff --git a/ports/hypre/fix-blas-vs14-math.patch b/ports/hypre/fix-blas-vs14-math.patch deleted file mode 100644 index 7fd0cd6fe14000..00000000000000 --- a/ports/hypre/fix-blas-vs14-math.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/blas/f2c.h Fri Sep 11 18:57:56 2015 -+++ b/blas/f2c.h Thu Dec 22 18:20:08 2016 -@@ -190,18 +190,18 @@ - typedef struct Namelist Namelist; - - /* The following undefs are to prevent conflicts with external libraries */ --#undef abs --#define abs(x) ((x) >= 0 ? (x) : -(x)) --#define dabs(x) (doublereal)abs(x) --#ifndef min --#define min(a,b) ((a) <= (b) ? (a) : (b)) --#define max(a,b) ((a) >= (b) ? (a) : (b)) --#endif --#define dmin(a,b) (doublereal)min(a,b) --#define dmax(a,b) (doublereal)max(a,b) --#define bit_test(a,b) ((a) >> (b) & 1) --#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) --#define bit_set(a,b) ((a) | ((uinteger)1 << (b))) -+//#undef abs -+//#define abs(x) ((x) >= 0 ? (x) : -(x)) -+//#define dabs(x) (doublereal)abs(x) -+//#ifndef min -+//#define min(a,b) ((a) <= (b) ? (a) : (b)) -+//#define max(a,b) ((a) >= (b) ? (a) : (b)) -+//#endif -+//#define dmin(a,b) (doublereal)min(a,b) -+//#define dmax(a,b) (doublereal)max(a,b) -+//#define bit_test(a,b) ((a) >> (b) & 1) -+//#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) -+//#define bit_set(a,b) ((a) | ((uinteger)1 << (b))) - - /* procedure parameter types for -A and -C++ */ - diff --git a/ports/hypre/fix-export-global-data-symbols.patch b/ports/hypre/fix-export-global-data-symbols.patch deleted file mode 100644 index 79231f532542fa..00000000000000 --- a/ports/hypre/fix-export-global-data-symbols.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/utilities/_hypre_utilities.h Thu Jun 09 15:56:18 2016 -+++ b/utilities/_hypre_utilities.h Wed Jan 04 18:08:27 2017 -@@ -13,6 +13,7 @@ - #ifndef hypre_UTILITIES_HEADER - #define hypre_UTILITIES_HEADER - -+#include "_hypre_export.h" - #include "HYPRE_utilities.h" - - #ifdef HYPRE_USING_OPENMP -@@ -610,7 +611,7 @@ - #ifdef HYPRE_TIMING_GLOBALS - hypre_TimingType *hypre_global_timing = NULL; - #else --extern hypre_TimingType *hypre_global_timing; -+extern HYPRE_EXPORT hypre_TimingType *hypre_global_timing; - #endif - - /*------------------------------------------------------- -@@ -781,7 +782,7 @@ - * Global variable used in hypre error checking - *--------------------------------------------------------------------------*/ - --extern HYPRE_Int hypre__global_error; -+extern HYPRE_EXPORT HYPRE_Int hypre__global_error; - #define hypre_error_flag hypre__global_error - - /*-------------------------------------------------------------------------- diff --git a/ports/hypre/fix-lapack-vs14-math.patch b/ports/hypre/fix-lapack-vs14-math.patch deleted file mode 100644 index 68d9057421a6eb..00000000000000 --- a/ports/hypre/fix-lapack-vs14-math.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/lapack/f2c.h Fri Sep 11 18:57:56 2015 -+++ b/lapack/f2c.h Thu Dec 22 18:22:26 2016 -@@ -190,18 +190,18 @@ - typedef struct Namelist Namelist; - - /* The following undefs are to prevent conflicts with external libraries */ --#undef abs --#define abs(x) ((x) >= 0 ? (x) : -(x)) --#define dabs(x) (doublereal)abs(x) --#ifndef min --#define min(a,b) ((a) <= (b) ? (a) : (b)) --#define max(a,b) ((a) >= (b) ? (a) : (b)) --#endif --#define dmin(a,b) (doublereal)min(a,b) --#define dmax(a,b) (doublereal)max(a,b) --#define bit_test(a,b) ((a) >> (b) & 1) --#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) --#define bit_set(a,b) ((a) | ((uinteger)1 << (b))) -+//#undef abs -+//#define abs(x) ((x) >= 0 ? (x) : -(x)) -+//#define dabs(x) (doublereal)abs(x) -+//#ifndef min -+//#define min(a,b) ((a) <= (b) ? (a) : (b)) -+//#define max(a,b) ((a) >= (b) ? (a) : (b)) -+//#endif -+//#define dmin(a,b) (doublereal)min(a,b) -+//#define dmax(a,b) (doublereal)max(a,b) -+//#define bit_test(a,b) ((a) >> (b) & 1) -+//#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) -+//#define bit_set(a,b) ((a) | ((uinteger)1 << (b))) - - /* procedure parameter types for -A and -C++ */ - diff --git a/ports/hypre/fix-macro-to-template.patch b/ports/hypre/fix-macro-to-template.patch deleted file mode 100644 index 22994f96a8e283..00000000000000 --- a/ports/hypre/fix-macro-to-template.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/struct_ls/pfmg3_setup_rap.c Thu Jun 09 15:56:18 2016 -+++ b/struct_ls/pfmg3_setup_rap.c Thu Dec 22 17:45:20 2016 -@@ -19,13 +19,28 @@ - * allow for coarsening to be done in the x- and y-directions also. - *--------------------------------------------------------------------------*/ - --#define MapIndex(in_index, cdir, out_index) \ -- hypre_IndexD(out_index, cdir) = hypre_IndexD(in_index, 2); \ -- cdir = (cdir + 1) % 3; \ -- hypre_IndexD(out_index, cdir) = hypre_IndexD(in_index, 0); \ -- cdir = (cdir + 1) % 3; \ -- hypre_IndexD(out_index, cdir) = hypre_IndexD(in_index, 1); \ -- cdir = (cdir + 1) % 3; -+//#define MapIndex(in_index, cdir, out_index) \ -+// hypre_IndexD(out_index, cdir) = hypre_IndexD(in_index, 2); \ -+// cdir = (cdir + 1) % 3; \ -+// hypre_IndexD(out_index, cdir) = hypre_IndexD(in_index, 0); \ -+// cdir = (cdir + 1) % 3; \ -+// hypre_IndexD(out_index, cdir) = hypre_IndexD(in_index, 1); \ -+// cdir = (cdir + 1) % 3; -+ -+template -+void MapIndex(T& in_index, U& cdir, V& out_index) -+{ -+ if(cdir > 3) cdir = cdir - (cdir / 3) * 3; -+ hypre_IndexD(out_index, cdir) = hypre_IndexD(in_index, 2); -+ if(cdir == 3) cdir = 1; -+ else ++cdir; -+ hypre_IndexD(out_index, cdir) = hypre_IndexD(in_index, 0); -+ if(cdir == 3) cdir = 1; -+ else ++cdir; -+ hypre_IndexD(out_index, cdir) = hypre_IndexD(in_index, 1); -+ if(cdir == 3) cdir = 1; -+ else ++cdir; -+} - - /*-------------------------------------------------------------------------- - * Sets up new coarse grid operator stucture. diff --git a/ports/hypre/fix-root-cmakelists.patch b/ports/hypre/fix-root-cmakelists.patch deleted file mode 100644 index e69d6607e53dd2..00000000000000 --- a/ports/hypre/fix-root-cmakelists.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- a/CMakeLists.txt Mon Mar 13 21:37:24 2017 -+++ b/CMakeLists.txt Sun Aug 06 19:34:00 2017 -@@ -1,6 +1,8 @@ - cmake_minimum_required (VERSION 2.8.8) - project (hypre) - -+include(GenerateExportHeader) -+ - # The version number. - set (HYPRE_VERSION 2.11.2) - set (HYPRE_DATE 2017/03/13) -@@ -618,6 +620,8 @@ - struct_ls/sparse_msg_solve.c - ) - -+set_source_files_properties(struct_ls/pfmg3_setup_rap.c PROPERTIES LANGUAGE CXX) -+ - # Headers and sources: sstruct_mv - list (APPEND HYPRE_HEADERS - sstruct_mv/HYPRE_sstruct_mv.h -@@ -758,11 +762,11 @@ - find_package (MPI) - if ((MPI_C_FOUND) AND (NOT CMAKE_C_COMPILER STREQUAL MPI_C_COMPILER)) - include_directories (${MPI_C_INCLUDE_PATH}) -- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS}") -+ #set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS}") - endif () - if ((MPI_CXX_FOUND) AND (NOT CMAKE_CXX_COMPILER STREQUAL MPI_CXX_COMPILER)) - include_directories (${MPI_CXX_INCLUDE_PATH}) -- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS}") -+ #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS}") - endif () - endif (NOT HYPRE_SEQUENTIAL) - -@@ -807,7 +811,23 @@ - - add_library (HYPRE ${HYPRE_SOURCES} ${FEI_LIBS}) - --install (TARGETS HYPRE DESTINATION lib) -+if (NOT HYPRE_SEQUENTIAL) -+ target_link_libraries(HYPRE ${MPI_C_LIBRARIES}) -+endif() -+ -+if (WIN32 AND BUILD_SHARED_LIBS) -+ set_target_properties(HYPRE PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) -+endif() -+ -+generate_export_header(HYPRE EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/_hypre_export.h) -+list(APPEND HYPRE_HEADERS ${CMAKE_BINARY_DIR}/_hypre_export.h) -+ -+install (TARGETS HYPRE -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+) -+ - install (FILES ${HYPRE_HEADERS} DESTINATION include) - - # add_subdirectory (test EXCLUDE_FROM_ALL) diff --git a/ports/hypre/portfile.cmake b/ports/hypre/portfile.cmake index f8ab07b9d0f4d3..5d854d98522b1d 100644 --- a/ports/hypre/portfile.cmake +++ b/ports/hypre/portfile.cmake @@ -1,20 +1,13 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hypre-2.11.2/src) -vcpkg_download_distfile(ARCHIVE - URLS "http://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods/download/hypre-2.11.2.tar.gz" - FILENAME "hypre-2.11.2.tar.gz" - SHA512 a06321028121e5420fa944ce4fae5f9b96e6021ec2802e68ec3c349f19a20543ed7eff774a4735666c5807ce124eb571b3f86757c67e91faa1c683c3f657469f -) -vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-root-cmakelists.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-macro-to-template.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-blas-vs14-math.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-lapack-vs14-math.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-export-global-data-symbols.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hypre-space/hypre + REF v2.19.0 + SHA512 999979bc2e7d32aef7c084fc8508fb818e6f904db0ee3ebf6b8e8132f290201c407aaba0aa89e7bf09e7264f4e99caf04f3147458847de816fc8ffc81dbee2df + HEAD_REF master ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -24,10 +17,12 @@ else() endif() vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/src PREFER_NINJA OPTIONS ${OPTIONS} + -DHYPRE_ENABLE_HYPRE_BLAS=OFF + -DHYPRE_ENABLE_HYPRE_LAPACK=OFF OPTIONS_RELEASE -DHYPRE_BUILD_TYPE=Release -DHYPRE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} @@ -39,7 +34,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/HYPRE) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/../COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/hypre/copyright) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/hypre/vcpkg.json b/ports/hypre/vcpkg.json new file mode 100644 index 00000000000000..4ca1f11b40d7b4 --- /dev/null +++ b/ports/hypre/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "hypre", + "version-string": "2.19.0", + "port-version": 1, + "description": "SCALABLE LINEAR SOLVERS AND MULTIGRID METHODS", + "homepage": "https://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods", + "dependencies": [ + "blas", + "lapack", + "mpi" + ] +} diff --git a/ports/icu/CONTROL b/ports/icu/CONTROL deleted file mode 100644 index 238ac176e03bdf..00000000000000 --- a/ports/icu/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: icu -Version: 61.1-7 -Homepage: http://icu-project.org/apiref/icu4c/ -Description: Mature and widely used Unicode and localization library. diff --git a/ports/icu/fix-extra.patch b/ports/icu/fix-extra.patch new file mode 100644 index 00000000000000..935dfd77593dd2 --- /dev/null +++ b/ports/icu/fix-extra.patch @@ -0,0 +1,13 @@ +diff --urN a/source/extra/Makefile.in b/source/extra/Makefile.in +--- a/source/extra/Makefile.in ++++ b/source/extra/Makefile.in +@@ -23,7 +23,7 @@ + ## Files to remove for 'make clean' + CLEANFILES = *~ + +-SUBDIRS = scrptrun uconv ++SUBDIRS = uconv + + ## List of phony targets + .PHONY : all all-local all-recursive install install-local \ + diff --git a/ports/icu/fix_parallel_build_on_windows.patch b/ports/icu/fix_parallel_build_on_windows.patch index b0ea7556c851fb..6bd91094a1ffff 100644 --- a/ports/icu/fix_parallel_build_on_windows.patch +++ b/ports/icu/fix_parallel_build_on_windows.patch @@ -1,13 +1,25 @@ -diff --git a/source/data/Makefile.in b/source/data/Makefile.in -index 1140b69..936ef81 100644 +diff --urN a/source/data/Makefile.in b/source/data/Makefile.in --- a/source/data/Makefile.in +++ b/source/data/Makefile.in -@@ -514,7 +514,7 @@ build-dir: - # The | is an order-only prerequisite. This helps when the -j option is used, - # and we don't want the files to be built before the directories are built. - ifneq ($(filter order-only,$(.FEATURES)),) --$(ALL_FILES) $(ALL_INDEX_SRC_FILES): | build-dir -+$(ALL_FILES) $(ALL_INDEX_SRC_FILES) $(SO_VERSION_DATA): | build-dir +@@ -236,11 +236,12 @@ + ## Include the main build rules for data files + include $(top_builddir)/$(subdir)/rules.mk + ++PKGDATA_LIST = $(TMP_DIR)/icudata.lst + + ifeq ($(ENABLE_SO_VERSION_DATA),1) + ifeq ($(PKGDATA_MODE),dll) + SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res +-$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc | $(TMP_DIR)/dirs.timestamp ++$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc $(PKGDATA_LIST) + ifeq ($(MSYS_RC_MODE),1) + rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $< + else +@@ -249,7 +250,6 @@ + endif endif - # Now, sections for building each kind of data. +-PKGDATA_LIST = $(TMP_DIR)/icudata.lst + + + ##################################################### diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index 9225246f3d8309..9731bf5b4b2138 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -1,225 +1,224 @@ -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds are currently not supported.") -endif() - -include(vcpkg_common_functions) - -set(VERSION 61.1) -set(VERSION2 61_1) -set(ICU_VERSION_MAJOR 61) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/icu-${VERSION}/icu) -vcpkg_download_distfile( - ARCHIVE - URLS "http://download.icu-project.org/files/icu4c/${VERSION}/icu4c-${VERSION2}-src.tgz" - FILENAME "icu4c-${VERSION2}-src.tgz" - SHA512 4c37691246db802e4bae0c8c5f6ac1dac64c5753b607e539c5c1c36e361fcd9dd81bd1d3b5416c2960153b83700ccdb356412847d0506ab7782ae626ac0ffb94 -) -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch - ${CMAKE_CURRENT_LIST_DIR}/remove-MD-from-configure.patch - ${CMAKE_CURRENT_LIST_DIR}/fix_parallel_build_on_windows.patch -) - -set(CONFIGURE_OPTIONS "--disable-samples --disable-tests") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --disable-static --enable-shared") -else() - set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-static --disable-shared") -endif() - -set(CONFIGURE_OPTIONS_RELASE "--disable-debug --enable-release --prefix=${CURRENT_PACKAGES_DIR}") -set(CONFIGURE_OPTIONS_DEBUG "--enable-debug --disable-release --prefix=${CURRENT_PACKAGES_DIR}/debug") - -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(BASH bash) - set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -fPIC") - set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fPIC") - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - # Configure release - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - set(ENV{CFLAGS} "-O2 ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}") - set(ENV{CXXFLAGS} "-O2 ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_RELEASE}") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c - "${SOURCE_PATH}/source/runConfigureICU Linux ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_RELASE}" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - LOGNAME "configure-${TARGET_TRIPLET}-rel") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - # Configure debug - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - set(ENV{CFLAGS} "-O0 -g ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}") - set(ENV{CXXFLAGS} "-O0 -g ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_DEBUG}") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c - "${SOURCE_PATH}/source/runConfigureICU Linux ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEBUG}" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - LOGNAME "configure-${TARGET_TRIPLET}-dbg") - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - endif() - -else() - - set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --host=i686-pc-mingw32") - - # Acquire tools - vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15) - - # Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". - string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") - string(REPLACE ";$ENV{SystemRoot}\\System32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "${NEWPATH}") - set(ENV{PATH} "${NEWPATH}") - set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) - - set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15) - file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source) - - if(VCPKG_CRT_LINKAGE STREQUAL static) - set(ICU_RUNTIME "-MT") - else() - set(ICU_RUNTIME "-MD") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - # Configure release - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - set(ENV{CFLAGS} "${ICU_RUNTIME} -O2 -Oi -Zi -FS ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}") - set(ENV{CXXFLAGS} "${ICU_RUNTIME} -O2 -Oi -Zi -FS ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_RELEASE}") - set(ENV{LDFLAGS} "-DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c - "${SOURCE_PATH}/source/runConfigureICU MSYS/MSVC ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_RELASE}" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - LOGNAME "configure-${TARGET_TRIPLET}-rel") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - # Configure debug - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - set(ENV{CFLAGS} "${ICU_RUNTIME}d -Od -Zi -FS -RTC1 ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}") - set(ENV{CXXFLAGS} "${ICU_RUNTIME}d -Od -Zi -FS -RTC1 ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_DEBUG}") - set(ENV{LDFLAGS} "-DEBUG") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c - "${SOURCE_PATH}/source/runConfigureICU MSYS/MSVC ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEBUG}" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - LOGNAME "configure-${TARGET_TRIPLET}-dbg") - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - endif() -endif() - -unset(ENV{CFLAGS}) -unset(ENV{CXXFLAGS}) -unset(ENV{LDFLAGS}) - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - # Build release - message(STATUS "Package ${TARGET_TRIPLET}-rel") - vcpkg_execute_build_process( - COMMAND ${BASH} --noprofile --norc -c "make -j ${VCPKG_CONCURRENCY}" - NO_PARALLEL_COMMAND ${BASH} --noprofile --norc -c "make" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - LOGNAME "make-build-${TARGET_TRIPLET}-rel") - - vcpkg_execute_build_process( - COMMAND ${BASH} --noprofile --norc -c "make install" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - LOGNAME "make-install-${TARGET_TRIPLET}-rel") - message(STATUS "Package ${TARGET_TRIPLET}-rel done") -endif() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - # Build debug - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - vcpkg_execute_build_process( - COMMAND ${BASH} --noprofile --norc -c "make -j ${VCPKG_CONCURRENCY}" - NO_PARALLEL_COMMAND ${BASH} --noprofile --norc -c "make" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - LOGNAME "make-build-${TARGET_TRIPLET}-dbg") - - vcpkg_execute_build_process( - COMMAND ${BASH} --noprofile --norc -c "make install" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - LOGNAME "make-install-${TARGET_TRIPLET}-dbg") - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") -endif() - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/share - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/lib/pkgconfig - ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig - ${CURRENT_PACKAGES_DIR}/lib/icu - ${CURRENT_PACKAGES_DIR}/debug/lib/icud) - -file(GLOB TEST_LIBS - ${CURRENT_PACKAGES_DIR}/lib/*test* - ${CURRENT_PACKAGES_DIR}/debug/lib/*test*) -file(REMOVE ${TEST_LIBS}) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - # copy icu dlls from lib to bin - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION_MAJOR}.dll) - file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/icu*d${ICU_VERSION_MAJOR}.dll) - file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - endif() -else() - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - # rename static libraries to match import libs - # see https://gitlab.kitware.com/cmake/cmake/issues/16617 - foreach(MODULE dt in io tu uc) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sicu${MODULE}.lib ${CURRENT_PACKAGES_DIR}/lib/icu${MODULE}.lib) - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sicu${MODULE}d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/icu${MODULE}d.lib) - endif() - endforeach() - endif() - - # force U_STATIC_IMPLEMENTATION macro - foreach(HEADER utypes.h utf_old.h platform.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER} HEADER_CONTENTS) - string(REPLACE "defined(U_STATIC_IMPLEMENTATION)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER} "${HEADER_CONTENTS}") - endforeach() -endif() - -# remove any remaining dlls in /lib -file(GLOB DUMMY_DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) -if(DUMMY_DLLS) - file(REMOVE ${DUMMY_DLLS}) -endif() - -# Generates warnings about missing pdbs for icudt.dll -# This is expected because ICU database contains no executable code -vcpkg_copy_pdbs() - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/icu) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/icu/LICENSE ${CURRENT_PACKAGES_DIR}/share/icu/copyright) +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(ICU_VERSION_MAJOR 69) +set(ICU_VERSION_MINOR 1) +set(VERSION "${ICU_VERSION_MAJOR}.${ICU_VERSION_MINOR}") +set(VERSION2 "${ICU_VERSION_MAJOR}_${ICU_VERSION_MINOR}") +set(VERSION3 "${ICU_VERSION_MAJOR}-${ICU_VERSION_MINOR}") + +vcpkg_download_distfile( + ARCHIVE + URLS "https://github.com/unicode-org/icu/releases/download/release-${VERSION3}/icu4c-${VERSION2}-src.tgz" + FILENAME "icu4c-${VERSION2}-src.tgz" + SHA512 d4aeb781715144ea6e3c6b98df5bbe0490bfa3175221a1d667f3e6851b7bd4a638fa4a37d4a921ccb31f02b5d15a6dded9464d98051964a86f7b1cde0ff0aab7 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch + ${CMAKE_CURRENT_LIST_DIR}/remove-MD-from-configure.patch + ${CMAKE_CURRENT_LIST_DIR}/fix_parallel_build_on_windows.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-extra.patch +) + +vcpkg_find_acquire_program(PYTHON3) +set(ENV{PYTHON} "${PYTHON3}") + +list(APPEND CONFIGURE_OPTIONS --disable-samples --disable-tests --disable-layoutex) + +list(APPEND CONFIGURE_OPTIONS_RELEASE --disable-debug --enable-release) +list(APPEND CONFIGURE_OPTIONS_DEBUG --enable-debug --disable-release) + +set(RELEASE_TRIPLET ${TARGET_TRIPLET}-rel) +set(DEBUG_TRIPLET ${TARGET_TRIPLET}-dbg) + +if(NOT "${TARGET_TRIPLET}" STREQUAL "${HOST_TRIPLET}") + # cross compiling + set(TOOL_PATH "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}") + # convert to unix path + string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" _VCPKG_TOOL_PATH "${TOOL_PATH}") + list(APPEND CONFIGURE_OPTIONS "--with-cross-build=${_VCPKG_TOOL_PATH}") +endif() + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH source + OPTIONS ${CONFIGURE_OPTIONS} + OPTIONS_RELEASE ${CONFIGURE_OPTIONS_RELEASE} + OPTIONS_DEBUG ${CONFIGURE_OPTIONS_DEBUG} + DETERMINE_BUILD_TRIPLET +) + +if(VCPKG_TARGET_IS_OSX AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")) + + vcpkg_build_make() + # remove this block if https://unicode-org.atlassian.net/browse/ICU-21458 + # is resolved and use the configure script instead + if(DEFINED CMAKE_INSTALL_NAME_DIR) + set(ID_PREFIX "${CMAKE_INSTALL_NAME_DIR}") + else() + set(ID_PREFIX "@rpath") + endif() + + # install_name_tool may be missing if cross-compiling + find_program( + INSTALL_NAME_TOOL + install_name_tool + HINTS /usr/bin /Library/Developer/CommandLineTools/usr/bin/ + DOC "Absolute path of install_name_tool" + REQUIRED + ) + + message(STATUS "setting rpath prefix for macOS dynamic libraries") + + # add ID_PREFIX to libicudata libicui18n libicuio libicutu libicuuc + foreach(LIB_NAME libicudata libicui18n libicuio libicutu libicuuc) + vcpkg_execute_build_process( + COMMAND ${INSTALL_NAME_TOOL} -id "${ID_PREFIX}/${LIB_NAME}.${ICU_VERSION_MAJOR}.dylib" + "${LIB_NAME}.${VERSION}.dylib" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/lib" + LOGNAME "make-build-fix-rpath-${RELEASE_TRIPLET}" + ) + endforeach() + + # add ID_PREFIX to libicui18n libicuio libicutu dependencies + foreach(LIB_NAME libicui18n libicuio) + vcpkg_execute_build_process( + COMMAND ${INSTALL_NAME_TOOL} -change "libicuuc.${ICU_VERSION_MAJOR}.dylib" + "${ID_PREFIX}/libicuuc.${ICU_VERSION_MAJOR}.dylib" + "${LIB_NAME}.${VERSION}.dylib" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/lib" + LOGNAME "make-build-fix-rpath-${RELEASE_TRIPLET}" + ) + vcpkg_execute_build_process( + COMMAND ${INSTALL_NAME_TOOL} -change "libicudata.${ICU_VERSION_MAJOR}.dylib" + "${ID_PREFIX}/libicudata.${ICU_VERSION_MAJOR}.dylib" + "${LIB_NAME}.${VERSION}.dylib" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/lib" + LOGNAME "make-build-fix-rpath-${RELEASE_TRIPLET}" + ) + endforeach() + + # add ID_PREFIX to remaining libicuio libicutu dependencies + foreach(LIB_NAME libicuio libicutu) + vcpkg_execute_build_process( + COMMAND ${INSTALL_NAME_TOOL} -change "libicui18n.${ICU_VERSION_MAJOR}.dylib" + "${ID_PREFIX}/libicui18n.${ICU_VERSION_MAJOR}.dylib" + "${LIB_NAME}.${VERSION}.dylib" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/lib" + LOGNAME "make-build-fix-rpath-${RELEASE_TRIPLET}" + ) + endforeach() + + # add ID_PREFIX to libicuuc dependencies + vcpkg_execute_build_process( + COMMAND ${INSTALL_NAME_TOOL} -change "libicudata.${ICU_VERSION_MAJOR}.dylib" + "${ID_PREFIX}/libicudata.${ICU_VERSION_MAJOR}.dylib" + "libicuuc.${VERSION}.dylib" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/lib" + LOGNAME "make-build-fix-rpath-${RELEASE_TRIPLET}" + ) +endif() + +vcpkg_install_make() + +if(VCPKG_TARGET_IS_MINGW) + file(GLOB ICU_TOOLS + ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_HOST_EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_HOST_EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/bin/icu-config + ${CURRENT_PACKAGES_DIR}/debug/bin/icu-config) + file(REMOVE ${ICU_TOOLS}) +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/share + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/lib/icu + ${CURRENT_PACKAGES_DIR}/debug/lib/icu + ${CURRENT_PACKAGES_DIR}/debug/lib/icud) + +file(GLOB TEST_LIBS + ${CURRENT_PACKAGES_DIR}/lib/*test* + ${CURRENT_PACKAGES_DIR}/debug/lib/*test*) +if(TEST_LIBS) + file(REMOVE ${TEST_LIBS}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(VCPKG_TARGET_IS_WINDOWS) + # rename static libraries to match import libs + # see https://gitlab.kitware.com/cmake/cmake/issues/16617 + foreach(MODULE dt in io tu uc) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sicu${MODULE}${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/icu${MODULE}${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sicu${MODULE}d${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/icu${MODULE}d${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + endif() + endforeach() + + file(GLOB_RECURSE pkg_files LIST_DIRECTORIES false ${CURRENT_PACKAGES_DIR}/*.pc) + message(STATUS "${pkg_files}") + foreach(pkg_file IN LISTS pkg_files) + message(STATUS "${pkg_file}") + file(READ ${pkg_file} PKG_FILE) + string(REGEX REPLACE "-ls([^ \\t\\n]+)" "-l\\1" PKG_FILE "${PKG_FILE}" ) + file(WRITE ${pkg_file} "${PKG_FILE}") + endforeach() + endif() + + # force U_STATIC_IMPLEMENTATION macro + foreach(HEADER utypes.h utf_old.h platform.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER} HEADER_CONTENTS) + string(REPLACE "defined(U_STATIC_IMPLEMENTATION)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER} "${HEADER_CONTENTS}") + endforeach() +endif() + +# Install executables from /tools/icu/sbin to /tools/icu/bin on unix (/bin because icu require this for cross compiling) +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + vcpkg_copy_tools( + TOOL_NAMES icupkg gennorm2 gencmn genccode gensprep + SEARCH_DIR ${CURRENT_PACKAGES_DIR}/tools/icu/sbin + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin + ) +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/tools/icu/sbin + ${CURRENT_PACKAGES_DIR}/tools/icu/debug) + +# To cross compile, we need some files at specific positions. So lets copy them +file(GLOB CROSS_COMPILE_DEFS ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/config/icucross.*) +file(INSTALL ${CROSS_COMPILE_DEFS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/config) + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION_MAJOR}.dll) + file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) +endif() + +# copy dlls +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION_MAJOR}.dll) + file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/icu*${ICU_VERSION_MAJOR}.dll) + file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# remove any remaining dlls in /lib +file(GLOB DUMMY_DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +if(DUMMY_DLLS) + file(REMOVE ${DUMMY_DLLS}) +endif() + +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread m) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) diff --git a/ports/icu/remove-MD-from-configure.patch b/ports/icu/remove-MD-from-configure.patch index d35205ebf1d584..fe4782b3445b3d 100644 --- a/ports/icu/remove-MD-from-configure.patch +++ b/ports/icu/remove-MD-from-configure.patch @@ -7,12 +7,12 @@ diff -urN a/source/runConfigureICU b/source/runConfigureICU CXX=cl; export CXX - RELEASE_CFLAGS='-Gy -MD' - RELEASE_CXXFLAGS='-Gy -MD' -- DEBUG_CFLAGS='-Zi -MDd' -- DEBUG_CXXFLAGS='-Zi -MDd' +- DEBUG_CFLAGS='-FS -Zi -MDd' +- DEBUG_CXXFLAGS='-FS -Zi -MDd' + RELEASE_CFLAGS='-Gy' + RELEASE_CXXFLAGS='-Gy' -+ DEBUG_CFLAGS='-Zi' -+ DEBUG_CXXFLAGS='-Zi' ++ DEBUG_CFLAGS='-FS -Zi' ++ DEBUG_CXXFLAGS='-FS -Zi' DEBUG_LDFLAGS='-DEBUG' ;; *BSD) diff --git a/ports/icu/vcpkg-cmake-wrapper.cmake b/ports/icu/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..7d7a818a0691b8 --- /dev/null +++ b/ports/icu/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +list(FIND ARGS "COMPONENTS" COMPONENTS_IDX) +if(NOT COMPONENTS_IDX EQUAL -1) + _find_package(${ARGS} COMPONENTS data) +else() + _find_package(${ARGS}) +endif() \ No newline at end of file diff --git a/ports/icu/vcpkg.json b/ports/icu/vcpkg.json new file mode 100644 index 00000000000000..c1e80e53057806 --- /dev/null +++ b/ports/icu/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "icu", + "version": "69.1", + "port-version": 14, + "description": "Mature and widely used Unicode and localization library.", + "homepage": "http://icu-project.org/apiref/icu4c/", + "supports": "!uwp", + "dependencies": [ + { + "name": "icu", + "host": true + } + ] +} diff --git a/ports/ideviceinstaller/CONTROL b/ports/ideviceinstaller/CONTROL deleted file mode 100644 index 3697611a4e7661..00000000000000 --- a/ports/ideviceinstaller/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ideviceinstaller -Version: 1.1.2.23-1 -Description: Manage apps of iOS devices -Build-Depends: libimobiledevice, libzip \ No newline at end of file diff --git a/ports/ideviceinstaller/portfile.cmake b/ports/ideviceinstaller/portfile.cmake index c5523e6ba30c60..869ada8d5f35fe 100644 --- a/ports/ideviceinstaller/portfile.cmake +++ b/ports/ideviceinstaller/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libimobiledevice-win32/ideviceinstaller diff --git a/ports/ideviceinstaller/vcpkg.json b/ports/ideviceinstaller/vcpkg.json new file mode 100644 index 00000000000000..f0ba45361a1ed9 --- /dev/null +++ b/ports/ideviceinstaller/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "ideviceinstaller", + "version-string": "1.1.2.23", + "port-version": 2, + "description": "Manage apps of iOS devices", + "dependencies": [ + "libimobiledevice", + "libzip" + ] +} diff --git a/ports/idevicerestore/CONTROL b/ports/idevicerestore/CONTROL deleted file mode 100644 index ca6cabbd02ed19..00000000000000 --- a/ports/idevicerestore/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: idevicerestore -Version: 1.0.12-3 -Description: Restore/upgrade firmware of iOS devices -Build-Depends: libimobiledevice, curl, libirecovery, libzip \ No newline at end of file diff --git a/ports/idevicerestore/fix-libgen.h-cannot-be-found.patch b/ports/idevicerestore/fix-libgen.h-cannot-be-found.patch new file mode 100644 index 00000000000000..db7450eb23bcb5 --- /dev/null +++ b/ports/idevicerestore/fix-libgen.h-cannot-be-found.patch @@ -0,0 +1,32 @@ +diff --git a/src/common.c b/src/common.c +index afe1bc0..9219a8f 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -29,7 +29,9 @@ + #include + #include + #include ++#ifndef _MSC_VER + #include ++#endif + #include + + #include "common.h" +diff --git a/src/idevicerestore.c b/src/idevicerestore.c +index efa13c3..c17a2ba 100644 +--- a/src/idevicerestore.c ++++ b/src/idevicerestore.c +@@ -38,12 +38,12 @@ + #include + #ifndef _MSC_VER + #include ++#include + #endif + #include + #include + #include + #include +-#include + + #include + diff --git a/ports/idevicerestore/portfile.cmake b/ports/idevicerestore/portfile.cmake index 67aeb4c373ab04..5cd1acef983437 100644 --- a/ports/idevicerestore/portfile.cmake +++ b/ports/idevicerestore/portfile.cmake @@ -1,4 +1,4 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "linux" "osx") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -6,7 +6,9 @@ vcpkg_from_github( REF 1.0.12 SHA512 ba623be56c2f37853516d7d4c32e16f1ec72f33d512f18aa812ce6830af4b9e389f7af5321888dd0ddd168e282b652e379b60f90970680e213eabf489f406915 HEAD_REF msvc-master - PATCHES libcurl_d.patch + PATCHES + libcurl_d.patch + fix-libgen.h-cannot-be-found.patch ) vcpkg_install_msbuild( diff --git a/ports/idevicerestore/vcpkg.json b/ports/idevicerestore/vcpkg.json new file mode 100644 index 00000000000000..c2d9b175e56f17 --- /dev/null +++ b/ports/idevicerestore/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "idevicerestore", + "version-string": "1.0.12", + "port-version": 5, + "description": "Restore/upgrade firmware of iOS devices", + "supports": "windows", + "dependencies": [ + "curl", + "libimobiledevice", + "libirecovery", + "libzip" + ] +} diff --git a/ports/if97/CONTROL b/ports/if97/CONTROL deleted file mode 100644 index 787bc11828b740..00000000000000 --- a/ports/if97/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: if97 -Version: 2.1.2 -Homepage: https://github.com/CoolProp/IF97 -Description: This repository implements the IF97 formulation for the properties of pure water substance. diff --git a/ports/if97/portfile.cmake b/ports/if97/portfile.cmake index c07d11e5c202db..57c2b5c55411b0 100644 --- a/ports/if97/portfile.cmake +++ b/ports/if97/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CoolProp/IF97 diff --git a/ports/if97/vcpkg.json b/ports/if97/vcpkg.json new file mode 100644 index 00000000000000..56f733bde2b076 --- /dev/null +++ b/ports/if97/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "if97", + "version-string": "2.1.2", + "port-version": 1, + "description": "This repository implements the IF97 formulation for the properties of pure water substance.", + "homepage": "https://github.com/CoolProp/IF97" +} diff --git a/ports/igloo/CONTROL b/ports/igloo/CONTROL deleted file mode 100644 index ffa162695e00c4..00000000000000 --- a/ports/igloo/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: igloo -Version: 1.1.1 -Description: A framework for unit testing in C++ diff --git a/ports/igloo/portfile.cmake b/ports/igloo/portfile.cmake index a1ab1757604d0e..6a9ce38815e739 100644 --- a/ports/igloo/portfile.cmake +++ b/ports/igloo/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO joakimkarlsson/igloo diff --git a/ports/igloo/vcpkg.json b/ports/igloo/vcpkg.json new file mode 100644 index 00000000000000..58c0a3c1e41450 --- /dev/null +++ b/ports/igloo/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "igloo", + "version-string": "1.1.1", + "port-version": 1, + "description": "A framework for unit testing in C++" +} diff --git a/ports/ignition-cmake0/do-not-compile-gtest.patch b/ports/ignition-cmake0/do-not-compile-gtest.patch new file mode 100644 index 00000000000000..7c20a0dbeacde9 --- /dev/null +++ b/ports/ignition-cmake0/do-not-compile-gtest.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/IgnConfigureBuild.cmake b/cmake/IgnConfigureBuild.cmake +--- a/cmake/IgnConfigureBuild.cmake ++++ b/cmake/IgnConfigureBuild.cmake +@@ -109,7 +109,9 @@ + # Add all the source code directories + add_subdirectory(src) + add_subdirectory(include) +- add_subdirectory(test) ++ if(BUILD_TESTING) ++ add_subdirectory(test) ++ endif() + + + #-------------------------------------- diff --git a/ports/ignition-cmake0/fix-find-ign-curl.patch b/ports/ignition-cmake0/fix-find-ign-curl.patch new file mode 100644 index 00000000000000..9189712d278f83 --- /dev/null +++ b/ports/ignition-cmake0/fix-find-ign-curl.patch @@ -0,0 +1,16 @@ +diff -r 3276aecbcbb4 -r 33b5d95affd2 cmake/FindIgnCURL.cmake +--- a/cmake/FindIgnCURL.cmake ++++ b/cmake/FindIgnCURL.cmake +@@ -46,6 +46,12 @@ + + # Older versions of curl don't create imported targets, so we will create + # them here if they have not been provided. ++ if(TARGET CURL::libcurl AND NOT TARGET curl::curl) ++ add_library(curl::curl INTERFACE IMPORTED) ++ set_target_properties(curl::curl PROPERTIES ++ INTERFACE_LINK_LIBRARIES CURL::libcurl) ++ endif() ++ + include(IgnImportTarget) + + if(NOT TARGET curl::curl) diff --git a/ports/ignition-cmake0/portfile.cmake b/ports/ignition-cmake0/portfile.cmake new file mode 100644 index 00000000000000..c57d7b03e9f0b2 --- /dev/null +++ b/ports/ignition-cmake0/portfile.cmake @@ -0,0 +1,26 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +set(PACKAGE_VERSION "0.6.1") + +ignition_modular_library(NAME cmake + VERSION ${PACKAGE_VERSION} + REF "ignition-cmake_${PACKAGE_VERSION}" + SHA512 bd57cd43dd944fef264353b67fbbbab989d4bb638b684f80868a8b61fe0b854e156e00852b967c7caa8598315bea60bd8b27ff000410e93c4f04185a13c90489 + # Ensure that gtest is not compiled (backport of https://bitbucket.org/ignitionrobotics/ign-cmake/pull-requests/163) + PATCHES do-not-compile-gtest.patch + # Support for ARM64 (backport of https://bitbucket.org/ignitionrobotics/ign-cmake/pull-requests/168) + support-arm64.patch + # Do not depend on pkg-config installed to find uuid + uuid-do-not-require-pkg-config.patch + # Fix FindIgnCURL.cmake (backport of https://bitbucket.org/ignitionrobotics/ign-cmake/pull-requests/175) + fix-find-ign-curl.patch + ) + +# Permit empty include folder +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +# Remove unneccessary directory, as ignition-cmake is a pure CMake package +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Install custom usage +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) diff --git a/ports/ignition-cmake0/support-arm64.patch b/ports/ignition-cmake0/support-arm64.patch new file mode 100644 index 00000000000000..aba99ba352a6ed --- /dev/null +++ b/ports/ignition-cmake0/support-arm64.patch @@ -0,0 +1,17 @@ +diff -r 8a976a308d77 -r 1bea7874cfec cmake/IgnSetCompilerFlags.cmake +--- a/cmake/IgnSetCompilerFlags.cmake ++++ b/cmake/IgnSetCompilerFlags.cmake +@@ -279,13 +279,6 @@ + # Don't pull in the Windows min/max macros + add_definitions(-DNOMINMAX) + +- if (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) +- # Not needed if a proper cmake generator (-G "...Win64") is passed +- # to cmake. Enable as a second measure to work around bug +- # http://www.cmake.org/Bug/print_bug_page.php?bug_id=11240 +- set(CMAKE_SHARED_LINKER_FLAGS "/machine:x64") +- endif() +- + if(USE_IGN_RECOMMENDED_FLAGS) + + # Gy: Prevent errors caused by multiply-defined symbols diff --git a/ports/ignition-cmake0/usage b/ports/ignition-cmake0/usage new file mode 100644 index 00000000000000..66da98102ec974 --- /dev/null +++ b/ports/ignition-cmake0/usage @@ -0,0 +1,3 @@ +The package ignition-cmake0 provides CMake integration: + + find_package(ignition-cmake0 CONFIG REQUIRED) diff --git a/ports/ignition-cmake0/uuid-do-not-require-pkg-config.patch b/ports/ignition-cmake0/uuid-do-not-require-pkg-config.patch new file mode 100644 index 00000000000000..6953391facae5c --- /dev/null +++ b/ports/ignition-cmake0/uuid-do-not-require-pkg-config.patch @@ -0,0 +1,30 @@ +diff --git a/cmake/FindUUID.cmake b/cmake/FindUUID.cmake +index bf055d4..15be822 100644 +--- a/cmake/FindUUID.cmake ++++ b/cmake/FindUUID.cmake +@@ -18,4 +18,25 @@ + if (UNIX) + include(IgnPkgConfig) + ign_pkg_check_modules(UUID uuid) ++ ++ # If pkg-config is not available in the system, ++ # it is neccessary to manually find uuid ++ if(NOT TARGET UUID::UUID) ++ find_path(UUID_INCLUDE_DIRS NAMES uuid.h PATH_SUFFIXES uuid) ++ mark_as_advanced(UUID_INCLUDE_DIRS) ++ ++ find_library(UUID_LIBRARIES NAMES uuid libuuid) ++ mark_as_advanced(UUID_LIBRARIES) ++ ++ if(NOT UUID_INCLUDE_DIRS OR NOT UUID_LIBRARIES) ++ set(UUID_FOUND false) ++ else() ++ set(UUID_FOUND true) ++ endif() ++ ++ if(UUID_FOUND) ++ include(IgnImportTarget) ++ ign_import_target(UUID) ++ endif() ++ endif() + endif() diff --git a/ports/ignition-cmake0/vcpkg.json b/ports/ignition-cmake0/vcpkg.json new file mode 100644 index 00000000000000..4decf445a61339 --- /dev/null +++ b/ports/ignition-cmake0/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "ignition-cmake0", + "version-string": "0.6.2", + "port-version": 3, + "description": "CMake helper functions for building robotic applications", + "homepage": "https://ignitionrobotics.org/libs/cmake", + "dependencies": [ + "ignition-modularscripts" + ] +} diff --git a/ports/ignition-cmake2/FindGTS.patch b/ports/ignition-cmake2/FindGTS.patch new file mode 100644 index 00000000000000..47bb145e00235b --- /dev/null +++ b/ports/ignition-cmake2/FindGTS.patch @@ -0,0 +1,31 @@ +diff --git a/cmake/FindGTS.cmake b/cmake/FindGTS.cmake +index ad00a9715..a83d8af40 100644 +--- a/cmake/FindGTS.cmake ++++ b/cmake/FindGTS.cmake +@@ -67,6 +67,26 @@ else() + # 2.1 Need glib library + find_library(GLIB_LIBRARY glib-2.0) + list(APPEND GTS_LIBRARIES "${GLIB_LIBRARY}") ++ find_path(GLIB_INCLUDE_DIRS glib.h ++ HINTS ++ ${CMAKE_FIND_ROOT_PATH} ++ PATH ++ ${CMAKE_FIND_ROOT_PATH} ++ PATH_SUFFIXES ++ include ++ include/glib-2.0 ++ DOC "glib header include dir" ++ ) ++ find_path(GLIB_CONFIG_INCLUDE_DIRS glibconfig.h ++ HINTS ++ ${CMAKE_FIND_ROOT_PATH} ++ PATHS ++ ${CMAKE_FIND_ROOT_PATH} ++ PATH_SUFFIXES ++ lib/glib-2.0/include ++ doc "glib header include dir" ++ ) ++ list(APPEND GTS_INCLUDE_DIRS ${GLIB_INCLUDE_DIRS} ${GLIB_CONFIG_INCLUDE_DIRS}) + + if (GTS_FOUND) + # We need to manually specify the pkgconfig entry (and type of entry), diff --git a/ports/ignition-cmake2/portfile.cmake b/ports/ignition-cmake2/portfile.cmake new file mode 100644 index 00000000000000..454a84f1734052 --- /dev/null +++ b/ports/ignition-cmake2/portfile.cmake @@ -0,0 +1,11 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +set(PACKAGE_VERSION "2.5.0") + +ignition_modular_library(NAME cmake + VERSION ${PACKAGE_VERSION} + SHA512 dc546e5e4deabba12faec5fb0162309dfce9b429a6bbd6637c058acdda3eb4fa1e44e9b71f55603d0cff77550117dafc3fc8475621ede65fa8aa915254beb463 + PATCHES FindGTS.patch) + +# Install custom usage +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) diff --git a/ports/ignition-cmake2/usage b/ports/ignition-cmake2/usage new file mode 100644 index 00000000000000..b62ba0c764719b --- /dev/null +++ b/ports/ignition-cmake2/usage @@ -0,0 +1,3 @@ +The package ignition-cmake2 provides CMake integration: + + find_package(ignition-cmake2 CONFIG REQUIRED) diff --git a/ports/ignition-cmake2/vcpkg.json b/ports/ignition-cmake2/vcpkg.json new file mode 100644 index 00000000000000..52c91489255fb7 --- /dev/null +++ b/ports/ignition-cmake2/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "ignition-cmake2", + "version": "2.5.0", + "port-version": 1, + "description": "CMake helper functions for building robotic applications", + "homepage": "https://ignitionrobotics.org/libs/cmake", + "dependencies": [ + "ignition-modularscripts" + ] +} diff --git a/ports/ignition-common1/portfile.cmake b/ports/ignition-common1/portfile.cmake new file mode 100644 index 00000000000000..20567312381bad --- /dev/null +++ b/ports/ignition-common1/portfile.cmake @@ -0,0 +1,6 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME common + VERSION "1.1.1" + REF ignition-common_1.1.1 + SHA512 e96e82dc401281cd31843f4b0ae2c1d23589170869621ea62eb6d6b31b11bd622c14da7046b1993c8fc67a1d39bae9a96b9f8efc8923e305823f963d864975f7) diff --git a/ports/ignition-common1/vcpkg.json b/ports/ignition-common1/vcpkg.json new file mode 100644 index 00000000000000..a7df59922a9abb --- /dev/null +++ b/ports/ignition-common1/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "ignition-common1", + "version-string": "1.1.1", + "port-version": 2, + "description": "Common libraries for robotics applications", + "dependencies": [ + { + "name": "dlfcn-win32", + "platform": "windows | uwp" + }, + { + "name": "ffmpeg", + "platform": "!windows & !uwp" + }, + { + "name": "freeimage", + "platform": "!windows & !uwp" + }, + { + "name": "gts", + "platform": "!windows & !uwp" + }, + "ignition-cmake0", + "ignition-math4", + { + "name": "tinyxml2", + "platform": "!windows & !uwp" + } + ] +} diff --git a/ports/ignition-common3/portfile.cmake b/ports/ignition-common3/portfile.cmake new file mode 100644 index 00000000000000..93059ae239de58 --- /dev/null +++ b/ports/ignition-common3/portfile.cmake @@ -0,0 +1,12 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME common + VERSION "3.9.0" + SHA512 8d052850cbb125e334494c9ad9b234c371fe310327dba997515651f29479d747dffa55b0aa822f2a78e6317a4df2d41389c7a07165cdc08894fdfb116e4d9756) + +# Remove non-relocatable helper scripts (see https://github.com/ignitionrobotics/ign-common/issues/82) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/ign_remotery_vis" "${CURRENT_PACKAGES_DIR}/debug/bin/ign_remotery_vis") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() diff --git a/ports/ignition-common3/vcpkg.json b/ports/ignition-common3/vcpkg.json new file mode 100644 index 00000000000000..ce71be39dac52a --- /dev/null +++ b/ports/ignition-common3/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "ignition-common3", + "version-string": "3.9.0", + "port-version": 1, + "description": "Common libraries for robotics applications", + "homepage": "https://ignitionrobotics.org/libs/common", + "dependencies": [ + { + "name": "dlfcn-win32", + "platform": "windows | uwp" + }, + "ffmpeg", + "freeimage", + "gts", + "ignition-cmake2", + "ignition-math6", + "ignition-modularscripts", + { + "name": "libuuid", + "platform": "!windows & !uwp" + }, + "tinyxml2" + ] +} diff --git a/ports/ignition-fuel-tools1/link-correct-yaml-target.patch b/ports/ignition-fuel-tools1/link-correct-yaml-target.patch new file mode 100644 index 00000000000000..0ceab340670a51 --- /dev/null +++ b/ports/ignition-fuel-tools1/link-correct-yaml-target.patch @@ -0,0 +1,24 @@ +diff -r 29939b8a25be -r 8a0a85e63950 CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,7 +9,7 @@ + # Find ignition-cmake + #============================================================================ + # If you get an error at this line, you need to install ignition-cmake +-find_package(ignition-cmake0 REQUIRED) ++find_package(ignition-cmake0 0.4.1 REQUIRED) + + #============================================================================ + # Configure the project +diff -r 29939b8a25be -r 8a0a85e63950 src/CMakeLists.txt +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -52,7 +52,7 @@ + curl::curl + ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER} + ${JSONCPP_TARGET} +- YAML::YAML ++ ${YAML_TARGET} + ZIP::ZIP + ) + diff --git a/ports/ignition-fuel-tools1/portfile.cmake b/ports/ignition-fuel-tools1/portfile.cmake new file mode 100644 index 00000000000000..c7c310294557cf --- /dev/null +++ b/ports/ignition-fuel-tools1/portfile.cmake @@ -0,0 +1,11 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME fuel-tools + VERSION "1.2.0" + CMAKE_PACKAGE_NAME ignition-fuel_tools1 + SHA512 a656fed74fb2138b3bcf7d35b25ad06da95cfb9a3ad7ded2c9c54db385f55ea310fd1a72dcf6400b0a6199e376c1ba2d11ee2a08c66e3c2cc8b2ee1b25406986 + # Ensure yaml is correctly linked (backport of https://bitbucket.org/ignitionrobotics/ign-fuel-tools/pull-requests/103/use-yaml_target-instead-of-yaml-yaml/diff) + PATCHES link-correct-yaml-target.patch + # This can be removed when the pc file of curl is fixed + DISABLE_PKGCONFIG_INSTALL + ) diff --git a/ports/ignition-fuel-tools1/vcpkg.json b/ports/ignition-fuel-tools1/vcpkg.json new file mode 100644 index 00000000000000..3c4435458b5186 --- /dev/null +++ b/ports/ignition-fuel-tools1/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "ignition-fuel-tools1", + "version-string": "1.2.0", + "port-version": 3, + "description": "Tools for using fuel API to download robot models", + "dependencies": [ + "curl", + "ignition-cmake0", + "ignition-common1", + "jsoncpp", + "libyaml", + "libzip" + ] +} diff --git a/ports/ignition-fuel-tools4/portfile.cmake b/ports/ignition-fuel-tools4/portfile.cmake new file mode 100644 index 00000000000000..3e88cbcc204e81 --- /dev/null +++ b/ports/ignition-fuel-tools4/portfile.cmake @@ -0,0 +1,7 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME fuel-tools + VERSION "4.3.0" + CMAKE_PACKAGE_NAME ignition-fuel_tools4 + SHA512 451d7bcd195a8ce41c3a7d64ad936c8c0812cbc7af03dbe75cbdc359599bf1f828595833c1758d4de8e37c37730bb852de95b2256ff9134af4ab197df2b66a8b + ) diff --git a/ports/ignition-fuel-tools4/vcpkg.json b/ports/ignition-fuel-tools4/vcpkg.json new file mode 100644 index 00000000000000..093056ffbcdece --- /dev/null +++ b/ports/ignition-fuel-tools4/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "ignition-fuel-tools4", + "version-string": "4.3.0", + "port-version": 1, + "description": "Tools for using fuel API to download robot models", + "homepage": "https://ignitionrobotics.org/libs/fuel_tools", + "dependencies": [ + "curl", + "ignition-cmake2", + "ignition-common3", + "ignition-modularscripts", + "ignition-msgs5", + "jsoncpp", + "libyaml", + "libzip", + "tinyxml2" + ] +} diff --git a/ports/ignition-math4/portfile.cmake b/ports/ignition-math4/portfile.cmake new file mode 100644 index 00000000000000..8d5148477ca3eb --- /dev/null +++ b/ports/ignition-math4/portfile.cmake @@ -0,0 +1,5 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME math + VERSION "4.0.0" + SHA512 5996af60666a1166fc19b2db9715f7214341becb8eb6071c09315e1f71e759c6de4da99b44312829fc7b2bdef7e0f3671e4d2a92e0d2dd5d5fd782a6c46b012a) diff --git a/ports/ignition-math4/vcpkg.json b/ports/ignition-math4/vcpkg.json new file mode 100644 index 00000000000000..bcdab1843b2a7a --- /dev/null +++ b/ports/ignition-math4/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "ignition-math4", + "version-string": "4.0.0", + "port-version": 2, + "description": "Math API for robotic applications", + "homepage": "https://ignitionrobotics.org/libs/math", + "dependencies": [ + "ignition-cmake0" + ] +} diff --git a/ports/ignition-math6/portfile.cmake b/ports/ignition-math6/portfile.cmake new file mode 100644 index 00000000000000..138d39acbbe4c1 --- /dev/null +++ b/ports/ignition-math6/portfile.cmake @@ -0,0 +1,5 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME math + VERSION "6.6.0" + SHA512 1b5f59b45256daa81cbfb7da4727200d0d6cb4a75fbc3b83b512c18ec6307b5bd78b8ee7a84f0f8a8c334717a1480766f62658bd213e9021c09c0ed22caa921d) diff --git a/ports/ignition-math6/vcpkg.json b/ports/ignition-math6/vcpkg.json new file mode 100644 index 00000000000000..bf5c3cfbb06065 --- /dev/null +++ b/ports/ignition-math6/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "ignition-math6", + "version-string": "6.6.0", + "port-version": 1, + "description": "Math API for robotic applications", + "homepage": "https://ignitionrobotics.org/libs/math", + "dependencies": [ + "eigen3", + "ignition-cmake2", + "ignition-modularscripts" + ] +} diff --git a/ports/ignition-modularscripts/ignition_modular_library.cmake b/ports/ignition-modularscripts/ignition_modular_library.cmake new file mode 100644 index 00000000000000..9492531e87e826 --- /dev/null +++ b/ports/ignition-modularscripts/ignition_modular_library.cmake @@ -0,0 +1,148 @@ + +function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PACKAGE_NAME DEFAULT_CMAKE_PACKAGE_NAME IML_DISABLE_PKGCONFIG_INSTALL) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS -DBUILD_TESTING=OFF + ) + + vcpkg_install_cmake(ADD_BIN_TO_PATH) + + # If necessary, move the CMake config files + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake") + # Some ignition libraries install library subcomponents, that are effectively additional cmake packages + # with name ${CMAKE_PACKAGE_NAME}-${COMPONENT_NAME}, so it is needed to call vcpkg_fixup_cmake_targets for them as well + file(GLOB COMPONENTS_CMAKE_PACKAGE_NAMES + LIST_DIRECTORIES TRUE + RELATIVE "${CURRENT_PACKAGES_DIR}/lib/cmake/" + "${CURRENT_PACKAGES_DIR}/lib/cmake/*") + + foreach(COMPONENT_CMAKE_PACKAGE_NAME IN LISTS COMPONENTS_CMAKE_PACKAGE_NAMES) + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${COMPONENT_CMAKE_PACKAGE_NAME}" + TARGET_PATH "share/${COMPONENT_CMAKE_PACKAGE_NAME}" + DO_NOT_DELETE_PARENT_CONFIG_PATH) + endforeach() + + file(GLOB_RECURSE CMAKE_RELEASE_FILES + "${CURRENT_PACKAGES_DIR}/lib/cmake/${CMAKE_PACKAGE_NAME}/*") + + file(COPY ${CMAKE_RELEASE_FILES} DESTINATION + "${CURRENT_PACKAGES_DIR}/share/${CMAKE_PACKAGE_NAME}/") + endif() + + # Remove unused files files + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/share) + + # Make pkg-config files relocatable + if(NOT IML_DISABLE_PKGCONFIG_INSTALL) + if(VCPKG_TARGET_IS_LINUX) + set(SYSTEM_LIBRARIES SYSTEM_LIBRARIES pthread) + endif() + vcpkg_fixup_pkgconfig(${SYSTEM_LIBRARIES}) + else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + endif() + + # Find the relevant license file and install it + if(EXISTS "${SOURCE_PATH}/LICENSE") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE") + elseif(EXISTS "${SOURCE_PATH}/README.md") + set(LICENSE_PATH "${SOURCE_PATH}/README.md") + endif() + file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() + +## # ignition_modular_library +## +## Download and build a library from the Ignition Robotics project ( https://ignitionrobotics.org/ ). +## +## ## Usage: +## ```cmake +## ignition_modular_library(NAME +## VERSION +## SHA512 +## [REF ] +## [HEAD_REF ] +## [PATCHES ] +## [CMAKE_PACKAGE_NAME ] +## [DISABLE_PKGCONFIG_INSTALL]) +## ``` +## +## ## Parameters: +## ### NAME +## The name of the specific ignition library, i.e. `cmake` for `ignition-cmake0`, `math` for `ignition-math4`. +## +## ### VERSION +## The complete version number. +## +## ### SHA512 +## The SHA512 hash that should match the downloaded archive. This is forwarded to the `vcpkg_from_github` command. +## +## ### REF +## Reference to the tag of the desired release. This is forwarded to the `vcpkg_from_github` command. +## If not specified, defaults to `ignition-${NAME}${MAJOR_VERSION}_${VERSION}`. +## +## ### HEAD_REF +## Reference (tag) to the desired release. This is forwarded to the `vcpkg_from_github` command. +## If not specified, defaults to `ign-${NAME}${MAJOR_VERSION}`. +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## This is forwarded to the `vcpkg_from_github` command. +## +## ### CMAKE_PACKAGE_NAME +## The name of the CMake package for the port. +## If not specified, defaults to `ignition-${NAME}${MAJOR_VERSION}`. +## +## ### DISABLE_PKGCONFIG_INSTALL +## If present, disable installation of .pc pkg-config configuration files. +## +## +## ## Examples: +## +## * [ignition-cmake0](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-cmake0/portfile.cmake) +## * [ignition-math4](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-math4/portfile.cmake) +## * [ignition-fuel-tools1](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-fuel-tools1/portfile.cmake) +function(ignition_modular_library) + set(options DISABLE_PKGCONFIG_INSTALL) + set(oneValueArgs NAME VERSION SHA512 REF HEAD_REF CMAKE_PACKAGE_NAME) + set(multiValueArgs PATCHES) + cmake_parse_arguments(IML "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + string(REPLACE "." ";" IML_VERSION_LIST ${IML_VERSION}) + list(GET IML_VERSION_LIST 0 IML_MAJOR_VERSION) + + # If the REF option is omitted, use the canonical one + if(NOT DEFINED IML_REF) + set(IML_REF "ignition-${IML_NAME}${IML_MAJOR_VERSION}_${IML_VERSION}") + endif() + + # If the HEAD_REF option is omitted, use the canonical one + if(NOT DEFINED IML_HEAD_REF) + set(IML_HEAD_REF "ign-${IML_NAME}${IML_MAJOR_VERSION}") + endif() + + # If the CMAKE_PACKAGE_NAME option is omitted, use the canonical one + set(DEFAULT_CMAKE_PACKAGE_NAME "ignition-${IML_NAME}${IML_MAJOR_VERSION}") + if(NOT DEFINED IML_CMAKE_PACKAGE_NAME) + set(IML_CMAKE_PACKAGE_NAME ${DEFAULT_CMAKE_PACKAGE_NAME}) + endif() + + # Download library from github, to support also the --head option + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ignitionrobotics/ign-${IML_NAME} + REF ${IML_REF} + SHA512 ${IML_SHA512} + HEAD_REF ${IML_HEAD_REF} + PATCHES ${IML_PATCHES} + ) + + # Build library + ignition_modular_build_library(${IML_NAME} ${IML_MAJOR_VERSION} ${SOURCE_PATH} ${IML_CMAKE_PACKAGE_NAME} ${DEFAULT_CMAKE_PACKAGE_NAME} ${IML_DISABLE_PKGCONFIG_INSTALL}) +endfunction() diff --git a/ports/ignition-modularscripts/portfile.cmake b/ports/ignition-modularscripts/portfile.cmake new file mode 100644 index 00000000000000..509240d7dde999 --- /dev/null +++ b/ports/ignition-modularscripts/portfile.cmake @@ -0,0 +1,8 @@ +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/ignition_modular_library.cmake + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/ignitionmodularscripts +) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/ignitionmodularscripts/copyright "") + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/ignition-modularscripts/vcpkg.json b/ports/ignition-modularscripts/vcpkg.json new file mode 100644 index 00000000000000..d6c0c638bb10c9 --- /dev/null +++ b/ports/ignition-modularscripts/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "ignition-modularscripts", + "version-string": "2020-11-23", + "port-version": 1, + "description": "Vcpkg helpers to package ignition libraries" +} diff --git a/ports/ignition-msgs1/fix-protobuf-static-link-order.patch b/ports/ignition-msgs1/fix-protobuf-static-link-order.patch new file mode 100644 index 00000000000000..9f3e674663640a --- /dev/null +++ b/ports/ignition-msgs1/fix-protobuf-static-link-order.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -2,8 +2,8 @@ + # Build a custom protoc plugin + ign_add_executable(ign_msgs_gen Generator.cc generator_main.cc) + target_link_libraries(ign_msgs_gen +- protobuf::libprotobuf +- protobuf::libprotoc) ++ protobuf::libprotoc ++ protobuf::libprotobuf) + target_include_directories(ign_msgs_gen PRIVATE ${PROTOBUF_INCLUDE_DIR}) + target_compile_features(ign_msgs_gen PRIVATE ${IGN_CXX_11_FEATURES}) + diff --git a/ports/ignition-msgs1/portfile.cmake b/ports/ignition-msgs1/portfile.cmake new file mode 100644 index 00000000000000..0b2215f4942819 --- /dev/null +++ b/ports/ignition-msgs1/portfile.cmake @@ -0,0 +1,23 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +# Explicitly disable cross-compilation until the upstream discussion +# https://bitbucket.org/ignitionrobotics/ign-msgs/issues/34/add-support-for-cross-compilation is solved +if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(ignition_msgs_CROSSCOMPILING ON) +elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME) + set(ignition_msgs_CROSSCOMPILING ON) +else() + set(ignition_msgs_CROSSCOMPILING OFF) +endif() + +if(ignition_msgs_CROSSCOMPILING) + message(FATAL_ERROR "This port does not currently support triplets that require cross-compilation.") +endif() + +ignition_modular_library(NAME msgs + VERSION "1.0.0" + # See https://bitbucket.org/ignitionrobotics/ign-msgs/issues/33/the-ignition-msgs1_100-tag-does-not-match + REF ignition-msgs_1.0.0 + SHA512 3a270f0ac988b947091d4626be48fe8cfed5ddfde5a37b9d0f08fddcbf278099ab231fca11e2dd2296ca54e0350ea14e3f685dc238f0827f18f10ab7b75039de + # Fix linking order of protobuf libraries (backport of https://bitbucket.org/ignitionrobotics/ign-msgs/pull-requests/151) + PATCHES fix-protobuf-static-link-order.patch) diff --git a/ports/ignition-msgs1/vcpkg.json b/ports/ignition-msgs1/vcpkg.json new file mode 100644 index 00000000000000..f81434b7afec2b --- /dev/null +++ b/ports/ignition-msgs1/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "ignition-msgs1", + "version-string": "1.0.0", + "port-version": 4, + "description": "Middleware protobuf messages for robotics", + "dependencies": [ + "ignition-cmake0", + "ignition-math4", + "protobuf" + ] +} diff --git a/ports/ignition-msgs5/01-protobuf.patch b/ports/ignition-msgs5/01-protobuf.patch new file mode 100644 index 00000000000000..71ea936b17fe63 --- /dev/null +++ b/ports/ignition-msgs5/01-protobuf.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index f68bf3d..d4d1372 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -135,6 +135,8 @@ if(MSVC) + # warning is not important since those members do not need to be interfaced + # with. + set_source_files_properties(${gen_sources} COMPILE_FLAGS "/wd4251 /wd4146") ++ # Fix for protobuf 3.12 - allow big object files ++ add_definitions(/bigobj) + endif() + + set_source_files_properties(${gen_headers} ${gen_sources} ${gen_ruby_scripts} diff --git a/ports/ignition-msgs5/portfile.cmake b/ports/ignition-msgs5/portfile.cmake new file mode 100644 index 00000000000000..ea54585901ff93 --- /dev/null +++ b/ports/ignition-msgs5/portfile.cmake @@ -0,0 +1,12 @@ +# Explicitly disable cross-compilation until the upstream discussion +# https://github.com/ignitionrobotics/ign-msgs/issues/34 is solved +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME msgs + VERSION "5.3.0" + SHA512 55c167d00b60ae6da0144a9495e9ac8aed61fcbdc61e057e75d31261e335c573543d60e28a7dc195a7c9849c5c6eb0e088d4f4e79fd927e83470a3f1fabef60e + PATCHES + "01-protobuf.patch") + diff --git a/ports/ignition-msgs5/vcpkg.json b/ports/ignition-msgs5/vcpkg.json new file mode 100644 index 00000000000000..24c072d73ed969 --- /dev/null +++ b/ports/ignition-msgs5/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "ignition-msgs5", + "version-string": "5.3.0", + "port-version": 3, + "description": "Middleware protobuf messages for robotics", + "supports": "!(arm | uwp)", + "dependencies": [ + "ignition-cmake2", + "ignition-math6", + "ignition-modularscripts", + "protobuf", + "tinyxml2" + ] +} diff --git a/ports/ignition-msgs6/portfile.cmake b/ports/ignition-msgs6/portfile.cmake new file mode 100644 index 00000000000000..f79c5aabd22f88 --- /dev/null +++ b/ports/ignition-msgs6/portfile.cmake @@ -0,0 +1,10 @@ +# Explicitly disable cross-compilation until the upstream discussion +# https://github.com/ignitionrobotics/ign-msgs/issues/34 is solved +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME msgs + VERSION "6.0.0" + SHA512 d1d6f6602ae33ec95b36c5df7815b06970f349492ef0309d8aacbaf2dca0c3e7314bbd64890a2554485fbd52f148a90b7bf54dceb0b3a1dd40eeb1f5bdb9613c) + diff --git a/ports/ignition-msgs6/vcpkg.json b/ports/ignition-msgs6/vcpkg.json new file mode 100644 index 00000000000000..995f166e11f43a --- /dev/null +++ b/ports/ignition-msgs6/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "ignition-msgs6", + "version-string": "6.0.0", + "port-version": 2, + "description": "Middleware protobuf messages for robotics", + "supports": "!(arm | uwp)", + "dependencies": [ + "ignition-cmake2", + "ignition-math6", + "ignition-modularscripts", + "protobuf", + "tinyxml2" + ] +} diff --git a/ports/ignition-plugin1/portfile.cmake b/ports/ignition-plugin1/portfile.cmake new file mode 100644 index 00000000000000..daa626047409d1 --- /dev/null +++ b/ports/ignition-plugin1/portfile.cmake @@ -0,0 +1,7 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +set(PACKAGE_VERSION "1.1.0") +ignition_modular_library(NAME plugin + VERSION ${PACKAGE_VERSION} + REF "ignition-plugin_${PACKAGE_VERSION}" + SHA512 0657c5816e67d02329a79364050b8a56957180e5b7481b01696c7369b063cbfedfc93793a8ad92d87d242d24e476283dc7847bd810a3de98d3ec5ae7d640568c) diff --git a/ports/ignition-plugin1/vcpkg.json b/ports/ignition-plugin1/vcpkg.json new file mode 100644 index 00000000000000..58e42c8c1ef392 --- /dev/null +++ b/ports/ignition-plugin1/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "ignition-plugin1", + "version-string": "1.1.0", + "port-version": 1, + "description": "Library for registering plugin libraries and dynamically loading them at runtime", + "homepage": "https://ignitionrobotics.org/libs/plugin", + "dependencies": [ + { + "name": "dlfcn-win32", + "platform": "windows | uwp" + }, + "ignition-cmake2", + "ignition-modularscripts" + ] +} diff --git a/ports/ignition-transport4/portfile.cmake b/ports/ignition-transport4/portfile.cmake new file mode 100644 index 00000000000000..cdab5c0a6b768d --- /dev/null +++ b/ports/ignition-transport4/portfile.cmake @@ -0,0 +1,7 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME transport + VERSION "4.0.0" + SHA512 d4125044c21fdd6754f3b8b06f372df3f858080d5d33e97ed7a8ef8f6fb9857d562082aad41c89ea9146a33b1c3814305d33c5c8f8bcde66a16477b4a01655b4 + # This can be removed when the pc file of libuuid on Windows is fixed + DISABLE_PKGCONFIG_INSTALL) diff --git a/ports/ignition-transport4/vcpkg.json b/ports/ignition-transport4/vcpkg.json new file mode 100644 index 00000000000000..4b315b85ebfe43 --- /dev/null +++ b/ports/ignition-transport4/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "ignition-transport4", + "version-string": "4.0.0", + "port-version": 3, + "description": "Transport middleware for robotics", + "dependencies": [ + "cppzmq", + "ignition-cmake0", + "ignition-modularscripts", + "ignition-msgs1", + { + "name": "libuuid", + "platform": "!windows & !uwp" + }, + "protobuf", + "zeromq" + ] +} diff --git a/ports/ignition-transport8/portfile.cmake b/ports/ignition-transport8/portfile.cmake new file mode 100644 index 00000000000000..1155a1ab52a559 --- /dev/null +++ b/ports/ignition-transport8/portfile.cmake @@ -0,0 +1,7 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME transport + VERSION "8.1.0" + SHA512 eb64f18721190fcb79a5b45746fd44fa24274c6fe6c5021dd9306c15a327873377d07d4aa770633982038b84da650d3d0c8a56169222c0c88fa1318314fc4529 + # This can be removed when the pc file of sqlite3 is available ( https://github.com/microsoft/vcpkg/issues/14327 ) + DISABLE_PKGCONFIG_INSTALL) diff --git a/ports/ignition-transport8/vcpkg.json b/ports/ignition-transport8/vcpkg.json new file mode 100644 index 00000000000000..6d9f810c006263 --- /dev/null +++ b/ports/ignition-transport8/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "ignition-transport8", + "version-string": "8.1.0", + "port-version": 1, + "description": "Transport middleware for robotics", + "dependencies": [ + "cppzmq", + "ignition-cmake2", + "ignition-msgs5", + { + "name": "libuuid", + "platform": "!windows & !uwp" + }, + "protobuf", + "sqlite3", + "zeromq" + ] +} diff --git a/ports/ignition-transport9/portfile.cmake b/ports/ignition-transport9/portfile.cmake new file mode 100644 index 00000000000000..cd224b3f72cffc --- /dev/null +++ b/ports/ignition-transport9/portfile.cmake @@ -0,0 +1,7 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME transport + VERSION "9.0.0" + SHA512 c3edb7a8a063b4aa5826838ae08c8ec2b3d14563492022df632a719409c95272f4f6a43d91f0c317e44b85921b5aedc1685670b81a7baa949f01af3b3534d76e + # This can be removed when the pc file of sqlite3 is available ( https://github.com/microsoft/vcpkg/issues/14327 ) + DISABLE_PKGCONFIG_INSTALL) diff --git a/ports/ignition-transport9/vcpkg.json b/ports/ignition-transport9/vcpkg.json new file mode 100644 index 00000000000000..9e9147c0d68982 --- /dev/null +++ b/ports/ignition-transport9/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "ignition-transport9", + "version-string": "9.0.0", + "port-version": 1, + "description": "Transport middleware for robotics", + "dependencies": [ + "cppzmq", + "ignition-cmake2", + "ignition-msgs6", + { + "name": "libuuid", + "platform": "!windows & !uwp" + }, + "protobuf", + "sqlite3", + "zeromq" + ] +} diff --git a/ports/igraph/arith_osx.h b/ports/igraph/arith_osx.h new file mode 100644 index 00000000000000..2baafd68a4e316 --- /dev/null +++ b/ports/igraph/arith_osx.h @@ -0,0 +1,12 @@ +/* Suitable for macOS on x86_64 and arm64 */ +/* Not suitable for 32-bit macOS */ + +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#define Long int +#define Intcast (int)(long) +#define Double_Align +#define X64_bit_pointers +#define NANCHECK +#define QNaN0 0x0 +#define QNaN1 0x7ff80000 diff --git a/ports/igraph/arith_win32.h b/ports/igraph/arith_win32.h new file mode 100644 index 00000000000000..ecb90c8dc71ad5 --- /dev/null +++ b/ports/igraph/arith_win32.h @@ -0,0 +1,8 @@ +/* Windows 32-bit */ + +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#define Double_Align +#define NANCHECK +#define QNaN0 0x0 +#define QNaN1 0x7ff80000 diff --git a/ports/igraph/arith_win64.h b/ports/igraph/arith_win64.h new file mode 100644 index 00000000000000..e619583b72a6f8 --- /dev/null +++ b/ports/igraph/arith_win64.h @@ -0,0 +1,9 @@ +/* Windows 64-bit */ + +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#define Double_Align +#define X64_bit_pointers +#define NANCHECK +#define QNaN0 0x0 +#define QNaN1 0x7ff80000 diff --git a/ports/igraph/portfile.cmake b/ports/igraph/portfile.cmake new file mode 100644 index 00000000000000..edd1dd242d7e32 --- /dev/null +++ b/ports/igraph/portfile.cmake @@ -0,0 +1,63 @@ + +# We use the release tarball from GitHub instead of the sources in the repo because: +# - igraph will not compile from the git sources unless there is an actual git repository to back it. This is because it detects the version from git tags. The release tarball has the version hard-coded. +# - The release tarball contains pre-generated parser sources, which eliminates the dependency on bison/flex. + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/igraph/igraph/releases/download/0.9.4/igraph-0.9.4.tar.gz" + FILENAME "igraph-0.9.4.tar.gz" + SHA512 1188d69b95f581d7dac5874dcdb2d1b1a322e39b275c6f092c199ed6214def814062bd46d573bdaa4bc8f4514d6840c6e93dedbe0f6c99a15de33cbc39356573 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + graphml IGRAPH_GRAPHML_SUPPORT + openmp IGRAPH_OPENMP_SUPPORT +) + +# Allow cross-compilation. See https://igraph.org/c/doc/igraph-Installation.html#idm207877354096 +set(ARITH_H "") +if (VCPKG_TARGET_IS_OSX) + set(ARITH_H ${CURRENT_PORT_DIR}/arith_osx.h) +elseif (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(ARITH_H ${CURRENT_PORT_DIR}/arith_win32.h) + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(ARITH_H ${CURRENT_PORT_DIR}/arith_win64.h) + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DIGRAPH_ENABLE_LTO=AUTO + # ARPACK not yet available in vcpkg. + -DIGRAPH_USE_INTERNAL_ARPACK=ON + # OpenBLAS provides BLAS/LAPACK but some tests fail with OpenBLAS on Windows. + # See https://github.com/igraph/igraph/issues/1491 + -DIGRAPH_USE_INTERNAL_BLAS=ON + -DIGRAPH_USE_INTERNAL_LAPACK=ON + -DIGRAPH_USE_INTERNAL_CXSPARSE=OFF + # GLPK is not yet available in vcpkg. + -DIGRAPH_USE_INTERNAL_GLPK=ON + # Currently, external GMP provides no performance of functionality benefits. + -DIGRAPH_USE_INTERNAL_GMP=ON + -DF2C_EXTERNAL_ARITH_HEADER=${ARITH_H} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/igraph) + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/igraph/vcpkg.json b/ports/igraph/vcpkg.json new file mode 100644 index 00000000000000..e7158bff7ab08a --- /dev/null +++ b/ports/igraph/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "igraph", + "version": "0.9.4", + "description": "igraph is a C library for network analysis and graph theory, with an emphasis on efficiency portability and ease of use.", + "homepage": "https://igraph.org/", + "dependencies": [ + "suitesparse" + ], + "default-features": [ + "graphml" + ], + "features": { + "graphml": { + "description": "Support for reading GraphML files", + "dependencies": [ + "libxml2" + ] + }, + "openmp": { + "description": "Use OpenMP parallelization in some functions" + } + } +} diff --git a/ports/iir1/portfile.cmake b/ports/iir1/portfile.cmake new file mode 100644 index 00000000000000..3babc1b2e395d2 --- /dev/null +++ b/ports/iir1/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO berndporr/iir1 + REF 67591c8eac591c576b9aabe9a2f288296bb263f0 #1.8.0 + SHA512 7bea56bd3a5251656834f43ea55e1a8bff48ed2b5576ea9d7bc058e371457b7a3e8fe26111ec9457d4aa9e397f3267d330c5353aea00810a5cc4d9bec2bdcc72 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/iir1/vcpkg.json b/ports/iir1/vcpkg.json new file mode 100644 index 00000000000000..3b79f3d6f3c5f1 --- /dev/null +++ b/ports/iir1/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "iir1", + "version": "1.8.0", + "port-version": 1, + "description": "Realtime C++ filter library", + "homepage": "https://github.com/berndporr/iir1", + "license": "MIT", + "supports": "!uwp" +} diff --git a/ports/ijg-libjpeg/CMakeLists.txt b/ports/ijg-libjpeg/CMakeLists.txt new file mode 100644 index 00000000000000..e1a9dcf5cac521 --- /dev/null +++ b/ports/ijg-libjpeg/CMakeLists.txt @@ -0,0 +1,63 @@ +cmake_minimum_required(VERSION 3.13) +project(libjpeg LANGUAGES C) + +option(BUILD_EXECUTABLES OFF) + +# +# jconfig.h is a public header, so it must be genrated. Please reference the install.txt in jpegsr9d.zip +# +# jconfig.txt should contain #cmakedefine which is modified by porfile.cmake of ijg-libjpeg port in VcPkg +# By doing this we can skip 'configure' step. Visit https://github.com/LuaDist/libjpeg +# +include(CheckIncludeFile) +check_include_file(stddef.h HAVE_STDDEF_H) +check_include_file(stdlib.h HAVE_STDLIB_H) +configure_file(jconfig.txt ${CMAKE_CURRENT_SOURCE_DIR}/jconfig.h) + +list(APPEND PUBLIC_HEADERS jpeglib.h jerror.h jmorecfg.h jconfig.h) + +add_library(jpeg + ${PUBLIC_HEADERS} jinclude.h jpegint.h jversion.h + transupp.h jidctflt.c jidctfst.c jidctint.c jquant1.c jquant2.c jutils.c jmemnobs.c jaricom.c jerror.c jdatadst.c jdatasrc.c + jmemsys.h + jmemmgr.c + cdjpeg.h cderror.h + jcmaster.c jcmarker.c jcmainct.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcsample.c jctrans.c jcinit.c jcomapi.c jcparam.c jcprepct.c + jdmaster.c jdmarker.c jdmainct.c jdapimin.c jdapistd.c jdarith.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdsample.c jdtrans.c jdinput.c jdmerge.c jdpostct.c + jdct.h + jfdctflt.c jfdctfst.c jfdctint.c +) + +if(WIN32) + target_compile_definitions(jpeg + PRIVATE + _CRT_SECURE_NO_WARNINGS + ) +endif() + +install(FILES ${PUBLIC_HEADERS} + DESTINATION ${CMAKE_INSTALL_PREFIX}/include +) +install(TARGETS jpeg + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) + +if(BUILD_EXECUTABLES) + add_executable(cjpeg cdjpeg.c cjpeg.c rdbmp.c rdgif.c rdppm.c rdrle.c rdtarga.c rdswitch.c) + target_link_libraries(cjpeg PRIVATE jpeg) + + add_executable(djpeg cdjpeg.c djpeg.c wrbmp.c wrgif.c wrppm.c wrrle.c wrtarga.c rdcolmap.c) + target_link_libraries(djpeg PRIVATE jpeg) + + add_executable(jpegtran jpegtran.c cdjpeg.c rdswitch.c transupp.c) + target_link_libraries(jpegtran PRIVATE jpeg) + + add_executable(rdjpgcom rdjpgcom.c) + add_executable(wrjpgcom wrjpgcom.c) + + install(TARGETS cjpeg djpeg jpegtran rdjpgcom wrjpgcom + DESTINATION ${CMAKE_INSTALL_PREFIX}/tools + ) +endif() diff --git a/ports/ijg-libjpeg/portfile.cmake b/ports/ijg-libjpeg/portfile.cmake new file mode 100644 index 00000000000000..5c0055440e4aff --- /dev/null +++ b/ports/ijg-libjpeg/portfile.cmake @@ -0,0 +1,51 @@ +if(EXISTS ${CURRENT_INSTALLED_DIR}/share/libturbo-jpeg/copyright) + message(FATAL_ERROR "'${PORT}' conflicts with 'libturbo-jpeg'. Please remove libturbo-jpeg:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() +if(EXISTS ${CURRENT_INSTALLED_DIR}/share/mozjpeg/copyright) + message(FATAL_ERROR "'${PORT}' conflicts with 'mozjpeg'. Please remove mozjpeg:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.ijg.org/files/jpegsr9d.zip" + FILENAME "jpegsr9d.zip" + SHA512 441a783c945fd549693dbe3932d8d35e1ea00d8464870646760ed84a636facb4d7afe0ca3ab988e7281a71e41c2e96be618b8c6a898f116517e639720bba82a3 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +# Replace some #define in jconfig.txt to #cmakedefine so the CMakeLists.txt can run `configure_file` command. +# See https://github.com/LuaDist/libjpeg +vcpkg_replace_string(${SOURCE_PATH}/jconfig.txt + "#define HAVE_STDDEF_H" + "#cmakedefine HAVE_STDDEF_H" +) +vcpkg_replace_string(${SOURCE_PATH}/jconfig.txt + "#define HAVE_STDLIB_H" + "#cmakedefine HAVE_STDLIB_H" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXECUTABLES=OFF # supports [tools] feature to enable this option? +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# There is no LICENSE file, but README containes some legal text. +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/ijg-libjpeg/vcpkg.json b/ports/ijg-libjpeg/vcpkg.json new file mode 100644 index 00000000000000..cf39b27f2359fd --- /dev/null +++ b/ports/ijg-libjpeg/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ijg-libjpeg", + "version-string": "9d", + "description": "Independent JPEG Group's JPEG software", + "homepage": "http://www.ijg.org/", + "supports": "!emscripten & !wasm32" +} diff --git a/ports/ilmbase/CONTROL b/ports/ilmbase/CONTROL deleted file mode 100644 index 51ea5dffc2bd27..00000000000000 --- a/ports/ilmbase/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ilmbase -Version: 2.3.0 -Build-Depends: openexr -Description: empty package, linking to newer one diff --git a/ports/ilmbase/vcpkg.json b/ports/ilmbase/vcpkg.json new file mode 100644 index 00000000000000..9b09a3c7b6d375 --- /dev/null +++ b/ports/ilmbase/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "ilmbase", + "version-string": "2.3.0", + "port-version": 1, + "description": "empty package, linking to newer one", + "dependencies": [ + "openexr" + ] +} diff --git a/ports/imgui-sfml/0001-fix_find_package.patch b/ports/imgui-sfml/0001-fix_find_package.patch new file mode 100644 index 00000000000000..d5dc24456c282a --- /dev/null +++ b/ports/imgui-sfml/0001-fix_find_package.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 53500fd..cb98701 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,34 +35,14 @@ if (IMGUI_SFML_FIND_SFML) + if (NOT BUILD_SHARED_LIBS) + set(SFML_STATIC_LIBRARIES ON) + endif() +- find_package(SFML 2.5 COMPONENTS graphics system window) ++ find_package(SFML COMPONENTS graphics system window) + + if(NOT SFML_FOUND) + message(FATAL_ERROR "SFML 2 directory not found. Set SFML_DIR to directory where SFML was built (or one which ccontains SFMLConfig.cmake)") + endif() + endif() + +-# ImGui does not provide native support for CMakeLists, workaround for now to have +-# users specify IMGUI_DIR. Waiting for this PR to get merged... +-# https://github.com/ocornut/imgui/pull/1713 +-if(NOT IMGUI_DIR) +- set(IMGUI_DIR "" CACHE PATH "imgui top-level directory") +- message(FATAL_ERROR "ImGui directory not found. Set IMGUI_DIR to imgui's top-level path (containing 'imgui.h' and other files).\n") +-endif() +- +-# This uses FindImGui.cmake provided in ImGui-SFML repo for now +-find_package(ImGui 1.68 REQUIRED) +- +-# these headers will be installed alongside ImGui-SFML +-set(IMGUI_PUBLIC_HEADERS +- ${IMGUI_INCLUDE_DIR}/imconfig.h +- ${IMGUI_INCLUDE_DIR}/imgui.h +- ${IMGUI_INCLUDE_DIR}/imgui_internal.h # not actually public, but users might need it +- ${IMGUI_INCLUDE_DIR}/imstb_rectpack.h +- ${IMGUI_INCLUDE_DIR}/imstb_textedit.h +- ${IMGUI_INCLUDE_DIR}/imstb_truetype.h +- ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_stdlib.h +-) ++find_package(imgui CONFIG REQUIRED) + + # CMake 3.11 and later prefer to choose GLVND, but we choose legacy OpenGL just because it's safer + # (unless the OpenGL_GL_PREFERENCE was explicitly set) +@@ -82,7 +62,7 @@ add_library(ImGui-SFML + add_library(ImGui-SFML::ImGui-SFML ALIAS ImGui-SFML) + + target_link_libraries(ImGui-SFML +- PUBLIC ++ imgui::imgui + sfml-graphics + sfml-system + sfml-window diff --git a/ports/imgui-sfml/0002-fix_imgui_config.patch b/ports/imgui-sfml/0002-fix_imgui_config.patch new file mode 100644 index 00000000000000..6966b63c7322c1 --- /dev/null +++ b/ports/imgui-sfml/0002-fix_imgui_config.patch @@ -0,0 +1,11 @@ +diff --git a/imconfig-SFML.h b/imconfig-SFML.h +index f66ba20..0f43ce6 100644 +--- a/imconfig-SFML.h ++++ b/imconfig-SFML.h +@@ -28,5 +28,3 @@ + static_cast(z * 255.f), \ + static_cast(w * 255.f)); \ + } +- +-#define ImTextureID unsigned int +\ No newline at end of file diff --git a/ports/imgui-sfml/0003-fix_osx.patch b/ports/imgui-sfml/0003-fix_osx.patch new file mode 100644 index 00000000000000..8181ee8e1f2cdc --- /dev/null +++ b/ports/imgui-sfml/0003-fix_osx.patch @@ -0,0 +1,13 @@ +diff --git a/imconfig-SFML.h b/imconfig-SFML.h +index 0f43ce6..1fce2c1 100644 +--- a/imconfig-SFML.h ++++ b/imconfig-SFML.h +@@ -19,7 +19,7 @@ + + #define IM_VEC4_CLASS_EXTRA \ + ImVec4(const sf::Color & c) \ +- : ImVec4(c.r / 255.f, c.g / 255.f, c.b / 255.f, c.a / 255.f) { \ ++ : x(c.r / 255.f), y(c.g / 255.f), z(c.b / 255.f), w(c.a / 255.f) { \ + } \ + operator sf::Color() const { \ + return sf::Color( \ diff --git a/ports/imgui-sfml/004-fix-find-sfml.patch b/ports/imgui-sfml/004-fix-find-sfml.patch new file mode 100644 index 00000000000000..51cc0634b50c41 --- /dev/null +++ b/ports/imgui-sfml/004-fix-find-sfml.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4d7a3fa..614564f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,9 +32,6 @@ set(IMGUI_SFML_CONFIG_INSTALL_DIR "" CACHE PATH "Path where user's config header + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") + + if (IMGUI_SFML_FIND_SFML) +- if (NOT BUILD_SHARED_LIBS) +- set(SFML_STATIC_LIBRARIES ON) +- endif() + find_package(SFML COMPONENTS graphics system window) + + if(NOT SFML_FOUND) diff --git a/ports/imgui-sfml/portfile.cmake b/ports/imgui-sfml/portfile.cmake new file mode 100644 index 00000000000000..aedb31ced7abfe --- /dev/null +++ b/ports/imgui-sfml/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eliasdaler/imgui-sfml + REF v2.1 + SHA512 134c49e9c57bc4d3882d99a52ec87f74c11d2f3134501c79b20bce4612f315f2e3f33a521597b387ca8f91942cf2b82ec9f4a8b1672a700e7233a9758897b6d0 + HEAD_REF master + PATCHES + 0001-fix_find_package.patch + 0002-fix_imgui_config.patch + 0003-fix_osx.patch + 004-fix-find-sfml.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ImGui-SFML) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/imgui-sfml/usage b/ports/imgui-sfml/usage new file mode 100644 index 00000000000000..ea9a5f63b7828d --- /dev/null +++ b/ports/imgui-sfml/usage @@ -0,0 +1,10 @@ +The package imgui-sfml provides CMake targets: + + find_package(imgui CONFIG REQUIRED) + find_package(SFML CONFIG REQUIRED COMPONENTS graphics system window) + find_package(ImGui-SFML CONFIG REQUIRED) + target_link_libraries(main PRIVATE + imgui::imgui + sfml-graphics sfml-system sfml-window + ImGui-SFML::ImGui-SFML + ) diff --git a/ports/imgui-sfml/vcpkg.json b/ports/imgui-sfml/vcpkg.json new file mode 100644 index 00000000000000..e12799de8cd36b --- /dev/null +++ b/ports/imgui-sfml/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "imgui-sfml", + "version-string": "2.1", + "port-version": 3, + "description": "ImGui binding for use with SFML", + "homepage": "https://github.com/eliasdaler/imgui-sfml", + "dependencies": [ + "imgui", + "opengl", + "sfml" + ] +} diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt index 4a2ce76280e8a5..b049fdd43de6b6 100644 --- a/ports/imgui/CMakeLists.txt +++ b/ports/imgui/CMakeLists.txt @@ -3,42 +3,215 @@ project(imgui CXX) set(CMAKE_DEBUG_POSTFIX d) -set(IMGUI_INCLUDES_PUBLIC - imgui.h - imconfig.h +add_library(${PROJECT_NAME} "") +add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) +target_include_directories( + ${PROJECT_NAME} + PUBLIC + $ + $ ) -set(IMGUI_INCLUDES_PRIVATE - imgui_internal.h +target_sources( + ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/imgui.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imgui_demo.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imgui_draw.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imgui_tables.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imgui_widgets.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/misc/cpp/imgui_stdlib.cpp ) -set(IMGUI_SOURCES - imgui.cpp - imgui_demo.cpp - imgui_draw.cpp - imgui_widgets.cpp -) +if(IMGUI_BUILD_ALLEGRO5_BINDING) + find_path(ALLEGRO5_INCLUDE_DIRS allegro5/allegro.h) + target_include_directories(${PROJECT_NAME} PRIVATE ${ALLEGRO5_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_allegro5.cpp) +endif() -add_library(${PROJECT_NAME} - ${IMGUI_INCLUDES_PUBLIC} - ${IMGUI_INCLUDES_PRIVATE} - ${IMGUI_SOURCES} -) +if(IMGUI_BUILD_DX9_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_dx9.cpp) +endif() -target_include_directories(${PROJECT_NAME} PUBLIC $) +if(IMGUI_BUILD_DX10_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_dx10.cpp) +endif() -install(TARGETS ${PROJECT_NAME} - EXPORT IMGUIExport - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib +if(IMGUI_BUILD_DX11_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_dx11.cpp) +endif() + +if(IMGUI_BUILD_DX12_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_dx12.cpp) +endif() + +if(IMGUI_BUILD_GLFW_BINDING) + find_package(glfw3 CONFIG REQUIRED) + target_link_libraries(${PROJECT_NAME} PUBLIC glfw) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_glfw.cpp) +endif() + +if(IMGUI_BUILD_GLUT_BINDING) + find_package(GLUT REQUIRED) + target_link_libraries(${PROJECT_NAME} PUBLIC GLUT::GLUT) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_glut.cpp) +endif() + +if(IMGUI_BUILD_METAL_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_metal.mm) +endif() + +if(IMGUI_BUILD_OPENGL2_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_opengl2.cpp) +endif() + +if(IMGUI_BUILD_OPENGL3_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp) +endif() + +if(IMGUI_BUILD_OSX_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_osx.mm) +endif() + +if(IMGUI_BUILD_SDL2_BINDING) + find_package(SDL2 CONFIG REQUIRED) + target_link_libraries(${PROJECT_NAME} PUBLIC SDL2::SDL2) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdl.cpp) +endif() + +if(IMGUI_BUILD_VULKAN_BINDING) + find_package(Vulkan REQUIRED) + target_link_libraries(${PROJECT_NAME} PUBLIC Vulkan::Vulkan) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_vulkan.cpp) +endif() + +if(IMGUI_BUILD_WIN32_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_win32.cpp) +endif() + +if(IMGUI_FREETYPE) + find_package(freetype CONFIG REQUIRED) + target_link_libraries(${PROJECT_NAME} PUBLIC freetype) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/misc/freetype/imgui_freetype.cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_ENABLE_FREETYPE) +endif() + +if(IMGUI_USE_WCHAR32) + target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_USE_WCHAR32) +endif() + +list(REMOVE_DUPLICATES BINDINGS_SOURCES) + +install( + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}_target ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin ) -install(EXPORT IMGUIExport FILE ${PROJECT_NAME}Config.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION share/${PROJECT_NAME}) +foreach(BINDING_TARGET ${BINDING_TARGETS}) + install( + TARGETS ${BINDING_TARGET} + EXPORT ${PROJECT_NAME}_target + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + ) +endforeach() if(NOT IMGUI_SKIP_HEADERS) - install( - FILES ${IMGUI_INCLUDES_PUBLIC} + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/imgui.h + ${CMAKE_CURRENT_SOURCE_DIR}/imconfig.h + ${CMAKE_CURRENT_SOURCE_DIR}/imgui_internal.h + ${CMAKE_CURRENT_SOURCE_DIR}/imstb_textedit.h + ${CMAKE_CURRENT_SOURCE_DIR}/imstb_rectpack.h + ${CMAKE_CURRENT_SOURCE_DIR}/imstb_truetype.h + ${CMAKE_CURRENT_SOURCE_DIR}/misc/cpp/imgui_stdlib.h DESTINATION include ) + + if(IMGUI_BUILD_ALLEGRO5_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_allegro5.h DESTINATION include) + endif() + + if(IMGUI_BUILD_DX9_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_dx9.h DESTINATION include) + endif() + + if(IMGUI_BUILD_DX10_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_dx10.h DESTINATION include) + endif() + + if(IMGUI_BUILD_DX11_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_dx11.h DESTINATION include) + endif() + + if(IMGUI_BUILD_DX12_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_dx12.h DESTINATION include) + endif() + + if(IMGUI_BUILD_GLFW_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_glfw.h DESTINATION include) + endif() + + if(IMGUI_BUILD_GLUT_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_glut.h DESTINATION include) + endif() + + if(IMGUI_COPY_MARMALADE_BINDING) + file(GLOB MARMALADE_BINDING_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_marmalade.*) + install(FILES ${MARMALADE_BINDING_SRCS} DESTINATION include/bindings) + endif() + + if(IMGUI_BUILD_METAL_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_metal.h DESTINATION include) + endif() + + if(IMGUI_BUILD_OPENGL2_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_opengl2.h DESTINATION include) + endif() + + if(IMGUI_BUILD_OPENGL3_BINDING) + install( + FILES + ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_opengl3.h + ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_opengl3_loader.h + DESTINATION + include + ) + endif() + + if(IMGUI_BUILD_OSX_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_osx.h DESTINATION include) + endif() + + if(IMGUI_BUILD_SDL2_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_sdl.h DESTINATION include) + endif() + + if(IMGUI_BUILD_VULKAN_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_vulkan.h DESTINATION include) + endif() + + if(IMGUI_BUILD_WIN32_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_win32.h DESTINATION include) + endif() + + if(IMGUI_FREETYPE) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/misc/freetype/imgui_freetype.h DESTINATION include) + endif() endif() + +include(CMakePackageConfigHelpers) +configure_package_config_file(imgui-config.cmake.in imgui-config.cmake INSTALL_DESTINATION share/imgui) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/imgui-config.cmake DESTINATION share/imgui) + +install( + EXPORT ${PROJECT_NAME}_target + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-targets.cmake + DESTINATION share/${PROJECT_NAME} +) diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL deleted file mode 100644 index 203556f6fa230e..00000000000000 --- a/ports/imgui/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: imgui -Version: 1.72b -Homepage: https://github.com/ocornut/imgui -Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. diff --git a/ports/imgui/imgui-config.cmake.in b/ports/imgui/imgui-config.cmake.in new file mode 100644 index 00000000000000..d2bdfbdaa21eb7 --- /dev/null +++ b/ports/imgui/imgui-config.cmake.in @@ -0,0 +1,27 @@ +cmake_policy(SET CMP0012 NEW) + +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +if (@IMGUI_BUILD_GLFW_BINDING@) + find_dependency(glfw3 CONFIG) +endif() + +if (@IMGUI_BUILD_GLUT_BINDING@) + find_dependency(GLUT) +endif() + +if (@IMGUI_BUILD_SDL2_BINDING@) + find_dependency(SDL2 CONFIG) +endif() + +if (@IMGUI_BUILD_VULKAN_BINDING@) + find_dependency(Vulkan) +endif() + +if (@IMGUI_FREETYPE@) + find_dependency(freetype CONFIG) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/imgui-targets.cmake") diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 79c2bb3185fb86..45add6cc0f6ead 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -1,26 +1,85 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -vcpkg_from_github( +if ("docking-experimental" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ocornut/imgui + REF dedb381c510cc0b87164e16b9e7ef6bf50ffccec + SHA512 0b331cbf81fed15cdceb84ccf1962b5db19af1b6dc75a19460810919b7f61088a9ba46acf3e6fcadfda6297204b03f1be0ab08fa427f89e504d70be8da1f2281 + HEAD_REF docking + ) +else() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF v1.72b - SHA512 ed40f2647a2256e61b6c754d091df364f23c93d7c008a838f7816e2924e16bea3d1251b675e1bd69256697d77f17372e5b29d986720ed5fb63ede94f9e813ede + REF v1.84.2 + SHA512 ea62d03ffc4c8d3dbc6be0076fb93158d464f4f02e88028c2bc64768f72e3117297854816bb7a776bd750c003013fe1d2871a1b505d04dd0922dfb2f214dd0a3 HEAD_REF master -) + ) +endif() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/imgui-config.cmake.in DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +if(("metal-binding" IN_LIST FEATURES OR "osx-binding" IN_LIST FEATURES) AND (NOT VCPKG_TARGET_IS_OSX)) + message(FATAL_ERROR "Feature metal-binding and osx-binding are only supported on osx.") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + allegro5-binding IMGUI_BUILD_ALLEGRO5_BINDING + dx9-binding IMGUI_BUILD_DX9_BINDING + dx10-binding IMGUI_BUILD_DX10_BINDING + dx11-binding IMGUI_BUILD_DX11_BINDING + dx12-binding IMGUI_BUILD_DX12_BINDING + glfw-binding IMGUI_BUILD_GLFW_BINDING + glut-binding IMGUI_BUILD_GLUT_BINDING + marmalade-binding IMGUI_COPY_MARMALADE_BINDING + metal-binding IMGUI_BUILD_METAL_BINDING + opengl2-binding IMGUI_BUILD_OPENGL2_BINDING + opengl3-binding IMGUI_BUILD_OPENGL3_BINDING + osx-binding IMGUI_BUILD_OSX_BINDING + sdl2-binding IMGUI_BUILD_SDL2_BINDING + vulkan-binding IMGUI_BUILD_VULKAN_BINDING + win32-binding IMGUI_BUILD_WIN32_BINDING + freetype IMGUI_FREETYPE + wchar32 IMGUI_USE_WCHAR32 +) + +if ("libigl-imgui" IN_LIST FEATURES) + vcpkg_download_distfile( + IMGUI_FONTS_DROID_SANS_H + URLS + https://raw.githubusercontent.com/libigl/libigl-imgui/c3efb9b62780f55f9bba34561f79a3087e057fc0/imgui_fonts_droid_sans.h + FILENAME "imgui_fonts_droid_sans.h" + SHA512 + abe9250c9a5989e0a3f2285bbcc83696ff8e38c1f5657c358e6fe616ff792d3c6e5ff2fa23c2eeae7d7b307392e0dc798a95d14f6d10f8e9bfbd7768d36d8b31 + ) + + file(INSTALL ${IMGUI_FONTS_DROID_SANS_H} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} OPTIONS_DEBUG -DIMGUI_SKIP_HEADERS=ON + MAYBE_UNUSED_VARIABLES + IMGUI_COPY_MARMALADE_BINDING ) vcpkg_install_cmake() + +if ("freetype" IN_LIST FEATURES) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/imconfig.h" "//#define IMGUI_ENABLE_FREETYPE" "#define IMGUI_ENABLE_FREETYPE") +endif() +if ("wchar32" IN_LIST FEATURES) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/imconfig.h" "//#define IMGUI_USE_WCHAR32" "#define IMGUI_USE_WCHAR32") +endif() + vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() -configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright COPYONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/imgui/vcpkg.json b/ports/imgui/vcpkg.json new file mode 100644 index 00000000000000..e58bf6b945507a --- /dev/null +++ b/ports/imgui/vcpkg.json @@ -0,0 +1,83 @@ +{ + "name": "imgui", + "version": "1.84.2", + "description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.", + "homepage": "https://github.com/ocornut/imgui", + "features": { + "allegro5-binding": { + "description": "Make available Allegro5 binding", + "dependencies": [ + "allegro5" + ] + }, + "docking-experimental": { + "description": "Build with docking support" + }, + "dx10-binding": { + "description": "Make available DirectX10 binding" + }, + "dx11-binding": { + "description": "Make available DirectX11 binding" + }, + "dx12-binding": { + "description": "Make available DirectX12 binding" + }, + "dx9-binding": { + "description": "Make available DirectX9 binding" + }, + "freetype": { + "description": "Build font atlases using FreeType instead of stb_truetype", + "dependencies": [ + "freetype" + ] + }, + "glfw-binding": { + "description": "Make available GLFW binding", + "dependencies": [ + "glfw3" + ] + }, + "glut-binding": { + "description": "Make available Glut binding", + "dependencies": [ + "freeglut" + ] + }, + "libigl-imgui": { + "description": "Install the libigl-imgui headers" + }, + "marmalade-binding": { + "description": "Make available Marmalade binding" + }, + "metal-binding": { + "description": "Make available Metal binding" + }, + "opengl2-binding": { + "description": "Make available OpenGL (legacy) binding" + }, + "opengl3-binding": { + "description": "Make available OpenGL3/ES/ES2 (modern) binding" + }, + "osx-binding": { + "description": "Make available OSX binding" + }, + "sdl2-binding": { + "description": "Make available SDL2 binding", + "dependencies": [ + "sdl2" + ] + }, + "vulkan-binding": { + "description": "Make available Vulkan binding", + "dependencies": [ + "vulkan" + ] + }, + "wchar32": { + "description": "Use WCHAR32 instead of WCHAR16" + }, + "win32-binding": { + "description": "Make available Win32 binding" + } + } +} diff --git a/ports/imguizmo/CMakeLists.txt b/ports/imguizmo/CMakeLists.txt new file mode 100644 index 00000000000000..1b552bae2d105d --- /dev/null +++ b/ports/imguizmo/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required(VERSION 3.8) +project(imguizmo) + +find_package(imgui CONFIG REQUIRED) +get_target_property(IMGUI_INCLUDE_DIRS imgui::imgui + INTERFACE_INCLUDE_DIRECTORIES +) + +add_library(${PROJECT_NAME} "") +add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) + +target_compile_options(${PROJECT_NAME} PRIVATE "-std=c++11") + +target_include_directories( + ${PROJECT_NAME} + PUBLIC + $ + $ + PRIVATE + ${IMGUI_INCLUDE_DIRS} +) + +target_sources( + ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/GraphEditor.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ImCurveEdit.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ImGradient.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ImGuizmo.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ImSequencer.cpp +) + +install( + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}_target + ARCHIVE DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin +) + +if (NOT IMGUIZMO_SKIP_HEADERS) + install( + FILES + ${CMAKE_CURRENT_SOURCE_DIR}/GraphEditor.h + ${CMAKE_CURRENT_SOURCE_DIR}/ImCurveEdit.h + ${CMAKE_CURRENT_SOURCE_DIR}/ImGradient.h + ${CMAKE_CURRENT_SOURCE_DIR}/ImGuizmo.h + ${CMAKE_CURRENT_SOURCE_DIR}/ImSequencer.h + ${CMAKE_CURRENT_SOURCE_DIR}/ImZoomSlider.h + DESTINATION include + ) +endif() + +install( + EXPORT ${PROJECT_NAME}_target + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-config.cmake + DESTINATION share/${PROJECT_NAME} +) \ No newline at end of file diff --git a/ports/imguizmo/portfile.cmake b/ports/imguizmo/portfile.cmake new file mode 100644 index 00000000000000..342001ea8d63a5 --- /dev/null +++ b/ports/imguizmo/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CedricGuillemet/ImGuizmo + REF 1.83 + SHA512 23285398688b4cdf3128ecb918b70c9a52f06c8e911da57430442b838cecf653e233d8cdfefc6acd3e4da381869ffc6fb74bcaaafc8e33657d6060a645517363 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG + -DIMGUIZMO_SKIP_HEADERS=ON +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/imguizmo/vcpkg.json b/ports/imguizmo/vcpkg.json new file mode 100644 index 00000000000000..09184a7230f7af --- /dev/null +++ b/ports/imguizmo/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "imguizmo", + "version": "1.83", + "description": "Immediate mode 3D gizmo for scene editing and other controls based on Dear ImGui", + "homepage": "https://github.com/CedricGuillemet/ImGuizmo", + "dependencies": [ + "imgui", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/immer/CONTROL b/ports/immer/CONTROL deleted file mode 100644 index f6f736b59a655f..00000000000000 --- a/ports/immer/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: immer -Version: 2019-06-07 -Description: Postmodern immutable and persistent data structures for C++ diff --git a/ports/immer/portfile.cmake b/ports/immer/portfile.cmake index da2a40bad0208c..c6c2a0bb0c93bb 100644 --- a/ports/immer/portfile.cmake +++ b/ports/immer/portfile.cmake @@ -1,29 +1,34 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO arximboldi/immer - REF fe1d5151f8e62a97a953664f8de39b05ac0d2031 - SHA512 2f78c2d85a24b2bcb69bbbf8b038c8bacb5a841e0f0ce7e4e521d369423c7d44f803a1c766a77d0955246a1b22476de15fa708a3786f05c41a3b705a574bbb71 + REF a11df7243cb516a1aeffc83c31366d7259c79e82 + SHA512 7aefa894d57167e8606ffd20c78490731885da610da084ffdc4ee677e40c7a3b4edcd0fbf74e354fc68866d09ec7a35a7c549f78ce91f2f1a84bb6ccc605e135 HEAD_REF master ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "docs" immer_BUILD_DOCS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DENABLE_PYTHON=OFF -DENABLE_GUILE=OFF -DENABLE_BOOST_COROUTINE=OFF + -Dimmer_BUILD_TESTS=OFF + -Dimmer_BUILD_EXAMPLES=OFF + -Dimmer_BUILD_EXTRAS=OFF + ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Immer) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Immer) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/immer/vcpkg.json b/ports/immer/vcpkg.json new file mode 100644 index 00000000000000..c52c0f02cf550e --- /dev/null +++ b/ports/immer/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "immer", + "version-date": "2021-05-03", + "description": "Postmodern immutable and persistent data structures for C++", + "homepage": "https://sinusoid.es/immer/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "docs": { + "description": "Build documentation" + } + } +} diff --git a/ports/implot/CMakeLists.txt b/ports/implot/CMakeLists.txt new file mode 100644 index 00000000000000..5d23a83c0bbef6 --- /dev/null +++ b/ports/implot/CMakeLists.txt @@ -0,0 +1,51 @@ +cmake_minimum_required(VERSION 3.8) +project(implot CXX) + +find_package(imgui CONFIG REQUIRED) +get_target_property(IMGUI_INCLUDE_DIRS imgui::imgui + INTERFACE_INCLUDE_DIRECTORIES +) + +set(CMAKE_DEBUG_POSTFIX d) + +add_library(${PROJECT_NAME} "") +add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) +target_include_directories( + ${PROJECT_NAME} + PUBLIC + $ + $ + PRIVATE + ${IMGUI_INCLUDE_DIRS} +) + +target_sources( + ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/implot.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/implot_items.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/implot_demo.cpp +) + +install( + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}_target + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +if(NOT IMPLOT_SKIP_HEADERS) + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/implot.h + ${CMAKE_CURRENT_SOURCE_DIR}/implot_internal.h + DESTINATION include + ) +endif() + +install( + EXPORT ${PROJECT_NAME}_target + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-config.cmake + DESTINATION share/${PROJECT_NAME} +) diff --git a/ports/implot/portfile.cmake b/ports/implot/portfile.cmake new file mode 100644 index 00000000000000..f0195be8c1202d --- /dev/null +++ b/ports/implot/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO epezent/implot + REF v0.11 + SHA512 161e709fcd872abd414129915501261085df531a0b5a9b33ed40422a082603627242467de59b11116948352fdb62b5d28131658b603f48692edd43429513ba29 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DIMPLOT_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/implot/vcpkg.json b/ports/implot/vcpkg.json new file mode 100644 index 00000000000000..be6d42b8d794b0 --- /dev/null +++ b/ports/implot/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "implot", + "version": "0.11", + "description": "Advanced 2D Plotting for Dear ImGui", + "homepage": "https://github.com/epezent/implot", + "dependencies": [ + "imgui" + ] +} diff --git a/ports/indicators/portfile.cmake b/ports/indicators/portfile.cmake new file mode 100644 index 00000000000000..c4a49c0cc192d6 --- /dev/null +++ b/ports/indicators/portfile.cmake @@ -0,0 +1,27 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/indicators + REF b85eadb47c1d0f0edbb4da9c3b6384ec6486b24a # v2.0 + SHA512 e9674440fa8643284a593b9e93345dc849301f42fe644b485e5dad1e12a20ef6687a2bf1eaeb2aec542d74544b7193c9b76b0166d7570781bc11604c71e8132a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DINDICATORS_BUILD_TESTS=OFF + -DINDICATORS_SAMPLES=OFF + -DINDICATORS_DEMO=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/indicators) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.termcolor DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/indicators/vcpkg.json b/ports/indicators/vcpkg.json new file mode 100644 index 00000000000000..5cca6d4b3e2317 --- /dev/null +++ b/ports/indicators/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "indicators", + "version": "2.0", + "description": "Activity indicators for modern C++", + "homepage": "https://github.com/p-ranav/indicators" +} diff --git a/ports/influxdb-cxx/portfile.cmake b/ports/influxdb-cxx/portfile.cmake new file mode 100644 index 00000000000000..cbdc50a5c6e69b --- /dev/null +++ b/ports/influxdb-cxx/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO offa/influxdb-cxx + REF v0.6.6 + SHA512 4c9a9bf7ccf430caaed088830dceda8cc4b4ec6b78187e5238c5e73f17583781d9d00e08db1011b86a4f418cdfbbfc8b000500461d013872a62096de456e47ea + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + boost INFLUXCXX_WITH_BOOST +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DINFLUXCXX_TESTING=OFF + -DINFLUXCXX_SYSTEMTEST=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/influxdb-cxx/vcpkg.json b/ports/influxdb-cxx/vcpkg.json new file mode 100644 index 00000000000000..a54ce151214352 --- /dev/null +++ b/ports/influxdb-cxx/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "influxdb-cxx", + "version": "0.6.6", + "description": "InfluxDB C++ client library", + "homepage": "https://github.com/offa/influxdb-cxx", + "dependencies": [ + "curl" + ], + "features": { + "boost": { + "description": "Enables UDP and Unix sockets as Transport Layer", + "dependencies": [ + "boost-asio", + "boost-conversion", + "boost-property-tree" + ] + } + } +} diff --git a/ports/infoware/portfile.cmake b/ports/infoware/portfile.cmake new file mode 100644 index 00000000000000..e8b0703a8af8a7 --- /dev/null +++ b/ports/infoware/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ThePhD/infoware + REF 50cb0982aceb32c8eb57aa6bc5011aced2c379df + SHA512 fe8182998a9e9dbed3dc3985a1161da11b340562628a71da8840aa4d4c56382ddc3ddef3d094e5d9c7c06481a2076dcff7fdb561bd169dd9d1849da4b4c6a064 + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + x11 INFOWARE_USE_X11 + d3d INFOWARE_USE_D3D + opencl INFOWARE_USE_OPENCL + opengl INFOWARE_USE_OPENGL +) + +# git must be injected, because vcpkg isolates the build +# from the environment entirely to have reproducible builds +vcpkg_find_acquire_program(GIT) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} + -DINFOWARE_EXAMPLES=OFF + -DINFOWARE_TESTS=OFF + -DGIT_EXECUTABLE=${GIT} + -DGIT_FOUND=true +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/infoware/vcpkg.json b/ports/infoware/vcpkg.json new file mode 100644 index 00000000000000..7b395639532f39 --- /dev/null +++ b/ports/infoware/vcpkg.json @@ -0,0 +1,32 @@ +{ + "$reason": "Note that independent usage and testing may work, but it seems to fail in CI environments for potential cross-compilation, and is thusly noted here to note break how vcpkg builds things!", + "name": "infoware", + "version-date": "2021-06-16", + "description": "C++ Library for pulling system and hardware information, without hitting the command line.", + "homepage": "https://github.com/ThePhD/infoware", + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "d3d": { + "description": "Prefer usage of Direct3D to find graphical capabilities (typically only works on Windows systems)." + }, + "opencl": { + "description": "Prefer usage of OpenCL to find graphical capabilities of the system." + }, + "opengl": { + "description": "Prefer usage of OpenGL to find graphical capabilities (may require additional libraries to be available for linking depending on the system)." + }, + "x11": { + "description": "Prefer usage of X11 to find graphical capabilities." + } + } +} diff --git a/ports/inih/CONTROL b/ports/inih/CONTROL deleted file mode 100644 index 22c519e215f63a..00000000000000 --- a/ports/inih/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: inih -Version: 44 -Description: Simple .INI file parser diff --git a/ports/inih/portfile.cmake b/ports/inih/portfile.cmake index a0a34d77f4bba4..471b35f86773a0 100644 --- a/ports/inih/portfile.cmake +++ b/ports/inih/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO benhoyt/inih - REF b1dbff4b0bd1e1f40d237e21011f6dee0ec2fa69 - SHA512 b250a7d2a9a1a18793a5f7421d444cbf92c21f1aca5f767781221e2e64b0ba5e0804e82c3f8e4f2c0e08516f4ddbf1533e4d254c557bfb38d9a0da879b98cffb + REF d7f465792c0c7686b50ed45c9a435394ae418d3e # r51 + SHA512 f3b621225933d74e9b130957aab1d55a82f06fd836aace439f9192a393d82a446e9f2152bb617a73a1dc681a821fc31d217c41f38c8ef8eeef7ad64c3e274b5d HEAD_REF master ) diff --git a/ports/inih/vcpkg.json b/ports/inih/vcpkg.json new file mode 100644 index 00000000000000..5b137dcba4bc8c --- /dev/null +++ b/ports/inih/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "inih", + "version-string": "51", + "port-version": 1, + "description": "Simple .INI file parser" +} diff --git a/ports/iniparser/CMakeLists.txt b/ports/iniparser/CMakeLists.txt new file mode 100644 index 00000000000000..9c4f6edf7f6657 --- /dev/null +++ b/ports/iniparser/CMakeLists.txt @@ -0,0 +1,54 @@ +cmake_minimum_required(VERSION 3.14) + +project(iniparser LANGUAGES C) + +include(GNUInstallDirs) + +set(CMAKE_DISABLE_SOURCE_CHANGES ON) +set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + +# iniparser.pc +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR}) +set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) +set(datarootdir ${prefix}/${CMAKE_INSTALL_DATAROOTDIR}) +set(datadir ${prefix}/${CMAKE_INSTALL_DATADIR}) + +configure_file(iniparser.pc ${CMAKE_CURRENT_BINARY_DIR}/iniparser.pc) + +set(iniparser_sources + src/dictionary.c + src/iniparser.c +) + +add_library(iniparser ${iniparser_sources}) + +target_include_directories(iniparser + PUBLIC + $ + $ +) + +target_compile_definitions(iniparser + PRIVATE + $<$:_CRT_SECURE_NO_WARNINGS> +) + +install(TARGETS iniparser EXPORT unofficial-iniparser-config) + +install( + EXPORT unofficial-iniparser-config + NAMESPACE unofficial::iniparser:: + DESTINATION share/unofficial-iniparser + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) + +install( + FILES src/dictionary.h src/iniparser.h + DESTINATION include +) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/iniparser.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff --git a/ports/iniparser/portfile.cmake b/ports/iniparser/portfile.cmake new file mode 100644 index 00000000000000..94eb59601ede04 --- /dev/null +++ b/ports/iniparser/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ndevilla/iniparser + REF f858275f7f307eecba84c2f5429483f9f28007f8 + SHA512 48c80b2163f86d8ca0f3253128d8528214e2f0680b4bceb686180c01b29cd2a0c3b9d6e7156a8e28649b14bc1d8a51b34c2d3d258013b35f69aaf6c3ded9ecdc + HEAD_REF master + PATCHES + win32_ssize_t.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/iniparser/vcpkg.json b/ports/iniparser/vcpkg.json new file mode 100644 index 00000000000000..a5acd226bd1c4a --- /dev/null +++ b/ports/iniparser/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "iniparser", + "version-string": "2020-04-06", + "port-version": 1, + "description": "C library for parsing INI-style files", + "homepage": "ndevilla.free.fr/iniparser" +} diff --git a/ports/iniparser/win32_ssize_t.patch b/ports/iniparser/win32_ssize_t.patch new file mode 100644 index 00000000000000..3fefee6c8cb8ef --- /dev/null +++ b/ports/iniparser/win32_ssize_t.patch @@ -0,0 +1,29 @@ +diff --git a/src/dictionary.c b/src/dictionary.c +index cb7ccd4..7985ab3 100644 +--- a/src/dictionary.c ++++ b/src/dictionary.c +@@ -18,7 +18,6 @@ + #include + #include + #include +-#include + + /** Maximum value size for integers and doubles. */ + #define MAXVALSZ 1024 +diff --git a/src/dictionary.h b/src/dictionary.h +index d04b6ce..929ae17 100644 +--- a/src/dictionary.h ++++ b/src/dictionary.h +@@ -21,7 +21,12 @@ + #include + #include + #include ++#ifdef _MSC_VER ++#include ++typedef SSIZE_T ssize_t; ++#else + #include ++#endif + + #ifdef __cplusplus + extern "C" { diff --git a/ports/inja/CONTROL b/ports/inja/CONTROL deleted file mode 100644 index ae7291bfb45148..00000000000000 --- a/ports/inja/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: inja -Version: 2.1.0-1 -Build-Depends: nlohmann-json -Description: Inja - A Template Engine for Modern C++ diff --git a/ports/inja/cmake-version.patch b/ports/inja/cmake-version.patch deleted file mode 100644 index 37b0488707a7ca..00000000000000 --- a/ports/inja/cmake-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 115c898..176bf2d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,7 +1,7 @@ - cmake_minimum_required(VERSION 3.5) - - --project(inja LANGUAGES CXX VERSION 2.0.0) -+project(inja LANGUAGES CXX VERSION 2.1.0) - - - option(INJA_USE_EMBEDDED_JSON "Use the shipped json header if not available on the system" ON) diff --git a/ports/inja/portfile.cmake b/ports/inja/portfile.cmake index 4fb028a1e4031d..7b613808c1025d 100644 --- a/ports/inja/portfile.cmake +++ b/ports/inja/portfile.cmake @@ -1,12 +1,9 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pantor/inja - REF v2.1.0 - SHA512 6b3a3a6a9e2adff14083a8e83c95fdc5ccf0c930acff40c4cf6c11d67b0df18fd941307e5d1f0c45dcfcb4c4afd0026b718ca510a2b297b9c6be048f5b144d42 + REF 2d515078c647457436556763aca8d4bf7d11d5e8 # v3.3.0 + SHA512 4e2f63297eede016772e4915cacfec57b49633f2a5fb80862bbd091d274f688ea1fbe958f97699e930fdee9f390ce0637513f4265190c171104d9eae9b12a59d HEAD_REF master - PATCHES - cmake-version.patch ) vcpkg_configure_cmake( @@ -28,4 +25,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") # Don't need built-in nlohmann-json as this package depends on nlohmann-json file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/inja/json") -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/inja RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/inja/vcpkg.json b/ports/inja/vcpkg.json new file mode 100644 index 00000000000000..55c71f18d32166 --- /dev/null +++ b/ports/inja/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "inja", + "version": "3.3.0", + "description": "Inja - A Template Engine for Modern C++", + "homepage": "https://github.com/pantor/inja", + "dependencies": [ + "nlohmann-json" + ] +} diff --git a/ports/intel-ipsec/CONTROL b/ports/intel-ipsec/CONTROL deleted file mode 100644 index 0056f00f0c19ee..00000000000000 --- a/ports/intel-ipsec/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: intel-ipsec -Version: 0.52 -Description: Intel(R) Multi-Buffer Crypto for IPsec Library - diff --git a/ports/intel-ipsec/portfile.cmake b/ports/intel-ipsec/portfile.cmake index 988e252199c3ae..3218d67b00f6ac 100644 --- a/ports/intel-ipsec/portfile.cmake +++ b/ports/intel-ipsec/portfile.cmake @@ -1,6 +1,4 @@ -INCLUDE(vcpkg_common_functions) - -IF (NOT VCPKG_CMAKE_SYSTEM_NAME) +IF (VCPKG_TARGET_IS_WINDOWS) SET(EXEC_ENV "Windows") ELSE () SET(EXEC_ENV "${VCPKG_CMAKE_SYSTEM_NAME}") @@ -58,5 +56,3 @@ FILE(INSTALL ${SOURCE_PATH}/Release/include/ DESTINATION ${CURRENT_PACKAGES_DIR} FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/intel-ipsecConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/ports/intel-ipsec/vcpkg.json b/ports/intel-ipsec/vcpkg.json new file mode 100644 index 00000000000000..eb8da35ce0d1b4 --- /dev/null +++ b/ports/intel-ipsec/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "intel-ipsec", + "version-string": "0.52", + "port-version": 2, + "description": "Intel(R) Multi-Buffer Crypto for IPsec Library" +} diff --git a/ports/intel-mkl/CONTROL b/ports/intel-mkl/CONTROL deleted file mode 100644 index f0b7f12a817702..00000000000000 --- a/ports/intel-mkl/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: intel-mkl -Version: 2018.0.1 -Description: Intel® Math Kernel Library (Intel® MKL) accelerates math processing routines, increases application performance, and reduces development time on Intel® processors. \ No newline at end of file diff --git a/ports/intel-mkl/portfile.cmake b/ports/intel-mkl/portfile.cmake index be54f0ec454ba5..a885e8dcbcda81 100644 --- a/ports/intel-mkl/portfile.cmake +++ b/ports/intel-mkl/portfile.cmake @@ -4,12 +4,20 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -set(MKL_REQUIRED_VERSION "20180000") +set(MKL_REQUIRED_VERSION "20200000") set(ProgramFilesx86 "ProgramFiles(x86)") set(INTEL_ROOT $ENV{${ProgramFilesx86}}/IntelSWTools/compilers_and_libraries/windows) - -find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKLROOT} ${INTEL_ROOT}/mkl DOC "Folder contains MKL") +set(ONEMKL_ROOT $ENV{${ProgramFilesx86}}/Intel/oneAPI/mkl/latest) + +find_path(MKL_ROOT include/mkl.h + PATHS + $ENV{MKLROOT} + ${INTEL_ROOT}/mkl + $ENV{ONEAPI_ROOT}/mkl/latest + ${ONEMKL_ROOT} + DOC + "Folder contains MKL") if (MKL_ROOT STREQUAL "MKL_ROOT-NOTFOUND") message(FATAL_ERROR "Could not find MKL. Before continuing, please download and install MKL (${MKL_REQUIRED_VERSION} or higher) from:" diff --git a/ports/intel-mkl/vcpkg.json b/ports/intel-mkl/vcpkg.json new file mode 100644 index 00000000000000..b767ee113559e8 --- /dev/null +++ b/ports/intel-mkl/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "intel-mkl", + "version": "2020.0.0", + "port-version": 2, + "description": "Intel® Math Kernel Library (Intel® MKL) accelerates math processing routines, increases application performance, and reduces development time on Intel® processors. Due to the complexity involved, this package doesn't install MKL. It instead verifies that MKL is installed. Please download and install MKL from https://registrationcenter.intel.com/en/products/download/3178/ manually before using it in vcpkg." +} diff --git a/ports/intelrdfpmathlib/CONTROL b/ports/intelrdfpmathlib/CONTROL deleted file mode 100644 index 5c7fe7b59148d6..00000000000000 --- a/ports/intelrdfpmathlib/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: intelrdfpmathlib -Version: 20U2 -Description: Intel(R) Decimal Floating-Point Math Library diff --git a/ports/intelrdfpmathlib/portfile.cmake b/ports/intelrdfpmathlib/portfile.cmake index e463f0a77e3333..9aad26f84869e3 100644 --- a/ports/intelrdfpmathlib/portfile.cmake +++ b/ports/intelrdfpmathlib/portfile.cmake @@ -1,12 +1,15 @@ -include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/IntelRDFPMathLib20U2) + vcpkg_download_distfile(ARCHIVE URLS "http://www.netlib.org/misc/intel/IntelRDFPMathLib20U2.tar.gz" FILENAME "IntelRDFPMathLib20U2.tar.gz" SHA512 4d445855f41b066b784f0c6b4e52f854df4129fa9d43569b1e1518f002b860f69796459c78de46a8ea24fb6e7aefe7f8bc1f253e78971a5ef202dab2a7b1b75a ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH +) set(LIB_SOURCE_PATH "${SOURCE_PATH}/LIBRARY") @@ -14,7 +17,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION "${LIB_SOURCE_PAT vcpkg_configure_cmake( SOURCE_PATH "${LIB_SOURCE_PATH}" - PREFER_NINJA + PREFER_NINJA OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) diff --git a/ports/intelrdfpmathlib/vcpkg.json b/ports/intelrdfpmathlib/vcpkg.json new file mode 100644 index 00000000000000..661c295ad92e56 --- /dev/null +++ b/ports/intelrdfpmathlib/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "intelrdfpmathlib", + "version-string": "20U2", + "port-version": 2, + "description": "Intel(R) Decimal Floating-Point Math Library" +} diff --git a/ports/io2d/CONTROL b/ports/io2d/CONTROL deleted file mode 100644 index 2376ce6de4d9e9..00000000000000 --- a/ports/io2d/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: io2d -Version: 0.1-2 -Description: a lightweight, cross platform drawing library -Build-Depends: cairo (!osx), graphicsmagick (!osx) diff --git a/ports/io2d/cmake.dep.patch b/ports/io2d/cmake.dep.patch new file mode 100644 index 00000000000000..bcc7ea2a2580db --- /dev/null +++ b/ports/io2d/cmake.dep.patch @@ -0,0 +1,62 @@ +diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +index 5ebeb6afa..702864667 100644 +--- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt ++++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.8) + + project(io2d CXX) + +-find_package(Cairo REQUIRED) +-find_package(GraphicsMagick REQUIRED) ++find_package(Cairo REQUIRED) ++find_package(unofficial-GraphicsMagick REQUIRED) + + add_library(io2d_cairo + cairo_renderer-graphicsmagickinit.cpp +@@ -24,7 +24,7 @@ target_include_directories(io2d_cairo PUBLIC + + target_compile_features(io2d_cairo PUBLIC cxx_std_17) + +-target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo GraphicsMagick::GraphicsMagick) ++target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo unofficial::graphicsmagick::graphicsmagick) + + install( + TARGETS io2d_cairo EXPORT io2d_targets +diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt +index abb150113..75d8c654d 100644 +--- a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt ++++ b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt +@@ -27,15 +27,24 @@ if(MSVC) + target_compile_definitions(io2d_cairo_win32 PUBLIC -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS) + + find_library(PIXMAN_LIB pixman-1) +- find_library(FREETYPE_LIB freetype) +- find_library(FONTCONFIG_LIB fontconfig) +- find_library(BZ_LIB bz2) +- find_library(JPEG_LIB jpeg) +- find_library(TIFF_LIB tiff) +- find_library(EXPAT_LIB expat) +- find_library(LZMA_LIB lzma) +- find_library(ICONV_LIB libiconv) +- find_library(CHARSET_LIB libcharset) ++ find_package(FreeType REQUIRED) ++ set(FREETYPE_LIB ${FREETYPE_LIBRARIES}) # I dont use targets here since this means I have to correct the config.cmake too ++ find_package(Fontconfig REQUIRED) ++ set(FONTCONFIG_LIB ${Fontconfig_LIBRARIES}) ++ find_package(BZip2 REQUIRED) ++ set(BZ_LIB ${BZIP2_LIBRARIES}) ++ find_package(JPEG REQUIRED) ++ set(JPEG_LIB ${JPEG_LIBRARIES}) ++ find_package(TIFF REQUIRED) ++ set(TIFF_LIB ${TIFF_LIBRARIES}) ++ find_package(EXPAT REQUIRED) ++ set(EXPAT_LIB ${EXPAT_LIBRARIES}) ++ find_package(LibLZMA REQUIRED) ++ set(LZMA_LIB ${LIBLZMA_LIBRARIES}) ++ find_package(Iconv REQUIRED) ++ if(NOT Iconv_IS_BUILT_IN) ++ set(ICONV_LIB ${Iconv_LIBRARIES}) ++ endif() + + target_link_libraries(io2d_cairo_win32 PUBLIC ${PIXMAN_LIB} ${FREETYPE_LIB} ${FONTCONFIG_LIB} ${BZ_LIB} ${JPEG_LIB} ${TIFF_LIB} ${EXPAT_LIB} ${LZMA_LIB} ${ICONV_LIB} ${CHARSET_LIB}) + endif() diff --git a/ports/io2d/find-package.patch b/ports/io2d/find-package.patch deleted file mode 100644 index 10d83f95bdd4b2..00000000000000 --- a/ports/io2d/find-package.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt -index 3d4791c..1864b7a 100644 ---- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt -+++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt -@@ -23,7 +23,15 @@ target_compile_features(io2d_cairo PUBLIC cxx_std_17) - - target_link_libraries(io2d_cairo PUBLIC io2d_core) - --if(MSVC) -+if(DEFINED VCPKG_TARGET_TRIPLET) -+ find_package(unofficial-cairo CONFIG REQUIRED) -+ set(CAIRO_INCLUDE_DIR) -+ set(CAIRO_LIB_DEBUG "CAIRO_LIB_DEBUG-NOTFOUND") -+ set(CAIRO_LIB_RELEASE unofficial::cairo::cairo) -+ find_package(unofficial-graphicsmagick CONFIG REQUIRED) -+ set(GRAPHICSMAGICK_INCLUDE_DIR) -+ set(GRAPHICSMAGICK_LIB unofficial::graphicsmagick::graphicsmagick) -+elseif(MSVC) - find_path(CAIRO_INCLUDE_DIR cairo.h) - find_path(GRAPHICSMAGICK_INCLUDE_DIR magick/api.h) - find_library(CAIRO_LIB_DEBUG cairod) -diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt -index abb1501..b7a6e71 100644 ---- a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt -+++ b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt -@@ -24,20 +24,7 @@ target_compile_features(io2d_cairo_win32 PUBLIC cxx_std_17) - target_link_libraries(io2d_cairo_win32 PUBLIC io2d_cairo) - - if(MSVC) -- target_compile_definitions(io2d_cairo_win32 PUBLIC -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS) -- -- find_library(PIXMAN_LIB pixman-1) -- find_library(FREETYPE_LIB freetype) -- find_library(FONTCONFIG_LIB fontconfig) -- find_library(BZ_LIB bz2) -- find_library(JPEG_LIB jpeg) -- find_library(TIFF_LIB tiff) -- find_library(EXPAT_LIB expat) -- find_library(LZMA_LIB lzma) -- find_library(ICONV_LIB libiconv) -- find_library(CHARSET_LIB libcharset) -- -- target_link_libraries(io2d_cairo_win32 PUBLIC ${PIXMAN_LIB} ${FREETYPE_LIB} ${FONTCONFIG_LIB} ${BZ_LIB} ${JPEG_LIB} ${TIFF_LIB} ${EXPAT_LIB} ${LZMA_LIB} ${ICONV_LIB} ${CHARSET_LIB}) -+ target_compile_definitions(io2d_cairo_win32 PRIVATE -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS) - endif() - - install( diff --git a/ports/io2d/portfile.cmake b/ports/io2d/portfile.cmake index 3411620f5e3c9c..d47fc97c854164 100644 --- a/ports/io2d/portfile.cmake +++ b/ports/io2d/portfile.cmake @@ -1,21 +1,16 @@ - -# Allow use of vcpkg functions -include(vcpkg_common_functions) - -# For now, io2d is always a static library. vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cpp-io2d/P0267_RefImpl - REF 21ae92c8be6916034e6e18f08aa57899a975dfb0 - SHA512 5b674f98ca7705d6901af339a4189d5ce4f2c3118bfb99430734f355159602f177bc8d1b345c3a2f17947a62547553f7b91747a1f16da063707a4da7f990391d + REF caa0ba0cb5a421a38bc26afaf3505bee206c44dd # accessed on 2020-09-14 + SHA512 f8e5a708f6cbda913a0492a843e1502b8d3cc615a6abda50e850be944e1484ec9087b787c54cc25d513172a7d5ab789be41a761c97df94266df4d1bcf14db17c HEAD_REF master - PATCHES find-package.patch + PATCHES + cmake.dep.patch ) -# Configure the library, using CMake -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) +if (VCPKG_TARGET_IS_OSX) set(IO2D_DEFAULT_OPTION "-DIO2D_DEFAULT=COREGRAPHICS_MAC") endif() @@ -29,16 +24,13 @@ vcpkg_configure_cmake( ${IO2D_DEFAULT_OPTION} ) -# Build + install the library, using CMake vcpkg_install_cmake() -# Don't have duplicate header files in both include/ and debug/include/ folders -# (within /installed/io2d_*/, as installed by vcpkg_install_cmake()): file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/io2d) -if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) +if (NOT VCPKG_TARGET_IS_OSX) file(RENAME ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake ${CURRENT_PACKAGES_DIR}/share/io2d/io2dTargets.cmake) file(WRITE ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake " include(CMakeFindDependencyMacro) @@ -49,6 +41,4 @@ if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) ") endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/io2d RENAME copyright) - -vcpkg_test_cmake(PACKAGE_NAME io2d) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/io2d/vcpkg.json b/ports/io2d/vcpkg.json new file mode 100644 index 00000000000000..876616dd9460d6 --- /dev/null +++ b/ports/io2d/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "io2d", + "version-date": "2020-09-14", + "port-version": 2, + "description": "a lightweight, cross platform drawing library", + "dependencies": [ + { + "name": "cairo", + "platform": "!osx" + }, + { + "name": "cairo", + "features": [ + "x11" + ], + "platform": "linux" + }, + { + "name": "graphicsmagick", + "platform": "!osx" + } + ] +} diff --git a/ports/irrlicht/CMakeLists.txt b/ports/irrlicht/CMakeLists.txt index e61a1d27038ff7..cc6edc785b5916 100644 --- a/ports/irrlicht/CMakeLists.txt +++ b/ports/irrlicht/CMakeLists.txt @@ -1,24 +1,25 @@ # # Irrlicht 3D engine # -cmake_minimum_required(VERSION 3.8) -project(Irrlicht) +cmake_minimum_required(VERSION 3.16) +project(Irrlicht LANGUAGES C CXX) set_property(GLOBAL PROPERTY USE_FOLDERS ON) - + # Irrlicht directories # ------------------------------------------------------------------------------------------------- -set(IRR_ROOT_DIR "") set(IRR_SRC_DIR "source/Irrlicht") set(IRR_INC_DIR "include") +set(IRR_TOOL_DIR "tools") # Options # ------------------------------------------------------------------------------------------------- set(DXSDK "") if(DEFINED ENV{DXSDK_DIR}) - set(DXSDK "ENV{DXSDK_DIR}") + set(DXSDK "$ENV{DXSDK_DIR}") endif() +set(IRR_UNICODE_PATH 0 CACHE BOOL "Whether to enable unicode path support on windows") set(IRR_FAST_MATH 0 CACHE BOOL "Whether to enable fast maths (at the expense of precision)") set(IRR_SHARED_LIB 1 CACHE BOOL "Whether to generate shared libraries instead of static libraries") set(IRR_DIRECTX_SDK ${DXSDK} CACHE PATH "Path to the DirectX SDK (for DirectX 9, this folder should contain /Include, /Lib)") @@ -43,11 +44,19 @@ glob_c_cpp_sources(IRR_SRC_FILES_INTERFACE ${IRR_INC_DIR}) glob_c_cpp_sources(IRR_SRC_FILES_AESGLADMAN ${IRR_SRC_DIR}/aesGladman) glob_c_cpp_sources(IRR_SRC_FILES_LZMA ${IRR_SRC_DIR}/lzma) -glob_c_cpp_sources(IRR_TOOL_FILES_FILE_TO_HEADER ${IRR_ROOT_DIR}/tools/FileToHeader/) -glob_c_cpp_sources(IRR_TOOL_FILES_GUI_EDITOR ${IRR_ROOT_DIR}/tools/GUIEditor/) -glob_c_cpp_sources(IRR_TOOL_FILES_FONT_TOOL ${IRR_ROOT_DIR}/tools/IrrFontTool/newFontTool/) -glob_c_cpp_sources(IRR_TOOL_FILES_MESH_CONVERTER ${IRR_ROOT_DIR}/tools/MeshConverter/) - +glob_c_cpp_sources(IRR_TOOL_FILES_FILE_TO_HEADER ${IRR_TOOL_DIR}/FileToHeader/) +glob_c_cpp_sources(IRR_TOOL_FILES_GUI_EDITOR ${IRR_TOOL_DIR}/GUIEditor/) +glob_c_cpp_sources(IRR_TOOL_FILES_FONT_TOOL ${IRR_TOOL_DIR}/IrrFontTool/newFontTool/) +glob_c_cpp_sources(IRR_TOOL_FILES_MESH_CONVERTER ${IRR_TOOL_DIR}/MeshConverter/) + +if(APPLE) + file(GLOB IRR_SRC_FILES_OSX + "${IRR_SRC_DIR}/MacOSX/*.mm" + "${IRR_SRC_DIR}/MacOSX/*.h") + + set(IRR_SRC_FILES ${IRR_SRC_FILES} ${IRR_SRC_FILES_OSX}) +endif() + # Group files # ------------------------------------------------------------------------------------------------- source_group(Irrlicht\\engine FILES ${IRR_SRC_FILES}) @@ -78,18 +87,29 @@ else() add_library(Irrlicht STATIC ${IRR_ALL_SRC_FILES}) endif() -target_link_libraries(Irrlicht PRIVATE - ${ZLIB_LIBRARY} - ${PNG_LIBRARY} - ${JPEG_LIBRARY} - ${BZIP2_LIBRARY} - ) +if(APPLE) + target_include_directories(Irrlicht PRIVATE ${IRR_SRC_DIR}/MacOSX) + + target_compile_definitions(Irrlicht PRIVATE SYSTEM=MacOSX) + + target_link_libraries(Irrlicht ${OSX_LIBRARIES}) + + target_compile_options(Irrlicht PRIVATE "-ObjC++") + + set(ADDITIONAL_LIRARIES + "-framework OpenGL" + "-framework IOKit" + "-framework Carbon" + "-framework AppKit" + "-framework Cocoa") +endif() -target_compile_definitions(Irrlicht PRIVATE - NO_IRR_USE_NON_SYSTEM_ZLIB_ - NO_IRR_USE_NON_SYSTEM_LIB_PNG_ - NO_IRR_USE_NON_SYSTEM_JPEG_LIB_ - NO_IRR_USE_NON_SYSTEM_BZLIB_ +target_link_libraries(Irrlicht PRIVATE + ${PNG_LIBRARY} + ${JPEG_LIBRARY} + ${ZLIB_LIBRARY} + ${BZIP2_LIBRARY} + ${ADDITIONAL_LIRARIES} ) if(IRR_BUILD_TOOLS) @@ -118,7 +138,7 @@ target_include_directories(Irrlicht ) # I dont realy understand why this is necesary or what it is doing, -# but it is necesarry to build and export a package. +# but it is necesarry to build and export a package. # See: https://cmake.org/cmake/help/v3.8/command/target_include_directories.html target_include_directories(Irrlicht PUBLIC $ @@ -144,6 +164,14 @@ if(NOT ${IRR_SHARED_LIB}) target_compile_definitions(Irrlicht PUBLIC _IRR_STATIC_LIB_) endif() +# Disable Irrlicht building already provided dependencies +target_compile_definitions(Irrlicht + PRIVATE NO_IRR_USE_NON_SYSTEM_ZLIB_ + PRIVATE NO_IRR_USE_NON_SYSTEM_LIB_PNG_ + PRIVATE NO_IRR_USE_NON_SYSTEM_BZLIB_ + PRIVATE NO_IRR_USE_NON_SYSTEM_JPEG_LIB_ + ) + # Per platform config # ------------------------------------------------------------------------------------------------- @@ -151,9 +179,6 @@ endif() target_compile_definitions(Irrlicht PRIVATE IRRLICHT_EXPORTS) if(WIN32) - # Unicode - target_compile_definitions(Irrlicht PRIVATE UNICODE _UNICODE) - # Import the symbols of bzip2 target_compile_definitions(Irrlicht PRIVATE BZ_IMPORT) @@ -163,6 +188,12 @@ if(WIN32) # Multi processor compilation target_compile_options(Irrlicht PRIVATE /MP) + # Unicode + if(${IRR_UNICODE_PATH}) + target_compile_definitions(Irrlicht PRIVATE UNICODE _UNICODE) + target_compile_definitions(Irrlicht PUBLIC _IRR_WCHAR_FILESYSTEM) + endif() + # Fast math options if(${IRR_FAST_MATH}) target_compile_options(Irrlicht PRIVATE /fp:fast) @@ -172,7 +203,6 @@ if(WIN32) target_compile_options(Irrlicht PRIVATE /arch:SSE2) endif() endif() - elseif(UNIX) # Standard mode target_compile_options(Irrlicht @@ -180,7 +210,7 @@ elseif(UNIX) PRIVATE -pipe PRIVATE -fno-exceptions PRIVATE -fno-strict-aliasing) - + # Disable RTTI on C++ files only (no sense for C files) set_source_files_properties(${IRR_SRC_FILES} ${IRR_SRC_FILES_AESGLADMAN} PROPERTIES COMPILE_FLAGS -fno-rtti) @@ -189,10 +219,12 @@ elseif(UNIX) target_compile_options(Irrlicht PRIVATE $<$:-D_DEBUG>) # X11 and OpenGL - target_link_libraries(Irrlicht - PRIVATE X11 - PRIVATE GL - PRIVATE Xxf86vm) + if(NOT APPLE) + target_link_libraries(Irrlicht + PRIVATE X11 + PRIVATE GL + PRIVATE Xxf86vm) + endif() endif() # Installation @@ -209,7 +241,7 @@ install(FILES ${IRR_SRC_FILES_INTERFACE} DESTINATION "include/irrlicht" CONFIGUR if(IRR_BUILD_TOOLS) install( - TARGETS FileToHeader GUIEditor FontTool MeshConverter + TARGETS FileToHeader GUIEditor FontTool MeshConverter RUNTIME DESTINATION tools/irrlicht/ CONFIGURATIONS Release ) diff --git a/ports/irrlicht/CONTROL b/ports/irrlicht/CONTROL deleted file mode 100644 index 89c782b4625c09..00000000000000 --- a/ports/irrlicht/CONTROL +++ /dev/null @@ -1,10 +0,0 @@ -Source: irrlicht -Version: 1.8.4-2 -Description: Irrlicht lightning fast 3d engine -Build-Depends: zlib, libpng, bzip2, libjpeg-turbo - -Feature: fast-fpu -Description: Enable fast maths (at the expense of precision) - -Feature: tools -Description: Build the Tools FileToHeader, FontTool, GUIEditor and MeshConverter diff --git a/ports/irrlicht/LICENSE.txt b/ports/irrlicht/LICENSE.txt new file mode 100644 index 00000000000000..17248fdb42cbd7 --- /dev/null +++ b/ports/irrlicht/LICENSE.txt @@ -0,0 +1,20 @@ +The Irrlicht Engine License +=========================== + +Copyright (C) 2002-2015 Nikolaus Gebhardt + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgement in the product documentation would be + appreciated but is not required. +2. Altered source versions must be clearly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. \ No newline at end of file diff --git a/ports/irrlicht/fix-encoding.patch b/ports/irrlicht/fix-encoding.patch new file mode 100644 index 00000000000000..d01bfad51531ac --- /dev/null +++ b/ports/irrlicht/fix-encoding.patch @@ -0,0 +1,13 @@ +diff --git a/include/Keycodes.h b/include/Keycodes.h +index e56eca1..57ab312 100644 +--- a/include/Keycodes.h ++++ b/include/Keycodes.h +@@ -89,7 +89,7 @@ namespace irr + KEY_KEY_X = 0x58, // X key + KEY_KEY_Y = 0x59, // Y key + KEY_KEY_Z = 0x5A, // Z key +- KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard) ++ KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard) + KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard) + KEY_APPS = 0x5D, // Applications key (Natural keyboard) + KEY_SLEEP = 0x5F, // Computer Sleep key diff --git a/ports/irrlicht/fix-osx-compilation.patch b/ports/irrlicht/fix-osx-compilation.patch new file mode 100644 index 00000000000000..6f623db265e214 --- /dev/null +++ b/ports/irrlicht/fix-osx-compilation.patch @@ -0,0 +1,28 @@ +diff --git a/source/Irrlicht/CImageLoaderJPG.cpp b/source/Irrlicht/CImageLoaderJPG.cpp +index 66144326c..4ea224c24 100644 +--- a/source/Irrlicht/CImageLoaderJPG.cpp ++++ b/source/Irrlicht/CImageLoaderJPG.cpp +@@ -68,7 +68,7 @@ void CImageLoaderJPG::init_source (j_decompress_ptr cinfo) + boolean CImageLoaderJPG::fill_input_buffer (j_decompress_ptr cinfo) + { + // DO NOTHING +- return 1; ++ return TRUE; + } + + +diff --git a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm +index 53029eb45..e75b707e1 100644 +--- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm ++++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm +@@ -495,8 +495,8 @@ long GetDictionaryLong(CFDictionaryRef theDict, const void* key) + if(!CreationParams.WindowId) //load menus if standalone application + { + [[NSAutoreleasePool alloc] init]; +- [NSApplication sharedApplication]; +- [NSApp setDelegate:(id)[[[AppDelegate alloc] initWithDevice:this] autorelease]]; ++ [[NSApplication sharedApplication] activateIgnoringOtherApps]; ++ [NSApp setDelegate:(id)[[[AppDelegate alloc] initWithDevice:this] autorelease]]; + [NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]]; + [NSApp finishLaunching]; + } diff --git a/ports/irrlicht/fix-sysctl.patch b/ports/irrlicht/fix-sysctl.patch new file mode 100644 index 00000000000000..98c70273ecbf48 --- /dev/null +++ b/ports/irrlicht/fix-sysctl.patch @@ -0,0 +1,12 @@ +--- a/source/Irrlicht/COSOperator.cpp ++++ b/source/Irrlicht/COSOperator.cpp +@@ -11,8 +11,8 @@ + #else + #include + #include +-#ifndef _IRR_SOLARIS_PLATFORM_ + #include ++#ifdef _IRR_OSX_PLATFORM_ + #include + #endif + #endif diff --git a/ports/irrlicht/portfile.cmake b/ports/irrlicht/portfile.cmake index 5bee54b4219000..9641f8fddc837d 100644 --- a/ports/irrlicht/portfile.cmake +++ b/ports/irrlicht/portfile.cmake @@ -1,99 +1,50 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/irrlicht/Irrlicht%20SDK/1.8/1.8.4/irrlicht-1.8.4.zip" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO irrlicht/Irrlicht%20SDK + REF 1.8/1.8.4 FILENAME "irrlicht-1.8.4.zip" SHA512 de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1 -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF "1.8.4" PATCHES - "support-unicode-on-windows.patch" - # [NO_REMOVE_ONE_LEVEL] - # [WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/src>] - # [PATCHES ...] + fix-encoding.patch + fix-sysctl.patch + fix-osx-compilation.patch ) -# Copy CMakeLists.txt to the source, because Irrlicht does not have one. -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) -set(FAST_MATH FALSE) -if("fast-fpu" IN_LIST FEATURES) - set(FAST_MATH TRUE) -endif() - -set(BUILD_TOOLS FALSE) -if("tools" IN_LIST FEATURES) - set(BUILD_TOOLS TRUE) -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + unicode IRR_UNICODE_PATH + fast-fpu IRR_FAST_MATH + tools IRR_BUILD_TOOLS +) -set(SHARED_LIB TRUE) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(SHARED_LIB FALSE) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIB) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - -DIRR_SHARED_LIB=${SHARED_LIB} - -DIRR_FAST_MATH=${FAST_MATH} - -DIRR_BUILD_TOOLS=${BUILD_TOOLS} - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + OPTIONS + -DIRR_SHARED_LIB=${SHARED_LIB} + ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets() +vcpkg_cmake_config_fixup() -if(BUILD_TOOLS) +if("tools" IN_LIST FEATURES) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/irrlicht/) endif() file(WRITE ${CURRENT_PACKAGES_DIR}/share/irrlicht/irrlicht-config.cmake "include(\${CMAKE_CURRENT_LIST_DIR}/irrlicht-targets.cmake)") -# Handle copyright -file(WRITE ${CURRENT_PACKAGES_DIR}/share/irrlicht/copyright " -The Irrlicht Engine License -=========================== - -Copyright (C) 2002-2015 Nikolaus Gebhardt - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgement in the product documentation would be - appreciated but is not required. -2. Altered source versions must be clearly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution.") vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/irrlicht) endif() -# Post-build test for cmake libraries -vcpkg_test_cmake(PACKAGE_NAME irrlicht) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/irrlicht/support-unicode-on-windows.patch b/ports/irrlicht/support-unicode-on-windows.patch deleted file mode 100644 index 609824401bb67c..00000000000000 --- a/ports/irrlicht/support-unicode-on-windows.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h -index c2c5d12..7c44f0c 100644 ---- a/include/IrrCompileConfig.h -+++ b/include/IrrCompileConfig.h -@@ -233,7 +233,9 @@ you will not be able to use anything provided by the GUI Environment, including - disable this feature, the engine behave as before (ansi). This is currently only supported - for Windows based systems. You also have to set #define UNICODE for this to compile. - */ --//#define _IRR_WCHAR_FILESYSTEM -+#if defined(_IRR_WINDOWS_) && (defined(_UNICODE) || defined(UNICODE)) -+#define _IRR_WCHAR_FILESYSTEM -+#endif - #ifdef NO_IRR_WCHAR_FILESYSTEM - #undef _IRR_WCHAR_FILESYSTEM - #endif -diff --git a/include/Keycodes.h b/include/Keycodes.h -index e56eca1..57ab312 100644 ---- a/include/Keycodes.h -+++ b/include/Keycodes.h -@@ -89,7 +89,7 @@ namespace irr - KEY_KEY_X = 0x58, // X key - KEY_KEY_Y = 0x59, // Y key - KEY_KEY_Z = 0x5A, // Z key -- KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard) -+ KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard) - KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard) - KEY_APPS = 0x5D, // Applications key (Natural keyboard) - KEY_SLEEP = 0x5F, // Computer Sleep key diff --git a/ports/irrlicht/vcpkg.json b/ports/irrlicht/vcpkg.json new file mode 100644 index 00000000000000..2f348b948e8240 --- /dev/null +++ b/ports/irrlicht/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "irrlicht", + "version-string": "1.8.4", + "port-version": 12, + "description": "The Irrlicht Engine is an open source realtime 3D engine written in C++. It is cross-platform, using D3D, OpenGL and its own software renderers.", + "homepage": "http://irrlicht.sourceforge.net", + "supports": "!(arm | uwp)", + "dependencies": [ + "bzip2", + "libjpeg-turbo", + "libpng", + "vcpkg-cmake", + "vcpkg-cmake-config", + "zlib" + ], + "features": { + "fast-fpu": { + "description": "Enable fast maths (at the expense of precision)" + }, + "tools": { + "description": "Build the Tools FileToHeader, FontTool, GUIEditor and MeshConverter" + }, + "unicode": { + "description": "Support unicode path on windows" + } + } +} diff --git a/ports/irrxml/portfile.cmake b/ports/irrxml/portfile.cmake new file mode 100644 index 00000000000000..065116c276adcf --- /dev/null +++ b/ports/irrxml/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/irrxml/vcpkg.json b/ports/irrxml/vcpkg.json new file mode 100644 index 00000000000000..c84eba7b4dc34f --- /dev/null +++ b/ports/irrxml/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "irrxml", + "version-string": "0", + "description": "Alias port for irrlicht", + "dependencies": [ + "irrlicht" + ] +} diff --git a/ports/isal/CONTROL b/ports/isal/CONTROL deleted file mode 100644 index e478ee553c482a..00000000000000 --- a/ports/isal/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: isal -Version: 2.25.0 -Description: Intel(R) Intelligent Storage Acceleration Library - diff --git a/ports/isal/portfile.cmake b/ports/isal/portfile.cmake index 0fbb6f628919e2..0703b724697ffe 100644 --- a/ports/isal/portfile.cmake +++ b/ports/isal/portfile.cmake @@ -1,5 +1,3 @@ -INCLUDE(vcpkg_common_functions) - IF (NOT VCPKG_CMAKE_SYSTEM_NAME) SET(EXEC_ENV "Windows") ELSE () @@ -46,5 +44,3 @@ FILE(INSTALL ${SOURCE_PATH}/Release/include/ DESTINATION ${CURRENT_PACKAGES_DIR} FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/isalConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -#VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/ports/isal/vcpkg.json b/ports/isal/vcpkg.json new file mode 100644 index 00000000000000..7a18c00957096e --- /dev/null +++ b/ports/isal/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "isal", + "version-string": "2.25.0", + "port-version": 1, + "description": "Intel(R) Intelligent Storage Acceleration Library" +} diff --git a/ports/ismrmrd/CONTROL b/ports/ismrmrd/CONTROL deleted file mode 100644 index f876416d420c92..00000000000000 --- a/ports/ismrmrd/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ismrmrd -Version: 1.4.0-1 -Description: ISMRM Raw Data Format -Build-Depends: pugixml, hdf5, boost, fftw3 diff --git a/ports/ismrmrd/fix-depends-hdf5.patch b/ports/ismrmrd/fix-depends-hdf5.patch new file mode 100644 index 00000000000000..26b01de48f4e7e --- /dev/null +++ b/ports/ismrmrd/fix-depends-hdf5.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2144fd3..68f9ca9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -108,7 +108,11 @@ endif() + if (USE_HDF5_DATASET_SUPPORT) + if (VCPKG_TARGET_TRIPLET) #VCPKG HDF5 is packaged differently. + find_package(HDF5 CONFIG COMPONENTS C shared REQUIRED) +- set(HDF5_C_LIBRARIES hdf5::hdf5-shared) ++ if (BUILD_SHARED_LIBS) ++ set(HDF5_C_LIBRARIES hdf5::hdf5-shared) ++ else() ++ set(HDF5_C_LIBRARIES hdf5::hdf5-static) ++ endif() + else () + find_package(HDF5 COMPONENTS C REQUIRED) + endif () diff --git a/ports/ismrmrd/fix_static.patch b/ports/ismrmrd/fix_static.patch deleted file mode 100644 index e9bd5f360adfe7..00000000000000 --- a/ports/ismrmrd/fix_static.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --git a/tests/test_main.cpp b/tests/test_main.cpp -index 4b1809d..7ec1414 100644 ---- a/tests/test_main.cpp -+++ b/tests/test_main.cpp -@@ -1,4 +1,3 @@ --#define BOOST_TEST_DYN_LINK - #define BOOST_TEST_MODULE "ISMRMRD Unit Tests" - #include - diff --git a/ports/ismrmrd/portfile.cmake b/ports/ismrmrd/portfile.cmake index 4b6f7e6d671ba0..ee5a0f962e7bc2 100644 --- a/ports/ismrmrd/portfile.cmake +++ b/ports/ismrmrd/portfile.cmake @@ -1,22 +1,17 @@ -include(vcpkg_common_functions) - if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") set(WIN32_INCLUDE_STDDEF_PATCH "x86-windows-include-stddef.patch") endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(STATIC_PATCH "fix_static.patch") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ismrmrd/ismrmrd - REF 4d4004d91ccadd41ddb30b019f970a69bb23a1bc - SHA512 648901de4629c8b11574894763a5fa61a3cb0420c5aa62cdff02c4641ba702ca73efba12b403076301e44a4f0a7c915da1f2c7a34b24377d0385af92f2eda892 + REF v1.5.0 + SHA512 96e24be75ecde8e56001d805ffaf4502d39c87e2c4fe01c84c90cb01d8bd49268c48440728de2ffb4c3efa75a029b3ffc0101b5841893685f82b4fafec9b1c73 HEAD_REF master PATCHES ${STATIC_PATCH} ${WIN32_INCLUDE_STDDEF_PATCH} + fix-depends-hdf5.patch ) vcpkg_configure_cmake( @@ -25,6 +20,10 @@ vcpkg_configure_cmake( OPTIONS -DUSE_SYSTEM_PUGIXML=ON -DUSE_HDF5_DATASET_SUPPORT=ON + -DVCPKG_TARGET_TRIPLET=ON + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_UTILITIES=OFF ) vcpkg_install_cmake() @@ -41,7 +40,6 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll) endif() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/FindFFTW3.cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/FindFFTW3.cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/FindFFTW3.cmake) @@ -66,25 +64,11 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) set(EXECUTABLE_SUFFIX ".exe") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_c_example${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_c_example${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_generate_cartesian_shepp_logan${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_generate_cartesian_shepp_logan${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_read_timing_test${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_read_timing_test${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_recon_cartesian_2d${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_recon_cartesian_2d${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_test_xml${EXECUTABLE_SUFFIX}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_test_xml${EXECUTABLE_SUFFIX}) - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/) endif() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ismrmrd/LICENSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd) \ No newline at end of file diff --git a/ports/ismrmrd/vcpkg.json b/ports/ismrmrd/vcpkg.json new file mode 100644 index 00000000000000..27514f617e68f8 --- /dev/null +++ b/ports/ismrmrd/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "ismrmrd", + "version-string": "1.5.0", + "port-version": 1, + "description": "ISMRM Raw Data Format", + "homepage": "https://github.com/ismrmrd/ismrmrd", + "dependencies": [ + "boost", + "fftw3", + "hdf5", + "pugixml" + ] +} diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL deleted file mode 100644 index d9e0bde62e05f9..00000000000000 --- a/ports/itk/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: itk -Version: 5.0.1 -Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis. -Homepage: https://github.com/InsightSoftwareConsortium/ITK -Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[cpp], openjpeg - -Feature: vtk -Description: Build ITKVtkGlue module. -Build-Depends: vtk diff --git a/ports/itk/cufftw.patch b/ports/itk/cufftw.patch new file mode 100644 index 00000000000000..17365fb2f1f0e3 --- /dev/null +++ b/ports/itk/cufftw.patch @@ -0,0 +1,58 @@ +From 0f47aae05217884193a39690c2beef566f4ed3b1 Mon Sep 17 00:00:00 2001 +From: Stephen Aylward +Date: Sat, 25 Apr 2020 20:15:21 -0400 +Subject: [PATCH] BUG: CUFFTW paths were not being set and unnecessary FFTW + files used + +FindFFTW sets the FFTW_INCLUDES variable. The FFTW_INCLUDE_PATH var is +specific to FFTW (not used by CUFFTW). + +FFTWGlobalConfiguration file is only needed if FFTW is being used, +not if CUFFT is being used. +--- + CMake/FindFFTW.cmake | 2 +- + Modules/Filtering/FFT/CMakeLists.txt | 2 +- + Modules/Filtering/FFT/src/CMakeLists.txt | 9 +++++---- + 3 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/CMake/FindFFTW.cmake b/CMake/FindFFTW.cmake +index 785edc2b628..e1935899cab 100644 +--- a/CMake/FindFFTW.cmake ++++ b/CMake/FindFFTW.cmake +@@ -62,7 +62,7 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF) + find_path(FFTW_INCLUDE_PATH fftw3.h ${FFTW_INC_SEARCHPATH}) + endif() + +- if(FFTW_INCLUDE_PATH) ++ if(FFTW_INCLUDE_PATH OR CUFFTW_INCLUDE_PATH) + if(ITK_USE_CUFFTW) + file(TO_CMAKE_PATH "${CUFFTW_INCLUDE_PATH}" CUFFTW_INCLUDE_PATH) + set(FFTW_INCLUDE ${CUFFTW_INCLUDE_PATH}) +diff --git a/Modules/Filtering/FFT/CMakeLists.txt b/Modules/Filtering/FFT/CMakeLists.txt +index 7d9d1900b56..713530149cb 100644 +--- a/Modules/Filtering/FFT/CMakeLists.txt ++++ b/Modules/Filtering/FFT/CMakeLists.txt +@@ -5,5 +5,5 @@ if(ITK_USE_CUFFTW) + else() + set(ITKFFT_LIBRARIES ITKFFT) + endif() +-set(ITKFFT_INCLUDE_DIRS ${FFTW_INCLUDE_PATH}) ++set(ITKFFT_INCLUDE_DIRS ${FFTW_INCLUDE}) + itk_module_impl() +diff --git a/Modules/Filtering/FFT/src/CMakeLists.txt b/Modules/Filtering/FFT/src/CMakeLists.txt +index 3f3137b8cd4..bde3ee906f8 100644 +--- a/Modules/Filtering/FFT/src/CMakeLists.txt ++++ b/Modules/Filtering/FFT/src/CMakeLists.txt +@@ -1,7 +1,8 @@ +-set(ITKFFT_SRCS +- itkFFTWGlobalConfiguration.cxx +- itkComplexToComplexFFTImageFilter.cxx +- ) ++set(ITKFFT_SRCS itkComplexToComplexFFTImageFilter.cxx) ++ ++if( ITK_USE_FFTWF OR ITK_USE_FFTWD AND NOT ITK_USE_CUFFTW) ++ list(APPEND ITKFFT_SRCS itkFFTWGlobalConfiguration.cxx ) ++endif() + + itk_module_add_library(ITKFFT ${ITKFFT_SRCS}) + diff --git a/ports/itk/double-conversion.patch b/ports/itk/double-conversion.patch new file mode 100644 index 00000000000000..636dd8c4c7d816 --- /dev/null +++ b/ports/itk/double-conversion.patch @@ -0,0 +1,16 @@ +diff --git a/Modules/ThirdParty/DoubleConversion/CMakeLists.txt b/Modules/ThirdParty/DoubleConversion/CMakeLists.txt +index 16c611fd3..13978724c 100644 +--- a/Modules/ThirdParty/DoubleConversion/CMakeLists.txt ++++ b/Modules/ThirdParty/DoubleConversion/CMakeLists.txt +@@ -9,7 +9,10 @@ mark_as_advanced(ITK_USE_SYSTEM_DOUBLECONVERSION) + if(ITK_USE_SYSTEM_DOUBLECONVERSION) + find_package(double-conversion REQUIRED) + get_target_property(ITKDoubleConversion_INCLUDE_DIRS double-conversion::double-conversion INTERFACE_INCLUDE_DIRECTORIES) +- get_target_property(ITKDoubleConversion_LIBRARIES double-conversion::double-conversion LOCATION) ++ get_target_property(ITKDoubleConversion_LIBRARY_RELEASE double-conversion::double-conversion LOCATION_RELEASE) ++ get_target_property(ITKDoubleConversion_LIBRARY_DEBUG double-conversion::double-conversion LOCATION_DEBUG) ++ include(SelectLibraryConfigurations) ++ select_library_configurations(ITKDoubleConversion) + else() + set(ITKDoubleConversion_INCLUDE_DIRS + ${ITKDoubleConversion_SOURCE_DIR}/src diff --git a/ports/itk/fix_libminc_config_path.patch b/ports/itk/fix_libminc_config_path.patch deleted file mode 100644 index 3ff305d4be9776..00000000000000 --- a/ports/itk/fix_libminc_config_path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Modules/ThirdParty/MINC/src/libminc/CMakeLists.txt b/Modules/ThirdParty/MINC/src/libminc/CMakeLists.txt -index 305b2c63..63f81a53 100644 ---- a/Modules/ThirdParty/MINC/src/libminc/CMakeLists.txt -+++ b/Modules/ThirdParty/MINC/src/libminc/CMakeLists.txt -@@ -550,7 +550,7 @@ IF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT) - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Use${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINC.cmake - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINCConfig.cmake - DESTINATION -- ${LIBMINC_INSTALL_LIB_DIR}/cmake -+ share/itk - COMPONENT Development) - ENDIF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT) - diff --git a/ports/itk/fix_openjpeg_search.patch b/ports/itk/fix_openjpeg_search.patch deleted file mode 100644 index d17a1ab8405f03..00000000000000 --- a/ports/itk/fix_openjpeg_search.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt -index 6ac16ab6..4638f13c 100644 ---- a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt -+++ b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt -@@ -373,7 +373,7 @@ else() - endif() - - if(GDCM_USE_SYSTEM_OPENJPEG) -- find_package(OpenJPEG 2.0.0 REQUIRED) -+ find_package(OpenJPEG REQUIRED) - set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES}) - else() - set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2) diff --git a/ports/itk/hdf5.patch b/ports/itk/hdf5.patch new file mode 100644 index 00000000000000..091594cda0e933 --- /dev/null +++ b/ports/itk/hdf5.patch @@ -0,0 +1,20 @@ +diff --git a/Modules/ThirdParty/HDF5/CMakeLists.txt b/Modules/ThirdParty/HDF5/CMakeLists.txt +index a700ecdfb..0a683a52b 100644 +--- a/Modules/ThirdParty/HDF5/CMakeLists.txt ++++ b/Modules/ThirdParty/HDF5/CMakeLists.txt +@@ -25,11 +25,11 @@ endif() + ") + endif() + +- set(ITKHDF5_LIBRARIES ) +- if(BUILD_SHARED_LIBS) +- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_SHARED_LIBRARY} ${HDF5_CXX_SHARED_LIBRARY}) ++ set(ITKHDF5_LIBRARIES) ++ if(HDF5_BUILD_SHARED_LIBS) ++ list(APPEND ITKHDF5_LIBRARIES hdf5::hdf5_cpp-shared hdf5::hdf5-shared) + else() +- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_STATIC_LIBRARY} ${HDF5_CXX_STATIC_LIBRARY}) ++ list(APPEND ITKHDF5_LIBRARIES hdf5::hdf5_cpp-static hdf5::hdf5-static) + endif() + + set(ITKHDF5_INCLUDE_DIRS diff --git a/ports/itk/opencl.patch b/ports/itk/opencl.patch new file mode 100644 index 00000000000000..f935d09d40dade --- /dev/null +++ b/ports/itk/opencl.patch @@ -0,0 +1,176 @@ +diff --git a/Modules/Core/GPUCommon/CMakeLists.txt b/Modules/Core/GPUCommon/CMakeLists.txt +index da2d66b63..6fb476680 100644 +--- a/Modules/Core/GPUCommon/CMakeLists.txt ++++ b/Modules/Core/GPUCommon/CMakeLists.txt +@@ -24,9 +24,13 @@ if(ITK_USE_GPU AND APPLE AND NOT ITK_COMPILER_HAS_BLOCKS) + endif() + + if(ITK_USE_GPU) ++ message(STATUS "OPENCL_LIBRARIES:${OPENCL_LIBRARIES}") ++ if(TARGET OpenCL::OpenCL) ++ message(STATUS "OPENCL_LIBRARIES:${OpenCL_LIBRARIES}") ++ endif() + set(ITKGPUCommon_LIBRARIES ITKGPUCommon) +- set(ITKGPUCommon_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUCommon_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUCommon_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUCommon_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + if(NOT ITK_SOURCE_DIR) +diff --git a/Modules/Core/GPUCommon/src/CMakeLists.txt b/Modules/Core/GPUCommon/src/CMakeLists.txt +index 0b39f2a9a..160f7a752 100644 +--- a/Modules/Core/GPUCommon/src/CMakeLists.txt ++++ b/Modules/Core/GPUCommon/src/CMakeLists.txt +@@ -14,5 +14,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUCommon_Kernels}" ITKGPUCommon_SRCS) + + itk_module_add_library(ITKGPUCommon ${ITKGPUCommon_SRCS}) +- target_link_libraries(ITKGPUCommon LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUCommon LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Core/GPUFiniteDifference/CMakeLists.txt b/Modules/Core/GPUFiniteDifference/CMakeLists.txt +index c1bfde450..a642d9230 100644 +--- a/Modules/Core/GPUFiniteDifference/CMakeLists.txt ++++ b/Modules/Core/GPUFiniteDifference/CMakeLists.txt +@@ -9,8 +9,8 @@ if(NOT ITK_SOURCE_DIR) + endif() + + if (ITK_USE_GPU) +- set(ITKGPUFiniteDifference_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUFiniteDifference_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUFiniteDifference_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUFiniteDifference_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + set(ITKGPUFiniteDifference_LIBRARIES ITKGPUFiniteDifference) + endif() + +diff --git a/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt b/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt +index 8425cc025..8335c69a0 100644 +--- a/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt ++++ b/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt +@@ -9,5 +9,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUFiniteDifference_Kernels}" ITKGPUFiniteDifference_SRCS) + + itk_module_add_library(ITKGPUFiniteDifference ${ITKGPUFiniteDifference_SRCS}) +- target_link_libraries(ITKGPUFiniteDifference LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUFiniteDifference LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt b/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt +index f36fd887d..310d983fa 100644 +--- a/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt ++++ b/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt +@@ -10,8 +10,8 @@ endif() + + if (ITK_USE_GPU) + set(ITKGPUAnisotropicSmoothing_LIBRARIES ITKGPUAnisotropicSmoothing) +- set(ITKGPUAnisotropicSmoothing_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUAnisotropicSmoothing_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUAnisotropicSmoothing_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUAnisotropicSmoothing_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + if(NOT ITK_SOURCE_DIR) +diff --git a/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt b/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt +index 078905521..67fd7b832 100644 +--- a/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt ++++ b/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt +@@ -10,8 +10,8 @@ endif() + + if (ITK_USE_GPU) + set(ITKGPUImageFilterBase_LIBRARIES ITKGPUImageFilterBase) +- set(ITKGPUImageFilterBase_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUImageFilterBase_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUImageFilterBase_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUImageFilterBase_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + if(NOT ITK_SOURCE_DIR) +diff --git a/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt b/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt +index 251493f5e..6d33fa964 100644 +--- a/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt ++++ b/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt +@@ -10,5 +10,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUImageFilterBase_Kernels}" ITKGPUImageFilterBase_SRCS) + + itk_module_add_library(ITKGPUImageFilterBase ${ITKGPUImageFilterBase_SRCS}) +- target_link_libraries(ITKGPUImageFilterBase LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUImageFilterBase LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Filtering/GPUSmoothing/CMakeLists.txt b/Modules/Filtering/GPUSmoothing/CMakeLists.txt +index 9bac40921..2ed493d40 100644 +--- a/Modules/Filtering/GPUSmoothing/CMakeLists.txt ++++ b/Modules/Filtering/GPUSmoothing/CMakeLists.txt +@@ -10,8 +10,8 @@ endif() + + if (ITK_USE_GPU) + set(ITKGPUSmoothing_LIBRARIES ITKGPUSmoothing) +- set(ITKGPUSmoothing_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUSmoothing_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUSmoothing_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUSmoothing_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + if(NOT ITK_SOURCE_DIR) +diff --git a/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt b/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt +index d2120e842..2c6ca4a4a 100644 +--- a/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt ++++ b/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt +@@ -9,5 +9,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUSmoothing_Kernels}" ITKGPUSmoothing_SRCS) + + itk_module_add_library(ITKGPUSmoothing ${ITKGPUSmoothing_SRCS}) +- target_link_libraries(ITKGPUSmoothing LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUSmoothing LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Filtering/GPUThresholding/CMakeLists.txt b/Modules/Filtering/GPUThresholding/CMakeLists.txt +index 4390785f5..61786b7a8 100644 +--- a/Modules/Filtering/GPUThresholding/CMakeLists.txt ++++ b/Modules/Filtering/GPUThresholding/CMakeLists.txt +@@ -2,8 +2,8 @@ project(ITKGPUThresholding) + + if (ITK_USE_GPU) + set(ITKGPUThresholding_LIBRARIES ITKGPUThresholding) +- set(ITKGPUThresholding_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUThresholding_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUThresholding_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUThresholding_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + itk_module_impl() +diff --git a/Modules/Filtering/GPUThresholding/src/CMakeLists.txt b/Modules/Filtering/GPUThresholding/src/CMakeLists.txt +index 326c86859..c07c80414 100644 +--- a/Modules/Filtering/GPUThresholding/src/CMakeLists.txt ++++ b/Modules/Filtering/GPUThresholding/src/CMakeLists.txt +@@ -9,5 +9,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUThresholding_Kernels}" ITKGPUThresholding_SRCS) + + itk_module_add_library(ITKGPUThresholding ${ITKGPUThresholding_SRCS}) +- target_link_libraries(ITKGPUThresholding LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUThresholding LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Registration/GPUPDEDeformable/CMakeLists.txt b/Modules/Registration/GPUPDEDeformable/CMakeLists.txt +index c8d70a423..097c974c5 100644 +--- a/Modules/Registration/GPUPDEDeformable/CMakeLists.txt ++++ b/Modules/Registration/GPUPDEDeformable/CMakeLists.txt +@@ -2,8 +2,8 @@ project(ITKGPUPDEDeformableRegistration) + + if (ITK_USE_GPU) + set(ITKGPUPDEDeformableRegistration_LIBRARIES ITKGPUPDEDeformableRegistration) +- set(ITKGPUPDEDeformableRegistration_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUPDEDeformableRegistration_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUPDEDeformableRegistration_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUPDEDeformableRegistration_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + itk_module_impl() +diff --git a/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt b/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt +index 28b1d194c..1a049bdde 100644 +--- a/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt ++++ b/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt +@@ -10,5 +10,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUPDEDeformableRegistration_Kernels}" ITKGPUPDEDeformableRegistration_SRCS) + + itk_module_add_library(ITKGPUPDEDeformableRegistration ${ITKGPUPDEDeformableRegistration_SRCS}) +- target_link_libraries(ITKGPUPDEDeformableRegistration LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUPDEDeformableRegistration LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() diff --git a/ports/itk/openjpeg.patch b/ports/itk/openjpeg.patch new file mode 100644 index 00000000000000..0fe1f34c9c097c --- /dev/null +++ b/ports/itk/openjpeg.patch @@ -0,0 +1,548 @@ +diff --git a/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx b/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx +index 1b1fe9526..0da4aa0c4 100644 +--- a/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx ++++ b/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx +@@ -26,9 +26,9 @@ + + extern "C" + { +-#include "openjpeg.h" +-#include "j2k.h" +-#include "jp2.h" ++#include ++//#include "j2k.h" ++//##include "jp2.h" + } + + +@@ -62,8 +62,7 @@ public: + OPJ_UINT32 m_TileStartX; + OPJ_UINT32 m_TileStartY; + +- OPJ_UINT32 m_NumberOfTilesInX; +- OPJ_UINT32 m_NumberOfTilesInY; ++ OPJ_UINT32 m_NumberOfTiles; + + opj_dparameters_t m_DecompressionParameters; /* decompression parameters */ + }; +@@ -86,8 +85,7 @@ JPEG2000ImageIO::JPEG2000ImageIO() + this->m_Internal->m_TileStartX = 0; + this->m_Internal->m_TileStartY = 0; + +- this->m_Internal->m_NumberOfTilesInX = 0; +- this->m_Internal->m_NumberOfTilesInY = 0; ++ this->m_Internal->m_NumberOfTiles = 0; + + const char * extensions[] = { ".j2k", ".jp2", ".jpt" }; + +@@ -139,22 +137,16 @@ JPEG2000ImageIO::ReadImageInformation() + { + itkDebugMacro(<< "ReadImageInformation()"); + +- FILE * l_file = fopen(this->m_FileName.c_str(), "rb"); +- +- /* decompression parameters */ ++ /* set decoding parameters to default values */ ++ opj_set_default_decoder_parameters(&(this->m_Internal->m_DecompressionParameters)); + +- if (!l_file) ++ opj_stream_t * cio = opj_stream_create_default_file_stream(this->m_FileName.c_str(), true); ++ if (!cio) + { + itkExceptionMacro("JPEG2000ImageIO failed to open file for reading: " << this->GetFileName() << std::endl + << "Reason: " + << itksys::SystemTools::GetLastSystemError()); + } +- +- /* set decoding parameters to default values */ +- opj_set_default_decoder_parameters(&(this->m_Internal->m_DecompressionParameters)); +- +- opj_stream_t * cio = opj_stream_create_default_file_stream(l_file, true); +- + this->m_Internal->m_Dinfo = nullptr; /* handle to a decompressor */ + + opj_image_t * l_image = nullptr; +@@ -187,14 +179,14 @@ JPEG2000ImageIO::ReadImageInformation() + /* JPEG-2000 codestream */ + + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_J2K); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_J2K); + if (!this->m_Internal->m_Dinfo) + { + opj_stream_destroy(cio); +- fclose(l_file); ++ // fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_J2K) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_J2K) returns nullptr"); + } + break; + } +@@ -202,14 +194,14 @@ JPEG2000ImageIO::ReadImageInformation() + { + /* JPEG 2000 compressed image data */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JP2); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JP2); + if (!this->m_Internal->m_Dinfo) + { + opj_stream_destroy(cio); +- fclose(l_file); ++ // fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_JP2) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_JP2) returns nullptr"); + } + break; + } +@@ -217,20 +209,19 @@ JPEG2000ImageIO::ReadImageInformation() + { + /* JPEG 2000, JPIP */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JPT); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JPT); + if (!this->m_Internal->m_Dinfo) + { + opj_stream_destroy(cio); +- fclose(l_file); ++ // fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_JPT) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_JPT) returns nullptr"); + } + break; + } + default: + opj_stream_destroy(cio); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl + << "Reason: " +@@ -247,27 +238,11 @@ JPEG2000ImageIO::ReadImageInformation() + << "Reason: opj_setup_decoder returns false"); + } + +- // Image parameters - first tile +- OPJ_INT32 l_tile_x0; +- OPJ_INT32 l_tile_y0; + +- // Image parameters - tile width, height and number of tiles +- OPJ_UINT32 l_tile_width; +- OPJ_UINT32 l_tile_height; +- OPJ_UINT32 l_nb_tiles_x; +- OPJ_UINT32 l_nb_tiles_y; + + itkDebugMacro(<< "Trying to read header now..."); + +- bResult = opj_read_header(this->m_Internal->m_Dinfo, +- &l_image, +- &l_tile_x0, +- &l_tile_y0, +- &l_tile_width, +- &l_tile_height, +- &l_nb_tiles_x, +- &l_nb_tiles_y, +- cio); ++ bResult = opj_read_header(cio, this->m_Internal->m_Dinfo, &l_image); + + if (!bResult) + { +@@ -283,14 +258,22 @@ JPEG2000ImageIO::ReadImageInformation() + << "Reason: Error whle reading image header"); + } + ++ // Image parameters - first tile ++ OPJ_INT32 l_tile_x0=l_image->x0; ++ OPJ_INT32 l_tile_y0=l_image->y0; ++ ++ // Image parameters - tile width, height and number of tiles ++ OPJ_UINT32 l_tile_width=l_image->x1; ++ OPJ_UINT32 l_tile_height=l_image->y1; ++ OPJ_UINT32 l_nb_tiles=l_image->numcomps; ++ + this->m_Internal->m_TileStartX = l_tile_x0; + this->m_Internal->m_TileStartY = l_tile_y0; + + this->m_Internal->m_TileWidth = l_tile_width; + this->m_Internal->m_TileHeight = l_tile_height; + +- this->m_Internal->m_NumberOfTilesInX = l_nb_tiles_x; +- this->m_Internal->m_NumberOfTilesInY = l_nb_tiles_y; ++ this->m_Internal->m_NumberOfTiles = l_nb_tiles; + + + itkDebugMacro(<< "Number of Components = " << l_image->numcomps); +@@ -319,7 +302,7 @@ JPEG2000ImageIO::ReadImageInformation() + this->SetPixelType(IOPixelEnum::SCALAR); + break; + case 3: +- if (l_image->color_space != CLRSPC_SRGB) ++ if (l_image->color_space != OPJ_CLRSPC_SRGB) + { + itkWarningMacro(<< "file does not specify color space, assuming sRGB"); + } +@@ -335,8 +318,7 @@ JPEG2000ImageIO::ReadImageInformation() + itkDebugMacro(<< "Tile Start Y = " << this->m_Internal->m_TileStartY); + itkDebugMacro(<< "Tile Width = " << this->m_Internal->m_TileWidth); + itkDebugMacro(<< "Tile Height = " << this->m_Internal->m_TileHeight); +- itkDebugMacro(<< "Number of Tiles X = " << this->m_Internal->m_NumberOfTilesInX); +- itkDebugMacro(<< "Number of Tiles Y = " << this->m_Internal->m_NumberOfTilesInY); ++ itkDebugMacro(<< "Number of Tiles = " << this->m_Internal->m_NumberOfTiles); + + itkDebugMacro(<< "image->x1 = " << l_image->x1); + itkDebugMacro(<< "image->y1 = " << l_image->y1); +@@ -349,7 +331,6 @@ JPEG2000ImageIO::ReadImageInformation() + + /* close the byte stream */ + opj_stream_destroy(cio); +- fclose(l_file); + + if (this->m_Internal->m_Dinfo) + { +@@ -368,16 +349,7 @@ JPEG2000ImageIO::Read(void * buffer) + { + itkDebugMacro(<< "JPEG2000ImageIO::Read() Begin"); + +- FILE * l_file = fopen(this->m_FileName.c_str(), "rb"); +- +- if (!l_file) +- { +- itkExceptionMacro("JPEG2000ImageIO failed to open file for reading: " << this->GetFileName() << std::endl +- << "Reason: " +- << itksys::SystemTools::GetLastSystemError()); +- } +- +- opj_stream_t * l_stream = opj_stream_create_default_file_stream(l_file, true); ++ opj_stream_t * l_stream = opj_stream_create_default_file_stream(this->m_FileName.c_str(), true); + if (!l_stream) + { + itkExceptionMacro("JPEG2000ImageIO failed to read file: " +@@ -397,12 +369,13 @@ JPEG2000ImageIO::Read(void * buffer) + { + /* JPEG-2000 codestream */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_J2K); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_J2K); + if (!this->m_Internal->m_Dinfo) + { ++ opj_stream_destroy(l_stream); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_J2K) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_J2K) returns nullptr"); + } + break; + } +@@ -410,12 +383,13 @@ JPEG2000ImageIO::Read(void * buffer) + { + /* JPEG 2000 compressed image data */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JP2); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JP2); + if (!this->m_Internal->m_Dinfo) + { ++ opj_stream_destroy(l_stream); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_JP2) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_JP2) returns nullptr"); + } + break; + } +@@ -423,17 +397,18 @@ JPEG2000ImageIO::Read(void * buffer) + { + /* JPEG 2000, JPIP */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JPT); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JPT); + if (!this->m_Internal->m_Dinfo) + { ++ opj_stream_destroy(l_stream); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_JPT) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_JPT) returns nullptr"); + } + break; + } + default: +- fclose(l_file); ++ opj_stream_destroy(l_stream); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl + << "Reason: " +@@ -448,29 +423,13 @@ JPEG2000ImageIO::Read(void * buffer) + << "Reason: opj_setup_decoder returns false"); + } + +- OPJ_INT32 l_tile_x0, l_tile_y0; +- +- OPJ_UINT32 l_tile_width; +- OPJ_UINT32 l_tile_height; +- OPJ_UINT32 l_nb_tiles_x; +- OPJ_UINT32 l_nb_tiles_y; +- +- bool bResult = opj_read_header(this->m_Internal->m_Dinfo, +- &l_image, +- &l_tile_x0, +- &l_tile_y0, +- &l_tile_width, +- &l_tile_height, +- &l_nb_tiles_x, +- &l_nb_tiles_y, +- l_stream); ++ bool bResult = opj_read_header(l_stream, this->m_Internal->m_Dinfo,&l_image); + + if (!bResult) + { + opj_destroy_codec(this->m_Internal->m_Dinfo); + this->m_Internal->m_Dinfo = nullptr; + opj_stream_destroy(l_stream); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl + << "Reason: opj_read_header returns false"); + } +@@ -499,7 +458,7 @@ JPEG2000ImageIO::Read(void * buffer) + itkDebugMacro(<< "p_end_x = " << p_end_x); + itkDebugMacro(<< "p_end_y = " << p_end_y); + +- bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, p_start_x, p_start_y, p_end_x, p_end_y); ++ bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, l_image, p_start_x, p_start_y, p_end_x, p_end_y); + + itkDebugMacro(<< "opj_set_decode_area() after"); + +@@ -508,7 +467,6 @@ JPEG2000ImageIO::Read(void * buffer) + opj_destroy_codec(this->m_Internal->m_Dinfo); + this->m_Internal->m_Dinfo = nullptr; + opj_stream_destroy(l_stream); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl + << "Reason: opj_set_decode_area returns false"); + } +@@ -525,13 +483,13 @@ JPEG2000ImageIO::Read(void * buffer) + + OPJ_UINT32 l_max_data_size = 1000; + +- bool l_go_on = true; ++ int l_go_on = true; // should be OBJ_BOOL + + auto * l_data = (OPJ_BYTE *)malloc(1000); + + while (l_go_on) + { +- bool tileHeaderRead = opj_read_tile_header(this->m_Internal->m_Dinfo, ++ bool tileHeaderRead = opj_read_tile_header(this->m_Internal->m_Dinfo, l_stream, + &l_tile_index, + &l_data_size, + &l_current_tile_x0, +@@ -539,14 +497,12 @@ JPEG2000ImageIO::Read(void * buffer) + &l_current_tile_x1, + &l_current_tile_y1, + &l_nb_comps, +- &l_go_on, +- l_stream); ++ &l_go_on); + + if (!tileHeaderRead) + { + free(l_data); + opj_stream_destroy(l_stream); +- fclose(l_file); + opj_destroy_codec(this->m_Internal->m_Dinfo); + opj_image_destroy(l_image); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl +@@ -571,7 +527,6 @@ JPEG2000ImageIO::Read(void * buffer) + if (!l_data) + { + opj_stream_destroy(l_stream); +- fclose(l_file); + opj_destroy_codec(this->m_Internal->m_Dinfo); + opj_image_destroy(l_image); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl +@@ -590,7 +545,6 @@ JPEG2000ImageIO::Read(void * buffer) + { + free(l_data); + opj_stream_destroy(l_stream); +- fclose(l_file); + opj_destroy_codec(this->m_Internal->m_Dinfo); + opj_image_destroy(l_image); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl +@@ -654,7 +608,6 @@ JPEG2000ImageIO::Read(void * buffer) + { + free(l_data); + opj_stream_destroy(l_stream); +- fclose(l_file); + opj_destroy_codec(this->m_Internal->m_Dinfo); + opj_image_destroy(l_image); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl +@@ -666,14 +619,12 @@ JPEG2000ImageIO::Read(void * buffer) + opj_destroy_codec(this->m_Internal->m_Dinfo); + this->m_Internal->m_Dinfo = nullptr; + opj_stream_destroy(l_stream); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl + << "Reason: error whle reading image"); + } + + /* close the byte stream */ + opj_stream_destroy(l_stream); +- fclose(l_file); + + if (this->m_Internal->m_Dinfo) + { +@@ -840,13 +791,13 @@ JPEG2000ImageIO ::Write(const void * buffer) + + parameters.numresolution = numberOfResolutions; + +- OPJ_COLOR_SPACE color_space = CLRSPC_GRAY; ++ OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY; + opj_image_cmptparm_t cmptparms[3]; + + if (this->GetNumberOfComponents() == 3) + { + +- color_space = (this->GetPixelType() == IOPixelEnum::RGB) ? CLRSPC_SRGB : CLRSPC_UNSPECIFIED; ++ color_space = (this->GetPixelType() == IOPixelEnum::RGB) ? OPJ_CLRSPC_SRGB : OPJ_CLRSPC_UNSPECIFIED; + + /* initialize image components */ + memset(&cmptparms[0], 0, 3 * sizeof(opj_image_cmptparm_t)); +@@ -864,7 +815,7 @@ JPEG2000ImageIO ::Write(const void * buffer) + + if (this->GetNumberOfComponents() == 1) + { +- color_space = CLRSPC_GRAY; ++ color_space = OPJ_CLRSPC_GRAY; + + /* initialize image components */ + memset(&cmptparms[0], 0, sizeof(opj_image_cmptparm_t)); +@@ -940,32 +891,32 @@ JPEG2000ImageIO ::Write(const void * buffer) + opj_codec_t * cinfo = nullptr; + if (extension == ".j2k") + { +- cinfo = opj_create_compress(CODEC_J2K); ++ cinfo = opj_create_compress(OPJ_CODEC_J2K); + if (!cinfo) + { + itkExceptionMacro("JPEG2000ImageIO failed to write file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_compress(CODEC_J2K) returns nullptr"); ++ << "Reason: opj_create_compress(OPJ_CODEC_J2K) returns nullptr"); + } + } + else if (extension == ".jp2") + { +- cinfo = opj_create_compress(CODEC_JP2); ++ cinfo = opj_create_compress(OPJ_CODEC_JP2); + if (!cinfo) + { + itkExceptionMacro("JPEG2000ImageIO failed to write file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_compress(CODEC_JP2) returns nullptr"); ++ << "Reason: opj_create_compress(OPJ_CODEC_JP2) returns nullptr"); + } + } + else if (extension == ".jpt") + { +- cinfo = opj_create_compress(CODEC_JPT); ++ cinfo = opj_create_compress(OPJ_CODEC_JPT); + if (!cinfo) + { + itkExceptionMacro("JPEG2000ImageIO failed to write file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_compress(CODEC_JPT) returns nullptr"); ++ << "Reason: opj_create_compress(OPJ_CODEC_JPT) returns nullptr"); + } + } + else +@@ -989,17 +940,9 @@ JPEG2000ImageIO ::Write(const void * buffer) + << "Reason: opj_setup_encoder returns false"); + } + +- FILE * l_file = fopen(parameters.outfile, "wb"); +- if (!l_file) +- { +- itkExceptionMacro("JPEG2000ImageIO failed to open file for writing: " << this->GetFileName() << std::endl +- << "Reason: " +- << itksys::SystemTools::GetLastSystemError()); +- } +- + /* open a byte stream for writing */ + /* allocate memory for all tiles */ +- opj_stream_t * cio = opj_stream_create_default_file_stream(l_file, false); ++ opj_stream_t * cio = opj_stream_create_default_file_stream(parameters.outfile, false); + if (!cio) + { + itkExceptionMacro("JPEG2000ImageIO failed to write file: " +@@ -1017,8 +960,7 @@ JPEG2000ImageIO ::Write(const void * buffer) + if (!bSuccess) + { + opj_stream_destroy(cio); +- fclose(l_file); +- itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl ++ itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl + << "Reason: opj_start_compress returns false"); + } + +@@ -1026,7 +968,6 @@ JPEG2000ImageIO ::Write(const void * buffer) + if (!bSuccess) + { + opj_stream_destroy(cio); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl + << "Reason: opj_encode returns false"); + } +@@ -1035,14 +976,12 @@ JPEG2000ImageIO ::Write(const void * buffer) + if (!bSuccess) + { + opj_stream_destroy(cio); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl + << "Reason: opj_end_compress returns false"); + } + + /* close and free the byte stream */ + opj_stream_destroy(cio); +- fclose(l_file); + + /* free remaining compression structures */ + opj_destroy_codec(cinfo); +diff --git a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt +index 103eaa9dd..eb8989135 100644 +--- a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt ++++ b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt +@@ -1,12 +1,25 @@ + project(ITKOpenJPEG) + set(ITKOpenJPEG_THIRD_PARTY 1) + +-set(ITKOpenJPEG_INCLUDE_DIRS +- ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg +- ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg +- ) +-set(ITKOpenJPEG_LIBRARIES itkopenjpeg) +-set(ITK_LIBRARY_PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS FALSE) ++if(ITK_USE_SYSTEM_OpenJPEG) ++ find_package(OpenJPEG REQUIRED) ++ if(TARGET openjp2) ++ set(ITKOpenJPEG_LIBRARIES ${OPENJPEG_LIBRARIES}) ++ else() ++ message(FATAL_ERROR "OpenJPEG target openjp2 missing!") ++ endif() ++ set(ITKOpenJPEG_INCLUDE_DIRS ++ ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg ++ ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg ++ ) ++else() ++ set(ITKOpenJPEG_INCLUDE_DIRS ++ ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg ++ ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg ++ ) ++ set(ITKOpenJPEG_LIBRARIES itkopenjpeg) ++ set(ITK_LIBRARY_PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS FALSE) ++endif() + + itk_module_impl() + diff --git a/ports/itk/openjpeg2.patch b/ports/itk/openjpeg2.patch new file mode 100644 index 00000000000000..86631f5f99b2db --- /dev/null +++ b/ports/itk/openjpeg2.patch @@ -0,0 +1,58 @@ +diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt +index 565cc338b..c061f0721 100644 +--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt ++++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt +@@ -194,7 +194,7 @@ mark_as_advanced(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) + # configure name mangling to allow multiple libraries to coexist + # peacefully + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in) +-set(MANGLE_PREFIX ${OPENJPEG_LIBRARY_NAME}) ++set(MANGLE_PREFIX) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in + ${CMAKE_CURRENT_BINARY_DIR}/openjpeg_mangle.h + @ONLY) +diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/CMakeLists.txt +index c4adb91a2..89b731d88 100644 +--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/CMakeLists.txt ++++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/CMakeLists.txt +@@ -3,7 +3,7 @@ include_regular_expression("^.*$") + # configure name mangling to allow multiple libraries to coexist + # peacefully + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in) +-set(MANGLE_PREFIX ${OPENJPEG_LIBRARY_NAME}) ++set(MANGLE_PREFIX) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in + ${CMAKE_CURRENT_BINARY_DIR}/openjpeg_mangle.h + @ONLY) +diff --git a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt +index 3811e52f4..a41e9264e 100644 +--- a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt ++++ b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt +@@ -8,10 +8,10 @@ if(ITK_USE_SYSTEM_OpenJPEG) + else() + message(FATAL_ERROR "OpenJPEG target openjp2 missing!") + endif() +- set(ITKOpenJPEG_INCLUDE_DIRS +- ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg +- ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg +- ) ++ # set(ITKOpenJPEG_INCLUDE_DIRS ++ # ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg ++ # ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg ++ # ) + else() + set(ITKOpenJPEG_INCLUDE_DIRS + ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg +diff --git a/Modules/ThirdParty/OpenJPEG/src/openjpeg/CMakeLists.txt b/Modules/ThirdParty/OpenJPEG/src/openjpeg/CMakeLists.txt +index e62e43eda..35dc89976 100644 +--- a/Modules/ThirdParty/OpenJPEG/src/openjpeg/CMakeLists.txt ++++ b/Modules/ThirdParty/OpenJPEG/src/openjpeg/CMakeLists.txt +@@ -68,7 +68,7 @@ CONFIGURE_FILE(${ITK3P_OpenJPEG_SOURCE_DIR}/opj_configure.h.in + # configure name mangling to allow multiple libraries to coexist + # peacefully + if(EXISTS ${ITK3P_OpenJPEG_SOURCE_DIR}/openjpeg_mangle.h.in) +-set(MANGLE_PREFIX itk) ++#set(MANGLE_PREFIX itk) + configure_file(${ITK3P_OpenJPEG_SOURCE_DIR}/openjpeg_mangle.h.in + ${ITK3P_OpenJPEG_BINARY_DIR}/openjpeg_mangle.h + @ONLY) diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index e0ebaaecfa232e..8961379a5a66cc 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -1,29 +1,122 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() +vcpkg_buildpath_length_warning(37) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO InsightSoftwareConsortium/ITK - REF v5.0.1 - SHA512 242ce66cf83f82d26f20d2099108295e28c8875e7679126ba023834bf0e94454460ba86452a94c8ddaea93d2314befc399f2b151d7294370d4b47f0e9798e77f + REF d3286c9cc04ba16cc8f73de9a98fbcd7c02f3c7b + SHA512 c358449870d580aeb10e32f8be0ca39e8a76d8dc06fda973788fafb5971333e546611c399190be49d40f5f3c18a1105d9699eef271a560aff25ce168a396926e HEAD_REF master PATCHES - fix_openjpeg_search.patch - fix_libminc_config_path.patch + hdf5.patch + double-conversion.patch + openjpeg.patch + openjpeg2.patch + var_libraries.patch + wrapping.patch + python_gpu_wrapping.patch + opencl.patch + cufftw.patch + use-the-lrintf-intrinsic.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "vtk" Module_ITKVtkGlue + "cuda" Module_ITKCudaCommon # Requires RTK? + #"cuda" CUDA_HAVE_GPU # Automatically set by FindCUDA? + "cufftw" ITK_USE_CUFFTW + "opencl" ITK_USE_GPU + "tbb" Module_ITKTBB + "rtk" Module_RTK + "tools" RTK_BUILD_APPLICATIONS + # There are a lot of more (remote) modules and options in ITK + # feel free to add those as a feature ) -if ("vtk" IN_LIST FEATURES) - set(ITKVtkGlue ON) -else() - set(ITKVtkGlue OFF) +if("cufftw" IN_LIST FEATURES) + # Alternativly set CUFFT_LIB and CUFFTW_LIB + if(WIN32) + file(TO_CMAKE_PATH "$ENV{CUDA_PATH}" CUDA_PATH) + set(CUDA_LIB_PATH "${CUDA_PATH}") + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + string(APPEND CUDA_LIB_PATH "/lib/x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + string(APPEND CUDA_LIB_PATH "/lib/Win32") + message(FATAL_ERROR "CUFFTW is not supported on architecture ${VCPKG_TARGET_ARCHITECTURE}") + else() + message(FATAL_ERROR "Architecture ${VCPKG_TARGET_ARCHITECTURE} not supported !") + endif() + + list(APPEND ADDITIONAL_OPTIONS + "-DFFTW_LIB_SEARCHPATH=${CUDA_LIB_PATH}" + "-DFFTW_INCLUDE_PATH=${CUDA_PATH}/include" + "-DCUFFTW_INCLUDE_PATH=${CUDA_PATH}/include" + ) + endif() +endif() + +if("rtk" IN_LIST FEATURES) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + message(FATAL_ERROR "RTK is not supported on architecture ${VCPKG_TARGET_ARCHITECTURE}") + endif() + SET(BUILD_RTK ON) + list(APPEND ADDITIONAL_OPTIONS + "-DModule_RTK_GIT_TAG=8099212f715231d093f7d6a1114daecf45d871ed" # RTK latest versions (11.05.2020) + ) + if("cuda" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS "-DRTK_USE_CUDA=ON") + #RTK + CUDA + PYTHON + dynamic library linkage will fail and needs upstream fixes. + endif() +endif() +file(REMOVE_RECURSE "${SOURCE_PATH}/Modules/Remote/RTK") + +if("opencl" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS # Wrapping options required by OpenCL if build with Python Wrappers + -DITK_WRAP_unsigned_long_long=ON + -DITK_WRAP_signed_long_long=ON + ) +endif() +if("tools" IN_LIST FEATURES) + + if("rtk" IN_LIST FEATURES) + list(APPEND TOOL_NAMES rtkadmmtotalvariation rtkadmmwavelets rtkamsterdamshroud rtkbackprojections rtkbioscangeometry rtkcheckimagequality rtkconjugategradient + rtkdigisensgeometry rtkdrawgeometricphantom rtkdrawshepploganphantom rtkdualenergysimplexdecomposition rtkelektasynergygeometry rtkextractphasesignal + rtkextractshroudsignal rtkfdk rtkfdktwodweights rtkfieldofview rtkforwardprojections rtkfourdconjugategradient rtkfourdfdk rtkfourdrooster rtkfourdsart + rtkgaincorrection rtki0estimation rtkimagxgeometry rtkiterativefdk rtklagcorrection rtklastdimensionl0gradientdenoising rtklut rtkmaskcollimation rtkmcrooster + rtkmotioncompensatedfourdconjugategradient rtkorageometry rtkosem rtkoverlayphaseandshroud rtkparkershortscanweighting rtkprojectgeometricphantom + rtkprojectionmatrix rtkprojections rtkprojectshepploganphantom rtkramp rtkrayboxintersection rtkrayquadricintersection rtkregularizedconjugategradient + rtksart rtkscatterglarecorrection rtksimulatedgeometry rtkspectraldenoiseprojections rtkspectralforwardmodel rtkspectralonestep rtkspectralrooster rtkspectralsimplexdecomposition + rtksubselect rtktotalnuclearvariationdenoising rtktotalvariationdenoising rtktutorialapplication rtkvarianobigeometry rtkvarianprobeamgeometry rtkvectorconjugategradient + rtkwangdisplaceddetectorweighting rtkwarpedbackprojectsequence rtkwarpedforwardprojectsequence rtkwaveletsdenoising rtkxradgeometry) + endif() +endif() +if("vtk" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + list(APPEND ADDITIONAL_OPTIONS + "-DPython3_EXECUTABLE:PATH=${PYTHON3}" # Required by mvtk if vtk[python] was build + ) +endif() +if("python" IN_LIST FEATURES) + message(STATUS "${PORT} builds a long time (>1h) with python wrappers enabled!") + vcpkg_find_acquire_program(PYTHON3) + vcpkg_find_acquire_program(SWIG) # Swig is only required for wrapping! + get_filename_component(SWIG_DIR "${SWIG}" DIRECTORY) + list(APPEND ADDITIONAL_OPTIONS + -DITK_WRAP_PYTHON=ON + -DPython3_FIND_REGISTRY=NEVER + "-DPython3_EXECUTABLE:PATH=${PYTHON3}" # Required by more than one feature + "-DSWIG_EXECUTABLE=${SWIG}" + "-DSWIG_DIR=${SWIG_DIR}" + ) + #ITK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages within vcpkg +endif() + +set(USE_64BITS_IDS OFF) +if (VCPKG_TARGET_ARCHITECTURE STREQUAL x64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(USE_64BITS_IDS ON) endif() +file(REMOVE_RECURSE "${SOURCE_PATH}/CMake/FindOpenCL.cmake") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -31,11 +124,14 @@ vcpkg_configure_cmake( OPTIONS -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF + -DBUILD_PKGCONFIG_FILES=OFF + -DITK_DOXYGEN_HTML=OFF -DDO_NOT_INSTALL_ITK_TEST_DRIVER=ON + -DITK_SKIP_PATH_LENGTH_CHECKS=ON -DITK_INSTALL_DATA_DIR=share/itk/data -DITK_INSTALL_DOC_DIR=share/itk/doc -DITK_INSTALL_PACKAGE_DIR=share/itk - -DITK_USE_64BITS_IDS=ON + -DITK_USE_64BITS_IDS=${USE_64BITS_IDS} -DITK_USE_CONCEPT_CHECKING=ON #-DITK_USE_SYSTEM_LIBRARIES=ON # enables USE_SYSTEM for all third party libraries, some of which do not have vcpkg ports such as CastXML, SWIG, MINC etc -DITK_USE_SYSTEM_DOUBLECONVERSION=ON @@ -45,31 +141,58 @@ vcpkg_configure_cmake( -DITK_USE_SYSTEM_TIFF=ON -DITK_USE_SYSTEM_ZLIB=ON -DITK_USE_SYSTEM_EIGEN=ON - # This should be turned on some day, however for now ITK does download specific versions so it shouldn't spontaneously break - -DITK_FORBID_DOWNLOADS=OFF + -DITK_USE_SYSTEM_FFTW=ON + -DITK_USE_SYSTEM_HDF5=ON # HDF5 was problematic in the past and still is. ITK still has not figured out how to do it correctly! + -DITK_USE_SYSTEM_GDCM=ON + -DITK_USE_SYSTEM_OpenJPEG=ON # Added by VCPKG + -DITK_USE_SYSTEM_DCMTK=ON + -DDCMTK_USE_ICU=ON + -DITK_USE_SYSTEM_ICU=ON + #-DITK_USE_SYSTEM_VXL=ON + #-DITK_USE_SYSTEM_CASTXML=ON # needs to be added to vcpkg_find_acquire_program https://data.kitware.com/api/v1/file/hashsum/sha512/b8b6f0aff11fe89ab2fcd1949cc75f2c2378a7bc408827a004396deb5ff5a9976bffe8a597f8db1b74c886ea39eb905e610dce8f5bd7586a4d6c196d7349da8d/download + -DITK_USE_SYSTEM_MINC=ON + -DITK_USE_SYSTEM_SWIG=ON + -DITK_FORBID_DOWNLOADS=OFF # This should be turned on some day, however for now ITK does download specific versions so it shouldn't spontaneously break. Remote Modules would probably break with this! + -DINSTALL_GTEST=OFF + -DITK_USE_SYSTEM_GOOGLETEST=ON + -DEXECUTABLE_OUTPUT_PATH=tools/${PORT} - -DITK_SKIP_PATH_LENGTH_CHECKS=ON + # TODO + #-DVXL_USE_GEOTIFF=ON + -DVXL_USE_LFS=ON - # I haven't tried Python wrapping in vcpkg - #-DITK_WRAP_PYTHON=ON - #-DITK_PYTHON_VERSION=3 + -DITK_MINIMUM_COMPLIANCE_LEVEL:STRING=1 # To Display all remote modules within cmake-gui + #-DModule_IOSTL=ON # example how to turn on a non-default module + #-DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module + #-DModule_RLEImage=ON # example how to turn on a remote module - -DITK_USE_SYSTEM_HDF5=ON # HDF5 was problematic in the past - -DModule_ITKVtkGlue=${ITKVtkGlue} # optional feature + # Some additional wraping options + #-DITK_WRAP_double=ON + #-DITK_WRAP_complex_double=ON + #-DITK_WRAP_covariant_vector_double=ON + #-DITK_WRAP_vector_double=ON - -DModule_IOSTL=ON # example how to turn on a non-default module - -DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module - -DModule_RLEImage=ON # example how to turn on a remote module - -DGDCM_USE_SYSTEM_OPENJPEG=ON #Use port openjpeg instead of own third-party + ${FEATURE_OPTIONS} ${ADDITIONAL_OPTIONS} -) + OPTIONS_DEBUG ${OPTIONS_DEBUG} + OPTIONS_RELEASE ${OPTIONS_RELEASE} +) +if(BUILD_RTK) # Remote Modules are only downloaded on configure. + # TODO: In the future try to download via vcpkg_from_github and move the files. That way patching does not need this workaround + vcpkg_apply_patches(SOURCE_PATH "${SOURCE_PATH}/Modules/Remote/RTK" QUIET PATCHES rtk/already_defined.patch rtk/unresolved.patch) +endif() vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() +if(TOOL_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/itk/python_gpu_wrapping.patch b/ports/itk/python_gpu_wrapping.patch new file mode 100644 index 00000000000000..37367d979e0fb8 --- /dev/null +++ b/ports/itk/python_gpu_wrapping.patch @@ -0,0 +1,178 @@ +diff --git a/CMake/itkOpenCL.cmake b/CMake/itkOpenCL.cmake +index 0ccbe144d..fa381524f 100644 +--- a/CMake/itkOpenCL.cmake ++++ b/CMake/itkOpenCL.cmake +@@ -48,7 +48,7 @@ if(ITK_USE_GPU) + ) + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE} + PROPERTIES GENERATED ON) +- set(${SRC_VAR} ${${SRC_VAR}} ${OUTPUT_FILE}) ++ set(${SRC_VAR} ${${SRC_VAR}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}) + endmacro() + + macro(write_gpu_kernels GPUKernels GPU_SRC) +diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h +index 1816f722a..3a6a8aee5 100644 +--- a/Modules/Core/Common/include/itkMacro.h ++++ b/Modules/Core/Common/include/itkMacro.h +@@ -1141,7 +1141,7 @@ compilers. + #define itkGetVectorMacro(name, type, count) \ + virtual type * Get##name() const { return this->m_##name; } + +-/**\def itkGPUKernelClassMacro ++/**\def class itkGPUKernelClassMacro + * Construct a non-templatized helper class that + * provides the GPU kernel source code as a const char* + */ +@@ -1150,7 +1150,7 @@ compilers. + * Workaround KWstyle bug \ \ + * \ingroup ITKCommon \ \ + */ \ +- class kernel \ ++ kernel \ + { \ + public: \ + static const char * \ +diff --git a/Modules/Core/GPUCommon/include/itkGPUImageOps.h b/Modules/Core/GPUCommon/include/itkGPUImageOps.h +index f4eb8f33b..fbdf3d757 100644 +--- a/Modules/Core/GPUCommon/include/itkGPUImageOps.h ++++ b/Modules/Core/GPUCommon/include/itkGPUImageOps.h +@@ -23,7 +23,7 @@ + namespace itk + { + /** Create a helper GPU Kernel class for GPUImageOps */ +-itkGPUKernelClassMacro(GPUImageOpsKernel); ++class itkGPUKernelClassMacro(GPUImageOpsKernel); + + /** \class GPUImageOps + * +diff --git a/Modules/Core/GPUCommon/include/itkGPUReduction.h b/Modules/Core/GPUCommon/include/itkGPUReduction.h +index 524a5cd01..1b3ce91e9 100644 +--- a/Modules/Core/GPUCommon/include/itkGPUReduction.h ++++ b/Modules/Core/GPUCommon/include/itkGPUReduction.h +@@ -26,7 +26,7 @@ + namespace itk + { + /** Create a helper GPU Kernel class for GPUReduction */ +-itkGPUKernelClassMacro(GPUReductionKernel); ++class itkGPUKernelClassMacro(GPUReductionKernel); + + /** + * \class GPUReduction +diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h +index 853801cec..2fccf0bc5 100644 +--- a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h ++++ b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h +@@ -24,7 +24,7 @@ + namespace itk + { + /** Create a helper GPU Kernel class for GPUDenseFiniteDifferenceImageFilter */ +-itkGPUKernelClassMacro(GPUDenseFiniteDifferenceImageFilterKernel); ++class ITKGPUFiniteDifference_EXPORT itkGPUKernelClassMacro(GPUDenseFiniteDifferenceImageFilterKernel); + + /** + * \class GPUDenseFiniteDifferenceImageFilter +diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h +index 4245ff914..1b21b709e 100644 +--- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h ++++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h +@@ -54,7 +54,7 @@ namespace itk + */ + + /** Create a helper GPU Kernel class for GPUGradientNDAnisotropicDiffusionFunction */ +-itkGPUKernelClassMacro(GPUGradientNDAnisotropicDiffusionFunctionKernel); ++class itkGPUKernelClassMacro(GPUGradientNDAnisotropicDiffusionFunctionKernel); + + template + class ITK_TEMPLATE_EXPORT GPUGradientNDAnisotropicDiffusionFunction +diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h +index 305f6490e..d0d433080 100644 +--- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h ++++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h +@@ -32,7 +32,7 @@ namespace itk + * */ + + /** Create a helper GPU Kernel class for GPUScalarAnisotropicDiffusionFunction */ +-itkGPUKernelClassMacro(GPUScalarAnisotropicDiffusionFunctionKernel); ++class itkGPUKernelClassMacro(GPUScalarAnisotropicDiffusionFunctionKernel); + + template + class ITK_TEMPLATE_EXPORT GPUScalarAnisotropicDiffusionFunction : public GPUAnisotropicDiffusionFunction +diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h b/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h +index 23530ac5c..e1b83f696 100644 +--- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h ++++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h +@@ -29,7 +29,7 @@ namespace itk + { + + /** Create a helper GPU Kernel class for GPUCastImageFilter */ +-itkGPUKernelClassMacro(GPUCastImageFilterKernel); ++class itkGPUKernelClassMacro(GPUCastImageFilterKernel); + + /** \class GPUCastImageFilter + * \brief GPU version of CastImageFilter. +diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h +index c4adc2967..69aeac6db 100644 +--- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h ++++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h +@@ -41,7 +41,7 @@ namespace itk + */ + + /** Create a helper GPU Kernel class for GPUNeighborhoodOperatorImageFilter */ +-itkGPUKernelClassMacro(GPUNeighborhoodOperatorImageFilterKernel); ++class itkGPUKernelClassMacro(GPUNeighborhoodOperatorImageFilterKernel); + + template + class ITK_TEMPLATE_EXPORT GPUMeanImageFilter +diff --git a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h +index 8d26dcfc5..613bc623f 100644 +--- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h ++++ b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h +@@ -85,7 +85,7 @@ private: + } // end of namespace Functor + + /** Create a helper GPU Kernel class for GPUBinaryThresholdImageFilter */ +-itkGPUKernelClassMacro(GPUBinaryThresholdImageFilterKernel); ++class itkGPUKernelClassMacro(GPUBinaryThresholdImageFilterKernel); + + /** + * \class GPUBinaryThresholdImageFilter +diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h +index 28b21d592..0b46e27b8 100644 +--- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h ++++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h +@@ -51,7 +51,7 @@ namespace itk + * \ingroup ITKGPUPDEDeformableRegistration + */ + /** Create a helper GPU Kernel class for GPUDemonsRegistrationFunction */ +-itkGPUKernelClassMacro(GPUDemonsRegistrationFunctionKernel); ++class itkGPUKernelClassMacro(GPUDemonsRegistrationFunctionKernel); + + template + class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction +diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h +index 93ab975ec..0afd84871 100644 +--- a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h ++++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h +@@ -73,7 +73,7 @@ namespace itk + */ + + /** Create a helper GPU Kernel class for GPUPDEDeformableRegistrationFilter */ +-itkGPUKernelClassMacro(GPUPDEDeformableRegistrationFilterKernel); ++class itkGPUKernelClassMacro(GPUPDEDeformableRegistrationFilterKernel); + + template + ++#include "RTKExport.h" + #include "rtkMacro.h" + + namespace rtk +@@ -67,25 +68,18 @@ public: + * with the i-th matrix provides the physical coordinate on + * the i-th projection. + */ +- const std::vector & +- GetMatrices() const +- { +- return this->m_Matrices; +- } ++ itkGetConstReferenceMacro(Matrices,std::vector) + + /** Get the i-th projection matrix. */ + MatrixType +- GetMatrix(const unsigned int i) const +- { +- return this->m_Matrices[i]; +- } ++ GetMatrix(const unsigned int i) const; + + /** Empty the geometry object. */ + virtual void + Clear(); + + protected: +- ProjectionGeometry() = default; ++ ProjectionGeometry(); + ~ProjectionGeometry() override = default; + + void +@@ -93,11 +87,7 @@ protected: + + /** Add projection matrix */ + virtual void +- AddMatrix(const MatrixType & m) +- { +- this->m_Matrices.push_back(m); +- this->Modified(); +- } ++ AddMatrix(const MatrixType & m); + + private: + /** Projection matrices */ +@@ -105,6 +95,9 @@ private: + }; + } // namespace rtk + +-#include "rtkProjectionGeometry.hxx" ++#ifndef ITK_MANUAL_INSTANTIATION ++# include "rtkProjectionGeometry.hxx" ++#endif ++ + + #endif // rtkProjectionGeometry_h +diff --git a/include/rtkProjectionGeometry.hxx b/include/rtkProjectionGeometry.hxx +index 192265812..97dfe8c3a 100644 +--- a/include/rtkProjectionGeometry.hxx ++++ b/include/rtkProjectionGeometry.hxx +@@ -23,6 +23,8 @@ + + namespace rtk + { ++template ++ProjectionGeometry::ProjectionGeometry() = default; + + template + void +@@ -43,6 +45,21 @@ ProjectionGeometry::Clear() + this->Modified(); + } + ++template ++typename ProjectionGeometry::MatrixType ++ProjectionGeometry::GetMatrix(const unsigned int i) const ++{ ++ return this->m_Matrices[i]; ++} ++ ++template ++void ++ProjectionGeometry::AddMatrix(const typename ProjectionGeometry::MatrixType & m) ++{ ++ this->m_Matrices.push_back(m); ++ this->Modified(); ++} ++ + } // namespace rtk + + #endif // rtkProjectionGeometry_hxx diff --git a/ports/itk/rtk/unresolved.patch b/ports/itk/rtk/unresolved.patch new file mode 100644 index 00000000000000..e2209ec7574070 --- /dev/null +++ b/ports/itk/rtk/unresolved.patch @@ -0,0 +1,213 @@ +diff --git a/include/rtkDCMImagXImageIO.h b/include/rtkDCMImagXImageIO.h +index 2a70ae046..69abb409e 100644 +--- a/include/rtkDCMImagXImageIO.h ++++ b/include/rtkDCMImagXImageIO.h +@@ -18,7 +18,7 @@ + + #ifndef rtkDCMImagXImageIO_h + #define rtkDCMImagXImageIO_h +- ++#include "RTKExport.h" + #include + + #include "rtkMacro.h" +@@ -32,7 +32,7 @@ namespace rtk + * + * \ingroup RTK + */ +-class DCMImagXImageIO : public itk::GDCMImageIO ++class RTK_EXPORT DCMImagXImageIO : public itk::GDCMImageIO + { + public: + ITK_DISALLOW_COPY_AND_ASSIGN(DCMImagXImageIO); +diff --git a/include/rtkEdfImageIO.h b/include/rtkEdfImageIO.h +index 66499c56b..7b16fbc5a 100644 +--- a/include/rtkEdfImageIO.h ++++ b/include/rtkEdfImageIO.h +@@ -18,7 +18,7 @@ + + #ifndef rtkEdfImageIO_h + #define rtkEdfImageIO_h +- ++#include "RTKExport.h" + #include + #include + #include +@@ -36,7 +36,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class EdfImageIO : public itk::ImageIOBase ++class RTK_EXPORT EdfImageIO : public itk::ImageIOBase + { + public: + ITK_DISALLOW_COPY_AND_ASSIGN(EdfImageIO); +diff --git a/include/rtkHisImageIO.h b/include/rtkHisImageIO.h +index 2ef2005dd..95449b8a6 100644 +--- a/include/rtkHisImageIO.h ++++ b/include/rtkHisImageIO.h +@@ -19,6 +19,8 @@ + #ifndef rtkHisImageIO_h + #define rtkHisImageIO_h + ++#include "RTKExport.h" ++ + // itk include + #include + #include "rtkMacro.h" +@@ -35,7 +37,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class HisImageIO : public itk::ImageIOBase ++class RTK_EXPORT HisImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkHncImageIO.h b/include/rtkHncImageIO.h +index 7b9539bde..dc9dca759 100644 +--- a/include/rtkHncImageIO.h ++++ b/include/rtkHncImageIO.h +@@ -19,9 +19,11 @@ + #ifndef rtkHncImageIO_h + #define rtkHncImageIO_h + ++#include "RTKExport.h" ++ + // itk include + #include +-#include "itksys/SystemTools.hxx" ++//#include "itksys/SystemTools.hxx" + + #if defined(_MSC_VER) && (_MSC_VER < 1600) + // SR: taken from +@@ -43,7 +45,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class HncImageIO : public itk::ImageIOBase ++class RTK_EXPORT HncImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkHncImageIOFactory.h b/include/rtkHncImageIOFactory.h +index 2bca8f77e..1d5a97938 100644 +--- a/include/rtkHncImageIOFactory.h ++++ b/include/rtkHncImageIOFactory.h +@@ -38,7 +38,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class HncImageIOFactory : public itk::ObjectFactoryBase ++class RTK_EXPORT HncImageIOFactory : public itk::ObjectFactoryBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkHndImageIO.h b/include/rtkHndImageIO.h +index 5a07897cc..5f843362a 100644 +--- a/include/rtkHndImageIO.h ++++ b/include/rtkHndImageIO.h +@@ -19,6 +19,8 @@ + #ifndef rtkHndImageIO_h + #define rtkHndImageIO_h + ++#include "RTKExport.h" ++ + // itk include + #include + +@@ -43,7 +45,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class HndImageIO : public itk::ImageIOBase ++class RTK_EXPORT HndImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkImagXImageIO.h b/include/rtkImagXImageIO.h +index d69e9a790..d6cc8388e 100644 +--- a/include/rtkImagXImageIO.h ++++ b/include/rtkImagXImageIO.h +@@ -18,7 +18,7 @@ + + #ifndef rtkImagXImageIO_h + #define rtkImagXImageIO_h +- ++#include "RTKExport.h" + #include + #include + #include +@@ -34,7 +34,7 @@ namespace rtk + * + * \ingroup RTK + */ +-class ImagXImageIO : public itk::ImageIOBase ++class RTK_EXPORT ImagXImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkOraImageIO.h b/include/rtkOraImageIO.h +index ece525a42..2d5332872 100644 +--- a/include/rtkOraImageIO.h ++++ b/include/rtkOraImageIO.h +@@ -19,6 +19,8 @@ + #ifndef rtkOraImageIO_h + #define rtkOraImageIO_h + ++#include "RTKExport.h" ++ + // This is done to avoid any interference with zlib + #ifdef OF + # undef OF +@@ -41,7 +43,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class OraImageIO : public itk::MetaImageIO ++class RTK_EXPORT OraImageIO : public itk::MetaImageIO + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkXRadImageIO.h b/include/rtkXRadImageIO.h +index a72c934e4..0a92afa22 100644 +--- a/include/rtkXRadImageIO.h ++++ b/include/rtkXRadImageIO.h +@@ -19,6 +19,7 @@ + #ifndef rtkXRadImageIO_h + #define rtkXRadImageIO_h + ++#include "RTKExport.h" + #include + #include + #include +@@ -37,7 +38,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class XRadImageIO : public itk::ImageIOBase ++class RTK_EXPORT XRadImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkXimImageIO.h b/include/rtkXimImageIO.h +index ae789dbf9..741f05183 100644 +--- a/include/rtkXimImageIO.h ++++ b/include/rtkXimImageIO.h +@@ -19,6 +19,7 @@ + #ifndef rtkXimImageIO_h + #define rtkXimImageIO_h + ++#include "RTKExport.h" + #include "rtkMacro.h" + + // itk include +@@ -43,7 +44,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class XimImageIO : public itk::ImageIOBase ++class RTK_EXPORT XimImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ diff --git a/ports/itk/use-the-lrintf-intrinsic.patch b/ports/itk/use-the-lrintf-intrinsic.patch new file mode 100644 index 00000000000000..27df6cd9b21f72 --- /dev/null +++ b/ports/itk/use-the-lrintf-intrinsic.patch @@ -0,0 +1,15 @@ +diff --git a/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h b/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h +index e75a220d4d..4b13e1726a 100644 +--- a/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h ++++ b/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h +@@ -87,8 +87,8 @@ Most compilers implement their own version of this keyword ... + #endif + #endif + +-/* MSVC and Borland C do not have lrintf */ +-#if defined(_MSC_VER) || defined(__BORLANDC__) ++/* MSVC pre 16.8 and Borland C do not have lrintf */ ++#if (defined(_MSC_VER) && _MSC_VER < 1928) || defined(__BORLANDC__) + + /* MSVC 64bits doesn't support _asm */ + #if !defined(_WIN64) diff --git a/ports/itk/var_libraries.patch b/ports/itk/var_libraries.patch new file mode 100644 index 00000000000000..738fa980f131ca --- /dev/null +++ b/ports/itk/var_libraries.patch @@ -0,0 +1,27 @@ +diff --git a/CMake/ITKModuleMacros.cmake b/CMake/ITKModuleMacros.cmake +index da9f3a902..60420bb0a 100644 +--- a/CMake/ITKModuleMacros.cmake ++++ b/CMake/ITKModuleMacros.cmake +@@ -162,9 +162,6 @@ macro(itk_module_impl) + foreach(dep IN LISTS ITK_MODULE_${itk-module}_DEPENDS) + list(APPEND ${itk-module}_LIBRARIES "${${dep}_LIBRARIES}") + endforeach() +- if(${itk-module}_LIBRARIES) +- list(REMOVE_DUPLICATES ${itk-module}_LIBRARIES) +- endif() + endif() + + if(EXISTS ${${itk-module}_SOURCE_DIR}/include) +diff --git a/CMake/ITKModuleAPI.cmake b/CMake/ITKModuleAPI.cmake +index af64d96dc..809335e6d 100644 +--- a/CMake/ITKModuleAPI.cmake ++++ b/CMake/ITKModuleAPI.cmake +@@ -133,7 +133,7 @@ macro(itk_module_config ns) + endforeach() + unset(_${ns}_USED_MODULES) + +- foreach(v ${ns}_LIBRARIES ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS ++ foreach(v ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS + ${ns}_RUNTIME_LIBRARY_DIRS ${ns}_FACTORY_NAMES ${ns}_FACTORY_LIST) + if(${v}) + list(REMOVE_DUPLICATES ${v}) diff --git a/ports/itk/vcpkg.json b/ports/itk/vcpkg.json new file mode 100644 index 00000000000000..394b45afba00f2 --- /dev/null +++ b/ports/itk/vcpkg.json @@ -0,0 +1,98 @@ +{ + "name": "itk", + "version-string": "5.1.0", + "port-version": 5, + "description": "Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.", + "homepage": "https://github.com/InsightSoftwareConsortium/ITK", + "dependencies": [ + "double-conversion", + "eigen3", + "expat", + { + "name": "fftw3", + "default-features": false + }, + "gdcm", + "gtest", + { + "name": "hdf5", + "default-features": false, + "features": [ + "cpp" + ] + }, + "icu", + "libjpeg-turbo", + "libpng", + "minc", + { + "name": "openjpeg", + "default-features": false + }, + "tiff", + "zlib" + ], + "features": { + "cuda": { + "description": "Build CUDA module", + "dependencies": [ + "cuda", + { + "name": "itk", + "default-features": false, + "features": [ + "opencl" + ] + } + ] + }, + "cufftw": { + "description": "Use CUDA FFTW", + "dependencies": [ + "cuda" + ] + }, + "opencl": { + "description": "Use OpenCL", + "dependencies": [ + "opencl" + ] + }, + "python": { + "description": "Python functionality for ITK", + "dependencies": [ + "python3" + ] + }, + "rtk": { + "description": "Build RTK Module" + }, + "tbb": { + "description": "Build TBB Module", + "dependencies": [ + "tbb" + ] + }, + "tools": { + "description": "Build RTK with tools", + "dependencies": [ + { + "name": "itk", + "default-features": false, + "features": [ + "rtk" + ] + } + ] + }, + "vtk": { + "description": "Build ITKVtkGlue module.", + "dependencies": [ + { + "name": "vtk", + "default-features": false + } + ] + } + } +} diff --git a/ports/itk/wrapping.patch b/ports/itk/wrapping.patch new file mode 100644 index 00000000000000..1e2e531504eb23 --- /dev/null +++ b/ports/itk/wrapping.patch @@ -0,0 +1,19 @@ +diff --git a/Wrapping/TypedefMacros.cmake b/Wrapping/TypedefMacros.cmake +index e6f8d0bf3..6c000dba8 100644 +--- a/Wrapping/TypedefMacros.cmake ++++ b/Wrapping/TypedefMacros.cmake +@@ -57,13 +57,12 @@ macro(itk_wrap_module library_name) + + # WRAPPER_LIBRARY_DEPENDS. List of names of other wrapper libraries that + # define symbols used by this wrapper library. + INTERSECTION(WRAPPER_LIBRARY_DEPENDS "${ITK_MODULE_${library_name}_DEPENDS}" "${WRAP_ITK_MODULES}") + # set(WRAPPER_LIBRARY_DEPENDS ${ITK_MODULE_${library_name}_DEPENDS}) + + # WRAPPER_LIBRARY_LINK_LIBRARIES. List of other libraries that should + # be linked to the wrapper library. +- set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES} ${${itk-module}_LIBRARIES}) +- ++ set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES} ${${library_name}_LIBRARIES}) + # WRAPPER_SUBMODULE_ORDER. List of *.wrap submodules in the source dir + # that should be included/wrapped before the rest in the given order. + # Just the submodule group name is needed, not the full path or file name. diff --git a/ports/itpp/CONTROL b/ports/itpp/CONTROL deleted file mode 100644 index 95a49293b225b8..00000000000000 --- a/ports/itpp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: itpp -Version: 4.3.1-1 -Description: IT++ is a C++ library of mathematical, signal processing and communication classes and functions. Its main use is in simulation of communication systems and for performing research in the area of communications. \ No newline at end of file diff --git a/ports/itpp/portfile.cmake b/ports/itpp/portfile.cmake index 84fc651e4332a1..a87cedcb7db359 100644 --- a/ports/itpp/portfile.cmake +++ b/ports/itpp/portfile.cmake @@ -1,25 +1,26 @@ -include(vcpkg_common_functions) - set(ITPP_VERSION 4.3.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/itpp/files/itpp/${ITPP_VERSION}/itpp-${ITPP_VERSION}.tar.bz2" - FILENAME "itpp-${ITPP_VERSION}.tar.bz2" - SHA512 b46d048fa7f33e80d2291a5e38e205c159791ea200f92c70d69e8ad8447ac2f0c847fece566a99af739853a1643cb16e226b4200c8bf115417f324e6d38c66bd -) -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + REPO itpp/itpp REF ${ITPP_VERSION} + FILENAME "itpp-${ITPP_VERSION}.tar.bz2" + SHA512 b46d048fa7f33e80d2291a5e38e205c159791ea200f92c70d69e8ad8447ac2f0c847fece566a99af739853a1643cb16e226b4200c8bf115417f324e6d38c66bd PATCHES - msvc2013.patch - fix-uwp.patch - fix-linux.patch + msvc2013.patch + fix-uwp.patch + fix-linux.patch + rename-version.patch ) +file(RENAME "${SOURCE_PATH}/VERSION" "${SOURCE_PATH}/VERSION.txt") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_LAPACK=ON + -DCMAKE_DISABLE_FIND_PACKAGE_FFT=ON + -DCMAKE_DISABLE_FIND_PACKAGE_BLAS=ON ) vcpkg_install_cmake() diff --git a/ports/itpp/rename-version.patch b/ports/itpp/rename-version.patch new file mode 100644 index 00000000000000..0750ed4cebe6e7 --- /dev/null +++ b/ports/itpp/rename-version.patch @@ -0,0 +1,12 @@ +--- a/autogen.sh ++++ b/autogen.sh +@@ -25,6 +25,6 @@ + +-PV=$(cat VERSION | cut -d' ' -f1) +-LV=$(cat VERSION | cut -d' ' -f2) +-if test "x$(cat VERSION | cut -d' ' -f3)" = "xsvn"; then ++PV=$(cat VERSION.txt | cut -d' ' -f1) ++LV=$(cat VERSION.txt | cut -d' ' -f2) ++if test "x$(cat VERSION.txt | cut -d' ' -f3)" = "xsvn"; then + if test -d ".git/svn"; then + REV=$(LC_ALL=C git svn find-rev HEAD) diff --git a/ports/itpp/vcpkg.json b/ports/itpp/vcpkg.json new file mode 100644 index 00000000000000..00ac96b67f2f3f --- /dev/null +++ b/ports/itpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "itpp", + "version-semver": "4.3.1", + "port-version": 7, + "description": "IT++ is a C++ library of mathematical, signal processing and communication classes and functions. Its main use is in simulation of communication systems and for performing research in the area of communications.", + "homepage": "http://itpp.sourceforge.net" +} diff --git a/ports/ixwebsocket/CONTROL b/ports/ixwebsocket/CONTROL deleted file mode 100644 index 98b64cd28d50d4..00000000000000 --- a/ports/ixwebsocket/CONTROL +++ /dev/null @@ -1,21 +0,0 @@ -Source: ixwebsocket -Version: 4.0.3 -Build-Depends: zlib -Description: Lightweight WebSocket Client and Server + HTTP Client -Default-Features: ssl - -Feature: ssl -Build-Depends: ixwebsocket[openssl] (!uwp&!windows&!osx), ixwebsocket[mbedtls] (windows), ixwebsocket[mbedtls] (uwp), ixwebsocket[sectransp] (osx) -Description: Default SSL backend - -# SSL backends -Feature: openssl -Build-Depends: openssl -Description: SSL support (OpenSSL) - -Feature: mbedtls -Build-Depends: mbedtls -Description: SSL support (mbedTLS) - -Feature: sectransp -Description: SSL support (sectransp) diff --git a/ports/ixwebsocket/portfile.cmake b/ports/ixwebsocket/portfile.cmake index b4beeed9b655a0..aa666b17e859c1 100644 --- a/ports/ixwebsocket/portfile.cmake +++ b/ports/ixwebsocket/portfile.cmake @@ -1,24 +1,35 @@ -include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO machinezone/IXWebSocket - REF v4.0.3 - SHA512 41cda81ef28ae2a51d77bf09158f4c07350f22b17ed4b6645a87c7defd2a901b7656de260bc785c42990ddbea0ab23ad6e099694d2712537de0ca328aee8e229 + REF 2149ac7ed60d7713a86446c4b93c6004f66415ac #v11.2.6 + SHA512 737667f6e89156168db771fd2a6d3686cd51ddc753fa083ae399a84c689770a09fd86643bb2d838e9ae5a729067236f1d9b4ceece912145cfb83b29541a3d2c1 ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openssl USE_OPEN_SSL + mbedtls USE_MBED_TLS + sectransp USE_SECURE_TRANSPORT +) + +if("sectransp" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "sectransp is not supported on non-Apple platforms") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DUSE_TLS=1 + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DUSE_TLS=1 ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ixwebsocket) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ixwebsocket RENAME copyright) - -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME ixwebsocket) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ixwebsocket/vcpkg.json b/ports/ixwebsocket/vcpkg.json new file mode 100644 index 00000000000000..8a27789acb9758 --- /dev/null +++ b/ports/ixwebsocket/vcpkg.json @@ -0,0 +1,62 @@ +{ + "name": "ixwebsocket", + "version-semver": "11.2.6", + "description": "Lightweight WebSocket Client and Server + HTTP Client and Server", + "homepage": "https://github.com/machinezone/IXWebSocket", + "dependencies": [ + "zlib" + ], + "default-features": [ + "ssl" + ], + "features": { + "mbedtls": { + "description": "SSL support (mbedTLS)", + "dependencies": [ + "mbedtls" + ] + }, + "openssl": { + "description": "SSL support (OpenSSL)", + "dependencies": [ + "openssl" + ] + }, + "sectransp": { + "description": "SSL support (sectransp)" + }, + "ssl": { + "description": "Default SSL backend", + "dependencies": [ + { + "name": "ixwebsocket", + "features": [ + "sectransp" + ], + "platform": "osx" + }, + { + "name": "ixwebsocket", + "features": [ + "mbedtls" + ], + "platform": "windows" + }, + { + "name": "ixwebsocket", + "features": [ + "mbedtls" + ], + "platform": "windows & uwp" + }, + { + "name": "ixwebsocket", + "features": [ + "openssl" + ], + "platform": "!uwp & !windows & !osx" + } + ] + } + } +} diff --git a/ports/jack2/CMakeLists.txt b/ports/jack2/CMakeLists.txt index 2fb25edb8ef0a6..6c46d8d91d4531 100644 --- a/ports/jack2/CMakeLists.txt +++ b/ports/jack2/CMakeLists.txt @@ -1,14 +1,33 @@ -cmake_minimum_required(VERSION 3.8) -project(jack2 C) +cmake_minimum_required(VERSION 3.1) +project(jack VERSION 1.9 LANGUAGES C) include_directories(common) -add_library(jack2 STATIC common/JackWeakAPI.c) +add_library(jack common/JackWeakAPI.c) +if(WIN32 AND BUILD_SHARED_LIBS) + target_sources(jack PRIVATE jack.def) +endif() +target_link_libraries(jack PRIVATE ${CMAKE_DL_LIBS}) -install(TARGETS jack2 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib +include(GNUInstallDirs) +install(TARGETS jack + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ) -install(DIRECTORY common/jack DESTINATION include) +set(PREFIX "${CMAKE_INSTALL_PREFIX}") +set(LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}") +set(INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +set(JACK_VERSION "${CMAKE_PROJECT_VERSION}") +# JackWeak dynamically loads the real JACK library which requires linking CMAKE_DL_LIBS +if(CMAKE_DL_LIBS) + set(CLIENTLIB "jack -l${CMAKE_DL_LIBS}") +else() + set(CLIENTLIB "jack") +endif() +# NOTE: the server_libs variable will be broken but this port does not build the server anyway +configure_file(jack.pc.in "${CMAKE_CURRENT_BINARY_DIR}/jack.pc" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/jack.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + +install(DIRECTORY "common/jack" DESTINATION "include") diff --git a/ports/jack2/CONTROL b/ports/jack2/CONTROL deleted file mode 100644 index fb3fed91fa962b..00000000000000 --- a/ports/jack2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: jack2 -Version: 1.9.12-2 -Homepage: https://github.com/jackaudio/jack2 -Description: Cross-platform API that enables device sharing and inter-application audio routing - diff --git a/ports/jack2/jack.def b/ports/jack2/jack.def new file mode 100644 index 00000000000000..c542e5337f851b --- /dev/null +++ b/ports/jack2/jack.def @@ -0,0 +1,96 @@ +LIBRARY JACK + +EXPORTS + +;FIXME these are unimplemented +;jack_port_uuid +;jack_get_cycle_times + +jack_get_version +jack_get_version_string +jack_client_open +jack_client_new +jack_client_close +jack_client_name_size +jack_get_client_name +jack_get_uuid_for_client_name +jack_get_client_name_by_uuid +jack_internal_client_new +jack_internal_client_close +jack_activate +jack_deactivate +jack_client_thread_id +jack_is_realtime +jack_thread_wait +jack_cycle_wait +jack_cycle_signal +jack_set_process_thread +jack_set_thread_init_callback +jack_on_shutdown +jack_on_info_shutdown +jack_set_process_callback +jack_set_freewheel_callback +jack_set_buffer_size_callback +jack_set_sample_rate_callback +jack_set_client_registration_callback +jack_set_port_registration_callback +jack_set_port_connect_callback +jack_set_port_rename_callback +jack_set_graph_order_callback +jack_set_xrun_callback +jack_set_latency_callback +jack_set_freewheel +jack_set_buffer_size +jack_get_sample_rate +jack_get_buffer_size +jack_engine_takeover_timebase +jack_cpu_load +jack_port_register +jack_port_unregister +jack_port_get_buffer +jack_port_name +jack_port_short_name +jack_port_flags +jack_port_type +jack_port_type_id +jack_port_is_mine +jack_port_connected +jack_port_connected_to +jack_port_get_connections +jack_port_get_all_connections +jack_port_tie +jack_port_untie +jack_port_set_name +jack_port_rename +jack_port_set_alias +jack_port_unset_alias +jack_port_get_aliases +jack_port_request_monitor +jack_port_request_monitor_by_name +jack_port_ensure_monitor +jack_port_monitoring_input +jack_connect +jack_disconnect +jack_port_disconnect +jack_port_name_size +jack_port_type_size +jack_port_type_get_buffer_size +jack_port_set_latency +jack_port_get_latency_range +jack_port_set_latency_range +jack_recompute_total_latencies +jack_port_get_latency +jack_port_get_total_latency +jack_recompute_total_latency +jack_get_ports +jack_port_by_name +jack_port_by_id +jack_frames_since_cycle_start +jack_frame_time +jack_last_frame_time +jack_frames_to_time +jack_time_to_frames +jack_get_time +jack_set_error_function +jack_set_info_function +jack_free diff --git a/ports/jack2/portfile.cmake b/ports/jack2/portfile.cmake index 3cb59189e5a2c0..f7319a2bfc886c 100644 --- a/ports/jack2/portfile.cmake +++ b/ports/jack2/portfile.cmake @@ -1,27 +1,27 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jackaudio/jack2 - REF v1.9.12 - SHA512 f0271dfc8f8e2f2489ca52f431ad4fa420665816d6c67a01a76da1d4b5ae91f6dad8c4e3309ec5e0c159c9d312ed56021ab323d74bce828ace26f1b8d477ddfa + REF v1.9.19 + SHA512 d8d5fe17e2984959546af3c53f044aa4648860e19ff8ffd54452e87fa6cdfd111f825c57e3df17cb8ed95de8392b6f354b12ded41e3e021a37f07b99a89ba18d HEAD_REF master ) -# Install headers and a statically built JackWeakAPI.c -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +# Install headers and a shim library with JackWeakAPI.c +file(COPY + "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" + "${CMAKE_CURRENT_LIST_DIR}/jack.def" + DESTINATION "${SOURCE_PATH}" +) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_fixup_pkgconfig() -# Remove duplicate headers -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Handle copyright -file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/jack2 RENAME copyright) +file(INSTALL "${SOURCE_PATH}/README.rst" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/jack2/vcpkg.json b/ports/jack2/vcpkg.json new file mode 100644 index 00000000000000..d10c200dd9847c --- /dev/null +++ b/ports/jack2/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "jack2", + "version-semver": "1.9.19", + "description": "Cross-platform API that enables device sharing and inter-application audio routing", + "homepage": "https://jackaudio.org/", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/jaeger-client-cpp/fix-CMakeLists.patch b/ports/jaeger-client-cpp/fix-CMakeLists.patch new file mode 100644 index 00000000000000..4e7db3216f043c --- /dev/null +++ b/ports/jaeger-client-cpp/fix-CMakeLists.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d9bf7b5..eb2692c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,7 +60,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND + endif() + + hunter_add_package(thrift) +-find_package(thrift ${hunter_config} REQUIRED) ++find_package(Thrift CONFIG REQUIRED) + if(HUNTER_ENABLED) + list(APPEND LIBS thrift::thrift_static) + else() +@@ -273,6 +273,9 @@ if(JAEGERTRACING_PLUGIN) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/export.map + "{ global: OpenTracingMakeTracerFactory; local: *; };") + add_library(jaegertracing_plugin MODULE ${SRC}) ++ if (WIN32) ++ target_link_libraries(jaegertracing_plugin PUBLIC Iphlpapi Ws2_32) ++ endif() + add_lib_deps(jaegertracing_plugin) + target_link_libraries(jaegertracing_plugin PUBLIC + -static-libgcc +@@ -418,7 +421,7 @@ include(GNUInstallDirs) + # * /lib*/cmake/ + # * /lib*/ + # * /include/ +-set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") ++set(config_install_dir "${CMAKE_INSTALL_DATAROOTDIR}/jaeger-client-cpp") + + set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") + diff --git a/ports/jaeger-client-cpp/portfile.cmake b/ports/jaeger-client-cpp/portfile.cmake new file mode 100644 index 00000000000000..be3d38b851271c --- /dev/null +++ b/ports/jaeger-client-cpp/portfile.cmake @@ -0,0 +1,67 @@ +vcpkg_fail_port_install(ON_ARCH "arm64") + +# Get jaeger-idl from github +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jaegertracing/jaeger-idl + REF b9acaab7b20fd4f984225657ffe272799ebdfefb #commit on 2021-08-04 + SHA512 d136e68e54f39779a48b1c5bc61f81dc06b312120dc8d3788a9c360f89aa924ca4cc074c6515743a930982637f9fca94299000a4b2dca1f9c243d8d9d1c62de2 + HEAD_REF master +) + +# Create target directory for proxy/stub generation +file(MAKE_DIRECTORY "${SOURCE_PATH}/data") +# List of input files +set(THRIFT_SOURCE_FILES agent.thrift jaeger.thrift sampling.thrift zipkincore.thrift crossdock/tracetest.thrift baggage.thrift dependency.thrift aggregation_validator.thrift) + +# Generate proxy/stubs for the input files +foreach(THRIFT_SOURCE_FILE IN LISTS THRIFT_SOURCE_FILES) +vcpkg_execute_required_process( + COMMAND "${CURRENT_INSTALLED_DIR}/tools/thrift/thrift" --gen cpp:no_skeleton -o "${SOURCE_PATH}/data" ${THRIFT_SOURCE_FILE} + WORKING_DIRECTORY "${SOURCE_PATH}/thrift" + LOGNAME jaeger-idl-${TARGET_TRIPLET} +) +endforeach() + +# Save generated proxy/stub target directory +set(IDL_SOURCE_DIR "${SOURCE_PATH}/data/gen-cpp") + +# Get jaeger-client-cpp from github +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jaegertracing/jaeger-client-cpp + REF 277fdd75e413c914bff04d510afafc7f0811a31a #v0.7.0 + SHA512 5112bda5ec24621044bbcd5393922564de70f4d696b1d4248e889dd3d49e492155bfc88626fea214ce4e4cb50e9a49ea031ddb8efbaafc6f1753a586db534a50 + HEAD_REF master + PATCHES + fix-CMakeLists.patch +) + +# Do not use hunter, not testtools and build opentracing plugin +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DHUNTER_ENABLED=0 + -DBUILD_TESTING=0 + -DJAEGERTRACING_PLUGIN=0 + -DJAEGERTRACING_BUILD_EXAMPLES=0 +) + +# Copy generated files over to jaeger-client-cpp +file(GLOB IDL_SOURCE_FILES LIST_DIRECTORIES false "${IDL_SOURCE_DIR}/*") +file(COPY ${IDL_SOURCE_FILES} DESTINATION "${SOURCE_PATH}/src/jaegertracing/thrift-gen") + +# Generate Jaeger client +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +# Cleanup unused Debug files +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +# Cleanup +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/jaegertracing/testutils") diff --git a/ports/jaeger-client-cpp/vcpkg.json b/ports/jaeger-client-cpp/vcpkg.json new file mode 100644 index 00000000000000..cc4db80a3a3a0c --- /dev/null +++ b/ports/jaeger-client-cpp/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "jaeger-client-cpp", + "version-semver": "0.7.0", + "description": "C++ OpenTracing binding for Jaeger https://jaegertracing.io/", + "homepage": "https://github.com/jaegertracing/jaeger-client-cpp", + "supports": "!arm64", + "dependencies": [ + "nlohmann-json", + "opentracing", + "thrift", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "yaml-cpp" + ] +} diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL deleted file mode 100644 index 19b1224ef3dc5e..00000000000000 --- a/ports/jansson/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: jansson -Version: 2.12-1 -Homepage: https://github.com/akheron/jansson -Description: Jansson is a C library for encoding, decoding and manipulating JSON data diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index 62086e99d5f4eb..f0233ddacf723b 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO akheron/jansson - REF 71c4e8ec215afa225ac20eed269a14963cd37b50 - SHA512 cdb955996768d6c7ed15b9f1bb7ddf4905f881c4e604d9e7a863f42c513eaaa9fb8799dacfa392424fbf725aac125d4716e10c44c3415449b5c5edd38a87b290 + REF e9ebfa7e77a6bee77df44e096b100e7131044059 # v2.13.1 + SHA512 88a59c1cf5150699def17c86192ca9bacdfe6669319f770c3fbf14fa8edc48b4bb015a4a634a09db40fba9054320ac7c133c4d156f813af540a636f7825f0610 HEAD_REF master ) @@ -45,6 +43,6 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/jansson/vcpkg.json b/ports/jansson/vcpkg.json new file mode 100644 index 00000000000000..d494c8d5df602f --- /dev/null +++ b/ports/jansson/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "jansson", + "version-string": "2.13.1", + "port-version": 1, + "description": "Jansson is a C library for encoding, decoding and manipulating JSON data", + "homepage": "https://github.com/akheron/jansson" +} diff --git a/ports/jasper/CONTROL b/ports/jasper/CONTROL deleted file mode 100644 index 43c657dd4cd95d..00000000000000 --- a/ports/jasper/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: jasper -Version: 2.0.16-2 -Homepage: https://github.com/mdadams/jasper -Description: Open source implementation of the JPEG-2000 Part-1 standard -Build-Depends: libjpeg-turbo, opengl, freeglut diff --git a/ports/jasper/portfile.cmake b/ports/jasper/portfile.cmake index ae42d2a226f870..f02b2db39510cb 100644 --- a/ports/jasper/portfile.cmake +++ b/ports/jasper/portfile.cmake @@ -1,22 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mdadams/jasper - REF version-2.0.16 - SHA512 b3bca227f833567c9061c4a29c0599784ed6a131b5cceddfd1696542d19add821eda445ce6d83782b454b266723b24d0f028cbc644a25c0e3a75304e615b34ee + REF fe00207dc10db1d7cc6f2757961c5c6bdfd10973 # version-2.0.33 + SHA512 887bb8e6096b41d5b61970d70b0e7b9cc1c31dd63467386aa35003c146d200bbae9ad46825a3313aeed403ac6fb26d504f489386cbc7ca364d95deeb5a94af46 HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(JAS_ENABLE_SHARED ON) -else() - set(JAS_ENABLE_SHARED OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" JAS_ENABLE_SHARED) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF -DJAS_ENABLE_LIBJPEG=ON @@ -27,13 +20,12 @@ vcpkg_configure_cmake( -DCMAKE_DEBUG_POSTFIX=d # Due to CMakes FindJasper ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share") -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jasper RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/jasper/vcpkg.json b/ports/jasper/vcpkg.json new file mode 100644 index 00000000000000..124a0095a13d33 --- /dev/null +++ b/ports/jasper/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "jasper", + "version": "2.0.33", + "description": "Open source implementation of the JPEG-2000 Part-1 standard", + "homepage": "https://github.com/mdadams/jasper", + "dependencies": [ + { + "name": "freeglut", + "platform": "!osx" + }, + "libjpeg-turbo", + "opengl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/jbig2dec/CONTROL b/ports/jbig2dec/CONTROL deleted file mode 100644 index 5e11aa037a5d21..00000000000000 --- a/ports/jbig2dec/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: jbig2dec -Version: 0.16-1 -Homepage: https://github.com/ArtifexSoftware/jbig2dec -Description: a decoder library and example utility implementing the JBIG2 bi-level image compression spec. Also known as ITU T.88 and ISO IEC 14492, and included by reference in Adobe's PDF version 1.4 and later. diff --git a/ports/jbig2dec/portfile.cmake b/ports/jbig2dec/portfile.cmake index a9d76793714abc..099252b202337a 100644 --- a/ports/jbig2dec/portfile.cmake +++ b/ports/jbig2dec/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArtifexSoftware/jbig2dec - REF 0.16 - SHA512 a8aa1b1f14466104eed412c38604b2450d1acc1c73faaaf81d5211ac7f4d636bf8d177285f6550f1f5211b31d14f1c14d83571e3e899700ebfc9af00912ed874 + REF 1c336b8ab44524dc56ea837e2211ff4207704cdd # 0.19 + SHA512 e189a80cc8da18813cf6c8edc6f1a799793adcba7ea6f302a8cced349bffac68869af338d9723ee1efdc07115ae554cd5757bfda7d7ac41324fde1f9c3a8343c HEAD_REF master ) diff --git a/ports/jbig2dec/vcpkg.json b/ports/jbig2dec/vcpkg.json new file mode 100644 index 00000000000000..a4f145f69ccc47 --- /dev/null +++ b/ports/jbig2dec/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "jbig2dec", + "version-string": "0.19", + "port-version": 1, + "description": "a decoder library and example utility implementing the JBIG2 bi-level image compression spec. Also known as ITU T.88 and ISO IEC 14492, and included by reference in Adobe's PDF version 1.4 and later.", + "homepage": "https://github.com/ArtifexSoftware/jbig2dec" +} diff --git a/ports/jbigkit/CONTROL b/ports/jbigkit/CONTROL deleted file mode 100644 index cc0a00aa211a69..00000000000000 --- a/ports/jbigkit/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: jbigkit -Version: 2.1-3 -Homepage: https://www.cl.cam.ac.uk/~mgk25/jbigkit -Description: A software implementation of the JBIG1 data compression standard (ITU-T T.82) diff --git a/ports/jbigkit/portfile.cmake b/ports/jbigkit/portfile.cmake index 9e63a426f5e284..ba2d6555a08322 100644 --- a/ports/jbigkit/portfile.cmake +++ b/ports/jbigkit/portfile.cmake @@ -1,17 +1,18 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(JBIGKIT_VERSION 2.1) set(JBIGKIT_HASH c4127480470ef90db1ef3bd2caa444df10b50ed8df0bc9997db7612cb48b49278baf44965028f1807a21028eb965d677e015466306b44683c4ec75a23e1922cf) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/jbigkit-${JBIGKIT_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "http://www.cl.cam.ac.uk/~mgk25/jbigkit/download/jbigkit-${JBIGKIT_VERSION}.tar.gz" FILENAME "jbigkit-${JBIGKIT_VERSION}.tar.gz" SHA512 ${JBIGKIT_HASH} ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/jbigkit/vcpkg.json b/ports/jbigkit/vcpkg.json new file mode 100644 index 00000000000000..1498be4fa7fc92 --- /dev/null +++ b/ports/jbigkit/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "jbigkit", + "version-string": "2.1", + "port-version": 5, + "description": "A software implementation of the JBIG1 data compression standard (ITU-T T.82)", + "homepage": "https://www.cl.cam.ac.uk/~mgk25/jbigkit" +} diff --git a/ports/jemalloc/CONTROL b/ports/jemalloc/CONTROL deleted file mode 100644 index 3f6be44a544c71..00000000000000 --- a/ports/jemalloc/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: jemalloc -Version: 4.3.1-4 -Homepage: https://github.com/jemalloc/jemalloc-cmake -Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support -Build-Depends: diff --git a/ports/jemalloc/portfile.cmake b/ports/jemalloc/portfile.cmake index 49e89b8d0355f8..013634577b0cb4 100644 --- a/ports/jemalloc/portfile.cmake +++ b/ports/jemalloc/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( diff --git a/ports/jemalloc/vcpkg.json b/ports/jemalloc/vcpkg.json new file mode 100644 index 00000000000000..c23bdcaa803915 --- /dev/null +++ b/ports/jemalloc/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "jemalloc", + "version-string": "4.3.1", + "port-version": 5, + "description": "jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support", + "homepage": "https://github.com/jemalloc/jemalloc-cmake" +} diff --git a/ports/jinja2cpplight/portfile.cmake b/ports/jinja2cpplight/portfile.cmake new file mode 100644 index 00000000000000..329020de2c1f02 --- /dev/null +++ b/ports/jinja2cpplight/portfile.cmake @@ -0,0 +1,37 @@ +if(VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "jinja2cpplight doesn't support UWP.") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +else() + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hughperkins/Jinja2CppLight + REF 04196b080adf6edb86184824a1cf948ace310d19 #Commits on May 8, 2018 + SHA512 30415da5ebc4fb805953cc9ff7e5fcd357d6fa1818c1ff2570b795252de6215562cd0f2f0418a1fa60e9d74b88339a3fea7166b898f54cface6ab1cfe3581bb5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + + +file(GLOB_RECURSE JINJA2CPPLIGHT_EXES ${CURRENT_PACKAGES_DIR}/bin/jinja2cpplight_unittests*) +file(COPY ${JINJA2CPPLIGHT_EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(REMOVE_RECURSE ${JINJA2CPPLIGHT_EXES}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/jinja2cpplight/vcpkg.json b/ports/jinja2cpplight/vcpkg.json new file mode 100644 index 00000000000000..004282a82947ed --- /dev/null +++ b/ports/jinja2cpplight/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "jinja2cpplight", + "version-string": "2018-05-08", + "port-version": 1, + "description": "(very) lightweight version of Jinja2 for C++, Lightweight templating engine for C++, based on Jinja2.", + "homepage": "https://github.com/hughperkins/Jinja2CppLight", + "supports": "!uwp" +} diff --git a/ports/josuttis-jthread/portfile.cmake b/ports/josuttis-jthread/portfile.cmake new file mode 100644 index 00000000000000..9563442b1d58e3 --- /dev/null +++ b/ports/josuttis-jthread/portfile.cmake @@ -0,0 +1,15 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO josuttis/jthread + REF 3e1908f3bbaba6d2195bb423840c23e107c9e8b2 + SHA512 b6e4df35b364848a433eb31023a8b5b5045b2445aaf9a81406a6b3ce7cfdda08bcdb486be9201f5b1e54df38884c1763fae336fdcb9ad79f11658a92c535055d + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/source/jthread.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/source/stop_token.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/source/condition_variable_any2.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/josuttis-jthread/vcpkg.json b/ports/josuttis-jthread/vcpkg.json new file mode 100644 index 00000000000000..565f8b4e3794f7 --- /dev/null +++ b/ports/josuttis-jthread/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "josuttis-jthread", + "version-string": "2020-07-21", + "port-version": 2, + "description": "C++ class for a joining and cooperative interruptible thread (std::jthread) with stop_token helper", + "homepage": "https://github.com/josuttis/jthread" +} diff --git a/ports/jsmn/CONTROL b/ports/jsmn/CONTROL deleted file mode 100644 index b19e265858e0bc..00000000000000 --- a/ports/jsmn/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: jsmn -Version: 2019-04-27 -Description: A minimalistic JSON parser in C. diff --git a/ports/jsmn/portfile.cmake b/ports/jsmn/portfile.cmake index 0b7599ccba4994..a8deec69e2de5f 100644 --- a/ports/jsmn/portfile.cmake +++ b/ports/jsmn/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zserge/jsmn diff --git a/ports/jsmn/vcpkg.json b/ports/jsmn/vcpkg.json new file mode 100644 index 00000000000000..96956d18d2f735 --- /dev/null +++ b/ports/jsmn/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "jsmn", + "version-string": "2019-04-27", + "port-version": 1, + "description": "A minimalistic JSON parser in C." +} diff --git a/ports/json-c/CONTROL b/ports/json-c/CONTROL deleted file mode 100644 index ebd0ed02d7bb50..00000000000000 --- a/ports/json-c/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: json-c -Version: 2019-05-31 -Description: A JSON implementation in C diff --git a/ports/json-c/pkgconfig.patch b/ports/json-c/pkgconfig.patch new file mode 100644 index 00000000000000..893406ed510379 --- /dev/null +++ b/ports/json-c/pkgconfig.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ffb1db3dc..a82ed8619 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -273,7 +273,7 @@ install( + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + ) + +-if (UNIX OR MINGW OR CYGWIN) ++if (1) + SET(prefix ${CMAKE_INSTALL_PREFIX}) + # exec_prefix is prefix by default and CMake does not have the + # concept. diff --git a/ports/json-c/portfile.cmake b/ports/json-c/portfile.cmake index 75ad6da614eb40..d0893ebee9e4df 100644 --- a/ports/json-c/portfile.cmake +++ b/ports/json-c/portfile.cmake @@ -1,14 +1,10 @@ -include(vcpkg_common_functions) - -# https://github.com/json-c/json-c/issues/488 -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO json-c/json-c - REF 2b1903cc6941fb87db7526680829486f27fb1073 - SHA512 0ee71a0c2f75f5114b65f06ef921ac7a66173d66592fa880336896de64f3a325b251028b35396184cd7c3ffd15db3826bed83200fa80f4d11607fdf758138bf9 + REF eae040a84a479ccad1d1c48314345c51ecf1a4a4 + SHA512 18d8a31b341830b04676cad13fbc0608fb75a323522161ac8fd0bb5058db82c1c261d504696a1e12f4b03eb0967632885580ff81d808adf2f1dff7e32d131ba0 HEAD_REF master + PATCHES pkgconfig.patch ) vcpkg_configure_cmake( @@ -19,7 +15,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) - +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/json-c/vcpkg.json b/ports/json-c/vcpkg.json new file mode 100644 index 00000000000000..ff61b336e01403 --- /dev/null +++ b/ports/json-c/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "json-c", + "version-string": "2019-09-10", + "port-version": 2, + "description": "A JSON implementation in C", + "homepage": "https://github.com/json-c/json-c" +} diff --git a/ports/json-dto/CONTROL b/ports/json-dto/CONTROL deleted file mode 100644 index dbd64c3c11b613..00000000000000 --- a/ports/json-dto/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: json-dto -Version: 0.2.8-2 -Description: A small header-only library for converting data between json representation and c++ structs. -Build-Depends: rapidjson diff --git a/ports/json-dto/portfile.cmake b/ports/json-dto/portfile.cmake index 7600433ea19d06..dd888973ab9ea6 100644 --- a/ports/json-dto/portfile.cmake +++ b/ports/json-dto/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - -vcpkg_from_bitbucket( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO sobjectizerteam/json_dto-0.2 - REF v.0.2.8 - SHA512 50a2d8d31f4cf67bdf84a58bae5f95642f4be571e8e052a48830be119d5e3c4ddbb19c5ac97fc0f8383c9958d64ec9be4ce23019c1da4f2cbf4b8ddbf23f5ad7 + REPO stiffstream/json_dto + REF 7fce92cd3bdacdcd0b41ed26d2cc981e3f70956e # v.0.2.13 + SHA512 f678545cc60828ab76d6e8532ac9dbf8e4e68d873d0a98f17d62934dd0b3a3e255b38adf838b65a12e0d954edc7866eb6393f6783709f6f7fac29167886e7bf3 ) vcpkg_configure_cmake( @@ -24,5 +22,5 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/json-dto) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/json-dto) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/json-dto/LICENSE ${CURRENT_PACKAGES_DIR}/share/json-dto/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/ports/json-dto/vcpkg.json b/ports/json-dto/vcpkg.json new file mode 100644 index 00000000000000..8681bd20fc10e7 --- /dev/null +++ b/ports/json-dto/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "json-dto", + "version": "0.2.13", + "description": "A small header-only library for converting data between json representation and c++ structs.", + "homepage": "https://github.com/Stiffstream/json_dto", + "license": "BSD-3-Clause", + "dependencies": [ + "rapidjson" + ] +} diff --git a/ports/json-schema-validator/cmake-find-package.patch b/ports/json-schema-validator/cmake-find-package.patch new file mode 100644 index 00000000000000..995ae06b084c29 --- /dev/null +++ b/ports/json-schema-validator/cmake-find-package.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c4cc218..ff2b706 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,6 +8,8 @@ cmake_minimum_required(VERSION 3.2) + option(BUILD_TESTS "Build tests" ON) + option(BUILD_EXAMPLES "Build examples" ON) + ++find_package(nlohmann_json CONFIG REQUIRED) ++ + # the library + add_library(nlohmann_json_schema_validator + src/json-schema-draft7.json.cpp +@@ -34,6 +36,13 @@ set_target_properties(nlohmann_json_schema_validator + # because of the dependency to nlohmann_json. + set(JSON_VALIDATOR_INSTALL ON) + ++target_link_libraries( ++ nlohmann_json_schema_validator ++ PUBLIC ++ nlohmann_json ++ nlohmann_json::nlohmann_json) ++ ++if(0) + # here we decice how nlohmann::json is found and used to build this project + + # first, check whether a nlohmann_json::nlohmann_json target exists already +@@ -92,7 +101,7 @@ else() + set(nlohmann_json_DIR ${JSON_HPP}) + endif() + endif() +- ++endif() + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(nlohmann_json_schema_validator diff --git a/ports/json-schema-validator/fix-ambiguous-assignment.patch b/ports/json-schema-validator/fix-ambiguous-assignment.patch new file mode 100644 index 00000000000000..3e655b485e6e15 --- /dev/null +++ b/ports/json-schema-validator/fix-ambiguous-assignment.patch @@ -0,0 +1,13 @@ +diff --git a/src/json-validator.cpp b/src/json-validator.cpp +index f16f3ef..1f7b615 100644 +--- a/src/json-validator.cpp ++++ b/src/json-validator.cpp +@@ -663,7 +663,7 @@ public: + #ifndef NO_STD_REGEX + attr = sch.find("pattern"); + if (attr != sch.end()) { +- patternString_ = attr.value(); ++ patternString_ = attr.value().get(); + pattern_ = {true, REGEX_NAMESPACE::regex(attr.value().get(), + REGEX_NAMESPACE::regex::ECMAScript)}; + sch.erase(attr); diff --git a/ports/json-schema-validator/forward-find-package.patch b/ports/json-schema-validator/forward-find-package.patch new file mode 100644 index 00000000000000..e5ddde525b9cd6 --- /dev/null +++ b/ports/json-schema-validator/forward-find-package.patch @@ -0,0 +1,14 @@ +diff --git a/nlohmann_json_schema_validatorConfig.cmake.in b/nlohmann_json_schema_validatorConfig.cmake.in +index 6ee0df2..e0315fa 100644 +--- a/nlohmann_json_schema_validatorConfig.cmake.in ++++ b/nlohmann_json_schema_validatorConfig.cmake.in +@@ -7,6 +7,9 @@ + get_filename_component(NLOHMANN_JSON_SCHEMA_VALIDATOR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + set(NLOHMANN_JSON_SCHEMA_VALIDATOR_INCLUDE_DIRS @CONF_INCLUDE_DIRS@) + ++include(CMakeFindDependencyMacro) ++find_dependency(nlohmann_json) ++ + # Our library dependencies (contains definitions for IMPORTED targets) + if(NOT TARGET json-schema-validator) + include("${NLOHMANN_JSON_SCHEMA_VALIDATOR_CMAKE_DIR}/nlohmann_json_schema_validatorTargets.cmake") diff --git a/ports/json-schema-validator/portfile.cmake b/ports/json-schema-validator/portfile.cmake new file mode 100644 index 00000000000000..941ec5372e2469 --- /dev/null +++ b/ports/json-schema-validator/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pboettch/json-schema-validator + REF 27fc1d094503623dfe39365ba82581507524545c + SHA512 4fd05087743f43871586a53d119acd1a19d0bdec8a5620f62b6eee7a926d285842e8439127eec52eeb11069c92b8d9af28558897d48e2422ecafca39d9f23cdb + HEAD_REF master + PATCHES + fix-ambiguous-assignment.patch + cmake-find-package.patch + forward-find-package.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +set(PKG_NAME "nlohmann_json_schema_validator") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PKG_NAME} TARGET_PATH share/${PKG_NAME}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + diff --git a/ports/json-schema-validator/usage b/ports/json-schema-validator/usage new file mode 100644 index 00000000000000..3493d3808e8669 --- /dev/null +++ b/ports/json-schema-validator/usage @@ -0,0 +1,4 @@ +The package json-schema-validator provides CMake integration: + + find_package(nlohmann_json_schema_validator REQUIRED) + target_link_libraries(main PRIVATE nlohmann_json_schema_validator) diff --git a/ports/json-schema-validator/vcpkg.json b/ports/json-schema-validator/vcpkg.json new file mode 100644 index 00000000000000..387afe10938ecb --- /dev/null +++ b/ports/json-schema-validator/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "json-schema-validator", + "version-string": "2.1.0", + "port-version": 1, + "description": "This is a C++ library for validating JSON documents based on a JSON Schema. This validator is based on nlohmann json library.", + "homepage": "https://github.com/pboettch/json-schema-validator", + "dependencies": [ + { + "name": "nlohmann-json", + "default-features": false + } + ] +} diff --git a/ports/json-spirit/CONTROL b/ports/json-spirit/CONTROL deleted file mode 100644 index e2b1d807973b21..00000000000000 --- a/ports/json-spirit/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: json-spirit -Version: 4.1.0-1 -Description: json parser using boost library -Build-Depends: boost-config, boost-integer, boost-smart-ptr, boost-variant, boost-spirit diff --git a/ports/json-spirit/portfile.cmake b/ports/json-spirit/portfile.cmake index 9d2f240730e4b3..658cb92a4fe5b6 100644 --- a/ports/json-spirit/portfile.cmake +++ b/ports/json-spirit/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO png85/json_spirit diff --git a/ports/json-spirit/vcpkg.json b/ports/json-spirit/vcpkg.json new file mode 100644 index 00000000000000..35517305eca6bd --- /dev/null +++ b/ports/json-spirit/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "json-spirit", + "version-string": "4.1.0", + "port-version": 2, + "description": "json parser using boost library", + "dependencies": [ + "boost-config", + "boost-integer", + "boost-smart-ptr", + "boost-spirit", + "boost-variant" + ] +} diff --git a/ports/json11/CONTROL b/ports/json11/CONTROL deleted file mode 100644 index 34cee37de0c59b..00000000000000 --- a/ports/json11/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: json11 -Version: 2017-06-20-2 -Description: json11 is a tiny JSON library for C++11, providing JSON parsing and serialization. diff --git a/ports/json11/portfile.cmake b/ports/json11/portfile.cmake index a3c2b9cabd7c08..9d1c459bc14676 100644 --- a/ports/json11/portfile.cmake +++ b/ports/json11/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/json11/vcpkg.json b/ports/json11/vcpkg.json new file mode 100644 index 00000000000000..f2aad6b8cbbcc4 --- /dev/null +++ b/ports/json11/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "json11", + "version-string": "2017-06-20", + "port-version": 3, + "description": "json11 is a tiny JSON library for C++11, providing JSON parsing and serialization." +} diff --git a/ports/json5-parser/00001-fix-build.patch b/ports/json5-parser/00001-fix-build.patch new file mode 100644 index 00000000000000..b67f7c47ae22e3 --- /dev/null +++ b/ports/json5-parser/00001-fix-build.patch @@ -0,0 +1,27 @@ +diff --git a/json5_parser/CMakeLists.txt b/json5_parser/CMakeLists.txt +index e83fb38..c09cae4 100644 +--- a/json5_parser/CMakeLists.txt ++++ b/json5_parser/CMakeLists.txt +@@ -15,3 +15,22 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) + + ADD_LIBRARY(json5_parser STATIC ${JSON_SPIRIT_SRCS}) + ++if(MSVC) ++ target_compile_options(json5_parser PRIVATE "/bigobj") ++endif() ++ ++target_include_directories(json5_parser PUBLIC $) ++ ++install(TARGETS json5_parser EXPORT json5-parser-config ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++) ++install(EXPORT json5-parser-config DESTINATION share/cmake/json5-parser) ++ ++file(GLOB HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} json5_parser*.h) ++foreach (HEADER ${HEADERS} ) ++ get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) ++ install(FILES ${HEADER} DESTINATION include/${HEADER_DIR}) ++endforeach() ++ diff --git a/ports/json5-parser/portfile.cmake b/ports/json5-parser/portfile.cmake new file mode 100644 index 00000000000000..79e4d1afc6895b --- /dev/null +++ b/ports/json5-parser/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Caltech-IPAC/json5_parser + REF 580bfe30c5ee5e06a0f536d7bddb75c07a29eda6 # 1.0.0 + SHA512 25cdbc02ed2e3b05f0644c3398230ab82ede093ed6f7d8f140a9810509dd05feab1187d62fc38818725a92c47029fe3dc5ecfdbe14e1e0a2ef314e925b369d59 + HEAD_REF master + PATCHES 00001-fix-build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/json5_parser + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/json5-parser) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/json5-parser/vcpkg.json b/ports/json5-parser/vcpkg.json new file mode 100644 index 00000000000000..13c1e6bb3568de --- /dev/null +++ b/ports/json5-parser/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "json5-parser", + "version-string": "1.0.0", + "port-version": 3, + "description": "An enhancement of the JSON Spirit C++ library to understand json5.", + "homepage": "https://github.com/Caltech-IPAC/json5_parser", + "dependencies": [ + "boost-spirit" + ] +} diff --git a/ports/jsoncons/CONTROL b/ports/jsoncons/CONTROL deleted file mode 100644 index 7158ab58077106..00000000000000 --- a/ports/jsoncons/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: jsoncons -Version: 0.131.2 -Description: A C++, header-only library for constructing JSON and JSON-like text and binary data formats, with JSON Pointer, JSON Patch, JSONPath, CSV, MessagePack, CBOR, BSON, UBJSON -Homepage: https://github.com/danielaparker/jsoncons diff --git a/ports/jsoncons/portfile.cmake b/ports/jsoncons/portfile.cmake index 7c6af87b59fcdf..44bf9fb3806d7d 100644 --- a/ports/jsoncons/portfile.cmake +++ b/ports/jsoncons/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO danielaparker/jsoncons - REF v0.131.2 - SHA512 7053a971cbc6e12623b65f98323c0d330c903f2b5eae9191369a9a04ae87654e8fa435139e9a72829a1ef9a957e3d4837362c90668f42ba8a0eedc80207e6eef + REF 2626df4ccfdaab814b789abdd5936ffe00f5f6dc # v0.165.0 + SHA512 da72515d91c443e6c9a89527d9aea7ca8805865b4a8a8f3f067d4a065cd27eea3a5de83f6b55e6e8c95cf79292e06cb7d56ea83499bd9e80afb80d81007a316d HEAD_REF master ) @@ -12,13 +10,13 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_TESTS=OFF + -DJSONCONS_BUILD_TESTS=OFF ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsoncons) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/jsoncons/LICENSE ${CURRENT_PACKAGES_DIR}/share/jsoncons/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/jsoncons/vcpkg.json b/ports/jsoncons/vcpkg.json new file mode 100644 index 00000000000000..84fea30327de90 --- /dev/null +++ b/ports/jsoncons/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "jsoncons", + "version-string": "0.165.0", + "port-version": 1, + "description": "A C++, header-only library for constructing JSON and JSON-like text and binary data formats, with JSON Pointer, JSON Patch, JSON Schema, JSONPath, JMESPath, CSV, MessagePack, CBOR, BSON, UBJSON", + "homepage": "https://github.com/danielaparker/jsoncons" +} diff --git a/ports/jsoncpp/CONTROL b/ports/jsoncpp/CONTROL deleted file mode 100644 index 6bbe46c0e0aaa5..00000000000000 --- a/ports/jsoncpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: jsoncpp -Version: 1.8.4-1 -Homepage: https://github.com/open-source-parsers/jsoncpp -Description: jsoncpp is an implementation of a JSON reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format that it is easy to parse and redeable for human. diff --git a/ports/jsoncpp/portfile.cmake b/ports/jsoncpp/portfile.cmake index f04620fd53916b..e722bde64c2b81 100644 --- a/ports/jsoncpp/portfile.cmake +++ b/ports/jsoncpp/portfile.cmake @@ -1,41 +1,31 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO open-source-parsers/jsoncpp - REF 1.8.4 - SHA512 f70361a3263dd8b9441374a9a409462be1426c0d6587c865171a80448ab73b3f69de2b4d70d2f0c541764e1e6cccc727dd53178347901f625ec6fb54fb94f4f1 + REF 9059f5cad030ba11d37818847443a53918c327b1 # 1.9.4 + SHA512 8062c83cad9dc453f1eb4886e63e054570e0f29dcd6594330d3b3628ba994915e26e08690cd28118805a766be200ac99ad4fbc131db3af895122a8d1bd87ef31 HEAD_REF master ) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(JSONCPP_STATIC OFF) - set(JSONCPP_DYNAMIC ON) -else() - set(JSONCPP_STATIC ON) - set(JSONCPP_DYNAMIC OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" JSONCPP_STATIC) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - DISABLE_PARALLEL_CONFIGURE - OPTIONS -DJSONCPP_WITH_CMAKE_PACKAGE:BOOL=ON - -DBUILD_STATIC_LIBS:BOOL=${JSONCPP_STATIC} - -DJSONCPP_WITH_PKGCONFIG_SUPPORT:BOOL=OFF - -DJSONCPP_WITH_TESTS:BOOL=OFF + OPTIONS + -DJSONCPP_WITH_CMAKE_PACKAGE=ON + -DBUILD_STATIC_LIBS=${JSONCPP_STATIC} + -DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF + -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF + -DJSONCPP_WITH_TESTS=OFF + -DJSONCPP_WITH_EXAMPLE=OFF ) vcpkg_install_cmake() -# Fix CMake files vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/jsoncpp) -# Remove includes in debug file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsoncpp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/jsoncpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/jsoncpp/copyright) - -# Copy pdb files vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/jsoncpp/vcpkg.json b/ports/jsoncpp/vcpkg.json new file mode 100644 index 00000000000000..c334a11c112b09 --- /dev/null +++ b/ports/jsoncpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "jsoncpp", + "version-string": "1.9.4", + "port-version": 1, + "description": "jsoncpp is an implementation of a JSON reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format that it is easy to parse and redeable for human.", + "homepage": "https://github.com/open-source-parsers/jsoncpp" +} diff --git a/ports/jsonnet/0003-use-upstream-nlohmann-json.patch b/ports/jsonnet/0003-use-upstream-nlohmann-json.patch new file mode 100644 index 00000000000000..a2e1105b7c40a0 --- /dev/null +++ b/ports/jsonnet/0003-use-upstream-nlohmann-json.patch @@ -0,0 +1,13 @@ +diff --git a/core/vm.cpp b/core/vm.cpp +index 0cf06fa..d65a6d7 100644 +--- a/core/vm.cpp ++++ b/core/vm.cpp +@@ -23,7 +23,7 @@ limitations under the License. + + #include "desugarer.h" + #include "json.h" +-#include "json.hpp" ++#include "nlohmann/json.hpp" + #include "md5.h" + #include "parser.h" + #include "state.h" diff --git a/ports/jsonnet/0004-incorporate-md5.patch b/ports/jsonnet/0004-incorporate-md5.patch new file mode 100644 index 00000000000000..2f62c13f95fe7d --- /dev/null +++ b/ports/jsonnet/0004-incorporate-md5.patch @@ -0,0 +1,42 @@ +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index d4e77a8..5d36314 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -15,7 +15,8 @@ set(LIBJSONNET_HEADERS + static_error.h + string_utils.h + unicode.h +- vm.h) ++ vm.h ++ ../third_party/md5/md5.h) + + set(LIBJSONNET_SOURCE + desugarer.cpp +@@ -26,12 +27,13 @@ set(LIBJSONNET_SOURCE + pass.cpp + static_analysis.cpp + string_utils.cpp +- vm.cpp) ++ vm.cpp ++ ../third_party/md5/md5.cpp) + + if (BUILD_SHARED_BINARIES) + add_library(libjsonnet ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) +-add_dependencies(libjsonnet md5 stdlib) +-target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json) ++add_dependencies(libjsonnet stdlib) ++target_link_libraries(libjsonnet nlohmann_json::nlohmann_json) + + file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/../include/libjsonnet.h JSONNET_VERSION_DEF + REGEX "[#]define[ \t]+LIB_JSONNET_VERSION[ \t]+") +@@ -54,8 +56,8 @@ endif() + if (BUILD_STATIC_LIBS) + # Static library for jsonnet command-line tool. + add_library(libjsonnet_static STATIC ${LIBJSONNET_SOURCE}) +- add_dependencies(libjsonnet_static md5 stdlib) +- target_link_libraries(libjsonnet_static md5 nlohmann_json::nlohmann_json) ++ add_dependencies(libjsonnet_static stdlib) ++ target_link_libraries(libjsonnet_static nlohmann_json::nlohmann_json) + set_target_properties(libjsonnet_static PROPERTIES OUTPUT_NAME jsonnet) + install(TARGETS libjsonnet_static DESTINATION "${CMAKE_INSTALL_LIBDIR}") + endif() diff --git a/ports/jsonnet/001-enable-msvc.patch b/ports/jsonnet/001-enable-msvc.patch index 3a666ee4b85488..499c6713d14767 100644 --- a/ports/jsonnet/001-enable-msvc.patch +++ b/ports/jsonnet/001-enable-msvc.patch @@ -1,78 +1,81 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8682cc8..88b95c1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -11,6 +11,8 @@ set(GLOBAL_OUTPUT_PATH_SUFFIX "" CACHE STRING - - project(jsonnet C CXX) - -+add_definitions(-D_CRT_SECURE_NO_WARNINGS) -+ - # Discourage in-source builds because they overwrite the hand-written Makefile. - # Use `cmake . -B` or the CMake GUI to do an out-of-source build. - if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} AND -@@ -73,17 +75,6 @@ elseif (BUILD_TESTS AND USE_SYSTEM_GTEST) - add_subdirectory(/usr/src/googletest ${GLOBAL_OUTPUT_PATH}/googletest-build) - endif() - --# Compiler flags. --if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR -- ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") -- set(OPT "-O3") -- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -pedantic -std=c99 -O3 ${OPT}") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC ${OPT}") --else() -- # TODO: Windows support. -- message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") --endif() -- - # Look for libraries in global output path. - link_directories(${GLOBAL_OUTPUT_PATH}) - -diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt -index f1c32b8..1a45a51 100644 ---- a/core/CMakeLists.txt -+++ b/core/CMakeLists.txt -@@ -28,7 +28,7 @@ set(LIBJSONNET_SOURCE - string_utils.cpp - vm.cpp) - --add_library(libjsonnet SHARED ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) -+add_library(libjsonnet ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) - add_dependencies(libjsonnet md5 stdlib) - target_link_libraries(libjsonnet md5) - -@@ -36,13 +36,12 @@ target_link_libraries(libjsonnet md5) - # this step the output would be |liblibjsonnet|. - set_target_properties(libjsonnet PROPERTIES OUTPUT_NAME jsonnet - VERSION 0.12.1 SOVERSION 0) --install(TARGETS libjsonnet DESTINATION lib) -+install(TARGETS libjsonnet DESTINATION lib RUNTIME DESTINATION bin) - - # Static library for jsonnet command-line tool. - add_library(libjsonnet_static STATIC ${LIBJSONNET_SOURCE}) - add_dependencies(libjsonnet_static md5 stdlib) - target_link_libraries(libjsonnet_static md5) --set_target_properties(libjsonnet_static PROPERTIES OUTPUT_NAME jsonnet) - - # Tests - -diff --git a/stdlib/CMakeLists.txt b/stdlib/CMakeLists.txt -index a481d9f..9fe768e 100644 ---- a/stdlib/CMakeLists.txt -+++ b/stdlib/CMakeLists.txt -@@ -2,14 +2,6 @@ - - add_executable(to_c_array to_c_array.cpp) - --# Custom command that will only build stdlib when it changes. --add_custom_command( -- OUTPUT ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h -- COMMAND ${GLOBAL_OUTPUT_PATH}/to_c_array -- ${PROJECT_SOURCE_DIR}/stdlib/std.jsonnet -- ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h -- DEPENDS to_c_array std.jsonnet) -- - # Standard library build target that libjsonnet can depend on. - add_custom_target(stdlib ALL - DEPENDS ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 385ea82..ebd12b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,6 +2,8 @@ + cmake_minimum_required(VERSION 2.8.7) + project(jsonnet C CXX) + ++add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ + include(ExternalProject) + include(GNUInstallDirs) + +@@ -33,6 +35,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH}) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH}) + + # Compiler flags. ++if (0) + if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR + ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") + set(OPT "-O3") +@@ -42,7 +45,7 @@ else() + # TODO: Windows support. + message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") + endif() +- ++endif() + set(CMAKE_CXX_STANDARD 11) + + +diff --git a/cmd/CMakeLists.txt b/cmd/CMakeLists.txt +index c032f02..d80d2a0 100644 +--- a/cmd/CMakeLists.txt ++++ b/cmd/CMakeLists.txt +@@ -13,5 +13,5 @@ if (BUILD_JSONNETFMT OR BUILD_TESTS) + add_dependencies(jsonnetfmt libjsonnet_for_binaries) + target_link_libraries(jsonnetfmt libjsonnet_for_binaries) + +- install(TARGETS jsonnetfmt DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ install(TARGETS jsonnetfmt DESTINATION tools/jsonnet) + endif() +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index d277872..bbf67f7 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -28,7 +28,7 @@ set(LIBJSONNET_SOURCE + string_utils.cpp + vm.cpp) + +-add_library(libjsonnet SHARED ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) ++add_library(libjsonnet ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) + add_dependencies(libjsonnet md5 stdlib) + target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json) + +@@ -46,7 +46,7 @@ set_target_properties(libjsonnet PROPERTIES OUTPUT_NAME jsonnet + PUBLIC_HEADER "${LIB_HEADER}") + install(TARGETS libjsonnet + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_BINDIR}" + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + + if (BUILD_STATIC_LIBS) +diff --git a/stdlib/CMakeLists.txt b/stdlib/CMakeLists.txt +index a481d9f..2f58d2f 100644 +--- a/stdlib/CMakeLists.txt ++++ b/stdlib/CMakeLists.txt +@@ -2,6 +2,7 @@ + + add_executable(to_c_array to_c_array.cpp) + ++if(0) + # Custom command that will only build stdlib when it changes. + add_custom_command( + OUTPUT ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h +@@ -13,3 +14,4 @@ add_custom_command( + # Standard library build target that libjsonnet can depend on. + add_custom_target(stdlib ALL + DEPENDS ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h) ++endif() +\ No newline at end of file diff --git a/ports/jsonnet/002-fix-dependency-and-install.patch b/ports/jsonnet/002-fix-dependency-and-install.patch new file mode 100644 index 00000000000000..90640e56cea682 --- /dev/null +++ b/ports/jsonnet/002-fix-dependency-and-install.patch @@ -0,0 +1,58 @@ +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index bbf67f7..7238a59 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -28,6 +28,7 @@ set(LIBJSONNET_SOURCE + string_utils.cpp + vm.cpp) + ++if (BUILD_SHARED_BINARIES) + add_library(libjsonnet ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) + add_dependencies(libjsonnet md5 stdlib) + target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json) +@@ -48,6 +49,7 @@ install(TARGETS libjsonnet + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_BINDIR}" + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++endif() + + if (BUILD_STATIC_LIBS) + # Static library for jsonnet command-line tool. +@@ -102,3 +104,5 @@ if (BUILD_TESTS) + add_test(jsonnet_test_snippet + ${GLOBAL_OUTPUT_PATH}/jsonnet -e ${TEST_SNIPPET}) + endif() ++ ++install(FILES ${LIB_HEADER} DESTINATION include) +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 6b7b8c3..6dfa1fa 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -8,9 +8,9 @@ set(LIBJSONNETPP_SOURCE + libjsonnet++.cpp + ) + ++if (BUILD_SHARED_BINARIES) + add_library(libjsonnet++ SHARED ${LIBJSONNETPP_HEADERS} ${LIBJSONNETPP_SOURCE}) +-add_dependencies(libjsonnet++ jsonnet) +-# target_link_libraries(libjsonnet libjsonnet) ++target_link_libraries(libjsonnet libjsonnet) + + # CMake prepends CMAKE_SHARED_LIBRARY_PREFIX to shared libraries, so without + # this step the output would be |liblibjsonnet|. +@@ -22,6 +22,7 @@ install(TARGETS libjsonnet++ + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++endif() + + if (BUILD_STATIC_LIBS) + # Static library for jsonnet command-line tool. +@@ -38,6 +39,7 @@ else() + add_library(libjsonnet++_for_binaries ALIAS libjsonnet++_static) + endif() + ++install(FILES ${LIBJSONNETPP_HEADERS} DESTINATION include) + # Tests + function(add_test_executablepp test_name) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/${test_name}.cpp) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL deleted file mode 100644 index 508f1e7afb2cd5..00000000000000 --- a/ports/jsonnet/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: jsonnet -Version: 2019-05-08-1 -Homepage: https://github.com/google/jsonnet -Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index ffa2973fbc7c2c..6542aba75df895 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -1,22 +1,24 @@ -include(vcpkg_common_functions) - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) +if (VCPKG_TARGET_IS_WINDOWS) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF c323f5ce5b8aa663585d23dc0fb94d4b166c6f16 - SHA512 d9f84c39929e9e80272e2b834f68a13b48c1cb4d64b70f5b6fa16e677555d947f7cf57372453e23066a330faa6a429b9aa750271b46f763581977a223d238785 + REF 3f58aa551c917d6a7a2c6d042ee27f93d895ac0b # v0.16.0 + SHA512 448f4ff433a43ec21c3b67ea508d624e03dac420878e453e908a465cd517c79ae657f107c92e28a4ae2d2527baaf9a3ae1c6ea4c7e7e4f5062d3fad4e76e668c HEAD_REF master PATCHES - 001-enable-msvc.patch + 001-enable-msvc.patch + 002-fix-dependency-and-install.patch + 0003-use-upstream-nlohmann-json.patch + 0004-incorporate-md5.patch ) -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_WINDOWS) + find_program(PWSH_PATH pwsh) vcpkg_execute_required_process( - COMMAND Powershell -Command "((Get-Content -AsByteStream \"${SOURCE_PATH}/stdlib/std.jsonnet\") -join ',') + ',0' | Out-File -Encoding Ascii \"${SOURCE_PATH}/core/std.jsonnet.h\"" + COMMAND "${PWSH_PATH}" -Command "((Get-Content -AsByteStream \"${SOURCE_PATH}/stdlib/std.jsonnet\") -join ',') + ',0' | Out-File -Encoding Ascii \"${SOURCE_PATH}/core/std.jsonnet.h\"" WORKING_DIRECTORY "${SOURCE_PATH}" LOGNAME "std.jsonnet" ) @@ -28,15 +30,30 @@ else() ) endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(BUILD_SHARED ON) + set(BUILD_STATIC OFF) +else() + set(BUILD_SHARED OFF) + set(BUILD_STATIC ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DBUILD_JSONNET=OFF -DBUILD_JSONNETFMT=OFF -DBUILD_TESTS=OFF + OPTIONS + -DBUILD_SHARED_BINARIES=${BUILD_SHARED} + -DBUILD_STATIC_LIBS=${BUILD_STATIC} + -DBUILD_JSONNET=OFF + -DBUILD_JSONNETFMT=OFF + -DBUILD_TESTS=OFF + -DUSE_SYSTEM_JSON=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/jsonnet) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsonnet RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/jsonnet/vcpkg.json b/ports/jsonnet/vcpkg.json new file mode 100644 index 00000000000000..fd4541d3f8c2e6 --- /dev/null +++ b/ports/jsonnet/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "jsonnet", + "version-string": "0.16.0", + "port-version": 3, + "description": "Jsonnet - The data templating language", + "homepage": "https://github.com/google/jsonnet", + "dependencies": [ + "nlohmann-json" + ] +} diff --git a/ports/jwt-cpp/CONTROL b/ports/jwt-cpp/CONTROL deleted file mode 100644 index 4f44063feac519..00000000000000 --- a/ports/jwt-cpp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: jwt-cpp -Version: 2019-05-07 -Description: A header only library for creating and validating json web tokens in c++ \ No newline at end of file diff --git a/ports/jwt-cpp/fix-picojson.patch b/ports/jwt-cpp/fix-picojson.patch deleted file mode 100644 index 44c04fe58d46ef..00000000000000 --- a/ports/jwt-cpp/fix-picojson.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/include/jwt-cpp/jwt.h b/include/jwt-cpp/jwt.h -index ec56810..a26fd97 100644 ---- a/include/jwt-cpp/jwt.h -+++ b/include/jwt-cpp/jwt.h -@@ -1,6 +1,6 @@ - #pragma once - #define PICOJSON_USE_INT64 --#include "picojson.h" -+#include "picojson/picojson.h" - #include "base.h" - #include - #include diff --git a/ports/jwt-cpp/fix-warning.patch b/ports/jwt-cpp/fix-warning.patch deleted file mode 100644 index d013a7782b2445..00000000000000 --- a/ports/jwt-cpp/fix-warning.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/include/jwt-cpp/base.h b/include/jwt-cpp/base.h -index dfca7fc..4d05c0b 100644 ---- a/include/jwt-cpp/base.h -+++ b/include/jwt-cpp/base.h -@@ -2,6 +2,10 @@ - #include - #include - -+#ifdef _MSC_VER -+#pragma warning(disable : 4267) -+#endif -+ - namespace jwt { - namespace alphabet { - struct base64 { -diff --git a/include/jwt-cpp/jwt.h b/include/jwt-cpp/jwt.h -index ec56810..313cef2 100644 ---- a/include/jwt-cpp/jwt.h -+++ b/include/jwt-cpp/jwt.h -@@ -12,6 +12,11 @@ - #include - #include - -+#ifdef _MSC_VER -+#pragma warning(disable : 4267) -+#pragma warning(disable : 4067) -+#endif -+ - //If openssl version less than 1.1 - #if OPENSSL_VERSION_NUMBER < 269484032 - #define OPENSSL10 diff --git a/ports/jwt-cpp/portfile.cmake b/ports/jwt-cpp/portfile.cmake index 89ff9b04c7ae71..d501753be6542b 100644 --- a/ports/jwt-cpp/portfile.cmake +++ b/ports/jwt-cpp/portfile.cmake @@ -1,23 +1,12 @@ -#header-only library -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/jwt-cpp) - -vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH REPO Thalhammer/jwt-cpp - REF 1d2b1bac13e54f99df4f890cd674ec149c135762 - SHA512 a45f12104e38a8b05a0ea5b5f91034b65d85dd048664bbda4f2909df32688726d599161e3d6541fd6f36c784d21c24a4d2666f670c3281b9e9130bc8a96fce39 + REF 60122bbd8e6b9009c4633c1a33ea94c5b682034a # v0.5.1 + SHA512 ae905e217824d21ec9f098f562d993fbae71b2223e65f3bbcc29d352af61f2aa09b5c6b12c7d94742901a1374f9683335d3b4934c25b11500b710398331f6cb4 HEAD_REF master - PATCHES fix-picojson.patch - fix-warning.patch) +) # Copy the header files file(GLOB HEADER_FILES ${SOURCE_PATH}/include/jwt-cpp/*) -file(COPY ${HEADER_FILES} - DESTINATION ${CURRENT_PACKAGES_DIR}/include/jwt-cpp - REGEX "\.(gitattributes|gitignore|picojson.h)$" EXCLUDE) - -# Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/jwt-cpp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/jwt-cpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/jwt-cpp/copyright) \ No newline at end of file +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/jwt-cpp) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/jwt-cpp/vcpkg.json b/ports/jwt-cpp/vcpkg.json new file mode 100644 index 00000000000000..8f1471c37b2ea7 --- /dev/null +++ b/ports/jwt-cpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "jwt-cpp", + "version-semver": "0.5.1", + "port-version": 1, + "description": "A header only library for creating and validating json web tokens in c++", + "homepage": "https://github.com/Thalhammer/jwt-cpp", + "dependencies": [ + "picojson" + ] +} diff --git a/ports/jxrlib/CMakeLists.txt b/ports/jxrlib/CMakeLists.txt index 727b969069962e..7a73e3cba5ace4 100644 --- a/ports/jxrlib/CMakeLists.txt +++ b/ports/jxrlib/CMakeLists.txt @@ -20,6 +20,7 @@ endmacro() if(NOT MSVC) add_definitions(-D__ANSI__) + add_compile_options(-Wno-error=implicit-function-declaration) endif() include(TestBigEndian) diff --git a/ports/jxrlib/CONTROL b/ports/jxrlib/CONTROL deleted file mode 100644 index 8ed2805a4f701c..00000000000000 --- a/ports/jxrlib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: jxrlib -Version: 1.1-8 -Homepage: https://github.com/4creators/jxrlib -Description: Open source implementation of the jpegxr image format standard. diff --git a/ports/jxrlib/FindJXR.cmake b/ports/jxrlib/FindJXR.cmake index 7e4a5d45e860f6..79924d21da395a 100644 --- a/ports/jxrlib/FindJXR.cmake +++ b/ports/jxrlib/FindJXR.cmake @@ -21,7 +21,7 @@ find_library(JXRGLUE_LIBRARY_RELEASE NAMES jxrglue PATH_SUFFIXES lib) find_library(JXRGLUE_LIBRARY_DEBUG NAMES jxrglued PATH_SUFFIXES lib) select_library_configurations(JXRGLUE) -set(JXR_LIBRARIES ${JPEGXR_LIBRARY} ${JXRGLUE_LIBRARY}) +set(JXR_LIBRARIES ${JXRGLUE_LIBRARY} ${JPEGXR_LIBRARY}) mark_as_advanced(JXR_LIBRARIES) include(FindPackageHandleStandardArgs) diff --git a/ports/jxrlib/LICENSE b/ports/jxrlib/LICENSE deleted file mode 100644 index 2b6f03f6ce40f2..00000000000000 --- a/ports/jxrlib/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright © Microsoft Corp. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - • Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - • Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/ports/jxrlib/portfile.cmake b/ports/jxrlib/portfile.cmake index 76b0f61fa6abb6..a15541b9964a0c 100644 --- a/ports/jxrlib/portfile.cmake +++ b/ports/jxrlib/portfile.cmake @@ -1,23 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO 4creators/jxrlib - REF e922fa50cdf9a58f40cad07553bcaa2883d3c5bf - SHA512 15ed099e5f80571ebd86e115ed1c2dd18be4d6faa8b5f19212ea89582ec37e0ffa0629d80470fcb49f1c605996ea6ce76fd0dd95d9edee458ba290dff4d21537 + REF f7521879862b9085318e814c6157490dd9dbbdb4 + SHA512 f5617cbe73b6b905cc6bba181e6a3efedd59584f7a8c90e0f34db580cfdad4239a2ab753df4e221f26a5c0db51475b021052e3b9e3ab3673573573b1d57f3fdb HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) if(NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Darwin AND NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Linux) - # The file guiddef.h is part of the Windows SDK, - # we then remove the local copy shipped with jxrlib - file(REMOVE ${SOURCE_PATH}/common/include/guiddef.h) + # The file guiddef.h is part of the Windows SDK, + # we then remove the local copy shipped with jxrlib + file(REMOVE ${SOURCE_PATH}/common/include/guiddef.h) endif() vcpkg_configure_cmake( @@ -30,9 +26,10 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - #install FindJXR.cmake file -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindJXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindJXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/jxrlib/usage b/ports/jxrlib/usage new file mode 100644 index 00000000000000..6668ba162520da --- /dev/null +++ b/ports/jxrlib/usage @@ -0,0 +1,5 @@ +The package jxrlib provides CMake integration: + + find_package(JXR REQUIRED) + target_include_directories(main PRIVATE ${JXR_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${JXR_LIBRARIES}) diff --git a/ports/jxrlib/vcpkg-cmake-wrapper.cmake b/ports/jxrlib/vcpkg-cmake-wrapper.cmake index e95a66bdc4ed6a..4bee9171d8197c 100644 --- a/ports/jxrlib/vcpkg-cmake-wrapper.cmake +++ b/ports/jxrlib/vcpkg-cmake-wrapper.cmake @@ -1,8 +1,6 @@ set(JXR_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -if(NOT JXR_LIBRARIES) - _find_package(${ARGS}) -endif() +_find_package(${ARGS}) set(CMAKE_MODULE_PATH ${JXR_PREV_MODULE_PATH}) diff --git a/ports/jxrlib/vcpkg.json b/ports/jxrlib/vcpkg.json new file mode 100644 index 00000000000000..bdd2c9eb1e5237 --- /dev/null +++ b/ports/jxrlib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "jxrlib", + "version": "2019.10.9", + "port-version": 3, + "description": "Open source implementation of the jpegxr image format standard.", + "homepage": "https://github.com/4creators/jxrlib" +} diff --git a/ports/kangaru/CONTROL b/ports/kangaru/CONTROL deleted file mode 100644 index 9f7e93f1b47cec..00000000000000 --- a/ports/kangaru/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: kangaru -Version: 4.2.0 -Description: A dependency injection container for C++11, C++14 and later diff --git a/ports/kangaru/portfile.cmake b/ports/kangaru/portfile.cmake index c4ede7a3db3c30..1204f85547d9f7 100644 --- a/ports/kangaru/portfile.cmake +++ b/ports/kangaru/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gracicot/kangaru - REF v4.2.0 - SHA512 8495add3074370edaef397fa298d6e5305165c3d8e2d5abfa18b0853418cd47a75a38753d33bc58f1d038f1a8d0c8812b9763a822d580641e98c331495946b50 + REF 8da8f0d5a434a6fb2f317022221ea0809914d4a6 # v4.2.4 + SHA512 e5cfdad793db3b3d5ff093e4120a5131000677504eed09c02817c9a49699c044a88183413ad7b09946abb0258df34fe444078c375a5bf70589345d2aa2c2283b HEAD_REF master ) diff --git a/ports/kangaru/vcpkg.json b/ports/kangaru/vcpkg.json new file mode 100644 index 00000000000000..411c67133b602a --- /dev/null +++ b/ports/kangaru/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "kangaru", + "version-string": "4.2.4", + "port-version": 1, + "description": "A dependency injection container for C++11, C++14 and later" +} diff --git a/ports/kcp/portfile.cmake b/ports/kcp/portfile.cmake new file mode 100644 index 00000000000000..283b9fd669336d --- /dev/null +++ b/ports/kcp/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skywind3000/kcp + REF 4c58607c917c2a82bf116489c3eb89e4e9aa696d + SHA512 6689d6c2393eb96bba276de90aec584dae9da0dad5c7bd15519bc61de16de9123e19a945a9e29c5b5cc88bf844ebfb9681b27eb425e3a59a354f13488516cdcc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/kcp/vcpkg.json b/ports/kcp/vcpkg.json new file mode 100644 index 00000000000000..edc61d2307892a --- /dev/null +++ b/ports/kcp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "kcp", + "version-string": "2019-09-20", + "port-version": 1, + "description": "A fast and reliable ARQ protocol", + "homepage": "https://github.com/skywind3000/kcp" +} diff --git a/ports/kd-soap/CONTROL b/ports/kd-soap/CONTROL deleted file mode 100644 index b399126c1a311a..00000000000000 --- a/ports/kd-soap/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: kd-soap -Version: 1.8.0 -Description: A Qt-based client-side and server-side SOAP component -Homepage: https://www.kdab.com/products/kd-soap -Build-Depends: qt5-base diff --git a/ports/kd-soap/kd-soap.patch b/ports/kd-soap/kd-soap.patch deleted file mode 100644 index d48050faf15221..00000000000000 --- a/ports/kd-soap/kd-soap.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c3c824e..d7a1cce 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -168,6 +168,6 @@ if(${PROJECT_NAME}_IS_ROOT_PROJECT) - enable_testing() - add_subdirectory(testtools) - add_subdirectory(unittests) -+ add_subdirectory(examples) - endif() -- add_subdirectory(examples) - endif() diff --git a/ports/kd-soap/portfile.cmake b/ports/kd-soap/portfile.cmake index 61102836cc7f72..03f99fab8ba454 100644 --- a/ports/kd-soap/portfile.cmake +++ b/ports/kd-soap/portfile.cmake @@ -1,27 +1,32 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDAB/KDSoap - REF kdsoap-1.8.0 - SHA512 e118f2083887d1b5d613d793e87ec23a570a8a749ef7f4de65582998b735979b4c389a939169a893d735bdf110dc84a4cca5ee38146e4009be715902f6323bb9 + REF fb0e905e242c2044fd25683a406eb6d369db052f # kdsoap-1.9.0 + SHA512 30f78602702f2bb77f72bf0637b413d70976cf10789b18d1eb9c097f6b3821b86e75d0ae921454b2d39b7d023f479dc089cde1915533a37054f9b26893f611d3 HEAD_REF master - PATCHES kd-soap.patch ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KDSoap_STATIC) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DKDSoap_STATIC=${KDSoap_STATIC} + -DKDSoap_EXAMPLES=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KDSoap TARGET_PATH share/KDSoap) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/kd-soap RENAME copyright) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/kdwsdl2cpp.exe ${CURRENT_PACKAGES_DIR}/tools/kdwsdl2cpp.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/kdwsdl2cpp.exe) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/kdwsdl2cpp${VCPKG_TARGET_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/kdwsdl2cpp${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/kdwsdl2cpp${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/kd-soap/vcpkg.json b/ports/kd-soap/vcpkg.json new file mode 100644 index 00000000000000..3cd11e0e42b4c7 --- /dev/null +++ b/ports/kd-soap/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "kd-soap", + "version-string": "1.9.0", + "port-version": 1, + "description": "A Qt-based client-side and server-side SOAP component", + "homepage": "https://www.kdab.com/products/kd-soap", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/kealib/CONTROL b/ports/kealib/CONTROL deleted file mode 100644 index bb2b4cd48773e6..00000000000000 --- a/ports/kealib/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: kealib -Version: 1.4.11-1 -Build-Depends: hdf5[cpp], zlib, szip -Homepage: https://bitbucket.org/chchrsc/kealib -Description: kealib is gdal model using HDF5 standard. - -Feature: parallel -Description: Use parallel support for HDF5 -Build-Depends: hdf5[parallel], mpi diff --git a/ports/kealib/hdf5_include.patch b/ports/kealib/hdf5_include.patch index 35935dc34c6d2a..19598c56ba5789 100644 --- a/ports/kealib/hdf5_include.patch +++ b/ports/kealib/hdf5_include.patch @@ -1,4 +1,5 @@ -index 1f4b1474..40a0f55d 100644 +diff --git a/include/libkea/KEAAttributeTable.h b/include/libkea/KEAAttributeTable.h +index 95a5d7f..fbfebc1 100644 --- a/include/libkea/KEAAttributeTable.h +++ b/include/libkea/KEAAttributeTable.h @@ -37,7 +37,7 @@ @@ -10,7 +11,8 @@ index 1f4b1474..40a0f55d 100644 #include "libkea/KEACommon.h" #include "libkea/KEAException.h" - +diff --git a/include/libkea/KEAAttributeTableFile.h b/include/libkea/KEAAttributeTableFile.h +index 9987a7c..39dbb21 100644 --- a/include/libkea/KEAAttributeTableFile.h +++ b/include/libkea/KEAAttributeTableFile.h @@ -35,7 +35,7 @@ @@ -22,31 +24,34 @@ index 1f4b1474..40a0f55d 100644 #include "libkea/KEACommon.h" #include "libkea/KEAException.h" - ---- a/include/libkea/KEACommon.h -+++ b/include/libkea/KEACommon.h -@@ -36,7 +36,7 @@ +diff --git a/include/libkea/KEAAttributeTableInMem.h b/include/libkea/KEAAttributeTableInMem.h +index b4f7fad..6a8a8b7 100644 +--- a/include/libkea/KEAAttributeTableInMem.h ++++ b/include/libkea/KEAAttributeTableInMem.h +@@ -35,7 +35,7 @@ #include #include -#include "H5Cpp.h" +#include - // mark all exported classes/functions with DllExport to have - // them exported by Visual Studio - ---- a/include/libkea/KEAAttributeTableInMem.h -+++ b/include/libkea/KEAAttributeTableInMem.h -@@ -35,7 +35,7 @@ + #include "libkea/KEACommon.h" + #include "libkea/KEAException.h" +diff --git a/include/libkea/KEACommon.h b/include/libkea/KEACommon.h +index 3175c93..67b02a2 100644 +--- a/include/libkea/KEACommon.h ++++ b/include/libkea/KEACommon.h +@@ -38,7 +38,7 @@ #include #include -#include "H5Cpp.h" +#include - #include "libkea/KEACommon.h" - #include "libkea/KEAException.h" - + // MSVC 2008 uses different names.... + #ifdef _MSC_VER +diff --git a/include/libkea/KEAImageIO.h b/include/libkea/KEAImageIO.h +index d510cae..4c2aa97 100644 --- a/include/libkea/KEAImageIO.h +++ b/include/libkea/KEAImageIO.h @@ -35,7 +35,7 @@ @@ -58,5 +63,3 @@ index 1f4b1474..40a0f55d 100644 #include "libkea/KEACommon.h" #include "libkea/KEAException.h" - - diff --git a/ports/kealib/portfile.cmake b/ports/kealib/portfile.cmake index 69a01720829beb..eabf0c46de1ea7 100644 --- a/ports/kealib/portfile.cmake +++ b/ports/kealib/portfile.cmake @@ -1,44 +1,25 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/kealib-1.4.11) -vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.org/chchrsc/kealib/downloads/kealib-1.4.11.tar.gz" - FILENAME "kealib-1.4.11.tar.gz" - SHA512 e080dfd51111f85ddf8ab1bd71aaf7ec6cbe814db29ed62806362ef83718f777935347d9063cf29085f21bf09d4277fd88f5269af6555304130f50d093d28f63 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ubarsc/kealib + REF 4984102cf5867105a28ae754689566217309d120 #1.4.14 + SHA512 06628996757bc9cffc5af0f03468ec32246980b6f72f7f1c88a489a8a2aed70924115df0726fcbb9851e44030c6a44ee0f3137660de43af421dec1eab81cc147 + HEAD_REF master + PATCHES hdf5_include.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - hdf5_include.patch -) - -if ("parallel" IN_LIST FEATURES) - set(ENABLE_PARALLEL ON) -else() - set(ENABLE_PARALLEL OFF) -endif() - -if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") - set(HDF5_USE_STATIC_LIBRARIES ON) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DHDF5_PREFER_PARALLEL=${ENABLE_PARALLEL} - -DLIBKEA_WITH_GDAL=OFF - -DDISABLE_TESTS=ON - -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} + -DLIBKEA_WITH_GDAL=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/python/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/kealib RENAME copyright) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) -endif() \ No newline at end of file + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/kealib/vcpkg.json b/ports/kealib/vcpkg.json new file mode 100644 index 00000000000000..d956725b952fca --- /dev/null +++ b/ports/kealib/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "kealib", + "version": "1.4.14", + "description": "KEALib provides an implementation of the GDAL data model using HDF5.", + "homepage": "https://github.com/ubarsc/kealib", + "dependencies": [ + { + "name": "hdf5", + "features": [ + "cpp" + ] + }, + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/kenlm/fix-boost.patch b/ports/kenlm/fix-boost.patch new file mode 100644 index 00000000000000..3eded1c69c6e08 --- /dev/null +++ b/ports/kenlm/fix-boost.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bec81d4..44fd48a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 3.1) + +-if (WIN32) ++if (WIN32 AND BUILD_SHARED_LIBS) + set(Boost_USE_STATIC_LIBS OFF) + # The auto-linking feature has problems with USE_STATIC_LIBS off, so we use + # BOOST_ALL_NO_LIB to turn it off. diff --git a/ports/kenlm/fix-const-overloaded.patch b/ports/kenlm/fix-const-overloaded.patch new file mode 100644 index 00000000000000..2a77b335f858a3 --- /dev/null +++ b/ports/kenlm/fix-const-overloaded.patch @@ -0,0 +1,14 @@ +diff --git a/util/proxy_iterator.hh b/util/proxy_iterator.hh +index 8aa697b..9de2663 100644 +--- a/util/proxy_iterator.hh ++++ b/util/proxy_iterator.hh +@@ -77,8 +77,7 @@ template class ProxyIterator { + + std::ptrdiff_t operator-(const S &other) const { return I() - other.I(); } + +- Proxy operator*() { return p_; } +- const Proxy operator*() const { return p_; } ++ Proxy operator*() const { return p_; } + Proxy *operator->() { return &p_; } + const Proxy *operator->() const { return &p_; } + Proxy operator[](std::ptrdiff_t amount) const { return *(*this + amount); } diff --git a/ports/kenlm/portfile.cmake b/ports/kenlm/portfile.cmake new file mode 100644 index 00000000000000..ad0c5c6c9408c0 --- /dev/null +++ b/ports/kenlm/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kpu/kenlm + REF 1f054617eca14eae921e987b4b4eeb2b1d91de6b + SHA512 c18f9c22fbbb1f54ebe9c3b771fb2d7c09d502141d1b3645cff9db44cc51b3c976311ff0db79b60f410622579d043f185c56a4c7386e1b0ba8708e433238968b + HEAD_REF master + PATCHES + fix-boost.patch + fix-const-overloaded.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/modules/FindEigen3.cmake) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + interpolate ENABLE_INTERPOLATE +) + +if ("interpolate" IN_LIST FEATURES AND VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "The interpolate feature does not support Windows.") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DFORCE_STATIC=OFF #already handled by vcpkg + -DENABLE_PYTHON=OFF # kenlm.lib(bhiksha.cc.obj) : fatal error LNK1000: Internal error during IMAGE::Pass2 + -DCOMPILE_TESTS=OFF +) +vcpkg_install_cmake() + +set(KENLM_TOOLS count_ngrams filter fragment kenlm_benchmark lmplz phrase_table_vocab query build_binary) +if (NOT VCPKG_TARGET_IS_WINDOWS) + list(APPEND KENLM_TOOLS probing_hash_table_benchmark) + if ("interpolate" IN_LIST FEATURES) + list(APPEND KENLM_TOOLS interpolate) + endif() +endif() +vcpkg_copy_tools(TOOL_NAMES ${KENLM_TOOLS} AUTO_CLEAN) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# Copyright and License +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME license) diff --git a/ports/kenlm/vcpkg.json b/ports/kenlm/vcpkg.json new file mode 100644 index 00000000000000..66c218ad92c24e --- /dev/null +++ b/ports/kenlm/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "kenlm", + "version-string": "20200924", + "port-version": 1, + "description": "KenLM: Faster and Smaller Language Model Queries", + "supports": "!(arm64 & windows)", + "dependencies": [ + "boost-interprocess", + "boost-program-options", + "boost-ptr-container", + "boost-system", + "boost-test", + "boost-thread", + "bzip2", + { + "name": "eigen3", + "platform": "!windows" + }, + "liblzma", + "zlib" + ], + "features": { + "interpolate": { + "description": "Build interpolation program", + "dependencies": [ + { + "name": "eigen3", + "platform": "!windows" + } + ] + } + } +} diff --git a/ports/keystone/CONTROL b/ports/keystone/CONTROL deleted file mode 100644 index 70443a202c824a..00000000000000 --- a/ports/keystone/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: keystone -Version: 0.9.1 -Description: Lightweight multi-platform, multi-architecture assembler framework diff --git a/ports/keystone/portfile.cmake b/ports/keystone/portfile.cmake index 6f740aedaf1804..6a6e25690e9f06 100644 --- a/ports/keystone/portfile.cmake +++ b/ports/keystone/portfile.cmake @@ -1,51 +1,46 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO keystone-engine/keystone - REF 0.9.1 - SHA512 3bd9c3793d5862a0a8628b52da381625e62445f661dbd5ed715723e7d9db01ce3f9586e5ca0a5cc71e8ceb6c912050f5c28e3ccd540e72c8abcfd2f0d1bbae17 + REF dc7932ef2b2c4a793836caec6ecab485005139d6 # 0.9.2 + SHA512 ebcdb1cca6dfdf76e0ad2a42a667044806e5c083c07357908298c6ef23d15960f887efa05c1cb3dee90ebdcd5af819bcf8af0fa1aa068aa9a0c6703dee29514e HEAD_REF master ) vcpkg_find_acquire_program(PYTHON2) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" KEYSTONE_BUILD_STATIC_RUNTIME) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DKEYSTONE_BUILD_STATIC=${KEYSTONE_BUILD_STATIC} - -DKEYSTONE_BUILD_SHARED=${KEYSTONE_BUILD_SHARED} + -DKEYSTONE_BUILD_STATIC_RUNTIME=${KEYSTONE_BUILD_STATIC_RUNTIME} -DPYTHON_EXECUTABLE=${PYTHON2} # Add support for only a subset of architectures #-DLLVM_TARGETS_TO_BUILD="AArch64;X86" ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -if(EXES) - file(REMOVE ${EXES}) -endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + #For windows, do not build kstool if building DLL https://github.com/keystone-engine/keystone/blob/master/CMakeLists.txt#L74 + vcpkg_copy_tools(TOOL_NAMES kstool AUTO_CLEAN) else() # Move DLLs - file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) - file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") + file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") file(REMOVE ${DLLS}) - file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) - file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") + file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") file(REMOVE ${DLLS}) endif() +vcpkg_fixup_pkgconfig() + # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING - DESTINATION ${CURRENT_PACKAGES_DIR}/share/keystone - RENAME copyright -) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/keystone/vcpkg.json b/ports/keystone/vcpkg.json new file mode 100644 index 00000000000000..62827d58e690d2 --- /dev/null +++ b/ports/keystone/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "keystone", + "version-semver": "0.9.2", + "port-version": 1, + "description": "A Lightweight multi-platform, multi-architecture assembler framework.", + "homepage": "https://github.com/keystone-engine/keystone", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/kf5archive/CONTROL b/ports/kf5archive/CONTROL deleted file mode 100644 index 94216747107178..00000000000000 --- a/ports/kf5archive/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: kf5archive -Version: 5.58.0 -Description: File compression -Build-Depends: ecm, qt5-base, zlib, bzip2 \ No newline at end of file diff --git a/ports/kf5archive/add_support_for_static_builds.patch b/ports/kf5archive/add_support_for_static_builds.patch new file mode 100644 index 00000000000000..7ad973d3936c18 --- /dev/null +++ b/ports/kf5archive/add_support_for_static_builds.patch @@ -0,0 +1,46 @@ +From 5dc3f846c27ee6d55131db475975e3c24cd0c19c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Wed, 28 Jul 2021 11:39:30 +0200 +Subject: [PATCH] Add support for static builds + +--- + KF5ArchiveConfig.cmake.in | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/KF5ArchiveConfig.cmake.in b/KF5ArchiveConfig.cmake.in +index 3d32642..0a738c2 100644 +--- a/KF5ArchiveConfig.cmake.in ++++ b/KF5ArchiveConfig.cmake.in +@@ -4,9 +4,29 @@ include(CMakeFindDependencyMacro) + find_dependency(Qt5Core @REQUIRED_QT_VERSION@) + + ++set(KArchive_HAVE_ZLIB "@ZLIB_FOUND@") + set(KArchive_HAVE_BZIP2 "@BZIP2_FOUND@") + set(KArchive_HAVE_LZMA "@LIBLZMA_FOUND@") + set(KArchive_HAVE_ZSTD "@LibZstd_FOUND@") + ++if (NOT @BUILD_SHARED_LIBS@) ++ if (@ZLIB_FOUND@) ++ find_dependency(ZLIB) ++ endif() ++ ++ if (@BZIP2_FOUND@) ++ find_dependency(BZip2) ++ endif() ++ ++ if (@LIBLZMA_FOUND@) ++ find_dependency(LibLZMA) ++ endif() ++ ++ if (@LibZstd_FOUND@) ++ find_package(PkgConfig) ++ pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") ++ endif() ++endif() ++ + include("${CMAKE_CURRENT_LIST_DIR}/KF5ArchiveTargets.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ +-- +GitLab + diff --git a/ports/kf5archive/add_zstd_to_cmake_config.patch b/ports/kf5archive/add_zstd_to_cmake_config.patch new file mode 100644 index 00000000000000..8b960bb4f08f39 --- /dev/null +++ b/ports/kf5archive/add_zstd_to_cmake_config.patch @@ -0,0 +1,26 @@ +From 5a79756f381e1a1843cb2171bdc151dad53fb7db Mon Sep 17 00:00:00 2001 +From: "Friedrich W. H. Kossebau" +Date: Wed, 7 Jul 2021 03:09:38 +0200 +Subject: [PATCH] Report KArchive_HAVE_ZSTD in CMake Config file to consumers + +Allows users of KArchive to query whether zstd is available, +in the same way as lzma & bzip2 +--- + KF5ArchiveConfig.cmake.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/KF5ArchiveConfig.cmake.in b/KF5ArchiveConfig.cmake.in +index 0d59d63..3d32642 100644 +--- a/KF5ArchiveConfig.cmake.in ++++ b/KF5ArchiveConfig.cmake.in +@@ -6,6 +6,7 @@ find_dependency(Qt5Core @REQUIRED_QT_VERSION@) + + set(KArchive_HAVE_BZIP2 "@BZIP2_FOUND@") + set(KArchive_HAVE_LZMA "@LIBLZMA_FOUND@") ++set(KArchive_HAVE_ZSTD "@LibZstd_FOUND@") + + include("${CMAKE_CURRENT_LIST_DIR}/KF5ArchiveTargets.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ +-- +GitLab + diff --git a/ports/kf5archive/only_pkg_check_modules_if_pkgconfig_found.patch b/ports/kf5archive/only_pkg_check_modules_if_pkgconfig_found.patch new file mode 100644 index 00000000000000..f3db3a4fb71bd0 --- /dev/null +++ b/ports/kf5archive/only_pkg_check_modules_if_pkgconfig_found.patch @@ -0,0 +1,27 @@ +From 9ab5f2bfbe59038b0d0b6ca7f1b22d1c9229c67e Mon Sep 17 00:00:00 2001 +From: Dawid Wrobel +Date: Fri, 30 Jul 2021 10:23:48 +0000 +Subject: [PATCH] Only pkg_check_modules() if PkgConfig is found + +--- + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bab7661..2cdda70 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,7 +45,9 @@ set_package_properties(LibLZMA PROPERTIES + ) + + find_package(PkgConfig) +-pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") ++if (PkgConfig_FOUND) ++ pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") ++endif() + add_feature_info(LibZstd LibZstd_FOUND + "Support for zstd compressed files and data streams" + ) +-- +GitLab + diff --git a/ports/kf5archive/portfile.cmake b/ports/kf5archive/portfile.cmake index 4e028695f199d9..ef1582bc03dfcd 100644 --- a/ports/kf5archive/portfile.cmake +++ b/ports/kf5archive/portfile.cmake @@ -1,27 +1,43 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDE/karchive - REF v5.58.0 - SHA512 8ac1ff25db7e27881cbea640744639a087a8fc87251337bca5c557b3ef3ec2b3490d3d1f2caf8fc22e0671dad1945e9263a59d22e4d1c395bd3b422cbb7ad1de + REF v5.84.0 + SHA512 82926f62424446df0f4fc300f57ae9bd5baf8e13da2ce4135ac56c0c52a0307bffb06f84ac7e8e658e96ace2ae3d530f27e232061284ac87271404f218e9fdd4 HEAD_REF master + PATCHES + only_pkg_check_modules_if_pkgconfig_found.patch # https://invent.kde.org/frameworks/karchive/-/commit/9ab5f2bfbe59038b0d0b6ca7f1b22d1c9229c67e + add_zstd_to_cmake_config.patch # https://invent.kde.org/frameworks/karchive/-/commit/5a79756f381e1a1843cb2171bdc151dad53fb7db + add_support_for_static_builds.patch # https://invent.kde.org/frameworks/karchive/-/merge_requests/23 + use_cmake_to_find_zstd.patch # https://invent.kde.org/frameworks/karchive/-/merge_requests/24 +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + "lzma" CMAKE_DISABLE_FIND_PACKAGE_LibLZMA + "zstd" CMAKE_DISABLE_FIND_PACKAGE_ZSTD ) -vcpkg_configure_cmake( +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DBUILD_HTML_DOCS=OFF - -DBUILD_MAN_DOCS=OFF - -DBUILD_QTHELP_DOCS=OFF - -DBUILD_TESTING=OFF + OPTIONS + -DBUILD_TESTING=OFF + ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Archive) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Archive CONFIG_PATH lib/cmake/KF5Archive) vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) -file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/kf5archive RENAME copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/etc") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5archive/use_cmake_to_find_zstd.patch b/ports/kf5archive/use_cmake_to_find_zstd.patch new file mode 100644 index 00000000000000..ee7dfd555b0f80 --- /dev/null +++ b/ports/kf5archive/use_cmake_to_find_zstd.patch @@ -0,0 +1,49 @@ +From 82fc20234d4cf8abdec1a2b4fea9823154f1aecc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Fri, 27 Aug 2021 01:48:53 +0200 +Subject: [PATCH] Use CMake to find ZSTD + +--- + CMakeLists.txt | 11 +++++------ + KF5ArchiveConfig.cmake.in | 3 +-- + 2 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8ab85f4..ece1f77 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,12 +44,11 @@ set_package_properties(LibLZMA PROPERTIES + PURPOSE "Support for xz compressed files and data streams" + ) + +-find_package(PkgConfig) +-if (PkgConfig_FOUND) +- pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") +-endif() +-add_feature_info(LibZstd LibZstd_FOUND +- "Support for zstd compressed files and data streams" ++find_package(ZSTD) ++set_package_properties(LibZstd PROPERTIES ++ URL "http://www.zstd.net" ++ DESCRIPTION "Support for zstd compressed files and data streams" ++ PURPOSE "Support for zstd compressed files and data streams" + ) + + include(ECMSetupVersion) +diff --git a/KF5ArchiveConfig.cmake.in b/KF5ArchiveConfig.cmake.in +index 0a738c2..d868324 100644 +--- a/KF5ArchiveConfig.cmake.in ++++ b/KF5ArchiveConfig.cmake.in +@@ -23,8 +23,7 @@ if (NOT @BUILD_SHARED_LIBS@) + endif() + + if (@LibZstd_FOUND@) +- find_package(PkgConfig) +- pkg_check_modules(LibZstd IMPORTED_TARGET "libzstd") ++ find_dependency(ZSTD) + endif() + endif() + +-- +GitLab + diff --git a/ports/kf5archive/vcpkg.json b/ports/kf5archive/vcpkg.json new file mode 100644 index 00000000000000..227be8c662f83f --- /dev/null +++ b/ports/kf5archive/vcpkg.json @@ -0,0 +1,35 @@ +{ + "name": "kf5archive", + "version-semver": "5.84.0", + "port-version": 2, + "description": "File compression", + "homepage": "https://api.kde.org/frameworks/karchive/html/index.html", + "dependencies": [ + "bzip2", + "ecm", + "qt5-base", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "lzma": { + "description": "Support for xz compressed files and data streams", + "dependencies": [ + "liblzma" + ] + }, + "zstd": { + "description": "Support for zstd compressed files and data streams", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/ports/kf5attica/portfile.cmake b/ports/kf5attica/portfile.cmake new file mode 100644 index 00000000000000..ed6183e4bc7efb --- /dev/null +++ b/ports/kf5attica/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/attica + REF v5.84.0 + SHA512 dedaac49d85c791027a567f82909953f06337734c9302ab4147341eb5ebdb14e2a1ffcfdf49d9e0c97e17e065498392f9a1a900557fe8937fa0e680cda2235ea + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF5Attica) +vcpkg_copy_pdbs() + +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() + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5attica/vcpkg.json b/ports/kf5attica/vcpkg.json new file mode 100644 index 00000000000000..4234fb9a886373 --- /dev/null +++ b/ports/kf5attica/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "kf5attica", + "version-semver": "5.84.0", + "port-version": 1, + "description": "A Qt library that implements the Open Collaboration Services API", + "homepage": "https://api.kde.org/frameworks/attica/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5auth/portfile.cmake b/ports/kf5auth/portfile.cmake new file mode 100644 index 00000000000000..806e81226ca4c7 --- /dev/null +++ b/ports/kf5auth/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kauth + REF v5.84.0 + SHA512 9f08f5e7de240c100e7ea6fcd6c71947cacfafbf0631f7e441a64ef36b0d51fa097b8ccc164c7b20441524a7211d84f9fc62d9a2bc62342e26938c133faf0940 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTING=OFF + -DKDE_INSTALL_PLUGINDIR=plugins + -DKDE_INSTALL_DATAROOTDIR=data + +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Auth CONFIG_PATH lib/cmake/KF5Auth) + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/kf5auth/vcpkg.json b/ports/kf5auth/vcpkg.json new file mode 100644 index 00000000000000..2942db273a2b86 --- /dev/null +++ b/ports/kf5auth/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "kf5auth", + "version": "5.84.0", + "port-version": 2, + "description": "Execute actions as privileged user", + "homepage": "https://api.kde.org/frameworks/kauth/html/index.html", + "dependencies": [ + "ecm", + "kf5coreaddons", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5codecs/portfile.cmake b/ports/kf5codecs/portfile.cmake new file mode 100644 index 00000000000000..6637557aa80113 --- /dev/null +++ b/ports/kf5codecs/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kcodecs + REF v5.84.0 + SHA512 77f27883f588e9f4bd5458e4e4a596c494ff4fc0a7230ac757926db13d69f010a72f84d828ae83f48e5019ea96da58251c190dd6d38408f64089ac42501b7439 + HEAD_REF master +) + +vcpkg_find_acquire_program(GPERF) +get_filename_component(GPERF_EXE_PATH ${GPERF} DIRECTORY) +vcpkg_add_to_path(${GPERF_EXE_PATH}) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Codecs CONFIG_PATH lib/cmake/KF5Codecs) + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/ports/kf5codecs/vcpkg.json b/ports/kf5codecs/vcpkg.json new file mode 100644 index 00000000000000..94958f804bd5eb --- /dev/null +++ b/ports/kf5codecs/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "kf5codecs", + "version": "5.84.0", + "port-version": 2, + "description": "String encoding library", + "homepage": "https://api.kde.org/frameworks/kcodecs/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5completion/portfile.cmake b/ports/kf5completion/portfile.cmake new file mode 100644 index 00000000000000..a24e0c803b4421 --- /dev/null +++ b/ports/kf5completion/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kcompletion + REF v5.84.0 + SHA512 1aee65de9e8aa83274d772afcce764ab800e94cffb8ab203c53ffdb944c53e46115afe4148dadf777c0a1afc815b9382e4e319ba09e266b4487405307d838322 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DBUILD_DESIGNERPLUGIN=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Completion) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/ports/kf5completion/vcpkg.json b/ports/kf5completion/vcpkg.json new file mode 100644 index 00000000000000..9a185f1a139621 --- /dev/null +++ b/ports/kf5completion/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "kf5completion", + "version": "5.84.0", + "port-version": 2, + "description": "Text completion helpers and widgets", + "homepage": "https://api.kde.org/frameworks/kcompletion/html/index.html", + "dependencies": [ + "ecm", + "kf5config", + "kf5widgetsaddons", + "qt5-tools" + ] +} diff --git a/ports/kf5config/portfile.cmake b/ports/kf5config/portfile.cmake new file mode 100644 index 00000000000000..ddd842766235f4 --- /dev/null +++ b/ports/kf5config/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kconfig + REF v5.84.0 + SHA512 54d28ce5dae8c3b40c338d7aa848296b0aa4f56f94ca32d123df182e34e50c9969bdc1672c28e5412f7df7d94ff4305377dbf42c05c69965c023af762cfc29bf + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/kconfig_compiler_kf5.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/kconfig_compiler_kf5.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/kconf_update.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/kconf_update.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/kreadconfig5.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/kwriteconfig5.exe) + file (GLOB EXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${EXES}) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/kreadconfig5) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/kwriteconfig5) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/kreadconfig5) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/kwriteconfig5) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Config) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(APPEND ${CURRENT_PACKAGES_DIR}/tools/${PORT}/qt.conf "Data = ../../data") +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/kf5config/vcpkg.json b/ports/kf5config/vcpkg.json new file mode 100644 index 00000000000000..cccf3ac82a1c84 --- /dev/null +++ b/ports/kf5config/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "kf5config", + "version": "5.84.0", + "port-version": 2, + "description": "Configuration system", + "homepage": "https://api.kde.org/frameworks/kconfig/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools" + ] +} diff --git a/ports/kf5configwidgets/add_support_for_static_builds.patch b/ports/kf5configwidgets/add_support_for_static_builds.patch new file mode 100644 index 00000000000000..2578a9e66ec64b --- /dev/null +++ b/ports/kf5configwidgets/add_support_for_static_builds.patch @@ -0,0 +1,36 @@ +From 743ec1f30b449b048c942f194ad665bf2170bbf1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Thu, 26 Aug 2021 16:48:23 +0200 +Subject: [PATCH] Add support for static builds + +--- + KF5ConfigWidgetsConfig.cmake.in | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/KF5ConfigWidgetsConfig.cmake.in b/KF5ConfigWidgetsConfig.cmake.in +index 57c83f0..78fc736 100644 +--- a/KF5ConfigWidgetsConfig.cmake.in ++++ b/KF5ConfigWidgetsConfig.cmake.in +@@ -8,5 +8,19 @@ find_dependency(KF5Codecs "@KF_DEP_VERSION@") + find_dependency(KF5Config "@KF_DEP_VERSION@") + find_dependency(KF5WidgetsAddons "@KF_DEP_VERSION@") + ++ ++if (NOT @BUILD_SHARED_LIBS@) ++ find_dependency(Qt5Widgets "@REQUIRED_QT_VERSION@") ++ ++ if (NOT ANDROID) ++ find_dependency(Qt5DBus "@REQUIRED_QT_VERSION@") ++ endif() ++ ++ find_dependency(KF5CoreAddons "@KF_DEP_VERSION@") ++ find_dependency(KF5GuiAddons "@KF_DEP_VERSION@") ++ find_dependency(KF5I18n "@KF_DEP_VERSION@") ++endif() ++ ++ + include("${CMAKE_CURRENT_LIST_DIR}/KF5ConfigWidgetsTargets.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ +-- +GitLab + diff --git a/ports/kf5configwidgets/portfile.cmake b/ports/kf5configwidgets/portfile.cmake new file mode 100644 index 00000000000000..2f1a73a5f3d72a --- /dev/null +++ b/ports/kf5configwidgets/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kconfigwidgets + REF v5.84.0 + SHA512 da03f4cfc2a64b3ccccfe2b6b7f392f84aba2b975edbf6a5b08a14604ccb565a4491c7eb707af7191345b55ca81e864b7ee13fe648589a56f3226c26160ed024 + HEAD_REF master + PATCHES + add_support_for_static_builds.patch # https://invent.kde.org/frameworks/kconfigwidgets/-/merge_requests/71 +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + designerplugin BUILD_DESIGNERPLUGIN +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DKDE_INSTALL_PLUGINDIR=plugins + -DKDE_INSTALL_QTPLUGINDIR=plugins + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5ConfigWidgets CONFIG_PATH lib/cmake/KF5ConfigWidgets) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") \ No newline at end of file diff --git a/ports/kf5configwidgets/vcpkg.json b/ports/kf5configwidgets/vcpkg.json new file mode 100644 index 00000000000000..4950f72f9118f7 --- /dev/null +++ b/ports/kf5configwidgets/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "kf5configwidgets", + "version-semver": "5.84.0", + "port-version": 1, + "description": "Widgets for configuration dialogs", + "homepage": "https://api.kde.org/frameworks/kconfigwidgets/html/index.html", + "dependencies": [ + "ecm", + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "kf5auth", + "kf5codecs", + "kf5config", + "kf5guiaddons", + "kf5i18n", + "kf5widgetsaddons", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "designerplugin": { + "description": "Enables a Qt Designer plugin" + } + } +} diff --git a/ports/kf5coreaddons/fix_cmake_config.patch b/ports/kf5coreaddons/fix_cmake_config.patch new file mode 100644 index 00000000000000..059da3c70b5e75 --- /dev/null +++ b/ports/kf5coreaddons/fix_cmake_config.patch @@ -0,0 +1,38 @@ +From 4588b0052c11189aa6872e3c3c13f05dbae0c26e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Fri, 27 Aug 2021 02:02:08 +0200 +Subject: [PATCH] Add support for static builds + +--- + KF5CoreAddonsConfig.cmake.in | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/KF5CoreAddonsConfig.cmake.in b/KF5CoreAddonsConfig.cmake.in +index f86b69ff..f9e0d31f 100644 +--- a/KF5CoreAddonsConfig.cmake.in ++++ b/KF5CoreAddonsConfig.cmake.in +@@ -18,6 +18,21 @@ else() + set_target_properties(KF5::desktoptojson PROPERTIES IMPORTED_LOCATION ${DESKTOPTOJSON_EXECUTABLE}) + endif() + endif() ++ ++if(NOT @BUILD_SHARED_LIBS@) ++ if(NOT WIN32) ++ find_dependency(Threads) ++ endif() ++ ++ if(@Inotify_FOUND@) ++ find_package(Inotify) # https://bugs.kde.org/show_bug.cgi?id=441604 ++ endif() ++ ++ if(@Procstat_FOUND@) ++ find_dependency(Procstat) ++ endif() ++endif() ++ + include("${CMAKE_CURRENT_LIST_DIR}/KF5CoreAddonsTargets.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/KF5CoreAddonsMacros.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ +-- +GitLab + diff --git a/ports/kf5coreaddons/fix_static_build.patch b/ports/kf5coreaddons/fix_static_build.patch new file mode 100644 index 00000000000000..400af0032ca88f --- /dev/null +++ b/ports/kf5coreaddons/fix_static_build.patch @@ -0,0 +1,51 @@ +From de4e22fe644d5df9066ba78f778032a42c2f19b9 Mon Sep 17 00:00:00 2001 +From: Nicolas Fella +Date: Sat, 7 Aug 2021 17:24:44 +0200 +Subject: [PATCH] Fix issue when building KCrash static + +KCoreAddons forward declares a function from KCrash. + +It contains a Q_DECL_IMPORT but that breaks when doing a static build. + +Only add the Q_DECL_IMPORT when we are doing a dynamic build. + +BUG: 440416 +--- + src/lib/CMakeLists.txt | 4 ++++ + src/lib/kaboutdata.h | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt +index 8e9006fd..b3ea957f 100644 +--- a/src/lib/CMakeLists.txt ++++ b/src/lib/CMakeLists.txt +@@ -16,6 +16,10 @@ configure_file(util/config-accountsservice.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/c + add_library(KF5CoreAddons) + add_library(KF5::CoreAddons ALIAS KF5CoreAddons) + ++if(NOT BUILD_SHARED_LIBS) ++ target_compile_definitions(KF5CoreAddons PUBLIC -DKCOREADDONS_STATIC) ++endif() ++ + ecm_create_qm_loader(KF5CoreAddons kcoreaddons5_qt) + + if (FAM_FOUND) +diff --git a/src/lib/kaboutdata.h b/src/lib/kaboutdata.h +index 4309b145..a0222861 100644 +--- a/src/lib/kaboutdata.h ++++ b/src/lib/kaboutdata.h +@@ -27,7 +27,11 @@ class KAboutData; + class KPluginMetaData; + namespace KCrash + { ++#ifdef KCOREADDONS_STATIC ++void defaultCrashHandler(int sig); ++#else + Q_DECL_IMPORT void defaultCrashHandler(int sig); ++#endif + } + + /** +-- +GitLab + diff --git a/ports/kf5coreaddons/portfile.cmake b/ports/kf5coreaddons/portfile.cmake new file mode 100644 index 00000000000000..e137973256c600 --- /dev/null +++ b/ports/kf5coreaddons/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kcoreaddons + REF v5.84.0 + SHA512 58a802d03bea135c192265651540f9f87066b20ee4af620a94a874ec3992c5e734d1ab1e4ccb082de97389fa3479fd3672ec586c3dd36c9b4a5422c7be98d119 + PATCHES + fix_static_build.patch # https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/122 + fix_cmake_config.patch # https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/129 +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5CoreAddons CONFIG_PATH lib/cmake/KF5CoreAddons) +vcpkg_copy_pdbs() + +vcpkg_copy_tools( + TOOL_NAMES desktoptojson + AUTO_CLEAN +) + +file(APPEND "${CURRENT_PACKAGES_DIR}/tools/${PORT}/qt.conf" "Data = ../../share") + +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() + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") \ No newline at end of file diff --git a/ports/kf5coreaddons/vcpkg.json b/ports/kf5coreaddons/vcpkg.json new file mode 100644 index 00000000000000..22373698211bbe --- /dev/null +++ b/ports/kf5coreaddons/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "kf5coreaddons", + "version-semver": "5.84.0", + "port-version": 2, + "description": "Addons to QtCore", + "homepage": "https://api.kde.org/frameworks/kcoreaddons/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5crash/portfile.cmake b/ports/kf5crash/portfile.cmake new file mode 100644 index 00000000000000..b6382e19c02f07 --- /dev/null +++ b/ports/kf5crash/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kcrash + REF v5.84.0 + SHA512 db37a481e0d34e0024cabd77c22680171fa383ea300c56c73f807380fd818263d27f36fb012fc6604b462dbf9374db39bab94c4dc2c3bff488ac9812d01eb2dd + HEAD_REF master + PATCHES + support_static_builds.patch # https://invent.kde.org/frameworks/kcrash/-/merge_requests/23 +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Crash CONFIG_PATH lib/cmake/KF5Crash) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/data") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5crash/support_static_builds.patch b/ports/kf5crash/support_static_builds.patch new file mode 100644 index 00000000000000..4c5eb8e529aa5d --- /dev/null +++ b/ports/kf5crash/support_static_builds.patch @@ -0,0 +1,31 @@ +From dc45a01fec854b5e2a49196e82e1a336ab642764 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Wed, 28 Jul 2021 03:04:39 +0200 +Subject: [PATCH] Support static builds + +--- + KF5CrashConfig.cmake.in | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/KF5CrashConfig.cmake.in b/KF5CrashConfig.cmake.in +index 0222495..494c810 100644 +--- a/KF5CrashConfig.cmake.in ++++ b/KF5CrashConfig.cmake.in +@@ -5,6 +5,14 @@ + include(CMakeFindDependencyMacro) + find_dependency(Qt5Core @REQUIRED_QT_VERSION@) + ++if (NOT @BUILD_SHARED_LIBS@) ++ find_dependency(KF5CoreAddons REQUIRED) ++ find_dependency(KF5WindowSystem REQUIRED) ++ ++ if (@X11_FOUND@) ++ find_dependency(Qt5X11Extras REQUIRED) ++ endif() ++endif() + + include("${CMAKE_CURRENT_LIST_DIR}/KF5CrashTargets.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ +-- +GitLab + diff --git a/ports/kf5crash/vcpkg.json b/ports/kf5crash/vcpkg.json new file mode 100644 index 00000000000000..9b6b62bc918295 --- /dev/null +++ b/ports/kf5crash/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "kf5crash", + "version-semver": "5.84.0", + "port-version": 2, + "description": "KCrash provides support for intercepting and handling application crashes.", + "homepage": "https://api.kde.org/frameworks/kcrash/html/index.html", + "dependencies": [ + "ecm", + "kf5coreaddons", + "kf5windowsystem", + { + "name": "qt5-x11extras", + "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5dbusaddons/portfile.cmake b/ports/kf5dbusaddons/portfile.cmake new file mode 100644 index 00000000000000..73aab78ae3a1a8 --- /dev/null +++ b/ports/kf5dbusaddons/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kdbusaddons + REF v5.84.0 + SHA512 cef640da611ead5fc002f365a9918db1bebe494d7dc456dca8a239873b7f53c1aee81d122cbc15d88cb1deeae1ab7db8c2a79a2847deb87f29c5f1c19a46ab46 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5DBusAddons CONFIG_PATH lib/cmake/KF5DBusAddons) + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +elseif(VCPKG_TARGET_IS_WINDOWS) + # kquitapp5 is a non-dev tool allowing to quit an arbitrary, dbus-compatible app. No need to keep it. + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/kquitapp5${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/debug/bin/kquitapp5${VCPKG_HOST_EXECUTABLE_SUFFIX}") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/ports/kf5dbusaddons/vcpkg.json b/ports/kf5dbusaddons/vcpkg.json new file mode 100644 index 00000000000000..dd485ad52e0f9c --- /dev/null +++ b/ports/kf5dbusaddons/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "kf5dbusaddons", + "version": "5.84.0", + "port-version": 2, + "description": "Convenience classes for D-Bus", + "homepage": "https://api.kde.org/frameworks/kdbusaddons/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5globalaccel/portfile.cmake b/ports/kf5globalaccel/portfile.cmake new file mode 100644 index 00000000000000..decf668c1d3415 --- /dev/null +++ b/ports/kf5globalaccel/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kglobalaccel + REF v5.84.0 + SHA512 2b18c708175572dd9787fde799f6dc01ab2e0006dfb75ef95d357ae91cf4dda6c719c58e4b08fd10038ad5b6e404adeb359f63371ec7ee0887e349e8ce469c51 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5GlobalAccel CONFIG_PATH lib/cmake/KF5GlobalAccel) +vcpkg_copy_pdbs() + +vcpkg_copy_tools( + TOOL_NAMES kglobalaccel5 + AUTO_CLEAN + ) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") \ No newline at end of file diff --git a/ports/kf5globalaccel/vcpkg.json b/ports/kf5globalaccel/vcpkg.json new file mode 100644 index 00000000000000..25aefeecae284b --- /dev/null +++ b/ports/kf5globalaccel/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "kf5globalaccel", + "version-semver": "5.84.0", + "port-version": 1, + "description": "lobal desktop keyboard shortcuts", + "homepage": "https://api.kde.org/frameworks/kglobalaccel/html/index.html", + "dependencies": [ + "ecm", + "kf5config", + "kf5coreaddons", + "kf5crash", + "kf5dbusaddons", + "kf5windowsystem", + "qt5-base", + "qt5-tools", + { + "name": "qt5-x11extras", + "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5guiaddons/add_missing_static_dependencies.patch b/ports/kf5guiaddons/add_missing_static_dependencies.patch new file mode 100644 index 00000000000000..c8a5fcd6674a44 --- /dev/null +++ b/ports/kf5guiaddons/add_missing_static_dependencies.patch @@ -0,0 +1,84 @@ +From 7b0a5566acbdb6ff8e7eca3e5e75aacbf2abff9f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Sat, 28 Aug 2021 17:08:46 +0200 +Subject: [PATCH] Add missing static dependency to Config.cmake.in + +- move find_package(Qt5X11Extras) to root CMakeLists.txt +--- + CMakeLists.txt | 5 +++++ + KF5GuiAddonsConfig.cmake.in | 5 ++++- + src/CMakeLists.txt | 24 ++++++++++-------------- + 3 files changed, 19 insertions(+), 15 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 337122e..80633e5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,6 +39,11 @@ if (NOT APPLE AND NOT WIN32) + find_package(XCB MODULE COMPONENTS XCB) + endif() + ++set(WITH_XCB) ++if (NOT APPLE AND X11_FOUND AND X11_Xkb_FOUND AND XCB_XCB_FOUND) ++ find_package(Qt5X11Extras ${REQUIRED_QT_VERSION} NO_MODULE) ++endif() ++ + if (WITH_WAYLAND) + find_package(Qt5WaylandClient ${REQUIRED_QT_VERSION} NO_MODULE) + find_package(QtWaylandScanner REQUIRED) +diff --git a/KF5GuiAddonsConfig.cmake.in b/KF5GuiAddonsConfig.cmake.in +index a3c3e58..ae17f6b 100644 +--- a/KF5GuiAddonsConfig.cmake.in ++++ b/KF5GuiAddonsConfig.cmake.in +@@ -6,9 +6,12 @@ include(CMakeFindDependencyMacro) + find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) + + if (NOT @BUILD_SHARED_LIBS@) ++ if (@Qt5X11Extras_FOUND@) ++ find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@) ++ endif() + if (@WITH_WAYLAND@) + find_dependency(Wayland REQUIRED Client) +- find_dependency(Qt5WaylandClient) ++ find_dependency(Qt5WaylandClient @REQUIRED_QT_VERSION@) + find_dependency(QtWaylandScanner) + endif() + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 1dd66e8..ae0e0aa 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -58,20 +58,16 @@ target_include_directories(KF5GuiAddons INTERFACE "$") + target_link_libraries(KF5GuiAddons PUBLIC Qt5::Gui) + +-set(WITH_XCB) +-if (NOT APPLE AND X11_FOUND AND X11_Xkb_FOUND AND XCB_XCB_FOUND) +- find_package(Qt5X11Extras ${REQUIRED_QT_VERSION} NO_MODULE) +- if (Qt5X11Extras_FOUND) +- add_library(kmodifierkey_xcb MODULE util/kmodifierkeyinfoprovider_xcb.cpp) +- target_include_directories (kmodifierkey_xcb PRIVATE +- ${X11_Xkb_INCLUDE_PATH} +- ${X11_Xlib_INCLUDE_PATH} +- ${XCB_XCB_INCLUDE_DIR} +- ) +- target_link_libraries(kmodifierkey_xcb PRIVATE ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} Qt5::X11Extras KF5::GuiAddons) +- install( TARGETS kmodifierkey_xcb DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kguiaddons/kmodifierkey/) +- endif() +-endif () ++if (Qt5X11Extras_FOUND) ++ add_library(kmodifierkey_xcb MODULE util/kmodifierkeyinfoprovider_xcb.cpp) ++ target_include_directories (kmodifierkey_xcb PRIVATE ++ ${X11_Xkb_INCLUDE_PATH} ++ ${X11_Xlib_INCLUDE_PATH} ++ ${XCB_XCB_INCLUDE_DIR} ++ ) ++ target_link_libraries(kmodifierkey_xcb PRIVATE ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} Qt5::X11Extras KF5::GuiAddons) ++ install( TARGETS kmodifierkey_xcb DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kguiaddons/kmodifierkey/) ++endif() + + ecm_generate_headers(KGuiAddons_HEADERS + HEADER_NAMES +-- +GitLab + diff --git a/ports/kf5guiaddons/fix_cmake.patch b/ports/kf5guiaddons/fix_cmake.patch new file mode 100644 index 00000000000000..93b2bc4f58e9b2 --- /dev/null +++ b/ports/kf5guiaddons/fix_cmake.patch @@ -0,0 +1,12 @@ +diff --git a/KF5GuiAddonsConfig.cmake.in b/KF5GuiAddonsConfig.cmake.in +index ae17f6b..34e41bd 100644 +--- a/KF5GuiAddonsConfig.cmake.in ++++ b/KF5GuiAddonsConfig.cmake.in +@@ -10,6 +10,7 @@ if (NOT @BUILD_SHARED_LIBS@) + find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@) + endif() + if (@WITH_WAYLAND@) ++ set(QtWaylandScanner_EXECUTABLE "${PACKAGE_PREFIX}/tools/qt5-wayland/bin/qtwaylandscanner" CACHE STRING "QtWaylandScanner workaround") + find_dependency(Wayland REQUIRED Client) + find_dependency(Qt5WaylandClient @REQUIRED_QT_VERSION@) + find_dependency(QtWaylandScanner) diff --git a/ports/kf5guiaddons/portfile.cmake b/ports/kf5guiaddons/portfile.cmake new file mode 100644 index 00000000000000..f6da2d131ae184 --- /dev/null +++ b/ports/kf5guiaddons/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kguiaddons + REF v5.84.0 + SHA512 e5905c0aa5343ce3d4cd3765cb81390fc89fb78aec3c8de8b31d1dada8074d04f549ff785f3988498d2e274d7cb08a35a83ba031d18562049e6ca41d18ea52ee + HEAD_REF master + PATCHES + add_missing_static_dependencies.patch # https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/25 + fix_cmake.patch # https://github.com/microsoft/vcpkg/issues/17607#issuecomment-831518812 +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + wayland WITH_WAYLAND +) + +if("wayland" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_LINUX) + message(FATAL_ERROR "Feature wayland is only supported on Linux.") +endif() + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DQtWaylandScanner_EXECUTABLE=${CURRENT_INSTALLED_DIR}/tools/qt5-wayland/bin/qtwaylandscanner + ${FEATURE_OPTIONS} + MAYBE_UNUSED_VARIABLES + QtWaylandScanner_EXECUTABLE +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5GuiAddons CONFIG_PATH lib/cmake/KF5GuiAddons) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5guiaddons/vcpkg.json b/ports/kf5guiaddons/vcpkg.json new file mode 100644 index 00000000000000..c152961a8ff902 --- /dev/null +++ b/ports/kf5guiaddons/vcpkg.json @@ -0,0 +1,50 @@ +{ + "name": "kf5guiaddons", + "version-semver": "5.84.0", + "port-version": 3, + "description": "Addons to QtGui", + "homepage": "https://api.kde.org/frameworks/kguiaddons/html/index.html", + "dependencies": [ + "ecm", + "qt5-tools", + { + "name": "qt5-winextras", + "platform": "windows" + }, + { + "name": "qt5-x11extras", + "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "defaults" + ], + "features": { + "defaults": { + "description": "Default features", + "dependencies": [ + { + "name": "kf5guiaddons", + "features": [ + "wayland" + ], + "platform": "linux" + } + ] + }, + "wayland": { + "description": "Linux-only. Build with support for KeySequenceEditor inhibiting shortcuts on Wayland", + "dependencies": [ + "qt5-wayland" + ] + } + } +} diff --git a/ports/kf5holidays/CONTROL b/ports/kf5holidays/CONTROL deleted file mode 100644 index 7110145aa31663..00000000000000 --- a/ports/kf5holidays/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: kf5holidays -Version: 5.58.0 -Description: Holiday calculation library -Build-Depends: ecm, qt5-base, qt5-declarative, qt5-tools \ No newline at end of file diff --git a/ports/kf5holidays/portfile.cmake b/ports/kf5holidays/portfile.cmake index 64209c5cb5bb3d..ee0ae5f4462832 100644 --- a/ports/kf5holidays/portfile.cmake +++ b/ports/kf5holidays/portfile.cmake @@ -1,31 +1,35 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDE/kholidays - REF v5.58.0 - SHA512 1451603816617eef7e37c67085d12f34ce2e4b10db97220222450c9a7c5dc3200479718b86ea39b279bab93651790a8c70941ac1280458de7864ca04f9cf6471 + REF v5.84.0 + SHA512 2e4813b3ca36694e1231b41372baf9a29f80ba44f28525863cedda97ebb766a5d04dbb65422186d97ec753768bd772081fbaf1a91a33ab4556acbea6eb2510f5 HEAD_REF master ) +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DBUILD_HTML_DOCS=OFF - -DBUILD_MAN_DOCS=OFF - -DBUILD_QTHELP_DOCS=OFF - -DBUILD_TESTING=OFF + OPTIONS + -DBUILD_TESTING=OFF ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Holidays) vcpkg_copy_pdbs() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/qml ${CURRENT_PACKAGES_DIR}/debug/qml ) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/qml ${CURRENT_PACKAGES_DIR}/qml ) -file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/kf5holidays RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/kf5holidays/vcpkg.json b/ports/kf5holidays/vcpkg.json new file mode 100644 index 00000000000000..1993091f78c0be --- /dev/null +++ b/ports/kf5holidays/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "kf5holidays", + "version": "5.84.0", + "port-version": 2, + "description": "Holiday calculation library", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools" + ] +} diff --git a/ports/kf5i18n/fix_static_builds.patch b/ports/kf5i18n/fix_static_builds.patch new file mode 100644 index 00000000000000..541ce9f270fdf2 --- /dev/null +++ b/ports/kf5i18n/fix_static_builds.patch @@ -0,0 +1,30 @@ +diff --git a/KF5I18nConfig.cmake.in b/KF5I18nConfig.cmake.in +index 364cc43..af7cd3b 100644 +--- a/KF5I18nConfig.cmake.in ++++ b/KF5I18nConfig.cmake.in +@@ -8,3 +8,4 @@ include("${CMAKE_CURRENT_LIST_DIR}/KF5I18nTargets.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ + include("${CMAKE_CURRENT_LIST_DIR}/KF5I18nMacros.cmake") + ++find_dependency(Iconv) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index c6b510c..0a25eca 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -38,12 +38,16 @@ ecm_generate_export_header(KF5I18n + EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} + ) + ++find_package(Iconv REQUIRED) ++ + target_include_directories(KF5I18n INTERFACE "$") + target_include_directories(KF5I18n PRIVATE ${LibIntl_INCLUDE_DIRS}) ++target_include_directories(KF5I18n PRIVATE ${Iconv_INCLUDE_DIRS}) + + target_link_libraries(KF5I18n PUBLIC Qt5::Core) + # This is only required for platforms which don't use glibc (with glibc LibIntl_LIBRARIES will be empty) + target_link_libraries(KF5I18n PRIVATE ${LibIntl_LIBRARIES}) ++target_link_libraries(KF5I18n PRIVATE ${Iconv_LIBRARIES}) + target_compile_options(KF5I18n PRIVATE -DTRANSLATION_DOMAIN=\"ki18n5\") + + set_target_properties(KF5I18n PROPERTIES VERSION ${KI18N_VERSION} diff --git a/ports/kf5i18n/portfile.cmake b/ports/kf5i18n/portfile.cmake new file mode 100644 index 00000000000000..e7825c86efb9c8 --- /dev/null +++ b/ports/kf5i18n/portfile.cmake @@ -0,0 +1,42 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND PATCHES fix_static_builds.patch) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/ki18n + REF v5.84.0 + SHA512 611481b0d5f387b6e1201c1d38e050bd6c956607d059679c68f39d8560cdde666709f5aa1ae770e200fb81e902da85160eb3eeaf5c0bdb02c0ff13782df1d907 + PATCHES ${PATCHES} +) + +vcpkg_find_acquire_program(PYTHON3) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DKDE_INSTALL_PLUGINDIR=plugins + -DPYTHON_EXECUTABLE=${PYTHON3} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5I18n) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/kf5i18n/vcpkg.json b/ports/kf5i18n/vcpkg.json new file mode 100644 index 00000000000000..bab7f151de3354 --- /dev/null +++ b/ports/kf5i18n/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "kf5i18n", + "version": "5.84.0", + "port-version": 3, + "description": "Advanced internationalization framework", + "homepage": "https://api.kde.org/frameworks/ki18n/html/index.html", + "dependencies": [ + "ecm", + "gettext", + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "libiconv", + "qt5-declarative", + "qt5-tools" + ] +} diff --git a/ports/kf5iconthemes/fix_config_cmake.patch b/ports/kf5iconthemes/fix_config_cmake.patch new file mode 100644 index 00000000000000..6fa107c37b2860 --- /dev/null +++ b/ports/kf5iconthemes/fix_config_cmake.patch @@ -0,0 +1,38 @@ +From 2d9a393978ff6ae9c5577a3595cd761b199dc4fd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Thu, 26 Aug 2021 12:06:54 +0200 +Subject: [PATCH] Add support for static builds + +--- + KF5IconThemesConfig.cmake.in | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/KF5IconThemesConfig.cmake.in b/KF5IconThemesConfig.cmake.in +index 79688bb..d91f546 100644 +--- a/KF5IconThemesConfig.cmake.in ++++ b/KF5IconThemesConfig.cmake.in +@@ -3,6 +3,21 @@ + include(CMakeFindDependencyMacro) + find_dependency(Qt5Widgets "@REQUIRED_QT_VERSION@") + ++if (NOT @BUILD_SHARED_LIBS@) ++ find_dependency(Qt5Widgets "@REQUIRED_QT_VERSION@") ++ find_dependency(Qt5Svg "@REQUIRED_QT_VERSION@") ++ ++ if (NOT ANDROID) ++ find_dependency(Qt5DBus "@REQUIRED_QT_VERSION@") ++ endif() ++ ++ find_dependency(KF5Archive "@KF_DEP_VERSION@") ++ find_dependency(KF5I18n "@KF_DEP_VERSION@") ++ find_dependency(KF5CoreAddons "@KF_DEP_VERSION@") ++ find_dependency(KF5ConfigWidgets "@KF_DEP_VERSION@") ++ find_dependency(KF5WidgetsAddons "@KF_DEP_VERSION@") ++ find_dependency(KF5ItemViews "@KF_DEP_VERSION@") ++endif() + + include("${CMAKE_CURRENT_LIST_DIR}/KF5IconThemesTargets.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ +-- +GitLab + diff --git a/ports/kf5iconthemes/portfile.cmake b/ports/kf5iconthemes/portfile.cmake new file mode 100644 index 00000000000000..03d00588beda11 --- /dev/null +++ b/ports/kf5iconthemes/portfile.cmake @@ -0,0 +1,51 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kiconthemes + REF v5.84.0 + SHA512 ca5645d6e4fde4f60c6f16c911539f4056060cc22afae275459632bc7069352b068b1727eb75b898d319e6eef3df9ddc35d8e22d4c1d05a657b112378e56731e + HEAD_REF master + PATCHES + fix_config_cmake.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + designerplugin BUILD_DESIGNERPLUGIN + ) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DKDE_INSTALL_PLUGINDIR=plugins + -DKDE_INSTALL_QTPLUGINDIR=plugins + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5IconThemes CONFIG_PATH lib/cmake/KF5IconThemes) +vcpkg_copy_pdbs() + +vcpkg_copy_tools( + TOOL_NAMES kiconfinder5 + AUTO_CLEAN +) + +if(VCPKG_TARGET_IS_OSX) + vcpkg_copy_tools( + TOOL_NAMES ksvg2icns + AUTO_CLEAN + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") \ No newline at end of file diff --git a/ports/kf5iconthemes/vcpkg.json b/ports/kf5iconthemes/vcpkg.json new file mode 100644 index 00000000000000..3c7db55beb4b81 --- /dev/null +++ b/ports/kf5iconthemes/vcpkg.json @@ -0,0 +1,41 @@ +{ + "name": "kf5iconthemes", + "version": "5.84.0", + "port-version": 1, + "description": "Icon GUI utilities", + "homepage": "https://api.kde.org/frameworks/kiconthemes/html/index.html", + "dependencies": [ + "ecm", + "gettext", + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "kf5archive", + "kf5configwidgets", + "kf5coreaddons", + "kf5guiaddons", + "kf5i18n", + "kf5itemviews", + "kf5widgetsaddons", + "qt5-base", + "qt5-svg", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "designerplugin": { + "description": "Enables a Qt Designer plugin" + } + } +} diff --git a/ports/kf5itemmodels/portfile.cmake b/ports/kf5itemmodels/portfile.cmake new file mode 100644 index 00000000000000..5e9616cb7243d9 --- /dev/null +++ b/ports/kf5itemmodels/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kitemmodels + REF v5.84.0 + SHA512 1fd6a6194a718184dcbed0131a2b93575382b3ef7620049cb7a1ac2e55f271113c880d90b76fd6967b720fc44762f10119e8629bda30e6dea10f61ce22f9e02c +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DKDE_INSTALL_QMLDIR=qml +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5ItemModels) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/kf5itemmodels/vcpkg.json b/ports/kf5itemmodels/vcpkg.json new file mode 100644 index 00000000000000..5e628b41a744c7 --- /dev/null +++ b/ports/kf5itemmodels/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "kf5itemmodels", + "version": "5.84.0", + "port-version": 2, + "description": "Models for Qt Model/View system", + "homepage": "https://api.kde.org/frameworks/kitemmodels/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools" + ] +} diff --git a/ports/kf5itemviews/portfile.cmake b/ports/kf5itemviews/portfile.cmake new file mode 100644 index 00000000000000..567e8f7708bba3 --- /dev/null +++ b/ports/kf5itemviews/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kitemviews + REF v5.84.0 + SHA512 d6a16ebbe57b6ac1b766d77b8b262b0ec72a5e256e5b3fbf7b95d901b4e45300eda2933f74a5a66cb6b2fec062fb4a6c9253e3376b13ab889f0bfd52c23cf5d4 +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DBUILD_DESIGNERPLUGIN=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5ItemViews) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/kf5itemviews/vcpkg.json b/ports/kf5itemviews/vcpkg.json new file mode 100644 index 00000000000000..d80af211cb5cb2 --- /dev/null +++ b/ports/kf5itemviews/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "kf5itemviews", + "version": "5.84.0", + "port-version": 2, + "description": "Widget addons for Qt Model/View", + "homepage": "https://api.kde.org/frameworks/kitemviews/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools" + ] +} diff --git a/ports/kf5jobwidgets/portfile.cmake b/ports/kf5jobwidgets/portfile.cmake new file mode 100644 index 00000000000000..f285c8a50d8cb6 --- /dev/null +++ b/ports/kf5jobwidgets/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kjobwidgets + REF v5.84.0 + SHA512 57aa8d5756e1c9ce955975bfb5dc33ed78aaa984420effbb3b79984f9fd46794f3da092185bbcefe0464228d8f504349f7efd3a0ae79406954dc9ea84b3553f8 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF5JobWidgets) + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5jobwidgets/vcpkg.json b/ports/kf5jobwidgets/vcpkg.json new file mode 100644 index 00000000000000..b02a341d0b72d0 --- /dev/null +++ b/ports/kf5jobwidgets/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "kf5jobwidgets", + "version-semver": "5.84.0", + "port-version": 1, + "description": "Widgets for showing progress of asynchronous jobs", + "homepage": "https://api.kde.org/frameworks/kjobwidgets/html/index.html", + "dependencies": [ + "ecm", + "kf5coreaddons", + "kf5widgetsaddons", + "qt5-base", + { + "name": "qt5-x11extras", + "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5package/portfile.cmake b/ports/kf5package/portfile.cmake new file mode 100644 index 00000000000000..a9661cf07e28df --- /dev/null +++ b/ports/kf5package/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kpackage + REF v5.84.0 + SHA512 ad6a7083d461b2e782c612a544a8f6c0493c68c98a915e3f8fd4fd7de4ce636002383869476f877ace407fdc5013ad58e297ed3fd46dcac055ce79251704bf95 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Package CONFIG_PATH lib/cmake/KF5Package) +vcpkg_copy_pdbs() + +vcpkg_copy_tools(TOOL_NAMES kpackagetool5 AUTO_CLEAN) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") \ No newline at end of file diff --git a/ports/kf5package/vcpkg.json b/ports/kf5package/vcpkg.json new file mode 100644 index 00000000000000..a874e8db7abf61 --- /dev/null +++ b/ports/kf5package/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "kf5package", + "version": "5.84.0", + "port-version": 1, + "description": "Installation and loading of additional content (ex: scripts, images...) as packages", + "homepage": "https://api.kde.org/frameworks/kpackage/html/index.html", + "dependencies": [ + "ecm", + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "kf5archive", + "kf5coreaddons", + "kf5i18n", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5plotting/CONTROL b/ports/kf5plotting/CONTROL deleted file mode 100644 index 0b75bd8c1c52e7..00000000000000 --- a/ports/kf5plotting/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: kf5plotting -Version: 5.58.0 -Homepage: https://api.kde.org/frameworks/kplotting/html/index.html -Description: Lightweight plotting framework -Build-Depends: ecm, qt5-base diff --git a/ports/kf5plotting/portfile.cmake b/ports/kf5plotting/portfile.cmake index a5a4e1d467c241..f2d8ac8778252c 100644 --- a/ports/kf5plotting/portfile.cmake +++ b/ports/kf5plotting/portfile.cmake @@ -1,20 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDE/kplotting - REF v5.58.0 - SHA512 4d2fd69bad6c3117084811453bd32fdd92d1f1df89dba489e6109caad9268107d908e0df6f3e35a460878aa32fe4744173cf96ff292858d657c49582ee1674fc + REF v5.84.0 + SHA512 4007e90bc2505cfcfb14d5b40d922cf72ffcc6898da3ffed5ce5493484fe36c1f0f697f2b8319a7fd95909aada489d57be7a8dceb66b2cbba2746ed4aa93e5a5 HEAD_REF master ) +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DBUILD_HTML_DOCS=OFF - -DBUILD_MAN_DOCS=OFF - -DBUILD_QTHELP_DOCS=OFF - -DBUILD_TESTING=OFF + OPTIONS + -DBUILD_TESTING=OFF ) vcpkg_install_cmake() @@ -22,4 +21,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Plotting) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/kf5plotting RENAME copyright) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/plugins ${CURRENT_PACKAGES_DIR}/debug/plugins) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/plugins ${CURRENT_PACKAGES_DIR}/plugins) + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/kf5plotting/vcpkg.json b/ports/kf5plotting/vcpkg.json new file mode 100644 index 00000000000000..7513e48fe48a50 --- /dev/null +++ b/ports/kf5plotting/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "kf5plotting", + "version": "5.84.0", + "port-version": 2, + "description": "Lightweight plotting framework", + "homepage": "https://api.kde.org/frameworks/kplotting/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools" + ] +} diff --git a/ports/kf5service/portfile.cmake b/ports/kf5service/portfile.cmake new file mode 100644 index 00000000000000..acb0876ed43ff2 --- /dev/null +++ b/ports/kf5service/portfile.cmake @@ -0,0 +1,58 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kservice + REF v5.84.0 + SHA512 3867da989c8f70fccba63d91aeb0038ad6345e66ca7df6003f968628e4a54e076e9686acb501940ef8f540c39d5f1a70a949cbfdd1caa34e6c4d51daebff418d + HEAD_REF master +) + +if(VCPKG_TARGET_IS_OSX) + # On Darwin platform, the bundled version of 'bison' may be too old (< 3.0). + vcpkg_find_acquire_program(BISON) + execute_process( + COMMAND ${BISON} --version + OUTPUT_VARIABLE BISON_OUTPUT + ) + string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" BISON_VERSION "${BISON_OUTPUT}") + set(BISON_MAJOR ${CMAKE_MATCH_1}) + set(BISON_MINOR ${CMAKE_MATCH_2}) + message(STATUS "Using bison: ${BISON_MAJOR}.${BISON_MINOR}.${CMAKE_MATCH_3}") + if(NOT (BISON_MAJOR GREATER_EQUAL 3 AND BISON_MINOR GREATER_EQUAL 0)) + message(WARNING "${PORT} requires bison version greater than one provided by macOS, please use \`brew install bison\` to install a newer bison.") + endif() +endif() + +vcpkg_find_acquire_program(BISON) +vcpkg_find_acquire_program(FLEX) + +get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY) +get_filename_component(BISON_DIR "${BISON}" DIRECTORY) + +vcpkg_add_to_path(PREPEND "${FLEX_DIR}") +vcpkg_add_to_path(PREPEND "${BISON_DIR}") + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF5Service) +vcpkg_copy_pdbs() + +vcpkg_copy_tools( + TOOL_NAMES kbuildsycoca5 + AUTO_CLEAN +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") \ No newline at end of file diff --git a/ports/kf5service/vcpkg.json b/ports/kf5service/vcpkg.json new file mode 100644 index 00000000000000..72136bf204085e --- /dev/null +++ b/ports/kf5service/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "kf5service", + "version": "5.84.0", + "port-version": 1, + "description": "Plugin framework for desktop services", + "homepage": "https://api.kde.org/frameworks/kservice/html/index.html", + "dependencies": [ + "ecm", + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "kf5config", + "kf5coreaddons", + { + "name": "kf5crash", + "platform": "!android" + }, + { + "name": "kf5dbusaddons", + "platform": "!android" + }, + "kf5i18n", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5solid/fix_config_cmake.patch b/ports/kf5solid/fix_config_cmake.patch new file mode 100644 index 00000000000000..d099bb082ba91b --- /dev/null +++ b/ports/kf5solid/fix_config_cmake.patch @@ -0,0 +1,36 @@ +From c1e261d57383533a008f0c02689dd0292d4dc75a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Tue, 31 Aug 2021 02:18:42 +0200 +Subject: [PATCH] Add support for static builds + +--- + KF5SolidConfig.cmake.in | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/KF5SolidConfig.cmake.in b/KF5SolidConfig.cmake.in +index b597b3a..0a23f44 100644 +--- a/KF5SolidConfig.cmake.in ++++ b/KF5SolidConfig.cmake.in +@@ -19,6 +19,19 @@ set(SOLID_DBUS_INTERFACES_DIR "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@") + include(CMakeFindDependencyMacro) + find_dependency(Qt5Core @REQUIRED_QT_VERSION@) + ++if (NOT @BUILD_SHARED_LIBS@) ++ find_dependency(Qt5Xml @REQUIRED_QT_VERSION@) ++ find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) ++ ++ if (@Qt5DBus_FOUND@) ++ find_dependency(Qt5DBus @REQUIRED_QT_VERSION@) ++ endif() ++ ++ if (@UDev_FOUND@) ++ find_dependency(UDev) ++ endif() ++endif() ++ + include("${CMAKE_CURRENT_LIST_DIR}/KF5SolidTargets.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ + +-- +GitLab + diff --git a/ports/kf5solid/portfile.cmake b/ports/kf5solid/portfile.cmake new file mode 100644 index 00000000000000..9474f1c001b37d --- /dev/null +++ b/ports/kf5solid/portfile.cmake @@ -0,0 +1,64 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/solid + REF v5.84.0 + SHA512 b6452e56c6029289450850c1fcfff96da0005f8dfa03f1817754910945e3ccadd8502e330a4484a5c5e9a8d5525838c8090268bb083639062dfca7176852c159 + HEAD_REF master + PATCHES + fix_config_cmake.patch # https://invent.kde.org/frameworks/solid/-/merge_requests/53 +) + +if(VCPKG_TARGET_IS_OSX) + # On Darwin platform, the bundled version of 'bison' may be too old (< 3.0). + vcpkg_find_acquire_program(BISON) + execute_process( + COMMAND ${BISON} --version + OUTPUT_VARIABLE BISON_OUTPUT + ) + string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" BISON_VERSION "${BISON_OUTPUT}") + set(BISON_MAJOR ${CMAKE_MATCH_1}) + set(BISON_MINOR ${CMAKE_MATCH_2}) + message(STATUS "Using bison: ${BISON_MAJOR}.${BISON_MINOR}.${CMAKE_MATCH_3}") + if(NOT (BISON_MAJOR GREATER_EQUAL 3 AND BISON_MINOR GREATER_EQUAL 0)) + message(WARNING "${PORT} requires bison version greater than one provided by macOS, please use \`brew install bison\` to install a newer bison.") + endif() +endif() + +vcpkg_find_acquire_program(BISON) +vcpkg_find_acquire_program(FLEX) + +get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY ) +get_filename_component(BISON_DIR "${BISON}" DIRECTORY ) + +vcpkg_add_to_path(PREPEND "${FLEX_DIR}") +vcpkg_add_to_path(PREPEND "${BISON_DIR}") + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Solid CONFIG_PATH lib/cmake/KF5Solid) +vcpkg_copy_pdbs() + +vcpkg_copy_tools( + TOOL_NAMES solid-hardware5 + AUTO_CLEAN + ) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/qml" "${CURRENT_PACKAGES_DIR}/debug/qml") +file(RENAME "${CURRENT_PACKAGES_DIR}/lib/qml" "${CURRENT_PACKAGES_DIR}/qml") + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5solid/vcpkg.json b/ports/kf5solid/vcpkg.json new file mode 100644 index 00000000000000..c825d05b8df875 --- /dev/null +++ b/ports/kf5solid/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "kf5solid", + "version-semver": "5.84.0", + "port-version": 2, + "description": "Desktop hardware abstraction", + "homepage": "https://api.kde.org/frameworks/solid/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5sonnet/portfile.cmake b/ports/kf5sonnet/portfile.cmake new file mode 100644 index 00000000000000..1cda95d5ca39cf --- /dev/null +++ b/ports/kf5sonnet/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/sonnet + REF v5.84.0 + SHA512 9e7d121f447e3320c27c3708f5d1d4cc735e775749cded268502b593a0b1f6ea703e68ce1d2d4f1806e0adb73aafaedf660586f8ee740f4a9a834e23cb9880e4 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DKDE_INSTALL_PLUGINDIR=plugins + -DKDE_INSTALL_DATAROOTDIR=data + -DKDE_INSTALL_QTPLUGINDIR=plugins +) + +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") + +vcpkg_cmake_install() + +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/gentrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/gentrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/parsetrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/parsetrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}") + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF5Sonnet) + +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}") +file(APPEND "${CURRENT_PACKAGES_DIR}/tools/${PORT}/qt.conf" "Data = ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/data") + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/gentrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/parsetrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}") + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5sonnet/vcpkg.json b/ports/kf5sonnet/vcpkg.json new file mode 100644 index 00000000000000..52cb029d96149c --- /dev/null +++ b/ports/kf5sonnet/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "kf5sonnet", + "version-semver": "5.84.0", + "port-version": 2, + "description": "Multi-language spell checker", + "homepage": "https://api.kde.org/frameworks/sonnet/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5syntaxhighlighting/portfile.cmake b/ports/kf5syntaxhighlighting/portfile.cmake new file mode 100644 index 00000000000000..9003e60f5e4d49 --- /dev/null +++ b/ports/kf5syntaxhighlighting/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/syntax-highlighting + REF v5.84.0 + SHA512 7df25f639504392f15dd55ae33de273ef8a32c3d4b4874dcd52fa5aa85e302acf102e31d249a3dc779d84facba0fca5e2196e83d8b4d439c5da96c2ad7b256cd + HEAD_REF master +) + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path("${PERL_EXE_PATH}") + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5SyntaxHighlighting) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/kf5syntaxhighlighting/vcpkg.json b/ports/kf5syntaxhighlighting/vcpkg.json new file mode 100644 index 00000000000000..d50b0e71395854 --- /dev/null +++ b/ports/kf5syntaxhighlighting/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "kf5syntaxhighlighting", + "version": "5.84.0", + "port-version": 2, + "description": "Syntax highlighting engine for Kate syntax definitions", + "homepage": "https://github.com/KDE/syntax-highlighting", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools", + "qt5-xmlpatterns" + ] +} diff --git a/ports/kf5textwidgets/portfile.cmake b/ports/kf5textwidgets/portfile.cmake new file mode 100644 index 00000000000000..eb3cced28e2258 --- /dev/null +++ b/ports/kf5textwidgets/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/ktextwidgets + REF v5.84.0 + SHA512 39afc3265c8aed26f78c836691548cafca05f31238e11f6d29e497c78b6e809d9dba5d3f6cbb9425cfe84d2a1d0910165e77c7841d833cccee3c7398e39bfc68 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DKDE_INSTALL_QTPLUGINDIR=plugins +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5TextWidgets CONFIG_PATH lib/cmake/KF5TextWidgets) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") \ No newline at end of file diff --git a/ports/kf5textwidgets/vcpkg.json b/ports/kf5textwidgets/vcpkg.json new file mode 100644 index 00000000000000..dfb7e271de067f --- /dev/null +++ b/ports/kf5textwidgets/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "kf5textwidgets", + "version": "5.84.0", + "port-version": 1, + "description": "Text editing widgets", + "homepage": "https://api.kde.org/frameworks/ktextwidgets/html/index.html", + "dependencies": [ + "ecm", + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "kf5completion", + "kf5config", + "kf5configwidgets", + "kf5i18n", + "kf5sonnet", + "kf5widgetsaddons", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5wallet/portfile.cmake b/ports/kf5wallet/portfile.cmake new file mode 100644 index 00000000000000..e7300f744df6d4 --- /dev/null +++ b/ports/kf5wallet/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kwallet + REF v5.84.0 + SHA512 5bea4c7f46d127de1bc530e03e1033e9e133197cc36bb6963c9154783ef7bb9920bec62443b5bba9b55d3adcc1f7284ce4376422915d93d6df387587fd7ab8e0 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DBUILD_KWALLETD=OFF + -DBUILD_KWALLET_QUERY=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Wallet CONFIG_PATH lib/cmake/KF5Wallet) +vcpkg_copy_pdbs() + +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() + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") \ No newline at end of file diff --git a/ports/kf5wallet/vcpkg.json b/ports/kf5wallet/vcpkg.json new file mode 100644 index 00000000000000..0d4876849a7117 --- /dev/null +++ b/ports/kf5wallet/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "kf5wallet", + "version-semver": "5.84.0", + "port-version": 1, + "description": "Safe desktop-wide storage for passwords", + "homepage": "https://api.kde.org/frameworks/kwallet/html/index.html", + "dependencies": [ + "ecm", + "gettext", + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "kf5config", + "kf5coreaddons", + "kf5i18n", + "kf5windowsystem", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kf5widgetsaddons/portfile.cmake b/ports/kf5widgetsaddons/portfile.cmake new file mode 100644 index 00000000000000..dcf65ec6b23092 --- /dev/null +++ b/ports/kf5widgetsaddons/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kwidgetsaddons + REF v5.84.0 + SHA512 2c92eb2eaea1c2ca1ca2acd8ccc95d64d5f91cce4b92d428644adc804e7b97ad19659231667e5d79f5672fe528ae70ca85926192297772d7734d5d72479d2716 + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DBUILD_DESIGNERPLUGIN=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5WidgetsAddons) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/kf5widgetsaddons/vcpkg.json b/ports/kf5widgetsaddons/vcpkg.json new file mode 100644 index 00000000000000..4b98e7c004bb11 --- /dev/null +++ b/ports/kf5widgetsaddons/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "kf5widgetsaddons", + "version": "5.84.0", + "port-version": 2, + "description": "Addons to QtWidgets", + "homepage": "https://api.kde.org/frameworks/kwidgetsaddons/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools" + ] +} diff --git a/ports/kf5windowsystem/27.patch b/ports/kf5windowsystem/27.patch new file mode 100644 index 00000000000000..6ad39176795ce9 --- /dev/null +++ b/ports/kf5windowsystem/27.patch @@ -0,0 +1,31 @@ +From 2ee7179c17fd9bd6d8e883ea304cc050cb197834 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Thu, 29 Jul 2021 13:47:28 +0200 +Subject: [PATCH] Support static builds + +--- + KF5WindowSystemConfig.cmake.in | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/KF5WindowSystemConfig.cmake.in b/KF5WindowSystemConfig.cmake.in +index 6c1b4c0..bcb7128 100644 +--- a/KF5WindowSystemConfig.cmake.in ++++ b/KF5WindowSystemConfig.cmake.in +@@ -4,7 +4,13 @@ include(CMakeFindDependencyMacro) + find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) + + if(NOT @KWINDOWSYSTEM_NO_WIDGETS@) +-find_dependency(Qt5Widgets @REQUIRED_QT_VERSION@) ++ find_dependency(Qt5Widgets @REQUIRED_QT_VERSION@) ++endif() ++ ++if(NOT @BUILD_SHARED_LIBS@) ++ if(@WIN32@) ++ find_dependency(Qt5WinExtras @REQUIRED_QT_VERSION@) ++ endif() + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/KF5WindowSystemTargets.cmake") +-- +GitLab + diff --git a/ports/kf5windowsystem/28.patch b/ports/kf5windowsystem/28.patch new file mode 100644 index 00000000000000..9cf88c96cff54b --- /dev/null +++ b/ports/kf5windowsystem/28.patch @@ -0,0 +1,27 @@ +From b4bf29e297dd75eb2f4af6ed143839e223833b4b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Mon, 9 Aug 2021 22:45:50 +0000 +Subject: [PATCH] Support static builds on Linux as well + +--- + KF5WindowSystemConfig.cmake.in | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/KF5WindowSystemConfig.cmake.in b/KF5WindowSystemConfig.cmake.in +index bcb7128..62580e9 100644 +--- a/KF5WindowSystemConfig.cmake.in ++++ b/KF5WindowSystemConfig.cmake.in +@@ -11,6 +11,10 @@ if(NOT @BUILD_SHARED_LIBS@) + if(@WIN32@) + find_dependency(Qt5WinExtras @REQUIRED_QT_VERSION@) + endif() ++ ++ if(@X11_FOUND@) ++ find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@) ++ endif() + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/KF5WindowSystemTargets.cmake") +-- +GitLab + diff --git a/ports/kf5windowsystem/portfile.cmake b/ports/kf5windowsystem/portfile.cmake new file mode 100644 index 00000000000000..45173fe113ba69 --- /dev/null +++ b/ports/kf5windowsystem/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kwindowsystem + REF v5.84.0 + SHA512 53491f8576db8ebb48627e098fd8c3d4029c024bb9048d97daa1a8f5c39e594ca05dcd80ecb18ac591af7455457a0f14459c24cf44487727a26e34f977c5b81a + PATCHES + 27.patch # https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/27 + 28.patch # https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/28 +) + +if (VCPKG_TARGET_IS_LINUX) + message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libxcb-res0-dev\n\nThese can be installed on Ubuntu systems via apt-get install libxcb-res0-dev") +endif() + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTING=OFF + -DKDE_INSTALL_PLUGINDIR=plugins +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF5WindowSystem) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5windowsystem/vcpkg.json b/ports/kf5windowsystem/vcpkg.json new file mode 100644 index 00000000000000..ab42649adad54b --- /dev/null +++ b/ports/kf5windowsystem/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "kf5windowsystem", + "version-semver": "5.84.0", + "port-version": 3, + "description": "Access to the windowing system", + "homepage": "https://api.kde.org/frameworks/kwindowsystem/html/", + "dependencies": [ + "ecm", + "qt5-tools", + { + "name": "qt5-winextras", + "platform": "windows" + }, + { + "name": "qt5-x11extras", + "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/kfr/portfile.cmake b/ports/kfr/portfile.cmake new file mode 100644 index 00000000000000..ca8f4a0fd7b8a0 --- /dev/null +++ b/ports/kfr/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "Linux") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kfrlib/kfr + REF 9fc73247f43b303617329294ae264613df4dce71 # 4.2.1 + SHA512 c7dd4b1a0be436460973fb8a48bc6f2264a0f7d8d034ce88ccfd8328135f1492eab155023103a1461c2058eb6c79a6019b62d023dc5bc390ab4d2b43eac9c2d4 + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + capi ENABLE_CAPI_BUILD + dft ENABLE_DFT + dft-np ENABLE_DFT_NP +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DENABLE_TESTS=OFF + -DENABLE_ASMTEST=OFF + -DREGENERATE_TESTS=OFF + -DKFR_EXTENDED_TESTS=OFF + -DSKIP_TESTS=ON + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/kfr/vcpkg.json b/ports/kfr/vcpkg.json new file mode 100644 index 00000000000000..ecf2ac02d0f308 --- /dev/null +++ b/ports/kfr/vcpkg.json @@ -0,0 +1,34 @@ +{ + "name": "kfr", + "version-semver": "4.2.1", + "description": "Fast, modern C++ DSP framework.", + "homepage": "https://www.kfr.dev/", + "license": "GPL-2.0", + "supports": "!(arm | linux)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "features": { + "capi": { + "description": "Enable C API build.", + "dependencies": [ + { + "name": "kfr", + "default-features": false, + "features": [ + "dft" + ] + } + ] + }, + "dft": { + "description": "Enable DFT and related algorithms." + }, + "dft-np": { + "description": "Enable non-power of 2 DFT." + } + } +} diff --git a/ports/kinectsdk1/CONTROL b/ports/kinectsdk1/CONTROL deleted file mode 100644 index 9764fb69aba46d..00000000000000 --- a/ports/kinectsdk1/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: kinectsdk1 -Version: 1.8-2 -Description: Kinect for Windows SDK for Kinect v1 sensor. diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake index 5aec501199e0c7..adcb82a524126a 100644 --- a/ports/kinectsdk1/portfile.cmake +++ b/ports/kinectsdk1/portfile.cmake @@ -1,14 +1,10 @@ -include(vcpkg_common_functions) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() +vcpkg_fail_port_install(ON_ARCH "arm") set(KINECTSDK10_VERSION "v1.8") vcpkg_download_distfile(KINECTSDK10_INSTALLER URLS "https://download.microsoft.com/download/E/1/D/E1DEC243-0389-4A23-87BF-F47DE869FC1A/KinectSDK-${KINECTSDK10_VERSION}-Setup.exe" FILENAME "KinectSDK-${KINECTSDK10_VERSION}-Setup.exe" - SHA512 ee8a0f70c86aad80fe214108e315e4550a90ed39f278ce00a7137532174ee5bf3bdeb1d0b499fc5ffdb5e176adecfd68963ee3731e1d2f00d69d32d1b8a3c555 + SHA512 d7e886d639b4310addc7c1350311f81289ffbcd653237882da7bf3d4074281ed35d217cb8be101579cac880c574dd89c62cd6a87772d60905c446d0be5fd1932 ) vcpkg_find_acquire_program(DARK) @@ -67,5 +63,4 @@ file( ) # Handle copyright -file(COPY "${KINECTSDK10_DIR}/SDKEula.rtf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/kinectsdk1) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/kinectsdk1/SDKEula.rtf ${CURRENT_PACKAGES_DIR}/share/kinectsdk1/copyright) \ No newline at end of file +file(INSTALL ${KINECTSDK10_DIR}/SDKEula.rtf DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/kinectsdk1/vcpkg.json b/ports/kinectsdk1/vcpkg.json new file mode 100644 index 00000000000000..230677a2552107 --- /dev/null +++ b/ports/kinectsdk1/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "kinectsdk1", + "version-string": "1.8", + "port-version": 3, + "description": "Kinect for Windows SDK for Kinect v1 sensor.", + "supports": "!arm" +} diff --git a/ports/kinectsdk2/CONTROL b/ports/kinectsdk2/CONTROL deleted file mode 100644 index ee09008427f1be..00000000000000 --- a/ports/kinectsdk2/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: kinectsdk2 -Version: 2.0-1 -Description: Kinect for Windows SDK for Kinect v2 sensor. diff --git a/ports/kinectsdk2/portfile.cmake b/ports/kinectsdk2/portfile.cmake index 19072cd34a53eb..3ed2101721a0ab 100644 --- a/ports/kinectsdk2/portfile.cmake +++ b/ports/kinectsdk2/portfile.cmake @@ -1,11 +1,4 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() +vcpkg_buildpath_length_warning(37) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") diff --git a/ports/kinectsdk2/vcpkg.json b/ports/kinectsdk2/vcpkg.json new file mode 100644 index 00000000000000..5b065d28f6a6e2 --- /dev/null +++ b/ports/kinectsdk2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "kinectsdk2", + "version-string": "2.0", + "port-version": 3, + "description": "Kinect for Windows SDK for Kinect v2 sensor.", + "supports": "!arm" +} diff --git a/ports/kissfft/CMakeLists.txt b/ports/kissfft/CMakeLists.txt new file mode 100644 index 00000000000000..8d522ecb9205b0 --- /dev/null +++ b/ports/kissfft/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.14) + +project(kissfft LANGUAGES C) + +include(GNUInstallDirs) + +option(KF_USE_SIMD "Use SIMD" OFF) +option(KF_INSTALL_HEADERS "Install header files" ON) + +if (KF_USE_SIMD) + set(KF_SCALAR_TYPE "__m128" CACHE STRING "Definition of kiss_fft_scalar") +else () + set(KF_SCALAR_TYPE "float" CACHE STRING "Definition of kiss_fft_scalar") +endif () + +# TODO: FIXED_POINT +# TODO: -msse + +set(kissfft_sources kiss_fft.c) + +if (WIN32 AND BUILD_SHARED_LIBS) + list(APPEND kissfft_sources exports.def) +endif () + +add_library(kissfft ${kissfft_sources}) + +if (BUILD_SHARED_LIBS) + set_property( + TARGET kissfft + PROPERTY POSITION_INDEPENDENT_CODE ON + ) +endif () + +target_include_directories( + kissfft + PUBLIC + $ +) + +target_compile_definitions( + kissfft + PUBLIC + $<$:USE_SIMD> + kiss_fft_scalar=${KF_SCALAR_TYPE} +) + +if (KF_INSTALL_HEADERS) + install( + FILES + _kiss_fft_guts.h + kiss_fft.h + kissfft.hh + kissfft_i32.hh + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) +endif () + +install(TARGETS kissfft EXPORT unofficial-kissfft-config) + +install( + EXPORT unofficial-kissfft-config + NAMESPACE unofficial::kissfft:: + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-kissfft + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/ports/kissfft/exports.def b/ports/kissfft/exports.def new file mode 100644 index 00000000000000..09897b9da58dbc --- /dev/null +++ b/ports/kissfft/exports.def @@ -0,0 +1,6 @@ +EXPORTS + kiss_fft_alloc + kiss_fft + kiss_fft_stride + kiss_fft_cleanup + kiss_fft_next_fast_size diff --git a/ports/kissfft/portfile.cmake b/ports/kissfft/portfile.cmake new file mode 100644 index 00000000000000..d5eea7889a5d6e --- /dev/null +++ b/ports/kissfft/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mborgerding/kissfft + REF 3f3fc6ab55da8610aba7fe89dcda09cf3a31f4e6 + SHA512 5d3781a82d067cebd0a20c6b35a2d806598ba66f3bbf282c49a2ac9a6d09e1307dca1f8bc5fcc4c5955dc2f66aa94ca4dcfe00e6b31ea4694aa9d507f194554e + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DKF_INSTALL_HEADERS=OFF + OPTIONS_RELEASE + -DKF_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/unofficial-${PORT} + TARGET_PATH share/unofficial-${PORT} +) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/kissfft/vcpkg.json b/ports/kissfft/vcpkg.json new file mode 100644 index 00000000000000..b3e0193da6ada6 --- /dev/null +++ b/ports/kissfft/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "kissfft", + "version-string": "2020-03-30", + "port-version": 1, + "description": "A Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid", + "homepage": "https://github.com/mborgerding/kissfft" +} diff --git a/ports/klein/find_simde_first.patch b/ports/klein/find_simde_first.patch new file mode 100644 index 00000000000000..ab9f715c6bddc4 --- /dev/null +++ b/ports/klein/find_simde_first.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c5d6f3f..a3ba161 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,16 +29,7 @@ endif() + option(KLEIN_BUILD_SYM "Enable compilation of symbolic Klein utility" ON) + option(KLEIN_BUILD_C_BINDINGS "Enable compilation of the Klein C bindings" ON) + +-include(FetchContent) +-FetchContent_Declare( +- simde +- GIT_REPOSITORY https://github.com/simd-everywhere/simde +- GIT_TAG v0.7.2 +- GIT_SHALLOW ON +-) +-FetchContent_GetProperties(simde) +-if(NOT simde_POPULATED) +- FetchContent_Populate(simde) +-endif() ++find_path(SIMDE_INCLUDE_DIR "simde/x86/sse4.1.h" REQUIRED) ++set(simde_SOURCE_DIR ${SIMDE_INCLUDE_DIR}/simde) + + # The default platform and instruction set is x86 SSE3 diff --git a/ports/klein/portfile.cmake b/ports/klein/portfile.cmake new file mode 100644 index 00000000000000..aea4b100a3b902 --- /dev/null +++ b/ports/klein/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jeremyong/klein + REF 92023c6a946af84e716deb1488cad22048d3e08d + SHA512 5d12ae143f07173992a6f9aa90539c4cb6c895a7169e5c086a10f78a31f7b2c9d64faf5ce1db014bd3badd92d24ff612dd2d2dc2f7508baac59307e3dccb6ebe + HEAD_REF master + PATCHES + "find_simde_first.patch" +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DKLEIN_ENABLE_PERF=OFF + -DKLEIN_ENABLE_TESTS=OFF + -DKLEIN_VALIDATE=OFF + -DKLEIN_BUILD_SYM=OFF + -DKLEIN_BUILD_C_BINDINGS=OFF + -DKLEIN_INSTALL=ON +) + +vcpkg_cmake_install() +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + diff --git a/ports/klein/usage b/ports/klein/usage new file mode 100644 index 00000000000000..63658e26e8b645 --- /dev/null +++ b/ports/klein/usage @@ -0,0 +1,10 @@ +The package klein:x64-windows provides CMake targets: + + find_package(klein CONFIG REQUIRED) + target_link_libraries(main PRIVATE klein::klein) + + # Or use the C++ 11 version + target_link_libraries(main PRIVATE klein::klein_cxx11) + + # Or use the SSE4.1 version + target_link_libraries(main PRIVATE klein::klein_sse42) diff --git a/ports/klein/vcpkg.json b/ports/klein/vcpkg.json new file mode 100644 index 00000000000000..9b6393b3bc6f74 --- /dev/null +++ b/ports/klein/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "klein", + "version-date": "2021-05-09", + "description": "Klein is an implementation of P(R*_{3, 0, 1}), aka 3D Projective Geometric Algebra. It is designed for applications that demand high-throughput (animation libraries, kinematic solvers, etc).", + "dependencies": [ + "simde", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/knet/portfile.cmake b/ports/knet/portfile.cmake new file mode 100644 index 00000000000000..2d5082accf7331 --- /dev/null +++ b/ports/knet/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kibaamor/knet + REF v1.0.2 + SHA512 fb101d10d3bb08e565618923a10bc39586a934ae562ba7241c079f781baaafbc511e0bd2de13db6263246dede5e602d578e1fbdf45c84a6fecc4d3ddad4735e9 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DKNET_BUILD_EXAMPLE:BOOL=OFF + -DKNET_BUILD_TEST:BOOL=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/knet TARGET_PATH share/knet) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/knet/usage b/ports/knet/usage new file mode 100644 index 00000000000000..2a83afe1b230a3 --- /dev/null +++ b/ports/knet/usage @@ -0,0 +1,4 @@ +The package knet provides CMake integration: + + find_package(knet CONFIG REQUIRED) + target_link_libraries(main PRIVATE knet) diff --git a/ports/knet/vcpkg.json b/ports/knet/vcpkg.json new file mode 100644 index 00000000000000..003a8d64fcba66 --- /dev/null +++ b/ports/knet/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "knet", + "version": "1.0.2", + "description": "A cross platform lock-free and timer-supported C++11 network library.", + "homepage": "https://github.com/kibaamor/knet", + "license": "MIT", + "supports": "!(arm | uwp)" +} diff --git a/ports/krabsetw/portfile.cmake b/ports/krabsetw/portfile.cmake new file mode 100644 index 00000000000000..7dcb2c7fb7c63c --- /dev/null +++ b/ports/krabsetw/portfile.cmake @@ -0,0 +1,15 @@ +# Header-only library + +vcpkg_fail_port_install(ON_TARGET "UWP" "LINUX" "OSX" "FREEBSD" "ANDROID" "MINGW") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/krabsetw + REF 31679cf84bc85360158672699f2f68a821e8a6d0 + SHA512 4fcc4ee1c41c6d40770a5b57111e6fd29eedf1f4a29038ab1dfb8bffb3ad0464c4ec06b90b65fabadcd419564d55172d4d9fdc3750c1898545f7c6e00fbe99c8 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/krabs/krabs/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/krabs) +file(INSTALL ${SOURCE_PATH}/krabs/krabs.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/krabsetw/vcpkg.json b/ports/krabsetw/vcpkg.json new file mode 100644 index 00000000000000..93749378612ebf --- /dev/null +++ b/ports/krabsetw/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "krabsetw", + "version-string": "4.1.18", + "description": "krabsetw is a header-only C++ library that simplifies interacting with ETW.", + "homepage": "https://github.com/microsoft/krabsetw", + "supports": "windows & !uwp" +} diff --git a/ports/ktx/0001-Use-vcpkg-zstd.patch b/ports/ktx/0001-Use-vcpkg-zstd.patch new file mode 100644 index 00000000000000..8dff4a59a9004e --- /dev/null +++ b/ports/ktx/0001-Use-vcpkg-zstd.patch @@ -0,0 +1,108 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0bdb708..356c160 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -121,7 +121,6 @@ set(KTX_MAIN_SRC + lib/basisu/transcoder/basisu_transcoder.cpp + lib/basisu/transcoder/basisu_transcoder.h + lib/basisu/transcoder/basisu.h +- lib/basisu/zstd/zstd.c + lib/checkheader.c + lib/dfdutils/createdfd.c + lib/dfdutils/colourspaces.c +@@ -227,7 +226,6 @@ macro(commom_lib_settings lib write) + $ + + $ +- $ + + $ + $ +@@ -309,6 +307,11 @@ macro(commom_lib_settings lib write) + endif() + + if(WIN32) ++ find_package(zstd CONFIG REQUIRED) ++ target_link_libraries( ++ ${lib} ++ $,zstd::libzstd_shared,zstd::libzstd_static> ++ ) + # By wrapping in generator expression we force multi configuration generators (like Visual Studio) + # to take the exact path and not change it. + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${KTX_BUILD_DIR}/$>) +diff --git a/lib/basisu/CMakeLists.txt b/lib/basisu/CMakeLists.txt +index 78dd110..e155896 100644 +--- a/lib/basisu/CMakeLists.txt ++++ b/lib/basisu/CMakeLists.txt +@@ -118,7 +118,7 @@ set(BASISU_SRC_LIST ${COMMON_SRC_LIST} + ) + + if (ZSTD) +- set(BASISU_SRC_LIST ${BASISU_SRC_LIST} zstd/zstd.c) ++ set(ZSTD_LIBRARIES "$,zstd::libzstd_shared,zstd::libzstd_static>") + endif() + + if (APPLE) +@@ -137,6 +137,10 @@ else() + target_compile_definitions(basisu PRIVATE BASISD_SUPPORT_KTX2_ZSTD=0) + endif() + ++if(ZSTD_LIBRARIES) ++ target_link_libraries(basisu ${ZSTD_LIBRARIES}) ++endif() ++ + if (NOT MSVC) + target_link_libraries(basisu m pthread) + endif() +diff --git a/lib/basisu/webgl/encoder/CMakeLists.txt b/lib/basisu/webgl/encoder/CMakeLists.txt +index e365e1b..6e6a7a5 100644 +--- a/lib/basisu/webgl/encoder/CMakeLists.txt ++++ b/lib/basisu/webgl/encoder/CMakeLists.txt +@@ -36,9 +36,7 @@ if (EMSCRIPTEN) + ) + + if (KTX2_ZSTANDARD) +- set(SRC_LIST ${SRC_LIST} +- ../../zstd/zstd.c +- ) ++ set(ZSTD_LIBRARIES "$,zstd::libzstd_shared,zstd::libzstd_static>") + set(ZSTD_DEFINITION BASISD_SUPPORT_KTX2_ZSTD=1) + else() + set(ZSTD_DEFINITION BASISD_SUPPORT_KTX2_ZSTD=0) +@@ -58,6 +56,10 @@ if (EMSCRIPTEN) + + target_include_directories(basis_encoder.js PRIVATE ../../transcoder) + ++ if(ZSTD_LIBRARIES) ++ target_link_libraries(basis_encoder.js ${ZSTD_LIBRARIES}) ++ endif() ++ + set_target_properties(basis_encoder.js PROPERTIES + OUTPUT_NAME "basis_encoder" + SUFFIX ".js" +diff --git a/lib/basisu/webgl/transcoder/CMakeLists.txt b/lib/basisu/webgl/transcoder/CMakeLists.txt +index 372653d..2e19ece 100644 +--- a/lib/basisu/webgl/transcoder/CMakeLists.txt ++++ b/lib/basisu/webgl/transcoder/CMakeLists.txt +@@ -28,9 +28,7 @@ if (EMSCRIPTEN) + endif() + + if (KTX2_ZSTANDARD) +- set(SRC_LIST ${SRC_LIST} +- ../../zstd/zstddeclib.c +- ) ++ set(ZSTD_LIBRARIES "$,zstd::libzstd_shared,zstd::libzstd_static>") + set(ZSTD_DEFINITION BASISD_SUPPORT_KTX2_ZSTD=1) + else() + set(ZSTD_DEFINITION BASISD_SUPPORT_KTX2_ZSTD=0) +@@ -44,7 +42,9 @@ if (EMSCRIPTEN) + target_compile_definitions(basis_transcoder.js PRIVATE NDEBUG BASISD_SUPPORT_UASTC=1 BASISD_SUPPORT_BC7=1 BASISD_SUPPORT_ATC=0 BASISD_SUPPORT_ASTC_HIGHER_OPAQUE_QUALITY=0 BASISD_SUPPORT_PVRTC2=0 BASISD_SUPPORT_FXT1=0 BASISD_SUPPORT_ETC2_EAC_RG11=0 BASISU_SUPPORT_ENCODING=0 ${KTX2_DEFINITION} ${ZSTD_DEFINITION} ) + target_compile_options(basis_transcoder.js PRIVATE -O3 -fno-strict-aliasing) + target_include_directories(basis_transcoder.js PRIVATE ../../transcoder) +- ++ if(ZSTD_LIBRARIES) ++ target_link_libraries(basis_transcoder.js ${ZSTD_LIBRARIES}) ++ endif() + set_target_properties(basis_transcoder.js PROPERTIES + OUTPUT_NAME "basis_transcoder" + SUFFIX ".js" diff --git a/ports/ktx/0002-Fix-versioning.patch b/ports/ktx/0002-Fix-versioning.patch new file mode 100644 index 00000000000000..1e5098806a752b --- /dev/null +++ b/ports/ktx/0002-Fix-versioning.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/version.cmake b/cmake/version.cmake +index 4094df1a..3b2af3bb 100644 +--- a/cmake/version.cmake ++++ b/cmake/version.cmake +@@ -108,8 +108,10 @@ function(generate_version _var ) + set(${_var} "${KTX_VERSION}" PARENT_SCOPE) + endfunction() + +-# Get latest tag +-git_describe_raw(KTX_VERSION_FULL --abbrev=0 --match v[0-9]*) ++if (!KTX_VERSION_FULL) ++ # Get latest tag ++ git_describe_raw(KTX_VERSION_FULL --abbrev=0 --match v[0-9]*) ++endif() + #message("KTX full version: ${KTX_VERSION_FULL}") + + # generate_version(TOKTX_VERSION tools/toktx) diff --git a/ports/ktx/portfile.cmake b/ports/ktx/portfile.cmake new file mode 100644 index 00000000000000..8731a85b8928e9 --- /dev/null +++ b/ports/ktx/portfile.cmake @@ -0,0 +1,77 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "x86" "arm64") + +set(PORT_VERSION 4.0.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/KTX-Software + REF v${PORT_VERSION} + SHA512 49787cf0230939ae0c737f6080ef483dd27ebd653c16525b469b078511ab72e85aecba9bffe71ed45ce1692e8448b845e60545c39f9333e6d216b20f56595faa + HEAD_REF master + FILE_DISAMBIGUATOR 1 + PATCHES + 0001-Use-vcpkg-zstd.patch + 0002-Fix-versioning.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_acquire_msys(MSYS_ROOT + PACKAGES + bash + DIRECT_PACKAGES + # Required for "getopt" + "https://repo.msys2.org/msys/x86_64/util-linux-2.35.2-1-x86_64.pkg.tar.zst" + ff951c2cd96d0fda87bacb505c93e4aa1f9aeb35f829c52b5a7862d05e167f69605a4927a0e7197b5ee2b2fa5cb56619ad7a6ba293ede4765fdcacedf2ed35da + ) + vcpkg_add_to_path(${MSYS_ROOT}/usr/bin) + + file(REMOVE + "${SOURCE_PATH}/other_include/zstd.h" + "${SOURCE_PATH}/other_include/zstd_errors.h") +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools KTX_FEATURE_TOOLS + vulkan KTX_FEATURE_VULKAN +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DKTX_VERSION_FULL=v${PORT_VERSION} + -DKTX_FEATURE_TESTS=OFF + -DKTX_FEATURE_LOADTEST_APPS=OFF + -DKTX_FEATURE_STATIC_LIBRARY=${ENABLE_STATIC} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(tools IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES + toktx + ktxsc + ktxinfo + ktx2ktx2 + ktx2check + AUTO_CLEAN + ) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ktx) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + +configure_file("${SOURCE_PATH}/LICENSE.md" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) +file(GLOB LICENSE_FILES "${SOURCE_PATH}/LICENSES/*") +file(COPY ${LICENSE_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSES") \ No newline at end of file diff --git a/ports/ktx/vcpkg.json b/ports/ktx/vcpkg.json new file mode 100644 index 00000000000000..ae905f55d89c46 --- /dev/null +++ b/ports/ktx/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "ktx", + "version": "4.0.0", + "description": "A small library of functions for writing and reading KTX files, and instantiating OpenGL®, OpenGL ESâ„¢ï¸ and Vulkan® textures from them", + "homepage": "https://github.com/KhronosGroup/KTX-Software", + "supports": "!(uwp | x86 | arm64)", + "dependencies": [ + "zstd" + ], + "features": { + "tools": { + "description": "Build tools" + }, + "vulkan": { + "description": "Build Vulkan support" + } + } +} diff --git a/ports/kubazip/fix_targets.patch b/ports/kubazip/fix_targets.patch new file mode 100644 index 00000000000000..e5ffb86085cd78 --- /dev/null +++ b/ports/kubazip/fix_targets.patch @@ -0,0 +1,52 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55dfc77..f0182f9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 3.4) + +-project(zip ++project(kubazip + LANGUAGES C + VERSION "0.1.19") + set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) +@@ -15,7 +15,7 @@ if (MSVC) + elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR + "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra -Werror -pedantic") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra -pedantic") + endif (MSVC) + + # zip +@@ -37,7 +37,7 @@ endif() + + target_include_directories(${PROJECT_NAME} PUBLIC + $ +- $ ++ $ + ) + + # test +@@ -52,7 +52,7 @@ endif() + # Installation (https://github.com/forexample/package-example) { + + set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}") +-set(INCLUDE_INSTALL_DIR "include") ++set(INCLUDE_INSTALL_DIR "include/${PROJECT_NAME}") + + set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 04c2123..002cf5a 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.4) + set(test_out test.out) + + add_executable(${test_out} test.c) +-target_link_libraries(${test_out} zip) ++target_link_libraries(${test_out} kubazip) + + add_test(NAME ${test_out} COMMAND ${test_out}) + diff --git a/ports/kubazip/portfile.cmake b/ports/kubazip/portfile.cmake new file mode 100644 index 00000000000000..ba2f488e0a9414 --- /dev/null +++ b/ports/kubazip/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kuba--/zip + REF 96924c94dabe362bbb1588aa70209e638e6fb35c + SHA512 bc3e9ecf39d54321314d09209f356a2491893591a016b1619abcdea8c1fb1fa8ba1f9858f4e758641df083ed237a2ec9f0af13e0f1d802502257644168ae8907 + HEAD_REF master + PATCHES + fix_targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/kubazip) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/UNLICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/kubazip/vcpkg.json b/ports/kubazip/vcpkg.json new file mode 100644 index 00000000000000..1eecb26ba311de --- /dev/null +++ b/ports/kubazip/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "kubazip", + "version-string": "0.1.19", + "port-version": 1, + "description": "A portable, simple zip library written in C", + "homepage": "https://github.com/kuba--/zip" +} diff --git a/ports/kuku/portfile.cmake b/ports/kuku/portfile.cmake new file mode 100644 index 00000000000000..98ff18775720b8 --- /dev/null +++ b/ports/kuku/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/Kuku + REF 1338c4ae2211ab4c739022ff57f48ce5a76531d5 + SHA512 6cba13b7fc8c453acbfcb4921ee3acc9c3e91d4bba0e01480ea396e17f85288d0179342090111a2e3c056b6918c7b09ec63c41116eb4021e63c54acc19631156 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Kuku-2.1) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/kuku/vcpkg.json b/ports/kuku/vcpkg.json new file mode 100644 index 00000000000000..2f7b13515cefff --- /dev/null +++ b/ports/kuku/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "kuku", + "version-string": "2.1", + "port-version": 1, + "description": "Kuku is a simple open-source (MIT licensed) cuckoo hashing library developed by the Cryptography and Privacy Research group at Microsoft.", + "homepage": "https://github.com/microsoft/Kuku" +} diff --git a/ports/kvasir-mpl/portfile.cmake b/ports/kvasir-mpl/portfile.cmake new file mode 100644 index 00000000000000..7208bcc8adb57d --- /dev/null +++ b/ports/kvasir-mpl/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kvasir-io/mpl + REF a9060b46c37c769e5517e0116b060fec923b6fdb + SHA512 bbe7267d288eda9ded81ce82e428d237cb5a9d686cd1b68a334b1ae53db4bf25e37fb86d991e7cf61542ee91ccae8db7498efde91a07332fd68594a229ff35ca + HEAD_REF development +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_WITH_TEST +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=${BUILD_WITH_TEST} +) + +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/kvasir_mpl) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/ports/kvasir-mpl/vcpkg.json b/ports/kvasir-mpl/vcpkg.json new file mode 100644 index 00000000000000..4d817575a72cb9 --- /dev/null +++ b/ports/kvasir-mpl/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "kvasir-mpl", + "version-string": "2019-08-06", + "port-version": 1, + "description": "This library is part of the Kvasir project. Kvasir is a collection of zero cost statically checked libraries for resource constrained systems including microcontrollers.", + "homepage": "https://github.com/kvasir-io/mpl", + "features": { + "test": { + "description": "Build with test" + } + } +} diff --git a/ports/kwsys/portfile.cmake b/ports/kwsys/portfile.cmake new file mode 100644 index 00000000000000..b676a4a13d53e0 --- /dev/null +++ b/ports/kwsys/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.kitware.com + OUT_SOURCE_PATH SOURCE_PATH + REPO utils/kwsys + REF dbc94f37f9821899aad441bcab525ad96a3f30dc #2021-08-06 + SHA512 98441866fd51f2d4d3974d3c37d4456ce9e50c6f6c2ab0691e55b268907611ef061562fc30b1baa42aa195caf2281aa0e1e0799abc545fe6dae70efe2050ea50 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DKWSYS_INSTALL_INCLUDE_DIR=${CURRENT_PACKAGES_DIR}/include + OPTIONS_RELEASE + -DKWSYS_INSTALL_BIN_DIR=${CURRENT_PACKAGES_DIR}/bin + -DKWSYS_INSTALL_LIB_DIR=${CURRENT_PACKAGES_DIR}/lib + OPTIONS_DEBUG + -DKWSYS_INSTALL_BIN_DIR=${CURRENT_PACKAGES_DIR}/debug/bin + -DKWSYS_INSTALL_LIB_DIR=${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_cmake_install() + + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/kwsys/vcpkg.json b/ports/kwsys/vcpkg.json new file mode 100644 index 00000000000000..b45350d738d937 --- /dev/null +++ b/ports/kwsys/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "kwsys", + "version-date": "2021-08-06", + "description": "Provides platform-independent APIs to many common system features", + "homepage": "https://gitlab.kitware.com/utils/kwsys", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/lager/portfile.cmake b/ports/lager/portfile.cmake new file mode 100644 index 00000000000000..8df28b481385e9 --- /dev/null +++ b/ports/lager/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arximboldi/lager + REF 5924508df1e08752274404818c460c80f0666bb8 + SHA512 ee186b82dd1d729454c61207b48fb80ac8a861511ff501fab499aff5d3ba123ca669f89bdbbd37f120af6dc11a651ba6c163250b5ca94e6290657a35870618d7 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + docs lager_BUILD_DOCS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dlager_BUILD_EXAMPLES=OFF + -Dlager_BUILD_TESTS=OFF + ${FEATURE_OPTIONS} +) + + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Lager) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/lager/vcpkg.json b/ports/lager/vcpkg.json new file mode 100644 index 00000000000000..af6e3d5652afc5 --- /dev/null +++ b/ports/lager/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "lager", + "version-date": "2021-06-17", + "description": "C++ library for value-oriented design using the unidirectional data-flow architecture", + "homepage": "https://sinusoid.es/lager/", + "dependencies": [ + "boost-hana", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zug" + ], + "features": { + "docs": { + "description": "Build documentation" + } + } +} diff --git a/ports/lapack-reference/FindLAPACK.cmake b/ports/lapack-reference/FindLAPACK.cmake new file mode 100644 index 00000000000000..f4d25477d8dad4 --- /dev/null +++ b/ports/lapack-reference/FindLAPACK.cmake @@ -0,0 +1,559 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindLAPACK +---------- + +Find Linear Algebra PACKage (LAPACK) library + +This module finds an installed Fortran library that implements the +LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). + +The approach follows that taken for the ``autoconf`` macro file, +``acx_lapack.m4`` (distributed at +http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html). + +Input Variables +^^^^^^^^^^^^^^^ + +The following variables may be set to influence this module's behavior: + +``BLA_STATIC`` + if ``ON`` use static linkage + +``BLA_VENDOR`` + If set, checks only the specified vendor, if not set checks all the + possibilities. List of vendors valid in this module: + + * ``OpenBLAS`` + * ``FLAME`` + * ``Intel10_32`` (intel mkl v10 32 bit) + * ``Intel10_64lp`` (intel mkl v10+ 64 bit, threaded code, lp64 model) + * ``Intel10_64lp_seq`` (intel mkl v10+ 64 bit, sequential code, lp64 model) + * ``Intel10_64ilp`` (intel mkl v10+ 64 bit, threaded code, ilp64 model) + * ``Intel10_64ilp_seq`` (intel mkl v10+ 64 bit, sequential code, ilp64 model) + * ``Intel10_64_dyn`` (intel mkl v10+ 64 bit, single dynamic library) + * ``Intel`` (obsolete versions of mkl 32 and 64 bit) + * ``ACML`` + * ``Apple`` + * ``NAS`` + * ``Arm`` + * ``Arm_mp`` + * ``Arm_ilp64`` + * ``Arm_ilp64_mp`` + * ``Generic`` + +``BLA_F95`` + if ``ON`` tries to find the BLAS95/LAPACK95 interfaces + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` target: + +``LAPACK::LAPACK`` + The libraries to use for LAPACK, if found. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``LAPACK_FOUND`` + library implementing the LAPACK interface is found +``LAPACK_LINKER_FLAGS`` + uncached list of required linker flags (excluding ``-l`` and ``-L``). +``LAPACK_LIBRARIES`` + uncached list of libraries (using full path name) to link against + to use LAPACK +``LAPACK95_LIBRARIES`` + uncached list of libraries (using full path name) to link against + to use LAPACK95 +``LAPACK95_FOUND`` + library implementing the LAPACK95 interface is found + +.. note:: + + C, CXX or Fortran must be enabled to detect a BLAS/LAPACK library. + C or CXX must be enabled to use Intel Math Kernel Library (MKL). + + For example, to use Intel MKL libraries and/or Intel compiler: + + .. code-block:: cmake + + set(BLA_VENDOR Intel10_64lp) + find_package(LAPACK) +#]=======================================================================] + +enable_language(C) +# Check the language being used +if(NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED)) + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR "FindLAPACK requires Fortran, C, or C++ to be enabled.") + else() + message(STATUS "Looking for LAPACK... - NOT found (Unsupported languages)") + return() + endif() +endif() + +if(CMAKE_Fortran_COMPILER_LOADED) + include(${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake) +else() + include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) +endif() +include(${CMAKE_ROOT}/Modules/CMakePushCheckState.cmake) + +cmake_push_check_state() +set(CMAKE_REQUIRED_QUIET ${LAPACK_FIND_QUIETLY}) + +set(LAPACK_FOUND FALSE) +set(LAPACK95_FOUND FALSE) + +# store original values for CMAKE_FIND_LIBRARY_SUFFIXES +set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.3gfs .so.3 .so.4 .so.5) +endif() + +# TODO: move this stuff to a separate module + +macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _addlibdir _subdirs _blas) + # This macro checks for the existence of the combination of fortran libraries + # given by _list. If the combination is found, this macro checks (using the + # Check_Fortran_Function_Exists macro) whether can link against that library + # combination using the name of a routine given by _name using the linker + # flags given by _flags. If the combination of libraries is found and passes + # the link test, LIBRARIES is set to the list of complete library paths that + # have been found. Otherwise, LIBRARIES is set to FALSE. + + # N.B. _prefix is the prefix applied to the names of all cached variables that + # are generated internally and marked advanced by this macro. + # _addlibdir is a list of additional search paths. _subdirs is a list of path + # suffixes to be used by find_library(). + + set(_libraries_work TRUE) + set(${LIBRARIES}) + set(_combined_name) + + set(_extaddlibdir "${_addlibdir}") + if(WIN32) + list(APPEND _extaddlibdir ENV LIB) + elseif(APPLE) + list(APPEND _extaddlibdir ENV DYLD_LIBRARY_PATH) + else() + list(APPEND _extaddlibdir ENV LD_LIBRARY_PATH) + endif() + list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + + foreach(_library ${_list}) + if(_library MATCHES "^-Wl,--(start|end)-group$") + # Respect linker flags like --start/end-group (required by MKL) + set(${LIBRARIES} ${${LIBRARIES}} "${_library}") + else() + set(_combined_name ${_combined_name}_${_library}) + if(_libraries_work) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS ${_extaddlibdir} + PATH_SUFFIXES ${_subdirs} + ) + #message("DEBUG: find_library(${_library}) got ${${_prefix}_${_library}_LIBRARY}") + mark_as_advanced(${_prefix}_${_library}_LIBRARY) + set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) + set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) + endif() + endif() + endforeach() + + if(_libraries_work) + # Test this combination of libraries. + set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threadlibs}) + #message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") + if(CMAKE_Fortran_COMPILER_LOADED) + check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS) + else() + check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) + endif() + set(CMAKE_REQUIRED_LIBRARIES) + set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) + endif() + + if(_libraries_work) + if("${_list}${_blas}" STREQUAL "") + set(${LIBRARIES} "${LIBRARIES}-PLACEHOLDER-FOR-EMPTY-LIBRARIES") + else() + set(${LIBRARIES} ${${LIBRARIES}} ${_blas} ${_threadlibs}) + endif() + else() + set(${LIBRARIES} FALSE) + endif() + #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") +endmacro() + +set(LAPACK_LINKER_FLAGS) +set(LAPACK_LIBRARIES) +set(LAPACK95_LIBRARIES) + +include(CMakeFindDependencyMacro) +find_dependency(BLAS) + +if(BLAS_FOUND) + set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) + if(NOT $ENV{BLA_VENDOR} STREQUAL "") + set(BLA_VENDOR $ENV{BLA_VENDOR}) + else() + if(NOT BLA_VENDOR) + set(BLA_VENDOR "All") + endif() + endif() + + # LAPACK in the Intel MKL 10+ library? + if(BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + if(CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) + # System-specific settings + if(NOT WIN32) + set(LAPACK_mkl_LM "-lm") + set(LAPACK_mkl_LDL "-ldl") + endif() + + if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + find_package(Threads) + else() + find_package(Threads REQUIRED) + endif() + + if(BLA_VENDOR MATCHES "_64ilp") + set(LAPACK_mkl_ILP_MODE "ilp64") + else() + set(LAPACK_mkl_ILP_MODE "lp64") + endif() + + set(LAPACK_SEARCH_LIBS "") + + if(BLA_F95) + set(LAPACK_mkl_SEARCH_SYMBOL "cheev_f95") + set(_LIBRARIES LAPACK95_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES}) + + # old + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack95") + # new >= 10.3 + list(APPEND LAPACK_SEARCH_LIBS + "mkl_intel_c") + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack95_${LAPACK_mkl_ILP_MODE}") + else() + set(LAPACK_mkl_SEARCH_SYMBOL "cheev") + set(_LIBRARIES LAPACK_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS_LIBRARIES}) + + # old and new >= 10.3 + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack") + endif() + + # MKL uses a multitude of partially platform-specific subdirectories: + if(BLA_VENDOR STREQUAL "Intel10_32") + set(LAPACK_mkl_ARCH_NAME "ia32") + else() + set(LAPACK_mkl_ARCH_NAME "intel64") + endif() + if(WIN32) + set(LAPACK_mkl_OS_NAME "win") + elseif(APPLE) + set(LAPACK_mkl_OS_NAME "mac") + else() + set(LAPACK_mkl_OS_NAME "lin") + endif() + if(DEFINED ENV{MKLROOT}) + file(TO_CMAKE_PATH "$ENV{MKLROOT}" LAPACK_mkl_MKLROOT) + # If MKLROOT points to the subdirectory 'mkl', use the parent directory instead + # so we can better detect other relevant libraries in 'compiler' or 'tbb': + get_filename_component(LAPACK_mkl_MKLROOT_LAST_DIR "${LAPACK_mkl_MKLROOT}" NAME) + if(LAPACK_mkl_MKLROOT_LAST_DIR STREQUAL "mkl") + get_filename_component(LAPACK_mkl_MKLROOT "${LAPACK_mkl_MKLROOT}" DIRECTORY) + endif() + endif() + set(LAPACK_mkl_LIB_PATH_SUFFIXES + "compiler/lib" "compiler/lib/${LAPACK_mkl_ARCH_NAME}_${LAPACK_mkl_OS_NAME}" + "mkl/lib" "mkl/lib/${LAPACK_mkl_ARCH_NAME}_${LAPACK_mkl_OS_NAME}" + "lib/${LAPACK_mkl_ARCH_NAME}_${LAPACK_mkl_OS_NAME}") + + # First try empty lapack libs + if(NOT ${_LIBRARIES}) + check_lapack_libraries( + ${_LIBRARIES} + LAPACK + ${LAPACK_mkl_SEARCH_SYMBOL} + "" + "" + "${CMAKE_THREAD_LIBS_INIT};${LAPACK_mkl_LM};${LAPACK_mkl_LDL}" + "${LAPACK_mkl_MKLROOT}" + "${LAPACK_mkl_LIB_PATH_SUFFIXES}" + "${_BLAS_LIBRARIES}" + ) + endif() + + # Then try the search libs + foreach(IT ${LAPACK_SEARCH_LIBS}) + string(REPLACE " " ";" SEARCH_LIBS ${IT}) + if(NOT ${_LIBRARIES}) + check_lapack_libraries( + ${_LIBRARIES} + LAPACK + ${LAPACK_mkl_SEARCH_SYMBOL} + "" + "${SEARCH_LIBS}" + "${CMAKE_THREAD_LIBS_INIT};${LAPACK_mkl_LM};${LAPACK_mkl_LDL}" + "${LAPACK_mkl_MKLROOT}" + "${LAPACK_mkl_LIB_PATH_SUFFIXES}" + "${_BLAS_LIBRARIES}" + ) + endif() + endforeach() + + unset(LAPACK_mkl_ILP_MODE) + unset(LAPACK_mkl_SEARCH_SYMBOL) + unset(LAPACK_mkl_LM) + unset(LAPACK_mkl_LDL) + unset(LAPACK_mkl_MKLROOT) + unset(LAPACK_mkl_ARCH_NAME) + unset(LAPACK_mkl_OS_NAME) + unset(LAPACK_mkl_LIB_PATH_SUFFIXES) + endif() + endif() + endif() + + # gotoblas? (http://www.tacc.utexas.edu/tacc-projects/gotoblas2) + if(BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "goto2" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # OpenBLAS? (http://www.openblas.net) + if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "openblas" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # ArmPL? (https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries) + if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All") + + # Check for 64bit Integer support + if(BLA_VENDOR MATCHES "_ilp64") + set(LAPACK_armpl_LIB "armpl_ilp64") + else() + set(LAPACK_armpl_LIB "armpl_lp64") + endif() + + # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp + if(BLA_VENDOR MATCHES "_mp") + set(LAPACK_armpl_LIB "${LAPACK_armpl_LIB}_mp") + endif() + + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "${LAPACK_armpl_LIB}" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # FLAME's blis library? (https://github.com/flame/blis) + if(BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "flame" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # BLAS in acml library? + if(BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All") + if(BLAS_LIBRARIES MATCHES ".+acml.+") + set(LAPACK_LIBRARIES ${BLAS_LIBRARIES}) + endif() + endif() + + # Apple LAPACK library? + if(BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "Accelerate" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # Apple NAS (vecLib) library? + if(BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "vecLib" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # Generic LAPACK library? + if(BLA_VENDOR STREQUAL "Generic" OR + BLA_VENDOR STREQUAL "ATLAS" OR + BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "lapack" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + if(NOT LAPACK_LIBRARIES AND NOT WIN32) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "lapack;m;gfortran" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() +else() + message(STATUS "LAPACK requires BLAS") +endif() + +if(BLA_F95) + if(LAPACK95_LIBRARIES) + set(LAPACK95_FOUND TRUE) + else() + set(LAPACK95_FOUND FALSE) + endif() + if(NOT LAPACK_FIND_QUIETLY) + if(LAPACK95_FOUND) + message(STATUS "A library with LAPACK95 API found.") + else() + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with LAPACK95 API not found. Please specify library location." + ) + else() + message(STATUS + "A library with LAPACK95 API not found. Please specify library location." + ) + endif() + endif() + endif() + set(LAPACK_FOUND "${LAPACK95_FOUND}") + set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}") +else() + if(LAPACK_LIBRARIES) + set(LAPACK_FOUND TRUE) + else() + set(LAPACK_FOUND FALSE) + endif() + + if(NOT LAPACK_FIND_QUIETLY) + if(LAPACK_FOUND) + message(STATUS "A library with LAPACK API found.") + else() + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with LAPACK API not found. Please specify library location." + ) + else() + message(STATUS + "A library with LAPACK API not found. Please specify library location." + ) + endif() + endif() + endif() +endif() + +# On compilers that implicitly link LAPACK (such as ftn, cc, and CC on Cray HPC machines) +# we used a placeholder for empty LAPACK_LIBRARIES to get through our logic above. +if(LAPACK_LIBRARIES STREQUAL "LAPACK_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES") + set(LAPACK_LIBRARIES "") +endif() + +if(NOT TARGET LAPACK::LAPACK) + add_library(LAPACK::LAPACK INTERFACE IMPORTED) + set(_lapack_libs "${LAPACK_LIBRARIES}") + if(_lapack_libs AND TARGET BLAS::BLAS) + # remove the ${BLAS_LIBRARIES} from the interface and replace it + # with the BLAS::BLAS target + list(REMOVE_ITEM _lapack_libs "${BLAS_LIBRARIES}") + endif() + + if(_lapack_libs) + set_target_properties(LAPACK::LAPACK PROPERTIES + INTERFACE_LINK_LIBRARIES "${_lapack_libs}" + ) + endif() + unset(_lapack_libs) +endif() + +cmake_pop_check_state() +# restore original values for CMAKE_FIND_LIBRARY_SUFFIXES +set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) diff --git a/ports/lapack-reference/portfile.cmake b/ports/lapack-reference/portfile.cmake new file mode 100644 index 00000000000000..4fb353fdd5343e --- /dev/null +++ b/ports/lapack-reference/portfile.cmake @@ -0,0 +1,143 @@ +#TODO: Features to add: +# USE_XBLAS??? extended precision blas. needs xblas +# LAPACKE should be its own PORT +# USE_OPTIMIZED_LAPACK (Probably not what we want. Does a find_package(LAPACK): probably for LAPACKE only builds _> own port?) +# LAPACKE Builds LAPACKE +# LAPACKE_WITH_TMG Build LAPACKE with tmglib routines +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/clapack/copyright") + message(FATAL_ERROR "Can't build ${PORT} if clapack is installed. Please remove clapack:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() + +include(vcpkg_find_fortran) +SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +set(lapack_ver 3.8.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "Reference-LAPACK/lapack" + REF "v${lapack_ver}" + SHA512 17786cb7306fccdc9b4a242de7f64fc261ebe6a10b6ec55f519deb4cb673cb137e8742aa5698fd2dc52f1cd56d3bd116af3f593a01dcf6770c4dcc86c50b2a7f + HEAD_REF master +) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(ENV{FFLAGS} "$ENV{FFLAGS} -fPIC") +endif() + +set(CBLAS OFF) +if("cblas" IN_LIST FEATURES) + set(CBLAS ON) + if("noblas" IN_LIST FEATURES) + message(FATAL_ERROR "Cannot built feature 'cblas' together with feature 'noblas'. cblas requires blas!") + endif() +endif() + +set(USE_OPTIMIZED_BLAS OFF) +if("noblas" IN_LIST FEATURES) + set(USE_OPTIMIZED_BLAS ON) + set(pcfile "${CURRENT_INSTALLED_DIR}/lib/pkgconfig/openblas.pc") + if(EXISTS "${pcfile}") + file(CREATE_LINK "${pcfile}" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/blas.pc" COPY_ON_ERROR) + endif() + set(pcfile "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig/openblas.pc") + if(EXISTS "${pcfile}") + file(CREATE_LINK "${pcfile}" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/blas.pc" COPY_ON_ERROR) + endif() +endif() + +set(VCPKG_CRT_LINKAGE_BACKUP ${VCPKG_CRT_LINKAGE}) +vcpkg_find_fortran(FORTRAN_CMAKE) +if(VCPKG_USE_INTERNAL_Fortran) + if(VCPKG_CRT_LINKAGE_BACKUP STREQUAL static) + # If openblas has been built with static crt linkage we cannot use it with gfortran! + set(USE_OPTIMIZED_BLAS OFF) + #Cannot use openblas from vcpkg if we are building with gfortran here. + if("noblas" IN_LIST FEATURES) + message(FATAL_ERROR "Feature 'noblas' cannot be used without supplying an external fortran compiler") + endif() + endif() +else() + set(USE_OPTIMIZED_BLAS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DUSE_OPTIMIZED_BLAS=${USE_OPTIMIZED_BLAS}" + "-DCBLAS=${CBLAS}" + ${FORTRAN_CMAKE} +) + +vcpkg_install_cmake() + +vcpkg_cmake_config_fixup(PACKAGE_NAME lapack-${lapack_ver} CONFIG_PATH lib/cmake/lapack-${lapack_ver}) #Should the target path be lapack and not lapack-reference? + +set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack.pc") +if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") +endif() +set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lapack.pc") +if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") +endif() +if(NOT USE_OPTIMIZED_BLAS AND NOT (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")) + set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/blas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() + set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/blas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() +endif() +if("cblas" IN_LIST FEATURES) + set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/cblas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() + set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/cblas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() +endif() +vcpkg_fixup_pkgconfig() + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +# remove debug includes +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_TARGET_IS_WINDOWS) + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/liblapack.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/liblapack.lib" "${CURRENT_PACKAGES_DIR}/lib/lapack.lib") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/liblapack.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/liblapack.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/lapack.lib") + endif() + if(NOT USE_OPTIMIZED_BLAS) + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libblas.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libblas.lib" "${CURRENT_PACKAGES_DIR}/lib/blas.lib") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libblas.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libblas.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/blas.lib") + endif() + endif() +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) diff --git a/ports/lapack-reference/vcpkg-cmake-wrapper.cmake b/ports/lapack-reference/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..b3a7128fff0150 --- /dev/null +++ b/ports/lapack-reference/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +message(STATUS "Using VCPKG FindLAPACK from package 'lapack-reference'") +set(LAPACK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH}) diff --git a/ports/lapack-reference/vcpkg.json b/ports/lapack-reference/vcpkg.json new file mode 100644 index 00000000000000..c3f20e0323cf89 --- /dev/null +++ b/ports/lapack-reference/vcpkg.json @@ -0,0 +1,44 @@ +{ + "name": "lapack-reference", + "version-semver": "3.8.0", + "port-version": 6, + "description": "LAPACK — Linear Algebra PACKage", + "homepage": "http://www.netlib.org/lapack/", + "dependencies": [ + { + "name": "vcpkg-cmake-config", + "host": true + }, + { + "name": "vcpkg-gfortran", + "platform": "windows" + } + ], + "default-features": [ + "blas-select" + ], + "features": { + "blas-select": { + "description": "Use external optimized BLAS", + "dependencies": [ + { + "name": "lapack-reference", + "default-features": false, + "features": [ + "noblas" + ], + "platform": "!windows | !static" + } + ] + }, + "cblas": { + "description": "Builds CBLAS" + }, + "noblas": { + "description": "Use external optimized BLAS", + "dependencies": [ + "blas" + ] + } + } +} diff --git a/ports/lapack/CMakeLists.txt b/ports/lapack/CMakeLists.txt new file mode 100644 index 00000000000000..ddd7883b1632eb --- /dev/null +++ b/ports/lapack/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.17) + +project(Find_LAPACK_external) +find_package(LAPACK REQUIRED) diff --git a/ports/lapack/portfile.cmake b/ports/lapack/portfile.cmake new file mode 100644 index 00000000000000..2a59fa7267d7c2 --- /dev/null +++ b/ports/lapack/portfile.cmake @@ -0,0 +1,5 @@ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +# Make sure LAPACK can be found +vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_PORT_DIR} + OPTIONS -DCMAKE_PREFIX_PATH="${CURRENT_PACKAGES_DIR}") diff --git a/ports/lapack/vcpkg.json b/ports/lapack/vcpkg.json new file mode 100644 index 00000000000000..49dbcfc2236863 --- /dev/null +++ b/ports/lapack/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "lapack", + "version-string": "3", + "port-version": 2, + "description": "Metapackage for packages which provide LAPACK", + "dependencies": [ + { + "name": "clapack", + "platform": "arm & windows" + }, + { + "name": "lapack-reference", + "platform": "!arm | !windows" + } + ] +} diff --git a/ports/lastools/CONTROL b/ports/lastools/CONTROL deleted file mode 100644 index cb908a8d4ec24e..00000000000000 --- a/ports/lastools/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: lastools -Version: 2019-07-10 -Homepage: https://github.com/LAStools/LAStools -Description: LAStools: award-winning software for efficient LiDAR processing (with LASzip) \ No newline at end of file diff --git a/ports/lastools/fix_install_paths_lastools.patch b/ports/lastools/fix_install_paths_lastools.patch new file mode 100644 index 00000000000000..10bb34070546f8 --- /dev/null +++ b/ports/lastools/fix_install_paths_lastools.patch @@ -0,0 +1,27 @@ +diff --git a/LASlib/src/CMakeLists.txt b/LASlib/src/CMakeLists.txt +index 1b170bf..b5c40cb 100644 +--- a/LASlib/src/CMakeLists.txt ++++ b/LASlib/src/CMakeLists.txt +@@ -99,17 +99,8 @@ if(MSVC) + ) + endif() + ++install(TARGETS LASlib EXPORT LASlib-targets ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(FILES ${LAS_INCLUDES} DESTINATION include/LASlib) +- +-if (MSVC) +- foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} ) +- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OUTPUTCONFIG} DESTINATION lib/LASlib) +- endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES ) +-else() +- install(TARGETS LASlib EXPORT laslib-targets +- ARCHIVE DESTINATION lib/LASlib +- LIBRARY DESTINATION lib/LASlib +- RUNTIME DESTINATION lib/LASlib) +- install(EXPORT laslib-targets DESTINATION lib/cmake/LASlib) +- install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION lib/cmake/LASlib) +-endif(MSVC) ++install(EXPORT LASlib-targets DESTINATION share/lastools/LASlib) ++install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION share/lastools/LASlib) +\ No newline at end of file diff --git a/ports/lastools/portfile.cmake b/ports/lastools/portfile.cmake index 5f6e40397f369a..c21fb939e5ec80 100644 --- a/ports/lastools/portfile.cmake +++ b/ports/lastools/portfile.cmake @@ -2,16 +2,16 @@ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} doesn't currently support UWP.") endif() -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO LAStools/LAStools - REF f15a702530e098b46c2eb3923f89a68ffa81e668 - SHA512 df5763b7c69721ba2a24fde2b4092e53136020b88ff4cc0d533279d709c55d7d16d8a4300f0b68829294d9311ed674af5b15306c4ded7a6310e55404737702e0 + REF 7c444a4bbae16fe43c676824a26419bb740a6ab8 + SHA512 4503b033a5319caee5570f25a05009c0d05a8c61a43ed78317899faaeba82fbc1f9a8c8433772bb36547c74e850a2e68d20a16f6f22b12b3004da7e1aa2f334b HEAD_REF master + PATCHES + "fix_install_paths_lastools.patch" ) vcpkg_configure_cmake( @@ -22,12 +22,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/lastools/vcpkg.json b/ports/lastools/vcpkg.json new file mode 100644 index 00000000000000..4d54c1a813b939 --- /dev/null +++ b/ports/lastools/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "lastools", + "version-string": "2020-05-09", + "port-version": 1, + "description": "LAStools: award-winning software for efficient LiDAR processing (with LASzip)", + "homepage": "https://github.com/LAStools/LAStools", + "supports": "!uwp" +} diff --git a/ports/laszip/CONTROL b/ports/laszip/CONTROL deleted file mode 100644 index c528a487922d37..00000000000000 --- a/ports/laszip/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: laszip -Version: 3.4.1 -Description: LASzip - free and lossless LiDAR compression diff --git a/ports/laszip/portfile.cmake b/ports/laszip/portfile.cmake index b72f7a0a2ba80c..de6508db06038b 100644 --- a/ports/laszip/portfile.cmake +++ b/ports/laszip/portfile.cmake @@ -1,28 +1,25 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO LASzip/LASzip - REF 3.4.1 - SHA512 875303d4672c61778694b8a969cc1e4239564f2fa81b35cba472f7eb28c71ca9bf052ca633dcdc8cbfb486a6c6849caed9833669fd1ba0aa5ee0065e7e2013f1 + REF 1ab671e42ff1f086e29d5b7e300a5026e7b8d69b # 3.4.3 + SHA512 7ec20d6999b16e6a74a64d1dc3e9f1b1b4510acd306d30ccae34a543ca0dc52e1d1d989279fafdda321616ba1e0ceb59a093d8c61ba5a586b760efa0d00a0184 HEAD_REF master ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LASZIP_BUILD_STATIC) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DLASZIP_BUILD_STATIC=${LASZIP_BUILD_STATIC} ) -vcpkg_install_cmake() +vcpkg_cmake_install() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/laszip RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/laszip" RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") # Remove laszip_api3 dll since it doesn't export functions properly during build. -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/laszip_api3.dll) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/laszip_api3.dll) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/laszip_api3.dll") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/laszip_api3.dll") diff --git a/ports/laszip/vcpkg.json b/ports/laszip/vcpkg.json new file mode 100644 index 00000000000000..40e5268176411a --- /dev/null +++ b/ports/laszip/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "laszip", + "version": "3.4.3", + "port-version": 1, + "description": "LASzip - free and lossless LiDAR compression", + "homepage": "https://laszip.org/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/lazy-importer/CONTROL b/ports/lazy-importer/CONTROL deleted file mode 100644 index c46a768b000fd5..00000000000000 --- a/ports/lazy-importer/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: lazy-importer -Version: 2019-08-10 -Description: Library for importing functions from dlls in a hidden, reverse engineer unfriendly way -Homepage: https://github.com/JustasMasiulis/lazy_importer diff --git a/ports/lazy-importer/portfile.cmake b/ports/lazy-importer/portfile.cmake index 076bb7c346cfcb..23efa3c1fd0302 100644 --- a/ports/lazy-importer/portfile.cmake +++ b/ports/lazy-importer/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO JustasMasiulis/lazy_importer diff --git a/ports/lazy-importer/vcpkg.json b/ports/lazy-importer/vcpkg.json new file mode 100644 index 00000000000000..a543eee314ae58 --- /dev/null +++ b/ports/lazy-importer/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "lazy-importer", + "version-string": "2019-08-10", + "port-version": 1, + "description": "Library for importing functions from dlls in a hidden, reverse engineer unfriendly way", + "homepage": "https://github.com/JustasMasiulis/lazy_importer" +} diff --git a/ports/lcm/CONTROL b/ports/lcm/CONTROL deleted file mode 100644 index 1eb187ef7add1b..00000000000000 --- a/ports/lcm/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: lcm -Version: 1.4.0 -Build-Depends: glib -Homepage: https://github.com/lcm-proj/lcm -Description: Lightweight Communications and Marshalling (LCM) - LCM is a set of libraries and tools for message passing and data marshalling, targeted at real-time systems where high-bandwidth and low latency are critical. It provides a publish/subscribe message passing model and automatic marshalling/unmarshalling code generation with bindings for applications in a variety of programming languages. diff --git a/ports/lcm/glib.link.patch b/ports/lcm/glib.link.patch new file mode 100644 index 00000000000000..67f6dc0f5805c8 --- /dev/null +++ b/ports/lcm/glib.link.patch @@ -0,0 +1,30 @@ +diff --git a/cmake/FindGLib2.cmake b/cmake/FindGLib2.cmake +index 2f1a8be45..db823b953 100644 +--- a/cmake/FindGLib2.cmake ++++ b/cmake/FindGLib2.cmake +@@ -14,7 +14,7 @@ function(_glib2_find_include VAR HEADER) + + find_path(GLIB2_${VAR}_INCLUDE_DIR ${HEADER} + PATHS ${_paths} +- PATH_SUFFIXES glib-2.0 glib-2.0/include ++ PATH_SUFFIXES glib-2.0 glib-2.0/include lib/glib-2.0/include + ) + mark_as_advanced(GLIB2_${VAR}_INCLUDE_DIR) + endfunction() +@@ -108,6 +108,16 @@ foreach(_glib2_component ${GLib2_FIND_COMPONENTS}) + + endforeach() + ++find_library(PCRE_LIBRARY pcre) ++set_property(TARGET GLib2::glib APPEND PROPERTY ++ INTERFACE_LINK_LIBRARIES ${PCRE_LIBRARY} ++) ++set(THREADS_PREFER_PTHREAD_FLAG ON) ++find_package(Threads) ++set_property(TARGET GLib2::glib APPEND PROPERTY ++ INTERFACE_LINK_LIBRARIES Threads::Threads ++) ++ + list(APPEND GLib2_FIND_COMPONENTS glib) + set(GLib2_FIND_REQUIRED_glib TRUE) + diff --git a/ports/lcm/portfile.cmake b/ports/lcm/portfile.cmake index ef1633d84404cf..74bca46d300d8c 100644 --- a/ports/lcm/portfile.cmake +++ b/ports/lcm/portfile.cmake @@ -1,13 +1,13 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lcm-proj/lcm REF v1.4.0 SHA512 ca036aa2c31911e0bfaeab9665188c97726201267314693a1c333c4efe13ea598b39a55a19bc1d48e65462ac9d1716adfda5af86c645d59c3247192631247cc6 HEAD_REF master - PATCHES only-install-one-flavor.patch - fix-build-error.patch + PATCHES + only-install-one-flavor.patch + fix-build-error.patch + glib.link.patch ) vcpkg_configure_cmake( @@ -23,13 +23,19 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/lcm/cmake) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/lcm" "${CURRENT_PACKAGES_DIR}/lib/lcm") +endif() + -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/aclocal) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/java) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/aclocal") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/java") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/man") file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe) if(EXES) @@ -42,11 +48,11 @@ if(DEBUG_EXES) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lcm) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/lcm/vcpkg.json b/ports/lcm/vcpkg.json new file mode 100644 index 00000000000000..ec04fd87b91c52 --- /dev/null +++ b/ports/lcm/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "lcm", + "version": "1.4.0", + "port-version": 2, + "description": [ + "Lightweight Communications and Marshalling (LCM)", + "LCM is a set of libraries and tools for message passing and data marshalling, targeted at real-time systems where high-bandwidth and low latency are critical. It provides a publish/subscribe message passing model and automatic marshalling/unmarshalling code generation with bindings for applications in a variety of programming languages." + ], + "homepage": "https://github.com/lcm-proj/lcm", + "dependencies": [ + "glib" + ] +} diff --git a/ports/lcms/CMakeLists.txt b/ports/lcms/CMakeLists.txt index 10ccc0b02cba25..d45ed2e8c77007 100644 --- a/ports/lcms/CMakeLists.txt +++ b/ports/lcms/CMakeLists.txt @@ -1,66 +1,87 @@ cmake_minimum_required(VERSION 3.5) -project(lcms) +option(CMAKE_VERBOSE_MAKEFILE "Create verbose makefile" OFF) +option(BUILD_SHARED_LIBS "Create lcms2 as a shared library" ON) -set(SRCS -"src/cmstypes.c" -"src/cmsvirt.c" -"src/cmswtpnt.c" -"src/cmsxform.c" -"src/lcms2.def" -"src/lcms2_internal.h" -"src/cmsalpha.c" -"src/cmscam02.c" -"src/cmscgats.c" -"src/cmscnvrt.c" -"src/cmserr.c" -"src/cmsgamma.c" -"src/cmsgmt.c" -"src/cmshalf.c" -"src/cmsintrp.c" -"src/cmsio0.c" -"src/cmsio1.c" -"src/cmslut.c" -"src/cmsmd5.c" -"src/cmsmtrx.c" -"src/cmsnamed.c" -"src/cmsopt.c" -"src/cmspack.c" -"src/cmspcs.c" -"src/cmsplugin.c" -"src/cmsps2.c" -"src/cmssamp.c" -"src/cmssm.c" -) +project(little-cms) set(CMAKE_DEBUG_POSTFIX d) -add_definitions(-DUNICODE -D_UNICODE) +add_library(lcms2 + "${CMAKE_CURRENT_LIST_DIR}/src/cmstypes.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsvirt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmswtpnt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsxform.c" + "${CMAKE_CURRENT_LIST_DIR}/src/lcms2.def" + "${CMAKE_CURRENT_LIST_DIR}/src/lcms2_internal.h" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsalpha.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmscam02.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmscgats.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmscnvrt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmserr.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsgamma.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsgmt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmshalf.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsintrp.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsio0.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsio1.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmslut.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsmd5.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsmtrx.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsnamed.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsopt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmspack.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmspcs.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsplugin.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsps2.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmssamp.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmssm.c" +) if(BUILD_SHARED_LIBS) - add_definitions(-DCMS_DLL_BUILD) + target_compile_options(lcms2 PRIVATE -DCMS_DLL_BUILD) + target_compile_options(lcms2 PUBLIC -DCMS_DLL) endif() +target_compile_options(lcms2 PRIVATE -DUNICODE -D_UNICODE) -string(REPLACE "/utf-8" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - -include_directories( -"./include" -) +target_include_directories(lcms2 PRIVATE "${CMAKE_CURRENT_LIST_DIR}/include") +set_target_properties(lcms2 PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_LIST_DIR}/include/lcms2.h;${CMAKE_CURRENT_LIST_DIR}/include/lcms2_plugin.h") -add_library(lcms2 ${SRCS}) +# Generate pkg-config file +SET(PACKAGE "lcms2") +# Read VERSION from file configure +file(READ "${CMAKE_CURRENT_LIST_DIR}/configure" lcms2_configure) +string(REGEX MATCH "PACKAGE_VERSION='(([0-9]+)\\.([0-9]+))'" _ ${lcms2_configure}) +set(VERSION "${CMAKE_MATCH_1}") +SET(prefix "${CMAKE_INSTALL_PREFIX}") +SET(exec_prefix "\${prefix}") +SET(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") +SET(includedir "\${prefix}/include") +CONFIGURE_FILE(lcms2.pc.in "${PROJECT_BINARY_DIR}/lcms2.pc" @ONLY) +IF(CMAKE_BUILD_TYPE MATCHES Debug) + # Add CMAKE_DEBUG_POSTFIX + file(READ "${PROJECT_BINARY_DIR}/lcms2.pc" LCMS2_PC) + string(REPLACE "-llcms2" "-llcms2${CMAKE_DEBUG_POSTFIX}" LCMS2_PC "${LCMS2_PC}") + file(WRITE "${PROJECT_BINARY_DIR}/lcms2.pc" "${LCMS2_PC}") +ENDIF() -if(NOT SKIP_INSTALL_HEADERS ) +install(TARGETS lcms2 + EXPORT lcmsConfig + RUNTIME DESTINATION "bin" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + PUBLIC_HEADER DESTINATION "include" + COMPONENT dev +) - install(FILES - "./include/lcms2.h" - "./include/lcms2_plugin.h" - DESTINATION include - ) +INSTALL(FILES ${PROJECT_BINARY_DIR}/lcms2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -endif(NOT SKIP_INSTALL_HEADERS ) +export(TARGETS lcms2 + NAMESPACE lcms2:: + FILE "share/lcms/lcmsConfig.cmake" +) -install(TARGETS lcms2 EXPORT lcms_EXPORT - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib +install(EXPORT lcmsConfig + DESTINATION "share/lcms" + NAMESPACE lcms2:: ) diff --git a/ports/lcms/CONTROL b/ports/lcms/CONTROL deleted file mode 100644 index b42c827d460b26..00000000000000 --- a/ports/lcms/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: lcms -Version: 2.9 -Build-Depends: -Homepage: https://github.com/mm2/Little-CMS -Description: Little CMS. diff --git a/ports/lcms/portfile.cmake b/ports/lcms/portfile.cmake index deb6c9d3c0a503..2a2d2deae23fc8 100644 --- a/ports/lcms/portfile.cmake +++ b/ports/lcms/portfile.cmake @@ -1,32 +1,29 @@ -include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(ADDITIONAL_PATCH "shared.patch") +endif() -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH REPO mm2/Little-CMS - REF lcms2.9 - SHA512 b565ed3714c9beaf13e15b3798abbc6c295443357c8db3299cecd9794620bb1d7c50ad258cf887c7bbf66efacb8d8699a7ee579f8c73598740915caa3044ae70 + REF 924a020d09bfe468c665467caf24aadeb41ff77c # 2.12 + SHA512 0c2dc069878ca38a92af4800aa3fb2660203fbcdf6dccd9db60cfacb6896185e3e9222893f39ec3e132b0f4900a2932d490dd8db5b1b431519966a64d28404d2 HEAD_REF master - PATCHES "${CMAKE_CURRENT_LIST_DIR}/remove_library_directive.patch" -) + PATCHES + remove_library_directive.patch + ${ADDITIONAL_PATCH} +) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON ) vcpkg_install_cmake() - -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcms RENAME copyright) - vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +vcpkg_fixup_pkgconfig() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -#patch header files to fix import/export issues -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES "${CMAKE_CURRENT_LIST_DIR}/shared.patch") -endif() +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/lcms/shared.patch b/ports/lcms/shared.patch index 2d7506c5294abd..ac54904860a97f 100644 --- a/ports/lcms/shared.patch +++ b/ports/lcms/shared.patch @@ -1,5 +1,5 @@ ---- lcms2.h Wed Jul 20 08:46:01 2016 -+++ lcms2.h Mon Jan 30 15:01:12 2017 +--- a/include/lcms2.h Wed Jul 20 08:46:01 2016 ++++ b/include/lcms2.h Mon Jan 30 15:01:12 2017 @@ -212,6 +212,7 @@ #endif // CMS_USE_BIG_ENDIAN diff --git a/ports/lcms/vcpkg.json b/ports/lcms/vcpkg.json new file mode 100644 index 00000000000000..0618ac8479d455 --- /dev/null +++ b/ports/lcms/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "lcms", + "version-string": "2.12", + "port-version": 1, + "description": "Little CMS.", + "homepage": "https://github.com/mm2/Little-CMS" +} diff --git a/ports/leaf/CONTROL b/ports/leaf/CONTROL deleted file mode 100644 index d85d93d9af4c16..00000000000000 --- a/ports/leaf/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: leaf -Version: 0.2.1-2 -Description: Lightweight error augmentation framework \ No newline at end of file diff --git a/ports/leaf/portfile.cmake b/ports/leaf/portfile.cmake index 1ff5e1e536fb44..9aefc82414d125 100644 --- a/ports/leaf/portfile.cmake +++ b/ports/leaf/portfile.cmake @@ -1,21 +1 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO zajo/leaf - REF 5fd08ee095c92b2bf4623b7237393e81f995ca7a - SHA512 92b86dbba55d31808f442d27dd873dce1162b28213533e124df448ae4f7b4442733501b6539ab15f67a85e184e458a66df4e4e020a3a213b44578ebbde281a42 - HEAD_REF master -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/leaf RENAME copyright) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/leaf/vcpkg.json b/ports/leaf/vcpkg.json new file mode 100644 index 00000000000000..88c24fca5ac3f8 --- /dev/null +++ b/ports/leaf/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "leaf", + "version-string": "0.2.2", + "port-version": 1, + "description": "Deprecated boost-leaf port.", + "dependencies": [ + "boost-leaf" + ] +} diff --git a/ports/lemon/CONTROL b/ports/lemon/CONTROL deleted file mode 100644 index 08b73936879b97..00000000000000 --- a/ports/lemon/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: lemon -Version: 0 -Description: Deprecated port, use liblemon instead -Build-Depends: liblemon diff --git a/ports/lemon/vcpkg.json b/ports/lemon/vcpkg.json new file mode 100644 index 00000000000000..b75102e5498d87 --- /dev/null +++ b/ports/lemon/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "lemon", + "version-string": "0", + "port-version": 1, + "description": "Deprecated port, use liblemon instead", + "dependencies": [ + "liblemon" + ] +} diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL deleted file mode 100644 index 0d65a10d5fe190..00000000000000 --- a/ports/leptonica/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: leptonica -Version: 1.78.0 -Homepage: https://github.com/DanBloomberg/leptonica -Description: An open source library containing software that is broadly useful for image processing and image analysis applications -Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib diff --git a/ports/leptonica/Modify-include-dir.patch b/ports/leptonica/Modify-include-dir.patch new file mode 100644 index 00000000000000..59486c6e266b49 --- /dev/null +++ b/ports/leptonica/Modify-include-dir.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5aed94f..9bfcff9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -212,7 +212,7 @@ include(Configure) + + configure_file(${AUTOCONFIG_SRC} ${AUTOCONFIG} @ONLY) + +-set(INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" "${CMAKE_INSTALL_PREFIX}/include/leptonica") ++set(INCLUDE_DIR "\${CMAKE_CURRENT_LIST_DIR}/../../include" "\${CMAKE_CURRENT_LIST_DIR}/../../include/leptonica") + + ############################################################################### + # diff --git a/ports/leptonica/find-dependency.patch b/ports/leptonica/find-dependency.patch index 46348833e3844b..9bae1260937f89 100644 --- a/ports/leptonica/find-dependency.patch +++ b/ports/leptonica/find-dependency.patch @@ -1,17 +1,19 @@ diff --git a/cmake/templates/LeptonicaConfig.cmake.in b/cmake/templates/LeptonicaConfig.cmake.in -index d53904a..2aa2fea 100644 +index 342c37d..b358b7b 100644 --- a/cmake/templates/LeptonicaConfig.cmake.in +++ b/cmake/templates/LeptonicaConfig.cmake.in -@@ -20,6 +20,13 @@ +@@ -20,6 +20,15 @@ # # =================================================================================== +include(CMakeFindDependencyMacro) -+find_dependency(TIFF) ++find_dependency(JPEG) +find_dependency(ZLIB) +find_dependency(PNG) -+find_dependency(JPEG) ++find_dependency(TIFF) +find_dependency(GIF) ++find_dependency(WebP) ++find_dependency(OpenJPEG) + include(${CMAKE_CURRENT_LIST_DIR}/LeptonicaTargets.cmake) diff --git a/ports/leptonica/fix-cmakelists.patch b/ports/leptonica/fix-cmakelists.patch index b08a971f627f5d..6d1d281693003c 100644 --- a/ports/leptonica/fix-cmakelists.patch +++ b/ports/leptonica/fix-cmakelists.patch @@ -1,12 +1,12 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 945100a..6daad98 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -14,7 +14,6 @@ if (MSVC) - set_source_files_properties(${src} PROPERTIES LANGUAGE CXX) - endif() - --string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) - - add_library (leptonica ${LIBRARY_TYPE} ${src} ${hdr}) - set_target_properties (leptonica PROPERTIES VERSION ${VERSION_PLAIN}) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e474463..d2b999d 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -14,7 +14,6 @@ if (MSVC) + set_source_files_properties(${src} PROPERTIES LANGUAGE CXX) + endif() + +-string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") + + add_library (leptonica ${src} ${hdr}) + set_target_properties (leptonica PROPERTIES VERSION ${VERSION_PLAIN}) diff --git a/ports/leptonica/fix-find-libwebp.patch b/ports/leptonica/fix-find-libwebp.patch new file mode 100644 index 00000000000000..588cf0c5480374 --- /dev/null +++ b/ports/leptonica/fix-find-libwebp.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6535632..1740841 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,8 +70,7 @@ if(NOT SW_BUILD) + pkg_check_modules(JP2K libopenjp2>=2.0 QUIET) + endif() + if(NOT WEBP) +- find_path(WEBP_INCLUDE_DIR /webp/decode.h) +- find_library(WEBP_LIBRARY NAMES webp) ++ find_package(WebP CONFIG REQUIRED) + if (WEBP_INCLUDE_DIR AND WEBP_LIBRARY) + set(WEBP 1) + set(WEBP_FOUND TRUE) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d2b999d..019ec7b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -52,7 +52,7 @@ if (TIFF_LIBRARIES) + endif() + if (WEBP_FOUND) + target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIRS}) +- target_link_libraries (leptonica ${WEBP_LIBRARIES}) ++ target_link_libraries (leptonica WebP::webp WebP::libwebpmux) + endif() + if (ZLIB_LIBRARIES) + target_include_directories (leptonica PUBLIC ${ZLIB_INCLUDE_DIRS}) diff --git a/ports/leptonica/portfile.cmake b/ports/leptonica/portfile.cmake index 7b8479698c980c..11dfb396769659 100644 --- a/ports/leptonica/portfile.cmake +++ b/ports/leptonica/portfile.cmake @@ -1,37 +1,37 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DanBloomberg/leptonica - REF 87b8219360bca3c9929a5705c3d9c50c42c34bca - SHA512 b7bfa9437be7e3d9276acacf8f62ccda1cd8f88741ada5106ef0232d4965617be2c5d0b8a6b4462896a1a0b6b44d9ecefd6e6b8d0e50d4fb881bdf5e821703a4 + REF 2ff4313a85427ceb272540c570106b2f893da097 # 1.81.1 + SHA512 0e35538f1407e7220e68d635e5fd4c82219b58fb4b6ca8132d72892f52853e13451a2a160644a122c47598f77d2e87046cfb072be261be9a941342f476dc6376 HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch - ${CMAKE_CURRENT_LIST_DIR}/use-tiff-libraries.patch - ${CMAKE_CURRENT_LIST_DIR}/find-dependency.patch + fix-cmakelists.patch + find-dependency.patch + fix-find-libwebp.patch + Modify-include-dir.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS + -DSW_BUILD=OFF + -DCPPAN_BUILD=OFF -DSTATIC=${STATIC} -DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file() + MAYBE_UNUSED_VARIABLES + STATIC ) -vcpkg_install_cmake() +vcpkg_cmake_install() + +vcpkg_fixup_pkgconfig() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake) vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Handle copyright -file(COPY ${SOURCE_PATH}/leptonica-license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/leptonica) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/leptonica/leptonica-license.txt ${CURRENT_PACKAGES_DIR}/share/leptonica/copyright) +file(INSTALL "${SOURCE_PATH}/leptonica-license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/leptonica/use-tiff-libraries.patch b/ports/leptonica/use-tiff-libraries.patch deleted file mode 100644 index 4db86ef7bb60cb..00000000000000 --- a/ports/leptonica/use-tiff-libraries.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 6daad98..5119895 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -48,7 +48,7 @@ if (PNG_LIBRARY) - endif() - if (TIFF_LIBRARY) - target_include_directories (leptonica PUBLIC ${TIFF_INCLUDE_DIR}) -- target_link_libraries (leptonica ${TIFF_LIBRARY}) -+ target_link_libraries (leptonica ${TIFF_LIBRARIES}) - endif() - if (WEBP_FOUND) - target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIRS}) diff --git a/ports/leptonica/vcpkg.json b/ports/leptonica/vcpkg.json new file mode 100644 index 00000000000000..b70a8332d10620 --- /dev/null +++ b/ports/leptonica/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "leptonica", + "version": "1.81.1", + "description": "An open source library containing software that is broadly useful for image processing and image analysis applications", + "homepage": "https://github.com/DanBloomberg/leptonica", + "dependencies": [ + "giflib", + "libjpeg-turbo", + "libpng", + "libwebp", + "openjpeg", + "tiff", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/lerc/create_package.patch b/ports/lerc/create_package.patch new file mode 100644 index 00000000000000..7b06c119ba3f66 --- /dev/null +++ b/ports/lerc/create_package.patch @@ -0,0 +1,26 @@ + CMakeLists.txt | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e90fcdd..17c79e8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,7 +17,7 @@ add_library(LercLib ${SOURCES}) + target_link_libraries (LercLib) + + install( +- TARGETS LercLib ++ TARGETS LercLib EXPORT LercTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -28,3 +28,9 @@ install( + FILES "include/Lerc_types.h" "include/Lerc_c_api.h" + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) ++ ++install(EXPORT LercTargets ++ FILE lercConfig.cmake ++ NAMESPACE Esri:: ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/lerc" ++) diff --git a/ports/lerc/enable_static_build.patch b/ports/lerc/enable_static_build.patch new file mode 100644 index 00000000000000..92f0d7852c8254 --- /dev/null +++ b/ports/lerc/enable_static_build.patch @@ -0,0 +1,16 @@ + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d22ad11..e90fcdd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,7 @@ file(GLOB SOURCES + ) + message(${SOURCES}) + +-add_library(LercLib SHARED ${SOURCES}) ++add_library(LercLib ${SOURCES}) + + target_link_libraries (LercLib) + diff --git a/ports/lerc/install_lib_to_archive_path.patch b/ports/lerc/install_lib_to_archive_path.patch new file mode 100644 index 00000000000000..3262a7ca55c528 --- /dev/null +++ b/ports/lerc/install_lib_to_archive_path.patch @@ -0,0 +1,16 @@ + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ececeed..d22ad11 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,7 +20,7 @@ install( + TARGETS LercLib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + diff --git a/ports/lerc/portfile.cmake b/ports/lerc/portfile.cmake new file mode 100644 index 00000000000000..5b3060f434020b --- /dev/null +++ b/ports/lerc/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Esri/lerc + REF v2.2 + SHA512 5ddf1e8f0c123d3c1329e980021e25e6ff9b79c96588115e5b48ba7637f0b2bf3ebb2ab6ebf94cfbde45ea1521f14405f669e23f0b74d9ae8f9b2cf80a908215 + HEAD_REF master + PATCHES + "install_lib_to_archive_path.patch" + "enable_static_build.patch" + "create_package.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + diff --git a/ports/lerc/vcpkg.json b/ports/lerc/vcpkg.json new file mode 100644 index 00000000000000..6772a248b35261 --- /dev/null +++ b/ports/lerc/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "lerc", + "version-string": "2.2", + "port-version": 2, + "description": "An open-source image or raster format which supports rapid encoding and decoding for any pixel type", + "homepage": "https://github.com/Esri/lerc" +} diff --git a/ports/lest/CONTROL b/ports/lest/CONTROL deleted file mode 100644 index 38b01027ba0447..00000000000000 --- a/ports/lest/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: lest -Version: 1.35.1 -Description: A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD and BDD (includes C++98 variant) diff --git a/ports/lest/portfile.cmake b/ports/lest/portfile.cmake index d5948d97bdd2a1..2737d3695289b1 100644 --- a/ports/lest/portfile.cmake +++ b/ports/lest/portfile.cmake @@ -1,9 +1,7 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/lest - REF v1.35.1 + REF v1.35.1 SHA512 06b786cbca37cb4d20737d040176bf34398090d566310b88558b788804d8b832c682f1814f5c68ef11192243dbde5643e73b78be4fb1407b831bcde43adb002c ) diff --git a/ports/lest/vcpkg.json b/ports/lest/vcpkg.json new file mode 100644 index 00000000000000..f8b68ff7351350 --- /dev/null +++ b/ports/lest/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "lest", + "version-string": "1.35.1", + "port-version": 2, + "description": "A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD and BDD (includes C++98 variant)", + "homepage": "https://github.com/martinmoene/lest" +} diff --git a/ports/leveldb/CONTROL b/ports/leveldb/CONTROL deleted file mode 100644 index aa0b2bc3e1df4b..00000000000000 --- a/ports/leveldb/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: leveldb -Version: 1.22-1 -Homepage: https://github.com/bitcoin-core/leveldb -Description: LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values. diff --git a/ports/leveldb/portfile.cmake b/ports/leveldb/portfile.cmake index a40ba6a02d6c76..4f20f837b60623 100644 --- a/ports/leveldb/portfile.cmake +++ b/ports/leveldb/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "leveldb doesn't supports UWP") endif() diff --git a/ports/leveldb/vcpkg.json b/ports/leveldb/vcpkg.json new file mode 100644 index 00000000000000..00df32a4f0d388 --- /dev/null +++ b/ports/leveldb/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "leveldb", + "version-string": "1.22", + "port-version": 2, + "description": "LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.", + "homepage": "https://github.com/bitcoin-core/leveldb", + "supports": "!uwp" +} diff --git a/ports/levmar/add-install.patch b/ports/levmar/add-install.patch new file mode 100644 index 00000000000000..d256c77adb41cb --- /dev/null +++ b/ports/levmar/add-install.patch @@ -0,0 +1,11 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cc6789f..d2757f9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,3 +95,6 @@ IF(BUILD_DEMO) + ENDIF(BUILD_DEMO) + + #SUBDIRS(matlab) ++ ++install(TARGETS levmar LIBRARY DESTINATION "lib/") ++install(FILES "${CMAKE_SOURCE_DIR}/levmar.h" DESTINATION "include/levmar/") diff --git a/ports/levmar/portfile.cmake b/ports/levmar/portfile.cmake new file mode 100644 index 00000000000000..020d4252082cd8 --- /dev/null +++ b/ports/levmar/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(MESSAGE "levmar currently only checked on Windows" + ON_TARGET "OSX" "Linux" "UWP" +) + +vcpkg_download_distfile(ARCHIVE + URLS "http://users.ics.forth.gr/~lourakis/levmar/levmar-2.6.tgz" + FILENAME "levmar-2.6.tgz" + SHA512 5b4c64b63be9b29d6ad2df435af86cd2c2e3216313378561a670ac6a392a51bbf1951e96c6b1afb77c570f23dd8e194017808e46929fec2d8d9a7fe6cf37022b +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES add-install.patch # patch just adding the install commands to original CMakeLists.txt +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DHAVE_LAPACK=OFF + -DHAVE_PLASMA=OFF + -DBUILD_DEMO=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Handle duplicated debug includes +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/levmar/vcpkg.json b/ports/levmar/vcpkg.json new file mode 100644 index 00000000000000..99c22de7301ad5 --- /dev/null +++ b/ports/levmar/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "levmar", + "version-string": "2.6", + "description": "Levenberg-Marquardt nonlinear least squares optimization algorithm", + "homepage": "http://users.ics.forth.gr/~lourakis/levmar/", + "supports": "!(uwp | osx | linux)" +} diff --git a/ports/libaaplus/CMakeLists.txt b/ports/libaaplus/CMakeLists.txt new file mode 100644 index 00000000000000..fa8f60f806c3d7 --- /dev/null +++ b/ports/libaaplus/CMakeLists.txt @@ -0,0 +1,69 @@ +PROJECT (AstronomicalAlgorithms) + +cmake_minimum_required(VERSION 3.11) +cmake_policy(VERSION 3.11) + +project(libaaplus LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 14) + +option(BUILD_TOOLS "Build libaaplus tools" OFF) + +file(GLOB LIBS_SRC RELATIVE ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/*.cpp) + +list(REMOVE_ITEM ${LIBS_SRC} AATest.cpp) + +file(GLOB PUBLIC_HEADERS RELATIVE ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/*.h) + +set(TEST_SRCS + AATest.cpp +) + +add_library(libaaplus + ${LIBS_SRC} +) + +if (MSVC AND BUILD_SHARED_LIBS) +target_compile_definitions(libaaplus + PRIVATE + -DAAPLUS_EXT_CLASS\=__declspec\(dllexport\) +) +endif (MSVC AND BUILD_SHARED_LIBS) + +install( + TARGETS libaaplus + EXPORT libaaplus + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +# Headers makes relative includes so directory structure must be kept +foreach(HEADER ${PUBLIC_HEADERS}) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install( + FILES ${HEADER} + DESTINATION include/aaplus/${HEADER_DIR} + ) +endforeach() + + +if (BUILD_TOOLS) + add_executable(aatest AATest.cpp) + target_link_libraries(aatest PRIVATE libaaplus) + if (BUILD_SHARED_LIBS AND MSVC) + target_compile_definitions(aatest + PUBLIC + -DAAPLUS_EXT_CLASS\=__declspec\(dllimport\) + ) + endif (BUILD_SHARED_LIBS AND MSVC) + + install(TARGETS aatest RUNTIME DESTINATION tools/aaplus) +endif() + +install( + EXPORT libaaplus + DESTINATION share/libaaplus + FILE libaaplusConfig.cmake + NAMESPACE libaaplus:: +) diff --git a/ports/libaaplus/portfile.cmake b/ports/libaaplus/portfile.cmake new file mode 100644 index 00000000000000..358fdaba644cfb --- /dev/null +++ b/ports/libaaplus/portfile.cmake @@ -0,0 +1,36 @@ +set(VERSION 2.12) + +vcpkg_download_distfile( + ARCHIVE_FILE + URLS "http://www.naughter.com/download/aaplus_v${VERSION}.zip" + FILENAME "aaplus_v${VERSION}.zip" + SHA512 ec3a3d1346637fbed3ec5093ded821c6d80950a6432378d9826ed842571d8670cd5d2a1c9ff58a18f308e18669d786f72d24961e26bd8e070ee35674688a39e7 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF ${VERSION} + NO_REMOVE_ONE_LEVEL +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/libaaplus) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/AA+.htm DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libaaplus/vcpkg.json b/ports/libaaplus/vcpkg.json new file mode 100644 index 00000000000000..7bf35394570234 --- /dev/null +++ b/ports/libaaplus/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libaaplus", + "version-string": "2.12", + "port-version": 2, + "description": "libaaplus is an astronomical computations library by naughter software", + "homepage": "http://www.naughter.com/aa.html", + "features": { + "tools": { + "description": "Build libaaplus tools" + } + } +} diff --git a/ports/libaiff/CONTROL b/ports/libaiff/CONTROL deleted file mode 100644 index 6dbed3fcf31670..00000000000000 --- a/ports/libaiff/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libaiff -Version: 5.0-1 -Homepage: https://sourceforge.net/projects/aifftools -Description: LibAiff is an open-source library, providing C applications transparent read & write operations for Audio Interchange File Format (AIFF) files, with the goal of supporting all of its features diff --git a/ports/libaiff/portfile.cmake b/ports/libaiff/portfile.cmake index 14f2848ba066ff..97d8673b6b4f97 100644 --- a/ports/libaiff/portfile.cmake +++ b/ports/libaiff/portfile.cmake @@ -1,31 +1,24 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libaiff-5.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/aifftools/files/libaiff/LibAiff%205.0/libaiff-5.0-release.tar.gz" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO aifftools/libaiff + REF LibAiff%205.0 FILENAME "libaiff-5.0-release.tar.gz" SHA512 7800f9a3fbd0c5a17b8cc6c9b60181131d159ab5f5fb8e7de54e8f88c151717a988231de664a635e61940267c854a9ce83d58b12e322dcdda3aa8080c7b15f66 -) -vcpkg_extract_source_archive(${ARCHIVE}) - - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/allow_utf_16_filename.patch" - "${CMAKE_CURRENT_LIST_DIR}/buffer_uninitialized.patch" + allow_utf_16_filename.patch + buffer_uninitialized.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/libaiff) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() @@ -41,4 +34,4 @@ foreach(HEADER ${HEADERS}) endforeach() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libaiff RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libaiff/vcpkg.json b/ports/libaiff/vcpkg.json new file mode 100644 index 00000000000000..d8e0abb4cfb84c --- /dev/null +++ b/ports/libaiff/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libaiff", + "version-string": "5.0", + "port-version": 7, + "description": "LibAiff is an open-source library, providing C applications transparent read & write operations for Audio Interchange File Format (AIFF) files, with the goal of supporting all of its features", + "homepage": "https://sourceforge.net/projects/aifftools" +} diff --git a/ports/libarchive/CONTROL b/ports/libarchive/CONTROL deleted file mode 100644 index b39593aa93eb2a..00000000000000 --- a/ports/libarchive/CONTROL +++ /dev/null @@ -1,30 +0,0 @@ -Source: libarchive -Version: 3.3.3-3 -Homepage: https://github.com/libarchive/libarchive -Description: Library for reading and writing streaming archives -Build-Depends: zlib -Default-Features: bzip2, libxml2, lz4, lzma, lzo, openssl - -Feature: bzip2 -Build-Depends: bzip2 -Description: BZip2 support - -Feature: libxml2 -Build-Depends: libxml2 -Description: Libxml2 support - -Feature: lz4 -Build-Depends: lz4 -Description: LZ4 support - -Feature: lzma -Build-Depends: liblzma -Description: LZMA support - -Feature: lzo -Build-Depends: lzo -Description: LZO support - -Feature: openssl -Build-Depends: openssl -Description: OpenSSL support diff --git a/ports/libarchive/disable-warnings.patch b/ports/libarchive/disable-warnings.patch new file mode 100644 index 00000000000000..455939479a04df --- /dev/null +++ b/ports/libarchive/disable-warnings.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2634da..d037071 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,9 +155,6 @@ IF (MSVC) + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" +- # Enable level 4 C4062: The enumerate has no associated handler in a switch +- # statement and there is no default that can catch it. +- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14062") + # Enable level 4 C4254: A larger bit field was assigned to a smaller bit + # field. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14254") diff --git a/ports/libarchive/fix-buildsystem.patch b/ports/libarchive/fix-buildsystem.patch index 59ffec3c909842..4aa19738a86d53 100644 --- a/ports/libarchive/fix-buildsystem.patch +++ b/ports/libarchive/fix-buildsystem.patch @@ -1,170 +1,157 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1ca9d8f..61c3b2a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -166,7 +166,7 @@ IF (MSVC) - # result of an assignment. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4706") - # /WX option is the same as gcc's -Werror option. -- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX") -+ #SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX") <- breaks x64-debug - # /Oi option enables built-in functions. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Oi") - ################################################################# -@@ -359,7 +359,7 @@ IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") - # The zlib and the bzip2 Setup program have installed programs and DLLs into - # "C:/Program Files/GnuWin32" by default. - # This is convenience setting for Windows. -- SET(CMAKE_PREFIX_PATH ${__GNUWIN32PATH} $(CMAKE_PREFIX_PATH)) -+ #SET(CMAKE_PREFIX_PATH ${__GNUWIN32PATH} $(CMAKE_PREFIX_PATH)) - # - # If you didn't use Setup program or installed into nonstandard path, - # cmake cannot find out your zlib or bzip2 libraries and include files, -@@ -399,11 +399,12 @@ IF(ZLIB_FOUND) - # - # Test if ZLIB_WINAPI macro is needed to use. - # -- TRY_MACRO_FOR_LIBRARY( -- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -- RUNS -- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -- ZLIB_WINAPI) -+ SET(ZLIB_WINAPI OFF) # skip following test, it crashes with weird message box -+ #TRY_MACRO_FOR_LIBRARY( -+ # "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -+ # RUNS -+ # "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -+ # ZLIB_WINAPI) - IF(ZLIB_WINAPI) - ADD_DEFINITIONS(-DZLIB_WINAPI) - ELSE(ZLIB_WINAPI) -@@ -462,8 +463,6 @@ ENDIF() - IF(LIBLZMA_FOUND) - SET(HAVE_LIBLZMA 1) - SET(HAVE_LZMA_H 1) -- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) -- SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) - LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) - # Test if a macro is needed for the library. -@@ -1227,7 +1226,8 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) - CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) - CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) --CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) -+#CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) -+set(HAVE_MEMMOVE 1) - CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) - CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) - CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) -@@ -1258,11 +1258,16 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) - CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) - CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) --CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) --CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) --CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) --CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) --CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) -+#CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) -+set(HAVE_WCRTOMB 1) -+#CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) -+set(HAVE_WCSCMP 1) -+#CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) -+set(HAVE_WCSCPY 1) -+#CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) -+set(HAVE_WCSLEN 1) -+#CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) -+set(HAVE_WCTOMB 1) - CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) - CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) - CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) -@@ -1274,10 +1279,14 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) - CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) - CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) - CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) --CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) --CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) --CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) --CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) -+#CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) -+set(HAVE_VPRINTF 1) -+#CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) -+set(HAVE_WMEMCMP 1) -+#CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) -+set(HAVE_WMEMCPY 1) -+#CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) -+set(HAVE_WMEMMOVE 1) - - CMAKE_POP_CHECK_STATE() # Restore the state of the variables - -@@ -1314,9 +1323,13 @@ CHECK_C_SOURCE_COMPILES( - "#include \nint main() { return major(256); }" - MAJOR_IN_SYSMACROS) - -+CMAKE_PUSH_CHECK_STATE() -+SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) -+SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) - CHECK_C_SOURCE_COMPILES( - "#include \n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}" - HAVE_LZMA_STREAM_ENCODER_MT) -+CMAKE_POP_CHECK_STATE() - - IF(HAVE_STRERROR_R) - SET(HAVE_DECL_STRERROR_R 1) -@@ -1689,12 +1702,12 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) - ADD_DEFINITIONS(-DHAVE_CONFIG_H) - - # Handle generation of the libarchive.pc file for pkg-config --INCLUDE(CreatePkgConfigFile) -+#INCLUDE(CreatePkgConfigFile) - - # - # Register installation of PDF documents. - # --IF(WIN32 AND NOT CYGWIN) -+IF(0 AND WIN32 AND NOT CYGWIN) - # - # On Windows platform, It's better that we install PDF documents - # on one's computer. -diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index 1f85c01..11b2fb1 100644 ---- a/libarchive/CMakeLists.txt -+++ b/libarchive/CMakeLists.txt -@@ -210,28 +210,22 @@ IF(WIN32 AND NOT CYGWIN) - LIST(APPEND libarchive_SOURCES archive_disk_acl_sunos.c) - ENDIF() - --# Libarchive is a shared library --ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) -+ADD_LIBRARY(archive ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) --SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) -- --# archive_static is a static library --ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) --TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) --SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS -+IF(BUILD_SHARED_LIBS) -+ SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) -+ELSE() -+ SET_TARGET_PROPERTIES(archive PROPERTIES COMPILE_DEFINITIONS - LIBARCHIVE_STATIC) --# On Posix systems, libarchive.so and libarchive.a can co-exist. --IF(NOT WIN32 OR CYGWIN) -- SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) --ENDIF(NOT WIN32 OR CYGWIN) -+ENDIF() - - IF(ENABLE_INSTALL) - # How to install the libraries -- INSTALL(TARGETS archive archive_static -+ INSTALL(TARGETS archive - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -- INSTALL_MAN(${libarchive_MANS}) -+ #INSTALL_MAN(${libarchive_MANS}) - INSTALL(FILES ${include_HEADERS} DESTINATION include) - ENDIF() - +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2634da6..0d846877 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -148,10 +148,6 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^XL$") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qinfo=pro:use") + ENDIF(CMAKE_C_COMPILER_ID MATCHES "^XL$") + IF (MSVC) +- if (ENABLE_WERROR) +- # /WX option is the same as gcc's -Werror option. +- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") +- endif () + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" +@@ -382,8 +378,6 @@ IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") + # Maybe DLL path is "C:/Program Files/GnuWin32/bin". + # The zlib and the bzip2 Setup program have installed programs and DLLs into + # "C:/Program Files/GnuWin32" by default. +- # This is convenience setting for Windows. +- SET(CMAKE_PREFIX_PATH ${__GNUWIN32PATH} $(CMAKE_PREFIX_PATH)) + # + # If you didn't use Setup program or installed into nonstandard path, + # cmake cannot find out your zlib or bzip2 libraries and include files, +@@ -420,14 +414,7 @@ IF(ZLIB_FOUND) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) + IF(WIN32 AND NOT CYGWIN) +- # +- # Test if ZLIB_WINAPI macro is needed to use. +- # +- TRY_MACRO_FOR_LIBRARY( +- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" +- RUNS +- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" +- ZLIB_WINAPI) ++ SET(ZLIB_WINAPI OFF) # skip following test, it crashes with weird message box + IF(ZLIB_WINAPI) + ADD_DEFINITIONS(-DZLIB_WINAPI) + ELSE(ZLIB_WINAPI) +@@ -487,8 +474,6 @@ IF(LIBLZMA_FOUND) + SET(HAVE_LIBLZMA 1) + SET(HAVE_LZMA_H 1) + CMAKE_PUSH_CHECK_STATE() +- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) +- SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) + INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) + LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) + # Test if a macro is needed for the library. +@@ -1356,7 +1341,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++set(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1388,11 +1373,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++set(HAVE_WCRTOMB 1) ++set(HAVE_WCSCMP 1) ++set(HAVE_WCSCPY 1) ++set(HAVE_WCSLEN 1) ++set(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +@@ -1405,10 +1390,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++set(HAVE_VPRINTF 1) ++set(HAVE_WMEMCMP 1) ++set(HAVE_WMEMCPY 1) ++set(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + +@@ -1449,6 +1434,9 @@ CHECK_C_SOURCE_COMPILES( + "#include \nint main() { return major(256); }" + MAJOR_IN_SYSMACROS) + ++CMAKE_PUSH_CHECK_STATE() ++SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) ++SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) + IF(ENABLE_LZMA) + CHECK_C_SOURCE_COMPILES( + "#include \n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}" +@@ -1456,6 +1444,7 @@ CHECK_C_SOURCE_COMPILES( + ELSE() + SET(HAVE_LZMA_STREAM_ENCODER_MT 0) + ENDIF(ENABLE_LZMA) ++CMAKE_POP_CHECK_STATE() + + IF(HAVE_STRERROR_R) + SET(HAVE_DECL_STRERROR_R 1) +@@ -2018,7 +2007,7 @@ INCLUDE(CreatePkgConfigFile) + # + # Register installation of PDF documents. + # +-IF(WIN32 AND NOT CYGWIN) ++IF(0) + # + # On Windows platform, It's better that we install PDF documents + # on one's computer. +diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt +index 9389bbc9..c34a42b2 100644 +--- a/libarchive/CMakeLists.txt ++++ b/libarchive/CMakeLists.txt +@@ -236,28 +236,22 @@ ELSEIF(ARCHIVE_ACL_SUNOS) + ENDIF() + + # Libarchive is a shared library +-ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) ++ADD_LIBRARY(archive ${libarchive_SOURCES} ${include_HEADERS}) + TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) + TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) +-SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) +- +-# archive_static is a static library +-ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) +-TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) +-SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS ++IF(BUILD_SHARED_LIBS) ++ SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) ++ELSE() ++ SET_TARGET_PROPERTIES(archive PROPERTIES COMPILE_DEFINITIONS + LIBARCHIVE_STATIC) +-# On Posix systems, libarchive.so and libarchive.a can co-exist. +-IF(NOT WIN32 OR CYGWIN) +- SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) +-ENDIF(NOT WIN32 OR CYGWIN) ++ENDIF() + + IF(ENABLE_INSTALL) + # How to install the libraries +- INSTALL(TARGETS archive archive_static ++ INSTALL(TARGETS archive + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +- INSTALL_MAN(${libarchive_MANS}) + INSTALL(FILES ${include_HEADERS} DESTINATION include) + ENDIF() + diff --git a/ports/libarchive/fix-cpu-set.patch b/ports/libarchive/fix-cpu-set.patch new file mode 100644 index 00000000000000..8d1924dbe86abe --- /dev/null +++ b/ports/libarchive/fix-cpu-set.patch @@ -0,0 +1,15 @@ +diff --git a/libarchive/archive_random.c b/libarchive/archive_random.c +index 65ea691..63217ec 100644 +--- a/libarchive/archive_random.c ++++ b/libarchive/archive_random.c +@@ -48,6 +48,10 @@ __FBSDID("$FreeBSD$"); + #include + #endif + #ifdef HAVE_PTHREAD_H ++#ifdef __GNUC__ ++#define _GNU_SOURCE ++#include ++#endif + #include + #endif + diff --git a/ports/libarchive/fix-dependencies.patch b/ports/libarchive/fix-dependencies.patch index 2a18d55a5ed320..0d3213c6766f52 100644 --- a/ports/libarchive/fix-dependencies.patch +++ b/ports/libarchive/fix-dependencies.patch @@ -1,13 +1,150 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 61c3b2a..c47b5b4 100644 +index 39b5333..8164d8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -783,7 +783,7 @@ main(int argc, char **argv) +@@ -433,7 +433,7 @@ MARK_AS_ADVANCED(CLEAR ZLIB_LIBRARY) + # Find BZip2 + # + IF(ENABLE_BZip2) +- FIND_PACKAGE(BZip2) ++ FIND_PACKAGE(BZip2 REQUIRED) + ELSE() + SET(BZIP2_FOUND FALSE) # Override cached value + ENDIF() +@@ -462,27 +462,15 @@ MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARIES) + # Find LZMA + # + IF(ENABLE_LZMA) +- FIND_PACKAGE(LibLZMA) ++ FIND_PACKAGE(LibLZMA CONFIG REQUIRED) + ELSE() + SET(LIBLZMA_FOUND FALSE) # Override cached value + ENDIF() + +-IF(LIBLZMA_FOUND) ++IF(LibLZMA_FOUND) + SET(HAVE_LIBLZMA 1) + SET(HAVE_LZMA_H 1) +- CMAKE_PUSH_CHECK_STATE() +- INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) +- LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) +- # Test if a macro is needed for the library. +- TRY_MACRO_FOR_LIBRARY( +- "${LIBLZMA_INCLUDE_DIRS}" "${LIBLZMA_LIBRARIES}" +- COMPILES +- "#include \nint main() {return (int)lzma_version_number(); }" +- "WITHOUT_LZMA_API_STATIC;LZMA_API_STATIC") +- IF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC) +- ADD_DEFINITIONS(-DLZMA_API_STATIC) +- ENDIF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC) +- CMAKE_POP_CHECK_STATE() ++ LIST(APPEND ADDITIONAL_LIBS LibLZMA::LibLZMA) + ELSE(LIBLZMA_FOUND) + # LZMA not found and will not be used. + ENDIF(LIBLZMA_FOUND) +@@ -555,22 +543,15 @@ IF(ENABLE_LZ4) + SET(LZ4_FIND_QUIETLY TRUE) + ENDIF (LZ4_INCLUDE_DIR) + +- FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) +- INCLUDE(FindPackageHandleStandardArgs) +- FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) ++ FIND_PACKAGE(lz4 CONFIG REQUIRED) + ELSE(ENABLE_LZ4) + SET(LZ4_FOUND FALSE) # Override cached value + ENDIF(ENABLE_LZ4) +-IF(LZ4_FOUND) ++IF(lz4_FOUND) ++ SET(HAVE_LZ4HC_H 1) + SET(HAVE_LIBLZ4 1) + SET(HAVE_LZ4_H 1) +- CMAKE_PUSH_CHECK_STATE() # Save the state of the variables +- SET(CMAKE_REQUIRED_INCLUDES ${LZ4_INCLUDE_DIR}) +- CHECK_INCLUDE_FILES("lz4hc.h" HAVE_LZ4HC_H) +- CMAKE_POP_CHECK_STATE() # Restore the state of the variables +- INCLUDE_DIRECTORIES(${LZ4_INCLUDE_DIR}) +- LIST(APPEND ADDITIONAL_LIBS ${LZ4_LIBRARY}) ++ LIST(APPEND ADDITIONAL_LIBS lz4::lz4) + # + # TODO: test for static library. + # +@@ -586,25 +566,20 @@ IF(ENABLE_ZSTD) + SET(ZSTD_FIND_QUIETLY TRUE) + ENDIF (ZSTD_INCLUDE_DIR) + +- FIND_PATH(ZSTD_INCLUDE_DIR zstd.h) +- FIND_LIBRARY(ZSTD_LIBRARY NAMES zstd libzstd) +- INCLUDE(FindPackageHandleStandardArgs) +- FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZSTD DEFAULT_MSG ZSTD_LIBRARY ZSTD_INCLUDE_DIR) ++ FIND_PACKAGE(zstd CONFIG REQUIRED) + ELSE(ENABLE_ZSTD) + SET(ZSTD_FOUND FALSE) # Override cached value + ENDIF(ENABLE_ZSTD) +-IF(ZSTD_FOUND) ++IF(zstd_FOUND) + SET(HAVE_ZSTD_H 1) +- INCLUDE_DIRECTORIES(${ZSTD_INCLUDE_DIR}) +- LIST(APPEND ADDITIONAL_LIBS ${ZSTD_LIBRARY}) +- CMAKE_PUSH_CHECK_STATE() +- SET(CMAKE_REQUIRED_LIBRARIES ${ZSTD_LIBRARY}) +- SET(CMAKE_REQUIRED_INCLUDES ${ZSTD_INCLUDE_DIR}) +- CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_LIBZSTD) +- # +- # TODO: test for static library. +- # +- CMAKE_POP_CHECK_STATE() ++ SET(HAVE_LIBZSTD 1) ++ IF(TARGET zstd::libzstd_shared) ++ LIST(APPEND ADDITIONAL_LIBS zstd::libzstd_shared) ++ SET(CMAKE_REQUIRED_LIBRARIES zstd::libzstd_shared) ++ ELSE(TARGET zstd::libzstd_shared) ++ LIST(APPEND ADDITIONAL_LIBS zstd::libzstd_static) ++ SET(CMAKE_REQUIRED_LIBRARIES zstd::libzstd_static) ++ ENDIF(TARGET zstd::libzstd_shared) + ENDIF(ZSTD_FOUND) + MARK_AS_ADVANCED(CLEAR ZSTD_INCLUDE_DIR) + MARK_AS_ADVANCED(CLEAR ZSTD_LIBRARY) +@@ -773,11 +742,11 @@ ENDIF(ENABLE_NETTLE) + # (Except on Mac, where OpenSSL is deprecated.) + # + IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") +- FIND_PACKAGE(OpenSSL) +- IF(OPENSSL_FOUND) ++ FIND_PACKAGE(OpenSSL REQUIRED) ++ IF(OpenSSL_FOUND) + SET(HAVE_LIBCRYPTO 1) +- INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) +- LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_CRYPTO_LIBRARY}) ++ LIST(APPEND ADDITIONAL_LIBS OpenSSL::Crypto) ++ message("OPENSSL_CRYPTO_LIBRARY: OpenSSL::Crypto") + ENDIF(OPENSSL_FOUND) + ELSE() + SET(OPENSSL_FOUND FALSE) # Override cached value +@@ -896,7 +865,6 @@ main(int argc, char **argv) IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_LIBRARIES}) - LIST(REMOVE_DUPLICATES ADDITIONAL_LIBS) -+ #LIST(REMOVE_DUPLICATES ADDITIONAL_LIBS) ENDIF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) ENDIF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) ENDIF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) +@@ -1128,7 +1096,7 @@ ENDIF(ENABLE_ICONV) + # Find Libxml2 + # + IF(ENABLE_LIBXML2) +- FIND_PACKAGE(LibXml2) ++ FIND_PACKAGE(LibXml2 REQUIRED) + ELSE() + SET(LIBXML2_FOUND FALSE) + ENDIF() +@@ -1432,8 +1400,7 @@ CHECK_C_SOURCE_COMPILES( + MAJOR_IN_SYSMACROS) + + CMAKE_PUSH_CHECK_STATE() +-SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) +-SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) ++SET(CMAKE_REQUIRED_LIBRARIES LibLZMA::LibLZMA) + IF(ENABLE_LZMA) + CHECK_C_SOURCE_COMPILES( + "#include \n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}" diff --git a/ports/libarchive/fix-lz4.patch b/ports/libarchive/fix-lz4.patch deleted file mode 100644 index 163e55ed0e0c1e..00000000000000 --- a/ports/libarchive/fix-lz4.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 80871bc9..2a16dc70 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -517,7 +517,10 @@ IF(ENABLE_LZ4) - ENDIF (LZ4_INCLUDE_DIR) - - FIND_PATH(LZ4_INCLUDE_DIR lz4.h) -- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) -+ FIND_LIBRARY(LZ4_LIBRARY_DEBUG NAMES lz4d liblz4d) -+ FIND_LIBRARY(LZ4_LIBRARY_RELEASE NAMES lz4 liblz4) -+ INCLUDE(SelectLibraryConfigurations) -+ SELECT_LIBRARY_CONFIGURATIONS(LZ4) - INCLUDE(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) - ELSE(ENABLE_LZ4) diff --git a/ports/libarchive/no-werror.patch b/ports/libarchive/no-werror.patch deleted file mode 100644 index fbd3be8c66bd72..00000000000000 --- a/ports/libarchive/no-werror.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 745dc29..820c56f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -96,7 +96,7 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$") - ################################################################# - # Set compile flags for debug build. - # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" -- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") -+ #SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") -@@ -112,7 +112,7 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^Clang$") - # Set compile flags for debug build. - # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") -- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") -+ #SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index 5d6755bc0c478f..11d5e984252e60 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -1,62 +1,56 @@ -# libarchive uses winapi functions not available in WindowsStore -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds are not supported.") -endif() +vcpkg_fail_port_install(ON_TARGET "UWP") -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libarchive/libarchive - REF v3.3.3 - SHA512 10063764b610c0c966ba0177cac0d2cb781e297a45545cc8a587741513089af26f40769670894c86e7985b73c47e9cb985253bc3bef3a12fa83fe2a6a30acb6d + REF 1b2c437b99b361c7692538fa373e99955e9b93ae #v3.5.2 + SHA512 df527dd333b01ed85f07831ba0bd4b1d0b5384fe12cfa53474ad39c04509105a3c8574a2d21a430e3584a931c8f6ae923bca95df83945f0c593c1ffaed3f62da HEAD_REF master - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-lz4.patch - ${CMAKE_CURRENT_LIST_DIR}/no-werror.patch + PATCHES + disable-warnings.patch + fix-buildsystem.patch + fix-cpu-set.patch + fix-dependencies.patch ) -set(BUILD_libarchive_bzip2 OFF) -if("bzip2" IN_LIST FEATURES) - set(BUILD_libarchive_bzip2 ON) -endif() - -set(BUILD_libarchive_libxml2 OFF) -if("libxml2" IN_LIST FEATURES) - set(BUILD_libarchive_libxml2 ON) -endif() - -set(BUILD_libarchive_lz4 OFF) -if("lz4" IN_LIST FEATURES) - set(BUILD_libarchive_lz4 ON) -endif() - -set(BUILD_libarchive_lzma OFF) -if("lzma" IN_LIST FEATURES) - set(BUILD_libarchive_lzma ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + bzip2 ENABLE_BZip2 + libxml2 ENABLE_LIBXML2 + lz4 ENABLE_LZ4 + lzma ENABLE_LZMA + lzo ENABLE_LZO + openssl ENABLE_OPENSSL + zstd ENABLE_ZSTD + # The below features should be added to CONTROL + #pcre ENABLE_PCREPOSIX + #nettle ENABLE_NETTLE + #expat ENABLE_EXPAT + #libgcc ENABLE_LibGCC + #cng ENABLE_CNG + #tar ENABLE_TAR # Tool build option? + #cpio ENABLE_CPIO # Tool build option? + #cat ENABLE_CAT # Tool build option? + #xattr ENABLE_XATTR # Tool support option? + #acl ENABLE_ACL # Tool support option? + #iconv ENABLE_ICONV # iconv support option? + #libb2 ENABLE_LIBB2 +) -set(BUILD_libarchive_lzo OFF) -if("lzo" IN_LIST FEATURES) - set(BUILD_libarchive_lzo ON) +if(FEATURES MATCHES "pcre") +else() + list(APPEND FEATURE_OPTIONS -DPOSIX_REGEX_LIB=NONE) endif() -set(BUILD_libarchive_openssl OFF) -if("openssl" IN_LIST FEATURES) - set(BUILD_libarchive_openssl ON) -endif() +list(APPEND FEATURE_OPTIONS -DENABLE_ZLIB=ON) +# Needed for configure_file +set(ENABLE_ZLIB ON) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DENABLE_BZip2=${BUILD_libarchive_bzip2} - -DENABLE_LIBXML2=${BUILD_libarchive_libxml2} - -DENABLE_LZ4=${BUILD_libarchive_lz4} - -DENABLE_LZMA=${BUILD_libarchive_lzma} - -DENABLE_LZO=${BUILD_libarchive_lzo} - -DENABLE_OPENSSL=${BUILD_libarchive_openssl} + ${FEATURE_OPTIONS} -DENABLE_PCREPOSIX=OFF -DENABLE_NETTLE=OFF -DENABLE_EXPAT=OFF @@ -67,19 +61,31 @@ vcpkg_configure_cmake( -DENABLE_CAT=OFF -DENABLE_XATTR=OFF -DENABLE_ACL=OFF - -DENABLE_TEST=OFF -DENABLE_ICONV=OFF - -DPOSIX_REGEX_LIB=NONE) + -DENABLE_LIBB2=OFF + -DENABLE_TEST=OFF + -DENABLE_WERROR=OFF +) vcpkg_install_cmake() + +vcpkg_fixup_pkgconfig() + vcpkg_copy_pdbs() +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + foreach(HEADER ${CURRENT_PACKAGES_DIR}/include/archive.h ${CURRENT_PACKAGES_DIR}/include/archive_entry.h) file(READ ${HEADER} CONTENTS) string(REPLACE "(!defined LIBARCHIVE_STATIC)" "0" CONTENTS "${CONTENTS}") file(WRITE ${HEADER} "${CONTENTS}") endforeach() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libarchive) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libarchive/COPYING ${CURRENT_PACKAGES_DIR}/share/libarchive/copyright) +file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libarchive/usage b/ports/libarchive/usage new file mode 100644 index 00000000000000..57f9f2ba23248a --- /dev/null +++ b/ports/libarchive/usage @@ -0,0 +1,5 @@ +The package libarchive is compatible with built-in CMake targets: + + find_package(libarchive REQUIRED) + target_include_directories(main PRIVATE ${LibArchive_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${LibArchive_LIBRARIES}) diff --git a/ports/libarchive/vcpkg-cmake-wrapper.cmake.in b/ports/libarchive/vcpkg-cmake-wrapper.cmake.in new file mode 100644 index 00000000000000..81cc39e39b30b3 --- /dev/null +++ b/ports/libarchive/vcpkg-cmake-wrapper.cmake.in @@ -0,0 +1,123 @@ +_find_package(${ARGS}) + +include(CMakeFindDependencyMacro) + +if(@ENABLE_ZLIB@) + find_dependency(ZLIB) +endif() +if(@ENABLE_BZip2@) + find_dependency(BZip2) +endif() +if(@ENABLE_LIBXML2@) + find_dependency(LibXml2) +endif() +if(@ENABLE_LZ4@) + find_dependency(lz4) +endif() +if(@ENABLE_LZMA@) + find_dependency(LibLZMA) +endif() +if(@ENABLE_ZSTD@) + find_dependency(zstd) +endif() +if(@ENABLE_OPENSSL@) + find_dependency(OpenSSL) +endif() +if(@ENABLE_LZO@) + find_library(LZO_LIBRARY_DEBUG NAMES lzo2d lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(LZO_LIBRARY_RELEASE NAMES lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) +endif() + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + if(@ENABLE_ZLIB@) + list(APPEND LibArchive_LIBRARIES ZLIB::ZLIB) + endif() + if(@ENABLE_BZip2@) + list(APPEND LibArchive_LIBRARIES BZip2::BZip2) + endif() + if(@ENABLE_LIBXML2@) + list(APPEND LibArchive_LIBRARIES LibXml2::LibXml2) + endif() + if(@ENABLE_LZ4@) + list(APPEND LibArchive_LIBRARIES lz4::lz4) + endif() + if(@ENABLE_LZMA@) + list(APPEND LibArchive_LIBRARIES LibLZMA::LibLZMA) + endif() + if(@ENABLE_LZO@) + if(LZO_LIBRARY_RELEASE) + list(APPEND LibArchive_LIBRARIES optimized ${LZO_LIBRARY_RELEASE}) + endif() + if(LZO_LIBRARY_DEBUG) + list(APPEND LibArchive_LIBRARIES debug ${LZO_LIBRARY_DEBUG}) + endif() + endif() + if(@ENABLE_ZSTD@) + if(TARGET zstd::libzstd_shared) + list(APPEND LibArchive_LIBRARIES zstd::libzstd_shared) + else(TARGET zstd::libzstd_shared) + list(APPEND LibArchive_LIBRARIES zstd::libzstd_static) + endif(TARGET zstd::libzstd_shared) + endif() + if(@ENABLE_OPENSSL@) + list(APPEND LibArchive_LIBRARIES OpenSSL::Crypto) + endif() + + if(TARGET LibArchive::LibArchive) + if(@ENABLE_BZip2@) + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2) + endif() + if(@ENABLE_ZLIB@) + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) + endif() + if(@ENABLE_LIBXML2@) + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibXml2::LibXml2) + endif() + if(@ENABLE_LZ4@) + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES lz4::lz4) + endif() + if(@ENABLE_LZMA@) + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibLZMA::LibLZMA) + endif() + if(@ENABLE_LZO@) + if(LZO_LIBRARY_RELEASE) + list(APPEND interface_lib \$<\$>:${LZO_LIBRARY_RELEASE}>) + endif() + if(LZO_LIBRARY_DEBUG) + list(APPEND interface_lib \$<\$:${LZO_LIBRARY_DEBUG}>) + endif() + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${interface_lib}) + endif() + if(@ENABLE_ZSTD@) + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES zstd::libzstd_static) + endif() + if(@ENABLE_OPENSSL@) + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES OpenSSL::Crypto) + endif() + endif() +endif() + + +# TODO in some future +# if(@ENABLE_PCREPOSIX@) +# endif() +# if(@ENABLE_NETTLE@) +# endif() +# if(@ENABLE_EXPAT@) +# endif() +# if(@ENABLE_LibGCC@) +# endif() +# if(@ENABLE_CNG@) +# endif() +# if(@ENABLE_TAR@) +# endif() +# if(@ENABLE_CPIO@) +# endif() +# if(@ENABLE_CAT@) +# endif() +# if(@ENABLE_XATTR@) +# endif() +# if(@ENABLE_ACL@) +# endif() +# if(@ENABLE_ICONV@) +# endif() diff --git a/ports/libarchive/vcpkg.json b/ports/libarchive/vcpkg.json new file mode 100644 index 00000000000000..2f36a138583471 --- /dev/null +++ b/ports/libarchive/vcpkg.json @@ -0,0 +1,62 @@ +{ + "name": "libarchive", + "version-semver": "3.5.2", + "description": "Library for reading and writing streaming archives", + "homepage": "https://github.com/libarchive/libarchive", + "supports": "!uwp", + "dependencies": [ + "zlib" + ], + "default-features": [ + "bzip2", + "libxml2", + "lz4", + "lzma", + "openssl", + "zstd" + ], + "features": { + "bzip2": { + "description": "BZip2 support", + "dependencies": [ + "bzip2" + ] + }, + "libxml2": { + "description": "Libxml2 support", + "dependencies": [ + "libxml2" + ] + }, + "lz4": { + "description": "Lz4 support", + "dependencies": [ + "lz4" + ] + }, + "lzma": { + "description": "Lzma support", + "dependencies": [ + "liblzma" + ] + }, + "lzo": { + "description": "Lzo support", + "dependencies": [ + "lzo" + ] + }, + "openssl": { + "description": "Openssl support", + "dependencies": [ + "openssl" + ] + }, + "zstd": { + "description": "Zstd support", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/ports/libass/CMakeLists.txt b/ports/libass/CMakeLists.txt index 32d7ef097d3a5c..eaaa80b1343078 100644 --- a/ports/libass/CMakeLists.txt +++ b/ports/libass/CMakeLists.txt @@ -1,24 +1,39 @@ cmake_minimum_required(VERSION 3.9) project(libass C CXX) -set(LIBASS_VERSION 0.14.0) +set(LIBASS_VERSION 0.15.1) configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in config.h) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -# This is Windows-specific. Other acceptable values on different platforms should be -# macOS - CONFIG_CORETEXT -# linux - CONFIG_FONTCONFIG -add_compile_definitions(CONFIG_DIRECTWRITE) +if(WIN32) + add_compile_definitions(CONFIG_DIRECTWRITE) +elseif(APPLE) + add_compile_definitions(CONFIG_CORETEXT) +else() + add_compile_definitions(CONFIG_FONTCONFIG) +endif() + add_compile_definitions(CONFIG_FREETYPE) add_compile_definitions(CONFIG_FRIBIDI) add_compile_definitions(CONFIG_HARFBUZZ) file (GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/libass/*.c) +set(FONTCONFIG_LIBRARY) +if(WIN32) + list(FILTER SOURCES EXCLUDE REGEX ".*ass_coretext.c$") + list(FILTER SOURCES EXCLUDE REGEX ".*ass_fontconfig.c$") +elseif(APPLE) + list(FILTER SOURCES EXCLUDE REGEX ".*ass_directwrite.c$") + list(FILTER SOURCES EXCLUDE REGEX ".*ass_fontconfig.c$") +else() + list(FILTER SOURCES EXCLUDE REGEX ".*ass_coretext.c$") + list(FILTER SOURCES EXCLUDE REGEX ".*ass_directwrite.c$") -list(FILTER SOURCES EXCLUDE REGEX ".*ass_coretext.c$") -list(FILTER SOURCES EXCLUDE REGEX ".*ass_fontconfig.c$") + find_package(Fontconfig REQUIRED) + set(FONTCONFIG_LIBRARY Fontconfig::Fontconfig) +endif() find_package(Freetype REQUIRED) @@ -30,19 +45,26 @@ find_path(HARFBUZZ_INCLUDE_DIR NAMES hb.h PATH_SUFFIXES harfbuzz) -find_library(FRIBIDI_LIBRARY NAMES fribidi) +find_path(DIRENT_INCLUDE_DIR + NAMES dirent.h) + +find_library(FRIBIDI_LIBRARY NAMES libfribidi fribidi) find_library(HARFBUZZ_LIBRARY NAMES harfbuzz) add_library(ass ${SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/libass.def) -target_include_directories(ass PRIVATE - ${FRIBIDI_INCLUDE_DIR} +target_include_directories(ass PRIVATE + ${FRIBIDI_INCLUDE_DIR} ${HARFBUZZ_INCLUDE_DIR}) - -target_link_libraries(ass PRIVATE - Freetype::Freetype - ${FRIBIDI_LIBRARY} - ${HARFBUZZ_LIBRARY}) +if(DIRENT_INCLUDE_DIR) + target_include_directories(ass PRIVATE + ${DIRENT_INCLUDE_DIR}) +endif() +target_link_libraries(ass PRIVATE + Freetype::Freetype + ${FRIBIDI_LIBRARY} + ${HARFBUZZ_LIBRARY} + ${FONTCONFIG_LIBRARY}) install(TARGETS ass RUNTIME DESTINATION bin @@ -55,7 +77,11 @@ set(exec_prefix ${CMAKE_INSTALL_PREFIX}) set(libdir ${CMAKE_INSTALL_PREFIX}/lib) set(includedir ${CMAKE_INSTALL_PREFIX}/include) set(PACKAGE_VERSION ${LIBASS_VERSION}) -set(PKG_REQUIRES_PRIVATE "harfbuzz >= 0.9.5, fribidi >= 0.19.0, freetype2 >= 9.10.3") +if(WIN32 OR APPLE) + set(PKG_REQUIRES_PRIVATE "harfbuzz >= 1.2.3, fribidi >= 0.19.0, freetype2 >= 9.10.3") +else() + set(PKG_REQUIRES_PRIVATE "fontconfig >= 2.10.92, harfbuzz >= 1.2.3, fribidi >= 0.19.0, freetype2 >= 9.10.3") +endif() set(PKG_LIBS_PRIVATE -lm) configure_file(libass.pc.in libass.pc @ONLY) install(FILES diff --git a/ports/libass/CONTROL b/ports/libass/CONTROL deleted file mode 100644 index ea25ea9a189f84..00000000000000 --- a/ports/libass/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libass -Version: 0.14.0 -Build-Depends: freetype, fribidi, harfbuzz, dirent (windows) -Description: libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format. diff --git a/ports/libass/ConstantValues.patch b/ports/libass/ConstantValues.patch deleted file mode 100644 index d357032d7429de..00000000000000 --- a/ports/libass/ConstantValues.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- - libass/ass_outline.c | 4 ++-- - libass/ass_render.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libass/ass_outline.c b/libass/ass_outline.c -index 1b9afe9..527403e 100644 ---- a/libass/ass_outline.c -+++ b/libass/ass_outline.c -@@ -518,7 +518,7 @@ static bool draw_arc(StrokerState *str, ASS_Vector pt, - ASS_DVector normal0, ASS_DVector normal1, double c, int dir) - { - const int max_subdiv = 15; -- double mul[max_subdiv + 1]; -+ double mul[16]; - - ASS_DVector center; - bool small_angle = true; -@@ -554,7 +554,7 @@ static bool draw_arc(StrokerState *str, ASS_Vector pt, - static bool draw_circle(StrokerState *str, ASS_Vector pt, int dir) - { - const int max_subdiv = 15; -- double mul[max_subdiv + 1], c = 0; -+ double mul[16], c = 0; - - int pos = max_subdiv; - while (c < str->split_cos && pos) { -diff --git a/libass/ass_render.c b/libass/ass_render.c -index 69c4439..f6fa85c 100644 ---- a/libass/ass_render.c -+++ b/libass/ass_render.c -@@ -1235,7 +1235,7 @@ get_bitmap_glyph(ASS_Renderer *render_priv, GlyphInfo *info) - } - - const int n_outlines = 3; -- ASS_Outline outline[n_outlines]; -+ ASS_Outline outline[3]; - outline_copy(&outline[0], info->outline); - outline_copy(&outline[1], info->border[0]); - outline_copy(&outline[2], info->border[1]); --- -2.18.0.windows.1 - diff --git a/ports/libass/config.h.in b/ports/libass/config.h.in index e69de29bb2d1d6..b1e5b4b6b9afa6 100644 --- a/ports/libass/config.h.in +++ b/ports/libass/config.h.in @@ -0,0 +1 @@ +#define CONFIG_SOURCEVERSION "tarball: 0.15.1" diff --git a/ports/libass/libass.def b/ports/libass/libass.def index 58bfad3d67f822..7edbbdf6308639 100644 --- a/ports/libass/libass.def +++ b/ports/libass/libass.def @@ -1,24 +1,34 @@ EXPORTS +ass_library_version ass_library_init ass_library_done -ass_library_version ass_set_fonts_dir ass_set_extract_fonts ass_set_style_overrides +ass_process_force_style +ass_set_message_cb ass_renderer_init ass_renderer_done ass_set_frame_size ass_set_storage_size +ass_set_shaper ass_set_margins ass_set_use_margins +ass_set_pixel_aspect ass_set_aspect_ratio ass_set_font_scale ass_set_hinting ass_set_line_spacing +ass_set_line_position ass_get_available_font_providers ass_set_fonts +ass_set_selective_style_override_enabled +ass_set_selective_style_override +ass_fonts_update +ass_set_cache_limits ass_render_frame ass_new_track +ass_track_set_feature ass_free_track ass_alloc_style ass_alloc_event @@ -27,20 +37,11 @@ ass_free_event ass_process_data ass_process_codec_private ass_process_chunk +ass_set_check_readorder +ass_flush_events ass_read_file ass_read_memory ass_read_styles ass_add_font ass_clear_fonts ass_step_sub -ass_process_force_style -ass_set_message_cb -ass_fonts_update -ass_set_cache_limits -ass_flush_events -ass_set_shaper -ass_set_line_position -ass_set_pixel_aspect -ass_set_selective_style_override_enabled -ass_set_selective_style_override -ass_set_check_readorder diff --git a/ports/libass/portfile.cmake b/ports/libass/portfile.cmake index 040cadc661dca5..7207b9e058aa8a 100644 --- a/ports/libass/portfile.cmake +++ b/ports/libass/portfile.cmake @@ -1,22 +1,15 @@ - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libass/libass - REF 98727c3b78f44cb3bbc955fcf5d977ebd911d5ca - SHA512 d466108180cea598b817f89aa21a1021ed2a763580d9aad51b054aa120186af48ab4264907e49ddcb38479a28d87d5431751a28afee9cb83ad7623f002d99c57 + REF 0.15.1 + SHA512 eadda1dcdeb15be8cecbb14ad922eb3f366a780d82376d257c799424a0296b4d7539e86f12234e8c1480bdea423d9dbb78644b18970f65b8f5af5d0ef49c5fc9 HEAD_REF master - PATCHES ConstantValues.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/libass.def DESTINATION ${SOURCE_PATH}) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libass RENAME copyright) - # Since libass uses automake, make and configure, we use a custom CMake file file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -27,4 +20,8 @@ vcpkg_configure_cmake( PREFER_NINJA) vcpkg_install_cmake() -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libass/vcpkg.json b/ports/libass/vcpkg.json new file mode 100644 index 00000000000000..9abf0a1f1891bc --- /dev/null +++ b/ports/libass/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "libass", + "version": "0.15.1", + "port-version": 1, + "description": "libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format", + "homepage": "https://github.com/libass/libass", + "dependencies": [ + { + "name": "dirent", + "platform": "windows" + }, + { + "name": "fontconfig", + "platform": "linux" + }, + "freetype", + "fribidi", + "harfbuzz" + ] +} diff --git a/ports/libassuan/fix-flags.patch b/ports/libassuan/fix-flags.patch new file mode 100644 index 00000000000000..8402c2e0a9ef2a --- /dev/null +++ b/ports/libassuan/fix-flags.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index 089bc97..2d31b6a 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -149,7 +149,7 @@ install-exec-hook: + endif + + mkheader: mkheader.c Makefile +- $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkheader.c ++ $(CC_FOR_BUILD) -I. -I$(srcdir) $(CFLAGS) -o $@ $(srcdir)/mkheader.c + + assuan.h: assuan.h.in mkheader $(parts_of_assuan_h) + ./mkheader $(host_os) $(srcdir)/assuan.h.in \ diff --git a/ports/libassuan/fix-pkgconfig.patch b/ports/libassuan/fix-pkgconfig.patch new file mode 100644 index 00000000000000..8b8672e03e6abd --- /dev/null +++ b/ports/libassuan/fix-pkgconfig.patch @@ -0,0 +1,11 @@ +diff --git a/src/libassuan.pc.in b/src/libassuan.pc.in +index 4e952d7..83ba872 100644 +--- a/src/libassuan.pc.in ++++ b/src/libassuan.pc.in +@@ -10,5 +10,5 @@ Description: IPC library for the GnuPG components + Requires: gpg-error + Version: @PACKAGE_VERSION@ + Cflags: @LIBASSUAN_CONFIG_CFLAGS@ +-Libs: @LIBASSUAN_CONFIG_LIBS@ ++Libs: -L${libdir} @LIBASSUAN_CONFIG_LIBS@ + URL: https://www.gnupg.org/related_software/libassuan/index.html diff --git a/ports/libassuan/portfile.cmake b/ports/libassuan/portfile.cmake new file mode 100644 index 00000000000000..bcfb1c912a50db --- /dev/null +++ b/ports/libassuan/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports unix platform" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gpg/libassuan + REF libassuan-2.5.3 + SHA512 5ec896eca6d9d7bec83aa400c8e2dc6f2b09c013050efb2125e2f2a4bd00f179723254483637ca4b7bc30bba951fc985e7ba7db98081606bb106caa7a2622dbe + HEAD_REF master + PATCHES + fix-pkgconfig.patch + fix-flags.patch +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --disable-doc + --disable-silent-rules + --with-libgpg-error-prefix=${CURRENT_INSTALLED_DIR}/tools/libgpg-error +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libassuan/vcpkg.json b/ports/libassuan/vcpkg.json new file mode 100644 index 00000000000000..f7808864cacf31 --- /dev/null +++ b/ports/libassuan/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libassuan", + "version-string": "2.5.3", + "port-version": 2, + "description": "A library implementing the so-called Assuan protocol", + "homepage": "https://gnupg.org/software/libassuan/index.html", + "supports": "!windows", + "dependencies": [ + "libgpg-error" + ] +} diff --git a/ports/libavif/disable-source-utf8.patch b/ports/libavif/disable-source-utf8.patch new file mode 100644 index 00000000000000..1e3d5d9bcad57c --- /dev/null +++ b/ports/libavif/disable-source-utf8.patch @@ -0,0 +1,12 @@ +diff -pruN v0.9.0-92388ab3ad.clean.o/CMakeLists.txt v0.9.0-92388ab3ad.clean/CMakeLists.txt +--- a/CMakeLists.txt 2021-02-23 04:51:41.000000000 +0300 ++++ b/CMakeLists.txt 2021-04-14 23:35:50.866487600 +0300 +@@ -165,7 +165,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC + # A C4556 warning will be generated on violation. + # Commonly used /utf-8 flag assumes UTF-8 for both source and console, which is usually not the case. + # Warnings can be suppressed but there will still be random characters printed to the console. +- /source-charset:utf-8 /execution-charset:us-ascii ++ #/source-charset:utf-8 /execution-charset:us-ascii + ) + else() + MESSAGE(FATAL_ERROR "libavif: Unknown compiler, bailing out") diff --git a/ports/libavif/portfile.cmake b/ports/libavif/portfile.cmake new file mode 100644 index 00000000000000..2d0a37bb77bf1f --- /dev/null +++ b/ports/libavif/portfile.cmake @@ -0,0 +1,36 @@ +# AVIF depends on AOM, but AOM doesn't support ARM and UWP +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AOMediaCodec/libavif + REF v0.9.2 + SHA512 04400ae76214d2f0361a14897d6ee97be675375865bb96c8d237e9a4a1152ac1a966db903c11df82da71b0bc68599a5857e038cc90d63c5d3bc77b13169a3e75 + HEAD_REF master + PATCHES + disable-source-utf8.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DAVIF_CODEC_AOM=ON + -DAVIF_BUILD_APPS=OFF +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +# Move cmake configs +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +# Fix pkg-config files +vcpkg_fixup_pkgconfig() + +# Remove duplicate files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libavif/vcpkg.json b/ports/libavif/vcpkg.json new file mode 100644 index 00000000000000..b6e3bce5222d9b --- /dev/null +++ b/ports/libavif/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "libavif", + "version-semver": "0.9.2", + "description": "Library for encoding and decoding AVIF files", + "homepage": "https://github.com/AOMediaCodec/libavif", + "supports": "!uwp & !arm", + "dependencies": [ + "aom", + "libyuv", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libb2/portfile.cmake b/ports/libb2/portfile.cmake new file mode 100644 index 00000000000000..fe26199ce72198 --- /dev/null +++ b/ports/libb2/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_TARGET "WINDOWS") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BLAKE2/libb2 + REF 2c5142f12a2cd52f3ee0a43e50a3a76f75badf85 + SHA512 cf29cf9391ae37a978eb6618de6f856f3defa622b8f56c2d5a519ab34fd5e4d91f3bb868601a44e9c9164a2992e80dde188ccc4d1605dffbdf93687336226f8d + HEAD_REF master +) + +set(OPTIONS) +if(CMAKE_HOST_WIN32) + set(OPTIONS --disable-native) # requires cpuid +endif() + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ax_cv_check_cflags___O3=no # see https://github.com/microsoft/vcpkg/pull/17912#issuecomment-840514179 + ${OPTIONS} +) +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libb2/vcpkg.json b/ports/libb2/vcpkg.json new file mode 100644 index 00000000000000..6cd8bc6dc8a662 --- /dev/null +++ b/ports/libb2/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libb2", + "version": "0.98.1", + "port-version": 5, + "description": "C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp", + "homepage": "https://github.com/BLAKE2/libb2", + "supports": "!windows" +} diff --git a/ports/libbacktrace/portfile.cmake b/ports/libbacktrace/portfile.cmake new file mode 100644 index 00000000000000..1931568fc7f294 --- /dev/null +++ b/ports/libbacktrace/portfile.cmake @@ -0,0 +1,19 @@ +if(VCPKG_TARGET_IS_WINDOWS) + message("libbacktrace cannot be built using MSVC on Windows due to relying on the C++ unwind API https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ianlancetaylor/libbacktrace + REF 4f57c999716847e45505b3df170150876b545088 + SHA512 1df2c9d3c119a2ec7b8b8940bff7ba6d28fe99587f565066ae25c216021431d3c26c8b336c38dd0490165244c66d68f9cba20dfc7836042b62f9d588946be4b5 +) + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libbacktrace/vcpkg.json b/ports/libbacktrace/vcpkg.json new file mode 100644 index 00000000000000..7b6b32b53b710d --- /dev/null +++ b/ports/libbacktrace/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libbacktrace", + "version-date": "2021-03-14", + "description": "The libbacktrace library may be linked into a program or library and used to produce symbolic backtraces.", + "homepage": "https://github.com/ianlancetaylor/libbacktrace" +} diff --git a/ports/libbf/CONTROL b/ports/libbf/CONTROL deleted file mode 100644 index 35ee0fbcc1dffd..00000000000000 --- a/ports/libbf/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libbf -Version: 1.0.0-1 -Description: Bloom filters for C++11. \ No newline at end of file diff --git a/ports/libbf/portfile.cmake b/ports/libbf/portfile.cmake index c7a9ef42e86e8a..a50abed942aa60 100644 --- a/ports/libbf/portfile.cmake +++ b/ports/libbf/portfile.cmake @@ -2,8 +2,6 @@ if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Windows" OR message(FATAL_ERROR "libbf does not support MSVC") endif() -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mavam/libbf diff --git a/ports/libbf/vcpkg.json b/ports/libbf/vcpkg.json new file mode 100644 index 00000000000000..1b184fddf45f2d --- /dev/null +++ b/ports/libbf/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libbf", + "version-string": "1.0.0", + "port-version": 2, + "description": "Bloom filters for C++11." +} diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL deleted file mode 100644 index f5ae2330d8a28f..00000000000000 --- a/ports/libbson/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libbson -Version: 1.14.0-1 -Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. -Homepage: https://github.com/mongodb/libbson diff --git a/ports/libbson/disable-source-write.patch b/ports/libbson/disable-source-write.patch new file mode 100644 index 00000000000000..ff2f9cab52f0f1 --- /dev/null +++ b/ports/libbson/disable-source-write.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7ff8bbf..32c2e00 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -114,8 +114,8 @@ if (BUILD_VERSION STREQUAL "0.0.0") + file (WRITE ${PROJECT_SOURCE_DIR}/VERSION_CURRENT ${BUILD_VERSION}) + endif () + else () +- message ("storing BUILD_VERSION ${BUILD_VERSION} in file VERSION_CURRENT for later use") +- file (WRITE ${PROJECT_SOURCE_DIR}/VERSION_CURRENT ${BUILD_VERSION}) ++ #message ("storing BUILD_VERSION ${BUILD_VERSION} in file VERSION_CURRENT for later use") ++ #file (WRITE ${PROJECT_SOURCE_DIR}/VERSION_CURRENT ${BUILD_VERSION}) + endif () + + include (LoadVersion) diff --git a/ports/libbson/fix-include-directory.patch b/ports/libbson/fix-include-directory.patch new file mode 100644 index 00000000000000..beead37bd36625 --- /dev/null +++ b/ports/libbson/fix-include-directory.patch @@ -0,0 +1,13 @@ +diff --git a/src/libbson/CMakeLists.txt b/src/libbson/CMakeLists.txt +index d383424..cc633f6 100644 +--- a/src/libbson/CMakeLists.txt ++++ b/src/libbson/CMakeLists.txt +@@ -326,7 +326,7 @@ if (ENABLE_EXAMPLES) + endif () # ENABLE_EXAMPLES + + set (BSON_HEADER_INSTALL_DIR +- "${CMAKE_INSTALL_INCLUDEDIR}/libbson-${BSON_API_VERSION}" ++ "${CMAKE_INSTALL_INCLUDEDIR}" + ) + + if (ENABLE_STATIC MATCHES "ON|AUTO") diff --git a/ports/libbson/fix-static-cmake-2.patch b/ports/libbson/fix-static-cmake-2.patch new file mode 100644 index 00000000000000..1a694a1bfb2cd6 --- /dev/null +++ b/ports/libbson/fix-static-cmake-2.patch @@ -0,0 +1,13 @@ +diff --git a/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in b/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in +index 92933fe..90eb16f 100644 +--- a/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in ++++ b/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in +@@ -27,7 +27,7 @@ set_and_check (BSON_STATIC_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIRS@") + # directory and the base name, but not the suffix, so we use CMake's + # find_library () to pick that up. Users can override this by configuring + # BSON_STATIC_LIBRARY themselves. +-find_library (BSON_STATIC_LIBRARY bson-static-1.0 PATHS "@PACKAGE_LIBRARY_INSTALL_DIRS@" NO_DEFAULT_PATH) ++find_library (BSON_STATIC_LIBRARY bson-1.0 PATHS "@PACKAGE_LIBRARY_INSTALL_DIRS@" NO_DEFAULT_PATH) + + set (BSON_STATIC_LIBRARIES ${BSON_STATIC_LIBRARY}) + diff --git a/ports/libbson/fix-static-cmake.patch b/ports/libbson/fix-static-cmake.patch new file mode 100644 index 00000000000000..11e11dcbadbb0c --- /dev/null +++ b/ports/libbson/fix-static-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in b/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in +index 92933fe..d98ebd3 100644 +--- a/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in ++++ b/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in +@@ -36,3 +36,7 @@ foreach (LIB @LIBBSON_LIBRARIES@) + endforeach () + + set (BSON_STATIC_DEFINITIONS BSON_STATIC) ++ ++set (BSON_LIBRARIES ${BSON_STATIC_LIBRARIES}) ++set (BSON_INCLUDE_DIRS ${BSON_STATIC_INCLUDE_DIRS}) ++set (BSON_DEFINITIONS BSON_STATIC) +\ No newline at end of file diff --git a/ports/libbson/fix-uwp.patch b/ports/libbson/fix-uwp.patch index 8a793aece30b70..9342e81bd0d95e 100644 --- a/ports/libbson/fix-uwp.patch +++ b/ports/libbson/fix-uwp.patch @@ -1,6 +1,8 @@ +diff --git a/src/libbson/CMakeLists.txt b/src/libbson/CMakeLists.txt +index 7c479d8..d383424 100644 --- a/src/libbson/CMakeLists.txt +++ b/src/libbson/CMakeLists.txt -@@ -217,6 +217,9 @@ set (HEADERS_FORWARDING +@@ -226,6 +226,9 @@ set (HEADERS_FORWARDING ${PROJECT_SOURCE_DIR}/src/bson/forwarding/bson.h ) @@ -9,8 +11,8 @@ +if (NOT ENABLE_STATIC MATCHES "ON|AUTO") add_library (bson_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) set (CMAKE_CXX_VISIBILITY_PRESET hidden) - set_target_properties (bson_shared PROPERTIES COMPILE_DEFINITIONS "BSON_COMPILATION;JSONSL_PARSE_NAN") -@@ -258,16 +261,21 @@ if (WIN32) + target_compile_definitions (bson_shared PRIVATE BSON_COMPILATION JSONSL_PARSE_NAN) +@@ -268,9 +271,13 @@ if (WIN32) # must be handled specially since we can't resolve them set (BSON_SYSTEM_LIBRARIES ${BSON_SYSTEM_LIBRARIES} ws2_32) endif () @@ -19,12 +21,12 @@ if (ENABLE_STATIC MATCHES "ON|AUTO") add_library (bson_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + set(CMAKE_CXX_VISIBILITY_PRESET hidden) - set_target_properties (bson_static PROPERTIES COMPILE_DEFINITIONS "BSON_COMPILATION;BSON_STATIC;JSONSL_PARSE_NAN") - set_target_properties (bson_static PROPERTIES VERSION 0.0.0) - set_target_properties (bson_static PROPERTIES OUTPUT_NAME "bson-static-${BSON_API_VERSION}") + set(THREADS_PREFER_PTHREAD_FLAG 1) -+ find_package (Threads REQUIRED) - target_link_libraries (bson_static Threads::Threads) ++ find_package(Threads REQUIRED) + target_compile_definitions (bson_static + PUBLIC BSON_STATIC + PRIVATE BSON_COMPILATION JSONSL_PARSE_NAN +@@ -284,6 +291,7 @@ if (ENABLE_STATIC MATCHES "ON|AUTO") if (RT_LIBRARY) target_link_libraries (bson_static ${RT_LIBRARY}) endif () @@ -32,7 +34,7 @@ if (M_LIBRARY) target_link_libraries (bson_static ${M_LIBRARY}) endif () -@@ -282,7 +290,7 @@ function (add_example bin src) +@@ -298,7 +306,7 @@ function (add_example bin src) add_executable (${bin} ${BSON_EXAMPLE_SOURCES}) # Link against the shared lib like normal apps @@ -41,73 +43,106 @@ set (EXAMPLES ${EXAMPLES} ${bin}) endfunction () -@@ -304,6 +312,7 @@ set (BSON_HEADER_INSTALL_DIR - "${CMAKE_INSTALL_INCLUDEDIR}/libbson-${BSON_API_VERSION}" +@@ -322,7 +330,7 @@ set (BSON_HEADER_INSTALL_DIR ) -+if (NOT ENABLE_STATIC MATCHES "ON|AUTO") - install ( - TARGETS bson_shared ${EXAMPLES} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -@@ -311,6 +320,7 @@ install ( - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} - ) -+endif () if (ENABLE_STATIC MATCHES "ON|AUTO") - install ( - TARGETS bson_static ${EXAMPLES} +- set (TARGETS_TO_INSTALL bson_shared bson_static) ++ set (TARGETS_TO_INSTALL bson_static) + else () + set (TARGETS_TO_INSTALL bson_shared) + endif () +@@ -337,6 +345,7 @@ install ( + ) + + if (MSVC) ++ if (NOT ENABLE_STATIC MATCHES "ON|AUTO") + add_custom_command ( + TARGET bson_shared + POST_BUILD +@@ -348,6 +357,7 @@ if (MSVC) + FILES $/lib$ + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) ++ else() + if (TARGET bson_static) + add_custom_command ( + TARGET bson_static +@@ -361,6 +371,7 @@ if (MSVC) + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + endif () ++ endif() + endif () + + install ( +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index 0f9e50c..85eb429 100644 --- a/src/libmongoc/CMakeLists.txt +++ b/src/libmongoc/CMakeLists.txt -@@ -609,6 +609,7 @@ if (WIN32) +@@ -694,6 +694,7 @@ if (WIN32) set (LIBRARIES ${LIBRARIES} ws2_32) endif () +if (NOT MONGOC_ENABLE_STATIC) add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) - target_link_libraries (mongoc_shared ${LIBRARIES} ${BSON_LIBRARIES}) -@@ -617,6 +618,7 @@ target_compile_definitions (mongoc_shared PUBLIC MONGOC_COMPILATION ${BSON_DEFIN + target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) +@@ -704,6 +705,7 @@ target_compile_definitions (mongoc_shared PRIVATE MONGOC_COMPILATION) set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) - set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "mongoc-${MONGOC_API_VERSION}" PREFIX "lib") + set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-${MONGOC_API_VERSION}") +endif () if (MONGOC_ENABLE_STATIC) add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -@@ -639,7 +641,11 @@ if (ENABLE_APPLE_FRAMEWORK) +@@ -731,7 +733,11 @@ if (ENABLE_APPLE_FRAMEWORK) endif () add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) +if (MONGOC_ENABLE_STATIC) +target_link_libraries (mongoc-stat mongoc_static) +else () - target_link_libraries (mongoc-stat mongoc_shared) + target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) +endif () # mongoc-stat works if shared memory performance counters are enabled. if (ENABLE_SHM_COUNTERS STREQUAL "ON") -@@ -870,6 +876,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/json DESTINATION ${PROJECT_BINARY_DIR}/te - file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR}/tests) +@@ -977,7 +983,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR} file (COPY ${PROJECT_SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) -+if (NOT MONGOC_ENABLE_STATIC) - install ( - TARGETS mongoc_shared ${EXAMPLES} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -@@ -877,10 +884,11 @@ install ( - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} + if (MONGOC_ENABLE_STATIC) +- set (TARGETS_TO_INSTALL mongoc_shared mongoc_static) ++ set (TARGETS_TO_INSTALL mongoc_static) + else () + set (TARGETS_TO_INSTALL mongoc_shared) + endif () +@@ -997,6 +1003,7 @@ install ( ) -+endif () - if (MONGOC_ENABLE_STATIC) - install ( -- TARGETS mongoc_shared mongoc_static ${EXAMPLES} -+ TARGETS mongoc_static ${EXAMPLES} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + if (MSVC) ++ if (NOT ENABLE_STATIC MATCHES "ON|AUTO") + add_custom_command ( + TARGET mongoc_shared + POST_BUILD +@@ -1008,6 +1015,7 @@ if (MSVC) + FILES $/lib$ + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) ++ else() + if (TARGET mongoc_static) + add_custom_command ( + TARGET mongoc_static +@@ -1021,6 +1029,7 @@ if (MSVC) + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + endif () ++ endif() + endif () + + install ( +diff --git a/src/libmongoc/src/mongoc/mongoc-gridfs-file.c b/src/libmongoc/src/mongoc/mongoc-gridfs-file.c +index 0690b86..98721df 100644 --- a/src/libmongoc/src/mongoc/mongoc-gridfs-file.c +++ b/src/libmongoc/src/mongoc/mongoc-gridfs-file.c @@ -765,7 +765,7 @@ _mongoc_gridfs_file_refresh_page (mongoc_gridfs_file_t *file) @@ -119,6 +154,8 @@ const char *key; bson_iter_t iter; int64_t existing_chunks; +diff --git a/src/libmongoc/src/mongoc/mongoc-handshake.c b/src/libmongoc/src/mongoc/mongoc-handshake.c +index 8374af2..5491595 100644 --- a/src/libmongoc/src/mongoc/mongoc-handshake.c +++ b/src/libmongoc/src/mongoc/mongoc-handshake.c @@ -286,7 +286,8 @@ _get_os_version (void) @@ -131,6 +168,8 @@ OSVERSIONINFO osvi; ZeroMemory (&osvi, sizeof (OSVERSIONINFO)); osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); +diff --git a/src/libmongoc/src/mongoc/mongoc-util.c b/src/libmongoc/src/mongoc/mongoc-util.c +index 99939ff..3c25e19 100644 --- a/src/libmongoc/src/mongoc/mongoc-util.c +++ b/src/libmongoc/src/mongoc/mongoc-util.c @@ -84,7 +84,11 @@ _mongoc_hex_md5 (const char *input) diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index c682ae086f238c..eb534a26028846 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -1,95 +1,68 @@ -include(vcpkg_common_functions) -set(BUILD_VERSION 1.14.0) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO mongodb/mongo-c-driver - REF ${BUILD_VERSION} - SHA512 bf2bb835543dd2a445aac6cafa7bbbf90921ec41014534779924a5eb7cbd9fd532acd8146ce81dfcf1bcac33a78d8fce22b962ed7f776449e4357eccab8d6110 - HEAD_REF master - PATCHES fix-uwp.patch -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(ENABLE_STATIC ON) -else() - set(ENABLE_STATIC OFF) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DENABLE_MONGOC=OFF - -DENABLE_BSON=ON - -DENABLE_TESTS=OFF - -DENABLE_EXAMPLES=OFF - -DENABLE_STATIC=${ENABLE_STATIC} - -DBUILD_VERSION=${BUILD_VERSION} -) - -vcpkg_install_cmake() -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-static-1.0) -else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-1.0) -endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) - -# This rename is needed because the official examples expect to use #include -# See Microsoft/vcpkg#904 -file(RENAME - ${CURRENT_PACKAGES_DIR}/include/libbson-1.0 - ${CURRENT_PACKAGES_DIR}/temp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/libbson-static-1.0.a - ${CURRENT_PACKAGES_DIR}/lib/libbson-1.0.a) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/libbson-static-1.0.a - ${CURRENT_PACKAGES_DIR}/debug/lib/libbson-1.0.a) - else() - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) - endif() - - # drop the __declspec(dllimport) when building static - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES static.patch - ) - - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) -endif() - -configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libbson/copyright COPYONLY) -file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(PORT_POSTFIX "static-1.0") -else() - set(PORT_POSTFIX "1.0") -endif() - -# Create cmake files for _both_ find_package(libbson) and find_package(libbson-static-1.0)/find_package(libbson-1.0) -file(READ ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake LIBBSON_CONFIG_CMAKE) -string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") -string(REPLACE "bson-static-1.0" "bson-1.0" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake "${LIBBSON_CONFIG_CMAKE}") -file(COPY ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}) -file(COPY ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake) - -vcpkg_copy_pdbs() +# This port needs to be updated at the same time as mongo-c-driver +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mongodb/mongo-c-driver + REF 99d422877c5b5ea52006c13ee3b48297251b2b2d # debian/1.16.1 + SHA512 e2f129439ff3697981774e0de35586a6afe98838acfc52d8a115bcb298350f2779b886dc6b27130e78b3b81f9b0a85b2bc6bcef246f9685c05f6789747c4739d + HEAD_REF master + PATCHES + fix-uwp.patch + fix-static-cmake.patch + disable-source-write.patch + fix-include-directory.patch + fix-static-cmake-2.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) + +file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents) +string(JSON BUILD_VERSION GET "${_contents}" version) +file(WRITE "${SOURCE_PATH}/VERSION_CURRENT" "${BUILD_VERSION}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DENABLE_MONGOC=OFF + -DENABLE_BSON=ON + -DENABLE_TESTS=OFF + -DENABLE_EXAMPLES=OFF + -DENABLE_STATIC=${ENABLE_STATIC} + -DBUILD_VERSION=${BUILD_VERSION} + -DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp=ON + MAYBE_UNUSED_VARIABLES + CMAKE_DISABLE_FIND_PACKAGE_PythonInterp +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/libbson-static-1.0" PACKAGE_NAME "libbson-1.0") +else() + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/libbson-1.0" PACKAGE_NAME "libbson-1.0") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/mongo-c-driver") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + # drop the __declspec(dllimport) when building static + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/bson/bson-macros.h" + "define BSON_API __declspec(dllimport)" "define BSON_API") + + file(RENAME + "${CURRENT_PACKAGES_DIR}/share/libbson-1.0/libbson-static-1.0-config.cmake" + "${CURRENT_PACKAGES_DIR}/share/libbson-1.0/libbson-1.0-config.cmake") + file(RENAME + "${CURRENT_PACKAGES_DIR}/share/libbson-1.0/libbson-static-1.0-config-version.cmake" + "${CURRENT_PACKAGES_DIR}/share/libbson-1.0/libbson-1.0-config-version.cmake") + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin") +endif() + +file(COPY "${SOURCE_PATH}/THIRD_PARTY_NOTICES" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libbson") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/libbson/static.patch b/ports/libbson/static.patch deleted file mode 100644 index 7710d5b6d84506..00000000000000 --- a/ports/libbson/static.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/bson/bson-macros.h -+++ b/bson/bson-macros.h -@@ -87,7 +87,7 @@ - #elif defined(BSON_COMPILATION) - #define BSON_API __declspec(dllexport) - #else --#define BSON_API __declspec(dllimport) -+#define BSON_API - #endif - #define BSON_CALL __cdecl - diff --git a/ports/libbson/usage b/ports/libbson/usage new file mode 100644 index 00000000000000..873243c81481cd --- /dev/null +++ b/ports/libbson/usage @@ -0,0 +1,6 @@ +The package libbson is compatible with built-in CMake targets: + + find_package(libbson-1.0 CONFIG REQUIRED) + target_include_directories(main PRIVATE ${BSON_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${BSON_LIBRARIES}) + target_compile_definitions(main PRIVATE ${BSON_DEFINITIONS}) diff --git a/ports/libbson/vcpkg.json b/ports/libbson/vcpkg.json new file mode 100644 index 00000000000000..c9ab96124e6420 --- /dev/null +++ b/ports/libbson/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "libbson", + "version": "1.16.1", + "port-version": 3, + "description": "libbson is a library providing useful routines related to building, parsing, and iterating BSON documents.", + "homepage": "https://github.com/mongodb/libbson", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libcbor/LibCborConfig.cmake b/ports/libcbor/LibCborConfig.cmake new file mode 100644 index 00000000000000..c2fef50868584e --- /dev/null +++ b/ports/libcbor/LibCborConfig.cmake @@ -0,0 +1,13 @@ +# Distributed under the OSI-approved BSD 3-Clause License. + +find_path(LIBCBOR_INCLUDE_DIR NAMES cbor.h) + +find_library(LIBCBOR_LIBRARY cbor) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBCBOR DEFAULT_MSG LIBCBOR_LIBRARY LIBCBOR_INCLUDE_DIR) + +if(LIBCBOR_FOUND) + set(LIBCBOR_LIBRARIES ${LIBCBOR_LIBRARY}) +endif() + +mark_as_advanced(LIBCBOR_INCLUDE_DIR LIBCBOR_LIBRARY) diff --git a/ports/libcbor/portfile.cmake b/ports/libcbor/portfile.cmake new file mode 100644 index 00000000000000..252a7086827b09 --- /dev/null +++ b/ports/libcbor/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PJK/libcbor + REF v0.8.0 + SHA512 694d2d3a78d80072f96e0afb73590ca1f3572e41d2117330ef4313ed06271743b048d3ba3259c6ffe9a802d5e441379d0e54787d1d42fed08dc81ac4f06c6dbc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_TESTS=OFF + -DWITH_EXAMPLES=OFF + -DVCPKG_VERBOSE=ON + ) + +vcpkg_build_cmake() +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +# Add Cmake Packagefile +file(COPY ${CMAKE_CURRENT_LIST_DIR}/LibCborConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/libcbor/vcpkg.json b/ports/libcbor/vcpkg.json new file mode 100644 index 00000000000000..90c54499d8e1cc --- /dev/null +++ b/ports/libcbor/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libcbor", + "version": "0.8.0", + "port-version": 1, + "description": "libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format", + "homepage": "https://github.com/PJK/libcbor" +} diff --git a/ports/libcds/001-cmake-install.patch b/ports/libcds/001-cmake-install.patch index 2a73752f58c850..ae538706fd7e34 100644 --- a/ports/libcds/001-cmake-install.patch +++ b/ports/libcds/001-cmake-install.patch @@ -21,8 +21,8 @@ index d97ee07..f8affbb 100644 -install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) -install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT}) +if (NOT DISABLE_INSTALL_SHARED) -+ install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP) -+ install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) ++ install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT}) ++ #install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) +endif() +if (NOT DISABLE_INSTALL_STATIC) + install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT}) diff --git a/ports/libcds/CONTROL b/ports/libcds/CONTROL deleted file mode 100644 index 5c306231896c2c..00000000000000 --- a/ports/libcds/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libcds -Version: 2.3.3 -Build-Depends: boost-system, boost-thread -Homepage: https://github.com/khizmax/libcds -Description: a collection of concurrent containers that don't require external (manual) synchronization for shared access, and safe memory reclamation (SMR) algorithms like Hazard Pointer and user-space RCU that is used as an epoch-based SMR. diff --git a/ports/libcds/portfile.cmake b/ports/libcds/portfile.cmake index ebb87b5389ea99..4cdf9f2671d03c 100644 --- a/ports/libcds/portfile.cmake +++ b/ports/libcds/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO khizmax/libcds diff --git a/ports/libcds/vcpkg.json b/ports/libcds/vcpkg.json new file mode 100644 index 00000000000000..2464e61ce2f500 --- /dev/null +++ b/ports/libcds/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libcds", + "version-string": "2.3.3", + "port-version": 1, + "description": "a collection of concurrent containers that don't require external (manual) synchronization for shared access, and safe memory reclamation (SMR) algorithms like Hazard Pointer and user-space RCU that is used as an epoch-based SMR.", + "homepage": "https://github.com/khizmax/libcds", + "dependencies": [ + "boost-system", + "boost-thread" + ] +} diff --git a/ports/libcerf/CONTROL b/ports/libcerf/CONTROL deleted file mode 100644 index 72b1324d346c59..00000000000000 --- a/ports/libcerf/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libcerf -Version: 1.13 -Description: A self-contained numeric library that provides an efficient and accurate implementation of complex error functions, along with Dawson, Faddeeva, and Voigt functions. -Homepage: https://jugit.fz-juelich.de/mlz/libcerf diff --git a/ports/libcerf/portfile.cmake b/ports/libcerf/portfile.cmake index 20e3c7c7084984..199e396e92cff9 100644 --- a/ports/libcerf/portfile.cmake +++ b/ports/libcerf/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(BUILD_SHARED_LIBS ON) else() @@ -31,5 +29,3 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcerf RENAME copyright) - -vcpkg_test_cmake(PACKAGE_NAME libcerf) diff --git a/ports/libcerf/vcpkg.json b/ports/libcerf/vcpkg.json new file mode 100644 index 00000000000000..73b60013ee8263 --- /dev/null +++ b/ports/libcerf/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libcerf", + "version-string": "1.13", + "port-version": 1, + "description": "A self-contained numeric library that provides an efficient and accurate implementation of complex error functions, along with Dawson, Faddeeva, and Voigt functions.", + "homepage": "https://jugit.fz-juelich.de/mlz/libcerf" +} diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt index fe70cb9dd49b91..ab6711ad9c8a74 100644 --- a/ports/libconfig/CMakeLists.txt +++ b/ports/libconfig/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5.1) project(libconfig C CXX) if(MSVC) - add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DYY_NO_UNISTD_H -DYY_USE_CONST) endif() set(C_SOURCES @@ -20,12 +20,10 @@ set(CPP_SOURCES lib/libconfigcpp.cc ) -find_path(STDINT_H stdint.h) +set(CMAKE_C_STANDARD 99) include_directories(lib ${STDINT_H}) -add_definitions(-DYY_NO_UNISTD_H -DYY_USE_CONST) - add_library(libconfig ${C_SOURCES}) add_library(libconfig++ ${CPP_SOURCES}) @@ -37,7 +35,10 @@ else() target_compile_definitions(libconfig++ PUBLIC -DLIBCONFIGXX_STATIC) endif() -target_link_libraries(libconfig shlwapi) +if (WIN32) + # Linux doesn't have shlwapi + target_link_libraries(libconfig shlwapi) +endif() target_link_libraries(libconfig++ PRIVATE libconfig) install( diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL deleted file mode 100644 index 3cbedcf5c4a544..00000000000000 --- a/ports/libconfig/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libconfig -Version: 1.7.2-1 -Homepage: https://github.com/hyperrealm/libconfig -Description: C/C++ library for processing configuration files diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index a3958d342df0cd..06b4626775866a 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -1,23 +1,40 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO hyperrealm/libconfig - REF v1.7.2 - SHA512 9df57355c2d08381b4a0a6366f0db3633fbe8f73c2bb8c370c040b0bae96ce89ee4ac6c17a5a247fed855d890fa383e5b70cb5573fc9cfc62194d5b94e161cee + REF v1.7.3 + SHA512 3749bf9eb29bab0f6b14f4fc759f0c419ed27a843842aaabed1ec1fbe0faa8c93322ff875ca1291d69cb28a39ece86d512aec42c2140d566c38c56dc616734f4 HEAD_REF master ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +if (NOT VCPKG_USE_HEAD_VERSION) + message("If you would like to use cmake with the port, use `--head` option with vcpkg install.") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +endif() + +if (NOT VCPKG_USE_HEAD_VERSION) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + ) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + ) +endif() +vcpkg_install_cmake() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) +vcpkg_copy_pdbs() -vcpkg_install_cmake() +if (VCPKG_USE_HEAD_VERSION) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libconfig) +endif() foreach(FILE ${CURRENT_PACKAGES_DIR}/include/libconfig.h++ ${CURRENT_PACKAGES_DIR}/include/libconfig.h) file(READ ${FILE} _contents) @@ -34,6 +51,4 @@ foreach(FILE ${CURRENT_PACKAGES_DIR}/include/libconfig.h++ ${CURRENT_PACKAGES_DI file(WRITE ${FILE} "${_contents}") endforeach() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libconfig RENAME copyright) - -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libconfig/vcpkg.json b/ports/libconfig/vcpkg.json new file mode 100644 index 00000000000000..6acd72878ba263 --- /dev/null +++ b/ports/libconfig/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libconfig", + "version-string": "1.7.3", + "port-version": 1, + "description": "C/C++ library for processing configuration files", + "homepage": "https://github.com/hyperrealm/libconfig" +} diff --git a/ports/libconfuse/CONTROL b/ports/libconfuse/CONTROL deleted file mode 100644 index 15044cce3d63d3..00000000000000 --- a/ports/libconfuse/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libconfuse -Version: 2019-07-14 -Description: Small configuration file parser library for C -Homepage: https://github.com/martinh/libconfuse diff --git a/ports/libconfuse/portfile.cmake b/ports/libconfuse/portfile.cmake index 01c6290cd57df0..ac49ff157c7639 100644 --- a/ports/libconfuse/portfile.cmake +++ b/ports/libconfuse/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinh/libconfuse @@ -38,6 +36,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/ports/libconfuse/vcpkg.json b/ports/libconfuse/vcpkg.json new file mode 100644 index 00000000000000..2a9a604f5775cf --- /dev/null +++ b/ports/libconfuse/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libconfuse", + "version-string": "2019-07-14", + "port-version": 1, + "description": "Small configuration file parser library for C", + "homepage": "https://github.com/martinh/libconfuse" +} diff --git a/ports/libcopp/CONTROL b/ports/libcopp/CONTROL deleted file mode 100644 index 68115219ffe20a..00000000000000 --- a/ports/libcopp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libcopp -Version: 1.1.0-2 -Description: A cross-platfrom coroutine library for C++ diff --git a/ports/libcopp/portfile.cmake b/ports/libcopp/portfile.cmake index 026e4a14c8ba92..46adc578b38210 100644 --- a/ports/libcopp/portfile.cmake +++ b/ports/libcopp/portfile.cmake @@ -1,31 +1,35 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO owt5008137/libcopp - REF 1.1.0 - SHA512 27b444d158281786154830c6e216e701ba0301af1d7a08873b33e27ce3d2db6ddb4753239878633f4c2aed9f759b46f961408a2eb7b50b5d445c3531c1fa9546 + REPO owent/libcopp + REF 1.4.1 + SHA512 eba06bd2de7c9ee557cdd0bf79e0c53e37722b671347436322c14c99e94d955477bfc0980a4f59a5c31051e108f952ec96791024c45fa8eeaa5f7a49099dd8ae HEAD_REF v2 ) -# Use libcopp's own build process, skipping examples and tests +# atframework/cmake-toolset needed as a submodule for configure cmake +vcpkg_from_github( + OUT_SOURCE_PATH ATFRAMEWORK_CMAKE_TOOLSET + REPO atframework/cmake-toolset + REF v1.3.5 + SHA512 5048c204eb6358547d99712a06866836e1a6dc20dee44cc33fae77181bdf9ece5686f30062eff6a231e1ec898d5a37ebaddb243e7e3484c002bb96240aa496a5 + HEAD_REF main + ) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} DISABLE_PARALLEL_CONFIGURE - # PREFER_NINJA # Disabled because Ninja does not invoke masm correctly for this project + OPTIONS "-DATFRAMEWORK_CMAKE_TOOLSET_DIR=${ATFRAMEWORK_CMAKE_TOOLSET}" ) + vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libcopp) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp) -file(COPY ${SOURCE_PATH}/BOOST_LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp/copyright) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/BOOST_LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libcopp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/libcopp/usage b/ports/libcopp/usage deleted file mode 100644 index 4593a42adf579a..00000000000000 --- a/ports/libcopp/usage +++ /dev/null @@ -1,5 +0,0 @@ -The package libcopp provides CMake integration: - - find_package(Libcopp CONFIG REQUIRED) - target_include_directories(main PRIVATE ${Libcopp_INCLUDE_DIRS}) - target_link_libraries(main PRIVATE ${Libcotask_LIBRARIES} ${Libcopp_LIBRARIES}) diff --git a/ports/libcopp/vcpkg.json b/ports/libcopp/vcpkg.json new file mode 100644 index 00000000000000..a832fe24d92380 --- /dev/null +++ b/ports/libcopp/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "libcopp", + "version-semver": "1.4.1", + "maintainers": "owent ", + "description": "A cross-platfrom coroutine library for C++", + "homepage": "https://github.com/owent/libcopp", + "documentation": "https://libcopp.atframe.work/", + "license": "MIT" +} diff --git a/ports/libcrafter/fix-build-error.patch b/ports/libcrafter/fix-build-error.patch new file mode 100644 index 00000000000000..cc97b4a6315616 --- /dev/null +++ b/ports/libcrafter/fix-build-error.patch @@ -0,0 +1,20 @@ +diff --git a/libcrafter/configure.ac b/libcrafter/configure.ac +index 860d98b..b04ccce 100644 +--- a/libcrafter/configure.ac ++++ b/libcrafter/configure.ac +@@ -35,14 +35,13 @@ AC_ARG_WITH(libpcap, + PCAPINC="-I$withval -I$withval/bpf" + PCAPLIB="-L$withval -lpcap" + elif test -f $withval/include/pcap.h -a \ +- -f $withval/include/net/bpf.h -a \ + -f $withval/lib/libpcap.a; then + owd=`pwd` + if cd $withval; then withval=`pwd`; cd $owd; fi + PCAPINC="-I$withval/include" + PCAPLIB="-L$withval/lib -lpcap" + else +- AC_ERROR(pcap.h, net/bpf.h, or libpcap.a not found in $withval) ++ AC_ERROR(pcap.h, or libpcap.a not found in $withval) + fi + ;; + esac ], diff --git a/ports/libcrafter/portfile.cmake b/ports/libcrafter/portfile.cmake new file mode 100644 index 00000000000000..3b78eadf912089 --- /dev/null +++ b/ports/libcrafter/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_fail_port_install(ON_TARGET "windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pellegre/libcrafter + REF 86f81f101b5e3051ed04563b3ad3dd7a823afb21 #version-1.0 + SHA512 bd0eac06896df63f0fff0ed3cf7ca5176e56615476c8134bd26f035692ab9e583f58f1f57daa7673771a710d6921c0c6a6473ab181982ad57727584f2cde56d0 + HEAD_REF master + PATCHES fix-build-error.patch +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH libcrafter + OPTIONS + "--with-libpcap=${CURRENT_INSTALLED_DIR}" +) + +vcpkg_install_make() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/libcrafter/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/libcrafter/vcpkg.json b/ports/libcrafter/vcpkg.json new file mode 100644 index 00000000000000..0f774a171abe74 --- /dev/null +++ b/ports/libcrafter/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libcrafter", + "version": "1.0", + "description": "Libcrafter is a high level library for C++ designed to create and decode network packets.", + "homepage": "https://github.com/pellegre/libcrafter", + "supports": "!windows", + "dependencies": [ + "libpcap" + ] +} diff --git a/ports/libcroco/CMakeLists.txt b/ports/libcroco/CMakeLists.txt index ff11792ff669ef..9e05f376dc6706 100644 --- a/ports/libcroco/CMakeLists.txt +++ b/ports/libcroco/CMakeLists.txt @@ -1,9 +1,10 @@ cmake_minimum_required(VERSION 3.11) project(libcroco C) -find_package(unofficial-iconv REQUIRED) -find_package(unofficial-gettext CONFIG REQUIRED) -find_package(unofficial-glib CONFIG REQUIRED) +find_package(Iconv REQUIRED) +find_package(Intl REQUIRED) +find_package(PkgConfig REQUIRED) +pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 IMPORTED_TARGET) find_package(LibXml2 REQUIRED) if(NOT WIN32) find_package(Threads REQUIRED) @@ -70,13 +71,10 @@ set(CMAKE_DEBUG_POSTFIX "d") add_library(croco-0.6 ${SOURCES}) -target_include_directories(croco-0.6 PRIVATE ${GLIB_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}) +target_include_directories(croco-0.6 PRIVATE ${GLIB_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR}) target_link_libraries(croco-0.6 PRIVATE - unofficial::glib::gio - unofficial::glib::glib - unofficial::glib::gmodule - unofficial::glib::gobject - ${LIBXML2_LIBRARIES} + PkgConfig::GLIB2 + ${LIBXML2_LIBRARIES} ${Intl_LIBRARIES} Iconv::Iconv ) install(TARGETS croco-0.6 @@ -127,9 +125,10 @@ install( file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libcroco-config.cmake " include(CMakeFindDependencyMacro) -find_dependency(unofficial-gettext) -find_dependency(unofficial-iconv CONFIG) -find_dependency(unofficial-glib CONFIG) +find_dependency(Intl) +find_dependency(Iconv) +find_dependency(PkgConfig) +pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 IMPORTED_TARGET) find_dependency(LibXml2) if(NOT WIN32) find_dependency(Threads) diff --git a/ports/libcroco/CONTROL b/ports/libcroco/CONTROL deleted file mode 100644 index 8badbeccc1944b..00000000000000 --- a/ports/libcroco/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libcroco -Version: 0.6.13-1 -Description: A standalone css2 parsing and manipulation library -Build-Depends: glib, libxml2 diff --git a/ports/libcroco/portfile.cmake b/ports/libcroco/portfile.cmake index b5c332306f62d6..de8c0fe2a99855 100644 --- a/ports/libcroco/portfile.cmake +++ b/ports/libcroco/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_download_distfile(ARCHIVE URLS "https://download.gnome.org/sources/libcroco/0.6/libcroco-0.6.13.tar.xz" FILENAME "libcroco-0.6.13.tar.xz" @@ -16,10 +14,12 @@ configure_file(${SOURCE_PATH}/config.h.win32 ${SOURCE_PATH}/src/config.h COPYONL file(READ "${SOURCE_PATH}/src/libcroco.symbols" SYMBOLS) string(REGEX REPLACE ";[^\n]*\n" "" DEF "EXPORTS\n${SYMBOLS}") file(WRITE "${SOURCE_PATH}/src/libcroco.def" "${DEF}") - +vcpkg_find_acquire_program(PKGCONFIG) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DPKG_CONFIG_EXECUTABLE=${PKGCONFIG} ) vcpkg_install_cmake() @@ -31,6 +31,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcroco RENAME copyright) vcpkg_copy_pdbs() - -# Post-build test for cmake libraries -vcpkg_test_cmake(PACKAGE_NAME libcroco) diff --git a/ports/libcroco/vcpkg.json b/ports/libcroco/vcpkg.json new file mode 100644 index 00000000000000..f6781ed63b2675 --- /dev/null +++ b/ports/libcroco/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libcroco", + "version": "0.6.13", + "port-version": 3, + "description": "A standalone css2 parsing and manipulation library", + "dependencies": [ + "glib", + "libxml2" + ] +} diff --git a/ports/libcuckoo/CONTROL b/ports/libcuckoo/CONTROL deleted file mode 100644 index b9c1440b343bc6..00000000000000 --- a/ports/libcuckoo/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libcuckoo -Version: 2018-12-24-1 -Description: A high-performance, concurrent hash table diff --git a/ports/libcuckoo/portfile.cmake b/ports/libcuckoo/portfile.cmake index 15d6df316be149..67c8f445e97125 100644 --- a/ports/libcuckoo/portfile.cmake +++ b/ports/libcuckoo/portfile.cmake @@ -1,12 +1,10 @@ # Header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO efficient/libcuckoo - REF f3138045810b2c2e9b59dbede296b4a5194af4f9 - SHA512 b1682b7175b2a7fd22c34cbaf9770f2f1bfb3f0d1be046338a8a489c302f0434ca1cbf2ffe5845e09aba132b0be6a1d6472b66b4518bb172b82af93a9d27cd21 + REF 8785773896d74f72b6224e59d37f5f8c3c1e022a + SHA512 e47f8fd132ee2acf347ee375759f96235cd090fdb825792f994ff5eb4d8fed55b8e8bea8d293ec96c1a5f1b46d19c6648eaf2482e482b7b9c0d6dc734bc2121d HEAD_REF master ) @@ -29,6 +27,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -#vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/libcuckoo/vcpkg.json b/ports/libcuckoo/vcpkg.json new file mode 100644 index 00000000000000..49f4312eac8c09 --- /dev/null +++ b/ports/libcuckoo/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libcuckoo", + "version-string": "0.3", + "port-version": 1, + "description": "A high-performance, concurrent hash table", + "homepage": "https://github.com/efficient/libcuckoo" +} diff --git a/ports/libdatachannel/0001-fix-for-vcpkg.patch b/ports/libdatachannel/0001-fix-for-vcpkg.patch new file mode 100644 index 00000000000000..528f47a8835f56 --- /dev/null +++ b/ports/libdatachannel/0001-fix-for-vcpkg.patch @@ -0,0 +1,75 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f0559b1..3c01184 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,7 +27,6 @@ endif() + + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules) +-set(BUILD_SHARED_LIBS OFF) # to force usrsctp to be built static + + if(WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN) +@@ -197,22 +196,10 @@ set(CMAKE_THREAD_PREFER_PTHREAD TRUE) + set(THREADS_PREFER_PTHREAD_FLAG TRUE) + find_package(Threads REQUIRED) + +-set(CMAKE_POLICY_DEFAULT_CMP0048 NEW) +-add_subdirectory(deps/plog EXCLUDE_FROM_ALL) ++find_library(USRSCTP_LIBRARY usrsctp REQUIRED) ++find_path(PLOG_INCLUDE_DIRS "plog/Appenders/AndroidAppender.h") + +-option(sctp_build_programs 0) +-option(sctp_build_shared_lib 0) +-set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) +-add_subdirectory(deps/usrsctp EXCLUDE_FROM_ALL) +-if (MSYS OR MINGW) +- target_compile_definitions(usrsctp PUBLIC -DSCTP_STDINT_INCLUDE=) +-endif() +-if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") +- target_compile_options(usrsctp PRIVATE -Wno-error=format-truncation) +-endif() +-add_library(Usrsctp::Usrsctp ALIAS usrsctp) +- +-add_library(datachannel SHARED ++add_library(datachannel + ${LIBDATACHANNEL_SOURCES} + ${LIBDATACHANNEL_HEADERS} + ${LIBDATACHANNEL_IMPL_SOURCES} +@@ -233,14 +220,16 @@ set_target_properties(datachannel-static PROPERTIES + target_include_directories(datachannel PUBLIC $) + target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/rtc) + target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) ++target_include_directories(datachannel PRIVATE ${PLOG_INCLUDE_DIRS}) + target_link_libraries(datachannel PUBLIC Threads::Threads) +-target_link_libraries(datachannel PRIVATE Usrsctp::Usrsctp plog::plog) ++target_link_libraries(datachannel PRIVATE ${USRSCTP_LIBRARY}) + + target_include_directories(datachannel-static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) + target_include_directories(datachannel-static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/rtc) + target_include_directories(datachannel-static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) ++target_include_directories(datachannel PRIVATE ${PLOG_INCLUDE_DIRS}) + target_link_libraries(datachannel-static PUBLIC Threads::Threads) +-target_link_libraries(datachannel-static PRIVATE Usrsctp::Usrsctp plog::plog) ++target_link_libraries(datachannel-static PRIVATE ${USRSCTP_LIBRARY}) + + if(WIN32) + target_link_libraries(datachannel PUBLIC ws2_32) # winsock2 +@@ -335,11 +324,11 @@ else() + target_link_libraries(datachannel PRIVATE LibJuice::LibJuice) + target_link_libraries(datachannel-static PRIVATE LibJuice::LibJuice) + else() +- add_subdirectory(deps/libjuice EXCLUDE_FROM_ALL) ++ find_package(libjuice CONFIG REQUIRED) + target_compile_definitions(datachannel PRIVATE RTC_SYSTEM_JUICE=0) + target_compile_definitions(datachannel-static PRIVATE RTC_SYSTEM_JUICE=0) +- target_link_libraries(datachannel PRIVATE LibJuice::LibJuiceStatic) +- target_link_libraries(datachannel-static PRIVATE LibJuice::LibJuiceStatic) ++ target_link_libraries(datachannel PRIVATE LibJuice::juice) ++ target_link_libraries(datachannel-static PRIVATE LibJuice::juice) + endif() + endif() + +-- +2.33.0.windows.1 + diff --git a/ports/libdatachannel/0002-fix-export-include.patch b/ports/libdatachannel/0002-fix-export-include.patch new file mode 100644 index 00000000000000..980f242b937b37 --- /dev/null +++ b/ports/libdatachannel/0002-fix-export-include.patch @@ -0,0 +1,66 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3c01184..0adff6f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -217,18 +217,22 @@ set_target_properties(datachannel-static PROPERTIES + VERSION ${PROJECT_VERSION} + CXX_STANDARD 17) + +-target_include_directories(datachannel PUBLIC $) ++target_include_directories(datachannel PUBLIC ++ $ ++ $) + target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/rtc) + target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) + target_include_directories(datachannel PRIVATE ${PLOG_INCLUDE_DIRS}) +-target_link_libraries(datachannel PUBLIC Threads::Threads) ++target_link_libraries(datachannel PRIVATE Threads::Threads) + target_link_libraries(datachannel PRIVATE ${USRSCTP_LIBRARY}) + +-target_include_directories(datachannel-static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) ++target_include_directories(datachannel-static PUBLIC ++ $ ++ $) + target_include_directories(datachannel-static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/rtc) + target_include_directories(datachannel-static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) + target_include_directories(datachannel PRIVATE ${PLOG_INCLUDE_DIRS}) +-target_link_libraries(datachannel-static PUBLIC Threads::Threads) ++target_link_libraries(datachannel-static PRIVATE Threads::Threads) + target_link_libraries(datachannel-static PRIVATE ${USRSCTP_LIBRARY}) + + if(WIN32) +diff --git a/examples/client-benchmark/CMakeLists.txt b/examples/client-benchmark/CMakeLists.txt +index ad0024c..a734db6 100644 +--- a/examples/client-benchmark/CMakeLists.txt ++++ b/examples/client-benchmark/CMakeLists.txt +@@ -3,6 +3,7 @@ if(POLICY CMP0079) + cmake_policy(SET CMP0079 NEW) + endif() + ++find_package(Threads) + if(WIN32) + add_executable(datachannel-client-benchmark main.cpp parse_cl.cpp parse_cl.h getopt.cpp getopt.h) + target_compile_definitions(datachannel-client-benchmark PUBLIC STATIC_GETOPT) +@@ -15,7 +16,7 @@ set_target_properties(datachannel-client-benchmark PROPERTIES + OUTPUT_NAME client-benchmark) + set_target_properties(datachannel-client-benchmark PROPERTIES + XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.github.paullouisageneau.libdatachannel.examples.client.benchmark) +-target_link_libraries(datachannel-client-benchmark datachannel nlohmann_json) ++target_link_libraries(datachannel-client-benchmark datachannel nlohmann_json Threads::Threads) + + if(WIN32) + add_custom_command(TARGET datachannel-client-benchmark POST_BUILD +diff --git a/examples/streamer/CMakeLists.txt b/examples/streamer/CMakeLists.txt +index cebec95..3e73160 100644 +--- a/examples/streamer/CMakeLists.txt ++++ b/examples/streamer/CMakeLists.txt +@@ -47,7 +47,8 @@ set_target_properties(streamer PROPERTIES + set_target_properties(streamer PROPERTIES + XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.github.paullouisageneau.libdatachannel.examples.streamer) + +-target_link_libraries(streamer datachannel nlohmann_json) ++find_package(Threads) ++target_link_libraries(streamer datachannel nlohmann_json Threads::Threads) + + if(WIN32) + add_custom_command(TARGET streamer POST_BUILD diff --git a/ports/libdatachannel/portfile.cmake b/ports/libdatachannel/portfile.cmake new file mode 100644 index 00000000000000..96033b72334efd --- /dev/null +++ b/ports/libdatachannel/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO paullouisageneau/libdatachannel + REF v0.14.3 + SHA512 21746d1a02aa8eb98a5c9716c12f14048a680f85efab8d8beca02379946bb49858c7ed02e7238f61e94d0aba6d70069136778d78484b88f8d09640c0740e24a3 + HEAD_REF master + PATCHES + 0001-fix-for-vcpkg.patch + 0002-fix-export-include.patch # Remove this patch in the next update +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + stdcall CAPI_STDCALL + INVERTED_FEATURES + ws NO_WEBSOCKET + srtp NO_MEDIA +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} + -DUSE_SYSTEM_SRTP=ON + -DNO_EXAMPLES=ON + -DNO_TESTS=ON +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/libdatachannel) +vcpkg_fixup_pkgconfig() + +file(READ "${CURRENT_PACKAGES_DIR}/share/${PORT}/libdatachannel-config.cmake" DATACHANNEL_CONFIG) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/libdatachannel-config.cmake" " +include(CMakeFindDependencyMacro) +find_dependency(Threads) +find_dependency(OpenSSL) +find_dependency(libjuice) +${DATACHANNEL_CONFIG}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libdatachannel/vcpkg.json b/ports/libdatachannel/vcpkg.json new file mode 100644 index 00000000000000..4c34b761847ed8 --- /dev/null +++ b/ports/libdatachannel/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "libdatachannel", + "version-semver": "0.14.3", + "port-version": 1, + "description": "libdatachannel is a standalone implementation of WebRTC Data Channels, WebRTC Media Transport, and WebSockets in C++17 with C bindings for POSIX platforms (including GNU/Linux, Android, and Apple macOS) and Microsoft Windows.", + "homepage": "https://github.com/paullouisageneau/libdatachannel", + "dependencies": [ + "libjuice", + "openssl", + "plog", + "usrsctp", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "ws" + ], + "features": { + "srtp": { + "description": "Use Cisco's libSRTP for media transport.", + "dependencies": [ + "libsrtp" + ] + }, + "stdcall": { + "description": "Use stdcall convention in callbacks" + }, + "ws": { + "description": "Web Socket support" + } + } +} diff --git a/ports/libdatrie/CONTROL b/ports/libdatrie/CONTROL deleted file mode 100644 index 587063ec5e6e56..00000000000000 --- a/ports/libdatrie/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libdatrie -Version: 0.2.10-2 -Homepage: https://linux.thai.net/pub/ThaiLinux/software/libthai -Description: implementation of double-array structure for representing trie -Build-Depends: libiconv diff --git a/ports/libdatrie/portfile.cmake b/ports/libdatrie/portfile.cmake index f7fefd24851746..452b66a174f692 100644 --- a/ports/libdatrie/portfile.cmake +++ b/ports/libdatrie/portfile.cmake @@ -1,18 +1,15 @@ set(LIBDATRIE_VERSION 0.2.10) -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libdatrie-${LIBDATRIE_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://linux.thai.net/pub/ThaiLinux/software/libthai/libdatrie-${LIBDATRIE_VERSION}.tar.xz" FILENAME "libdatrie-${LIBDATRIE_VERSION}.tar.xz" SHA512 ee68ded9d6e06c562da462d42e7e56098a82478d7b8547506200c3018b72536c4037a4e518924f779dc77d3ab139d93216bdb29ab4116b9dc9efd1a5d1eb9e31 ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-exports.patch" "${CMAKE_CURRENT_LIST_DIR}/fix-trietool.patch" ) diff --git a/ports/libdatrie/vcpkg.json b/ports/libdatrie/vcpkg.json new file mode 100644 index 00000000000000..b9f1f545705060 --- /dev/null +++ b/ports/libdatrie/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libdatrie", + "version-string": "0.2.10", + "port-version": 4, + "description": "implementation of double-array structure for representing trie", + "homepage": "https://linux.thai.net/pub/ThaiLinux/software/libthai", + "dependencies": [ + "libiconv" + ] +} diff --git a/ports/libde265/fix-libde265-headers.patch b/ports/libde265/fix-libde265-headers.patch new file mode 100644 index 00000000000000..fac2e35a862c2b --- /dev/null +++ b/ports/libde265/fix-libde265-headers.patch @@ -0,0 +1,21 @@ +diff --git a/libde265/CMakeLists.txt b/libde265/CMakeLists.txt +index 749c7fb..45e7419 100644 +--- a/libde265/CMakeLists.txt ++++ b/libde265/CMakeLists.txt +@@ -43,7 +43,7 @@ set (libde265_headers + bitstream.h + cabac.h + configparam.h +- de265-version.h ++ ${CMAKE_CURRENT_BINARY_DIR}/de265-version.h + contextmodel.h + de265.h + deblock.h +@@ -119,7 +119,6 @@ install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config + ) + + install(FILES ${libde265_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/de265-version.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) + + install(EXPORT ${PROJECT_NAME}Config DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") + diff --git a/ports/libde265/portfile.cmake b/ports/libde265/portfile.cmake new file mode 100644 index 00000000000000..40ae383c571a07 --- /dev/null +++ b/ports/libde265/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO strukturag/libde265 + REF 8aed7472df0af25b811828fa14f2f169dc34d35a # v1.0.8 + SHA512 e2da1436e5b0d8a3841087e879fbbff5a92de4ebb69d097959972ec8c9407305bc2a17020cb46139fbacc84f91ff8cfb4d9547308074ba213e002ee36bb2e006 + HEAD_REF master + PATCHES + fix-libde265-headers.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libde265/) +vcpkg_copy_tools(TOOL_NAMES dec265 enc265 AUTO_CLEAN) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libde265/vcpkg.json b/ports/libde265/vcpkg.json new file mode 100644 index 00000000000000..a239794f5f6ff6 --- /dev/null +++ b/ports/libde265/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libde265", + "version-string": "1.0.8", + "port-version": 1, + "description": "Open h.265 video codec implementation.", + "homepage": "https://www.libde265.org/", + "supports": "!(arm | uwp)" +} diff --git a/ports/libdisasm/CMakeLists.txt b/ports/libdisasm/CMakeLists.txt index 9d640a9b929145..c3a8dfa30e5494 100644 --- a/ports/libdisasm/CMakeLists.txt +++ b/ports/libdisasm/CMakeLists.txt @@ -4,32 +4,32 @@ project(libdisasm C) set(CMAKE_DEBUG_POSTFIX d) set(SRCS - ia32_implicit.c - ia32_implicit.h - ia32_insn.c - ia32_insn.h - ia32_invariant.c - ia32_invariant.h - ia32_modrm.c - ia32_modrm.h - ia32_opcode_tables.c - ia32_opcode_tables.h - ia32_operand.c - ia32_operand.h - ia32_reg.c - ia32_reg.h - ia32_settings.c - ia32_settings.h - libdis.h - qword.h - x86_disasm.c - x86_format.c - x86_imm.c - x86_imm.h - x86_insn.c - x86_misc.c - x86_operand_list.c - x86_operand_list.h + libdisasm/ia32_implicit.c + libdisasm/ia32_implicit.h + libdisasm/ia32_insn.c + libdisasm/ia32_insn.h + libdisasm/ia32_invariant.c + libdisasm/ia32_invariant.h + libdisasm/ia32_modrm.c + libdisasm/ia32_modrm.h + libdisasm/ia32_opcode_tables.c + libdisasm/ia32_opcode_tables.h + libdisasm/ia32_operand.c + libdisasm/ia32_operand.h + libdisasm/ia32_reg.c + libdisasm/ia32_reg.h + libdisasm/ia32_settings.c + libdisasm/ia32_settings.h + libdisasm/libdis.h + libdisasm/qword.h + libdisasm/x86_disasm.c + libdisasm/x86_format.c + libdisasm/x86_imm.c + libdisasm/x86_imm.h + libdisasm/x86_insn.c + libdisasm/x86_misc.c + libdisasm/x86_operand_list.c + libdisasm/x86_operand_list.h ) include_directories(libdisasm) @@ -44,5 +44,5 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(FILES libdis.h DESTINATION include) + install(FILES libdisasm/libdis.h DESTINATION include) endif() diff --git a/ports/libdisasm/CONTROL b/ports/libdisasm/CONTROL deleted file mode 100644 index dae49116db0423..00000000000000 --- a/ports/libdisasm/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libdisasm -Version: 0.23-2 -Homepage: https://sourceforge.net/projects/bastard -Description: x86 Disassembler Library. diff --git a/ports/libdisasm/portfile.cmake b/ports/libdisasm/portfile.cmake index e4bbaba54c3e6d..46ea1df735da75 100644 --- a/ports/libdisasm/portfile.cmake +++ b/ports/libdisasm/portfile.cmake @@ -1,25 +1,16 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(BASE_PATH ${CURRENT_BUILDTREES_DIR}/src/libdisasm-0.23) -set(SOURCE_PATH ${BASE_PATH}/libdisasm) - -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/bastard/files/libdisasm/0.23/libdisasm-0.23.tar.gz" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO bastard/libdisasm + REF 0.23 FILENAME "libdisasm-0.23.tar.gz" SHA512 29eecfbfd8168188242278a1a38f0c90770d0581a52d4600ae6343829dd0d6607b98329f12a3d7409d43dd56dca6a7d1eb25d58a001c2bfd3eb8474c0e7879e7 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/sizeofvoid.patch + PATCHES sizeofvoid.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -29,4 +20,4 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Handle copyright -file(INSTALL ${BASE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libdisasm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libdisasm/sizeofvoid.patch b/ports/libdisasm/sizeofvoid.patch index 428c5616c55c69..1e4e008fc48268 100644 --- a/ports/libdisasm/sizeofvoid.patch +++ b/ports/libdisasm/sizeofvoid.patch @@ -1,7 +1,5 @@ -diff --git a/x86_disasm.c b/x86_disasm.c -index 04574fa..177bfb8 100644 ---- a/x86_disasm.c -+++ b/x86_disasm.c +--- a/libdisasm/x86_disasm.c ++++ b/libdisasm/x86_disasm.c @@ -35,7 +35,7 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, if ( offset >= buf_len ) { diff --git a/ports/libdisasm/vcpkg.json b/ports/libdisasm/vcpkg.json new file mode 100644 index 00000000000000..ef5cb7b0672054 --- /dev/null +++ b/ports/libdisasm/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libdisasm", + "version-string": "0.23", + "port-version": 8, + "description": "x86 Disassembler Library.", + "homepage": "https://sourceforge.net/projects/bastard" +} diff --git a/ports/libdivide/portfile.cmake b/ports/libdivide/portfile.cmake new file mode 100644 index 00000000000000..32ea56b258d205 --- /dev/null +++ b/ports/libdivide/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ridiculousfish/libdivide + REF v4.0.0 + SHA512 662b8f479c3f822563d4f1c85c77c204f47e992391cd5ca3376d6e19e4d2132c28ad59b8e3179edd706fceeabf0d1bc7be5e713eeb669523952155a2d7770326 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test BUILD_TESTS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DLIBDIVIDE_SSE2=OFF + -DLIBDIVIDE_AVX2=OFF + -DLIBDIVIDE_AVX512=OFF + -DENABLE_VECTOR_EXTENSIONS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libdivide/vcpkg.json b/ports/libdivide/vcpkg.json new file mode 100644 index 00000000000000..5ae81457514ae0 --- /dev/null +++ b/ports/libdivide/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libdivide", + "version-string": "4.0.0", + "port-version": 1, + "description": "libdivide.h is a header-only C/C++ library for optimizing integer division.", + "homepage": "https://github.com/ridiculousfish/libdivide", + "features": { + "test": { + "description": "Build test" + } + } +} diff --git a/ports/libdjinterop/portfile.cmake b/ports/libdjinterop/portfile.cmake new file mode 100644 index 00000000000000..484238b84bf254 --- /dev/null +++ b/ports/libdjinterop/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xsco/libdjinterop + REF 0.14.6 + SHA512 3d05bc882ddc309a1b0d5e97572ede1aa826b662a19ffd8ee874c13ead668d1c3f14d59bf861ae3880588e1a9b94e4a92ccdbb5df71bfb7ffe28f57a1b123f18 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libdjinterop/vcpkg.json b/ports/libdjinterop/vcpkg.json new file mode 100644 index 00000000000000..533f90d86191b8 --- /dev/null +++ b/ports/libdjinterop/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libdjinterop", + "version-string": "0.14.6", + "description": "C++ library for access to DJ record libraries. Currently only supports Denon Engine Prime databases", + "homepage": "https://github.com/xsco/libdjinterop", + "license": "LGPL-3.0-or-later", + "dependencies": [ + "sqlite3", + "zlib" + ] +} diff --git a/ports/libdshowcapture/CONTROL b/ports/libdshowcapture/CONTROL deleted file mode 100644 index 3d88262c8f9794..00000000000000 --- a/ports/libdshowcapture/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libdshowcapture -Version: 0.6.0-1 -Description: Free and Open Source C++11 Library for capturing DirectShow video/audio devices on windows. diff --git a/ports/libdshowcapture/portfile.cmake b/ports/libdshowcapture/portfile.cmake index fa0e2d8a8f23c9..136be4d21a0bbb 100644 --- a/ports/libdshowcapture/portfile.cmake +++ b/ports/libdshowcapture/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO obsproject/libdshowcapture diff --git a/ports/libdshowcapture/vcpkg.json b/ports/libdshowcapture/vcpkg.json new file mode 100644 index 00000000000000..ca807e319aa055 --- /dev/null +++ b/ports/libdshowcapture/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libdshowcapture", + "version-string": "0.6.0", + "port-version": 2, + "description": "Free and Open Source C++11 Library for capturing DirectShow video/audio devices on windows." +} diff --git a/ports/libe57/0001_cmake.patch b/ports/libe57/0001_cmake.patch new file mode 100644 index 00000000000000..47001bbe466be9 --- /dev/null +++ b/ports/libe57/0001_cmake.patch @@ -0,0 +1,88 @@ +diff -Naur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2012-04-04 13:09:12.000000000 +0800 ++++ b/CMakeLists.txt 2021-06-16 01:14:35.669163100 +0800 +@@ -31,6 +31,8 @@ + set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/c_flag_overrides.cmake) + set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_flag_overrides.cmake) + ++set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++ + # Set a private module find path + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") + +@@ -81,17 +83,17 @@ + endif(NOT Boost_FOUND) + + set(Xerces_USE_STATIC_LIBS On) +-find_package(Xerces QUIET) +-if (NOT Xerces_FOUND) ++find_package(XercesC QUIET) ++if (NOT XercesC_FOUND) + set(XERCES_ROOT CACHE PATH "Location of the xerces library") + message(FATAL_ERROR + "Unable to find xerces library. + Please set the the XERCES_ROOT to point to the root of the xerces directory." + ) +-endif (NOT Xerces_FOUND) ++endif (NOT XercesC_FOUND) + +-set(XML_LIBRARIES ${Xerces_LIBRARY}) +-set(XML_INCLUDE_DIRS ${Xerces_INCLUDE_DIR}) ++set(XML_LIBRARIES ${XercesC_LIBRARY}) ++set(XML_INCLUDE_DIRS ${XercesC_INCLUDE_DIR}) + + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + add_definitions(-DLINUX) +@@ -187,12 +189,18 @@ + add_executable( las2e57 + src/tools/las2e57.cpp + ) ++ ++if (MSVC) ++ set(LAS2E57_EXTRA_LINK bcrypt) ++endif(MSVC) ++ + target_link_libraries( las2e57 + E57RefImpl + LASReader + time_conversion + ${XML_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ++ ${LAS2E57_EXTRA_LINK} + ) + add_executable( e57fields + src/tools/e57fields.cpp +@@ -270,15 +270,32 @@ + install( + FILES + include/E57Foundation.h ++ include/E57Simple.h ++ include/LASReader.h + DESTINATION include/e57 + ) ++install( ++ FILES ++ include/time_conversion/time_conversion.h ++ include/time_conversion/basictypes.h ++ include/time_conversion/constants.h ++ include/time_conversion/gnss_error.h ++ DESTINATION include/e57/time_conversion ++) + + install( + FILES + CHANGES.TXT + README.TXT + src/refimpl/E57RefImplConfig.cmake +- DESTINATION . ++ DESTINATION share/e57refimpl ++) ++ ++install( ++ FILES ++ README.TXT ++ RENAME copyright ++ DESTINATION share/libe57 + ) + + #include (InstallRequiredSystemLibraries) diff --git a/ports/libe57/0002_replace_tr1_with_cpp11.patch b/ports/libe57/0002_replace_tr1_with_cpp11.patch new file mode 100644 index 00000000000000..1b48de7c22a612 --- /dev/null +++ b/ports/libe57/0002_replace_tr1_with_cpp11.patch @@ -0,0 +1,96 @@ +diff -Naur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2021-06-16 22:53:02.033465000 +0800 ++++ b/CMakeLists.txt 2021-06-16 23:01:31.542323600 +0800 +@@ -25,7 +25,9 @@ + # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + # DEALINGS IN THE SOFTWARE. + +-cmake_minimum_required(VERSION 2.8.2) ++cmake_minimum_required(VERSION 3.1) ++ ++set(CMAKE_CXX_STANDARD 11) + + # Override flags to enable prepare for linking to static runtime + set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/c_flag_overrides.cmake) +diff -Naur a/src/tools/e57fields.cpp b/src/tools/e57fields.cpp +--- a/src/tools/e57fields.cpp 2012-04-04 17:19:01.000000000 +0800 ++++ b/src/tools/e57fields.cpp 2021-06-16 22:55:02.789463000 +0800 +@@ -30,11 +30,7 @@ + #include + #include + #include +-#if defined(_MSC_VER) +-# include +-#else +-# include +-#endif ++#include + #include "E57Foundation.h" + #include "E57FoundationImpl.h" //??? for exceptions, should be in separate file + +@@ -43,7 +39,6 @@ + + using namespace e57; + using namespace std; +-using namespace std::tr1; + + //!!! prologue, file name, date, version#, total # elements + //!!! doc +@@ -446,9 +441,9 @@ + /// Only one is used, depending on the type of the E57 element. + /// One of these three should be resized to BUFFER_ELEMENT_COUNT. + /// These are smart pointers to avoid the copying (and the moving) when put on the cvElements list. +- shared_ptr > iBuffer; +- shared_ptr > dBuffer; +- shared_ptr > sBuffer; ++ std::shared_ptr > iBuffer; ++ std::shared_ptr > dBuffer; ++ std::shared_ptr > sBuffer; + + /// The precalculated parts of the element path name. + /// The only part that is missing is the record number which goes in between. +diff -Naur a/src/tools/e57unpack.cpp b/src/tools/e57unpack.cpp +--- a/src/tools/e57unpack.cpp 2011-10-06 16:01:00.000000000 +0800 ++++ b/src/tools/e57unpack.cpp 2021-06-16 22:56:57.150323800 +0800 +@@ -41,12 +41,8 @@ + #include + using std::runtime_error; + +-#if defined(_MSC_VER) +-# include +-#else +-# include +-#endif +-using std::tr1::shared_ptr; ++#include ++using std::shared_ptr; + + #include + using std::string; +diff -Naur a/src/tools/e57validate.cpp b/src/tools/e57validate.cpp +--- a/src/tools/e57validate.cpp 2011-10-06 16:01:00.000000000 +0800 ++++ b/src/tools/e57validate.cpp 2021-06-16 22:58:19.365323700 +0800 +@@ -66,11 +66,8 @@ + + + ================================================================*/ +-#if defined(_MSC_VER) +-# include +-#else +-# include +-using std::tr1::unordered_map; ++ ++#include ++using std::unordered_map; +-#endif + #include + using std::strlen; +@@ -694,7 +692,7 @@ + void dump(int indent = 0, std::ostream& os = std::cout); + //================ + private: +- typedef std::tr1::unordered_map GroupsMap; ++ typedef std::unordered_map GroupsMap; + + bool isDefined_; + bool isByRow_; diff --git a/ports/libe57/0003_fix_osx_support.patch b/ports/libe57/0003_fix_osx_support.patch new file mode 100644 index 00000000000000..2b1f1da7fe054b --- /dev/null +++ b/ports/libe57/0003_fix_osx_support.patch @@ -0,0 +1,145 @@ +diff -x '.*' -Naur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2021-06-24 16:56:37.000000000 +0800 ++++ b/CMakeLists.txt 2021-06-24 17:30:28.000000000 +0800 +@@ -163,6 +163,13 @@ + include/time_conversion/gnss_error.h + ) + ++# fix dependency introduced by xerces ++if(APPLE) ++ find_library(CORE_FOUNDATION CoreFoundation REQUIRED) ++ find_library(CORE_SERVICES CoreServices REQUIRED) ++ set(EXTRA_LINK_FLAGS_OSX ${CORE_FOUNDATION} ${CORE_SERVICES}) ++endif() ++ + # + # Example programs + # +@@ -174,6 +181,7 @@ + E57RefImpl + ${XML_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ++ ${EXTRA_LINK_FLAGS_OSX} + ) + add_executable( DemoRead01 + src/examples/DemoRead01.cpp +@@ -182,6 +190,7 @@ + E57RefImpl + ${XML_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ++ ${EXTRA_LINK_FLAGS_OSX} + ) + + # +@@ -203,6 +212,7 @@ + ${XML_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ${LAS2E57_EXTRA_LINK} ++ ${EXTRA_LINK_FLAGS_OSX} + ) + add_executable( e57fields + src/tools/e57fields.cpp +@@ -211,6 +221,7 @@ + E57RefImpl + ${XML_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ++ ${EXTRA_LINK_FLAGS_OSX} + ) + add_executable( e57xmldump + src/tools/e57xmldump.cpp +@@ -219,6 +230,7 @@ + E57RefImpl + ${XML_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ++ ${EXTRA_LINK_FLAGS_OSX} + ) + add_executable( e57validate + src/tools/e57validate.cpp +@@ -227,6 +239,7 @@ + E57RefImpl + ${XML_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ++ ${EXTRA_LINK_FLAGS_OSX} + ) + add_executable( e57unpack + src/tools/e57unpack.cpp +@@ -236,6 +249,7 @@ + ${XML_LIBRARIES} + ${Boost_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ++ ${EXTRA_LINK_FLAGS_OSX} + ) + + # +diff -x '.*' -Naur a/src/refimpl/E57FoundationImpl.cpp b/src/refimpl/E57FoundationImpl.cpp +--- a/src/refimpl/E57FoundationImpl.cpp 2012-04-12 21:44:42.000000000 +0800 ++++ b/src/refimpl/E57FoundationImpl.cpp 2021-06-24 17:04:57.000000000 +0800 +@@ -57,6 +57,12 @@ + # include + # define O_BINARY (0) + # define _unlink unlink ++#elif defined( __APPLE__ ) ++# include ++# include ++# include ++# define O_BINARY (0) ++# define _unlink unlink + #else + # error "no supported OS platform defined" + #endif +@@ -4764,6 +4770,8 @@ + # endif + #elif defined(LINUX) + int64_t result = ::lseek64(fd_, offset, whence); ++#elif defined( __APPLE__ ) ++ int64_t result = ::lseek(fd_, offset, whence); + #else + # error "no supported OS platform defined" + #endif +diff -x '.*' -Naur a/src/refimpl/E57Simple.cpp b/src/refimpl/E57Simple.cpp +--- a/src/refimpl/E57Simple.cpp 2011-05-14 05:40:11.000000000 +0800 ++++ b/src/refimpl/E57Simple.cpp 2021-06-24 16:58:24.000000000 +0800 +@@ -799,6 +799,9 @@ + # define __LARGE64_FILES + # include + # include ++#elif defined( __APPLE__ ) ++# include ++# include + #else + # error "no supported OS platform defined" + #endif +diff -x '.*' -Naur a/src/refimpl/E57SimpleImpl.cpp b/src/refimpl/E57SimpleImpl.cpp +--- a/src/refimpl/E57SimpleImpl.cpp 2012-04-12 23:15:46.000000000 +0800 ++++ b/src/refimpl/E57SimpleImpl.cpp 2021-06-24 16:58:24.000000000 +0800 +@@ -74,6 +74,12 @@ + # include + # include + # include ++#elif defined(__APPLE__) ++# include ++# include ++# include ++# include ++# include + #else + # error "no supported OS platform defined" + #endif +diff -x '.*' -Naur a/src/tools/las2e57.cpp b/src/tools/las2e57.cpp +--- a/src/tools/las2e57.cpp 2012-04-04 19:09:11.000000000 +0800 ++++ b/src/tools/las2e57.cpp 2021-06-24 17:11:11.000000000 +0800 +@@ -404,12 +404,12 @@ + int64_t startIndex; + BoundingBox bbox; + +- GroupRecord(int64_t id); ++ GroupRecord(int64_t id = 0); + void addMember(double coords[3], int64_t recordIndex); + void dump(int indent = 0, std::ostream& os = std::cout); + }; + +-GroupRecord::GroupRecord(int64_t id_arg = 0) ++GroupRecord::GroupRecord(int64_t id_arg) + : id(id_arg), + count(0), + startIndex(0), diff --git a/ports/libe57/portfile.cmake b/ports/libe57/portfile.cmake new file mode 100644 index 00000000000000..1f7bfd9ea5c3f4 --- /dev/null +++ b/ports/libe57/portfile.cmake @@ -0,0 +1,32 @@ +set(VERSION 1.1.312) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/E57RefImpl_src-${VERSION}) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO e57-3d-imgfmt + FILENAME "E57RefImpl_src-${VERSION}.zip" + SHA512 c729cc3094131f115ddf9b8c24a9420c4ab9d16a4343acfefb42f997f4bf25247cd5563126271df2af95f103093b7f6b360dbade52c9e66ec39dd2f06e041eb7 + PATCHES + "0001_cmake.patch" + "0002_replace_tr1_with_cpp11.patch" + "0003_fix_osx_support.patch" +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/share/libe57) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() +vcpkg_copy_pdbs() + +vcpkg_copy_tools( + TOOL_NAMES e57fields e57unpack e57validate e57xmldump las2e57 + AUTO_CLEAN +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/libe57/vcpkg.json b/ports/libe57/vcpkg.json new file mode 100644 index 00000000000000..4f802910afd420 --- /dev/null +++ b/ports/libe57/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "libe57", + "version-semver": "1.1.312", + "description": "An open source implementation of the ASTM E2807 Standard Specification for 3D Imaging Data Exchange in the C++ language.", + "homepage": "http://www.libe57.org/", + "dependencies": [ + "boost-crc", + "boost-filesystem", + "boost-format", + "boost-program-options", + "boost-system", + "boost-thread", + "boost-uuid", + "boost-variant", + { + "name": "icu", + "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "xerces-c" + ] +} diff --git a/ports/libebur128/portfile.cmake b/ports/libebur128/portfile.cmake new file mode 100644 index 00000000000000..c1ea6a9b927642 --- /dev/null +++ b/ports/libebur128/portfile.cmake @@ -0,0 +1,20 @@ +if((VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") AND VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "${PORT} does not support Windows ARM") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jiixyj/libebur128 + REF v1.2.6 + SHA512 ab188c6d32cd14613119258313a8a3fb1167b55501c9f5b6d3ba738d674bc58f24ac3034c23d9730ed8dc3e95a23619bfb81719e4c79807a9a16c1a5b3423582 +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DENABLE_INTERNAL_QUEUE_H=ON +) +vcpkg_install_cmake() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libebur128/vcpkg.json b/ports/libebur128/vcpkg.json new file mode 100644 index 00000000000000..57cda28d3c3b7c --- /dev/null +++ b/ports/libebur128/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libebur128", + "version-string": "1.2.6", + "description": "A library implementing the EBU R128 audio loudness standard", + "homepage": "https://github.com/jiixyj/libebur128", + "license": "MIT", + "supports": "!(arm & windows)" +} diff --git a/ports/libepoxy/CONTROL b/ports/libepoxy/CONTROL deleted file mode 100644 index acab175c51639b..00000000000000 --- a/ports/libepoxy/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libepoxy -Version: 1.5.3 -Homepage: https://github.com/anholt/libepoxy -Description: Epoxy is a library for handling OpenGL function pointer management for you diff --git a/ports/libepoxy/portfile.cmake b/ports/libepoxy/portfile.cmake index d4fc00fbc45416..83a32bb74d8767 100644 --- a/ports/libepoxy/portfile.cmake +++ b/ports/libepoxy/portfile.cmake @@ -1,23 +1,40 @@ -include(vcpkg_common_functions) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +if(VCPKG_TARGET_IS_LINUX AND NOT EXISTS "/usr/share/doc/libgles2/copyright") + message(STATUS "libgles2-mesa-dev must be installed before libepoxy can build. Install it with \"apt-get install libgles2-mesa-dev\".") +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO anholt/libepoxy - REF 1.5.3 - SHA512 e831f4f918f08fd5f799501efc0e23b8d404478651634f5e7b35f8ebcc29d91abc447ab20da062dde5be75e18cb39ffea708688e6534f7ab257b949f9c53ddc8 - HEAD_REF master) + REF 1.5.5 + SHA512 9056840d887f06c6422f61e65ea02511ed37b866a234d49bf78dc5f2f46e8dd9f029405387da14dced639e6a5740b5c56ab6d88ca23ea3270fc6db6a570b0c45 + HEAD_REF master +) -vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH} +if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_OSX) + set(OPTIONS -Dglx=no -Degl=no -Dx11=false) +else() + set(OPTIONS -Dglx=yes -Degl=yes -Dx11=true) +endif() +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND OPTIONS -Dc_std=c99) +endif() + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} OPTIONS - -Denable-glx=no - -Denable-egl=no) + ${OPTIONS} + -Dtests=false +) vcpkg_install_meson() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/pkgconfig") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig") -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libepoxy) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libepoxy/COPYING ${CURRENT_PACKAGES_DIR}/share/libepoxy/copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libepoxy/vcpkg.json b/ports/libepoxy/vcpkg.json new file mode 100644 index 00000000000000..d5f7b4259c3013 --- /dev/null +++ b/ports/libepoxy/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libepoxy", + "version-semver": "1.5.5", + "port-version": 1, + "description": "Epoxy is a library for handling OpenGL function pointer management for you", + "homepage": "https://github.com/anholt/libepoxy", + "dependencies": [ + "tool-meson" + ] +} diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL deleted file mode 100644 index a05a77edd7190d..00000000000000 --- a/ports/libevent/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libevent -Version: 2.1.11 -Build-Depends: openssl -Homepage: https://github.com/libevent/libevent -Description: An event notification library diff --git a/ports/libevent/fix-LibeventConfig_cmake_in_path.patch b/ports/libevent/fix-LibeventConfig_cmake_in_path.patch new file mode 100644 index 00000000000000..819380bec36520 --- /dev/null +++ b/ports/libevent/fix-LibeventConfig_cmake_in_path.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/LibeventConfig.cmake.in b/cmake/LibeventConfig.cmake.in +index 7b808c3..9376a5a 100644 +--- a/cmake/LibeventConfig.cmake.in ++++ b/cmake/LibeventConfig.cmake.in +@@ -58,7 +58,7 @@ endif() + + # Get the path of the current file. + get_filename_component(LIBEVENT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +-get_filename_component(_INSTALL_PREFIX "${LIBEVENT_CMAKE_DIR}/../../.." ABSOLUTE) ++get_filename_component(_INSTALL_PREFIX "${LIBEVENT_CMAKE_DIR}/../.." ABSOLUTE) + + macro(message_if_needed _flag _msg) + if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) +@@ -131,7 +131,7 @@ if(CONFIG_FOR_INSTALL_TREE) + find_library(_event_lib + NAMES "event_${_comp}" + PATHS "${_INSTALL_PREFIX}/lib" +- NO_DEFAULT_PATH) ++ ) + if(_event_lib) + list(APPEND LIBEVENT_LIBRARIES "libevent::${_comp}") + set_case_insensitive_found(${_comp}) diff --git a/ports/libevent/fix-file_path.patch b/ports/libevent/fix-file_path.patch index 179700b7ed2c17..fb34080f8790d8 100644 --- a/ports/libevent/fix-file_path.patch +++ b/ports/libevent/fix-file_path.patch @@ -1,26 +1,22 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6e91c08..44b6e18 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1430,7 +1430,7 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigBuildTree.cmake.in - # Calculate the relative directory from the Cmake dir. - file(RELATIVE_PATH - REL_INCLUDE_DIR -- "${EVENT_INSTALL_CMAKE_DIR}" -+ "${CURRENT_PACKAGES_DIR}/${EVENT_INSTALL_CMAKE_DIR}" - "${CMAKE_INSTALL_PREFIX}/include") - - # Note the LIBEVENT_CMAKE_DIR is defined in LibeventConfig.cmake.in, diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake -index 9de4484..411ca9d 100644 +index 04f5837..95d9808 100644 --- a/cmake/AddEventLibrary.cmake +++ b/cmake/AddEventLibrary.cmake -@@ -113,7 +113,7 @@ macro(add_event_library LIB_NAME) - EXPORT LibeventTargets - LIBRARY DESTINATION "lib" COMPONENT lib - ARCHIVE DESTINATION "lib" COMPONENT lib -- RUNTIME DESTINATION "lib" COMPONENT lib -+ RUNTIME DESTINATION "bin" COMPONENT bin - PUBLIC_HEADER DESTINATION "include/event2" - COMPONENT dev - ) +@@ -42,7 +42,7 @@ macro(export_install_target TYPE LIB_NAME OUTER_INCLUDES) + install(TARGETS "${LIB_NAME}_${TYPE}" + LIBRARY DESTINATION "lib" COMPONENT lib + ARCHIVE DESTINATION "lib" COMPONENT lib +- RUNTIME DESTINATION "lib" COMPONENT lib ++ RUNTIME DESTINATION "bin" COMPONENT bin + COMPONENT dev + ) + else() +@@ -69,7 +69,7 @@ macro(export_install_target TYPE LIB_NAME OUTER_INCLUDES) + EXPORT LibeventTargets-${TYPE} + LIBRARY DESTINATION "lib" COMPONENT lib + ARCHIVE DESTINATION "lib" COMPONENT lib +- RUNTIME DESTINATION "lib" COMPONENT lib ++ RUNTIME DESTINATION "bin" COMPONENT bin + COMPONENT dev + ) + endif() diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index 91c915b92d16c4..d6b02bbf707e66 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -1,16 +1,19 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libevent/libevent - REF release-2.1.11-stable - SHA512 a34ca4ad4d55a989a4f485f929d0ed2438d070d0e12a19d90c2b12783a562419c64db6a2603b093d958a75246d14ffefc8730c69c90b1b2f48339bde947f0e02 + REF release-2.1.12-stable + SHA512 5d6c6f0072f69a68b190772d4c973ce8f33961912032cdc104ad0854c0950f9d7e28bc274ca9df23897937f0cd8e45d1f214543d80ec271c5a6678814a7f195e PATCHES fix-file_path.patch + fix-LibeventConfig_cmake_in_path.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + openssl EVENT__DISABLE_OPENSSL + thread EVENT__DISABLE_THREAD_SUPPORT ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -19,12 +22,18 @@ else() set(LIBEVENT_LIB_TYPE STATIC) endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(LIBEVENT_STATIC_RUNTIME ON) +else() + set(LIBEVENT_STATIC_RUNTIME OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent + OPTIONS ${FEATURE_OPTIONS} -DEVENT__LIBRARY_TYPE=${LIBEVENT_LIB_TYPE} + -DEVENT__MSVC_STATIC_RUNTIME=${LIBEVENT_STATIC_RUNTIME} -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_REGRESS=ON @@ -33,21 +42,29 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if (VCPKG_TARGET_IS_WINDOWS) - vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/libevent) -else () - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) -endif() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libevent/) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/event_rpcgen.py ${CURRENT_PACKAGES_DIR}/tools/libevent/event_rpcgen.py) 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() +set(_target_suffix) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(_target_suffix static) +else() + set(_target_suffix shared) +endif() +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-${_target_suffix}.cmake + "${CURRENT_PACKAGES_DIR}" + "${CURRENT_INSTALLED_DIR}" +) + vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libevent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libevent/copyright) +#Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libevent/vcpkg.json b/ports/libevent/vcpkg.json new file mode 100644 index 00000000000000..1ddfa7a44f5ec9 --- /dev/null +++ b/ports/libevent/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "libevent", + "version-string": "2.1.12", + "port-version": 2, + "description": "An event notification library", + "homepage": "https://github.com/libevent/libevent", + "supports": "!uwp", + "default-features": [ + "thread" + ], + "features": { + "openssl": { + "description": "Support for openssl", + "dependencies": [ + { + "name": "libevent", + "features": [ + "thread" + ] + }, + "openssl" + ] + }, + "thread": { + "description": "Support for thread" + } + } +} diff --git a/ports/libevhtp/portfile.cmake b/ports/libevhtp/portfile.cmake new file mode 100644 index 00000000000000..ddd97c10c6d4c2 --- /dev/null +++ b/ports/libevhtp/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux and Mac platform" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO criticalstack/libevhtp + REF e200bfa85bf253e9cfe1c1a9e705fccb176b9171 + SHA512 d77d6d12dcc2762c8311a04cd3d33c7dfde7b406dbbb544d683e6a3b8e5912ba37a196470bc5aca92b58bd9659fbb396e5a11234b98435534f535046d6dab6eb + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + openssl EVHTP_DISABLE_SSL + thread EVHTP_DISABLE_EVTHR + regex EVHTP_DISABLE_REGEX +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libevhtp/vcpkg.json b/ports/libevhtp/vcpkg.json new file mode 100644 index 00000000000000..5d95f7901669ff --- /dev/null +++ b/ports/libevhtp/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "libevhtp", + "version-string": "1.2.18", + "port-version": 1, + "description": "Libevhtp was created as a replacement API for Libevent's current HTTP API.", + "homepage": "https://github.com/criticalstack/libevhtp", + "dependencies": [ + "libevent" + ], + "features": { + "openssl": { + "description": "Support SSL for libevhtp", + "dependencies": [ + "openssl" + ] + }, + "regex": { + "description": "Support oniguruma for libevhtp", + "dependencies": [ + "oniguruma" + ] + }, + "thread": { + "description": "Support thread for libevhtp" + } + } +} diff --git a/ports/libexif/CONTROL b/ports/libexif/CONTROL deleted file mode 100644 index e37d0960e31251..00000000000000 --- a/ports/libexif/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libexif -Version: 0.6.21-2 -Homepage: https://libexif.github.io/ -Description: a library for parsing, editing, and saving EXIF data diff --git a/ports/libexif/portfile.cmake b/ports/libexif/portfile.cmake index 11f7080d1e88f9..4869c40b5099fc 100644 --- a/ports/libexif/portfile.cmake +++ b/ports/libexif/portfile.cmake @@ -1,14 +1,10 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "libexif currently only supports being built for desktop") -endif() +vcpkg_fail_port_install(ON_TARGET uwp) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libexif/libexif - REF libexif-0_6_21-release - SHA512 aecba54eb9c8b4ce29d11985a547074b381d72027b563c7aef865852b661a6f18a258c748fca6b16198344f4a86568b658071ac95cc1d332f576c6160e1f257d + REF libexif-0_6_22-release + SHA512 6c63abe2734c9e83fb04adb00bdd77f687165007c0efd0279df26c101363b990604050c430c7dd73dfa8735dd2fd196334d321bdb114d4869998f21e7bed5b43 HEAD_REF master PATCHES add-missing-_stdint-h.patch ) @@ -27,4 +23,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libexif RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libexif/vcpkg.json b/ports/libexif/vcpkg.json new file mode 100644 index 00000000000000..d27752d4b700dd --- /dev/null +++ b/ports/libexif/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libexif", + "version-string": "0.6.22", + "port-version": 1, + "description": "a library for parsing, editing, and saving EXIF data", + "homepage": "https://libexif.github.io/", + "supports": "!uwp" +} diff --git a/ports/libfabric/CONTROL b/ports/libfabric/CONTROL deleted file mode 100644 index 9666bc2288b453..00000000000000 --- a/ports/libfabric/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libfabric -Version: 1.7.1-1 -Description: The OpenFabrics Interfaces Working Group (OFIWG) and the Libfabric open-source community are pleased to announce the release of version v1.6.2 of libfabric. See NEWS.md for the list of features and enhancements that have been added since the last release. -Homepage: https://github.com/ofiwg/libfabric -Build-Depends: networkdirect-sdk (windows) diff --git a/ports/libfabric/add_additional_includes.patch b/ports/libfabric/add_additional_includes.patch index da3d3254c52c2e..80c49d44d93a01 100644 --- a/ports/libfabric/add_additional_includes.patch +++ b/ports/libfabric/add_additional_includes.patch @@ -1,58 +1,58 @@ -diff --git a/libfabric.vcxproj b/libfabric.vcxproj -index 43a05e7..ceb596f 100644 ---- a/libfabric.vcxproj -+++ b/libfabric.vcxproj -@@ -125,7 +125,7 @@ - Disabled - WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) - true -- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include -+ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); - CompileAsC - 4127;4200;4204;4221;4115;4201;4100 - true -@@ -148,7 +148,7 @@ - Disabled - WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) - true -- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; -+ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); - CompileAsC - 4127;4200;4204;4221;4115;4201;4100 - true -@@ -171,7 +171,7 @@ - Disabled - WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) - true -- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include -+ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); - CompileAsC - 4127;4200;94;4204;4221;869 - true -@@ -195,7 +195,7 @@ - true - WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) - true -- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include -+ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); - 4127;4200;4204;4221;4115;4201;4100 - true - false -@@ -220,7 +220,7 @@ - true - WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) - true -- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; -+ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); - 4127;4200;4204;4221;4115;4201;4100 - true - false -@@ -245,7 +245,7 @@ - true - WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) - true -- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; -+ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); - 4127;4200;94;4204;4221;869 - true - false +diff --git a/libfabric.vcxproj b/libfabric.vcxproj +index c1e1792..3acbc81 100644 +--- a/libfabric.vcxproj ++++ b/libfabric.vcxproj +@@ -187,7 +187,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + CompileAsC + 4127;4200;4204;4221;4115;4201;4100 + true +@@ -215,7 +215,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + CompileAsC + 4127;4200;94;4204;4221;869 + true +@@ -239,7 +239,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + 4127;4200;4204;4221;4115;4201;4100 + true + false +@@ -265,7 +265,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + 4127;4200;4204;4221;4115;4201;4100 + true + false +@@ -285,7 +285,7 @@ + true + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + 4127;4200;4204;4221;4115;4201;4100 + true + true +@@ -307,7 +307,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + 4127;4200;94;4204;4221;869 + true + false diff --git a/ports/libfabric/portfile.cmake b/ports/libfabric/portfile.cmake index f7dc21226aa7bb..b965173d456eaf 100644 --- a/ports/libfabric/portfile.cmake +++ b/ports/libfabric/portfile.cmake @@ -1,26 +1,19 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP" ON_ARCH "x86") -if (VCPKG_CMAKE_SYSTEM_NAME) - # The library supports Linux/Darwin/BSD, it is just not yet added here - message(FATAL_ERROR "vcpkg libfabric currently suports windows. Please consider a pull request to add additional support!") -endif() +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ofiwg/libfabric - REF v1.7.1 + REF 9682913a72c982b4a872b6b18cf2889e158a029b # v1.13.1 HEAD_REF master - SHA512 3ae06839295a5b581a5d9936ee991bb597672a4981cc7fa385f4db7645d5328156d758848827ec186c0056cf3abd97f8f3859ec16a8b5bbd0d1f979143ee7bb1 + SHA512 a484126d5f2b6ada1a081af4ae4b60ca00da84814f485cd39746f2ab82948dc68fac5fb47cda39510996e61765d3cf07c409f7a8646f33922d2486b6fb7ee2ab PATCHES - add_additional_includes.patch + add_additional_includes.patch ) -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - message(FATAL_ERROR "VCPKG BUILD ERROR: libfabric only supports x64") -endif() - -set(LIBFABRIC_RELEASE_CONFIGURATION "Release-v141") -set(LIBFABRIC_DEBUG_CONFIGURATION "Debug-v141") +set(LIBFABRIC_RELEASE_CONFIGURATION "Release-v142") +set(LIBFABRIC_DEBUG_CONFIGURATION "Debug-v142") vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} @@ -38,9 +31,8 @@ vcpkg_install_msbuild( ) #Move includes under subdirectory to avoid colisions with other libraries -file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/includetemp) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/includetemp ${CURRENT_PACKAGES_DIR}/include/libfabric) +file(RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/includetemp") +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include") +file(RENAME "${CURRENT_PACKAGES_DIR}/includetemp" "${CURRENT_PACKAGES_DIR}/include/libfabric") -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libfabric RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libfabric/vcpkg.json b/ports/libfabric/vcpkg.json new file mode 100644 index 00000000000000..0a3eb02494c2a1 --- /dev/null +++ b/ports/libfabric/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libfabric", + "version-semver": "1.13.1", + "description": "The OpenFabrics Interfaces Working Group (OFIWG) and the Libfabric open-source community are pleased to announce the release of version v1.6.2 of libfabric. See NEWS.md for the list of features and enhancements that have been added since the last release.", + "homepage": "https://github.com/ofiwg/libfabric", + "supports": "windows & x64 & !static", + "dependencies": [ + { + "name": "networkdirect-sdk", + "platform": "windows" + } + ] +} diff --git a/ports/libffi/CMakeLists.txt b/ports/libffi/CMakeLists.txt index 29e14bdac05cec..f69edfc899a361 100644 --- a/ports/libffi/CMakeLists.txt +++ b/ports/libffi/CMakeLists.txt @@ -9,23 +9,31 @@ if(NOT CMAKE_SYSTEM_PROCESSOR) endif() # config variables for ffi.h.in -set(VERSION 3.1) +set(VERSION 3.4.2) -set(KNOWN_PROCESSORS x86 x86_64 AMD64 ARM ARM64 i386) +set(KNOWN_PROCESSORS x86 x86_64 amd64 arm arm64 i386 i686 armv7l armv7-a aarch64) -if(NOT CMAKE_SYSTEM_PROCESSOR IN_LIST KNOWN_PROCESSORS) +string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" lower_system_processor) + +if(NOT lower_system_processor IN_LIST KNOWN_PROCESSORS) message(FATAL_ERROR "Unknown processor: ${CMAKE_SYSTEM_PROCESSOR}") endif() -if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM") +if(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(TARGET ARM_WIN32) +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(TARGET ARM_WIN64) +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(TARGET X86_WIN32) +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(TARGET X86_WIN64) +elseif(lower_system_processor MATCHES "arm64|aarch64") + set(TARGET ARM64) +elseif(lower_system_processor MATCHES "arm") set(TARGET ARM) elseif(CMAKE_SYSTEM_NAME MATCHES "BSD" AND CMAKE_SIZEOF_VOID_P EQUAL 4) set(TARGET X86_FREEBSD) -elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 4) - set(TARGET X86_WIN32) -elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 8) - set(TARGET X86_WIN64) -elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") +elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 4) set(TARGET X86_DARWIN) elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) set(TARGET X86_64) @@ -35,81 +43,152 @@ else() message(FATAL_ERROR "Cannot determine target. Please consult ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac and add your platform to this CMake file.") endif() -set(HAVE_LONG_DOUBLE 0) -set(HAVE_LONG_DOUBLE_VARIANT 0) +if("${TARGET}" STREQUAL "X86_64") + set(HAVE_LONG_DOUBLE 1) +else() + set(HAVE_LONG_DOUBLE 0) +endif() set(FFI_EXEC_TRAMPOLINE_TABLE 0) # mimic layout of original buildsystem configure_file(include/ffi.h.in ${CMAKE_BINARY_DIR}/include/ffi.h) file(COPY ${FFI_CONFIG_FILE} DESTINATION ${CMAKE_BINARY_DIR}) -file(COPY src/x86/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include) + +if ("${TARGET}" STREQUAL "ARM_WIN64" OR "${TARGET}" STREQUAL "ARM64") + file(COPY src/aarch64/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include) +elseif ("${TARGET}" STREQUAL "ARM_WIN32" OR "${TARGET}" STREQUAL "ARM") + file(COPY src/arm/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include) +else() + file(COPY src/x86/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include) +endif() include_directories(${CMAKE_BINARY_DIR}/include) include_directories(${CMAKE_BINARY_DIR}) include_directories(include) -add_definitions(-DHAVE_CONFIG_H) add_definitions(-DFFI_BUILDING) +if(BUILD_SHARED_LIBS AND WIN32) + add_definitions(-DFFI_BUILDING_DLL) +endif() set(FFI_SOURCES - src/x86/ffi.c src/closures.c - src/java_raw_api.c src/prep_cif.c - src/raw_api.c - src/types.c) + src/types.c + src/tramp.c) + +if ("${TARGET}" STREQUAL "ARM_WIN64" OR "${TARGET}" STREQUAL "ARM64") + set(FFI_SOURCES + ${FFI_SOURCES} + src/aarch64/ffi.c) +elseif("${TARGET}" STREQUAL "ARM_WIN32" OR "${TARGET}" STREQUAL "ARM") + set(FFI_SOURCES + ${FFI_SOURCES} + src/arm/ffi.c) +else() + set(FFI_SOURCES + ${FFI_SOURCES} + src/java_raw_api.c + src/raw_api.c) + if("${TARGET}" STREQUAL "X86_WIN32" OR "${TARGET}" STREQUAL "X86_DARWIN" OR "${TARGET}" STREQUAL "X86") + set(FFI_SOURCES + ${FFI_SOURCES} + src/x86/ffi.c) + elseif("${TARGET}" STREQUAL "X86_WIN64") + set(FFI_SOURCES + ${FFI_SOURCES} + src/x86/ffiw64.c) + elseif("${TARGET}" STREQUAL "X86_64") + set(FFI_SOURCES + ${FFI_SOURCES} + src/x86/ffi64.c + src/x86/ffiw64.c) + endif() +endif() macro(add_assembly ASMFILE) get_filename_component(ASMFILE_FULL "${ASMFILE}" ABSOLUTE) if(MSVC) - if(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(ARCH_ASSEMBLER ml /safeseh) + if ("${TARGET}" STREQUAL "ARM_WIN64") + set(ARCH_ASSEMBLER armasm64) + elseif ("${TARGET}" STREQUAL "ARM_WIN32") + set(ARCH_ASSEMBLER armasm) + elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(ARCH_ASSEMBLER ml /safeseh /c /Zi) else() - set(ARCH_ASSEMBLER ml64) + set(ARCH_ASSEMBLER ml64 /c /Zi) endif() get_filename_component(ARCH_ASM_NAME "${ASMFILE_FULL}" NAME_WE) execute_process( - COMMAND ${CMAKE_C_COMPILER} /nologo /EP /I. /Iinclude ${ASMFILE_FULL} + COMMAND ${CMAKE_C_COMPILER} /nologo /EP /I. /Iinclude /I${CMAKE_CURRENT_SOURCE_DIR}/include "${ASMFILE_FULL}" WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE ${ARCH_ASM_NAME}.asm + RESULT_VARIABLE retcode ) + if(NOT ${retcode} STREQUAL "0") + message(FATAL_ERROR "Unable to assemble, exit code: '${retcode}'.") + endif() + # Produced *.asm file could be just added to sources. # It works in x64 mode, but for some strange reason MASM returns error code when in x86, # (even though it didn't report any errors and correctly generated object file) # which in turn causes MSBUILD to stop. execute_process( - COMMAND ${ARCH_ASSEMBLER} /c /Zi ${ARCH_ASM_NAME}.asm + COMMAND ${ARCH_ASSEMBLER} ${ARCH_ASM_NAME}.asm WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE retcode ) + if(NOT ${retcode} STREQUAL "0") + message(FATAL_ERROR "Unable to compile assembly, exit code: '${retcode}'.") + endif() + list(APPEND FFI_SOURCES ${CMAKE_BINARY_DIR}/${ARCH_ASM_NAME}.obj) else() list(APPEND FFI_SOURCES ${ASMFILE}) endif() endmacro() -if(${TARGET} STREQUAL "X86") +if("${TARGET}" STREQUAL "X86") set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -m32") endif() -if(${TARGET} STREQUAL "X86") +if("${TARGET}" STREQUAL "X86" OR "${TARGET}" STREQUAL "X86_DARWIN") add_assembly(src/x86/sysv.S) - add_assembly(src/x86/win32.S) -elseif(${TARGET} STREQUAL "X86_64") - list(APPEND FFI_SOURCES src/x86/ffi64.c) +elseif("${TARGET}" STREQUAL "X86_64") add_assembly(src/x86/unix64.S) - add_assembly(src/x86/sysv.S) -elseif(${TARGET} STREQUAL "X86_WIN32") - add_assembly(src/x86/win32.S) -elseif(${TARGET} STREQUAL "X86_WIN64") add_assembly(src/x86/win64.S) -elseif(${TARGET} STREQUAL "X86_DARWIN") - list(APPEND FFI_SOURCES src/x86/ffi64.c) - add_assembly(src/x86/darwin.S) - add_assembly(src/x86/darwin64.S) +elseif("${TARGET}" STREQUAL "X86_WIN32") + if(MSVC) + add_assembly(src/x86/sysv_intel.S) + else() + add_assembly(src/x86/sysv.S) + endif() +elseif("${TARGET}" STREQUAL "X86_WIN64") + if(MSVC) + add_assembly(src/x86/win64_intel.S) + else() + add_assembly(src/x86/win64.S) + endif() +elseif("${TARGET}" STREQUAL "ARM_WIN32") + if(MSVC) + add_assembly(src/arm/sysv_msvc_arm32.S) + else() + add_assembly(src/arm/sysv.S) + endif() +elseif("${TARGET}" STREQUAL "ARM") + add_assembly(src/arm/sysv.S) +elseif("${TARGET}" STREQUAL "ARM_WIN64") + if(MSVC) + add_assembly(src/aarch64/win64_armasm.S) + else() + add_assembly(src/aarch64/sysv.S) + endif() +elseif("${TARGET}" STREQUAL "ARM64") + add_assembly(src/aarch64/sysv.S) else() message(FATAL_ERROR "Target not implemented") endif() @@ -122,10 +201,26 @@ endif() add_library(libffi ${FFI_SOURCES}) install(TARGETS libffi + EXPORT ${PROJECT_NAME}Targets RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +include(CMakePackageConfigHelpers) + +configure_package_config_file(${PROJECT_NAME}Config.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" + INSTALL_DESTINATION share/${PROJECT_NAME}) +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake + VERSION ${VERSION} + COMPATIBILITY AnyNewerVersion) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" + DESTINATION share/${PROJECT_NAME}) +install(EXPORT ${PROJECT_NAME}Targets + DESTINATION share/${PROJECT_NAME}) + if(NOT FFI_SKIP_HEADERS) install(FILES ${CMAKE_BINARY_DIR}/include/ffi.h diff --git a/ports/libffi/CONTROL b/ports/libffi/CONTROL deleted file mode 100644 index b393491e1173d2..00000000000000 --- a/ports/libffi/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libffi -Version: 3.1-5 -Homepage: https://github.com/libffi/libffi -Description: Portable, high level programming interface to various calling conventions diff --git a/ports/libffi/auto-define-static-macro.patch b/ports/libffi/auto-define-static-macro.patch deleted file mode 100644 index 468a2fc36b36bc..00000000000000 --- a/ports/libffi/auto-define-static-macro.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/ffi.h b/ffi.h -index 8d5eac2..0b0c2f6 100644 ---- a/ffi.h -+++ b/ffi.h -@@ -174,6 +174,9 @@ typedef struct _ffi_type - /* of the library, but don't worry about that. Besides, */ - /* as a workaround, they can define FFI_BUILDING if they */ - /* *know* they are going to link with the static library. */ -+ -+#define FFI_BUILDING -+ - #if defined _MSC_VER && !defined FFI_BUILDING - #define FFI_EXTERN extern __declspec(dllimport) - #else diff --git a/ports/libffi/export-global-data.patch b/ports/libffi/export-global-data.patch deleted file mode 100644 index 9d965f6477e3c1..00000000000000 --- a/ports/libffi/export-global-data.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/src/types.c b/src/types.c -index 0de5994..46c8d18 100644 ---- a/src/types.c -+++ b/src/types.c -@@ -31,6 +31,12 @@ - #include - #include - -+#ifdef FFI_EXPORT_DATA -+#define FFI_EXPORT __declspec(dllexport) -+#else -+#define FFI_EXPORT -+#endif -+ - /* Type definitions */ - - #define FFI_TYPEDEF(name, type, id) \ -@@ -38,7 +44,7 @@ struct struct_align_##name { \ - char c; \ - type x; \ - }; \ --const ffi_type ffi_type_##name = { \ -+FFI_EXPORT const ffi_type ffi_type_##name = { \ - sizeof(type), \ - offsetof(struct struct_align_##name, x), \ - id, NULL \ -@@ -56,7 +62,7 @@ ffi_type ffi_type_##name = { \ - } - - /* Size and alignment are fake here. They must not be 0. */ --const ffi_type ffi_type_void = { -+FFI_EXPORT const ffi_type ffi_type_void = { - 1, 1, FFI_TYPE_VOID, NULL - }; - diff --git a/ports/libffi/fficonfig.h b/ports/libffi/fficonfig.h index 044b791c1d8e02..fc00af94a91737 100644 --- a/ports/libffi/fficonfig.h +++ b/ports/libffi/fficonfig.h @@ -23,12 +23,12 @@ #define HAVE_SYS_TYPES_H 1 #define LT_OBJDIR ".libs/" #define PACKAGE "libffi" -#define PACKAGE_BUGREPORT "http://github.com/atgreen/libffi/issues" +#define PACKAGE_BUGREPORT "http://github.com/libffi/libffi/issues" #define PACKAGE_NAME "libffi" -#define PACKAGE_STRING "libffi 3.1" +#define PACKAGE_STRING "libffi 3.4.2" #define PACKAGE_TARNAME "libffi" #define PACKAGE_URL "" -#define PACKAGE_VERSION "3.1" +#define PACKAGE_VERSION "3.4.2" #define SIZEOF_DOUBLE 8 #define SIZEOF_LONG_DOUBLE 8 #ifndef _WIN64 @@ -42,7 +42,7 @@ #define SYMBOL_UNDERSCORE 1 #endif #endif -#define VERSION "3.1" +#define VERSION "3.4.2" #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 diff --git a/ports/libffi/libffiConfig.cmake.in b/ports/libffi/libffiConfig.cmake.in new file mode 100644 index 00000000000000..ebdf1488acdd0a --- /dev/null +++ b/ports/libffi/libffiConfig.cmake.in @@ -0,0 +1,7 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +if(NOT TARGET libffi) + include("${CMAKE_CURRENT_LIST_DIR}/libffiTargets.cmake") +endif() diff --git a/ports/libffi/portfile.cmake b/ports/libffi/portfile.cmake index bbb4daf83992db..ba5d4d88cef156 100644 --- a/ports/libffi/portfile.cmake +++ b/ports/libffi/portfile.cmake @@ -1,25 +1,18 @@ -include(vcpkg_common_functions) - -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x86 AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - message(FATAL_ERROR "Architecture not supported") -endif() - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +set(VERSION 3.4.2) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libffi/libffi - REF v3.1 - SHA512 b214e4a876995f44e0a93bad5bf1b3501ea1fbedafbf33ea600007bd08c9bc965a1f0dd90ea870281c3add6c051febd19aa6cdce36f3ee8ba535ba2c0703153c + REF v${VERSION} + SHA512 d399319efcca375fe901b05722e25eca31d11a4261c6a5d5079480bbc552d4e4b42de2026912689d3b2f886ebb3c8bebbea47102e38a2f6acbc526b8d5bba388 HEAD_REF master - PATCHES - export-global-data.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/libffiConfig.cmake.in" DESTINATION "${SOURCE_PATH}") vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA OPTIONS -DFFI_CONFIG_FILE=${CMAKE_CURRENT_LIST_DIR}/fficonfig.h @@ -28,15 +21,45 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() + +# Create pkgconfig file +set(PACKAGE_VERSION ${VERSION}) +set(prefix "${CURRENT_INSTALLED_DIR}") +set(exec_prefix "\${prefix}") +set(libdir "\${prefix}/lib") +set(toolexeclibdir "\${libdir}") +set(includedir "\${prefix}/include") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + configure_file("${SOURCE_PATH}/libffi.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libffi.pc" @ONLY) +endif() +# debug +set(prefix "${CURRENT_INSTALLED_DIR}/debug") +set(exec_prefix "\${prefix}") +set(libdir "\${prefix}/lib") +set(toolexeclibdir "\${libdir}") +set(includedir "\${prefix}/../include") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + configure_file("${SOURCE_PATH}/libffi.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libffi.pc" @ONLY) +endif() + vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libffi.pc" + "-lffi" "-llibffi") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libffi.pc" + "-lffi" "-llibffi") +endif() +vcpkg_fixup_pkgconfig() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ffi.h" + " *know* they are going to link with the static library. */" + " *know* they are going to link with the static library. */ -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/auto-define-static-macro.patch +#define FFI_BUILDING +" ) endif() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libffi) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libffi/LICENSE ${CURRENT_PACKAGES_DIR}/share/libffi/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libffi/vcpkg.json b/ports/libffi/vcpkg.json new file mode 100644 index 00000000000000..80481cdb7ab012 --- /dev/null +++ b/ports/libffi/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libffi", + "version": "3.4.2", + "port-version": 1, + "description": "Portable, high level programming interface to various calling conventions", + "homepage": "https://github.com/libffi/libffi" +} diff --git a/ports/libfido2/fix_cmakelists.patch b/ports/libfido2/fix_cmakelists.patch new file mode 100644 index 00000000000000..d5c363706e49e7 --- /dev/null +++ b/ports/libfido2/fix_cmakelists.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1eb8726..b308597 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -161,16 +161,20 @@ if(UNIX) + endif() + + if(MSVC) +- if((NOT CBOR_INCLUDE_DIRS) OR (NOT CBOR_LIBRARY_DIRS) OR +- (NOT CRYPTO_INCLUDE_DIRS) OR (NOT CRYPTO_LIBRARY_DIRS) OR +- (NOT ZLIB_INCLUDE_DIRS) OR (NOT ZLIB_LIBRARY_DIRS)) +- message(FATAL_ERROR "please provide definitions for " +- "{CBOR,CRYPTO,ZLIB}_{INCLUDE,LIBRARY}_DIRS when building " +- "under msvc") +- endif() +- set(CBOR_LIBRARIES cbor) +- set(ZLIB_LIBRARIES zlib) +- set(CRYPTO_LIBRARIES crypto-46) ++ include(FindPkgConfig) ++ ++ find_package(LIBCBOR REQUIRED) ++ find_package(OpenSSL REQUIRED) ++ find_package(ZLIB REQUIRED) ++ ++ # Handling of different Packagenames in VCPKG ++ set(CBOR_INCLUDE_DIRS ${LIBCBOR_INCLUDE_DIR}) ++ set(CRYPTO_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIRS}) ++ set(CBOR_LIBRARY_DIRS ${LIBCBOR_LIBRARY_DIRS}) ++ set(CRYPTO_LIBRARY_DIRS ${OPENSSL_LIBRARY_DIRS}) ++ set(CBOR_LIBRARIES ${LIBCBOR_LIBRARIES}) ++ set(CRYPTO_LIBRARIES ${OPENSSL_LIBRARIES}) ++ add_definitions("-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_NONSTDC_NO_DEPRECATE") + set(MSVC_DISABLED_WARNINGS_LIST + "C4200" # nonstandard extension used: zero-sized array in + # struct/union; +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 11b0bb5..d820ff3 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -120,7 +120,7 @@ if(BUILD_SHARED_LIBS) + install(TARGETS fido2_shared + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + + install(FILES fido.h DESTINATION include) diff --git a/ports/libfido2/portfile.cmake b/ports/libfido2/portfile.cmake new file mode 100644 index 00000000000000..9cc2b4cd219f05 --- /dev/null +++ b/ports/libfido2/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Yubico/libfido2 + REF 1.7.0 + SHA512 f40d394883d909e9e3ea3308b32f7ca31a882c709e11b3b143ed5734d16b0c244d4932effe06965d566776b03d152b1fc280e73cdfeeb81b65d8414042af19fe + HEAD_REF master + PATCHES + "fix_cmakelists.patch" +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LIBFIDO2_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBFIDO2_BUILD_SHARED) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_MANPAGES=OFF + -DBUILD_STATIC_LIBS=${LIBFIDO2_BUILD_STATIC} + -DBUILD_SHARED_LIBS=${LIBFIDO2_BUILD_SHARED} + -DBUILD_TOOLS=OFF + ) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/libfido2/vcpkg.json b/ports/libfido2/vcpkg.json new file mode 100644 index 00000000000000..5604af16f44db9 --- /dev/null +++ b/ports/libfido2/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "libfido2", + "version": "1.7.0", + "description": "Provides library functionality to communicate with a FIDO device over USB, and to verify attestation and assertion signatures.", + "homepage": "https://developers.yubico.com/libfido2/", + "supports": "!uwp & (x86 | x64) & windows", + "dependencies": [ + "libcbor", + "openssl", + { + "name": "vcpkg-cmake", + "host": true + }, + "zlib" + ] +} diff --git a/ports/libflac/CMakeLists.txt b/ports/libflac/CMakeLists.txt deleted file mode 100644 index d6f01399a34aab..00000000000000 --- a/ports/libflac/CMakeLists.txt +++ /dev/null @@ -1,90 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -cmake_policy(SET CMP0005 NEW) # do not escape preprocessor defines - -project(libflac) - -if(NOT DEFINED LIBFLAC_ARCHITECTURE) - message(FATAL_ERROR "Target architecture not specified") -endif() - -file(GLOB LIBFLAC_SOURCES src/libFLAC/*.c) - -if(WIN32) - list(APPEND LIBFLAC_SOURCES src/share/win_utf8_io/win_utf8_io.c) -else() - list(FILTER LIBFLAC_SOURCES EXCLUDE REGEX "windows[^/]*$") - - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h "#include ") - include_directories(${CMAKE_CURRENT_BINARY_DIR}) - add_definitions(-DHAVE_CONFIG_H) -endif() - -file(GLOB LIBFLACXX_SOURCES src/libFLAC++/*.cpp) - -include_directories(include) -include_directories(src/libFLAC/include) - -if(NOT LIBFLAC_ARCHITECTURE MATCHES arm) - add_definitions(-DFLAC__SSE_OS) - add_definitions(-DFLAC__HAS_X86INTRIN) -endif() - -if(LIBFLAC_ARCHITECTURE MATCHES x86) - add_definitions(-DFLAC__CPU_IA32) - add_definitions(-DFLAC__HAS_NASM) - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/nasm) - foreach(ASM_SOURCE cpu_asm fixed_asm lpc_asm) - execute_process(COMMAND nasm "-i${PROJECT_SOURCE_DIR}/src/libFLAC/ia32/" -f win32 -d OBJ_FORMAT_win32 -f win32 - -o "${CMAKE_BINARY_DIR}/nasm/${ASM_SOURCE}.obj" "${PROJECT_SOURCE_DIR}/src/libFLAC/ia32/${ASM_SOURCE}.nasm" - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) - list(APPEND LIBFLAC_SOURCES ${CMAKE_BINARY_DIR}/nasm/${ASM_SOURCE}.obj) - endforeach() -elseif(LIBFLAC_ARCHITECTURE MATCHES x64) - add_definitions(-DFLAC__CPU_X86_64) - add_definitions(-DENABLE_64_BIT_WORDS) -endif() - -if(CMAKE_BUILD_TYPE MATCHES Debug) - add_definitions(-DFLAC__OVERFLOW_DETECT) -endif() - -add_definitions(-DPACKAGE_VERSION="1.3.2") -add_definitions(-DFLAC__HAS_OGG) -add_definitions(-DFLAC__ALIGN_MALLOC_DATA) # 32 byte boundary -add_definitions(-DHAVE_LROUND) -add_definitions(-D_CRT_SECURE_NO_WARNINGS) -add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) - -add_library(libFLAC ${LIBFLAC_SOURCES}) -add_library(libFLACXX ${LIBFLACXX_SOURCES}) - -set_target_properties(libFLAC PROPERTIES OUTPUT_NAME FLAC) -set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME FLAC++) - -find_library(OGG_LIBRARY ogg) -find_path(OGG_INCLUDE_DIR ogg/ogg.h) - -include_directories(${OGG_INCLUDE_DIR}) -target_link_libraries(libFLAC ${OGG_LIBRARY}) -target_link_libraries(libFLACXX libFLAC) - -if(BUILD_SHARED_LIBS) - set_target_properties(libFLACXX PROPERTIES COMPILE_FLAGS -DFLACPP_API_EXPORTS) - set_target_properties(libFLAC PROPERTIES COMPILE_FLAGS -DFLAC_API_EXPORTS) -else() - add_definitions(-DFLAC__NO_DLL) -endif() - -install(TARGETS libFLAC libFLACXX - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) - -if(NOT DEFINED LIBFLAC_SKIP_HEADERS) - install(DIRECTORY include/FLAC/ - DESTINATION include/FLAC - FILES_MATCHING PATTERN "*.h") - install(DIRECTORY include/FLAC++/ - DESTINATION include/FLAC++ - FILES_MATCHING PATTERN "*.h") -endif() diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL deleted file mode 100644 index 53ec5a95bd7f7c..00000000000000 --- a/ports/libflac/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libflac -Version: 1.3.2-6 -Homepage: https://xiph.org/flac/ -Description: Library for manipulating FLAC files -Build-Depends: libogg diff --git a/ports/libflac/fix-compile-options.patch b/ports/libflac/fix-compile-options.patch new file mode 100644 index 00000000000000..9d438da0efc685 --- /dev/null +++ b/ports/libflac/fix-compile-options.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c83dd83..2d1a7e6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -82,9 +82,11 @@ if(HAVE_WERROR_FLAG) + option(ENABLE_WERROR "Enable -Werror in all Makefiles" OFF) + endif() + ++if(MSVC AND NOT WITH_ASM) ++ add_compile_options(/wd4267 /wd4996) ++endif() ++ + add_compile_options( +- $<$:/wd4267> +- $<$:/wd4996> + $<$:-Werror> + $<$,$>:-Weffc++> + $<$,$>:-Wdeclaration-after-statement>) diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake index 89410744797de8..4f1ca9a3adf528 100644 --- a/ports/libflac/portfile.cmake +++ b/ports/libflac/portfile.cmake @@ -1,47 +1,80 @@ -include(vcpkg_common_functions) - -vcpkg_download_distfile(FLAC_MAX_MIN_PATCH - URLS "https://github.com/xiph/flac/commit/64f47c2d71ffba5aa8cd1d2a447339fd95f362f9.patch" - FILENAME "flac-max-min.patch" - SHA512 7ce9ccf9f081b478664cccd677c10269567672a8aa3a60839ef203b3d0a626d2b2c2f34d4c7fc897c31a436d7c22fb740bca5449a465dab39d60655417fe7772) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO xiph/flac - REF 1.3.2 - SHA512 d0e177cadee371940516864bf72e1eb3d101a5f2779c854ecb8a3361a654a9b9e7efd303c83e2f308bacc7e54298d37705f677e2b955d4a9fe3470c364fa45f3 - HEAD_REF master - PATCHES - "${FLAC_MAX_MIN_PATCH}" - "${CMAKE_CURRENT_LIST_DIR}/uwp-library-console.patch" - "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile2.patch" -) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) - vcpkg_find_acquire_program(NASM) - get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) - set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") -endif() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DLIBFLAC_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE} - OPTIONS_DEBUG - -DLIBFLAC_SKIP_HEADERS=ON) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(APPEND ${CURRENT_PACKAGES_DIR}/include/FLAC/export.h "#undef FLAC_API\n#define FLAC_API\n") - file(APPEND ${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h "#undef FLACPP_API\n#define FLACPP_API\n") -endif() - -# This license (BSD) is relevant only for library - if someone would want to install -# FLAC cmd line tools as well additional license (GPL) should be included -file(COPY ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/libflac) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libflac/COPYING.Xiph ${CURRENT_PACKAGES_DIR}/share/libflac/copyright) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/flac + REF ce6dd6b5732e319ef60716d9cc9af6a836a4011a + SHA512 d0d3b5451f8d74aa0a0832fbe95cca55597ce9654765a95adaac98ecd0da9e803b98551a40a3fb3fd5b86bc5f40cd1a791127c03da5322e7f01e7fa761171a21 + HEAD_REF master + PATCHES + uwp-library-console.patch + uwp-createfile2.patch + fix-compile-options.patch +) + +if(VCPKG_TARGET_IS_MINGW) + set(WITH_STACK_PROTECTOR OFF) + string(APPEND VCPKG_C_FLAGS "-D_FORTIFY_SOURCE=0") + string(APPEND VCPKG_CXX_FLAGS "-D_FORTIFY_SOURCE=0") +else() + set(WITH_STACK_PROTECTOR ON) +endif() + +if("asm" IN_LIST FEATURES) + if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + message(FATAL_ERROR "Feature asm only supports x86 architecture.") + endif() + + VCPKG_FIND_ACQUIRE_PROGRAM(NASM) + GET_FILENAME_COMPONENT(NASM_PATH ${NASM} DIRECTORY) + vcpkg_add_to_path("${NASM_PATH}") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + asm WITH_ASM +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_PROGRAMS=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_DOCS=OFF + -DBUILD_TESTING=OFF + -DWITH_STACK_PROTECTOR=${WITH_STACK_PROTECTOR}) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH share/FLAC/cmake + TARGET_PATH share/FLAC +) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC/export.h + "#if defined(FLAC__NO_DLL)" + "#if 0" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h + "#if defined(FLAC__NO_DLL)" + "#if 0" + ) +else() + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC/export.h + "#if defined(FLAC__NO_DLL)" + "#if 1" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h + "#if defined(FLAC__NO_DLL)" + "#if 1" + ) +endif() + +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) + +# This license (BSD) is relevant only for library - if someone would want to install +# FLAC cmd line tools as well additional license (GPL) should be included +file(INSTALL ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libflac/uwp-createfile2.patch b/ports/libflac/uwp-createfile2.patch index cfb343990523b0..0b86e9a7fc4904 100644 --- a/ports/libflac/uwp-createfile2.patch +++ b/ports/libflac/uwp-createfile2.patch @@ -1,15 +1,15 @@ -diff --git a/src/libFLAC/windows_unicode_filenames.c b/src/libFLAC/windows_unicode_filenames.c -index 2404e31..d320bf5 100644 ---- a/src/libFLAC/windows_unicode_filenames.c -+++ b/src/libFLAC/windows_unicode_filenames.c -@@ -185,6 +185,27 @@ int flac_internal_rename_utf8(const char *oldname, const char *newname) - - HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) +diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +index 8b20bbb7..058295fa 100644 +--- a/src/share/win_utf8_io/win_utf8_io.c ++++ b/src/share/win_utf8_io/win_utf8_io.c +@@ -156,6 +156,27 @@ int get_utf8_argv(int *argc, char ***argv) + /* similar to CreateFileW but accepts UTF-8 encoded lpFileName */ + HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) { +#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) + HANDLE handle = INVALID_HANDLE_VALUE; + -+ if (!utf8_filenames) ++ if (!flac_internal_get_utf8_filenames()) + return handle; + + wchar_t *wname; @@ -27,12 +27,14 @@ index 2404e31..d320bf5 100644 + + return handle; +#else - if (!utf8_filenames) { + if (!flac_internal_get_utf8_filenames()) { return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); } else { -@@ -198,4 +219,5 @@ HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesi +@@ -169,6 +190,7 @@ HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWO return handle; } +#endif } + + /* return number of characters in the UTF-8 string */ diff --git a/ports/libflac/uwp-library-console.patch b/ports/libflac/uwp-library-console.patch index bba2422c368b8a..234758c754131d 100644 --- a/ports/libflac/uwp-library-console.patch +++ b/ports/libflac/uwp-library-console.patch @@ -1,5 +1,5 @@ diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c -index c61d27f..0870054 100644 +index bbb6a74a..8b20bbb7 100644 --- a/src/share/win_utf8_io/win_utf8_io.c +++ b/src/share/win_utf8_io/win_utf8_io.c @@ -110,7 +110,11 @@ int get_utf8_argv(int *argc, char ***argv) @@ -9,12 +9,12 @@ index c61d27f..0870054 100644 +#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) + if ((handle = LoadPackagedLibrary("msvcrt.dll", 0)) == NULL) return 1; +#else - if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1; + if ((handle = LoadLibraryW(L"msvcrt.dll")) == NULL) return 1; +#endif if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) { FreeLibrary(handle); return 1; -@@ -163,6 +167,9 @@ size_t strlen_utf8(const char *str) +@@ -181,6 +185,9 @@ size_t strlen_utf8(const char *str) /* get the console width in characters */ int win_get_console_width(void) { @@ -24,7 +24,7 @@ index c61d27f..0870054 100644 int width = 80; CONSOLE_SCREEN_BUFFER_INFO csbi; HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); -@@ -170,6 +177,7 @@ int win_get_console_width(void) +@@ -188,6 +195,7 @@ int win_get_console_width(void) if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0) width = csbi.dwSize.X; return width; @@ -32,7 +32,7 @@ index c61d27f..0870054 100644 } /* print functions */ -@@ -179,6 +187,10 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len) +@@ -197,6 +205,10 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len) DWORD out; int ret; @@ -43,7 +43,7 @@ index c61d27f..0870054 100644 do { if (stream == stdout) { HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); -@@ -197,6 +209,7 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len) +@@ -215,6 +227,7 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len) return out; } } while(0); diff --git a/ports/libflac/vcpkg.json b/ports/libflac/vcpkg.json new file mode 100644 index 00000000000000..07073d8020775e --- /dev/null +++ b/ports/libflac/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "libflac", + "version-string": "1.3.3", + "port-version": 6, + "description": "Library for manipulating FLAC files", + "homepage": "https://xiph.org/flac/", + "dependencies": [ + "libogg" + ], + "features": { + "asm": { + "description": "Use any assembly optimization routines" + } + } +} diff --git a/ports/libfort/portfile.cmake b/ports/libfort/portfile.cmake new file mode 100644 index 00000000000000..969af67eb1779a --- /dev/null +++ b/ports/libfort/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO seleznevae/libfort + REF b1c32b67511f4612996b287a1ef4a9df012521d2 # v0.4.2 + SHA512 56d3bd00b8a72a5f9deb9bca9a325e100319aed55e10321d04243d8a2a94c0fa513ada1b13bc59957af01b1f2c5f1655304a4a608e118cbeb65d2b4527f102d0 + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DFORT_ENABLE_TESTING=OFF + -DFORT_ENABLE_ASTYLE=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libfort) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libfort/vcpkg.json b/ports/libfort/vcpkg.json new file mode 100644 index 00000000000000..7a13edcc58b104 --- /dev/null +++ b/ports/libfort/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "libfort", + "version-semver": "0.4.2", + "description": "A simple crossplatform library to create formatted text tables", + "homepage": "https://github.com/seleznevae/libfort", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libfreenect2/CONTROL b/ports/libfreenect2/CONTROL deleted file mode 100644 index 6734e25cc63df7..00000000000000 --- a/ports/libfreenect2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libfreenect2 -Version: 0.2.0-3 -Build-Depends: libusb, libjpeg-turbo -Homepage: https://github.com/OpenKinect/libfreenect2 -Description: Open source drivers for the Kinect for Windows v2 device diff --git a/ports/libfreenect2/fix-dependency-libusb.patch b/ports/libfreenect2/fix-dependency-libusb.patch new file mode 100644 index 00000000000000..a5de8f3bee1940 --- /dev/null +++ b/ports/libfreenect2/fix-dependency-libusb.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e0d192..aedc576 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -90,7 +90,7 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + + # dependencies + FIND_PACKAGE(PkgConfig) # try find PKGConfig as it will be used if found +-FIND_PACKAGE(LibUSB REQUIRED) ++FIND_PACKAGE(libusb CONFIG REQUIRED) + + # Add includes + INCLUDE_DIRECTORIES( +@@ -98,7 +98,7 @@ INCLUDE_DIRECTORIES( + "${MY_DIR}/include/internal" + ${PROJECT_BINARY_DIR} # for generated headers + ${LIBFREENECT2_THREADING_INCLUDE_DIR} +- ${LibUSB_INCLUDE_DIRS} ++ ${LIBUSB_INCLUDE_DIRS} + ) + + SET(RESOURCES_INC_FILE "${PROJECT_BINARY_DIR}/resources.inc.h") +@@ -154,7 +154,7 @@ SET(SOURCES + ) + + SET(LIBRARIES +- ${LibUSB_LIBRARIES} ++ ${LIBUSB_LIBRARIES} + ${LIBFREENECT2_THREADING_LIBRARIES} + ) + diff --git a/ports/libfreenect2/portfile.cmake b/ports/libfreenect2/portfile.cmake index 9ca8867fb3a24b..3405097713e604 100644 --- a/ports/libfreenect2/portfile.cmake +++ b/ports/libfreenect2/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenKinect/libfreenect2 REF v0.2.0 SHA512 3525e3f21462cecd3b198f64545786ffddc2cafdfd8146e5a46f0300b83f29f1ad0739618a07ab195c276149d7e2e909f7662e2d379a2880593cac75942b0666 HEAD_REF master + PATCHES fix-dependency-libusb.patch ) file(READ ${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake FINDLIBUSB) @@ -18,25 +17,26 @@ string(REPLACE "(WIN32)" "(WIN32_DISABLE)" EXAMPLECMAKE "${EXAMPLECMAKE}") file(WRITE ${SOURCE_PATH}/examples/CMakeLists.txt "${EXAMPLECMAKE}") +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + opengl ENABLE_OPENGL + opencl ENABLE_OPENCL +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DENABLE_CUDA=OFF + # FEATURES + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/freenect2) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/freenect2 TARGET_PATH share/freenect2) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# The cmake config is actually called freenect2Config.cmake instead of libfreenect2Config.cmake ... -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libfreenect2 ${CURRENT_PACKAGES_DIR}/share/freenect2) - -# license file needs to be in share/libfreenect2 otherwise vcpkg will complain -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libfreenect2/) -file(COPY ${SOURCE_PATH}/GPL2 DESTINATION ${CURRENT_PACKAGES_DIR}/share/libfreenect2/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libfreenect2/GPL2 ${CURRENT_PACKAGES_DIR}/share/libfreenect2/copyright) +file(INSTALL ${SOURCE_PATH}/GPL2 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libfreenect2/vcpkg.json b/ports/libfreenect2/vcpkg.json new file mode 100644 index 00000000000000..a68b6564e4458d --- /dev/null +++ b/ports/libfreenect2/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "libfreenect2", + "version-string": "0.2.0", + "port-version": 6, + "description": "Open source drivers for the Kinect for Windows v2 device", + "homepage": "https://github.com/OpenKinect/libfreenect2", + "dependencies": [ + "libjpeg-turbo", + "libusb" + ], + "default-features": [ + "opengl" + ], + "features": { + "opencl": { + "description": "OpenCL support for libfreenect2", + "dependencies": [ + "opencl" + ] + }, + "opengl": { + "description": "OpenGL support for libfreenect2", + "dependencies": [ + "glfw3", + "opengl" + ] + } + } +} diff --git a/ports/libftdi/CONTROL b/ports/libftdi/CONTROL deleted file mode 100644 index 16ebe6fabc6c9d..00000000000000 --- a/ports/libftdi/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libftdi -Version: 0.20-1 -Build-Depends: libusb-win32 -Description: FTDI USB driver with bitbang mode (v0.20) diff --git a/ports/libftdi/portfile.cmake b/ports/libftdi/portfile.cmake index 318e21a9e08d57..a4a3b0c87e2ca4 100644 --- a/ports/libftdi/portfile.cmake +++ b/ports/libftdi/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_download_distfile(ARCHIVE URLS "https://www.intra2net.com/en/developer/libftdi/download/libftdi-0.20.tar.gz" FILENAME "libftdi-0.20.tar.gz" diff --git a/ports/libftdi/vcpkg.json b/ports/libftdi/vcpkg.json new file mode 100644 index 00000000000000..953acd0b8690d1 --- /dev/null +++ b/ports/libftdi/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "libftdi", + "version-string": "0.20", + "port-version": 2, + "description": "FTDI USB driver with bitbang mode (v0.20)", + "dependencies": [ + "libusb-win32" + ] +} diff --git a/ports/libftdi1/CONTROL b/ports/libftdi1/CONTROL deleted file mode 100644 index d282ad9eb8d28a..00000000000000 --- a/ports/libftdi1/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libftdi1 -Version: 1.4 -Build-Depends: libusb -Description: FTDI USB driver with bitbang mode (v1.4) diff --git a/ports/libftdi1/cmake-fix.patch b/ports/libftdi1/cmake-fix.patch deleted file mode 100644 index ea541f719a256b..00000000000000 --- a/ports/libftdi1/cmake-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/FindUSB1.cmake b/cmake/FindUSB1.cmake -index b90e297..6cc97a0 100644 ---- a/cmake/FindUSB1.cmake -+++ b/cmake/FindUSB1.cmake -@@ -26,7 +26,7 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) - PATH_SUFFIXES libusb-1.0 - PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) - -- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 -+ FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 libusb-1.0 - PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) - - include(FindPackageHandleStandardArgs) diff --git a/ports/libftdi1/exports.def b/ports/libftdi1/exports.def index f5179c59dc204f..8fbbd381870288 100644 --- a/ports/libftdi1/exports.def +++ b/ports/libftdi1/exports.def @@ -42,7 +42,11 @@ EXPORTS ftdi_setdtr ftdi_setdtr_rts ftdi_setflowctrl + ftdi_setflowctrl_xonxoff ftdi_setrts + ftdi_tciflush + ftdi_tcioflush + ftdi_tcoflush ftdi_transfer_data_cancel ftdi_transfer_data_done ftdi_usb_close diff --git a/ports/libftdi1/libconfuse-fix.patch b/ports/libftdi1/libconfuse-fix.patch new file mode 100644 index 00000000000000..b50bb0a3c00dff --- /dev/null +++ b/ports/libftdi1/libconfuse-fix.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindConfuse.cmake b/cmake/FindConfuse.cmake +index f6af7d5..e24d72f 100755 +--- a/cmake/FindConfuse.cmake ++++ b/cmake/FindConfuse.cmake +@@ -46,7 +46,7 @@ find_path ( CONFUSE_INCLUDE_DIR + set ( CONFUSE_INCLUDE_DIRS ${CONFUSE_INCLUDE_DIR} ) + + find_library ( CONFUSE_LIBRARY +- NAMES confuse ++ NAMES libconfuse + ) + + set ( CONFUSE_LIBRARIES ${CONFUSE_LIBRARY} ) diff --git a/ports/libftdi1/libusb-fix.patch b/ports/libftdi1/libusb-fix.patch new file mode 100644 index 00000000000000..98dae3dea07414 --- /dev/null +++ b/ports/libftdi1/libusb-fix.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindUSB1.cmake b/cmake/FindUSB1.cmake +index b90e297..6cc97a0 100755 +--- a/cmake/FindUSB1.cmake ++++ b/cmake/FindUSB1.cmake +@@ -26,7 +26,7 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) + PATH_SUFFIXES libusb-1.0 + PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) + +- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 ++ FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 libusb-1.0 + PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) + + include(FindPackageHandleStandardArgs) diff --git a/ports/libftdi1/portfile.cmake b/ports/libftdi1/portfile.cmake index 4007e91220b3f5..3b3fdaefe4d9e8 100644 --- a/ports/libftdi1/portfile.cmake +++ b/ports/libftdi1/portfile.cmake @@ -1,17 +1,16 @@ -include(vcpkg_common_functions) - vcpkg_download_distfile(ARCHIVE - URLS "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.4.tar.bz2" - FILENAME "libftdi1-1.4.tar.bz2" - SHA512 dbab74f7bc35ca835b9c6dd5b70a64816948d65da1f73a9ece37a0f0f630bd0df1a676543acc517b02a718bc34ba4f7a30cbc48b6eed1c154c917f8ef0a358fc + URLS "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.5.tar.bz2" + FILENAME "libftdi1-1.5.tar.bz2" + SHA512 c525b2ab6aff9ef9254971ae7d57f3549a36a36875765c48f947d52532814a2a004de1232389d4fe824a8c8ab84277b08427308573476e1da9b7db83db802f6f ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - REF 1.4 + REF 1.5 PATCHES - cmake-fix.patch + libusb-fix.patch + libconfuse-fix.patch win32.patch ) @@ -26,13 +25,12 @@ vcpkg_configure_cmake( -DEXAMPLES=OFF -DPYTHON_BINDINGS=OFF -DLINK_PYTHON_LIBRARY=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Confuse=ON -DCMAKE_DISABLE_FIND_PACKAGE_Libintl=ON -DCMAKE_DISABLE_FIND_PACKAGE_PythonLibs=ON -DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp=ON + -DFTDI_EEPROM=OFF ) vcpkg_install_cmake() @@ -41,7 +39,10 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libftdi1 TARGET_PATH share/libft file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libftdi1) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libftdi1/LICENSE ${CURRENT_PACKAGES_DIR}/share/libftdi1/copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libftdi1/vcpkg.json b/ports/libftdi1/vcpkg.json new file mode 100644 index 00000000000000..aeedcd1bd329e7 --- /dev/null +++ b/ports/libftdi1/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libftdi1", + "version": "1.5", + "port-version": 1, + "description": "FTDI USB driver with bitbang mode", + "dependencies": [ + "libconfuse", + "libusb" + ] +} diff --git a/ports/libftdi1/win32.patch b/ports/libftdi1/win32.patch index 8cf35c92030f24..7cea44d4fd8ac1 100644 --- a/ports/libftdi1/win32.patch +++ b/ports/libftdi1/win32.patch @@ -1,5 +1,5 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 9fd86a6..e1e848c 100644 +index 17b3617..f9a8e59 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,9 +18,14 @@ message(STATUS "Detected git snapshot version: ${SNAPSHOT_VERSION}") @@ -16,7 +16,7 @@ index 9fd86a6..e1e848c 100644 +if(BUILD_SHARED_LIBS) add_library(ftdi1 SHARED ${c_sources}) - math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases + math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatibility with previous releases @@ -38,7 +43,7 @@ install ( TARGETS ftdi1 ARCHIVE DESTINATION lib${LIB_SUFFIX} ) diff --git a/ports/libgcrypt/fix-flags.patch b/ports/libgcrypt/fix-flags.patch new file mode 100644 index 00000000000000..7ccf41c63e40dd --- /dev/null +++ b/ports/libgcrypt/fix-flags.patch @@ -0,0 +1,13 @@ +diff --git a/cipher/Makefile.am b/cipher/Makefile.am +index 95c4510..d43350c 100644 +--- a/cipher/Makefile.am ++++ b/cipher/Makefile.am +@@ -112,7 +112,7 @@ gost-sb.h: gost-s-box + ./gost-s-box $@ + + gost-s-box: gost-s-box.c +- $(CC_FOR_BUILD) -o $@ $(srcdir)/gost-s-box.c ++ $(CC_FOR_BUILD) $(CFLAGS) -o $@ $(srcdir)/gost-s-box.c + + + if ENABLE_O_FLAG_MUNGING diff --git a/ports/libgcrypt/fix-pkgconfig.patch b/ports/libgcrypt/fix-pkgconfig.patch new file mode 100644 index 00000000000000..0c269b2a6b64b5 --- /dev/null +++ b/ports/libgcrypt/fix-pkgconfig.patch @@ -0,0 +1,11 @@ +diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in +index ec68fa2..6bf7a07 100644 +--- a/src/libgcrypt.pc.in ++++ b/src/libgcrypt.pc.in +@@ -13,5 +13,5 @@ Description: General purpose cryptographic library + Requires: gpg-error + Version: @PACKAGE_VERSION@ + Cflags: @LIBGCRYPT_CONFIG_CFLAGS@ +-Libs: @LIBGCRYPT_CONFIG_LIBS@ ++Libs: -L${libdir} @LIBGCRYPT_CONFIG_LIBS@ + URL: https://www.gnupg.org/software/libgcrypt/index.html diff --git a/ports/libgcrypt/portfile.cmake b/ports/libgcrypt/portfile.cmake new file mode 100644 index 00000000000000..658418e2c29adc --- /dev/null +++ b/ports/libgcrypt/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports unix platform" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gpg/libgcrypt + REF libgcrypt-1.8.7 + SHA512 43e50a1b8a3cdbf420171c785fe558f443b414b708defa585277ac5ea59f9d8ae7f4555ed291c16fa004e7d4dd93a5ab2011c3c591e784ce3c6662a3193fd3e1 + HEAD_REF master + PATCHES + fix-pkgconfig.patch + fix-flags.patch +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --disable-doc + --disable-silent-rules + --with-libgpg-error-prefix=${CURRENT_INSTALLED_DIR}/tools/libgpg-error +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libgcrypt/vcpkg.json b/ports/libgcrypt/vcpkg.json new file mode 100644 index 00000000000000..40a0566446fa3a --- /dev/null +++ b/ports/libgcrypt/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libgcrypt", + "version-string": "1.8.7", + "port-version": 2, + "description": "A library implementing the so-called Assuan protocol", + "homepage": "https://gnupg.org/software/libgcrypt/index.html", + "supports": "linux | osx", + "dependencies": [ + "libgpg-error" + ] +} diff --git a/ports/libgd/0001-fix-cmake.patch b/ports/libgd/0001-fix-cmake.patch index a1a31663999b56..4446eb60dd87d4 100644 --- a/ports/libgd/0001-fix-cmake.patch +++ b/ports/libgd/0001-fix-cmake.patch @@ -1,173 +1,77 @@ -From 26fdb0f43b2d994de9a3d62f85fc650e8c495f18 Mon Sep 17 00:00:00 2001 -From: Mikhail Paulyshka -Date: Sat, 1 Apr 2017 23:16:18 +0300 -Subject: [PATCH] fix cmake - ---- - CMakeLists.txt | 53 +++++++++++++++++++++++---------------------- - src/CMakeLists.txt | 63 +++++++++++++++++++++++++++++------------------------- - 2 files changed, 62 insertions(+), 54 deletions(-) - diff --git a/CMakeLists.txt b/CMakeLists.txt -index 42934d0..796fa47 100644 +index 57cd95d..50d5b9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -223,8 +223,10 @@ else (USE_EXT_GD) +@@ -280,8 +280,10 @@ else (USE_EXT_GD) add_subdirectory(src) endif (USE_EXT_GD) -add_subdirectory(tests) -add_subdirectory(examples) +if(BUILD_TEST) -+ add_subdirectory(tests) -+ add_subdirectory(examples) ++ add_subdirectory(tests) ++ add_subdirectory(examples) +endif() add_custom_target(distclean ${GD_SOURCE_DIR}/cmake/distclean.sh) -@@ -246,29 +248,30 @@ IF (ENABLE_LIQ AND LIQ_BUILD) - ADD_DEPENDENCIES(${GD_LIB_STATIC} libimagequant) - ENDIF(ENABLE_LIQ AND LIQ_BUILD) +@@ -298,7 +300,7 @@ else(WIN32) + set(CPACK_GENERATOR TGZ) + endif(WIN32) - --INSTALL(FILES docs/INSTALL DESTINATION share/docs) --INSTALL(FILES docs/README.JPN DESTINATION share/docs) --INSTALL(FILES docs/README.CMAKE DESTINATION share/docs) --INSTALL(FILES docs/README.TESTING DESTINATION share/docs) --INSTALL(FILES docs/README.TXT DESTINATION share/docs) ++if(0) + INSTALL(FILES docs/INSTALL DESTINATION share/doc/gd-${GDLIB_MAJOR}.${GDLIB_MINOR}) + INSTALL(FILES docs/README.JPN DESTINATION share/doc/gd-${GDLIB_MAJOR}.${GDLIB_MINOR}) + INSTALL(FILES docs/README.CMAKE DESTINATION share/doc/gd-${GDLIB_MAJOR}.${GDLIB_MINOR}) +@@ -320,7 +322,7 @@ INSTALL(FILES examples/test_crop_threshold.png DESTINATION share/doc/gd-${GDLIB_ + INSTALL(FILES examples/tgaread.c DESTINATION share/doc/gd-${GDLIB_MAJOR}.${GDLIB_MINOR}) + INSTALL(FILES examples/tiffread.c DESTINATION share/doc/gd-${GDLIB_MAJOR}.${GDLIB_MINOR}) + INSTALL(FILES examples/windows.c DESTINATION share/doc/gd-${GDLIB_MAJOR}.${GDLIB_MINOR}) - -- --INSTALL(FILES examples/arc.c DESTINATION share/docs) --INSTALL(FILES examples/copyrotated.c DESTINATION share/docs) --INSTALL(FILES examples/crop.c DESTINATION share/docs) --INSTALL(FILES examples/flip.c DESTINATION share/docs) --INSTALL(FILES examples/gif.c DESTINATION share/docs) --INSTALL(FILES examples/nnquant.c DESTINATION share/docs) --INSTALL(FILES examples/noIcon.pic DESTINATION share/docs) --INSTALL(FILES examples/noIcon.sgi DESTINATION share/docs) --INSTALL(FILES examples/noIcon.tga DESTINATION share/docs) --INSTALL(FILES examples/noIconAlpha.tga DESTINATION share/docs) --INSTALL(FILES examples/test_crop_threshold.png DESTINATION share/docs) --INSTALL(FILES examples/tgaread.c DESTINATION share/docs) --INSTALL(FILES examples/tiffread.c DESTINATION share/docs) --INSTALL(FILES examples/windows.c DESTINATION share/docs) -- -+if(BUILD_DOCS) -+ INSTALL(FILES docs/INSTALL DESTINATION share/docs) -+ INSTALL(FILES docs/README.JPN DESTINATION share/docs) -+ INSTALL(FILES docs/README.CMAKE DESTINATION share/docs) -+ INSTALL(FILES docs/README.TESTING DESTINATION share/docs) -+ INSTALL(FILES docs/README.TXT DESTINATION share/docs) -+endif() -+ -+if(BUILD_EXAMPLES) -+ INSTALL(FILES examples/arc.c DESTINATION share/docs) -+ INSTALL(FILES examples/copyrotated.c DESTINATION share/docs) -+ INSTALL(FILES examples/crop.c DESTINATION share/docs) -+ INSTALL(FILES examples/flip.c DESTINATION share/docs) -+ INSTALL(FILES examples/gif.c DESTINATION share/docs) -+ INSTALL(FILES examples/nnquant.c DESTINATION share/docs) -+ INSTALL(FILES examples/noIcon.pic DESTINATION share/docs) -+ INSTALL(FILES examples/noIcon.sgi DESTINATION share/docs) -+ INSTALL(FILES examples/noIcon.tga DESTINATION share/docs) -+ INSTALL(FILES examples/noIconAlpha.tga DESTINATION share/docs) -+ INSTALL(FILES examples/test_crop_threshold.png DESTINATION share/docs) -+ INSTALL(FILES examples/tgaread.c DESTINATION share/docs) -+ INSTALL(FILES examples/tiffread.c DESTINATION share/docs) -+ INSTALL(FILES examples/windows.c DESTINATION share/docs) +endif() set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 08fd699..497dd93 100644 +index 509c422..97a2976 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -90,17 +90,17 @@ if (BUILD_STATIC_LIBS) +@@ -96,7 +96,6 @@ if (BUILD_STATIC_LIBS) if (UNIX) set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB}) endif() -endif() --if (WIN32 AND NOT MINGW AND NOT MSYS) -- # SET_TARGET_PROPERTIES(${GD_LIB} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:msvcrt.lib") -- SET_PROPERTY(TARGET ${GD_LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS NONDLL=1) --ENDIF(WIN32 AND NOT MINGW AND NOT MSYS) -+ if (WIN32 AND NOT MINGW AND NOT MSYS) -+ # SET_TARGET_PROPERTIES(${GD_LIB} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:msvcrt.lib") -+ SET_PROPERTY(TARGET ${GD_LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS NONDLL=1) -+ ENDIF(WIN32 AND NOT MINGW AND NOT MSYS) - --if (MINGW OR MSYS) -- ADD_DEFINITIONS("-mms-bitfields") -- set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB}) --endif (MINGW OR MSYS) -+ if (MINGW OR MSYS) -+ ADD_DEFINITIONS("-mms-bitfields") -+ set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB}) -+ endif (MINGW OR MSYS) + if (NOT "${GD_PROGRAMS_LIB_SRC_FILES}" STREQUAL "") + add_library(gd_programs_lib STATIC ${GD_PROGRAMS_LIB_SRC_FILES}) +@@ -117,6 +116,7 @@ if (MINGW OR MSYS) + set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB}) + endif() + endif (MINGW OR MSYS) +endif() INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_SOURCE_DIR}/src") -@@ -123,32 +123,37 @@ if (BUILD_STATIC_LIBS) - target_link_libraries(${GD_LIB_STATIC} ${LIBGD_DEP_LIBS}) - endif() - --set(GD_PROGRAMS gdcmpgif) +@@ -148,6 +148,7 @@ SET(LIBS_PRIVATES + ${WEBP_LIBRARIES} + ) --if (PNG_FOUND) -- set(GD_PROGRAMS ${GD_PROGRAMS} gdtopng pngtogd webpng) +if(BUILD_PROGRAMS) -+ set(GD_PROGRAMS gdcmpgif) -+ -+ if (PNG_FOUND) -+ set(GD_PROGRAMS ${GD_PROGRAMS} gdtopng pngtogd webpng) -+ if (ZLIB_FOUND) -+ set(GD_PROGRAMS ${GD_PROGRAMS} gdparttopng gd2topng pngtogd2) -+ endif() -+ endif() -+ -+ if (FREETYPE_FOUND) -+ set(GD_PROGRAMS ${GD_PROGRAMS} annotate) -+ endif() -+ - if (ZLIB_FOUND) -- set(GD_PROGRAMS ${GD_PROGRAMS} gdparttopng gd2topng pngtogd2) -+ set(GD_PROGRAMS ${GD_PROGRAMS} gd2copypal gd2togif giftogd2) - endif() --endif() - --if (FREETYPE_FOUND) -- set(GD_PROGRAMS ${GD_PROGRAMS} annotate) --endif() -+ foreach(program ${GD_PROGRAMS}) -+ add_executable(${program} ${program}.c) -+ if (BUILD_SHARED_LIBS) -+ target_link_libraries(${program} ${GD_LIB}) -+ else() -+ target_link_libraries(${program} ${GD_LIB_STATIC}) -+ endif() -+ endforeach(program) + set(GD_PROGRAMS gdcmpgif) --if (ZLIB_FOUND) -- set(GD_PROGRAMS ${GD_PROGRAMS} gd2copypal gd2togif giftogd2) -+ install(PROGRAMS bdftogd DESTINATION bin) - endif() + if (PNG_FOUND) +@@ -177,6 +178,9 @@ foreach(program ${GD_PROGRAMS}) + endif() + endforeach(program) --foreach(program ${GD_PROGRAMS}) -- add_executable(${program} ${program}.c) -- if (BUILD_SHARED_LIBS) -- target_link_libraries(${program} ${GD_LIB}) -- else() -- target_link_libraries(${program} ${GD_LIB_STATIC}) -- endif() --endforeach(program) -- ++install(PROGRAMS bdftogd DESTINATION bin) ++endif() ++ set(GD_INSTALL_TARGETS ${GD_PROGRAMS}) if (BUILD_SHARED_LIBS) set(GD_INSTALL_TARGETS ${GD_INSTALL_TARGETS} ${GD_LIB}) -@@ -161,7 +166,7 @@ install(TARGETS ${GD_INSTALL_TARGETS} +@@ -189,7 +193,7 @@ install(TARGETS ${GD_INSTALL_TARGETS} RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) @@ -176,6 +80,3 @@ index 08fd699..497dd93 100644 install(FILES entities.h gd.h --- -2.11.0.windows.1 - diff --git a/ports/libgd/CONTROL b/ports/libgd/CONTROL deleted file mode 100644 index 1d16b2f27ad2be..00000000000000 --- a/ports/libgd/CONTROL +++ /dev/null @@ -1,29 +0,0 @@ -Source: libgd -Version: 2.2.5-3 -Homepage: https://github.com/libgd/libgd -Description: Open source code library for the dynamic creation of images by programmers. -Default-Features: fontconfig, freetype, jpeg, png, tiff, webp - -Feature: fontconfig -Description: Support for fontconfig -Build-Depends: fontconfig - -Feature: freetype -Description: Support for freetype -Build-Depends: freetype - -Feature: jpeg -Description: Support for jpeg -Build-Depends: libjpeg-turbo - -Feature: png -Description: Support for png -Build-Depends: libpng - -Feature: tiff -Description: Support for tiff -Build-Depends: tiff - -Feature: webp -Description: Support for webp -Build-Depends: libwebp diff --git a/ports/libgd/fix_msvc_build.patch b/ports/libgd/fix_msvc_build.patch new file mode 100644 index 00000000000000..e46a81f8965966 --- /dev/null +++ b/ports/libgd/fix_msvc_build.patch @@ -0,0 +1,61 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 17ddf6b..7fe1e6b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -118,7 +118,7 @@ else (USE_EXT_GD) + endif (ENABLE_ICONV) + + IF (ENABLE_WEBP) +- FIND_PACKAGE(WEBP REQUIRED) ++ FIND_PACKAGE(WebP CONFIG REQUIRED) + ENDIF (ENABLE_WEBP) + + IF (ENABLE_HEIF) +diff --git a/src/config.h.cmake b/src/config.h.cmake +index 2b46a17..af98d23 100644 +--- a/src/config.h.cmake ++++ b/src/config.h.cmake +@@ -139,3 +139,8 @@ + + /* Version number of package */ + #cmakedefine VERSION ++ ++#ifdef _MSC_VER ++ #define ssize_t SSIZE_T ++ #define SSIZE_MAX MAXSSIZE_T ++#endif +\ No newline at end of file +diff --git a/src/gd_intern.h b/src/gd_intern.h +index f8f3b5d..380f4db 100644 +--- a/src/gd_intern.h ++++ b/src/gd_intern.h +@@ -29,6 +29,14 @@ + # endif + #endif + ++#ifdef _MSC_VER ++#define ssize_t SSIZE_T ++#define MAXSIZE_T ((SIZE_T)~ ((SIZE_T)0)) ++#define MAXSSIZE_T ((SSIZE_T) (MAXSIZE_T >> 1)) ++#define MINSSIZE_T ((SSIZE_T)~MAXSSIZE_T) ++#define SSIZE_MAX MAXSSIZE_T ++#endif ++ + #include "gd.h" + + #define MIN(a,b) ((a)<(b)?(a):(b)) +diff --git a/src/getopt.c b/src/getopt.c +index 8651b87..00bccde 100644 +--- a/src/getopt.c ++++ b/src/getopt.c +@@ -33,7 +33,10 @@ + #include + #include + #include ++ ++#ifndef _WIN32 + #include ++#endif + + int opterr = 1, /* if error message should be printed */ + optind = 1, /* index into parent argv vector */ diff --git a/ports/libgd/intrin.patch b/ports/libgd/intrin.patch new file mode 100644 index 00000000000000..b228773f0b0a3d --- /dev/null +++ b/ports/libgd/intrin.patch @@ -0,0 +1,13 @@ +diff --git a/src/gd_interpolation.c b/src/gd_interpolation.c +index ce27220..8895072 100644 +--- a/src/gd_interpolation.c ++++ b/src/gd_interpolation.c +@@ -75,7 +75,7 @@ TODO: + + #ifdef _MSC_VER + # pragma optimize("t", on) +-# include ++# include + #endif + + static gdImagePtr gdImageScaleBilinear(gdImagePtr im, diff --git a/ports/libgd/no-write-source-dir.patch b/ports/libgd/no-write-source-dir.patch index 3017e7ee4a0831..4cc17dbef092ad 100644 --- a/ports/libgd/no-write-source-dir.patch +++ b/ports/libgd/no-write-source-dir.patch @@ -1,14 +1,14 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b16d4a4..5126085 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -191,7 +191,8 @@ else (USE_EXT_GD) - CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) - CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) - -- CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${GD_SOURCE_DIR}/src/config.h ESCAPE_QUOTES) -+ CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h ESCAPE_QUOTES) -+ include_directories(${CMAKE_CURRENT_BINARY_DIR}/src) - - option(BUILD_SHARED_LIBS "Build shared libs" ON) - option(BUILD_STATIC_LIBS "Build static libs" OFF) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 50d5b9a..17ddf6b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -248,7 +248,8 @@ else (USE_EXT_GD) + CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) + CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) + +- CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${GD_SOURCE_DIR}/src/config.h ESCAPE_QUOTES) ++ CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h ESCAPE_QUOTES) ++ include_directories(${CMAKE_CURRENT_BINARY_DIR}/src) + + option(BUILD_SHARED_LIBS "Build shared libs" ON) + option(BUILD_STATIC_LIBS "Build static libs" OFF) diff --git a/ports/libgd/portfile.cmake b/ports/libgd/portfile.cmake index 6ef2127d58e14f..aa5d9deb322fb1 100644 --- a/ports/libgd/portfile.cmake +++ b/ports/libgd/portfile.cmake @@ -1,52 +1,34 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libgd/libgd - REF gd-2.2.5 - SHA512 e4ee4c0d1064c93640c29b5741f710872297f42bcc883026a63124807b6ff23bd79ae66bb9148a30811907756c4566ba8f1c0560673ccafc20fee38d82ca838f + REF 2e40f55bfb460fc9d8cbcd290a0c9eb908d5af7e # gd-2.3.2 + SHA512 c3f2db40f774b44e3fd3fbc743efe70916a71ecd948bf8cb4aeb8a9b9fefd9f17e02d82a9481bac6fcc3624f057b5a308925b4196fb612b65bb7304747d33ffa HEAD_REF master PATCHES 0001-fix-cmake.patch no-write-source-dir.patch + intrin.patch + fix_msvc_build.patch ) #delete CMake builtins modules -file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/CMakeParseArguments.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindFreetype.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindJPEG.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindPackageHandleStandardArgs.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindPNG.cmake) - -set(ENABLE_PNG OFF) -if("png" IN_LIST FEATURES) - set(ENABLE_PNG ON) -endif() - -set(ENABLE_JPEG OFF) -if("jpeg" IN_LIST FEATURES) - set(ENABLE_JPEG ON) -endif() - -set(ENABLE_TIFF OFF) -if("tiff" IN_LIST FEATURES) - set(ENABLE_TIFF ON) -endif() - -set(ENABLE_FREETYPE OFF) -if("freetype" IN_LIST FEATURES) - set(ENABLE_FREETYPE ON) -endif() - -set(ENABLE_WEBP OFF) -if("webp" IN_LIST FEATURES) - set(ENABLE_WEBP ON) -endif() - -set(ENABLE_FONTCONFIG OFF) -if("fontconfig" IN_LIST FEATURES) - set(ENABLE_FONTCONFIG ON) -endif() +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/modules/CMakeParseArguments.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/modules/FindFreetype.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/modules/FindJPEG.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/modules/FindPackageHandleStandardArgs.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/modules/FindPNG.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/modules/FindWEBP.cmake") + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + png ENABLE_PNG + jpeg ENABLE_JPEG + tiff ENABLE_TIFF + freetype ENABLE_FREETYPE + webp ENABLE_WEBP + fontconfig ENABLE_FONTCONFIG +) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(LIBGD_SHARED_LIBS ON) @@ -56,22 +38,18 @@ else() set(LIBGD_STATIC_LIBS ON) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DENABLE_PNG=${ENABLE_PNG} - -DENABLE_JPEG=${ENABLE_JPEG} - -DENABLE_TIFF=${ENABLE_TIFF} - -DENABLE_FREETYPE=${ENABLE_FREETYPE} - -DENABLE_WEBP=${ENABLE_WEBP} - -DENABLE_FONTCONFIG=${ENABLE_FONTCONFIG} - -DBUILD_STATIC_LIBS=${LIBGD_STATIC_LIBS} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DLIBGD_SHARED_LIBS=${LIBGD_SHARED_LIBS} + -DBUILD_STATIC_LIBS=${LIBGD_STATIC_LIBS} + -DBUILD_TEST=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgd) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgd/COPYING ${CURRENT_PACKAGES_DIR}/share/libgd/copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libgd/vcpkg.json b/ports/libgd/vcpkg.json new file mode 100644 index 00000000000000..e87ee5bc75cb9e --- /dev/null +++ b/ports/libgd/vcpkg.json @@ -0,0 +1,58 @@ +{ + "name": "libgd", + "version-semver": "2.3.2", + "description": "Open source code library for the dynamic creation of images by programmers.", + "homepage": "https://github.com/libgd/libgd", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + "fontconfig", + "freetype", + "jpeg", + "png", + "tiff", + "webp" + ], + "features": { + "fontconfig": { + "description": "Support for fontconfig", + "dependencies": [ + "fontconfig" + ] + }, + "freetype": { + "description": "Support for freetype", + "dependencies": [ + "freetype" + ] + }, + "jpeg": { + "description": "Support for jpeg", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "png": { + "description": "Support for png", + "dependencies": [ + "libpng" + ] + }, + "tiff": { + "description": "Support for tiff", + "dependencies": [ + "tiff" + ] + }, + "webp": { + "description": "Support for webp", + "dependencies": [ + "libwebp" + ] + } + } +} diff --git a/ports/libgeotiff/CONTROL b/ports/libgeotiff/CONTROL deleted file mode 100644 index 2e8d4836c19d7b..00000000000000 --- a/ports/libgeotiff/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libgeotiff -Version: 1.4.2-9 -Homepage: https://download.osgeo.org/geotiff/libgeotiff -Description: Libgeotiff is an open source library normally hosted on top of libtiff for reading, and writing GeoTIFF information tags. -Build-Depends: tiff, proj4, zlib, libjpeg-turbo diff --git a/ports/libgeotiff/cmakelists.patch b/ports/libgeotiff/cmakelists.patch index 689c6df5b7617f..169ca0bc8dc930 100644 --- a/ports/libgeotiff/cmakelists.patch +++ b/ports/libgeotiff/cmakelists.patch @@ -1,31 +1,24 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0c70973..617978c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -190,22 +190,6 @@ IF(WITH_TIFF) +diff --git a/libgeotiff/CMakeLists.txt b/libgeotiff/CMakeLists.txt +index 43113fa..46331ad 100644 +--- a/libgeotiff/CMakeLists.txt ++++ b/libgeotiff/CMakeLists.txt +@@ -172,6 +172,7 @@ IF(WITH_TIFF) endif () IF(TIFF_FOUND) -- # Confirm required API is available -- INCLUDE(CheckFunctionExists) -- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) -- -- CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) -- IF(NOT HAVE_TIFFOPEN) -- SET(TIFF_FOUND) # ReSET to NOT found for TIFF library -- MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFOpen function not found") -- ENDIF() -- -- CHECK_FUNCTION_EXISTS(TIFFMergeFieldInfo HAVE_TIFFMERGEFIELDINFO) -- IF(NOT HAVE_TIFFMERGEFIELDINFO) -- SET(TIFF_FOUND) # ReSET to NOT found for TIFF library -- MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") -- ENDIF() -- ++ IF (0) + # Confirm required API is available + INCLUDE(CheckFunctionExists) + SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) +@@ -187,6 +188,7 @@ IF(WITH_TIFF) + SET(TIFF_FOUND) # ReSET to NOT found for TIFF library + MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") + ENDIF() ++ ENDIF() + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) ADD_DEFINITIONS(-DHAVE_TIFF=1) - ENDIF(TIFF_FOUND) -@@ -354,11 +338,6 @@ INSTALL(FILES ${GEOTIFF_MAN_PAGES} DESTINATION share/man/man1) +@@ -298,11 +300,6 @@ INSTALL(FILES ${GEOTIFF_MAN_PAGES} DESTINATION share/man/man1) # INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION ${GEOTIFF_INCLUDE_DIR}) INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include) @@ -37,34 +30,10 @@ index 0c70973..617978c 100644 ############################################################################### # Build libgeotiff library -@@ -427,13 +406,9 @@ if (MSVC OR CMAKE_CONFIGURATION_TYPES) - set (CMAKE_DEBUG_POSTFIX _d) - endif () - --ADD_LIBRARY(${GEOTIFF_ARCHIVE_TARGET} STATIC -- ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES}) --SET_TARGET_PROPERTIES(${GEOTIFF_ARCHIVE_TARGET} PROPERTIES -- OUTPUT_NAME ${GEOTIFF_LIB_NAME}) - - # Shared libgeotiff library --ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} SHARED -+ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} - ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES} ${XTIFF_SOURCES}) - - # Windows: -@@ -478,7 +453,7 @@ TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET} - # LIBRARY DESTINATION ${GEOTIFF_LIB_DIR} - # ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR}) - --INSTALL( TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET} -+INSTALL( TARGETS ${GEOTIFF_LIBRARY_TARGET} - EXPORT depends - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib -diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt +diff --git a/libgeotiff/bin/CMakeLists.txt b/libgeotiff/bin/CMakeLists.txt index 7b12341..b6b1d0c 100644 ---- a/bin/CMakeLists.txt -+++ b/bin/CMakeLists.txt +--- a/libgeotiff/bin/CMakeLists.txt ++++ b/libgeotiff/bin/CMakeLists.txt @@ -6,9 +6,6 @@ # ############################################################################### @@ -89,36 +58,26 @@ index 7b12341..b6b1d0c 100644 ${GEOTIFF_LIBRARY_TARGET} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 47a2b00..ffbd004 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -6,13 +6,8 @@ +diff --git a/libgeotiff/cmake/CMakeLists.txt b/libgeotiff/cmake/CMakeLists.txt +index 47a2b00..3809ba3 100644 +--- a/libgeotiff/cmake/CMakeLists.txt ++++ b/libgeotiff/cmake/CMakeLists.txt +@@ -6,6 +6,7 @@ # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative # path to the root from there. (Note that the whole install tree can # be relocated.) --if (NOT WIN32) -- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") -- set (PROJECT_ROOT_DIR "../../..") --else () -- set (INSTALL_CMAKE_DIR "cmake") -- set (PROJECT_ROOT_DIR "..") --endif () -+ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME}") ++if (0) + if (NOT WIN32) + set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") + set (PROJECT_ROOT_DIR "../../..") +@@ -13,6 +14,10 @@ else () + set (INSTALL_CMAKE_DIR "cmake") + set (PROJECT_ROOT_DIR "..") + endif () ++else() ++ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME_LOWER}") + set (PROJECT_ROOT_DIR "../..") ++endif() configure_file (project-config.cmake.in project-config.cmake @ONLY) configure_file (project-config-version.cmake.in -diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in -index 6b5499f..e4ddd11 100644 ---- a/cmake/project-config.cmake.in -+++ b/cmake/project-config.cmake.in -@@ -33,7 +33,7 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin") - message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}") - - set (@PROJECT_NAME@_SHARED_LIBRARIES @GEOTIFF_LIBRARY_TARGET@) --set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_ARCHIVE_TARGET@) -+set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_LIBRARY_TARGET@) - # Read in the exported definition of the library - include ("${_DIR}/@PROJECT_NAME_LOWER@-depends.cmake") - diff --git a/ports/libgeotiff/fix-config-version.patch b/ports/libgeotiff/fix-config-version.patch new file mode 100644 index 00000000000000..173f483d176e64 --- /dev/null +++ b/ports/libgeotiff/fix-config-version.patch @@ -0,0 +1,21 @@ +diff --git a/libgeotiff/cmake/project-config-version.cmake.in b/libgeotiff/cmake/project-config-version.cmake.in +index d695aa2..efe32ba 100644 +--- a/libgeotiff/cmake/project-config-version.cmake.in ++++ b/libgeotiff/cmake/project-config-version.cmake.in +@@ -5,14 +5,14 @@ set (PACKAGE_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@") + set (PACKAGE_VERSION_MINOR "@PROJECT_VERSION_MINOR@") + set (PACKAGE_VERSION_PATCH "@PROJECT_VERSION_PATCH@") + +-if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_NAME@") ++if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_NAME_LOWER@") + # Check package name (in particular, because of the way cmake finds + # package config files, the capitalization could easily be "wrong"). + # This is necessary to ensure that the automatically generated + # variables, e.g., _FOUND, are consistently spelled. Make + # this a WARNING, because this is a user error that needs to be fixed. + message (WARNING +- "Mismatched package names: use find_package(@PROJECT_NAME@ ...) instead" ++ "Mismatched package names: use find_package(@PROJECT_NAME_LOWER@ ...) instead" + " of find_package(${PACKAGE_FIND_NAME} ...)") + set (PACKAGE_VERSION_UNSUITABLE TRUE) + elseif (NOT (APPLE OR CMAKE_SIZEOF_VOID_P EQUAL @CMAKE_SIZEOF_VOID_P@)) diff --git a/ports/libgeotiff/fix-proj4.patch b/ports/libgeotiff/fix-proj4.patch new file mode 100644 index 00000000000000..15960400fb54d7 --- /dev/null +++ b/ports/libgeotiff/fix-proj4.patch @@ -0,0 +1,32 @@ +diff --git a/libgeotiff/CMakeLists.txt b/libgeotiff/CMakeLists.txt +index 46331ad..80fe121 100644 +--- a/libgeotiff/CMakeLists.txt ++++ b/libgeotiff/CMakeLists.txt +@@ -122,13 +122,14 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/libxtiff) + # TIFF support - required, default=ON + SET(WITH_TIFF TRUE CACHE BOOL "Choose if TIFF support should be built") + +-FIND_PACKAGE(PROJ NO_MODULE QUIET) +-if (NOT PROJ_FOUND) ++FIND_PACKAGE(PROJ4 CONFIG REQUIRED) ++if (NOT PROJ4_FOUND) + FIND_PACKAGE(PROJ) + endif () + +-IF(PROJ_FOUND) +- INCLUDE_DIRECTORIES(${PROJ_INCLUDE_DIR}) ++IF(PROJ4_FOUND) ++ INCLUDE_DIRECTORIES(${PROJ4_INCLUDE_DIRS}) ++ ADD_DEFINITIONS(-DHAVE_LIBPROJ=1 -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1) + ELSE() + MESSAGE(FATAL_ERROR "Failed to detect PROJ >= 6") + ENDIF() +@@ -361,7 +362,7 @@ SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES + + TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET} + ${TIFF_LIBRARIES} +- ${PROJ_LIBRARIES} ++ ${PROJ4_LIBRARIES} + ${ZLIB_LIBRARIES} + ${JPEG_LIBRARIES}) + diff --git a/ports/libgeotiff/fix-staticbuild.patch b/ports/libgeotiff/fix-staticbuild.patch new file mode 100644 index 00000000000000..3090753559ed1a --- /dev/null +++ b/ports/libgeotiff/fix-staticbuild.patch @@ -0,0 +1,19 @@ +diff --git a/libgeotiff/CMakeLists.txt b/libgeotiff/CMakeLists.txt +index 80fe121..5c1430d 100644 +--- a/libgeotiff/CMakeLists.txt ++++ b/libgeotiff/CMakeLists.txt +@@ -80,8 +80,12 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + + IF(WIN32) + IF(MSVC) +- ADD_DEFINITIONS(-DBUILD_AS_DLL=1) +- ADD_DEFINITIONS(/DW4) ++ IF(BUILD_SHARED_LIBS) ++ ADD_DEFINITIONS(-DBUILD_AS_DLL=1) ++ ELSE() ++ ADD_DEFINITIONS(-DBUILD_AS_DLL=0) ++ ENDIF() ++ ADD_DEFINITIONS(/DW4) + if (NOT (MSVC_VERSION VERSION_LESS 1400)) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) diff --git a/ports/libgeotiff/geotiff-config.patch b/ports/libgeotiff/geotiff-config.patch index 284c641468bef2..d5c6cca205b70b 100644 --- a/ports/libgeotiff/geotiff-config.patch +++ b/ports/libgeotiff/geotiff-config.patch @@ -1,7 +1,7 @@ diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in index 0dd376aca..0615081bd 100644 ---- a/cmake/project-config.cmake.in -+++ b/cmake/project-config.cmake.in +--- a/libgeotiff/cmake/project-config.cmake.in ++++ b/libgeotiff/cmake/project-config.cmake.in @@ -23,6 +23,12 @@ message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}") message (STATUS "@PROJECT_NAME@ configuration, version ${@PROJECT_NAME@_VERSION}") diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index 1e4bb337086f72..deba3b12b04fe1 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -1,22 +1,19 @@ -include(vcpkg_common_functions) - -set(LIBGEOTIFF_VERSION 1.4.2) - -vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz" - FILENAME "libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz" - SHA512 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${LIBGEOTIFF_VERSION} + REPO OSGeo/libgeotiff + REF 8b1a8f52bc909f86e04ceadd699db102208074a2 #v1.6.0 + SHA512 41715d6a416307a93b2f95874c00ed27c3a0450d70311e77ed45f7ff477bd85f4a69b549bde01dfb9412a62a482467222fc8ed398478e2829e4d112012aab852 + HEAD_REF master PATCHES cmakelists.patch geotiff-config.patch + fix-proj4.patch + fix-staticbuild.patch + fix-config-version.patch ) +set(SOURCE_PATH ${SOURCE_PATH}/libgeotiff) + # Delete FindPROJ4.cmake file(REMOVE ${SOURCE_PATH}/cmake/FindPROJ4.cmake) @@ -24,44 +21,29 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DWITH_TIFF=ON - -DWITH_PROJ4=ON - -DWITH_ZLIB=ON - -DWITH_JPEG=ON - -DWITH_UTILITIES=ON + -DGEOTIFF_BIN_SUBDIR=bin + -DGEOTIFF_DATA_SUBDIR=share + -DWITH_TIFF=1 + -DWITH_PROJ4=1 + -DWITH_ZLIB=1 + -DWITH_JPEG=1 + -DWITH_UTILITIES=1 + -DCMAKE_MACOSX_BUNDLE=0 ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) +vcpkg_copy_tools(TOOL_NAMES applygeo geotifcp listgeo makegeo AUTO_CLEAN) -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe) - file(GLOB GEOTIFF_UTILS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) - file(REMOVE ${GEOTIFF_UTILS_DEBUG}) -endif() - -file(COPY ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff) -file(REMOVE ${GEOTIFF_UTILS}) +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/geotiff TARGET_PATH share/geotiff) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/geotiff/geotiff-config.cmake "if (GeoTIFF_USE_STATIC_LIBS)" "if (1)") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) endif() -vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/GeoTIFF) -file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) -file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) -file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) -file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) -file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/doc ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/libgeotiff/doc) diff --git a/ports/libgeotiff/vcpkg.json b/ports/libgeotiff/vcpkg.json new file mode 100644 index 00000000000000..86ecc9b1ec7ede --- /dev/null +++ b/ports/libgeotiff/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libgeotiff", + "version-string": "1.6.0", + "port-version": 4, + "description": "Libgeotiff is an open source library normally hosted on top of libtiff for reading, and writing GeoTIFF information tags.", + "homepage": "https://github.com/OSGeo/libgeotiff", + "dependencies": [ + "libjpeg-turbo", + "proj4", + "tiff", + "zlib" + ] +} diff --git a/ports/libgit2/CONTROL b/ports/libgit2/CONTROL deleted file mode 100644 index 5569f18ff64ddc..00000000000000 --- a/ports/libgit2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libgit2 -Version: 0.28.3 -Homepage: https://github.com/libgit2/libgit2 -Build-Depends: openssl (!windows&&!uwp) -Description: Git linkable library diff --git a/ports/libgit2/portfile.cmake b/ports/libgit2/portfile.cmake index d2b70483d5b013..c8b1dec1a4a51c 100644 --- a/ports/libgit2/portfile.cmake +++ b/ports/libgit2/portfile.cmake @@ -1,31 +1,81 @@ # libgit2 uses winapi functions not available in WindowsStore -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds are not supported.") -endif() - -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libgit2/libgit2 - REF v0.28.3 - SHA512 15444823b7d4885f7b8c3982f8905efc4a75913de016a9b2e0a24d5ce9746e6a549dffd5469036529557feff2ce7ece9328266eb312c80b96091ce0f65ee97ee + REF 4fd32be01c79a5c003bb47674ac1d76d948518b7#version 1.2.0 + SHA512 f9defe0dd51537ae374fe25ef3ccea74d8d05588f26b1865275067e63ad65a7cd283ee83099b97cea50ef5c367036734ba34be73a06b030be2903344b2778fff HEAD_REF master ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +set(REGEX_BACKEND OFF) +set(USE_HTTPS OFF) + +function(set_regex_backend VALUE) + if(REGEX_BACKEND) + message(FATAL_ERROR "Only one regex backend (pcre,pcre2) is allowed") + endif() + set(REGEX_BACKEND ${VALUE} PARENT_SCOPE) +endfunction() + +function(set_tls_backend VALUE) + if(USE_HTTPS) + message(FATAL_ERROR "Only one TLS backend (openssl,winhttp,sectransp,mbedtls) is allowed") + endif() + set(USE_HTTPS ${VALUE} PARENT_SCOPE) +endfunction() + +foreach(GIT2_FEATURE ${FEATURES}) + if(GIT2_FEATURE STREQUAL "pcre") + set_regex_backend("pcre") + elseif(GIT2_FEATURE STREQUAL "pcre2") + set_regex_backend("pcre2") + elseif(GIT2_FEATURE STREQUAL "openssl") + set_tls_backend("OpenSSL") + elseif(GIT2_FEATURE STREQUAL "winhttp") + if(NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "winhttp is not supported on non-Windows and uwp platforms") + endif() + set_tls_backend("WinHTTP") + elseif(GIT2_FEATURE STREQUAL "sectransp") + if(NOT VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "sectransp is not supported on non-Apple platforms") + endif() + set_tls_backend("SecureTransport") + elseif(GIT2_FEATURE STREQUAL "mbedtls") + if(VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "mbedtls is not supported on Windows because a certificate file must be specified at compile time") + endif() + set_tls_backend("mbedTLS") + endif() +endforeach() + +if(NOT REGEX_BACKEND) + message(FATAL_ERROR "Must choose pcre or pcre2 regex backend") +endif() + +vcpkg_check_features( + OUT_FEATURE_OPTIONS GIT2_FEATURES + FEATURES + ssh USE_SSH +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DBUILD_CLAR=OFF + -DUSE_HTTP_PARSER=system + -DUSE_HTTPS=${USE_HTTPS} + -DREGEX_BACKEND=${REGEX_BACKEND} -DSTATIC_CRT=${STATIC_CRT} + ${GIT2_FEATURES} ) -vcpkg_install_cmake() +vcpkg_cmake_install() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgit2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgit2/COPYING ${CURRENT_PACKAGES_DIR}/share/libgit2/copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libgit2/vcpkg.json b/ports/libgit2/vcpkg.json new file mode 100644 index 00000000000000..c82e7024980e5c --- /dev/null +++ b/ports/libgit2/vcpkg.json @@ -0,0 +1,93 @@ +{ + "name": "libgit2", + "version-semver": "1.2.0", + "description": "Git linkable library", + "homepage": "https://github.com/libgit2/libgit2", + "supports": "!uwp", + "dependencies": [ + "http-parser", + { + "name": "vcpkg-cmake", + "host": true + }, + "zlib" + ], + "default-features": [ + "pcre", + "ssl" + ], + "features": { + "mbedtls": { + "description": "SSL support (mbedTLS)", + "dependencies": [ + "mbedtls" + ] + }, + "openssl": { + "description": "SSL support (OpenSSL)", + "dependencies": [ + "openssl" + ] + }, + "pcre": { + "description": "Build against external libpcre", + "dependencies": [ + "pcre" + ] + }, + "pcre2": { + "description": "Build against external libpcre2", + "dependencies": [ + "pcre2" + ] + }, + "sectransp": { + "description": "SSL support (sectransp)" + }, + "ssh": { + "description": "SSH support via libssh2", + "dependencies": [ + { + "name": "libgit2", + "default-features": false, + "features": [ + "openssl" + ] + }, + "libssh2" + ] + }, + "ssl": { + "description": "Default SSL backend", + "dependencies": [ + { + "name": "libgit2", + "default-features": false, + "features": [ + "sectransp" + ], + "platform": "osx" + }, + { + "name": "libgit2", + "default-features": false, + "features": [ + "winhttp" + ], + "platform": "windows" + }, + { + "name": "libgit2", + "default-features": false, + "features": [ + "openssl" + ], + "platform": "!windows & !osx" + } + ] + }, + "winhttp": { + "description": "SSL support (WinHTTP)" + } + } +} diff --git a/ports/libgnutls/portfile.cmake b/ports/libgnutls/portfile.cmake new file mode 100644 index 00000000000000..a6d074f062326d --- /dev/null +++ b/ports/libgnutls/portfile.cmake @@ -0,0 +1,48 @@ +set(GNUTLS_BRANCH 3.6) +set(GNUTLS_VERSION ${GNUTLS_BRANCH}.15) +set(GNUTLS_HASH f757d1532198f44bcad7b73856ce6a05bab43f6fb77fcc81c59607f146202f73023d0796d3e1e7471709cf792c8ee7d436e19407e0601bc0bda2f21512b3b01c) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.gnupg.org/ftp/gcrypt/gnutls/v${GNUTLS_BRANCH}/gnutls-${GNUTLS_VERSION}.tar.xz" + FILENAME "gnutls-${GNUTLS_VERSION}.tar.xz" + SHA512 ${GNUTLS_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF ${GNUTLS_VERSION} +) + +if(VCPKG_TARGET_IS_OSX) + set(LDFLAGS "-framework CoreFoundation") +else() + set(LDFLAGS "") +endif() + +if ("openssl" IN_LIST FEATURES) + set(OPENSSL_COMPATIBILITY "--enable-openssl-compatibility") +endif() + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + --disable-doc + --disable-silent-rules + --disable-tests + --disable-maintainer-mode + --disable-rpath + --disable-libdane + --with-included-unistring + --without-p11-kit + --without-tpm + ${OPENSSL_COMPATIBILITY} + "LDFLAGS=${LDFLAGS}" +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libgnutls/vcpkg.json b/ports/libgnutls/vcpkg.json new file mode 100644 index 00000000000000..1d48006bedcdab --- /dev/null +++ b/ports/libgnutls/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "libgnutls", + "version": "3.6.15", + "port-version": 2, + "description": "A secure communications library implementing the SSL, TLS and DTLS protocols", + "homepage": "https://www.gnutls.org/", + "supports": "!windows", + "dependencies": [ + "gettext", + "gmp", + "libidn2", + "libtasn1", + "nettle" + ], + "features": { + "openssl": { + "description": "enables the OpenSSL compatibility library" + } + } +} diff --git a/ports/libgo/CONTROL b/ports/libgo/CONTROL deleted file mode 100644 index 18b37915aee595..00000000000000 --- a/ports/libgo/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libgo -Version: 2.8-2 -Build-Depends: boost-context -Description: The best stackful coroutine by c++11. diff --git a/ports/libgo/boost-168.patch b/ports/libgo/boost-168.patch deleted file mode 100644 index 48a90023fdc5a4..00000000000000 --- a/ports/libgo/boost-168.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/libgo/ctx_boost_context/context.h b/libgo/ctx_boost_context/context.h -index 2db71c0..2f321fb 100644 ---- a/libgo/ctx_boost_context/context.h -+++ b/libgo/ctx_boost_context/context.h -@@ -1,4 +1,4 @@ --#include -+#include - - #if BOOST_EXECUTION_CONTEXT == 2 // boost version >= 1.61 - # include "context_v2.h" -diff --git a/libgo/ctx_boost_context/context_v2.h b/libgo/ctx_boost_context/context_v2.h -index e415af4..59e2e29 100644 ---- a/libgo/ctx_boost_context/context_v2.h -+++ b/libgo/ctx_boost_context/context_v2.h -@@ -1,4 +1,4 @@ --#include -+#include - - namespace co - { diff --git a/ports/libgo/cmake.patch b/ports/libgo/cmake.patch index bed9cddaa1ad13..4f1a018d7307f6 100644 --- a/ports/libgo/cmake.patch +++ b/ports/libgo/cmake.patch @@ -1,34 +1,114 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index dbbdd7d..29396a5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -137,7 +137,7 @@ if (UNIX) - set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -Wall -pthread ${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS_DEBUG "-g -pg ${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS}") --else () -+elseif (NOT DISABLE_ADJUST_COMMAND_LINE_FLAGS) - if (NOT DISABLE_DYNAMIC_LIB) - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") -@@ -159,7 +159,7 @@ set(STATIC_T "libgo_static") - add_library("${STATIC_T}" STATIC ${CO_SRC_LIST}) - set_target_properties("${STATIC_T}" PROPERTIES OUTPUT_NAME "${TARGET}") - --if (UNIX) -+if (UNIX OR FORCE_UNIX_TARGETS) - add_subdirectory(${PROJECT_SOURCE_DIR}/libgo/main) - - if (NOT DISABLE_DYNAMIC_LIB) -@@ -180,7 +180,11 @@ if (UNIX) - PATTERN "ctx_boost_coroutine" EXCLUDE - PATTERN "ctx_ucontext" EXCLUDE - PATTERN "*.h") -+ if(UNIX) - install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/linux/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h") -+ else() -+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/windows/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h") -+ endif() - #file(WRITE ${PROJECT_SOURCE_DIR}/tools/libgo.conf "${CMAKE_INSTALL_PREFIX}/lib") - #install(FILES ${PROJECT_SOURCE_DIR}/tools/libgo.conf DESTINATION "/etc/ld.so.conf.d") - if (DEPEND_BOOST) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dfa9b72..e21eee0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,8 +1,9 @@ +-cmake_minimum_required(VERSION 2.8) ++cmake_minimum_required(VERSION 3.0) + + ################################################################################### + project(libgo) + ++if(0) + enable_language(C ASM) + + if (CMAKE_BUILD_TYPE) +@@ -43,34 +44,38 @@ message("-------------- Env ---------------") + message(" CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}") + message(" CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}") + message("----------------------------------") ++endif() ++ ++enable_language(C CXX ASM) ++set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD_REQUIRED ON) ++ ++set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") ++set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") ++set(INSTALL_INCLUDE_DIR "include/${PROJECT_NAME}" CACHE PATH "Path where headers will be installed") ++set(INSTALL_CMAKE_DIR "share/${PROJECT_NAME}" CACHE PATH "Path where cmake configs will be installed") ++set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) ++foreach(p LIB BIN INCLUDE CMAKE) ++ set(var INSTALL_${p}_DIR) ++ if(NOT IS_ABSOLUTE "${${var}}") ++ set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") ++ endif() ++endforeach() ++ ++set(ENABLE_DEBUGGER 0) ++set(ENABLE_HOOK 0) + + configure_file(${PROJECT_SOURCE_DIR}/libgo/common/cmake_config.h.in ${PROJECT_SOURCE_DIR}/libgo/common/cmake_config.h) + message("----------------------------------") + + if (UNIX) +- set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -Wall ${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS_DEBUG "-g") +- set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 -DNDEBUG") +- + set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS S) +- message("--> select asm source file, please wait about 5 seconds ...") + execute_process(COMMAND "${PROJECT_SOURCE_DIR}/third_party/select_asm.sh" "${PROJECT_SOURCE_DIR}" "jump" OUTPUT_VARIABLE jump_asm_file) + execute_process(COMMAND "${PROJECT_SOURCE_DIR}/third_party/select_asm.sh" "${PROJECT_SOURCE_DIR}" "make" OUTPUT_VARIABLE make_asm_file) + elseif (WIN32) +- # windows platform + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd /EHsc") +- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT /EHsc") +- +- #set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm) +- #file(COPY ${PROJECT_SOURCE_DIR}/third_party/boost.context/libs/context/src/asm/make_x86_64_ms_pe_masm.asm DESTINATION ${PROJECT_SOURCE_DIR}/libgo/context) +- #file(COPY ${PROJECT_SOURCE_DIR}/third_party/boost.context/libs/context/src/asm/jump_x86_64_ms_pe_masm.asm DESTINATION ${PROJECT_SOURCE_DIR}/libgo/context) + endif() + +-message("------------ Cxx flags -------------") +-message(" CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}: ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}") +-message("------------------------------------") +- + include_directories(${PROJECT_SOURCE_DIR}) + aux_source_directory(${PROJECT_SOURCE_DIR}/libgo CO_SRC_LIST) + aux_source_directory(${PROJECT_SOURCE_DIR}/libgo/common CO_SRC_LIST) +@@ -97,6 +102,7 @@ else() + aux_source_directory(${PROJECT_SOURCE_DIR}/libgo/netio/disable_hook CO_SRC_LIST) + endif() + ++if(0) + set(TARGET "libgo") + set(STATIC_T "libgo_static") + set(STATIC_HOOK "static_hook") +@@ -136,7 +142,6 @@ if (UNIX) + ) + + set(PROFILE_FLAGS "-pg ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}") +- + #message("PROFILE_FLAGS: ${PROFILE_FLAGS}") + add_custom_target(profile + COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=PROFILE -DCMAKE_CXX_FLAGS_PROFILE=\\'${PROFILE_FLAGS}\\' ${CMAKE_SOURCE_DIR} +@@ -160,3 +165,27 @@ if (WIN32) + add_subdirectory(${PROJECT_SOURCE_DIR}/tutorial) + endif() + endif() ++endif() ++ ++list(APPEND CO_SRC_LIST ${jump_asm_file}) ++list(APPEND CO_SRC_LIST ${make_asm_file}) ++add_library(${PROJECT_NAME} ${CO_SRC_LIST}) ++target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS}) ++if (WIN32) ++ target_link_libraries(${PROJECT_NAME} ws2_32) ++ set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4819 /wd4267") ++endif() ++ ++install(TARGETS ${PROJECT_NAME} ++ EXPORT "${PROJECT_NAME}Config" ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ RUNTIME DESTINATION bin) ++ ++install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/ ++ DESTINATION ${INSTALL_INCLUDE_DIR} ++ FILES_MATCHING PATTERN "*.h") ++ ++install(EXPORT "${PROJECT_NAME}Config" ++ NAMESPACE libgo:: ++ DESTINATION "${INSTALL_CMAKE_DIR}") diff --git a/ports/libgo/libgo-config.cmake b/ports/libgo/libgo-config.cmake deleted file mode 100644 index fd52f8dd3cc8e8..00000000000000 --- a/ports/libgo/libgo-config.cmake +++ /dev/null @@ -1,25 +0,0 @@ -get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) - -if(NOT LIBGO_FIND_COMPONENTS) - set(LIBGO_FIND_COMPONENTS libgo libgo) - if(LIBGO_FIND_REQUIRED) - set(LIBGO_FIND_REQUIRED_libgo TRUE) - endif() - - set(LIBGO_FOUND TRUE) -endif() - -set(LIBGO_INCLUDE_DIRS ${_DIR}/../../include) -set(LIBGO_LIBRARIES) -if (EXISTS ${_DIR}/../../lib/liblibgo.a) - list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/liblibgo.a) -endif() -if (EXISTS ${_DIR}/../../debug/lib/liblibgo.a) - list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/liblibgo.a) -endif() -if (EXISTS ${_DIR}/../../lib/libgo.lib) - list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/libgo.lib) -endif() -if (EXISTS ${_DIR}/../../debug/lib/libgo.lib) - list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/libgo.lib) -endif() diff --git a/ports/libgo/portfile.cmake b/ports/libgo/portfile.cmake index f0311eea4060b5..e365ee3a118321 100644 --- a/ports/libgo/portfile.cmake +++ b/ports/libgo/portfile.cmake @@ -1,62 +1,44 @@ -include(vcpkg_common_functions) - +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO yyzybb537/libgo - REF v2.8 - SHA512 44784de4aec36ea321195c11c99a73de4f6f51285febdf6980e8aaced1fdfc0a34c6b1a8acc8c6b424e747310a1d7fb1604f722084c28ab91f8ebee15667d59b + REF 5d4f36508e8eb2d5aa17cf37cd951dc91da23096 #v3.1 + SHA512 0f281f58116148ba1dd3904febbc391d47190f8e148b70bed7c4b7e6cb3efa5e41e2b7be4832ceeb805996e085f4c2d89fd0cf3b0651e037b32758d6a441411b HEAD_REF master PATCHES cmake.patch - boost-168.patch ) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/XBased/xhook/archive/e18c450541892212ca4f11dc91fa269fabf9646f.tar.gz" - FILENAME "xhook-e18c450541892212ca4f11dc91fa269fabf9646f.tar.gz" +vcpkg_from_github( + OUT_SOURCE_PATH XHOOK_SOURCE_PATH + REPO XBased/xhook + REF e18c450541892212ca4f11dc91fa269fabf9646f SHA512 1bcf320f50cff13d92013a9f0ab5c818c2b6b63e9c1ac18c5dd69189e448d7a848f1678389d8b2c08c65f907afb3909e743f6c593d9cfb21e2bb67d5c294a166 + HEAD_REF master ) -file(REMOVE_RECURSE ${SOURCE_PATH}/third_party) - -vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}/third_party) -file(RENAME ${SOURCE_PATH}/third_party/xhook-e18c450541892212ca4f11dc91fa269fabf9646f ${SOURCE_PATH}/third_party/xhook) +file(REMOVE_RECURSE "${SOURCE_PATH}/third_party") +file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party") +file(RENAME "${XHOOK_SOURCE_PATH}" "${SOURCE_PATH}/third_party/xhook") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DDISABLE_ADJUST_COMMAND_LINE_FLAGS=ON - -DDISABLE_DYNAMIC_LIB=ON - -DENABLE_BOOST_CONTEXT=ON - -DFORCE_UNIX_TARGETS=ON - -DDISABLE_SYSTEMWIDE=ON +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() -# remove duplicated include files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libgo/disable_hook) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/libgo/netio/disable_hook") -file(GLOB REL_MAIN ${CURRENT_PACKAGES_DIR}/lib/libgo_main.lib ${CURRENT_PACKAGES_DIR}/lib/liblibgo_main.a) -if(REL_MAIN) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(COPY ${REL_MAIN} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(REMOVE ${REL_MAIN}) +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/libgo/netio/unix/static_hook") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/libgo/netio/windows") +else() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/libgo/netio/unix") endif() -file(GLOB DBG_MAIN ${CURRENT_PACKAGES_DIR}/debug/lib/libgo_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/liblibgo_main.a) -if(DBG_MAIN) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(COPY ${DBG_MAIN} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(REMOVE ${DBG_MAIN}) -endif() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgo RENAME copyright) -file(INSTALL ${CURRENT_PORT_DIR}/libgo-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgo) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libgo/usage b/ports/libgo/usage deleted file mode 100644 index a8f0729476a98b..00000000000000 --- a/ports/libgo/usage +++ /dev/null @@ -1,5 +0,0 @@ -The package libgo provides CMake integration: - - find_package(libgo REQUIRED) - target_include_directories(main PRIVATE ${LIBGO_INCLUDE_DIRS}) - target_link_libraries(main PRIVATE ${LIBGO_LIBRARIES}) diff --git a/ports/libgo/vcpkg.json b/ports/libgo/vcpkg.json new file mode 100644 index 00000000000000..47377a3e87b270 --- /dev/null +++ b/ports/libgo/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "libgo", + "version": "3.1", + "port-version": 3, + "description": "The best stackful coroutine by c++11.", + "homepage": "https://github.com/yyzybb537/libgo", + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libgpg-error/add_cflags_to_tools.patch b/ports/libgpg-error/add_cflags_to_tools.patch new file mode 100644 index 00000000000000..53c86bef8b9271 --- /dev/null +++ b/ports/libgpg-error/add_cflags_to_tools.patch @@ -0,0 +1,30 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index fc3acc3..9a86251 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -279,14 +279,14 @@ gpg-error.def: Makefile gpg-error.def.in + # It is correct to use $(CC_FOR_BUILD) here. We want to run the + # program at build time. + mkerrcodes$(EXEEXT_FOR_BUILD): mkerrcodes.c mkerrcodes.h Makefile +- $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CFLAGS) $(LDFLAGS_FOR_BUILD) \ + $(CPPFLAGS_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkerrcodes.c + + if HAVE_W32CE_SYSTEM + # It is correct to use $(CC_FOR_BUILD) here. We want to run the + # program at build time. + mkw32errmap$(EXEEXT_FOR_BUILD): mkw32errmap.c mkw32errmap.tab.h Makefile +- $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CFLAGS) $(LDFLAGS_FOR_BUILD) \ + $(CPPFLAGS_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkw32errmap.c + endif + +@@ -300,7 +300,7 @@ errnos-sym.h: Makefile mkstrtable.awk errnos.in + + + mkheader$(EXEEXT_FOR_BUILD): mkheader.c Makefile +- $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CFLAGS) $(LDFLAGS_FOR_BUILD) \ + $(CPPFLAGS_FOR_BUILD) -g -I. -I$(srcdir) -o $@ $(srcdir)/mkheader.c + + parts_of_gpg_error_h = \ diff --git a/ports/libgpg-error/outdir.patch b/ports/libgpg-error/outdir.patch new file mode 100644 index 00000000000000..db87bfde67428e --- /dev/null +++ b/ports/libgpg-error/outdir.patch @@ -0,0 +1,152 @@ +diff --git a/SMP/smp.props b/SMP/smp.props +index e2ed214..fc70bd8 100644 +--- a/SMP/smp.props ++++ b/SMP/smp.props +@@ -87,7 +87,7 @@ + + + lib$(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -95,7 +95,7 @@ + + + lib$(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -103,7 +103,7 @@ + + + $(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -111,7 +111,7 @@ + + + $(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -119,7 +119,7 @@ + + + lib$(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -127,7 +127,7 @@ + + + lib$(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -135,7 +135,7 @@ + + + $(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -143,7 +143,7 @@ + + + $(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +diff --git a/SMP/smp_winrt.props b/SMP/smp_winrt.props +index 9b453a5..cb5f090 100644 +--- a/SMP/smp_winrt.props ++++ b/SMP/smp_winrt.props +@@ -98,7 +98,7 @@ + + + lib$(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -106,7 +106,7 @@ + + + lib$(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -114,7 +114,7 @@ + + + $(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -122,7 +122,7 @@ + + + $(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -130,7 +130,7 @@ + + + lib$(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -138,7 +138,7 @@ + + + lib$(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -146,7 +146,7 @@ + + + $(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -154,7 +154,7 @@ + + + $(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean diff --git a/ports/libgpg-error/portfile.cmake b/ports/libgpg-error/portfile.cmake new file mode 100644 index 00000000000000..711f7e76e62442 --- /dev/null +++ b/ports/libgpg-error/portfile.cmake @@ -0,0 +1,97 @@ +set (PACKAGE_VERSION 1.42) + +if(VCPKG_TARGET_IS_WINDOWS) + message(WARNING "libgpg-error on Windows uses a fork managed by the ShiftMediaProject: https://shiftmediaproject.github.io/") + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/libgpg-error + REF libgpg-error-${PACKAGE_VERSION} + SHA512 2dbf41e28196f4b99d641a430e6e77566ae2d389bbe9d6f6e310d56a5ca90de9b9ae225a3eee979fe4606d36878d3db6f777162d697de717b4748151dd3525d0 + HEAD_REF master + PATCHES + outdir.patch + runtime.patch + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CONFIGURATION_RELEASE ReleaseDLL) + set(CONFIGURATION_DEBUG DebugDLL) + else() + set(CONFIGURATION_RELEASE Release) + set(CONFIGURATION_DEBUG Debug) + endif() + + if(VCPKG_TARGET_IS_UWP) + string(APPEND CONFIGURATION_RELEASE WinRT) + string(APPEND CONFIGURATION_DEBUG WinRT) + endif() + + if(VCPKG_TARGET_IS_UWP) + set(_gpg-errorproject "${SOURCE_PATH}/SMP/libgpg-error_winrt.vcxproj") + else() + set(_gpg-errorproject "${SOURCE_PATH}/SMP/libgpg-error.vcxproj") + endif() + + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(RuntimeLibraryExt "") + else() + set(RuntimeLibraryExt "DLL") + endif() + + vcpkg_install_msbuild( + USE_VCPKG_INTEGRATION + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH SMP/libgpg-error.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} + LICENSE_SUBPATH COPYING.LIB + RELEASE_CONFIGURATION ${CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${CONFIGURATION_DEBUG} + SKIP_CLEAN + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" + ) + + get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME) + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}/msvc/include" "${CURRENT_PACKAGES_DIR}/include") + + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/include") + set(GPG_ERROR_CONFIG_LIBS "-L\${libdir} -lgpg-error") + configure_file("${SOURCE_PATH}/src/gpg-error.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gpg-error.pc" @ONLY) + + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/../include") + set(GPG_ERROR_CONFIG_LIBS "-L\${libdir} -lgpg-errord") + configure_file("${SOURCE_PATH}/src/gpg-error.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gpg-error.pc" @ONLY) + vcpkg_fixup_pkgconfig() + vcpkg_copy_pdbs() + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/COPYING.LIB" "${CURRENT_PACKAGES_DIR}/debug/lib/COPYING.LIB") +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gpg/libgpg-error + REF libgpg-error-${PACKAGE_VERSION} + SHA512 f5a1c1874ac1dee36ee01504f1ab0146506aa7af810879e192eac17a31ec81945fe850953ea1c57188590c023ce3ff195c7cab62af486b731fa1534546d66ba3 + HEAD_REF master + PATCHES + add_cflags_to_tools.patch + ) + + vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --disable-tests + --disable-doc + --disable-silent-rules + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + vcpkg_copy_pdbs() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/locale" "${CURRENT_PACKAGES_DIR}/debug/share") + file(INSTALL "${SOURCE_PATH}/COPYING.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endif() \ No newline at end of file diff --git a/ports/libgpg-error/runtime.patch b/ports/libgpg-error/runtime.patch new file mode 100644 index 00000000000000..3339850811fdf3 --- /dev/null +++ b/ports/libgpg-error/runtime.patch @@ -0,0 +1,244 @@ +diff --git a/SMP/smp.props b/SMP/smp.props +index fc70bd8..d515523 100644 +--- a/SMP/smp.props ++++ b/SMP/smp.props +@@ -86,7 +86,7 @@ + + + +- lib$(RootNamespace)d ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -94,7 +94,7 @@ + MSB8012 + + +- lib$(RootNamespace)d ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -118,7 +118,7 @@ + MSB8012 + + +- lib$(RootNamespace) ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -126,7 +126,7 @@ + MSB8012 + + +- lib$(RootNamespace) ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -159,6 +159,7 @@ + $(OutDir)\lib\x86\$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -177,6 +178,7 @@ + $(OutDir)\lib\x64\$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -196,6 +198,7 @@ + $(IntDir)$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\bin\x86\$(TargetName)$(TargetExt) +@@ -219,6 +222,7 @@ + $(IntDir)$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -248,6 +252,7 @@ + SingleFile + $(OutDir)\lib\x86\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -273,6 +278,7 @@ + SingleFile + $(OutDir)\lib\x64\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -297,6 +303,7 @@ + $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + true +@@ -328,6 +335,7 @@ + $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + true +diff --git a/SMP/smp_winrt.props b/SMP/smp_winrt.props +index cb5f090..f7d8e23 100644 +--- a/SMP/smp_winrt.props ++++ b/SMP/smp_winrt.props +@@ -97,7 +97,7 @@ + + + +- lib$(RootNamespace)d_winrt ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -105,7 +105,7 @@ + MSB8012 + + +- lib$(RootNamespace)d_winrt ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -113,7 +113,7 @@ + MSB8012 + + +- $(RootNamespace)d_winrt ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -121,7 +121,7 @@ + MSB8012 + + +- $(RootNamespace)d_winrt ++ $(RootNamespace)d + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -129,7 +129,7 @@ + MSB8012 + + +- lib$(RootNamespace)_winrt ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -137,7 +137,7 @@ + MSB8012 + + +- lib$(RootNamespace)_winrt ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -145,7 +145,7 @@ + MSB8012 + + +- $(RootNamespace)_winrt ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -153,7 +153,7 @@ + MSB8012 + + +- $(RootNamespace)_winrt ++ $(RootNamespace) + $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated +@@ -172,6 +172,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -192,6 +193,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -213,6 +215,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\bin\x86\$(TargetName)$(TargetExt) +@@ -240,6 +243,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -273,6 +277,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -301,6 +306,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -327,6 +333,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + true +@@ -362,6 +369,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ $(RuntimeLibrary) + + + true diff --git a/ports/libgpg-error/vcpkg.json b/ports/libgpg-error/vcpkg.json new file mode 100644 index 00000000000000..81024b701a43a3 --- /dev/null +++ b/ports/libgpg-error/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libgpg-error", + "version": "1.42", + "port-version": 1, + "description": "A common dependency of all GnuPG components", + "homepage": "https://gnupg.org/software/libgpg-error/index.html", + "supports": "!(windows & (arm | arm64))" +} diff --git a/ports/libgpod/configure.ac.patch b/ports/libgpod/configure.ac.patch new file mode 100644 index 00000000000000..53ca42c2db5316 --- /dev/null +++ b/ports/libgpod/configure.ac.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index a52ac3a78..ac5cf03f4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,7 +42,7 @@ AC_CHECK_FUNCS([localtime_r]) + AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include ]) + dnl sqlite3 is needed for newer ipod models (nano5g), and libplist is needed + dnl by libgpod sqlite code +-PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.8.0 gobject-2.0 sqlite3 libplist >= 1.0) ++PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.8.0 gmodule-2.0 gobject-2.0 sqlite3 libplist >= 1.0) + + dnl ************************************************** + dnl we've copied gchecksum from glib 2.16. Only use the diff --git a/ports/libgpod/portfile.cmake b/ports/libgpod/portfile.cmake new file mode 100644 index 00000000000000..397f0e5d125313 --- /dev/null +++ b/ports/libgpod/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux platform" ON_TARGET "Windows" "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fadingred/libgpod + REF 4a8a33ef4bc58eee1baca6793618365f75a5c3fa + SHA512 b7a120c1106c1205e8de2808de5ac4ff1cf189943017939a5ea4eded4e1ceef44557587e69a8591cc5249f8c8dbf0cbdcce1dd309d33a0e9207b0560abe3ae39 + HEAD_REF master + PATCHES configure.ac.patch +) + +vcpkg_execute_required_process( + COMMAND intltoolize --force --copy --automake + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME intltoolize-${TARGET_TRIPLET} +) +vcpkg_execute_required_process( + COMMAND gtkdocize --copy + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME gtkdocize-${TARGET_TRIPLET} +) +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + --without-hal + --disable-gdk-pixbuf + --disable-pygobject + --disable-more-warnings + --disable-libxml + --disable-gtk-doc-html +) +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libgpod/vcpkg.json b/ports/libgpod/vcpkg.json new file mode 100644 index 00000000000000..3915e50b11d2bb --- /dev/null +++ b/ports/libgpod/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libgpod", + "version-date": "2019-08-29", + "port-version": 3, + "description": "libgpod is a library meant to abstract access to an iPod content.", + "homepage": "https://github.com/fadingred/libgpod", + "dependencies": [ + "glib", + "libplist", + "sqlite3" + ] +} diff --git a/ports/libgta/CONTROL b/ports/libgta/CONTROL deleted file mode 100644 index d338243cf12ab6..00000000000000 --- a/ports/libgta/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libgta -Version: 1.0.8-1 -Homepage: https://download.savannah.nongnu.org/releases/gta -Description: Libgta is a portable library that implements the Generic Tagged Array (GTA) file format. -Build-Depends: bzip2, zlib, liblzma diff --git a/ports/libgta/portfile.cmake b/ports/libgta/portfile.cmake index 1bbe6325c75861..1e4b0f95102f99 100644 --- a/ports/libgta/portfile.cmake +++ b/ports/libgta/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(LIBGTA_VERSION 1.0.8) set(LIBGTA_HASH 99ec3d6317c9a12cf440a60bb989cc7a3fe35e0a1da3e65206e5cd52b69fb860850e61ea0f819511ef48ddc87c468c0ded710409990627096738886e1b358423) diff --git a/ports/libgta/vcpkg.json b/ports/libgta/vcpkg.json new file mode 100644 index 00000000000000..789978fe468767 --- /dev/null +++ b/ports/libgta/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libgta", + "version-string": "1.0.8", + "port-version": 2, + "description": "Libgta is a portable library that implements the Generic Tagged Array (GTA) file format.", + "homepage": "https://download.savannah.nongnu.org/releases/gta", + "dependencies": [ + "bzip2", + "liblzma", + "zlib" + ] +} diff --git a/ports/libguarded/portfile.cmake b/ports/libguarded/portfile.cmake new file mode 100644 index 00000000000000..dd6b9368656b97 --- /dev/null +++ b/ports/libguarded/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO copperspice/cs_libguarded + REF 1f159aa866a50f5d2952de41d8a99821b8ec37df + SHA512 91380262e65ec7b8990c500c60b8d141960be24b69e01a4661c2e8fbfdb8e315c9a4509c2c65a74bc60a8fe690d6dbc8f2b39757d13da5068c95283a19d4c6c4 + HEAD_REF master +) + +File(COPY ${SOURCE_PATH}/src/libguarded DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libguarded/vcpkg.json b/ports/libguarded/vcpkg.json new file mode 100644 index 00000000000000..d6bc463967f01b --- /dev/null +++ b/ports/libguarded/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libguarded", + "version-string": "2019-08-27", + "port-version": 2, + "description": "The libGuarded library is a standalone header-only library for multithreaded programming.", + "homepage": "https://github.com/copperspice/libguarded" +} diff --git a/ports/libgwenhywfar/portfile.cmake b/ports/libgwenhywfar/portfile.cmake new file mode 100644 index 00000000000000..553825fab4aa6e --- /dev/null +++ b/ports/libgwenhywfar/portfile.cmake @@ -0,0 +1,67 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports unix platforms" ON_TARGET "Windows") + +set(VERSION_MAJOR 5) +set(VERSION_MINOR 6) +set(VERSION_PATCH 0) +set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.aquamaniac.de/rdm/attachments/download/364/gwenhywfar-${VERSION}.tar.gz" + FILENAME "gwenhywfar-${VERSION}.tar.gz" + SHA512 9875d677f49fc0a46f371fd1954d15d99c7d5994e90b16f1be7a5b8a1cbcd74ae9733e4541afd6d8251a2ba1a0a37c28e0f248952b7c917313fbf5b38b1d8d11 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} +) + +if ("libxml2" IN_LIST FEATURES) + set(WITH_LIBXML2_CODE "--with-libxml2-code=yes") +endif() +if ("cpp" IN_LIST FEATURES) + list(APPEND FEATURES_GUI "cpp") +endif() +if ("qt5" IN_LIST FEATURES) + list(APPEND FEATURES_GUI "qt5") +endif() + +list(JOIN FEATURES_GUI " " GUIS) + +if(VCPKG_TARGET_IS_OSX) + set(LDFLAGS "-framework CoreFoundation -framework Security") +else() + set(LDFLAGS "") +endif() + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --disable-silent-rules + --disable-binreloc + --with-guis=${GUIS} + --with-libgpg-error-prefix=${CURRENT_INSTALLED_DIR}/tools/libgpg-error + --with-libgcrypt-prefix=${CURRENT_INSTALLED_DIR}/tools/libgcrypt + --with-qt5-qmake=${CURRENT_INSTALLED_DIR}/tools/qt5/bin/qmake + --with-qt5-moc=${CURRENT_INSTALLED_DIR}/tools/qt5/bin/moc + --with-qt5-uic=${CURRENT_INSTALLED_DIR}/tools/qt5/bin/uic + ${WITH_LIBXML2_CODE} + "LDFLAGS=${LDFLAGS}" +) + +vcpkg_install_make() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +foreach(GUI IN LISTS FEATURES_GUI) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gwengui-${GUI}-${VERSION_MAJOR}.${VERSION_MINOR} TARGET_PATH share/gwengui-${GUI}-${VERSION_MAJOR}.${VERSION_MINOR} DO_NOT_DELETE_PARENT_CONFIG_PATH) +endforeach() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gwenhywfar-${VERSION_MAJOR}.${VERSION_MINOR}) + +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tools(SEARCH_DIR ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin TOOL_NAMES gct-tool gsa mklistdoc typemaker typemaker2 xmlmerge AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libgwenhywfar/vcpkg.json b/ports/libgwenhywfar/vcpkg.json new file mode 100644 index 00000000000000..c02dca482b2d02 --- /dev/null +++ b/ports/libgwenhywfar/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "libgwenhywfar", + "version-semver": "5.6.0", + "description": "A helper library for networking and security applications and libraries", + "homepage": "https://www.aquamaniac.de/rdm/", + "supports": "!windows", + "dependencies": [ + "libgcrypt", + { + "name": "libgnutls", + "features": [ + "openssl" + ] + } + ], + "default-features": [ + "cpp", + "libxml2" + ], + "features": { + "cpp": { + "description": "C++ bindings" + }, + "libxml2": { + "description": "Enables libXML2-depending functionality", + "dependencies": [ + "libxml2" + ] + }, + "qt5": { + "description": "Qt bindings", + "dependencies": [ + "qt5-base" + ] + }, + "tools": { + "description": "Some helper tools provided by Gwenhywfar and useful for applications using it" + } + } +} diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL deleted file mode 100644 index f8d2ca29a3fbb7..00000000000000 --- a/ports/libharu/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libharu -Version: 2017-08-15-8 -Homepage: https://github.com/libharu/libharu -Description: libharu - free PDF library -Build-Depends: zlib, libpng diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake index 962550ca88e1db..20c5952547b937 100644 --- a/ports/libharu/portfile.cmake +++ b/ports/libharu/portfile.cmake @@ -1,5 +1,8 @@ -include(vcpkg_common_functions) - +if("notiffsymbols" IN_LIST FEATURES) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(DISABLETIFF tiff.patch) + endif() +endif() vcpkg_download_distfile(SHADING_PR URLS "https://github.com/libharu/libharu/pull/157.diff" FILENAME "libharu-shading-pr-157.patch" @@ -17,6 +20,7 @@ vcpkg_from_github( add-boolean-typedef.patch # This patch adds shading support which is required for VTK. If desired, this could be moved into an on-by-default feature. ${SHADING_PR} + ${DISABLETIFF} ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -27,34 +31,41 @@ else() set(VCPKG_BUILD_STATIC_LIBS ON) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DLIBHPDF_STATIC=${VCPKG_BUILD_STATIC_LIBS} -DLIBHPDF_SHARED=${VCPKG_BUILD_SHARED_LIBS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib ${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib) + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib" "${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib") + endif() + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib") + endif() else() - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.a ${CURRENT_PACKAGES_DIR}/lib/libhpdf.a) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfs.a ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.a) + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libhpdfs.a" "${CURRENT_PACKAGES_DIR}/lib/libhpdf.a") + endif() + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfs.a" "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.a") + endif() endif() endif() file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/README - ${CURRENT_PACKAGES_DIR}/debug/CHANGES - ${CURRENT_PACKAGES_DIR}/debug/INSTALL - ${CURRENT_PACKAGES_DIR}/README - ${CURRENT_PACKAGES_DIR}/CHANGES - ${CURRENT_PACKAGES_DIR}/INSTALL + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/README" + "${CURRENT_PACKAGES_DIR}/debug/CHANGES" + "${CURRENT_PACKAGES_DIR}/debug/INSTALL" + "${CURRENT_PACKAGES_DIR}/README" + "${CURRENT_PACKAGES_DIR}/CHANGES" + "${CURRENT_PACKAGES_DIR}/INSTALL" ) file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf.h" _contents) @@ -73,6 +84,5 @@ else() endif() file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" "${_contents}") -file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libharu RENAME copyright) - vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/LICENCE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libharu/tiff.patch b/ports/libharu/tiff.patch new file mode 100644 index 00000000000000..2aabbe32e7c711 --- /dev/null +++ b/ports/libharu/tiff.patch @@ -0,0 +1,25 @@ +diff --git a/src/hpdf_image_ccitt.c b/src/hpdf_image_ccitt.c +index 2937fc90d..a1a35d0ed 100644 +--- a/src/hpdf_image_ccitt.c ++++ b/src/hpdf_image_ccitt.c +@@ -21,7 +21,6 @@ + #include + #include + +-#define G3CODES + #include "t4.h" + + typedef unsigned int uint32; +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 354ca7526..ee301d9af 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -99,6 +99,8 @@ if(PNG_FOUND) + set(ADDITIONAL_LIBRARIES ${ADDITIONAL_LIBRARIES} ${PNG_LIBRARIES}) + endif(PNG_FOUND) + ++find_package(TIFF REQUIRED) ++list(APPEND ADDITIONAL_LIBRARIES TIFF::TIFF) + + # ======================================================================= + # configure header files, add compiler flags diff --git a/ports/libharu/vcpkg.json b/ports/libharu/vcpkg.json new file mode 100644 index 00000000000000..76537e89f59694 --- /dev/null +++ b/ports/libharu/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "libharu", + "version-string": "2017-08-15", + "port-version": 10, + "description": "libharu - free PDF library", + "homepage": "https://github.com/libharu/libharu", + "dependencies": [ + "libpng", + { + "name": "vcpkg-cmake", + "host": true + }, + "zlib" + ], + "default-features": [ + "notiffsymbols" + ], + "features": { + "notiffsymbols": { + "description": "disable symbols also defined by the tiff port", + "dependencies": [ + "tiff" + ] + } + } +} diff --git a/ports/libhdfs3/libhdfs3Config.cmake b/ports/libhdfs3/libhdfs3Config.cmake new file mode 100644 index 00000000000000..ed672579e1a755 --- /dev/null +++ b/ports/libhdfs3/libhdfs3Config.cmake @@ -0,0 +1,17 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) + +SET_LIBRARY_TARGET("HDFS" "hdfs3" "${ROOT}/debug/lib/libhdfs3.a" "${ROOT}/lib/libhdfs3.a" "${ROOT}/include/hdfs") diff --git a/ports/libhdfs3/portfile.cmake b/ports/libhdfs3/portfile.cmake new file mode 100644 index 00000000000000..4bbc7621e87e14 --- /dev/null +++ b/ports/libhdfs3/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO erikmuttersbach/libhdfs3 + REF 9a60d79812d6dee72455f61bff57a93c3c7d56f5 + SHA512 2b635ab979230c251243f01717105872245d7948f75832e58f50a09b0b06d1b366b3c5f3a3253fa538076e9f199003f28d10b9958293144dbc301276073a0633 + HEAD_REF apache-rpc-9 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/libhdfs3Config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/libhdfs3/usage b/ports/libhdfs3/usage new file mode 100644 index 00000000000000..780d82d25683f1 --- /dev/null +++ b/ports/libhdfs3/usage @@ -0,0 +1,4 @@ +The package libhdfs3 is compatible with built-in CMake targets: + + FIND_PACKAGE(libhdfs3 REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE HDFS::hdfs3) diff --git a/ports/libhdfs3/vcpkg.json b/ports/libhdfs3/vcpkg.json new file mode 100644 index 00000000000000..aebe7c702ed492 --- /dev/null +++ b/ports/libhdfs3/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libhdfs3", + "version-string": "2019-11-05", + "port-version": 1, + "description": "Native Hadoop RPC protocol and HDFS data transfer protocol implementation", + "homepage": "https://github.com/erikmuttersbach/libhdfs3", + "dependencies": [ + "boost", + "libuuid", + "libxml2", + "protobuf" + ] +} diff --git a/ports/libheif/disable-depend-dav1d.patch b/ports/libheif/disable-depend-dav1d.patch new file mode 100644 index 00000000000000..88859272e6e713 --- /dev/null +++ b/ports/libheif/disable-depend-dav1d.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 05afd5d..1e7f36f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -65,7 +65,9 @@ if (WITH_AOM) + find_package(LibAOM) + endif() + find_package(Rav1e) ++if (WITH_DAV1D) + find_package(Dav1d) ++endif() + + if (LIBDE265_FOUND) + message("HEIF decoder, libde265: found") diff --git a/ports/libheif/gdk-pixbuf.patch b/ports/libheif/gdk-pixbuf.patch new file mode 100644 index 00000000000000..ad2c1e5aea8f8c --- /dev/null +++ b/ports/libheif/gdk-pixbuf.patch @@ -0,0 +1,25 @@ +diff --git a/gdk-pixbuf/CMakeLists.txt b/gdk-pixbuf/CMakeLists.txt +index 85ad59708..d6aa4a5f9 100644 +--- a/gdk-pixbuf/CMakeLists.txt ++++ b/gdk-pixbuf/CMakeLists.txt +@@ -1,9 +1,9 @@ + if(UNIX) + find_package(PkgConfig) + find_package(Threads) +- pkg_check_modules(GDKPIXBUF2 gdk-pixbuf-2.0) ++ pkg_check_modules(GDKPIXBUF2 gdk-pixbuf-2.0 IMPORTED_TARGET) + + if(GDKPIXBUF2_FOUND) +- execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} gdk-pixbuf-2.0 --variable gdk_pixbuf_moduledir --define-variable=prefix=${CMAKE_INSTALL_PREFIX} OUTPUT_VARIABLE GDKPIXBUF2_MODULE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) ++ pkg_get_variable(GDKPIXBUF2_MODULE_DIR gdk-pixbuf-2.0 gdk_pixbuf_moduledir) + + add_library(pixbufloader-heif MODULE pixbufloader-heif.c) +@@ -13,7 +13,7 @@ if(UNIX) + ${GDKPIXBUF2_INCLUDE_DIRS} + ${libheif_BINARY_DIR} + ${libheif_SOURCE_DIR}) +- target_link_libraries(pixbufloader-heif PUBLIC ${GDKPIXBUF2_LIBRARIES} heif) ++ target_link_libraries(pixbufloader-heif PUBLIC PkgConfig::GDKPIXBUF2 heif) + + install(TARGETS pixbufloader-heif LIBRARY DESTINATION ${GDKPIXBUF2_MODULE_DIR}) + endif() diff --git a/ports/libheif/portfile.cmake b/ports/libheif/portfile.cmake new file mode 100644 index 00000000000000..58c50d1dea9524 --- /dev/null +++ b/ports/libheif/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO strukturag/libheif + REF 667eeabb553ce73094eb29faea3f31fb8610fec2 #v1.10.0 + SHA512 937290310ec6dda8840262d4bad5e3628033fa2caa6e9cc4a0df7a372cacf38c9b55cf29d2cb7ea2183641e263298fc2e87167c1b0f04f8697023f123d78aa9d + HEAD_REF master + PATCHES + gdk-pixbuf.patch + disable-depend-dav1d.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_EXAMPLES=OFF + -DWITH_DAV1D=OFF +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libheif/) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libheif/vcpkg.json b/ports/libheif/vcpkg.json new file mode 100644 index 00000000000000..9b7922ff2be5d1 --- /dev/null +++ b/ports/libheif/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "libheif", + "version": "1.10.0", + "port-version": 3, + "description": "Open h.265 video codec implementation.", + "homepage": "http://www.libheif.org/", + "dependencies": [ + { + "name": "gdk-pixbuf", + "platform": "!windows" + }, + "libde265", + "x265" + ] +} diff --git a/ports/libhsplasma/portfile.cmake b/ports/libhsplasma/portfile.cmake new file mode 100644 index 00000000000000..b37dfa7ae5f528 --- /dev/null +++ b/ports/libhsplasma/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO H-uru/libhsplasma + REF e435db76f86a0258ccd6f62a8bcd1f8b42d4f22d #2021.06.08 + SHA512 ebd53633f22662793613c689b5a07f6149ed2b437c42a024e7c14a18d4411356edb11c95c08e1215dde443988fd1e4bcdd8d35fc30ca2545f507d6a61565cc69 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + net ENABLE_NET +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} + -DENABLE_PHYSX=OFF + -DENABLE_PYTHON=OFF + -DENABLE_TOOLS=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME HSPlasma CONFIG_PATH share/cmake/HSPlasma) + +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/libhsplasma/vcpkg.json b/ports/libhsplasma/vcpkg.json new file mode 100644 index 00000000000000..3c6ea3930f5c5b --- /dev/null +++ b/ports/libhsplasma/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "libhsplasma", + "version-string": "2021.06.08", + "description": "Cross-platform Plasma data and network library", + "homepage": "https://github.com/H-uru/libhsplasma", + "supports": "!(arm | uwp)", + "dependencies": [ + "libjpeg-turbo", + "libpng", + "string-theory", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "net": { + "description": "Network functionality", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/libhv/portfile.cmake b/ports/libhv/portfile.cmake new file mode 100644 index 00000000000000..2661a45667ef26 --- /dev/null +++ b/ports/libhv/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ithewei/libhv + REF v1.2.1 + SHA512 c917b50a2def643b808782631cae33289b62193b9ccb95f4f7736f4d1256de72358931263d5cc06f4581950d91656e700941cb0b929d2f73f650f5297d358b38 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_UNITTEST=OFF + -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_SHARED=${BUILD_SHARED} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/hv.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/hv.dll" "${CURRENT_PACKAGES_DIR}/bin/hv.dll") +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/hv.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/hv.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/hv.dll") +endif() diff --git a/ports/libhv/vcpkg.json b/ports/libhv/vcpkg.json new file mode 100644 index 00000000000000..80978ea7de2599 --- /dev/null +++ b/ports/libhv/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libhv", + "version": "1.2.1", + "description": "Libhv is a C/C++ network library similar to libevent/libuv.", + "homepage": "https://github.com/ithewei/libhv", + "supports": "!(arm | uwp)" +} diff --git a/ports/libhydrogen/portfile.cmake b/ports/libhydrogen/portfile.cmake new file mode 100644 index 00000000000000..bf746bbbce277d --- /dev/null +++ b/ports/libhydrogen/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jedisct1/libhydrogen + REF 46f083ed1370f4f1063f412b443f5a7704676f27 + SHA512 2408ba8ba365751cf4e4e52191f8a94fe00befcb1b6c741af73b3eeebe6e02aa191d9ad021b5eda555c2eeb9c9f39ab7d89a94fb7e0e2896bf4a015d2b8e2995 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/hydrogen TARGET_PATH share/hydrogen) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/libhydrogen/vcpkg.json b/ports/libhydrogen/vcpkg.json new file mode 100644 index 00000000000000..a340a80e2b6682 --- /dev/null +++ b/ports/libhydrogen/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libhydrogen", + "version-string": "2019-08-11", + "port-version": 1, + "description": "A lightweight, secure, easy-to-use crypto library suitable for constrained environments", + "homepage": "https://github.com/jedisct1/libhydrogen" +} diff --git a/ports/libiconv/0001-Add-export-definitions.patch b/ports/libiconv/0001-Add-export-definitions.patch deleted file mode 100644 index c59d15d9e06ac1..00000000000000 --- a/ports/libiconv/0001-Add-export-definitions.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git "a/include/iconv.h.build.in" "b/include/iconv.h.build.in" -index 0feb068..74e5613 100644 ---- "a/include/iconv.h.build.in" -+++ "b/include/iconv.h.build.in" -@@ -27,6 +27,12 @@ - #define LIBICONV_DLL_EXPORTED __attribute__((__visibility__("default"))) -+#elif defined(_WIN32) && @LIBICONV_DYNAMIC@ -+ #if defined(libiconv_EXPORTS) -+ #define LIBICONV_DLL_EXPORTED __declspec(dllexport) -+ #else -+ #define LIBICONV_DLL_EXPORTED __declspec(dllimport) -+ #endif - #else - #define LIBICONV_DLL_EXPORTED - #endif - extern LIBICONV_DLL_EXPORTED @DLL_VARIABLE@ int _libiconv_version; /* Likewise */ - -diff --git "a/libcharset/include/localcharset.h.build.in" "b/libcharset/include/localcharset.h.build.in" -index c691359..2a23585 100644 ---- "a/libcharset/include/localcharset.h.build.in" -+++ "b/libcharset/include/localcharset.h.build.in" -@@ -24,6 +24,12 @@ - #define LIBCHARSET_DLL_EXPORTED __attribute__((__visibility__("default"))) -+#elif defined(_WIN32) && @LIBICONV_DYNAMIC@ -+ #if defined(libcharset_EXPORTS) -+ #define LIBCHARSET_DLL_EXPORTED __declspec(dllexport) -+ #else -+ #define LIBCHARSET_DLL_EXPORTED __declspec(dllimport) -+ #endif - #else - #define LIBCHARSET_DLL_EXPORTED - #endif - - diff --git a/ports/libiconv/0003-Add-export.patch b/ports/libiconv/0003-Add-export.patch new file mode 100644 index 00000000000000..c8d131d2eaa2eb --- /dev/null +++ b/ports/libiconv/0003-Add-export.patch @@ -0,0 +1,12 @@ +diff -uNr libiconv-1.16/libcharset/include/libcharset.h.in libiconv-1.16-work/libcharset/include/libcharset.h.in +--- libiconv-1.16/libcharset/include/libcharset.h.in 2018-09-17 19:07:42.000000000 +0300 ++++ libiconv-1.16-work/libcharset/include/libcharset.h.in 2019-12-04 17:15:50.000000000 +0300 +@@ -33,7 +33,7 @@ + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +-extern void libcharset_set_relocation_prefix (const char *orig_prefix, ++extern void LIBCHARSET_DLL_EXPORTED libcharset_set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + + diff --git a/ports/libiconv/0003-Fix-uwp.patch b/ports/libiconv/0003-Fix-uwp.patch deleted file mode 100644 index 0b2444166e298a..00000000000000 --- a/ports/libiconv/0003-Fix-uwp.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/libcharset/lib/localcharset.c b/libcharset/lib/localcharset.c -index 3aceb42..dadd95a 100644 ---- a/libcharset/lib/localcharset.c -+++ b/libcharset/lib/localcharset.c -@@ -455,7 +455,10 @@ locale_charset (void) - # endif - - #elif defined WIN32_NATIVE -- -+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) -+ // GetACP() not available to UWP apps -+ codeset = NULL; -+#else - static char buf[2 + 10 + 1]; - - /* Woe32 has a function returning the locale's codepage as a number: -@@ -467,7 +470,7 @@ locale_charset (void) - encoding is the best bet. */ - sprintf (buf, "CP%u", GetACP ()); - codeset = buf; -- -+#endif - #elif defined OS2 - - const char *locale; diff --git a/ports/libiconv/0004-ModuleFileName.patch b/ports/libiconv/0004-ModuleFileName.patch new file mode 100644 index 00000000000000..15ceb2a4115fc9 --- /dev/null +++ b/ports/libiconv/0004-ModuleFileName.patch @@ -0,0 +1,13 @@ +diff --git a/lib/relocatable.c b/lib/relocatable.c +index 89b6c27..1561894 100644 +--- a/lib/relocatable.c ++++ b/lib/relocatable.c +@@ -329,7 +329,7 @@ DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) + /* The DLL is being loaded into an application's address range. */ + static char location[MAX_PATH]; + +- if (!GetModuleFileName (module_handle, location, sizeof (location))) ++ if (!GetModuleFileNameA (module_handle, location, sizeof (location))) + /* Shouldn't happen. */ + return FALSE; + diff --git a/ports/libiconv/CMakeLists.txt b/ports/libiconv/CMakeLists.txt deleted file mode 100644 index 3c2a6125c02f2e..00000000000000 --- a/ports/libiconv/CMakeLists.txt +++ /dev/null @@ -1,81 +0,0 @@ -cmake_minimum_required(VERSION 3.0.0) -project(libiconv C) - -if(BUILD_SHARED_LIBS) - set(LIBICONV_DYNAMIC "1 /*LIBICONV_DYNAMIC*/") -else() - set(LIBICONV_DYNAMIC "0 /*LIBICONV_DYNAMIC*/") -endif() - -set(CMAKE_STATIC_LIBRARY_PREFIX) -set(CMAKE_SHARED_LIBRARY_PREFIX) - -if(WIN32) - set(HAVE_WCHAR_T "1 /*HAVE_WCHAR_T*/") - set(USE_MBSTATE_T "0 /*USE_MBSTATE_T*/") - set(BROKEN_WCHAR_H "0 /*BROKEN_WCHAR_H*/") - set(HAVE_VISIBILITY "0 /*HAVE_VISIBILITY*/") - - configure_file(config.h.in config.h) - file(READ "${CMAKE_CURRENT_BINARY_DIR}/config.h" _contents) - string(REPLACE "#undef HAVE_WORKING_O_NOFOLLOW" "#define HAVE_WORKING_O_NOFOLLOW 0" _contents "${_contents}") - string(REPLACE "#undef HAVE_MBRTOWC" "#define HAVE_MBRTOWC 1" _contents "${_contents}") - string(REPLACE "#undef HAVE_MBSINIT" "#define HAVE_MBSINIT 1" _contents "${_contents}") - string(REPLACE "#undef HAVE_WCRTOMB" "#define HAVE_WCRTOMB 1" _contents "${_contents}") - string(REPLACE "#undef ICONV_CONST" "#define ICONV_CONST const" _contents "${_contents}") - string(REPLACE "#undef EILSEQ" "" _contents "${_contents}") - string(REPLACE "#undef WORDS_LITTLEENDIAN" "#define WORDS_LITTLEENDIAN 1" _contents "${_contents}") - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.h" "${_contents}") - - configure_file(libcharset/include/localcharset.h.build.in localcharset.h) - configure_file(include/iconv.h.build.in iconv.h) -else() - if(BUILD_SHARED_LIBS) - set(STATIC_SHARED --enable-shared --disable-static) - else() - set(STATIC_SHARED --disable-shared --enable-static) - endif() - - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/autoconf) - - execute_process( - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/configure --enable-relocatable ${STATIC_SHARED} --without-libiconv-prefix --without-libintl-prefix - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/autoconf - ) - - configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/config.h config.h @ONLY) - configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/include/iconv.h iconv.h @ONLY) - configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/libcharset/include/localcharset.h localcharset.h @ONLY) -endif() - -include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - -add_definitions(-DLIBDIR -D_CRT_SECURE_NO_WARNINGS) - -add_library(libcharset libcharset/lib/localcharset.c) -target_include_directories(libcharset PUBLIC $) - -add_library(libiconv lib/iconv.c) -target_link_libraries(libiconv PRIVATE libcharset) -target_include_directories(libiconv PUBLIC $) - -install(TARGETS libcharset libiconv EXPORT unofficial-iconv-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/iconv.h - ${CMAKE_CURRENT_BINARY_DIR}/localcharset.h - DESTINATION include - ) -endif() - -install( - EXPORT unofficial-iconv-targets - FILE unofficial-iconv-config.cmake - NAMESPACE unofficial::iconv:: - DESTINATION share/unofficial-iconv -) \ No newline at end of file diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL deleted file mode 100644 index c24bac49d2745c..00000000000000 --- a/ports/libiconv/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libiconv -Version: 1.15-5 -Homepage: https://www.gnu.org/software/libiconv/ -Description: GNU Unicode text conversion diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index 4b84ecc5fc52b7..9d8ff25aa030b1 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -1,46 +1,49 @@ -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_ANDROID) set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/iconv) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/iconv) return() endif() -include(vcpkg_common_functions) - -set(LIBICONV_VERSION 1.15) +set(LIBICONV_VERSION 1.16) vcpkg_download_distfile(ARCHIVE URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz" FILENAME "libiconv-${LIBICONV_VERSION}.tar.gz" - SHA512 1233fe3ca09341b53354fd4bfe342a7589181145a1232c9919583a8c9979636855839049f3406f253a9d9829908816bb71fd6d34dd544ba290d6f04251376b1a + SHA512 365dac0b34b4255a0066e8033a8b3db4bdb94b9b57a9dca17ebf2d779139fe935caf51a465d17fd8ae229ec4b926f3f7025264f37243432075e5583925bb77b7 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${LIBICONV_VERSION} PATCHES - 0001-Add-export-definitions.patch 0002-Config-for-MSVC.patch - 0003-Fix-uwp.patch -) - -#Since libiconv uses automake, make and configure, we use a custom CMake file -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + 0003-Add-export.patch + 0004-ModuleFileName.patch ) -vcpkg_install_cmake() +if (NOT VCPKG_TARGET_IS_ANDROID) + list(APPEND OPTIONS --enable-relocatable) +endif() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-iconv TARGET_PATH share/unofficial-iconv) +vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH} + DETERMINE_BUILD_TRIPLET + USE_WRAPPERS + OPTIONS + --enable-extra-encodings + --without-libiconv-prefix + --without-libintl-prefix + ${OPTIONS} + ) +vcpkg_install_make() vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/iconv) -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libiconv/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libiconv/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -vcpkg_test_cmake(PACKAGE_NAME unofficial-iconv) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/ports/libiconv/unofficial-iconv-config.cmake b/ports/libiconv/unofficial-iconv-config.cmake deleted file mode 100644 index 7d08ff5f5c4e2c..00000000000000 --- a/ports/libiconv/unofficial-iconv-config.cmake +++ /dev/null @@ -1,6 +0,0 @@ -add_library(unofficial::iconv::libcharset INTERFACE IMPORTED) -add_library(unofficial::iconv::libiconv INTERFACE IMPORTED) -if(APPLE) - set_property(TARGET unofficial::iconv::libcharset PROPERTY INTERFACE_LINK_LIBRARIES "charset;unofficial::iconv::libiconv") - set_property(TARGET unofficial::iconv::libiconv PROPERTY INTERFACE_LINK_LIBRARIES "iconv") -endif() \ No newline at end of file diff --git a/ports/libiconv/vcpkg-cmake-wrapper.cmake b/ports/libiconv/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..8e25449ae2d4d5 --- /dev/null +++ b/ports/libiconv/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,21 @@ +include(SelectLibraryConfigurations) + +_find_package(${ARGS}) +if(Iconv_FOUND AND NOT Iconv_IS_BUILT_IN) + find_path(CHARSET_INCLUDE_DIR NAMES "libcharset.h" HINTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") + find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib HINTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug") + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib HINTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}") + select_library_configurations(CHARSET) + if(NOT TARGET Iconv::Charset) + add_library(Iconv::Charset INTERFACE IMPORTED) + set_target_properties(Iconv::Charset PROPERTIES + INTERFACE_LINK_LIBRARIES "\$<\$>:${CHARSET_LIBRARY_RELEASE}>;\$<\$:${CHARSET_LIBRARY_DEBUG}>" + INTERFACE_INCLUDE_DIRECTORIES "${CHARSET_INCLUDE_DIRS}") + endif() + if(CHARSET_LIBRARIES) + list(APPEND Iconv_LIBRARIES ${CHARSET_LIBRARIES}) + if(TARGET Iconv::Iconv) + set_property(TARGET Iconv::Iconv APPEND PROPERTY INTERFACE_LINK_LIBRARIES Iconv::Charset) + endif() + endif() +endif() diff --git a/ports/libiconv/vcpkg.json b/ports/libiconv/vcpkg.json new file mode 100644 index 00000000000000..2cafb021836a0a --- /dev/null +++ b/ports/libiconv/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libiconv", + "version": "1.16", + "port-version": 11, + "description": "GNU Unicode text conversion", + "homepage": "https://www.gnu.org/software/libiconv/" +} diff --git a/ports/libics/CONTROL b/ports/libics/CONTROL deleted file mode 100644 index 115540291e6bf1..00000000000000 --- a/ports/libics/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libics -Version: 1.6.3 -Description: Reference library for ICS (Image Cytometry Standard), an open standard for writing images of any dimensionality and data type to file, together with associated information regarding the recording equipment or recorded subject. \ No newline at end of file diff --git a/ports/libics/cmakelists.patch b/ports/libics/cmakelists.patch deleted file mode 100644 index 9e7fa498f26dd5..00000000000000 --- a/ports/libics/cmakelists.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -86,7 +86,8 @@ - endif() - - # Install --install(TARGETS libics libics_static DESTINATION lib) -+install(TARGETS libics DESTINATION bin) -+install(TARGETS libics_static DESTINATION lib) - install(FILES ${HEADERS} DESTINATION include) - - # Unit tests diff --git a/ports/libics/portfile.cmake b/ports/libics/portfile.cmake index f0d27363abb6a3..2d66f422586319 100644 --- a/ports/libics/portfile.cmake +++ b/ports/libics/portfile.cmake @@ -1,23 +1,20 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO svi-opensource/libics - REF b9532b738ad7f17569dfcaae74eb53d3c2959394 - SHA512 a7c0d89125570021494feaf0a187e3a1695e92c85a03d59ac9729618cdddb2ae13af94e4ce93241acbbb9d28465f75297bf03f2c46061bb7a0bba7ec28a23da4 + REF ae55128e0532d78aaea4adce21a3fa553d208b83 # 1.6.5 + SHA512 37a1e9034d7e32954840e18f3e3c19f6ed2f8c651ce0da53f678e2f04653be0fc4d9ab3dca8b6f0bfcaec2a9cc560ccfbc7d9034977faa14036281d6a3ca662a HEAD_REF master - PATCHES - cmakelists.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_cmake_config_fixup(CONFIG_PATH cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/GNU_LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libics) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libics/GNU_LICENSE ${CURRENT_PACKAGES_DIR}/share/libics/copyright) \ No newline at end of file +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/GNU_LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libics/vcpkg.json b/ports/libics/vcpkg.json new file mode 100644 index 00000000000000..09e0691557b654 --- /dev/null +++ b/ports/libics/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "libics", + "version": "1.6.5", + "description": "Reference library for ICS (Image Cytometry Standard), an open standard for writing images of any dimensionality and data type to file, together with associated information regarding the recording equipment or recorded subject.", + "homepage": "https://github.com/svi-opensource/libics", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libideviceactivation/CMakeLists.txt b/ports/libideviceactivation/CMakeLists.txt new file mode 100644 index 00000000000000..05ab295e6906c0 --- /dev/null +++ b/ports/libideviceactivation/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 3.0) +project(libideviceactivation C) + +# find dependencies +find_library(libplist NAMES plist plist-2.0 libplist libplist-2.0 REQUIRED) +find_path(libimobiledevice_INCLUDES endianness.h) +find_library(libimobiledevice NAMES imobiledevice imobiledevice-1.0 libimobiledevice libimobiledevice-1.0 REQUIRED) +find_package(LibXml2 REQUIRED) +find_package(CURL REQUIRED) + +# ready to create library +file(GLOB_RECURSE IDVCACTV_TOOLS_SRC common/*.c) + +file(GLOB_RECURSE IDVCACTV_PUBLIC_HDR include/*.h) +file(GLOB_RECURSE IDVCACTV_SRC src/*.c) + +add_library(libideviceactivation ${IDVCACTV_TOOLS_SRC} ${IDVCACTV_SRC} ${IDVCACTV_PUBLIC_HDR}) +target_include_directories(libideviceactivation PRIVATE ${libimobiledevice_INCLUDES} ${LIBXML2_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} include) +target_compile_definitions(libideviceactivation PRIVATE -DHAVE_OPENSSL) +target_link_libraries(libideviceactivation PRIVATE ${libplist} ${libimobiledevice} ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES}) + +# install +install( + TARGETS libideviceactivation + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/libideviceactivation-1.0.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libideviceactivation-1.0.pc + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libideviceactivation-1.0.pc + DESTINATION lib/pkgconfig +) + +install(FILES ${IDVCACTV_PUBLIC_HDR} DESTINATION include) \ No newline at end of file diff --git a/ports/libideviceactivation/CONTROL b/ports/libideviceactivation/CONTROL deleted file mode 100644 index 8ff0a857e6d629..00000000000000 --- a/ports/libideviceactivation/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libideviceactivation -Version: 1.2.68-1 -Description: A library to handle the activation process of iOS devices -Build-Depends: libimobiledevice, libxml2, curl \ No newline at end of file diff --git a/ports/libideviceactivation/libcurl_d.patch b/ports/libideviceactivation/libcurl_d.patch deleted file mode 100644 index 69f1bf53beb788..00000000000000 --- a/ports/libideviceactivation/libcurl_d.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/libideviceactivation.vcxproj b/libideviceactivation.vcxproj -index ba473f7a..47a20d15 100644 ---- a/libideviceactivation.vcxproj -+++ b/libideviceactivation.vcxproj -@@ -76,7 +76,7 @@ - $(OutDir)$(ProjectName).pdb - - -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl-d.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - -@@ -89,7 +89,7 @@ - $(OutDir)$(ProjectName).pdb - - -- libcurl.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) -+ libcurl-d.lib;libxml2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - diff --git a/ports/libideviceactivation/portfile.cmake b/ports/libideviceactivation/portfile.cmake index 7e4776c69819fc..ad5bbfbcb25dfe 100644 --- a/ports/libideviceactivation/portfile.cmake +++ b/ports/libideviceactivation/portfile.cmake @@ -1,23 +1,22 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libimobiledevice-win32/libideviceactivation - REF v1.2.68 - SHA512 c2742bba2d90c21e853255c9ef1b9a63560c3e65541a0a3daaace9b0c48d236b7947008dbcd6e42622251015b686758ebc6b564e379d831cb4f52af812430140 + REF fbe0476cfeddc2fc317ceb900eec12302c1d4c11 # v1.2.235 + SHA512 18fdf1b42744da33e0f0f037e83a72b76cc0b63a0b712e78d9736adcde113582327f3712bc2bfa7b6fdb692465700a9106286f383fd7d11f9351ca7939b20e24 HEAD_REF msvc-master - PATCHES libcurl_d.patch ) -vcpkg_install_msbuild( +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH libideviceactivation.sln - INCLUDES_SUBPATH include - LICENSE_SUBPATH COPYING - USE_VCPKG_INTEGRATION - ALLOW_ROOT_INCLUDES + PREFER_NINJA ) -file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libideviceactivation/vcpkg.json b/ports/libideviceactivation/vcpkg.json new file mode 100644 index 00000000000000..6a864bd005a584 --- /dev/null +++ b/ports/libideviceactivation/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libideviceactivation", + "version-string": "1.2.235", + "port-version": 1, + "description": "A library to handle the activation process of iOS devices", + "dependencies": [ + "curl", + "libimobiledevice", + "libplist", + "libxml2" + ] +} diff --git a/ports/libidn2/CMakeLists.txt b/ports/libidn2/CMakeLists.txt index d7a5d771ee5835..f8e0908f418f1a 100644 --- a/ports/libidn2/CMakeLists.txt +++ b/ports/libidn2/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.8) project(libidn2 C) -find_package(unofficial-iconv REQUIRED) +find_package(Iconv REQUIRED) if(MSVC) add_definitions(-D_CRT_SECURE_NO_DEPRECATE) @@ -89,9 +89,15 @@ set(GL_SRC gl/rawmemchr.c ) add_library(libidn2 ${LIB_SRC} ${UNISTR_SRC} ${GL_SRC}) +set_target_properties(libidn2 + PROPERTIES + OUTPUT_NAME idn2 + PREFIX lib + IMPORT_PREFIX lib +) target_include_directories(libidn2 PRIVATE . ./unistring ./gl) -target_link_libraries(libidn2 PRIVATE unofficial::iconv::libiconv unofficial::iconv::libcharset) +target_link_libraries(libidn2 PRIVATE Iconv::Iconv) install(TARGETS libidn2 RUNTIME DESTINATION bin @@ -99,3 +105,13 @@ install(TARGETS libidn2 ARCHIVE DESTINATION lib) install(FILES lib/idn2.h DESTINATION include) + +# Install pc file +set(prefix "\${pcfiledir}/../..") +set(exec_prefix "\${prefix}") +set(includedir "\${prefix}/include") +set(libdir "\${prefix}/lib") +set(LTLIBICONV "") +set(LTLIBUNISTRING "") +configure_file("libidn2.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libidn2.pc") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libidn2.pc" DESTINATION "lib/pkgconfig") diff --git a/ports/libidn2/CONTROL b/ports/libidn2/CONTROL deleted file mode 100644 index 3ed7546bacf7f3..00000000000000 --- a/ports/libidn2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libidn2 -Version: 2.2.0 -Build-Depends: libiconv -Homepage: https://www.gnu.org/software/libidn/ -Description: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names. diff --git a/ports/libidn2/portfile.cmake b/ports/libidn2/portfile.cmake index 2b5be4692e7e81..f9ffcae787c32e 100644 --- a/ports/libidn2/portfile.cmake +++ b/ports/libidn2/portfile.cmake @@ -1,53 +1,72 @@ -include(vcpkg_common_functions) - -set(IDN2_VERSION 2.2.0) +set(IDN2_VERSION 2.3.0) set(IDN2_FILENAME libidn2-${IDN2_VERSION}.tar.gz) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}" + URLS "https://ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}" FILENAME "${IDN2_FILENAME}" - SHA512 ccf56056a378d49a28ff67a2a23cd3d32ce51f86a78f84839b98dad709a1d0d03ac8d7c1496f0e4d3536bca00e3d09d34d76a37317b2ce87e3aa66bdf4e877b8 + SHA512 a2bf6d2249948bce14fbbc802f8af1c9b427fc9bf64203a2f3d7239d8e6061d0a8e7970a23e8e5889110a654a321e0504c7a6d049bb501e7f6a23d42b50b6187 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + ARCHIVE "${ARCHIVE}" REF ${IDN2_VERSION} ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/string.h DESTINATION ${SOURCE_PATH}/gl) - -configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH}) +if (VCPKG_TARGET_IS_WINDOWS) + file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + file(COPY "${CMAKE_CURRENT_LIST_DIR}/string.h" DESTINATION "${SOURCE_PATH}/gl") + + set(HAVE_ALLOCA_H 0) + + configure_file("${CMAKE_CURRENT_LIST_DIR}/config.h" "${SOURCE_PATH}") + + function(simple_copy_template_header FILE_PATH BASE_NAME) + if(NOT EXISTS "${FILE_PATH}/${BASE_NAME}.h" AND EXISTS "${FILE_PATH}/${BASE_NAME}.in.h") + configure_file("${FILE_PATH}/${BASE_NAME}.in.h" "${FILE_PATH}/${BASE_NAME}.h") + endif() + endfunction() + + # There seems to be no difference between source and destination files after 'configure' + # apart from auto-generated notification at the top. So why not just do a simple copy. + simple_copy_template_header("${SOURCE_PATH}/unistring" uniconv) + simple_copy_template_header("${SOURCE_PATH}/unistring" unictype) + simple_copy_template_header("${SOURCE_PATH}/unistring" uninorm) + simple_copy_template_header("${SOURCE_PATH}/unistring" unistr) + simple_copy_template_header("${SOURCE_PATH}/unistring" unitypes) + simple_copy_template_header("${SOURCE_PATH}/unistring" alloca) + + vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + "-DPACKAGE_VERSION=${IDN2_VERSION}" + ) + + vcpkg_cmake_install() + + vcpkg_copy_pdbs() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -function(simple_copy_template_header FILE_PATH BASE_NAME) - if(NOT EXISTS ${FILE_PATH}/${BASE_NAME}.h) - if(EXISTS ${FILE_PATH}/${BASE_NAME}.in.h) - configure_file(${FILE_PATH}/${BASE_NAME}.in.h ${FILE_PATH}/${BASE_NAME}.h) - endif() - endif() -endfunction() +else() + set(ENV{GTKDOCIZE} true) + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + COPY_SOURCE + OPTIONS + "--with-libiconv-prefix=${CURRENT_INSTALLED_DIR}" + --disable-gtk-doc + --disable-doc + ) + + vcpkg_install_make() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +endif() -# There seems to be no difference between source and destination files after 'configure' -# apart from auto-generated notification at the top. So why not just do a simple copy. -simple_copy_template_header(${SOURCE_PATH}/unistring uniconv) -simple_copy_template_header(${SOURCE_PATH}/unistring unictype) -simple_copy_template_header(${SOURCE_PATH}/unistring uninorm) -simple_copy_template_header(${SOURCE_PATH}/unistring unistr) -simple_copy_template_header(${SOURCE_PATH}/unistring unitypes) -simple_copy_template_header(${SOURCE_PATH}/unistring alloca) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_pkgconfig() # License and man -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2 RENAME copyright) -file(INSTALL ${SOURCE_PATH}/doc/libidn2.pdf DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2) - -vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libidn2" RENAME copyright) +file(INSTALL "${SOURCE_PATH}/doc/libidn2.pdf" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libidn2") diff --git a/ports/libidn2/string.h b/ports/libidn2/string.h index 7ed5f5fdc1f088..0147d8357fd45b 100644 --- a/ports/libidn2/string.h +++ b/ports/libidn2/string.h @@ -5,6 +5,10 @@ char * strchrnul (const char *s, int c_in); int strverscmp (const char *s1, const char *s2); void * rawmemchr (const void *s, int c_in); +#if defined(__MINGW32__) +#include <../include/string.h> +#elif defined(_WIN32) #include <../ucrt/string.h> +#endif #endif /* _GL_STRING_H */ diff --git a/ports/libidn2/vcpkg.json b/ports/libidn2/vcpkg.json new file mode 100644 index 00000000000000..9c00c1b155fd14 --- /dev/null +++ b/ports/libidn2/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "libidn2", + "version": "2.3.0", + "port-version": 4, + "description": "GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names.", + "homepage": "https://www.gnu.org/software/libidn/", + "dependencies": [ + "libiconv", + { + "name": "libunistring", + "platform": "!(windows | mingw)" + }, + { + "name": "vcpkg-cmake", + "host": true, + "platform": "windows | mingw" + } + ] +} diff --git a/ports/libigl/fix-config.patch b/ports/libigl/fix-config.patch new file mode 100644 index 00000000000000..523569b05cac48 --- /dev/null +++ b/ports/libigl/fix-config.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/libigl-config.cmake.in b/cmake/libigl-config.cmake.in +index 21aa2468..0aa6d8a0 100644 +--- a/cmake/libigl-config.cmake.in ++++ b/cmake/libigl-config.cmake.in +@@ -27,5 +27,23 @@ if (TARGET igl::common) + endif() + endif() + ++ include(CMakeFindDependencyMacro) ++if (TARGET igl::embree) ++ find_dependency(embree 3 CONFIG REQUIRED) ++endif() ++if (TARGET igl::xml) ++ find_dependency(tinyxml2 CONFIG REQUIRED) ++endif() ++if (TARGET igl::opengl) ++ find_dependency(OpenGL REQUIRED) ++ find_dependency(glad CONFIG REQUIRED) ++ if (TARGET igl::opengl_glfw) ++ find_dependency(glfw3 CONFIG REQUIRED) ++ if (TARGET igl::opengl_glfw_imgui) ++ find_dependency(imgui CONFIG REQUIRED) ++ endif() ++ endif() ++endif() ++ + check_required_components(libigl) + diff --git a/ports/libigl/fix-dependency.patch b/ports/libigl/fix-dependency.patch new file mode 100644 index 00000000000000..94ce7aea980a02 --- /dev/null +++ b/ports/libigl/fix-dependency.patch @@ -0,0 +1,207 @@ +diff --git a/cmake/LibiglWindows.cmake b/cmake/LibiglWindows.cmake +index b98aa55..46c68a7 100644 +--- a/cmake/LibiglWindows.cmake ++++ b/cmake/LibiglWindows.cmake +@@ -1,4 +1,4 @@ +-if(MSVC) ++if(0) + option(IGL_STATIC_RUNTIME "Use libigl with the static MSVC runtime." OFF) + if(IGL_STATIC_RUNTIME) + message(STATUS "MSVC -> forcing use of statically-linked runtime.") +diff --git a/cmake/libigl.cmake b/cmake/libigl.cmake +index d07bbb3..a33cefa 100644 +--- a/cmake/libigl.cmake ++++ b/cmake/libigl.cmake +@@ -107,7 +107,8 @@ if(HUNTER_ENABLED) + endif() + + # Eigen +-if(NOT TARGET Eigen3::Eigen) ++find_package(Eigen3 CONFIG REQUIRED) ++if(0) + igl_download_eigen() + add_library(igl_eigen INTERFACE) + target_include_directories(igl_eigen SYSTEM INTERFACE +@@ -296,9 +297,9 @@ endif() + ################################################################################ + ### Compile the embree part ### + if(LIBIGL_WITH_EMBREE) +- set(EMBREE_DIR "${LIBIGL_EXTERNAL}/embree") ++ find_package(embree 3 CONFIG REQUIRED) + +- if(NOT TARGET embree) ++ if(0) + igl_download_embree() + + set(EMBREE_TESTING_INTENSITY 0 CACHE STRING "") +@@ -315,8 +315,11 @@ if(LIBIGL_WITH_EMBREE) + endif() + + compile_igl_module("embree") + target_link_libraries(igl_embree ${IGL_SCOPE} embree) +- target_include_directories(igl_embree ${IGL_SCOPE} ${EMBREE_DIR}/include) ++ if(LIBIGL_USE_STATIC_LIBRARY) ++ find_package(TBB CONFIG REQUIRED) ++ target_link_libraries(igl_embree ${IGL_SCOPE} TBB::tbb) + target_compile_definitions(igl_embree ${IGL_SCOPE} -DEMBREE_STATIC_LIB) ++ endif() + endif() + +@@ -358,11 +359,12 @@ if(LIBIGL_WITH_OPENGL) + endif() + + # glad module +- if(NOT TARGET glad) ++ find_package(glad CONFIG REQUIRED) ++ if(0) + igl_download_glad() + add_subdirectory(${LIBIGL_EXTERNAL}/glad glad) + endif() +- target_link_libraries(igl_opengl ${IGL_SCOPE} glad) ++ target_link_libraries(igl_opengl ${IGL_SCOPE} glad::glad) + endif() + + ################################################################################ +@@ -371,7 +373,8 @@ if(LIBIGL_WITH_OPENGL_GLFW) + if(TARGET igl::opengl) + # GLFW module + compile_igl_module("opengl/glfw") +- if(NOT TARGET glfw) ++ find_package(glfw3 CONFIG REQUIRED) ++ if(0) + igl_download_glfw() + option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF) + option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF) +@@ -394,11 +397,12 @@ if(LIBIGL_WITH_OPENGL_GLFW_IMGUI) + if(TARGET igl::opengl_glfw) + # ImGui module + compile_igl_module("opengl/glfw/imgui") +- if(NOT TARGET imgui) ++ find_package(imgui CONFIG REQUIRED) ++ if(0) + igl_download_imgui() + add_subdirectory(${LIBIGL_EXTERNAL}/libigl-imgui imgui) + endif() +- target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui) ++ target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui::imgui) + endif() + endif() + +@@ -408,12 +412,22 @@ if(LIBIGL_WITH_PNG) + # png/ module is anomalous because it also depends on opengl it really should + # be moved into the opengl/ directory and namespace ... + if(TARGET igl_opengl) +- if(NOT TARGET stb_image) ++ find_path(stb_include_dir stb.h) ++ find_package(opengl REQUIRED) ++ find_package(libpng CONFIG REQUIRED) ++ find_package(glad CONFIG REQUIRED) ++ if (BUILD_SHARED_LIBS) ++ set(libpng_LIBRARIES png) ++ else() ++ set(libpng_LIBRARIES png_static) ++ endif() ++ if(0) + igl_download_stb() + add_subdirectory(${LIBIGL_EXTERNAL}/stb stb_image) + endif() + compile_igl_module("png" "") +- target_link_libraries(igl_png ${IGL_SCOPE} igl_stb_image igl_opengl) ++ target_include_directories(igl_png INTERFACE ${stb_include_dir}) ++ target_link_libraries(igl_png ${IGL_SCOPE} OpenGL::GL ${libpng_LIBRARIES} glad::glad) + endif() + endif() + +@@ -461,7 +475,8 @@ endif() + ### Compile the xml part ### + if(LIBIGL_WITH_XML) + set(TINYXML2_DIR "${LIBIGL_EXTERNAL}/tinyxml2") +- if(NOT TARGET tinyxml2) ++ find_package(tinyxml2 CONFIG REQUIRED) ++ if(0) + igl_download_tinyxml2() + add_library(tinyxml2 STATIC ${TINYXML2_DIR}/tinyxml2.cpp ${TINYXML2_DIR}/tinyxml2.h) + target_include_directories(tinyxml2 PUBLIC ${TINYXML2_DIR}) +@@ -471,7 +486,7 @@ if(LIBIGL_WITH_XML) + SOVERSION "3") + endif() + compile_igl_module("xml") +- target_link_libraries(igl_xml ${IGL_SCOPE} tinyxml2) ++ target_link_libraries(igl_xml ${IGL_SCOPE} tinyxml2::tinyxml2) +- target_include_directories(igl_xml ${IGL_SCOPE} ${TINYXML2_DIR}) ++ + endif() + +diff --git a/include/igl/opengl/glfw/imgui/ImGuiHelpers.h b/include/igl/opengl/glfw/imgui/ImGuiHelpers.h +index 1d3e3bc..682b6d7 100644 +--- a/include/igl/opengl/glfw/imgui/ImGuiHelpers.h ++++ b/include/igl/opengl/glfw/imgui/ImGuiHelpers.h +@@ -10,7 +10,7 @@ + + //////////////////////////////////////////////////////////////////////////////// + #include "ImGuiTraits.h" +-#include ++#include + #include + #include + #include +diff --git a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp +index 47de487..6c607de 100644 +--- a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp ++++ b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp +@@ -9,9 +9,9 @@ + #include "ImGuiMenu.h" + #include "ImGuiHelpers.h" + #include +-#include ++#include + #include + #include + #include + #include + #include + //////////////////////////////////////////////////////////////////////////////// +diff --git a/include/igl/opengl/glfw/imgui/ImGuiTraits.h b/include/igl/opengl/glfw/imgui/ImGuiTraits.h +index 7dae22a..e6911c5 100644 +--- a/include/igl/opengl/glfw/imgui/ImGuiTraits.h ++++ b/include/igl/opengl/glfw/imgui/ImGuiTraits.h +@@ -8,7 +8,7 @@ + #ifndef IGL_OPENGL_GLFW_IMGUI_IMGUITRAITS_H + #define IGL_OPENGL_GLFW_IMGUI_IMGUITRAITS_H + +-#include ++#include + + // Extend ImGui by populating its namespace directly + namespace ImGui +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 273324d..cefbd52 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -15,12 +15,11 @@ igl_download_test_data() + set(IGL_TEST_DATA ${LIBIGL_EXTERNAL}/../tests/data) + + ### Download Catch2 unit test framework +-igl_download_catch2() ++find_package(Catch2 CONFIG REQUIRED) + list(APPEND CMAKE_MODULE_PATH ${LIBIGL_EXTERNAL}/catch2/contrib) + + + # Add catch2 +-add_subdirectory(${LIBIGL_EXTERNAL}/catch2 catch2) + + + # Create test executable +diff --git a/tutorial/106_ViewerMenu/main.cpp b/tutorial/106_ViewerMenu/main.cpp +index cc514e5..f1be538 100644 +--- a/tutorial/106_ViewerMenu/main.cpp ++++ b/tutorial/106_ViewerMenu/main.cpp +@@ -2,7 +2,7 @@ + #include + #include + #include +-#include ++#include + #include + #include "tutorial_shared_path.h" + diff --git a/ports/libigl/fix-imgui-set-cond.patch b/ports/libigl/fix-imgui-set-cond.patch new file mode 100644 index 00000000000000..964f6f3f4980f1 --- /dev/null +++ b/ports/libigl/fix-imgui-set-cond.patch @@ -0,0 +1,26 @@ +diff --git a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp +index 47de4870..7e6f13a8 100644 +--- a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp ++++ b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp +@@ -167,8 +167,8 @@ IGL_INLINE void ImGuiMenu::draw_menu() + IGL_INLINE void ImGuiMenu::draw_viewer_window() + { + float menu_width = 180.f * menu_scaling(); +- ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver); +- ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver); ++ ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiCond_FirstUseEver); ++ ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiCond_FirstUseEver); + ImGui::SetNextWindowSizeConstraints(ImVec2(menu_width, -1.0f), ImVec2(menu_width, -1.0f)); + bool _viewer_menu_visible = true; + ImGui::Begin( +@@ -310,8 +310,8 @@ IGL_INLINE void ImGuiMenu::draw_viewer_menu() + IGL_INLINE void ImGuiMenu::draw_labels_window() + { + // Text labels +- ImGui::SetNextWindowPos(ImVec2(0,0), ImGuiSetCond_Always); +- ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize, ImGuiSetCond_Always); ++ ImGui::SetNextWindowPos(ImVec2(0,0), ImGuiCond_Always); ++ ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize, ImGuiCond_Always); + bool visible = true; + ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0,0,0,0)); + ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0); diff --git a/ports/libigl/install-extra-headers.patch b/ports/libigl/install-extra-headers.patch new file mode 100644 index 00000000000000..77ee2aa2aef8a2 --- /dev/null +++ b/ports/libigl/install-extra-headers.patch @@ -0,0 +1,90 @@ +diff --git a/cmake/libigl.cmake b/cmake/libigl.cmake +index a33cefa..0014375 100644 +--- a/cmake/libigl.cmake ++++ b/cmake/libigl.cmake +@@ -560,6 +560,85 @@ export( + # Install headers for core library + install_dir_files(core) + install_dir_files(copyleft) ++ ++if (LIBIGL_WITH_EMBREE) ++ install_dir_files(embree) ++# if(NOT LIBIGL_USE_STATIC_LIBRARY) ++ install(TARGETS igl_embree EXPORT igl-export) ++ export(TARGETS igl_embree ++ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES ++ ) ++# endif() ++endif() ++ ++if (LIBIGL_WITH_CGAL) ++ install_dir_files(copyleft/cgal) ++endif() ++ ++if (LIBIGL_WITH_COMISO) ++ install_dir_files(copyleft/comiso) ++endif() ++ ++if (LIBIGL_WITH_CORK) ++ install_dir_files(copyleft/cork) ++endif() ++ ++if (LIBIGL_WITH_TETGEN) ++ install_dir_files(copyleft/tetgen) ++endif() ++ ++if (LIBIGL_WITH_OPENGL OR LIBIGL_WITH_OPENGL_GLFW OR LIBIGL_WITH_OPENGL_GLFW_IMGUI) ++ install_dir_files(copyleft/opengl2) ++ install_dir_files(opengl) ++# if(NOT LIBIGL_USE_STATIC_LIBRARY) ++ install(TARGETS igl_opengl EXPORT igl-export) ++ export(TARGETS igl_opengl ++ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES ++ ) ++# endif() ++endif() ++ ++if (LIBIGL_WITH_OPENGL_GLFW OR LIBIGL_WITH_OPENGL_GLFW_IMGUI) ++ install_dir_files(opengl/glfw) ++# if(NOT LIBIGL_USE_STATIC_LIBRARY) ++ install(TARGETS igl_opengl_glfw EXPORT igl-export) ++ export(TARGETS igl_opengl_glfw ++ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES ++ ) ++# endif() ++endif() ++ ++if (LIBIGL_WITH_OPENGL_GLFW_IMGUI) ++ install_dir_files(opengl/glfw/imgui) ++# if(NOT LIBIGL_USE_STATIC_LIBRARY) ++ install(TARGETS igl_opengl_glfw_imgui EXPORT igl-export) ++ export(TARGETS igl_opengl_glfw_imgui ++ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES ++ ) ++# endif() ++endif() ++ ++if (LIBIGL_WITH_PNG) ++ install_dir_files(png) ++endif() ++ ++if (LIBIGL_WITH_PREDICATES) ++ install_dir_files(predicates) ++endif() ++ ++if (LIBIGL_WITH_TRIANGLE) ++ install_dir_files(triangle) ++endif() ++ ++if (LIBIGL_WITH_XML) ++ install_dir_files(xml) ++# if(NOT LIBIGL_USE_STATIC_LIBRARY) ++ install(TARGETS igl_xml EXPORT igl-export) ++ export(TARGETS igl_xml ++ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES ++ ) ++# endif() ++endif() + + # Write package configuration file + configure_package_config_file( diff --git a/ports/libigl/portfile.cmake b/ports/libigl/portfile.cmake new file mode 100644 index 00000000000000..7d636a73f85462 --- /dev/null +++ b/ports/libigl/portfile.cmake @@ -0,0 +1,51 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libigl/libigl + REF 3cb4894eaf8ea4610467189ca292be349425d44b #2.2.0 + SHA512 339f96e36b6a99ae8301ec2e234e18cecba7b7c42289ed68a26c20b279dce3135405f9b49e292c321fba962d56c083ae61831057bec9a19ad1495e2afa379b8b + HEAD_REF master + PATCHES + fix-dependency.patch + fix-imgui-set-cond.patch + install-extra-headers.patch + fix-config.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + embree LIBIGL_WITH_EMBREE + opengl LIBIGL_WITH_OPENGL + glfw LIBIGL_WITH_OPENGL_GLFW + imgui LIBIGL_WITH_OPENGL_GLFW_IMGUI + #png LIBIGL_WITH_PNG # Disable this feature due to issue https://github.com/libigl/libigl/issues/1199 + xml LIBIGL_WITH_XML + #python LIBIGL_WITH_PYTHON # Python binding are in the process of being redone. +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DLIBIGL_BUILD_PYTHON=OFF + -DLIBIGL_EXPORT_TARGETS=ON + -DLIBIGL_USE_STATIC_LIBRARY=OFF # Header-only mode + -DLIBIGL_WITH_COMISO=OFF + -DLIBIGL_WITH_TETGEN=OFF + -DLIBIGL_WITH_TRIANGLE=OFF + -DLIBIGL_WITH_PREDICATES=OFF + -DLIBIGL_BUILD_TUTORIALS=OFF + -DLIBIGL_WITH_PNG=OFF + -DLIBIGL_BUILD_TESTS=OFF + -DPYTHON_EXECUTABLE=${PYTHON2} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/libigl/cmake) +vcpkg_copy_pdbs() + +# libigl is a header-only library. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE.GPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libigl/vcpkg.json b/ports/libigl/vcpkg.json new file mode 100644 index 00000000000000..2a4a9797df5e1a --- /dev/null +++ b/ports/libigl/vcpkg.json @@ -0,0 +1,66 @@ +{ + "name": "libigl", + "version-string": "2.2.0", + "port-version": 6, + "description": "libigl is a simple C++ geometry processing library. We have a wide functionality including construction of sparse discrete differential geometry operators and finite-elements matrices such as the cotangent Laplacian and diagonalized mass matrix, simple facet and edge-based topology data structures, mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix manipulation which make Eigen feel a lot more like MATLAB.", + "homepage": "https://github.com/libigl/libigl", + "supports": "!(arm | uwp)", + "dependencies": [ + "eigen3" + ], + "features": { + "embree": { + "description": "Build with embree", + "dependencies": [ + "embree3" + ] + }, + "glfw": { + "description": "Build with glfw", + "dependencies": [ + "glfw3", + { + "name": "libigl", + "default-features": false, + "features": [ + "opengl" + ] + } + ] + }, + "imgui": { + "description": "Build with imgui", + "dependencies": [ + { + "name": "imgui", + "default-features": false, + "features": [ + "glfw-binding", + "libigl-imgui", + "opengl3-binding" + ] + }, + { + "name": "libigl", + "default-features": false, + "features": [ + "glfw" + ] + } + ] + }, + "opengl": { + "description": "Build with opengl", + "dependencies": [ + "glad", + "opengl" + ] + }, + "xml": { + "description": "Build with libxml", + "dependencies": [ + "tinyxml2" + ] + } + } +} diff --git a/ports/libilbc/do-not-build-ilbc_test.patch b/ports/libilbc/do-not-build-ilbc_test.patch new file mode 100644 index 00000000000000..3d67ecbb07ad9a --- /dev/null +++ b/ports/libilbc/do-not-build-ilbc_test.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 671ded64d1..1d01f737c2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -332,7 +332,7 @@ install(FILES ilbc.h ${CMAKE_CURRENT_BINARY_DIR}/ilbc_export.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(FILES CONTRIBUTING.md NEWS.md README.md + DESTINATION ${CMAKE_INSTALL_DOCDIR}) +-install(TARGETS ilbc ilbc_test ++install(TARGETS ilbc + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/ports/libilbc/portfile.cmake b/ports/libilbc/portfile.cmake new file mode 100644 index 00000000000000..c833ebd6ff5e89 --- /dev/null +++ b/ports/libilbc/portfile.cmake @@ -0,0 +1,33 @@ +set(ILBC_VERSION 3.0.3) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/TimothyGu/libilbc/releases/download/v${ILBC_VERSION}/libilbc-${ILBC_VERSION}.zip" + FILENAME "libilbc-${ILBC_VERSION}.zip" + SHA512 a5755db093529f6a3fd8fd47da63b57cffff1d3babef443d92f7c5a250ce8d1585adfba525c4037b142d9f00f1675a5054c172bf936be280dfcc22ed553c94c6 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${ILBC_VERSION} + PATCHES do-not-build-ilbc_test.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_INSTALL_DOCDIR=share/${PORT} +) + +vcpkg_install_cmake() + +vcpkg_fixup_pkgconfig() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/ilbc_export.h "#ifdef ILBC_STATIC_DEFINE" "#if 1") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libilbc/vcpkg.json b/ports/libilbc/vcpkg.json new file mode 100644 index 00000000000000..96daeb881fb1ca --- /dev/null +++ b/ports/libilbc/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libilbc", + "version-string": "3.0.3", + "port-version": 1, + "description": "Open source implementation of the Internet Low Bit Rate Codec (iLBC) / RFC 3951 codec from the WebRTC project.", + "homepage": "https://github.com/TimothyGu/libilbc", + "supports": "!(arm & uwp)" +} diff --git a/ports/libimobiledevice/CMakeLists.txt b/ports/libimobiledevice/CMakeLists.txt new file mode 100644 index 00000000000000..176eb893364362 --- /dev/null +++ b/ports/libimobiledevice/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required(VERSION 3.0) +project(libimobiledevice C) + +# find dependencies +find_library(libplist NAMES plist plist-2.0 libplist libplist-2.0 REQUIRED) +find_library(libusbmuxd libusbmuxd REQUIRED) +find_package(OpenSSL REQUIRED) +find_path(dirent_INCLUDE_DIR dirent.h) +if (WIN32) + find_library(getopt getopt REQUIRED) +endif() + +# ready to create library +file(GLOB_RECURSE IMOBDEV_COMMON_HDR common/*.h) +file(GLOB_RECURSE IMOBDEV_COMMON_SRC common/*.c) + +file(GLOB IMOBDEV_PUBLIC_HDR include/*.h) +file(GLOB IMOBDEV_PUBLIC_SUB_HDR include/libimobiledevice/*.h) +file(GLOB_RECURSE IMOBDEV_PRIVATE_HDR src/*.h) +file(GLOB_RECURSE IMOBDEV_SRC src/*.c) + +add_library(libimobiledevice ${IMOBDEV_SRC} ${IMOBDEV_PUBLIC_HDR} ${IMOBDEV_PUBLIC_SUB_HDR} ${IMOBDEV_PRIVATE_HDR} ${IMOBDEV_COMMON_HDR} ${IMOBDEV_COMMON_SRC}) +set_target_properties(libimobiledevice PROPERTIES OUTPUT_NAME libimobiledevice-1.0) +target_include_directories(libimobiledevice PRIVATE ${dirent_INCLUDE_DIR} include .) +target_compile_definitions(libimobiledevice PRIVATE -DHAVE_OPENSSL) +target_link_libraries(libimobiledevice PRIVATE ${libplist} ${libusbmuxd} ${getopt} OpenSSL::SSL OpenSSL::Crypto) +if (WIN32) + target_link_libraries(libimobiledevice PRIVATE Ws2_32) +else() +endif() + +# install +install( + TARGETS libimobiledevice + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +set(LIBPLIST_VERSION 2.0) +set(LIBUSBMUXD_VERSION 2.0) +set(PACKAGE_NAME libimobiledevice) +set(PACKAGE_VERSION 1.0) +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix \${prefix}) +set(libdir \${prefix}/lib) +set(includedir \${prefix}/../include) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/libimobiledevice-1.0.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libimobiledevice-1.0.pc + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libimobiledevice-1.0.pc + DESTINATION lib/pkgconfig +) + +install(FILES ${IMOBDEV_PUBLIC_HDR} DESTINATION include) +install(FILES ${IMOBDEV_PUBLIC_SUB_HDR} DESTINATION include/libimobiledevice) \ No newline at end of file diff --git a/ports/libimobiledevice/CONTROL b/ports/libimobiledevice/CONTROL deleted file mode 100644 index 0a6a21bf8695ba..00000000000000 --- a/ports/libimobiledevice/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libimobiledevice -Version: 1.2.76 -Description: A cross-platform protocol library to communicate with iOS devices -Build-Depends: libplist, libusbmuxd, openssl, dirent, getopt \ No newline at end of file diff --git a/ports/libimobiledevice/portfile.cmake b/ports/libimobiledevice/portfile.cmake index f91cad8cc2880b..cfba47859d26f5 100644 --- a/ports/libimobiledevice/portfile.cmake +++ b/ports/libimobiledevice/portfile.cmake @@ -1,20 +1,23 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libimobiledevice-win32/libimobiledevice - REF d6b24aae971b990d2777a88ec3a1e31b40d6152f - SHA512 75e45162fecd80464846ff51c9b3e722017f738de8f6b55e9f41f5eadcd93730b12512087d427badbc0c2b54a76a66359a472ab5bc5be5fa02826db1171565d0 + REF 348aec1f714f77c717141f70869ac7c996c3c6fb # v1.3.6 + patches + SHA512 fc7924667c3cb07025fd25ff94610ae57a90a8fd4502393e89993bfcd13c5e0c609efbf0343f344f59a8520ba4f7805925fea4c06d20ac1680f63f16aac12542 HEAD_REF msvc-master ) -vcpkg_install_msbuild( +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH libimobiledevice.sln - INCLUDES_SUBPATH include - LICENSE_SUBPATH COPYING - REMOVE_ROOT_INCLUDES - USE_VCPKG_INTEGRATION + PREFER_NINJA ) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libimobiledevice/vcpkg.json b/ports/libimobiledevice/vcpkg.json new file mode 100644 index 00000000000000..2bef3413703104 --- /dev/null +++ b/ports/libimobiledevice/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libimobiledevice", + "version-string": "1.3.6", + "port-version": 2, + "description": "A cross-platform protocol library to communicate with iOS devices", + "homepage": "http://www.libimobiledevice.org", + "dependencies": [ + "dirent", + "getopt", + "libplist", + "libusbmuxd", + "openssl" + ] +} diff --git a/ports/libirecovery/CONTROL b/ports/libirecovery/CONTROL deleted file mode 100644 index c3f423b93e055a..00000000000000 --- a/ports/libirecovery/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libirecovery -Version: 1.0.25-2 -Description: Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux -Build-Depends: libusbmuxd, readline, getopt \ No newline at end of file diff --git a/ports/libirecovery/portfile.cmake b/ports/libirecovery/portfile.cmake index 508150b07d3ad4..5fd9c0ee89b0f2 100644 --- a/ports/libirecovery/portfile.cmake +++ b/ports/libirecovery/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) vcpkg_from_github( diff --git a/ports/libirecovery/vcpkg.json b/ports/libirecovery/vcpkg.json new file mode 100644 index 00000000000000..8b5a6e942afdbe --- /dev/null +++ b/ports/libirecovery/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libirecovery", + "version-string": "1.0.25", + "port-version": 3, + "description": "Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux", + "dependencies": [ + "getopt", + "libusbmuxd", + "readline" + ] +} diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL deleted file mode 100644 index d64af9bb4c2a51..00000000000000 --- a/ports/libjpeg-turbo/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libjpeg-turbo -Version: 2.0.2 -Homepage: https://github.com/libjpeg-turbo/libjpeg-turbo -Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch b/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch index ceb90b51d0e8c9..49dc8fe290626d 100644 --- a/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch +++ b/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index b9d2d40..c868862 100644 +index d80af40..361ecae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,6 +143,12 @@ option(ENABLE_SHARED "Build shared libraries" TRUE) @@ -93,7 +93,7 @@ index b9d2d40..c868862 100644 ############################################################################### -@@ -1328,10 +1339,14 @@ set(EXE ${CMAKE_EXECUTABLE_SUFFIX}) +@@ -1337,10 +1348,14 @@ set(EXE ${CMAKE_EXECUTABLE_SUFFIX}) if(WITH_TURBOJPEG) if(ENABLE_SHARED) @@ -109,16 +109,16 @@ index b9d2d40..c868862 100644 if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND CMAKE_C_LINKER_SUPPORTS_PDB) install(FILES "$" -@@ -1341,7 +1356,7 @@ if(WITH_TURBOJPEG) +@@ -1350,7 +1365,7 @@ if(WITH_TURBOJPEG) if(ENABLE_STATIC) install(TARGETS turbojpeg-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - if(NOT ENABLE_SHARED) + if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES) - if(MSVC_IDE) + if(MSVC_IDE OR XCODE) set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}") else() -@@ -1351,13 +1366,15 @@ if(WITH_TURBOJPEG) +@@ -1360,13 +1375,15 @@ if(WITH_TURBOJPEG) DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME tjbench${EXE}) endif() endif() @@ -134,10 +134,10 @@ index b9d2d40..c868862 100644 install(TARGETS jpeg-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - if(NOT ENABLE_SHARED) + if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES) - if(MSVC_IDE) + if(MSVC_IDE OR XCODE) set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}") else() -@@ -1372,21 +1389,25 @@ if(ENABLE_STATIC) +@@ -1381,21 +1398,25 @@ if(ENABLE_STATIC) endif() endif() @@ -175,7 +175,7 @@ index b9d2d40..c868862 100644 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cjpeg.1 ${CMAKE_CURRENT_SOURCE_DIR}/djpeg.1 ${CMAKE_CURRENT_SOURCE_DIR}/jpegtran.1 ${CMAKE_CURRENT_SOURCE_DIR}/rdjpgcom.1 -@@ -1397,10 +1418,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libjpeg.pc +@@ -1406,10 +1427,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libjpeg.pc ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libturbojpeg.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/ports/libjpeg-turbo/fix-incompatibility-for-c11-c17.patch b/ports/libjpeg-turbo/fix-incompatibility-for-c11-c17.patch new file mode 100644 index 00000000000000..c0aaf585b216cd --- /dev/null +++ b/ports/libjpeg-turbo/fix-incompatibility-for-c11-c17.patch @@ -0,0 +1,13 @@ +diff --git a/tjutil.h b/tjutil.h +index f72840c..a3ae19f 100644 +--- a/tjutil.h ++++ b/tjutil.h +@@ -30,7 +30,7 @@ + #ifndef __MINGW32__ + #include + #define snprintf(str, n, format, ...) \ +- _snprintf_s(str, n, _TRUNCATE, format, __VA_ARGS__) ++ _snprintf_s(str, n, _TRUNCATE, format, ## __VA_ARGS__) + #endif + #define strcasecmp stricmp + #define strncasecmp strnicmp diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index a4fbb5b66291a0..98446fdbcfae21 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -1,16 +1,18 @@ -include(vcpkg_common_functions) +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/mozjpeg/copyright") + message(FATAL_ERROR "Can't build ${PORT} if mozjpeg is installed. Please remove mozjpeg:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libjpeg-turbo/libjpeg-turbo - REF 2.0.2 - SHA512 4dcde37ba014500cee69f7d49b359112655c177cf2c0003b4693bfe25f8a55147e9a87f58d31b4fc952a7faed6fecd5087220fd879110ade326922991f11c423 + REF 10ba6ed3365615ed5c2995fe2d240cb2d5000173 # 2.0.6 + SHA512 219d01907e66dd0fc20ea13cfa51a8efee305810f1245d0648b6ad8ee3cf11bf0bbd43b1ceeeb142a6ebbbfa281ec6a3b4e283b2fc343c360cd3ad29e9d42528 HEAD_REF master PATCHES add-options-for-exes-docs-headers.patch - #workaround for vcpkg bug see #5697 on github for more information workaround_cmake_system_processor.patch + fix-incompatibility-for-c11-c17.patch ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) @@ -30,6 +32,12 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + jpeg7 WITH_JPEG7 + jpeg8 WITH_JPEG8 +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -39,8 +47,12 @@ vcpkg_configure_cmake( -DENABLE_EXECUTABLES=OFF -DINSTALL_DOCS=OFF -DWITH_CRT_DLL=${WITH_CRT_DLL} + ${FEATURE_OPTIONS} ${LIBJPEGTURBO_SIMD} - OPTIONS_DEBUG -DINSTALL_HEADERS=OFF + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + MAYBE_UNUSED_VARIABLES + WITH_CRT_DLL ) vcpkg_install_cmake() @@ -52,37 +64,22 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(RENAME "${CURRENT_PACKAGES_DIR}/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/turbojpeg.lib") endif() if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpegd.lib") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpegd.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg.lib") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -else(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpegd.lib") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpegd.lib") - endif() endif() -file(COPY - ${SOURCE_PATH}/LICENSE.md - DESTINATION ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo -) +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -if(EXE OR DEBUG_EXE) - file(REMOVE ${EXE} ${DEBUG_EXE}) -endif() - file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jpeg) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/copyright) -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -vcpkg_test_cmake(PACKAGE_NAME JPEG MODULE) +vcpkg_copy_pdbs() diff --git a/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake b/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake index 5b0dae6c774f32..22f0ab92e50dea 100644 --- a/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake +++ b/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake @@ -1,3 +1,14 @@ +find_path(JPEG_INCLUDE_DIR NAMES jpeglib.h PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" NO_DEFAULT_PATH) +find_library(JPEG_LIBRARY_RELEASE NAMES jpeg PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH) +find_library(JPEG_LIBRARY_DEBUG NAMES jpeg PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH) +if(NOT JPEG_INCLUDE_DIR OR NOT JPEG_LIBRARY_RELEASE OR (NOT JPEG_LIBRARY_DEBUG AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib")) + message(FATAL_ERROR "Broken installation of vcpkg port libjpeg-turbo") +endif() +if(CMAKE_VERSION VERSION_LESS 3.12) + include(SelectLibraryConfigurations) + select_library_configurations(JPEG) + unset(JPEG_FOUND) +endif() _find_package(${ARGS}) if(JPEG_FOUND AND NOT TARGET JPEG::JPEG) # Backfill JPEG::JPEG to versions of cmake before 3.12 diff --git a/ports/libjpeg-turbo/vcpkg.json b/ports/libjpeg-turbo/vcpkg.json new file mode 100644 index 00000000000000..4e59d2b69abefa --- /dev/null +++ b/ports/libjpeg-turbo/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "libjpeg-turbo", + "version": "2.0.6", + "port-version": 2, + "description": "libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems.", + "homepage": "https://github.com/libjpeg-turbo/libjpeg-turbo", + "features": { + "jpeg7": { + "description": "Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward-incompatible with libjpeg v6b!)" + }, + "jpeg8": { + "description": "Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward-incompatible with libjpeg v6b!)" + } + } +} diff --git a/ports/libjuice/fix-for-vcpkg.patch b/ports/libjuice/fix-for-vcpkg.patch new file mode 100644 index 00000000000000..75ab492a06990d --- /dev/null +++ b/ports/libjuice/fix-for-vcpkg.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aedb557..89c701b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,7 +72,7 @@ set(TESTS_SOURCES + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + +-add_library(juice SHARED ${LIBJUICE_SOURCES}) ++add_library(juice ${LIBJUICE_SOURCES}) + set_target_properties(juice PROPERTIES VERSION ${PROJECT_VERSION}) + target_compile_definitions(juice PRIVATE $<$:RELEASE=1>) + +@@ -100,11 +100,15 @@ if(WIN32) + endif() + + if (USE_NETTLE) +- find_package(Nettle REQUIRED) ++ find_path(NETTLE_INCLUDE_PATH "nettle/hmac.h" REQUIRED) ++ find_library(NETTLE_LIBRARY_PATH NAMES nettle libnettle REQUIRED) ++ target_include_directories(juice PRIVATE ${NETTLE_INCLUDE_PATH}) ++ target_include_directories(juice-static PRIVATE ${NETTLE_INCLUDE_PATH}) ++ + target_compile_definitions(juice PRIVATE USE_NETTLE=1) +- target_link_libraries(juice PRIVATE Nettle::Nettle) ++ target_link_libraries(juice PRIVATE ${NETTLE_LIBRARY_PATH}) + target_compile_definitions(juice-static PRIVATE USE_NETTLE=1) +- target_link_libraries(juice-static PRIVATE Nettle::Nettle) ++ target_link_libraries(juice-static PRIVATE ${NETTLE_LIBRARY_PATH}) + else() + target_compile_definitions(juice PRIVATE USE_NETTLE=0) + target_compile_definitions(juice-static PRIVATE USE_NETTLE=0) + diff --git a/ports/libjuice/portfile.cmake b/ports/libjuice/portfile.cmake new file mode 100644 index 00000000000000..bbe0d1db25d8dc --- /dev/null +++ b/ports/libjuice/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO paullouisageneau/libjuice + REF v0.8.4 + SHA512 c33fc237ff0acb6b9cb37143d1f5a22f20670c8e32200d79c45c8473e1b0e1174926706876a1c37a51ba9ec6ec935337fd87512211eaaf8652f73d4934038834 + HEAD_REF master + PATCHES + fix-for-vcpkg.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + nettle USE_NETTLE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DNO_TESTS=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libjuice) +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libjuice/vcpkg.json b/ports/libjuice/vcpkg.json new file mode 100644 index 00000000000000..6ba94b4cc7a5b9 --- /dev/null +++ b/ports/libjuice/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libjuice", + "version": "0.8.4", + "description": "The library is a simplified implementation of the Interactive Connectivity Establishment (ICE) protocol in C for POSIX platforms (including Linux and Apple macOS) and Microsoft Windows.", + "homepage": "https://github.com/paullouisageneau/libjuice", + "features": { + "nettle": { + "description": "Use nettle for HMAC computation instead of the Builtin", + "dependencies": [ + "nettle" + ] + } + } +} diff --git a/ports/libkeyfinder/portfile.cmake b/ports/libkeyfinder/portfile.cmake new file mode 100644 index 00000000000000..8b06add324f093 --- /dev/null +++ b/ports/libkeyfinder/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mixxxdj/libkeyfinder + REF v2.2.5 + SHA512 54463d1f1111dc474d3e43723fddd5579ea1a3842f99f43e50e85622a1d6ee6fe42b22c300ce5ba5807cf6b2d7067af741773af95974a42c5d863c53165893eb + HEAD_REF main +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test BUILD_TESTING +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(PACKAGE_NAME KeyFinder CONFIG_PATH lib/cmake/KeyFinder) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libkeyfinder/vcpkg.json b/ports/libkeyfinder/vcpkg.json new file mode 100644 index 00000000000000..c52f0c914978a8 --- /dev/null +++ b/ports/libkeyfinder/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "libkeyfinder", + "version-string": "2.2.5", + "description": "Musical key detection for digital audio", + "homepage": "https://github.com/mixxxdj/libkeyfinder", + "license": "GPL-3.0-or-later", + "dependencies": [ + "fftw3", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "test": { + "description": "Build tests", + "dependencies": [ + "catch2" + ] + } + } +} diff --git a/ports/libkml/CONTROL b/ports/libkml/CONTROL deleted file mode 100644 index d52ca4c013ac12..00000000000000 --- a/ports/libkml/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libkml -Version: 1.3.0-3 -Homepage: https://github.com/libkml/libkml -Description: Reference implementation of OGC KML 2.2 -Build-Depends: zlib, expat, minizip[bzip2], uriparser, boost-smart-ptr diff --git a/ports/libkml/portfile.cmake b/ports/libkml/portfile.cmake index 3a0af23295bbb0..581a3b6089b15d 100644 --- a/ports/libkml/portfile.cmake +++ b/ports/libkml/portfile.cmake @@ -1,16 +1,11 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libkml/libkml REF 1.3.0 SHA512 aa48158103d3af764bf98c1fb4cf3e1356b9cc6c8e79d80b96850916f0a8ccb1dac3a46427735dd0bf20647daa047d10e722ac3da2a214d4c1559bf6d5d7c853 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/patch_empty_literal_on_vc.patch" + patch_empty_literal_on_vc.patch ) file(REMOVE ${SOURCE_PATH}/cmake/External_boost.cmake) @@ -25,11 +20,11 @@ vcpkg_copy_pdbs() if (VCPKG_TARGET_IS_WINDOWS) vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +elseif (VCPKG_TARGET_IS_LINUX) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libkml) -elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") +elseif (VCPKG_TARGET_IS_OSX) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libkml) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libkml RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libkml/vcpkg.json b/ports/libkml/vcpkg.json new file mode 100644 index 00000000000000..adb47787c4c9f9 --- /dev/null +++ b/ports/libkml/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "libkml", + "version-string": "1.3.0", + "port-version": 7, + "description": "Reference implementation of OGC KML 2.2", + "homepage": "https://github.com/libkml/libkml", + "dependencies": [ + "boost-smart-ptr", + "expat", + { + "name": "minizip", + "features": [ + "bzip2" + ] + }, + "uriparser", + "zlib" + ] +} diff --git a/ports/liblas/CONTROL b/ports/liblas/CONTROL deleted file mode 100644 index 4b983c937c1e78..00000000000000 --- a/ports/liblas/CONTROL +++ /dev/null @@ -1,12 +0,0 @@ -Source: liblas -Version: 1.8.1 -Build-Depends: boost, boost-thread, boost-system, boost-iostreams, boost-filesystem, libgeotiff -Description: A C/C++ library for reading and writing the very common LAS LiDAR format. - -Feature: jpeg -Description: Support for jpeg -Build-Depends: libjpeg-turbo - -Feature: zlib -Build-Depends: zlib -Description: Support zlib for compression \ No newline at end of file diff --git a/ports/liblas/fix-BuildError.patch b/ports/liblas/fix-BuildError.patch deleted file mode 100644 index 277e81ef7f75cb..00000000000000 --- a/ports/liblas/fix-BuildError.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt -index beb83e2..6f216bd 100644 ---- a/apps/CMakeLists.txt -+++ b/apps/CMakeLists.txt -@@ -155,7 +152,7 @@ endif() - # Targets installation - - install(TARGETS ${LIBLAS_UTILITIES} -- RUNTIME DESTINATION ${LIBLAS_BIN_DIR} -+ RUNTIME DESTINATION tools - LIBRARY DESTINATION ${LIBLAS_LIB_DIR} - ARCHIVE DESTINATION ${LIBLAS_LIB_DIR}) - -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index c7f583d..ca9e602 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -5,13 +5,8 @@ - # Set where cmake will install liblas-config.cmake. It's installed in - # ${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR} and ${PROJECT_ROOT_DIR} - # is the relative path to the root from there. --if (NOT WIN32) -- set(INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") -- set (PROJECT_ROOT_DIR "../../..") --else () -- set(INSTALL_CMAKE_DIR "cmake") -- set (PROJECT_ROOT_DIR "..") --endif () -+set(INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") -+set (PROJECT_ROOT_DIR "../../..") - - # Now create the liblas-config files using the .in templates - configure_file (liblas-config.cmake.in -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e35de06..f7c25d2 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -226,7 +226,8 @@ target_link_libraries(${LIBLAS_LIB_NAME} - ${GEOTIFF_LIBRARY} - ${GDAL_LIBRARY} - ${LASZIP_LIBRARY} -- ${Boost_LIBRARIES}) -+ ${Boost_LIBRARIES} -+ proj) - - target_link_libraries(${LIBLAS_C_LIB_NAME} - ${LIBLAS_LIB_NAME} ) diff --git a/ports/liblas/fix-boost-headers.patch b/ports/liblas/fix-boost-headers.patch new file mode 100644 index 00000000000000..4725a6ceb2e24a --- /dev/null +++ b/ports/liblas/fix-boost-headers.patch @@ -0,0 +1,55 @@ +diff --git a/include/liblas/detail/binary.hpp b/include/liblas/detail/binary.hpp +index d3116a1..ab20e06 100644 +--- a/include/liblas/detail/binary.hpp ++++ b/include/liblas/detail/binary.hpp +@@ -17,6 +17,8 @@ + #ifndef LIBLAS_DETAIL_BINARY_HPP_INCLUDED + #define LIBLAS_DETAIL_BINARY_HPP_INCLUDED + ++#include ++ + #include + #include + #include +@@ -25,7 +27,6 @@ + + #include + #include +-#include + #include + + #if CHAR_BIT != 8 +@@ -43,7 +44,7 @@ namespace detail { namespace binary { + struct big_endian_tag {}; + struct little_endian_tag {}; + +-#ifdef BOOST_BIG_ENDIAN ++#ifdef LIBLAS_BIG_ENDIAN + typedef big_endian_tag native_endian_tag; + #else + typedef little_endian_tag native_endian_tag; +diff --git a/src/c_api.cpp b/src/c_api.cpp +index a70fe74..e8be785 100644 +--- a/src/c_api.cpp ++++ b/src/c_api.cpp +@@ -96,6 +96,7 @@ using namespace liblas; + #endif + + #include ++#include + + bool IsReprojectionTransform(liblas::TransformPtr const& p) + { +diff --git a/src/header.cpp b/src/header.cpp +index 9987ce1..a5c8f7d 100644 +--- a/src/header.cpp ++++ b/src/header.cpp +@@ -54,7 +54,7 @@ + // boost + #include + #include +- ++#include + //std + #include + #include diff --git a/ports/liblas/fix-geotiff.patch b/ports/liblas/fix-geotiff.patch new file mode 100644 index 00000000000000..360aec7ef44a99 --- /dev/null +++ b/ports/liblas/fix-geotiff.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d246a88..d0bba6f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -248,7 +248,7 @@ endif() + # GeoTIFF support - required, default=ON + set(WITH_GEOTIFF TRUE CACHE BOOL "Choose if GeoTIFF support should be built") + +-find_package (GeoTIFF 1.3.0 ) ++find_package (geotiff CONFIG REQUIRED) + if(GEOTIFF_FOUND) + set(WITH_GEOTIFF TRUE) + # Confirm required API is available +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index beb83e2..650bc0c 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -168,7 +168,6 @@ if(UNIX) + set (LIBLAS_UTILS_RPATH ${LIBLAS_UTILS_RPATH} ${LASZIP_LIBRARY_DIRS}) + endif() + if(GEOTIFF_FOUND) +- get_filename_component(GEOTIFF_LIBRARY_DIRS ${GEOTIFF_LIBRARY} PATH) + set (LIBLAS_UTILS_RPATH ${LIBLAS_UTILS_RPATH} ${GEOTIFF_LIBRARY_DIRS}) + endif() + if(GDAL_FOUND) diff --git a/ports/liblas/portfile.cmake b/ports/liblas/portfile.cmake index 0ad91aa0d2bb2a..4f102ec831a15d 100644 --- a/ports/liblas/portfile.cmake +++ b/ports/liblas/portfile.cmake @@ -1,30 +1,32 @@ -include(vcpkg_common_functions) - set(VERSION 1.8.1) vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/liblas/libLAS-${VERSION}.tar.bz2" - FILENAME "libLAS-${VERSION}-src.tar.bz2" + URLS "http://download.osgeo.org/liblas/libLAS-${VERSION}.tar.bz2" + FILENAME "libLAS-${VERSION}-src.tar.bz2" SHA512 1cb39c557af0006c54f1100d0d409977fcc1886abd155c1b144d806c47f8675a9f2125d3a9aca16bae65d2aabba84d5e5e322b42085e7db312f3d53f92342acf - HEAD_REF master + HEAD_REF master ) vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} OUT_SOURCE_PATH SOURCE_PATH - PATCHES fix-BuildError.patch + PATCHES + fix-boost-headers.patch + fix-geotiff.patch ) +file(REMOVE ${SOURCE_PATH}/cmake/modules/FindPROJ4.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/modules/FindGeoTIFF.cmake) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DBUILD_OSGEO4W=OFF # Disable osgeo4w - -DWITH_TESTS=OFF - -DWITH_UTILITIES=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB} - -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=${CMAKE_DISABLE_FIND_PACKAGE_JPEG} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_OSGEO4W=OFF # Disable osgeo4w + -DWITH_TESTS=OFF + -DWITH_UTILITIES=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB} + -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=${CMAKE_DISABLE_FIND_PACKAGE_JPEG} ) vcpkg_install_cmake() @@ -34,15 +36,17 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/share/cmake/liblas/liblas-depends.cmake) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/share/cmake/libLAS/liblas-depends.cmake) -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/share/cmake/liblas) - vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/liblas) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libLAS) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblas RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/liblas/vcpkg.json b/ports/liblas/vcpkg.json new file mode 100644 index 00000000000000..eb0674a0a940fe --- /dev/null +++ b/ports/liblas/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "liblas", + "version-string": "1.8.1", + "port-version": 7, + "description": "A C/C++ library for reading and writing the very common LAS LiDAR format.", + "dependencies": [ + "boost", + "boost-detail", + "boost-filesystem", + "boost-iostreams", + "boost-system", + "boost-thread", + "libgeotiff" + ], + "features": { + "jpeg": { + "description": "Support for jpeg", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "zlib": { + "description": "Support zlib for compression", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/liblbfgs/CMakeLists.txt b/ports/liblbfgs/CMakeLists.txt new file mode 100644 index 00000000000000..34220b9582d3fd --- /dev/null +++ b/ports/liblbfgs/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.12 FATAL_ERROR) +PROJECT(liblbfgs) + +file(GLOB SOURCE_FILE + "lib/*.c" +) +file(GLOB HEADERS_FILE + "include/*.h" + "lib/*.h" +) +include_directories("include") +add_library (lbfgs STATIC ${SOURCE_FILE} ${HEADERS_FILE}) + +install(TARGETS lbfgs + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + + +install(FILES ${HEADERS_FILE} DESTINATION include) \ No newline at end of file diff --git a/ports/liblbfgs/portfile.cmake b/ports/liblbfgs/portfile.cmake new file mode 100644 index 00000000000000..5e7e34e55bdf91 --- /dev/null +++ b/ports/liblbfgs/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chokkan/liblbfgs + REF v1.10 + SHA512 2b08dc5d4fdd737575f58983fa7b6c143bc12edaca47b7aeadf221afe6e573fa4a53423f323f569aa93c9dbeafb9b80a6d2f755fec6da04e6b7221f0a67816f8 + HEAD_REF master +) + +message(STATUS "source path is : ${SOURCE_PATH}") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFIX_NINJA +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblbfgs RENAME copyright) \ No newline at end of file diff --git a/ports/liblbfgs/vcpkg.json b/ports/liblbfgs/vcpkg.json new file mode 100644 index 00000000000000..d648f802752b18 --- /dev/null +++ b/ports/liblbfgs/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "liblbfgs", + "version-string": "1.10", + "port-version": 1, + "description": "libLBFGS: a library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS)", + "homepage": "http://www.chokkan.org/software/liblbfgs/" +} diff --git a/ports/liblemon/CONTROL b/ports/liblemon/CONTROL deleted file mode 100644 index 1ec6050e0d746b..00000000000000 --- a/ports/liblemon/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: liblemon -Version: 2019-06-13 -Description: Library for Efficient Modeling and Optimization in Networks diff --git a/ports/liblemon/portfile.cmake b/ports/liblemon/portfile.cmake index 960b09987e4c67..14eebfe6c66cc5 100644 --- a/ports/liblemon/portfile.cmake +++ b/ports/liblemon/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(VERSION ed2c21cbd6ef) @@ -15,8 +13,8 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} REF ${VERSION} PATCHES - "cmake.patch" - "fixup-targets.patch" + cmake.patch + fixup-targets.patch ) vcpkg_configure_cmake( @@ -40,6 +38,7 @@ vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/liblemon) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblemon RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/liblemon/vcpkg.json b/ports/liblemon/vcpkg.json new file mode 100644 index 00000000000000..06e75ebcda66bc --- /dev/null +++ b/ports/liblemon/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "liblemon", + "version-string": "2019-06-13", + "port-version": 2, + "description": "Library for Efficient Modeling and Optimization in Networks", + "homepage": "https://lemon.cs.elte.hu/trac/lemon" +} diff --git a/ports/liblinear/CMakeLists.txt b/ports/liblinear/CMakeLists.txt index 6e6928a9145d77..093b0f4eaf7dd6 100644 --- a/ports/liblinear/CMakeLists.txt +++ b/ports/liblinear/CMakeLists.txt @@ -12,7 +12,7 @@ add_library(blas OBJECT add_library(liblinear linear.cpp - tron.cpp + newton.cpp $ ) target_include_directories(liblinear PRIVATE .) @@ -42,6 +42,6 @@ endif() if(NOT DISABLE_INSTALL_HEADERS) install( - FILES linear.h tron.h + FILES linear.h newton.h DESTINATION include/liblinear) endif() \ No newline at end of file diff --git a/ports/liblinear/CONTROL b/ports/liblinear/CONTROL deleted file mode 100644 index 71e01deabeee24..00000000000000 --- a/ports/liblinear/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: liblinear -Version: 230 -Description: A Library for Large Linear Classification diff --git a/ports/liblinear/portfile.cmake b/ports/liblinear/portfile.cmake index 2c71b869a5b547..fab41c0396829e 100644 --- a/ports/liblinear/portfile.cmake +++ b/ports/liblinear/portfile.cmake @@ -1,26 +1,28 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cjlin1/liblinear - REF v230 - SHA512 c8acdd9f5cfcf7ef1ff9b9fac658ff51ac4677801fdb9ce6a210ccca7fb136a7957d0edaf45e83269c1928de1926de0200d669cd94e09371c06821d42ba539bc + REF 60f1adf6f35d6f3e031c334b33dfe8399d6f8a9d #v243 + SHA512 0f88f8dd768313d0a9b3bb82e7b878d7173ea43ef609e993dc79e94398897373faf2688249b17111e2b6e06e78e26a50570a1b746dc4e73fb7416ccc24936c66 HEAD_REF master ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/liblinear) -file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblinear RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblinear) +if(NOT DISABLE_INSTALL_TOOLS) + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/liblinear") +endif() + +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${SOURCE_PATH}/README" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/liblinear/vcpkg.json b/ports/liblinear/vcpkg.json new file mode 100644 index 00000000000000..a65229aa0d1b19 --- /dev/null +++ b/ports/liblinear/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "liblinear", + "version-string": "243", + "description": "A Library for Large Linear Classification", + "homepage": "https://github.com/cjlin1/liblinear", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/liblo/CONTROL b/ports/liblo/CONTROL deleted file mode 100644 index b2fc4def749e77..00000000000000 --- a/ports/liblo/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: liblo -Version: 0.30 -Homepage: https://github.com/radarsat1/liblo -Description: liblo is an implementation of the Open Sound Control protocol for POSIX systems \ No newline at end of file diff --git a/ports/liblo/portfile.cmake b/ports/liblo/portfile.cmake index 27e41af1860b24..3ddfd9e7a0d931 100644 --- a/ports/liblo/portfile.cmake +++ b/ports/liblo/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO radarsat1/liblo - REF 0.30 - SHA512 d36c141c513f869e6d1963bd0d584030038019b8be0b27bb9a684722b6e7a38e942ad2ee7c2e67ac13b965560937aad97259435ed86034aa2dc8cb92d23845d8 + REF 840ed69b1d669a1ce587eb592746e3dff6985d76 # 0.31 + SHA512 c84ab8ac874595df29fd121fff6ddaa670bcc31e7ca4e5cc0f35092032c9f648cd890bc7eea0152af87b842f8cc7804505ac84a13bac8a5d40e43039efa4aa2d HEAD_REF master ) @@ -19,14 +17,10 @@ vcpkg_install_cmake() # Install needed files into package directory vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/liblo) -file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/oscsend.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/liblo) -file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/oscdump.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/liblo) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/liblo) +vcpkg_copy_tools(TOOL_NAMES oscsend oscdump AUTO_CLEAN) # Remove unnecessary files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/oscsend.exe ${CURRENT_PACKAGES_DIR}/bin/oscdump.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/oscsend.exe ${CURRENT_PACKAGES_DIR}/debug/bin/oscdump.exe) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/liblo/vcpkg.json b/ports/liblo/vcpkg.json new file mode 100644 index 00000000000000..f013f968c972b0 --- /dev/null +++ b/ports/liblo/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "liblo", + "version-string": "0.31", + "port-version": 1, + "description": "liblo is an implementation of the Open Sound Control protocol for POSIX systems", + "homepage": "https://github.com/radarsat1/liblo" +} diff --git a/ports/liblsl/CONTROL b/ports/liblsl/CONTROL deleted file mode 100644 index 995b9fbd64b03d..00000000000000 --- a/ports/liblsl/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: liblsl -Version: 1.13.0-b6 -Description: C++ lsl library for multi-modal time-synched data transmission over the local network diff --git a/ports/liblsl/portfile.cmake b/ports/liblsl/portfile.cmake index 1b6890a14de3df..a8d56b0bdb664f 100644 --- a/ports/liblsl/portfile.cmake +++ b/ports/liblsl/portfile.cmake @@ -1,30 +1,32 @@ -include(vcpkg_common_functions) - +# static builds are currently not supported since liblsl always also builds shared binaries +# which need to be deleted for vcpkg but then the CMake target can no longer be imported because it still references them vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sccn/liblsl - REF 1.13.0-b6 # NOTE: when updating version, also change it in the parameter to vcpkg_configure_cmake - SHA512 fb98cdd73de5f13e97f639ba3f2f836d46ce28cdcb2246584728f296eb647e2c9c069534470a603b10d7dc34ab8978bf246e2187428ab231a925feb0b7024c89 + REF v1.14.0 # NOTE: when updating version, also change it in the parameter to vcpkg_configure_cmake + SHA512 b4ec379339d174c457c8c1ec69f9e51ea78a738e72ecc96b9193f07b5273acb296b5b1f90c9dfe16591ecab0eef9aae9add640c1936d3769cae0bd96617205ec HEAD_REF master ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DLSL_BUILD_STATIC=OFF - -DLSL_UNIXFOLDERS=ON - -DLSL_NO_FANCY_LIBNAME=ON - -Dlslgitrevision="1.13.0-b6" - -Dlslgitbranch="master" + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLSL_BUILD_STATIC=OFF + -DLSL_BUNDLED_PUGIXML=OFF # we use the pugixml vcpkg package instead + -Dlslgitrevision=v1.14.0 + -Dlslgitbranch=master ) vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblsl RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblsl) +vcpkg_copy_tools(TOOL_NAMES lslver AUTO_CLEAN) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/liblsl/vcpkg.json b/ports/liblsl/vcpkg.json new file mode 100644 index 00000000000000..dfacb5398718b3 --- /dev/null +++ b/ports/liblsl/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "liblsl", + "version-string": "1.14.0", + "port-version": 2, + "description": "C++ lsl library for multi-modal time-synched data transmission over the local network", + "homepage": "https://github.com/sccn/liblsl", + "supports": "!staticcrt", + "dependencies": [ + "pugixml" + ] +} diff --git a/ports/liblzma/CMakeLists.txt b/ports/liblzma/CMakeLists.txt deleted file mode 100644 index a9927c2b6c17f5..00000000000000 --- a/ports/liblzma/CMakeLists.txt +++ /dev/null @@ -1,182 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(LibLZMA) - -set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") -set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") -set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed") -set(INSTALL_CMAKE_DIR "share/liblzma" CACHE PATH "Path where cmake configs will be installed") -set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Append a suffix to debug libraries") - -if(NOT WIN32) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h - " -#define TUKLIB_SYMBOL_PREFIX lzma_ -#define ASSUME_RAM 128 -#define HAVE_CHECK_CRC32 1 -#define HAVE_CHECK_CRC64 1 -#define HAVE_CHECK_SHA256 1 -#define HAVE_DECODERS 1 -#define HAVE_DECODER_ARM 1 -#define HAVE_DECODER_ARMTHUMB 1 -#define HAVE_DECODER_DELTA 1 -#define HAVE_DECODER_IA64 1 -#define HAVE_DECODER_LZMA1 1 -#define HAVE_DECODER_LZMA2 1 -#define HAVE_DECODER_POWERPC 1 -#define HAVE_DECODER_SPARC 1 -#define HAVE_DECODER_X86 1 -#define HAVE_ENCODERS 1 -#define HAVE_ENCODER_ARM 1 -#define HAVE_ENCODER_ARMTHUMB 1 -#define HAVE_ENCODER_DELTA 1 -#define HAVE_ENCODER_IA64 1 -#define HAVE_ENCODER_LZMA1 1 -#define HAVE_ENCODER_LZMA2 1 -#define HAVE_ENCODER_POWERPC 1 -#define HAVE_ENCODER_SPARC 1 -#define HAVE_ENCODER_X86 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_MF_BT2 1 -#define HAVE_MF_BT3 1 -#define HAVE_MF_BT4 1 -#define HAVE_MF_HC3 1 -#define HAVE_MF_HC4 1 -#define HAVE_STDBOOL_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_VISIBILITY 1 -#define MYTHREAD_POSIX 1 -#define PACKAGE_NAME \"XZ Utils\" -#define PACKAGE_URL \"http://tukaani.org/xz/\" -#define SIZEOF_SIZE_T (sizeof(size_t)) -") -endif() - -add_library(LibLZMA - src/common/tuklib_cpucores.c - src/common/tuklib_physmem.c - src/liblzma/check/check.c - src/liblzma/check/crc32_fast.c - src/liblzma/check/crc32_table.c - src/liblzma/check/crc64_fast.c - src/liblzma/check/crc64_table.c - src/liblzma/check/sha256.c - src/liblzma/common/alone_decoder.c - src/liblzma/common/alone_encoder.c - src/liblzma/common/auto_decoder.c - src/liblzma/common/block_buffer_decoder.c - src/liblzma/common/block_buffer_encoder.c - src/liblzma/common/block_decoder.c - src/liblzma/common/block_encoder.c - src/liblzma/common/block_header_decoder.c - src/liblzma/common/block_header_encoder.c - src/liblzma/common/block_util.c - src/liblzma/common/common.c - src/liblzma/common/easy_buffer_encoder.c - src/liblzma/common/easy_decoder_memusage.c - src/liblzma/common/easy_encoder.c - src/liblzma/common/easy_encoder_memusage.c - src/liblzma/common/easy_preset.c - src/liblzma/common/filter_buffer_decoder.c - src/liblzma/common/filter_buffer_encoder.c - src/liblzma/common/filter_common.c - src/liblzma/common/filter_decoder.c - src/liblzma/common/filter_encoder.c - src/liblzma/common/filter_flags_decoder.c - src/liblzma/common/filter_flags_encoder.c - src/liblzma/common/hardware_cputhreads.c - src/liblzma/common/hardware_physmem.c - src/liblzma/common/index.c - src/liblzma/common/index_decoder.c - src/liblzma/common/index_encoder.c - src/liblzma/common/index_hash.c - src/liblzma/common/outqueue.c - src/liblzma/common/stream_buffer_decoder.c - src/liblzma/common/stream_buffer_encoder.c - src/liblzma/common/stream_decoder.c - src/liblzma/common/stream_encoder.c - src/liblzma/common/stream_encoder_mt.c - src/liblzma/common/stream_flags_common.c - src/liblzma/common/stream_flags_decoder.c - src/liblzma/common/stream_flags_encoder.c - src/liblzma/common/vli_decoder.c - src/liblzma/common/vli_encoder.c - src/liblzma/common/vli_size.c - src/liblzma/delta/delta_common.c - src/liblzma/delta/delta_decoder.c - src/liblzma/delta/delta_encoder.c - src/liblzma/lzma/fastpos_table.c - src/liblzma/lzma/lzma2_decoder.c - src/liblzma/lzma/lzma2_encoder.c - src/liblzma/lzma/lzma_decoder.c - src/liblzma/lzma/lzma_encoder.c - src/liblzma/lzma/lzma_encoder_optimum_fast.c - src/liblzma/lzma/lzma_encoder_optimum_normal.c - src/liblzma/lzma/lzma_encoder_presets.c - src/liblzma/lz/lz_decoder.c - src/liblzma/lz/lz_encoder.c - src/liblzma/lz/lz_encoder_mf.c - src/liblzma/rangecoder/price_table.c - src/liblzma/simple/arm.c - src/liblzma/simple/armthumb.c - src/liblzma/simple/ia64.c - src/liblzma/simple/powerpc.c - src/liblzma/simple/simple_coder.c - src/liblzma/simple/simple_decoder.c - src/liblzma/simple/simple_encoder.c - src/liblzma/simple/sparc.c - src/liblzma/simple/x86.c -) - -if(MSVC) - target_include_directories(LibLZMA PRIVATE $) -else() - target_compile_definitions(LibLZMA PRIVATE -DHAVE_VISIBILITY=1) -endif() - -if(BUILD_SHARED_LIBS) - target_compile_definitions(LibLZMA PRIVATE -DDLL_EXPORT) - target_compile_definitions(LibLZMA PUBLIC -DLIBLZMADLL_EXPORTS) -else() - target_compile_definitions(LibLZMA PUBLIC -DLZMA_API_STATIC) -endif() -target_compile_definitions(LibLZMA PUBLIC -DHAVE_CONFIG_H) - -target_include_directories(LibLZMA PUBLIC - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ -) - -set_target_properties(LibLZMA PROPERTIES OUTPUT_NAME "lzma") - -set_target_properties(LibLZMA PROPERTIES PUBLIC_HEADER -"${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/base.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/bcj.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/block.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/check.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/container.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/delta.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/filter.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/hardware.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/index.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/index_hash.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/lzma12.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/stream_flags.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/version.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/vli.h" -) - -install(TARGETS LibLZMA EXPORT LibLZMATargets - RUNTIME DESTINATION "${INSTALL_BIN_DIR}" - ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" - LIBRARY DESTINATION "${INSTALL_LIB_DIR}" - PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}/lzma" -) - -install(FILES "${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma.h" - DESTINATION "${INSTALL_INCLUDE_DIR}" -) - -install(EXPORT LibLZMATargets - FILE LibLZMAConfig.cmake - NAMESPACE LibLZMA:: - DESTINATION "${INSTALL_CMAKE_DIR}" -) diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL deleted file mode 100644 index 967b3b16c877ee..00000000000000 --- a/ports/liblzma/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: liblzma -Version: 5.2.4-2 -Homepage: https://github.com/xz-mirror/xz -Description: Compression library with an API similar to that of zlib. diff --git a/ports/liblzma/add_support_ios.patch b/ports/liblzma/add_support_ios.patch new file mode 100644 index 00000000000000..ac40c4e6dbe1f4 --- /dev/null +++ b/ports/liblzma/add_support_ios.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 52439b3..0b5e371 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -526,6 +526,7 @@ if(HAVE_GETOPT_LONG) + + install(TARGETS xzdec + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT xzdec) + + if(UNIX) +@@ -653,6 +654,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) + + install(TARGETS xz + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT xz) + + install(FILES src/xz/xz.1 +-- +2.30.1 (Apple Git-130) + diff --git a/ports/liblzma/fix_config_include.patch b/ports/liblzma/fix_config_include.patch new file mode 100644 index 00000000000000..20b32895a6618f --- /dev/null +++ b/ports/liblzma/fix_config_include.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 34c6aca00..7b3708ab2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -401,6 +401,7 @@ if(WIN32) + if(BUILD_SHARED_LIBS) + # Add the Windows resource file for liblzma.dll. + target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc) ++ target_include_directories(liblzma PRIVATE windows/vs2019) + + # Export the public API symbols with __declspec(dllexport). + target_compile_definitions(liblzma PRIVATE DLL_EXPORT) diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index e7260309ba7c46..e653cbcce461a3 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -1,27 +1,48 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xz-mirror/xz - REF v5.2.4 - SHA512 fce7dc65e77a9b89dbdd6192cb37efc39e3f2cf343f79b54d2dfcd845025dab0e1d5b0f59c264eab04e5cbaf914eeb4818d14cdaac3ae0c1c5de24418656a4b7 + REF v5.2.5 + SHA512 686f01cfe33e2194766a856c48668c661b25eee194a443524f87ce3f866e0eb54914075b4e00185921516c5211db8cd5d2658f4b91f4a3580508656f776f468e HEAD_REF master PATCHES enable-uwp-builds.patch + fix_config_include.patch + win_output_name.patch # Fix output name on Windows. Autotool build does not generate lib prefixed libraries on windows. + add_support_ios.patch # add install bundle info for support ios ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + "-DCMAKE_DEBUG_POSTFIX=d" # This was in the old vcpkg CMakeLists.txt and I don't intend to fix it all over vcpkg ) - -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets() -file(APPEND ${CURRENT_PACKAGES_DIR}/share/liblzma/LibLZMAConfig.cmake +set(exec_prefix "\${prefix}") +set(libdir "\${prefix}/lib") +set(includedir "\${prefix}/include") +set(PACKAGE_URL https://tukaani.org/xz/) +set(PACKAGE_VERSION 5.2.5) +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(PTHREAD_CFLAGS -pthread) +endif() +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(prefix "${CURRENT_INSTALLED_DIR}") + configure_file("${SOURCE_PATH}/src/liblzma/liblzma.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/liblzma.pc" @ONLY) +endif() +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(prefix "${CURRENT_INSTALLED_DIR}/debug") + configure_file("${SOURCE_PATH}/src/liblzma/liblzma.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/liblzma.pc" @ONLY) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/liblzma.pc" "-llzma" "-llzmad") +endif() +vcpkg_fixup_pkgconfig() + + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/liblzma) + +file(WRITE "${CURRENT_PACKAGES_DIR}/share/liblzma/liblzma-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/liblzmaConfig.cmake\")") +file(APPEND "${CURRENT_PACKAGES_DIR}/share/liblzma/liblzmaConfig.cmake" " include(\${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) find_path(LibLZMA_INCLUDE_DIR @@ -29,8 +50,8 @@ find_path(LibLZMA_INCLUDE_DIR PATH_SUFFIXES lzma ) if(NOT LibLZMA_LIBRARY) - find_library(LibLZMA_LIBRARY_RELEASE NAMES lzma LZMA LibLZMA PATHS \${_IMPORT_PREFIX}/lib/) - find_library(LibLZMA_LIBRARY_DEBUG NAMES lzmad LZMAd LibLZMAd PATHS \${_IMPORT_PREFIX}/debug/lib/) + find_library(LibLZMA_LIBRARY_RELEASE NAMES lzma LZMA LibLZMA liblzma PATHS \${_IMPORT_PREFIX}/lib/) + find_library(LibLZMA_LIBRARY_DEBUG NAMES lzmad LZMAd LibLZMAd lzma LZMA LibLZMA liblzma PATHS \${_IMPORT_PREFIX}/debug/lib/) select_library_configurations(LibLZMA) endif() set(LibLZMA_INCLUDE_DIRS \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\") @@ -70,12 +91,44 @@ set(LZMA_FOUND TRUE CACHE BOOL \"\") set(LIBLZMA_FOUND TRUE CACHE BOOL \"\") ") -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(APPEND ${CURRENT_PACKAGES_DIR}/share/liblzma/LibLZMAConfig.cmake "add_definitions(-DLZMA_API_STATIC)") +file(READ ${CURRENT_PACKAGES_DIR}/include/lzma.h _contents) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(LZMA_API_STATIC)" "1" _contents "${_contents}") +else() + string(REPLACE "defined(LZMA_API_STATIC)" "0" _contents "${_contents}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzma.h "${_contents}") + +if (VCPKG_BUILD_TYPE STREQUAL debug) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/include") +else() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/lzma.h" + "if !defined(LZMA_API_STATIC)" + "if 0" + ) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +set(TOOLS xz xzdec) +foreach(_tool IN LISTS TOOLS) + if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + list(REMOVE_ITEM TOOLS ${_tool}) + endif() +endforeach() +if(TOOLS) + vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN) +endif() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") \ No newline at end of file diff --git a/ports/liblzma/usage b/ports/liblzma/usage new file mode 100644 index 00000000000000..8d70b5804e7f7b --- /dev/null +++ b/ports/liblzma/usage @@ -0,0 +1,9 @@ +The package liblzma provides CMake targets: + + find_package(LibLZMA REQUIRED) + target_link_libraries(main PRIVATE LibLZMA::LibLZMA) + + or + + find_package(liblzma CONFIG REQUIRED) + target_link_libraries(main PRIVATE liblzma::liblzma) diff --git a/ports/liblzma/vcpkg-cmake-wrapper.cmake b/ports/liblzma/vcpkg-cmake-wrapper.cmake index b7572d736c0f14..cf22af021a6489 100644 --- a/ports/liblzma/vcpkg-cmake-wrapper.cmake +++ b/ports/liblzma/vcpkg-cmake-wrapper.cmake @@ -1,4 +1,8 @@ list(REMOVE_ITEM ARGS "NO_MODULE") list(REMOVE_ITEM ARGS "CONFIG") -list(REMOVE_ITEM ARGS "MODULE") +list(REMOVE_ITEM ARGS "MODULE") # Always call CONFIG. _find_package(${ARGS} CONFIG) +if(NOT TARGET LibLZMA::LibLZMA AND TARGET liblzma::liblzma) + add_library(LibLZMA::LibLZMA INTERFACE IMPORTED) # Too lazy to fix wrong target usage all over vcpkg. + set_target_properties(LibLZMA::LibLZMA PROPERTIES INTERFACE_LINK_LIBRARIES liblzma::liblzma) +endif() diff --git a/ports/liblzma/vcpkg.json b/ports/liblzma/vcpkg.json new file mode 100644 index 00000000000000..fb6c4097e25a2e --- /dev/null +++ b/ports/liblzma/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "liblzma", + "version-semver": "5.2.5", + "port-version": 3, + "description": "Compression library with an API similar to that of zlib.", + "homepage": "hhttps://github.com/xz-mirror/xz", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/liblzma/win_output_name.patch b/ports/liblzma/win_output_name.patch new file mode 100644 index 00000000000000..b6e3cd8ee86bb7 --- /dev/null +++ b/ports/liblzma/win_output_name.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 120dc7548..728ca3591 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -398,11 +398,12 @@ else() + endif() + + if(WIN32) ++ set_target_properties(liblzma PROPERTIES OUTPUT_NAME lzma) + if(BUILD_SHARED_LIBS) + # Add the Windows resource file for liblzma.dll. + target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc) + target_include_directories(liblzma PRIVATE windows/vs2019) + + # Export the public API symbols with __declspec(dllexport). + target_compile_definitions(liblzma PRIVATE DLL_EXPORT) + else() diff --git a/ports/libmad/0001-Fix-MSVC-ARM.patch b/ports/libmad/0001-Fix-MSVC-ARM.patch new file mode 100644 index 00000000000000..9cdc57c7bfeea4 --- /dev/null +++ b/ports/libmad/0001-Fix-MSVC-ARM.patch @@ -0,0 +1,25 @@ +diff --git a/mad.h b/mad.h +index 9ef6cc8..5e3f7aa 100644 +--- a/mad.h ++++ b/mad.h +@@ -24,7 +24,11 @@ + extern "C" { + # endif + ++#ifdef _WIN64 ++# define FPM_64BIT ++#else + # define FPM_INTEL ++#endif + + + +@@ -184,7 +188,7 @@ typedef mad_fixed_t mad_sample_t; + + # elif defined(FPM_INTEL) + +-# if defined(_MSC_VER) ++# if defined(_MSC_VER) && defined(_M_IX86) + # pragma warning(push) + # pragma warning(disable: 4035) /* no return value */ + static __forceinline diff --git a/ports/libmad/CONTROL b/ports/libmad/CONTROL deleted file mode 100644 index e3adc42be8ac6f..00000000000000 --- a/ports/libmad/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libmad -Version: 0.15.1-3 -Description: high-quality MPEG audio decoder diff --git a/ports/libmad/portfile.cmake b/ports/libmad/portfile.cmake index 9c1f43b56eec9f..ebf84de891d05f 100644 --- a/ports/libmad/portfile.cmake +++ b/ports/libmad/portfile.cmake @@ -1,26 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmad-0.15.1b) -vcpkg_download_distfile(ARCHIVE - URLS "http://download.sourceforge.net/mad/libmad-0.15.1b.tar.gz" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO mad/libmad + REF 0.15.1b FILENAME "libmad-0.15.1b.tar.gz" SHA512 2cad30347fb310dc605c46bacd9da117f447a5cabedd8fefdb24ab5de641429e5ec5ce8af7aefa6a75a3f545d3adfa255e3fa0a2d50971f76bc0c4fc0400cc45 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/use_fpm_default.patch" + PATCHES 0001-Fix-MSVC-ARM.patch ) #The archive only contains a Visual Studio 6.0 era DSP project file, so use a custom CMakeLists.txt file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -#Use the msvc++ config.h and mad.h header +#Use the msvc++ config.h header file(COPY ${SOURCE_PATH}/msvc++/config.h DESTINATION ${SOURCE_PATH}) -file(COPY ${SOURCE_PATH}/msvc++/mad.h DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/libmad/use_fpm_default.patch b/ports/libmad/use_fpm_default.patch deleted file mode 100644 index f20c8265e0e32a..00000000000000 --- a/ports/libmad/use_fpm_default.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- mad.h 2004-01-23 10:36:03.000000000 +0100 -+++ mad.h 2017-08-12 16:03:38.060392600 +0200 -@@ -24,7 +24,7 @@ - extern "C" { - # endif - --# define FPM_INTEL -+# define FPM_DEFAULT ---- msvc++/mad.h 2017-08-12 16:04:30.678146600 +0200 -+++ msvc++/mad.h 2017-08-12 16:04:00.779378000 +0200 -@@ -24,7 +24,7 @@ - extern "C" { - # endif - --# define FPM_INTEL -+# define FPM_DEFAULT diff --git a/ports/libmad/vcpkg.json b/ports/libmad/vcpkg.json new file mode 100644 index 00000000000000..2e44d7571c6e24 --- /dev/null +++ b/ports/libmad/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libmad", + "version-string": "0.15.1", + "port-version": 9, + "description": "high-quality MPEG audio decoder", + "homepage": "http://www.mars.org/home/rob/proj/mpeg/" +} diff --git a/ports/libmagic/0001-Use-libtre.patch b/ports/libmagic/0001-Use-libtre.patch new file mode 100644 index 00000000000000..a1080d5a070bb5 --- /dev/null +++ b/ports/libmagic/0001-Use-libtre.patch @@ -0,0 +1,53 @@ +From e6e59f41c082be94c4fef007e276b1dffe7dc240 Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sat, 8 May 2021 19:28:01 +0700 +Subject: [PATCH 01/14] Use libtre + +--- + configure.ac | 2 +- + src/Makefile.am | 2 +- + src/file.h | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 02eac8f..b05c334 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -185,7 +185,7 @@ if test "$enable_libseccomp" != "no"; then + AC_CHECK_LIB(seccomp, seccomp_init) + fi + if test "$MINGW" = 1; then +- AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW])) ++ AC_SEARCH_LIBS(tre_regexec,tre,,AC_MSG_ERROR([libtre is required to build file(1) with MinGW])) + fi + + dnl See if we are cross-compiling +diff --git a/src/Makefile.am b/src/Makefile.am +index 3f67f2c..34781b9 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -13,7 +13,7 @@ libmagic_la_SOURCES = buffer.c magic.c apprentice.c softmagic.c ascmagic.c \ + file_opts.h elfclass.h mygetopt.h cdf.c cdf_time.c readcdf.c cdf.h + libmagic_la_LDFLAGS = -no-undefined -version-info 1:0:0 + if MINGW +-MINGWLIBS = -lgnurx -lshlwapi ++MINGWLIBS = -lshlwapi + else + MINGWLIBS = + endif +diff --git a/src/file.h b/src/file.h +index c548e97..299ac0c 100644 +--- a/src/file.h ++++ b/src/file.h +@@ -79,7 +79,7 @@ + #include /* Include that here, to make sure __P gets defined */ + #include + #include /* For open and flags */ +-#include ++#include + #include + #include + #ifndef WIN32 +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0002-Change-zlib-lib-name-to-match-CMake-output.patch b/ports/libmagic/0002-Change-zlib-lib-name-to-match-CMake-output.patch new file mode 100644 index 00000000000000..5e070cc07fe0bf --- /dev/null +++ b/ports/libmagic/0002-Change-zlib-lib-name-to-match-CMake-output.patch @@ -0,0 +1,39 @@ +From 2fa43ece9ec7564e1fbb9867bb5852b834643aa4 Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sat, 8 May 2021 19:36:11 +0700 +Subject: [PATCH 02/14] Change zlib lib name to match CMake output + +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b05c334..dd4063c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -173,7 +173,7 @@ AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r + + dnl Checks for libraries + if test "$enable_zlib" != "no"; then +- AC_CHECK_LIB(z, gzopen) ++ AC_SEARCH_LIBS(gzopen, [z zlib zlibd], have_zlib = "yes", have_zlib = "no") + fi + if test "$enable_bzlib" != "no"; then + AC_CHECK_LIB(bz2, BZ2_bzCompressInit) +@@ -193,11 +193,11 @@ AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes) + + dnl Final sanity checks + if test "$enable_zlib" = "yes"; then +- if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then ++ if test "$ac_cv_header_zlib_h$have_zlib" != "yesyes"; then + AC_MSG_ERROR([zlib support requested but not found]) + fi + fi +-if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then ++if test "$ac_cv_header_zlib_h$have_zlib" = "yesyes"; then + AC_DEFINE([ZLIBSUPPORT], 1, [Enable zlib compression support]) + fi + if test "$enable_bzlib" = "yes"; then +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0003-Fix-WIN32-macro-checks.patch b/ports/libmagic/0003-Fix-WIN32-macro-checks.patch new file mode 100644 index 00000000000000..eb0f7ebdaf5276 --- /dev/null +++ b/ports/libmagic/0003-Fix-WIN32-macro-checks.patch @@ -0,0 +1,43 @@ +From 2fffeb273ea46c1e91536f3d660982de785c8d49 Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sat, 8 May 2021 20:52:59 +0700 +Subject: [PATCH 03/14] Fix WIN32 macro checks + +--- + src/file.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/file.h b/src/file.h +index 299ac0c..2c365a6 100644 +--- a/src/file.h ++++ b/src/file.h +@@ -82,7 +82,7 @@ + #include + #include + #include +-#ifndef WIN32 ++#ifndef _WIN32 + #include + #endif + /* Do this here and now, because struct stat gets re-defined on solaris */ +@@ -95,7 +95,7 @@ + #define MAGIC "/etc/magic" + #endif + +-#if defined(__EMX__) || defined (WIN32) ++#if defined(__EMX__) || defined (_WIN32) + #define PATHSEP ';' + #else + #define PATHSEP ':' +@@ -103,7 +103,7 @@ + + #define private static + +-#if HAVE_VISIBILITY && !defined(WIN32) ++#if HAVE_VISIBILITY && !defined(_WIN32) + #define public __attribute__ ((__visibility__("default"))) + #ifndef protected + #define protected __attribute__ ((__visibility__("hidden"))) +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0004-Typedef-POSIX-types-on-Windows.patch b/ports/libmagic/0004-Typedef-POSIX-types-on-Windows.patch new file mode 100644 index 00000000000000..a15298432ea217 --- /dev/null +++ b/ports/libmagic/0004-Typedef-POSIX-types-on-Windows.patch @@ -0,0 +1,29 @@ +From eb3dde2954dacd86ec7490540eb9b7e3530b917b Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sat, 8 May 2021 20:12:55 +0700 +Subject: [PATCH 04/14] Typedef POSIX types on Windows + +--- + src/file.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/file.h b/src/file.h +index 2c365a6..0332506 100644 +--- a/src/file.h ++++ b/src/file.h +@@ -425,6 +425,12 @@ struct cont { + + #define MAGIC_SETS 2 + ++#ifdef _MSC_VER ++#include ++typedef int mode_t; ++typedef SSIZE_T ssize_t; ++#endif ++ + struct magic_set { + struct mlist *mlist[MAGIC_SETS]; /* list of regular entries */ + struct cont c; +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0005-Include-dirent.h-for-S_ISREG-and-S_ISDIR.patch b/ports/libmagic/0005-Include-dirent.h-for-S_ISREG-and-S_ISDIR.patch new file mode 100644 index 00000000000000..76cbc1222c8bd0 --- /dev/null +++ b/ports/libmagic/0005-Include-dirent.h-for-S_ISREG-and-S_ISDIR.patch @@ -0,0 +1,24 @@ +From a8f8fbfc2736419c65992cbf24de963c3b1f3107 Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sat, 8 May 2021 22:07:55 +0700 +Subject: [PATCH 05/14] Include dirent.h for S_ISREG and S_ISDIR + +--- + src/file.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/file.h b/src/file.h +index 0332506..4aa9f60 100644 +--- a/src/file.h ++++ b/src/file.h +@@ -88,6 +88,7 @@ + /* Do this here and now, because struct stat gets re-defined on solaris */ + #include + #include ++#include + + #define ENABLE_CONDITIONALS + +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0006-Remove-Wrap-POSIX-headers.patch b/ports/libmagic/0006-Remove-Wrap-POSIX-headers.patch new file mode 100644 index 00000000000000..56efac2481577b --- /dev/null +++ b/ports/libmagic/0006-Remove-Wrap-POSIX-headers.patch @@ -0,0 +1,189 @@ +From b20c8e62851f3cb53083a3e7811518092f98dc26 Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sat, 8 May 2021 22:47:32 +0700 +Subject: [PATCH 06/14] Remove/Wrap POSIX headers + +--- + src/buffer.c | 2 ++ + src/cdf.c | 2 ++ + src/dprintf.c | 2 ++ + src/file.c | 1 - + src/getline.c | 2 ++ + src/is_csv.c | 2 ++ + src/is_json.c | 2 ++ + src/magic.c | 2 ++ + src/memtest.c | 2 ++ + src/mygetopt.h | 2 ++ + src/pread.c | 2 ++ + src/readcdf.c | 2 ++ + 12 files changed, 22 insertions(+), 1 deletion(-) + +diff --git a/src/buffer.c b/src/buffer.c +index 227015a..f3d8efa 100644 +--- a/src/buffer.c ++++ b/src/buffer.c +@@ -31,7 +31,9 @@ FILE_RCSID("@(#)$File: buffer.c,v 1.8 2020/02/16 15:52:49 christos Exp $") + #endif /* lint */ + + #include "magic.h" ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + #include +diff --git a/src/cdf.c b/src/cdf.c +index bb81d63..dc9ec56 100644 +--- a/src/cdf.c ++++ b/src/cdf.c +@@ -43,7 +43,9 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.116 2019/08/26 14:31:39 christos Exp $") + #include + #endif + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + #include +diff --git a/src/dprintf.c b/src/dprintf.c +index 027a64f..873c547 100644 +--- a/src/dprintf.c ++++ b/src/dprintf.c +@@ -32,7 +32,9 @@ FILE_RCSID("@(#)$File: dprintf.c,v 1.2 2018/09/09 20:33:28 christos Exp $") + #endif /* lint */ + + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + +diff --git a/src/file.c b/src/file.c +index 87b9ab1..2889f8a 100644 +--- a/src/file.c ++++ b/src/file.c +@@ -38,7 +38,6 @@ FILE_RCSID("@(#)$File: file.c,v 1.189 2021/02/05 21:33:49 christos Exp $") + #include "magic.h" + + #include +-#include + #include + #ifdef RESTORE_TIME + # if (__COHERENT__ >= 0x420) +diff --git a/src/getline.c b/src/getline.c +index b00de01..c2d41ca 100644 +--- a/src/getline.c ++++ b/src/getline.c +@@ -33,7 +33,9 @@ + #if !HAVE_GETLINE + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + +diff --git a/src/is_csv.c b/src/is_csv.c +index 937ab5f..2f704c5 100644 +--- a/src/is_csv.c ++++ b/src/is_csv.c +@@ -166,7 +166,9 @@ file_is_csv(struct magic_set *ms, const struct buffer *b, int looks_text) + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + #include +diff --git a/src/is_json.c b/src/is_json.c +index 0b12438..997a276 100644 +--- a/src/is_json.c ++++ b/src/is_json.c +@@ -436,7 +436,9 @@ file_is_json(struct magic_set *ms, const struct buffer *b) + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + #include +diff --git a/src/magic.c b/src/magic.c +index 81a0840..e9aeafa 100644 +--- a/src/magic.c ++++ b/src/magic.c +@@ -39,7 +39,9 @@ FILE_RCSID("@(#)$File: magic.c,v 1.114 2021/02/05 21:33:49 christos Exp $") + #include "magic.h" + + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #ifdef QUICK + #include +diff --git a/src/memtest.c b/src/memtest.c +index f9506f6..ea50242 100644 +--- a/src/memtest.c ++++ b/src/memtest.c +@@ -34,7 +34,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + +diff --git a/src/mygetopt.h b/src/mygetopt.h +index d766762..b8e044c 100644 +--- a/src/mygetopt.h ++++ b/src/mygetopt.h +@@ -39,7 +39,9 @@ + #ifndef _GETOPT_H_ + #define _GETOPT_H_ + ++#ifdef HAVE_UNISTD_H + #include ++#endif + + /* + * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions +diff --git a/src/pread.c b/src/pread.c +index 3ab52d1..fc48d84 100644 +--- a/src/pread.c ++++ b/src/pread.c +@@ -3,7 +3,9 @@ + FILE_RCSID("@(#)$File: pread.c,v 1.2 2013/04/02 16:23:07 christos Exp $") + #endif /* lint */ + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + + ssize_t + pread(int fd, void *buf, size_t len, off_t off) { +diff --git a/src/readcdf.c b/src/readcdf.c +index 7622c7b..977cb75 100644 +--- a/src/readcdf.c ++++ b/src/readcdf.c +@@ -31,7 +31,9 @@ FILE_RCSID("@(#)$File: readcdf.c,v 1.74 2019/09/11 15:46:30 christos Exp $") + + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + #include +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch b/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch new file mode 100644 index 00000000000000..726fbde7e6981d --- /dev/null +++ b/ports/libmagic/0007-Substitute-unistd-macros-for-MSVC.patch @@ -0,0 +1,30 @@ +From 1106d1523ed44bcbcca90fc1fe9fa9400777d8fe Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sun, 9 May 2021 10:28:49 +0700 +Subject: [PATCH 07/14] Substitute unistd macros for MSVC + +--- + src/file.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/file.h b/src/file.h +index 4aa9f60..5da838c 100644 +--- a/src/file.h ++++ b/src/file.h +@@ -85,6 +85,13 @@ + #ifndef _WIN32 + #include + #endif ++#ifdef _MSC_VER ++#include ++#define R_OK 4 ++#define W_OK 2 ++#define X_OK R_OK ++#define F_OK 0 ++#endif + /* Do this here and now, because struct stat gets re-defined on solaris */ + #include + #include +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0008-Add-FILENO-defines.patch b/ports/libmagic/0008-Add-FILENO-defines.patch new file mode 100644 index 00000000000000..dea50809267f5e --- /dev/null +++ b/ports/libmagic/0008-Add-FILENO-defines.patch @@ -0,0 +1,26 @@ +From e449e3fb47aee00f0d82782183cc7fd6b446d27b Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sun, 9 May 2021 13:24:42 +0700 +Subject: [PATCH 08/14] Add FILENO defines + +--- + src/file.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/file.h b/src/file.h +index 5da838c..ccfe0da 100644 +--- a/src/file.h ++++ b/src/file.h +@@ -91,6 +91,9 @@ + #define W_OK 2 + #define X_OK R_OK + #define F_OK 0 ++#define STDIN_FILENO _fileno(stdin) ++#define STDOUT_FILENO _fileno(stdout) ++#define STDERR_FILENO _fileno(stderr) + #endif + /* Do this here and now, because struct stat gets re-defined on solaris */ + #include +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0009-No-fcntl-in-magic.c.patch b/ports/libmagic/0009-No-fcntl-in-magic.c.patch new file mode 100644 index 00000000000000..47bf16165ef8f4 --- /dev/null +++ b/ports/libmagic/0009-No-fcntl-in-magic.c.patch @@ -0,0 +1,25 @@ +From 6d10bef865b69764f6e0ddd2b0f6a84e484cdb37 Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sun, 9 May 2021 13:25:14 +0700 +Subject: [PATCH 09/14] No fcntl in magic.c + +--- + src/magic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/magic.c b/src/magic.c +index e9aeafa..382bd96 100644 +--- a/src/magic.c ++++ b/src/magic.c +@@ -462,7 +462,7 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd) + rv = 0; + goto done; + } +-#if O_CLOEXEC == 0 ++#if O_CLOEXEC == 0 && !defined(_WIN32) + (void)fcntl(fd, F_SETFD, FD_CLOEXEC); + #endif + } +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0010-Properly-check-for-the-presence-of-bitmasks.patch b/ports/libmagic/0010-Properly-check-for-the-presence-of-bitmasks.patch new file mode 100644 index 00000000000000..f0d8738e465e51 --- /dev/null +++ b/ports/libmagic/0010-Properly-check-for-the-presence-of-bitmasks.patch @@ -0,0 +1,118 @@ +From a6bc98ce25cd9d9dba896e93ed441ff162f6793b Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sun, 9 May 2021 17:43:20 +0700 +Subject: [PATCH 10/14] Properly check for the presence of bitmasks + +--- + src/fsmagic.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/src/fsmagic.c b/src/fsmagic.c +index 5204f20..7244841 100644 +--- a/src/fsmagic.c ++++ b/src/fsmagic.c +@@ -66,7 +66,7 @@ FILE_RCSID("@(#)$File: fsmagic.c,v 1.81 2019/07/16 13:30:32 christos Exp $") + # define minor(dev) ((dev) & 0xff) + #endif + #undef HAVE_MAJOR +-#ifdef S_IFLNK ++#if S_IFLNK != 0 + private int + bad_link(struct magic_set *ms, int err, char *buf) + { +@@ -108,7 +108,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + int ret, did = 0; + int mime = ms->flags & MAGIC_MIME; + int silent = ms->flags & (MAGIC_APPLE|MAGIC_EXTENSION); +-#ifdef S_IFLNK ++#if S_IFLNK != 0 + char buf[BUFSIZ+4]; + ssize_t nch; + struct stat tstatbuf; +@@ -122,7 +122,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + * Fstat is cheaper but fails for files you don't have read perms on. + * On 4.2BSD and similar systems, use lstat() to identify symlinks. + */ +-#ifdef S_IFLNK ++#if S_IFLNK != 0 + if ((ms->flags & MAGIC_SYMLINK) == 0) + ret = lstat(fn, sb); + else +@@ -171,17 +171,17 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + + ret = 1; + if (!mime && !silent) { +-#ifdef S_ISUID ++#if S_ISUID != 0 + if (sb->st_mode & S_ISUID) + if (file_printf(ms, "%ssetuid", COMMA) == -1) + return -1; + #endif +-#ifdef S_ISGID ++#if S_ISGID != 0 + if (sb->st_mode & S_ISGID) + if (file_printf(ms, "%ssetgid", COMMA) == -1) + return -1; + #endif +-#ifdef S_ISVTX ++#if S_ISVTX != 0 + if (sb->st_mode & S_ISVTX) + if (file_printf(ms, "%ssticky", COMMA) == -1) + return -1; +@@ -197,7 +197,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + } else if (file_printf(ms, "%sdirectory", COMMA) == -1) + return -1; + break; +-#ifdef S_IFCHR ++#if S_IFCHR != 0 + case S_IFCHR: + /* + * If -s has been specified, treat character special files +@@ -232,7 +232,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + } + break; + #endif +-#ifdef S_IFBLK ++#if S_IFBLK != 0 + case S_IFBLK: + /* + * If -s has been specified, treat block special files +@@ -268,7 +268,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + break; + #endif + /* TODO add code to handle V7 MUX and Blit MUX files */ +-#ifdef S_IFIFO ++#if S_IFIFO != 0 + case S_IFIFO: + if((ms->flags & MAGIC_DEVICES) != 0) + break; +@@ -280,7 +280,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + return -1; + break; + #endif +-#ifdef S_IFDOOR ++#if S_IFDOOR != 0 + case S_IFDOOR: + if (mime) { + if (handle_mime(ms, mime, "door") == -1) +@@ -290,7 +290,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + return -1; + break; + #endif +-#ifdef S_IFLNK ++#if S_IFLNK != 0 + case S_IFLNK: + if ((nch = readlink(fn, buf, BUFSIZ-1)) <= 0) { + if (ms->flags & MAGIC_ERROR) { +@@ -378,7 +378,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + } + break; + #endif +-#ifdef S_IFSOCK ++#if S_IFSOCK != 0 + #ifndef __COHERENT__ + case S_IFSOCK: + if (mime) { +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0011-Remove-pipe-related-functions-in-funcs.c.patch b/ports/libmagic/0011-Remove-pipe-related-functions-in-funcs.c.patch new file mode 100644 index 00000000000000..ae2720ca3617f4 --- /dev/null +++ b/ports/libmagic/0011-Remove-pipe-related-functions-in-funcs.c.patch @@ -0,0 +1,32 @@ +From 15b0f505ff9eefd41b74ffdd4230355e933263ca Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Sun, 9 May 2021 17:45:50 +0700 +Subject: [PATCH 11/14] Remove pipe related functions in funcs.c + +--- + src/funcs.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/funcs.c b/src/funcs.c +index b926625..b585486 100644 +--- a/src/funcs.c ++++ b/src/funcs.c +@@ -809,6 +809,7 @@ file_print_guid(char *str, size_t len, const uint64_t *guid) + g->data4[6], g->data4[7]); + } + ++#ifndef _WIN32 + protected int + file_pipe_closexec(int *fds) + { +@@ -827,6 +828,7 @@ protected int + file_clear_closexec(int fd) { + return fcntl(fd, F_SETFD, 0); + } ++#endif + + protected char * + file_strtrim(char *str) +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0012-Convert-MSYS2-paths-to-Windows-paths.patch b/ports/libmagic/0012-Convert-MSYS2-paths-to-Windows-paths.patch new file mode 100644 index 00000000000000..728fe77539f2c4 --- /dev/null +++ b/ports/libmagic/0012-Convert-MSYS2-paths-to-Windows-paths.patch @@ -0,0 +1,24 @@ +From f0139ced57c1579450f3d09b6e3ae0159aae031b Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Mon, 10 May 2021 08:43:28 +0700 +Subject: [PATCH 12/14] Convert MSYS2 paths to Windows paths + +--- + src/Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 34781b9..26f853f 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,4 +1,7 @@ + MAGIC = $(pkgdatadir)/magic ++if MINGW ++MAGIC != cygpath -m -a -l '$(MAGIC)' ++endif + lib_LTLIBRARIES = libmagic.la + nodist_include_HEADERS = magic.h + +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0013-Check-for-backslash-in-argv-0-on-Windows.patch b/ports/libmagic/0013-Check-for-backslash-in-argv-0-on-Windows.patch new file mode 100644 index 00000000000000..77777fc61e8eed --- /dev/null +++ b/ports/libmagic/0013-Check-for-backslash-in-argv-0-on-Windows.patch @@ -0,0 +1,42 @@ +From 3f10c7d31627b64b068b84ba72e706991f672560 Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Fri, 14 May 2021 08:14:05 +0700 +Subject: [PATCH 13/14] Check for backslash in argv[0] on Windows + +--- + magic/Makefile.am | 2 +- + src/file.c | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/magic/Makefile.am b/magic/Makefile.am +index 0eb5865..170bbab 100644 +--- a/magic/Makefile.am ++++ b/magic/Makefile.am +@@ -353,7 +353,7 @@ ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) + @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \ + echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \ + else \ +- v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \ ++ v=$$(${FILE_COMPILE} --version | sed -e s/file${EXEEXT}-// -e q); \ + if [ "$$v" != "${PACKAGE_VERSION}" ]; then \ + echo "Cannot use the installed version of file ($$v) to"; \ + echo "cross-compile file ${PACKAGE_VERSION}"; \ +diff --git a/src/file.c b/src/file.c +index 2889f8a..12a604b 100644 +--- a/src/file.c ++++ b/src/file.c +@@ -200,6 +200,11 @@ main(int argc, char *argv[]) + _wildcard(&argc, &argv); + #endif + ++#ifdef _WIN32 ++ if ((progname = strrchr(argv[0], '\\')) != NULL) ++ progname++; ++ else ++#endif + if ((progname = strrchr(argv[0], '/')) != NULL) + progname++; + else +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0014-Define-POSIX-macros-if-missing.patch b/ports/libmagic/0014-Define-POSIX-macros-if-missing.patch new file mode 100644 index 00000000000000..09ac7a11926e47 --- /dev/null +++ b/ports/libmagic/0014-Define-POSIX-macros-if-missing.patch @@ -0,0 +1,38 @@ +From fa0e11f36bb0e322250e1e488ced9f2bf166874f Mon Sep 17 00:00:00 2001 +From: Long Nguyen +Date: Fri, 14 May 2021 18:11:39 +0700 +Subject: [PATCH 14/14] Define POSIX macros if missing + +--- + src/file.h | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/src/file.h b/src/file.h +index ccfe0da..98cd37b 100644 +--- a/src/file.h ++++ b/src/file.h +@@ -100,6 +100,21 @@ + #include + #include + ++#if !defined(S_IFBLK) ++#define S_IFBLK 0 ++#define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK) ++#endif ++ ++#if !defined(S_IFLNK) ++#define S_IFLNK 0 ++#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) ++#endif ++ ++#if !defined(S_IFSOCK) ++#define S_IFSOCK 0 ++#define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK) ++#endif ++ + #define ENABLE_CONDITIONALS + + #ifndef MAGIC +-- +2.29.2.windows.2 + diff --git a/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch b/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch new file mode 100644 index 00000000000000..da8ef79df29a4c --- /dev/null +++ b/ports/libmagic/0015-MSYS2-Remove-ioctl-call.patch @@ -0,0 +1,27 @@ +# From https://github.com/msys2/MINGW-packages/commit/3a51faadb8bacf06c7b7fd84b2ea80775d1a8b0d + +# this is an advanced patch to fix building v5.38 +# see for details +# this patch should be removed with the next version +diff --git a/src/compress.c b/src/compress.c +index 33ce2bc..f172eda 100644 +--- a/src/compress.c ++++ b/src/compress.c +@@ -378,7 +378,7 @@ + sread(int fd, void *buf, size_t n, int canbepipe __attribute__((__unused__))) + { + ssize_t rv; +-#ifdef FIONREAD ++#if defined(FIONREAD) && !defined(__MINGW32__) && !defined(WIN32) + int t = 0; + #endif + size_t rn = n; +@@ -386,7 +386,7 @@ + if (fd == STDIN_FILENO) + goto nocheck; + +-#ifdef FIONREAD ++#if defined(FIONREAD) && !defined(__MINGW32__) && !defined(WIN32) + if (canbepipe && (ioctl(fd, FIONREAD, &t) == -1 || t == 0)) { + #ifdef FD_ZERO + ssize_t cnt; diff --git a/ports/libmagic/portfile.cmake b/ports/libmagic/portfile.cmake new file mode 100644 index 00000000000000..fe61ea40209e7a --- /dev/null +++ b/ports/libmagic/portfile.cmake @@ -0,0 +1,70 @@ +if(VCPKG_TARGET_IS_WINDOWS) + set(PATCHES + "0001-Use-libtre.patch" + "0002-Change-zlib-lib-name-to-match-CMake-output.patch" + "0003-Fix-WIN32-macro-checks.patch" + "0004-Typedef-POSIX-types-on-Windows.patch" + "0005-Include-dirent.h-for-S_ISREG-and-S_ISDIR.patch" + "0006-Remove-Wrap-POSIX-headers.patch" + "0007-Substitute-unistd-macros-for-MSVC.patch" + "0008-Add-FILENO-defines.patch" + "0009-No-fcntl-in-magic.c.patch" + "0010-Properly-check-for-the-presence-of-bitmasks.patch" + "0011-Remove-pipe-related-functions-in-funcs.c.patch" + "0012-Convert-MSYS2-paths-to-Windows-paths.patch" + "0013-Check-for-backslash-in-argv-0-on-Windows.patch" + "0014-Define-POSIX-macros-if-missing.patch" + "0015-MSYS2-Remove-ioctl-call.patch" + ) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO file/file + REF FILE5_40 + SHA512 d76bfe5326e1b40368e055c2e049a24b4ffdbd727371f4f3aa1dd3f53787d16b88550b3cc71ecf02151e2fb3e567eb2598e4707badab8c391eb71113c2dcc319 + HEAD_REF master + PATCHES ${PATCHES} +) + +if(VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS") +endif() + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} +) + +if(VCPKG_CROSSCOMPILING) + vcpkg_add_to_path(PREPEND ${CURRENT_HOST_INSTALLED_DIR}/tools/libmagic/bin) +elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(EXTRA_ARGS "ADD_BIN_TO_PATH") +endif() + +vcpkg_install_make(${EXTRA_ARGS}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/share/misc) + file(COPY ${CURRENT_PACKAGES_DIR}/share/${PORT}/misc/magic.mgc DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/share/misc) + endif() + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/share/misc) + file(COPY ${CURRENT_PACKAGES_DIR}/share/${PORT}/misc/magic.mgc DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/share/misc) + endif() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/man5) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libmagic/vcpkg.json b/ports/libmagic/vcpkg.json new file mode 100644 index 00000000000000..c0c727f1d47b46 --- /dev/null +++ b/ports/libmagic/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "libmagic", + "version-string": "5.40", + "description": "This library can be used to classify files according to magic number tests.", + "homepage": "https://github.com/file/file", + "dependencies": [ + { + "name": "dirent", + "platform": "windows" + }, + { + "name": "getopt", + "platform": "windows" + }, + { + "name": "libmagic", + "host": true + }, + { + "name": "tre", + "platform": "windows | mingw" + } + ] +} diff --git a/ports/libmariadb/CONTROL b/ports/libmariadb/CONTROL deleted file mode 100644 index 0e3327bb4c0d42..00000000000000 --- a/ports/libmariadb/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libmariadb -Version: 3.0.10-3 -Homepage: https://github.com/MariaDB/mariadb-connector-c -Description: MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases diff --git a/ports/libmariadb/arm64.patch b/ports/libmariadb/arm64.patch new file mode 100644 index 00000000000000..4d8e9ac8d0c89e --- /dev/null +++ b/ports/libmariadb/arm64.patch @@ -0,0 +1,15 @@ +diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt +index 640a35bea..6c8d93250 100755 +--- a/libmariadb/CMakeLists.txt ++++ b/libmariadb/CMakeLists.txt +@@ -410,10 +410,6 @@ TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS}) + + SIGN_TARGET(libmariadb) + +-IF(CMAKE_SIZEOF_VOID_P EQUAL 8 AND MSVC) +- SET_TARGET_PROPERTIES(mariadbclient PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64") +-ENDIF() +- + IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR + CMAKE_SYSTEM_NAME MATCHES "kFreeBSD" OR + CMAKE_SYSTEM_NAME MATCHES "GNU") diff --git a/ports/libmariadb/disable-test-build.patch b/ports/libmariadb/disable-test-build.patch index c877fb50b2a6d6..6ee60ba937bd5a 100644 --- a/ports/libmariadb/disable-test-build.patch +++ b/ports/libmariadb/disable-test-build.patch @@ -1,34 +1,18 @@ -diff --git a/unittest/libmariadb/CMakeLists.txt b/unittest/libmariadb/CMakeLists.txt -index 9cea916..a39ba94 100644 ---- a/unittest/libmariadb/CMakeLists.txt -+++ b/unittest/libmariadb/CMakeLists.txt -@@ -58,16 +58,16 @@ ENDIF() - - ADD_LIBRARY(ma_getopt ma_getopt.c) - --FOREACH(API_TEST ${API_TESTS}) -- IF (NOT TARGET ${API_TEST}) -- ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) -- ENDIF() -- TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient) -- ADD_TEST(${API_TEST} ${EXECUTABLE_OUTPUT_PATH}/${API_TEST}) -- SET_TESTS_PROPERTIES(${API_TEST} PROPERTIES TIMEOUT 180) --ENDFOREACH(API_TEST) -- --FOREACH(API_TEST ${MANUAL_TESTS}) -- ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) -- TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient) --ENDFOREACH() -+#FOREACH(API_TEST ${API_TESTS}) -+# IF (NOT TARGET ${API_TEST}) -+# ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) -+# ENDIF() -+# TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient) -+# ADD_TEST(${API_TEST} ${EXECUTABLE_OUTPUT_PATH}/${API_TEST}) -+# SET_TESTS_PROPERTIES(${API_TEST} PROPERTIES TIMEOUT 180) -+#ENDFOREACH(API_TEST) -+# -+#FOREACH(API_TEST ${MANUAL_TESTS}) -+# ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) -+# TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient) -+#ENDFOREACH() +diff --git a/unittest/libmariadb/CMakeLists.txt b/unittest/libmariadb/CMakeLists.txt +index e3ba18b..48c4f1d 100644 +--- a/unittest/libmariadb/CMakeLists.txt ++++ b/unittest/libmariadb/CMakeLists.txt +@@ -48,6 +48,7 @@ ENDIF() + + ADD_LIBRARY(ma_getopt ma_getopt.c) + ++if(0) + FOREACH(API_TEST ${API_TESTS}) + IF (NOT TARGET ${API_TEST}) + ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) +@@ -65,3 +66,4 @@ FOREACH(API_TEST ${MANUAL_TESTS}) + ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) + TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient) + ENDFOREACH() ++endif() +\ No newline at end of file diff --git a/ports/libmariadb/export-cmake-targets.patch b/ports/libmariadb/export-cmake-targets.patch new file mode 100644 index 00000000000000..c841a1fe917a0b --- /dev/null +++ b/ports/libmariadb/export-cmake-targets.patch @@ -0,0 +1,38 @@ +diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt +index c109a20..e1fa3f1 100644 +--- a/libmariadb/CMakeLists.txt ++++ b/libmariadb/CMakeLists.txt +@@ -405,6 +405,7 @@ ELSE() + TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE mariadbclient) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) + ENDIF() ++TARGET_INCLUDE_DIRECTORIES(libmariadb PUBLIC $) + + TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS}) + +@@ -453,13 +454,25 @@ ENDIF() + + INSTALL(TARGETS mariadbclient + COMPONENT Development ++ EXPORT unofficial-libmariadb-targets + LIBRARY DESTINATION lib) + INSTALL(TARGETS libmariadb + COMPONENT SharedLibraries ++ EXPORT unofficial-libmariadb-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + ++install(EXPORT unofficial-libmariadb-targets DESTINATION share/unofficial-libmariadb) ++ ++file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake" ++[[include(CMakeFindDependencyMacro) ++find_dependency(ZLIB) ++find_dependency(OpenSSL) ++include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libmariadb-targets.cmake") ++]]) ++ ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake DESTINATION share/unofficial-libmariadb) + + IF(0) + # On Windows, install PDB diff --git a/ports/libmariadb/fix-InstallPath.patch b/ports/libmariadb/fix-InstallPath.patch index 1a317aa2d9fc73..bdf81788e3554a 100644 --- a/ports/libmariadb/fix-InstallPath.patch +++ b/ports/libmariadb/fix-InstallPath.patch @@ -1,37 +1,21 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 02757a9..b2715dd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,6 +15,11 @@ IF(COMMAND CMAKE_POLICY) - ENDFOREACH() - ENDIF() - -+if (BUILD_SHARED_LIBS) -+ set(DEFAULT_LINKAGE DYNAMIC) -+else() -+ set(DEFAULT_LINKAGE STATIC) -+endif() - - PROJECT(mariadb-connector-c C) - -diff --git a/cmake/install_plugins.cmake b/cmake/install_plugins.cmake -index cd5616c..d058a5c 100644 ---- a/cmake/install_plugins.cmake -+++ b/cmake/install_plugins.cmake -@@ -8,7 +8,7 @@ - # plugin installation - - MACRO(INSTALL_PLUGIN name binary_dir) -- INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}) -+ INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}/../../../bin/plugin) - IF(WIN32) - FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "\n") - FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "\n") +diff --git a/include/mariadb_version.h.in b/include/mariadb_version.h.in +index a82dbb7..e9005fa 100644 +--- a/include/mariadb_version.h.in ++++ b/include/mariadb_version.h.in +@@ -30,7 +30,7 @@ + #define MARIADB_PACKAGE_VERSION_ID @MARIADB_PACKAGE_VERSION_ID@ + #define MARIADB_SYSTEM_TYPE "@CMAKE_SYSTEM_NAME@" + #define MARIADB_MACHINE_TYPE "@CMAKE_SYSTEM_PROCESSOR@" +-#define MARIADB_PLUGINDIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_PLUGINDIR@" ++#define MARIADB_PLUGINDIR "../@INSTALL_PLUGINDIR@" + + /* mysqld compile time options */ + #ifndef MYSQL_CHARSET diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt -index a1f039e..03a3a6f 100644 +index bcfd4de..c109a20 100644 --- a/libmariadb/CMakeLists.txt +++ b/libmariadb/CMakeLists.txt -@@ -386,10 +386,10 @@ ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) +@@ -398,10 +398,10 @@ ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS}) IF(UNIX) @@ -41,10 +25,10 @@ index a1f039e..03a3a6f 100644 ELSE() - ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} mariadbclient.def) + ADD_LIBRARY(libmariadb ${libmariadb_RC} mariadbclient.def) - TARGET_LINK_LIBRARIES(libmariadb mariadbclient) + TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE mariadbclient) SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) ENDIF() -@@ -441,13 +441,14 @@ ENDIF() +@@ -453,13 +453,15 @@ ENDIF() INSTALL(TARGETS mariadbclient COMPONENT Development @@ -53,94 +37,26 @@ index a1f039e..03a3a6f 100644 INSTALL(TARGETS libmariadb COMPONENT SharedLibraries - DESTINATION ${INSTALL_LIBDIR}) -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + -- --IF(WIN32) +-IF(MSVC) +IF(0) # On Windows, install PDB INSTALL(FILES $ DESTINATION "${INSTALL_LIBDIR}" CONFIGURATIONS Debug RelWithDebInfo -diff --git a/plugins/auth/CMakeLists.txt b/plugins/auth/CMakeLists.txt -index 42f6f05..9a57146 100644 ---- a/plugins/auth/CMakeLists.txt -+++ b/plugins/auth/CMakeLists.txt -@@ -14,7 +14,7 @@ REGISTER_PLUGIN(TARGET mysql_native_password - REGISTER_PLUGIN(TARGET dialog - TYPE MARIADB_CLIENT_PLUGIN_AUTH - CONFIGURATIONS DYNAMIC STATIC OFF -- DEFAULT DYNAMIC -+ DEFAULT ${DEFAULT_LINKAGE} - SOURCES ${CC_SOURCE_DIR}/plugins/auth/dialog.c - ${CC_SOURCE_DIR}/libmariadb/get_password.c) - -@@ -33,7 +33,7 @@ IF(WITH_SSL) - REGISTER_PLUGIN(TARGET caching_sha2_password - TYPE MARIADB_CLIENT_PLUGIN_AUTH - CONFIGURATIONS DYNAMIC STATIC OFF -- DEFAULT DYNAMIC -+ DEFAULT ${DEFAULT_LINKAGE} - SOURCES ${CC_SOURCE_DIR}/plugins/auth/caching_sha2_pw.c - ${CRYPT_SOURCE} - LIBRARIES ${CACHING_SHA2_LIBS}) -@@ -53,7 +53,7 @@ IF(GSSAPI_SOURCES) - REGISTER_PLUGIN(TARGET auth_gssapi_client - TYPE MARIADB_CLIENT_PLUGIN_AUTH - CONFIGURATIONS DYNAMIC STATIC OFF -- DEFAULT DYNAMIC -+ DEFAULT ${DEFAULT_LINKAGE} - SOURCES ${GSSAPI_SOURCES} - INCLUDES ${CC_SOURCE_DIR}/plugins/auth ${GSSAPI_INCS} - LIBRARIES ${GSSAPI_LIBS}) -@@ -68,7 +68,7 @@ IF(${WITH_SSL} STREQUAL "OPENSSL" OR ${WITH_SSL} STREQUAL "SCHANNEL") - REGISTER_PLUGIN(TARGET sha256_password - TYPE MARIADB_CLIENT_PLUGIN_AUTH - CONFIGURATIONS DYNAMIC STATIC OFF -- DEFAULT DYNAMIC -+ DEFAULT ${DEFAULT_LINKAGE} - SOURCES ${AUTH_DIR}/sha256_pw.c - LIBRARIES ${SHA256_LIBS}) - ENDIF() -@@ -85,6 +85,6 @@ REGISTER_PLUGIN(TARGET mysql_old_password - REGISTER_PLUGIN(TARGET mysql_clear_password - TYPE MARIADB_CLIENT_PLUGIN_AUTH - CONFIGURATIONS DYNAMIC STATIC OFF -- DEFAULT DYNAMIC -+ DEFAULT ${DEFAULT_LINKAGE} - SOURCES ${AUTH_DIR}/mariadb_cleartext.c) - -diff --git a/plugins/io/CMakeLists.txt b/plugins/io/CMakeLists.txt -index 8c304c9..3547107 100644 ---- a/plugins/io/CMakeLists.txt -+++ b/plugins/io/CMakeLists.txt -@@ -7,7 +7,7 @@ IF (WITH_CURL) - REGISTER_PLUGIN(TARGET remote_io - TYPE MARIADB_CLIENT_PLUGIN_IO - CONFIGURATIONS DYNAMIC STATIC OFF -- DEFAULT DYNAMIC -+ DEFAULT ${DEFAULT_LINKAGE} - SOURCES ${CC_SOURCE_DIR}/plugins/io/remote_io.c - INCLUDES ${CURL_INCLUDE_DIR} - LIBRARIES ${CURL_LIBRARIES}) -diff --git a/plugins/pvio/CMakeLists.txt b/plugins/pvio/CMakeLists.txt -index 76eb3ef..3601622 100644 ---- a/plugins/pvio/CMakeLists.txt -+++ b/plugins/pvio/CMakeLists.txt -@@ -15,13 +15,13 @@ IF(WIN32) - REGISTER_PLUGIN(TARGET pvio_npipe - TYPE MARIADB_CLIENT_PLUGIN_PVIO - CONFIGURATIONS STATIC DYNAMIC DEFAULT -- DEFAULT DYNAMIC -+ DEFAULT ${DEFAULT_LINKAGE} - SOURCES ${CC_SOURCE_DIR}/plugins/pvio/pvio_npipe.c) - - # shared memory - REGISTER_PLUGIN(TARGET pvio_shmem - TYPE MARIADB_CLIENT_PLUGIN_PVIO - CONFIGURATIONS STATIC DYNAMIC DEFAULT -- DEFAULT DYNAMIC -+ DEFAULT ${DEFAULT_LINKAGE} - SOURCES ${CC_SOURCE_DIR}/plugins/pvio/pvio_shmem.c) - ENDIF() +diff --git a/mariadb_config/mariadb_config.c.in b/mariadb_config/mariadb_config.c.in +index 5574943..fc1ca7c 100644 +--- a/mariadb_config/mariadb_config.c.in ++++ b/mariadb_config/mariadb_config.c.in +@@ -210,7 +210,7 @@ end: + } + if (!p || !p[0]) + { +- strncpy(installation_dir, "@CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@", PATH_MAX - 1); ++ strncpy(installation_dir, "../@CMAKE_INSTALL_PREFIX@", PATH_MAX - 1); + return; + } + } diff --git a/ports/libmariadb/fix-build-error-with-cmake3.20.patch b/ports/libmariadb/fix-build-error-with-cmake3.20.patch new file mode 100644 index 00000000000000..1eed4ee4741b0d --- /dev/null +++ b/ports/libmariadb/fix-build-error-with-cmake3.20.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/ConnectorName.cmake b/cmake/ConnectorName.cmake +index b7bbbad..357b8ac 100644 +--- a/cmake/ConnectorName.cmake ++++ b/cmake/ConnectorName.cmake +@@ -22,7 +22,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows") + SET(MACHINE_NAME "x64") + ELSE() + SET(MACHINE_NAME "32") +- END() ++ ENDIF() + ENDIF() + + SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}") diff --git a/ports/libmariadb/fix-iconv.patch b/ports/libmariadb/fix-iconv.patch new file mode 100644 index 00000000000000..a3b42842108908 --- /dev/null +++ b/ports/libmariadb/fix-iconv.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 203fca7..65cc350 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -342,7 +342,8 @@ ENDIF() + + IF(WITH_ICONV) + IF(NOT WIN32) +- INCLUDE(${CC_SOURCE_DIR}/cmake/FindIconv.cmake) ++ find_package(Iconv REQUIRED) ++ include_directories(${Iconv_INCLUDE_DIRS}) + ENDIF() + ENDIF() + +@@ -359,8 +360,8 @@ IF(WIN32) + SET(SYSTEM_LIBS ws2_32 advapi32 kernel32 shlwapi crypt32 ${LIBZ}) + ELSE() + SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBPTHREAD} ${CMAKE_DL_LIBS} ${LIBM}) +- IF(ICONV_EXTERNAL) +- SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${ICONV_LIBRARIES}) ++ IF(WITH_ICONV) ++ SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${Iconv_LIBRARIES}) + ENDIF() + ENDIF() + IF(WITH_SSL) +diff --git a/mariadb_config/CMakeLists.txt b/mariadb_config/CMakeLists.txt +index 5bbf36b..70e619b 100644 +--- a/mariadb_config/CMakeLists.txt ++++ b/mariadb_config/CMakeLists.txt +@@ -38,8 +38,8 @@ STRING(STRIP "${extra_dynamic_LDFLAGS}" extra_dynamic_LDFLAGS) + LIST(REMOVE_DUPLICATES extra_dynamic_LDFLAGS) + + IF(UNIX AND NOT APPLE) +- IF(ICONV_EXTERNAL) +- GET_LIB_NAME(${ICONV_LIBRARIES} LIB_OUT) ++ IF(WITH_ICONV) ++ GET_LIB_NAME(${Iconv_LIBRARIES} LIB_OUT) + SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} ${LIB_OUT}") + ENDIF() + ENDIF() diff --git a/ports/libmariadb/md.patch b/ports/libmariadb/md.patch index 42199cf920827a..9d1c4d7b1150fd 100644 --- a/ports/libmariadb/md.patch +++ b/ports/libmariadb/md.patch @@ -1,13 +1,13 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ef45ee8..470573e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -110,7 +110,7 @@ IF(NOT IS_SUBPROJECT) - IF(MSVC) - # Speedup system tests - INCLUDE(${CC_SOURCE_DIR}/cmake/WindowsCache.cmake) -- IF (MSVC) -+ IF (MSVC AND 0) - SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO") - FOREACH(BUILD_TYPE ${CONFIG_TYPES}) - FOREACH(COMPILER CXX C) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cd716e3..a1f2ada 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -98,7 +98,7 @@ IF(MSVC) + # Speedup system tests + INCLUDE(${CC_SOURCE_DIR}/cmake/WindowsCache.cmake) + ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) +- IF (MSVC) ++ IF (MSVC AND 0) + SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO") + FOREACH(BUILD_TYPE ${CONFIG_TYPES}) + FOREACH(COMPILER CXX C) diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index ebf8b9f24e5ffe..6f8da25bea9370 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -1,33 +1,52 @@ - if (EXISTS "${CURRENT_INSTALLED_DIR}/share/libmysql") message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") endif() -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO MariaDB/mariadb-connector-c - REF v3.0.10 - SHA512 43f89ead531d1b2f6ede943486bf39f606124762309c294b0f3e185937aef7439cb345103fc065e7940ed64c01ca1bf16940cd2fb0d80da60f39009c3b5a910b - HEAD_REF master + REPO mariadb-corporation/mariadb-connector-c + REF 7d304d26c787a3f0430624db977b615aba56e4bb # v3.1.12 + SHA512 16e74b2cbe401492ef294e2442a00ef1739089152a88d9263ca4d17b65260554b330630e9405813fd9089fa445d676e3b6aa91ac94128ad6b0a299e8b7edc1b3 + HEAD_REF 3.1 PATCHES - md.patch - disable-test-build.patch - fix-InstallPath.patch + arm64.patch + md.patch + disable-test-build.patch + fix-InstallPath.patch + fix-iconv.patch + export-cmake-targets.patch + fix-build-error-with-cmake3.20.patch #This can be removed in next release, which has been merged to upstream. ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + zlib WITH_EXTERNAL_ZLIB + iconv WITH_ICONV +) + +if("openssl" IN_LIST FEATURES) + set(WITH_SSL OPENSSL) +else() + set(WITH_SSL OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DWITH_UNITTEST=OFF - -DWITH_SSL=OFF + ${FEATURE_OPTIONS} + -DINSTALL_PLUGINDIR=plugin/${PORT} + -DWITH_UNIT_TESTS=OFF -DWITH_CURL=OFF + -DWITH_SSL=${WITH_SSL} ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-libmariadb TARGET_PATH share/unofficial-libmariadb) + +vcpkg_fixup_pkgconfig() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") # remove debug header file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -40,6 +59,10 @@ if(VCPKG_BUILD_TYPE STREQUAL "debug") ${CURRENT_PACKAGES_DIR}/include) endif() +if (NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_copy_tools(TOOL_NAMES mariadb_config AUTO_CLEAN) +endif() + # remove plugin folder file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/mariadb @@ -56,5 +79,4 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/include/mysql) # copy license file -file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmariadb) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmariadb/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libmariadb/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libmariadb/vcpkg.json b/ports/libmariadb/vcpkg.json new file mode 100644 index 00000000000000..5658ced391a47c --- /dev/null +++ b/ports/libmariadb/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "libmariadb", + "version-semver": "3.1.12", + "port-version": 2, + "description": "MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases", + "homepage": "https://github.com/MariaDB/mariadb-connector-c", + "default-features": [ + "openssl", + "zlib" + ], + "features": { + "iconv": { + "description": "Enables character set conversion", + "dependencies": [ + "libiconv" + ] + }, + "openssl": { + "description": "Enable SSL support", + "dependencies": [ + "openssl" + ] + }, + "zlib": { + "description": "Use internal zlib", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/libmaxminddb/CONTROL b/ports/libmaxminddb/CONTROL deleted file mode 100644 index f8b7f85be48253..00000000000000 --- a/ports/libmaxminddb/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libmaxminddb -Version: 1.3.2-2 -Description: C library for the MaxMind DB file format \ No newline at end of file diff --git a/ports/libmaxminddb/fix-linux-build.patch b/ports/libmaxminddb/fix-linux-build.patch index 334b0f64cb7bc4..bdf9b77805d2b4 100644 --- a/ports/libmaxminddb/fix-linux-build.patch +++ b/ports/libmaxminddb/fix-linux-build.patch @@ -1,5 +1,5 @@ diff --git a/include/maxminddb.h b/include/maxminddb.h -index de1fdf8..1d17bc3 100644 +index 13b276f..6c70e49 100644 --- a/include/maxminddb.h +++ b/include/maxminddb.h @@ -24,11 +24,12 @@ extern "C" { @@ -7,13 +7,13 @@ index de1fdf8..1d17bc3 100644 #include +/* libmaxminddb package version from configure */ -+#define PACKAGE_VERSION "1.3.2" ++#define PACKAGE_VERSION "1.4.3" + #ifdef _WIN32 #include #include -/* libmaxminddb package version from configure */ --#define PACKAGE_VERSION "1.3.2" +-#define PACKAGE_VERSION "1.4.3" typedef ADDRESS_FAMILY sa_family_t; diff --git a/ports/libmaxminddb/portfile.cmake b/ports/libmaxminddb/portfile.cmake index bbc13472efca26..db280fad8e409c 100644 --- a/ports/libmaxminddb/portfile.cmake +++ b/ports/libmaxminddb/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO maxmind/libmaxminddb - REF 1.3.2 - SHA512 43ff5f4e3a413772cd315412afc1070fb80280405d8845dc9d94a795265a71007c6c182dc01da8e14bf7b8ab8defe05714bec543faa956e7fb0f0a7756e7df48 + REF 07797e9dfb6771190f9fa41a33babe19425ef552 #1.4.3 + SHA512 94f7fbd46a7846c804edad9759ceedf2f7c4b2085430322f74bea5c89f6c3fa0824f154f551119a8c69becec5120650efef89c6d7f5a2ef3df476086070c8c7e HEAD_REF master PATCHES fix-linux-build.patch ) @@ -24,4 +22,4 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmaxminddb RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libmaxminddb/vcpkg.json b/ports/libmaxminddb/vcpkg.json new file mode 100644 index 00000000000000..c24cb9c92cadfe --- /dev/null +++ b/ports/libmaxminddb/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libmaxminddb", + "version-string": "1.4.3", + "port-version": 1, + "description": "C library for the MaxMind DB file format", + "homepage": "https://github.com/maxmind/libmaxminddb" +} diff --git a/ports/libmediainfo/portfile.cmake b/ports/libmediainfo/portfile.cmake new file mode 100644 index 00000000000000..987fcdc9884535 --- /dev/null +++ b/ports/libmediainfo/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MediaArea/MediaInfoLib + REF d5fb067e1539aa7a74c491e8262c81214f9c8bcb #v21.03 + SHA512 6d49c8187dca264b4d9fb1f93a82cb65435e81a2540cfb84f885d53737560f7e8e60c8209e7d184cb191f298495db90ffb3185481e3ed44bf5a1f5131f671d89 + HEAD_REF master + PATCHES vcpkg_support_in_cmakelists.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/Project/CMake" + OPTIONS + -DBUILD_ZENLIB=0 + -DBUILD_ZLIB=0 +) + +vcpkg_cmake_install() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/share/mediainfolib") + file(RENAME "${CURRENT_PACKAGES_DIR}/share/mediainfolib" "${CURRENT_PACKAGES_DIR}/share/MediaInfoLib") +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/mediainfolib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/mediainfolib" "${CURRENT_PACKAGES_DIR}/debug/share/MediaInfoLib") +endif() +vcpkg_cmake_config_fixup(PACKAGE_NAME MediaInfoLib CONFIG_PATH share/MediaInfoLib) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libmediainfo/vcpkg.json b/ports/libmediainfo/vcpkg.json new file mode 100644 index 00000000000000..f254ce92487f93 --- /dev/null +++ b/ports/libmediainfo/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "libmediainfo", + "version-string": "21.03", + "description": "Get most relevant technical and tag data from video and audio files", + "homepage": "https://github.com/MediaArea/MediaInfoLib", + "dependencies": [ + "curl", + "libzen", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/libmediainfo/vcpkg_support_in_cmakelists.patch b/ports/libmediainfo/vcpkg_support_in_cmakelists.patch new file mode 100644 index 00000000000000..c38c919c81a193 --- /dev/null +++ b/ports/libmediainfo/vcpkg_support_in_cmakelists.patch @@ -0,0 +1,55 @@ +diff --git a/Project/CMake/CMakeLists.txt b/Project/CMake/CMakeLists.txt +index f983343..c6ba5ea 100644 +--- a/Project/CMake/CMakeLists.txt ++++ b/Project/CMake/CMakeLists.txt +@@ -88,7 +88,7 @@ endif() + find_package(TinyXML) + + # use system curl if is present +-find_package(CURL) ++find_package(CURL CONFIG REQUIRED) + + include_directories(${MediaInfoLib_SOURCES_PATH}) + include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/md5/) +@@ -400,13 +400,7 @@ endif() + target_link_libraries(mediainfo ${ZenLib_LIBRARY} ${ZLIB_LIBRARIES}) + + if(MSVC AND BUILD_SHARED_LIBS) +- get_target_property(LOCATION mediainfo LOCATION_DEBUG) +- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}") +- install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug) +- +- get_target_property(LOCATION mediainfo LOCATION_RELWITHDEBINFO) +- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}") +- install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo) ++ install(FILES $ DESTINATION ${BIN_INSTALL_DIR} OPTIONAL) + endif() + + if (APPLE) +diff --git a/Source/ThirdParty/aes-gladman/aesopt.h b/Source/ThirdParty/aes-gladman/aesopt.h +index d3ac0f9..eeefa40 100644 +--- a/Source/ThirdParty/aes-gladman/aesopt.h ++++ b/Source/ThirdParty/aes-gladman/aesopt.h +@@ -183,7 +183,7 @@ Issue Date: 20/12/2007 + AES_REV_DKS must NOT be defined when such assembler files are + built + */ +-#if 1 && defined( _WIN64 ) && defined( _MSC_VER ) ++#if 1 && defined( _WIN64 ) && defined( _MSC_VER ) && defined( _M_AMD64 ) + # define INTEL_AES_POSSIBLE + #endif + +diff --git a/Source/ThirdParty/aes-gladman/brg_endian.h b/Source/ThirdParty/aes-gladman/brg_endian.h +index b44c5cb..8c34364 100644 +--- a/Source/ThirdParty/aes-gladman/brg_endian.h ++++ b/Source/ThirdParty/aes-gladman/brg_endian.h +@@ -110,7 +110,8 @@ Issue Date: 20/12/2007 + defined( __MRC__ ) || defined( __MVS__ ) || defined( __MWERKS__ ) || \ + defined( sparc ) || defined( __sparc) || defined( SYMANTEC_C ) || \ + defined( __VOS__ ) || defined( __TIGCC__ ) || defined( __TANDEM ) || \ +- defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX ) ++ defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX ) || \ ++ defined( _M_ARM64 ) || defined ( _M_ARM ) + # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN + + #elif 0 /* **** EDIT HERE IF NECESSARY **** */ diff --git a/ports/libmesh/copyright b/ports/libmesh/copyright new file mode 100644 index 00000000000000..a9121567759efa --- /dev/null +++ b/ports/libmesh/copyright @@ -0,0 +1,169 @@ +GNU LESSER GENERAL PUBLIC LICENSE +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + +a) The modified work must itself be a software library. +b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. +c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. +d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + +a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) +b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. +c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. +d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. +e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. +b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Libraries +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + +one line to give the library's name and an idea of what it does. +Copyright (C) year name of author + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library `Frob' (a library for tweaking knobs) written +by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice +That's all there is to it! \ No newline at end of file diff --git a/ports/libmesh/portfile.cmake b/ports/libmesh/portfile.cmake new file mode 100644 index 00000000000000..9a16dbf98bf666 --- /dev/null +++ b/ports/libmesh/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libMesh/libmesh + REF 21f623c837b3865ed65ec9608b357bdb1935d428 #1.5.0 + SHA512 53ad41ed0cd99cb5096ff338a3ff5d8a8ecbfb17dc1d7ee0d2b0cbffecbede7f7c11b7c3c2233cec9dde0988c8828ba0199247effd3442befc72230e641a185e + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + set(OPTIONS --disable-qhull ) +endif() +# There a lot of configure options in this port which are not yet correctly handled by VCPKG +# To only mention two: +# --enable-vtk-required Error if VTK is not detected by configure +# --enable-capnp-required Error if Cap'n Proto support is not detected by +# but there are a lot more which need to be checked/fixed +# So this port can only be considered a Work In Progress +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${OPTIONS} +) + +vcpkg_install_make() + +if (EXISTS ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool) + file(COPY ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/contrib ${CURRENT_PACKAGES_DIR}/debug/contrib) + +file(GLOB ${CURRENT_PACKAGES_DIR}/bin LIBMESH_TOOLS) +foreach (LIBMESH_TOOL ${LIBMESH_TOOLS}) + file(COPY ${LIBMESH_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${LIBMESH_TOOL}) +endforeach() + +file(GLOB LIBMESH_TOOLS ${CURRENT_PACKAGES_DIR}/examples/*) +foreach (LIBMESH_TOOL ${LIBMESH_TOOLS}) + file(COPY ${LIBMESH_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${LIBMESH_TOOL}) +endforeach() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Remove tools and debug include directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/contrib ${CURRENT_PACKAGES_DIR}/debug/etc + ${CURRENT_PACKAGES_DIR}/debug/examples ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/Make.common ${CURRENT_PACKAGES_DIR}/debug/Make.common) + +vcpkg_copy_pdbs() + +file(INSTALL ${CURRENT_PORT_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + diff --git a/ports/libmesh/vcpkg.json b/ports/libmesh/vcpkg.json new file mode 100644 index 00000000000000..7c4b273f1c3ce3 --- /dev/null +++ b/ports/libmesh/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libmesh", + "version-string": "1.5.0", + "port-version": 2, + "description": "The libMesh library provides a framework for the numerical simulation of partial differential equations using arbitrary unstructured discretizations on serial and parallel platforms. A major goal of the library is to provide support for adaptive mesh refinement (AMR) computations in parallel while allowing a research scientist to focus on the physics they are modeling.", + "homepage": "https://github.com/libMesh/libmesh" +} diff --git a/ports/libmicrohttpd/CMakeLists.txt b/ports/libmicrohttpd/CMakeLists.txt deleted file mode 100644 index b54bb7b53fc5b6..00000000000000 --- a/ports/libmicrohttpd/CMakeLists.txt +++ /dev/null @@ -1,74 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(libmicrohttpd C) - -if(MSVC) - add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) -endif() - -set(MIN_SRC contrib/libmicrohttpd) - - -set(SRC - src/microhttpd/base64.c - src/microhttpd/basicauth.c - src/microhttpd/connection.c - src/microhttpd/daemon.c - src/microhttpd/digestauth.c - src/microhttpd/internal.c - src/microhttpd/md5.c - src/microhttpd/memorypool.c - src/microhttpd/mhd_mono_clock.c - src/microhttpd/postprocessor.c - src/microhttpd/reason_phrase.c - src/microhttpd/response.c - src/microhttpd/tsearch.c - src/microhttpd/sysfdsetsize.c - src/microhttpd/mhd_str.c - src/microhttpd/mhd_threads.c - src/microhttpd/mhd_sockets.c - src/microhttpd/mhd_itc.c - src/microhttpd/mhd_compat.c -) -set(HEADERS - src/microhttpd/base64.h - src/microhttpd/connection.h - src/microhttpd/internal.h - src/microhttpd/md5.h - src/microhttpd/memorypool.h - src/microhttpd/mhd_byteorder.h - src/microhttpd/mhd_limits.h - src/microhttpd/mhd_mono_clock.h - src/microhttpd/response.h - src/microhttpd/tsearch.h - src/microhttpd/sysfdsetsize.h - src/microhttpd/mhd_str.h - src/microhttpd/mhd_threads.h - src/microhttpd/mhd_locks.h - src/microhttpd/mhd_sockets.h - src/microhttpd/mhd_itc.h - src/microhttpd/mhd_itc_types.h - src/microhttpd/mhd_compat.h -) - -include_directories(${HEADERS} src/include w32/common) - -add_library(libmicrohttpd ${SRC}) - -if(BUILD_SHARED_LIBS) - target_compile_definitions(libmicrohttpd PRIVATE -DMHD_W32DLL) -else() - target_compile_definitions(libmicrohttpd PRIVATE -DMHD_W32LIB) -endif() - - target_link_libraries(libmicrohttpd ws2_32) - -install( - TARGETS libmicrohttpd - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES src/include/microhttpd.h DESTINATION include) -endif() diff --git a/ports/libmicrohttpd/CONTROL b/ports/libmicrohttpd/CONTROL deleted file mode 100644 index 8bc6ac22912375..00000000000000 --- a/ports/libmicrohttpd/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libmicrohttpd -Version: 0.9.63 -Homepage: https://www.gnu.org/software/libmicrohttpd/ -Description: GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application diff --git a/ports/libmicrohttpd/fix-msvc-project.patch b/ports/libmicrohttpd/fix-msvc-project.patch new file mode 100644 index 00000000000000..29071a2bee069c --- /dev/null +++ b/ports/libmicrohttpd/fix-msvc-project.patch @@ -0,0 +1,12 @@ +diff --git a/w32/common/libmicrohttpd-files.vcxproj b/w32/common/libmicrohttpd-files.vcxproj +index 6f1e03b..c0ddea8 100644 +--- a/w32/common/libmicrohttpd-files.vcxproj ++++ b/w32/common/libmicrohttpd-files.vcxproj +@@ -3,6 +3,7 @@ + + + ++ + + + diff --git a/ports/libmicrohttpd/portfile.cmake b/ports/libmicrohttpd/portfile.cmake index 51f4780a95528b..2b09dac0f50e78 100644 --- a/ports/libmicrohttpd/portfile.cmake +++ b/ports/libmicrohttpd/portfile.cmake @@ -1,25 +1,54 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm") -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +set(MICROHTTPD_VERSION 0.9.63) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmicrohttpd-0.9.63) vcpkg_download_distfile(ARCHIVE - URLS "ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.63.tar.gz" - FILENAME "libmicrohttpd-0.9.63.tar.gz" + URLS + "https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz" + "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz" + FILENAME "libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz" SHA512 cb99e7af84fb6d7c0fd3894a9dc0fbff14959b35347506bd3211a65bbfad36455007b9e67493e97c9d8394834408df10eeabdc7758573e6aae0ba6f5f87afe17 ) -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +vcpkg_extract_source_archive_ex( + ARCHIVE "${ARCHIVE}" + OUT_SOURCE_PATH SOURCE_PATH + PATCHES fix-msvc-project.patch ) -vcpkg_install_cmake() +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CFG_SUFFIX "dll") + else() + set(CFG_SUFFIX "static") + endif() + + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH w32/VS2015/libmicrohttpd.vcxproj + RELEASE_CONFIGURATION "Release-${CFG_SUFFIX}" + DEBUG_CONFIGURATION "Debug-${CFG_SUFFIX}" + ) + + file(GLOB MICROHTTPD_HEADERS "${SOURCE_PATH}/src/include/microhttpd*.h") + file(COPY ${MICROHTTPD_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include") +else() + if(VCPKG_TARGET_IS_OSX AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(ENV{LIBS} "$ENV{LIBS} -framework Foundation -framework AppKit") # TODO: Get this from the extracted cmake vars somehow + endif() + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + --disable-doc + --disable-examples + --disable-curl + --disable-https + --with-gnutls=no + ) -vcpkg_copy_pdbs() + vcpkg_install_make() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmicrohttpd RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libmicrohttpd/vcpkg.json b/ports/libmicrohttpd/vcpkg.json new file mode 100644 index 00000000000000..d8a44ce57b11f7 --- /dev/null +++ b/ports/libmicrohttpd/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libmicrohttpd", + "version": "0.9.63", + "port-version": 6, + "description": "GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application", + "homepage": "https://www.gnu.org/software/libmicrohttpd/", + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "gettext", + "platform": "!windows" + } + ] +} diff --git a/ports/libmikmod/CONTROL b/ports/libmikmod/CONTROL deleted file mode 100644 index bc289f59c938e7..00000000000000 --- a/ports/libmikmod/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libmikmod -Version: 3.3.11.1-4 -Homepage: https://sourceforge.net/projects/mikmod/ -Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm. -Build-Depends: openal-soft diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake index ef0b6d5e064da8..55556e2055315c 100644 --- a/ports/libmikmod/portfile.cmake +++ b/ports/libmikmod/portfile.cmake @@ -1,26 +1,9 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/mikmod/libmikmod/3.3.11.1/libmikmod-3.3.11.1.tar.gz" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO mikmod/libmikmod + REF 3.3.11.1 FILENAME "libmikmod-3.3.11.1.tar.gz" SHA512 f2439e2b691613847cd0787dd4e050116683ce7b05c215b8afecde5c6add819ea6c18e678e258c0a80786bef463f406072de15127f64368f694287a5e8e1a9de -) - -vcpkg_extract_source_archive_ex( - ARCHIVE ${ARCHIVE} - OUT_SOURCE_PATH SOURCE_PATH PATCHES fix-missing-dll.patch name_conflict.patch @@ -55,12 +38,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmikmod) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmikmod/COPYING.LESSER ${CURRENT_PACKAGES_DIR}/share/libmikmod/copyright) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() + +file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libmikmod/vcpkg.json b/ports/libmikmod/vcpkg.json new file mode 100644 index 00000000000000..f981fac5c16e1f --- /dev/null +++ b/ports/libmikmod/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libmikmod", + "version-string": "3.3.11.1", + "port-version": 9, + "description": "Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm.", + "homepage": "https://sourceforge.net/projects/mikmod/", + "dependencies": [ + "openal-soft" + ] +} diff --git a/ports/libmodbus/CMakeLists.txt b/ports/libmodbus/CMakeLists.txt index 0abb4b6a7c3723..618ba5f6cb8992 100644 --- a/ports/libmodbus/CMakeLists.txt +++ b/ports/libmodbus/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(libmodbus VERSION 3.1.4) +project(libmodbus VERSION 3.1.6) set(LIBMODBUS_VERSION ${PROJECT_VERSION}) set(LIBMODBUS_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) @@ -59,9 +59,10 @@ configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) if(BUILD_SHARED_LIBS) add_compile_options(-DDLLBUILD=ON) +else() + add_compile_options(-DLIBBUILD=ON) endif() - set(MODBUS_PUBLIC_HEADERS src/modbus-rtu.h src/modbus-tcp.h diff --git a/ports/libmodbus/CONTROL b/ports/libmodbus/CONTROL deleted file mode 100644 index 44cededd2f39b4..00000000000000 --- a/ports/libmodbus/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libmodbus -Version: 3.1.4-3 -Description: libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol diff --git a/ports/libmodbus/fix-static-linkage.patch b/ports/libmodbus/fix-static-linkage.patch new file mode 100644 index 00000000000000..7d7ae79f509e66 --- /dev/null +++ b/ports/libmodbus/fix-static-linkage.patch @@ -0,0 +1,13 @@ +diff --git a/src/modbus.h b/src/modbus.h +index fbe20bc..895d05d 100644 +--- a/src/modbus.h ++++ b/src/modbus.h +@@ -24,6 +24,8 @@ + # if defined(DLLBUILD) + /* define DLLBUILD when building the DLL */ + # define MODBUS_API __declspec(dllexport) ++# elif defined(LIBBUILD) ++# define MODBUS_API + # else + # define MODBUS_API __declspec(dllimport) + # endif diff --git a/ports/libmodbus/portfile.cmake b/ports/libmodbus/portfile.cmake index 3b5e27c2affb5b..a607f5a9ed6b8d 100644 --- a/ports/libmodbus/portfile.cmake +++ b/ports/libmodbus/portfile.cmake @@ -1,27 +1,32 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO stephane/libmodbus - REF v3.1.4 - SHA512 dc13b680a13ae2c952fe23cfe257a92a2be4823005b71b87e9520a3676df220b749d04c0825b1d1da02ac8b6995315e5cda2c8fd68e4672dd60e0b3fe739728b - HEAD_REF master + OUT_SOURCE_PATH SOURCE_PATH + REPO stephane/libmodbus + REF v3.1.6 + SHA512 9eaa395c75e1170e703e01f8c52c6e6e87efe4eaa22adfc3b51153fd5535d545aea35cf68e1aba29720a6c1dd13d9c60b6b08a5c8098dccd13ccfdc6944420a9 + HEAD_REF master + PATCHES fix-static-linkage.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( - SOURCE_PATH "${SOURCE_PATH}" - PREFER_NINJA - OPTIONS_DEBUG - -DDISABLE_INSTALL_HEADERS=ON + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/modbus.h "elif defined(LIBBUILD)" "elif 1") +endif() + # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodbus RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file diff --git a/ports/libmodbus/vcpkg.json b/ports/libmodbus/vcpkg.json new file mode 100644 index 00000000000000..cea78893150e31 --- /dev/null +++ b/ports/libmodbus/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libmodbus", + "version-string": "3.1.6", + "port-version": 1, + "description": "libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol", + "homepage": "https://github.com/stephane/libmodbus", + "supports": "!uwp" +} diff --git a/ports/libmodman/fix-install-path.patch b/ports/libmodman/fix-install-path.patch new file mode 100644 index 00000000000000..066813b40894ac --- /dev/null +++ b/ports/libmodman/fix-install-path.patch @@ -0,0 +1,39 @@ +diff --git a/libmodman/CMakeLists.txt b/libmodman/CMakeLists.txt +index 0aff593..9e419ce 100644 +--- a/libmodman/CMakeLists.txt ++++ b/libmodman/CMakeLists.txt +@@ -30,15 +30,15 @@ if(NOT WIN32 AND NOT APPLE) + configure_file(libmodman-2.0.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libmodman-2.0.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmodman-2.0.pc +- DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) ++ DESTINATION lib/pkgconfig) + endif() + + # CMake Find helper +-if (NOT WIN32 AND NOT APPLE) ++if (1) + configure_file(Findlibmodman.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/Findlibmodman.cmake @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Findlibmodman.cmake +- DESTINATION ${SHARE_INSTALL_DIR}/cmake/Modules) ++ DESTINATION share/${PROJECT_NAME}) + endif() + + # Define the library itself +@@ -50,8 +50,13 @@ if(NOT WIN32) + target_link_libraries(modman dl) + endif() + set_target_properties(modman PROPERTIES PREFIX "lib" VERSION 1.0.0 SOVERSION 1) +-install(TARGETS modman DESTINATION ${LIB_INSTALL_DIR}) +-install(FILES module_manager.hpp module.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}) ++install( ++ TARGETS modman ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++install(FILES module_manager.hpp module.hpp DESTINATION include/${PROJECT_NAME}) + + ### Tests + add_testdirectory(test) diff --git a/ports/libmodman/fix-undefined-typeid.patch b/ports/libmodman/fix-undefined-typeid.patch new file mode 100644 index 00000000000000..93db675875b336 --- /dev/null +++ b/ports/libmodman/fix-undefined-typeid.patch @@ -0,0 +1,12 @@ +diff --git a/libmodman/test/main.hpp b/libmodman/test/main.hpp +index 90ca87f..f4f8844 100644 +--- a/libmodman/test/main.hpp ++++ b/libmodman/test/main.hpp +@@ -20,6 +20,7 @@ + #ifndef MAIN_HPP_ + #define MAIN_HPP_ + ++#include + #include "../module_manager.hpp" + + using namespace std; diff --git a/ports/libmodman/portfile.cmake b/ports/libmodman/portfile.cmake new file mode 100644 index 00000000000000..35bedf90796dbc --- /dev/null +++ b/ports/libmodman/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +# Enable static build in UNIX +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + +set(LIBMODMAN_VER 2.0.1) + +vcpkg_download_distfile(ARCHIVE + URLS "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libmodman/libmodman-${LIBMODMAN_VER}.zip" + FILENAME "libmodman-${LIBMODMAN_VER}.zip" + SHA512 1fecc0fa3637c4aa86d114f5bc991605172d39183fa0f39d8c7858ef5d0d894152025bd426de4dd017a41372d800bf73f53b2328c57b77352a508e12792729fa +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tests BUILD_TESTING +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + fix-install-path.patch + fix-undefined-typeid.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/libmodman) +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CMAKE_CURRENT_LIST_DIR}/usage + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libmodman/usage b/ports/libmodman/usage new file mode 100644 index 00000000000000..220de42e063799 --- /dev/null +++ b/ports/libmodman/usage @@ -0,0 +1,5 @@ +The package libmodman provides CMake targets: + + find_package(libmodman CONFIG REQUIRED) + target_include_directories(main PRIVATE ${LIBMODMAN_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${LIBMODMAN_LIBRARIES}) diff --git a/ports/libmodman/vcpkg-cmake-wrapper.cmake b/ports/libmodman/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..f3722577475339 --- /dev/null +++ b/ports/libmodman/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(LIBMODMAN_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${LIBMODMAN_PREV_MODULE_PATH}) diff --git a/ports/libmodman/vcpkg.json b/ports/libmodman/vcpkg.json new file mode 100644 index 00000000000000..a69e70e3b2059e --- /dev/null +++ b/ports/libmodman/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "libmodman", + "version-string": "2.0.1", + "port-version": 3, + "description": "a simple library for managing modules", + "homepage": "https://code.google.com/p/libmodman", + "features": { + "tests": { + "description": "Build libmodman tests", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/libmodplug/003-use-static-cast-for-ctype.patch b/ports/libmodplug/003-use-static-cast-for-ctype.patch new file mode 100644 index 00000000000000..2054e8a44f734e --- /dev/null +++ b/ports/libmodplug/003-use-static-cast-for-ctype.patch @@ -0,0 +1,14 @@ +diff --git a/src/load_abc.cpp b/src/load_abc.cpp +index ee79f39..874ab8f 100644 +--- a/src/load_abc.cpp ++++ b/src/load_abc.cpp +@@ -268,7 +268,8 @@ static void setenv(const char *name, const char *value, int overwrite) + #endif + + static int abc_isvalidchar(char c) { +- return(isalpha(c) || isdigit(c) || isspace(c) || c == '%' || c == ':'); ++ unsigned char u = static_cast(c); ++ return(isalpha(u) || isdigit(u) || isspace(u) || c == '%' || c == ':'); + } + #if 0 + static const char *abc_skipspace(const char *p) diff --git a/ports/libmodplug/004-export-pkgconfig.patch b/ports/libmodplug/004-export-pkgconfig.patch new file mode 100644 index 00000000000000..eb59ca111b1246 --- /dev/null +++ b/ports/libmodplug/004-export-pkgconfig.patch @@ -0,0 +1,46 @@ +From 6a3e539ea26eec1bfc2a6e722e923bd5221f8d26 Mon Sep 17 00:00:00 2001 +From: "Matthias C. M. Troffaes" +Date: Thu, 8 Jul 2021 10:47:30 +0100 +Subject: [PATCH] Fix Libs.private in .pc file. + +--- + CMakeLists.txt | 7 +++++-- + libmodplug.pc.in | 2 +- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 468f1a3..3164fc6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -141,7 +141,11 @@ if(HAVE_SINF) + add_definitions(-DHAVE_SINF) + endif(HAVE_SINF) + +-if (NOT WIN32) ++if(WIN32) ++ set(LIBS_PRIVATE "-luser32") ++else(WIN32) ++ set(LIBS_PRIVATE "-lstdc++ -lm") ++endif(WIN32) + set(prefix "${CMAKE_INSTALL_PREFIX}") + set(exec_prefix "${CMAKE_INSTALL_PREFIX}") + set(libdir "${CMAKE_INSTALL_PREFIX}/lib") +@@ -152,4 +156,3 @@ if (NOT WIN32) + install(FILES "${PROJECT_BINARY_DIR}/libmodplug.pc" + DESTINATION lib/pkgconfig + ) +-endif (NOT WIN32) +diff --git a/libmodplug.pc.in b/libmodplug.pc.in +index bbf05f9..e4a43cc 100644 +--- a/libmodplug.pc.in ++++ b/libmodplug.pc.in +@@ -8,5 +8,5 @@ Description: The ModPlug mod file playing library. + Version: @VERSION@ + Requires: + Libs: -L${libdir} -lmodplug +-Libs.private: -lstdc++ -lm ++Libs.private: @LIBS_PRIVATE@ + Cflags: -I${includedir} +-- +2.21.0.windows.1 + diff --git a/ports/libmodplug/CONTROL b/ports/libmodplug/CONTROL deleted file mode 100644 index c486d4eb91eacd..00000000000000 --- a/ports/libmodplug/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libmodplug -Version: 0.8.9.0-4 -Homepage: https://github.com/Konstanty/libmodplug -Description: The ModPlug mod file playing library. diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake index 01b1081d6d8124..5df935579492b4 100644 --- a/ports/libmodplug/portfile.cmake +++ b/ports/libmodplug/portfile.cmake @@ -1,41 +1,40 @@ set(MODPLUG_HASH 5a39f5913d07ba3e61d8d5afdba00b70165da81d) -include(vcpkg_common_functions) - if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_from_github(ARCHIVE - OUT_SOURCE_PATH SOURCE_PATH - REPO Konstanty/libmodplug - REF ${MODPLUG_HASH} - SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1 - PATCHES - "001-automagically-define-modplug-static.patch" - "002-detect_sinf.patch" - ) -else() - vcpkg_from_github(ARCHIVE - OUT_SOURCE_PATH SOURCE_PATH - REPO Konstanty/libmodplug - REF ${MODPLUG_HASH} - SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1 - PATCHES - "002-detect_sinf.patch" - ) + set(STATIC_PATCH "001-automagically-define-modplug-static.patch") endif() +vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO Konstanty/libmodplug + REF ${MODPLUG_HASH} + SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1 + PATCHES + ${STATIC_PATCH} + 002-detect_sinf.patch + 003-use-static-cast-for-ctype.patch + 004-export-pkgconfig.patch # https://github.com/Konstanty/libmodplug/pull/59 +) + vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_IS_MINGW) + set(BIN_NAME libmodplug.dll) + else() + set(BIN_NAME modplug.dll) + endif() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/bin/modplug.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${BIN_NAME} ${CURRENT_PACKAGES_DIR}/bin/${BIN_NAME}) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/debug/bin/modplug.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${BIN_NAME} ${CURRENT_PACKAGES_DIR}/debug/bin/${BIN_NAME}) vcpkg_copy_pdbs() endif() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodplug) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmodplug/COPYING ${CURRENT_PACKAGES_DIR}/share/libmodplug/copyright) +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libmodplug/vcpkg.json b/ports/libmodplug/vcpkg.json new file mode 100644 index 00000000000000..854e034e1835ea --- /dev/null +++ b/ports/libmodplug/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libmodplug", + "version-string": "0.8.9.0", + "port-version": 8, + "description": "The ModPlug mod file playing library.", + "homepage": "https://github.com/Konstanty/libmodplug", + "supports": "!uwp" +} diff --git a/ports/libmorton/CONTROL b/ports/libmorton/CONTROL deleted file mode 100644 index 8e814fd43cc4e3..00000000000000 --- a/ports/libmorton/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libmorton -Version: 2018-19-07 -Description: header-only library for encoding/decoding Morton codes in/from 2D/3D coordinates diff --git a/ports/libmorton/portfile.cmake b/ports/libmorton/portfile.cmake index 396a3608be7d97..dee3b6e629e811 100644 --- a/ports/libmorton/portfile.cmake +++ b/ports/libmorton/portfile.cmake @@ -1,10 +1,9 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Forceflow/libmorton - REF 797ea736dca49553a56089f143ee6d1effdd318e - SHA512 ee9632f5c873462842d18014d4fd2d461e9fe767659e7426a7dec90fcc06cb974fb064229db5622c38ad0af9509004edea87e0f1d57ad09d8d1d236a5b9579a0 + REF v0.2 + SHA512 04cf8332a1cee52eebfb25a46ac64517900704f62fe53ccf1d6a74c535ccac5af4e3ce2e0a5ce94ee850fadb429fe0d88d5a66901f16e4308341a621e599d33d HEAD_REF master ) diff --git a/ports/libmorton/vcpkg.json b/ports/libmorton/vcpkg.json new file mode 100644 index 00000000000000..c3df1681a7192e --- /dev/null +++ b/ports/libmorton/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libmorton", + "version-string": "0.2", + "port-version": 1, + "description": "header-only library for encoding/decoding Morton codes in/from 2D/3D coordinates" +} diff --git a/ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch b/ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch new file mode 100644 index 00000000000000..1bbebffc0c5dbc --- /dev/null +++ b/ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch @@ -0,0 +1,146 @@ +From ed3b6e4bca1fe5211e3d7ca06bbbf9b161c8bc19 Mon Sep 17 00:00:00 2001 +From: Michal Janiszewski +Date: Sat, 2 Nov 2019 14:50:53 -0700 +Subject: [PATCH] Add naive MSVC support to sources + +--- + libmpeg2/convert/rgb.c | 2 +- + libmpeg2/cpu_accel.c | 4 ++-- + libmpeg2/cpu_state.c | 4 ++-- + libmpeg2/idct.c | 2 +- + libmpeg2/motion_comp.c | 2 +- + libvo/video_out_dx.c | 6 +++--- + vc++/config.h | 2 ++ + 7 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/libmpeg2/convert/rgb.c b/libmpeg2/convert/rgb.c +index 8863b0b..db6f4e3 100644 +--- a/libmpeg2/convert/rgb.c ++++ b/libmpeg2/convert/rgb.c +@@ -499,7 +499,7 @@ static int rgb_internal (mpeg2convert_rgb_order_t order, unsigned int bpp, + int convert420 = 0; + int rgb_stride_min = ((bpp + 7) >> 3) * seq->width; + +-#ifdef ARCH_X86 ++#if !defined(_MSC_VER) && defined(ARCH_X86) + if (!copy && (accel & MPEG2_ACCEL_X86_MMXEXT)) { + convert420 = 0; + copy = mpeg2convert_rgb_mmxext (order, bpp, seq); +diff --git a/libmpeg2/cpu_accel.c b/libmpeg2/cpu_accel.c +index 9b24610..a922df1 100644 +--- a/libmpeg2/cpu_accel.c ++++ b/libmpeg2/cpu_accel.c +@@ -29,7 +29,7 @@ + #include "attributes.h" + #include "mpeg2_internal.h" + +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + static inline uint32_t arch_accel (uint32_t accel) + { + if (accel & (MPEG2_ACCEL_X86_3DNOW | MPEG2_ACCEL_X86_MMXEXT)) +@@ -253,7 +253,7 @@ static inline uint32_t arch_accel (uint32_t accel) + + uint32_t mpeg2_detect_accel (uint32_t accel) + { +-#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC) ++#if !defined(_MSC_VER) && (defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC)) + accel = arch_accel (accel); + #endif + return accel; +diff --git a/libmpeg2/cpu_state.c b/libmpeg2/cpu_state.c +index 2f2f64a..f4966c1 100644 +--- a/libmpeg2/cpu_state.c ++++ b/libmpeg2/cpu_state.c +@@ -36,7 +36,7 @@ + void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL; + void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL; + +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + static void state_restore_mmx (cpu_state_t * state) + { + emms (); +@@ -115,7 +115,7 @@ static void state_restore_altivec (cpu_state_t * state) + + void mpeg2_cpu_state_init (uint32_t accel) + { +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + if (accel & MPEG2_ACCEL_X86_MMX) { + mpeg2_cpu_state_restore = state_restore_mmx; + } +diff --git a/libmpeg2/idct.c b/libmpeg2/idct.c +index 81c57e0..a057bf7 100644 +--- a/libmpeg2/idct.c ++++ b/libmpeg2/idct.c +@@ -235,7 +235,7 @@ static void mpeg2_idct_add_c (const int last, int16_t * block, + + void mpeg2_idct_init (uint32_t accel) + { +-#ifdef ARCH_X86 ++#if !defined(_MSC_VER) && defined(ARCH_X86) + if (accel & MPEG2_ACCEL_X86_SSE2) { + mpeg2_idct_copy = mpeg2_idct_copy_sse2; + mpeg2_idct_add = mpeg2_idct_add_sse2; +diff --git a/libmpeg2/motion_comp.c b/libmpeg2/motion_comp.c +index 7aed113..b00a32d 100644 +--- a/libmpeg2/motion_comp.c ++++ b/libmpeg2/motion_comp.c +@@ -33,7 +33,7 @@ mpeg2_mc_t mpeg2_mc; + + void mpeg2_mc_init (uint32_t accel) + { +-#ifdef ARCH_X86 ++#if !defined(_MSC_VER) && defined(ARCH_X86) + if (accel & MPEG2_ACCEL_X86_MMXEXT) + mpeg2_mc = mpeg2_mc_mmxext; + else if (accel & MPEG2_ACCEL_X86_3DNOW) +diff --git a/libvo/video_out_dx.c b/libvo/video_out_dx.c +index 36de68a..0797cdc 100644 +--- a/libvo/video_out_dx.c ++++ b/libvo/video_out_dx.c +@@ -82,7 +82,7 @@ static void update_overlay (dx_instance_t * instance) + dwFlags, &ddofx); + } + +-static long FAR PASCAL event_procedure (HWND hwnd, UINT message, ++static LRESULT FAR PASCAL event_procedure (HWND hwnd, UINT message, + WPARAM wParam, LPARAM lParam) + { + RECT rect_window; +@@ -92,7 +92,7 @@ static long FAR PASCAL event_procedure (HWND hwnd, UINT message, + switch (message) { + + case WM_WINDOWPOSCHANGED: +- instance = (dx_instance_t *) GetWindowLong (hwnd, GWL_USERDATA); ++ instance = (dx_instance_t *) GetWindowLongPtr (hwnd, GWLP_USERDATA); + + /* update the window position and size */ + point_window.x = 0; +@@ -173,7 +173,7 @@ static int create_window (dx_instance_t * instance) + /* store a directx_instance pointer into the window local storage + * (for later use in event_handler). + * We need to use SetWindowLongPtr when it is available in mingw */ +- SetWindowLong (instance->window, GWL_USERDATA, (LONG) instance); ++ SetWindowLongPtr (instance->window, GWLP_USERDATA, (LONG_PTR) instance); + + ShowWindow (instance->window, SW_SHOW); + +diff --git a/vc++/config.h b/vc++/config.h +index 93719f0..a03cce6 100644 +--- a/vc++/config.h ++++ b/vc++/config.h +@@ -16,7 +16,9 @@ + /* #undef ARCH_SPARC */ + + /* x86 architecture */ ++#if defined(_M_AMD64) || defined(_M_IX86) + #define ARCH_X86 ++#endif + + /* maximum supported data alignment */ + /* #undef ATTRIBUTE_ALIGNED_MAX */ +-- +2.25.0 + diff --git a/ports/libmpeg2/CMakeLists.txt b/ports/libmpeg2/CMakeLists.txt new file mode 100644 index 00000000000000..88c0c8712d112a --- /dev/null +++ b/ports/libmpeg2/CMakeLists.txt @@ -0,0 +1,108 @@ +cmake_minimum_required(VERSION 3.2) +project(libmpeg2) + +option(TOOLS "Build libmpeg2 tools" OFF) + +set(MPEG2_SOURCE_FILES + libmpeg2/alloc.c + libmpeg2/cpu_accel.c + libmpeg2/cpu_state.c + libmpeg2/decode.c + libmpeg2/header.c + libmpeg2/idct.c + libmpeg2/idct_alpha.c + libmpeg2/idct_altivec.c + #libmpeg2/idct_mmx.c + libmpeg2/motion_comp.c + libmpeg2/motion_comp_alpha.c + libmpeg2/motion_comp_altivec.c + libmpeg2/motion_comp_arm.c + #libmpeg2/motion_comp_mmx.c + libmpeg2/motion_comp_vis.c + libmpeg2/slice.c + ) +set(VO_SOURCE_FILES + libvo/video_out.c + libvo/video_out_dx.c + libvo/video_out_null.c + libvo/video_out_pgm.c + libvo/video_out_sdl.c + libvo/video_out_x11.c + ) +set(MPEG2_CONVERT_SOURCES + libmpeg2/convert/rgb.c + #libmpeg2/convert/rgb_mmx.c + libmpeg2/convert/rgb_vis.c + libmpeg2/convert/uyvy.c + ) +set(GETOPT_FILES + src/getopt.c + ) +set(HEADERS + include/mpeg2.h + include/mpeg2convert.h + ) + +add_library(mpeg2 ${MPEG2_SOURCE_FILES}) +add_library(mpeg2convert ${MPEG2_CONVERT_SOURCES}) +add_library(getopt STATIC ${GETOPT_FILES}) +add_library(vo STATIC ${VO_SOURCE_FILES}) + +target_include_directories(mpeg2convert PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + ) +target_include_directories(getopt PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + ) +target_include_directories(vo PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + ) +target_include_directories(mpeg2 PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + ) +target_include_directories(mpeg2 INTERFACE + "${CMAKE_SOURCE_DIR}/include" + ) + +target_compile_definitions(getopt PUBLIC HAVE_CONFIG_H) +target_link_libraries(vo mpeg2convert) + +if (TOOLS) + add_executable(mpeg2dec src/mpeg2dec.c src/dump_state.c src/gettimeofday.c) + add_executable(extract_mpeg2 src/extract_mpeg2.c) + add_executable(corrupt_mpeg2 src/corrupt_mpeg2.c) + + target_compile_definitions(extract_mpeg2 PUBLIC HAVE_CONFIG_H) + target_compile_definitions(corrupt_mpeg2 PUBLIC HAVE_CONFIG_H) + + target_link_libraries(mpeg2dec PRIVATE getopt vo mpeg2convert mpeg2 gdi32) + target_link_libraries(extract_mpeg2 PRIVATE getopt) + target_link_libraries(corrupt_mpeg2 PRIVATE getopt) + + target_include_directories(mpeg2dec PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + "${CMAKE_SOURCE_DIR}/src" + ) + target_include_directories(extract_mpeg2 PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + "${CMAKE_SOURCE_DIR}/src" + ) + target_include_directories(corrupt_mpeg2 PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + "${CMAKE_SOURCE_DIR}/src" + ) +endif (TOOLS) + +install(TARGETS mpeg2 + EXPORT libmpeg2 + LIBRARY DESTINATION lib +) + +install(FILES ${HEADERS} DESTINATION "include/mpeg2dec") diff --git a/ports/libmpeg2/portfile.cmake b/ports/libmpeg2/portfile.cmake new file mode 100644 index 00000000000000..3813e0d6e46bca --- /dev/null +++ b/ports/libmpeg2/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Windows Desktop platform." ON_TARGET "Linux" "OSX" "uwp") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# There is archived version of releases available at https://github.com/janisozaur/libmpeg2 +vcpkg_download_distfile(ARCHIVE + URLS "http://libmpeg2.sourceforge.net/files/libmpeg2-0.5.1.tar.gz" + FILENAME "libmpeg2-0.5.1.tar.gz" + SHA512 3648a2b3d7e2056d5adb328acd2fb983a1fa9a05ccb6f9388cc686c819445421811f42e8439418a0491a13080977f074a0d8bf8fa6bc101ff245ddea65a46fbc +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0001-Add-naive-MSVC-support-to-sources.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmpeg2 RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() diff --git a/ports/libmpeg2/vcpkg.json b/ports/libmpeg2/vcpkg.json new file mode 100644 index 00000000000000..4936a91dbc792f --- /dev/null +++ b/ports/libmpeg2/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libmpeg2", + "version-string": "0.5.1", + "port-version": 1, + "description": "a free MPEG-2 video stream decoder", + "homepage": "http://libmpeg2.sourceforge.net/", + "supports": "!(linux | osx | uwp)", + "features": { + "tools": { + "description": "Build tools provided with libmpeg2" + } + } +} diff --git a/ports/libmspack/CMakeLists.txt b/ports/libmspack/CMakeLists.txt index 4591d3e045eba0..fdff7959d317ff 100644 --- a/ports/libmspack/CMakeLists.txt +++ b/ports/libmspack/CMakeLists.txt @@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.8) project(libmspack C) -set(CMAKE_DEBUG_POSTFIX "d") - add_definitions(-DHAVE_CONFIG_H) if(MSVC) diff --git a/ports/libmspack/CONTROL b/ports/libmspack/CONTROL deleted file mode 100644 index c81f19005f7445..00000000000000 --- a/ports/libmspack/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libmspack -Version: 0.10.1-1 -Build-Depends: -Homepage: https://www.cabextract.org.uk/libmspack -Description: libmspack is a portable library for some loosely related Microsoft compression formats. diff --git a/ports/libmspack/config.h b/ports/libmspack/config.h index ebe95831ce324c..54c05ae1e8c8cc 100644 --- a/ports/libmspack/config.h +++ b/ports/libmspack/config.h @@ -1,8 +1,4 @@ #define HAVE_LIMITS_H 1 #define HAVE_INTTYPES_H 1 -#define HAVE_STRING_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MEMCMP 1 #define HAVE_TOWLOWER 1 -#define HAVE_TOLOWER 1 diff --git a/ports/libmspack/libmspack.def b/ports/libmspack/libmspack.def index 6a1a43d7500f5a..129637fd295e23 100644 --- a/ports/libmspack/libmspack.def +++ b/ports/libmspack/libmspack.def @@ -30,3 +30,6 @@ mspack_destroy_kwaj_compressor mspack_destroy_kwaj_decompressor mspack_destroy_oab_compressor mspack_destroy_oab_decompressor + +mspack_sys_selftest_internal +mspack_version diff --git a/ports/libmspack/portfile.cmake b/ports/libmspack/portfile.cmake index b476ad9a62ebcf..f4f19e7c3736e8 100644 --- a/ports/libmspack/portfile.cmake +++ b/ports/libmspack/portfile.cmake @@ -1,16 +1,17 @@ -include(vcpkg_common_functions) - set(LIB_NAME libmspack) set(LIB_VERSION 0.10.1alpha) set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://www.cabextract.org.uk/libmspack/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" SHA512 a7b5f7caa49190c5021f3e768b92f2e51cc0ce685c9ab6ed6fb36de885c73231b58d47a8a3b5c5aa5c9ac56c25c500eb683d84dbf11f09f97f6cb4fff5adc245 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) diff --git a/ports/libmspack/vcpkg.json b/ports/libmspack/vcpkg.json new file mode 100644 index 00000000000000..41ed734e0fdc7e --- /dev/null +++ b/ports/libmspack/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libmspack", + "version-string": "0.10.1", + "port-version": 4, + "description": "libmspack is a portable library for some loosely related Microsoft compression formats.", + "homepage": "https://www.cabextract.org.uk/libmspack" +} diff --git a/ports/libmt32emu/portfile.cmake b/ports/libmt32emu/portfile.cmake new file mode 100644 index 00000000000000..cb9ed893973440 --- /dev/null +++ b/ports/libmt32emu/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO munt/munt + REF libmt32emu_2_5_3 + SHA512 c801e22e861898281316109533ca6264f5a9cf778d4f0bb14b49bb6d04d53b7e60cd8320d5b29a63534f6c470b4feb67c881e86c49b7860a98639ce01b99debf + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/mt32emu" + OPTIONS + -Dlibmt32emu_SHARED:BOOL=${BUILD_SHARED} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc") + + +file(INSTALL "${SOURCE_PATH}/mt32emu/COPYING.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libmt32emu/vcpkg.json b/ports/libmt32emu/vcpkg.json new file mode 100644 index 00000000000000..aace79c4e27099 --- /dev/null +++ b/ports/libmt32emu/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "libmt32emu", + "version": "2.5.3", + "description": "A MT-32 emulator", + "homepage": "https://github.com/munt/munt/tree/master/mt32emu", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libmupdf/CMakeLists.txt b/ports/libmupdf/CMakeLists.txt index daafef74c50a79..6800bea9aeb39b 100644 --- a/ports/libmupdf/CMakeLists.txt +++ b/ports/libmupdf/CMakeLists.txt @@ -3,26 +3,39 @@ project(libmupdf C) set(CMAKE_DEBUG_POSTFIX d) -if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include/mupdf/pdf/name-table.h") +if(WIN32) execute_process( COMMAND "cmd.exe" "/c" "platform\\win32\\generate.bat" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" ) -endif() +else() + find_program(MAKE_EXE NAMES make REQUIRED) + execute_process( + COMMAND ${MAKE_EXE} "generate" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + ) +endif() + find_package(freetype NO_MODULE REQUIRED) find_package(JPEG REQUIRED) find_path(HARFBUZZ_INCLUDE hb.h PATH_SUFFIXES harfbuzz) find_library(HARFBUZZ_LIBRARIES harfbuzz) find_package(ZLIB REQUIRED) -find_package(openjpeg REQUIRED) +find_package(OpenJPEG CONFIG REQUIRED) find_library(JBIG2DEC_LIB NAMES jbig2decd jbig2dec) file(GLOB_RECURSE SOURCES "source/*.c" "generated/*.c") list(FILTER SOURCES EXCLUDE REGEX "source/tools/[a-z]*\\.c$") +list(FILTER SOURCES EXCLUDE REGEX "source/tests/.*.c$") + add_library(libmupdf ${SOURCES}) -target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0) +if(WIN32) + target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0) +else() + target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0 -DHAVE_PTHREAD=1) +endif() target_include_directories(libmupdf PUBLIC include diff --git a/ports/libmupdf/CONTROL b/ports/libmupdf/CONTROL deleted file mode 100644 index 28b287a0096ae5..00000000000000 --- a/ports/libmupdf/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libmupdf -Version: 1.15.0-1 -Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl, glfw3, openjpeg, jbig2dec -Homepage: https://github.com/ArtifexSoftware/mupdf -Description: a lightweight PDF, XPS, and E-book library diff --git a/ports/libmupdf/Fix-error-C2169.patch b/ports/libmupdf/Fix-error-C2169.patch deleted file mode 100644 index 4647d6b9538efd..00000000000000 --- a/ports/libmupdf/Fix-error-C2169.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h -index 0552771..42fd037 100644 ---- a/include/mupdf/fitz/system.h -+++ b/include/mupdf/fitz/system.h -@@ -131,7 +131,6 @@ #define isnan(x) _isnan(x) - #define isinf(x) (!_finite(x)) - #endif - --#define hypotf _hypotf - #define atoll _atoi64 - - #endif diff --git a/ports/libmupdf/portfile.cmake b/ports/libmupdf/portfile.cmake index 937daa4c48d5ad..7eb51680f3994e 100644 --- a/ports/libmupdf/portfile.cmake +++ b/ports/libmupdf/portfile.cmake @@ -1,32 +1,28 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "osx") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArtifexSoftware/mupdf - REF 1.15.0 - SHA512 9f47a79a2040ff3da885f54d143a7c44712f8a08650fca1d2be21199a7103364a35e28a1832708c2b7752b11c95bf0755ae6c922afc35ee8ae639da7a6ac03b0 + REF af0e25cec567868a04eaacf6410c395712fe4b90 #1.18.1-so-3.11.14 + SHA512 3dc6b75964d93af84921ee30a5b14e0ab84d16afa31f97a0fbf62e2006ace62f9c0366d1c3872cd678dab71eb23a422daeca0eb0b5db58e434f27657bbf9b5bc HEAD_REF master - PATCHES - Fix-error-C2169.patch - remove_opj_defines.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" DISABLE_PARALLEL_CONFIGURE - PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() -file(COPY ${SOURCE_PATH}/include/mupdf DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY "${SOURCE_PATH}/include/mupdf" DESTINATION "${CURRENT_PACKAGES_DIR}/include") vcpkg_copy_pdbs() -#copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libmupdf/remove_opj_defines.patch b/ports/libmupdf/remove_opj_defines.patch deleted file mode 100644 index ec591d3670adf2..00000000000000 --- a/ports/libmupdf/remove_opj_defines.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c -index 65699ba..ea84778 100644 ---- a/source/fitz/load-jpx.c -+++ b/source/fitz/load-jpx.c -@@ -445,11 +445,6 @@ fz_load_jpx_info(fz_context *ctx, const unsigned char *data, size_t size, int *w - - #else /* HAVE_LURATECH */ - --#define OPJ_STATIC --#define OPJ_HAVE_INTTYPES_H --#if !defined(_MSC_VER) || _MSC_VER >= 1600 --#define OPJ_HAVE_STDINT_H --#endif - #define USE_JPIP - - #include diff --git a/ports/libmupdf/vcpkg.json b/ports/libmupdf/vcpkg.json new file mode 100644 index 00000000000000..f0342c005e66d5 --- /dev/null +++ b/ports/libmupdf/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "libmupdf", + "version-string": "1.18.1-so-3.11.14", + "description": "a lightweight PDF, XPS, and E-book library", + "homepage": "https://github.com/ArtifexSoftware/mupdf", + "supports": "!osx", + "dependencies": [ + "curl", + "freetype", + "glfw3", + "gumbo", + "harfbuzz", + "jbig2dec", + "libjpeg-turbo", + "openjpeg", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL deleted file mode 100644 index 37c42943eb52f3..00000000000000 --- a/ports/libmysql/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libmysql -Version: 8.0.4-4 -Homepage: https://github.com/mysql/mysql-server -Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, liblzma, lz4, zlib -Description: A MySQL client library for C development. diff --git a/ports/libmysql/export-cmake-targets.patch b/ports/libmysql/export-cmake-targets.patch new file mode 100644 index 00000000000000..e52dbb24da71fd --- /dev/null +++ b/ports/libmysql/export-cmake-targets.patch @@ -0,0 +1,123 @@ +diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake +index c3a05ec..0d44ef2 100644 +--- a/cmake/install_macros.cmake ++++ b/cmake/install_macros.cmake +@@ -100,7 +100,7 @@ ENDFUNCTION() + + FUNCTION(MYSQL_INSTALL_TARGETS) + MYSQL_PARSE_ARGUMENTS(ARG +- "DESTINATION;COMPONENT" ++ "DESTINATION;COMPONENT;EXPORT" + "" + ${ARGN} + ) +@@ -115,7 +115,20 @@ FUNCTION(MYSQL_INSTALL_TARGETS) + IF(ARG_COMPONENT) + SET(COMP COMPONENT ${ARG_COMPONENT}) + ENDIF() +- INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP}) ++ IF (ARG_EXPORT) ++ FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${ARG_EXPORT}-config.cmake" ++"include(CMakeFindDependencyMacro) ++find_dependency(ZLIB) ++find_dependency(OpenSSL) ++include(\"\${CMAKE_CURRENT_LIST_DIR}/${ARG_EXPORT}-targets.cmake\") ++") ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ARG_EXPORT}-config.cmake DESTINATION share/${ARG_EXPORT}) ++ set(EXPORT_ARGS EXPORT ${ARG_EXPORT}-targets) ++ ENDIF() ++ INSTALL(TARGETS ${TARGETS} ${EXPORT_ARGS} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ${COMP}) ++ IF (ARG_EXPORT) ++ INSTALL(${EXPORT_ARGS} DESTINATION share/${ARG_EXPORT}) ++ ENDIF() + SET(INSTALL_LOCATION ${ARG_DESTINATION} ) + INSTALL_DEBUG_SYMBOLS("${TARGETS}") + SET(INSTALL_LOCATION) +diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake +index 5481fae..3fa58da 100644 +--- a/cmake/libutils.cmake ++++ b/cmake/libutils.cmake +@@ -237,7 +237,7 @@ MACRO(MERGE_LIBRARIES_SHARED) + IF(ARG_COMPONENT) + SET(COMP COMPONENT ${ARG_COMPONENT}) + ENDIF() +- MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP}) ++ MYSQL_INSTALL_TARGETS(${TARGET} EXPORT unofficial-libmysql DESTINATION "${INSTALL_LIBDIR}" ${COMP}) + ENDIF() + ENDMACRO() + +@@ -372,7 +372,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES) + SET(COMP COMPONENT ${ARG_COMPONENT}) + ENDIF() + IF(INSTALL_STATIC_LIBRARIES) +- MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP}) ++ MYSQL_INSTALL_TARGETS(${TARGET} EXPORT unofficial-libmysql DESTINATION "${INSTALL_LIBDIR}" ${COMP}) + ENDIF() + ENDIF() + ENDMACRO() +diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt +index 605288d..c5d0f5d 100644 +--- a/libmysql/CMakeLists.txt ++++ b/libmysql/CMakeLists.txt +@@ -245,8 +245,16 @@ ENDIF() + # LDAP authentication SASL client plugin + ADD_SUBDIRECTORY(authentication_ldap) + ++IF (BUILD_SHARED_LIBS) ++ set(INSTALL_SHARED ) ++ set(INSTALL_STATIC SKIP_INSTALL) ++ELSE() ++ set(INSTALL_SHARED SKIP_INSTALL) ++ set(INSTALL_STATIC ) ++ENDIF() ++ + # Merge several convenience libraries into one big mysqlclient +-MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} COMPONENT Development) ++MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} ${INSTALL_STATIC} COMPONENT Development) + TARGET_LINK_LIBRARIES(mysqlclient PRIVATE ${LIBS_TO_LINK}) + + # Visual Studio users need debug static library for debug projects +@@ -283,6 +291,7 @@ ENDIF() + # Merge several convenience libraries into one big mysqlclient + # and link them together into shared library. + MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE} ++ ${INSTALL_SHARED} + EXPORTS + ${CLIENT_API_FUNCTIONS} + ${CLIENT_API_FUNCTIONS_UNDOCUMENTED} +@@ -370,6 +379,7 @@ CONFIGURE_FILE(api_test.c.in ${CMAKE_CURRENT_BINARY_DIR}/api_test.c) + # from @CLIENT_API_FUNCTIONS@ are declared by . It will fail + # to run if not all of these symbols are exported by the library. + # ++IF (ENABLE_TESTING) + MYSQL_ADD_EXECUTABLE(libmysql_api_test + ${CMAKE_CURRENT_BINARY_DIR}/api_test.c + LINK_LIBRARIES libmysql ${LIBRT} +@@ -398,3 +408,4 @@ ADD_CUSTOM_COMMAND(TARGET libmysql_api_test POST_BUILD + COMMAND libmysql_api_test + > ${CMAKE_CURRENT_BINARY_DIR}/libmysql_api_test.out + ) ++ENDIF() +\ No newline at end of file +diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt +index a5fa18e..0f2e15c 100644 +--- a/scripts/CMakeLists.txt ++++ b/scripts/CMakeLists.txt +@@ -329,13 +329,13 @@ MACRO(EXTRACT_LINK_LIBRARIES target var) + STRING(REGEX REPLACE "^[ ]+" "" ${var} "${${var}}") + STRING(REGEX REPLACE "[ ]+$" "" ${var} "${${var}}") + ENDMACRO() +- ++IF (NOT BUILD_SHARED_LIBS) + EXTRACT_LINK_LIBRARIES(mysqlclient CLIENT_LIBS) +- +-IF(MSVC) ++ENDIF() ++IF(MSVC AND NOT BUILD_SHARED_LIBS) + GET_TARGET_PROPERTY(LIBMYSQL_OS_SHLIB_VERSION mysqlclient VERSION) + GET_TARGET_PROPERTY(LIBMYSQL_OS_OUTPUT_NAME mysqlclient OUTPUT_NAME) +-ELSE() ++ELSEIF(BUILD_SHARED_LIBS) + GET_TARGET_PROPERTY(LIBMYSQL_OS_SHLIB_VERSION libmysql VERSION) + GET_TARGET_PROPERTY(LIBMYSQL_OS_OUTPUT_NAME libmysql OUTPUT_NAME) + ENDIF() diff --git a/ports/libmysql/ignore-boost-version.patch b/ports/libmysql/ignore-boost-version.patch index ea7111dedd811e..99cee245012ab5 100644 --- a/ports/libmysql/ignore-boost-version.patch +++ b/ports/libmysql/ignore-boost-version.patch @@ -1,13 +1,13 @@ diff --git a/cmake/boost.cmake b/cmake/boost.cmake -index 2851181..8788322 100644 +index 592a67f..202a770 100644 --- a/cmake/boost.cmake +++ b/cmake/boost.cmake -@@ -280,7 +280,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10) +@@ -297,7 +297,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10) COULD_NOT_FIND_BOOST() ENDIF() --IF(NOT BOOST_MINOR_VERSION EQUAL 65) -+IF(NOT BOOST_MINOR_VERSION EQUAL 65 AND NOT IGNORE_BOOST_VERSION) +-IF(NOT BOOST_MINOR_VERSION EQUAL 70) ++IF(NOT BOOST_MINOR_VERSION EQUAL 70 AND NOT IGNORE_BOOST_VERSION) MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} " - "we need 65" + "we need 70" ) diff --git a/ports/libmysql/linux_libmysql.patch b/ports/libmysql/linux_libmysql.patch deleted file mode 100644 index 42dfa73d8d5782..00000000000000 --- a/ports/libmysql/linux_libmysql.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/configure.cmake b/configure.cmake -index 1f3d8e2..9e45f48 100644 ---- a/configure.cmake -+++ b/configure.cmake -@@ -456,7 +456,11 @@ IF(NOT HAVE_FCNTL_NONBLOCK) - ENDIF() - - IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC) -- STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} processor) -+ IF(${CMAKE_SYSTEM_PROCESSOR}) -+ STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} processor) -+ ELSE() -+ STRING(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} processor) -+ ENDIF() - IF(processor MATCHES "86" OR processor MATCHES "amd64" OR processor MATCHES "x64") - IF(NOT CMAKE_SYSTEM_NAME MATCHES "SunOS") - # The loader in some Solaris versions has a bug due to which it refuses to - diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index e179ca714a59a0..aaffaffe5f3696 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -1,40 +1,41 @@ -if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") - message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") -endif() - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "libmysql cannot currently be cross-compiled for UWP") -endif() +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "x86") -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT CMAKE_SYSTEM_NAME OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "Oracle has dropped support in libmysql for 32-bit Windows.") +if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") + message(FATAL_ERROR "FATAL ERROR: ${PORT} and libmariadb are incompatible.") endif() -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - message(WARNING "libmysql needs ncurses on LINUX, please install ncurses first.\nOn Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.") +if (VCPKG_TARGET_IS_LINUX) + message(WARNING "${PORT} needs ncurses on LINUX, please install ncurses first.\nOn Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.") endif() -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mysql/mysql-server - REF mysql-8.0.4 - SHA512 8d9129e7670e88df14238299052a5fe6d4f3e40bf27ef7a3ca8f4f91fb40507b13463e9bd24435b34e5d06c5d056dfb259fb04e77cc251b188eea734db5642be + REF 7d10c82196c8e45554f27c00681474a9fb86d137 # 8.0.20 + SHA512 9f5e8cc254ea2a4cf76313287c7bb6fc693400810464dd2901e67d51ecb27f8916009464fd8aed8365c3038314b845b3d517db6e82ae5c7908612f0b3b72335f HEAD_REF master PATCHES ignore-boost-version.patch system-libs.patch - linux_libmysql.patch + rename-version.patch + export-cmake-targets.patch ) -file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_65_0) +file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_70_0) set(STACK_DIRECTION) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(STACK_DIRECTION -DSTACK_DIRECTION=-1) endif() +#Skip the version check for Visual Studio +if(VCPKG_TARGET_IS_WINDOWS) + set(FORCE_UNSUPPORTED_COMPILER 1) +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT_LINKAGE) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -42,24 +43,72 @@ vcpkg_configure_cmake( -DWITHOUT_SERVER=ON -DWITH_UNIT_TESTS=OFF -DENABLED_PROFILING=OFF + -DENABLE_TESTING=OFF -DWIX_DIR=OFF - -DHAVE_LLVM_LIBCPP_EXITCODE=1 ${STACK_DIRECTION} - -DWINDOWS_RUNTIME_MD=ON # Note: this disables _replacement_ of /MD with /MT. If /MT is specified, it will be preserved. -DIGNORE_BOOST_VERSION=ON + -DWITH_SYSTEMD=OFF + -DWITH_TEST_TRACE_PLUGIN=OFF + -DMYSQL_MAINTAINER_MODE=OFF + -DBUNDLE_RUNTIME_LIBRARIES=OFF + -DDOWNLOAD_BOOST=OFF + -DENABLE_DOWNLOADS=OFF + -DWITH_NDB_TEST=OFF + -DWITH_NDB_NODEJS_DEFAULT=OFF + -DWITH_NDBAPI_EXAMPLES=OFF + -DMYSQLX_ADDITIONAL_TESTS_ENABLE=OFF -DWITH_SSL=system -DWITH_ICU=system -DWITH_LIBEVENT=system - -DWITH_LZMA=system -DWITH_LZ4=system -DWITH_ZLIB=system + -DFORCE_UNSUPPORTED_COMPILER=${FORCE_UNSUPPORTED_COMPILER} + -DINSTALL_STATIC_LIBRARIES=${BUILD_STATIC_LIBS} + -DLINK_STATIC_RUNTIME_LIBRARIES=${STATIC_CRT_LINKAGE} ) vcpkg_install_cmake(ADD_BIN_TO_PATH) -# delete debug headers -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include) +list(APPEND MYSQL_TOOLS + comp_err + my_print_defaults + mysql + mysql_config_editor + mysql_secure_installation + mysql_ssl_rsa_setup + mysqladmin + mysqlbinlog + mysqlcheck + mysqldump + mysqlimport + mysqlpump + mysqlshow + mysqlslap + mysqltest + perror + zlib_decompress +) + +if (VCPKG_TARGET_IS_WINDOWS) + list(APPEND MYSQL_TOOLS + echo + ) +else() + list(APPEND MYSQL_TOOLS + mysql_config + ) +endif() + +vcpkg_copy_tools(TOOL_NAMES ${MYSQL_TOOLS} AUTO_CLEAN) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share ${CURRENT_PACKAGES_DIR}/libmysql) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/libmysql) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/share) +file(RENAME ${CURRENT_PACKAGES_DIR}/libmysql ${CURRENT_PACKAGES_DIR}/share/libmysql) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/libmysql ${CURRENT_PACKAGES_DIR}/debug/share/libmysql) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/libmysql/unofficial-libmysql TARGET_PATH share/unofficial-libmysql) # switch mysql into /mysql file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/include2) @@ -68,57 +117,29 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/include2 ${CURRENT_PACKAGES_DIR}/include/mys ## delete useless vcruntime/scripts/bin/msg file file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/share + ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/docs ${CURRENT_PACKAGES_DIR}/debug/docs - ${CURRENT_PACKAGES_DIR}/lib/debug) + ${CURRENT_PACKAGES_DIR}/lib/debug + ${CURRENT_PACKAGES_DIR}/lib/plugin + ${CURRENT_PACKAGES_DIR}/lib/plugin/debug +) -# remove misc files +## remove misc files file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE ${CURRENT_PACKAGES_DIR}/README ${CURRENT_PACKAGES_DIR}/debug/LICENSE - ${CURRENT_PACKAGES_DIR}/debug/README) - -# remove not-related libs -file (REMOVE - ${CURRENT_PACKAGES_DIR}/lib/mysqlservices.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlservices.lib) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE - ${CURRENT_PACKAGES_DIR}/lib/libmysql.lib - ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll - ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb - ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll - ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb) -else() - file(REMOVE - ${CURRENT_PACKAGES_DIR}/lib/mysqlclient.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlclient.lib) - - # correct the dll directory - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll) - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb) - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) - endif() -endif() + ${CURRENT_PACKAGES_DIR}/debug/README +) file(READ ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h _contents) string(REPLACE "#include " "#include \"mysql/udf_registration_types.h\"" _contents "${_contents}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h "${_contents}") +file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + # copy license -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libmysql/rename-version.patch b/ports/libmysql/rename-version.patch new file mode 100644 index 00000000000000..15598382570e36 --- /dev/null +++ b/ports/libmysql/rename-version.patch @@ -0,0 +1,26 @@ +diff --git a/VERSION b/VERSION.txt +similarity index 100% +rename from VERSION +rename to VERSION.txt +diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake +index bed6e9f02e2..a924ef09bac 100644 +--- a/cmake/mysql_version.cmake ++++ b/cmake/mysql_version.cmake +@@ -30,7 +30,7 @@ SET(PROTOCOL_VERSION "10") + + # Generate "something" to trigger cmake rerun when VERSION changes + CONFIGURE_FILE( +- ${CMAKE_SOURCE_DIR}/VERSION ++ ${CMAKE_SOURCE_DIR}/VERSION.txt + ${CMAKE_BINARY_DIR}/VERSION.dep + ) + +@@ -38,7 +38,7 @@ CONFIGURE_FILE( + + MACRO(MYSQL_GET_CONFIG_VALUE keyword var) + IF(NOT ${var}) +- FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=") ++ FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION.txt str REGEX "^[ ]*${keyword}=") + IF(str) + STRING(REPLACE "${keyword}=" "" str ${str}) + STRING(REGEX REPLACE "[ ].*" "" str "${str}") diff --git a/ports/libmysql/system-libs.patch b/ports/libmysql/system-libs.patch index b5c1cba0d9d8b5..547573fc58e7ad 100644 --- a/ports/libmysql/system-libs.patch +++ b/ports/libmysql/system-libs.patch @@ -1,8 +1,8 @@ diff --git a/cmake/icu.cmake b/cmake/icu.cmake -index ce9cc67..64445c5 100644 +index fde3a75..9f694b9 100644 --- a/cmake/icu.cmake +++ b/cmake/icu.cmake -@@ -40,49 +40,10 @@ SET(DEFAULT_ICU "bundled") +@@ -38,49 +38,11 @@ # install_root is either 'system' or is assumed to be a path. # MACRO (FIND_ICU install_root) @@ -48,16 +48,34 @@ index ce9cc67..64445c5 100644 - - # Needed for version information. - SET(ICU_COMMON_DIR ${ICU_INCLUDE_DIR}) -- -+ find_package(ICU REQUIRED COMPONENTS uc io dt in) -+ set(ICU_SYSTEM_LIBRARIES ICU::uc ICU::io ICU::dt ICU::in) -+ set(ICU_COMMON_DIR ${ICU_INCLUDE_DIR}) -+ SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) + ++ find_package(ICU REQUIRED COMPONENTS uc io dt in) ++ set(ICU_SYSTEM_LIBRARIES ICU::uc ICU::io ICU::dt ICU::in) ++ set(ICU_COMMON_DIR ${ICU_INCLUDE_DIR}) ++ SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) ENDMACRO() MACRO (MYSQL_USE_BUNDLED_ICU) +diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake +index 3fa58da..88b53e7 100644 +--- a/cmake/libutils.cmake ++++ b/cmake/libutils.cmake +@@ -350,12 +350,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES) + # On Windows, ssleay32.lib/libeay32.lib or libssl.lib/libcrypto.lib + # must be merged into mysqlclient.lib + IF(WIN32 AND ${TARGET} STREQUAL "mysqlclient") +- SET(LINKER_EXTRA_FLAGS "") +- FOREACH(LIB ${SSL_LIBRARIES}) +- STRING_APPEND(LINKER_EXTRA_FLAGS " ${LIB}") +- ENDFOREACH() +- SET_TARGET_PROPERTIES(${TARGET} +- PROPERTIES STATIC_LIBRARY_FLAGS "${LINKER_EXTRA_FLAGS}") ++ TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ${SSL_LIBRARIES}) + ENDIF() + + IF(OSLIBS) diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake -index 6e576c3..60cb8ba 100644 +index 9aad130..68cbaba 100644 --- a/cmake/lz4.cmake +++ b/cmake/lz4.cmake @@ -25,7 +25,7 @@ @@ -69,68 +87,49 @@ index 6e576c3..60cb8ba 100644 IF (PATH_TO_LZ4 AND LZ4_SYSTEM_LIBRARY) SET(SYSTEM_LZ4_FOUND 1) INCLUDE_DIRECTORIES(SYSTEM ${PATH_TO_LZ4}) -diff --git a/cmake/lzma.cmake b/cmake/lzma.cmake -index ac8aaa7..78d8e8d 100644 ---- a/cmake/lzma.cmake -+++ b/cmake/lzma.cmake -@@ -24,15 +24,10 @@ - # bundled is the default - - MACRO (FIND_SYSTEM_LZMA) -- FIND_PATH(PATH_TO_LZMA NAMES lzma/lzma.h) -- FIND_LIBRARY(LZMA_SYSTEM_LIBRARY NAMES lzma) -- IF (PATH_TO_LZMA AND LZMA_SYSTEM_LIBRARY) -- SET(SYSTEM_LZMA_FOUND 1) -- SET(LZMA_INCLUDE_DIR ${PATH_TO_LZMA}) -- SET(LZMA_LIBRARY ${LZMA_SYSTEM_LIBRARY}) -- MESSAGE(STATUS "LZMA_INCLUDE_DIR ${LZMA_INCLUDE_DIR}") -- MESSAGE(STATUS "LZMA_LIBRARY ${LZMA_LIBRARY}") -- ENDIF() -+ find_package(LibLZMA REQUIRED) -+ set(LZMA_INCLUDE_DIR ${LZMA_INCLUDE_DIRS}) -+ set(LZMA_LIBRARY ${LZMA_LIBRARIES}) -+ set(SYSTEM_LZMA_FOUND 1) - ENDMACRO() - - MACRO (MYSQL_USE_BUNDLED_LZMA) diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake -index 8af9699..2bdfe14 100644 +index 52feade..1e71bd7 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake -@@ -104,6 +104,16 @@ ENDMACRO() +@@ -93,7 +93,20 @@ ENDMACRO() # Provides the following configure options: - # WITH_SSL=[yes|bundled|system|] + # WITH_SSL=[yes|system|] MACRO (MYSQL_CHECK_SSL) + find_package(OpenSSL REQUIRED) -+ set(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY} CACHE STRING "") -+ set(CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE STRING "") ++ set(OPENSSL_LIBRARY OpenSSL::SSL CACHE STRING "") ++ set(CRYPTO_LIBRARY OpenSSL::Crypto CACHE STRING "") + FIND_PROGRAM(OPENSSL_EXECUTABLE openssl + DOC "path to the openssl executable") + SET(SSL_DEFINES "-DHAVE_OPENSSL") -+ set(SSL_LIBRARIES ${OPENSSL_LIBRARIES}) ++ set(SSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto) ++ if(NOT WIN32) ++ find_package(Threads REQUIRED) ++ list(APPEND SSL_LIBRARIES Threads::Threads) ++ endif() +ENDMACRO() -+ + +MACRO (MYSQL_CHECK_SSL_OLD) IF(NOT WITH_SSL) - IF(WIN32) - CHANGE_SSL_SETTINGS("bundled") + SET(WITH_SSL "system" CACHE STRING ${WITH_SSL_DOC_STRING} FORCE) + ENDIF() diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake -index e74b8c9..6695075 100644 +index 26c56fe..65bebb4 100644 --- a/cmake/zlib.cmake +++ b/cmake/zlib.cmake -@@ -51,27 +51,7 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS) +@@ -51,28 +51,7 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS) IF(WITH_ZLIB STREQUAL "bundled") MYSQL_USE_BUNDLED_ZLIB() ELSE() - SET(ZLIB_FIND_QUIETLY TRUE) - INCLUDE(FindZLIB) - IF(ZLIB_FOUND) -- INCLUDE(CheckFunctionExists) -- SET(CMAKE_REQUIRED_LIBRARIES z) +- INCLUDE(CheckFunctionExists) +- SET(SAVE_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) +- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} z) - CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32) - CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND) - CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND) -- SET(CMAKE_REQUIRED_LIBRARIES) +- SET(CMAKE_REQUIRED_LIBRARIES ${SAVE_CMAKE_REQUIRED_LIBRARIES}) - IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND) - SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES} CACHE INTERNAL "System zlib library") - SET(WITH_ZLIB "system" CACHE STRING @@ -144,7 +143,7 @@ index e74b8c9..6695075 100644 - IF(NOT ZLIB_FOUND) - MYSQL_USE_BUNDLED_ZLIB() - ENDIF() -+ find_package(ZLIB REQUIRED) -+ SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library") ++ find_package(ZLIB REQUIRED) ++ SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library") ENDIF() ENDMACRO() diff --git a/ports/libmysql/usage b/ports/libmysql/usage new file mode 100644 index 00000000000000..8c2b814d282c46 --- /dev/null +++ b/ports/libmysql/usage @@ -0,0 +1,4 @@ +The package libmysql provides CMake targets: + + find_package(libmysql REQUIRED) + target_link_libraries(main PRIVATE ${MYSQL_LIBRARIES}) diff --git a/ports/libmysql/vcpkg-cmake-wrapper.cmake b/ports/libmysql/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..d7f0e7560a8301 --- /dev/null +++ b/ports/libmysql/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +find_package(unofficial-libmysql CONFIG REQUIRED) +if (TARGET mysqlclient) + set(MYSQL_LIBRARY mysqlclient) +elseif (TARGET libmysql) + set(MYSQL_LIBRARY libmysql) +endif() + +set(libmysql_FOUND 1) +set(MYSQL_LIBRARIES ${MYSQL_LIBRARY}) diff --git a/ports/libmysql/vcpkg.json b/ports/libmysql/vcpkg.json new file mode 100644 index 00000000000000..225ec74956eca1 --- /dev/null +++ b/ports/libmysql/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "libmysql", + "version": "8.0.20", + "port-version": 2, + "description": "A MySQL client library for C development", + "homepage": "https://github.com/mysql/mysql-server", + "supports": "!(windows & x86) & !uwp", + "dependencies": [ + "boost-algorithm", + "boost-functional", + "boost-geometry", + "boost-graph", + "boost-optional", + "icu", + "libevent", + "lz4", + "openssl", + "zlib" + ] +} diff --git a/ports/libnice/CMakeLists.txt b/ports/libnice/CMakeLists.txt index bde3a34ac0c9df..0ca7cdafaa5d13 100644 --- a/ports/libnice/CMakeLists.txt +++ b/ports/libnice/CMakeLists.txt @@ -1,24 +1,30 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.19) project(libnice LANGUAGES C VERSION 0.1.15) SET (this_target libnice) -add_definitions( - -D_CRT_SECURE_NO_WARNINGS - -D_SCL_SECURE_NO_WARNINGS - -DHAVE_OPENSSL - -DPACKAGE_STRING="${PROJECT_VERSION}") +if (WIN32) + add_definitions( + -D_CRT_SECURE_NO_WARNINGS + -D_SCL_SECURE_NO_WARNINGS + -DHAVE_OPENSSL + -DPACKAGE_STRING="${PROJECT_VERSION}") +else() + add_definitions( + -DHAVE_OPENSSL + -DPACKAGE_STRING="${PROJECT_VERSION}" + -DHAVE_NETDB_H=1) +endif() configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/config.h ${CMAKE_SOURCE_DIR}/config.h COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/libnice.def ${CMAKE_SOURCE_DIR}/libnice.def COPYONLY) -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_LIBRARY glib-2.0) -find_library(GOBJECT_LIBRARY gobject-2.0) -find_library(GIO_LIBRARY gio-2.0) +find_package(PkgConfig REQUIRED) +pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 IMPORTED_TARGET) find_library(IPHLPAPI_LIBRARY iphlpapi) find_library(WS2_32_LIB ws2_32) +find_library(ADVAPI32_LIB advapi32) find_package(OpenSSL REQUIRED) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} @@ -26,7 +32,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/random ${CMAKE_CURRENT_SOURCE_DIR}/socket ${CMAKE_CURRENT_SOURCE_DIR}/stun - ${GLIB_INCLUDE_DIR}) + ${GLIB2_INCLUDE_DIRS}) SET (SRCS @@ -120,8 +126,14 @@ SET(HEADERS ./win32/vs9/config.h ) add_library(libnice ${SRCS} ${HEADERS}) -set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4244 /wd4005 /wd4391 /wd4142 /wd4267") -target_link_libraries(libnice ${IPHLPAPI_LIBRARY} ${WS2_32_LIB} ${GLIB_LIBRARY} ${GOBJECT_LIBRARY} ${GIO_LIBRARY} OpenSSL::SSL) +if (MSVC) + set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4244 /wd4005 /wd4391 /wd4142 /wd4267") +endif() +if (WIN32) + target_link_libraries(libnice ${IPHLPAPI_LIBRARY} ${WS2_32_LIB} ${ADVAPI32_LIB} PkgConfig::GLIB2 OpenSSL::SSL) +else() + target_link_libraries(libnice PkgConfig::GLIB2 OpenSSL::SSL) +endif() install(TARGETS libnice RUNTIME DESTINATION bin ARCHIVE DESTINATION lib @@ -144,4 +156,4 @@ install(FILES stun/usages/ice.h DESTINATION include/stun/usages) install(FILES stun/usages/timer.h DESTINATION include/stun/usages) install(FILES stun/usages/turn.h DESTINATION include/stun/usages) install(FILES stun/win32_common.h DESTINATION include/stun) -endif() \ No newline at end of file +endif() diff --git a/ports/libnice/CONTROL b/ports/libnice/CONTROL deleted file mode 100644 index 8f79f6b0a00569..00000000000000 --- a/ports/libnice/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libnice -Version: 0.1.15-1 -Homepage: https://nice.freedesktop.org -Description: Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389). -Build-Depends: glib, openssl diff --git a/ports/libnice/portfile.cmake b/ports/libnice/portfile.cmake index 14fb0d646c52ad..038b21ebbc079c 100644 --- a/ports/libnice/portfile.cmake +++ b/ports/libnice/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_download_distfile( ARCHIVE URLS "https://nice.freedesktop.org/releases/libnice-0.1.15.tar.gz" @@ -12,10 +10,13 @@ vcpkg_extract_source_archive_ex( ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - +vcpkg_find_acquire_program(PKGCONFIG) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DPKG_CONFIG_EXECUTABLE=${PKGCONFIG} OPTIONS_RELEASE -DOPTIMIZE=1 OPTIONS_DEBUG -DDEBUGGABLE=1 ) @@ -24,7 +25,6 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libnice) -file(COPY ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/libnice) -file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/libnice) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libnice/COPYING ${CURRENT_PACKAGES_DIR}/share/libnice/copyright) +file(COPY ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libnice/vcpkg.json b/ports/libnice/vcpkg.json new file mode 100644 index 00000000000000..16802d092bf276 --- /dev/null +++ b/ports/libnice/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libnice", + "version": "0.1.15", + "port-version": 7, + "description": "Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389).", + "homepage": "https://nice.freedesktop.org", + "dependencies": [ + "glib", + "openssl" + ] +} diff --git a/ports/libnoise/CONTROL b/ports/libnoise/CONTROL deleted file mode 100644 index 53009a4506157e..00000000000000 --- a/ports/libnoise/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libnoise -Version: 1.0.0 -Description: A general-purpose library that generates three-dimensional coherent noise. Useful for terrain generation and procedural texture generation. Uses a broad number of techniques (Perlin noise, ridged multifractal, etc.) and combinations of those techniques. diff --git a/ports/libnoise/fix-build.patch b/ports/libnoise/fix-build.patch new file mode 100644 index 00000000000000..c0b7d7ce5a6ba2 --- /dev/null +++ b/ports/libnoise/fix-build.patch @@ -0,0 +1,56 @@ +diff --git a/noiseutils/CMakeLists.txt b/noiseutils/CMakeLists.txt +index 07747de..08c0bda 100644 +--- a/noiseutils/CMakeLists.txt ++++ b/noiseutils/CMakeLists.txt +@@ -22,8 +22,11 @@ if(BUILD_SHARED_LIBS) + target_include_directories(${TARGET_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/src) + + # install dynamic libraries (.dll or .so) into /bin +- install(TARGETS ${TARGET_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") +-endif() ++ install(TARGETS ${TARGET_NAME} ++ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib") ++else() + + #---------------------------------------- + # build static lib (it's good practice to include a lib file for the dll) +@@ -35,7 +38,7 @@ target_include_directories(${TARGET_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/src) + # install static libraries (.lib) into /lib + install(TARGETS ${TARGET_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/lib") + #---------------------------------------- +- ++endif() + # install include files into /include + install( FILES "${PROJECT_SOURCE_DIR}/noiseutils/noiseutils.h" + DESTINATION "${CMAKE_INSTALL_PREFIX}/include/noise" ) +\ No newline at end of file +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2757f30..7a135c2 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -62,8 +62,11 @@ if(BUILD_SHARED_LIBS) + set_target_properties(${TARGET_NAME} PROPERTIES VERSION ${LIBNOISE_VERSION}) + target_include_directories(${TARGET_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/src) + target_compile_definitions(${TARGET_NAME} PRIVATE NOISE_BUILD_DLL) +- install(TARGETS ${TARGET_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") +-endif() ++ install(TARGETS ${TARGET_NAME} ++ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib") ++else() + + #---------------------------------------- + # build static lib (it's good practice to include a lib file for the dll) +@@ -76,7 +79,7 @@ target_compile_definitions(${TARGET_NAME} PUBLIC NOISE_STATIC) + # install static libraries (.lib) into /lib + install(TARGETS ${TARGET_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/lib") + #---------------------------------------- +- ++endif() + # install include files into /include + install( DIRECTORY "${PROJECT_SOURCE_DIR}/src/noise" + DESTINATION "${CMAKE_INSTALL_PREFIX}/include" ) +\ No newline at end of file diff --git a/ports/libnoise/portfile.cmake b/ports/libnoise/portfile.cmake index 28465f585d1388..5c14ae663cb813 100644 --- a/ports/libnoise/portfile.cmake +++ b/ports/libnoise/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set( LIBNOISE_VERSION "1.0.0" ) set( LIBNOISE_COMMIT "d7e68784a2b24c632868506780eba336ede74ecd" ) @@ -9,21 +7,29 @@ vcpkg_from_github( REF ${LIBNOISE_COMMIT} SHA512 8c4d654acb4ae3d90ee62ebdf0447f876022dcb887ebfad88f39b09d29183a58e6fc1b1f1d03edff804975c8befcc6eda33c44797495285aae338c2e869a14d7 HEAD_REF master + PATCHES fix-build.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DBUILD_WALL=ON + -DBUILD_SPEED_OPTIMIZED=ON + -DBUILD_LIBNOISE_DOCUMENTATION=OFF + -DBUILD_LIBNOISE_UTILS=ON + -DBUILD_LIBNOISE_EXAMPLES=OFF ) vcpkg_install_cmake() -# Include files should not be duplicated into the /debug/include directory. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/libnoise) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libnoise/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/libnoise/copyright) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/noise/module/modulebase.h + "if NOISE_STATIC" "if 1" ) +endif() + +file(INSTALL ${SOURCE_PATH}/cmake/Modules/FindLibNoise.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -# Post-build test for cmake libraries -vcpkg_test_cmake(PACKAGE_NAME libnoise) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libnoise/vcpkg.json b/ports/libnoise/vcpkg.json new file mode 100644 index 00000000000000..d82097ee5cfb8b --- /dev/null +++ b/ports/libnoise/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libnoise", + "version-string": "1.0.0", + "port-version": 2, + "description": "A general-purpose library that generates three-dimensional coherent noise. Useful for terrain generation and procedural texture generation. Uses a broad number of techniques (Perlin noise, ridged multifractal, etc.) and combinations of those techniques.", + "homepage": "https://github.com/RobertHue/libnoise" +} diff --git a/ports/libnop/portfile.cmake b/ports/libnop/portfile.cmake new file mode 100644 index 00000000000000..5c10f5e60ffdce --- /dev/null +++ b/ports/libnop/portfile.cmake @@ -0,0 +1,8 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/libnop + REF 910b55815be16109f04f4180e9adee14fb4ce281 + SHA512 74c5324eaa1b6b2ac8dfef94c835b5c5b044625f8e5efe3522470b1ecc4798ff43d344a013cee2f6901e83267c6167072947b754e63f1552ae7044cffe234c36 +) +file(INSTALL ${SOURCE_PATH}/include/nop DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libnop/vcpkg.json b/ports/libnop/vcpkg.json new file mode 100644 index 00000000000000..be09bef23df997 --- /dev/null +++ b/ports/libnop/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libnop", + "version-date": "2021-03-01", + "description": "libnop is a header-only library for serializing and deserializing C++ data types without external code generators or runtime support libraries", + "homepage": "https://github.com/google/libnop" +} diff --git a/ports/libodb-boost/CONTROL b/ports/libodb-boost/CONTROL deleted file mode 100644 index 3dec8410355757..00000000000000 --- a/ports/libodb-boost/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libodb-boost -Version: 2.4.0-3 -Description: Description: Boost support for the ODB ORM library -Build-Depends: libodb diff --git a/ports/libodb-boost/portfile.cmake b/ports/libodb-boost/portfile.cmake index dc94a232f51429..adf571bea7e891 100644 --- a/ports/libodb-boost/portfile.cmake +++ b/ports/libodb-boost/portfile.cmake @@ -1,11 +1,14 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libodb-boost-2.4.0) vcpkg_download_distfile(ARCHIVE URLS "http://www.codesynthesis.com/download/odb/2.4/libodb-boost-2.4.0.tar.gz" FILENAME "libodb-boost-2.4.0.tar.gz" SHA512 af716b0385cf4ea18b20dcd5880c69c43cfc195eec4ff196a8e438833306489c39ab06a494e5d60cd08ba0d94caa05bd07e5f3fa836d835bad15c8a2ad7de306 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) +file(REMOVE "${SOURCE_PATH}/version") file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt @@ -20,11 +23,12 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_copy_pdbs() file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_boostConfig-debug.cmake LIBODB_DEBUG_TARGETS) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_boostConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb-boost) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb-boost/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb-boost/copyright) -vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libodb-boost/vcpkg.json b/ports/libodb-boost/vcpkg.json new file mode 100644 index 00000000000000..0294b5004ffe81 --- /dev/null +++ b/ports/libodb-boost/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "libodb-boost", + "version-string": "2.4.0", + "port-version": 5, + "description": "Description: Boost support for the ODB ORM library", + "dependencies": [ + "libodb" + ] +} diff --git a/ports/libodb-mysql/CONTROL b/ports/libodb-mysql/CONTROL deleted file mode 100644 index 7d2ee12f1121c5..00000000000000 --- a/ports/libodb-mysql/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libodb-mysql -Version: 2.4.0-3 -Homepage: https://www.codesynthesis.com/products/odb/ -Description: MySQL support for the ODB ORM library -Build-Depends: libodb, libmysql \ No newline at end of file diff --git a/ports/libodb-mysql/fix-redefinttion.patch b/ports/libodb-mysql/fix-redefinttion.patch new file mode 100644 index 00000000000000..ec6dab45991181 --- /dev/null +++ b/ports/libodb-mysql/fix-redefinttion.patch @@ -0,0 +1,32 @@ +diff --git a/odb/mysql/mysql-types.hxx b/odb/mysql/mysql-types.hxx +index 5396791..32a2a03 100644 +--- a/odb/mysql/mysql-types.hxx ++++ b/odb/mysql/mysql-types.hxx +@@ -7,13 +7,24 @@ + + #include + ++#include ++ + typedef bool my_bool; ++ ++#if !defined(LIBODB_MYSQL_MARIADB) && MYSQL_VERSION_ID >= 80011 ++struct MYSQL_BIND; ++#else + typedef struct st_mysql_bind MYSQL_BIND; ++#endif + +-#ifdef LIBODB_MYSQL_INCLUDE_SHORT +-# include ++#ifdef LIBODB_MYSQL_MARIADB ++# include + #else +-# include ++# ifdef LIBODB_MYSQL_INCLUDE_SHORT ++# include ++# else ++# include ++# endif + #endif + + #endif // ODB_MYSQL_MYSQL_TYPES_HXX diff --git a/ports/libodb-mysql/portfile.cmake b/ports/libodb-mysql/portfile.cmake index cf2d8b8c790e75..ac78846ddd39f0 100644 --- a/ports/libodb-mysql/portfile.cmake +++ b/ports/libodb-mysql/portfile.cmake @@ -1,29 +1,17 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libodb-mysql-2.4.0) vcpkg_download_distfile(ARCHIVE URLS "https://www.codesynthesis.com/download/odb/2.4/libodb-mysql-2.4.0.tar.gz" FILENAME "libodb-mysql-2.4.0.tar.gz" SHA512 c27b73c3f61dccdd149c11c122185f645a00d5bc346b366ee65b738f8719c39d03fad07a0d55b62b3db9e3ad2507679c24ddda331e5d110f367ad32f7cf8b910 ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH PATCHES - ${CMAKE_CURRENT_LIST_DIR}/adapter_mysql_8.0.patch + adapter_mysql_8.0.patch + fix-redefinttion.patch ) +file(REMOVE "${SOURCE_PATH}/version") file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt @@ -31,10 +19,12 @@ file(COPY DESTINATION ${SOURCE_PATH}) set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") -set(MYSQL_LIB "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") -set(MYSQL_LIB_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib") +find_library(MYSQL_LIB NAMES libmysql mysqlclient PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}" NO_DEFAULT_PATH REQUIRED) +find_library(MYSQL_LIB_DEBUG NAMES libmysql mysqlclient PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}/debug" NO_DEFAULT_PATH REQUIRED) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE PREFER_NINJA OPTIONS -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} @@ -47,10 +37,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_mysqlConfig-debug.cmake LIBODB_DEBUG_TARGETS) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_mysqlConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb-mysql) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb-mysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb-mysql/copyright) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/odb TARGET_PATH share/odb) + vcpkg_copy_pdbs() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libodb-mysql/usage b/ports/libodb-mysql/usage new file mode 100644 index 00000000000000..2ddd4550a67869 --- /dev/null +++ b/ports/libodb-mysql/usage @@ -0,0 +1,4 @@ +The package libodb-mysql provides CMake integration: + + find_package(odb CONFIG COMPONENTS libodb mysql REQUIRED) + target_link_libraries(main PRIVATE odb::libodb-mysql) diff --git a/ports/libodb-mysql/vcpkg.json b/ports/libodb-mysql/vcpkg.json new file mode 100644 index 00000000000000..c0fa1b01d07d7c --- /dev/null +++ b/ports/libodb-mysql/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libodb-mysql", + "version": "2.4.0", + "port-version": 9, + "description": "MySQL support for the ODB ORM library", + "homepage": "https://www.codesynthesis.com/products/odb/", + "dependencies": [ + "libmysql", + "libodb" + ] +} diff --git a/ports/libodb-pgsql/CONTROL b/ports/libodb-pgsql/CONTROL deleted file mode 100644 index a6988eeb0c5a7a..00000000000000 --- a/ports/libodb-pgsql/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libodb-pgsql -Version: 2.4.0-3 -Homepage: https://www.codesynthesis.com/products/odb/ -Description: Description: PostgreSQL support for the ODB ORM library -Build-Depends: libodb, libpq diff --git a/ports/libodb-pgsql/portfile.cmake b/ports/libodb-pgsql/portfile.cmake index ed9f35034b1c1a..cf84b650aadf91 100644 --- a/ports/libodb-pgsql/portfile.cmake +++ b/ports/libodb-pgsql/portfile.cmake @@ -1,11 +1,14 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libodb-pgsql-2.4.0) vcpkg_download_distfile(ARCHIVE URLS "http://www.codesynthesis.com/download/odb/2.4/libodb-pgsql-2.4.0.tar.gz" FILENAME "libodb-pgsql-2.4.0.tar.gz" SHA512 535515356233b815f144c0098940174f7a530e7fa4e930c0a9ebdc255fdb8bac8cdcceac31f25be4864105323e00bfe50808efa648e7c8ffb5a944e52f514b69 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) +file(REMOVE "${SOURCE_PATH}/version") file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt diff --git a/ports/libodb-pgsql/vcpkg.json b/ports/libodb-pgsql/vcpkg.json new file mode 100644 index 00000000000000..76e3ef673250ba --- /dev/null +++ b/ports/libodb-pgsql/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libodb-pgsql", + "version-string": "2.4.0", + "port-version": 5, + "description": "Description: PostgreSQL support for the ODB ORM library", + "homepage": "https://www.codesynthesis.com/products/odb/", + "dependencies": [ + "libodb", + "libpq" + ] +} diff --git a/ports/libodb-sqlite/CMakeLists.txt b/ports/libodb-sqlite/CMakeLists.txt index 79f9bc2bf3e8c2..e0689fa91f3a36 100644 --- a/ports/libodb-sqlite/CMakeLists.txt +++ b/ports/libodb-sqlite/CMakeLists.txt @@ -1,9 +1,8 @@ cmake_minimum_required(VERSION 3.0) project(libodb-sqlite VERSION 2.4.0 LANGUAGES CXX) find_package(odb 2.4.0 REQUIRED COMPONENTS libodb) -find_package(sqlite3 CONFIG) -configure_file(config.unix.h.in - ${CMAKE_CURRENT_SOURCE_DIR}/odb/sqlite/details/config.h COPYONLY) +find_package(unofficial-sqlite3 CONFIG) +configure_file(config.unix.h.in odb/sqlite/details/config.h COPYONLY) set(LIBODB_INSTALL_HEADERS ON CACHE BOOL "Install the header files (a debug install)") file(GLOB_RECURSE libodb_src LIST_DIRECTORIES False @@ -15,10 +14,10 @@ target_include_directories(libodb-sqlite PUBLIC $ $ - + $ ) -target_link_libraries(libodb-sqlite PRIVATE odb::libodb sqlite3) +target_link_libraries(libodb-sqlite PRIVATE odb::libodb unofficial::sqlite3::sqlite3) if(BUILD_SHARED_LIBS) target_compile_definitions(libodb-sqlite PRIVATE -DLIBODB_SQLITE_DYNAMIC_LIB @@ -35,14 +34,22 @@ install(TARGETS libodb-sqlite EXPORT odb_sqliteConfig RUNTIME DESTINATION bin ) if(LIBODB_INSTALL_HEADERS) -install(DIRECTORY odb DESTINATION include/ + install( + DIRECTORY odb + DESTINATION include/ COMPONENT sqlite FILES_MATCHING PATTERN "*.h" PATTERN "*.hxx" PATTERN "*.ixx" PATTERN "*.txx" -) + ) + install( + FILES config.unix.h.in + DESTINATION include/odb/sqlite/detail + COMPONENT sqlite + RENAME config.h + ) endif() install(EXPORT odb_sqliteConfig NAMESPACE odb:: COMPONENT sqlite DESTINATION share/odb) export(TARGETS libodb-sqlite NAMESPACE odb:: FILE odb_sqliteConfig.cmake) \ No newline at end of file diff --git a/ports/libodb-sqlite/CONTROL b/ports/libodb-sqlite/CONTROL deleted file mode 100644 index ed02fa81555204..00000000000000 --- a/ports/libodb-sqlite/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libodb-sqlite -Version: 2.4.0-4 -Homepage: https://www.codesynthesis.com/products/odb/ -Description: Sqlite support for the ODB ORM library -Build-Depends: libodb, sqlite3 diff --git a/ports/libodb-sqlite/portfile.cmake b/ports/libodb-sqlite/portfile.cmake index 67e4ffb3785b96..58fbb3a377c2ee 100644 --- a/ports/libodb-sqlite/portfile.cmake +++ b/ports/libodb-sqlite/portfile.cmake @@ -1,19 +1,14 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libodb-sqlite-2.4.0) vcpkg_download_distfile(ARCHIVE URLS "http://www.codesynthesis.com/download/odb/2.4/libodb-sqlite-2.4.0.tar.gz" FILENAME "libodb-sqlite-2.4.0.tar.gz" SHA512 af16da7c82cf8845ca3b393fbd8957a92b05ebc925a5191f20d414ab558345850073cd9c46457d0ef0edfb12ebcb27f267b934c9c69ef598380242fe920c8577 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) +file(REMOVE "${SOURCE_PATH}/version") file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt @@ -33,6 +28,7 @@ file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_sqliteConfig-debug.cmake L string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_sqliteConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb-sqlite) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb-sqlite/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb-sqlite/copyright) + vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libodb-sqlite/vcpkg.json b/ports/libodb-sqlite/vcpkg.json new file mode 100644 index 00000000000000..466dc4da3578df --- /dev/null +++ b/ports/libodb-sqlite/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libodb-sqlite", + "version-string": "2.4.0", + "port-version": 9, + "description": "Sqlite support for the ODB ORM library", + "homepage": "https://www.codesynthesis.com/products/odb/", + "dependencies": [ + "libodb", + "sqlite3" + ] +} diff --git a/ports/libodb/CONTROL b/ports/libodb/CONTROL deleted file mode 100644 index 129db70ab495fb..00000000000000 --- a/ports/libodb/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libodb -Version: 2.4.0-5 -Homepage: https://www.codesynthesis.com/products/odb/ -Description: ODB library, base runtime for the ODB ORM solution diff --git a/ports/libodb/odbConfig.cmake b/ports/libodb/odbConfig.cmake index afe51dc16ad0a4..f3037bde167451 100644 --- a/ports/libodb/odbConfig.cmake +++ b/ports/libodb/odbConfig.cmake @@ -1,4 +1,4 @@ -set(_supported_components libodb sqlite pgsql) +set(_supported_components libodb sqlite mysql pgsql) foreach(_comp ${odb_FIND_COMPONENTS}) if(NOT ";${_supported_components};" MATCHES _comp) diff --git a/ports/libodb/portfile.cmake b/ports/libodb/portfile.cmake index 7e48f43e5268ec..c7046bc8210dc8 100644 --- a/ports/libodb/portfile.cmake +++ b/ports/libodb/portfile.cmake @@ -1,20 +1,17 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - -include(vcpkg_common_functions) include(CMakePackageConfigHelpers) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libodb-2.4.0) + vcpkg_download_distfile(ARCHIVE URLS "http://www.codesynthesis.com/download/odb/2.4/libodb-2.4.0.tar.gz" FILENAME "libodb-2.4.0.tar.gz" SHA512 f1311458634695eb6ba307ebfd492e3b260e7beb06db1c5c46df58c339756be4006322cdc4e42d055bf5b2ad14ce4656ddcafcc4e16c282034db8a77d255c3eb ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) +file(REMOVE "${SOURCE_PATH}/version") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in @@ -23,6 +20,7 @@ file(COPY vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE OPTIONS_DEBUG -DLIBODB_INSTALL_HEADERS=OFF ) @@ -37,9 +35,6 @@ write_basic_package_version_file(${CURRENT_PACKAGES_DIR}/share/odb/odbConfigVers VERSION 2.4.0 COMPATIBILITY SameMajorVersion ) -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb/copyright) set(LIBODB_HEADER_PATH ${CURRENT_PACKAGES_DIR}/include/odb/details/export.hxx) file(READ ${LIBODB_HEADER_PATH} LIBODB_HEADER) @@ -51,3 +46,5 @@ endif() file(WRITE ${LIBODB_HEADER_PATH} "${LIBODB_HEADER}") vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libodb/vcpkg.json b/ports/libodb/vcpkg.json new file mode 100644 index 00000000000000..5c3fe94c21c7a1 --- /dev/null +++ b/ports/libodb/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libodb", + "version": "2.4.0", + "port-version": 8, + "description": "ODB library, base runtime for the ODB ORM solution", + "homepage": "https://www.codesynthesis.com/products/odb/" +} diff --git a/ports/libogg/CONTROL b/ports/libogg/CONTROL deleted file mode 100644 index 497ec9a6d6c45f..00000000000000 --- a/ports/libogg/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libogg -Version: 1.3.3-4 -Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. -Homepage: https://github.com/xiph/ogg diff --git a/ports/libogg/missing_usize64.patch b/ports/libogg/missing_usize64.patch deleted file mode 100644 index 556bc2a54688c5..00000000000000 --- a/ports/libogg/missing_usize64.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5c31a3c..c3c060a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -63,6 +63,7 @@ set(USIZE16 uint16_t) - set(SIZE32 int32_t) - set(USIZE32 uint32_t) - set(SIZE64 int64_t) -+set(USIZE64 uint64_t) - - configure_file(include/ogg/config_types.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/ogg/config_types.h @ONLY) - diff --git a/ports/libogg/portfile.cmake b/ports/libogg/portfile.cmake index 0b3b8be7bc2955..cd0cfc092201eb 100644 --- a/ports/libogg/portfile.cmake +++ b/ports/libogg/portfile.cmake @@ -1,28 +1,30 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.xiph.org OUT_SOURCE_PATH SOURCE_PATH REPO xiph/ogg - REF 6ccfcc2dce48c0d430b45064d0e13c962a64c42f - SHA512 441950d541f626a2e668efab4ed429c453534ef0334aad410013f07870a4a99e347f7a7eed335d77af41f02ce3dd600564d982e4c976a0c4cb76c19b1231d39e + REF v1.3.5 + SHA512 72bfad534a459bfca534eae9b209fa630ac20364a82e82f2707b210a40deaf9a7dc9031532a8b27120a9dd66f804655ddce79875758ef14b109bf869e57fb747 HEAD_REF master - PATCHES - missing_usize64.patch ) +if(VCPKG_TARGET_IS_MINGW) + vcpkg_replace_string(${SOURCE_PATH}/win32/ogg.def "LIBRARY ogg" "LIBRARY libogg") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DINSTALL_DOCS=0 -DINSTALL_PKG_CONFIG_MODULE=0 + OPTIONS -DINSTALL_DOCS=0 -DINSTALL_PKG_CONFIG_MODULE=1 ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ogg TARGET_PATH share/ogg) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Ogg TARGET_PATH share/ogg) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libogg/vcpkg.json b/ports/libogg/vcpkg.json new file mode 100644 index 00000000000000..0c0979eb1f9393 --- /dev/null +++ b/ports/libogg/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libogg", + "version": "1.3.5", + "description": "Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs.", + "homepage": "https://www.xiph.org/ogg" +} diff --git a/ports/libopenmpt/CMakeLists.txt b/ports/libopenmpt/CMakeLists.txt index 5e9b20799a8c55..6f4ad1b57627a4 100644 --- a/ports/libopenmpt/CMakeLists.txt +++ b/ports/libopenmpt/CMakeLists.txt @@ -3,7 +3,7 @@ project(libopenmpt) if(MSVC) add_compile_options( - /W3 /wd4005 /wd4267 /wd4244 /wd4996 /wd410 /wd4018 + /W3 /wd4005 /wd4267 /wd4244 /wd4996 /wd4100 /wd4018 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS ) @@ -11,23 +11,11 @@ endif() find_package(ZLIB REQUIRED) -find_path(MPG123_INCLUDE_DIR NAMES mpg123.h) -find_library(MPG123_LIBRARY NAMES mpg123 libmpg123) - -find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) -find_path(OGG_INCLUDE_DIR ogg/ogg.h) - -find_library(OGG_LIBRARY NAMES ogg) -find_library(VORBIS_LIBRARY NAMES vorbis) -find_library(VORBISFILE_LIBRARY NAMES vorbisfile) - -find_path(FLAC_INCLUDE_DIR FLAC/all.h) -find_library(FLAC_LIBRARY NAMES FLAC flac) - -find_path(PORTAUDIO_INCLUDE_DIR NAMES portaudio.h) -find_library(PORTAUDIO_LIBRARY NAMES portaudio) - +find_package(MPG123 REQUIRED) +find_package(Vorbis REQUIRED) +find_package(FLAC REQUIRED) +find_package(portaudio REQUIRED) set( lib_headers @@ -45,7 +33,6 @@ set( libopenmpt/libopenmpt_version.h ) - include_directories( . build/svn_version @@ -55,11 +42,6 @@ include_directories( sounddsp soundlib openmpt123 - ${MPG123_INCLUDE_DIR} - ${VORBIS_INCLUDE_DIR} - ${OGG_INCLUDE_DIR} - ${FLAC_INCLUDE_DIR} - ${PORTAUDIO_INCLUDE_DIR} ) set( @@ -245,30 +227,27 @@ endif() target_link_libraries( libopenmpt PRIVATE - ${OGG_LIBRARY} - ${MPG123_LIBRARY} - ${VORBISFILE_LIBRARY} - ${VORBIS_LIBRARY} - ${VORBISFILE_LIBRARY} + MPG123::libmpg123 + Vorbis::vorbisfile + FLAC::FLAC ZLIB::ZLIB ) +if(BUILD_SHARED_LIBS) + set(PORTAUDIO_TARGET portaudio) +else() + set(PORTAUDIO_TARGET portaudio_static) +endif() + target_link_libraries( openmpt123 PRIVATE libopenmpt - ${OGG_LIBRARY} - ${MPG123_LIBRARY} - ${VORBISFILE_LIBRARY} - ${VORBIS_LIBRARY} - ${VORBISFILE_LIBRARY} - ${FLAC_LIBRARY} - ${PORTAUDIO_LIBRARY} Winmm ZLIB::ZLIB + ${PORTAUDIO_TARGET} ) - install( TARGETS libopenmpt RUNTIME DESTINATION bin @@ -276,7 +255,6 @@ install( ARCHIVE DESTINATION lib ) - if(NOT DISABLE_INSTALL_HEADERS) install(FILES ${lib_headers} DESTINATION include/libopenmpt) endif() diff --git a/ports/libopenmpt/CONTROL b/ports/libopenmpt/CONTROL deleted file mode 100644 index 32fa988d1366ac..00000000000000 --- a/ports/libopenmpt/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libopenmpt -Version: 2017-01-28-cf2390140 -Homepage: https://github.com/OpenMPT/openmpt -Description: a library to render tracker music -Build-Depends: zlib, mpg123, libogg, libvorbis, portaudio, libflac diff --git a/ports/libopenmpt/deaf2e3837fb08b1a53fd21bb53adbafe0a84e7d.patch b/ports/libopenmpt/deaf2e3837fb08b1a53fd21bb53adbafe0a84e7d.patch new file mode 100644 index 00000000000000..cece6f839272d4 --- /dev/null +++ b/ports/libopenmpt/deaf2e3837fb08b1a53fd21bb53adbafe0a84e7d.patch @@ -0,0 +1,13 @@ +diff --git a/common/mptUUID.h b/common/mptUUID.h +index a683fdcab..be7d4cb61 100644 +--- a/common/mptUUID.h ++++ b/common/mptUUID.h +@@ -13,6 +13,8 @@ + + #include "Endianness.h" + ++#include ++ + #if MPT_OS_WINDOWS + #if defined(MODPLUG_TRACKER) || !defined(NO_DMO) + #include diff --git a/ports/libopenmpt/portfile.cmake b/ports/libopenmpt/portfile.cmake index c43f64a996b365..76cb968dc513ec 100644 --- a/ports/libopenmpt/portfile.cmake +++ b/ports/libopenmpt/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Windowstore not supported") endif() @@ -8,6 +7,8 @@ vcpkg_from_github( REF cf2390140c37a53ecf7d5fe73412982d346efba4 SHA512 6401bac7a899eaacebb601591f982fabde6351f1c0dc0c2d24f1f303b78592e7883a84463bdf3cf0fd029eb38d7b7085fdfadafea2931b307b43d0b601db863e HEAD_REF master + PATCHES + deaf2e3837fb08b1a53fd21bb53adbafe0a84e7d.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/libopenmpt/vcpkg.json b/ports/libopenmpt/vcpkg.json new file mode 100644 index 00000000000000..3668ed848b6a70 --- /dev/null +++ b/ports/libopenmpt/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "libopenmpt", + "version-string": "2017-01-28-cf2390140", + "port-version": 2, + "description": "a library to render tracker music", + "homepage": "https://github.com/OpenMPT/openmpt", + "supports": "!uwp", + "dependencies": [ + "libflac", + "libogg", + "libvorbis", + "mpg123", + "portaudio", + "zlib" + ] +} diff --git a/ports/libopusenc/CMakeLists.txt b/ports/libopusenc/CMakeLists.txt index 4ab1a4e9d76ade..442d19a6d230f1 100644 --- a/ports/libopusenc/CMakeLists.txt +++ b/ports/libopusenc/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.4) project(libopusenc C) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267 /wd4244 /wd4996 /wd4101 /wd4018") +if(MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267 /wd4244 /wd4996 /wd4101 /wd4018") +endif() find_path(OPUS_INCLUDE_DIR opus.h PATH_SUFFIXES opus) find_library(OPUS_LIBRARY opus) diff --git a/ports/libopusenc/CONTROL b/ports/libopusenc/CONTROL deleted file mode 100644 index 844b22d499bddf..00000000000000 --- a/ports/libopusenc/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libopusenc -Version: 0.2.1 -Homepage: https://github.com/xiph/libopusenc -Description: Library for encoding .opus audio files and live streams. -Build-Depends: opus diff --git a/ports/libopusenc/portfile.cmake b/ports/libopusenc/portfile.cmake index f3c226aea98d9f..7a4eacee4dbb71 100644 --- a/ports/libopusenc/portfile.cmake +++ b/ports/libopusenc/portfile.cmake @@ -2,7 +2,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "UWP builds not supported") endif() -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/libopusenc diff --git a/ports/libopusenc/vcpkg.json b/ports/libopusenc/vcpkg.json new file mode 100644 index 00000000000000..0ce806c812bad4 --- /dev/null +++ b/ports/libopusenc/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libopusenc", + "version-string": "0.2.1", + "port-version": 1, + "description": "Library for encoding .opus audio files and live streams.", + "homepage": "https://github.com/xiph/libopusenc", + "supports": "!uwp", + "dependencies": [ + "opus" + ] +} diff --git a/ports/libosip2/fix-path-in-project.patch b/ports/libosip2/fix-path-in-project.patch new file mode 100644 index 00000000000000..807a0b97589c32 --- /dev/null +++ b/ports/libosip2/fix-path-in-project.patch @@ -0,0 +1,304 @@ +diff --git a/platform/vsnet/osip2.vcxproj b/platform/vsnet/osip2.vcxproj +index b13cbe9..40b8e23 100644 +--- a/platform/vsnet/osip2.vcxproj ++++ b/platform/vsnet/osip2.vcxproj +@@ -79,7 +79,7 @@ + + + Disabled +- ..\..\..\osip\include;%(AdditionalIncludeDirectories) ++ ..\..\include;%(AdditionalIncludeDirectories) + ENABLE_TRACE;SYSTEM_LOGGER_ENABLED;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + EnableFastChecks +@@ -97,7 +97,7 @@ + + + Disabled +- ..\..\..\osip\include;%(AdditionalIncludeDirectories) ++ ..\..\include;%(AdditionalIncludeDirectories) + ENABLE_TRACE;SYSTEM_LOGGER_ENABLED;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug +@@ -113,7 +113,7 @@ + + + +- ..\..\..\osip\include;%(AdditionalIncludeDirectories) ++ ..\..\include;%(AdditionalIncludeDirectories) + ENABLE_TRACE;SYSTEM_LOGGER_ENABLED;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + +@@ -129,7 +129,7 @@ + + + +- ..\..\..\osip\include;%(AdditionalIncludeDirectories) ++ ..\..\include;%(AdditionalIncludeDirectories) + ENABLE_TRACE;SYSTEM_LOGGER_ENABLED;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + +@@ -144,37 +144,37 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ + + +- ++ + {44f46b7e-0e51-4304-9735-330dfbab41e5} + false + +diff --git a/platform/vsnet/osipparser2.vcxproj b/platform/vsnet/osipparser2.vcxproj +index 6c73222..bda0fe5 100644 +--- a/platform/vsnet/osipparser2.vcxproj ++++ b/platform/vsnet/osipparser2.vcxproj +@@ -79,7 +79,7 @@ + + + Disabled +- ..\..\..\osip\include;%(AdditionalIncludeDirectories) ++ ..\..\include;%(AdditionalIncludeDirectories) + ENABLE_TRACE;SYSTEM_LOGGER_ENABLED;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + EnableFastChecks +@@ -97,7 +97,7 @@ + + + Disabled +- ..\..\..\osip\include;%(AdditionalIncludeDirectories) ++ ..\..\include;%(AdditionalIncludeDirectories) + ENABLE_TRACE;SYSTEM_LOGGER_ENABLED;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug +@@ -113,7 +113,7 @@ + + + +- ..\..\..\osip\include;%(AdditionalIncludeDirectories) ++ ..\..\include;%(AdditionalIncludeDirectories) + ENABLE_TRACE;SYSTEM_LOGGER_ENABLED;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + +@@ -129,7 +129,7 @@ + + + +- ..\..\..\osip\include;%(AdditionalIncludeDirectories) ++ ..\..\include;%(AdditionalIncludeDirectories) + ENABLE_TRACE;SYSTEM_LOGGER_ENABLED;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + +@@ -144,83 +144,83 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + diff --git a/ports/libosip2/portfile.cmake b/ports/libosip2/portfile.cmake new file mode 100644 index 00000000000000..bf3fdc5384345d --- /dev/null +++ b/ports/libosip2/portfile.cmake @@ -0,0 +1,51 @@ +set(LIBOSIP2_VER "5.2.0") + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/osip/libosip2-${LIBOSIP2_VER}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/osip/libosip2-${LIBOSIP2_VER}.tar.gz" + FILENAME "libosip2-${LIBOSIP2_VER}.tar.gz" + SHA512 cc714ab5669c466ee8f0de78cf74a8b7633f3089bf104c9c1474326840db3d791270159456f9deb877af2df346b04493e8f796b2bb7d2be134f6c08b25a29f83 +) + +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND PATCHES fix-path-in-project.patch) +endif() + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES ${PATCHES} +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(ON_ARCH "arm" "arm64") + + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "platform/vsnet/osip2.vcxproj" + INCLUDES_SUBPATH include + USE_VCPKG_INTEGRATION + REMOVE_ROOT_INCLUDES + ) + + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "platform/vsnet/osipparser2.vcxproj" + USE_VCPKG_INTEGRATION + ) + +elseif(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${OPTIONS} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libosip2/vcpkg.json b/ports/libosip2/vcpkg.json new file mode 100644 index 00000000000000..e7c34ef99b37bb --- /dev/null +++ b/ports/libosip2/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libosip2", + "version": "5.2.0", + "description": "oSIP is an LGPL implementation of SIP. It's stable, portable, flexible and compliant! -may be more-! It is used mostly with eXosip2 stack (GPL) which provides simpler API for User-Agent implementation.", + "homepage": "https://www.gnu.org/software/osip/", + "supports": "!(windows & arm)", + "dependencies": [ + "pthread" + ] +} diff --git a/ports/libosmium/portfile.cmake b/ports/libosmium/portfile.cmake new file mode 100644 index 00000000000000..ebc364284db92d --- /dev/null +++ b/ports/libosmium/portfile.cmake @@ -0,0 +1,22 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osmcode/libosmium + REF b263ba5e85c9ac254fa4090c855ec6f0556795e2 #v2.17.0 + SHA512 fd2955af6153ef58d76cca1e5b83cb70cd33cb616a3e221a80df94ee1256eeeaa5f15f4727cd1023f0335e55d7f3f36e3f9f5490bcd78ba9d267b2075480d1ba +) +set(BOOST_ROOT "${CURRENT_INSTALLED_DIR}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DBUILD_EXAMPLES=OFF +) + +vcpkg_cmake_install() + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") \ No newline at end of file diff --git a/ports/libosmium/vcpkg.json b/ports/libosmium/vcpkg.json new file mode 100644 index 00000000000000..2bd42371b58b87 --- /dev/null +++ b/ports/libosmium/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "libosmium", + "version-semver": "2.17.0", + "description": "A fast and flexible C++ library for working with OpenStreetMap data", + "homepage": "https://osmcode.org/libosmium/", + "dependencies": [ + "boost", + "bzip2", + "expat", + "proj4", + "protozero", + "utfcpp", + { + "name": "vcpkg-cmake", + "host": true + }, + "zlib" + ] +} diff --git a/ports/libosmscout/portfile.cmake b/ports/libosmscout/portfile.cmake new file mode 100644 index 00000000000000..20125753c1330b --- /dev/null +++ b/ports/libosmscout/portfile.cmake @@ -0,0 +1,49 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Framstag/libosmscout + REF c81e1d9a0f69cc5b93588dbe330b2af587162c5f + SHA512 d6ddbc49dd40b1f938ae2cd1ea9342cab0a52db46bf7ed6716111a91d0a38acba12ff2e273d457db51fc240d578a5b849af77b53e600482cf52c3b22306f8c45 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + cairo OSMDCOUT_BUILD_MAP_CAIRO + directx OSMDCOUT_BUILD_MAP_DIRECTX + gdi OSMDCOUT_BUILD_MAP_GDI + svg OSMDCOUT_BUILD_MAP_SVG + ) +else() + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + cairo OSMDCOUT_BUILD_MAP_CAIRO + svg OSMDCOUT_BUILD_MAP_SVG + ) + list(APPEND FEATURE_OPTIONS -DOSMDCOUT_BUILD_MAP_DIRECTX=OFF -DOSMDCOUT_BUILD_MAP_GDI=OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DOSMSCOUT_BUILD_DEMOS=OFF + -DOSMSCOUT_BUILD_TOOL_DUMPDATA=OFF + -DOSMSCOUT_BUILD_TOOL_IMPORT=ON + -DOSMSCOUT_BUILD_TOOL_OSMSCOUT2=OFF + -DOSMSCOUT_BUILD_TOOL_OSMSCOUTOPENGL=OFF + -DOSMSCOUT_BUILD_TOOL_PUBLICTRANSPORTMAP=OFF + -DOSMSCOUT_BUILD_TOOL_STYLEEDITOR=OFF + -DOSMSCOUT_BUILD_EXTERN_MATLAB=OFF + -DOSMSCOUT_BUILD_TESTS=OFF + -DOSMDCOUT_BUILD_MAP_QT=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_tools(TOOL_NAMES Import AUTO_CLEAN) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libosmscout) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/BasemapImport.exe") +file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/BasemapImport.exe") diff --git a/ports/libosmscout/vcpkg.json b/ports/libosmscout/vcpkg.json new file mode 100644 index 00000000000000..7a80efed0c3209 --- /dev/null +++ b/ports/libosmscout/vcpkg.json @@ -0,0 +1,41 @@ +{ + "name": "libosmscout", + "version-string": "1.1.1", + "description": "libosmscout offers applications simple, high-level interfaces for offline location and POI lokup, rendering and routing functionalities based on OpenStreetMap (OSM) data.", + "homepage": "http://libosmscout.sourceforge.net/", + "documentation": "http://libosmscout.sourceforge.net/documentation/", + "supports": "!uwp & !arm & !arm64 & !static & !wasm32 & !emscripten", + "dependencies": [ + "libiconv", + "liblzma", + "libxml2", + "protobuf", + "zlib" + ], + "features": { + "cairo": { + "description": "Cairo backend renderer", + "dependencies": [ + "cairo", + "freetype", + "harfbuzz", + "libpng", + "pango" + ] + }, + "directx": { + "description": "Direct2D backend renderer" + }, + "gdi": { + "description": "GDI+ backend renderer" + }, + "svg": { + "description": "SVG backend renderer", + "dependencies": [ + "freetype", + "harfbuzz", + "pango" + ] + } + } +} diff --git a/ports/libp7-baical/CMakeLists.txt b/ports/libp7-baical/CMakeLists.txt deleted file mode 100644 index 6b1044e4391e78..00000000000000 --- a/ports/libp7-baical/CMakeLists.txt +++ /dev/null @@ -1,53 +0,0 @@ -project(P7) -cmake_minimum_required(VERSION 3.0) - -set(SOURCES "Sources/ClBaical.cpp" - "Sources/ClFile.cpp" - "Sources/Client.cpp" - "Sources/ClNull.cpp" - "Sources/ClText.cpp" - "Sources/CRC32.cpp" - "Sources/Proxy.cpp" - "Sources/Telemetry.cpp" - "Sources/Trace.cpp" -) - -if(WIN32) - set(RESOURCES "Sources/P7Client.rc") -else() - set(RESOURCES "") -endif() - -add_library(P7 "${SOURCES}" "${RESOURCES}") -target_include_directories(P7 PRIVATE "Headers/") -target_include_directories(P7 PRIVATE "Shared/") -if(WIN32) - target_include_directories(P7 PRIVATE "Shared/Platforms/Windows_x86/") - target_link_libraries(P7 "ws2_32") -else() - target_include_directories(P7 PRIVATE "Shared/Platforms/Linux_x86/") -endif() - -if(WIN32) - set_target_properties(P7 PROPERTIES PREFIX "") - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x64d") - set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x64") - else() - set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x32d") - set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x32") - endif() -else() - set_target_properties(P7 PROPERTIES PREFIX "lib") - set_target_properties(P7 PROPERTIES POSTFIX "") - set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "d") -endif() - -install(TARGETS P7 - RUNTIME DESTINATION "bin" - ARCHIVE DESTINATION "lib" - LIBRARY DESTINATION "lib") - -install(DIRECTORY Headers/ - DESTINATION include/P7 - FILES_MATCHING PATTERN "*.h") diff --git a/ports/libp7-baical/CONTROL b/ports/libp7-baical/CONTROL deleted file mode 100644 index 698334f58b313a..00000000000000 --- a/ports/libp7-baical/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libp7-baical -Version: 4.4-4 -Homepage: https://baical.net/ -Description: P7 is a library for high-speed sending telemetry & trace data from application diff --git a/ports/libp7-baical/portfile.cmake b/ports/libp7-baical/portfile.cmake index fcc51caede16cf..6320a2825b8c47 100644 --- a/ports/libp7-baical/portfile.cmake +++ b/ports/libp7-baical/portfile.cmake @@ -1,35 +1,2 @@ -include(vcpkg_common_functions) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) - message(FATAL_ERROR "libP7 does not support ARM") -endif() - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "libP7 does not support UWP") -endif() - -set(LIBP7_VERSION 4.4) -set(LIBP7_HASH 500fefdf6fb01999ddb2accc8309cf8749fb7a65abb98faaf6d71a5ae3da4eac8c00c083905b01f7f6cc973387b605f2c4db0bb007562f76b7ad43b6abe2b91f) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libP7_v${LIBP7_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS "http://baical.net/files/libP7_v${LIBP7_VERSION}.zip" - FILENAME "libP7_v${LIBP7_VERSION}.zip" - SHA512 ${LIBP7_HASH} -) -vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(COPY ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libp7-baical/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libp7-baical/License.txt ${CURRENT_PACKAGES_DIR}/share/libp7-baical/copyright) \ No newline at end of file +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +message(WARNING "libp7-baical has been replaced by libp7client.") diff --git a/ports/libp7-baical/vcpkg.json b/ports/libp7-baical/vcpkg.json new file mode 100644 index 00000000000000..b599fd07076e1c --- /dev/null +++ b/ports/libp7-baical/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "libp7-baical", + "version-string": "replaced", + "port-version": 1, + "description": "An old name for the port libp7client; please install libp7client instead.", + "dependencies": [ + "libp7client" + ] +} diff --git a/ports/libp7client/CMakeLists.txt b/ports/libp7client/CMakeLists.txt new file mode 100644 index 00000000000000..f2eb53af357f7a --- /dev/null +++ b/ports/libp7client/CMakeLists.txt @@ -0,0 +1,46 @@ +project(P7) +cmake_minimum_required(VERSION 3.18) + +add_library(P7 + "Sources/ClBaical.cpp" + "Sources/ClFile.cpp" + "Sources/Client.cpp" + "Sources/ClNull.cpp" + "Sources/ClText.cpp" + "Sources/CRC32.cpp" + "Sources/Proxy.cpp" + "Sources/Telemetry.cpp" + "Sources/Trace.cpp") + +target_include_directories(P7 PRIVATE "Headers/") +target_include_directories(P7 PRIVATE "Shared/") +if(WIN32) + target_include_directories(P7 PRIVATE "Shared/Platforms/Windows_x86/") + target_link_libraries(P7 "ws2_32") +else() + target_include_directories(P7 PRIVATE "Shared/Platforms/Linux_x86/") +endif() + +if(WIN32) + set_target_properties(P7 PROPERTIES PREFIX "") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x64d") + set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x64") + else() + set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x32d") + set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x32") + endif() +else() + set_target_properties(P7 PROPERTIES PREFIX "lib") + set_target_properties(P7 PROPERTIES POSTFIX "") + set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "d") +endif() + +install(TARGETS P7 + RUNTIME DESTINATION "bin" + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib") + +install(DIRECTORY Headers/ + DESTINATION include/P7 + FILES_MATCHING PATTERN "*.h") diff --git a/ports/libp7client/portfile.cmake b/ports/libp7client/portfile.cmake new file mode 100644 index 00000000000000..66a87883463593 --- /dev/null +++ b/ports/libp7client/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "osx") + +vcpkg_download_distfile(ARCHIVE + URLS http://baical.net/files/libP7Client_v5.6.zip + FILENAME libP7Client_v5.6.zip + SHA512 992256854b717a45ae9e11ed16aa27b8b054de97718f027664634597d756aa26fe10dcad765cde7695802c90def46461abbcbfde81923fdd40ea2b659e1a8240 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + NO_REMOVE_ONE_LEVEL +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libp7client/vcpkg.json b/ports/libp7client/vcpkg.json new file mode 100644 index 00000000000000..dda660ebc884e2 --- /dev/null +++ b/ports/libp7client/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libp7client", + "version-string": "5.6", + "port-version": 1, + "description": "Open source, cross-platform, fastest library for sending logs, telemetry & trace data from your application.", + "homepage": "https://baical.net/", + "supports": "!(arm | uwp | osx)" +} diff --git a/ports/libpcap/CONTROL b/ports/libpcap/CONTROL deleted file mode 100644 index c0509704cefc6f..00000000000000 --- a/ports/libpcap/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libpcap -Version: 1.9.0 -Description: A portable C/C++ library for network traffic capture diff --git a/ports/libpcap/add-disable-packet-option.patch b/ports/libpcap/add-disable-packet-option.patch new file mode 100644 index 00000000000000..9d89a550596e13 --- /dev/null +++ b/ports/libpcap/add-disable-packet-option.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2f675d1..e9d6d96 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -244,6 +244,7 @@ set(SEPTEL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../septel" CACHE PATH "Path to dire + option(DISABLE_SNF "Disable Myricom SNF support" OFF) + + option(DISABLE_TC "Disable Riverbed TurboCap support" OFF) ++option(DISABLE_PACKET "Disable Packet support" OFF) + + # + # Debugging options. +@@ -302,7 +303,7 @@ if(WIN32) + if(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/../../Common) + include_directories(${CMAKE_HOME_DIRECTORY}/../../Common) + endif(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/../../Common) +- ++ if(NOT DISABLE_PACKET) + find_package(Packet) + if(PACKET_FOUND) + set(HAVE_PACKET32 TRUE) +@@ -317,7 +318,8 @@ if(WIN32) + check_function_exists(PacketGetTimestampModes HAVE_PACKET_GET_TIMESTAMP_MODES) + cmake_pop_check_state() + endif(PACKET_FOUND) +- ++ endif() ++ + message(STATUS "checking for Npcap's version.h") + check_symbol_exists(WINPCAP_PRODUCT_NAME "${CMAKE_SOURCE_DIR}/../../version.h" HAVE_VERSION_H) + if(HAVE_VERSION_H) diff --git a/ports/libpcap/install-pc-on-msvc.patch b/ports/libpcap/install-pc-on-msvc.patch new file mode 100644 index 00000000000000..6dd18f202340c0 --- /dev/null +++ b/ports/libpcap/install-pc-on-msvc.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b83fbbd..2f675d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2678,9 +2678,12 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap.h DESTINATION include) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-bpf.h DESTINATION include) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-namedb.h DESTINATION include) + +-# On UN*X, and on Windows when not using MSVC, generate libpcap.pc and +-# pcap-config and process man pages and arrange that they be installed. +-if(NOT MSVC) ++# Generate libpcap.pc ++if(BUILD_SHARED_LIBS) ++ set(PACKAGE_NAME ${LIBRARY_NAME}) ++else() ++ set(PACKAGE_NAME pcap) ++endif() + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\${prefix}") + set(includedir "\${prefix}/include") +@@ -2715,10 +2718,14 @@ if(NOT MSVC) + foreach(LIB ${PCAP_LINK_LIBRARIES}) + set(LIBS "${LIBS} -l${LIB}") + endforeach(LIB) +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINARY_DIR}/pcap-config @ONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc @ONLY) +- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig) ++ ++# On UN*X, and on Windows when not using MSVC, generate libpcap.pc and ++# pcap-config and process man pages and arrange that they be installed. ++if(NOT MSVC) ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINARY_DIR}/pcap-config @ONLY) ++ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin) + + # + # Man pages. diff --git a/ports/libpcap/portfile.cmake b/ports/libpcap/portfile.cmake index 665e6b60333d59..9fef5379d03eeb 100644 --- a/ports/libpcap/portfile.cmake +++ b/ports/libpcap/portfile.cmake @@ -1,75 +1,84 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP" "OSX") -vcpkg_download_distfile( - SOURCE_ARCHIVE_PATH - URLS http://www.tcpdump.org/release/libpcap-1.9.0.tar.gz - FILENAME libpcap-1.9.0.tar.gz - SHA512 0ff25641f1e9d29082766caef45888c19214f770c4f378818caa73fcbc4ae54ad9195549c2499d4879ff46e35741d93b2b02cc5f3d6aa99e85a32194cf10bfe7 -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${SOURCE_ARCHIVE_PATH} - REF 1.9.0 -) - -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - message(FATAL_ERROR "Package only supports linux platform.") +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/winpcap") + message(FATAL_ERROR "FATAL ERROR: winpcap and libpcap are incompatible.") endif() -message( +if(VCPKG_TARGET_IS_LINUX) + message( "libpcap currently requires the following libraries from the system package manager: flex libbison-dev - These can be installed on Ubuntu systems via sudo apt install flex libbison-dev" -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(SHARED_STATIC --enable-static --disable-shared) -else() - set(SHARED_STATIC --disable-static --enable-shared) + ) endif() -set(OPTIONS ${SHARED_STATIC}) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") -set(CFLAGS "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -fPIC -O0 -g -I${SOURCE_PATH}/include") -set(LDFLAGS "${VCPKG_LINKER_FLAGS}") -vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR}/debug ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR}/debug --enable-usb=no --enable-netmap=no --enable-bluetooth=no --enable-dbus=no --enable-rdma=no --enable-shared=no --with-libnl=no - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME configure-${TARGET_TRIPLET}-dbg -) -message(STATUS "Building ${TARGET_TRIPLET}-dbg") -vcpkg_execute_required_process( - COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME install-${TARGET_TRIPLET}-dbg +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO the-tcpdump-group/libpcap + REF c7642e2cc0c5bd65754685b160d25dc23c76c6bd #1.10.1 + SHA512 ed46095863aaee79ca2833d26438f6c837cc3e64acb73efd5a388a11ff7d0d1245d23e5404070a9f2c2c77840c93c09328746761e4481e9a530593a5cbf2ad6f + HEAD_REF master + PATCHES + install-pc-on-msvc.patch + add-disable-packet-option.patch ) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -message(STATUS "Configuring ${TARGET_TRIPLET}-rel") -set(CFLAGS "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -fPIC -O3 -I${SOURCE_PATH}/include") -set(LDFLAGS "${VCPKG_LINKER_FLAGS}") -vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR} ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR} --enable-usb=no --enable-netmap=no --enable-bluetooth=no --enable-dbus=no --enable-rdma=no --enable-shared=no --with-libnl=no - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME configure-${TARGET_TRIPLET}-rel -) -message(STATUS "Building ${TARGET_TRIPLET}-rel") -vcpkg_execute_required_process( - COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME install-${TARGET_TRIPLET}-rel +vcpkg_find_acquire_program(BISON) +get_filename_component(BISON_PATH ${BISON} DIRECTORY) +vcpkg_add_to_path(${BISON_PATH}) +vcpkg_find_acquire_program(FLEX) +get_filename_component(FLEX_PATH ${FLEX} DIRECTORY) +vcpkg_add_to_path(${FLEX_PATH}) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_STATIC_RT) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DDISABLE_NETMAP=ON + -DDISABLE_BLUETOOTH=ON + -DDISABLE_DBUS=ON + -DDISABLE_RDMA=ON + -DDISABLE_DAG=ON + -DDISABLE_SEPTEL=ON + -DDISABLE_SNF=ON + -DDISABLE_TC=ON + -DDISABLE_PACKET=ON + -DENABLE_REMOTE=OFF + -DUSE_STATIC_RT=${USE_STATIC_RT} ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +vcpkg_cmake_install() +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +# On Windows 64-bit, libpcap 1.10.1 installs the libraries in a x64 subdirectory of the usual directories +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(libsubdir "x64") + file(GLOB_RECURSE FILES_TO_MOVE "${CURRENT_PACKAGES_DIR}/lib/${libsubdir}/*") + file(COPY ${FILES_TO_MOVE} DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(GLOB_RECURSE FILES_TO_MOVE "${CURRENT_PACKAGES_DIR}/debug/lib/${libsubdir}/*") + file(COPY ${FILES_TO_MOVE} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + file(GLOB_RECURSE FILES_TO_MOVE "${CURRENT_PACKAGES_DIR}/bin/${libsubdir}/*") + file(COPY ${FILES_TO_MOVE} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(GLOB_RECURSE FILES_TO_MOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${libsubdir}/*") + file(COPY ${FILES_TO_MOVE} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/${libsubdir}" + "${CURRENT_PACKAGES_DIR}/debug/lib/${libsubdir}" + "${CURRENT_PACKAGES_DIR}/bin/${libsubdir}" + "${CURRENT_PACKAGES_DIR}/debug/bin/${libsubdir}") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -configure_file(${SOURCE_PATH}/README.md ${CURRENT_PACKAGES_DIR}/share/libpcap/copyright COPYONLY) +# Even if compiled with BUILD_SHARED_LIBS=ON, pcap also install a pcap_static library +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pcap_static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/pcap_static.lib") +endif() + +vcpkg_fixup_pkgconfig() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/share/man") \ No newline at end of file diff --git a/ports/libpcap/vcpkg.json b/ports/libpcap/vcpkg.json new file mode 100644 index 00000000000000..56e2a86ae08d21 --- /dev/null +++ b/ports/libpcap/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libpcap", + "version-semver": "1.10.1", + "description": "A portable C/C++ library for network traffic capture", + "homepage": "https://www.tcpdump.org/", + "supports": "!(uwp | osx)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/libpff/CONTROL b/ports/libpff/CONTROL deleted file mode 100644 index 8520aa188dc7cd..00000000000000 --- a/ports/libpff/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libpff -Version: 2018-07-14-1 -Build-Depends: zlib -Description: Library and tools to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. diff --git a/ports/libpff/portfile.cmake b/ports/libpff/portfile.cmake index 6d327d8a5b0767..5a3e81388e18b3 100644 --- a/ports/libpff/portfile.cmake +++ b/ports/libpff/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) set(LIB_VERSION 20180714) diff --git a/ports/libpff/vcpkg.json b/ports/libpff/vcpkg.json new file mode 100644 index 00000000000000..5480dbdaa84ffa --- /dev/null +++ b/ports/libpff/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "libpff", + "version-string": "2018-07-14", + "port-version": 2, + "description": "Library and tools to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format.", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/libplist/CMakeLists.txt b/ports/libplist/CMakeLists.txt new file mode 100644 index 00000000000000..9feb69746c2266 --- /dev/null +++ b/ports/libplist/CMakeLists.txt @@ -0,0 +1,75 @@ +cmake_minimum_required(VERSION 3.8) +project(plist C CXX) + +file(GLOB_RECURSE PLIST_HEADER include/plist/*.h) + +set(PLIST_SRC + src/base64.c + src/bytearray.c + src/hashtable.c + src/ptrarray.c + src/time64.c + src/xplist.c + src/bplist.c + src/plist.c +) + +set(PLISTPP_SRC + src/Node.cpp + src/Structure.cpp + src/Array.cpp + src/Boolean.cpp + src/Data.cpp + src/Date.cpp + src/Dictionary.cpp + src/Integer.cpp + src/Key.cpp + src/Real.cpp + src/String.cpp + src/Uid.cpp +) + +file(GLOB_RECURSE LIBCNARY_HEADER libcnary/include/*.h) +file(GLOB_RECURSE LIBCNARY_SRC libcnary/*c) + +add_library(plist ${PLIST_SRC} ${PLIST_HEADER} ${LIBCNARY_SRC} ${LIBCNARY_HEADER}) +target_include_directories(plist PRIVATE src include libcnary/include) +set_target_properties(plist PROPERTIES OUTPUT_NAME plist-2.0) + +add_library(plist++ STATIC ${PLISTPP_SRC} ${PLIST_HEADER} ${LIBCNARY_SRC} ${LIBCNARY_HEADER}) +set_target_properties(plist++ PROPERTIES OUTPUT_NAME plist++-2.0) +target_include_directories(plist++ PRIVATE src include libcnary/include) + +if(WIN32 AND BUILD_SHARED_LIBS) + target_compile_options(plist PRIVATE -W3 -WX- -sdl-) + target_compile_definitions(plist PRIVATE -DLIBPLIST_EXPORTS) + target_compile_options(plist++ PRIVATE -W3 -WX- -sdl-) + target_compile_definitions(plist++ PRIVATE -DLIBPLIST_EXPORTS) +endif() +target_link_libraries(plist++ PRIVATE plist) + +install( + TARGETS plist plist++ + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +set(PACKAGE_NAME libplist) +set(PACKAGE_VERSION 2.0) +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix \${prefix}) +set(libdir \${prefix}/lib) +set(includedir \${prefix}/../include) +foreach (PLIST_PKGCONFIG libplist-2.0.pc libplist++-2.0.pc) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/${PLIST_PKGCONFIG}.in + ${CMAKE_CURRENT_BINARY_DIR}/${PLIST_PKGCONFIG} + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLIST_PKGCONFIG} + DESTINATION lib/pkgconfig) +endforeach() + +install(FILES ${PLIST_HEADER} DESTINATION include/plist) diff --git a/ports/libplist/CONTROL b/ports/libplist/CONTROL deleted file mode 100644 index 9189b4f488a16a..00000000000000 --- a/ports/libplist/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libplist -Version: 1.2.77 -Description: A library to handle Apple Property List format in binary or XML diff --git a/ports/libplist/portfile.cmake b/ports/libplist/portfile.cmake index 5b6ce749c91dba..2cad077a6f8e1b 100644 --- a/ports/libplist/portfile.cmake +++ b/ports/libplist/portfile.cmake @@ -1,27 +1,47 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) +vcpkg_check_linkage(ONLY_DYNAMIC_CRT ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libimobiledevice-win32/libplist - REF f279ef534ab5adeb81f063dee5e8a8fc3ca6d3ab - SHA512 52001a46935693e3ac5f0b8c3d13d9bf51c5f34189f6f006bd697d7e965f402460060708c4fb54ed43f49a217ac442fcb8dca252fcbccd3e6a154b6c9a8c2104 + REF bbba7cabb78aad180a7a982ada5e1f21ff0ba873 # v1.3.6 + SHA512 4cd59ed87c647259d0da99a20a05e01aa880f01f6b5cecd29e4247029a3d29f0f68b4552571eb3fd3c5549b4cb357801ffe43338b8ff34d44d6be5393d2e6b9d HEAD_REF msvc-master PATCHES dllexport.patch ) -set(ENV{_CL_} "$ENV{_CL_} /GL-") -set(ENV{_LINK_} "$ENV{_LINK_} /LTCG:OFF") +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) -vcpkg_install_msbuild( +vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH libplist.sln - INCLUDES_SUBPATH include - LICENSE_SUBPATH COPYING.lesser - REMOVE_ROOT_INCLUDES + PREFER_NINJA ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() \ No newline at end of file +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +set(pcfile "libplist-2.0.pc") +set(pcfiletarget "libplist.pc") +set(basepath "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/") +if(EXISTS "${basepath}${pcfile}") + file(CREATE_LINK "${basepath}${pcfile}" "${basepath}${pcfiletarget}" COPY_ON_ERROR) +endif() +set(basepath "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/") +if(EXISTS "${basepath}${pcfile}") + file(CREATE_LINK "${basepath}${pcfile}" "${basepath}${pcfiletarget}" COPY_ON_ERROR) +endif() + +set(pcfile "libplist++-2.0.pc") +set(pcfiletarget "libplist++.pc") +set(basepath "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/") +if(EXISTS "${basepath}${pcfile}") + file(CREATE_LINK "${basepath}${pcfile}" "${basepath}${pcfiletarget}" COPY_ON_ERROR) +endif() +set(basepath "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/") +if(EXISTS "${basepath}${pcfile}") + file(CREATE_LINK "${basepath}${pcfile}" "${basepath}${pcfiletarget}" COPY_ON_ERROR) +endif() diff --git a/ports/libplist/vcpkg.json b/ports/libplist/vcpkg.json new file mode 100644 index 00000000000000..752fd8b26c4072 --- /dev/null +++ b/ports/libplist/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libplist", + "version": "1.3.6", + "port-version": 1, + "description": "A library to handle Apple Property List format in binary or XML", + "homepage": "https://libimobiledevice.org/" +} diff --git a/ports/libpmemobj-cpp/CONTROL b/ports/libpmemobj-cpp/CONTROL deleted file mode 100644 index 1c692e8eb0c0fa..00000000000000 --- a/ports/libpmemobj-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libpmemobj-cpp -Version: 1.7 -#Build-Depends: pmdk -Description: C++ bindings for libpmemobj (https://github.com/pmem/pmdk). \ No newline at end of file diff --git a/ports/libpmemobj-cpp/fixlibpmemobj-cpp.patch b/ports/libpmemobj-cpp/fixlibpmemobj-cpp.patch new file mode 100644 index 00000000000000..a589eae793b419 --- /dev/null +++ b/ports/libpmemobj-cpp/fixlibpmemobj-cpp.patch @@ -0,0 +1,17 @@ +diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt +index bb29b8d..839a77f 100644 +--- a/benchmarks/CMakeLists.txt ++++ b/benchmarks/CMakeLists.txt +@@ -27,6 +27,12 @@ function(add_benchmark name) + prepend(srcs ${CMAKE_CURRENT_SOURCE_DIR} ${srcs}) + add_executable(benchmark-${name} ${srcs}) + target_link_libraries(benchmark-${name} ${LIBPMEMOBJ_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) ++ install( ++ TARGETS benchmark-${name} ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endfunction() + + add_check_whitespace(benchmarks-cmake ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt) diff --git a/ports/libpmemobj-cpp/portfile.cmake b/ports/libpmemobj-cpp/portfile.cmake index d60ee33760c748..ba437d506f2fee 100644 --- a/ports/libpmemobj-cpp/portfile.cmake +++ b/ports/libpmemobj-cpp/portfile.cmake @@ -1,31 +1,35 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pmem/libpmemobj-cpp - REF 1.7 - SHA512 1caea1227baa0f36190a108cbf7150fd7022175a138d81167bb25d4b1c5dba14a5c16c37477f8895b5c4f9fd460c7c43560ceeccc4ad088f94b50de18637173b + REF 9599f724d4edc3a3d973bac14eeebdc1bc31d327 #v1.13.0 + SHA512 ae1f8ed8aecdc35e9e78c957fcd154e43c7bcb5bf5cf3e5b23be3e95d21de754dbbd9b6549bd6c7991fad24492b08421df338c3706ab0157c31ebc88b65fa4fe HEAD_REF master + PATCHES + fixlibpmemobj-cpp.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + benchmark BUILD_BENCHMARKS ) vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") +vcpkg_add_to_path(${PERL_EXE_PATH}) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" DISABLE_PARALLEL_CONFIGURE - OPTIONS + OPTIONS ${FEATURE_OPTIONS} -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF + -DTESTS_USE_VALGRIND=OFF ) -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib) +vcpkg_cmake_install() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/libpmemobj++/cmake) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib/libpmemobj++") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libpmemobj-cpp/vcpkg.json b/ports/libpmemobj-cpp/vcpkg.json new file mode 100644 index 00000000000000..ba0000533ba7bd --- /dev/null +++ b/ports/libpmemobj-cpp/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "libpmemobj-cpp", + "version-semver": "1.13.0", + "description": "C++ bindings for libpmemobj (https://github.com/pmem/pmdk)", + "homepage": "https://github.com/pmem/libpmemobj-cpp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "benchmark": { + "description": "build benchmarks", + "dependencies": [ + "pmdk" + ] + } + } +} diff --git a/ports/libpng-apng/CONTROL b/ports/libpng-apng/CONTROL deleted file mode 100644 index cb199b9fe230f6..00000000000000 --- a/ports/libpng-apng/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libpng-apng -Version: 1.6.37 -Build-Depends: zlib -Homepage: https://github.com/glennrp/libpng -Description: libpng-apng is a library implementing an interface for reading and writing (A)PNG ((Animated) Portable Network Graphics) format files. This is backward compatible with the regular libpng, both in library usage and format. diff --git a/ports/libpng-apng/portfile.cmake b/ports/libpng-apng/portfile.cmake deleted file mode 100644 index 948b0a2f396027..00000000000000 --- a/ports/libpng-apng/portfile.cmake +++ /dev/null @@ -1,88 +0,0 @@ -include(vcpkg_common_functions) - -set(LIBPNG_APNG_VERSION 1.6.36) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO glennrp/libpng - REF v${LIBPNG_APNG_VERSION} - SHA512 aeb00b48347c9e84d31995b3fe7e40580029734aa8103d774eee5745f5ca1fd1fd91a15f32d492277ab94346e4e7f731ee9bfea1783f930094f9f87eb3d9397d - HEAD_REF master -) - -vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE - URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${LIBPNG_APNG_VERSION}/libpng-${LIBPNG_APNG_VERSION}-apng.patch.gz" - FILENAME "libpng-${LIBPNG_APNG_VERSION}-apng.patch.gz" - SHA512 8fa213204768b058459ffd5eae6b3661c3f185d3baf1913da4337e7b7855e567f2525e7f67411c32fa8cb177a5f93d538c3d0ce17a94d4aa71bd9cffabe8b311 -) - -vcpkg_find_acquire_program(7Z) - -vcpkg_execute_required_process( - COMMAND ${7Z} x ${LIBPNG_APNG_PATCH_ARCHIVE} -aoa - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src - LOGNAME extract-patch.log -) - -find_program(GIT NAMES git git.cmd) - -# sed and awk are installed with git but in a different directory -get_filename_component(GIT_EXE_PATH ${GIT} DIRECTORY) -set(AWK_EXE_PATH "${GIT_EXE_PATH}/../usr/bin") -set(ENV{PATH} "$ENV{PATH};${AWK_EXE_PATH}") - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch - ${CMAKE_CURRENT_LIST_DIR}/skip-install-symlink.patch - ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_APNG_VERSION}-apng.patch -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(PNG_STATIC_LIBS OFF) - set(PNG_SHARED_LIBS ON) -else() - set(PNG_STATIC_LIBS ON) - set(PNG_SHARED_LIBS OFF) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DPNG_STATIC=${PNG_STATIC_LIBS} - -DPNG_SHARED=${PNG_SHARED_LIBS} - -DPNG_TESTS=OFF - -DPNG_PREFIX=a - -DSKIP_INSTALL_PROGRAMS=ON - -DSKIP_INSTALL_EXECUTABLES=ON - -DSKIP_INSTALL_FILES=ON - -DSKIP_INSTALL_SYMLINK=ON - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON -) - -vcpkg_install_cmake() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) - endif() - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) - endif() -endif() - -# Remove CMake config files as they are incorrectly generated and everyone uses built-in FindPNG anyway. -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libpng ${CURRENT_PACKAGES_DIR}/debug/lib/libpng) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpng-apng) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng-apng/LICENSE ${CURRENT_PACKAGES_DIR}/share/libpng-apng/copyright) - -vcpkg_copy_pdbs() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) - -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/png) -endif() diff --git a/ports/libpng-apng/skip-install-symlink.patch b/ports/libpng-apng/skip-install-symlink.patch deleted file mode 100644 index c250759416ed1f..00000000000000 --- a/ports/libpng-apng/skip-install-symlink.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 48c6fa2..589e5f9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -853,7 +853,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -- if(PNG_SHARED) -+ if(PNG_SHARED AND NOT SKIP_INSTALL_SYMLINK) - # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin - if(CYGWIN OR MINGW) - create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png) -@@ -868,7 +868,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) - endif() - endif() - -- if(PNG_STATIC) -+ if(PNG_STATIC AND NOT SKIP_INSTALL_SYMLINK) - if(NOT WIN32 OR CYGWIN OR MINGW) - create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static) - install(FILES $/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} diff --git a/ports/libpng-apng/usage b/ports/libpng-apng/usage deleted file mode 100644 index d9c29973822dbd..00000000000000 --- a/ports/libpng-apng/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package libpng-apng is compatible with built-in CMake targets: - - find_package(PNG REQUIRED) - target_link_libraries(main PRIVATE PNG::PNG) diff --git a/ports/libpng-apng/use-abort-on-all-platforms.patch b/ports/libpng-apng/use-abort-on-all-platforms.patch deleted file mode 100644 index ef21211c6a7bc4..00000000000000 --- a/ports/libpng-apng/use-abort-on-all-platforms.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/pngpriv.h b/pngpriv.h -index fe3355d..5a049b5 100644 ---- a/pngpriv.h -+++ b/pngpriv.h -@@ -556,11 +556,7 @@ - - /* Memory model/platform independent fns */ - #ifndef PNG_ABORT --# ifdef _WINDOWS_ --# define PNG_ABORT() ExitProcess(0) --# else --# define PNG_ABORT() abort() --# endif -+# define PNG_ABORT() abort() - #endif - - /* These macros may need to be architecture dependent. */ diff --git a/ports/libpng-apng/vcpkg-cmake-wrapper.cmake b/ports/libpng-apng/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index cb9c74f3240457..00000000000000 --- a/ports/libpng-apng/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,6 +0,0 @@ -if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a") - set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a" CACHE FILEPATH "") -elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}") - set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE FILEPATH "") -endif() -_find_package(${ARGS}) diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL deleted file mode 100644 index f813439d8b50e5..00000000000000 --- a/ports/libpng/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libpng -Version: 1.6.37-2 -Build-Depends: zlib -Homepage: https://github.com/glennrp/libpng -Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. diff --git a/ports/libpng/cmake.patch b/ports/libpng/cmake.patch new file mode 100644 index 00000000000000..f2eb6aa8e10117 --- /dev/null +++ b/ports/libpng/cmake.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6451fcf..6599e1d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ if(NOT PNG_BUILD_ZLIB) + endif() + + if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU) +- find_library(M_LIBRARY m) ++ set(M_LIBRARY m) + else() + # libm is not needed and/or not available + set(M_LIBRARY "") +@@ -551,21 +551,14 @@ endif() + + if(PNG_STATIC) + # does not work without changing name +- set(PNG_LIB_NAME_STATIC png_static) + add_library(png_static STATIC ${libpng_sources}) + add_dependencies(png_static genfiles) + # MSVC doesn't use a different file extension for shared vs. static + # libs. We are able to change OUTPUT_NAME to remove the _static + # for all other platforms. +- if(NOT MSVC) +- set_target_properties(png_static PROPERTIES +- OUTPUT_NAME "${PNG_LIB_NAME}" +- CLEAN_DIRECT_OUTPUT 1) +- else() +- set_target_properties(png_static PROPERTIES +- OUTPUT_NAME "${PNG_LIB_NAME}_static" +- CLEAN_DIRECT_OUTPUT 1) +- endif() ++ set_target_properties(png_static PROPERTIES ++ OUTPUT_NAME "${PNG_LIB_NAME}" ++ CLEAN_DIRECT_OUTPUT 1) + list(APPEND PNG_LIB_TARGETS png_static) + if(MSVC) + # msvc does not append 'lib' - do it here to have consistent name +@@ -915,7 +908,7 @@ endif() + + # Create an export file that CMake users can include() to import our targets. + if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL) +- install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) ++ install(EXPORT libpng DESTINATION lib/libpng FILE libpngConfig.cmake) + endif() + + # what's with libpng-manual.txt and all the extra files? diff --git a/ports/libpng/fix-export-targets.patch b/ports/libpng/fix-export-targets.patch new file mode 100644 index 00000000000000..ec331c48da58ad --- /dev/null +++ b/ports/libpng/fix-export-targets.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b45e878..19f8692 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -536,7 +536,7 @@ if(PNG_SHARED) + set_target_properties(png PROPERTIES PREFIX "lib") + set_target_properties(png PROPERTIES IMPORT_PREFIX "lib") + endif() +- target_link_libraries(png ${ZLIB_LIBRARY} ${M_LIBRARY}) ++ target_link_libraries(png ZLIB::ZLIB ${M_LIBRARY}) + + if(UNIX AND AWK) + if(HAVE_LD_VERSION_SCRIPT) +@@ -564,7 +564,7 @@ if(PNG_STATIC) + # msvc does not append 'lib' - do it here to have consistent name + set_target_properties(png_static PROPERTIES PREFIX "lib") + endif() +- target_link_libraries(png_static ${ZLIB_LIBRARY} ${M_LIBRARY}) ++ target_link_libraries(png_static ZLIB::ZLIB ${M_LIBRARY}) + endif() + + if(PNG_FRAMEWORK) +@@ -581,7 +581,7 @@ if(PNG_FRAMEWORK) + XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" + PUBLIC_HEADER "${libpng_public_hdrs}" + OUTPUT_NAME png) +- target_link_libraries(png_framework ${ZLIB_LIBRARY} ${M_LIBRARY}) ++ target_link_libraries(png_framework ZLIB::ZLIB ${M_LIBRARY}) + endif() + + if(NOT PNG_LIB_TARGETS) +@@ -746,7 +746,7 @@ if(PNG_SHARED) + set(PNG_BIN_TARGETS pngfix) + + add_executable(png-fix-itxt ${png_fix_itxt_sources}) +- target_link_libraries(png-fix-itxt ${ZLIB_LIBRARY} ${M_LIBRARY}) ++ target_link_libraries(png-fix-itxt ZLIB::ZLIB ${M_LIBRARY}) + list(APPEND PNG_BIN_TARGETS png-fix-itxt) + endif() + +@@ -851,7 +851,7 @@ endif() + # INSTALL + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) + install(TARGETS ${PNG_LIB_TARGETS} +- EXPORT libpng ++ EXPORT libpng-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -919,7 +919,14 @@ endif() + + # Create an export file that CMake users can include() to import our targets. + if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL) +- install(EXPORT libpng DESTINATION lib/libpng FILE libpngConfig.cmake) ++ install(EXPORT libpng-targets DESTINATION lib/libpng) ++ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake" ++ [[include(CMakeFindDependencyMacro) ++find_dependency(ZLIB) ++include("${CMAKE_CURRENT_LIST_DIR}/libpng-targets.cmake") ++ ]]) ++ ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/libpng) + endif() + + # what's with libpng-manual.txt and all the extra files? diff --git a/ports/libpng/macos-arch-fix.patch b/ports/libpng/macos-arch-fix.patch new file mode 100644 index 00000000000000..5dd637695d2acb --- /dev/null +++ b/ports/libpng/macos-arch-fix.patch @@ -0,0 +1,62 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6451fcf1b..dbd5016ca 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -63,11 +63,22 @@ option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" ON) + set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names") + set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings") + ++# CMake currently sets CMAKE_SYSTEM_PROCESSOR to one of x86_64 or arm64 on macOS, ++# based upon the OS architecture, not the target architecture. As such, we need ++# to check CMAKE_OSX_ARCHITECTURES to identify which hardware-specific flags to ++# enable. Note that this will fail if you attempt to build a universal binary in ++# a single cmake invokation. ++if (APPLE AND CMAKE_OSX_ARCHITECTURES) ++ set(TARGET_ARCH ${CMAKE_OSX_ARCHITECTURES}) ++else() ++ set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}) ++endif() ++ + if(PNG_HARDWARE_OPTIMIZATIONS) + + # set definitions and sources for arm +-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR +- CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") ++if(TARGET_ARCH MATCHES "^arm" OR ++ TARGET_ARCH MATCHES "^aarch64") + set(PNG_ARM_NEON_POSSIBLE_VALUES check on off) + set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations: + check: (default) use internal checking code; +@@ -121,8 +132,8 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR + endif() + + # set definitions and sources for intel +-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR +- CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*") ++if(TARGET_ARCH MATCHES "^i?86" OR ++ TARGET_ARCH MATCHES "^x86_64*") + set(PNG_INTEL_SSE_POSSIBLE_VALUES on off) + set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations: + off: disable the optimizations") +@@ -171,8 +182,8 @@ endif() + else(PNG_HARDWARE_OPTIMIZATIONS) + + # set definitions and sources for arm +-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR +- CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") ++if(TARGET_ARCH MATCHES "^arm" OR ++ TARGET_ARCH MATCHES "^aarch64") + add_definitions(-DPNG_ARM_NEON_OPT=0) + endif() + +@@ -183,8 +194,8 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR + endif() + + # set definitions and sources for intel +-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR +- CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*") ++if(TARGET_ARCH MATCHES "^i?86" OR ++ TARGET_ARCH MATCHES "^x86_64") + add_definitions(-DPNG_INTEL_SSE_OPT=0) + endif() + diff --git a/ports/libpng/pkgconfig.2.patch b/ports/libpng/pkgconfig.2.patch new file mode 100644 index 00000000000000..99c1b19300d950 --- /dev/null +++ b/ports/libpng/pkgconfig.2.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6451fcf..4090f42 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -821,20 +821,31 @@ endif() + # Only do this on Windows for Cygwin - the files don't make much sense outside + # of a UNIX look-alike. + if(NOT WIN32 OR CYGWIN OR MINGW) +- set(prefix ${CMAKE_INSTALL_PREFIX}) +- set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +- set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) +- set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) +- set(LIBS "-lz -lm") +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in +- ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) +- create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc) +- +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in +- ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) +- create_symlink(libpng-config FILE ${PNGLIB_NAME}-config) ++ set(LIBS "-lz") ++ if(NOT APPLE) ++ string(APPEND LIBS " -lm") ++ endif() ++else() ++ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(LIBS "-lzlibd") ++ else() ++ set(LIBS "-lzlib") ++ endif() + endif() + ++set(prefix ${CMAKE_INSTALL_PREFIX}) ++set(exec_prefix ${CMAKE_INSTALL_PREFIX}) ++set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) ++set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) ++ ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in ++ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) ++create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc) ++ ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in ++ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) ++create_symlink(libpng-config FILE ${PNGLIB_NAME}-config) ++ + # SET UP LINKS + if(PNG_SHARED) + set_target_properties(png PROPERTIES diff --git a/ports/libpng/pkgconfig.patch b/ports/libpng/pkgconfig.patch new file mode 100644 index 00000000000000..5640f3834ca44c --- /dev/null +++ b/ports/libpng/pkgconfig.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6599e1d7d..c0bb2fad2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -894,13 +894,13 @@ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL) + install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3) + install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5) + # Install pkg-config files ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config +- DESTINATION bin) ++ DESTINATION tools/libpng) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config +- DESTINATION bin) ++ DESTINATION tools/libpng) + endif() diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index 7262d34c72bb35..7b50b1086f0eac 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -1,13 +1,49 @@ -include(vcpkg_common_functions) +set(LIBPNG_VER 1.6.37) + +# Download the apng patch +set(LIBPNG_APNG_OPTION ) +if ("apng" IN_LIST FEATURES) + # Get (g)awk installed + vcpkg_acquire_msys(MSYS_ROOT PACKAGES gawk) + set(AWK_EXE_PATH "${MSYS_ROOT}/usr/bin") + vcpkg_add_to_path("${AWK_EXE_PATH}") + + set(LIBPNG_APG_PATCH_NAME libpng-${LIBPNG_VER}-apng.patch) + set(LIBPNG_APG_PATCH_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIBPNG_APG_PATCH_NAME}) + if (NOT EXISTS ${LIBPNG_APG_PATCH_PATH}) + if (NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src) + endif() + vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE + URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${LIBPNG_VER}/${LIBPNG_APG_PATCH_NAME}.gz" + FILENAME "${LIBPNG_APG_PATCH_NAME}.gz" + SHA512 226adcb3a8c60f2267fe2976ab531329ae43c2603dab4d0cf8f16217d64069936b879f3d6516b75d259c47d6f5c5b1f24f887602206c8e46abde0fb7f5c7946b + ) + vcpkg_find_acquire_program(7Z) + vcpkg_execute_required_process( + COMMAND ${7Z} x ${LIBPNG_APNG_PATCH_ARCHIVE} -aoa + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src + LOGNAME extract-patch.log + ) + endif() + set(APNG_EXTRA_PATCH ${LIBPNG_APG_PATCH_PATH}) + set(LIBPNG_APNG_OPTION "-DPNG_PREFIX=a") +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO glennrp/libpng - REF v1.6.37 + REF v${LIBPNG_VER} SHA512 ccb3705c23b2724e86d072e2ac8cfc380f41fadfd6977a248d588a8ad57b6abe0e4155e525243011f245e98d9b7afbe2e8cc7fd4ff7d82fcefb40c0f48f88918 HEAD_REF master PATCHES - use-abort-on-all-platforms.patch + use_abort.patch + cmake.patch + pkgconfig.patch + pkgconfig.2.patch + ${APNG_EXTRA_PATCH} + fix-export-targets.patch + macos-arch-fix.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -18,40 +54,91 @@ else() set(PNG_SHARED_LIBS OFF) endif() -vcpkg_configure_cmake( +set(LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION ) +if(VCPKG_TARGET_IS_IOS) + list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_HARDWARE_OPTIMIZATIONS=OFF") +endif() + +set(LD_VERSION_SCRIPT_OPTION ) +if(VCPKG_TARGET_IS_ANDROID) + set(LD_VERSION_SCRIPT_OPTION "-Dld-version-script=OFF") + # for armeabi-v7a, check whether NEON is available + list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=check") +else() + list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=on") +endif() + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS + -DPNG_MAN_DIR=share/${PORT}/man + ${LIBPNG_APNG_OPTION} + ${LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION} + ${LD_VERSION_SCRIPT_OPTION} -DPNG_STATIC=${PNG_STATIC_LIBS} -DPNG_SHARED=${PNG_SHARED_LIBS} -DPNG_TESTS=OFF -DSKIP_INSTALL_PROGRAMS=ON -DSKIP_INSTALL_EXECUTABLES=ON - -DSKIP_INSTALL_FILES=ON - -DSKIP_INSTALL_SYMLINK=ON + -DSKIP_INSTALL_FILES=OFF OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) +vcpkg_cmake_install() -vcpkg_install_cmake() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/libpng) +set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng16.pc") +if(EXISTS ${_file}) + file(READ "${_file}" _contents) + if(VCPKG_TARGET_IS_WINDOWS) + string(REGEX REPLACE "-lpng16(d)?" "-llibpng16d" _contents "${_contents}") + else() + string(REGEX REPLACE "-lpng16(d)?" "-lpng16d" _contents "${_contents}") endif() - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) + if(VCPKG_TARGET_IS_MINGW) + string(REPLACE "-lz" "-lzlibd" _contents "${_contents}") + else() + string(REPLACE "-lzlib" "-lzlibd" _contents "${_contents}") endif() + file(WRITE "${_file}" "${_contents}") endif() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/libpng) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share/) - -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpng) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng/LICENSE ${CURRENT_PACKAGES_DIR}/share/libpng/copyright) +set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng.pc") +if(EXISTS ${_file}) + file(READ "${_file}" _contents) + if(VCPKG_TARGET_IS_WINDOWS) + string(REGEX REPLACE "-lpng16(d)?" "-llibpng16d" _contents "${_contents}") + else() + string(REGEX REPLACE "-lpng16(d)?" "-lpng16d" _contents "${_contents}") + endif() + if(VCPKG_TARGET_IS_MINGW) + string(REPLACE "-lz" "-lzlibd" _contents "${_contents}") + else() + string(REPLACE "-lzlib" "-lzlibd" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") +endif() +if(VCPKG_TARGET_IS_WINDOWS) + set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpng16.pc") + if(EXISTS ${_file}) + file(READ "${_file}" _contents) + string(REPLACE "-lpng16" "-llibpng16" _contents "${_contents}") + if(VCPKG_TARGET_IS_MINGW) + string(REPLACE "-lz" "-lzlib" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + endif() + set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpng.pc") + if(EXISTS ${_file}) + file(READ "${_file}" _contents) + string(REPLACE "-lpng16" "-llibpng16" _contents "${_contents}") + if(VCPKG_TARGET_IS_MINGW) + string(REPLACE "-lz" "-lzlib" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + endif() +endif() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) vcpkg_copy_pdbs() - -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/png) -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libpng/use-abort-on-all-platforms.patch b/ports/libpng/use-abort-on-all-platforms.patch deleted file mode 100644 index 0a629e05924294..00000000000000 --- a/ports/libpng/use-abort-on-all-platforms.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/pngpriv.h b/pngpriv.h -index fe3355d..5a049b5 100644 ---- a/pngpriv.h -+++ b/pngpriv.h -@@ -457,11 +457,7 @@ - - /* Memory model/platform independent fns */ - #ifndef PNG_ABORT --# ifdef _WINDOWS_ --# define PNG_ABORT() ExitProcess(0) --# else --# define PNG_ABORT() abort() --# endif -+# define PNG_ABORT() abort() - #endif - - /* These macros may need to be architecture dependent. */ diff --git a/ports/libpng/use_abort.patch b/ports/libpng/use_abort.patch new file mode 100644 index 00000000000000..c52df5c2b7814d --- /dev/null +++ b/ports/libpng/use_abort.patch @@ -0,0 +1,17 @@ +diff --git a/pngpriv.h b/pngpriv.h +index 583c26f..135651c 100644 +--- a/pngpriv.h ++++ b/pngpriv.h +@@ -556,11 +556,7 @@ + + /* Memory model/platform independent fns */ + #ifndef PNG_ABORT +-# ifdef _WINDOWS_ +-# define PNG_ABORT() ExitProcess(0) +-# else +-# define PNG_ABORT() abort() +-# endif ++# define PNG_ABORT() abort() + #endif + + /* These macros may need to be architecture dependent. */ diff --git a/ports/libpng/vcpkg-cmake-wrapper.cmake b/ports/libpng/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index cb9c74f3240457..00000000000000 --- a/ports/libpng/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,6 +0,0 @@ -if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a") - set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a" CACHE FILEPATH "") -elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}") - set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE FILEPATH "") -endif() -_find_package(${ARGS}) diff --git a/ports/libpng/vcpkg.json b/ports/libpng/vcpkg.json new file mode 100644 index 00000000000000..78b76fb776417f --- /dev/null +++ b/ports/libpng/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "libpng", + "version": "1.6.37", + "port-version": 15, + "description": "libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files", + "homepage": "https://github.com/glennrp/libpng", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "apng": { + "description": "This is backward compatible with the regular libpng, both in library usage and format" + } + } +} diff --git a/ports/libpopt/patches/0004-vcpkg-fixmsvc.patch b/ports/libpopt/0004-vcpkg-fixmsvc.patch similarity index 100% rename from ports/libpopt/patches/0004-vcpkg-fixmsvc.patch rename to ports/libpopt/0004-vcpkg-fixmsvc.patch diff --git a/ports/libpopt/CMakeLists.txt b/ports/libpopt/CMakeLists.txt new file mode 100644 index 00000000000000..5348757b4784e1 --- /dev/null +++ b/ports/libpopt/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required(VERSION 3.0) +project(popt VERSION 1.16 LANGUAGES C) + +set(PACKAGE "popt") +set(POPT_SYSCONFDIR "C:\\\\") +set(CMAKE_DEBUG_POSTFIX "d") + +file(GLOB SOURCES "popt.c" + "poptconfig.c" + "popthelp.c" + "poptint.c" + "poptparse.c" + "popt.def" +) + +option(POPT_USE_CONFIG "Use configuration file" OFF) + +if(POPT_USE_CONFIG) + include(CheckIncludeFile) + include(CheckFunctionExists) + + check_include_file(float.h HAVE_FLOAT_H) + check_include_file(fnmatch.h HAVE_FNMATCH_H) + check_include_file(glob.h HAVE_GLOB_H) + check_include_file(langinfo.h HAVE_LANGINFO_H) + check_include_file(libintl.h HAVE_LIBINTL_H) + check_include_file(mcheck.h HAVE_MCHECK_H) + check_include_file(unistd.h HAVE_UNISTD_H) + + + check_function_exists(gettext HAVE_GETTEXT) + check_function_exists(iconv HAVE_ICONV) + check_function_exists(mtrace HAVE_MTRACE) + check_function_exists(srandom HAVE_SRANDOM) + check_function_exists(stpcpy HAVE_STPCPY) + check_function_exists(strerror HAVE_STRERROR) + check_function_exists(vasprintf HAVE_VASPRINTF) + check_function_exists(__secure_getenv HAVE___SECURE_GETENV) + + configure_file(config.h.cmake config.h @ONLY) + add_definitions(-DHAVE_CONFIG_H) +endif() + +add_definitions(-D_CRT_SECURE_NO_WARNINGS) + +include_directories(${CMAKE_BINARY_DIR}) + +add_library(popt ${SOURCES}) +if (MSVC) + target_compile_options(popt PRIVATE /wd4996) +endif() + +install(TARGETS popt + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES "popt.h" DESTINATION "include") \ No newline at end of file diff --git a/ports/libpopt/CONTROL b/ports/libpopt/CONTROL deleted file mode 100644 index 5ba1451b6261bd..00000000000000 --- a/ports/libpopt/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libpopt -Version: 1.16-10~vcpkg1-1 -Description: Library for parsing command line parameters diff --git a/ports/libpopt/cmake/CMakeLists.txt b/ports/libpopt/cmake/CMakeLists.txt deleted file mode 100644 index 84afc160d35e97..00000000000000 --- a/ports/libpopt/cmake/CMakeLists.txt +++ /dev/null @@ -1,57 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(popt VERSION 1.16 LANGUAGES C) - -set(PACKAGE "popt") -set(POPT_SYSCONFDIR "C:\\\\") -set(CMAKE_DEBUG_POSTFIX "d") - -file(GLOB SOURCES "popt.c" - "poptconfig.c" - "popthelp.c" - "poptint.c" - "poptparse.c" - "popt.def" -) - -option(POPT_USE_CONFIG "Use configuration file" OFF) - -if(POPT_USE_CONFIG) - include(CheckIncludeFile) - include(CheckFunctionExists) - - check_include_file(float.h HAVE_FLOAT_H) - check_include_file(fnmatch.h HAVE_FNMATCH_H) - check_include_file(glob.h HAVE_GLOB_H) - check_include_file(langinfo.h HAVE_LANGINFO_H) - check_include_file(libintl.h HAVE_LIBINTL_H) - check_include_file(mcheck.h HAVE_MCHECK_H) - check_include_file(unistd.h HAVE_UNISTD_H) - - - check_function_exists(gettext HAVE_GETTEXT) - check_function_exists(iconv HAVE_ICONV) - check_function_exists(mtrace HAVE_MTRACE) - check_function_exists(srandom HAVE_SRANDOM) - check_function_exists(stpcpy HAVE_STPCPY) - check_function_exists(strerror HAVE_STRERROR) - check_function_exists(vasprintf HAVE_VASPRINTF) - check_function_exists(__secure_getenv HAVE___SECURE_GETENV) - - configure_file(config.h.cmake config.h @ONLY) - add_definitions(-DHAVE_CONFIG_H) -endif() - -add_definitions(-D_CRT_SECURE_NO_WARNINGS) - -include_directories(${CMAKE_BINARY_DIR}) - -add_library(popt ${SOURCES}) -set_target_properties(popt PROPERTIES COMPILE_FLAGS "/wd4996") - -install(TARGETS popt - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -install(FILES "popt.h" DESTINATION "include") \ No newline at end of file diff --git a/ports/libpopt/cmake/config.h.cmake b/ports/libpopt/config.h.cmake similarity index 100% rename from ports/libpopt/cmake/config.h.cmake rename to ports/libpopt/config.h.cmake diff --git a/ports/libpopt/cmake/popt.def b/ports/libpopt/popt.def similarity index 100% rename from ports/libpopt/cmake/popt.def rename to ports/libpopt/popt.def diff --git a/ports/libpopt/portfile.cmake b/ports/libpopt/portfile.cmake index ba50135d64c0dc..a4ead066cc0ee0 100644 --- a/ports/libpopt/portfile.cmake +++ b/ports/libpopt/portfile.cmake @@ -1,26 +1,23 @@ -include(vcpkg_common_functions) - set(LIBPOPT_VERSION 1.16) set(LIBPOPT_HASH bae2dd4e5d682ef023fdc77ae60c4aad01a3a576d45af9d78d22490c11e410e60edda37ede171920746d4ae0d5de3c060d15cecfd41ba75b727a811be828d694) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/popt-${LIBPOPT_VERSION}) vcpkg_download_distfile(ARCHIVE URLS - "http://rpm5.org/files/popt/popt-${LIBPOPT_VERSION}.tar.gz" "https://ftp.openbsd.org/pub/OpenBSD/distfiles/popt-${LIBPOPT_VERSION}.tar.gz" FILENAME "popt-${LIBPOPT_VERSION}.tar.gz" SHA512 ${LIBPOPT_HASH} ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/patches/0004-vcpkg-fixmsvc.patch" +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0004-vcpkg-fixmsvc.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/config.h.cmake DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/popt.def DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/popt.def DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -33,5 +30,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpopt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpopt/COPYING ${CURRENT_PACKAGES_DIR}/share/libpopt/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libpopt/vcpkg.json b/ports/libpopt/vcpkg.json new file mode 100644 index 00000000000000..cbb2f825410434 --- /dev/null +++ b/ports/libpopt/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libpopt", + "version-string": "1.16", + "port-version": 14, + "description": "Library for parsing command line parameters" +} diff --git a/ports/libpq/CMakeLists.txt b/ports/libpq/CMakeLists.txt deleted file mode 100644 index 3d5d6e5087a382..00000000000000 --- a/ports/libpq/CMakeLists.txt +++ /dev/null @@ -1,159 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(libpq VERSION 9.6.1 LANGUAGES C) - -if(NOT CMAKE_SYSTEM_PROCESSOR) - set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR}) -endif() - -find_package(OpenSSL REQUIRED) -find_program(PERL NAMES perl) - -set(CMAKE_STATIC_LIBRARY_PREFIX) -set(CMAKE_SHARED_LIBRARY_PREFIX) -set(CMAKE_DEBUG_POSTFIX "d") - -file(REMOVE - ${CMAKE_CURRENT_SOURCE_DIR}/src/include/pg_config.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/include/pg_config_ext.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/include/pg_config_os.h -) - -if(WIN32) - configure_file(src/include/pg_config.h.win32 include/pg_config.h) - configure_file(src/include/pg_config_ext.h.win32 include/pg_config_ext.h) - configure_file(src/include/port/win32.h include/pg_config_os.h) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h" "#include \n#define PG_INT64_TYPE int64_t") - configure_file("${PORT_DIR}/pg_config.darwin.h" include/pg_config.h COPYONLY) - configure_file(src/include/port/darwin.h include/pg_config_os.h COPYONLY) - configure_file(src/backend/port/dynloader/darwin.h include/dynloader.h COPYONLY) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h" "#include \n#define PG_INT64_TYPE int64_t") - configure_file(src/include/port/linux.h include/pg_config_os.h COPYONLY) - configure_file("${PORT_DIR}/pg_config.linux.h" include/pg_config.h COPYONLY) - configure_file(src/backend/port/dynloader/linux.h include/dynloader.h COPYONLY) -else() - message(FATAL_ERROR "Unknown system: ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") -endif() -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_paths.h "#define SYSCONFDIR \"\"") - -set(INSTALL_INCLUDES ON CACHE BOOL "Install include files") - -set(pg_port_src - src/port/pgstrcasecmp.c - src/port/pqsignal.c - src/port/thread.c - src/port/crypt.c - src/port/noblock.c - src/port/chklocale.c - src/port/snprintf.c - src/port/dirmod.c - src/port/pgsleep.c - src/port/open.c - src/port/system.c -) -if(WIN32) - list(APPEND pg_port_src - src/port/dirent.c - src/port/inet_aton.c - src/port/inet_net_ntop.c - src/port/win32error.c - src/port/win32setlocale.c - src/port/getaddrinfo.c - src/port/strlcpy.c - ) - include_directories(src/include/port/win32 src/include/port/win32_msvc) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - list(APPEND pg_port_src - src/port/strlcpy.c - src/port/inet_aton.c - src/port/inet_net_ntop.c - src/port/getpeereid.c - ) -endif() - -set(pg_backend_src - src/backend/libpq/md5.c - src/backend/libpq/ip.c - src/backend/utils/mb/wchar.c - src/backend/utils/mb/encnames.c -) -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - list(APPEND pg_backend_src - src/backend/port/dynloader/linux.c - src/backend/port/sysv_sema.c - src/backend/port/sysv_shmem.c - ) -endif() -if(NOT WIN32) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/utils/errcodes.h - COMMAND "${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/utils/generate-errcodes.pl" "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/utils/errcodes.txt" > "${CMAKE_CURRENT_BINARY_DIR}/include/utils/errcodes.h" - VERBATIM - ) - list(APPEND pg_backend_src - ${CMAKE_CURRENT_BINARY_DIR}/include/utils/errcodes.h - ) -endif() - -set(pg_libpq_src - src/interfaces/libpq/fe-auth.c - src/interfaces/libpq/fe-connect.c - src/interfaces/libpq/fe-exec.c - src/interfaces/libpq/fe-lobj.c - src/interfaces/libpq/fe-misc.c - src/interfaces/libpq/fe-print.c - src/interfaces/libpq/fe-protocol2.c - src/interfaces/libpq/fe-protocol3.c - src/interfaces/libpq/fe-secure-openssl.c - src/interfaces/libpq/fe-secure.c - src/interfaces/libpq/libpq-events.c - src/interfaces/libpq/pqexpbuffer.c - src/interfaces/libpq/libpq-dist.rc -) - -if(WIN32) - list(APPEND pg_libpq_src - src/interfaces/libpq/pthread-win32.c - src/interfaces/libpq/win32.c - ) -endif() -set(pg_libpq_interface - src/include/postgres_ext.h - ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h - ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config.h - src/interfaces/libpq/libpq-fe.h - src/interfaces/libpq/libpq-events.h -) -set(pg_libpq_catalog_interface - src/include/catalog/pg_type.h - src/include/catalog/genbki.h -) -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_DEBUG_POSTFIX "d") -set(CMAKE_INCLUDE_CURRENT_DIR ON) -add_library(libpq ${pg_port_src} ${pg_backend_src} ${pg_libpq_src}) - -target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -D_CRT_SECURE_NO_WARNINGS) -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - target_compile_definitions(libpq PRIVATE -D_GNU_SOURCE) -endif() - -target_link_libraries(libpq PRIVATE OpenSSL::SSL) -if(WIN32) - target_link_libraries(libpq PRIVATE ws2_32 secur32 advapi32 shell32 crypt32) -endif() -target_include_directories(libpq PRIVATE src/include src/port ${CMAKE_CURRENT_BINARY_DIR}/include) -set_target_properties(libpq PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) - -install(TARGETS libpq - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin -) - -if(INSTALL_INCLUDES) - install(FILES ${pg_libpq_interface} DESTINATION include) - install(DIRECTORY src/include/libpq DESTINATION include) - install(FILES ${pg_libpq_catalog_interface} DESTINATION include/catalog) -endif() diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL deleted file mode 100644 index f6c0ce34ea631c..00000000000000 --- a/ports/libpq/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libpq -Version: 9.6.1-7 -Homepage: https://www.postgresql.org/ -Description: The official database access API of postgresql -Build-Depends: openssl, zlib (linux) diff --git a/ports/libpq/Makefile b/ports/libpq/Makefile new file mode 100644 index 00000000000000..ee2ffcaf19572b --- /dev/null +++ b/ports/libpq/Makefile @@ -0,0 +1,37 @@ +subdir = . +top_builddir = . +include src/Makefile.global + +.NOTPARALLEL: + +ifeq ($(LIBPQ_LIBRARY_TYPE), static) +LIBPQ_INSTALL_LIBS = install-stlib +endif + +ifeq ($(LIBPQ_LIBRARY_TYPE), shared) +ifeq ($(USING_MINGW), yes) +# The import library name is the same as the static library name +EXTRA_TARGET = install-lib-static +endif +endif + +.PHONY: all +all: + $(MAKE) -C src/include MAKELEVEL=0 + $(MAKE) -C src/common MAKELEVEL=0 + $(MAKE) -C src/port MAKELEVEL=0 + $(MAKE) -C src/interfaces/libpq MAKELEVEL=0 all-$(LIBPQ_LIBRARY_TYPE)-lib + $(MAKE) -C src/bin/pg_config MAKELEVEL=0 + +.PHONY: install-stlib +install-stlib: + $(MAKE) -C src/common MAKELEVEL=0 install -o all + rm -f '$(DESTDIR)$(libdir)/libpgcommon_shlib.a' + $(MAKE) -C src/port MAKELEVEL=0 install -o all + rm -f '$(DESTDIR)$(libdir)/libpgport_shlib.a' + +.PHONY: install +install: $(LIBPQ_INSTALL_LIBS) + $(MAKE) -C src/include MAKELEVEL=0 install + $(MAKE) -C src/interfaces/libpq MAKELEVEL=0 $(EXTRA_TARGET) install-lib-$(LIBPQ_LIBRARY_TYPE) install-lib-pc install -o all -o install-lib + $(MAKE) -C src/bin/pg_config MAKELEVEL=0 install diff --git a/ports/libpq/config.pl b/ports/libpq/config.pl new file mode 100644 index 00000000000000..cbe605ef03ac7b --- /dev/null +++ b/ports/libpq/config.pl @@ -0,0 +1,27 @@ +our $config = { + asserts => 0, # --enable-cassert + # float4byval=>1, # --disable-float4-byval, on by default + + # float8byval=> $platformbits == 64, # --disable-float8-byval, + # off by default on 32 bit platforms, on by default on 64 bit platforms + + # blocksize => 8, # --with-blocksize, 8kB by default + # wal_blocksize => 8, # --with-wal-blocksize, 8kB by default + ldap => undef, # --with-ldap + extraver => undef, # --with-extra-version= + gss => undef, # --with-gssapi= + icu => undef, # --with-icu= + nls => undef, # --enable-nls= + tap_tests => undef, # --enable-tap-tests + tcl => undef, # --with-tcl= + perl => undef, # --with-perl + python => undef, # --with-python= + openssl => undef, # --with-openssl= + uuid => undef, # --with-ossp-uuid + xml => undef, # --with-libxml= + xslt => undef, # --with-libxslt= + iconv => undef, # (not in configure, path to iconv) + zlib => undef # --with-zlib= +}; + +1; diff --git a/ports/libpq/patches/linux/configure.patch b/ports/libpq/patches/linux/configure.patch new file mode 100644 index 00000000000000..84ebcbd219137b --- /dev/null +++ b/ports/libpq/patches/linux/configure.patch @@ -0,0 +1,22 @@ +diff --git a/configure b/configure +index 54c852aca..96e2c89ba 100644 +--- a/configure ++++ b/configure +@@ -11923,7 +11923,7 @@ if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" ++LIBS="-lcrypto -pthread $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -11958,7 +11958,7 @@ if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then : + #define HAVE_LIBCRYPTO 1 + _ACEOF + +- LIBS="-lcrypto $LIBS" ++ LIBS="-lcrypto -pthread $LIBS" + + else + as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5 diff --git a/ports/libpq/patches/mingw/additional-zlib-names.patch b/ports/libpq/patches/mingw/additional-zlib-names.patch new file mode 100644 index 00000000000000..e8ab7b06589ddd --- /dev/null +++ b/ports/libpq/patches/mingw/additional-zlib-names.patch @@ -0,0 +1,186 @@ +diff --git a/configure b/configure +index c22d3de..75210f0 100755 +--- a/configure ++++ b/configure +@@ -11777,13 +11789,13 @@ Use --without-readline to disable readline support." "$LINENO" 5 + fi + + if test "$with_zlib" = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 +-$as_echo_n "checking for inflate in -lz... " >&6; } +-if ${ac_cv_lib_z_inflate+:} false; then : ++ if test "$enable_debug" = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflate" >&5 ++$as_echo_n "checking for library containing inflate... " >&6; } ++if ${ac_cv_search_inflate+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lz $LIBS" ++ ac_func_search_save_LIBS=$LIBS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -11802,23 +11814,101 @@ return inflate (); + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_z_inflate=yes +-else +- ac_cv_lib_z_inflate=no ++for ac_lib in '' zd zlibd zlib1d z zlib zlib1; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_inflate=$ac_res + fi + rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++ conftest$ac_exeext ++ if ${ac_cv_search_inflate+:} false; then : ++ break + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 +-$as_echo "$ac_cv_lib_z_inflate" >&6; } +-if test "x$ac_cv_lib_z_inflate" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBZ 1 ++done ++if ${ac_cv_search_inflate+:} false; then : ++ ++else ++ ac_cv_search_inflate=no ++fi ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflate" >&5 ++$as_echo "$ac_cv_search_inflate" >&6; } ++ac_res=$ac_cv_search_inflate ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++ ++$as_echo "#define HAVE_LIBZ 1" >>confdefs.h ++ ++else ++ as_fn_error $? "zlib library not found ++If you have zlib already installed, see config.log for details on the ++failure. It is possible the compiler isn't looking in the proper directory. ++Use --without-zlib to disable zlib support." "$LINENO" 5 ++fi ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflate" >&5 ++$as_echo_n "checking for library containing inflate... " >&6; } ++if ${ac_cv_search_inflate+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_func_search_save_LIBS=$LIBS ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char inflate (); ++int ++main () ++{ ++return inflate (); ++ ; ++ return 0; ++} + _ACEOF ++for ac_lib in '' z zlib zlib1; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_inflate=$ac_res ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_inflate+:} false; then : ++ break ++fi ++done ++if ${ac_cv_search_inflate+:} false; then : + +- LIBS="-lz $LIBS" ++else ++ ac_cv_search_inflate=no ++fi ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflate" >&5 ++$as_echo "$ac_cv_search_inflate" >&6; } ++ac_res=$ac_cv_search_inflate ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++ ++$as_echo "#define HAVE_LIBZ 1" >>confdefs.h + + else + as_fn_error $? "zlib library not found +@@ -11827,6 +11917,7 @@ failure. It is possible the compiler isn't looking in the proper directory. + Use --without-zlib to disable zlib support." "$LINENO" 5 + fi + ++ fi + fi + + if test "$enable_spinlocks" = yes; then +diff --git a/configure.in b/configure.in +index 976f90d..e3cd80b 100644 +--- a/configure.in ++++ b/configure.in +@@ -1170,11 +1170,21 @@ Use --without-readline to disable readline support.]) + fi + + if test "$with_zlib" = yes; then +- AC_CHECK_LIB(z, inflate, [], +- [AC_MSG_ERROR([zlib library not found ++ if test "$enable_debug" = yes; then ++ AC_SEARCH_LIBS(inflate, [zd zlibd zlib1d z zlib zlib1], ++ [AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have the `z' library.])], ++ [AC_MSG_ERROR([zlib library not found + If you have zlib already installed, see config.log for details on the + failure. It is possible the compiler isn't looking in the proper directory. + Use --without-zlib to disable zlib support.])]) ++ else ++ AC_SEARCH_LIBS(inflate, [z zlib zlib1], ++ [AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have the `z' library.])], ++ [AC_MSG_ERROR([zlib library not found ++If you have zlib already installed, see config.log for details on the ++failure. It is possible the compiler isn't looking in the proper directory. ++Use --without-zlib to disable zlib support.])]) ++ fi + fi + + if test "$enable_spinlocks" = yes; then +diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in +index 244886a..29dd35b 100644 +--- a/src/include/pg_config.h.in ++++ b/src/include/pg_config.h.in +@@ -374,7 +374,7 @@ + /* Define to 1 if you have the `xslt' library (-lxslt). */ + #undef HAVE_LIBXSLT + +-/* Define to 1 if you have the `z' library (-lz). */ ++/* Define to 1 if you have the `z' library. */ + #undef HAVE_LIBZ + + /* Define to 1 if the system has the type `locale_t'. */ diff --git a/ports/libpq/patches/mingw/link-with-crypt32.patch b/ports/libpq/patches/mingw/link-with-crypt32.patch new file mode 100644 index 00000000000000..67167de1f87209 --- /dev/null +++ b/ports/libpq/patches/mingw/link-with-crypt32.patch @@ -0,0 +1,79 @@ +diff --git a/configure b/configure +index 75210f0..6ea5e1f 100755 +--- a/configure ++++ b/configure +@@ -11708,6 +11708,62 @@ if test "$ac_res" != no; then : + + fi + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CertOpenStore" >&5 ++$as_echo_n "checking for library containing CertOpenStore... " >&6; } ++if ${ac_cv_search_CertOpenStore+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_func_search_save_LIBS=$LIBS ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char CertOpenStore (); ++int ++main () ++{ ++return CertOpenStore (); ++ ; ++ return 0; ++} ++_ACEOF ++for ac_lib in '' crypt32; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_CertOpenStore=$ac_res ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_CertOpenStore+:} false; then : ++ break ++fi ++done ++if ${ac_cv_search_CertOpenStore+:} false; then : ++ ++else ++ ac_cv_search_CertOpenStore=no ++fi ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CertOpenStore" >&5 ++$as_echo "$ac_cv_search_CertOpenStore" >&6; } ++ac_res=$ac_cv_search_CertOpenStore ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++ ++fi ++ + + if test "$with_readline" = yes; then + +diff --git a/configure.in b/configure.in +index 0832636..0911ec0 100644 +--- a/configure.in ++++ b/configure.in +@@ -1158,6 +1158,7 @@ AC_SEARCH_LIBS(sched_yield, rt) + AC_SEARCH_LIBS(gethostbyname_r, nsl) + # Cygwin: + AC_SEARCH_LIBS(shmget, cygipc) ++AC_SEARCH_LIBS(CertOpenStore, crypt32) + + if test "$with_readline" = yes; then + PGAC_CHECK_READLINE diff --git a/ports/libpq/patches/windows/MSBuildProject-static-crt.patch b/ports/libpq/patches/windows/MSBuildProject-static-crt.patch new file mode 100644 index 00000000000000..03bd832f8597b9 --- /dev/null +++ b/ports/libpq/patches/windows/MSBuildProject-static-crt.patch @@ -0,0 +1,23 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..faa3e336f 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -84,16 +84,16 @@ EOF + defs => "_DEBUG;DEBUG=1", + opt => 'Disabled', + strpool => 'false', +- runtime => 'MultiThreadedDebugDLL' ++ runtime => 'MultiThreadedDebug' + }); + $self->WriteItemDefinitionGroup( + $f, + 'Release', + { + defs => "", + opt => 'Full', + strpool => 'true', +- runtime => 'MultiThreadedDLL' ++ runtime => 'MultiThreaded' + }); + return; + } diff --git a/ports/libpq/patches/windows/MSBuildProject-static-lib.patch b/ports/libpq/patches/windows/MSBuildProject-static-lib.patch new file mode 100644 index 00000000000000..ba72a82bf18ad2 --- /dev/null +++ b/ports/libpq/patches/windows/MSBuildProject-static-lib.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..e1dc59aa7 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -262,7 +262,7 @@ sub WriteConfigurationPropertyGroup + my $cfgtype = + ($self->{type} eq "exe") + ? 'Application' +- : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary'); ++ : ($self->{type} eq "dll" ? 'StaticLibrary' : 'StaticLibrary'); + + print $f < diff --git a/ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch b/ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch new file mode 100644 index 00000000000000..6c52713a9930fa --- /dev/null +++ b/ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..b93992f22 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -381,7 +381,7 @@ EOF + print $f < + Generate DEF file +- perl src\\tools\\msvc\\gendef.pl $cfgname\\$self->{name} $self->{platform} ++ perl "src\\tools\\msvc\\gendef.pl" $cfgname\\$self->{name} $self->{platform} + + EOF + } diff --git a/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch b/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch new file mode 100644 index 00000000000000..818134f5c55a4d --- /dev/null +++ b/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..4f51c12f2 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -182,7 +182,7 @@ sub mkvcbuild + 'syncrep_gram.y'); + $postgres->AddFiles('src/backend/utils/adt', 'jsonpath_scan.l', + 'jsonpath_gram.y'); +- $postgres->AddDefine('BUILDING_DLL'); ++ # $postgres->AddDefine('BUILDING_DLL'); + $postgres->AddLibrary('secur32.lib'); + $postgres->AddLibrary('ws2_32.lib'); + $postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap}); diff --git a/ports/libpq/patches/windows/Solution.patch b/ports/libpq/patches/windows/Solution.patch new file mode 100644 index 00000000000000..2259e3e8abdf84 --- /dev/null +++ b/ports/libpq/patches/windows/Solution.patch @@ -0,0 +1,39 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 51711c2bf..d33fdc3b0 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -69,9 +69,15 @@ sub DeterminePlatform + my $self = shift; + + # Examine CL help output to determine if we are in 32 or 64-bit mode. +- my $output = `cl /? 2>&1`; ++ my $output = `cl 2>&1`; + $? >> 8 == 0 or die "cl command not found"; +- $self->{platform} = ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32'; ++ if ($output =~ m/x64\n/) { $self->{platform} = 'x64'; ++ } elsif ($output =~ m/x86\n/) { $self->{platform} = 'Win32'; ++ } elsif ($output =~ m/ARM64\n/) { $self->{platform} = 'ARM64'; ++ } elsif ($output =~ m/ARM\n/) { $self->{platform} = 'ARM'; ++ } else { $self->{platform} = 'Unknown' ++ } ++ print "cl output $output."; + print "Detected hardware platform: $self->{platform}\n"; + return; + } +@@ -526,14 +526,14 @@ EOF + || confess "Could not open pg_config_paths.h"; + print $o <{options}->{zlib}) + { + $proj->AddIncludeDir($self->{options}->{zlib} . '\include'); +- $proj->AddLibrary($self->{options}->{zlib} . '\lib\zdll.lib'); ++ $proj->AddLibrary($self->{options}->{zlib} . '\debug\lib\zlibd.lib'); # This must be updated + } + if ($self->{options}->{openssl}) + { +@@ -661,7 +661,7 @@ sub AddProject + # changed their library names from: + # - libeay to libcrypto + # - ssleay to libssl +- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') ++ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') # This must be updated + { + my $dbgsuffix; + my $libsslpath; +@@ -670,27 +670,27 @@ sub AddProject + # The format name of the libraries is slightly + # different between the Win32 and Win64 platform, so + # adapt. +- if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") # This must be updated + { + # Win32 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl32.lib'; +- $libcryptopath = '\lib\VC\libcrypto32.lib'; ++ $libsslpath = '\lib\VC\libssl32.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto32.lib'; # This must be updated + } +- elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") ++ elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") # This must be updated + { + # Win64 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl64.lib'; +- $libcryptopath = '\lib\VC\libcrypto64.lib'; ++ $libsslpath = '\lib\VC\libssl64.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto64.lib'; # This must be updated + } + else + { + # On both Win32 and Win64 the same library + # names are used without a debugging context. + $dbgsuffix = 0; +- $libsslpath = '\lib\libssl.lib'; +- $libcryptopath = '\lib\libcrypto.lib'; ++ $libsslpath = '\debug\lib\libssl.lib'; # This must be updated ++ $libcryptopath = '\debug\lib\libcrypto.lib'; # This must be updated + } + + $proj->AddLibrary($self->{options}->{openssl} . $libsslpath, +@@ -698,16 +698,16 @@ sub AddProject + $proj->AddLibrary($self->{options}->{openssl} . $libcryptopath, + $dbgsuffix); + } +- else ++ else + { + # Choose which set of libraries to use depending on if + # debugging libraries are in place in the installer. +- if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") # This must be updated + { + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); # This must be updated + } + else + { +@@ -715,60 +715,60 @@ sub AddProject + # to be here, so don't ask for it in last + # parameter. + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); ++ $self->{options}->{openssl} . '\debug\lib\ssleay32.lib', 0); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\libeay32.lib', 0); ++ $self->{options}->{openssl} . '\debug\lib\libeay32.lib', 0); # This must be updated + } + } + } + if ($self->{options}->{nls}) + { + $proj->AddIncludeDir($self->{options}->{nls} . '\include'); +- $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib'); ++ $proj->AddLibrary($self->{options}->{nls} . '\debug\lib\intl.lib'); # This must be updated + } + if ($self->{options}->{gss}) + { +- $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib'); ++ $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');# This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');# This must be updated + } + if ($self->{options}->{iconv}) + { + $proj->AddIncludeDir($self->{options}->{iconv} . '\include'); +- $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib'); ++ $proj->AddLibrary($self->{options}->{iconv} . '\debug\lib\iconv.lib'); # This must be updated + } + if ($self->{options}->{icu}) + { + $proj->AddIncludeDir($self->{options}->{icu} . '\include'); + if ($self->{platform} eq 'Win32') + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuind.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuucd.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icudtd.lib'); # This must be updated + } + else + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuind.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuucd.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icudtd.lib'); # This must be updated + } + } + if ($self->{options}->{xml}) + { + $proj->AddIncludeDir($self->{options}->{xml} . '\include'); + $proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2'); +- $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); ++ $proj->AddLibrary($self->{options}->{xml} . '\debug\lib\libxml2.lib'); # This must be updated + } + if ($self->{options}->{xslt}) + { + $proj->AddIncludeDir($self->{options}->{xslt} . '\include'); +- $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); ++ $proj->AddLibrary($self->{options}->{xslt} . '\debug\lib\libxslt.lib'); # This must be updated + } + if ($self->{options}->{uuid}) + { + $proj->AddIncludeDir($self->{options}->{uuid} . '\include'); +- $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); ++ $proj->AddLibrary($self->{options}->{uuid} . '\debug\lib\uuid.lib'); # This must be updated + } + return $proj; + } diff --git a/ports/libpq/patches/windows/Solution_RELEASE.patch b/ports/libpq/patches/windows/Solution_RELEASE.patch new file mode 100644 index 00000000000000..cc41b8d0b7d569 --- /dev/null +++ b/ports/libpq/patches/windows/Solution_RELEASE.patch @@ -0,0 +1,157 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 51711c2bf..d33fdc3b0 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -650,7 +650,7 @@ sub AddProject + if ($self->{options}->{zlib}) + { + $proj->AddIncludeDir($self->{options}->{zlib} . '\include'); +- $proj->AddLibrary($self->{options}->{zlib} . '\lib\zdll.lib'); ++ $proj->AddLibrary($self->{options}->{zlib} . '\lib\zlib.lib'); # This must be updated + } + if ($self->{options}->{openssl}) + { +@@ -661,7 +661,7 @@ sub AddProject + # changed their library names from: + # - libeay to libcrypto + # - ssleay to libssl +- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') ++ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') # This must be updated + { + my $dbgsuffix; + my $libsslpath; +@@ -670,27 +670,27 @@ sub AddProject + # The format name of the libraries is slightly + # different between the Win32 and Win64 platform, so + # adapt. +- if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") # This must be updated + { + # Win32 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl32.lib'; +- $libcryptopath = '\lib\VC\libcrypto32.lib'; ++ $libsslpath = '\lib\VC\libssl32.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto32.lib'; # This must be updated + } +- elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") ++ elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") # This must be updated + { + # Win64 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl64.lib'; +- $libcryptopath = '\lib\VC\libcrypto64.lib'; ++ $libsslpath = '\lib\VC\libssl64.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto64.lib'; # This must be updated + } + else + { + # On both Win32 and Win64 the same library + # names are used without a debugging context. + $dbgsuffix = 0; +- $libsslpath = '\lib\libssl.lib'; +- $libcryptopath = '\lib\libcrypto.lib'; ++ $libsslpath = '\lib\libssl.lib'; # This must be updated ++ $libcryptopath = '\lib\libcrypto.lib'; # This must be updated + } + + $proj->AddLibrary($self->{options}->{openssl} . $libsslpath, +@@ -698,16 +698,16 @@ sub AddProject + $proj->AddLibrary($self->{options}->{openssl} . $libcryptopath, + $dbgsuffix); + } +- else ++ else + { + # Choose which set of libraries to use depending on if + # debugging libraries are in place in the installer. +- if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") # This must be updated + { + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); # This must be updated + } + else + { +@@ -715,60 +715,60 @@ sub AddProject + # to be here, so don't ask for it in last + # parameter. + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); ++ $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\libeay32.lib', 0); ++ $self->{options}->{openssl} . '\lib\libeay32.lib', 0); # This must be updated + } + } + } + if ($self->{options}->{nls}) + { + $proj->AddIncludeDir($self->{options}->{nls} . '\include'); +- $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib'); ++ $proj->AddLibrary($self->{options}->{nls} . '\lib\intl.lib'); # This must be updated + } + if ($self->{options}->{gss}) + { +- $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib'); ++ $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');# This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');# This must be updated + } + if ($self->{options}->{iconv}) + { + $proj->AddIncludeDir($self->{options}->{iconv} . '\include'); +- $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib'); ++ $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib'); # This must be updated + } + if ($self->{options}->{icu}) + { + $proj->AddIncludeDir($self->{options}->{icu} . '\include'); + if ($self->{platform} eq 'Win32') + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); # This must be updated + } + else + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); # This must be updated + } + } + if ($self->{options}->{xml}) + { + $proj->AddIncludeDir($self->{options}->{xml} . '\include'); + $proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2'); +- $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); ++ $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); # This must be updated + } + if ($self->{options}->{xslt}) + { + $proj->AddIncludeDir($self->{options}->{xslt} . '\include'); +- $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); ++ $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); # This must be updated + } + if ($self->{options}->{uuid}) + { + $proj->AddIncludeDir($self->{options}->{uuid} . '\include'); +- $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); ++ $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); # This must be updated + } + return $proj; + } diff --git a/ports/libpq/patches/windows/arm.patch b/ports/libpq/patches/windows/arm.patch new file mode 100644 index 00000000000000..0e47c34b9d0425 --- /dev/null +++ b/ports/libpq/patches/windows/arm.patch @@ -0,0 +1,39 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..4f51c12f2 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -110,8 +110,8 @@ sub mkvcbuild + + if ($vsVersion >= '9.00') + { +- push(@pgportfiles, 'pg_crc32c_sse42_choose.c'); +- push(@pgportfiles, 'pg_crc32c_sse42.c'); ++ #push(@pgportfiles, 'pg_crc32c_sse42_choose.c'); ++ #push(@pgportfiles, 'pg_crc32c_sse42.c'); + push(@pgportfiles, 'pg_crc32c_sb8.c'); + } + else +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..625f32bf8 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -307,9 +307,8 @@ sub WriteItemDefinitionGroup + : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary'); + my $libs = $self->GetAdditionalLinkerDependencies($cfgname, ';'); + +- my $targetmachine = +- $self->{platform} eq 'Win32' ? 'MachineX86' : 'MachineX64'; +- ++ my $targetmachine = $self->{platform} eq 'ARM64' ? 'MachineARM64' : 'MachineARM'; ++ + my $includes = $self->{includes}; + unless ($includes eq '' or $includes =~ /;$/) + { +@@ -347,7 +349,6 @@ sub WriteItemDefinitionGroup + .\\$cfgname\\$self->{name}\\$self->{name}.pdb + false + .\\$cfgname\\$self->{name}\\$self->{name}.map +- false + + + Console diff --git a/ports/libpq/patches/windows/fix-compile-flag-Zi.patch b/ports/libpq/patches/windows/fix-compile-flag-Zi.patch new file mode 100644 index 00000000000000..04d86811e954ae --- /dev/null +++ b/ports/libpq/patches/windows/fix-compile-flag-Zi.patch @@ -0,0 +1,33 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index b93992f..2397511 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -333,7 +333,7 @@ sub WriteItemDefinitionGroup + false + Level3 + true +- ProgramDatabase ++ OldStyle + Default + + +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index e0c9a88..98f9e67 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -341,9 +341,12 @@ sub CopySolutionOutput + || croak "Could not copy $pf.$ext\n"; + } + } +- lcopy("$conf\\$pf\\$pf.pdb", "$target\\bin\\$pf.pdb") +- || croak "Could not copy $pf.pdb\n"; +- print "."; ++ if ($1 eq 'DynamicLibrary') ++ { ++ lcopy("$conf\\$pf\\$pf.pdb", "$target\\bin\\$pf.pdb") ++ || croak "Could not copy $pf.pdb\n"; ++ print "."; ++ } + } + print "\n"; + return; diff --git a/ports/libpq/patches/windows/host_skip_openssl.patch b/ports/libpq/patches/windows/host_skip_openssl.patch new file mode 100644 index 00000000000000..e18e178843f9bc --- /dev/null +++ b/ports/libpq/patches/windows/host_skip_openssl.patch @@ -0,0 +1,38 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 25a549015..9018270ab 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -132,21 +132,21 @@ sub GetOpenSSLVersion + # Attempt to get OpenSSL version and location. This assumes that + # openssl.exe is in the specified directory. + # Quote the .exe name in case it has spaces +- my $opensslcmd = +- qq("openssl.exe" version 2>&1); +- my $sslout = `$opensslcmd`; ++ #my $opensslcmd = ++ # qq("openssl.exe" version 2>&1); ++ #my $sslout = `$opensslcmd`; + +- $? >> 8 == 0 +- or croak +- "Unable to determine OpenSSL version: The openssl.exe command wasn't found."; ++ #$? >> 8 == 0 ++ # or croak ++ # "Unable to determine OpenSSL version: The openssl.exe command wasn't found."; + +- if ($sslout =~ /(\d+)\.(\d+)\.(\d+)(\D)/m) +- { +- return ($1, $2, $3); +- } ++ #if ($sslout =~ /(\d+)\.(\d+)\.(\d+)(\D)/m) ++ #{ ++ return (1, 1, 1); ++ #} + +- croak +- "Unable to determine OpenSSL version: The openssl.exe version could not be determined."; ++ #croak ++ # "Unable to determine OpenSSL version: The openssl.exe version could not be determined."; + } + + sub GenerateFiles diff --git a/ports/libpq/patches/windows/install.patch b/ports/libpq/patches/windows/install.patch new file mode 100644 index 00000000000000..42713389bb6da8 --- /dev/null +++ b/ports/libpq/patches/windows/install.patch @@ -0,0 +1,244 @@ +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index d109b2c90..75c7446e6 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -63,8 +63,16 @@ sub Install + do "./config.pl" if (-f "config.pl"); + } + +- chdir("../../..") if (-f "../../../configure"); +- chdir("../../../..") if (-f "../../../../configure"); ++ # Move to the root path depending on the current location. ++ if (-f "../../../configure") ++ { ++ chdir("../../.."); ++ } ++ elsif (-f "../../../../configure") ++ { ++ chdir("../../../.."); ++ } ++ + my $conf = ""; + if (-d "debug") + { +@@ -106,7 +106,7 @@ sub Install + } + }, + @top_dir); +- CopySetOfFiles('config files', $sample_files, $target . '/share/'); ++ CopySetOfFiles('config files', $sample_files, $target . '/share/libpq/'); + CopyFiles( + 'Import libraries', + $target . '/lib/', +@@ -78,10 +78,10 @@ sub Install + my $majorver = DetermineMajorVersion(); + print "Installing version $majorver for $conf in $target\n"; + +- my @client_dirs = ('bin', 'lib', 'share', 'symbols'); ++ my @client_dirs = ('bin', 'lib', 'share', 'tools', 'share/libpq', 'tools/libpq'); + my @all_dirs = ( +- @client_dirs, 'doc', 'doc/contrib', 'doc/extension', 'share/contrib', +- 'share/extension', 'share/timezonesets', 'share/tsearch_data'); ++ @client_dirs, 'doc', 'doc/libpq', 'doc/libpq/contrib', 'doc/libpq/extension', 'share/libpq/contrib', ++ 'share/libpq/extension', 'share/libpq/timezonesets', 'share/libpq/tsearch_data'); + if ($insttype eq "client") + { + EnsureDirectories($target, @client_dirs); +@@ -120,35 +120,35 @@ sub Install + CopySetOfFiles( + 'timezone names', + [ glob('src\timezone\tznames\*.txt') ], +- $target . '/share/timezonesets/'); ++ $target . '/share/libpq/timezonesets/'); + CopyFiles( + 'timezone sets', +- $target . '/share/timezonesets/', ++ $target . '/share/libpq/timezonesets/', + 'src/timezone/tznames/', 'Default', 'Australia', 'India'); + CopySetOfFiles( + 'BKI files', + [ glob("src\\backend\\catalog\\postgres.*") ], +- $target . '/share/'); ++ $target . '/share/libpq/'); + CopySetOfFiles( + 'SQL files', + [ glob("src\\backend\\catalog\\*.sql") ], +- $target . '/share/'); ++ $target . '/share/libpq/'); + CopyFiles( +- 'Information schema data', $target . '/share/', ++ 'Information schema data', $target . '/share/libpq/', + 'src/backend/catalog/', 'sql_features.txt'); + CopyFiles( +- 'Error code data', $target . '/share/', ++ 'Error code data', $target . '/share/libpq/', + 'src/backend/utils/', 'errcodes.txt'); + GenerateTimezoneFiles($target, $conf); + GenerateTsearchFiles($target); + CopySetOfFiles( + 'Stopword files', + [ glob("src\\backend\\snowball\\stopwords\\*.stop") ], +- $target . '/share/tsearch_data/'); ++ $target . '/share/libpq/tsearch_data/'); + CopySetOfFiles( + 'Dictionaries sample files', + [ glob("src\\backend\\tsearch\\dicts\\*_sample*") ], +- $target . '/share/tsearch_data/'); ++ $target . '/share/libpq/tsearch_data/'); + + my $pl_extension_files = []; + my @pldirs = ('src/pl/plpgsql/src'); +@@ -167,7 +167,7 @@ sub Install + }, + @pldirs); + CopySetOfFiles('PL Extension files', +- $pl_extension_files, $target . '/share/extension/'); ++ $pl_extension_files, $target . '/share/libpq/extension/'); + } + + GenerateNLSFiles($target, $config->{nls}, $majorver) if ($config->{nls}); +@@ -282,23 +282,26 @@ sub CopySolutionOutput + { + if ($1 == 1) + { +- push(@{ $install_list{'bin'} }, "exe"); ++ push(@{ $install_list{'tools\\libpq'} }, "exe"); + } + elsif ($1 == 2) + { +- push(@{ $install_list{'lib'} }, "dll"); ++ push(@{ $install_list{'bin'} }, "dll"); + if ($is_sharedlib) + { + push(@{ $install_list{'bin'} }, "dll"); + push(@{ $install_list{'lib'} }, "lib"); + } ++ else ++ { ++ push(@{ $install_list{'lib'} }, "lib"); ++ } + } + else + { +- ++ push(@{ $install_list{'lib'} }, "lib"); + # Static libraries, such as libpgport, only used internally + # during build, don't install. +- next; + } + } + elsif ($vcproj eq 'vcxproj' +@@ -306,11 +309,11 @@ sub CopySolutionOutput + { + if ($1 eq 'Application') + { +- push(@{ $install_list{'bin'} }, "exe"); ++ push(@{ $install_list{'tools\\libpq'} }, "exe"); + } + elsif ($1 eq 'DynamicLibrary') + { +- push(@{ $install_list{'lib'} }, "dll"); ++ push(@{ $install_list{'bin'} }, "dll"); + if ($is_sharedlib) + { + push(@{ $install_list{'bin'} }, "dll"); +@@ -319,10 +322,9 @@ sub CopySolutionOutput + } + else # 'StaticLibrary' + { +- ++ push(@{ $install_list{'lib'} }, "lib"); + # Static lib, such as libpgport, only used internally + # during build, don't install. +- next; + } + } + else +@@ -339,7 +339,7 @@ sub CopySolutionOutput + || croak "Could not copy $pf.$ext\n"; + } + } +- lcopy("$conf\\$pf\\$pf.pdb", "$target\\symbols\\$pf.pdb") ++ lcopy("$conf\\$pf\\$pf.pdb", "$target\\bin\\$pf.pdb") + || croak "Could not copy $pf.pdb\n"; + print "."; + } +@@ -366,7 +366,7 @@ sub GenerateTimezoneFiles + print "Generating timezone files..."; + + my @args = +- ("$conf/zic/zic", '-d', "$target/share/timezone", '-p', "$posixrules"); ++ ("$conf/zic/zic", '-d', "$target/share/libpq/timezone", '-p', "$posixrules"); + foreach (@tzfiles) + { + my $tzfile = $_; +@@ -391,7 +391,7 @@ sub GenerateTsearchFiles + $mf =~ /^LANGUAGES\s*=\s*(.*)$/m + || die "Could not find LANGUAGES line in snowball Makefile\n"; + my @pieces = split /\s+/, $1; +- open($F, '>', "$target/share/snowball_create.sql") ++ open($F, '>', "$target/share/libpq/snowball_create.sql") + || die "Could not write snowball_create.sql"; + print $F read_file('src/backend/snowball/snowball_func.sql.in'); + +@@ -476,7 +476,7 @@ sub CopySubdirFiles + foreach my $f (split /\s+/, $flist) + { + lcopy("$subdir/$module/$f.control", +- "$target/share/extension/$f.control") ++ "$target/share/libpq/extension/$f.control") + || croak("Could not copy file $f.control in contrib $module"); + print '.'; + } +@@ -494,7 +494,7 @@ sub CopySubdirFiles + foreach my $f (split /\s+/, $flist) + { + lcopy("$subdir/$module/$f", +- "$target/share/$moduledir/" . basename($f)) ++ "$target/share/libpq/$moduledir/" . basename($f)) + || croak("Could not copy file $f in contrib $module"); + print '.'; + } +@@ -509,7 +509,7 @@ sub CopySubdirFiles + foreach my $f (split /\s+/, $flist) + { + lcopy("$subdir/$module/$f", +- "$target/share/tsearch_data/" . basename($f)) ++ "$target/share/libpq/tsearch_data/" . basename($f)) + || croak("Could not copy file $f in $subdir $module"); + print '.'; + } +@@ -572,7 +572,7 @@ sub CopySubdirFiles + if ($module eq 'spi'); + foreach my $f (split /\s+/, $flist) + { +- lcopy("$subdir/$module/$f", "$target/doc/$moduledir/$f") ++ lcopy("$subdir/$module/$f", "$target/doc/libpq/$moduledir/$f") + || croak("Could not copy file $f in contrib $module"); + print '.'; + } +@@ -701,7 +701,7 @@ sub GenerateNLSFiles + my $majorver = shift; + + print "Installing NLS files..."; +- EnsureDirectories($target, "share/locale"); ++ EnsureDirectories($target, "share/libpq/locale"); + my @flist; + File::Find::find( + { +@@ -723,12 +723,12 @@ sub GenerateNLSFiles + next unless /([^\/]+)\.po/; + $lang = $1; + +- EnsureDirectories($target, "share/locale/$lang", +- "share/locale/$lang/LC_MESSAGES"); ++ EnsureDirectories($target, "share/libpq/locale/$lang", ++ "share/libpq/locale/$lang/LC_MESSAGES"); + my @args = ( + "$nlspath\\bin\\msgfmt", + '-o', +- "$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", ++ "$target\\share\\libpq\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", + $_); + system(@args) && croak("Could not run msgfmt on $dir\\$_"); + print "."; diff --git a/ports/libpq/patches/windows/minimize_install.patch b/ports/libpq/patches/windows/minimize_install.patch new file mode 100644 index 00000000000000..1d1eb2b5769885 --- /dev/null +++ b/ports/libpq/patches/windows/minimize_install.patch @@ -0,0 +1,35 @@ +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index d109b2c90..75c7446e6 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -19,13 +19,13 @@ our (@ISA, @EXPORT_OK); + + my $insttype; + my @client_contribs = ('oid2name', 'pgbench', 'vacuumlo'); +-my @client_program_files = ( +- 'clusterdb', 'createdb', 'createuser', 'dropdb', +- 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat', +- 'libpgtypes', 'libpq', 'pg_basebackup', 'pg_config', +- 'pg_dump', 'pg_dumpall', 'pg_isready', 'pg_receivewal', +- 'pg_recvlogical', 'pg_restore', 'psql', 'reindexdb', +- 'vacuumdb', @client_contribs); ++my @client_program_files = ( 'libecpg','libecpg_compat', 'libpgtypes', 'libpq' ); ++ # 'clusterdb', 'createdb', 'createuser', 'dropdb', ++ # 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat', ++ #'libpgtypes', 'libpq', 'pg_basebackup', 'pg_config', ++ #'pg_dump', 'pg_dumpall', 'pg_isready', 'pg_receivewal', ++ #'pg_recvlogical', 'pg_restore', 'psql', 'reindexdb', ++ #'vacuumdb', @client_contribs); + + sub lcopy + { +@@ -110,7 +110,7 @@ sub Install + CopyFiles( + 'Import libraries', + $target . '/lib/', +- "$conf\\", "postgres\\postgres.lib", "libpgcommon\\libpgcommon.lib", ++ "$conf\\", "libpgcommon\\libpgcommon.lib", + "libpgport\\libpgport.lib"); + CopyContribFiles($config, $target); + CopyIncludeFiles($target); + diff --git a/ports/libpq/patches/windows/msgfmt.patch b/ports/libpq/patches/windows/msgfmt.patch new file mode 100644 index 00000000000000..352daed870ee9a --- /dev/null +++ b/ports/libpq/patches/windows/msgfmt.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index 66c0c3483..2154c6cf6 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -728,7 +728,7 @@ sub GenerateNLSFiles + EnsureDirectories($target, "share/libpq/locale/$lang", + "share/libpq/locale/$lang/LC_MESSAGES"); + my @args = ( +- "$nlspath\\bin\\msgfmt", ++ "msgfmt.exe", + '-o', + "$target\\share\\libpq\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", + $_); diff --git a/ports/libpq/patches/windows/openssl_exe_path.patch b/ports/libpq/patches/windows/openssl_exe_path.patch new file mode 100644 index 00000000000000..533f1c4fd7b8af --- /dev/null +++ b/ports/libpq/patches/windows/openssl_exe_path.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 51711c2bf..d33fdc3b0 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -133,7 +133,7 @@ sub GetOpenSSLVersion + # openssl.exe is in the specified directory. + # Quote the .exe name in case it has spaces + my $opensslcmd = +- qq("$self->{options}->{openssl}\\bin\\openssl.exe" version 2>&1); ++ qq("openssl.exe" version 2>&1); + my $sslout = `$opensslcmd`; + + $? >> 8 == 0 diff --git a/ports/libpq/patches/windows/python3_build_DEBUG.patch b/ports/libpq/patches/windows/python3_build_DEBUG.patch new file mode 100644 index 00000000000000..fb267e9df12b81 --- /dev/null +++ b/ports/libpq/patches/windows/python3_build_DEBUG.patch @@ -0,0 +1,40 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..21b5559d6 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -494,14 +494,15 @@ sub mkvcbuild + + # Attempt to get python version and location. + # Assume python.exe in specified dir. +- my $pythonprog = "import sys;print(sys.prefix);" +- . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; +- my $prefixcmd = +- $solution->{options}->{python} . "\\python -c \"$pythonprog\""; +- my $pyout = `$prefixcmd`; +- die "Could not query for python version!\n" if $?; +- my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); +- ++ #my $pythonprog = "import sys;print(sys.prefix);" ++ # . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; ++ #my $prefixcmd = ++ # $solution->{options}->{python} . "\\python -c \"$pythonprog\""; ++ #my $pyout = `$prefixcmd`; ++ #die "Could not query for python version!\n" if $?; ++ #my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); ++ my $pyprefix = $solution->{options}->{python}; ++ my $pyver = 39; + # Sometimes (always?) if python is not present, the execution + # appears to work, but gives no data... + die "Failed to query python for version information\n" +@@ -510,8 +511,9 @@ sub mkvcbuild + my $pymajorver = substr($pyver, 0, 1); + my $plpython = $solution->AddProject('plpython' . $pymajorver, + 'dll', 'PLs', 'src/pl/plpython'); +- $plpython->AddIncludeDir($pyprefix . '/include'); +- $plpython->AddLibrary($pyprefix . "/Libs/python$pyver.lib"); ++ $plpython->AddIncludeDir($pyprefix . '/include/python3.9'); ++ $plpython->AddDefine('_DEBUG'); # required for python autolink linking correctly! ++ $plpython->AddLibrary($pyprefix . "/debug/lib/python$pyver" . "_d.lib"); + $plpython->AddReference($postgres); + + # Add transform modules dependent on plpython diff --git a/ports/libpq/patches/windows/python3_build_RELEASE.patch b/ports/libpq/patches/windows/python3_build_RELEASE.patch new file mode 100644 index 00000000000000..b89e435e4fb38b --- /dev/null +++ b/ports/libpq/patches/windows/python3_build_RELEASE.patch @@ -0,0 +1,39 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..21b5559d6 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -494,14 +494,15 @@ sub mkvcbuild + + # Attempt to get python version and location. + # Assume python.exe in specified dir. +- my $pythonprog = "import sys;print(sys.prefix);" +- . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; +- my $prefixcmd = +- $solution->{options}->{python} . "\\python -c \"$pythonprog\""; +- my $pyout = `$prefixcmd`; +- die "Could not query for python version!\n" if $?; +- my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); +- ++ #my $pythonprog = "import sys;print(sys.prefix);" ++ # . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; ++ #my $prefixcmd = ++ # $solution->{options}->{python} . "\\python -c \"$pythonprog\""; ++ #my $pyout = `$prefixcmd`; ++ #die "Could not query for python version!\n" if $?; ++ #my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); ++ my $pyprefix = $solution->{options}->{python}; ++ my $pyver = 39; + # Sometimes (always?) if python is not present, the execution + # appears to work, but gives no data... + die "Failed to query python for version information\n" +@@ -510,8 +511,8 @@ sub mkvcbuild + my $pymajorver = substr($pyver, 0, 1); + my $plpython = $solution->AddProject('plpython' . $pymajorver, + 'dll', 'PLs', 'src/pl/plpython'); +- $plpython->AddIncludeDir($pyprefix . '/include'); +- $plpython->AddLibrary($pyprefix . "/Libs/python$pyver.lib"); ++ $plpython->AddIncludeDir($pyprefix . '/include/python3.9'); ++ $plpython->AddLibrary($pyprefix . "/lib/python$pyver.lib"); + $plpython->AddReference($postgres); + + # Add transform modules dependent on plpython diff --git a/ports/libpq/patches/windows/python_lib.patch b/ports/libpq/patches/windows/python_lib.patch new file mode 100644 index 00000000000000..8b52e26c7c1a2a --- /dev/null +++ b/ports/libpq/patches/windows/python_lib.patch @@ -0,0 +1,17 @@ +diff --git a/src/pl/plpython/plpython.h b/src/pl/plpython/plpython.h +index 3a1f0d56d..6a8a09a20 100644 +--- a/src/pl/plpython/plpython.h ++++ b/src/pl/plpython/plpython.h +@@ -46,12 +46,10 @@ + #if defined(_MSC_VER) && defined(_DEBUG) + /* Python uses #pragma to bring in a non-default libpython on VC++ if + * _DEBUG is defined */ +-#undef _DEBUG + /* Also hide away errcode, since we load Python.h before postgres.h */ + #define errcode __msvc_errcode + #include + #undef errcode +-#define _DEBUG + #elif defined (_MSC_VER) + #define errcode __msvc_errcode + #include diff --git a/ports/libpq/patches/windows/win_bison_flex.patch b/ports/libpq/patches/windows/win_bison_flex.patch new file mode 100644 index 00000000000000..95df3f49507efc --- /dev/null +++ b/ports/libpq/patches/windows/win_bison_flex.patch @@ -0,0 +1,43 @@ +diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl +index aceed5ffd..f6ed215e8 100644 +--- a/src/tools/msvc/pgflex.pl ++++ b/src/tools/msvc/pgflex.pl +@@ -12,7 +12,7 @@ $ENV{CYGWIN} = 'nodosfilewarning'; + + do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl'; + +-my ($flexver) = `flex -V`; # grab first line ++my ($flexver) = `win_flex -V`; # grab first line + $flexver = (split(/\s+/, $flexver))[1]; + $flexver =~ s/[^0-9.]//g; + my @verparts = split(/\./, $flexver); +@@ -48,7 +47,7 @@ close($mf); + my $basetarg = basename($output); + my $flexflags = ($make =~ /^$basetarg:\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : ''); + +-system("flex $flexflags -o$output $input"); ++system("win_flex $flexflags -o$output $input"); + if ($? == 0) + { + +diff --git a/src/tools/msvc/pgbison.pl b/src/tools/msvc/pgbison.pl +index 895e398c0..f5b524a5d 100644 +--- a/src/tools/msvc/pgbison.pl ++++ b/src/tools/msvc/pgbison.pl +@@ -9,7 +9,7 @@ use File::Basename; + + do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl'; + +-my ($bisonver) = `bison -V`; # grab first line ++my ($bisonver) = `win_bison -V`; # grab first line + $bisonver = (split(/\s+/, $bisonver))[3]; # grab version number + + unless ($bisonver eq '1.875' || $bisonver ge '2.2') +@@ -45,5 +45,5 @@ close($mf); + my $basetarg = basename($output); + my $headerflag = ($make =~ /^$basetarg:\s+BISONFLAGS\b.*-d/m ? '-d' : ''); + +-system("bison $headerflag $input -o $output"); ++system("win_bison $headerflag $input -o $output"); + exit $? >> 8; + diff --git a/ports/libpq/pg_config.darwin.h b/ports/libpq/pg_config.darwin.h deleted file mode 100644 index 5db9f84d2c2424..00000000000000 --- a/ports/libpq/pg_config.darwin.h +++ /dev/null @@ -1,191 +0,0 @@ -#define ACCEPT_TYPE_ARG1 int -#define ACCEPT_TYPE_ARG2 struct sockaddr * -#define ACCEPT_TYPE_ARG3 socklen_t -#define ACCEPT_TYPE_RETURN int -#define ALIGNOF_DOUBLE 8 -#define ALIGNOF_INT 4 -#define ALIGNOF_LONG 8 -#define ALIGNOF_SHORT 2 -#define BLCKSZ 8192 -#define DEF_PGPORT 5432 -#define DEF_PGPORT_STR "5432" -#define ENABLE_THREAD_SAFETY 1 -#define FLEXIBLE_ARRAY_MEMBER /**/ -#define FLOAT4PASSBYVAL true -#define FLOAT8PASSBYVAL true -#ifdef GETTIMEOFDAY_1ARG -# define gettimeofday(a,b) gettimeofday(a) -#endif -#define HAVE_ATOMICS 1 -#define HAVE_CBRT 1 -#define HAVE_CRYPT 1 -#define HAVE_DECL_FDATASYNC 0 -#define HAVE_DECL_F_FULLFSYNC 1 -#define HAVE_DECL_POSIX_FADVISE 0 -#define HAVE_DECL_SNPRINTF 1 -#define HAVE_DECL_STRLCAT 1 -#define HAVE_DECL_STRLCPY 1 -#define HAVE_DECL_SYS_SIGLIST 1 -#define HAVE_DECL_VSNPRINTF 1 -#define HAVE_DLOPEN 1 -#define HAVE_FDATASYNC 1 -#define HAVE_FLS 1 -#define HAVE_FSEEKO 1 -#define HAVE_FUNCNAME__FUNC 1 -#define HAVE_GCC__ATOMIC_INT32_CAS 1 -#define HAVE_GCC__ATOMIC_INT64_CAS 1 -#define HAVE_GCC__SYNC_CHAR_TAS 1 -#define HAVE_GCC__SYNC_INT32_CAS 1 -#define HAVE_GCC__SYNC_INT32_TAS 1 -#define HAVE_GCC__SYNC_INT64_CAS 1 -#define HAVE_GETADDRINFO 1 -#define HAVE_GETIFADDRS 1 -#define HAVE_GETOPT 1 -#define HAVE_GETOPT_H 1 -#define HAVE_GETOPT_LONG 1 -#define HAVE_GETPEEREID 1 -#define HAVE_GETPWUID_R 1 -#define HAVE_GETRLIMIT 1 -#define HAVE_GETRUSAGE 1 -#define HAVE_HISTORY_TRUNCATE_FILE 1 -#define HAVE_IFADDRS_H 1 -#define HAVE_INET_ATON 1 -#define HAVE_INTPTR_T 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_INT_OPTERR 1 -#define HAVE_INT_OPTRESET 1 -#define HAVE_INT_TIMEZONE 1 -#define HAVE_IPV6 1 -#define HAVE_ISINF 1 -#define HAVE_LANGINFO_H 1 -#define HAVE_LIBM 1 -#define HAVE_LIBREADLINE 1 -#define HAVE_LIBZ 1 -#define HAVE_LOCALE_T 1 -#define HAVE_LONG_INT_64 1 -#define HAVE_LONG_LONG_INT 1 -#define HAVE_MBSTOWCS_L 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMORY_H 1 -#define HAVE_MKDTEMP 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_NETINET_TCP_H 1 -#define HAVE_NET_IF_H 1 -#define HAVE_POLL 1 -#define HAVE_POLL_H 1 -#define HAVE_PTHREAD 1 -#define HAVE_PTHREAD_IS_THREADED_NP 1 -#define HAVE_PTHREAD_PRIO_INHERIT 1 -#define HAVE_PWD_H 1 -#define HAVE_RANDOM 1 -#define HAVE_READLINE_HISTORY_H 1 -#define HAVE_READLINE_READLINE_H 1 -#define HAVE_READLINK 1 -#define HAVE_RINT 1 -#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1 -#define HAVE_RL_COMPLETION_MATCHES 1 -#define HAVE_RL_FILENAME_COMPLETION_FUNCTION 1 -#define HAVE_SETSID 1 -#define HAVE_SHM_OPEN 1 -#define HAVE_SNPRINTF 1 -#define HAVE_SPINLOCKS 1 -#define HAVE_SRANDOM 1 -#define HAVE_SSL_GET_CURRENT_COMPRESSION 1 -#define HAVE_STDINT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRERROR 1 -#define HAVE_STRERROR_R 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRLCPY 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRUCT_ADDRINFO 1 -#define HAVE_STRUCT_OPTION 1 -#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1 -#define HAVE_STRUCT_TM_TM_ZONE 1 -#define HAVE_SYMLINK 1 -#define HAVE_SYSLOG 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_IPC_H 1 -#define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_RESOURCE_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_SEM_H 1 -#define HAVE_SYS_SHM_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_SOCKIO_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_UCRED_H 1 -#define HAVE_SYS_UN_H 1 -#define HAVE_TERMIOS_H 1 -#define HAVE_TM_ZONE 1 -#define HAVE_TOWLOWER 1 -#define HAVE_TZNAME 1 -#define HAVE_UINTPTR_T 1 -#define HAVE_UNION_SEMUN 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UNIX_SOCKETS 1 -#define HAVE_UNSETENV 1 -#define HAVE_UNSIGNED_LONG_LONG_INT 1 -#define HAVE_UTIME 1 -#define HAVE_UTIMES 1 -#define HAVE_UTIME_H 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_WCHAR_H 1 -#define HAVE_WCSTOMBS 1 -#define HAVE_WCSTOMBS_L 1 -#define HAVE_WCTYPE_H 1 -#define HAVE__BUILTIN_BSWAP32 1 -#define HAVE__BUILTIN_BSWAP64 1 -#define HAVE__BUILTIN_CONSTANT_P 1 -#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1 -#define HAVE__BUILTIN_UNREACHABLE 1 -#define HAVE__GET_CPUID 1 -#define HAVE__STATIC_ASSERT 1 -#define HAVE__VA_ARGS 1 -#define INT64_MODIFIER "l" -#define LOCALE_T_IN_XLOCALE 1 -#define MAXIMUM_ALIGNOF 8 -#define MEMSET_LOOP_LIMIT 1024 -#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" -#define PACKAGE_NAME "PostgreSQL" -#define PACKAGE_STRING "PostgreSQL 9.6.3" -#define PACKAGE_TARNAME "postgresql" -#define PACKAGE_URL "" -#define PACKAGE_VERSION "9.6.3" -#define PG_INT128_TYPE __int128 -#define PG_INT64_TYPE long int -#define PG_KRB_SRVNAM "postgres" -#define PG_MAJORVERSION "9.6" -#define PG_PRINTF_ATTRIBUTE printf -#define PG_VERSION "9.6.3" -#define PG_VERSION_NUM 90603 -#define PG_VERSION_STR "PostgreSQL 9.6.3 on x86_64-apple-darwin15.6.0, compiled by Apple LLVM version 7.0.2 (clang-700.1.81), 64-bit" -#define RELSEG_SIZE 131072 -#define SIZEOF_LONG 8 -#define SIZEOF_OFF_T 8 -#define SIZEOF_SIZE_T 8 -#define SIZEOF_VOID_P 8 -#define STDC_HEADERS 1 -#define STRERROR_R_INT 1 -#define USE_FLOAT4_BYVAL 1 -#define USE_FLOAT8_BYVAL 1 -#define USE_INTEGER_DATETIMES 1 -#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1 -#define USE_SYSV_SEMAPHORES 1 -#define USE_SYSV_SHARED_MEMORY 1 -#define WCSTOMBS_L_IN_XLOCALE 1 -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#endif -#define XLOG_BLCKSZ 8192 -#define XLOG_SEG_SIZE (16 * 1024 * 1024) diff --git a/ports/libpq/pg_config.linux.h b/ports/libpq/pg_config.linux.h deleted file mode 100644 index d3758bb9548976..00000000000000 --- a/ports/libpq/pg_config.linux.h +++ /dev/null @@ -1,173 +0,0 @@ -#define ACCEPT_TYPE_ARG1 int -#define ACCEPT_TYPE_ARG2 struct sockaddr * -#define ACCEPT_TYPE_ARG3 socklen_t -#define ACCEPT_TYPE_RETURN int -#define ALIGNOF_DOUBLE 8 -#define ALIGNOF_INT 4 -#define ALIGNOF_LONG 8 -#define ALIGNOF_SHORT 2 -#define BLCKSZ 8192 -#define DEF_PGPORT 5432 -#define DEF_PGPORT_STR "5432" -#define ENABLE_THREAD_SAFETY 1 -#define FLEXIBLE_ARRAY_MEMBER /**/ -#define FLOAT4PASSBYVAL true -#define FLOAT8PASSBYVAL true -#ifdef GETTIMEOFDAY_1ARG -# define gettimeofday(a,b) gettimeofday(a) -#endif -#define HAVE_ATOMICS 1 -#define HAVE_CBRT 1 -#define HAVE_CRYPT 1 -#define HAVE_CRYPT_H 1 -#define HAVE_DECL_FDATASYNC 1 -#define HAVE_DECL_F_FULLFSYNC 0 -#define HAVE_DECL_POSIX_FADVISE 1 -#define HAVE_DECL_SNPRINTF 1 -#define HAVE_DECL_STRLCAT 0 -#define HAVE_DECL_STRLCPY 0 -#define HAVE_DECL_SYS_SIGLIST 1 -#define HAVE_DECL_VSNPRINTF 1 -#define HAVE_DLOPEN 1 -#define HAVE_FDATASYNC 1 -#define HAVE_FSEEKO 1 -#define HAVE_FUNCNAME__FUNC 1 -#define HAVE_GCC__ATOMIC_INT32_CAS 1 -#define HAVE_GCC__ATOMIC_INT64_CAS 1 -#define HAVE_GCC__SYNC_CHAR_TAS 1 -#define HAVE_GCC__SYNC_INT32_CAS 1 -#define HAVE_GCC__SYNC_INT32_TAS 1 -#define HAVE_GCC__SYNC_INT64_CAS 1 -#define HAVE_GETADDRINFO 1 -#define HAVE_GETHOSTBYNAME_R 1 -#define HAVE_GETIFADDRS 1 -#define HAVE_GETOPT 1 -#define HAVE_GETOPT_H 1 -#define HAVE_GETOPT_LONG 1 -#define HAVE_GETPWUID_R 1 -#define HAVE_GETRLIMIT 1 -#define HAVE_GETRUSAGE 1 -#define HAVE_IFADDRS_H 1 -#define HAVE_INET_ATON 1 -#define HAVE_INTPTR_T 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_INT_OPTERR 1 -#define HAVE_INT_TIMEZONE 1 -#define HAVE_IPV6 1 -#define HAVE_ISINF 1 -#define HAVE_LANGINFO_H 1 -#define HAVE_LIBM 1 -#define HAVE_LIBZ 1 -#define HAVE_LOCALE_T 1 -#define HAVE_LONG_INT_64 1 -#define HAVE_LONG_LONG_INT 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMORY_H 1 -#define HAVE_MKDTEMP 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_NETINET_TCP_H 1 -#define HAVE_NET_IF_H 1 -#define HAVE_POLL 1 -#define HAVE_POLL_H 1 -#define HAVE_POSIX_FADVISE 1 -#define HAVE_PTHREAD 1 -#define HAVE_PTHREAD_PRIO_INHERIT 1 -#define HAVE_PWD_H 1 -#define HAVE_RANDOM 1 -#define HAVE_READLINK 1 -#define HAVE_RINT 1 -#define HAVE_SETSID 1 -#define HAVE_SHM_OPEN 1 -#define HAVE_SNPRINTF 1 -#define HAVE_SPINLOCKS 1 -#define HAVE_SRANDOM 1 -#define HAVE_SSL_GET_CURRENT_COMPRESSION 1 -#define HAVE_STDINT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRERROR 1 -#define HAVE_STRERROR_R 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRUCT_ADDRINFO 1 -#define HAVE_STRUCT_OPTION 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -#define HAVE_STRUCT_TM_TM_ZONE 1 -#define HAVE_SYMLINK 1 -#define HAVE_SYNC_FILE_RANGE 1 -#define HAVE_SYSLOG 1 -#define HAVE_SYS_EPOLL_H 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_IPC_H 1 -#define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_RESOURCE_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_SEM_H 1 -#define HAVE_SYS_SHM_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_UN_H 1 -#define HAVE_TERMIOS_H 1 -#define HAVE_TM_ZONE 1 -#define HAVE_TOWLOWER 1 -#define HAVE_TZNAME 1 -#define HAVE_UINTPTR_T 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UNIX_SOCKETS 1 -#define HAVE_UNSETENV 1 -#define HAVE_UNSIGNED_LONG_LONG_INT 1 -#define HAVE_UTIME 1 -#define HAVE_UTIMES 1 -#define HAVE_UTIME_H 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_WCHAR_H 1 -#define HAVE_WCSTOMBS 1 -#define HAVE_WCTYPE_H 1 -#define HAVE__BUILTIN_BSWAP32 1 -#define HAVE__BUILTIN_BSWAP64 1 -#define HAVE__BUILTIN_CONSTANT_P 1 -#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1 -#define HAVE__BUILTIN_UNREACHABLE 1 -#define HAVE__GET_CPUID 1 -#define HAVE__STATIC_ASSERT 1 -#define HAVE__VA_ARGS 1 -#define INT64_MODIFIER "l" -#define MAXIMUM_ALIGNOF 8 -#define MEMSET_LOOP_LIMIT 1024 -#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" -#define PACKAGE_NAME "PostgreSQL" -#define PACKAGE_STRING "PostgreSQL 9.6.3" -#define PACKAGE_TARNAME "postgresql" -#define PACKAGE_URL "" -#define PACKAGE_VERSION "9.6.3" -#define PG_INT128_TYPE __int128 -#define PG_INT64_TYPE long int -#define PG_KRB_SRVNAM "postgres" -#define PG_MAJORVERSION "9.6" -#define PG_PRINTF_ATTRIBUTE gnu_printf -#define PG_VERSION "9.6.3" -#define PG_VERSION_NUM 90603 -#define PG_VERSION_STR "PostgreSQL 9.6.3 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904, 64-bit" -#define RELSEG_SIZE 131072 -#define SIZEOF_LONG 8 -#define SIZEOF_OFF_T 8 -#define SIZEOF_SIZE_T 8 -#define SIZEOF_VOID_P 8 -#define STDC_HEADERS 1 -#define USE_FLOAT4_BYVAL 1 -#define USE_FLOAT8_BYVAL 1 -#define USE_INTEGER_DATETIMES 1 -#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1 -#define USE_SYSV_SEMAPHORES 1 -#define USE_SYSV_SHARED_MEMORY 1 -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#endif -#define XLOG_BLCKSZ 8192 -#define XLOG_SEG_SIZE (16 * 1024 * 1024) diff --git a/ports/libpq/portfile.cmake b/ports/libpq/portfile.cmake index 5dd4e197cc96f8..35cfd9e68aade5 100644 --- a/ports/libpq/portfile.cmake +++ b/ports/libpq/portfile.cmake @@ -1,32 +1,331 @@ -include(vcpkg_common_functions) +set(PORT_VERSION 12.2) +# NOTE: the python patches must be regenerated on version update -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} currently only supports being built for desktop") +macro(feature_unsupported) + foreach(_feat ${ARGN}) + if("${FEATURES}" MATCHES "${_feat}") + message(FATAL_ERROR "Feature ${_feat} not supported by configure script on the target platform") + endif() + endforeach() +endmacro() + +macro(feature_not_implemented_yet) + foreach(_feat ${ARGN}) + if("${FEATURES}" MATCHES "${_feat}") + message(FATAL_ERROR "Feature ${_feat} is not yet implement on the target platform") + endif() + endforeach() +endmacro() + +if(VCPKG_TARGET_IS_WINDOWS) + # on windows libpq seems to only depend on openssl gss(kerberos) and ldap on the soruce site_name + # the configuration header depends on zlib, nls, uuid, xml, xlst,gss,openssl,icu + feature_unsupported(readline bonjour libedit systemd llvm) + feature_not_implemented_yet(uuid) +elseif(VCPKG_TARGET_IS_OSX) + feature_not_implemented_yet(readline libedit systemd llvm python tcl uuid) +else() + feature_not_implemented_yet(readline bonjour libedit systemd llvm python tcl uuid) endif() +## Download and extract sources vcpkg_download_distfile(ARCHIVE - URLS "https://ftp.postgresql.org/pub/source/v9.6.3/postgresql-9.6.3.tar.bz2" - FILENAME "postgresql-9.6.3.tar.bz2" - SHA512 97141972e154e6b0e756ee6a4e20f26e82022a9fd4c56305314a3a5567a79ece638e4ac3d513b46138737ae6bd27a098f30013a94767db151181aac9c01290a1 + URLS "https://ftp.postgresql.org/pub/source/v${PORT_VERSION}/postgresql-${PORT_VERSION}.tar.bz2" + FILENAME "postgresql-${PORT_VERSION}.tar.bz2" + SHA512 0e0ce8e21856e8f43e58b840c10c4e3ffae6d5207e0d778e9176e36f8e20e34633cbb06f0030a7c963c3491bb7e941456d91b55444c561cfc6f283fba76f33ee ) +set(PATCHES + patches/windows/install.patch + patches/windows/win_bison_flex.patch + patches/windows/openssl_exe_path.patch + patches/windows/Solution.patch + patches/windows/MSBuildProject_fix_gendef_perl.patch + patches/windows/msgfmt.patch + patches/windows/python_lib.patch + patches/windows/fix-compile-flag-Zi.patch) + +if(VCPKG_TARGET_IS_MINGW) + list(APPEND PATCHES patches/mingw/additional-zlib-names.patch) + list(APPEND PATCHES patches/mingw/link-with-crypt32.patch) +endif() +if(VCPKG_TARGET_IS_LINUX) + list(APPEND PATCHES patches/linux/configure.patch) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND PATCHES patches/windows/MSBuildProject-static-lib.patch) + list(APPEND PATCHES patches/windows/Mkvcbuild-static-lib.patch) +endif() +if(VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND PATCHES patches/windows/MSBuildProject-static-crt.patch) +endif() +if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + list(APPEND PATCHES patches/windows/arm.patch) + list(APPEND PATCHES patches/windows/host_skip_openssl.patch) # Skip openssl.exe version check since it cannot be executed by the host +endif() +if(NOT "${FEATURES}" MATCHES "client") + list(APPEND PATCHES patches/windows/minimize_install.patch) +else() + set(HAS_TOOLS TRUE) +endif() vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} + PATCHES ${PATCHES} ) +unset(buildenv_contents) +# Get paths to required programs +set(REQUIRED_PROGRAMS PERL) +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND REQUIRED_PROGRAMS BISON FLEX) +endif() +foreach(program_name ${REQUIRED_PROGRAMS}) + # Need to rename win_bison and win_flex to just bison and flex + vcpkg_find_acquire_program(${program_name}) + get_filename_component(${program_name}_EXE_PATH ${${program_name}} DIRECTORY) + vcpkg_add_to_path(PREPEND "${${program_name}_EXE_PATH}") + set(buildenv_contents "${buildenv_contents}\n\$ENV{'PATH'}=\$ENV{'PATH'} . ';${${program_name}_EXE_PATH}';") +endforeach() + +## Setup build types +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE MATCHES "[Rr][Ee][Ll][Ee][Aa][Ss][Ee]") + set(_buildtype RELEASE) + set(_short rel) + list(APPEND port_config_list ${_buildtype}) + set(INSTALL_PATH_SUFFIX_${_buildtype} "") + set(BUILDPATH_${_buildtype} "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${_short}") + file(REMOVE_RECURSE "${BUILDPATH_${_buildtype}}") #Clean old builds + set(PACKAGE_DIR_${_buildtype} ${CURRENT_PACKAGES_DIR}) + unset(_short) + unset(_buildtype) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]") + set(_buildtype DEBUG) + set(_short dbg) + list(APPEND port_config_list ${_buildtype}) + set(INSTALL_PATH_SUFFIX_${_buildtype} "/debug") + set(BUILDPATH_${_buildtype} "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${_short}") + file(REMOVE_RECURSE "${BUILDPATH_${_buildtype}}") #Clean old builds + set(PACKAGE_DIR_${_buildtype} ${CURRENT_PACKAGES_DIR}${INSTALL_PATH_SUFFIX_${_buildtype}}) + unset(_short) + unset(_buildtype) +endif() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - "-DPORT_DIR=${CMAKE_CURRENT_LIST_DIR}" - OPTIONS_DEBUG - -DINSTALL_INCLUDES=OFF -) +## Do the build +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + file(GLOB SOURCE_FILES ${SOURCE_PATH}/*) + foreach(_buildtype ${port_config_list}) + # Copy libpq sources. + message(STATUS "Copying libpq source files to ${BUILDPATH_${_buildtype}}...") + foreach(SOURCE_FILE ${SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${BUILDPATH_${_buildtype}}") + endforeach() + message(STATUS "Copying libpq source files... done") + + vcpkg_apply_patches( + SOURCE_PATH "${BUILDPATH_${_buildtype}}" + PATCHES patches/windows/Solution_${_buildtype}.patch + patches/windows/python3_build_${_buildtype}.patch + ) + message(STATUS "Patches applied!") + file(COPY "${CURRENT_PORT_DIR}/config.pl" DESTINATION "${BUILDPATH_${_buildtype}}/src/tools/msvc") + + set(MSPROJ_PERL "${BUILDPATH_${_buildtype}}/src/tools/msvc/MSBuildProject.pm") + file(READ "${MSPROJ_PERL}" _contents) + string(REPLACE "perl" "\"${PERL}\"" _contents "${_contents}") + file(WRITE "${MSPROJ_PERL}" "${_contents}") -vcpkg_install_cmake() -vcpkg_copy_pdbs() + set(CONFIG_FILE "${BUILDPATH_${_buildtype}}/src/tools/msvc/config.pl") + file(READ "${CONFIG_FILE}" _contents) + + ## ldap => undef, # --with-ldap + ## extraver => undef, # --with-extra-version= + ## gss => undef, # --with-gssapi= + ## icu => undef, # --with-icu= ##done + ## nls => undef, # --enable-nls= ##done + ## tap_tests => undef, # --enable-tap-tests + ## tcl => undef, # --with-tcl= #done + ## perl => undef, # --with-perl + ## python => undef, # --with-python= ##done + ## openssl => undef, # --with-openssl= ##done + ## uuid => undef, # --with-ossp-uuid + ## xml => undef, # --with-libxml= ##done + ## xslt => undef, # --with-libxslt= ##done + ## iconv => undef, # (not in configure, path to iconv) ##done (needed by xml) + ## zlib => undef # --with-zlib= ##done + + ## Setup external dependencies + ##"-DFEATURES=core;openssl;zlib" "-DALL_FEATURES=openssl;zlib;readline;libedit;python;tcl;nls;systemd;llvm;icu;bonjour;uuid;xml;xslt;" + if("${FEATURES}" MATCHES "icu") + string(REPLACE "icu => undef" "icu => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "nls") + string(REPLACE "nls => undef" "nls => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + vcpkg_acquire_msys(MSYS_ROOT PACKAGES gettext) + vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") + endif() + if("${FEATURES}" MATCHES "openssl") + set(buildenv_contents "${buildenv_contents}\n\$ENV{'PATH'}=\$ENV{'PATH'} . ';${CURRENT_INSTALLED_DIR}/tools/openssl';") + #set(_contents "${_contents}\n\$ENV{PATH}=\$ENV{PATH} . ';${CURRENT_INSTALLED_DIR}/tools/openssl';") + string(REPLACE "openssl => undef" "openssl => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "python") + #vcpkg_find_acquire_program(PYTHON3) + #get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + #vcpkg_add_to_path("${PYTHON3_EXE_PATH}") + string(REPLACE "python => undef" "python => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "tcl") + string(REPLACE "tcl => undef" "tcl => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "xml") + string(REPLACE "xml => undef" "xml => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + string(REPLACE "iconv => undef" "iconv => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + if("${FEATURES}" MATCHES "xslt") + string(REPLACE "xslt => undef" "xslt => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + if("${FEATURES}" MATCHES "zlib") + string(REPLACE "zlib => undef" "zlib => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + file(WRITE "${CONFIG_FILE}" "${_contents}") + file(WRITE "${BUILDPATH_${_buildtype}}/src/tools/msvc/buildenv.pl" "${buildenv_contents}") + vcpkg_get_windows_sdk(VCPKG_TARGET_PLATFORM_VERSION) + set(ENV{MSBFLAGS} "/p:PlatformToolset=${VCPKG_PLATFORM_TOOLSET} + /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No + /p:WindowsTargetPlatformVersion=${VCPKG_TARGET_PLATFORM_VERSION} + /m + /p:ForceImportBeforeCppTargets=\"${SCRIPTS}/buildsystems/msbuild/vcpkg.targets\" + /p:VcpkgTriplet=${TARGET_TRIPLET} + /p:VcpkgCurrentInstalledDir=\"${CURRENT_INSTALLED_DIR}\"" + ) + if(HAS_TOOLS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(ENV{MSBFLAGS} "$ENV{MSBFLAGS} /p:Platform=Win32") + endif() + message(STATUS "Building libpq ${TARGET_TRIPLET}-${_buildtype}...") + vcpkg_execute_required_process( + COMMAND ${PERL} build.pl ${_buildtype} + WORKING_DIRECTORY ${BUILDPATH_${_buildtype}}/src/tools/msvc + LOGNAME build-${TARGET_TRIPLET}-${_buildtype} + ) + message(STATUS "Building libpq ${TARGET_TRIPLET}-${_buildtype}... done") + else() + set(build_libs libpq libecpg_compat) + foreach(build_lib ${build_libs}) + message(STATUS "Building ${build_lib} ${TARGET_TRIPLET}-${_buildtype}...") + vcpkg_execute_required_process( + COMMAND ${PERL} build.pl ${_buildtype} ${build_lib} + WORKING_DIRECTORY ${BUILDPATH_${_buildtype}}/src/tools/msvc + LOGNAME build-${build_lib}-${TARGET_TRIPLET}-${_buildtype} + ) + message(STATUS "Building ${build_lib} ${TARGET_TRIPLET}-${_buildtype}... done") + endforeach() + endif() + + message(STATUS "Installing libpq ${TARGET_TRIPLET}-${_buildtype}...") + vcpkg_execute_required_process( + COMMAND ${PERL} install.pl ${CURRENT_PACKAGES_DIR}${INSTALL_PATH_SUFFIX_${_buildtype}} client + WORKING_DIRECTORY ${BUILDPATH_${_buildtype}}/src/tools/msvc + LOGNAME install-${TARGET_TRIPLET}-${_buildtype} + ) + message(STATUS "Installing libpq ${TARGET_TRIPLET}-${_buildtype}... done") + endforeach() + + + message(STATUS "Cleanup libpq ${TARGET_TRIPLET}...") + #Cleanup + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/symbols) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/symbols) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + + if(NOT HAS_TOOLS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + else() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() + + message(STATUS "Cleanup libpq ${TARGET_TRIPLET}... - done") + set(USE_DL OFF) +else() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/Makefile DESTINATION ${SOURCE_PATH}) + + if("openssl" IN_LIST FEATURES) + list(APPEND BUILD_OPTS --with-openssl) + else() + list(APPEND BUILD_OPTS --without-openssl) + endif() + if("zlib" IN_LIST FEATURES) + list(APPEND BUILD_OPTS --with-zlib) + else() + list(APPEND BUILD_OPTS --without-zlib) + endif() + if("readline" IN_LIST FEATURES) + list(APPEND BUILD_OPTS --with-readline) + else() + list(APPEND BUILD_OPTS --without-readline) + endif() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + COPY_SOURCE + DETERMINE_BUILD_TRIPLET + OPTIONS + ${BUILD_OPTS} + OPTIONS_DEBUG + --enable-debug + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(ENV{LIBPQ_LIBRARY_TYPE} shared) + else() + set(ENV{LIBPQ_LIBRARY_TYPE} static) + endif() + if(VCPKG_TARGET_IS_MINGW) + set(ENV{USING_MINGW} yes) + endif() + vcpkg_install_make() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + if(NOT HAS_TOOLS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + else() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug) + endif() + if(VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpq.a ${CURRENT_PACKAGES_DIR}/lib/libpq.dll.a) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpq.dll ${CURRENT_PACKAGES_DIR}/bin/libpq.dll) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpq.a ${CURRENT_PACKAGES_DIR}/debug/lib/libpq.dll.a) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpq.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libpq.dll) + endif() + endif() + if(VCPKG_TARGET_IS_MINGW) + set(USE_DL OFF) + else() + set(USE_DL ON) + endif() +endif() -file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpq RENAME copyright) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/postgresql/vcpkg-cmake-wrapper.cmake" @ONLY) +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libpq/usage b/ports/libpq/usage new file mode 100644 index 00000000000000..8dfcd275480ab7 --- /dev/null +++ b/ports/libpq/usage @@ -0,0 +1,4 @@ +The package libpq provides CMake integration: + + find_package(PostgreSQL REQUIRED) + target_link_libraries(main PRIVATE PostgreSQL::PostgreSQL) diff --git a/ports/libpq/vcpkg-cmake-wrapper.cmake b/ports/libpq/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..200b10d48957a1 --- /dev/null +++ b/ports/libpq/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,66 @@ +# Give the CMake module a little bit of help to find the debug libraries +find_library(PostgreSQL_LIBRARY_DEBUG +NAMES pq +PATHS + "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" +NO_DEFAULT_PATH +) +_find_package(${ARGS}) +if(PostgreSQL_FOUND AND @USE_DL@) + find_library(PostgreSQL_DL_LIBRARY NAMES dl) + if(PostgreSQL_DL_LIBRARY) + list(APPEND PostgreSQL_LIBRARIES "dl") + if(TARGET PostgreSQL::PostgreSQL) + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") + endif() + endif() +endif() +if(PostgreSQL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + include(SelectLibraryConfigurations) + foreach(LIB_ITEM libpgport libpgcommon pgport pgcommon) + find_library(PostgreSQL_${LIB_ITEM}_LIBRARY_RELEASE + NAMES ${LIB_ITEM} + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH + ) + if(TARGET PostgreSQL::PostgreSQL AND PostgreSQL_${LIB_ITEM}_LIBRARY_RELEASE) + set_property( + TARGET PostgreSQL::PostgreSQL + APPEND PROPERTY INTERFACE_LINK_LIBRARIES "\$<\$>:${PostgreSQL_${LIB_ITEM}_LIBRARY_RELEASE}>" + ) + endif() + + find_library(PostgreSQL_${LIB_ITEM}_LIBRARY_DEBUG + NAMES ${LIB_ITEM} + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH + ) + if(TARGET PostgreSQL::PostgreSQL AND PostgreSQL_${LIB_ITEM}_LIBRARY_DEBUG) + set_property( + TARGET PostgreSQL::PostgreSQL + APPEND PROPERTY INTERFACE_LINK_LIBRARIES "\$<\$:${PostgreSQL_${LIB_ITEM}_LIBRARY_DEBUG}>" + ) + endif() + + if (PostgreSQL_${LIB_ITEM}_LIBRARY_RELEASE OR PostgreSQL_${LIB_ITEM}_LIBRARY_DEBUG) + select_library_configurations(PostgreSQL_${LIB_ITEM}) + list(APPEND PostgreSQL_LIBRARIES ${PostgreSQL_${LIB_ITEM}_LIBRARY}) + endif() + endforeach() + if(WIN32) + if(TARGET PostgreSQL::PostgreSQL) + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Secur32.lib") + endif() + list(APPEND PostgreSQL_LIBRARIES Secur32.lib) + endif() + cmake_policy(PUSH) + cmake_policy(SET CMP0057 NEW) + set(Z_VCPKG_PORT_FEATURES "@FEATURES@") + if("openssl" IN_LIST Z_VCPKG_PORT_FEATURES) + find_package(OpenSSL REQUIRED) + if(TARGET PostgreSQL::PostgreSQL) + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "OpenSSL::SSL") + endif() + list(APPEND PostgreSQL_LIBRARIES OpenSSL::SSL) + endif() + unset(Z_VCPKG_PORT_FEATURES) + cmake_policy(POP) +endif() diff --git a/ports/libpq/vcpkg.json b/ports/libpq/vcpkg.json new file mode 100644 index 00000000000000..446b58b2dc31fd --- /dev/null +++ b/ports/libpq/vcpkg.json @@ -0,0 +1,116 @@ +{ + "name": "libpq", + "version": "12.2", + "port-version": 18, + "description": "The official database access API of postgresql", + "homepage": "https://www.postgresql.org/", + "supports": "!uwp", + "dependencies": [ + { + "name": "libpq", + "default-features": false, + "features": [ + "bonjour" + ], + "platform": "osx" + } + ], + "default-features": [ + "openssl", + "zlib" + ], + "features": { + "bonjour": { + "description": "Build with Bonjour support (--with-bonjour)" + }, + "client": { + "description": "Build all client tools and libraries." + }, + "icu": { + "description": "Build with support for the ICU library (--with-icu)", + "dependencies": [ + "icu" + ] + }, + "libedit": { + "description": "prefer libedit (--with-libedit-preferred)", + "dependencies": [ + "libedit" + ] + }, + "llvm": { + "description": "Build with support for LLVM based JIT compilation (--with-llvm)", + "dependencies": [ + "llvm" + ] + }, + "nls": { + "description": "Native Language Support (--enable-nls[=LANGUAGES])", + "dependencies": [ + "gettext" + ] + }, + "openssl": { + "description": "support for encrypted client connections and random number generation on platforms that do not have \"/dev/urandom\" (except windows) (--with-openssl)", + "dependencies": [ + "openssl" + ] + }, + "python": { + "description": "build the PL/Python server programming language (dynamic only?) (--with-python)", + "dependencies": [ + { + "name": "libpq", + "default-features": false, + "features": [ + "client" + ] + }, + "python3" + ] + }, + "readline": { + "description": "Use readline (else --without-readline)", + "dependencies": [ + "readline" + ] + }, + "systemd": { + "description": "Build with support for systemd service notifications. (--with-systemd)" + }, + "tcl": { + "description": "build the PL/Tcl procedural language(dynamic only?) (--with-tcl)", + "dependencies": [ + { + "name": "libpq", + "default-features": false, + "features": [ + "client" + ] + }, + "tcl" + ] + }, + "uuid": { + "description": "Build the uuid-ossp module (which provides functions to generate UUIDs) (--with-uuid=LIBRARY LIBRARY=(bsd|e2fs|ossp))" + }, + "xml": { + "description": "Build with libxml (--with-libxml)", + "dependencies": [ + "libxml2" + ] + }, + "xslt": { + "description": "Build with libxslt (--with-libxslt)", + "dependencies": [ + "libxslt" + ] + }, + "zlib": { + "description": "Use zlib (else --without-zlib)", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/libpqxx/CMakeLists.txt b/ports/libpqxx/CMakeLists.txt deleted file mode 100644 index 056684d2364451..00000000000000 --- a/ports/libpqxx/CMakeLists.txt +++ /dev/null @@ -1,70 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(libpqxx VERSION 6.4.3 LANGUAGES CXX) - -set(CMAKE_DEBUG_POSTFIX "d") -set(CMAKE_CXX_STANDARD 14) - -find_library(LIBPQD NAMES libpqd pqd) -find_library(LIBPQ NAMES libpq pq) -find_path(LIBPQ_FE_H libpq-fe.h) -find_path(POSTGRES_EXT_H postgres_ext.h) - -include(CheckIncludeFileCXX) - -check_include_file_cxx(poll.h HAVE_POLL) -check_include_file_cxx(sys/select.h HAVE_SYS_SELECT_H) -check_include_file_cxx(sys/time.h HAVE_SYS_TIME_H) -check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H) -check_include_file_cxx(unistd.h HAVE_UNISTD_H) - -include(CheckCXXSourceCompiles) - -check_cxx_source_compiles("[[deprecated]] void f(); -int main() { return 0; }" PQXX_HAVE_DEPRECATED) -check_cxx_source_compiles("#include -int main() { return std::optional(0).value(); }" PQXX_HAVE_OPTIONAL) -check_cxx_source_compiles("#include -int main() { return std::experimental::optional(0).value(); }" PQXX_HAVE_EXP_OPTIONAL) - -configure_file(config-internal-compiler.h.in pqxx/config-internal-compiler.h) -configure_file(config-public-compiler.h.in pqxx/config-public-compiler.h) - -file(GLOB SRCS "${PROJECT_SOURCE_DIR}/src/*.cxx") - -if(BUILD_SHARED_LIBS) - set(TARGET libpqxx) - set(SHARED_DEFINITION -DPQXX_SHARED) - list(APPEND SRCS "${PROJECT_SOURCE_DIR}/win32/libpqxx.cxx") -else() - set(TARGET libpqxx_static) - set(SHARED_DEFINITION "") -endif() - -add_library(${TARGET} ${SRCS}) -target_compile_definitions(${TARGET} PRIVATE -DPQXX_INTERNAL -DNOMINMAX ${SHARED_DEFINITION}) -target_include_directories(${TARGET} PRIVATE include ${LIBPQ_FE_H} ${POSTGRES_EXT_H} ${CMAKE_BINARY_DIR}) -target_link_libraries(${TARGET} PRIVATE ws2_32) -if(LIBPQD AND LIBPQ) - target_link_libraries(${TARGET} PRIVATE debug ${LIBPQD} optimized ${LIBPQ}) -elseif(LIBPQD) - target_link_libraries(${TARGET} PRIVATE ${LIBPQD}) -else() - target_link_libraries(${TARGET} PRIVATE ${LIBPQ}) -endif() - -install(TARGETS ${TARGET} - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - ) -install(DIRECTORY include/ DESTINATION include - CONFIGURATIONS Release - PATTERN "doc" EXCLUDE - PATTERN "*.am" EXCLUDE - PATTERN "*.in" EXCLUDE - PATTERN "*.template" EXCLUDE - ) -install(DIRECTORY ${CMAKE_BINARY_DIR}/pqxx/ DESTINATION include/pqxx - CONFIGURATIONS Release - FILES_MATCHING PATTERN "*.h" - ) diff --git a/ports/libpqxx/CONTROL b/ports/libpqxx/CONTROL deleted file mode 100644 index 8653afe5a0e98c..00000000000000 --- a/ports/libpqxx/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libpqxx -Version: 6.4.4 -Homepage: https://github.com/jtv/libpqxx -Description: The official C++ client API for PostgreSQL -Build-Depends: libpq diff --git a/ports/libpqxx/fix-deprecated-bug.patch b/ports/libpqxx/fix-deprecated-bug.patch deleted file mode 100644 index d3486be7a8f5a0..00000000000000 --- a/ports/libpqxx/fix-deprecated-bug.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/include/pqxx/tablereader.hxx b/include/pqxx/tablereader.hxx -index f5300cb..0cc0e43 100644 ---- a/include/pqxx/tablereader.hxx -+++ b/include/pqxx/tablereader.hxx -@@ -34,13 +34,13 @@ public: - const std::string &Name, - const std::string &Null=std::string{}); - template -- PQXX_DEPRECATED tablereader( -+ tablereader( - transaction_base &, - const std::string &Name, - ITER begincolumns, - ITER endcolumns); - template -- PQXX_DEPRECATED tablereader( -+ tablereader( - transaction_base &, - const std::string &Name, - ITER begincolumns, -diff --git a/include/pqxx/tablewriter.hxx b/include/pqxx/tablewriter.hxx -index 32e7a98..a25b356 100644 ---- a/include/pqxx/tablewriter.hxx -+++ b/include/pqxx/tablewriter.hxx -@@ -36,13 +36,13 @@ public: - const std::string &WName, - const std::string &Null=std::string{}); - template -- PQXX_DEPRECATED tablewriter( -+ tablewriter( - transaction_base &, - const std::string &WName, - ITER begincolumns, - ITER endcolumns); - template -- PQXX_DEPRECATED tablewriter( -+ tablewriter( - transaction_base &T, - const std::string &WName, - ITER begincolumns, diff --git a/ports/libpqxx/fix_build_with_vs2017.patch b/ports/libpqxx/fix_build_with_vs2017.patch new file mode 100644 index 00000000000000..a10b8d161c9126 --- /dev/null +++ b/ports/libpqxx/fix_build_with_vs2017.patch @@ -0,0 +1,103 @@ +diff --git a/include/pqxx/compiler-public.hxx b/include/pqxx/compiler-public.hxx +index 5d24c7e..8087191 100644 +--- a/include/pqxx/compiler-public.hxx ++++ b/include/pqxx/compiler-public.hxx +@@ -43,6 +43,11 @@ + // Workarounds for Microsoft Visual C++ + # ifdef _MSC_VER + ++// Workarounds for deprecated attribute syntax error in Visual Studio 2017. ++# if _MSC_VER < 1920 ++# define PQXX_DEPRECATED(MESSAGE) __declspec(deprecated( #MESSAGE )) ++# endif ++ + // Suppress vtables on abstract classes. + # define PQXX_NOVTABLE __declspec(novtable) + +@@ -112,6 +117,10 @@ + # define PQXX_NOVTABLE /* novtable */ + #endif + ++#ifndef PQXX_DEPRECATED ++# define PQXX_DEPRECATED(MESSAGE) [[deprecated( #MESSAGE )]] ++#endif ++ + // TODO: Assume support once we're on C++20. + #if defined(PQXX_HAVE_LIKELY) + # define PQXX_LIKELY [[likely]] +diff --git a/include/pqxx/stream_from.hxx b/include/pqxx/stream_from.hxx +index f2dcc31..6a74b55 100644 +--- a/include/pqxx/stream_from.hxx ++++ b/include/pqxx/stream_from.hxx +@@ -148,7 +148,7 @@ public: + /** @deprecated Use factory function @c table() or @c raw_table() instead. + */ + template +- [[deprecated("Use table() or raw_table() factory instead.")]] stream_from( ++ PQXX_DEPRECATED("Use table() or raw_table() factory instead.") stream_from( + transaction_base &, from_table_t, std::string_view table, + Iter columns_begin, Iter columns_end); + +@@ -156,13 +156,13 @@ public: + /** @deprecated Use factory function @c query() instead. + */ + template +- [[deprecated("Use table() or raw_table() factory instead.")]] stream_from( ++ PQXX_DEPRECATED("Use table() or raw_table() factory instead.") stream_from( + transaction_base &tx, from_table_t, std::string_view table, + Columns const &columns); + + #include "pqxx/internal/ignore-deprecated-pre.hxx" + /// @deprecated Use factory function @c table() or @c raw_table() instead. +- [[deprecated("Use the from_table_t overload instead.")]] stream_from( ++ PQXX_DEPRECATED("Use the from_table_t overload instead.") stream_from( + transaction_base &tx, std::string_view table) : + stream_from{tx, from_table, table} + {} +@@ -170,14 +170,14 @@ public: + + /// @deprecated Use factory function @c table() or @c raw_table() instead. + template +- [[deprecated("Use the from_table_t overload instead.")]] stream_from( ++ PQXX_DEPRECATED("Use the from_table_t overload instead.") stream_from( + transaction_base &tx, std::string_view table, Columns const &columns) : + stream_from{tx, from_table, table, columns} + {} + + /// @deprecated Use factory function @c table() or @c raw_table() instead. + template +- [[deprecated("Use the from_table_t overload instead.")]] stream_from( ++ PQXX_DEPRECATED("Use the from_table_t overload instead.") stream_from( + transaction_base &, std::string_view table, Iter columns_begin, + Iter columns_end); + +diff --git a/include/pqxx/stream_to.hxx b/include/pqxx/stream_to.hxx +index 3ad0292..4b52e31 100644 +--- a/include/pqxx/stream_to.hxx ++++ b/include/pqxx/stream_to.hxx +@@ -168,7 +168,7 @@ public: + * your data fields and the table is explicit in your code, and not hidden + * in an "implicit contract" between your code and your schema. + */ +- [[deprecated("Use table() or raw_table() factory.")]] stream_to( ++ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to( + transaction_base &tx, std::string_view table_name) : + stream_to{tx, table_name, ""sv} + {} +@@ -177,14 +177,14 @@ public: + /** @deprecated Use @c table() or @c raw_table() as a factory. + */ + template +- [[deprecated("Use table() or raw_table() factory.")]] stream_to( ++ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to( + transaction_base &, std::string_view table_name, Columns const &columns); + + /// Create a stream, specifying column names as a sequence of strings. + /** @deprecated Use @c table() or @c raw_table() as a factory. + */ + template +- [[deprecated("Use table() or raw_table() factory.")]] stream_to( ++ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to( + transaction_base &, std::string_view table_name, Iter columns_begin, + Iter columns_end); + diff --git a/ports/libpqxx/portfile.cmake b/ports/libpqxx/portfile.cmake index 944698ceb28739..a8bb2c2db9fd47 100644 --- a/ports/libpqxx/portfile.cmake +++ b/ports/libpqxx/portfile.cmake @@ -1,25 +1,26 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jtv/libpqxx - REF 6.4.4 - SHA512 a168dbc7af210c711fa9f0f6e20d9d3abea167d412a642f591b104a109f11f4c262a27b6919340d405400a58baf7bcc663f7d3ec1b4ecd03f0a4b6c2960b5099 + REF 221ddc8be329bafb376a3d83b9cd257fd52fc7b7 # 7.6.0 + SHA512 32a673bbae2f26fbc41bdcba007d9a5ded29680cb49ba434d1913cd5007bc1c1443bf38c88d9c5a6abe0a3ee519c0f691464c8d2b144cd3f16652447d644e400 HEAD_REF master - PATCHES - fix-deprecated-bug.patch + PATCHES + fix_build_with_vs2017.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config-public-compiler.h.in DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config-internal-compiler.h.in DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/config-public-compiler.h.in" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/config-internal-compiler.h.in" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DSKIP_BUILD_TEST=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpqxx RENAME copyright) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libpqxx) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libpqxx/vcpkg.json b/ports/libpqxx/vcpkg.json new file mode 100644 index 00000000000000..3f493980a4253f --- /dev/null +++ b/ports/libpqxx/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "libpqxx", + "version-semver": "7.6.0", + "port-version": 1, + "description": "The official C++ client API for PostgreSQL", + "homepage": "https://www.postgresql.org/", + "dependencies": [ + "libpq", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libprotobuf-mutator/portfile.cmake b/ports/libprotobuf-mutator/portfile.cmake new file mode 100644 index 00000000000000..9ce795f25553ea --- /dev/null +++ b/ports/libprotobuf-mutator/portfile.cmake @@ -0,0 +1,29 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/libprotobuf-mutator + REF v1.0 + SHA512 75e423289f938d4332d98033062cd9608b71141b7ca1df4e8f28c927c51a16e7ff2f5bf08867308d2a291fc2422e4456f8928ab2c11d545eeb982ea732baf2e9 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_RUNTIME) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLIB_PROTO_MUTATOR_TESTING=OFF + -DLIB_PROTO_MUTATOR_MSVC_STATIC_RUNTIME=${STATIC_RUNTIME} + -DPKG_CONFIG_PATH=lib/pkgconfig +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libprotobuf-mutator/vcpkg.json b/ports/libprotobuf-mutator/vcpkg.json new file mode 100644 index 00000000000000..e41bf2652cdbd9 --- /dev/null +++ b/ports/libprotobuf-mutator/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libprotobuf-mutator", + "version-string": "1.0", + "description": "Library for structured fuzzing with protobuffers.", + "dependencies": [ + "protobuf" + ] +} diff --git a/ports/libproxy/fix-arm-build.patch b/ports/libproxy/fix-arm-build.patch new file mode 100644 index 00000000000000..c334b8b99a6476 --- /dev/null +++ b/ports/libproxy/fix-arm-build.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1c68939..9ef6895 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,6 +42,9 @@ else() + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + endif() + ++if (WIN32) ++ link_libraries(Advapi32) ++endif() + # Conditionally build bindings + if(NOT WIN32) + add_subdirectory(bindings) diff --git a/ports/libproxy/fix-dependency-libmodman.patch b/ports/libproxy/fix-dependency-libmodman.patch new file mode 100644 index 00000000000000..84a17411bc56c0 --- /dev/null +++ b/ports/libproxy/fix-dependency-libmodman.patch @@ -0,0 +1,52 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4f51e38..32a0319 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -31,11 +31,15 @@ include(cmake/ctest.cmk) + include(cmake/paths.cmk) + + option(WITH_WEBKIT3 "Build against gtk-3 version of webkitgtk" OFF) +- +-### Subdirectories +- +-add_subdirectory(libmodman) +-include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ++find_package(libmodman REQUIRED) ++if(LIBMODMAN_FOUND) ++ include_directories(${LIBMODMAN_INCLUDE_DIR}) ++ link_libraries(${LIBMODMAN_LIBRARIES}) ++else() ++ ### Subdirectories ++ add_subdirectory(libmodman) ++ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ++endif() + + # Conditionally build bindings + if(NOT WIN32) +diff --git a/libproxy/cmake/libproxy.cmk b/libproxy/cmake/libproxy.cmk +index 9356486..f9eed2c 100644 +--- a/libproxy/cmake/libproxy.cmk ++++ b/libproxy/cmake/libproxy.cmk +@@ -1,8 +1,8 @@ + add_library(libproxy SHARED extension_config.cpp extension_pacrunner.cpp extension_wpad.cpp proxy.cpp url.cpp ${LIBPROXY_SOURCES}) + if(WIN32) +- target_link_libraries(libproxy modman;ws2_32;${LIBPROXY_LIBRARIES}) ++ target_link_libraries(libproxy ${LIBMODMAN_LIBRARIES};ws2_32;${LIBPROXY_LIBRARIES}) + else() +- target_link_libraries(libproxy modman;m;pthread;${CMAKE_DL_LIBS};${LIBPROXY_LIBRARIES}) ++ target_link_libraries(libproxy ${LIBMODMAN_LIBRARIES};m;pthread;${CMAKE_DL_LIBS};${LIBPROXY_LIBRARIES}) + endif() + file(TO_NATIVE_PATH ${MODULE_INSTALL_DIR} MODULE_INSTALL_DIR) + if(WIN32) +@@ -21,8 +21,8 @@ set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/proxy.cpp + set_target_properties(libproxy PROPERTIES PREFIX "" VERSION 1.0.0 SOVERSION 1) + set_target_properties(libproxy PROPERTIES INTERFACE_LINK_LIBRARIES "") + set_target_properties(libproxy PROPERTIES LINK_INTERFACE_LIBRARIES "") +-if(NOT APPLE) +- set_target_properties(libproxy PROPERTIES LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libproxy.map") +-endif() ++#if(NOT APPLE) ++# set_target_properties(libproxy PROPERTIES LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libproxy.map") ++#endif() + install(TARGETS libproxy RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + install(FILES proxy.h DESTINATION ${INCLUDE_INSTALL_DIR}) diff --git a/ports/libproxy/fix-install-py.patch b/ports/libproxy/fix-install-py.patch new file mode 100644 index 00000000000000..c429be74b0fdfb --- /dev/null +++ b/ports/libproxy/fix-install-py.patch @@ -0,0 +1,36 @@ +diff --git a/bindings/python/python3/CMakeLists.txt b/bindings/python/python3/CMakeLists.txt +index bf87dfc..9f94c2d 100644 +--- a/bindings/python/python3/CMakeLists.txt ++++ b/bindings/python/python3/CMakeLists.txt +@@ -21,5 +21,4 @@ if(PYTHON3INTERP_FOUND) + + message(STATUS "Using PYTHON3_SITEPKG_DIR=${PYTHON3_SITEPKG_DIR}") + +- install(FILES ../libproxy.py DESTINATION ${PYTHON3_SITEPKG_DIR}) + endif() +diff --git a/bindings/python/python2/CMakeLists.txt b/bindings/python/python2/CMakeLists.txt +index 00df551..15d78f9 100644 +--- a/bindings/python/python2/CMakeLists.txt ++++ b/bindings/python/python2/CMakeLists.txt +@@ -21,5 +21,4 @@ if(PYTHON2INTERP_FOUND) + + message(STATUS "Using PYTHON2_SITEPKG_DIR=${PYTHON2_SITEPKG_DIR}") + +- install(FILES ../libproxy.py DESTINATION ${PYTHON2_SITEPKG_DIR}) + endif() +diff --git a/bindings/perl/lib/CMakeLists.txt b/bindings/perl/lib/CMakeLists.txt +index 9856627..f54c138 100644 +--- a/bindings/perl/lib/CMakeLists.txt ++++ b/bindings/perl/lib/CMakeLists.txt +@@ -1,2 +1 @@ + add_custom_target(PMlibproxy ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Libproxy.pm ${CMAKE_BINARY_DIR}/perl/blib/lib/Libproxy.pm) +-install( FILES Libproxy.pm DESTINATION ${PX_PERL_ARCH}/Net ) +diff --git a/bindings/perl/src/CMakeLists.txt b/bindings/perl/src/CMakeLists.txt +index 05176c4..9ca532f 100644 +--- a/bindings/perl/src/CMakeLists.txt ++++ b/bindings/perl/src/CMakeLists.txt +@@ -21,4 +21,3 @@ target_link_libraries(PLlibproxy ${PLlibproxy_LIB_DEPENDENCIES}) + set_target_properties(PLlibproxy PROPERTIES OUTPUT_NAME "Libproxy") + set_target_properties(PLlibproxy PROPERTIES PREFIX "") + +-install( TARGETS PLlibproxy DESTINATION ${PX_PERL_ARCH}/auto/Net/Libproxy ) diff --git a/ports/libproxy/fix-module-lib-name.patch b/ports/libproxy/fix-module-lib-name.patch new file mode 100644 index 00000000000000..2a8790afed1c93 --- /dev/null +++ b/ports/libproxy/fix-module-lib-name.patch @@ -0,0 +1,13 @@ +diff --git a/libproxy/Findlibproxy.cmake.in b/libproxy/Findlibproxy.cmake.in +index ef44489..c0bd2ae 100644 +--- a/libproxy/Findlibproxy.cmake.in ++++ b/libproxy/Findlibproxy.cmake.in +@@ -12,7 +12,7 @@ + + # Find proxy.h and the corresponding library (libproxy.so) + FIND_PATH(LIBPROXY_INCLUDE_DIR proxy.h ) +-FIND_LIBRARY(LIBPROXY_LIBRARIES NAMES proxy ) ++FIND_LIBRARY(LIBPROXY_LIBRARIES NAMES proxy libproxy) + + # Set library version + SET(LIBPROXY_VERSION @PROJECT_VERSION@) diff --git a/ports/libproxy/fix-tools-path.patch b/ports/libproxy/fix-tools-path.patch new file mode 100644 index 00000000000000..ba506117077c53 --- /dev/null +++ b/ports/libproxy/fix-tools-path.patch @@ -0,0 +1,27 @@ +diff --git a/libproxy/cmake/pxmodule.cmk b/libproxy/cmake/pxmodule.cmk +index bbbd989..956948a 100644 +--- a/libproxy/cmake/pxmodule.cmk ++++ b/libproxy/cmake/pxmodule.cmk +@@ -20,7 +20,7 @@ function(px_module name build builtin) + add_library(${name} MODULE modules/${name}.cpp) + target_link_libraries(${name} libproxy) + set_target_properties(${name} PROPERTIES PREFIX "") +- install(TARGETS ${name} LIBRARY DESTINATION ${MODULE_INSTALL_DIR}) ++ install(TARGETS ${name} LIBRARY DESTINATION tools) + if(${ARGC} GREATER 3) + target_link_libraries(${name} ${ARGN}) + endif() +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index 52010c6..0a3f4b5 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -1,5 +1,7 @@ + include_directories("../libproxy") + ++if (BUILD_TOOLS) + add_executable(proxy proxy.c) + target_link_libraries(proxy libproxy) +-install(TARGETS proxy RUNTIME DESTINATION ${BIN_INSTALL_DIR}) ++install(TARGETS proxy RUNTIME DESTINATION tools) ++endif() +\ No newline at end of file diff --git a/ports/libproxy/portfile.cmake b/ports/libproxy/portfile.cmake new file mode 100644 index 00000000000000..94c3ecda3f817e --- /dev/null +++ b/ports/libproxy/portfile.cmake @@ -0,0 +1,49 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +# Enable static build in UNIX +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libproxy/libproxy + REF e78a5ccfe0a2340f2c73e419767f8492ffc2787a #0.4.17 + SHA512 b22251f73f7a94dade5dcdcd9d5510170038b0d101ee98ab427106c20a3d9979c2b16c57d6cf8d8ae59c3a28ccffcecafc0bed399926dc2416a27837fd2f043c + HEAD_REF master + PATCHES + fix-tools-path.patch + support-windows.patch + fix-dependency-libmodman.patch + fix-install-py.patch + fix-arm-build.patch + fix-module-lib-name.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + bindings-csharp WITH_DOTNET + bindings-python WITH_PYTHON2 + bindings-python WITH_PYTHON3 + bindings-perl WITH_PERL + bindings-vala WITH_VALA + tools BUILD_TOOLS + tests BUILD_TESTING +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + -DWITH_WEBKIT3=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/Modules) +vcpkg_copy_pdbs() + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" + "${CMAKE_CURRENT_LIST_DIR}/usage" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(REMOVE_RECURSE "${LIBPROXY_TOOLS}" "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libproxy/support-windows.patch b/ports/libproxy/support-windows.patch new file mode 100644 index 00000000000000..1cad01ff412fe2 --- /dev/null +++ b/ports/libproxy/support-windows.patch @@ -0,0 +1,31 @@ +diff --git a/cmake/paths.cmk b/cmake/paths.cmk +index 593ebc1..bbf8754 100644 +--- a/cmake/paths.cmk ++++ b/cmake/paths.cmk +@@ -1,4 +1,4 @@ +-if(WIN32 AND NOT MINGW) ++if(0) + set(CMAKE_INSTALL_PREFIX "" CACHE PATH "Install prefix") + set(BIN_INSTALL_DIR . CACHE PATH "Binary install dir") + set(LIB_INSTALL_DIR . CACHE PATH "Library install dir") +diff --git a/libproxy/cmake/devfiles.cmk b/libproxy/cmake/devfiles.cmk +index 0301dce..0eb5f83 100644 +--- a/libproxy/cmake/devfiles.cmk ++++ b/libproxy/cmake/devfiles.cmk +@@ -1,4 +1,4 @@ +-if(NOT WIN32 OR MINGW) ++if(1) + # PkgConfig file + set (PKGCONFIG_PREFIX ${CMAKE_INSTALL_PREFIX}) + +diff --git a/libproxy/cmake/libproxy.cmk b/libproxy/cmake/libproxy.cmk +index de68e5c..9356486 100644 +--- a/libproxy/cmake/libproxy.cmk ++++ b/libproxy/cmake/libproxy.cmk +@@ -24,5 +24,5 @@ set_target_properties(libproxy PROPERTIES LINK_INTERFACE_LIBRARIES "") + if(NOT APPLE) + set_target_properties(libproxy PROPERTIES LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libproxy.map") + endif() +-install(TARGETS libproxy DESTINATION ${LIB_INSTALL_DIR}) ++install(TARGETS libproxy RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + install(FILES proxy.h DESTINATION ${INCLUDE_INSTALL_DIR}) diff --git a/ports/libproxy/usage b/ports/libproxy/usage new file mode 100644 index 00000000000000..a37b13c5ada3dc --- /dev/null +++ b/ports/libproxy/usage @@ -0,0 +1,5 @@ +The package libproxy provides CMake targets: + + find_package(libproxy CONFIG REQUIRED) + target_include_directories(main PRIVATE ${LIBPROXY_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${LIBPROXY_LIBRARIES}) diff --git a/ports/libproxy/vcpkg-cmake-wrapper.cmake b/ports/libproxy/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..63158432bc5ae4 --- /dev/null +++ b/ports/libproxy/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(LIBPROXY_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${LIBPROXY_PREV_MODULE_PATH}) diff --git a/ports/libproxy/vcpkg.json b/ports/libproxy/vcpkg.json new file mode 100644 index 00000000000000..15e72c018e6b1a --- /dev/null +++ b/ports/libproxy/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "libproxy", + "version": "0.4.17", + "description": "libproxy is a library that provides automatic proxy configuration management.", + "homepage": "https://github.com/libproxy/libproxy", + "dependencies": [ + "libmodman", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "bindings-csharp": { + "description": "Install C# bindings" + }, + "bindings-perl": { + "description": "Install PERL bindings" + }, + "bindings-python": { + "description": "Install Python bindings" + }, + "bindings-ruby": { + "description": "Install Ruby bindings" + }, + "bindings-vala": { + "description": "Install Vala bindings" + }, + "tests": { + "description": "Build libproxy tests" + }, + "tools": { + "description": "build tools" + } + } +} diff --git a/ports/libqcow/CMakeLists.txt b/ports/libqcow/CMakeLists.txt new file mode 100644 index 00000000000000..ac199f48fe9ccf --- /dev/null +++ b/ports/libqcow/CMakeLists.txt @@ -0,0 +1,83 @@ +cmake_minimum_required(VERSION 3.12) + +project(libqcow C) + +find_package(OpenSSL) +find_package(ZLIB REQUIRED) + +if(MSVC) + add_compile_definitions(_CRT_SECURE_NO_DEPRECATE) + add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_compile_definitions(HAVE_LOCAL_LIBCAES) +add_compile_definitions(HAVE_LOCAL_LIBCERROR) +add_compile_definitions(HAVE_LOCAL_LIBCTHREADS) +add_compile_definitions(HAVE_LOCAL_LIBCDATA) +add_compile_definitions(HAVE_LOCAL_LIBCLOCALE) +add_compile_definitions(HAVE_LOCAL_LIBCNOTIFY) +add_compile_definitions(HAVE_LOCAL_LIBCSPLIT) +add_compile_definitions(HAVE_LOCAL_LIBCFILE) +add_compile_definitions(HAVE_LOCAL_LIBCPATH) +add_compile_definitions(HAVE_LOCAL_LIBUNA) +add_compile_definitions(HAVE_LOCAL_LIBBFIO) +add_compile_definitions(HAVE_LOCAL_LIBFCACHE) +add_compile_definitions(HAVE_LOCAL_LIBFDATA) +add_compile_definitions(ZLIB_DLL) + +if(UNIX) + configure_file(common/config.h.in common/config.h) + add_compile_definitions(HAVE_CONFIG_H) + add_compile_definitions(LOCALEDIR="/usr/share/locale") +endif() + +if(MSVC) + add_compile_definitions(LIBQCOW_DLL_EXPORT) + set(LIB_RC libqcow/libqcow.rc) +endif() + + +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) + +# Add CMake find_package() integration +set(PROJECT_TARGET_NAME "${PROJECT_NAME}") +set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") +set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/generated/${PROJECT_TARGET_NAME}Config.cmake") +set(TARGETS_EXPORT_NAME "${PROJECT_TARGET_NAME}Targets") +set(NAMESPACE "libqcow::") + +# Source files +file(GLOB LIB_SRC lib*/*.c) + +# Headers +file(GLOB LIB_INST_HEADERS include/libqcow/*.h) + +add_library(${PROJECT_NAME} ${LIB_SRC} ${LIB_RC}) + +target_include_directories(${PROJECT_NAME} PRIVATE ./include ./common) +target_include_directories(${PROJECT_NAME} PRIVATE ./libbfio ./libcaes ./libcdata ./libcerror ./libcfile ./libclocale) +target_include_directories(${PROJECT_NAME} PRIVATE ./libcnotify ./libcpath ./libcsplit ./libcthreads) +target_include_directories(${PROJECT_NAME} PRIVATE ./libfcache ./libfdata ./libuna) + +target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB OpenSSL::Crypto) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${TARGETS_EXPORT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + INCLUDES DESTINATION include) + +install(FILES ${LIB_INST_HEADERS} DESTINATION include/libqcow) +install(FILES include/libqcow.h DESTINATION include) + + +# Generate and install libqcowConfig.cmake +configure_package_config_file("Config.cmake.in" "${PROJECT_CONFIG}" INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}") +install(FILES "${PROJECT_CONFIG}" DESTINATION "${CONFIG_INSTALL_DIR}") + +# Generate and install libqcowTargets*.cmake +install(EXPORT ${TARGETS_EXPORT_NAME} + NAMESPACE ${NAMESPACE} + DESTINATION "${CONFIG_INSTALL_DIR}") diff --git a/ports/libqcow/Config.cmake.in b/ports/libqcow/Config.cmake.in new file mode 100644 index 00000000000000..bd6bd4532b6282 --- /dev/null +++ b/ports/libqcow/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/ports/libqcow/macos_fixes.patch b/ports/libqcow/macos_fixes.patch new file mode 100644 index 00000000000000..4e3061c22050de --- /dev/null +++ b/ports/libqcow/macos_fixes.patch @@ -0,0 +1,38 @@ +diff --git a/libcfile/libcfile_file.c b/libcfile/libcfile_file.c +index a618083..5299c77 100644 +--- a/libcfile/libcfile_file.c ++++ b/libcfile/libcfile_file.c +@@ -56,7 +56,7 @@ + #elif defined( HAVE_CYGWIN_FS_H ) + #include + +-#elif defined( HAVE_LINUX_FS_H ) ++#elif defined( __linux__ ) && defined( HAVE_LINUX_FS_H ) + /* Required for Linux platforms that use a sizeof( u64 ) + * in linux/fs.h but have no typedef of it + */ +@@ -4128,6 +4128,11 @@ ssize_t libcfile_internal_file_io_control_read_with_error_code( + #error Missing file IO control with data function + #endif + ++// Force disable on Darwin, it can be erroneously defined ++#if defined ( __APPLE__ ) ++#undef HAVE_POSIX_FADVISE ++#endif ++ + /* Read data from a device file using IO control + * Returns the number of bytes read if successful or -1 on error + */ +diff --git a/libqcow/libqcow_i18n.c b/libqcow/libqcow_i18n.c +index 96d1a31..621e748 100644 +--- a/libqcow/libqcow_i18n.c ++++ b/libqcow/libqcow_i18n.c +@@ -40,7 +40,7 @@ int libqcow_i18n_initialize( + + if( libqcow_i18n_initialized == 0 ) + { +-#if defined( HAVE_BINDTEXTDOMAIN ) ++#if !defined( __APPLE__ ) && defined( HAVE_BINDTEXTDOMAIN ) + if( bindtextdomain( + "libqcow", + LOCALEDIR ) == NULL ) diff --git a/ports/libqcow/portfile.cmake b/ports/libqcow/portfile.cmake new file mode 100644 index 00000000000000..043c72f407bfca --- /dev/null +++ b/ports/libqcow/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +set(LIB_VERSION 20210419) +set(LIB_FILENAME libqcow-alpha-${LIB_VERSION}.tar.gz) + +# Release distribution file contains configured sources, while the source code in the repository does not. +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/libyal/libqcow/releases/download/${LIB_VERSION}/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 911d29bd880df95288e552356d128d18c924fcd0d61d166fbeaf09936f11bf27b984d8ffd4cdc4bc285e7df295a1fe64ff595b0dfdd10b6fcfbdc6586d6bd3b0 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIB_VERSION} + PATCHES macos_fixes.patch +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libqcow") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libqcow/vcpkg.json b/ports/libqcow/vcpkg.json new file mode 100644 index 00000000000000..5f8992d0be2f64 --- /dev/null +++ b/ports/libqcow/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libqcow", + "version-string": "20210419", + "port-version": 1, + "description": "Library and tools to access the QEMU Copy-On-Write (QCOW) image format.", + "homepage": "https://github.com/libyal/libqcow", + "supports": "!uwp", + "dependencies": [ + "gettext", + "openssl", + "zlib" + ] +} diff --git a/ports/libqglviewer/CONTROL b/ports/libqglviewer/CONTROL deleted file mode 100644 index add042b7e1279b..00000000000000 --- a/ports/libqglviewer/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libqglviewer -Version: 2.7.0 -Description: libQGLViewer is an open source C++ library based on Qt that eases the creation of OpenGL 3D viewers. -Build-Depends: qt5-base diff --git a/ports/libqglviewer/destdir.patch b/ports/libqglviewer/destdir.patch new file mode 100644 index 00000000000000..d1cd4f3cc28e64 --- /dev/null +++ b/ports/libqglviewer/destdir.patch @@ -0,0 +1,21 @@ +diff --git a/QGLViewer/QGLViewer.pro b/QGLViewer/QGLViewer.pro +index 263a141..51e3359 100644 +--- a/QGLViewer/QGLViewer.pro ++++ b/QGLViewer/QGLViewer.pro +@@ -38,7 +38,6 @@ SOURCES = \ + + HEADERS *= $${QGL_HEADERS} + DISTFILES *= qglviewer-icon.xpm +-DESTDIR = $${PWD} + + TRANSLATIONS = qglviewer_fr.ts + +@@ -273,7 +272,7 @@ win32 { + QMAKE_CXXFLAGS *= -TP -GR + DEFINES += NOMINMAX + win32-msvc { +- QMAKE_CXXFLAGS *= -EHs -FS ++ QMAKE_CXXFLAGS *= -EHs -FS + } else { + QMAKE_CXXFLAGS *= -EHs + } diff --git a/ports/libqglviewer/portfile.cmake b/ports/libqglviewer/portfile.cmake index 7a7cc9fdfb0c85..0c46c11c28cfab 100644 --- a/ports/libqglviewer/portfile.cmake +++ b/ports/libqglviewer/portfile.cmake @@ -1,32 +1,24 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO GillesDebunne/libQGLViewer - REF 781d914c003466b342b45d19266a9613fc0e7e0e - SHA512 0586020c159fa4b3acb3ea3fa0a361bcc757d840298d7a436c356d0929b5ace3da4d054e3c0d107a499076413336e3b9a2f35750e6bf0add9320cc52a5c7afd5 + REF fee0916f2af3d0993df51956d2e5a51bbaf0c1f0 #v2.7.2 + SHA512 449bf4ccadaf50d4333bd91050e9b50f440a64229391827aaf4a80ade2c3f5fc60501d2baee885cf1214f7e2a8a04615bafe9ac7da9f866ffa4ebe33b9b999d8 HEAD_REF master - PATCHES "use-default-config-on-all-platforms.patch" + PATCHES + use-default-config-on-all-platforms.patch + destdir.patch ) -vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}/QGLViewer/QGLViewer.pro) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(OPTIONS CONFIG*=staticlib) +endif() -vcpkg_build_qmake() +vcpkg_configure_qmake( + SOURCE_PATH ${SOURCE_PATH}/QGLViewer/QGLViewer.pro + OPTIONS ${OPTIONS} +) -file(INSTALL ${SOURCE_PATH}/QGLViewer DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") -if(CMAKE_HOST_WIN32) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewer2.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewerd2.dll ${SOURCE_PATH}/QGLViewer/QGLViewerd2.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewer2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewerd2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - else() - file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewerd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -elseif(CMAKE_HOST_APPLE) - file(INSTALL ${SOURCE_PATH}/QGLViewer/libQGLViewer.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(INSTALL ${SOURCE_PATH}/QGLViewer/libQGLViewer.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -endif() +vcpkg_install_qmake() +file(INSTALL ${SOURCE_PATH}/QGLViewer DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqglviewer RENAME copyright) diff --git a/ports/libqglviewer/vcpkg.json b/ports/libqglviewer/vcpkg.json new file mode 100644 index 00000000000000..0488752923912e --- /dev/null +++ b/ports/libqglviewer/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libqglviewer", + "version-string": "2.7.2", + "port-version": 4, + "description": "libQGLViewer is an open source C++ library based on Qt that eases the creation of OpenGL 3D viewers.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/libqrencode/CONTROL b/ports/libqrencode/CONTROL deleted file mode 100644 index 9bfd8fa85842d0..00000000000000 --- a/ports/libqrencode/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libqrencode -Version: 4.0.2 -Build-Depends: libpng, libiconv -Homepage: https://github.com/fukuchi/libqrencode -Description: libqrencode - a fast and compact QR Code encoding library diff --git a/ports/libqrencode/portfile.cmake b/ports/libqrencode/portfile.cmake index cfcd4650ab3bed..40e383c3cbeb4b 100644 --- a/ports/libqrencode/portfile.cmake +++ b/ports/libqrencode/portfile.cmake @@ -1,42 +1,54 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fukuchi/libqrencode - REF v4.0.2 - SHA512 847e32bd13358319f3beabde103b5335a6e11c3f9275425b74e89a00b0ee4d67af8a428f12acc8b80a0419382480e5aeb02e58602a69ee750c21b28f357af6bc + REF 715e29fd4cd71b6e452ae0f4e36d917b43122ce8 # v4.1.1 + SHA512 78a5464c6fd37d2b4ed6d81c5faf8d95f6f1c95bfdb55dfe89fc227cd487c1685e8080694b1c93128364337959562ea133b3bb332ae1c5a4094614b493611e9f HEAD_REF master - PATCHES remove-deprecated-attribute.patch ) -vcpkg_configure_cmake( +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tool WITH_TOOLS +) + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS - -DWITH_TOOLS=NO + ${FEATURE_OPTIONS} -DWITH_TEST=NO -DSKIP_INSTALL_PROGRAMS=ON -DSKIP_INSTALL_EXECUTABLES=ON -DSKIP_INSTALL_FILES=ON OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON + -DWITH_TOOLS=NO ) -vcpkg_install_cmake() +vcpkg_cmake_install() -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/qrencode.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/qrencode.dll ${CURRENT_PACKAGES_DIR}/bin/qrencode.dll) +if(VCPKG_TARGET_IS_WINDOWS) # Windows + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll ${CURRENT_PACKAGES_DIR}/debug/bin/qrencoded.dll) + +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/qrencode.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/qrencode.dll" "${CURRENT_PACKAGES_DIR}/bin/qrencode.dll") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/qrencoded.dll") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqrencode) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libqrencode/COPYING ${CURRENT_PACKAGES_DIR}/share/libqrencode/copyright) +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/qrencode${EXECUTABLE_SUFFIX}") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/qrencode") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/qrencode${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/qrencode/qrencode${EXECUTABLE_SUFFIX}") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/qrencode") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") vcpkg_copy_pdbs() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libqrencode/remove-deprecated-attribute.patch b/ports/libqrencode/remove-deprecated-attribute.patch deleted file mode 100644 index 1a00c3a3b20fdf..00000000000000 --- a/ports/libqrencode/remove-deprecated-attribute.patch +++ /dev/null @@ -1,16 +0,0 @@ - qrencode.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/qrencode.h b/qrencode.h -index b855f0a..a6d4a29 100644 ---- a/qrencode.h -+++ b/qrencode.h -@@ -555,7 +555,7 @@ extern char *QRcode_APIVersionString(void); - /** - * @deprecated - */ --extern void QRcode_clearCache(void) __attribute__ ((deprecated)); -+extern void QRcode_clearCache(void); - - #if defined(__cplusplus) - } diff --git a/ports/libqrencode/vcpkg.json b/ports/libqrencode/vcpkg.json new file mode 100644 index 00000000000000..e9f572ad9644ed --- /dev/null +++ b/ports/libqrencode/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "libqrencode", + "version-semver": "4.1.1", + "description": "libqrencode - a fast and compact QR Code encoding library", + "homepage": "https://github.com/fukuchi/libqrencode", + "dependencies": [ + "libiconv", + "libpng", + { + "name": "vcpkg-cmake", + "host": true + } + ], + "features": { + "tool": { + "description": "Build qrencode tool", + "dependencies": [ + { + "name": "getopt", + "platform": "windows" + } + ] + } + } +} diff --git a/ports/librabbitmq/CONTROL b/ports/librabbitmq/CONTROL deleted file mode 100644 index 9f2d0fae638e72..00000000000000 --- a/ports/librabbitmq/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: librabbitmq -Version: 0.9.0-1 -Build-Depends: openssl -Homepage: https://github.com/alanxz/rabbitmq-c -Description: A C-language AMQP client library for use with v2.0+ of the RabbitMQ broker. diff --git a/ports/librabbitmq/portfile.cmake b/ports/librabbitmq/portfile.cmake index 3bf4d25cca2629..7957cfbfd7b0f5 100644 --- a/ports/librabbitmq/portfile.cmake +++ b/ports/librabbitmq/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alanxz/rabbitmq-c - REF 77e3805d1662034339c3c19bcdaaa62a56c1fa7e - SHA512 f20a841d184a2448b12c59b551ac5f1bf70a4cc0e0226fe803bab64bd6e26be5f275fb36717b3abb614e88212668cb87de5f9f749fc17ff565b2fe15f66c090e + REF d416b8b16d196085106cfe137a0ff6919a9f6752 + SHA512 3fc137893fc18509a3e583cc8d40a8e91f219063237b9fd018a65cf14da188914ddba3a031c4bc033a886fed19fc6291d1b28b55458b9163eb6d20425b0474dc HEAD_REF master PATCHES fix-uwpwarning.patch @@ -24,7 +22,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rabbitmq-c TARGET_PATH share/rabbitmq-c) + vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(INSTALL ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/librabbitmq RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/librabbitmq/vcpkg.json b/ports/librabbitmq/vcpkg.json new file mode 100644 index 00000000000000..f79a890baf85cc --- /dev/null +++ b/ports/librabbitmq/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "librabbitmq", + "version-string": "2020-06-03", + "port-version": 1, + "description": "A C-language AMQP client library for use with v2.0+ of the RabbitMQ broker.", + "homepage": "https://github.com/alanxz/rabbitmq-c", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/libraqm/CMakeLists.txt b/ports/libraqm/CMakeLists.txt index b1a88b2684dc21..9ad1db64a6bc86 100644 --- a/ports/libraqm/CMakeLists.txt +++ b/ports/libraqm/CMakeLists.txt @@ -11,12 +11,13 @@ find_package(harfbuzz CONFIG REQUIRED) find_path(HARFBUZZ_INCLUDE_DIRS NAMES hb.h PATH_SUFFIXES harfbuzz) -find_path(FREETYPE_ADDITIONAL_INCLUDE_DIRS NAMES ft2build.h) +find_path(FREETYPE_ADDITIONAL_INCLUDE_DIRS NAMES ft2build.h PATH_SUFFIXES freetype2) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/raqm-version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm-version.h) +configure_file(src/raqm-version.h.in src/raqm-version.h) -add_library(raqm ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.c ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm-version.h) +add_library(raqm src/raqm.c src/raqm.h src/raqm-version.h) +target_include_directories(raqm PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/src) target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_ADDITIONAL_INCLUDE_DIRS}) target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_INCLUDE_DIRS}) target_include_directories(raqm SYSTEM PUBLIC ${HARFBUZZ_INCLUDE_DIRS}) @@ -34,4 +35,4 @@ install(TARGETS raqm set(RAQM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") set(RAQM_LIBRARY raqm) set(RAQM_LIBRARIES ${HARFBUZZ_LIBRARY} ${FRIBIDI_LIBRARY} ${RAQM_LIBRARY}) -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm-version.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h ${CMAKE_CURRENT_BINARY_DIR}/src/raqm-version.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/libraqm/CONTROL b/ports/libraqm/CONTROL deleted file mode 100644 index f637fac3ae76de..00000000000000 --- a/ports/libraqm/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libraqm -Version: 0.7.0 -Description: A library for complex text layout -Build-Depends: freetype, harfbuzz, fribidi \ No newline at end of file diff --git a/ports/libraqm/portfile.cmake b/ports/libraqm/portfile.cmake index 702fe8be05fe15..ad32f08c7cf382 100644 --- a/ports/libraqm/portfile.cmake +++ b/ports/libraqm/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(RAQM_VERSION_MAJOR 0) @@ -33,6 +31,3 @@ vcpkg_copy_pdbs() # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraqm RENAME copyright) - -# Post-build test for cmake libraries -vcpkg_test_cmake(PACKAGE_NAME raqm) diff --git a/ports/libraqm/vcpkg.json b/ports/libraqm/vcpkg.json new file mode 100644 index 00000000000000..7e124e8639ccc4 --- /dev/null +++ b/ports/libraqm/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libraqm", + "version-string": "0.7.0", + "port-version": 3, + "description": "A library for complex text layout", + "dependencies": [ + "freetype", + "fribidi", + "harfbuzz" + ] +} diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL deleted file mode 100644 index 1d0c172032f434..00000000000000 --- a/ports/libraw/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libraw -Version: 201903-1 -Build-Depends: lcms, jasper -Homepage: https://www.libraw.org -Description: raw image decoder library diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake index d834b80e9aeafa..ffedcf0d21dabb 100644 --- a/ports/libraw/portfile.cmake +++ b/ports/libraw/portfile.cmake @@ -1,12 +1,3 @@ -include(vcpkg_common_functions) - -# Update to latest LibRaw-201903 snapshot at d4f05dd1b9b2d44c8f7e82043cbad3c724db2416 -# LibRaw publishes: -# - snapshots every 5-7 months (in master branch) -# - releases (0.18, 0.19, etc.) every 1-1.5 years. -# - security hotfixes for releases (0.19.1, 0.19.2, etc.) -# Hence, from user point of view, it is practical to refer to the latest snapshot, -# instead of the latest release. vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO LibRaw/LibRaw @@ -15,27 +6,20 @@ vcpkg_from_github( HEAD_REF master ) -set(LIBRAW_CMAKE_COMMIT "a71f3b83ee3dccd7be32f9a2f410df4d9bdbde0a") -set(LIBRAW_CMAKE_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/LibRaw-cmake-${LIBRAW_CMAKE_COMMIT}) -vcpkg_download_distfile(CMAKE_BUILD_ARCHIVE - URLS "https://github.com/LibRaw/LibRaw-cmake/archive/${LIBRAW_CMAKE_COMMIT}.zip" - FILENAME "LibRaw-cmake-${LIBRAW_CMAKE_COMMIT}" - SHA512 54216e6760e2339dc3bf4b4be533a13160047cabfc033a06da31f2226c43fc93eaea9672af83589e346ce9231c1a57910ac5e800759e692fe2cd9d53b7fba0c6 +vcpkg_from_github( + OUT_SOURCE_PATH LIBRAW_CMAKE_SOURCE_PATH + REPO LibRaw/LibRaw-cmake + REF a71f3b83ee3dccd7be32f9a2f410df4d9bdbde0a + SHA512 607e6f76bcb57534da4f0c864b7a421f1ed49244468b1b52abe77f65aa599cae80715520b3a951294321b812deffd4f163757c9949f337571aa54f414ccc58a5 + HEAD_REF master + PATCHES + findlibraw_debug_fix.patch + lcms2_debug_fix.patch ) -vcpkg_extract_source_archive(${CMAKE_BUILD_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src) - -# Copy the CMake build system from the external repo file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/cmake DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/findlibraw_debug_fix.patch - ${CMAKE_CURRENT_LIST_DIR}/lcms2_debug_fix.patch -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -84,14 +68,13 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Rename cmake module into a config in order to allow more flexible lookup rules -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/FindLibRaw.cmake ${CURRENT_PACKAGES_DIR}/share/libraw/LibRaw-config.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/FindLibRaw.cmake ${CURRENT_PACKAGES_DIR}/share/libraw/libraw-config.cmake) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraw) endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraw) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/COPYRIGHT ${CURRENT_PACKAGES_DIR}/share/libraw/copyright) - vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/ports/libraw/vcpkg.json b/ports/libraw/vcpkg.json new file mode 100644 index 00000000000000..01b3babe00ead0 --- /dev/null +++ b/ports/libraw/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libraw", + "version-string": "201903", + "port-version": 4, + "description": "raw image decoder library", + "homepage": "https://www.libraw.org", + "dependencies": [ + "jasper", + "lcms" + ] +} diff --git a/ports/librdkafka/CONTROL b/ports/librdkafka/CONTROL deleted file mode 100644 index 9b520bbe3cbc86..00000000000000 --- a/ports/librdkafka/CONTROL +++ /dev/null @@ -1,23 +0,0 @@ -Source: librdkafka -Version: 1.1.0-1 -Description: The Apache Kafka C/C++ library -Homepage: https://github.com/edenhill/librdkafka - -Feature: lz4 -Description: Enable external LZ4 library support -Build-Depends: lz4 - -Feature: ssl -Description: Build with OpenSSL -Build-Depends: openssl - -Feature: zlib -Description: Build with zlib -Build-Depends: zlib - -Feature: zstd -Description: Build with zstd -Build-Depends: zstd - -Feature: snappy -Description: Build with snappy diff --git a/ports/librdkafka/fix-arm64.patch b/ports/librdkafka/fix-arm64.patch deleted file mode 100644 index 6a7750cecb3610..00000000000000 --- a/ports/librdkafka/fix-arm64.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/snappy_compat.h b/src/snappy_compat.h -index acda21ec..bf2fe4c7 100644 ---- a/src/snappy_compat.h -+++ b/src/snappy_compat.h -@@ -89,7 +89,7 @@ struct iovec { - // x86, PowerPC, and ARM64 can simply do these loads and stores native. - #if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || \ - defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ -- defined(__aarch64__) -+ defined(__arm64) || defined(__aarch64__) || defined(__AARCH64EL__) || defined(_M_ARM64) - - #define get_unaligned get_unaligned_direct - #define put_unaligned put_unaligned_direct -@@ -115,6 +115,7 @@ struct iovec { - !defined(__ARM_ARCH_6J__) && \ - !defined(__ARM_ARCH_6K__) && \ - !defined(__ARM_ARCH_6Z__) && \ -+ !defined(__ARM_ARCH_6KZ__) && \ - !defined(__ARM_ARCH_6ZK__) && \ - !defined(__ARM_ARCH_6T2__) - diff --git a/ports/librdkafka/portfile.cmake b/ports/librdkafka/portfile.cmake index c441c3c071cab8..9b2d48255c30b8 100644 --- a/ports/librdkafka/portfile.cmake +++ b/ports/librdkafka/portfile.cmake @@ -1,18 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO edenhill/librdkafka - REF v1.1.0 - SHA512 35561399b07278a09a51245c5503c86eb0cc8971692b4e65a332144bfb71e2e86d4ceaf1804534b6a416bcace74cef493b6465c20b32c14de97f45f2854359c6 + REF 77a013b7a2611f7bdc091afa1e56b1a46d1c52f5 #v1.7.0 + SHA512 3eedfe2dcca90a392b82aa512989cdf5ecde2c7c9779aecdd619375da4e04071fdc868ce37c01948346cfa48cd6f7395cbc074edd6e36c678193791ffe7a9ed1 HEAD_REF master - PATCHES - fix-arm64.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES lz4 ENABLE_LZ4_EXT ssl WITH_SSL zlib WITH_ZLIB @@ -78,6 +75,3 @@ configure_file(${SOURCE_PATH}/LICENSES.txt ${CURRENT_PACKAGES_DIR}/share/${PORT} # Install usage configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME RdKafka) diff --git a/ports/librdkafka/vcpkg-cmake-wrapper.cmake b/ports/librdkafka/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..6f32a4521392b0 --- /dev/null +++ b/ports/librdkafka/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,45 @@ +include(SelectLibraryConfigurations) + +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +_find_package(${ARGS} CONFIG) + +if(RdKafka_FOUND) + if(TARGET RdKafka::rdkafka) + set(TARGET_NAME RdKafka::rdkafka) + else(TARGET RdKafka::rdkafka++) + set(TARGET_NAME RdKafka::rdkafka++) + endif() + + if(TARGET ${TARGET_NAME} AND NOT DEFINED RdKafka_INCLUDE_DIRS) + get_target_property(_RdKafka_INCLUDE_DIRS ${TARGET_NAME} INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(_RdKafka_LINK_LIBRARIES ${TARGET_NAME} INTERFACE_LINK_LIBRARIES) + + if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + get_target_property(_RdKafka_LIBRARY_DEBUG ${TARGET_NAME} IMPORTED_IMPLIB_DEBUG) + get_target_property(_RdKafka_LIBRARY_RELEASE ${TARGET_NAME} IMPORTED_IMPLIB_RELEASE) + endif() + + if(NOT _RdKafka_LIBRARY_DEBUG AND NOT _RdKafka_LIBRARY_RELEASE) + get_target_property(_RdKafka_LIBRARY_DEBUG ${TARGET_NAME} IMPORTED_LOCATION_DEBUG) + get_target_property(_RdKafka_LIBRARY_RELEASE ${TARGET_NAME} IMPORTED_LOCATION_RELEASE) + endif() + + set(RdKafka_INCLUDE_DIR "${_RdKafka_INCLUDE_DIRS}") + set(RdKafka_LIBRARY_DEBUG "${_RdKafka_LIBRARY_DEBUG}") + set(RdKafka_LIBRARY_RELEASE "${_RdKafka_LIBRARY_RELEASE}") + + select_library_configurations(RdKafka) + + list(APPEND RdKafka_LIBRARIES ${_RdKafka_LINK_LIBRARIES}) + list(APPEND RdKafka_LIBRARY ${_RdKafka_LINK_LIBRARIES}) + + unset(_RdKafka_INCLUDE_DIRS) + unset(_RdKafka_LINK_LIBRARIES) + unset(_RdKafka_LIBRARY_DEBUG) + unset(_RdKafka_LIBRARY_DEBUG) + unset(TARGET_NAME) + endif() +endif() \ No newline at end of file diff --git a/ports/librdkafka/vcpkg.json b/ports/librdkafka/vcpkg.json new file mode 100644 index 00000000000000..77894d11653221 --- /dev/null +++ b/ports/librdkafka/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "librdkafka", + "version-string": "1.7.0", + "port-version": 1, + "description": "The Apache Kafka C/C++ library", + "homepage": "https://github.com/edenhill/librdkafka", + "features": { + "lz4": { + "description": "Enable external LZ4 library support", + "dependencies": [ + "lz4" + ] + }, + "snappy": { + "description": "Build with snappy" + }, + "ssl": { + "description": "Build with OpenSSL", + "dependencies": [ + "openssl" + ] + }, + "zlib": { + "description": "Build with zlib", + "dependencies": [ + "zlib" + ] + }, + "zstd": { + "description": "Build with zstd", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/ports/libressl/0001-enable-ocspcheck-on-msvc.patch b/ports/libressl/0001-enable-ocspcheck-on-msvc.patch index fa1884a2e45646..53083d314e8229 100644 --- a/ports/libressl/0001-enable-ocspcheck-on-msvc.patch +++ b/ports/libressl/0001-enable-ocspcheck-on-msvc.patch @@ -9,7 +9,7 @@ index 3c80458..e8d3bf5 100644 OCSPCHECK_SRC http.c @@ -13,13 +11,27 @@ else() - set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c) + set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/strtonum.c) endif() +check_function_exists(getopt HAVE_GETOPT) diff --git a/ports/libressl/0002-suppress-msvc-warnings.patch b/ports/libressl/0002-suppress-msvc-warnings.patch index 7a5bf0038ec1ca..79d756622b42b4 100644 --- a/ports/libressl/0002-suppress-msvc-warnings.patch +++ b/ports/libressl/0002-suppress-msvc-warnings.patch @@ -3,7 +3,7 @@ index a6a7554..b20fd4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,6 +111,11 @@ if(WIN32) - set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32) + set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 bcrypt) endif() +if(MSVC AND MSVC_VERSION GREATER_EQUAL 1912) diff --git a/ports/libressl/CONTROL b/ports/libressl/CONTROL deleted file mode 100644 index 2cb09fb6c35f25..00000000000000 --- a/ports/libressl/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: libressl -Version: 2.9.1-2 -Description: LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes. - -Feature: tools -Description: Build openssl and ocspcheck executables diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake index 5c8e5b964ce65d..7483e02c880e92 100644 --- a/ports/libressl/portfile.cmake +++ b/ports/libressl/portfile.cmake @@ -1,26 +1,17 @@ -cmake_minimum_required(VERSION 3.13) - if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") message(WARNING "Can't build libressl if openssl is installed. Please remove openssl, and try install libressl again if you need it. Build will continue since libressl is a subset of openssl") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) return() endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - message(FATAL_ERROR "${PORT} does not support ARM") -endif() +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") -include(vcpkg_common_functions) - -set(LIBRESSL_VERSION 2.9.1) -set(LIBRESSL_HASH 7051911e566bb093c48a70da72c9981b870e3bf49a167ba6c934eece873084cc41221fbe3cd0c8baba268d0484070df7164e4b937854e716337540a87c214354) +set(LIBRESSL_VERSION 3.3.3) +set(LIBRESSL_HASH 2d0b5f4cfe37d573bc64d5967abb77f536dbe581fbad9637d925332bcdfd185fe6810335b2af80a89f92d7e6edaa8ea3ba2492c60a117e47ea1b2d6aacf01f0f) vcpkg_download_distfile( LIBRESSL_SOURCE_ARCHIVE - URLS https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${PORT}-${LIBRESSL_VERSION}.tar.gz + URLS https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${PORT}-${LIBRESSL_VERSION}.tar.gz https://ftp.fau.de/openbsd/LibreSSL/${PORT}-${LIBRESSL_VERSION}.tar.gz FILENAME ${PORT}-${LIBRESSL_VERSION}.tar.gz SHA512 ${LIBRESSL_HASH} ) @@ -34,16 +25,16 @@ vcpkg_extract_source_archive_ex( 0002-suppress-msvc-warnings.patch ) -set(LIBRESSL_APPS OFF) -if("tools" IN_LIST FEATURES) - set(LIBRESSL_APPS ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "tools" LIBRESSL_APPS +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DLIBRESSL_APPS=${LIBRESSL_APPS} + ${FEATURE_OPTIONS} -DLIBRESSL_TESTS=OFF OPTIONS_DEBUG -DLIBRESSL_APPS=OFF @@ -51,8 +42,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if(LIBRESSL_APPS) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) +if("tools" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) set(EXECUTABLE_SUFFIX .exe) endif() file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl") @@ -69,19 +60,17 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/etc/ssl/certs" + "${CURRENT_PACKAGES_DIR}/debug/etc/ssl/certs" "${CURRENT_PACKAGES_DIR}/share/man" "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" ) -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") -endif() vcpkg_copy_pdbs() file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -if((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) AND (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")) +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) file(GLOB_RECURSE LIBS "${CURRENT_PACKAGES_DIR}/*.lib") foreach(LIB ${LIBS}) string(REGEX REPLACE "(.+)-[0-9]+\\.lib" "\\1.lib" LINK "${LIB}") diff --git a/ports/libressl/vcpkg.json b/ports/libressl/vcpkg.json new file mode 100644 index 00000000000000..59c18243c2fb50 --- /dev/null +++ b/ports/libressl/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libressl", + "version": "3.3.3", + "description": "LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.", + "supports": "!(uwp | arm)", + "features": { + "tools": { + "description": "Build openssl and ocspcheck executables" + } + } +} diff --git a/ports/librsvg/CMakeLists.txt b/ports/librsvg/CMakeLists.txt old mode 100755 new mode 100644 index 749d3132bbdb80..13c3194863d78c --- a/ports/librsvg/CMakeLists.txt +++ b/ports/librsvg/CMakeLists.txt @@ -1,22 +1,22 @@ cmake_minimum_required(VERSION 3.11) project(librsvg C) -find_package(unofficial-cairo CONFIG REQUIRED) find_package(unofficial-libcroco CONFIG REQUIRED) -find_package(unofficial-glib CONFIG REQUIRED) +find_package(PkgConfig REQUIRED) +pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2 gio-2 IMPORTED_TARGET) +pkg_check_modules(CAIRO cairo IMPORTED_TARGET) +pkg_check_modules(GDK_PIXBUF gdk-pixbuf-2.0 IMPORTED_TARGET) +pkg_check_modules(PANGO pango pangocairo IMPORTED_TARGET) find_package(LibXml2 REQUIRED) -find_library(PANGO_LIB pango-1.0) -find_library(PANGO_CAIRO_LIB pangocairo-1.0) if(CMAKE_SYSTEM_NAME MATCHES "Windows") - find_library(GDK_PIXBUF_LIB gdk_pixbuf-2.0) +elseif(CMAKE_SYSTEM_NAME MATCHES "Linux") else() - find_library(GDK_PIXBUF_LIB gdk_pixbuf-2) + pkg_check_modules(PANGO2 pangoft2 pangofc IMPORTED_TARGET) + set(PANGO_FT2_LIB PkgConfig::PANGO2) endif() -find_path(CAIRO_INCLUDE_DIR cairo/cairo.h) - # Add include directories -include_directories(${CAIRO_INCLUDE_DIR} ${GDK_PIXBUF_INCLUDE_DIR}) +include_directories(${CAIRO_INCLUDE_DIRS} ${GDK_PIXBUF_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} ${PANGO2_INCLUDE_DIRS}) set(LIBRSVG_SOURCES librsvg-features.c @@ -86,8 +86,6 @@ else() list(APPEND LIBRSVG_SOURCES rsvg.symbols) endif() -set(CMAKE_DEBUG_POSTFIX "d") - add_library(rsvg-2.40 ${LIBRSVG_SOURCES}) add_library(pixbufloader-svg ${PIXBUFLOADERSVG_SOURCES}) @@ -102,22 +100,17 @@ target_compile_definitions(pixbufloader-svg PRIVATE -DG_LOG_DOMAIN="libpixbufloader-svg") target_link_libraries(rsvg-2.40 PRIVATE - unofficial::cairo::cairo - unofficial::libcroco::croco-0.6 - unofficial::glib::gio - unofficial::glib::glib - unofficial::glib::gmodule - unofficial::glib::gobject + PkgConfig::GLIB2 ${LIBXML2_LIBRARIES} - ${PANGO_LIB} - ${PANGO_CAIRO_LIB} - ${GDK_PIXBUF_LIB} + PkgConfig::PANGO + PkgConfig::GDK_PIXBUF + ${PANGO_FT2_LIB} + unofficial::libcroco::croco-0.6 ) target_link_libraries(pixbufloader-svg PRIVATE rsvg-2.40 - unofficial::glib::glib - unofficial::glib::gobject - ${GDK_PIXBUF_LIB} + PkgConfig::GLIB2 + PkgConfig::GDK_PIXBUF ) install(TARGETS rsvg-2.40 pixbufloader-svg @@ -135,8 +128,8 @@ install( ) install(FILES - rsvg.h - rsvg-cairo.h + rsvg.h + rsvg-cairo.h librsvg-features.h librsvg-enum-types.h DESTINATION include/librsvg @@ -144,10 +137,12 @@ install(FILES file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-librsvg-config.cmake " include(CMakeFindDependencyMacro) -find_dependency(unofficial-cairo CONFIG) +find_dependency(PkgConfig) +pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2 gio-2 IMPORTED_TARGET) +pkg_check_modules(CAIRO cairo IMPORTED_TARGET) +pkg_check_modules(GDK_PIXBUF gdk-pixbuf IMPORTED_TARGET) +pkg_check_modules(PANGO pango pangocairo IMPORTED_TARGET) find_dependency(unofficial-libcroco CONFIG) -find_dependency(gdk-pixbuf CONFIG) -find_dependency(pango CONFIG) include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-librsvg-targets.cmake) ") diff --git a/ports/librsvg/CONTROL b/ports/librsvg/CONTROL deleted file mode 100755 index 3a250b8d4cf256..00000000000000 --- a/ports/librsvg/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: librsvg -Version: 2.40.20 -Description: A small library to render Scalable Vector Graphics (SVG) -Build-Depends: cairo, pango, gdk-pixbuf, libcroco \ No newline at end of file diff --git a/ports/librsvg/portfile.cmake b/ports/librsvg/portfile.cmake old mode 100755 new mode 100644 index c3765f0a3d4394..8e47fada4ce22f --- a/ports/librsvg/portfile.cmake +++ b/ports/librsvg/portfile.cmake @@ -1,4 +1,4 @@ -include(vcpkg_common_functions) +# port update requires rust/cargo vcpkg_download_distfile(ARCHIVE URLS "https://download.gnome.org/sources/librsvg/2.40/librsvg-2.40.20.tar.xz" @@ -8,25 +8,26 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + ARCHIVE ${ARCHIVE} ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.linux ${SOURCE_PATH}/config.h.linux COPYONLY) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +configure_file("${CMAKE_CURRENT_LIST_DIR}/config.h.linux" "${SOURCE_PATH}/config.h.linux" COPYONLY) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja +vcpkg_find_acquire_program(PKGCONFIG) +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DPKG_CONFIG_EXECUTABLE=${PKGCONFIG} ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-librsvg TARGET_PATH share/unofficial-librsvg) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_copy_pdbs() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/librsvg RENAME copyright) +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-librsvg CONFIG_PATH share/unofficial-librsvg) -vcpkg_copy_pdbs() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -vcpkg_test_cmake(PACKAGE_NAME unofficial-librsvg) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/librsvg/vcpkg.json b/ports/librsvg/vcpkg.json new file mode 100644 index 00000000000000..eea2a5efde40ec --- /dev/null +++ b/ports/librsvg/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "librsvg", + "version": "2.40.20", + "port-version": 5, + "description": "A small library to render Scalable Vector Graphics (SVG)", + "homepage": "https://gitlab.gnome.org/GNOME/librsvg", + "dependencies": [ + "cairo", + "gdk-pixbuf", + "libcroco", + "pango", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/librsync/001-enable-static-libs.patch b/ports/librsync/001-enable-static-libs.patch deleted file mode 100644 index 4512cdeb9baad6..00000000000000 --- a/ports/librsync/001-enable-static-libs.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f0135cb..c30312a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -339,7 +339,7 @@ set(rsync_LIB_SRCS - src/whole.c - ${blake2_SRCS}) - --add_library(rsync SHARED ${rsync_LIB_SRCS}) -+add_library(rsync ${rsync_LIB_SRCS}) - target_link_libraries(rsync ${blake2_LIBS}) - - # Optionally link zlib and bzip2 if diff --git a/ports/librsync/CONTROL b/ports/librsync/CONTROL deleted file mode 100644 index b17a132ebd0c6e..00000000000000 --- a/ports/librsync/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: librsync -Version: 2.0.2-1 -Description: librsync is a library for calculating and applying network deltas, with an interface designed to ease integration into diverse network applications. diff --git a/ports/librsync/portfile.cmake b/ports/librsync/portfile.cmake index f39578dd3d69fc..e9bb64ab9cad2a 100644 --- a/ports/librsync/portfile.cmake +++ b/ports/librsync/portfile.cmake @@ -1,42 +1,42 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO librsync/librsync - REF v2.0.2 - SHA512 5d2bc1d62b37e9ed7416203615d0a0e3c05c4c884b5da63eda10dd5c985845b500331bce226e4d45676729382c85b41528282e25d491afda31ba434ac0fefad7 + REF 42b636d2a65ab6914ea7cac50886da28192aaf9b # V2.3.2 + SHA512 4903a64e327a7d49ae5f741b7b9fe3a76018010147249e2bc53917b06d31ee0f9b917f6c3e36a2d241ae66c19fa881113b59911d777742a859922486d9fe9c4c HEAD_REF master - PATCHES - 001-enable-static-libs.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DBUILD_RDIFF:BOOL=OFF - -DENABLE_COMPRESSION:BOOL=OFF - -DENABLE_TRACE:BOOL=OFF +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_RDIFF:BOOL=OFF + -DENABLE_COMPRESSION:BOOL=OFF + -DENABLE_TRACE:BOOL=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/rsync.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/rsync.dll ${CURRENT_PACKAGES_DIR}/bin/rsync.dll) +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/rsync.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/rsync.dll" "${CURRENT_PACKAGES_DIR}/bin/rsync.dll") endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rsync.dll) +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/rsync.dll") endif() -file(INSTALL - ${SOURCE_PATH}/COPYING - DESTINATION ${CURRENT_PACKAGES_DIR}/share/librsync RENAME copyright -) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/librsync_export.h" + "# ifdef LIBRSYNC_STATIC_DEFINE" + "# if 1 /* LIBRSYNC_STATIC_DEFINE */" + ) +endif() vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/librsync/vcpkg.json b/ports/librsync/vcpkg.json new file mode 100644 index 00000000000000..34aafdb9bcadf4 --- /dev/null +++ b/ports/librsync/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "librsync", + "version-semver": "2.3.2", + "description": "librsync is a library for calculating and applying network deltas, with an interface designed to ease integration into diverse network applications.", + "homepage": "http://librsync.sourcefrog.net/", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/librtmp/CONTROL b/ports/librtmp/CONTROL deleted file mode 100644 index f43270e5d73c3c..00000000000000 --- a/ports/librtmp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: librtmp -Version: 2.4-1 -Build-Depends: zlib, openssl -Homepage: https://rtmpdump.mplayerhq.hu -Description: RTMPDump Real-Time Messaging Protocol API diff --git a/ports/librtmp/dh.patch b/ports/librtmp/dh.patch new file mode 100644 index 00000000000000..4b03453547ed39 --- /dev/null +++ b/ports/librtmp/dh.patch @@ -0,0 +1,136 @@ +diff --git a/librtmp/dh.h b/librtmp/dh.h +index 8e285a60c..ea562d200 100644 +--- a/librtmp/dh.h ++++ b/librtmp/dh.h +@@ -139,11 +139,14 @@ typedef BIGNUM * MP_t; + #define MP_setbin(u,buf,len) BN_bn2bin(u,buf) + #define MP_getbin(u,buf,len) u = BN_bin2bn(buf,len,0) + ++ + #define MDH DH + #define MDH_new() DH_new() + #define MDH_free(dh) DH_free(dh) + #define MDH_generate_key(dh) DH_generate_key(dh) + #define MDH_compute_key(secret, seclen, pub, dh) DH_compute_key(secret, pub, dh) ++#define MPH_set_pqg(dh, p, q, g, res) res = DH_set0_pqg(dh, p, q, g) ++#define MPH_set_length(dh, len, res) res = DH_set_length(dh,len) + + #endif + +@@ -152,7 +155,7 @@ typedef BIGNUM * MP_t; + + /* RFC 2631, Section 2.1.5, http://www.ietf.org/rfc/rfc2631.txt */ + static int +-isValidPublicKey(MP_t y, MP_t p, MP_t q) ++isValidPublicKey(const MP_t y,const MP_t p, MP_t q) + { + int ret = TRUE; + MP_t bn; +@@ -211,20 +214,33 @@ DHInit(int nKeyBits) + if (!dh) + goto failed; + +- MP_new(dh->g); ++ MP_t g,p; ++ MP_new(g); + +- if (!dh->g) ++ if (!g) ++ { + goto failed; ++ } + +- MP_gethex(dh->p, P1024, res); /* prime P1024, see dhgroups.h */ ++ DH_get0_pqg(dh, (BIGNUM const**)&p, NULL, NULL); ++ MP_gethex(p, P1024, res); /* prime P1024, see dhgroups.h */ + if (!res) + { + goto failed; + } + +- MP_set_w(dh->g, 2); /* base 2 */ +- +- dh->length = nKeyBits; ++ MP_set_w(g, 2); /* base 2 */ ++ MPH_set_pqg(dh,p,NULL,g, res); ++ if (!res) ++ { ++ MP_free(g); ++ goto failed; ++ } ++ MPH_set_length(dh,nKeyBits, res); ++ if (!res) ++ { ++ goto failed; ++ } + return dh; + + failed: +@@ -250,14 +267,11 @@ DHGenerateKey(MDH *dh) + + MP_gethex(q1, Q1024, res); + assert(res); +- +- res = isValidPublicKey(dh->pub_key, dh->p, q1); ++ res = isValidPublicKey(DH_get0_pub_key(dh), DH_get0_p(dh), q1); + if (!res) +- { +- MP_free(dh->pub_key); +- MP_free(dh->priv_key); +- dh->pub_key = dh->priv_key = 0; +- } ++ { ++ MDH_free(dh); // Cannot set priv_key to nullptr so there is no way to generate a new pub/priv key pair in openssl 1.1.1. ++ } + + MP_free(q1); + } +@@ -272,15 +286,16 @@ static int + DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) + { + int len; +- if (!dh || !dh->pub_key) ++ MP_t pub = DH_get0_pub_key(dh); ++ if (!dh || !pub) + return 0; + +- len = MP_bytes(dh->pub_key); ++ len = MP_bytes(pub); + if (len <= 0 || len > (int) nPubkeyLen) + return 0; + + memset(pubkey, 0, nPubkeyLen); +- MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len); ++ MP_setbin(pub, pubkey + (nPubkeyLen - len), len); + return 1; + } + +@@ -288,15 +303,16 @@ DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) + static int + DHGetPrivateKey(MDH *dh, uint8_t *privkey, size_t nPrivkeyLen) + { +- if (!dh || !dh->priv_key) ++ MP_t priv = DH_get0_priv_key(dh); ++ if (!dh || !priv) + return 0; + +- int len = MP_bytes(dh->priv_key); ++ int len = MP_bytes(priv); + if (len <= 0 || len > (int) nPrivkeyLen) + return 0; + + memset(privkey, 0, nPrivkeyLen); +- MP_setbin(dh->priv_key, privkey + (nPrivkeyLen - len), len); ++ MP_setbin(priv, privkey + (nPrivkeyLen - len), len); + return 1; + } + #endif +@@ -322,7 +338,7 @@ DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen, + MP_gethex(q1, Q1024, len); + assert(len); + +- if (isValidPublicKey(pubkeyBn, dh->p, q1)) ++ if (isValidPublicKey(pubkeyBn, DH_get0_p(dh), q1)) + res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh); + else + res = -1; diff --git a/ports/librtmp/handshake.patch b/ports/librtmp/handshake.patch new file mode 100644 index 00000000000000..88f5d245855564 --- /dev/null +++ b/ports/librtmp/handshake.patch @@ -0,0 +1,35 @@ +diff --git a/librtmp/handshake.h b/librtmp/handshake.h +index 98bf3c877..0819152bd 100644 +--- a/librtmp/handshake.h ++++ b/librtmp/handshake.h +@@ -66,9 +66,9 @@ typedef gcry_cipher_hd_t RC4_handle; + #if OPENSSL_VERSION_NUMBER < 0x0090800 || !defined(SHA256_DIGEST_LENGTH) + #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256 + #endif +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) ctx = HMAC_CTX_new(); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, dig, &dlen); HMAC_CTX_free(ctx) + + typedef RC4_KEY * RC4_handle; + #define RC4_alloc(h) *h = malloc(sizeof(RC4_KEY)) +@@ -114,7 +114,7 @@ static void InitRC4Encryption + { + uint8_t digest[SHA256_DIGEST_LENGTH]; + unsigned int digestLen = 0; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + + RC4_alloc(rc4keyIn); + RC4_alloc(rc4keyOut); +@@ -263,7 +263,7 @@ HMACsha256(const uint8_t *message, size_t messageLen, const uint8_t *key, + size_t keylen, uint8_t *digest) + { + unsigned int digestLen; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + + HMAC_setup(ctx, key, keylen); + HMAC_crunch(ctx, message, messageLen); diff --git a/ports/librtmp/hashswf.patch b/ports/librtmp/hashswf.patch new file mode 100644 index 00000000000000..fb29549f3d12f6 --- /dev/null +++ b/ports/librtmp/hashswf.patch @@ -0,0 +1,28 @@ +diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c +index 3c56b6922..964a64d01 100644 +--- a/librtmp/hashswf.c ++++ b/librtmp/hashswf.c +@@ -57,10 +57,10 @@ + #include + #include + #include +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, (unsigned char *)key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, (unsigned char *)buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, (unsigned char *)dig, &dlen); +-#define HMAC_close(ctx) HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) ctx = HMAC_CTX_new(); HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, (unsigned char *)buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, (unsigned char *)dig, &dlen); ++#define HMAC_close(ctx) HMAC_CTX_free(ctx) + #endif + + extern void RTMP_TLS_Init(); +@@ -289,7 +289,7 @@ leave: + struct info + { + z_stream *zs; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + int first; + int zlib; + int size; diff --git a/ports/librtmp/hide_netstackdump.patch b/ports/librtmp/hide_netstackdump.patch index 2ae44e46b5a0a5..1cc7c8c5af03d8 100644 --- a/ports/librtmp/hide_netstackdump.patch +++ b/ports/librtmp/hide_netstackdump.patch @@ -1,8 +1,8 @@ diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c -index 5ef3ae9..7c6a010 100644 +index 0865689..b00710e 100644 --- a/librtmp/rtmp.c +++ b/librtmp/rtmp.c -@@ -129,7 +129,7 @@ static int clk_tck; +@@ -155,7 +155,7 @@ static int clk_tck; uint32_t RTMP_GetTime() { @@ -11,7 +11,7 @@ index 5ef3ae9..7c6a010 100644 return 0; #elif defined(_WIN32) return timeGetTime(); -@@ -1256,7 +1256,7 @@ RTMP_ClientPacket(RTMP *r, RTMPPacket *packet) +@@ -1381,7 +1381,7 @@ RTMP_ClientPacket(RTMP *r, RTMPPacket *packet) return bHasMediaPacket; } @@ -20,8 +20,8 @@ index 5ef3ae9..7c6a010 100644 extern FILE *netstackdump; extern FILE *netstackdump_read; #endif -@@ -1333,7 +1333,7 @@ ReadN(RTMP *r, char *buffer, int n) - SendBytesReceived(r); +@@ -1469,7 +1469,7 @@ ReadN(RTMP *r, char *buffer, int n) + return FALSE; } /*RTMP_Log(RTMP_LOGDEBUG, "%s: %d bytes\n", __FUNCTION__, nBytes); */ -#ifdef _DEBUG @@ -29,7 +29,7 @@ index 5ef3ae9..7c6a010 100644 fwrite(ptr, 1, nBytes, netstackdump_read); #endif -@@ -3064,7 +3064,7 @@ HandShake(RTMP *r, int FP9HandShake) +@@ -3757,7 +3757,7 @@ HandShake(RTMP *r, int FP9HandShake) memset(&clientsig[4], 0, 4); @@ -38,7 +38,7 @@ index 5ef3ae9..7c6a010 100644 for (i = 8; i < RTMP_SIG_SIZE; i++) clientsig[i] = 0xff; #else -@@ -3136,7 +3136,7 @@ SHandShake(RTMP *r) +@@ -3829,7 +3829,7 @@ SHandShake(RTMP *r) memcpy(serversig, &uptime, 4); memset(&serversig[4], 0, 4); @@ -47,7 +47,7 @@ index 5ef3ae9..7c6a010 100644 for (i = 8; i < RTMP_SIG_SIZE; i++) serversig[i] = 0xff; #else -@@ -3553,7 +3553,7 @@ RTMPSockBuf_Send(RTMPSockBuf *sb, const char *buf, int len) +@@ -4298,7 +4298,7 @@ RTMPSockBuf_Send(RTMPSockBuf *sb, const char *buf, int len) { int rc; diff --git a/ports/librtmp/portfile.cmake b/ports/librtmp/portfile.cmake index 25e41bbf7636c2..05a59fe34d593a 100644 --- a/ports/librtmp/portfile.cmake +++ b/ports/librtmp/portfile.cmake @@ -1,26 +1,19 @@ -include(vcpkg_common_functions) - -set(RTMPDUMP_VERSION 2.4) -set(RTMPDUMP_FILENAME rtmpdump-${RTMPDUMP_VERSION}.tar.gz) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rtmpdump) - -vcpkg_download_distfile(ARCHIVE - URLS "http://rtmpdump.mplayerhq.hu/download/${RTMPDUMP_FILENAME}" - FILENAME "${RTMPDUMP_FILENAME}" - SHA512 a6253af95492739366dce620a2a6cc6f4f18d7f12f9ef2c747240259066ca135beeb02091d0f3dd8380c0c294a30d3f702ad3fad1dee1db4e70473078fb81609 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mirror/rtmpdump + REF c5f04a58fc2aeea6296ca7c44ee4734c18401aa3 + SHA512 d97ac38672898a96412baa5f03d1e64d512ccefe15ead0a055ca039dc6057e2e620e046c28f4d7468e132b0b5a9eb9bd171250c1afa14da53760a0d7aae3c9e9 + PATCHES + dh.patch #Openssl 1.1.1 patch + handshake.patch #Openssl 1.1.1 patch + hashswf.patch #Openssl 1.1.1 patch + fix_strncasecmp.patch + hide_netstackdump.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/librtmp.def DESTINATION ${SOURCE_PATH}/librtmp) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix_strncasecmp.patch - ${CMAKE_CURRENT_LIST_DIR}/hide_netstackdump.patch -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/ports/librtmp/vcpkg.json b/ports/librtmp/vcpkg.json new file mode 100644 index 00000000000000..f917042067e214 --- /dev/null +++ b/ports/librtmp/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "librtmp", + "version-date": "2019-11-11", + "port-version": 2, + "description": "RTMPDump Real-Time Messaging Protocol API", + "homepage": "https://rtmpdump.mplayerhq.hu", + "dependencies": [ + "openssl", + "zlib" + ] +} diff --git a/ports/librttopo/fix-makefiles.patch b/ports/librttopo/fix-makefiles.patch new file mode 100644 index 00000000000000..41c6c8f9268772 --- /dev/null +++ b/ports/librttopo/fix-makefiles.patch @@ -0,0 +1,35 @@ +diff --git a/makefile.vc b/makefile.vc +index 1f790f0de..2f7e00f7b 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -17,11 +17,11 @@ LIBOBJ = src\box2d.obj src\bytebuffer.obj src\g_box.obj \ + src\rtout_kml.obj src\rtout_svg.obj src\rtout_twkb.obj src\rtout_wkb.obj \ + src\rtout_wkt.obj src\rtout_x3d.obj src\rtpoint.obj src\rtpoly.obj src\rtprint.obj \ + src\rtpsurface.obj src\rtspheroid.obj src\rtstroke.obj src\rttin.obj src\rttree.obj \ +- src\rttriangle.obj src\rtutil.obj src\stringbuffer.obj src\varint.obj ++ src\rttriangle.obj src\rtutil.obj src\stringbuffer.obj src\varint.obj src\rtt_tpsnap.obj + + LIBRTTOPO_DLL = librttopo$(VERSION).dll + +-CFLAGS = /nologo -IC:\OSGeo4W\include -I. -Iheaders $(OPTFLAGS) ++CFLAGS = /nologo -I. -Iheaders $(OPTFLAGS) + + default: all + + +diff --git a/nmake.opt b/nmake.opt +index 938979df1..ea80dab00 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,9 +1,8 @@ + # Directory tree where RTTOPO will be installed. +-INSTDIR=C:\OSGeo4W ++INSTDIR=$(INSTALLDIR) + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W4 /MD /D_CRT_SECURE_NO_WARNINGS \ +- /DDLL_EXPORT ++OPTFLAGS= /nologo /fp:precise /W4 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS + #OPTFLAGS= /nologo /Zi /MD /Fdlibrttopo.pdb /DDLL_EXPORT + + # Set the version number for the DLL. Normally we leave this blank since diff --git a/ports/librttopo/fix-pc-file.patch b/ports/librttopo/fix-pc-file.patch new file mode 100644 index 00000000000000..12483781b5257b --- /dev/null +++ b/ports/librttopo/fix-pc-file.patch @@ -0,0 +1,9 @@ +diff --git a/rttopo.pc.in b/rttopo.pc.in +index 86c71dc..4064506 100644 +--- a/rttopo.pc.in ++++ b/rttopo.pc.in +@@ -10,3 +10,4 @@ Description: the RT Topology library + Version: @VERSION@ + Libs: -L${libdir} -lrttopo -lm + Cflags: -I${includedir} ++Requires.private: geos diff --git a/ports/librttopo/geos-config.patch b/ports/librttopo/geos-config.patch new file mode 100644 index 00000000000000..eb6b90506f1513 --- /dev/null +++ b/ports/librttopo/geos-config.patch @@ -0,0 +1,25 @@ +diff --git a/configure.ac b/configure.ac +index a956106..739ee88 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -110,7 +110,7 @@ else + fi + fi + # Extract the linker and include flags +-GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` ++GEOS_LDFLAGS=`$GEOSCONFIG --clibs` + GEOS_CFLAGS=-I`$GEOSCONFIG --includes` + AC_SUBST([GEOS_LDFLAGS]) + AC_SUBST([GEOS_CFLAGS]) +@@ -122,9 +122,9 @@ CPPFLAGS="$CPPFLAGS_SAVE" + # Ensure we can link against libgeos_c + LIBS_SAVE="$LIBS" + LIBS="$GEOS_LDFLAGS" +-AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.5.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig])) ++AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.5.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig])) + LIBS="$LIBS_SAVE" +-LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c" ++LIBS="$LIBS $GEOS_LDFLAGS" + GEOS_MAJOR_VERSION=`$GEOSCONFIG --version | cut -d. -f1 | sed 's/[[^0-9]]//g'` + GEOS_MINOR_VERSION=`$GEOSCONFIG --version | cut -d. -f2 | sed 's/[[^0-9]]//g'` + RTGEOM_GEOS_VERSION="$GEOS_MAJOR_VERSION$GEOS_MINOR_VERSION" diff --git a/ports/librttopo/portfile.cmake b/ports/librttopo/portfile.cmake new file mode 100644 index 00000000000000..a1939b8631501f --- /dev/null +++ b/ports/librttopo/portfile.cmake @@ -0,0 +1,50 @@ +# NOTE: update the version and checksum for new LIBRTTOPO release +set(LIBRTTOPO_VERSION_STR "1.1.0") +set(LIBRTTOPO_PACKAGE_SUM "d9c2f4db1261cc942152d348abb7f03e6053a63b6966e081c5381d40bbebd3c7ca1963224487355f384d7562a90287fb24d7af9e7eda4a1e230ee6441cef5de9") + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.osgeo.org/librttopo/src/librttopo-${LIBRTTOPO_VERSION_STR}.tar.gz" + FILENAME "librttopo-${LIBRTTOPO_VERSION_STR}.tar.gz" + SHA512 ${LIBRTTOPO_PACKAGE_SUM} +) + +vcpkg_extract_source_archive_ex( + ARCHIVE "${ARCHIVE}" + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + fix-makefiles.patch + geos-config.patch + fix-pc-file.patch +) + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + + file(REMOVE "${SOURCE_PATH}/src/rttopo_config.h") + configure_file("${CMAKE_CURRENT_LIST_DIR}/rttopo_config.h.in" "${SOURCE_PATH}/src/rttopo_config.h" @ONLY) + + vcpkg_build_nmake( + SOURCE_PATH "${SOURCE_PATH}" + TARGET librttopo.lib + ) + + file(GLOB LIBRTTOPO_INCLUDE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/headers/*.h") + file(COPY ${LIBRTTOPO_INCLUDE} DESTINATION "${CURRENT_PACKAGES_DIR}/include") + + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/librttopo.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/librttopo.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") +else() # Build in UNIX + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + OPTIONS_DEBUG + "--with-geosconfig=${CURRENT_INSTALLED_DIR}/tools/geos/debug/bin/geos-config" + OPTIONS_RELEASE + "--with-geosconfig=${CURRENT_INSTALLED_DIR}/tools/geos/bin/geos-config" + ) + vcpkg_install_make() + vcpkg_fixup_pkgconfig() +endif() + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/librttopo/rttopo_config.h.in b/ports/librttopo/rttopo_config.h.in new file mode 100644 index 00000000000000..b4b1a39299f976 --- /dev/null +++ b/ports/librttopo/rttopo_config.h.in @@ -0,0 +1,168 @@ +/* src/rttopo_config.h. Generated from rttopo_config.h.in by configure. */ +/* src/rttopo_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ASSERT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_CTYPE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the `fdatasync' function. */ +#define HAVE_FDATASYNC 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOAT_H 1 + +/* Define to 1 if you have the `ftruncate' function. */ +#define HAVE_FTRUNCATE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GEOS_C_H 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `localtime_r' function. */ +#define HAVE_LOCALTIME_R 1 + +/* Define to 1 if `lstat' has the bug that it succeeds when given the + zero-length file name argument. */ +/* #undef HAVE_LSTAT_EMPTY_STRING_BUG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MATH_H 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if you have the `sqrt' function. */ +/* #undef HAVE_SQRT */ + +/* Define to 1 if `stat' has the bug that it succeeds when given the + zero-length file name argument. */ +/* #undef HAVE_STAT_EMPTY_STRING_BUG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* rtgeom version */ +#define LIBRTGEOM_VERSION "1.1.0" + +/* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Must be defined in order to disable debug mode. */ +#undef NDEBUG + +/* Name of package */ +#define PACKAGE "librttopo" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "strk@kbt.io" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "librttopo" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "librttopo 1.1.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "librttopo" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.1.0" + +/* RTGEOM Debug level */ +#define RTGEOM_DEBUG_LEVEL 0 + +/* GEOS library version */ +#define RTGEOM_GEOS_VERSION 38 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Version number of package */ +#define VERSION "1.1.0" + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +/* #undef volatile */ diff --git a/ports/librttopo/vcpkg.json b/ports/librttopo/vcpkg.json new file mode 100644 index 00000000000000..16e12134e5bfdf --- /dev/null +++ b/ports/librttopo/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "librttopo", + "version": "1.1.0", + "port-version": 4, + "description": "The RT Topology Library exposes an API to create and manage standard (ISO 13249 aka SQL/MM) topologies using user-provided data stores.", + "homepage": "https://git.osgeo.org/gitea/rttopo/librttopo", + "dependencies": [ + "geos" + ] +} diff --git a/ports/libsamplerate/CMakeLists.txt b/ports/libsamplerate/CMakeLists.txt deleted file mode 100644 index 44ba2277aa50ad..00000000000000 --- a/ports/libsamplerate/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -add_library(libsamplerate-0 - samplerate.c - src_sinc.c - src_zoh.c - src_linear.c - ../Win32/libsamplerate-0.def -) - -install(TARGETS libsamplerate-0 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - -install(FILES samplerate.h DESTINATION include) diff --git a/ports/libsamplerate/CONTROL b/ports/libsamplerate/CONTROL deleted file mode 100644 index 36e5df98c34597..00000000000000 --- a/ports/libsamplerate/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libsamplerate -Version: 0.1.9.0-1 -Homepage: https://www.mega-nerd.com/SRC -Description: Sample Rate Converter for audio diff --git a/ports/libsamplerate/portfile.cmake b/ports/libsamplerate/portfile.cmake index 9cd648a6d9d4ad..a6a76490f017b7 100644 --- a/ports/libsamplerate/portfile.cmake +++ b/ports/libsamplerate/portfile.cmake @@ -1,27 +1,27 @@ -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsamplerate-0.1.9) - -vcpkg_download_distfile(ARCHIVE - URLS "http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz" - FILENAME "libsamplerate-0.1.9.tar.gz" - SHA512 78596657963cbf06785e3e6e1190b093df71da52ca340e75bd8246a962cd79dd1c90fa5527c607cebcb296e2c1ee605015278b274e3b768f2f3fbeb0eadfb728 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libsndfile/libsamplerate + REF 0.2.2 + SHA512 37e0fd604907caf978659466289315befd66eec16c21a94e0b6106de18ffe803fbf2e7f3a8fb0430b33c0b784ecd6d4eaf3b9a862ed2670104647decbee913d6 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src) -file(COPY ${SOURCE_PATH}/Win32/config.h DESTINATION ${SOURCE_PATH}/src) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/src + SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DLIBSAMPLERATE_EXAMPLES=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SampleRate TARGET_PATH share/SampleRate) +vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsamplerate RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/libsamplerate/vcpkg.json b/ports/libsamplerate/vcpkg.json new file mode 100644 index 00000000000000..aec150fb99ad72 --- /dev/null +++ b/ports/libsamplerate/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libsamplerate", + "version-string": "0.2.2", + "description": "Sample Rate Converter for audio", + "homepage": "http://libsndfile.github.io/libsamplerate/" +} diff --git a/ports/libsass/portfile.cmake b/ports/libsass/portfile.cmake new file mode 100644 index 00000000000000..09b2282371fc74 --- /dev/null +++ b/ports/libsass/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sass/libsass + REF 8d312a1c91bb7dd22883ebdfc829003f75a82396 # 3.6.4 + SHA512 41e532c081804c889c3e7f9169bd90d7fc944d13817d5e3a4f8c19608ebb630db2b2b0e9c61a59a2446076f4093d5ec4cb4f767aa06fa0bf0f0687094e1a2913 + HEAD_REF master + PATCHES remove_compiler_flags.patch +) + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + +) +vcpkg_install_make(MAKEFILE GNUmakefile) +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libsass/remove_compiler_flags.patch b/ports/libsass/remove_compiler_flags.patch new file mode 100644 index 00000000000000..8a697ee4b4f5a9 --- /dev/null +++ b/ports/libsass/remove_compiler_flags.patch @@ -0,0 +1,24 @@ +diff --git a/GNUmakefile.am b/GNUmakefile.am +index 06a1d0c1e..6e7a15485 100644 +--- a/GNUmakefile.am ++++ b/GNUmakefile.am +@@ -1,6 +1,6 @@ + ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -I script + +-AM_COPT = -Wall -O2 ++AM_COPT = + AM_COVLDFLAGS = + + if ENABLE_COVERAGE +diff --git a/src/GNUmakefile.am b/src/GNUmakefile.am +index 9b0e6a99b..00404a017 100644 +--- a/src/GNUmakefile.am ++++ b/src/GNUmakefile.am +@@ -1,6 +1,6 @@ + ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -I script + +-AM_COPT = -Wall -O2 ++AM_COPT = + AM_COVLDFLAGS = + + if ENABLE_COVERAGE diff --git a/ports/libsass/vcpkg.json b/ports/libsass/vcpkg.json new file mode 100644 index 00000000000000..a67da017e96bc3 --- /dev/null +++ b/ports/libsass/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libsass", + "version-string": "3.6.4", + "port-version": 1, + "description": "LibSass - Sass compiler written in C++", + "homepage": "https://github.com/sass/libsass", + "supports": "!uwp" +} diff --git a/ports/libsbml/portfile.cmake b/ports/libsbml/portfile.cmake new file mode 100644 index 00000000000000..47a1cc601e3ee0 --- /dev/null +++ b/ports/libsbml/portfile.cmake @@ -0,0 +1,89 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sbmlteam/libsbml + REF 118ffbf11f1a5245cc544c1eac71019d979ecb20 #libSBML-5.19.0 + SHA512 7fe8b4d594876c6408e01c646187cb1587d0b4e12707a43286150d4e4646841e547bde971de917de1cdfbbb9365172aeac43c8e02f7d354400f9166f0f1c2c3d + HEAD_REF development +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_RUNTIME) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC_LIBRARY) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + comp ENABLE_COMP + fbc ENABLE_FBC + groups ENABLE_GROUPS + layout ENABLE_LAYOUT + multi ENABLE_MULTI + qual ENABLE_QUAL + render ENABLE_RENDER + render ENABLE_LAYOUT + bzip2 WITH_BZIP2 + zlib WITH_ZLIB + test WITH_CHECK + namespace WITH_CPP_NAMESPACE +) + +# Handle conflict features +set(WITH_EXPAT OFF) +if ("expat" IN_LIST FEATURES) + set(WITH_EXPAT ON) +endif() + +set(WITH_LIBXML OFF) +if ("libxml2" IN_LIST FEATURES) + set(WITH_LIBXML ON) +endif() + +if (WITH_EXPAT AND WITH_LIBXML) + message("Feature expat conflict with feature libxml2, currently using libxml2...") + set(WITH_EXPAT OFF) +endif() + +if ("test" IN_LIST FEATURES AND WIN32) + message(FATAL_ERROR "Feature test only support UNIX.") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + -DWITH_EXPAT=${WITH_EXPAT} + -DWITH_LIBXML=${WITH_LIBXML} + -DENABLE_L3V2EXTENDEDMATH:BOOL=ON + -DWITH_STATIC_RUNTIME=${STATIC_RUNTIME} + -DLIBSBML_SKIP_SHARED_LIBRARY=${STATIC_LIBRARY} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(GLOB TXT_FILES "${CURRENT_PACKAGES_DIR}/debug/*.txt") +if (TXT_FILES) + file(REMOVE ${TXT_FILES}) +endif() +file(GLOB TXT_FILES "${CURRENT_PACKAGES_DIR}/*.txt") +if (TXT_FILES) + file(REMOVE ${TXT_FILES}) +endif() + +if (EXISTS "${CURRENT_PACKAGES_DIR}/debug/share") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/README.md") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/README.md") +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/README.md") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.md") +endif() + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/libsbml/vcpkg.json b/ports/libsbml/vcpkg.json new file mode 100644 index 00000000000000..aeb7318e60d237 --- /dev/null +++ b/ports/libsbml/vcpkg.json @@ -0,0 +1,81 @@ +{ + "name": "libsbml", + "version": "5.19.0", + "description": "A library for reading / writing SBML files", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "comp", + "expat", + "fbc", + "groups", + "layout", + "libxml2", + "render" + ], + "features": { + "bzip2": { + "description": "bz2 compression support for libsbml", + "dependencies": [ + "bzip2" + ] + }, + "comp": { + "description": "support for Hierarchical Model Composition" + }, + "expat": { + "description": "libsbml using expat parser", + "dependencies": [ + "expat" + ] + }, + "fbc": { + "description": "support for Flux Balance Constrant Modeling" + }, + "groups": { + "description": "support for Groups" + }, + "layout": { + "description": "support for Pathway Layouts" + }, + "libxml2": { + "description": "libsbml using libxml2 parser", + "dependencies": [ + "libxml2" + ] + }, + "multi": { + "description": "support for Multistate Modeling" + }, + "namespace": { + "description": "Build with the WITH_CPP_NAMESPACE option set to on" + }, + "qual": { + "description": "support for Qualitative Modeling" + }, + "render": { + "description": "support for Rendering information" + }, + "test": { + "description": "Unit testing of libSBMLs implementation", + "dependencies": [ + "check" + ] + }, + "zlib": { + "description": "gzip compression support for libsbml", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/libsbsms/portfile.cmake b/ports/libsbsms/portfile.cmake new file mode 100644 index 00000000000000..20dcda6f202ecc --- /dev/null +++ b/ports/libsbsms/portfile.cmake @@ -0,0 +1,17 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO claytonotey/libsbsms + REF 2.3.0 + SHA512 e5b544c2bdbaa2169236987c7a043838c8d1761b25280c476d7a32656d482c6485cb33f579ea9d1ce586ec7b2913ed8fdcf1abe5c7cc8b9e4eef9ce87de54627 + HEAD_REF main +) + +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/sbsms" PACKAGE_NAME sbsms) +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/libsbsms/vcpkg.json b/ports/libsbsms/vcpkg.json new file mode 100644 index 00000000000000..360bef009b987e --- /dev/null +++ b/ports/libsbsms/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "libsbsms", + "version-semver": "2.3.0", + "description": "libsbsms is a library for high quality time and pitch scale modification of digital audio. It uses octave subband sinusoidal modeling.", + "homepage": "https://github.com/claytonotey/libsbsms", + "license": "GPL-2.0-or-later", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libsigcpp-3/portfile.cmake b/ports/libsigcpp-3/portfile.cmake new file mode 100644 index 00000000000000..0015715fb66c72 --- /dev/null +++ b/ports/libsigcpp-3/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/libsigcpp-3/vcpkg.json b/ports/libsigcpp-3/vcpkg.json new file mode 100644 index 00000000000000..a52d20dc9c7a3d --- /dev/null +++ b/ports/libsigcpp-3/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libsigcpp-3", + "version": "3.0.3", + "port-version": 1, + "description": "Typesafe callback framework for C++", + "homepage": "https://libsigcplusplus.github.io/libsigcplusplus/", + "dependencies": [ + "libsigcpp" + ] +} diff --git a/ports/libsigcpp/CMakeLists.txt b/ports/libsigcpp/CMakeLists.txt deleted file mode 100644 index 9c43b1a1bccd30..00000000000000 --- a/ports/libsigcpp/CMakeLists.txt +++ /dev/null @@ -1,59 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(libsigc++) - -set(CMAKE_CXX_STANDARD 17) - -set(SIGCPP_API_VERSION 2.0) - -add_definitions(-DSIGC_BUILD) - -include_directories(./MSVC_Net2013) # config file for windows is there -include_directories(.) - -set(SICGPP_SOURCES - sigc++/connection.cc - sigc++/signal_base.cc - sigc++/trackable.cc - sigc++/adaptors/lambda/lambda.cc - sigc++/functors/slot_base.cc) - -add_library(sigc ${SICGPP_SOURCES}) -set_target_properties(sigc PROPERTIES OUTPUT_NAME sigc-${SIGCPP_API_VERSION}) -install(TARGETS sigc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib) - -if(NOT SIGCPP_SKIP_HEADERS) - install(FILES MSVC_Net2013/sigc++config.h DESTINATION include) - install(FILES sigc++/sigc++.h DESTINATION include/sigc++) - install(FILES sigc++/bind.h DESTINATION include/sigc++) - install(FILES sigc++/bind_return.h DESTINATION include/sigc++) - install(FILES sigc++/connection.h DESTINATION include/sigc++) - install(FILES sigc++/limit_reference.h DESTINATION include/sigc++) - install(FILES sigc++/reference_wrapper.h DESTINATION include/sigc++) - install(FILES sigc++/retype_return.h DESTINATION include/sigc++) - install(FILES sigc++/signal.h DESTINATION include/sigc++) - install(FILES sigc++/signal_base.h DESTINATION include/sigc++) - install(FILES sigc++/slot.h DESTINATION include/sigc++) - install(FILES sigc++/trackable.h DESTINATION include/sigc++) - install(FILES sigc++/type_traits.h DESTINATION include/sigc++) - install(FILES sigc++/visit_each.h DESTINATION include/sigc++) - install(FILES sigc++/adaptors/adaptors.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/adaptor_trait.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/bind.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/bind_return.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/bound_argument.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/compose.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/deduce_result_type.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/exception_catch.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/hide.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/retype.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/retype_return.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/track_obj.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/lambda/base.h DESTINATION include/sigc++/adaptors/lambda) - install(FILES sigc++/adaptors/lambda/select.h DESTINATION include/sigc++/adaptors/lambda) - install(FILES sigc++/functors/functors.h DESTINATION include/sigc++/functors) - install(FILES sigc++/functors/functor_trait.h DESTINATION include/sigc++/functors) - install(FILES sigc++/functors/mem_fun.h DESTINATION include/sigc++/functors) - install(FILES sigc++/functors/ptr_fun.h DESTINATION include/sigc++/functors) - install(FILES sigc++/functors/slot.h DESTINATION include/sigc++/functors) - install(FILES sigc++/functors/slot_base.h DESTINATION include/sigc++/functors) -endif() diff --git a/ports/libsigcpp/CONTROL b/ports/libsigcpp/CONTROL deleted file mode 100644 index c0393066bba427..00000000000000 --- a/ports/libsigcpp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libsigcpp -Version: 2.10-1 -Description: Typesafe callback framework for C++ diff --git a/ports/libsigcpp/disable_tests_enable_static_build.patch b/ports/libsigcpp/disable_tests_enable_static_build.patch new file mode 100644 index 00000000000000..2c4909df3261b9 --- /dev/null +++ b/ports/libsigcpp/disable_tests_enable_static_build.patch @@ -0,0 +1,41 @@ +From 219b3f5a681731bcaeee9fee0f136e6eb6143d33 Mon Sep 17 00:00:00 2001 +From: Bruk Tedla +Date: Thu, 17 Sep 2020 19:45:27 +0300 +Subject: [PATCH] disable_tests_enable_static_build + +--- + CMakeLists.txt | 4 ++-- + sigc++/CMakeLists.txt | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2e7f383..b2b8395 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -89,8 +89,8 @@ enable_testing() + + + add_subdirectory (sigc++) +-add_subdirectory (examples) +-add_subdirectory (tests) ++#add_subdirectory (examples) ++#add_subdirectory (tests) + + + set (PROJECT_CMAKE_NAME "${PROJECT_NAME}-3") +diff --git a/sigc++/CMakeLists.txt b/sigc++/CMakeLists.txt +index fa5a91a..86f1be7 100644 +--- a/sigc++/CMakeLists.txt ++++ b/sigc++/CMakeLists.txt +@@ -23,7 +23,7 @@ set (SOURCE_FILES + + set (SIGCPP_LIB_NAME sigc-${SIGCXX_API_VERSION}) + +-add_library(${SIGCPP_LIB_NAME} SHARED ${SOURCE_FILES}) ++add_library(${SIGCPP_LIB_NAME} ${SOURCE_FILES}) + + set_property (TARGET ${SIGCPP_LIB_NAME} PROPERTY VERSION ${PACKAGE_VERSION}) + set_property(TARGET ${SIGCPP_LIB_NAME} PROPERTY SOVERSION ${LIBSIGCPP_SOVERSION}) +-- +2.27.0.windows.1 + diff --git a/ports/libsigcpp/dont-import-symbols.patch b/ports/libsigcpp/dont-import-symbols.patch deleted file mode 100644 index b031d3bafac57d..00000000000000 --- a/ports/libsigcpp/dont-import-symbols.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/sigc++config.h b/sigc++config.h -index e212700..8d7366e 100644 ---- a/sigc++config.h -+++ b/sigc++config.h -@@ -72,6 +72,8 @@ - - #endif /* !SIGC_MSC */ - -+#undef SIGC_DLL -+ - #ifdef SIGC_DLL - # if defined(SIGC_BUILD) && defined(_WINDLL) - # define SIGC_API __declspec(dllexport) diff --git a/ports/libsigcpp/fix-usage-in-static-build.patch b/ports/libsigcpp/fix-usage-in-static-build.patch new file mode 100644 index 00000000000000..378f1f96a3cdd1 --- /dev/null +++ b/ports/libsigcpp/fix-usage-in-static-build.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f54e830..972d0dc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,6 +53,10 @@ set (PROJECT_SOURCE_DIR "${sigc++_SOURCE_DIR}/sigc++") + include_directories (${sigc++_SOURCE_DIR}) + include_directories (${sigc++_BINARY_DIR}) + ++if(BUILD_SHARED_LIBS) ++ add_compile_options(-DBUILD_SHARED) ++endif() ++ + configure_file (sigc++config.h.cmake sigc++config.h) + + set (prefix ${CMAKE_INSTALL_PREFIX}) +diff --git a/sigc++config.h.cmake b/sigc++config.h.cmake +index 74d348a..43a99c5 100644 +--- a/sigc++config.h.cmake ++++ b/sigc++config.h.cmake +@@ -16,7 +16,9 @@ + # if defined(_MSC_VER) + # define SIGC_MSC 1 + # define SIGC_WIN32 1 ++# ifdef BUILD_SHARED + # define SIGC_DLL 1 ++# endif + # elif defined(__CYGWIN__) + # define SIGC_CONFIGURE 1 + # elif defined(__MINGW32__) diff --git a/ports/libsigcpp/portfile.cmake b/ports/libsigcpp/portfile.cmake index c98a267176c55b..2328d35626c319 100644 --- a/ports/libsigcpp/portfile.cmake +++ b/ports/libsigcpp/portfile.cmake @@ -1,28 +1,26 @@ - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.10.0) -vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.0.tar.xz" - FILENAME "libsigc++-2.10.0.tar.xz" - SHA512 5b96df21d6bd6ba41520c7219e77695a86aabc60b7259262c7a9f4b8475ce0e2fd8dc37bcf7c17e24e818ff28c262d682b964c83e215b51bdbe000f3f58794ae) - -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libsigcplusplus/libsigcplusplus + REF 7e20b36bddab74faed39aa3768d07fd372fce596 + SHA512 6220a3974ee90afb5028a5b60ffcbff353fffbbfcf1570d8db05b6d91604324a73badcb17c73c852d6c5265e2b31e1c2de1b3ea20c0e60ecdb17ce90c9ca40bd + HEAD_REF master + PATCHES + disable_tests_enable_static_build.patch + version.patch + fix-usage-in-static-build.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG - -DSIGCPP_SKIP_HEADERS=ON) - +) vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sigc++-3 TARGET_PATH share/sigc++-3) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/dont-import-symbols.patch) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/sigc++-3.0/include/sigc++config.h" "ifdef BUILD_SHARED" "if 1") endif() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsigcpp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libsigcpp/COPYING ${CURRENT_PACKAGES_DIR}/share/libsigcpp/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libsigcpp/vcpkg.json b/ports/libsigcpp/vcpkg.json new file mode 100644 index 00000000000000..780711131ee00d --- /dev/null +++ b/ports/libsigcpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libsigcpp", + "version": "3.0.3", + "port-version": 1, + "description": "Typesafe callback framework for C++", + "homepage": "https://libsigcplusplus.github.io/libsigcplusplus/" +} diff --git a/ports/libsigcpp/version.patch b/ports/libsigcpp/version.patch new file mode 100644 index 00000000000000..dd485021edbf48 --- /dev/null +++ b/ports/libsigcpp/version.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b06ef121c..9b9520342 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,9 +16,9 @@ + + cmake_minimum_required (VERSION 3.2) + +-set (SIGCXX_MAJOR_VERSION 2) +-set (SIGCXX_MINOR_VERSION 99) +-set (SIGCXX_MICRO_VERSION 1) ++set (SIGCXX_MAJOR_VERSION 3) ++set (SIGCXX_MINOR_VERSION 0) ++set (SIGCXX_MICRO_VERSION 3) + + set (SIGCXX_API_VERSION 3.0) + set (PACKAGE_VERSION ${SIGCXX_MAJOR_VERSION}.${SIGCXX_MINOR_VERSION}.${SIGCXX_MICRO_VERSION}) diff --git a/ports/libsmb2/portfile.cmake b/ports/libsmb2/portfile.cmake new file mode 100644 index 00000000000000..4558f3e0143523 --- /dev/null +++ b/ports/libsmb2/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_fail_port_install(ON_TARGET "osx") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sahlberg/libsmb2 + REF d8c85a3119a0bd769590e448216130b368cd1099 + SHA512 d15a040ed6314ad6f7984cfa7b52d9ede9934b2a7ec9827e833f574c25c9f694b5372b3e0950e258a6244b7aaf32b9e59987a75a88681d8031d9837ba94629d5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +#the debug/share folder is generated empty by the provided cmake system +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libsmb2/vcpkg.json b/ports/libsmb2/vcpkg.json new file mode 100644 index 00000000000000..4b5b2b9a984f1f --- /dev/null +++ b/ports/libsmb2/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libsmb2", + "version-date": "2021-04-29", + "description": "SMB2/3 Userspace Client", + "homepage": "https://github.com/sahlberg/libsmb2", + "supports": "!osx", + "dependencies": [ + "openssl", + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL deleted file mode 100644 index 2547637a8c4c6d..00000000000000 --- a/ports/libsndfile/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: libsndfile -Version: 1.0.29-8 -Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo -Homepage: https://github.com/erikd/libsndfile -Default-Features: external-libs - -Feature: external-libs -Description: Support Ogg Vorbis and FLAC audio files -Build-Depends: libogg, libflac, libvorbis diff --git a/ports/libsndfile/fix-install-path.patch b/ports/libsndfile/fix-install-path.patch deleted file mode 100644 index 38c6ff734f066d..00000000000000 --- a/ports/libsndfile/fix-install-path.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cc35414..d629adf 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -641,12 +641,12 @@ if (ENABLE_PACKAGE_CONFIG) - LibSndFileConfig.cmake - INSTALL_DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) - -- install(EXPORT LibSndFileTargets DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) -+ install(EXPORT LibSndFileTargets DESTINATION share/libsndfile) - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/LibSndFileConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/LibSndFileConfigVersion.cmake - DESTINATION -- ${CMAKE_INSTALL_PACKAGEDIR}) -+ share/libsndfile) - - elseif (NOT ENABLE_PACKAGE_CONFIG) - -@@ -698,9 +698,9 @@ set (html_DATA - doc/embedded_files.html - doc/octave.html - doc/tutorial.html) --install (FILES ${html_DATA} DESTINATION ${CMAKE_INSTALL_DOCDIR}) -+#install (FILES ${html_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/libsndfile) - --install (FILES ${CMAKE_CURRENT_BINARY_DIR}/sndfile.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -+#install (FILES ${CMAKE_CURRENT_BINARY_DIR}/sndfile.pc DESTINATION share/libsndfile/pkgconfig) - - # - # Testing diff --git a/ports/libsndfile/portfile.cmake b/ports/libsndfile/portfile.cmake index 1e86fbffbdc53f..ad84e3315b43ad 100644 --- a/ports/libsndfile/portfile.cmake +++ b/ports/libsndfile/portfile.cmake @@ -1,28 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO erikd/libsndfile - REF 6830c421899e32f8d413a903a21a9b6cf384d369 - SHA512 b13c5d7bc27218eff8a8c4ce89a964b4920b1d3946e4843e60be965d77ec205845750a82bf654a7c2c772bf3a24f6ff5706881b24ff12115f2525c8134b6d0b9 + REPO libsndfile/libsndfile + REF 1.0.31 + SHA512 5767ced306f2d300aa2014d383c22f3ee9a4fe1ffb2c463405bc26209ede09a9cfb95e1c08256db36e986d2b30151c38dbe635a3cae0b7138d7de485e2084891 HEAD_REF master - PATCHES - uwp-createfile-getfilesize.patch - uwp-createfile-getfilesize-addendum.patch - fix-install-path.patch ) -string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" CRT_LIB_STATIC) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) - -option(BUILD_EXECUTABLES "Build sndfile tools and install to folder tools" OFF) - -if("external-libs" IN_LIST FEATURES) - set(SNDFILE_WITHOUT_EXTERNAL_LIBS OFF) -else() - set(SNDFILE_WITHOUT_EXTERNAL_LIBS ON) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_find_acquire_program(PYTHON3) endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES external-libs ENABLE_EXTERNAL_LIBS +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -31,49 +22,27 @@ vcpkg_configure_cmake( -DBUILD_REGTEST=OFF -DBUILD_TESTING=OFF -DENABLE_BOW_DOCS=OFF - -DENABLE_STATIC_RUNTIME=${CRT_LIB_STATIC} - -DBUILD_STATIC_LIBS=${BUILD_STATIC} - -DDISABLE_EXTERNAL_LIBS=${SNDFILE_WITHOUT_EXTERNAL_LIBS} - OPTIONS_RELEASE - -DBUILD_PROGRAMS=${BUILD_EXECUTABLES} - OPTIONS_DEBUG - -DBUILD_PROGRAMS=0 + -DBUILD_PROGRAMS=OFF + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON + -DPYTHON_EXECUTABLE=${PYTHON3} + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() -# Fix applied for 6830c421899e32f8d413a903a21a9b6cf384d369 -file(READ "${CURRENT_PACKAGES_DIR}/share/libsndfile/LibSndFileTargets.cmake" _contents) -string(REPLACE "INTERFACE_INCLUDE_DIRECTORIES \"\${_IMPORT_PREFIX}/lib\"" "INTERFACE_INCLUDE_DIRECTORIES \"\${_IMPORT_PREFIX}/include\"" _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/share/libsndfile/LibSndFileTargets.cmake" "${_contents}") +if(WIN32 AND (NOT MINGW) AND (NOT CYGWIN)) + set(CONFIG_PATH cmake) +else() + set(CONFIG_PATH lib/cmake/SndFile) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH ${CONFIG_PATH} TARGET_PATH share/SndFile) +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) - -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") - set(SHARED_LIB_SUFFIX ".dll") -else() - set(EXECUTABLE_SUFFIX) - set(SHARED_LIB_SUFFIX) -endif() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/libsndfile-1${SHARED_LIB_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/libnsdfile-1${SHARED_LIB_SUFFIX}) -endif() - -if(BUILD_EXECUTABLES) - file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${EXECUTABLE_SUFFIX}) - file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - file(REMOVE ${TOOLS}) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -endif(BUILD_EXECUTABLES) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libsndfile/uwp-createfile-getfilesize-addendum.patch b/ports/libsndfile/uwp-createfile-getfilesize-addendum.patch deleted file mode 100644 index 62e6b1131f1009..00000000000000 --- a/ports/libsndfile/uwp-createfile-getfilesize-addendum.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/file_io.c b/src/file_io.c -index 47351bc..54741c9 100644 ---- a/src/file_io.c -+++ b/src/file_io.c -@@ -799,6 +799,8 @@ psf_open_handle (PSF_FILE * pfile) - - if (handle == INVALID_HANDLE_VALUE) - return NULL; -+ -+ return handle; - #else - if (pfile->use_wchar) - handle = CreateFileW ( diff --git a/ports/libsndfile/uwp-createfile-getfilesize.patch b/ports/libsndfile/uwp-createfile-getfilesize.patch deleted file mode 100644 index 0e60cde54529f6..00000000000000 --- a/ports/libsndfile/uwp-createfile-getfilesize.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/src/file_io.c b/src/file_io.c -index 7cf8f0c..47351bc 100644 ---- a/src/file_io.c -+++ b/src/file_io.c -@@ -787,6 +787,19 @@ psf_open_handle (PSF_FILE * pfile) - return NULL ; - } ; - -+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) -+ if (!pfile->use_wchar) -+ return NULL; -+ -+ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0}; -+ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); -+ cfParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; -+ -+ handle = CreateFile2(pfile->path.wc, dwDesiredAccess, dwShareMode, dwCreationDistribution, &cfParams); -+ -+ if (handle == INVALID_HANDLE_VALUE) -+ return NULL; -+#else - if (pfile->use_wchar) - handle = CreateFileW ( - pfile->path.wc, /* pointer to name of the file */ -@@ -812,6 +825,7 @@ psf_open_handle (PSF_FILE * pfile) - return NULL ; - - return handle ; -+#endif - } /* psf_open_handle */ - - /* USE_WINDOWS_API */ static void -@@ -1104,7 +1118,16 @@ psf_is_pipe (SF_PRIVATE *psf) - - /* USE_WINDOWS_API */ sf_count_t - psf_get_filelen_handle (HANDLE handle) --{ sf_count_t filelen ; -+{ -+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) -+ LARGE_INTEGER size; -+ -+ if (!GetFileSizeEx(handle, &size) && GetLastError() != NO_ERROR) -+ return (sf_count_t) -1 ; -+ -+ return size.QuadPart; -+#else -+ sf_count_t filelen ; - DWORD dwFileSizeLow, dwFileSizeHigh, dwError = NO_ERROR ; - - dwFileSizeLow = GetFileSize (handle, &dwFileSizeHigh) ; -@@ -1118,6 +1141,7 @@ psf_get_filelen_handle (HANDLE handle) - filelen = dwFileSizeLow + ((__int64) dwFileSizeHigh << 32) ; - - return filelen ; -+#endif - } /* psf_get_filelen_handle */ - - /* USE_WINDOWS_API */ void diff --git a/ports/libsndfile/vcpkg.json b/ports/libsndfile/vcpkg.json new file mode 100644 index 00000000000000..e0d0acc68c3ae2 --- /dev/null +++ b/ports/libsndfile/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "libsndfile", + "version-string": "1.0.31", + "description": "Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo", + "homepage": "https://github.com/erikd/libsndfile", + "license": "LGPL-2.1", + "default-features": [ + "external-libs" + ], + "features": { + "external-libs": { + "description": "Default feature. Enables Ogg Vorbis, FLAC and Ogg Opus formats support.", + "dependencies": [ + "libflac", + "libvorbis", + "opus" + ] + } + } +} diff --git a/ports/libsnoretoast/portfile.cmake b/ports/libsnoretoast/portfile.cmake new file mode 100644 index 00000000000000..a9159e3c3ae02d --- /dev/null +++ b/ports/libsnoretoast/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "osx" "linux" "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/snoretoast + REF v0.8.0 + SHA512 233751b6cc3f8099c742e4412a3c9ba8707a2f3c69b57bab93dd83b028aa0c0656cade8de1ece563843ace576fd0d8e5f3a29c254a07ed939d0a69cd2d4f6c2a + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_STATIC_RUNTIME=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/libsnoretoast") +vcpkg_copy_tools( + TOOL_NAMES "snoretoast" + AUTO_CLEAN +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/etc") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +file(INSTALL "${SOURCE_PATH}/COPYING.LGPL-3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libsnoretoast/vcpkg.json b/ports/libsnoretoast/vcpkg.json new file mode 100644 index 00000000000000..bfc244ad545526 --- /dev/null +++ b/ports/libsnoretoast/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "libsnoretoast", + "version-semver": "0.8.0", + "description": "A tool to create Windows Toast notifications and parse them on Windows 8 or later.", + "homepage": "https://invent.kde.org/libraries/snoretoast", + "supports": "windows & !uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libsodium/CMakeLists.txt b/ports/libsodium/CMakeLists.txt index 0cc4f417c15585..429ab4c294feca 100644 --- a/ports/libsodium/CMakeLists.txt +++ b/ports/libsodium/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.9) +include(CheckCSourceRuns) + file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/configure.ac config_ac_contents) foreach (line ${config_ac_contents}) @@ -36,6 +38,7 @@ option(ENABLE_BLOCKING_RANDOM "Enable blocking random" OFF) option(ENABLE_MINIMAL "Only compile the minimum set of functions required for the high-level API" OFF) option(ENABLE_PTHREADS "Use pthreads library" ON) option(ENABLE_RETPOLINE "Use return trampolines for indirect calls" OFF) +option(ENABLE_NATIVE_OPTIMIZATIONS "Optimize for the native CPU - The resulting library will be faster but not portable" OFF) if (ENABLE_MINIMAL) set(SODIUM_LIBRARY_MINIMAL_DEF "#define SODIUM_LIBRARY_MINIMAL 1") @@ -46,35 +49,7 @@ configure_file( ${CMAKE_BINARY_DIR}/sodium/version.h ) -file(GLOB sodium_headers - ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/*.h - ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium.h - ${CMAKE_BINARY_DIR}/sodium/version.h -) - -if (UNIX) - file(GLOB_RECURSE sodium_sources - ${PROJECT_SOURCE_DIR}/src/libsodium/*.c - ${PROJECT_SOURCE_DIR}/src/libsodium/*.S # HAVE_AVX_ASM - ) -else () - file(GLOB_RECURSE sodium_sources - ${PROJECT_SOURCE_DIR}/src/libsodium/*.c - ) -endif () - -if (MSVC) - enable_language(RC) - - list(APPEND sodium_sources - builds/msvc/resource.rc - ) -endif () - -add_library(${PROJECT_NAME} - ${sodium_headers} - ${sodium_sources} -) +add_library(${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES @@ -82,22 +57,35 @@ set_target_properties(${PROJECT_NAME} OUTPUT_NAME "lib${PROJECT_NAME}" ) -test_big_endian(IS_BIG_ENDIAN) +if (MSVC) -if (IS_BIG_ENDIAN) - target_compile_definitions(${PROJECT_NAME} PRIVATE NATIVE_BIG_ENDIAN) -else () - target_compile_definitions(${PROJECT_NAME} PRIVATE NATIVE_LITTLE_ENDIAN) -endif () + target_include_directories(${PROJECT_NAME} + PRIVATE + $ + $ + ) -macro (sodium_check_func func var) - check_function_exists(${func} ${var}) - if (${var}) - target_compile_definitions(${PROJECT_NAME} PRIVATE ${var}=1) - endif () -endmacro () + enable_language(RC) + + # see libsodium.vcxproj for reference + # - omitted "" in favour of "${CMAKE_BINARY_DIR}/sodium/version.h" + file(GLOB_RECURSE sodium_headers + ${CMAKE_BINARY_DIR}/sodium/version.h + ${PROJECT_SOURCE_DIR}/builds/msvc/resource.h + ${PROJECT_SOURCE_DIR}/src/libsodium/*.h + ) + + file(GLOB_RECURSE sodium_sources + ${PROJECT_SOURCE_DIR}/builds/msvc/resource.rc + ${PROJECT_SOURCE_DIR}/src/libsodium/*.c + ) + + target_sources(${PROJECT_NAME} + PRIVATE + ${sodium_headers} + ${sodium_sources} + ) -if (MSVC) target_compile_options(${PROJECT_NAME} PRIVATE /D_CONSOLE @@ -114,38 +102,36 @@ if (MSVC) PUBLIC advapi32 ) -else () - if (ENABLE_BLOCKING_RANDOM) - target_compile_definitions(${PROJECT_NAME} PRIVATE USE_BLOCKING_RANDOM) - endif () - - if (ENABLE_PTHREADS) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_PTHREAD) - target_compile_options(${PROJECT_NAME} PRIVATE -ftls-model=local-dynamic) - target_compile_options(${PROJECT_NAME} PUBLIC -pthread) - endif () - - if (ENABLE_SSP) - target_compile_options(${PROJECT_NAME} PRIVATE -fstack-protector-all) - endif () - if (ENABLE_PIE) - target_compile_options(${PROJECT_NAME} PRIVATE -fPIE) - endif () +else () - if (ENABLE_RETPOLINE) - target_compile_options(${PROJECT_NAME} - PRIVATE - -mindirect-branch=thunk-inline - -mindirect-branch-register - ) - endif () + # use interface libs to track common flags and definitions across all targets + add_library(${PROJECT_NAME}_config_private INTERFACE) + add_library(${PROJECT_NAME}_config_public INTERFACE) + + # use interface libs to track special flags only required for certain objects + add_library(${PROJECT_NAME}_aesni_config INTERFACE) + add_library(${PROJECT_NAME}_avx_config INTERFACE) + add_library(${PROJECT_NAME}_avx2_config INTERFACE) + add_library(${PROJECT_NAME}_avx512f_config INTERFACE) + add_library(${PROJECT_NAME}_mmx_config INTERFACE) + add_library(${PROJECT_NAME}_pclmul_config INTERFACE) + add_library(${PROJECT_NAME}_rdrand_config INTERFACE) + add_library(${PROJECT_NAME}_sse2_config INTERFACE) + add_library(${PROJECT_NAME}_sse3_config INTERFACE) + add_library(${PROJECT_NAME}_sse41_config INTERFACE) + add_library(${PROJECT_NAME}_ssse3_config INTERFACE) + + target_include_directories(${PROJECT_NAME}_config_private + INTERFACE + $ + $ + ) - target_compile_options(${PROJECT_NAME} - PRIVATE + target_compile_options(${PROJECT_NAME}_config_private + INTERFACE -flax-vector-conversions -fvisibility=hidden - -fPIC -fwrapv -Wall -Wextra @@ -175,25 +161,89 @@ else () -Wswitch-enum #-Wvariable-decl -Wwrite-strings - -Wl,-z,relro - -Wl,-z,now - -Wl,-z,noexecstack ) + if (NOT MINGW) + target_compile_options(${PROJECT_NAME}_config_private + INTERFACE + -fPIC + -Wl,-z,relro + -Wl,-z,now + -Wl,-z,noexecstack + ) + endif() + + if (MINGW) + target_compile_options(${PROJECT_NAME}_config_private + INTERFACE + -fno-asynchronous-unwind-tables + ) + target_link_options(${PROJECT_NAME}_config_private + INTERFACE + -Wl,--dynamicbase + -Wl,--high-entropy-va + -Wl,--nxcompat + ) + endif() + if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang") - target_compile_options(${PROJECT_NAME} - PRIVATE + target_compile_options(${PROJECT_NAME}_config_private + INTERFACE -Wno-unknown-warning-option -Wshorten-64-to-32 ) endif () + # see configure.ac for reference + if (ENABLE_BLOCKING_RANDOM) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE USE_BLOCKING_RANDOM) + endif () + + if (ENABLE_PTHREADS) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_PTHREAD) + target_compile_options(${PROJECT_NAME}_config_private INTERFACE -ftls-model=local-dynamic) + target_compile_options(${PROJECT_NAME}_config_public INTERFACE -pthread) + endif () + + if (ENABLE_SSP AND NOT MINGW) + target_compile_options(${PROJECT_NAME}_config_private INTERFACE -fstack-protector-all) + endif () + + if (ENABLE_PIE AND NOT MINGW) + target_compile_options(${PROJECT_NAME}_config_private INTERFACE -fPIE) + endif () + + if (ENABLE_RETPOLINE) + target_compile_options(${PROJECT_NAME}_config_private + INTERFACE + -mindirect-branch=thunk-inline + -mindirect-branch-register + ) + endif () + + if (ENABLE_NATIVE_OPTIMIZATIONS) + target_compile_options(${PROJECT_NAME}_config_private + INTERFACE + -ftree-vectorize + -ftree-slp-vectorize + -fomit-frame-pointer + -march=native + ) + endif () + check_include_file(sys/mman.h HAVE_SYS_MMAN_H) if (HAVE_SYS_MMAN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_SYS_MMAN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_SYS_MMAN_H) endif () + macro (sodium_check_func func var) + check_function_exists(${func} ${var}) + if (${var}) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE ${var}=1) + endif () + endmacro () + sodium_check_func(arc4random HAVE_SAFE_ARC4RANDOM) sodium_check_func(mmap HAVE_MMAP) sodium_check_func(mlock HAVE_MLOCK) @@ -206,132 +256,113 @@ else () sodium_check_func(posix_memalign HAVE_POSIX_MEMALIGN) sodium_check_func(getpid HAVE_GETPID) - check_c_source_compiles( - " - #pragma GCC target(\"mmx\") - #include - int main(void) - { - __m64 x = _mm_setzero_si64(); - } - " - HAVE_MMINTRIN_H - ) - - if (HAVE_MMINTRIN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_MMINTRIN_H=1) - target_compile_options(${PROJECT_NAME} PRIVATE -mmmx) - endif () - - check_c_source_compiles( - " - #pragma GCC target(\"sse2\") - #ifndef __SSE2__ - # define __SSE2__ - #endif - - #include - int main(void) { - __m128d x = _mm_setzero_pd(); - __m128i z = _mm_srli_epi64(_mm_setzero_si128(), 26); - } - " - HAVE_EMMINTRIN_H - ) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + check_c_source_runs( + " + #pragma GCC target(\"mmx\") + #include + int main(void) + { + __m64 x = _mm_setzero_si64(); + } + " + HAVE_MMINTRIN_H + ) - if (HAVE_EMMINTRIN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_EMMINTRIN_H=1) - target_compile_options(${PROJECT_NAME} PRIVATE -msse2) - endif () + if (HAVE_MMINTRIN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_MMINTRIN_H=1) + target_compile_options(${PROJECT_NAME}_mmx_config INTERFACE -mmmx) + endif () - check_c_source_compiles( - " - #pragma GCC target(\"sse3\") - #include - int main(void) { - __m128 x = _mm_addsub_ps(_mm_cvtpd_ps(_mm_setzero_pd()), _mm_cvtpd_ps(_mm_setzero_pd())); - } - " - HAVE_PMMINTRIN_H - ) + check_c_source_runs( + " + #pragma GCC target(\"sse2\") + #ifndef __SSE2__ + # define __SSE2__ + #endif + + #include + int main(void) { + __m128d x = _mm_setzero_pd(); + __m128i z = _mm_srli_epi64(_mm_setzero_si128(), 26); + } + " + HAVE_EMMINTRIN_H + ) - if (HAVE_PMMINTRIN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_PMMINTRIN_H=1) - target_compile_options(${PROJECT_NAME} PRIVATE -msse3) - endif () + if (HAVE_EMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_EMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME}_sse2_config INTERFACE -msse2) + endif () - check_c_source_compiles( - " - #pragma GCC target(\"ssse3\") - #include - int main(void) { - __m64 x = _mm_abs_pi32(_m_from_int(0)); - } - " - HAVE_TMMINTRIN_H - ) + check_c_source_runs( + " + #pragma GCC target(\"sse3\") + #include + int main(void) { + __m128 x = _mm_addsub_ps(_mm_cvtpd_ps(_mm_setzero_pd()), _mm_cvtpd_ps(_mm_setzero_pd())); + } + " + HAVE_PMMINTRIN_H + ) - if (HAVE_TMMINTRIN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_TMMINTRIN_H=1) - target_compile_options(${PROJECT_NAME} PRIVATE -mssse3) - endif () + if (HAVE_PMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_PMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME}_sse3_config INTERFACE -msse3) + endif () - check_c_source_compiles( - " - #pragma GCC target(\"sse4.1\") - #include - int main(void) { - __m128i x = _mm_minpos_epu16(_mm_setzero_si128()); - } - " - HAVE_SMMINTRIN_H - ) + check_c_source_runs( + " + #pragma GCC target(\"ssse3\") + #include + int main(void) { + __m64 x = _mm_abs_pi32(_m_from_int(0)); + } + " + HAVE_TMMINTRIN_H + ) - if (HAVE_SMMINTRIN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_SMMINTRIN_H=1) - target_compile_options(${PROJECT_NAME} PRIVATE -msse4.1) - endif () + if (HAVE_TMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_TMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME}_ssse3_config INTERFACE -mssse3) + endif () - check_c_source_compiles( - " - #ifdef __native_client__ - # error NativeClient detected - Avoiding AVX opcodes - #endif - #pragma GCC target(\"avx\") - #include - int main(void) { - _mm256_zeroall(); - } - " - HAVE_AVXINTRIN_H - ) + check_c_source_runs( + " + #pragma GCC target(\"sse4.1\") + #include + int main(void) { + __m128i x = _mm_minpos_epu16(_mm_setzero_si128()); + } + " + HAVE_SMMINTRIN_H + ) - if (HAVE_AVXINTRIN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AVXINTRIN_H=1) - target_compile_options(${PROJECT_NAME} PRIVATE -mavx) - endif () + if (HAVE_SMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_SMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME}_sse41_config INTERFACE -msse4.1) + endif () - check_c_source_compiles( - " - #ifdef __native_client__ - # error NativeClient detected - Avoiding AVX2 opcodes - #endif - #pragma GCC target(\"avx2\") - #include - int main(void) { - __m256 x = _mm256_set1_ps(3.14); - __m256 y = _mm256_permutevar8x32_ps(x, _mm256_set1_epi32(42)); - return _mm256_movemask_ps(_mm256_cmp_ps(x, y, _CMP_NEQ_OQ)); - } - " - HAVE_AVX2INTRIN_H - ) + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX opcodes + #endif + #pragma GCC target(\"avx\") + #include + int main(void) { + _mm256_zeroall(); + } + " + HAVE_AVXINTRIN_H + ) - if (HAVE_AVX2INTRIN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AVX2INTRIN_H=1) - target_compile_options(${PROJECT_NAME} PRIVATE -mavx2) + if (HAVE_AVXINTRIN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_AVXINTRIN_H=1) + target_compile_options(${PROJECT_NAME}_avx_config INTERFACE -mavx) + endif () - check_c_source_compiles( + check_c_source_runs( " #ifdef __native_client__ # error NativeClient detected - Avoiding AVX2 opcodes @@ -339,232 +370,252 @@ else () #pragma GCC target(\"avx2\") #include int main(void) { - __m256i y = _mm256_broadcastsi128_si256(_mm_setzero_si128()); + __m256 x = _mm256_set1_ps(3.14); + __m256 y = _mm256_permutevar8x32_ps(x, _mm256_set1_epi32(42)); + return _mm256_movemask_ps(_mm256_cmp_ps(x, y, _CMP_NEQ_OQ)); } " - _mm256_broadcastsi128_si256_DEFINED + HAVE_AVX2INTRIN_H ) - if (NOT _mm256_broadcastsi128_si256_DEFINED) - target_compile_definitions(${PROJECT_NAME} - PRIVATE - _mm256_broadcastsi128_si256=_mm_broadcastsi128_si256 + if (HAVE_AVX2INTRIN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_AVX2INTRIN_H=1) + target_compile_options(${PROJECT_NAME}_avx2_config INTERFACE -mavx2) + + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX2 opcodes + #endif + #pragma GCC target(\"avx2\") + #include + int main(void) { + __m256i y = _mm256_broadcastsi128_si256(_mm_setzero_si128()); + } + " + _mm256_broadcastsi128_si256_DEFINED ) + + if (NOT _mm256_broadcastsi128_si256_DEFINED) + target_compile_definitions(${PROJECT_NAME}_config_private + INTERFACE + _mm256_broadcastsi128_si256=_mm_broadcastsi128_si256 + ) + endif () endif () - endif () - check_c_source_compiles( - " - #ifdef __native_client__ - # error NativeClient detected - Avoiding AVX512F opcodes - #endif - #pragma GCC target(\"avx512f\") - #include - - #ifndef __AVX512F__ - # error No AVX512 support - #elif defined(__clang__) - # if __clang_major__ < 4 - # error Compiler AVX512 support may be broken - # endif - #elif defined(__GNUC__) - # if __GNUC__ < 6 - # error Compiler AVX512 support may be broken - # endif - #endif - - int main(void) { - __m512i x = _mm512_setzero_epi32(); - __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), x); - } - " - HAVE_AVX512FINTRIN_H - ) + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX512F opcodes + #endif + #pragma GCC target(\"avx512f\") + #include + + #ifndef __AVX512F__ + # error No AVX512 support + #elif defined(__clang__) + # if __clang_major__ < 4 + # error Compiler AVX512 support may be broken + # endif + #elif defined(__GNUC__) + # if __GNUC__ < 6 + # error Compiler AVX512 support may be broken + # endif + #endif + + int main(void) { + __m512i x = _mm512_setzero_epi32(); + __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), x); + } + " + HAVE_AVX512FINTRIN_H + ) - if (HAVE_AVX512FINTRIN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AVX512FINTRIN_H=1) - target_compile_options(${PROJECT_NAME} PRIVATE -mavx512f) - else () - target_compile_options(${PROJECT_NAME} PRIVATE -mno-avx512f) - endif () + if (HAVE_AVX512FINTRIN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_AVX512FINTRIN_H=1) + target_compile_options(${PROJECT_NAME}_avx512f_config INTERFACE -mavx512f) + endif () - check_c_source_compiles( - " - #ifdef __native_client__ - # error NativeClient detected - Avoiding AESNI opcodes - #endif - #pragma GCC target(\"aes\") - #pragma GCC target(\"pclmul\") - #include + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AESNI opcodes + #endif + #pragma GCC target(\"aes\") + #pragma GCC target(\"pclmul\") + #include - int main(void) { - __m128i x = _mm_aesimc_si128(_mm_setzero_si128()); - __m128i y = _mm_clmulepi64_si128(_mm_setzero_si128(), _mm_setzero_si128(), 0); - } - " - HAVE_WMMINTRIN_H - ) + int main(void) { + __m128i x = _mm_aesimc_si128(_mm_setzero_si128()); + __m128i y = _mm_clmulepi64_si128(_mm_setzero_si128(), _mm_setzero_si128(), 0); + } + " + HAVE_WMMINTRIN_H + ) - if (HAVE_WMMINTRIN_H) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_WMMINTRIN_H=1) - target_compile_options(${PROJECT_NAME} PRIVATE -maes -mpclmul) - endif () + if (HAVE_WMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_WMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME}_aesni_config INTERFACE -maes) + target_compile_options(${PROJECT_NAME}_pclmul_config INTERFACE -mpclmul) + endif () - check_c_source_compiles( - " - #ifdef __native_client__ - # error NativeClient detected - Avoiding RDRAND opcodes - #endif - #pragma GCC target(\"rdrnd\") - #include + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding RDRAND opcodes + #endif + #pragma GCC target(\"rdrnd\") + #include - int main(void) { - unsigned long long x; - _rdrand64_step(&x); - } - " - HAVE_RDRAND - ) + int main(void) { + unsigned long long x; + _rdrand64_step(&x); + } + " + HAVE_RDRAND + ) - if (HAVE_RDRAND) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_RDRAND=1) - target_compile_options(${PROJECT_NAME} PRIVATE -mrdrnd) - endif () + if (HAVE_RDRAND) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_RDRAND=1) + target_compile_options(${PROJECT_NAME}_rdrand_config INTERFACE -mrdrnd) + endif () - check_c_source_compiles( - " - #include + check_c_source_runs( + " + #include - int main(void) { - (void) _xgetbv(0); - } - " - HAVE__XGETBV - ) + int main(void) { + (void) _xgetbv(0); + } + " + HAVE__XGETBV + ) - if (HAVE__XGETBV) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE__XGETBV=1) - endif () + if (HAVE__XGETBV) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE__XGETBV=1) + endif () - check_c_source_compiles( - " - int main(void) { - int a = 42; - int *pnt = &a; - __asm__ __volatile__ (\"\" : : \"r\"(pnt) : \"memory\"); - } - " - HAVE_INLINE_ASM - ) + check_c_source_runs( + " + int main(void) { + int a = 42; + int *pnt = &a; + __asm__ __volatile__ (\"\" : : \"r\"(pnt) : \"memory\"); + } + " + HAVE_INLINE_ASM + ) - if (HAVE_INLINE_ASM) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_INLINE_ASM=1) - endif () + if (HAVE_INLINE_ASM) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_INLINE_ASM=1) + endif () - check_c_source_compiles( - " - int main(void) { - #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__) - # if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) - # error Windows x86_64 calling conventions are not supported yet - # endif - /* neat */ - #else - # error !x86_64 - #endif - unsigned char i = 0, o = 0, t; - __asm__ __volatile__ (\"pxor %%xmm12, %%xmm6 \n\" - \"movb (%[i]), %[t] \n\" - \"addb %[t], (%[o]) \n\" - : [t] \"=&r\"(t) - : [o] \"D\"(&o), [i] \"S\"(&i) - : \"memory\", \"flags\", \"cc\"); - } - " - HAVE_AMD64_ASM - ) + check_c_source_runs( + " + int main(void) { + #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__) + # if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) + # error Windows x86_64 calling conventions are not supported yet + # endif + /* neat */ + #else + # error !x86_64 + #endif + unsigned char i = 0, o = 0, t; + __asm__ __volatile__ (\"pxor %%xmm12, %%xmm6 \n\" + \"movb (%[i]), %[t] \n\" + \"addb %[t], (%[o]) \n\" + : [t] \"=&r\"(t) + : [o] \"D\"(&o), [i] \"S\"(&i) + : \"memory\", \"flags\", \"cc\"); + } + " + HAVE_AMD64_ASM + ) - if (HAVE_AMD64_ASM) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AMD64_ASM=1) - endif () + if (HAVE_AMD64_ASM) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_AMD64_ASM=1) + endif () - check_c_source_compiles( - " - int main(void) { - #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__) - # if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) - # error Windows x86_64 calling conventions are not supported yet - # endif - /* neat */ - #else - # error !x86_64 - #endif - __asm__ __volatile__ (\"vpunpcklqdq %xmm0,%xmm13,%xmm0\"); - } - " - HAVE_AVX_ASM - ) + check_c_source_runs( + " + int main(void) { + #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__) + # if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) + # error Windows x86_64 calling conventions are not supported yet + # endif + /* neat */ + #else + # error !x86_64 + #endif + __asm__ __volatile__ (\"vpunpcklqdq %xmm0,%xmm13,%xmm0\"); + } + " + HAVE_AVX_ASM + ) - if (HAVE_AVX_ASM) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AVX_ASM=1) - endif () + if (HAVE_AVX_ASM) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_AVX_ASM=1) + endif () - check_c_source_compiles( - " - #if !defined(__clang__) && !defined(__GNUC__) && !defined(__SIZEOF_INT128__) - # error mode(TI) is a gcc extension, and __int128 is not available - #endif - #if defined(__clang__) && !defined(__x86_64__) && !defined(__aarch64__) - # error clang does not properly handle the 128-bit type on 32-bit systems - #endif - #ifndef NATIVE_LITTLE_ENDIAN - # error libsodium currently expects a little endian CPU for the 128-bit type - #endif - #ifdef __EMSCRIPTEN__ - # error emscripten currently doesn't support some operations on integers larger than 64 bits - #endif - #include - #include - #if defined(__SIZEOF_INT128__) - typedef unsigned __int128 uint128_t; - #else - typedef unsigned uint128_t __attribute__((mode(TI))); - #endif - void fcontract(uint128_t *t) { - *t += 0x8000000000000 - 1; - *t *= *t; - *t >>= 84; - } + check_c_source_runs( + " + #if !defined(__clang__) && !defined(__GNUC__) && !defined(__SIZEOF_INT128__) + # error mode(TI) is a gcc extension, and __int128 is not available + #endif + #if defined(__clang__) && !defined(__x86_64__) && !defined(__aarch64__) + # error clang does not properly handle the 128-bit type on 32-bit systems + #endif + #ifndef NATIVE_LITTLE_ENDIAN + # error libsodium currently expects a little endian CPU for the 128-bit type + #endif + #ifdef __EMSCRIPTEN__ + # error emscripten currently doesn't support some operations on integers larger than 64 bits + #endif + #include + #include + #if defined(__SIZEOF_INT128__) + typedef unsigned __int128 uint128_t; + #else + typedef unsigned uint128_t __attribute__((mode(TI))); + #endif + void fcontract(uint128_t *t) { + *t += 0x8000000000000 - 1; + *t *= *t; + *t >>= 84; + } - int main(void) { - (void) fcontract; - } - " - HAVE_TI_MODE - ) + int main(void) { + (void) fcontract; + } + " + HAVE_TI_MODE + ) - if (HAVE_TI_MODE) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_TI_MODE=1) - endif () + if (HAVE_TI_MODE) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_TI_MODE=1) + endif () - check_c_source_compiles( - " - int main(void) { - unsigned int cpu_info[4]; - __asm__ __volatile__ (\"xchgl %%ebx, %k1; cpuid; xchgl %%ebx, %k1\" : - \"=a\" (cpu_info[0]), \"=&r\" (cpu_info[1]), - \"=c\" (cpu_info[2]), \"=d\" (cpu_info[3]) : - \"0\" (0U), \"2\" (0U)); - } - " - HAVE_CPUID - ) + check_c_source_runs( + " + int main(void) { + unsigned int cpu_info[4]; + __asm__ __volatile__ (\"xchgl %%ebx, %k1; cpuid; xchgl %%ebx, %k1\" : + \"=a\" (cpu_info[0]), \"=&r\" (cpu_info[1]), + \"=c\" (cpu_info[2]), \"=d\" (cpu_info[3]) : + \"0\" (0U), \"2\" (0U)); + } + " + HAVE_CPUID + ) - if (HAVE_CPUID) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CPUID=1) + if (HAVE_CPUID) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_CPUID=1) + endif () endif () - check_c_source_compiles( + check_c_source_runs( " #if !defined(__ELF__) && !defined(__APPLE_CC__) # error Support for weak symbols may not be available @@ -577,46 +628,399 @@ else () ) if (HAVE_WEAK_SYMBOLS) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_WEAK_SYMBOLS=1) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_WEAK_SYMBOLS=1) endif () - check_c_source_compiles( + check_c_source_runs( " int main(void) { - static volatile int _sodium_lock; - __sync_lock_test_and_set(&_sodium_lock, 1); - __sync_lock_release(&_sodium_lock); + static volatile int _sodium_lock; + __sync_lock_test_and_set(&_sodium_lock, 1); + __sync_lock_release(&_sodium_lock); } " HAVE_ATOMIC_OPS ) if (HAVE_ATOMIC_OPS) - target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_ATOMIC_OPS=1) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE HAVE_ATOMIC_OPS=1) endif () - check_c_source_compiles( + check_c_source_runs( " #include #include int main(void) { - (void) SIZE_MAX; - (void) UINT64_MAX; + (void) SIZE_MAX; + (void) UINT64_MAX; } " STDC_LIMIT_MACROS_REQUIRED ) if (STDC_LIMIT_MACROS_REQUIRED) - target_compile_definitions(${PROJECT_NAME} - PRIVATE + target_compile_definitions(${PROJECT_NAME}_config_private + INTERFACE __STDC_LIMIT_MACROS __STDC_CONSTANT_MACROS ) endif () # include/sodium/private/common.h - target_compile_definitions(${PROJECT_NAME} PRIVATE CONFIGURED=1) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE CONFIGURED=1) + + test_big_endian(IS_BIG_ENDIAN) + + if (IS_BIG_ENDIAN) + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE NATIVE_BIG_ENDIAN) + else () + target_compile_definitions(${PROJECT_NAME}_config_private INTERFACE NATIVE_LITTLE_ENDIAN) + endif () + + # see src/libsodium/Makefile.am for reference + target_sources(${PROJECT_NAME} + PRIVATE + ${CMAKE_BINARY_DIR}/sodium/version.h + + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_auth/crypto_auth.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_box/crypto_box.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_box/crypto_box_easy.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_box/crypto_box_seal.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/hchacha20/core_hchacha20.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/salsa/ref/core_salsa_ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/crypto_generichash.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/generichash_blake2.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse41.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-avx2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_hash/crypto_hash.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_hash/sha256/hash_sha256.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_hash/sha512/hash_sha512.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_kdf/blake2b/kdf_blake2b.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_kdf/crypto_kdf.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_kx/crypto_kx.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2-core.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2-core.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/blake2b-long.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/blake2b-long.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/blamka-round-ref.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/crypto_pwhash.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/crypto_scalarmult.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_secretbox/crypto_secretbox.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_shorthash/crypto_shorthash.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_sign/crypto_sign.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_sign/ed25519/sign_ed25519.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_sign/ed25519/ref10/keypair.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_sign/ed25519/ref10/open.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_sign/ed25519/ref10/sign.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_sign/ed25519/ref10/sign_ed25519_ref10.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/stream_chacha20.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/stream_chacha20.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/crypto_stream.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/stream_salsa20.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/stream_salsa20.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_verify/sodium/verify.c + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/private/chacha20_ietf_ext.h + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/private/common.h + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/private/ed25519_ref10.h + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/private/implementations.h + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/private/mutex.h + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/private/sse2_64_32.h + ${PROJECT_SOURCE_DIR}/src/libsodium/randombytes/randombytes.c + ${PROJECT_SOURCE_DIR}/src/libsodium/sodium/codecs.c + ${PROJECT_SOURCE_DIR}/src/libsodium/sodium/core.c + ${PROJECT_SOURCE_DIR}/src/libsodium/sodium/runtime.c + ${PROJECT_SOURCE_DIR}/src/libsodium/sodium/utils.c + ${PROJECT_SOURCE_DIR}/src/libsodium/sodium/version.c + ) + + if (HAVE_TI_MODE) + target_sources(${PROJECT_NAME} + PRIVATE + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/ref10/fe_51/base.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/ref10/fe_51/base2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/ref10/fe_51/constants.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h + ) + else () + target_sources(${PROJECT_NAME} + PRIVATE + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/constants.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h + ) + endif () + + if (HAVE_AMD64_ASM) + target_sources(${PROJECT_NAME} + PRIVATE + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.h + ) + else () + target_sources(${PROJECT_NAME} + PRIVATE + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.h + ) + endif () + + target_sources(${PROJECT_NAME} + PRIVATE + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts.S + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base.S + ) + + if (HAVE_AVX_ASM) + target_sources(${PROJECT_NAME} + PRIVATE + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S + ) + endif () + + if (NOT ENABLE_MINIMAL) + target_sources(${PROJECT_NAME} + PRIVATE + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/core_ed25519.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_core/ed25519/core_ristretto255.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_scalarmult/ristretto255/ref10/scalarmult_ristretto255_ref10.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_shorthash/siphash24/shorthash_siphashx24.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012_ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208_ref.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa208/stream_salsa208.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/xchacha20/stream_xchacha20.c + ) + endif () + + add_library(${PROJECT_NAME}_rdrand + OBJECT + ${PROJECT_SOURCE_DIR}/src/libsodium/randombytes/internal/randombytes_internal_random.c + ${PROJECT_SOURCE_DIR}/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c + ) + + target_link_libraries(${PROJECT_NAME}_rdrand + PRIVATE + ${PROJECT_NAME}_rdrand_config + ${PROJECT_NAME}_config_public + ${PROJECT_NAME}_config_private + ) + + add_library(${PROJECT_NAME}_aesni + OBJECT + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c + ) + + target_link_libraries(${PROJECT_NAME}_aesni + PRIVATE + ${PROJECT_NAME}_config_public + ${PROJECT_NAME}_config_private + ${PROJECT_NAME}_sse2_config + ${PROJECT_NAME}_ssse3_config + ${PROJECT_NAME}_aesni_config + ${PROJECT_NAME}_pclmul_config + ) + + add_library(${PROJECT_NAME}_sse2 + OBJECT + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h + ) + + if (NOT ENABLE_MINIMAL) + target_sources(${PROJECT_NAME}_sse2 + PRIVATE + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c + ) + endif () + + if (NOT HAVE_AMD64_ASM) + target_sources(${PROJECT_NAME}_sse2 + PRIVATE + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/u1.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/u4.h + ) + endif () + + target_link_libraries(${PROJECT_NAME}_sse2 + PRIVATE + ${PROJECT_NAME}_config_public + ${PROJECT_NAME}_config_private + ${PROJECT_NAME}_sse2_config + ) + + add_library(${PROJECT_NAME}_ssse3 + OBJECT + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/dolbeau/u1.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/dolbeau/u4.h + ) + + target_link_libraries(${PROJECT_NAME}_ssse3 + PRIVATE + ${PROJECT_NAME}_config_public + ${PROJECT_NAME}_config_private + ${PROJECT_NAME}_sse2_config + ${PROJECT_NAME}_ssse3_config + ) + + add_library(${PROJECT_NAME}_sse41 + OBJECT + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h + ) + + target_link_libraries(${PROJECT_NAME}_sse41 + PRIVATE + ${PROJECT_NAME}_config_public + ${PROJECT_NAME}_config_private + ${PROJECT_NAME}_sse2_config + ${PROJECT_NAME}_ssse3_config + ${PROJECT_NAME}_sse41_config + ) + + add_library(${PROJECT_NAME}_avx2 + OBJECT + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx2.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/blamka-round-avx2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/chacha20/dolbeau/u8.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/u1.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/u4.h + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h + ) + + target_link_libraries(${PROJECT_NAME}_avx2 + PRIVATE + ${PROJECT_NAME}_config_public + ${PROJECT_NAME}_config_private + ${PROJECT_NAME}_sse2_config + ${PROJECT_NAME}_ssse3_config + ${PROJECT_NAME}_sse41_config + ${PROJECT_NAME}_avx_config + ${PROJECT_NAME}_avx2_config + ) + + add_library(${PROJECT_NAME}_avx512f + OBJECT + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx512f.c + ${PROJECT_SOURCE_DIR}/src/libsodium/crypto_pwhash/argon2/blamka-round-avx512f.h + ) + + target_link_libraries(${PROJECT_NAME}_avx512f + PRIVATE + ${PROJECT_NAME}_config_public + ${PROJECT_NAME}_config_private + ${PROJECT_NAME}_sse2_config + ${PROJECT_NAME}_ssse3_config + ${PROJECT_NAME}_sse41_config + ${PROJECT_NAME}_avx_config + ${PROJECT_NAME}_avx2_config + ${PROJECT_NAME}_avx512f_config + ) + + target_link_libraries(${PROJECT_NAME} + PRIVATE + "$" + "$" + "$" + "$" + "$" + "$" + "$" + "$" + PUBLIC + ${PROJECT_NAME}_config_public + ) + endif () if (BUILD_SHARED_LIBS) @@ -627,19 +1031,22 @@ if (BUILD_SHARED_LIBS) ) endif () else () - target_compile_definitions(${PROJECT_NAME} - PUBLIC - SODIUM_STATIC - ) + if (MSVC) + target_compile_definitions(${PROJECT_NAME} + PUBLIC + SODIUM_STATIC + ) + else () + target_compile_definitions(${PROJECT_NAME}_config_public + INTERFACE + SODIUM_STATIC + ) + endif( ) endif () -target_include_directories(${PROJECT_NAME} - PRIVATE - $ - $ -) - if (BUILD_TESTING) + enable_testing() + file(GLOB sodium_test_sources ${PROJECT_SOURCE_DIR}/test/default/*.c) foreach (test_src ${sodium_test_sources}) @@ -686,26 +1093,31 @@ install(FILES ${CMAKE_BINARY_DIR}/sodium/version.h DESTINATION include/sodium ) -install(TARGETS ${PROJECT_NAME} - EXPORT ${PROJECT_NAME}-targets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -) +if (MSVC) + install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) +else () + install( + TARGETS + ${PROJECT_NAME} + ${PROJECT_NAME}_config_public + EXPORT ${PROJECT_NAME}-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) +endif () install(EXPORT ${PROJECT_NAME}-targets FILE unofficial-${PROJECT_NAME}Targets.cmake NAMESPACE unofficial-${PROJECT_NAME}:: - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME} -) - -set(TARGET_NAME unofficial-${PROJECT_NAME}::${PROJECT_NAME}) - -configure_package_config_file( - ${PROJECT_NAME}Config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}Config.cmake - INSTALL_DESTINATION ${PROJECT_BINARY_DIR} + DESTINATION share/unofficial-${PROJECT_NAME} ) write_basic_package_version_file( @@ -714,13 +1126,10 @@ write_basic_package_version_file( COMPATIBILITY AnyNewerVersion ) -unset(TARGET_NAME) - install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}Config.cmake ${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}ConfigVersion.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME} + DESTINATION share/unofficial-${PROJECT_NAME} ) # References: @@ -740,3 +1149,4 @@ install( # https://stackoverflow.com/questions/15132185/mixing-c-and-assembly-sources-and-build-with-cmake # https://stackoverflow.com/questions/647892/how-to-check-header-files-and-library-functions-in-cmake-like-it-is-done-in-auto # https://stackoverflow.com/questions/31038963/how-do-you-rename-a-library-filename-in-cmake +# https://gitlab.kitware.com/cmake/cmake/-/issues/15415 diff --git a/ports/libsodium/CONTROL b/ports/libsodium/CONTROL deleted file mode 100644 index daf768c1b5bc23..00000000000000 --- a/ports/libsodium/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libsodium -Version: 1.0.18-1 -Description: A modern and easy-to-use crypto library -Homepage: https://github.com/jedisct1/libsodium diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 2d61a45505374f..f4afdc19788f45 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jedisct1/libsodium @@ -8,52 +6,38 @@ vcpkg_from_github( HEAD_REF master ) -configure_file( - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt - ${SOURCE_PATH}/CMakeLists.txt - COPYONLY -) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -configure_file( - ${CMAKE_CURRENT_LIST_DIR}/sodiumConfig.cmake.in - ${SOURCE_PATH}/sodiumConfig.cmake.in - COPYONLY -) - -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DBUILD_TESTING=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets( - CONFIG_PATH lib/cmake/unofficial-sodium - TARGET_PATH share/unofficial-sodium +vcpkg_cmake_config_fixup( + PACKAGE_NAME unofficial-sodium ) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share ) file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am) -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_replace_string( - ${CURRENT_PACKAGES_DIR}/include/sodium/export.h - "#ifdef SODIUM_STATIC" - "#if 1 //#ifdef SODIUM_STATIC" - ) -endif () - configure_file( ${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY ) -#vcpkg_test_cmake(PACKAGE_NAME unofficial-sodium) +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/sodiumConfig.cmake.in + ${CURRENT_PACKAGES_DIR}/share/unofficial-sodium/unofficial-sodiumConfig.cmake + @ONLY +) diff --git a/ports/libsodium/sodiumConfig.cmake.in b/ports/libsodium/sodiumConfig.cmake.in index d416e2bca52d50..a3ec1ba8f5a1c5 100644 --- a/ports/libsodium/sodiumConfig.cmake.in +++ b/ports/libsodium/sodiumConfig.cmake.in @@ -1,61 +1,7 @@ -# sodium cmake module -# This module sets the following variables in your project: -# -# sodium_FOUND - true if sodium found on the system -# sodium_INCLUDE_DIR - the directory containing sodium headers -# sodium_LIBRARY_DEBUG -# sodium_LIBRARY_RELEASE -# sodium_LIBRARIES -# sodium_VERSION -# -include(FindPackageHandleStandardArgs) -include(SelectLibraryConfigurations) - -@PACKAGE_INIT@ - -if (NOT TARGET @TARGET_NAME@) - include("${CMAKE_CURRENT_LIST_DIR}/unofficial-@PROJECT_NAME@Targets.cmake") - - set(@PROJECT_NAME@_VERSION @VERSION@) - - get_target_property(@PROJECT_NAME@_INCLUDE_DIR @TARGET_NAME@ INTERFACE_INCLUDE_DIRECTORIES) - - get_target_property(@PROJECT_NAME@_LIBRARY_DEBUG @TARGET_NAME@ IMPORTED_IMPLIB_DEBUG) - if (@PROJECT_NAME@_LIBRARY_DEBUG MATCHES ".*-NOTFOUND") - get_target_property(@PROJECT_NAME@_LIBRARY_DEBUG @TARGET_NAME@ IMPORTED_LOCATION_DEBUG) - else () - get_target_property(@PROJECT_NAME@_DLL_DEBUG @TARGET_NAME@ IMPORTED_LOCATION_DEBUG) - endif () - - get_target_property(@PROJECT_NAME@_LIBRARY_RELEASE @TARGET_NAME@ IMPORTED_IMPLIB_RELEASE) - if (@PROJECT_NAME@_LIBRARY_RELEASE MATCHES ".*-NOTFOUND") - get_target_property(@PROJECT_NAME@_LIBRARY_RELEASE @TARGET_NAME@ IMPORTED_LOCATION_RELEASE) - else () - get_target_property(@PROJECT_NAME@_DLL_RELEASE @TARGET_NAME@ IMPORTED_LOCATION_RELEASE) - endif () - - select_library_configurations(@PROJECT_NAME@) -endif () - -find_package_handle_standard_args( - @PROJECT_NAME@ - REQUIRED_VARS - @PROJECT_NAME@_INCLUDE_DIR - @PROJECT_NAME@_LIBRARIES - VERSION_VAR - @PROJECT_NAME@_VERSION -) - -mark_as_advanced(@PROJECT_NAME@_INCLUDE_DIR) - -if (WIN32) - mark_as_advanced(@PROJECT_NAME@_DLL_DEBUG) - mark_as_advanced(@PROJECT_NAME@_DLL_RELEASE) +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) + include(CMakeFindDependencyMacro) + find_dependency(Threads) endif() - -# References: -# https://github.com/jedisct1/libsodium/blob/master/contrib/Findsodium.cmake -# https://github.com/QuantStack/xeus/blob/master/xeusConfig.cmake.in -# https://github.com/zeromq/libzmq/blob/master/builds/cmake/ZeroMQConfig.cmake.in +include(${CMAKE_CURRENT_LIST_DIR}/unofficial-sodiumTargets.cmake) diff --git a/ports/libsodium/vcpkg.json b/ports/libsodium/vcpkg.json new file mode 100644 index 00000000000000..522e476d313923 --- /dev/null +++ b/ports/libsodium/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "libsodium", + "version": "1.0.18", + "port-version": 5, + "description": "A modern and easy-to-use crypto library", + "homepage": "https://github.com/jedisct1/libsodium", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libsoundio/fix_cmakelists.patch b/ports/libsoundio/fix_cmakelists.patch new file mode 100644 index 00000000000000..ffe00adff2ff52 --- /dev/null +++ b/ports/libsoundio/fix_cmakelists.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6541f1b..e81bdce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,5 @@ +-cmake_minimum_required(VERSION 2.8.5) ++cmake_minimum_required(VERSION 3.14) ++cmake_policy(SET CMP0022 NEW) + project(libsoundio C) + set(CMAKE_MODULE_PATH ${libsoundio_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) + +@@ -233,7 +234,8 @@ if(BUILD_DYNAMIC_LIBS) + LINKER_LANGUAGE C + ) + target_link_libraries(libsoundio_shared LINK_PUBLIC ${LIBSOUNDIO_LIBS}) +- install(TARGETS libsoundio_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_include_directories(libsoundio_shared PUBLIC $) ++ install(TARGETS libsoundio_shared EXPORT libsoundio-export) + endif() + + if(BUILD_STATIC_LIBS) +@@ -243,9 +245,26 @@ if(BUILD_STATIC_LIBS) + COMPILE_FLAGS ${LIB_CFLAGS} + LINKER_LANGUAGE C + ) +- install(TARGETS libsoundio_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_link_libraries(libsoundio_static PUBLIC ${LIBSOUNDIO_LIBS}) ++ target_include_directories(libsoundio_static PUBLIC $) ++ install(TARGETS libsoundio_static EXPORT libsoundio-export) + endif() + ++add_library(libsoundio INTERFACE) ++if(BUILD_DYNAMIC_LIBS) ++ target_link_libraries(libsoundio INTERFACE libsoundio_shared) ++else() ++ target_link_libraries(libsoundio INTERFACE libsoundio_static) ++endif() ++install(TARGETS libsoundio EXPORT libsoundio-export) ++install( ++ EXPORT libsoundio-export ++ FILE libsoundio-config.cmake ++ DESTINATION share/libsoundio/ ++ NAMESPACE ${PROJECT_NAME}:: ++ EXPORT_LINK_INTERFACE_LIBRARIES ++) ++ + install(FILES + ${LIBSOUNDIO_HEADERS} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/soundio") diff --git a/ports/libsoundio/portfile.cmake b/ports/libsoundio/portfile.cmake new file mode 100644 index 00000000000000..3b5081cf970b23 --- /dev/null +++ b/ports/libsoundio/portfile.cmake @@ -0,0 +1,46 @@ + +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO andrewrk/libsoundio + REF 2.0.0 + SHA512 347a9be1789a41e778ea8d0efa1d00e03e725a4ab65e3aaf6c71e49138643f08a50a81bd60087d86a3b4d63beaeec617e47ba6b81f829ece8a3ac17418eb5309 + HEAD_REF master + PATCHES + fix_cmakelists.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_DYNAMIC_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + alsa ENABLE_ALSA + jack ENABLE_JACK + pulseaudio ENABLE_PULSEAUDIO +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_DYNAMIC_LIBS=${BUILD_DYNAMIC_LIBS} + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DBUILD_EXAMPLE_PROGRAMS=OFF + -DBUILD_TESTS=OFF + ${FEATURE_OPTIONS} + -DENABLE_COREAUDIO=${VCPKG_TARGET_IS_OSX} + -DENABLE_WASAPI=${VCPKG_TARGET_IS_WINDOWS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsoundio RENAME copyright) diff --git a/ports/libsoundio/vcpkg.json b/ports/libsoundio/vcpkg.json new file mode 100644 index 00000000000000..6dc71724b929cf --- /dev/null +++ b/ports/libsoundio/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "libsoundio", + "version": "2.0.0", + "port-version": 4, + "description": "libsoundio is C library providing cross-platform audio input and output.", + "homepage": "http://libsound.io/", + "supports": "!uwp", + "features": { + "alsa": { + "description": "ALSA backend for libsoundio" + }, + "jack": { + "description": "JACK backend for libsoundio", + "dependencies": [ + "jack2" + ] + }, + "pulseaudio": { + "description": "PulseAudio backend for libsoundio" + } + } +} diff --git a/ports/libspatialindex/portfile.cmake b/ports/libspatialindex/portfile.cmake new file mode 100644 index 00000000000000..17d89d36c5ab7a --- /dev/null +++ b/ports/libspatialindex/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libspatialindex/libspatialindex + REF 1.9.3 + SHA512 d4c608abbd631dc163b7b4fb6bf09dee3e85ce692a5f8875d51f05a26e09c75cd17dff1ed9d2c232a071f0f5864d21d877b4cbc252f3416896db24dfa3fa18cb + HEAD_REF master + PATCHES + static.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d + -DSIDX_BUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libspatialindex/static.patch b/ports/libspatialindex/static.patch new file mode 100644 index 00000000000000..1ce2b9d6a1e3f7 --- /dev/null +++ b/ports/libspatialindex/static.patch @@ -0,0 +1,77 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c34ee8d71..84e4a9247 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,7 +43,7 @@ SET(SIDX_VERSION_MINOR "9") + SET(SIDX_VERSION_PATCH "3") + SET(SIDX_LIB_VERSION "6.1.1") + SET(SIDX_LIB_SOVERSION "6") +-SET(BUILD_SHARED_LIBS ON) ++option(BUILD_SHARED_LIBS "Build shared libs" ON) + + + set(SIDX_VERSION_STRING "${SIDX_VERSION_MAJOR}.${SIDX_VERSION_MINOR}.${SIDX_VERSION_PATCH}") + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 90f4501bc..aad327181 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -188,9 +188,13 @@ set(SIDX_SOURCES + #endif() + + +-add_library(${SIDX_LIB_NAME} ${SIDX_SOURCES}) +- +-add_library(${SIDX_C_LIB_NAME} ${SIDX_CAPI_CPP}) ++if(BUILD_SHARED_LIBS) ++ add_library(${SIDX_LIB_NAME} SHARED ${SIDX_SOURCES}) ++ add_library(${SIDX_C_LIB_NAME} SHARED ${SIDX_CAPI_CPP}) ++else(BUILD_SHARED_LIBS) ++ add_library(${SIDX_LIB_NAME} STATIC ${SIDX_SOURCES}) ++ add_library(${SIDX_C_LIB_NAME} STATIC ${SIDX_CAPI_CPP}) ++endif(BUILD_SHARED_LIBS) + + target_link_libraries(${SIDX_C_LIB_NAME} + ${SIDX_LIB_NAME} +@@ -208,9 +212,10 @@ if(WIN32) + target_compile_options(${SIDX_LIB_NAME} PRIVATE "/wd4068") + target_compile_options(${SIDX_C_LIB_NAME} PRIVATE "/wd4068") + +- target_compile_definitions(${SIDX_C_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1") +- target_compile_definitions(${SIDX_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1") +- if (NOT WITH_STATIC_SIDX) ++ if (BUILD_SHARED_LIBS) ++ target_compile_definitions(${SIDX_C_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1") ++ target_compile_definitions(${SIDX_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1") ++ else() + target_compile_definitions(${SIDX_LIB_NAME} PRIVATE "-DSIDX_DLL_IMPORT=1") + target_compile_definitions(${SIDX_C_LIB_NAME} PRIVATE "-DSIDX_DLL_IMPORT=1") + endif() + +diff --git a/include/spatialindex/capi/sidx_export.h b/include/spatialindex/capi/sidx_export.h +index b6c84f1ef..7b0a39364 100644 +--- a/include/spatialindex/capi/sidx_export.h ++++ b/include/spatialindex/capi/sidx_export.h +@@ -29,7 +29,7 @@ + #pragma once + + #ifndef SIDX_C_DLL +-#if defined(_MSC_VER) ++#if defined(_MSC_VER) && defined(SIDX_DLL_EXPORT) + # define SIDX_C_DLL __declspec(dllexport) + # define SIDX_DLL __declspec(dllexport) + #else + +diff --git a/include/spatialindex/tools/Tools.h b/include/spatialindex/tools/Tools.h +index 322bc819e..46b62fa00 100644 +--- a/include/spatialindex/tools/Tools.h ++++ b/include/spatialindex/tools/Tools.h +@@ -46,7 +46,7 @@ + #ifdef SIDX_DLL_EXPORT + #define SIDX_DLL __declspec(dllexport) + #else +- #define SIDX_DLL __declspec(dllimport) ++ #define SIDX_DLL + #endif + + // Nuke this annoying warning. See http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html diff --git a/ports/libspatialindex/vcpkg.json b/ports/libspatialindex/vcpkg.json new file mode 100644 index 00000000000000..9caadda04f8a65 --- /dev/null +++ b/ports/libspatialindex/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "libspatialindex", + "version": "1.9.3", + "description": "C++ implementation of R*-tree, an MVR-tree and a TPR-tree with C API.", + "homepage": "http://libspatialindex.github.com", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/libspatialite/CONTROL b/ports/libspatialite/CONTROL deleted file mode 100644 index 55d3f4577614a1..00000000000000 --- a/ports/libspatialite/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: libspatialite -Version: 4.3.0a-3 -Homepage: https://www.gaia-gis.it/gaia-sins/libspatialite-sources -Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities. -Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv - diff --git a/ports/libspatialite/fix-latin-literals.patch b/ports/libspatialite/fix-latin-literals.patch deleted file mode 100644 index 3060593e7ac177..00000000000000 --- a/ports/libspatialite/fix-latin-literals.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git a/src/srsinit/epsg_inlined_prussian.c b/src/srsinit/epsg_inlined_prussian.c -index a5c8334..dd75dde 100644 ---- a/src/srsinit/epsg_inlined_prussian.c -+++ b/src/srsinit/epsg_inlined_prussian.c -@@ -282,10 +282,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * - add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",17.11233917],"); - add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); - add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187913\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); -- p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,"DHDN / Soldner 14 Gröditzberg I"); -+ p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,u8"DHDN / Soldner 14 Gr\u00f6ditzberg I"); - add_proj4text(p,0,"+proj=cass +lat_0=51.17819342 +lon_0=15.76127086 "); - add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); -- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 14 Gröditzberg I\","); -+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 14 Gr\u00f6ditzberg I\","); - add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); - add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); - add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); -@@ -346,10 +346,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * - add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",14.70144539],"); - add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); - add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187916\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); -- p = add_epsg_def(filter,first,last,187918,"mj10777.de",187918,"DHDN / Soldner 18 Müggelberg 600"); -+ p = add_epsg_def(filter,first,last,187918,u8"mj10777.de",187918,"DHDN / Soldner 18 M\u00fcggelberg 600"); - add_proj4text(p,0,"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 "); - add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); -- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 18 Müggelberg 600\","); -+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 18 M\u00fcggelberg 600\","); - add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); - add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); - add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); -@@ -362,10 +362,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * - add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",13.62720366666667],"); - add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); - add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187918\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); -- p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,"DHDN / Soldner 19 Götzer Berg 650"); -+ p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,u8"DHDN / Soldner 19 G\u00f6tzer Berg 650"); - add_proj4text(p,0,"+proj=cass +lat_0=52.43725961111112 +lon_0=12.72882972222223 "); - add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); -- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 19 Götzer Berg 650\","); -+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 19 G\u00f6tzer Berg 650\","); - add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); - add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); - add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); -@@ -458,10 +458,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * - add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.23411097],"); - add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); - add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187924\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); -- p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,"DHDN / Soldner 25 Rathkrügen"); -+ p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,u8"DHDN / Soldner 25 Rathkr\u00fcgen"); - add_proj4text(p,0,"+proj=cass +lat_0=53.81839364 +lon_0=10.04220189 "); - add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); -- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 25 Rathkrügen\","); -+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 25 Rathkr\u00fcgen\","); - add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); - add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); - add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); -@@ -570,10 +570,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * - add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",8.84051853],"); - add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); - add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187931\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); -- p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,"DHDN / Soldner 32 Münster"); -+ p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,u8"DHDN / Soldner 32 M\u00fcnster"); - add_proj4text(p,0,"+proj=cass +lat_0=51.96547642 +lon_0=7.62334994 "); - add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); -- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 32 Münster\","); -+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 32 M\u00fcnster\","); - add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); - add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); - add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); -@@ -634,10 +634,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * - add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.50203072],"); - add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); - add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187935\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); -- p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,"DHDN / Soldner 36 Schaumburg, Schloßturm"); -+ p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,u8"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm"); - add_proj4text(p,0,"+proj=cass +lat_0=50.34048964 +lon_0=7.97808156 "); - add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); -- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 36 Schaumburg, Schloßturm\","); -+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm\","); - add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); - add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); - add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); -@@ -666,10 +666,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * - add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",7.60594289],"); - add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); - add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187937\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); -- p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,"DHDN / Soldner 38 Cöln, Dom"); -+ p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,u8"DHDN / Soldner 38 C\u00f6ln, Dom"); - add_proj4text(p,0,"+proj=cass +lat_0=50.94257242 +lon_0=6.95897600 "); - add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); -- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 38 Cöln, Dom\","); -+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 38 C\u00f6ln, Dom\","); - add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); - add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); - add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); -@@ -682,10 +682,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * - add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",6.95897600],"); - add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); - add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187938\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); -- p = add_epsg_def(filter,first,last,187939,"mj10777.de",187939,"DHDN / Soldner 39 Langschoß"); -+ p = add_epsg_def(filter,first,last,187939,u8"mj10777.de",187939,"DHDN / Soldner 39 Langscho\u00df"); - add_proj4text(p,0,"+proj=cass +lat_0=50.66738711 +lon_0=6.28935703 "); - add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); -- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 39 Langschoß\","); -+ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 39 Langscho\u00df\","); - add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); - add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); - add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); diff --git a/ports/libspatialite/fix-linux-configure.patch b/ports/libspatialite/fix-linux-configure.patch new file mode 100644 index 00000000000000..426ab3b3527f6f --- /dev/null +++ b/ports/libspatialite/fix-linux-configure.patch @@ -0,0 +1,62 @@ +diff --git a/configure.ac b/configure.ac +index ead87caff..47abb90f0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -302,6 +302,7 @@ if test x"$enable_geos" != "xno"; then + #----------------------------------------------------------------------- + # --with-geosconfig + # ++ if 0; then + AC_ARG_WITH([geosconfig], + [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], + [GEOSCONFIG="$withval"], [GEOSCONFIG=""]) +@@ -327,6 +328,7 @@ if test x"$enable_geos" != "xno"; then + # Extract the linker and include flags + GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` + GEOS_CFLAGS=-I`$GEOSCONFIG --includes` ++ fi + AC_SUBST([GEOS_LDFLAGS]) + AC_SUBST([GEOS_CFLAGS]) + # Ensure that we can parse geos_c.h +@@ -335,11 +337,14 @@ if test x"$enable_geos" != "xno"; then + AC_CHECK_HEADERS([geos_c.h],, [AC_MSG_ERROR([could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig])]) + CPPFLAGS="$CPPFLAGS_SAVE" + # Ensure we can link against libgeos_c ++ if 0; then + LIBS_SAVE="$LIBS" + LIBS="$GEOS_LDFLAGS" + AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.3.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig])) + LIBS="$LIBS_SAVE" + LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c" ++ fi ++ LIBS="$LIBS $GEOS_LDFLAGS" + + #----------------------------------------------------------------------- + # --enable-controlpoints +@@ -358,7 +363,7 @@ if test x"$enable_geos" != "xno"; then + [--enable-geosadvanced], [enables GEOS advanced features [default=yes]])], + [], [enable_geosadvanced=yes]) + if test x"$enable_geosadvanced" != "xno"; then +- AC_SEARCH_LIBS(GEOSDelaunayTriangulation,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter.])) ++ #AC_SEARCH_LIBS(GEOSDelaunayTriangulation,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter.])) + AC_DEFINE(GEOS_ADVANCED) + fi + +@@ -369,7 +374,7 @@ if test x"$enable_geos" != "xno"; then + [--enable-geosreentrant], [enables GEOS reentrant (fully thread safe) [default=yes]])], + [], [enable_geosreentrant=yes]) + if test x"$enable_geosreentrant" != "xno"; then +- AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter.])) ++ #AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter.])) + AC_DEFINE(GEOS_REENTRANT) + fi + +@@ -390,7 +395,7 @@ if test x"$enable_geos" != "xno"; then + [--enable-geos370], [enables GEOS 3.7.0 features [default=yes]])], + [], [enable_geos370=yes]) + if test x"$enable_geos370" != "xno"; then +- AC_SEARCH_LIBS(GEOSFrechetDistance_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.7.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geos370 parameter.])) ++ #AC_SEARCH_LIBS(GEOSFrechetDistance_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.7.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geos370 parameter.])) + AC_DEFINE(GEOS_370) + fi + diff --git a/ports/libspatialite/fix-makefiles.patch b/ports/libspatialite/fix-makefiles.patch index 9372739bbbbfcc..6466020bcd7b8d 100644 --- a/ports/libspatialite/fix-makefiles.patch +++ b/ports/libspatialite/fix-makefiles.patch @@ -1,51 +1,34 @@ diff --git a/makefile.vc b/makefile.vc -index 9b9e8ee..b524a27 100644 +index 120090eba..049c0d0b0 100644 --- a/makefile.vc +++ b/makefile.vc -@@ -59,7 +59,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \ - src\versioninfo\version.obj src\virtualtext\virtualtext.obj +@@ -93,7 +93,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \ SPATIALITE_DLL = spatialite$(VERSION).dll --CFLAGS = /nologo -I.\src\headers -I. -IC:\OSGeo4W\include $(OPTFLAGS) -+CFLAGS = /nologo -I.\src\headers -I. -I$(INSTALLED_ROOT)\include $(OPTFLAGS) + CFLAGS = /nologo -I.\src\headers -I.\src\topology \ +- -I. -IC:\OSGeo4W\include $(OPTFLAGS) ++ -I. $(OPTFLAGS) default: all -@@ -73,12 +73,9 @@ spatialite.lib: $(LIBOBJ) +@@ -107,12 +107,9 @@ spatialite.lib: $(LIBOBJ) $(SPATIALITE_DLL): spatialite_i.lib spatialite_i.lib: $(LIBOBJ) -- link /debug /dll /out:$(SPATIALITE_DLL) \ +- link /dll /out:$(SPATIALITE_DLL) \ + link $(LINK_FLAGS) /dll /out:$(SPATIALITE_DLL) \ /implib:spatialite_i.lib $(LIBOBJ) \ - C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \ - C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \ - C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \ -- C:\OSGeo4W\lib\libxml2.lib +- C:\OSGeo4W\lib\libxml2.lib C:\OSGeo4W\lib\librttopo.lib + $(LIBS_ALL) if exist $(SPATIALITE_DLL).manifest mt -manifest \ $(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2 -@@ -90,16 +87,7 @@ clean: - del *.exp - del *.manifest - del *.lib -- del src\gaiaaux\*.obj -- del src\gaiaexif\*.obj -- del src\gaiageo\*.obj -- del src\spatialite\*.obj -- del src\srsinit\*.obj -- del src\versioninfo\*.obj -- del src\virtualtext\*.obj -- del src\wfs\*.obj -- del src\dxf\*.obj -- del src\md5\*.obj -+ forfiles /m *.obj* /s /c "cmd /c del @path" & exit 0 - del *.pdb - install: all diff --git a/nmake.opt b/nmake.opt -index 0960ec1..276bc84 100644 +index c048aa758..be68e21cd 100644 --- a/nmake.opt +++ b/nmake.opt @@ -1,8 +1,8 @@ @@ -54,8 +37,8 @@ index 0960ec1..276bc84 100644 +INSTDIR=$(INST_DIR) # Uncomment the first for an optimized build, or the second for debug. --OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ -+OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ +-OPTFLAGS= /nologo /Ox /fp:precise /W4 /MD /D_CRT_SECURE_NO_WARNINGS \ ++OPTFLAGS= /nologo /fp:precise /W4 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ /DDLL_EXPORT /DYY_NO_UNISTD_H #OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb /DDLL_EXPORT diff --git a/ports/libspatialite/fix-sources.patch b/ports/libspatialite/fix-sources.patch deleted file mode 100644 index 63def0d3ca70ed..00000000000000 --- a/ports/libspatialite/fix-sources.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/config-msvc.h b/config-msvc.h -index 9c7f477..a812546 100644 ---- a/config-msvc.h -+++ b/config-msvc.h -@@ -143,7 +143,7 @@ - #define HAVE_SYS_TYPES_H 1 - - /* Define to 1 if you have the header file. */ --#define HAVE_UNISTD_H 1 -+#undef HAVE_UNISTD_H - - /* Define to 1 if you have the header file. */ - #define HAVE_ZLIB_H 1 -diff --git a/src/gaiageo/gg_extras.c b/src/gaiageo/gg_extras.c -index ff3dd7c..49ec986 100644 ---- a/src/gaiageo/gg_extras.c -+++ b/src/gaiageo/gg_extras.c -@@ -59,14 +59,6 @@ the terms of any one of the MPL, the GPL or the LGPL. - #include - #include - --#if defined(_WIN32) && !defined(__MINGW32__) --static double --rint (double x) --{ -- return floor (x + 0.5); --} --#endif -- - static void - auxGridSnapPoint (int dimension_model, gaiaPointPtr pt, gaiaGeomCollPtr result, - double origin_x, double origin_y, double origin_z, diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake index b73733ff20b711..5d73679bedc8ce 100644 --- a/ports/libspatialite/portfile.cmake +++ b/ports/libspatialite/portfile.cmake @@ -1,114 +1,128 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libspatialite-4.3.0a) +set(LIBSPATIALITE_VERSION_STR "5.0.0") vcpkg_download_distfile(ARCHIVE - URLS "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.3.0a.tar.gz" - FILENAME "libspatialite-4.3.0a.tar.gz" - SHA512 adfd63e8dde0f370b07e4e7bb557647d2bfb5549205b60bdcaaca69ff81298a3d885e7c1ca515ef56dd0aca152ae940df8b5dbcb65bb61ae0a9337499895c3c0 + URLS "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${LIBSPATIALITE_VERSION_STR}.tar.gz" + FILENAME "libspatialite-${LIBSPATIALITE_VERSION_STR}.tar.gz" + SHA512 df72a3434d6e49f8836a9de2340f343a53f0673d0d17693cdb0f4971928b7c8bf40df44b21c0861945a9c81058e939acd1714b0b426ce9aa2ff7b0e8e6b196a7 ) -vcpkg_extract_source_archive(${ARCHIVE}) -find_program(NMAKE nmake) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-sources.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-latin-literals.patch + fix-makefiles.patch + fix-linux-configure.patch ) -# fix most of the problems when spacebar is in the path -set(CURRENT_INSTALLED_DIR "\"${CURRENT_INSTALLED_DIR}\"") +if (VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib") + set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib") + set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib") + set(LIBRTTOPO_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/librttopo.lib") + set(LIBRTTOPO_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/librttopo.lib") + else() + set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib") + set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib") + set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib ws2_32.lib") + set(LIBRTTOPO_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/librttopo.lib") + set(LIBRTTOPO_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/librttopo.lib") + endif() -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(CL_FLAGS_DBG "/MDd /Zi") - set(CL_FLAGS_REL "/MD /Ox") - set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib") - set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib") - set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib") - set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib") -else() - set(CL_FLAGS_DBG "/MTd /Zi") - set(CL_FLAGS_REL "/MT /Ox") - set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/lib/libgeos.lib") - set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeosd.lib") - set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib") - set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib ws2_32.lib") -endif() + set(LIBS_ALL_DBG + "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \ + ${LIBXML2_LIBS_DBG} \ + ${GEOS_LIBS_DBG} \ + ${LIBRTTOPO_LIBS_DBG} \ + ${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib ole32.lib shell32.lib" + ) + set(LIBS_ALL_REL + "${CURRENT_INSTALLED_DIR}/lib/iconv.lib \ + ${CURRENT_INSTALLED_DIR}/lib/charset.lib \ + ${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \ + ${CURRENT_INSTALLED_DIR}/lib/freexl.lib \ + ${CURRENT_INSTALLED_DIR}/lib/zlib.lib \ + ${LIBXML2_LIBS_REL} \ + ${GEOS_LIBS_REL} \ + ${LIBRTTOPO_LIBS_REL} \ + ${CURRENT_INSTALLED_DIR}/lib/proj.lib ole32.lib shell32.lib" + ) -set(LIBS_ALL_DBG - "${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib \ - ${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib \ - ${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \ - ${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib \ - ${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \ - ${LIBXML2_LIBS_DBG} \ - ${GEOS_LIBS_DBG} \ - ${CURRENT_INSTALLED_DIR}/debug/lib/projd.lib" - ) -set(LIBS_ALL_REL - "${CURRENT_INSTALLED_DIR}/lib/libiconv.lib \ - ${CURRENT_INSTALLED_DIR}/lib/libcharset.lib \ - ${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \ - ${CURRENT_INSTALLED_DIR}/lib/freexl.lib \ - ${CURRENT_INSTALLED_DIR}/lib/zlib.lib \ - ${LIBXML2_LIBS_REL} \ - ${GEOS_LIBS_REL} \ - ${CURRENT_INSTALLED_DIR}/lib/proj.lib" + string(REPLACE "/" "\\\\" INST_DIR ${CURRENT_PACKAGES_DIR}) + list(APPEND OPTIONS_RELEASE + "INST_DIR=${INST_DIR}" "LIBS_ALL=${LIBS_ALL_REL}" + ) + list(APPEND OPTIONS_DEBUG + "LINK_FLAGS=/debug" "INST_DIR=${INST_DIR}\\debug" "LIBS_ALL=${LIBS_ALL_DBG}" ) -################ -# Debug build -################ -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) - - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - "INST_DIR=\"${INST_DIR_DBG}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - vcpkg_copy_pdbs() -endif() - -################ -# Release build -################ -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Building ${TARGET_TRIPLET}-rel") - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - "INST_DIR=\"${INST_DIR_REL}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-release - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") -endif() - + vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + "CL_FLAGS=/DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" + OPTIONS_RELEASE + ${OPTIONS_RELEASE} + OPTIONS_DEBUG + ${OPTIONS_DEBUG} + ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libspatialite RENAME copyright) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib) + else() + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/spatialite.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) +else () # Build in UNIX + if(VCPKG_TARGET_IS_LINUX) + set(STDLIB stdc++) + else() + set(STDLIB c++) endif() + if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + SET(EXTRALIBS "-lpthread") + endif() + list(APPEND OPTIONS_RELEASE + "LIBXML2_LIBS=-lxml2 -llzma" + "GEOS_LDFLAGS=-lgeos_c -lgeos -l${STDLIB}" + ) + list(APPEND OPTIONS_DEBUG + "LIBXML2_LIBS=-lxml2 -llzmad" + "GEOS_LDFLAGS=-lgeos_cd -lgeosd -l${STDLIB}" + ) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + "LIBS=${EXTRALIBS} -ldl -lm -l${STDLIB}" + "LIBXML2_CFLAGS=-I\"${CURRENT_INSTALLED_DIR}/include\"" + "--enable-rttopo" + "--enable-gcp" + "--enable-geocallbacks" + "--disable-examples" + "--disable-minizip" + OPTIONS_DEBUG + ${OPTIONS_DEBUG} + OPTIONS_RELEASE + ${OPTIONS_RELEASE} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() endif() -message(STATUS "Packaging ${TARGET_TRIPLET} done") +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libspatialite/vcpkg.json b/ports/libspatialite/vcpkg.json new file mode 100644 index 00000000000000..98c634786d129a --- /dev/null +++ b/ports/libspatialite/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "libspatialite", + "version-string": "5.0.0", + "port-version": 3, + "description": "SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.", + "homepage": "https://www.gaia-gis.it/gaia-sins/libspatialite-sources", + "dependencies": [ + "freexl", + "geos", + "libiconv", + "librttopo", + "libxml2", + "proj4", + "sqlite3", + "zlib" + ] +} diff --git a/ports/libspnav/portfile.cmake b/ports/libspnav/portfile.cmake new file mode 100644 index 00000000000000..35d012519480c5 --- /dev/null +++ b/ports/libspnav/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_TARGET "windows" "uwp" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FreeSpacenav/libspnav + REF libspnav-0.2.3 # v0.2.3 seems to be outdated. libspnav-0.2.3 is the same as 0.2.3 on their sourceforge + SHA512 6c06344813ddf7e2bc7981932b4a901334de2b91d8c3abb23828869070dc73ed1c19c5bf7ff9338cc673c8f0dc7394608652afd0cdae093149c0a24460f0a8fb + HEAD_REF master +) + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG "--enable-debug" + OPTIONS_RELEASE "--disable-debug" +) + +vcpkg_install_make() + +macro(CLEANUP WHERE) + set(WORKDIR ${CURRENT_PACKAGES_DIR}/${WHERE}) + if ("${WHERE}" STREQUAL "debug") + file(REMOVE_RECURSE ${WORKDIR}/include) + endif () + file(REMOVE ${WORKDIR}/lib/libspnav.so) + file(REMOVE ${WORKDIR}/lib/libspnav.so.0) + file(RENAME ${WORKDIR}/lib/libspnav.so.0.1 ${WORKDIR}/lib/libspnav.so) + if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE ${WORKDIR}/lib/libspnav.so) + else () + file(REMOVE ${WORKDIR}/lib/libspnav.a) + endif () +endmacro() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + cleanup("") +endif () + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + cleanup("debug") +endif () + +file(INSTALL ${SOURCE_PATH}/README + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/ports/libspnav/vcpkg.json b/ports/libspnav/vcpkg.json new file mode 100644 index 00000000000000..f3bb1f791e0cc5 --- /dev/null +++ b/ports/libspnav/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libspnav", + "version-string": "0.2.3", + "port-version": 1, + "description": "Library for communicating with spacenavd or 3dxsrv to get input from 6-dof devices.", + "homepage": "https://github.com/FreeSpacenav/libspnav", + "supports": "linux" +} diff --git a/ports/libsquish/CONTROL b/ports/libsquish/CONTROL deleted file mode 100644 index 1e193d1b13e0c9..00000000000000 --- a/ports/libsquish/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libsquish -Version: 1.15-1 -Description: Open source DXT compression library. diff --git a/ports/libsquish/fix-export-symbols.patch b/ports/libsquish/fix-export-symbols.patch index febf2eb51425e4..a777eea234cda9 100644 --- a/ports/libsquish/fix-export-symbols.patch +++ b/ports/libsquish/fix-export-symbols.patch @@ -44,6 +44,13 @@ index 14c9bb5..aaffbb2 100644 + //! All squish API functions live in this namespace. namespace squish { + +@@ -115,5 +117,5 @@ + */ +-void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric = 0 ); ++SQUISH_EXPORT void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric = 0 ); + + // ----------------------------------------------------------------------------- @@ -176,7 +178,7 @@ inline void Compress( u8 const* rgba, void* block, int flags, float* metric = 0 however, DXT1 will be used by default if none is specified. All other flags diff --git a/ports/libsquish/portfile.cmake b/ports/libsquish/portfile.cmake index 02fdc4f909d294..a7ff15594387b6 100644 --- a/ports/libsquish/portfile.cmake +++ b/ports/libsquish/portfile.cmake @@ -1,30 +1,10 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/libsquish/libsquish-1.15.tgz" - FILENAME "libsquish-1.15.tgz" - SHA512 5b569b7023874c7a43063107e2e428ea19e6eb00de045a4a13fafe852ed5402093db4b65d540b5971ec2be0d21cb97dfad9161ebfe6cf6e5376174ff6c6c3e7a -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + REPO libsquish + FILENAME "libsquish-1.15.tgz" NO_REMOVE_ONE_LEVEL - REF v1.15 - PATCHES - fix-export-symbols.patch + SHA512 5b569b7023874c7a43063107e2e428ea19e6eb00de045a4a13fafe852ed5402093db4b65d540b5971ec2be0d21cb97dfad9161ebfe6cf6e5376174ff6c6c3e7a + PATCHES fix-export-symbols.patch ) vcpkg_configure_cmake( @@ -37,5 +17,4 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsquish) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libsquish/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/libsquish/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libsquish/vcpkg.json b/ports/libsquish/vcpkg.json new file mode 100644 index 00000000000000..9cb40167af3d88 --- /dev/null +++ b/ports/libsquish/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libsquish", + "version-string": "1.15", + "port-version": 8, + "description": "Open source DXT compression library.", + "homepage": "https://sourceforge.net/projects/libsquish" +} diff --git a/ports/libsrt/fix-dependency-install.patch b/ports/libsrt/fix-dependency-install.patch new file mode 100644 index 00000000000000..12967e6bec68c8 --- /dev/null +++ b/ports/libsrt/fix-dependency-install.patch @@ -0,0 +1,74 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec91d08..f19d28d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -234,6 +234,10 @@ if (ENABLE_ENCRYPTION) + # fall back to find_package method otherwise + if (USE_OPENSSL_PC) + pkg_check_modules(SSL ${SSL_REQUIRED_MODULES}) ++ else() ++ find_package(OpenSSL REQUIRED) ++ set(SSL_FOUND ${OpenSSL_FOUND}) ++ set(SSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto) + endif() + if (SSL_FOUND) + # We have some cases when pkg-config is improperly configured +@@ -438,7 +442,7 @@ elseif (WIN32 AND NOT MINGW) + message(FATAL_ERROR "Failed to find pthread.h. Specify PTHREAD_INCLUDE_DIR.") + endif() + +- find_library(PTHREAD_LIBRARY NAMES pthread pthread_dll pthread_lib HINTS C:/pthread-win32/lib C:/pthread-win64/lib) ++ find_library(PTHREAD_LIBRARY NAMES pthreadVC3 REQUIRED) + if (PTHREAD_LIBRARY) + message(STATUS "Pthread library: ${PTHREAD_LIBRARY}") + else() +@@ -637,6 +641,7 @@ if (ENABLE_SHARED) + target_compile_definitions(srt_virtual PUBLIC -DSRT_DYNAMIC) + target_compile_definitions(haicrypt_virtual PRIVATE -DHAICRYPT_EXPORTS) + endif() ++target_link_libraries(haicrypt_virtual PRIVATE ${SSL_LIBRARIES}) + + if (srt_libspec_shared) + if (MICROSOFT) +@@ -650,6 +655,7 @@ set (INSTALL_SHARED_DIR ${CMAKE_INSTALL_LIBDIR}) + if (CYGWIN) + set (INSTALL_SHARED_DIR ${CMAKE_INSTALL_BINDIR}) + endif() ++set(CMAKE_INSTALL_INCLUDEDIR include) + + message(STATUS "INSTALL DIRS: bin=${CMAKE_INSTALL_BINDIR} lib=${CMAKE_INSTALL_LIBDIR} shlib=${INSTALL_SHARED_DIR} include=${CMAKE_INSTALL_INCLUDEDIR}") + +@@ -730,7 +736,7 @@ macro(srt_add_program name) + add_executable(${name} ${ARGN}) + target_include_directories(${name} PRIVATE apps) + target_include_directories(${name} PRIVATE common) +- install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ install(TARGETS ${name} RUNTIME DESTINATION tools) + endmacro() + + macro(srt_make_application name) +@@ -769,7 +775,7 @@ endmacro() + macro(srt_add_application name) # ARGN=sources... + srt_add_program(${name} apps/${name}.cpp ${ARGN}) + srt_make_application(${name}) +- install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ install(TARGETS ${name} RUNTIME DESTINATION tools) + endmacro() + + ## FIXME: transmitmedia.cpp does not build on OpenBSD +@@ -923,7 +929,7 @@ if (ENABLE_UNITTESTS AND ENABLE_CXX11) + endif() + + +-install(PROGRAMS scripts/srt-ffplay DESTINATION ${CMAKE_INSTALL_BINDIR}) ++install(PROGRAMS scripts/srt-ffplay DESTINATION tools) + + + if (DEFINED SRT_EXTRA_APPS_INC) +@@ -939,5 +945,5 @@ if ( ENABLE_SUFLIP ) + ) + srt_add_program(suflip ${SOURCES_suflip}) + target_link_libraries(suflip ${srt_link_library}) +- install(TARGETS suflip RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ install(TARGETS suflip RUNTIME DESTINATION tools) + endif () diff --git a/ports/libsrt/portfile.cmake b/ports/libsrt/portfile.cmake new file mode 100644 index 00000000000000..d18551ea8a21e1 --- /dev/null +++ b/ports/libsrt/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Haivision/srt + REF v1.3.4 + SHA512 3a9f9a8fd8ba56ae9ca04203bdea9e9a25275e1f531ca10deee0e760e6beaf44e83ee7a616cfe3ade9676082d9cc8611214de876f64d141e1e8c3b1e16273001 + HEAD_REF master + PATCHES fix-dependency-install.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_DYNAMIC ON) + set(BUILD_STATIC OFF) +else() + set(BUILD_DYNAMIC OFF) + set(BUILD_STATIC ON) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tool ENABLE_APPS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${FEATURE_OPTIONS} + -DENABLE_SHARED=${BUILD_DYNAMIC} + -DENABLE_STATIC=${BUILD_STATIC} + -DINSTALL_DOCS=ON + -DINSTALL_PKG_CONFIG_MODULE=ON + -DENABLE_SUFLIP=OFF # Since there are some file not found, disable this feature + -DENABLE_UNITTESTS=OFF + -DUSE_OPENSSL_PC=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libsrt/vcpkg.json b/ports/libsrt/vcpkg.json new file mode 100644 index 00000000000000..16d20929af47e5 --- /dev/null +++ b/ports/libsrt/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "libsrt", + "version-string": "1.3.4", + "port-version": 1, + "description": "Secure Reliable Transport (SRT) is an open source transport technology that optimizes streaming performance across unpredictable networks, such as the Internet.", + "homepage": "https://github.com/Haivision/srt", + "dependencies": [ + "openssl", + { + "name": "pthreads", + "platform": "windows" + } + ], + "features": { + "tool": { + "description": "Builds libsrt executable" + } + } +} diff --git a/ports/libsrtp/portfile.cmake b/ports/libsrtp/portfile.cmake new file mode 100644 index 00000000000000..88a13b88579f45 --- /dev/null +++ b/ports/libsrtp/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cisco/libsrtp + REF 56a065555aea2abddaf9fb60353fe59f277837a3 + SHA512 59afa25df79f875d28eefe95ef89b5956b1d2f319bba38ec34b832c2faa16b5425aae2f6ad19cf478afe02b28f4032b5dcf20a301d647d897d4577f66ca77376 +) + +if (VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4703") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4703") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/srtp2.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/srtp2.dll ${CURRENT_PACKAGES_DIR}/bin/srtp2.dll) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/srtp2.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/srtp2.dll ${CURRENT_PACKAGES_DIR}/debug/bin/srtp2.dll) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsrtp RENAME copyright) \ No newline at end of file diff --git a/ports/libsrtp/vcpkg.json b/ports/libsrtp/vcpkg.json new file mode 100644 index 00000000000000..fd0d3db3d2a7fd --- /dev/null +++ b/ports/libsrtp/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libsrtp", + "version-string": "2.2.0", + "port-version": 1, + "description": "This package provides an implementation of the Secure Real-time Transport Protocol (SRTP), the Universal Security Transform (UST), and a supporting cryptographic kernel." +} diff --git a/ports/libssh/0001-export-pkgconfig-file.patch b/ports/libssh/0001-export-pkgconfig-file.patch new file mode 100644 index 00000000000000..c84510ce58661d --- /dev/null +++ b/ports/libssh/0001-export-pkgconfig-file.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1f5b0bf5..c51fb0d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -111,8 +111,28 @@ add_subdirectory(include) + add_subdirectory(src) + + # pkg-config file +-if (UNIX) + configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc) ++ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "Requires:") ++ if (WITH_ZLIB) ++ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " zlib") ++ endif () ++ if (WITH_GCRYPT) ++ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "\nLibs.private: -lgcrypt") ++ elseif (WITH_MBEDTLS) ++ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "\nLibs.private: -lmbedcrypto -lpthread") ++ else () ++ if (WIN32) ++ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "\nLibs.private: -llibcrypto -lUser32 -lCrypt32") ++ else () ++ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " libcrypto\nLibs.private:") ++ endif () ++ endif () ++ if (CMAKE_USE_PTHREADS_INIT) ++ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " -lpthread") ++ endif () ++ if (WIN32) ++ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " -lws2_32 -lShell32 -lAdvapi32") ++ endif () + install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc +@@ -121,7 +141,6 @@ install( + COMPONENT + pkgconfig + ) +-endif (UNIX) + + # CMake config files + include(CMakePackageConfigHelpers) + diff --git a/ports/libssh/0002-mingw_for_Android.patch b/ports/libssh/0002-mingw_for_Android.patch new file mode 100644 index 00000000000000..973f6eafa9671b --- /dev/null +++ b/ports/libssh/0002-mingw_for_Android.patch @@ -0,0 +1,16 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ccf5a33..8e88494 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -361,9 +361,9 @@ if (WITH_VISIBILITY_HIDDEN) + set_target_properties(ssh PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") + endif (WITH_VISIBILITY_HIDDEN) + +-if (MINGW) ++if (MINGW AND NOT ANDROID) + set_target_properties(ssh PROPERTIES LINK_FLAGS "-Wl,--enable-stdcall-fixup") +- set_target_properties(ssh PROPERTIES COMPILE_FLAGS "-D_POSIX_SOURCE") ++ set_property(TARGET ssh APPEND PROPERTY COMPILE_FLAGS "-D_POSIX_SOURCE") + endif () + + diff --git a/ports/libssh/0003-create_symlink_unix_only.patch b/ports/libssh/0003-create_symlink_unix_only.patch new file mode 100644 index 00000000000000..140d7e1c8449fc --- /dev/null +++ b/ports/libssh/0003-create_symlink_unix_only.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1f5b0bf..6559468 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -206,9 +206,11 @@ endif (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND) + add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_SYMBOL_TARGET}) + + # Link compile database for clangd ++if(UNIX) + execute_process(COMMAND cmake -E create_symlink + "${CMAKE_BINARY_DIR}/compile_commands.json" + "${CMAKE_SOURCE_DIR}/compile_commands.json") ++endif() + + message(STATUS "********************************************") + message(STATUS "********** ${PROJECT_NAME} build options : **********") diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL deleted file mode 100644 index a819253d075168..00000000000000 --- a/ports/libssh/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: libssh -Version: 0.7.6-1 -Homepage: https://www.libssh.org/ -Description: libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side -Build-Depends: openssl - -Feature: zlib -Description: libssh with zlib -Build-Depends: zlib diff --git a/ports/libssh/build-one-flavor.patch b/ports/libssh/build-one-flavor.patch deleted file mode 100644 index 96e20ba98eab79..00000000000000 --- a/ports/libssh/build-one-flavor.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 1012ddf..612f0ba 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -225,6 +225,7 @@ include_directories( - ${LIBSSH_PRIVATE_INCLUDE_DIRS} - ) - -+if (NOT WITH_STATIC_LIB) - add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) - - target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES}) -@@ -259,6 +260,7 @@ install( - ARCHIVE DESTINATION ${LIB_INSTALL_DIR} - COMPONENT libraries - ) -+endif() - - if (WITH_STATIC_LIB) - add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS}) diff --git a/ports/libssh/fix-config-cmake.patch b/ports/libssh/fix-config-cmake.patch deleted file mode 100644 index bb369359fa4063..00000000000000 --- a/ports/libssh/fix-config-cmake.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a063556..68e559e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -11,6 +11,8 @@ set(APPLICATION_VERSION_MINOR "7") - set(APPLICATION_VERSION_PATCH "6") - - set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") -+set(CMAKE_INSTALL_DIR lib/cmake/libssh CACHE STRING -+ "The subdirectory where CMake package config files should be installed") - - # SOVERSION scheme: CURRENT.AGE.REVISION - # If there was an incompatible interface change: -@@ -114,14 +116,29 @@ endif (UNIX) - set(LIBSSH_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX}) - set(LIBSSH_THREADS_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX}) - --configure_file(${PROJECT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake @ONLY) --configure_file(${PROJECT_NAME}-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake @ONLY) -+include(CMakePackageConfigHelpers) -+configure_package_config_file( -+ ${PROJECT_NAME}-config.cmake.in -+ ${PROJECT_NAME}-config.cmake -+ INSTALL_DESTINATION ${CMAKE_INSTALL_DIR} -+ PATH_VARS -+ INCLUDE_INSTALL_DIR -+ CMAKE_INSTALL_DIR -+) -+configure_package_config_file( -+ ${PROJECT_NAME}-config-version.cmake.in -+ ${PROJECT_NAME}-config-version.cmake -+ INSTALL_DESTINATION ${CMAKE_INSTALL_DIR} -+ PATH_VARS -+ INCLUDE_INSTALL_DIR -+ CMAKE_INSTALL_DIR -+) - install( - FILES - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake - DESTINATION -- ${CMAKE_INSTALL_DIR}/${PROJECT_NAME} -+ ${CMAKE_INSTALL_DIR} - COMPONENT - devel - ) -diff --git a/libssh-config.cmake.in b/libssh-config.cmake.in -index fa9cecf..b17fdbd 100644 ---- a/libssh-config.cmake.in -+++ b/libssh-config.cmake.in -@@ -1,13 +1,22 @@ - get_filename_component(LIBSSH_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -+get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) - - if (EXISTS "${LIBSSH_CMAKE_DIR}/CMakeCache.txt") - # In build tree - include(${LIBSSH_CMAKE_DIR}/libssh-build-tree-settings.cmake) - else() -- set(LIBSSH_INCLUDE_DIR @INCLUDE_INSTALL_DIR@) -+ set(LIBSSH_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include/") -+ set(LIBSSH_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/") - endif() - --set(LIBSSH_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@) --set(LIBSSH_LIBRARIES @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@) -+if(CMAKE_BUILD_TYPE STREQUAL "Release") -+ set(LIBSSH_LIBRARY "${PACKAGE_PREFIX_DIR}/lib/ssh.lib") -+ set(LIBSSH_LIBRARIES "${PACKAGE_PREFIX_DIR}/lib/ssh.lib") - --set(LIBSSH_THREADS_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_THREADS_LIBRARY_NAME@) -+ set(LIBSSH_THREADS_LIBRARY "${PACKAGE_PREFIX_DIR}/lib/ssh.lib") -+elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") -+ set(LIBSSH_LIBRARY "${PACKAGE_PREFIX_DIR}/debug/lib/ssh.lib") -+ set(LIBSSH_LIBRARIES "${PACKAGE_PREFIX_DIR}/debug/lib/ssh.lib") -+ -+ set(LIBSSH_THREADS_LIBRARY "${PACKAGE_PREFIX_DIR}/debug/lib/ssh.lib") -+endif() diff --git a/ports/libssh/missing-includes.patch b/ports/libssh/missing-includes.patch deleted file mode 100644 index f12d047440808f..00000000000000 --- a/ports/libssh/missing-includes.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/libssh/priv.h b/include/libssh/priv.h -index 4cf6d75..13993ea 100644 ---- a/include/libssh/priv.h -+++ b/include/libssh/priv.h -@@ -30,6 +30,8 @@ - #define _LIBSSH_PRIV_H - - #include "config.h" -+#include -+#include - - #if !defined(HAVE_STRTOULL) - # if defined(HAVE___STRTOULL) diff --git a/ports/libssh/only-one-flavor-threads.patch b/ports/libssh/only-one-flavor-threads.patch deleted file mode 100644 index 31b3e1f36de563..00000000000000 --- a/ports/libssh/only-one-flavor-threads.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt -index 2ab4e1b..a47620b 100644 ---- a/src/threads/CMakeLists.txt -+++ b/src/threads/CMakeLists.txt -@@ -59,6 +59,7 @@ include_directories( - if (libssh_threads_SRCS) - set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL) - -+ if (NOT WITH_STATIC_LIB) - add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS}) - - target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES}) -@@ -89,7 +90,7 @@ if (libssh_threads_SRCS) - COMPONENT libraries - ) - -- if (WITH_STATIC_LIB) -+ else (WITH_STATIC_LIB) - add_library(${LIBSSH_THREADS_STATIC_LIBRARY} STATIC ${libssh_threads_SRCS}) - - if (MSVC) diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index e137f823f1752a..c15cc0a9c1d602 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -1,77 +1,70 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "WindowsStore not supported") -endif() - -set(VERSION 0.7.6) -vcpkg_download_distfile(ARCHIVE - URLS "https://www.libssh.org/files/0.7/libssh-${VERSION}.tar.xz" - FILENAME "libssh-${VERSION}.tar.xz" - SHA512 2a01402b5a9fab9ecc29200544ed45d3f2c40871ed1c8241ca793f8dc7fdb3ad2150f6a522c4321affa9b8778e280dc7ed10f76adfc4a73f0751ae735a42f56c -) - -vcpkg_download_distfile(WINPATCH - URLS "https://bugs.libssh.org/rLIBSSHf81ca6161223e3566ce78a427571235fb6848fe9?diff=1" - FILENAME "libssh-f81ca616.patch" - SHA512 f3f6088f8f1bf8fe6226c1aa7b355d877be7f2aa9482c5e3de74b6a35fc5b28d8f89221d3afa5a5d3a5900519a86e5906516667ed22ad98f058616a8120999cd -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} + URL https://git.libssh.org/projects/libssh.git + REF 9c4af47965d284b2de26407bcd80473aba4ee4c9 # REFERENCE VERSION 0.9.5 + SHA512 64e692a0bfa7f73585ea7b7b8b1d4c9a7f9be59565bfd4de32ca8cd9db121f87e7ad51f5c80269fbd99545af34dcf1894374ed8a6d6c1ac5f8601c026572ac18 PATCHES - build-one-flavor.patch - only-one-flavor-threads.patch - "${WINPATCH}" - missing-includes.patch - fix-config-cmake.patch + 0001-export-pkgconfig-file.patch + 0002-mingw_for_Android.patch + 0003-create_symlink_unix_only.patch ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WITH_STATIC_LIB) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + mbedtls WITH_MBEDTLS + zlib WITH_ZLIB +) -if(zlib IN_LIST FEATURES) - set(WITH_ZLIB ON) -else() - set(WITH_ZLIB OFF) -endif() +if (VCPKG_TARGET_IS_ANDROID) + set(EXTRA_ARGS "-DWITH_SERVER=FALSE" + "-DWITH_PCAP=FALSE" + ) +endif () vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DWITH_STATIC_LIB=${WITH_STATIC_LIB} + ${EXTRA_ARGS} + ${FEATURE_OPTIONS} -DWITH_EXAMPLES=OFF - -DWITH_TESTING=OFF + -DUNIT_TESTING=OFF + -DCLIENT_TESTING=OFF + -DSERVER_TESTING=OFF -DWITH_NACL=OFF - -DWITH_GSSAPI=OFF - -DWITH_ZLIB=${WITH_ZLIB} - -DCMAKE_INSTALL_DIR=share/libssh -) + -DWITH_GSSAPI=OFF) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) vcpkg_copy_pdbs() +#Fixup pthread naming +if(NOT VCPKG_TARGET_IS_MINGW AND VCPKG_TARGET_IS_WINDOWS) + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libssh.pc" "-lpthread" "-lpthreadVC3d") + endif() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libssh.pc" "-lpthread" "-lpthreadVC3") +endif() +vcpkg_fixup_pkgconfig() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) - endif() - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) - endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - - file(READ ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h _contents) - string(REPLACE "#ifdef LIBSSH_STATIC" "#if 1" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h "${_contents}") + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h + "#ifdef LIBSSH_STATIC" + "#if 1" + ) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/debug/lib/static) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake + ".dll" + ".lib" + ) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# The installed cmake config files are nonfunctional (0.7.5) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright) -file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/libssh/usage b/ports/libssh/usage index 3681ac1122cad1..39cb551c35213c 100644 --- a/ports/libssh/usage +++ b/ports/libssh/usage @@ -1,5 +1,4 @@ The package libssh is compatible with built-in CMake targets: find_package(libssh CONFIG REQUIRED) - target_link_libraries(main PRIVATE ${LIBSSH_LIBRARIES}) - target_include_directories(main PRIVATE ${LIBSSH_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ssh) diff --git a/ports/libssh/vcpkg.json b/ports/libssh/vcpkg.json new file mode 100644 index 00000000000000..47669c5a226fbd --- /dev/null +++ b/ports/libssh/vcpkg.json @@ -0,0 +1,62 @@ +{ + "name": "libssh", + "version-string": "0.9.5", + "port-version": 6, + "description": "libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side", + "homepage": "https://www.libssh.org/", + "supports": "!(uwp | arm)", + "dependencies": [ + { + "name": "libssh", + "default-features": false, + "features": [ + "mbedtls" + ], + "platform": "android" + } + ], + "default-features": [ + "crypto" + ], + "features": { + "crypto": { + "description": "Default crypto backend", + "dependencies": [ + { + "name": "libssh", + "features": [ + "mbedtls" + ] + } + ] + }, + "mbedtls": { + "description": "Crypto support (mbedTLS)", + "dependencies": [ + { + "name": "mbedtls", + "default-features": false + }, + { + "name": "mbedtls", + "features": [ + "pthreads" + ], + "platform": "!android" + } + ] + }, + "openssl": { + "description": "Crypto support (OpenSSL)", + "dependencies": [ + "openssl" + ] + }, + "zlib": { + "description": "libssh with zlib", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/libssh2/CONTROL b/ports/libssh2/CONTROL deleted file mode 100644 index b8579332e4c77b..00000000000000 --- a/ports/libssh2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libssh2 -Version: 1.8.2 -Build-Depends: zlib, openssl -Homepage: https://www.libssh2.org -Description: The SSH library diff --git a/ports/libssh2/portfile.cmake b/ports/libssh2/portfile.cmake index e8a4e356520484..0922bb7c8bcabe 100644 --- a/ports/libssh2/portfile.cmake +++ b/ports/libssh2/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libssh2/libssh2 - REF libssh2-1.8.2 - SHA512 f676f8c2d1c66cd086ad5a1d328e3eb3a033afd4511577451c5664a4e0c4c1ea006fa1885f332fb2b3842b2eb30456322efdd2abf97c2f148c2be0d53e3e5624 + REF 42d37aa63129a1b2644bf6495198923534322d64 + SHA512 e86c0787e2aa7be5e9f19356e543493e53c7d1b51b585c46facfb05f769e6491209f820b207bf594348f4760c492c32dda3fcc94fc0af93cb09c736492a8e231 HEAD_REF master PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch" ) diff --git a/ports/libssh2/vcpkg.json b/ports/libssh2/vcpkg.json new file mode 100644 index 00000000000000..c5692d464608df --- /dev/null +++ b/ports/libssh2/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libssh2", + "version-string": "1.9.0", + "port-version": 1, + "description": "The SSH library", + "homepage": "https://www.libssh2.org", + "dependencies": [ + "openssl", + "zlib" + ] +} diff --git a/ports/libstemmer/CONTROL b/ports/libstemmer/CONTROL deleted file mode 100644 index a1949a2be6bc6d..00000000000000 --- a/ports/libstemmer/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libstemmer -Version: 2017-9-4 -Homepage: https://snowball.tartarus.org/ -Description: Snowball is a small string processing language designed for creating stemming algorithms for use in Information Retrieval diff --git a/ports/libstemmer/portfile.cmake b/ports/libstemmer/portfile.cmake index ed4d86c4e2e3a7..e28f90cc5803a8 100644 --- a/ports/libstemmer/portfile.cmake +++ b/ports/libstemmer/portfile.cmake @@ -1,14 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libstemmer_c) vcpkg_download_distfile(ARCHIVE URLS "http://snowball.tartarus.org/dist/libstemmer_c.tgz" FILENAME "libstemmer_c.tgz" SHA512 9ab5b8bfd5b4071dbbd63d769e09fae3971b49ee441ad970aa95d90b3297f5ffc9deed1613d99974d1485bf3b69292663591957f52bbeddcadbf9d9a4af432f2 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/libstemmer/vcpkg.json b/ports/libstemmer/vcpkg.json new file mode 100644 index 00000000000000..8dee5abc54e5e4 --- /dev/null +++ b/ports/libstemmer/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libstemmer", + "version-string": "2017-9", + "port-version": 6, + "description": "Snowball is a small string processing language designed for creating stemming algorithms for use in Information Retrieval", + "homepage": "https://snowball.tartarus.org/" +} diff --git a/ports/libstk/CONTROL b/ports/libstk/CONTROL deleted file mode 100644 index 1de9780e13fe0a..00000000000000 --- a/ports/libstk/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libstk -Version: 4.6.1 -Description: The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. diff --git a/ports/libstk/portfile.cmake b/ports/libstk/portfile.cmake index 84b92977341ade..ffb9eeb8bb9b18 100644 --- a/ports/libstk/portfile.cmake +++ b/ports/libstk/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -31,6 +29,3 @@ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/li file(GLOB RAWFILES ${SOURCE_PATH}/rawwaves/*.raw) file(COPY ${RAWFILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/libstk/rawwaves) - -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME libstk) diff --git a/ports/libstk/vcpkg.json b/ports/libstk/vcpkg.json new file mode 100644 index 00000000000000..0c4d3073108de1 --- /dev/null +++ b/ports/libstk/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libstk", + "version-string": "4.6.1", + "port-version": 1, + "description": "The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language." +} diff --git a/ports/libsvm/CMakeLists.txt b/ports/libsvm/CMakeLists.txt new file mode 100644 index 00000000000000..560b05350094c3 --- /dev/null +++ b/ports/libsvm/CMakeLists.txt @@ -0,0 +1,62 @@ +cmake_minimum_required(VERSION 3.14) + +project(libsvm LANGUAGES C CXX) + +include(GNUInstallDirs) + +option(SVM_BUILD_TOOLS "Build SVM tools" OFF) + +set(libsvm_sources svm.cpp) +if (WIN32) + list(APPEND libsvm_sources svm.def) +endif () + +add_library(libsvm ${libsvm_sources}) + +target_compile_definitions( + libsvm + PRIVATE + $<$: + _CRT_SECURE_NO_WARNINGS + strdup=_strdup + > +) + +target_include_directories( + libsvm + PUBLIC + $ + $ +) + +set_target_properties(libsvm PROPERTIES PUBLIC_HEADER svm.h) + +install(TARGETS libsvm EXPORT unofficial-libsvm-config) + +install( + EXPORT unofficial-libsvm-config + NAMESPACE unofficial::libsvm:: + DESTINATION share/unofficial-libsvm + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) + +if (SVM_BUILD_TOOLS) + add_executable(svm-predict svm-predict.c) + target_link_libraries(svm-predict PRIVATE libsvm) + + add_executable(svm-scale svm-scale.c) + target_link_libraries(svm-scale PRIVATE libsvm) + + add_executable(svm-train svm-train.c) + target_link_libraries(svm-train PRIVATE libsvm) + + install(TARGETS svm-predict svm-scale svm-train) + + if (WIN32) + add_executable(svm-toy svm-toy/windows/svm-toy.cpp) + target_link_libraries(svm-toy PRIVATE libsvm) + set_target_properties(svm-toy PROPERTIES WIN32_EXECUTABLE ON) + + install(TARGETS svm-toy) + endif () +endif () diff --git a/ports/libsvm/portfile.cmake b/ports/libsvm/portfile.cmake new file mode 100644 index 00000000000000..a89b838e1ed021 --- /dev/null +++ b/ports/libsvm/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cjlin1/libsvm + REF v323 + SHA512 c4abd408acf860c76cfc743e6c65d241fcb18443e741fc0f557f7cf7b4d0913c05f3afc5d49de8a42ff88db6fc7b046d08bcb0a3d2a24ba23e297ed1cfbb9131 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools SVM_BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DSVM_BUILD_TOOLS=OFF + OPTIONS_RELEASE + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +if ("tools" IN_LIST FEATURES) + if (WIN32) + vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-toy svm-train AUTO_CLEAN) + else () + vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-train AUTO_CLEAN) + endif () +endif () + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYRIGHT ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/libsvm/vcpkg.json b/ports/libsvm/vcpkg.json new file mode 100644 index 00000000000000..fe2003e4d0d371 --- /dev/null +++ b/ports/libsvm/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libsvm", + "version-string": "323", + "port-version": 2, + "description": "A library for Support Vector Machines.", + "homepage": "https://www.csie.ntu.edu.tw/~cjlin/libsvm/", + "features": { + "tools": { + "description": "build libsvm CLI tools." + } + } +} diff --git a/ports/libtasn1/msvc_fixes.patch b/ports/libtasn1/msvc_fixes.patch new file mode 100644 index 00000000000000..0554ff60a20c42 --- /dev/null +++ b/ports/libtasn1/msvc_fixes.patch @@ -0,0 +1,86 @@ +diff --git a/src/asn1Coding.c b/src/asn1Coding.c +index 86c1d07..6fcfc4d 100644 +--- a/src/asn1Coding.c ++++ b/src/asn1Coding.c +@@ -23,7 +23,12 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + +diff --git a/src/asn1Decoding.c b/src/asn1Decoding.c +index c6f192e..3e4e21d 100644 +--- a/src/asn1Decoding.c ++++ b/src/asn1Decoding.c +@@ -23,7 +23,12 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + #include +diff --git a/src/asn1Parser.c b/src/asn1Parser.c +index b6844a8..445c716 100644 +--- a/src/asn1Parser.c ++++ b/src/asn1Parser.c +@@ -23,7 +23,12 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + +diff --git a/src/benchmark.c b/src/benchmark.c +index 010d58e..6c613df 100644 +--- a/src/benchmark.c ++++ b/src/benchmark.c +@@ -21,9 +21,16 @@ + #include + #include + #include ++#ifndef _MSC_VER + #include ++#endif + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include "benchmark.h" + + int benchmark_must_finish = 0; +diff --git a/src/benchmark.h b/src/benchmark.h +index 3272649..6b6bf32 100644 +--- a/src/benchmark.h ++++ b/src/benchmark.h +@@ -21,7 +21,9 @@ + # define BENCHMARK_H + + #include ++#ifndef _MSC_VER + #include ++#endif + #include + #include + #if defined _WIN32 diff --git a/ports/libtasn1/portfile.cmake b/ports/libtasn1/portfile.cmake new file mode 100644 index 00000000000000..700bb977e7a253 --- /dev/null +++ b/ports/libtasn1/portfile.cmake @@ -0,0 +1,53 @@ +set(VERSION 4.17.0) + +if(VCPKG_TARGET_IS_WINDOWS) + set(PATCHES msvc_fixes.patch) +endif() + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/libtasn1/libtasn1-${VERSION}.tar.gz" + FILENAME "libtasn1-${VERSION}.tar.gz" + SHA512 9cbd920196d1e4c8f5aa613259cded2510d40edb583ce20cc2702e2dee9bf32bee85a159c74600ffbebc2af2787e28ed0fe0adf15fc46839283747f4fe166d3d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + ${PATCHES} +) + +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW) + # $LIBS is an environment variable that vcpkg already pre-populated with some libraries. + # We need to re-purpose it when passing LIBS option to make to avoid overriding the vcpkg's own list. + set(EXTRA_OPTS "LIBS=\"$LIBS -lgettimeofday -lgetopt\"") +else() + # restore the default ac_cv_prog_cc_g flags, otherwise it fails to compile + set(EXTRA_OPTS) + set(VCPKG_C_FLAGS "-g -O2") + set(VCPKG_CXX_FLAGS "-g -O2") +endif() + +# The upstream doesn't add this macro to the configure +if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + + set(EXTRA_OPTS "${EXTRA_OPTS} CFLAGS=\"$CFLAGS -DASN1_STATIC\"") +endif() + +set(ENV{GTKDOCIZE} true) +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --disable-doc + --disable-gtk-doc + --disable-gcc-warnings + ${EXTRA_OPTS} +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools" "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libtasn1/vcpkg.json b/ports/libtasn1/vcpkg.json new file mode 100644 index 00000000000000..e61d35e03f667c --- /dev/null +++ b/ports/libtasn1/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "libtasn1", + "version": "4.17.0", + "port-version": 1, + "description": "A secure communications library implementing the SSL, TLS and DTLS protocols", + "homepage": "https://www.gnutls.org/", + "supports": "!uwp", + "dependencies": [ + { + "name": "getopt", + "platform": "windows" + }, + { + "name": "gettimeofday", + "platform": "windows" + } + ] +} diff --git a/ports/libtcod/portfile.cmake b/ports/libtcod/portfile.cmake new file mode 100644 index 00000000000000..c836477f7326ff --- /dev/null +++ b/ports/libtcod/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libtcod/libtcod + REF 1.18.0 + SHA512 4191353c422e96987977ffc2a2f816381aa5c2e82cc0ccf80a902a0ff32023ec7a824e9845eb7c220d9e2a2fdb90be3aff1c3e05893f45a7326a89292aa11a4d + HEAD_REF develop +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} + -DCMAKE_INSTALL_INCLUDEDIR=${CURRENT_PACKAGES_DIR}/include + -DLIBTCOD_SDL2=find_package + -DLIBTCOD_ZLIB=find_package + -DLIBTCOD_GLAD=find_package + -DLIBTCOD_LODEPNG=find_package + -DLIBTCOD_UTF8PROC=vcpkg + -DLIBTCOD_STB=vcpkg +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/libtcod/vcpkg.json b/ports/libtcod/vcpkg.json new file mode 100644 index 00000000000000..418bddcdcbb3bb --- /dev/null +++ b/ports/libtcod/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "libtcod", + "version-semver": "1.18.0", + "maintainers": "Kyle Benesch <4b796c65+github@gmail.com>", + "description": "Common algorithms and tools for roguelikes.", + "homepage": "https://github.com/libtcod/libtcod", + "documentation": "https://libtcod.readthedocs.io/en/latest/", + "dependencies": [ + "glad", + "lodepng-c", + "sdl2", + "stb", + "utf8proc", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/libtheora/CMakeLists.txt b/ports/libtheora/CMakeLists.txt index cf8799e5d84794..0d4aed76e04fbc 100644 --- a/ports/libtheora/CMakeLists.txt +++ b/ports/libtheora/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) project(theora LANGUAGES C) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}") -FIND_PACKAGE(OGG REQUIRED) +FIND_PACKAGE(Ogg REQUIRED) file(GLOB HEADERS "include/theora/codec.h" @@ -11,9 +11,6 @@ file(GLOB HEADERS "include/theora/theoraenc.h" ) -include_directories("include") -include_directories(${OGG_INCLUDE_DIR}) - set(LIBTHEORA_COMMON "lib/apiwrapper.c" "lib/bitpack.c" @@ -71,22 +68,47 @@ if (BUILD_SHARED_LIBS) endif() add_library(theora-common OBJECT ${LIBTHEORA_COMMON} ${HEADERS}) +target_link_libraries(theora-common PUBLIC Ogg::ogg) +target_include_directories(theora-common PUBLIC $ $) add_library(theora-enc OBJECT ${LIBTHEORA_ENC} ${HEADERS}) +target_link_libraries(theora-enc PUBLIC Ogg::ogg) +target_include_directories(theora-enc PUBLIC $ $) add_library(theora-dec OBJECT ${LIBTHEORA_DEC} ${HEADERS}) +target_link_libraries(theora-dec PUBLIC Ogg::ogg) +target_include_directories(theora-dec PUBLIC $ $) add_library(theora $ $ $ "libtheora.def") -target_link_libraries(theora ${OGG_LIBRARY}) +target_link_libraries(theora PUBLIC Ogg::ogg) +target_include_directories(theora PUBLIC $ $) add_library(theoraenc $ $ "win32/xmingw32/libtheoraenc-all.def") -target_link_libraries(theoraenc ${OGG_LIBRARY}) +target_link_libraries(theoraenc PUBLIC Ogg::ogg) +target_include_directories(theoraenc PUBLIC $ $) add_library(theoradec $ $ "win32/xmingw32/libtheoradec-all.def") -target_link_libraries(theoradec ${OGG_LIBRARY}) +target_link_libraries(theoradec PUBLIC Ogg::ogg) +target_include_directories(theoradec PUBLIC $ $) + +include(CMakePackageConfigHelpers) + +configure_package_config_file(unofficial-theora-config.cmake.in unofficial-theora-config.cmake + INSTALL_DESTINATION "lib/unofficial-theora") install(FILES ${HEADERS} DESTINATION include/theora) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-theora-config.cmake" + DESTINATION "lib/unofficial-theora" +) + install(TARGETS theora theoraenc theoradec + EXPORT unofficial-theora-targets RUNTIME DESTINATION bin LIBRARY DESTINATION bin ARCHIVE DESTINATION lib ) + +install(EXPORT unofficial-theora-targets + NAMESPACE unofficial::theora:: + DESTINATION "lib/unofficial-theora" +) diff --git a/ports/libtheora/CONTROL b/ports/libtheora/CONTROL deleted file mode 100644 index 6c5f93b2ccaacd..00000000000000 --- a/ports/libtheora/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libtheora -Version: 1.2.0alpha1-20170719~vcpkg1-3 -Homepage: https://github.com/xiph/theora -Description: Theora is a free and open video compression format from the Xiph.org Foundation. -Build-Depends: libogg diff --git a/ports/libtheora/FindOGG.cmake b/ports/libtheora/FindOGG.cmake deleted file mode 100644 index ba3c8b1b6cfd89..00000000000000 --- a/ports/libtheora/FindOGG.cmake +++ /dev/null @@ -1,8 +0,0 @@ -find_path(OGG_INCLUDE_DIR NAMES ogg/ogg.h) - -find_library(OGG_LIBRARY NAMES ogg libogg) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR) - -mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY) diff --git a/ports/libtheora/portfile.cmake b/ports/libtheora/portfile.cmake index 50e6fc6535239e..8c88e261b27d93 100644 --- a/ports/libtheora/portfile.cmake +++ b/ports/libtheora/portfile.cmake @@ -1,22 +1,16 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/theora REF fa5707d68c2a4338d58aa8b6afc95539ba89fecb SHA512 e33da23a17e93709dfe4421b512cedbd9aab0d706f5650e0436f9c8e1cde76b902c3338d46750bb86d83e1bceb111ee84e90df36fb59b5c2e7f7aee1610752b2 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp.patch + 0001-fix-uwp.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/libtheora.def DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOGG.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-theora-config.cmake.in DESTINATION ${SOURCE_PATH}) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(THEORA_X86_OPT ON) @@ -33,6 +27,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/unofficial-theora TARGET_PATH share/unofficial-theora) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/libtheora/unofficial-theora-config.cmake.in b/ports/libtheora/unofficial-theora-config.cmake.in new file mode 100644 index 00000000000000..af1974f462b0cb --- /dev/null +++ b/ports/libtheora/unofficial-theora-config.cmake.in @@ -0,0 +1,3 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-theora-targets.cmake") diff --git a/ports/libtheora/vcpkg.json b/ports/libtheora/vcpkg.json new file mode 100644 index 00000000000000..58167e7d1bbf41 --- /dev/null +++ b/ports/libtheora/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libtheora", + "version-string": "1.2.0alpha1-20170719", + "port-version": 3, + "description": "Theora is a free and open video compression format from the Xiph.org Foundation.", + "homepage": "https://github.com/xiph/theora", + "dependencies": [ + "libogg" + ] +} diff --git a/ports/libtins/CONTROL b/ports/libtins/CONTROL deleted file mode 100644 index 11cb86ea88ad8b..00000000000000 --- a/ports/libtins/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libtins -Version: 4.2 -Description: High-level, multiplatform C++ network packet sniffing and crafting library -Build-Depends: winpcap (windows), boost-icl, boost-any diff --git a/ports/libtins/portfile.cmake b/ports/libtins/portfile.cmake index dabd283d0b84df..ae783e53b6bc70 100644 --- a/ports/libtins/portfile.cmake +++ b/ports/libtins/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mfontanini/libtins - REF v4.2 - SHA512 46d07712604c780e418135c996f195046fd85a9e1411962c9bcee3c8d0fc64f494aa50164236ffd1e77ff8a398e9617bbf040b3e01a5771c5621c0faa1ce312f + REF v4.3 + SHA512 29d606004fe9a440c9a53eede42fd5c6dbd049677d2cca2c5cfd26311ee2ca4c64ca3e665fbc81efd5bfab5577a5181ed0754c617e139317d9ae0cabba05aff7 HEAD_REF master ) @@ -21,6 +19,7 @@ vcpkg_configure_cmake( OPTIONS -DLIBTINS_BUILD_SHARED=${LIBTINS_BUILD_SHARED} -DLIBTINS_ENABLE_PCAP=${ENABLE_PCAP} + -DLIBTINS_ENABLE_CXX11=1 ) vcpkg_install_cmake() @@ -35,6 +34,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtins RENAME copyright) - -# Post-build test for cmake libraries -vcpkg_test_cmake(PACKAGE_NAME libtins) diff --git a/ports/libtins/vcpkg.json b/ports/libtins/vcpkg.json new file mode 100644 index 00000000000000..f4f2b274806d2e --- /dev/null +++ b/ports/libtins/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libtins", + "version-string": "4.3", + "port-version": 1, + "description": "High-level, multiplatform C++ network packet sniffing and crafting library", + "dependencies": [ + "boost-any", + "boost-icl", + { + "name": "winpcap", + "platform": "windows" + } + ] +} diff --git a/ports/libtomcrypt/portfile.cmake b/ports/libtomcrypt/portfile.cmake new file mode 100644 index 00000000000000..e547d837595a6e --- /dev/null +++ b/ports/libtomcrypt/portfile.cmake @@ -0,0 +1,95 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libtom/libtomcrypt + REF v1.18.2 + SHA512 53accb4f92077ff1c52102bece270e77c497e599c392aa0bf4dbc173b6789e7e4f1012d8b5f257c438764197cb7bac8ba409a9d4e3a70e69bec5863b9495329e + HEAD_REF develop +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(CRTFLAG "/MD") + else() + set(CRTFLAG "/MT") + endif() + + # Make sure we start from a clean slate + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-dbg + ) + + #Debug Build + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc "CFLAGS=${CRTFLAG}d /DUSE_LTM /DLTM_DESC \"/I${CURRENT_INSTALLED_DIR}/include\"" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + file(INSTALL + ${SOURCE_PATH}/tomcrypt.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + + # Clean up necessary to rebuild without debug symbols + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-rel + ) + + #Release Build + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc "CFLAGS=${CRTFLAG} /Ox /DNDEBUG /DUSE_LTM /DLTM_DESC \"/I${CURRENT_INSTALLED_DIR}/include\"" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + file(INSTALL + ${SOURCE_PATH}/tomcrypt.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + + file(INSTALL + ${SOURCE_PATH}/src/headers/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(MAKE_FILE "makefile.shared") + else() + set(MAKE_FILE "makefile") + endif() + + set(ENV{CFLAGS} "-fPIC -DUSE_LTM -DLTM_DESC -I${CURRENT_INSTALLED_DIR}/include") + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR}/debug LTC_DEBUG=1 install + WORKING_DIRECTORY ${SOURCE_PATH} + ) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR} install + WORKING_DIRECTORY ${SOURCE_PATH} + ) + +endif() + +#Copy license +file( + INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) \ No newline at end of file diff --git a/ports/libtomcrypt/vcpkg.json b/ports/libtomcrypt/vcpkg.json new file mode 100644 index 00000000000000..4607ff07606ab5 --- /dev/null +++ b/ports/libtomcrypt/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libtomcrypt", + "version-string": "1.18.2", + "port-version": 2, + "description": "LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines.", + "homepage": "https://www.libtom.net/LibTomCrypt/", + "dependencies": [ + "libtommath" + ] +} diff --git a/ports/libtommath/portfile.cmake b/ports/libtommath/portfile.cmake new file mode 100644 index 00000000000000..746ead44943f1a --- /dev/null +++ b/ports/libtommath/portfile.cmake @@ -0,0 +1,91 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libtom/libtommath + REF v1.2.0 + SHA512 500bce4467d6cdb0b014e6c66d3b994a8d63b51475db6c3cd77c15c8368fbab4e3b5c458fcd5b35838b74c457a33c15b42d2356964f5ef2a0bd31fd544735c9a + HEAD_REF develop +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(CRTFLAG "/MD") + else() + set(CRTFLAG "/MT") + endif() + + # Make sure we start from a clean slate + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-dbg + ) + + #Debug Build + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc CFLAGS="${CRTFLAG}d" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + file(INSTALL + ${SOURCE_PATH}/tommath.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + + # Clean up necessary to rebuild without debug symbols + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-rel + ) + + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc CFLAGS="${CRTFLAG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + file(INSTALL + ${SOURCE_PATH}/tommath.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + + file(INSTALL + ${SOURCE_PATH}/tommath.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(MAKE_FILE "makefile.shared") + else() + set(MAKE_FILE "makefile") + endif() + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR}/debug COMPILE_DEBUG=1 install + WORKING_DIRECTORY ${SOURCE_PATH} + ) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR} install + WORKING_DIRECTORY ${SOURCE_PATH} + ) +endif() + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) \ No newline at end of file diff --git a/ports/libtommath/vcpkg.json b/ports/libtommath/vcpkg.json new file mode 100644 index 00000000000000..e6472aa8f70304 --- /dev/null +++ b/ports/libtommath/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libtommath", + "version-string": "1.2.0", + "port-version": 2, + "description": "LibTomMath is a free open source portable number theoretic multiple-precision integer library written entirely in C.", + "homepage": "https://www.libtom.net/LibTomMath/" +} diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL deleted file mode 100644 index ef6da132130046..00000000000000 --- a/ports/libtorrent/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libtorrent -Version: 1.2.1-bcb26fd6 -Homepage: https://github.com/arvidn/libtorrent -Description: An efficient feature complete C++ BitTorrent implementation -Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config, boost-iterator, boost-scope-exit, boost-multiprecision diff --git a/ports/libtorrent/add-datetime-to-boost-libs.patch b/ports/libtorrent/add-datetime-to-boost-libs.patch deleted file mode 100644 index 1ec65a8f5f92ff..00000000000000 --- a/ports/libtorrent/add-datetime-to-boost-libs.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 944602b..9d95446 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -678,9 +678,9 @@ else() - endif() - - # Boost --find_public_dependency(Boost REQUIRED COMPONENTS system) -+find_public_dependency(Boost REQUIRED COMPONENTS system date_time) - target_include_directories(torrent-rasterbar PUBLIC ${Boost_INCLUDE_DIRS}) --target_link_libraries(torrent-rasterbar PUBLIC ${Boost_SYSTEM_LIBRARY}) -+target_link_libraries(torrent-rasterbar PUBLIC ${Boost_LIBRARIES}) - - if (exceptions) - if (MSVC) diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index df31dbe9389f7b..e70a78efffba0a 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -1,39 +1,60 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") + +if(VCPKG_TARGET_IS_WINDOWS) + # Building python bindings is currently broken on Windows + if("python" IN_LIST FEATURES) + message(FATAL_ERROR "The python feature is currently broken on Windows") + endif() + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(_static_runtime ON) + endif() +endif() + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + deprfun deprecated-functions + examples build_examples + iconv iconv + python python-bindings + test build_tests + tools build_tools +) + +# Note: the python feature currently requires `python3-dev` and `python3-setuptools` installed on the system +if("python" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) + vcpkg_add_to_path(${PYTHON3_PATH}) + + file(GLOB BOOST_PYTHON_LIB "${CURRENT_INSTALLED_DIR}/lib/*boost_python*") + string(REGEX REPLACE ".*(python)([0-9])([0-9]+).*" "\\1\\2\\3" _boost-python-module-name "${BOOST_PYTHON_LIB}") +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO arvidn/libtorrent - REF bcb26fd638bd8c543cd3cc42837b120ff86d44b1 - SHA512 af897d2daca6e67efe777724147b1047624df9df938222fe967d380263d88ccb3c081e1a24a6c790bf1b35f46385ef08b46d8e46d0922f945cd28c59dd0d35a7 - HEAD_REF master - PATCHES - add-datetime-to-boost-libs.patch + REF 33a10d5a723a6c27d9baee7d9bf2028eb81c88ed # v1.2.14 + SHA512 7be169625c9ab1319047aa025abb36579cf6c749faeee7788b5c0ca24ca32d0a4bfd898415159b9133302da4d26230edcb5585c12137edcab8f5b3548c67a268 + HEAD_REF RC_1_2 ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTORRENT_SHARED) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS - -Dshared=${LIBTORRENT_SHARED} - -Ddeprecated-functions=off + ${FEATURE_OPTIONS} + -Dboost-python-module-name=${_boost-python-module-name} + -Dstatic_runtime=${_static_runtime} + -DPython3_USE_STATIC_LIBS=ON ) vcpkg_install_cmake() -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - # Defines for shared lib - file(READ ${CURRENT_PACKAGES_DIR}/include/libtorrent/aux_/export.hpp EXPORT_H) - string(REPLACE "defined TORRENT_BUILDING_SHARED" "1" EXPORT_H "${EXPORT_H}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/libtorrent/aux_/export.hpp "${EXPORT_H}") -endif() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/LibtorrentRasterbar TARGET_PATH share/libtorrentrasterbar) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/LibtorrentRasterbar TARGET_PATH share/LibtorrentRasterbar) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtorrent) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libtorrent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtorrent/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) # Do not duplicate include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/cmake) diff --git a/ports/libtorrent/vcpkg.json b/ports/libtorrent/vcpkg.json new file mode 100644 index 00000000000000..39fe5343c423f8 --- /dev/null +++ b/ports/libtorrent/vcpkg.json @@ -0,0 +1,53 @@ +{ + "name": "libtorrent", + "version": "1.2.14", + "maintainers": "Arvid Norberg ", + "description": "An efficient feature complete C++ BitTorrent implementation", + "homepage": "https://libtorrent.org", + "documentation": "https://libtorrent.org/reference.html", + "supports": "!uwp & !(windows & arm)", + "dependencies": [ + "boost-asio", + "boost-chrono", + "boost-config", + "boost-crc", + "boost-date-time", + "boost-iterator", + "boost-multiprecision", + "boost-pool", + "boost-random", + "boost-scope-exit", + "boost-system", + "boost-variant", + "openssl" + ], + "default-features": [ + "iconv" + ], + "features": { + "deprfun": { + "description": "build with deprecated functions enabled" + }, + "examples": { + "description": "build the examples in the examples directory" + }, + "iconv": { + "description": "build with libiconv", + "dependencies": [ + "libiconv" + ] + }, + "python": { + "description": "build the python bindings in bindings/python directory", + "dependencies": [ + "boost-python" + ] + }, + "test": { + "description": "build the libtorrent tests" + }, + "tools": { + "description": "build the tools in the tools directory" + } + } +} diff --git a/ports/libu2f-server/CONTROL b/ports/libu2f-server/CONTROL deleted file mode 100644 index 26803fbb7ecd09..00000000000000 --- a/ports/libu2f-server/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libu2f-server -Version: 1.1.0 -Build-Depends: openssl, json-c -Description: Yubico Universal 2nd Factor (U2F) Server C Library diff --git a/ports/libu2f-server/portfile.cmake b/ports/libu2f-server/portfile.cmake index 86e5d9bbebf2b8..6893718db617c1 100644 --- a/ports/libu2f-server/portfile.cmake +++ b/ports/libu2f-server/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -23,6 +21,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +# The include file must be patched after the build has completed, because the source files use the wrong subdirectory name! +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libu2f-server/u2f-server.h + "#include " + "#include " +) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() diff --git a/ports/libu2f-server/vcpkg.json b/ports/libu2f-server/vcpkg.json new file mode 100644 index 00000000000000..b66f13cee88369 --- /dev/null +++ b/ports/libu2f-server/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libu2f-server", + "version-string": "1.1.0", + "port-version": 3, + "description": "Yubico Universal 2nd Factor (U2F) Server C Library", + "homepage": "https://developers.yubico.com/libu2f-server/", + "supports": "(x86 | x64) & windows", + "dependencies": [ + "json-c", + "openssl" + ] +} diff --git a/ports/libudis86/CONTROL b/ports/libudis86/CONTROL deleted file mode 100644 index 8e67b89cc4261d..00000000000000 --- a/ports/libudis86/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libudis86 -Version: 2018-01-28-56ff6c87 -Homepage: https://github.com/vmt/udis86 -Description: Disassembler Library for x86 and x86-64 diff --git a/ports/libudis86/portfile.cmake b/ports/libudis86/portfile.cmake index a4f5aa9d7690d3..42d99d38a1e976 100644 --- a/ports/libudis86/portfile.cmake +++ b/ports/libudis86/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vmt/udis86 @@ -13,8 +11,8 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_find_acquire_program(PYTHON2) vcpkg_execute_required_process( - COMMAND ${PYTHON2} ${SOURCE_PATH}/scripts/ud_itab.py ${SOURCE_PATH}/docs/x86/optable.xml ${SOURCE_PATH}/libudis86/ - WORKING_DIRECTORY SOURCE_PATH + COMMAND "${PYTHON2}" "${SOURCE_PATH}/scripts/ud_itab.py" "${SOURCE_PATH}/docs/x86/optable.xml" "${SOURCE_PATH}/libudis86/" + WORKING_DIRECTORY "${SOURCE_PATH}" LOGNAME python-${TARGET_TRIPLET}-generate-sources ) @@ -22,12 +20,12 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG - -DDISABLE_INSTALL_HEADERS=ON - -DDISABLE_INSTALL_TOOLS=ON + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libudis86) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libudis86 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libudis86/vcpkg.json b/ports/libudis86/vcpkg.json new file mode 100644 index 00000000000000..a687a41045a274 --- /dev/null +++ b/ports/libudis86/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libudis86", + "version-string": "2018-01-28-56ff6c87", + "port-version": 1, + "description": "Disassembler Library for x86 and x86-64", + "homepage": "https://github.com/vmt/udis86" +} diff --git a/ports/libudns/ignore_unknown_options.patch b/ports/libudns/ignore_unknown_options.patch new file mode 100644 index 00000000000000..4adbcf28cc07db --- /dev/null +++ b/ports/libudns/ignore_unknown_options.patch @@ -0,0 +1,26 @@ +diff --git a/configure b/configure +index dda98b3ab..6f5f8a3c8 100644 +--- a/configure ++++ b/configure +@@ -25,10 +25,9 @@ fi + enable() { + opt=`echo "$1" | sed 's/^--[^-]*-//'` + case "$opt" in +- ipv6) ;; +- *) echo "configure: unrecognized option \`$1'" >&2; exit 1;; ++ ipv6) eval enable_$opt=$2 ;; ++ *) echo "configure: unrecognized option \`$1'" >&2;; + esac +- eval enable_$opt=$2 + } + + while [ $# -gt 0 ]; do +@@ -50,7 +49,7 @@ Optional features (all enabled by default if system supports a feature): + EOF + exit 0 + ;; +- *) echo "configure: unknown option \`$1'" >&2; exit 1 ;; ++ *) echo "configure: unknown option \`$1'" >&2;; + esac + shift + done diff --git a/ports/libudns/portfile.cmake b/ports/libudns/portfile.cmake new file mode 100644 index 00000000000000..826c4c6c3cddc0 --- /dev/null +++ b/ports/libudns/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux platform" ON_TARGET "Windows" "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ortclib/udns + REF udns_0_4 + SHA512 4df8def718c75872536d42a757237d6c8e0afce8a53aedd7fea73814dc5cf8b5d6c9ae8f01a8cfc76864aa8293c172f08953a6750a66749ba19a3721bb4cf2ec + HEAD_REF master + PATCHES ignore_unknown_options.patch +) + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + COPY_SOURCE +) + +vcpkg_build_make() +vcpkg_fixup_pkgconfig() +# Install +if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libudns.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() +if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libudns.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif() + +file(INSTALL ${SOURCE_PATH}/udns.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libudns/vcpkg.json b/ports/libudns/vcpkg.json new file mode 100644 index 00000000000000..9d328490cb36b6 --- /dev/null +++ b/ports/libudns/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libudns", + "version-string": "0.4", + "port-version": 3, + "description": "The DNS library, udns, implements thread-safe stub DNS resolver functionality, which may be used both traditional, syncronous way and asyncronously, with application-supplied event loop.", + "homepage": "https://github.com/ortclib/udns" +} diff --git a/ports/libui/003-fix-system-link.patch b/ports/libui/003-fix-system-link.patch new file mode 100644 index 00000000000000..42dd23c0dcca4d --- /dev/null +++ b/ports/libui/003-fix-system-link.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a23b84d..9892dfc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -172,6 +172,12 @@ if(BUILD_SHARED_LIBS) + target_link_libraries(libui + PRIVATE ${_LIBUI_LIBS}) + endif() ++ ++if (APPLE) ++ find_library(Foundation Foundation) ++ find_library(AppKit AppKit) ++ target_link_libraries(libui PUBLIC $<$:${Foundation};${AppKit}>) ++endif() + # TODO INTERFACE libs don't inherit to grandhcildren? + # on Windows the linker for static libraries is different; don't give it the flags + if(BUILD_SHARED_LIBS) diff --git a/ports/libui/CONTROL b/ports/libui/CONTROL deleted file mode 100644 index 919f7a12c0b7c7..00000000000000 --- a/ports/libui/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libui -Version: 2018-11-03-1 -Description: Simple and portable (but not inflexible) native GUI library in C. diff --git a/ports/libui/portfile.cmake b/ports/libui/portfile.cmake index 77c2d44dfaf25a..d975cdfe81ab83 100644 --- a/ports/libui/portfile.cmake +++ b/ports/libui/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO andlabs/libui @@ -9,6 +7,7 @@ vcpkg_from_github( PATCHES "001-fix-cmake.patch" "002-fix-macosx-build.patch" + "003-fix-system-link.patch" ) vcpkg_configure_cmake( @@ -18,11 +17,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_copy_pdbs() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libui TARGET_PATH share/unofficial-libui) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/libui/copyright COPYONLY) - -vcpkg_copy_pdbs() +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/ports/libui/vcpkg.json b/ports/libui/vcpkg.json new file mode 100644 index 00000000000000..5d7ff38eb6924e --- /dev/null +++ b/ports/libui/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libui", + "version-date": "2018-11-03", + "port-version": 2, + "description": "Simple and portable (but not inflexible) native GUI library in C.", + "homepage": "https://github.com/andlabs/libui" +} diff --git a/ports/libunibreak/CONTROL b/ports/libunibreak/CONTROL deleted file mode 100644 index 12e3933229107a..00000000000000 --- a/ports/libunibreak/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libunibreak -Version: 4.2 -Homepage: https://github.com/adah1972/libunibreak -Description: an implementation of the line breaking and word breaking algorithms as described in [Unicode Standard Annex 14] 1 and [Unicode Standard Annex 29] 2. Check the project's [home page] 3 for up-to-date information. diff --git a/ports/libunibreak/portfile.cmake b/ports/libunibreak/portfile.cmake index c054ce6850ad2e..883a58c554dccb 100644 --- a/ports/libunibreak/portfile.cmake +++ b/ports/libunibreak/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO adah1972/libunibreak - REF 15b579aac410b7c11ba596f4a9abbf405a187e34 - SHA512 a46196ad276134dad19fbc4ad49a2f4a4563137e30657b0f06cee9e6b4dab803723ae270f9682c4b8245c9d10297ce44b7bfb08bfa16894552cdb916fc758c02 + REF 8df6ef4ebe5dbd2a49539d05366337ab7fb57ae3 # libunibreak_4_3 + SHA512 791e342dcc0e79e15f578ec93239d53a656f9e1804f9ec8b970cfac2b6c4f3456855513c36f18f8e72a91dac64060abc336e4716d584dbec86e1fb0c91eded69 HEAD_REF master ) diff --git a/ports/libunibreak/vcpkg.json b/ports/libunibreak/vcpkg.json new file mode 100644 index 00000000000000..c1d89b1a2e5d68 --- /dev/null +++ b/ports/libunibreak/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libunibreak", + "version-string": "4.3", + "port-version": 1, + "description": "an implementation of the line breaking and word breaking algorithms as described in [Unicode Standard Annex 14] 1 and [Unicode Standard Annex 29] 2. Check the project's [home page] 3 for up-to-date information.", + "homepage": "https://github.com/adah1972/libunibreak" +} diff --git a/ports/libunifex/allow-warnings.patch b/ports/libunifex/allow-warnings.patch new file mode 100644 index 00000000000000..272624f0667c16 --- /dev/null +++ b/ports/libunifex/allow-warnings.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/unifex_env.cmake b/cmake/unifex_env.cmake +index cb99ae4..9825532 100644 +--- a/cmake/unifex_env.cmake ++++ b/cmake/unifex_env.cmake +@@ -21,8 +21,8 @@ endif() + + if (MSVC) + # warning level 3 and all warnings as errors +- add_compile_options(/W3 /WX) ++ add_compile_options(/W3) + else() + # lots of warnings and all warnings as errors +- add_compile_options(-Wall -Wextra -pedantic -Werror) ++ add_compile_options(-Wall -Wextra -pedantic) + endif() diff --git a/ports/libunifex/fix-install.patch b/ports/libunifex/fix-install.patch new file mode 100644 index 00000000000000..2b454c49c19a6c --- /dev/null +++ b/ports/libunifex/fix-install.patch @@ -0,0 +1,33 @@ +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 3f25517..3c34a54 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -67,10 +67,27 @@ configure_file( + target_include_directories(unifex + PUBLIC + $ +- "${PROJECT_BINARY_DIR}/include") ++ $ ++ $) + + target_compile_features(unifex PUBLIC cxx_std_17) + + if(CXX_COROUTINES_HAVE_COROUTINES) + target_link_libraries(unifex PUBLIC std::coroutines) + endif() ++ ++install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/unifex ++ DESTINATION include ++) ++install(FILES ${PROJECT_BINARY_DIR}/include/unifex/config.hpp ++ DESTINATION include/unifex ++) ++ ++install(TARGETS unifex ++ EXPORT unifex-config ++ DESTINATION lib ++) ++install(EXPORT unifex-config ++ NAMESPACE unofficial:: ++ DESTINATION lib/cmake/unifex ++) diff --git a/ports/libunifex/portfile.cmake b/ports/libunifex/portfile.cmake new file mode 100644 index 00000000000000..f7379fc20c4d18 --- /dev/null +++ b/ports/libunifex/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebookexperimental/libunifex + REF e36b43834329acc75f99910316d3ecec15c0f665 + SHA512 58f738b49d18982fd3916500c78e8090a266738ec4a8ba416b004fa2c7db718db5ce0e27f5e4e22eaddcc27c8d1618bcb2bc080eee1a31d98543e2595ccc1135 + HEAD_REF master + PATCHES + fix-install.patch + allow-warnings.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test BUILD_TESTING + test UNIFEX_BUILD_EXAMPLES +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} +) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME unifex CONFIG_PATH lib/cmake/unifex) +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/include/unifex/config.hpp.in" +) +if(VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/unifex/linux") +elseif(VCPKG_TARGET_IS_LINUX) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/unifex/win32") +endif() diff --git a/ports/libunifex/vcpkg.json b/ports/libunifex/vcpkg.json new file mode 100644 index 00000000000000..82101d6b975265 --- /dev/null +++ b/ports/libunifex/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "libunifex", + "version-date": "2021-08-01", + "port-version": 1, + "description": "Unified Executors", + "homepage": "https://github.com/facebookexperimental/libunifex", + "dependencies": [ + { + "name": "liburing", + "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "test": { + "description": "Build test/example programs", + "dependencies": [ + "gtest" + ] + } + } +} diff --git a/ports/libunistring/copyright b/ports/libunistring/copyright new file mode 100644 index 00000000000000..6bab2feda56f7c --- /dev/null +++ b/ports/libunistring/copyright @@ -0,0 +1,18 @@ +The libunistring library and its header files are dual-licensed under +"the GNU LGPLv3+ or the GNU GPLv2". This means, you can use it under either + - the terms of the GNU Lesser General Public License (LGPL) version 3 or + (at your option) any later version, or + - the terms of the GNU General Public License (GPL) version 2, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2". + +You find the GNU LGPL version 3 in the file COPYING.LIB. This license is +based on the GNU GPL version 3, see file COPYING. + +You can find the GNU GPL version 2 at +. + +Note: This dual license makes it possible for the libunistring library +to be used by packages under GPLv2 or GPLv2+ licenses, in particular. See +the table in . + +The documentation is under another license; see in the documentation. diff --git a/ports/libunistring/fix-for-automake-1.16.4.patch b/ports/libunistring/fix-for-automake-1.16.4.patch new file mode 100644 index 00000000000000..2e9a2ebda0962b --- /dev/null +++ b/ports/libunistring/fix-for-automake-1.16.4.patch @@ -0,0 +1,13 @@ +--- a/m4/init-package-version.m4 ++++ b/m4/init-package-version.m4 +@@ -82,9 +82,9 @@ + [AC_SUBST([PACKAGE], [$1]) + AC_SUBST([VERSION], [$2]) + ]) + m4_define([AM_INIT_AUTOMAKE], + m4_defn([gl_RPL_INIT_AUTOMAKE])) + ]) +-m4_define([gl_INIT_DUMMY], []) ++m4_define([gl_INIT_DUMMY], [dummy]) + AC_DEFUN([gl_RPL_INIT_AUTOMAKE], [ + m4_ifval([$2], diff --git a/ports/libunistring/portfile.cmake b/ports/libunistring/portfile.cmake new file mode 100644 index 00000000000000..e9eef0641d09a9 --- /dev/null +++ b/ports/libunistring/portfile.cmake @@ -0,0 +1,37 @@ +set(LIBUNISTRING_VERSION 0.9.10) +set(LIBUNISTRING_FILENAME libunistring-${LIBUNISTRING_VERSION}.tar.gz) + +if(NOT VCPKG_TARGET_IS_MINGW) + vcpkg_fail_port_install(ON_TARGET "Windows" "UWP") +endif() + +vcpkg_download_distfile(ARCHIVE + URLS + "https://ftp.gnu.org/gnu/libunistring/${LIBUNISTRING_FILENAME}" + "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libunistring/${LIBUNISTRING_FILENAME}" + FILENAME "${LIBUNISTRING_FILENAME}" + SHA512 690082732fbbd47ab4ffbd6f21d85afece0f8e2ded24982f949f4ae52bf0a981b75ea9bc14ab289e0954cde07f31a7a4c2bb65615a8eb5b2bfa65720310b6fc9 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF ${LIBUNISTRING_VERSION} + PATCHES fix-for-automake-1.16.4.patch # automake 1.16.4 uses m4_ifset instead of m4_ifdef +) + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + COPY_SOURCE + OPTIONS + "--with-libiconv-prefix=${CURRENT_INSTALLED_DIR}" +) +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# copyright excerpt from README, to cover dual license under "LGPLv3+ or GPLv2". +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/COPYING.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/libunistring/vcpkg.json b/ports/libunistring/vcpkg.json new file mode 100644 index 00000000000000..585ddca79423ac --- /dev/null +++ b/ports/libunistring/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libunistring", + "version": "0.9.10", + "port-version": 1, + "description": "GNU libunistring provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.", + "homepage": "https://www.gnu.org/software/libunistring/", + "supports": "!windows", + "dependencies": [ + "libiconv" + ] +} diff --git a/ports/liburing/fix-configure.patch b/ports/liburing/fix-configure.patch new file mode 100644 index 00000000000000..92ebf2826f12fd --- /dev/null +++ b/ports/liburing/fix-configure.patch @@ -0,0 +1,35 @@ +diff --git a/configure b/configure +index 3b96cde..56d5cb0 100755 +--- a/configure ++++ b/configure +@@ -18,16 +18,18 @@ for opt do + ;; + --mandir=*) mandir="$optarg" + ;; +- --datadir=*) datadir="$optarg" ++ --datarootdir=*) datadir="$optarg" + ;; + --cc=*) cc="$optarg" + ;; + --cxx=*) cxx="$optarg" + ;; ++ --enable-shared) ENABLE_SHARED=1 ++ ;; ++ --enable-static) ENABLE_SHARED=0 ++ ;; + *) +- echo "ERROR: unknown option $opt" +- echo "Try '$0 --help' for more information" +- exit 1 ++ echo "WARNING: unknown option $opt" + ;; + esac + done +@@ -119,6 +121,7 @@ echo "# Automatically generated by configure - do not modify" > $config_host_mak + printf "# Configured with:" >> $config_host_mak + printf " '%s'" "$0" "$@" >> $config_host_mak + echo >> $config_host_mak ++echo "ENABLE_SHARED=${ENABLE_SHARED}" >> $config_host_mak + + do_cxx() { + # Run the compiler, capturing its output to the log. diff --git a/ports/liburing/fix-spec-version.patch b/ports/liburing/fix-spec-version.patch new file mode 100644 index 00000000000000..9acb1fc40434bb --- /dev/null +++ b/ports/liburing/fix-spec-version.patch @@ -0,0 +1,11 @@ +diff --git a/liburing.spec b/liburing.spec +index fa4d970..8607074 100644 +--- a/liburing.spec ++++ b/liburing.spec +@@ -1,5 +1,5 @@ + Name: liburing +-Version: 0.7 ++Version: 2.0 + Release: 1%{?dist} + Summary: Linux-native io_uring I/O access library + License: (GPLv2 with exceptions and LGPLv2+) or MIT diff --git a/ports/liburing/portfile.cmake b/ports/liburing/portfile.cmake new file mode 100644 index 00000000000000..304bef5ecc676a --- /dev/null +++ b/ports/liburing/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(ON_TARGET "windows" "uwp" "osx" "ios" "android") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO axboe/liburing + REF liburing-2.0 + SHA512 8a7b37600246d44a94d3fed1ca4bb60e76f9ddc60bd3c237e600b60e77961a1125c8a1f230cb7569f959acf10b68b91aafb4935c1c2fd13d5df7373b374e47f5 + HEAD_REF master + PATCHES + fix-spec-version.patch # update version value for pkgconfig(.pc) files + fix-configure.patch # ignore unsupported options, handle ENABLE_SHARED +) + +# note: check ${SOURCE_PATH}/liburing.spec before updating configure options +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + COPY_SOURCE + NO_DEBUG +) +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/usage + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# note: {SOURCE_PATH}/src/Makefile makes liburing.so from liburing.a. +# For dynamic, remove intermediate file liburing.a when install is finished. +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/liburing.a + ${CURRENT_PACKAGES_DIR}/lib/liburing.a + ) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man) diff --git a/ports/liburing/usage b/ports/liburing/usage new file mode 100644 index 00000000000000..36a7188959a198 --- /dev/null +++ b/ports/liburing/usage @@ -0,0 +1,6 @@ +The package liburing can be imported via CMake FindPkgConfig module: + + include(FindPkgConfig) + pkg_check_modules(liburing REQUIRED IMPORTED_TARGET GLOBAL liburing>=2.0) + + target_link_libraries(main PRIVATE PkgConfig::liburing) diff --git a/ports/liburing/vcpkg.json b/ports/liburing/vcpkg.json new file mode 100644 index 00000000000000..e2bb1b53e23a5f --- /dev/null +++ b/ports/liburing/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "liburing", + "version": "2.0", + "description": "Linux-native io_uring I/O access library", + "homepage": "https://github.com/axboe/liburing", + "supports": "linux" +} diff --git a/ports/libusb-win32/CONTROL b/ports/libusb-win32/CONTROL deleted file mode 100644 index a85b6a11cbe121..00000000000000 --- a/ports/libusb-win32/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libusb-win32 -Version: 1.2.6.0-2 -Homepage: https://sourceforge.net/projects/libusb-win32 -Description: Allows user space applications to access many USB device on Windows. diff --git a/ports/libusb-win32/portfile.cmake b/ports/libusb-win32/portfile.cmake index df12a91795c651..1cca3bedb627b0 100644 --- a/ports/libusb-win32/portfile.cmake +++ b/ports/libusb-win32/portfile.cmake @@ -1,19 +1,15 @@ -include(vcpkg_common_functions) - -if (VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "Error: only Windows Desktop builds are currently supported.") -endif() +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX") set(LIBUSB_VERSION 1.2.6.0) set(LIBUSB_HASH 972438b7465a22882bc91a1238291240ee3cdb09f374454a027d003b150656d4c262553104f74418bb49b4a7ca2f1a4f72d20e689fa3a7728881bafc876267f4) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libusb-win32-src-${LIBUSB_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/${LIBUSB_VERSION}/libusb-win32-src-${LIBUSB_VERSION}.zip/download" - FILENAME "libusb-win32-${LIBUSB_VERSION}.zip" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO libusb-win32/libusb-win32-releases + REF ${LIBUSB_VERSION} + FILENAME "libusb-win32-src-${LIBUSB_VERSION}.zip" SHA512 ${LIBUSB_HASH} ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/libusb-win32/vcpkg.json b/ports/libusb-win32/vcpkg.json new file mode 100644 index 00000000000000..462fd2322f6cc2 --- /dev/null +++ b/ports/libusb-win32/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libusb-win32", + "version-string": "1.2.6.0", + "port-version": 7, + "description": "Allows user space applications to access many USB device on Windows.", + "homepage": "https://sourceforge.net/projects/libusb-win32", + "supports": "windows" +} diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL deleted file mode 100644 index d8b7d7042cdfe6..00000000000000 --- a/ports/libusb/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libusb -Version: 1.0.22-4 -Homepage: https://github.com/libusb/libusb -Description: a cross-platform library to access USB devices diff --git a/ports/libusb/fix_c2001.patch b/ports/libusb/fix_c2001.patch deleted file mode 100644 index 38c4774a1638fd..00000000000000 --- a/ports/libusb/fix_c2001.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/msvc/libusb_dll_2015.vcxproj b/msvc/libusb_dll_2015.vcxproj -index ce562f1..e5a19fd 100644 ---- a/msvc/libusb_dll_2015.vcxproj -+++ b/msvc/libusb_dll_2015.vcxproj -@@ -53,10 +53,18 @@ - ProgramDatabase - Disabled - MultiThreadedDebugDLL -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - NDEBUG;%(PreprocessorDefinitions) - MultiThreadedDLL -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - libusb-1.0.rc;%(EmbedManagedResourceFile) -diff --git a/msvc/libusb_dll_2017.vcxproj b/msvc/libusb_dll_2017.vcxproj -index 8311300..f635aed 100644 ---- a/msvc/libusb_dll_2017.vcxproj -+++ b/msvc/libusb_dll_2017.vcxproj -@@ -53,10 +53,18 @@ - ProgramDatabase - Disabled - MultiThreadedDebugDLL -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - NDEBUG;%(PreprocessorDefinitions) - MultiThreadedDLL -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - libusb-1.0.rc;%(EmbedManagedResourceFile) -diff --git a/msvc/libusb_static_2015.vcxproj b/msvc/libusb_static_2015.vcxproj -index a182171..ce4cc66 100644 ---- a/msvc/libusb_static_2015.vcxproj -+++ b/msvc/libusb_static_2015.vcxproj -@@ -54,10 +54,18 @@ - ProgramDatabase - Disabled - MultiThreadedDebug -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - NDEBUG;%(PreprocessorDefinitions) - MultiThreaded -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - $(OutDir)libusb-1.0.lib -diff --git a/msvc/libusb_static_2017.vcxproj b/msvc/libusb_static_2017.vcxproj -index 1341693..8908450 100644 ---- a/msvc/libusb_static_2017.vcxproj -+++ b/msvc/libusb_static_2017.vcxproj -@@ -54,10 +54,18 @@ - ProgramDatabase - Disabled - MultiThreadedDebug -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - NDEBUG;%(PreprocessorDefinitions) - MultiThreaded -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - $(OutDir)libusb-1.0.lib diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index 9ab38c869fb516..3aed72d2a880f5 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -1,26 +1,20 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") -if (VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "Error: the port is unsupported on your platform. Please open an issue on github.com/Microsoft/vcpkg to request a fix") -endif() - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(VCPKG_TARGET_IS_LINUX) message("${PORT} currently requires the following tools and libraries from the system package manager:\n autoreconf\n libudev\n\nThese can be installed on Ubuntu systems via apt-get install autoreconf libudev-dev") endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libusb/libusb - REF v1.0.22 - SHA512 b1fed66aafa82490889ee488832c6884a95d38ce7b28fb7c3234b9bce1f749455d7b91cde397a0abc25101410edb13ab2f9832c59aa7b0ea8c19ba2cf4c63b00 + REF c6a35c56016ea2ab2f19115d2ea1e85e0edae155 # v1.0.24 + SHA512 985c020d9ae6f7135e3bfee68dddcf70921481db3d10e420f55d5ee9534f7fe7be6a2a31ee73a3b282b649fcc36da4fed848e0bd0410c20eaf1deb9a8e3086e8 HEAD_REF master - PATCHES - fix_c2001.patch ) if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") - set(MSVS_VERSION 2017) #they are abi compatible, so it should work + set(MSVS_VERSION 2019) elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(MSVS_VERSION 2017) else() @@ -45,78 +39,24 @@ if(VCPKG_TARGET_IS_WINDOWS) endif() endif() + # The README.md file in the archive is a symlink to README + # which causes issues with the windows MSBUILD process + file(REMOVE ${SOURCE_PATH}/README.md) + vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj LICENSE_SUBPATH COPYING ) + file(INSTALL ${SOURCE_PATH}/libusb/libusb.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/libusb-1.0) else() - set(BASH /bin/bash) - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - # Copy sources - message(STATUS "Copying source files...") - file(GLOB PORT_SOURCE_FILES ${SOURCE_PATH}/*) - foreach(SOURCE_FILE ${PORT_SOURCE_FILES}) - file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - endforeach() - message(STATUS "Copying source files... done") - # Configure release - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"./autogen.sh\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"./configure --prefix=${CURRENT_PACKAGES_DIR}\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - # Copy sources - message(STATUS "Copying source files...") - file(GLOB PORT_SOURCE_FILES ${SOURCE_PATH}/*) - foreach(SOURCE_FILE ${PORT_SOURCE_FILES}) - file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - endforeach() - message(STATUS "Copying source files... done") - # Configure debug - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"./autogen.sh\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"./configure --prefix=${CURRENT_PACKAGES_DIR}/debug\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - # Build release - message(STATUS "Package ${TARGET_TRIPLET}-rel") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"make install\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - message(STATUS "Package ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - # Build debug - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"make install\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") - endif() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + ) + vcpkg_install_make() endif() -file(INSTALL - ${SOURCE_PATH}/libusb/libusb.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include/libusb-1.0 -) - +configure_file(${CURRENT_PORT_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) +configure_file(${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libusb/usage b/ports/libusb/usage new file mode 100644 index 00000000000000..de236d46ad389c --- /dev/null +++ b/ports/libusb/usage @@ -0,0 +1,5 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: + + find_package(@PORT@ CONFIG REQUIRED) + target_include_directories(main PRIVATE ${LIBUSB_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${LIBUSB_LIBRARIES}) diff --git a/ports/libusb/vcpkg-cmake-wrapper.cmake b/ports/libusb/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..61f9d54bacf44a --- /dev/null +++ b/ports/libusb/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,14 @@ +include(SelectLibraryConfigurations) + +find_path(LIBUSB_INCLUDE_DIR libusb.h PATH_SUFFIXES libusb-1.0) +find_library(LIBUSB_LIBRARY_DEBUG NAMES libusb-1.0 usb-1.0 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(LIBUSB_LIBRARY_RELEASE NAMES libusb-1.0 usb-1.0 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(LIBUSB) + +set(LIBUSB_INCLUDE_DIRS ${LIBUSB_INCLUDE_DIR}) +set(LIBUSB_LIBRARIES ${LIBUSB_LIBRARY}) + +if (@VCPKG_TARGET_IS_LINUX@) + list(APPEND LIBUSB_LIBRARIES udev) +endif() diff --git a/ports/libusb/vcpkg.json b/ports/libusb/vcpkg.json new file mode 100644 index 00000000000000..07bbd2d8b4818a --- /dev/null +++ b/ports/libusb/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libusb", + "version": "1.0.24", + "port-version": 5, + "description": "a cross-platform library to access USB devices", + "homepage": "https://github.com/libusb/libusb", + "supports": "!uwp" +} diff --git a/ports/libusbmuxd/CMakeLists.txt b/ports/libusbmuxd/CMakeLists.txt new file mode 100644 index 00000000000000..254a70d7e4baa6 --- /dev/null +++ b/ports/libusbmuxd/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 3.0) +project(libusbmuxd C) + +# find dependencies +find_path(libplist_INCLUDES plist.h PATH_SUFFIXES plist) +set(libplist_INCLUDES ${libplist_INCLUDES}/../) +find_library(libplist NAMES plist libplist plist-2.0 libplist-2.0 REQUIRED) + +# ready to create library +file(GLOB_RECURSE IDVCACTV_TOOLS_HDR common/*.h) +file(GLOB_RECURSE IDVCACTV_TOOLS_SRC common/*.c) + +file(GLOB_RECURSE IDVCACTV_PUBLIC_HDR include/*.h) +file(GLOB_RECURSE IDVCACTV_SRC src/*.c) + +add_library(libusbmuxd ${IDVCACTV_TOOLS_HDR} ${IDVCACTV_TOOLS_SRC} ${IDVCACTV_SRC} ${IDVCACTV_PUBLIC_HDR}) +target_include_directories(libusbmuxd PRIVATE ${libplist_INCLUDES} include common) +target_compile_definitions(libusbmuxd PRIVATE -DPACKAGE_STRING="1.2.77") +if (WIN32) + target_compile_definitions(libusbmuxd PRIVATE -DWIN32) + target_link_libraries(libusbmuxd PRIVATE Ws2_32) +endif() +target_link_libraries(libusbmuxd PRIVATE ${libplist}) + +# install +install( + TARGETS libusbmuxd + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +set(LIBPLIST_VERSION 2.0) +set(PACKAGE_NAME libusbmuxd) +set(PACKAGE_VERSION 2.0) +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix \${prefix}) +set(libdir \${prefix}/lib) +set(includedir \${prefix}/../include) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/libusbmuxd-2.0.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd-2.0.pc + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd-2.0.pc + DESTINATION lib/pkgconfig +) + +install(FILES ${IDVCACTV_PUBLIC_HDR} DESTINATION include) \ No newline at end of file diff --git a/ports/libusbmuxd/CONTROL b/ports/libusbmuxd/CONTROL deleted file mode 100644 index 05faa6a1c66d75..00000000000000 --- a/ports/libusbmuxd/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libusbmuxd -Version: 1.2.77 -Description: A client library to multiplex connections from and to iOS devices -Build-Depends: libplist diff --git a/ports/libusbmuxd/dllexport.patch b/ports/libusbmuxd/dllexport.patch deleted file mode 100644 index 15996ec01433e8..00000000000000 --- a/ports/libusbmuxd/dllexport.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/include/usbmuxd.h b/include/usbmuxd.h -index 5a3b0c0..aa1c8d9 100644 ---- a/include/usbmuxd.h -+++ b/include/usbmuxd.h -@@ -24,7 +24,7 @@ - #define USBMUXD_H - #include - --#ifdef _MSC_VER -+#if defined(_MSC_VER) && defined(USBMUXD_EXPORTS) - #define USBMUXD_API_MSC __declspec( dllexport ) - #else - #ifdef HAVE_FVISIBILITY -diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c -index b94c83c..1902a55 100644 ---- a/src/libusbmuxd.c -+++ b/src/libusbmuxd.c -@@ -34,7 +34,7 @@ - #include - #include - --#ifdef _MSC_VER -+#if defined(_MSC_VER) && defined(USBMUXD_EXPORTS) - #define USBMUXD_API __declspec( dllexport ) - #else - #define USBMUXD_API diff --git a/ports/libusbmuxd/fix-win-build.patch b/ports/libusbmuxd/fix-win-build.patch new file mode 100644 index 00000000000000..a1b7f2ef23faec --- /dev/null +++ b/ports/libusbmuxd/fix-win-build.patch @@ -0,0 +1,20 @@ +diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c +index e85cf4a..35ed1b5 100644 +--- a/src/libusbmuxd.c ++++ b/src/libusbmuxd.c +@@ -86,6 +86,15 @@ static char* stpncpy(char *dst, const char *src, size_t len) + } + #endif + ++#ifdef WIN32 ++int strcasecmp(char *s1, char *s2) ++{ ++ while (toupper((unsigned char)*s1) == toupper((unsigned char)*s2++)) ++ if (*s1++ == '\0') return 0; ++ return(toupper((unsigned char)*s1) - toupper((unsigned char)*--s2)); ++} ++#endif ++ + #include + #define PLIST_CLIENT_VERSION_STRING PACKAGE_STRING + #define PLIST_LIBUSBMUX_VERSION 3 diff --git a/ports/libusbmuxd/portfile.cmake b/ports/libusbmuxd/portfile.cmake index 9a03b5e5389cff..5ad0cb01fa4095 100644 --- a/ports/libusbmuxd/portfile.cmake +++ b/ports/libusbmuxd/portfile.cmake @@ -1,29 +1,26 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) +vcpkg_fail_port_install( ON_TARGET "uwp" "linux" "osx") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libimobiledevice-win32/libusbmuxd - REF a4422aa65f3635d99c3b80fad18f093ef3c5f653 - SHA512 9446bbcd6b901e6183f6e86d7fe7301c01182ae5b9330182fbca529bb1db54250cd6012256a420d457a7243388811c94bb2ecf5a0747238714d00b3850e60e8e + REF ac86b23f57879b8b702f3712ba66729008d059a3 # v1.2.219 + SHA512 ced85088bc6ebb416ccb635d6b4e79662fb34f427d869b64b61847e5fde7b4ae094cebb1f7916d9387c314aeb84106a618fbd7497dc4b36151b236dcb55bd0e4 HEAD_REF msvc-master - PATCHES dllexport.patch + PATCHES fix-win-build.patch ) -set(ENV{_CL_} "$ENV{_CL_} /GL-") -set(ENV{_LINK_} "$ENV{_LINK_} /LTCG:OFF") +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) -vcpkg_install_msbuild( +vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH libusbmuxd.sln - INCLUDES_SUBPATH include - LICENSE_SUBPATH COPYING - USE_VCPKG_INTEGRATION - ALLOW_ROOT_INCLUDES + PREFER_NINJA ) -file(REMOVE "${CURRENT_PACKAGES_DIR}/include/Makefile.am") -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() \ No newline at end of file +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libusbmuxd/vcpkg.json b/ports/libusbmuxd/vcpkg.json new file mode 100644 index 00000000000000..f9bfb7f9fc1bf6 --- /dev/null +++ b/ports/libusbmuxd/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libusbmuxd", + "version-string": "1.2.219", + "port-version": 1, + "description": "A client library to multiplex connections from and to iOS devices", + "supports": "!(uwp | linux | osx)", + "dependencies": [ + "libplist" + ] +} diff --git a/ports/libuuid/CMakeLists.txt b/ports/libuuid/CMakeLists.txt index ff1edd0ef35253..9f4bb0605ce88a 100644 --- a/ports/libuuid/CMakeLists.txt +++ b/ports/libuuid/CMakeLists.txt @@ -29,7 +29,35 @@ endif() install( TARGETS uuid + EXPORT uuid_targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) + +include(CMakePackageConfigHelpers) +set(PACKAGE_CONFIG_FILE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libuuid-config.cmake") +set(INSTALL_CONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-libuuid") + +configure_package_config_file(unofficial-libuuid-config.cmake.in + "${PACKAGE_CONFIG_FILE}" + INSTALL_DESTINATION "${INSTALL_CONFIG_DIR}" +) + +export(EXPORT uuid_targets + NAMESPACE unofficial::UUID:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libuuid-targets.cmake" +) + +install(EXPORT uuid_targets + NAMESPACE unofficial::UUID:: + FILE unofficial-libuuid-targets.cmake + DESTINATION "${INSTALL_CONFIG_DIR}" +) + +install( + FILES + "${PACKAGE_CONFIG_FILE}" + DESTINATION + "${INSTALL_CONFIG_DIR}" +) diff --git a/ports/libuuid/CONTROL b/ports/libuuid/CONTROL deleted file mode 100644 index 265fdeebf81b42..00000000000000 --- a/ports/libuuid/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libuuid -Version: 1.0.3-2 -Description: Universally unique id library diff --git a/ports/libuuid/portfile.cmake b/ports/libuuid/portfile.cmake index c5cd287f661a22..3e29431f4b14fe 100644 --- a/ports/libuuid/portfile.cmake +++ b/ports/libuuid/portfile.cmake @@ -1,21 +1,18 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports unix platform" ON_TARGET "Windows") -if (NOT ((VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin"))) - message(FATAL_ERROR "libuuid currently only supports unix platforms.") -endif() +set(LIBUUID_VERSION 1.0.3) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libuuid-1.0.3) -vcpkg_download_distfile(ARCHIVE - URLS "http://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz" - FILENAME libuuid-1.0.3.tar.gz +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO libuuid + FILENAME "libuuid-${LIBUUID_VERSION}.tar.gz" SHA512 77488caccc66503f6f2ded7bdfc4d3bc2c20b24a8dc95b2051633c695e99ec27876ffbafe38269b939826e1fdb06eea328f07b796c9e0aaca12331a787175507 ) -vcpkg_extract_source_archive(${ARCHIVE}) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/config.linux.h + ${CMAKE_CURRENT_LIST_DIR}/unofficial-libuuid-config.cmake.in DESTINATION ${SOURCE_PATH} ) @@ -26,8 +23,19 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +set(prefix ${CURRENT_INSTALLED_DIR}) +set(exec_prefix \$\{prefix\}) +set(libdir \$\{exec_prefix\}/lib) +set(includedir \$\{prefix\}/include) +configure_file(${SOURCE_PATH}/uuid.pc.in ${SOURCE_PATH}/uuid.pc @ONLY) +file(INSTALL ${SOURCE_PATH}/uuid.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(INSTALL ${SOURCE_PATH}/uuid.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/unofficial-libuuid TARGET_PATH share/unofficial-libuuid) +vcpkg_fixup_pkgconfig() + file(INSTALL ${SOURCE_PATH}/COPYING - DESTINATION ${CURRENT_PACKAGES_DIR}/share/libuuid RENAME copyright) + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/libuuid/unofficial-libuuid-config.cmake.in b/ports/libuuid/unofficial-libuuid-config.cmake.in new file mode 100644 index 00000000000000..ed4900ceaef5a1 --- /dev/null +++ b/ports/libuuid/unofficial-libuuid-config.cmake.in @@ -0,0 +1,3 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libuuid-targets.cmake") diff --git a/ports/libuuid/vcpkg.json b/ports/libuuid/vcpkg.json new file mode 100644 index 00000000000000..0f88cf666f9721 --- /dev/null +++ b/ports/libuuid/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libuuid", + "version": "1.0.3", + "port-version": 8, + "description": "Universally unique id library", + "homepage": "https://sourceforge.net/projects/libuuid", + "supports": "linux | osx" +} diff --git a/ports/libuv/CMakeLists.txt b/ports/libuv/CMakeLists.txt index b51630d78edf86..7d2c38bdbb307b 100644 --- a/ports/libuv/CMakeLists.txt +++ b/ports/libuv/CMakeLists.txt @@ -32,6 +32,7 @@ file(GLOB UV_SOURCES_LINUX src/unix/procfs-exepath.c src/unix/sysinfo-loadavg.c src/unix/sysinfo-memory.c + src/unix/epoll.c ) file(GLOB UV_SOURCES_DARWIN src/unix/proctitle.c @@ -54,7 +55,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsSt add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") target_link_libraries(libuv PRIVATE iphlpapi psapi shell32 userenv ws2_32) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") +elseif(APPLE) add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_DARWIN}) elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_FREEBSD}) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL deleted file mode 100644 index f50e6fbeac149c..00000000000000 --- a/ports/libuv/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libuv -Version: 1.29.1 -Homepage: https://github.com/libuv/libuv -Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index ba7cdfeb00a1fb..6c2c384bb64b3c 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -1,39 +1,39 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF d16e6094e1eb3b0b5981ef1dd7e03ec4d466944d - SHA512 338d25fec26ab69d300141086de825edabc5e65c50b6d9cf0e2f8f1937a930e4ecf4460ba2789cef64a85ad4a63c9b5f2a482ee2498c542f73e5915bbff6170f + REF 6ce14710da7079eb248868171f6343bc409ea3a4 # v1.42.0 + SHA512 305b0e8beb9372d22b767f1f792c6351d4b2d747b31cda95a4657cfca101806a17dd0bfab2039d22e29387c9d5ee376fe1b22d63aba1baf0d88817cbcacd97b8 HEAD_REF v1.x ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS_DEBUG -DUV_SKIP_HEADERS=ON ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-libuv TARGET_PATH share/unofficial-libuv) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libuv CONFIG_PATH share/unofficial-libuv) vcpkg_copy_pdbs() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + configure_file( - ${CMAKE_CURRENT_LIST_DIR}/unofficial-libuv-config.in.cmake - ${CURRENT_PACKAGES_DIR}/share/unofficial-libuv/unofficial-libuv-config.cmake + "${CMAKE_CURRENT_LIST_DIR}/unofficial-libuv-config.in.cmake" + "${CURRENT_PACKAGES_DIR}/share/unofficial-libuv/unofficial-libuv-config.cmake" @ONLY ) -file(READ ${CURRENT_PACKAGES_DIR}/include/uv.h UV_H) +file(READ "${CURRENT_PACKAGES_DIR}/include/uv.h" UV_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") string(REPLACE "defined(USING_UV_SHARED)" "1" UV_H "${UV_H}") else() string(REPLACE "defined(USING_UV_SHARED)" "0" UV_H "${UV_H}") + configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/uv.h "${UV_H}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/uv.h" "${UV_H}") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libuv) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libuv/LICENSE ${CURRENT_PACKAGES_DIR}/share/libuv/copyright) diff --git a/ports/libuv/vcpkg-cmake-wrapper.cmake b/ports/libuv/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..d95350a6d4c7b9 --- /dev/null +++ b/ports/libuv/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,16 @@ +_find_package(${ARGS}) + +if(WIN32) + list(APPEND LibUV_LIBRARIES iphlpapi psapi shell32 userenv ws2_32) + if(TARGET LibUV::LibUV) + set_property(TARGET LibUV::LibUV APPEND PROPERTY INTERFACE_LINK_LIBRARIES iphlpapi psapi shell32 userenv ws2_32) + endif() +endif() +include(CMakeFindDependencyMacro) +find_dependency(Threads) +list(APPEND LibUV_LIBRARIES Threads::Threads) +if(TARGET LibUV::LibUV) + set_property(TARGET LibUV::LibUV APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads) +endif() + + diff --git a/ports/libuv/vcpkg.json b/ports/libuv/vcpkg.json new file mode 100644 index 00000000000000..5033ece2a1009e --- /dev/null +++ b/ports/libuv/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "libuv", + "version-semver": "1.42.0", + "port-version": 1, + "description": "libuv is a multi-platform support library with a focus on asynchronous I/O.", + "homepage": "https://github.com/libuv/libuv", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libuvc/build_fix.patch b/ports/libuvc/build_fix.patch new file mode 100644 index 00000000000000..3c5bfcd44cdac0 --- /dev/null +++ b/ports/libuvc/build_fix.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f3c8116..b9a6d38 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,10 +39,10 @@ set(SOURCES + src/misc.c + ) + +-find_package(LibUSB) ++find_package(libusb CONFIG REQUIRED) + + # JpegPkg name to differ from shipped with CMake +-find_package(JpegPkg QUIET) ++find_package(JPEG REQUIRED) + if(JPEG_FOUND) + message(STATUS "Building libuvc with JPEG support.") + set(LIBUVC_HAS_JPEG TRUE) +@@ -107,9 +107,10 @@ foreach(target_name IN LISTS UVC_TARGETS) + $ + $ + ) ++ target_include_directories(${target_name} PRIVATE ${LIBUSB_INCLUDE_DIRS}) + target_link_libraries(${target_name} + # libusb-1.0 used internally so we link to it privately. +- PRIVATE LibUSB::LibUSB ++ PRIVATE ${LIBUSB_LIBRARIES} + ) + if(JPEG_FOUND) + target_link_libraries(${target_name} +diff --git a/libuvcConfig.cmake b/libuvcConfig.cmake +index b9887ea..e8f09dc 100644 +--- a/libuvcConfig.cmake ++++ b/libuvcConfig.cmake +@@ -10,8 +10,8 @@ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED) + list(APPEND extraArgs REQUIRED) + endif() + +-find_package(JpegPkg ${extraArgs}) +-find_package(LibUSB ${extraArgs}) ++include(CMakeFindDependencyMacro) ++find_dependency(JPEG ${extraArgs}) + include("${CMAKE_CURRENT_LIST_DIR}/libuvcTargets.cmake") + + set(libuvc_FOUND TRUE) diff --git a/ports/libuvc/portfile.cmake b/ports/libuvc/portfile.cmake new file mode 100644 index 00000000000000..1e76adcd916a63 --- /dev/null +++ b/ports/libuvc/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libuvc/libuvc + REF c612d4509eb0ff19ce414abc3dca18d0f6263a84 + SHA512 df3f23463728e8ffd69dc52e251ea2610ea8df32b02f6d26dd2a6910cf217650245bb1a11e67be61df875c6992d592c9cb17675d914997bd72c9fe7eb5b65c32 + HEAD_REF master + PATCHES build_fix.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(BUILD_TARGET "Shared") +else() + set(BUILD_TARGET "Static") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCMAKE_BUILD_TARGET=${BUILD_TARGET} + -DBUILD_EXAMPLE=OFF +) +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(PACKAGE_NAME libuvc CONFIG_PATH lib/cmake/libuvc) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libuvc/vcpkg.json b/ports/libuvc/vcpkg.json new file mode 100644 index 00000000000000..ee9766b69ebff1 --- /dev/null +++ b/ports/libuvc/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "libuvc", + "version-date": "2020-11-24", + "port-version": 2, + "description": "a cross-platform library for USB video devices", + "homepage": "https://github.com/libuvc/libuvc", + "supports": "linux", + "dependencies": [ + "libjpeg-turbo", + "libusb", + "libusb", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/libvmdk/CMakeLists.txt b/ports/libvmdk/CMakeLists.txt new file mode 100644 index 00000000000000..1fb043d905fbdd --- /dev/null +++ b/ports/libvmdk/CMakeLists.txt @@ -0,0 +1,84 @@ +cmake_minimum_required(VERSION 3.12) + +project(libvmdk C) + +find_package(ZLIB REQUIRED) + +if(MSVC) + add_compile_definitions(_CRT_SECURE_NO_DEPRECATE) + add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_compile_definitions(HAVE_LOCAL_LIBCAES) +add_compile_definitions(HAVE_LOCAL_LIBCERROR) +add_compile_definitions(HAVE_LOCAL_LIBCTHREADS) +add_compile_definitions(HAVE_LOCAL_LIBCDATA) +add_compile_definitions(HAVE_LOCAL_LIBCLOCALE) +add_compile_definitions(HAVE_LOCAL_LIBCNOTIFY) +add_compile_definitions(HAVE_LOCAL_LIBCSPLIT) +add_compile_definitions(HAVE_LOCAL_LIBCFILE) +add_compile_definitions(HAVE_LOCAL_LIBCPATH) +add_compile_definitions(HAVE_LOCAL_LIBUNA) +add_compile_definitions(HAVE_LOCAL_LIBBFIO) +add_compile_definitions(HAVE_LOCAL_LIBFCACHE) +add_compile_definitions(HAVE_LOCAL_LIBFDATA) +add_compile_definitions(HAVE_LOCAL_LIBFVALUE) +add_compile_definitions(ZLIB_DLL) + +if(UNIX) + configure_file(common/config.h.in common/config.h) + add_compile_definitions(HAVE_CONFIG_H) + add_compile_definitions(LOCALEDIR="/usr/share/locale") +endif() + +if(MSVC) + add_compile_definitions(LIBVMDK_DLL_EXPORT) + set(LIB_RC libvmdk/libvmdk.rc) +endif() + + +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) + +# Add CMake find_package() integration +set(PROJECT_TARGET_NAME "${PROJECT_NAME}") +set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") +set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/generated/${PROJECT_TARGET_NAME}Config.cmake") +set(TARGETS_EXPORT_NAME "${PROJECT_TARGET_NAME}Targets") +set(NAMESPACE "libvmdk::") + +# Source files +file(GLOB LIB_SRC lib*/*.c) + +# Headers +file(GLOB LIB_INST_HEADERS include/libvmdk/*.h) + +add_library(${PROJECT_NAME} ${LIB_SRC} ${LIB_RC}) + +target_include_directories(${PROJECT_NAME} PRIVATE ./include ./common) +target_include_directories(${PROJECT_NAME} PRIVATE ./libbfio ./libcdata ./libcerror ./libcfile ./libclocale) +target_include_directories(${PROJECT_NAME} PRIVATE ./libcnotify ./libcpath ./libcsplit ./libcthreads) +target_include_directories(${PROJECT_NAME} PRIVATE ./libfcache ./libfdata ./libfvalue ./libuna) + +target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${TARGETS_EXPORT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + INCLUDES DESTINATION include) + +install(FILES ${LIB_INST_HEADERS} DESTINATION include/libvmdk) +install(FILES include/libvmdk.h DESTINATION include) + + +# Generate and install libvmdkConfig.cmake +configure_package_config_file("Config.cmake.in" "${PROJECT_CONFIG}" INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}") +install(FILES "${PROJECT_CONFIG}" DESTINATION "${CONFIG_INSTALL_DIR}") + +# Generate and install libvmdkTargets*.cmake +install(EXPORT ${TARGETS_EXPORT_NAME} + NAMESPACE ${NAMESPACE} + DESTINATION "${CONFIG_INSTALL_DIR}") + diff --git a/ports/libvmdk/Config.cmake.in b/ports/libvmdk/Config.cmake.in new file mode 100644 index 00000000000000..bd6bd4532b6282 --- /dev/null +++ b/ports/libvmdk/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/ports/libvmdk/portfile.cmake b/ports/libvmdk/portfile.cmake new file mode 100644 index 00000000000000..505d5e68c4f947 --- /dev/null +++ b/ports/libvmdk/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(LIB_VERSION 20200926) +set(LIB_FILENAME libvmdk-alpha-${LIB_VERSION}.tar.gz) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/libyal/libvmdk/releases/download/${LIB_VERSION}/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 e70c42580dc58ad0a6459fe461504a8ef128f8d5df9d500f84f316e627232606f22eb4906fc1debc3e75e71daa6a07951af80822695de13d5e466adda4cfd5e0 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIB_VERSION} +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libvmdk" TARGET_PATH "share/libvmdk") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/libvmdk/vcpkg.json b/ports/libvmdk/vcpkg.json new file mode 100644 index 00000000000000..e8211d6c62e367 --- /dev/null +++ b/ports/libvmdk/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libvmdk", + "version-string": "20200926", + "port-version": 1, + "description": "Library and tools to access the VMware Virtual Disk (VMDK) format", + "homepage": "https://github.com/libyal/libvmdk", + "supports": "!uwp", + "dependencies": [ + "gettext", + "zlib" + ] +} diff --git a/ports/libvorbis/0002-Allow-deprecated-functions.patch b/ports/libvorbis/0002-Allow-deprecated-functions.patch deleted file mode 100644 index ea1d07e3998672..00000000000000 --- a/ports/libvorbis/0002-Allow-deprecated-functions.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 2043294..e273393 100644 ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -61,6 +61,9 @@ if(MSVC) - list(APPEND VORBIS_SOURCES ../win32/vorbis.def) - list(APPEND VORBISENC_SOURCES ../win32/vorbisenc.def) - list(APPEND VORBISFILE_SOURCES ../win32/vorbisfile.def) -+ add_definitions(-D_CRT_SECURE_NO_WARNINGS) -+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE) -+ add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) - endif() - - include_directories(../include) diff --git a/ports/libvorbis/0002-Fixup-pkgconfig-libs.patch b/ports/libvorbis/0002-Fixup-pkgconfig-libs.patch new file mode 100644 index 00000000000000..85508f16f557f9 --- /dev/null +++ b/ports/libvorbis/0002-Fixup-pkgconfig-libs.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f377c428..07530304 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,6 +60,9 @@ message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}") + # Find math library + + check_library_exists(m floor "" HAVE_LIBM) ++if(HAVE_LIBM) ++ set(VORBIS_LIBS "-lm") ++endif() + + # Find ogg dependency + find_package(Ogg REQUIRED) + diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL deleted file mode 100644 index 33a30095753f8a..00000000000000 --- a/ports/libvorbis/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libvorbis -Version: 1.3.6-9eadecc-3 -Homepage: https://github.com/xiph/vorbis -Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format. -Build-Depends: libogg diff --git a/ports/libvorbis/ogg.patch b/ports/libvorbis/ogg.patch deleted file mode 100644 index 323e2c7e2d3bd9..00000000000000 --- a/ports/libvorbis/ogg.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index bbc045ba..a23630f5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -57,10 +57,10 @@ if(NOT OGG_ROOT) - find_package(PkgConfig QUIET) - pkg_check_modules(PC_OGG QUIET ogg) - find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${PC_OGG_INCLUDE_DIRS} PATH_SUFFIXES ogg) -- find_library(OGG_LIBRARIES NAMES ogg HINTS ${PC_OGG_LIBRARY_DIRS}) -+ find_library(OGG_LIBRARIES NAMES ogg libogg HINTS ${PC_OGG_LIBRARY_DIRS}) - else() - find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${OGG_ROOT}/include PATH_SUFFIXES ogg) -- find_library(OGG_LIBRARIES NAMES ogg HINTS ${OGG_ROOT}/lib ${OGG_ROOT}/lib64) -+ find_library(OGG_LIBRARIES NAMES ogg libogg HINTS ${OGG_ROOT}/lib ${OGG_ROOT}/lib64) - endif() - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(OGG DEFAULT_MSG OGG_INCLUDE_DIRS OGG_LIBRARIES) diff --git a/ports/libvorbis/portfile.cmake b/ports/libvorbis/portfile.cmake index 0e1ef5d421095a..a015e0e8c5e244 100644 --- a/ports/libvorbis/portfile.cmake +++ b/ports/libvorbis/portfile.cmake @@ -1,14 +1,12 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/vorbis - REF 9eadeccdc4247127d91ac70555074239f5ce3529 - SHA512 26d6826eba57fd47ebf426ba5a0c961c87ff62e2bb4185190e4985de9ac49aa493f77a1bd01d3d0757eb89a8494ba7de3a506f76bf5c8942ac1de3f75746a301 + REF v1.3.7 + SHA512 bfb6f5dbfd49ed38b2b08b3667c06d02e68f649068a050f21a3cc7e1e56b27afd546aaa3199c4f6448f03f6e66a82f9a9dc2241c826d3d1d4acbd38339b9e9fb HEAD_REF master PATCHES 0001-Dont-export-vorbisenc-functions.patch - 0002-Allow-deprecated-functions.patch - ogg.patch + 0002-Fixup-pkgconfig-libs.patch ) vcpkg_configure_cmake( @@ -17,10 +15,16 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/Vorbis + TARGET_PATH share/Vorbis +) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright COPYONLY) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() -vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() diff --git a/ports/libvorbis/vcpkg.json b/ports/libvorbis/vcpkg.json new file mode 100644 index 00000000000000..af19c1851b15c4 --- /dev/null +++ b/ports/libvorbis/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libvorbis", + "version-string": "1.3.7", + "port-version": 1, + "description": "Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format", + "homepage": "https://github.com/xiph/vorbis", + "license": "BSD-3-Clause", + "dependencies": [ + "libogg" + ] +} diff --git a/ports/libvpx/0002-Fix-nasm-debug-format-flag.patch b/ports/libvpx/0002-Fix-nasm-debug-format-flag.patch new file mode 100644 index 00000000000000..9202f4bd9a5c11 --- /dev/null +++ b/ports/libvpx/0002-Fix-nasm-debug-format-flag.patch @@ -0,0 +1,21 @@ +diff --git a/build/make/configure.sh b/build/make/configure.sh +index 81d30a16c..d4f19cd97 100644 +--- a/build/make/configure.sh ++++ b/build/make/configure.sh +@@ -1370,12 +1370,14 @@ EOF + case ${tgt_os} in + win32) + add_asflags -f win32 +- enabled debug && add_asflags -g cv8 ++ enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8 ++ enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8 + EXE_SFX=.exe + ;; + win64) + add_asflags -f win64 +- enabled debug && add_asflags -g cv8 ++ enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8 ++ enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8 + EXE_SFX=.exe + ;; + linux*|solaris*|android*) diff --git a/ports/libvpx/0003-add-uwp-and-v142-support.patch b/ports/libvpx/0003-add-uwp-and-v142-support.patch new file mode 100644 index 00000000000000..9d689ab59f9051 --- /dev/null +++ b/ports/libvpx/0003-add-uwp-and-v142-support.patch @@ -0,0 +1,154 @@ +diff --git a/build/make/configure.sh b/build/make/configure.sh +index d4f19cd97..fb51368b1 100644 +--- a/build/make/configure.sh ++++ b/build/make/configure.sh +@@ -1016,7 +1016,7 @@ EOF + # A number of ARM-based Windows platforms are constrained by their + # respective SDKs' limitations. Fortunately, these are all 32-bit ABIs + # and so can be selected as 'win32'. +- if [ ${tgt_os} = "win32" ]; then ++ if [ ${tgt_os} = "win32" ] || [ ${tgt_isa} = "armv7" ]; then + asm_conversion_cmd="${source_path_mk}/build/make/ads2armasm_ms.pl" + AS_SFX=.S + msvs_arch_dir=arm-msvs +@@ -1250,6 +1250,9 @@ EOF + android) + soft_enable realtime_only + ;; ++ uwp) ++ enabled gcc && add_cflags -fno-common ++ ;; + win*) + enabled gcc && add_cflags -fno-common + ;; +@@ -1368,6 +1371,16 @@ EOF + fi + AS_SFX=.asm + case ${tgt_os} in ++ uwp) ++ if [ {$tgt_isa} = "x86" ] || [ {$tgt_isa} = "armv7" ]; then ++ add_asflags -f win32 ++ else ++ add_asflags -f win64 ++ fi ++ enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8 ++ enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8 ++ EXE_SFX=.exe ++ ;; + win32) + add_asflags -f win32 + enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8 +@@ -1488,6 +1501,8 @@ EOF + # Almost every platform uses pthreads. + if enabled multithread; then + case ${toolchain} in ++ *-uwp-vs*) ++ ;; + *-win*-vs*) + ;; + *-android-gcc) +diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh +index 6f91ad478..916851662 100755 +--- a/build/make/gen_msvs_vcxproj.sh ++++ b/build/make/gen_msvs_vcxproj.sh +@@ -296,7 +296,22 @@ generate_vcxproj() { + tag_content ProjectGuid "{${guid}}" + tag_content RootNamespace ${name} + tag_content Keyword ManagedCProj +- if [ $vs_ver -ge 12 ] && [ "${platforms[0]}" = "ARM" ]; then ++ if [ $vs_ver -ge 16 ]; then ++ if [[ $target =~ [^-]*-uwp-.* ]]; then ++ # Universal Windows Applications ++ tag_content AppContainerApplication true ++ tag_content ApplicationType "Windows Store" ++ tag_content ApplicationTypeRevision 10.0 ++ fi ++ if [[ $target =~ [^-]*-uwp-.* ]] || [ "${platforms[0]}" = "ARM" ] || [ "${platforms[0]}" = "ARM64" ]; then ++ # Default to the latest Windows 10 SDK ++ tag_content WindowsTargetPlatformVersion 10.0 ++ else ++ # Minimum supported version of Windows for the desktop ++ tag_content WindowsTargetPlatformVersion 8.1 ++ fi ++ tag_content MinimumVisualStudioVersion 16.0 ++ elif [ $vs_ver -ge 12 ] && [ "${platforms[0]}" = "ARM" ]; then + tag_content AppContainerApplication true + # The application type can be one of "Windows Store", + # "Windows Phone" or "Windows Phone Silverlight". The +@@ -391,7 +406,7 @@ generate_vcxproj() { + Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" + if [ "$name" == "vpx" ]; then + hostplat=$plat +- if [ "$hostplat" == "ARM" ]; then ++ if [ "$hostplat" == "ARM" ] && [ $vs_ver -le 15 ]; then + hostplat=Win32 + fi + fi +diff --git a/configure b/configure +index da631a45e..da93474e5 100755 +--- a/configure ++++ b/configure +@@ -101,16 +101,20 @@ all_platforms="${all_platforms} arm64-android-gcc" + all_platforms="${all_platforms} arm64-darwin-gcc" + all_platforms="${all_platforms} arm64-darwin20-gcc" + all_platforms="${all_platforms} arm64-linux-gcc" ++all_platforms="${all_platforms} arm64-uwp-vs16" + all_platforms="${all_platforms} arm64-win64-gcc" + all_platforms="${all_platforms} arm64-win64-vs15" ++all_platforms="${all_platforms} arm64-win64-vs16" + all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8 + all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8 + all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8 + all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8 + all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8 ++all_platforms="${all_platforms} armv7-uwp-vs16" + all_platforms="${all_platforms} armv7-win32-gcc" + all_platforms="${all_platforms} armv7-win32-vs14" + all_platforms="${all_platforms} armv7-win32-vs15" ++all_platforms="${all_platforms} armv7-win32-vs16" + all_platforms="${all_platforms} armv7s-darwin-gcc" + all_platforms="${all_platforms} armv8-linux-gcc" + all_platforms="${all_platforms} mips32-linux-gcc" +@@ -135,6 +139,7 @@ all_platforms="${all_platforms} x86-linux-gcc" + all_platforms="${all_platforms} x86-linux-icc" + all_platforms="${all_platforms} x86-os2-gcc" + all_platforms="${all_platforms} x86-solaris-gcc" ++all_platforms="${all_platforms} x86-uwp-vs16" + all_platforms="${all_platforms} x86-win32-gcc" + all_platforms="${all_platforms} x86-win32-vs14" + all_platforms="${all_platforms} x86-win32-vs15" +@@ -156,6 +161,7 @@ all_platforms="${all_platforms} x86_64-iphonesimulator-gcc" + all_platforms="${all_platforms} x86_64-linux-gcc" + all_platforms="${all_platforms} x86_64-linux-icc" + all_platforms="${all_platforms} x86_64-solaris-gcc" ++all_platforms="${all_platforms} x86_64-uwp-vs16" + all_platforms="${all_platforms} x86_64-win64-gcc" + all_platforms="${all_platforms} x86_64-win64-vs14" + all_platforms="${all_platforms} x86_64-win64-vs15" +@@ -476,11 +482,10 @@ process_targets() { + ! enabled multithread && DIST_DIR="${DIST_DIR}-nomt" + ! enabled install_docs && DIST_DIR="${DIST_DIR}-nodocs" + DIST_DIR="${DIST_DIR}-${tgt_isa}-${tgt_os}" +- case "${tgt_os}" in +- win*) enabled static_msvcrt && DIST_DIR="${DIST_DIR}mt" || DIST_DIR="${DIST_DIR}md" +- DIST_DIR="${DIST_DIR}-${tgt_cc}" +- ;; +- esac ++ if [[ ${tgt_os} =~ win.* ]] || [ "${tgt_os}" = "uwp" ]; then ++ enabled static_msvcrt && DIST_DIR="${DIST_DIR}mt" || DIST_DIR="${DIST_DIR}md" ++ DIST_DIR="${DIST_DIR}-${tgt_cc}" ++ fi + if [ -f "${source_path}/build/make/version.sh" ]; then + ver=`"$source_path/build/make/version.sh" --bare "$source_path"` + DIST_DIR="${DIST_DIR}-${ver}" +@@ -569,6 +574,10 @@ process_detect() { + + # Specialize windows and POSIX environments. + case $toolchain in ++ *-uwp-*) ++ # Don't check for any headers in UWP builds. ++ false ++ ;; + *-win*-*) + # Don't check for any headers in Windows builds. + false diff --git a/ports/libvpx/0004-remove-library-suffixes.patch b/ports/libvpx/0004-remove-library-suffixes.patch new file mode 100644 index 00000000000000..c8feaf8f388864 --- /dev/null +++ b/ports/libvpx/0004-remove-library-suffixes.patch @@ -0,0 +1,13 @@ +diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh +index 916851662..e60405bc9 100755 +--- a/build/make/gen_msvs_vcxproj.sh ++++ b/build/make/gen_msvs_vcxproj.sh +@@ -394,7 +394,7 @@ generate_vcxproj() { + else + config_suffix="" + fi +- tag_content TargetName "${name}${lib_sfx}${config_suffix}" ++ tag_content TargetName "${name}" + fi + close_tag PropertyGroup + done diff --git a/ports/libvpx/CONTROL b/ports/libvpx/CONTROL deleted file mode 100644 index 5aa726c1e6a816..00000000000000 --- a/ports/libvpx/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libvpx -Version: 1.7.0-3 -Homepage: https://github.com/webmproject/libvpx -Description: The reference software implementation for the video coding formats VP8 and VP9. diff --git a/ports/libvpx/portfile.cmake b/ports/libvpx/portfile.cmake index 1290d415a5f47d..10ce04878d14f4 100644 --- a/ports/libvpx/portfile.cmake +++ b/ports/libvpx/portfile.cmake @@ -1,104 +1,281 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(LIBVPX_VERSION 1.7.0) -set(LIBVPX_HASH 8b3b766b550f8d86907628d7ed88035f9a2612aac21542e0fd5ad35b905eb82cbe1be02a1a24afce7a3bcc4766f62611971f72724761996b392136c40a1e7ff0) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libvpx-${LIBVPX_VERSION}) - -string(REGEX REPLACE "\\\\" "/" SOURCE_PATH_UNIX ${SOURCE_PATH}) -string(REGEX REPLACE "\\\\" "/" CURRENT_PACKAGES_DIR_UNIX ${CURRENT_PACKAGES_DIR}) +set(LIBVPX_VERSION 1.10.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/webmproject/libvpx/archive/v${LIBVPX_VERSION}/libvpx-${LIBVPX_VERSION}.tar.gz" - FILENAME "libvpx-${LIBVPX_VERSION}.tar.gz" - SHA512 ${LIBVPX_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO webmproject/libvpx + REF v${LIBVPX_VERSION} + SHA512 f88c588145b5164e98531b75215e119056cd806a9dbe6599bb9dab35c0af0ecd4b3daabee7d795e412a58aeb543d5c7dc0107457c4bd8f4d434e966e8e22a32d + HEAD_REF master + PATCHES + 0002-Fix-nasm-debug-format-flag.patch + 0003-add-uwp-and-v142-support.patch + 0004-remove-library-suffixes.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_find_acquire_program(YASM) vcpkg_find_acquire_program(PERL) -vcpkg_acquire_msys(MSYS_ROOT PACKAGES make) -vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils) -get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) -get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) - -message(STATUS "PERL_EXE_PATH ; ${PERL_EXE_PATH}") -set(ENV{PATH} "${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}") -set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -if(VCPKG_CRT_LINKAGE STREQUAL static) - set(LIBVPX_CRT_LINKAGE --enable-static-msvcrt) - set(LIBVPX_CRT_SUFFIX mt) +if(CMAKE_HOST_WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + set(ENV{PATH} "${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}") else() - set(LIBVPX_CRT_SUFFIX md) + set(BASH /bin/bash) + set(ENV{PATH} "${MSYS_ROOT}/usr/bin:$ENV{PATH}:${PERL_EXE_PATH}") endif() -if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) - set(LIBVPX_TARGET_ARCH "x86-win32") - set(LIBVPX_ARCH_DIR "Win32") -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(LIBVPX_TARGET_ARCH "x86_64-win64") - set(LIBVPX_ARCH_DIR "x64") -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) - set(LIBVPX_TARGET_ARCH "armv7-win32") - set(LIBVPX_ARCH_DIR "ARM") -endif() +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(${NASM_EXE_PATH}) -set(LIBVPX_TARGET_VS "vs15") - -message(STATUS "Generating makefile") -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -vcpkg_execute_required_process( - COMMAND - ${BASH} --noprofile --norc - "${SOURCE_PATH_UNIX}/configure" - --target=${LIBVPX_TARGET_ARCH}-${LIBVPX_TARGET_VS} - ${LIBVPX_CRT_LINKAGE} - --disable-examples - --disable-tools - --disable-docs - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}" - LOGNAME configure-${TARGET_TRIPLET}) - -message(STATUS "Generating MSBuild projects") -vcpkg_execute_required_process( - COMMAND - ${BASH} --noprofile --norc -c "make dist" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}" - LOGNAME generate-${TARGET_TRIPLET}) - -vcpkg_build_msbuild( - PROJECT_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx.vcxproj" -) +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") + + if(VCPKG_CRT_LINKAGE STREQUAL static) + set(LIBVPX_CRT_LINKAGE --enable-static-msvcrt) + set(LIBVPX_CRT_SUFFIX mt) + else() + set(LIBVPX_CRT_SUFFIX md) + endif() + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore AND VCPKG_PLATFORM_TOOLSET STREQUAL v142) + set(LIBVPX_TARGET_OS "uwp") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + set(LIBVPX_TARGET_OS "win32") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(LIBVPX_TARGET_OS "win64") + endif() + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(LIBVPX_TARGET_ARCH "x86-${LIBVPX_TARGET_OS}") + set(LIBVPX_ARCH_DIR "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(LIBVPX_TARGET_ARCH "x86_64-${LIBVPX_TARGET_OS}") + set(LIBVPX_ARCH_DIR "x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(LIBVPX_TARGET_ARCH "arm64-${LIBVPX_TARGET_OS}") + set(LIBVPX_ARCH_DIR "ARM64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + set(LIBVPX_TARGET_ARCH "armv7-${LIBVPX_TARGET_OS}") + set(LIBVPX_ARCH_DIR "ARM") + endif() + + if(VCPKG_PLATFORM_TOOLSET STREQUAL v142) + set(LIBVPX_TARGET_VS "vs16") + else() + set(LIBVPX_TARGET_VS "vs15") + endif() + + set(OPTIONS "--disable-examples --disable-tools --disable-docs --enable-pic") + + if("realtime" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-realtime-only") + endif() + + if("highbitdepth" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-vp9-highbitdepth") + endif() + + message(STATUS "Generating makefile") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc + "${SOURCE_PATH}/configure" + --target=${LIBVPX_TARGET_ARCH}-${LIBVPX_TARGET_VS} + ${LIBVPX_CRT_LINKAGE} + ${OPTIONS} + --as=nasm + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}" + LOGNAME configure-${TARGET_TRIPLET}) + + message(STATUS "Generating MSBuild projects") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make dist" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}" + LOGNAME generate-${TARGET_TRIPLET}) + + vcpkg_build_msbuild( + PROJECT_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx.vcxproj" + OPTIONS /p:UseEnv=True + ) + + # note: pdb file names are hardcoded in the lib file, cannot rename + set(LIBVPX_OUTPUT_PREFIX "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Release/vpx.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + if (EXISTS "${LIBVPX_OUTPUT_PREFIX}/Release/vpx.pdb") + file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Release/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + else() + file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + endif() + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + if (EXISTS "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx.pdb") + file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + else() + file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + endif() + endif() + + if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx") + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nomt-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx") + else() + set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx") + endif() + file( + INSTALL + "${LIBVPX_INCLUDE_DIR}" + DESTINATION + "${CURRENT_PACKAGES_DIR}/include" + RENAME + "vpx") + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(LIBVPX_PREFIX "${CURRENT_INSTALLED_DIR}") + configure_file("${CMAKE_CURRENT_LIST_DIR}/vpx.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/vpx.pc" @ONLY) + endif() + + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(LIBVPX_PREFIX "${CURRENT_INSTALLED_DIR}/debug") + configure_file("${CMAKE_CURRENT_LIST_DIR}/vpx.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/vpx.pc" @ONLY) + endif() -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmdd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" RENAME "vpxmd.pdb") - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" RENAME "vpxmdd.pdb") else() - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmt.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmtd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" RENAME "vpxmt.pdb") - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" RENAME "vpxmtd.pdb") + + set(OPTIONS "--disable-examples --disable-tools --disable-docs --disable-unit-tests --enable-pic") + + set(OPTIONS_DEBUG "--enable-debug-libs --enable-debug --prefix=${CURRENT_PACKAGES_DIR}/debug") + set(OPTIONS_RELEASE "--prefix=${CURRENT_PACKAGES_DIR}") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(OPTIONS "${OPTIONS} --disable-static --enable-shared") + else() + set(OPTIONS "${OPTIONS} --enable-static --disable-shared") + endif() + + if("realtime" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-realtime-only") + endif() + + if("highbitdepth" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-vp9-highbitdepth") + endif() + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(LIBVPX_TARGET_ARCH "x86") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(LIBVPX_TARGET_ARCH "x86_64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(LIBVPX_TARGET_ARCH "arm64") + else() + message(FATAL_ERROR "libvpx does not support architecture ${VCPKG_TARGET_ARCHITECTURE}") + endif() + + if(VCPKG_TARGET_IS_MINGW) + if(LIBVPX_TARGET_ARCH STREQUAL "x86") + set(LIBVPX_TARGET "x86-win32-gcc") + else() + set(LIBVPX_TARGET "x86_64-win64-gcc") + endif() + elseif(VCPKG_TARGET_IS_LINUX) + set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-linux-gcc") + elseif(VCPKG_TARGET_IS_OSX) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(LIBVPX_TARGET "arm64-darwin20-gcc") + else() + set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-darwin17-gcc") # enable latest CPU instructions for best performance and less CPU usage on MacOS + endif() + else() + set(LIBVPX_TARGET "generic-gnu") # use default target + endif() + + message(STATUS "Build info. Target: ${LIBVPX_TARGET}; Options: ${OPTIONS}") + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Configuring libvpx for Release") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc + "${SOURCE_PATH}/configure" + --target=${LIBVPX_TARGET} + ${OPTIONS} + ${OPTIONS_RELEASE} + --as=nasm + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME configure-${TARGET_TRIPLET}-rel) + + message(STATUS "Building libvpx for Release") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make -j8" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Installing libvpx for Release") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME install-${TARGET_TRIPLET}-rel + ) + endif() + + # --- --- --- + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Configuring libvpx for Debug") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc + "${SOURCE_PATH}/configure" + --target=${LIBVPX_TARGET} + ${OPTIONS} + ${OPTIONS_DEBUG} + --as=nasm + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME configure-${TARGET_TRIPLET}-dbg) + + message(STATUS "Building libvpx for Debug") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make -j8" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + message(STATUS "Installing libvpx for Debug") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME install-${TARGET_TRIPLET}-dbg + ) + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libvpx_g.a") + endif() endif() -if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) - set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nomt-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx") +vcpkg_fixup_pkgconfig() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(LIBVPX_CONFIG_DEBUG ON) else() - set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx") + set(LIBVPX_CONFIG_DEBUG OFF) endif() -file( - INSTALL - ${LIBVPX_INCLUDE_DIR} - DESTINATION - "${CURRENT_PACKAGES_DIR}/include" - RENAME - "vpx") - -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libvpx) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libvpx/LICENSE ${CURRENT_PACKAGES_DIR}/share/libvpx/copyright) + +configure_file("${CMAKE_CURRENT_LIST_DIR}/unofficial-libvpx-config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-libvpx/unofficial-libvpx-config.cmake" @ONLY) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libvpx/unofficial-libvpx-config.cmake.in b/ports/libvpx/unofficial-libvpx-config.cmake.in new file mode 100644 index 00000000000000..c335d91a335a75 --- /dev/null +++ b/ports/libvpx/unofficial-libvpx-config.cmake.in @@ -0,0 +1,49 @@ +if(NOT TARGET unofficial::libvpx::libvpx) + # Compute the installation prefix relative to this file. + get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) + get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) + get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) + + # Add library target (note: vpx always has a static build in vcpkg). + add_library(unofficial::libvpx::libvpx STATIC IMPORTED) + + # Add interface include directories and link interface languages (applies to all configurations). + set_target_properties(unofficial::libvpx::libvpx PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + ) + list(APPEND _IMPORT_CHECK_FILES "${_IMPORT_PREFIX}/include/vpx/vpx_codec.h") + + # Add release configuration properties. + find_library(_LIBFILE_RELEASE NAMES vpx PATHS "${_IMPORT_PREFIX}/lib/" NO_DEFAULT_PATH) + set_property(TARGET unofficial::libvpx::libvpx + APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(unofficial::libvpx::libvpx PROPERTIES + IMPORTED_LOCATION_RELEASE ${_LIBFILE_RELEASE}) + list(APPEND _IMPORT_CHECK_FILES ${_LIBFILE_RELEASE}) + unset(_LIBFILE_RELEASE CACHE) + + # Add debug configuration properties. + if(@LIBVPX_CONFIG_DEBUG@) + find_library(_LIBFILE_DEBUG NAMES vpx PATHS "${_IMPORT_PREFIX}/debug/lib/" NO_DEFAULT_PATH) + set_property(TARGET unofficial::libvpx::libvpx + APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(unofficial::libvpx::libvpx PROPERTIES + IMPORTED_LOCATION_DEBUG ${_LIBFILE_DEBUG}) + list(APPEND _IMPORT_CHECK_FILES ${_LIBFILE_DEBUG}) + unset(_LIBFILE_DEBUG CACHE) + endif() + + # Check header and library files are present. + foreach(file ${_IMPORT_CHECK_FILES} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "unofficial::libvpx::libvpx references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES) +endif() diff --git a/ports/libvpx/vcpkg.json b/ports/libvpx/vcpkg.json new file mode 100644 index 00000000000000..c002bdddff5235 --- /dev/null +++ b/ports/libvpx/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "libvpx", + "version-semver": "1.10.0", + "port-version": 2, + "description": "The reference software implementation for the video coding formats VP8 and VP9.", + "homepage": "https://github.com/webmproject/libvpx", + "features": { + "highbitdepth": { + "description": "use VP9 high bit depth (10/12) profiles" + }, + "realtime": { + "description": "enable this option while building for real-time encoding" + } + } +} diff --git a/ports/libvpx/vpx.pc.in b/ports/libvpx/vpx.pc.in new file mode 100644 index 00000000000000..c01bb2e9beb476 --- /dev/null +++ b/ports/libvpx/vpx.pc.in @@ -0,0 +1,13 @@ +prefix=@LIBVPX_PREFIX@ +# pkg-config file from libvpx v1.10.0 +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: vpx +Description: WebM Project VPx codec implementation +Version: @LIBVPX_VERSION@ +Requires: +Conflicts: +Libs: -L"${libdir}" -lvpx +Cflags: -I"${includedir}" diff --git a/ports/libwandio/configure.lib.patch b/ports/libwandio/configure.lib.patch new file mode 100644 index 00000000000000..3898836b7bc082 --- /dev/null +++ b/ports/libwandio/configure.lib.patch @@ -0,0 +1,122 @@ +diff --git a/configure.ac b/configure.ac +index 4579fbb3d..f6be008c8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -112,10 +112,11 @@ AC_HEADER_STDC + AC_CHECK_HEADERS(stddef.h inttypes.h sys/prctl.h) + + # Checks for various "optional" libraries +-AC_CHECK_LIB(pthread, pthread_create, have_pthread=1, have_pthread=0) ++# AC_CHECK_LIB(pthread, pthread_create, have_pthread=1, have_pthread=0) ++AC_SEARCH_LIBS(pthread_create, [pthreadGC pthreadVC pthread], have_pthread=1, have_pthread=0) + + if test "$have_pthread" = 1; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lpthread" ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_pthread_create" + AC_DEFINE(HAVE_LIBPTHREAD, 1, [Set to 1 if pthreads are supported]) + fi + +@@ -128,12 +129,13 @@ AC_ARG_WITH([bzip2], + + AS_IF([test "x$with_bzip2" != "xno"], + [ +- AC_CHECK_LIB(bz2, BZ2_bzDecompressInit, have_bzip=yes, have_bzip=no) ++ AC_SEARCH_LIBS(BZ2_bzDecompressInit, [bz2 bz2d bzip2 bzip2d], have_bzip=yes, have_bzip=no) ++ # AC_CHECK_LIB(bz2, BZ2_bzDecompressInit, have_bzip=yes, have_bzip=no) + ], [have_bzip=no]) + + AS_IF([test "x$have_bzip" = "xyes"], [ +- if test "$ac_cv_lib_bz2_BZ2_bzDecompressInit" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lbz2" ++ if test "$ac_cv_search_BZ2_bzDecompressInit" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_BZ2_bzDecompressInit" + fi + with_bzip2=yes + AC_DEFINE(HAVE_LIBBZ2, 1, "Compiled with bzip2 support")], +@@ -149,12 +151,13 @@ AC_ARG_WITH([zlib], + + AS_IF([test "x$with_zlib" != "xno"], + [ +- AC_CHECK_LIB(z, deflate, have_zlib=yes, have_zlib=no) ++ AC_SEARCH_LIBS(deflate, [z zlib zlibd zd], have_zlib=yes, have_zlib=no) ++ # AC_CHECK_LIB(z, deflate, have_zlib=yes, have_zlib=no) + ], [have_zlib=no]) + + AS_IF([test "x$have_zlib" = "xyes"], [ +- if test "$ac_cv_lib_z_deflate" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lz" ++ if test "$ac_cv_search_deflate" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_deflate" + fi + AC_DEFINE(HAVE_LIBZ, 1, "Compiled with zlib support") + with_zlib=yes], +@@ -193,12 +196,13 @@ AC_ARG_WITH([lzma], + + AS_IF([test "x$with_lzma" != "xno"], + [ +- AC_CHECK_HEADER(lzma.h, have_lzma=yes, have_lzma=no) ++ # AC_CHECK_HEADER(lzma.h, have_lzma=yes, have_lzma=no) ++ AC_SEARCH_LIBS(lzma_free, [lzma lzmad], have_lzma=yes, have_lzma=no) + ], [have_lzma=no]) + + AS_IF([test "x$have_lzma" = "xyes"], [ +- if test "$ac_cv_lib_lzma_code" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -llzma" ++ if test "$ac_cv_search_lzma_free" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_lzma_free" + fi + AC_DEFINE(HAVE_LIBLZMA, 1, "Compiled with lzma support") + with_lzma=yes], +@@ -215,12 +219,13 @@ AC_ARG_WITH([zstd], + + AS_IF([test "x$with_zstd" != "xno"], + [ +- AC_CHECK_LIB(zstd, ZSTD_createDStream, have_zstd=yes, have_zstd=no) ++ AC_SEARCH_LIBS(ZSTD_createDStream, [zstd zstdd], have_zstd=yes, have_zstd=no) ++ # AC_CHECK_LIB(zstd, ZSTD_createDStream, have_zstd=yes, have_zstd=no) + ], [have_zstd=no]) + + AS_IF([test "x$have_zstd" = "xyes"], [ +- if test "$ac_cv_lib_zstd_code" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lzstd" ++ if test "$ac_cv_search_ZSTD_createDStream" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_ZSTD_createDStream" + fi + AC_DEFINE(HAVE_LIBZSTD, 1, "Compiled with zstd support") + with_zstd=yes], +@@ -259,25 +264,28 @@ AC_ARG_WITH([lz4], + + AS_IF([test "x$with_lz4" != "xno"], + [ +- AC_CHECK_LIB(lz4, LZ4F_createDecompressionContext, have_lz4f=yes, have_lz4f=no) ++ AC_SEARCH_LIBS(LZ4F_createDecompressionContext, [lz4 lz4d], have_lz4f=yes, have_lz4f=no) ++ # AC_CHECK_LIB(lz4, LZ4F_createDecompressionContext, have_lz4f=yes, have_lz4f=no) + ], [have_zstd=no]) + + AS_IF([test "x$have_lz4f" = "xyes"], [ +- if test "$ac_cv_lib_lz4_code" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -llz4" ++ if test "$ac_cv_search_LZ4F_createDecompressionContext" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_LZ4F_createDecompressionContext" + fi + AC_DEFINE(HAVE_LIBLZ4F, 1, "Compiled with lz4 frame support") +- AC_CHECK_LIB(lz4, LZ4F_getVersion, have_lz4_173=yes, have_lz4_173=no) ++ AC_SEARCH_LIBS(LZ4F_getVersion, [lz4 lz4d], have_lz4_173=yes, have_lz4_173=no) ++ # AC_CHECK_LIB(lz4, LZ4F_getVersion, have_lz4_173=yes, have_lz4_173=no) + if test "x$have_lz4_173" = "xyes"; then + AC_DEFINE(HAVE_LIBLZ4_MOVABLE, 1, "If defined then liblz4 does NOT have the ERROR_srcPtr_wrong bug") + fi + with_lz4=frameapi], + [ + AC_DEFINE(HAVE_LIBLZ4F, 0, "Compiled with lz4 frame support") +- AC_CHECK_LIB(lz4, LZ4_decompress_safe_continue, have_lz4s=yes, have_lz4s=no) ++ AC_SEARCH_LIBS(LZ4_decompress_safe_continue, [lz4 lz4d], have_lz4s=yes, have_lz4s=no) ++ # AC_CHECK_LIB(lz4, LZ4_decompress_safe_continue, have_lz4s=yes, have_lz4s=no) + AS_IF([test "x$have_lz4s" = "xyes"], [ +- if test "$ac_cv_lib_lz4_code" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -llz4" ++ if test "$ac_cv_search_LZ4_decompress_safe_continue" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_LZ4_decompress_safe_continue" + fi + AC_DEFINE(HAVE_LIBLZ4S, 1, "Compiled with lz4 stream support") + with_lz4=streamapi diff --git a/ports/libwandio/configure.patch b/ports/libwandio/configure.patch new file mode 100644 index 00000000000000..929662d6703296 --- /dev/null +++ b/ports/libwandio/configure.patch @@ -0,0 +1,14 @@ +diff --git a/configure.ac b/configure.ac +index e250c0c31..0465120ba 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,7 +83,7 @@ ADD_INCLS="" + ADD_LDFLAGS="$ADD_LDFLAGS -L\$(abs_top_srcdir)/lib" + LIBWANDIO_LIBS="" + +-CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wextra -DLT_BUILDING_DLL=1" ++CFLAGS="$CFLAGS -Wall -DLT_BUILDING_DLL=1 -DNOMINMAX" +-CXXFLAGS="$CXXFLAGS -Wall -DLT_BUILDING_DLL=1" ++CXXFLAGS="$CXXFLAGS -Wall -DLT_BUILDING_DLL=1 -DNOMINMAX" + + # Check for -fvisibility diff --git a/ports/libwandio/curl.patch b/ports/libwandio/curl.patch new file mode 100644 index 00000000000000..326700ed0bb142 --- /dev/null +++ b/ports/libwandio/curl.patch @@ -0,0 +1,22 @@ +diff --git a/configure.ac b/configure.ac +index 4579fbb3d..f6be008c8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -296,12 +304,14 @@ AC_ARG_WITH([http], + AS_IF([test "x$with_http" != "xno"], + [ + # we need curl_easy_pause which was added in 7.18.0 +- AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no) ++ AC_SEARCH_LIBS(curl_easy_pause, [curl curl-d libcurl libcurl-d], have_curl=yes, have_curl=no, [-lCrypt32 -lWldap32 -lWs2_32 -ladvapi32]) ++ # AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no) + ], [have_curl=no]) + + AS_IF([test "x$have_curl" = "xyes"], [ +- if test "$ac_cv_lib_curl_curl_easy_pause" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lcurl" ++ if test "$ac_cv_search_curl_easy_pause" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lCrypt32 -lWldap32 -lWs2_32 -ladvapi32 $ac_cv_search_curl_easy_pause" ++ LIBS="$LIBS" + fi + AC_DEFINE(HAVE_HTTP, 1, "Compiled with http support") + with_http=yes], diff --git a/ports/libwandio/openssl.patch b/ports/libwandio/openssl.patch new file mode 100644 index 00000000000000..586cdfab569bf9 --- /dev/null +++ b/ports/libwandio/openssl.patch @@ -0,0 +1,22 @@ +diff --git a/configure.ac b/configure.ac +index 4579fbb3d..f6be008c8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -296,12 +304,14 @@ AC_ARG_WITH([http], + AS_IF([test "x$with_http" != "xno"], + [ + # we need curl_easy_pause which was added in 7.18.0 +- AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no) ++ AC_SEARCH_LIBS(curl_easy_pause, [curl curl-d], have_curl=yes, have_curl=no, [-lssl -lcrypto $ac_cv_search_pthread_create -ldl]) ++ # AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no) + ], [have_curl=no]) + + AS_IF([test "x$have_curl" = "xyes"], [ +- if test "$ac_cv_lib_curl_curl_easy_pause" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lcurl" ++ if test "$ac_cv_search_curl_easy_pause" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_curl_easy_pause -lssl -lcrypto $ac_cv_search_pthread_create -ldl" ++ LIBS="$LIBS -lssl -lcrypto $ac_cv_search_pthread_create -ldl" + fi + AC_DEFINE(HAVE_HTTP, 1, "Compiled with http support") + with_http=yes], diff --git a/ports/libwandio/portfile.cmake b/ports/libwandio/portfile.cmake new file mode 100644 index 00000000000000..a03d5c79f2c768 --- /dev/null +++ b/ports/libwandio/portfile.cmake @@ -0,0 +1,36 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + set(PATCHES curl.patch) + #TODO: Still does not work. Requires proper "signal" support and "unistd" +else() + set(PATCHES openssl.patch) # needed if curl is using openssl +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wanduow/wandio + REF 012b646e7ba7ab191a5a2206488adfac493fcdc6 + SHA512 e94a82038902c34933c4256f8bd4d7ef3f2cf32fea46f8e31a25df34cc90d3a275ff56d3bc9892aca0c85e6d875e696f96a836cc1444fe165db8364331e6e77d + HEAD_REF master + PATCHES configure.lib.patch # This is how configure.ac files with dependencies get fixed. + configure.patch + ${PATCHES} +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + COPY_SOURCE +) +vcpkg_install_make() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libwandio/vcpkg.json b/ports/libwandio/vcpkg.json new file mode 100644 index 00000000000000..94c493eca248bf --- /dev/null +++ b/ports/libwandio/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "libwandio", + "version-string": "4.2.1", + "port-version": 4, + "description": "C library for simple and efficient file IO.", + "homepage": "https://github.com/wanduow/wandio", + "supports": "!windows", + "dependencies": [ + "bzip2", + "curl", + "liblzma", + "lz4", + "lzo", + "pthread", + "zlib", + "zstd" + ] +} diff --git a/ports/libwebm/0003-fix-android-ndk-r22.patch b/ports/libwebm/0003-fix-android-ndk-r22.patch new file mode 100644 index 00000000000000..b08168ade00bc8 --- /dev/null +++ b/ports/libwebm/0003-fix-android-ndk-r22.patch @@ -0,0 +1,25 @@ +diff --git a/mkvmuxerutil.cpp b/mkvmuxerutil.cpp +index 27ab15d..8949c85 100644 +--- a/mkvmuxerutil.cpp ++++ b/mkvmuxerutil.cpp +@@ -10,6 +10,7 @@ + + #ifdef __ANDROID__ + #include ++#include + #endif + + #include +diff --git a/mkvparser.cpp b/mkvparser.cpp +index 4f20148..9cc6971 100644 +--- a/mkvparser.cpp ++++ b/mkvparser.cpp +@@ -4034,7 +4034,7 @@ long SegmentInfo::Parse() { + } + + const double rollover_check = m_duration * m_timecodeScale; +- if (rollover_check > LLONG_MAX) ++ if (rollover_check > static_cast(LLONG_MAX)) + return E_FILE_FORMAT_INVALID; + + if (pos != stop) diff --git a/ports/libwebm/CONTROL b/ports/libwebm/CONTROL deleted file mode 100644 index c2d9d878f75b34..00000000000000 --- a/ports/libwebm/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libwebm -Version: 1.0.0.27-5 -Homepage: https://github.com/webmproject/libwebm -Description: WebM File Parser diff --git a/ports/libwebm/portfile.cmake b/ports/libwebm/portfile.cmake index 024933ec55a73c..a461ae0cbea4c9 100644 --- a/ports/libwebm/portfile.cmake +++ b/ports/libwebm/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO webmproject/libwebm @@ -9,6 +7,7 @@ vcpkg_from_github( PATCHES 0001-fix-cmake.patch no-samples.patch + 0003-fix-android-ndk-r22.patch ) if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") @@ -30,5 +29,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebm) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebm/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/libwebm/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libwebm/vcpkg.json b/ports/libwebm/vcpkg.json new file mode 100644 index 00000000000000..018ddc0816a47e --- /dev/null +++ b/ports/libwebm/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libwebm", + "version-string": "1.0.0.27", + "port-version": 7, + "description": "WebM File Parser", + "homepage": "https://github.com/webmproject/libwebm" +} diff --git a/ports/libwebp/0001-build-fixes.patch b/ports/libwebp/0001-build-fixes.patch deleted file mode 100644 index 49097872799f7d..00000000000000 --- a/ports/libwebp/0001-build-fixes.patch +++ /dev/null @@ -1,165 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 499ddce..895fda9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -159,6 +159,12 @@ add_definitions(-DHAVE_CONFIG_H) - if(MSVC) - # avoid security warnings for e.g., fopen() used in the examples. - add_definitions(-D_CRT_SECURE_NO_WARNINGS) -+ add_definitions(-DWEBP_HAVE_JUST_SDL_H) -+ if(BUILD_SHARED_LIBS) -+ add_definitions(-DWEBP_EXTERN=__declspec\(dllexport\)) -+ else() -+ add_definitions(-DFREEGLUT_STATIC) -+ endif() - else() - add_definitions(-Wall) - endif() -@@ -342,19 +346,23 @@ if(WEBP_BUILD_ANIM_UTILS - "example_util_[^ ]*") - list(APPEND EXAMPLEUTIL_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h) - add_library(exampleutil ${EXAMPLEUTIL_SRCS}) -+ set_target_properties(exampleutil PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - target_include_directories( - exampleutil - PUBLIC $) -+ target_link_libraries(exampleutil imageioutil) - - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEIOUTILS_SRCS" - "imageio_util_[^ ]*") - add_library(imageioutil ${IMAGEIOUTILS_SRCS}) -+ set_target_properties(imageioutil PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - target_link_libraries(imageioutil webp) - - # Image-decoding utility library. - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEDEC_SRCS" - "imagedec_[^ ]*") - add_library(imagedec ${IMAGEDEC_SRCS}) -+ set_target_properties(imagedec PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - target_link_libraries(imagedec - imageioutil - webpdemux -@@ -365,7 +373,8 @@ if(WEBP_BUILD_ANIM_UTILS - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEENC_SRCS" - "imageenc_[^ ]*") - add_library(imageenc ${IMAGEENC_SRCS}) -- target_link_libraries(imageenc webp) -+ set_target_properties(imageenc PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) -+ target_link_libraries(imageenc imageioutil webp) - - set_property(TARGET exampleutil - imageioutil -@@ -380,7 +389,7 @@ if(WEBP_BUILD_DWEBP) - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "DWEBP_SRCS" "dwebp") - add_executable(dwebp ${DWEBP_SRCS}) - target_link_libraries(dwebp exampleutil imagedec imageenc) -- target_include_directories(dwebp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(dwebp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS dwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -389,13 +398,14 @@ if(WEBP_BUILD_CWEBP) - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "CWEBP_SRCS" "cwebp") - add_executable(cwebp ${CWEBP_SRCS}) - target_link_libraries(cwebp exampleutil imagedec webp) -- target_include_directories(cwebp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(cwebp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - - if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") - add_library(libwebpmux ${WEBP_MUX_SRCS}) -+ set_target_properties(libwebpmux PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - target_link_libraries(libwebpmux webp) - target_include_directories(libwebpmux - PRIVATE ${CMAKE_CURRENT_BINARY_DIR} -@@ -411,7 +421,7 @@ if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) - "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\ - ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\ - ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;") -- set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) -+ #set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) - list(APPEND INSTALLED_LIBRARIES libwebpmux) - configure_pkg_config("src/mux/libwebpmux.pc") - endif() -@@ -428,7 +438,7 @@ if(WEBP_BUILD_GIF2WEBP) - webp - libwebpmux - ${WEBP_DEP_GIF_LIBRARIES}) -- target_include_directories(gif2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(gif2webp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS gif2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -444,7 +454,7 @@ if(WEBP_BUILD_IMG2WEBP) - imageioutil - webp - libwebpmux) -- target_include_directories(img2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(img2webp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS img2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -464,6 +474,7 @@ if(WEBP_BUILD_VWEBP) - webpdemux) - target_include_directories(vwebp - PRIVATE GLUT::GLUT -+ ${CMAKE_CURRENT_SOURCE_DIR}/src - ${CMAKE_CURRENT_BINARY_DIR}/src - ${OPENGL_INCLUDE_DIR}) - install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -@@ -483,7 +494,7 @@ if(WEBP_BUILD_WEBPINFO) - "webpinfo") - add_executable(webpinfo ${WEBPINFO_SRCS}) - target_link_libraries(webpinfo exampleutil imageioutil) -- target_include_directories(webpinfo PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(webpinfo PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS webpinfo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -493,7 +504,7 @@ if(WEBP_BUILD_WEBPMUX) - "webpmux") - add_executable(webpmux ${WEBPMUX_SRCS}) - target_link_libraries(webpmux exampleutil imageioutil libwebpmux webp) -- target_include_directories(webpmux PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(webpmux PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS webpmux RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -540,7 +551,7 @@ if(WEBP_BUILD_WEBP_JS) - # JavaScript version - add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) - target_link_libraries(webp_js webpdecoder SDL) -- target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -+ target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - set(WEBP_HAVE_SDL 1) - set_target_properties( - webp_js -@@ -553,7 +564,7 @@ if(WEBP_BUILD_WEBP_JS) - # WASM version - add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) - target_link_libraries(webp_wasm webpdecoder SDL) -- target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -+ target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - set_target_properties( - webp_wasm - PROPERTIES LINK_FLAGS "-s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm\"' \ -@@ -579,7 +590,7 @@ if(WEBP_BUILD_ANIM_UTILS) - libwebpmux - webpdemux - ${WEBP_DEP_GIF_LIBRARIES}) -- target_include_directories(anim_diff PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(anim_diff PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - - # anim_dump - include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS} ${WEBP_DEP_GIF_INCLUDE_DIRS}) -@@ -595,7 +606,7 @@ if(WEBP_BUILD_ANIM_UTILS) - libwebpmux - webpdemux - ${WEBP_DEP_GIF_LIBRARIES}) -- target_include_directories(anim_dump PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(anim_dump PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - endif() - - # Install the different headers and libraries. diff --git a/ports/libwebp/0001-build.patch b/ports/libwebp/0001-build.patch new file mode 100644 index 00000000000000..e95468c3277f15 --- /dev/null +++ b/ports/libwebp/0001-build.patch @@ -0,0 +1,46 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9503daacb..2fb9ef137 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -167,6 +167,9 @@ add_definitions(-DHAVE_CONFIG_H) + if(MSVC) + # avoid security warnings for e.g., fopen() used in the examples. + add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ if(BUILD_SHARED_LIBS) ++ add_definitions("-DWEBP_EXTERN=__declspec(dllexport)" "-DWEBP_DLL") ++ endif() + else() + add_definitions(-Wall) + endif() +@@ -420,9 +423,9 @@ if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) + "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\ + ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\ + ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;") +- set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) ++ set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME $<$:lib>webpmux) + list(APPEND INSTALLED_LIBRARIES libwebpmux) + configure_pkg_config("src/mux/libwebpmux.pc") + endif() + + if(WEBP_BUILD_GIF2WEBP) +@@ -524,7 +528,11 @@ if(WEBP_BUILD_EXTRAS) + + # webp_quality + add_executable(webp_quality ${WEBP_QUALITY_SRCS} ${WEBP_EXTRAS_SRCS}) + target_link_libraries(webp_quality exampleutil imagedec) ++ if(BUILD_SHARED_LIBS) ++ target_link_libraries(webp_quality webpdspdecode) ++ endif() + target_include_directories(webp_quality + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ++ ${CMAKE_CURRENT_SOURCE_DIR}/src + ${CMAKE_CURRENT_BINARY_DIR}) +@@ -573,7 +573,7 @@ if(WEBP_BUILD_WEBP_JS) + "-s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \ + -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'") + set_target_properties(webp_js PROPERTIES OUTPUT_NAME webp) +- target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL) ++ target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H) + + # WASM version + add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) diff --git a/ports/libwebp/0003-always-mux.patch b/ports/libwebp/0003-always-mux.patch new file mode 100644 index 00000000000000..1484bc891fb090 --- /dev/null +++ b/ports/libwebp/0003-always-mux.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6f6c8eca2..00366ae53 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -405,7 +405,7 @@ if(WEBP_BUILD_CWEBP) + install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +-if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) ++if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP OR TRUE) + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") + add_library(libwebpmux ${WEBP_MUX_SRCS}) + target_link_libraries(libwebpmux webp) diff --git a/ports/libwebp/0003-remove-missing-symbol.patch b/ports/libwebp/0003-remove-missing-symbol.patch deleted file mode 100644 index 218481bbc1565c..00000000000000 --- a/ports/libwebp/0003-remove-missing-symbol.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/examples/gifdec.c b/examples/gifdec.c -index 4219352..ab0592a 100644 ---- a/examples/gifdec.c -+++ b/examples/gifdec.c -@@ -310,7 +310,7 @@ void GIFDisplayError(const GifFileType* const gif, int gif_error) { - #else - (void)gif; - fprintf(stderr, "GIFLib Error %d: ", gif_error); -- PrintGifError(); -+ //PrintGifError(); - fprintf(stderr, "\n"); - #endif - } diff --git a/ports/libwebp/0004-add-missing-linked-library.patch b/ports/libwebp/0004-add-missing-linked-library.patch index 49a34ef4d244f3..6cbb394d5d9844 100644 --- a/ports/libwebp/0004-add-missing-linked-library.patch +++ b/ports/libwebp/0004-add-missing-linked-library.patch @@ -3,7 +3,7 @@ index a98540c..a3697cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -479,6 +479,10 @@ if(WEBP_BUILD_VWEBP) - ${CMAKE_CURRENT_SOURCE_DIR}/src + PRIVATE ${GLUT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src ${OPENGL_INCLUDE_DIR}) + if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE)) diff --git a/ports/libwebp/0005-fix-static-build.patch b/ports/libwebp/0005-fix-static-build.patch deleted file mode 100644 index f17713efd5714f..00000000000000 --- a/ports/libwebp/0005-fix-static-build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7585fac..83edb3a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -540,7 +540,7 @@ if(WEBP_BUILD_EXTRAS) - find_package(SDL) - if(SDL_FOUND) - add_executable(vwebp_sdl ${VWEBP_SDL_SRCS}) -- target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) -+ target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp dxguid winmm) - target_include_directories(vwebp_sdl - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/src diff --git a/ports/libwebp/0006-fix-dependecies-platform.patch b/ports/libwebp/0006-fix-dependecies-platform.patch new file mode 100644 index 00000000000000..819c1f90b25a2b --- /dev/null +++ b/ports/libwebp/0006-fix-dependecies-platform.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 83edb3a..f634094 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -540,7 +540,11 @@ if(WEBP_BUILD_EXTRAS) + find_package(SDL) + if(SDL_FOUND) + add_executable(vwebp_sdl ${VWEBP_SDL_SRCS}) +- target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) ++ target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) ++ if (MSVC) ++ target_link_libraries(vwebp_sdl dxguid winmm) ++ endif() ++ target_compile_definitions(vwebp_sdl PRIVATE WEBP_HAVE_JUST_SDL_H) + target_include_directories(vwebp_sdl + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src diff --git a/ports/libwebp/0007-fix-arm-build.patch b/ports/libwebp/0007-fix-arm-build.patch new file mode 100644 index 00000000000000..aae5e39574a673 --- /dev/null +++ b/ports/libwebp/0007-fix-arm-build.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake +index da9a42a4..ce7a69f3 100644 +--- a/cmake/cpu.cmake ++++ b/cmake/cpu.cmake +@@ -73,7 +73,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE}) + set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG}) + webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD}) + else() +- if(MSVC) ++ if(MSVC AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "^ARM")) + list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG) + else() + set(SIMD_COMPILE_FLAG " ") diff --git a/ports/libwebp/0008-sdl.patch b/ports/libwebp/0008-sdl.patch new file mode 100644 index 00000000000000..7f3363f7b1dc81 --- /dev/null +++ b/ports/libwebp/0008-sdl.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7b0d2fa55..efd10887b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -563,10 +563,11 @@ if(WEBP_BUILD_EXTRAS) + endif() + + if(WEBP_BUILD_WEBP_JS) ++ find_package(SDL REQUIRED) + # JavaScript version + add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) +- target_link_libraries(webp_js webpdecoder SDL) +- target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) ++ target_link_libraries(webp_js webpdecoder ${SDL_LIBRARY}) ++ target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR}) + set(WEBP_HAVE_SDL 1) + set_target_properties( + webp_js +@@ -578,14 +579,14 @@ if(WEBP_BUILD_WEBP_JS) + + # WASM version + add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) +- target_link_libraries(webp_wasm webpdecoder SDL) +- target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) ++ target_link_libraries(webp_wasm webpdecoder ${SDL_LIBRARY}) ++ target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR}) + set_target_properties( + webp_wasm + PROPERTIES LINK_FLAGS "-s WASM=1 \ + -s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \ + -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'") +- target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL) ++ target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H) + + target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN) + endif() diff --git a/ports/libwebp/0009-glut.patch b/ports/libwebp/0009-glut.patch new file mode 100644 index 00000000000000..e1bf267ed71e51 --- /dev/null +++ b/ports/libwebp/0009-glut.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index efd10887b..8b41cc1ba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -470,7 +470,7 @@ if(WEBP_BUILD_VWEBP) + target_link_libraries(vwebp + ${OPENGL_LIBRARIES} + exampleutil +- ${GLUT_glut_LIBRARY} ++ GLUT::GLUT + imageioutil + webp + webpdemux) +@@ -481,6 +481,9 @@ if(WEBP_BUILD_VWEBP) + if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE)) + find_package(X11 REQUIRED) + target_link_libraries(vwebp ${X11_LIBRARIES} ${X11_Xxf86vm_LIB}) ++ if(X11_Xrandr_FOUND) # due to glut linking xrandr if found ++ target_link_libraries(vwebp ${X11_Xrandr_LIB}) ++ endif() + endif() + install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL deleted file mode 100644 index 90dffdc7772c64..00000000000000 --- a/ports/libwebp/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: libwebp -Version: 1.0.2-6 -Homepage: https://github.com/webmproject/libwebp -Description: Lossy compression of digital photographic images. -Build-Depends: opengl - -Feature: all -Description: enable all webp features -Build-Depends: giflib, libjpeg-turbo, zlib, libpng, tiff, freeglut (!osx), sdl1 (windows) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 11b0b79041fe32..97673b7e4ae4b6 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -1,65 +1,54 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO webmproject/libwebp - REF v1.0.2 - SHA512 27ca4e7c87d3114a5d3dba6801b5608207a9adc44d0fa62f7523d39be789d389d342d9db5e28c9301eff8fcb1471809c76680a68abd4ff97217b17dd13c4e22b + REF d7844e9762b61c9638c263657bd49e1690184832 # v1.1.0 + SHA512 13692970e7dd909cd6aaa03c9a0c863243baac1885644794362dec0c0b0721d6807f281f746215bfd856c6e0cb742b01a731a33fe075a32ff24496e10c1a94b4 HEAD_REF master PATCHES - 0001-build-fixes.patch + 0001-build.patch 0002-cmake-config-add-backwards-compatibility.patch - 0003-remove-missing-symbol.patch + 0003-always-mux.patch #always build libwebpmux 0004-add-missing-linked-library.patch - 0005-fix-static-build.patch + 0006-fix-dependecies-platform.patch + 0007-fix-arm-build.patch + 0008-sdl.patch + 0009-glut.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + anim WEBP_BUILD_ANIM_UTILS + gif2webp WEBP_BUILD_GIF2WEBP + img2webp WEBP_BUILD_IMG2WEBP + vwebp WEBP_BUILD_VWEBP + vwebp-sdl WEBP_HAVE_SDL + info WEBP_BUILD_WEBPINFO + mux WEBP_BUILD_WEBPMUX + extras WEBP_BUILD_EXTRAS + nearlossless WEBP_NEAR_LOSSLESS + simd WEBP_ENABLE_SIMD + cwebp WEBP_BUILD_CWEBP + dwebp WEBP_BUILD_DWEBP + swap16bitcsp WEBP_ENABLE_SWAP_16BIT_CSP + unicode WEBP_UNICODE ) -set(WEBP_BUILD_ANIM_UTILS OFF) -set(WEBP_BUILD_GIF2WEBP OFF) -set(WEBP_BUILD_IMG2WEBP OFF) -set(WEBP_BUILD_VWEBP OFF) -set(WEBP_BUILD_WEBPINFO OFF) -set(WEBP_BUILD_WEBPMUX OFF) -set(WEBP_BUILD_EXTRAS OFF) -set(WEBP_NEAR_LOSSLESS OFF) -if("all" IN_LIST FEATURES) - set(WEBP_BUILD_ANIM_UTILS ON) - set(WEBP_NEAR_LOSSLESS ON) - set(WEBP_BUILD_GIF2WEBP ON) - set(WEBP_BUILD_IMG2WEBP ON) - set(WEBP_BUILD_VWEBP ON) - set(WEBP_BUILD_WEBPINFO ON) - set(WEBP_BUILD_WEBPMUX ON) - set(WEBP_BUILD_EXTRAS ON) -endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(VCPKG_TARGET_IS_LINUX) message("WebP currently requires the following library from the system package manager:\n Xxf86vm\n\nThis can be installed on Ubuntu systems via apt-get install libxxf86vm-dev") endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(WEBP_BUILD_VWEBP OFF) - set(WEBP_BUILD_EXTRAS OFF) - message("Due to GLUT Framework problems with CMake, at the moment it's not possible to build VWebP on Mac. It has been disabled together with extras.") +if(VCPKG_TARGET_IS_OSX) + if("vwebp" IN_LIST FEATURES OR "extras" IN_LIST FEATURES) + message(FATAL_ERROR "Due to GLUT Framework problems with CMake, at the moment it's not possible to build VWebP or extras on Mac!") + endif() endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DWEBP_ENABLE_SIMD:BOOL=ON - -DWEBP_BUILD_ANIM_UTILS:BOOL=${WEBP_BUILD_ANIM_UTILS} - -DWEBP_BUILD_CWEBP:BOOL=OFF - -DWEBP_BUILD_DWEBP:BOOL=OFF - -DWEBP_BUILD_GIF2WEBP:BOOL=${WEBP_BUILD_GIF2WEBP} - -DWEBP_BUILD_IMG2WEBP:BOOL=${WEBP_BUILD_IMG2WEBP} - -DWEBP_BUILD_VWEBP:BOOL=${WEBP_BUILD_VWEBP} - -DWEBP_BUILD_WEBPINFO:BOOL=${WEBP_BUILD_WEBPINFO} - -DWEBP_BUILD_WEBPMUX:BOOL=${WEBP_BUILD_WEBPMUX} - -DWEBP_BUILD_EXTRAS:BOOL=${WEBP_BUILD_EXTRAS} - -DWEBP_BUILD_WEBP_JS:BOOL=OFF - -DWEBP_NEAR_LOSSLESS:BOOL=${WEBP_NEAR_LOSSLESS} - -DWEBP_ENABLE_SWAP_16BIT_CSP:BOOL=OFF + ${FEATURE_OPTIONS} OPTIONS_DEBUG -DCMAKE_DEBUG_POSTFIX=d ) @@ -69,59 +58,40 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake) - +vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake TARGET_PATH share/WebP) # find_package is called with WebP not libwebp file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/WebP) -file(GLOB CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/${PORT}/*) -file(COPY ${CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/webp/) -#somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it -if(CMAKE_HOST_WIN32) -set(EXECUTABLE_SUFFIX ".exe") -else() -set(EXECUTABLE_SUFFIX "") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libwebp.pc" "-lwebp" "-lwebpd") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libwebpdecoder.pc" "-lwebpdecoder" "-lwebpdecoderd") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libwebpdemux.pc" "-lwebpdemux" "-lwebpdemuxd") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libwebpmux.pc" "-lwebpmux" "-lwebpmuxd") endif() +vcpkg_fixup_pkgconfig() -if("all" IN_LIST FEATURES) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/get_disto${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/gif2webp${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/img2webp${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vwebp${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vwebp_sdl${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/webpinfo${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/webpmux${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/webp_quality${EXECUTABLE_SUFFIX}) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libwebp/) - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/get_disto${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/get_disto${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/get_disto${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/gif2webp${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/gif2webp${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/gif2webp${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/img2webp${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/img2webp${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/img2webp${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/vwebp${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vwebp${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/vwebp${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/vwebp_sdl${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vwebp_sdl${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/vwebp_sdl${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/webpinfo${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/webpinfo${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/webpinfo${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/webpmux${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/webpmux${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/webpmux${EXECUTABLE_SUFFIX}) + +set(BIN_NAMES get_disto gif2webp img2webp vwebp vwebp_sdl webpinfo webpmux webp_quality cwebp dwebp) +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/webp/") +foreach(tool ${BIN_NAMES}) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/webp_quality${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/webp_quality${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/webp_quality${EXECUTABLE_SUFFIX}) + + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/webp/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") endif() - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libwebp) +endforeach() +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/webp") + +#No tools +file(GLOB_RECURSE RESULT "${CURRENT_PACKAGES_DIR}/tools/") +list(LENGTH RESULT RES_LEN) +if(RES_LEN EQUAL 0) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libwebp/vcpkg.json b/ports/libwebp/vcpkg.json new file mode 100644 index 00000000000000..1f19252160bd96 --- /dev/null +++ b/ports/libwebp/vcpkg.json @@ -0,0 +1,145 @@ +{ + "name": "libwebp", + "version-string": "1.1.0", + "port-version": 4, + "description": "WebP codec: library to encode and decode images in WebP format", + "homepage": "https://github.com/webmproject/libwebp", + "dependencies": [ + { + "name": "libwebp", + "features": [ + "unicode" + ], + "platform": "windows" + } + ], + "default-features": [ + "nearlossless", + "simd" + ], + "features": { + "all": { + "description": "enable all features except for swap16bitcsp", + "dependencies": [ + { + "name": "libwebp", + "features": [ + "anim", + "cwebp", + "dwebp", + "gif2webp", + "img2webp", + "info", + "mux", + "nearlossless", + "simd" + ] + }, + { + "name": "libwebp", + "features": [ + "extras" + ], + "platform": "!osx" + }, + { + "name": "libwebp", + "features": [ + "vwebp-sdl" + ], + "platform": "!osx" + } + ] + }, + "anim": { + "description": "Build animation utilities.", + "dependencies": [ + { + "name": "libwebp", + "features": [ + "img2webp", + "mux" + ] + } + ] + }, + "cwebp": { + "description": "Build the cwebp command line tool." + }, + "dwebp": { + "description": "Build the dwebp command line tool." + }, + "extras": { + "description": "Build extras.", + "dependencies": [ + { + "name": "libwebp", + "features": [ + "vwebp" + ] + }, + { + "name": "sdl1", + "platform": "windows" + } + ] + }, + "gif2webp": { + "description": "Build the gif2webp conversion tool.", + "dependencies": [ + "giflib" + ] + }, + "img2webp": { + "description": "Build the img2webp animation tool.", + "dependencies": [ + "libjpeg-turbo", + "libpng", + "tiff" + ] + }, + "info": { + "description": "Build the webpinfo command line tool." + }, + "mux": { + "description": "Build the webpmux command line tool." + }, + "nearlossless": { + "description": "Enable near-lossless encoding" + }, + "simd": { + "description": "Enable any SIMD optimization." + }, + "swap16bitcsp": { + "description": "Enable byte swap for 16 bit colorspaces." + }, + "unicode": { + "description": "Build Unicode executables. (Adds definition UNICODE and _UNICODE)" + }, + "vwebp": { + "description": "Build the vwebp viewer tool.", + "dependencies": [ + { + "name": "freeglut", + "platform": "!osx" + }, + "opengl" + ] + }, + "vwebp-sdl": { + "description": "Build the vwebp viewer tool.", + "dependencies": [ + { + "name": "libwebp", + "features": [ + "vwebp" + ] + }, + { + "name": "sdl1", + "platform": "windows" + } + ] + } + } +} diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL deleted file mode 100644 index a180ec4201622e..00000000000000 --- a/ports/libwebsockets/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libwebsockets -Version: 3.1.0-3 -Build-Depends: zlib, openssl -Homepage: https://github.com/warmcat/libwebsockets -Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server. diff --git a/ports/libwebsockets/export-include-path.patch b/ports/libwebsockets/export-include-path.patch new file mode 100644 index 00000000000000..fe589ca3cfbf17 --- /dev/null +++ b/ports/libwebsockets/export-include-path.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f9b5557..ebc624b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1045,8 +1045,8 @@ file(RELATIVE_PATH + "${LWS_ABSOLUTE_INSTALL_CMAKE_DIR}" + "${LWS_ABSOLUTE_INSTALL_INCLUDE_DIR}") # Calculate the relative directory from the cmake dir. + +-if (DEFINED REL_INCLUDE_DIR) +- set(LWS__INCLUDE_DIRS "\${LWS_CMAKE_DIR}/${REL_INCLUDE_DIR}") ++if (1) ++ set(LWS__INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/../include") + endif() + + configure_file(${PROJECT_SOURCE_DIR}/cmake/libwebsockets-config.cmake.in +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 85b43d5..724f0b7 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -164,7 +164,7 @@ if (LWS_WITH_STATIC) + $ + $ + ) +- target_include_directories(websockets PRIVATE ${LWS_LIB_BUILD_INC_PATHS}) ++ target_include_directories(websockets PRIVATE $ PUBLIC $) + target_compile_definitions(websockets PRIVATE LWS_BUILDING_STATIC) + + if (WIN32) +@@ -190,7 +190,7 @@ if (LWS_WITH_SHARED) + $ + $ + ) +- target_include_directories(websockets_shared PRIVATE ${LWS_LIB_BUILD_INC_PATHS}) ++ target_include_directories(websockets_shared PRIVATE $ PUBLIC $) + target_compile_definitions(websockets_shared PRIVATE LWS_BUILDING_SHARED) + + # We want the shared lib to be named "libwebsockets" diff --git a/ports/libwebsockets/fix-build-error.patch b/ports/libwebsockets/fix-build-error.patch new file mode 100644 index 00000000000000..0bab319af44428 --- /dev/null +++ b/ports/libwebsockets/fix-build-error.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e737e5..75534c1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -422,6 +422,11 @@ set(LWS_LIBMOUNT_LIBRARIES CACHE PATH "Path to the libmount library") + set(LWS_EXT_PTHREAD_INCLUDE_DIR CACHE PATH "Path to an external pthreads include directory") + set(LWS_EXT_PTHREAD_LIBRARIES CACHE PATH "Path to an external pthreads library") + ++if(WIN32) ++ find_package(pthreads_windows REQUIRED) ++ set(LWS_EXT_PTHREAD_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR}) ++ set(LWS_EXT_PTHREAD_LIBRARIES ${PThreads4W_LIBRARY}) ++endif() + + if (LWS_WITH_HTTP_STREAM_COMPRESSION) + set(LWS_WITH_ZLIB 1) +@@ -728,7 +733,7 @@ if (MSVC) + # Turn off pointless microsoft security warnings. + add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + # Fail the build if any warnings +- add_compile_options(/W3 /WX) ++ add_compile_options(/W3 /WX /wd4142 /wd4267) + endif(MSVC) + + if (MINGW) diff --git a/ports/libwebsockets/fix-dependency-libuv.patch b/ports/libwebsockets/fix-dependency-libuv.patch new file mode 100644 index 00000000000000..1c63d25874211f --- /dev/null +++ b/ports/libwebsockets/fix-dependency-libuv.patch @@ -0,0 +1,13 @@ +diff --git a/lib/event-libs/libuv/CMakeLists.txt b/lib/event-libs/libuv/CMakeLists.txt +index fb810a8..2258ade 100644 +--- a/lib/event-libs/libuv/CMakeLists.txt ++++ b/lib/event-libs/libuv/CMakeLists.txt +@@ -36,7 +36,7 @@ set(LWS_LIBUV_INCLUDE_DIRS CACHE PATH "Path to the libuv include directory") + if ("${LWS_LIBUV_LIBRARIES}" STREQUAL "" OR "${LWS_LIBUV_INCLUDE_DIRS}" STREQUAL "") + if (NOT LIBUV_FOUND) + find_path(LIBUV_INCLUDE_DIRS NAMES uv.h) +- find_library(LIBUV_LIBRARIES NAMES uv) ++ find_library(LIBUV_LIBRARIES NAMES uv libuv) + endif() + else() + set(LIBUV_LIBRARIES ${LWS_LIBUV_LIBRARIES}) diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake index 06793dd8e53d40..4bbaefbb82b25d 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -1,56 +1,181 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO warmcat/libwebsockets - REF v3.1.0 - SHA512 e2a4c1b25bc6f028654a63fc01a2732e6c63414868f8d3d01fa477752fdabe0f61e8d271fe7dd2734db0e15b1250f6b0101285b6d694f971ec4bf67ba7ee067c + REF 8d605f0649ed1ab6d27a443c7688598ea21fdb75 # v4.2.2 + SHA512 824b7e7eded0fea41a1c22da8453b97a1ffd0f416e2d2ee3a23f799cfd449d1d0cc2f58de19a7d5dbd336e0ebceec16dd2a78cb80519d02bb49133047f99a9e2 HEAD_REF master + PATCHES + fix-dependency-libuv.patch + fix-build-error.patch + export-include-path.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LWS_WITH_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LWS_WITH_SHARED) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +## All LWS options could be possible features: +# # +# # Major individual features +# # +# option(LWS_WITH_NETWORK "Compile with network-related code" ON) +# option(LWS_ROLE_H1 "Compile with support for http/1 (needed for ws)" ON) +# option(LWS_ROLE_WS "Compile with support for websockets" ON) +# option(LWS_ROLE_DBUS "Compile with support for DBUS" OFF) +# option(LWS_ROLE_RAW_PROXY "Raw packet proxy" OFF) +# option(LWS_WITH_HTTP2 "Compile with server support for HTTP/2" ON) +# option(LWS_WITH_LWSWS "Libwebsockets Webserver" OFF) +# option(LWS_WITH_CGI "Include CGI (spawn process with network-connected stdin/out/err) APIs" OFF) +# option(LWS_IPV6 "Compile with support for ipv6" OFF) +# option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" OFF) +# option(LWS_WITH_PLUGINS "Support plugins for protocols and extensions" OFF) +# option(LWS_WITH_HTTP_PROXY "Support for HTTP proxying" OFF) +# option(LWS_WITH_ZIP_FOPS "Support serving pre-zipped files" OFF) +# option(LWS_WITH_SOCKS5 "Allow use of SOCKS5 proxy on client connections" OFF) +# option(LWS_WITH_GENERIC_SESSIONS "With the Generic Sessions plugin" OFF) +# option(LWS_WITH_PEER_LIMITS "Track peers and restrict resources a single peer can allocate" OFF) +# option(LWS_WITH_ACCESS_LOG "Support generating Apache-compatible access logs" OFF) +# option(LWS_WITH_RANGES "Support http ranges (RFC7233)" OFF) +# option(LWS_WITH_SERVER_STATUS "Support json + jscript server monitoring" OFF) +# option(LWS_WITH_THREADPOOL "Managed worker thread pool support (relies on pthreads)" OFF) +# option(LWS_WITH_HTTP_STREAM_COMPRESSION "Support HTTP stream compression" OFF) +# option(LWS_WITH_HTTP_BROTLI "Also offer brotli http stream compression (requires LWS_WITH_HTTP_STREAM_COMPRESSION)" OFF) +# option(LWS_WITH_ACME "Enable support for ACME automatic cert acquisition + maintenance (letsencrypt etc)" OFF) +# option(LWS_WITH_HUBBUB "Enable libhubbub rewriting support" OFF) +# option(LWS_WITH_FTS "Full Text Search support" OFF) +# # +# # TLS library options... all except mbedTLS are basically OpenSSL variants. +# # +# option(LWS_WITH_SSL "Include SSL support (defaults to OpenSSL or similar, mbedTLS if LWS_WITH_MBEDTLS is set)" ON) +# option(LWS_WITH_MBEDTLS "Use mbedTLS (>=2.0) replacement for OpenSSL. When setting this, you also may need to specify LWS_MBEDTLS_LIBRARIES and LWS_MBEDTLS_INCLUDE_DIRS" OFF) +# option(LWS_WITH_BORINGSSL "Use BoringSSL replacement for OpenSSL" OFF) +# option(LWS_WITH_CYASSL "Use CyaSSL replacement for OpenSSL. When setting this, you also need to specify LWS_CYASSL_LIBRARIES and LWS_CYASSL_INCLUDE_DIRS" OFF) +# option(LWS_WITH_WOLFSSL "Use wolfSSL replacement for OpenSSL. When setting this, you also need to specify LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS" OFF) +# option(LWS_SSL_CLIENT_USE_OS_CA_CERTS "SSL support should make use of the OS-installed CA root certs" ON) +# # +# # Event library options (may select multiple, or none for default poll() +# # +# option(LWS_WITH_LIBEV "Compile with support for libev" OFF) +# option(LWS_WITH_LIBUV "Compile with support for libuv" OFF) +# option(LWS_WITH_LIBEVENT "Compile with support for libevent" OFF) +# # +# # Static / Dynamic build options +# # +# option(LWS_WITH_STATIC "Build the static version of the library" ON) +# option(LWS_WITH_SHARED "Build the shared version of the library" ON) +# option(LWS_LINK_TESTAPPS_DYNAMIC "Link the test apps to the shared version of the library. Default is to link statically" OFF) +# option(LWS_STATIC_PIC "Build the static version of the library with position-independent code" OFF) +# # +# # Specific platforms +# # +# option(LWS_WITH_ESP32 "Build for ESP32" OFF) +# option(LWS_WITH_ESP32_HELPER "Build ESP32 helper" OFF) +# option(LWS_PLAT_OPTEE "Build for OPTEE" OFF) +# # +# # Client / Server / Test Apps build control +# # +# option(LWS_WITHOUT_CLIENT "Don't build the client part of the library" OFF) +# option(LWS_WITHOUT_SERVER "Don't build the server part of the library" OFF) +# option(LWS_WITHOUT_TESTAPPS "Don't build the libwebsocket-test-apps" OFF) +# option(LWS_WITHOUT_TEST_SERVER "Don't build the test server" OFF) +# option(LWS_WITHOUT_TEST_SERVER_EXTPOLL "Don't build the test server version that uses external poll" OFF) +# option(LWS_WITHOUT_TEST_PING "Don't build the ping test application" OFF) +# option(LWS_WITHOUT_TEST_CLIENT "Don't build the client test application" OFF) +# # +# # Extensions (permessage-deflate) +# # +# option(LWS_WITHOUT_EXTENSIONS "Don't compile with extensions" ON) +# # +# # Helpers + misc +# # +# option(LWS_WITHOUT_BUILTIN_GETIFADDRS "Don't use the BSD getifaddrs implementation from libwebsockets if it is missing (this will result in a compilation error) ... The default is to assume that your libc provides it. On some systems such as uclibc it doesn't exist." OFF) +# option(LWS_FALLBACK_GETHOSTBYNAME "Also try to do dns resolution using gethostbyname if getaddrinfo fails" OFF) +# option(LWS_WITHOUT_BUILTIN_SHA1 "Don't build the lws sha-1 (eg, because openssl will provide it" OFF) +# option(LWS_WITH_LATENCY "Build latency measuring code into the library" OFF) +# option(LWS_WITHOUT_DAEMONIZE "Don't build the daemonization api" ON) +# option(LWS_SSL_SERVER_WITH_ECDH_CERT "Include SSL server use ECDH certificate" OFF) +# option(LWS_WITH_LEJP "With the Lightweight JSON Parser" ON) +# option(LWS_WITH_SQLITE3 "Require SQLITE3 support" OFF) +# option(LWS_WITH_STRUCT_JSON "Generic struct serialization to and from JSON" ON) +# option(LWS_WITH_STRUCT_SQLITE3 "Generic struct serialization to and from SQLITE3" OFF) +# option(LWS_WITH_SMTP "Provide SMTP support" OFF) +# if (WIN32 OR LWS_WITH_ESP32) +# option(LWS_WITH_DIR "Directory scanning api support" OFF) +# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF) +# else() +# option(LWS_WITH_DIR "Directory scanning api support" ON) +# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" ON) +# endif() +# option(LWS_WITH_NO_LOGS "Disable all logging from being compiled in" OFF) +# option(LWS_AVOID_SIGPIPE_IGN "Android 7+ reportedly needs this" OFF) +# option(LWS_WITH_STATS "Keep statistics of lws internal operations" OFF) +# option(LWS_WITH_JOSE "JSON Web Signature / Encryption / Keys (RFC7515/6/) API" OFF) +# option(LWS_WITH_GENCRYPTO "Enable support for Generic Crypto apis independent of TLS backend" OFF) +# option(LWS_WITH_SELFTESTS "Selftests run at context creation" OFF) +# option(LWS_WITH_GCOV "Build with gcc gcov coverage instrumentation" OFF) +# option(LWS_WITH_EXPORT_LWSTARGETS "Export libwebsockets CMake targets. Disable if they conflict with an outer cmake project." ON) +# option(LWS_REPRODUCIBLE "Build libwebsockets reproducible. It removes the build user and hostname from the build" ON) +# option(LWS_WITH_MINIMAL_EXAMPLES "Also build the normally standalone minimal examples, for QA" OFF) +# option(LWS_WITH_LWSAC "lwsac Chunk Allocation api" ON) +# option(LWS_WITH_CUSTOM_HEADERS "Store and allow querying custom HTTP headers (H1 only)" ON) +# option(LWS_WITH_DISKCACHE "Hashed cache directory with lazy LRU deletion to size limit" OFF) +# option(LWS_WITH_ASAN "Build with gcc runtime sanitizer options enabled (needs libasan)" OFF) +# option(LWS_WITH_DIR "Directory scanning api support" OFF) +# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF) +# option(LWS_WITH_ZLIB "Include zlib support (required for extensions)" OFF) +# option(LWS_WITH_BUNDLED_ZLIB "Use bundled zlib version (Windows only)" ${LWS_WITH_BUNDLED_ZLIB_DEFAULT}) +# option(LWS_WITH_MINIZ "Use miniz instead of zlib" OFF) +# option(LWS_WITH_DEPRECATED_LWS_DLL "Migrate to lws_dll2 instead ASAP" OFF) +# option(LWS_WITH_SEQUENCER "lws_seq_t support" ON) +# option(LWS_WITH_EXTERNAL_POLL "Support external POLL integration using callback messages (not recommended)" OFF) +# option(LWS_WITH_LWS_DSH "Support lws_dsh_t Disordered Shared Heap" OFF) +## + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DLWS_WITH_STATIC=${LWS_WITH_STATIC} -DLWS_WITH_SHARED=${LWS_WITH_SHARED} - -DLWS_USE_BUNDLED_ZLIB=OFF + -DLWS_WITH_GENCRYPTO=ON + -DLWS_WITH_TLS=ON + -DLWS_WITH_BUNDLED_ZLIB=OFF -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON - -DLWS_HTTP2=ON + -DLWS_WITH_HTTP2=ON + -DLWS_WITH_HTTP_STREAM_COMPRESSION=ON # Since zlib is already a dependency + -DLWS_WITH_LIBUV=ON # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 ) -vcpkg_install_cmake() +vcpkg_cmake_install() -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_cmake_config_fixup(CONFIG_PATH cmake) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libwebsockets) + vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libwebsockets) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets-test-server) -file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsConfig.cmake LIBWEBSOCKETSCONFIG_CMAKE) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/libwebsockets-test-server") +file(READ "${CURRENT_PACKAGES_DIR}/share/libwebsockets/libwebsockets-config.cmake" LIBWEBSOCKETSCONFIG_CMAKE) string(REPLACE "/../include" "/../../include" LIBWEBSOCKETSCONFIG_CMAKE "${LIBWEBSOCKETSCONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsConfig.cmake "${LIBWEBSOCKETSCONFIG_CMAKE}") -file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake LIBWEBSOCKETSTARGETSDEBUG_CMAKE) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/libwebsockets/libwebsockets-config.cmake" "${LIBWEBSOCKETSCONFIG_CMAKE}") +file(READ "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake" LIBWEBSOCKETSTARGETSDEBUG_CMAKE) string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSDEBUG_CMAKE "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}") -file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake LIBWEBSOCKETSTARGETSRELEASE_CMAKE) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake" "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}") +file(READ "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake" LIBWEBSOCKETSTARGETSRELEASE_CMAKE) string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSRELEASE_CMAKE "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}") -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebsockets) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/copyright) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake" "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}") + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/websockets.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/lib/websockets.lib) + if (VCPKG_TARGET_IS_WINDOWS) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/websockets_static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/websockets.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/websockets_static.lib" "${CURRENT_PACKAGES_DIR}/lib/websockets.lib") endif() endif () + vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libwebsockets/vcpkg.json b/ports/libwebsockets/vcpkg.json new file mode 100644 index 00000000000000..e33c30a2ec43d1 --- /dev/null +++ b/ports/libwebsockets/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "libwebsockets", + "version-semver": "4.2.2", + "description": "Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server.", + "homepage": "https://github.com/warmcat/libwebsockets", + "supports": "!(arm | uwp)", + "dependencies": [ + "libuv", + "openssl", + "pthreads", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/libxdiff/portfile.cmake b/ports/libxdiff/portfile.cmake new file mode 100644 index 00000000000000..05b7ade351ac97 --- /dev/null +++ b/ports/libxdiff/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports being built for desktop" ON_TARGET "UWP") + +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 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_SHARED=${KEYSTONE_BUILD_SHARED} +) + +vcpkg_install_cmake() + +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() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XDiff TARGET_PATH share/XDiff) diff --git a/ports/libxdiff/vcpkg.json b/ports/libxdiff/vcpkg.json new file mode 100644 index 00000000000000..ab48b66baff822 --- /dev/null +++ b/ports/libxdiff/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libxdiff", + "version-string": "0.23", + "port-version": 1, + "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" +} diff --git a/ports/libxlsxwriter/0001-fix-build-error.patch b/ports/libxlsxwriter/0001-fix-build-error.patch deleted file mode 100644 index 5e00c96deebd6f..00000000000000 --- a/ports/libxlsxwriter/0001-fix-build-error.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fe566fe..e76ed46 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -306,31 +306,11 @@ endif() - - include(GNUInstallDirs) - --if(MSVC) -- if(CMAKE_CL_64) -- set(MSVC_FOLDER_PREFIX x64) -- else() -- set(MSVC_FOLDER_PREFIX Win32) -- endif() -- -- install(TARGETS ${PROJECT_NAME} -- LIBRARY DESTINATION "lib/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" -- ARCHIVE DESTINATION "lib/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" -- RUNTIME DESTINATION "bin/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" -- ) -- if (NOT BUILD_SHARED_LIBS) -- install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pdb -- DESTINATION "lib/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" -- ) -- endif() -- --else(MSVC) -- install(TARGETS ${PROJECT_NAME} -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -- ) --endif(MSVC) -+install(TARGETS ${PROJECT_NAME} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+) - install(FILES include/xlsxwriter.h DESTINATION include) - install(DIRECTORY include/xlsxwriter - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} diff --git a/ports/libxlsxwriter/0002-fix-uwp-build.patch b/ports/libxlsxwriter/0002-fix-uwp-build.patch deleted file mode 100644 index b6ae204793482d..00000000000000 --- a/ports/libxlsxwriter/0002-fix-uwp-build.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e76ed46..32ffa04 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -211,6 +211,9 @@ target_sources(${PROJECT_NAME} - ) - target_link_libraries(${PROJECT_NAME} LINK_PUBLIC ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES}) - target_compile_definitions(${PROJECT_NAME} PRIVATE ${LXW_PRIVATE_COMPILE_DEFINITIONS}) -+if (WINDOWSSTORE) -+ target_compile_definitions(${PROJECT_NAME} PRIVATE -DIOWIN32_USING_WINRT_API) -+endif() - target_include_directories(${PROJECT_NAME} - PRIVATE ${LXW_PRIVATE_INCLUDE_DIRS} - PUBLIC include include/xlsxwriter diff --git a/ports/libxlsxwriter/0003-fix-include-file.patch b/ports/libxlsxwriter/0003-fix-include-file.patch deleted file mode 100644 index faa0517b862198..00000000000000 --- a/ports/libxlsxwriter/0003-fix-include-file.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/include/xlsxwriter/utility.h b/include/xlsxwriter/utility.h -index 5b4b365..5f86335 100644 ---- a/include/xlsxwriter/utility.h -+++ b/include/xlsxwriter/utility.h -@@ -17,7 +17,9 @@ - #define __LXW_UTILITY_H__ - - #include -+#ifndef _MSC_VER - #include -+#endif - #include "common.h" - #include "xmlwriter.h" - diff --git a/ports/libxlsxwriter/CONTROL b/ports/libxlsxwriter/CONTROL deleted file mode 100644 index 8848ce5f9ea4ed..00000000000000 --- a/ports/libxlsxwriter/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libxlsxwriter -Version: 0.8.7-1 -Description: Libxlsxwriter is a C library that can be used to write text, numbers, formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file. -Build-Depends: zlib diff --git a/ports/libxlsxwriter/portfile.cmake b/ports/libxlsxwriter/portfile.cmake index cf77a09e4157ad..20700c76c2e0dd 100644 --- a/ports/libxlsxwriter/portfile.cmake +++ b/ports/libxlsxwriter/portfile.cmake @@ -1,34 +1,27 @@ -include(vcpkg_common_functions) - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH + OUT_SOURCE_PATH SOURCE_PATH REPO jmcnamara/libxlsxwriter - REF RELEASE_0.8.7 - SHA512 20bf09f084808a8db00315848213c550fb809b587ea49ce3b25b310de981c176a44c518452507b6e00ca3f0a8e0056d88a6f575c031d54aa68791575cb9ab285 - HEAD_REF master - PATCHES - 0001-fix-build-error.patch - 0002-fix-uwp-build.patch - 0003-fix-include-file.patch + REF 576d169463c7f9990045fd9223f5cf688150def0 #RELEASE_1.1.3 + SHA512 376db117df3ab48a6471d7004fc77fb8bd9b5d9dfaff53675f1bd99c8bc9bec7cadcefbd7116b206ef4703b9146cf097ad3b8aadff36b66302f1c82e8e1fa988 + HEAD_REF master ) -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (VCPKG_TARGET_IS_UWP) set(USE_WINDOWSSTORE ON) else() set(USE_WINDOWSSTORE OFF) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DWINDOWSSTORE=${USE_WINDOWSSTORE} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DWINDOWSSTORE=${USE_WINDOWSSTORE} ) -vcpkg_install_cmake() +vcpkg_cmake_install() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/License.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL "${SOURCE_PATH}/License.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/libxlsxwriter/vcpkg.json b/ports/libxlsxwriter/vcpkg.json new file mode 100644 index 00000000000000..2138d56be6f8c6 --- /dev/null +++ b/ports/libxlsxwriter/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libxlsxwriter", + "version-semver": "1.1.3", + "description": "Libxlsxwriter is a C library that can be used to write text, numbers, formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.", + "homepage": "https://github.com/jmcnamara/libxlsxwriter", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + "zlib" + ] +} diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt deleted file mode 100644 index 12142f4ff9e8ec..00000000000000 --- a/ports/libxml2/CMakeLists.txt +++ /dev/null @@ -1,150 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(libxml2 C) - -option(INSTALL_HEADERS "Install public header files" ON) - -set(CMAKE_SHARED_LIBRARY_PREFIX) -set(CMAKE_STATIC_LIBRARY_PREFIX) - -find_package(ZLIB REQUIRED) -find_package(LibLZMA REQUIRED) -find_package(unofficial-iconv REQUIRED) - -file(GLOB SOURCES *.c) -list(FILTER SOURCES EXCLUDE REGEX "/(run|test|trio)[^/]*$") -list(FILTER SOURCES EXCLUDE REGEX "xml(lint|catalog).c$") -list(FILTER SOURCES EXCLUDE REGEX "rngparser\.c$") - -# Generate xmlexports with fixed definition of LIBXML_STATIC -file(READ include/libxml/xmlexports.h XMLEXPORTS_H) -if(BUILD_SHARED_LIBS) - string(REPLACE "!defined(LIBXML_STATIC)" "1" XMLEXPORTS_H "${XMLEXPORTS_H}") -else() - string(REPLACE "!defined(LIBXML_STATIC)" "0" XMLEXPORTS_H "${XMLEXPORTS_H}") -endif() -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/xmlexports.h "${XMLEXPORTS_H}") - -if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - configure_file(include/win32config.h config.h COPYONLY) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - configure_file("${PORT_DIR}/config.osx.h" config.h COPYONLY) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - configure_file("${PORT_DIR}/config.linux.h" config.h COPYONLY) -else() - message(FATAL_ERROR "No config.h checked in for the target platform. Please run ./configure for libxml2 and add the resulting config.h into this port.") -endif() - -message(STATUS "Reading version info from configure.ac") - -file(STRINGS "configure.ac" - _libxml_version_defines REGEX "LIBXML_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") - -foreach(ver ${_libxml_version_defines}) - if(ver MATCHES "LIBXML_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") - set(LIBXML_${CMAKE_MATCH_1}_VERSION "${CMAKE_MATCH_2}" CACHE INTERNAL "") - endif() -endforeach() - -set(VERSION ${LIBXML_MAJOR_VERSION}.${LIBXML_MINOR_VERSION}.${LIBXML_MICRO_VERSION}) -math(EXPR LIBXML_VERSION_NUMBER - "${LIBXML_MAJOR_VERSION} * 10000 + ${LIBXML_MINOR_VERSION} * 100 + ${LIBXML_MICRO_VERSION}") - -message(STATUS "LIBXML_MAJOR_VERSION: ${LIBXML_MAJOR_VERSION}") -message(STATUS "LIBXML_MINOR_VERSION: ${LIBXML_MINOR_VERSION}") -message(STATUS "LIBXML_MICRO_VERSION: ${LIBXML_MICRO_VERSION}") -message(STATUS "VERSION: ${VERSION}") -message(STATUS "LIBXML_VERSION_NUMBER: ${LIBXML_VERSION_NUMBER}") - -set(WITH_TRIO 0) -set(WITH_THREADS 1) -set(WITH_THREAD_ALLOC 0) -set(WITH_TREE 1) -set(WITH_OUTPUT 1) -set(WITH_PUSH 1) -set(WITH_READER 1) -set(WITH_PATTERN 1) -set(WITH_WRITER 1) -set(WITH_SAX1 1) -set(WITH_FTP 1) -set(WITH_HTTP 1) -set(WITH_VALID 1) -set(WITH_HTML 1) -set(WITH_LEGACY 1) -set(WITH_C14N 1) -set(WITH_CATALOG 1) -set(WITH_DOCB 1) -set(WITH_XPATH 1) -set(WITH_XPTR 1) -set(WITH_XINCLUDE 1) -set(WITH_ICONV 1) -set(WITH_ICU 0) -set(WITH_ISO8859X 1) -set(WITH_DEBUG 1) -set(WITH_MEM_DEBUG 0) -set(WITH_RUN_DEBUG 0) -set(WITH_REGEXPS 1) -set(WITH_SCHEMAS 1) -set(WITH_SCHEMATRON 1) -set(WITH_MODULES 1) -set(MODULE_EXTENSION ".so") -set(WITH_ZLIB 1) -set(WITH_LZMA 1) - -if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(WITH_CATALOG 0) - set(WITH_MODULES 0) -endif() - -message(STATUS "Generating xmlversion.h") - -configure_file(include/libxml/xmlversion.h.in include/libxml/xmlversion.h) - -add_library(libxml2 ${SOURCES}) -if(INSTALL_HEADERS) - file(GLOB PUBLIC_HEADERS include/libxml/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/libxml/xmlversion.h) - list(FILTER PUBLIC_HEADERS EXCLUDE REGEX "xmlexports\\.h$") - list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/xmlexports.h) - - set_target_properties(libxml2 PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") -endif() -target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBLZMA_INCLUDE_DIRS}) -target_link_libraries(libxml2 PRIVATE - unofficial::iconv::libcharset unofficial::iconv::libiconv - ZLIB::ZLIB - ${LIBLZMA_LIBRARIES} -) -if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - target_include_directories(libxml2 PRIVATE win32/vc10) - target_link_libraries(libxml2 PRIVATE - wsock32.lib - ws2_32.lib - ) - target_compile_definitions(libxml2 PRIVATE - -DHAVE_WIN32_THREADS - _WINSOCK_DEPRECATED_NO_WARNINGS - ) -endif() - -target_compile_definitions(libxml2 PRIVATE - -D_CRT_SECURE_NO_DEPRECATE - -D_CRT_NONSTDC_NO_DEPRECATE - -D_REENTRANT - -DNOLIBTOOL - -DHAVE_ZLIB_H - -DHAVE_LZMA_H -) -if(NOT BUILD_SHARED_LIBS) - target_compile_definitions(libxml2 PRIVATE -DLIBXML_STATIC) -endif() - -set(TARGET_INSTALL_OPTIONS) -if(INSTALL_HEADERS) - set(TARGET_INSTALL_OPTIONS PUBLIC_HEADER DESTINATION include/libxml) -endif() - -install(TARGETS libxml2 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - ${TARGET_INSTALL_OPTIONS} -) diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL deleted file mode 100644 index 7a4b02ceaf3887..00000000000000 --- a/ports/libxml2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libxml2 -Version: 2.9.9-4 -Homepage: https://xmlsoft.org/ -Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) -Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libxml2/config.linux.h b/ports/libxml2/config.linux.h deleted file mode 100644 index d029e95cfa5d11..00000000000000 --- a/ports/libxml2/config.linux.h +++ /dev/null @@ -1,56 +0,0 @@ -#define GETHOSTBYNAME_ARG_CAST /**/ -#define HAVE_ANSIDECL_H 1 -#define HAVE_ARPA_INET_H 1 -#define HAVE_ARPA_NAMESER_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_DIRENT_H 1 -#define HAVE_DLFCN_H 1 -#define HAVE_DLOPEN /**/ -#define HAVE_ERRNO_H 1 -#define HAVE_FCNTL_H 1 -#define HAVE_FLOAT_H 1 -#define HAVE_FTIME 1 -#define HAVE_GETADDRINFO /**/ -#define HAVE_GETTIMEOFDAY 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_ISASCII 1 -#define HAVE_LIMITS_H 1 -#define HAVE_LOCALTIME 1 -#define HAVE_LZMA_H 1 -#define HAVE_MALLOC_H 1 -#define HAVE_MATH_H 1 -#define HAVE_MMAP 1 -#define HAVE_NETDB_H 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_POLL_H 1 -#define HAVE_PTHREAD_H /**/ -#define HAVE_PUTENV 1 -#define HAVE_RAND 1 -#define HAVE_RAND_R 1 -#define HAVE_RESOLV_H 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_SRAND 1 -#define HAVE_STAT 1 -#define HAVE_STDARG_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_SYS_MMAN_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIMEB_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_TIME 1 -#define HAVE_TIME_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_VA_COPY 1 -#define HAVE_ZLIB_H 1 -#define ICONV_CONST -#define SEND_ARG2_CAST /**/ -#define SUPPORT_IP6 /**/ -#define VA_LIST_IS_ARRAY 1 -#define XML_SOCKLEN_T socklen_t diff --git a/ports/libxml2/config.osx.h b/ports/libxml2/config.osx.h deleted file mode 100644 index 95d83edc1fd232..00000000000000 --- a/ports/libxml2/config.osx.h +++ /dev/null @@ -1,54 +0,0 @@ -#define GETHOSTBYNAME_ARG_CAST /**/ -#define HAVE_ARPA_INET_H 1 -#define HAVE_ARPA_NAMESER_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_DIRENT_H 1 -#define HAVE_DLFCN_H 1 -#define HAVE_DLOPEN /**/ -#define HAVE_ERRNO_H 1 -#define HAVE_FCNTL_H 1 -#define HAVE_FLOAT_H 1 -#define HAVE_FTIME 1 -#define HAVE_GETADDRINFO /**/ -#define HAVE_GETTIMEOFDAY 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_ISASCII 1 -#define HAVE_LIMITS_H 1 -#define HAVE_LOCALTIME 1 -#define HAVE_LZMA_H 1 -#define HAVE_MATH_H 1 -#define HAVE_MMAP 1 -#define HAVE_NETDB_H 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_POLL_H 1 -#define HAVE_PTHREAD_H /**/ -#define HAVE_PUTENV 1 -#define HAVE_RAND 1 -#define HAVE_RAND_R 1 -#define HAVE_RESOLV_H 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_SRAND 1 -#define HAVE_STAT 1 -#define HAVE_STDARG_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_SYS_MMAN_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIMEB_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_TIME 1 -#define HAVE_TIME_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_VA_COPY 1 -#define HAVE_ZLIB_H 1 -#define ICONV_CONST -#define SEND_ARG2_CAST /**/ -#define SUPPORT_IP6 /**/ -#define VA_LIST_IS_ARRAY 1 -#define XML_SOCKLEN_T socklen_t diff --git a/ports/libxml2/fix-uwp.patch b/ports/libxml2/fix-uwp.patch new file mode 100644 index 00000000000000..ce57a9ed1237c4 --- /dev/null +++ b/ports/libxml2/fix-uwp.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b45d62..ba8bfec 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -129,6 +129,7 @@ endif() + + if(MSVC) + configure_file(include/win32config.h config.h COPYONLY) ++ add_compile_options(/wd4996) + else() + check_c_source_compiles(" + void __attribute__((destructor)) diff --git a/ports/libxml2/fix_cmakelist.patch b/ports/libxml2/fix_cmakelist.patch new file mode 100644 index 00000000000000..b98ca86eca16e2 --- /dev/null +++ b/ports/libxml2/fix_cmakelist.patch @@ -0,0 +1,119 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a437717ba..0a11039d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 3.15) + +-project(libxml2 VERSION 2.9.10 LANGUAGES C) ++project(libxml2 VERSION 2.9.12 LANGUAGES C) + + include(CheckCSourceCompiles) + include(CheckFunctionExists) +@@ -465,15 +465,15 @@ endif() + if(LIBXML2_WITH_ICU) + target_link_libraries(LibXml2 PRIVATE ICU::data ICU::i18n ICU::uc) + if(WIN32) +- set(ICU_LIBS "-licudt -licuin -licuuc") ++ set(ICU_LIBS "icu-i18n") + else() +- set(ICU_LIBS "-licudata -licui18n -licuuc") ++ set(ICU_LIBS "icu-i18n") + endif() + endif() + + if(LIBXML2_WITH_LZMA) + target_link_libraries(LibXml2 PRIVATE LibLZMA::LibLZMA) +- set(LZMA_LIBS "-llzma") ++ set(LZMA_LIBS "liblzma") + endif() + + if(LIBXML2_WITH_THREADS) +@@ -483,7 +483,7 @@ endif() + + if(LIBXML2_WITH_ZLIB) + target_link_libraries(LibXml2 PRIVATE ZLIB::ZLIB) +- set(Z_LIBS "-lz") ++ set(Z_LIBS "zlib") + endif() + + set_target_properties( +@@ -495,24 +495,9 @@ set_target_properties( + PREFIX lib + VERSION ${PROJECT_VERSION} + ) +- ++set(XML_LIB_NAME xml2) + if(MSVC) +- if(BUILD_SHARED_LIBS) +- set_target_properties( +- LibXml2 +- PROPERTIES +- DEBUG_POSTFIX d +- ) +- else() +- set_target_properties( +- LibXml2 +- PROPERTIES +- DEBUG_POSTFIX sd +- MINSIZEREL_POSTFIX s +- RELEASE_POSTFIX s +- RELWITHDEBINFO_POSTFIX s +- ) +- endif() ++ set(XML_LIB_NAME libxml2) + endif() + + install(FILES ${LIBXML2_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development) +@@ -659,30 +644,30 @@ install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/libxml2 COMPONEN + + configure_package_config_file( + libxml2-config.cmake.cmake.in libxml2-config.cmake +- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} ++ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + ) + + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + COMPONENT development + ) + + write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake + VERSION ${PROJECT_VERSION} +- COMPATIBILITY ExactVersion ++ COMPATIBILITY SameMinorVersion + ) + + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + COMPONENT development + ) + + install( + EXPORT LibXml2 +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + NAMESPACE LibXml2:: + FILE libxml2-export.cmake + COMPONENT development +diff --git a/libxml-2.0.pc.in b/libxml-2.0.pc.in +index 2653a7c56..d1bff5bcc 100644 +--- a/libxml-2.0.pc.in ++++ b/libxml-2.0.pc.in +@@ -7,7 +7,8 @@ modules=@WITH_MODULES@ + Name: libXML + Version: @VERSION@ + Description: libXML library version2. +-Requires: +-Libs: -L${libdir} -lxml2 +-Libs.private: @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@ ++Requires: ++Requires.private: @ICU_LIBS@ @Z_LIBS@ @LZMA_LIBS@ ++Libs: -L${libdir} -l@XML_LIB_NAME@ ++Libs.private: @THREAD_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@ + Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@ diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index de2dfe0afab58d..931dc7756d9f8c 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -1,33 +1,94 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.gnome.org/ OUT_SOURCE_PATH SOURCE_PATH REPO GNOME/libxml2 - REF v2.9.9 - SHA512 bfcc08bd033f538a968205f0f9e2da4c3438ec2f35f017289783903365e13ed93d83f2f63c7497344a362b7418170ee586a5ecb45493e30feaa0f62b22a57b54 + REF b48e77cf4f6fa0792c5f4b639707a2b0675e461b + SHA512 2d20867961b8d8a0cb0411192146882b976c1276d2e8ecd9a7ee3f1eb287f64e59282736f58c641b66abf63ba45c9421f27e13ec09a0b10814cd56987b18cb5b HEAD_REF master + PATCHES + fix_cmakelist.patch + fix-uwp.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +if (VCPKG_TARGET_IS_UWP) + message(WARNING "Feature network couldn't be enabled on UWP, disable http and ftp automatically.") + set(ENABLE_NETWORK 0) +else() + set(ENABLE_NETWORK 1) +endif() -vcpkg_configure_cmake( +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "tools" LIBXML2_WITH_PROGRAMS +) +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DPORT_DIR=${CMAKE_CURRENT_LIST_DIR} - OPTIONS_DEBUG -DINSTALL_HEADERS=OFF + OPTIONS + ${FEATURE_OPTIONS} + -DLIBXML2_WITH_TESTS=OFF + -DLIBXML2_WITH_HTTP=${ENABLE_NETWORK} + -DLIBXML2_WITH_FTP=${ENABLE_NETWORK} + -DLIBXML2_WITH_HTML=ON + -DLIBXML2_WITH_C14N=ON + -DLIBXML2_WITH_CATALOG=ON + -DLIBXML2_WITH_DEBUG=ON + -DLIBXML2_WITH_DOCB=ON + -DLIBXML2_WITH_ICONV=ON + -DLIBXML2_WITH_ISO8859X=ON + -DLIBXML2_WITH_ZLIB=ON + -DLIBXML2_WITH_ICU=OFF # Culprit of linkage issues? Solving this is probably another PR + -DLIBXML2_WITH_LZMA=ON + -DLIBXML2_WITH_LEGACY=ON + -DLIBXML2_WITH_MEM_DEBUG=OFF + -DLIBXML2_WITH_MODULES=ON + -DLIBXML2_WITH_OUTPUT=ON + -DLIBXML2_WITH_PATTERN=ON + -DLIBXML2_WITH_PUSH=ON + -DLIBXML2_WITH_PYTHON=OFF + -DLIBXML2_WITH_READER=ON + -DLIBXML2_WITH_REGEXPS=ON + -DLIBXML2_WITH_RUN_DEBUG=OFF + -DLIBXML2_WITH_SAX1=ON + -DLIBXML2_WITH_SCHEMAS=ON + -DLIBXML2_WITH_SCHEMATRON=ON + -DLIBXML2_WITH_THREADS=ON + -DLIBXML2_WITH_THREAD_ALLOC=OFF + -DLIBXML2_WITH_TREE=ON + -DLIBXML2_WITH_VALID=ON + -DLIBXML2_WITH_WRITER=ON + -DLIBXML2_WITH_XINCLUDE=ON + -DLIBXML2_WITH_XPATH=ON + -DLIBXML2_WITH_XPTR=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() -# Handle copyright -configure_file(${SOURCE_PATH}/Copyright ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# Install usage -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libxml2) +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES xmllint xmlcatalog AUTO_CLEAN) +endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(_file "${CURRENT_PACKAGES_DIR}/include/libxml2/libxml/xmlexports.h") + file(READ "${_file}" _contents) + string(REPLACE "#ifdef LIBXML_STATIC" "#undef LIBXML_STATIC\n#define LIBXML_STATIC\n#ifdef LIBXML_STATIC" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") endif() + +file(COPY "${CURRENT_PACKAGES_DIR}/include/libxml2/" DESTINATION "${CURRENT_PACKAGES_DIR}/include") # TODO: Fix usage in all dependent ports hardcoding the wrong include path. + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +#Cleanup +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/xml2Conf.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/xml2Conf.sh") \ No newline at end of file diff --git a/ports/libxml2/usage b/ports/libxml2/usage index fd94c4b4e442da..c77cdbce5dd551 100644 --- a/ports/libxml2/usage +++ b/ports/libxml2/usage @@ -1,5 +1,4 @@ The package libxml2 is compatible with built-in CMake targets: - find_package(LibXml2 REQUIRED) - target_include_directories(main PRIVATE ${LIBXML2_INCLUDE_DIR}) - target_link_libraries(main PRIVATE ${LIBXML2_LIBRARIES}) + find_package(LibXml2 CONFIG REQUIRED) + target_link_libraries(main PRIVATE LibXml2::LibXml2) diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index b6ec9571a34c61..f80be639addbc8 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -1,18 +1,49 @@ _find_package(${ARGS}) if(LibXml2_FOUND) + list(APPEND LIBXML2_INCLUDE_DIRS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") + list(APPEND LIBXML2_INCLUDE_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") # This is wrong but downstream doesn't correctly use _DIR vs _DIRS variables + if(TARGET LibXml2::LibXml2) + target_include_directories(LibXml2::LibXml2 INTERFACE "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") + endif() +endif() +if(LibXml2_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT ${ARGV0}_CONFIG) find_package(LibLZMA) find_package(ZLIB) - + find_package(Iconv) + include(SelectLibraryConfigurations) + find_library(LIBXML2_LIBRARY_DEBUG NAMES xml2 libxml2 xml2s libxml2s xml2d libxml2d xml2sd libxml2sd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH) + find_library(LIBXML2_LIBRARY_RELEASE NAMES xml2 libxml2 xml2s libxml2s NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + unset(LIBXML2_LIBRARIES) + unset(LIBXML2_LIBRARY CACHE) + select_library_configurations(LIBXML2) list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES}) - - if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - list(APPEND LIBXML2_LIBRARIES - debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib - optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib - debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib - optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib - ws2_32) - elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(Iconv_LIBRARIES) + list(APPEND LIBXML2_LIBRARIES ${Iconv_LIBRARIES}) + endif() + if(TARGET LibXml2::LibXml2 AND LIBXML2_LIBRARY_RELEASE) + set_target_properties(LibXml2::LibXml2 PROPERTIES IMPORTED_LOCATION_RELEASE "${LIBXML2_LIBRARY_RELEASE}") + endif() + if(TARGET LibXml2::LibXml2 AND LIBXML2_LIBRARY_DEBUG) + set_target_properties(LibXml2::LibXml2 PROPERTIES IMPORTED_LOCATION_DEBUG "${LIBXML2_LIBRARY_DEBUG}") + endif() + cmake_policy(PUSH) + cmake_policy(SET CMP0079 NEW) + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(APPEND LIBXML2_LIBRARIES m) + if(TARGET LibXml2::LibXml2) + set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "m") + endif() + elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") + list(APPEND LIBXML2_LIBRARIES ws2_32) + if(TARGET LibXml2::LibXml2) + set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "ws2_32") + endif() + endif() + if(TARGET LibXml2::LibXml2) + set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "liblzma::liblzma" "ZLIB::ZLIB") + if(TARGET Iconv::Iconv) + set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Iconv::Iconv") + endif() endif() + cmake_policy(POP) endif() diff --git a/ports/libxml2/vcpkg.json b/ports/libxml2/vcpkg.json new file mode 100644 index 00000000000000..68cb1e3eb4da44 --- /dev/null +++ b/ports/libxml2/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "libxml2", + "version-semver": "2.9.12", + "port-version": 4, + "description": "Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform).", + "homepage": "https://xmlsoft.org/", + "dependencies": [ + "libiconv", + "liblzma", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "tools": { + "description": "Build tools" + } + } +} diff --git a/ports/libxmlmm/CMakeLists.txt b/ports/libxmlmm/CMakeLists.txt new file mode 100644 index 00000000000000..721641a64be0bc --- /dev/null +++ b/ports/libxmlmm/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required(VERSION 3.8) +project(libxmlmm CXX) + +set(CMAKE_SHARED_LIBRARY_PREFIX) +set(CMAKE_STATIC_LIBRARY_PREFIX) + +find_package(LibXml2 REQUIRED) + +set(HEADERS_LIBXMLMM + libxmlmm/Attribute.h + libxmlmm/CData.h + libxmlmm/Comment.h + libxmlmm/Content.h + libxmlmm/defines.h + libxmlmm/Document.h + libxmlmm/Element.h + libxmlmm/exceptions.h + libxmlmm/libxmlmm.h + libxmlmm/LibXmlSentry.h + libxmlmm/Node.h + libxmlmm/ProcessingInstruction.h + libxmlmm/Text.h + libxmlmm/utils.h +) + +set(SOURCES_LIBXMLMM + libxmlmm/Attribute.cpp + libxmlmm/CData.cpp + libxmlmm/Comment.cpp + libxmlmm/Content.cpp + libxmlmm/Document.cpp + libxmlmm/Element.cpp + libxmlmm/LibXmlSentry.cpp + libxmlmm/Node.cpp + libxmlmm/ProcessingInstruction.cpp + libxmlmm/Text.cpp + libxmlmm/utils.cpp +) + +add_library(libxmlmm ${SOURCES_LIBXMLMM}) +include_directories(${LIBXML2_INCLUDE_DIR}) +target_link_libraries (libxmlmm ${LIBXML2_LIBRARIES}) + +set_target_properties(libxmlmm PROPERTIES + CXX_STANDARD 17 + PUBLIC_HEADER "${HEADERS_LIBXMLMM}" +) + +target_include_directories(libxmlmm PUBLIC + $ + $) + +install(TARGETS ${PROJECT_NAME} + EXPORT litehtmlTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include/libxmlmm +) diff --git a/ports/libxmlmm/portfile.cmake b/ports/libxmlmm/portfile.cmake new file mode 100644 index 00000000000000..552bd6cb2436bf --- /dev/null +++ b/ports/libxmlmm/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rioki/libxmlmm + REF r0.6 + SHA512 4f619e730de2f88b891ef31dd7ced2e6be75fff7f3852ec178843bf8d099d2e1ea84e0fcde35ff7fefc201b026f63e4b5d55f88e48334c49a0333be0327894df + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Handle copyright +configure_file(${SOURCE_PATH}/README.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/libxmlmm/vcpkg.json b/ports/libxmlmm/vcpkg.json new file mode 100644 index 00000000000000..03fdcba58d95d3 --- /dev/null +++ b/ports/libxmlmm/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "libxmlmm", + "version-string": "0.6.0", + "port-version": 1, + "description": "Libxmlmm is a C++ wrapper for libxml 2.0 that only relies on standard C++ and libxml2.", + "homepage": "https://github.com/rioki/libxmlmm", + "dependencies": [ + "libxml2" + ] +} diff --git a/ports/libxmlpp/CMakeLists.txt b/ports/libxmlpp/CMakeLists.txt deleted file mode 100644 index bbaae7cda22486..00000000000000 --- a/ports/libxmlpp/CMakeLists.txt +++ /dev/null @@ -1,95 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -project(libxmlpp) - -set(CMAKE_CXX_STANDARD 17) - -find_path(GLIBMM_INCLUDE_DIR NAMES glibmm.h) -find_library(GLIBMM_LIBRARY NAMES glibmm) -find_library(GIOMM_LIBRARY NAMES giomm) -find_library(GLIB_LIBRARY NAMES glib glib-2.0) -find_library(GIO_LIBRARY NAMES gio gio-2.0) -find_library(GMODULE_LIBRARY NAMES gmodule gmodule-2.0) -find_library(GOBJECT_LIBRARY NAMES gobject gobject-2.0) -find_library(SIGCPP_LIBRARY NAMES sigc sigc-2.0) -find_library(FFI_LIBRARY NAMES ffi libffi) -find_library(PCRE_LIBRARY NAMES pcre libpcre) -find_package(LibXml2 REQUIRED) -find_package(LibLZMA REQUIRED) -find_package(ZLIB REQUIRED) - -if(APPLE) - find_library(LIBINTL_LIBRARY NAMES intl) -endif() - -find_package(unofficial-iconv REQUIRED) -link_libraries(${LIBINTL_LIBRARY} unofficial::iconv::libiconv) - -if(APPLE) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - find_library(CORESERVICES_LIBRARY CoreServices) - find_library(FOUNDATION_LIBRARY Foundation) - link_libraries(${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${FOUNDATION_LIBRARY}) -endif() - -link_libraries( - ${GIOMM_LIBRARY} - ${GLIBMM_LIBRARY} - ${GMODULE_LIBRARY} - ${GOBJECT_LIBRARY} - ${GIO_LIBRARY} - ${GLIB_LIBRARY} - ${SIGCPP_LIBRARY} - ${FFI_LIBRARY} - ${LIBXML2_LIBRARIES} - ${PCRE_LIBRARY} - ${LIBLZMA_LIBRARIES} - ZLIB::ZLIB -) -include_directories(${GLIBMM_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIRS} ${LIBLZMA_INCLUDE_DIRS}) -include_directories(. ${CMAKE_BINARY_DIR}/config) -if(NOT WIN32) - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) - link_libraries(Threads::Threads ${CMAKE_DL_LIBS}) -endif() - -# config file -if(WIN32) - configure_file(MSVC_Net2010/libxml++/libxml++config.h ${CMAKE_BINARY_DIR}/config/libxml++config.h COPYONLY) -else() - set(ENV{GLIBMM_CFLAGS} -I${GLIBMM_INCLUDE_DIR}) - set(ENV{GLIBMM_LIBS} "${GLIBMM_LIBRARY}") - set(ENV{GIOMM_CFLAGS} -I${GLIBMM_INCLUDE_DIR}) - set(ENV{GIOMM_LIBS} "${GIOMM_LIBRARY}") - set(ENV{PKG_CONFIG} "echo") - - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config) - execute_process( - COMMAND "${CMAKE_SOURCE_DIR}/configure" - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config - RESULT_VARIABLE res - ) - if(NOT res EQUAL 0) - message(FATAL_ERROR "Configure failed.") - endif() -endif() - -file(GLOB_RECURSE SOURCES libxml++/*.cc) -add_library(xml++ ${SOURCES}) -target_compile_definitions(xml++ PRIVATE -DLIBXMLPP_BUILD) - -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES ${CMAKE_BINARY_DIR}/config/libxml++config.h DESTINATION include) - install(DIRECTORY libxml++ DESTINATION include FILES_MATCHING PATTERN *.h) -endif() -install( - TARGETS xml++ - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib -) - -if(NOT DISABLE_EXAMPLES) - add_executable(dom_build examples/dom_build/main.cc) - target_link_libraries(dom_build xml++) -endif() diff --git a/ports/libxmlpp/CONTROL b/ports/libxmlpp/CONTROL deleted file mode 100644 index 31b54a74c6f6c6..00000000000000 --- a/ports/libxmlpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libxmlpp -Version: 2.40.1-3 -Description: a C++ wrapper for the libxml XML parser library. -Build-Depends: libxml2, glibmm diff --git a/ports/libxmlpp/fixAutoPtrExpired.patch b/ports/libxmlpp/fixAutoPtrExpired.patch deleted file mode 100644 index 98d4df6bc63944..00000000000000 --- a/ports/libxmlpp/fixAutoPtrExpired.patch +++ /dev/null @@ -1,114 +0,0 @@ -diff --git a/libxml++/parsers/saxparser.h b/libxml++/parsers/saxparser.h -index 1362ca3..0bd36d2 100644 ---- a/libxml++/parsers/saxparser.h -+++ b/libxml++/parsers/saxparser.h -@@ -221,7 +221,7 @@ private: - //TODO: Remove the virtual when we can break ABI? - virtual void parse(); - -- std::auto_ptr<_xmlSAXHandler> sax_handler_; -+ std::unique_ptr<_xmlSAXHandler> sax_handler_; - - // A separate xmlpp::Document that is just used for entity resolution, - // and never seen in the API: -diff --git a/libxml++/parsers/textreader.h b/libxml++/parsers/textreader.h -index 48901b2..17f0737 100644 ---- a/libxml++/parsers/textreader.h -+++ b/libxml++/parsers/textreader.h -@@ -257,7 +257,7 @@ class TextReader: NonCopyable - void * locator); - void check_for_exceptions() const; - -- std::auto_ptr propertyreader; -+ std::unique_ptr propertyreader; - _xmlTextReader* impl_; - int severity_; - Glib::ustring error_; -diff --git a/libxml++/relaxngschema.h b/libxml++/relaxngschema.h -index 8df7089..ffe2eaa 100644 ---- a/libxml++/relaxngschema.h -+++ b/libxml++/relaxngschema.h -@@ -23,7 +23,7 @@ - - #include - #include --#include // std::auto_ptr -+#include // std::unique_ptr - - #ifndef DOXYGEN_SHOULD_SKIP_THIS - extern "C" { -@@ -105,7 +105,7 @@ protected: - - private: - struct Impl; -- std::auto_ptr pimpl_; -+ std::unique_ptr pimpl_; - }; - - } // namespace xmlpp -diff --git a/libxml++/validators/relaxngvalidator.h b/libxml++/validators/relaxngvalidator.h -index 5cd5ad7..cd29393 100644 ---- a/libxml++/validators/relaxngvalidator.h -+++ b/libxml++/validators/relaxngvalidator.h -@@ -22,7 +22,7 @@ - #define __LIBXMLPP_VALIDATOR_RELAXNGVALIDATOR_H - - #include --#include // std::auto_ptr -+#include // std::unique_ptr - - namespace Glib - { -@@ -156,7 +156,7 @@ protected: - - private: - struct Impl; -- std::auto_ptr pimpl_; -+ std::unique_ptr pimpl_; - }; - - } // namespace xmlpp -diff --git a/libxml++/validators/xsdvalidator.h b/libxml++/validators/xsdvalidator.h -index 941d7f1..d64b971 100644 ---- a/libxml++/validators/xsdvalidator.h -+++ b/libxml++/validators/xsdvalidator.h -@@ -20,7 +20,7 @@ - #define __LIBXMLPP_VALIDATOR_XSDVALIDATOR_H - - #include --#include // std::auto_ptr -+#include // std::unique_ptr - - namespace Glib - { -@@ -146,7 +146,7 @@ protected: - - private: - struct Impl; -- std::auto_ptr pimpl_; -+ std::unique_ptr pimpl_; - }; - - } // namespace xmlpp -diff --git a/libxml++/xsdschema.h b/libxml++/xsdschema.h -index 1333025..8220e4e 100644 ---- a/libxml++/xsdschema.h -+++ b/libxml++/xsdschema.h -@@ -21,7 +21,7 @@ - - #include - #include --#include // std::auto_ptr -+#include // std::unique_ptr - - #ifndef DOXYGEN_SHOULD_SKIP_THIS - extern "C" { -@@ -96,7 +96,7 @@ protected: - - private: - struct Impl; -- std::auto_ptr pimpl_; -+ std::unique_ptr pimpl_; - }; - - } // namespace xmlpp diff --git a/ports/libxmlpp/portfile.cmake b/ports/libxmlpp/portfile.cmake index 3919e4bf2a4bc2..1620e79b38995d 100644 --- a/ports/libxmlpp/portfile.cmake +++ b/ports/libxmlpp/portfile.cmake @@ -1,32 +1,29 @@ -include(vcpkg_common_functions) +#..\src\libxml++-5-7c4d4a4cea.clean\meson.build:278:4: ERROR: Problem encountered: Static builds are not supported by MSVC-style builds +set(LIBXMLPP_VERSION 5.0.0) -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -set(LIBXMLPP_VERSION 2.40.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml++-${LIBXMLPP_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.40/libxml++-${LIBXMLPP_VERSION}.tar.xz" + URLS "https://ftp.gnome.org/pub/GNOME/sources/libxml++/5.0/libxml++-${LIBXMLPP_VERSION}.tar.xz" FILENAME "libxml++-${LIBXMLPP_VERSION}.tar.xz" - SHA512 a4ec2e8182d981c57bdcb8f0a203a3161f8c735ceb59fd212408b7a539d1dc826adf6717bed8f4d544ab08afd9c2fc861efe518e24bbd3a1c4b158e2ca48183a + SHA512 ae8d7a178e7a3b48a9f0e1ea303e8a4e4d879d0d9367124ede3783d0c31e31c862b98e5d28d72edc4c0b19c6b457ead2d25664efd33d65e44fd52c5783ec3091 ) -vcpkg_extract_source_archive(${ARCHIVE}) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml++-${LIBXMLPP_VERSION} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fixAutoPtrExpired.patch" +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DDISABLE_INSTALL_HEADERS=ON +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dbuild-documentation=false + -Dvalidation=false # Validate the tutorial XML file + -Dbuild-examples=false + -Dbuild-tests=false + -Dmsvc14x-parallel-installable=false # Use separate DLL and LIB filenames for Visual Studio 2017 and 2019 + -Dbuild-deprecated-api=true # Build deprecated API and include it in the library ) - -vcpkg_install_cmake() - +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() # Handle copyright and readme diff --git a/ports/libxmlpp/vcpkg.json b/ports/libxmlpp/vcpkg.json new file mode 100644 index 00000000000000..c5f74dfbff22b9 --- /dev/null +++ b/ports/libxmlpp/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libxmlpp", + "version": "5.0.0", + "port-version": 1, + "description": "a C++ wrapper for the libxml XML parser library.", + "supports": "!(windows & static)", + "dependencies": [ + "glibmm", + "libxml2" + ] +} diff --git a/ports/libxmp-lite/CONTROL b/ports/libxmp-lite/CONTROL deleted file mode 100644 index cbc01c58f49f0e..00000000000000 --- a/ports/libxmp-lite/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libxmp-lite -Version: 4.4.1-1 -Homepage: https://sourceforge.net/projects/xmp/ -Description: Lightweight version of libxmp that supports MOD, S3M, XM and IT modules. diff --git a/ports/libxmp-lite/portfile.cmake b/ports/libxmp-lite/portfile.cmake index 5af0f25f3bfc1c..4f3ce633990655 100644 --- a/ports/libxmp-lite/portfile.cmake +++ b/ports/libxmp-lite/portfile.cmake @@ -1,21 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxmp-lite-4.4.1) -vcpkg_download_distfile(ARCHIVE - URLS "http://sourceforge.net/projects/xmp/files/libxmp/4.4.1/libxmp-lite-4.4.1.tar.gz" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO xmp/libxmp + REF 4.4.1 FILENAME "libxmp-lite-4.4.1.tar.gz" SHA512 f27e3f9fb79ff15ce90b51fb29641c01cadf7455150da57cde6860c2ba075ed497650eb44ec9143bdd3538288228c609f7db6d862c9d73f007f686eccb05543e -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-msvc-buildfix.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-fix-symbols.patch + 0001-msvc-buildfix.patch + 0002-fix-symbols.patch ) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( @@ -26,5 +20,4 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxmp-lite RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libxmp-lite/vcpkg.json b/ports/libxmp-lite/vcpkg.json new file mode 100644 index 00000000000000..ec4ffce7847984 --- /dev/null +++ b/ports/libxmp-lite/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libxmp-lite", + "version-string": "4.4.1", + "port-version": 7, + "description": "Lightweight version of libxmp that supports MOD, S3M, XM and IT modules.", + "homepage": "https://sourceforge.net/projects/xmp/" +} diff --git a/ports/libxslt/0001-Fix-makefile.patch b/ports/libxslt/0001-Fix-makefile.patch index 73d62786030464..db638886bcc557 100644 --- a/ports/libxslt/0001-Fix-makefile.patch +++ b/ports/libxslt/0001-Fix-makefile.patch @@ -1,61 +1,38 @@ ---- - win32/Makefile.msvc | 29 +++++++++++++++-------------- - 1 file changed, 15 insertions(+), 14 deletions(-) - -diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc -index 23a02d2..b13dd26 100644 ---- a/win32/Makefile.msvc -+++ b/win32/Makefile.msvc -@@ -22,7 +22,7 @@ BASEDIR = .. - XSLT_SRCDIR = $(BASEDIR)\libxslt - EXSLT_SRCDIR = $(BASEDIR)\libexslt - UTILS_SRCDIR = $(BASEDIR)\xsltproc --BINDIR = bin.msvc -+BINDIR = $(OUTDIR)\bin.msvc - - # Names of various input and output components. - XSLT_NAME = xslt -@@ -39,11 +39,11 @@ EXSLT_DEF = $(EXSLT_BASENAME).def - EXSLT_A = $(EXSLT_BASENAME)_a.lib - - # Places where intermediate files produced by the compiler go --XSLT_INTDIR = int.xslt.msvc --XSLT_INTDIR_A = int.xslta.msvc --EXSLT_INTDIR = int.exslt.msvc --EXSLT_INTDIR_A = int.exslta.msvc --UTILS_INTDIR = int.utils.msvc -+XSLT_INTDIR = $(OUTDIR)\int.xslt.msvc -+XSLT_INTDIR_A = $(OUTDIR)\int.xslta.msvc -+EXSLT_INTDIR = $(OUTDIR)\int.exslt.msvc -+EXSLT_INTDIR_A = $(OUTDIR)\int.exslta.msvc -+UTILS_INTDIR = $(OUTDIR)\int.utils.msvc - - # The preprocessor and its options. - CPP = cl.exe /EP +diff --git "a/win32/Makefile.msvc" "b/win32/Makefile.msvc" +index 2e4742bb..8bfe7d83 100644 +--- "a/win32/Makefile.msvc" ++++ "b/win32/Makefile.msvc" @@ -59,7 +59,13 @@ CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE LD = link.exe LDFLAGS = /nologo LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX) --LIBS = wsock32.lib +-LIBS = +# The libraries are needed for static builds (the makefile builds all tools and dlls) -+LIBS = wsock32.lib libiconv.lib libcharset.lib ++LIBS = iconv.lib charset.lib ws2_32.lib +!if "$(DEBUG)" == "1" -+LIBS = $(LIBS) zlibd.lib ++LIBS = $(LIBS) zlibd.lib lzmad.lib +!else -+LIBS = $(LIBS) zlib.lib ++LIBS = $(LIBS) zlib.lib lzma.lib +!endif # The archiver and its options. AR = lib.exe -@@ -71,6 +77,7 @@ CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7 +@@ -71,8 +77,14 @@ CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7 LDFLAGS = $(LDFLAGS) /DEBUG !else CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 +LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF /OPT:ICF !endif ++# append CFLAGS etc. passed on command line ++CPPFLAGS = $(CPPFLAGS) $(EXTRA_CPPFLAGS) ++CFLAGS = $(CFLAGS) $(EXTRA_CFLAGS) ++LDFLAGS = $(LDFLAGS) $(EXTRA_LDFLAGS) ++ # Libxslt object files. -@@ -309,13 +316,7 @@ $(UTILS_INTDIR) : + XSLT_OBJS = $(XSLT_INTDIR)\attributes.obj\ + $(XSLT_INTDIR)\documents.obj\ +@@ -309,13 +321,7 @@ $(UTILS_INTDIR) : # An implicit rule for xsltproc and friends. APPLIBS = $(LIBS) !if "$(STATIC)" == "1" @@ -70,4 +47,3 @@ index 23a02d2..b13dd26 100644 {$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe: $(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "LIBEXSLT_STATIC" \ $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $< --- diff --git a/ports/libxslt/0002-Fix-lzma.patch b/ports/libxslt/0002-Fix-lzma.patch new file mode 100644 index 00000000000000..c1ece503626744 --- /dev/null +++ b/ports/libxslt/0002-Fix-lzma.patch @@ -0,0 +1,45 @@ +diff --git a/win32/configure.js b/win32/configure.js +index 12c99f3..0737b06 100644 +--- a/win32/configure.js ++++ b/win32/configure.js +@@ -45,6 +45,7 @@ var withMemDebug = false; + var withDebugger = true; + var withIconv = true; + var withZlib = false; ++var withLzma = true; + var withCrypto = true; + var withModules = false; + var withProfiler = true; +@@ -105,6 +106,7 @@ function usage() + txt += " debugger: Enable external debugger support (" + (withDebugger? "yes" : "no") + ")\n"; + txt += " iconv: Use iconv library (" + (withIconv? "yes" : "no") + ")\n"; + txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n"; ++ txt += " lzma: Use lzma library (" + (withLzma? "yes" : "no") + ")\n"; + txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n"; + txt += " modules: Enable Module support (" + (withModules? "yes" : "no") + ")\n"; + txt += " profiler: Enable Profiler support (" + (withProfiler? "yes" : "no") + ")\n"; +@@ -192,6 +194,7 @@ function discoverVersion() + vf.WriteLine("WITH_DEBUGGER=" + (withDebugger? "1" : "0")); + vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0")); + vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0")); ++ vf.WriteLine("WITH_LZMA=" + (withLzma? "1" : "0")); + vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0")); + vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0")); + vf.WriteLine("WITH_PROFILER=" + (withProfiler? "1" : "0")); +@@ -344,6 +347,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { + withIconv = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "zlib") + withZlib = strToBool(arg.substring(opt.length + 1, arg.length)); ++ else if (opt == "lzma") ++ withLzma = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "crypto") + withCrypto = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "modules") +@@ -482,6 +487,7 @@ txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n"; + txtOut += " Debugger support: " + boolToStr(withDebugger) + "\n"; + txtOut += " Use iconv: " + boolToStr(withIconv) + "\n"; + txtOut += " With zlib: " + boolToStr(withZlib) + "\n"; ++txtOut += " Lzma: " + boolToStr(withLzma) + "\n"; + txtOut += " Crypto: " + boolToStr(withCrypto) + "\n"; + txtOut += " Modules: " + boolToStr(withModules) + "\n"; + txtOut += " Profiler: " + boolToStr(withProfiler) + "\n"; diff --git a/ports/libxslt/0003-Fix-configure.patch b/ports/libxslt/0003-Fix-configure.patch new file mode 100644 index 00000000000000..43cc239036e3a9 --- /dev/null +++ b/ports/libxslt/0003-Fix-configure.patch @@ -0,0 +1,50 @@ +diff --git a/win32/configure.js b/win32/configure.js +index 0737b06..11815e4 100644 +--- a/win32/configure.js ++++ b/win32/configure.js +@@ -138,7 +138,7 @@ function usage() + file included by our makefile. */ + function discoverVersion() + { +- var fso, cf, vf, ln, s; ++ var fso, cf, vf, ln, s, m; + fso = new ActiveXObject("Scripting.FileSystemObject"); + verCvs = ""; + if (useCvsVer && fso.FileExists("..\\CVS\\Entries")) { +@@ -147,8 +147,8 @@ function discoverVersion() + ln = cf.ReadLine(); + s = new String(ln); + if (s.search(/^\/ChangeLog\//) != -1) { +- iDot = s.indexOf("."); +- iSlash = s.indexOf("/", iDot); ++ var iDot = s.indexOf("."); ++ var iSlash = s.indexOf("/", iDot); + verCvs = "CVS" + s.substring(iDot + 1, iSlash); + break; + } +@@ -178,13 +178,13 @@ function discoverVersion() + verMicroXslt = m[1]; + } else if (s.search(/^LIBEXSLT_MAJOR_VERSION=/) != -1) { + vf.WriteLine(s); +- verMajorExslt = s.substring(s.indexOf("=") + 1, s.length) ++ verMajorExslt = s.substring(s.indexOf("=") + 1, s.length); + } else if(s.search(/^LIBEXSLT_MINOR_VERSION=/) != -1) { + vf.WriteLine(s); +- verMinorExslt = s.substring(s.indexOf("=") + 1, s.length) ++ verMinorExslt = s.substring(s.indexOf("=") + 1, s.length); + } else if(s.search(/^LIBEXSLT_MICRO_VERSION=/) != -1) { + vf.WriteLine(s); +- verMicroExslt = s.substring(s.indexOf("=") + 1, s.length) ++ verMicroExslt = s.substring(s.indexOf("=") + 1, s.length); + } + } + cf.Close(); +@@ -365,8 +365,6 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { + buildStatic = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "prefix") + buildPrefix = arg.substring(opt.length + 1, arg.length); +- else if (opt == "incdir") +- buildIncPrefix = arg.substring(opt.length + 1, arg.length); + else if (opt == "bindir") + buildBinPrefix = arg.substring(opt.length + 1, arg.length); + else if (opt == "libdir") diff --git a/ports/libxslt/CONTROL b/ports/libxslt/CONTROL deleted file mode 100644 index e1de01067c80da..00000000000000 --- a/ports/libxslt/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libxslt -Version: 1.1.33 -Homepage: http://xmlsoft.org/XSLT/ -Description: Libxslt is a XSLT library implemented in C for XSLT 1.0 and most of EXSLT -Build-Depends: libxml2 diff --git a/ports/libxslt/only_build_one_lib_type.patch b/ports/libxslt/only_build_one_lib_type.patch new file mode 100644 index 00000000000000..ae1ef8a421b289 --- /dev/null +++ b/ports/libxslt/only_build_one_lib_type.patch @@ -0,0 +1,56 @@ +diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc +index f803a747c..f43a54f51 100644 +--- a/win32/Makefile.msvc ++++ b/win32/Makefile.msvc +@@ -163,7 +163,11 @@ _VC_MANIFEST_EMBED_EXE= + _VC_MANIFEST_EMBED_DLL= + !endif + +-all : libxslt libxslta libexslt libexslta utils ++!if "$(STATIC)" == "1" ++all : libxslta libexslta utils ++!else ++all : libxslt libexslt utils ++!endif + + libxslt : $(BINDIR)\$(XSLT_SO) + +@@ -196,12 +200,15 @@ install-libs : all + if not exist $(LIBPREFIX) mkdir $(LIBPREFIX) + copy $(XSLT_SRCDIR)\*.h $(INCPREFIX)\$(XSLT_BASENAME) + copy $(EXSLT_SRCDIR)\*.h $(INCPREFIX)\$(EXSLT_BASENAME) ++!if "$(STATIC)" != "1" + copy $(BINDIR)\$(XSLT_SO) $(SOPREFIX) +- copy $(BINDIR)\$(XSLT_A) $(LIBPREFIX) + copy $(BINDIR)\$(XSLT_IMP) $(LIBPREFIX) + copy $(BINDIR)\$(EXSLT_SO) $(SOPREFIX) +- copy $(BINDIR)\$(EXSLT_A) $(LIBPREFIX) + copy $(BINDIR)\$(EXSLT_IMP) $(LIBPREFIX) ++!else ++ copy $(BINDIR)\$(XSLT_A) $(LIBPREFIX) ++ copy $(BINDIR)\$(EXSLT_A) $(LIBPREFIX) ++!endif + + install : install-libs + copy $(BINDIR)\*.exe $(BINPREFIX) +@@ -313,7 +320,6 @@ $(BINDIR)\$(EXSLT_SO) : $(BINDIR) $(EXSLT_OBJS) $(EXSLT_INTDIR)\$(EXSLT_DEF) lib + $(BINDIR)\$(EXSLT_A) : $(BINDIR) $(EXSLT_OBJS_A) libxslta + $(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(EXSLT_A) $(EXSLT_OBJS_A) + +- + # Creates the utils intermediate directory. + $(UTILS_INTDIR) : + if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR) +@@ -336,7 +342,11 @@ APPLIBS = $(LIBS) libxml2.lib + !endif + + # Builds xsltproc and friends. Uses the implicit rule for commands. +-$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxslt libxslta libexslt libexslta ++!if "$(STATIC)" == "1" ++$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxslta libexslta ++!else ++$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxslt libexslt ++!endif + + # plugins only work with non-static builds currently. + !if "$(STATIC)" == "0" diff --git a/ports/libxslt/portfile.cmake b/ports/libxslt/portfile.cmake index a688c374b6d11d..2c72cf8d025b6a 100644 --- a/ports/libxslt/portfile.cmake +++ b/ports/libxslt/portfile.cmake @@ -1,131 +1,145 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - -include(vcpkg_common_functions) +vcpkg_download_distfile( + PATCH_e2584eed1c84c18f16e42188c30d2c3d8e3e8853 + URLS "https://github.com/GNOME/libxslt/commit/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch" + FILENAME e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch + SHA512 d08a06616d732993f2131826ca06fafc2e9f561cb1edb17eaf2adaf78e276bb03cba92a773143eb939da04781f5b5e0a09b351d8e4622a941de3cb3d11da731c +) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO GNOME/libxslt - REF v1.1.33 - SHA512 2c20b2af3c19952b25b10dca0d95fe227602f7f815db352b04dd061c52c458d745f92c597ce08ac9207ba0fbe0169ea2fb78263d8590743717553f84463fe1d9 + REF v1.1.34 + SHA512 fc57affb236e5f7602ee53c8090a854c6b950d1e6526ae3488bca41d8d421ec70433d88eb227c71c2a61213bc364517bdad907125e36486da1754fe9e460601f HEAD_REF master - PATCHES - 0001-Fix-makefile.patch + PATCHES + "${PATCH_e2584eed1c84c18f16e42188c30d2c3d8e3e8853}" + 0001-Fix-makefile.patch + 0002-Fix-lzma.patch + 0003-Fix-configure.patch + only_build_one_lib_type.patch ) -find_program(NMAKE nmake) - -set(SCRIPTS_DIR ${SOURCE_PATH}/win32) - -set(CONFIGURE_COMMAND_TEMPLATE cscript configure.js - cruntime=@CRUNTIME@ - debug=@DEBUGMODE@ - prefix=@INSTALL_DIR@ - include=@INCLUDE_DIR@ - lib=@LIB_DIR@ - bindir=$(PREFIX)\\tools\\ - sodir=$(PREFIX)\\bin\\ -) - -# Create some directories ourselves, because the makefile doesn't -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - -# -# Release -# - -message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(CRUNTIME /MD) +if (VCPKG_TARGET_IS_WINDOWS) + # Create some directories ourselves, because the makefile doesn't + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + set(CONFIGURE_COMMAND_TEMPLATE + cruntime=@CRUNTIME@ + static=@BUILDSTATIC@ + debug=@DEBUGMODE@ + prefix=@INSTALL_DIR@ + include=@INCLUDE_DIR@ + lib=@LIB_DIR@ + bindir=$(PREFIX)\\bin + sodir=$(PREFIX)\\bin + zlib=yes + lzma=yes + ) + # Common + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILDSTATIC yes) + else() + set(BUILDSTATIC no) + endif() + # Release params + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CRUNTIME /MD) + else() + set(CRUNTIME /MT) + endif() + set(DEBUGMODE no) + set(LIB_DIR ${CURRENT_INSTALLED_DIR}/lib) + set(INCLUDE_DIR ${CURRENT_INSTALLED_DIR}/include) + set(INSTALL_DIR ${CURRENT_PACKAGES_DIR}) + file(TO_NATIVE_PATH "${LIB_DIR}" LIB_DIR) + file(TO_NATIVE_PATH "${INCLUDE_DIR}" INCLUDE_DIR) + file(TO_NATIVE_PATH "${INSTALL_DIR}" INSTALL_DIR) + string(CONFIGURE "${CONFIGURE_COMMAND_TEMPLATE}" CONFIGURE_COMMAND_REL) + # Debug params + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CRUNTIME /MDd) + else() + set(CRUNTIME /MTd) + endif() + set(DEBUGMODE yes) + set(LIB_DIR ${CURRENT_INSTALLED_DIR}/debug/lib) + set(INSTALL_DIR ${CURRENT_PACKAGES_DIR}/debug) + file(TO_NATIVE_PATH "${LIB_DIR}" LIB_DIR) + file(TO_NATIVE_PATH "${INSTALL_DIR}" INSTALL_DIR) + string(CONFIGURE "${CONFIGURE_COMMAND_TEMPLATE}" CONFIGURE_COMMAND_DBG) + + vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH win32 + PROJECT_NAME Makefile.msvc + PRERUN_SHELL_DEBUG cscript configure.js ${CONFIGURE_COMMAND_DBG} + PRERUN_SHELL_RELEASE cscript configure.js ${CONFIGURE_COMMAND_REL} + OPTIONS rebuild + ) + + vcpkg_copy_tools(TOOL_NAMES xsltproc AUTO_CLEAN) + + # The makefile builds both static and dynamic libraries, so remove the ones we don't want + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/libexslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/libexslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + # Rename the libs to match the dynamic lib names + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libxslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/libxslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libexslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/libexslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + endif() else() - set(CRUNTIME /MT) + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) + + find_library(LibXml2_DEBUG_LIBRARIES libxml2 PATHS ${CURRENT_INSTALLED_DIR}/debug/lib REQUIRED) + find_library(LibXml2_RELEASE_LIBRARIES libxml2 PATHS ${CURRENT_INSTALLED_DIR}/lib REQUIRED) + + if (VCPKG_TARGET_IS_OSX ) + set(LIBICONV "-liconv") + else() + set(LIBICONV "") + endif() + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + --with-crypto + --with-plugins + --with-libxml-include-prefix=${CURRENT_INSTALLED_DIR}/include + --with-python=${PYTHON2_DIR} + OPTIONS_DEBUG + --with-mem-debug + --with-debug + --with-debugger + --with-libxml-libs-prefix="${CURRENT_INSTALLED_DIR}/debug/lib -lxml2 -lz -llzmad ${LIBICONV}" + --with-html-dir=${CURRENT_INSTALLED_DIR}/debug/tools + --with-html-subdir=${CURRENT_INSTALLED_DIR}/debug/tools + OPTIONS_RELEASE + --with-libxml-libs-prefix="${CURRENT_INSTALLED_DIR}/lib -lxml2 -lz -llzma ${LIBICONV}" + --with-html-dir=${CURRENT_INSTALLED_DIR}/tools + --with-html-subdir=${CURRENT_INSTALLED_DIR}/tools + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/libxslt.so ${CURRENT_PACKAGES_DIR}/bin/) + else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libxslt-plugins ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt-plugins) + endif() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxslt.so) endif() -set(DEBUGMODE no) -set(LIB_DIR ${CURRENT_INSTALLED_DIR}/lib) -set(INCLUDE_DIR ${CURRENT_INSTALLED_DIR}/include) -set(INSTALL_DIR ${CURRENT_PACKAGES_DIR}) -file(TO_NATIVE_PATH "${LIB_DIR}" LIB_DIR) -file(TO_NATIVE_PATH "${INCLUDE_DIR}" INCLUDE_DIR) -file(TO_NATIVE_PATH "${INSTALL_DIR}" INSTALL_DIR) -string(CONFIGURE "${CONFIGURE_COMMAND_TEMPLATE}" CONFIGURE_COMMAND) -vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} - WORKING_DIRECTORY ${SCRIPTS_DIR} - LOGNAME config-${TARGET_TRIPLET}-rel -) -# Handle build output directory -file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" OUTDIR) -file(MAKE_DIRECTORY "${OUTDIR}") -message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - -message(STATUS "Building ${TARGET_TRIPLET}-rel") -vcpkg_execute_required_process( - COMMAND ${NMAKE} /f Makefile.msvc rebuild OUTDIR=${OUTDIR} - WORKING_DIRECTORY ${SCRIPTS_DIR} - LOGNAME build-${TARGET_TRIPLET}-rel -) -message(STATUS "Building ${TARGET_TRIPLET}-rel done") - -message(STATUS "Installing ${TARGET_TRIPLET}-rel") -vcpkg_execute_required_process( - COMMAND ${NMAKE} /f Makefile.msvc install OUTDIR=${OUTDIR} - WORKING_DIRECTORY ${SCRIPTS_DIR} - LOGNAME install-${TARGET_TRIPLET}-rel -) -message(STATUS "Installing ${TARGET_TRIPLET}-rel done") - - -# -# Debug -# - -message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(CRUNTIME /MDd) -else() - set(CRUNTIME /MTd) -endif() -set(DEBUGMODE yes) -set(LIB_DIR ${CURRENT_INSTALLED_DIR}/debug/lib) -set(INSTALL_DIR ${CURRENT_PACKAGES_DIR}/debug) -file(TO_NATIVE_PATH "${LIB_DIR}" LIB_DIR) -file(TO_NATIVE_PATH "${INSTALL_DIR}" INSTALL_DIR) -string(CONFIGURE "${CONFIGURE_COMMAND_TEMPLATE}" CONFIGURE_COMMAND) - -vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} - WORKING_DIRECTORY ${SCRIPTS_DIR} - LOGNAME config-${TARGET_TRIPLET}-dbg -) -# Handle build output directory -file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" OUTDIR) -file(MAKE_DIRECTORY "${OUTDIR}") -message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - -message(STATUS "Building ${TARGET_TRIPLET}-dbg") -vcpkg_execute_required_process( - COMMAND ${NMAKE} /f Makefile.msvc rebuild OUTDIR=${OUTDIR} - WORKING_DIRECTORY ${SCRIPTS_DIR} - LOGNAME build-${TARGET_TRIPLET}-dbg -) -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - -message(STATUS "Installing ${TARGET_TRIPLET}-dbg") -vcpkg_execute_required_process( - COMMAND ${NMAKE} /f Makefile.msvc install OUTDIR=${OUTDIR} - WORKING_DIRECTORY ${SCRIPTS_DIR} - LOGNAME install-${TARGET_TRIPLET}-dbg -) -message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") - # # Cleanup # @@ -148,27 +162,12 @@ endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/libexslt/exsltexports.h "${EXSLTEXPORTS_H}") # Remove tools and debug include directories -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# The makefile builds both static and dynamic libraries, so remove the ones we don't want -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxslt_a.lib ${CURRENT_PACKAGES_DIR}/lib/libexslt_a.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt_a.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt_a.lib) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxslt.lib ${CURRENT_PACKAGES_DIR}/lib/libexslt.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt.lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - # Rename the libs to match the dynamic lib names - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libxslt_a.lib ${CURRENT_PACKAGES_DIR}/lib/libxslt.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libexslt_a.lib ${CURRENT_PACKAGES_DIR}/lib/libexslt.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt_a.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt_a.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt.lib) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_copy_pdbs() endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxslt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxslt/Copyright ${CURRENT_PACKAGES_DIR}/share/libxslt/copyright) +file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/libxslt/vcpkg.json b/ports/libxslt/vcpkg.json new file mode 100644 index 00000000000000..74f77de2ab6799 --- /dev/null +++ b/ports/libxslt/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libxslt", + "version": "1.1.34", + "port-version": 1, + "description": "Libxslt is a XSLT library implemented in C for XSLT 1.0 and most of EXSLT", + "homepage": "https://github.com/GNOME/libxslt", + "supports": "!uwp", + "dependencies": [ + "liblzma", + "libxml2" + ] +} diff --git a/ports/libyaml/CONTROL b/ports/libyaml/CONTROL deleted file mode 100644 index e38c0f9d01041c..00000000000000 --- a/ports/libyaml/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libyaml -Version: 0.2.2-1 -Description: A C library for parsing and emitting YAML. diff --git a/ports/libyaml/portfile.cmake b/ports/libyaml/portfile.cmake index 6c6a6b97b1e73f..a9b75c771fac77 100644 --- a/ports/libyaml/portfile.cmake +++ b/ports/libyaml/portfile.cmake @@ -1,13 +1,14 @@ -include(vcpkg_common_functions) +if (WIN32) + set(PATCHES fix-POSIX_name.patch) +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO yaml/libyaml - REF 0.2.2 - SHA512 455494591014a97c4371a1f372ad09f0d6e487e4f1d3419c98e9cd2f16d43a0cf9a0787d7250bebee8b8d400df4626f5acd81e90139e54fa574a66ec84964c06 + REF 2c891fc7a770e8ba2fec34fc6b545c672beb37e6 # 0.2.5 + SHA512 7cdde7b48c937777b851747f7e0b9a74cb7da30173e09305dad931ef83c3fcee3e125e721166690fe6a0987ba897564500530e5518e4b66b1c9b1db8900bf320 HEAD_REF master - PATCHES - fix-POSIX_name.patch + PATCHES ${PATCHES} ) vcpkg_configure_cmake( @@ -15,12 +16,13 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBUILD_TESTING=OFF + -DINSTALL_CMAKE_DIR=share/yaml ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/config.h) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/yaml TARGET_PATH share/yaml) -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/config.h ${CURRENT_PACKAGES_DIR}/debug/share) -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/libyaml/copyright COPYONLY) +configure_file(${SOURCE_PATH}/License ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/libyaml/vcpkg.json b/ports/libyaml/vcpkg.json new file mode 100644 index 00000000000000..da3bff85b96bbb --- /dev/null +++ b/ports/libyaml/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libyaml", + "version-string": "0.2.5", + "port-version": 1, + "description": "A C library for parsing and emitting YAML.", + "homepage": "https://github.com/yaml/libyaml" +} diff --git a/ports/libyuv/fix-build-type.patch b/ports/libyuv/fix-build-type.patch new file mode 100644 index 00000000000000..179a7f7ea0b174 --- /dev/null +++ b/ports/libyuv/fix-build-type.patch @@ -0,0 +1,62 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 50442cd..fdc82f2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,24 +28,32 @@ LIST ( SORT ly_unittest_sources ) + INCLUDE_DIRECTORIES( BEFORE ${ly_inc_dir} ) + + # this creates the static library (.a) ++if (NOT BUILD_SHARED_LIBS) + ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} ) + SET_TARGET_PROPERTIES( ${ly_lib_static} PROPERTIES PUBLIC_HEADER include/libyuv.h ) +- ++else() + # this creates the shared library (.so) + ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} ) + SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) + SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) +- ++endif() + # this creates the conversion tool + ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc ) +-TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) +- ++if (BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_shared} ) ++else() ++ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) ++endif() + + INCLUDE ( FindJPEG ) + if (JPEG_FOUND) +- include_directories( ${JPEG_INCLUDE_DIR} ) +- target_link_libraries( ${ly_lib_shared} PUBLIC ${JPEG_LIBRARY} ) +- target_link_libraries( yuvconvert ${JPEG_LIBRARY} ) ++ include_directories( ${JPEG_INCLUDE_DIR}) ++ if( BUILD_SHARED_LIBS) ++ target_link_libraries(${ly_lib_shared} PUBLIC ${JPEG_LIBRARY}) ++ else() ++ target_link_libraries(${ly_lib_static} PUBLIC ${JPEG_LIBRARY}) ++ endif() ++ target_link_libraries(yuvconvert ${JPEG_LIBRARY}) + add_definitions( -DHAVE_JPEG ) + endif() + +@@ -88,11 +96,13 @@ endif() + + + # install the conversion tool, .so, .a, and all the header files +-INSTALL ( TARGETS yuvconvert DESTINATION bin ) ++INSTALL ( TARGETS yuvconvert DESTINATION tools ) + INSTALL ( FILES ${ly_include_files} DESTINATION include/libyuv ) +-INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-targets DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include ) +-INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-targets LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) +- ++if (NOT BUILD_SHARED_LIBS) ++ INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-targets DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include ) ++else() ++ INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-targets LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) ++endif() + INSTALL( EXPORT libyuv-targets DESTINATION share/cmake/libyuv/ EXPORT_LINK_INTERFACE_LIBRARIES ) + + # create the .deb and .rpm packages using cpack diff --git a/ports/libyuv/fix_cmakelists.patch b/ports/libyuv/fix_cmakelists.patch new file mode 100644 index 00000000000000..00cc50599a32ce --- /dev/null +++ b/ports/libyuv/fix_cmakelists.patch @@ -0,0 +1,61 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ed4948f..5b4e112 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,10 +2,14 @@ + # Originally created for "roxlu build system" to compile libyuv on windows + # Run with -DTEST=ON to build unit tests + +-PROJECT ( YUV C CXX ) # "C" is required even for C++ projects + CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) ++CMAKE_POLICY( SET CMP0022 NEW ) ++ ++PROJECT ( YUV C CXX ) # "C" is required even for C++ projects + OPTION( TEST "Built unit tests" OFF ) + ++SET( CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON ) ++ + SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) + SET ( ly_src_dir ${ly_base_dir}/source ) + SET ( ly_inc_dir ${ly_base_dir}/include ) +@@ -14,6 +18,7 @@ SET ( ly_lib_name yuv ) + SET ( ly_lib_static ${ly_lib_name} ) + SET ( ly_lib_shared ${ly_lib_name}_shared ) + ++FILE ( GLOB_RECURSE ly_include_files ${ly_inc_dir}/libyuv/*.h ) + FILE ( GLOB_RECURSE ly_source_files ${ly_src_dir}/*.cc ) + LIST ( SORT ly_source_files ) + +@@ -24,6 +29,7 @@ INCLUDE_DIRECTORIES( BEFORE ${ly_inc_dir} ) + + # this creates the static library (.a) + ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} ) ++SET_TARGET_PROPERTIES( ${ly_lib_static} PROPERTIES PUBLIC_HEADER include/libyuv.h ) + + # this creates the shared library (.so) + ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} ) +@@ -38,6 +44,7 @@ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) + INCLUDE ( FindJPEG ) + if (JPEG_FOUND) + include_directories( ${JPEG_INCLUDE_DIR} ) ++ target_link_libraries( ${ly_lib_shared} PUBLIC ${JPEG_LIBRARY} ) + target_link_libraries( yuvconvert ${JPEG_LIBRARY} ) + add_definitions( -DHAVE_JPEG ) + endif() +@@ -81,10 +88,12 @@ endif() + + + # install the conversion tool, .so, .a, and all the header files +-INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) +-INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) +-INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) +-INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) ++INSTALL ( TARGETS yuvconvert DESTINATION bin ) ++INSTALL ( FILES ${ly_include_files} DESTINATION include/libyuv ) ++INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-targets DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include ) ++INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-targets LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) ++ ++INSTALL( EXPORT libyuv-targets DESTINATION share/cmake/libyuv/ EXPORT_LINK_INTERFACE_LIBRARIES ) + + # create the .deb and .rpm packages using cpack + INCLUDE ( CM_linux_packages.cmake ) diff --git a/ports/libyuv/libyuv-config.cmake b/ports/libyuv/libyuv-config.cmake new file mode 100644 index 00000000000000..7031eddcaba301 --- /dev/null +++ b/ports/libyuv/libyuv-config.cmake @@ -0,0 +1,5 @@ +include(CMakeFindDependencyMacro) +find_dependency(JPEG) + +set(libyuv_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include") +include("${CMAKE_CURRENT_LIST_DIR}/libyuv-targets.cmake") diff --git a/ports/libyuv/portfile.cmake b/ports/libyuv/portfile.cmake new file mode 100644 index 00000000000000..aa5b81de149a78 --- /dev/null +++ b/ports/libyuv/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://chromium.googlesource.com/libyuv/libyuv + REF 287158925b0e03ea4499a18b4e08478c5781541b #2021-4-15 + PATCHES + fix_cmakelists.patch + fix-build-type.patch +) + +set(POSTFIX d) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=${POSTFIX} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libyuv) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libyuv/convert.h "#ifdef HAVE_JPEG" "#if 1") +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libyuv/convert_argb.h "#ifdef HAVE_JPEG" "#if 1") + +configure_file(${CMAKE_CURRENT_LIST_DIR}/libyuv-config.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT} COPYONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libyuv/vcpkg.json b/ports/libyuv/vcpkg.json new file mode 100644 index 00000000000000..fcf55453db756d --- /dev/null +++ b/ports/libyuv/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "libyuv", + "version-date": "2021-04-15", + "description": "libyuv is an open source project that includes YUV scaling and conversion functionality", + "homepage": "https://chromium.googlesource.com/libyuv/libyuv", + "dependencies": [ + "libjpeg-turbo" + ] +} diff --git a/ports/libzen/CONTROL b/ports/libzen/CONTROL deleted file mode 100644 index aca3ff287daf83..00000000000000 --- a/ports/libzen/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libzen -Version: 0.4.37 -Description: ZenLib is a C++ utility library for easiest cross-platform development diff --git a/ports/libzen/portfile.cmake b/ports/libzen/portfile.cmake index 52ad55ef60a942..f7770454c1d652 100644 --- a/ports/libzen/portfile.cmake +++ b/ports/libzen/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) endif() @@ -7,11 +5,9 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO MediaArea/ZenLib - REF v0.4.37 - SHA512 857091422d6425aeae59bf5a9dfedd72f5c9b4a18f29acf88842d812f2b470fc8b1b03a245af6b7d08d616dd5596a8905cc138daecee23dadea39ae4215f77d4 + REF v0.4.38 + SHA512 92c3fc3994bd7110021adbfa3ce48ed6e80f162946b912e9e06ed58edc224600e56e3aab3203ad3fa8759dab9790cb5536475f070f0c060b00585911a6cc0661 HEAD_REF master - - PATCHES vcpkg_support_in_cmakelists.patch ) vcpkg_configure_cmake( @@ -27,5 +23,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzen RENAME copyright) - -vcpkg_test_cmake(PACKAGE_NAME ZenLib MODULE) diff --git a/ports/libzen/vcpkg.json b/ports/libzen/vcpkg.json new file mode 100644 index 00000000000000..86b8cba2bef77d --- /dev/null +++ b/ports/libzen/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libzen", + "version-string": "0.4.38", + "port-version": 1, + "description": "ZenLib is a C++ utility library for easiest cross-platform development" +} diff --git a/ports/libzen/vcpkg_support_in_cmakelists.patch b/ports/libzen/vcpkg_support_in_cmakelists.patch deleted file mode 100644 index fb2ce81f700a78..00000000000000 --- a/ports/libzen/vcpkg_support_in_cmakelists.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/Project/CMake/CMakeLists.txt b/Project/CMake/CMakeLists.txt -index cb96dc8..8b05a25 100644 ---- a/Project/CMake/CMakeLists.txt -+++ b/Project/CMake/CMakeLists.txt -@@ -33,10 +33,12 @@ set(BIN_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE STRING "Directory where - set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE STRING "Directory where library will install") - set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}" CACHE PATH "The directory the headers are installed in") - --if(NOT MSVC) -- set(ZenLib_CONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/zenlib") -+if(VCPKG_TARGET_TRIPLET) -+ set(ZenLib_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/zenlib") -+elseif(MSVC) -+ set(ZenLib_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake") - else() -- set(ZenLib_CONFIG_INSTALL_DIR "cmake") -+ set(ZenLib_CONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/zenlib") - endif() - - set(ZenLib_HDRS -@@ -136,10 +138,6 @@ set_target_properties(zen PROPERTIES - PUBLIC_HEADER "${ZenLib_HDRS}" - ) - --if(MSVC) -- install(FILES $ DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS "Debug;RelWithDebInfo" OPTIONAL) --endif() -- - install(TARGETS zen EXPORT zen-export - PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/ZenLib - RUNTIME DESTINATION ${BIN_INSTALL_DIR} diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL deleted file mode 100644 index bac06fac9b0f9c..00000000000000 --- a/ports/libzip/CONTROL +++ /dev/null @@ -1,14 +0,0 @@ -Source: libzip -Version: rel-1-5-2 -Homepage: https://github.com/nih-at/libzip -Build-Depends: zlib -Default-Features: openssl, bzip2 -Description: A library for reading, creating, and modifying zip archives. - -Feature: bzip2 -Build-Depends: bzip2 -Description: Support bzip2-compressed zip archives - -Feature: openssl -Build-Depends: openssl -Description: AES (encryption) support using OpenSSL diff --git a/ports/libzip/avoid_computation_on_void_pointer.patch b/ports/libzip/avoid_computation_on_void_pointer.patch deleted file mode 100644 index cbd38bfa995c56..00000000000000 --- a/ports/libzip/avoid_computation_on_void_pointer.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/zip_source_winzip_aes_encode.c b/lib/zip_source_winzip_aes_encode.c - ---- a/lib/zip_source_winzip_aes_encode.c -+++ b/lib/zip_source_winzip_aes_encode.c -@@ -163,7 +163,7 @@ winzip_aes_encrypt(zip_source_t *src, void *ud, void *data, zip_uint64_t length, - /* TODO: return partial read? */ - return -1; - } -- buffer_n += _zip_buffer_read(ctx->buffer, data + ret, length - (zip_uint64_t)ret); -+ buffer_n += _zip_buffer_read(ctx->buffer, (zip_uint8_t *)data + ret, length - (zip_uint64_t)ret); - } - - return (zip_int64_t)(buffer_n + (zip_uint64_t)ret); diff --git a/ports/libzip/fix-dependency.patch b/ports/libzip/fix-dependency.patch new file mode 100644 index 00000000000000..e04d271382a6f3 --- /dev/null +++ b/ports/libzip/fix-dependency.patch @@ -0,0 +1,24 @@ +diff --git a/libzip-config.cmake.in b/libzip-config.cmake.in +index 5b9aa55..0723f3c 100644 +--- a/libzip-config.cmake.in ++++ b/libzip-config.cmake.in +@@ -1,8 +1,17 @@ + @PACKAGE_INIT@ + + # only needed for static library, and doesn't work as-is +-#include(CMakeFindDependencyMacro) +-#find_dependency(ZLIB::ZLIB) ++include(CMakeFindDependencyMacro) ++if(@ENABLE_BZIP2@) ++ find_dependency(BZip2) ++endif() ++if(@ENABLE_LZMA@) ++ find_dependency(LibLZMA) ++endif() ++if(@ENABLE_OPENSSL@) ++ find_dependency(OpenSSL) ++endif() ++find_dependency(ZLIB) + # how to handle the optional dependencies? + # Provide all our library targets to users. + include("${CMAKE_CURRENT_LIST_DIR}/libzip-targets.cmake") diff --git a/ports/libzip/fix-findpackage.patch b/ports/libzip/fix-findpackage.patch new file mode 100644 index 00000000000000..7080a9ea01789f --- /dev/null +++ b/ports/libzip/fix-findpackage.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 017f7cf0..9770c158 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -437,10 +437,10 @@ export(TARGETS zip + if(LIBZIP_DO_INSTALL) + install(FILES ${PROJECT_BINARY_DIR}/zipconf.h DESTINATION include) + install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake + ) + install(EXPORT ${PROJECT_NAME}-targets NAMESPACE libzip:: FILE ${PROJECT_NAME}-targets.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake + ) + endif() + diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index 92ef4109bdc741..23155a5e0a749d 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -1,39 +1,43 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nih-at/libzip - REF rel-1-5-2 - SHA512 5ba765c5d4ab47dff24bfa5e73b798046126fcc88b29d5d9ce9d77d035499ae91d90cc526f1f73bbefa07b7b68ff6cf77e912e5793859f801caaf2061cb20aee - HEAD_REF master - PATCHES avoid_computation_on_void_pointer.patch + REF 66e496489bdae81bfda8b0088172871d8fda0032 #v1.7.3 + SHA512 ae0cda3e9decf5a71bf1e0907a2a21b2c0d83e6e576faf4d9401d6954707ae298c1c09febbc5339f457ace3577fdd405a790c819ef24778990ca6bf1e9516d54 + HEAD_REF v1.7.3 + PATCHES + fix-findpackage.patch + fix-dependency.patch ) -# AES encryption -set(USE_OPENSSL OFF) -if("openssl" IN_LIST FEATURES) - set(USE_OPENSSL ON) -endif() - -set(USE_BZIP2 OFF) -if("bzip2" IN_LIST FEATURES) - set(USE_BZIP2 ON) -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + bzip2 ENABLE_BZIP2 + liblzma ENABLE_LZMA + openssl ENABLE_OPENSSL + wincrypto ENABLE_WINDOWS_CRYPTO + commoncrypto ENABLE_COMMONCRYPTO + mbedtls ENABLE_MBEDTLS +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + ${FEATURE_OPTIONS} -DBUILD_DOC=OFF -DBUILD_EXAMPLES=OFF -DBUILD_REGRESS=OFF -DBUILD_TOOLS=OFF - # see https://github.com/nih-at/libzip/blob/rel-1-5-2/INSTALL.md - -DENABLE_OPENSSL=${USE_OPENSSL} - -DENABLE_BZIP2=${USE_BZIP2} + -DENABLE_GNUTLS=OFF ) vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_fixup_pkgconfig() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + # Remove include directories from lib file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/debug/lib/libzip) @@ -41,6 +45,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/d file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Copy copright information -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzip RENAME copyright) - -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libzip/vcpkg.json b/ports/libzip/vcpkg.json new file mode 100644 index 00000000000000..eb56141f86d935 --- /dev/null +++ b/ports/libzip/vcpkg.json @@ -0,0 +1,75 @@ +{ + "name": "libzip", + "version-semver": "1.7.3", + "port-version": 2, + "description": "A library for reading, creating, and modifying zip archives.", + "homepage": "https://github.com/nih-at/libzip", + "dependencies": [ + "zlib" + ], + "default-features": [ + "bzip2", + "default-aes" + ], + "features": { + "bzip2": { + "description": "Support bzip2-compressed zip archives", + "dependencies": [ + "bzip2" + ] + }, + "commoncrypto": { + "description": "AES( encryption) support using Apple's Common Crypto API" + }, + "default-aes": { + "description": "Use default AES", + "dependencies": [ + { + "name": "libzip", + "default-features": false, + "features": [ + "commoncrypto" + ], + "platform": "osx" + }, + { + "name": "libzip", + "default-features": false, + "features": [ + "wincrypto" + ], + "platform": "windows" + }, + { + "name": "libzip", + "default-features": false, + "features": [ + "openssl" + ], + "platform": "!(windows | osx)" + } + ] + }, + "liblzma": { + "description": "Support XZ compressed zip archives using liblzma", + "dependencies": [ + "liblzma" + ] + }, + "mbedtls": { + "description": "AES (encryption) support using mbedtls", + "dependencies": [ + "mbedtls" + ] + }, + "openssl": { + "description": "AES (encryption) support using OpenSSL", + "dependencies": [ + "openssl" + ] + }, + "wincrypto": { + "description": "AES (encryption) support using Windows Crypto API" + } + } +} diff --git a/ports/libzippp/CONTROL b/ports/libzippp/CONTROL deleted file mode 100644 index f2a6b24d6f9ab9..00000000000000 --- a/ports/libzippp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: libzippp -Version: 2019-07-22 -Description: Simple basic C++ wrapper around the libzip library. It is meant to be a portable and easy-to-use library for ZIP handling -Build-Depends: zlib, libzip[bzip2] diff --git a/ports/libzippp/fix-find-lzma.patch b/ports/libzippp/fix-find-lzma.patch new file mode 100644 index 00000000000000..bc52cbd8fb583f --- /dev/null +++ b/ports/libzippp/fix-find-lzma.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindLIBZIP.cmake b/cmake/FindLIBZIP.cmake +index c51c09a..a32bb13 100644 +--- a/cmake/FindLIBZIP.cmake ++++ b/cmake/FindLIBZIP.cmake +@@ -50,7 +50,7 @@ if (LIBZIP_FOUND) + set_property(TARGET libzip::zip APPEND PROPERTY INTERFACE_LINK_LIBRARIES Nettle::Nettle) + endif() + if(_have_extra_libs MATCHES "-llzma") +- find_package(LibLZMA::LibLZMA REQUIRED) ++ find_package(LibLZMA REQUIRED) + set_property(TARGET libzip::zip APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibLZMA::LibLZMA) + endif() + if(_have_extra_libs MATCHES "-lz") diff --git a/ports/libzippp/portfile.cmake b/ports/libzippp/portfile.cmake index 3c3a22ffacdd41..7bf26dd6ba2c77 100644 --- a/ports/libzippp/portfile.cmake +++ b/ports/libzippp/portfile.cmake @@ -1,27 +1,37 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO ctabin/libzippp - REF be75a3413b648a3264e94a2c1921c83081dec1e0 - SHA512 86c6040bbaea0817486218e96c4d230a328e3560ada41861fbd18d78faa085b158199318d633085e616509084082bf29d6f97afdd2d2dfbc6b843dfbf6a20c85 - HEAD_REF master -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DBUILD_TESTS=OFF - OPTIONS_DEBUG - -DINSTALL_HEADERS=OFF -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/libzippp") - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzippp RENAME copyright) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ctabin/libzippp + REF 0e907d7ef8de46822602cb7633a5bc6fc0cc36de #v5.0-1.8.0 with CXX std version c++11 + SHA512 f91724b0225bddcaf705e7e1493ad415b534096cfe3636d50995245982984e7420148206f4e24d72e596d75eac570d7b512c5aa836eaf4a8951e27737bcee9eb + HEAD_REF master + PATCHES fix-find-lzma.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + encryption LIBZIPPP_ENABLE_ENCRYPTION) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DLIBZIPPP_BUILD_TESTS=OFF + OPTIONS_DEBUG + -DLIBZIPPP_INSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/libzippp") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "share/libzippp") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libzippp/vcpkg.json b/ports/libzippp/vcpkg.json new file mode 100644 index 00000000000000..e17b123b287893 --- /dev/null +++ b/ports/libzippp/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "libzippp", + "version-string": "5.0-1.8.0", + "port-version": 1, + "description": "Simple basic C++ wrapper around the libzip library. It is meant to be a portable and easy-to-use library for ZIP handling", + "homepage": "https://github.com/ctabin/libzippp", + "dependencies": [ + { + "name": "libzip", + "default-features": false, + "features": [ + "bzip2" + ] + }, + "zlib" + ], + "features": { + "encryption": { + "description": "Support encryption" + } + } +} diff --git a/ports/licensepp/0001-use-old-pem-pack.patch b/ports/licensepp/0001-use-old-pem-pack.patch new file mode 100644 index 00000000000000..37656f61323433 --- /dev/null +++ b/ports/licensepp/0001-use-old-pem-pack.patch @@ -0,0 +1,29 @@ +From d1b446c7a69344cb53be6692cd76186960a1428d Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 09:40:32 -0700 +Subject: [PATCH 1/2] use old pem pack + +In this commit: https://github.com/noloader/cryptopp-pem/commit/0cfa60820ec1d5e8ac4d77a0a8786ee43e9a2400 +the parameter orders have been changed. +But we cannot update pem-pack to this version or newer because it +wont compile with the current version of cryptopp in vcpkg. +--- + src/external/Ripe.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/external/Ripe.cc b/src/external/Ripe.cc +index 6ff9561..a1d1eec 100644 +--- a/src/external/Ripe.cc ++++ b/src/external/Ripe.cc +@@ -227,7 +227,7 @@ Ripe::KeyPair Ripe::generateRSAKeyPair(unsigned int length, const std::string& s + if (secret.empty()) { + PEM_Save(snk, privateKey); + } else { +- PEM_Save(snk, privateKey, rng, PRIVATE_RSA_ALGORITHM, secret.data(), secret.size()); ++ PEM_Save(snk, rng, privateKey, PRIVATE_RSA_ALGORITHM, secret.data(), secret.size()); + } + snk.MessageEnd(); + } +-- +2.24.3 (Apple Git-128) + diff --git a/ports/licensepp/0002-fix-cmake.patch b/ports/licensepp/0002-fix-cmake.patch new file mode 100644 index 00000000000000..5f13d03e1855f8 --- /dev/null +++ b/ports/licensepp/0002-fix-cmake.patch @@ -0,0 +1,38 @@ +From 5a7cbbe8423ee3daf533bcc1fefa7d1f1315634c Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 09:43:37 -0700 +Subject: [PATCH 2/2] fix cmake + +Remove this patch if https://github.com/amrayn/licensepp/pull/33 is merged +--- + CMakeLists.txt | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2c39d1..0d49632 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,10 +35,8 @@ if (APPLE) + endif() + endif() + +-if(MSVC) +- list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 ") +-else() +- list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 -Wall -Werror ") ++if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -Wall") + endif() + + # Check for cryptopp (static) +@@ -73,6 +71,7 @@ endif() + set_target_properties (licensepp-lib PROPERTIES + VERSION ${LICENSEPP_SOVERSION} + ) ++target_include_directories(licensepp-lib PUBLIC $) + target_link_libraries (licensepp-lib + ${CRYPTOPP_LIBRARIES} + ) +-- +2.24.3 (Apple Git-128) + diff --git a/ports/licensepp/FindCryptoPP.cmake b/ports/licensepp/FindCryptoPP.cmake new file mode 100644 index 00000000000000..c7e0f709c098b6 --- /dev/null +++ b/ports/licensepp/FindCryptoPP.cmake @@ -0,0 +1,27 @@ +find_path(CRYPTOPP_INCLUDE_DIRS NAMES cryptopp/cryptlib.h) + +get_filename_component(_prefix_path ${CRYPTOPP_INCLUDE_DIRS} PATH) + +find_library( + CRYPTOPP_LIBRARY_DEBUG + NAMES cryptopp-static cryptopp + PATHS ${_prefix_path}/debug/lib + NO_DEFAULT_PATH +) +find_library( + CRYPTOPP_LIBRARY_RELEASE + NAMES cryptopp-static cryptopp + PATHS ${_prefix_path}/lib + NO_DEFAULT_PATH +) + +unset(_prefix_path) + +include(SelectLibraryConfigurations) +select_library_configurations(CRYPTOPP) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + CryptoPP + REQUIRED_VARS CRYPTOPP_LIBRARIES CRYPTOPP_INCLUDE_DIRS +) diff --git a/ports/licensepp/portfile.cmake b/ports/licensepp/portfile.cmake new file mode 100644 index 00000000000000..aa4d009695228f --- /dev/null +++ b/ports/licensepp/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO amrayn/licensepp + REF 0b6d669c0b323be004f73d8c811d38158ce8c0c7 + SHA512 2161575815d8ff49110d7c2823662ba30d9f1ca2eb6be6dad1ee0807fb3fa9f28483839a133c9d380035254df7c452f8d6fa7f17fd4f29acd8b9bfbbda059291 + HEAD_REF master + PATCHES + 0001-use-old-pem-pack.patch + 0002-fix-cmake.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCryptoPP.cmake DESTINATION ${SOURCE_PATH}/cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dtest=OFF + -Dtravis=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/licensepp/vcpkg.json b/ports/licensepp/vcpkg.json new file mode 100644 index 00000000000000..04de78675ebca8 --- /dev/null +++ b/ports/licensepp/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "licensepp", + "version-string": "2020-05-19", + "port-version": 2, + "description": "Cross platform software licensing library", + "homepage": "https://github.com/zuhd-org/licensepp", + "supports": "!uwp", + "dependencies": [ + { + "name": "cryptopp", + "features": [ + "pem-pack" + ] + } + ] +} diff --git a/ports/lilv/CMakeLists.txt b/ports/lilv/CMakeLists.txt new file mode 100644 index 00000000000000..7dd5cbeba64eee --- /dev/null +++ b/ports/lilv/CMakeLists.txt @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.17) +project(lilv C) + +find_package(lv2 CONFIG REQUIRED) +find_package(serd CONFIG REQUIRED) +find_package(sord CONFIG REQUIRED) +find_package(sratom CONFIG REQUIRED) + +add_library(lilv + src/collections.c + src/filesystem.c + src/instance.c + src/lib.c + src/node.c + src/plugin.c + src/pluginclass.c + src/port.c + src/query.c + src/scalepoint.c + src/state.c + src/ui.c + src/util.c + src/world.c + src/zix/tree.c +) + +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "MinGW") + set(LILV_PATH_SEP [[;]]) + set(LILV_DIR_SEP [[\\]]) + set(LV2_PATH [[%APPDATA%\\LV2;%COMMONPROGRAMFILES%\\LV2]]) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(LILV_PATH_SEP ":") + set(LILV_DIR_SEP "/") + set(LV2_PATH "~/Library/Audio/Plug-Ins/LV2:~/.lv2:/usr/local/lib/lv2:/usr/lib/lv2:/Library/Audio/Plug-Ins/LV2") +else() + set(LILV_PATH_SEP ":") + set(LILV_DIR_SEP "/") + set(LV2_PATH "~/.lv2:/usr/lib/lv2:/usr/local/lib/lv2") +endif() + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lilv_config.h.in" [[ +#define LILV_PATH_SEP "@LILV_PATH_SEP@" +#define LILV_DIR_SEP "@LILV_DIR_SEP@" +#define LILV_DEFAULT_LV2_PATH "@LV2_PATH@" +]]) +configure_file("${CMAKE_CURRENT_BINARY_DIR}/lilv_config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/lilv_config.h") + +target_include_directories(lilv + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_CURRENT_BINARY_DIR}" +) + +target_link_libraries(lilv + PUBLIC lv2::lv2 + PRIVATE serd::serd sord::sord sratom::sratom +) + +set_target_properties(lilv PROPERTIES + C_STANDARD 99 + C_STANDARD_REQUIRED ON +) + +target_compile_definitions(lilv PRIVATE LILV_INTERNAL _CRT_SECURE_NO_WARNINGS) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(lilv PUBLIC LILV_SHARED) +endif() + +install( + TARGETS lilv + EXPORT lilv-targets + INCLUDES DESTINATION include +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY lilv DESTINATION include) +endif() + +install( + EXPORT lilv-targets + NAMESPACE lilv:: + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/lilv" +) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lilv-config.cmake" [[ +include(CMakeFindDependencyMacro) +find_dependency(lv2 CONFIG) +find_dependency(serd CONFIG) +find_dependency(sord CONFIG) +find_dependency(sratom CONFIG) +include("${CMAKE_CURRENT_LIST_DIR}/lilv-targets.cmake") +]]) + +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/lilv-config.cmake" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/lilv" +) diff --git a/ports/lilv/portfile.cmake b/ports/lilv/portfile.cmake new file mode 100644 index 00000000000000..858c6c3bf88323 --- /dev/null +++ b/ports/lilv/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO lv2/lilv + REF v0.24.10 + SHA512 be47b72f2671f3bbab219944519b990156547e26aa432c2618273683c86dc23ae3b071d1de586f45dfda3ea8dbbc095429ad318fda60efcf715ae917a7caa34b + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/lilv/vcpkg.json b/ports/lilv/vcpkg.json new file mode 100644 index 00000000000000..bcebc1eca16337 --- /dev/null +++ b/ports/lilv/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "lilv", + "version-string": "0.24.10", + "description": "Lilv is a C library for simple use of LV2 plugins in applications.", + "homepage": "https://drobilla.net/software/lilv", + "license": "ISC", + "supports": "!uwp", + "dependencies": [ + "lv2", + "serd", + "sord", + "sratom" + ] +} diff --git a/ports/linalg/CONTROL b/ports/linalg/CONTROL deleted file mode 100644 index eb2afe6f3622d8..00000000000000 --- a/ports/linalg/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: linalg -Version: 2.1 -Description: linalg.h is a single header public domain linear algebra library for C++11 diff --git a/ports/linalg/portfile.cmake b/ports/linalg/portfile.cmake index 4f277775552884..23ae4c83c95ab1 100644 --- a/ports/linalg/portfile.cmake +++ b/ports/linalg/portfile.cmake @@ -1,5 +1,4 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sgorsten/linalg diff --git a/ports/linalg/vcpkg.json b/ports/linalg/vcpkg.json new file mode 100644 index 00000000000000..07871bcfdb0d22 --- /dev/null +++ b/ports/linalg/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "linalg", + "version-string": "2.1", + "port-version": 1, + "description": "linalg.h is a single header public domain linear algebra library for C++11" +} diff --git a/ports/linenoise-ng/CONTROL b/ports/linenoise-ng/CONTROL deleted file mode 100644 index 8023c7f7dd228e..00000000000000 --- a/ports/linenoise-ng/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: linenoise-ng -Version: 4754bee2d8eb3 -Description: A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters. \ No newline at end of file diff --git a/ports/linenoise-ng/portfile.cmake b/ports/linenoise-ng/portfile.cmake index c5e448e8670d12..e0d1db92852c3f 100644 --- a/ports/linenoise-ng/portfile.cmake +++ b/ports/linenoise-ng/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO arangodb/linenoise-ng @@ -11,6 +10,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE ) vcpkg_install_cmake() diff --git a/ports/linenoise-ng/vcpkg.json b/ports/linenoise-ng/vcpkg.json new file mode 100644 index 00000000000000..01e6e121ef2f1b --- /dev/null +++ b/ports/linenoise-ng/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "linenoise-ng", + "version-string": "4754bee2d8eb3", + "port-version": 2, + "description": "A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters." +} diff --git a/ports/live555/CMakeLists.txt b/ports/live555/CMakeLists.txt index 9d126cda10e6fe..cb0854bb28f1d0 100644 --- a/ports/live555/CMakeLists.txt +++ b/ports/live555/CMakeLists.txt @@ -20,6 +20,8 @@ add_library(groupsock ${GROUPSOCK_SRCS}) file(GLOB LIVEMEDIA_SRCS liveMedia/*.c liveMedia/*.cpp) add_library(liveMedia ${LIVEMEDIA_SRCS}) +find_package(OpenSSL REQUIRED) +target_include_directories(liveMedia PRIVATE "${OPENSSL_INCLUDE_DIR}") file(GLOB USAGE_ENVIRONMENT_SRCS UsageEnvironment/*.c UsageEnvironment/*.cpp) add_library(UsageEnvironment ${USAGE_ENVIRONMENT_SRCS}) diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL deleted file mode 100644 index e2f44db66db05e..00000000000000 --- a/ports/live555/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: live555 -Version: latest -Homepage: https://www.live555.com/liveMedia -Description: A complete RTSP server application diff --git a/ports/live555/fix-RTSPClient.patch b/ports/live555/fix-RTSPClient.patch new file mode 100644 index 00000000000000..66863963dab219 --- /dev/null +++ b/ports/live555/fix-RTSPClient.patch @@ -0,0 +1,13 @@ +diff --git a/liveMedia/RTSPClient.cpp b/liveMedia/RTSPClient.cpp +index 02c46c7..6127698 100644 +--- a/liveMedia/RTSPClient.cpp ++++ b/liveMedia/RTSPClient.cpp +@@ -1939,7 +1939,7 @@ int RTSPClient::write(const u_int8_t* data, unsigned count) { + if (fTLS.isNeeded) { + return fTLS.write(data, count); + } else { +- return send(fOutputSocketNum, data, count, 0); ++ return send(fOutputSocketNum, (const char *)data, count, 0); + } + } + diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index c89d4e0a1d330b..d4a5c0600441a6 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) if(NOT VCPKG_USE_HEAD_VERSION) @@ -7,8 +5,6 @@ if(NOT VCPKG_USE_HEAD_VERSION) message(FATAL_ERROR "Live555 does not have persistent releases. Please re-run the installation with --head.") endif() -include(vcpkg_common_functions) - set(LIVE_VERSION latest) vcpkg_download_distfile(ARCHIVE @@ -20,6 +16,8 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} + PATCHES + fix-RTSPClient.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -39,6 +37,6 @@ file(GLOB HEADERS ) file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/live555 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/live555/vcpkg.json b/ports/live555/vcpkg.json new file mode 100644 index 00000000000000..176110f2d57141 --- /dev/null +++ b/ports/live555/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "live555", + "version-string": "latest", + "port-version": 2, + "description": "A complete RTSP server application", + "homepage": "https://www.live555.com/liveMedia", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/llfio/portfile.cmake b/ports/llfio/portfile.cmake new file mode 100644 index 00000000000000..03844f75e902cf --- /dev/null +++ b/ports/llfio/portfile.cmake @@ -0,0 +1,91 @@ +message(WARNING [=[ +LLFIO depends on Outcome which depends on QuickCppLib which uses the vcpkg versions of gsl-lite and byte-lite, rather than the versions tested by QuickCppLib's, Outcome's and LLFIO's CI. It is not guaranteed to work with other versions, with failures experienced in the past up-to-and-including runtime crashes. See the warning message from QuickCppLib for how you can pin the versions of those dependencies in your manifest file to those with which QuickCppLib was tested. Do not report issues to upstream without first pinning the versions as QuickCppLib was tested against. +]=]) + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ned14/llfio + REF 565f27555d13ce2a37346d838f32e03e1972aac1 + SHA512 386007d03c3923e79bb1b80b1b750ae738bbc22aa5124c606cc5e7818f57a4b819bb920257c9aca39765a4a8b93d2528b4a956c53b96bd8db3b8d4a54a851e41 + HEAD_REF develop +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_from_github( + OUT_SOURCE_PATH NTKEC_SOURCE_PATH + REPO ned14/ntkernel-error-category + REF bbd44623594142155d49bd3ce8820d3cf9da1e1e + SHA512 589d3bc7bca98ca8d05ce9f5cf009dd98b8884bdf3739582f2f6cbf5a324ce95007ea041450ed935baa4a401b4a0242c181fb6d2dcf7ad91587d75f05491f50e + HEAD_REF master + ) +endif() + +vcpkg_check_features( + OUT_FEATURE_OPTIONS LLFIO_FEATURE_OPTIONS + FEATURES + status-code LLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE +) + +# LLFIO needs a copy of QuickCppLib with which to bootstrap its cmake +file(COPY "${CURRENT_INSTALLED_DIR}/include/quickcpplib" + DESTINATION "${SOURCE_PATH}/quickcpplib/repo/include/" +) +file(COPY "${CURRENT_INSTALLED_DIR}/share/ned14-internal-quickcpplib/" + DESTINATION "${SOURCE_PATH}/quickcpplib/repo/" +) + +# LLFIO expects ntkernel-error-category to live inside its include directory +file(REMOVE_RECURSE "${SOURCE_PATH}/include/llfio/ntkernel-error-category") +if(VCPKG_TARGET_IS_WINDOWS) + file(RENAME "${NTKEC_SOURCE_PATH}" "${SOURCE_PATH}/include/llfio/ntkernel-error-category") +endif() + +# Already installed dependencies don't appear on the include path, which LLFIO assumes. +string(APPEND VCPKG_CXX_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"") +string(APPEND VCPKG_C_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"") + +set(extra_config) +# cmake does not correctly set CMAKE_SYSTEM_PROCESSOR when targeting ARM on Windows +if(VCPKG_TARGET_IS_WINDOWS AND (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")) + list(APPEND extra_config -DLLFIO_ASSUME_CROSS_COMPILING=On) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DPROJECT_IS_DEPENDENCY=On + -Dquickcpplib_FOUND=1 + -Doutcome_FOUND=1 + ${LLFIO_FEATURE_OPTIONS} + -DLLFIO_ENABLE_DEPENDENCY_SMOKE_TEST=ON # Leave this always on to test everything compiles + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + ${extra_config} +) + +# LLFIO install assumes that the static library is always built +vcpkg_build_cmake(TARGET _sl) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_build_cmake(TARGET _dl) +endif() + +if("run-tests" IN_LIST FEATURES) + vcpkg_build_cmake(TARGET test) +endif() + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/llfio) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +if("status-code" IN_LIST FEATURES) + file(INSTALL "${CURRENT_PORT_DIR}/usage-status-code-${VCPKG_LIBRARY_LINKAGE}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +else() + file(INSTALL "${CURRENT_PORT_DIR}/usage-error-code-${VCPKG_LIBRARY_LINKAGE}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +endif() +file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/llfio/usage-error-code-dynamic b/ports/llfio/usage-error-code-dynamic new file mode 100644 index 00000000000000..21b2aff448580e --- /dev/null +++ b/ports/llfio/usage-error-code-dynamic @@ -0,0 +1,10 @@ +The package llfio provides two CMake targets: + + find_package(llfio CONFIG REQUIRED) + +- If you want the header-only form of LLFIO: + find_package(Threads REQUIRED) + target_link_libraries(main PUBLIC llfio::hl) + +- If you want the shared library form of LLFIO with shared NT kernel error code category: + target_link_libraries(main PUBLIC llfio::dl llfio::ntkernel-error-category::dl) diff --git a/ports/llfio/usage-error-code-static b/ports/llfio/usage-error-code-static new file mode 100644 index 00000000000000..935e910397d52a --- /dev/null +++ b/ports/llfio/usage-error-code-static @@ -0,0 +1,10 @@ +The package llfio provides two CMake targets: + + find_package(llfio CONFIG REQUIRED) + +- If you want the header-only form of LLFIO: + find_package(Threads REQUIRED) + target_link_libraries(main PUBLIC llfio::hl) + +- If you want the static library form of LLFIO with static NT kernel error code category: + target_link_libraries(main PUBLIC llfio::sl llfio::ntkernel-error-category::sl) diff --git a/ports/llfio/usage-status-code-dynamic b/ports/llfio/usage-status-code-dynamic new file mode 100644 index 00000000000000..7d1b8fb0c9816d --- /dev/null +++ b/ports/llfio/usage-status-code-dynamic @@ -0,0 +1,10 @@ +The package llfio provides two CMake targets: + + find_package(llfio CONFIG REQUIRED) + +- If you want the header-only form of LLFIO: + find_package(Threads REQUIRED) + target_link_libraries(main PUBLIC llfio::hl) + +- If you want the shared library form of LLFIO: + target_link_libraries(main PUBLIC llfio::dl) diff --git a/ports/llfio/usage-status-code-static b/ports/llfio/usage-status-code-static new file mode 100644 index 00000000000000..b987f6f6eb7c03 --- /dev/null +++ b/ports/llfio/usage-status-code-static @@ -0,0 +1,10 @@ +The package llfio provides two CMake targets: + + find_package(llfio CONFIG REQUIRED) + +- If you want the header-only form of LLFIO: + find_package(Threads REQUIRED) + target_link_libraries(main PUBLIC llfio::hl) + +- If you want the static library form of LLFIO: + target_link_libraries(main PUBLIC llfio::sl) diff --git a/ports/llfio/vcpkg.json b/ports/llfio/vcpkg.json new file mode 100644 index 00000000000000..8f343387c5f731 --- /dev/null +++ b/ports/llfio/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "llfio", + "version-string": "2.0", + "port-version": 20210421, + "description": "P1031 low level file i/o and filesystem library for the C++ standard", + "homepage": "https://github.com/ned14/llfio", + "supports": "!(uwp | static)", + "dependencies": [ + "outcome" + ], + "features": { + "run-tests": { + "description": "Build and run the dependency validation tests" + }, + "status-code": { + "description": "Have LLFIO use SG14 `status_code` (proposed `std::error`) instead of `std::error_code`." + } + } +} diff --git a/ports/llgl/fix-arm64-build-error.patch b/ports/llgl/fix-arm64-build-error.patch new file mode 100644 index 00000000000000..d80061c16c92d7 --- /dev/null +++ b/ports/llgl/fix-arm64-build-error.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f440884..f1a9190 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -559,6 +559,8 @@ if(APPLE) + endif() + elseif(UNIX) + target_link_libraries(LLGL X11 pthread Xxf86vm Xrandr) ++elseif(WIN32) ++ target_link_libraries(LLGL gdi32 shell32) + endif() + + set_target_properties(LLGL PROPERTIES LINKER_LANGUAGE CXX DEBUG_POSTFIX "D") diff --git a/ports/llgl/fix-install-error.patch b/ports/llgl/fix-install-error.patch new file mode 100644 index 00000000000000..872d01bfc0a9bb --- /dev/null +++ b/ports/llgl/fix-install-error.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f440884..d1b0c2f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -614,6 +614,12 @@ if(LLGL_BUILD_RENDERER_OPENGL) + target_link_libraries(LLGL_OpenGL LLGL ${OPENGL_LIBRARIES}) + + ADD_DEFINE(LLGL_BUILD_RENDERER_OPENGL) ++ ++ install(TARGETS LLGL_OpenGL ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + else() + message("Missing OpenGL -> LLGL_OpenGL renderer will be excluded from project") + endif() +@@ -681,6 +687,12 @@ if(WIN32) + target_link_libraries(LLGL_Direct3D11 LLGL d3d11 dxgi D3DCompiler) + + ADD_DEFINE(LLGL_BUILD_RENDERER_DIRECT3D11) ++ ++ install(TARGETS LLGL_Direct3D11 ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + + if(LLGL_BUILD_RENDERER_DIRECT3D12) +@@ -821,4 +833,13 @@ if(LLGL_ENABLE_SPIRV_REFLECT) + message("Including Submodule: SPIRV") + endif() + ++# Install targets ++install(TARGETS ${PROJECT_NAME} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++# Install headers ++install(DIRECTORY ${PROJECT_INCLUDE_DIR} DESTINATION .) ++ + diff --git a/ports/llgl/portfile.cmake b/ports/llgl/portfile.cmake new file mode 100644 index 00000000000000..6ee4bed6b91522 --- /dev/null +++ b/ports/llgl/portfile.cmake @@ -0,0 +1,38 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} currently doesn't supports UWP.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LukasBanana/LLGL + REF 8f28437960ed60622e94f4f97b24e842b5a0e9e6 + SHA512 8a6bd4109e977f9def0f04a3d31f7bd4beebbe162c52eaa08a54daf8335871615215ece166e5a9d5b5475b834fd53a26ff9638ff270a2f00c88bab21ed156760 + HEAD_REF master + PATCHES + fix-install-error.patch + fix-arm64-build-error.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + opengl LLGL_BUILD_RENDERER_OPENGL + direct3d11 LLGL_BUILD_RENDERER_DIRECT3D11 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/llgl/vcpkg.json b/ports/llgl/vcpkg.json new file mode 100644 index 00000000000000..f653d01f597d1f --- /dev/null +++ b/ports/llgl/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "llgl", + "version-string": "2019-08-15", + "port-version": 2, + "description": "Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal.", + "homepage": "https://github.com/LukasBanana/LLGL", + "supports": "!uwp", + "features": { + "direct3d11": { + "description": "Support for direct3d11" + }, + "opengl": { + "description": "Support for opengl" + } + } +} diff --git a/ports/llvm/0002-fix-install-paths.patch b/ports/llvm/0002-fix-install-paths.patch new file mode 100644 index 00000000000000..84d973f6537fbb --- /dev/null +++ b/ports/llvm/0002-fix-install-paths.patch @@ -0,0 +1,136 @@ + clang/cmake/modules/CMakeLists.txt | 4 ++-- + flang/cmake/modules/CMakeLists.txt | 4 ++-- + lld/cmake/modules/CMakeLists.txt | 4 ++-- + llvm/cmake/modules/AddLLVM.cmake | 2 +- + llvm/cmake/modules/CMakeLists.txt | 2 +- + mlir/cmake/modules/CMakeLists.txt | 4 ++-- + polly/cmake/CMakeLists.txt | 4 ++-- + pstl/CMakeLists.txt | 4 ++-- + 8 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/clang/cmake/modules/CMakeLists.txt b/clang/cmake/modules/CMakeLists.txt +index d233f552f01f..26f502ad2d23 100644 +--- a/clang/cmake/modules/CMakeLists.txt ++++ b/clang/cmake/modules/CMakeLists.txt +@@ -1,11 +1,11 @@ + # Generate a list of CMake library targets so that other CMake projects can + # link against them. LLVM calls its version of this file LLVMExports.cmake, but + # the usual CMake convention seems to be ${Project}Targets.cmake. +-set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang) ++set(CLANG_INSTALL_PACKAGE_DIR share/clang) + set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}") + + # Keep this in sync with llvm/cmake/CMakeLists.txt! +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS) +diff --git a/flang/cmake/modules/CMakeLists.txt b/flang/cmake/modules/CMakeLists.txt +index 4822124ca412..1ca3eff8f14e 100644 +--- a/flang/cmake/modules/CMakeLists.txt ++++ b/flang/cmake/modules/CMakeLists.txt +@@ -1,11 +1,11 @@ + # Generate a list of CMake library targets so that other CMake projects can + # link against them. LLVM calls its version of this file LLVMExports.cmake, but + # the usual CMake convention seems to be ${Project}Targets.cmake. +-set(FLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/flang) ++set(FLANG_INSTALL_PACKAGE_DIR share/flang) + set(flang_cmake_builddir "${CMAKE_BINARY_DIR}/${FLANG_INSTALL_PACKAGE_DIR}") + + # Keep this in sync with llvm/cmake/CMakeLists.txt! +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + get_property(FLANG_EXPORTS GLOBAL PROPERTY FLANG_EXPORTS) +diff --git a/lld/cmake/modules/CMakeLists.txt b/lld/cmake/modules/CMakeLists.txt +index fa505a533762..90413be34120 100644 +--- a/lld/cmake/modules/CMakeLists.txt ++++ b/lld/cmake/modules/CMakeLists.txt +@@ -1,11 +1,11 @@ + # Generate a list of CMake library targets so that other CMake projects can + # link against them. LLVM calls its version of this file LLVMExports.cmake, but + # the usual CMake convention seems to be ${Project}Targets.cmake. +-set(LLD_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/lld) ++set(LLD_INSTALL_PACKAGE_DIR share/lld) + set(lld_cmake_builddir "${CMAKE_BINARY_DIR}/${LLD_INSTALL_PACKAGE_DIR}") + + # Keep this in sync with llvm/cmake/CMakeLists.txt! +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + get_property(LLD_EXPORTS GLOBAL PROPERTY LLD_EXPORTS) +diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake +index b74adc11ade9..0638aea2f8f6 100644 +--- a/llvm/cmake/modules/AddLLVM.cmake ++++ b/llvm/cmake/modules/AddLLVM.cmake +@@ -974,7 +974,7 @@ function(process_llvm_pass_plugins) + + ## Part 1: Extension header to be included whenever we need extension + # processing. +- set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++ set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + file(WRITE + "${llvm_cmake_builddir}/LLVMConfigExtensions.cmake" +diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt +index 4b8879f65fe4..9e097ab223b5 100644 +--- a/llvm/cmake/modules/CMakeLists.txt ++++ b/llvm/cmake/modules/CMakeLists.txt +@@ -1,4 +1,4 @@ +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + # First for users who use an installed LLVM, create the LLVMExports.cmake file. +diff --git a/mlir/cmake/modules/CMakeLists.txt b/mlir/cmake/modules/CMakeLists.txt +index b9fb9adce2ea..85a54f699f30 100644 +--- a/mlir/cmake/modules/CMakeLists.txt ++++ b/mlir/cmake/modules/CMakeLists.txt +@@ -1,11 +1,11 @@ + # Generate a list of CMake library targets so that other CMake projects can + # link against them. LLVM calls its version of this file LLVMExports.cmake, but + # the usual CMake convention seems to be ${Project}Targets.cmake. +-set(MLIR_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/mlir) ++set(MLIR_INSTALL_PACKAGE_DIR share/mlir) + set(mlir_cmake_builddir "${CMAKE_BINARY_DIR}/${MLIR_INSTALL_PACKAGE_DIR}") + + # Keep this in sync with llvm/cmake/CMakeLists.txt! +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + get_property(MLIR_EXPORTS GLOBAL PROPERTY MLIR_EXPORTS) +diff --git a/polly/cmake/CMakeLists.txt b/polly/cmake/CMakeLists.txt +index 211f95512717..2abe3803f910 100644 +--- a/polly/cmake/CMakeLists.txt ++++ b/polly/cmake/CMakeLists.txt +@@ -1,7 +1,7 @@ + # Keep this in sync with llvm/cmake/CMakeLists.txt! + +-set(LLVM_INSTALL_PACKAGE_DIR "lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") +-set(POLLY_INSTALL_PACKAGE_DIR "lib${LLVM_LIBDIR_SUFFIX}/cmake/polly") ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) ++set(POLLY_INSTALL_PACKAGE_DIR share/polly) + if (CMAKE_CONFIGURATION_TYPES) + set(POLLY_EXPORTS_FILE_NAME "PollyExports-$>.cmake") + else() +diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt +index 8e6e1354707b..2ae7f7090025 100644 +--- a/pstl/CMakeLists.txt ++++ b/pstl/CMakeLists.txt +@@ -81,10 +81,10 @@ install(TARGETS ParallelSTL + install(EXPORT ParallelSTLTargets + FILE ParallelSTLTargets.cmake + NAMESPACE pstl:: +- DESTINATION lib/cmake/ParallelSTL) ++ DESTINATION share/ParallelSTL) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfigVersion.cmake" +- DESTINATION lib/cmake/ParallelSTL) ++ DESTINATION share/ParallelSTL) + install(DIRECTORY include/ + DESTINATION include + PATTERN "*.in" EXCLUDE) diff --git a/ports/llvm/0003-fix-openmp-debug.patch b/ports/llvm/0003-fix-openmp-debug.patch new file mode 100644 index 00000000000000..adf3c8ad01289e --- /dev/null +++ b/ports/llvm/0003-fix-openmp-debug.patch @@ -0,0 +1,25 @@ + openmp/runtime/src/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt +index 822f9ca2b825..814e25864610 100644 +--- a/openmp/runtime/src/CMakeLists.txt ++++ b/openmp/runtime/src/CMakeLists.txt +@@ -157,7 +157,7 @@ else() + endif() + + set_target_properties(omp PROPERTIES +- PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_LIB_FILE}" ++ PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_LIB_FILE}" DEBUG_POSTFIX "" + LINK_FLAGS "${LIBOMP_CONFIGURED_LDFLAGS}" + LINKER_LANGUAGE ${LIBOMP_LINKER_LANGUAGE} + ) +@@ -232,7 +232,7 @@ if(WIN32) + # Create new import library that is just the previously created one + kmp_import.cpp + add_library(ompimp STATIC ${LIBOMP_GENERATED_IMP_LIB} kmp_import.cpp) + set_target_properties(ompimp PROPERTIES +- PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_IMP_LIB_FILE}" ++ PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_IMP_LIB_FILE}" DEBUG_POSTFIX "" + LINKER_LANGUAGE C + ) + add_dependencies(ompimp omp) # ensure generated import library is created first diff --git a/ports/llvm/0004-fix-dr-1734.patch b/ports/llvm/0004-fix-dr-1734.patch new file mode 100644 index 00000000000000..adfbe5a131e21d --- /dev/null +++ b/ports/llvm/0004-fix-dr-1734.patch @@ -0,0 +1,14 @@ +diff --git a/llvm/include/llvm/Support/type_traits.h b/llvm/include/llvm/Support/type_traits.h +index b7d48e8e1ad..53ba24efc00 100644 +--- a/llvm/include/llvm/Support/type_traits.h ++++ b/llvm/include/llvm/Support/type_traits.h +@@ -177,7 +177,8 @@ class is_trivially_copyable { + (has_deleted_copy_assign || has_trivial_copy_assign) && + (has_deleted_copy_constructor || has_trivial_copy_constructor); + +-#ifdef HAVE_STD_IS_TRIVIALLY_COPYABLE ++ // due to DR 1734, a type can be std::is_trivially_copyable but not llvm::is_trivially_copyable ++#if 0 + static_assert(value == std::is_trivially_copyable::value, + "inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable"); + #endif diff --git a/ports/llvm/0005-fix-tools-path.patch b/ports/llvm/0005-fix-tools-path.patch new file mode 100644 index 00000000000000..bdfad617cc97f5 --- /dev/null +++ b/ports/llvm/0005-fix-tools-path.patch @@ -0,0 +1,14 @@ +diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp +index 53ba24efc00..0badcafe000 100644 +--- a/llvm/tools/llvm-config/llvm-config.cpp ++++ b/llvm/tools/llvm-config/llvm-config.cpp +@@ -304,8 +304,8 @@ int main(int argc, char **argv) { + // Create an absolute path, and pop up one directory (we expect to be inside a + // bin dir). + sys::fs::make_absolute(CurrentPath); + CurrentExecPrefix = +- sys::path::parent_path(sys::path::parent_path(CurrentPath)).str(); ++ sys::path::parent_path(sys::path::parent_path(sys::path::parent_path(CurrentPath))).str(); + + // Check to see if we are inside a development tree by comparing to possible + // locations (prefix style or CMake style). diff --git a/ports/llvm/0007-fix-compiler-rt-install-path.patch b/ports/llvm/0007-fix-compiler-rt-install-path.patch new file mode 100644 index 00000000000000..286604623a24e1 --- /dev/null +++ b/ports/llvm/0007-fix-compiler-rt-install-path.patch @@ -0,0 +1,44 @@ + clang/lib/Headers/CMakeLists.txt | 2 +- + clang/runtime/CMakeLists.txt | 2 +- + compiler-rt/cmake/base-config-ix.cmake | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt +index 0692fe75a441..65f72c2da7da 100644 +--- a/clang/lib/Headers/CMakeLists.txt ++++ b/clang/lib/Headers/CMakeLists.txt +@@ -208,7 +208,7 @@ set_target_properties(clang-resource-headers PROPERTIES + FOLDER "Misc" + RUNTIME_OUTPUT_DIRECTORY "${output_dir}") + +-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) ++set(header_install_dir tools/llvm/lib/clang/${CLANG_VERSION}/include) + + install( + FILES ${files} ${generated_files} +diff --git a/clang/runtime/CMakeLists.txt b/clang/runtime/CMakeLists.txt +index 61bbbf8faedd..f6d0b73d9913 100644 +--- a/clang/runtime/CMakeLists.txt ++++ b/clang/runtime/CMakeLists.txt +@@ -82,7 +82,7 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/) + -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS} + -DCOMPILER_RT_OUTPUT_DIR=${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION} + -DCOMPILER_RT_EXEC_OUTPUT_DIR=${LLVM_RUNTIME_OUTPUT_INTDIR} +- -DCOMPILER_RT_INSTALL_PATH:STRING=lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION} ++ -DCOMPILER_RT_INSTALL_PATH:STRING=tools/llvm/lib/clang/${CLANG_VERSION} + -DCOMPILER_RT_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS} + -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} + -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} +diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake +index 964dd598f102..7379a1ba06d1 100644 +--- a/compiler-rt/cmake/base-config-ix.cmake ++++ b/compiler-rt/cmake/base-config-ix.cmake +@@ -43,7 +43,7 @@ if (LLVM_TREE_AVAILABLE) + # Setup the paths where compiler-rt runtimes and headers should be stored. + set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}) + set(COMPILER_RT_EXEC_OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) +- set(COMPILER_RT_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) ++ set(COMPILER_RT_INSTALL_PATH tools/llvm/lib/clang/${CLANG_VERSION}) + option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." + ${LLVM_INCLUDE_TESTS}) + option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" diff --git a/ports/llvm/0008-fix-libcxx-install.patch b/ports/llvm/0008-fix-libcxx-install.patch new file mode 100644 index 00000000000000..ec4019dc2f86f4 --- /dev/null +++ b/ports/llvm/0008-fix-libcxx-install.patch @@ -0,0 +1,18 @@ + libcxx/src/CMakeLists.txt | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt +index 9965104cb5b2..0d2a33c6b33c 100644 +--- a/libcxx/src/CMakeLists.txt ++++ b/libcxx/src/CMakeLists.txt +@@ -372,9 +372,7 @@ endif() + # NOTE: This install command must go after the cxx install command otherwise + # it will not be executed after the library symlinks are installed. + if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT) +- # Replace the libc++ filename with $ +- # after we required CMake 3.0. +- install(FILES "${LIBCXX_LIBRARY_DIR}/libc++${CMAKE_SHARED_LIBRARY_SUFFIX}" ++ install(FILES "$" + DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} + COMPONENT libcxx) + endif() diff --git a/ports/llvm/0009-fix-tools-install-path.patch b/ports/llvm/0009-fix-tools-install-path.patch new file mode 100644 index 00000000000000..b544feec08ede3 --- /dev/null +++ b/ports/llvm/0009-fix-tools-install-path.patch @@ -0,0 +1,172 @@ + clang-tools-extra/modularize/CMakeLists.txt | 2 +- + clang/cmake/modules/AddClang.cmake | 2 +- + clang/tools/c-index-test/CMakeLists.txt | 2 +- + clang/tools/clang-format/CMakeLists.txt | 2 +- + clang/tools/scan-build/CMakeLists.txt | 2 +- + clang/tools/scan-view/CMakeLists.txt | 2 +- + clang/utils/hmaptool/CMakeLists.txt | 2 +- + flang/cmake/modules/AddFlang.cmake | 2 +- + flang/tools/f18/CMakeLists.txt | 4 ++-- + lld/cmake/modules/AddLLD.cmake | 2 +- + lld/tools/lld/CMakeLists.txt | 2 +- + lldb/cmake/modules/AddLLDB.cmake | 2 +- + 12 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/clang-tools-extra/modularize/CMakeLists.txt b/clang-tools-extra/modularize/CMakeLists.txt +index 4caae81c49b6..8c459c51cc34 100644 +--- a/clang-tools-extra/modularize/CMakeLists.txt ++++ b/clang-tools-extra/modularize/CMakeLists.txt +@@ -23,5 +23,5 @@ clang_target_link_libraries(modularize + ) + + install(TARGETS modularize +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION tools/llvm + COMPONENT clang-extras) +diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake +index 704278a0e93b..e8a87f574474 100644 +--- a/clang/cmake/modules/AddClang.cmake ++++ b/clang/cmake/modules/AddClang.cmake +@@ -170,7 +170,7 @@ macro(add_clang_tool name) + + install(TARGETS ${name} + ${export_to_clangtargets} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION tools/llvm + COMPONENT ${name}) + + if(NOT LLVM_ENABLE_IDE) +diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt +index ceef4b08637c..ce6d7799475b 100644 +--- a/clang/tools/c-index-test/CMakeLists.txt ++++ b/clang/tools/c-index-test/CMakeLists.txt +@@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH + "@executable_path/../../lib") + else() +- set(INSTALL_DESTINATION bin) ++ set(INSTALL_DESTINATION tools/llvm) + endif() + + install(TARGETS c-index-test +diff --git a/clang/tools/clang-format/CMakeLists.txt b/clang/tools/clang-format/CMakeLists.txt +index 35ecdb11253c..d1b800dfdadc 100644 +--- a/clang/tools/clang-format/CMakeLists.txt ++++ b/clang/tools/clang-format/CMakeLists.txt +@@ -36,5 +36,5 @@ install(PROGRAMS clang-format.py + DESTINATION share/clang + COMPONENT clang-format) + install(PROGRAMS git-clang-format +- DESTINATION bin ++ DESTINATION tools/llvm + COMPONENT clang-format) +diff --git a/clang/tools/scan-build/CMakeLists.txt b/clang/tools/scan-build/CMakeLists.txt +index ec0702d76f18..9a34a09921b1 100644 +--- a/clang/tools/scan-build/CMakeLists.txt ++++ b/clang/tools/scan-build/CMakeLists.txt +@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) + list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) + install(PROGRAMS bin/${BinFile} +- DESTINATION bin ++ DESTINATION tools/llvm + COMPONENT scan-build) + endforeach() + +diff --git a/clang/tools/scan-view/CMakeLists.txt b/clang/tools/scan-view/CMakeLists.txt +index dd3d33439299..ded0b5530ad9 100644 +--- a/clang/tools/scan-view/CMakeLists.txt ++++ b/clang/tools/scan-view/CMakeLists.txt +@@ -19,7 +19,7 @@ if(CLANG_INSTALL_SCANVIEW) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) + list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) + install(PROGRAMS bin/${BinFile} +- DESTINATION bin ++ DESTINATION tools/llvm + COMPONENT scan-view) + endforeach() + +diff --git a/clang/utils/hmaptool/CMakeLists.txt b/clang/utils/hmaptool/CMakeLists.txt +index 62f2de0cb15c..38dc821c76de 100644 +--- a/clang/utils/hmaptool/CMakeLists.txt ++++ b/clang/utils/hmaptool/CMakeLists.txt +@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM + + list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL}) + install(PROGRAMS ${CLANG_HMAPTOOL} +- DESTINATION bin ++ DESTINATION tools/llvm + COMPONENT hmaptool) + + add_custom_target(hmaptool ALL DEPENDS ${Depends}) +diff --git a/flang/cmake/modules/AddFlang.cmake b/flang/cmake/modules/AddFlang.cmake +index ba36a234babf..1197a8d8ff32 100644 +--- a/flang/cmake/modules/AddFlang.cmake ++++ b/flang/cmake/modules/AddFlang.cmake +@@ -119,7 +119,7 @@ macro(add_flang_tool name) + + install(TARGETS ${name} + ${export_to_flangtargets} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION tools/llvm + COMPONENT ${name}) + + if(NOT LLVM_ENABLE_IDE) +diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt +index 2e5350aecdc6..b4ab145846b5 100644 +--- a/flang/tools/f18/CMakeLists.txt ++++ b/flang/tools/f18/CMakeLists.txt +@@ -63,12 +63,12 @@ endforeach() + + add_custom_target(module_files ALL DEPENDS ${MODULE_FILES}) + +-install(TARGETS f18 DESTINATION bin) ++install(TARGETS f18 DESTINATION tools/llvm) + + # This flang shell script will only work in a POSIX shell. + if (NOT WIN32) + file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/flang + DESTINATION ${CMAKE_BINARY_DIR}/bin + FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE) +- install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION bin) ++ install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION tools/llvm) + endif() +diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake +index 23df41312403..86f4eafeed07 100644 +--- a/lld/cmake/modules/AddLLD.cmake ++++ b/lld/cmake/modules/AddLLD.cmake +@@ -54,7 +54,7 @@ macro(add_lld_tool name) + + install(TARGETS ${name} + ${export_to_lldtargets} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION tools/llvm + COMPONENT ${name}) + + if(NOT CMAKE_CONFIGURATION_TYPES) +diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt +index 5cff736ff57f..32f43bc1c9be 100644 +--- a/lld/tools/lld/CMakeLists.txt ++++ b/lld/tools/lld/CMakeLists.txt +@@ -21,7 +21,7 @@ target_link_libraries(lld + ) + + install(TARGETS lld +- RUNTIME DESTINATION bin) ++ RUNTIME DESTINATION tools/llvm) + + if(NOT LLD_SYMLINKS_TO_CREATE) + set(LLD_SYMLINKS_TO_CREATE +diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake +index 4ed5c647c5d2..cb31901dddbb 100644 +--- a/lldb/cmake/modules/AddLLDB.cmake ++++ b/lldb/cmake/modules/AddLLDB.cmake +@@ -187,7 +187,7 @@ function(add_lldb_executable name) + endif() + + if(ARG_GENERATE_INSTALL) +- set(install_dest bin) ++ set(install_dest tools/llvm) + if(ARG_INSTALL_PREFIX) + set(install_dest ${ARG_INSTALL_PREFIX}) + endif() diff --git a/ports/llvm/0010-fix-libffi.patch b/ports/llvm/0010-fix-libffi.patch new file mode 100644 index 00000000000000..e98825595d3c69 --- /dev/null +++ b/ports/llvm/0010-fix-libffi.patch @@ -0,0 +1,16 @@ + llvm/cmake/config-ix.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake +index 818fafbce148..66fc9f509ac7 100644 +--- a/llvm/cmake/config-ix.cmake ++++ b/llvm/cmake/config-ix.cmake +@@ -335,7 +335,7 @@ if( LLVM_ENABLE_FFI ) + message(FATAL_ERROR "libffi includes are not found.") + endif() + +- find_library(FFI_LIBRARY_PATH ffi PATHS ${FFI_LIBRARY_DIR}) ++ find_library(FFI_LIBRARY_PATH NAMES ffi libffi PATHS ${FFI_LIBRARY_DIR}) + if( NOT FFI_LIBRARY_PATH ) + message(FATAL_ERROR "libffi is not found.") + endif() diff --git a/ports/llvm/0011-fix-libxml2.patch b/ports/llvm/0011-fix-libxml2.patch new file mode 100644 index 00000000000000..b5deff09f9b60f --- /dev/null +++ b/ports/llvm/0011-fix-libxml2.patch @@ -0,0 +1,34 @@ + clang/tools/c-index-test/CMakeLists.txt | 6 +----- + lldb/cmake/modules/LLDBConfig.cmake | 2 +- + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt +index ceef4b086..40b9e9955 100644 +--- a/clang/tools/c-index-test/CMakeLists.txt ++++ b/clang/tools/c-index-test/CMakeLists.txt +@@ -40,11 +40,7 @@ set_target_properties(c-index-test + + # If libxml2 is available, make it available for c-index-test. + if (CLANG_HAVE_LIBXML) +- if ((CMAKE_OSX_SYSROOT) AND (EXISTS ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR})) +- include_directories(SYSTEM ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR}) +- else() +- include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR}) +- endif() ++ include_directories(SYSTEM ${LIBXML2_INCLUDE_DIRS}) + target_link_libraries(c-index-test PRIVATE ${LIBXML2_LIBRARIES}) + endif() + +diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake +index 2fdf1502d..beeeeb9b1 100644 +--- a/lldb/cmake/modules/LLDBConfig.cmake ++++ b/lldb/cmake/modules/LLDBConfig.cmake +@@ -214,7 +214,7 @@ if (LLDB_ENABLE_LZMA) + endif() + + if (LLDB_ENABLE_LIBXML2) +- include_directories(${LIBXML2_INCLUDE_DIR}) ++ include_directories(${LIBXML2_INCLUDE_DIRS}) + endif() + + include_directories(BEFORE diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL deleted file mode 100644 index d7ee8524b9e791..00000000000000 --- a/ports/llvm/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: llvm -Version: 8.0.0 -Homepage: https://llvm.org/ -Description: The LLVM Compiler Infrastructure -Build-Depends: atlmfc (windows) diff --git a/ports/llvm/clang_usage b/ports/llvm/clang_usage new file mode 100644 index 00000000000000..f239721f484f98 --- /dev/null +++ b/ports/llvm/clang_usage @@ -0,0 +1,5 @@ +The package clang provides CMake targets: + + find_package(Clang CONFIG REQUIRED) + target_include_directories(main PRIVATE ${CLANG_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE clangBasic clangLex clangParse clangAST ...) diff --git a/ports/llvm/fix-build-error.patch b/ports/llvm/fix-build-error.patch deleted file mode 100644 index a311fb959f9dd4..00000000000000 --- a/ports/llvm/fix-build-error.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/tools/clang/tools/libclang/CMakeLists.txt b/tools/clang/tools/libclang/CMakeLists.txt -index e539c83..09c1ea3 100644 ---- a/tools/clang/tools/libclang/CMakeLists.txt -+++ b/tools/clang/tools/libclang/CMakeLists.txt -@@ -56,10 +56,7 @@ if (TARGET clangTidyPlugin) - endif() - endif () - --find_library(DL_LIBRARY_PATH dl) --if (DL_LIBRARY_PATH) -- list(APPEND LIBS dl) --endif() -+list(APPEND LIBS "${DL_LIBRARY_PATH}") - - option(LIBCLANG_BUILD_STATIC - "Build libclang as a static library (in addition to a shared one)" OFF) diff --git a/ports/llvm/flang_usage b/ports/llvm/flang_usage new file mode 100644 index 00000000000000..b3cb08592f03ba --- /dev/null +++ b/ports/llvm/flang_usage @@ -0,0 +1,5 @@ +The package flang provides CMake targets: + + find_package(Flang CONFIG REQUIRED) + target_include_directories(main PRIVATE ${FLANG_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE flangFrontend flangFrontendTool ...) diff --git a/ports/llvm/install-cmake-modules-to-share.patch b/ports/llvm/install-cmake-modules-to-share.patch deleted file mode 100644 index 0e789377a980b3..00000000000000 --- a/ports/llvm/install-cmake-modules-to-share.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -urN llvm-8.0.0.src-orig/cmake/modules/CMakeLists.txt llvm-8.0.0.src/cmake/modules/CMakeLists.txt ---- llvm-8.0.0.src-orig/cmake/modules/CMakeLists.txt 2018-07-27 13:57:51.000000000 +0300 -+++ llvm-8.0.0.src/cmake/modules/CMakeLists.txt 2019-03-26 14:56:34.645434190 +0200 -@@ -1,4 +1,4 @@ --set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) -+set(LLVM_INSTALL_PACKAGE_DIR share/llvm) - set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") - - # First for users who use an installed LLVM, create the LLVMExports.cmake file. -diff -urN llvm-8.0.0.src-orig/tools/clang/cmake/modules/CMakeLists.txt llvm-8.0.0.src/tools/clang/cmake/modules/CMakeLists.txt ---- llvm-8.0.0.src-orig/tools/clang/cmake/modules/CMakeLists.txt 2018-01-24 21:26:50.000000000 +0200 -+++ llvm-8.0.0.src/tools/clang/cmake/modules/CMakeLists.txt 2019-03-26 14:57:07.173362736 +0200 -@@ -1,11 +1,11 @@ - # Generate a list of CMake library targets so that other CMake projects can - # link against them. LLVM calls its version of this file LLVMExports.cmake, but - # the usual CMake convention seems to be ${Project}Targets.cmake. --set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang) -+set(CLANG_INSTALL_PACKAGE_DIR share/clang) - set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}") - - # Keep this in sync with llvm/cmake/CMakeLists.txt! --set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) -+set(LLVM_INSTALL_PACKAGE_DIR share/llvm) - set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") - - get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS) diff --git a/ports/llvm/lld_usage b/ports/llvm/lld_usage new file mode 100644 index 00000000000000..92c8d10a0857dc --- /dev/null +++ b/ports/llvm/lld_usage @@ -0,0 +1,5 @@ +The package lld provides CMake targets: + + find_package(LLD CONFIG REQUIRED) + target_include_directories(main PRIVATE ${LLD_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE lldCommon lldCore lldDriver ...) diff --git a/ports/llvm/llvm_usage b/ports/llvm/llvm_usage new file mode 100644 index 00000000000000..72d57dbfa57369 --- /dev/null +++ b/ports/llvm/llvm_usage @@ -0,0 +1,15 @@ +The package llvm provides CMake targets: + + find_package(LLVM CONFIG REQUIRED) + + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") + include(HandleLLVMOptions) + add_definitions(${LLVM_DEFINITIONS}) + + target_include_directories(main PRIVATE ${LLVM_INCLUDE_DIRS}) + + # Find the libraries that correspond to the LLVM components that we wish to use + llvm_map_components_to_libnames(llvm_libs Support Core IRReader ...) + + # Link against LLVM libraries + target_link_libraries(main PRIVATE ${llvm_libs}) diff --git a/ports/llvm/mlir_usage b/ports/llvm/mlir_usage new file mode 100644 index 00000000000000..da45a1612ec8ac --- /dev/null +++ b/ports/llvm/mlir_usage @@ -0,0 +1,5 @@ +The package lld provides CMake targets: + + find_package(MLIR CONFIG REQUIRED) + target_include_directories(main PRIVATE ${MLIR_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE MLIRIR MLIRParser MLIRPass MLIRSupport ...) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 891e4173810abd..1b2dcf6939360f 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -1,116 +1,329 @@ -# LLVM documentation recommends always using static library linkage when -# building with Microsoft toolchain; it's also the default on other platforms -set(VCPKG_LIBRARY_LINKAGE static) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "llvm cannot currently be built for UWP") -endif() - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-8.0.0.src) -vcpkg_download_distfile(ARCHIVE - URLS "http://releases.llvm.org/8.0.0/llvm-8.0.0.src.tar.xz" - FILENAME "llvm-8.0.0.src.tar.xz" - SHA512 1602343b451b964f5d8c2d6b0654d89384c80d45883498c5f0e2f4196168dd4a1ed2a4dadb752076020243df42ffe46cb31d82ffc145d8e5874163cbb9686a1f -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_download_distfile(CLANG_ARCHIVE - URLS "http://releases.llvm.org/8.0.0/cfe-8.0.0.src.tar.xz" - FILENAME "cfe-8.0.0.src.tar.xz" - SHA512 98e540222719716985e5d8439116e47469cb01201ea91d1da7e46cb6633da099688d9352c3b65e5c5f660cbbae353b3d79bb803fc66b3be663f2b04b1feed1c3 -) -vcpkg_extract_source_archive(${CLANG_ARCHIVE} ${SOURCE_PATH}/tools) - -if(NOT EXISTS ${SOURCE_PATH}/tools/clang) - file(RENAME ${SOURCE_PATH}/tools/cfe-8.0.0.src ${SOURCE_PATH}/tools/clang) -endif() - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - install-cmake-modules-to-share.patch - fix-build-error.patch -) - -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DLLVM_TARGETS_TO_BUILD=X86 - -DLLVM_INCLUDE_TOOLS=ON - -DLLVM_INCLUDE_UTILS=OFF - -DLLVM_INCLUDE_EXAMPLES=OFF - -DLLVM_INCLUDE_TESTS=OFF - -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF - -DLLVM_TOOLS_INSTALL_DIR=tools/llvm - -DLLVM_PARALLEL_LINK_JOBS=1 -) - -vcpkg_install_cmake() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*) - file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/llvm) - file(REMOVE ${EXE}) -endif() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*) - file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/llvm) - file(REMOVE ${DEBUG_EXE}) -endif() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/clang TARGET_PATH share/clang) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/llvm) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/llvm) - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-release.cmake RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/tools/llvm" RELEASE_MODULE "${RELEASE_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-release.cmake "${RELEASE_MODULE}") - - file(READ ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-release.cmake RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/tools/llvm" RELEASE_MODULE "${RELEASE_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-release.cmake "${RELEASE_MODULE}") -endif() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(READ ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-debug.cmake DEBUG_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/debug/bin" "\${_IMPORT_PREFIX}/tools/llvm" DEBUG_MODULE "${DEBUG_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-debug.cmake "${DEBUG_MODULE}") - - file(READ ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-debug.cmake DEBUG_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/debug/bin" "\${_IMPORT_PREFIX}/tools/llvm" DEBUG_MODULE "${DEBUG_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-debug.cmake "${DEBUG_MODULE}") -endif() - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/tools - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/debug/msbuild-bin - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/msbuild-bin - ${CURRENT_PACKAGES_DIR}/tools/msbuild-bin - ${CURRENT_PACKAGES_DIR}/include/llvm/BinaryFormat/WasmRelocs -) - -# Remove two empty include subdirectorys if they are indeed empty -file(GLOB MCANALYSISFILES ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis/*) -if(NOT MCANALYSISFILES) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis) -endif() - -file(GLOB MACHOFILES ${CURRENT_PACKAGES_DIR}/include/llvm/TextAPI/MachO/*) -if(NOT MACHOFILES) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/TextAPI/MachO) -endif() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm RENAME copyright) +set(LLVM_VERSION "12.0.1") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO llvm/llvm-project + REF llvmorg-${LLVM_VERSION} + SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1 + HEAD_REF master + PATCHES + 0002-fix-install-paths.patch # This patch fixes paths in ClangConfig.cmake, LLVMConfig.cmake, LLDConfig.cmake etc. + 0003-fix-openmp-debug.patch + 0004-fix-dr-1734.patch + 0005-fix-tools-path.patch + 0007-fix-compiler-rt-install-path.patch + 0008-fix-libcxx-install.patch + 0009-fix-tools-install-path.patch + 0010-fix-libffi.patch + 0011-fix-libxml2.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools LLVM_BUILD_TOOLS + tools LLVM_INCLUDE_TOOLS + utils LLVM_BUILD_UTILS + utils LLVM_INCLUDE_UTILS + enable-rtti LLVM_ENABLE_RTTI + enable-ffi LLVM_ENABLE_FFI + enable-terminfo LLVM_ENABLE_TERMINFO + enable-threads LLVM_ENABLE_THREADS + enable-eh LLVM_ENABLE_EH + enable-bindings LLVM_ENABLE_BINDINGS +) + +# LLVM generates CMake error due to Visual Studio version 16.4 is known to miscompile part of LLVM. +# LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON disables this error. +# See https://developercommunity.visualstudio.com/content/problem/845933/miscompile-boolean-condition-deduced-to-be-always.html +# and thread "[llvm-dev] Longstanding failing tests - clang-tidy, MachO, Polly" on llvm-dev Jan 21-23 2020. +list(APPEND FEATURE_OPTIONS + -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON +) + +# Force enable or disable external libraries +set(llvm_external_libraries + zlib + libxml2 +) +foreach(external_library IN LISTS llvm_external_libraries) + string(TOLOWER "enable-${external_library}" feature_name) + string(TOUPPER "LLVM_ENABLE_${external_library}" define_name) + if(feature_name IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS + -D${define_name}=FORCE_ON + ) + else() + list(APPEND FEATURE_OPTIONS + -D${define_name}=OFF + ) + endif() +endforeach() + +# By default assertions are enabled for Debug configuration only. +if("enable-assertions" IN_LIST FEATURES) + # Force enable assertions for all configurations. + list(APPEND FEATURE_OPTIONS + -DLLVM_ENABLE_ASSERTIONS=ON + ) +elseif("disable-assertions" IN_LIST FEATURES) + # Force disable assertions for all configurations. + list(APPEND FEATURE_OPTIONS + -DLLVM_ENABLE_ASSERTIONS=OFF + ) +endif() + +# LLVM_ABI_BREAKING_CHECKS can be WITH_ASSERTS (default), FORCE_ON or FORCE_OFF. +# By default abi-breaking checks are enabled if assertions are enabled. +if("enable-abi-breaking-checks" IN_LIST FEATURES) + # Force enable abi-breaking checks. + list(APPEND FEATURE_OPTIONS + -DLLVM_ABI_BREAKING_CHECKS=FORCE_ON + ) +elseif("disable-abi-breaking-checks" IN_LIST FEATURES) + # Force disable abi-breaking checks. + list(APPEND FEATURE_OPTIONS + -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF + ) +endif() + +set(LLVM_ENABLE_PROJECTS) +if("clang" IN_LIST FEATURES OR "clang-tools-extra" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "clang") + if("disable-clang-static-analyzer" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS + # Disable ARCMT + -DCLANG_ENABLE_ARCMT=OFF + # Disable static analyzer + -DCLANG_ENABLE_STATIC_ANALYZER=OFF + ) + endif() + # 1) LLVM/Clang tools are relocated from ./bin/ to ./tools/llvm/ (LLVM_TOOLS_INSTALL_DIR=tools/llvm) + # 2) Clang resource files are relocated from ./lib/clang/ to ./tools/llvm/lib/clang/ (see patch 0007-fix-compiler-rt-install-path.patch) + # So, the relative path should be changed from ../lib/clang/ to ./lib/clang/ + list(APPEND FEATURE_OPTIONS -DCLANG_RESOURCE_DIR=lib/clang/${LLVM_VERSION}) +endif() +if("clang-tools-extra" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "clang-tools-extra") +endif() +if("compiler-rt" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "compiler-rt") +endif() +if("flang" IN_LIST FEATURES) + # Disable Flang on Windows (see http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html). + if(VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Building Flang with MSVC is not supported. Disable it until issues are fixed.") + endif() + list(APPEND LLVM_ENABLE_PROJECTS "flang") + list(APPEND FEATURE_OPTIONS + # Flang requires C++17 + -DCMAKE_CXX_STANDARD=17 + ) +endif() +if("libclc" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "libclc") +endif() +if("libcxx" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Building libcxx with MSVC is not supported. Disable it until issues are fixed.") + endif() + list(APPEND LLVM_ENABLE_PROJECTS "libcxx") +endif() +if("libcxxabi" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Building libcxxabi with MSVC is not supported. Disable it until issues are fixed.") + endif() + list(APPEND LLVM_ENABLE_PROJECTS "libcxxabi") +endif() +if("libunwind" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "libunwind") +endif() +if("lld" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "lld") +endif() +if("lldb" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "lldb") +endif() +if("mlir" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "mlir") +endif() +if("openmp" IN_LIST FEATURES) + # Disable OpenMP on Windows (see https://bugs.llvm.org/show_bug.cgi?id=45074). + if(VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Building OpenMP with MSVC is not supported. Disable it until issues are fixed.") + endif() + list(APPEND LLVM_ENABLE_PROJECTS "openmp") + # Perl is required for the OpenMP run-time + vcpkg_find_acquire_program(PERL) + list(APPEND FEATURE_OPTIONS + "-DPERL_EXECUTABLE=${PERL}" + ) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND FEATURE_OPTIONS + -DLIBOMP_DEFAULT_LIB_NAME=libompd + ) + endif() +endif() +if("parallel-libs" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "parallel-libs") +endif() +if("polly" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "polly") +endif() +if("pstl" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Building pstl with MSVC is not supported. Disable it until issues are fixed.") + endif() + list(APPEND LLVM_ENABLE_PROJECTS "pstl") +endif() + +set(known_llvm_targets + AArch64 + AMDGPU + ARM + AVR + BPF + Hexagon + Lanai + Mips + MSP430 + NVPTX + PowerPC + RISCV + Sparc + SystemZ + WebAssembly + X86 + XCore +) + +set(LLVM_TARGETS_TO_BUILD "") +foreach(llvm_target IN LISTS known_llvm_targets) + string(TOLOWER "target-${llvm_target}" feature_name) + if(feature_name IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "${llvm_target}") + endif() +endforeach() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_DIR}) + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "${VCPKG_DETECTED_CMAKE_SYSTEM_PROCESSOR}") + # TODO: support more targets and OS + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + if(VCPKG_TARGET_IS_OSX) + list(APPEND CROSS_OPTIONS -DLLVM_HOST_TRIPLE=arm64-apple-darwin20.3.0) + list(APPEND CROSS_OPTIONS -DLLVM_DEFAULT_TARGET_TRIPLE=arm64-apple-darwin20.3.0) + elseif(VCPKG_TARGET_IS_WINDOWS) + list(APPEND CROSS_OPTIONS -DLLVM_HOST_TRIPLE=arm64-pc-win32) + list(APPEND CROSS_OPTIONS -DLLVM_DEFAULT_TARGET_TRIPLE=arm64-pc-win32) + + # Remove if PR #16111 is merged + list(APPEND CROSS_OPTIONS -DCMAKE_CROSSCOMPILING=ON) + list(APPEND CROSS_OPTIONS -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64) + list(APPEND CROSS_OPTIONS -DCMAKE_SYSTEM_NAME:STRING=Windows) + endif() + list(APPEND CROSS_OPTIONS -DLLVM_TARGET_ARCH=AArch64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + if(VCPKG_TARGET_IS_OSX) + list(APPEND CROSS_OPTIONS -DLLVM_HOST_TRIPLE=x86_64-apple-darwin20.3.0) + list(APPEND CROSS_OPTIONS -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin20.3.0) + endif() + list(APPEND CROSS_OPTIONS -DLLVM_TARGET_ARCH=X86) + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/llvm + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + ${CROSS_OPTIONS} + -DLLVM_INCLUDE_EXAMPLES=OFF + -DLLVM_BUILD_EXAMPLES=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_BUILD_TESTS=OFF + # Force TableGen to be built with optimization. This will significantly improve build time. + -DLLVM_OPTIMIZED_TABLEGEN=ON + "-DLLVM_ENABLE_PROJECTS=${LLVM_ENABLE_PROJECTS}" + "-DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS_TO_BUILD}" + -DPACKAGE_VERSION=${LLVM_VERSION} + # Limit the maximum number of concurrent link jobs to 1. This should fix low amount of memory issue for link. + -DLLVM_PARALLEL_LINK_JOBS=1 + # Disable build LLVM-C.dll (Windows only) due to doesn't compile with CMAKE_DEBUG_POSTFIX + -DLLVM_BUILD_LLVM_C_DYLIB=OFF + # Path for binary subdirectory (defaults to 'bin') + -DLLVM_TOOLS_INSTALL_DIR=tools/llvm + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/llvm" TARGET_PATH "share/llvm") +file(INSTALL ${SOURCE_PATH}/llvm/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/llvm_usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm RENAME usage) + +if("clang" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH "share/clang" TARGET_PATH "share/clang" DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(INSTALL ${SOURCE_PATH}/clang/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/clang RENAME copyright) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/clang_usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/clang RENAME usage) +endif() + +if("clang-tools-extra" IN_LIST FEATURES) + # Remove empty include directory include/clang-tidy/plugin + file(GLOB_RECURSE INCLUDE_CLANG_TIDY_PLUGIN_FILES "${CURRENT_PACKAGES_DIR}/include/clang-tidy/plugin/*") + if(NOT INCLUDE_CLANG_TIDY_PLUGIN_FILES) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/clang-tidy/plugin") + endif() +endif() + +if("flang" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH "share/flang" TARGET_PATH "share/flang" DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(INSTALL ${SOURCE_PATH}/flang/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/flang RENAME copyright) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/flang_usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/flang RENAME usage) + # Remove empty include directory /include/flang/Config + file(GLOB_RECURSE INCLUDE_FLANG_CONFIG_FILES "${CURRENT_PACKAGES_DIR}/include/flang/Config/*") + if(NOT INCLUDE_FLANG_CONFIG_FILES) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/flang/Config") + endif() +endif() + +if("lld" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH "share/lld" TARGET_PATH "share/lld" DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(INSTALL ${SOURCE_PATH}/lld/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lld RENAME copyright) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/lld_usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/lld RENAME usage) +endif() + +if("mlir" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH "share/mlir" TARGET_PATH "share/mlir" DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(INSTALL ${SOURCE_PATH}/mlir/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/mlir RENAME copyright) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/mlir_usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/mlir RENAME usage) +endif() + +if("polly" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH "share/polly" TARGET_PATH "share/polly" DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(INSTALL ${SOURCE_PATH}/polly/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/polly RENAME copyright) +endif() + +if("pstl" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH "share/ParallelSTL" TARGET_PATH "share/ParallelSTL" DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(INSTALL ${SOURCE_PATH}/pstl/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ParallelSTL RENAME copyright) +endif() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) +endif() + +# LLVM still generates a few DLLs in the static build: +# * libclang.dll +# * LTO.dll +# * Remarks.dll +set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled) diff --git a/ports/llvm/vcpkg.json b/ports/llvm/vcpkg.json new file mode 100644 index 00000000000000..afa41a8abe7ebd --- /dev/null +++ b/ports/llvm/vcpkg.json @@ -0,0 +1,333 @@ +{ + "name": "llvm", + "version-string": "12.0.1", + "description": "The LLVM Compiler Infrastructure.", + "homepage": "https://llvm.org", + "supports": "!uwp", + "default-features": [ + "clang", + "default-options", + "default-targets", + "lld", + "tools" + ], + "features": { + "clang": { + "description": "Include C Language Family Front-end.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "compiler-rt", + "tools" + ] + } + ] + }, + "clang-tools-extra": { + "description": "Include Clang tools." + }, + "compiler-rt": { + "description": "Include compiler's runtime libraries." + }, + "default-options": { + "description": "Build with default options.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "disable-abi-breaking-checks", + "disable-assertions", + "disable-clang-static-analyzer", + "enable-bindings", + "enable-terminfo", + "enable-threads", + "enable-zlib" + ] + } + ] + }, + "default-targets": { + "description": "Build with platform-specific default targets.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-aarch64" + ], + "platform": "arm64" + }, + { + "name": "llvm", + "default-features": false, + "features": [ + "target-x86" + ], + "platform": "x86 | x64" + }, + { + "name": "llvm", + "default-features": false, + "features": [ + "target-arm" + ], + "platform": "arm & !arm64" + }, + { + "name": "llvm", + "default-features": false, + "features": [ + "target-all" + ], + "platform": "!x86 & !x64 & !arm & !arm64" + } + ] + }, + "disable-abi-breaking-checks": { + "description": "Build LLVM with LLVM_ABI_BREAKING_CHECKS=FORCE_OFF." + }, + "disable-assertions": { + "description": "Build LLVM without assertions." + }, + "disable-clang-static-analyzer": { + "description": "Build without static analyzer." + }, + "enable-abi-breaking-checks": { + "description": "Build LLVM with LLVM_ABI_BREAKING_CHECKS=FORCE_ON." + }, + "enable-assertions": { + "description": "Build LLVM with assertions." + }, + "enable-bindings": { + "description": "Build bindings." + }, + "enable-eh": { + "description": "Build LLVM with exception handler.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "enable-rtti" + ] + } + ] + }, + "enable-ffi": { + "description": "Build LLVM with FFI.", + "dependencies": [ + "libffi" + ] + }, + "enable-libxml2": { + "description": "Build with LibXml2.", + "dependencies": [ + "libxml2" + ] + }, + "enable-rtti": { + "description": "Build LLVM with run-time type information." + }, + "enable-terminfo": { + "description": "Use terminfo database if available." + }, + "enable-threads": { + "description": "Use threads if available." + }, + "enable-zlib": { + "description": "Build with ZLib.", + "dependencies": [ + "zlib" + ] + }, + "flang": { + "description": "Include Fortran front end.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "mlir", + "tools" + ] + } + ] + }, + "libclc": { + "description": "Include OpenCL library." + }, + "libcxx": { + "description": "Include libcxx library.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "libcxxabi" + ] + } + ] + }, + "libcxxabi": { + "description": "Include libcxxabi library." + }, + "libunwind": { + "description": "Include libunwind library." + }, + "lld": { + "description": "Include LLVM linker.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "tools" + ] + } + ] + }, + "lldb": { + "description": "Include LLVM debugger.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "tools" + ] + } + ] + }, + "mlir": { + "description": "Include MLIR (Multi-Level IR Compiler Framework) project.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "tools" + ] + } + ] + }, + "openmp": { + "description": "Include LLVM OpenMP libraries.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "utils" + ] + } + ] + }, + "parallel-libs": { + "description": "Include parallel-libs project." + }, + "polly": { + "description": "Include Polly (Polyhedral optimizations for LLVM) project.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "tools", + "utils" + ] + } + ] + }, + "pstl": { + "description": "Include pstl (Parallel STL) library." + }, + "target-aarch64": { + "description": "Build with AArch64 backend." + }, + "target-all": { + "description": "Build with all backends.", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "target-aarch64", + "target-amdgpu", + "target-arm", + "target-avr", + "target-bpf", + "target-hexagon", + "target-lanai", + "target-mips", + "target-msp430", + "target-nvptx", + "target-powerpc", + "target-riscv", + "target-sparc", + "target-systemz", + "target-webassembly", + "target-x86", + "target-xcore" + ] + } + ] + }, + "target-amdgpu": { + "description": "Build with AMDGPU backend." + }, + "target-arm": { + "description": "Build with ARM backend." + }, + "target-avr": { + "description": "Build with AVR backend." + }, + "target-bpf": { + "description": "Build with BPF backend." + }, + "target-hexagon": { + "description": "Build with Hexagon backend." + }, + "target-lanai": { + "description": "Build with Lanai backend." + }, + "target-mips": { + "description": "Build with Mips backend." + }, + "target-msp430": { + "description": "Build with MSP430 backend." + }, + "target-nvptx": { + "description": "Build with NVPTX backend." + }, + "target-powerpc": { + "description": "Build with PowerPC backend." + }, + "target-riscv": { + "description": "Build with RISC-V backend." + }, + "target-sparc": { + "description": "Build with Sparc backend." + }, + "target-systemz": { + "description": "Build with SystemZ backend." + }, + "target-webassembly": { + "description": "Build with WebAssembly backend." + }, + "target-x86": { + "description": "Build with X86 backend." + }, + "target-xcore": { + "description": "Build with XCore backend." + }, + "tools": { + "description": "Build LLVM tools." + }, + "utils": { + "description": "Build LLVM utils." + } + } +} diff --git a/ports/lmdb/CONTROL b/ports/lmdb/CONTROL deleted file mode 100644 index eac4b017fb13a5..00000000000000 --- a/ports/lmdb/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: lmdb -Version: 0.9.23-2 -Homepage: https://github.com/LMDB/lmdb -Description: LMDB is an extraordinarily fast, memory-efficient database diff --git a/ports/lmdb/lmdb_45a88275d2a410e683bae4ef44881e0f55fa3c4d.patch b/ports/lmdb/lmdb_45a88275d2a410e683bae4ef44881e0f55fa3c4d.patch deleted file mode 100644 index e6d1f108c0424d..00000000000000 --- a/ports/lmdb/lmdb_45a88275d2a410e683bae4ef44881e0f55fa3c4d.patch +++ /dev/null @@ -1,3958 +0,0 @@ -diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile -index 0940c49..72d0984 100644 ---- a/libraries/liblmdb/Makefile -+++ b/libraries/liblmdb/Makefile -@@ -8,7 +8,7 @@ - # platforms; you should not need to change any of these. - # Read their descriptions in mdb.c if you do: - # --# - MDB_USE_POSIX_SEM -+# - MDB_USE_POSIX_MUTEX, MDB_USE_POSIX_SEM, MDB_USE_SYSV_SEM - # - MDB_DSYNC - # - MDB_FDATASYNC - # - MDB_FDATASYNC_WORKS -@@ -24,8 +24,9 @@ W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized - THREADS = -pthread - OPT = -O2 -g - CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS) --LDLIBS = --SOLIBS = -+LDLIBS = # -lntdll # Windows needs ntdll -+SOLIBS = # -lntdll -+SOEXT = .so - prefix = /usr/local - exec_prefix = $(prefix) - bindir = $(exec_prefix)/bin -@@ -37,7 +38,7 @@ mandir = $(datarootdir)/man - ######################################################################## - - IHDRS = lmdb.h --ILIBS = liblmdb.a liblmdb.so -+ILIBS = liblmdb.a liblmdb$(SOEXT) - IPROGS = mdb_stat mdb_copy mdb_dump mdb_load - IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1 - PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5 -@@ -63,7 +64,7 @@ test: all - liblmdb.a: mdb.o midl.o - $(AR) rs $@ mdb.o midl.o - --liblmdb.so: mdb.lo midl.lo -+liblmdb$(SOEXT): mdb.lo midl.lo - # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS) - $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) - -diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h -index c4d05d1..30d5862 100644 ---- a/libraries/liblmdb/lmdb.h -+++ b/libraries/liblmdb/lmdb.h -@@ -53,14 +53,15 @@ - * - * Fix: Check for stale readers periodically, using the - * #mdb_reader_check function or the \ref mdb_stat_1 "mdb_stat" tool. -- * Stale writers will be cleared automatically on some systems: -+ * Stale writers will be cleared automatically on most systems: - * - Windows - automatic -+ * - BSD, systems using SysV semaphores - automatic - * - Linux, systems using POSIX mutexes with Robust option - automatic -- * - not on BSD, systems using POSIX semaphores. - * Otherwise just make all programs using the database close it; - * the lockfile is always reset on first open of the environment. - * -- * - On BSD systems or others configured with MDB_USE_POSIX_SEM, -+ * - On BSD systems or others configured with MDB_USE_SYSV_SEM or -+ * MDB_USE_POSIX_SEM, - * startup can fail due to semaphores owned by another userid. - * - * Fix: Open and close the database as the user which owns the -@@ -77,6 +78,11 @@ - * access to locks and lock file. Exceptions: On read-only filesystems - * or with the #MDB_NOLOCK flag described under #mdb_env_open(). - * -+ * - An LMDB configuration will often reserve considerable \b unused -+ * memory address space and maybe file size for future growth. -+ * This does not use actual memory or disk space, but users may need -+ * to understand the difference so they won't be scared off. -+ * - * - By default, in versions before 0.9.10, unused portions of the data - * file might receive garbage data from memory freed by other code. - * (This does not happen when using the #MDB_WRITEMAP flag.) As of -@@ -160,6 +166,8 @@ - #define _LMDB_H_ - - #include -+#include -+#include - - #ifdef __cplusplus - extern "C" { -@@ -172,6 +180,32 @@ typedef int mdb_mode_t; - typedef mode_t mdb_mode_t; - #endif - -+#ifdef _WIN32 -+# define MDB_FMT_Z "I" -+#else -+# define MDB_FMT_Z "z" /**< printf/scanf format modifier for size_t */ -+#endif -+ -+#ifndef MDB_VL32 -+/** Unsigned type used for mapsize, entry counts and page/transaction IDs. -+ * -+ * It is normally size_t, hence the name. Defining MDB_VL32 makes it -+ * uint64_t, but do not try this unless you know what you are doing. -+ */ -+typedef size_t mdb_size_t; -+# define MDB_SIZE_MAX SIZE_MAX /**< max #mdb_size_t */ -+/** #mdb_size_t printf formats, \b t = one of [diouxX] without quotes */ -+# define MDB_PRIy(t) MDB_FMT_Z #t -+/** #mdb_size_t scanf formats, \b t = one of [dioux] without quotes */ -+# define MDB_SCNy(t) MDB_FMT_Z #t -+#else -+typedef uint64_t mdb_size_t; -+# define MDB_SIZE_MAX UINT64_MAX -+# define MDB_PRIy(t) PRI##t##64 -+# define MDB_SCNy(t) SCN##t##64 -+# define mdb_env_create mdb_env_create_vl32 /**< Prevent mixing with non-VL32 builds */ -+#endif -+ - /** An abstraction for a file handle. - * On POSIX systems file handles are small integers. On Windows - * they're opaque pointers. -@@ -194,7 +228,7 @@ typedef int mdb_filehandle_t; - /** Library minor version */ - #define MDB_VERSION_MINOR 9 - /** Library patch version */ --#define MDB_VERSION_PATCH 18 -+#define MDB_VERSION_PATCH 70 - - /** Combine args a,b,c into a single integer for easy version comparisons */ - #define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c)) -@@ -204,7 +238,7 @@ typedef int mdb_filehandle_t; - MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH) - - /** The release date of this library version */ --#define MDB_VERSION_DATE "February 5, 2016" -+#define MDB_VERSION_DATE "December 19, 2015" - - /** A stringifier for the version info */ - #define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")" -@@ -306,7 +340,8 @@ typedef void (MDB_rel_func)(MDB_val *item, void *oldptr, void *newptr, void *rel - #define MDB_REVERSEKEY 0x02 - /** use sorted duplicates */ - #define MDB_DUPSORT 0x04 -- /** numeric keys in native byte order: either unsigned int or size_t. -+ /** numeric keys in native byte order, either unsigned int or #mdb_size_t. -+ * (lmdb expects 32-bit int <= size_t <= 32/64-bit mdb_size_t.) - * The keys must all be of the same size. */ - #define MDB_INTEGERKEY 0x08 - /** with #MDB_DUPSORT, sorted dup items have fixed size */ -@@ -383,7 +418,9 @@ typedef enum MDB_cursor_op { - MDB_PREV_NODUP, /**< Position at last data item of previous key */ - MDB_SET, /**< Position at specified key */ - MDB_SET_KEY, /**< Position at specified key, return key + data */ -- MDB_SET_RANGE /**< Position at first key greater than or equal to specified key. */ -+ MDB_SET_RANGE, /**< Position at first key greater than or equal to specified key. */ -+ MDB_PREV_MULTIPLE /**< Position at previous page and return key and up to -+ a page of duplicate data items. Only for #MDB_DUPFIXED */ - } MDB_cursor_op; - - /** @defgroup errors Return Codes -@@ -440,8 +477,10 @@ typedef enum MDB_cursor_op { - #define MDB_BAD_VALSIZE (-30781) - /** The specified DBI was changed unexpectedly */ - #define MDB_BAD_DBI (-30780) -+ /** Unexpected problem - txn should abort */ -+#define MDB_PROBLEM (-30779) - /** The last defined error code */ --#define MDB_LAST_ERRCODE MDB_BAD_DBI -+#define MDB_LAST_ERRCODE MDB_PROBLEM - /** @} */ - - /** @brief Statistics for a database in the environment */ -@@ -449,18 +488,18 @@ typedef struct MDB_stat { - unsigned int ms_psize; /**< Size of a database page. - This is currently the same for all databases. */ - unsigned int ms_depth; /**< Depth (height) of the B-tree */ -- size_t ms_branch_pages; /**< Number of internal (non-leaf) pages */ -- size_t ms_leaf_pages; /**< Number of leaf pages */ -- size_t ms_overflow_pages; /**< Number of overflow pages */ -- size_t ms_entries; /**< Number of data items */ -+ mdb_size_t ms_branch_pages; /**< Number of internal (non-leaf) pages */ -+ mdb_size_t ms_leaf_pages; /**< Number of leaf pages */ -+ mdb_size_t ms_overflow_pages; /**< Number of overflow pages */ -+ mdb_size_t ms_entries; /**< Number of data items */ - } MDB_stat; - - /** @brief Information about the environment */ - typedef struct MDB_envinfo { - void *me_mapaddr; /**< Address of map, if fixed */ -- size_t me_mapsize; /**< Size of the data memory map */ -- size_t me_last_pgno; /**< ID of the last used page */ -- size_t me_last_txnid; /**< ID of the last committed transaction */ -+ mdb_size_t me_mapsize; /**< Size of the data memory map */ -+ mdb_size_t me_last_pgno; /**< ID of the last used page */ -+ mdb_size_t me_last_txnid; /**< ID of the last committed transaction */ - unsigned int me_maxreaders; /**< max reader slots in the environment */ - unsigned int me_numreaders; /**< max reader slots used in the environment */ - } MDB_envinfo; -@@ -672,6 +711,7 @@ int mdb_env_copyfd(MDB_env *env, mdb_filehandle_t fd); - *
  • #MDB_CP_COMPACT - Perform compaction while copying: omit free - * pages and sequentially renumber all pages in output. This option - * consumes more CPU and runs more slowly than the default. -+ * Currently it fails if the environment has suffered a page leak. - * - * @return A non-zero error value on failure and 0 on success. - */ -@@ -829,7 +869,7 @@ int mdb_env_get_fd(MDB_env *env, mdb_filehandle_t *fd); - * an active write transaction. - * - */ --int mdb_env_set_mapsize(MDB_env *env, size_t size); -+int mdb_env_set_mapsize(MDB_env *env, mdb_size_t size); - - /** @brief Set the maximum number of threads/reader slots for the environment. - * -@@ -942,6 +982,10 @@ int mdb_env_set_assert(MDB_env *env, MDB_assert_func *func); - *
      - *
    • #MDB_RDONLY - * This transaction will not perform any write operations. -+ *
    • #MDB_NOSYNC -+ * Don't flush system buffers to disk when committing this transaction. -+ *
    • #MDB_NOMETASYNC -+ * Flush system buffers but omit metadata flush when committing this transaction. - *
    - * @param[out] txn Address where the new #MDB_txn handle will be stored - * @return A non-zero error value on failure and 0 on success. Some possible -@@ -974,7 +1018,7 @@ MDB_env *mdb_txn_env(MDB_txn *txn); - * @param[in] txn A transaction handle returned by #mdb_txn_begin() - * @return A transaction ID, valid if input is an active transaction. - */ --size_t mdb_txn_id(MDB_txn *txn); -+mdb_size_t mdb_txn_id(MDB_txn *txn); - - /** @brief Commit all the operations of a transaction into the database. - * -@@ -1084,7 +1128,8 @@ int mdb_txn_renew(MDB_txn *txn); - * keys must be unique and may have only a single data item. - *
  • #MDB_INTEGERKEY - * Keys are binary integers in native byte order, either unsigned int -- * or size_t, and will be sorted as such. -+ * or #mdb_size_t, and will be sorted as such. -+ * (lmdb expects 32-bit int <= size_t <= 32/64-bit mdb_size_t.) - * The keys must all be of the same size. - *
  • #MDB_DUPFIXED - * This flag may only be used in combination with #MDB_DUPSORT. This option -@@ -1524,7 +1569,7 @@ int mdb_cursor_del(MDB_cursor *cursor, unsigned int flags); - *
  • EINVAL - cursor is not initialized, or an invalid parameter was specified. - * - */ --int mdb_cursor_count(MDB_cursor *cursor, size_t *countp); -+int mdb_cursor_count(MDB_cursor *cursor, mdb_size_t *countp); - - /** @brief Compare two data items according to a particular database. - * -diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c -index d2e81e4..1d9e9fa 100644 ---- a/libraries/liblmdb/mdb.c -+++ b/libraries/liblmdb/mdb.c -@@ -35,9 +35,42 @@ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE 1 - #endif -+#if defined(MDB_VL32) || defined(__WIN64__) -+#define _FILE_OFFSET_BITS 64 -+#endif - #ifdef _WIN32 - #include - #include -+ -+/* We use native NT APIs to setup the memory map, so that we can -+ * let the DB file grow incrementally instead of always preallocating -+ * the full size. These APIs are defined in and -+ * but those headers are meant for driver-level development and -+ * conflict with the regular user-level headers, so we explicitly -+ * declare them here. Using these APIs also means we must link to -+ * ntdll.dll, which is not linked by default in user code. -+ */ -+NTSTATUS WINAPI -+NtCreateSection(OUT PHANDLE sh, IN ACCESS_MASK acc, -+ IN void * oa OPTIONAL, -+ IN PLARGE_INTEGER ms OPTIONAL, -+ IN ULONG pp, IN ULONG aa, IN HANDLE fh OPTIONAL); -+ -+typedef enum _SECTION_INHERIT { -+ ViewShare = 1, -+ ViewUnmap = 2 -+} SECTION_INHERIT; -+ -+NTSTATUS WINAPI -+NtMapViewOfSection(IN PHANDLE sh, IN HANDLE ph, -+ IN OUT PVOID *addr, IN ULONG_PTR zbits, -+ IN SIZE_T cs, IN OUT PLARGE_INTEGER off OPTIONAL, -+ IN OUT PSIZE_T vs, IN SECTION_INHERIT ih, -+ IN ULONG at, IN ULONG pp); -+ -+NTSTATUS WINAPI -+NtClose(HANDLE h); -+ - /** getpid() returns int; MinGW defines pid_t but MinGW64 typedefs it - * as int64 which is wrong. MSVC doesn't define it at all, so just - * don't use it. -@@ -56,6 +89,10 @@ - # define SSIZE_MAX INT_MAX - # endif - #endif -+/* Windows uses 32-bit off_t to define our own -+ 64 bit offset type -+*/ -+#define offset_t __int64 - #else - #include - #include -@@ -68,6 +105,7 @@ - #include - #endif - #include -+#define offset_t off_t - #endif - - #if defined(__mips) && defined(__linux) -@@ -116,7 +154,9 @@ typedef SSIZE_T ssize_t; - #endif - - #if defined(__APPLE__) || defined (BSD) --# define MDB_USE_POSIX_SEM 1 -+# if !(defined(MDB_USE_POSIX_MUTEX) || defined(MDB_USE_POSIX_SEM)) -+# define MDB_USE_SYSV_SEM 1 -+# endif - # define MDB_FDATASYNC fsync - #elif defined(ANDROID) - # define MDB_FDATASYNC fsync -@@ -127,12 +167,22 @@ typedef SSIZE_T ssize_t; - #ifdef MDB_USE_POSIX_SEM - # define MDB_USE_HASH 1 - #include -+#elif defined(MDB_USE_SYSV_SEM) -+#include -+#include -+#ifdef _SEM_SEMUN_UNDEFINED -+union semun { -+ int val; -+ struct semid_ds *buf; -+ unsigned short *array; -+}; -+#endif /* _SEM_SEMUN_UNDEFINED */ - #else - #define MDB_USE_POSIX_MUTEX 1 --#endif --#endif -+#endif /* MDB_USE_POSIX_SEM */ -+#endif /* !_WIN32 */ - --#if defined(_WIN32) + defined(MDB_USE_POSIX_SEM) \ -+#if defined(_WIN32) + defined(MDB_USE_POSIX_SEM) + defined(MDB_USE_SYSV_SEM) \ - + defined(MDB_USE_POSIX_MUTEX) != 1 - # error "Ambiguous shared-lock implementation" - #endif -@@ -183,7 +233,7 @@ typedef SSIZE_T ssize_t; - - #if (BYTE_ORDER == LITTLE_ENDIAN) == (BYTE_ORDER == BIG_ENDIAN) - # error "Unknown or unsupported endianness (BYTE_ORDER)" --#elif (-6 & 5) || CHAR_BIT != 8 || UINT_MAX < 0xffffffff || ULONG_MAX % 0xFFFF -+#elif (-6 & 5) || CHAR_BIT!=8 || UINT_MAX!=0xffffffff || MDB_SIZE_MAX%UINT_MAX - # error "Two's complement, reasonably sized integer types, please" - #endif - -@@ -234,6 +284,8 @@ typedef SSIZE_T ssize_t; - #define MDB_NO_ROOT (MDB_LAST_ERRCODE + 10) - #ifdef _WIN32 - #define MDB_OWNERDEAD ((int) WAIT_ABANDONED) -+#elif defined MDB_USE_SYSV_SEM -+#define MDB_OWNERDEAD (MDB_LAST_ERRCODE + 11) - #elif defined(MDB_USE_POSIX_MUTEX) && defined(EOWNERDEAD) - #define MDB_OWNERDEAD EOWNERDEAD /**< #LOCK_MUTEX0() result if dead owner */ - #endif -@@ -256,16 +308,20 @@ typedef SSIZE_T ssize_t; - # define MDB_USE_ROBUST 0 - # else - # define MDB_USE_ROBUST 1 -+# endif -+#endif /* !MDB_USE_ROBUST */ -+ -+#if defined(MDB_USE_POSIX_MUTEX) && (MDB_USE_ROBUST) - /* glibc < 2.12 only provided _np API */ --# if defined(__GLIBC__) && GLIBC_VER < 0x02000c -+# if (defined(__GLIBC__) && GLIBC_VER < 0x02000c) || \ -+ (defined(PTHREAD_MUTEX_ROBUST_NP) && !defined(PTHREAD_MUTEX_ROBUST)) - # define PTHREAD_MUTEX_ROBUST PTHREAD_MUTEX_ROBUST_NP - # define pthread_mutexattr_setrobust(attr, flag) pthread_mutexattr_setrobust_np(attr, flag) - # define pthread_mutex_consistent(mutex) pthread_mutex_consistent_np(mutex) - # endif --# endif --#endif /* MDB_USE_ROBUST */ -+#endif /* MDB_USE_POSIX_MUTEX && MDB_USE_ROBUST */ - --#if defined(MDB_OWNERDEAD) && MDB_USE_ROBUST -+#if defined(MDB_OWNERDEAD) && (MDB_USE_ROBUST) - #define MDB_ROBUST_SUPPORTED 1 - #endif - -@@ -288,8 +344,10 @@ typedef HANDLE mdb_mutex_t, mdb_mutexref_t; - #define pthread_mutex_lock(x) WaitForSingleObject(*x, INFINITE) - #define pthread_cond_signal(x) SetEvent(*x) - #define pthread_cond_wait(cond,mutex) do{SignalObjectAndWait(*mutex, *cond, INFINITE, FALSE); WaitForSingleObject(*mutex, INFINITE);}while(0) --#define THREAD_CREATE(thr,start,arg) thr=CreateThread(NULL,0,start,arg,0,NULL) --#define THREAD_FINISH(thr) WaitForSingleObject(thr, INFINITE) -+#define THREAD_CREATE(thr,start,arg) \ -+ (((thr) = CreateThread(NULL, 0, start, arg, 0, NULL)) ? 0 : ErrCode()) -+#define THREAD_FINISH(thr) \ -+ (WaitForSingleObject(thr, INFINITE) ? ErrCode() : 0) - #define LOCK_MUTEX0(mutex) WaitForSingleObject(mutex, INFINITE) - #define UNLOCK_MUTEX(mutex) ReleaseMutex(mutex) - #define mdb_mutex_consistent(mutex) 0 -@@ -305,12 +363,10 @@ typedef HANDLE mdb_mutex_t, mdb_mutexref_t; - #else - #define MDB_PROCESS_QUERY_LIMITED_INFORMATION 0x1000 - #endif --#define Z "I" - #else - #define THREAD_RET void * - #define THREAD_CREATE(thr,start,arg) pthread_create(&thr,NULL,start,arg) - #define THREAD_FINISH(thr) pthread_join(thr,NULL) --#define Z "z" /**< printf format modifier for size_t */ - - /** For MDB_LOCK_FORMAT: True if readers take a pid lock in the lockfile */ - #define MDB_PIDLOCK 1 -@@ -329,12 +385,46 @@ mdb_sem_wait(sem_t *sem) - return rc; - } - -+#elif defined MDB_USE_SYSV_SEM -+ -+typedef struct mdb_mutex { -+ int semid; -+ int semnum; -+ int *locked; -+} mdb_mutex_t[1], *mdb_mutexref_t; -+ -+#define LOCK_MUTEX0(mutex) mdb_sem_wait(mutex) -+#define UNLOCK_MUTEX(mutex) do { \ -+ struct sembuf sb = { 0, 1, SEM_UNDO }; \ -+ sb.sem_num = (mutex)->semnum; \ -+ *(mutex)->locked = 0; \ -+ semop((mutex)->semid, &sb, 1); \ -+} while(0) -+ -+static int -+mdb_sem_wait(mdb_mutexref_t sem) -+{ -+ int rc, *locked = sem->locked; -+ struct sembuf sb = { 0, -1, SEM_UNDO }; -+ sb.sem_num = sem->semnum; -+ do { -+ if (!semop(sem->semid, &sb, 1)) { -+ rc = *locked ? MDB_OWNERDEAD : MDB_SUCCESS; -+ *locked = 1; -+ break; -+ } -+ } while ((rc = errno) == EINTR); -+ return rc; -+} -+ -+#define mdb_mutex_consistent(mutex) 0 -+ - #else /* MDB_USE_POSIX_MUTEX: */ - /** Shared mutex/semaphore as it is stored (mdb_mutex_t), and as - * local variables keep it (mdb_mutexref_t). - * -- * When #mdb_mutexref_t is a pointer declaration and #mdb_mutex_t is -- * not, then it is array[size 1] so it can be assigned to a pointer. -+ * An mdb_mutex_t can be assigned to an mdb_mutexref_t. They can -+ * be the same, or an array[size 1] and a pointer. - * @{ - */ - typedef pthread_mutex_t mdb_mutex_t[1], *mdb_mutexref_t; -@@ -349,7 +439,7 @@ typedef pthread_mutex_t mdb_mutex_t[1], *mdb_mutexref_t; - /** Mark mutex-protected data as repaired, after death of previous owner. - */ - #define mdb_mutex_consistent(mutex) pthread_mutex_consistent(mutex) --#endif /* MDB_USE_POSIX_SEM */ -+#endif /* MDB_USE_POSIX_SEM || MDB_USE_SYSV_SEM */ - - /** Get the error code for the last failed system function. - */ -@@ -374,12 +464,24 @@ typedef pthread_mutex_t mdb_mutex_t[1], *mdb_mutexref_t; - #define GET_PAGESIZE(x) ((x) = sysconf(_SC_PAGE_SIZE)) - #endif - -+#define Z MDB_FMT_Z /**< printf/scanf format modifier for size_t */ -+#define Yu MDB_PRIy(u) /**< printf format for #mdb_size_t */ -+#define Yd MDB_PRIy(d) /**< printf format for "signed #mdb_size_t" */ -+ - #if defined(_WIN32) || defined(MDB_USE_POSIX_SEM) - #define MNAME_LEN 32 -+#elif defined(MDB_USE_SYSV_SEM) -+#define MNAME_LEN (sizeof(int)) - #else - #define MNAME_LEN (sizeof(pthread_mutex_t)) - #endif - -+#ifdef MDB_USE_SYSV_SEM -+#define SYSV_SEM_FLAG 1 /**< SysV sems in lockfile format */ -+#else -+#define SYSV_SEM_FLAG 0 -+#endif -+ - /** @} */ - - #ifdef MDB_ROBUST_SUPPORTED -@@ -521,7 +623,7 @@ static txnid_t mdb_debug_start; - /** The version number for a database's datafile format. */ - #define MDB_DATA_VERSION ((MDB_DEVEL) ? 999 : 1) - /** The version number for a database's lockfile format. */ --#define MDB_LOCK_VERSION 1 -+#define MDB_LOCK_VERSION ((MDB_DEVEL) ? 999 : 1) - - /** @brief The max size of a key we can write, or 0 for computed max. - * -@@ -712,6 +814,9 @@ typedef struct MDB_txbody { - uint32_t mtb_format; - #if defined(_WIN32) || defined(MDB_USE_POSIX_SEM) - char mtb_rmname[MNAME_LEN]; -+#elif defined(MDB_USE_SYSV_SEM) -+ int mtb_semid; -+ int mtb_rlocked; - #else - /** Mutex protecting access to this table. - * This is the reader table lock used with LOCK_MUTEX(). -@@ -740,12 +845,19 @@ typedef struct MDB_txninfo { - #define mti_rmname mt1.mtb.mtb_rmname - #define mti_txnid mt1.mtb.mtb_txnid - #define mti_numreaders mt1.mtb.mtb_numreaders -+#ifdef MDB_USE_SYSV_SEM -+#define mti_semid mt1.mtb.mtb_semid -+#define mti_rlocked mt1.mtb.mtb_rlocked -+#endif - char pad[(sizeof(MDB_txbody)+CACHELINE-1) & ~(CACHELINE-1)]; - } mt1; - union { - #if defined(_WIN32) || defined(MDB_USE_POSIX_SEM) - char mt2_wmname[MNAME_LEN]; - #define mti_wmname mt2.mt2_wmname -+#elif defined MDB_USE_SYSV_SEM -+ int mt2_wlocked; -+#define mti_wlocked mt2.mt2_wlocked - #else - mdb_mutex_t mt2_wmutex; - #define mti_wmutex mt2.mt2_wmutex -@@ -760,12 +872,27 @@ typedef struct MDB_txninfo { - ((uint32_t) \ - ((MDB_LOCK_VERSION) \ - /* Flags which describe functionality */ \ -+ + (SYSV_SEM_FLAG << 18) \ - + (((MDB_PIDLOCK) != 0) << 16))) - /** @} */ - --/** Common header for all page types. -- * Overflow records occupy a number of contiguous pages with no -- * headers on any page after the first. -+/** Common header for all page types. The page type depends on #mp_flags. -+ * -+ * #P_BRANCH and #P_LEAF pages have unsorted '#MDB_node's at the end, with -+ * sorted #mp_ptrs[] entries referring to them. Exception: #P_LEAF2 pages -+ * omit mp_ptrs and pack sorted #MDB_DUPFIXED values after the page header. -+ * -+ * #P_OVERFLOW records occupy one or more contiguous pages where only the -+ * first has a page header. They hold the real data of #F_BIGDATA nodes. -+ * -+ * #P_SUBP sub-pages are small leaf "pages" with duplicate data. -+ * A node with flag #F_DUPDATA but not #F_SUBDATA contains a sub-page. -+ * (Duplicate data can also go in sub-databases, which use normal pages.) -+ * -+ * #P_META pages contain #MDB_meta, the start point of an LMDB snapshot. -+ * -+ * Each non-metapage up to #MDB_meta.%mm_last_pg is reachable exactly once -+ * in the snapshot: Either used by a database or listed in a freeDB record. - */ - typedef struct MDB_page { - #define mp_pgno mp_p.p_pgno -@@ -774,7 +901,7 @@ typedef struct MDB_page { - pgno_t p_pgno; /**< page number */ - struct MDB_page *p_next; /**< for in-memory list of freed pages */ - } mp_p; -- uint16_t mp_pad; -+ uint16_t mp_pad; /**< key size if this is a LEAF2 page */ - /** @defgroup mdb_page Page Flags - * @ingroup internal - * Flags for the page headers. -@@ -841,7 +968,9 @@ typedef struct MDB_page { - /** The number of overflow pages needed to store the given size. */ - #define OVPAGES(size, psize) ((PAGEHDRSZ-1 + (size)) / (psize) + 1) - -- /** Link in #MDB_txn.%mt_loose_pgs list */ -+ /** Link in #MDB_txn.%mt_loose_pgs list. -+ * Kept outside the page header, which is needed when reusing the page. -+ */ - #define NEXT_LOOSE_PAGE(p) (*(MDB_page **)((p) + 2)) - - /** Header for a single key/data pair within a page. -@@ -924,7 +1053,7 @@ typedef struct MDB_node { - #ifdef MISALIGNED_OK - #define COPY_PGNO(dst,src) dst = src - #else --#if SIZE_MAX > 4294967295UL -+#if MDB_SIZE_MAX > 0xffffffffU - #define COPY_PGNO(dst,src) do { \ - unsigned short *s, *d; \ - s = (unsigned short *)&(src); \ -@@ -965,13 +1094,13 @@ typedef struct MDB_db { - pgno_t md_branch_pages; /**< number of internal pages */ - pgno_t md_leaf_pages; /**< number of leaf pages */ - pgno_t md_overflow_pages; /**< number of overflow pages */ -- size_t md_entries; /**< number of data items */ -+ mdb_size_t md_entries; /**< number of data items */ - pgno_t md_root; /**< the root page of this tree */ - } MDB_db; - -- /** mdb_dbi_open flags */ - #define MDB_VALID 0x8000 /**< DB handle is valid, for me_dbflags */ - #define PERSISTENT_FLAGS (0xffff & ~(MDB_VALID)) -+ /** #mdb_dbi_open() flags */ - #define VALID_FLAGS (MDB_REVERSEKEY|MDB_DUPSORT|MDB_INTEGERKEY|MDB_DUPFIXED|\ - MDB_INTEGERDUP|MDB_REVERSEDUP|MDB_CREATE) - -@@ -995,14 +1124,25 @@ typedef struct MDB_meta { - uint32_t mm_magic; - /** Version number of this file. Must be set to #MDB_DATA_VERSION. */ - uint32_t mm_version; -+#ifdef MDB_VL32 -+ union { /* always zero since we don't support fixed mapping in MDB_VL32 */ -+ MDB_ID mmun_ull; -+ void *mmun_address; -+ } mm_un; -+#define mm_address mm_un.mmun_address -+#else - void *mm_address; /**< address for fixed mapping */ -- size_t mm_mapsize; /**< size of mmap region */ -+#endif -+ pgno_t mm_mapsize; /**< size of mmap region */ - MDB_db mm_dbs[CORE_DBS]; /**< first is free space, 2nd is main db */ - /** The size of pages used in this DB */ - #define mm_psize mm_dbs[FREE_DBI].md_pad - /** Any persistent environment flags. @ref mdb_env */ - #define mm_flags mm_dbs[FREE_DBI].md_flags -- pgno_t mm_last_pg; /**< last used page in file */ -+ /** Last used page in the datafile. -+ * Actually the file may be shorter if the freeDB lists the final pages. -+ */ -+ pgno_t mm_last_pg; - volatile txnid_t mm_txnid; /**< txnid that committed this page */ - } MDB_meta; - -@@ -1039,6 +1179,9 @@ struct MDB_txn { - /** Nested txn under this txn, set together with flag #MDB_TXN_HAS_CHILD */ - MDB_txn *mt_child; - pgno_t mt_next_pgno; /**< next unallocated page */ -+#ifdef MDB_VL32 -+ pgno_t mt_last_pgno; /**< last written page */ -+#endif - /** The ID of this transaction. IDs are integers incrementing from 1. - * Only committed write transactions increment the ID. If a transaction - * aborts, the ID may be re-used by the next writer. -@@ -1052,7 +1195,7 @@ struct MDB_txn { - * in this transaction, linked through #NEXT_LOOSE_PAGE(page). - */ - MDB_page *mt_loose_pgs; -- /* #Number of loose pages (#mt_loose_pgs) */ -+ /** Number of loose pages (#mt_loose_pgs) */ - int mt_loose_count; - /** The sorted list of dirty pages we temporarily wrote to disk - * because the dirty list was full. page numbers in here are -@@ -1085,6 +1228,19 @@ struct MDB_txn { - MDB_cursor **mt_cursors; - /** Array of flags for each DB */ - unsigned char *mt_dbflags; -+#ifdef MDB_VL32 -+ /** List of read-only pages (actually chunks) */ -+ MDB_ID3L mt_rpages; -+ /** We map chunks of 16 pages. Even though Windows uses 4KB pages, all -+ * mappings must begin on 64KB boundaries. So we round off all pgnos to -+ * a chunk boundary. We do the same on Linux for symmetry, and also to -+ * reduce the frequency of mmap/munmap calls. -+ */ -+#define MDB_RPAGE_CHUNK 16 -+#define MDB_TRPAGE_SIZE 4096 /**< size of #mt_rpages array of chunks */ -+#define MDB_TRPAGE_MAX (MDB_TRPAGE_SIZE-1) /**< maximum chunk index */ -+ unsigned int mt_rpcheck; /**< threshold for reclaiming unref'd chunks */ -+#endif - /** Number of DB records in use, or 0 when the txn is finished. - * This number only ever increments until the txn finishes; we - * don't decrement it when individual DB handles are closed. -@@ -1096,7 +1252,9 @@ struct MDB_txn { - * @{ - */ - /** #mdb_txn_begin() flags */ --#define MDB_TXN_BEGIN_FLAGS MDB_RDONLY -+#define MDB_TXN_BEGIN_FLAGS (MDB_NOMETASYNC|MDB_NOSYNC|MDB_RDONLY) -+#define MDB_TXN_NOMETASYNC MDB_NOMETASYNC /**< don't sync meta for this txn on commit */ -+#define MDB_TXN_NOSYNC MDB_NOSYNC /**< don't sync this txn on commit */ - #define MDB_TXN_RDONLY MDB_RDONLY /**< read-only transaction */ - /* internal txn flags */ - #define MDB_TXN_WRITEMAP MDB_WRITEMAP /**< copy of #MDB_env flag in writers */ -@@ -1162,10 +1320,24 @@ struct MDB_cursor { - #define C_SUB 0x04 /**< Cursor is a sub-cursor */ - #define C_DEL 0x08 /**< last op was a cursor_del */ - #define C_UNTRACK 0x40 /**< Un-track cursor when closing */ -+#define C_WRITEMAP MDB_TXN_WRITEMAP /**< Copy of txn flag */ -+/** Read-only cursor into the txn's original snapshot in the map. -+ * Set for read-only txns, and in #mdb_page_alloc() for #FREE_DBI when -+ * #MDB_DEVEL & 2. Only implements code which is necessary for this. -+ */ -+#define C_ORIG_RDONLY MDB_TXN_RDONLY - /** @} */ - unsigned int mc_flags; /**< @ref mdb_cursor */ - MDB_page *mc_pg[CURSOR_STACK]; /**< stack of pushed pages */ - indx_t mc_ki[CURSOR_STACK]; /**< stack of page indices */ -+#ifdef MDB_VL32 -+ MDB_page *mc_ovpg; /**< a referenced overflow page */ -+# define MC_OVPG(mc) ((mc)->mc_ovpg) -+# define MC_SET_OVPG(mc, pg) ((mc)->mc_ovpg = (pg)) -+#else -+# define MC_OVPG(mc) ((MDB_page *)0) -+# define MC_SET_OVPG(mc, pg) ((void)0) -+#endif - }; - - /** Context for sorted-dup records. -@@ -1195,6 +1367,9 @@ struct MDB_env { - HANDLE me_fd; /**< The main data file */ - HANDLE me_lfd; /**< The lock file */ - HANDLE me_mfd; /**< just for writing the meta pages */ -+#if defined(MDB_VL32) && defined(_WIN32) -+ HANDLE me_fmh; /**< File Mapping handle */ -+#endif - /** Failed to update the meta page. Probably an I/O error. */ - #define MDB_FATAL_ERROR 0x80000000U - /** Some fields are initialized. */ -@@ -1219,8 +1394,8 @@ struct MDB_env { - void *me_pbuf; /**< scratch area for DUPSORT put() */ - MDB_txn *me_txn; /**< current write transaction */ - MDB_txn *me_txn0; /**< prealloc'd write transaction */ -- size_t me_mapsize; /**< size of the data memory map */ -- off_t me_size; /**< current file size */ -+ mdb_size_t me_mapsize; /**< size of the data memory map */ -+ offset_t me_size; /**< current file size */ - pgno_t me_maxpg; /**< me_mapsize / me_psize */ - MDB_dbx *me_dbxs; /**< array of static DB info */ - uint16_t *me_dbflags; /**< array of flags from MDB_db.md_flags */ -@@ -1253,6 +1428,13 @@ struct MDB_env { - mdb_mutex_t me_rmutex; - mdb_mutex_t me_wmutex; - #endif -+#ifdef MDB_VL32 -+ MDB_ID3L me_rpages; /**< like #mt_rpages, but global to env */ -+ pthread_mutex_t me_rpmutex; /**< control access to #me_rpages */ -+#define MDB_ERPAGE_SIZE 16384 -+#define MDB_ERPAGE_MAX (MDB_ERPAGE_SIZE-1) -+ unsigned int me_rpcheck; -+#endif - void *me_userctx; /**< User-settable context */ - MDB_assert_func *me_assert_func; /**< Callback for assertion failures */ - }; -@@ -1298,7 +1480,7 @@ enum { - #define MDB_END_SLOT MDB_NOTLS /**< release any reader slot if #MDB_NOTLS */ - static void mdb_txn_end(MDB_txn *txn, unsigned mode); - --static int mdb_page_get(MDB_txn *txn, pgno_t pgno, MDB_page **mp, int *lvl); -+static int mdb_page_get(MDB_cursor *mc, pgno_t pgno, MDB_page **mp, int *lvl); - static int mdb_page_search_root(MDB_cursor *mc, - MDB_val *key, int modify); - #define MDB_PS_MODIFY 1 -@@ -1327,7 +1509,7 @@ static int mdb_node_add(MDB_cursor *mc, indx_t indx, - static void mdb_node_del(MDB_cursor *mc, int ksize); - static void mdb_node_shrink(MDB_page *mp, indx_t indx); - static int mdb_node_move(MDB_cursor *csrc, MDB_cursor *cdst, int fromleft); --static int mdb_node_read(MDB_txn *txn, MDB_node *leaf, MDB_val *data); -+static int mdb_node_read(MDB_cursor *mc, MDB_node *leaf, MDB_val *data); - static size_t mdb_leaf_size(MDB_env *env, MDB_val *key, MDB_val *data); - static size_t mdb_branch_size(MDB_env *env, MDB_val *key); - -@@ -1360,13 +1542,18 @@ static int mdb_reader_check0(MDB_env *env, int rlocked, int *dead); - static MDB_cmp_func mdb_cmp_memn, mdb_cmp_memnr, mdb_cmp_int, mdb_cmp_cint, mdb_cmp_long; - /** @endcond */ - --/** Compare two items pointing at size_t's of unknown alignment. */ -+/** Compare two items pointing at '#mdb_size_t's of unknown alignment. */ - #ifdef MISALIGNED_OK - # define mdb_cmp_clong mdb_cmp_long - #else - # define mdb_cmp_clong mdb_cmp_cint - #endif - -+/** True if we need #mdb_cmp_clong() instead of \b cmp for #MDB_INTEGERDUP */ -+#define NEED_CMP_CLONG(cmp, ksize) \ -+ (UINT_MAX < MDB_SIZE_MAX && \ -+ (cmp) == mdb_cmp_int && (ksize) == sizeof(mdb_size_t)) -+ - #ifdef _WIN32 - static SECURITY_DESCRIPTOR mdb_null_sd; - static SECURITY_ATTRIBUTES mdb_all_sa; -@@ -1407,6 +1594,7 @@ static char *const mdb_errstr[] = { - "MDB_BAD_TXN: Transaction must abort, has a child, or is invalid", - "MDB_BAD_VALSIZE: Unsupported size of key/DB name/data, or wrong DUPFIXED size", - "MDB_BAD_DBI: The specified DBI handle was closed/changed unexpectedly", -+ "MDB_PROBLEM: Unexpected problem - txn should abort", - }; - - char * -@@ -1417,8 +1605,9 @@ mdb_strerror(int err) - * This works as long as no function between the call to mdb_strerror - * and the actual use of the message uses more than 4K of stack. - */ -- char pad[4096]; -- char buf[1024], *ptr = buf; -+#define MSGSIZE 1024 -+#define PADSIZE 4096 -+ char buf[MSGSIZE+PADSIZE], *ptr = buf; - #endif - int i; - if (!err) -@@ -1450,7 +1639,7 @@ mdb_strerror(int err) - buf[0] = 0; - FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, -- NULL, err, 0, ptr, sizeof(buf), (va_list *)pad); -+ NULL, err, 0, ptr, MSGSIZE, (va_list *)buf+MSGSIZE); - return ptr; - #else - return strerror(err); -@@ -1550,20 +1739,20 @@ mdb_page_list(MDB_page *mp) - case P_LEAF|P_LEAF2: type = "LEAF2 page"; break; - case P_LEAF|P_LEAF2|P_SUBP: type = "LEAF2 sub-page"; break; - case P_OVERFLOW: -- fprintf(stderr, "Overflow page %"Z"u pages %u%s\n", -+ fprintf(stderr, "Overflow page %"Yu" pages %u%s\n", - pgno, mp->mp_pages, state); - return; - case P_META: -- fprintf(stderr, "Meta-page %"Z"u txnid %"Z"u\n", -+ fprintf(stderr, "Meta-page %"Yu" txnid %"Yu"\n", - pgno, ((MDB_meta *)METADATA(mp))->mm_txnid); - return; - default: -- fprintf(stderr, "Bad page %"Z"u flags 0x%u\n", pgno, mp->mp_flags); -+ fprintf(stderr, "Bad page %"Yu" flags 0x%X\n", pgno, mp->mp_flags); - return; - } - - nkeys = NUMKEYS(mp); -- fprintf(stderr, "%s %"Z"u numkeys %d%s\n", type, pgno, nkeys, state); -+ fprintf(stderr, "%s %"Yu" numkeys %d%s\n", type, pgno, nkeys, state); - - for (i=0; imn_data; - nsize = NODESIZE + key.mv_size; - if (IS_BRANCH(mp)) { -- fprintf(stderr, "key %d: page %"Z"u, %s\n", i, NODEPGNO(node), -+ fprintf(stderr, "key %d: page %"Yu", %s\n", i, NODEPGNO(node), - DKEY(&key)); - total += nsize; - } else { -@@ -1674,7 +1863,7 @@ static void mdb_audit(MDB_txn *txn) - } - } - if (freecount + count + NUM_METAS != txn->mt_next_pgno) { -- fprintf(stderr, "audit: %lu freecount: %lu count: %lu total: %lu next_pgno: %lu\n", -+ fprintf(stderr, "audit: %"Yu" freecount: %"Yu" count: %"Yu" total: %"Yu" next_pgno: %"Yu"\n", - txn->mt_txnid, freecount, count+NUM_METAS, - freecount+count+NUM_METAS, txn->mt_next_pgno); - } -@@ -1691,10 +1880,8 @@ int - mdb_dcmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b) - { - MDB_cmp_func *dcmp = txn->mt_dbxs[dbi].md_dcmp; --#if UINT_MAX < SIZE_MAX -- if (dcmp == mdb_cmp_int && a->mv_size == sizeof(size_t)) -+ if (NEED_CMP_CLONG(dcmp, a->mv_size)) - dcmp = mdb_cmp_clong; --#endif - return dcmp(a, b); - } - -@@ -1774,6 +1961,51 @@ mdb_dlist_free(MDB_txn *txn) - dl[0].mid = 0; - } - -+#ifdef MDB_VL32 -+static void -+mdb_page_unref(MDB_txn *txn, MDB_page *mp) -+{ -+ pgno_t pgno; -+ MDB_ID3L tl = txn->mt_rpages; -+ unsigned x, rem; -+ if (mp->mp_flags & (P_SUBP|P_DIRTY)) -+ return; -+ rem = mp->mp_pgno & (MDB_RPAGE_CHUNK-1); -+ pgno = mp->mp_pgno ^ rem; -+ x = mdb_mid3l_search(tl, pgno); -+ if (x != tl[0].mid && tl[x+1].mid == mp->mp_pgno) -+ x++; -+ if (tl[x].mref) -+ tl[x].mref--; -+} -+#define MDB_PAGE_UNREF(txn, mp) mdb_page_unref(txn, mp) -+ -+static void -+mdb_cursor_unref(MDB_cursor *mc) -+{ -+ int i; -+ if (!mc->mc_snum || !mc->mc_pg[0] || IS_SUBP(mc->mc_pg[0])) -+ return; -+ for (i=0; imc_snum; i++) -+ mdb_page_unref(mc->mc_txn, mc->mc_pg[i]); -+ if (mc->mc_ovpg) { -+ mdb_page_unref(mc->mc_txn, mc->mc_ovpg); -+ mc->mc_ovpg = 0; -+ } -+ mc->mc_snum = mc->mc_top = 0; -+ mc->mc_pg[0] = NULL; -+ mc->mc_flags &= ~C_INITIALIZED; -+} -+#define MDB_CURSOR_UNREF(mc, force) \ -+ (((force) || ((mc)->mc_flags & C_INITIALIZED)) \ -+ ? mdb_cursor_unref(mc) \ -+ : (void)0) -+ -+#else -+#define MDB_PAGE_UNREF(txn, mp) -+#define MDB_CURSOR_UNREF(mc, force) ((void)0) -+#endif /* MDB_VL32 */ -+ - /** Loosen or free a single page. - * Saves single pages to a list for future reuse - * in this same txn. It has been pulled from the freeDB -@@ -1803,7 +2035,7 @@ mdb_page_loose(MDB_cursor *mc, MDB_page *mp) - if (mp != dl[x].mptr) { /* bad cursor? */ - mc->mc_flags &= ~(C_INITIALIZED|C_EOF); - txn->mt_flags |= MDB_TXN_ERROR; -- return MDB_CORRUPTED; -+ return MDB_PROBLEM; - } - /* ok, it's ours */ - loose = 1; -@@ -1815,8 +2047,7 @@ mdb_page_loose(MDB_cursor *mc, MDB_page *mp) - } - } - if (loose) { -- DPRINTF(("loosen db %d page %"Z"u", DDBI(mc), -- mp->mp_pgno)); -+ DPRINTF(("loosen db %d page %"Yu, DDBI(mc), mp->mp_pgno)); - NEXT_LOOSE_PAGE(mp) = txn->mt_loose_pgs; - txn->mt_loose_pgs = mp; - txn->mt_loose_count++; -@@ -1842,7 +2073,7 @@ mdb_pages_xkeep(MDB_cursor *mc, unsigned pflags, int all) - { - enum { Mask = P_SUBP|P_DIRTY|P_LOOSE|P_KEEP }; - MDB_txn *txn = mc->mc_txn; -- MDB_cursor *m3; -+ MDB_cursor *m3, *m0 = mc; - MDB_xcursor *mx; - MDB_page *dp, *mp; - MDB_node *leaf; -@@ -1885,7 +2116,7 @@ mdb_pages_xkeep(MDB_cursor *mc, unsigned pflags, int all) - pgno_t pgno = txn->mt_dbs[i].md_root; - if (pgno == P_INVALID) - continue; -- if ((rc = mdb_page_get(txn, pgno, &dp, &level)) != MDB_SUCCESS) -+ if ((rc = mdb_page_get(m0, pgno, &dp, &level)) != MDB_SUCCESS) - break; - if ((dp->mp_flags & Mask) == pflags && level <= 1) - dp->mp_flags ^= P_KEEP; -@@ -2074,6 +2305,8 @@ mdb_page_dirty(MDB_txn *txn, MDB_page *mp) - * Do not modify the freedB, just merge freeDB records into me_pghead[] - * and move me_pglast to say which records were consumed. Only this - * function can create me_pghead and move me_pglast/mt_next_pgno. -+ * When #MDB_DEVEL & 2, it is not affected by #mdb_freelist_save(): it -+ * then uses the transaction's original snapshot of the freeDB. - * @param[in] mc cursor A cursor handle identifying the transaction and - * database for which we are allocating. - * @param[in] num the number of pages to allocate. -@@ -2111,8 +2344,7 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp) - np = txn->mt_loose_pgs; - txn->mt_loose_pgs = NEXT_LOOSE_PAGE(np); - txn->mt_loose_count--; -- DPRINTF(("db %d use loose page %"Z"u", DDBI(mc), -- np->mp_pgno)); -+ DPRINTF(("db %d use loose page %"Yu, DDBI(mc), np->mp_pgno)); - *mp = np; - return MDB_SUCCESS; - } -@@ -2149,6 +2381,14 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp) - last = env->me_pglast; - oldest = env->me_pgoldest; - mdb_cursor_init(&m2, txn, FREE_DBI, NULL); -+#if (MDB_DEVEL) & 2 /* "& 2" so MDB_DEVEL=1 won't hide bugs breaking freeDB */ -+ /* Use original snapshot. TODO: Should need less care in code -+ * which modifies the database. Maybe we can delete some code? -+ */ -+ m2.mc_flags |= C_ORIG_RDONLY; -+ m2.mc_db = &env->me_metas[(txn->mt_txnid-1) & 1]->mm_dbs[FREE_DBI]; -+ m2.mc_dbflag = (unsigned char *)""; /* probably unnecessary */ -+#endif - if (last) { - op = MDB_SET_RANGE; - key.mv_data = &last; /* will look up last+1 */ -@@ -2189,7 +2429,7 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp) - } - np = m2.mc_pg[m2.mc_top]; - leaf = NODEPTR(np, m2.mc_ki[m2.mc_top]); -- if ((rc = mdb_node_read(txn, leaf, &data)) != MDB_SUCCESS) -+ if ((rc = mdb_node_read(&m2, leaf, &data)) != MDB_SUCCESS) - return rc; - - idl = (MDB_ID *) data.mv_data; -@@ -2206,10 +2446,10 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp) - } - env->me_pglast = last; - #if (MDB_DEBUG) > 1 -- DPRINTF(("IDL read txn %"Z"u root %"Z"u num %u", -+ DPRINTF(("IDL read txn %"Yu" root %"Yu" num %u", - last, txn->mt_dbs[FREE_DBI].md_root, i)); - for (j = i; j; j--) -- DPRINTF(("IDL %"Z"u", idl[j])); -+ DPRINTF(("IDL %"Yu, idl[j])); - #endif - /* Merge in descending sorted order */ - mdb_midl_xmerge(mop, idl); -@@ -2224,6 +2464,20 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp) - rc = MDB_MAP_FULL; - goto fail; - } -+#if defined(_WIN32) && !defined(MDB_VL32) -+ if (!(env->me_flags & MDB_RDONLY)) { -+ void *p; -+ p = (MDB_page *)(env->me_map + env->me_psize * pgno); -+ p = VirtualAlloc(p, env->me_psize * num, MEM_COMMIT, -+ (env->me_flags & MDB_WRITEMAP) ? PAGE_READWRITE: -+ PAGE_READONLY); -+ if (!p) { -+ DPUTS("VirtualAlloc failed"); -+ rc = ErrCode(); -+ goto fail; -+ } -+ } -+#endif - - search_done: - if (env->me_flags & MDB_WRITEMAP) { -@@ -2365,7 +2619,7 @@ mdb_page_touch(MDB_cursor *mc) - (rc = mdb_page_alloc(mc, 1, &np))) - goto fail; - pgno = np->mp_pgno; -- DPRINTF(("touched db %d page %"Z"u -> %"Z"u", DDBI(mc), -+ DPRINTF(("touched db %d page %"Yu" -> %"Yu, DDBI(mc), - mp->mp_pgno, pgno)); - mdb_cassert(mc, mp->mp_pgno != pgno); - mdb_midl_xappend(txn->mt_free_pgs, mp->mp_pgno); -@@ -2389,7 +2643,7 @@ mdb_page_touch(MDB_cursor *mc) - if (mp != dl[x].mptr) { /* bad cursor? */ - mc->mc_flags &= ~(C_INITIALIZED|C_EOF); - txn->mt_flags |= MDB_TXN_ERROR; -- return MDB_CORRUPTED; -+ return MDB_PROBLEM; - } - return 0; - } -@@ -2439,6 +2693,7 @@ done: - } - } - } -+ MDB_PAGE_UNREF(mc->mc_txn, mp); - return 0; - - fail: -@@ -2447,7 +2702,7 @@ fail: - } - - int --mdb_env_sync(MDB_env *env, int force) -+mdb_env_sync0(MDB_env *env, int force, pgno_t numpgs) - { - int rc = 0; - if (env->me_flags & MDB_RDONLY) -@@ -2456,7 +2711,7 @@ mdb_env_sync(MDB_env *env, int force) - if (env->me_flags & MDB_WRITEMAP) { - int flags = ((env->me_flags & MDB_MAPASYNC) && !force) - ? MS_ASYNC : MS_SYNC; -- if (MDB_MSYNC(env->me_map, env->me_mapsize, flags)) -+ if (MDB_MSYNC(env->me_map, env->me_psize * numpgs, flags)) - rc = ErrCode(); - #ifdef _WIN32 - else if (flags == MS_SYNC && MDB_FDATASYNC(env->me_fd)) -@@ -2476,6 +2731,13 @@ mdb_env_sync(MDB_env *env, int force) - return rc; - } - -+int -+mdb_env_sync(MDB_env *env, int force) -+{ -+ MDB_meta *m = mdb_env_pick_meta(env); -+ return mdb_env_sync0(env, force, m->mm_last_pg+1); -+} -+ - /** Back up parent txn's cursors, then grab the originals for tracking */ - static int - mdb_cursor_shadow(MDB_txn *src, MDB_txn *dst) -@@ -2720,6 +2982,9 @@ mdb_txn_renew0(MDB_txn *txn) - - /* Moved to here to avoid a data race in read TXNs */ - txn->mt_next_pgno = meta->mm_last_pg+1; -+#ifdef MDB_VL32 -+ txn->mt_last_pgno = txn->mt_next_pgno - 1; -+#endif - - txn->mt_flags = flags; - -@@ -2755,7 +3020,7 @@ mdb_txn_renew(MDB_txn *txn) - - rc = mdb_txn_renew0(txn); - if (rc == MDB_SUCCESS) { -- DPRINTF(("renew txn %"Z"u%c %p on mdbenv %p, root page %"Z"u", -+ DPRINTF(("renew txn %"Yu"%c %p on mdbenv %p, root page %"Yu, - txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w', - (void *)txn, (void *)txn->mt_env, txn->mt_dbs[MAIN_DBI].md_root)); - } -@@ -2798,6 +3063,17 @@ mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **ret) - DPRINTF(("calloc: %s", strerror(errno))); - return ENOMEM; - } -+#ifdef MDB_VL32 -+ if (!parent) { -+ txn->mt_rpages = malloc(MDB_TRPAGE_SIZE * sizeof(MDB_ID3)); -+ if (!txn->mt_rpages) { -+ free(txn); -+ return ENOMEM; -+ } -+ txn->mt_rpages[0].mid = 0; -+ txn->mt_rpcheck = MDB_TRPAGE_SIZE/2; -+ } -+#endif - txn->mt_dbxs = env->me_dbxs; /* static */ - txn->mt_dbs = (MDB_db *) ((char *)txn + tsize); - txn->mt_dbflags = (unsigned char *)txn + size - env->me_maxdbs; -@@ -2825,6 +3101,9 @@ mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **ret) - parent->mt_child = txn; - txn->mt_parent = parent; - txn->mt_numdbs = parent->mt_numdbs; -+#ifdef MDB_VL32 -+ txn->mt_rpages = parent->mt_rpages; -+#endif - memcpy(txn->mt_dbs, parent->mt_dbs, txn->mt_numdbs * sizeof(MDB_db)); - /* Copy parent's mt_dbflags, but clear DB_NEW */ - for (i=0; imt_numdbs; i++) -@@ -2850,12 +3129,16 @@ renew: - rc = mdb_txn_renew0(txn); - } - if (rc) { -- if (txn != env->me_txn0) -+ if (txn != env->me_txn0) { -+#ifdef MDB_VL32 -+ free(txn->mt_rpages); -+#endif - free(txn); -+ } - } else { - txn->mt_flags |= flags; /* could not change txn=me_txn0 earlier */ - *ret = txn; -- DPRINTF(("begin txn %"Z"u%c %p on mdbenv %p, root page %"Z"u", -+ DPRINTF(("begin txn %"Yu"%c %p on mdbenv %p, root page %"Yu, - txn->mt_txnid, (flags & MDB_RDONLY) ? 'r' : 'w', - (void *) txn, (void *) env, txn->mt_dbs[MAIN_DBI].md_root)); - } -@@ -2870,7 +3153,7 @@ mdb_txn_env(MDB_txn *txn) - return txn->mt_env; - } - --size_t -+mdb_size_t - mdb_txn_id(MDB_txn *txn) - { - if(!txn) return 0; -@@ -2922,7 +3205,7 @@ mdb_txn_end(MDB_txn *txn, unsigned mode) - /* Export or close DBI handles opened in this txn */ - mdb_dbis_update(txn, mode & MDB_END_UPDATE); - -- DPRINTF(("%s txn %"Z"u%c %p on mdbenv %p, root page %"Z"u", -+ DPRINTF(("%s txn %"Yu"%c %p on mdbenv %p, root page %"Yu, - names[mode & MDB_END_OPMASK], - txn->mt_txnid, (txn->mt_flags & MDB_TXN_RDONLY) ? 'r' : 'w', - (void *) txn, (void *)env, txn->mt_dbs[MAIN_DBI].md_root)); -@@ -2976,7 +3259,31 @@ mdb_txn_end(MDB_txn *txn, unsigned mode) - - mdb_midl_free(pghead); - } -- -+#ifdef MDB_VL32 -+ if (!txn->mt_parent) { -+ MDB_ID3L el = env->me_rpages, tl = txn->mt_rpages; -+ unsigned i, x, n = tl[0].mid; -+ pthread_mutex_lock(&env->me_rpmutex); -+ for (i = 1; i <= n; i++) { -+ if (tl[i].mid & (MDB_RPAGE_CHUNK-1)) { -+ /* tmp overflow pages that we didn't share in env */ -+ munmap(tl[i].mptr, tl[i].mcnt * env->me_psize); -+ } else { -+ x = mdb_mid3l_search(el, tl[i].mid); -+ if (tl[i].mptr == el[x].mptr) { -+ el[x].mref--; -+ } else { -+ /* another tmp overflow page */ -+ munmap(tl[i].mptr, tl[i].mcnt * env->me_psize); -+ } -+ } -+ } -+ pthread_mutex_unlock(&env->me_rpmutex); -+ tl[0].mid = 0; -+ if (mode & MDB_END_FREE) -+ free(tl); -+ } -+#endif - if (mode & MDB_END_FREE) - free(txn); - } -@@ -3008,6 +3315,9 @@ mdb_txn_abort(MDB_txn *txn) - - /** Save the freelist as of this transaction to the freeDB. - * This changes the freelist. Keep trying until it stabilizes. -+ * -+ * When (MDB_DEVEL) & 2, the changes do not affect #mdb_page_alloc(), -+ * it then uses the transaction's original snapshot of the freeDB. - */ - static int - mdb_freelist_save(MDB_txn *txn) -@@ -3096,10 +3406,10 @@ mdb_freelist_save(MDB_txn *txn) - #if (MDB_DEBUG) > 1 - { - unsigned int i = free_pgs[0]; -- DPRINTF(("IDL write txn %"Z"u root %"Z"u num %u", -+ DPRINTF(("IDL write txn %"Yu" root %"Yu" num %u", - txn->mt_txnid, txn->mt_dbs[FREE_DBI].md_root, i)); - for (; i; i--) -- DPRINTF(("IDL %"Z"u", free_pgs[i])); -+ DPRINTF(("IDL %"Yu, free_pgs[i])); - } - #endif - continue; -@@ -3210,15 +3520,16 @@ mdb_page_flush(MDB_txn *txn, int keep) - MDB_ID2L dl = txn->mt_u.dirty_list; - unsigned psize = env->me_psize, j; - int i, pagecount = dl[0].mid, rc; -- size_t size = 0, pos = 0; -+ size_t size = 0; -+ offset_t pos = 0; - pgno_t pgno = 0; - MDB_page *dp = NULL; - #ifdef _WIN32 - OVERLAPPED ov; - #else - struct iovec iov[MDB_COMMIT_PAGES]; -- ssize_t wpos = 0, wsize = 0, wres; -- size_t next_pos = 1; /* impossible pos, so pos != next_pos */ -+ ssize_t wsize = 0, wres; -+ offset_t wpos = 0, next_pos = 1; /* impossible pos, so pos != next_pos */ - int n = 0; - #endif - -@@ -3266,7 +3577,7 @@ mdb_page_flush(MDB_txn *txn, int keep) - * the write offset, to at least save the overhead of a Seek - * system call. - */ -- DPRINTF(("committing page %"Z"u", pgno)); -+ DPRINTF(("committing page %"Yu, pgno)); - memset(&ov, 0, sizeof(ov)); - ov.Offset = pos & 0xffffffff; - ov.OffsetHigh = pos >> 16 >> 16; -@@ -3317,7 +3628,7 @@ retry_seek: - wpos = pos; - wsize = 0; - } -- DPRINTF(("committing page %"Z"u", pgno)); -+ DPRINTF(("committing page %"Yu, pgno)); - next_pos = pos + size; - iov[n].iov_len = size; - iov[n].iov_base = (char *)dp; -@@ -3325,6 +3636,10 @@ retry_seek: - n++; - #endif /* _WIN32 */ - } -+#ifdef MDB_VL32 -+ if (pgno > txn->mt_last_pgno) -+ txn->mt_last_pgno = pgno; -+#endif - - /* MIPS has cache coherency issues, this is a no-op everywhere else - * Note: for any size >= on-chip cache size, entire on-chip cache is -@@ -3526,7 +3841,7 @@ mdb_txn_commit(MDB_txn *txn) - !(txn->mt_flags & (MDB_TXN_DIRTY|MDB_TXN_SPILLS))) - goto done; - -- DPRINTF(("committing txn %"Z"u %p on mdbenv %p, root page %"Z"u", -+ DPRINTF(("committing txn %"Yu" %p on mdbenv %p, root page %"Yu, - txn->mt_txnid, (void*)txn, (void*)env, txn->mt_dbs[MAIN_DBI].md_root)); - - /* Update DB root pointers */ -@@ -3564,9 +3879,12 @@ mdb_txn_commit(MDB_txn *txn) - mdb_audit(txn); - #endif - -- if ((rc = mdb_page_flush(txn, 0)) || -- (rc = mdb_env_sync(env, 0)) || -- (rc = mdb_env_write_meta(txn))) -+ if ((rc = mdb_page_flush(txn, 0))) -+ goto fail; -+ if (!F_ISSET(txn->mt_flags, MDB_TXN_NOSYNC) && -+ (rc = mdb_env_sync0(env, 0, txn->mt_next_pgno))) -+ goto fail; -+ if ((rc = mdb_env_write_meta(txn))) - goto fail; - end_mode = MDB_END_COMMITTED|MDB_END_UPDATE; - -@@ -3621,7 +3939,7 @@ mdb_env_read_header(MDB_env *env, MDB_meta *meta) - p = (MDB_page *)&pbuf; - - if (!F_ISSET(p->mp_flags, P_META)) { -- DPRINTF(("page %"Z"u not a meta page", p->mp_pgno)); -+ DPRINTF(("page %"Yu" not a meta page", p->mp_pgno)); - return MDB_INVALID; - } - -@@ -3691,7 +4009,6 @@ mdb_env_init_meta(MDB_env *env, MDB_meta *meta) - p = calloc(NUM_METAS, psize); - if (!p) - return ENOMEM; -- - p->mp_pgno = 0; - p->mp_flags = P_META; - *(MDB_meta *)METADATA(p) = *meta; -@@ -3722,8 +4039,8 @@ mdb_env_write_meta(MDB_txn *txn) - MDB_env *env; - MDB_meta meta, metab, *mp; - unsigned flags; -- size_t mapsize; -- off_t off; -+ mdb_size_t mapsize; -+ offset_t off; - int rc, len, toggle; - char *ptr; - HANDLE mfd; -@@ -3734,11 +4051,11 @@ mdb_env_write_meta(MDB_txn *txn) - #endif - - toggle = txn->mt_txnid & 1; -- DPRINTF(("writing meta page %d for root page %"Z"u", -+ DPRINTF(("writing meta page %d for root page %"Yu, - toggle, txn->mt_dbs[MAIN_DBI].md_root)); - - env = txn->mt_env; -- flags = env->me_flags; -+ flags = txn->mt_flags | env->me_flags; - mp = env->me_metas[toggle]; - mapsize = env->me_metas[toggle ^ 1]->mm_mapsize; - /* Persist any increases of mapsize config */ -@@ -3867,6 +4184,9 @@ mdb_env_create(MDB_env **env) - #ifdef MDB_USE_POSIX_SEM - e->me_rmutex = SEM_FAILED; - e->me_wmutex = SEM_FAILED; -+#elif defined MDB_USE_SYSV_SEM -+ e->me_rmutex->semid = -1; -+ e->me_wmutex->semid = -1; - #endif - e->me_pid = getpid(); - GET_PAGESIZE(e->me_os_psize); -@@ -3875,6 +4195,19 @@ mdb_env_create(MDB_env **env) - return MDB_SUCCESS; - } - -+#ifdef _WIN32 -+/** @brief Map a result from an NTAPI call to WIN32. */ -+static DWORD -+mdb_nt2win32(NTSTATUS st) -+{ -+ OVERLAPPED o = {0}; -+ DWORD br; -+ o.Internal = st; -+ GetOverlappedResult(NULL, &o, &br, FALSE); -+ return GetLastError(); -+} -+#endif -+ - static int ESECT - mdb_env_map(MDB_env *env, void *addr) - { -@@ -3882,42 +4215,51 @@ mdb_env_map(MDB_env *env, void *addr) - unsigned int flags = env->me_flags; - #ifdef _WIN32 - int rc; -+ int access = SECTION_MAP_READ; - HANDLE mh; -- LONG sizelo, sizehi; -- size_t msize; -+ void *map; -+ SIZE_T msize; -+ ULONG pageprot = PAGE_READONLY, secprot, alloctype; - -+ if (flags & MDB_WRITEMAP) { -+ access |= SECTION_MAP_WRITE; -+ pageprot = PAGE_READWRITE; -+ } - if (flags & MDB_RDONLY) { -- /* Don't set explicit map size, use whatever exists */ -+ secprot = PAGE_READONLY; - msize = 0; -- sizelo = 0; -- sizehi = 0; -+ alloctype = 0; - } else { -+ secprot = PAGE_READWRITE; - msize = env->me_mapsize; -- sizelo = msize & 0xffffffff; -- sizehi = msize >> 16 >> 16; /* only needed on Win64 */ -- -- /* Windows won't create mappings for zero length files. -- * and won't map more than the file size. -- * Just set the maxsize right now. -- */ -- if (SetFilePointer(env->me_fd, sizelo, &sizehi, 0) != (DWORD)sizelo -- || !SetEndOfFile(env->me_fd) -- || SetFilePointer(env->me_fd, 0, NULL, 0) != 0) -- return ErrCode(); -+ alloctype = MEM_RESERVE; - } - -- mh = CreateFileMapping(env->me_fd, NULL, flags & MDB_WRITEMAP ? -- PAGE_READWRITE : PAGE_READONLY, -- sizehi, sizelo, NULL); -- if (!mh) -- return ErrCode(); -- env->me_map = MapViewOfFileEx(mh, flags & MDB_WRITEMAP ? -- FILE_MAP_WRITE : FILE_MAP_READ, -- 0, 0, msize, addr); -- rc = env->me_map ? 0 : ErrCode(); -- CloseHandle(mh); -+ rc = NtCreateSection(&mh, access, NULL, NULL, secprot, SEC_RESERVE, env->me_fd); - if (rc) -- return rc; -+ return mdb_nt2win32(rc); -+ map = addr; -+#ifdef MDB_VL32 -+ msize = NUM_METAS * env->me_psize; -+#endif -+ rc = NtMapViewOfSection(mh, GetCurrentProcess(), &map, 0, 0, NULL, &msize, ViewUnmap, alloctype, pageprot); -+#ifdef MDB_VL32 -+ env->me_fmh = mh; -+#else -+ NtClose(mh); -+#endif -+ if (rc) -+ return mdb_nt2win32(rc); -+ env->me_map = map; -+#else -+#ifdef MDB_VL32 -+ (void) flags; -+ env->me_map = mmap(addr, NUM_METAS * env->me_psize, PROT_READ, MAP_SHARED, -+ env->me_fd, 0); -+ if (env->me_map == MAP_FAILED) { -+ env->me_map = NULL; -+ return ErrCode(); -+ } - #else - int prot = PROT_READ; - if (flags & MDB_WRITEMAP) { -@@ -3951,6 +4293,7 @@ mdb_env_map(MDB_env *env, void *addr) - */ - if (addr && env->me_map != addr) - return EBUSY; /* TODO: Make a new MDB_* error code? */ -+#endif - - p = (MDB_page *)env->me_map; - env->me_metas[0] = METADATA(p); -@@ -3960,15 +4303,17 @@ mdb_env_map(MDB_env *env, void *addr) - } - - int ESECT --mdb_env_set_mapsize(MDB_env *env, size_t size) -+mdb_env_set_mapsize(MDB_env *env, mdb_size_t size) - { - /* If env is already open, caller is responsible for making - * sure there are no active txns. - */ - if (env->me_map) { -- int rc; - MDB_meta *meta; -+#ifndef MDB_VL32 - void *old; -+ int rc; -+#endif - if (env->me_txn) - return EINVAL; - meta = mdb_env_pick_meta(env); -@@ -3976,16 +4321,21 @@ mdb_env_set_mapsize(MDB_env *env, size_t size) - size = meta->mm_mapsize; - { - /* Silently round up to minimum if the size is too small */ -- size_t minsize = (meta->mm_last_pg + 1) * env->me_psize; -+ mdb_size_t minsize = (meta->mm_last_pg + 1) * env->me_psize; - if (size < minsize) - size = minsize; - } -+#ifndef MDB_VL32 -+ /* For MDB_VL32 this bit is a noop since we dynamically remap -+ * chunks of the DB anyway. -+ */ - munmap(env->me_map, env->me_mapsize); - env->me_mapsize = size; - old = (env->me_flags & MDB_FIXEDMAP) ? env->me_map : NULL; - rc = mdb_env_map(env, old); - if (rc) - return rc; -+#endif /* !MDB_VL32 */ - } - env->me_mapsize = size; - if (env->me_psize) -@@ -4021,7 +4371,7 @@ mdb_env_get_maxreaders(MDB_env *env, unsigned int *readers) - } - - static int ESECT --mdb_fsize(HANDLE fd, size_t *size) -+mdb_fsize(HANDLE fd, mdb_size_t *size) - { - #ifdef _WIN32 - LARGE_INTEGER fsize; -@@ -4135,7 +4485,7 @@ mdb_env_open2(MDB_env *env) - /* Make sure mapsize >= committed data size. Even when using - * mm_mapsize, which could be broken in old files (ITS#7789). - */ -- size_t minsize = (meta.mm_last_pg + 1) * meta.mm_psize; -+ mdb_size_t minsize = (meta.mm_last_pg + 1) * meta.mm_psize; - if (env->me_mapsize < minsize) - env->me_mapsize = minsize; - } -@@ -4154,6 +4504,18 @@ mdb_env_open2(MDB_env *env) - return rc; - newenv = 0; - } -+#ifdef _WIN32 -+ /* For FIXEDMAP, make sure the file is non-empty before we attempt to map it */ -+ if (newenv) { -+ char dummy = 0; -+ DWORD len; -+ rc = WriteFile(env->me_fd, &dummy, 1, &len, NULL); -+ if (!rc) { -+ rc = ErrCode(); -+ return rc; -+ } -+ } -+#endif - - rc = mdb_env_map(env, (flags & MDB_FIXEDMAP) ? meta.mm_address : NULL); - if (rc) -@@ -4183,13 +4545,13 @@ mdb_env_open2(MDB_env *env) - - DPRINTF(("opened database version %u, pagesize %u", - meta->mm_version, env->me_psize)); -- DPRINTF(("using meta page %d", (int) (meta->mm_txnid & 1))); -- DPRINTF(("depth: %u", db->md_depth)); -- DPRINTF(("entries: %"Z"u", db->md_entries)); -- DPRINTF(("branch pages: %"Z"u", db->md_branch_pages)); -- DPRINTF(("leaf pages: %"Z"u", db->md_leaf_pages)); -- DPRINTF(("overflow pages: %"Z"u", db->md_overflow_pages)); -- DPRINTF(("root: %"Z"u", db->md_root)); -+ DPRINTF(("using meta page %d", (int) (meta->mm_txnid & 1))); -+ DPRINTF(("depth: %u", db->md_depth)); -+ DPRINTF(("entries: %"Yu, db->md_entries)); -+ DPRINTF(("branch pages: %"Yu, db->md_branch_pages)); -+ DPRINTF(("leaf pages: %"Yu, db->md_leaf_pages)); -+ DPRINTF(("overflow pages: %"Yu, db->md_overflow_pages)); -+ DPRINTF(("root: %"Yu, db->md_root)); - } - #endif - -@@ -4465,8 +4827,12 @@ mdb_env_setup_locks(MDB_env *env, char *lpath, int mode, int *excl) - # define MDB_CLOEXEC 0 - #endif - #endif -+#ifdef MDB_USE_SYSV_SEM -+ int semid; -+ union semun semu; -+#endif - int rc; -- off_t size, rsize; -+ offset_t size, rsize; - - #ifdef _WIN32 - wchar_t *wlpath; -@@ -4616,19 +4982,42 @@ mdb_env_setup_locks(MDB_env *env, char *lpath, int mode, int *excl) - env->me_wmutex = sem_open(env->me_txns->mti_wmname, - O_CREAT|O_EXCL, mode, 1); - if (env->me_wmutex == SEM_FAILED) goto fail_errno; -+#elif defined(MDB_USE_SYSV_SEM) -+ unsigned short vals[2] = {1, 1}; -+ key_t key = ftok(lpath, 'M'); -+ if (key == -1) -+ goto fail_errno; -+ semid = semget(key, 2, (mode & 0777) | IPC_CREAT); -+ if (semid < 0) -+ goto fail_errno; -+ semu.array = vals; -+ if (semctl(semid, 0, SETALL, semu) < 0) -+ goto fail_errno; -+ env->me_txns->mti_semid = semid; -+ env->me_txns->mti_rlocked = 0; -+ env->me_txns->mti_wlocked = 0; - #else /* MDB_USE_POSIX_MUTEX: */ - pthread_mutexattr_t mattr; - -- if ((rc = pthread_mutexattr_init(&mattr)) -- || (rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED)) -+ /* Solaris needs this before initing a robust mutex. Otherwise -+ * it may skip the init and return EBUSY "seems someone already -+ * inited" or EINVAL "it was inited differently". -+ */ -+ memset(env->me_txns->mti_rmutex, 0, sizeof(*env->me_txns->mti_rmutex)); -+ memset(env->me_txns->mti_wmutex, 0, sizeof(*env->me_txns->mti_wmutex)); -+ -+ if ((rc = pthread_mutexattr_init(&mattr)) != 0) -+ goto fail; -+ rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED); - #ifdef MDB_ROBUST_SUPPORTED -- || (rc = pthread_mutexattr_setrobust(&mattr, PTHREAD_MUTEX_ROBUST)) -+ if (!rc) rc = pthread_mutexattr_setrobust(&mattr, PTHREAD_MUTEX_ROBUST); - #endif -- || (rc = pthread_mutex_init(env->me_txns->mti_rmutex, &mattr)) -- || (rc = pthread_mutex_init(env->me_txns->mti_wmutex, &mattr))) -- goto fail; -+ if (!rc) rc = pthread_mutex_init(env->me_txns->mti_rmutex, &mattr); -+ if (!rc) rc = pthread_mutex_init(env->me_txns->mti_wmutex, &mattr); - pthread_mutexattr_destroy(&mattr); --#endif /* _WIN32 || MDB_USE_POSIX_SEM */ -+ if (rc) -+ goto fail; -+#endif /* _WIN32 || ... */ - - env->me_txns->mti_magic = MDB_MAGIC; - env->me_txns->mti_format = MDB_LOCK_FORMAT; -@@ -4636,6 +5025,9 @@ mdb_env_setup_locks(MDB_env *env, char *lpath, int mode, int *excl) - env->me_txns->mti_numreaders = 0; - - } else { -+#ifdef MDB_USE_SYSV_SEM -+ struct semid_ds buf; -+#endif - if (env->me_txns->mti_magic != MDB_MAGIC) { - DPUTS("lock region has invalid magic"); - rc = MDB_INVALID; -@@ -4661,8 +5053,33 @@ mdb_env_setup_locks(MDB_env *env, char *lpath, int mode, int *excl) - if (env->me_rmutex == SEM_FAILED) goto fail_errno; - env->me_wmutex = sem_open(env->me_txns->mti_wmname, 0); - if (env->me_wmutex == SEM_FAILED) goto fail_errno; -+#elif defined(MDB_USE_SYSV_SEM) -+ semid = env->me_txns->mti_semid; -+ semu.buf = &buf; -+ /* check for read access */ -+ if (semctl(semid, 0, IPC_STAT, semu) < 0) -+ goto fail_errno; -+ /* check for write access */ -+ if (semctl(semid, 0, IPC_SET, semu) < 0) -+ goto fail_errno; - #endif - } -+#ifdef MDB_USE_SYSV_SEM -+ env->me_rmutex->semid = semid; -+ env->me_wmutex->semid = semid; -+ env->me_rmutex->semnum = 0; -+ env->me_wmutex->semnum = 1; -+ env->me_rmutex->locked = &env->me_txns->mti_rlocked; -+ env->me_wmutex->locked = &env->me_txns->mti_wlocked; -+#endif -+#ifdef MDB_VL32 -+#ifdef _WIN32 -+ env->me_rpmutex = CreateMutex(NULL, FALSE, NULL); -+#else -+ pthread_mutex_init(&env->me_rpmutex, NULL); -+#endif -+#endif -+ - return MDB_SUCCESS; - - fail_errno: -@@ -4701,6 +5118,17 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode - if (env->me_fd!=INVALID_HANDLE_VALUE || (flags & ~(CHANGEABLE|CHANGELESS))) - return EINVAL; - -+#ifdef MDB_VL32 -+ if (flags & MDB_WRITEMAP) { -+ /* silently ignore WRITEMAP in 32 bit mode */ -+ flags ^= MDB_WRITEMAP; -+ } -+ if (flags & MDB_FIXEDMAP) { -+ /* cannot support FIXEDMAP */ -+ return EINVAL; -+ } -+#endif -+ - len = strlen(path); - if (flags & MDB_NOSUBDIR) { - rc = len + sizeof(LOCKSUFF) + len + 1; -@@ -4730,6 +5158,17 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode - (env->me_dirty_list = calloc(MDB_IDL_UM_SIZE, sizeof(MDB_ID2))))) - rc = ENOMEM; - } -+#ifdef MDB_VL32 -+ if (!rc) { -+ env->me_rpages = malloc(MDB_ERPAGE_SIZE * sizeof(MDB_ID3)); -+ if (!env->me_rpages) { -+ rc = ENOMEM; -+ goto leave; -+ } -+ env->me_rpages[0].mid = 0; -+ env->me_rpcheck = MDB_ERPAGE_SIZE/2; -+ } -+#endif - env->me_flags = flags |= MDB_ENV_ACTIVE; - if (rc) - goto leave; -@@ -4828,6 +5267,16 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode - txn->mt_dbiseqs = (unsigned int *)(txn->mt_cursors + env->me_maxdbs); - txn->mt_dbflags = (unsigned char *)(txn->mt_dbiseqs + env->me_maxdbs); - txn->mt_env = env; -+#ifdef MDB_VL32 -+ txn->mt_rpages = malloc(MDB_TRPAGE_SIZE * sizeof(MDB_ID3)); -+ if (!txn->mt_rpages) { -+ free(txn); -+ rc = ENOMEM; -+ goto leave; -+ } -+ txn->mt_rpages[0].mid = 0; -+ txn->mt_rpcheck = MDB_TRPAGE_SIZE/2; -+#endif - txn->mt_dbxs = env->me_dbxs; - txn->mt_flags = MDB_TXN_FINISHED; - env->me_txn0 = txn; -@@ -4866,6 +5315,15 @@ mdb_env_close0(MDB_env *env, int excl) - free(env->me_dbflags); - free(env->me_path); - free(env->me_dirty_list); -+#ifdef MDB_VL32 -+ if (env->me_txn0 && env->me_txn0->mt_rpages) -+ free(env->me_txn0->mt_rpages); -+ { unsigned int x; -+ for (x=1; x<=env->me_rpages[0].mid; x++) -+ munmap(env->me_rpages[x].mptr, env->me_rpages[x].mcnt * env->me_psize); -+ } -+ free(env->me_rpages); -+#endif - free(env->me_txn0); - mdb_midl_free(env->me_free_pgs); - -@@ -4883,7 +5341,11 @@ mdb_env_close0(MDB_env *env, int excl) - } - - if (env->me_map) { -+#ifdef MDB_VL32 -+ munmap(env->me_map, NUM_METAS*env->me_psize); -+#else - munmap(env->me_map, env->me_mapsize); -+#endif - } - if (env->me_mfd != env->me_fd && env->me_mfd != INVALID_HANDLE_VALUE) - (void) close(env->me_mfd); -@@ -4924,6 +5386,16 @@ mdb_env_close0(MDB_env *env, int excl) - sem_unlink(env->me_txns->mti_wmname); - } - } -+#elif defined(MDB_USE_SYSV_SEM) -+ if (env->me_rmutex->semid != -1) { -+ /* If we have the filelock: If we are the -+ * only remaining user, clean up semaphores. -+ */ -+ if (excl == 0) -+ mdb_env_excl_lock(env, &excl); -+ if (excl > 0) -+ semctl(env->me_rmutex->semid, 0, IPC_RMID); -+ } - #endif - munmap((void *)env->me_txns, (env->me_maxreaders-1)*sizeof(MDB_reader)+sizeof(MDB_txninfo)); - } -@@ -4938,6 +5410,14 @@ mdb_env_close0(MDB_env *env, int excl) - #endif - (void) close(env->me_lfd); - } -+#ifdef MDB_VL32 -+#ifdef _WIN32 -+ if (env->me_fmh) CloseHandle(env->me_fmh); -+ if (env->me_rpmutex) CloseHandle(env->me_rpmutex); -+#else -+ pthread_mutex_destroy(&env->me_rpmutex); -+#endif -+#endif - - env->me_flags &= ~(MDB_ENV_ACTIVE|MDB_ENV_TXKEY); - } -@@ -4961,18 +5441,18 @@ mdb_env_close(MDB_env *env) - free(env); - } - --/** Compare two items pointing at aligned size_t's */ -+/** Compare two items pointing at aligned #mdb_size_t's */ - static int - mdb_cmp_long(const MDB_val *a, const MDB_val *b) - { -- return (*(size_t *)a->mv_data < *(size_t *)b->mv_data) ? -1 : -- *(size_t *)a->mv_data > *(size_t *)b->mv_data; -+ return (*(mdb_size_t *)a->mv_data < *(mdb_size_t *)b->mv_data) ? -1 : -+ *(mdb_size_t *)a->mv_data > *(mdb_size_t *)b->mv_data; - } - - /** Compare two items pointing at aligned unsigned int's. - * - * This is also set as #MDB_INTEGERDUP|#MDB_DUPFIXED's #MDB_dbx.%md_dcmp, -- * but #mdb_cmp_clong() is called instead if the data type is size_t. -+ * but #mdb_cmp_clong() is called instead if the data type is #mdb_size_t. - */ - static int - mdb_cmp_int(const MDB_val *a, const MDB_val *b) -@@ -5077,7 +5557,7 @@ mdb_node_search(MDB_cursor *mc, MDB_val *key, int *exactp) - - nkeys = NUMKEYS(mp); - -- DPRINTF(("searching %u keys in %s %spage %"Z"u", -+ DPRINTF(("searching %u keys in %s %spage %"Yu, - nkeys, IS_LEAF(mp) ? "leaf" : "branch", IS_SUBP(mp) ? "sub-" : "", - mdb_dbg_pgno(mp))); - -@@ -5089,7 +5569,7 @@ mdb_node_search(MDB_cursor *mc, MDB_val *key, int *exactp) - * alignment is guaranteed. Use faster mdb_cmp_int. - */ - if (cmp == mdb_cmp_cint && IS_BRANCH(mp)) { -- if (NODEPTR(mp, 1)->mn_ksize == sizeof(size_t)) -+ if (NODEPTR(mp, 1)->mn_ksize == sizeof(mdb_size_t)) - cmp = mdb_cmp_long; - else - cmp = mdb_cmp_int; -@@ -5125,7 +5605,7 @@ mdb_node_search(MDB_cursor *mc, MDB_val *key, int *exactp) - DPRINTF(("found leaf index %u [%s], rc = %i", - i, DKEY(&nodekey), rc)); - else -- DPRINTF(("found branch index %u [%s -> %"Z"u], rc = %i", -+ DPRINTF(("found branch index %u [%s -> %"Yu"], rc = %i", - i, DKEY(&nodekey), NODEPGNO(node), rc)); - #endif - if (rc == 0) -@@ -5173,7 +5653,7 @@ static void - mdb_cursor_pop(MDB_cursor *mc) - { - if (mc->mc_snum) { -- DPRINTF(("popping page %"Z"u off db %d cursor %p", -+ DPRINTF(("popping page %"Yu" off db %d cursor %p", - mc->mc_pg[mc->mc_top]->mp_pgno, DDBI(mc), (void *) mc)); - - mc->mc_snum--; -@@ -5189,7 +5669,7 @@ mdb_cursor_pop(MDB_cursor *mc) - static int - mdb_cursor_push(MDB_cursor *mc, MDB_page *mp) - { -- DPRINTF(("pushing page %"Z"u on db %d cursor %p", mp->mp_pgno, -+ DPRINTF(("pushing page %"Yu" on db %d cursor %p", mp->mp_pgno, - DDBI(mc), (void *) mc)); - - if (mc->mc_snum >= CURSOR_STACK) { -@@ -5204,21 +5684,309 @@ mdb_cursor_push(MDB_cursor *mc, MDB_page *mp) - return MDB_SUCCESS; - } - --/** Find the address of the page corresponding to a given page number. -+#ifdef MDB_VL32 -+/** Map a read-only page. -+ * There are two levels of tracking in use, a per-txn list and a per-env list. -+ * ref'ing and unref'ing the per-txn list is faster since it requires no -+ * locking. Pages are cached in the per-env list for global reuse, and a lock -+ * is required. Pages are not immediately unmapped when their refcnt goes to -+ * zero; they hang around in case they will be reused again soon. -+ * -+ * When the per-txn list gets full, all pages with refcnt=0 are purged from the -+ * list and their refcnts in the per-env list are decremented. -+ * -+ * When the per-env list gets full, all pages with refcnt=0 are purged from the -+ * list and their pages are unmapped. -+ * -+ * @note "full" means the list has reached its respective rpcheck threshold. -+ * This threshold slowly raises if no pages could be purged on a given check, -+ * and returns to its original value when enough pages were purged. -+ * -+ * If purging doesn't free any slots, filling the per-txn list will return -+ * MDB_TXN_FULL, and filling the per-env list returns MDB_MAP_FULL. -+ * -+ * Reference tracking in a txn is imperfect, pages can linger with non-zero -+ * refcnt even without active references. It was deemed to be too invasive -+ * to add unrefs in every required location. However, all pages are unref'd -+ * at the end of the transaction. This guarantees that no stale references -+ * linger in the per-env list. -+ * -+ * Usually we map chunks of 16 pages at a time, but if an overflow page begins -+ * at the tail of the chunk we extend the chunk to include the entire overflow -+ * page. Unfortunately, pages can be turned into overflow pages after their -+ * chunk was already mapped. In that case we must remap the chunk if the -+ * overflow page is referenced. If the chunk's refcnt is 0 we can just remap -+ * it, otherwise we temporarily map a new chunk just for the overflow page. -+ * -+ * @note this chunk handling means we cannot guarantee that a data item -+ * returned from the DB will stay alive for the duration of the transaction: -+ * We unref pages as soon as a cursor moves away from the page -+ * A subsequent op may cause a purge, which may unmap any unref'd chunks -+ * The caller must copy the data if it must be used later in the same txn. -+ * -+ * Also - our reference counting revolves around cursors, but overflow pages -+ * aren't pointed to by a cursor's page stack. We have to remember them -+ * explicitly, in the added mc_ovpg field. A single cursor can only hold a -+ * reference to one overflow page at a time. -+ * - * @param[in] txn the transaction for this access. - * @param[in] pgno the page number for the page to retrieve. - * @param[out] ret address of a pointer where the page's address will be stored. -- * @param[out] lvl dirty_list inheritance level of found page. 1=current txn, 0=mapped page. - * @return 0 on success, non-zero on failure. - */ - static int --mdb_page_get(MDB_txn *txn, pgno_t pgno, MDB_page **ret, int *lvl) -+mdb_rpage_get(MDB_txn *txn, pgno_t pg0, MDB_page **ret) - { - MDB_env *env = txn->mt_env; -+ MDB_page *p; -+ MDB_ID3L tl = txn->mt_rpages; -+ MDB_ID3L el = env->me_rpages; -+ MDB_ID3 id3; -+ unsigned x, rem; -+ pgno_t pgno; -+ int rc, retries = 1; -+#ifdef _WIN32 -+ LARGE_INTEGER off; -+ SIZE_T len; -+#define SET_OFF(off,val) off.QuadPart = val -+#define MAP(rc,env,addr,len,off) \ -+ addr = NULL; \ -+ rc = NtMapViewOfSection(env->me_fmh, GetCurrentProcess(), &addr, 0, \ -+ len, &off, &len, ViewUnmap, (env->me_flags & MDB_RDONLY) ? 0 : MEM_RESERVE, PAGE_READONLY); \ -+ if (rc) rc = mdb_nt2win32(rc) -+#else -+ offset_t off; -+ size_t len; -+#define SET_OFF(off,val) off = val -+#define MAP(rc,env,addr,len,off) \ -+ addr = mmap(NULL, len, PROT_READ, MAP_SHARED, env->me_fd, off); \ -+ rc = (addr == MAP_FAILED) ? errno : 0 -+#endif -+ -+ /* remember the offset of the actual page number, so we can -+ * return the correct pointer at the end. -+ */ -+ rem = pg0 & (MDB_RPAGE_CHUNK-1); -+ pgno = pg0 ^ rem; -+ -+ id3.mid = 0; -+ x = mdb_mid3l_search(tl, pgno); -+ if (x <= tl[0].mid && tl[x].mid == pgno) { -+ if (x != tl[0].mid && tl[x+1].mid == pg0) -+ x++; -+ /* check for overflow size */ -+ p = (MDB_page *)((char *)tl[x].mptr + rem * env->me_psize); -+ if (IS_OVERFLOW(p) && p->mp_pages + rem > tl[x].mcnt) { -+ id3.mcnt = p->mp_pages + rem; -+ len = id3.mcnt * env->me_psize; -+ SET_OFF(off, pgno * env->me_psize); -+ MAP(rc, env, id3.mptr, len, off); -+ if (rc) -+ return rc; -+ /* check for local-only page */ -+ if (rem) { -+ mdb_tassert(txn, tl[x].mid != pg0); -+ /* hope there's room to insert this locally. -+ * setting mid here tells later code to just insert -+ * this id3 instead of searching for a match. -+ */ -+ id3.mid = pg0; -+ goto notlocal; -+ } else { -+ /* ignore the mapping we got from env, use new one */ -+ tl[x].mptr = id3.mptr; -+ tl[x].mcnt = id3.mcnt; -+ /* if no active ref, see if we can replace in env */ -+ if (!tl[x].mref) { -+ unsigned i; -+ pthread_mutex_lock(&env->me_rpmutex); -+ i = mdb_mid3l_search(el, tl[x].mid); -+ if (el[i].mref == 1) { -+ /* just us, replace it */ -+ munmap(el[i].mptr, el[i].mcnt * env->me_psize); -+ el[i].mptr = tl[x].mptr; -+ el[i].mcnt = tl[x].mcnt; -+ } else { -+ /* there are others, remove ourself */ -+ el[i].mref--; -+ } -+ pthread_mutex_unlock(&env->me_rpmutex); -+ } -+ } -+ } -+ id3.mptr = tl[x].mptr; -+ id3.mcnt = tl[x].mcnt; -+ tl[x].mref++; -+ goto ok; -+ } -+ -+notlocal: -+ if (tl[0].mid >= MDB_TRPAGE_MAX - txn->mt_rpcheck) { -+ unsigned i, y; -+ /* purge unref'd pages from our list and unref in env */ -+ pthread_mutex_lock(&env->me_rpmutex); -+retry: -+ y = 0; -+ for (i=1; i<=tl[0].mid; i++) { -+ if (!tl[i].mref) { -+ if (!y) y = i; -+ /* tmp overflow pages don't go to env */ -+ if (tl[i].mid & (MDB_RPAGE_CHUNK-1)) { -+ munmap(tl[i].mptr, tl[i].mcnt * env->me_psize); -+ continue; -+ } -+ x = mdb_mid3l_search(el, tl[i].mid); -+ el[x].mref--; -+ } -+ } -+ pthread_mutex_unlock(&env->me_rpmutex); -+ if (!y) { -+ /* we didn't find any unref'd chunks. -+ * if we're out of room, fail. -+ */ -+ if (tl[0].mid >= MDB_TRPAGE_MAX) -+ return MDB_TXN_FULL; -+ /* otherwise, raise threshold for next time around -+ * and let this go. -+ */ -+ txn->mt_rpcheck /= 2; -+ } else { -+ /* we found some unused; consolidate the list */ -+ for (i=y+1; i<= tl[0].mid; i++) -+ if (tl[i].mref) -+ tl[y++] = tl[i]; -+ tl[0].mid = y-1; -+ /* decrease the check threshold toward its original value */ -+ if (!txn->mt_rpcheck) -+ txn->mt_rpcheck = 1; -+ while (txn->mt_rpcheck < tl[0].mid && txn->mt_rpcheck < MDB_TRPAGE_SIZE/2) -+ txn->mt_rpcheck *= 2; -+ } -+ } -+ if (tl[0].mid < MDB_TRPAGE_SIZE) { -+ id3.mref = 1; -+ if (id3.mid) -+ goto found; -+ /* don't map past last written page in read-only envs */ -+ if ((env->me_flags & MDB_RDONLY) && pgno + MDB_RPAGE_CHUNK-1 > txn->mt_last_pgno) -+ id3.mcnt = txn->mt_last_pgno + 1 - pgno; -+ else -+ id3.mcnt = MDB_RPAGE_CHUNK; -+ len = id3.mcnt * env->me_psize; -+ id3.mid = pgno; -+ -+ /* search for page in env */ -+ pthread_mutex_lock(&env->me_rpmutex); -+ x = mdb_mid3l_search(el, pgno); -+ if (x <= el[0].mid && el[x].mid == pgno) { -+ id3.mptr = el[x].mptr; -+ id3.mcnt = el[x].mcnt; -+ /* check for overflow size */ -+ p = (MDB_page *)((char *)id3.mptr + rem * env->me_psize); -+ if (IS_OVERFLOW(p) && p->mp_pages + rem > id3.mcnt) { -+ id3.mcnt = p->mp_pages + rem; -+ len = id3.mcnt * env->me_psize; -+ SET_OFF(off, pgno * env->me_psize); -+ MAP(rc, env, id3.mptr, len, off); -+ if (rc) -+ goto fail; -+ if (!el[x].mref) { -+ munmap(el[x].mptr, env->me_psize * el[x].mcnt); -+ el[x].mptr = id3.mptr; -+ el[x].mcnt = id3.mcnt; -+ } else { -+ id3.mid = pg0; -+ pthread_mutex_unlock(&env->me_rpmutex); -+ goto found; -+ } -+ } -+ el[x].mref++; -+ pthread_mutex_unlock(&env->me_rpmutex); -+ goto found; -+ } -+ if (el[0].mid >= MDB_ERPAGE_MAX - env->me_rpcheck) { -+ /* purge unref'd pages */ -+ unsigned i, y = 0; -+ for (i=1; i<=el[0].mid; i++) { -+ if (!el[i].mref) { -+ if (!y) y = i; -+ munmap(el[i].mptr, env->me_psize * el[i].mcnt); -+ } -+ } -+ if (!y) { -+ if (retries) { -+ /* see if we can unref some local pages */ -+ retries--; -+ id3.mid = 0; -+ goto retry; -+ } -+ if (el[0].mid >= MDB_ERPAGE_MAX) { -+ pthread_mutex_unlock(&env->me_rpmutex); -+ return MDB_MAP_FULL; -+ } -+ env->me_rpcheck /= 2; -+ } else { -+ for (i=y+1; i<= el[0].mid; i++) -+ if (el[i].mref) -+ el[y++] = el[i]; -+ el[0].mid = y-1; -+ if (!env->me_rpcheck) -+ env->me_rpcheck = 1; -+ while (env->me_rpcheck < el[0].mid && env->me_rpcheck < MDB_ERPAGE_SIZE/2) -+ env->me_rpcheck *= 2; -+ } -+ } -+ SET_OFF(off, pgno * env->me_psize); -+ MAP(rc, env, id3.mptr, len, off); -+ if (rc) { -+fail: -+ pthread_mutex_unlock(&env->me_rpmutex); -+ return rc; -+ } -+ /* check for overflow size */ -+ p = (MDB_page *)((char *)id3.mptr + rem * env->me_psize); -+ if (IS_OVERFLOW(p) && p->mp_pages + rem > id3.mcnt) { -+ id3.mcnt = p->mp_pages + rem; -+ munmap(id3.mptr, len); -+ len = id3.mcnt * env->me_psize; -+ MAP(rc, env, id3.mptr, len, off); -+ if (rc) -+ goto fail; -+ } -+ mdb_mid3l_insert(el, &id3); -+ pthread_mutex_unlock(&env->me_rpmutex); -+found: -+ mdb_mid3l_insert(tl, &id3); -+ } else { -+ return MDB_TXN_FULL; -+ } -+ok: -+ p = (MDB_page *)((char *)id3.mptr + rem * env->me_psize); -+#if MDB_DEBUG /* we don't need this check any more */ -+ if (IS_OVERFLOW(p)) { -+ mdb_tassert(txn, p->mp_pages + rem <= id3.mcnt); -+ } -+#endif -+ *ret = p; -+ return MDB_SUCCESS; -+} -+#endif -+ -+/** Find the address of the page corresponding to a given page number. -+ * @param[in] mc the cursor accessing the page. -+ * @param[in] pgno the page number for the page to retrieve. -+ * @param[out] ret address of a pointer where the page's address will be stored. -+ * @param[out] lvl dirty_list inheritance level of found page. 1=current txn, 0=mapped page. -+ * @return 0 on success, non-zero on failure. -+ */ -+static int -+mdb_page_get(MDB_cursor *mc, pgno_t pgno, MDB_page **ret, int *lvl) -+{ -+ MDB_txn *txn = mc->mc_txn; - MDB_page *p = NULL; - int level; - -- if (! (txn->mt_flags & (MDB_TXN_RDONLY|MDB_TXN_WRITEMAP))) { -+ if (! (mc->mc_flags & (C_ORIG_RDONLY|C_WRITEMAP))) { - MDB_txn *tx2 = txn; - level = 1; - do { -@@ -5233,8 +6001,7 @@ mdb_page_get(MDB_txn *txn, pgno_t pgno, MDB_page **ret, int *lvl) - MDB_ID pn = pgno << 1; - x = mdb_midl_search(tx2->mt_spill_pgs, pn); - if (x <= tx2->mt_spill_pgs[0] && tx2->mt_spill_pgs[x] == pn) { -- p = (MDB_page *)(env->me_map + env->me_psize * pgno); -- goto done; -+ goto mapped; - } - } - if (dl[0].mid) { -@@ -5248,15 +6015,26 @@ mdb_page_get(MDB_txn *txn, pgno_t pgno, MDB_page **ret, int *lvl) - } while ((tx2 = tx2->mt_parent) != NULL); - } - -- if (pgno < txn->mt_next_pgno) { -- level = 0; -- p = (MDB_page *)(env->me_map + env->me_psize * pgno); -- } else { -- DPRINTF(("page %"Z"u not found", pgno)); -+ if (pgno >= txn->mt_next_pgno) { -+ DPRINTF(("page %"Yu" not found", pgno)); - txn->mt_flags |= MDB_TXN_ERROR; - return MDB_PAGE_NOTFOUND; - } - -+ level = 0; -+ -+mapped: -+ { -+#ifdef MDB_VL32 -+ int rc = mdb_rpage_get(txn, pgno, &p); -+ if (rc) -+ return rc; -+#else -+ MDB_env *env = txn->mt_env; -+ p = (MDB_page *)(env->me_map + env->me_psize * pgno); -+#endif -+ } -+ - done: - *ret = p; - if (lvl) -@@ -5278,13 +6056,13 @@ mdb_page_search_root(MDB_cursor *mc, MDB_val *key, int flags) - MDB_node *node; - indx_t i; - -- DPRINTF(("branch page %"Z"u has %u keys", mp->mp_pgno, NUMKEYS(mp))); -+ DPRINTF(("branch page %"Yu" has %u keys", mp->mp_pgno, NUMKEYS(mp))); - /* Don't assert on branch pages in the FreeDB. We can get here - * while in the process of rebalancing a FreeDB branch page; we must - * let that proceed. ITS#8336 - */ - mdb_cassert(mc, !mc->mc_dbi || NUMKEYS(mp) > 1); -- DPRINTF(("found index 0 to page %"Z"u", NODEPGNO(NODEPTR(mp, 0)))); -+ DPRINTF(("found index 0 to page %"Yu, NODEPGNO(NODEPTR(mp, 0)))); - - if (flags & (MDB_PS_FIRST|MDB_PS_LAST)) { - i = 0; -@@ -5308,7 +6086,7 @@ mdb_page_search_root(MDB_cursor *mc, MDB_val *key, int flags) - mdb_cassert(mc, i < NUMKEYS(mp)); - node = NODEPTR(mp, i); - -- if ((rc = mdb_page_get(mc->mc_txn, NODEPGNO(node), &mp, NULL)) != 0) -+ if ((rc = mdb_page_get(mc, NODEPGNO(node), &mp, NULL)) != 0) - return rc; - - mc->mc_ki[mc->mc_top] = i; -@@ -5329,7 +6107,7 @@ mdb_page_search_root(MDB_cursor *mc, MDB_val *key, int flags) - return MDB_CORRUPTED; - } - -- DPRINTF(("found leaf page %"Z"u for key [%s]", mp->mp_pgno, -+ DPRINTF(("found leaf page %"Yu" for key [%s]", mp->mp_pgno, - key ? DKEY(key) : "null")); - mc->mc_flags |= C_INITIALIZED; - mc->mc_flags &= ~C_EOF; -@@ -5350,7 +6128,7 @@ mdb_page_search_lowest(MDB_cursor *mc) - MDB_node *node = NODEPTR(mp, 0); - int rc; - -- if ((rc = mdb_page_get(mc->mc_txn, NODEPGNO(node), &mp, NULL)) != 0) -+ if ((rc = mdb_page_get(mc, NODEPGNO(node), &mp, NULL)) != 0) - return rc; - - mc->mc_ki[mc->mc_top] = 0; -@@ -5402,7 +6180,7 @@ mdb_page_search(MDB_cursor *mc, MDB_val *key, int flags) - return MDB_NOTFOUND; - if ((leaf->mn_flags & (F_DUPDATA|F_SUBDATA)) != F_SUBDATA) - return MDB_INCOMPATIBLE; /* not a named DB */ -- rc = mdb_node_read(mc->mc_txn, leaf, &data); -+ rc = mdb_node_read(&mc2, leaf, &data); - if (rc) - return rc; - memcpy(&flags, ((char *) data.mv_data + offsetof(MDB_db, md_flags)), -@@ -5425,14 +6203,26 @@ mdb_page_search(MDB_cursor *mc, MDB_val *key, int flags) - } - - mdb_cassert(mc, root > 1); -- if (!mc->mc_pg[0] || mc->mc_pg[0]->mp_pgno != root) -- if ((rc = mdb_page_get(mc->mc_txn, root, &mc->mc_pg[0], NULL)) != 0) -+ if (!mc->mc_pg[0] || mc->mc_pg[0]->mp_pgno != root) { -+#ifdef MDB_VL32 -+ if (mc->mc_pg[0]) -+ MDB_PAGE_UNREF(mc->mc_txn, mc->mc_pg[0]); -+#endif -+ if ((rc = mdb_page_get(mc, root, &mc->mc_pg[0], NULL)) != 0) - return rc; -+ } - -+#ifdef MDB_VL32 -+ { -+ int i; -+ for (i=1; imc_snum; i++) -+ MDB_PAGE_UNREF(mc->mc_txn, mc->mc_pg[i]); -+ } -+#endif - mc->mc_snum = 1; - mc->mc_top = 0; - -- DPRINTF(("db %d root page %"Z"u has flags 0x%X", -+ DPRINTF(("db %d root page %"Yu" has flags 0x%X", - DDBI(mc), root, mc->mc_pg[0]->mp_flags)); - - if (flags & MDB_PS_MODIFY) { -@@ -5457,7 +6247,7 @@ mdb_ovpage_free(MDB_cursor *mc, MDB_page *mp) - MDB_ID pn = pg << 1; - int rc; - -- DPRINTF(("free ov page %"Z"u (%d)", pg, ovpages)); -+ DPRINTF(("free ov page %"Yu" (%d)", pg, ovpages)); - /* If the page is dirty or on the spill list we just acquired it, - * so we should give it back to our current free list, if any. - * Otherwise put it onto the list of pages we freed in this txn. -@@ -5498,7 +6288,7 @@ mdb_ovpage_free(MDB_cursor *mc, MDB_page *mp) - j = ++(dl[0].mid); - dl[j] = ix; /* Unsorted. OK when MDB_TXN_ERROR. */ - txn->mt_flags |= MDB_TXN_ERROR; -- return MDB_CORRUPTED; -+ return MDB_PROBLEM; - } - } - txn->mt_dirty_room++; -@@ -5523,18 +6313,22 @@ release: - } - - /** Return the data associated with a given node. -- * @param[in] txn The transaction for this operation. -+ * @param[in] mc The cursor for this operation. - * @param[in] leaf The node being read. - * @param[out] data Updated to point to the node's data. - * @return 0 on success, non-zero on failure. - */ - static int --mdb_node_read(MDB_txn *txn, MDB_node *leaf, MDB_val *data) -+mdb_node_read(MDB_cursor *mc, MDB_node *leaf, MDB_val *data) - { - MDB_page *omp; /* overflow page */ - pgno_t pgno; - int rc; - -+ if (MC_OVPG(mc)) { -+ MDB_PAGE_UNREF(mc->mc_txn, MC_OVPG(mc)); -+ MC_SET_OVPG(mc, NULL); -+ } - if (!F_ISSET(leaf->mn_flags, F_BIGDATA)) { - data->mv_size = NODEDSZ(leaf); - data->mv_data = NODEDATA(leaf); -@@ -5545,11 +6339,12 @@ mdb_node_read(MDB_txn *txn, MDB_node *leaf, MDB_val *data) - */ - data->mv_size = NODEDSZ(leaf); - memcpy(&pgno, NODEDATA(leaf), sizeof(pgno)); -- if ((rc = mdb_page_get(txn, pgno, &omp, NULL)) != 0) { -- DPRINTF(("read overflow page %"Z"u failed", pgno)); -+ if ((rc = mdb_page_get(mc, pgno, &omp, NULL)) != 0) { -+ DPRINTF(("read overflow page %"Yu" failed", pgno)); - return rc; - } - data->mv_data = METADATA(omp); -+ MC_SET_OVPG(mc, omp); - - return MDB_SUCCESS; - } -@@ -5560,7 +6355,7 @@ mdb_get(MDB_txn *txn, MDB_dbi dbi, - { - MDB_cursor mc; - MDB_xcursor mx; -- int exact = 0; -+ int exact = 0, rc; - DKBUF; - - DPRINTF(("===> get db %u key [%s]", dbi, DKEY(key))); -@@ -5572,7 +6367,12 @@ mdb_get(MDB_txn *txn, MDB_dbi dbi, - return MDB_BAD_TXN; - - mdb_cursor_init(&mc, txn, dbi, &mx); -- return mdb_cursor_set(&mc, key, data, MDB_SET, &exact); -+ rc = mdb_cursor_set(&mc, key, data, MDB_SET, &exact); -+ /* unref all the pages when MDB_VL32 - caller must copy the data -+ * before doing anything else -+ */ -+ MDB_CURSOR_UNREF(&mc, 1); -+ return rc; - } - - /** Find a sibling for a page. -@@ -5589,13 +6389,19 @@ mdb_cursor_sibling(MDB_cursor *mc, int move_right) - int rc; - MDB_node *indx; - MDB_page *mp; -+#ifdef MDB_VL32 -+ MDB_page *op; -+#endif - - if (mc->mc_snum < 2) { - return MDB_NOTFOUND; /* root has no siblings */ - } - -+#ifdef MDB_VL32 -+ op = mc->mc_pg[mc->mc_top]; -+#endif - mdb_cursor_pop(mc); -- DPRINTF(("parent page is page %"Z"u, index %u", -+ DPRINTF(("parent page is page %"Yu", index %u", - mc->mc_pg[mc->mc_top]->mp_pgno, mc->mc_ki[mc->mc_top])); - - if (move_right ? (mc->mc_ki[mc->mc_top] + 1u >= NUMKEYS(mc->mc_pg[mc->mc_top])) -@@ -5618,8 +6424,10 @@ mdb_cursor_sibling(MDB_cursor *mc, int move_right) - } - mdb_cassert(mc, IS_BRANCH(mc->mc_pg[mc->mc_top])); - -+ MDB_PAGE_UNREF(mc->mc_txn, op); -+ - indx = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]); -- if ((rc = mdb_page_get(mc->mc_txn, NODEPGNO(indx), &mp, NULL)) != 0) { -+ if ((rc = mdb_page_get(mc, NODEPGNO(indx), &mp, NULL)) != 0) { - /* mc will be inconsistent if caller does mc_snum++ as above */ - mc->mc_flags &= ~(C_INITIALIZED|C_EOF); - return rc; -@@ -5640,11 +6448,12 @@ mdb_cursor_next(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) - MDB_node *leaf; - int rc; - -- if (mc->mc_flags & C_EOF) { -+ if ((mc->mc_flags & C_EOF) || -+ ((mc->mc_flags & C_DEL) && op == MDB_NEXT_DUP)) { - return MDB_NOTFOUND; - } -- -- mdb_cassert(mc, mc->mc_flags & C_INITIALIZED); -+ if (!(mc->mc_flags & C_INITIALIZED)) -+ return mdb_cursor_first(mc, key, data); - - mp = mc->mc_pg[mc->mc_top]; - -@@ -5659,6 +6468,9 @@ mdb_cursor_next(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) - return rc; - } - } -+ else { -+ MDB_CURSOR_UNREF(&mc->mc_xcursor->mx_cursor, 0); -+ } - } else { - mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF); - if (op == MDB_NEXT_DUP) -@@ -5666,7 +6478,7 @@ mdb_cursor_next(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) - } - } - -- DPRINTF(("cursor_next: top page is %"Z"u in cursor %p", -+ DPRINTF(("cursor_next: top page is %"Yu" in cursor %p", - mdb_dbg_pgno(mp), (void *) mc)); - if (mc->mc_flags & C_DEL) { - mc->mc_flags ^= C_DEL; -@@ -5680,12 +6492,12 @@ mdb_cursor_next(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) - return rc; - } - mp = mc->mc_pg[mc->mc_top]; -- DPRINTF(("next page is %"Z"u, key index %u", mp->mp_pgno, mc->mc_ki[mc->mc_top])); -+ DPRINTF(("next page is %"Yu", key index %u", mp->mp_pgno, mc->mc_ki[mc->mc_top])); - } else - mc->mc_ki[mc->mc_top]++; - - skip: -- DPRINTF(("==> cursor points to page %"Z"u with %u keys, key index %u", -+ DPRINTF(("==> cursor points to page %"Yu" with %u keys, key index %u", - mdb_dbg_pgno(mp), NUMKEYS(mp), mc->mc_ki[mc->mc_top])); - - if (IS_LEAF2(mp)) { -@@ -5701,7 +6513,7 @@ skip: - mdb_xcursor_init1(mc, leaf); - } - if (data) { -- if ((rc = mdb_node_read(mc->mc_txn, leaf, data)) != MDB_SUCCESS) -+ if ((rc = mdb_node_read(mc, leaf, data)) != MDB_SUCCESS) - return rc; - - if (F_ISSET(leaf->mn_flags, F_DUPDATA)) { -@@ -5723,7 +6535,12 @@ mdb_cursor_prev(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) - MDB_node *leaf; - int rc; - -- mdb_cassert(mc, mc->mc_flags & C_INITIALIZED); -+ if (!(mc->mc_flags & C_INITIALIZED)) { -+ rc = mdb_cursor_last(mc, key, data); -+ if (rc) -+ return rc; -+ mc->mc_ki[mc->mc_top]++; -+ } - - mp = mc->mc_pg[mc->mc_top]; - -@@ -5740,6 +6557,9 @@ mdb_cursor_prev(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) - return rc; - } - } -+ else { -+ MDB_CURSOR_UNREF(&mc->mc_xcursor->mx_cursor, 0); -+ } - } else { - mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF); - if (op == MDB_PREV_DUP) -@@ -5747,7 +6567,7 @@ mdb_cursor_prev(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) - } - } - -- DPRINTF(("cursor_prev: top page is %"Z"u in cursor %p", -+ DPRINTF(("cursor_prev: top page is %"Yu" in cursor %p", - mdb_dbg_pgno(mp), (void *) mc)); - - mc->mc_flags &= ~(C_EOF|C_DEL); -@@ -5759,11 +6579,13 @@ mdb_cursor_prev(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) - } - mp = mc->mc_pg[mc->mc_top]; - mc->mc_ki[mc->mc_top] = NUMKEYS(mp) - 1; -- DPRINTF(("prev page is %"Z"u, key index %u", mp->mp_pgno, mc->mc_ki[mc->mc_top])); -+ DPRINTF(("prev page is %"Yu", key index %u", mp->mp_pgno, mc->mc_ki[mc->mc_top])); - } else - mc->mc_ki[mc->mc_top]--; - -- DPRINTF(("==> cursor points to page %"Z"u with %u keys, key index %u", -+ mc->mc_flags &= ~C_EOF; -+ -+ DPRINTF(("==> cursor points to page %"Yu" with %u keys, key index %u", - mdb_dbg_pgno(mp), NUMKEYS(mp), mc->mc_ki[mc->mc_top])); - - if (IS_LEAF2(mp)) { -@@ -5779,7 +6601,7 @@ mdb_cursor_prev(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op) - mdb_xcursor_init1(mc, leaf); - } - if (data) { -- if ((rc = mdb_node_read(mc->mc_txn, leaf, data)) != MDB_SUCCESS) -+ if ((rc = mdb_node_read(mc, leaf, data)) != MDB_SUCCESS) - return rc; - - if (F_ISSET(leaf->mn_flags, F_DUPDATA)) { -@@ -5806,8 +6628,10 @@ mdb_cursor_set(MDB_cursor *mc, MDB_val *key, MDB_val *data, - if (key->mv_size == 0) - return MDB_BAD_VALSIZE; - -- if (mc->mc_xcursor) -+ if (mc->mc_xcursor) { -+ MDB_CURSOR_UNREF(&mc->mc_xcursor->mx_cursor, 0); - mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF); -+ } - - /* See if we're already on the right page */ - if (mc->mc_flags & C_INITIALIZED) { -@@ -5873,6 +6697,7 @@ mdb_cursor_set(MDB_cursor *mc, MDB_val *key, MDB_val *data, - } - } - rc = 0; -+ mc->mc_flags &= ~C_EOF; - goto set2; - } - } -@@ -5961,25 +6786,23 @@ set1: - } else if (op == MDB_GET_BOTH || op == MDB_GET_BOTH_RANGE) { - MDB_val olddata; - MDB_cmp_func *dcmp; -- if ((rc = mdb_node_read(mc->mc_txn, leaf, &olddata)) != MDB_SUCCESS) -+ if ((rc = mdb_node_read(mc, leaf, &olddata)) != MDB_SUCCESS) - return rc; - dcmp = mc->mc_dbx->md_dcmp; --#if UINT_MAX < SIZE_MAX -- if (dcmp == mdb_cmp_int && olddata.mv_size == sizeof(size_t)) -+ if (NEED_CMP_CLONG(dcmp, olddata.mv_size)) - dcmp = mdb_cmp_clong; --#endif - rc = dcmp(data, &olddata); - if (rc) { - if (op == MDB_GET_BOTH || rc > 0) - return MDB_NOTFOUND; - rc = 0; -- *data = olddata; - } -+ *data = olddata; - - } else { - if (mc->mc_xcursor) - mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF); -- if ((rc = mdb_node_read(mc->mc_txn, leaf, data)) != MDB_SUCCESS) -+ if ((rc = mdb_node_read(mc, leaf, data)) != MDB_SUCCESS) - return rc; - } - } -@@ -5999,8 +6822,10 @@ mdb_cursor_first(MDB_cursor *mc, MDB_val *key, MDB_val *data) - int rc; - MDB_node *leaf; - -- if (mc->mc_xcursor) -+ if (mc->mc_xcursor) { -+ MDB_CURSOR_UNREF(&mc->mc_xcursor->mx_cursor, 0); - mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF); -+ } - - if (!(mc->mc_flags & C_INITIALIZED) || mc->mc_top) { - rc = mdb_page_search(mc, NULL, MDB_PS_FIRST); -@@ -6028,7 +6853,7 @@ mdb_cursor_first(MDB_cursor *mc, MDB_val *key, MDB_val *data) - if (rc) - return rc; - } else { -- if ((rc = mdb_node_read(mc->mc_txn, leaf, data)) != MDB_SUCCESS) -+ if ((rc = mdb_node_read(mc, leaf, data)) != MDB_SUCCESS) - return rc; - } - } -@@ -6043,8 +6868,10 @@ mdb_cursor_last(MDB_cursor *mc, MDB_val *key, MDB_val *data) - int rc; - MDB_node *leaf; - -- if (mc->mc_xcursor) -+ if (mc->mc_xcursor) { -+ MDB_CURSOR_UNREF(&mc->mc_xcursor->mx_cursor, 0); - mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF); -+ } - - if (!(mc->mc_flags & C_EOF)) { - -@@ -6073,7 +6900,7 @@ mdb_cursor_last(MDB_cursor *mc, MDB_val *key, MDB_val *data) - if (rc) - return rc; - } else { -- if ((rc = mdb_node_read(mc->mc_txn, leaf, data)) != MDB_SUCCESS) -+ if ((rc = mdb_node_read(mc, leaf, data)) != MDB_SUCCESS) - return rc; - } - } -@@ -6119,7 +6946,7 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data, - if (F_ISSET(leaf->mn_flags, F_DUPDATA)) { - rc = mdb_cursor_get(&mc->mc_xcursor->mx_cursor, data, NULL, MDB_GET_CURRENT); - } else { -- rc = mdb_node_read(mc->mc_txn, leaf, data); -+ rc = mdb_node_read(mc, leaf, data); - } - } - } -@@ -6169,10 +6996,7 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data, - rc = MDB_INCOMPATIBLE; - break; - } -- if (!(mc->mc_flags & C_INITIALIZED)) -- rc = mdb_cursor_first(mc, key, data); -- else -- rc = mdb_cursor_next(mc, key, data, MDB_NEXT_DUP); -+ rc = mdb_cursor_next(mc, key, data, MDB_NEXT_DUP); - if (rc == MDB_SUCCESS) { - if (mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED) { - MDB_cursor *mx; -@@ -6187,24 +7011,38 @@ fetchm: - } - } - break; -+ case MDB_PREV_MULTIPLE: -+ if (data == NULL) { -+ rc = EINVAL; -+ break; -+ } -+ if (!(mc->mc_db->md_flags & MDB_DUPFIXED)) { -+ rc = MDB_INCOMPATIBLE; -+ break; -+ } -+ if (!(mc->mc_flags & C_INITIALIZED)) -+ rc = mdb_cursor_last(mc, key, data); -+ else -+ rc = MDB_SUCCESS; -+ if (rc == MDB_SUCCESS) { -+ MDB_cursor *mx = &mc->mc_xcursor->mx_cursor; -+ if (mx->mc_flags & C_INITIALIZED) { -+ rc = mdb_cursor_sibling(mx, 0); -+ if (rc == MDB_SUCCESS) -+ goto fetchm; -+ } else { -+ rc = MDB_NOTFOUND; -+ } -+ } -+ break; - case MDB_NEXT: - case MDB_NEXT_DUP: - case MDB_NEXT_NODUP: -- if (!(mc->mc_flags & C_INITIALIZED)) -- rc = mdb_cursor_first(mc, key, data); -- else -- rc = mdb_cursor_next(mc, key, data, op); -+ rc = mdb_cursor_next(mc, key, data, op); - break; - case MDB_PREV: - case MDB_PREV_DUP: - case MDB_PREV_NODUP: -- if (!(mc->mc_flags & C_INITIALIZED)) { -- rc = mdb_cursor_last(mc, key, data); -- if (rc) -- break; -- mc->mc_flags |= C_INITIALIZED; -- mc->mc_ki[mc->mc_top]++; -- } - rc = mdb_cursor_prev(mc, key, data, op); - break; - case MDB_FIRST: -@@ -6225,7 +7063,7 @@ fetchm: - MDB_node *leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]); - if (!F_ISSET(leaf->mn_flags, F_DUPDATA)) { - MDB_GET_KEY(leaf, key); -- rc = mdb_node_read(mc->mc_txn, leaf, data); -+ rc = mdb_node_read(mc, leaf, data); - break; - } - } -@@ -6487,10 +7325,8 @@ more: - if (flags == MDB_CURRENT) - goto current; - dcmp = mc->mc_dbx->md_dcmp; --#if UINT_MAX < SIZE_MAX -- if (dcmp == mdb_cmp_int && olddata.mv_size == sizeof(size_t)) -+ if (NEED_CMP_CLONG(dcmp, olddata.mv_size)) - dcmp = mdb_cmp_clong; --#endif - /* does data match? */ - if (!dcmp(data, &olddata)) { - if (flags & (MDB_NODUPDATA|MDB_APPENDDUP)) -@@ -6609,7 +7445,7 @@ current: - int level, ovpages, dpages = OVPAGES(data->mv_size, env->me_psize); - - memcpy(&pg, olddata.mv_data, sizeof(pg)); -- if ((rc2 = mdb_page_get(mc->mc_txn, pg, &omp, &level)) != 0) -+ if ((rc2 = mdb_page_get(mc, pg, &omp, &level)) != 0) - return rc2; - ovpages = omp->mp_pages; - -@@ -6641,8 +7477,13 @@ current: - /* Note - this page is already counted in parent's dirty_room */ - rc2 = mdb_mid2l_insert(mc->mc_txn->mt_u.dirty_list, &id2); - mdb_cassert(mc, rc2 == 0); -+ /* Currently we make the page look as with put() in the -+ * parent txn, in case the user peeks at MDB_RESERVEd -+ * or unused parts. Some users treat ovpages specially. -+ */ - if (!(flags & MDB_RESERVE)) { -- /* Copy end of page, adjusting alignment so -+ /* Skip the part where LMDB will put *data. -+ * Copy end of page, adjusting alignment so - * compiler may copy words instead of bytes. - */ - off = (PAGEHDRSZ + data->mv_size) & -sizeof(size_t); -@@ -6728,7 +7569,7 @@ new_sub: - */ - if (do_sub) { - int xflags, new_dupdata; -- size_t ecount; -+ mdb_size_t ecount; - put_sub: - xdata.mv_size = 0; - xdata.mv_data = ""; -@@ -6810,7 +7651,7 @@ put_sub: - return rc; - bad_sub: - if (rc == MDB_KEYEXIST) /* should not happen, we deleted that item */ -- rc = MDB_CORRUPTED; -+ rc = MDB_PROBLEM; - } - mc->mc_txn->mt_flags |= MDB_TXN_ERROR; - return rc; -@@ -6910,7 +7751,7 @@ mdb_cursor_del(MDB_cursor *mc, unsigned int flags) - pgno_t pg; - - memcpy(&pg, NODEDATA(leaf), sizeof(pg)); -- if ((rc = mdb_page_get(mc->mc_txn, pg, &omp, NULL)) || -+ if ((rc = mdb_page_get(mc, pg, &omp, NULL)) || - (rc = mdb_ovpage_free(mc, omp))) - goto fail; - } -@@ -6939,7 +7780,7 @@ mdb_page_new(MDB_cursor *mc, uint32_t flags, int num, MDB_page **mp) - - if ((rc = mdb_page_alloc(mc, num, &np))) - return rc; -- DPRINTF(("allocated new mpage %"Z"u, page size %u", -+ DPRINTF(("allocated new mpage %"Yu", page size %u", - np->mp_pgno, mc->mc_txn->mt_env->me_psize)); - np->mp_flags = flags | P_DIRTY; - np->mp_lower = (PAGEHDRSZ-PAGEBASE); -@@ -7039,7 +7880,7 @@ mdb_node_add(MDB_cursor *mc, indx_t indx, - - mdb_cassert(mc, mp->mp_upper >= mp->mp_lower); - -- DPRINTF(("add to %s %spage %"Z"u index %i, data size %"Z"u key size %"Z"u [%s]", -+ DPRINTF(("add to %s %spage %"Yu" index %i, data size %"Z"u key size %"Z"u [%s]", - IS_LEAF(mp) ? "leaf" : "branch", - IS_SUBP(mp) ? "sub-" : "", - mdb_dbg_pgno(mp), indx, data ? data->mv_size : 0, -@@ -7080,7 +7921,7 @@ mdb_node_add(MDB_cursor *mc, indx_t indx, - goto full; - if ((rc = mdb_page_new(mc, P_OVERFLOW, ovpages, &ofp))) - return rc; -- DPRINTF(("allocated overflow page %"Z"u", ofp->mp_pgno)); -+ DPRINTF(("allocated overflow page %"Yu, ofp->mp_pgno)); - flags |= F_BIGDATA; - goto update; - } else { -@@ -7137,7 +7978,7 @@ update: - return MDB_SUCCESS; - - full: -- DPRINTF(("not enough room in page %"Z"u, got %u ptrs", -+ DPRINTF(("not enough room in page %"Yu", got %u ptrs", - mdb_dbg_pgno(mp), NUMKEYS(mp))); - DPRINTF(("upper-lower = %u - %u = %"Z"d", mp->mp_upper,mp->mp_lower,room)); - DPRINTF(("node size = %"Z"u", node_size)); -@@ -7160,7 +8001,7 @@ mdb_node_del(MDB_cursor *mc, int ksize) - MDB_node *node; - char *base; - -- DPRINTF(("delete node %u on %s page %"Z"u", indx, -+ DPRINTF(("delete node %u on %s page %"Yu, indx, - IS_LEAF(mp) ? "leaf" : "branch", mdb_dbg_pgno(mp))); - numkeys = NUMKEYS(mp); - mdb_cassert(mc, indx < numkeys); -@@ -7269,7 +8110,8 @@ mdb_xcursor_init0(MDB_cursor *mc) - mx->mx_cursor.mc_dbflag = &mx->mx_dbflag; - mx->mx_cursor.mc_snum = 0; - mx->mx_cursor.mc_top = 0; -- mx->mx_cursor.mc_flags = C_SUB; -+ MC_SET_OVPG(&mx->mx_cursor, NULL); -+ mx->mx_cursor.mc_flags = C_SUB | (mc->mc_flags & (C_ORIG_RDONLY|C_WRITEMAP)); - mx->mx_dbx.md_name.mv_size = 0; - mx->mx_dbx.md_name.mv_data = NULL; - mx->mx_dbx.md_cmp = mc->mc_dbx->md_dcmp; -@@ -7288,12 +8130,12 @@ mdb_xcursor_init1(MDB_cursor *mc, MDB_node *node) - { - MDB_xcursor *mx = mc->mc_xcursor; - -+ mx->mx_cursor.mc_flags &= C_SUB|C_ORIG_RDONLY|C_WRITEMAP; - if (node->mn_flags & F_SUBDATA) { - memcpy(&mx->mx_db, NODEDATA(node), sizeof(MDB_db)); - mx->mx_cursor.mc_pg[0] = 0; - mx->mx_cursor.mc_snum = 0; - mx->mx_cursor.mc_top = 0; -- mx->mx_cursor.mc_flags = C_SUB; - } else { - MDB_page *fp = NODEDATA(node); - mx->mx_db.md_pad = 0; -@@ -7306,7 +8148,7 @@ mdb_xcursor_init1(MDB_cursor *mc, MDB_node *node) - COPY_PGNO(mx->mx_db.md_root, fp->mp_pgno); - mx->mx_cursor.mc_snum = 1; - mx->mx_cursor.mc_top = 0; -- mx->mx_cursor.mc_flags = C_INITIALIZED|C_SUB; -+ mx->mx_cursor.mc_flags |= C_INITIALIZED; - mx->mx_cursor.mc_pg[0] = fp; - mx->mx_cursor.mc_ki[0] = 0; - if (mc->mc_db->md_flags & MDB_DUPFIXED) { -@@ -7316,13 +8158,11 @@ mdb_xcursor_init1(MDB_cursor *mc, MDB_node *node) - mx->mx_db.md_flags |= MDB_INTEGERKEY; - } - } -- DPRINTF(("Sub-db -%u root page %"Z"u", mx->mx_cursor.mc_dbi, -+ DPRINTF(("Sub-db -%u root page %"Yu, mx->mx_cursor.mc_dbi, - mx->mx_db.md_root)); - mx->mx_dbflag = DB_VALID|DB_USRVALID|DB_DIRTY; /* DB_DIRTY guides mdb_cursor_touch */ --#if UINT_MAX < SIZE_MAX -- if (mx->mx_dbx.md_cmp == mdb_cmp_int && mx->mx_db.md_pad == sizeof(size_t)) -+ if (NEED_CMP_CLONG(mx->mx_dbx.md_cmp, mx->mx_db.md_pad)) - mx->mx_dbx.md_cmp = mdb_cmp_clong; --#endif - } - - -@@ -7345,7 +8185,7 @@ mdb_xcursor_init2(MDB_cursor *mc, MDB_xcursor *src_mx, int new_dupdata) - mx->mx_cursor.mc_flags |= C_INITIALIZED; - mx->mx_cursor.mc_ki[0] = 0; - mx->mx_dbflag = DB_VALID|DB_USRVALID|DB_DIRTY; /* DB_DIRTY guides mdb_cursor_touch */ --#if UINT_MAX < SIZE_MAX -+#if UINT_MAX < MDB_SIZE_MAX /* matches mdb_xcursor_init1:NEED_CMP_CLONG() */ - mx->mx_dbx.md_cmp = src_mx->mx_dbx.md_cmp; - #endif - } else if (!(mx->mx_cursor.mc_flags & C_INITIALIZED)) { -@@ -7353,7 +8193,7 @@ mdb_xcursor_init2(MDB_cursor *mc, MDB_xcursor *src_mx, int new_dupdata) - } - mx->mx_db = src_mx->mx_db; - mx->mx_cursor.mc_pg[0] = src_mx->mx_cursor.mc_pg[0]; -- DPRINTF(("Sub-db -%u root page %"Z"u", mx->mx_cursor.mc_dbi, -+ DPRINTF(("Sub-db -%u root page %"Yu, mx->mx_cursor.mc_dbi, - mx->mx_db.md_root)); - } - -@@ -7372,7 +8212,8 @@ mdb_cursor_init(MDB_cursor *mc, MDB_txn *txn, MDB_dbi dbi, MDB_xcursor *mx) - mc->mc_top = 0; - mc->mc_pg[0] = 0; - mc->mc_ki[0] = 0; -- mc->mc_flags = 0; -+ MC_SET_OVPG(mc, NULL); -+ mc->mc_flags = txn->mt_flags & (C_ORIG_RDONLY|C_WRITEMAP); - if (txn->mt_dbs[dbi].md_flags & MDB_DUPSORT) { - mdb_tassert(txn, mx != NULL); - mc->mc_xcursor = mx; -@@ -7437,7 +8278,7 @@ mdb_cursor_renew(MDB_txn *txn, MDB_cursor *mc) - - /* Return the count of duplicate data items for the current key */ - int --mdb_cursor_count(MDB_cursor *mc, size_t *countp) -+mdb_cursor_count(MDB_cursor *mc, mdb_size_t *countp) - { - MDB_node *leaf; - -@@ -7471,6 +8312,9 @@ mdb_cursor_count(MDB_cursor *mc, size_t *countp) - void - mdb_cursor_close(MDB_cursor *mc) - { -+ if (mc) { -+ MDB_CURSOR_UNREF(mc, 0); -+ } - if (mc && !mc->mc_backup) { - /* remove from txn, if tracked */ - if ((mc->mc_flags & C_UNTRACK) && mc->mc_txn->mt_cursors) { -@@ -7522,7 +8366,7 @@ mdb_update_key(MDB_cursor *mc, MDB_val *key) - char kbuf2[DKBUF_MAXKEYSIZE*2+1]; - k2.mv_data = NODEKEY(node); - k2.mv_size = node->mn_ksize; -- DPRINTF(("update key %u (ofs %u) [%s] to [%s] on page %"Z"u", -+ DPRINTF(("update key %u (ofs %u) [%s] to [%s] on page %"Yu, - indx, ptr, - mdb_dkey(&k2, kbuf2), - DKEY(key), -@@ -7670,7 +8514,7 @@ mdb_node_move(MDB_cursor *csrc, MDB_cursor *cdst, int fromleft) - return rc; - } - -- DPRINTF(("moving %s node %u [%s] on page %"Z"u to node %u on page %"Z"u", -+ DPRINTF(("moving %s node %u [%s] on page %"Yu" to node %u on page %"Yu, - IS_LEAF(csrc->mc_pg[csrc->mc_top]) ? "leaf" : "branch", - csrc->mc_ki[csrc->mc_top], - DKEY(&key), -@@ -7764,7 +8608,7 @@ mdb_node_move(MDB_cursor *csrc, MDB_cursor *cdst, int fromleft) - key.mv_size = NODEKSZ(srcnode); - key.mv_data = NODEKEY(srcnode); - } -- DPRINTF(("update separator for source page %"Z"u to [%s]", -+ DPRINTF(("update separator for source page %"Yu" to [%s]", - csrc->mc_pg[csrc->mc_top]->mp_pgno, DKEY(&key))); - mdb_cursor_copy(csrc, &mn); - mn.mc_snum--; -@@ -7795,7 +8639,7 @@ mdb_node_move(MDB_cursor *csrc, MDB_cursor *cdst, int fromleft) - key.mv_size = NODEKSZ(srcnode); - key.mv_data = NODEKEY(srcnode); - } -- DPRINTF(("update separator for destination page %"Z"u to [%s]", -+ DPRINTF(("update separator for destination page %"Yu" to [%s]", - cdst->mc_pg[cdst->mc_top]->mp_pgno, DKEY(&key))); - mdb_cursor_copy(cdst, &mn); - mn.mc_snum--; -@@ -7841,7 +8685,7 @@ mdb_page_merge(MDB_cursor *csrc, MDB_cursor *cdst) - psrc = csrc->mc_pg[csrc->mc_top]; - pdst = cdst->mc_pg[cdst->mc_top]; - -- DPRINTF(("merging page %"Z"u into %"Z"u", psrc->mp_pgno, pdst->mp_pgno)); -+ DPRINTF(("merging page %"Yu" into %"Yu, psrc->mp_pgno, pdst->mp_pgno)); - - mdb_cassert(csrc, csrc->mc_snum > 1); /* can't merge root page */ - mdb_cassert(csrc, cdst->mc_snum > 1); -@@ -7898,7 +8742,7 @@ mdb_page_merge(MDB_cursor *csrc, MDB_cursor *cdst) - } - } - -- DPRINTF(("dst page %"Z"u now has %u keys (%.1f%% filled)", -+ DPRINTF(("dst page %"Yu" now has %u keys (%.1f%% filled)", - pdst->mp_pgno, NUMKEYS(pdst), - (float)PAGEFILL(cdst->mc_txn->mt_env, pdst) / 10)); - -@@ -7986,6 +8830,7 @@ mdb_cursor_copy(const MDB_cursor *csrc, MDB_cursor *cdst) - cdst->mc_snum = csrc->mc_snum; - cdst->mc_top = csrc->mc_top; - cdst->mc_flags = csrc->mc_flags; -+ MC_SET_OVPG(cdst, MC_OVPG(csrc)); - - for (i=0; imc_snum; i++) { - cdst->mc_pg[i] = csrc->mc_pg[i]; -@@ -8014,14 +8859,14 @@ mdb_rebalance(MDB_cursor *mc) - minkeys = 1; - thresh = FILL_THRESHOLD; - } -- DPRINTF(("rebalancing %s page %"Z"u (has %u keys, %.1f%% full)", -+ DPRINTF(("rebalancing %s page %"Yu" (has %u keys, %.1f%% full)", - IS_LEAF(mc->mc_pg[mc->mc_top]) ? "leaf" : "branch", - mdb_dbg_pgno(mc->mc_pg[mc->mc_top]), NUMKEYS(mc->mc_pg[mc->mc_top]), - (float)PAGEFILL(mc->mc_txn->mt_env, mc->mc_pg[mc->mc_top]) / 10)); - - if (PAGEFILL(mc->mc_txn->mt_env, mc->mc_pg[mc->mc_top]) >= thresh && - NUMKEYS(mc->mc_pg[mc->mc_top]) >= minkeys) { -- DPRINTF(("no need to rebalance page %"Z"u, above fill threshold", -+ DPRINTF(("no need to rebalance page %"Yu", above fill threshold", - mdb_dbg_pgno(mc->mc_pg[mc->mc_top]))); - return MDB_SUCCESS; - } -@@ -8069,7 +8914,7 @@ mdb_rebalance(MDB_cursor *mc) - if (rc) - return rc; - mc->mc_db->md_root = NODEPGNO(NODEPTR(mp, 0)); -- rc = mdb_page_get(mc->mc_txn,mc->mc_db->md_root,&mc->mc_pg[0],NULL); -+ rc = mdb_page_get(mc, mc->mc_db->md_root, &mc->mc_pg[0], NULL); - if (rc) - return rc; - mc->mc_db->md_depth--; -@@ -8130,7 +8975,7 @@ mdb_rebalance(MDB_cursor *mc) - DPUTS("reading right neighbor"); - mn.mc_ki[ptop]++; - node = NODEPTR(mc->mc_pg[ptop], mn.mc_ki[ptop]); -- rc = mdb_page_get(mc->mc_txn,NODEPGNO(node),&mn.mc_pg[mn.mc_top],NULL); -+ rc = mdb_page_get(mc, NODEPGNO(node), &mn.mc_pg[mn.mc_top], NULL); - if (rc) - return rc; - mn.mc_ki[mn.mc_top] = 0; -@@ -8142,7 +8987,7 @@ mdb_rebalance(MDB_cursor *mc) - DPUTS("reading left neighbor"); - mn.mc_ki[ptop]--; - node = NODEPTR(mc->mc_pg[ptop], mn.mc_ki[ptop]); -- rc = mdb_page_get(mc->mc_txn,NODEPGNO(node),&mn.mc_pg[mn.mc_top],NULL); -+ rc = mdb_page_get(mc, NODEPGNO(node), &mn.mc_pg[mn.mc_top], NULL); - if (rc) - return rc; - mn.mc_ki[mn.mc_top] = NUMKEYS(mn.mc_pg[mn.mc_top]) - 1; -@@ -8150,7 +8995,7 @@ mdb_rebalance(MDB_cursor *mc) - fromleft = 1; - } - -- DPRINTF(("found neighbor page %"Z"u (%u keys, %.1f%% full)", -+ DPRINTF(("found neighbor page %"Yu" (%u keys, %.1f%% full)", - mn.mc_pg[mn.mc_top]->mp_pgno, NUMKEYS(mn.mc_pg[mn.mc_top]), - (float)PAGEFILL(mc->mc_txn->mt_env, mn.mc_pg[mn.mc_top]) / 10)); - -@@ -8207,8 +9052,6 @@ mdb_cursor_del0(MDB_cursor *mc) - if (m3->mc_pg[mc->mc_top] == mp) { - if (m3->mc_ki[mc->mc_top] == ki) { - m3->mc_flags |= C_DEL; -- if (mc->mc_db->md_flags & MDB_DUPSORT) -- m3->mc_xcursor->mx_cursor.mc_flags &= ~C_INITIALIZED; - } else if (m3->mc_ki[mc->mc_top] > ki) { - m3->mc_ki[mc->mc_top]--; - } -@@ -8242,11 +9085,21 @@ mdb_cursor_del0(MDB_cursor *mc) - continue; - if (m3->mc_pg[mc->mc_top] == mp) { - /* if m3 points past last node in page, find next sibling */ -- if (m3->mc_ki[mc->mc_top] >= nkeys) { -- rc = mdb_cursor_sibling(m3, 1); -- if (rc == MDB_NOTFOUND) { -- m3->mc_flags |= C_EOF; -- rc = MDB_SUCCESS; -+ if (m3->mc_ki[mc->mc_top] >= mc->mc_ki[mc->mc_top]) { -+ if (m3->mc_ki[mc->mc_top] >= nkeys) { -+ rc = mdb_cursor_sibling(m3, 1); -+ if (rc == MDB_NOTFOUND) { -+ m3->mc_flags |= C_EOF; -+ rc = MDB_SUCCESS; -+ continue; -+ } -+ } -+ if (mc->mc_db->md_flags & MDB_DUPSORT) { -+ MDB_node *node = NODEPTR(m3->mc_pg[m3->mc_top], m3->mc_ki[m3->mc_top]); -+ if (node->mn_flags & F_DUPDATA) { -+ mdb_xcursor_init1(m3, node); -+ m3->mc_xcursor->mx_cursor.mc_flags |= C_DEL; -+ } - } - } - } -@@ -8352,7 +9205,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno - newindx = mc->mc_ki[mc->mc_top]; - nkeys = NUMKEYS(mp); - -- DPRINTF(("-----> splitting %s page %"Z"u and adding [%s] at index %i/%i", -+ DPRINTF(("-----> splitting %s page %"Yu" and adding [%s] at index %i/%i", - IS_LEAF(mp) ? "leaf" : "branch", mp->mp_pgno, - DKEY(newkey), mc->mc_ki[mc->mc_top], nkeys)); - -@@ -8360,7 +9213,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno - if ((rc = mdb_page_new(mc, mp->mp_flags, 1, &rp))) - return rc; - rp->mp_pad = mp->mp_pad; -- DPRINTF(("new right sibling: page %"Z"u", rp->mp_pgno)); -+ DPRINTF(("new right sibling: page %"Yu, rp->mp_pgno)); - - /* Usually when splitting the root page, the cursor - * height is 1. But when called from mdb_update_key, -@@ -8378,7 +9231,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno - mc->mc_pg[0] = pp; - mc->mc_ki[0] = 0; - mc->mc_db->md_root = pp->mp_pgno; -- DPRINTF(("root split! new root = %"Z"u", pp->mp_pgno)); -+ DPRINTF(("root split! new root = %"Yu, pp->mp_pgno)); - new_root = mc->mc_db->md_depth++; - - /* Add left (implicit) pointer. */ -@@ -8395,7 +9248,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno - ptop = 0; - } else { - ptop = mc->mc_top-1; -- DPRINTF(("parent branch page is %"Z"u", mc->mc_pg[ptop]->mp_pgno)); -+ DPRINTF(("parent branch page is %"Yu, mc->mc_pg[ptop]->mp_pgno)); - } - - mdb_cursor_copy(mc, &mn); -@@ -8776,11 +9629,12 @@ mdb_put(MDB_txn *txn, MDB_dbi dbi, - #ifndef MDB_WBUF - #define MDB_WBUF (1024*1024) - #endif -+#define MDB_EOF 0x10 /**< #mdb_env_copyfd1() is done reading */ - -- /** State needed for a compacting copy. */ -+ /** State needed for a double-buffering compacting copy. */ - typedef struct mdb_copy { - pthread_mutex_t mc_mutex; -- pthread_cond_t mc_cond; -+ pthread_cond_t mc_cond; /**< Condition variable for #mc_new */ - char *mc_wbuf[2]; - char *mc_over[2]; - MDB_env *mc_env; -@@ -8789,10 +9643,9 @@ typedef struct mdb_copy { - int mc_olen[2]; - pgno_t mc_next_pgno; - HANDLE mc_fd; -- int mc_status; -- volatile int mc_new; -- int mc_toggle; -- -+ int mc_toggle; /**< Buffer number in provider */ -+ int mc_new; /**< (0-2 buffers to write) | (#MDB_EOF at end) */ -+ volatile int mc_error; /**< Error code, never cleared if set */ - } mdb_copy; - - /** Dedicated writer thread for compacting copy. */ -@@ -8811,20 +9664,16 @@ mdb_env_copythr(void *arg) - #endif - - pthread_mutex_lock(&my->mc_mutex); -- my->mc_new = 0; -- pthread_cond_signal(&my->mc_cond); - for(;;) { - while (!my->mc_new) - pthread_cond_wait(&my->mc_cond, &my->mc_mutex); -- if (my->mc_new < 0) { -- my->mc_new = 0; -+ if (my->mc_new == 0 + MDB_EOF) /* 0 buffers, just EOF */ - break; -- } -- my->mc_new = 0; - wsize = my->mc_wlen[toggle]; - ptr = my->mc_wbuf[toggle]; - again: -- while (wsize > 0) { -+ rc = MDB_SUCCESS; -+ while (wsize > 0 && !my->mc_error) { - DO_WRITE(rc, my->mc_fd, ptr, wsize, len); - if (!rc) { - rc = ErrCode(); -@@ -8840,8 +9689,7 @@ again: - } - } - if (rc) { -- my->mc_status = rc; -- break; -+ my->mc_error = rc; - } - /* If there's an overflow page tail, write it too */ - if (my->mc_olen[toggle]) { -@@ -8852,39 +9700,41 @@ again: - } - my->mc_wlen[toggle] = 0; - toggle ^= 1; -+ /* Return the empty buffer to provider */ -+ my->mc_new--; - pthread_cond_signal(&my->mc_cond); - } -- pthread_cond_signal(&my->mc_cond); - pthread_mutex_unlock(&my->mc_mutex); - return (THREAD_RET)0; - #undef DO_WRITE - } - -- /** Tell the writer thread there's a buffer ready to write */ -+ /** Give buffer and/or #MDB_EOF to writer thread, await unused buffer. -+ * -+ * @param[in] my control structure. -+ * @param[in] adjust (1 to hand off 1 buffer) | (MDB_EOF when ending). -+ */ - static int ESECT --mdb_env_cthr_toggle(mdb_copy *my, int st) -+mdb_env_cthr_toggle(mdb_copy *my, int adjust) - { -- int toggle = my->mc_toggle ^ 1; - pthread_mutex_lock(&my->mc_mutex); -- if (my->mc_status) { -- pthread_mutex_unlock(&my->mc_mutex); -- return my->mc_status; -- } -- while (my->mc_new == 1) -- pthread_cond_wait(&my->mc_cond, &my->mc_mutex); -- my->mc_new = st; -- my->mc_toggle = toggle; -+ my->mc_new += adjust; - pthread_cond_signal(&my->mc_cond); -+ while (my->mc_new & 2) /* both buffers in use */ -+ pthread_cond_wait(&my->mc_cond, &my->mc_mutex); - pthread_mutex_unlock(&my->mc_mutex); -- return 0; -+ -+ my->mc_toggle ^= (adjust & 1); -+ /* Both threads reset mc_wlen, to be safe from threading errors */ -+ my->mc_wlen[my->mc_toggle] = 0; -+ return my->mc_error; - } - - /** Depth-first tree traversal for compacting copy. */ - static int ESECT - mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags) - { -- MDB_cursor mc; -- MDB_txn *txn = my->mc_txn; -+ MDB_cursor mc = {0}; - MDB_node *ni; - MDB_page *mo, *mp, *leaf; - char *buf, *ptr; -@@ -8896,10 +9746,10 @@ mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags) - return MDB_SUCCESS; - - mc.mc_snum = 1; -- mc.mc_top = 0; -- mc.mc_txn = txn; -+ mc.mc_txn = my->mc_txn; -+ mc.mc_flags = my->mc_txn->mt_flags & (C_ORIG_RDONLY|C_WRITEMAP); - -- rc = mdb_page_get(my->mc_txn, *pg, &mc.mc_pg[0], NULL); -+ rc = mdb_page_get(&mc, *pg, &mc.mc_pg[0], NULL); - if (rc) - return rc; - rc = mdb_page_search_root(&mc, NULL, MDB_PS_FIRST); -@@ -8943,7 +9793,8 @@ mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags) - } - - memcpy(&pg, NODEDATA(ni), sizeof(pg)); -- rc = mdb_page_get(txn, pg, &omp, NULL); -+ memcpy(NODEDATA(ni), &my->mc_next_pgno, sizeof(pgno_t)); -+ rc = mdb_page_get(&mc, pg, &omp, NULL); - if (rc) - goto done; - if (my->mc_wlen[toggle] >= MDB_WBUF) { -@@ -8965,7 +9816,6 @@ mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags) - goto done; - toggle = my->mc_toggle; - } -- memcpy(NODEDATA(ni), &mo->mp_pgno, sizeof(pgno_t)); - } else if (ni->mn_flags & F_SUBDATA) { - MDB_db db; - -@@ -8994,7 +9844,7 @@ mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags) - again: - ni = NODEPTR(mp, mc.mc_ki[mc.mc_top]); - pg = NODEPGNO(ni); -- rc = mdb_page_get(txn, pg, &mp, NULL); -+ rc = mdb_page_get(&mc, pg, &mp, NULL); - if (rc) - goto done; - mc.mc_top++; -@@ -9043,47 +9893,56 @@ mdb_env_copyfd1(MDB_env *env, HANDLE fd) - { - MDB_meta *mm; - MDB_page *mp; -- mdb_copy my; -+ mdb_copy my = {0}; - MDB_txn *txn = NULL; - pthread_t thr; -- int rc; -+ pgno_t root, new_root; -+ int rc = MDB_SUCCESS; - - #ifdef _WIN32 -- my.mc_mutex = CreateMutex(NULL, FALSE, NULL); -- my.mc_cond = CreateEvent(NULL, FALSE, FALSE, NULL); -+ if (!(my.mc_mutex = CreateMutex(NULL, FALSE, NULL)) || -+ !(my.mc_cond = CreateEvent(NULL, FALSE, FALSE, NULL))) { -+ rc = ErrCode(); -+ goto done; -+ } - my.mc_wbuf[0] = _aligned_malloc(MDB_WBUF*2, env->me_os_psize); -- if (my.mc_wbuf[0] == NULL) -- return errno; -+ if (my.mc_wbuf[0] == NULL) { -+ /* _aligned_malloc() sets errno, but we use Windows error codes */ -+ rc = ERROR_NOT_ENOUGH_MEMORY; -+ goto done; -+ } - #else -- pthread_mutex_init(&my.mc_mutex, NULL); -- pthread_cond_init(&my.mc_cond, NULL); -+ if ((rc = pthread_mutex_init(&my.mc_mutex, NULL)) != 0) -+ return rc; -+ if ((rc = pthread_cond_init(&my.mc_cond, NULL)) != 0) -+ goto done2; - #ifdef HAVE_MEMALIGN - my.mc_wbuf[0] = memalign(env->me_os_psize, MDB_WBUF*2); -- if (my.mc_wbuf[0] == NULL) -- return errno; -+ if (my.mc_wbuf[0] == NULL) { -+ rc = errno; -+ goto done; -+ } - #else -- rc = posix_memalign((void **)&my.mc_wbuf[0], env->me_os_psize, MDB_WBUF*2); -- if (rc) -- return rc; -+ { -+ void *p; -+ if ((rc = posix_memalign(&p, env->me_os_psize, MDB_WBUF*2)) != 0) -+ goto done; -+ my.mc_wbuf[0] = p; -+ } - #endif - #endif - memset(my.mc_wbuf[0], 0, MDB_WBUF*2); - my.mc_wbuf[1] = my.mc_wbuf[0] + MDB_WBUF; -- my.mc_wlen[0] = 0; -- my.mc_wlen[1] = 0; -- my.mc_olen[0] = 0; -- my.mc_olen[1] = 0; - my.mc_next_pgno = NUM_METAS; -- my.mc_status = 0; -- my.mc_new = 1; -- my.mc_toggle = 0; - my.mc_env = env; - my.mc_fd = fd; -- THREAD_CREATE(thr, mdb_env_copythr, &my); -+ rc = THREAD_CREATE(thr, mdb_env_copythr, &my); -+ if (rc) -+ goto done; - - rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn); - if (rc) -- return rc; -+ goto finish; - - mp = (MDB_page *)my.mc_wbuf[0]; - memset(mp, 0, NUM_METAS * env->me_psize); -@@ -9099,57 +9958,64 @@ mdb_env_copyfd1(MDB_env *env, HANDLE fd) - *(MDB_meta *)METADATA(mp) = *mm; - mm = (MDB_meta *)METADATA(mp); - -- /* Count the number of free pages, subtract from lastpg to find -- * number of active pages -- */ -- { -+ /* Set metapage 1 with current main DB */ -+ root = new_root = txn->mt_dbs[MAIN_DBI].md_root; -+ if (root != P_INVALID) { -+ /* Count free pages + freeDB pages. Subtract from last_pg -+ * to find the new last_pg, which also becomes the new root. -+ */ - MDB_ID freecount = 0; - MDB_cursor mc; - MDB_val key, data; - mdb_cursor_init(&mc, txn, FREE_DBI, NULL); - while ((rc = mdb_cursor_get(&mc, &key, &data, MDB_NEXT)) == 0) - freecount += *(MDB_ID *)data.mv_data; -+ if (rc != MDB_NOTFOUND) -+ goto finish; - freecount += txn->mt_dbs[FREE_DBI].md_branch_pages + - txn->mt_dbs[FREE_DBI].md_leaf_pages + - txn->mt_dbs[FREE_DBI].md_overflow_pages; - -- /* Set metapage 1 */ -- mm->mm_last_pg = txn->mt_next_pgno - freecount - 1; -+ new_root = txn->mt_next_pgno - 1 - freecount; -+ mm->mm_last_pg = new_root; - mm->mm_dbs[MAIN_DBI] = txn->mt_dbs[MAIN_DBI]; -- if (mm->mm_last_pg > NUM_METAS-1) { -- mm->mm_dbs[MAIN_DBI].md_root = mm->mm_last_pg; -- mm->mm_txnid = 1; -- } else { -- mm->mm_dbs[MAIN_DBI].md_root = P_INVALID; -- } -+ mm->mm_dbs[MAIN_DBI].md_root = new_root; -+ } else { -+ /* When the DB is empty, handle it specially to -+ * fix any breakage like page leaks from ITS#8174. -+ */ -+ mm->mm_dbs[MAIN_DBI].md_flags = txn->mt_dbs[MAIN_DBI].md_flags; -+ } -+ if (root != P_INVALID || mm->mm_dbs[MAIN_DBI].md_flags) { -+ mm->mm_txnid = 1; /* use metapage 1 */ - } -+ - my.mc_wlen[0] = env->me_psize * NUM_METAS; - my.mc_txn = txn; -- pthread_mutex_lock(&my.mc_mutex); -- while(my.mc_new) -- pthread_cond_wait(&my.mc_cond, &my.mc_mutex); -- pthread_mutex_unlock(&my.mc_mutex); -- rc = mdb_env_cwalk(&my, &txn->mt_dbs[MAIN_DBI].md_root, 0); -- if (rc == MDB_SUCCESS && my.mc_wlen[my.mc_toggle]) -- rc = mdb_env_cthr_toggle(&my, 1); -- mdb_env_cthr_toggle(&my, -1); -- pthread_mutex_lock(&my.mc_mutex); -- while(my.mc_new) -- pthread_cond_wait(&my.mc_cond, &my.mc_mutex); -- pthread_mutex_unlock(&my.mc_mutex); -- THREAD_FINISH(thr); -+ rc = mdb_env_cwalk(&my, &root, 0); -+ if (rc == MDB_SUCCESS && root != new_root) { -+ rc = MDB_INCOMPATIBLE; /* page leak or corrupt DB */ -+ } - -+finish: -+ if (rc) -+ my.mc_error = rc; -+ mdb_env_cthr_toggle(&my, 1 | MDB_EOF); -+ rc = THREAD_FINISH(thr); - mdb_txn_abort(txn); -+ -+done: - #ifdef _WIN32 -- CloseHandle(my.mc_cond); -- CloseHandle(my.mc_mutex); -- _aligned_free(my.mc_wbuf[0]); -+ if (my.mc_wbuf[0]) _aligned_free(my.mc_wbuf[0]); -+ if (my.mc_cond) CloseHandle(my.mc_cond); -+ if (my.mc_mutex) CloseHandle(my.mc_mutex); - #else -+ free(my.mc_wbuf[0]); - pthread_cond_destroy(&my.mc_cond); -+done2: - pthread_mutex_destroy(&my.mc_mutex); -- free(my.mc_wbuf[0]); - #endif -- return rc; -+ return rc ? rc : my.mc_error; - } - - /** Copy environment as-is. */ -@@ -9159,7 +10025,7 @@ mdb_env_copyfd0(MDB_env *env, HANDLE fd) - MDB_txn *txn = NULL; - mdb_mutexref_t wmutex = NULL; - int rc; -- size_t wsize, w3; -+ mdb_size_t wsize, w3; - char *ptr; - #ifdef _WIN32 - DWORD len, w2; -@@ -9220,7 +10086,7 @@ mdb_env_copyfd0(MDB_env *env, HANDLE fd) - - w3 = txn->mt_next_pgno * env->me_psize; - { -- size_t fsize = 0; -+ mdb_size_t fsize = 0; - if ((rc = mdb_fsize(env->me_fd, &fsize))) - goto leave; - if (w3 > fsize) -@@ -9659,11 +10525,19 @@ mdb_drop0(MDB_cursor *mc, int subs) - - /* DUPSORT sub-DBs have no ovpages/DBs. Omit scanning leaves. - * This also avoids any P_LEAF2 pages, which have no nodes. -+ * Also if the DB doesn't have sub-DBs and has no overflow -+ * pages, omit scanning leaves. - */ -- if (mc->mc_flags & C_SUB) -+ if ((mc->mc_flags & C_SUB) || -+ (!subs && !mc->mc_db->md_overflow_pages)) - mdb_cursor_pop(mc); - - mdb_cursor_copy(mc, &mx); -+#ifdef MDB_VL32 -+ /* bump refcount for mx's pages */ -+ for (i=0; imc_snum; i++) -+ mdb_page_get(&mx, mc->mc_pg[i]->mp_pgno, &mx.mc_pg[i], NULL); -+#endif - while (mc->mc_snum > 0) { - MDB_page *mp = mc->mc_pg[mc->mc_top]; - unsigned n = NUMKEYS(mp); -@@ -9674,7 +10548,7 @@ mdb_drop0(MDB_cursor *mc, int subs) - MDB_page *omp; - pgno_t pg; - memcpy(&pg, NODEDATA(ni), sizeof(pg)); -- rc = mdb_page_get(txn, pg, &omp, NULL); -+ rc = mdb_page_get(mc, pg, &omp, NULL); - if (rc != 0) - goto done; - mdb_cassert(mc, IS_OVERFLOW(omp)); -@@ -9682,6 +10556,9 @@ mdb_drop0(MDB_cursor *mc, int subs) - pg, omp->mp_pages); - if (rc) - goto done; -+ mc->mc_db->md_overflow_pages -= omp->mp_pages; -+ if (!mc->mc_db->md_overflow_pages && !subs) -+ break; - } else if (subs && (ni->mn_flags & F_SUBDATA)) { - mdb_xcursor_init1(mc, ni); - rc = mdb_drop0(&mc->mc_xcursor->mx_cursor, 0); -@@ -9689,6 +10566,8 @@ mdb_drop0(MDB_cursor *mc, int subs) - goto done; - } - } -+ if (!subs && !mc->mc_db->md_overflow_pages) -+ goto pop; - } else { - if ((rc = mdb_midl_need(&txn->mt_free_pgs, n)) != 0) - goto done; -@@ -9710,6 +10589,7 @@ mdb_drop0(MDB_cursor *mc, int subs) - /* no more siblings, go back to beginning - * of previous level. - */ -+pop: - mdb_cursor_pop(mc); - mc->mc_ki[0] = 0; - for (i=1; imc_snum; i++) { -@@ -9723,6 +10603,8 @@ mdb_drop0(MDB_cursor *mc, int subs) - done: - if (rc) - txn->mt_flags |= MDB_TXN_ERROR; -+ /* drop refcount for mx's pages */ -+ MDB_CURSOR_UNREF(&mx, 0); - } else if (rc == MDB_NOTFOUND) { - rc = MDB_SUCCESS; - } -@@ -9842,7 +10724,7 @@ mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx) - if (mr[i].mr_pid) { - txnid_t txnid = mr[i].mr_txnid; - sprintf(buf, txnid == (txnid_t)-1 ? -- "%10d %"Z"x -\n" : "%10d %"Z"x %"Z"u\n", -+ "%10d %"Z"x -\n" : "%10d %"Z"x %"Yu"\n", - (int)mr[i].mr_pid, (size_t)mr[i].mr_tid, txnid); - if (first) { - first = 0; -@@ -9947,7 +10829,7 @@ mdb_reader_check0(MDB_env *env, int rlocked, int *dead) - } - for (; j - #include "lmdb.h" - --#ifdef _WIN32 --#define Z "I" --#else --#define Z "z" --#endif -+#define Yu MDB_PRIy(u) - - #define PRINT 1 - static int mode; -@@ -115,7 +111,7 @@ static int dumpit(MDB_txn *txn, MDB_dbi dbi, char *name) - if (name) - printf("database=%s\n", name); - printf("type=btree\n"); -- printf("mapsize=%" Z "u\n", info.me_mapsize); -+ printf("mapsize=%"Yu"\n", info.me_mapsize); - if (info.me_mapaddr) - printf("mapaddr=%p\n", info.me_mapaddr); - printf("maxreaders=%u\n", info.me_maxreaders); -diff --git a/libraries/liblmdb/mdb_load.c b/libraries/liblmdb/mdb_load.c -index 053cc88..73dfe8c 100644 ---- a/libraries/liblmdb/mdb_load.c -+++ b/libraries/liblmdb/mdb_load.c -@@ -25,7 +25,7 @@ static int mode; - - static char *subname = NULL; - --static size_t lineno; -+static mdb_size_t lineno; - static int version; - - static int flags; -@@ -38,11 +38,7 @@ static MDB_envinfo info; - - static MDB_val kbuf, dbuf; - --#ifdef _WIN32 --#define Z "I" --#else --#define Z "z" --#endif -+#define Yu MDB_PRIy(u) - - #define STRLENOF(s) (sizeof(s)-1) - -@@ -73,7 +69,7 @@ static void readhdr(void) - if (!strncmp(dbuf.mv_data, "VERSION=", STRLENOF("VERSION="))) { - version=atoi((char *)dbuf.mv_data+STRLENOF("VERSION=")); - if (version > 3) { -- fprintf(stderr, "%s: line %" Z "d: unsupported VERSION %d\n", -+ fprintf(stderr, "%s: line %"Yu": unsupported VERSION %d\n", - prog, lineno, version); - exit(EXIT_FAILURE); - } -@@ -83,7 +79,7 @@ static void readhdr(void) - if (!strncmp((char *)dbuf.mv_data+STRLENOF("FORMAT="), "print", STRLENOF("print"))) - mode |= PRINT; - else if (strncmp((char *)dbuf.mv_data+STRLENOF("FORMAT="), "bytevalue", STRLENOF("bytevalue"))) { -- fprintf(stderr, "%s: line %" Z "d: unsupported FORMAT %s\n", -+ fprintf(stderr, "%s: line %"Yu": unsupported FORMAT %s\n", - prog, lineno, (char *)dbuf.mv_data+STRLENOF("FORMAT=")); - exit(EXIT_FAILURE); - } -@@ -94,7 +90,7 @@ static void readhdr(void) - subname = strdup((char *)dbuf.mv_data+STRLENOF("database=")); - } else if (!strncmp(dbuf.mv_data, "type=", STRLENOF("type="))) { - if (strncmp((char *)dbuf.mv_data+STRLENOF("type="), "btree", STRLENOF("btree"))) { -- fprintf(stderr, "%s: line %" Z "d: unsupported type %s\n", -+ fprintf(stderr, "%s: line %"Yu": unsupported type %s\n", - prog, lineno, (char *)dbuf.mv_data+STRLENOF("type=")); - exit(EXIT_FAILURE); - } -@@ -104,7 +100,7 @@ static void readhdr(void) - if (ptr) *ptr = '\0'; - i = sscanf((char *)dbuf.mv_data+STRLENOF("mapaddr="), "%p", &info.me_mapaddr); - if (i != 1) { -- fprintf(stderr, "%s: line %" Z "d: invalid mapaddr %s\n", -+ fprintf(stderr, "%s: line %"Yu": invalid mapaddr %s\n", - prog, lineno, (char *)dbuf.mv_data+STRLENOF("mapaddr=")); - exit(EXIT_FAILURE); - } -@@ -112,9 +108,10 @@ static void readhdr(void) - int i; - ptr = memchr(dbuf.mv_data, '\n', dbuf.mv_size); - if (ptr) *ptr = '\0'; -- i = sscanf((char *)dbuf.mv_data+STRLENOF("mapsize="), "%" Z "u", &info.me_mapsize); -+ i = sscanf((char *)dbuf.mv_data+STRLENOF("mapsize="), -+ "%" MDB_SCNy(u), &info.me_mapsize); - if (i != 1) { -- fprintf(stderr, "%s: line %" Z "d: invalid mapsize %s\n", -+ fprintf(stderr, "%s: line %"Yu": invalid mapsize %s\n", - prog, lineno, (char *)dbuf.mv_data+STRLENOF("mapsize=")); - exit(EXIT_FAILURE); - } -@@ -124,7 +121,7 @@ static void readhdr(void) - if (ptr) *ptr = '\0'; - i = sscanf((char *)dbuf.mv_data+STRLENOF("maxreaders="), "%u", &info.me_maxreaders); - if (i != 1) { -- fprintf(stderr, "%s: line %" Z "d: invalid maxreaders %s\n", -+ fprintf(stderr, "%s: line %"Yu": invalid maxreaders %s\n", - prog, lineno, (char *)dbuf.mv_data+STRLENOF("maxreaders=")); - exit(EXIT_FAILURE); - } -@@ -140,12 +137,12 @@ static void readhdr(void) - if (!dbflags[i].bit) { - ptr = memchr(dbuf.mv_data, '=', dbuf.mv_size); - if (!ptr) { -- fprintf(stderr, "%s: line %" Z "d: unexpected format\n", -+ fprintf(stderr, "%s: line %"Yu": unexpected format\n", - prog, lineno); - exit(EXIT_FAILURE); - } else { - *ptr = '\0'; -- fprintf(stderr, "%s: line %" Z "d: unrecognized keyword ignored: %s\n", -+ fprintf(stderr, "%s: line %"Yu": unrecognized keyword ignored: %s\n", - prog, lineno, (char *)dbuf.mv_data); - } - } -@@ -155,7 +152,7 @@ static void readhdr(void) - - static void badend(void) - { -- fprintf(stderr, "%s: line %" Z "d: unexpected end of input\n", -+ fprintf(stderr, "%s: line %"Yu": unexpected end of input\n", - prog, lineno); - } - -@@ -213,7 +210,7 @@ badend: - buf->mv_data = realloc(buf->mv_data, buf->mv_size*2); - if (!buf->mv_data) { - Eof = 1; -- fprintf(stderr, "%s: line %" Z "d: out of memory, line too long\n", -+ fprintf(stderr, "%s: line %"Yu": out of memory, line too long\n", - prog, lineno); - return EOF; - } -@@ -405,7 +402,7 @@ int main(int argc, char *argv[]) - - rc = readline(&data, &dbuf); - if (rc) { -- fprintf(stderr, "%s: line %" Z "d: failed to read key value\n", prog, lineno); -+ fprintf(stderr, "%s: line %"Yu": failed to read key value\n", prog, lineno); - goto txn_abort; - } - -@@ -420,7 +417,7 @@ int main(int argc, char *argv[]) - if (batch == 100) { - rc = mdb_txn_commit(txn); - if (rc) { -- fprintf(stderr, "%s: line %" Z "d: txn_commit: %s\n", -+ fprintf(stderr, "%s: line %"Yu": txn_commit: %s\n", - prog, lineno, mdb_strerror(rc)); - goto env_close; - } -@@ -440,7 +437,7 @@ int main(int argc, char *argv[]) - rc = mdb_txn_commit(txn); - txn = NULL; - if (rc) { -- fprintf(stderr, "%s: line %" Z "d: txn_commit: %s\n", -+ fprintf(stderr, "%s: line %"Yu": txn_commit: %s\n", - prog, lineno, mdb_strerror(rc)); - goto env_close; - } -diff --git a/libraries/liblmdb/mdb_stat.c b/libraries/liblmdb/mdb_stat.c -index a5cda2f..0343a65 100644 ---- a/libraries/liblmdb/mdb_stat.c -+++ b/libraries/liblmdb/mdb_stat.c -@@ -17,11 +17,8 @@ - #include - #include "lmdb.h" - --#ifdef _WIN32 --#define Z "I" --#else --#define Z "z" --#endif -+#define Z MDB_FMT_Z -+#define Yu MDB_PRIy(u) - - static void prstat(MDB_stat *ms) - { -@@ -29,10 +26,10 @@ static void prstat(MDB_stat *ms) - printf(" Page size: %u\n", ms->ms_psize); - #endif - printf(" Tree depth: %u\n", ms->ms_depth); -- printf(" Branch pages: %"Z"u\n", ms->ms_branch_pages); -- printf(" Leaf pages: %"Z"u\n", ms->ms_leaf_pages); -- printf(" Overflow pages: %"Z"u\n", ms->ms_overflow_pages); -- printf(" Entries: %"Z"u\n", ms->ms_entries); -+ printf(" Branch pages: %"Yu"\n", ms->ms_branch_pages); -+ printf(" Leaf pages: %"Yu"\n", ms->ms_leaf_pages); -+ printf(" Overflow pages: %"Yu"\n", ms->ms_overflow_pages); -+ printf(" Entries: %"Yu"\n", ms->ms_entries); - } - - static void usage(char *prog) -@@ -125,11 +122,11 @@ int main(int argc, char *argv[]) - (void)mdb_env_info(env, &mei); - printf("Environment Info\n"); - printf(" Map address: %p\n", mei.me_mapaddr); -- printf(" Map size: %"Z"u\n", mei.me_mapsize); -+ printf(" Map size: %"Yu"\n", mei.me_mapsize); - printf(" Page size: %u\n", mst.ms_psize); -- printf(" Max pages: %"Z"u\n", mei.me_mapsize / mst.ms_psize); -- printf(" Number of pages used: %"Z"u\n", mei.me_last_pgno+1); -- printf(" Last transaction ID: %"Z"u\n", mei.me_last_txnid); -+ printf(" Max pages: %"Yu"\n", mei.me_mapsize / mst.ms_psize); -+ printf(" Number of pages used: %"Yu"\n", mei.me_last_pgno+1); -+ printf(" Last transaction ID: %"Yu"\n", mei.me_last_txnid); - printf(" Max readers: %u\n", mei.me_maxreaders); - printf(" Number of readers used: %u\n", mei.me_numreaders); - } -@@ -156,7 +153,7 @@ int main(int argc, char *argv[]) - if (freinfo) { - MDB_cursor *cursor; - MDB_val key, data; -- size_t pages = 0, *iptr; -+ mdb_size_t pages = 0, *iptr; - - printf("Freelist Status\n"); - dbi = 0; -@@ -176,7 +173,7 @@ int main(int argc, char *argv[]) - pages += *iptr; - if (freinfo > 1) { - char *bad = ""; -- size_t pg, prev; -+ mdb_size_t pg, prev; - ssize_t i, j, span = 0; - j = *iptr++; - for (i = j, prev = 1; --i >= 0; ) { -@@ -187,20 +184,20 @@ int main(int argc, char *argv[]) - pg += span; - for (; i >= span && iptr[i-span] == pg; span++, pg++) ; - } -- printf(" Transaction %"Z"u, %"Z"d pages, maxspan %"Z"d%s\n", -- *(size_t *)key.mv_data, j, span, bad); -+ printf(" Transaction %"Yu", %"Z"d pages, maxspan %"Z"d%s\n", -+ *(mdb_size_t *)key.mv_data, j, span, bad); - if (freinfo > 2) { - for (--j; j >= 0; ) { - pg = iptr[j]; - for (span=1; --j >= 0 && iptr[j] == pg+span; span++) ; -- printf(span>1 ? " %9"Z"u[%"Z"d]\n" : " %9"Z"u\n", -+ printf(span>1 ? " %9"Yu"[%"Z"d]\n" : " %9"Yu"\n", - pg, span); - } - } - } - } - mdb_cursor_close(cursor); -- printf(" Free pages: %"Z"u\n", pages); -+ printf(" Free pages: %"Yu"\n", pages); - } - - rc = mdb_open(txn, subname, 0, &dbi); -diff --git a/libraries/liblmdb/midl.c b/libraries/liblmdb/midl.c -index 5c6d841..9748d8d 100644 ---- a/libraries/liblmdb/midl.c -+++ b/libraries/liblmdb/midl.c -@@ -3,7 +3,7 @@ - /* $OpenLDAP$ */ - /* This work is part of OpenLDAP Software . - * -- * Copyright 2000-2015 The OpenLDAP Foundation. -+ * Copyright 2000-2016 The OpenLDAP Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -354,5 +354,67 @@ int mdb_mid2l_append( MDB_ID2L ids, MDB_ID2 *id ) - return 0; - } - -+#ifdef MDB_VL32 -+unsigned mdb_mid3l_search( MDB_ID3L ids, MDB_ID id ) -+{ -+ /* -+ * binary search of id in ids -+ * if found, returns position of id -+ * if not found, returns first position greater than id -+ */ -+ unsigned base = 0; -+ unsigned cursor = 1; -+ int val = 0; -+ unsigned n = (unsigned)ids[0].mid; -+ -+ while( 0 < n ) { -+ unsigned pivot = n >> 1; -+ cursor = base + pivot + 1; -+ val = CMP( id, ids[cursor].mid ); -+ -+ if( val < 0 ) { -+ n = pivot; -+ -+ } else if ( val > 0 ) { -+ base = cursor; -+ n -= pivot + 1; -+ -+ } else { -+ return cursor; -+ } -+ } -+ -+ if( val > 0 ) { -+ ++cursor; -+ } -+ return cursor; -+} -+ -+int mdb_mid3l_insert( MDB_ID3L ids, MDB_ID3 *id ) -+{ -+ unsigned x, i; -+ -+ x = mdb_mid3l_search( ids, id->mid ); -+ -+ if( x < 1 ) { -+ /* internal error */ -+ return -2; -+ } -+ -+ if ( x <= ids[0].mid && ids[x].mid == id->mid ) { -+ /* duplicate */ -+ return -1; -+ } -+ -+ /* insert id */ -+ ids[0].mid++; -+ for (i=(unsigned)ids[0].mid; i>x; i--) -+ ids[i] = ids[i-1]; -+ ids[x] = *id; -+ -+ return 0; -+} -+#endif /* MDB_VL32 */ -+ - /** @} */ - /** @} */ -diff --git a/libraries/liblmdb/midl.h b/libraries/liblmdb/midl.h -index 2331e78..dc532c4 100644 ---- a/libraries/liblmdb/midl.h -+++ b/libraries/liblmdb/midl.h -@@ -11,7 +11,7 @@ - /* $OpenLDAP$ */ - /* This work is part of OpenLDAP Software . - * -- * Copyright 2000-2015 The OpenLDAP Foundation. -+ * Copyright 2000-2016 The OpenLDAP Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -26,7 +26,7 @@ - #ifndef _MDB_MIDL_H_ - #define _MDB_MIDL_H_ - --#include -+#include "lmdb.h" - - #ifdef __cplusplus - extern "C" { -@@ -42,7 +42,7 @@ extern "C" { - /** A generic unsigned ID number. These were entryIDs in back-bdb. - * Preferably it should have the same size as a pointer. - */ --typedef size_t MDB_ID; -+typedef mdb_size_t MDB_ID; - - /** An IDL is an ID List, a sorted array of IDs. The first - * element of the array is a counter for how many actual -@@ -55,7 +55,11 @@ typedef MDB_ID *MDB_IDL; - /* IDL sizes - likely should be even bigger - * limiting factors: sizeof(ID), thread stack size - */ -+#ifdef MDB_VL32 -+#define MDB_IDL_LOGN 14 /* DB_SIZE is 2^14, UM_SIZE is 2^15 */ -+#else - #define MDB_IDL_LOGN 16 /* DB_SIZE is 2^16, UM_SIZE is 2^17 */ -+#endif - #define MDB_IDL_DB_SIZE (1< +) + +file(WRITE "${CMAKE_BINARY_DIR}/lodepng-c-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/lodepng-c-targets.cmake\")") +install(FILES "${CMAKE_BINARY_DIR}/lodepng-c-config.cmake" DESTINATION "share/lodepng-c/") + +install(TARGETS lodepng-c EXPORT lodepng-c-targets) + +install(EXPORT lodepng-c-targets DESTINATION share/lodepng-c/) + +if(NOT DDISABLE_INSTALL_EXAMPLES) + install(DIRECTORY examples DESTINATION share/lodepng-c/) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES lodepng.h DESTINATION include) +endif() diff --git a/ports/lodepng-c/portfile.cmake b/ports/lodepng-c/portfile.cmake new file mode 100644 index 00000000000000..6593d2598c12ed --- /dev/null +++ b/ports/lodepng-c/portfile.cmake @@ -0,0 +1,33 @@ +if (EXISTS ${CURRENT_INSTALLED_DIR}/share/lodepng/copyright) + message(FATAL_ERROR "${PORT} conflict with lodepng, please remove lodepng before install ${PORT}.") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lvandeve/lodepng + REF e34ac04553e51a6982ae234d98ce6b76dd57a6a1 + SHA512 ab79fb2c6403e5d7bdf0b94a3f93f6513889eda8e6b74fb2b569fbc6f95fb79474654818cb0e71eff88214ca7c42ebd7c95f734a2faa77259fe06bfddcb6967a + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON + -DDDISABLE_INSTALL_EXAMPLES=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Moves all .cmake files from /debug/share/lodepng/ to /share/lodepng/ +vcpkg_fixup_cmake_targets() + +file(INSTALL "${SOURCE_PATH}/lodepng.h" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/lodepng-c/vcpkg.json b/ports/lodepng-c/vcpkg.json new file mode 100644 index 00000000000000..3e027e6328b3d5 --- /dev/null +++ b/ports/lodepng-c/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "lodepng-c", + "version-date": "2021-03-01", + "port-version": 1, + "description": "PNG encoder and decoder in C", + "homepage": "https://github.com/lvandeve/lodepng" +} diff --git a/ports/lodepng/CMakeLists.txt b/ports/lodepng/CMakeLists.txt index 5da3aed3d6a79a..1cf1865c067b02 100644 --- a/ports/lodepng/CMakeLists.txt +++ b/ports/lodepng/CMakeLists.txt @@ -1,31 +1,17 @@ cmake_minimum_required(VERSION 3.8.0) project(lodepng) -if(MSVC) - add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) -endif() - -include_directories(".") - add_library(lodepng lodepng.cpp lodepng_util.cpp) +target_include_directories(lodepng PUBLIC + $ +) -# add_executable(pngdetail pngdetail.cpp) - -# target_link_libraries(pngdetail lodepng) +file(WRITE "${CMAKE_BINARY_DIR}/lodepng-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/lodepng-targets.cmake\")") +install(FILES "${CMAKE_BINARY_DIR}/lodepng-config.cmake" DESTINATION "share/lodepng/") -install( - TARGETS lodepng - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) +install(TARGETS lodepng EXPORT lodepng-targets) -# if(NOT DISABLE_INSTALL_TOOLS) -# install ( -# TARGETS pngdetail -# RUNTIME DESTINATION tools/lodepng -# ) -# endif() +install(EXPORT lodepng-targets DESTINATION share/lodepng/) if(NOT DDISABLE_INSTALL_EXAMPLES) install(DIRECTORY examples DESTINATION share/lodepng/) diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL deleted file mode 100644 index 16d0cb794309e4..00000000000000 --- a/ports/lodepng/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: lodepng -Version: 2018-09-18-2 -Homepage: https://github.com/lvandeve/lodepng -Description: PNG encoder and decoder in C and C++ diff --git a/ports/lodepng/algorithm.patch b/ports/lodepng/algorithm.patch deleted file mode 100644 index 796bdfc66c049a..00000000000000 --- a/ports/lodepng/algorithm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lodepng_util.cpp b/lodepng_util.cpp -index 4b571bb..58ba81a 100644 ---- a/lodepng_util.cpp -+++ b/lodepng_util.cpp -@@ -26,6 +26,7 @@ freely, subject to the following restrictions: - #include "lodepng_util.h" - #include - #include "math.h" -+#include - - namespace lodepng - { diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake index 83df5a5e01dcd0..2075d678993e1c 100644 --- a/ports/lodepng/portfile.cmake +++ b/ports/lodepng/portfile.cmake @@ -1,14 +1,15 @@ -include(vcpkg_common_functions) +if (EXISTS ${CURRENT_INSTALLED_DIR}/share/lodepng-c/copyright) + message(FATAL_ERROR "${PORT} conflict with lodepng-c, please remove lodepng-c before install ${PORT}.") +endif() vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lvandeve/lodepng - REF ceb6b482b5a16d2bb3d6b3c735ca2b16322780d5 - SHA512 5293f6c629ff006410c9180cabac5f4de7643f04ec6c3d7ff46c1b09317ff9156d28ed4344a46db0b3a06937349590aa8958722ba0432178a347da58736cbf41 + REF e34ac04553e51a6982ae234d98ce6b76dd57a6a1 + SHA512 ab79fb2c6403e5d7bdf0b94a3f93f6513889eda8e6b74fb2b569fbc6f95fb79474654818cb0e71eff88214ca7c42ebd7c95f734a2faa77259fe06bfddcb6967a HEAD_REF master - PATCHES algorithm.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -25,7 +26,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lodepng) +# Moves all .cmake files from /debug/share/lodepng/ to /share/lodepng/ +vcpkg_fixup_cmake_targets() - -file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/lodepng RENAME copyright) +file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/lodepng/vcpkg.json b/ports/lodepng/vcpkg.json new file mode 100644 index 00000000000000..7a004463c55631 --- /dev/null +++ b/ports/lodepng/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "lodepng", + "version-string": "2020-03-15", + "port-version": 1, + "description": "PNG encoder and decoder in C++", + "homepage": "https://github.com/lvandeve/lodepng" +} diff --git a/ports/log4cplus/CONTROL b/ports/log4cplus/CONTROL deleted file mode 100644 index 99771644a14b04..00000000000000 --- a/ports/log4cplus/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: log4cplus -Version: 2.0.4-1 -Homepage: https://github.com/log4cplus/log4cplus -Description: A simple to use C++ logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration -Build-Depends: catch diff --git a/ports/log4cplus/fix-usage-error.patch b/ports/log4cplus/fix-usage-error.patch deleted file mode 100644 index 4a2753ffc10100..00000000000000 --- a/ports/log4cplus/fix-usage-error.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/qt4debugappender/CMakeLists.txt b/qt4debugappender/CMakeLists.txt -index 2f28be5..0a98704 100644 ---- a/qt4debugappender/CMakeLists.txt -+++ b/qt4debugappender/CMakeLists.txt -@@ -4,15 +4,17 @@ set (qt4debugappender_sources - if (${BUILD_SHARED_LIBS}) - add_definitions (-D${log4cplus}_EXPORTS) - endif () --if (UNICODE) -- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS) --endif (UNICODE) - - find_package (Qt4 REQUIRED) - include (${QT_USE_FILE}) - - set (qt4debugappender log4cplusqt4debugappender${log4cplus_postfix}) - add_library (${qt4debugappender} ${qt4debugappender_sources}) -+if (UNICODE) -+ target_compile_definitions (${qt4debugappender} PUBLIC UNICODE) -+ target_compile_definitions (${qt4debugappender} PUBLIC _UNICODE) -+ add_definitions (-UMBCS -U_MBCS) -+endif (UNICODE) - target_link_libraries (${qt4debugappender} - ${log4cplus} - ${QT_LIBRARIES} -diff --git a/qt5debugappender/CMakeLists.txt b/qt5debugappender/CMakeLists.txt -index 9570e76..de6fecf 100644 ---- a/qt5debugappender/CMakeLists.txt -+++ b/qt5debugappender/CMakeLists.txt -@@ -4,15 +4,17 @@ set (qt5debugappender_sources - if (${BUILD_SHARED_LIBS}) - add_definitions (-D${log4cplus}_EXPORTS) - endif () --if (UNICODE) -- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS) --endif (UNICODE) - - find_package (Qt5Core REQUIRED) - #include (${QT_USE_FILE}) - - set (qt5debugappender log4cplusqt5debugappender${log4cplus_postfix}) - add_library (${qt5debugappender} ${qt5debugappender_sources}) -+if (UNICODE) -+ target_compile_definitions (${qt5debugappender} PUBLIC UNICODE) -+ target_compile_definitions (${qt5debugappender} PUBLIC _UNICODE) -+ add_definitions (-UMBCS -U_MBCS) -+endif (UNICODE) - target_link_libraries (${qt5debugappender} - ${log4cplus} - ${Qt5Widgets_LIBRARIES} -diff --git a/simpleserver/CMakeLists.txt b/simpleserver/CMakeLists.txt -index e535120..5202f42 100644 ---- a/simpleserver/CMakeLists.txt -+++ b/simpleserver/CMakeLists.txt -@@ -1,14 +1,15 @@ --if (UNICODE) -- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS) --endif (UNICODE) -- - message (STATUS "Threads: ${CMAKE_THREAD_LIBS_INIT}") -- - set (loggingserver_sources loggingserver.cxx) - - message (STATUS "Sources: ${loggingserver_sources}") - --add_executable (loggingserver ${loggingserver_sources}) --target_link_libraries (loggingserver ${log4cplus}) -+set (loggingserver loggingserver${log4cplus_postfix}) -+add_executable (${loggingserver} ${loggingserver_sources}) -+if (UNICODE) -+ target_compile_definitions (${loggingserver} PUBLIC UNICODE) -+ target_compile_definitions (${loggingserver} PUBLIC _UNICODE) -+ add_definitions (-UMBCS -U_MBCS) -+endif (UNICODE) -+target_link_libraries (${loggingserver} ${log4cplus}) - --install(TARGETS loggingserver DESTINATION ${CMAKE_INSTALL_BINDIR}) -+install(TARGETS ${loggingserver} DESTINATION ${CMAKE_INSTALL_BINDIR}) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index b7b7ad8..91e0c63 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -67,9 +67,6 @@ endif () - - # Define _GNU_SOURCE so that functions like `pipe2()` are visible. - add_definitions (-D_GNU_SOURCE=1) --if (UNICODE) -- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS) --endif (UNICODE) - if (WIN32) - add_definitions (-DMINGW_HAS_SECURE_API=1) - add_definitions (-D_WIN32_WINNT=${_WIN32_WINNT}) -@@ -85,6 +82,12 @@ endif (WIN32) - - add_library (${log4cplus} ${log4cplus_sources}) - -+if (UNICODE) -+ target_compile_definitions (${log4cplus} PUBLIC UNICODE) -+ target_compile_definitions (${log4cplus} PUBLIC _UNICODE) -+ add_definitions (-UMBCS -U_MBCS) -+endif (UNICODE) -+ - set (log4cplus_LIBS ${CMAKE_THREAD_LIBS_INIT}) - if (LIBRT) - list (APPEND log4cplus_LIBS ${LIBRT}) diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake index b2c1035da0b5c9..975e030d04fd80 100644 --- a/ports/log4cplus/portfile.cmake +++ b/ports/log4cplus/portfile.cmake @@ -1,34 +1,43 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO log4cplus/log4cplus - REF REL_2_0_4 - SHA512 194e37b8de7be377dabe911d1cec831de41f5ce14dd617b5333739a7ab8dbc3061aa24351abe811588db507aa1563a637023b26684fb21bbfc88d24b4e4ce062 + REF 9d00f7d10f2507f68f9ab5fea8b842735d9c6cfe # REL_2_0_5 + SHA512 b64a1d3a60584b2ba3a58470a0b0ec4c22eb0c054c0ef8ef3808fcba5604860fbd5b2d96148939ea15d3bf2ff1e40e684710dc81b57b73232851a486251f648d HEAD_REF master - PATCHES fix-usage-error.patch ) -set(THREADPOOL_REF cc0b6371d3963f7028c2da5fc007733f9f3bf205) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/log4cplus/ThreadPool/archive/${THREADPOOL_REF}.tar.gz" - FILENAME "log4cplus-threadpool-${THREADPOOL_REF}.tar.gz" +vcpkg_from_github( + OUT_SOURCE_PATH THREADPOOL_SOURCE_PATH + REPO log4cplus/ThreadPool + REF cc0b6371d3963f7028c2da5fc007733f9f3bf205 SHA512 ad4d287c1f83acac4c127136bc92489c43bb5293613dc54b878b8e75a8583f7eefda6434d09789dad47b87a5d38f10a07a746d42d299410c11f2dbcce8af3012 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file( COPY - ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/COPYING - ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/example.cpp - ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/README.md - ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/ThreadPool.h + ${THREADPOOL_SOURCE_PATH}/COPYING + ${THREADPOOL_SOURCE_PATH}/example.cpp + ${THREADPOOL_SOURCE_PATH}/README.md + ${THREADPOOL_SOURCE_PATH}/ThreadPool.h DESTINATION ${SOURCE_PATH}/threadpool ) +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + unicode UNICODE +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DLOG4CPLUS_BUILD_TESTING=OFF -DLOG4CPLUS_BUILD_LOGGINGSERVER=OFF -DWITH_UNIT_TESTS=OFF + OPTIONS + -DLOG4CPLUS_BUILD_TESTING=OFF + -DLOG4CPLUS_BUILD_LOGGINGSERVER=OFF + -DWITH_UNIT_TESTS=OFF + -DLOG4CPLUS_ENABLE_DECORATED_LIBRARY_NAME=OFF + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -41,5 +50,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/log4cplus) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/log4cplus/LICENSE ${CURRENT_PACKAGES_DIR}/share/log4cplus/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/log4cplus/vcpkg.json b/ports/log4cplus/vcpkg.json new file mode 100644 index 00000000000000..e80dd9e46f0d45 --- /dev/null +++ b/ports/log4cplus/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "log4cplus", + "version-string": "2.0.5", + "port-version": 2, + "description": "A simple to use C++ logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration", + "homepage": "https://github.com/log4cplus/log4cplus", + "dependencies": [ + "catch" + ], + "features": { + "unicode": { + "description": "Unicode logger" + } + } +} diff --git a/ports/log4cpp/Fix-StaticSupport.patch b/ports/log4cpp/Fix-StaticSupport.patch new file mode 100644 index 00000000000000..8053b4ce501373 --- /dev/null +++ b/ports/log4cpp/Fix-StaticSupport.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 529c18e..beace9e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,7 +21,11 @@ SET(LOG4CPP_LIBS) + + IF (WIN32) + SET (CMAKE_DEBUG_POSTFIX "d") +- LIST(APPEND LOG4CPP_CFLAGS -D_CRT_SECURE_NO_WARNINGS -DLOG4CPP_HAS_DLL -DLOG4CPP_BUILD_DLL ) ++ IF (BUILD_SHARED_LIBS) ++ LIST(APPEND LOG4CPP_CFLAGS -D_CRT_SECURE_NO_WARNINGS -DLOG4CPP_HAS_DLL -DLOG4CPP_BUILD_DLL ) ++ ELSE () ++ LIST(APPEND LOG4CPP_CFLAGS -D_CRT_SECURE_NO_WARNINGS ) ++ ENDIF () + ELSE (WIN32) + IF (APPLE) + # LIST(APPEND LOG4CPP_CFLAGS -DLOG4CPP_HAVE_SSTREAM) +@@ -32,7 +36,7 @@ ENDIF (WIN32) + + SET ( LOG4CPP_LIBRARY_NAME "orocos-log4cpp" ) + +-ADD_LIBRARY ( ${LOG4CPP_LIBRARY_NAME} SHARED ++ADD_LIBRARY ( ${LOG4CPP_LIBRARY_NAME} + src/Appender.cpp + src/AppenderSkeleton.cpp + src/AppendersFactory.cpp diff --git a/ports/log4cpp/fix-export-targets.patch b/ports/log4cpp/fix-export-targets.patch new file mode 100644 index 00000000000000..30b5320cde90ae --- /dev/null +++ b/ports/log4cpp/fix-export-targets.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 19767a0..59dbf6c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -161,11 +161,13 @@ INSTALL ( + ) + + INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME} ++ EXPORT log4cpp-targets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin) + + INSTALL(FILES package.xml DESTINATION share/log4cpp) ++INSTALL(EXPORT log4cpp-targets NAMESPACE log4cpp:: DESTINATION share/log4cpp) + + ########################################################### + # DOCUMENTATION diff --git a/ports/log4cpp/fix-includepath.patch b/ports/log4cpp/fix-includepath.patch new file mode 100644 index 00000000000000..2fdac90fe82c12 --- /dev/null +++ b/ports/log4cpp/fix-includepath.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index beace9e..c8264ec 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,7 +136,7 @@ SET(prefix "${CMAKE_INSTALL_PREFIX}") + SET(exec_prefix "\${prefix}") + SET(log4cpp_cflags "") + SET(log4cpp_libs "${LOG4CPP_LIBS}") +-SET(includedir "\${prefix}/include/orocos") ++SET(includedir "\${prefix}/include") + SET(libdir "\${prefix}/lib") + CONFIGURE_FILE(log4cpp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/orocos-log4cpp.pc @ONLY) + +@@ -147,7 +147,7 @@ INSTALL( + + INSTALL ( + DIRECTORY include/log4cpp +- DESTINATION include/orocos ++ DESTINATION include + PATTERN "config.h.in" EXCLUDE + PATTERN ".svn" EXCLUDE + PATTERN "*.am" EXCLUDE +@@ -157,7 +157,7 @@ INSTALL ( + + INSTALL ( + FILES ${CMAKE_CURRENT_BINARY_DIR}/include/log4cpp/config.h +- DESTINATION include/orocos/log4cpp ++ DESTINATION include/log4cpp + ) + + INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME} diff --git a/ports/log4cpp/fix-install-targets.patch b/ports/log4cpp/fix-install-targets.patch new file mode 100644 index 00000000000000..49cdedf1d926cd --- /dev/null +++ b/ports/log4cpp/fix-install-targets.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8db2287..529c18e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -159,7 +159,7 @@ INSTALL ( + INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME} + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +- RUNTIME DESTINATION lib) ++ RUNTIME DESTINATION bin) + + INSTALL(FILES package.xml DESTINATION share/log4cpp) + diff --git a/ports/log4cpp/log4cpp-config.in.cmake b/ports/log4cpp/log4cpp-config.in.cmake new file mode 100644 index 00000000000000..cdecd4b70b64ae --- /dev/null +++ b/ports/log4cpp/log4cpp-config.in.cmake @@ -0,0 +1,7 @@ + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/log4cpp-targets.cmake) diff --git a/ports/log4cpp/portfile.cmake b/ports/log4cpp/portfile.cmake new file mode 100644 index 00000000000000..9c9bc600e72015 --- /dev/null +++ b/ports/log4cpp/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO orocos-toolchain/log4cpp + REF v2.9.1 + SHA512 5bd222c820a15c5d96587ac9fe864c3e2dc0fbce8389692be8dd41553ac0308002ad8d6f4ef3ef10af1d796f8ded410788d1a5d22f15505fac639da3f73e3518 + HEAD_REF master + PATCHES + fix-install-targets.patch + Fix-StaticSupport.patch + fix-includepath.patch + fix-export-targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pkgconfig TARGET_PATH share/${PORT}) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/log4cpp-config.in.cmake + ${CURRENT_PACKAGES_DIR}/share/${PORT}/log4cpp-config.cmake + @ONLY +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/log4cpp/vcpkg.json b/ports/log4cpp/vcpkg.json new file mode 100644 index 00000000000000..18c56ff490eabe --- /dev/null +++ b/ports/log4cpp/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "log4cpp", + "version-string": "2.9.1", + "port-version": 5, + "description": "Log4cpp is library of C++ classes for flexible logging to files, syslog, IDSA and other destinations. It is modeled after the Log4j Java library, staying as close to their API as is reasonable.", + "homepage": "https://github.com/orocos-toolchain/log4cpp", + "supports": "!uwp" +} diff --git a/ports/log4cxx/expat.patch b/ports/log4cxx/expat.patch new file mode 100644 index 00000000000000..250035021d63dd --- /dev/null +++ b/ports/log4cxx/expat.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d30a71b..3ecf5f0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,6 +23,9 @@ find_package(APR REQUIRED) + # Find Apache Runtime Utilities + find_package(APR-Util REQUIRED) + ++# Find expat for XML parsing ++find_package(expat CONFIG REQUIRED) ++ + # Building + add_subdirectory(src) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3e0cb17..9a450b7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,7 +1,7 @@ + add_subdirectory(main) + target_compile_definitions(log4cxx PRIVATE ${LOG4CXX_COMPILE_DEFINITIONS} ${APR_COMPILE_DEFINITIONS} ${APR_UTIL_COMPILE_DEFINITIONS} ) + target_include_directories(log4cxx INTERFACE $ PRIVATE ${APR_INCLUDE_DIR} ${APR_UTIL_INCLUDE_DIR}) +-target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} ${XMLLIB_LIBRARIES} ${APR_LIBRARIES} ${APR_SYSTEM_LIBS}) ++target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} expat::expat ${APR_LIBRARIES} ${APR_SYSTEM_LIBS}) + if(WIN32) + # The ODBC appender is always enabled in the Windows configuration + target_link_libraries(log4cxx PRIVATE odbc32.lib) +diff --git a/src/cmake/FindAPR-Util.cmake b/src/cmake/FindAPR-Util.cmake +index bb4e951..75093d8 100644 +--- a/src/cmake/FindAPR-Util.cmake ++++ b/src/cmake/FindAPR-Util.cmake +@@ -38,7 +38,6 @@ if(EXISTS ${APR_UTIL_CONFIG_EXECUTABLE}) + _apu_invoke(_apu_util_link_args --link-ld) + string(REGEX MATCH "-L([^ ]+)" _apu_util_L_flag ${_apu_util_link_args}) + find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1.a PATHS "${CMAKE_MATCH_1}") +- _apu_invoke(XMLLIB_LIBRARIES --libs) + set(APR_UTIL_COMPILE_DEFINITIONS APU_DECLARE_STATIC) + else() + _apu_invoke(APR_UTIL_LIBRARIES --link-ld) +@@ -48,8 +47,6 @@ else() + if (APU_STATIC OR NOT BUILD_SHARED_LIBS) + set(APR_UTIL_COMPILE_DEFINITIONS APU_DECLARE_STATIC) + find_library(APR_UTIL_LIBRARIES NAMES aprutil-1) +- find_library(XMLLIB_LIBRARIES NAMES libexpat) +- find_program(XMLLIB_DLL libexpat.dll) + else() + find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1) + find_program(APR_UTIL_DLL libaprutil-1.dll) +diff --git a/src/test/cpp/xml/CMakeLists.txt b/src/test/cpp/xml/CMakeLists.txt +index bddfe48..138c489 100644 +--- a/src/test/cpp/xml/CMakeLists.txt ++++ b/src/test/cpp/xml/CMakeLists.txt +@@ -4,5 +4,5 @@ add_executable(xmltests + xmllayouttestcase + ) + +-target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} ${XMLLIB_LIBRARIES}) ++target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} expat::expat) + set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} xmltests PARENT_SCOPE) diff --git a/ports/log4cxx/linux.patch b/ports/log4cxx/linux.patch new file mode 100644 index 00000000000000..01c51c21880f3a --- /dev/null +++ b/ports/log4cxx/linux.patch @@ -0,0 +1,17 @@ +diff --git a/src/cmake/FindAPR.cmake b/src/cmake/FindAPR.cmake +index a204ece..4d2b48d 100644 +--- a/src/cmake/FindAPR.cmake ++++ b/src/cmake/FindAPR.cmake +@@ -45,7 +45,11 @@ if(EXISTS ${APR_CONFIG_EXECUTABLE}) + else() + find_path(APR_INCLUDE_DIR apr.h PATH_SUFFIXES apr-1) + if (APR_STATIC OR NOT BUILD_SHARED_LIBS) +- set(APR_SYSTEM_LIBS ws2_32 mswsock rpcrt4) ++ if(WIN32) ++ set(APR_SYSTEM_LIBS ws2_32 mswsock rpcrt4) ++ else() ++ set(APR_SYSTEM_LIBS pthread) ++ endif() + set(APR_COMPILE_DEFINITIONS APR_DECLARE_STATIC) + find_library(APR_LIBRARIES NAMES apr-1) + else() diff --git a/ports/log4cxx/pkgconfig.patch b/ports/log4cxx/pkgconfig.patch new file mode 100644 index 00000000000000..06eb7c00e73da0 --- /dev/null +++ b/ports/log4cxx/pkgconfig.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 523fbd9..0467470 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,7 +66,7 @@ if(UNIX) + ) + + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx.pc" +- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + endif(UNIX) + + # Support for find_package(log4cxx) in consuming CMake projects using diff --git a/ports/log4cxx/portfile.cmake b/ports/log4cxx/portfile.cmake new file mode 100644 index 00000000000000..7292c0007295f4 --- /dev/null +++ b/ports/log4cxx/portfile.cmake @@ -0,0 +1,45 @@ +set(VERSION 0.11.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://archive.apache.org/dist/logging/log4cxx/${VERSION}/apache-log4cxx-${VERSION}.tar.gz" + FILENAME "apache-log4cxx-${VERSION}.tar.gz" + SHA512 f8aa37c9c094e7a4d6ca92dff13c032f69f1e078c51ea55e284fcb931c13256b08950af3ea6eaf7a12282240f6073e9acab19bfe217f88dbd62a5d2360f3fbdd +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + expat.patch + linux.patch + pkgconfig.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLOG4CXX_INSTALL_PDB=OFF # Installing pdbs failed on debug static. So, disable it and let vcpkg_copy_pdbs() do it + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/log4cxx) + +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + vcpkg_fixup_pkgconfig() +endif() + +file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/log4cxxConfig.cmake _contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/log4cxxConfig.cmake +"include(CMakeFindDependencyMacro) +find_dependency(expat CONFIG) +${_contents}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/log4cxx/vcpkg.json b/ports/log4cxx/vcpkg.json new file mode 100644 index 00000000000000..c10ca296041510 --- /dev/null +++ b/ports/log4cxx/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "log4cxx", + "version-string": "0.11.0", + "port-version": 3, + "description": "Apache log4cxx is a logging framework for C++ patterned after Apache log4j, which uses Apache Portable Runtime for most platform-specific code and should be usable on any platform supported by APR", + "homepage": "https://logging.apache.org/log4cxx", + "supports": "!uwp", + "dependencies": [ + "apr", + "apr-util", + "expat" + ] +} diff --git a/ports/loguru/CMakeLists.txt b/ports/loguru/CMakeLists.txt new file mode 100644 index 00000000000000..3688e11210c56c --- /dev/null +++ b/ports/loguru/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.12) + +project(loguru CXX) +set(CMAKE_CXX_STANDARD 11) + +option(INSTALL_HEADERS "Install header files" ON) + +set(loguru_headers + loguru.hpp +) +set(loguru_sources + loguru.cpp +) + +add_library(loguru ${loguru_sources}) +target_include_directories(loguru PUBLIC + $ + $) + +if(UNIX) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + target_link_libraries(loguru PUBLIC Threads::Threads ${CMAKE_DL_LIBS}) +endif() + +set(LOGURU_INCLUDE_INSTALL_DIR include/loguru CACHE PATH "Install directory for headers") +if(INSTALL_HEADERS) + install(FILES ${loguru_headers} DESTINATION ${LOGURU_INCLUDE_INSTALL_DIR}) +endif() + +set(INCLUDE_INSTALL_DIR ${LOGURU_INCLUDE_INSTALL_DIR}) + +include(CMakePackageConfigHelpers) +configure_package_config_file(loguruConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/loguruConfig.cmake + INSTALL_DESTINATION share/loguru + NO_CHECK_REQUIRED_COMPONENTS_MACRO + PATH_VARS INCLUDE_INSTALL_DIR) + +install(TARGETS loguru + EXPORT loguruTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/loguruConfig.cmake DESTINATION share/loguru) +install(EXPORT loguruTargets DESTINATION share/loguru) diff --git a/ports/loguru/CONTROL b/ports/loguru/CONTROL deleted file mode 100644 index baa9503b09fc11..00000000000000 --- a/ports/loguru/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: loguru -Version: v2.0.0 -Description: A lightweight and flexible C++ logging library -Build-Depends: \ No newline at end of file diff --git a/ports/loguru/loguruConfig.cmake.in b/ports/loguru/loguruConfig.cmake.in new file mode 100644 index 00000000000000..b75b189e0484e0 --- /dev/null +++ b/ports/loguru/loguruConfig.cmake.in @@ -0,0 +1,9 @@ +@PACKAGE_INIT@ + +if(UNIX) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +set_and_check(loguru_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +include("${CMAKE_CURRENT_LIST_DIR}/loguruTargets.cmake") diff --git a/ports/loguru/portfile.cmake b/ports/loguru/portfile.cmake index 80efb0eead1da4..236c4deb2acaee 100644 --- a/ports/loguru/portfile.cmake +++ b/ports/loguru/portfile.cmake @@ -1,12 +1,30 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO emilk/loguru - REF v2.0.0 - SHA512 d6358f843689d10a44dc7bf590305cbfb89727e26d971ca4fe439e5468cdb7bcee2aa858368250e9654fb5ecebf63bca9742451881dae78068fecb18f279d988 + REF 9c2fea0d4530657f23259be4132f8101c98b579e #v2.1.0 + SHA512 49eebf8648f9d29273af76dca0a4e49155daa3664e98979df005e64eb0fa9f4eeb4228245327d469772c51076571acbe39a644eba531444d8676d9709a7e3914 HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/loguru.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/loguru) -file(COPY ${CURRENT_PORT_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/loguru) \ No newline at end of file +if(VCPKG_TARGET_IS_WINDOWS) + file(INSTALL ${SOURCE_PATH}/loguru.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/loguru) + file(INSTALL ${SOURCE_PATH}/loguru.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/loguru) +endif() + +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + configure_file(${CMAKE_CURRENT_LIST_DIR}/loguruConfig.cmake.in ${SOURCE_PATH}/loguruConfig.cmake.in COPYONLY) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + ) + + vcpkg_install_cmake() + vcpkg_fixup_cmake_targets() + vcpkg_copy_pdbs() +endif() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/loguru/vcpkg.json b/ports/loguru/vcpkg.json new file mode 100644 index 00000000000000..b29fb65c8bf2c8 --- /dev/null +++ b/ports/loguru/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "loguru", + "version-string": "2.1.0", + "port-version": 2, + "description": "A lightweight and flexible C++ logging library", + "homepage": "https://github.com/emilk/loguru" +} diff --git a/ports/lpeg/CMakeLists.txt b/ports/lpeg/CMakeLists.txt index f5a72fad4ee0c1..993e570d73c56d 100644 --- a/ports/lpeg/CMakeLists.txt +++ b/ports/lpeg/CMakeLists.txt @@ -1,28 +1,24 @@ -cmake_minimum_required(VERSION 3.0) -project(lpeg) - -if(NOT WIN32) - message(FATAL_ERROR "Written for windows only") -endif() - -find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) -find_library(LUA_LIBRARY lua) -set(LPEG_INCLUDES ${LUA_INCLUDE_DIR}) -set(LPEG_LIBRARIES ${LUA_LIBRARY}) - -add_library(lpeg - lpvm.c - lptree.c - lpprint.c - lpcap.c - lpcode.c - lpeg.def) - -target_include_directories(lpeg PRIVATE ${LPEG_INCLUDES}) -target_link_libraries(lpeg PRIVATE ${LPEG_LIBRARIES}) - -install(TARGETS lpeg - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -install(FILES re.lua DESTINATION share/lua) +cmake_minimum_required(VERSION 3.0) +project(lpeg) + +find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) +find_library(LUA_LIBRARY lua) +set(LPEG_INCLUDES ${LUA_INCLUDE_DIR}) +set(LPEG_LIBRARIES ${LUA_LIBRARY}) + +add_library(lpeg + lpvm.c + lptree.c + lpprint.c + lpcap.c + lpcode.c + lpeg.def) + +target_include_directories(lpeg PRIVATE ${LPEG_INCLUDES}) +target_link_libraries(lpeg PRIVATE ${LPEG_LIBRARIES}) + +install(TARGETS lpeg + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +install(FILES re.lua DESTINATION share/lua) diff --git a/ports/lpeg/CONTROL b/ports/lpeg/CONTROL deleted file mode 100644 index c779b2888073da..00000000000000 --- a/ports/lpeg/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: lpeg -Version: 1.0.1-3 -Homepage: https://www.inf.puc-rio.br/~roberto/lpeg -Description: LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). -Build-Depends: lua diff --git a/ports/lpeg/portfile.cmake b/ports/lpeg/portfile.cmake index 43cc89d931a8c4..24d77f00b1c57a 100644 --- a/ports/lpeg/portfile.cmake +++ b/ports/lpeg/portfile.cmake @@ -1,16 +1,15 @@ -#cmake-only scripts -include(vcpkg_common_functions) - -set(LPEG_VER 1.0.1) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lpeg-${LPEG_VER}) +set(LPEG_VER 1.0.2) vcpkg_download_distfile(ARCHIVE URLS "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-${LPEG_VER}.tar.gz" FILENAME "lpeg-${LPEG_VER}.tar.gz" - SHA512 7b43fbee7eff443000986684bc56bba6d2796a31cf860740746c70e155bdea1b62a46b93f97e2747e3ef0f63e965148778ac2985d0f2d83e1e37ec4ebbabf4aa + SHA512 110527ddf9f8e5e8a80ef0ae8847c8ba8cd2597dba3bfe2865cba9af60daafbb885f21e74231952f5ab793d021e050b482066a821c6954d52090a5eae77e9814 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/lpeg.def DESTINATION ${SOURCE_PATH}) @@ -26,7 +25,7 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(INSTALL ${SOURCE_PATH}/lpeg.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/lpeg RENAME copyright) +file(INSTALL ${SOURCE_PATH}/lpeg.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) # Allow empty include directory set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/lpeg/vcpkg.json b/ports/lpeg/vcpkg.json new file mode 100644 index 00000000000000..7e4c8b30379da4 --- /dev/null +++ b/ports/lpeg/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "lpeg", + "version-string": "1.0.2", + "port-version": 2, + "description": "LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs).", + "homepage": "https://www.inf.puc-rio.br/~roberto/lpeg", + "dependencies": [ + "lua" + ] +} diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index dd0a1de3590043..8e93eb1ab7c6a4 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -21,7 +21,7 @@ src/lundump.h src/lvm.h src/lzio.h # Build Libraries SET (SRC_LIBLUA -src/lapi.c src/lauxlib.c src/lbaselib.c src/lbitlib.c src/lcode.c src/lcorolib.c +src/lapi.c src/lauxlib.c src/lbaselib.c src/lcode.c src/lcorolib.c src/lctype.c src/ldblib.c src/ldebug.c src/ldo.c src/ldump.c src/lfunc.c src/lgc.c src/linit.c src/liolib.c src/llex.c src/lmathlib.c src/lmem.c src/loadlib.c src/lobject.c src/lopcodes.c src/loslib.c src/lparser.c src/lstate.c src/lstring.c src/lstrlib.c @@ -52,9 +52,7 @@ ENDIF () #DLL ADD_LIBRARY ( lua ${SRC_LIBLUA} ) -IF (COMPILE_AS_CPP) - SET_TARGET_PROPERTIES(lua PROPERTIES OUTPUT_NAME "lua-c++") -ENDIF() +SET_PROPERTY (TARGET lua PROPERTY POSITION_INDEPENDENT_CODE ON) IF (BUILD_SHARED_LIBS AND WIN32) TARGET_COMPILE_DEFINITIONS (lua PUBLIC -DLUA_BUILD_AS_DLL ) @@ -73,12 +71,43 @@ IF (UNIX) ENDIF () INSTALL ( TARGETS lua + EXPORT unofficial-lua-config RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) -IF (NOT DEFINED SKIP_INSTALL_TOOLS) +install(EXPORT unofficial-lua-config DESTINATION share/unofficial-lua) + +IF (COMPILE_AS_CPP) + ADD_LIBRARY ( lua-cpp ${SRC_LIBLUA} ) + SET_TARGET_PROPERTIES(lua-cpp PROPERTIES OUTPUT_NAME "lua-c++") + IF (BUILD_SHARED_LIBS AND WIN32) + TARGET_COMPILE_DEFINITIONS (lua-cpp PUBLIC -DLUA_BUILD_AS_DLL ) + ENDIF () + IF (UNIX) + IF (APPLE) + TARGET_COMPILE_DEFINITIONS (lua-cpp PUBLIC -DLUA_USE_DLOPEN) + ELSE () + FIND_LIBRARY (LIB_DLOPEN NAMES dl) + IF (LIB_DLOPEN) + TARGET_COMPILE_DEFINITIONS (lua-cpp PUBLIC -DLUA_USE_DLOPEN) + TARGET_LINK_LIBRARIES (lua-cpp ${LIB_DLOPEN}) + ENDIF () + ENDIF () + ENDIF () + + INSTALL ( TARGETS lua-cpp + EXPORT unofficial-lua-cpp-config + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ) + + install(EXPORT unofficial-lua-cpp-config DESTINATION share/unofficial-lua-cpp) +ENDIF() + +IF (INSTALL_TOOLS) ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler uses non-exported APIs, so must include sources directly. ADD_EXECUTABLE ( luai src/lua.c ) # interpreter TARGET_LINK_LIBRARIES ( luai lua ) @@ -101,7 +130,7 @@ IF (NOT DEFINED SKIP_INSTALL_TOOLS) INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/lua ) ENDIF () -IF (NOT DEFINED SKIP_INSTALL_HEADERS) +IF (NOT SKIP_INSTALL_HEADERS) INSTALL( FILES src/lualib.h diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL deleted file mode 100644 index eeb26e41266c8a..00000000000000 --- a/ports/lua/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: lua -Version: 5.3.5-2 -Homepage: https://www.lua.org -Description: a powerful, fast, lightweight, embeddable scripting language - -Feature: cpp -Description: Builds lua for C++ linkage. \ No newline at end of file diff --git a/ports/lua/fix-ios-system.patch b/ports/lua/fix-ios-system.patch new file mode 100644 index 00000000000000..3e98ce228ac7d2 --- /dev/null +++ b/ports/lua/fix-ios-system.patch @@ -0,0 +1,29 @@ +diff --git a/src/loslib.c b/src/loslib.c +index e65e188..3595601 100644 +--- a/src/loslib.c ++++ b/src/loslib.c +@@ -3,7 +3,9 @@ + ** Standard Operating System library + ** See Copyright Notice in lua.h + */ +- ++#if defined(__APPLE__) ++#include ++#endif + #define loslib_c + #define LUA_LIB + +@@ -143,7 +145,12 @@ static int os_execute (lua_State *L) { + const char *cmd = luaL_optstring(L, 1, NULL); + int stat; + errno = 0; +- stat = system(cmd); ++#if defined(__APPLE__) && !TARGET_OS_OSX ++ // system() is __IOS_PROHIBITED, __WATCHOS_PROHIBITED, and __TVOS_PROHIBITED. ++ stat = 127; // error: shell execution failed ++#else ++ stat = system(cmd); ++#endif + if (cmd != NULL) + return luaL_execresult(L, stat); + else { diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake index b107c6cf96302e..1a7fac53caa838 100644 --- a/ports/lua/portfile.cmake +++ b/ports/lua/portfile.cmake @@ -1,54 +1,69 @@ -include(vcpkg_common_functions) - vcpkg_download_distfile(ARCHIVE - URLS "https://www.lua.org/ftp/lua-5.3.5.tar.gz" - FILENAME "lua-5.3.5.tar.gz" - SHA512 4f9516acc4659dfd0a9e911bfa00c0788f0ad9348e5724fe8fb17aac59e9c0060a64378f82be86f8534e49c6c013e7488ad17321bafcc787831d3d67406bd0f4 + URLS "https://www.lua.org/ftp/lua-5.4.3.tar.gz" + FILENAME "lua-5.4.3.tar.gz" + SHA512 3a1a3ee8694b72b4ec9d3ce76705fe179328294353604ca950c53f41b41161b449877d43318ef4501fee44ecbd6c83314ce7468d7425ba9b2903c9c32a28bbc0 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - PATCHES vs2015-impl-c99.patch + PATCHES + vs2015-impl-c99.patch + fix-ios-system.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +# Used in cmake wrapper +set(ENABLE_LUA_CPP 0) +if ("cpp" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "Feature cpp does not support uwp.") + endif() + set(ENABLE_LUA_CPP 1) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + cpp COMPILE_AS_CPP + tools INSTALL_TOOLS +) +if(VCPKG_TARGET_IS_IOS AND "tools" IN_LIST FEATURES) + message(FATAL_ERROR "lua[tools] is not supported for iOS platform build") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DCOMPILE_AS_CPP=OFF + ${FEATURE_OPTIONS} OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON - -DSKIP_INSTALL_TOOLS=ON ) - vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-lua TARGET_PATH share/unofficial-lua) + if("cpp" IN_LIST FEATURES) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DCOMPILE_AS_CPP=ON - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON - -DSKIP_INSTALL_TOOLS=ON - ) - - vcpkg_install_cmake() + vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-lua-cpp TARGET_PATH share/unofficial-lua-cpp) +endif() + +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES lua luac SEARCH_DIR "${CURRENT_PACKAGES_DIR}/tools/${PORT}") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + if(VCPKG_TARGET_IS_WINDOWS) file(READ ${CURRENT_PACKAGES_DIR}/include/luaconf.h LUA_CONF_H) string(REPLACE "defined(LUA_BUILD_AS_DLL)" "1" LUA_CONF_H "${LUA_CONF_H}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/luaconf.h "${LUA_CONF_H}") endif() endif() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lua) +# Suitable for old version +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) # Handle copyright -file(COPY ${CMAKE_CURRENT_LIST_DIR}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lua/copyright) -vcpkg_copy_pdbs() +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/lua/usage b/ports/lua/usage new file mode 100644 index 00000000000000..01aa81ed34aac0 --- /dev/null +++ b/ports/lua/usage @@ -0,0 +1,5 @@ +Use this package via the module FindLua that comes with CMake. To use in your CMakeLists.txt: + + find_package(Lua REQUIRED) + target_include_directories(main PRIVATE ${LUA_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${LUA_LIBRARIES}) diff --git a/ports/lua/vcpkg-cmake-wrapper.cmake.in b/ports/lua/vcpkg-cmake-wrapper.cmake.in new file mode 100644 index 00000000000000..74973eca35126b --- /dev/null +++ b/ports/lua/vcpkg-cmake-wrapper.cmake.in @@ -0,0 +1,23 @@ +set(REQUIRES ) +foreach(ARG IN_LISTS ${ARGS}) + if (ARG STREQUAL "REQUIRED") + set(REQUIRES "REQUIRED") + endif() +endforeach() + +_find_package(unofficial-lua CONFIG ${REQUIRES}) + +if (@ENABLE_LUA_CPP@) + _find_package(unofficial-lua-cpp CONFIG ${REQUIRES}) +endif() + +get_filename_component(LUA_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}" PATH) +get_filename_component(LUA_INCLUDE_DIR "${LUA_INCLUDE_DIR}" PATH) +set(LUA_INCLUDE_DIR ${LUA_INCLUDE_DIR}/include) + +list(APPEND LUA_LIBRARIES lua) +if (TARGET lua-cpp) + list(APPEND LUA_LIBRARIES lua-cpp) +endif() + +set(LUA_FOUND 1) diff --git a/ports/lua/vcpkg.json b/ports/lua/vcpkg.json new file mode 100644 index 00000000000000..e381a077ead1d0 --- /dev/null +++ b/ports/lua/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "lua", + "version-semver": "5.4.3", + "port-version": 3, + "description": "A powerful, fast, lightweight, embeddable scripting language", + "homepage": "https://www.lua.org", + "features": { + "cpp": { + "description": "Builds Lua for C++ linkage" + }, + "tools": { + "description": "Builds Lua compiler and interpreter" + } + } +} diff --git a/ports/luabridge/CONTROL b/ports/luabridge/CONTROL deleted file mode 100644 index 7c2a41aa4f4b11..00000000000000 --- a/ports/luabridge/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: luabridge -Version: 2.3.1 -Description: A lightweight, dependency-free library for binding Lua to C++ diff --git a/ports/luabridge/portfile.cmake b/ports/luabridge/portfile.cmake index 9b9ccbb425d596..6f4cbeb2afc729 100644 --- a/ports/luabridge/portfile.cmake +++ b/ports/luabridge/portfile.cmake @@ -1,9 +1,8 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/LuaBridge - REF 2.3.1 - SHA512 6478410ec5863f40087f023a68c585b4c84974aa27dd522552094f6c823bee9820edc77685a9932b5d7d74f26cced4d624810dbfbaa3694f55c0b7803d2d5216 + REF 12d51bdd992a22b43adb9cc5fb83ebf8b1f2be7f # 2.6 + SHA512 18593b2fda5be0b7cd9701feed53820002f93bba883cfa9fcdfa3e25ead02fb9b2f16f30d1603ae5d43ee3b199925071260723d4ebb79eb581888496d422f42d HEAD_REF master ) diff --git a/ports/luabridge/vcpkg.json b/ports/luabridge/vcpkg.json new file mode 100644 index 00000000000000..e26ef433917534 --- /dev/null +++ b/ports/luabridge/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "luabridge", + "version-string": "2.6", + "port-version": 1, + "description": "A lightweight, dependency-free library for binding Lua to C++" +} diff --git a/ports/luafilesystem/CMakeLists.txt b/ports/luafilesystem/CMakeLists.txt index 85fb5eb86affeb..79dd424f422bd9 100644 --- a/ports/luafilesystem/CMakeLists.txt +++ b/ports/luafilesystem/CMakeLists.txt @@ -1,21 +1,17 @@ -cmake_minimum_required(VERSION 3.0) -project(luafilesystem) - -if(NOT WIN32) - message(FATAL_ERROR "Written for windows only") -endif() - -find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) -find_library(LUA_LIBRARY lua) -set(LFS_INCLUDES ${LUA_INCLUDE_DIR}) -set(LFS_LIBRARIES ${LUA_LIBRARY}) - -add_library( lfs src/lfs.h src/lfs.c src/lfs.def) - -target_include_directories(lfs PRIVATE ${LFS_INCLUDES}) -target_link_libraries(lfs PRIVATE ${LFS_LIBRARIES}) - -install(TARGETS lfs - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) +cmake_minimum_required(VERSION 3.0) +project(luafilesystem) + +find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) +find_library(LUA_LIBRARY lua) +set(LFS_INCLUDES ${LUA_INCLUDE_DIR}) +set(LFS_LIBRARIES ${LUA_LIBRARY}) + +add_library( lfs src/lfs.h src/lfs.c src/lfs.def) + +target_include_directories(lfs PRIVATE ${LFS_INCLUDES}) +target_link_libraries(lfs PRIVATE ${LFS_LIBRARIES}) + +install(TARGETS lfs + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/ports/luafilesystem/CONTROL b/ports/luafilesystem/CONTROL deleted file mode 100644 index d6d96910cc8b16..00000000000000 --- a/ports/luafilesystem/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: luafilesystem -Version: 1.7.0.2 -Homepage: https://github.com/keplerproject/luafilesystem -Description: LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution. -Build-Depends: lua diff --git a/ports/luafilesystem/lfs-def-fix.patch b/ports/luafilesystem/lfs-def-fix.patch deleted file mode 100644 index 34923427fd1f8f..00000000000000 --- a/ports/luafilesystem/lfs-def-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 92527d96199912f79b8046ddb32ff83a16771cb4 Mon Sep 17 00:00:00 2001 -From: "Stephen E. Baker" -Date: Fri, 15 Sep 2017 21:18:58 -0400 -Subject: [PATCH] Update version in lfs.def - -Version number of current release is 1.7 ---- - src/lfs.def | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/lfs.def b/src/lfs.def -index 8a36d41..4055ff0 100644 ---- a/src/lfs.def -+++ b/src/lfs.def -@@ -1,4 +1,4 @@ - LIBRARY lfs.dll --VERSION 1.6 -+VERSION 1.7 - EXPORTS - luaopen_lfs diff --git a/ports/luafilesystem/portfile.cmake b/ports/luafilesystem/portfile.cmake index 74c3d116ae2618..bd6f1ebd4e1f44 100644 --- a/ports/luafilesystem/portfile.cmake +++ b/ports/luafilesystem/portfile.cmake @@ -1,21 +1,14 @@ -include(vcpkg_common_functions) +set(LUAFILESYSTEM_VERSION 1.8.0) +set(LUAFILESYSTEM_REVISION v1_8_0) +set(LUAFILESYSTEM_HASH 79d964f13ae43716281dc8521d2f128b22f2261234c443e242b857cfdf621e208bdf4512f8ba710baa113e9b3b71e2544609de65e2c483f569c243a5cf058247) -set(LUAFILESYSTEM_VERSION 1.7.0.2) -set(LUAFILESYSTEM_REVISION v1_7_0_2) -set(LUAFILESYSTEM_HASH a1d4d077776e57cd878dbcd21656da141ea3686c587b5420a2b039aeaf086b7e7d05d531ee1cc2bbd7d06660d1315b09593e52143f6711f033ce8eecdc550511) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/luafilesystem-${LUAFILESYSTEM_VERSION}) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO keplerproject/luafilesystem REF ${LUAFILESYSTEM_REVISION} SHA512 ${LUAFILESYSTEM_HASH} - HEAD_REF master) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/lfs-def-fix.patch) + HEAD_REF master +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -28,8 +21,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/luafilesystem) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/luafilesystem/LICENSE ${CURRENT_PACKAGES_DIR}/share/luafilesystem/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) # Allow empty include directory set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/luafilesystem/vcpkg.json b/ports/luafilesystem/vcpkg.json new file mode 100644 index 00000000000000..bdc33582d6984b --- /dev/null +++ b/ports/luafilesystem/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "luafilesystem", + "version-string": "1.8.0", + "port-version": 2, + "description": "LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution.", + "homepage": "https://github.com/keplerproject/luafilesystem", + "dependencies": [ + "lua" + ] +} diff --git a/ports/luajit/001-fix-build-path.patch b/ports/luajit/001-fix-build-path.patch new file mode 100644 index 00000000000000..bd14d708947a57 --- /dev/null +++ b/ports/luajit/001-fix-build-path.patch @@ -0,0 +1,119 @@ +diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat +index 42e3652..6a889e1 100644 +--- a/src/msvcbuild.bat ++++ b/src/msvcbuild.bat +@@ -14,17 +14,18 @@ + @if not defined INCLUDE goto :FAIL + + @setlocal +-@set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline ++@set SOURCEDIR=%1 ++@set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline /I%SOURCEDIR% + @set LJLINK=link /nologo + @set LJMT=mt /nologo + @set LJLIB=lib /nologo /nodefaultlib +-@set DASMDIR=..\dynasm ++@set DASMDIR=%SOURCEDIR%\..\dynasm + @set DASM=%DASMDIR%\dynasm.lua + @set LJDLLNAME=lua51.dll + @set LJLIBNAME=lua51.lib +-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c ++@set ALL_LIB=%SOURCEDIR%\lib_base.c %SOURCEDIR%\lib_math.c %SOURCEDIR%\lib_bit.c %SOURCEDIR%\lib_string.c %SOURCEDIR%\lib_table.c %SOURCEDIR%\lib_io.c %SOURCEDIR%\lib_os.c %SOURCEDIR%\lib_package.c %SOURCEDIR%\lib_debug.c %SOURCEDIR%\lib_jit.c %SOURCEDIR%\lib_ffi.c + +-%LJCOMPILE% host\minilua.c ++%LJCOMPILE% %SOURCEDIR%\host\minilua.c /Fdminilua.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /out:minilua.exe minilua.obj + @if errorlevel 1 goto :BAD +@@ -38,10 +39,10 @@ if exist minilua.exe.manifest^ + @set DASMFLAGS=-D WIN -D JIT -D FFI + @set LJARCH=x86 + :X64 +-minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h vm_x86.dasc ++minilua %DASM% -LN %DASMFLAGS% -o %SOURCEDIR%\host\buildvm_arch.h %SOURCEDIR%\vm_x86.dasc + @if errorlevel 1 goto :BAD + +-%LJCOMPILE% /I "." /I %DASMDIR% host\buildvm*.c ++%LJCOMPILE% /I "." /I %DASMDIR% %SOURCEDIR%\host\buildvm*.c /Fdbuildvm.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /out:buildvm.exe buildvm*.obj + @if errorlevel 1 goto :BAD +@@ -50,39 +51,39 @@ if exist buildvm.exe.manifest^ + + buildvm -m peobj -o lj_vm.obj + @if errorlevel 1 goto :BAD +-buildvm -m bcdef -o lj_bcdef.h %ALL_LIB% ++buildvm -m bcdef -o %SOURCEDIR%\lj_bcdef.h %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m ffdef -o lj_ffdef.h %ALL_LIB% ++buildvm -m ffdef -o %SOURCEDIR%\lj_ffdef.h %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m libdef -o lj_libdef.h %ALL_LIB% ++buildvm -m libdef -o %SOURCEDIR%\lj_libdef.h %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m recdef -o lj_recdef.h %ALL_LIB% ++buildvm -m recdef -o %SOURCEDIR%\lj_recdef.h %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m vmdef -o jit\vmdef.lua %ALL_LIB% ++buildvm -m vmdef -o %SOURCEDIR%\jit\vmdef.lua %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m folddef -o lj_folddef.h lj_opt_fold.c ++buildvm -m folddef -o %SOURCEDIR%\lj_folddef.h %SOURCEDIR%\lj_opt_fold.c + @if errorlevel 1 goto :BAD + +-@if "%1" neq "debug" goto :NODEBUG ++@set LJLINK=%LJLINK% /debug ++@if "%2" neq "debug" goto :NODEBUG + @shift + @set LJCOMPILE=%LJCOMPILE% /Zi +-@set LJLINK=%LJLINK% /debug + :NODEBUG +-@if "%1"=="amalg" goto :AMALGDLL +-@if "%1"=="static" goto :STATIC +-%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c ++@if "%2"=="amalg" goto :AMALGDLL ++@if "%2"=="static" goto :STATIC ++%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /DLL /out:%LJDLLNAME% lj_*.obj lib_*.obj + @if errorlevel 1 goto :BAD + @goto :MTDLL + :STATIC +-%LJCOMPILE% lj_*.c lib_*.c ++%LJCOMPILE% %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb + @if errorlevel 1 goto :BAD + %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj + @if errorlevel 1 goto :BAD + @goto :MTDLL + :AMALGDLL +-%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL ljamalg.c ++%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL %SOURCEDIR%\ljamalg.c + @if errorlevel 1 goto :BAD + %LJLINK% /DLL /out:%LJDLLNAME% ljamalg.obj lj_vm.obj + @if errorlevel 1 goto :BAD +@@ -90,7 +91,7 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c + if exist %LJDLLNAME%.manifest^ + %LJMT% -manifest %LJDLLNAME%.manifest -outputresource:%LJDLLNAME%;2 + +-%LJCOMPILE% luajit.c ++%LJCOMPILE% %SOURCEDIR%\luajit.c /Fdluajit.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /out:luajit.exe luajit.obj %LJLIBNAME% + @if errorlevel 1 goto :BAD +@@ -98,8 +99,8 @@ if exist luajit.exe.manifest^ + %LJMT% -manifest luajit.exe.manifest -outputresource:luajit.exe + + @del *.obj *.manifest minilua.exe buildvm.exe +-@del host\buildvm_arch.h +-@del lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h ++@del %SOURCEDIR%\host\buildvm_arch.h ++@del %SOURCEDIR%\lj_bcdef.h %SOURCEDIR%\lj_ffdef.h %SOURCEDIR%\lj_libdef.h %SOURCEDIR%\lj_recdef.h %SOURCEDIR%\lj_folddef.h + @echo. + @echo === Successfully built LuaJIT for Windows/%LJARCH% === + +@@ -112,4 +113,5 @@ if exist luajit.exe.manifest^ + @goto :END + :FAIL + @echo You must open a "Visual Studio .NET Command Prompt" to run this script ++exit 1 + :END diff --git a/ports/luajit/001-fixStaticBuild.patch b/ports/luajit/001-fixStaticBuild.patch deleted file mode 100644 index b21991702f5e56..00000000000000 --- a/ports/luajit/001-fixStaticBuild.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat -index bd0c4c5..95e1cf4 100644 ---- a/src/msvcbuild.bat -+++ b/src/msvcbuild.bat -@@ -67,15 +67,20 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c - @shift - @set LJCOMPILE=%LJCOMPILE% /Zi - @set LJLINK=%LJLINK% /debug -+@set DEBUG=1 - :NODEBUG - @if "%1"=="amalg" goto :AMALGDLL - @if "%1"=="static" goto :STATIC --%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c -+@if "%DEBUG%"=="1" set LJCOMPILE=%LJCOMPILE% /MDd -+@if "%DEBUG%"=="" set LJCOMPILE=%LJCOMPILE% /MD -+%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c - @if errorlevel 1 goto :BAD - %LJLINK% /DLL /out:%LJDLLNAME% lj_*.obj lib_*.obj - @if errorlevel 1 goto :BAD - @goto :MTDLL - :STATIC -+@if "%DEBUG%"=="1" set LJCOMPILE=%LJCOMPILE% /MTd -+@if "%DEBUG%"=="" set LJCOMPILE=%LJCOMPILE% /MT - %LJCOMPILE% lj_*.c lib_*.c - @if errorlevel 1 goto :BAD - %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj diff --git a/ports/luajit/002-fix-crt-linkage.patch b/ports/luajit/002-fix-crt-linkage.patch new file mode 100644 index 00000000000000..cbc273efcdfaec --- /dev/null +++ b/ports/luajit/002-fix-crt-linkage.patch @@ -0,0 +1,42 @@ +diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat +index 6a889e1..08c4e3c 100644 +--- a/src/msvcbuild.bat ++++ b/src/msvcbuild.bat +@@ -64,20 +64,23 @@ buildvm -m vmdef -o %SOURCEDIR%\jit\vmdef.lua %ALL_LIB% + buildvm -m folddef -o %SOURCEDIR%\lj_folddef.h %SOURCEDIR%\lj_opt_fold.c + @if errorlevel 1 goto :BAD + ++@if "%2"=="static" set CRT_LINKAGE=/MT ++@if "%2"=="dynamic" set CRT_LINKAGE=/MD + @set LJLINK=%LJLINK% /debug +-@if "%2" neq "debug" goto :NODEBUG ++@if "%3" neq "debug" goto :NODEBUG + @shift + @set LJCOMPILE=%LJCOMPILE% /Zi ++@set CRT_LINKAGE=%CRT_LINKAGE%d + :NODEBUG +-@if "%2"=="amalg" goto :AMALGDLL ++@if "%3"=="amalg" goto :AMALGDLL +-@if "%2"=="static" goto :STATIC ++@if "%3"=="static" goto :STATIC +-%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb ++%LJCOMPILE% %CRT_LINKAGE% /DLUA_BUILD_AS_DLL %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /DLL /out:%LJDLLNAME% lj_*.obj lib_*.obj + @if errorlevel 1 goto :BAD + @goto :MTDLL + :STATIC +-%LJCOMPILE% %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb ++%LJCOMPILE% %CRT_LINKAGE% %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb + @if errorlevel 1 goto :BAD + %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj + @if errorlevel 1 goto :BAD +@@ -94,7 +94,7 @@ + if exist %LJDLLNAME%.manifest^ + %LJMT% -manifest %LJDLLNAME%.manifest -outputresource:%LJDLLNAME%;2 + +-%LJCOMPILE% %SOURCEDIR%\luajit.c /Fdluajit.pdb ++%LJCOMPILE% %CRT_LINKAGE% %SOURCEDIR%\luajit.c /Fdluajit.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /out:luajit.exe luajit.obj %LJLIBNAME% + @if errorlevel 1 goto :BAD diff --git a/ports/luajit/CONTROL b/ports/luajit/CONTROL deleted file mode 100644 index fb9c9d6467fa64..00000000000000 --- a/ports/luajit/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: luajit -Version: 2.0.5-1 -Homepage: https://github.com/LuaJIT/LuaJIT -Description: LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. diff --git a/ports/luajit/portfile.cmake b/ports/luajit/portfile.cmake index 326929d17438e5..262f7ec0908686 100644 --- a/ports/luajit/portfile.cmake +++ b/ports/luajit/portfile.cmake @@ -1,10 +1,4 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "LuaJIT currently only supports being built for desktop") -endif() - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/LuaJIT-2.0.5) +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports being built for desktop" ON_TARGET "UWP") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -12,74 +6,68 @@ vcpkg_from_github( REF v2.0.5 SHA512 65d982d7fe532a61335613f414f3b8fa5333747bdf7aefc2c2d52022d227594ade827639049b97e3c4ffae9f38f32cb15f1a17b1780fb0a943e1a3af05e2b576 HEAD_REF master + PATCHES + 001-fix-build-path.patch + 002-fix-crt-linkage.patch ) -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/luajit) - -set (SRC ${SOURCE_PATH}/src) - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set (LJIT_STATIC "") else() set (LJIT_STATIC "static") endif() -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/001-fixStaticBuild.patch -) - -message(STATUS "Building ${TARGET_TRIPLET}-dbg") - -file(REMOVE "${SRC}/*.dll") -file(REMOVE "${SRC}/*.exe") -file(REMOVE "${SRC}/*.lib") - -vcpkg_execute_required_process_repeat( - COUNT 1 - COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" debug ${LJIT_STATIC} - WORKING_DIRECTORY "${SOURCE_PATH}/src/" - LOGNAME build-${TARGET_TRIPLET}-dbg -) - -file(INSTALL ${SRC}/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) -file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL ${SRC}/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + vcpkg_execute_required_process_repeat( + COUNT 1 + COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" ${SOURCE_PATH}/src ${VCPKG_CRT_LINKAGE} debug ${LJIT_STATIC} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/bin/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() + vcpkg_copy_pdbs() endif() -vcpkg_copy_pdbs() - -file(REMOVE "${SRC}/*.dll") -file(REMOVE "${SRC}/*.exe") -file(REMOVE "${SRC}/*.lib") -message(STATUS "Building ${TARGET_TRIPLET}-rel") -vcpkg_execute_required_process_repeat(d8un - COUNT 1 - COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" ${LJIT_STATIC} - WORKING_DIRECTORY "${SOURCE_PATH}/src/" - LOGNAME build-${TARGET_TRIPLET}-rel -) - -file(INSTALL ${SRC}/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL ${SRC}/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + message(STATUS "Building ${TARGET_TRIPLET}-rel") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + vcpkg_execute_required_process_repeat(d8un + COUNT 1 + COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" ${SOURCE_PATH}/src ${VCPKG_CRT_LINKAGE} ${LJIT_STATIC} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools) + endif() + vcpkg_copy_pdbs() endif() -vcpkg_copy_pdbs() -file(INSTALL ${SRC}/lua.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit) -file(INSTALL ${SRC}/luajit.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit) -file(INSTALL ${SRC}/luaconf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit) -file(INSTALL ${SRC}/lualib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit) -file(INSTALL ${SRC}/lauxlib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit) -file(INSTALL ${SRC}/lua.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit) +file(INSTALL ${SOURCE_PATH}/src/lua.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/luajit.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/luaconf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/lualib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/lauxlib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/lua.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) -file(REMOVE "${SRC}/*.dll") -file(REMOVE "${SRC}/*.exe") -file(REMOVE "${SRC}/*.lib") +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/ports/luajit/vcpkg.json b/ports/luajit/vcpkg.json new file mode 100644 index 00000000000000..e4cd839f458aea --- /dev/null +++ b/ports/luajit/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "luajit", + "version-string": "2.0.5", + "port-version": 4, + "description": "LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.", + "homepage": "https://github.com/LuaJIT/LuaJIT", + "supports": "!uwp" +} diff --git a/ports/luasec/CMakeLists.txt b/ports/luasec/CMakeLists.txt new file mode 100644 index 00000000000000..386af144077248 --- /dev/null +++ b/ports/luasec/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.20.0) +project(luasec) + +find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) +find_library(LUA_LIBRARY lua) +find_package(OpenSSL) + +set(LUASEC_INCLUDES ${LUA_INCLUDE_DIR} src) +set(LUASEC_LIBRARIES + ${LUA_LIBRARY} + OpenSSL::SSL + OpenSSL::Crypto + OpenSSL::applink + ws2_32) + +add_library(lua-ssl + src/config.c + src/ssl.c + src/context.c + src/x509.c + src/ec.c + src/options.c + src/luasocket/buffer.c + src/luasocket/io.c + src/luasocket/timeout.c + src/luasocket/wsocket.c) + +target_include_directories(lua-ssl PRIVATE ${LUASEC_INCLUDES}) +target_link_libraries(lua-ssl PRIVATE ${LUASEC_LIBRARIES}) +set_target_properties(lua-ssl PROPERTIES PREFIX "") + +install(TARGETS lua-ssl + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES src/ssl.lua DESTINATION share/lua) +install(FILES src/https.lua DESTINATION share/lua/ssl) diff --git a/ports/luasec/portfile.cmake b/ports/luasec/portfile.cmake new file mode 100644 index 00000000000000..31eed452132055 --- /dev/null +++ b/ports/luasec/portfile.cmake @@ -0,0 +1,33 @@ +set(LUASEC_REVISION v1.0.1) +set(LUASEC_HASH 21ae200e40f13a35eebca95cdac25ae13532a3008b2f9ec97a079033b9efde69e81954354453623eb77340368f482d3c69adb26881a6c0d7c4897df31301af93) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO brunoos/luasec + REF ${LUASEC_REVISION} + SHA512 ${LUASEC_HASH} + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Remove debug share +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/luasec/vcpkg.json b/ports/luasec/vcpkg.json new file mode 100644 index 00000000000000..4880e8bfa2a5c1 --- /dev/null +++ b/ports/luasec/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "luasec", + "version": "1.0.1", + "maintainers": "Stephen Baker ", + "description": "LuaSec depends on OpenSSL, and integrates with LuaSocket to make it easy to add secure connections to any Lua applications or scripts.", + "homepage": "https://github.com/brunoos/luasec", + "dependencies": [ + "lua", + "luasocket", + "openssl" + ] +} diff --git a/ports/luasocket/CONTROL b/ports/luasocket/CONTROL deleted file mode 100644 index e50ca87fb23d2e..00000000000000 --- a/ports/luasocket/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: luasocket -Version: 2019-05-07 -Homepage: https://github.com/diegonehab/luasocket -Description: LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet. -Build-Depends: lua diff --git a/ports/luasocket/portfile.cmake b/ports/luasocket/portfile.cmake index 0f4bfbf6d4bea4..5b4bc34002be77 100644 --- a/ports/luasocket/portfile.cmake +++ b/ports/luasocket/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO diegonehab/luasocket - REF 733af884f1aa18ff469bf3c4d18810e815853211 - SHA512 632d66a9460636758428261b5b0d8669a90492de716915c07d1d1bf66c795bc9599f9edcd4345bbc3ef06830d670303b6cfb56c206e022b4bc5307fec2a20395 + REF 5b18e475f38fcf28429b1cc4b17baee3b9793a62 # accessed on 2020-09-14 + SHA512 bdf7086a0504b0072b9cfd1266fc4ae89504053801722859a426f567fca00ed76f4c295c2a3a968e93f0036d9b792cf97561e9baa82c09ea23999cfd473227eb HEAD_REF master) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/luasocket/vcpkg.json b/ports/luasocket/vcpkg.json new file mode 100644 index 00000000000000..064972699205e2 --- /dev/null +++ b/ports/luasocket/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "luasocket", + "version-string": "2020-09-14", + "port-version": 1, + "description": "LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet.", + "homepage": "https://github.com/diegonehab/luasocket", + "dependencies": [ + "lua" + ] +} diff --git a/ports/lv2/CMakeLists.txt b/ports/lv2/CMakeLists.txt new file mode 100644 index 00000000000000..a1d3d13cceeea4 --- /dev/null +++ b/ports/lv2/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.17) +project(lv2 NONE) + +add_library(lv2 INTERFACE) + +install( + TARGETS lv2 + EXPORT lv2-config + INCLUDES DESTINATION include +) + +install( + DIRECTORY lv2 + DESTINATION include + FILES_MATCHING PATTERN "*.h" +) +install(FILES lv2/core/lv2.h DESTINATION include) + +# Install headers to old URI-style paths, using mapping from wscript +file(READ wscript WSCRIPT) +string(REGEX MATCHALL "'[^']+' *: *'lv2/[^']+'" SPEC_MAP "${WSCRIPT}") +foreach(PAIR ${SPEC_MAP}) + string(REGEX MATCH "'([^']+)' *: *'([^']+)'" _ "${PAIR}") + install( + DIRECTORY "lv2/${CMAKE_MATCH_1}/" + DESTINATION "include/${CMAKE_MATCH_2}" + FILES_MATCHING PATTERN "*.h" + ) +endforeach() + +install( + EXPORT lv2-config + NAMESPACE lv2:: + DESTINATION share/lv2 +) diff --git a/ports/lv2/portfile.cmake b/ports/lv2/portfile.cmake new file mode 100644 index 00000000000000..1c4e8640d3eba3 --- /dev/null +++ b/ports/lv2/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lv2/lv2 + REF cd152104c84bcee9fec22ef780cec2af7ba85d0c #v1.18.2 + SHA512 77220524481e97222b12782a89efdcfcb73ee6ac9b9aac88741475c60a2c21049153297860a24b77c0ebd4de32d38a38232ba4fc64d12b8558a56ef50b316801 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/lv2/vcpkg.json b/ports/lv2/vcpkg.json new file mode 100644 index 00000000000000..8d0b0cda349489 --- /dev/null +++ b/ports/lv2/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "lv2", + "version-semver": "1.18.2", + "port-version": 1, + "description": "LV2 is a plugin standard for audio systems. It defines a minimal yet extensible C API for plugin code and a format for plugin \"bundles\".", + "homepage": "https://lv2plug.in", + "license": "ISC", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/lz4/CMakeLists.txt b/ports/lz4/CMakeLists.txt index b36a3574e6cc12..142a229006f7c2 100644 --- a/ports/lz4/CMakeLists.txt +++ b/ports/lz4/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.0) project(lz4 C) -if(BUILD_SHARED_LIBS) +if(MSVC AND BUILD_SHARED_LIBS) add_definitions(-DLZ4_DLL_EXPORT) endif() add_definitions(-DXXH_NAMESPACE=LZ4_) @@ -40,10 +40,18 @@ list(REMOVE_ITEM lz4h "${CMAKE_CURRENT_LIST_DIR}/lib/xxhash.h") INSTALL(FILES ${lz4h} DESTINATION "${INSTALL_INCLUDE_DIR}") install(EXPORT lz4Config - FILE lz4Config.cmake + FILE lz4-config.cmake NAMESPACE lz4:: DESTINATION "${INSTALL_CMAKE_DIR}" ) # Export the package for use from the build-tree (this registers the build-tree with a global CMake-registry) export(PACKAGE lz4) + +# Create pkgconfig module file +file(STRINGS "lib/lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_(MAJOR|MINOR|RELEASE) ") +string(REGEX REPLACE "^.*MAJOR +([0-9]+).*MINOR +([0-9]+).*RELEASE +([0-9]+).*$" "\\1.\\2.\\3" VERSION "${LZ4_H}") +set(INCLUDEDIR [[${prefix}/include]]) +set(LIBDIR [[${prefix}/lib]]) +configure_file(lib/liblz4.pc.in lib/liblz4.pc) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib/liblz4.pc" DESTINATION "lib/pkgconfig") diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL deleted file mode 100644 index e6e99dd6a405ef..00000000000000 --- a/ports/lz4/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: lz4 -Version: 1.9.1-2 -Homepage: https://github.com/lz4/lz4 -Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. -Build-Depends: xxhash \ No newline at end of file diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index e7f1ee46137a3e..63e858ba8bf9c1 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -1,39 +1,40 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lz4/lz4 - REF v1.9.1 - SHA512 536cdeb6dd73b4769cf9501ad312b004ab01699758534b47ca2eddbc815fd374a3caba40cde36f73a7a70e134065836b733e2b0c023c31740b877ef9317ccf3e + REF v1.9.3 + SHA512 c246b0bda881ee9399fa1be490fa39f43b291bb1d9db72dba8a85db1a50aad416a97e9b300eee3d2a4203c2bd88bda2762e81bc229c3aa409ad217eb306a454c HEAD_REF dev ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS_DEBUG -DCMAKE_DEBUG_POSTFIX=d ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(DLL_IMPORT "1 && defined(_MSC_VER)") +else() + set(DLL_IMPORT "0") +endif() foreach(FILE lz4.h lz4frame.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/${FILE} LZ4_HEADER) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "1" LZ4_HEADER "${LZ4_HEADER}") - else() - string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "0" LZ4_HEADER "${LZ4_HEADER}") - endif() - file(WRITE ${CURRENT_PACKAGES_DIR}/include/${FILE} "${LZ4_HEADER}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${FILE}" + "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" + "${DLL_IMPORT}" + ) endforeach() -vcpkg_fixup_cmake_targets() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_cmake_config_fixup() +vcpkg_fixup_pkgconfig() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lz4.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lz4.pc" " -llz4" " -llz4d") +endif() -file(COPY ${SOURCE_PATH}/lib/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lz4) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/lz4/LICENSE ${CURRENT_PACKAGES_DIR}/share/lz4/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/lib/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/lz4/vcpkg.json b/ports/lz4/vcpkg.json new file mode 100644 index 00000000000000..0faa4629100c6d --- /dev/null +++ b/ports/lz4/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "lz4", + "version": "1.9.3", + "port-version": 2, + "description": "Lossless compression algorithm, providing compression speed at 400 MB/s per core.", + "homepage": "https://github.com/lz4/lz4", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/lzfse/CONTROL b/ports/lzfse/CONTROL deleted file mode 100644 index 98fdf6c0df2f78..00000000000000 --- a/ports/lzfse/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: lzfse -Version: 1.0-1 -Homepage: https://github.com/lzfse/lzfse -Description: Lempel-Ziv style data compressor using Finite State Entropy coding. diff --git a/ports/lzfse/portfile.cmake b/ports/lzfse/portfile.cmake index 80d9e2f10deee4..9ce60eeeb9ba5a 100644 --- a/ports/lzfse/portfile.cmake +++ b/ports/lzfse/portfile.cmake @@ -2,16 +2,15 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") message(FATAL_ERROR "ARM build not supported") endif() -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lzfse/lzfse REF lzfse-1.0 SHA512 9d7ca44e6d3d2bdf4b82b0eb66c14922369b8b6fe2cf891187a77c6708b8d26c2c1b2ccddec6059e85dbbbb37c497419549f02812b5f34d06238ac246a8cf912 - HEAD_REF master) - -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-cli-option.patch) + HEAD_REF master + PATCHES + disable-cli-option.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/lzfse/vcpkg.json b/ports/lzfse/vcpkg.json new file mode 100644 index 00000000000000..774da1302a817d --- /dev/null +++ b/ports/lzfse/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "lzfse", + "version-string": "1.0", + "port-version": 3, + "description": "Lempel-Ziv style data compressor using Finite State Entropy coding.", + "homepage": "https://github.com/lzfse/lzfse", + "supports": "!arm" +} diff --git a/ports/lzo/CONTROL b/ports/lzo/CONTROL deleted file mode 100644 index cd1149f61ae1cb..00000000000000 --- a/ports/lzo/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: lzo -Version: 2.10-2 -Homepage: https://www.oberhumer.com/opensource/lzo/ -Description: Lossless data compression library diff --git a/ports/lzo/always_install_pc.patch b/ports/lzo/always_install_pc.patch new file mode 100644 index 00000000000000..6750eb681b7826 --- /dev/null +++ b/ports/lzo/always_install_pc.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 98c0a1ad0..85690209c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -290,7 +290,7 @@ if(1) + install(TARGETS ${f} DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/lzo/examples") + endif() + +-if(PKG_CONFIG_FOUND) ++if(1) + configure_file(lzo2.pc.cmakein lzo2.pc @ONLY) + #if(EXISTS "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lzo2.pc" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") diff --git a/ports/lzo/portfile.cmake b/ports/lzo/portfile.cmake index b8faeb358fd609..514c8555a490fa 100644 --- a/ports/lzo/portfile.cmake +++ b/ports/lzo/portfile.cmake @@ -1,19 +1,14 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lzo-2.10) vcpkg_download_distfile(ARCHIVE URLS "http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz" FILENAME "lzo-2.10.tar.gz" SHA512 a3dae5e4a6b93b1f5bf7435e8ab114a9be57252e9efc5dd444947d7a2d031b0819f34bcaeb35f60b5629a01b1238d738735a64db8f672be9690d3c80094511a4 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES always_install_pc.patch +) set(LZO_STATIC OFF) set(LZO_SHARED OFF) @@ -32,6 +27,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) @@ -40,13 +36,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/libexec) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(READ ${CURRENT_PACKAGES_DIR}/include/lzo/lzoconf.h LZO_CONFIG) string(REPLACE "# define __LZO_EXPORT1 /*empty*/" "# define __LZO_EXPORT1 __declspec(dllimport)" LZO_CONFIG "${LZO_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzo/lzoconf.h "${LZO_CONFIG}") endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lzo) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/lzo/COPYING ${CURRENT_PACKAGES_DIR}/share/lzo/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/lzo/vcpkg.json b/ports/lzo/vcpkg.json new file mode 100644 index 00000000000000..0e238c8253b037 --- /dev/null +++ b/ports/lzo/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "lzo", + "version-string": "2.10", + "port-version": 7, + "description": "Lossless data compression library", + "homepage": "https://www.oberhumer.com/opensource/lzo/" +} diff --git a/ports/lzokay/portfile.cmake b/ports/lzokay/portfile.cmake new file mode 100644 index 00000000000000..719c63d979da4c --- /dev/null +++ b/ports/lzokay/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jackoalan/lzokay + REF 546a9695271e8a8b4711383f828172754fd825f2 + SHA512 b4e96183ea52dc5ba0d88b4b9b27baa2c3e2c540b1bfd50cf7a3c2569337fbe9d73dd9939cb456d5f7459df8e10d84677d40ee33f7d524f0f5f8a723d7a70583 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/lzokay/vcpkg.json b/ports/lzokay/vcpkg.json new file mode 100644 index 00000000000000..fb2b0787a587db --- /dev/null +++ b/ports/lzokay/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "lzokay", + "version-string": "2020-07-30", + "description": "lzokay – MIT licensed C++ implementation of LZO compression/decompression algorithm", + "homepage": "https://github.com/jackoalan/lzokay" +} diff --git a/ports/magic-enum/CONTROL b/ports/magic-enum/CONTROL deleted file mode 100644 index 590b8d758e7796..00000000000000 --- a/ports/magic-enum/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: magic-enum -Version: 2019-06-07 -Description: Header-only C++17 library provides static reflection for enums, work with any enum type without any macro or boilerplate code. diff --git a/ports/magic-enum/portfile.cmake b/ports/magic-enum/portfile.cmake index 95be6cc27c3224..b612ccabe84e4d 100644 --- a/ports/magic-enum/portfile.cmake +++ b/ports/magic-enum/portfile.cmake @@ -1,22 +1,27 @@ -include(vcpkg_common_functions) +# header-only library vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO "Neargye/magic_enum" - REF 4dfaa4b7b4814c2cf85b08ad3084fc28c8b129c6 - SHA512 924e5a134f4200652fdc3f3d676b49efa8c30b5577d638f60134ce81092b23f7976a494ce50b58b25ed7bce0653a7e29206acf9e512408c4701ec6822ab2d176 + REPO Neargye/magic_enum + REF v0.7.3 + SHA512 7645ef56bbe262ba801c6f5ffb7baf997869de6422a239ef2000d7ff6f4f6d00c34360543c60aa91a02433311b4b996bba410e4f04f96f185a6276ad9e6bb0a8 + HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + PREFER_NINJA OPTIONS - -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF - -DMAGIC_ENUM_OPT_BUILD_TESTS=OFF + -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF + -DMAGIC_ENUM_OPT_BUILD_TESTS=OFF + -DMAGIC_ENUM_OPT_INSTALL=ON ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/magic_enum) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/magic_enum TARGET_PATH share/magic_enum) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/magic-enum RENAME copyright) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/magic-enum/vcpkg.json b/ports/magic-enum/vcpkg.json new file mode 100644 index 00000000000000..44979659563122 --- /dev/null +++ b/ports/magic-enum/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "magic-enum", + "version-string": "0.7.3", + "port-version": 1, + "description": "Header-only C++17 library provides static reflection for enums, work with any enum type without any macro or boilerplate code.", + "homepage": "https://github.com/Neargye/magic_enum" +} diff --git a/ports/magic-get/portfile.cmake b/ports/magic-get/portfile.cmake new file mode 100644 index 00000000000000..065116c276adcf --- /dev/null +++ b/ports/magic-get/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/magic-get/vcpkg.json b/ports/magic-get/vcpkg.json new file mode 100644 index 00000000000000..bb803ad76345cb --- /dev/null +++ b/ports/magic-get/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "magic-get", + "version-string": "2019-09-02", + "port-version": 2, + "description": "Deprecated boost-pfr port.", + "homepage": "https://github.com/apolukhin/magic_get", + "dependencies": [ + "boost-pfr" + ] +} diff --git a/ports/magnum-extras/CONTROL b/ports/magnum-extras/CONTROL deleted file mode 100644 index e065088af9e823..00000000000000 --- a/ports/magnum-extras/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: magnum-extras -Version: 2019.01-2 -Build-Depends: magnum[core] -Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization -Homepage: https://magnum.graphics/ - -Feature: ui -Description: Ui library -Build-Depends: corrade[interconnect], magnum[text] diff --git a/ports/magnum-extras/portfile.cmake b/ports/magnum-extras/portfile.cmake index 41faca02cd560f..eda78782e98c66 100644 --- a/ports/magnum-extras/portfile.cmake +++ b/ports/magnum-extras/portfile.cmake @@ -1,9 +1,8 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-extras - REF v2019.01 - SHA512 b7116e53a6132c937ad1dc10d251d0b98884375a14e947c5ddfa046cd7a8e7e60eddf2802e1c945168fcb42d78fb13639fe65ea259c6a44f064e6065ee5ae3af + REF v2020.06 + SHA512 7419af84a6de72f666a9bd12a325c4b40f9e2a25fec3d0b22c348faab0a402b62fa782231b9b12180d84f4ab2508b02df25a97713948bdd2f21c9e8cb831fa25 HEAD_REF master ) @@ -66,7 +65,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-extras) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-extras/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-extras/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + vcpkg_copy_pdbs() diff --git a/ports/magnum-extras/vcpkg.json b/ports/magnum-extras/vcpkg.json new file mode 100644 index 00000000000000..8ed9aa296c8e2d --- /dev/null +++ b/ports/magnum-extras/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "magnum-extras", + "version-string": "2020.06", + "port-version": 1, + "description": "Extras for magnum, C++11/C++14 graphics middleware for games and data visualization", + "homepage": "https://magnum.graphics/", + "dependencies": [ + { + "name": "magnum", + "default-features": false + } + ], + "features": { + "ui": { + "description": "Ui library", + "dependencies": [ + { + "name": "corrade", + "features": [ + "interconnect" + ] + }, + { + "name": "magnum", + "features": [ + "text" + ] + } + ] + } + } +} diff --git a/ports/magnum-integration/CONTROL b/ports/magnum-integration/CONTROL deleted file mode 100644 index 68a481b8c6a6d1..00000000000000 --- a/ports/magnum-integration/CONTROL +++ /dev/null @@ -1,23 +0,0 @@ -Source: magnum-integration -Version: 2019.01-2 -Build-Depends: magnum[core] -Description: Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization -Homepage: https://magnum.graphics/ - -Feature: bullet -Description: BulletIntegration library -Build-Depends: bullet3 - -Feature: glm -Description: GlmIntegration library -Build-Depends: glm - -Feature: imgui -Description: ImGuiIntegration library -Build-Depends: imgui -#Feature: ovr -#Description: OvrIntegration library -#Build-Depends: ovrsdk -#Feature: dart -#Description: DartIntegration library -#Build-Depends: dart diff --git a/ports/magnum-integration/portfile.cmake b/ports/magnum-integration/portfile.cmake index 60231be979cdd3..66295137f39902 100644 --- a/ports/magnum-integration/portfile.cmake +++ b/ports/magnum-integration/portfile.cmake @@ -1,9 +1,8 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-integration - REF v2019.01 - SHA512 4f892c30c3824aea5d51b9178ca5001b97eb89659b45ac6f5f2182ea2a3a8ff54d80e6b143679ea7f5a07c408afb480d11895c6e7afdc9003951f68e14000f9f + REF v2020.06 + SHA512 0b615acdb49ed55bd678a5fb019b1a8ccf522084f3114b2b8dd7e121c27d39ae2aab2879a2e2fa8b083163be711a86f64202fcf380413dec0c705fffd7d649c5 HEAD_REF master ) @@ -59,7 +58,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-integration) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-integration/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-integration/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/magnum-integration/vcpkg.json b/ports/magnum-integration/vcpkg.json new file mode 100644 index 00000000000000..9d50cd69dd99fe --- /dev/null +++ b/ports/magnum-integration/vcpkg.json @@ -0,0 +1,39 @@ +{ + "name": "magnum-integration", + "version-string": "2020.06", + "port-version": 1, + "description": "Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization", + "homepage": "https://magnum.graphics/", + "dependencies": [ + { + "name": "magnum", + "default-features": false + } + ], + "features": { + "bullet": { + "description": "BulletIntegration library", + "dependencies": [ + "bullet3" + ] + }, + "eigen": { + "description": "EigenIntegration library", + "dependencies": [ + "eigen3" + ] + }, + "glm": { + "description": "GlmIntegration library", + "dependencies": [ + "glm" + ] + }, + "imgui": { + "description": "ImGuiIntegration library", + "dependencies": [ + "imgui" + ] + } + } +} diff --git a/ports/magnum-plugins/001-tools-path.patch b/ports/magnum-plugins/001-tools-path.patch deleted file mode 100644 index 18a351c2ea06a5..00000000000000 --- a/ports/magnum-plugins/001-tools-path.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake -index e63bc03..052006f 100644 ---- a/modules/FindCorrade.cmake -+++ b/modules/FindCorrade.cmake -@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) - if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) - add_executable(Corrade::${_component} IMPORTED) - -- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) -+ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) - mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) - - if(CORRADE_${_COMPONENT}_EXECUTABLE) -diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake -index 8df555d..12f7aa4 100644 ---- a/modules/FindMagnum.cmake -+++ b/modules/FindMagnum.cmake -@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) - if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) - add_executable(Magnum::${_component} IMPORTED) - -- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) -+ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) - mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) - - if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum-plugins/002-fix-stb-conflict.patch b/ports/magnum-plugins/002-fix-stb-conflict.patch new file mode 100644 index 00000000000000..13d535b321d481 --- /dev/null +++ b/ports/magnum-plugins/002-fix-stb-conflict.patch @@ -0,0 +1,13 @@ +diff --git a/src/MagnumPlugins/StbImageImporter/StbImageImporter.cpp b/src/MagnumPlugins/StbImageImporter/StbImageImporter.cpp +index c24a968..1a38162 100644 +--- a/src/MagnumPlugins/StbImageImporter/StbImageImporter.cpp ++++ b/src/MagnumPlugins/StbImageImporter/StbImageImporter.cpp +@@ -45,7 +45,7 @@ + #endif + + /* Not defining malloc/free, because there's no equivalent for realloc in C++ */ +-#include "stb_image.h" ++#include "external/stb/stb_image.h" + + namespace Magnum { namespace Trade { + diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL deleted file mode 100644 index abe303a90c9ce7..00000000000000 --- a/ports/magnum-plugins/CONTROL +++ /dev/null @@ -1,88 +0,0 @@ -Source: magnum-plugins -Version: 2019.01-1 -Build-Depends: magnum[core] -Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization -Homepage: https://magnum.graphics/ -Default-Features: ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter - -Feature: assimpimporter -Description: AssimpImporter plugin -Build-Depends: assimp, magnum[anyimageimporter], magnum[trade] - -Feature: openddl -Description: OpenDdl library - -Feature: ddsimporter -Description: DdsImporter plugin -Build-Depends: magnum[trade] - -Feature: devilimageimporter -Description: DevIlImageImporter plugin -Build-Depends: devil, magnum[trade] - -Feature: drflacaudioimporter -Description: DrFlacAudioImporter plugin -Build-Depends: magnum[audio] - -Feature: drwavaudioimporter -Description: DrWavAudioImporter plugin -Build-Depends: magnum[audio] -#Feature: faad2audioimporter -#Description: Faad2AudioImporter plugin -#Build-Depends: magnum[audio], faad2 - -Feature: freetypefont -Description: FreeTypeFont plugin -Build-Depends: freetype, magnum[text] - -Feature: harfbuzzfont -Description: HarfBuzzFont plugin -Build-Depends: harfbuzz, magnum-plugins[freetypefont] - -Feature: jpegimporter -Description: JpegImporter plugin -Build-Depends: libjpeg-turbo, magnum[trade] - -Feature: jpegimageconverter -Description: JpegImageConverter plugin -Build-Depends: libjpeg-turbo, magnum[trade] - -Feature: miniexrimageconverter -Description: MiniExrImageConverter plugin -Build-Depends: magnum[trade] - -Feature: opengeximporter -Description: OpenGexImporter plugin -Build-Depends: magnum[anyimageimporter], magnum[trade], magnum-plugins[openddl] - -Feature: pngimageconverter -Description: PngImageConverter plugin -Build-Depends: libpng, magnum[trade] - -Feature: pngimporter -Description: PngImporter plugin -Build-Depends: libpng, magnum[trade] - -Feature: stanfordimporter -Description: StanfordImporter plugin -Build-Depends: magnum[trade] - -Feature: stbimageconverter -Description: StbImageConverter plugin -Build-Depends: magnum[trade] - -Feature: stbimageimporter -Description: StbImageImporter plugin -Build-Depends: magnum[trade] - -Feature: stbtruetypefont -Description: StbTrueTypeFont plugin -Build-Depends: magnum[text] - -Feature: stbvorbisaudioimporter -Description: StbVorbisAudioImporter plugin -Build-Depends: magnum[audio] - -Feature: tinygltfimporter -Description: TinyGltfImporter plugin -Build-Depends: magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade] diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index c013a0841fa9cd..b3ed961df89687 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -1,45 +1,75 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins - REF v2019.01 - SHA512 482131372671ce0b86b6643f8c584f000db4324fe0f7e32bf9a31febded7b97ab7e947028fe21ce649554d2cff2bc11dfd94fad0006c465911c9f44b28c2d2a5 + REF v2020.06 + SHA512 3c11c2928bfc9d04c1ad64f72b6ffac6cf80a1ef3aacc5d0486b9ad955cf4f6ea6d5dcb3846dc5d73f64ec522a015eafb997f62c79ad7ff91169702341f23af0 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/001-tools-path.patch + 002-fix-stb-conflict.patch ) +if("basisimporter" IN_LIST FEATURES OR "basisimageconverter" IN_LIST FEATURES) + # Bundle Basis Universal, a commit that's before the UASTC support (which + # is not implemented yet). The repo has big unrequired files in its + # history, so we're downloading just a snapshot instead of a git clone. + vcpkg_download_distfile( + _BASIS_UNIVERSAL_PATCHES + URLS "https://github.com/BinomialLLC/basis_universal/commit/e9c55faac7745ebf38d08cd3b4f71aaf542f8191.diff" + FILENAME "e9c55faac7745ebf38d08cd3b4f71aaf542f8191.patch" + SHA512 e5dda11de2ba8cfd39728e69c74a7656bb522e509786fe5673c94b26be9bd4bee897510096479ee6323f5276d34cba1c44c60804a515c0b35ff7b6ac9d625b88 + ) + set(_BASIS_VERSION "8565af680d1bd2ad56ab227ca7d96c56dfbe93ed") + vcpkg_download_distfile( + _BASIS_UNIVERSAL_ARCHIVE + URLS "https://github.com/BinomialLLC/basis_universal/archive/${_BASIS_VERSION}.tar.gz" + FILENAME "basis-universal-${_BASIS_VERSION}.tar.gz" + SHA512 65062ab3ba675c46760f56475a7528189ed4097fb9bab8316e25d9e23ffec2a9560eb9a6897468baf2a6ab2bd698b5907283e96deaeaef178085a47f9d371bb2 + ) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH _BASIS_UNIVERSAL_SOURCE + ARCHIVE ${_BASIS_UNIVERSAL_ARCHIVE} + WORKING_DIRECTORY "${SOURCE_PATH}/src/external" + PATCHES + ${_BASIS_UNIVERSAL_PATCHES}) + # Remove potentially cached directory which would cause renaming to fail + file(REMOVE_RECURSE "${SOURCE_PATH}/src/external/basis-universal") + # Rename the output folder so that magnum auto-detects it + file(RENAME ${_BASIS_UNIVERSAL_SOURCE} "${SOURCE_PATH}/src/external/basis-universal") +endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_PLUGINS_STATIC 1) else() set(BUILD_PLUGINS_STATIC 0) endif() -# Handle features -set(_COMPONENT_FLAGS "") -foreach(_feature IN LISTS ALL_FEATURES) +# Head only features +set(ALL_SUPPORTED_FEATURES ${ALL_FEATURES}) +if(NOT VCPKG_USE_HEAD_VERSION) + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES glslangshaderconverter spirvtoolsshaderconverter) + message(WARNING "Features glslangshaderconverter and spirvtoolsshaderconverter are not avaliable when building non-head version.") +endif() + +set(_COMPONENTS "") +# Generate cmake parameters from feature names +foreach(_feature IN LISTS ALL_SUPPORTED_FEATURES) # Uppercase the feature name and replace "-" with "_" string(TOUPPER "${_feature}" _FEATURE) string(REPLACE "-" "_" _FEATURE "${_FEATURE}") - # Turn "-DWITH_*=" ON or OFF depending on whether the feature - # is in the list. - if(_feature IN_LIST FEATURES) - list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") - else() - list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + # Final feature is empty, ignore it + if(_feature) + list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE}) endif() endforeach() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES ${_COMPONENTS}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS - ${_COMPONENT_FLAGS} + ${FEATURE_OPTIONS} -DBUILD_STATIC=${BUILD_PLUGINS_STATIC} -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d @@ -75,12 +105,22 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) else() set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) + # On windows, plugins are "Modules" that cannot be linked as shared + # libraries, but are meant to be loaded at runtime. + # While this is handled adequately through the CMake project, the auto-magic + # linking with visual studio might try to link the import libs anyway. + # + # We delete the import libraries here to avoid the auto-magic linking + # for plugins which are loaded at runtime. + if(WIN32) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) + endif() endif() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-plugins) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/magnum-plugins/vcpkg.json b/ports/magnum-plugins/vcpkg.json new file mode 100644 index 00000000000000..d4280e76b889a8 --- /dev/null +++ b/ports/magnum-plugins/vcpkg.json @@ -0,0 +1,411 @@ +{ + "name": "magnum-plugins", + "version-string": "2020.06", + "port-version": 7, + "description": "Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization", + "homepage": "https://magnum.graphics/", + "dependencies": [ + { + "name": "magnum", + "default-features": false + } + ], + "default-features": [ + "ddsimporter", + "icoimporter", + "miniexrimageconverter", + "opengeximporter", + "stanfordimporter", + "stanfordsceneconverter", + "stbimageconverter", + "stbimageimporter", + "stlimporter" + ], + "features": { + "assimpimporter": { + "description": "AssimpImporter plugin", + "dependencies": [ + "assimp", + { + "name": "magnum", + "default-features": false, + "features": [ + "anyimageimporter" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "basisimageconverter": { + "description": "BasisImageConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "basisimporter": { + "description": "BasisImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "ddsimporter": { + "description": "DdsImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "devilimageimporter": { + "description": "DevIlImageImporter plugin", + "dependencies": [ + "devil", + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "drflacaudioimporter": { + "description": "DrFlacAudioImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "drmp3audioimporter": { + "description": "DrMp3AudioImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "drwavaudioimporter": { + "description": "DrWavAudioImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "freetypefont": { + "description": "FreeTypeFont plugin", + "dependencies": [ + "freetype", + { + "name": "magnum", + "default-features": false, + "features": [ + "text" + ] + } + ] + }, + "glslangshaderconverter": { + "description": "GlslangShaderConverter plugin", + "dependencies": [ + "glslang", + { + "name": "magnum", + "default-features": false, + "features": [ + "shadertools" + ] + } + ] + }, + "harfbuzzfont": { + "description": "HarfBuzzFont plugin", + "dependencies": [ + "harfbuzz", + { + "name": "magnum-plugins", + "default-features": false, + "features": [ + "freetypefont" + ] + } + ] + }, + "icoimporter": { + "description": "IcoImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "jpegimageconverter": { + "description": "JpegImageConverter plugin", + "dependencies": [ + "libjpeg-turbo", + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "jpegimporter": { + "description": "JpegImporter plugin", + "dependencies": [ + "libjpeg-turbo", + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "meshoptimizersceneconverter": { + "description": "MeshOptimizerSceneConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + }, + "meshoptimizer" + ] + }, + "miniexrimageconverter": { + "description": "MiniExrImageConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "openddl": { + "description": "OpenDdl library" + }, + "opengeximporter": { + "description": "OpenGexImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "anyimageimporter" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + }, + { + "name": "magnum-plugins", + "default-features": false, + "features": [ + "openddl" + ] + } + ] + }, + "pngimageconverter": { + "description": "PngImageConverter plugin", + "dependencies": [ + "libpng", + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "pngimporter": { + "description": "PngImporter plugin", + "dependencies": [ + "libpng", + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "spirvtoolsshaderconverter": { + "description": "SpirvToolsShaderConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "shadertools" + ] + }, + "spirv-tools" + ] + }, + "stanfordimporter": { + "description": "StanfordImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "stanfordsceneconverter": { + "description": "StanfordSceneConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "stbimageconverter": { + "description": "StbImageConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "stbimageimporter": { + "description": "StbImageImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "stbtruetypefont": { + "description": "StbTrueTypeFont plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "text" + ] + } + ] + }, + "stbvorbisaudioimporter": { + "description": "StbVorbisAudioImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "stlimporter": { + "description": "StlImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "tinygltfimporter": { + "description": "TinyGltfImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "anyimageimporter" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + }, + { + "name": "magnum-plugins", + "default-features": false, + "features": [ + "stbimageimporter" + ] + } + ] + } + } +} diff --git a/ports/magnum/001-sdl-includes.patch b/ports/magnum/001-sdl-includes.patch deleted file mode 100644 index b7ae6a44614941..00000000000000 --- a/ports/magnum/001-sdl-includes.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp -index 46ade2d00..24d8eabe7 100644 ---- a/src/Magnum/Platform/Sdl2Application.cpp -+++ b/src/Magnum/Platform/Sdl2Application.cpp -@@ -26,7 +26,7 @@ - #include "Sdl2Application.h" - - #include --#include -+#include - #ifndef CORRADE_TARGET_EMSCRIPTEN - #include - #else -diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h -index 1a50b1c72..45e88edf5 100644 ---- a/src/Magnum/Platform/Sdl2Application.h -+++ b/src/Magnum/Platform/Sdl2Application.h -@@ -46,13 +46,13 @@ - #define SDL_MAIN_HANDLED - #endif - /* SDL.h includes the world, adding 50k LOC. We don't want that either. */ --#include --#include --#include --#include -+#include -+#include -+#include -+#include - - #ifdef CORRADE_TARGET_WINDOWS_RT --#include /* For SDL_WinRTRunApp */ -+#include /* For SDL_WinRTRunApp */ - #include /* For the WinMain entrypoint */ - #endif - diff --git a/ports/magnum/002-sdl-includes.patch b/ports/magnum/002-sdl-includes.patch new file mode 100644 index 00000000000000..fb2ffed8db2b4a --- /dev/null +++ b/ports/magnum/002-sdl-includes.patch @@ -0,0 +1,43 @@ +diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp +index 276c7ee55..90c52f3cb 100644 +--- a/src/Magnum/Platform/Sdl2Application.cpp ++++ b/src/Magnum/Platform/Sdl2Application.cpp +@@ -34,7 +34,7 @@ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpragma-pack" + #endif +-#include ++#include + #ifdef CORRADE_TARGET_CLANG_CL + #pragma clang diagnostic pop + #endif +diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h +index b2426d513..176729fdb 100644 +--- a/src/Magnum/Platform/Sdl2Application.h ++++ b/src/Magnum/Platform/Sdl2Application.h +@@ -57,11 +57,11 @@ + #pragma clang diagnostic ignored "-Wpragma-pack" + #endif + /* SDL.h includes the world, adding 50k LOC. We don't want that either. */ +-#include +-#include +-#include /* huh, why is this not pulled in implicitly?! */ +-#include +-#include ++#include ++#include ++#include /* huh, why is this not pulled in implicitly?! */ ++#include ++#include + + #ifdef CORRADE_TARGET_IOS + /* Including SDL_main.h unconditionally would mean it'd override Corrade::Main +@@ -74,7 +74,7 @@ + #endif + + #ifdef CORRADE_TARGET_WINDOWS_RT +-#include /* For SDL_WinRTRunApp */ ++#include /* For SDL_WinRTRunApp */ + #include /* For the WinMain entrypoint */ + #endif + #ifdef CORRADE_TARGET_CLANG_CL diff --git a/ports/magnum/002-tools-path.patch b/ports/magnum/002-tools-path.patch deleted file mode 100644 index 18a351c2ea06a5..00000000000000 --- a/ports/magnum/002-tools-path.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake -index e63bc03..052006f 100644 ---- a/modules/FindCorrade.cmake -+++ b/modules/FindCorrade.cmake -@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) - if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) - add_executable(Corrade::${_component} IMPORTED) - -- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) -+ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) - mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) - - if(CORRADE_${_COMPONENT}_EXECUTABLE) -diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake -index 8df555d..12f7aa4 100644 ---- a/modules/FindMagnum.cmake -+++ b/modules/FindMagnum.cmake -@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) - if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) - add_executable(Magnum::${_component} IMPORTED) - -- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) -+ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) - mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) - - if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum/003-glfw-find-module.patch b/ports/magnum/003-glfw-find-module.patch deleted file mode 100644 index 8dd37d0105eb4b..00000000000000 --- a/ports/magnum/003-glfw-find-module.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/modules/FindGLFW.cmake b/modules/FindGLFW.cmake -index 5e13798f7..d7cb12b03 100644 ---- a/modules/FindGLFW.cmake -+++ b/modules/FindGLFW.cmake -@@ -64,7 +64,7 @@ if(TARGET glfw) - endif() - - # In case no config file was found, try manually finding the library. --find_library(GLFW_LIBRARY NAMES glfw glfw3) -+find_library(GLFW_LIBRARY NAMES glfw glfw3 glfw3dll) - - # Include dir - find_path(GLFW_INCLUDE_DIR diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL deleted file mode 100644 index cc0720af9ff241..00000000000000 --- a/ports/magnum/CONTROL +++ /dev/null @@ -1,150 +0,0 @@ -Source: magnum -Version: 2019.01-1 -Build-Depends: corrade[utility] -Description: C++11/C++14 graphics middleware for games and data visualization -Homepage: https://magnum.graphics/ -Default-Features: anyimageimporter, anyaudioimporter, anyimageconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, text, texturetools, trade, sdl2application - -Feature: al-info -Description: magnum-al-info utility -Build-Depends: magnum[audio] - -Feature: anyimageimporter -Description: AnyImageImporter plugin -Build-Depends: magnum[trade] - -Feature: anyaudioimporter -Description: AnyAudioImporter plugin -Build-Depends: magnum[audio], corrade[pluginmanager] - -Feature: anyimageconverter -Description: AnyImageConverter plugin -Build-Depends: magnum[trade] - -Feature: anysceneimporter -Description: AnySceneImporter plugin -Build-Depends: magnum[trade] - -Feature: audio -Description: Audio library -Build-Depends: openal-soft - -Feature: debugtools -Description: DebugTools library - -Feature: distancefieldconverter -Description: magnum-distancefieldconverter utility -Build-Depends: magnum[texturetools], magnum[gl] - -Feature: fontconverter -Description: magnum-fontconverter utility -Build-Depends: magnum[text], magnum[gl] - -Feature: gl -Description: GL library - -Feature: gl-info -Description: gl-info utility -Build-Depends: magnum[gl] - -Feature: glfwapplication -Description: GlfwApplication library -Build-Depends: glfw3 - -Feature: imageconverter -Description: magnum-imageconverter utility -Build-Depends: magnum[trade] - -Feature: magnumfont -Description: MagnumFont plugin -Build-Depends: magnum[text] - -Feature: magnumfontconverter -Description: MagnumFontConverter plugin -Build-Depends: magnum[text], magnum[tgaimageconverter] - -Feature: meshtools -Description: MeshTools library -Build-Depends: magnum[trade] - -Feature: objimporter -Description: ObjImporter plugin -Build-Depends: magnum[trade] - -Feature: tgaimageconverter -Description: TgaImageConverter plugin -Build-Depends: magnum[trade] - -Feature: opengltester -Description: OpenGLTester library -Build-Depends: corrade[testsuite], magnum[gl] - -Feature: primitives -Description: Primitives library -Build-Depends: magnum[trade] - -Feature: sdl2application -Description: Sdl2Application library -Build-Depends: sdl2 - -Feature: scenegraph -Description: SceneGraph library - -Feature: shaders -Description: Shaders library -Build-Depends: magnum[gl] - -Feature: text -Description: Text library -Build-Depends: magnum[texturetools], magnum[gl], corrade[pluginmanager] - -Feature: texturetools -Description: TextureTools library - -Feature: tgaimporter -Description: TgaImporter plugin -Build-Depends: magnum[trade] - -Feature: trade -Description: Trade library -Build-Depends: corrade[pluginmanager] - -Feature: wavaudioimporter -Description: WavAudioImporter plugin -Build-Depends: magnum[audio] - -Feature: windowlesswglapplication -Description: WindowlessWglApplication library -Build-Depends: magnum[gl] - -Feature: eglcontext -Description: EglContext library -Build-Depends: magnum[gl] - -Feature: cglcontext -Description: CglContext library -Build-Depends: magnum[gl] - -Feature: glxcontext -Description: GlxContext library -Build-Depends: magnum[gl] - -Feature: wglcontext -Description: WglContext library -Build-Depends: magnum[gl] - -Feature: windowlesseglapplication -Description: WindowlessEglApplication library -Build-Depends: magnum[gl] - -Feature: eglcontext -Description: EglContext library -Build-Depends: magnum[gl] - -Feature: windowlessglxapplication -Description: WindowlessGlxApplication library -Build-Depends: magnum[gl] - -Feature: glxcontext -Description: GlxContext library -Build-Depends: magnum[gl] diff --git a/ports/magnum/magnumdeploy.ps1 b/ports/magnum/magnumdeploy.ps1 index 203f2bac3419ea..c32ed032b9f430 100644 --- a/ports/magnum/magnumdeploy.ps1 +++ b/ports/magnum/magnumdeploy.ps1 @@ -23,16 +23,18 @@ function deployPluginsIfMagnum([string]$targetBinaryDir, [string]$MagnumPluginsD } } - # We detect Magnum modules in use via the DLLs themselves. - # Rather than checking for Magnum*.dll, we check for Magnum.dll and - # Magnum-d.dll to avoid falsly matching MagnumTextureTools.dll for example. + # We detect Magnum modules in use via the DLLs that contain their + # plugin interfaces. if ($targetBinaryName -like "MagnumAudio.dll" -or $targetBinaryName -like "MagnumAudio-d.dll") { deployPlugins "audioimporters" } elseif ($targetBinaryName -like "MagnumText.dll" -or $targetBinaryName -like "MagnumText-d.dll") { deployPlugins "fonts" deployPlugins "fontconverters" - } elseif ($targetBinaryName -like "Magnum.dll" -or $targetBinaryName -like "Magnum-d.dll") { + } elseif ($targetBinaryName -like "MagnumTrade.dll" -or $targetBinaryName -like "MagnumTrade-d.dll") { deployPlugins "importers" deployPlugins "imageconverters" + deployPlugins "sceneconverters" + } elseif ($targetBinaryName -like "MagnumShaderTools.dll" -or $targetBinaryName -like "MagnumShaderTools-d.dll") { + deployPlugins "shaderconverters" } } diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 9b8d3b424e2ea4..d060c4b9a7fb71 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -1,18 +1,11 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum - REF v2019.01 - SHA512 1edce0a38af90bd456a827b073d30d470a13b47797d62ba22001643be7519722c6886498a63be5e2ee65b8649a7eb2c217bbe2cd36ab4f4523d91aaee573ffd5 + REF v2020.06 + SHA512 65b0c8a4520d1d282420c30ecd7c8525525d4dbb6e562e1e2e93d110f4eb686af43f098bf02460727fab1e1f9446dd00a99051e150c05ea40b1486a44fea1042 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch - ${CMAKE_CURRENT_LIST_DIR}/002-tools-path.patch - ${CMAKE_CURRENT_LIST_DIR}/003-glfw-find-module.patch + 002-sdl-includes.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -23,27 +16,65 @@ else() set(BUILD_PLUGINS_STATIC 0) endif() -# Handle features -set(_COMPONENT_FLAGS "") -foreach(_feature IN LISTS ALL_FEATURES) +# Remove platform-specific feature that are not available +# on current target platform from all features. + +# For documentation on VCPKG_CMAKE_SYSTEM_NAME see +# https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md#vcpkg_cmake_system_name + +set(ALL_SUPPORTED_FEATURES ${ALL_FEATURES}) +# Windows Desktop +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES wglcontext windowlesswglapplication) +endif() + +# Universal Windows Platform +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") + # No UWP specific features +endif() + +# Mac OSX +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES cglcontext windowlesscglapplication) +endif() + +# Linux +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES glxcontext windowlessglxapplication) +endif() + +# WebAssembly / Linux +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" MATCHES "(Emscripten|Linux)") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES eglcontext windowlesseglapplication) +endif() + +# Head only features +if(NOT VCPKG_USE_HEAD_VERSION) + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES anyshaderconverter shadertools shaderconverter + vk-info) + message(WARNING "Features anyshaderconverter, shadertools, shaderconverter and vk-info are not avaliable when building non-head version.") +endif() + +set(_COMPONENTS "") +# Generate cmake parameters from feature names +foreach(_feature IN LISTS ALL_SUPPORTED_FEATURES) # Uppercase the feature name and replace "-" with "_" string(TOUPPER "${_feature}" _FEATURE) string(REPLACE "-" "_" _FEATURE "${_FEATURE}") - # Turn "-DWITH_*=" ON or OFF depending on whether the feature - # is in the list. - if(_feature IN_LIST FEATURES) - list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") - else() - list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + # Final feature is empty, ignore it + if(_feature) + list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE}) endif() endforeach() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES ${_COMPONENTS}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS - ${_COMPONENT_FLAGS} + ${FEATURE_OPTIONS} -DBUILD_STATIC=${BUILD_STATIC} -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d @@ -52,56 +83,91 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Drop a copy of tools -if(NOT VCPKG_CMAKE_SYSTEM_NAME) - set(EXE_SUFFIX .exe) -else() - set(EXE_SUFFIX) -endif() +vcpkg_copy_pdbs() -if(distancefieldconverter IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) -endif() -if(fontconverter IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) -endif() -if(al-info IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-al-info${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +# Copy tools into vcpkg's tools directory +set(_TOOL_EXEC_NAMES "") +set(_TOOLS + al-info + distancefieldconverter + fontconverter + gl-info + imageconverter + sceneconverter) +if(VCPKG_USE_HEAD_VERSION) +list(APPEND _TOOLS + shaderconverter + vk-info) endif() -if(magnuminfo IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-info${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) -endif() - -# Tools require dlls -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/magnum) - -file(GLOB_RECURSE TO_REMOVE - ${CURRENT_PACKAGES_DIR}/bin/*${EXE_SUFFIX} - ${CURRENT_PACKAGES_DIR}/debug/bin/*${EXE_SUFFIX}) -if(TO_REMOVE) - file(REMOVE ${TO_REMOVE}) +foreach(_tool IN LISTS _TOOLS) + if("${_tool}" IN_LIST FEATURES) + list(APPEND _TOOL_EXEC_NAMES magnum-${_tool}) + endif() +endforeach() +message(STATUS ${_TOOL_EXEC_NAMES}) +if(_TOOL_EXEC_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${_TOOL_EXEC_NAMES} AUTO_CLEAN) endif() 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) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - # move plugin libs to conventional place - file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) - file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) - file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) else() - file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/magnum) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/magnum-d) -endif() + # Unlike the magnum-plugins port, we cannot remove the lib files entirely here, + # As other importers might depend on them (e.g. AssimpImporter depends on AnyImageImporter) + # and modules are not allowed to have unresolved symbols, hence simply loading the + # dependencies in advance like on Unix does not work on Windows. + # + # On windows, plugins are "Modules" that cannot be linked as shared + # libraries, but are meant to be loaded at runtime. + # While this is handled adequately through the CMake project, the auto-magic + # linking with visual studio might try to link the import libs anyway. + # + # We delete most of the import libraries here to avoid the auto-magic linking + # for plugins which are loaded at runtime, but keep the afforementioned Any* plugins. + # + # See https://github.com/microsoft/vcpkg/pull/1235#issuecomment-308805989 for futher info. + if(WIN32) + file(GLOB_RECURSE LIB_TO_REMOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(GLOB_RECURSE LIB_TO_KEEP ${CURRENT_PACKAGES_DIR}/lib/magnum/*Any*) + if(LIB_TO_KEEP) + list(REMOVE_ITEM LIB_TO_REMOVE ${LIB_TO_KEEP}) + endif() + if(LIB_TO_REMOVE) + file(REMOVE ${LIB_TO_REMOVE}) + endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum/copyright) + file(GLOB_RECURSE LIB_TO_REMOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/*) + file(GLOB_RECURSE LIB_TO_KEEP_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/*Any*) + if(LIB_TO_KEEP_DBG) + list(REMOVE_ITEM LIB_TO_REMOVE_DBG ${LIB_TO_KEEP_DBG}) + endif() + if(LIB_TO_REMOVE_DBG) + file(REMOVE ${LIB_TO_REMOVE_DBG}) + endif() -vcpkg_copy_pdbs() + # fonts and fontconverters don't have Any* plugins + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum/fonts) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum/fontconverters) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/fonts) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d/fontconverters) + endif() + + file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/magnum) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/magnum-d) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/ports/magnum/vcpkg.json b/ports/magnum/vcpkg.json new file mode 100644 index 00000000000000..246c279140b61c --- /dev/null +++ b/ports/magnum/vcpkg.json @@ -0,0 +1,529 @@ +{ + "name": "magnum", + "version-string": "2020.06", + "port-version": 7, + "description": "C++11/C++14 graphics middleware for games and data visualization", + "homepage": "https://magnum.graphics/", + "dependencies": [ + { + "name": "corrade", + "features": [ + "utility" + ] + } + ], + "default-features": [ + "anyaudioimporter", + "anyimageconverter", + "anyimageimporter", + "anysceneconverter", + "anysceneimporter", + "anyshaderconverter", + "debugtools", + "gl", + "meshtools", + "primitives", + "scenegraph", + "sdl2application", + "shaders", + "shadertools", + "text", + "texturetools", + "trade" + ], + "features": { + "al-info": { + "description": "magnum-al-info utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "anyaudioimporter": { + "description": "AnyAudioImporter plugin", + "dependencies": [ + { + "name": "corrade", + "features": [ + "pluginmanager" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "anyimageconverter": { + "description": "AnyImageConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "anyimageimporter": { + "description": "AnyImageImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "anysceneconverter": { + "description": "AnySceneConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "anysceneimporter": { + "description": "AnySceneImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "anyshaderconverter": { + "description": "AnyShaderConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "shadertools" + ] + } + ] + }, + "audio": { + "description": "Audio library", + "dependencies": [ + "openal-soft" + ] + }, + "cglcontext": { + "description": "CglContext library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "debugtools": { + "description": "DebugTools library" + }, + "distancefieldconverter": { + "description": "magnum-distancefieldconverter utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "texturetools" + ] + } + ] + }, + "eglcontext": { + "description": "EglContext library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "fontconverter": { + "description": "magnum-fontconverter utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "text" + ] + } + ] + }, + "gl": { + "description": "GL library" + }, + "gl-info": { + "description": "gl-info utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "glfwapplication": { + "description": "GlfwApplication library", + "dependencies": [ + "glfw3" + ] + }, + "glxcontext": { + "description": "GlxContext library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "imageconverter": { + "description": "magnum-imageconverter utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "magnumfont": { + "description": "MagnumFont plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "text" + ] + } + ] + }, + "magnumfontconverter": { + "description": "MagnumFontConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "text" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "tgaimageconverter" + ] + } + ] + }, + "meshtools": { + "description": "MeshTools library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "objimporter": { + "description": "ObjImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "opengltester": { + "description": "OpenGLTester library", + "dependencies": [ + { + "name": "corrade", + "features": [ + "testsuite" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "primitives": { + "description": "Primitives library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "sceneconverter": { + "description": "magnum-sceneconverter utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "anysceneconverter" + ] + } + ] + }, + "scenegraph": { + "description": "SceneGraph library" + }, + "sdl2application": { + "description": "Sdl2Application library", + "dependencies": [ + "sdl2" + ] + }, + "shaderconverter": { + "description": "magnum-shaderconverter utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "anyshaderconverter", + "shadertools" + ] + } + ] + }, + "shaders": { + "description": "Shaders library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "shadertools": { + "description": "ShaderTools library" + }, + "text": { + "description": "Text library", + "dependencies": [ + { + "name": "corrade", + "features": [ + "pluginmanager" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "texturetools" + ] + } + ] + }, + "texturetools": { + "description": "TextureTools library" + }, + "tgaimageconverter": { + "description": "TgaImageConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "tgaimporter": { + "description": "TgaImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "trade": { + "description": "Trade library", + "dependencies": [ + { + "name": "corrade", + "features": [ + "pluginmanager" + ] + } + ] + }, + "vk": { + "description": "Vk library", + "dependencies": [ + "vulkan" + ] + }, + "vk-info": { + "description": "vk-info utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "vk" + ] + } + ] + }, + "wavaudioimporter": { + "description": "WavAudioImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "wglcontext": { + "description": "WglContext library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "windowlesscglapplication": { + "description": "WindowlessCglApplication library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "windowlesseglapplication": { + "description": "WindowlessEglApplication library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "windowlessglxapplication": { + "description": "WindowlessGlxApplication library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "windowlesswglapplication": { + "description": "WindowlessWglApplication library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + } + } +} diff --git a/ports/mailio/portfile.cmake b/ports/mailio/portfile.cmake new file mode 100644 index 00000000000000..2c3dfb932a6d33 --- /dev/null +++ b/ports/mailio/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO karastojko/mailio + REF 1872f29d88a52f06cd96b611673b2e46c6b9832b # version_0-20-0 + SHA512 1686e49ed2c7163c33f88c820633e772986ecfea5696b78a44b370f44051190b14a1ddcd055bce2a9104324c80e8045cf0441c085eb6f272261da7e80bc4fdb5 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMAILIO_BUILD_SHARED_LIBRARY=${BUILD_SHARED} + -DMAILIO_BUILD_DOCUMENTATION=OFF + -DMAILIO_BUILD_EXAMPLES=OFF +) +vcpkg_cmake_install() + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/mailio/vcpkg.json b/ports/mailio/vcpkg.json new file mode 100644 index 00000000000000..f3c01cd5a5a4cc --- /dev/null +++ b/ports/mailio/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "mailio", + "version": "0.20.0", + "port-version": 1, + "maintainers": "Tomislav Karastojković ", + "description": "mailio is a cross platform C++ library for MIME format and SMTP, POP3 and IMAP protocols. It is based on the standard C++ 17 and Boost library.", + "homepage": "https://github.com/karastojko/mailio", + "license": "BSD-2-clause", + "supports": "!uwp", + "dependencies": [ + "boost-asio", + "boost-date-time", + "boost-regex", + "boost-system", + "openssl", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/mapbox-geojson-cpp/portfile.cmake b/ports/mapbox-geojson-cpp/portfile.cmake new file mode 100644 index 00000000000000..7bef00f68d6c22 --- /dev/null +++ b/ports/mapbox-geojson-cpp/portfile.cmake @@ -0,0 +1,15 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/geojson-cpp + REF v0.5.1 + SHA512 1282bd4a21773c8b300149abc95c4baea7c36facf283d05d18db246a40614625fab1a71e51190c1cdfc80852ea60b2727af9a679661bfede860d822306467037 + HEAD_REF master +) + +# Copy header files +file(COPY ${SOURCE_PATH}/include/mapbox/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/mapbox FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mapbox-geojson-cpp/vcpkg.json b/ports/mapbox-geojson-cpp/vcpkg.json new file mode 100644 index 00000000000000..e3a4f681f2b70b --- /dev/null +++ b/ports/mapbox-geojson-cpp/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "mapbox-geojson-cpp", + "version-semver": "0.5.1", + "description": "A C++14 library for converting GeoJSON into geometry.hpp representation", + "homepage": "https://github.com/mapbox/geojson-cpp", + "dependencies": [ + "mapbox-geometry" + ] +} diff --git a/ports/mapbox-geojson-vt-cpp/portfile.cmake b/ports/mapbox-geojson-vt-cpp/portfile.cmake new file mode 100644 index 00000000000000..324fc9269ff24d --- /dev/null +++ b/ports/mapbox-geojson-vt-cpp/portfile.cmake @@ -0,0 +1,15 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/geojson-vt-cpp + REF v6.6.4 + SHA512 8a78159112be3e6a1a477fbb92e7bd9645b0b174ab6db7ef72557e154d53c3a9fb818d62b6f0d0a5b8b8a9839132c523fb44efa038388d4cd2b46c5bea60d2da + HEAD_REF master +) + +# Copy header files +file(COPY ${SOURCE_PATH}/include/mapbox/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/mapbox FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mapbox-geojson-vt-cpp/vcpkg.json b/ports/mapbox-geojson-vt-cpp/vcpkg.json new file mode 100644 index 00000000000000..e12741484f117f --- /dev/null +++ b/ports/mapbox-geojson-vt-cpp/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "mapbox-geojson-vt-cpp", + "version-semver": "6.6.4", + "description": "Port to C++ of JS GeoJSON-VT for slicing GeoJSON into vector tiles on the fly", + "homepage": "https://github.com/mapbox/geojson-vt-cpp", + "dependencies": [ + "mapbox-geometry" + ] +} diff --git a/ports/mapbox-geometry/portfile.cmake b/ports/mapbox-geometry/portfile.cmake new file mode 100644 index 00000000000000..9ee4065e927e0d --- /dev/null +++ b/ports/mapbox-geometry/portfile.cmake @@ -0,0 +1,15 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/geometry.hpp + REF v2.0.3 + SHA512 76c10578e1fba44430786fb5e043dbc063aa251f62396701a509f7fa1e2e5c351fa0fe041d16be84bda9816ec5df3342cd9890da6fe99d78d6fb26e0a3b2485b + HEAD_REF master +) + +# Copy header files +file(COPY ${SOURCE_PATH}/include/mapbox/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/mapbox FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mapbox-geometry/vcpkg.json b/ports/mapbox-geometry/vcpkg.json new file mode 100644 index 00000000000000..bcde9b38a666c7 --- /dev/null +++ b/ports/mapbox-geometry/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "mapbox-geometry", + "version-semver": "2.0.3", + "description": "C++ geometry types", + "homepage": "https://github.com/mapbox/geometry.hpp" +} diff --git a/ports/mapbox-polylabel/portfile.cmake b/ports/mapbox-polylabel/portfile.cmake new file mode 100644 index 00000000000000..a0c711699241d1 --- /dev/null +++ b/ports/mapbox-polylabel/portfile.cmake @@ -0,0 +1,15 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/polylabel + REF v1.0.4 + SHA512 c337577545e072dbc43b5fc822e7a4fc9585051e24f6af76a3525faee7ab5c332915c43401629ad2e8f1f142f9e920f65347609607aec9394fd6bbc5d4936564 + HEAD_REF master +) + +# Copy header files +file(COPY ${SOURCE_PATH}/include/mapbox/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/mapbox FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mapbox-polylabel/vcpkg.json b/ports/mapbox-polylabel/vcpkg.json new file mode 100644 index 00000000000000..bb26bf6421162a --- /dev/null +++ b/ports/mapbox-polylabel/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "mapbox-polylabel", + "version-semver": "1.0.4", + "description": "A fast algorithm for finding the pole of inaccessibility of a polygon (in JavaScript and C++)", + "homepage": "https://github.com/mapbox/polylabel", + "dependencies": [ + "mapbox-geometry", + "mapbox-variant" + ] +} diff --git a/ports/mapbox-variant/CONTROL b/ports/mapbox-variant/CONTROL deleted file mode 100644 index fad72591188e46..00000000000000 --- a/ports/mapbox-variant/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: mapbox-variant -Version: 1.1.6-0f734f0-1 -Description: C++11/C++14 Variant diff --git a/ports/mapbox-variant/portfile.cmake b/ports/mapbox-variant/portfile.cmake index 60fdd07a78b95d..dc696454ec5ce1 100644 --- a/ports/mapbox-variant/portfile.cmake +++ b/ports/mapbox-variant/portfile.cmake @@ -1,11 +1,9 @@ # header-only -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mapbox/variant - REF 0f734f01e685a298e3756d30044a4164786c58c5 - SHA512 36b842ffbaa7d466c26b4783d68dff17b0079927aca876bd021f439591a4ee5f184c71a60ca59857c35675b2e27cf650bedea7a3cdf9c3fc959c3c0ec3b135eb + REF a2a4858345423a760eca300ec42acad1ad123aa3 # v1.2.0 + SHA512 6d1ad2f37e137c42592dbd618a3871008d4f83b3cb0d6f05a9c469a6a987ed3fc7f0416ae341646d73e69426903a5a4f64b9f41ae739fd940bbd304dfcae289e HEAD_REF master ) diff --git a/ports/mapbox-variant/vcpkg.json b/ports/mapbox-variant/vcpkg.json new file mode 100644 index 00000000000000..91f0b61eca10a1 --- /dev/null +++ b/ports/mapbox-variant/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "mapbox-variant", + "version-string": "1.2.0", + "port-version": 1, + "description": "C++11/C++14 Variant" +} diff --git a/ports/mapbox-wagyu/portfile.cmake b/ports/mapbox-wagyu/portfile.cmake new file mode 100644 index 00000000000000..b43c60ce2ca0c4 --- /dev/null +++ b/ports/mapbox-wagyu/portfile.cmake @@ -0,0 +1,15 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/wagyu + REF 0.5.0 + SHA512 d2ef6c056b25e60677da4f53154790558ddb43c56aa117a4d5108f8c7686cceff9e5d54d71138e2eb504f053315d28f7cb8190ff45833c5606d511b685acf40d + HEAD_REF master +) + +# Copy header files +file(COPY ${SOURCE_PATH}/include/mapbox/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/mapbox FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mapbox-wagyu/vcpkg.json b/ports/mapbox-wagyu/vcpkg.json new file mode 100644 index 00000000000000..8da0b64441f4ee --- /dev/null +++ b/ports/mapbox-wagyu/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "mapbox-wagyu", + "version-semver": "0.5.0", + "description": "A general library for geometry operations of union, intersections, difference, and xor", + "homepage": "https://github.com/mapbox/wagyu" +} diff --git a/ports/mapnik/portfile.cmake b/ports/mapnik/portfile.cmake new file mode 100644 index 00000000000000..bc19d4ab9641b7 --- /dev/null +++ b/ports/mapnik/portfile.cmake @@ -0,0 +1,113 @@ +# test application for this port: https://github.com/mathisloge/mapnik-vcpkg-test + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapnik/mapnik + REF 1ccbbf95b5e7bf254ab5b4dc21bdc373978c36a1 + SHA512 21b4fc6e64d9b53550a046c5c9bcc32524324d7df39816b74b23a7ce2a64c4eeb291ad1c1aa09a3d5d79158f889ba8b7182cd0bf3435c39d1f17f33e4ffdce05 + HEAD_REF master + PATCHES + use-proj.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "jpeg" USE_JPEG + "png" USE_PNG + "tiff" USE_TIFF + "webp" USE_WEBP + "libxml2" USE_LIBXML2 + "cairo" USE_CAIRO + "proj" USE_PROJ + "grid-renderer" USE_GRID_RENDERER + "svg-renderer" USE_SVG_RENDERER + "input-csv" USE_PLUGIN_INPUT_CSV + "input-gdal" USE_PLUGIN_INPUT_GDAL + "input-geobuf" USE_PLUGIN_INPUT_GEOBUF + "input-geojson" USE_PLUGIN_INPUT_GEOJSON + "input-ogr" USE_PLUGIN_INPUT_OGR + "input-pgraster" USE_PLUGIN_INPUT_PGRASTER + "input-postgis" USE_PLUGIN_INPUT_POSTGIS + "input-raster" USE_PLUGIN_INPUT_RASTER + "input-shape" USE_PLUGIN_INPUT_SHAPE + "input-sqlite" USE_PLUGIN_INPUT_SQLITE + "input-topojson" USE_PLUGIN_INPUT_TOPOJSON + "viewer" BUILD_DEMO_VIEWER + "demo" BUILD_DEMO_CPP + "utility-geometry-to-wkb" BUILD_UTILITY_GEOMETRY_TO_WKB + "utility-mapnik-index" BUILD_UTILITY_MAPNIK_INDEX + "utility-mapnik-render" BUILD_UTILITY_MAPNIK_RENDER + "utility-ogrindex" BUILD_UTILITY_OGRINDEX + "utility-pgsql2sqlite" BUILD_UTILITY_PGSQL2SQLITE + "utility-shapeindex" BUILD_UTILITY_SHAPEINDEX + "utility-svg2png" BUILD_UTILITY_SVG2PNG +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DCOPY_LIBRARIES_FOR_EXECUTABLES=OFF + -DCOPY_FONTS_AND_PLUGINS_FOR_EXECUTABLES=OFF + -DINSTALL_DEPENDENCIES=OFF + -DBUILD_TEST=OFF + -DBUILD_BENCHMARK=OFF + -DUSE_EXTERNAL_MAPBOX_GEOMETRY=ON + -DUSE_EXTERNAL_MAPBOX_POLYLABEL=ON + -DUSE_EXTERNAL_MAPBOX_PROTOZERO=ON + -DUSE_EXTERNAL_MAPBOX_VARIANT=ON + -DINSTALL_CMAKE_DIR=share/mapnik/cmake + -DFONTS_INSTALL_DIR=share/mapnik/fonts +) + +vcpkg_cmake_install() + +# copy plugins into tool path, if any plugin is installed +if(IS_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin/plugins") + file(COPY "${CURRENT_PACKAGES_DIR}/bin/plugins" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") +endif() +vcpkg_copy_pdbs() + +if("demo" IN_LIST FEATURES) + file(COPY "${SOURCE_PATH}/demo/data" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/demo") + vcpkg_copy_tools(TOOL_NAMES mapnik-demo AUTO_CLEAN) +endif() + +if("viewer" IN_LIST FEATURES) + # copy the ini file to reference the plugins correctly + file(COPY "${CURRENT_PACKAGES_DIR}/bin/viewer.ini" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + vcpkg_copy_tools(TOOL_NAMES mapnik-viewer AUTO_CLEAN) +endif() + +if("utility-geometry-to-wkb" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES geometry_to_wkb AUTO_CLEAN) +endif() + +if("utility-mapnik-index" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES mapnik-index AUTO_CLEAN) +endif() +if("utility-mapnik-render" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES mapnik-render AUTO_CLEAN) +endif() +if("utility-ogrindex" IN_LIST FEATURES) + # build is currently not supported + # vcpkg_copy_tools(TOOL_NAMES ogrindex AUTO_CLEAN) +endif() +if("utility-pgsql2sqlite" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES pgsql2sqlite AUTO_CLEAN) +endif() +if("utility-shapeindex" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES shapeindex AUTO_CLEAN) +endif() +if("utility-svg2png" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES svg2png AUTO_CLEAN) +endif() + +vcpkg_cmake_config_fixup(CONFIG_PATH share/mapnik/cmake) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${SOURCE_PATH}/fonts/unifont_license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME fonts_copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/mapnik/usage b/ports/mapnik/usage new file mode 100644 index 00000000000000..3bd0f4a014c75d --- /dev/null +++ b/ports/mapnik/usage @@ -0,0 +1,9 @@ +The package mapnik provides CMake targets: + + find_package(mapnik CONFIG REQUIRED) + target_link_libraries(main PRIVATE mapnik::mapnik mapnik::json mapnik::wkt) + +If you only need the compile definitions without any sources, use target mapnik::core. + +If any plugins were installed, the variable ${MAPNIK_PLUGINS_DIR} contains the plugin directory +Fonts are available with the variable ${MAPNIK_FONTS_DIR} diff --git a/ports/mapnik/use-proj.patch b/ports/mapnik/use-proj.patch new file mode 100644 index 00000000000000..35e588e37fc494 --- /dev/null +++ b/ports/mapnik/use-proj.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54dda37..e82a817 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -254,21 +254,21 @@ endif() + + if(USE_PROJ) + #https://proj.org/development/cmake.html + mapnik_find_package(PROJ QUIET) + # currently the cmake files are not installed, when installing proj via apt-get. So search via pkg-config + if(NOT PROJ_FOUND) + message(STATUS "PROJ not found via FindPROJ. Searching via pkg-config...") + pkg_check_modules(PROJ REQUIRED IMPORTED_TARGET proj) + string(REGEX MATCH "([0-9]+)\.([0-9]+)\.([0-9]+)" _dummy "${PROJ_VERSION}") + set(PROJ_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(PROJ_VERSION_MINOR "${CMAKE_MATCH_2}") + set(PROJ_VERSION_PATCH "${CMAKE_MATCH_3}") + endif() + math(EXPR MAPNIK_PROJ_VERSION "${PROJ_VERSION_MAJOR}*10000 + ${PROJ_VERSION_MINOR}*100 + ${PROJ_VERSION_PATCH}" OUTPUT_FORMAT DECIMAL) + message(STATUS "Using mapnik PROJ version: ${MAPNIK_PROJ_VERSION}") + list(APPEND MAPNIK_COMPILE_DEFS MAPNIK_USE_PROJ MAPNIK_PROJ_VERSION=${MAPNIK_PROJ_VERSION}) +- list(APPEND MAPNIK_OPTIONAL_LIBS ${PROJ_LIBRARIES}) +- list(APPEND MAPNIK_OPTIONAL_LIBS_INCLUDE ${PROJ_INCLUDE_DIRS}) ++ list(APPEND MAPNIK_OPTIONAL_LIBS ${PROJ_LIBRARIES}) ++ # list(APPEND MAPNIK_OPTIONAL_LIBS_INCLUDE ${PROJ_INCLUDE_DIRS}) # this adds some non existent directory when building with vcpgk -> commented out + endif() + + if(USE_GRID_RENDERER) diff --git a/ports/mapnik/vcpkg.json b/ports/mapnik/vcpkg.json new file mode 100644 index 00000000000000..c6aebcc527709d --- /dev/null +++ b/ports/mapnik/vcpkg.json @@ -0,0 +1,227 @@ +{ + "name": "mapnik", + "version-date": "2021-09-15", + "description": "Mapnik is an open source toolkit for developing mapping applications.", + "homepage": "https://github.com/mapnik/mapnik", + "supports": "!(static & windows)", + "dependencies": [ + "boost-assign", + "boost-bimap", + "boost-filesystem", + "boost-geometry", + "boost-gil", + "boost-interprocess", + { + "name": "boost-locale", + "features": [ + "icu" + ] + }, + "boost-msm", + "boost-property-tree", + { + "name": "boost-regex", + "features": [ + "icu" + ] + }, + "boost-spirit", + "boost-system", + { + "name": "freetype", + "features": [ + "bzip2", + "png" + ] + }, + { + "name": "harfbuzz", + "features": [ + "icu" + ] + }, + "icu", + "mapbox-geometry", + "mapbox-polylabel", + "mapbox-variant", + "protozero", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "default-features": [ + "grid-renderer", + "jpeg", + "png", + "proj", + "svg-renderer", + "tiff", + "webp" + ], + "features": { + "cairo": { + "description": "Cairo renderer", + "dependencies": [ + "cairo", + "cairomm" + ] + }, + "demo": { + "description": "Make demo application" + }, + "grid-renderer": { + "description": "Grid renderer" + }, + "input-csv": { + "description": "CSV input plugin" + }, + "input-gdal": { + "description": "GDAL input plugin", + "dependencies": [ + "gdal" + ] + }, + "input-geobuf": { + "description": "GEOBUF input plugin", + "dependencies": [ + "protozero" + ] + }, + "input-geojson": { + "description": "GEOJSON input plugin" + }, + "input-ogr": { + "description": "OGR input plugin", + "dependencies": [ + "gdal" + ] + }, + "input-pgraster": { + "description": "PGRASTER input plugin", + "dependencies": [ + "libodb-pgsql", + "libpq" + ] + }, + "input-postgis": { + "description": "POSTGIS input plugin", + "dependencies": [ + "libodb-pgsql", + "libpq" + ] + }, + "input-raster": { + "description": "RASTER input plugin" + }, + "input-shape": { + "description": "SHAPE input plugin" + }, + "input-sqlite": { + "description": "SQLITE input plugin", + "dependencies": [ + "sqlite3" + ] + }, + "input-topojson": { + "description": "TOPOJSON input plugin" + }, + "jpeg": { + "description": "add jpeg support", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "libxml2": { + "description": "use libxml2 instead of rapidxml", + "dependencies": [ + "libxml2" + ] + }, + "png": { + "description": "add png support", + "dependencies": [ + "libpng" + ] + }, + "proj": { + "description": "PROJ Functionalities", + "dependencies": [ + { + "name": "proj4", + "features": [ + "database" + ] + } + ] + }, + "svg-renderer": { + "description": "SVG renderer" + }, + "tiff": { + "description": "add tiff support", + "dependencies": [ + "tiff" + ] + }, + "utility-geometry-to-wkb": { + "description": "utility application geometry-to-wkb", + "dependencies": [ + "boost-program-options" + ] + }, + "utility-mapnik-index": { + "description": "utility application mapnik-index", + "dependencies": [ + "boost-program-options" + ] + }, + "utility-mapnik-render": { + "description": "utility application mapnik-render", + "dependencies": [ + "boost-program-options" + ] + }, + "utility-ogrindex": { + "description": "utility application ogrindex" + }, + "utility-pgsql2sqlite": { + "description": "utility application pgsql2sqlite", + "dependencies": [ + "boost-program-options", + "libodb-pgsql", + "libpq", + "sqlite3" + ] + }, + "utility-shapeindex": { + "description": "utility application shapeindex", + "dependencies": [ + "boost-program-options" + ] + }, + "utility-svg2png": { + "description": "utility application svg2png", + "dependencies": [ + "boost-program-options" + ] + }, + "viewer": { + "description": "Make demo viewer application", + "dependencies": [ + "qt5-base" + ] + }, + "webp": { + "description": "add webp support", + "dependencies": [ + "libwebp" + ] + } + } +} diff --git a/ports/marble/portfile.cmake b/ports/marble/portfile.cmake new file mode 100644 index 00000000000000..173892360c496b --- /dev/null +++ b/ports/marble/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_fail_port_install(ON_TARGET "LINUX" "OSX" "UWP" "ANDROID" ON_ARCH "arm" "x86" ON_LIBRARY_LINKAGE "static") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/marble + REF 552cb9ae1f34482d1ec56532a703e0d820856286 #v20.04.3 + SHA512 ac6106a6db53534c96d7281b1a07624c2852ed8c78cce0b91c5f865b106487f1f49aaa4c72d00ffb1f79a761d8d2eca18129ef9517bef463a1840554ed3e51fb + HEAD_REF master + PATCHES "qtfix.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_I18n=ON + -DWITH_KF5=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +# Install plugins and data files +file(GLOB_RECURSE PLUGINS "${CURRENT_PACKAGES_DIR}/plugins/*") +file(GLOB_RECURSE PLUGINS_DESIGNER "${CURRENT_PACKAGES_DIR}/lib/plugins/*") +file(GLOB_RECURSE PLUGINS_DEBUG "${CURRENT_PACKAGES_DIR}/debug/lib/plugins/*") +file(GLOB_RECURSE MKSPECS "${CURRENT_PACKAGES_DIR}/mkspecs/*") + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(COPY ${PLUGINS} ${PLUGINS_DESIGNER} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/plugins) +file(COPY ${PLUGINS_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/plugins) +file(COPY "${CURRENT_PACKAGES_DIR}/data" DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) # have to keep folder structure here +file(COPY ${MKSPECS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/mkspecs) + +# remove plugin folder +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/plugins ${CURRENT_PACKAGES_DIR}/debug/plugins + ${CURRENT_PACKAGES_DIR}/data ${CURRENT_PACKAGES_DIR}/debug/data + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/mkspecs ${CURRENT_PACKAGES_DIR}/debug/mkspecs + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/lib/plugins ${CURRENT_PACKAGES_DIR}/lib/plugins +) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/marble/qtfix.patch b/ports/marble/qtfix.patch new file mode 100644 index 00000000000000..39a420be02ce3a --- /dev/null +++ b/ports/marble/qtfix.patch @@ -0,0 +1,97 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3b2139dc..1f9a10513 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -171,7 +171,7 @@ set (PEDANTIC FALSE CACHE BOOL "Determines if we should compile with -Wall -Werr + set (WITH_DESIGNER_PLUGIN TRUE CACHE BOOL "Build plugins for Qt Designer") + add_feature_info("Qt Designer plugins" WITH_DESIGNER_PLUGIN "Marble widget support in Qt Designer. Toggle with WITH_DESIGNER_PLUGIN=YES/NO") + +-set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory for executables and libraries" FORCE) ++set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "Base directory for executables and libraries" FORCE) + if (NOT QT_PLUGINS_DIR) + set(QT_PLUGINS_DIR ${CMAKE_INSTALL_LIBDIR}/plugins) + endif() +@@ -248,7 +248,7 @@ add_definitions( + -DQT_NO_URL_CAST_FROM_STRING + -DQT_NO_CAST_TO_ASCII + -DQT_NO_CAST_FROM_BYTEARRAY +- -DQT_STRICT_ITERATORS ++# -DQT_STRICT_ITERATORS + -DQT_DISABLE_DEPRECATED_BEFORE=0x050700 + ) + +diff --git a/src/apps/marble-qt/CMakeLists.txt b/src/apps/marble-qt/CMakeLists.txt +index d28e3aa5e..7bbf4a63c 100644 +--- a/src/apps/marble-qt/CMakeLists.txt ++++ b/src/apps/marble-qt/CMakeLists.txt +@@ -48,7 +48,7 @@ if(STATIC_BUILD) + endif(STATIC_BUILD) + + if(WIN32) +-install (TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}) ++ install (TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/marble) + else(WIN32) + if (APPLE) + # No need for this when installing to a bundle +diff --git a/src/lib/astro/CMakeLists.txt b/src/lib/astro/CMakeLists.txt +index 5e1afd60f..fc53985f4 100644 +--- a/src/lib/astro/CMakeLists.txt ++++ b/src/lib/astro/CMakeLists.txt +@@ -50,7 +50,7 @@ target_include_directories(astro + + # choose the correct target install library path + if(WIN32) +- INSTALL(TARGETS astro EXPORT AstroTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) ++ INSTALL(TARGETS astro EXPORT AstroTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) + elseif(APPLE) + INSTALL(TARGETS astro LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) + else() +diff --git a/src/lib/marble/CMakeLists.txt b/src/lib/marble/CMakeLists.txt +index 7d27be94b..f1f377967 100644 +--- a/src/lib/marble/CMakeLists.txt ++++ b/src/lib/marble/CMakeLists.txt +@@ -448,7 +448,7 @@ target_include_directories(marblewidget + + # choose the correct target install library path + if(WIN32) +- install(TARGETS marblewidget EXPORT MarbleTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) ++ install(TARGETS marblewidget EXPORT MarbleTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) + elseif(APPLE) + install(TARGETS marblewidget LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) + else() +diff --git a/src/lib/marble/declarative/CMakeLists.txt b/src/lib/marble/declarative/CMakeLists.txt +index dd5d519c4..482a02ad5 100644 +--- a/src/lib/marble/declarative/CMakeLists.txt ++++ b/src/lib/marble/declarative/CMakeLists.txt +@@ -53,7 +53,7 @@ if(Qt5Positioning_FOUND) + endif() + + if(WIN32) +- install(TARGETS marbledeclarative RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) ++ install(TARGETS marbledeclarative RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) + else() + install(TARGETS marbledeclarative LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +diff --git a/src/plugins/positionprovider/CMakeLists.txt b/src/plugins/positionprovider/CMakeLists.txt +index 85591098e..87011876e 100644 +--- a/src/plugins/positionprovider/CMakeLists.txt ++++ b/src/plugins/positionprovider/CMakeLists.txt +@@ -12,12 +12,12 @@ find_package(Qt5 ${REQUIRED_QT_VERSION} + COMPONENTS + Positioning + ) +-marble_set_package_properties( Qt5Positioning PROPERTIES DESCRIPTION "a collection of APIs and frameworks" ) +-marble_set_package_properties( Qt5Positioning PROPERTIES URL "https://www.qt.io/developers/" ) +-marble_set_package_properties( Qt5Positioning PROPERTIES TYPE OPTIONAL PURPOSE "position information via Qt5Positioning" ) +-if(Qt5Positioning_FOUND) +- ADD_SUBDIRECTORY( qtpositioning ) +-endif() ++#marble_set_package_properties( Qt5Positioning PROPERTIES DESCRIPTION "a collection of APIs and frameworks" ) ++#marble_set_package_properties( Qt5Positioning PROPERTIES URL "https://www.qt.io/developers/" ) ++#arble_set_package_properties( Qt5Positioning PROPERTIES TYPE OPTIONAL PURPOSE "position information via Qt5Positioning" ) ++#if(Qt5Positioning_FOUND) ++# ADD_SUBDIRECTORY( qtpositioning ) ++#endif() + + + macro_optional_find_package(libwlocate) diff --git a/ports/marble/vcpkg.json b/ports/marble/vcpkg.json new file mode 100644 index 00000000000000..bf8d085c05819c --- /dev/null +++ b/ports/marble/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "marble", + "version-string": "19.08.2", + "port-version": 2, + "description": "Marble KDE library", + "homepage": "https://marble.kde.org", + "supports": "windows & x64 & !static", + "dependencies": [ + "qt5-base", + "qt5-quickcontrols", + "qt5-svg", + "qt5-webchannel" + ] +} diff --git a/ports/marl/portfile.cmake b/ports/marl/portfile.cmake new file mode 100644 index 00000000000000..53e13ef79c311a --- /dev/null +++ b/ports/marl/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/marl + REF 4c1b662da7d7a35f0fba9156a08cb49d129f5189 #2021-04-25 + SHA512 a3f8f65ef870075fac96dc67e8efbbe62596787a623aab02509c34f80a7cae523412d4bf94450c400a4637a0fffee6ef0cbf8f38286707e9d001e628cc11177f + HEAD_REF main +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MARL_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMARL_BUILD_SHARED=${MARL_BUILD_SHARED} + -DMARL_INSTALL=ON +) + +vcpkg_install_cmake() + +if(MARL_BUILD_SHARED) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/marl/export.h" + "#ifdef MARL_DLL" + "#if 1 // #ifdef MARL_DLL" + ) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/marl/vcpkg.json b/ports/marl/vcpkg.json new file mode 100644 index 00000000000000..30c2aa24008f73 --- /dev/null +++ b/ports/marl/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "marl", + "version-date": "2021-04-25", + "description": "A hybrid thread/fiber task scheduler written in modern C++", + "homepage": "https://github.com/google/marl", + "license": "Apache-2.0", + "supports": "!uwp" +} diff --git a/ports/mathc/CMakeLists.txt b/ports/mathc/CMakeLists.txt new file mode 100644 index 00000000000000..7c221bec1a2cf4 --- /dev/null +++ b/ports/mathc/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.14) + +project(mathc LANGUAGES C) + +include(GNUInstallDirs) + +add_library(mathc mathc.c) + +target_include_directories( + mathc + PUBLIC + $ +) + +set_target_properties(mathc PROPERTIES PUBLIC_HEADER mathc.h) + +install(TARGETS mathc EXPORT unofficial-mathc-config) + +install( + EXPORT unofficial-mathc-config + NAMESPACE unofficial::mathc:: + DESTINATION share/unofficial-mathc + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/ports/mathc/portfile.cmake b/ports/mathc/portfile.cmake new file mode 100644 index 00000000000000..fde284632ed8d0 --- /dev/null +++ b/ports/mathc/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO felselva/mathc + REF d672725203fc80f6f79fba64533b87d51c32d714 + SHA512 6db96b7ca9b26745b6ead774b547f6cccdecaef0b55cb766d4f26ae7149bbb72e2bd877cb7994455bd19cae129d014efaf40b50395b1114b7ac95dc6ed53bf34 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/mathc/vcpkg.json b/ports/mathc/vcpkg.json new file mode 100644 index 00000000000000..1cabd8c53af394 --- /dev/null +++ b/ports/mathc/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mathc", + "version-string": "2019-09-29", + "port-version": 1, + "description": "Pure C math library for 2D and 3D programming", + "homepage": "https://github.com/felselva/mathc" +} diff --git a/ports/mathgl/CONTROL b/ports/mathgl/CONTROL deleted file mode 100644 index 9337e5f2dd2fa1..00000000000000 --- a/ports/mathgl/CONTROL +++ /dev/null @@ -1,48 +0,0 @@ -Source: mathgl -Version: 2.4.3-1 -Description: MathGL is a free library of fast C++ routines for the plotting of the data varied in one or more dimensions -Default-Features: opengl, jpeg, png, zlib - -Feature: hdf5 -Build-Depends: hdf5 -Description: hdf5 module - -Feature: fltk -Build-Depends: fltk -Description: fltk module - -Feature: gif -Build-Depends: giflib -Description: gif module - -Feature: png -Build-Depends: libpng -Description: png module - -Feature: zlib -Build-Depends: zlib -Description: zlib module - -Feature: jpeg -Build-Depends: libjpeg-turbo -Description: jpeg module - -Feature: gsl -Build-Depends: gsl -Description: gsl module - -Feature: opengl -Build-Depends: opengl -Description: opengl module - -Feature: glut -Build-Depends: freeglut -Description: glut module - -Feature: wx -Build-Depends: wxwidgets -Description: wx module - -Feature: qt5 -Build-Depends: qt5 -Description: qt5 module diff --git a/ports/mathgl/fix_cmakelists_and_cpp.patch b/ports/mathgl/fix_cmakelists_and_cpp.patch new file mode 100644 index 00000000000000..a929f1ebe8f059 --- /dev/null +++ b/ports/mathgl/fix_cmakelists_and_cpp.patch @@ -0,0 +1,153 @@ +diff --git a/mgllab/CMakeLists.txt b/mgllab/CMakeLists.txt +index 1649104..eeec1c1 100644 +--- a/mgllab/CMakeLists.txt ++++ b/mgllab/CMakeLists.txt +@@ -38,7 +38,11 @@ if(MGL_HAVE_FLTK) + set(mgllab_src ${mgllab_src} mgllab.rc) + endif(WIN32) + add_executable(mgllab ${mgllab_src} ${mgllab_hdr}) +- target_link_libraries(mgllab mgl mgl-fltk ${FLTK_LIBRARIES}) ++ if(WIN32) ++ target_link_libraries(mgllab mgl mgl-fltk mgl-fltk-static mgl-static getopt-static ${FLTK_LIBRARIES}) ++ else(WIN32) ++ target_link_libraries(mgllab mgl mgl-fltk ${FLTK_LIBRARIES}) ++ endif(WIN32) + install( + TARGETS mgllab + RUNTIME DESTINATION bin ) +diff --git a/mgllab/table.cpp b/mgllab/table.cpp +index 5243549..23eebe5 100644 +--- a/mgllab/table.cpp ++++ b/mgllab/table.cpp +@@ -559,8 +559,13 @@ public: + o->tooltip(_("Change data values and close this window")); + w->set_modal(); w->end(); + } +- double min() { return wmin->value(); } +- double max() { return wmax->value(); } ++ #if WIN32 ++ double _min() { return wmin->value(); } ++ double _max() { return wmax->value(); } ++ #else ++ double min() { return wmin->value(); } ++ double max() { return wmax->value(); } ++ #endif + int sym() { return wsym->value(); } + bool ok() { return !result.empty(); } + void cb_ok() +@@ -581,8 +586,14 @@ void fill_cb(Fl_Widget*, void*v) + HMDT d = dynamic_cast(e->var); + HADT c = dynamic_cast(e->var); + char ch = nrm_dlg.result[0]; +- if(d) { d->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); } +- if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); } ++ #if WIN32 ++ if(d) { d->Fill(nrm_dlg._min(),nrm_dlg._max(),ch); e->refresh(); } ++ if(c) { c->Fill(nrm_dlg._min(),nrm_dlg._max(),ch); e->refresh(); } ++ #else ++ if(d) { d->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); } ++ if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); } ++ #endif ++ + } + } + //----------------------------------------------------------------------------- +@@ -594,8 +605,13 @@ void normal_cb(Fl_Widget*, void*v) + { + HMDT d = dynamic_cast(e->var); + HADT c = dynamic_cast(e->var); +- if(d) { d->Norm(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); } +- if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); } ++ #if WIN32 ++ if(d) { d->Norm(nrm_dlg._min(),nrm_dlg._max(),nrm_dlg.sym()); e->refresh(); } ++ if(c) { c->Fill(nrm_dlg._min(),nrm_dlg._max(),nrm_dlg.sym()); e->refresh(); } ++ #else ++ if(d) { d->Norm(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); } ++ if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); } ++ #endif + } + } + //----------------------------------------------------------------------------- +diff --git a/src/parser.cpp b/src/parser.cpp +index 577191d..e6909a1 100644 +--- a/src/parser.cpp ++++ b/src/parser.cpp +@@ -58,7 +58,10 @@ void mglParser::FillBaseCmd() + HMDT MGL_NO_EXPORT mglFormulaCalc(std::wstring string, mglParser *arg, const std::vector &head); + HADT MGL_NO_EXPORT mglFormulaCalcC(std::wstring string, mglParser *arg, const std::vector &head); + //----------------------------------------------------------------------------- ++#ifndef MGL_ASK_FUNC ++#define MGL_ASK_FUNC + MGL_EXPORT void (*mgl_ask_func)(const wchar_t *, wchar_t *)=0; ++#endif + void MGL_EXPORT mgl_ask_gets(const wchar_t *quest, wchar_t *res) + { printf("%ls\n",quest); if(!fgetws(res,1024,stdin)) *res=0; } + //----------------------------------------------------------------------------- +@@ -69,7 +72,10 @@ void MGL_EXPORT mgl_progress_txt(int value, int maximal, HMGL) + else for(int i=prev;i anim; + mglParse p(true); +diff --git a/include/mgl2/datac.h b/include/mgl2/datac.h +index f2c0251..0e69de7 100644 +--- a/include/mgl2/datac.h ++++ b/include/mgl2/datac.h +@@ -474,7 +474,7 @@ using mglDataA::Momentum; + void set_v(mreal val, long i,long j=0,long k=0) { a[i+nx*(j+ny*k)]=val; } + #else + /// Get the value in given cell of the data with border checking +- mreal v(long i,long j=0,long k=0) const { return mgl_abs(mgl_datac_get_value(this,i,j,k)); } ++ mreal v(long i,long j=0,long k=0) const { return abs(a[i+nx*(j+ny*k)]); } + /// Set the value in given cell of the data + void set_v(mreal val, long i,long j=0,long k=0) { mgl_datac_set_value(this,val,i,j,k); } + #endif +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d0c779d..acd9d7f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -579,10 +579,15 @@ if(enable-glut) + if(NOT MGL_HAVE_OPENGL) + message(SEND_ERROR "You have to enable OpenGL if you plan to use GLUT.") + endif(NOT MGL_HAVE_OPENGL) +- include(FindGLUT) ++ find_path(GLUT_INCLUDE_DIR freeglut.h PATH_SUFFIXES GL) ++ include(SelectLibraryConfigurations) ++ find_library(GLUT_LIBRARY_RELEASE NAMES freeglut) ++ find_library(GLUT_LIBRARY_DEBUG NAMES freeglutd) ++ select_library_configurations(GLUT) + if(NOT GLUT_FOUND) + message(SEND_ERROR "Couldn't find GLUT library.") + endif(NOT GLUT_FOUND) ++ include_directories(${GLUT_INCLUDE_DIR}/GL) + else(enable-glut) + set(MGL_HAVE_GLUT 0) + endif(enable-glut) diff --git a/ports/mathgl/portfile.cmake b/ports/mathgl/portfile.cmake index d17707c64574d3..af6a6914084754 100644 --- a/ports/mathgl/portfile.cmake +++ b/ports/mathgl/portfile.cmake @@ -1,90 +1,34 @@ -include(vcpkg_common_functions) - set(MATHGL_VERSION "2.4.3") -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/mathgl/mathgl/mathgl%20${MATHGL_VERSION}/mathgl-${MATHGL_VERSION}.tar.gz" - FILENAME "mathgl-${MATHGL_VERSION}.tar.gz" - SHA512 e47fc8171ce80c8b33a8f03d9375bc036455dae539b47cf4ee922f8fa36f5afcf8b3f0666997764e453eb698c0e8c03da36dd0ac2bf71c158e95309b247d27de -) -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${MATHGL_VERSION} - PATCHES - type_fix.patch +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO mathgl/mathgl + REF mathgl%20${MATHGL_VERSION} + FILENAME "mathgl-${MATHGL_VERSION}.tar.gz" + SHA512 e47fc8171ce80c8b33a8f03d9375bc036455dae539b47cf4ee922f8fa36f5afcf8b3f0666997764e453eb698c0e8c03da36dd0ac2bf71c158e95309b247d27de + PATCHES + type_fix.patch + fix_cmakelists_and_cpp.patch ) -set(enable-hdf5 OFF) -if("hdf5" IN_LIST FEATURES) - set(enable-hdf5 ON) -endif() - -set(enable-fltk OFF) -if("fltk" IN_LIST FEATURES) - set(enable-fltk ON) -endif() - -set(enable-gif OFF) -if("gif" IN_LIST FEATURES) - set(enable-gif ON) -endif() - -set(enable-png OFF) -if("png" IN_LIST FEATURES) - set(enable-png ON) -endif() - -set(enable-zlib OFF) -if("zlib" IN_LIST FEATURES) - set(enable-zlib ON) -endif() - -set(enable-jpeg OFF) -if("jpeg" IN_LIST FEATURES) - set(enable-jpeg ON) -endif() - -set(enable-gsl OFF) -if("gsl" IN_LIST FEATURES) - set(enable-gsl ON) -endif() - -set(enable-opengl OFF) -if("opengl" IN_LIST FEATURES) - set(enable-opengl ON) -endif() - -set(enable-glut OFF) -if("glut" IN_LIST FEATURES) - set(enable-glut ON) -endif() - -set(enable-wx OFF) -if("wx" IN_LIST FEATURES) - set(enable-wx ON) -endif() - -set(enable-qt5 OFF) -if("qt5" IN_LIST FEATURES) - set(enable-qt5 ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + hdf5 enable-hdf5 + fltk enable-fltk + gif enable-gif + png enable-png + zlib enable-zlib + jpeg enable-jpeg + gsl enable-gsl + opengl enable-opengl + glut enable-glut + wx enable-wx + qt5 enable-qt5 +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -Denable-hdf5=${enable-hdf5} - -Denable-fltk=${enable-fltk} - -Denable-gif=${enable-gif} - -Denable-png=${enable-png} - -Denable-zlib=${enable-zlib} - -Denable-jpeg=${enable-jpeg} - -Denable-gsl=${enable-gsl} - -Denable-opengl=${enable-opengl} - -Denable-glut=${enable-glut} - -Denable-wx=${enable-wx} - -Denable-qt5=${enable-qt5} + OPTIONS ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -107,11 +51,24 @@ else() set(EXECUTABLE_SUFFIX "") endif() +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mgllab${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mglview${EXECUTABLE_SUFFIX}) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mglconv${EXECUTABLE_SUFFIX}) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mgltask${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/udav${EXECUTABLE_SUFFIX}) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/mathgl/) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mglconv${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/mglconv${EXECUTABLE_SUFFIX}) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mgltask${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/mgltask${EXECUTABLE_SUFFIX}) +if (EXISTS ${CURRENT_PACKAGES_DIR}/bin/mgllab${EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mgllab${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/mgllab${EXECUTABLE_SUFFIX}) +endif() +if (EXISTS ${CURRENT_PACKAGES_DIR}/bin/mglview${EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mglview${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/mglview${EXECUTABLE_SUFFIX}) +endif() +if (EXISTS ${CURRENT_PACKAGES_DIR}/bin/udav${EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/udav${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/udav${EXECUTABLE_SUFFIX}) +endif() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/mathgl) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) diff --git a/ports/mathgl/vcpkg.json b/ports/mathgl/vcpkg.json new file mode 100644 index 00000000000000..f3bfc67fa4708d --- /dev/null +++ b/ports/mathgl/vcpkg.json @@ -0,0 +1,80 @@ +{ + "name": "mathgl", + "version-string": "2.4.3", + "port-version": 7, + "description": "MathGL is a free library of fast C++ routines for the plotting of the data varied in one or more dimensions", + "default-features": [ + "jpeg", + "opengl", + "png", + "zlib" + ], + "features": { + "fltk": { + "description": "fltk module", + "dependencies": [ + "fltk" + ] + }, + "gif": { + "description": "gif module", + "dependencies": [ + "giflib" + ] + }, + "glut": { + "description": "glut module", + "dependencies": [ + "freeglut" + ] + }, + "gsl": { + "description": "gsl module", + "dependencies": [ + "gsl" + ] + }, + "hdf5": { + "description": "hdf5 module", + "dependencies": [ + "hdf5" + ] + }, + "jpeg": { + "description": "jpeg module", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "opengl": { + "description": "opengl module", + "dependencies": [ + "opengl" + ] + }, + "png": { + "description": "png module", + "dependencies": [ + "libpng" + ] + }, + "qt5": { + "description": "qt5 module", + "dependencies": [ + "qt5" + ] + }, + "wx": { + "description": "wx module", + "dependencies": [ + "wxwidgets" + ] + }, + "zlib": { + "description": "zlib module", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt deleted file mode 100644 index d7b6bb61be238a..00000000000000 --- a/ports/matio/CMakeLists.txt +++ /dev/null @@ -1,60 +0,0 @@ -cmake_minimum_required(VERSION 3.8.0) -project(libmatio C) - -set(SRC - src/endian.c - src/inflate.c - src/io.c - src/mat.c - src/mat4.c - src/mat5.c - src/mat73.c - visual_studio/matio.def - src/matvar_cell.c - src/matvar_struct.c - src/read_data.c - src/snprintf.c -) - -add_library(libmatio ${SRC}) -target_include_directories(libmatio PRIVATE src visual_studio) -target_compile_definitions(libmatio PRIVATE - -DH5_NO_DEPRECATED_SYMBOLS - -DMAT73=1 - -DREPLACE_GETOPT - -DMATIO_HAVE_INTTYPES_H=1 - -DMATIO_HAVE_STDINT_H=1 -) - -find_package(ZLIB REQUIRED) -target_link_libraries(libmatio PRIVATE ZLIB::ZLIB) -target_compile_definitions(libmatio PRIVATE -DHAVE_ZLIB=1) - -find_package(hdf5 CONFIG REQUIRED) - -if(BUILD_SHARED_LIBS) - target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_DYNAMIC_LIB) - if(HDF5_USE_STATIC_LIBRARIES) - target_link_libraries(libmatio PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static) - else() - target_link_libraries(libmatio PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared) - endif() -else() - target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_STATIC_LIB) - target_link_libraries(libmatio PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static) -endif() - -install( - TARGETS libmatio - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES - src/matio.h - visual_studio/matio_pubconf.h - DESTINATION include - ) -endif() diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL deleted file mode 100644 index 6877c29721c01c..00000000000000 --- a/ports/matio/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: matio -Version: 1.5.15 -Homepage: https://github.com/tbeu/matio -Description: MATLAB MAT File I/O Library -Build-Depends: zlib, hdf5 diff --git a/ports/matio/fix-dependencies.patch b/ports/matio/fix-dependencies.patch new file mode 100644 index 00000000000000..03304d0832b811 --- /dev/null +++ b/ports/matio/fix-dependencies.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/thirdParties.cmake b/cmake/thirdParties.cmake +index 41d8529..392d455 100644 +--- a/cmake/thirdParties.cmake ++++ b/cmake/thirdParties.cmake +@@ -19,7 +19,7 @@ if(MATIO_WITH_HDF5) + endif() + set(HDF5_FOUND TRUE) + else() +- find_package(HDF5) ++ find_package(HDF5 CONFIG REQUIRED) + if(HDF5_FOUND) + set(HDF_MIN_VER 1.8) + if(HDF5_VERSION VERSION_LESS ${HDF_MIN_VER}) +@@ -44,9 +44,12 @@ if(HDF5_FOUND) + elseif(TARGET hdf5) + # target from hdf5 1.8 config + target_link_libraries(MATIO::HDF5 INTERFACE hdf5) +- elseif(TARGET HDF5::HDF5) ++ elseif(TARGET hdf5::hdf5-shared) + # target defined in CMake FindHDF5 (since 3.19) +- target_link_libraries(MATIO::HDF5 INTERFACE HDF5::HDF5) ++ target_link_libraries(MATIO::HDF5 INTERFACE hdf5::hdf5-shared) ++ elseif(TARGET hdf5::hdf5-static) ++ # target defined in CMake FindHDF5 (since 3.19) ++ target_link_libraries(MATIO::HDF5 INTERFACE hdf5-static) + else() + # results from CMake FindHDF5 + set_target_properties(MATIO::HDF5 PROPERTIES diff --git a/ports/matio/portfile.cmake b/ports/matio/portfile.cmake index 859bfdea6ef77a..c72bd3e4d0ce3c 100644 --- a/ports/matio/portfile.cmake +++ b/ports/matio/portfile.cmake @@ -1,22 +1,37 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tbeu/matio - REF v1.5.15 - SHA512 5e80aef3e929ff306810861ba14bc82bdd9cb3090de60dbd6905cfa35706d8cbe6c40471e8abf41e5d0836c10083c359449d34bdf32c6b2022a73986e8303eb3 + REF ca56394e5672115df1981996ed12524d1d551259 # v1.5.19 + SHA512 67c239d8aabafaa935775f3b260ba0756c196b0d845ef5116365c9aa6a0b24dae70d92c4e74d5d43ae073ae0744f084f0f58ead864eb77c813d43dbbb3e4ec5e HEAD_REF master + PATCHES fix-dependencies.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) -vcpkg_configure_cmake( +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + hdf5 MATIO_WITH_HDF5 + zlib MATIO_WITH_ZLIB + extended-sparse MATIO_EXTENDED_SPARSE + mat73 MATIO_MAT73 + pic MATIO_PIC +) + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + OPTIONS ${FEATURE_OPTIONS} + -DMATIO_SHARED=${BUILD_SHARED} + -DMATIO_USE_CONAN=OFF ) -vcpkg_install_cmake() - -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/matio RENAME copyright) +vcpkg_cmake_install() vcpkg_copy_pdbs() + +vcpkg_copy_tools(TOOL_NAMES matdump AUTO_CLEAN) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/matio/vcpkg.json b/ports/matio/vcpkg.json new file mode 100644 index 00000000000000..7e4b8d05ad09e2 --- /dev/null +++ b/ports/matio/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "matio", + "version-semver": "1.5.19", + "port-version": 1, + "description": "MATLAB MAT File I/O Library", + "homepage": "https://github.com/tbeu/matio", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + "hdf5", + "zlib" + ], + "features": { + "extended-sparse": { + "description": "Enable extended sparse matrix data types not supported in MATLAB" + }, + "hdf5": { + "description": "Check for HDF5 library", + "dependencies": [ + "hdf5" + ] + }, + "mat73": { + "description": "Enable support for version 7.3 MAT files" + }, + "pic": { + "description": "Enable position-independent code (PIC), i.e., compilation with the -fPIC flag" + }, + "zlib": { + "description": "Check for zlib library", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/matplotlib-cpp/portfile.cmake b/ports/matplotlib-cpp/portfile.cmake new file mode 100644 index 00000000000000..e3b61c2375671e --- /dev/null +++ b/ports/matplotlib-cpp/portfile.cmake @@ -0,0 +1,14 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lava/matplotlib-cpp + REF 70d508fcb7febc66535ba923eac1b1a4e571e4d1 + SHA512 4da452fc38b6c349a1b08b97775ef2d90354fabd3c8c3a0383f08609b22dea222b7f3e091efc1b833755f6b5c1e8564e675d2ed54cdc21f8b07b1b7bb44a82f4 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/matplotlibcpp.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/matplotlib-cpp/vcpkg.json b/ports/matplotlib-cpp/vcpkg.json new file mode 100644 index 00000000000000..83944db18a7d0d --- /dev/null +++ b/ports/matplotlib-cpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "matplotlib-cpp", + "version-string": "2020-08-27", + "port-version": 1, + "description": "Extremely simple yet powerful header-only C++ plotting library built on the popular matplotlib", + "homepage": "https://github.com/lava/matplotlib-cpp" +} diff --git a/ports/matplotplusplus/fix-dependencies.patch b/ports/matplotplusplus/fix-dependencies.patch new file mode 100644 index 00000000000000..89ef9fba8180bd --- /dev/null +++ b/ports/matplotplusplus/fix-dependencies.patch @@ -0,0 +1,96 @@ +diff --git a/source/3rd_party/CMakeLists.txt b/source/3rd_party/CMakeLists.txt +index ab58bbd..f9fed7e 100644 +--- a/source/3rd_party/CMakeLists.txt ++++ b/source/3rd_party/CMakeLists.txt +@@ -67,57 +67,69 @@ find_package(PkgConfig) + # Lots of optional packages are not a good idea in general. + # It makes the library much less "packagable" (https://youtu.be/sBP17HQAQjk) + # and much more difficult to make sure it works on multiple OSs +-find_package(JPEG) +-if(JPEG_FOUND) ++ ++if (WITH_JPEG) ++find_package(JPEG REQUIRED) ++if(1) + target_compile_definitions(cimg INTERFACE cimg_use_jpeg) + target_link_libraries(cimg INTERFACE ${JPEG_LIBRARIES}) + target_include_directories(cimg INTERFACE ${JPEG_INCLUDE_DIRS}) + endif() ++endif() + +-find_package(TIFF) +-if(TIFF_FOUND) ++if (WITH_TIFF) ++find_package(TIFF REQUIRED) ++if(1) + target_compile_definitions(cimg INTERFACE cimg_use_tiff) + target_link_libraries(cimg INTERFACE ${TIFF_LIBRARIES}) + target_include_directories(cimg INTERFACE ${TIFF_INCLUDE_DIRS}) + endif() ++endif() + +-find_package(ZLIB) +-if(ZLIB_FOUND) +- find_package(PNG) +- if (PNG_FOUND) ++if (WITH_ZLIB) ++find_package(ZLIB REQUIRED) ++if(1) ++ find_package(libpng CONFIG REQUIRED) ++ if (1) + target_compile_definitions(cimg INTERFACE cimg_use_zlib cimg_use_png) +- target_include_directories(cimg INTERFACE ${ZLIB_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS}) +- target_link_libraries(cimg INTERFACE ${ZLIB_LIBRARIES} ${PNG_LIBRARIES}) ++ target_link_libraries(cimg INTERFACE ZLIB::ZLIB png) + endif () + endif() ++endif() + +-find_package(LAPACK) +-if(LAPACK_FOUND) ++if (WITH_LAPACK) ++find_package(LAPACK REQUIRED) ++if(1) + target_compile_definitions(cimg INTERFACE cimg_use_lapack) + target_link_libraries(cimg INTERFACE ${LAPACK_LIBRARIES}) + target_include_directories(cimg INTERFACE ${LAPACK_INCLUDE_DIRS}) + endif() ++endif() + +-find_package(BLAS) +-if(BLAS_FOUND) ++if (WITH_BLAS) ++find_package(BLAS REQUIRED) ++if(1) + target_compile_definitions(cimg INTERFACE cimg_use_blas) + target_link_libraries(cimg INTERFACE ${BLAS_LIBRARIES}) + target_include_directories(cimg INTERFACE ${BLAS_INCLUDE_DIRS}) + endif() ++endif() + +-find_package(FFTW) +-if(FFTW_FOUND) ++if (WITH_FFTW3) ++find_package(FFTW3 CONFIG REQUIRED) ++if(1) + target_compile_definitions(cimg INTERFACE cimg_use_fftw3) +- target_link_libraries(cimg INTERFACE ${FFTW_LIBRARIES}) +- target_include_directories(cimg INTERFACE ${FFTW_INCLUDE_DIRS}) ++ target_link_libraries(cimg INTERFACE FFTW3::fftw3) ++endif() + endif() + + if (CMAKE_MODULE_PATH) +- find_package(OpenCV QUIET) +- if (OpenCV_FOUND) ++ if (WITH_OPENCV) ++ find_package(OpenCV CONFIG REQUIRED) ++ if (1) + target_compile_definitions(cimg INTERFACE cimg_use_opencv) +- target_link_libraries(cimg INTERFACE ${OpenCV_LIBRARIES}) +- target_include_directories(cimg INTERFACE ${OpenCV_INCLUDE_DIRS}) ++ target_link_libraries(cimg INTERFACE opencv_core) ++ endif() + endif() + else() + message("No CMAKE_MODULE_PATH path for OpenCV configured") diff --git a/ports/matplotplusplus/install-3rd-libraries.patch b/ports/matplotplusplus/install-3rd-libraries.patch new file mode 100644 index 00000000000000..d4b139b58d2aa8 --- /dev/null +++ b/ports/matplotplusplus/install-3rd-libraries.patch @@ -0,0 +1,15 @@ +diff --git a/source/3rd_party/CMakeLists.txt b/source/3rd_party/CMakeLists.txt +index bef0c08..e7521a7 100644 +--- a/source/3rd_party/CMakeLists.txt ++++ b/source/3rd_party/CMakeLists.txt +@@ -41,7 +41,9 @@ endif() + if(MASTER_PROJECT AND NOT BUILD_SHARED_LIBS) + install(TARGETS nodesoup + EXPORT Matplot++Targets +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/Matplot++) ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + endif() + + diff --git a/ports/matplotplusplus/portfile.cmake b/ports/matplotplusplus/portfile.cmake new file mode 100644 index 00000000000000..8755fc8f2a66c1 --- /dev/null +++ b/ports/matplotplusplus/portfile.cmake @@ -0,0 +1,55 @@ +message(STATUS " ${PORT}'s gnuplot backend currently requires Gnuplot 5.2.6+. + Windows users may get a pre-built binary installer from http://www.gnuplot.info/download.html. + Linux and MacOS users may install it from the system package manager. + Please visit https://alandefreitas.github.io/matplotplusplus/ for more information." +) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alandefreitas/matplotplusplus + REF 36d8dc6c3b94b7a71c4f129763f2c6ad8fc0b54a + SHA512 ac8902e953a2a9f6bd62e14e2eb0bd42e407bae6c0b2921ad16ce547e4921ba2c8d8a9cc68e75831676dce3cd89cdf8294862710e838510b68e20f8a6cdf806f + HEAD_REF master + PATCHES + install-3rd-libraries.patch # Remove this patch when nodesoup is added in vcpkg + fix-dependencies.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + opengl BUILD_EXPERIMENTAL_OPENGL_BACKEND + jpeg WITH_JPEG + tiff WITH_TIFF + zlib WITH_ZLIB + lapack WITH_LAPACK + blas WITH_BLAS + fftw3 WITH_FFTW3 + opencv WITH_OPENCV +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DCPM_USE_LOCAL_PACKAGES=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + -DBUILD_INSTALLER=ON + -DBUILD_PACKAGE=OFF + -DBUILD_WITH_PEDANTIC_WARNINGS=OFF + -DWITH_SYSTEM_CIMG=ON + -DBUILD_HIGH_RESOLUTION_WORLD_MAP=${BUILD_WORLD_MAP} +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(PACKAGE_NAME matplot++ CONFIG_PATH lib/cmake/Matplot++) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/matplotplusplus/vcpkg.json b/ports/matplotplusplus/vcpkg.json new file mode 100644 index 00000000000000..296b6f8802b0f7 --- /dev/null +++ b/ports/matplotplusplus/vcpkg.json @@ -0,0 +1,67 @@ +{ + "name": "matplotplusplus", + "version-date": "2021-04-11", + "port-version": 5, + "description": "A C++ graphics library for data visualization", + "homepage": "https://alandefreitas.github.io/matplotplusplus/", + "license": "MIT", + "supports": "!uwp & !(windows & arm)", + "dependencies": [ + "cimg", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "blas": { + "description": "BLAS support for Matplot++", + "dependencies": [ + "blas" + ] + }, + "fftw": { + "description": "fftw3 support for Matplot++", + "dependencies": [ + "fftw3" + ] + }, + "jpeg": { + "description": "JPEG support for Matplot++", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "lapack": { + "description": "LAPACK support for Matplot++", + "dependencies": [ + "lapack" + ] + }, + "opencv": { + "description": "opencv support for Matplot++", + "dependencies": [ + "opencv" + ] + }, + "opengl": { + "description": "OpenGL backend for Matplot++", + "dependencies": [ + "glad", + "glfw3", + "opengl" + ] + }, + "zlib": { + "description": "ZLIB and libpng support for Matplot++", + "dependencies": [ + "libpng", + "zlib" + ] + } + } +} diff --git a/ports/matroska/CONTROL b/ports/matroska/CONTROL deleted file mode 100644 index 29cef7e80ec657..00000000000000 --- a/ports/matroska/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: matroska -Version: 1.5.2 -Homepage: https://github.com/Matroska-Org/libmatroska -Description: a C++ libary to parse Matroska files (.mkv and .mka) -Build-Depends: ebml diff --git a/ports/matroska/portfile.cmake b/ports/matroska/portfile.cmake index bf41c8f1a9d4a0..2a729f0ed59f09 100644 --- a/ports/matroska/portfile.cmake +++ b/ports/matroska/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "matroska does not currently support UWP") endif() @@ -7,8 +5,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Matroska-Org/libmatroska - REF release-1.5.2 - SHA512 5e819d611455efb1dd49ea26b6b124899b1f6ba07b4af93b2f3437ffe7c2c0089a922ef894a7c8612faddadeea75142d0604ee54e6c5822439dc8c65008e119b + REF 684560a3ce962a7abe89be93cc8ffa483f7f853f # release-1.6.2 + SHA512 d9b0e392cc99d9eec99ef90431589778976508c5ccbd8bbb166f390653c27b4cc84de189f7cd3bf5b039ecb38a96b0e341cc39195099ec415cc48d40e0b78c01 HEAD_REF master ) diff --git a/ports/matroska/vcpkg.json b/ports/matroska/vcpkg.json new file mode 100644 index 00000000000000..339ca0355a1a12 --- /dev/null +++ b/ports/matroska/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "matroska", + "version-string": "1.6.2", + "port-version": 1, + "description": "a C++ library to parse Matroska files (.mkv and .mka)", + "homepage": "https://github.com/Matroska-Org/libmatroska", + "supports": "!uwp", + "dependencies": [ + "ebml" + ] +} diff --git a/ports/mbedtls/CONTROL b/ports/mbedtls/CONTROL deleted file mode 100644 index 787d1565252418..00000000000000 --- a/ports/mbedtls/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mbedtls -Version: 2.16.2 -Homepage: https://github.com/ARMmbed/mbedtls -Description: An open source, portable, easy to use, readable and flexible SSL library diff --git a/ports/mbedtls/enable-pthread.patch b/ports/mbedtls/enable-pthread.patch new file mode 100755 index 00000000000000..6353103769c327 --- /dev/null +++ b/ports/mbedtls/enable-pthread.patch @@ -0,0 +1,102 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8833246..f68ab02 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,6 +28,7 @@ set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + + option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF) + option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) ++option(ENABLE_PTHREAD "Build mbed TLS with pthread" OFF) + + option(ENABLE_PROGRAMS "Build mbed TLS programs." ON) + +@@ -231,6 +232,8 @@ else() + set(LIB_INSTALL_DIR lib) + endif() + ++include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) ++ + if(ENABLE_ZLIB_SUPPORT) + find_package(ZLIB) + +@@ -239,6 +242,17 @@ if(ENABLE_ZLIB_SUPPORT) + endif(ZLIB_FOUND) + endif(ENABLE_ZLIB_SUPPORT) + ++if(ENABLE_PTHREAD) ++ if(WIN32) ++ find_package(pthreads_windows REQUIRED) ++ include_directories(${PThreads4W_INCLUDE_DIR}) ++ else() ++ set(CMAKE_THREAD_PREFER_PTHREAD ON) ++ find_package(Threads REQUIRED) ++ endif() ++ set(LINK_WITH_PTHREAD ON) ++endif() ++ + add_subdirectory(include) + + add_subdirectory(3rdparty) +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index 62c0f62..7923202 100644 +--- a/include/CMakeLists.txt ++++ b/include/CMakeLists.txt +@@ -1,10 +1,14 @@ + option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) + ++configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h) ++ + if(INSTALL_MBEDTLS_HEADERS) + + file(GLOB headers "mbedtls/*.h") + file(GLOB psa_headers "psa/*.h") +- ++ ++ set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h) ++ + install(FILES ${headers} + DESTINATION include/mbedtls + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) +diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h +index 1e6e052..51c20da 100644 +--- a/include/mbedtls/config.h ++++ b/include/mbedtls/config.h +@@ -24,6 +24,8 @@ + * limitations under the License. + */ + ++#include "mbedtls/config_threading.h" ++ + #ifndef MBEDTLS_CONFIG_H + #define MBEDTLS_CONFIG_H + +diff --git a/include/mbedtls/config_threading.h.in b/include/mbedtls/config_threading.h.in +new file mode 100644 +index 0000000..9d5d42e +--- /dev/null ++++ b/include/mbedtls/config_threading.h.in +@@ -0,0 +1,6 @@ ++#cmakedefine ENABLE_PTHREAD ++ ++#ifdef ENABLE_PTHREAD ++#define MBEDTLS_THREADING_C ++#define MBEDTLS_THREADING_PTHREAD ++#endif +\ No newline at end of file +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 33e2cfc..4b99331 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -137,7 +137,11 @@ if(ENABLE_ZLIB_SUPPORT) + endif(ENABLE_ZLIB_SUPPORT) + + if(LINK_WITH_PTHREAD) +- set(libs ${libs} pthread) ++ if(WIN32) ++ set(libs ${libs} ${PThreads4W_LIBRARY}) ++ else() ++ set(libs ${libs} pthread) ++ endif() + endif() + + if(LINK_WITH_TRUSTED_STORAGE) diff --git a/ports/mbedtls/portfile.cmake b/ports/mbedtls/portfile.cmake index d1a9372433c6fc..3bd961fbce827f 100644 --- a/ports/mbedtls/portfile.cmake +++ b/ports/mbedtls/portfile.cmake @@ -1,27 +1,41 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") set(VCPKG_LIBRARY_LINKAGE static) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ARMmbed/mbedtls - REF mbedtls-2.16.2 - SHA512 55af897ea3a1455ec4c16980a504a542333e8465bdf89d77b756e6d9893c394166ec880734ecdb10ec0643ddc828bf21e2dd8891b1b4a431e9c57e63a07915aa + REF 523f0554b6cdc7ace5d360885c3f5bbcc73ec0e8 # mbedtls-2.24.0 + SHA512 1ce78f34e8d87c2ce0454e0a08f4c6e5b3129d4b24cfa44162af21c2e8b5dc7feabf849e4fa547ce3781b5ce11aaf675cfed47412bae40091fbdd87bbcdbee07 HEAD_REF master + PATCHES + enable-pthread.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + pthreads ENABLE_PTHREAD ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + ${FEATURE_OPTIONS} -DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF + -DMBEDTLS_FATAL_WARNINGS=FALSE ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mbedtls RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if (VCPKG_TARGET_IS_WINDOWS AND pthreads IN_LIST FEATURES) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +endif () -vcpkg_copy_pdbs() +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/mbedtls/vcpkg-cmake-wrapper.cmake b/ports/mbedtls/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..40a0bccb4dfbae --- /dev/null +++ b/ports/mbedtls/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,29 @@ +include(FindPackageHandleStandardArgs) + +find_path(MBEDTLS_INCLUDE_DIR mbedtls/ssl.h) + +find_library(MBEDTLS_CRYPTO_LIBRARY mbedcrypto) +find_package(pthreads_windows QUIET) +set(MBEDTLS_CRYPTO_LIBRARY ${MBEDTLS_CRYPTO_LIBRARY} ${PThreads4W_LIBRARY}) +find_library(MBEDTLS_X509_LIBRARY mbedx509) +find_library(MBEDTLS_TLS_LIBRARY mbedtls) +set(MBEDTLS_LIBRARIES ${MBEDTLS_CRYPTO_LIBRARY} ${MBEDTLS_X509_LIBRARY} ${MBEDTLS_TLS_LIBRARY}) + +if (MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h") + file( + STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h _MBEDTLS_VERLINE + REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*" + ) + string(REGEX REPLACE ".*MBEDTLS_VERSION_STRING[\t ]+\"(.*)\"" "\\1" MBEDTLS_VERSION ${_MBEDTLS_VERLINE}) +endif() + +find_package_handle_standard_args( + mbedTLS + REQUIRED_VARS + MBEDTLS_INCLUDE_DIR + MBEDTLS_CRYPTO_LIBRARY + MBEDTLS_X509_LIBRARY + MBEDTLS_TLS_LIBRARY + PThreads4W_FOUND + VERSION_VAR MBEDTLS_VERSION +) diff --git a/ports/mbedtls/vcpkg.json b/ports/mbedtls/vcpkg.json new file mode 100644 index 00000000000000..ec036a05f62094 --- /dev/null +++ b/ports/mbedtls/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "mbedtls", + "version-string": "2.24.0", + "port-version": 3, + "description": "An open source, portable, easy to use, readable and flexible SSL library", + "homepage": "https://github.com/ARMmbed/mbedtls", + "supports": "!uwp", + "features": { + "pthreads": { + "description": "Multi-threading support", + "dependencies": [ + { + "name": "pthreads", + "platform": "windows" + } + ] + } + } +} diff --git a/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch b/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch new file mode 100644 index 00000000000000..37f625ba5d0236 --- /dev/null +++ b/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch @@ -0,0 +1,38 @@ +From d2625f80e08ff811a173ca3dbe76a0e004c26c65 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 16:21:43 -0700 +Subject: [PATCH] fix _POSIX_C_SOURCE + +set it to correctly ask for 200112L, for readlink +--- + configed.H | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/configed.H b/configed.H +index 2e01c15..250f441 100644 +--- a/configed.H ++++ b/configed.H +@@ -189,19 +189,13 @@ + #define _POSIX_ 1 + #define _POSIX_SOURCE 1 + #ifndef _POSIX_C_SOURCE +-#define _POSIX_C_SOURCE 1 ++#define _POSIX_C_SOURCE 200112L + #define _POSIX_C_SOURCE_defined 1 + #endif + #include "limits.h" + #ifdef _AIX + #include "sys/stat.h" + #endif +-#undef _POSIX_ +-#undef _POSIX_SOURCE +-#ifdef _POSIX_C_SOURCE_defined +-#undef _POSIX_C_SOURCE +-#undef _POSIX_C_SOURCE_defined +-#endif + #define CHARBIT CHAR_BIT + #define UCHARMAX UCHAR_MAX + #define USHRTMAX USHRT_MAX +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mcpp/portfile.cmake b/ports/mcpp/portfile.cmake new file mode 100644 index 00000000000000..8e2928ea1ddb04 --- /dev/null +++ b/ports/mcpp/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeroc-ice/mcpp + REF e6abf9a561294b667bb931b80cf749c9be2d1a2f + SHA512 131b68401683bcfb947ac4969a59aa4c1683412c30f76c50e9e9c5c952a881b9950127db2ef22c96968d8c90d26bcdb5a90fb1b77d4dda7dee67bfe4a2676b35 + HEAD_REF master + PATCHES + 0001-fix-_POSIX_C_SOURCE.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file( + INSTALL + ${SOURCE_PATH}/mcpp_lib.h + ${SOURCE_PATH}/mcpp_out.h + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mcpp/vcpkg.json b/ports/mcpp/vcpkg.json new file mode 100644 index 00000000000000..4be6e6f68b51d3 --- /dev/null +++ b/ports/mcpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mcpp", + "version-string": "2.7.2.14", + "port-version": 3, + "description": "Fork of mcpp, a C/C++ preprocessor", + "homepage": "https://github.com/zeroc-ice/mcpp" +} diff --git a/ports/mdns/portfile.cmake b/ports/mdns/portfile.cmake new file mode 100644 index 00000000000000..d465759444e0be --- /dev/null +++ b/ports/mdns/portfile.cmake @@ -0,0 +1,21 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mjansson/mdns + REF 1.1 + SHA512 03e4682d87e9c1157bba04e04a3dfbb2ed7e25df31f00834fbc7bf4275e5c7f7406e590c8bdc386a4e6fbe6a5667f700e146d39758aa8ee0a47f735547cacd31 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMDNS_BUILD_EXAMPLE=OFF +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mdns/vcpkg.json b/ports/mdns/vcpkg.json new file mode 100644 index 00000000000000..d86276ac0667c7 --- /dev/null +++ b/ports/mdns/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "mdns", + "version-string": "1.1", + "description": "Public domain mDNS/DNS-SD library in C", + "homepage": "https://github.com/mjansson/mdns" +} diff --git a/ports/mdnsresponder/CONTROL b/ports/mdnsresponder/CONTROL deleted file mode 100644 index cfac2cca99b3d5..00000000000000 --- a/ports/mdnsresponder/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mdnsresponder -Version: 765.30.11 -Description: The mDNSResponder project is a component of Bonjour, Apple's ease-of-use IP networking initiative. -Homepage: https://developer.apple.com/bonjour/ \ No newline at end of file diff --git a/ports/mdnsresponder/portfile.cmake b/ports/mdnsresponder/portfile.cmake index df86db75c1e9ee..337cf0bdc24b91 100644 --- a/ports/mdnsresponder/portfile.cmake +++ b/ports/mdnsresponder/portfile.cmake @@ -1,11 +1,13 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mDNSResponder-765.30.11) -vcpkg_download_distfile(ARCHIVE_FILE +vcpkg_download_distfile(ARCHIVE URLS https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-765.30.11.tar.gz FILENAME mDNSResponder-765.30.11.tar.gz SHA512 dfdea663ec1089058c2225ede13d70241dfec8311ff7fb8d29c8d386f5077a4104455d78f8777496cce96b8ff289b73ed1aec2bf65c52154b866fc1b7675ef90 ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") SET(BUILD_ARCH "Win32") @@ -17,33 +19,41 @@ ENDIF() function(FIX_VCXPROJ VCXPROJ_PATH) file(READ ${VCXPROJ_PATH} ORIG) - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE - "StaticLibrary" - "DynamicLibrary" - ORIG "${ORIG}") + if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic") string(REGEX REPLACE - "*" + "MultiThreadedDebug" "MultiThreadedDebugDLL" ORIG "${ORIG}") string(REGEX REPLACE - "*" + "MultiThreaded" "MultiThreadedDLL" ORIG "${ORIG}") else() - string(REPLACE - "DynamicLibrary" - "StaticLibrary" - ORIG "${ORIG}") string(REGEX REPLACE - "*Debug" + "MultiThreadedDebugDLL" "MultiThreadedDebug" ORIG "${ORIG}") string(REGEX REPLACE - "*" + "MultiThreadedDLL" "MultiThreaded" ORIG "${ORIG}") endif() + if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") + string(REPLACE + "StaticLibrary" + "DynamicLibrary" + ORIG "${ORIG}") + else() + string(REPLACE + "DynamicLibrary" + "StaticLibrary" + ORIG "${ORIG}") + endif() + + string(REPLACE + "ProgramDatabase" + "OldStyle" + ORIG "${ORIG}") file(WRITE ${VCXPROJ_PATH} "${ORIG}") endfunction() @@ -82,4 +92,4 @@ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mdnsresponder/copyright ) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/mdnsresponder/vcpkg.json b/ports/mdnsresponder/vcpkg.json new file mode 100644 index 00000000000000..0cdef4cb732300 --- /dev/null +++ b/ports/mdnsresponder/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "mdnsresponder", + "version-string": "765.30.11", + "port-version": 4, + "description": "The mDNSResponder project is a component of Bonjour, Apple's ease-of-use IP networking initiative.", + "homepage": "https://developer.apple.com/bonjour/", + "supports": "!arm" +} diff --git a/ports/mecab/CMakeLists.txt b/ports/mecab/CMakeLists.txt new file mode 100644 index 00000000000000..9ebf42ee121f3a --- /dev/null +++ b/ports/mecab/CMakeLists.txt @@ -0,0 +1,67 @@ +cmake_minimum_required(VERSION 3.12 FATAL_ERROR) + +PROJECT(mecab VERSION 1.0) + +file(GLOB SOURCE_FILE + "*.cpp" + "*.c" +) +file(GLOB HEADERS_FILE + "*.h" +) + +message(STATUS "current cmake path: ${CMAKE_CURRENT_SOURCE_DIR}") +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-cost-train.cpp) +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-dict-gen.cpp) +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-dict-index.cpp) +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-system-eval.cpp) +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-test-gen.cpp) +#list(REMOVE_ITEM SOURCE_FILE "mecab-cost-train.cpp" "mecab-dict-gen.cpp" "mecab-dict-index.cpp" "mecab-system-eval.cpp" "mecab-test-gen.cpp") + +add_library (mecab ${SOURCE_FILE}) +target_include_directories(mecab PUBLIC + $ + $) + +if(UNIX) + target_compile_definitions(mecab PUBLIC -DHAVE_UNISTD_H -DHAVE_FCNTL_H -DHAVE_STDINT_H -DHAVE_SYS_TYPES_H -DHAVE_SYS_STAT_H -DHAVE_DIRENT_H -DDIC_VERSION=102 -DVERSION="@VERSION@" -DPACKAGE="mecab" -DMECAB_DEFAULT_RC="./mecabrc") +endif(UNIX) +if(WIN32) + target_compile_definitions(mecab PUBLIC -D_CRT_SECURE_NO_DEPRECATE -DMECAB_USE_THREAD -DDLL_EXPORT -DHAVE_GETENV -DHAVE_WINDOWS_H -DDIC_VERSION=102 -DVERSION="@VERSION@" -DPACKAGE="mecab" -DUNICODE -D_UNICODE -DMECAB_DEFAULT_RC="mecabrc") +endif(WIN32) + + +include (GNUInstallDirs) +include(CMakePackageConfigHelpers) + +set (mecab_CMAKE_DIR share/mecab CACHE STRING "Installation dir") +set (targets_export_name mecabTargets CACHE INTERNAL "") + +install(TARGETS mecab + EXPORT ${targets_export_name} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +install(FILES ${HEADERS_FILE} DESTINATION include/mecab CONFIGURATIONS Release) + +install(EXPORT ${targets_export_name} + NAMESPACE mecab:: + DESTINATION ${mecab_CMAKE_DIR}) + +configure_package_config_file( + "${PROJECT_SOURCE_DIR}/Config.cmake.in" + "${PROJECT_BINARY_DIR}/mecabConfig.cmake" + INSTALL_DESTINATION ${mecab_CMAKE_DIR}) + + +write_basic_package_version_file( + ${PROJECT_BINARY_DIR}/mecabConfigVersion.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion ) + +install(FILES + ${PROJECT_BINARY_DIR}/mecabConfig.cmake + ${PROJECT_BINARY_DIR}/mecabConfigVersion.cmake + DESTINATION ${mecab_CMAKE_DIR}) diff --git a/ports/mecab/Config.cmake.in b/ports/mecab/Config.cmake.in new file mode 100644 index 00000000000000..927b3637b5a1f4 --- /dev/null +++ b/ports/mecab/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") +check_required_components(mecab) \ No newline at end of file diff --git a/ports/mecab/fix_wpath_unsigned.patch b/ports/mecab/fix_wpath_unsigned.patch new file mode 100644 index 00000000000000..d8dcf15099d228 --- /dev/null +++ b/ports/mecab/fix_wpath_unsigned.patch @@ -0,0 +1,40 @@ +diff --git a/mecab/src/common.h b/mecab/src/common.h +index d1fc459..2951d5a 100644 +--- a/mecab/src/common.h ++++ b/mecab/src/common.h +@@ -86,7 +86,8 @@ + #define WPATH_FORCE(path) (MeCab::Utf8ToWide(path).c_str()) + #define WPATH(path) (path) + #else +-#define WPATH(path) WPATH_FORCE(path) ++#define WPATH_FORCE(path) (MeCab::Utf8ToWide(path).c_str()) ++#define WPATH(path) (path) + #endif + #else + #define WPATH_FORCE(path) (path) +diff --git a/mecab/src/feature_index.cpp b/mecab/src/feature_index.cpp +index 051bdf8..fdd0145 100644 +--- a/mecab/src/feature_index.cpp ++++ b/mecab/src/feature_index.cpp +@@ -353,7 +353,7 @@ bool FeatureIndex::buildUnigramFeature(LearnerPath *path, + if (!r) goto NEXT; + os_ << r; + } break; +- case 't': os_ << (size_t)path->rnode->char_type; break; ++ case 't': os_ << (int)(size_t)path->rnode->char_type; break; + case 'u': os_ << ufeature; break; + case 'w': + if (path->rnode->stat == MECAB_NOR_NODE) { +diff --git a/mecab/src/writer.cpp b/mecab/src/writer.cpp +index 0ef6975..f068fa3 100644 +--- a/mecab/src/writer.cpp ++++ b/mecab/src/writer.cpp +@@ -257,7 +257,7 @@ bool Writer::writeNode(Lattice *lattice, + // input sentence + case 'S': os->write(lattice->sentence(), lattice->size()); break; + // sentence length +- case 'L': *os << lattice->size(); break; ++ case 'L': *os << (int)lattice->size(); break; + // morph + case 'm': os->write(node->surface, node->length); break; + case 'M': os->write(reinterpret_cast diff --git a/ports/mecab/portfile.cmake b/ports/mecab/portfile.cmake new file mode 100644 index 00000000000000..6bf02094580b5a --- /dev/null +++ b/ports/mecab/portfile.cmake @@ -0,0 +1,28 @@ +if (VCPKG_TARGET_TRIPLET STREQUAL "x64-uwp" OR VCPKG_TARGET_TRIPLET STREQUAL "arm64-windows" OR VCPKG_TARGET_TRIPLET STREQUAL "arm-uwp") + message(FATAL_ERROR "mecab does not support on this platform") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO taku910/mecab + REF 3a07c4eefaffb4e7a0690a7f4e5e0263d3ddb8a3 + SHA512 d3288cca7207daf66df4349819b64fc9cc069c775512cf0607ca855e9e5512509c36b0e2bb0e955478acae13ff0c35df7442f18a8458fab0ed664d62854c0b25 + HEAD_REF master + PATCHES + fix_wpath_unsigned.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/mecab/src) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/mecab/src) +file(COPY ${SOURCE_PATH}/mecab/COPYING DESTINATION ${SOURCE_PATH}/mecab/src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/mecab/src +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/mecab/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mecab) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mecab/COPYING ${CURRENT_PACKAGES_DIR}/share/mecab/copyright) diff --git a/ports/mecab/vcpkg.json b/ports/mecab/vcpkg.json new file mode 100644 index 00000000000000..7475acf4a663cf --- /dev/null +++ b/ports/mecab/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mecab", + "version-string": "2019-09-25", + "port-version": 2, + "description": "A morphological analysis engine based on CRF", + "supports": "!(uwp | arm | arm64)" +} diff --git a/ports/memorymodule/portfile.cmake b/ports/memorymodule/portfile.cmake new file mode 100644 index 00000000000000..7c772711d5860a --- /dev/null +++ b/ports/memorymodule/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fancycode/MemoryModule + REF 5f83e41c3a3e7c6e8284a5c1afa5a38790809461 + SHA512 6d42bd80dfeaf7bc662adafe7d6a7d7301eff5ea53bb59fce7e9c1a6ee22d31d2ab5696afc0a92c1501aa4161a60366418bfc3bed7ed2dcb6cae24243f4fa6d4 + HEAD_REF master +) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + unicode UNICODE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DTESTSUITE=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_build_cmake(TARGET MemoryModule) + +file(INSTALL ${SOURCE_PATH}/MemoryModule.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/MemoryModule.lib) + file(INSTALL + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/MemoryModule.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) +endif() + +if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/MemoryModule.lib) + file(INSTALL + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/MemoryModule.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/memorymodule/vcpkg.json b/ports/memorymodule/vcpkg.json new file mode 100644 index 00000000000000..3e5ca2f3a06e4b --- /dev/null +++ b/ports/memorymodule/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "memorymodule", + "version-string": "2019-12-31", + "port-version": 1, + "description": "Library to load a DLL from memory", + "homepage": "https://github.com/fancycode/MemoryModule", + "default-features": [ + "unicode" + ], + "features": { + "unicode": { + "description": "Compile with UNICODE support" + } + } +} diff --git a/ports/mesa/portfile.cmake b/ports/mesa/portfile.cmake new file mode 100644 index 00000000000000..0039249051c52f --- /dev/null +++ b/ports/mesa/portfile.cmake @@ -0,0 +1,197 @@ +# Build-Depends: From X Window PR: zstd, drm (!windows), elfutils (!windows), wayland (!windows), wayland-protocols (!windows), xdamage, xshmfence (!windows), x11, xcb, xfixes, xext, xxf86vm, xrandr, xv, xvmc (!windows), egl-registry, opengl-registry, tool-meson +# Required LLVM modules: LLVM (modules: bitwriter, core, coroutines, engine, executionengine, instcombine, mcdisassembler, mcjit, scalaropts, transformutils) found: YES + +# Patches are from https://github.com/pal1000/mesa-dist-win/tree/master/patches +set(PATCHES + # Fix swrAVX512 build + swravx512-post-static-link.patch +) + +vcpkg_check_linkage(ONLY_DYNAMIC_CRT) +if(VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled) # some parts of this port can only build as a shared library. +endif() + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org + OUT_SOURCE_PATH SOURCE_PATH + REPO mesa/mesa + REF mesa-21.2.0 + SHA512 4837e42474d69861fbce4fa03d120b56997094d61b3045c417bbab73774dda86e4b7adf54af98585511a3517860c33c77898e6171cd845f760bada4b000ff52d + HEAD_REF master + PATCHES ${PATCHES} +) +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") +vcpkg_add_to_path("${PYTHON3_DIR}/Scripts") +set(ENV{PYTHON} "${PYTHON3}") + +function(vcpkg_get_python_package PYTHON_DIR ) + cmake_parse_arguments(PARSE_ARGV 0 _vgpp "" "PYTHON_EXECUTABLE" "PACKAGES") + + if(NOT _vgpp_PYTHON_EXECUTABLE) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PYTHON_EXECUTABLE!") + endif() + if(NOT _vgpp_PACKAGES) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} requires parameter PACKAGES!") + endif() + if(NOT _vgpp_PYTHON_DIR) + get_filename_component(_vgpp_PYTHON_DIR "${_vgpp_PYTHON_EXECUTABLE}" DIRECTORY) + endif() + + if (WIN32) + set(PYTHON_OPTION "") + else() + set(PYTHON_OPTION "--user") + endif() + + if("${_vgpp_PYTHON_DIR}" MATCHES "${DOWNLOADS}") # inside vcpkg + if(NOT EXISTS "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}") + if(NOT EXISTS "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}") + vcpkg_from_github( + OUT_SOURCE_PATH PYFILE_PATH + REPO pypa/get-pip + REF 309a56c5fd94bd1134053a541cb4657a4e47e09d #2019-08-25 + SHA512 bb4b0745998a3205cd0f0963c04fb45f4614ba3b6fcbe97efe8f8614192f244b7ae62705483a5305943d6c8fedeca53b2e9905aed918d2c6106f8a9680184c7a + HEAD_REF master + ) + execute_process(COMMAND "${_vgpp_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/get-pip.py" ${PYTHON_OPTION}) + endif() + foreach(_package IN LISTS _vgpp_PACKAGES) + execute_process(COMMAND "${_vgpp_PYTHON_DIR}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install ${_package} ${PYTHON_OPTION}) + endforeach() + else() + foreach(_package IN LISTS _vgpp_PACKAGES) + execute_process(COMMAND "${_vgpp_PYTHON_DIR}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}" ${_package}) + endforeach() + endif() + if(NOT VCPKG_TARGET_IS_WINDOWS) + execute_process(COMMAND pip3 install ${_vgpp_PACKAGES}) + endif() + else() # outside vcpkg + foreach(_package IN LISTS _vgpp_PACKAGES) + execute_process(COMMAND ${_vgpp_PYTHON_EXECUTABLE} -c "import ${_package}" RESULT_VARIABLE HAS_ERROR) + if(HAS_ERROR) + message(FATAL_ERROR "Python package '${_package}' needs to be installed for port '${PORT}'.\nComplete list of required python packages: ${_vgpp_PACKAGES}") + endif() + endforeach() + endif() +endfunction() + +vcpkg_get_python_package(PYTHON_EXECUTABLE "${PYTHON3}" PACKAGES setuptools mako) + +vcpkg_find_acquire_program(FLEX) +get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY ) +vcpkg_add_to_path(PREPEND "${FLEX_DIR}") +vcpkg_find_acquire_program(BISON) +get_filename_component(BISON_DIR "${BISON}" DIRECTORY ) +vcpkg_add_to_path(PREPEND "${BISON_DIR}") + +if(WIN32) # WIN32 HOST probably has win_flex and win_bison! + if(NOT EXISTS "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}") + if(FLEX_DIR MATCHES "${DOWNLOADS}") + file(CREATE_LINK "${FLEX}" "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}") + else() + message(FATAL_ERROR "${PORT} requires flex being named flex on windows and not win_flex!\n(Can be solved by creating a simple link from win_flex to flex)") + endif() + endif() + if(NOT EXISTS "${BISON_DIR}/BISON${VCPKG_HOST_EXECUTABLE_SUFFIX}") + if(BISON_DIR MATCHES "${DOWNLOADS}") + file(CREATE_LINK "${BISON}" "${BISON_DIR}/bison${VCPKG_HOST_EXECUTABLE_SUFFIX}") + else() + message(FATAL_ERROR "${PORT} requires bison being named bison on windows and not win_bison!\n(Can be solved by creating a simple link from win_bison to bison)") + endif() + endif() +endif() + +# For features https://github.com/pal1000/mesa-dist-win should be probably studied a bit more. +#string(APPEND GALLIUM_DRIVERS 'auto') +list(APPEND MESA_OPTIONS -Dzstd=enabled) +list(APPEND MESA_OPTIONS -Dshared-llvm=auto) +list(APPEND MESA_OPTIONS -Dlibunwind=disabled) +list(APPEND MESA_OPTIONS -Dlmsensors=disabled) +list(APPEND MESA_OPTIONS -Dvalgrind=disabled) +list(APPEND MESA_OPTIONS -Dglvnd=false) +list(APPEND MESA_OPTIONS -Dglx=disabled) +list(APPEND MESA_OPTIONS -Dgbm=disabled) +list(APPEND MESA_OPTIONS -Dosmesa=true) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND MESA_OPTIONS -Dshared-swr=false) + list(APPEND MESA_OPTIONS "-Dswr-arches=['avx']") +else() + list(APPEND MESA_OPTIONS -Dshared-swr=true) + list(APPEND MESA_OPTIONS "-Dswr-arches=['avx','avx2','knl','skx']") +endif() + +string(APPEND GALLIUM_DRIVERS 'swrast') +if("llvm" IN_LIST FEATURES) + list(APPEND MESA_OPTIONS -Dllvm=enabled) + string(APPEND GALLIUM_DRIVERS ",'swr'") # SWR always requires llvm +else() + list(APPEND MESA_OPTIONS -Dllvm=disabled) +endif() + +list(APPEND MESA_OPTIONS -Dgallium-drivers=[${GALLIUM_DRIVERS}]) + +if("gles1" IN_LIST FEATURES) + list(APPEND MESA_OPTIONS -Dgles1=enabled) +else() + list(APPEND MESA_OPTIONS -Dgles1=disabled) +endif() +if("gles2" IN_LIST FEATURES) + list(APPEND MESA_OPTIONS -Dgles2=enabled) +else() + list(APPEND MESA_OPTIONS -Dgles2=disabled) +endif() +if("opengl" IN_LIST FEATURES) + list(APPEND MESA_OPTIONS -Dopengl=true) +else() + list(APPEND MESA_OPTIONS -Dopengl=false) +endif() +if("egl" IN_LIST FEATURES) # EGL feature only works on Linux + list(APPEND MESA_OPTIONS -Degl=enabled) +else() + list(APPEND MESA_OPTIONS -Degl=disabled) +endif() + +list(APPEND MESA_OPTIONS -Dshared-glapi=enabled) #shared GLAPI required when building two or more of the following APIs - opengl, gles1 gles2 + +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND MESA_OPTIONS -Dplatforms=['windows']) + list(APPEND MESA_OPTIONS -Dmicrosoft-clc=disabled) +endif() + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dgles-lib-suffix=_mesa + #-D egl-lib-suffix=_mesa + -Dbuild-tests=false + ${MESA_OPTIONS} + ) +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +#installed by egl-registry +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/KHR) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/EGL/egl.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/EGL/eglext.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/EGL/eglplatform.h) +#installed by opengl-registry +set(_double_files include/GL/glcorearb.h include/GL/glext.h include/GL/glxext.h + include/GLES/egl.h include/GLES/gl.h include/GLES/glext.h include/GLES/glplatform.h + include/GLES2/gl2.h include/GLES2/gl2ext.h include/GLES2/gl2platform.h + include/GLES3/gl3.h include/GLES3/gl31.h include/GLES3/gl32.h include/GLES3/gl3platform.h) +list(TRANSFORM _double_files PREPEND "${CURRENT_PACKAGES_DIR}/") +file(REMOVE ${_double_files}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/GLES) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/GLES2) +# # Handle copyright +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/mesa/swravx512-post-static-link.patch b/ports/mesa/swravx512-post-static-link.patch new file mode 100644 index 00000000000000..ac88d9bd738c58 --- /dev/null +++ b/ports/mesa/swravx512-post-static-link.patch @@ -0,0 +1,22 @@ +diff --git a/src/gallium/drivers/swr/meson.build b/src/gallium/drivers/swr/meson.build +index 11ea7d3f43e..f34e88b1eec 100644 +--- a/src/gallium/drivers/swr/meson.build ++++ b/src/gallium/drivers/swr/meson.build +@@ -213,7 +213,7 @@ endif + + if with_swr_arches.contains('skx') + swr_skx_args = cpp.first_supported_argument( +- '-march=skylake-avx512', '-target-cpu=x86-skylake', '-xCORE-AVX512', ++ '-march=skylake-avx512', '-target-cpu=x86-skylake', '-xCORE-AVX512', '/arch:AVX512', + ) + if swr_skx_args == [] + error('Cannot find SKX support for swr.') +@@ -252,7 +252,7 @@ endif + + if with_swr_arches.contains('knl') + swr_knl_args = cpp.first_supported_argument( +- '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512', ++ '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512', '/arch:AVX512', + ) + if swr_knl_args == [] + error('Cannot find KNL support for swr.') diff --git a/ports/mesa/vcpkg.json b/ports/mesa/vcpkg.json new file mode 100644 index 00000000000000..2030dfe0e450c6 --- /dev/null +++ b/ports/mesa/vcpkg.json @@ -0,0 +1,99 @@ +{ + "name": "mesa", + "version": "21.2.0", + "description": "Mesa - The 3D Graphics Library", + "homepage": "https://www.mesa3d.org/", + "supports": "!(windows & arm)", + "dependencies": [ + "tool-meson", + "zlib", + "zstd" + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform dependent default features", + "dependencies": [ + { + "name": "mesa", + "default-features": false, + "features": [ + "gles1" + ] + }, + { + "name": "mesa", + "default-features": false, + "features": [ + "gles2" + ] + }, + { + "name": "mesa", + "default-features": false, + "features": [ + "opengl" + ] + }, + { + "name": "mesa", + "default-features": false, + "features": [ + "llvm" + ], + "platform": "x64" + } + ] + }, + "egl": { + "description": "Build support for EGL platform", + "dependencies": [ + { + "name": "mesa", + "default-features": false + } + ] + }, + "gles1": { + "description": "Build support for OpenGL ES 1.x", + "dependencies": [ + { + "name": "mesa", + "default-features": false + } + ] + }, + "gles2": { + "description": "Build support for OpenGL ES 2.x and 3.x", + "dependencies": [ + { + "name": "mesa", + "default-features": false + } + ] + }, + "llvm": { + "description": "Build with llvmpipe", + "dependencies": [ + { + "name": "llvm", + "default-features": false, + "features": [ + "libclc" + ] + } + ] + }, + "opengl": { + "description": "Build support for OpenGL (all versions)", + "dependencies": [ + { + "name": "mesa", + "default-features": false + } + ] + } + } +} diff --git a/ports/meschach/CONTROL b/ports/meschach/CONTROL deleted file mode 100644 index d54e03952fe5bc..00000000000000 --- a/ports/meschach/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: meschach -Version: 1.2b-2 -Homepage: https://homepage.math.uiowa.edu/~dstewart/meschach -Description: Matrix computations in C diff --git a/ports/meschach/portfile.cmake b/ports/meschach/portfile.cmake index 1ec6fcd047d4c7..5bbcff8faf3171 100644 --- a/ports/meschach/portfile.cmake +++ b/ports/meschach/portfile.cmake @@ -1,14 +1,16 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) vcpkg_download_distfile(ARCHIVE URLS "http://homepage.math.uiowa.edu/~dstewart/meschach/mesch12b.tar.gz" FILENAME "mesch12b.tar.gz" SHA512 9051e1502b8c9741400c61fd6038e514887f305f267ba4e97d747423de3da1270f835f65b2d1f538f8938677060bc0fcfd7a94022d74fbfd31a0450116e9d79e ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/meschach/vcpkg.json b/ports/meschach/vcpkg.json new file mode 100644 index 00000000000000..b22ceba583029a --- /dev/null +++ b/ports/meschach/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "meschach", + "version-string": "1.2b", + "port-version": 4, + "description": "Matrix computations in C", + "homepage": "https://homepage.math.uiowa.edu/~dstewart/meschach" +} diff --git a/ports/meshoptimizer/portfile.cmake b/ports/meshoptimizer/portfile.cmake new file mode 100644 index 00000000000000..e46b174601a5c0 --- /dev/null +++ b/ports/meshoptimizer/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeux/meshoptimizer + REF v0.14 + SHA512 303b3bf1bed7cba8f89bce1c2782e3718fc8f4ec01f7ffd64f5ca23406130097f07d234b142916b16fe586db97c7deaa0ae9135b4e558543cc1664e7db85de67 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMESHOPT_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/meshoptimizer) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/meshoptimizer/vcpkg.json b/ports/meshoptimizer/vcpkg.json new file mode 100644 index 00000000000000..47439742eaabe6 --- /dev/null +++ b/ports/meshoptimizer/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "meshoptimizer", + "version-string": "0.14", + "port-version": 2, + "description": "Mesh optimization library that makes meshes smaller and faster to render", + "homepage": "https://github.com/zeux/meshoptimizer" +} diff --git a/ports/metis/CONTROL b/ports/metis/CONTROL deleted file mode 100644 index 3ddfbb788cf5c6..00000000000000 --- a/ports/metis/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: metis -Version: 5.1.0-5 -Homepage: https://glaros.dtc.umn.edu/gkhome/metis/metis/overview -Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering diff --git a/ports/metis/fix-INT_MIN_define.patch b/ports/metis/fix-INT_MIN_define.patch new file mode 100644 index 00000000000000..97d7881f546100 --- /dev/null +++ b/ports/metis/fix-INT_MIN_define.patch @@ -0,0 +1,34 @@ +diff --git a/include/metis.h b/include/metis.h +index dc5406a..7732437 100644 +--- a/include/metis.h ++++ b/include/metis.h +@@ -72,10 +72,14 @@ typedef __int64 int64_t; + #define PRId64 "I64d" + #define SCNd32 "ld" + #define SCNd64 "I64d" ++#ifdef _WIN32 ++#include ++#else + #define INT32_MIN ((int32_t)_I32_MIN) + #define INT32_MAX _I32_MAX + #define INT64_MIN ((int64_t)_I64_MIN) + #define INT64_MAX _I64_MAX ++#endif + #else + #include + #endif +diff --git a/GKlib/gk_arch.h b/GKlib/gk_arch.h +index 78b1431..7258763 100644 +--- a/GKlib/gk_arch.h ++++ b/GKlib/gk_arch.h +@@ -32,8 +32,8 @@ + + + #ifdef __MSC__ +- #include "ms_stdint.h" +- #include "ms_inttypes.h" ++ #include ++ #include + #include "ms_stat.h" + #else + #ifndef SUNOS diff --git a/ports/metis/install-metisConfig.patch b/ports/metis/install-metisConfig.patch new file mode 100644 index 00000000000000..c07600a85e8418 --- /dev/null +++ b/ports/metis/install-metisConfig.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b9613a7..e43ffee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,3 +22,23 @@ include_directories(include) + add_subdirectory("include") + add_subdirectory("libmetis") + # add_subdirectory("programs") ++ ++if(METIS_INSTALL) ++ set(PRJ_NAME metis) ++ set(PRJ_VER 5.1.0) ++ install(EXPORT metisTargets ++ FILE ${PRJ_NAME}Targets.cmake ++ DESTINATION lib/cmake/${PRJ_NAME}) ++ include(CMakePackageConfigHelpers) ++ write_basic_package_version_file( ++ ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}ConfigVersion.cmake ++ VERSION ${PRJ_VER} ++ COMPATIBILITY SameMajorVersion) ++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}Config.cmake ++ "include(\${CMAKE_CURRENT_LIST_DIR}/${PRJ_NAME}Targets.cmake)") ++ install(FILES ++ ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}ConfigVersion.cmake ++ ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}Config.cmake ++ DESTINATION lib/cmake/${PRJ_NAME}) ++endif() ++ +diff --git a/libmetis/CMakeLists.txt b/libmetis/CMakeLists.txt +index 7a5fc74..5a68cf0 100644 +--- a/libmetis/CMakeLists.txt ++++ b/libmetis/CMakeLists.txt +@@ -9,8 +9,9 @@ if(UNIX) + endif() + + if(METIS_INSTALL) +- install(TARGETS metis ++ install(TARGETS metis EXPORT metisTargets + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib) ++ ARCHIVE DESTINATION lib ++ INCLUDES DESTINATION include) + endif() diff --git a/ports/metis/portfile.cmake b/ports/metis/portfile.cmake index ec17f0dc3041a8..07f5d025721678 100644 --- a/ports/metis/portfile.cmake +++ b/ports/metis/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(OPTIONS -DSHARED=OFF) @@ -22,6 +20,8 @@ vcpkg_extract_source_archive_ex( fix-metis-vs14-math.patch fix-gklib-vs14-math.patch fix-linux-build-error.patch + install-metisConfig.patch + fix-INT_MIN_define.patch ) vcpkg_configure_cmake( @@ -32,9 +32,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/metis) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/metis) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/metis/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/metis/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/metis/vcpkg.json b/ports/metis/vcpkg.json new file mode 100644 index 00000000000000..82baa5438e954d --- /dev/null +++ b/ports/metis/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "metis", + "version-string": "5.1.0", + "port-version": 8, + "description": "Serial Graph Partitioning and Fill-reducing Matrix Ordering", + "homepage": "https://glaros.dtc.umn.edu/gkhome/metis/metis/overview" +} diff --git a/ports/metrohash/CMakeLists.txt b/ports/metrohash/CMakeLists.txt new file mode 100644 index 00000000000000..d63a71345a943e --- /dev/null +++ b/ports/metrohash/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required(VERSION 3.5) +project(metrohash LANGUAGES CXX) +set(CMAKE_CXX_STANDARD 11) + +add_library(metrohash + src/metrohash64.cpp + src/metrohash128.cpp + ) +list(APPEND metro_headers src/metrohash.h src/metrohash64.h src/metrohash128.h) + +include(CheckCXXSourceCompiles) +include(CheckCXXCompilerFlag) + +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + check_cxx_compiler_flag("-msse4.2" HAS_MSSE42) + if(HAS_MSSE42) + target_compile_options(metrohash PRIVATE -msse4.2) + string(APPEND CMAKE_REQUIRED_FLAGS " -msse4.2") + endif() +endif() + +check_cxx_source_compiles( +"#include +int main() { + _mm_crc32_u64(0, 0); + return 0; +}" +HAS_mm_crc32_u64) + +if(HAS_mm_crc32_u64) + list(APPEND metro_headers src/metrohash128crc.h) + target_sources(metrohash PRIVATE src/metrohash128crc.cpp) +endif() +if(CMAKE_CXX_COMPILER_ID MATCHES GNU) + target_compile_options(metrohash PRIVATE -march=native) +endif() + +set_target_properties(metrohash PROPERTIES + PUBLIC_HEADER "${metro_headers}" + ) + +include(CMakePackageConfigHelpers) + +set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") +set(config_install_dir "lib/cmake/${PROJECT_NAME}") +set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") +set(namespace "${PROJECT_NAME}::") + +configure_package_config_file( + "${CMAKE_SOURCE_DIR}/cmake/Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION "${config_install_dir}" +) +#Installation +install(TARGETS metrohash + EXPORT "${TARGETS_EXPORT_NAME}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + PUBLIC_HEADER DESTINATION "include") + +install( + FILES "${project_config}" + DESTINATION "${config_install_dir}" +) +install(EXPORT "${TARGETS_EXPORT_NAME}" + NAMESPACE "${namespace}" + DESTINATION "${config_install_dir}" + ) diff --git a/ports/metrohash/Config.cmake.in b/ports/metrohash/Config.cmake.in new file mode 100644 index 00000000000000..38bbde7b37fb35 --- /dev/null +++ b/ports/metrohash/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/ports/metrohash/portfile.cmake b/ports/metrohash/portfile.cmake new file mode 100644 index 00000000000000..d62741a2adf597 --- /dev/null +++ b/ports/metrohash/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jandrewrogers/MetroHash + REF v1.1.3 + SHA512 02b6316e5ebf3d81465eea8a068565452be642394ddf5a53350affbbc9b9bfe1c3d182f7e8f7d49895351c48e11929e465777535e4354e01b6d0ba459e583ac5 + HEAD_REF master +) + +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +configure_file(${CURRENT_PORT_DIR}/Config.cmake.in ${SOURCE_PATH}/cmake/Config.cmake.in COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/include/metrohash128crc.h") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/metrohash.h + "#include \"metrohash128crc.h\"" + "//#include \"metrohash128crc.h\" // The target platform does not support _mm_crc32_u64") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/metrohash/vcpkg.json b/ports/metrohash/vcpkg.json new file mode 100644 index 00000000000000..2f61a8670c6bf2 --- /dev/null +++ b/ports/metrohash/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "metrohash", + "version": "1.1.3", + "port-version": 4, + "description": "MetroHash is a set of state-of-the-art hash functions for non-cryptographic use cases", + "homepage": "https://github.com/jandrewrogers/MetroHash" +} diff --git a/ports/mfl/portfile.cmake b/ports/mfl/portfile.cmake new file mode 100644 index 00000000000000..3bb9cbceb5d53b --- /dev/null +++ b/ports/mfl/portfile.cmake @@ -0,0 +1,24 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +message(WARNING "${PORT} is a C++20 library and requires a corresponding compiler. GCC 10, Clang 10 and MSVC 2019 16.8 are known to work.") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-niel/mfl + REF v0.0.1 + SHA512 a609b4ff23a01e9f9d9bf60bfa6e0b2346b054cf0c27e74e6da574dcfd2a6ead30dcb8464cf03cae2bb9995f15f01ffda5f862c0ec2744a9ad38b856ff27f073 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mfl) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mfl/vcpkg.json b/ports/mfl/vcpkg.json new file mode 100644 index 00000000000000..88dc46f3c03f62 --- /dev/null +++ b/ports/mfl/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "mfl", + "version": "0.0.1", + "description": "Computes the layout information for mathematical formulas provided in TeX-like syntax.", + "homepage": "https://github.com/cpp-niel/mfl", + "license": "MIT", + "supports": "static", + "dependencies": [ + "cairo", + "doctest", + "fmt", + "freetype", + "harfbuzz", + "range-v3" + ] +} diff --git a/ports/mgnlibs/portfile.cmake b/ports/mgnlibs/portfile.cmake new file mode 100644 index 00000000000000..cd5ee8d2131eb1 --- /dev/null +++ b/ports/mgnlibs/portfile.cmake @@ -0,0 +1,16 @@ +#header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mattiasgustavsson/libs + REF 9a6e7205caecbe336e41aebdc9c79a5c47daa5ec + SHA512 87493f883f0752a334bbcec69228e325d9e1f36a99d313be9243f4e6e14876bcd5a976682d3fd7e3e285e426ac69587d35ba3378b2124450b9a8ed6127f110a5 + HEAD_REF master +) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mgnlibs/README.md) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mgnlibs/README.md ${CURRENT_PACKAGES_DIR}/share/mgnlibs/copyright) + +# Copy the header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/mgnlibs) diff --git a/ports/mgnlibs/vcpkg.json b/ports/mgnlibs/vcpkg.json new file mode 100644 index 00000000000000..e6b8522580344c --- /dev/null +++ b/ports/mgnlibs/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mgnlibs", + "version-string": "2019-09-29", + "port-version": 1, + "description": "Single-file public domain libraries for C/C++", + "homepage": "https://github.com/mattiasgustavsson/libs" +} diff --git a/ports/mhook/CONTROL b/ports/mhook/CONTROL deleted file mode 100644 index 24fae14dfc553f..00000000000000 --- a/ports/mhook/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: mhook -Version: 2.5.1-1 -Description: A Windows API hooking library. diff --git a/ports/mhook/fix-windows-packing-mismatch.patch b/ports/mhook/fix-windows-packing-mismatch.patch new file mode 100644 index 00000000000000..847cd4ba3d675d --- /dev/null +++ b/ports/mhook/fix-windows-packing-mismatch.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6e1df9f..e1e6ced 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,7 +4,7 @@ project(mhook) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake") + +-add_definitions(-DNO_SANITY_CHECKS -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN) ++add_definitions(-DNO_SANITY_CHECKS -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -DWINDOWS_IGNORE_PACKING_MISMATCH) + + file(GLOB DisasmSrc disasm-lib/*.c disasm-lib/*.h) + file(GLOB MhookSrc mhook-lib/*.cpp mhook-lib/*.h) diff --git a/ports/mhook/portfile.cmake b/ports/mhook/portfile.cmake index e9faeccaea8e01..51b47c316073ed 100644 --- a/ports/mhook/portfile.cmake +++ b/ports/mhook/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apriorit/mhook REF 2.5.1 SHA512 914f198417b1e30301a42463af5cfbf9269dc64bcf1be87d3d6d2943fd72b3536f48eb4bfb25a51dd0bbe0f8f099777b2d49c9d58cb2e2eeb517d998917ae976 HEAD_REF master + PATCHES fix-windows-packing-mismatch.patch ) vcpkg_configure_cmake( diff --git a/ports/mhook/vcpkg.json b/ports/mhook/vcpkg.json new file mode 100644 index 00000000000000..8c55068ce6dabf --- /dev/null +++ b/ports/mhook/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "mhook", + "version-string": "2.5.1", + "port-version": 2, + "description": "A Windows API hooking library." +} diff --git a/ports/microsoft-signalr/portfile.cmake b/ports/microsoft-signalr/portfile.cmake new file mode 100644 index 00000000000000..d5b8266ef3bc54 --- /dev/null +++ b/ports/microsoft-signalr/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aspnet/SignalR-Client-Cpp + REF v0.1.0-alpha3 + SHA512 7dbd75748535c7b7fef36afe246b132b243b8b4932c218a63aa18c7a44d6691c002144c6d2f5603ad63c03d018907436ad259fdfcc0d7749917931bdebef670b + HEAD_REF main +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + cpprestsdk USE_CPPRESTSDK + messagepack USE_MSGPACK +) + +if("cpprestsdk" IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "microsoft-signalr[cpprestsdk] is not supported on UWP, use microsoft-signalr[core] instead") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + ${FEATURE_OPTIONS} + -DWALL=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/microsoft-signalr) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/share ${CURRENT_PACKAGES_DIR}/lib/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${SOURCE_PATH}/third-party-notices.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/microsoft-signalr/vcpkg.json b/ports/microsoft-signalr/vcpkg.json new file mode 100644 index 00000000000000..12e555add59c87 --- /dev/null +++ b/ports/microsoft-signalr/vcpkg.json @@ -0,0 +1,42 @@ +{ + "name": "microsoft-signalr", + "version-string": "0.1.0-alpha3", + "port-version": 1, + "description": "C++ Client for ASP.NET Core SignalR.", + "homepage": "https://github.com/aspnet/SignalR-Client-Cpp", + "default-features": [ + "default-features" + ], + "features": { + "cpprestsdk": { + "description": "Add default Http and WebSocket implementations using CppRestSDK", + "dependencies": [ + { + "name": "cpprestsdk", + "features": [ + "default-features", + "websockets" + ] + } + ] + }, + "default-features": { + "description": "Features installed by default", + "dependencies": [ + { + "name": "microsoft-signalr", + "features": [ + "cpprestsdk" + ], + "platform": "!uwp" + } + ] + }, + "messagepack": { + "description": "Add support for the messagepack hub protocol, must enable in code still", + "dependencies": [ + "msgpack" + ] + } + } +} diff --git a/ports/mikktspace/CMakeLists.txt b/ports/mikktspace/CMakeLists.txt new file mode 100644 index 00000000000000..34c2ef2a38e96f --- /dev/null +++ b/ports/mikktspace/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required(VERSION 3.8) +project(mikktspace C) + +set(CMAKE_DEBUG_POSTFIX d) + +add_library(${PROJECT_NAME} "") +add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) +target_include_directories( + ${PROJECT_NAME} + PUBLIC + $ + $ +) + +target_sources( + ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/mikktspace.c +) + +install( + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}_target + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +if(NOT MIKKTSPACE_SKIP_HEADERS) + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/mikktspace.h + DESTINATION include + ) +endif() + +install( + EXPORT ${PROJECT_NAME}_target + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-config.cmake + DESTINATION share/${PROJECT_NAME} +) diff --git a/ports/mikktspace/portfile.cmake b/ports/mikktspace/portfile.cmake new file mode 100644 index 00000000000000..28493897f49510 --- /dev/null +++ b/ports/mikktspace/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mmikk/MikkTSpace + REF 3e895b49d05ea07e4c2133156cfa94369e19e409 + SHA512 3ca433bd4efd0e048138f9efc5ba9021e4f3f78a535ea48733088ba5f43e60aad7f840f00e0597a0c053cda4776177bf6deb14cecf4d172b9b68acf00d5a1ca7 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DMIKKTSPACE_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/mikktspace.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mikktspace/vcpkg.json b/ports/mikktspace/vcpkg.json new file mode 100644 index 00000000000000..c26b3e36070f44 --- /dev/null +++ b/ports/mikktspace/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mikktspace", + "version-string": "2020-10-06", + "port-version": 1, + "description": "A common standard for tangent space used in baking tools to produce normal maps", + "homepage": "https://github.com/mmikk/MikkTSpace" +} diff --git a/ports/milerius-sfml-imgui/CONTROL b/ports/milerius-sfml-imgui/CONTROL deleted file mode 100644 index 7d3ec477d22369..00000000000000 --- a/ports/milerius-sfml-imgui/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: milerius-sfml-imgui -Version: 1.1-2 -Description: imgui dll for sfml usage -Build-Depends: sfml (windows), imgui diff --git a/ports/milerius-sfml-imgui/FixFindPackageIssue.patch b/ports/milerius-sfml-imgui/FixFindPackageIssue.patch index be47cfada98c03..a3d8053ddd65a0 100644 --- a/ports/milerius-sfml-imgui/FixFindPackageIssue.patch +++ b/ports/milerius-sfml-imgui/FixFindPackageIssue.patch @@ -1,53 +1,53 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 27b8bd8..33fe623 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -2,7 +2,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) - message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the source code and call cmake from there") - endif () - --project(sfml-imgui) -+project(milerius-sfml-imgui) - cmake_minimum_required(VERSION 3.9) - set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - -@@ -26,7 +26,7 @@ include(CMakePackageConfigHelpers) - - install(TARGETS - ${PROJECT_NAME} -- EXPORT sfml-imgui-targets -+ EXPORT milerius-sfml-imgui-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -@@ -39,7 +39,7 @@ install(EXPORT ${PROJECT_NAME}-targets - ) - - configure_package_config_file( -- "${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake.in" -+ "${PROJECT_SOURCE_DIR}/cmake/sfml-imgui-config.cmake.in" - "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - INSTALL_DESTINATION lib/cmake/${PROJECT_NAME} - ) -@@ -51,6 +51,6 @@ install(FILES - install(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR}/sfml-imgui - DESTINATION -- ${CMAKE_INSTALL_INCLUDEDIR}/sfml-imgui -+ ${CMAKE_INSTALL_INCLUDEDIR}/ - FILES_MATCHING PATTERN "*.h*" - ) -diff --git a/cmake/sfml-imgui-config.cmake.in b/cmake/sfml-imgui-config.cmake.in -index cd790be..e1bdd77 100644 ---- a/cmake/sfml-imgui-config.cmake.in -+++ b/cmake/sfml-imgui-config.cmake.in -@@ -2,5 +2,5 @@ - find_package(SFML CONFIG REQUIRED graphics) - find_package(imgui CONFIG REQUIRED) - find_package(OpenGL REQUIRED) --include("${CMAKE_CURRENT_LIST_DIR}/sfml-imgui-targets.cmake") --check_required_components("sfml-imgui") -\ No newline at end of file -+include("${CMAKE_CURRENT_LIST_DIR}/milerius-sfml-imgui-targets.cmake") -+check_required_components("milerius-sfml-imgui") -\ No newline at end of file +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 27b8bd8..33fe623 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the source code and call cmake from there") + endif () + +-project(sfml-imgui) ++project(milerius-sfml-imgui) + cmake_minimum_required(VERSION 3.9) + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +@@ -26,7 +26,7 @@ include(CMakePackageConfigHelpers) + + install(TARGETS + ${PROJECT_NAME} +- EXPORT sfml-imgui-targets ++ EXPORT milerius-sfml-imgui-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -39,7 +39,7 @@ install(EXPORT ${PROJECT_NAME}-targets + ) + + configure_package_config_file( +- "${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake.in" ++ "${PROJECT_SOURCE_DIR}/cmake/sfml-imgui-config.cmake.in" + "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" + INSTALL_DESTINATION lib/cmake/${PROJECT_NAME} + ) +@@ -51,6 +51,6 @@ install(FILES + install(DIRECTORY + ${CMAKE_CURRENT_SOURCE_DIR}/sfml-imgui + DESTINATION +- ${CMAKE_INSTALL_INCLUDEDIR}/sfml-imgui ++ ${CMAKE_INSTALL_INCLUDEDIR}/ + FILES_MATCHING PATTERN "*.h*" + ) +diff --git a/cmake/sfml-imgui-config.cmake.in b/cmake/sfml-imgui-config.cmake.in +index cd790be..e1bdd77 100644 +--- a/cmake/sfml-imgui-config.cmake.in ++++ b/cmake/sfml-imgui-config.cmake.in +@@ -2,5 +2,5 @@ + find_package(SFML CONFIG REQUIRED graphics) + find_package(imgui CONFIG REQUIRED) + find_package(OpenGL REQUIRED) +-include("${CMAKE_CURRENT_LIST_DIR}/sfml-imgui-targets.cmake") +-check_required_components("sfml-imgui") +\ No newline at end of file ++include("${CMAKE_CURRENT_LIST_DIR}/milerius-sfml-imgui-targets.cmake") ++check_required_components("milerius-sfml-imgui") +\ No newline at end of file diff --git a/ports/milerius-sfml-imgui/portfile.cmake b/ports/milerius-sfml-imgui/portfile.cmake index c5191cb8588e0a..63ce4e7c548d7d 100644 --- a/ports/milerius-sfml-imgui/portfile.cmake +++ b/ports/milerius-sfml-imgui/portfile.cmake @@ -1,25 +1,23 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Milerius/imgui-sfml-shared - REF 1.1 - SHA512 191184f7b302f643bd7c241b69d9f9edc0d03c6f5a0b3a49f57ac84f3828202f8065291fb17993073a2c07f1237ba491de677c47e2f8160dc70ea77f20eb1946 - HEAD_REF master - PATCHES FixFindPackageIssue.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/milerius-sfml-imgui) -vcpkg_copy_pdbs() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui) +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Milerius/imgui-sfml-shared + REF 1.1 + SHA512 191184f7b302f643bd7c241b69d9f9edc0d03c6f5a0b3a49f57ac84f3828202f8065291fb17993073a2c07f1237ba491de677c47e2f8160dc70ea77f20eb1946 + HEAD_REF master + PATCHES FixFindPackageIssue.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/milerius-sfml-imgui) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui) file(RENAME ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui/LICENSE ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui/copyright) \ No newline at end of file diff --git a/ports/milerius-sfml-imgui/vcpkg.json b/ports/milerius-sfml-imgui/vcpkg.json new file mode 100644 index 00000000000000..e208a73f3b863e --- /dev/null +++ b/ports/milerius-sfml-imgui/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "milerius-sfml-imgui", + "version-string": "1.1", + "port-version": 3, + "description": "imgui dll for sfml usage", + "dependencies": [ + "imgui", + "sfml" + ] +} diff --git a/ports/mimalloc/CONTROL b/ports/mimalloc/CONTROL deleted file mode 100644 index daf48d8ce4e293..00000000000000 --- a/ports/mimalloc/CONTROL +++ /dev/null @@ -1,13 +0,0 @@ -Source: mimalloc -Version: 2019-06-25-1 -Description: Compact general purpose allocator with excellent performance -Homepage: https://github.com/microsoft/mimalloc - -Feature: asm -Description: Generate assembly files - -Feature: override -Description: Override the standard malloc interface - -Feature: secure -Description: Use security mitigations (like guard pages and randomization) diff --git a/ports/mimalloc/fix-cmake.patch b/ports/mimalloc/fix-cmake.patch index 3fd5f305099e3a..2824055a5a25ab 100644 --- a/ports/mimalloc/fix-cmake.patch +++ b/ports/mimalloc/fix-cmake.patch @@ -1,52 +1,39 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a35e885..76b6f60 100644 +index b56953c..d7ad3e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -105,7 +105,7 @@ else() - list(APPEND mi_libraries pthread) +@@ -279,10 +279,12 @@ if(MI_BUILD_SHARED) + add_custom_command(TARGET mimalloc POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" $ + COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory") ++ install ( ++ FILES $/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll ++ DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ) + endif() +- +- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) +- install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) ++ install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib NAMELINK_SKIP) endif() -- -+if(BUILD_SHARED_LIBS) - # shared library - add_library(mimalloc SHARED ${mi_sources}) - set_target_properties(mimalloc PROPERTIES VERSION ${mi_version} NO_SONAME "YES" OUTPUT_NAME ${mi_basename} ) -@@ -116,7 +116,7 @@ endif() - target_compile_options(mimalloc PRIVATE ${mi_cflags}) - target_include_directories(mimalloc PRIVATE include PUBLIC $) - target_link_libraries(mimalloc PUBLIC ${mi_libraries}) -- -+else() # static library - add_library(mimalloc-static STATIC ${mi_sources}) - if(WIN32) -@@ -135,15 +135,18 @@ endif() - target_compile_options(mimalloc-static PRIVATE ${mi_cflags}) - target_include_directories(mimalloc-static PRIVATE include PUBLIC $) - target_link_libraries(mimalloc-static PUBLIC ${mi_libraries}) -+endif() +@@ -308,6 +310,8 @@ if (MI_BUILD_STATIC) + install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) + endif() - # install static and shared library, and the include files --install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_dir} LIBRARY NAMELINK_SKIP) --install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_dir}) -+if(BUILD_SHARED_LIBS) -+install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib NAMELINK_SKIP) -+else() -+install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION lib) -+endif() - install(FILES include/mimalloc.h DESTINATION ${mi_install_dir}/include) - install(FILES cmake/mimalloc-config.cmake DESTINATION ${mi_install_dir}/cmake) - install(FILES cmake/mimalloc-config-version.cmake DESTINATION ${mi_install_dir}/cmake) - install(EXPORT mimalloc DESTINATION ${mi_install_dir}/cmake) --install(FILES "$" DESTINATION lib) # duplicate the .so in the lib directory (unversioned) ++install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) ++ + # install include files + install(FILES include/mimalloc.h DESTINATION ${mi_install_incdir}) + install(FILES include/mimalloc-override.h DESTINATION ${mi_install_incdir}) +@@ -342,9 +346,6 @@ if (MI_BUILD_OBJECT) - # single object file for more predictable static overriding - add_library(mimalloc-obj OBJECT src/static.c) -@@ -154,7 +157,3 @@ if(NOT WIN32 AND MI_OVERRIDE MATCHES "ON") + # the FILES expression can also be: $ + # but that fails cmake versions less than 3.10 so we leave it as is for now +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION} +- DESTINATION ${mi_install_libdir} +- RENAME ${mi_basename}${CMAKE_C_OUTPUT_EXTENSION} ) endif() - target_compile_options(mimalloc-obj PRIVATE ${mi_cflags}) - target_include_directories(mimalloc-obj PRIVATE include PUBLIC $) -- --install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION} -- DESTINATION ${mi_install_dir} -- RENAME ${mi_basename}${CMAKE_C_OUTPUT_EXTENSION} ) + + # ----------------------------------------------------------------------------- diff --git a/ports/mimalloc/portfile.cmake b/ports/mimalloc/portfile.cmake index 1a11284f568c21..b334bcad6dec06 100644 --- a/ports/mimalloc/portfile.cmake +++ b/ports/mimalloc/portfile.cmake @@ -1,24 +1,26 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/mimalloc - REF c6c1d5fffd0cf8dcb2ab969cde8fd170af44fdef - SHA512 3b9ce5d7dd70dd5ea56b70833c842068312a739e6131d956fd733e9893441e7e3340b6734bea0b799ac292533b0082975c08facd963961062dac821ccc44f9a9 + REF 752594e76423526e108413731518a26e3322b9ca # v1.7.2 + SHA512 fc96f6aa6972c167a956d8f928d9becd546689356d86e800df0f54c9c46cedf74d686168f44566fb4d0aa9cddf7a9444327acd2180cc91386c53658c6a5018f1 HEAD_REF master PATCHES fix-cmake.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - asm MI_SEE_ASM - secure MI_SECURE - override MI_OVERRIDE + FEATURES + asm MI_SEE_ASM + secure MI_SECURE + override MI_OVERRIDE ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MI_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MI_BUILD_SHARED) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS_DEBUG -DMI_CHECK_FULL=ON OPTIONS_RELEASE @@ -26,46 +28,31 @@ vcpkg_configure_cmake( OPTIONS -DMI_INTERPOSE=ON -DMI_USE_CXX=OFF + -DMI_BUILD_TESTS=OFF ${FEATURE_OPTIONS} + -DMI_BUILD_STATIC=${MI_BUILD_STATIC} + -DMI_BUILD_SHARED=${MI_BUILD_SHARED} + -DMI_INSTALL_TOPLEVEL=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(GLOB lib_directories RELATIVE ${CURRENT_PACKAGES_DIR}/lib "${CURRENT_PACKAGES_DIR}/lib/${PORT}-*") -list(GET lib_directories 0 lib_install_dir) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/${lib_install_dir}/cmake) - -vcpkg_replace_string( - ${CURRENT_PACKAGES_DIR}/share/${PORT}/mimalloc.cmake - "lib/${lib_install_dir}/" - "" -) - file(COPY - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} -) - -file(COPY ${CURRENT_PACKAGES_DIR}/lib/${lib_install_dir}/include DESTINATION ${CURRENT_PACKAGES_DIR}) - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/lib/${lib_install_dir} - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/lib/${lib_install_dir} + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" ) +vcpkg_cmake_config_fixup(CONFIG_PATH cmake) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) vcpkg_replace_string( - ${CURRENT_PACKAGES_DIR}/include/mimalloc.h + "${CURRENT_PACKAGES_DIR}/include/mimalloc.h" "!defined(MI_SHARED_LIB)" "0 // !defined(MI_SHARED_LIB)" ) endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/mimalloc/vcpkg.json b/ports/mimalloc/vcpkg.json new file mode 100644 index 00000000000000..ecb642a739d576 --- /dev/null +++ b/ports/mimalloc/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "mimalloc", + "version": "1.7.2", + "description": "Compact general purpose allocator with excellent performance", + "homepage": "https://github.com/microsoft/mimalloc", + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "asm": { + "description": "Generate assembly files" + }, + "override": { + "description": "Override the standard malloc interface" + }, + "secure": { + "description": "Use security mitigations (like guard pages and randomization)" + } + } +} diff --git a/ports/minc/build.patch b/ports/minc/build.patch new file mode 100644 index 00000000000000..d0275c20d4c61e --- /dev/null +++ b/ports/minc/build.patch @@ -0,0 +1,67 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 52cc81ace..d7a1f63f8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -403,9 +404,11 @@ ENDIF(LIBMINC_MINC1_SUPPORT) + # Keep this variable for compatibility + SET(VOLUME_IO_LIBRARY ${LIBMINC_EXTERNAL_LIB_PREFIX}minc2) + SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) + + ADD_LIBRARY(${LIBMINC_LIBRARY} ${LIBRARY_TYPE} ${minc_LIB_SRCS} ${minc_HEADERS} ${volume_io_LIB_SRCS} ${volume_io_HEADERS} ) +- ++if(WIN32) ++ target_link_libraries(${LIBMINC_LIBRARY} ws2_32) ++endif() + IF(NIFTI_FOUND AND NOT LIBMINC_USE_SYSTEM_NIFTI) + ADD_DEPENDENCIES(${LIBMINC_LIBRARY} NIFTI) + ENDIF() +@@ -453,7 +456,7 @@ IF( LIBMINC_INSTALL_LIB_DIR ) + ${LIBMINC_EXPORTED_TARGETS} + LIBRARY DESTINATION ${LIBMINC_INSTALL_LIB_DIR} COMPONENT libraries + ARCHIVE DESTINATION ${LIBMINC_INSTALL_LIB_DIR} COMPONENT libraries +- RUNTIME DESTINATION ${LIBMINC_INSTALL_LIB_DIR} COMPONENT libraries ++ RUNTIME DESTINATION ${LIBMINC_INSTALL_BIN_DIR} COMPONENT libraries + ) + ENDIF( LIBMINC_INSTALL_LIB_DIR ) + +@@ -538,7 +541,7 @@ IF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT) + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Use${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINC.cmake + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINCConfig.cmake + DESTINATION +- ${LIBMINC_INSTALL_LIB_DIR} ++ ${LIBMINC_INSTALL_LIB_DIR}/cmake + COMPONENT Development) + + ENDIF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT) +diff --git a/config.h.cmake b/config.h.cmake +index 9ceffa8fc..21c2f3baf 100644 +--- a/config.h.cmake ++++ b/config.h.cmake +@@ -1,4 +1,8 @@ + /* various defines */ ++#ifdef _MSC_VER ++#define strcasecmp _stricmp ++#define strncasecmp _strnicmp ++#endif + + #ifndef MINC2 + #define MINC2 @MINC2@ +diff --git a/libcommon/minc_config.c b/libcommon/minc_config.c +index 531ef108e..5472d9274 100644 +--- a/libcommon/minc_config.c ++++ b/libcommon/minc_config.c +@@ -20,14 +20,6 @@ + + #include "minc_config.h" + +-#ifdef _MSC_VER +-#define snprintf _snprintf +-#define vsnprintf _vsnprintf +-#define strcasecmp _stricmp +-#define strncasecmp _strnicmp +-#endif +- +- + static const char *_CONFIG_VAR[]= + { + "MINC_FORCE_V2", diff --git a/ports/minc/config.patch b/ports/minc/config.patch new file mode 100644 index 00000000000000..a726b9a57f0392 --- /dev/null +++ b/ports/minc/config.patch @@ -0,0 +1,15 @@ +diff --git a/LIBMINCConfig.cmake.in b/LIBMINCConfig.cmake.in +index 7790597b2..c041b685a 100644 +--- a/LIBMINCConfig.cmake.in ++++ b/LIBMINCConfig.cmake.in +@@ -1,3 +1,4 @@ ++set(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../") + # LIBMINC CMake configuration file + + get_filename_component(LIBMINC_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH ) +@@ -37,3 +38,4 @@ set( LIBMINC_FOUND 1 ) + # set( LIBMINC_TARGETS_IMPORTED 1 ) + # include( "${LIBMINC_CMAKE_DIR}/@LIBMINC_EXPORTED_TARGETS@.cmake" ) + #endif() ++unset(_IMPORT_PREFIX) +\ No newline at end of file diff --git a/ports/minc/fix-dependency-hdf5.patch b/ports/minc/fix-dependency-hdf5.patch new file mode 100644 index 00000000000000..40943411c5eda9 --- /dev/null +++ b/ports/minc/fix-dependency-hdf5.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a6830b4..da3d635 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -65,7 +65,12 @@ IF(NOT LIBMINC_EXTERNALLY_CONFIGURED) + # external packages + FIND_PACKAGE(ZLIB REQUIRED) + SET(HDF5_NO_FIND_PACKAGE_CONFIG_FILE ON) +- FIND_PACKAGE(HDF5 REQUIRED COMPONENTS C ) ++ FIND_PACKAGE(hdf5 CONFIG REQUIRED) ++ if (TARGET hdf5::hdf5-shared) ++ SET(HDF5_LIBRARIES hdf5::hdf5-shared) ++ elseif (TARGET hdf5::hdf5-static) ++ SET(HDF5_LIBRARIES hdf5::hdf5-static) ++ endif() + + IF (LIBMINC_USE_SYSTEM_NIFTI) + FIND_PACKAGE(NIFTI) +@@ -515,12 +520,8 @@ IF(SUPERBUILD_STAGING_PREFIX) + STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" LIBMINC_LIBRARIES_CONFIG "${LIBMINC_LIBRARIES_CONFIG}") + STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" EZMINC_LIBRARIES "${EZMINC_LIBRARIES}") + STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" NETCDF_INCLUDE_DIR "${NETCDF_INCLUDE_DIR}") +- STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIR}") +- STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" HDF5_INCLUDE_DIRS "${HDF5_INCLUDE_DIRS}") + STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" NIFTI_INCLUDE_DIR "${NIFTI_INCLUDE_DIR}") + STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" NETCDF_LIBRARY "${NETCDF_LIBRARY}") +- STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" HDF5_LIBRARY "${HDF5_LIBRARY}") +- STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" HDF5_LIBRARIES "${HDF5_LIBRARIES}") + STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" NIFTI_LIBRARY "${NIFTI_LIBRARY}") + STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" ZNZ_LIBRARY "${ZNZ_LIBRARY}") + STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" ZLIB_LIBRARY "${ZLIB_LIBRARY}") diff --git a/ports/minc/portfile.cmake b/ports/minc/portfile.cmake new file mode 100644 index 00000000000000..6fbec96273aaf0 --- /dev/null +++ b/ports/minc/portfile.cmake @@ -0,0 +1,49 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BIC-MNI/libminc + REF e75a936c12a305b596d743c26a5437196ebce2a4 + SHA512 744f879ac8f0594c310d1c1b7fe67543c5feeb3e5a0979035918dbb2bf1d0973fbd389e5357a75631e618cc614b648c21179f7467576bd68e3522e63f21451b0 + HEAD_REF master + PATCHES + build.patch + config.patch + fix-dependency-hdf5.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "minc1" LIBMINC_MINC1_SUPPORT +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # Symbols are not properly exported +endif() + +set(OPTIONS) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND OPTIONS "-DLIBMINC_BUILD_SHARED_LIBS=ON") +else() + list(APPEND OPTIONS "-DLIBMINC_BUILD_SHARED_LIBS=OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + "-DBUILD_TESTING=OFF" + "-DLIBMINC_USE_SYSTEM_NIFTI=ON" + ${OPTIONS} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/libminc) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/minc/vcpkg.json b/ports/minc/vcpkg.json new file mode 100644 index 00000000000000..0fd609d6779cfc --- /dev/null +++ b/ports/minc/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "minc", + "version-string": "2.4.03", + "port-version": 2, + "description": "MINC - Medical Image NetCDF or MINC isn't netCDF", + "homepage": "https://github.com/BIC-MNI/libminc", + "dependencies": [ + { + "name": "hdf5", + "default-features": false + }, + "nifticlib", + "zlib" + ], + "features": { + "minc1": { + "description": "Support minc1 file format, requires NETCDF", + "dependencies": [ + { + "name": "netcdf", + "default-features": false + } + ] + } + } +} diff --git a/ports/minhook/CONTROL b/ports/minhook/CONTROL deleted file mode 100644 index 95209891ba88ec..00000000000000 --- a/ports/minhook/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: minhook -Version: 1.3.3 -Description: The Minimalistic x86/x64 API Hooking Library for Windows. \ No newline at end of file diff --git a/ports/minhook/fix-usage.patch b/ports/minhook/fix-usage.patch new file mode 100644 index 00000000000000..198b8795df02cf --- /dev/null +++ b/ports/minhook/fix-usage.patch @@ -0,0 +1,10 @@ +diff --git a/cmake/minhook-config.cmake.in b/cmake/minhook-config.cmake.in +index 14e6463..28fa17c 100644 +--- a/cmake/minhook-config.cmake.in ++++ b/cmake/minhook-config.cmake.in +@@ -36,4 +36,4 @@ set(MINHOOK_FOUND ON) + set_and_check(MINHOOK_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/") + set_and_check(MINHOOK_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/lib") + +-include("${PACKAGE_PREFIX_DIR}/lib/minhook/minhook-targets.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/minhook-targets.cmake") diff --git a/ports/minhook/install-destination.patch b/ports/minhook/install-destination.patch deleted file mode 100644 index 13f3dc3799634c..00000000000000 --- a/ports/minhook/install-destination.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index df947af..6a894d8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -113,7 +113,7 @@ install( - "${CMAKE_CURRENT_BINARY_DIR}/minhook-config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/minhook-config-version.cmake" - DESTINATION -- "lib/minhook" -+ share/minhook - ) - - ################### -@@ -133,7 +133,7 @@ install( - NAMESPACE - minhook:: - DESTINATION -- "lib/minhook" -+ share/minhook - ) - - install( diff --git a/ports/minhook/portfile.cmake b/ports/minhook/portfile.cmake index 13779a3388ced2..bd022d5bcbcfb0 100644 --- a/ports/minhook/portfile.cmake +++ b/ports/minhook/portfile.cmake @@ -1,8 +1,4 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") set(BUILD_ARCH "Win32") @@ -30,20 +26,18 @@ vcpkg_from_github( HEAD_REF master PATCHES "${CMAKE_SUPPORT_PATCH}" - install-destination.patch + fix-usage.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/minhook) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/minhook-targets-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/minhook/vcpkg.json b/ports/minhook/vcpkg.json new file mode 100644 index 00000000000000..707945cccce056 --- /dev/null +++ b/ports/minhook/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "minhook", + "version-string": "1.3.3", + "port-version": 2, + "description": "The Minimalistic x86/x64 API Hooking Library for Windows.", + "supports": "!uwp" +} diff --git a/ports/minifb/fix-arm-build-error.patch b/ports/minifb/fix-arm-build-error.patch new file mode 100644 index 00000000000000..66579d44954760 --- /dev/null +++ b/ports/minifb/fix-arm-build-error.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06ba472..0f5874c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,6 +54,27 @@ add_library(minifb STATIC + ${SrcLib} + ) + ++if (WIN32) ++add_executable(noise ++ tests/noise.c ++) ++target_link_libraries(noise minifb Gdi32.lib) ++ ++add_executable(input_events ++ tests/input_events.c ++) ++target_link_libraries(input_events minifb Gdi32.lib) ++ ++add_executable(input_events_cpp ++ tests/input_events_cpp.cpp ++) ++target_link_libraries(input_events_cpp minifb Gdi32.lib) ++ ++add_executable(multiple_windows ++ tests/multiple_windows.c ++) ++target_link_libraries(multiple_windows minifb Gdi32.lib) ++else() + add_executable(noise + tests/noise.c + ) +@@ -73,6 +94,7 @@ add_executable(multiple_windows + tests/multiple_windows.c + ) + target_link_libraries(multiple_windows minifb) ++endif() + + if (MSVC) + elseif (MINGW) diff --git a/ports/minifb/fix-build-error.patch b/ports/minifb/fix-build-error.patch new file mode 100644 index 00000000000000..e1a4c07758f1d4 --- /dev/null +++ b/ports/minifb/fix-build-error.patch @@ -0,0 +1,25 @@ +diff --git a/src/windows/WinMiniFB.c b/src/windows/WinMiniFB.c +index 84ed0cb..b33f252 100644 +--- a/src/windows/WinMiniFB.c ++++ b/src/windows/WinMiniFB.c +@@ -19,7 +19,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) + { + LRESULT res = 0; + +- SWindowData *window_data = (SWindowData *) GetWindowLongPtr(hWnd, GWL_USERDATA); ++ SWindowData *window_data = (SWindowData *) GetWindowLongPtr(hWnd, GWLP_USERDATA); + SWindowData_Win *window_data_win = 0x0; + if(window_data != 0x0) { + window_data_win = (SWindowData_Win *) window_data->specific; +diff --git a/tests/multiple_windows.c b/tests/multiple_windows.c +index 4b301c0..29276be 100644 +--- a/tests/multiple_windows.c ++++ b/tests/multiple_windows.c +@@ -1,6 +1,7 @@ + #include + #include + #include ++#define _USE_MATH_DEFINES + #include + + #define kUnused(var) (void) var; diff --git a/ports/minifb/fix-install-error.patch b/ports/minifb/fix-install-error.patch new file mode 100644 index 00000000000000..64f5af04606c3e --- /dev/null +++ b/ports/minifb/fix-install-error.patch @@ -0,0 +1,54 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06ba472..6dc7988 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,12 @@ file(GLOB SrcMacOSX "src/macosx/*.c" + file(GLOB SrcWayland "src/wayland/*.c") + file(GLOB SrcX11 "src/x11/*.c") + ++file(GLOB HEADERS "include/*.h") ++file(GLOB HeaderWindows "src/windows/*.h") ++file(GLOB HeaderMacOSX "src/macosx/*.h") ++file(GLOB HeaderWayland "src/wayland/*.h") ++file(GLOB HeaderX11 "src/x11/*.h") ++ + if (NOT MSVC) + set (CMAKE_C_FLAGS "-g -Wall -Wextra -pedantic -Wno-switch -Wno-unused-function") + set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11") +@@ -34,19 +40,24 @@ if (MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + add_definitions(-D_WIN32_WINNT=0x0600) + list (APPEND SrcLib ${SrcWindows}) ++ list (APPEND HEADERS ${HeaderWindows}) + elseif (MINGW) + add_definitions(-D_WIN32_WINNT=0x0600) + list(APPEND SrcLib ${SrcWindows}) ++ list (APPEND HEADERS ${HeaderWindows}) + elseif (APPLE) + if(USE_METAL_API) + add_definitions(-DUSE_METAL_API) + endif() + list(APPEND SrcLib ${SrcMacOSX}) ++ list (APPEND HEADERS ${HeaderMacOSX}) + elseif (UNIX) + if(USE_WAYLAND_API) + list(APPEND SrcLib ${SrcWayland}) ++ list (APPEND HEADERS ${HeaderWayland}) + else() + list(APPEND SrcLib ${SrcX11}) ++ list (APPEND HEADERS ${HeaderX11}) + endif() + endif() + +@@ -112,3 +123,11 @@ elseif (UNIX) + target_link_libraries(multiple_windows -lX11) + endif() + endif() ++ ++install(TARGETS minifb ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) ++ ++install(FILES ${HEADERS} DESTINATION include) diff --git a/ports/minifb/portfile.cmake b/ports/minifb/portfile.cmake new file mode 100644 index 00000000000000..26b8138891a9b7 --- /dev/null +++ b/ports/minifb/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} currently doesn't supports UWP.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO emoon/minifb + REF 25a440f8226f12b8014d24288ad0587724005afc + SHA512 e54d86e43193d22263003a9539b11cc61cfd4a1b7093c982165cdd6e6f150b431a44e7d4dc8512b62b9853a7605e29cee19f85b8d25a34b3b530f9aa41a2f4a9 + HEAD_REF master + PATCHES + fix-install-error.patch + fix-build-error.patch + fix-arm-build-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/ports/minifb/vcpkg.json b/ports/minifb/vcpkg.json new file mode 100644 index 00000000000000..760b9d2aac5d03 --- /dev/null +++ b/ports/minifb/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "minifb", + "version-string": "2019-08-20", + "port-version": 2, + "description": "MiniFB (Mini FrameBuffer) is a small cross platform library that makes it easy to render (32-bit) pixels in a window.", + "homepage": "https://github.com/emoon/minifb", + "supports": "!uwp" +} diff --git a/ports/minimp3/portfile.cmake b/ports/minimp3/portfile.cmake new file mode 100644 index 00000000000000..08ef0703292522 --- /dev/null +++ b/ports/minimp3/portfile.cmake @@ -0,0 +1,13 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lieff/minimp3 + REF 95864e8e0d3b34402a49ae9af6c66f7e98c13c35 #committed on Nov 27 + SHA512 6e5364a83e882b54fd1eb5ba35ec7c7179b5b5c0ceb2c658615a2306ae0c28252ca8591ec6b515483c6ff0ed608db7eb73fba3d201a20ad4a85ce7b3a091a695 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/minimp3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(COPY ${SOURCE_PATH}/minimp3_ex.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/minimp3/vcpkg.json b/ports/minimp3/vcpkg.json new file mode 100644 index 00000000000000..5fad0a36310ca7 --- /dev/null +++ b/ports/minimp3/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "minimp3", + "version-string": "2020-12-25", + "port-version": 1, + "description": "Minimalistic, single-header library for decoding MP3. minimp3 is designed to be small, fast (with SSE and NEON support), and accurate (ISO conformant).", + "homepage": "https://github.com/lieff/minimp3" +} diff --git a/ports/minisat-master-keying/CONTROL b/ports/minisat-master-keying/CONTROL deleted file mode 100644 index 109ba31b5ef1cb..00000000000000 --- a/ports/minisat-master-keying/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: minisat-master-keying -Version: 2.2-mod-2 -Description: A minimalistic high-performance SAT solver - This is a modernized, cross-platform, CMake-enabled fork of the original MiniSat. -Homepage: https://github.com/master-keying/minisat diff --git a/ports/minisat-master-keying/portfile.cmake b/ports/minisat-master-keying/portfile.cmake index 0578623c183a15..34bd4ca955f285 100644 --- a/ports/minisat-master-keying/portfile.cmake +++ b/ports/minisat-master-keying/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/minisat-master-keying/vcpkg.json b/ports/minisat-master-keying/vcpkg.json new file mode 100644 index 00000000000000..9df7d9d6e0c4f4 --- /dev/null +++ b/ports/minisat-master-keying/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "minisat-master-keying", + "version-string": "2.2-mod", + "port-version": 3, + "description": [ + "A minimalistic high-performance SAT solver", + "This is a modernized, cross-platform, CMake-enabled fork of the original MiniSat." + ], + "homepage": "https://github.com/master-keying/minisat" +} diff --git a/ports/minitrace/CONTROL b/ports/minitrace/CONTROL deleted file mode 100644 index 83763faba2e0df..00000000000000 --- a/ports/minitrace/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: minitrace -Version: 2019.02.06 -Description: Simple C/C++ library for producing JSON traces suitable for Chrome's built-in trace viewer. diff --git a/ports/minitrace/portfile.cmake b/ports/minitrace/portfile.cmake index 9410ed84f343bf..444ae318895a6e 100644 --- a/ports/minitrace/portfile.cmake +++ b/ports/minitrace/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -24,5 +22,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/minitrace RENAME copyright) - -vcpkg_test_cmake(PACKAGE_NAME minitrace) diff --git a/ports/minitrace/vcpkg.json b/ports/minitrace/vcpkg.json new file mode 100644 index 00000000000000..47484d35d23d86 --- /dev/null +++ b/ports/minitrace/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "minitrace", + "version-string": "2019.02.06", + "port-version": 1, + "description": "Simple C/C++ library for producing JSON traces suitable for Chrome's built-in trace viewer." +} diff --git a/ports/miniupnpc/CONTROL b/ports/miniupnpc/CONTROL deleted file mode 100644 index 8238e64f7edcec..00000000000000 --- a/ports/miniupnpc/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: miniupnpc -Version: 2.1 -Description: UPnP client library/tool to access Internet Gateway Devices diff --git a/ports/miniupnpc/portfile.cmake b/ports/miniupnpc/portfile.cmake index 2c9aa9ec6dc277..b8c3ab7b90840e 100644 --- a/ports/miniupnpc/portfile.cmake +++ b/ports/miniupnpc/portfile.cmake @@ -1,16 +1,13 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO miniupnp/miniupnp REF miniupnpc_2_1 SHA512 f2ab5116c094982f7838ccab460d3db07a99de1094448277fc45841e0e64ea1b4216d75a7e5dd471c79ff9b0132b89e4d801c3ad1b60d55631c12c916df658f5 HEAD_REF master + PATCHES + cmakelists.diff ) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmakelists.diff) - string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" MINIUPNPC_BUILD_SHARED) string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" MINIUPNPC_BUILD_STATIC) @@ -28,4 +25,3 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/miniupnpc RENAME copyright) - diff --git a/ports/miniupnpc/vcpkg.json b/ports/miniupnpc/vcpkg.json new file mode 100644 index 00000000000000..8621794bd598fb --- /dev/null +++ b/ports/miniupnpc/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "miniupnpc", + "version-string": "2.1", + "port-version": 2, + "description": "UPnP client library/tool to access Internet Gateway Devices" +} diff --git a/ports/miniz/CONTROL b/ports/miniz/CONTROL deleted file mode 100644 index 88eacdb8559ca1..00000000000000 --- a/ports/miniz/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: miniz -Version: 2.1.0 -Description: Single C source file zlib-replacement library diff --git a/ports/miniz/portfile.cmake b/ports/miniz/portfile.cmake index 4de2dc3f3e7be6..b932b69f24541b 100644 --- a/ports/miniz/portfile.cmake +++ b/ports/miniz/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO richgel999/miniz @@ -18,8 +16,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/miniz RENAME copyright) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}) -vcpkg_test_cmake(PACKAGE_NAME miniz) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/miniz/vcpkg.json b/ports/miniz/vcpkg.json new file mode 100644 index 00000000000000..5719d162170c29 --- /dev/null +++ b/ports/miniz/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "miniz", + "version-string": "2.1.0", + "port-version": 2, + "description": "Single C source file zlib-replacement library", + "homepage": "https://github.com/richgel999/miniz" +} diff --git a/ports/minizip-ng/Modify-header-file-path.patch b/ports/minizip-ng/Modify-header-file-path.patch new file mode 100644 index 00000000000000..ac1c6fee8b1cad --- /dev/null +++ b/ports/minizip-ng/Modify-header-file-path.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9ef8023..ec1ee55 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -81,7 +81,7 @@ include(FeatureSummary) + + set(INSTALL_BIN_DIR ${CMAKE_INSTALL_BINDIR} CACHE PATH "Installation directory for executables") + set(INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries") +-set(INSTALL_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "Installation directory for headers") ++set(INSTALL_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/minizip-ng CACHE PATH "Installation directory for headers") + set(INSTALL_MAN_DIR ${CMAKE_INSTALL_MANDIR} CACHE PATH "Installation directory for manual pages") + + set(STDLIB_DEF) diff --git a/ports/minizip-ng/portfile.cmake b/ports/minizip-ng/portfile.cmake new file mode 100644 index 00000000000000..69ccb97af3a68b --- /dev/null +++ b/ports/minizip-ng/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zlib-ng/minizip-ng + REF 3.0.2 + SHA512 eee4d35d273ab0a32972b119c8faabd8c242e2d9f506fab0dd21fdd24c78b932c01bf7f15e9cf7c452776fc4c2e27a5ff09e376adb7a706336d11114929182fc + HEAD_REF master + PATCHES + Modify-header-file-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DMZ_PROJECT_SUFFIX:STRING=-ng +) + +vcpkg_cmake_install() + +vcpkg_fixup_pkgconfig() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/minizip-ng/copyright" COPYONLY) diff --git a/ports/minizip-ng/vcpkg.json b/ports/minizip-ng/vcpkg.json new file mode 100644 index 00000000000000..33f77dd29a98cc --- /dev/null +++ b/ports/minizip-ng/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "minizip-ng", + "version": "3.0.2", + "description": "minizip-ng is a zip manipulation library written in C that is supported on Windows, macOS, and Linux.", + "homepage": "https://github.com/zlib-ng/minizip-ng", + "supports": "!uwp", + "dependencies": [ + "bzip2", + "liblzma", + { + "name": "openssl", + "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib", + "zstd" + ] +} diff --git a/ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch b/ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch new file mode 100644 index 00000000000000..d9c051d285bf4f --- /dev/null +++ b/ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch @@ -0,0 +1,29 @@ +From a6fd3992d44053a523a67aa16f5ae88fecfb20e1 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 14:09:53 -0700 +Subject: [PATCH 1/2] remove `#ifndef NOUNCRYPT` + +enable decrypt support for password-encrypted ZIP files + +--- + contrib/minizip/unzip.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c +index bcfb941..1895a0f 100644 +--- a/contrib/minizip/unzip.c ++++ b/contrib/minizip/unzip.c +@@ -68,10 +68,6 @@ + #include + #include + +-#ifndef NOUNCRYPT +- #define NOUNCRYPT +-#endif +- + #include "zlib.h" + #include "unzip.h" + +-- +2.24.3 (Apple Git-128) + diff --git a/ports/minizip/0002-add-declaration-for-mkdir.patch b/ports/minizip/0002-add-declaration-for-mkdir.patch new file mode 100644 index 00000000000000..8786a840ba85ba --- /dev/null +++ b/ports/minizip/0002-add-declaration-for-mkdir.patch @@ -0,0 +1,29 @@ +From 6c38b6f544b55f9fc554f0fe22e2cbaddfaed7f8 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 14:15:04 -0700 +Subject: [PATCH 2/2] add declaration for mkdir + +It's invalid in C99 to implicitly declare mkdir + +--- + contrib/minizip/miniunz.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c +index 3d65401..5341af2 100644 +--- a/contrib/minizip/miniunz.c ++++ b/contrib/minizip/miniunz.c +@@ -12,6 +12,10 @@ + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + */ + ++#if !defined(_WIN32) ++#include ++#endif ++ + #if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 +-- +2.24.3 (Apple Git-128) + diff --git a/ports/minizip/0003-no-io64.patch b/ports/minizip/0003-no-io64.patch new file mode 100644 index 00000000000000..6e72e3c91412d2 --- /dev/null +++ b/ports/minizip/0003-no-io64.patch @@ -0,0 +1,49 @@ +diff --git a/contrib/minizip/ioapi.c b/contrib/minizip/ioapi.c +index 7f5c191..d42e050 100644 +--- a/contrib/minizip/ioapi.c ++++ b/contrib/minizip/ioapi.c +@@ -17,8 +17,8 @@ + #if defined(__APPLE__) || defined(IOAPI_NO_64) + // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions + #define FOPEN_FUNC(filename, mode) fopen(filename, mode) +-#define FTELLO_FUNC(stream) ftello(stream) +-#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) ++#define FTELLO_FUNC(stream) ftell(stream) ++#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin) + #else + #define FOPEN_FUNC(filename, mode) fopen64(filename, mode) + #define FTELLO_FUNC(stream) ftello64(stream) +diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c +index 3d65401..a1269ea 100644 +--- a/contrib/minizip/miniunz.c ++++ b/contrib/minizip/miniunz.c +@@ -33,9 +33,9 @@ + #define FTELLO_FUNC(stream) ftello(stream) + #define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) + #else +-#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) +-#define FTELLO_FUNC(stream) ftello64(stream) +-#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) ++#define FOPEN_FUNC(filename, mode) fopen(filename, mode) ++#define FTELLO_FUNC(stream) ftell(stream) ++#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin) + #endif + + +diff --git a/contrib/minizip/minizip.c b/contrib/minizip/minizip.c +index 4288962..02267fb 100644 +--- a/contrib/minizip/minizip.c ++++ b/contrib/minizip/minizip.c +@@ -34,9 +34,9 @@ + #define FTELLO_FUNC(stream) ftello(stream) + #define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) + #else +-#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) +-#define FTELLO_FUNC(stream) ftello64(stream) +-#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) ++#define FOPEN_FUNC(filename, mode) fopen(filename, mode) ++#define FTELLO_FUNC(stream) ftell(stream) ++#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin) + #endif + + diff --git a/ports/minizip/CMakeLists.txt b/ports/minizip/CMakeLists.txt index b5c5d5dbc98d8f..c17ab8974230b6 100644 --- a/ports/minizip/CMakeLists.txt +++ b/ports/minizip/CMakeLists.txt @@ -1,6 +1,11 @@ cmake_minimum_required(VERSION 3.8) project(minizip C) +set(PROJECT_VERSION 1.2.11) +set(PROJECT_VERSION_MAJOR 1) +set(PROJECT_VERSION_MINOR 2) +set(PROJECT_VERSION_PATCH 11) + if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) endif() @@ -25,7 +30,6 @@ set(SRC ${MIN_SRC}/ioapi.c ${MIN_SRC}/unzip.c ${MIN_SRC}/zip.c - ${MIN_SRC}/unzip.c ${MIN_SRC}/mztools.c ) if(WIN32) @@ -37,7 +41,6 @@ set(HEADERS ${MIN_SRC}/ioapi.h ${MIN_SRC}/unzip.h ${MIN_SRC}/zip.h - ${MIN_SRC}/unzip.h ${MIN_SRC}/mztools.h ) if(WIN32) @@ -50,27 +53,50 @@ target_link_libraries(minizip PRIVATE ZLIB::ZLIB) target_compile_definitions(minizip PRIVATE -D_ZLIB_H) if(ENABLE_BZIP2) - target_link_libraries(minizip PRIVATE ${BZIP2_LIBRARIES}) + target_link_libraries(minizip PUBLIC ${BZIP2_LIBRARIES}) target_compile_definitions(minizip PRIVATE -DHAVE_BZIP2=1) endif() +if(ANDROID) + target_compile_definitions(minizip PRIVATE IOAPI_NO_64) +endif() +if(NOT DISABLE_INSTALL_TOOLS) + add_executable(minizip_bin ${MIN_SRC}/minizip.c) + add_executable(miniunz_bin ${MIN_SRC}/miniunz.c) -add_executable(minizip_bin ${MIN_SRC}/minizip.c) -add_executable(miniunz_bin ${MIN_SRC}/miniunz.c) - -target_link_libraries(minizip_bin minizip ${MINIZIP_LIBRARIES}) -target_link_libraries(miniunz_bin minizip ${MINIZIP_LIBRARIES}) - -set_target_properties(minizip_bin PROPERTIES OUTPUT_NAME minizip) -set_target_properties(miniunz_bin PROPERTIES OUTPUT_NAME miniunz) + target_link_libraries(minizip_bin minizip ${MINIZIP_LIBRARIES}) + target_link_libraries(miniunz_bin minizip ${MINIZIP_LIBRARIES}) + set_target_properties(minizip_bin PROPERTIES OUTPUT_NAME minizip) + set_target_properties(miniunz_bin PROPERTIES OUTPUT_NAME miniunz) +endif() install( TARGETS minizip + EXPORT minizipTargets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) +include(CMakePackageConfigHelpers) +write_basic_package_version_file("${PROJECT_BINARY_DIR}/minizipConfigVersion.cmake" + COMPATIBILITY SameMajorVersion) + +configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/minizipConfig.cmake.in + minizipConfig.cmake + INSTALL_DESTINATION share/minizip) + +install(FILES + "${PROJECT_BINARY_DIR}/minizipConfig.cmake" + "${PROJECT_BINARY_DIR}/minizipConfigVersion.cmake" + DESTINATION share/minizip +) + +install(EXPORT minizipTargets + NAMESPACE minizip:: + DESTINATION share/minizip +) + if(NOT DISABLE_INSTALL_TOOLS) install ( TARGETS minizip_bin miniunz_bin diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL deleted file mode 100644 index 9570e945e57d9d..00000000000000 --- a/ports/minizip/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: minizip -Version: 1.2.11-5 -Build-Depends: zlib -Homepage: https://github.com/madler/zlib -Description: Zip compression library - -Feature: bzip2 -Build-Depends: bzip2 -Description: Support compression using bzip2 library diff --git a/ports/minizip/minizip.patch b/ports/minizip/minizip.patch deleted file mode 100644 index 04ef8fa2fcc6eb..00000000000000 --- a/ports/minizip/minizip.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c -index f12e3329..bfc05f77 100644 ---- a/contrib/minizip/unzip.c -+++ b/contrib/minizip/unzip.c -@@ -68,10 +68,6 @@ - #include - #include - --#ifndef NOUNCRYPT -- #define NOUNCRYPT --#endif -- - #include "zlib.h" - #include "unzip.h" - - diff --git a/ports/minizip/minizipConfig.cmake.in b/ports/minizip/minizipConfig.cmake.in new file mode 100644 index 00000000000000..17fc694e774080 --- /dev/null +++ b/ports/minizip/minizipConfig.cmake.in @@ -0,0 +1,12 @@ +#@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +find_dependency(ZLIB) + +if (@ENABLE_BZIP2@) + find_dependency(BZip2) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") \ No newline at end of file diff --git a/ports/minizip/portfile.cmake b/ports/minizip/portfile.cmake index 86cfe9b9df720b..20cc0184e76cc8 100644 --- a/ports/minizip/portfile.cmake +++ b/ports/minizip/portfile.cmake @@ -1,48 +1,47 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "WindowsStore not supported") -endif() - +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO madler/zlib - REF v1.2.11 - SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf - HEAD_REF master - PATCHES minizip.patch # enable decrypt support for password-encrypted ZIP files + OUT_SOURCE_PATH SOURCE_PATH + REPO madler/zlib + REF v1.2.11 + SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf + HEAD_REF master + PATCHES + 0001-remove-ifndef-NOUNCRYPT.patch + 0002-add-declaration-for-mkdir.patch + 0003-no-io64.patch ) -set(BUILD_minizip_bzip2 OFF) -if ("bzip2" IN_LIST FEATURES) - set(BUILD_minizip_bzip2 ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + bzip2 ENABLE_BZIP2 +) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +configure_file(${CMAKE_CURRENT_LIST_DIR}/minizipConfig.cmake.in ${SOURCE_PATH}/cmake/minizipConfig.cmake.in COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DENABLE_BZIP2=${BUILD_minizip_bzip2} - OPTIONS_DEBUG - -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DDISABLE_INSTALL_TOOLS=${VCPKG_TARGET_IS_IOS} + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() - +vcpkg_fixup_cmake_targets() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/minizip) if ("bzip2" IN_LIST FEATURES) - file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h") - foreach(HEADER ${HEADERS}) - file(READ "${HEADER}" _contents) - string(REPLACE "#ifdef HAVE_BZIP2" "#if 1" _contents "${_contents}") - file(WRITE "${HEADER}" "${_contents}") - endforeach() + file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h") + foreach(HEADER ${HEADERS}) + file(READ "${HEADER}" _contents) + string(REPLACE "#ifdef HAVE_BZIP2" "#if 1" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") + endforeach() endif() -file(INSTALL ${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/minizip RENAME copyright) +file(INSTALL ${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/minizip/vcpkg.json b/ports/minizip/vcpkg.json new file mode 100644 index 00000000000000..9e8c24b8135fb1 --- /dev/null +++ b/ports/minizip/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "minizip", + "version-semver": "1.2.11", + "port-version": 9, + "description": "Zip compression library", + "homepage": "https://github.com/madler/zlib", + "supports": "!uwp", + "dependencies": [ + "zlib" + ], + "features": { + "bzip2": { + "description": "Support compression using bzip2 library", + "dependencies": [ + "bzip2" + ] + } + } +} diff --git a/ports/mio/CONTROL b/ports/mio/CONTROL deleted file mode 100644 index 895c4c3a79635e..00000000000000 --- a/ports/mio/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: mio -Version: 2019-02-10 -Description: Cross-platform header-only C++11 library for memory mapped file IO. diff --git a/ports/mio/portfile.cmake b/ports/mio/portfile.cmake index 9c7e25939451b7..4ec8b8963ab28a 100644 --- a/ports/mio/portfile.cmake +++ b/ports/mio/portfile.cmake @@ -1,6 +1,4 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mandreyel/mio diff --git a/ports/mio/vcpkg.json b/ports/mio/vcpkg.json new file mode 100644 index 00000000000000..6cf4b544594b7d --- /dev/null +++ b/ports/mio/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "mio", + "version-string": "2019-02-10", + "port-version": 1, + "description": "Cross-platform header-only C++11 library for memory mapped file IO." +} diff --git a/ports/mlpack/CONTROL b/ports/mlpack/CONTROL deleted file mode 100644 index e76327ca520010..00000000000000 --- a/ports/mlpack/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: mlpack -Version: 3.1.1-1 -Description: mlpack is a fast, flexible machine learning library, written in C++, that aims to provide fast, extensible implementations of cutting-edge machine learning algorithms. -Build-Depends: openblas (!osx), clapack (!osx), boost, armadillo, ensmallen - -Feature: tools -Description: Build command-line executables and tests. diff --git a/ports/mlpack/blas_lapack.patch b/ports/mlpack/blas_lapack.patch deleted file mode 100644 index 2b9e4459766a2f..00000000000000 --- a/ports/mlpack/blas_lapack.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b158498..50f1def 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -286,7 +286,7 @@ if (WIN32) - find_package(LAPACK) - find_package(BLAS) - set(ARMADILLO_LIBRARIES -- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY}) -+ ${ARMADILLO_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - endif () - - # Include directories for the previous dependencies. diff --git a/ports/mlpack/cmakelists.patch b/ports/mlpack/cmakelists.patch index 05810f57f88ba4..278d80f96e607e 100644 --- a/ports/mlpack/cmakelists.patch +++ b/ports/mlpack/cmakelists.patch @@ -1,48 +1,42 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6fe6d81..b59555c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -283,25 +283,8 @@ - # and find LAPACK and BLAS ourselves, using a slightly modified variant of the - # script Armadillo uses to find these. - if (WIN32) -- find_library(LAPACK_LIBRARY -- NAMES lapack liblapack lapack_win32_MT lapack_win32 -- PATHS "C:/Program Files/Armadillo" -- PATH_SUFFIXES "examples/lib_win32/") -- -- if (NOT LAPACK_LIBRARY) -- message(FATAL_ERROR "Cannot find LAPACK library (.lib)!") -- endif () -- -- find_library(BLAS_LIBRARY -- NAMES blas libblas blas_win32_MT blas_win32 -- PATHS "C:/Program Files/Armadillo" -- PATH_SUFFIXES "examples/lib_win32/") -- -- if (NOT BLAS_LIBRARY) -- message(FATAL_ERROR "Cannot find BLAS library (.lib)!") -- endif () -- -- # Piggyback LAPACK and BLAS linking into Armadillo link. -+ find_package(LAPACK) -+ find_package(BLAS) - set(ARMADILLO_LIBRARIES - ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY}) - endif () -@@ -395,19 +378,11 @@ +@@ -291,7 +291,7 @@ endif() + # ENSMALLEN_INCLUDE_DIR - include directory for ensmallen + # STB_IMAGE_INCLUDE_DIR - include directory for STB image library + # MATHJAX_ROOT - root of MathJax installation +-find_package(Armadillo "${ARMADILLO_VERSION}" REQUIRED) ++find_package(Armadillo CONFIG "${ARMADILLO_VERSION}" REQUIRED) + + # Include directories for the previous dependencies. + set(MLPACK_INCLUDE_DIRS ${MLPACK_INCLUDE_DIRS} ${ARMADILLO_INCLUDE_DIRS}) +@@ -388,8 +388,8 @@ if (NOT ENSMALLEN_FOUND) + "Successfully downloaded ensmallen into ${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/") + + # Now we have to also ensure these header files get installed. +- install(DIRECTORY "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen_bits/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ensmallen_bits") +- install(FILES "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++ #install(DIRECTORY "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen_bits/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ensmallen_bits") ++ #install(FILES "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + else () + message(FATAL_ERROR "Problem unpacking ensmallen! Expected only one directory ensmallen-x.y.z/; found ${ENS_DIRECTORIES}. Try removing the directory ${CMAKE_BINARY_DIR}/deps and reconfiguring.") + endif () +@@ -446,6 +446,7 @@ find_package(Boost "${BOOST_VERSION}" REQUIRED ) --link_directories(${Boost_LIBRARY_DIRS}) -- --# In Visual Studio, automatic linking is performed, so we don't need to worry --# about it. Clear the list of libraries to link against and let Visual Studio --# handle it. --if (MSVC) -- link_directories(${Boost_LIBRARY_DIRS}) -- set(Boost_LIBRARIES "") --endif () -+link_directories(${Boost_LIBRARIES}) ++if(0) + link_directories(${Boost_LIBRARY_DIRS}) + # In Visual Studio, automatic linking is performed, so we don't need to worry +@@ -457,10 +458,12 @@ if (MSVC) + message("boost lib dirs ${Boost_LIBRARY_DIRS}") + set(Boost_LIBRARIES "") + endif () ++endif() + ++link_directories(${Boost_LIBRARIES}) set(MLPACK_INCLUDE_DIRS ${MLPACK_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} ${Boost_LIBRARIES}) -set(MLPACK_LIBRARY_DIRS ${MLPACK_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS}) diff --git a/ports/mlpack/fix-configure-error.patch b/ports/mlpack/fix-configure-error.patch new file mode 100644 index 00000000000000..03a27077ae4b39 --- /dev/null +++ b/ports/mlpack/fix-configure-error.patch @@ -0,0 +1,15 @@ +diff --git a/CMake/go/AppendModel.cmake b/CMake/go/AppendModel.cmake +index eeb28f7..ec50f15 100644 +--- a/CMake/go/AppendModel.cmake ++++ b/CMake/go/AppendModel.cmake +@@ -44,8 +44,8 @@ function(append_model SERIALIZATION_FILE PROGRAM_MAIN_FILE) + else () + string(APPEND GOMODEL_SAFE_TYPE ${MODEL_CHAR}) + endif() +- endif() +- endforeach() ++ endforeach() ++ endif() + + # See if the model type already exists. + file(READ "${SERIALIZATION_FILE}" SERIALIZATION_FILE_CONTENTS) diff --git a/ports/mlpack/fix-dependencies.patch b/ports/mlpack/fix-dependencies.patch new file mode 100644 index 00000000000000..2de2682ac416c4 --- /dev/null +++ b/ports/mlpack/fix-dependencies.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4dd92f0..bfa697d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -488,7 +488,7 @@ add_definitions(-DBOOST_TEST_DYN_LINK) + # } + # #endif + if (USE_OPENMP) +- find_package(OpenMP) ++ find_package(OpenMP REQUIRED) + endif () + + if (OPENMP_FOUND) diff --git a/ports/mlpack/fix-test-dependency.patch b/ports/mlpack/fix-test-dependency.patch new file mode 100644 index 00000000000000..1dbb5088d6e3ac --- /dev/null +++ b/ports/mlpack/fix-test-dependency.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b59555c..4dd92f0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -441,11 +441,18 @@ set(Boost_ADDITIONAL_VERSIONS + set(Boost_NO_BOOST_CMAKE 1) + find_package(Boost "${BOOST_VERSION}" + COMPONENTS +- unit_test_framework + serialization + REQUIRED + ) + ++if (BUILD_TESTS) ++ find_package(Boost "${BOOST_VERSION}" ++ COMPONENTS ++ unit_test_framework ++ REQUIRED ++ ) ++endif() ++ + if(0) + link_directories(${Boost_LIBRARY_DIRS}) + diff --git a/ports/mlpack/portfile.cmake b/ports/mlpack/portfile.cmake index 6bde064f4789d1..058bcf9f8740a0 100644 --- a/ports/mlpack/portfile.cmake +++ b/ports/mlpack/portfile.cmake @@ -1,14 +1,14 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mlpack/mlpack - REF mlpack-3.1.1 - SHA512 4acef74da951934b9bd1cabd87b9d6d002c80eb3218f69755277fa654d928aed379a5e63987f32ec162cc005c2952e618d6d528c2311aebb8cd2cc01cab71f86 + REF 7ae9ddda86c1751b6509ceb48b27d182feaae439 # 3.4.1 + SHA512 db68c16b80af7037ac562f93775b6262f1552fbc89daa0c621075e2ff70a8306523da8eb74e33ac15ba34c9ccef8f2746bd1e4efa7c280a5be77b53c69d3f9a1 HEAD_REF master PATCHES cmakelists.patch - blas_lapack.patch + fix-configure-error.patch + fix-test-dependency.patch + fix-dependencies.patch ) file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake) @@ -22,30 +22,83 @@ file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindMKL.cmake) file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindOpenBLAS.cmake) file(REMOVE ${SOURCE_PATH}/CMake/FindArmadillo.cmake) -set(BUILD_TOOLS OFF) -if("tools" IN_LIST FEATURES) - set(BUILD_TOOLS ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools BUILD_CLI_EXECUTABLES + openmp USE_OPENMP +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_TESTS=${BUILD_TOOLS} - -DBUILD_CLI_EXECUTABLES=${BUILD_TOOLS} + -DBUILD_TESTS=OFF + -DDOWNLOAD_STB_IMAGE=OFF + -DDOWNLOAD_ENSMALLEN=OFF + -DBUILD_PYTHON_BINDINGS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() -vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/mlpack RENAME copyright) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mlpack) -if(BUILD_TOOLS) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) - file(GLOB MLPACK_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) - file(COPY ${MLPACK_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - file(REMOVE ${MLPACK_TOOLS}) - file(GLOB MLPACK_TOOLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) - file(REMOVE ${MLPACK_TOOLS_DEBUG}) +vcpkg_copy_pdbs() + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + mlpack_adaboost + mlpack_approx_kfn + mlpack_cf + mlpack_dbscan + mlpack_decision_stump + mlpack_decision_tree + mlpack_det + mlpack_emst + mlpack_fastmks + mlpack_gmm_generate + mlpack_gmm_probability + mlpack_gmm_train + mlpack_hmm_generate + mlpack_hmm_loglik + mlpack_hmm_train + mlpack_hmm_viterbi + mlpack_hoeffding_tree + mlpack_kde + mlpack_kernel_pca + mlpack_kfn + mlpack_kmeans + mlpack_knn + mlpack_krann + mlpack_lars + mlpack_linear_regression + mlpack_linear_svm + mlpack_lmnn + mlpack_local_coordinate_coding + mlpack_logistic_regression + mlpack_lsh + mlpack_mean_shift + mlpack_nbc + mlpack_nca + mlpack_nmf + mlpack_pca + mlpack_perceptron + mlpack_preprocess_binarize + mlpack_preprocess_describe + mlpack_preprocess_imputer + mlpack_preprocess_scale + mlpack_preprocess_split + mlpack_radical + mlpack_random_forest + mlpack_range_search + mlpack_softmax_regression + mlpack_sparse_coding + mlpack_image_converter + mlpack_bayesian_linear_regression + mlpack_preprocess_one_hot_encoding + ) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mlpack/vcpkg.json b/ports/mlpack/vcpkg.json new file mode 100644 index 00000000000000..2998ba1f5ce855 --- /dev/null +++ b/ports/mlpack/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "mlpack", + "version": "3.4.1", + "port-version": 2, + "description": "mlpack is a fast, flexible machine learning library, written in C++, that aims to provide fast, extensible implementations of cutting-edge machine learning algorithms.", + "homepage": "https://github.com/mlpack/mlpack", + "supports": "uwp", + "dependencies": [ + "armadillo", + "boost-heap", + "boost-math", + "boost-program-options", + "boost-random", + "boost-serialization", + "boost-serialization", + "ensmallen", + "stb" + ], + "features": { + "openmp": { + "description": "use OpenMP for parallelization." + }, + "tools": { + "description": "Build command-line executables." + } + } +} diff --git a/ports/mman/CONTROL b/ports/mman/CONTROL deleted file mode 100644 index 6ef51acb91d294..00000000000000 --- a/ports/mman/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mman -Version: git-f5ff813-2 -Homepage: https://github.com/witwall/mman-win32 -Description: A light implementation of the mmap functions for MinGW. diff --git a/ports/mman/portfile.cmake b/ports/mman/portfile.cmake index f4eb270c832d3a..7482a7f74a69b2 100644 --- a/ports/mman/portfile.cmake +++ b/ports/mman/portfile.cmake @@ -1,17 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO witwall/mman-win32 REF f5ff813c53935c3078f48e1f03a6944c4e7b459c SHA512 49c9a63a0a3c6fa585a76e65425f6fb1fdaa23cc87e53d5afb7a1298bcd4956298c076ee78f24dd5df5f5a0c5f6244c6abb63b40818e4d2546185fa37a73bf0d HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/mman-static.patch + mman-static.patch ) vcpkg_configure_cmake( diff --git a/ports/mman/vcpkg.json b/ports/mman/vcpkg.json new file mode 100644 index 00000000000000..37516b67990c0a --- /dev/null +++ b/ports/mman/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mman", + "version-string": "git-f5ff813", + "port-version": 4, + "description": "A light implementation of the mmap functions for MinGW.", + "homepage": "https://github.com/witwall/mman-win32" +} diff --git a/ports/mmloader/fix_c_and_cxx_flags.patch b/ports/mmloader/fix_c_and_cxx_flags.patch new file mode 100644 index 00000000000000..501ce40cd7f880 --- /dev/null +++ b/ports/mmloader/fix_c_and_cxx_flags.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7a22b56..2ce1bd8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,24 +47,11 @@ set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CONFIGURATION_TYPES Debug Release) + + # Default compile flags +-set(CMAKE_CXX_FLAGS +- "/DWIN32 /D_WINDOWS /W3 /WX /GR /GS- /Gy /FAcs /Z7 /DEBUG" ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS-" + CACHE STRING "default C++ compile flags" FORCE) +-set(CMAKE_CXX_FLAGS_DEBUG +- "/MTd /Ob0 /Od" +- CACHE STRING "default C++ compile flags for debug build" FORCE) +-set(CMAKE_CXX_FLAGS_RELEASE +- "/MT /O2 /Ob2 /DNDEBUG" +- CACHE STRING "default C++ compile flags for release build" FORCE) +-set(CMAKE_C_FLAGS +- "/DWIN32 /D_WINDOWS /W3 /WX /GR /GS- /Gy /FAcs /Z7 /DEBUG" ++set(CMAKE_C_FLAGS ++ "${CMAKE_C_FLAGS} /GS-" + CACHE STRING "default C++ compile flags" FORCE) +-set(CMAKE_C_FLAGS_DEBUG +- "/MTd /Ob0 /Od" +- CACHE STRING "default C++ compile flags for debug build" FORCE) +-set(CMAKE_C_FLAGS_RELEASE +- "/MT /O2 /Ob2 /DNDEBUG" +- CACHE STRING "default C++ compile flags for release build" FORCE) + + message(STATUS "CMAKE_CXX_FLAGS=" ${CMAKE_CXX_FLAGS}) + message(STATUS "CMAKE_CXX_FLAGS_DEBUG=" ${CMAKE_CXX_FLAGS_DEBUG}) diff --git a/ports/mmloader/portfile.cmake b/ports/mmloader/portfile.cmake new file mode 100644 index 00000000000000..c1f1684468af6a --- /dev/null +++ b/ports/mmloader/portfile.cmake @@ -0,0 +1,43 @@ +# fail early for unsupported triplets +vcpkg_fail_port_install( + MESSAGE "mmLoader supports only x86/x64-windows-static triplets" + ON_TARGET "UWP" "LINUX" "OSX" "ANDROID" "FREEBSD" + ON_ARCH "arm" "arm64" + ON_CRT_LINKAGE "dynamic" + ON_LIBRARY_LINKAGE "dynamic" +) + +# source +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tishion/mmLoader + REF 1.0.0 + SHA512 ceb2ab4b60d74209fa46d198cde6fd87a97d911abb875ac35383288a67828d0420bb38ff8d2f17dd4a3f46ba3abf554152d1246eeb05215258e8af64ac4a39de + HEAD_REF master + PATCHES + fix_c_and_cxx_flags.patch +) + +# feature +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + shellcode BUILD_SHELLCODE_GEN +) + +# config +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} +) + +# pre-clean +file(REMOVE_RECURSE "${SOURCE_PATH}/output") + +# build and install +vcpkg_install_cmake(DISABLE_PARALLEL) + +# remove the debug/include directory +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# collect license files +file(INSTALL "${SOURCE_PATH}/License" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/mmloader/vcpkg.json b/ports/mmloader/vcpkg.json new file mode 100644 index 00000000000000..a48ecb38b209a5 --- /dev/null +++ b/ports/mmloader/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "mmloader", + "version-string": "2020-05-15", + "port-version": 1, + "description": "A library for loading dll module bypassing windows PE loader from memory (x86/x64)", + "homepage": "http://tishion.github.io/mmLoader/", + "supports": "(x86 | x64) & windows & static", + "features": { + "shellcode": { + "description": "Generate mmLoader shell code headers" + } + } +} diff --git a/ports/mmx/copyright b/ports/mmx/copyright new file mode 100644 index 00000000000000..f02e1bae7578d6 --- /dev/null +++ b/ports/mmx/copyright @@ -0,0 +1,52 @@ +Licenses are stated in each header file + +json.h - public domain - Micha Mettke + +lexer.h - zlib LICENSE +LICENSE: (zlib) +Copyright (c) 2016 Micha Mettke + +sched.h - zlib LICENSE +LICENSE: (zlib) +Copyright (c) 2016 Doug Binks + +vec.h - zlib LICENSE +LICENSE: (zlib) +Copyright (c) 2015 Micha Mettke + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +web.h - BSD LICENSE - Andreas Fredriksson +LICENSE: (BSD) +Copyright (c) 2016, Andreas Fredriksson, Micha Mettke +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/ports/mmx/portfile.cmake b/ports/mmx/portfile.cmake new file mode 100644 index 00000000000000..78f7d9efb1ec89 --- /dev/null +++ b/ports/mmx/portfile.cmake @@ -0,0 +1,12 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vurtun/mmx + REF b99867658dadcaed2fbfb95ad0e0c461a7a80a0c + SHA512 3ad01562f439fac364c45d9e4091d136c7cec36adeab219773c2df0d32b09f4e258bdb11884cbeed7dc2835381d2b409c55fe80e0913e995e54a1b7ebbe0f2bc + HEAD_REF master +) + +file(GLOB_RECURSE MMX_HEADERS "${SOURCE_PATH}/*.h") +file(INSTALL ${MMX_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/mmx/vcpkg.json b/ports/mmx/vcpkg.json new file mode 100644 index 00000000000000..9a7fe081d123ec --- /dev/null +++ b/ports/mmx/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mmx", + "version-string": "2019-09-29", + "port-version": 1, + "description": "Single header libraries for C/C++", + "homepage": "https://github.com/vurtun/mmx" +} diff --git a/ports/mnn/portfile.cmake b/ports/mnn/portfile.cmake new file mode 100644 index 00000000000000..8147fddb1dba20 --- /dev/null +++ b/ports/mnn/portfile.cmake @@ -0,0 +1,127 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "ios" "android") +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alibaba/MNN + REF 1.1.0 + SHA512 3e31eec9a876be571cb2d29e0a2bcdb8209a43a43a5eeae19b295fadfb1252dd5bd4ed5b7c584706171e1b531710248193bc04520a796963e2b21546acbedae0 + HEAD_REF master + PATCHES + use-package-and-install.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test MNN_BUILD_TEST + test MNN_BUILD_BENCHMARK + cuda MNN_CUDA + cuda MNN_GPU_TRACE + vulkan MNN_VULKAN + vulkan MNN_GPU_TRACE + vulkan MNN_USE_SYSTEM_LIB + opencl MNN_OPENCL + opencl MNN_USE_SYSTEM_LIB + metal MNN_METAL + metal MNN_GPU_TRACE + tools MNN_BUILD_TOOLS + tools MNN_BUILD_QUANTOOLS + tools MNN_BUILD_TRAIN + tools MNN_EVALUATION + tools MNN_BUILD_CONVERTER +) + +# 'cuda' feature in Windows failes with Ninja because of parallel PDB access. Make it optional +set(NINJA_OPTION PREFER_NINJA) +if("cuda" IN_LIST FEATURES) + unset(NINJA_OPTION) +endif() + +set(FLATC_EXEC ${CURRENT_HOST_INSTALLED_DIR}/tools/flatbuffers/flatc${VCPKG_HOST_EXECUTABLE_SUFFIX}) +if (NOT EXISTS "${FLATC_EXEC}") + message(FATAL_ERROR "Expected ${FLATC_EXEC} to exist.") +endif() + +# regenerate some code files by schemes and flatbuffers +vcpkg_execute_build_process( + COMMAND "${FLATC_EXEC}" "-c" "-b" "--gen-object-api" "--reflect-names" + "../default/BasicOptimizer.fbs" + "../default/CaffeOp.fbs" + "../default/GpuLibrary.fbs" + "../default/MNN.fbs" + "../default/Tensor.fbs" + "../default/TensorflowOp.fbs" + "../default/TFQuantizeOp.fbs" + "../default/Type.fbs" + "../default/UserDefine.fbs" + WORKING_DIRECTORY "${SOURCE_PATH}/schema/current/" + LOGNAME flatc-${TARGET_TRIPLET} + ) + +if(VCPKG_TARGET_IS_WINDOWS) + string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_RUNTIME_MT) + list(APPEND PLATFORM_OPTIONS -DMNN_WIN_RUNTIME_MT=${USE_RUNTIME_MT}) +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + ${NINJA_OPTION} + OPTIONS + ${FEATURE_OPTIONS} ${PLATFORM_OPTIONS} + -DMNN_BUILD_SHARED_LIBS=${BUILD_SHARED} + # 1.1.0.0-${commit} + -DMNN_VERSION_MAJOR=1 -DMNN_VERSION_MINOR=1 -DMNN_VERSION_PATCH=0 -DMNN_VERSION_BUILD=0 -DMNN_VERSION_SUFFIX=-d6795ad + OPTIONS_DEBUG + -DMNN_DEBUG_MEMORY=ON -DMNN_DEBUG_TENSOR_SIZE=ON +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_download_distfile(COPYRIGHT_PATH + URLS "https://apache.org/licenses/LICENSE-2.0.txt" + FILENAME 98f6b79b778f7b0a1541.txt + SHA512 98f6b79b778f7b0a15415bd750c3a8a097d650511cb4ec8115188e115c47053fe700f578895c097051c9bc3dfb6197c2b13a15de203273e1a3218884f86e90e8 +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${COPYRIGHT_PATH} ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + +if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) + if("metal" IN_LIST FEATURES) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mnn.metallib + ${CURRENT_PACKAGES_DIR}/share/${PORT}/mnn.metallib) + endif() +else() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if("test" IN_LIST FEATURES) + # no install(TARGETS) for the following binaries. check the buildtrees... + # vcpkg_copy_tools( + # TOOL_NAMES run_test.out benchmark.out benchmarkExprModels.out # test/ + # AUTO_CLEAN + # ) +endif() +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES MNNV2Basic.out mobilenetTest.out backendTest.out testModel.out testModelWithDescrisbe.out getPerformance.out checkInvalidValue.out timeProfile.out # tools/cpp + quantized.out # tools/quantization + classficationTopkEval.out # tools/evaluation + MNNDump2Json MNNConvert # tools/converter + transformer.out train.out dataTransformer.out runTrainDemo.out # tools/train + AUTO_CLEAN + ) + if(BUILD_SHARED) + vcpkg_copy_tools(TOOL_NAMES TestConvertResult AUTO_CLEAN) # tools/converter + endif() +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # remove the others. ex) mnn.metallib + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() diff --git a/ports/mnn/use-package-and-install.patch b/ports/mnn/use-package-and-install.patch new file mode 100644 index 00000000000000..dce33c8edebc16 --- /dev/null +++ b/ports/mnn/use-package-and-install.patch @@ -0,0 +1,194 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 993f15d..53f24ae 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -270,18 +270,24 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "^Linux") + include_directories(${aarch64_linux_include}) + endif() + endif() ++ ++if(MNN_OPENCL) ++ find_package(OpenCL REQUIRED) ++endif() ++find_package(RapidJSON CONFIG REQUIRED) ++find_path(STB_INCLUDE_DIRS "stb.h") ++find_package(Flatbuffers CONFIG REQUIRED) + include_directories(${CMAKE_CURRENT_LIST_DIR}/include/ + ${CMAKE_CURRENT_LIST_DIR}/source/ + ${CMAKE_CURRENT_LIST_DIR}/express/ + ${CMAKE_CURRENT_LIST_DIR}/tools/ + ${CMAKE_CURRENT_LIST_DIR}/schema/current/ +- ${CMAKE_CURRENT_LIST_DIR}/3rd_party/ +- ${CMAKE_CURRENT_LIST_DIR}/3rd_party/flatbuffers/include + ${CMAKE_CURRENT_LIST_DIR}/3rd_party/half +- ${CMAKE_CURRENT_LIST_DIR}/3rd_party/imageHelper +- ${CMAKE_CURRENT_LIST_DIR}/3rd_party/OpenCLHeaders/ ++ ${RAPIDJSON_INCLUDE_DIRS} ++ ${STB_INCLUDE_DIRS} ++ ${OpenCL_INCLUDE_DIRS} + ) +- ++link_libraries(flatbuffers::flatbuffers ${OpenCL_LIBRARIES}) + + set(MNN_OBJECTS_TO_LINK "") + set(MNN_TARGETS "") +@@ -631,10 +637,14 @@ ELSEIF(NOT APPLE) + INSTALL(FILES ${MNN_PUB_HDRS} DESTINATION include/MNN/) + INSTALL(FILES ${MNN_EXPR_PUB_HDRS} DESTINATION include/MNN/expr/) + install(TARGETS MNN ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) ++ + ELSE() ++ INSTALL(FILES ${MNN_PUB_HDRS} DESTINATION include/MNN/) ++ INSTALL(FILES ${MNN_EXPR_PUB_HDRS} DESTINATION include/MNN/expr/) + install(TARGETS MNN + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +@@ -648,5 +658,6 @@ ELSE() + ENDFOREACH() + IF(MNN_METAL) + SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/mnn.metallib PROPERTIES MACOSX_PACKAGE_LOCATION Resources/) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mnn.metallib DESTINATION bin) + ENDIF() + ENDIF() +diff --git a/source/backend/cuda/CMakeLists.txt b/source/backend/cuda/CMakeLists.txt +index f9a24cc..8b1f96f 100644 +--- a/source/backend/cuda/CMakeLists.txt ++++ b/source/backend/cuda/CMakeLists.txt +@@ -16,9 +16,26 @@ endif() + file(GLOB_RECURSE MNN_CUDA_SRC ${CMAKE_CURRENT_LIST_DIR}/core/* ${CMAKE_CURRENT_SOURCE_DIR}/execution/*) + message(STATUS "message ${CUDA_NVCC_FLAGS} !!!!!!!!!!!") + ++# see https://github.com/microsoft/vcpkg/blob/master/ports/cudnn/FindCUDNN.cmake ++find_package(CUDNN REQUIRED) ++message(STATUS "using cudnn: ${CUDNN_LIBRARIES}") ++ ++if(WIN32) ++ find_library(CUBLAS_LIB NAMES cublas PATHS $ENV{CUDA_PATH}/lib/x64) ++else() ++ find_library(CUBLAS_LIB cublas) ++endif() ++if(NOT CUBLAS_LIB) ++ message(FATAL_ERROR "cublas not found") ++else() ++ message(STATUS "using cublas: ${CUBLAS_LIB}") ++endif() ++ + # add_library(MNN_Cuda SHARED ${MNN_CUDA_SRC} ) +-cuda_add_library(MNN_Cuda_Main SHARED ${MNN_CUDA_SRC} ) +-set(MNN_CUDA_LIBS MNN_Cuda_Main cudnn cublas PARENT_SCOPE) ++cuda_add_library(MNN_Cuda_Main STATIC ${MNN_CUDA_SRC} ) ++target_link_libraries(MNN_Cuda_Main CuDNN::CuDNN ${CUBLAS_LIB}) ++ ++set(MNN_CUDA_LIBS MNN_Cuda_Main ${CUDNN_LIB} PARENT_SCOPE) + add_library(MNN_CUDA OBJECT Register.cpp) + + include_directories( +diff --git a/source/backend/tensorrt/CMakeLists.txt b/source/backend/tensorrt/CMakeLists.txt +index aadabd6..3a0d81e 100644 +--- a/source/backend/tensorrt/CMakeLists.txt ++++ b/source/backend/tensorrt/CMakeLists.txt +@@ -7,7 +7,7 @@ FIND_PACKAGE(CUDA REQUIRED) + + add_library( MNN_TRT OBJECT ${MNN_TRT_SRCS}) + +-include_directories(/usr/local/cuda/include/) ++include_directories(${CUDA_INCLUDE_DIRS}) + include_directories(${CMAKE_CURRENT_LIST_DIR}/backend/) + include_directories(${CMAKE_CURRENT_LIST_DIR}/execution/) + include_directories(${CMAKE_CURRENT_LIST_DIR}/execution/plugin/) +diff --git a/tools/converter/CMakeLists.txt b/tools/converter/CMakeLists.txt +index 2d5133a..d39977a 100644 +--- a/tools/converter/CMakeLists.txt ++++ b/tools/converter/CMakeLists.txt +@@ -38,11 +38,12 @@ IF(MNN_BUILD_CONVERTER) + ${CMAKE_CURRENT_LIST_DIR}/source/cli.cpp + ${CMAKE_CURRENT_LIST_DIR}/source/config.cpp + ) +- IF(MNN_BUILD_SHARED_LIBS) +- add_library(MNNConvertDeps SHARED ${COMMON_SRC} ${MNN_CONVERTER_BACKENDS_OBJECTS} ${CMAKE_CURRENT_LIST_DIR}/../../3rd_party/flatbuffers/src/util.cpp $) ++ # if Windows, meld MNNConvertDeps(lib) into MNNConvert(exe) ++ IF(MNN_BUILD_SHARED_LIBS AND NOT WIN32) ++ add_library(MNNConvertDeps SHARED ${COMMON_SRC} ${MNN_CONVERTER_BACKENDS_OBJECTS} $) + add_dependencies(MNNConvertDeps MNN) + ELSE() +- add_library(MNNConvertDeps STATIC ${COMMON_SRC} ${MNN_CONVERTER_BACKENDS_OBJECTS} ${CMAKE_CURRENT_LIST_DIR}/../../3rd_party/flatbuffers/src/util.cpp) ++ add_library(MNNConvertDeps STATIC ${COMMON_SRC} ${MNN_CONVERTER_BACKENDS_OBJECTS}) + ENDIF() + + +@@ -68,5 +69,7 @@ IF(MNN_BUILD_CONVERTER) + add_executable(TestConvertResult ${CMAKE_CURRENT_LIST_DIR}/source/TestConvertResult.cpp) + target_link_libraries(TestConvertResult MNNConvertDeps) + target_link_libraries(MNNConvert MNNConvertDeps) ++ install(TARGETS TestConvertResult RUNTIME DESTINATION bin) + ENDIF() ++ install(TARGETS MNNDump2Json MNNConvert RUNTIME DESTINATION bin) + ENDIF() +diff --git a/tools/cpp/CMakeLists.txt b/tools/cpp/CMakeLists.txt +index def574c..f4e48c6 100644 +--- a/tools/cpp/CMakeLists.txt ++++ b/tools/cpp/CMakeLists.txt +@@ -53,3 +53,5 @@ if (MSVC) + endif() + endforeach() + endif() ++ ++install(TARGETS ${MNN_CPP_TOOLS} RUNTIME DESTINATION bin) +diff --git a/tools/evaluation/CMakeLists.txt b/tools/evaluation/CMakeLists.txt +index 8773372..e40b66d 100644 +--- a/tools/evaluation/CMakeLists.txt ++++ b/tools/evaluation/CMakeLists.txt +@@ -7,4 +7,5 @@ IF(MNN_EVALUATION) + target_link_options(classficationTopkEval.out PRIVATE /WHOLEARCHIVE:$) + endforeach () + endif() ++ install(TARGETS classficationTopkEval.out RUNTIME DESTINATION bin) + ENDIF() +diff --git a/tools/quantization/CMakeLists.txt b/tools/quantization/CMakeLists.txt +index 1e84ee0..86f3cbc 100644 +--- a/tools/quantization/CMakeLists.txt ++++ b/tools/quantization/CMakeLists.txt +@@ -1,3 +1,5 @@ + file(GLOB QUANFILES ${CMAKE_CURRENT_LIST_DIR}/*.cpp) + add_executable(quantized.out ${QUANFILES}) + target_link_libraries(quantized.out ${MNN_DEPS}) ++ ++install(TARGETS quantized.out RUNTIME DESTINATION bin) +diff --git a/tools/train/CMakeLists.txt b/tools/train/CMakeLists.txt +index 48f355b..026dc24 100644 +--- a/tools/train/CMakeLists.txt ++++ b/tools/train/CMakeLists.txt +@@ -27,6 +27,10 @@ if (MNN_BUILD_TRAIN_MINI) + else() + add_library(MNNTrain ${MNN_LIBARY_TYPE} ${GRAD} ${BASIC_INCLUDE} ${OPTIMIZER} ${DATALOADER} ${TRANSFORMER} ${MODELS} ${DATASETS}) + endif() ++IF(MNN_BUILD_SHARED_LIBS) ++ target_compile_definitions(MNNTrain PRIVATE BUILDING_MNN_DLL) ++ENDIF() ++ + target_link_libraries(MNNTrain ${MNN_DEPS}) + + add_executable(transformer.out ${CMAKE_CURRENT_LIST_DIR}/source/exec/transformerExecution.cpp) +@@ -38,7 +42,7 @@ target_link_libraries(train.out MNN) + + add_executable(rawDataTransform.out ${CMAKE_CURRENT_LIST_DIR}/source/exec/rawDataTransform.cpp ${SCHEMA} ${BASIC_INCLUDE}) + +-include_directories(../../3rd_party/imageHelper/) ++# include_directories(../../3rd_party/imageHelper/) + add_executable(dataTransformer.out ${CMAKE_CURRENT_LIST_DIR}/source/exec/dataTransformer.cpp ${SCHEMA} ${BASIC_INCLUDE}) + target_link_libraries(dataTransformer.out MNN) + +@@ -59,3 +63,9 @@ if (MNN_USE_OPENCV) + add_definitions(-D MNN_USE_OPENCV) + target_link_libraries(runTrainDemo.out ${OpenCV_LIBS}) + endif() ++ ++install(TARGETS MNNTrain transformer.out train.out dataTransformer.out runTrainDemo.out ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) diff --git a/ports/mnn/vcpkg.json b/ports/mnn/vcpkg.json new file mode 100644 index 00000000000000..27676e8630fd49 --- /dev/null +++ b/ports/mnn/vcpkg.json @@ -0,0 +1,51 @@ +{ + "name": "mnn", + "version": "1.1.0", + "port-version": 1, + "description": "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba", + "homepage": "https://www.mnn.zone/", + "license": "Apache-2.0", + "supports": "!(arm | uwp | ios | android)", + "dependencies": [ + "flatbuffers", + { + "name": "flatbuffers", + "host": true + }, + "rapidjson", + "stb" + ], + "features": { + "cuda": { + "description": "Enable CUDA API backend", + "dependencies": [ + "cuda", + "cudnn" + ] + }, + "metal": { + "description": "Enable Metal API backend for Apple platforms" + }, + "opencl": { + "description": "Enable OpenCL API backend", + "dependencies": [ + "opencl" + ] + }, + "test": { + "description": "Build MNN test programs" + }, + "tools": { + "description": "Build MNN tools", + "dependencies": [ + "protobuf" + ] + }, + "vulkan": { + "description": "Enable Vulkan API backend", + "dependencies": [ + "vulkan" + ] + } + } +} diff --git a/ports/modp-base64/CMakeLists.txt b/ports/modp-base64/CMakeLists.txt index d470ccc209edd0..5a2dffe2459b97 100644 --- a/ports/modp-base64/CMakeLists.txt +++ b/ports/modp-base64/CMakeLists.txt @@ -5,16 +5,11 @@ if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) endif() +configure_file(config.h.cmake config.h @ONLY) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake" -"${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY) - - -include_directories(src ${CMAKE_CURRENT_BINARY_DIR}) - - -add_library(libmodpbase64 src/modp_b64.c libmodpbase64.def) +include_directories(. ${SOURCE_PATH}/src ${CMAKE_CURRENT_BINARY_DIR}) +add_library(libmodpbase64 ${SOURCE_PATH}/src/modp_b64.c libmodpbase64.def) install( TARGETS libmodpbase64 @@ -23,10 +18,9 @@ install( ARCHIVE DESTINATION lib ) - if(NOT DISABLE_INSTALL_HEADERS) install( - FILES src/modp_b64.h + FILES ${SOURCE_PATH}/src/modp_b64.h DESTINATION include ) endif() diff --git a/ports/modp-base64/CONTROL b/ports/modp-base64/CONTROL deleted file mode 100644 index 3f277871a84cb3..00000000000000 --- a/ports/modp-base64/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: modp-base64 -Version: -Description: diff --git a/ports/modp-base64/portfile.cmake b/ports/modp-base64/portfile.cmake index 3ff0584743425f..2508b54fd4b5b2 100644 --- a/ports/modp-base64/portfile.cmake +++ b/ports/modp-base64/portfile.cmake @@ -1,33 +1,19 @@ -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/modp-base64-v2.0.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://web.archive.org/web/20060620024518/http://modp.com:80/release/base64/modp-base64-v2.0.0.tar.bz2" - FILENAME "modp-base64-v2.0.0.tar.bz2" - SHA512 474e20cbbc47f31af5e981a6a9028fcec57e3ae9bb5ba979aa5c5c4cab6f301208fe6f441a0106df4c223d89fb6f18b19ab8812cf9f3c9900e54524e35b45720 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake - ${CMAKE_CURRENT_LIST_DIR}/libmodpbase64.def - DESTINATION ${SOURCE_PATH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO client9/stringencoders + REF e1448a9415f4ebf6f559c86718193ba067cbb99d + SHA512 68c9b9a9eb09075c792cfc0a8ce1959c60a86e5256de8568b0cb6934f748fd9e95c5f1801a8982fecac65850a8f2d633a64dc98e4505ee8e6914bd0b0fb996cf + HEAD_REF master ) -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/modp_b64_data.h - DESTINATION ${SOURCE_PATH}/src -) - - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} PREFER_NINJA + OPTIONS -DSOURCE_PATH=${SOURCE_PATH} OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/modp-base64 RENAME copyright) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/modp-base64/vcpkg.json b/ports/modp-base64/vcpkg.json new file mode 100644 index 00000000000000..2f222a982dc636 --- /dev/null +++ b/ports/modp-base64/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "modp-base64", + "version-string": "2020-09-26", + "port-version": 1, + "description": "High performance base64 encoder/decoder" +} diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL deleted file mode 100644 index eb52dacc8c6598..00000000000000 --- a/ports/mongo-c-driver/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: mongo-c-driver -Version: 1.14.0-3-1 -Build-Depends: libbson, openssl (!windows), zlib -Description: Client library written in C for MongoDB. -Homepage: https://github.com/mongodb/mongo-c-driver - -Feature: snappy -Description: Enables snappy compressor support -Build-Depends: snappy diff --git a/ports/mongo-c-driver/disable-source-write.patch b/ports/mongo-c-driver/disable-source-write.patch new file mode 100644 index 00000000000000..ff2f9cab52f0f1 --- /dev/null +++ b/ports/mongo-c-driver/disable-source-write.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7ff8bbf..32c2e00 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -114,8 +114,8 @@ if (BUILD_VERSION STREQUAL "0.0.0") + file (WRITE ${PROJECT_SOURCE_DIR}/VERSION_CURRENT ${BUILD_VERSION}) + endif () + else () +- message ("storing BUILD_VERSION ${BUILD_VERSION} in file VERSION_CURRENT for later use") +- file (WRITE ${PROJECT_SOURCE_DIR}/VERSION_CURRENT ${BUILD_VERSION}) ++ #message ("storing BUILD_VERSION ${BUILD_VERSION} in file VERSION_CURRENT for later use") ++ #file (WRITE ${PROJECT_SOURCE_DIR}/VERSION_CURRENT ${BUILD_VERSION}) + endif () + + include (LoadVersion) diff --git a/ports/mongo-c-driver/disable-static-when-dynamic-build.patch b/ports/mongo-c-driver/disable-static-when-dynamic-build.patch new file mode 100644 index 00000000000000..5652d7bd7ea732 --- /dev/null +++ b/ports/mongo-c-driver/disable-static-when-dynamic-build.patch @@ -0,0 +1,61 @@ +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index 797aaec..91d97dc 100644 +--- a/src/libmongoc/CMakeLists.txt ++++ b/src/libmongoc/CMakeLists.txt +@@ -694,6 +694,7 @@ if (WIN32) + set (LIBRARIES ${LIBRARIES} ws2_32) + endif () + ++if (NOT MONGOC_ENABLE_STATIC) + add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) + target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) +@@ -706,7 +707,7 @@ target_compile_definitions (mongoc_shared PRIVATE MONGOC_COMPILATION) + set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) + set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-${MONGOC_API_VERSION}") + +-if (MONGOC_ENABLE_STATIC) ++else () + add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_LIBRARIES}) + target_include_directories (mongoc_static BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) +@@ -733,8 +734,13 @@ if (ENABLE_APPLE_FRAMEWORK) + endif () + + add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) ++if (NOT MONGOC_ENABLE_STATIC) + target_include_directories (mongoc-stat PRIVATE ${BSON_INCLUDE_DIRS}) + target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) ++else() ++target_include_directories (mongoc-stat PRIVATE ${BSON_INCLUDE_DIRS}) ++target_link_libraries (mongoc-stat mongoc_static ${LIBRARIES}) ++endif() + + # mongoc-stat works if shared memory performance counters are enabled. + if (ENABLE_SHM_COUNTERS STREQUAL "ON") +@@ -980,7 +986,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR} + file (COPY ${PROJECT_SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) + + if (MONGOC_ENABLE_STATIC) +- set (TARGETS_TO_INSTALL mongoc_shared mongoc_static) ++ set (TARGETS_TO_INSTALL mongoc_static) + else () + set (TARGETS_TO_INSTALL mongoc_shared) + endif () +@@ -1000,6 +1006,7 @@ install ( + ) + + if (MSVC) ++ if (NOT MONGOC_ENABLE_STATIC) + add_custom_command ( + TARGET mongoc_shared + POST_BUILD +@@ -1011,7 +1018,7 @@ if (MSVC) + FILES $/lib$ + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +- if (TARGET mongoc_static) ++ else () + add_custom_command ( + TARGET mongoc_static + POST_BUILD diff --git a/ports/mongo-c-driver/fix-arm-build.patch b/ports/mongo-c-driver/fix-arm-build.patch new file mode 100644 index 00000000000000..8d61b745eff2af --- /dev/null +++ b/ports/mongo-c-driver/fix-arm-build.patch @@ -0,0 +1,24 @@ +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index 91d97dc..ccebc2a 100644 +--- a/src/libmongoc/CMakeLists.txt ++++ b/src/libmongoc/CMakeLists.txt +@@ -698,6 +698,9 @@ if (NOT MONGOC_ENABLE_STATIC) + add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) + target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) ++if (WIN32) ++ target_link_libraries (mongoc_shared PRIVATE Advapi32) ++endif() + target_include_directories (mongoc_shared BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_include_directories (mongoc_shared PRIVATE ${PRIVATE_ZLIB_INCLUDES}) + target_include_directories (mongoc_shared PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES}) +@@ -710,6 +713,9 @@ set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BAS + else () + add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_LIBRARIES}) ++ if (WIN32) ++ target_link_libraries (mongoc_static Advapi32) ++ endif() + target_include_directories (mongoc_static BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_include_directories (mongoc_static PRIVATE ${PRIVATE_ZLIB_INCLUDES}) + target_include_directories (mongoc_static PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES}) diff --git a/ports/mongo-c-driver/fix-dependency-libbson.patch b/ports/mongo-c-driver/fix-dependency-libbson.patch new file mode 100644 index 00000000000000..2411212714657b --- /dev/null +++ b/ports/mongo-c-driver/fix-dependency-libbson.patch @@ -0,0 +1,94 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1a2b7bad7..7ff8bbf32 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -151,16 +151,15 @@ if (ENABLE_BSON STREQUAL SYSTEM) + # The input variable BSON_ROOT_DIR is respected for backwards compatibility, + # but you should use the standard CMAKE_PREFIX_PATH instead. + message (STATUS "Searching for libbson CMake packages") +- find_package (bson-1.0 +- "${MONGOC_MAJOR_VERSION}.${MONGOC_MINOR_VERSION}.${MONGOC_MICRO_VERSION}" ++ find_package (libbson-1.0 CONFIG + HINTS + ${BSON_ROOT_DIR}) + +- if (NOT bson-1.0_FOUND) ++ if (NOT libbson-1.0_FOUND) + message (FATAL_ERROR "System libbson not found") + endif () + +- message ("-- libbson found version \"${bson-1.0_VERSION}\"") ++ message ("-- libbson found version \"${libbson-1.0_VERSION}\"") + message ("-- disabling test-libmongoc since using system libbson") + SET (ENABLE_TESTS OFF) + +@@ -169,14 +168,6 @@ if (ENABLE_BSON STREQUAL SYSTEM) + endif () + + set (USING_SYSTEM_BSON TRUE) +- if (NOT TARGET mongo::bson_shared) +- message (FATAL_ERROR "System libbson built without shared library target") +- endif () +- set (BSON_LIBRARIES mongo::bson_shared) +- if (NOT TARGET mongo::bson_static) +- message (FATAL_ERROR "System libbson built without static library target") +- endif () +- set (BSON_STATIC_LIBRARIES mongo::bson_static) + endif () + + unset (dist_generated CACHE) +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index 0f9e50c..797aaec 100644 +--- a/src/libmongoc/CMakeLists.txt ++++ b/src/libmongoc/CMakeLists.txt +@@ -700,6 +700,7 @@ target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIE + target_include_directories (mongoc_shared BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_include_directories (mongoc_shared PRIVATE ${PRIVATE_ZLIB_INCLUDES}) + target_include_directories (mongoc_shared PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES}) ++target_include_directories (mongoc_shared PRIVATE ${BSON_INCLUDE_DIRS}) + target_compile_definitions (mongoc_shared PRIVATE MONGOC_COMPILATION) + + set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) +@@ -707,10 +708,11 @@ set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BAS + + if (MONGOC_ENABLE_STATIC) + add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) +- target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_STATIC_LIBRARIES}) ++ target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_LIBRARIES}) + target_include_directories (mongoc_static BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_include_directories (mongoc_static PRIVATE ${PRIVATE_ZLIB_INCLUDES}) + target_include_directories (mongoc_static PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES}) ++ target_include_directories (mongoc_static PRIVATE ${BSON_INCLUDE_DIRS}) + target_compile_definitions (mongoc_static + PUBLIC MONGOC_STATIC ${BSON_STATIC_PUBLIC_DEFINITIONS} + PRIVATE MONGOC_COMPILATION +@@ -731,6 +733,7 @@ if (ENABLE_APPLE_FRAMEWORK) + endif () + + add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) ++target_include_directories (mongoc-stat PRIVATE ${BSON_INCLUDE_DIRS}) + target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) + + # mongoc-stat works if shared memory performance counters are enabled. +diff --git a/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in b/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in +index 6f05b0c..113804e 100644 +--- a/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in ++++ b/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in +@@ -19,7 +19,7 @@ set (MONGOC_STATIC_MINOR_VERSION @MONGOC_MINOR_VERSION@) + set (MONGOC_STATIC_MICRO_VERSION @MONGOC_MICRO_VERSION@) + set (MONGOC_STATIC_VERSION @MONGOC_VERSION@) + +-find_package (libbson-static-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED) ++find_package (libbson-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED) + + @PACKAGE_INIT@ + +@@ -57,3 +57,7 @@ foreach (LIB @SASL_LIBRARIES@ @SSL_LIBRARIES@ @SHM_LIBRARIES@ @ZLIB_LIBRARIES@ + endforeach () + + set (MONGOC_STATIC_DEFINITIONS MONGOC_STATIC ${BSON_STATIC_DEFINITIONS}) ++ ++set (MONGOC_INCLUDE_DIRS ${MONGOC_STATIC_INCLUDE_DIRS}) ++set (MONGOC_LIBRARIES ${MONGOC_STATIC_LIBRARIES}) ++set (MONGOC_DEFINITIONS ${MONGOC_STATIC_DEFINITIONS}) +\ No newline at end of file diff --git a/ports/mongo-c-driver/fix-include-directory.patch b/ports/mongo-c-driver/fix-include-directory.patch new file mode 100644 index 00000000000000..8fdf45334d2528 --- /dev/null +++ b/ports/mongo-c-driver/fix-include-directory.patch @@ -0,0 +1,13 @@ +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index a5767ac..3656efa 100644 +--- a/src/libmongoc/CMakeLists.txt ++++ b/src/libmongoc/CMakeLists.txt +@@ -998,7 +998,7 @@ else () + endif () + + set (MONGOC_HEADER_INSTALL_DIR +- "${CMAKE_INSTALL_INCLUDEDIR}/libmongoc-${MONGOC_API_VERSION}" ++ "${CMAKE_INSTALL_INCLUDEDIR}" + ) + + install ( diff --git a/ports/mongo-c-driver/fix-static-cmake.patch b/ports/mongo-c-driver/fix-static-cmake.patch new file mode 100644 index 00000000000000..bb3e018e73171f --- /dev/null +++ b/ports/mongo-c-driver/fix-static-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in b/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in +index c23da9f..05c03e8 100644 +--- a/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in ++++ b/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in +@@ -30,7 +30,7 @@ list (APPEND MONGOC_STATIC_INCLUDE_DIRS ${BSON_STATIC_INCLUDE_DIRS}) + # directory and the base name, but not the suffix, so we use CMake's + # find_library () to pick that up. Users can override this by configuring + # MONGOC_STATIC_LIBRARY themselves. +-find_library (MONGOC_STATIC_LIBRARY mongoc-static-1.0 PATHS "@PACKAGE_LIBRARY_INSTALL_DIRS@" NO_DEFAULT_PATH) ++find_library (MONGOC_STATIC_LIBRARY mongoc-1.0 PATHS "@PACKAGE_LIBRARY_INSTALL_DIRS@" NO_DEFAULT_PATH) + if (MSVC) + set (MONGOC_STATIC_LIB_EXT "lib") + else () diff --git a/ports/mongo-c-driver/fix-uwp.patch b/ports/mongo-c-driver/fix-uwp.patch deleted file mode 100644 index 973c17b5c2ccc0..00000000000000 --- a/ports/mongo-c-driver/fix-uwp.patch +++ /dev/null @@ -1,156 +0,0 @@ ---- a/src/libbson/CMakeLists.txt -+++ b/src/libbson/CMakeLists.txt -@@ -217,6 +217,9 @@ set (HEADERS_FORWARDING - ${PROJECT_SOURCE_DIR}/src/bson/forwarding/bson.h - ) - -+add_definitions(-D_CRT_SECURE_NO_WARNINGS) -+ -+if (NOT ENABLE_STATIC MATCHES "ON|AUTO") - add_library (bson_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - set (CMAKE_CXX_VISIBILITY_PRESET hidden) - set_target_properties (bson_shared PROPERTIES COMPILE_DEFINITIONS "BSON_COMPILATION;JSONSL_PARSE_NAN") -@@ -258,16 +261,21 @@ if (WIN32) - # must be handled specially since we can't resolve them - set (BSON_SYSTEM_LIBRARIES ${BSON_SYSTEM_LIBRARIES} ws2_32) - endif () -+endif () - - if (ENABLE_STATIC MATCHES "ON|AUTO") - add_library (bson_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -+ set(CMAKE_CXX_VISIBILITY_PRESET hidden) - set_target_properties (bson_static PROPERTIES COMPILE_DEFINITIONS "BSON_COMPILATION;BSON_STATIC;JSONSL_PARSE_NAN") - set_target_properties (bson_static PROPERTIES VERSION 0.0.0) - set_target_properties (bson_static PROPERTIES OUTPUT_NAME "bson-static-${BSON_API_VERSION}") -+ set(THREADS_PREFER_PTHREAD_FLAG 1) -+ find_package (Threads REQUIRED) - target_link_libraries (bson_static Threads::Threads) - if (RT_LIBRARY) - target_link_libraries (bson_static ${RT_LIBRARY}) - endif () -+ find_library(M_LIBRARY m) - if (M_LIBRARY) - target_link_libraries (bson_static ${M_LIBRARY}) - endif () -@@ -282,7 +290,7 @@ function (add_example bin src) - add_executable (${bin} ${BSON_EXAMPLE_SOURCES}) - - # Link against the shared lib like normal apps -- target_link_libraries (${bin} bson_shared) -+ target_link_libraries (${bin} bson_shared bson_static) - - set (EXAMPLES ${EXAMPLES} ${bin}) - endfunction () -@@ -304,6 +312,7 @@ set (BSON_HEADER_INSTALL_DIR - "${CMAKE_INSTALL_INCLUDEDIR}/libbson-${BSON_API_VERSION}" - ) - -+if (NOT ENABLE_STATIC MATCHES "ON|AUTO") - install ( - TARGETS bson_shared ${EXAMPLES} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -@@ -311,6 +320,7 @@ install ( - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} - ) -+endif () - if (ENABLE_STATIC MATCHES "ON|AUTO") - install ( - TARGETS bson_static ${EXAMPLES} ---- a/src/libmongoc/CMakeLists.txt -+++ b/src/libmongoc/CMakeLists.txt -@@ -609,6 +609,7 @@ if (WIN32) - set (LIBRARIES ${LIBRARIES} ws2_32) - endif () - -+if (NOT MONGOC_ENABLE_STATIC) - add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) - target_link_libraries (mongoc_shared ${LIBRARIES} ${BSON_LIBRARIES}) -@@ -617,6 +618,7 @@ target_compile_definitions (mongoc_shared PUBLIC MONGOC_COMPILATION ${BSON_DEFIN - - set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) - set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "mongoc-${MONGOC_API_VERSION}" PREFIX "lib") -+endif () - - if (MONGOC_ENABLE_STATIC) - add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -@@ -639,7 +641,11 @@ if (ENABLE_APPLE_FRAMEWORK) - endif () - - add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) -+if (MONGOC_ENABLE_STATIC) -+target_link_libraries (mongoc-stat mongoc_static) -+else () - target_link_libraries (mongoc-stat mongoc_shared) -+endif () - - # mongoc-stat works if shared memory performance counters are enabled. - if (ENABLE_SHM_COUNTERS STREQUAL "ON") -@@ -870,6 +876,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/json DESTINATION ${PROJECT_BINARY_DIR}/te - file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR}/tests) - file (COPY ${PROJECT_SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) - -+if (NOT MONGOC_ENABLE_STATIC) - install ( - TARGETS mongoc_shared ${EXAMPLES} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -@@ -877,10 +884,11 @@ install ( - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} - ) -+endif () - - if (MONGOC_ENABLE_STATIC) - install ( -- TARGETS mongoc_shared mongoc_static ${EXAMPLES} -+ TARGETS mongoc_static ${EXAMPLES} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ---- a/src/libmongoc/src/mongoc/mongoc-gridfs-file.c -+++ b/src/libmongoc/src/mongoc/mongoc-gridfs-file.c -@@ -765,7 +765,7 @@ _mongoc_gridfs_file_refresh_page (mongoc_gridfs_file_t *file) - bson_t query; - bson_t child; - bson_t opts; -- const bson_t *chunk; -+ const bson_t *chunk = NULL; - const char *key; - bson_iter_t iter; - int64_t existing_chunks; ---- a/src/libmongoc/src/mongoc/mongoc-handshake.c -+++ b/src/libmongoc/src/mongoc/mongoc-handshake.c -@@ -286,7 +286,8 @@ _get_os_version (void) - char *ret = bson_malloc (HANDSHAKE_OS_VERSION_MAX); - bool found = false; - --#ifdef _WIN32 -+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) -+#elif defined (_WIN32) - OSVERSIONINFO osvi; - ZeroMemory (&osvi, sizeof (OSVERSIONINFO)); - osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); ---- a/src/libmongoc/src/mongoc/mongoc-util.c -+++ b/src/libmongoc/src/mongoc/mongoc-util.c -@@ -84,7 +84,11 @@ _mongoc_hex_md5 (const char *input) - void - _mongoc_usleep (int64_t usec) - { - #ifdef _WIN32 -+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) -+ if (usec / 1000 > MAXDWORD || usec < 0) -+ __fastfail(-1); -+ Sleep((DWORD)(usec / 1000)); -+#else - LARGE_INTEGER ft; - HANDLE timer; - -@@ -80,6 +85,7 @@ _mongoc_usleep (int64_t usec) - SetWaitableTimer (timer, &ft, 0, NULL, NULL, 0); - WaitForSingleObject (timer, INFINITE); - CloseHandle (timer); -+#endif - #else - BSON_ASSERT (usec >= 0); - usleep ((useconds_t) usec); diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index 9106fecb942300..b95266f5dc916e 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -1,137 +1,123 @@ -include(vcpkg_common_functions) -set(BUILD_VERSION 1.14.0) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO mongodb/mongo-c-driver - REF ${BUILD_VERSION} - SHA512 bf2bb835543dd2a445aac6cafa7bbbf90921ec41014534779924a5eb7cbd9fd532acd8146ce81dfcf1bcac33a78d8fce22b962ed7f776449e4357eccab8d6110 - HEAD_REF master - PATCHES fix-uwp.patch -) - -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - "snappy" ENABLE_SNAPPY -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(ENABLE_STATIC ON) -else() - set(ENABLE_STATIC OFF) -endif() - -if(NOT VCPKG_CMAKE_SYSTEM_NAME) - set(ENABLE_SSL "WINDOWS") -else() - set(ENABLE_SSL "OPENSSL") -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR} - -DENABLE_MONGOC=ON - -DENABLE_BSON=ON - -DENABLE_TESTS=OFF - -DENABLE_EXAMPLES=OFF - -DENABLE_SSL=${ENABLE_SSL} - -DENABLE_ZLIB=SYSTEM - -DENABLE_STATIC=${ENABLE_STATIC} - -DBUILD_VERSION=${BUILD_VERSION} - ${FEATURE_OPTIONS} -) - -vcpkg_install_cmake() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libmongoc-static-1.0) -else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libmongoc-1.0) -endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -# This rename is needed because the official examples expect to use #include -# See Microsoft/vcpkg#904 -file(RENAME - ${CURRENT_PACKAGES_DIR}/include/libmongoc-1.0 - ${CURRENT_PACKAGES_DIR}/temp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/libmongoc-static-1.0.a - ${CURRENT_PACKAGES_DIR}/lib/libmongoc-1.0.a) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/libmongoc-static-1.0.a - ${CURRENT_PACKAGES_DIR}/debug/lib/libmongoc-1.0.a) - else() - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) - endif() - - # drop the __declspec(dllimport) when building static - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - static.patch - ) - - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) -endif() - -configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/copyright COPYONLY) -file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(PORT_POSTFIX "static-1.0") -else() - set(PORT_POSTFIX "1.0") -endif() - -# Create cmake files for _both_ find_package(mongo-c-driver) and find_package(libmongoc-static-1.0)/find_package(libmongoc-1.0) -file(READ ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake LIBMONGOC_CONFIG_CMAKE) - -# Patch: Set _IMPORT_PREFIX and replace PACKAGE_PREFIX_DIR -string(REPLACE -[[ -get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) -]] -[[ -# VCPKG PATCH SET IMPORT_PREFIX -get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) -get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) -get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) -if(_IMPORT_PREFIX STREQUAL "/") - set(_IMPORT_PREFIX "") -endif() -]] - LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") -string(REPLACE [[PACKAGE_PREFIX_DIR]] [[_IMPORT_PREFIX]] LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") - -string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") -string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") -file(COPY ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}) -file(COPY ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config-version.cmake) - -vcpkg_copy_pdbs() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libbson-1.0.pc ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libbson-1.0.pc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libbson-static-1.0.pc ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libbson-static-1.0.pc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/libbson-1.0.dll ${CURRENT_PACKAGES_DIR}/bin/libbson-1.0.dll) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/libbson-1.0.pdb ${CURRENT_PACKAGES_DIR}/bin/libbson-1.0.pdb) +# This port needs to be updated at the same time as libbson +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mongodb/mongo-c-driver + REF 99d422877c5b5ea52006c13ee3b48297251b2b2d # debian/1.16.1 + SHA512 e2f129439ff3697981774e0de35586a6afe98838acfc52d8a115bcb298350f2779b886dc6b27130e78b3b81f9b0a85b2bc6bcef246f9685c05f6789747c4739d + HEAD_REF master + PATCHES + fix-dependency-libbson.patch + disable-static-when-dynamic-build.patch + fix-arm-build.patch + disable-source-write.patch + fix-include-directory.patch + fix-static-cmake.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "snappy" ENABLE_SNAPPY + "icu" ENABLE_ICU +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) + +if(VCPKG_TARGET_IS_WINDOWS) + set(ENABLE_SSL "WINDOWS") +else() + set(ENABLE_SSL "OPENSSL") +endif() + +if(VCPKG_TARGET_IS_ANDROID) + set(ENABLE_SRV OFF) + set(ENABLE_SHM_COUNTERS OFF) +else() + set(ENABLE_SRV AUTO) + set(ENABLE_SHM_COUNTERS AUTO) +endif() + +file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents) +string(JSON BUILD_VERSION GET "${_contents}" version) +file(WRITE "${SOURCE_PATH}/VERSION_CURRENT" "${BUILD_VERSION}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR} + -DENABLE_MONGOC=ON + -DENABLE_BSON=SYSTEM + -DENABLE_TESTS=OFF + -DENABLE_EXAMPLES=OFF + -DENABLE_SRV=${ENABLE_SRV} + -DENABLE_SHM_COUNTERS=${ENABLE_SHM_COUNTERS} + -DENABLE_SSL=${ENABLE_SSL} + -DENABLE_ZLIB=SYSTEM + -DENABLE_STATIC=${ENABLE_STATIC} + -DBUILD_VERSION=${BUILD_VERSION} + -DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp=ON + ${FEATURE_OPTIONS} + MAYBE_UNUSED_VARIABLES + CMAKE_DISABLE_FIND_PACKAGE_PythonInterp +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/libmongoc-static-1.0" PACKAGE_NAME libmongoc-1.0) +else() + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/libmongoc-1.0" PACKAGE_NAME libmongoc-1.0) +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + # drop the __declspec(dllimport) when building static + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/mongoc/mongoc-macros.h + "define MONGOC_API __declspec(dllimport)" "define MONGOC_API") + + file(RENAME + "${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0/libmongoc-static-1.0-config.cmake" + "${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0/libmongoc-1.0-config.cmake") + file(RENAME + "${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0/libmongoc-static-1.0-config-version.cmake" + "${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0/libmongoc-1.0-config-version.cmake") + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() + +# Create cmake files for _both_ find_package(mongo-c-driver) and find_package(libmongoc-static-1.0)/find_package(libmongoc-1.0) +file(READ "${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0/libmongoc-1.0-config.cmake" LIBMONGOC_CONFIG_CMAKE) + +# Patch: Set _IMPORT_PREFIX and replace PACKAGE_PREFIX_DIR +string(REPLACE +[[ +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) +]] +[[ +# VCPKG PATCH SET IMPORT_PREFIX +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() +]] + LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +string(REPLACE [[PACKAGE_PREFIX_DIR]] [[_IMPORT_PREFIX]] LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") + +string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +#Something similar is probably required for windows too! +if (NOT VCPKG_TARGET_IS_WINDOWS) + string(REPLACE "/lib/libssl.a" "\$<\$:/debug>/lib/libssl.a" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") + string(REPLACE "/lib/libcrypto.a" "\$<\$:/debug>/lib/libcrypto.a" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") + string(REPLACE "/lib/libz.a" "\$<\$:/debug>/lib/libz.a" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +endif() + +file(WRITE "${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0/libmongoc-1.0-config.cmake" "${LIBMONGOC_CONFIG_CMAKE}") + +file(COPY "${SOURCE_PATH}/THIRD_PARTY_NOTICES" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/mongo-c-driver/static.patch b/ports/mongo-c-driver/static.patch deleted file mode 100644 index 0f7fa98bb1ab6a..00000000000000 --- a/ports/mongo-c-driver/static.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/mongoc/mongoc-macros.h -+++ b/mongoc/mongoc-macros.h -@@ -40,7 +40,7 @@ - #elif defined(MONGOC_COMPILATION) - #define MONGOC_API __declspec(dllexport) - #else --#define MONGOC_API __declspec(dllimport) -+#define MONGOC_API - #endif - #define MONGOC_CALL __cdecl - diff --git a/ports/mongo-c-driver/usage b/ports/mongo-c-driver/usage index 80595cd07b822d..561dc7ac80df9d 100644 --- a/ports/mongo-c-driver/usage +++ b/ports/mongo-c-driver/usage @@ -1,9 +1,7 @@ The package mongo-c-driver is compatible with built-in CMake targets: - - find_package(mongo-c-driver CONFIG REQUIRED) - target_include_directories(${project} PRIVATE ${MONGOC_INCLUDE_DIRS}) - -For use dynamic library: - target_link_libraries(${project} PRIVATE ${MONGOC_LIBRARIES}) -For use static library: - target_link_libraries(${project} PRIVATE ${MONGOC_STATIC_LIBRARY}) + + find_package(libmongoc-1.0 CONFIG REQUIRED) + + target_include_directories(main PRIVATE ${MONGOC_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${MONGOC_LIBRARIES}) + target_compile_definitions(main PRIVATE ${MONGOC_DEFINITIONS}) diff --git a/ports/mongo-c-driver/vcpkg.json b/ports/mongo-c-driver/vcpkg.json new file mode 100644 index 00000000000000..ba3779b2a8519a --- /dev/null +++ b/ports/mongo-c-driver/vcpkg.json @@ -0,0 +1,37 @@ +{ + "name": "mongo-c-driver", + "version": "1.16.1", + "port-version": 6, + "description": "Client library written in C for MongoDB.", + "homepage": "https://github.com/mongodb/mongo-c-driver", + "dependencies": [ + "libbson", + { + "name": "openssl", + "platform": "!windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "icu": { + "description": "Enable ICU support, necessary to use non-ASCII usernames or passwords", + "dependencies": [ + "icu" + ] + }, + "snappy": { + "description": "Enables snappy compressor support", + "dependencies": [ + "snappy" + ] + } + } +} diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL deleted file mode 100644 index b4424e25ba78ee..00000000000000 --- a/ports/mongo-cxx-driver/CONTROL +++ /dev/null @@ -1,17 +0,0 @@ -Source: mongo-cxx-driver -Version: 3.4.0-3 -Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility -Homepage: https://github.com/mongodb/mongo-cxx-driver -Description: MongoDB C++ Driver. - -Feature: mnmlstc -Description: Use MNMLSTC/core C++17 polyfill. - -Feature: system-mnmlstc -Description: Use an available version of MNMLSTC on your system as C++17 polyfill. - -Feature: boost -Description: Use Boost C++17 polyfill. The only option under MSVC. - -Feature: std-experimental -Description: Use optional and string_view from std::experimental. diff --git a/ports/mongo-cxx-driver/fix-android.patch b/ports/mongo-cxx-driver/fix-android.patch new file mode 100644 index 00000000000000..01527392f6a410 --- /dev/null +++ b/ports/mongo-cxx-driver/fix-android.patch @@ -0,0 +1,13 @@ +diff --git "a/src/mongocxx/options/change_stream.cpp" "b/src/mongocxx/options/change_stream.cpp" +index 2c651a7e0..2e9c34eb6 100644 +--- "a/src/mongocxx/options/change_stream.cpp" ++++ "b/src/mongocxx/options/change_stream.cpp" +@@ -108,7 +108,7 @@ bsoncxx::document::value change_stream::as_bson() const { + if ((count < 0) || (count >= std::numeric_limits::max())) { + throw mongocxx::logic_error{mongocxx::error_code::k_invalid_parameter}; + } +- out.append(bsoncxx::builder::basic::kvp("maxAwaitTimeMS", count)); ++ out.append(bsoncxx::builder::basic::kvp("maxAwaitTimeMS", static_cast(count))); + } + + return out.extract(); diff --git a/ports/mongo-cxx-driver/fix-dependency-libbson.patch b/ports/mongo-cxx-driver/fix-dependency-libbson.patch new file mode 100644 index 00000000000000..de9b9d7b63e7d5 --- /dev/null +++ b/ports/mongo-cxx-driver/fix-dependency-libbson.patch @@ -0,0 +1,25 @@ +diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt +index 69b53b3..655b33a 100644 +--- a/src/bsoncxx/CMakeLists.txt ++++ b/src/bsoncxx/CMakeLists.txt +@@ -78,15 +78,15 @@ set(LIBBSON_REQUIRED_VERSION 1.13.0) + set(LIBBSON_REQUIRED_ABI_VERSION 1.0) + + if (BUILD_SHARED_LIBS) +- find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} REQUIRED) ++ find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED) + set(libbson_libraries ${BSON_LIBRARIES}) + set(libbson_include_directories ${BSON_INCLUDE_DIRS}) + set(libbson_definitions ${BSON_DEFINITIONS}) + else() +- find_package(libbson-static-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} REQUIRED) +- set(libbson_libraries ${BSON_STATIC_LIBRARIES}) +- set(libbson_include_directories ${BSON_STATIC_INCLUDE_DIRS}) +- set(libbson_definitions ${BSON_STATIC_DEFINITIONS}) ++ find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED) ++ set(libbson_libraries ${BSON_LIBRARIES}) ++ set(libbson_include_directories ${BSON_INCLUDE_DIRS}) ++ set(libbson_definitions ${BSON_DEFINITIONS}) + endif() + + add_subdirectory(third_party) diff --git a/ports/mongo-cxx-driver/fix-dependency-mongocdriver.patch b/ports/mongo-cxx-driver/fix-dependency-mongocdriver.patch new file mode 100644 index 00000000000000..99a6a8efc2cddd --- /dev/null +++ b/ports/mongo-cxx-driver/fix-dependency-mongocdriver.patch @@ -0,0 +1,19 @@ +diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt +index 64ff936..e4d4e14 100644 +--- a/src/mongocxx/CMakeLists.txt ++++ b/src/mongocxx/CMakeLists.txt +@@ -39,10 +39,10 @@ if (BUILD_SHARED_LIBS) + set(libmongoc_include_directories ${MONGOC_INCLUDE_DIRS}) + set(libmongoc_definitions ${MONGOC_DEFINITIONS}) + else() +- find_package(libmongoc-static-${LIBMONGOC_REQUIRED_ABI_VERSION} ${LIBMONGOC_REQUIRED_VERSION} REQUIRED) +- set(libmongoc_libraries ${MONGOC_STATIC_LIBRARIES}) +- set(libmongoc_include_directories ${MONGOC_STATIC_INCLUDE_DIRS}) +- set(libmongoc_definitions ${MONGOC_STATIC_DEFINITIONS}) ++ find_package(libmongoc-${LIBMONGOC_REQUIRED_ABI_VERSION} ${LIBMONGOC_REQUIRED_VERSION} REQUIRED) ++ set(libmongoc_libraries ${MONGOC_LIBRARIES}) ++ set(libmongoc_include_directories ${MONGOC_INCLUDE_DIRS}) ++ set(libmongoc_definitions ${MONGOC_DEFINITIONS}) + endif() + + add_subdirectory(config) diff --git a/ports/mongo-cxx-driver/github-654.patch b/ports/mongo-cxx-driver/github-654.patch new file mode 100644 index 00000000000000..f0eda2923b85aa --- /dev/null +++ b/ports/mongo-cxx-driver/github-654.patch @@ -0,0 +1,30 @@ +From e1a92d8bf8f07abc89350a956819b78df05bc4fe Mon Sep 17 00:00:00 2001 +From: Billy Robert O'Neal III +Date: Mon, 25 May 2020 20:47:58 -0700 +Subject: [PATCH] Disable trivially_constructible test for atomic on MSVC++. + +MSVC++ implements P0883 unconditionally, which changes the rules for std::atomic. It removes atomic's trivial constructor, and makes the default constructor value initialize the T. + +Note that Mongo was not following the C++11 rules, because it used the atomic before calling atomic_init first. MSVC++ never implemented the C++11 rules and previously default initialized the T. + +All versions of MSVC++ will provide constant initialization of the guarded value "current_instance". In old versions, atomic didn't implement P0883 due to bugs in the constexpr evaluator; in current versions the constexpr evaluator was fixed and atomic value initializes unconditionally. Therefore, this PR disables the check whenever MSVC++'s standard library is detected. + +See https://github.com/microsoft/STL/issues/661 for further discussion. +--- + src/mongocxx/instance.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/mongocxx/instance.cpp b/src/mongocxx/instance.cpp +index e67d41ec7..6eb456c65 100644 +--- a/src/mongocxx/instance.cpp ++++ b/src/mongocxx/instance.cpp +@@ -75,7 +75,8 @@ typename std::aligned_storage::type sentine + std::atomic current_instance{nullptr}; + static_assert(std::is_standard_layout::value, + "Must be standard layout"); +-#if (!defined(__GNUC__) || (defined(__clang__) && !defined(__GLIBCXX__))) || (__GNUC__ >= 5) ++#if (!defined(_MSVC_STL_VERSION)) \ ++ && ((!defined(__GNUC__) || (defined(__clang__) && !defined(__GLIBCXX__))) || (__GNUC__ >= 5)) + static_assert(std::is_trivially_constructible::value, + "Must be trivially constructible"); + #endif diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index 9f05fedc8e83ae..dc409fcfdfb680 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(VERSION_MAJOR 3) set(VERSION_MINOR 4) set(VERSION_PATCH 0) @@ -15,11 +13,19 @@ vcpkg_from_github( fix-uwp.patch disable-c2338-mongo-cxx-driver.patch disable_test_and_example.patch + fix-dependency-libbson.patch + fix-dependency-mongocdriver.patch + github-654.patch + fix-android.patch ) if ("mnmlstc" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature mnmlstc only support UNIX") + endif() set(BSONCXX_POLY MNMLSTC) elseif ("system-mnmlstc" IN_LIST FEATURES) + message("Please make sure you have mnmlstc installed via the package manager") set(BSONCXX_POLY SYSTEM_MNMLSTC) elseif ("boost" IN_LIST FEATURES) set(BSONCXX_POLY BOOST) @@ -46,6 +52,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_copy_pdbs() + file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbsoncxx/libbsoncxx-config.cmake " set(LIBBSONCXX_VERSION_MAJOR ${VERSION_MAJOR}) @@ -106,7 +114,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver RENAME copyright) -file(COPY ${SOURCE_PATH}/THIRD-PARTY-NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver) - -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${SOURCE_PATH}/THIRD-PARTY-NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/mongo-cxx-driver/vcpkg.json b/ports/mongo-cxx-driver/vcpkg.json new file mode 100644 index 00000000000000..60e374eba8ebb8 --- /dev/null +++ b/ports/mongo-cxx-driver/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "mongo-cxx-driver", + "version-string": "3.4.0-5", + "port-version": 3, + "description": "MongoDB C++ Driver.", + "homepage": "https://github.com/mongodb/mongo-cxx-driver", + "dependencies": [ + "boost-optional", + "boost-smart-ptr", + "boost-utility", + "libbson", + "mongo-c-driver" + ], + "features": { + "boost": { + "description": "Use Boost C++17 polyfill. The only option under MSVC." + }, + "mnmlstc": { + "description": "Use MNMLSTC/core C++17 polyfill." + }, + "std-experimental": { + "description": "Use optional and string_view from std::experimental." + }, + "system-mnmlstc": { + "description": "Use an available version of MNMLSTC on your system as C++17 polyfill." + } + } +} diff --git a/ports/mongoose/CMakeLists.txt b/ports/mongoose/CMakeLists.txt index 77fe2f8396b1a1..ae2cce34ca1f97 100644 --- a/ports/mongoose/CMakeLists.txt +++ b/ports/mongoose/CMakeLists.txt @@ -4,12 +4,20 @@ project(mongoose C) include(GNUInstallDirs) +option(ENABLE_SSL "Build with openssl support" OFF) + set(CMAKE_INCLUDE_CURRENT_DIR ON) add_library(mongoose mongoose.c) target_include_directories(mongoose PUBLIC $) set_target_properties(mongoose PROPERTIES PUBLIC_HEADER mongoose.h) +if (ENABLE_SSL) + find_package(OpenSSL REQUIRED) + target_compile_options(mongoose PRIVATE -DMG_ENABLE_SSL) + target_link_libraries(mongoose PRIVATE OpenSSL::SSL OpenSSL::Crypto) +endif() + install(TARGETS mongoose EXPORT unofficial-mongoose-config) install( diff --git a/ports/mongoose/CONTROL b/ports/mongoose/CONTROL deleted file mode 100644 index ae0bbc75825b7e..00000000000000 --- a/ports/mongoose/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mongoose -Version: 6.15-1 -Description: Embedded web server / embedded networking library -Homepage: https://cesanta.com/ diff --git a/ports/mongoose/portfile.cmake b/ports/mongoose/portfile.cmake index 81c8d50ee6e655..972a36a0fecdba 100644 --- a/ports/mongoose/portfile.cmake +++ b/ports/mongoose/portfile.cmake @@ -1,24 +1,25 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cesanta/mongoose - REF 6.15 - SHA512 d736aeb9ccb7a67fb8180ed324d3fa26e005bfc2ede1db00d73349976bfcfb45489ce3efb178817937fae3cd9f6a6e9c4b620af8517e3ace9c53b9541539bdde + REF 8e520756366ca5739f13dc6ad65fcf269dbbc994 #v7.1 + SHA512 a966a8b4e47e36da0f630c3cf343c85a1c1138508a82e506b21e4b8bd72573d0e0145318f97b32a67f423e033b348de76a00b780430e4e69d1a98bd7494a3e0a HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + ssl ENABLE_SSL +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -28,7 +29,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mongoose/vcpkg.json b/ports/mongoose/vcpkg.json new file mode 100644 index 00000000000000..9313383b64ab11 --- /dev/null +++ b/ports/mongoose/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "mongoose", + "version": "7.1", + "description": "Embedded web server / embedded networking library", + "homepage": "https://cesanta.com/", + "supports": "!uwp", + "features": { + "ssl": { + "description": "Build with openssl", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/monkeys-audio/CONTROL b/ports/monkeys-audio/CONTROL deleted file mode 100644 index fdd72f340fb7b3..00000000000000 --- a/ports/monkeys-audio/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: monkeys-audio -Version: 4.8.3 -Homepage: https://monkeysaudio.com -Description: Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods. - Audio files compressed with it ends with .ape extension. diff --git a/ports/monkeys-audio/fix-project-config.patch b/ports/monkeys-audio/fix-project-config.patch new file mode 100644 index 00000000000000..549f9bd6429032 --- /dev/null +++ b/ports/monkeys-audio/fix-project-config.patch @@ -0,0 +1,16 @@ +--- a/Source/Projects/VS2019/MACDll/MACDll.vcxproj 2020-12-23 21:42:15.830541000 +0100 ++++ b/Source/Projects/VS2019/MACDll/MACDll.vcxproj 2020-12-29 06:07:36.101967600 +0100 +@@ -74,11 +74,9 @@ + <_ProjectFileVersion>11.0.50727.1 + + +- C:\Applications\Cool Edit Pro\ ++ $(Configuration)\ + $(Configuration)\ +- true +- APE +- .flt ++ false + + + $(Configuration)\ diff --git a/ports/monkeys-audio/portfile.cmake b/ports/monkeys-audio/portfile.cmake index 719db6e29eed22..40c2bccdecb300 100644 --- a/ports/monkeys-audio/portfile.cmake +++ b/ports/monkeys-audio/portfile.cmake @@ -1,47 +1,73 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP" "OSX" "Linux") -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT) +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) -if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/MAC_SDK_483.zip.extracted) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) -endif() - -set(VERSION 4.7) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/483) +set(MA_VERSION 570) vcpkg_download_distfile(ARCHIVE - URLS "http://monkeysaudio.com/files/MAC_SDK_483.zip" - FILENAME "MAC_SDK_483.zip" - SHA512 c080aa87997def3b970050f6bd334b6908884cc521f192abc02d774a8b3067207781dcab30f052015d4ae891fc6390c6f0b33ed319d9d7fd0850dab6fcded8f0 + URLS "https://monkeysaudio.com/files/MAC_SDK_${MA_VERSION}.zip" + "https://web.archive.org/web/20201229182615if_/https://monkeysaudio.com/files/MAC_SDK_570.zip" + FILENAME "MAC_SDK_${MA_VERSION}.zip" + SHA512 d3b5a10574dde1ea90578959378b87f8a8c94b3cc7198bc51b86f7128d66117d706c191d56a699dce0c2a53b7722e0893cb614f96f9ad725a266a871da587fd4 ) -vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) - -file(REMOVE - ${SOURCE_PATH}/Shared/MACDll.dll - ${SOURCE_PATH}/Shared/MACDll.lib - ${SOURCE_PATH}/Shared/MACLib.lib +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + PATCHES + fix-project-config.patch + remove-certificate-step.patch ) -vcpkg_install_msbuild( - SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH Source/Projects/VS2019/Console/Console.vcxproj +file(REMOVE_RECURSE + ${SOURCE_PATH}/Shared/32 + ${SOURCE_PATH}/Shared/64 ) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM Win32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(PLATFORM x64) +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Source/Projects/VS2019/MACDll/MACDll.vcxproj + PLATFORM ${PLATFORM} + ) +else() + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Source/Projects/VS2019/MACLib/MACLib.vcxproj + PLATFORM ${PLATFORM} + ) +endif() + +if ("tools" IN_LIST FEATURES) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Source/Projects/VS2019/Console/Console.vcxproj + PLATFORM ${PLATFORM} + ) + + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Console.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Console.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/Console.exe ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/mac.exe) + + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/MACLib.lib ${CURRENT_PACKAGES_DIR}/debug/lib/MACLib.lib) +endif() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) file(COPY ${SOURCE_PATH}/Shared/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/monkeys-audio FILES_MATCHING PATTERN "*.h") file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Console.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Console.lib) - -file(RENAME ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/Console.exe ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/mac.exe) - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/monkeys-audio RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/monkeys-audio/remove-certificate-step.patch b/ports/monkeys-audio/remove-certificate-step.patch new file mode 100644 index 00000000000000..16fb24d2a7e694 --- /dev/null +++ b/ports/monkeys-audio/remove-certificate-step.patch @@ -0,0 +1,24 @@ +--- a/Source/Projects/VS2019/Console/Console.vcxproj 2020-12-23 21:42:15.672211100 +0100 ++++ b/Source/Projects/VS2019/Console/Console.vcxproj 2020-12-29 05:29:53.916306700 +0100 +@@ -180,10 +180,6 @@ + + MachineX86 + +- +- C:\MAC\Current\Source\Certificate\signtool.exe sign /t http://timestamp.digicert.com /f C:\MAC\Current\Source\Certificate\MAC3.pfx /p password /v "$(TargetPath)" +-C:\MAC\Current\Source\Certificate\signtool.exe sign /f C:\MAC\Current\Source\Certificate\MAC3.pfx /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /fd sha256 /a /as /p password "$(TargetPath)" +- + + + +@@ -273,10 +269,6 @@ + + MachineX64 + +- +- C:\MAC\Current\Source\Certificate\signtool.exe sign /t http://timestamp.digicert.com /f C:\MAC\Current\Source\Certificate\MAC3.pfx /p password /v "$(TargetPath)" +-C:\MAC\Current\Source\Certificate\signtool.exe sign /f C:\MAC\Current\Source\Certificate\MAC3.pfx /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /fd sha256 /a /as /p password "$(TargetPath)" +- + + + diff --git a/ports/monkeys-audio/vcpkg.json b/ports/monkeys-audio/vcpkg.json new file mode 100644 index 00000000000000..ceb22ba8b1b63e --- /dev/null +++ b/ports/monkeys-audio/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "monkeys-audio", + "version-string": "5.70", + "port-version": 1, + "description": [ + "Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods.", + "Audio files compressed with it end with .ape extension." + ], + "homepage": "https://monkeysaudio.com", + "supports": "!(uwp | osx | linux)", + "features": { + "tools": { + "description": "Build monkeys-audio tools" + } + } +} diff --git a/ports/moos-core/CONTROL b/ports/moos-core/CONTROL deleted file mode 100644 index 2534bb9054179f..00000000000000 --- a/ports/moos-core/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: moos-core -Version: 10.4.0-3 -Description: A very light weight, easy to use middleware. -Homepage: https://sites.google.com/site/moossoftware/ diff --git a/ports/moos-core/portfile.cmake b/ports/moos-core/portfile.cmake index 663ad6df26ed8b..197467428edef2 100644 --- a/ports/moos-core/portfile.cmake +++ b/ports/moos-core/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) vcpkg_from_github( @@ -15,6 +13,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE OPTIONS -DCMAKE_ENABLE_EXPORT=OFF ) diff --git a/ports/moos-core/vcpkg.json b/ports/moos-core/vcpkg.json new file mode 100644 index 00000000000000..43a01cf2539ce3 --- /dev/null +++ b/ports/moos-core/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "moos-core", + "version-string": "10.4.0", + "port-version": 6, + "description": "A very light weight, easy to use middleware.", + "homepage": "https://sites.google.com/site/moossoftware/" +} diff --git a/ports/moos-essential/CONTROL b/ports/moos-essential/CONTROL deleted file mode 100644 index 06cc1c0f0aa278..00000000000000 --- a/ports/moos-essential/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: moos-essential -Version: 10.0.1-1 -Description: a set of useful applications that leverage the core-moos communications layer. -Homepage: https://sites.google.com/site/moossoftware/ -Build-Depends: moos-core diff --git a/ports/moos-essential/portfile.cmake b/ports/moos-essential/portfile.cmake index f0a55923e8b6a1..daebe0f041e48f 100644 --- a/ports/moos-essential/portfile.cmake +++ b/ports/moos-essential/portfile.cmake @@ -1,19 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO themoos/essential-moos REF b897ea86dba8b61412dc48ac0cfb5ff34cdaf5f6 SHA512 7284744d211dcdcb0cd321eec96f3632ccda690e8894261f4f09a06bc8faefb2de68f4f2f755f4eeef5bb586044e98ac65cdd18c15193a1a4632bd2f4208c52f HEAD_REF master -) - -message(STATUS "MOOS Essential Source Path: ${SOURCE_PATH}") -message(STATUS "MOOS Essential CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}") - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix.patch + PATCHES + fix.patch ) vcpkg_configure_cmake( @@ -39,5 +31,3 @@ endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/fake_header.h "// fake header to pass vcpkg post install check \n") file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "see moos-core for copyright\n" ) -# -# diff --git a/ports/moos-essential/vcpkg.json b/ports/moos-essential/vcpkg.json new file mode 100644 index 00000000000000..48da1769f32a56 --- /dev/null +++ b/ports/moos-essential/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "moos-essential", + "version-string": "10.0.1", + "port-version": 3, + "description": "a set of useful applications that leverage the core-moos communications layer.", + "homepage": "https://sites.google.com/site/moossoftware/", + "dependencies": [ + "moos-core" + ] +} diff --git a/ports/moos-ui/CONTROL b/ports/moos-ui/CONTROL deleted file mode 100644 index 08279ce1547525..00000000000000 --- a/ports/moos-ui/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: moos-ui -Version: 10.0.1-1 -Description: set of user interface tools to use and leverage the MOOS project. -Homepage: https://sites.google.com/site/moossoftware/ -Build-Depends: moos-core - - diff --git a/ports/moos-ui/portfile.cmake b/ports/moos-ui/portfile.cmake index 3f4b880e266ca7..e3f0dd4ee5793e 100644 --- a/ports/moos-ui/portfile.cmake +++ b/ports/moos-ui/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO themoos/ui-moos @@ -19,19 +17,16 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/MOOS) -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/uPoke") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPoke ${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/iRemoteLite ${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite) +if (VCPKG_TARGET_IS_WINDOWS) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPoke.exe ${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/iRemoteLite.exe ${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite.exe) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPoke ${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/iRemoteLite ${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite) endif() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/MOOS) -# file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uMS ${CURRENT_PACKAGES_DIR}/tools/uMS) -# file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPlayback ${CURRENT_PACKAGES_DIR}/tools/uPlayback) -# file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pShare ${CURRENT_PACKAGES_DIR}/tools/pShare) -#endif() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug) -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug) file(WRITE ${CURRENT_PACKAGES_DIR}/include/fake_header_ui.h "// fake header to pass vcpkg post install check \n") file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "see moos-core for copyright\n" ) diff --git a/ports/moos-ui/vcpkg.json b/ports/moos-ui/vcpkg.json new file mode 100644 index 00000000000000..8dfc9307b86a60 --- /dev/null +++ b/ports/moos-ui/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "moos-ui", + "version-string": "10.0.1", + "port-version": 3, + "description": "set of user interface tools to use and leverage the MOOS project.", + "homepage": "https://sites.google.com/site/moossoftware/", + "dependencies": [ + "moos-core" + ] +} diff --git a/ports/morton-nd/CONTROL b/ports/morton-nd/CONTROL deleted file mode 100644 index 40065dbee4e7d1..00000000000000 --- a/ports/morton-nd/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: morton-nd -Version: 2.0.0 -Description: (C++14) header-only library for fast Morton encoding/decoding in N dimensions. diff --git a/ports/morton-nd/portfile.cmake b/ports/morton-nd/portfile.cmake index 63c8ee95fc3abe..bd2d6dd0018d0e 100644 --- a/ports/morton-nd/portfile.cmake +++ b/ports/morton-nd/portfile.cmake @@ -1,16 +1,30 @@ #header-only library -include(vcpkg_common_functions) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kevinhartman/morton-nd - REF v2.0.0 - SHA512 f349187a9c6094ebdc8dc10a0b028e119a82721946e2f629b3f64edade9665a97824d6a52496e470da61e5b65ae46c953346b271c2db11f5f2e3c7748de03daf - HEAD_REF master + REF v4.0.0 + SHA512 19dc51ae5d7fc868625a9c9f0dddec95a77fdeac714300033008f096bc3a83f146738e525e8a0ec541903263355a7fec84b1873d8eacfca4b93d3cd8945653da + HEAD_REF main +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF ) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/morton-nd) -file(COPY ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/morton-nd) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/morton-nd/LICENSE ${CURRENT_PACKAGES_DIR}/share/morton-nd/copyright) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/morton-nd/cmake TARGET_PATH) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/share/doc +) -file(GLOB HEADER_FILES ${SOURCE_PATH}/morton-nd/include/*.h) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/morton-nd) +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(COPY ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/morton-nd/vcpkg.json b/ports/morton-nd/vcpkg.json new file mode 100644 index 00000000000000..c1cc4907c291cf --- /dev/null +++ b/ports/morton-nd/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "morton-nd", + "version-string": "4.0.0", + "port-version": 1, + "description": "header-only constexpr library for fast Morton encoding/decoding in N dimensions.", + "homepage": "https://github.com/kevinhartman/morton-nd" +} diff --git a/ports/mosquitto/0001-add-archive-destination-to-install.patch b/ports/mosquitto/0001-add-archive-destination-to-install.patch new file mode 100644 index 00000000000000..5df6128edb6385 --- /dev/null +++ b/ports/mosquitto/0001-add-archive-destination-to-install.patch @@ -0,0 +1,39 @@ +From df5ec7ba4e7b1516a2636e47c33a4a6161b5c422 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:38:44 -0700 +Subject: [PATCH 1/5] add archive destination to install + +--- + lib/CMakeLists.txt | 2 +- + lib/cpp/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index e1521f1..bd60b75 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -87,7 +87,7 @@ set_target_properties(libmosquitto PROPERTIES + SOVERSION 1 + ) + +-install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + + if (WITH_STATIC_LIBRARIES) + add_library(libmosquitto_static STATIC ${C_SRC}) +diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt +index b39ac3f..5805244 100644 +--- a/lib/cpp/CMakeLists.txt ++++ b/lib/cpp/CMakeLists.txt +@@ -13,7 +13,7 @@ set_target_properties(mosquittopp PROPERTIES + VERSION ${VERSION} + SOVERSION 1 + ) +-install(TARGETS mosquittopp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(TARGETS mosquittopp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + + if (WITH_STATIC_LIBRARIES) + add_library(mosquittopp_static STATIC +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/0002-win64-support.patch b/ports/mosquitto/0002-win64-support.patch new file mode 100644 index 00000000000000..8698db81a5cc03 --- /dev/null +++ b/ports/mosquitto/0002-win64-support.patch @@ -0,0 +1,44 @@ +From 675ba1de6c01b4050ae3cc60916d3f0a72b03105 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:40:55 -0700 +Subject: [PATCH 2/5] win64 support + +--- + CMakeLists.txt | 7 +------ + config.h | 2 +- + 2 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e11959c..1a92fe3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,12 +57,7 @@ option(WITH_THREADING "Include client library threading support?" ON) + if (WITH_THREADING) + add_definitions("-DWITH_THREADING") + if (WIN32) +- if (CMAKE_CL_64) +- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x64\\pthreadVC2.lib) +- else (CMAKE_CL_64) +- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib) +- endif (CMAKE_CL_64) +- set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include) ++ find_package(pthread REQUIRED) + else (WIN32) + find_library(LIBPTHREAD pthread) + if (LIBPTHREAD) +diff --git a/config.h b/config.h +index 5cce39e..c673bf4 100644 +--- a/config.h ++++ b/config.h +@@ -31,7 +31,7 @@ + # define EPROTO ECONNABORTED + #endif + +-#ifdef WIN32 ++#ifdef _WIN32 + # ifndef strcasecmp + # define strcasecmp strcmpi + # endif +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/0003-add-find_package-libwebsockets.patch b/ports/mosquitto/0003-add-find_package-libwebsockets.patch new file mode 100644 index 00000000000000..b167b0da51f2a2 --- /dev/null +++ b/ports/mosquitto/0003-add-find_package-libwebsockets.patch @@ -0,0 +1,24 @@ +From 902ab5bf91937188d3ebf0aece81a704729e5580 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:42:53 -0700 +Subject: [PATCH 3/5] add find_package libwebsockets + +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1a92fe3..3c78b2c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,6 +45,7 @@ endif (WITH_TLS) + + option(WITH_SOCKS "Include SOCKS5 support?" ON) + if (WITH_SOCKS) ++ find_package(Libwebsockets CONFIG REQUIRED) + add_definitions("-DWITH_SOCKS") + endif (WITH_SOCKS) + +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/0004-support-static-build.patch b/ports/mosquitto/0004-support-static-build.patch new file mode 100644 index 00000000000000..55606e7d5de29e --- /dev/null +++ b/ports/mosquitto/0004-support-static-build.patch @@ -0,0 +1,51 @@ +From 4bb19e77e95bc505d32e098190ffbf056810017c Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:44:42 -0700 +Subject: [PATCH 4/5] support static build + +--- + lib/CMakeLists.txt | 2 +- + src/CMakeLists.txt | 8 ++++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index bd60b75..cc01a2a 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -60,7 +60,7 @@ if (UNIX AND NOT APPLE) + endif (UNIX AND NOT APPLE) + + if (WIN32) +- set (LIBRARIES ${LIBRARIES} ws2_32) ++ set (LIBRARIES ${LIBRARIES} ws2_32 crypt32) + endif (WIN32) + + if (WITH_SRV) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 7898ff5..f066aea 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -158,7 +158,7 @@ if (UNIX) + endif (UNIX) + + if (WIN32) +- set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32) ++ set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32 crypt32) + endif (WIN32) + + if (WITH_WEBSOCKETS) +@@ -189,6 +189,10 @@ install(FILES mosquitto_broker.h mosquitto_plugin.h DESTINATION "${CMAKE_INSTALL + + if (WITH_TLS) + add_executable(mosquitto_passwd mosquitto_passwd.c) +- target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES}) ++ if(WIN32) ++ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES} ws2_32 crypt32) ++ else() ++ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES}) ++ endif() + install(TARGETS mosquitto_passwd RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + endif (WITH_TLS) +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/0005-add-mach.h-include.patch b/ports/mosquitto/0005-add-mach.h-include.patch new file mode 100644 index 00000000000000..b01ff534b04608 --- /dev/null +++ b/ports/mosquitto/0005-add-mach.h-include.patch @@ -0,0 +1,27 @@ +From af7d62dceb064b5a8458616536bc27329ad236b1 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:46:06 -0700 +Subject: [PATCH 5/5] add mach.h include + +--- + lib/mosquitto.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/mosquitto.c b/lib/mosquitto.c +index 795013e..cd00513 100644 +--- a/lib/mosquitto.c ++++ b/lib/mosquitto.c +@@ -33,6 +33,10 @@ Contributors: + #include "packet_mosq.h" + #include "will_mosq.h" + ++#if defined(__APPLE__) ++#include ++#endif ++ + + void mosquitto__destroy(struct mosquitto *mosq); + +-- +2.24.3 (Apple Git-128) + diff --git a/ports/mosquitto/CONTROL b/ports/mosquitto/CONTROL deleted file mode 100644 index 1a72c19fc42f14..00000000000000 --- a/ports/mosquitto/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: mosquitto -Version: 1.6.2-2 -Build-Depends: c-ares, libwebsockets, openssl, pthreads -Description: Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1. - MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for "machine to machine" messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino. -Homepage: https://mosquitto.org/download/ diff --git a/ports/mosquitto/archive-dest.patch b/ports/mosquitto/archive-dest.patch deleted file mode 100644 index 11a9ccce4deea1..00000000000000 --- a/ports/mosquitto/archive-dest.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 221c230..1bd4e96 100644 ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -89,7 +89,7 @@ set_target_properties(libmosquitto PROPERTIES - SOVERSION 1 - ) - --install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") -+install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") - - if (WITH_STATIC_LIBRARIES) - add_library(libmosquitto_static STATIC ${C_SRC}) diff --git a/ports/mosquitto/portfile.cmake b/ports/mosquitto/portfile.cmake index 901e80fd751e44..bf832107b73e99 100644 --- a/ports/mosquitto/portfile.cmake +++ b/ports/mosquitto/portfile.cmake @@ -1,16 +1,15 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO eclipse/mosquitto - REF f825d4bb5e9f4fc5dc62ad09f895c87800d0f579 - SHA512 cd94236d5673f7e5a992d1e866afe2ccb496dfb7cc24e53808caed603bc8e899ca12857a16eac58ac7ab7235a849b6e2528c55e0debf651ef76dcebef75e7df9 + REF e55f7facce7628b33e57d6b44cc8e9dd1042e624 # v1.6.8 + SHA512 c192b53f52ce9dc8e02d31acd9e93c00cafbe543b038d7619e6b653f102126872bbd485c94604bca9287e71a5dfe0de2f4d8d3f51cdd5c37f90fd2a6535bd89b HEAD_REF master PATCHES - archive-dest.patch - win64-cmake.patch + 0001-add-archive-destination-to-install.patch + 0002-win64-support.patch + 0003-add-find_package-libwebsockets.patch + 0004-support-static-build.patch + 0005-add-mach.h-include.patch ) vcpkg_configure_cmake( @@ -35,26 +34,20 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_passwd${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_passwd${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_pub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_pub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_rr${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_rr${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_sub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_sub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_passwd${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_passwd${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_pub${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_pub${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_rr${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_rr${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_sub${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_sub${EXECUTABLE_SUFFIX}) - -#if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - endif() -#endif() +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/mosquitto RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mosquitto/usage b/ports/mosquitto/usage new file mode 100644 index 00000000000000..1f4e6735c12c5e --- /dev/null +++ b/ports/mosquitto/usage @@ -0,0 +1,5 @@ +The package mosquitto provides CMake targets: + + find_package(mosquitto REQUIRED) + target_include_directories(main PRIVATE ${MOSQUITTO_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${MOSQUITTO_LIBRARIES}) diff --git a/ports/mosquitto/vcpkg-cmake-wrapper.cmake b/ports/mosquitto/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..ad8124c677974e --- /dev/null +++ b/ports/mosquitto/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,15 @@ +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +find_path(MOSQUITTO_INCLUDE_DIR mosquitto.h) + +find_library(MOSQUITTO_LIBRARY_DEBUG NAMES mosquitto libmosquitto NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(MOSQUITTO_LIBRARY_RELEASE NAMES mosquitto libmosquitto NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) +find_library(MOSQUITTOPP_LIBRARY_DEBUG NAMES mosquittopp libmosquittopp NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(MOSQUITTOPP_LIBRARY_RELEASE NAMES mosquittopp libmosquittopp NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(MOSQUITTO) +select_library_configurations(MOSQUITTOPP) + +set(MOSQUITTO_INCLUDE_DIRS ${MOSQUITTO_INCLUDE_DIR}) +set(MOSQUITTO_LIBRARIES ${MOSQUITTO_LIBRARY} ${MOSQUITTOPP_LIBRARY}) diff --git a/ports/mosquitto/vcpkg.json b/ports/mosquitto/vcpkg.json new file mode 100644 index 00000000000000..4f0c6163406475 --- /dev/null +++ b/ports/mosquitto/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "mosquitto", + "version-string": "1.6.8", + "port-version": 3, + "description": "Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1, MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model, This makes it suitable for machine to machine messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino", + "homepage": "https://mosquitto.org/download/", + "dependencies": [ + "c-ares", + "libwebsockets", + "openssl", + "pthreads" + ] +} diff --git a/ports/mosquitto/win64-cmake.patch b/ports/mosquitto/win64-cmake.patch deleted file mode 100644 index 9105c403f4b9c1..00000000000000 --- a/ports/mosquitto/win64-cmake.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e58d072..e582a25 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -54,12 +54,7 @@ option(WITH_THREADING "Include client library threading support?" ON) - if (WITH_THREADING) - add_definitions("-DWITH_THREADING") - if (WIN32) -- if (CMAKE_CL_64) -- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x64\\pthreadVC2.lib) -- else (CMAKE_CL_64) -- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib) -- endif (CMAKE_CL_64) -- set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include) -+ find_package(pthread REQUIRED) - else (WIN32) - find_library(LIBPTHREAD pthread) - if (LIBPTHREAD) -diff --git a/config.h b/config.h -index b7a7616..bceb92a 100644 ---- a/config.h -+++ b/config.h -@@ -27,7 +27,7 @@ - # define EPROTO ECONNABORTED - #endif - --#ifdef WIN32 -+#if defined(WIN32) || defined(WIN64) - # ifndef strcasecmp - # define strcasecmp strcmpi - # endif -diff --git a/lib/net_mosq.h b/lib/net_mosq.h -index b843ebe..8c077eb 100644 ---- a/lib/net_mosq.h -+++ b/lib/net_mosq.h -@@ -20,6 +20,9 @@ Contributors: - #include - #else - #include -+#if defined(_MSC_VER) && _MSC_VER > 1900 -+#undef ssize_t -+#endif - typedef SSIZE_T ssize_t; - #endif - diff --git a/ports/mozjpeg/CONTROL b/ports/mozjpeg/CONTROL deleted file mode 100644 index 2f786a1c21c7db..00000000000000 --- a/ports/mozjpeg/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mozjpeg -Version: 3.2-3 -Homepage: https://github.com/mozilla/mozjpeg -Description: MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg. diff --git a/ports/mozjpeg/fix-install-error.patch b/ports/mozjpeg/fix-install-error.patch index 677ce9337d0056..0d0a283652a6c2 100644 --- a/ports/mozjpeg/fix-install-error.patch +++ b/ports/mozjpeg/fix-install-error.patch @@ -1,87 +1,33 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ac0ebdb..483bf0f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -875,43 +875,51 @@ add_custom_target(installer - cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND} - SOURCES mozjpeg.nsi) - -+if(CMAKE_BUILD_TYPE STREQUAL "Debug") -+ set(REAL_BUILDS_PATH "Debug/") -+else() -+ set(REAL_BUILDS_PATH "Release/") -+endif() -+ - if(WITH_TURBOJPEG) - if(ENABLE_SHARED) - install(TARGETS turbojpeg tjbench -- ARCHIVE DESTINATION lib -- LIBRARY DESTINATION lib -- RUNTIME DESTINATION bin) -+ ARCHIVE DESTINATION lib/mozjpeg -+ LIBRARY DESTINATION lib/mozjpeg -+ RUNTIME DESTINATION tools/mozjpeg) - endif() - if(ENABLE_STATIC) -- install(TARGETS turbojpeg-static ARCHIVE DESTINATION lib) -+ install(TARGETS turbojpeg-static -+ LIBRARY DESTINATION lib/mozjpeg -+ ARCHIVE DESTINATION lib/mozjpeg) - if(NOT ENABLE_SHARED) -- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tjbench-static.exe -- DESTINATION bin RENAME tjbench.exe) -+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/tjbench-static.exe -+ DESTINATION tools/mozjpeg RENAME tjbench.exe) - endif() - endif() -- install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include) -+ install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include/mozjpeg) - endif() - - if(ENABLE_STATIC) -- install(TARGETS jpeg-static ARCHIVE DESTINATION lib) -+ install(TARGETS jpeg-static ARCHIVE DESTINATION lib/mozjpeg) - if(NOT ENABLE_SHARED) -- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static.exe -- DESTINATION bin RENAME cjpeg.exe) -- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static.exe -- DESTINATION bin RENAME djpeg.exe) -- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jpegtran-static.exe -- DESTINATION bin RENAME jpegtran.exe) -+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/cjpeg-static.exe -+ DESTINATION tools/mozjpeg RENAME cjpeg.exe) -+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/djpeg-static.exe -+ DESTINATION tools/mozjpeg RENAME djpeg.exe) -+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/jpegtran-static.exe -+ DESTINATION tools/mozjpeg RENAME jpegtran.exe) - endif() - endif() - --install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION bin) -+install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION tools/mozjpeg) - - install(FILES ${CMAKE_SOURCE_DIR}/README.ijg ${CMAKE_SOURCE_DIR}/README-mozilla.txt - ${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt - ${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt - ${CMAKE_SOURCE_DIR}/wizard.txt -- DESTINATION doc) -+ DESTINATION share/mozjpeg) - - install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h - ${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h -- DESTINATION include) -+ DESTINATION include/mozjpeg) -diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt -index 268cc14..d067d2a 100644 ---- a/sharedlib/CMakeLists.txt -+++ b/sharedlib/CMakeLists.txt -@@ -68,6 +68,6 @@ add_executable(jcstest ../jcstest.c) - target_link_libraries(jcstest jpeg) - - install(TARGETS jpeg cjpeg djpeg jpegtran -- ARCHIVE DESTINATION lib -- LIBRARY DESTINATION lib -- RUNTIME DESTINATION bin) -+ ARCHIVE DESTINATION lib/mozjpeg -+ LIBRARY DESTINATION lib/mozjpeg -+ RUNTIME DESTINATION tools/mozjpeg) +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1369,13 +1369,13 @@ + ############################################################################### + + set(EXE ${CMAKE_EXECUTABLE_SUFFIX}) + + if(WITH_TURBOJPEG) + if(ENABLE_SHARED) +- install(TARGETS turbojpeg tjbench ++ install(TARGETS turbojpeg #tjbench + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND + CMAKE_C_LINKER_SUPPORTS_PDB) + install(FILES "$" +@@ -1413,13 +1413,13 @@ + DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME djpeg${EXE}) + install(PROGRAMS ${DIR}/jpegtran-static${EXE} + DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME jpegtran${EXE}) + endif() + endif() + +-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++#install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg + ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt + ${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c + ${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt + ${CMAKE_CURRENT_SOURCE_DIR}/structure.txt diff --git a/ports/mozjpeg/portfile.cmake b/ports/mozjpeg/portfile.cmake index d771fd20534b76..b5095a9adadc6e 100644 --- a/ports/mozjpeg/portfile.cmake +++ b/ports/mozjpeg/portfile.cmake @@ -1,10 +1,12 @@ -include(vcpkg_common_functions) +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/libjpeg-turbo/copyright") + message(FATAL_ERROR "Can't build ${PORT} if libjpeg-turbo is installed. Please remove libjpeg-turbo:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mozilla/mozjpeg - REF v3.2 - SHA512 d14789827a9f4f78139a3945d3169d37eb891758b5ab40ef19e99ebebb2fb6d7c3a05495de245bba54cfd913b153af352159aa9fc0218127f97819137e0f1ab8 + REF 6d95c51adf0c314017f541b6cb07e13cc1bce754 + SHA512 a21c8b3a561b387933a27befaa1d05a8c63b0e203d72d73071a4c9b57c6b7d57b44836f211c4dcb80eee4b01876f0a0fb4c91a60c3ae867e906e5e4e27165627 HEAD_REF master PATCHES fix-install-error.patch @@ -12,41 +14,48 @@ vcpkg_from_github( vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(ENABLE_STATIC_BUILD ON) - set(ENABLE_SHARED_BUILD OFF) -else() - set(ENABLE_STATIC_BUILD OFF) - set(ENABLE_SHARED_BUILD ON) -endif() +vcpkg_add_to_path(${NASM_EXE_PATH}) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DDENABLE_SHARED=${ENABLE_SHARED_BUILD} - -DENABLE_STATIC=${ENABLE_STATIC_BUILD} + -DENABLE_SHARED=${ENABLE_SHARED} + -DENABLE_STATIC=${ENABLE_STATIC} -DWITH_CRT_DLL=${WITH_CRT_DLL} ) vcpkg_install_cmake() -#remove extra debug files +# Rename libraries for static builds +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/jpeg.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/turbojpeg.lib") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg.lib") + endif() +endif() + +# Remove extra debug files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/mozjpeg) +vcpkg_copy_tools(TOOL_NAMES cjpeg djpeg jpegtran AUTO_CLEAN) +vcpkg_fixup_pkgconfig() -#remove empty folders after static build +# Remove empty folders after static build if (VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mozjpeg RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/mozjpeg/vcpkg.json b/ports/mozjpeg/vcpkg.json new file mode 100644 index 00000000000000..605abca1c253dc --- /dev/null +++ b/ports/mozjpeg/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "mozjpeg", + "version-string": "2020-06-02", + "port-version": 3, + "description": "MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg.", + "homepage": "https://github.com/mozilla/mozjpeg", + "dependencies": [ + "libpng" + ] +} diff --git a/ports/mp-units/cmake.patch b/ports/mp-units/cmake.patch new file mode 100644 index 00000000000000..d5a57ce8b8c5c9 --- /dev/null +++ b/ports/mp-units/cmake.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b18a30a96..d89248aa1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,14 +40,24 @@ conan_init(cmake) + add_subdirectory(src) + + # set restrictive compilation warnings +-set_warnings(mp-units) ++# set_warnings(mp-units) + + # add unit tests +-enable_testing() +-add_subdirectory(test) ++option(BUILD_TESTING "Build tests" OFF) ++if(BUILD_TESTING) ++ set_warnings(mp-units) ++ enable_testing() ++ add_subdirectory(test) ++endif() + + # add usage example +-add_subdirectory(example) +- ++option(BUILD_EXAMPLES "Build usage examples" OFF) ++if(BUILD_EXAMPLES) ++ add_subdirectory(example) ++endif() + # generate project documentation +-add_subdirectory(docs) ++ ++option(BUILD_DOCS "Generate docs" OFF) ++if(BUILD_DOCS) ++ add_subdirectory(docs) ++endif() diff --git a/ports/mp-units/config.patch b/ports/mp-units/config.patch new file mode 100644 index 00000000000000..5bd81c927aa088 --- /dev/null +++ b/ports/mp-units/config.patch @@ -0,0 +1,9 @@ +diff --git a/cmake/common/simple-config.cmake.in b/cmake/common/simple-config.cmake.in +index f40ebfa88..d521e0ba8 100644 +--- a/cmake/common/simple-config.cmake.in ++++ b/cmake/common/simple-config.cmake.in +@@ -1 +1,4 @@ ++include(CMakeFindDependencyMacro) ++find_dependency(fmt CONFIG) ++find_dependency(Microsoft.GSL CONFIG) + include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") diff --git a/ports/mp-units/portfile.cmake b/ports/mp-units/portfile.cmake new file mode 100644 index 00000000000000..1200c171976114 --- /dev/null +++ b/ports/mp-units/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mpusz/units + REF 33ad51311b835efb7f7767473f971c02a3140073 + SHA512 18c9a4bb1812d7ab59e86d3eef5f62aa760c8f78eac81086bd3b25f7e2d359f2fba71b0298cf91ecb31dbe13846f2e5ce75133b0db534020102b788dd1c1a1da + PATCHES + cmake.patch + config.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +# Handle copyright/readme/package files +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" + "${CURRENT_PACKAGES_DIR}/lib") # Header only \ No newline at end of file diff --git a/ports/mp-units/vcpkg.json b/ports/mp-units/vcpkg.json new file mode 100644 index 00000000000000..34ca3b8f0540c8 --- /dev/null +++ b/ports/mp-units/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "mp-units", + "version-string": "0.6.0", + "port-version": 1, + "description": "mp-units - A Units Library for C++", + "homepage": "https://github.com/mpusz/units", + "dependencies": [ + "fmt", + "ms-gsl" + ] +} diff --git a/ports/mp3lame/00001-msvc-upgrade-solution-up-to-vc11.patch b/ports/mp3lame/00001-msvc-upgrade-solution-up-to-vc11.patch new file mode 100644 index 00000000000000..07778093b79703 --- /dev/null +++ b/ports/mp3lame/00001-msvc-upgrade-solution-up-to-vc11.patch @@ -0,0 +1,1018 @@ +diff --git a/vc_solution/arch_nasm.props b/vc_solution/arch_nasm.props +new file mode 100644 +index 0000000..13174c9 +--- /dev/null ++++ b/vc_solution/arch_nasm.props +@@ -0,0 +1,15 @@ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ TAKEHIRO_IEEE754_HACK;HAVE_NASM;MMX_choose_table;%(PreprocessorDefinitions) ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/arch_sse2.props b/vc_solution/arch_sse2.props +new file mode 100644 +index 0000000..1f97d57 +--- /dev/null ++++ b/vc_solution/arch_sse2.props +@@ -0,0 +1,17 @@ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ HAVE_XMMINTRIN_H;MIN_ARCH_SSE;%(PreprocessorDefinitions) ++ StreamingSIMDExtensions2 ++ Fast ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/arch_x87.props b/vc_solution/arch_x87.props +new file mode 100644 +index 0000000..3268c6b +--- /dev/null ++++ b/vc_solution/arch_x87.props +@@ -0,0 +1,15 @@ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ TAKEHIRO_IEEE754_HACK;%(PreprocessorDefinitions) ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_lame.sln b/vc_solution/vc11_lame.sln +new file mode 100644 +index 0000000..9453bb0 +--- /dev/null ++++ b/vc_solution/vc11_lame.sln +@@ -0,0 +1,41 @@ ++ ++Microsoft Visual Studio Solution File, Format Version 12.00 ++# Visual Studio 2012 ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lame", "vc11_lame_lame.vcxproj", "{EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}" ++ ProjectSection(ProjectDependencies) = postProject ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2} = {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2} ++ EndProjectSection ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp3lame-static", "vc11_libmp3lame.vcxproj", "{20536101-3B0E-43EF-94F9-080D595DAC57}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp3lame", "vc11_libmp3lame_dll.vcxproj", "{92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpghip-static", "vc11_mpglib.vcxproj", "{E2DAB91A-8248-4625-8A85-2C2C2A390DD8}" ++EndProject ++Global ++ GlobalSection(SolutionConfigurationPlatforms) = preSolution ++ Debug|Win32 = Debug|Win32 ++ Release|Win32 = Release|Win32 ++ EndGlobalSection ++ GlobalSection(ProjectConfigurationPlatforms) = postSolution ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}.Debug|Win32.Build.0 = Debug|Win32 ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}.Release|Win32.ActiveCfg = Release|Win32 ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}.Release|Win32.Build.0 = Release|Win32 ++ {20536101-3B0E-43EF-94F9-080D595DAC57}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {20536101-3B0E-43EF-94F9-080D595DAC57}.Debug|Win32.Build.0 = Debug|Win32 ++ {20536101-3B0E-43EF-94F9-080D595DAC57}.Release|Win32.ActiveCfg = Release|Win32 ++ {20536101-3B0E-43EF-94F9-080D595DAC57}.Release|Win32.Build.0 = Release|Win32 ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Debug|Win32.Build.0 = Debug|Win32 ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Release|Win32.ActiveCfg = Release|Win32 ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Release|Win32.Build.0 = Release|Win32 ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8}.Debug|Win32.Build.0 = Debug|Win32 ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8}.Release|Win32.ActiveCfg = Release|Win32 ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8}.Release|Win32.Build.0 = Release|Win32 ++ EndGlobalSection ++ GlobalSection(SolutionProperties) = preSolution ++ HideSolutionNode = FALSE ++ EndGlobalSection ++EndGlobal +diff --git a/vc_solution/vc11_lame_config.props b/vc_solution/vc11_lame_config.props +new file mode 100644 +index 0000000..fd60017 +--- /dev/null ++++ b/vc_solution/vc11_lame_config.props +@@ -0,0 +1,32 @@ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ $(SolutionDir)..\output\$(Configuration)\ ++ $(SolutionDir)..\obj\$(Configuration)\$(ProjectName)\ ++ false ++ ++ ++ ++ $(IntDir)$(ProjectName).bsc ++ ++ ++ _CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATED;%(PreprocessorDefinitions) ++ true ++ true ++ $(IntDir) ++ true ++ Level4 ++ 4995;4996;%(DisableSpecificWarnings) ++ ++ ++ $(OutDir);%(AdditionalLibraryDirectories) ++ $(OutDir)$(TargetName).pdb ++ true ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_lame_lame.vcxproj b/vc_solution/vc11_lame_lame.vcxproj +new file mode 100644 +index 0000000..faf101a +--- /dev/null ++++ b/vc_solution/vc11_lame_lame.vcxproj +@@ -0,0 +1,128 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ lame ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38} ++ lame ++ ++ ++ ++ Application ++ v110 ++ false ++ ++ ++ Application ++ v110 ++ false ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ ..\output\Debug/lame.tlb ++ ++ ++ ++ Disabled ++ ../;../mpglib;../libmp3lame;../include;%(AdditionalIncludeDirectories) ++ _DEBUG;WIN32;_WIN32;_CONSOLE;_WINDOWS;HAVE_MPGLIB;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ ProgramDatabase ++ ++ ++ _DEBUG;_APP=$(TargetFileName);%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ $(OutDir)lame.exe ++ true ++ Console ++ false ++ /APPCONTAINER /machine:x86 %(AdditionalOptions) ++ NotSet ++ ++ ++ ++ ++ ..\output\Release/lame.tlb ++ ++ ++ ++ Full ++ AnySuitable ++ true ++ Speed ++ ..;../mpglib;../libmp3lame;../include;../;%(AdditionalIncludeDirectories) ++ NDEBUG;WIN32;_WIN32;_CONSOLE;_WINDOWS;HAVE_MPGLIB;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ ++ ++ NDEBUG;_APP=$(TargetFileName);%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ $(OutDir)lame.exe ++ Console ++ false ++ /APPCONTAINER /machine:x86 %(AdditionalOptions) ++ NotSet ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {20536101-3b0e-43ef-94f9-080d595dac57} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_libmp3lame.vcxproj b/vc_solution/vc11_libmp3lame.vcxproj +new file mode 100644 +index 0000000..d4636b0 +--- /dev/null ++++ b/vc_solution/vc11_libmp3lame.vcxproj +@@ -0,0 +1,188 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ libmp3lame-static ++ {20536101-3B0E-43EF-94F9-080D595DAC57} ++ libmp3lame ++ ++ ++ ++ StaticLibrary ++ v110 ++ false ++ ++ ++ StaticLibrary ++ v110 ++ false ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ Full ++ AnySuitable ++ true ++ Speed ++ ../mpglib;../include;..;%(AdditionalIncludeDirectories) ++ NDEBUG;_WINDOWS;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ ++ ++ 0x0409 ++ ++ ++ $(OutDir)libmp3lame-static.lib ++ ++ ++ ++ ++ Disabled ++ ../mpglib;../include;..;%(AdditionalIncludeDirectories) ++ _DEBUG;_WINDOWS;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ $(OutDir)$(TargetName).pdb ++ OldStyle ++ ++ ++ 0x0409 ++ ++ ++ $(OutDir)libmp3lame-static.lib ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Level1 ++ Level1 ++ ++ ++ ++ ++ ++ ++ ++ ../libmp3lame;%(AdditionalIncludeDirectories) ++ ../libmp3lame;%(AdditionalIncludeDirectories) ++ ++ ++ ++ ++ ++ Performing Custom Build Step on %(Filename) ++ copy ..\configMS.h ..\config.h ++ ++ ..\config.h;%(Outputs) ++ Performing Custom Build Step on %(Filename) ++ copy ..\configMS.h ..\config.h ++ ++ ..\config.h;%(Outputs) ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ ++ ++ {e2dab91a-8248-4625-8a85-2c2c2a390dd8} ++ false ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_libmp3lame_dll.vcxproj b/vc_solution/vc11_libmp3lame_dll.vcxproj +new file mode 100644 +index 0000000..9dad9d5 +--- /dev/null ++++ b/vc_solution/vc11_libmp3lame_dll.vcxproj +@@ -0,0 +1,125 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ libmp3lame ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2} ++ libmp3lameDLL ++ ++ ++ ++ DynamicLibrary ++ v110 ++ false ++ ++ ++ DynamicLibrary ++ v110 ++ false ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ ..\output\Release/libmp3lame_dll.tlb ++ ++ ++ ++ Full ++ AnySuitable ++ true ++ Speed ++ ../libmp3lame;../;../mpglib;../include;..;%(AdditionalIncludeDirectories) ++ NDEBUG;_WINDOWS;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ ++ ++ _VC80_UPGRADE=0x0600;_DLL=$(TargetFileName);%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ false ++ ++ ++ $(OutDir)libmp3lame.dll ++ ..\include\lame.def ++ $(OutDir)libmp3lame.lib ++ /APPCONTAINER /machine:x86 %(AdditionalOptions) ++ false ++ NotSet ++ ++ ++ ++ ++ ..\output\Debug/libmp3lame_dll.tlb ++ ++ ++ ++ Disabled ++ ../libmp3lame;../;../mpglib;../include;..;%(AdditionalIncludeDirectories) ++ _DEBUG;_WINDOWS;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ ProgramDatabase ++ ++ ++ _VC80_UPGRADE=0x0600;_DLL=$(TargetFileName);_DEBUG;%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ false ++ ++ ++ $(OutDir)libmp3lame.dll ++ ..\include\lame.def ++ true ++ $(OutDir)libmp3lame.lib ++ /APPCONTAINER /machine:x86 %(AdditionalOptions) ++ false ++ NotSet ++ ++ ++ ++ ++ true ++ true ++ ++ ++ ++ ++ ++ ++ ++ {20536101-3b0e-43ef-94f9-080d595dac57} ++ false ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_mpglib.vcxproj b/vc_solution/vc11_mpglib.vcxproj +new file mode 100644 +index 0000000..a455bca +--- /dev/null ++++ b/vc_solution/vc11_mpglib.vcxproj +@@ -0,0 +1,116 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ libmpghip-static ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8} ++ libmpghip ++ ++ ++ ++ StaticLibrary ++ v110 ++ false ++ ++ ++ StaticLibrary ++ v110 ++ false ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ Full ++ AnySuitable ++ true ++ Speed ++ ../libmp3lame;../include;..;%(AdditionalIncludeDirectories) ++ NDEBUG;HAVE_MPGLIB;_WINDOWS;USE_LAYER_2;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ ++ ++ 0x0409 ++ ++ ++ $(OutDir)libmpghip-static.lib ++ ++ ++ ++ ++ Disabled ++ ../libmp3lame;../include;..;%(AdditionalIncludeDirectories) ++ _DEBUG;_WINDOWS;USE_LAYER_2;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ $(OutDir)$(TargetName).pdb ++ OldStyle ++ ++ ++ 0x0409 ++ ++ ++ $(OutDir)libmpghip-static.lib ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Performing Custom Build Step on %(Filename) ++ copy ..\configMS.h ..\config.h ++ ++ ..\config.h;%(Outputs) ++ Performing Custom Build Step on %(Filename) ++ copy ..\configMS.h ..\config.h ++ ++ ..\config.h;%(Outputs) ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_nasm.props b/vc_solution/vc11_nasm.props +new file mode 100644 +index 0000000..0f8542f +--- /dev/null ++++ b/vc_solution/vc11_nasm.props +@@ -0,0 +1,24 @@ ++ ++ ++ ++ Midl ++ CustomBuild ++ ++ ++ _SelectedFiles;$(NASMDependsOn) ++ ++ ++ ++ $(IntDir)%(Filename).obj ++ win32 ++ %(RootDir)%(Directory) ++ WIN32 ++ nasmw [BinFormat] [IncludeDir] [Defines] -o [OutFile] %(FullPath) ++ [OutFile] ++ Assembling %(Filename)... ++ false ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_nasm.targets b/vc_solution/vc11_nasm.targets +new file mode 100644 +index 0000000..3158d8d +--- /dev/null ++++ b/vc_solution/vc11_nasm.targets +@@ -0,0 +1,85 @@ ++ ++ ++ ++ ++ ++ _NASM ++ ++ ++ ++ $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml ++ ++ ++ ++ ++ ++ ++ ++ @(NASM, '|') ++ ++ ++ ++ ++ ++ ++ ++ ++ $(ComputeLinkInputsTargets); ++ ComputeNASMOutput; ++ ++ ++ $(ComputeLibInputsTargets); ++ ComputeNASMOutput; ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_nasm.xml b/vc_solution/vc11_nasm.xml +new file mode 100644 +index 0000000..390d570 +--- /dev/null ++++ b/vc_solution/vc11_nasm.xml +@@ -0,0 +1,149 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ General ++ ++ ++ ++ ++ Command Line ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Execute Before ++ ++ ++ Specifies the targets for the build customization to run before. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Execute After ++ ++ ++ Specifies the targets for the build customization to run after. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Additional Options ++ ++ ++ Additional Options ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file diff --git a/ports/mp3lame/Config.cmake.in b/ports/mp3lame/Config.cmake.in new file mode 100644 index 00000000000000..9630b9ea1a21ee --- /dev/null +++ b/ports/mp3lame/Config.cmake.in @@ -0,0 +1,60 @@ + +get_filename_component(_mp3lame_root "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_mp3lame_root "${_mp3lame_root}" PATH) +get_filename_component(_mp3lame_root "${_mp3lame_root}" PATH) + +set(_mp3lame_rel_lib "${_mp3lame_root}/lib/@MP3LAME_LIB@") +set(_mp3lame_dbg_lib "${_mp3lame_root}/debug/lib/@MP3LAME_LIB@") + +if (EXISTS "${_mp3lame_rel_lib}" OR EXISTS "${_mp3lame_dbg_lib}") + + add_library(mp3lame::mp3lame UNKNOWN IMPORTED) + set_target_properties(mp3lame::mp3lame + PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_mp3lame_root}/include") + + if (EXISTS "${_mp3lame_rel_lib}") + set_target_properties(mp3lame::mp3lame + PROPERTIES IMPORTED_LOCATION_RELEASE "${_mp3lame_rel_lib}") + set_property(TARGET mp3lame::mp3lame APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + endif() + if (EXISTS "${_mp3lame_dbg_lib}") + set_target_properties(mp3lame::mp3lame + PROPERTIES IMPORTED_LOCATION_DEBUG "${_mp3lame_dbg_lib}") + set_property(TARGET mp3lame::mp3lame APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + endif() + + set(_mp3lame_mpghip_rel_lib "${_mp3lame_root}/lib/libmpghip-static.lib") + set(_mp3lame_mpghip_dbg_lib "${_mp3lame_root}/debug/lib/libmpghip-static.lib") + + if (EXISTS "${_mp3lame_mpghip_rel_lib}" OR EXISTS "${_mp3lame_mpghip_dbg_lib}") + + add_library(mp3lame::mpghip UNKNOWN IMPORTED) + + if (EXISTS "${_mp3lame_rel_lib}") + set_target_properties(mp3lame::mpghip + PROPERTIES IMPORTED_LOCATION_RELEASE "${_mp3lame_mpghip_rel_lib}") + set_property(TARGET mp3lame::mpghip APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + endif() + if (EXISTS "${_mp3lame_dbg_lib}") + set_target_properties(mp3lame::mpghip + PROPERTIES IMPORTED_LOCATION_DEBUG "${_mp3lame_mpghip_dbg_lib}") + set_property(TARGET mp3lame::mpghip APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + endif() + + set_target_properties(mp3lame::mp3lame PROPERTIES INTERFACE_LINK_LIBRARIES mp3lame::mpghip) + + endif() + + unset(_mp3lame_mpghip_rel_lib) + unset(_mp3lame_mpghip_dbg_lib) + +else() + + set(mp3lame_FOUND FALSE) + +endif() + +unset(_mp3lame_rel_lib) +unset(_mp3lame_dbg_lib) + +unset(_mp3lame_root) diff --git a/ports/mp3lame/portfile.cmake b/ports/mp3lame/portfile.cmake new file mode 100644 index 00000000000000..f30f9e2cbac62d --- /dev/null +++ b/ports/mp3lame/portfile.cmake @@ -0,0 +1,120 @@ +set(VERSION 3.100) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO lame/lame + REF ${VERSION} + FILENAME "lame-${VERSION}.tar.gz" + SHA512 0844b9eadb4aacf8000444621451277de365041cc1d97b7f7a589da0b7a23899310afd4e4d81114b9912aa97832621d20588034715573d417b2923948c08634b + PATCHES + 00001-msvc-upgrade-solution-up-to-vc11.patch + remove_lame_init_old_from_symbol_list.patch # deprecated https://github.com/zlargon/lame/blob/master/include/lame.h#L169 +) + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(platform "ARM64") + set(machine "ARM64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(platform "ARM") + set(machine "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(platform "x64") + set(machine "x64") + else() + set(platform "Win32") + set(machine "x86") + endif() + + file(READ "${SOURCE_PATH}/vc_solution/vc11_lame.sln" sln_con) + string(REPLACE "|Win32" "|${platform}" sln_con "${sln_con}") + string(REPLACE "\"vc11_" "\"${machine}_vc11_" sln_con "${sln_con}") + file(WRITE "${SOURCE_PATH}/vc_solution/${machine}_vc11_lame.sln" "${sln_con}") + + + file(GLOB vcxprojs RELATIVE "${SOURCE_PATH}/vc_solution" "${SOURCE_PATH}/vc_solution/vc11_*.vcxproj") + foreach(vcxproj ${vcxprojs}) + file(READ "${SOURCE_PATH}/vc_solution/${vcxproj}" vcxproj_con) + + if(NOT VCPKG_CRT_LINKAGE STREQUAL dynamic) + string(REPLACE "DLL" "" vcxproj_con "${vcxproj_con}") + endif() + + string(REPLACE "/machine:x86" "/machine:${machine}" vcxproj_con "${vcxproj_con}") + string(REPLACE "Win32" "${platform}" vcxproj_con "${vcxproj_con}") + string(REPLACE "|Win32" "|${platform}" vcxproj_con "${vcxproj_con}") + string(REPLACE "Include=\"vc11_" "Include=\"${machine}_vc11_" vcxproj_con "${vcxproj_con}") + + if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + string(REPLACE "/APPCONTAINER" "" vcxproj_con "${vcxproj_con}") + endif() + + file(WRITE "${SOURCE_PATH}/vc_solution/${machine}_${vcxproj}" "${vcxproj_con}") + endforeach() + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH "vc_solution/${machine}_vc11_lame.sln" + TARGET "lame" + PLATFORM "${platform}" + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmp3lame.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmp3lame.lib) + endif() + set(MP3LAME_LIB "libmp3lame-static.lib") + else() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmp3lame-static.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmpghip-static.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmp3lame-static.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmpghip-static.lib) + endif() + set(MP3LAME_LIB "libmp3lame.lib") + endif() + +else() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(OPTIONS --enable-static=yes --enable-shared=no) + set(MP3LAME_LIB "libmp3lame${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") + else() + set(OPTIONS --enable-shared=yes --enable-static=no) + if(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX) + set(MP3LAME_LIB "libmp3lame${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}") + else() + set(MP3LAME_LIB "libmp3lame${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + endif() + endif() + + if(NOT VCPKG_TARGET_IS_MINGW) + string(APPEND OPTIONS --with-pic=yes) + endif() + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + DETERMINE_BUILD_TRIPLET + OPTIONS ${OPTIONS} + ) + + vcpkg_install_make() + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ) + +endif() + +file(COPY ${SOURCE_PATH}/include/lame.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/lame) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/mp3lame-config.cmake @ONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/mp3lame/remove_lame_init_old_from_symbol_list.patch b/ports/mp3lame/remove_lame_init_old_from_symbol_list.patch new file mode 100644 index 00000000000000..11d29b2eb1aa57 --- /dev/null +++ b/ports/mp3lame/remove_lame_init_old_from_symbol_list.patch @@ -0,0 +1,9 @@ +diff --color -Naur src_old/include/libmp3lame.sym src/include/libmp3lame.sym +--- src_old/include/libmp3lame.sym 2017-09-07 02:33:35.000000000 +0700 ++++ src/include/libmp3lame.sym 2020-11-12 17:45:59.946448300 +0700 +@@ -1,5 +1,4 @@ + lame_init +-lame_init_old + lame_set_num_samples + lame_get_num_samples + lame_set_in_samplerate diff --git a/ports/mp3lame/usage b/ports/mp3lame/usage new file mode 100644 index 00000000000000..6efb86c531eb56 --- /dev/null +++ b/ports/mp3lame/usage @@ -0,0 +1,4 @@ +The package mp3lame provides CMake targets: + + find_package(mp3lame CONFIG REQUIRED) + target_link_libraries(main PRIVATE mp3lame::mp3lame) diff --git a/ports/mp3lame/vcpkg.json b/ports/mp3lame/vcpkg.json new file mode 100644 index 00000000000000..f0c7cfca97f9ff --- /dev/null +++ b/ports/mp3lame/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mp3lame", + "version-string": "3.100", + "port-version": 7, + "description": "LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL.", + "homepage": "http://lame.sourceforge.net/" +} diff --git a/ports/mpark-variant/CONTROL b/ports/mpark-variant/CONTROL deleted file mode 100644 index 45cd9e237c3517..00000000000000 --- a/ports/mpark-variant/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: mpark-variant -Version: 1.4.0 -Description: an implementation of C++17 std::variant for C++11/14/17. diff --git a/ports/mpark-variant/portfile.cmake b/ports/mpark-variant/portfile.cmake index c6010356ea6775..2041e6f0789d9b 100644 --- a/ports/mpark-variant/portfile.cmake +++ b/ports/mpark-variant/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mpark/variant diff --git a/ports/mpark-variant/vcpkg.json b/ports/mpark-variant/vcpkg.json new file mode 100644 index 00000000000000..a3c03ffaaf7bd0 --- /dev/null +++ b/ports/mpark-variant/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "mpark-variant", + "version-string": "1.4.0", + "port-version": 1, + "description": "an implementation of C++17 std::variant for C++11/14/17." +} diff --git a/ports/mpc/gmpd.patch b/ports/mpc/gmpd.patch new file mode 100644 index 00000000000000..b08625777c365f --- /dev/null +++ b/ports/mpc/gmpd.patch @@ -0,0 +1,15 @@ +diff --git a/configure.ac b/configure.ac +index ab3da6092..2533df1d8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -151,7 +151,9 @@ AC_CHECK_FUNCS([dup dup2],, + + AC_CHECK_LIB([gmp], [__gmpz_init], + [LIBS="-lgmp $LIBS"], +- [AC_MSG_ERROR([libgmp not found or uses a different ABI (including static vs shared).])]) ++ [AC_CHECK_LIB([gmpd], [__gmpz_init], ++ [LIBS="-lgmpd $LIBS"], ++ [AC_MSG_ERROR([libgmp not found or uses a different ABI (including static vs shared).])])]) + + AC_MSG_CHECKING(for MPFR) + LIBS="-lmpfr $LIBS" diff --git a/ports/mpc/portfile.cmake b/ports/mpc/portfile.cmake new file mode 100644 index 00000000000000..66aeb9f18fd987 --- /dev/null +++ b/ports/mpc/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/mpc/mpc-1.2.0.tar.gz" + FILENAME "mpc-1.2.0.tar.gz" + SHA512 84fa3338f51d369111456a63ad040256a1beb70699e21e2a932c779aa1c3bd08b201412c1659ecbb58403ea0548faacc35996d94f88f0639549269b7563c61b7 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES gmpd.patch +) + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG +) + +vcpkg_install_make() + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING.LESSER" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + diff --git a/ports/mpc/vcpkg.json b/ports/mpc/vcpkg.json new file mode 100644 index 00000000000000..2c8e38d1da1f30 --- /dev/null +++ b/ports/mpc/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "mpc", + "version-string": "1.2.0", + "port-version": 1, + "description": "GNU MPC is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result.", + "homepage": "http://www.multiprecision.org/mpc/", + "dependencies": [ + "gmp", + "mpfr" + ] +} diff --git a/ports/mpfr/CMakeLists.txt b/ports/mpfr/CMakeLists.txt deleted file mode 100644 index f0064666cab5bd..00000000000000 --- a/ports/mpfr/CMakeLists.txt +++ /dev/null @@ -1,285 +0,0 @@ -cmake_minimum_required(VERSION 3.3.0) - -project(MPFR VERSION 3.1.5 LANGUAGES C) - -# Find GMP (or MPIR) -find_library(GMP_LIBRARY NAMES gmp mpir) -find_path(GMP_INCLUDE_DIR "gmp.h") - -set(GMP_LIBRARIES ${GMP_LIBRARY}) -set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR}) - -# Sources -set(SRCS - src/abort_prec_max.c - src/acos.c - src/acosh.c - src/add.c - src/add1.c - src/add1sp.c - src/add_d.c - src/add_ui.c - src/agm.c - src/ai.c - src/asin.c - src/asinh.c - src/atan.c - src/atan2.c - src/atanh.c - src/bernoulli.c - src/beta.c - src/buildopt.c - src/cache.c - src/cbrt.c - src/check.c - src/clear.c - src/clears.c - src/cmp.c - src/cmp2.c - src/cmp_abs.c - src/cmp_d.c - src/cmp_ld.c - src/cmp_si.c - src/cmp_ui.c - src/comparisons.c - src/constant.c - src/const_catalan.c - src/const_euler.c - src/const_log2.c - src/const_pi.c - src/copysign.c - src/cos.c - src/cosh.c - src/cot.c - src/coth.c - src/csc.c - src/csch.c - src/digamma.c - src/dim.c - src/div.c - src/div_2exp.c - src/div_2si.c - src/div_2ui.c - src/div_d.c - src/div_ui.c - src/dump.c - src/d_div.c - src/d_sub.c - src/eint.c - src/eq.c - src/erandom.c - src/erf.c - src/erfc.c - src/exceptions.c - src/exp.c - src/exp10.c - src/exp2.c - src/exp3.c - src/expm1.c - src/exp_2.c - src/extract.c - src/factorial.c - src/fits_intmax.c - src/fits_sint.c - src/fits_slong.c - src/fits_sshort.c - src/fits_uint.c - src/fits_uintmax.c - src/fits_ulong.c - src/fits_ushort.c - src/fma.c - src/fmma.c - src/fms.c - src/frac.c - src/free_cache.c - src/frexp.c - src/gamma.c - src/gammaonethird.c - src/gamma_inc.c - src/get_d.c - src/get_d64.c - src/get_exp.c - src/get_f.c - src/get_float128.c - src/get_flt.c - src/get_ld.c - src/get_patches.c - src/get_q.c - src/get_si.c - src/get_sj.c - src/get_str.c - src/get_ui.c - src/get_uj.c - src/get_z.c - src/get_z_exp.c - src/gmp_op.c - src/grandom.c - src/hypot.c - src/init.c - src/init2.c - src/inits.c - src/inits2.c - src/inp_str.c - src/int_ceil_log2.c - src/isinf.c - src/isinteger.c - src/isnan.c - src/isnum.c - src/isqrt.c - src/isregular.c - src/iszero.c - src/jn.c - src/li2.c - src/lngamma.c - src/log.c - src/log10.c - src/log1p.c - src/log2.c - src/logging.c - src/log_ui.c - src/minmax.c - src/min_prec.c - src/modf.c - src/mpfr-gmp.c - src/mpfr-mini-gmp.c - src/mpn_exp.c - src/mp_clz_tab.c - src/mul.c - src/mulders.c - src/mul_2exp.c - src/mul_2si.c - src/mul_2ui.c - src/mul_d.c - src/mul_ui.c - src/neg.c - src/next.c - src/nrandom.c - src/odd_p.c - src/out_str.c - src/pool.c - src/pow.c - src/powerof2.c - src/pow_si.c - src/pow_ui.c - src/pow_z.c - src/printf.c - src/print_raw.c - src/print_rnd_mode.c - src/random_deviate.c - src/rec_sqrt.c - src/reldiff.c - src/rem1.c - src/rint.c - src/rndna.c - src/root.c - src/round_near_x.c - src/round_p.c - src/round_prec.c - src/scale2.c - src/sec.c - src/sech.c - src/set.c - src/setmax.c - src/setmin.c - src/setsign.c - src/set_d.c - src/set_d64.c - src/set_dfl_prec.c - src/set_exp.c - src/set_f.c - src/set_float128.c - src/set_flt.c - src/set_inf.c - src/set_ld.c - src/set_nan.c - src/set_prc_raw.c - src/set_prec.c - src/set_q.c - src/set_rnd.c - src/set_si.c - src/set_si_2exp.c - src/set_sj.c - src/set_str.c - src/set_str_raw.c - src/set_ui.c - src/set_ui_2exp.c - src/set_uj.c - src/set_z.c - src/set_zero.c - src/set_z_exp.c - src/sgn.c - src/signbit.c - src/sin.c - src/sinh.c - src/sinh_cosh.c - src/sin_cos.c - src/si_op.c - src/sqr.c - src/sqrt.c - src/sqrt_ui.c - src/stack_interface.c - src/strtofr.c - src/sub.c - src/sub1.c - src/sub1sp.c - src/subnormal.c - src/sub_d.c - src/sub_ui.c - src/sum.c - src/swap.c - src/tan.c - src/tanh.c - src/ubf.c - src/uceil_exp2.c - src/uceil_log2.c - src/ufloor_log2.c - src/ui_div.c - src/ui_pow.c - src/ui_pow_ui.c - src/ui_sub.c - src/urandom.c - src/urandomb.c - src/vasprintf.c - src/version.c - src/volatile.c - src/yn.c - src/zeta.c - src/zeta_ui.c) - -configure_file("src/mparam_h.in" "mparam.h") - -# Create and configure the target -add_library(mpfr ${SRCS}) - -# target_compile_definitions(mpfr PRIVATE HAVE_CONFIG_H) -target_compile_definitions(mpfr PRIVATE __MPFR_WITHIN_MPFR) -target_compile_definitions(mpfr PRIVATE HAVE_STDINT_H) -if(BUILD_SHARED_LIBS) - target_compile_definitions(mpfr PRIVATE __GMP_LIBGMP_DLL) -endif() - -try_compile(I_HAVE_STDARG ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/test_stdarg.c) -if (I_HAVE_STDARG) - target_compile_definitions(mpfr PRIVATE HAVE_STDARG) -endif (I_HAVE_STDARG) - -target_link_libraries(mpfr ${GMP_LIBRARIES}) - -target_include_directories(mpfr PUBLIC ${GMP_INCLUDE_DIRS}) -target_include_directories(mpfr PRIVATE ${CMAKE_BINARY_DIR}) -target_include_directories(mpfr PRIVATE ${PROJECT_SOURCE_DIR}) -target_include_directories(mpfr PRIVATE ${PROJECT_SOURCE_DIR}/src) - -# Install -install( - TARGETS mpfr - EXPORT MPFRExports - RUNTIME DESTINATION "bin" - LIBRARY DESTINATION "lib" - ARCHIVE DESTINATION "lib" - ) - -install( - FILES src/mpfr.h - DESTINATION "include" -) diff --git a/ports/mpfr/CONTROL b/ports/mpfr/CONTROL deleted file mode 100644 index 6b64b765162ac2..00000000000000 --- a/ports/mpfr/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: mpfr -Version: 4.0.1 -Homepage: https://www.mpfr.org -Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding -Build-Depends: mpir diff --git a/ports/mpfr/dll.patch b/ports/mpfr/dll.patch new file mode 100644 index 00000000000000..3b6eff519aa978 --- /dev/null +++ b/ports/mpfr/dll.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index fdee5978d..0791b2528 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -593,7 +593,7 @@ case $host in + AC_MSG_CHECKING(for DLL/static GMP) + if test "$enable_shared" = yes; then + MPFR_LDFLAGS="$MPFR_LDFLAGS -no-undefined" +- LIBMPFR_LDFLAGS="$LIBMPFR_LDFLAGS -Wl,--output-def,.libs/libmpfr-6.dll.def" ++ LIBMPFR_LDFLAGS="$LIBMPFR_LDFLAGS -W1,--no-undefined" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include "gmp.h" + #if !__GMP_LIBGMP_DLL diff --git a/ports/mpfr/gmpd.patch b/ports/mpfr/gmpd.patch new file mode 100644 index 00000000000000..d34027d36496b1 --- /dev/null +++ b/ports/mpfr/gmpd.patch @@ -0,0 +1,15 @@ +diff --git a/configure.ac b/configure.ac +index ea92c1f97..9621a70e5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -693,8 +693,9 @@ See 'config.log' for details (search for GMP_NUMB_BITS).])], + + dnl Check if we can link with GMP + AC_CHECK_LIB(gmp, __gmpz_init, [LIBS="-lgmp $LIBS"], ++ [AC_CHECK_LIB(gmpd, __gmpz_init, [LIBS="-lgmpd $LIBS"], + [AC_MSG_ERROR([libgmp not found or uses a different ABI (including static vs shared). +-Please read the INSTALL file -- see "In case of problem".])]) ++Please read the INSTALL file -- see "In case of problem".])])]) + + dnl Check for corresponding 'gmp.h' and libgmp + AC_MSG_CHECKING(if gmp.h version and libgmp version are the same) diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index 7e455041b6f5dd..82512c96021570 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -1,25 +1,35 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-4.0.1) +set(VERSION 4.1.0) vcpkg_download_distfile(ARCHIVE - URLS "http://www.mpfr.org/mpfr-4.0.1/mpfr-4.0.1.tar.xz" - FILENAME "mpfr-4.0.1.tar.xz" - SHA512 137ad68bc1e33a155edc1247fcdba27f999cf48ed526773136584090ddf2cfdfc9ea79fbf74ea1943b835b4b1ff29b05087114738c6ad3b485848540f30cac4f + URLS "http://www.mpfr.org/mpfr-${VERSION}/mpfr-${VERSION}.tar.xz" "https://ftp.gnu.org/gnu/mpfr/mpfr-${VERSION}.tar.xz" + FILENAME "mpfr-${VERSION}.tar.xz" + SHA512 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 ) -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/test_stdarg.c DESTINATION ${SOURCE_PATH}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + gmpd.patch + dll.patch +) -vcpkg_configure_cmake( +file(REMOVE_RECURSE "${SOURCE_PATH}/m4") +vcpkg_configure_make( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + AUTOCONFIG + ADDITIONAL_MSYS_PACKAGES texinfo gettext autoconf-archive ) -vcpkg_install_cmake() +vcpkg_install_make() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/mpfr.pc" AND VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/mpfr.pc" " -lgmp" " -lgmpd") +endif() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpfr) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/mpfr/COPYING ${CURRENT_PACKAGES_DIR}/share/mpfr/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mpfr/test_stdarg.c b/ports/mpfr/test_stdarg.c deleted file mode 100644 index dc1e2d7b403cd0..00000000000000 --- a/ports/mpfr/test_stdarg.c +++ /dev/null @@ -1,6 +0,0 @@ -# include - -int main(int argc, char *argv) { - return 0; -} - diff --git a/ports/mpfr/vcpkg.json b/ports/mpfr/vcpkg.json new file mode 100644 index 00000000000000..7f742a50c4727d --- /dev/null +++ b/ports/mpfr/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "mpfr", + "version-string": "4.1.0", + "port-version": 1, + "description": "The MPFR library is a C library for multiple-precision floating-point computations with correct rounding", + "homepage": "https://www.mpfr.org", + "dependencies": [ + "gmp" + ] +} diff --git a/ports/mpg123/0001-fix-checkcpuarch-path.patch b/ports/mpg123/0001-fix-checkcpuarch-path.patch new file mode 100644 index 00000000000000..d6d3bc4771e05e --- /dev/null +++ b/ports/mpg123/0001-fix-checkcpuarch-path.patch @@ -0,0 +1,13 @@ +diff --git a/ports/cmake/cmake/CheckCPUArch.cmake b/ports/cmake/cmake/CheckCPUArch.cmake +index 84dab8a..925aa09 100644 +--- a/ports/cmake/cmake/CheckCPUArch.cmake ++++ b/ports/cmake/cmake/CheckCPUArch.cmake +@@ -2,7 +2,7 @@ macro(_CHECK_CPU_ARCH ARCH ARCH_DEFINES VARIABLE) + if(NOT DEFINED HAVE_${VARIABLE}) + message(STATUS "Check CPU architecture is ${ARCH}") + set(CHECK_CPU_ARCH_DEFINES ${ARCH_DEFINES}) +- configure_file(${PROJECT_SOURCE_DIR}/CheckCPUArch.c.in ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c @ONLY) ++ configure_file(${PROJECT_SOURCE_DIR}/cmake/CheckCPUArch.c.in ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c @ONLY) + try_compile(HAVE_${VARIABLE} "${PROJECT_BINARY_DIR}" + "${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c") + if(HAVE_${VARIABLE}) diff --git a/ports/mpg123/0001-fix-crt-linking.patch b/ports/mpg123/0001-fix-crt-linking.patch deleted file mode 100644 index c0a74c36620f29..00000000000000 --- a/ports/mpg123/0001-fix-crt-linking.patch +++ /dev/null @@ -1,88 +0,0 @@ -From fcf5f82c9abeb6068be26dc43f613a253cac3436 Mon Sep 17 00:00:00 2001 -From: Mikhail Paulyshka -Date: Mon, 13 Mar 2017 02:59:35 +0300 -Subject: [PATCH] ports/msvc/libmpg123: fix static library linking - ---- - ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj -index 0a69525..ecf3a66 100644 ---- a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj -+++ b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj -@@ -265,7 +265,7 @@ - - - EnableFastChecks -- MultiThreadedDebugDLL -+ MultiThreadedDebug - false - Level3 - ProgramDatabase -@@ -285,7 +285,7 @@ - - - EnableFastChecks -- MultiThreadedDebugDLL -+ MultiThreadedDebug - false - Level3 - ProgramDatabase -@@ -312,7 +312,7 @@ - WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions) - - -- MultiThreadedDLL -+ MultiThreaded - false - false - Level3 -@@ -336,7 +336,7 @@ - WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions) - - -- MultiThreadedDLL -+ MultiThreaded - false - false - Level3 -@@ -474,7 +474,7 @@ - - - EnableFastChecks -- MultiThreadedDebugDLL -+ MultiThreadedDebug - false - Level3 - ProgramDatabase -@@ -562,7 +562,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ - - - EnableFastChecks -- MultiThreadedDebugDLL -+ MultiThreadedDebug - false - Level3 - ProgramDatabase -@@ -623,7 +623,7 @@ yasm -a x86 -m amd64 -f win64 -p gas -r raw -g null -o "$(IntDir)synth_stereo_x8 - WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions) - - -- MultiThreadedDLL -+ MultiThreaded - false - false - Level3 -@@ -716,7 +716,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ - WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_X86_64;%(PreprocessorDefinitions) - - -- MultiThreadedDLL -+ MultiThreaded - false - false - Level3 --- -2.11.0.windows.1 - diff --git a/ports/mpg123/0002-fix-libmpg123-uwp-build.patch b/ports/mpg123/0002-fix-libmpg123-uwp-build.patch new file mode 100644 index 00000000000000..ab37d023862426 --- /dev/null +++ b/ports/mpg123/0002-fix-libmpg123-uwp-build.patch @@ -0,0 +1,21 @@ +diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt +index b843152..b8ff89b 100644 +--- a/ports/cmake/src/CMakeLists.txt ++++ b/ports/cmake/src/CMakeLists.txt +@@ -39,8 +39,6 @@ check_include_file("termios.h" HAVE_TERMIOS) + check_include_file("unistd.h" HAVE_UNISTD_H) + check_include_file("windows.h" HAVE_WINDOWS_H) + +-check_symbol_exists(strerror "string.h" HAVE_STRERROR) +- + function(check_m) + set(CMAKE_REQUIRED_LIBRARIES m) + check_function_exists(sin HAVE_M) +@@ -59,6 +57,7 @@ check_function_exists(shmget HAVE_SHMGET) + check_function_exists(shmat HAVE_SHMAT) + check_function_exists(shmdt HAVE_SHMDT) + check_function_exists(shmctl HAVE_SHMCTL) ++check_function_exists(strerror HAVE_STRERROR) + + search_libs(gethostbyname GETHOSTBYNAME_LIB nsl socket network) + search_libs(socket SOCKET_LIB socket) diff --git a/ports/mpg123/0002-fix-x86-build.patch b/ports/mpg123/0002-fix-x86-build.patch deleted file mode 100644 index 2d0b10b812bb13..00000000000000 --- a/ports/mpg123/0002-fix-x86-build.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/src/libmpg123/mangle.h b/src/libmpg123/mangle.h -index 6012ccc..bf37cd7 100644 ---- a/src/libmpg123/mangle.h -+++ b/src/libmpg123/mangle.h -@@ -85,6 +85,10 @@ - #define ASM_VALUE(a) MANGLE_MACROCAT($,a) - #endif - -+#if defined(_WIN32) && !defined(_WIN64) -+#define OPT_X86 -+#endif -+ - /* Enable position-independent code for certain platforms. */ - - #if defined(OPT_X86) -@@ -130,7 +134,7 @@ Lpic_base: \ - /* Dummies for everyone else. */ - #define LOCAL_VAR(a) a - #define GLOBAL_VAR ASM_NAME --#define GLOBAL_VAR_PTR(a) #error Cannot use indirect addressing in non-PIC object. -+#define GLOBAL_VAR_PTR(a) // #error Cannot use indirect addressing in non-PIC object. - #define FUNC ASM_NAME - #define EXTERNAL_FUNC ASM_NAME - #define GET_GOT -diff --git a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj -index 1edf77d..f78999b 100644 ---- a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj -+++ b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj -@@ -700,7 +700,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ - - - -- Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) -+ Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) - $(IntDir);%(AdditionalLibraryDirectories) - true - diff --git a/ports/mpg123/0003-fix-libout123-uwp-build.patch b/ports/mpg123/0003-fix-libout123-uwp-build.patch new file mode 100644 index 00000000000000..2302c4283d276f --- /dev/null +++ b/ports/mpg123/0003-fix-libout123-uwp-build.patch @@ -0,0 +1,266 @@ +diff --git a/ports/cmake/CMakeLists.txt b/ports/cmake/CMakeLists.txt +index b5008da..8e6309a 100644 +--- a/ports/cmake/CMakeLists.txt ++++ b/ports/cmake/CMakeLists.txt +@@ -5,6 +5,13 @@ read_api_version(MPG123_VERSION API_VERSION OUTAPI_VERSION SYNAPI_VERSION) + + project(mpg123 VERSION ${MPG123_VERSION} LANGUAGES C ASM) + ++option(BUILD_LIBOUT123 "build libout123" ON) ++if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ message(WARNING "Output module is not implemented for '${CMAKE_SYSTEM_NAME}' platform.") ++ message(WARNING "To prevent build errors 'BUILD_LIBOUT123' option is set to OFF.") ++ set(BUILD_LIBOUT123 OFF) ++endif() ++ + include(cmake/search_libs.cmake) + include(CMakePackageConfigHelpers) + include(GNUInstallDirs) +@@ -34,17 +41,28 @@ set(exec_prefix "${CMAKE_INSTALL_PREFIX}") + set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") + set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../libmpg123.pc.in" libmpg123.pc @ONLY) +-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../libout123.pc.in" libout123.pc @ONLY) ++if(BUILD_LIBOUT123) ++ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../libout123.pc.in" libout123.pc @ONLY) ++endif() + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../libsyn123.pc.in" libsyn123.pc @ONLY) + + install( + FILES + "${CMAKE_CURRENT_BINARY_DIR}/libmpg123.pc" +- "${CMAKE_CURRENT_BINARY_DIR}/libout123.pc" + "${CMAKE_CURRENT_BINARY_DIR}/libsyn123.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + install( + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/../../man1/mpg123.1" +- "${CMAKE_CURRENT_SOURCE_DIR}/../../man1/out123.1" + DESTINATION "${CMAKE_INSTALL_MANDIR}") ++ ++if(BUILD_LIBOUT123) ++ install( ++ FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/libout123.pc" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ install( ++ FILES ++ "${CMAKE_CURRENT_SOURCE_DIR}/../../man1/out123.1" ++ DESTINATION "${CMAKE_INSTALL_MANDIR}") ++endif() +diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt +index b843152..3945c7e 100644 +--- a/ports/cmake/src/CMakeLists.txt ++++ b/ports/cmake/src/CMakeLists.txt +@@ -194,112 +194,114 @@ endif() + + # Modules + +-if(CHECK_MODULES) +- list(FIND CHECK_MODULES alsa ALSA_REQUIRED) +- list(FIND CHECK_MODULES coreaudio COREAUDIO_REQUIRED) +- list(FIND CHECK_MODULES pulse PULSE_REQUIRED) +- list(FIND CHECK_MODULES jack JACK_REQUIRED) +- list(FIND CHECK_MODULES tinyalsa TINYALSA_REQUIRED) +- list(FIND CHECK_MODULES win32 WIN32_REQUIRED) +- list(FIND CHECK_MODULES win32_wasapi WIN32_WASAPI_REQUIRED) +- set(MODULE_NOT_FOUND_MESSAGE "module required but couldn't be found") +-endif() +- +-if(NOT CHECK_MODULES OR NOT ALSA_REQUIRED EQUAL -1) +- find_package(ALSA) +- if(TARGET ALSA::ALSA) +- list(APPEND OUTPUT_MODULES alsa) +- elseif(CHECK_MODULES AND NOT ALSA_REQUIRED EQUAL -1) +- message(FATAL_ERROR "alsa ${MODULE_NOT_FOUND_MESSAGE}") ++if(BUILD_LIBOUT123) ++ if(CHECK_MODULES) ++ list(FIND CHECK_MODULES alsa ALSA_REQUIRED) ++ list(FIND CHECK_MODULES coreaudio COREAUDIO_REQUIRED) ++ list(FIND CHECK_MODULES pulse PULSE_REQUIRED) ++ list(FIND CHECK_MODULES jack JACK_REQUIRED) ++ list(FIND CHECK_MODULES tinyalsa TINYALSA_REQUIRED) ++ list(FIND CHECK_MODULES win32 WIN32_REQUIRED) ++ list(FIND CHECK_MODULES win32_wasapi WIN32_WASAPI_REQUIRED) ++ set(MODULE_NOT_FOUND_MESSAGE "module required but couldn't be found") + endif() +-endif() + +-if(NOT CHECK_MODULES OR NOT COREAUDIO_REQUIRED EQUAL -1) +- if(APPLE) +- find_library(AUDIO_TOOLBOX AudioToolbox) +- list(APPEND OUTPUT_MODULES coreaudio) +- elseif(CHECK_MODULES AND NOT COREAUDIO_REQUIRED EQUAL -1) +- message(FATAL_ERROR "coreaudio ${MODULE_NOT_FOUND_MESSAGE}") ++ if(NOT CHECK_MODULES OR NOT ALSA_REQUIRED EQUAL -1) ++ find_package(ALSA) ++ if(TARGET ALSA::ALSA) ++ list(APPEND OUTPUT_MODULES alsa) ++ elseif(CHECK_MODULES AND NOT ALSA_REQUIRED EQUAL -1) ++ message(FATAL_ERROR "alsa ${MODULE_NOT_FOUND_MESSAGE}") ++ endif() + endif() +-endif() + +-find_package(PkgConfig) +-if(PKG_CONFIG_FOUND) +- if(NOT CHECK_MODULES OR NOT PULSE_REQUIRED EQUAL -1) +- pkg_search_module(PULSE libpulse-simple) +- if(PULSE_FOUND) +- list(APPEND OUTPUT_MODULES pulse) +- elseif(CHECK_MODULES AND NOT PULSE_REQUIRED EQUAL -1) +- message(FATAL_ERROR "pulse ${MODULE_NOT_FOUND_MESSAGE}") ++ if(NOT CHECK_MODULES OR NOT COREAUDIO_REQUIRED EQUAL -1) ++ if(APPLE) ++ find_library(AUDIO_TOOLBOX AudioToolbox) ++ list(APPEND OUTPUT_MODULES coreaudio) ++ elseif(CHECK_MODULES AND NOT COREAUDIO_REQUIRED EQUAL -1) ++ message(FATAL_ERROR "coreaudio ${MODULE_NOT_FOUND_MESSAGE}") + endif() + endif() + +- if(NOT CHECK_MODULES OR NOT JACK_REQUIRED EQUAL -1) +- pkg_search_module(JACK jack) +- if(JACK_FOUND) +- list(APPEND OUTPUT_MODULES jack) +- elseif(CHECK_MODULES AND NOT JACK_REQUIRED EQUAL -1) +- message(FATAL_ERROR "jack ${MODULE_NOT_FOUND_MESSAGE}") ++ find_package(PkgConfig) ++ if(PKG_CONFIG_FOUND) ++ if(NOT CHECK_MODULES OR NOT PULSE_REQUIRED EQUAL -1) ++ pkg_search_module(PULSE libpulse-simple) ++ if(PULSE_FOUND) ++ list(APPEND OUTPUT_MODULES pulse) ++ elseif(CHECK_MODULES AND NOT PULSE_REQUIRED EQUAL -1) ++ message(FATAL_ERROR "pulse ${MODULE_NOT_FOUND_MESSAGE}") ++ endif() ++ endif() ++ ++ if(NOT CHECK_MODULES OR NOT JACK_REQUIRED EQUAL -1) ++ pkg_search_module(JACK jack) ++ if(JACK_FOUND) ++ list(APPEND OUTPUT_MODULES jack) ++ elseif(CHECK_MODULES AND NOT JACK_REQUIRED EQUAL -1) ++ message(FATAL_ERROR "jack ${MODULE_NOT_FOUND_MESSAGE}") ++ endif() + endif() +- endif() + +- if(NOT CHECK_MODULES OR NOT TINYALSA_REQUIRED EQUAL -1) +- pkg_search_module(TINYALSA tinyalsa) +- if(TINYALSA_FOUND) +- list(APPEND OUTPUT_MODULES tinyalsa) +- elseif(CHECK_MODULES AND NOT TINYALSA_REQUIRED EQUAL -1) +- message(FATAL_ERROR "tinyalsa ${MODULE_NOT_FOUND_MESSAGE}") ++ if(NOT CHECK_MODULES OR NOT TINYALSA_REQUIRED EQUAL -1) ++ pkg_search_module(TINYALSA tinyalsa) ++ if(TINYALSA_FOUND) ++ list(APPEND OUTPUT_MODULES tinyalsa) ++ elseif(CHECK_MODULES AND NOT TINYALSA_REQUIRED EQUAL -1) ++ message(FATAL_ERROR "tinyalsa ${MODULE_NOT_FOUND_MESSAGE}") ++ endif() + endif() + endif() +-endif() + +-if(NOT CHECK_MODULES OR NOT WIN32_REQUIRED EQUAL -1) +- if(HAVE_WINDOWS_H) +- set(WIN32_LIBRARIES winmm) +- list(APPEND OUTPUT_MODULES win32) +- elseif(CHECK_MODULES AND NOT WIN32_REQUIRED EQUAL -1) +- message(FATAL_ERROR "win32 ${MODULE_NOT_FOUND_MESSAGE}") ++ if(NOT CHECK_MODULES OR NOT WIN32_REQUIRED EQUAL -1) ++ if(HAVE_WINDOWS_H) ++ set(WIN32_LIBRARIES winmm) ++ list(APPEND OUTPUT_MODULES win32) ++ elseif(CHECK_MODULES AND NOT WIN32_REQUIRED EQUAL -1) ++ message(FATAL_ERROR "win32 ${MODULE_NOT_FOUND_MESSAGE}") ++ endif() + endif() +-endif() + +-if(NOT CHECK_MODULES OR NOT WIN32_WASAPI_REQUIRED EQUAL -1) +- set(WASAPI_INCLUDES "initguid.h" "audioclient.h" "mmdeviceapi.h" "avrt.h") +- check_include_files("${WASAPI_INCLUDES}" HAVE_WASAPI) +- if(HAVE_WASAPI) +- set(WIN32_WASAPI_LIBRARIES ole32 avrt) +- list(APPEND OUTPUT_MODULES win32_wasapi) +- elseif(CHECK_MODULES AND NOT WIN32_WASAPI_REQUIRED EQUAL -1) +- message(FATAL_ERROR "win32_wasapi ${MODULE_NOT_FOUND_MESSAGE}") ++ if(NOT CHECK_MODULES OR NOT WIN32_WASAPI_REQUIRED EQUAL -1) ++ set(WASAPI_INCLUDES "initguid.h" "audioclient.h" "mmdeviceapi.h" "avrt.h") ++ check_include_files("${WASAPI_INCLUDES}" HAVE_WASAPI) ++ if(HAVE_WASAPI) ++ set(WIN32_WASAPI_LIBRARIES ole32 avrt) ++ list(APPEND OUTPUT_MODULES win32_wasapi) ++ elseif(CHECK_MODULES AND NOT WIN32_WASAPI_REQUIRED EQUAL -1) ++ message(FATAL_ERROR "win32_wasapi ${MODULE_NOT_FOUND_MESSAGE}") ++ endif() + endif() +-endif() + +-if(CHECK_MODULES) +- list(REMOVE_AT CHECK_MODULES +- ${ALSA_REQUIRED} +- ${COREAUDIO_REQUIRED} +- ${PULSE_REQUIRED} +- ${JACK_REQUIRED} +- ${TINYALSA_REQUIRED} +- ${WIN32_REQUIRED} +- ${WIN32_WASAPI_REQUIRED}) +- list(LENGTH CHECK_MODULES CHECK_MODULES_LENGTH) +- if(NOT CHECK_MODULES_LENGTH EQUAL 0) +- message(FATAL_ERROR "Dunno how to find modules: ${CHECK_MODULES}") ++ if(CHECK_MODULES) ++ list(REMOVE_AT CHECK_MODULES ++ ${ALSA_REQUIRED} ++ ${COREAUDIO_REQUIRED} ++ ${PULSE_REQUIRED} ++ ${JACK_REQUIRED} ++ ${TINYALSA_REQUIRED} ++ ${WIN32_REQUIRED} ++ ${WIN32_WASAPI_REQUIRED}) ++ list(LENGTH CHECK_MODULES CHECK_MODULES_LENGTH) ++ if(NOT CHECK_MODULES_LENGTH EQUAL 0) ++ message(FATAL_ERROR "Dunno how to find modules: ${CHECK_MODULES}") ++ endif() + endif() +-endif() + +-if(NOT OUTPUT_MODULES) +- set(DEFAULT_OUTPUT_MODULE dummy) +- set(DEFAULT_OUTPUT_MODULES ${DEFAULT_OUTPUT_MODULE}) +-else() +- list(GET OUTPUT_MODULES 0 _DEFAULT_OUTPUT_MODULE) +- set(DEFAULT_OUTPUT_MODULE ${_DEFAULT_OUTPUT_MODULE} CACHE STRING "Default output module") +- if(BUILD_SHARED_LIBS) +- string(REPLACE ";" "," DEFAULT_OUTPUT_MODULES "${OUTPUT_MODULES}") +- else() ++ if(NOT OUTPUT_MODULES) ++ set(DEFAULT_OUTPUT_MODULE dummy) + set(DEFAULT_OUTPUT_MODULES ${DEFAULT_OUTPUT_MODULE}) ++ else() ++ list(GET OUTPUT_MODULES 0 _DEFAULT_OUTPUT_MODULE) ++ set(DEFAULT_OUTPUT_MODULE ${_DEFAULT_OUTPUT_MODULE} CACHE STRING "Default output module") ++ if(BUILD_SHARED_LIBS) ++ string(REPLACE ";" "," DEFAULT_OUTPUT_MODULES "${OUTPUT_MODULES}") ++ else() ++ set(DEFAULT_OUTPUT_MODULES ${DEFAULT_OUTPUT_MODULE}) ++ endif() ++ set_property(CACHE DEFAULT_OUTPUT_MODULE PROPERTY STRINGS ${OUTPUT_MODULES}) + endif() +- set_property(CACHE DEFAULT_OUTPUT_MODULE PROPERTY STRINGS ${OUTPUT_MODULES}) + endif() + + option(ACCURATE_ROUNDING "use rounding instead of fast truncation for integer output, where possible" ON) +@@ -362,7 +364,9 @@ add_compile_options( + + add_subdirectory("compat") + add_subdirectory("libmpg123") +-add_subdirectory("libout123") ++if(BUILD_LIBOUT123) ++ add_subdirectory("libout123") ++endif() + add_subdirectory("libsyn123") + + if(UNIX) diff --git a/ports/mpg123/0004-fix-libsyn123-uwp-build.patch b/ports/mpg123/0004-fix-libsyn123-uwp-build.patch new file mode 100644 index 00000000000000..803296dedeb491 --- /dev/null +++ b/ports/mpg123/0004-fix-libsyn123-uwp-build.patch @@ -0,0 +1,52 @@ +diff --git a/src/libmpg123/sample.h b/src/libmpg123/sample.h +index 4d244fe..ed3ef86 100644 +--- a/src/libmpg123/sample.h ++++ b/src/libmpg123/sample.h +@@ -171,7 +171,7 @@ static inline int16_t ftoi16(float x) + ( (u >= 2147483648UL) \ + ? (int32_t)((uint32_t)u - (uint32_t)2147483648UL) \ + : ((u == 0) \ +- ? (int32_t)-2147483648UL \ ++ ? -(int32_t)2147483648UL \ + : -(int32_t)((uint32_t)2147483648UL - u) ) \ + ) + +diff --git a/src/libsyn123/resample.c b/src/libsyn123/resample.c +index b92f7f2..3552ffa 100644 +--- a/src/libsyn123/resample.c ++++ b/src/libsyn123/resample.c +@@ -2005,7 +2005,7 @@ syn123_resample_intotal_64(long inrate, long outrate, int64_t outs) + // First offset is -inrate. + // You may want to work it out for yourself. Or trust me;-) + int err; +- uint64_t vtot = muloffdiv64(outs, vinrate, -vinrate, voutrate, &err, NULL); ++ uint64_t vtot = muloffdiv64(outs, vinrate, -(int64_t)vinrate, voutrate, &err, NULL); + if(err) + return SYN123_OVERFLOW; + if(vtot == UINT64_MAX) +diff --git a/src/libsyn123/sampleconv.c b/src/libsyn123/sampleconv.c +index 6e8fb3f..7179957 100644 +--- a/src/libsyn123/sampleconv.c ++++ b/src/libsyn123/sampleconv.c +@@ -21,6 +21,8 @@ + #include "syn123_int.h" + #include "sample.h" + #include "debug.h" ++// Avoid conflict with pragmas in isnan() and friends. ++#undef warning + + /* Conversions between native byte order encodings. */ + +diff --git a/src/libsyn123/volume.c b/src/libsyn123/volume.c +index de018a2..a80851d 100644 +--- a/src/libsyn123/volume.c ++++ b/src/libsyn123/volume.c +@@ -12,6 +12,8 @@ + #define NO_SMAX + #include "syn123_int.h" + #include "debug.h" ++// Avoid conflict with pragmas in isnan() and friends. ++#undef warning + + static const double db_min = -SYN123_DB_LIMIT; + static const double db_max = SYN123_DB_LIMIT; diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL deleted file mode 100644 index 47692364eaf74c..00000000000000 --- a/ports/mpg123/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mpg123 -Version: 1.25.8-6 -Homepage: https://sourceforge.net/projects/mpg123/ -Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file diff --git a/ports/mpg123/portfile.cmake b/ports/mpg123/portfile.cmake index 8523c6cb7b11b3..dd12ddc0d595e5 100644 --- a/ports/mpg123/portfile.cmake +++ b/ports/mpg123/portfile.cmake @@ -1,157 +1,77 @@ -include(vcpkg_common_functions) - -set(MPG123_VERSION 1.25.8) -set(MPG123_HASH f226317dddb07841a13753603fa13c0a867605a5a051626cb30d45cfba266d3d4296f5b8254f65b403bb5eef6addce1784ae8829b671a746854785cda1bad203) - -#architecture detection -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(MPG123_ARCH Win32) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(MPG123_ARCH x64) -else() - message(FATAL_ERROR "unsupported architecture") -endif() - -#linking -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(MPG123_CONFIGURATION_SUFFIX _Dll) +set(MPG123_VERSION 1.28.0) +set(MPG123_HASH 4e333ee4f3bbebcfff280cf286265e969a8da93b9043d03c0189e22cd40918b07bf12181bd06141d4479c78bc0d0ed472e0d3bb61b2fdb96fe9f7cd48f9a6b77) + +set(PATCHES "") +if(VCPKG_TARGET_IS_UWP) + set(PATCHES + 0002-fix-libmpg123-uwp-build.patch + 0003-fix-libout123-uwp-build.patch + 0004-fix-libsyn123-uwp-build.patch + ) endif() -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/mpg123/mpg123/${MPG123_VERSION}/mpg123-${MPG123_VERSION}.tar.bz2" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO mpg123/mpg123 + REF ${MPG123_VERSION} FILENAME "mpg123-${MPG123_VERSION}.tar.bz2" SHA512 ${MPG123_HASH} -) - -vcpkg_extract_source_archive_ex( - ARCHIVE ${ARCHIVE} - OUT_SOURCE_PATH SOURCE_PATH PATCHES - 0001-fix-crt-linking.patch - 0002-fix-x86-build.patch + 0001-fix-checkcpuarch-path.patch + ${PATCHES} ) -vcpkg_find_acquire_program(YASM) -get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") - -if(VCPKG_TARGET_IS_WINDOWS) - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj - RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX} - DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX} - ) - - message(STATUS "Installing") - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - else() - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) - endif() - - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/mpg123.h - ${SOURCE_PATH}/src/libmpg123/fmt123.h - ${SOURCE_PATH}/src/libmpg123/mpg123.h.in - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - file(REMOVE_RECURSE ${SOURCE_PATH}/build/debug) - file(REMOVE_RECURSE ${SOURCE_PATH}/build/release) +include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake) +yasm_tool_helper(APPEND_TO_PATH) - ################ - # Debug build - ################ - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND "${SOURCE_PATH}/configure" --prefix=${SOURCE_PATH}/build/debug --enable-debug=yes --enable-static=yes --disable-dependency-tracking --with-default-audio=coreaudio --with-module-suffix=.so - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done.") +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) - message(STATUS "Installing ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND make -j install - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-dbg + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/ports/cmake + OPTIONS -DUSE_MODULES=OFF ) - message(STATUS "Installing ${TARGET_TRIPLET}-dbg done.") + vcpkg_install_cmake() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + vcpkg_fixup_pkgconfig() - ################ - # Release build - ################ - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND make distclean - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - vcpkg_execute_required_process( - COMMAND "${SOURCE_PATH}/configure" --prefix=${SOURCE_PATH}/build/release --enable-static=yes --disable-dependency-tracking --with-default-audio=coreaudio --with-module-suffix=.so - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done.") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - message(STATUS "Installing ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND make -j install - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-rel +elseif(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX) + set(MPG123_OPTIONS + --disable-dependency-tracking ) - message(STATUS "Installing ${TARGET_TRIPLET}-rel done.") - file( - INSTALL - "${SOURCE_PATH}/build/debug/include/fmt123.h" - "${SOURCE_PATH}/build/debug/include/mpg123.h" - "${SOURCE_PATH}/build/debug/include/out123.h" - DESTINATION - ${CURRENT_PACKAGES_DIR}/include - ) + # Find cross-compiler prefix + if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + endif() + if(CMAKE_C_COMPILER) + vcpkg_execute_required_process( + COMMAND ${CMAKE_C_COMPILER} -dumpmachine + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME dumpmachine-${TARGET_TRIPLET} + ) + file(READ ${CURRENT_BUILDTREES_DIR}/dumpmachine-${TARGET_TRIPLET}-out.log MPG123_HOST) + string(REPLACE "\n" "" MPG123_HOST "${MPG123_HOST}") + message(STATUS "Cross-compiling with ${CMAKE_C_COMPILER}") + message(STATUS "Detected autoconf triplet --host=${MPG123_HOST}") + set(MPG123_OPTIONS + --host=${MPG123_HOST} + ${MPG123_OPTIONS} + ) + endif() - file( - INSTALL - "${SOURCE_PATH}/build/debug/lib/libmpg123.a" - "${SOURCE_PATH}/build/debug/lib/libout123.a" - DESTINATION - ${CURRENT_INSTALLED_DIR}/debug/lib + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${MPG123_OPTIONS} ) + vcpkg_install_make() + vcpkg_fixup_pkgconfig() - file( - INSTALL - "${SOURCE_PATH}/build/release/lib/libmpg123.a" - "${SOURCE_PATH}/build/release/lib/libout123.a" - DESTINATION - ${CURRENT_PACKAGES_DIR}/lib - ) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpg123 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) message(STATUS "Installing done") diff --git a/ports/mpg123/vcpkg.json b/ports/mpg123/vcpkg.json new file mode 100644 index 00000000000000..e699f891557b0e --- /dev/null +++ b/ports/mpg123/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "mpg123", + "version": "1.28.0", + "description": "mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3).", + "homepage": "https://sourceforge.net/projects/mpg123/", + "dependencies": [ + "yasm-tool-helper" + ] +} diff --git a/ports/mpi/CONTROL b/ports/mpi/CONTROL deleted file mode 100644 index b5db97f1338293..00000000000000 --- a/ports/mpi/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mpi -Version: 1 -Description: Message Passing Interface (MPI) is a standardized and portable message-passing standard designed by a group of researchers from academia and industry to function on a wide variety of parallel computing architectures. The standard defines the syntax and semantics of a core of library routines useful to a wide range of users writing portable message-passing programs in C, C++, and Fortran. There are several well-tested and efficient implementations of MPI, many of which are open-source or in the public domain. -Build-Depends: msmpi (windows), openmpi (!windows) diff --git a/ports/mpi/portfile.cmake b/ports/mpi/portfile.cmake index e46edeb4354dde..065116c276adcf 100644 --- a/ports/mpi/portfile.cmake +++ b/ports/mpi/portfile.cmake @@ -1,3 +1 @@ -include(vcpkg_common_functions) - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/mpi/vcpkg.json b/ports/mpi/vcpkg.json new file mode 100644 index 00000000000000..0b7b9d9be7f873 --- /dev/null +++ b/ports/mpi/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "mpi", + "version-string": "1", + "port-version": 1, + "description": "Message Passing Interface (MPI) is a standardized and portable message-passing standard designed by a group of researchers from academia and industry to function on a wide variety of parallel computing architectures. The standard defines the syntax and semantics of a core of library routines useful to a wide range of users writing portable message-passing programs in C, C++, and Fortran. There are several well-tested and efficient implementations of MPI, many of which are open-source or in the public domain.", + "dependencies": [ + { + "name": "msmpi", + "platform": "windows" + }, + { + "name": "openmpi", + "platform": "!windows" + } + ] +} diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL deleted file mode 100644 index 12f9d38ea234d7..00000000000000 --- a/ports/mpir/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mpir -Version: 3.0.0-7 -Homepage: https://github.com/wbhart/mpir -Description: Multiple Precision Integers and Rationals. diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index 42dd34c942e34f..856e4e273d4b55 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -1,16 +1,16 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "MPIR currently can only be built for desktop") +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/gmp.h" OR "${CURRENT_INSTALLED_DIR}/include/gmpxx.h") + message(FATAL_ERROR "Can't build ${PORT} if gmp is installed. Please remove gmp, and try to install ${PORT} again if you need it.") endif() if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT when building DLLs") + message(FATAL_ERROR "${PORT} currently can only be built using the dynamic CRT when building DLLs") endif() set(MPIR_VERSION 3.0.0) -if(VCPKG_CMAKE_SYSTEM_NAME) +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) vcpkg_download_distfile( ARCHIVE URLS "http://mpir.org/mpir-${MPIR_VERSION}.tar.bz2" @@ -34,45 +34,30 @@ if(VCPKG_CMAKE_SYSTEM_NAME) set(OPTIONS --disable-silent-rules --enable-gmpcompat --enable-cxx ${SHARED_STATIC}) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - set(ENV{CXXFLAGS} "${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_DEBUG} -O0 -g") - set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -O0 -g") - set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") - vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR}/debug ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR}/debug - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME configure-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND make -j install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME install-${TARGET_TRIPLET}-dbg - ) + string(APPEND VCPKG_C_FLAGS " -Wno-implicit-function-declaration") + string(APPEND VCPKG_CXX_FLAGS " -Wno-implicit-function-declaration") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - set(ENV{CXXFLAGS} "${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_RELEASE} -O2") - set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -O2") - set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") - vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR} ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME configure-${TARGET_TRIPLET}-rel - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND make -j install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME install-${TARGET_TRIPLET}-rel + # on Linux, autoconf is required; on macOS, it isn't + if(VCPKG_TARGET_IS_LINUX) + set(AUTOCONFIG "AUTOCONFIG") + endif() + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + ${AUTOCONFIG} + OPTIONS ${OPTIONS} ) + + vcpkg_install_make() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + endif() + + configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/info) - configure_file(${SOURCE_PATH}/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/mpir/copyright COPYONLY) -else() +elseif(VCPKG_TARGET_IS_WINDOWS) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wbhart/mpir @@ -110,27 +95,59 @@ else() OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_build_msbuild( + PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/build.vc${MSVC_VERSION}/${DLL_OR_LIB}_mpir_cxx/${DLL_OR_LIB}_mpir_cxx.vcxproj + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" + ) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB REL_LIBS_CXX ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpirxx.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB DBG_LIBS_CXX ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpirxx.lib) + endif() + endif() - file(GLOB HEADERS - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/gmp.h - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/gmpxx.h - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.h - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpirxx.h - ) - file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) - - file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.dll) - file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.lib) - - file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.dll) - file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.lib) - - file(COPY ${REL_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${REL_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(COPY ${DBG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY ${DBG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB HEADERS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/gmp.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/gmpxx.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpirxx.h + ) + file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + + file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.dll) + file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.lib) + list(APPEND REL_LIBS ${REL_LIBS_CXX}) + + file(INSTALL ${REL_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${REL_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB HEADERS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/gmp.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/gmpxx.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpirxx.h + ) + file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + + file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.dll) + file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.lib) + list(APPEND DBG_LIBS ${DBG_LIBS_CXX}) + + file(INSTALL ${DBG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${DBG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + endif() + vcpkg_copy_pdbs() - configure_file(${SOURCE_PATH}/COPYING.lib ${CURRENT_PACKAGES_DIR}/share/mpir/copyright COPYONLY) + file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) endif() diff --git a/ports/mpir/vcpkg.json b/ports/mpir/vcpkg.json new file mode 100644 index 00000000000000..29754ccd9ace40 --- /dev/null +++ b/ports/mpir/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "mpir", + "version-string": "3.0.0", + "port-version": 10, + "description": "Multiple Precision Integers and Rationals", + "homepage": "https://github.com/wbhart/mpir", + "supports": "!(uwp | arm)" +} diff --git a/ports/mpmcqueue/CONTROL b/ports/mpmcqueue/CONTROL deleted file mode 100644 index 3da89f6a522110..00000000000000 --- a/ports/mpmcqueue/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mpmcqueue -Version: 2019-07-26 -Description: A bounded multi-producer multi-consumer lock-free queue written in C++11 -Homepage: https://github.com/rigtorp/MPMCQueue diff --git a/ports/mpmcqueue/portfile.cmake b/ports/mpmcqueue/portfile.cmake index be2f03064b9eea..f1fe1d3a0327f2 100644 --- a/ports/mpmcqueue/portfile.cmake +++ b/ports/mpmcqueue/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rigtorp/MPMCQueue diff --git a/ports/mpmcqueue/vcpkg.json b/ports/mpmcqueue/vcpkg.json new file mode 100644 index 00000000000000..4a6075538f15d6 --- /dev/null +++ b/ports/mpmcqueue/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mpmcqueue", + "version-string": "2019-07-26", + "port-version": 1, + "description": "A bounded multi-producer multi-consumer lock-free queue written in C++11", + "homepage": "https://github.com/rigtorp/MPMCQueue" +} diff --git a/ports/mqtt-cpp/portfile.cmake b/ports/mqtt-cpp/portfile.cmake new file mode 100644 index 00000000000000..c29588e9185188 --- /dev/null +++ b/ports/mqtt-cpp/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO redboltz/mqtt_cpp + REF v9.0.0 + SHA512 4c9bef6abdb6bdec6ac60976f78e3e02c29d11c74cad0d3191e1d9b7befd327cd06f8a62e398d5997358b7e6974af3d6a73f68de47dd07ff099d46ba35fc84d8 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMQTT_BUILD_EXAMPLES=OFF + -DMQTT_BUILD_TESTS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mqtt_cpp_iface) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mqtt-cpp/vcpkg.json b/ports/mqtt-cpp/vcpkg.json new file mode 100644 index 00000000000000..dac362846bfbff --- /dev/null +++ b/ports/mqtt-cpp/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "mqtt-cpp", + "version-string": "9.0.0", + "port-version": 1, + "description": "Header-only MQTT client/server for C++14 based on Boost.Asio.", + "homepage": "https://github.com/redboltz/mqtt_cpp", + "dependencies": [ + "boost-any", + "boost-asio", + "boost-log", + "boost-multi-index", + "boost-type-erasure" + ] +} diff --git a/ports/ms-angle/001-fix-uwp.patch b/ports/ms-angle/001-fix-uwp.patch deleted file mode 100644 index 0e83f07fae87b0..00000000000000 --- a/ports/ms-angle/001-fix-uwp.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp -index 7c769e147..08e7a663f 100644 ---- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp -+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp -@@ -209,12 +209,12 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr displayProperties; -+ ComPtr displayInformation; - -- if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), displayProperties.GetAddressOf()))) -+ if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), displayInformation.GetAddressOf()))) - { - float dpi = 96.0f; -- if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi))) -+ if (SUCCEEDED(displayInformation->get_LogicalDpi(&dpi))) - { - return dpi; - } -diff --git a/src/common/mathutil.h b/src/common/mathutil.h -index dcb7d8d62..774b80506 100644 ---- a/src/common/mathutil.h -+++ b/src/common/mathutil.h -@@ -150,7 +150,7 @@ inline bool supportsSSE2() - return supports; - } - --#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) -+#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) && !defined(_M_ARM64) - { - int info[4]; - __cpuid(info, 0); -@@ -884,7 +884,7 @@ inline uint32_t BitfieldReverse(uint32_t value) - - // Count the 1 bits. - #if defined(ANGLE_PLATFORM_WINDOWS) --#if defined(_M_ARM) -+#if defined(_M_ARM) || defined(_M_ARM64) - inline int BitCount(uint32_t bits) - { - bits = bits - ((bits >> 1) & 0x55555555); -diff --git a/src/common/platform.h b/src/common/platform.h -index 8287f5b2e..6de52b500 100644 ---- a/src/common/platform.h -+++ b/src/common/platform.h -@@ -84,7 +84,7 @@ - # undef far - #endif - --#if defined(_MSC_VER) && !defined(_M_ARM) -+#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) - #include - #define ANGLE_USE_SSE - #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) - \ No newline at end of file diff --git a/ports/ms-angle/CMakeLists.txt b/ports/ms-angle/CMakeLists.txt deleted file mode 100644 index a0ec171d365d3b..00000000000000 --- a/ports/ms-angle/CMakeLists.txt +++ /dev/null @@ -1,221 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(angle CXX) - -if(WIN32 AND NOT WINDOWS_STORE) - set(WINDOWS_DESKTOP 1) -else() - set(WINDOWS_DESKTOP 0) -endif() - -add_compile_options(/d2guard4 /Wv:18) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf") -set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") - -add_definitions( - -D_CRT_SECURE_NO_DEPRECATE - -D_SCL_SECURE_NO_WARNINGS - -D_HAS_EXCEPTIONS=0 - -DNOMINMAX - -DANGLE_STANDALONE_BUILD - -DANGLE_ENABLE_DEBUG_ANNOTATIONS -) - -configure_file(src/commit.h include/id/commit.h COPYONLY) -include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) - -########## -# angle::common -file(GLOB ANGLE_COMMON_SOURCES - "src/common/*.h" - "src/common/*.inl" - "src/common/*.cpp" - "src/common/third_party/base/*.h" - "src/common/third_party/base/anglebase/*.cc" - "src/common/third_party/base/anglebase/*.h" - "src/common/third_party/smhasher/src/*.h" - "src/common/third_party/smhasher/src/*.cpp") -list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") -add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) -target_include_directories(angle_common PUBLIC src/common/third_party/base) -add_library(angle::common ALIAS angle_common) - -########## -# angle::image_util -file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") -add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) -target_link_libraries(angle_image_util PRIVATE angle::common) -add_library(angle::image_util ALIAS angle_image_util) - -########## -# angle::translator -file(GLOB TRANSLATOR_SOURCES - "src/compiler/translator/glslang.l" - "src/compiler/translator/glslang.y" - "src/compiler/translator/*.h" - "src/compiler/translator/*.cpp" - "src/third_party/compiler/ArrayBoundsClamper.cpp" -) -add_library(angle_translator STATIC ${TRANSLATOR_SOURCES}) -target_compile_definitions(angle_translator PUBLIC - -DANGLE_ENABLE_ESSL - -DANGLE_ENABLE_GLSL - -DANGLE_ENABLE_HLSL -) -target_link_libraries(angle_translator PRIVATE angle::common) -add_library(angle::translator ALIAS angle_translator) - -########## -# angle::preprocessor -file(GLOB PREPROCESSOR_SOURCES - "src/compiler/preprocessor/*.h" - "src/compiler/preprocessor/*.cpp" -) -add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES}) -target_link_libraries(angle_preprocessor PRIVATE angle::common) -add_library(angle::preprocessor ALIAS angle_preprocessor) - -########## -# libANGLE - -## OpenGL Renderer -if(WINDOWS_DESKTOP) - file(GLOB LIBANGLE_GL_SOURCES - "src/libANGLE/renderer/gl/*.cpp" - "src/libANGLE/renderer/gl/*.inl" - "src/libANGLE/renderer/gl/*.h" - - "src/libANGLE/renderer/gl/wgl/*.cpp" - "src/libANGLE/renderer/gl/wgl/*.inl" - "src/libANGLE/renderer/gl/wgl/*.h" - ) - list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest") - add_library(angle_renderer_opengl INTERFACE) - target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES}) - target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL) - add_library(angle::renderer::opengl ALIAS angle_renderer_opengl) -endif() - -## All D3D Sources -file(GLOB_RECURSE LIBANGLE_D3D_SOURCES - "src/libANGLE/renderer/d3d/*.cpp" - "src/libANGLE/renderer/d3d/*.inl" - "src/libANGLE/renderer/d3d/*.h" -) -list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest") - -## WinRT D3D Renderer -if(WINDOWS_STORE) - set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES}) - list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt") - add_library(angle_renderer_winrt INTERFACE) - target_sources(angle_renderer_winrt INTERFACE ${LIBANGLE_D3D_WINRT_SOURCES}) - add_library(angle::renderer::winrt ALIAS angle_renderer_winrt) -endif() - -## Win32/d3d9 D3D Renderer -if(WINDOWS_DESKTOP) - set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES}) - list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32") - find_library(D3D9_LIB NAMES d3d9) - add_library(angle_renderer_win32 INTERFACE) - target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES}) - target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9) - target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB}) - add_library(angle::renderer::win32 ALIAS angle_renderer_win32) -endif() - -## D3D11 Base renderer -list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32") -find_library(DXGUID_LIB NAMES dxguid) -find_library(D3D11_LIB NAMES d3d11) -add_library(angle_renderer_d3d INTERFACE) -target_sources(angle_renderer_d3d INTERFACE ${LIBANGLE_D3D_SOURCES}) -target_compile_definitions(angle_renderer_d3d INTERFACE - -DANGLE_ENABLE_D3D11 - "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" -) -target_link_libraries(angle_renderer_d3d INTERFACE ${D3D11_LIB} ${DXGUID_LIB}) -add_library(angle::renderer::d3d ALIAS angle_renderer_d3d) - -## Core libANGLE library -file(GLOB LIBANGLE_SOURCES - "src/third_party/systeminfo/SystemInfo.cpp" - "src/common/third_party/murmurhash/MurmurHash3.cpp" - "src/common/event_tracer.cpp" - - "src/libANGLE/*.cpp" - "src/libANGLE/*.inl" - "src/libANGLE/*.h" - - "src/libANGLE/renderer/*.cpp" - "src/libANGLE/renderer/*.inl" - "src/libANGLE/renderer/*.h" - - "src/libANGLE/renderer/null/*.cpp" - "src/libANGLE/renderer/null/*.inl" - "src/libANGLE/renderer/null/*.h" -) -list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") - -add_library(libANGLE STATIC ${LIBANGLE_SOURCES}) -target_link_libraries(libANGLE PRIVATE - angle::common - angle::image_util - angle::translator - angle::preprocessor - angle::renderer::d3d - $<$:angle::renderer::winrt> - $<$:angle::renderer::win32> - $<$:angle::renderer::opengl> - $<$:gdi32> -) -target_include_directories(libANGLE PRIVATE "src/third_party/khronos") -target_compile_definitions(libANGLE - PRIVATE -DANGLE_ENABLE_NULL - PUBLIC -DLIBANGLE_IMPLEMENTATION -) -add_library(angle::libANGLE ALIAS libANGLE) - -########## -# libGLESv2 -file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") -add_library(libGLESv2 ${LIBGLESV2_SOURCES}) -target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE) -target_compile_definitions(libGLESv2 - PRIVATE -DLIBGLESV2_IMPLEMENTATION - PUBLIC - -DGL_GLEXT_PROTOTYPES - -DGL_APICALL= - -DEGLAPI= -) -target_include_directories(libGLESv2 PUBLIC "$") - -########## -# libEGL -add_library(libEGL - "src/libEGL/libEGL.def" - "src/libEGL/libEGL.cpp" - "src/libEGL/libEGL.rc" - "src/libEGL/resource.h" -) -target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) -target_include_directories(libEGL PUBLIC "$") - -install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -install(EXPORT ANGLEExport FILE ms-angle-config.cmake NAMESPACE ms-angle:: DESTINATION share/ms-angle) - -if(NOT DISABLE_INSTALL_HEADERS) - install( - DIRECTORY include/ - DESTINATION include - FILES_MATCHING PATTERN "*.h" - PATTERN "GLSLANG" EXCLUDE - PATTERN "export.h" EXCLUDE - ) -endif() diff --git a/ports/ms-angle/CONTROL b/ports/ms-angle/CONTROL deleted file mode 100644 index 4fadc599431234..00000000000000 --- a/ports/ms-angle/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ms-angle -Version: 2018-04-18-2 -Description: The UWP version of a conformant OpenGL ES implementation for Windows, Mac and Linux. - The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support. diff --git a/ports/ms-angle/portfile.cmake b/ports/ms-angle/portfile.cmake index 0e10fa1cc597fd..0015715fb66c72 100644 --- a/ports/ms-angle/portfile.cmake +++ b/ports/ms-angle/portfile.cmake @@ -1,31 +1 @@ -include(vcpkg_common_functions) - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - message(FATAL_ERROR "This portfile does not support Linux or OSX") -endif() - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO microsoft/angle - REF ms-master - SHA512 eecdb7012c0630b24fde540fb6a558f4ee5326fc1218773b779953d0fe0ef02da68ceb2577822cfc0374392a88b871201bfe291e3b85c3dd005edc83f84fec1f - PATCHES - PATCHES - 001-fix-uwp.patch -) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 -) - -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() -vcpkg_copy_pdbs() - -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ms-angle RENAME copyright) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/ms-angle/vcpkg.json b/ports/ms-angle/vcpkg.json new file mode 100644 index 00000000000000..22c7a3386f31d0 --- /dev/null +++ b/ports/ms-angle/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "ms-angle", + "version-string": "alias", + "port-version": 1, + "description": "Deprecated alias for ms-angle", + "dependencies": [ + "angle" + ] +} diff --git a/ports/ms-gltf/fix-apple-filesystem.patch b/ports/ms-gltf/fix-apple-filesystem.patch new file mode 100644 index 00000000000000..d2d1a504b05bf5 --- /dev/null +++ b/ports/ms-gltf/fix-apple-filesystem.patch @@ -0,0 +1,66 @@ +diff --git a/GLTFSDK.Samples/CMakeLists.txt b/GLTFSDK.Samples/CMakeLists.txt +index a66ed93..d948ee2 100644 +--- a/GLTFSDK.Samples/CMakeLists.txt ++++ b/GLTFSDK.Samples/CMakeLists.txt +@@ -1,4 +1,6 @@ + cmake_minimum_required(VERSION 3.5) +- ++if(APPLE) ++ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15") ++endif() + add_subdirectory(Deserialize) + add_subdirectory(Serialize) +diff --git a/GLTFSDK.Samples/Deserialize/CMakeLists.txt b/GLTFSDK.Samples/Deserialize/CMakeLists.txt +index 791898c..6474aee 100644 +--- a/GLTFSDK.Samples/Deserialize/CMakeLists.txt ++++ b/GLTFSDK.Samples/Deserialize/CMakeLists.txt +@@ -17,6 +17,8 @@ if (MSVC) + + # Make sure that all PDB files on Windows are installed to the output folder. By default, only the debug build does this. + set_target_properties(Deserialize PROPERTIES COMPILE_PDB_NAME "Deserialize" COMPILE_PDB_OUTPUT_DIRECTORY "${RUNTIME_OUTPUT_DIRECTORY}") ++elseif(APPLE) ++ set_target_properties(Deserialize PROPERTIES CXX_STANDARD 17) + endif() + + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") +diff --git a/GLTFSDK.Samples/Deserialize/Source/main.cpp b/GLTFSDK.Samples/Deserialize/Source/main.cpp +index 80198fa..fb560e0 100644 +--- a/GLTFSDK.Samples/Deserialize/Source/main.cpp ++++ b/GLTFSDK.Samples/Deserialize/Source/main.cpp +@@ -8,6 +8,9 @@ + + // Replace this with (and use std::filesystem rather than + // std::experimental::filesystem) if your toolchain fully supports C++17 ++#if defined(__APPLE__) ++#define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM ++#endif + #include + + #include +diff --git a/GLTFSDK.Samples/Serialize/CMakeLists.txt b/GLTFSDK.Samples/Serialize/CMakeLists.txt +index 5269da8..1129ea0 100644 +--- a/GLTFSDK.Samples/Serialize/CMakeLists.txt ++++ b/GLTFSDK.Samples/Serialize/CMakeLists.txt +@@ -17,6 +17,8 @@ if (MSVC) + + # Make sure that all PDB files on Windows are installed to the output folder. By default, only the debug build does this. + set_target_properties(Serialize PROPERTIES COMPILE_PDB_NAME "Serialize" COMPILE_PDB_OUTPUT_DIRECTORY "${RUNTIME_OUTPUT_DIRECTORY}") ++elseif(APPLE) ++ set_target_properties(Serialize PROPERTIES CXX_STANDARD 17) + endif() + + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") +diff --git a/GLTFSDK.Samples/Serialize/Source/main.cpp b/GLTFSDK.Samples/Serialize/Source/main.cpp +index ac87c10..f5c6e0b 100644 +--- a/GLTFSDK.Samples/Serialize/Source/main.cpp ++++ b/GLTFSDK.Samples/Serialize/Source/main.cpp +@@ -10,6 +10,9 @@ + + // Replace this with (and use std::filesystem rather than + // std::experimental::filesystem) if your toolchain fully supports C++17 ++#if defined(__APPLE__) ++#define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM ++#endif + #include + + #include diff --git a/ports/ms-gltf/fix-install.patch b/ports/ms-gltf/fix-install.patch new file mode 100644 index 00000000000000..59b5eebbc19b0a --- /dev/null +++ b/ports/ms-gltf/fix-install.patch @@ -0,0 +1,44 @@ +diff --git a/Build/CMake/Modules/GLTFPlatform.cmake b/Build/CMake/Modules/GLTFPlatform.cmake +index 3d940f5..322f029 100644 +--- a/Build/CMake/Modules/GLTFPlatform.cmake ++++ b/Build/CMake/Modules/GLTFPlatform.cmake +@@ -55,14 +55,14 @@ endfunction(GetGLTFPlatform) + function(CreateGLTFInstallTargets target platform) + + install(TARGETS ${target} +- ARCHIVE DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$/${PROJECT_NAME} +- LIBRARY DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$/${PROJECT_NAME} +- RUNTIME DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$/${PROJECT_NAME} +- BUNDLE DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$/${PROJECT_NAME} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ++ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ++ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ++ BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + ) + + if (MSVC) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/$/${PROJECT_NAME}.pdb DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$/${PROJECT_NAME}) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/$/${PROJECT_NAME}.pdb DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) + endif() + + endfunction(CreateGLTFInstallTargets) +diff --git a/GLTFSDK.Test/CMakeLists.txt b/GLTFSDK.Test/CMakeLists.txt +index 5c8eca7..a0752a3 100644 +--- a/GLTFSDK.Test/CMakeLists.txt ++++ b/GLTFSDK.Test/CMakeLists.txt +@@ -46,4 +46,4 @@ add_custom_command(TARGET GLTFSDK.Test + AddGLTFIOSAppProperties(GLTFSDK.Test) + CreateGLTFInstallTargets(GLTFSDK.Test ${Platform}) + +-install(FILES ${PROJECT_BINARY_DIR}/$/Resources/ DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${Platform}/$/${PROJECT_NAME}/Resources) ++install(FILES ${PROJECT_BINARY_DIR}/$/Resources/ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +diff --git a/GLTFSDK/CMakeLists.txt b/GLTFSDK/CMakeLists.txt +index 3c53c74..1e8d223 100644 +--- a/GLTFSDK/CMakeLists.txt ++++ b/GLTFSDK/CMakeLists.txt +@@ -46,4 +46,5 @@ target_include_directories(GLTFSDK + PRIVATE "${CMAKE_BINARY_DIR}/GeneratedFiles" + ) + ++install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Inc/GLTFSDK DESTINATION ${CMAKE_INSTALL_PREFIX}/include) + CreateGLTFInstallTargets(GLTFSDK ${Platform}) diff --git a/ports/ms-gltf/portfile.cmake b/ports/ms-gltf/portfile.cmake new file mode 100644 index 00000000000000..1382dc046c22a1 --- /dev/null +++ b/ports/ms-gltf/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_fail_port_install(MESSAGE "ms-gltf currently only supports Windows and Mac platforms" ON_TARGET "linux" "ios") +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/glTF-SDK + REF ac3e70392feb6aef18a07314669f6af2ebc72787 # r1.9.5.4 + SHA512 389b801ddc6f0b29269bcd1215fa9e63fe46a1f1a8778125c6439e34fe0925d5534b1cdbea30824a4a8aa008015124dc7cc4558daa9522fc6d85e00e8e41e4a9 + HEAD_REF master + PATCHES + fix-install.patch + fix-apple-filesystem.patch +) + +# note: Test/Sample executables won't be installed +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test ENABLE_UNIT_TESTS + samples ENABLE_SAMPLES +) + +# note: Platform-native buildsystem will be more helpful to launch/debug the tests/samples. +# note: The PDB file path is making Ninja fails to install. +# For Windows, we rely on /MP. The other platforms should be able to build with PREFER_NINJA. +set(WINDOWS_USE_MSBUILD) +if(VCPKG_TARGET_IS_WINDOWS) + set(WINDOWS_USE_MSBUILD "WINDOWS_USE_MSBUILD") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + ${WINDOWS_USE_MSBUILD} + OPTIONS + ${FEATURE_OPTIONS} +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ms-gltf/vcpkg.json b/ports/ms-gltf/vcpkg.json new file mode 100644 index 00000000000000..9b7983b2737d97 --- /dev/null +++ b/ports/ms-gltf/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "ms-gltf", + "version-string": "r1.9.5.4", + "description": "glTF-SDK is a C++ Software Development Kit for glTF", + "homepage": "https://github.com/microsoft/glTF-SDK", + "supports": "!linux", + "dependencies": [ + "rapidjson", + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + "test" + ], + "features": { + "samples": { + "description": "Build with GLTF samples" + }, + "test": { + "description": "Build test programs", + "dependencies": [ + "gtest" + ] + } + } +} diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL deleted file mode 100644 index 75741b4d4adb5d..00000000000000 --- a/ports/ms-gsl/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ms-gsl -Version: 2019-04-19 -Homepage: https://github.com/Microsoft/GSL -Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index 68303601f060c8..73ce94674d00ed 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -1,15 +1,27 @@ -#header-only library -include(vcpkg_common_functions) - +#header-only library with an install target vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF b74b286d5e333561b0f1ef1abd18de2606624455 - SHA512 5d2d9812fab638228eb8802df21d271bd94321f6174f1fa15a3d3a60dc742cdce1ee0701f2096625cca13df934b0d2511f9b4fcc0913780de234ac76403f2482 + REF 0f6dbc9e2915ef5c16830f3fa3565738de2a9230 + SHA512 f72d7d9a18b8055401feb99d99f17c70c0c2015b1a2112ae13fedd27949ff7f9b30718b6afd0b5730ed5573390cb1cc987cd45b7e7fbb92f4134f11d1637ddb7 HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGSL_TEST=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH share/cmake/Microsoft.GSL + TARGET_PATH share/Microsoft.GSL +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ms-gsl RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ms-gsl/vcpkg.json b/ports/ms-gsl/vcpkg.json new file mode 100644 index 00000000000000..e8f6f9adc785fe --- /dev/null +++ b/ports/ms-gsl/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ms-gsl", + "version-string": "3.1.0", + "port-version": 1, + "description": "Microsoft implementation of the Guidelines Support Library", + "homepage": "https://github.com/Microsoft/GSL" +} diff --git a/ports/ms-quic/fix-install.patch b/ports/ms-quic/fix-install.patch new file mode 100644 index 00000000000000..4df691077096ac --- /dev/null +++ b/ports/ms-quic/fix-install.patch @@ -0,0 +1,67 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 96ea265..87eaed5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -647,6 +647,8 @@ if(QUIC_CODE_CHECK) + endif() + endif() + ++include(GNUInstallDirs) ++ + add_subdirectory(src/inc) + + # Product code +@@ -657,6 +659,8 @@ add_subdirectory(src/bin) + # Tool code + if(QUIC_BUILD_TOOLS) + add_subdirectory(src/tools) ++ install(TARGETS quicattack quicinterop quicinteropserver quicipclient quicipserver ++ quicpcp quicping quicpost quicreach quicsample spinquic) + endif() + + # Performance code +diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt +index 4dda469..2797670 100644 +--- a/src/bin/CMakeLists.txt ++++ b/src/bin/CMakeLists.txt +@@ -29,7 +29,7 @@ endif() + + target_include_directories(msquic PUBLIC + $ +- $) ++ $) + + set(PUBLIC_HEADERS + ../inc/msquic.h +@@ -37,14 +37,17 @@ set(PUBLIC_HEADERS + ../inc/msquic_posix.h + ../inc/quic_sal_stub.h) + +-install(TARGETS msquic EXPORT msquic DESTINATION "${main_lib_dest}") +-install(FILES ${PUBLIC_HEADERS} DESTINATION "${include_dest}") ++install(TARGETS msquic EXPORT msquic-targets ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake) + +-install(FILES ${CMAKE_BINARY_DIR}/msquic-config.cmake DESTINATION ${msquic_dest}) ++install(FILES ${CMAKE_BINARY_DIR}/msquic-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/msquic) + +-install(EXPORT msquic DESTINATION ${msquic_dest}) ++install(EXPORT msquic-targets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/msquic) + + if(WIN32) + add_library(msquic.lttng INTERFACE) +diff --git a/src/bin/msquic-config.cmake.in b/src/bin/msquic-config.cmake.in +index dd67624..c561361 100644 +--- a/src/bin/msquic-config.cmake.in ++++ b/src/bin/msquic-config.cmake.in +@@ -1,4 +1,4 @@ + include(CMakeFindDependencyMacro) + @FILENAME_DEP_REPLACE@ + +-include(${SELF_DIR}/msquic.cmake) ++include(${SELF_DIR}/msquic-targets.cmake) diff --git a/ports/ms-quic/fix-platform.patch b/ports/ms-quic/fix-platform.patch new file mode 100644 index 00000000000000..7041c30d0e3594 --- /dev/null +++ b/ports/ms-quic/fix-platform.patch @@ -0,0 +1,56 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0b670cf..f94f4c6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -309,7 +309,7 @@ if(WIN32) + endif() + else() + # Just doing a normal build. Use the PGD file if present. +- if(EXISTS "${QUIC_PGO_FILE}") ++ if(FALSE) + message(STATUS "Using profile-guided optimization") + configure_file("${QUIC_PGO_FILE}" "${QUIC_OUTPUT_DIR}/msquic.pgd" COPYONLY) + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /USEPROFILE:PGD=${QUIC_OUTPUT_DIR}/msquic.pgd") +@@ -387,21 +387,29 @@ endif() + if(QUIC_TLS STREQUAL "openssl") + if (WIN32) + if (QUIC_UWP_BUILD) +- message(FATAL_ERROR "UWP is not supported with OpenSSL") +- endif() +- +- if (${CMAKE_GENERATOR_PLATFORM} STREQUAL "arm64") +- set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64-ARM") +- elseif (${CMAKE_GENERATOR_PLATFORM} STREQUAL "arm") +- set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32-ARM") +- elseif (${CMAKE_GENERATOR_PLATFORM} STREQUAL "Win32") +- set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32") +- elseif (${CMAKE_GENERATOR_PLATFORM} STREQUAL "x64") +- set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64A") ++ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") ++ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64-ARM") ++ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") ++ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32-ARM") ++ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") ++ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32-ONECORE") ++ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") ++ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64A-ONECORE") ++ endif() + else() +- message(FATAL_ERROR "Unknown Generator Platform ${CMAKE_GENERATOR_PLATFORM}") ++ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") ++ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64-ARM") ++ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") ++ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32-ARM") ++ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") ++ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32") ++ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") ++ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64A") ++ endif() ++ endif() ++ if(NOT DEFINED QUIC_OPENSSL_WIN_ARCH) ++ message(FATAL_ERROR "Unknown Platform ${VCPKG_TARGET_ARCHITECTURE}") + endif() +- + set(OPENSSL_DIR ${QUIC_BUILD_DIR}/openssl) + + add_library(OpenSSL_Crypto STATIC IMPORTED) diff --git a/ports/ms-quic/fix-warnings.patch b/ports/ms-quic/fix-warnings.patch new file mode 100644 index 00000000000000..bf99b886386882 --- /dev/null +++ b/ports/ms-quic/fix-warnings.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0f5abcb..aeae310 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -184,7 +184,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${QUIC_OUTPUT_DIR}) + set(QUIC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/inc) + + if (WIN32) +- set(QUIC_WARNING_FLAGS /WX /W4 /sdl CACHE INTERNAL "") ++ set(QUIC_WARNING_FLAGS /W4 /sdl CACHE INTERNAL "") + set(QUIC_COMMON_FLAGS "") + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + list(APPEND QUIC_COMMON_FLAGS /MP) +@@ -193,7 +193,7 @@ if (WIN32) + else() + set(QUIC_COMMON_FLAGS "") + set(QUIC_COMMON_DEFINES _GNU_SOURCE) +- set(QUIC_WARNING_FLAGS -Werror -Wall -Wextra -Wformat=2 -Wno-type-limits ++ set(QUIC_WARNING_FLAGS -Wall -Wextra -Wformat=2 -Wno-type-limits + -Wno-unknown-pragmas -Wno-multichar -Wno-missing-field-initializers + CACHE INTERNAL "") + if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) diff --git a/ports/ms-quic/portfile.cmake b/ports/ms-quic/portfile.cmake new file mode 100644 index 00000000000000..e4e44d6733f7b3 --- /dev/null +++ b/ports/ms-quic/portfile.cmake @@ -0,0 +1,80 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH QUIC_SOURCE_PATH + REPO microsoft/msquic + REF v1.2.0 + SHA512 6f63d42d950cbba88764332b31818a8627e7d3ecf7393cdef77daedd35a7bb04ac39c642991afb7cca502a346999233023e3b36011916c67e348179838aa7042 + HEAD_REF master + PATCHES + fix-warnings.patch # Remove /WX, -Werror + fix-platform.patch # Make OpenSSL build use VCPKG_TARGET_ARCHITECTURE + fix-install.patch # Adjust install path of build outputs +) + +vcpkg_from_github( + OUT_SOURCE_PATH OPENSSL_SOURCE_PATH + REPO quictls/openssl + REF a6e9d76db343605dae9b59d71d2811b195ae7434 + SHA512 23510a11203b96476c194a1987c7d4e758375adef0f6dfe319cd8ec4b8dd9b12ea64c4099cf3ba35722b992dad75afb1cfc5126489a5fa59f5ee4d46bdfbeaf6 + HEAD_REF OpenSSL_1_1_1k+quic +) +file(REMOVE_RECURSE ${QUIC_SOURCE_PATH}/submodules) +file(MAKE_DIRECTORY ${QUIC_SOURCE_PATH}/submodules) +file(RENAME ${OPENSSL_SOURCE_PATH} ${QUIC_SOURCE_PATH}/submodules/openssl) + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_EXE_PATH}) + +if(NOT VCPKG_HOST_IS_WINDOWS) + find_program(MAKE make) + get_filename_component(MAKE_EXE_PATH ${MAKE} DIRECTORY) + vcpkg_add_to_path(PREPEND ${MAKE_EXE_PATH}) +endif() + + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_find_acquire_program(NASM) + get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) + vcpkg_add_to_path(PREPEND ${NASM_EXE_PATH}) + endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools QUIC_BUILD_TOOLS +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT) + +vcpkg_cmake_configure( + SOURCE_PATH ${QUIC_SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} + -DQUIC_SOURCE_LINK=OFF + -DQUIC_TLS=openssl + -DQUIC_TLS_SECRETS_SUPPORT=ON + -DQUIC_USE_SYSTEM_LIBCRYPTO=OFF + -DQUIC_BUILD_PERF=OFF + -DQUIC_BUILD_TEST=OFF + -DQUIC_STATIC_LINK_CRT=${STATIC_CRT} + -DQUIC_UWP_BUILD=${VCPKG_TARGET_IS_UWP} +) + +vcpkg_cmake_build(TARGET OpenSSL_Build) # separate build log for quictls/openssl +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(PACKAGE_NAME msquic CONFIG_PATH lib/cmake/msquic) + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES quicattack quicinterop quicinteropserver quicipclient quicipserver + quicpcp quicping quicpost quicreach quicsample spinquic + AUTO_CLEAN + ) +endif() + +file(INSTALL ${QUIC_SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/include +) diff --git a/ports/ms-quic/vcpkg.json b/ports/ms-quic/vcpkg.json new file mode 100644 index 00000000000000..d337a8452e35df --- /dev/null +++ b/ports/ms-quic/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "ms-quic", + "version": "1.2.0", + "description": "Cross-platform, C implementation of the IETF QUIC protocol", + "homepage": "https://github.com/microsoft/msquic", + "license": "MIT", + "supports": "!(static & staticcrt)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tools": { + "description": "Install the tools after build" + } + } +} diff --git a/ports/msdfgen/compatibility.patch b/ports/msdfgen/compatibility.patch new file mode 100644 index 00000000000000..f1662549a79243 --- /dev/null +++ b/ports/msdfgen/compatibility.patch @@ -0,0 +1,15 @@ +diff --git a/ext/import-font.cpp b/ext/import-font.cpp +index 8f23620..ed26f54 100644 +--- a/ext/import-font.cpp ++++ b/ext/import-font.cpp +@@ -7,10 +7,6 @@ + #include FT_FREETYPE_H + #include FT_OUTLINE_H + +-#ifdef _WIN32 +- #pragma comment(lib, "freetype.lib") +-#endif +- + namespace msdfgen { + + #define REQUIRE(cond) { if (!(cond)) return false; } diff --git a/ports/msdfgen/portfile.cmake b/ports/msdfgen/portfile.cmake new file mode 100644 index 00000000000000..cfe688c44d2bf3 --- /dev/null +++ b/ports/msdfgen/portfile.cmake @@ -0,0 +1,44 @@ +# No symbols are exported in msdfgen source +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Chlumsky/msdfgen + REF 9af250c7d6780a41dcaf536c05e3e1987a1bdcd7 + SHA512 6b1dadd386aedf1e2de927dc83fe1f7fd7e053b0e9829ea0609a193ab8d9f92ecf08d2a6225b76a4f7bf9344b2935f38bbd00c4cc0c6627c1d95f67d2db728fe + HEAD_REF master + PATCHES + compatibility.patch +) + +set(BUILD_TOOLS OFF) +if ("tools" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_UWP) + message("Tools couldn't be built on UWP, disable it automatically.") + else() + set(BUILD_TOOLS ON) + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMSDFGEN_BUILD_MSDFGEN_STANDALONE=${BUILD_TOOLS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/msdfgen) + +# move exe to tools +if(BUILD_TOOLS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_copy_tools(TOOL_NAMES msdfgen AUTO_CLEAN) +endif() + + +# cleanup +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# license +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/msdfgen/vcpkg.json b/ports/msdfgen/vcpkg.json new file mode 100644 index 00000000000000..5c8d9628c72c0a --- /dev/null +++ b/ports/msdfgen/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "msdfgen", + "version-string": "1.8", + "description": "Multi-channel signed distance field generator", + "homepage": "https://github.com/Chlumsky/msdfgen", + "dependencies": [ + "freetype" + ], + "features": { + "tools": { + "description": "Generates an executable inside the tools folder. Not supported on UWP." + } + } +} diff --git a/ports/msgpack/CONTROL b/ports/msgpack/CONTROL deleted file mode 100644 index dab3515b997ea0..00000000000000 --- a/ports/msgpack/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: msgpack -Version: 3.2.0 -Homepage: https://github.com/msgpack/msgpack-c -Description: MessagePack is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller. diff --git a/ports/msgpack/add-static-lib-option.patch b/ports/msgpack/add-static-lib-option.patch deleted file mode 100644 index 349a413fbb59fe..00000000000000 --- a/ports/msgpack/add-static-lib-option.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f92363e..b0becbb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -196,27 +196,28 @@ IF (MSGPACK_ENABLE_SHARED) - ${CMAKE_CURRENT_SOURCE_DIR} - ) - ENDIF () -+IF (MSGPACK_ENABLE_STATIC) -+ ADD_LIBRARY (msgpackc-static STATIC -+ ${msgpackc_SOURCES} -+ ${msgpackc_HEADERS} -+ ) - --ADD_LIBRARY (msgpackc-static STATIC -- ${msgpackc_SOURCES} -- ${msgpackc_HEADERS} --) -- --TARGET_INCLUDE_DIRECTORIES (msgpackc-static -- PUBLIC -- $ -- $ -- $ -- PRIVATE -- ${CMAKE_CURRENT_SOURCE_DIR} --) -+ TARGET_INCLUDE_DIRECTORIES (msgpackc-static -+ PUBLIC -+ $ -+ $ -+ $ -+ PRIVATE -+ ${CMAKE_CURRENT_SOURCE_DIR} -+ ) -+ SET_TARGET_PROPERTIES (msgpackc-static PROPERTIES OUTPUT_NAME "msgpackc" COMPILE_DEFINITIONS MSGPACK_DLLEXPORT=) -+ENDIF () - --IF (NOT MSGPACK_ENABLE_SHARED) -+IF (MSGPACK_ENABLE_STATIC AND NOT MSGPACK_ENABLE_SHARED) - # Add alias for subdirectories - ADD_LIBRARY (msgpackc ALIAS msgpackc-static) - ENDIF () - --SET_TARGET_PROPERTIES (msgpackc-static PROPERTIES OUTPUT_NAME "msgpackc") - IF (MSGPACK_ENABLE_SHARED) - IF (MSVC) - SET_TARGET_PROPERTIES (msgpackc PROPERTIES IMPORT_SUFFIX "_import.lib") -@@ -239,14 +240,18 @@ IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" ST - IF (MSGPACK_ENABLE_SHARED) - SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3 -DPIC") - ENDIF () -- SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3" ) -+ IF (MSGPACK_ENABLE_STATIC) -+ SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3" ) -+ ENDIF () - ENDIF () - - IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - IF (MSGPACK_ENABLE_SHARED) - SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") - ENDIF () -- SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") -+ IF (MSGPACK_ENABLE_STATIC) -+ SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") -+ ENDIF () - ENDIF () - - IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") -@@ -278,10 +283,12 @@ IF (MSGPACK_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (example) - ENDIF () - --IF (MSGPACK_ENABLE_SHARED) -+IF (MSGPACK_ENABLE_SHARED AND MSGPACK_ENABLE_STATIC) - SET (MSGPACK_INSTALLTARGETS msgpackc msgpackc-static) --ELSE() -+ELSEIF (MSGPACK_ENABLE_STATIC) - SET (MSGPACK_INSTALLTARGETS msgpackc-static) -+ELSE () -+ SET (MSGPACK_INSTALLTARGETS msgpackc) - ENDIF () - - INSTALL (TARGETS ${MSGPACK_INSTALLTARGETS} EXPORT msgpack-targets diff --git a/ports/msgpack/portfile.cmake b/ports/msgpack/portfile.cmake index c9249a2bc560c5..86e2ea37810c11 100644 --- a/ports/msgpack/portfile.cmake +++ b/ports/msgpack/portfile.cmake @@ -1,13 +1,14 @@ -include(vcpkg_common_functions) +if (EXISTS ${CURRENT_INSTALLED_DIR}/include/msgpack/pack.h) + message(FATAL_ERROR "Cannot install ${PORT} when rest-rpc is already installed, please remove rest-rpc using \"./vcpkg remove rest-rpc:${TARGET_TRIPLET}\"") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO msgpack/msgpack-c - REF cpp-3.2.0 - SHA512 698fcdd5b427373997d0c89ff2cd09c44cf3b165defd381ff3cd9e14ecb83841064754a42aab99441a3b17aa26e3daec8f83e40d6d482c4b443b21b313278d14 - HEAD_REF master) - -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-static-lib-option.patch) + REF cpp-3.3.0 + SHA512 33ed87b23d776cadcc230666e6435088e402c5813e7e4dce5ce79c8c3aceba5a36db8f395278042c6ac44c474b33018ff1635889d8b20bc41c5f6f1d1c963cae + HEAD_REF master +) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(MSGPACK_ENABLE_SHARED OFF) diff --git a/ports/msgpack/vcpkg.json b/ports/msgpack/vcpkg.json new file mode 100644 index 00000000000000..6901ce161022b8 --- /dev/null +++ b/ports/msgpack/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "msgpack", + "version-string": "3.3.0", + "port-version": 1, + "description": "MessagePack is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller.", + "homepage": "https://github.com/msgpack/msgpack-c" +} diff --git a/ports/msgpack11/disable-werror.patch b/ports/msgpack11/disable-werror.patch new file mode 100644 index 00000000000000..eb4a17e084acbf --- /dev/null +++ b/ports/msgpack11/disable-werror.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 080cefa..b73072a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,9 +9,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) + add_library(msgpack11 STATIC msgpack11.cpp) + target_include_directories(msgpack11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + target_compile_options(msgpack11 PRIVATE -fno-rtti) +-if(NOT MSVC) +- target_compile_options(msgpack11 PRIVATE -Wall -Wextra -Werror) +-endif() + configure_file("msgpack11.pc.in" "msgpack11.pc" @ONLY) + + if (MSGPACK11_BUILD_TESTS) diff --git a/ports/msgpack11/fix-additerator.patch b/ports/msgpack11/fix-additerator.patch new file mode 100644 index 00000000000000..5a6b23227f1380 --- /dev/null +++ b/ports/msgpack11/fix-additerator.patch @@ -0,0 +1,12 @@ +diff --git a/msgpack11.cpp b/msgpack11.cpp +index fa572fa..640ba9a 100644 +--- a/msgpack11.cpp ++++ b/msgpack11.cpp +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + namespace msgpack11 { + diff --git a/ports/msgpack11/msvc.patch b/ports/msgpack11/msvc.patch new file mode 100644 index 00000000000000..b7e02937ae84e3 --- /dev/null +++ b/ports/msgpack11/msvc.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9424838..080cefa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,9 +6,12 @@ option(MSGPACK11_BUILD_TESTS "Build unit tests" ON) + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + +-add_library(msgpack11 msgpack11.cpp) ++add_library(msgpack11 STATIC msgpack11.cpp) + target_include_directories(msgpack11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +-target_compile_options(msgpack11 PRIVATE -fno-rtti -Wall -Wextra -Werror) ++target_compile_options(msgpack11 PRIVATE -fno-rtti) ++if(NOT MSVC) ++ target_compile_options(msgpack11 PRIVATE -Wall -Wextra -Werror) ++endif() + configure_file("msgpack11.pc.in" "msgpack11.pc" @ONLY) + + if (MSGPACK11_BUILD_TESTS) diff --git a/ports/msgpack11/portfile.cmake b/ports/msgpack11/portfile.cmake new file mode 100644 index 00000000000000..f4dc73c63c4730 --- /dev/null +++ b/ports/msgpack11/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ar90n/msgpack11 + REF v0.0.10 + SHA512 7b90893f9cdec529789f6e75703f5945c6fc5c946b8708a7a2cb295faf4af111c8cc61265b636f385641031b85181929205be9c5d155f405909445dce85b4ce8 + HEAD_REF master + PATCHES + msvc.patch + fix-additerator.patch + disable-werror.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMSGPACK11_BUILD_TESTS=OFF + -DMSGPACK11_BUILD_EXAMPLES=OFF +) + + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/msgpack11/vcpkg.json b/ports/msgpack11/vcpkg.json new file mode 100644 index 00000000000000..0072e7dfd09d04 --- /dev/null +++ b/ports/msgpack11/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "msgpack11", + "version": "0.0.10", + "port-version": 2, + "description": "msgpack11 is a tiny MsgPack library for C++11, providing MsgPack parsing and serialization.This library is inspired by json11.The API of msgpack11 is designed to be similar with json11.", + "homepage": "https://msgpack.org", + "dependencies": [ + "gtest" + ] +} diff --git a/ports/msinttypes/CONTROL b/ports/msinttypes/CONTROL deleted file mode 100644 index 51939d075dc85d..00000000000000 --- a/ports/msinttypes/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: msinttypes -Version: 2018-02-25 -Homepage: https://github.com/chemeris/msinttypes -Description: msinttypes is a package to provide missing ISO C9x compliant headers for Microsoft Visual Studio diff --git a/ports/msinttypes/portfile.cmake b/ports/msinttypes/portfile.cmake index 9393ea5f9bf4cb..beb6ea7113c393 100644 --- a/ports/msinttypes/portfile.cmake +++ b/ports/msinttypes/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO chemeris/msinttypes diff --git a/ports/msinttypes/vcpkg.json b/ports/msinttypes/vcpkg.json new file mode 100644 index 00000000000000..46bc22f188a622 --- /dev/null +++ b/ports/msinttypes/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "msinttypes", + "version-string": "2018-02-25", + "port-version": 1, + "description": "msinttypes is a package to provide missing ISO C9x compliant headers for Microsoft Visual Studio", + "homepage": "https://github.com/chemeris/msinttypes" +} diff --git a/ports/msix/CONTROL b/ports/msix/CONTROL deleted file mode 100644 index 848e95be3e01b2..00000000000000 --- a/ports/msix/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: msix -Version: MsixCoreInstaller-preview-1 -Build-Depends: xerces-c, zlib, openssl (!uwp&!windows) -Description: The MSIX Packaging SDK project is an effort to enable developers on a variety of platforms to pack and unpack packages for the purposes of distribution from either the Microsoft Store, or their own content distribution networks. - The MSIX Packaging APIs that a client app would use to interact with .msix/.appx packages are a subset of those documented here. See sample/ExtractContentsSample/ExtractContentsSample.cpp for additional details. diff --git a/ports/msix/fix-dependency-catch2.patch b/ports/msix/fix-dependency-catch2.patch new file mode 100644 index 00000000000000..4b2030566621a5 --- /dev/null +++ b/ports/msix/fix-dependency-catch2.patch @@ -0,0 +1,22 @@ +diff --git a/src/test/msixtest/CMakeLists.txt b/src/test/msixtest/CMakeLists.txt +index e991231..e5c43ed 100644 +--- a/src/test/msixtest/CMakeLists.txt ++++ b/src/test/msixtest/CMakeLists.txt +@@ -5,6 +5,8 @@ + cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) + project (msixtest) + ++find_package(Catch2 CONFIG REQUIRED) ++ + if(WIN32) + set(DESCRIPTION "msixtest manifest") + configure_file(${MSIX_PROJECT_ROOT}/manifest.cmakein ${MSIX_TEST_OUTPUT_DIRECTORY}/${PROJECT_NAME}.exe.manifest CRLF) +@@ -91,7 +93,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES + ) + + add_dependencies(${PROJECT_NAME} msix) +-target_link_libraries(${PROJECT_NAME} msix) ++target_link_libraries(${PROJECT_NAME} msix Catch2::Catch2) + + # For windows copy the library + if(WIN32) diff --git a/ports/msix/install-cmake.patch b/ports/msix/install-cmake.patch index d33613ae62b295..e8f930f61bba50 100644 --- a/ports/msix/install-cmake.patch +++ b/ports/msix/install-cmake.patch @@ -1,19 +1,20 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8ee0443..8c0a868 100644 +index 20098bf..38c3c95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -266,3 +266,5 @@ message(STATUS "sample processed") - add_subdirectory(test) - message(STATUS "tests processed") +@@ -190,3 +190,5 @@ message(STATUS "src processed") + add_subdirectory(sample) + message(STATUS "sample processed") message(STATUS "DONE!") + +install(TARGETS msix) +\ No newline at end of file diff --git a/src/msix/CMakeLists.txt b/src/msix/CMakeLists.txt -index 817040b..6b16b69 100644 +index 296eda4..cf87993 100644 --- a/src/msix/CMakeLists.txt +++ b/src/msix/CMakeLists.txt -@@ -164,9 +164,9 @@ message(STATUS "PAL: Compression = ${CompressionObject}") - include(msix_resources) +@@ -87,9 +87,9 @@ endif() + include(msix_resources) # Handles all the certificates and schemas we are going to use. set(LIB_PUBLIC_HEADERS - ../inc/AppxPackaging.hpp @@ -24,4 +25,13 @@ index 817040b..6b16b69 100644 + ${CMAKE_CURRENT_SOURCE_DIR}/../inc/MsixErrors.hpp ) - # Bundle specific files + set(MsixSrc) # list with all the files we are going to use +@@ -260,7 +260,7 @@ if(WIN32) + "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll") + string(REPLACE ";" " " DELAYFLAGS "${DELAYFLAGS}") + set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS "${DELAYFLAGS} /LTCG") +- set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /DEF:windowsexports.def") ++ set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /DEF:${CMAKE_CURRENT_BINARY_DIR}/windowsexports.def") + if(USE_STATIC_MSVC) + if(CMAKE_BUILD_TYPE MATCHES Debug) + set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB:MSVCRTD") diff --git a/ports/msix/portfile.cmake b/ports/msix/portfile.cmake index 7d8924ee623ade..2dbd06fe82f5eb 100644 --- a/ports/msix/portfile.cmake +++ b/ports/msix/portfile.cmake @@ -1,27 +1,27 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/msix-packaging - REF MsixCoreInstaller-preview - SHA512 b034559da8e4d5fedc79b3ef65b6f8e9bca69c92f3d85096e7ea84a0e394fa04a92f84079524437ceebd6c006a12dac9cc2e46197154257bbf7449ded031d3e8 + REPO microsoft/msix-packaging + REF ab322965d64baf1448548cbe18139e8872d686f2 # v1.7 + SHA512 d64767c84d5933bf3d1e0e62e9dc21fa13e02b8cf31776ccbe2e7066e514798d8ff758dc2b6fd64f6eabcf3deb83ef0eaa03e1a7d407307f347a045e8a75d3dd HEAD_REF master - PATCHES install-cmake.patch + PATCHES + install-cmake.patch + fix-dependency-catch2.patch ) file(REMOVE_RECURSE ${SOURCE_PATH}/lib) file(MAKE_DIRECTORY ${SOURCE_PATH}/lib) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/lib) +configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/lib/CMakeLists.txt) -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_WINDOWS) set(PLATFORM WIN32) set(CRYPTO_LIB crypt32) -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +elseif(VCPKG_TARGET_IS_LINUX) set(PLATFORM LINUX) set(CRYPTO_LIB openssl) -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") +elseif(VCPKG_TARGET_IS_OSX) set(PLATFORM MACOS) set(CRYPTO_LIB openssl) else() @@ -32,6 +32,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA NO_CHARSET_FLAG + DISABLE_PARALLEL_CONFIGURE OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -DINSTALL_LIBMSIX=ON @@ -43,10 +44,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_copy_pdbs() -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/msix RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/msix/vcpkg.json b/ports/msix/vcpkg.json new file mode 100644 index 00000000000000..b3e01e092b865d --- /dev/null +++ b/ports/msix/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "msix", + "version": "1.7", + "port-version": 3, + "description": "The MSIX Packaging SDK project is an effort to enable developers on a variety of platforms to pack and unpack packages for the purposes of distribution from either the Microsoft Store, or their own content distribution networks.The MSIX Packaging APIs that a client app would use to interact with .msix/.appx packages are a subset of those documented here. See sample/ExtractContentsSample/ExtractContentsSample.cpp for additional details.", + "homepage": "https://github.com/microsoft/msix-packaging", + "dependencies": [ + "catch2", + { + "name": "openssl", + "platform": "!uwp & !windows" + }, + "xerces-c", + "zlib" + ] +} diff --git a/ports/msmpi/CONTROL b/ports/msmpi/CONTROL deleted file mode 100644 index d21b80c37df0b2..00000000000000 --- a/ports/msmpi/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: msmpi -Version: 10.0-2 -Description: Microsoft MPI diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake index 10482cb0a026e9..cf5b69afe9db8f 100644 --- a/ports/msmpi/portfile.cmake +++ b/ports/msmpi/portfile.cmake @@ -1,23 +1,21 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") -if(VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "This port is only for building msmpi on Windows Desktop") -endif() - -set(MSMPI_VERSION "10.0.12498") +set(MSMPI_VERSION "10.1.12498") set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/msmpi-${MSMPI_VERSION}) vcpkg_download_distfile(SDK_ARCHIVE - URLS "https://download.microsoft.com/download/A/E/0/AE002626-9D9D-448D-8197-1EA510E297CE/msmpisdk.msi" - FILENAME "msmpisdk-${MSMPI_VERSION}.msi" - SHA512 36a31b2516f45fbc26167b31d2d6419f1928aef1591033f0430d36570159205e1a3134557a4ac0462f2d879add1fc6fee87a6997032e4438b528cd42a8bbe6b1 + URLS "https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisdk.msi" + FILENAME "msmpisdk-${MSMPI_VERSION}-b0087dfd.msi" + SHA512 b0087dfd21423bf87b94b17d7cb03576838585371bbf8b03cca95c3ad73670108c7bc6517b0de852ef595072cc4143be2011636e7242bcb080394d94294848a7 ) + +#to enable CI, you should modify the following URL also in ${VCPKG_ROOT}/scripts/azure-pipelines/windows/provision-image.ps1 macro(download_msmpi_redistributable_package) vcpkg_download_distfile(REDIST_ARCHIVE - URLS "https://download.microsoft.com/download/A/E/0/AE002626-9D9D-448D-8197-1EA510E297CE/msmpisetup.exe" + URLS "https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe" FILENAME "msmpisetup-${MSMPI_VERSION}.exe" - SHA512 c272dc842eb1e693f25eb580e1caf0c1fdb385611a12c20cdc6a40cf592ccbdba434a1c16edb63eef14b1a2ac6e678ac1cd561ec5fd003a5d17191a0fad281ae + SHA512 1ee463e7dfc3e55a7ac048fdfde13fef09a5eea4b74d8fd7c22a7aad667a025b467ce939e5de308e25bbc186c3fe66e0e24ac03a3741656fc7558f2af2fa132a ) endmacro() diff --git a/ports/msmpi/vcpkg.json b/ports/msmpi/vcpkg.json new file mode 100644 index 00000000000000..100ad65316e135 --- /dev/null +++ b/ports/msmpi/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "msmpi", + "version": "10.1.12498", + "port-version": 1, + "description": "Microsoft MPI (MS-MPI) is a Microsoft implementation of the Message Passing Interface standard for developing and running parallel applications on the Windows platform.", + "homepage": "https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi", + "license": "MIT", + "supports": "windows" +} diff --git a/ports/mstch/do-not-force-release.patch b/ports/mstch/do-not-force-release.patch new file mode 100644 index 00000000000000..63916f5f42496a --- /dev/null +++ b/ports/mstch/do-not-force-release.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8d8e0c7..4304ad7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,17 +5,17 @@ option(WITH_UNIT_TESTS "enable building unit test executable" OFF) + option(WITH_BENCHMARK "enable building benchmark executable" OFF) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) +-set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) +-set(CMAKE_BUILD_TYPE Release) + + set(mstch_VERSION 1.0.1) + + if(NOT MSVC) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -O3") ++ set(CMAKE_CXX_STANDARD 11) + endif() + + add_subdirectory(src) + ++target_include_directories(mstch PUBLIC $) ++ + if(WITH_UNIT_TESTS) + enable_testing() + add_subdirectory(vendor/headerize) diff --git a/ports/mstch/portfile.cmake b/ports/mstch/portfile.cmake new file mode 100644 index 00000000000000..e742273affbc43 --- /dev/null +++ b/ports/mstch/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO no1msd/mstch + REF ff459067bd02e80dc399006bb610238223d41c50 #1.0.2 + SHA512 b01f4c3e39a40fc9a6accc81ecbfac4b8a9ce1c2ec3df441a16039f4bf126dfeef83f87d3a5e9ec03dc133a1c5f54f5bc931479915e8a92bbfc8ebbc87c8e4dd + HEAD_REF master + PATCHES do-not-force-release.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mstch) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mstch/vcpkg.json b/ports/mstch/vcpkg.json new file mode 100644 index 00000000000000..489584814bb9bc --- /dev/null +++ b/ports/mstch/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "mstch", + "version-string": "1.0.2", + "port-version": 3, + "description": "Mstch is a complete implementation of {{mustache}} templates using modern C++", + "homepage": "https://github.com/no1msd/mstch", + "dependencies": [ + "boost-variant" + ] +} diff --git a/ports/mujs/CONTROL b/ports/mujs/CONTROL deleted file mode 100644 index 1444af126ee44a..00000000000000 --- a/ports/mujs/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: mujs -Version: 2018-07-30-1 -Homepage: https://github.com/ccxvii/mujs -Description: An embeddable Javascript interpreter in C diff --git a/ports/mujs/portfile.cmake b/ports/mujs/portfile.cmake index f9eff13b5f67c2..3475307dc2770d 100644 --- a/ports/mujs/portfile.cmake +++ b/ports/mujs/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/mujs/vcpkg.json b/ports/mujs/vcpkg.json new file mode 100644 index 00000000000000..689ad0d5b19c1c --- /dev/null +++ b/ports/mujs/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "mujs", + "version-string": "2018-07-30", + "port-version": 2, + "description": "An embeddable Javascript interpreter in C", + "homepage": "https://github.com/ccxvii/mujs" +} diff --git a/ports/munit/fix-install.patch b/ports/munit/fix-install.patch new file mode 100644 index 00000000000000..6ba7461adabc9d --- /dev/null +++ b/ports/munit/fix-install.patch @@ -0,0 +1,13 @@ +diff --git a/meson.build b/meson.build +index c15b405..44ee737 100644 +--- a/meson.build ++++ b/meson.build +@@ -11,7 +11,7 @@ root_include = include_directories('.') + + munit = library('munit', + ['munit.c'], +- install: meson.is_subproject()) ++ install: not meson.is_subproject()) + + if meson.is_subproject() + munit_dep = declare_dependency( diff --git a/ports/munit/portfile.cmake b/ports/munit/portfile.cmake new file mode 100644 index 00000000000000..cf6d0df3cb5fe7 --- /dev/null +++ b/ports/munit/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nemequ/munit + REF da8f73412998e4f1adf1100dc187533a51af77fd + SHA512 cd08c1291a73487f15fdba7bf8675fea9177f0ec9766900f65efb5f00c662532a16499447e9087d304de34ff9138f47d04ebf18713f5aa8aacede22c5e23b98b + HEAD_REF master + PATCHES + fix-install.patch +) + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_meson() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/munit/vcpkg.json b/ports/munit/vcpkg.json new file mode 100644 index 00000000000000..ca60d49b7040bc --- /dev/null +++ b/ports/munit/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "munit", + "version-string": "2019-04-06", + "port-version": 2, + "description": "A small but full-featured unit testing framework for C", + "homepage": "https://github.com/nemequ/munit", + "supports": "!(arm | arm64 | uwp)", + "dependencies": [ + "tool-meson" + ] +} diff --git a/ports/muparser/CONTROL b/ports/muparser/CONTROL deleted file mode 100644 index 734214a49d04ff..00000000000000 --- a/ports/muparser/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: muparser -Version: 2.2.6.1 -Homepage: https://github.com/beltoforion/muparser -Description: Fast math parser library diff --git a/ports/muparser/portfile.cmake b/ports/muparser/portfile.cmake index aa38395987d4bd..db4bc987ef18b8 100644 --- a/ports/muparser/portfile.cmake +++ b/ports/muparser/portfile.cmake @@ -1,25 +1,26 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO beltoforion/muparser - REF v2.2.6.1 - SHA512 01bfc8cc48158c8413ae5e1da2ddbac1c9f0b9075470b1ab75853587d641dd195ebea268e1060a340098fd8015bc5f77d8e9cde5f81cffeade2f157c5f295496 - HEAD_REF master + OUT_SOURCE_PATH SOURCE_PATH + REPO beltoforion/muparser + REF 207d5b77c05c9111ff51ab91082701221220c477 # v2.3.2 + SHA512 75cebef831eeb08c92c08d2b29932a4af550edbda56c2adb6bc86b1228775294013a07d51974157b39460e60dab937b0b641553cd7ddeef72ba0b23f65c52bf4 + HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DENABLE_SAMPLES=OFF - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + OPTIONS + -DENABLE_SAMPLES=OFF + -DENABLE_OPENMP=OFF + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/muparser RENAME copyright) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/muparser/vcpkg.json b/ports/muparser/vcpkg.json new file mode 100644 index 00000000000000..2ba2aa091c6494 --- /dev/null +++ b/ports/muparser/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "muparser", + "version-string": "2.3.2", + "port-version": 1, + "description": "Fast math parser library", + "homepage": "https://github.com/beltoforion/muparser", + "supports": "!uwp" +} diff --git a/ports/murmurhash/CMakeLists.txt b/ports/murmurhash/CMakeLists.txt new file mode 100644 index 00000000000000..83ffe8154117bd --- /dev/null +++ b/ports/murmurhash/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.14) + +set(VERSION "1.0.0") +project(murmurhash LANGUAGES CXX VERSION ${VERSION}) + +set(CMAKE_CXX_STANDARD 17) + +add_library(murmurhash + src/MurmurHash2.cpp + src/MurmurHash3.cpp + ) + +set(MURMUR_HEADERS + src/MurmurHash2.h + src/MurmurHash3.h + ) +set_target_properties(murmurhash PROPERTIES + PUBLIC_HEADER "${MURMUR_HEADERS}" + ) + +#Configuration +set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(config_install_dir "lib/cmake/${PROJECT_NAME}") +set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") +set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") +set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") +set(namespace "${PROJECT_NAME}::") + +include(CMakePackageConfigHelpers) + +write_basic_package_version_file( + "${version_config}" COMPATIBILITY SameMajorVersion +) + +configure_package_config_file( + "${CMAKE_SOURCE_DIR}/Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION "${config_install_dir}" +) +#Installation +install(TARGETS murmurhash + EXPORT "${TARGETS_EXPORT_NAME}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + PUBLIC_HEADER DESTINATION "include") + +install(FILES "${project_config}" "${version_config}" + DESTINATION "${config_install_dir}" + ) +install(EXPORT "${TARGETS_EXPORT_NAME}" + NAMESPACE "${namespace}" + DESTINATION "${config_install_dir}" + ) \ No newline at end of file diff --git a/ports/murmurhash/Config.cmake.in b/ports/murmurhash/Config.cmake.in new file mode 100644 index 00000000000000..38bbde7b37fb35 --- /dev/null +++ b/ports/murmurhash/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/ports/murmurhash/portfile.cmake b/ports/murmurhash/portfile.cmake new file mode 100644 index 00000000000000..380570b2f21f18 --- /dev/null +++ b/ports/murmurhash/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aappleby/smhasher + REF 61a0530f28277f2e850bfc39600ce61d02b518de + SHA512 36877b53386153c20421ccd32d544c28ee72f6f13ea37c14ab1a1db378f6463db28339b2149671c12611384497bf595b798e99c34ea0ebceb6f9ef2f8908a2b6 + HEAD_REF master +) + +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) +configure_file(${CURRENT_PORT_DIR}/Config.cmake.in ${SOURCE_PATH}/Config.cmake.in COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "MurmurHash3 was written by Austin Appleby, and is placed in the public domain. The author hereby disclaims copyright to this source code.") diff --git a/ports/murmurhash/vcpkg.json b/ports/murmurhash/vcpkg.json new file mode 100644 index 00000000000000..98789370d04218 --- /dev/null +++ b/ports/murmurhash/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "murmurhash", + "version-string": "2016-01-09", + "port-version": 4, + "description": "MurmurHash a family of hash functions.", + "homepage": "https://github.com/aappleby/smhasher" +} diff --git a/ports/mygui/fix-generation.patch b/ports/mygui/fix-generation.patch new file mode 100644 index 00000000000000..9e517318a45ec9 --- /dev/null +++ b/ports/mygui/fix-generation.patch @@ -0,0 +1,55 @@ +diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt +index b0fc12a82..6e545edea 100644 +--- a/CMake/CMakeLists.txt ++++ b/CMake/CMakeLists.txt +@@ -5,7 +5,7 @@ + ############################################################# + + if(WIN32) +- set(MYGUI_CMAKE_DIR "CMake") ++ set(MYGUI_CMAKE_DIR "share") + else(WIN32) + set(MYGUI_CMAKE_DIR "lib/MYGUI/cmake") + endif(WIN32) +diff --git a/CMake/Utils/MyGUIConfigTargets.cmake b/CMake/Utils/MyGUIConfigTargets.cmake +index d1dbd016d..25c8bbac6 100644 +--- a/CMake/Utils/MyGUIConfigTargets.cmake ++++ b/CMake/Utils/MyGUIConfigTargets.cmake +@@ -6,10 +6,10 @@ if (WIN32) + set(MYGUI_RELWDBG_PATH "/RelWithDebInfo") + set(MYGUI_MINSIZE_PATH "/MinSizeRel") + set(MYGUI_DEBUG_PATH "/Debug") +- set(MYGUI_LIB_RELEASE_PATH "/Release") ++ set(MYGUI_LIB_RELEASE_PATH "") + set(MYGUI_LIB_RELWDBG_PATH "/RelWithDebInfo") + set(MYGUI_LIB_MINSIZE_PATH "/MinSizeRel") +- set(MYGUI_LIB_DEBUG_PATH "/Debug") ++ set(MYGUI_LIB_DEBUG_PATH "") + set(MYGUI_PLUGIN_PATH "/opt") + elseif (UNIX) + set(MYGUI_RELEASE_PATH "") +diff --git a/CMake/Utils/PrecompiledHeader.cmake b/CMake/Utils/PrecompiledHeader.cmake +index a8bf3ce49..104703282 100644 +--- a/CMake/Utils/PrecompiledHeader.cmake ++++ b/CMake/Utils/PrecompiledHeader.cmake +@@ -16,7 +16,7 @@ + macro(use_precompiled_header TARGET HEADER_FILE SRC_FILE) + get_filename_component(HEADER ${HEADER_FILE} NAME) + +- if (MSVC AND NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") ++ if (FALSE) + add_definitions(/Yu"${HEADER}") + set_source_files_properties(${SRC_FILE} + PROPERTIES COMPILE_FLAGS /Yc"${HEADER}" +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fea0bff8b..5831dfa8a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,7 @@ cmake_minimum_required(VERSION 2.6) + set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) + cmake_policy(SET CMP0003 NEW) + cmake_policy(SET CMP0011 NEW) ++cmake_policy(SET CMP0021 OLD) + + project(MYGUI) + diff --git a/ports/mygui/portfile.cmake b/ports/mygui/portfile.cmake new file mode 100644 index 00000000000000..3f3bd9016f3139 --- /dev/null +++ b/ports/mygui/portfile.cmake @@ -0,0 +1,44 @@ +# MyGUI supports compiling itself as a DLL, +# but it seems platform-related stuff doesn't support dynamic linkage +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MyGUI/mygui + REF 26109822f36a4f7d72d5d8ecd41659897f085a40 + SHA512 4d1f001e8c04d08ad911bc0345a2287b5e17e21284728cf23d7a930e8befb2f85902053e3c90283444bf9e32c7dada2f37c498e735d6314732b297d97ed339e4 + HEAD_REF master + PATCHES + fix-generation.patch +) + +if("opengl" IN_LIST FEATURES) + set(MYGUI_RENDERSYSTEM 4) +else() + set(MYGUI_RENDERSYSTEM 1) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMYGUI_STATIC=TRUE + -DMYGUI_BUILD_DEMOS=FALSE + -DMYGUI_BUILD_PLUGINS=TRUE + -DMYGUI_BUILD_TOOLS=FALSE + -DMYGUI_BUILD_UNITTESTS=FALSE + -DMYGUI_BUILD_TEST_APP=FALSE + -DMYGUI_BUILD_WRAPPER=FALSE + -DMYGUI_BUILD_DOCS=FALSE + -DMYGUI_RENDERSYSTEM=${MYGUI_RENDERSYSTEM} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/mygui/vcpkg.json b/ports/mygui/vcpkg.json new file mode 100644 index 00000000000000..28a32c06074bdc --- /dev/null +++ b/ports/mygui/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "mygui", + "version-string": "2020-06-17", + "port-version": 1, + "description": "Fast, flexible and simple GUI", + "homepage": "http://mygui.info", + "dependencies": [ + "freetype", + "sdl2-image" + ], + "features": { + "opengl": { + "description": "Use OpenGL render system.", + "dependencies": [ + "opengl" + ] + } + } +} diff --git a/ports/nameof/CONTROL b/ports/nameof/CONTROL deleted file mode 100644 index 35df482a05125d..00000000000000 --- a/ports/nameof/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nameof -Version: 2019-07-13 -Description: Nameof operator for modern C++ -Homepage: https://github.com/Neargye/nameof diff --git a/ports/nameof/portfile.cmake b/ports/nameof/portfile.cmake index 21dcf1b97d4e41..52230b40783804 100644 --- a/ports/nameof/portfile.cmake +++ b/ports/nameof/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Neargye/nameof - REF 9d335128265e443acf4e12ed40327e166cd8e3da - SHA512 3d4af0069fc3dbf9a4a79ae1bea282cafb69606936a66bf43b5a13ae2f0cbc88e98dbb02a12e9c211afd73d9807b36a6f09635a1922ce5faaeb2a148672a0b13 + REF v0.10.1 + SHA512 9b3ed7a3f5dcf1ad309341102d2aaa07fc8e9d6db7e08e42c2d9b5453c822ec16d6c6910adf7c4af8879c4084cac362f4fb4c07559cc49594b72b4917816ef5d HEAD_REF master ) @@ -16,16 +14,14 @@ vcpkg_configure_cmake( OPTIONS -DNAMEOF_OPT_BUILD_EXAMPLES=OFF -DNAMEOF_OPT_BUILD_TESTS=OFF + -DNAMEOF_OPT_INSTALL=ON ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nameof TARGET_PATH share/nameof) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/nameof/vcpkg.json b/ports/nameof/vcpkg.json new file mode 100644 index 00000000000000..78bce0d8e056a8 --- /dev/null +++ b/ports/nameof/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "nameof", + "version-string": "0.10.1", + "port-version": 1, + "description": "Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum.", + "homepage": "https://github.com/Neargye/nameof" +} diff --git a/ports/nana/CMakeLists.txt b/ports/nana/CMakeLists.txt index 7cd9865dcb60af..c66ce66b52bdb5 100644 --- a/ports/nana/CMakeLists.txt +++ b/ports/nana/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(nana VERSION 1.5.5 LANGUAGES CXX) +project(nana VERSION 1.7.4 LANGUAGES CXX) option(NANA_ENABLE_PNG "Enable PNG support" OFF) option(NANA_ENABLE_JPEG "Enable JPEG support" OFF) @@ -26,7 +26,7 @@ target_include_directories(nana PUBLIC $ $) -target_compile_features(nana PUBLIC cxx_std_14) +target_compile_features(nana PUBLIC cxx_std_17) if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_link_libraries(nana PUBLIC c++experimental) @@ -47,8 +47,8 @@ if(UNIX) target_include_directories(nana PUBLIC ${X11_INCLUDE_DIR}) target_link_libraries(nana PUBLIC ${X11_LIBRARIES} ${X11_Xft_LIB}) - find_library(FONTCONFIG_LIB NAMES fontconfig) - target_link_libraries(nana PUBLIC ${FONTCONFIG_LIB}) + find_package(Fontconfig REQUIRED) + target_link_libraries(nana PUBLIC Fontconfig::Fontconfig) endif() if(NANA_ENABLE_PNG) diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL deleted file mode 100644 index 4038c6f9edc855..00000000000000 --- a/ports/nana/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: nana -Version: 1.7.1-1 -Homepage: https://github.com/cnjinhao/nana -Description: Cross-platform library for GUI programming in modern C++ style. -Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows) diff --git a/ports/nana/config.cmake.in b/ports/nana/config.cmake.in index 8a18bbdf476fa6..86d70cc69a1d20 100644 --- a/ports/nana/config.cmake.in +++ b/ports/nana/config.cmake.in @@ -1,26 +1,30 @@ @PACKAGE_INIT@ +include(CMakeFindDependencyMacro) if(UNIX) - find_package(Threads REQUIRED) - find_package(Freetype REQUIRED) - find_package(X11 REQUIRED) - find_library(FONTCONFIG_LIB NAMES fontconfig) + find_dependency(Threads) + find_dependency(Freetype) + find_dependency(X11) + find_dependency(Fontconfig) endif() -if(@NANA_ENABLE_PNG@) - find_package(PNG REQUIRED) +option(NANA_ENABLE_PNG "Enable PNG support" @NANA_ENABLE_PNG@) +option(NANA_ENABLE_JPEG "Enable JPEG support" @NANA_ENABLE_JPEG@) + +if(NANA_ENABLE_PNG) + find_dependency(PNG) endif() -if(@NANA_ENABLE_JPEG@) - find_package(JPEG REQUIRED) +if(NANA_ENABLE_JPEG) + find_dependency(JPEG) endif() include("${CMAKE_CURRENT_LIST_DIR}/unofficial-nana-targets.cmake") if(UNIX) - target_link_libraries(unofficial::nana::nana INTERFACE ${FONTCONFIG_LIB} ${X11_LIBRARIES} ${X11_Xft_LIB}) + target_link_libraries(unofficial::nana::nana INTERFACE Fontconfig::Fontconfig ${X11_LIBRARIES} ${X11_Xft_LIB}) endif() -if(@NANA_ENABLE_JPEG@) +if(NANA_ENABLE_JPEG) target_link_libraries(unofficial::nana::nana INTERFACE ${JPEG_LIBRARIES}) endif() diff --git a/ports/nana/fix-build-error.patch b/ports/nana/fix-build-error.patch index 3894f9600eb286..d007143dc04b70 100644 --- a/ports/nana/fix-build-error.patch +++ b/ports/nana/fix-build-error.patch @@ -1,12 +1,13 @@ -diff --git a/include/nana/filesystem/filesystem.hpp b/include/nana/filesystem/filesystem.hpp -index 86b907a..ea8db75 100644 ---- a/include/nana/filesystem/filesystem.hpp -+++ b/include/nana/filesystem/filesystem.hpp -@@ -30,6 +30,7 @@ - #ifndef NANA_FILESYSTEM_HPP - #define NANA_FILESYSTEM_HPP - #include -+#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING +diff --git a/source/system/split_string.cpp b/source/system/split_string.cpp +index 8269db6..c40016b 100644 +--- a/source/system/split_string.cpp ++++ b/source/system/split_string.cpp +@@ -18,7 +18,7 @@ std::vector split_string (const split_string_type& text, char + sep_pos = text.find(sep, sep_pos); + sep_pos = (text.npos == sep_pos ? text.size() : sep_pos); + const std::size_t end = sep_pos; +- while (sep_pos < text.size() and sep == text[sep_pos]) { ++ while (sep_pos < text.size() && sep == text[sep_pos]) { + ++sep_pos; + } - //Filesystem Selection - #include diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index fa08158138092d..8aa0cbe26cbabd 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -1,16 +1,14 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(WARNING "You will need to install Xorg dependencies to use nana:\napt install libx11-dev libxft-dev\n") +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(WARNING "You will need to install Xorg dependencies to use nana:\napt install libx11-dev libxft-dev libxcursor-dev\n") endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cnjinhao/nana - REF v1.7.1 - SHA512 43bd6f6321557184431935b4fdd636427458e79333879f6310685a70ee25f4344851910e67c52145382c38a3cea9d1761b40c8edbc072a7cc9c62406ed402549 + REF 554c4fe87fc31b8ee104228e9117d545d34855b5 # v1.7.4 + SHA512 d9db8ea1bd47fe663b8e2443a1a3e279760dbd11ef6bc78d9dc8f6fd12f9736b8c8315dfc84d21325e02ad6b2dc3a429593ac80e7610097ddc7253668c383178 HEAD_REF develop PATCHES fix-build-error.patch @@ -34,5 +32,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-nana TARGET_PATH share/un vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nana) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/nana/LICENSE ${CURRENT_PACKAGES_DIR}/share/nana/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/nana/vcpkg.json b/ports/nana/vcpkg.json new file mode 100644 index 00000000000000..c82984e8756654 --- /dev/null +++ b/ports/nana/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "nana", + "version-string": "1.7.4", + "port-version": 2, + "description": "Cross-platform library for GUI programming in modern C++ style.", + "homepage": "https://github.com/cnjinhao/nana", + "dependencies": [ + { + "name": "fontconfig", + "platform": "!uwp & !windows & !mingw" + }, + { + "name": "freetype", + "platform": "!uwp & !windows & !mingw" + }, + "libjpeg-turbo", + "libpng" + ] +} diff --git a/ports/nano-signal-slot/CONTROL b/ports/nano-signal-slot/CONTROL deleted file mode 100644 index dbccb32b7a3ff3..00000000000000 --- a/ports/nano-signal-slot/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: nano-signal-slot -Version: commit-25aa2aa90d450d3c7550c535c7993a9e2ed0764a -Description: Pure C++17 Signals and Slots diff --git a/ports/nano-signal-slot/portfile.cmake b/ports/nano-signal-slot/portfile.cmake index 55a879d1d60fe8..ea4f9366de1940 100644 --- a/ports/nano-signal-slot/portfile.cmake +++ b/ports/nano-signal-slot/portfile.cmake @@ -1,22 +1,12 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage( - ONLY_STATIC_LIBRARY -) - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds not supported yet.") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO NoAvailableAlias/nano-signal-slot - REF 25aa2aa90d450d3c7550c535c7993a9e2ed0764a - SHA512 35dc9d0d9cce116a5bcea59ab9562c87dba9f6db999807ccbef7df1fb05513eaa71132ba2996eb43f0f241288096419892ac31a400ec6cb5013438e6b670194d + REF 7e237d75e72501109d1276d7c0c97b33e9d7caf1 + SHA512 a998e59bfded36d9fe2c88d8f3c5229db4fa3c02062f218267f070f4809f63d0bad07300d3cf1f60141ab84bb1802402ac11de06159df6af460f0be4c47f8b9a HEAD_REF master ) file(GLOB INCLUDES ${SOURCE_PATH}/*.hpp) file(INSTALL ${INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nano-signal-slot RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/nano-signal-slot/vcpkg.json b/ports/nano-signal-slot/vcpkg.json new file mode 100644 index 00000000000000..55e08710650cd5 --- /dev/null +++ b/ports/nano-signal-slot/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "nano-signal-slot", + "version-string": "2.0.1", + "port-version": 1, + "description": "Pure C++17 Signals and Slots", + "homepage": "https://github.com/NoAvailableAlias/nano-signal-slot", + "supports": "!uwp" +} diff --git a/ports/nanobench/portfile.cmake b/ports/nanobench/portfile.cmake new file mode 100644 index 00000000000000..86b144ca5f102b --- /dev/null +++ b/ports/nanobench/portfile.cmake @@ -0,0 +1,16 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinus/nanobench + REF ee8b36e956bb2b8753dd1f6732b4d9d90afb09f9 #v4.3.0 + SHA512 46807f3b945d062dd3c829ec349cc892f9b2334c8a3c74c1225b0cd918af6864a1e539ac2bbad0ee6e20d285b5ad8e307e72996f2531377c55683cb0593ed3e7 + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/src/include/nanobench.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nanobench/vcpkg.json b/ports/nanobench/vcpkg.json new file mode 100644 index 00000000000000..d8c6a583ee55d3 --- /dev/null +++ b/ports/nanobench/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "nanobench", + "version-string": "4.3.0", + "port-version": 1, + "description": "Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20", + "homepage": "https://nanobench.ankerl.com" +} diff --git a/ports/nanodbc/CONTROL b/ports/nanodbc/CONTROL deleted file mode 100644 index 20c7c28b56195f..00000000000000 --- a/ports/nanodbc/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nanodbc -Version: 2.12.4-4 -Homepage: https://github.com/lexicalunit/nanodbc -Description: A small C++ wrapper for the native C ODBC API. diff --git a/ports/nanodbc/portfile.cmake b/ports/nanodbc/portfile.cmake index 0b31d6f6fe606b..dfdba7caa9ff2e 100644 --- a/ports/nanodbc/portfile.cmake +++ b/ports/nanodbc/portfile.cmake @@ -1,36 +1,38 @@ -include(vcpkg_common_functions) - # Only static libraries are supported. # See https://github.com/nanodbc/nanodbc/issues/13 vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nanodbc/nanodbc - REF fe1d590991da30dc9cb71676c4d80cb2d9acb49e - SHA512 9c7e638b15b3c7ce418374c22a76be4f3f5901e7736938a8b0549b312bb7fa80bc8d34b2a52242a5b94196bb0994481a36e043a4f71cdc1d9af778915d017ac2 + REF 7404a4dd7697e188df5724ab95a7553d2fc404eb # v2.13.0 + SHA512 35ca098e783d771f3df611bce84e9b8207a6a5b72c492d2f3909977bc91a7c22bb262c34768b0d97ebfbdf12eeda0214064a8ea171e7bdda7b759f93ff346f45 HEAD_REF master + PATCHES rename-version.patch ) +file(RENAME "${SOURCE_PATH}/VERSION" "${SOURCE_PATH}/VERSION.txt") + +if(DEFINED NANODBC_ODBC_VERSION) + set(NANODBC_ODBC_VERSION -DNANODBC_ODBC_VERSION=${NANODBC_ODBC_VERSION}) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -# Legacy, remove at release of v2.13 - -DNANODBC_EXAMPLES=OFF - -DNANODBC_TEST=OFF - -DNANODBC_USE_UNICODE=ON -# /Legacy -DNANODBC_DISABLE_EXAMPLES=ON -DNANODBC_DISABLE_TESTS=ON - -DNANODBC_ENABLE_UNICODE=ON + -DNANODBC_ENABLE_UNICODE=OFF + ${NANODBC_ODBC_VERSION} ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) +if(VCPKG_TARGET_IS_WINDOWS) vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanodbc RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nanodbc/rename-version.patch b/ports/nanodbc/rename-version.patch new file mode 100644 index 00000000000000..a236cf896172b5 --- /dev/null +++ b/ports/nanodbc/rename-version.patch @@ -0,0 +1,13 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,8 +20,8 @@ + ######################################## + ## nanodbc version + ######################################## +-file(STRINGS VERSION NANODBC_VERSION REGEX "[0-9]+\\.[0-9]+\\.[0-9]+") ++file(STRINGS "VERSION.txt" NANODBC_VERSION REGEX "[0-9]+\\.[0-9]+\\.[0-9]+") + string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" NANODBC_VERSION_MAJOR "${NANODBC_VERSION}") + string(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" NANODBC_VERSION_MINOR "${NANODBC_VERSION}") + string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" NANODBC_VERSION_PATCH "${NANODBC_VERSION}") + message(STATUS "nanodbc version: ${NANODBC_VERSION}") + diff --git a/ports/nanodbc/vcpkg.json b/ports/nanodbc/vcpkg.json new file mode 100644 index 00000000000000..d577f7e8afd38a --- /dev/null +++ b/ports/nanodbc/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "nanodbc", + "version": "2.13.0", + "port-version": 4, + "description": "A small C++ wrapper for the native C ODBC API.", + "homepage": "https://github.com/nanodbc/nanodbc", + "dependencies": [ + { + "name": "unixodbc", + "platform": "!windows" + } + ] +} diff --git a/ports/nanoflann/portfile.cmake b/ports/nanoflann/portfile.cmake new file mode 100644 index 00000000000000..20c372cd10d3d1 --- /dev/null +++ b/ports/nanoflann/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jlblancoc/nanoflann + REF e8792e464ab05267216acde8b4ddf301714176a2 #1.3.1 + SHA512 78a04d39b418b6c6582e6d4180958bb0b492547a9662026da07a8b75d7186140bc4d6b50b6eece32db0196607cfcc901aaf4b458e9ab8a9a115b569acc2bae40 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT} TARGET_PATH share/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/nanoflann/vcpkg.json b/ports/nanoflann/vcpkg.json new file mode 100644 index 00000000000000..1c9afca8b1b86e --- /dev/null +++ b/ports/nanoflann/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "nanoflann", + "version-string": "1.3.1", + "port-version": 1, + "description": "nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups).", + "homepage": "https://github.com/jlblancoc/nanoflann" +} diff --git a/ports/nanogui/fix-cmakelists.patch b/ports/nanogui/fix-cmakelists.patch new file mode 100644 index 00000000000000..cc4aa05afc25da --- /dev/null +++ b/ports/nanogui/fix-cmakelists.patch @@ -0,0 +1,72 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8c59277..3fe6f5d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,11 +11,7 @@ if (POLICY CMP0058) + cmake_policy(SET CMP0058 NEW) + endif() + +-if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ext/glfw/src") +- message(FATAL_ERROR "The NanoGUI dependency repositories (GLFW, etc.) are missing! " +- "You probably did not clone the project with --recursive. It is possible to recover " +- "by calling \"git submodule update --init --recursive\"") +-endif() ++ + + if (WIN32) + set(NANOGUI_USE_GLAD_DEFAULT ON) +@@ -78,13 +74,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations") + endif() + +-add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/ext/glfw" "ext_build/glfw") + # Two targets have now been defined: `glfw_objects`, which will be merged into + # NanoGUI at the end, and `glfw`. The `glfw` target is the library itself + # (e.g., libglfw.so), but can be skipped as we do not need to link against it + # (because we merge `glfw_objects` into NanoGUI). Skipping is required for + # XCode, but preferable for all build systems (reduces build artifacts). +-set_target_properties(glfw PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1) + + # Python support: add NANOGUI_PYTHON flag to all targets + if (NANOGUI_BUILD_PYTHON) +@@ -310,7 +304,6 @@ add_definitions(${NANOGUI_EXTRA_DEFS}) + # Compile main NanoGUI library + add_library(nanogui-obj OBJECT + # Merge NanoVG into the NanoGUI library +- ext/nanovg/src/nanovg.c + # Merge GLAD into the NanoGUI library (only if needed) + ${LIBNANOGUI_EXTRA_SOURCE} + # Fonts etc. +@@ -352,6 +345,11 @@ add_library(nanogui-obj OBJECT + src/serializer.cpp + ) + ++find_path(EIGEN_INCLUDE_DIR Eigen/Core) ++target_include_directories(nanogui-obj PRIVATE ${EIGEN_INCLUDE_DIR}) ++find_path(STB_INCLUDE_DIR stb_image.h) ++target_include_directories(nanogui-obj PRIVATE ${STB_INCLUDE_DIR}) ++ + # XCode has a serious bug where the XCode project produces an invalid target + # that will not get linked if it consists only of objects from object libraries, + # it will not generate any products (executables, libraries). The only work +@@ -363,15 +361,18 @@ if (CMAKE_GENERATOR STREQUAL Xcode) + add_library(nanogui ${NANOGUI_LIBRARY_TYPE} + ${XCODE_DUMMY} + $ +- $ + ) + else() + add_library(nanogui ${NANOGUI_LIBRARY_TYPE} + $ +- $ + ) + endif() + ++find_package(nanovg CONFIG REQUIRED) ++find_package(Eigen3 CONFIG REQUIRED) ++find_package(glfw3 CONFIG REQUIRED) ++target_link_libraries(nanogui glfw nanovg::nanovg Eigen3::Eigen) ++ + if (NANOGUI_BUILD_SHARED) + set_property(TARGET nanogui-obj PROPERTY POSITION_INDEPENDENT_CODE ON) + endif() diff --git a/ports/nanogui/portfile.cmake b/ports/nanogui/portfile.cmake new file mode 100644 index 00000000000000..06c899c5e790ec --- /dev/null +++ b/ports/nanogui/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wjakob/nanogui + REF e9ec8a1a9861cf578d9c6e85a6420080aa715c03 #Commits on Sep 23, 2019 + SHA512 36c93bf977862ced2df4030211e2b83625e60a11fc9fdb6c1f2996bb234758331d3f41a7fbafd25a5bca0239ed9bac9c93446a4a7fac4c5e6d7943af2be3e14a + HEAD_REF master + PATCHES + fix-cmakelists.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DNANOGUI_EIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 + -DEIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/nanogui/vcpkg.json b/ports/nanogui/vcpkg.json new file mode 100644 index 00000000000000..c4c7b43254aae1 --- /dev/null +++ b/ports/nanogui/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "nanogui", + "version-string": "2019-09-23", + "port-version": 2, + "description": "NanoGUI is a minimalistic cross-platform widget library for OpenGL 3.x or higher.", + "homepage": "https://github.com/wjakob/nanogui", + "supports": "!uwp", + "dependencies": [ + "eigen3", + "glfw3", + "nanovg" + ] +} diff --git a/ports/nanomsg/CONTROL b/ports/nanomsg/CONTROL deleted file mode 100644 index 8693cfef3514c0..00000000000000 --- a/ports/nanomsg/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: nanomsg -Version: 1.1.5-1 -Description: a simple high-performance implementation of several "scalability protocols". - These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket. - -Feature: tool -Description: nanomsg tool (nanocat) diff --git a/ports/nanomsg/portfile.cmake b/ports/nanomsg/portfile.cmake index d07685f6099939..49fdab38e7c094 100644 --- a/ports/nanomsg/portfile.cmake +++ b/ports/nanomsg/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nanomsg/nanomsg @@ -41,30 +39,12 @@ vcpkg_replace_string( ) if(NN_ENABLE_NANOCAT) - if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") - else() - set(EXECUTABLE_SUFFIX "") - endif() - - file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/nanocat${EXECUTABLE_SUFFIX} - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - - file(REMOVE - ${CURRENT_PACKAGES_DIR}/bin/nanocat${EXECUTABLE_SUFFIX} - ${CURRENT_PACKAGES_DIR}/debug/bin/nanocat${EXECUTABLE_SUFFIX} - ) + vcpkg_copy_tools(TOOL_NAMES nanocat AUTO_CLEAN) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin - ) - vcpkg_replace_string( ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h "defined(NN_STATIC_LIB)" diff --git a/ports/nanomsg/vcpkg.json b/ports/nanomsg/vcpkg.json new file mode 100644 index 00000000000000..4ed0ef1c5f8df4 --- /dev/null +++ b/ports/nanomsg/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "nanomsg", + "version-string": "1.1.5", + "port-version": 3, + "description": [ + "a simple high-performance implementation of several \"scalability protocols\".", + "These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket." + ], + "features": { + "tool": { + "description": "nanomsg tool (nanocat)" + } + } +} diff --git a/ports/nanopb/CONTROL b/ports/nanopb/CONTROL deleted file mode 100644 index 40d18ea9edca33..00000000000000 --- a/ports/nanopb/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: nanopb -Version: 2019-02-12-2 -Description: A small code-size Protocol Buffers implementation in ANSI C. diff --git a/ports/nanopb/fix-python.patch b/ports/nanopb/fix-python.patch new file mode 100644 index 00000000000000..f82293099958b1 --- /dev/null +++ b/ports/nanopb/fix-python.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d9c5e5e..4e94bb7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,6 @@ endif() + if(nanopb_BUILD_GENERATOR) + set(generator_protos nanopb) + +- find_package(Python REQUIRED) + execute_process( + COMMAND ${Python_EXECUTABLE} -c + "from distutils import sysconfig; print(sysconfig.get_python_lib(prefix=''))" +@@ -64,10 +63,10 @@ if(nanopb_BUILD_GENERATOR) + DESTINATION ${PYTHON_INSTDIR}/proto/ + ) + endforeach() ++ install( FILES generator/proto/_utils.py ++ DESTINATION ${PYTHON_INSTDIR}/proto/ ) + endif() + +-install( FILES generator/proto/_utils.py +- DESTINATION ${PYTHON_INSTDIR}/proto/ ) + + if( WIN32 ) + install( diff --git a/ports/nanopb/portfile.cmake b/ports/nanopb/portfile.cmake index 35d662c40a8169..cd79b8775f5980 100644 --- a/ports/nanopb/portfile.cmake +++ b/ports/nanopb/portfile.cmake @@ -1,32 +1,37 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -message(WARNING "\ -The nanopb's code generator is not installed as part of the installation \ -currently. So you have to run the code generator manually." -) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nanopb/nanopb - REF d1305ddef1c18b4cb33992254494ccd255701aaa - SHA512 70e588b0ff13846005658a9fafe57551dc2c126a32f351fe0b6c166c142c42b3bcc44567288f609f2f3a5adc1fe1bf1c585fec8c5fe90817b5b3ab47955aa1fc + REF 0.4.5 + SHA512 2f24308440bd961a94449e253627fbe38f6c5217cd70c57e9b3ab702da3c2df03b087ccdd62518940acf6b480a1dbb440ca5681f1766a17b199010d3df7b17a1 HEAD_REF master + PATCHES + fix-python.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" nanopb_BUILD_STATIC_LIBS) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" nanopb_STATIC_LINKING) + + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + generator nanopb_BUILD_GENERATOR ) -string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" BUILD_STATIC_LIBS) +vcpkg_find_acquire_program(PYTHON3) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DPython_EXECUTABLE=${PYTHON3} -Dnanopb_BUILD_RUNTIME=ON - -Dnanopb_BUILD_GENERATOR=OFF - -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} - -Dnanopb_MSVC_STATIC_RUNTIME=OFF + -DBUILD_STATIC_LIBS=${nanopb_BUILD_STATIC_LIBS} + -Dnanopb_MSVC_STATIC_RUNTIME=${nanopb_STATIC_LINKING} + -Dnanopb_PROTOC_PATH=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX} + ${FEATURE_OPTIONS} ) - vcpkg_install_cmake() vcpkg_copy_pdbs() @@ -35,5 +40,18 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(nanopb_BUILD_GENERATOR) + file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/nanopb_generator.py" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + if(WIN32) + file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/protoc-gen-nanopb.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + file(INSTALL "${CURRENT_PACKAGES_DIR}/Lib/site-packages/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/site-packages") + else() + file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/protoc-gen-nanopb" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + endif() +endif() + +if(nanopb_BUILD_STATIC_LIBS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() # Handle copyright configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/nanopb/vcpkg.json b/ports/nanopb/vcpkg.json new file mode 100644 index 00000000000000..dad0eff55b36e4 --- /dev/null +++ b/ports/nanopb/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "nanopb", + "version-semver": "0.4.5", + "description": "A small code-size Protocol Buffers implementation in ANSI C.", + "homepage": "https://jpa.kapsi.fi/nanopb/", + "features": { + "generator": { + "description": "build the generator", + "dependencies": [ + { + "name": "protobuf", + "host": true + } + ] + } + } +} diff --git a/ports/nanoprintf/portfile.cmake b/ports/nanoprintf/portfile.cmake new file mode 100644 index 00000000000000..7587949e19a0ca --- /dev/null +++ b/ports/nanoprintf/portfile.cmake @@ -0,0 +1,12 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO charlesnicholson/nanoprintf + REF b210b50a2b8608e2f0226b47a8f82c3476177a4f + SHA512 8340bf3785a8609568188e28e3fb905007d6da052f860df02fe0b8b2fdef3ca1ac87b91f7ac203fbd7235bcd50c8a63f33b2fca2854cad1351899c59cd8d7646 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/nanoprintf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nanoprintf/vcpkg.json b/ports/nanoprintf/vcpkg.json new file mode 100644 index 00000000000000..9828d6baa28eea --- /dev/null +++ b/ports/nanoprintf/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "nanoprintf", + "version-string": "2020-05-27", + "port-version": 1, + "description": "A tiny embeddable printf replacement written in C99", + "homepage": "https://github.com/charlesnicholson/nanoprintf" +} diff --git a/ports/nanorange/CONTROL b/ports/nanorange/CONTROL deleted file mode 100644 index 0ff1b400feb619..00000000000000 --- a/ports/nanorange/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: nanorange -Version: 0.0.0 -Description: NanoRange is a C++14 implementation of the C++20 Ranges proposals. \ No newline at end of file diff --git a/ports/nanorange/portfile.cmake b/ports/nanorange/portfile.cmake index aa039c3cf6d47a..c516ecb80c1b0e 100644 --- a/ports/nanorange/portfile.cmake +++ b/ports/nanorange/portfile.cmake @@ -1,6 +1,4 @@ # header-only -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tcbrindle/NanoRange diff --git a/ports/nanorange/vcpkg.json b/ports/nanorange/vcpkg.json new file mode 100644 index 00000000000000..7ed217cb00007a --- /dev/null +++ b/ports/nanorange/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "nanorange", + "version-string": "0.0.0", + "port-version": 1, + "description": "NanoRange is a C++14 implementation of the C++20 Ranges proposals." +} diff --git a/ports/nanort/portfile.cmake b/ports/nanort/portfile.cmake new file mode 100644 index 00000000000000..d6e774a5263c00 --- /dev/null +++ b/ports/nanort/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lighttransport/nanort + REF c85fe7a10be5baf8242c81288718c244f25d0183 + SHA512 0917ffdc51db9d5f936fc79d5b3d1886c5163470e650a2613200417a9e7a344b75c76c115f64160877d6a3480f7eda7884f3097927eb371267cc6d3c30afed37 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/nanort.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/nanort/vcpkg.json b/ports/nanort/vcpkg.json new file mode 100644 index 00000000000000..c91db27aeabf11 --- /dev/null +++ b/ports/nanort/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "nanort", + "version-string": "2019-08-20", + "port-version": 2, + "description": "Single header only modern ray tracing kernel", + "homepage": "https://github.com/lighttransport/nanort" +} diff --git a/ports/nanovg/CMakeLists.txt b/ports/nanovg/CMakeLists.txt index 87a7d3339bb020..8caf73238e253e 100644 --- a/ports/nanovg/CMakeLists.txt +++ b/ports/nanovg/CMakeLists.txt @@ -1,11 +1,13 @@ cmake_minimum_required(VERSION 3.11) project(nanovg C) +find_path(STB_INCLUDES stb_image.h include) + set(NANOVG_SOURCES src/nanovg.c) set(NANOVG_HEADERS src/nanovg.h src/nanovg_gl.h src/nanovg_gl_utils.h) add_library(nanovg STATIC ${NANOVG_SOURCES} ${NANOVG_HEADERS}) set_target_properties(nanovg PROPERTIES PUBLIC_HEADER "${NANOVG_HEADERS}") -target_include_directories(nanovg PRIVATE 3rdparty/nanovg/src) +target_include_directories(nanovg PRIVATE ${STB_INCLUDES}) if(CMAKE_BUILD_TYPE STREQUAL "Debug") target_compile_definitions(nanovg PRIVATE DEBUG) @@ -25,7 +27,6 @@ install(EXPORT nanovgTargets NAMESPACE nanovg:: DESTINATION share/nanovg) -include(CMakePackageConfigHelpers) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/nanovgConfig.cmake DESTINATION share/nanovg) diff --git a/ports/nanovg/CONTROL b/ports/nanovg/CONTROL deleted file mode 100644 index c074c182460ec3..00000000000000 --- a/ports/nanovg/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: nanovg -Version: master -Description: NanoVG is small antialiased vector graphics rendering library for OpenGL. diff --git a/ports/nanovg/portfile.cmake b/ports/nanovg/portfile.cmake index 39e36720e19759..6a838808bb0da4 100644 --- a/ports/nanovg/portfile.cmake +++ b/ports/nanovg/portfile.cmake @@ -1,34 +1,24 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# +vcpkg_fail_port_install(ON_TARGET "UWP") -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO memononen/nanovg - REF f4069e6a1ad5da430fb0a9c57476d5ddc2ff89b2 - SHA512 5f2313be939478d40e52c74e3935cbae91277be5c0e466a6d303e8d80e7bf0781288cb319b2e8cec5c7d6fc991be16bec6e0f5228153895ff7fe3abdffe5320e + REF 1f9c8864fc556a1be4d4bf1d6bfe20cde25734b4 + SHA512 99a44f01114ee653a966d4695596886240752f5a06d540c408b5aeaebdcc5360fc2043276515695580d048649a20dc50409107f89c4ce506d2ccb83a0635d29f HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/nanovgConfig.cmake DESTINATION ${SOURCE_PATH}) +file(GLOB STB_SRCS ${SOURCE_PATH}/src/stb_*) +if(STB_SRCS) + file(REMOVE_RECURSE ${STB_SRCS}) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA ) vcpkg_install_cmake() @@ -37,5 +27,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -# Handle copyright - file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanovg RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nanovg/vcpkg.json b/ports/nanovg/vcpkg.json new file mode 100644 index 00000000000000..39e3cd017f68bd --- /dev/null +++ b/ports/nanovg/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "nanovg", + "version-string": "2019-8-30", + "port-version": 4, + "description": "NanoVG is small antialiased vector graphics rendering library for OpenGL.", + "homepage": "https://github.com/memononen/nanovg", + "dependencies": [ + "stb" + ] +} diff --git a/ports/nativefiledialog/CMakeLists.txt b/ports/nativefiledialog/CMakeLists.txt new file mode 100644 index 00000000000000..30c9814b1851e8 --- /dev/null +++ b/ports/nativefiledialog/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required(VERSION 3.14) + +project(nfd LANGUAGES C) + +include(GNUInstallDirs) + +option(NFD_GTK_BACKEND "Using GTK backend" ON) + +file(GLOB nfd_sources + "${PROJECT_SOURCE_DIR}/src/*.h" + "${PROJECT_SOURCE_DIR}/src/include/*.h" + "${PROJECT_SOURCE_DIR}/src/nfd_common.c" +) + +if (WIN32) + enable_language(CXX) + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_win.cpp") +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + if (NFD_GTK_BACKEND) + find_package(GTK3 QUIET) + if (GTK3_FOUND) + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_gtk.c") + else () + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_zenity.c") + endif () + else () + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_zenity.c") + endif () +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_cocoa.m") +endif () + +add_library(nfd ${nfd_sources}) + +set_target_properties( + nfd + PROPERTIES + DEBUG_POSTFIX "_d" + PUBLIC_HEADER ${CMAKE_CURRENT_LIST_DIR}/src/include/nfd.h +) + +target_compile_definitions( + nfd + PRIVATE + $<$:_CRT_SECURE_NO_WARNINGS> +) + +target_include_directories(nfd PRIVATE + $) + +target_include_directories(nfd INTERFACE + $) + +if (GTK3_FOUND) + target_include_directories(nfd PUBLIC ${GTK3_INCLUDE_DIRS}) + target_link_libraries(nfd PUBLIC ${GTK3_LIBRARIES}) +endif () + +install(TARGETS nfd EXPORT unofficial-nativefiledialog-config) + +install( + EXPORT unofficial-nativefiledialog-config + NAMESPACE unofficial::nativefiledialog:: + DESTINATION share/unofficial-nativefiledialog + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/ports/nativefiledialog/portfile.cmake b/ports/nativefiledialog/portfile.cmake new file mode 100644 index 00000000000000..c31caab408c300 --- /dev/null +++ b/ports/nativefiledialog/portfile.cmake @@ -0,0 +1,38 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mlabbe/nativefiledialog + REF ceb75f7abf30736aa8ee4800cde0d444c798f8b9 + SHA512 dd2bff28bb08fb1f6b07ad28530da039f176fb641e300b816040a2b2b840611e418cad44fdaf395ec565c50149ce58c80f88f6a77b403b843f2b14f1f2c91d7d + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES "zenity" NFD_GTK_BACKEND +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH share/unofficial-${PORT}) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/nativefiledialog/vcpkg.json b/ports/nativefiledialog/vcpkg.json new file mode 100644 index 00000000000000..a9fb973797db15 --- /dev/null +++ b/ports/nativefiledialog/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "nativefiledialog", + "version-date": "2019-08-28", + "port-version": 1, + "description": "A tiny, neat C library that portably invokes native file open and save dialogs", + "homepage": "https://github.com/mlabbe/nativefiledialog", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "zenity": { + "description": "Using Zenity backend on Linux" + } + } +} diff --git a/ports/nccl/FindNCCL.cmake b/ports/nccl/FindNCCL.cmake new file mode 100644 index 00000000000000..771cd65cd4fca2 --- /dev/null +++ b/ports/nccl/FindNCCL.cmake @@ -0,0 +1,97 @@ +# Find the nccl libraries +# +# The following variables are optionally searched for defaults +# NCCL_ROOT: Base directory where all NCCL components are found +# NCCL_INCLUDE_DIR: Directory where NCCL header is found +# NCCL_LIB_DIR: Directory where NCCL library is found +# +# The following are set after configuration is done: +# NCCL_FOUND +# NCCL_INCLUDE_DIRS +# NCCL_LIBRARIES +# +# Adapted from https://github.com/pytorch/pytorch/blob/master/cmake/Modules/FindNCCL.cmake + +set(NCCL_INCLUDE_DIR $ENV{NCCL_INCLUDE_DIR} CACHE PATH "Folder contains NVIDIA NCCL headers") +set(NCCL_LIB_DIR $ENV{NCCL_LIB_DIR} CACHE PATH "Folder contains NVIDIA NCCL libraries") +set(_NCCL_VERSION $ENV{NCCL_VERSION} CACHE STRING "Version of NCCL to build with") + +list(APPEND NCCL_ROOT $ENV{NCCL_ROOT_DIR} ${CUDA_TOOLKIT_ROOT_DIR}) +# Compatible layer for CMake <3.12. NCCL_ROOT will be accounted in for searching paths and libraries for CMake >=3.12. +list(APPEND CMAKE_PREFIX_PATH ${NCCL_ROOT}) + +find_path(NCCL_INCLUDE_DIRS + NAMES nccl.h + HINTS + ${NCCL_INCLUDE_DIR} + $ENV{CUDNN_ROOT_DIR} + $ENV{CUDA_PATH} + $ENV{CUDNN_ROOT_DIR} + $ENV{CUDA_TOOLKIT_ROOT_DIR} + $ENV{NCCL} + /usr/include + PATH_SUFFIXES + include +) + +if (USE_STATIC_NCCL) + MESSAGE(STATUS "USE_STATIC_NCCL is set. Linking with static NCCL library.") + SET(NCCL_LIBNAME "nccl_static") + if (_NCCL_VERSION) # Prefer the versioned library if a specific NCCL version is specified + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a.${_NCCL_VERSION}" ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif() +else() + SET(NCCL_LIBNAME "nccl") + if (_NCCL_VERSION) # Prefer the versioned library if a specific NCCL version is specified + set(CMAKE_FIND_LIBRARY_SUFFIXES ".so.${_NCCL_VERSION}" ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif() +endif() + +# Read version from header +if(EXISTS "${NCCL_INCLUDE_DIRS}/nccl.h") + file(READ ${NCCL_INCLUDE_DIRS}/nccl.h NCCL_HEADER_CONTENTS) +endif() +if(NCCL_HEADER_CONTENTS) + string(REGEX MATCH "define NCCL_MAJOR * +([0-9]+)" + _NCCL_VERSION_MAJOR "${NCCL_HEADER_CONTENTS}") + string(REGEX REPLACE "define NCCL_MAJOR * +([0-9]+)" "\\1" + _NCCL_VERSION_MAJOR "${_NCCL_VERSION_MAJOR}") + string(REGEX MATCH "define NCCL_MINOR * +([0-9]+)" + _NCCL_VERSION_MINOR "${NCCL_HEADER_CONTENTS}") + string(REGEX REPLACE "define NCCL_MINOR * +([0-9]+)" "\\1" + _NCCL_VERSION_MINOR "${_NCCL_VERSION_MINOR}") + string(REGEX MATCH "define NCCL_PATCH * +([0-9]+)" + _NCCL_VERSION_PATCH "${NCCL_HEADER_CONTENTS}") + string(REGEX REPLACE "define NCCL_PATCH * +([0-9]+)" "\\1" + _NCCL_VERSION_PATCH "${_NCCL_VERSION_PATCH}") + if(NOT _NCCL_VERSION_MAJOR) + set(_NCCL_VERSION "?") + else() + set(_NCCL_VERSION "${_NCCL_VERSION_MAJOR}.${_NCCL_VERSION_MINOR}.${_NCCL_VERSION_PATCH}") + endif() +endif() + +find_library(NCCL_LIBRARIES + NAMES ${NCCL_LIBNAME} + HINTS + ${NCCL_LIB_DIR} + ${CUDA_TOOLKIT_ROOT} + $ENV{CUDA_PATH} + $ENV{CUDNN_ROOT_DIR} + $ENV{CUDA_TOOLKIT_ROOT_DIR} + $ENV{NCCL} + /usr/lib/x86_64-linux-gnu/ + PATH_SUFFIXES + lib + lib64 +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(NCCL + REQUIRED_VARS NCCL_INCLUDE_DIRS NCCL_LIBRARIES + VERSION_VAR _NCCL_VERSION) + +if(NCCL_FOUND) # obtaining NCCL version and some sanity checks + message(STATUS "Found NCCL ${_NCCL_VERSION} (include: ${NCCL_INCLUDE_DIRS}, library: ${NCCL_LIBRARIES})") + mark_as_advanced(NCCL_ROOT_DIR NCCL_INCLUDE_DIRS NCCL_LIBRARIES NCCL_VERSION) +endif() diff --git a/ports/nccl/portfile.cmake b/ports/nccl/portfile.cmake new file mode 100644 index 00000000000000..e6c184daabe01b --- /dev/null +++ b/ports/nccl/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_fail_port_install(ON_TARGET "Windows" "OSX" ON_ARCH "x86" "arm") + +# Find NCCL. We can use FindNCCL directly since it doesn't call any functions +# that are disallowed in CMake script mode +set(MINIMUM_NCCL_VERSION "2.4.6.1") +set(NCCL_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +find_package(NCCL ${MINIMUM_NCCL_VERSION}) +set(CMAKE_MODULE_PATH ${NCCL_PREV_MODULE_PATH}) + +# Download or return +if(NCCL_FOUND) + message(STATUS "Using NCCL ${_NCCL_VERSION} located on system.") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() + message(FATAL_ERROR "Please install NCCL using your system package manager (the same way you installed CUDA). For example: apt install libnccl2 libnccl-dev.") +endif() + +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/nccl/usage b/ports/nccl/usage new file mode 100644 index 00000000000000..62ebd7bab107e3 --- /dev/null +++ b/ports/nccl/usage @@ -0,0 +1,5 @@ +The package nccl provides CMake variables: + + find_package(NCCL REQUIRED) + target_link_libraries(main PRIVATE ${NCCL_LIBRARIES}) + target_include_directories(main PRIVATE ${NCCL_INCLUDE_DIRS}) diff --git a/ports/nccl/vcpkg-cmake-wrapper.cmake b/ports/nccl/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..27893ec4f3c939 --- /dev/null +++ b/ports/nccl/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(NCCL_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${NCCL_PREV_MODULE_PATH}) diff --git a/ports/nccl/vcpkg.json b/ports/nccl/vcpkg.json new file mode 100644 index 00000000000000..479c4df48ea0ab --- /dev/null +++ b/ports/nccl/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "nccl", + "version-string": "2.4.6", + "port-version": 1, + "description": "Optimized primitives for collective multi-GPU communication.", + "supports": "linux & x64", + "dependencies": [ + "cuda" + ] +} diff --git a/ports/ncurses/portfile.cmake b/ports/ncurses/portfile.cmake new file mode 100644 index 00000000000000..71ccfda8b11826 --- /dev/null +++ b/ports/ncurses/portfile.cmake @@ -0,0 +1,59 @@ +vcpkg_fail_port_install(ON_TARGET "Windows" "UWP") + +vcpkg_download_distfile( + ARCHIVE_PATH + URLS + "https://invisible-mirror.net/archives/ncurses/ncurses-6.2.tar.gz" + "ftp://ftp.invisible-island.net/ncurses/ncurses-6.2.tar.gz" + "https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz" + FILENAME "ncurses-6.2.tgz" + SHA512 4c1333dcc30e858e8a9525d4b9aefb60000cfc727bc4a1062bace06ffc4639ad9f6e54f6bdda0e3a0e5ea14de995f96b52b3327d9ec633608792c99a1e8d840d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_PATH} +) + +set(OPTIONS + --disable-db-install + --enable-pc-files + --without-manpages + --without-progs + --without-tack + --without-tests +) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + list(APPEND OPTIONS + --with-shared + --with-cxx-shared + --without-normal + ) +endif() + +set(OPTIONS_DEBUG + --with-pkg-config-libdir=${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig + --with-debug +) +set(OPTIONS_RELEASE + --with-pkg-config-libdir=${CURRENT_INSTALLED_DIR}/lib/pkgconfig + --without-debug +) + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${OPTIONS} + OPTIONS_DEBUG ${OPTIONS_DEBUG} + OPTIONS_RELEASE ${OPTIONS_RELEASE} + NO_ADDITIONAL_PATHS +) +vcpkg_install_make() + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ncurses/vcpkg.json b/ports/ncurses/vcpkg.json new file mode 100644 index 00000000000000..a0aa9df575e10d --- /dev/null +++ b/ports/ncurses/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ncurses", + "version-string": "6.2", + "port-version": 1, + "description": "free software emulation of curses in System V Release 4.0", + "supports": "!(windows | uwp)" +} diff --git a/ports/neargye-semver/portfile.cmake b/ports/neargye-semver/portfile.cmake new file mode 100644 index 00000000000000..8a74ee93a98e2b --- /dev/null +++ b/ports/neargye-semver/portfile.cmake @@ -0,0 +1,13 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Neargye/semver + REF v0.2.2 + SHA512 f299e6d74f0232f40e20959ed3d7138d5faff924f60748827849e21951d76d34070bac2479a35f3ea6e801ec5e23ebf8391adedc70d778c4aa5e4c89b20c332c + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/semver.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/neargye) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/neargye-semver/vcpkg.json b/ports/neargye-semver/vcpkg.json new file mode 100644 index 00000000000000..925b02892f2fb0 --- /dev/null +++ b/ports/neargye-semver/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "neargye-semver", + "version-string": "0.2.2", + "port-version": 1, + "description": "C++17 header-only dependency-free versioning library complying with Semantic Versioning 2.0.0", + "homepage": "https://github.com/Neargye/semver" +} diff --git a/ports/ned14-internal-quickcpplib/portfile.cmake b/ports/ned14-internal-quickcpplib/portfile.cmake new file mode 100644 index 00000000000000..57cb70c7fb6aaa --- /dev/null +++ b/ports/ned14-internal-quickcpplib/portfile.cmake @@ -0,0 +1,74 @@ +# QuickCppLib is composed of other third party libraries: +# <= quickcpplib +# <= byte-lite +# <= gsl-lite +# <= Optional +# +# byte-lite and gsl-lite are in vcpkg, but may not be versions +# known to be compatible with QuickCppLib. It has occurred in the +# past that newer versions were severely broken with QuickCppLib. + +include(${CURRENT_PORT_DIR}/sha_manifest.cmake) + +message(WARNING [=[ +QuickCppLib and its downstream dependencies Outcome and LLFIO were tested against gsl-lite version 0.37.0 and byte-lite version 0.2.0. They are not guaranteed to work with newer versions, with failures experienced in the past up-to-and-including runtime crashes. You can pin the versions as verified to work in QuickCppLib's CI in your manifest file by adding: + "overrides": [ + { "name": "gsl-lite", "version": "0.37.0" }, + { "name": "byte-lite", "version": "0.2.0" } + ] +Do not report issues to upstream without first pinning these previous versions. +]=]) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ned14/quickcpplib + REF ${QUICKCPPLIB_REF} + SHA512 ${QUICKCPPLIB_SHA512} + HEAD_REF master + PATCHES + quicklib-depheaders.patch +) + +# Quickcpplib deploys subsets of the dependency headers into a private subdirectory +file(COPY "${CURRENT_INSTALLED_DIR}/include/nonstd/byte.hpp" + DESTINATION "${SOURCE_PATH}/include/quickcpplib/byte/include/nonstd") +file(COPY "${CURRENT_INSTALLED_DIR}/include/gsl/gsl-lite.hpp" + DESTINATION "${SOURCE_PATH}/include/quickcpplib/gsl-lite/include/gsl") +file(COPY "${CURRENT_INSTALLED_DIR}/include/gsl-lite/gsl-lite.hpp" + DESTINATION "${SOURCE_PATH}/include/quickcpplib/gsl-lite/include/gsl-lite") + +vcpkg_from_github( + OUT_SOURCE_PATH OPT_SOURCE_PATH + REPO akrzemi1/Optional + REF ${OPTIONAL_REF} + SHA512 ${OPTIONAL_SHA512} + HEAD_REF master +) + +file(COPY "${OPT_SOURCE_PATH}/." DESTINATION "${SOURCE_PATH}/include/quickcpplib/optional") + +# Because quickcpplib's deployed files are header-only, the debug build it not necessary +set(VCPKG_BUILD_TYPE release) + +# Use QuickCppLib's own build process, skipping examples and tests. +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DPROJECT_IS_DEPENDENCY=On + -DQUICKCPPLIB_USE_VCPKG_BYTE_LITE=ON + -DQUICKCPPLIB_USE_VCPKG_GSL_LITE=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/quickcpplib) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +file(RENAME "${CURRENT_PACKAGES_DIR}/share/cmakelib" "${CURRENT_PACKAGES_DIR}/share/ned14-internal-quickcpplib/cmakelib") +file(RENAME "${CURRENT_PACKAGES_DIR}/share/scripts" "${CURRENT_PACKAGES_DIR}/share/ned14-internal-quickcpplib/scripts") + +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ned14-internal-quickcpplib/quicklib-depheaders.patch b/ports/ned14-internal-quickcpplib/quicklib-depheaders.patch new file mode 100644 index 00000000000000..6e7ea0a5d543f1 --- /dev/null +++ b/ports/ned14-internal-quickcpplib/quicklib-depheaders.patch @@ -0,0 +1,29 @@ +diff --git a/cmake/headers.cmake b/cmake/headers.cmake +index 1aad359..e5053ed 100644 +--- a/cmake/headers.cmake ++++ b/cmake/headers.cmake +@@ -13,8 +13,6 @@ set(quickcpplib_HEADERS + "include/quickcpplib/boost/test/unit_test.hpp" + "include/quickcpplib/byte.hpp" + "include/quickcpplib/byte/include/nonstd/byte.hpp" +- "include/quickcpplib/byte/test/byte-main.t.hpp" +- "include/quickcpplib/byte/test/lest_cpp03.hpp" + "include/quickcpplib/config.hpp" + "include/quickcpplib/console_colours.hpp" + "include/quickcpplib/cpp_feature.h" +@@ -25,15 +23,8 @@ set(quickcpplib_HEADERS + "include/quickcpplib/erasure_cast.hpp" + "include/quickcpplib/execinfo_win64.h" + "include/quickcpplib/function_ptr.hpp" +- "include/quickcpplib/gsl-lite/gsl-lite.natvis" + "include/quickcpplib/gsl-lite/include/gsl-lite/gsl-lite.hpp" +- "include/quickcpplib/gsl-lite/include/gsl.h" +- "include/quickcpplib/gsl-lite/include/gsl.hpp" +- "include/quickcpplib/gsl-lite/include/gsl/gsl-lite-vc6.hpp" +- "include/quickcpplib/gsl-lite/include/gsl/gsl-lite.h" + "include/quickcpplib/gsl-lite/include/gsl/gsl-lite.hpp" +- "include/quickcpplib/gsl-lite/test/gsl-lite.t.hpp" +- "include/quickcpplib/gsl-lite/test/lest_cpp03.hpp" + "include/quickcpplib/import.h" + "include/quickcpplib/in_place_detach_attach.hpp" + "include/quickcpplib/mem_flush_loads_stores.hpp" diff --git a/ports/ned14-internal-quickcpplib/sha_manifest.cmake b/ports/ned14-internal-quickcpplib/sha_manifest.cmake new file mode 100644 index 00000000000000..383b8b85334e18 --- /dev/null +++ b/ports/ned14-internal-quickcpplib/sha_manifest.cmake @@ -0,0 +1,5 @@ +set(QUICKCPPLIB_REF 7cb75d4e190fec886a655fd50d3fe80d933e0efb) +set(QUICKCPPLIB_SHA512 891b1620485119545f28528d3407d5d896e0da7530224a684cd7201581ea45871761bef8b9e3914fd2a104ecac3d35c50a049893ef32b1ef95d871e63371d6f3) + +set(OPTIONAL_REF 2b43315458a99fc5de1da6e7bc0ddd364b26d643) +set(OPTIONAL_SHA512 1952386cd3c7b963861f9634055e1baa4181d398d6f1b068a8a3f411368432bdcd42e47aadfa856584ed9a7c724a1c83369243ccb653e650af5c9155b42a84f4) diff --git a/ports/ned14-internal-quickcpplib/usage b/ports/ned14-internal-quickcpplib/usage new file mode 100644 index 00000000000000..91f1dff7e95028 --- /dev/null +++ b/ports/ned14-internal-quickcpplib/usage @@ -0,0 +1,2 @@ +You should NOT DIRECTLY USE quickcpplib in your own libraries! +It is intended for internal use by ned14's vcpkg libraries only. diff --git a/ports/ned14-internal-quickcpplib/vcpkg.json b/ports/ned14-internal-quickcpplib/vcpkg.json new file mode 100644 index 00000000000000..b201b5fdcc6daa --- /dev/null +++ b/ports/ned14-internal-quickcpplib/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "ned14-internal-quickcpplib", + "version-string": "0.0.0-7cb75d4e", + "port-version": 1, + "description": "NOT FOR EXTERNAL CONSUMPTION, a set of internal scripts used by ned14's libraries.", + "homepage": "https://github.com/ned14/quickcpplib", + "dependencies": [ + "byte-lite", + "gsl-lite" + ] +} diff --git a/ports/neon2sse/portfile.cmake b/ports/neon2sse/portfile.cmake new file mode 100644 index 00000000000000..477e109a016913 --- /dev/null +++ b/ports/neon2sse/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO intel/ARM_NEON_2_x86_SSE + REF a1652fd5253afbf3e39357b012974f93511f6108 + SHA512 9f8aa283e48eb3b615da3d89ec4165d1ec9599e8e181059c2b9acb2921ce753ce0f29b8c321d7d6661f10eb67e234c629df75853b87c4139a9bb137dbb3f4fc1 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME NEON_2_SSE CONFIG_PATH lib/cmake/NEON_2_SSE) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" + "${CURRENT_PACKAGES_DIR}/lib" +) diff --git a/ports/neon2sse/vcpkg.json b/ports/neon2sse/vcpkg.json new file mode 100644 index 00000000000000..c705b9ededdee8 --- /dev/null +++ b/ports/neon2sse/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "neon2sse", + "version-date": "2021-09-16", + "description": "Open standard for machine learning interoperability", + "homepage": "https://github.com/intel/ARM_NEON_2_x86_SSE", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/netcdf-c/CONTROL b/ports/netcdf-c/CONTROL deleted file mode 100644 index f69dc61ad4f487..00000000000000 --- a/ports/netcdf-c/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: netcdf-c -Version: 4.7.0-4 -Build-Depends: hdf5, curl -Homepage: https://github.com/Unidata/netcdf-c -Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/ports/netcdf-c/config-pkg-location.patch b/ports/netcdf-c/config-pkg-location.patch deleted file mode 100644 index 532082ccb60019..00000000000000 --- a/ports/netcdf-c/config-pkg-location.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 46892ee..803ff46 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1742,7 +1742,9 @@ FILE(COPY ${netCDF_SOURCE_DIR}/include/netcdf_meta.h - # Create CMake package configuration files. With these, other packages using - # cmake should be able to find netcdf using find_package and find_library. - # The EXPORT call is paired with one in liblib. --set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/netCDF) -+if(NOT DEFINED ConfigPackageLocation) -+ set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/netCDF) -+endif(NOT DEFINED ConfigPackageLocation) - - install(EXPORT netCDFTargets - DESTINATION ${ConfigPackageLocation} diff --git a/ports/netcdf-c/fix-build-error-on-linux.patch b/ports/netcdf-c/fix-build-error-on-linux.patch deleted file mode 100644 index bdcd7c97a4d141..00000000000000 --- a/ports/netcdf-c/fix-build-error-on-linux.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/include/ncconfigure.h b/include/ncconfigure.h -index 2c5b2c8..d397790 100644 ---- a/include/ncconfigure.h -+++ b/include/ncconfigure.h -@@ -25,20 +25,20 @@ missing functions should be - defined and missing types defined. - */ - --#ifndef HAVE_STRDUP -+#ifndef strdup - extern char* strdup(const char*); - #endif - - /* handle null arguments */ - #ifndef nulldup --#ifdef HAVE_STRDUP -+#ifdef strdup - #define nulldup(s) ((s)==NULL?NULL:strdup(s)) - #else - char *nulldup(const char* s); - #endif - #endif - --#ifdef _MSC_VER -+#ifdef _WIN32 - #ifndef HAVE_SSIZE_T - #include - typedef SSIZE_T ssize_t; diff --git a/ports/netcdf-c/fix-dependency-libmath.patch b/ports/netcdf-c/fix-dependency-libmath.patch new file mode 100644 index 00000000000000..d6b4c214e92f91 --- /dev/null +++ b/ports/netcdf-c/fix-dependency-libmath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bd7c4f8..03b7ccf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -866,7 +866,7 @@ ENDIF() + + # Check for the math library so it can be explicitly linked. + IF(NOT WIN32) +- FIND_LIBRARY(HAVE_LIBM NAMES math m libm) ++ FIND_LIBRARY(HAVE_LIBM NAMES m libm math) + MESSAGE(STATUS "Found Math library: ${HAVE_LIBM}") + IF(NOT HAVE_LIBM) + MESSAGE(FATAL_ERROR "Unable to find the math library.") diff --git a/ports/netcdf-c/fix-dependency-zlib.patch b/ports/netcdf-c/fix-dependency-zlib.patch new file mode 100644 index 00000000000000..52c5d2ecdaef94 --- /dev/null +++ b/ports/netcdf-c/fix-dependency-zlib.patch @@ -0,0 +1,13 @@ +diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt +index 5b578f7..0731460 100644 +--- a/liblib/CMakeLists.txt ++++ b/liblib/CMakeLists.txt +@@ -58,7 +58,7 @@ ENDIF() + + SET(TLL_LIBS "") + +-SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ZLIB::ZLIB) ++SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM}) + + # Add extra dependencies specified via NC_EXTRA_DEPS + SET(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS}) diff --git a/ports/netcdf-c/fix-linkage-error.patch b/ports/netcdf-c/fix-linkage-error.patch new file mode 100644 index 00000000000000..e71c30fdef4859 --- /dev/null +++ b/ports/netcdf-c/fix-linkage-error.patch @@ -0,0 +1,19 @@ +diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt +index 8aeeab7..5b578f7 100644 +--- a/liblib/CMakeLists.txt ++++ b/liblib/CMakeLists.txt +@@ -70,8 +70,14 @@ ENDIF() + IF(USE_HDF5 OR USE_NETCDF4) + if(TARGET hdf5::hdf5-shared) + SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-shared hdf5::hdf5_hl-shared) ++ if(USE_PARALLEL) ++ list(APPEND TLL_LIBS ${MPI_C_LIBRARIES}) ++ endif() + else() + SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-static hdf5::hdf5_hl-static) ++ if(USE_PARALLEL) ++ list(APPEND TLL_LIBS ${MPI_C_LIBRARIES}) ++ endif() + endif() + ENDIF() + diff --git a/ports/netcdf-c/fix-manpage-msys.patch b/ports/netcdf-c/fix-manpage-msys.patch new file mode 100644 index 00000000000000..24374c95e62469 --- /dev/null +++ b/ports/netcdf-c/fix-manpage-msys.patch @@ -0,0 +1,13 @@ +diff --git a/libsrc/CMakeLists.txt b/libsrc/CMakeLists.txt +index 65a3f87..30a008d 100644 +--- a/libsrc/CMakeLists.txt ++++ b/libsrc/CMakeLists.txt +@@ -61,7 +61,7 @@ IF(HAVE_M4) + IF(NOT MSVC) + ADD_CUSTOM_TARGET(manpage ALL + +- COMMAND ${NC_M4} ${ARGS_MANPAGE} '${CMAKE_CURRENT_BINARY_DIR}/netcdf.m4' > '${CMAKE_CURRENT_BINARY_DIR}/netcdf.3' ++ COMMAND ${NC_M4} ${ARGS_MANPAGE} "${CMAKE_CURRENT_BINARY_DIR}/netcdf.m4" > "${CMAKE_CURRENT_BINARY_DIR}/netcdf.3" VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + diff --git a/ports/netcdf-c/fix-pkgconfig.patch b/ports/netcdf-c/fix-pkgconfig.patch new file mode 100644 index 00000000000000..f7827d6cb50c10 --- /dev/null +++ b/ports/netcdf-c/fix-pkgconfig.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 57d2d4b..3de6f8c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1892,6 +1892,20 @@ LIST(REMOVE_DUPLICATES LINKFLAGS) + SET(LIBS ${NC_LIBS}) + SET(NC_LIBS "-lnetcdf") + ++set(NC_LIBS_PRIVATE " ${LIBS} ") ++set(NC_REQUIRES_PRIVATE "") ++macro(replace_pkgconfig_module PATTERN MODULE) ++ if(NC_LIBS_PRIVATE MATCHES " ${PATTERN} ") ++ string(REPLACE "${CMAKE_MATCH_0}" " " NC_LIBS_PRIVATE "${NC_LIBS_PRIVATE}") ++ string(APPEND NC_REQUIRES_PRIVATE " ${MODULE}") ++ endif() ++endmacro() ++replace_pkgconfig_module("-lhdf5_hl" "hdf5_hl") ++replace_pkgconfig_module("-lhdf5" "hdf5") ++replace_pkgconfig_module("-lmpi" "ompi-c") ++replace_pkgconfig_module("-lCURL[^ ]*" "libcurl") ++replace_pkgconfig_module("-lZLIB[^ ]*" "zlib") ++ + configure_file( + ${netCDF_SOURCE_DIR}/netcdf.pc.in + ${netCDF_BINARY_DIR}/netcdf.pc @ONLY) +diff --git a/netcdf.pc.in b/netcdf.pc.in +index 22b5594..a48b7c2 100644 +--- a/netcdf.pc.in ++++ b/netcdf.pc.in +@@ -9,5 +9,6 @@ Description: NetCDF Client Library for C + URL: http://www.unidata.ucar.edu/netcdf + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} @NC_LIBS@ +-Libs.private: @LIBS@ ++Libs.private: @NC_LIBS_PRIVATE@ + Cflags: -I${includedir} ++Requires.private: @NC_REQUIRES_PRIVATE@ diff --git a/ports/netcdf-c/hdf5.patch b/ports/netcdf-c/hdf5.patch deleted file mode 100644 index 71f4921eded8c7..00000000000000 --- a/ports/netcdf-c/hdf5.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a3874c13..36f15beb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -599,11 +599,10 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) - IF(NC_FIND_SHARED_LIBS) - SET(NC_HDF5_LINK_TYPE "shared") - SET(NC_HDF5_LINK_TYPE_UPPER "SHARED") -- ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB) - ELSE(NC_FIND_SHARED_LIBS) - SET(NC_HDF5_LINK_TYPE "static") - SET(NC_HDF5_LINK_TYPE_UPPER "STATIC") -- ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB) -+ SET(HDF5_USE_STATIC_LIBRARIES ON) - ENDIF(NC_FIND_SHARED_LIBS) - - ##### -@@ -614,8 +615,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) - # had worked. - ##### - IF(MSVC) -- SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME}) -- FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL NO_MODULES REQUIRED ${NC_HDF5_LINK_TYPE}) -+ FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) - ELSE(MSVC) - FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) - ENDIF(MSVC) diff --git a/ports/netcdf-c/hdf5_2.patch b/ports/netcdf-c/hdf5_2.patch deleted file mode 100644 index a3a3fb751ba183..00000000000000 --- a/ports/netcdf-c/hdf5_2.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt -index ea9b0294..3c7f427d 100644 ---- a/liblib/CMakeLists.txt -+++ b/liblib/CMakeLists.txt -@@ -83,7 +83,7 @@ IF(USE_HDF5 OR USE_NETCDF4) - # HDF5_HL_LIBRARY. - SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) - ELSE() # Windows CMake defines HDF5_LIBRARIES. -- SET(TLL_LIBS ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) -+ SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) - ENDIF() - ENDIF() - diff --git a/ports/netcdf-c/hdf5_3.patch b/ports/netcdf-c/hdf5_3.patch deleted file mode 100644 index 502a8ea9941bc8..00000000000000 --- a/ports/netcdf-c/hdf5_3.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/libhdf5/CMakeLists.txt b/libhdf5/CMakeLists.txt -index f3c7bbc..34fc2ab 100644 ---- a/libhdf5/CMakeLists.txt -+++ b/libhdf5/CMakeLists.txt -@@ -20,3 +20,9 @@ add_library(netcdfhdf5 OBJECT ${libnchdf5_SOURCES}) - - # Remember to package this file for CMake builds. - ADD_EXTRA_DIST(${libnchdf5_SOURCES} CMakeLists.txt) -+ -+if(HDF5_BUILD_SHARED_LIBS) -+ target_link_libraries(netcdfhdf5 PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared) -+else() -+ target_link_libraries(netcdfhdf5 PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static) -+endif() diff --git a/ports/netcdf-c/no-install-deps.patch b/ports/netcdf-c/no-install-deps.patch index 3d44b383ec82bb..535a0dc088a5bc 100644 --- a/ports/netcdf-c/no-install-deps.patch +++ b/ports/netcdf-c/no-install-deps.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e87f3de..46892ee 100644 +index bd7c4f8..95fb01c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1570,7 +1570,7 @@ ADD_SUBDIRECTORY(docs) +@@ -1830,7 +1830,7 @@ ADD_SUBDIRECTORY(docs) # install them in the binary dir. Grab all of the .libs, put them # in the libdir. ## diff --git a/ports/netcdf-c/portfile.cmake b/ports/netcdf-c/portfile.cmake index 21b2145240964c..f51081d8be893b 100644 --- a/ports/netcdf-c/portfile.cmake +++ b/ports/netcdf-c/portfile.cmake @@ -1,24 +1,23 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Unidata/netcdf-c - REF v4.7.0 - SHA512 6602799780105c60ac8c873ed4055c1512dc8bebf98de01e1cce572d113ffb3bf3ca522475b93255c415340f672c55dc6785e0bdbcc39055314683da1d02141a + REF 26fba54a58fa02af92d84441ed90b417c1d08161 # v4.7.4 + SHA512 7144374b5bd3574ea422de07ffb30fecc4e5f560f9b46f62762cc0cce511dd33068b8df9244fe94ae3cc7b3a9bb9fe398c7e67c3e5ac2109768e5a9b984f24fb HEAD_REF master PATCHES no-install-deps.patch - config-pkg-location.patch - transitive-hdf5.patch - hdf5.patch - hdf5_2.patch - fix-build-error-on-linux.patch - hdf5_3.patch + use_targets.patch + fix-dependency-libmath.patch + fix-linkage-error.patch + fix-pkgconfig.patch + fix-dependency-zlib.patch + fix-manpage-msys.patch ) #Remove outdated find modules file(REMOVE "${SOURCE_PATH}/cmake/modules/FindSZIP.cmake") file(REMOVE "${SOURCE_PATH}/cmake/modules/FindZLIB.cmake") +file(REMOVE "${SOURCE_PATH}/cmake/modules/windows/FindHDF5.cmake") if(VCPKG_CRT_LINKAGE STREQUAL "static") set(NC_USE_STATIC_CRT ON) @@ -26,37 +25,47 @@ else() set(NC_USE_STATIC_CRT OFF) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - DISABLE_PARALLEL_CONFIGURE - PREFER_NINJA +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + dap ENABLE_DAP + netcdf-4 ENABLE_NETCDF_4 + netcdf-4 USE_HDF5 + tools BUILD_UTILITIES + INVERTED_FEATURES + dap CMAKE_DISABLE_FIND_PACKAGE_CURL + netcdf-4 CMAKE_DISABLE_FIND_PACKAGE_HDF5 +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE # netcdf-c configures in the source! OPTIONS - -DBUILD_UTILITIES=OFF -DBUILD_TESTING=OFF -DENABLE_EXAMPLES=OFF -DENABLE_TESTS=OFF -DENABLE_FILTER_TESTING=OFF - -DUSE_HDF5=ON -DENABLE_DAP_REMOTE_TESTS=OFF -DDISABLE_INSTALL_DEPENDENCIES=ON -DNC_USE_STATIC_CRT=${NC_USE_STATIC_CRT} - -DConfigPackageLocation=share/netcdf + ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/netcdf) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME "netcdf" CONFIG_PATH "lib/cmake/netCDF") +vcpkg_fixup_pkgconfig() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/nc-config" "${CURRENT_PACKAGES_DIR}/bin/nc-config") # invalid +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES nccopy ncdump ncgen ncgen3 + AUTO_CLEAN + ) +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS) + # delete bin under non-windows because the dynamic libraries get put in lib + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/netcdf-c) -file( - RENAME - ${CURRENT_PACKAGES_DIR}/share/netcdf-c/COPYRIGHT - ${CURRENT_PACKAGES_DIR}/share/netcdf-c/copyright -) +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/netcdf-c/transitive-hdf5.patch b/ports/netcdf-c/transitive-hdf5.patch deleted file mode 100644 index 89773e6d40f41f..00000000000000 --- a/ports/netcdf-c/transitive-hdf5.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/netCDFConfig.cmake.in b/netCDFConfig.cmake.in -index 6f4ccf8..14a3743 100644 ---- a/netCDFConfig.cmake.in -+++ b/netCDFConfig.cmake.in -@@ -11,6 +11,8 @@ set_and_check(netCDF_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") - - set(netCDF_LIBRARIES netcdf) - -+find_package(HDF5 COMPONENTS C HL CONFIG REQUIRED) -+ - # include target information - include("${CMAKE_CURRENT_LIST_DIR}/netCDFTargets.cmake") - diff --git a/ports/netcdf-c/use_targets.patch b/ports/netcdf-c/use_targets.patch new file mode 100644 index 00000000000000..d15ab749524294 --- /dev/null +++ b/ports/netcdf-c/use_targets.patch @@ -0,0 +1,164 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bd7c4f8..9e09cf3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -430,7 +430,6 @@ IF(NC_EXTRA_DEPS) + SET(EXTRA_DEPS ${EXTRA_DEPS} "${${_LIB}_DEP}") + ENDFOREACH() + MESSAGE("Extra deps: ${EXTRA_DEPS}") +- LIST(REMOVE_DUPLICATES EXTRA_DEPS) + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${EXTRA_DEPS}) + ENDIF() + ### +@@ -598,15 +597,6 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + # we will use a static library. This can be toggled + # by explicitly modifying NC_FIND_SHARED_LIBS. + ## +- IF(NC_FIND_SHARED_LIBS) +- SET(NC_HDF5_LINK_TYPE "shared") +- SET(NC_HDF5_LINK_TYPE_UPPER "SHARED") +- ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB) +- ELSE(NC_FIND_SHARED_LIBS) +- SET(NC_HDF5_LINK_TYPE "static") +- SET(NC_HDF5_LINK_TYPE_UPPER "STATIC") +- ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB) +- ENDIF(NC_FIND_SHARED_LIBS) + + ##### + # First, find the C and HL libraries. +@@ -619,7 +609,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME}) + FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL CONFIG REQUIRED ${NC_HDF5_LINK_TYPE}) + ELSE(MSVC) +- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) ++ FIND_PACKAGE(HDF5 COMPONENTS C HL CONFIG REQUIRED) + ENDIF(MSVC) + + ## +@@ -701,6 +691,19 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + SET(HDF5_C_LIBRARY hdf5) + ENDIF() + ENDIF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR) ++ ++ if(TARGET hdf5::hdf5-shared) ++ set(HDF5_C_LIBRARY hdf5::hdf5-shared) ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared) ++ set(HDF5_HL_LIBRARIES hdf5::hdf5_hl-shared) ++ ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB) ++ else() ++ set(HDF5_C_LIBRARY hdf5::hdf5-static) ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static) ++ set(HDF5_HL_LIBRARIES hdf5::hdf5_hl-static) ++ ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB) ++ endif() ++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${HDF5_C_LIBRARY}) + + FIND_PACKAGE(Threads) + +@@ -728,17 +731,9 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_all_coll_metadata_ops "" HDF5_HAS_COLL_METADATA_OPS) + + #Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip. +- CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Z_SZIP "" USE_SZIP) ++ set(USE_SZIP ${HDF5_ENABLE_SZIP_SUPPORT}) + IF(USE_SZIP) +- FIND_LIBRARY(SZIP NAMES szip sz) +- IF(SZIP) + SET(HAVE_H5Z_SZIP 1) +- SET(SZIP_LIBRARY ${SZIP}) +- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SZIP}) +- MESSAGE(STATUS "HDF5 has szip.") +- ELSE() +- MESSAGE(FATAL_ERROR "HDF5 Requires SZIP, but cannot find libszip or libsz.") +- ENDIF() + ENDIF() + + CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_libver_bounds "" HAVE_H5PSET_LIBVER_BOUNDS) +@@ -788,8 +783,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + ENDIF(USE_HDF5 OR ENABLE_NETCDF_4) + + # See if we have libcurl +-FIND_PACKAGE(CURL) +-ADD_DEFINITIONS(-DCURL_STATICLIB=1) ++FIND_PACKAGE(CURL CONFIG) + INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS}) + + # Check to see if CURLOPT_USERNAME is defined. +@@ -1893,7 +1887,6 @@ ENDIF() + + STRING(REPLACE ";" " " LINKFLAGS "${LINKFLAGS}") + +-LIST(REMOVE_DUPLICATES NC_LIBS) + LIST(REMOVE_DUPLICATES LINKFLAGS) + + SET(LIBS ${NC_LIBS}) +diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt +index ea9b029..8aeeab7 100644 +--- a/liblib/CMakeLists.txt ++++ b/liblib/CMakeLists.txt +@@ -58,7 +58,7 @@ ENDIF() + + SET(TLL_LIBS "") + +-SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ${ZLIB_LIBRARY}) ++SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ZLIB::ZLIB) + + # Add extra dependencies specified via NC_EXTRA_DEPS + SET(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS}) +@@ -68,27 +68,15 @@ IF(HAVE_LIBDL) + ENDIF() + + IF(USE_HDF5 OR USE_NETCDF4) +- IF(NOT MSVC) +- # Some version of cmake define HDF5_hdf5_LIBRARY instead of +- # HDF5_LIBRARY. Same with HDF5_HL_LIBRARIES +- IF(HDF5_hdf5_LIBRARY AND NOT HDF5_C_LIBRARIES) +- SET(HDF5_C_LIBRARIES ${HDF5_hdf5_LIBRARY}) +- ENDIF() +- IF(HDF5_hdf5_hl_LIBRARY AND NOT HDF5_HL_LIBRARIES) +- SET(HDF5_HL_LIBRARIES ${HDF5_hdf5_hl_LIBRARY}) +- ENDIF() +- # The order of the libraries is important here for static +- # builds: +- # Make sure that HDF5_C_LIBRARY appears *after* +- # HDF5_HL_LIBRARY. +- SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) +- ELSE() # Windows CMake defines HDF5_LIBRARIES. +- SET(TLL_LIBS ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) +- ENDIF() ++ if(TARGET hdf5::hdf5-shared) ++ SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-shared hdf5::hdf5_hl-shared) ++ else() ++ SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-static hdf5::hdf5_hl-static) ++ endif() + ENDIF() + + IF(USE_DAP) +- SET(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARY}) ++ SET(TLL_LIBS ${TLL_LIBS} CURL::libcurl) + ENDIF() + + IF(USE_HDF4) +@@ -100,7 +88,6 @@ IF(ENABLE_PNETCDF AND PNETCDF) + ENDIF() + + IF(TLL_LIBS) +- LIST(REMOVE_DUPLICATES TLL_LIBS) + ENDIF() + + TARGET_LINK_LIBRARIES(netcdf ${TLL_LIBS}) +diff --git a/netCDFConfig.cmake.in b/netCDFConfig.cmake.in +index 9d68eec..b8f6113 100644 +--- a/netCDFConfig.cmake.in ++++ b/netCDFConfig.cmake.in +@@ -12,6 +12,10 @@ set_and_check(netCDF_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") + set(netCDF_LIBRARIES netCDF::netcdf) + + # include target information ++include(CMakeFindDependencyMacro) ++find_dependency(ZLIB) ++find_dependency(HDF5 CONFIG) ++find_dependency(CURL CONFIG) + include("${CMAKE_CURRENT_LIST_DIR}/netCDFTargets.cmake") + + # Compiling Options diff --git a/ports/netcdf-c/vcpkg.json b/ports/netcdf-c/vcpkg.json new file mode 100644 index 00000000000000..256a401b46b678 --- /dev/null +++ b/ports/netcdf-c/vcpkg.json @@ -0,0 +1,43 @@ +{ + "name": "netcdf-c", + "version": "4.7.4", + "port-version": 4, + "description": "A set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.", + "homepage": "https://github.com/Unidata/netcdf-c", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "dap", + "netcdf-4" + ], + "features": { + "dap": { + "description": "Build with DAP remote access client support", + "dependencies": [ + "curl" + ] + }, + "netcdf-4": { + "description": "Build with netCDF-4/HDF5 support", + "dependencies": [ + { + "name": "hdf5", + "features": [ + "zlib" + ] + } + ] + }, + "tools": { + "description": "Build utilities" + } + } +} diff --git a/ports/netcdf-cxx4/CONTROL b/ports/netcdf-cxx4/CONTROL deleted file mode 100644 index 8ef872966fb830..00000000000000 --- a/ports/netcdf-cxx4/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: netcdf-cxx4 -Version: 4.3.0-4 -Build-Depends: netcdf-c -Homepage: https://github.com/Unidata/netcdf-cxx4 -Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/ports/netcdf-cxx4/export-cmake-targets.patch b/ports/netcdf-cxx4/export-cmake-targets.patch new file mode 100644 index 00000000000000..b46ef3947fd97b --- /dev/null +++ b/ports/netcdf-cxx4/export-cmake-targets.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f06fcc0..a19ab28 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -622,9 +622,23 @@ write_basic_package_version_file( + VERSION ${NCXX_VERSION} + COMPATIBILITY SameMajorVersion + ) ++ ++install( ++ EXPORT netcdf-cxx4Targets ++ FILE netcdf-cxx4Targets.cmake ++ NAMESPACE netCDF:: ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/netCDFCxx ++ ) + ++configure_package_config_file( ++ "${CMAKE_CURRENT_SOURCE_DIR}/netCDFCxxConfig.cmake.in" ++ "${CMAKE_CURRENT_BINARY_DIR}/netCDFCxxConfig.cmake" ++ INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/netCDFCxx" ++ ) ++ + install( + FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/netCDFCxxConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/netCDF/netCDFCxxConfigVersion.cmake" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/netCDFCxx + COMPONENT headers +diff --git a/cxx4/CMakeLists.txt b/cxx4/CMakeLists.txt +index b433786..5ef4bed 100644 +--- a/cxx4/CMakeLists.txt ++++ b/cxx4/CMakeLists.txt +@@ -32,7 +32,7 @@ SET(ALL_TLL_LIBS ${ALL_TLL_LIBS} ${HDF5_C_LIBRARY_hdf5}) + SET(ALL_TLL_LIBS ${ALL_TLL_LIBS} ${EXTRA_DEPS} PARENT_SCOPE) + + ADD_LIBRARY(netcdf-cxx4 ${CXX_SOURCES}) +-TARGET_INCLUDE_DIRECTORIES(netcdf-cxx4 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") ++TARGET_INCLUDE_DIRECTORIES(netcdf-cxx4 PUBLIC $ $) + TARGET_LINK_LIBRARIES(netcdf-cxx4 ${ALL_TLL_LIBS}) + SET_TARGET_PROPERTIES(netcdf-cxx4 PROPERTIES + VERSION ${NCXX_LIB_VERSION} +@@ -49,6 +49,7 @@ INSTALL( + ) + INSTALL( + TARGETS netcdf-cxx4 ++ EXPORT netcdf-cxx4Targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/ports/netcdf-cxx4/fix-dependecy-hdf5.patch b/ports/netcdf-cxx4/fix-dependecy-hdf5.patch new file mode 100644 index 00000000000000..73b9a0d0134ddb --- /dev/null +++ b/ports/netcdf-cxx4/fix-dependecy-hdf5.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 60c699d..f06fcc0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -395,14 +395,20 @@ ENDIF(NC_HAS_DEF_VAR_FILTER) + ### + # Find HDF5 + ### +-IF(MSVC) ++IF(0) + SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME}) + FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL NO_MODULES REQUIRED ${NC_HDF5_LINK_TYPE}) + ELSE(MSVC) +- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) ++ FIND_PACKAGE(hdf5 CONFIG REQUIRED) ++ set(HDF5_FOUND ${hdf5_FOUND}) ++ if (NOT HDF5_USE_STATIC_LIBRARIES) ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared hdf5::hdf5_hl-shared) ++ else() ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static hdf5::hdf5_hl-static) ++ endif() + ENDIF(MSVC) + +-CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5free_memory "" HAVE_H5FREE_MEMORY) ++set(HAVE_H5FREE_MEMORY ON) + IF(NOT HAVE_H5FREE_MEMORY) + MESSAGE(STATUS "Plugin support requires libhdf5 with H5Free support. Your libhdf5 install does not provide H5Free. Please install a newer version of libhdf5 if you require plugin compression support.") + SET(NC_HAS_DEF_VAR_FILTER "") +diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt +index 30a4a96..1809d29 100644 +--- a/plugins/CMakeLists.txt ++++ b/plugins/CMakeLists.txt +@@ -23,7 +23,7 @@ SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES OUTPUT_NAME "bzip2") + SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES LIBRARY_OUTPUT_NAME "h5bzip2") + SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES ARCHIVE_OUTPUT_NAME "h5bzip2") + SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES RUNTIME_OUTPUT_NAME "h5bzip2") +-TARGET_LINK_LIBRARIES(test_bzip2 ${ALL_TLL_LIBS}) ++TARGET_LINK_LIBRARIES(test_bzip2 ${ALL_TLL_LIBS} ${HDF5_C_LIBRARY_hdf5}) + + ADD_LIBRARY(misc MODULE ${libmisc_SOURCES}) + SET_TARGET_PROPERTIES(misc PROPERTIES LIBRARY_OUTPUT_NAME "misc") diff --git a/ports/netcdf-cxx4/install-destination.patch b/ports/netcdf-cxx4/install-destination.patch deleted file mode 100644 index 7ff4e08c7f6694..00000000000000 --- a/ports/netcdf-cxx4/install-destination.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6673282..d6c7a78 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -522,10 +522,14 @@ write_basic_package_version_file( - COMPATIBILITY SameMajorVersion - ) - -+if(NOT DEFINED CMAKE_INSTALL_CMAKECONFIGDIR) -+ set(CMAKE_INSTALL_CMAKECONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/netCDFCxx) -+endif() -+ - install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/netCDF/netCDFCxxConfigVersion.cmake" -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/netCDFCxx -+ DESTINATION ${CMAKE_INSTALL_CMAKECONFIGDIR} - COMPONENT headers - ) - -diff --git a/cxx4/CMakeLists.txt b/cxx4/CMakeLists.txt -index 431eb45..0423594 100644 ---- a/cxx4/CMakeLists.txt -+++ b/cxx4/CMakeLists.txt -@@ -43,5 +43,7 @@ INSTALL( - ) - INSTALL( - TARGETS netcdf-cxx4 -- DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ) diff --git a/ports/netcdf-cxx4/netCDFCxxConfig.cmake.in b/ports/netcdf-cxx4/netCDFCxxConfig.cmake.in new file mode 100644 index 00000000000000..430d3d91113cad --- /dev/null +++ b/ports/netcdf-cxx4/netCDFCxxConfig.cmake.in @@ -0,0 +1,29 @@ +# NetCDF CXX Configuration Summary +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +if (@netCDF_FOUND@) + if(EXISTS "@netCDF_ROOT@") + set(netCDF_ROOT "@netCDF_ROOT@") + endif() + if(EXISTS "@netCDF_DIR@") + set(netCDF_DIR "@netCDF_DIR@") + endif() + find_dependency(netCDF) + set(NETCDF_C_LIBRARY ${netCDF_LIBRARIES}) + set(NETCDF_C_INCLUDE_DIR ${netCDF_INCLUDE_DIR}) +else() + set(NETCDF_C_LIBRARY "@NETCDF_C_LIBRARY@") + set(NETCDF_C_INCLUDE_DIR "@NETCDF_C_INCLUDE_DIR@") +endif() + +if (NOT TARGET netCDF::netcdf) + add_library(netCDF::netcdf UNKNOWN IMPORTED) + set_target_properties(netCDF::netcdf PROPERTIES + IMPORTED_LOCATION "${NETCDF_C_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${NETCDF_C_INCLUDE_DIR}" + ) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/netcdf-cxx4Targets.cmake") \ No newline at end of file diff --git a/ports/netcdf-cxx4/portfile.cmake b/ports/netcdf-cxx4/portfile.cmake index 96169496566c7f..f014128045c4a8 100644 --- a/ports/netcdf-cxx4/portfile.cmake +++ b/ports/netcdf-cxx4/portfile.cmake @@ -1,24 +1,24 @@ -include(vcpkg_common_functions) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" HDF5_USE_STATIC_LIBRARIES) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(HDF5_USE_STATIC_LIBRARIES ON) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/netcdf-cxx4-4.3.0) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Unidata/netcdf-cxx4 - REF v4.3.0 - SHA512 8e77333c979513721209e6b3fde31c298e18a45d7ea08123056e8120469eb8c4024d71289fab2b9182ee19ee7b6ad22bd133525bef048a497ede4aa2e9017465 + REF f8882188267488ef801691e69ad072e3eb217ad8 # v4.3.1 + SHA512 9816acf221d196e21af19d4c3d85484934916e7c018e9b2c96aab9f5660b2f08c5db9cd8254ba3fa5f0aa5f5c5ad7bd3a3aaba559e5e640c5349d44e07a20ed3 HEAD_REF master - PATCHES - install-destination.patch + PATCHES + fix-dependecy-hdf5.patch + export-cmake-targets.patch ) +#Provided by upstream https://github.com/Unidata/netcdf-cxx4/blob/master/netCDFCxxConfig.cmake.in +file(COPY ${CMAKE_CURRENT_LIST_DIR}/netCDFCxxConfig.cmake.in DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS -DNCXX_ENABLE_TESTS=OFF -DCMAKE_INSTALL_CMAKECONFIGDIR=share/netCDFCxx @@ -28,14 +28,15 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/netCDFCxx TARGET_PATH share/netCDFCxx) +vcpkg_copy_pdbs() 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(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/netcdf-cxx4) -file( - RENAME - ${CURRENT_PACKAGES_DIR}/share/netcdf-cxx4/COPYRIGHT - ${CURRENT_PACKAGES_DIR}/share/netcdf-cxx4/copyright -) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/netcdf-cxx4/vcpkg.json b/ports/netcdf-cxx4/vcpkg.json new file mode 100644 index 00000000000000..58fcf7625be67f --- /dev/null +++ b/ports/netcdf-cxx4/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "netcdf-cxx4", + "version-string": "4.3.1", + "port-version": 3, + "description": "a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.", + "homepage": "https://github.com/Unidata/netcdf-cxx4", + "dependencies": [ + "hdf5", + "netcdf-c" + ] +} diff --git a/ports/nethost/0001-nethost-cmakelists.patch b/ports/nethost/0001-nethost-cmakelists.patch new file mode 100644 index 00000000000000..93d49b95e16439 --- /dev/null +++ b/ports/nethost/0001-nethost-cmakelists.patch @@ -0,0 +1,58 @@ +diff --git a/src/installer/corehost/cli/common.cmake b/src/installer/corehost/cli/common.cmake +index 63e7306..639c90e 100644 +--- a/src/installer/corehost/cli/common.cmake ++++ b/src/installer/corehost/cli/common.cmake +@@ -5,9 +5,6 @@ + project(${DOTNET_PROJECT_NAME}) + + if(WIN32) +- add_compile_options($<$:/MT>) +- add_compile_options($<$:/MT>) +- add_compile_options($<$:/MTd>) + else() + add_compile_options(-fvisibility=hidden) + endif() +diff --git a/src/installer/corehost/cli/nethost/CMakeLists.txt b/src/installer/corehost/cli/nethost/CMakeLists.txt +index 7473958..49c664f 100644 +--- a/src/installer/corehost/cli/nethost/CMakeLists.txt ++++ b/src/installer/corehost/cli/nethost/CMakeLists.txt +@@ -2,12 +2,14 @@ + # The .NET Foundation licenses this file to you under the MIT license. + # See the LICENSE file in the project root for more information. + +-cmake_minimum_required (VERSION 2.6) ++cmake_minimum_required (VERSION 3.14) + project(nethost) + + set(DOTNET_PROJECT_NAME "nethost") + + # Include directories ++include(../../../settings.cmake) ++include(../../../functions.cmake) + include_directories(../fxr) + + # CMake does not recommend using globbing since it messes with the freshness checks +@@ -22,13 +24,18 @@ if(WIN32) + Exports.def) + endif() + ++if(BUILD_SHARED_LIBS) + include(../lib.cmake) ++else() + include(../lib_static.cmake) ++endif() + + add_definitions(-DFEATURE_LIBHOST=1) + add_definitions(-DNETHOST_EXPORT) + +-install(FILES nethost.h DESTINATION corehost) +-install(TARGETS nethost DESTINATION corehost) +-install(TARGETS libnethost DESTINATION corehost) +-install_symbols(nethost corehost) +\ No newline at end of file ++install(FILES nethost.h ../coreclr_delegates.h ../hostfxr.h DESTINATION include) ++if(BUILD_SHARED_LIBS) ++install(TARGETS nethost) ++else() ++install(TARGETS libnethost) ++endif() diff --git a/ports/nethost/0002-settings-cmake.patch b/ports/nethost/0002-settings-cmake.patch new file mode 100644 index 00000000000000..7143b942a9b405 --- /dev/null +++ b/ports/nethost/0002-settings-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/src/installer/settings.cmake b/src/installer/settings.cmake +index 29d57b44..6ea63902 100644 +--- a/src/installer/settings.cmake ++++ b/src/installer/settings.cmake +@@ -114,7 +114,7 @@ endfunction() + + function(install_symbols targetName destination_path) + if(WIN32) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/$/${targetName}.pdb DESTINATION ${destination_path}) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${targetName}.pdb DESTINATION ${destination_path}) + else() + strip_symbols(${targetName} strip_destination_file) + install(FILES ${strip_destination_file} DESTINATION ${destination_path}) diff --git a/ports/nethost/portfile.cmake b/ports/nethost/portfile.cmake new file mode 100644 index 00000000000000..3809d9872b38d8 --- /dev/null +++ b/ports/nethost/portfile.cmake @@ -0,0 +1,68 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(COMMIT_HASH 188427d7e18102c45fc6d0e20c135e226f215992) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dotnet/runtime + REF ${COMMIT_HASH} + SHA512 5a93c66c87e2113f733702d938efd39456c99fb74b383097b8d877df21536fcbcba901606aa70db6c8f1a16421ea8f06822c5b0ab1d882631b6daecbed8d03cc + HEAD_REF master + PATCHES + 0001-nethost-cmakelists.patch + 0002-settings-cmake.patch +) + +set(PRODUCT_VERSION "5.0.0") + +if(VCPKG_TARGET_IS_WINDOWS) + set(RID_PLAT "win") +elseif(VCPKG_TARGET_IS_OSX) + set(RID_PLAT "osx") +elseif(VCPKG_TARGET_IS_LINUX) + set(RID_PLAT "linux") +else() + message(FATAL_ERROR "Unsupported platform") +endif() + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(RID_ARCH "x86") + set(ARCH_NAME "I386") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(RID_ARCH "x64") + set(ARCH_NAME "AMD64") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(RID_ARCH "arm") + set(ARCH_NAME "ARM") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(RID_ARCH "arm64") + set(ARCH_NAME "ARM64") +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +set(BASE_RID "${RID_PLAT}-${RID_ARCH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src/installer/corehost/cli/nethost + PREFER_NINJA + OPTIONS + "-DSKIP_VERSIONING=1" + "-DCLI_CMAKE_HOST_POLICY_VER:STRING=${PRODUCT_VERSION}" + "-DCLI_CMAKE_HOST_FXR_VER:STRING=${PRODUCT_VERSION}" + "-DCLI_CMAKE_HOST_VER:STRING=${PRODUCT_VERSION}" + "-DCLI_CMAKE_COMMON_HOST_VER:STRING=${PRODUCT_VERSION}" + "-DCLI_CMAKE_PKG_RID:STRING=${BASE_RID}" + "-DCLI_CMAKE_COMMIT_HASH:STRING=${COMMIT_HASH}" + "-DCLI_CMAKE_PLATFORM_ARCH_${ARCH_NAME}=1" + "-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10.0" +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/nethost/usage b/ports/nethost/usage new file mode 100644 index 00000000000000..6e6d860d1fb27c --- /dev/null +++ b/ports/nethost/usage @@ -0,0 +1,6 @@ +The package nethost can be used via CMake: + + find_path(NETHOST_INCLUDE_DIRS nethost.h) + find_library(NETHOST_LIBRARY NAMES libnethost nethost) + target_include_directories(main PRIVATE ${NETHOST_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${NETHOST_LIBRARY}) diff --git a/ports/nethost/vcpkg.json b/ports/nethost/vcpkg.json new file mode 100644 index 00000000000000..467d4249c8b13b --- /dev/null +++ b/ports/nethost/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "nethost", + "version-string": "2019-12-21", + "port-version": 1, + "description": "Provides a set of APIs that can be used to host .NET Core (dotnet)", + "homepage": "https://github.com/dotnet/runtime/tree/master/src/installer/corehost/cli/nethost" +} diff --git a/ports/nettle/fix-InstallLibPath.patch b/ports/nettle/fix-InstallLibPath.patch new file mode 100644 index 00000000000000..d42a280679d4b2 --- /dev/null +++ b/ports/nettle/fix-InstallLibPath.patch @@ -0,0 +1,36 @@ +diff --git a/configure.ac b/configure.ac +index 90ea1ea..58cfe88 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -354,25 +354,25 @@ if test "x$ABI" != xstandard ; then + else + # The dash builtin pwd tries to be "helpful" and remember + # symlink names. Use -P option, and hope it's portable enough. +- test -d /usr/lib${ABI} \ +- && (cd /usr/lib${ABI} && pwd -P | grep >/dev/null "/lib${ABI}"'$') \ +- && libdir='${exec_prefix}/'"lib${ABI}" ++ test -d /usr/lib \ ++ && (cd /usr/lib && pwd -P | grep >/dev/null "/lib"'$') \ ++ && libdir='${exec_prefix}/'"lib" + fi + ;; + # On freebsd, it seems 32-bit libraries are in lib32, + # and 64-bit in lib. Don't know about "kfreebsd", does + # it follow the Linux fhs conventions? + *:freebsd*:32) +- libdir='${exec_prefix}/lib32' ++ libdir='${exec_prefix}/lib' + ;; + *:freebsd*:64) + libdir='${exec_prefix}/lib' + ;; + *:irix*:32) +- libdir='${exec_prefix}/lib32' ++ libdir='${exec_prefix}/lib' + ;; + *:irix*:64) +- libdir='${exec_prefix}/lib64' ++ libdir='${exec_prefix}/lib' + ;; + *) + AC_MSG_WARN([Don't know where to install $ABI-bit libraries on this system.]); dnl ' diff --git a/ports/nettle/flags.patch b/ports/nettle/flags.patch new file mode 100644 index 00000000000000..990bd6d3e2ddc3 --- /dev/null +++ b/ports/nettle/flags.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.in b/Makefile.in +index e5ccfc7..922aa0c 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -309,7 +309,7 @@ $(LIBHOGWEED_FORLINK): $(hogweed_OBJS) $(LIBNETTLE_FORLINK) + + # For building the various *data.c programs. -lm needed for shadata. + %$(EXEEXT_FOR_BUILD): %.c +- $(CC_FOR_BUILD) $< -lm -o $@ ++ $(CC_FOR_BUILD) $< $(CFLAGS) -lm -o $@ + + # Explicit dependency. + eccdata$(EXEEXT_FOR_BUILD): mini-gmp.c mini-gmp.h diff --git a/ports/nettle/gmp.patch b/ports/nettle/gmp.patch new file mode 100644 index 00000000000000..c54298a28c5288 --- /dev/null +++ b/ports/nettle/gmp.patch @@ -0,0 +1,205 @@ +diff --git a/SMP/config.h b/SMP/config.h +index e4de0f1..ba41eb4 100644 +--- a/SMP/config.h ++++ b/SMP/config.h +@@ -102,7 +102,7 @@ + #define HAVE_SYS_TYPES_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_UNISTD_H 1 ++//#define HAVE_UNISTD_H 1 + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_VALGRIND_MEMCHECK_H */ +diff --git a/SMP/libhogweed_winrt.vcxproj b/SMP/libhogweed_winrt.vcxproj +index 476f7a7..308bd0b 100644 +--- a/SMP/libhogweed_winrt.vcxproj ++++ b/SMP/libhogweed_winrt.vcxproj +@@ -247,7 +247,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettled_winrt.lib;gmpd_winrt.lib;%(AdditionalDependencies) ++ nettled_winrt.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -362,7 +362,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettled_winrt.lib;gmpd_winrt.lib;%(AdditionalDependencies) ++ nettled_winrt.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -705,7 +705,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettle_winrt.lib;gmp_winrt.lib;%(AdditionalDependencies) ++ nettle_winrt.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -935,7 +935,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettle_winrt.lib;gmp_winrt.lib;%(AdditionalDependencies) ++ nettle_winrt.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +diff --git a/SMP/libnettle.vcxproj b/SMP/libnettle.vcxproj +index 088cb85..cc2cbeb 100644 +--- a/SMP/libnettle.vcxproj ++++ b/SMP/libnettle.vcxproj +@@ -18,7 +18,7 @@ + 4244;4146;4267;4098;%(DisableSpecificWarnings) + + +- libgmpd.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -131,7 +131,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4244;4146;4267;4098;%(DisableSpecificWarnings) + + +- libgmpd.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -472,7 +472,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4244;4146;4267;4098;%(DisableSpecificWarnings) + + +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -586,7 +586,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4244;4146;4267;4098;%(DisableSpecificWarnings) + + +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -815,7 +815,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- libgmp.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1043,7 +1043,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- libgmp.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +diff --git a/SMP/libnettle_winrt.vcxproj b/SMP/libnettle_winrt.vcxproj +index cb650ab..188f67a 100644 +--- a/SMP/libnettle_winrt.vcxproj ++++ b/SMP/libnettle_winrt.vcxproj +@@ -18,7 +18,7 @@ + 4244;4146;4267;4098;%(DisableSpecificWarnings) + + +- libgmpd_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -131,7 +131,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4244;4146;4267;4098;%(DisableSpecificWarnings) + + +- libgmpd_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -245,7 +245,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- gmpd_winrt.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -359,7 +359,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- gmpd_winrt.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -472,7 +472,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4244;4146;4267;4098;%(DisableSpecificWarnings) + + +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -585,7 +585,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4244;4146;4267;4098;%(DisableSpecificWarnings) + + +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -699,7 +699,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- gmp_winrt.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -813,7 +813,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- libgmp_winrt.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -927,7 +927,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- gmp_winrt.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1041,7 +1041,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libnettle.def +- libgmp_winrt.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include diff --git a/ports/nettle/name.dir.patch b/ports/nettle/name.dir.patch new file mode 100644 index 00000000000000..834a0440978740 --- /dev/null +++ b/ports/nettle/name.dir.patch @@ -0,0 +1,381 @@ +diff --git a/SMP/libhogweed.vcxproj b/SMP/libhogweed.vcxproj +index 976d9fc..5fd42ba 100644 +--- a/SMP/libhogweed.vcxproj ++++ b/SMP/libhogweed.vcxproj +@@ -18,7 +18,7 @@ + 4146;4267;4028;4244;%(DisableSpecificWarnings) + + +- libnettled.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -132,7 +132,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4146;4267;4028;4244;%(DisableSpecificWarnings) + + +- libnettled.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -476,7 +476,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4146;4267;4028;4244;%(DisableSpecificWarnings) + + +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -590,7 +590,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4146;4267;4028;4244;%(DisableSpecificWarnings) + + +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -820,7 +820,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1050,7 +1050,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +diff --git a/SMP/libhogweed_winrt.vcxproj b/SMP/libhogweed_winrt.vcxproj +index 308bd0b..a436c69 100644 +--- a/SMP/libhogweed_winrt.vcxproj ++++ b/SMP/libhogweed_winrt.vcxproj +@@ -18,7 +18,7 @@ + 4146;4267;4028;4244;%(DisableSpecificWarnings) + + +- libnettled_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -132,7 +132,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4146;4267;4028;4244;%(DisableSpecificWarnings) + + +- libnettled_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -247,7 +247,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettled_winrt.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -362,7 +362,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettled_winrt.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -476,7 +476,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4146;4267;4028;4244;%(DisableSpecificWarnings) + + +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -590,7 +590,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 4146;4267;4028;4244;%(DisableSpecificWarnings) + + +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -705,7 +705,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettle_winrt.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -820,7 +820,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -935,7 +935,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- nettle_winrt.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1050,7 +1050,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + + + libhogweed.def +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +diff --git a/SMP/smp_deps.props b/SMP/smp_deps.props +index 487099d..1eade47 100644 +--- a/SMP/smp_deps.props ++++ b/SMP/smp_deps.props +@@ -104,16 +104,16 @@ + + + +- lib$(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace)d ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- lib$(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace)d ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -121,7 +121,7 @@ + + + $(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -129,23 +129,23 @@ + + + $(RootNamespace)d +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- lib$(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace) ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- lib$(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace) ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -153,7 +153,7 @@ + + + $(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -161,7 +161,7 @@ + + + $(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -169,7 +169,7 @@ + + + $(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +@@ -177,7 +177,7 @@ + + + $(RootNamespace) +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +diff --git a/SMP/smp_winrt_deps.props b/SMP/smp_winrt_deps.props +index d44408a..b44482c 100644 +--- a/SMP/smp_winrt_deps.props ++++ b/SMP/smp_winrt_deps.props +@@ -115,80 +115,80 @@ + + + +- lib$(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace)d ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- lib$(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace)d ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- $(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace)d ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- $(RootNamespace)d_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace)d ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- lib$(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace) ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- lib$(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace) ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- $(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace) ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- $(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace) ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- $(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace) ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean + MSB8012 + + +- $(RootNamespace)_winrt +- $(ProjectDir)..\..\..\msvc\ ++ $(RootNamespace) ++ $(ProjectDir)..\msvc\ + $(ProjectDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + $(ProjectDir)obj\Generated + Clean +diff --git a/hogweed.pc.in b/hogweed.pc.in +index 97fb9d4..ce977c0 100644 +--- a/hogweed.pc.in ++++ b/hogweed.pc.in +@@ -13,7 +13,7 @@ URL: http://www.lysator.liu.se/~nisse/nettle + Version: @PACKAGE_VERSION@ + Requires: @IF_NOT_SHARED@ nettle + Requires.private: @IF_SHARED@ nettle +-Libs: -L${libdir} -lhogweed @IF_NOT_SHARED@ @LIBS@ ++Libs: -L${libdir} @HOGWEED@ @IF_NOT_SHARED@ @LIBS@ + Libs.private: @IF_SHARED@ @LIBS@ + Cflags: -I${includedir} + +diff --git a/nettle.pc.in b/nettle.pc.in +index eb0020c..6e3ed1e 100644 +--- a/nettle.pc.in ++++ b/nettle.pc.in +@@ -7,5 +7,6 @@ Name: Nettle + Description: Nettle low-level cryptographic library (symmetric algorithms) + URL: http://www.lysator.liu.se/~nisse/nettle + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lnettle ++Requires.private: gmp ++Libs: -L${libdir} @LIBS@ + Cflags: -I${includedir} diff --git a/ports/nettle/portfile.cmake b/ports/nettle/portfile.cmake new file mode 100644 index 00000000000000..731017de7be79d --- /dev/null +++ b/ports/nettle/portfile.cmake @@ -0,0 +1,136 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/nettle + REF bf483378326c67d634977287dd576279734b7acc #v3.6 + SHA512 ba125a27c81a800be8bc8d1b0d4f3125587330ef64d8a605b4d3ae211fb675c5ef89e9bf4bcf63b07d0f004c6c5ff851630690cdd1eda6b5b8a526d84edffe73 + HEAD_REF master + PATCHES + gmp.patch + name.dir.patch + runtime.patch + ) + + include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake) + yasm_tool_helper(OUT_VAR YASM) + file(TO_NATIVE_PATH "${YASM}" YASM) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CONFIGURATION_RELEASE ReleaseDLL) + set(CONFIGURATION_DEBUG DebugDLL) + else() + set(CONFIGURATION_RELEASE Release) + set(CONFIGURATION_DEBUG Debug) + endif() + + if(VCPKG_TARGET_IS_UWP) + string(APPEND CONFIGURATION_RELEASE WinRT) + string(APPEND CONFIGURATION_DEBUG WinRT) + endif() + + #Setup YASM integration + set(_nettleproject) + set(_hogweedproject) + if(VCPKG_TARGET_IS_UWP) + set(_nettleproject "${SOURCE_PATH}/SMP/libnettle_winrt.vcxproj") + set(_hogweedproject "${SOURCE_PATH}/SMP/libhogweed_winrt.vcxproj") + else() + set(_nettleproject "${SOURCE_PATH}/SMP/libnettle.vcxproj") + set(_hogweedproject "${SOURCE_PATH}/SMP/libhogweed.vcxproj") + endif() + + file(READ "${_nettleproject}" _contents) + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REGEX REPLACE "${VCPKG_ROOT_DIR}/installed/[^/]+/share" "${CURRENT_INSTALLED_DIR}/share" _contents "${_contents}") # Above already + file(WRITE "${_nettleproject}" "${_contents}") + + file(READ "${_hogweedproject}" _contents) + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REGEX REPLACE "${VCPKG_ROOT_DIR}/installed/[^/]+/share" "${CURRENT_INSTALLED_DIR}/share" _contents "${_contents}") # Above already + file(WRITE "${_hogweedproject}" "${_contents}") + + vcpkg_install_msbuild( + USE_VCPKG_INTEGRATION + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH SMP/libnettle.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} + LICENSE_SUBPATH COPYING.LESSERv3 + TARGET Rebuild + RELEASE_CONFIGURATION ${CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${CONFIGURATION_DEBUG} + SKIP_CLEAN + OPTIONS "/p:YasmPath=${YASM}" + ) + + get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME) + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}/msvc/include" "${CURRENT_PACKAGES_DIR}/include") + set(PACKAGE_VERSION 3.6) + set(prefix "${CURRENT_INSTALLED_DIR}") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/include") + set(LIBS "-lnettle -lgmp") + configure_file("${SOURCE_PATH}/nettle.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/nettle.pc" @ONLY) + set(HOGWEED -lhogweed) + set(LIBS -lnettle) + configure_file("${SOURCE_PATH}/hogweed.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libhogweed.pc" @ONLY) + set(prefix "${CURRENT_INSTALLED_DIR}/debug") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/../include") + set(LIBS "-lnettled -lgmpd") + configure_file("${SOURCE_PATH}/nettle.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/nettle.pc" @ONLY) + set(LIBS -lnettled) + set(HOGWEED -lhogweedd) + configure_file("${SOURCE_PATH}/hogweed.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libhogweed.pc" @ONLY) + vcpkg_fixup_pkgconfig() +else() + vcpkg_from_gitlab( + GITLAB_URL https://git.lysator.liu.se/ + OUT_SOURCE_PATH SOURCE_PATH + REPO nettle/nettle + REF 9e2bea82b9fb606bffd2d3f648e05248e146e54f #v3.6 + SHA512 008089eba2ef197a0ec6a266baac485e72051e646d19861f3fb605915a591bc2dd38edcb4ea7eaad958ea5d56f7744d42c25b691b49921a1285edd22f9c90b7f + HEAD_REF master + PATCHES + fix-InstallLibPath.patch + flags.patch + ) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS --disable-static) + else() + set(OPTIONS --disable-shared) + endif() + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + --disable-documentation + --disable-openssl + ${OPTIONS} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + # # Handle copyright + file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_IS_LINUX) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + endif() +endif() diff --git a/ports/nettle/runtime.patch b/ports/nettle/runtime.patch new file mode 100644 index 00000000000000..3c232d882a7e06 --- /dev/null +++ b/ports/nettle/runtime.patch @@ -0,0 +1,168 @@ +diff --git a/SMP/smp_deps.props b/SMP/smp_deps.props +index 1eade47..ab279f4 100644 +--- a/SMP/smp_deps.props ++++ b/SMP/smp_deps.props +@@ -193,6 +193,7 @@ + $(OutDir)\lib\x86\$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebug + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -211,6 +212,7 @@ + $(OutDir)\lib\x64\$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -230,6 +232,7 @@ + $(IntDir)$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x86\$(TargetName)$(TargetExt) +@@ -253,6 +256,7 @@ + $(IntDir)$(TargetName).pdb + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -282,6 +286,7 @@ + SingleFile + $(OutDir)\lib\x86\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreaded + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -307,6 +312,7 @@ + SingleFile + $(OutDir)\lib\x64\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -331,6 +337,7 @@ + $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true +@@ -362,6 +369,7 @@ + $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true +@@ -392,6 +400,7 @@ + $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true +@@ -423,6 +432,7 @@ + $(OutDir)\include;$(ProjectDir)\..\..\prebuilt\include;%(AdditionalIncludeDirectories) + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true +diff --git a/SMP/smp_winrt_deps.props b/SMP/smp_winrt_deps.props +index b44482c..35ae231 100644 +--- a/SMP/smp_winrt_deps.props ++++ b/SMP/smp_winrt_deps.props +@@ -206,6 +206,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebug + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -226,6 +227,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -247,6 +249,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x86\$(TargetName)$(TargetExt) +@@ -274,6 +277,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -307,6 +311,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreaded + + + $(OutDir)\lib\x86\$(TargetName)$(TargetExt) +@@ -335,6 +340,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -361,6 +367,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true +@@ -396,6 +403,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true +@@ -430,6 +438,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true +@@ -465,6 +474,7 @@ + NotUsing + false + 4113;%(TreatSpecificWarningsAsErrors) ++ MultiThreadedDLL + + + true diff --git a/ports/nettle/vcpkg.json b/ports/nettle/vcpkg.json new file mode 100644 index 00000000000000..1a653be5ff7681 --- /dev/null +++ b/ports/nettle/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "nettle", + "version-string": "3.6", + "port-version": 1, + "description": "Nettle is a low-level cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.", + "homepage": "https://git.lysator.liu.se/nettle/nettle", + "dependencies": [ + "gmp", + { + "name": "vs-yasm", + "platform": "windows" + }, + { + "name": "yasm-tool-helper", + "platform": "windows" + } + ] +} diff --git a/ports/networkdirect-sdk/CONTROL b/ports/networkdirect-sdk/CONTROL deleted file mode 100644 index 3cc939c8e58a39..00000000000000 --- a/ports/networkdirect-sdk/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: networkdirect-sdk -Version: 2.0.1 -Description: The Network Direct architecture allows hardware vendors to expose the advanced capabilities of their networking devices. -Homepage: https://www.nuget.org/packages/NetworkDirect \ No newline at end of file diff --git a/ports/networkdirect-sdk/portfile.cmake b/ports/networkdirect-sdk/portfile.cmake index bb893ed9065117..2b97eb8a1a0215 100644 --- a/ports/networkdirect-sdk/portfile.cmake +++ b/ports/networkdirect-sdk/portfile.cmake @@ -1,13 +1,5 @@ -include(vcpkg_common_functions) - #only supports windows -if (VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "networkDirect-sdk only supports windows") -endif() - -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - message(FATAL_ERROR "networkDirect-sdk only supports x64 and x86") -endif() +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "linux" "osx") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) @@ -39,4 +31,4 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") file(COPY ${SOURCE_PATH}/lib/Win32/ndutil.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) endif() -file(COPY ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/networkdirect-sdk/COPYRIGHT) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/networkdirect-sdk/vcpkg.json b/ports/networkdirect-sdk/vcpkg.json new file mode 100644 index 00000000000000..ec8ec3f989082f --- /dev/null +++ b/ports/networkdirect-sdk/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "networkdirect-sdk", + "version-string": "2.0.1", + "port-version": 2, + "description": "The Network Direct architecture allows hardware vendors to expose the advanced capabilities of their networking devices.", + "homepage": "https://www.nuget.org/packages/NetworkDirect", + "supports": "windows & (x64 | x86) & !uwp" +} diff --git a/ports/nghttp2/CONTROL b/ports/nghttp2/CONTROL deleted file mode 100644 index 2e8489e0ad0d30..00000000000000 --- a/ports/nghttp2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nghttp2 -Version: 1.39.2 -Homepage: https://github.com/nghttp2/nghttp2 -Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake index 05a639d06e5f97..a13769280369e0 100644 --- a/ports/nghttp2/portfile.cmake +++ b/ports/nghttp2/portfile.cmake @@ -1,39 +1,45 @@ -include(vcpkg_common_functions) - -set(LIB_NAME nghttp2) -set(LIB_VERSION 1.39.2) - -set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/nghttp2/nghttp2/releases/download/v${LIB_VERSION}/${LIB_FILENAME}" - FILENAME "${LIB_FILENAME}" - SHA512 1623a6bd9de1ca4d0742919b973eaefd570b250eb109697e5cf2240d2062789d1ca58632fdff32bb17f524b102fade0e30ab3f400dc2c128bfb91a75277f13e0 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nghttp2/nghttp2 + REF b799b063f882cc97f8484e95b41d0326260d9b93 # v1.44.0 + SHA512 8e4a5d0b146606d1150b43c539244f615540bc25eab30bf67c673cccecdb3d4a02d99fb0136d81dc7ad4a579d9b38e62d91b1431884a8891c0d325c036cc4073 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" ENABLE_STATIC_CRT) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIB) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED_LIB) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DENABLE_LIB_ONLY=ON -DENABLE_ASIO_LIB=OFF + "-DENABLE_STATIC_CRT=${ENABLE_STATIC_CRT}" + "-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}" + "-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}" ) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() -vcpkg_install_cmake() - -# Remove unwanted files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/share/man" + "${CURRENT_PACKAGES_DIR}/share/doc" +) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) + file(APPEND "${CURRENT_PACKAGES_DIR}/include/nghttp2/nghttp2ver.h" [[ +#ifndef NGHTTP2_STATICLIB +# define NGHTTP2_STATICLIB +#endif +]]) endif() -# License and man -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright) - -vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/nghttp2/vcpkg.json b/ports/nghttp2/vcpkg.json new file mode 100644 index 00000000000000..6528683f293d74 --- /dev/null +++ b/ports/nghttp2/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "nghttp2", + "version": "1.44.0", + "description": "Implementation of the Hypertext Transfer Protocol version 2 in C", + "homepage": "https://github.com/nghttp2/nghttp2", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/ngspice/portfile.cmake b/ports/ngspice/portfile.cmake new file mode 100644 index 00000000000000..e128d737ec52cb --- /dev/null +++ b/ports/ngspice/portfile.cmake @@ -0,0 +1,94 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP" ON_ARCH "arm" "arm64") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +# ngspice produces self-contained DLLs +set(VCPKG_CRT_LINKAGE static) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO ngspice/ng-spice-rework + REF 35 + FILENAME "ngspice-35.tar.gz" + SHA512 2f9b0f951e3ca8d52692beadb895b352311f67b8760f99d0e2f4718fce4b497dd68e2b933029eeacb4ed57551e959bc6e3747e64feb4722a4f841e734f5a664b + PATCHES + use-winbison-sharedspice.patch + use-winbison-vngspice.patch + remove-post-build.patch + remove-64-in-codemodel-name.patch + +) + +vcpkg_find_acquire_program(BISON) + +get_filename_component(BISON_DIR "${BISON}" DIRECTORY) +vcpkg_add_to_path(PREPEND "${BISON_DIR}") + +# Sadly, vcpkg globs .libs inside install_msbuild and whines that the 47 year old SPICE format isn't a MSVC lib ;) +# We need to kill them off first before the source tree is copied to a tmp location by install_msbuild + +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib) +file(REMOVE_RECURSE ${SOURCE_PATH}/examples) +file(REMOVE_RECURSE ${SOURCE_PATH}/man) +file(REMOVE_RECURSE ${SOURCE_PATH}/tests) + +# this builds the main dll +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + INCLUDES_SUBPATH /src/include + LICENSE_SUBPATH COPYING + # install_msbuild swaps x86 for win32(bad) if we dont force our own setting + PLATFORM ${TRIPLET_SYSTEM_ARCH} + PROJECT_SUBPATH visualc/sharedspice.sln + TARGET Build +) + +if("codemodels" IN_LIST FEATURES) + # vngspice generates "codemodels" to enhance simulation capabilities + # we cannot use install_msbuild as they output with ".cm" extensions on purpose + set(BUILDTREE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + file(REMOVE_RECURSE ${BUILDTREE_PATH}) + file(COPY ${SOURCE_PATH}/ DESTINATION ${BUILDTREE_PATH}) + + vcpkg_build_msbuild( + PROJECT_PATH ${BUILDTREE_PATH}/visualc/vngspice.sln + # build_msbuild swaps x86 for win32(bad) if we dont force our own setting + PLATFORM ${TRIPLET_SYSTEM_ARCH} + TARGET Build + ) + + # ngspice oddly has solution configs of x64 and x86 but + # output folders of x64 and win32 + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(OUT_ARCH x64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(OUT_ARCH Win32) + else() + message(FATAL_ERROR "Unsupported target architecture") + endif() + + #put the code models in the intended location + file(GLOB NGSPICE_CODEMODELS_DEBUG + ${BUILDTREE_PATH}/visualc/codemodels/${OUT_ARCH}/Debug/*.cm + ) + file(COPY ${NGSPICE_CODEMODELS_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/ngspice) + + file(GLOB NGSPICE_CODEMODELS_RELEASE + ${BUILDTREE_PATH}/visualc/codemodels/${OUT_ARCH}/Release/*.cm + ) + file(COPY ${NGSPICE_CODEMODELS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/ngspice) + + + # copy over spinit (spice init) + file(RENAME ${BUILDTREE_PATH}/visualc/spinit_all ${BUILDTREE_PATH}/visualc/spinit) + file(COPY ${BUILDTREE_PATH}/visualc/spinit DESTINATION ${CURRENT_PACKAGES_DIR}/share/ngspice) +endif() + +vcpkg_copy_pdbs() + +# Unforunately install_msbuild isn't able to dual include directories that effectively layer +file(GLOB NGSPICE_INCLUDES ${SOURCE_PATH}/visualc/src/include/ngspice/*) +file(COPY ${NGSPICE_INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/ngspice) + +# This gets copied by install_msbuild but should not be shared +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/cppduals) diff --git a/ports/ngspice/remove-64-in-codemodel-name.patch b/ports/ngspice/remove-64-in-codemodel-name.patch new file mode 100644 index 00000000000000..eb5e774b6552e9 --- /dev/null +++ b/ports/ngspice/remove-64-in-codemodel-name.patch @@ -0,0 +1,131 @@ +From dc6b6c0aa4205047e9fd052c401f3f357d83ef57 Mon Sep 17 00:00:00 2001 +From: Marek Roszko +Date: Thu, 12 Aug 2021 22:26:43 -0400 +Subject: [PATCH] Remove 64 in filename output of codemodels + +--- + visualc/xspice/analog.vcxproj | 4 ++-- + visualc/xspice/digital.vcxproj | 4 ++-- + visualc/xspice/spice2poly.vcxproj | 4 ++-- + visualc/xspice/table.vcxproj | 4 ++-- + visualc/xspice/xtradev.vcxproj | 4 ++-- + visualc/xspice/xtraevt.vcxproj | 4 ++-- + 6 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/visualc/xspice/analog.vcxproj b/visualc/xspice/analog.vcxproj +index cf65a37..8b320ce 100644 +--- a/visualc/xspice/analog.vcxproj ++++ b/visualc/xspice/analog.vcxproj +@@ -77,12 +77,12 @@ + false + + +- $(ProjectName)64 ++ $(ProjectName) + true + false + + +- $(ProjectName)64 ++ $(ProjectName) + false + + +diff --git a/visualc/xspice/digital.vcxproj b/visualc/xspice/digital.vcxproj +index 87f4802..7722ce6 100644 +--- a/visualc/xspice/digital.vcxproj ++++ b/visualc/xspice/digital.vcxproj +@@ -77,12 +77,12 @@ + false + + +- $(ProjectName)64 ++ $(ProjectName) + true + false + + +- $(ProjectName)64 ++ $(ProjectName) + false + + +diff --git a/visualc/xspice/spice2poly.vcxproj b/visualc/xspice/spice2poly.vcxproj +index c92471b..786ff7e 100644 +--- a/visualc/xspice/spice2poly.vcxproj ++++ b/visualc/xspice/spice2poly.vcxproj +@@ -77,12 +77,12 @@ + false + + +- $(ProjectName)64 ++ $(ProjectName) + true + false + + +- $(ProjectName)64 ++ $(ProjectName) + false + + +diff --git a/visualc/xspice/table.vcxproj b/visualc/xspice/table.vcxproj +index fb4791c..ad3ee03 100644 +--- a/visualc/xspice/table.vcxproj ++++ b/visualc/xspice/table.vcxproj +@@ -77,12 +77,12 @@ + false + + +- $(ProjectName)64 ++ $(ProjectName) + true + false + + +- $(ProjectName)64 ++ $(ProjectName) + false + + +diff --git a/visualc/xspice/xtradev.vcxproj b/visualc/xspice/xtradev.vcxproj +index 6f0197f..53975b0 100644 +--- a/visualc/xspice/xtradev.vcxproj ++++ b/visualc/xspice/xtradev.vcxproj +@@ -77,12 +77,12 @@ + false + + +- $(ProjectName)64 ++ $(ProjectName) + true + false + + +- $(ProjectName)64 ++ $(ProjectName) + false + + +diff --git a/visualc/xspice/xtraevt.vcxproj b/visualc/xspice/xtraevt.vcxproj +index d5741e7..3177a91 100644 +--- a/visualc/xspice/xtraevt.vcxproj ++++ b/visualc/xspice/xtraevt.vcxproj +@@ -77,12 +77,12 @@ + false + + +- $(ProjectName)64 ++ $(ProjectName) + true + false + + +- $(ProjectName)64 ++ $(ProjectName) + false + + +-- +2.32.0.windows.2 + diff --git a/ports/ngspice/remove-post-build.patch b/ports/ngspice/remove-post-build.patch new file mode 100644 index 00000000000000..2a9d40b94f61e8 --- /dev/null +++ b/ports/ngspice/remove-post-build.patch @@ -0,0 +1,230 @@ +From 363737b9e0e5c2f9de85a0caf641204e638115e3 Mon Sep 17 00:00:00 2001 +From: Marek Roszko +Date: Thu, 12 Aug 2021 22:09:34 -0400 +Subject: [PATCH] Remove post build events that copy files out of the tree + +--- + visualc/vngspice-fftw.vcxproj | 24 ------------------------ + visualc/vngspice.vcxproj | 17 +++++------------ + 2 files changed, 5 insertions(+), 36 deletions(-) + +diff --git a/visualc/vngspice-fftw.vcxproj b/visualc/vngspice-fftw.vcxproj +index 14773c8..178aa73 100644 +--- a/visualc/vngspice-fftw.vcxproj ++++ b/visualc/vngspice-fftw.vcxproj +@@ -238,8 +238,6 @@ lib /machine:x86 /def:..\..\fftw-3.3-dll32\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll32\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspiced.bat $(OutDir) fftw + + + +@@ -289,8 +287,6 @@ lib /machine:x86 /def:..\..\fftw-3.3-dll32\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll32\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspice.bat $(OutDir) fftw + + + +@@ -337,8 +333,6 @@ lib /machine:x64 /def:..\..\fftw-3.3-dll64\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll64\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspiced.bat $(OutDir) fftw 64 + + + +@@ -393,8 +387,6 @@ lib /machine:x64 /def:..\..\fftw-3.3-dll64\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll64\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspice.bat $(OutDir) fftw 64 + + + +@@ -438,8 +430,6 @@ lib /machine:x86 /def:..\..\fftw-3.3-dll32\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll32\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspiced.bat $(OutDir) fftw + + + +@@ -489,8 +479,6 @@ lib /machine:x86 /def:..\..\fftw-3.3-dll32\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll32\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspice.bat $(OutDir) fftw + + + +@@ -537,8 +525,6 @@ lib /machine:x64 /def:..\..\fftw-3.3-dll64\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll64\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspiced.bat $(OutDir) fftw 64 + + + +@@ -591,8 +577,6 @@ lib /machine:x64 /def:..\..\fftw-3.3-dll64\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll64\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspice.bat $(OutDir) fftw 64 + + + +@@ -643,8 +627,6 @@ lib /machine:x86 /def:..\..\fftw-3.3-dll32\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll32\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspice.bat $(OutDir) fftw + + + +@@ -700,8 +682,6 @@ lib /machine:x64 /def:..\..\fftw-3.3-dll64\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll64\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspice.bat $(OutDir) fftw 64 + + + +@@ -752,8 +732,6 @@ lib /machine:x86 /def:..\..\fftw-3.3-dll32\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll32\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspice.bat $(OutDir) fftw + + + +@@ -807,8 +785,6 @@ lib /machine:x64 /def:..\..\fftw-3.3-dll64\libfftw3-3.def /out:$(IntDir)libfftw3 + + + +- copy /y "..\..\fftw-3.3-dll64\libfftw3-3.dll" "$(OutDir)" +- make-install-vngspice.bat $(OutDir) fftw 64 + + + +diff --git a/visualc/vngspice.vcxproj b/visualc/vngspice.vcxproj +index 7b6ac0b..7190c1e 100644 +--- a/visualc/vngspice.vcxproj ++++ b/visualc/vngspice.vcxproj +@@ -242,7 +242,7 @@ + true + + +- make-install-vngspiced.bat $(OutDir) ++ + + + $(ProjectDir)ngspice-x86.exe.manifest +@@ -293,7 +293,6 @@ + + + +- make-install-vngspice.bat $(OutDir) + + + +@@ -342,7 +341,6 @@ + + + +- make-install-vngspiced.bat $(OutDir) 64 + + + +@@ -399,7 +397,6 @@ + + + +- make-install-vngspice.bat $(OutDir) 64 + + + +@@ -444,7 +441,7 @@ + true + + +- make-install-vngspiced.bat $(OutDir) ++ + + + $(ProjectDir)ngspice-x86.exe.manifest +@@ -494,7 +491,7 @@ + true + + +- make-install-vngspice.bat $(OutDir) ++ + + + $(ProjectDir)ngspice-x86.exe.manifest +@@ -542,7 +539,6 @@ + + + +- make-install-vngspiced.bat $(OutDir) 64 + + + +@@ -597,7 +593,6 @@ + + + +- make-install-vngspice.bat $(OutDir) 64 + + + +@@ -649,7 +644,7 @@ + true + + +- make-install-vngspice.bat $(OutDir) ++ + + + $(ProjectDir)ngspice-x86.exe.manifest +@@ -706,7 +701,6 @@ + + + +- make-install-vngspice.bat $(OutDir) 64 + + + +@@ -758,7 +752,7 @@ + true + + +- make-install-vngspice.bat $(OutDir) ++ + + + $(ProjectDir)ngspice-x86.exe.manifest +@@ -813,7 +807,6 @@ + + + +- make-install-vngspice.bat $(OutDir) 64 + + + +-- +2.32.0.windows.2 + diff --git a/ports/ngspice/use-winbison-sharedspice.patch b/ports/ngspice/use-winbison-sharedspice.patch new file mode 100644 index 00000000000000..c345e98397f88a --- /dev/null +++ b/ports/ngspice/use-winbison-sharedspice.patch @@ -0,0 +1,19 @@ +diff --git a/visualc/sharedspice.vcxproj b/visualc/sharedspice.vcxproj +index 4ff0dfc..57b0c35 100644 +--- a/visualc/sharedspice.vcxproj ++++ b/visualc/sharedspice.vcxproj +@@ -2223,12 +2223,12 @@ + + + invoke win_bison.exe for %(Identity) +- ..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 ++ win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 + .\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h + + + invoke win_bison.exe for %(Identity) +- ..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 ++ win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 + .\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h + + diff --git a/ports/ngspice/use-winbison-vngspice.patch b/ports/ngspice/use-winbison-vngspice.patch new file mode 100644 index 00000000000000..008bc686de8ca6 --- /dev/null +++ b/ports/ngspice/use-winbison-vngspice.patch @@ -0,0 +1,50 @@ +diff --git a/visualc/vngspice.vcxproj b/visualc/vngspice.vcxproj +index 2d1aa81..cf0f0c7 100644 +--- a/visualc/vngspice.vcxproj ++++ b/visualc/vngspice.vcxproj +@@ -2681,12 +2681,12 @@ + + + invoke win_bison.exe for %(Identity) +- ..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 ++ win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 + .\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h + + + invoke win_bison.exe for %(Identity) +- ..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 ++ win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 + .\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h + + +diff --git a/visualc/xspice/cmpp/cmpp.vcxproj b/visualc/xspice/cmpp/cmpp.vcxproj +index 78607a3..7bcc1a4 100644 +--- a/visualc/xspice/cmpp/cmpp.vcxproj ++++ b/visualc/xspice/cmpp/cmpp.vcxproj +@@ -157,22 +157,22 @@ + + + invoke win_flex.exe for %(Identity) +- ..\..\..\..\flex-bison\win_flex.exe --outfile=.\tmp-bison\%(Filename).c --header-file=.\tmp-bison\%(Filename).h %(Identity) || exit 1 ++ win_flex.exe --outfile=.\tmp-bison\%(Filename).c --header-file=.\tmp-bison\%(Filename).h %(Identity) || exit 1 + .\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h + + + invoke win_bison.exe for %(Identity) +- ..\..\..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 ++ win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 + .\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h + + + invoke win_flex.exe for %(Identity) +- ..\..\..\..\flex-bison\win_flex.exe --outfile=.\tmp-bison\%(Filename).c --header-file=.\tmp-bison\%(Filename).h %(Identity) || exit 1 ++ win_flex.exe --outfile=.\tmp-bison\%(Filename).c --header-file=.\tmp-bison\%(Filename).h %(Identity) || exit 1 + .\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h + + + invoke win_bison.exe for %(Identity) +- ..\..\..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 ++ win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 + .\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h + + diff --git a/ports/ngspice/vcpkg.json b/ports/ngspice/vcpkg.json new file mode 100644 index 00000000000000..1b6da85d1545cc --- /dev/null +++ b/ports/ngspice/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "ngspice", + "version-string": "35", + "description": "Ngspice is a mixed-level/mixed-signal electronic circuit simulator. It is a successor of the latest stable release of Berkeley SPICE", + "homepage": "http://ngspice.sourceforge.net/", + "supports": "!(linux | osx | arm | uwp)", + "default-features": [ + "codemodels" + ], + "features": { + "codemodels": { + "description": "Adds optional code models for XSPICE, ADMS (verilog integration) and B-/E-/G- sources." + } + } +} diff --git a/ports/nifticlib/portfile.cmake b/ports/nifticlib/portfile.cmake new file mode 100644 index 00000000000000..c9d74a49e5c39e --- /dev/null +++ b/ports/nifticlib/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NIFTI-Imaging/nifti_clib + REF 65f801b9c2f1f15f4de4a19d45e6595c25765632 + SHA512 be03cdc6cf17fd9ff74c5ecc1f6b2132121bb4b7973a731da334af2a8428d1f0dbbf7b94b2511d1ff7e515b8cc4cf3316d62b189566fb6ffc88c6146eebd48ff + HEAD_REF master + PATCHES zlib_include.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "cifti" USE_CIFTI_CODE + "fsl" USE_FSL_CODE + "nifti2" USE_NIFTI2_CODE + "nifticdf" USE_NIFTICDF_CODE + "tools" NIFTI_BUILD_APPLICATIONS + "tests" BUILD_TESTING +) +set(TOOL_NAMES) +if("tools" IN_LIST FEATURES) + list(APPEND TOOL_NAMES nifti_stats nifti_tool nifti1_tool) +endif() +if("tests" IN_LIST FEATURES) + list(APPEND TOOL_NAMES nifit_test) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake TARGET_PATH share) + +if(TOOL_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nifticlib/vcpkg.json b/ports/nifticlib/vcpkg.json new file mode 100644 index 00000000000000..8a35da5a0ae0a8 --- /dev/null +++ b/ports/nifticlib/vcpkg.json @@ -0,0 +1,35 @@ +{ + "name": "nifticlib", + "version-string": "2020-04-30", + "port-version": 1, + "description": "Nifticlib is a C I/O library for reading and writing files in the nifti-1 data format.", + "homepage": "NIFTI-Imaging/nifti_clib", + "supports": "!uwp", + "dependencies": [ + "zlib" + ], + "default-features": [ + "nifti2", + "nifticdf" + ], + "features": { + "cifti": { + "description": "Build cifti libraries and tools" + }, + "fsl": { + "description": "Build fsl libraries and tools" + }, + "nifti2": { + "description": "Build nifti2 libraries and tools" + }, + "nifticdf": { + "description": "Build nifticdf libraries and tools" + }, + "tests": { + "description": "Build tests" + }, + "tools": { + "description": "Build tools" + } + } +} diff --git a/ports/nifticlib/zlib_include.patch b/ports/nifticlib/zlib_include.patch new file mode 100644 index 00000000000000..1ef462b7f1f8de --- /dev/null +++ b/ports/nifticlib/zlib_include.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54150d739..c3ca8fe50 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -77,6 +77,7 @@ set_if_not_defined(ZNZ_COMPILE_DEF "") + if(NOT NIFTI_ZLIB_LIBRARIES) # If using a custom zlib library, skip the find package + ### USE AS STAND ALONE PACKAGE + find_package(ZLIB REQUIRED) ++ include_directories(${ZLIB_INCLUDE_DIRS}) + set(NIFTI_ZLIB_LIBRARIES ${ZLIB_LIBRARIES}) + endif() + #message(STATUS "---------------------ZLIB -${NIFTI_ZLIB_LIBRARIES}--") diff --git a/ports/nlohmann-fifo-map/CMakeLists.txt b/ports/nlohmann-fifo-map/CMakeLists.txt new file mode 100644 index 00000000000000..3450e5100c0645 --- /dev/null +++ b/ports/nlohmann-fifo-map/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.1) +project(nlohmann-fifo-map LANGUAGES CXX) + +include(GNUInstallDirs) + +set(NLOHMANN_FIFO_MAP_TARGET_NAME ${PROJECT_NAME}) +set(NLOHMANN_FIFO_MAP_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/nlohmann") +set(NLOHMANN_FIFO_MAP_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/nlohmann-fifo-map") +set(NLOHMANN_FIFO_MAP_CONFIG_EXPORT_NAME "${PROJECT_NAME}-config") +set(NLOHMANN_FIFO_MAP_INCLUDE_BUILD_DIR "${CMAKE_SOURCE_DIR}/src/") + +add_library(${NLOHMANN_FIFO_MAP_TARGET_NAME} INTERFACE) +add_library(${PROJECT_NAME}::${NLOHMANN_FIFO_MAP_TARGET_NAME} ALIAS ${NLOHMANN_FIFO_MAP_TARGET_NAME}) + +install( + DIRECTORY ${NLOHMANN_FIFO_MAP_INCLUDE_BUILD_DIR} + DESTINATION ${NLOHMANN_FIFO_MAP_INCLUDE_INSTALL_DIR} +) + +install( + TARGETS ${NLOHMANN_FIFO_MAP_TARGET_NAME} EXPORT ${NLOHMANN_FIFO_MAP_CONFIG_EXPORT_NAME} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +install( + EXPORT ${NLOHMANN_FIFO_MAP_CONFIG_EXPORT_NAME} + DESTINATION ${NLOHMANN_FIFO_MAP_CONFIG_INSTALL_DIR} + NAMESPACE ${PROJECT_NAME}:: +) + diff --git a/ports/nlohmann-fifo-map/portfile.cmake b/ports/nlohmann-fifo-map/portfile.cmake new file mode 100644 index 00000000000000..3079e964e3da9a --- /dev/null +++ b/ports/nlohmann-fifo-map/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nlohmann/fifo_map + REF 0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9 + SHA512 1e515d02ff49684dc8439ee1f3b9fbece3c727b6f669ee9a251eae8d8bf33eff0a36ab58829956a698cd9bfb757f9c6ade227d601197aa7b824c0584f48e181d + HEAD_REF master +) + +#make sure we don't use any integrated pre-built library nor any unnecessary CMake module +file(REMOVE_RECURSE ${SOURCE_PATH}/test) +file(REMOVE ${SOURCE_PATH}/CMakeLists.txt) + +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nlohmann-fifo-map/vcpkg.json b/ports/nlohmann-fifo-map/vcpkg.json new file mode 100644 index 00000000000000..e18734a35f4f05 --- /dev/null +++ b/ports/nlohmann-fifo-map/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "nlohmann-fifo-map", + "version-string": "2018.05.07", + "port-version": 2, + "description": "a FIFO-ordered associative container for C++", + "homepage": "https://github.com/nlohmann/fifo_map" +} diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL deleted file mode 100644 index 168535699fd541..00000000000000 --- a/ports/nlohmann-json/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nlohmann-json -Version: 3.7.0 -Homepage: https://github.com/nlohmann/json -Description: JSON for Modern C++ diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake index 5d105d4f411006..e6c34a526ce508 100644 --- a/ports/nlohmann-json/portfile.cmake +++ b/ports/nlohmann-json/portfile.cmake @@ -1,53 +1,37 @@ -include(vcpkg_common_functions) - -set(SOURCE_VERSION 3.7.0) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/nlohmann-json-v${SOURCE_VERSION}) - -file(MAKE_DIRECTORY ${SOURCE_PATH}) - -function(download_src SUBPATH SHA512) - vcpkg_download_distfile(FILE - URLS "https://github.com/nlohmann/json/raw/v${SOURCE_VERSION}/${SUBPATH}" - FILENAME "nlohmann-json-v${SOURCE_VERSION}/${SUBPATH}" - SHA512 ${SHA512} - ) - get_filename_component(SUBPATH_DIR "${SOURCE_PATH}/${SUBPATH}" DIRECTORY) - file(COPY ${FILE} DESTINATION ${SUBPATH_DIR}) -endfunction() - -download_src(CMakeLists.txt f397536b06a2adaf717067f6bcbc4b23836d28bb7471143848259ef90f84bb5aadbd21bb387f80603fca791c9806b846e110e97a10de5b276f03a7fe6a97f2eb) -download_src(LICENSE.MIT 44e6d9510dd66195211aa8ce3e6eef55be524e82c5864f3bfb85f2ac1215529c8ca370c8746de61ad5739e5af1633a5985085dacd1ffe220cd21d06433936801) -download_src(nlohmann_json.natvis 9bce6758db0e54777394a4e718e60a281952b15f0c6dc6a6ad4a6d023c958b5515b2d39b7d4c66c03f0d3fdfdc1d6c23afb8b8419f1345c9d44d7b9a9ee2582b) -download_src(cmake/config.cmake.in 7caab6166baa891f77f5b632ac4a920e548610ec41777b885ec51fe68d3665ffe91984dd2881caf22298b5392dfbd84b526fda252467bb66de9eb90e6e6ade5a) -download_src(single_include/nlohmann/json.hpp 1a12ea9e54a19e398a4d7aa3be1759ce3666a1b479bd553fe11bc63897a8055f11f42871eee6c801756dde038d860c48043cc50df753835c9a9691a1876a159e) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nlohmann/json + REF v3.10.2 + SHA512 9a399dfc8aab19c9fc12470e8087895b1c05d48a9bcc731b483d8670c361cffb2adc3ccced822b7f17255e88387a441d619c4e1f1afeb702d1d035ad24fe22ed + HEAD_REF master +) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DJSON_BuildTests=0 + OPTIONS + -DJSON_Install=ON + -DJSON_MultipleHeaders=ON + -DJSON_BuildTests=OFF ) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nlohmann_json TARGET_PATH share/nlohmann_json) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME "nlohmann_json" CONFIG_PATH "lib/cmake/nlohmann_json") +vcpkg_fixup_pkgconfig() vcpkg_replace_string( - ${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_jsonTargets.cmake + "${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_jsonTargets.cmake" "{_IMPORT_PREFIX}/nlohmann_json.natvis" "{_IMPORT_PREFIX}/share/nlohmann_json/nlohmann_json.natvis" ) - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug - ${CURRENT_PACKAGES_DIR}/lib -) - if(EXISTS ${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis) file(RENAME - ${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis - ${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_json.natvis + "${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis" + "${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_json.natvis" ) endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/nlohmann_json.natvis") + # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/nlohmann-json RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.MIT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/nlohmann-json/vcpkg.json b/ports/nlohmann-json/vcpkg.json new file mode 100644 index 00000000000000..10650043fa0646 --- /dev/null +++ b/ports/nlohmann-json/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "nlohmann-json", + "version-semver": "3.10.2", + "description": "JSON for Modern C++", + "homepage": "https://github.com/nlohmann/json", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/nlopt/CONTROL b/ports/nlopt/CONTROL deleted file mode 100644 index 0cc7666bbe19a4..00000000000000 --- a/ports/nlopt/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nlopt -Version: 2.6.1-1 -Homepage: https://github.com/stevengj/nlopt -Description: a library for nonlinear local and global optimization, for functions with and without gradient information. \ No newline at end of file diff --git a/ports/nlopt/portfile.cmake b/ports/nlopt/portfile.cmake index 5fb068145af10d..114ee72e5b11a0 100644 --- a/ports/nlopt/portfile.cmake +++ b/ports/nlopt/portfile.cmake @@ -1,12 +1,8 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO stevengj/nlopt - REF v2.6.1 - SHA512 e9b8ee75536a568e75150dc0a169d951b670d54ca9d2797f9db6f2751811d9d21be367fa6794a0bc76370715caf5356b368c9c12ad416f3cfb74ae8fa8eabd5c + REF v2.7.0 + SHA512 3c41cab357b50adf50fe2d6225409ade8c5e8ee3576e3680ab29dded29ed7d328bc3d51d3a50054630159c319dca69e47ff08dc5df891b180b7d7e8fcbc27694 HEAD_REF master ) diff --git a/ports/nlopt/vcpkg.json b/ports/nlopt/vcpkg.json new file mode 100644 index 00000000000000..7097097133dce5 --- /dev/null +++ b/ports/nlopt/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "nlopt", + "version-string": "2.7.0", + "description": "a library for nonlinear local and global optimization, for functions with and without gradient information.", + "homepage": "https://github.com/stevengj/nlopt" +} diff --git a/ports/nmap/CONTROL b/ports/nmap/CONTROL deleted file mode 100644 index 8dcace63e11d97..00000000000000 --- a/ports/nmap/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nmap -Version: 7.70 -Build-Depends: winpcap, lua, openssl, python2, libssh2 -Description: A library for scanning network ports. diff --git a/ports/nmap/build.sh b/ports/nmap/build.sh deleted file mode 100644 index f4e5d4b2984773..00000000000000 --- a/ports/nmap/build.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/bash -set -e -export PATH=/usr/bin:$PATH -# Export HTTP(S)_PROXY as http(s)_proxy: -if [ "$HTTP_PROXY" ]; then - export http_proxy=$HTTP_PROXY -fi -if [ "$HTTPS_PROXY" ]; then - export https_proxy=$HTTPS_PROXY -fi - -PATH_TO_BUILD_DIR="`cygpath "$1"`" -PATH_TO_SRC_DIR="`cygpath "$2"`" -PATH_TO_PACKAGE_DIR="`cygpath "$3"`" -# Note: $4 is extra configure options - -cd "$PATH_TO_BUILD_DIR" -echo "=== CONFIGURING ===" -echo "building nmap package $PATH_TO_SRC_DIR" -"$PATH_TO_SRC_DIR/configure" CC=cl.exe LD=link.exe CXX=lc.exe "--prefix=$PATH_TO_PACKAGE_DIR" $4 -echo "=== BUILDING ===" -make -j6 -echo "=== INSTALLING ===" -make install diff --git a/ports/nmap/detect-crypto-library.patch b/ports/nmap/detect-crypto-library.patch deleted file mode 100644 index 243735b9e5c75b..00000000000000 --- a/ports/nmap/detect-crypto-library.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- a/configure 2017-11-01 23:55:49.000000000 +0100 -+++ b/configure 2019-03-05 03:35:21.753268300 +0100 -@@ -5989,13 +5989,13 @@ - - # use_openssl="yes" given explicitly in next 2 rules to avoid adding lib to $LIBS - if test "$use_openssl" = "yes"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BIO_int_ctrl in -lcrypto" >&5 --$as_echo_n "checking for BIO_int_ctrl in -lcrypto... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BIO_int_ctrl in -llibeay32" >&5 -+$as_echo_n "checking for BIO_int_ctrl in -llibeay32... " >&6; } - if ${ac_cv_lib_crypto_BIO_int_ctrl+:} false; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lcrypto $LIBS" -+LIBS="-llibeay32 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -6030,23 +6030,23 @@ - else - use_openssl="no" - if test "$with_openssl" = "yes"; then -- as_fn_error $? "OpenSSL was explicitly requested but libcrypto was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." "$LINENO" 5 -+ as_fn_error $? "OpenSSL was explicitly requested but libeay32 was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." "$LINENO" 5 - fi -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find libcrypto so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&5 --$as_echo "$as_me: WARNING: Failed to find libcrypto so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&2;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find libeay32 so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&5 -+$as_echo "$as_me: WARNING: Failed to find libeay32 so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&2;} - - fi - - fi - - if test "$use_openssl" = "yes"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 --$as_echo_n "checking for SSL_new in -lssl... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssleay32" >&5 -+$as_echo_n "checking for SSL_new in -lssleay32... " >&6; } - if ${ac_cv_lib_ssl_SSL_new+:} false; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lssl -lcrypto $LIBS" -+LIBS="-lssleay32 -llibeay32 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -6090,13 +6090,13 @@ - fi - - if test "$use_openssl" = "yes"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_get1_EC_KEY in -lcrypto" >&5 --$as_echo_n "checking for EVP_PKEY_get1_EC_KEY in -lcrypto... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_get1_EC_KEY in -llibeay32" >&5 -+$as_echo_n "checking for EVP_PKEY_get1_EC_KEY in -llibeay32... " >&6; } - if ${ac_cv_lib_crypto_EVP_PKEY_get1_EC_KEY+:} false; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lcrypto $LIBS" -+LIBS="-llibeay32 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -6144,7 +6144,7 @@ - - $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h - -- OPENSSL_LIBS="-lssl -lcrypto" -+ OPENSSL_LIBS="-lssleay32 -llibeay32" - else - trace_no_use="$trace_no_use openssl" - fi diff --git a/ports/nmap/fix-msvc-prj.patch b/ports/nmap/fix-msvc-prj.patch new file mode 100644 index 00000000000000..25893f13793580 --- /dev/null +++ b/ports/nmap/fix-msvc-prj.patch @@ -0,0 +1,1986 @@ +diff --git a/libdnet-stripped/libdnet-stripped.vcxproj b/libdnet-stripped/libdnet-stripped.vcxproj +index 1f2b760..1756c5c 100644 +--- a/libdnet-stripped/libdnet-stripped.vcxproj ++++ b/libdnet-stripped/libdnet-stripped.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + libdnet-stripped +@@ -22,11 +30,21 @@ + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + + +@@ -34,10 +52,18 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -64,6 +90,23 @@ + $(OutDir)libdnet-stripped.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ Disabled ++ include;..\mswin32\pcap-include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)libdnet-stripped.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -78,6 +121,20 @@ + $(OutDir)libdnet-stripped.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ include;..\mswin32\pcap-include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)libdnet-stripped.lib ++ ++ + + + +diff --git a/liblinear/liblinear.vcxproj b/liblinear/liblinear.vcxproj +index cf99e3d..ac5ff7c 100644 +--- a/liblinear/liblinear.vcxproj ++++ b/liblinear/liblinear.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + +@@ -36,6 +44,12 @@ + Unicode + v120 + ++ ++ StaticLibrary ++ true ++ Unicode ++ v120 ++ + + StaticLibrary + false +@@ -43,19 +57,33 @@ + Unicode + v120 + ++ ++ StaticLibrary ++ false ++ true ++ Unicode ++ v120 ++ + + + + + + ++ ++ ++ + + + ++ ++ ++ + + + .\ + ++ + + .\ + +@@ -75,6 +103,21 @@ + true + + ++ ++ ++ ++ ++ Level3 ++ Disabled ++ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ /D_CRT_SECURE_NO_WARNINGS=1 %(AdditionalOptions) ++ ++ ++ Windows ++ true ++ ++ + + + Level3 +@@ -93,6 +136,24 @@ + true + + ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) ++ /D_CRT_SECURE_NO_WARNINGS=1 %(AdditionalOptions) ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ + + + +diff --git a/liblua/liblua.vcxproj b/liblua/liblua.vcxproj +index 8e80221..db6b1ea 100644 +--- a/liblua/liblua.vcxproj ++++ b/liblua/liblua.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + {31FB0767-A71F-4575-8379-002D72B8AF86} +@@ -22,20 +30,37 @@ + true + v120 + ++ ++ StaticLibrary ++ NotSet ++ true ++ v120 ++ + + StaticLibrary + NotSet + v120 + ++ ++ StaticLibrary ++ NotSet ++ v120 ++ + + + + + + ++ ++ ++ + + + ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -68,6 +93,29 @@ + $(OutDir)liblua.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ Disabled ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ Default ++ MultiThreadedDebugDLL ++ false ++ false ++ false ++ ++ ++ Level3 ++ ProgramDatabase ++ Cdecl ++ CompileAsC ++ ++ ++ $(OutDir)liblua.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -91,6 +139,29 @@ + $(OutDir)liblua.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ false ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ false ++ ++ ++ Default ++ false ++ false ++ false ++ ++ ++ Level3 ++ ++ ++ CompileAsC ++ ++ ++ $(OutDir)liblua.lib ++ ++ + + + +diff --git a/libnetutil/libnetutil.vcxproj b/libnetutil/libnetutil.vcxproj +index 8f4fbb5..00cc7c2 100644 +--- a/libnetutil/libnetutil.vcxproj ++++ b/libnetutil/libnetutil.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + {99157C3F-39F6-4663-99D7-1D9C1484494E} +@@ -22,20 +30,37 @@ + true + v120 + ++ ++ StaticLibrary ++ Unicode ++ true ++ v120 ++ + + StaticLibrary + Unicode + v120 + ++ ++ StaticLibrary ++ Unicode ++ v120 ++ + + + + + + ++ ++ ++ + + + ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -61,6 +86,22 @@ + $(OutDir)libnetutil.lib + + ++ ++ ++ Disabled ++ ..;../mswin32;../nbase;../mswin32/pcap-include;../libdnet-stripped/include;%(AdditionalIncludeDirectories) ++ WIN32;BPF_MAJOR_VERSION;_DEBUG;_LIB;%(PreprocessorDefinitions) ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)libnetutil.lib ++ ++ + + + MaxSpeed +@@ -74,6 +115,19 @@ + ProgramDatabase + + ++ ++ ++ MaxSpeed ++ true ++ ..;../mswin32;../nbase;../mswin32/pcap-include;../libdnet-stripped/include;%(AdditionalIncludeDirectories) ++ WIN32;BPF_MAJOR_VERSION;NDEBUG;_LIB;%(PreprocessorDefinitions) ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ + + + +diff --git a/mswin32/nmap.sln b/mswin32/nmap.sln +index 3f9fa22..4484bbd 100644 +--- a/mswin32/nmap.sln ++++ b/mswin32/nmap.sln +@@ -5,14 +5,11 @@ MinimumVisualStudioVersion = 10.0.40219.1 + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nmap", "nmap.vcxproj", "{361719F0-AB42-4C93-9DE8-7D2144B96625}" + ProjectSection(ProjectDependencies) = postProject + {99157C3F-39F6-4663-99D7-1D9C1484494E} = {99157C3F-39F6-4663-99D7-1D9C1484494E} +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} = {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D} = {A7BE3D76-F20C-40C5-8986-DE4028B3B57D} + EndProjectSection + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsock", "..\nsock\nsock.vcxproj", "{F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}" + EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpcre", "..\libpcre\libpcre.vcxproj", "{5DE86C7A-DE72-4265-8807-4CA38F94F22A}" +-EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nbase", "..\nbase\nbase.vcxproj", "{B630C8F7-3138-43E8-89ED-78742FA2AC5F}" + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdnet-stripped", "..\libdnet-stripped\libdnet-stripped.vcxproj", "{5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}" +@@ -27,14 +24,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnetutil", "..\libnetutil + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblinear", "..\liblinear\liblinear.vcxproj", "{A7BE3D76-F20C-40C5-8986-DE4028B3B57D}" + EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nmap-update", "..\nmap-update\nmap-update.vcxproj", "{BBF27339-C7B6-4F52-B742-897796C1F13B}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libz", "..\libz\contrib\vstudio\vc11\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh2", "..\libssh2\win32\libssh2.vcxproj", "{ED957342-E43B-496E-92D9-4C76B525BDF5}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "..\libz\contrib\vstudio\vc11\zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +-EndProject + Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 +@@ -49,176 +38,148 @@ Global + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|Win32.ActiveCfg = Debug|Win32 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|Win32.Build.0 = Debug|Win32 +- {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|x64.ActiveCfg = Debug|Win32 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|x64.ActiveCfg = Debug|x64 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|x64.Build.0 = Debug|x64 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {361719F0-AB42-4C93-9DE8-7D2144B96625}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Ncat Static|x64.Build.0 = Release|x64 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|Win32.ActiveCfg = Release|Win32 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|Win32.Build.0 = Release|Win32 +- {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|x64.ActiveCfg = Release|Win32 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|x64.ActiveCfg = Release|x64 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|x64.Build.0 = Release|x64 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|Win32.ActiveCfg = Debug|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|Win32.Build.0 = Debug|Win32 +- {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|x64.ActiveCfg = Debug|Win32 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|x64.ActiveCfg = Debug|x64 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|x64.Build.0 = Debug|x64 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|Win32.ActiveCfg = Static|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|Win32.Build.0 = Static|Win32 +- {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|x64.ActiveCfg = Static|Win32 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|x64.ActiveCfg = Static|x64 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|x64.Build.0 = Static|x64 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|Win32.ActiveCfg = Release|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|Win32.Build.0 = Release|Win32 +- {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|x64.ActiveCfg = Release|Win32 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|x64.ActiveCfg = Release|x64 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|x64.Build.0 = Release|x64 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseNoPcap|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseNoPcap|Win32 +- {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseNoPcap|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Debug|Win32.ActiveCfg = Debug|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Debug|Win32.Build.0 = Debug|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Debug|x64.ActiveCfg = Debug|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Ncat Static|x64.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Release|Win32.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Release|Win32.Build.0 = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Release|x64.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseNoPcap|x64 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|x64.Build.0 = ReleaseNoPcap|x64 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|Win32.ActiveCfg = Debug|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|Win32.Build.0 = Debug|Win32 +- {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|x64.ActiveCfg = Debug|Win32 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|x64.ActiveCfg = Debug|x64 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|x64.Build.0 = Debug|x64 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|Win32.ActiveCfg = Static|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|Win32.Build.0 = Static|Win32 +- {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|x64.ActiveCfg = Static|Win32 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|x64.ActiveCfg = Static|x64 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|x64.Build.0 = Static|x64 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|Win32.ActiveCfg = Release|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|Win32.Build.0 = Release|Win32 +- {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|x64.ActiveCfg = Release|Win32 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|x64.ActiveCfg = Release|x64 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|x64.Build.0 = Release|x64 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|Win32.ActiveCfg = Debug|Win32 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|Win32.Build.0 = Debug|Win32 +- {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|x64.ActiveCfg = Debug|Win32 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|x64.ActiveCfg = Debug|x64 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|x64.Build.0 = Debug|x64 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Ncat Static|x64.Build.0 = Release|x64 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|Win32.ActiveCfg = Release|Win32 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|Win32.Build.0 = Release|Win32 +- {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|x64.ActiveCfg = Release|Win32 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|x64.ActiveCfg = Release|x64 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|x64.Build.0 = Release|x64 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|Win32.ActiveCfg = Debug|Win32 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|Win32.Build.0 = Debug|Win32 +- {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|x64.ActiveCfg = Debug|Win32 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|x64.ActiveCfg = Debug|x64 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|x64.Build.0 = Debug|x64 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {31FB0767-A71F-4575-8379-002D72B8AF86}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Ncat Static|x64.Build.0 = Release|x64 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|Win32.ActiveCfg = Release|Win32 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|Win32.Build.0 = Release|Win32 +- {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|x64.ActiveCfg = Release|Win32 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|x64.ActiveCfg = Release|x64 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|x64.Build.0 = Release|x64 + {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|Win32.ActiveCfg = Debug|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|Win32.Build.0 = Debug|Win32 +- {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|x64.ActiveCfg = Debug|Win32 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|x64.ActiveCfg = Debug|x64 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|x64.Build.0 = Debug|x64 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|Win32.ActiveCfg = Static|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|Win32.Build.0 = Static|Win32 +- {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|x64.ActiveCfg = Static|Win32 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|x64.ActiveCfg = Static|x64 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|x64.Build.0 = Static|x64 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|Win32.ActiveCfg = Release|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|Win32.Build.0 = Release|Win32 +- {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|x64.ActiveCfg = Release|Win32 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|x64.ActiveCfg = Release|x64 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|x64.Build.0 = Release|x64 + {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|Win32.Build.0 = Debug|Win32 +- {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|x64.ActiveCfg = Debug|Win32 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|x64.ActiveCfg = Debug|x64 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|x64.Build.0 = Debug|x64 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Ncat Static|x64.Build.0 = Release|x64 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|Win32.ActiveCfg = Release|Win32 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|Win32.Build.0 = Release|Win32 +- {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|x64.ActiveCfg = Release|Win32 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|x64.ActiveCfg = Release|x64 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|x64.Build.0 = Release|x64 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|Win32.ActiveCfg = Debug|Win32 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|Win32.Build.0 = Debug|Win32 +- {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|x64.ActiveCfg = Debug|Win32 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|x64.ActiveCfg = Debug|x64 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|x64.Build.0 = Debug|x64 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {99157C3F-39F6-4663-99D7-1D9C1484494E}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Ncat Static|x64.Build.0 = Release|x64 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|Win32.ActiveCfg = Release|Win32 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|Win32.Build.0 = Release|Win32 +- {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|x64.ActiveCfg = Release|Win32 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|x64.ActiveCfg = Release|x64 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|x64.Build.0 = Release|x64 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|Win32.Build.0 = Debug|Win32 +- {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|x64.ActiveCfg = Debug|Win32 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|x64.ActiveCfg = Debug|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|x64.Build.0 = Debug|x64 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|Win32.ActiveCfg = Release|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|Win32.Build.0 = Release|Win32 +- {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|x64.Build.0 = Release|x64 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|Win32.ActiveCfg = Release|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|Win32.Build.0 = Release|Win32 +- {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|x64.ActiveCfg = Release|Win32 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|x64.ActiveCfg = Release|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|x64.Build.0 = Release|x64 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Debug|Win32.ActiveCfg = Debug|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Debug|Win32.Build.0 = Debug|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Debug|x64.ActiveCfg = Debug|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Ncat Static|Win32.Build.0 = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Ncat Static|x64.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Release|Win32.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Release|Win32.Build.0 = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Release|x64.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Ncat Static|Win32.Build.0 = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Ncat Static|x64.ActiveCfg = Release|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Ncat Static|x64.Build.0 = Release|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Debug|Win32.ActiveCfg = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Debug|Win32.Build.0 = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Debug|x64.ActiveCfg = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Ncat Static|Win32.ActiveCfg = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Ncat Static|Win32.Build.0 = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Ncat Static|x64.ActiveCfg = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Release|Win32.ActiveCfg = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Release|Win32.Build.0 = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Release|x64.ActiveCfg = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Ncat Static|Win32.Build.0 = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Ncat Static|x64.ActiveCfg = Release|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Ncat Static|x64.Build.0 = Release|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection ++ GlobalSection(ExtensibilityGlobals) = postSolution ++ SolutionGuid = {DAA6BF7B-6F78-4BE7-A3FC-3B1BD73676C3} ++ EndGlobalSection + EndGlobal +diff --git a/mswin32/nmap.vcxproj b/mswin32/nmap.vcxproj +index a3abbc6..d5e1977 100644 +--- a/mswin32/nmap.vcxproj ++++ b/mswin32/nmap.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + {361719F0-AB42-4C93-9DE8-7D2144B96625} +@@ -21,12 +29,24 @@ + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + Application + false + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + + +@@ -34,10 +54,18 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -76,7 +104,7 @@ + false + + +- liblua.lib;nsock.lib;libpcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibstat.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ liblua.lib;nsock.lib;pcred.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibd.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib + .\Debug\nmap.exe + true + ..\libssh2\win32\Release_dll;lib;..\liblua;..\libpcre;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) +@@ -91,8 +119,57 @@ + MachineX86 + + +- xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)\..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y +-xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(ProjectDir)$(OutDir)" ++ xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y ++ ++ ++ $(IntDir)%(Filename).res ++ ++ ++ ++ ++ .\Debug/nmap.tlb ++ ++ ++ ++ ++ Disabled ++ .;..;..\liblua;..\nbase;..\libpcre;..\nsock\include;pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblinear;..\libssh2\include;..\libz;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;%(PreprocessorDefinitions) ++ ..\libssh2\include;.;..;..\liblua;..\nbase;..\libpcre;..\nsock\include;pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblinear;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ false ++ false ++ false ++ EnableFastChecks ++ ++ ++ .\Debug/nmap.pch ++ .\Debug/ ++ .\Debug/ ++ .\Debug/ ++ Level2 ++ true ++ ProgramDatabase ++ CompileAsCpp ++ MultiThreadedDebugDLL ++ false ++ ++ ++ liblua.lib;nsock.lib;pcred.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibd.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib ++ .\Debug\nmap.exe ++ true ++ ..\libssh2\win32\Release_dll;lib;..\liblua\x64\Debug;..\libpcre\x64\Debug;..\nsock\x64\Debug;..\nbase\x64\Debug;..\libdnet-stripped\x64\Debug;..\libnetutil\x64\Debug;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear\x64\Debug;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) ++ true ++ .\Debug/nmap.pdb ++ Console ++ false ++ ++ ++ ++ ++ xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y + + + $(IntDir)%(Filename).res +@@ -121,7 +198,7 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + CompileAsCpp + + +- liblua.lib;nsock.lib;libpcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibstat.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ liblua.lib;nsock.lib;pcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlib.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib + .\Release/nmap.exe + true + ..\libssh2\win32\Release_dll;lib;..\liblua;..\libpcre;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) +@@ -135,8 +212,46 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + /LTCG %(AdditionalOptions) + + +- xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)\..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y +-xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(ProjectDir)$(OutDir)" ++ xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y ++ ++ ++ ++ ++ .\Release/nmap.tlb ++ ++ ++ ++ ++ MaxSpeed ++ OnlyExplicitInline ++ .;..;..\liblua;..\nbase;..\libpcre;..\nsock\include;pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblinear;..\libssh2\include;..\libz;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ true ++ true ++ ++ ++ .\Release/nmap.pch ++ .\Release/ ++ .\Release/ ++ .\Release/ ++ true ++ CompileAsCpp ++ ++ ++ liblua.lib;nsock.lib;pcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlib.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib ++ .\Release/nmap.exe ++ true ++ ..\libssh2\win32\Release_dll;lib;..\liblua\x64\Release;..\libpcre;..\nsock\x64\Release;..\nbase\x64\Release;..\libdnet-stripped\x64\Release;..\libnetutil\x64\Release;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear\x64\Release;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) ++ .\Release/nmap.pdb ++ Console ++ true ++ true ++ /LTCG %(AdditionalOptions) ++ ++ ++ xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y + + + +@@ -191,7 +306,9 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + + + Sync ++ Sync + Sync ++ Sync + + + +@@ -251,83 +368,147 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename).xsl to output directory... ++ Copying %(Filename).xsl to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul + + $(TargetDir)%(Filename).xsl;%(Outputs) ++ $(TargetDir)%(Filename).xsl;%(Outputs) + Copying %(Filename).xsl to output directory... ++ Copying %(Filename).xsl to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul + + $(TargetDir)%(Filename).xsl;%(Outputs) ++ $(TargetDir)%(Filename).xsl;%(Outputs) + + + +@@ -339,18 +520,6 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + {31fb0767-a71f-4575-8379-002d72b8af86} + false + +- +- {5de86c7a-de72-4265-8807-4ca38f94f22a} +- false +- +- +- {ed957342-e43b-496e-92d9-4c76b525bdf5} +- false +- false +- false +- true +- false +- + + {b630c8f7-3138-43e8-89ed-78742fa2ac5f} + false +diff --git a/nbase/nbase.vcxproj b/nbase/nbase.vcxproj +index 948d7c8..b600c7b 100644 +--- a/nbase/nbase.vcxproj ++++ b/nbase/nbase.vcxproj +@@ -5,14 +5,26 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + Static + Win32 + ++ ++ Static ++ x64 ++ + + + {B630C8F7-3138-43E8-89ED-78742FA2AC5F} +@@ -25,16 +37,31 @@ + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + + +@@ -42,14 +69,26 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -76,6 +115,21 @@ + $(OutDir)nbase.lib + + ++ ++ ++ Disabled ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)nbase.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -89,6 +143,19 @@ + $(OutDir)nbase.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)nbase.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -103,6 +170,20 @@ + $(OutDir)nbase.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ MultiThreaded ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)nbase.lib ++ ++ + + + +diff --git a/ncat/ncat.vcxproj b/ncat/ncat.vcxproj +index fc44dfa..e066b29 100644 +--- a/ncat/ncat.vcxproj ++++ b/ncat/ncat.vcxproj +@@ -5,14 +5,26 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + Static + Win32 + ++ ++ Static ++ x64 ++ + + + {C1E04411-E021-468B-83F1-CB624BBA7589} +@@ -25,18 +37,36 @@ + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + Application + false + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + Application + false + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + + +@@ -44,26 +74,41 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 + .\$(Configuration)\ + .\$(Configuration)\ + true ++ true + .\Release\ + .\Release\ + .\Release\ + .\Release\ + true ++ true + true ++ true + + + +@@ -111,6 +156,51 @@ + xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(Configuration)\" /y + + ++ ++ ++ .\Debug/ncat.tlb ++ ++ ++ ++ ++ Disabled ++ .;..;../nbase;..\nsock\include;..\mswin32\pcap-include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblua;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;%(PreprocessorDefinitions) ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ .\Debug/ncat.pch ++ .\Debug/ ++ .\Debug/ ++ .\Debug/ ++ Level2 ++ true ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ ++ ++ ++ ++ nbase.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;nsock.lib;advapi32.lib;libcrypto.lib;libssl.lib;liblua.lib ++ .\Debug\ncat.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblua;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ wpcap.dll;%(DelayLoadDLLs) ++ true ++ .\Debug/ncat.pdb ++ Console ++ false ++ ++ ++ ++ ++ xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(Configuration)\" /y ++ ++ + + + .\Release/ncat.tlb +@@ -151,6 +241,45 @@ + xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(Configuration)\" /y + + ++ ++ ++ .\Release/ncat.tlb ++ ++ ++ ++ ++ MaxSpeed ++ OnlyExplicitInline ++ .;..;../nbase;..\nsock\include;..\mswin32\pcap-include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblua;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;%(PreprocessorDefinitions) ++ true ++ true ++ ++ ++ .\Release/ncat.pch ++ .\Release/ ++ .\Release/ ++ .\Release/ ++ Level2 ++ true ++ CompileAsCpp ++ ++ ++ nsock.lib;nbase.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;advapi32.lib;libcrypto.lib;libssl.lib ++ .\Release/ncat.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ wpcap.dll;%(DelayLoadDLLs) ++ .\Release/ncat.pdb ++ Console ++ true ++ true ++ ++ ++ xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(Configuration)\" /y ++ ++ + + + .\Release/ncat.tlb +@@ -193,6 +322,47 @@ + + + ++ ++ ++ .\Release/ncat.tlb ++ ++ ++ ++ ++ MaxSpeed ++ OnlyExplicitInline ++ .;..;../nbase;..\nsock\include;..\mswin32\pcap-include;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;%(PreprocessorDefinitions) ++ true ++ MultiThreaded ++ true ++ ++ ++ .\Release/ncat.pch ++ .\Release/ ++ .\Release/ ++ .\Release/ ++ Level2 ++ true ++ CompileAsCpp ++ ++ ++ nsock.lib;nbase.lib;ws2_32.lib;IPHlpAPI.Lib;advapi32.lib;libssl.lib;libcrypto.lib;user32.lib;gdi32.lib ++ .\Release/ncat.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ %(DelayLoadDLLs) ++ .\Release/ncat.pdb ++ Console ++ true ++ true ++ ++ ++ ++ ++ ++ + + + +@@ -230,17 +400,29 @@ + + + Copying %(Filename).crt to output directory... ++ Copying %(Filename).crt to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul + + $(TargetDir)%(Filename).crt;%(Outputs) ++ $(TargetDir)%(Filename).crt;%(Outputs) + Copying %(Filename).crt to output directory... ++ Copying %(Filename).crt to output directory... + Copying %(Filename).crt to output directory... ++ Copying %(Filename).crt to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul + + $(TargetDir)%(Filename).crt;%(Outputs) ++ $(TargetDir)%(Filename).crt;%(Outputs) + $(TargetDir)%(Filename).crt;%(Outputs) ++ $(TargetDir)%(Filename).crt;%(Outputs) + + + +diff --git a/nping/nping.vcxproj b/nping/nping.vcxproj +index 57bd4ed..fa7a604 100644 +--- a/nping/nping.vcxproj ++++ b/nping/nping.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36} +@@ -21,12 +29,24 @@ + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + Application + false + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + + +@@ -34,19 +54,29 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 + .\$(Configuration)\ + .\$(Configuration)\ + true ++ true + .\Release\ + .\Release\ + true ++ true + + + +@@ -93,6 +123,50 @@ + xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y + + ++ ++ ++ .\Debug/nmap.tlb ++ ++ ++ ++ ++ Disabled ++ .;..;..\mswin32;../nbase;..\nsock\include;..\mswin32\pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ false ++ false ++ false ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ .\Debug/nmap.pch ++ .\Debug/ ++ .\Debug/ ++ .\Debug/ ++ Level2 ++ true ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ nsock.lib;nbase.lib;libdnet-stripped.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib ++ .\Debug\nping.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) ++ true ++ .\Debug/nmap.pdb ++ Console ++ false ++ ++ ++ ++ ++ xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y ++ ++ + + + .\Release/nmap.tlb +@@ -132,6 +206,44 @@ + xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y + + ++ ++ ++ .\Release/nmap.tlb ++ ++ ++ ++ ++ MaxSpeed ++ OnlyExplicitInline ++ .;..;..\mswin32;../nbase;..\nsock\include;..\mswin32\pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ true ++ true ++ ++ ++ .\Release/nping.pch ++ .\Release/ ++ .\Release/ ++ .\Release/ ++ true ++ CompileAsCpp ++ ++ ++ nsock.lib;nbase.lib;libdnet-stripped.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib ++ .\Release/nping.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) ++ .\Release/nping.pdb ++ Console ++ true ++ true ++ ++ ++ xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y ++ ++ + + + +diff --git a/nsock/nsock.vcxproj b/nsock/nsock.vcxproj +index 36feb48..f720258 100644 +--- a/nsock/nsock.vcxproj ++++ b/nsock/nsock.vcxproj +@@ -5,22 +5,42 @@ + DebugNoPcap + Win32 + ++ ++ DebugNoPcap ++ x64 ++ + + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + ReleaseNoPcap + Win32 + ++ ++ ReleaseNoPcap ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + Static + Win32 + ++ ++ Static ++ x64 ++ + + + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4} +@@ -33,26 +53,51 @@ + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + + +@@ -60,22 +105,42 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -110,6 +175,25 @@ + $(OutDir)nsock.lib + + ++ ++ ++ Disabled ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -127,6 +211,23 @@ + $(OutDir)nsock.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -145,6 +246,24 @@ + $(OutDir)nsock.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions);DISABLE_NSOCK_PCAP ++ ++ ++ MultiThreaded ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ + + + /D "DISABLE_NSOCK_PCAP" %(AdditionalOptions) +@@ -166,9 +285,47 @@ + $(OutDir)nsock.lib + + ++ ++ ++ /D "DISABLE_NSOCK_PCAP" %(AdditionalOptions) ++ Disabled ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" ++/D "DISABLE_NSOCK_PCAP" %(AdditionalOptions) ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" + /D "DISABLE_NSOCK_PCAP" %(AdditionalOptions) + ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;%(PreprocessorDefinitions) diff --git a/ports/nmap/fix-snprintf.patch b/ports/nmap/fix-snprintf.patch new file mode 100644 index 00000000000000..aafd1cfe9408ab --- /dev/null +++ b/ports/nmap/fix-snprintf.patch @@ -0,0 +1,39 @@ +diff --git a/libdnet-stripped/include/dnet_winconfig.h b/libdnet-stripped/include/dnet_winconfig.h +index e41907c..82bc595 100644 +--- a/libdnet-stripped/include/dnet_winconfig.h ++++ b/libdnet-stripped/include/dnet_winconfig.h +@@ -277,7 +277,7 @@ int strlcpy(char *, const char *, int); + char *strsep(char **, const char *); + #endif + +-#define snprintf _snprintf ++//#define snprintf _snprintf + + /* Without this, Windows will give us all sorts of crap about using functions + like strcpy() even if they are done safely */ +diff --git a/nbase/nbase.h b/nbase/nbase.h +index 0ecd9bc..c0eb395 100644 +--- a/nbase/nbase.h ++++ b/nbase/nbase.h +@@ -359,7 +359,7 @@ extern "C" int vsnprintf (char *, size_t, const char *, va_list); + #define putenv _putenv + + #if !defined(__GNUC__) +-#define snprintf _snprintf ++//#define snprintf _snprintf + #endif + + #define strcasecmp _stricmp +diff --git a/nse_libssh2.cc b/nse_libssh2.cc +index bf721b6..1fafe7f 100644 +--- a/nse_libssh2.cc ++++ b/nse_libssh2.cc +@@ -58,7 +58,7 @@ struct ssh_userdata { + + + #if defined(_MSC_VER) && _MSC_VER < 1900 +-#define snprintf c99_snprintf ++//#define snprintf c99_snprintf + #define vsnprintf c99_vsnprintf + + __inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) { diff --git a/ports/nmap/fix-ssize_t.patch b/ports/nmap/fix-ssize_t.patch new file mode 100644 index 00000000000000..36103a8c246d73 --- /dev/null +++ b/ports/nmap/fix-ssize_t.patch @@ -0,0 +1,16 @@ +diff --git a/libdnet-stripped/include/dnet/os.h b/libdnet-stripped/include/dnet/os.h +index 55a21b9..544ebd8 100644 +--- a/libdnet-stripped/include/dnet/os.h ++++ b/libdnet-stripped/include/dnet/os.h +@@ -23,7 +23,11 @@ + typedef u_short uint16_t; + typedef u_int uint32_t; + # ifndef __CYGWIN__ ++#ifdef _WIN64 ++ typedef __int64 ssize_t; ++#else + typedef long ssize_t; ++#endif + # endif + #else + # include diff --git a/ports/nmap/portfile.cmake b/ports/nmap/portfile.cmake index 5e2e057874a172..c0252af8dac02e 100644 --- a/ports/nmap/portfile.cmake +++ b/ports/nmap/portfile.cmake @@ -1,134 +1,120 @@ -include(vcpkg_common_functions) +# nmap is a tools, so ignor POST_CHECK +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) vcpkg_download_distfile(ARCHIVE URLS "https://nmap.org/dist/nmap-7.70.tar.bz2" FILENAME "nmap-7.70.tar.bz2" SHA512 084c148b022ff6550e269d976d0077f7932a10e2ef218236fe13aa3a70b4eb6506df03329868fc68cb3ce78e4360b200f5a7a491d3145028fed679ef1c9ecae5 ) -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${SQLITE_VERSION} -) - -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/detect-crypto-library.patch -) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make) -else() - vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make) -endif() -set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) -set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") -set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}") - -set(_csc_PROJECT_PATH nmap) - -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") - set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") - set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") - if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - vcpkg_find_acquire_program(GASPREPROCESSOR) - foreach(GAS_PATH ${GASPREPROCESSOR}) - get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) - set(ENV{PATH} "$ENV{PATH};${GAS_ITEM_PATH}") - endforeach(GAS_PATH) - elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - else() - message(FATAL_ERROR "Unsupported architecture") +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-snprintf.patch + fix-ssize_t.patch + fix-msvc-prj.patch + ) + list(APPEND DEL_PROJS "libpcap" "libpcre" "libssh2" "libz") + foreach (DEL_PROJ ${DEL_PROJS}) + file(REMOVE_RECURSE ${SOURCE_PATH}/${DEL_PROJ}) + endforeach() + + # Clear + vcpkg_execute_required_process( + COMMAND "devenv.exe" + "nmap.sln" + /Clean + WORKING_DIRECTORY ${SOURCE_PATH}/mswin32 + ) + + # Uprade + message(STATUS "Upgrade solution...") + vcpkg_execute_required_process( + COMMAND "devenv.exe" + "nmap.sln" + /Upgrade + WORKING_DIRECTORY ${SOURCE_PATH}/mswin32 + LOGNAME upgrade-Packet-${TARGET_TRIPLET} + ) + # Build + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/mswin32/nmap.vcxproj + PLATFORM ${MSBUILD_PLATFORM} + USE_VCPKG_INTEGRATION + ) + + # Install + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Release) + file(INSTALL ${SOURCE_PATH}/mswin32/Release/nmap.exe + ${SOURCE_PATH}/mswin32/Release/nmap.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/tools) endif() -endif() - - -set(OPTIONS "--with-openssl=${VCPKG_ROOT_DIR}/installed/x64-windows/bin/ --with-libssh2=${VCPKG_ROOT_DIR}/installed/x64-windows/bin/") - -message(STATUS "Building Options: ${OPTIONS}") - -set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html -set(OPTIONS_RELEASE "") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(OPTIONS "${OPTIONS} --disable-static --enable-shared") - if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(OPTIONS "${OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Debug) + file(INSTALL ${SOURCE_PATH}/mswin32/Debug/nmap.exe + ${SOURCE_PATH}/mswin32/Debug/nmap.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/tools) endif() -endif() - -message(STATUS "Building Options: ${OPTIONS}") - -message(STATUS "Building ${_csc_PROJECT_PATH} for Release") -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" # BUILD DIR - "${SOURCE_PATH}" # SOURCE DIR - "${CURRENT_PACKAGES_DIR}" # PACKAGE DIR - "${OPTIONS} ${OPTIONS_RELEASE}" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel -) - -message(STATUS "Building ${_csc_PROJECT_PATH} for Debug") -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" # BUILD DIR - "${SOURCE_PATH}" # SOURCE DIR - "${CURRENT_PACKAGES_DIR}/debug" # PACKAGE DIR - "${OPTIONS} ${OPTIONS_DEBUG}" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg -) - -file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/debug/lib/*.def) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(LIB_MACHINE_ARG /machine:ARM) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(LIB_MACHINE_ARG /machine:x86) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(LIB_MACHINE_ARG /machine:x64) else() - message(FATAL_ERROR "Unsupported target architecture") -endif() - -foreach(DEF_FILE ${DEF_FILES}) - get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY) - get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME) - string(REGEX REPLACE "-[0-9]*\\.def" ".lib" OUT_FILE_NAME "${DEF_FILE_NAME}") - file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE) - file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE) - message(STATUS "Generating ${OUT_FILE_NATIVE}") - vcpkg_execute_required_process( - COMMAND lib.exe /def:${DEF_FILE_NATIVE} /out:${OUT_FILE_NATIVE} ${LIB_MACHINE_ARG} - WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR} - LOGNAME libconvert-${TARGET_TRIPLET} - ) -endforeach() - -file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp) -file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) -file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -set(FILES_TO_REMOVE ${EXP_FILES} ${LIB_FILES} ${DEF_FILES} ${EXE_FILES}) -list(LENGTH FILES_TO_REMOVE FILES_TO_REMOVE_LEN) -if(FILES_TO_REMOVE_LEN GREATER 0) - file(REMOVE ${FILES_TO_REMOVE}) + set(ENV{LDFLAGS} "$ENV{LDFLAGS} -pthread") + set(OPTIONS --without-nmap-update --with-openssl=${CURRENT_INSTALLED_DIR} --with-libssh2=${CURRENT_INSTALLED_DIR} --with-libz=${CURRENT_INSTALLED_DIR} --with-libpcre=${CURRENT_INSTALLED_DIR}) + message(STATUS "Building Options: ${OPTIONS}") + + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Release) + # Since nmap makefile has strong relationshop with codes, copy codes to obj path + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + vcpkg_extract_source_archive(source_path_release + ARCHIVE "${ARCHIVE}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + ) + + vcpkg_execute_required_process( + COMMAND "./configure" ${OPTIONS} + WORKING_DIRECTORY "${source_path_release}" + LOGNAME config-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make + WORKING_DIRECTORY "${source_path_release}" + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel") + file(INSTALL ${source_path_release}/nmap DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + endif() + + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Debug) + # Since nmap makefile has strong relationshop with codes, copy codes to obj path + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + vcpkg_extract_source_archive(source_path_debug + ARCHIVE "${ARCHIVE}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + ) + + vcpkg_execute_required_process( + COMMAND "./configure" ${OPTIONS} + WORKING_DIRECTORY ${source_path_debug} + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make + WORKING_DIRECTORY ${source_path_debug} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg") + file(INSTALL ${source_path_release}/nmap DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() + + set(SOURCE_PATH "${source_path_release}") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_copy_pdbs() # Handle copyright -# TODO: Examine build log and confirm that this license matches the build output -file(RENAME ${CURRENT_PACKAGES_DIR}/COPYING ${CURRENT_PACKAGES_DIR}/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nmap/vcpkg.json b/ports/nmap/vcpkg.json new file mode 100644 index 00000000000000..6aba23611c541d --- /dev/null +++ b/ports/nmap/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "nmap", + "version": "7.70", + "port-version": 5, + "description": "A library for scanning network ports.", + "dependencies": [ + { + "name": "libpcap", + "platform": "!windows" + }, + "libssh2", + "lua", + "openssl", + "pcre", + { + "name": "python2", + "platform": "windows" + }, + { + "name": "winpcap", + "platform": "windows" + }, + "zlib" + ] +} diff --git a/ports/nmslib/CONTROL b/ports/nmslib/CONTROL deleted file mode 100644 index 5f61fa1f9af38a..00000000000000 --- a/ports/nmslib/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: nmslib -Version: 1.7.3.6-1 -Homepage: https://github.com/searchivarius/nmslib -Description: Non-Metric Space Library (NMSLIB) is an efficient similarity search library and a toolkit for evaluation of k-NN methods for generic non-metric spaces. -# -# ## Extras are currently unsupported for Windows, waiting for fixes. -# Feature: extra -# Description: Build extra algorithms and tools for nmslib. Note that this feature requires a large bunch of dependencies. -# Build-Depends: gsl, eigen3, boost-system, boost-filesystem, boost-timer, boost-foreach, boost-format, boost-math, boost-random, boost-dynamic-bitset, boost-program-options diff --git a/ports/nmslib/fix-cmake-order.patch b/ports/nmslib/fix-cmake-order.patch deleted file mode 100644 index 8b465ae47e1faf..00000000000000 --- a/ports/nmslib/fix-cmake-order.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/similarity_search/CMakeLists.txt b/similarity_search/CMakeLists.txt -index 1451b30..a9f1616 100644 ---- a/similarity_search/CMakeLists.txt -+++ b/similarity_search/CMakeLists.txt -@@ -109,9 +109,6 @@ if (WITH_EXTRAS) - message (FATAL_ERROR "Could not locate GSL.") - endif (GSL_FOUND) - -- include_directories (${PROJECT_SOURCE_DIR}/lshkit/include) -- add_subdirectory (lshkit) -- - find_package(Eigen3 3 REQUIRED) - if (EIGEN3_FOUND) - message (STATUS "Found Eigen3.") -@@ -139,6 +136,8 @@ if (WITH_EXTRAS) - else () - message (FATAL_ERROR "Could not locate BOOST.") - endif () -+ -+ add_subdirectory (lshkit) - endif() - - add_subdirectory (src) diff --git a/ports/nmslib/fix-headers.patch b/ports/nmslib/fix-headers.patch index ee6db36dfd6e2d..f06fd06a837e8d 100644 --- a/ports/nmslib/fix-headers.patch +++ b/ports/nmslib/fix-headers.patch @@ -1,5 +1,5 @@ diff --git a/similarity_search/src/method/hnsw.cc b/similarity_search/src/method/hnsw.cc -index f5c7fca..4780746 100644 +index 2741701..7587f7f 100644 --- a/similarity_search/src/method/hnsw.cc +++ b/similarity_search/src/method/hnsw.cc @@ -27,7 +27,7 @@ @@ -12,7 +12,7 @@ index f5c7fca..4780746 100644 #include "portable_simd.h" #include "knnquery.h" diff --git a/similarity_search/src/method/hnsw_distfunc_opt.cc b/similarity_search/src/method/hnsw_distfunc_opt.cc -index 168ee81..408d95d 100644 +index 4c691bd..6f1a9e6 100644 --- a/similarity_search/src/method/hnsw_distfunc_opt.cc +++ b/similarity_search/src/method/hnsw_distfunc_opt.cc @@ -30,7 +30,7 @@ @@ -25,7 +25,7 @@ index 168ee81..408d95d 100644 #include "sort_arr_bi.h" diff --git a/similarity_search/src/method/pivot_neighb_invindx.cc b/similarity_search/src/method/pivot_neighb_invindx.cc -index b6473bd..6dcb00f 100644 +index c6113c7..a7d818b 100644 --- a/similarity_search/src/method/pivot_neighb_invindx.cc +++ b/similarity_search/src/method/pivot_neighb_invindx.cc @@ -21,7 +21,7 @@ @@ -38,12 +38,12 @@ index b6473bd..6dcb00f 100644 #include "portable_simd.h" #include "space.h" diff --git a/similarity_search/src/method/small_world_rand.cc b/similarity_search/src/method/small_world_rand.cc -index e8280cb..6bdb0f7 100644 +index e67ea97..92fe70a 100644 --- a/similarity_search/src/method/small_world_rand.cc +++ b/similarity_search/src/method/small_world_rand.cc -@@ -16,7 +16,7 @@ - #include +@@ -17,7 +17,7 @@ #include + #include // This is only for _mm_prefetch -#include +#include @@ -51,7 +51,7 @@ index e8280cb..6bdb0f7 100644 #if defined(_WIN32) || defined(WIN32) #include diff --git a/similarity_search/src/method/vptree.cc b/similarity_search/src/method/vptree.cc -index 04f481e..c71eed5 100644 +index 4da3b5f..d77e419 100644 --- a/similarity_search/src/method/vptree.cc +++ b/similarity_search/src/method/vptree.cc @@ -20,7 +20,7 @@ @@ -75,18 +75,3 @@ index 326b26b..413d66d 100644 #include #include -diff --git a/similarity_search/test/test_pow.cc b/similarity_search/test/test_pow.cc -index 1b46a68..faaa84e 100644 ---- a/similarity_search/test/test_pow.cc -+++ b/similarity_search/test/test_pow.cc -@@ -29,8 +29,8 @@ using namespace std; - - const float MAX_REL_DIFF = 1e-6f; - --vector addExps = { 0, 0.125, 0.25, 0.5 }; --vector vals = { 0.1, 0.5, 1, 1.5, 2, 4}; -+vector addExps = { 0, 0.125f, 0.25f, 0.5f }; -+vector vals = { 0.1f, 0.5f, 1, 1.5f, 2, 4}; - vector signs = { 1, -1}; - - template bool runTest() { diff --git a/ports/nmslib/portfile.cmake b/ports/nmslib/portfile.cmake index ed5d902baf26c9..fc5b3d145b915f 100644 --- a/ports/nmslib/portfile.cmake +++ b/ports/nmslib/portfile.cmake @@ -1,33 +1,21 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nmslib/nmslib - REF 1eda05dccd5ed34df50a243dfc64c5e9187388f8 - SHA512 e4518c8dd84867bd0ac5dbc5d3b57d8053d1f73588fc0cf1d7c91cc4819f22dc7888d6be587691ebc1fd12b67de16de63b5e0a24847b6f7b49b57d1e6b457ebd + REF 5482e077d1c8637499f86231bcd3979cb7fa6aef # v2.0.6 + SHA512 e529c8d1d97e972f8314be9837e10f4ebab57d4a5f19a66341bb8e163dfe53d1d640a3909a708b021a52d0e6c2537954d749cb80e71757469700a3e9e173ceca HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-headers.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-cmake-order.patch + fix-headers.patch ) -set(WITH_EXTRAS OFF) -if("extra" IN_LIST FEATURES) - set(WITH_EXTRAS ON) -endif() - # TODO: check SSE and AVX avability and set corresponding tags vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/similarity_search PREFER_NINJA - OPTIONS - -DWITH_EXTRAS=${WITH_EXTRAS} ) vcpkg_install_cmake() @@ -54,5 +42,4 @@ endforeach() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/nmslib/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/nmslib/README.md ${CURRENT_PACKAGES_DIR}/share/nmslib/copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nmslib/vcpkg.json b/ports/nmslib/vcpkg.json new file mode 100644 index 00000000000000..55af27add03f7d --- /dev/null +++ b/ports/nmslib/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "nmslib", + "version-string": "2.0.6", + "port-version": 1, + "description": "Non-Metric Space Library (NMSLIB) is an efficient similarity search library and a toolkit for evaluation of k-NN methods for generic non-metric spaces.", + "homepage": "https://github.com/searchivarius/nmslib", + "supports": "!(arm | uwp)" +} diff --git a/ports/nng/CONTROL b/ports/nng/CONTROL deleted file mode 100644 index 53de5d38475bdf..00000000000000 --- a/ports/nng/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: nng -Version: 2019-02-27 -Description: NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery. - -Feature: mbedtls -Description: nng built with TLS support(needs mbedTLS) -Build-Depends: mbedtls diff --git a/ports/nng/portfile.cmake b/ports/nng/portfile.cmake index 006617ca46ccd1..60af4ca7e02a6c 100644 --- a/ports/nng/portfile.cmake +++ b/ports/nng/portfile.cmake @@ -1,41 +1,33 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nanomsg/nng - REF ddeac617c9914284038241870cb99ae174fb3755 - SHA512 c45f322dfa3fba42db0561d95546159cc5e0768345d27f0bee53bdb71e77d5892e2e9bea50a625094ebf3c67b0c3fe0a8edea2660ebcb4fd0991fb0602055bc1 + REF 9fcf039b573d153ba9bbc2beb5f11259ddacdcff # v1.5.1 + SHA512 3db2668c3f971dc54156df2a3520645224fbb55460957da35940889c3148cb2cbc67c10cd23b9614ece70235d1f6003618310129eb9c40ced42db058c140dd58 HEAD_REF master ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" NNG_STATIC_LIB) - -if("mbedtls" IN_LIST FEATURES) - set(NNG_ENABLE_TLS ON) -else() - set(NNG_ENABLE_TLS OFF) -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + mbedtls NNG_ENABLE_TLS + tools NNG_ENABLE_NNGCAT +) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE - -DNNG_STATIC_LIB=${NNG_STATIC_LIB} -DNNG_TESTS=OFF - -DNNG_ENABLE_NNGCAT=OFF - -DNNG_ENABLE_TLS=${NNG_ENABLE_TLS} + ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() -# Move CMake config files to the right place -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nng) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/nng) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_replace_string( - ${CURRENT_PACKAGES_DIR}/include/nng/nng.h + "${CURRENT_PACKAGES_DIR}/include/nng/nng.h" "defined(NNG_SHARED_LIB)" "0 /* defined(NNG_SHARED_LIB) */" ) @@ -54,7 +46,10 @@ else() ) endif() -# Put the licence file where vcpkg expects it -configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/nng/copyright COPYONLY) +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES nngcat AUTO_CLEAN) +endif() + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/nng/vcpkg.json b/ports/nng/vcpkg.json new file mode 100644 index 00000000000000..c89456dfd6237c --- /dev/null +++ b/ports/nng/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "nng", + "version-semver": "1.5.1", + "description": "nanomsg-next-gen, lightweight messaging library", + "homepage": "https://nng.nanomsg.org", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "mbedtls": { + "description": "nng TLS support", + "dependencies": [ + "mbedtls" + ] + }, + "tools": { + "description": "nng tools (nngcat, for example)" + } + } +} diff --git a/ports/nngpp/CONTROL b/ports/nngpp/CONTROL deleted file mode 100644 index 7cc9d7afe10928..00000000000000 --- a/ports/nngpp/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: nngpp -Version: 2019-07-25 -Homepage:https://github.com/cwzx/nngpp -Description: C++ wrapper around the nanomsg NNG API. -Build-Depends: nng - diff --git a/ports/nngpp/portfile.cmake b/ports/nngpp/portfile.cmake index 18646951c490f3..5da246e5533e5e 100644 --- a/ports/nngpp/portfile.cmake +++ b/ports/nngpp/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cwzx/nngpp - REF 3351f54e6e774505d8d8b88064d04eb98e0b1cda - SHA512 6f72d1085b58ee7a8941294e7479661d8fc2c22cc8af2cee9c2cef11d508032a860c0061851bda07cf995ec8f57e5a25e241a15114a91c487d8aad6def2d4ce5 + REF cc5d2641babab165d8a9943817c46d36c6dc17c2 #v1.3.0 + SHA512 76b78f5b39b24fae3820924abb5c2f8f51f1683c08211366668745196b184ee4b4c9b1fd2fc68e8f234a56b802a4a79249d173d1562af46046d19a4498222405 HEAD_REF master ) @@ -25,6 +23,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) # Handle copyright -file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/license.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nngpp/vcpkg.json b/ports/nngpp/vcpkg.json new file mode 100644 index 00000000000000..d7e62a2ea9a7cc --- /dev/null +++ b/ports/nngpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "nngpp", + "version-string": "1.3.0", + "port-version": 1, + "description": "C++ wrapper around the nanomsg NNG API.", + "homepage": "https://github.com/cwzx/nngpp", + "dependencies": [ + "nng" + ] +} diff --git a/ports/nnpack/fix-cmakelists.patch b/ports/nnpack/fix-cmakelists.patch new file mode 100644 index 00000000000000..046443d80279ab --- /dev/null +++ b/ports/nnpack/fix-cmakelists.patch @@ -0,0 +1,98 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ecd2df..8565044 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,8 +12,6 @@ SET_PROPERTY(CACHE NNPACK_BACKEND PROPERTY STRINGS auto psimd scalar) + OPTION(NNPACK_CONVOLUTION_ONLY "Build only NNPACK functions for convolutional layer" OFF) + OPTION(NNPACK_INFERENCE_ONLY "Build only NNPACK functions for inference" OFF) + OPTION(NNPACK_CUSTOM_THREADPOOL "Build NNPACK for custom thread pool" OFF) +-SET(NNPACK_LIBRARY_TYPE "default" CACHE STRING "Type of library (shared, static, or default) to build") +-SET_PROPERTY(CACHE NNPACK_LIBRARY_TYPE PROPERTY STRINGS default static shared) + OPTION(NNPACK_BUILD_TESTS "Build NNPACK unit tests" ON) + + # ---[ CMake options +@@ -442,15 +440,7 @@ ELSE() + SET(NNPACK_BACKEND_C_SRCS ${NNPACK_BACKEND_SRCS}) + ENDIF() + +-IF(NNPACK_LIBRARY_TYPE STREQUAL "default") +- ADD_LIBRARY(nnpack ${NNPACK_INIT_SRCS} ${NNPACK_LAYER_SRCS} ${NNPACK_BACKEND_C_SRCS} ${NNPACK_BACKEND_PEACHPY_OBJS}) +-ELSEIF(NNPACK_LIBRARY_TYPE STREQUAL "shared") +- ADD_LIBRARY(nnpack SHARED ${NNPACK_INIT_SRCS} ${NNPACK_LAYER_SRCS} ${NNPACK_BACKEND_C_SRCS} ${NNPACK_BACKEND_PEACHPY_OBJS}) +-ELSEIF(NNPACK_LIBRARY_TYPE STREQUAL "static") +- ADD_LIBRARY(nnpack STATIC ${NNPACK_INIT_SRCS} ${NNPACK_LAYER_SRCS} ${NNPACK_BACKEND_C_SRCS} ${NNPACK_BACKEND_PEACHPY_OBJS}) +-ELSE() +- MESSAGE(FATAL_ERROR "Unsupported NNPACK library type \"${NNPACK_LIBRARY_TYPE}\". Must be \"static\", \"shared\", or \"default\"") +-ENDIF() ++ADD_LIBRARY(nnpack ${NNPACK_INIT_SRCS} ${NNPACK_LAYER_SRCS} ${NNPACK_BACKEND_C_SRCS} ${NNPACK_BACKEND_PEACHPY_OBJS}) + NNPACK_TARGET_ENABLE_C99(nnpack) + IF(IOS OR CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7-a|armv7l)$") + IF(IOS AND NNPACK_BACKEND STREQUAL "neon") +@@ -496,7 +486,7 @@ NNPACK_TARGET_ENABLE_C99(nnpack_reference_layers) + TARGET_INCLUDE_DIRECTORIES(nnpack_reference_layers PUBLIC include) + + # ---[ Configure cpuinfo +-IF(NOT TARGET cpuinfo) ++IF(FALSE) + SET(CPUINFO_BUILD_TOOLS OFF CACHE BOOL "") + SET(CPUINFO_BUILD_UNIT_TESTS OFF CACHE BOOL "") + SET(CPUINFO_BUILD_MOCK_TESTS OFF CACHE BOOL "") +@@ -505,10 +495,11 @@ IF(NOT TARGET cpuinfo) + "${CPUINFO_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo") + ENDIF() +-TARGET_LINK_LIBRARIES(nnpack PRIVATE cpuinfo) ++find_package(unofficial-cpuinfo CONFIG REQUIRED) ++target_link_libraries(nnpack PUBLIC unofficial::cpuinfo::cpuinfo) + + # ---[ Configure pthreadpool +-IF(NOT TARGET pthreadpool) ++IF(FALSE) + SET(PTHREADPOOL_BUILD_TESTS OFF CACHE BOOL "") + SET(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( +@@ -525,33 +516,37 @@ ENDIF() + TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC pthreadpool) + + # ---[ Configure FXdiv +-IF(NOT TARGET fxdiv) ++IF(FALSE) + SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "") + SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( + "${FXDIV_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv") + ENDIF() +-TARGET_LINK_LIBRARIES(nnpack PRIVATE fxdiv) ++find_path(FXDIV_INCLUDE_DIRS "fxdiv.h") ++target_include_directories(nnpack PRIVATE ${FXDIV_INCLUDE_DIRS}) ++ + + # ---[ Configure psimd +-IF(NOT TARGET psimd) ++IF(FALSE) + ADD_SUBDIRECTORY( + "${PSIMD_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd") + ENDIF() +-TARGET_LINK_LIBRARIES(nnpack PRIVATE psimd) ++find_path(PSIMD_INCLUDE_DIRS "psimd.h") ++target_include_directories(nnpack PRIVATE ${PSIMD_INCLUDE_DIRS}) + + # ---[ Configure FP16 +-IF(NOT TARGET fp16) ++IF(FALSE) + SET(FP16_BUILD_TESTS OFF CACHE BOOL "") + SET(FP16_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( + "${FP16_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16") + ENDIF() +-TARGET_LINK_LIBRARIES(nnpack PRIVATE fp16) +-TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC fp16) ++find_path(FP16_INCLUDE_DIRS "fp16.h") ++target_include_directories(nnpack PRIVATE ${FP16_INCLUDE_DIRS}) ++target_include_directories(nnpack_reference_layers PUBLIC ${FP16_INCLUDE_DIRS}) + + INSTALL(TARGETS nnpack + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/ports/nnpack/portfile.cmake b/ports/nnpack/portfile.cmake new file mode 100644 index 00000000000000..51432669a93dc8 --- /dev/null +++ b/ports/nnpack/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_fail_port_install(ON_TARGET "Windows") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Maratyszcza/nnpack + REF c07e3a0400713d546e0dea2d5466dd22ea389c73 + SHA512 f0b261e8698b412d12dd739e5d0cf71c284965ae28da735ae22814a004358ba3ecaea6cd26fa17b594c0245966b7dd2561c1e05c6cbf0592fd7b85ea0f21eb37 + PATCHES + fix-cmakelists.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNNPACK_BACKEND=psimd + -DNNPACK_BUILD_TESTS=OFF + -DNNPACK_BUILD_BENCHMARKS=OFF + -DNNPACK_CUSTOM_THREADPOOL=OFF +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/nnpack/vcpkg.json b/ports/nnpack/vcpkg.json new file mode 100644 index 00000000000000..a0e0a4ea211d7c --- /dev/null +++ b/ports/nnpack/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "nnpack", + "version-date": "2021-02-21", + "port-version": 1, + "description": "Acceleration package for neural networks on multi-core CPUs", + "homepage": "https://github.com/Maratyszcza/NNPACK", + "supports": "linux & osx", + "dependencies": [ + "cpuinfo", + "fp16", + "fxdiv", + "psimd", + "pthreadpool" + ] +} diff --git a/ports/nonius/CONTROL b/ports/nonius/CONTROL deleted file mode 100644 index 46c984038260eb..00000000000000 --- a/ports/nonius/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nonius -Version: 2019-04-20-1 -Description: A C++ micro-benchmarking framework -Build-Depends: boost-algorithm, boost-lexical-cast, boost-math diff --git a/ports/nonius/portfile.cmake b/ports/nonius/portfile.cmake index ca7f7b5ae70dbc..9b55dc1a8c9dc1 100644 --- a/ports/nonius/portfile.cmake +++ b/ports/nonius/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libnonius/nonius diff --git a/ports/nonius/vcpkg.json b/ports/nonius/vcpkg.json new file mode 100644 index 00000000000000..71fef7a085139b --- /dev/null +++ b/ports/nonius/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "nonius", + "version-string": "2019-04-20", + "port-version": 2, + "description": "A C++ micro-benchmarking framework", + "dependencies": [ + "boost-algorithm", + "boost-lexical-cast", + "boost-math" + ] +} diff --git a/ports/nowide/portfile.cmake b/ports/nowide/portfile.cmake new file mode 100644 index 00000000000000..48af04d8ce7f72 --- /dev/null +++ b/ports/nowide/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/boostorg/nowide/releases/download/v11.1.2/nowide_standalone_v11.1.2.tar.gz" + FILENAME "nowide_standalone_v11.1.2.tar.gz" + SHA512 8a4dcd6ead15b2b0eeabaccd306df88c54b282bbef33aca3d8303be86b39de5958f2f11b8f8e00e6f0190ece8f90f940e26d0b702323b7b005ea21dd8bae6393 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nowide TARGET_PATH share/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nowide/vcpkg.json b/ports/nowide/vcpkg.json new file mode 100644 index 00000000000000..8635a7cd9fe8eb --- /dev/null +++ b/ports/nowide/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "nowide", + "version": "11.1.2", + "description": "Boost nowide module (standalone)", + "homepage": "https://github.com/boostorg/nowide" +} diff --git a/ports/nrf-ble-driver/001-arm64-support.patch b/ports/nrf-ble-driver/001-arm64-support.patch index 03cec37b62d778..2c97053994c5b3 100644 --- a/ports/nrf-ble-driver/001-arm64-support.patch +++ b/ports/nrf-ble-driver/001-arm64-support.patch @@ -1,14 +1,14 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 99daa24..9a18ee5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -259,6 +259,9 @@ endforeach(SD_API_VER) - # Additional special linkage libraries - foreach(SD_API_VER ${SD_API_VERS}) - if(WIN32) -+ # arm64-windows support -+ target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_STATIC_LIB} PRIVATE "advapi32") -+ target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_SHARED_LIB} PRIVATE "advapi32") - elseif(APPLE) - target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_STATIC_LIB} PRIVATE "-framework CoreFoundation" "-framework IOKit") - target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_SHARED_LIB} PRIVATE "-framework CoreFoundation" "-framework IOKit") +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 99daa24..9a18ee5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -259,6 +259,9 @@ endforeach(SD_API_VER) + # Additional special linkage libraries + foreach(SD_API_VER ${SD_API_VERS}) + if(WIN32) ++ # arm64-windows support ++ target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_STATIC_LIB} PRIVATE "advapi32") ++ target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_SHARED_LIB} PRIVATE "advapi32") + elseif(APPLE) + target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_STATIC_LIB} PRIVATE "-framework CoreFoundation" "-framework IOKit") + target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_SHARED_LIB} PRIVATE "-framework CoreFoundation" "-framework IOKit") diff --git a/ports/nrf-ble-driver/CONTROL b/ports/nrf-ble-driver/CONTROL deleted file mode 100644 index 333907e8b73b87..00000000000000 --- a/ports/nrf-ble-driver/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nrf-ble-driver -Version: 4.1.1 -Description: BLE driver is a library for Bluetooth Low Energy communication using Nordic Semiconductor development kits. -Build-Depends: asio, catch2 \ No newline at end of file diff --git a/ports/nrf-ble-driver/portfile.cmake b/ports/nrf-ble-driver/portfile.cmake index c451ba4d1d179a..22ae9c4af8c11d 100644 --- a/ports/nrf-ble-driver/portfile.cmake +++ b/ports/nrf-ble-driver/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") message( "${PORT} currently requires the following libraries from the system package manager: @@ -11,8 +9,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO NordicSemiconductor/pc-ble-driver - REF v4.1.1 - SHA512 bb1853993b3f37836a8f7402e5c0452e8423c3a1c6e651cf353025022a32e16c72f06e2266e283c72fa7ddb0da7cf8cecb875a7a7762565599f2908c4858ce8e + REF v4.1.2 + SHA512 625a52151f2c78421e48e90ff60292c6106e8504b55a26c7df716df75e051a40d2ee4a26c57b5daaa370e53a79002fe965aee8a0d8749f7dce380e8e4a617c95 HEAD_REF master PATCHES 001-arm64-support.patch @@ -28,13 +26,20 @@ set(ENV{PATH} "$ENV{PATH};${GIT_EXE_DIRPATH}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DDISABLE_EXAMPLES= -DDISABLE_TESTS= -DNRF_BLE_DRIVER_VERSION=4.1.0 -DCONNECTIVITY_VERSION=4.1.0 + OPTIONS -DDISABLE_EXAMPLES= -DDISABLE_TESTS= -DNRF_BLE_DRIVER_VERSION=4.1.2 -DCONNECTIVITY_VERSION=4.1.2 ) vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() +# Copy hex files into shared folder for package +foreach(HEX_DIR IN ITEMS "sd_api_v2" "sd_api_v3" "sd_api_v5" "sd_api_v6") + set(TARGET_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}/hex/${HEX_DIR}") + file(MAKE_DIRECTORY ${TARGET_DIRECTORY}) + file(INSTALL "${SOURCE_PATH}/hex/${HEX_DIR}" DESTINATION ${TARGET_DIRECTORY}/..) +endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) diff --git a/ports/nrf-ble-driver/vcpkg.json b/ports/nrf-ble-driver/vcpkg.json new file mode 100644 index 00000000000000..07176c46608bd9 --- /dev/null +++ b/ports/nrf-ble-driver/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "nrf-ble-driver", + "version-string": "4.1.2", + "port-version": 1, + "description": "BLE driver is a library for Bluetooth Low Energy communication using Nordic Semiconductor development kits.", + "dependencies": [ + "asio", + "catch2", + "cli11", + "spdlog" + ] +} diff --git a/ports/nsync/fix-install.patch b/ports/nsync/fix-install.patch new file mode 100644 index 00000000000000..efe560d15bca4b --- /dev/null +++ b/ports/nsync/fix-install.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6b1f1dc..328f9b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -80,7 +80,7 @@ set (NSYNC_OS_CPP_SRC + # https://cmake.org/cmake/help/v3.1/policy/CMP0054.html + + # Pick the include directory for the operating system. +-if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX") ++if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX" OR "${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsStoreX") + include_directories ("${PROJECT_SOURCE_DIR}/platform/win32") + set (NSYNC_CPP_FLAGS "/TP") + +@@ -230,7 +230,7 @@ elseif (("${CMAKE_SYSTEM_PROCESSOR}X" STREQUAL "ppc64X")) + endif () + + # Windows uses some include files from the posix directory also. +-if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX") ++if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX" OR "${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsStoreX") + include_directories ("${PROJECT_SOURCE_DIR}/platform/posix") + endif () + +@@ -396,7 +396,8 @@ if (NSYNC_ENABLE_TESTS) + endforeach (t) + endif () + +-set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON) ++# By default, install nsync always ++# set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON) + + install (TARGETS nsync + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries diff --git a/ports/nsync/portfile.cmake b/ports/nsync/portfile.cmake new file mode 100644 index 00000000000000..65abd9c87f5239 --- /dev/null +++ b/ports/nsync/portfile.cmake @@ -0,0 +1,25 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/nsync + REF 1.24.0 + SHA512 14dd582488072123a353c967664ed9a3f636865bb35e64d7256dcc809539129fa47c7979a4009fd45c9341cac537a4ca6b4b617ba2cae1d3995a7c251376339f + HEAD_REF master + PATCHES + fix-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNSYNC_ENABLE_TESTS=OFF +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nsync/vcpkg.json b/ports/nsync/vcpkg.json new file mode 100644 index 00000000000000..292da006c9059a --- /dev/null +++ b/ports/nsync/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "nsync", + "version": "1.24.0", + "description": "nsync is a C library that exports various synchronization primitives, such as mutexes", + "homepage": "https://github.com/google/nsync" +} diff --git a/ports/nt-wrapper/CONTROL b/ports/nt-wrapper/CONTROL deleted file mode 100644 index cd16e95412b3ef..00000000000000 --- a/ports/nt-wrapper/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nt-wrapper -Version: 2019-08-10 -Description: A header only wrapper library around native windows system APIs -Homepage: https://github.com/JustasMasiulis/nt_wrapper diff --git a/ports/nt-wrapper/portfile.cmake b/ports/nt-wrapper/portfile.cmake index 7ed8146ffd21a8..78c84358d74895 100644 --- a/ports/nt-wrapper/portfile.cmake +++ b/ports/nt-wrapper/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO JustasMasiulis/nt_wrapper diff --git a/ports/nt-wrapper/vcpkg.json b/ports/nt-wrapper/vcpkg.json new file mode 100644 index 00000000000000..7504ae1903e74c --- /dev/null +++ b/ports/nt-wrapper/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "nt-wrapper", + "version-string": "2019-08-10", + "port-version": 1, + "description": "A header only wrapper library around native windows system APIs", + "homepage": "https://github.com/JustasMasiulis/nt_wrapper" +} diff --git a/ports/nuklear/CMakeLists.txt b/ports/nuklear/CMakeLists.txt new file mode 100644 index 00000000000000..28009f466b754b --- /dev/null +++ b/ports/nuklear/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.16) +project(Nuklear LANGUAGES C CXX) + +option(INSTALL_EXAMPLE "Install the example code" OFF) +option(INSTALL_DEMO "Install the demo code" OFF) + +add_library(nuklear INTERFACE) + +target_include_directories(nuklear INTERFACE $) +target_compile_definitions(nuklear INTERFACE NK_IMPLEMENTATION) + +# Installation +install( + TARGETS nuklear + EXPORT unofficial-nuklear + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES "${CMAKE_CURRENT_LIST_DIR}/nuklear.h" DESTINATION "include/nuklear") + + +install(EXPORT unofficial-nuklear FILE unofficial-nuklear-config.cmake DESTINATION share/unofficial-nuklear) + +if (INSTALL_EXAMPLE) + install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/example" DESTINATION share/nuklear) + +endif() + +if (INSTALL_DEMO) + install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/demo" DESTINATION share/nuklear) + +endif() diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL deleted file mode 100644 index 1a923c8576630e..00000000000000 --- a/ports/nuklear/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: nuklear -Version: 2019-03-29 -Homepage: https://github.com/vurtun/nuklear -Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index a6ef9e34fc5dfc..e13332986b517e 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -1,11 +1,29 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO vurtun/nuklear - REF 509c75b086351e82865f26a507235b60a63e1538 - SHA512 d86fe93a8da8db955ccd28b353c19ea92aeb54efcf7a47ca160a576f4d52dbedc3abf7d547387a066851928c4f43c961b1daff097b3677a118c89f247042336a + REPO Immediate-Mode-UI/Nuklear + REF 6e80e2a646f35be4afc157a932f2936392ec8f74 # accessed on 2021-04-04 + SHA512 ce064dff721111749d4056717879f42d3e24bb94655dd2b04c137eb7391d2c90d0b1b95155912c100b537f74fd150aedc48e0ac85eb72963c66e35ac81048323 HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/Readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/nuklear RENAME copyright) + +file(COPY "${CURRENT_PORT_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + example INSTALL_EXAMPLE + demo INSTALL_DEMO +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-nuklear) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL "${SOURCE_PATH}/Readme.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/nuklear/vcpkg.json b/ports/nuklear/vcpkg.json new file mode 100644 index 00000000000000..1e48043bf8e890 --- /dev/null +++ b/ports/nuklear/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "nuklear", + "version-date": "2021-03-18", + "port-version": 1, + "description": "This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain", + "homepage": "https://github.com/Immediate-Mode-UI/Nuklear", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "demo": { + "description": "Install demo files" + }, + "example": { + "description": "Install example files" + } + } +} diff --git a/ports/numactl/CONTROL b/ports/numactl/CONTROL deleted file mode 100644 index 4c5c03687e98e1..00000000000000 --- a/ports/numactl/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: numactl -Version: 2.0.12 -Description: NUMA support for Linux diff --git a/ports/numactl/portfile.cmake b/ports/numactl/portfile.cmake index 3319d282f72d7b..73215a441edc86 100644 --- a/ports/numactl/portfile.cmake +++ b/ports/numactl/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO numactl/numactl diff --git a/ports/numactl/vcpkg.json b/ports/numactl/vcpkg.json new file mode 100644 index 00000000000000..062e737eafa5cf --- /dev/null +++ b/ports/numactl/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "numactl", + "version-string": "2.0.12", + "port-version": 1, + "description": "NUMA support for Linux" +} diff --git a/ports/numcpp/portfile.cmake b/ports/numcpp/portfile.cmake new file mode 100644 index 00000000000000..d605b19da6b892 --- /dev/null +++ b/ports/numcpp/portfile.cmake @@ -0,0 +1,24 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dpilger26/NumCpp + REF fc68d897f8c2ae4f5b14baff3eefda897351abbd # 2.1.0 + SHA512 ce407d9782d304658853cd66ba5901a4dc84d8cf74d45b2dd466ca6328f6bf60b39906efd5373624df6b46c4253f861208b15254d0e156fdb09f32ca731ad2bc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNUMCPP_TEST=OFF + -DNUMCPP_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/NumCpp/cmake TARGET_PATH share/NumCpp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/numcpp/vcpkg.json b/ports/numcpp/vcpkg.json new file mode 100644 index 00000000000000..dab0d3abc3d62b --- /dev/null +++ b/ports/numcpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "numcpp", + "version-string": "2.1.0", + "description": "C++ implementation of the Python Numpy library", + "homepage": "https://dpilger26.github.io/NumCpp", + "license": "MIT", + "dependencies": [ + "boost-algorithm", + "boost-endian", + "boost-integer", + "boost-math", + "boost-predef", + "boost-random", + "boost-type-traits" + ], + "features": { + "python": { + "description": "Interacting with python with pybind11 interface", + "dependencies": [ + "boost-python", + "pybind11" + ] + } + } +} diff --git a/ports/nuspell/portfile.cmake b/ports/nuspell/portfile.cmake new file mode 100644 index 00000000000000..3128018e3e72bf --- /dev/null +++ b/ports/nuspell/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nuspell/nuspell + REF v5.0.0 + SHA512 92605c5f0d413b86711fea3b993d656552d5e72440303d3e71907a503d060ead032dfeb0dd8dbb790f35599b8cca8854bdd8650f0560793d9c62a11aebccc2e5 + HEAD_REF master +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nuspell) +vcpkg_fixup_pkgconfig( + # nuspell.pc depends on icu-uc.pc which has -lm specified as private + # library. Ignore this -lm, otherwise this function shows error + # because it can't find this. -lm is part of glibc on Linux. + SYSTEM_LIBRARIES m +) +vcpkg_copy_tools(TOOL_NAMES nuspell AUTO_CLEAN) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) +file( + INSTALL ${SOURCE_PATH}/COPYING.LESSER + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/ports/nuspell/vcpkg.json b/ports/nuspell/vcpkg.json new file mode 100644 index 00000000000000..5840ce1c50b459 --- /dev/null +++ b/ports/nuspell/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "nuspell", + "version-semver": "5.0.0", + "description": [ + "Nuspell is a fast and safe spelling checker software program.", + "It is designed for languages with rich morphology and complex word compounding.", + "Nuspell is written in modern C++ and it supports Hunspell dictionaries." + ], + "homepage": "https://nuspell.github.io/", + "dependencies": [ + "icu" + ] +} diff --git a/ports/nvtt/CONTROL b/ports/nvtt/CONTROL deleted file mode 100644 index 189ff6caf8e51f..00000000000000 --- a/ports/nvtt/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: nvtt -Version: 2.1.1 -Description: Texture processing tools with support for Direct3D 10 and 11 formats. diff --git a/ports/nvtt/add-compile-options-for-osx.patch b/ports/nvtt/add-compile-options-for-osx.patch new file mode 100644 index 00000000000000..6b7d94559fc707 --- /dev/null +++ b/ports/nvtt/add-compile-options-for-osx.patch @@ -0,0 +1,15 @@ +diff --git a/src/nvtt/CMakeLists.txt b/src/nvtt/CMakeLists.txt +index 9688c9c..42942c0 100644 +--- a/src/nvtt/CMakeLists.txt ++++ b/src/nvtt/CMakeLists.txt +@@ -47,6 +47,10 @@ ADD_DEFINITIONS(-DNVTT_EXPORTS) + #ADD_DEFINITIONS(-DHAVE_RGETC) + #ADD_DEFINITIONS(-DHAVE_ETCPACK) + ++if(APPLE) ++ add_compile_options(-mbmi2 -mfma) ++endif() ++ + IF(NVTT_SHARED) + ADD_LIBRARY(nvtt SHARED ${NVTT_SRCS}) + ELSE(NVTT_SHARED) diff --git a/ports/nvtt/bc6h.patch b/ports/nvtt/bc6h.patch index 3e68ff51634210..8d3339eb266640 100644 --- a/ports/nvtt/bc6h.patch +++ b/ports/nvtt/bc6h.patch @@ -1,14 +1,13 @@ diff --git a/src/bc6h/CMakeLists.txt b/src/bc6h/CMakeLists.txt -index 635e0f3a..f758df43 100644 ---- a/src/bc6h/CMakeLists.txt +index fd75e74..b392d90 100644 +--- a/src/bc6h/CMakeLists.txt +++ b/src/bc6h/CMakeLists.txt -@@ -20,3 +20,8 @@ IF(NOT WIN32) - SET_TARGET_PROPERTIES(bc6h PROPERTIES COMPILE_FLAGS -fPIC) - ENDIF(CMAKE_COMPILER_IS_GNUCXX) - ENDIF(NOT WIN32) +@@ -15,3 +15,8 @@ SET(BC6H_SRCS + + ADD_LIBRARY(bc6h STATIC ${BC6H_SRCS}) + TARGET_LINK_LIBRARIES(bc6h nvcore nvmath) + +INSTALL(TARGETS bc6h + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib/static) -\ No newline at end of file diff --git a/ports/nvtt/bc7.patch b/ports/nvtt/bc7.patch index c94fcef231b0ee..5c644feceaee59 100644 --- a/ports/nvtt/bc7.patch +++ b/ports/nvtt/bc7.patch @@ -1,11 +1,11 @@ diff --git a/src/bc7/CMakeLists.txt b/src/bc7/CMakeLists.txt -index 2eb01c06..0c36895b 100644 ---- a/src/bc7/CMakeLists.txt +index 566fe1f..d0d4e8a 100644 +--- a/src/bc7/CMakeLists.txt +++ b/src/bc7/CMakeLists.txt -@@ -28,3 +28,8 @@ IF(NOT WIN32) - SET_TARGET_PROPERTIES(bc7 PROPERTIES COMPILE_FLAGS -fPIC) - ENDIF(CMAKE_COMPILER_IS_GNUCXX) - ENDIF(NOT WIN32) +@@ -23,3 +23,8 @@ SET(BC7_SRCS + + ADD_LIBRARY(bc7 STATIC ${BC7_SRCS}) + TARGET_LINK_LIBRARIES(bc7 nvcore nvmath) + +INSTALL(TARGETS bc7 + RUNTIME DESTINATION bin diff --git a/ports/nvtt/fix-build-error.patch b/ports/nvtt/fix-build-error.patch index 7ba1c19763fad6..5274efa3100c88 100644 --- a/ports/nvtt/fix-build-error.patch +++ b/ports/nvtt/fix-build-error.patch @@ -1,39 +1,47 @@ -diff --git a/extern/butteraugli/butteraugli.h b/extern/butteraugli/butteraugli.h -index 31824b8..c116a73 100644 ---- a/extern/butteraugli/butteraugli.h -+++ b/extern/butteraugli/butteraugli.h -@@ -134,7 +134,14 @@ bool ButteraugliAdaptiveQuantization(size_t xsize, size_t ysize, - // The conventional syntax uint8_t* const RESTRICT is more confusing - it is - // not immediately obvious that the pointee is non-const. - template -+#ifdef _MSC_VER -+// Due to MSVC bug: -+// https://developercommunity.visualstudio.com/content/problem/32196/msvc-cant-compile-a-templated-using-without-instan.html -+// , we cannot use __restrict now. Loss some performance instead of can't use this code. -+using ConstRestrict = T const; -+#else - using ConstRestrict = T const BUTTERAUGLI_RESTRICT; -+#endif +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 668cd7e..72d6e61 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,9 +7,17 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NV_CMAKE_DIR}") - // Functions that depend on the cache line size. - class CacheAligned { -diff --git a/src/nvthread/Atomic.h b/src/nvthread/Atomic.h -index 212b9cb..b8eaedb 100644 ---- a/src/nvthread/Atomic.h -+++ b/src/nvthread/Atomic.h -@@ -183,7 +183,6 @@ namespace nv { + # Compiler check (needs -std:c++11 flag) + include(CheckCXXCompilerFlag) ++if(MSVC) ++CHECK_CXX_COMPILER_FLAG("/std:c++14" COMPILER_SUPPORTS_CXX14) ++else() + CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) +-if(COMPILER_SUPPORTS_CXX11) ++endif() ++if(COMPILER_SUPPORTS_CXX11 OR COMPILER_SUPPORTS_CXX14) ++ if(COMPILER_SUPPORTS_CXX11) + set(CMAKE_CXX_STANDARD 11) ++ else() ++ set(CMAKE_CXX_STANDARD 14) ++ endif() + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + else() +diff --git a/extern/CMP_Core/source/cmp_math_func.h b/extern/CMP_Core/source/cmp_math_func.h +index c2f8908..b652497 100644 +--- a/extern/CMP_Core/source/cmp_math_func.h ++++ b/extern/CMP_Core/source/cmp_math_func.h +@@ -32,6 +32,7 @@ + // Core API which have have GPU equivalents, defined here for HPC_CPU usage + //============================================================================ ++#include + #include + using namespace std; - #elif NV_CC_CLANG && (NV_OS_IOS || NV_OS_DARWIN) -- NV_COMPILER_CHECK(sizeof(uint32) == sizeof(long)); +diff --git a/src/nvtt/CMakeLists.txt b/src/nvtt/CMakeLists.txt +index 8285f99..9688c9c 100644 +--- a/src/nvtt/CMakeLists.txt ++++ b/src/nvtt/CMakeLists.txt +@@ -63,5 +63,5 @@ INSTALL(TARGETS nvtt + INSTALL(FILES nvtt.h nvtt_wrapper.h DESTINATION include/nvtt) - //ACS: Use Apple's atomics instead? I don't know if these are better in any way; there are non-barrier versions too. There's no OSAtomicSwap32 tho' - /* -@@ -254,7 +253,6 @@ namespace nv { - - #elif NV_CC_CLANG && POSH_CPU_STRONGARM -- NV_COMPILER_CHECK(sizeof(uint32) == sizeof(long)); - - inline uint32 atomicIncrement(uint32 * value) - { +-ADD_SUBDIRECTORY(tools) +-ADD_SUBDIRECTORY(tests) ++#ADD_SUBDIRECTORY(tools) ++#ADD_SUBDIRECTORY(tests) diff --git a/ports/nvtt/portfile.cmake b/ports/nvtt/portfile.cmake index bacdebbbc4cdc7..f235be2d0cde52 100644 --- a/ports/nvtt/portfile.cmake +++ b/ports/nvtt/portfile.cmake @@ -1,12 +1,12 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "x86") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO castano/nvidia-texture-tools - REF 2.1.1 - SHA512 3e6fef5977ca29daa7dc97afe11d61de57a8556c9caf30902db8c5c167d9c38f736bcb62eebdaaf7558299b39975bc269d41ab980c813b67dd1fc85064c853c9 + REF b1a90f36013522b9e5a3a2197859b72188752e3f # 2.1.2 + SHA512 13cf04a9856f150f7569c8c256c42fc6a5bc40586c9ca2b3ae553edf5bfcbccbba5b8538924079ed35effdd07b9e3ef4bfdb9733a2ec51f5a95f958885cc6cca HEAD_REF master PATCHES 001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch @@ -14,6 +14,8 @@ vcpkg_from_github( bc7.patch squish.patch fix-build-error.patch + add-compile-options-for-osx.patch + skip-building-libsquish.patch ) vcpkg_configure_cmake( @@ -37,5 +39,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright file(REMOVE ${CURRENT_PACKAGES_DIR}/share/doc/nvtt/LICENSE) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvtt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvtt/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvtt/copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/nvtt/skip-building-libsquish.patch b/ports/nvtt/skip-building-libsquish.patch new file mode 100644 index 00000000000000..dba065d1f34947 --- /dev/null +++ b/ports/nvtt/skip-building-libsquish.patch @@ -0,0 +1,13 @@ +diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt +index 911c19e..6f13de4 100644 +--- a/extern/CMakeLists.txt ++++ b/extern/CMakeLists.txt +@@ -5,7 +5,6 @@ ADD_SUBDIRECTORY(EtcLib) + ADD_SUBDIRECTORY(rg_etc1_v104) + #ADD_SUBDIRECTORY(etcpack) + +-ADD_SUBDIRECTORY(libsquish-1.15) ++#ADD_SUBDIRECTORY(libsquish-1.15) + + ADD_SUBDIRECTORY(CMP_Core) +- diff --git a/ports/nvtt/squish.patch b/ports/nvtt/squish.patch index 36ce7be7649df5..5f971a7621df60 100644 --- a/ports/nvtt/squish.patch +++ b/ports/nvtt/squish.patch @@ -1,12 +1,13 @@ diff --git a/src/nvtt/squish/CMakeLists.txt b/src/nvtt/squish/CMakeLists.txt -index 832013e1..76824137 100644 ---- a/src/nvtt/squish/CMakeLists.txt +index 65a5dd3..d093ce5 100644 +--- a/src/nvtt/squish/CMakeLists.txt +++ b/src/nvtt/squish/CMakeLists.txt -@@ -33,3 +33,7 @@ IF(NOT WIN32) - ENDIF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) - ENDIF(NOT WIN32) +@@ -21,3 +21,8 @@ SET(SQUISH_SRCS + simd_ve.h) -+INSTALL(TARGETS squish + ADD_LIBRARY(nvsquish STATIC ${SQUISH_SRCS}) ++ ++INSTALL(TARGETS nvsquish + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib/static) diff --git a/ports/nvtt/vcpkg.json b/ports/nvtt/vcpkg.json new file mode 100644 index 00000000000000..24ad40926d3072 --- /dev/null +++ b/ports/nvtt/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "nvtt", + "version-string": "2.1.2", + "port-version": 2, + "description": "Texture processing tools with support for Direct3D 10 and 11 formats.", + "homepage": "https://github.com/castano/nvidia-texture-tools", + "supports": "!x86", + "dependencies": [ + "libsquish" + ] +} diff --git a/ports/oatpp-consul/portfile.cmake b/ports/oatpp-consul/portfile.cmake new file mode 100644 index 00000000000000..83c1889bd8067c --- /dev/null +++ b/ports/oatpp-consul/portfile.cmake @@ -0,0 +1,26 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-consul + REF ${OATPP_VERSION} + SHA512 6d73b869e5fea966451d15cbdc389f7c6c367a8e10124aadaa33121f0ef78bbf5b702a094b2ca6ad8583257ab7cb4187a7a0571b119c96d5d5e20b2d5cb4beae + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-consul-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-consul/vcpkg.json b/ports/oatpp-consul/vcpkg.json new file mode 100644 index 00000000000000..0f3a90df3594d8 --- /dev/null +++ b/ports/oatpp-consul/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "oatpp-consul", + "version": "1.2.5", + "description": "OAT++ Modern web framework consul module.", + "homepage": "https://github.com/oatpp/oatpp-consul", + "dependencies": [ + "oatpp" + ] +} diff --git a/ports/oatpp-curl/fix-find-curl.patch b/ports/oatpp-curl/fix-find-curl.patch new file mode 100644 index 00000000000000..bd17629559711e --- /dev/null +++ b/ports/oatpp-curl/fix-find-curl.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 85edfe7..a8aa02b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -94,7 +94,7 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n") + + ############################## + ## Find libcurl dependency +- ++if(0) + include(FindPkgConfig) + pkg_check_modules(PKG_CURL REQUIRED libcurl) + +@@ -103,9 +103,10 @@ message("[libcurl] LIBRARIES=${PKG_CURL_LIBRARIES}") + message("[libcurl] LIBRARY_DIRS=${PKG_CURL_LIBRARY_DIRS}") + message("[libcurl] INCLUDE_DIRS=${PKG_CURL_INCLUDE_DIRS}") + message("[libcurl] VERSION=${PKG_CURL_VERSION}\n") +- ++endif() ++find_package(CURL CONFIG REQUIRED) + link_directories( +- ${PKG_CURL_LIBRARY_DIRS} ++ CURL::libcurl + ) + + message("\n############################################################################\n") +diff --git a/cmake/module-config.cmake.in b/cmake/module-config.cmake.in +index 5cc12b0..4ff34bc 100644 +--- a/cmake/module-config.cmake.in ++++ b/cmake/module-config.cmake.in +@@ -1,5 +1,6 @@ + @PACKAGE_INIT@ +- ++include(CMakeFindDependencyMacro) ++find_dependency(CURL) + if(NOT TARGET oatpp::@OATPP_MODULE_NAME@) + include("${CMAKE_CURRENT_LIST_DIR}/@OATPP_MODULE_NAME@Targets.cmake") + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 8c2087f..1da41c6 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -43,7 +43,7 @@ target_include_directories(${OATPP_THIS_MODULE_NAME} + #) + + target_link_libraries(${OATPP_THIS_MODULE_NAME} +- PRIVATE ${PKG_CURL_LIBRARIES} ++ PRIVATE CURL::libcurl + ) + + ####################################################################################################### diff --git a/ports/oatpp-curl/portfile.cmake b/ports/oatpp-curl/portfile.cmake new file mode 100644 index 00000000000000..9340560a5f3e74 --- /dev/null +++ b/ports/oatpp-curl/portfile.cmake @@ -0,0 +1,27 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-curl + REF ${OATPP_VERSION} + SHA512 db2b4ab07dbf1140e44c131a1919c6ac29e9cea3df8dde8951028d6096ed5a66a248d3ddeeaabc32cac0fde38fd5905e706daaa7c9fbf6bcb49ccb9ba1cfb50e + HEAD_REF master + PATCHES "fix-find-curl.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-curl-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-curl/vcpkg.json b/ports/oatpp-curl/vcpkg.json new file mode 100644 index 00000000000000..c552f8beeff292 --- /dev/null +++ b/ports/oatpp-curl/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "oatpp-curl", + "version": "1.2.5", + "description": "Oat++ Modern web framework curl module to use libcurl as a RequestExecutor on the oatpp's ApiClient.", + "homepage": "https://github.com/oatpp/oatpp-curl", + "dependencies": [ + "curl", + "oatpp" + ] +} diff --git a/ports/oatpp-libressl/libress-submodule-downgrade-required-libressl-version.patch b/ports/oatpp-libressl/libress-submodule-downgrade-required-libressl-version.patch new file mode 100644 index 00000000000000..62644beda76015 --- /dev/null +++ b/ports/oatpp-libressl/libress-submodule-downgrade-required-libressl-version.patch @@ -0,0 +1,63 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4663a65..b91077a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,19 +95,25 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n") + ############################## + ## Find Libressl dependency + +-include(FindPkgConfig) +-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/module") +- +-find_package(LibreSSL 3.0.0 REQUIRED) +- +-message("LIBRESSL_INCLUDE_DIR=${LIBRESSL_INCLUDE_DIR}") +-message("LIBRESSL_TLS_LIBRARY=${LIBRESSL_TLS_LIBRARY}") +-message("LIBRESSL_SSL_LIBRARY=${LIBRESSL_SSL_LIBRARY}") +-message("LIBRESSL_CRYPTO_LIBRARY=${LIBRESSL_CRYPTO_LIBRARY}") +-message("LIBRESSL_LIBRARIES=${LIBRESSL_LIBRARIES}") +-message("LIBRESSL_VERSION=${LIBRESSL_VERSION}") +- +-message("\n############################################################################\n") ++find_file(LIBRESSL_INCLUDE_DIR tls.h) ++if (NOT LIBRESSL_INCLUDE_DIR) ++ find_file(_OPENSSL_SSL_INCLUDE_FILE openssl/ssl.h) ++ if (NOT _OPENSSL_SSL_INCLUDE_FILE) ++ message(FATAL_ERROR "LibreSSL and OpenSSL not found. LibreSSL must be installed.") ++ else() ++ message(FATAL_ERROR "OpenSSL installed instead of LibreSSL. oatpp-libressl requires LibreSSL.") ++ endif() ++endif() ++get_filename_component(LIBRESSL_INCLUDE_DIR ${LIBRESSL_INCLUDE_DIR} DIRECTORY) ++find_library(LIBRESSL_TLS_LIBRARY NAMES tls tls-21 tls-20 tls-19) ++find_library(LIBRESSL_SSL_LIBRARY NAMES ssl ssl-49 ssl-48 ssl-47) ++find_library(LIBRESSL_CRYPTO_LIBRARY NAMES crypto crypto-47 crypto-46 crypto-45) ++find_library(LIBRESSL_LIBRARIES "${LIBRESSL_CRYPTO_LIBRARY};${LIBRESSL_SSL_LIBRARY};${LIBRESSL_TLS_LIBRARY}") ++message(STATUS "LIBRESSL_INCLUDE_DIR=${LIBRESSL_INCLUDE_DIR}") ++message(STATUS "LIBRESSL_TLS_LIBRARY=${LIBRESSL_TLS_LIBRARY}") ++message(STATUS "LIBRESSL_SSL_LIBRARY=${LIBRESSL_SSL_LIBRARY}") ++message(STATUS "LIBRESSL_CRYPTO_LIBRARY=${LIBRESSL_CRYPTO_LIBRARY}") ++message(STATUS "LIBRESSL_LIBRARIES=${LIBRESSL_LIBRARIES}") + + ################################################################################################### + ## define targets +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ace3b13..489fbb1 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -30,10 +30,12 @@ target_include_directories(${OATPP_THIS_MODULE_NAME} + PUBLIC $ + ) + ++target_include_directories(${OATPP_THIS_MODULE_NAME} ++ SYSTEM PRIVATE "${LIBRESSL_INCLUDE_DIR}" ++) ++ + target_link_libraries(${OATPP_THIS_MODULE_NAME} +- PUBLIC LibreSSL::TLS +- PUBLIC LibreSSL::SSL +- PUBLIC LibreSSL::Crypto ++ PUBLIC "${LIBRESSL_TLS_LIBRARY}" "${LIBRESSL_SSL_LIBRARY}" "${LIBRESSL_CRYPTO_LIBRARY}" + ) + + ####################################################################################################### diff --git a/ports/oatpp-libressl/portfile.cmake b/ports/oatpp-libressl/portfile.cmake new file mode 100644 index 00000000000000..e53766e3a50bc9 --- /dev/null +++ b/ports/oatpp-libressl/portfile.cmake @@ -0,0 +1,29 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# get the source +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-libressl + REF ${OATPP_VERSION} + SHA512 64b596576b7c976cd8ebd68ba16a38e7b9c65794d9dcea82d3537d2433f11645a25eb567aea6d16ddc51f8ff5f90e83f29e24555c3ae87f80883ec2f53366d99 + HEAD_REF master + PATCHES "libress-submodule-downgrade-required-libressl-version.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DLIBRESSL_ROOT_DIR=${CURRENT_INSTALLED_DIR}" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-libressl-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-libressl/vcpkg.json b/ports/oatpp-libressl/vcpkg.json new file mode 100644 index 00000000000000..3c34c9a991a165 --- /dev/null +++ b/ports/oatpp-libressl/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "oatpp-libressl", + "version": "1.2.5", + "description": "Oat++ libressl module providing secure server and client connection providers.", + "homepage": "https://github.com/oatpp/oatpp-libressl", + "dependencies": [ + "libressl", + "oatpp" + ] +} diff --git a/ports/oatpp-mbedtls/find-mbedtls.patch b/ports/oatpp-mbedtls/find-mbedtls.patch new file mode 100644 index 00000000000000..533fd26d7d770e --- /dev/null +++ b/ports/oatpp-mbedtls/find-mbedtls.patch @@ -0,0 +1,135 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6b1e8c0f2..b0ef5518d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,7 +97,7 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n") + include(FindPkgConfig) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/module") + +-find_package(mbedtls 2.16.0 REQUIRED) ++find_package(mbedtls 2.16.3 REQUIRED) + + message("MBEDTLS_INCLUDE_DIR=${MBEDTLS_INCLUDE_DIR}") + message("MBEDTLS_TLS_LIBRARY=${MBEDTLS_TLS_LIBRARY}") +diff --git a/cmake/module/Findmbedtls.cmake b/cmake/module/Findmbedtls.cmake +index 8c76d0a73..5c223a615 100644 +--- a/cmake/module/Findmbedtls.cmake ++++ b/cmake/module/Findmbedtls.cmake +@@ -14,10 +14,10 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +-FindmbedTLS ++Findmbedtls + ------------ + +-Find the mbedTLS encryption library. ++Find the mbedtls encryption library. + + Optional Components + ^^^^^^^^^^^^^^^^^^^ +@@ -31,16 +31,16 @@ Imported Targets + This module defines the following imported targets: + + mbedtls::Crypto +- The mbedTLS crypto library, if found. ++ The mbedtls crypto library, if found. + + mbedtls::X509 +- The mbedTLS x509 library, if found. ++ The mbedtls x509 library, if found. + + mbedtls::SSL +- The mbedTLS ssl library, if found. Requires and includes mbedtls::Crypto automatically. ++ The mbedtls ssl library, if found. Requires and includes mbedtls::Crypto automatically. + + mbedtls::TLS +- The mbedTLS tls library, if found. Requires and includes mbedtls::SSL and mbedtls::Crypto automatically. ++ The mbedtls tls library, if found. Requires and includes mbedtls::SSL and mbedtls::Crypto automatically. + + Result Variables + ^^^^^^^^^^^^^^^^ +@@ -48,26 +48,26 @@ Result Variables + This module will set the following variables in your project: + + MBEDTLS_FOUND +- System has the mbedTLS library. If no components are requested it only requires the crypto library. ++ System has the mbedtls library. If no components are requested it only requires the crypto library. + MBEDTLS_INCLUDE_DIR +- The mbedTLS include directory. ++ The mbedtls include directory. + MBEDTLS_X509_LIBRARY +- The mbedTLS crypto library. ++ The mbedtls crypto library. + MBEDTLS_CRYPTO_LIBRARY +- The mbedTLS crypto library. ++ The mbedtls crypto library. + MBEDTLS_SSL_LIBRARY +- The mbedTLS SSL library. ++ The mbedtls SSL library. + MBEDTLS_TLS_LIBRARY +- The mbedTLS TLS library. ++ The mbedtls TLS library. + MBEDTLS_LIBRARIES +- All mbedTLS libraries. ++ All mbedtls libraries. + MBEDTLS_VERSION + This is set to $major.$minor.$revision (e.g. 2.6.8). + + Hints + ^^^^^ + +-Set MBEDTLS_ROOT_DIR to the root directory of an mbedTLS installation. ++Set MBEDTLS_ROOT_DIR to the root directory of an mbedtls installation. + + ]=======================================================================] + +@@ -175,7 +175,7 @@ if(MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h") + endif() + + # Set Find Package Arguments +-find_package_handle_standard_args(mbedTLS ++find_package_handle_standard_args(mbedtls + REQUIRED_VARS + MBEDTLS_X509_LIBRARY + MBEDTLS_TLS_LIBRARY +@@ -185,12 +185,12 @@ find_package_handle_standard_args(mbedTLS + MBEDTLS_VERSION + HANDLE_COMPONENTS + FAIL_MESSAGE +- "Could NOT find mbedTLS, try setting the path to mbedTLS using the MBEDTLS_ROOT_DIR environment variable" ++ "Could NOT find mbedtls, try setting the path to mbedtls using the MBEDTLS_ROOT_DIR environment variable" + ) + +-# mbedTLS Found +-if(MBEDTLS_FOUND) +- ++# mbedtls Found ++if(mbedtls_FOUND) ++ set(MBEDTLS_FOUND ${mbedtls_FOUND}) + # Set mbedtls::Crypto + if(NOT TARGET mbedtls::Crypto AND EXISTS "${MBEDTLS_CRYPTO_LIBRARY}") + +@@ -257,4 +257,4 @@ if(MBEDTLS_FOUND) + + endif() # mbedtls::TLS + +-endif(MBEDTLS_FOUND) ++endif(mbedtls_FOUND) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6811f05ea..d80430c3e 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -31,9 +31,9 @@ target_include_directories(${OATPP_THIS_MODULE_NAME} + ) + + target_link_libraries(${OATPP_THIS_MODULE_NAME} +- PRIVATE mbedtls::TLS +- PRIVATE mbedtls::X509 +- PRIVATE mbedtls::Crypto ++ PRIVATE ${MBEDTLS_TLS_LIBRARY} ++ PRIVATE ${MBEDTLS_X509_LIBRARY} ++ PRIVATE ${MBEDTLS_CRYPTO_LIBRARY} + ) + + if(${OATPP_MBEDTLS_DEBUG} GREATER 0) diff --git a/ports/oatpp-mbedtls/portfile.cmake b/ports/oatpp-mbedtls/portfile.cmake new file mode 100644 index 00000000000000..fd95c8c33bb09f --- /dev/null +++ b/ports/oatpp-mbedtls/portfile.cmake @@ -0,0 +1,26 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-mbedtls + REF ${OATPP_VERSION} + SHA512 ffc7ef3614a4b3ef44c61af3db8c5b5a75ecc657b2f9f5ade4f9e78260427ca113be700065b6fcdc3e6f553648601fe4d8c68a54e10234949e004f40def0d343 + HEAD_REF master + PATCHES find-mbedtls.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-mbedtls-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-mbedtls/vcpkg.json b/ports/oatpp-mbedtls/vcpkg.json new file mode 100644 index 00000000000000..1c4b07d4809228 --- /dev/null +++ b/ports/oatpp-mbedtls/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "oatpp-mbedtls", + "version": "1.2.5", + "description": "Oat++ Mbed TLS submodule providing secure server and client connection providers.", + "homepage": "https://github.com/oatpp/oatpp-mbedtls", + "dependencies": [ + "mbedtls", + "oatpp" + ] +} diff --git a/ports/oatpp-mongo/portfile.cmake b/ports/oatpp-mongo/portfile.cmake new file mode 100644 index 00000000000000..2a244eda1c1f3e --- /dev/null +++ b/ports/oatpp-mongo/portfile.cmake @@ -0,0 +1,28 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-mongo + REF ${OATPP_VERSION} + SHA512 b4d15b40521fc731213decbb4a68edf9f04d918ebd6539ec56e71bdc5aa3536bcd170d4d1f5ee828dc666294f520140241dbcd2c4498247c6d9ea363d7f8ec56 + HEAD_REF master +) + +set(VCPKG_C_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-mongo-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/oatpp-mongo/vcpkg.json b/ports/oatpp-mongo/vcpkg.json new file mode 100644 index 00000000000000..cbdf48c1af96ca --- /dev/null +++ b/ports/oatpp-mongo/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "oatpp-mongo", + "version": "1.2.5", + "description": "Oat++ MongoDB adapter for Oat++ ORM (native client). It contains DTO to BSON mapper plus database driver.", + "homepage": "https://github.com/oatpp/oatpp-mongo", + "dependencies": [ + "oatpp" + ] +} diff --git a/ports/oatpp-openssl/portfile.cmake b/ports/oatpp-openssl/portfile.cmake new file mode 100644 index 00000000000000..9445ee7006a2f1 --- /dev/null +++ b/ports/oatpp-openssl/portfile.cmake @@ -0,0 +1,25 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# get the source +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-openssl + REF ${OATPP_VERSION} + SHA512 c5a40691d846703378c2965f2ad9b99edb2025d47854719bab4e80a4771258c2b72cfba0135b63dd9e2387da4549b5bc6cebfc1913a8006d14d59e250be19060 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/oatpp-openssl-${OATPP_VERSION}") +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/oatpp-openssl/vcpkg.json b/ports/oatpp-openssl/vcpkg.json new file mode 100644 index 00000000000000..b844deaa36f7c7 --- /dev/null +++ b/ports/oatpp-openssl/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "oatpp-openssl", + "version-semver": "1.2.5", + "description": "Oat++ openssl module providing secure server and client connection providers.", + "homepage": "https://github.com/oatpp/oatpp-openssl", + "dependencies": [ + "oatpp", + "openssl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/oatpp-postgresql/fix-windows-build.patch b/ports/oatpp-postgresql/fix-windows-build.patch new file mode 100644 index 00000000000000..0b6a57d869d088 --- /dev/null +++ b/ports/oatpp-postgresql/fix-windows-build.patch @@ -0,0 +1,13 @@ +diff --git a/src/oatpp-postgresql/mapping/Serializer.hpp b/src/oatpp-postgresql/mapping/Serializer.hpp +index af76701..615d11b 100644 +--- a/src/oatpp-postgresql/mapping/Serializer.hpp ++++ b/src/oatpp-postgresql/mapping/Serializer.hpp +@@ -201,7 +201,7 @@ private: + + outData.oid = _this->getArrayTypeOid(itemType); + outData.dataSize = stream.getCurrentPosition(); +- outData.dataBuffer.template reset(new char[outData.dataSize]); ++ outData.dataBuffer.reset(new char[outData.dataSize]); + outData.data = outData.dataBuffer.get(); + outData.dataFormat = 1; + diff --git a/ports/oatpp-postgresql/portfile.cmake b/ports/oatpp-postgresql/portfile.cmake new file mode 100644 index 00000000000000..ce8af28f8a54ba --- /dev/null +++ b/ports/oatpp-postgresql/portfile.cmake @@ -0,0 +1,30 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-postgresql + REF ${OATPP_VERSION} + SHA512 43381422224f0254a823fdc702d1a007c405930157e6ea361f51e5232df4b04073181de175f61ab4986f3468d21f9ac25a0820d14efcecb0afb0096bdd674dcb + HEAD_REF master + PATCHES + fix-windows-build.patch # see https://github.com/oatpp/oatpp-postgresql/pull/8 +) + +set(VCPKG_C_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-postgresql-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/oatpp-postgresql/vcpkg.json b/ports/oatpp-postgresql/vcpkg.json new file mode 100644 index 00000000000000..7a5eb7b01788b6 --- /dev/null +++ b/ports/oatpp-postgresql/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "oatpp-postgresql", + "version": "1.2.5", + "description": "Oat++ PostgreSQL adapter for Oat++ ORM (alpha - not all datatypes are supported).", + "homepage": "https://github.com/oatpp/oatpp-postgresql", + "dependencies": [ + "libpq", + "oatpp" + ] +} diff --git a/ports/oatpp-sqlite/portfile.cmake b/ports/oatpp-sqlite/portfile.cmake new file mode 100644 index 00000000000000..f446876ad19cc4 --- /dev/null +++ b/ports/oatpp-sqlite/portfile.cmake @@ -0,0 +1,26 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-sqlite + REF ${OATPP_VERSION} + SHA512 b92d8c8b2afbbca38ecef7030648dcd7e15d7b2dd221bc32ea9778533ffcc9923b628308aa86bc53451b1ea4bb15dae8727bc6e0d8345fa611ef32469d850064 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DOATPP_SQLITE_AMALGAMATION:BOOL=OFF" +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-sqlite-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-sqlite/vcpkg.json b/ports/oatpp-sqlite/vcpkg.json new file mode 100644 index 00000000000000..85fa464937ded1 --- /dev/null +++ b/ports/oatpp-sqlite/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "oatpp-sqlite", + "version": "1.2.5", + "description": "Oat++ SQLite adapter for Oat++ ORM.", + "homepage": "https://github.com/oatpp/oatpp-sqlite", + "dependencies": [ + "oatpp", + "sqlite3" + ] +} diff --git a/ports/oatpp-swagger/portfile.cmake b/ports/oatpp-swagger/portfile.cmake new file mode 100644 index 00000000000000..c94eda0b618936 --- /dev/null +++ b/ports/oatpp-swagger/portfile.cmake @@ -0,0 +1,26 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-swagger + REF ${OATPP_VERSION} + SHA512 ad9b92a2b8ef7c54533bde92d5a12eb4b62553ee0a5252a5dd15aba7dc7293202931acc0ad40fc6f3be566813221a309a0bfec8bdbefca2197767387fe68fa6c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-swagger-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-swagger/vcpkg.json b/ports/oatpp-swagger/vcpkg.json new file mode 100644 index 00000000000000..da63d6133bd187 --- /dev/null +++ b/ports/oatpp-swagger/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "oatpp-swagger", + "version": "1.2.5", + "description": "Oat++ OpenApi (Swagger) UI submodule.", + "homepage": "https://github.com/oatpp/oatpp-swagger", + "dependencies": [ + "oatpp" + ] +} diff --git a/ports/oatpp-websocket/portfile.cmake b/ports/oatpp-websocket/portfile.cmake new file mode 100644 index 00000000000000..b0cbf4fe0f49b3 --- /dev/null +++ b/ports/oatpp-websocket/portfile.cmake @@ -0,0 +1,25 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-websocket + REF ${OATPP_VERSION} + SHA512 7bf4d8c8adf158e1b46b617d0aea201db32802dc89238d50c39bb10228ae59c8536ec198696f4e403da293c9b2dcc25a3c81aff1dedc49b38d4c7d94e97557e0 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-websocket-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-websocket/vcpkg.json b/ports/oatpp-websocket/vcpkg.json new file mode 100644 index 00000000000000..be7aa11769d504 --- /dev/null +++ b/ports/oatpp-websocket/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "oatpp-websocket", + "version": "1.2.5", + "description": "Oat++ websocket module.", + "homepage": "https://github.com/oatpp/oatpp-websocket", + "dependencies": [ + "oatpp" + ] +} diff --git a/ports/oatpp-zlib/portfile.cmake b/ports/oatpp-zlib/portfile.cmake new file mode 100644 index 00000000000000..84a4cf84a8d7f3 --- /dev/null +++ b/ports/oatpp-zlib/portfile.cmake @@ -0,0 +1,28 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-zlib + REF ${OATPP_VERSION} + SHA512 da132edc8c6476bf8d6d1df7d05eac45ac05057153fb0042f0fae54c1a20b3866174cffce2813a0cde7dbf0d8674babf61c84b62cba8dd22c440fef5f81e322b + HEAD_REF master +) + +set(VCPKG_C_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-zlib-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/oatpp-zlib/vcpkg.json b/ports/oatpp-zlib/vcpkg.json new file mode 100644 index 00000000000000..4f624c3aa69570 --- /dev/null +++ b/ports/oatpp-zlib/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "oatpp-zlib", + "version": "1.2.5", + "description": "Oat++ functionality for automatically compressing/decompressing content with deflate and gzip.", + "homepage": "https://github.com/oatpp/oatpp-zlib", + "dependencies": [ + "oatpp" + ] +} diff --git a/ports/oatpp/fix-windows-build.patch b/ports/oatpp/fix-windows-build.patch new file mode 100644 index 00000000000000..d017f7480d8d40 --- /dev/null +++ b/ports/oatpp/fix-windows-build.patch @@ -0,0 +1,21 @@ +diff --git a/src/oatpp/core/base/Environment.cpp b/src/oatpp/core/base/Environment.cpp +index b870835..ae36970 100644 +--- a/src/oatpp/core/base/Environment.cpp ++++ b/src/oatpp/core/base/Environment.cpp +@@ -36,14 +36,9 @@ + #include + #endif + +-#if (defined(WIN32) || defined(_WIN32)) && defined(_WIN64) +-struct tm* localtime_r(time_t *_clock, struct tm *_result) { +- _localtime64_s(_result, _clock); +- return _result; +-} +-#elif (defined(WIN32) || defined(_WIN32)) && not defined(_WIN64) ++#if defined(WIN32) || defined(_WIN32) + struct tm* localtime_r(time_t *_clock, struct tm *_result) { +- _localtime32_s(_result, _clock); ++ localtime_s(_result, _clock); + return _result; + } + #endif diff --git a/ports/oatpp/portfile.cmake b/ports/oatpp/portfile.cmake new file mode 100644 index 00000000000000..233bc2f22ac64c --- /dev/null +++ b/ports/oatpp/portfile.cmake @@ -0,0 +1,28 @@ +set(OATPP_VERSION "1.2.5") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp + REF ${OATPP_VERSION} + SHA512 8c7c939860c02ade86234e46f907051b088c07d6975cf90190c9263bb7fd8081a7aaccd3e08bfe8a962c07ae39ff771cf17099a48812ecc69df20272a856d0ed + HEAD_REF master + PATCHES + fix-windows-build.patch # see https://github.com/oatpp/oatpp/pull/428 +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp/vcpkg.json b/ports/oatpp/vcpkg.json new file mode 100644 index 00000000000000..594939dcf638c2 --- /dev/null +++ b/ports/oatpp/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "oatpp", + "version": "1.2.5", + "description": "Modern web framework.", + "homepage": "https://github.com/oatpp/oatpp" +} diff --git a/ports/observer-ptr-lite/CONTROL b/ports/observer-ptr-lite/CONTROL deleted file mode 100644 index 547e64289dd677..00000000000000 --- a/ports/observer-ptr-lite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: observer-ptr-lite -Version: 0.4.0 -Description: A C++17-like observer_ptr for C++98 and later in a single-file header-only library diff --git a/ports/observer-ptr-lite/portfile.cmake b/ports/observer-ptr-lite/portfile.cmake index 4fea768f5d62e9..60b42bcab9cc37 100644 --- a/ports/observer-ptr-lite/portfile.cmake +++ b/ports/observer-ptr-lite/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/observer-ptr-lite diff --git a/ports/observer-ptr-lite/vcpkg.json b/ports/observer-ptr-lite/vcpkg.json new file mode 100644 index 00000000000000..e2d70546534145 --- /dev/null +++ b/ports/observer-ptr-lite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "observer-ptr-lite", + "version-string": "0.4.0", + "port-version": 1, + "description": "A C++17-like observer_ptr for C++98 and later in a single-file header-only library" +} diff --git a/ports/ocilib/portfile.cmake b/ports/ocilib/portfile.cmake new file mode 100644 index 00000000000000..b510212a50f996 --- /dev/null +++ b/ports/ocilib/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vrogier/ocilib + REF 8573bce60d4aa4ac421445149003424fc7a69e6d v4.7.1 + SHA512 862c2df2f8e356bfafda32bba2c4564464104afea047b6297241a5ec2da9e1d73f3cd33f55e5bcd0018fb1b3625e756c22baf6821ab51c789359266f989137c8 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM x86) + else() + set(PLATFORM x64) + endif() + + # There is no debug configuration + # As it is a C library, build the release configuration and copy its output to the debug folder + set(VCPKG_BUILD_TYPE release) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH proj/dll/ocilib_dll_vs2019.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH LICENSE + RELEASE_CONFIGURATION "Release - ANSI" + PLATFORM ${PLATFORM} + USE_VCPKG_INTEGRATION + ALLOW_ROOT_INCLUDES) + + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug) + file(COPY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + endif() +else() + vcpkg_configure_make( + COPY_SOURCE + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --with-oracle-import=runtime + ) + + vcpkg_install_make() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc/${PORT} ${CURRENT_PACKAGES_DIR}/share/${PORT}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endif() diff --git a/ports/ocilib/vcpkg.json b/ports/ocilib/vcpkg.json new file mode 100644 index 00000000000000..55fe9a9003e16f --- /dev/null +++ b/ports/ocilib/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "ocilib", + "version-string": "4.7.1", + "port-version": 1, + "description": "OCILIB is an open source and cross platform Oracle Driver that delivers efficient access to Oracle databases.", + "homepage": "https://vrogier.github.io/ocilib/", + "supports": "!(arm | uwp)" +} diff --git a/ports/octomap/001-fix-exported-targets.patch b/ports/octomap/001-fix-exported-targets.patch index fe02db6e9f0d55..c2b8e04dd5be81 100644 --- a/ports/octomap/001-fix-exported-targets.patch +++ b/ports/octomap/001-fix-exported-targets.patch @@ -1,13 +1,14 @@ diff --git a/octomap/src/CMakeLists.txt b/octomap/src/CMakeLists.txt -index 9ac6dcb..526ad76 100644 +index 45b384f..ab1b6b1 100644 --- a/octomap/src/CMakeLists.txt +++ b/octomap/src/CMakeLists.txt -@@ -8,16 +8,14 @@ SET (octomap_SRCS +@@ -8,17 +8,16 @@ SET (octomap_SRCS OcTreeNode.cpp OcTreeStamped.cpp ColorOcTree.cpp - ) +) ++ -# dynamic and static libs, see CMake FAQ: -ADD_LIBRARY( octomap SHARED ${octomap_SRCS}) @@ -20,10 +21,12 @@ index 9ac6dcb..526ad76 100644 ) -ADD_LIBRARY( octomap-static STATIC ${octomap_SRCS}) -SET_TARGET_PROPERTIES(octomap-static PROPERTIES OUTPUT_NAME "octomap") +-add_dependencies(octomap-static octomath-static) ++ TARGET_LINK_LIBRARIES(octomap octomath) -@@ -25,7 +23,7 @@ if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") +@@ -26,7 +25,7 @@ if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") endif() @@ -32,25 +35,20 @@ index 9ac6dcb..526ad76 100644 APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") ADD_SUBDIRECTORY( testing ) -@@ -66,7 +64,7 @@ TARGET_LINK_LIBRARIES(intersection_example octomap) +@@ -67,7 +66,7 @@ TARGET_LINK_LIBRARIES(intersection_example octomap) ADD_EXECUTABLE(octree2pointcloud octree2pointcloud.cpp) TARGET_LINK_LIBRARIES(octree2pointcloud octomap) -install(TARGETS octomap octomap-static +install(TARGETS octomap EXPORT octomap-targets - INCLUDES DESTINATION include + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ${INSTALL_TARGETS_DEFAULT_ARGS} -@@ -84,4 +82,3 @@ install(TARGETS - compare_octrees - ${INSTALL_TARGETS_DEFAULT_ARGS} - ) -- diff --git a/octomap/src/math/CMakeLists.txt b/octomap/src/math/CMakeLists.txt -index 22127ad..cd256c7 100644 +index 3b47ec4..6a75170 100644 --- a/octomap/src/math/CMakeLists.txt +++ b/octomap/src/math/CMakeLists.txt -@@ -5,26 +5,22 @@ SET (octomath_SRCS +@@ -5,24 +5,22 @@ SET (octomath_SRCS ) @@ -60,10 +58,8 @@ index 22127ad..cd256c7 100644 SET_TARGET_PROPERTIES( octomath PROPERTIES VERSION ${OCTOMAP_VERSION} SOVERSION ${OCTOMAP_SOVERSION} - INSTALL_NAME_DIR ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} # this seems to be necessary for MacOS X ) --# INSTALL_NAME_DIR seems to be necessary for MacOS X -- + -ADD_LIBRARY( octomath-static STATIC ${octomath_SRCS}) -SET_TARGET_PROPERTIES(octomath-static PROPERTIES OUTPUT_NAME "octomath") @@ -78,5 +74,5 @@ index 22127ad..cd256c7 100644 -install(TARGETS octomath octomath-static +install(TARGETS octomath EXPORT octomap-targets - INCLUDES DESTINATION include + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ${INSTALL_TARGETS_DEFAULT_ARGS} diff --git a/ports/octomap/CONTROL b/ports/octomap/CONTROL deleted file mode 100644 index afac685c6d291a..00000000000000 --- a/ports/octomap/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: octomap -Version: 2017-03-11-7 -Description: An Efficient Probabilistic 3D Mapping Framework Based on Octrees diff --git a/ports/octomap/portfile.cmake b/ports/octomap/portfile.cmake index 203adce4df93e5..1708296a529f7f 100644 --- a/ports/octomap/portfile.cmake +++ b/ports/octomap/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OctoMap/octomap - REF cefed0c1d79afafa5aeb05273cf1246b093b771c - SHA512 8fdea8b33680488d41e570d55ff88c20b923efb9d48238031f9b96d2e3917dbe7e49699769de63794f4b1d24e40a99615151e72487f30de340a3abf6522ea156 + REF v1.9.5 + SHA512 e58c6d33c351b14e9596e18a8702715d167c136fd029b1078ddd13a5926fe451d3b619231b5a8ccfb64b6e5fc6db8b57e6ef329099828d2f5195c0988700b581 HEAD_REF master PATCHES "001-fix-exported-targets.patch" @@ -17,6 +15,7 @@ vcpkg_configure_cmake( PREFER_NINJA DISABLE_PARALLEL_CONFIGURE OPTIONS + -DBUILD_TESTING=OFF -DBUILD_OCTOVIS_SUBPROJECT=OFF -DBUILD_DYNAMICETD3D_SUBPROJECT=OFF ) @@ -25,29 +24,9 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/octomap) -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/binvox2bt.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/binvox2bt.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/bt2vrml.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/bt2vrml.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/compare_octrees.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/compare_octrees.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/convert_octree.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/convert_octree.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/edit_octree.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/edit_octree.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/eval_octree_accuracy.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/eval_octree_accuracy.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/graph2tree.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/graph2tree.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/log2graph.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/log2graph.exe) - - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/binvox2bt.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/bt2vrml.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/compare_octrees.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/convert_octree.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/edit_octree.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/eval_octree_accuracy.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/graph2tree.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/log2graph.exe) -else() - file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/octomap) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() +vcpkg_copy_tools( + TOOL_NAMES binvox2bt bt2vrml compare_octrees convert_octree edit_octree eval_octree_accuracy graph2tree log2graph + AUTO_CLEAN) vcpkg_fixup_cmake_targets() @@ -60,8 +39,6 @@ endif() file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/octomap") # Handle copyright -file(COPY ${SOURCE_PATH}/octomap/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/octomap) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/octomap/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/octomap/copyright) +file(INSTALL ${SOURCE_PATH}/octomap/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/octomap) diff --git a/ports/octomap/vcpkg.json b/ports/octomap/vcpkg.json new file mode 100644 index 00000000000000..8aa0e86d57c540 --- /dev/null +++ b/ports/octomap/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "octomap", + "version-string": "1.9.5", + "port-version": 1, + "description": "An Efficient Probabilistic 3D Mapping Framework Based on Octrees", + "homepage": "https://octomap.github.io/" +} diff --git a/ports/ode/0001-add-static-runtime-option.patch b/ports/ode/0001-add-static-runtime-option.patch deleted file mode 100644 index 1f0d15b5643fba..00000000000000 --- a/ports/ode/0001-add-static-runtime-option.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/build/premake4.lua b/build/premake4.lua -index c39b9b7..d1559f7 100644 ---- a/build/premake4.lua -+++ b/build/premake4.lua -@@ -150,7 +150,12 @@ - trigger = "only-double", - description = "Only use double-precision math" - } -- -+ -+ newoption { -+ trigger = "static-runtime", -+ description = "Perform a static link against the standard runtime libraries" -+ } -+ - -- always clean all of the optional components and toolsets - if _ACTION == "clean" then - _OPTIONS["with-demos"] = "" -@@ -253,7 +258,11 @@ - configuration { "vs2002 or vs2003", "*Lib" } - flags { "StaticRuntime" } - -- -+ -- optionally enable StaticRuntime -+ if _OPTIONS["static-runtime"] then -+ configuration { "*" } -+ flags { "StaticRuntime" } -+ end - - ---------------------------------------------------------------------- - -- The demo projects, automated from list above. These go first so diff --git a/ports/ode/CONTROL b/ports/ode/CONTROL deleted file mode 100644 index 605db9d18e3e96..00000000000000 --- a/ports/ode/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ode -Version: 0.15.1-1 -Homepage: https://bitbucket.org/odedevs/ode/src/default/ -Description: Open Dynamics Engine diff --git a/ports/ode/portfile.cmake b/ports/ode/portfile.cmake index a1f617fe3bbc8d..cb10fc9c0369f4 100644 --- a/ports/ode/portfile.cmake +++ b/ports/ode/portfile.cmake @@ -1,107 +1,25 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) -set(SOURCE_VERSION 0.15.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ode-${SOURCE_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.org/odedevs/ode/downloads/ode-${SOURCE_VERSION}.tar.gz" - FILENAME "ode-${SOURCE_VERSION}.tar.gz" - SHA512 e30623374c8f7c45359d6d837313698ca28da7b5a2d26c7171da16ccd6f95c4a49aad731c432db6ca2911886948a2e7ea93a96ade5a1639b945a825d8ac87249 +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO odedevs/ode + REF 0.16.1 + SHA512 04429cae1b8fc703e53880c5de78293cee46fe4855c96ca7006bd5848255a0df004b75716a6b30ff5176df004e2bec29b2a31d4af8e7ac59da18f0af2eed8396 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( +vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-add-static-runtime-option.patch" + PREFER_NINJA + OPTIONS -DODE_WITH_DEMOS=0 -DODE_WITH_TESTS=0 ) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ode-0.16.1) -if (TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR "ARM is currently not supported.") -elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86") - set(premake_PLATFORM "x32") - set(MSBUILD_PLATFORM "Win32") -else () - set(premake_PLATFORM ${TRIPLET_SYSTEM_ARCH}) - set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) -endif() - -# The build system of ode outputs its artifacts in this subdirectory -# of the source directory -set(DEBUG_ARTIFACTS_PATH ${SOURCE_PATH}/lib/Debug) -set(RELEASE_ARTIFACTS_PATH ${SOURCE_PATH}/lib/Release) - -# To avoid contamination from previous build, we clean the directory -file(REMOVE_RECURSE ${DEBUG_ARTIFACTS_PATH} ${RELEASE_ARTIFACTS_PATH}) - -# Configure the project using the embedded premake4 -message(STATUS "Configuring ${TARGET_TRIPLET}") -# Consistently with the debian package we only ship ODE built with double precision -set(premake_OPTIONS "--only-double") -# TODO: use vcpkg's libccd -list(APPEND premake_OPTIONS --with-libccd) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - list(APPEND premake_OPTIONS --only-shared) -elseif(VCPKG_LIBRARY_LINKAGE STREQUAL static) - list(APPEND premake_OPTIONS --only-static) -endif() -if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - list(APPEND premake_OPTIONS --static-runtime) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/build/premake4.exe - --to=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} - --platform=${premake_PLATFORM} - ${premake_OPTIONS} - vs2010 - WORKING_DIRECTORY ${SOURCE_PATH}/build/ - LOGNAME config-${TARGET_TRIPLET} -) -message(STATUS "Configuring ${TARGET_TRIPLET} done") - -# Build the project using the generated msbuild solutions -vcpkg_build_msbuild(PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/ode.sln - PLATFORM ${MSBUILD_PLATFORM} - WORKING_DIRECTORY ${SOURCE_PATH}/build) - -# Install headers -file(GLOB HEADER_FILES ${SOURCE_PATH}/include/ode/*.h) -file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/ode) - -# Install libraries -file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/*.lib ${DEBUG_ARTIFACTS_PATH}/*.exp) -file(INSTALL ${LIB_DEBUG_FILES} - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -if (DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB BIN_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/*.dll ${DEBUG_ARTIFACTS_PATH}/*.pdb) - file(INSTALL ${BIN_DEBUG_FILES} - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif () - -file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/*.lib ${RELEASE_ARTIFACTS_PATH}/*.exp) -file(INSTALL ${LIB_RELEASE_FILES} - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -if (DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB BIN_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/*.dll ${RELEASE_ARTIFACTS_PATH}/*.pdb) - file(INSTALL ${BIN_RELEASE_FILES} - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif () - - - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE-BSD.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/ode) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ode/LICENSE-BSD.TXT ${CURRENT_PACKAGES_DIR}/share/ode/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) diff --git a/ports/ode/vcpkg.json b/ports/ode/vcpkg.json new file mode 100644 index 00000000000000..4d507866a37512 --- /dev/null +++ b/ports/ode/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ode", + "version-string": "0.16.1", + "port-version": 1, + "description": "Open Dynamics Engine", + "homepage": "https://bitbucket.org/odedevs/ode/src/default/" +} diff --git a/ports/offscale-libetcd-cpp/CONTROL b/ports/offscale-libetcd-cpp/CONTROL deleted file mode 100644 index ec080142cec1be..00000000000000 --- a/ports/offscale-libetcd-cpp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: offscale-libetcd-cpp -Version: 2019-07-10 -Homepage: https://github.com/offscale/libetcd-cpp -Description: A C++ client library for etcd. etcd is a distributed, reliable key-value store. -Build-Depends: grpc, protobuf diff --git a/ports/offscale-libetcd-cpp/fix-dependency-grpc.patch b/ports/offscale-libetcd-cpp/fix-dependency-grpc.patch new file mode 100644 index 00000000000000..652720333edafd --- /dev/null +++ b/ports/offscale-libetcd-cpp/fix-dependency-grpc.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0d9aad9..d68c5f7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,7 +70,7 @@ endif() + target_include_directories(etcdcpp PRIVATE "generated/") + target_include_directories(etcdcpp INTERFACE "${CMAKE_INSTALL_PREFIX}/include") + +-target_link_libraries(etcdcpp PRIVATE gRPC::gpr gRPC::grpc gRPC::grpc++ gRPC::grpc_cronet) ++target_link_libraries(etcdcpp PRIVATE gRPC::gpr gRPC::grpc gRPC::grpc++ gRPC::grpc++_alts) + target_link_libraries(etcdcpp PRIVATE protobuf::libprotoc protobuf::libprotobuf) + + install(TARGETS etcdcpp EXPORT etcdcpp DESTINATION lib) diff --git a/ports/offscale-libetcd-cpp/portfile.cmake b/ports/offscale-libetcd-cpp/portfile.cmake index ffe4519f8926d0..e6857aa3d437e6 100644 --- a/ports/offscale-libetcd-cpp/portfile.cmake +++ b/ports/offscale-libetcd-cpp/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO offscale/libetcd-cpp REF 8607d8d7080c6eb447bc41b799a24bfdb87cf638 SHA512 9bf4bf14fd52f4f6bbf8cf68de61e6a19eeffbdc501f05c8f614b5f13f206410884afd7fe226a077448e58e02990c65a6b27ee895ed34ba5ee701abe0500b875 HEAD_REF master + PATCHES fix-dependency-grpc.patch ) vcpkg_configure_cmake( @@ -14,6 +13,6 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -file(INSTALL ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/offscale-libetcd-cpp RENAME copyright) - vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/offscale-libetcd-cpp/vcpkg.json b/ports/offscale-libetcd-cpp/vcpkg.json new file mode 100644 index 00000000000000..b6c2f5164cf77f --- /dev/null +++ b/ports/offscale-libetcd-cpp/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "offscale-libetcd-cpp", + "version-string": "2019-07-10", + "port-version": 2, + "description": "A C++ client library for etcd. etcd is a distributed, reliable key-value store.", + "homepage": "https://github.com/offscale/libetcd-cpp", + "dependencies": [ + "grpc", + "protobuf" + ] +} diff --git a/ports/ogdf/CONTROL b/ports/ogdf/CONTROL deleted file mode 100644 index fe2cf909cc189c..00000000000000 --- a/ports/ogdf/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: ogdf -Version: 2018-03-28-2 -Description: Open Graph Drawing Framework diff --git a/ports/ogdf/fix-c4723.patch b/ports/ogdf/fix-c4723.patch new file mode 100644 index 00000000000000..14401c7a988d09 --- /dev/null +++ b/ports/ogdf/fix-c4723.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/compiler-specifics.cmake b/cmake/compiler-specifics.cmake +index 2446f32..45b00ac 100644 +--- a/cmake/compiler-specifics.cmake ++++ b/cmake/compiler-specifics.cmake +@@ -40,7 +40,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + set(available_default_warning_flags_release "${available_default_warning_flags_release} -Wno-error=unused-variable") + set(warnings_as_errors_flag "-Werror") + elseif(MSVC) +- set(available_default_warning_flags "/W3 /wd4018 /wd4068 /wd4101 /wd4244 /wd4250 /wd4267 /wd4373 /wd4800 /wd4996") ++ set(available_default_warning_flags "/W3 /wd4018 /wd4068 /wd4101 /wd4244 /wd4250 /wd4267 /wd4373 /wd4800 /wd4996 /wd4723") + # this has to be explained because MSVC is so cryptic: + # /W3 sets the warning level of MSVC to 3 (all warnings except informational warnings), + # /wd disables the warning with the specific code, diff --git a/ports/ogdf/portfile.cmake b/ports/ogdf/portfile.cmake index 5ad5e72cabc33f..45951698a5ad1b 100644 --- a/ports/ogdf/portfile.cmake +++ b/ports/ogdf/portfile.cmake @@ -1,11 +1,11 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/2018-03-28/OGDF-snapshot) -vcpkg_download_distfile(ARCHIVE - URLS "http://www.ogdf.net/lib/exe/fetch.php/tech%3aogdf-snapshot-2018-03-28.zip" - FILENAME "ogdf-2018-03-28.zip" - SHA512 a6ddb33bc51dca4d59fcac65ff66459043b11ce5303e9d40e4fc1756adf84a0af7d0ac7debab670111e7a145dcdd9373c0e350d5b7e831b169811f246b6e19b6 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ogdf/ogdf + REF 8a103cf3a7dfff87fe8b7534575604bc53c0870c + SHA512 264e8586be7a18640f253eb7b289dd99f1f2fc42c4d2304ab12f7c6aa9c5754b710642e7296038aea0cd9368d732d0106501fefed800743b403adafff7e3f0b2 + HEAD_REF master + PATCHES fix-c4723.patch ) -vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/2018-03-28) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -22,6 +22,6 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OGDF) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogdf RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/minisat/doc ${CURRENT_PACKAGES_DIR}/include/ogdf/lib/minisat/doc) diff --git a/ports/ogdf/vcpkg.json b/ports/ogdf/vcpkg.json new file mode 100644 index 00000000000000..dc21d5e43f8141 --- /dev/null +++ b/ports/ogdf/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ogdf", + "version-string": "2019-08-23", + "port-version": 2, + "description": "Open Graph Drawing Framework", + "homepage": "https://github.com/ogdf/ogdf" +} diff --git a/ports/ogre-next/environment-overrides.cmake b/ports/ogre-next/environment-overrides.cmake new file mode 100644 index 00000000000000..4957cdcd5d5d51 --- /dev/null +++ b/ports/ogre-next/environment-overrides.cmake @@ -0,0 +1,16 @@ +#[[ + +Building steps for ogre-next[d3d9]: + +1. Download and install "Microsoft DirectX SDK" +https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812 + +2. Set env variable +set DXSDK_DIR=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010) + +3. Install port +.\vcpkg.exe install ogre-next[d3d9] --triplet x64-windows + +]] + +set(VCPKG_ENV_PASSTHROUGH DXSDK_DIR) diff --git a/ports/ogre-next/fix_find_package_sdl2.patch b/ports/ogre-next/fix_find_package_sdl2.patch new file mode 100644 index 00000000000000..aa72be664bc03a --- /dev/null +++ b/ports/ogre-next/fix_find_package_sdl2.patch @@ -0,0 +1,18 @@ +diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake +index 4b67ed8cb..7da194820 100644 +--- a/CMake/Dependencies.cmake ++++ b/CMake/Dependencies.cmake +@@ -292,11 +292,11 @@ macro_log_feature(PYTHONLIBS_FOUND "Python" "Language bindings to use OGRE from + # Find sdl2 + if(NOT ANDROID AND NOT EMSCRIPTEN) + # find script does not work in cross compilation environment +- find_package(SDL2) ++ find_package(SDL2 CONFIG) + macro_log_feature(SDL2_FOUND "SDL2" "Simple DirectMedia Library needed for input handling in samples" "https://www.libsdl.org/" FALSE "" "") + if(SDL2_FOUND AND WIN32 AND NOT SDL2_BINARY) + # fix linking static SDL2 on windows +- set(SDL2_LIBRARY ${SDL2_LIBRARY} winmm.lib imm32.lib version.lib) ++ set(SDL2_LIBRARY SDL2::SDL2 winmm.lib imm32.lib version.lib) + endif() + endif() + diff --git a/ports/ogre-next/portfile.cmake b/ports/ogre-next/portfile.cmake new file mode 100644 index 00000000000000..02f147ab85b963 --- /dev/null +++ b/ports/ogre-next/portfile.cmake @@ -0,0 +1,121 @@ +# This portfile is based (shamelessly copied and adapted a bit) on 'ogre' portfile. + +if (EXISTS "${CURRENT_INSTALLED_DIR}/Media/HLMS/Blendfunctions_piece_fs.glslt") + message(FATAL_ERROR "FATAL ERROR: ogre-next and ogre are incompatible.") +endif() + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message("${PORT} currently requires the following library from the system package manager:\n Xaw\n\nIt can be installed on Ubuntu systems via apt-get install libxaw7-dev") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OGRECave/ogre-next + REF 8083067c1835147de5d82015347d95c710e36bc0 + SHA512 2660f739def7076b42009ba932a27532f2a20e7be8ec2674aff29116c7dcd7f2d75564d8ce07bef3dba13ece5293d604573ad4f8734f6086c1750127f52834cd + HEAD_REF master + PATCHES + toolchain_fixes.patch + rename_config_cmake.patch + fix_find_package_sdl2.patch +) + +file(REMOVE "${SOURCE_PATH}/CMake/Packages/FindOpenEXR.cmake") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(OGRE_STATIC ON) +else() + set(OGRE_STATIC OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + d3d9 OGRE_BUILD_RENDERSYSTEM_D3D9 + java OGRE_BUILD_COMPONENT_JAVA + python OGRE_BUILD_COMPONENT_PYTHON + csharp OGRE_BUILD_COMPONENT_CSHARP +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOGRE_BUILD_DEPENDENCIES=OFF + -DOGRE_BUILD_SAMPLES=OFF + -DOGRE_BUILD_TESTS=OFF + -DOGRE_BUILD_TOOLS=OFF + -DOGRE_BUILD_MSVC_MP=ON + -DOGRE_BUILD_MSVC_ZM=ON + -DOGRE_INSTALL_DEPENDENCIES=OFF + -DOGRE_INSTALL_DOCS=OFF + -DOGRE_INSTALL_PDB=OFF + -DOGRE_INSTALL_SAMPLES=OFF + -DOGRE_INSTALL_TOOLS=OFF + -DOGRE_INSTALL_CMAKE=ON + -DOGRE_INSTALL_VSPROPS=OFF + -DOGRE_STATIC=${OGRE_STATIC} + -DOGRE_CONFIG_THREAD_PROVIDER=std + -DOGRE_BUILD_RENDERSYSTEM_D3D11=ON + -DOGRE_BUILD_RENDERSYSTEM_GL=ON + -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON + -DOGRE_BUILD_RENDERSYSTEM_GLES=OFF + -DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF +# Optional stuff + ${FEATURE_OPTIONS} +# vcpkg specific stuff + -DOGRE_CMAKE_DIR=share/ogre-next +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB REL_CFGS ${CURRENT_PACKAGES_DIR}/bin/*.cfg) +if(REL_CFGS) + file(COPY ${REL_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE ${REL_CFGS}) +endif() + +file(GLOB DBG_CFGS ${CURRENT_PACKAGES_DIR}/debug/bin/*.cfg) +if(DBG_CFGS) + file(COPY ${DBG_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE ${DBG_CFGS}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +#Remove OgreMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol +#manual-link subfolder is here to the rescue! +if(VCPKG_TARGET_IS_WINDOWS) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMain.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMainStatic.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMainStatic.lib) + endif() + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMain_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMain_d.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMainStatic_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMainStatic_d.lib) + endif() + endif() + + file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/ogre-next/*.cmake) + foreach(SHARE_FILE ${SHARE_FILES}) + file(READ "${SHARE_FILE}" _contents) + string(REPLACE "lib/OgreMain" "lib/manual-link/OgreMain" _contents "${_contents}") + file(WRITE "${SHARE_FILE}" "${_contents}") + endforeach() +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/ogre-next/rename_config_cmake.patch b/ports/ogre-next/rename_config_cmake.patch new file mode 100644 index 00000000000000..d85603290c455c --- /dev/null +++ b/ports/ogre-next/rename_config_cmake.patch @@ -0,0 +1,22 @@ +diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake +index 79f7514..79bc033 100644 +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake +@@ -215,7 +215,7 @@ if(NOT DEFINED OGRE_CMAKE_DIR) + set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") + endif() + endif() +-configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake ++configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/ogre-nextConfig.cmake + INSTALL_DESTINATION ${OGRE_CMAKE_DIR} + PATH_VARS CMAKE_INSTALL_PREFIX) + write_basic_package_version_file( +@@ -223,7 +223,7 @@ write_basic_package_version_file( + VERSION ${OGRE_VERSION} + COMPATIBILITY SameMajorVersion) + install(FILES +- ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake ++ ${PROJECT_BINARY_DIR}/cmake/ogre-nextConfig.cmake + ${PROJECT_BINARY_DIR}/cmake/OGREConfigVersion.cmake + DESTINATION ${OGRE_CMAKE_DIR} + ) diff --git a/ports/ogre-next/toolchain_fixes.patch b/ports/ogre-next/toolchain_fixes.patch new file mode 100644 index 00000000000000..9ff2d87dfe6b1d --- /dev/null +++ b/ports/ogre-next/toolchain_fixes.patch @@ -0,0 +1,291 @@ +diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt +index a7a3796..2e21403 100644 +--- a/CMake/CMakeLists.txt ++++ b/CMake/CMakeLists.txt +@@ -13,10 +13,12 @@ + # directory, but can also be used for custom projects. + ############################################################# + +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++if(NOT DEFINED OGRE_CMAKE_DIR) ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() + endif() + + set(INST_FILES Utils/FindPkgMacros.cmake) +diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake +index 783755e..79f7514 100644 +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake +@@ -208,10 +208,12 @@ endif () + # Create the CMake package files + include(CMakePackageConfigHelpers) + +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++if(NOT DEFINED OGRE_CMAKE_DIR) ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() + endif() + configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake + INSTALL_DESTINATION ${OGRE_CMAKE_DIR} +diff --git a/CMake/Packages/FindCg.cmake b/CMake/Packages/FindCg.cmake +index 4501cf9..7eb57c3 100644 +--- a/CMake/Packages/FindCg.cmake ++++ b/CMake/Packages/FindCg.cmake +@@ -56,7 +56,7 @@ endif() + + find_library(Cg_LIBRARY_REL NAMES ${Cg_LIBRARY_NAMES} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(Cg_LIBRARY_DBG NAMES ${Cg_LIBRARY_NAMES_DBG} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(Cg_LIBRARY) ++make_library_set(Cg) + + if (WIN32) + if (CMAKE_CL_64) +diff --git a/CMake/Packages/FindFreeImage.cmake b/CMake/Packages/FindFreeImage.cmake +index 7c89ec5..d8314f0 100644 +--- a/CMake/Packages/FindFreeImage.cmake ++++ b/CMake/Packages/FindFreeImage.cmake +@@ -43,7 +43,7 @@ find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${FreeImage_INC_SEARCH_P + find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) + +-make_library_set(FreeImage_LIBRARY) ++make_library_set(FreeImage) + + findpkg_finish(FreeImage) + +diff --git a/CMake/Packages/FindGLSLOptimizer.cmake b/CMake/Packages/FindGLSLOptimizer.cmake +index dd4b179..6f158fc 100644 +--- a/CMake/Packages/FindGLSLOptimizer.cmake ++++ b/CMake/Packages/FindGLSLOptimizer.cmake +@@ -38,7 +38,7 @@ findpkg_framework(GLSL_Optimizer) + find_path(GLSL_Optimizer_INCLUDE_DIR NAMES glsl_optimizer.h HINTS ${GLSL_Optimizer_INC_SEARCH_PATH} ${GLSL_Optimizer_PKGC_INCLUDE_DIRS} PATH_SUFFIXES GLSL_Optimizer) + find_library(GLSL_Optimizer_LIBRARY_REL NAMES ${GLSL_Optimizer_LIBRARY_NAMES} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(GLSL_Optimizer_LIBRARY_DBG NAMES ${GLSL_Optimizer_LIBRARY_NAMES_DBG} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(GLSL_Optimizer_LIBRARY) ++make_library_set(GLSL_Optimizer) + + findpkg_finish(GLSL_Optimizer) + add_parent_dir(GLSL_Optimizer_INCLUDE_DIRS GLSL_Optimizer_INCLUDE_DIR) +diff --git a/CMake/Packages/FindHLSL2GLSL.cmake b/CMake/Packages/FindHLSL2GLSL.cmake +index 7125895..13a306f 100644 +--- a/CMake/Packages/FindHLSL2GLSL.cmake ++++ b/CMake/Packages/FindHLSL2GLSL.cmake +@@ -38,7 +38,7 @@ findpkg_framework(HLSL2GLSL) + find_path(HLSL2GLSL_INCLUDE_DIR NAMES hlsl2glsl.h HINTS ${HLSL2GLSL_INC_SEARCH_PATH} ${HLSL2GLSL_PKGC_INCLUDE_DIRS} PATH_SUFFIXES HLSL2GLSL) + find_library(HLSL2GLSL_LIBRARY_REL NAMES ${HLSL2GLSL_LIBRARY_NAMES} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(HLSL2GLSL_LIBRARY_DBG NAMES ${HLSL2GLSL_LIBRARY_NAMES_DBG} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(HLSL2GLSL_LIBRARY) ++make_library_set(HLSL2GLSL) + + findpkg_finish(HLSL2GLSL) + add_parent_dir(HLSL2GLSL_INCLUDE_DIRS HLSL2GLSL_INCLUDE_DIR) +diff --git a/CMake/Packages/FindNVAPI.cmake b/CMake/Packages/FindNVAPI.cmake +index 2b9deba..f33a298 100644 +--- a/CMake/Packages/FindNVAPI.cmake ++++ b/CMake/Packages/FindNVAPI.cmake +@@ -44,7 +44,7 @@ findpkg_framework(NVAPI) + find_path(NVAPI_INCLUDE_DIR NAMES nvapi.h HINTS ${NVAPI_FRAMEWORK_INCLUDES} ${NVAPI_INC_SEARCH_PATH} ${NVAPI_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NVAPI) + find_library(NVAPI_LIBRARY_REL NAMES ${NVAPI_LIBRARY_NAMES} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel) + find_library(NVAPI_LIBRARY_DBG NAMES ${NVAPI_LIBRARY_NAMES_DBG} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug) +-make_library_set(NVAPI_LIBRARY) ++make_library_set(NVAPI) + + findpkg_finish(NVAPI) + add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR) +\ No newline at end of file +diff --git a/CMake/Packages/FindPOCO.cmake b/CMake/Packages/FindPOCO.cmake +index 6b6d7fa..3667b8b 100644 +--- a/CMake/Packages/FindPOCO.cmake ++++ b/CMake/Packages/FindPOCO.cmake +@@ -50,7 +50,7 @@ findpkg_framework(POCO) + find_path(POCO_INCLUDE_DIR NAMES Poco/Foundation.h HINTS ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Foundation/include) + find_library(POCO_LIBRARY_REL NAMES ${POCO_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_LIBRARY_DBG NAMES ${POCO_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_LIBRARY) ++make_library_set(POCO) + + findpkg_finish(POCO) + +@@ -66,7 +66,7 @@ get_debug_names(POCO_Util_LIBRARY_NAMES) + find_path(POCO_Util_INCLUDE_DIR NAMES Poco/Util/Util.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Util/include) + find_library(POCO_Util_LIBRARY_REL NAMES ${POCO_Util_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_Util_LIBRARY_DBG NAMES ${POCO_Util_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_Util_LIBRARY) ++make_library_set(POCO_Util) + findpkg_finish(POCO_Util) + + # Look for Poco's Net package +@@ -76,7 +76,7 @@ get_debug_names(POCO_Net_LIBRARY_NAMES) + find_path(POCO_Net_INCLUDE_DIR NAMES Poco/Net/Net.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Net/include) + find_library(POCO_Net_LIBRARY_REL NAMES ${POCO_Net_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_Net_LIBRARY_DBG NAMES ${POCO_Net_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_Net_LIBRARY) ++make_library_set(POCO_Net) + findpkg_finish(POCO_Net) + + # Look for Poco's NetSSL package +@@ -86,7 +86,7 @@ get_debug_names(POCO_NetSSL_LIBRARY_NAMES) + find_path(POCO_NetSSL_INCLUDE_DIR NAMES Poco/Net/NetSSL.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NetSSL/include) + find_library(POCO_NetSSL_LIBRARY_REL NAMES ${POCO_NetSSL_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_NetSSL_LIBRARY_DBG NAMES ${POCO_NetSSL_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_NetSSL_LIBRARY) ++make_library_set(POCO_NetSSL) + findpkg_finish(POCO_NetSSL) + + # Look for Poco's XML package +@@ -96,6 +96,6 @@ get_debug_names(POCO_XML_LIBRARY_NAMES) + find_path(POCO_XML_INCLUDE_DIR NAMES Poco/XML/XML.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES XML/include) + find_library(POCO_XML_LIBRARY_REL NAMES ${POCO_XML_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_XML_LIBRARY_DBG NAMES ${POCO_XML_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_XML_LIBRARY) ++make_library_set(POCO_XML) + findpkg_finish(POCO_XML) + +diff --git a/CMake/Packages/FindTBB.cmake b/CMake/Packages/FindTBB.cmake +index 0c48510..c121966 100644 +--- a/CMake/Packages/FindTBB.cmake ++++ b/CMake/Packages/FindTBB.cmake +@@ -104,7 +104,7 @@ findpkg_framework(TBB) + find_path(TBB_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS}) + find_library(TBB_LIBRARY_REL NAMES ${TBB_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) + find_library(TBB_LIBRARY_DBG NAMES ${TBB_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) +-make_library_set(TBB_LIBRARY) ++make_library_set(TBB) + + findpkg_finish(TBB) + +@@ -120,7 +120,7 @@ get_debug_names(TBB_MALLOC_LIBRARY_NAMES) + find_path(TBB_MALLOC_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS} ) + find_library(TBB_MALLOC_LIBRARY_REL NAMES ${TBB_MALLOC_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} ) + find_library(TBB_MALLOC_LIBRARY_DBG NAMES ${TBB_MALLOC_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} ) +-make_library_set(TBB_MALLOC_LIBRARY) ++make_library_set(TBB_MALLOC) + findpkg_finish(TBB_MALLOC) + + # Look for TBB's malloc proxy package +@@ -130,5 +130,5 @@ get_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES) + find_path(TBB_MALLOC_PROXY_INCLUDE_DIR NAMES tbb/tbbmalloc_proxy.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS}) + find_library(TBB_MALLOC_PROXY_LIBRARY_REL NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) + find_library(TBB_MALLOC_PROXY_LIBRARY_DBG NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) +-make_library_set(TBB_MALLOC_PROXY_LIBRARY) ++make_library_set(TBB_MALLOC_PROXY) + findpkg_finish(TBB_MALLOC_PROXY) +diff --git a/CMake/Packages/FindZZip.cmake b/CMake/Packages/FindZZip.cmake +index e97951e..54c2567 100644 +--- a/CMake/Packages/FindZZip.cmake ++++ b/CMake/Packages/FindZZip.cmake +@@ -39,12 +39,12 @@ use_pkgconfig(ZZip_PKGC zziplib) + + findpkg_framework(ZZip) + +-find_path(ZZip_INCLUDE_DIR NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS}) ++find_path(ZZip_INCLUDE_DIRS NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS}) + + find_library(ZZip_LIBRARY_REL NAMES ${ZZip_LIBRARY_NAMES} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(ZZip_LIBRARY_DBG NAMES ${ZZip_LIBRARY_NAMES_DBG} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) + +-make_library_set(ZZip_LIBRARY) ++make_library_set(ZZip) + + findpkg_finish(ZZip) + +diff --git a/CMake/Utils/FindPkgMacros.cmake b/CMake/Utils/FindPkgMacros.cmake +index 374f84b..dc7066d 100644 +--- a/CMake/Utils/FindPkgMacros.cmake ++++ b/CMake/Utils/FindPkgMacros.cmake +@@ -79,15 +79,21 @@ endmacro (use_pkgconfig) + + # Couple a set of release AND debug libraries (or frameworks) + macro(make_library_set PREFIX) +- if (${PREFIX}_FWK) +- set(${PREFIX} ${${PREFIX}_FWK}) +- elseif (${PREFIX}_REL AND ${PREFIX}_DBG) +- set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG}) +- elseif (${PREFIX}_REL) +- set(${PREFIX} ${${PREFIX}_REL}) +- elseif (${PREFIX}_DBG) +- set(${PREFIX} ${${PREFIX}_DBG}) +- endif () ++ include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) ++ set(PREFIX_LIB "${PREFIX}_LIBRARY") ++ if (${PREFIX_LIB}_FWK) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_FWK}) ++ elseif (${PREFIX_LIB}_REL AND ${PREFIX_LIB}_DBG) ++ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL} CACHE STRING "") ++ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG} CACHE STRING "") ++ select_library_configurations(${PREFIX}) ++ elseif (${PREFIX_LIB}_REL) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_REL}) ++ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL}) ++ elseif (${PREFIX_LIB}_DBG) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_DBG}) ++ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG}) ++ endif() + endmacro(make_library_set) + + # Generate debug names from given release names +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3e09d2d..58968f0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -274,7 +274,7 @@ elseif(EMSCRIPTEN) + elseif (APPLE AND NOT APPLE_IOS) + + set(XCODE_ATTRIBUTE_SDKROOT macosx) +- if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") ++ if(1) + execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT) + string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") + else() +diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt +index bdb303d..d9cc221 100644 +--- a/Components/Overlay/CMakeLists.txt ++++ b/Components/Overlay/CMakeLists.txt +@@ -21,7 +21,7 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") + # setup target + add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES}) + set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION}) +-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB) ++target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE ${FREETYPE_LIBRARIES} ZLIB::ZLIB) + target_include_directories(OgreOverlay PUBLIC + "$" + $ +diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt +index 6ec4e34..cc9cb9d 100644 +--- a/OgreMain/CMakeLists.txt ++++ b/OgreMain/CMakeLists.txt +@@ -225,8 +225,6 @@ if (APPLE) + set_target_properties(OgreMain PROPERTIES + LINK_FLAGS "-framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo" + ) +- +- set(OGRE_OSX_BUILD_CONFIGURATION "$(PLATFORM_NAME)/$(CONFIGURATION)") + + if(OGRE_BUILD_LIBS_AS_FRAMEWORKS) + add_custom_command(TARGET OgreMain POST_BUILD +diff --git a/PlugIns/EXRCodec/CMakeLists.txt b/PlugIns/EXRCodec/CMakeLists.txt +index e9c936a..bb8747e 100644 +--- a/PlugIns/EXRCodec/CMakeLists.txt ++++ b/PlugIns/EXRCodec/CMakeLists.txt +@@ -16,7 +16,7 @@ target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES}) + target_include_directories(Codec_EXR PUBLIC + "$" + $) +-target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}/OpenEXR") ++target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}") + + ogre_config_framework(Codec_EXR) + ogre_config_plugin(Codec_EXR) diff --git a/ports/ogre-next/vcpkg.json b/ports/ogre-next/vcpkg.json new file mode 100644 index 00000000000000..a729f0bfd84319 --- /dev/null +++ b/ports/ogre-next/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "ogre-next", + "version-string": "2019-10-20", + "port-version": 2, + "description": "Ogre 2.1 & 2.2 - scene-oriented, flexible 3D engine written in C++", + "homepage": "https://github.com/OGRECave/ogre-next", + "dependencies": [ + "boost-date-time", + "boost-thread", + "freeimage", + "freetype", + "openvr", + "poco", + "rapidjson", + "sdl2", + "tbb", + "tinyxml", + "zlib", + "zziplib" + ], + "features": { + "csharp": { + "description": "Build csharp bindings" + }, + "d3d9": { + "description": "Build Direct3D9 RenderSystem" + }, + "java": { + "description": "Build Java (JNI) bindings" + }, + "python": { + "description": "Build Python bindings", + "dependencies": [ + "python3" + ] + } + } +} diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL deleted file mode 100644 index 2d870641e92d0d..00000000000000 --- a/ports/ogre/CONTROL +++ /dev/null @@ -1,18 +0,0 @@ -Source: ogre -Version: 1.12.0-2 -Build-Depends: freeimage, freetype, zlib, zziplib -Homepage: https://github.com/OGRECave/ogre -Description: 3D Object-Oriented Graphics Rendering Engine - -Feature: d3d9 -Description: Build Direct3D9 RenderSystem - -Feature: csharp -Description: Build csharp bindings - -Feature: java -Description: Build Java (JNI) bindings - -Feature: python -Description: Build Python bindings -Build-Depends: python3 diff --git a/ports/ogre/disable-dependency-qt.patch b/ports/ogre/disable-dependency-qt.patch new file mode 100644 index 00000000000000..f97bd256b7fba6 --- /dev/null +++ b/ports/ogre/disable-dependency-qt.patch @@ -0,0 +1,14 @@ +diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake +index 068dd27..721121b 100644 +--- a/CMake/Dependencies.cmake ++++ b/CMake/Dependencies.cmake +@@ -346,7 +346,9 @@ if(NOT ANDROID AND NOT EMSCRIPTEN) + ) + endif() + ++ if (0) + find_package(Qt5 COMPONENTS Core Gui QUIET) ++ endif() + macro_log_feature(Qt5_FOUND "Qt" "optional integration with the Qt Library for window creation and input" "http://www.qt.io/" FALSE "" "") + endif() + diff --git a/ports/ogre/fix-dependency.patch b/ports/ogre/fix-dependency.patch new file mode 100644 index 00000000000000..fd7076dd83ed5c --- /dev/null +++ b/ports/ogre/fix-dependency.patch @@ -0,0 +1,36 @@ +diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake +index 2ae0b66..e6c55cd 100644 +--- a/CMake/Dependencies.cmake ++++ b/CMake/Dependencies.cmake +@@ -242,7 +242,7 @@ find_package(FreeImage) + macro_log_feature(FreeImage_FOUND "freeimage" "Support for commonly used graphics image formats" "http://freeimage.sourceforge.net" FALSE "" "") + + # Find FreeType +-find_package(Freetype) ++find_package(freetype CONFIG REQUIRED) + macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" FALSE "" "") + + # Find X11 +@@ -310,11 +310,11 @@ find_package(SWIG 3.0.8 QUIET) + macro_log_feature(SWIG_FOUND "SWIG" "Language bindings (Python, Java, C#) for OGRE" "http://www.swig.org/" FALSE "" "") + + # pugixml +-find_package(pugixml QUIET) ++find_package(pugixml CONFIG REQUIRED) + macro_log_feature(pugixml_FOUND "pugixml" "Needed for XMLConverter and DotScene Plugin" "https://pugixml.org/" FALSE "" "") + + # Assimp +-find_package(ASSIMP QUIET) ++find_package(assimp CONFIG REQUIRED) + macro_log_feature(ASSIMP_FOUND "Assimp" "Needed for the AssimpLoader Plugin" "https://www.assimp.org/" FALSE "" "") + + if(ASSIMP_FOUND) +@@ -336,7 +336,7 @@ endif() + # Find sdl2 + if(NOT ANDROID AND NOT EMSCRIPTEN) + # find script does not work in cross compilation environment +- find_package(SDL2 QUIET) ++ find_package(SDL2 CONFIG REQUIRED) + macro_log_feature(SDL2_FOUND "SDL2" "Simple DirectMedia Library needed for input handling in samples" "https://www.libsdl.org/" FALSE "" "") + if(SDL2_FOUND AND NOT TARGET SDL2::SDL2) + add_library(SDL2::SDL2 INTERFACE IMPORTED) diff --git a/ports/ogre/fix-findimgui.patch b/ports/ogre/fix-findimgui.patch new file mode 100644 index 00000000000000..8e812d92652dbf --- /dev/null +++ b/ports/ogre/fix-findimgui.patch @@ -0,0 +1,65 @@ +diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt +index df8f32af4..42be1e8f2 100644 +--- a/Components/Overlay/CMakeLists.txt ++++ b/Components/Overlay/CMakeLists.txt +@@ -19,21 +19,8 @@ list(APPEND HEADER_FILES + file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") + + if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI) +- set(IMGUI_DIR "${PROJECT_BINARY_DIR}/imgui-1.77" CACHE PATH "") +- if(NOT EXISTS ${IMGUI_DIR}) +- message(STATUS "Dowloading imgui") +- file(DOWNLOAD +- https://github.com/ocornut/imgui/archive/v1.77.tar.gz +- ${PROJECT_BINARY_DIR}/imgui.tar.gz) +- execute_process(COMMAND ${CMAKE_COMMAND} +- -E tar xf imgui.tar.gz WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) +- endif() +- list(APPEND SOURCE_FILES +- ${IMGUI_DIR}/imgui.cpp +- ${IMGUI_DIR}/imgui_draw.cpp +- ${IMGUI_DIR}/imgui_widgets.cpp +- ${IMGUI_DIR}/imgui_demo.cpp +- ${IMGUI_DIR}/misc/freetype/imgui_freetype.cpp) ++ find_package(imgui CONFIG REQUIRED) ++ find_path(IMGUI_INCLUDE_DIR imgui.h) + else() + list(REMOVE_ITEM SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/OgreImGuiOverlay.cpp") + endif() +@@ -41,13 +28,17 @@ endif() + # setup target + add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES}) + set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION}) +-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE ${FREETYPE_LIBRARIES} ZLIB::ZLIB) ++if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI) ++ target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE freetype ZLIB::ZLIB imgui::imgui) ++else() ++ target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE freetype ZLIB::ZLIB) ++endif() + target_include_directories(OgreOverlay PUBLIC + "$" + $ + PRIVATE ${FREETYPE_INCLUDE_DIRS}) + +-if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI) ++if(0) + target_include_directories(OgreOverlay PUBLIC + PUBLIC "$" + PRIVATE "$") +diff --git "a/Components/Bites/CMakeLists.txt" "b/Components/Bites/CMakeLists.txt" +index 5d58a8d74..fe41e4a28 100644 +--- "a/Components/Bites/CMakeLists.txt" ++++ "b/Components/Bites/CMakeLists.txt" +@@ -152,6 +152,11 @@ elseif(NOT EMSCRIPTEN) + message(WARNING "SDL2 not found - no input handling and reduced window creation capabilites") + endif() + ++if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI) ++ find_package(imgui CONFIG REQUIRED) ++ target_link_libraries(OgreBites PRIVATE imgui::imgui) ++endif() ++ + generate_export_header(OgreBites + EXPORT_MACRO_NAME _OgreBitesExport + EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreBitesPrerequisites.h) + diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake index 9f21e1f53011c4..c14da2fac93b22 100644 --- a/ports/ogre/portfile.cmake +++ b/ports/ogre/portfile.cmake @@ -1,17 +1,22 @@ -include(vcpkg_common_functions) +if (EXISTS "${CURRENT_INSTALLED_DIR}/Media/HLMS/Blendfunctions_piece_fs.glslt") + message(FATAL_ERROR "FATAL ERROR: ogre-next and ogre are incompatible.") +endif() -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_TARGET_IS_WINDOWS) message("${PORT} currently requires the following library from the system package manager:\n Xaw\n\nIt can be installed on Ubuntu systems via apt-get install libxaw7-dev") endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OGRECave/ogre - REF c14f8847f743f4dc1b3abc947b1725c87d8b10ce - SHA512 a2fd7ffd653c1578bc860b58cf4c899f27cc967f75e2254dc3e372044f118d5951e42b35bfc711aa8996e1885f372d3cfa5a768b8674e0b3d844811990eb87fc + REF 7d0c8181ac43ad20bdba326abbd3deeddf310f0b #v1.12.9 + SHA512 f223075f49a2465cd5070f5efa796aa715f3ea2fefd578e4ec0a11be2fd3330922849ed804e1df004209abafaa7b24ff42432dd79f336a56063e3cf38ae0e8c9 HEAD_REF master PATCHES toolchain_fixes.patch + fix-dependency.patch + fix-findimgui.patch + disable-dependency-qt.patch ) file(REMOVE "${SOURCE_PATH}/CMake/Packages/FindOpenEXR.cmake") @@ -24,29 +29,19 @@ endif() # Configure features -if("d3d9" IN_LIST FEATURES) - set(WITH_D3D9 ON) -else() - set(WITH_D3D9 OFF) -endif() - -if("java" IN_LIST FEATURES) - set(WITH_JAVA ON) -else() - set(WITH_JAVA OFF) -endif() - -if("python" IN_LIST FEATURES) - set(WITH_PYTHON ON) -else() - set(WITH_PYTHON OFF) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + d3d9 OGRE_BUILD_RENDERSYSTEM_D3D9 + java OGRE_BUILD_COMPONENT_JAVA + python OGRE_BUILD_COMPONENT_PYTHON + csharp OGRE_BUILD_COMPONENT_CSHARP + overlay OGRE_BUILD_COMPONENT_OVERLAY + zziplib OGRE_CONFIG_ENABLE_ZIP + strict OGRE_RESOURCEMANAGER_STRICT +) -if("csharp" IN_LIST FEATURES) - set(WITH_CSHARP ON) -else() - set(WITH_CSHARP OFF) -endif() +# OGRE_RESOURCEMANAGER_STRICT need to be 0 for OFF and 1 for ON, because it is used 'as is' in sources +string(REPLACE "OGRE_RESOURCEMANAGER_STRICT=ON" "OGRE_RESOURCEMANAGER_STRICT=1" FEATURE_OPTIONS "${FEATURE_OPTIONS}") +string(REPLACE "OGRE_RESOURCEMANAGER_STRICT=OFF" "OGRE_RESOURCEMANAGER_STRICT=0" FEATURE_OPTIONS "${FEATURE_OPTIONS}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -72,11 +67,9 @@ vcpkg_configure_cmake( -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON -DOGRE_BUILD_RENDERSYSTEM_GLES=OFF -DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF + -DFREETYPE_FOUND=ON # Optional stuff - -DOGRE_BUILD_COMPONENT_JAVA=${WITH_JAVA} - -DOGRE_BUILD_COMPONENT_PYTHON=${WITH_PYTHON} - -DOGRE_BUILD_COMPONENT_CSHARP=${WITH_CSHARP} - -DOGRE_BUILD_RENDERSYSTEM_D3D9=${WITH_D3D9} + ${FEATURE_OPTIONS} # vcpkg specific stuff -DOGRE_CMAKE_DIR=share/ogre ) @@ -105,7 +98,7 @@ endif() #Remove OgreMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol #manual-link subfolder is here to the rescue! -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_WINDOWS) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -132,6 +125,6 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/ogre/toolchain_fixes.patch b/ports/ogre/toolchain_fixes.patch index 22b2e69c727b42..c363a34d7db565 100644 --- a/ports/ogre/toolchain_fixes.patch +++ b/ports/ogre/toolchain_fixes.patch @@ -1,101 +1,49 @@ diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt -index a7a3796..7e41f57 100755 +index a7a3796..2e21403 100644 --- a/CMake/CMakeLists.txt +++ b/CMake/CMakeLists.txt -@@ -13,13 +13,15 @@ +@@ -13,10 +13,12 @@ # directory, but can also be used for custom projects. ############################################################# +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") +if(NOT DEFINED OGRE_CMAKE_DIR) - if(WIN32 OR APPLE) - set(OGRE_CMAKE_DIR "CMake") - else() - set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") - endif() -+endif() - --set(INST_FILES Utils/FindPkgMacros.cmake) -+set(INST_FILES Utils/FindPkgMacros.cmake) - - if (OGRE_CONFIG_THREAD_PROVIDER STREQUAL "poco") - set(INST_FILES ${INST_FILES} Packages/FindPOCO.cmake) -diff --git a/CMake/ConfigureBuild.cmake b/CMake/ConfigureBuild.cmake -index 26c384f..131e238 100644 ---- a/CMake/ConfigureBuild.cmake -+++ b/CMake/ConfigureBuild.cmake -@@ -68,7 +68,7 @@ if (OGRE_CONFIG_THREADS) - ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() endif() --set(OGRE_ASSERT_MODE 1 CACHE STRING -+set(OGRE_ASSERT_MODE 1 CACHE STRING - "Enable Ogre asserts and exceptions. Possible values: - 0 - Standard asserts in debug builds, nothing in release builds. - 1 - Standard asserts in debug builds, exceptions in release builds. -@@ -197,7 +197,7 @@ if (UNIX) - configure_file(${OGRE_TEMPLATES_DIR}/OGRE-MeshLodGenerator.pc.in ${PROJECT_BINARY_DIR}/pkgconfig/OGRE-MeshLodGenerator.pc @ONLY) - install(FILES ${PROJECT_BINARY_DIR}/pkgconfig/OGRE-MeshLodGenerator.pc DESTINATION ${OGRE_LIB_DIRECTORY}/pkgconfig) - endif () -- -+ - if (OGRE_BUILD_COMPONENT_TERRAIN) - if (OGRE_BUILD_COMPONENT_PAGING) - set(OGRE_PAGING_ADDITIONAL_PACKAGES ", OGRE-Paging = ${OGRE_VERSION}") + set(INST_FILES Utils/FindPkgMacros.cmake) diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake -index 783755e..bd7fd3d 100644 +index 06a055b..09d10bd 100644 --- a/CMake/InstallResources.cmake +++ b/CMake/InstallResources.cmake -@@ -131,7 +131,7 @@ configure_file(${OGRE_TEMPLATES_DIR}/tests.cfg.in ${PROJECT_BINARY_DIR}/inst/bin - - - # install resource files --install(FILES -+install(FILES - ${PROJECT_BINARY_DIR}/inst/bin/resources.cfg - ${PROJECT_BINARY_DIR}/inst/bin/plugins.cfg - ${PROJECT_BINARY_DIR}/inst/bin/samples.cfg -@@ -208,17 +208,19 @@ endif () +@@ -204,10 +204,12 @@ endif () # Create the CMake package files include(CMakePackageConfigHelpers) +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") +if(NOT DEFINED OGRE_CMAKE_DIR) - if(WIN32 OR APPLE) - set(OGRE_CMAKE_DIR "CMake") - else() - set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() endif() -+endif() - configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake - INSTALL_DESTINATION ${OGRE_CMAKE_DIR} - PATH_VARS CMAKE_INSTALL_PREFIX) - write_basic_package_version_file( -- ${PROJECT_BINARY_DIR}/cmake/OGREConfigVersion.cmake -- VERSION ${OGRE_VERSION} -+ ${PROJECT_BINARY_DIR}/cmake/OGREConfigVersion.cmake -+ VERSION ${OGRE_VERSION} - COMPATIBILITY SameMajorVersion) - install(FILES - ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake -@@ -228,4 +230,4 @@ install(FILES - install(EXPORT OgreTargetsRelease CONFIGURATIONS Release None "" DESTINATION ${OGRE_CMAKE_DIR} FILE OgreTargets.cmake) - install(EXPORT OgreTargetsRelWithDebInfo CONFIGURATIONS RelWithDebInfo DESTINATION ${OGRE_CMAKE_DIR} FILE OgreTargets.cmake) - install(EXPORT OgreTargetsMinSizeRel CONFIGURATIONS MinSizeRel DESTINATION ${OGRE_CMAKE_DIR} FILE OgreTargets.cmake) --install(EXPORT OgreTargetsDebug CONFIGURATIONS Debug DESTINATION ${OGRE_CMAKE_DIR} FILE OgreTargets.cmake) -\ No newline at end of file -+install(EXPORT OgreTargetsDebug CONFIGURATIONS Debug DESTINATION ${OGRE_CMAKE_DIR} FILE OgreTargets.cmake) + if(WIN32) + set(OGRE_PLUGIN_DIR_CMAKE "bin") diff --git a/CMake/Packages/FindCg.cmake b/CMake/Packages/FindCg.cmake -index 4501cf9..e91bfd0 100644 +index 4501cf9..7eb57c3 100644 --- a/CMake/Packages/FindCg.cmake +++ b/CMake/Packages/FindCg.cmake -@@ -11,7 +11,7 @@ - # Once done, this will define - # - # Cg_FOUND - system has Cg --# Cg_INCLUDE_DIRS - the Cg include directories -+# Cg_INCLUDE_DIRS - the Cg include directories - # Cg_LIBRARIES - link these to use Cg - - include(FindPkgMacros) @@ -56,7 +56,7 @@ endif() find_library(Cg_LIBRARY_REL NAMES ${Cg_LIBRARY_NAMES} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) @@ -106,19 +54,10 @@ index 4501cf9..e91bfd0 100644 if (WIN32) if (CMAKE_CL_64) diff --git a/CMake/Packages/FindFreeImage.cmake b/CMake/Packages/FindFreeImage.cmake -index 7c89ec5..445d86a 100644 +index 7c89ec5..d8314f0 100644 --- a/CMake/Packages/FindFreeImage.cmake +++ b/CMake/Packages/FindFreeImage.cmake -@@ -11,7 +11,7 @@ - # Once done, this will define - # - # FreeImage_FOUND - system has FreeImage --# FreeImage_INCLUDE_DIRS - the FreeImage include directories -+# FreeImage_INCLUDE_DIRS - the FreeImage include directories - # FreeImage_LIBRARIES - link these to use FreeImage - - include(FindPkgMacros) -@@ -43,7 +43,6 @@ find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${FreeImage_INC_SEARCH_P +@@ -43,7 +43,7 @@ find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${FreeImage_INC_SEARCH_P find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) @@ -126,21 +65,12 @@ index 7c89ec5..445d86a 100644 +make_library_set(FreeImage) findpkg_finish(FreeImage) -- + diff --git a/CMake/Packages/FindGLSLOptimizer.cmake b/CMake/Packages/FindGLSLOptimizer.cmake -index dd4b179..8e51d2f 100644 +index dd4b179..6f158fc 100644 --- a/CMake/Packages/FindGLSLOptimizer.cmake +++ b/CMake/Packages/FindGLSLOptimizer.cmake -@@ -11,7 +11,7 @@ - # Once done, this will define - # - # GLSL_Optimizer_FOUND - system has GLSL_Optimizer --# GLSL_Optimizer_INCLUDE_DIRS - the GLSL_Optimizer include directories -+# GLSL_Optimizer_INCLUDE_DIRS - the GLSL_Optimizer include directories - # GLSL_Optimizer_LIBRARIES - link these to use GLSL_Optimizer - - include(FindPkgMacros) -@@ -38,8 +38,7 @@ findpkg_framework(GLSL_Optimizer) +@@ -38,7 +38,7 @@ findpkg_framework(GLSL_Optimizer) find_path(GLSL_Optimizer_INCLUDE_DIR NAMES glsl_optimizer.h HINTS ${GLSL_Optimizer_INC_SEARCH_PATH} ${GLSL_Optimizer_PKGC_INCLUDE_DIRS} PATH_SUFFIXES GLSL_Optimizer) find_library(GLSL_Optimizer_LIBRARY_REL NAMES ${GLSL_Optimizer_LIBRARY_NAMES} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) find_library(GLSL_Optimizer_LIBRARY_DBG NAMES ${GLSL_Optimizer_LIBRARY_NAMES_DBG} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) @@ -149,21 +79,11 @@ index dd4b179..8e51d2f 100644 findpkg_finish(GLSL_Optimizer) add_parent_dir(GLSL_Optimizer_INCLUDE_DIRS GLSL_Optimizer_INCLUDE_DIR) -- diff --git a/CMake/Packages/FindHLSL2GLSL.cmake b/CMake/Packages/FindHLSL2GLSL.cmake -index 7125895..f73c928 100644 +index 7125895..13a306f 100644 --- a/CMake/Packages/FindHLSL2GLSL.cmake +++ b/CMake/Packages/FindHLSL2GLSL.cmake -@@ -11,7 +11,7 @@ - # Once done, this will define - # - # HLSL2GLSL_FOUND - system has HLSL2GLSL --# HLSL2GLSL_INCLUDE_DIRS - the HLSL2GLSL include directories -+# HLSL2GLSL_INCLUDE_DIRS - the HLSL2GLSL include directories - # HLSL2GLSL_LIBRARIES - link these to use HLSL2GLSL - - include(FindPkgMacros) -@@ -38,8 +38,7 @@ findpkg_framework(HLSL2GLSL) +@@ -38,7 +38,7 @@ findpkg_framework(HLSL2GLSL) find_path(HLSL2GLSL_INCLUDE_DIR NAMES hlsl2glsl.h HINTS ${HLSL2GLSL_INC_SEARCH_PATH} ${HLSL2GLSL_PKGC_INCLUDE_DIRS} PATH_SUFFIXES HLSL2GLSL) find_library(HLSL2GLSL_LIBRARY_REL NAMES ${HLSL2GLSL_LIBRARY_NAMES} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) find_library(HLSL2GLSL_LIBRARY_DBG NAMES ${HLSL2GLSL_LIBRARY_NAMES_DBG} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) @@ -172,55 +92,24 @@ index 7125895..f73c928 100644 findpkg_finish(HLSL2GLSL) add_parent_dir(HLSL2GLSL_INCLUDE_DIRS HLSL2GLSL_INCLUDE_DIR) -- diff --git a/CMake/Packages/FindNVAPI.cmake b/CMake/Packages/FindNVAPI.cmake -index 2b9deba..6d8fb37 100644 +index 95c70cd..893ce01 100644 --- a/CMake/Packages/FindNVAPI.cmake +++ b/CMake/Packages/FindNVAPI.cmake -@@ -11,7 +11,7 @@ - # Once done, this will define - # - # NVAPI_FOUND - system has NVAPI --# NVAPI_INCLUDE_DIRS - the NVAPI include directories -+# NVAPI_INCLUDE_DIRS - the NVAPI include directories - # NVAPI_LIBRARIES - link these to use NVAPI - - include(FindPkgMacros) @@ -44,7 +44,7 @@ findpkg_framework(NVAPI) - find_path(NVAPI_INCLUDE_DIR NAMES nvapi.h HINTS ${NVAPI_FRAMEWORK_INCLUDES} ${NVAPI_INC_SEARCH_PATH} ${NVAPI_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NVAPI) - find_library(NVAPI_LIBRARY_REL NAMES ${NVAPI_LIBRARY_NAMES} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel) - find_library(NVAPI_LIBRARY_DBG NAMES ${NVAPI_LIBRARY_NAMES_DBG} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug) --make_library_set(NVAPI_LIBRARY) -+make_library_set(NVAPI) - - findpkg_finish(NVAPI) --add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR) + find_path(NVAPI_INCLUDE_DIR NAMES nvapi.h HINTS ${NVAPI_FRAMEWORK_INCLUDES} ${NVAPI_INC_SEARCH_PATH} ${NVAPI_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NVAPI) + find_library(NVAPI_LIBRARY_REL NAMES ${NVAPI_LIBRARY_NAMES} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel) + find_library(NVAPI_LIBRARY_DBG NAMES ${NVAPI_LIBRARY_NAMES_DBG} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug) +-make_library_set(NVAPI_LIBRARY) ++make_library_set(NVAPI) + + findpkg_finish(NVAPI) + add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR) \ No newline at end of file -+add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR) diff --git a/CMake/Packages/FindPOCO.cmake b/CMake/Packages/FindPOCO.cmake -index 6b6d7fa..c2cb80e 100644 +index 6b6d7fa..3667b8b 100644 --- a/CMake/Packages/FindPOCO.cmake +++ b/CMake/Packages/FindPOCO.cmake -@@ -11,7 +11,7 @@ - # Once done, this will define - # - # POCO_FOUND - system has POCO --# POCO_INCLUDE_DIRS - the POCO include directories -+# POCO_INCLUDE_DIRS - the POCO include directories - # POCO_LIBRARIES - link these to use POCO - - include(FindPkgMacros) -@@ -23,8 +23,8 @@ getenv_path(POCO_ROOT) - getenv_path(POCO_BASE) - - # construct search paths --set(POCO_PREFIX_PATH -- ${POCO_HOME} ${ENV_POCO_HOME} -+set(POCO_PREFIX_PATH -+ ${POCO_HOME} ${ENV_POCO_HOME} - ${POCO_ROOT} ${ENV_POCO_ROOT} - ${POCO_BASE} ${ENV_POCO_BASE} - ) @@ -50,7 +50,7 @@ findpkg_framework(POCO) find_path(POCO_INCLUDE_DIR NAMES Poco/Foundation.h HINTS ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Foundation/include) find_library(POCO_LIBRARY_REL NAMES ${POCO_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) @@ -257,52 +146,18 @@ index 6b6d7fa..c2cb80e 100644 findpkg_finish(POCO_NetSSL) # Look for Poco's XML package -@@ -96,6 +96,5 @@ get_debug_names(POCO_XML_LIBRARY_NAMES) +@@ -96,6 +96,6 @@ get_debug_names(POCO_XML_LIBRARY_NAMES) find_path(POCO_XML_INCLUDE_DIR NAMES Poco/XML/XML.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES XML/include) find_library(POCO_XML_LIBRARY_REL NAMES ${POCO_XML_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) find_library(POCO_XML_LIBRARY_DBG NAMES ${POCO_XML_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) -make_library_set(POCO_XML_LIBRARY) +make_library_set(POCO_XML) findpkg_finish(POCO_XML) -- + diff --git a/CMake/Packages/FindTBB.cmake b/CMake/Packages/FindTBB.cmake -index 0c48510..7f0c8f6 100644 +index 0c48510..c121966 100644 --- a/CMake/Packages/FindTBB.cmake +++ b/CMake/Packages/FindTBB.cmake -@@ -11,7 +11,7 @@ - # Once done, this will define - # - # TBB_FOUND - system has TBB --# TBB_INCLUDE_DIRS - the TBB include directories -+# TBB_INCLUDE_DIRS - the TBB include directories - # TBB_LIBRARIES - link these to use TBB - - include(FindPkgMacros) -@@ -23,8 +23,8 @@ getenv_path(TBB_ROOT) - getenv_path(TBB_BASE) - - # construct search paths --set(TBB_PREFIX_PATH -- ${TBB_HOME} ${ENV_TBB_HOME} -+set(TBB_PREFIX_PATH -+ ${TBB_HOME} ${ENV_TBB_HOME} - ${TBB_ROOT} ${ENV_TBB_ROOT} - ${TBB_BASE} ${ENV_TBB_BASE} - ) -@@ -68,11 +68,11 @@ if (WIN32 AND MSVC) - endif () - if (MSVC_VERSION EQUAL 1900) - set(COMPILER_PREFIX "vc13") -- endif () -+ endif () - if (MSVC_VERSION EQUAL 1911) - set(COMPILER_PREFIX "vc14") - endif () -- -+ - # for each prefix path, add ia32/64\${COMPILER_PREFIX}\lib to the lib search path - foreach (dir ${TBB_PREFIX_PATH}) - if (CMAKE_CL_64) @@ -104,7 +104,7 @@ findpkg_framework(TBB) find_path(TBB_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS}) find_library(TBB_LIBRARY_REL NAMES ${TBB_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) @@ -329,19 +184,10 @@ index 0c48510..7f0c8f6 100644 +make_library_set(TBB_MALLOC_PROXY) findpkg_finish(TBB_MALLOC_PROXY) diff --git a/CMake/Packages/FindZZip.cmake b/CMake/Packages/FindZZip.cmake -index e97951e..1c7cf00 100644 +index e97951e..54c2567 100644 --- a/CMake/Packages/FindZZip.cmake +++ b/CMake/Packages/FindZZip.cmake -@@ -11,7 +11,7 @@ - # Once done, this will define - # - # ZZip_FOUND - system has ZZip --# ZZip_INCLUDE_DIRS - the ZZip include directories -+# ZZip_INCLUDE_DIRS - the ZZip include directories - # ZZip_LIBRARIES - link these to use ZZip - - include(FindPkgMacros) -@@ -39,12 +39,11 @@ use_pkgconfig(ZZip_PKGC zziplib) +@@ -39,12 +39,12 @@ use_pkgconfig(ZZip_PKGC zziplib) findpkg_framework(ZZip) @@ -355,66 +201,6 @@ index e97951e..1c7cf00 100644 +make_library_set(ZZip) findpkg_finish(ZZip) -- -diff --git a/CMake/Templates/OGREConfig.cmake.in b/CMake/Templates/OGREConfig.cmake.in -index 79c5394..7b22a0d 100644 ---- a/CMake/Templates/OGREConfig.cmake.in -+++ b/CMake/Templates/OGREConfig.cmake.in -@@ -10,12 +10,12 @@ - # Find OGRE includes and library - # - # This module defines --# OGRE_INCLUDE_DIRS - the OGRE include directories -+# OGRE_INCLUDE_DIRS - the OGRE include directories - # OGRE_LIBRARIES - link these to use the OGRE - # OGRE_LIBRARY_DIRS, the location of the libraries - # OGRE_STATIC - whther ogre was build as static lib - # OGRE_${COMPONENT}_FOUND - ${COMPONENT} is available --# OGRE_${COMPONENT}_LIBRARIES - link these to only use ${COMPONENT} -+# OGRE_${COMPONENT}_LIBRARIES - link these to only use ${COMPONENT} - # OGRE_PLUGIN_DIR - The directory where the OGRE plugins are located - # OGRE_MEDIA_DIR - The directory where the OGRE sample media is located - # OGRE_CONFIG_DIR - The directory where the OGRE config files are located -@@ -25,7 +25,7 @@ - set(OGRE_STATIC @OGRE_STATIC@) - set(OGRE_MEDIA_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/@OGRE_MEDIA_PATH@") - set(OGRE_PLUGIN_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/lib/OGRE") --set(OGRE_CONFIG_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/@OGRE_CFG_INSTALL_PATH@") -+set(OGRE_CONFIG_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/@OGRE_CFG_INSTALL_PATH@") - - set(OGRE_PREFIX_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@") - get_filename_component(OGRE_LIBRARY_DIRS "${OGRE_PREFIX_DIR}/lib" ABSOLUTE) -@@ -47,7 +47,7 @@ set(OGRE_PLUGINS) - macro(ogre_declare_component COMPONENT) - set(OGRE_${COMPONENT}_FOUND TRUE) - set(OGRE_${COMPONENT}_LIBRARIES Ogre${COMPONENT}) # backwards compatibility -- -+ - list(APPEND OGRE_COMPONENTS ${COMPONENT}) - list(APPEND OGRE_LIBRARIES Ogre${COMPONENT}) - endmacro() -@@ -55,11 +55,11 @@ endmacro() - macro(ogre_declare_plugin TYPE COMPONENT) - set(OGRE_${TYPE}_${COMPONENT}_FOUND TRUE) - set(OGRE_${TYPE}_${COMPONENT}_LIBRARIES ${TYPE}_${COMPONENT}) -- -+ - if(@OGRE_STATIC@) - list(APPEND OGRE_LIBRARIES ${TYPE}_${COMPONENT}) - endif() -- -+ - list(APPEND OGRE_PLUGINS ${TYPE}_${COMPONENT}) - endmacro() - -@@ -149,7 +149,7 @@ endif() - cmake_policy(POP) - - if(@OGRE_STATIC@) -- list(APPEND OGRE_LIBRARIES OgreGLSupport@OGRE_LIB_SUFFIX@ @CMAKE_DL_LIBS@) # glXXw uses dlopen -+ list(APPEND OGRE_LIBRARIES OgreGLSupport @CMAKE_DL_LIBS@) # glXXw uses dlopen - list(APPEND OGRE_LIBRARY_DIRS "${OGRE_LIBRARY_DIRS}/OGRE") # plugins folder - endif() diff --git a/CMake/Utils/FindPkgMacros.cmake b/CMake/Utils/FindPkgMacros.cmake index 374f84b..dc7066d 100644 @@ -452,150 +238,24 @@ index 374f84b..dc7066d 100644 # Generate debug names from given release names diff --git a/CMakeLists.txt b/CMakeLists.txt -index d2819f0..f40239f 100644 +index 1602572..9fddbe7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -142,7 +142,7 @@ if (MSVC) - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /bigobj") - endif () - -- if (OGRE_PROJECT_FOLDERS) -+ if (OGRE_PROJECT_FOLDERS) - # Turn on the ability to create folders to organize projects (.vcproj) - # It creates "CMakePredefinedTargets" folder by default and adds CMake - # defined projects like INSTALL.vcproj and ZERO_CHECK.vcproj -@@ -274,12 +274,8 @@ elseif(EMSCRIPTEN) +@@ -271,7 +271,7 @@ elseif(EMSCRIPTEN) elseif (APPLE AND NOT APPLE_IOS) set(XCODE_ATTRIBUTE_SDKROOT macosx) - if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") ++ if(1) execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT) string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") -- else() -- set(CMAKE_OSX_SYSROOT macosx) -- endif() - - # Make sure that the OpenGL render system is selected for non-iOS Apple builds - set(OGRE_BUILD_RENDERSYSTEM_GLES2 FALSE) -@@ -310,7 +306,7 @@ include(Dependencies) - # Customise what to build - option(OGRE_STATIC "Static build" FALSE) - option(OGRE_ENABLE_PRECOMPILED_HEADERS "Use precompiled headers to speed up build" TRUE) --set(OGRE_RESOURCEMANAGER_STRICT "2" CACHE STRING -+set(OGRE_RESOURCEMANAGER_STRICT "2" CACHE STRING - "Make ResourceManager strict for faster operation. Possible values: - 0 - OFF search in all groups twice - for case sensitive and insensitive lookup [DEPRECATED] - 1 - PEDANTIC require an explicit resource group. Case sensitive lookup. -@@ -352,7 +348,7 @@ cmake_dependent_option(OGRE_BUILD_LIBS_AS_FRAMEWORKS "Build frameworks for libra - option(OGRE_BUILD_TESTS "Build the unit tests & PlayPen" FALSE) - option(OGRE_CONFIG_DOUBLE "Use doubles instead of floats in Ogre" FALSE) - option(OGRE_CONFIG_NODE_INHERIT_TRANSFORM "Tells the node whether it should inherit full transform from it's parent node or derived position, orientation and scale" FALSE) --set(OGRE_CONFIG_THREADS "3" CACHE STRING -+set(OGRE_CONFIG_THREADS "3" CACHE STRING - "Enable Ogre thread safety support for multithreading. Possible values: - 0 - no thread safety. DefaultWorkQueue is not threaded. - 1 - background resource preparation and loading is thread safe. Threaded DefaultWorkQueue. [DEPRECATED] -diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt -index bdb303d..e8031d1 100644 ---- a/Components/Overlay/CMakeLists.txt -+++ b/Components/Overlay/CMakeLists.txt -@@ -13,7 +13,7 @@ - - # define header and source files for the library - file(GLOB HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") --list(APPEND HEADER_FILES -+list(APPEND HEADER_FILES - ${PROJECT_BINARY_DIR}/include/OgreOverlayPrerequisites.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/OgreOverlay.i) - file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") -@@ -21,17 +21,17 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") - # setup target - add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES}) - set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION}) --target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB) --target_include_directories(OgreOverlay PUBLIC -+target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE ${FREETYPE_LIBRARIES} ZLIB::ZLIB) -+target_include_directories(OgreOverlay PUBLIC - "$" - $ - PRIVATE ${FREETYPE_INCLUDE_DIRS}) - --generate_export_header(OgreOverlay -+generate_export_header(OgreOverlay - EXPORT_MACRO_NAME _OgreOverlayExport - EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreOverlayPrerequisites.h) - --# install -+# install - ogre_config_framework(OgreOverlay) - ogre_config_component(OgreOverlay) - -@@ -40,4 +40,4 @@ install(FILES ${HEADER_FILES} - ) - install(FILES "${PROJECT_SOURCE_DIR}/Media/packs/profiler.zip" - DESTINATION "${OGRE_MEDIA_PATH}/packs/" --) -\ No newline at end of file -+) -diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt -index 6ec4e34..2803a8a 100644 ---- a/OgreMain/CMakeLists.txt -+++ b/OgreMain/CMakeLists.txt -@@ -188,21 +188,21 @@ if (WINDOWS_STORE OR WINDOWS_PHONE) - set_target_properties(OgreMain PROPERTIES VS_WINRT_COMPONENT "true") - endif () - --generate_export_header(OgreMain -+generate_export_header(OgreMain - EXPORT_MACRO_NAME _OgreExport - NO_EXPORT_MACRO_NAME _OgrePrivate - DEPRECATED_MACRO_NAME OGRE_DEPRECATED - EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreExports.h) - --target_include_directories(OgreMain PUBLIC -- "$" -+target_include_directories(OgreMain PUBLIC -+ "$" - "$" - $ - PRIVATE "${OGRE_PROFILING_REMOTERY_PATH}") - - # In visual studio 2010 - 64 bit we get this error: "LINK : fatal error LNK1210: exceeded internal ILK size limit; link with /INCREMENTAL:NO" - if(WIN32 AND MSVC10 AND CMAKE_CL_64) -- set_target_properties(OgreMain PROPERTIES -+ set_target_properties(OgreMain PROPERTIES - VERSION ${OGRE_SOVERSION} - LINK_FLAGS "/INCREMENTAL:NO" - ) -@@ -211,7 +211,7 @@ else() - endif() - - if(OGRE_GCC_VERSION VERSION_EQUAL 4.8 OR OGRE_GCC_VERSION VERSION_GREATER 4.8) -- if(CMAKE_SYSTEM_NAME STREQUAL "Android") -+ if(CMAKE_SYSTEM_NAME STREQUAL "Android") - list(APPEND LIBRARIES "atomic") - else() - list(APPEND LIBRARIES "-latomic") -@@ -226,8 +226,7 @@ if (APPLE) - LINK_FLAGS "-framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo" - ) - -- set(OGRE_OSX_BUILD_CONFIGURATION "$(PLATFORM_NAME)/$(CONFIGURATION)") -- -+ - if(OGRE_BUILD_LIBS_AS_FRAMEWORKS) - add_custom_command(TARGET OgreMain POST_BUILD - COMMAND mkdir ARGS -p ${PROJECT_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/Ogre.framework/Headers/Threading + else() diff --git a/PlugIns/EXRCodec/CMakeLists.txt b/PlugIns/EXRCodec/CMakeLists.txt -index e9c936a..a83d793 100644 +index e9c936a..bb8747e 100644 --- a/PlugIns/EXRCodec/CMakeLists.txt +++ b/PlugIns/EXRCodec/CMakeLists.txt -@@ -13,14 +13,14 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") - - add_library(Codec_EXR ${OGRE_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES}) - target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES}) --target_include_directories(Codec_EXR PUBLIC -+target_include_directories(Codec_EXR PUBLIC +@@ -16,7 +16,7 @@ target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES}) + target_include_directories(Codec_EXR PUBLIC "$" $) -target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}/OpenEXR") @@ -603,33 +263,3 @@ index e9c936a..a83d793 100644 ogre_config_framework(Codec_EXR) ogre_config_plugin(Codec_EXR) --generate_export_header(Codec_EXR -+generate_export_header(Codec_EXR - EXPORT_MACRO_NAME _OgreEXRPluginExport - EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreEXRCodecExports.h) - install(FILES ${HEADER_FILES} DESTINATION include/OGRE/Plugins/EXRCodec) -diff --git a/RenderSystems/GL3Plus/CMakeLists.txt b/RenderSystems/GL3Plus/CMakeLists.txt -index ba55b43..66c2758 100644 ---- a/RenderSystems/GL3Plus/CMakeLists.txt -+++ b/RenderSystems/GL3Plus/CMakeLists.txt -@@ -21,12 +21,12 @@ set(HEADER_FILES ${HEADER_FILES} ${GLSL_HEADERS}) - add_definitions(${OGRE_VISIBILITY_FLAGS}) - - if(OGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT) -- set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/OgreGL3PlusStateCacheManager.cpp -+ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/OgreGL3PlusStateCacheManager.cpp - PROPERTIES COMPILE_DEFINITIONS OGRE_ENABLE_STATE_CACHE) - endif() - add_library(RenderSystem_GL3Plus ${OGRE_LIB_TYPE} ${HEADER_FILES} ${GLSL_SOURCE} ${SOURCE_FILES}) - target_link_libraries(RenderSystem_GL3Plus OgreMain OgreGLSupport ${OPENGL_gl_LIBRARY} ${CMAKE_DL_LIBS}) --target_include_directories(RenderSystem_GL3Plus PUBLIC -+target_include_directories(RenderSystem_GL3Plus PUBLIC - "$" - "$" - $ -@@ -44,4 +44,4 @@ ogre_config_plugin(RenderSystem_GL3Plus) - - install(FILES ${HEADER_FILES} ${GLSUPPORT_HEADERS} DESTINATION include/OGRE/RenderSystems/GL3Plus) - install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/GL DESTINATION include/OGRE/RenderSystems/GL3Plus) --install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/GLSL/ DESTINATION include/OGRE/RenderSystems/GL3Plus) -+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/GLSL DESTINATION include/OGRE/RenderSystems/GL3Plus) diff --git a/ports/ogre/vcpkg.json b/ports/ogre/vcpkg.json new file mode 100644 index 00000000000000..d084653e719bfb --- /dev/null +++ b/ports/ogre/vcpkg.json @@ -0,0 +1,68 @@ +{ + "name": "ogre", + "version-string": "1.12.9", + "port-version": 5, + "description": "3D Object-Oriented Graphics Rendering Engine", + "homepage": "https://github.com/OGRECave/ogre", + "dependencies": [ + "pugixml", + "sdl2", + "zlib" + ], + "default-features": [ + "assimp", + "freeimage", + "overlay", + "zziplib" + ], + "features": { + "assimp": { + "description": "Use assimp", + "dependencies": [ + "assimp" + ] + }, + "csharp": { + "description": "Build csharp bindings" + }, + "d3d9": { + "description": "Build Direct3D9 RenderSystem" + }, + "freeimage": { + "description": "Build with FreeImage support", + "dependencies": [ + "freeimage" + ] + }, + "java": { + "description": "Build Java (JNI) bindings" + }, + "overlay": { + "description": "Build overlay component", + "dependencies": [ + "freetype", + { + "name": "imgui", + "features": [ + "freetype" + ] + } + ] + }, + "python": { + "description": "Build Python bindings", + "dependencies": [ + "python3" + ] + }, + "strict": { + "description": "Force Ogre resource manager to be strict with group names and resource names" + }, + "zziplib": { + "description": "Build with zziplib support (GPL)", + "dependencies": [ + "zziplib" + ] + } + } +} diff --git a/ports/ois/portfile.cmake b/ports/ois/portfile.cmake new file mode 100644 index 00000000000000..84859bb096aed5 --- /dev/null +++ b/ports/ois/portfile.cmake @@ -0,0 +1,29 @@ +# Automatically fail port install for UWP and ARM. Unsure if it is +# supported by library. See here: https://github.com/wgois/OIS/issues/57 +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wgois/OIS + REF v1.5 + SHA512 5ab1dda7c25c1959ccbbb758ea3fda36bd62ad65f46e2c6b418317a5eb39e0bace52a44ae079dfb69fc58c90df54f8e50d589daae1100ec615325363c9d77513 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Include files should not be duplicated into the /debug/include directory +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ois/vcpkg.json b/ports/ois/vcpkg.json new file mode 100644 index 00000000000000..2b6b7140f896fc --- /dev/null +++ b/ports/ois/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ois", + "version-string": "1.5", + "port-version": 2, + "description": "Cross Platform Object Oriented Input Lib System. Meant to be very robust and compatiable with many systems and operating systems.", + "homepage": "https://wgois.github.io/OIS/" +} diff --git a/ports/ompl/0001_Export_targets.patch b/ports/ompl/0001_Export_targets.patch new file mode 100644 index 00000000000000..6d599aec32ea0f --- /dev/null +++ b/ports/ompl/0001_Export_targets.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a9bb05f..31fab8c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -215,6 +215,10 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/omplConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/omplConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ompl/cmake + COMPONENT ompl) ++install(EXPORT ompl ++ DESTINATION "share/ompl" ++ FILE ompl-targets.cmake ++) + + # script to install ompl on Ubuntu + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/install-ompl-ubuntu.sh.in" +diff --git a/src/ompl/CMakeLists.txt b/src/ompl/CMakeLists.txt +index 9ea130e..6dda4df 100644 +--- a/src/ompl/CMakeLists.txt ++++ b/src/ompl/CMakeLists.txt +@@ -83,6 +83,7 @@ endif (MSVC) + + # install the library + install(TARGETS ompl ++ EXPORT ompl + DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT ompl) + if (NOT MSVC) diff --git a/ports/ompl/0002_Fix_config.patch b/ports/ompl/0002_Fix_config.patch new file mode 100644 index 00000000000000..974b1b6ad73de5 --- /dev/null +++ b/ports/ompl/0002_Fix_config.patch @@ -0,0 +1,39 @@ +diff --git a/omplConfig.cmake.in b/omplConfig.cmake.in +index 465de25..ad373fa 100644 +--- a/omplConfig.cmake.in ++++ b/omplConfig.cmake.in +@@ -18,8 +18,10 @@ set(OMPL_MAJOR_VERSION @PROJECT_VERSION_MAJOR@) + set(OMPL_MINOR_VERSION @PROJECT_VERSION_MINOR@) + set(OMPL_PATCH_VERSION @PROJECT_VERSION_PATCH@) + ++find_dependency(Boost 1.58 COMPONENTS serialization filesystem system program_options) ++find_dependency(Eigen3) + set_and_check(OMPL_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +-set(OMPL_INCLUDE_DIRS "${OMPL_INCLUDE_DIR};@Boost_INCLUDE_DIR@;@EIGEN3_INCLUDE_DIR@") ++set(OMPL_INCLUDE_DIRS "${OMPL_INCLUDE_DIR};${Boost_INCLUDE_DIR};${EIGEN3_INCLUDE_DIR}") + foreach(_dir @FLANN_INCLUDE_DIRS@;@ODE_INCLUDE_DIRS@;@SPOT_INCLUDE_DIRS@;@TRIANGLE_INCLUDE_DIR@;@FCL_INCLUDE_DIRS@;@PQP_INCLUDE_DIR@;@ASSIMP_INCLUDE_DIRS@;@OPENGL_INCLUDE_DIR@) + if(_dir) + list(APPEND OMPL_INCLUDE_DIRS "${_dir}") +@@ -29,7 +31,7 @@ list(REMOVE_DUPLICATES OMPL_INCLUDE_DIRS) + set(OMPL_INCLUDE_DIRS "${OMPL_INCLUDE_DIRS}" CACHE STRING "Include path for OMPL and its dependencies") + + set_and_check(OMPL_LIBRARY_DIR @PACKAGE_LIB_INSTALL_DIR@) +-set(OMPL_LIBRARY_DIRS "${OMPL_LIBRARY_DIR};@Boost_LIBRARY_DIRS@") ++set(OMPL_LIBRARY_DIRS "${OMPL_LIBRARY_DIR};${Boost_LIBRARY_DIRS}") + foreach(_dir @FLANN_LIBRARY_DIRS@;@ODE_LIBRARY_DIRS@;@SPOT_LIBRARY_DIRS@;@FCL_LIBRARY_DIRS@;@ASSIMP_LIBRARY_DIRS@) + if(_dir) + list(APPEND OMPL_LIBRARY_DIRS "${_dir}") +@@ -40,7 +42,7 @@ set(OMPL_LIBRARY_DIRS "${OMPL_LIBRARY_DIRS}" CACHE STRING "Library path for OMPL + + find_library(OMPL_LIBRARIES NAMES ompl.${OMPL_VERSION} ompl + PATHS ${OMPL_LIBRARY_DIR} NO_DEFAULT_PATH) +-foreach(_lib @Boost_SERIALIZATION_LIBRARY@;@Boost_FILESYSTEM_LIBRARY@;@Boost_SYSTEM_LIBRARY@;@ODE_LIBRARIES@;@SPOT_LIBRARIES@) ++foreach(_lib ${Boost_SERIALIZATION_LIBRARY};${Boost_FILESYSTEM_LIBRARY};${Boost_SYSTEM_LIBRARY};@ODE_LIBRARIES@;@SPOT_LIBRARIES@) + if(_lib) + list(APPEND OMPL_LIBRARIES "${_lib}") + endif() +@@ -61,3 +63,4 @@ endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(ompl DEFAULT_MSG OMPL_INCLUDE_DIRS OMPL_LIBRARY_DIRS OMPL_LIBRARIES) ++include(${CMAKE_CURRENT_LIST_DIR}/ompl-targets.cmake) diff --git a/ports/ompl/CONTROL b/ports/ompl/CONTROL deleted file mode 100644 index bf9ad3a1f9862f..00000000000000 --- a/ports/ompl/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: ompl -Version: 1.4.2-1 -Description: The Open Motion Planning Library, consists of many state-of-the-art sampling-based motion planning algorithms -Build-Depends: boost-disjoint-sets, boost-dynamic-bitset, boost-filesystem, boost-graph, boost-odeint, boost-program-options, boost-serialization, boost-system, boost-test, boost-ublas, boost-timer, eigen3 - -Feature: app -Description: Add support for reading meshes and performing collision checking -Build-Depends: assimp, fcl diff --git a/ports/ompl/portfile.cmake b/ports/ompl/portfile.cmake index 87af91de84963b..ab02eba31a185d 100644 --- a/ports/ompl/portfile.cmake +++ b/ports/ompl/portfile.cmake @@ -1,35 +1,32 @@ -include(vcpkg_common_functions) +vcpkg_buildpath_length_warning(37) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() - -set(OMPL_VERSION 1.4.2) -set(OMPL_DISTNAME "ompl") -set(OMPL_CHECKSUM "1dc477ee471c0570fd94838b072105960e09186f29634e2f61d885153df36532ab40e30912b534c61f222c09dad63fc6097d324b53c265f9284f20c585d3095c") - -if("app" IN_LIST FEATURES) - set(OMPL_DISTNAME "omplapp") - set(OMPL_CHECKSUM "04812a659fd81c2c541907911cbf4e5987be034546e8e48ed3d11b2b2f9ad3f7931f15d30a32ce3b64deb66b13875970797ac5072e92bfa0841e8d27d85fcb18") -endif() +set(OMPL_VERSION 1.5.1) vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.org/ompl/ompl/downloads/${OMPL_DISTNAME}-${OMPL_VERSION}-Source.tar.gz" - FILENAME "${OMPL_DISTNAME}-${OMPL_VERSION}.tar.gz" - SHA512 ${OMPL_CHECKSUM} + URLS "https://github.com/ompl/ompl/archive/1.5.1.tar.gz" + FILENAME "ompl-${OMPL_VERSION}.tar.gz" + SHA512 2f28d29f32f3bb03e67b29ce251e4786364847a25e3c4cf66d7663ed38dca4da71d4e03cf9ce647710d9524a3907c76c09795e77f041cb8822f695d28f5ca570 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${OMPL_VERSION} + PATCHES + 0001_Export_targets.patch + 0002_Fix_config.patch ) + +# Based on selected features different files get downloaded, so use the following command instead of patch. +file(READ ${SOURCE_PATH}/CMakeLists.txt _contents) +string(REPLACE "find_package(Eigen3 REQUIRED)" "find_package(Eigen3 REQUIRED CONFIG)" _contents "${_contents}") +string(REPLACE "find_package(ccd REQUIRED)" "find_package(ccd REQUIRED CONFIG)" _contents "${_contents}") +file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${_contents}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE OPTIONS -DOMPL_VERSIONED_INSTALL=OFF -DOMPL_REGISTRATION=OFF @@ -52,19 +49,10 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/ompl/ompl.conf ${CURRENT_PACKAGES_DIR}/share/ompl/plannerarena ) -if ("app" IN_LIST FEATURES) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/ompl) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ompl_benchmark.exe ${CURRENT_PACKAGES_DIR}/tools/ompl/ompl_benchmark.exe) - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/share/ompl/resources - ${CURRENT_PACKAGES_DIR}/share/ompl/webapp - ) + +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/ompl RENAME copyright) - -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME ompl) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ompl/vcpkg.json b/ports/ompl/vcpkg.json new file mode 100644 index 00000000000000..81a8c5ff4a332c --- /dev/null +++ b/ports/ompl/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "ompl", + "version-string": "1.5.1", + "port-version": 2, + "description": "The Open Motion Planning Library, consists of many state-of-the-art sampling-based motion planning algorithms", + "homepage": "https://ompl.kavrakilab.org/", + "dependencies": [ + "boost-dynamic-bitset", + "boost-filesystem", + "boost-graph", + "boost-odeint", + "boost-program-options", + "boost-serialization", + "boost-system", + "boost-test", + "boost-timer", + "boost-ublas", + "eigen3" + ] +} diff --git a/ports/omplapp/fix_boost_static_link.patch b/ports/omplapp/fix_boost_static_link.patch new file mode 100644 index 00000000000000..fd74fb8a7b7cd3 --- /dev/null +++ b/ports/omplapp/fix_boost_static_link.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f5c3c88..3a4a7d4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,10 +36,10 @@ set(OMPL_DEMO_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/ompl/demos" + set(OMPL_CMAKE_UTIL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ompl/CMakeModules" + CACHE FILEPATH "Path to directory with auxiliary CMake scripts for OMPL") + +-if(MSVC) ++if(false) + add_definitions(-DBOOST_ALL_NO_LIB) + add_definitions(-DBOOST_PROGRAM_OPTIONS_DYN_LINK) +-endif(MSVC) ++endif(false) + # Ensure dynamic linking with boost unit_test_framework + add_definitions(-DBOOST_TEST_DYN_LINK) + # Avoid valgrind error due to overflow error, cf. https://bitbucket.org/ompl/ompl/issues/543 diff --git a/ports/omplapp/fix_dependency.patch b/ports/omplapp/fix_dependency.patch new file mode 100644 index 00000000000000..4a19f81b84281e --- /dev/null +++ b/ports/omplapp/fix_dependency.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4c7e6901..a433b7da 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,7 +136,7 @@ find_package(Drawstuff QUIET) + set_package_properties(assimp PROPERTIES + URL "http://assimp.org" + PURPOSE "Used in ompl_app for reading meshes representing robots and environments.") +-find_package(assimp REQUIRED) ++find_package(assimp CONFIG REQUIRED) + set_package_properties(ccd PROPERTIES + URL "https://github.com/danfis/libccd" + PURPOSE "Collision detection library used by fcl.") +@@ -178,8 +178,7 @@ include_directories( + "${OMPLAPP_INCLUDE_DIRS}" + "${OMPL_INCLUDE_DIRS}" + "${EIGEN3_INCLUDE_DIR}" +- "${FCL_INCLUDE_DIRS}" +- "${ASSIMP_INCLUDE_DIRS}") ++ "${FCL_INCLUDE_DIRS}") + + # ROS installs fcl in /usr. In /usr/include/fcl/config.h it says octomap was + # enabled. Octomap is installed in /opt/ros/${ROS_DISTRO}/include (most +@@ -195,7 +194,7 @@ set(OMPLAPP_MODULE_LIBRARIES + ${FCL_LIBRARIES}) + set(OMPLAPP_LIBRARIES + ${OPENGL_LIBRARIES} +- ${ASSIMP_LIBRARIES} ++ assimp::assimp + ${FCL_LIBRARIES}) + link_directories(${ASSIMP_LIBRARY_DIRS} ${CCD_LIBRARY_DIRS} ${OCTOMAP_LIBRARY_DIRS} ${FCL_LIBRARY_DIRS}) + diff --git a/ports/omplapp/portfile.cmake b/ports/omplapp/portfile.cmake new file mode 100644 index 00000000000000..02da44945fa692 --- /dev/null +++ b/ports/omplapp/portfile.cmake @@ -0,0 +1,67 @@ +vcpkg_buildpath_length_warning(37) + +set(OMPL_VERSION 1.5.1) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/ompl/omplapp/releases/download/1.5.1/omplapp-1.5.1-Source.tar.gz" + FILENAME "omplapp-${OMPL_VERSION}.tar.gz" + SHA512 83b1b09d6be776f7e15a748402f0c2f072459921de61a92731daf5171bd1f91a829fbeb6e10a489b92fba0297f6272e7bb6b8f07830c387bb29ccdbc7b3731f3 +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(STATIC_PATCH fix_boost_static_link.patch) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${OMPL_VERSION} + PATCHES + fix_dependency.patch + ${STATIC_PATCH} +) + +# Based on selected features different files get downloaded, so use the following command instead of patch. +file(READ ${SOURCE_PATH}/CMakeLists.txt _contents) +string(REPLACE "find_package(Eigen3 REQUIRED)" "find_package(Eigen3 REQUIRED CONFIG)" _contents "${_contents}") +string(REPLACE "find_package(ccd REQUIRED)" "find_package(ccd REQUIRED CONFIG)" _contents "${_contents}") +file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${_contents}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DOMPL_VERSIONED_INSTALL=OFF + -DOMPL_REGISTRATION=OFF + -DOMPL_BUILD_DEMOS=OFF + -DOMPL_BUILD_TESTS=OFF + -DOMPL_BUILD_PYBINDINGS=OFF + -DOMPL_BUILD_PYTESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/ompl/cmake) + +# Remove debug distribution and other, move ompl_benchmark to tools/ dir +vcpkg_copy_tools(TOOL_NAMES ompl_benchmark AUTO_CLEAN) +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/include/ompl" + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/include/omplapp/CMakeFiles" + "${CURRENT_PACKAGES_DIR}/lib/ompl.lib" + "${CURRENT_PACKAGES_DIR}/share/ompl" + "${CURRENT_PACKAGES_DIR}/share/man" + "${CURRENT_PACKAGES_DIR}/debug/bin" + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/ompl.lib" + "${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) diff --git a/ports/omplapp/vcpkg.json b/ports/omplapp/vcpkg.json new file mode 100644 index 00000000000000..07ac2ba649acdc --- /dev/null +++ b/ports/omplapp/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "omplapp", + "version-string": "1.5.1", + "description": "Use OMPL for reading meshes and performing collision checking", + "homepage": "https://ompl.kavrakilab.org/", + "dependencies": [ + "assimp", + "fcl", + "ompl" + ] +} diff --git a/ports/onednn/portfile.cmake b/ports/onednn/portfile.cmake new file mode 100644 index 00000000000000..c2179d5ffe13e2 --- /dev/null +++ b/ports/onednn/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oneapi-src/oneDNN + REF v2.0 + SHA512 740fa871e29edc8bb8a54d4ba615e856712f7f63efe4c70f4a3d5f6d143d60bc51366b9355ab4b6702718ba711b48350ea49b1335ec10c1dc4f655cc9728ff3e + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(DNNL_OPTIONS "-DDNNL_LIBRARY_TYPE=STATIC") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${DNNL_OPTIONS} +) +vcpkg_install_cmake() + +# The port name and the find_package() name are different (onednn versus dnnl) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/dnnl TARGET_PATH share/dnnl) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Copyright and license +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/onednn/vcpkg.json b/ports/onednn/vcpkg.json new file mode 100644 index 00000000000000..86f7989f486f1a --- /dev/null +++ b/ports/onednn/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "onednn", + "version-string": "2.0", + "port-version": 1, + "description": "oneAPI Deep Neural Network Library (oneDNN)", + "supports": "x64 & !uwp" +} diff --git a/ports/oniguruma/CONTROL b/ports/oniguruma/CONTROL deleted file mode 100644 index 6fe3ee2d000e36..00000000000000 --- a/ports/oniguruma/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: oniguruma -Version: 6.9.2-3 -Description: Modern and flexible regular expressions library -Homepage: https://github.com/kkos/oniguruma - -Feature: non-posix -Description: Disable POSIX API diff --git a/ports/oniguruma/fix-uwp.patch b/ports/oniguruma/fix-uwp.patch new file mode 100644 index 00000000000000..5f3fb51e9bc216 --- /dev/null +++ b/ports/oniguruma/fix-uwp.patch @@ -0,0 +1,26 @@ +diff --git a/src/regcomp.c b/src/regcomp.c +index 69d4b95..380f441 100644 +--- a/src/regcomp.c ++++ b/src/regcomp.c +@@ -3880,7 +3880,7 @@ reduce_string_list(Node* node) + { + Node* prev; + Node* curr; +- Node* prev_node; ++ Node* prev_node = NULL; + Node* next_node; + + prev = NULL_NODE; +diff --git a/src/regexec.c b/src/regexec.c +index ce498c6..6848c0f 100644 +--- a/src/regexec.c ++++ b/src/regexec.c +@@ -4216,7 +4216,7 @@ regset_search_body_position_lead(OnigRegSet* set, + { + int r, n, i; + UChar *s, *prev; +- UChar *low, *high, *low_prev; ++ UChar *low, *high, *low_prev = NULL; + UChar* sch_range; + regex_t* reg; + OnigEncoding enc; diff --git a/ports/oniguruma/portfile.cmake b/ports/oniguruma/portfile.cmake index 5b2fe2adf017e2..aa19762cb790e0 100644 --- a/ports/oniguruma/portfile.cmake +++ b/ports/oniguruma/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kkos/oniguruma - REF v6.9.2 - SHA512 b5578560f469c2e123280159a23a0e59045bf2452fd3efe09393c5e99ecc6323f965d2189a4e7e6e3a108c1d02b9b041f3fe991cd8ab64f7289003a5a07b4434 + REF e03900b038a274ee2f1341039e9003875c11e47d # v6.9.4 + SHA512 77772e3994acbdde86a7405d24423fff101061e24cc8cd85975d3ab092935fc91c0c3b991fe2fa9e9a857b5254db7d923256cdb29a2e2d8a3cdd41837ed690f6 HEAD_REF master + PATCHES fix-uwp.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -45,7 +44,4 @@ else() endif() # Handle copyright -configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oniguruma/vcpkg.json b/ports/oniguruma/vcpkg.json new file mode 100644 index 00000000000000..8b73eea8d81f82 --- /dev/null +++ b/ports/oniguruma/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "oniguruma", + "version-string": "6.9.4", + "port-version": 1, + "description": "Modern and flexible regular expressions library", + "homepage": "https://github.com/kkos/oniguruma", + "features": { + "non-posix": { + "description": "Disable POSIX API" + } + } +} diff --git a/ports/onnx-optimizer/fix-cmakelists.patch b/ports/onnx-optimizer/fix-cmakelists.patch new file mode 100644 index 00000000000000..4c54d77e057957 --- /dev/null +++ b/ports/onnx-optimizer/fix-cmakelists.patch @@ -0,0 +1,56 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c2e48b3..5716fbb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,10 +7,18 @@ if(NOT MSVC) + set(CMAKE_CXX_STANDARD 11) + endif(NOT MSVC) + ++# Add MSVC RunTime Flag ++function(add_msvc_runtime_flag lib) ++ if(${ONNX_USE_MSVC_STATIC_RUNTIME}) ++ target_compile_options(${lib} PRIVATE $<$>:/MT> $<$:/MTd>) ++ else() ++ target_compile_options(${lib} PRIVATE $<$>:/MD> $<$:/MDd>) ++ endif() ++endfunction() + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +-set(ONNX_ROOT ${PROJECT_SOURCE_DIR}/third_party/onnx) +-add_subdirectory(${ONNX_ROOT}) ++find_package(protobuf CONFIG REQUIRED) ++find_package(ONNX CONFIG REQUIRED) + + file(READ "${PROJECT_SOURCE_DIR}/VERSION_NUMBER" ONNX_OPTIMIZER_VERSION) + string(STRIP "${ONNX_OPTIMIZER_VERSION}" ONNX_OPTIMIZER_VERSION) +@@ -31,6 +39,7 @@ add_executable(onnx_optimizer_exec examples/onnx_optimizer_exec.cpp) + target_link_libraries(onnx_optimizer_exec onnx_optimizer) + + if(BUILD_ONNX_PYTHON) ++ find_package(Python3 COMPONENTS Development REQUIRED) + if("${PY_EXT_SUFFIX}" STREQUAL "") + if(MSVC) + set(PY_EXT_SUFFIX ".pyd") +@@ -51,7 +60,7 @@ if(BUILD_ONNX_PYTHON) + $ + ${PYTHON_INCLUDE_DIR}) + # pybind11 is a header only lib +- find_package(pybind11 2.2) ++ find_package(pybind11 2.2 CONFIG REQUIRED) + if(pybind11_FOUND) + target_include_directories(onnx_opt_cpp2py_export PUBLIC + ${pybind11_INCLUDE_DIRS}) +@@ -87,11 +96,9 @@ if(BUILD_ONNX_PYTHON) + endif() + + target_link_libraries(onnx_opt_cpp2py_export PRIVATE onnx_optimizer) +- ++ target_link_directories(onnx_opt_cpp2py_export PRIVATE ${Python3_LIBRARY_DIRS}) ++ target_link_libraries(onnx_opt_cpp2py_export PRIVATE ${Python3_LIBRARIES}) + if(MSVC) +- find_package(PythonInterp ${PY_VERSION} REQUIRED) +- find_package(PythonLibs ${PY_VERSION} REQUIRED) +- target_link_libraries(onnx_opt_cpp2py_export PRIVATE ${PYTHON_LIBRARIES}) + target_compile_options(onnx_opt_cpp2py_export + PRIVATE /MP + /WX diff --git a/ports/onnx-optimizer/portfile.cmake b/ports/onnx-optimizer/portfile.cmake new file mode 100644 index 00000000000000..fe62f0304d12a5 --- /dev/null +++ b/ports/onnx-optimizer/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO onnx/optimizer + REF v0.2.6 + SHA512 cc6373781f04bc6fafd3282d248e26eaf93556b86acbb0dee44b4aa7a5d59c634905c1a05d035e31a50fc0f06cfc686fa483b79a324dd973faa421747d4a681b + HEAD_REF master + PATCHES + fix-cmakelists.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + pybind11 BUILD_ONNX_PYTHON +) +if("pybind11" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + list(APPEND FEATURE_OPTIONS + -DPython3_EXECUTABLE=${PYTHON3} + -DONNX_USE_PROTOBUF_SHARED_LIBS=ON # /wd4251 + ) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} +) +if("pybind11" IN_LIST FEATURES) + # This target is not in install/export + vcpkg_cmake_build(TARGET onnx_opt_cpp2py_export) +endif() +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(PACKAGE_NAME ONNXOptimizer CONFIG_PATH lib/cmake/ONNXOptimizer) + +file(INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/include/onnxoptimizer/test" +) diff --git a/ports/onnx-optimizer/vcpkg.json b/ports/onnx-optimizer/vcpkg.json new file mode 100644 index 00000000000000..f38496eb083255 --- /dev/null +++ b/ports/onnx-optimizer/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "onnx-optimizer", + "version-semver": "0.2.6", + "description": "Actively maintained ONNX Optimizer", + "homepage": "https://github.com/onnx/optimizer", + "license": "Apache-2.0", + "dependencies": [ + "onnx", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "pybind11": { + "description": "Build Python binaries", + "dependencies": [ + { + "name": "onnx", + "features": [ + "pybind11" + ] + } + ] + } + } +} diff --git a/ports/onnx/fix-cmakelists.patch b/ports/onnx/fix-cmakelists.patch new file mode 100644 index 00000000000000..e6c68370b27992 --- /dev/null +++ b/ports/onnx/fix-cmakelists.patch @@ -0,0 +1,68 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 628dcaa..300e4ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -111,8 +111,8 @@ endif() + # find_package Python has replaced PythonInterp and PythonLibs since cmake 3.12 + # Use the following command in the future; now this is only compatible with the latest pybind11 + # find_package(Python ${PY_VERSION} COMPONENTS Interpreter Development REQUIRED) +-find_package(PythonInterp ${PY_VERSION} REQUIRED) +-find_package(PythonLibs ${PY_VERSION}) ++find_package(Python3 ${PY_VERSION} COMPONENTS Interpreter REQUIRED) ++set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) + + if(CMAKE_SYSTEM_NAME STREQUAL "AIX") + set(CMAKE_NO_SYSTEM_FROM_IMPORTED 1) +@@ -422,6 +422,7 @@ target_link_libraries(onnx PUBLIC onnx_proto) + add_onnx_global_defines(onnx) + + if(BUILD_ONNX_PYTHON) ++ find_package(Python3 ${PY_VERSION} COMPONENTS Development REQUIRED) + if("${PY_EXT_SUFFIX}" STREQUAL "") + if(MSVC) + set(PY_EXT_SUFFIX ".pyd") +@@ -441,10 +442,13 @@ if(BUILD_ONNX_PYTHON) + $ + $ + $ +- ${PYTHON_INCLUDE_DIR}) +- ++ ${Python3_INCLUDE_DIRS}) ++ target_link_directories(onnx_cpp2py_export PRIVATE ++ ${Python3_LIBRARY_DIRS}) ++ target_link_libraries(onnx_cpp2py_export PRIVATE ++ ${Python3_LIBRARIES}) + # pybind11 is a header only lib +- find_package(pybind11 2.2) ++ find_package(pybind11 2.2 CONFIG REQUIRED) + if(pybind11_FOUND) + target_include_directories(onnx_cpp2py_export PUBLIC + ${pybind11_INCLUDE_DIRS}) +@@ -687,6 +691,27 @@ endif() + + include(GNUInstallDirs) + ++# install protobuf files ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-data.proto ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-data.proto3 ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-ml.proto ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-ml.proto3 ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-operators-ml.proto ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-operators-ml.proto3 ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnx ++) ++# install python files ++if(BUILD_ONNX_PYTHON) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx_data_pb.py ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx_data_pb2.py ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx_ml_pb2.py ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx_operators_ml_pb2.py ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx_operators_pb.py ++ ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx_pb.py ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnx ++ ) ++endif() ++ + install(DIRECTORY ${ONNX_ROOT}/onnx + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING diff --git a/ports/onnx/portfile.cmake b/ports/onnx/portfile.cmake new file mode 100644 index 00000000000000..1c565ab0d5f302 --- /dev/null +++ b/ports/onnx/portfile.cmake @@ -0,0 +1,98 @@ +# uwp: LOAD_LIBRARY_SEARCH_DEFAULT_DIRS undefined identifier +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO onnx/onnx + REF v1.9.0 + SHA512 a3eecc74ce4f22524603fb86367d21c87a143ba27eef93ef4bd2e2868c2cadeb724b84df58a429286e7824adebdeba7fa059095b7ab29df8dcea8777bd7f4101 + PATCHES + fix-cmakelists.patch + wrap-onnxifi-targets.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_STATIC_RUNTIME) + list(APPEND PLATFORM_OPTIONS + -DONNX_USE_MSVC_STATIC_RUNTIME=${USE_STATIC_RUNTIME} + ) +endif() + +# ONNX_USE_PROTOBUF_SHARED_LIBS: find the library and check its file extension +find_library(PROTOBUF_LIBPATH NAMES protobuf PATHS ${CURRENT_INSTALLED_DIR}/bin ${CURRENT_INSTALLED_DIR}/lib REQUIRED) +get_filename_component(PROTOBUF_LIBNAME ${PROTOBUF_LIBPATH} NAME) +if(PROTOBUF_LIBNAME MATCHES ${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(USE_PROTOBUF_SHARED ON) +else() + set(USE_PROTOBUF_SHARED OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + pybind11 BUILD_ONNX_PYTHON +) + +# Like protoc, python is required for codegen. +vcpkg_find_acquire_program(PYTHON3) + +# PATH for .bat scripts can find 'python' +get_filename_component(PYTHON_DIR ${PYTHON3} PATH) +vcpkg_add_to_path(PREPEND ${PYTHON_DIR}) + +if("pybind11" IN_LIST FEATURES) + # When BUILD_ONNX_PYTHON, we need Development component. Give a hint for FindPython3 + list(APPEND FEATURE_OPTIONS + -DPython3_ROOT_DIR=${CURRENT_INSTALLED_DIR} + ) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} ${PLATFORM_OPTIONS} + -DPython3_EXECUTABLE=${PYTHON3} + -DONNX_ML=ON + -DONNX_GEN_PB_TYPE_STUBS=ON + -DONNX_USE_PROTOBUF_SHARED_LIBS=${USE_PROTOBUF_SHARED} + -DONNX_USE_LITE_PROTO=OFF + -DONNXIFI_ENABLE_EXT=OFF + -DONNX_BUILD_TESTS=OFF + -DONNX_BUILD_BENCHMARKS=OFF +) + +if("pybind11" IN_LIST FEATURES) + # This target is not in install/export + vcpkg_cmake_build(TARGET onnx_cpp2py_export) +endif() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ONNX) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + # the others are empty + "${CURRENT_PACKAGES_DIR}/include/onnx/onnx_ml" + "${CURRENT_PACKAGES_DIR}/include/onnx/onnx_data" + "${CURRENT_PACKAGES_DIR}/include/onnx/onnx_operators_ml" + "${CURRENT_PACKAGES_DIR}/include/onnx/onnx_cpp2py_export" + "${CURRENT_PACKAGES_DIR}/include/onnx/backend" + "${CURRENT_PACKAGES_DIR}/include/onnx/tools" + "${CURRENT_PACKAGES_DIR}/include/onnx/test" + "${CURRENT_PACKAGES_DIR}/include/onnx/bin" + "${CURRENT_PACKAGES_DIR}/include/onnx/examples" + "${CURRENT_PACKAGES_DIR}/include/onnx/frontend" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/controlflow" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/generator" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/logical" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/math" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/nn" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/object_detection" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/quantization" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/reduction" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/rnn" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/sequence" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/traditionalml" + "${CURRENT_PACKAGES_DIR}/include/onnx/defs/training" +) diff --git a/ports/onnx/vcpkg.json b/ports/onnx/vcpkg.json new file mode 100644 index 00000000000000..6f9ee73238067e --- /dev/null +++ b/ports/onnx/vcpkg.json @@ -0,0 +1,34 @@ +{ + "name": "onnx", + "version-semver": "1.9.0", + "description": "Open standard for machine learning interoperability", + "homepage": "https://onnx.ai", + "supports": "!uwp", + "dependencies": [ + "protobuf", + { + "name": "protobuf", + "host": true + }, + { + "name": "python3", + "host": true + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "pybind11": { + "description": "Build Python binaries", + "dependencies": [ + "pybind11" + ] + } + } +} diff --git a/ports/onnx/wrap-onnxifi-targets.patch b/ports/onnx/wrap-onnxifi-targets.patch new file mode 100644 index 00000000000000..598edf6030b079 --- /dev/null +++ b/ports/onnx/wrap-onnxifi-targets.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 300e4ea..155dd0d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -614,6 +614,7 @@ if(APPLE) + set_target_properties(onnx PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") + endif() + ++if(ONNXIFI_ENABLE_EXT) + # ---[ ONNX Interface for Framework Integratin (ONNXIFI) + add_library(onnxifi INTERFACE) + target_include_directories(onnxifi INTERFACE +@@ -688,6 +689,7 @@ if(MSVC) + # lists from 'identifier2' + ) + endif() ++endif() # ONNXIFI_ENABLE_EXT + + include(GNUInstallDirs) + +@@ -737,8 +739,14 @@ install(FILES + install(EXPORT ONNXTargets DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ONNX") + install(TARGETS + onnx onnx_proto +- onnxifi onnxifi_dummy onnxifi_loader + EXPORT ONNXTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++if(ONNXIFI_ENABLE_EXT) ++ install(TARGETS ++ onnxifi onnxifi_dummy onnxifi_loader ++ EXPORT ONNXTargets ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + if(NOT ANDROID AND NOT IOS) + install(TARGETS onnxifi_wrapper +@@ -748,6 +756,7 @@ endif() + if(ONNXIFI_DUMMY_BACKEND) + add_definitions(-DONNXIFI_DUMMY_BACKEND=1) + endif() ++endif() # ONNXIFI_ENABLE_EXT + + if(ONNX_BUILD_TESTS) + include(${ONNX_ROOT}/cmake/unittest.cmake) diff --git a/ports/onnxruntime-gpu/portfile.cmake b/ports/onnxruntime-gpu/portfile.cmake new file mode 100644 index 00000000000000..524936ac26c74b --- /dev/null +++ b/ports/onnxruntime-gpu/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm" ON_TARGET "UWP" "LINUX" "ANDROID" "FREEBSD" "OSX") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +set(VERSION 1.5.1) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/microsoft/onnxruntime/releases/download/v1.5.1/onnxruntime-win-x64-gpu-1.5.1.zip" + FILENAME "onnxruntime-win-x64-gpu-1.5.1.zip" + SHA512 893dbed1196b5c9730744dc5566cd3ad8ec677cbea04dd0572efc9a8b3563d3f1cbf40d0dea3d624d9451dc33272c0ae44d53d6deee6f249fa2520e60718ee52 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + REF ${VERSION} +) + +file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/include + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/lib + ${CURRENT_PACKAGES_DIR}/debug/bin + ) + +file(COPY + ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/include + DESTINATION ${CURRENT_PACKAGES_DIR} + ) + +file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/lib/onnxruntime.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/lib/onnxruntime.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/lib/onnxruntime.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/lib/onnxruntime.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/onnxruntime-gpu/vcpkg.json b/ports/onnxruntime-gpu/vcpkg.json new file mode 100644 index 00000000000000..b656e7df3a0466 --- /dev/null +++ b/ports/onnxruntime-gpu/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "onnxruntime-gpu", + "version-string": "1.5.1", + "description": "onnxruntime (GPU)", + "homepage": "https://github.com/microsoft/onnxruntime", + "supports": "windows & !x86 & !uwp & !static & !arm" +} diff --git a/ports/open62541/CONTROL b/ports/open62541/CONTROL deleted file mode 100644 index bff3217bb6125a..00000000000000 --- a/ports/open62541/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: open62541 -Version: 0.3.0-3 -Description: open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0. diff --git a/ports/open62541/portfile.cmake b/ports/open62541/portfile.cmake index d0e26df3f6c446..55fbd6edb9ab9c 100644 --- a/ports/open62541/portfile.cmake +++ b/ports/open62541/portfile.cmake @@ -1,74 +1,39 @@ -include(vcpkg_common_functions) - -if(NOT CMAKE_HOST_WIN32) - message("${PORT} currently requires the following tools from the system package manager:\n python-six\n\nThis can be installed on Ubuntu systems via apt-get install python-six python3-six (depending on your current python default interpreter)") -endif() - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() +set(VERSION v1.1) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO open62541/open62541 - REF v0.3.0 - SHA512 67766d226e1b900c0c37309099ecdbe987d10888ebf43f9066b21cf79f64d34e6ac30c2671a4901892f044859da4e8dbaa9fed5a49c633f73fef3bec75774050 + REF 8ad84962e67987af91d7f746425d7b26be47a0cb # v1.1.2 + SHA512 7cca9458cdfbc386c0a7012373c91e9ab3a4876303db95a513f62cf26e751446bd73c0fa1f76e0821d2a47747bfb4612e8822389bc9002775636db8f8093f94c HEAD_REF master ) -file(READ ${SOURCE_PATH}/CMakeLists.txt OPEN62541_CMAKELISTS) -string(REPLACE - "RUNTIME DESTINATION \${CMAKE_INSTALL_PREFIX}" - "RUNTIME DESTINATION \${BIN_INSTALL_DIR}" - OPEN62541_CMAKELISTS "${OPEN62541_CMAKELISTS}") -file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${OPEN62541_CMAKELISTS}") - -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + openssl UA_ENABLE_ENCRYPTION_OPENSSL + mbedtls UA_ENABLE_ENCRYPTION_MBEDTLS + amalgamation UA_ENABLE_AMALGAMATION +) vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) vcpkg_add_to_path("${PYTHON3_DIR}") -if(CMAKE_HOST_WIN32) - # Must not modify system copy of python3 -- on CMAKE_HOST_WIN32, we have our own private copy - if(NOT EXISTS ${PYTHON3_DIR}/easy_install.exe) - if(NOT EXISTS ${PYTHON3_DIR}/Scripts/pip.exe) - get_filename_component(PYTHON3_DIR_NAME "${PYTHON3_DIR}" NAME) - vcpkg_download_distfile(GET_PIP - URLS "https://bootstrap.pypa.io/3.3/get-pip.py" - FILENAME "tools/python/${PYTHON3_DIR_NAME}/get-pip.py" - SHA512 92e68525830bb23955a31cb19ebc3021ef16b6337eab83d5db2961b791283d2867207545faf83635f6027f2f7b7f8fee2c85f2cfd8e8267df25406474571c741 - ) - execute_process(COMMAND ${PYTHON3_DIR}/python.exe ${GET_PIP}) - endif() - execute_process(COMMAND ${PYTHON3_DIR}/Scripts/pip.exe install six) - else() - execute_process(COMMAND ${PYTHON3_DIR}/easy_install.exe six) - endif() -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DOPEN62541_VERSION=${VERSION} OPTIONS_DEBUG -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() - -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) -else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) -endif() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/open62541/tools) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/open62541) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/open62541/LICENSE ${CURRENT_PACKAGES_DIR}/share/open62541/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/open62541/vcpkg.json b/ports/open62541/vcpkg.json new file mode 100644 index 00000000000000..0dcbcb81b3c6de --- /dev/null +++ b/ports/open62541/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "open62541", + "version": "1.1.2", + "port-version": 2, + "description": "open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0.", + "homepage": "https://open62541.org", + "default-features": [ + "openssl" + ], + "features": { + "amalgamation": { + "description": "Concatenate the library to a single file open62541.h/.c" + }, + "mbedtls": { + "description": "Enable encryption support (uses MbedTLS)", + "dependencies": [ + "mbedtls" + ] + }, + "openssl": { + "description": "Enable encryption support (uses OpenSSL)", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL deleted file mode 100644 index ccea6a482d5909..00000000000000 --- a/ports/openal-soft/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: openal-soft -Version: 1.19.1-2 -Homepage: https://github.com/kcat/openal-soft -Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. diff --git a/ports/openal-soft/cmake-3-11.patch b/ports/openal-soft/cmake-3-11.patch deleted file mode 100644 index 07f7e693694126..00000000000000 --- a/ports/openal-soft/cmake-3-11.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a871f4c..f9f6b34 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -965,7 +965,8 @@ OPTION(ALSOFT_REQUIRE_DSOUND "Require DirectSound backend" OFF) - OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF) - IF(HAVE_WINDOWS_H) - # Check MMSystem backend -- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502) -+ set(CMAKE_REQUIRED_DEFINITIONS -D_WIN32_WINNT=0x0502) -+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H) - IF(HAVE_MMSYSTEM_H) - CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM) - IF(HAVE_LIBWINMM) diff --git a/ports/openal-soft/dont-export-symbols-in-static-build.patch b/ports/openal-soft/dont-export-symbols-in-static-build.patch index 6663ad208e5f1d..3ff82b0b81a967 100644 --- a/ports/openal-soft/dont-export-symbols-in-static-build.patch +++ b/ports/openal-soft/dont-export-symbols-in-static-build.patch @@ -1,5 +1,4 @@ diff --git a/config.h.in b/config.h.in -index a71b54f..8d84645 100644 --- a/config.h.in +++ b/config.h.in @@ -1,6 +1,8 @@ @@ -8,6 +7,7 @@ index a71b54f..8d84645 100644 #define AL_API ${EXPORT_DECL} #define ALC_API ${EXPORT_DECL} +#endif - - /* Define any available alignment declaration */ - #define ALIGN(x) ${ALIGN_DECL} + + /* Define if HRTF data is embedded in the library */ + #cmakedefine ALSOFT_EMBED_HRTF_DATA + \ No newline at end of file diff --git a/ports/openal-soft/fix-arm-builds.patch b/ports/openal-soft/fix-arm-builds.patch deleted file mode 100644 index 87fecbca21c03e..00000000000000 --- a/ports/openal-soft/fix-arm-builds.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 39b80250..e2a1ed76 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1409,6 +1409,7 @@ ELSE() - ELSEIF(CMAKE_COMPILER_IS_GNUCC) - SET(SUBSYS_FLAG ${SUBSYS_FLAG} "-mwindows") - ENDIF() -+ SET(COMMON_LIB ${COMMON_LIB} shell32 ole32) - ENDIF() - - IF(WIN32 AND ALSOFT_BUILD_ROUTER) -diff --git a/native-tools/CMakeLists.txt b/native-tools/CMakeLists.txt -index 5e816bba..16f3be12 100644 ---- a/native-tools/CMakeLists.txt -+++ b/native-tools/CMakeLists.txt -@@ -24,6 +24,11 @@ set_target_properties(bsincgen PROPERTIES OUTPUT_NAME bsincgen) - set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}") - set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}") - target_compile_definitions(bsincgen PRIVATE ${CPP_DEFS}) -+set(BSINCGEN_LIB ) - if(HAVE_LIBM) -- target_link_libraries(bsincgen m) -+ set(BSINCGEN_LIB ${BSINCGEN_LIB} m) - endif(HAVE_LIBM) -+if(WIN32) -+ set(BSINCGEN_LIB ${BSINCGEN_LIB} shell32) -+endif() -+target_link_libraries(bsincgen ${BSINCGEN_LIB}) -\ No newline at end of file diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index a753030c804d14..79ea4a0c7cc51f 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -1,18 +1,13 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "WindowsStore not supported") -endif() +vcpkg_fail_port_install(ON_TARGET "UWP") -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kcat/openal-soft - REF openal-soft-1.19.1 - SHA512 4a64cc90ddeaa3773610b0bc8023d231100f3396f3fc5bd079db81600f80a789c75e6af03391bfc78a903c96bb71f8052a9ae802ea81422028e5b12b7eb6c47b + REF ae4eacf147e2c2340cc4e02a790df04c793ed0a9 # openal-soft-1.21.1 + SHA512 6ba006d3dad6efe002f285ff509a59f02b499ec3f6065df12a89c52355464117b4dbabcd04ee9cbf22cc3b4125c8e456769b172f8c3e9ee215e760b2c51a0a8f HEAD_REF master PATCHES dont-export-symbols-in-static-build.patch - cmake-3-11.patch - fix-arm-builds.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -21,22 +16,27 @@ else() set(OPENAL_LIBTYPE "STATIC") endif() -if(VCPKG_CMAKE_SYSTEM_NAME) - set(ALSOFT_REQUIRE_WINDOWS OFF) +set(ALSOFT_REQUIRE_LINUX OFF) +set(ALSOFT_REQUIRE_WINDOWS OFF) +set(ALSOFT_REQUIRE_APPLE OFF) + +if(VCPKG_TARGET_IS_LINUX) set(ALSOFT_REQUIRE_LINUX ON) -else() +endif() +if(VCPKG_TARGET_IS_WINDOWS) set(ALSOFT_REQUIRE_WINDOWS ON) - set(ALSOFT_REQUIRE_LINUX OFF) +endif() +if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) + set(ALSOFT_REQUIRE_APPLE ON) endif() vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DLIBTYPE=${OPENAL_LIBTYPE} -DALSOFT_UTILS=OFF -DALSOFT_NO_CONFIG_UTIL=ON -DALSOFT_EXAMPLES=OFF - -DALSOFT_TESTS=OFF -DALSOFT_CONFIG=OFF -DALSOFT_HRTF_DEFS=OFF -DALSOFT_AMBDEC_PRESETS=OFF @@ -44,35 +44,52 @@ vcpkg_configure_cmake( -DALSOFT_BACKEND_OSS=OFF -DALSOFT_BACKEND_SOLARIS=OFF -DALSOFT_BACKEND_SNDIO=OFF - -DALSOFT_BACKEND_QSA=OFF -DALSOFT_BACKEND_PORTAUDIO=OFF -DALSOFT_BACKEND_PULSEAUDIO=OFF - -DALSOFT_BACKEND_COREAUDIO=OFF + -DALSOFT_BACKEND_COREAUDIO=${ALSOFT_REQUIRE_APPLE} -DALSOFT_BACKEND_JACK=OFF -DALSOFT_BACKEND_OPENSL=OFF -DALSOFT_BACKEND_WAVE=ON - -DALSOFT_REQUIRE_WINMM=${ALSOFT_REQUIRE_WINDOWS} - -DALSOFT_REQUIRE_DSOUND=${ALSOFT_REQUIRE_WINDOWS} - -DALSOFT_REQUIRE_MMDEVAPI=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_BACKEND_WINMM=OFF + -DALSOFT_BACKEND_DSOUND=OFF + -DALSOFT_REQUIRE_WASAPI=${ALSOFT_REQUIRE_WINDOWS} -DALSOFT_CPUEXT_NEON=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_WindowsSDK=ON + MAYBE_UNUSED_VARIABLES + ALSOFT_AMBDEC_PRESETS + ALSOFT_BACKEND_ALSA + ALSOFT_BACKEND_COREAUDIO + ALSOFT_BACKEND_JACK + ALSOFT_BACKEND_OPENSL + ALSOFT_BACKEND_OSS + ALSOFT_BACKEND_PORTAUDIO + ALSOFT_BACKEND_PULSEAUDIO + ALSOFT_BACKEND_SNDIO + ALSOFT_BACKEND_SOLARIS + ALSOFT_CONFIG + ALSOFT_CPUEXT_NEON + ALSOFT_HRTF_DEFS + CMAKE_DISABLE_FIND_PACKAGE_WindowsSDK ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenAL) +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/OpenAL") foreach(HEADER al.h alc.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} AL_H) + file(READ "${CURRENT_PACKAGES_DIR}/include/AL/${HEADER}" AL_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") string(REPLACE "defined(AL_LIBTYPE_STATIC)" "1" AL_H "${AL_H}") else() string(REPLACE "defined(AL_LIBTYPE_STATIC)" "0" AL_H "${AL_H}") endif() - file(WRITE ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} "${AL_H}") + file(WRITE "${CURRENT_PACKAGES_DIR}/include/AL/${HEADER}" "${AL_H}") endforeach() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/openal-soft) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/openal-soft/COPYING ${CURRENT_PACKAGES_DIR}/share/openal-soft/copyright) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + vcpkg_copy_pdbs() diff --git a/ports/openal-soft/usage b/ports/openal-soft/usage new file mode 100644 index 00000000000000..1807fb982a9366 --- /dev/null +++ b/ports/openal-soft/usage @@ -0,0 +1,4 @@ +The package openal-soft provides CMake targets: + + find_package(OpenAL CONFIG REQUIRED) + target_link_libraries(main PRIVATE OpenAL::OpenAL) diff --git a/ports/openal-soft/vcpkg.json b/ports/openal-soft/vcpkg.json new file mode 100644 index 00000000000000..c96c68a3c6ea18 --- /dev/null +++ b/ports/openal-soft/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "openal-soft", + "version-semver": "1.21.1", + "port-version": 2, + "description": "OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.", + "homepage": "https://github.com/kcat/openal-soft", + "supports": "!uwp" +} diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL deleted file mode 100644 index 47b9430a9a9d56..00000000000000 --- a/ports/openblas/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: openblas -Version: 0.3.6-5 -Homepage: https://github.com/xianyi/OpenBLAS -Build-Depends: pthread (linux) -Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/openblas/FindBLAS.cmake b/ports/openblas/FindBLAS.cmake deleted file mode 100644 index 164e79f3b24c8c..00000000000000 --- a/ports/openblas/FindBLAS.cmake +++ /dev/null @@ -1,816 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindBLAS --------- - -Find Basic Linear Algebra Subprograms (BLAS) library - -This module finds an installed Fortran library that implements the -BLAS linear-algebra interface (see http://www.netlib.org/blas/). The -list of libraries searched for is taken from the ``autoconf`` macro file, -``acx_blas.m4`` (distributed at -http://ac-archive.sourceforge.net/ac-archive/acx_blas.html). - -Input Variables -^^^^^^^^^^^^^^^ - -The following variables may be set to influence this module's behavior: - -``BLA_STATIC`` - if ``ON`` use static linkage - -``BLA_VENDOR`` - If set, checks only the specified vendor, if not set checks all the - possibilities. List of vendors valid in this module: - - * Goto - * OpenBLAS - * FLAME - * ATLAS PhiPACK - * CXML - * DXML - * SunPerf - * SCSL - * SGIMATH - * IBMESSL - * Intel10_32 (intel mkl v10 32 bit) - * Intel10_64lp (intel mkl v10+ 64 bit, threaded code, lp64 model) - * Intel10_64lp_seq (intel mkl v10+ 64 bit, sequential code, lp64 model) - * Intel10_64ilp (intel mkl v10+ 64 bit, threaded code, ilp64 model) - * Intel10_64ilp_seq (intel mkl v10+ 64 bit, sequential code, ilp64 model) - * Intel (obsolete versions of mkl 32 and 64 bit) - * ACML - * ACML_MP - * ACML_GPU - * Apple - * NAS - * Generic - -``BLA_F95`` - if ``ON`` tries to find the BLAS95 interfaces - -``BLA_PREFER_PKGCONFIG`` - if set ``pkg-config`` will be used to search for a BLAS library first - and if one is found that is preferred - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -``BLAS_FOUND`` - library implementing the BLAS interface is found -``BLAS_LINKER_FLAGS`` - uncached list of required linker flags (excluding ``-l`` and ``-L``). -``BLAS_LIBRARIES`` - uncached list of libraries (using full path name) to link against - to use BLAS (may be empty if compiler implicitly links BLAS) -``BLAS95_LIBRARIES`` - uncached list of libraries (using full path name) to link against - to use BLAS95 interface -``BLAS95_FOUND`` - library implementing the BLAS95 interface is found - -.. note:: - - C or CXX must be enabled to use Intel Math Kernel Library (MKL) - - For example, to use Intel MKL libraries and/or Intel compiler: - - .. code-block:: cmake - - set(BLA_VENDOR Intel10_64lp) - find_package(BLAS) - -Hints -^^^^^ - -Set ``MKLROOT`` environment variable to a directory that contains an MKL -installation. - -#]=======================================================================] - -include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) -include(${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake) -include(${CMAKE_ROOT}/Modules/CMakePushCheckState.cmake) -include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) -cmake_push_check_state() -set(CMAKE_REQUIRED_QUIET ${BLAS_FIND_QUIETLY}) - -set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - -# Check the language being used -if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED) ) - if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.") - else() - message(STATUS "Looking for BLAS... - NOT found (Unsupported languages)") - return() - endif() -endif() - -if(BLA_PREFER_PKGCONFIG) - find_package(PkgConfig) - pkg_check_modules(PKGC_BLAS blas) - if(PKGC_BLAS_FOUND) - set(BLAS_FOUND ${PKGC_BLAS_FOUND}) - set(BLAS_LIBRARIES "${PKGC_BLAS_LINK_LIBRARIES}") - return() - endif() -endif() - -macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) - # This macro checks for the existence of the combination of fortran libraries - # given by _list. If the combination is found, this macro checks (using the - # Check_Fortran_Function_Exists macro) whether can link against that library - # combination using the name of a routine given by _name using the linker - # flags given by _flags. If the combination of libraries is found and passes - # the link test, LIBRARIES is set to the list of complete library paths that - # have been found. Otherwise, LIBRARIES is set to FALSE. - - # N.B. _prefix is the prefix applied to the names of all cached variables that - # are generated internally and marked advanced by this macro. - - set(_libdir ${ARGN}) - - set(_libraries_work TRUE) - set(${LIBRARIES}) - set(_combined_name) - if (NOT _libdir) - if (WIN32) - set(_libdir ENV LIB) - elseif (APPLE) - set(_libdir ENV DYLD_LIBRARY_PATH) - else () - set(_libdir ENV LD_LIBRARY_PATH) - endif () - endif () - - list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") - - foreach(_library ${_list}) - set(_combined_name ${_combined_name}_${_library}) - if(NOT "${_thread}" STREQUAL "") - set(_combined_name ${_combined_name}_thread) - endif() - if(_libraries_work) - if (BLA_STATIC) - if (WIN32) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif () - if (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - else () - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif () - else () - if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - # for ubuntu's libblas3gf and liblapack3gf packages - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) - endif () - endif () - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS ${_libdir} - ) - mark_as_advanced(${_prefix}_${_library}_LIBRARY) - set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) - set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) - endif() - endforeach() - if(_libraries_work) - # Test this combination of libraries. - set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_thread}) - # message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") - if (CMAKE_Fortran_COMPILER_LOADED) - check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS) - else() - check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) - endif() - set(CMAKE_REQUIRED_LIBRARIES) - set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) - endif() - if(_libraries_work) - if("${_list}" STREQUAL "") - set(${LIBRARIES} "${LIBRARIES}-PLACEHOLDER-FOR-EMPTY-LIBRARIES") - else() - set(${LIBRARIES} ${${LIBRARIES}} ${_thread}) # for static link - endif() - else() - set(${LIBRARIES} FALSE) - endif() - #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") -endmacro() - -set(BLAS_LINKER_FLAGS) -set(BLAS_LIBRARIES) -set(BLAS95_LIBRARIES) -if (NOT $ENV{BLA_VENDOR} STREQUAL "") - set(BLA_VENDOR $ENV{BLA_VENDOR}) -else () - if(NOT BLA_VENDOR) - set(BLA_VENDOR "All") - endif() -endif () - -if (BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - # Implicitly linked BLAS libraries - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "" - "" - ) - endif() -endif () - -#BLAS in intel mkl 10+ library? (em64t 64bit) -if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") - if (NOT BLAS_LIBRARIES) - - # System-specific settings - if (WIN32) - if (BLA_STATIC) - set(BLAS_mkl_DLL_SUFFIX "") - else() - set(BLAS_mkl_DLL_SUFFIX "_dll") - endif() - else() - # Switch to GNU Fortran support layer if needed (but not on Apple, where MKL does not provide it) - if(CMAKE_Fortran_COMPILER_LOADED AND CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) - set(BLAS_mkl_INTFACE "gf") - set(BLAS_mkl_THREADING "gnu") - set(BLAS_mkl_OMP "gomp") - else() - set(BLAS_mkl_INTFACE "intel") - set(BLAS_mkl_THREADING "intel") - set(BLAS_mkl_OMP "iomp5") - endif() - set(BLAS_mkl_LM "-lm") - set(BLAS_mkl_LDL "-ldl") - endif() - - if (BLA_VENDOR MATCHES "_64ilp") - set(BLAS_mkl_ILP_MODE "ilp64") - else () - set(BLAS_mkl_ILP_MODE "lp64") - endif () - - if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) - if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) - find_package(Threads) - else() - find_package(Threads REQUIRED) - endif() - - set(BLAS_SEARCH_LIBS "") - - if(BLA_F95) - set(BLAS_mkl_SEARCH_SYMBOL sgemm_f95) - set(_LIBRARIES BLAS95_LIBRARIES) - if (WIN32) - # Find the main file (32-bit or 64-bit) - set(BLAS_SEARCH_LIBS_WIN_MAIN "") - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_blas95${BLAS_mkl_DLL_SUFFIX} mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") - endif() - if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_blas95_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX} mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}") - endif () - - # Add threading/sequential libs - set(BLAS_SEARCH_LIBS_WIN_THREAD "") - if (BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "mkl_sequential${BLAS_mkl_DLL_SUFFIX}") - endif() - if (NOT BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") - # mkl >= 10.3 - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") - endif() - - # Cartesian product of the above - foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN}) - foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD}) - list(APPEND BLAS_SEARCH_LIBS - "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}") - endforeach() - endforeach() - else () - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95 mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") - - # mkl >= 10.3 - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95 mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") - endif () - if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95 mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") - - # mkl >= 10.3 - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") - endif () - if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") - endif () - endif () - else () - set(BLAS_mkl_SEARCH_SYMBOL sgemm) - set(_LIBRARIES BLAS_LIBRARIES) - if (WIN32) - # Find the main file (32-bit or 64-bit) - set(BLAS_SEARCH_LIBS_WIN_MAIN "") - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") - endif() - if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}") - endif () - - # Add threading/sequential libs - set(BLAS_SEARCH_LIBS_WIN_THREAD "") - if (NOT BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") - # mkl >= 10.3 - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") - endif() - if (BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "mkl_sequential${BLAS_mkl_DLL_SUFFIX}") - endif() - - # Cartesian product of the above - foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN}) - foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD}) - list(APPEND BLAS_SEARCH_LIBS - "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}") - endforeach() - endforeach() - else () - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS - "mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") - - # mkl >= 10.3 - list(APPEND BLAS_SEARCH_LIBS - "mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") - endif () - if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS - "mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") - - # mkl >= 10.3 - list(APPEND BLAS_SEARCH_LIBS - "mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") - endif () - if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS - "mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") - endif () - - #older vesions of intel mkl libs - if (BLA_VENDOR STREQUAL "Intel" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS - "mkl") - list(APPEND BLAS_SEARCH_LIBS - "mkl_ia32") - list(APPEND BLAS_SEARCH_LIBS - "mkl_em64t") - endif () - endif () - endif () - - if (DEFINED ENV{MKLROOT}) - if (BLA_VENDOR STREQUAL "Intel10_32") - set(_BLAS_MKLROOT_LIB_DIR "$ENV{MKLROOT}/lib/ia32") - elseif (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$") - set(_BLAS_MKLROOT_LIB_DIR "$ENV{MKLROOT}/lib/intel64") - endif () - endif () - if (_BLAS_MKLROOT_LIB_DIR) - if (WIN32) - string(APPEND _BLAS_MKLROOT_LIB_DIR "_win") - elseif (APPLE) - string(APPEND _BLAS_MKLROOT_LIB_DIR "_mac") - else () - string(APPEND _BLAS_MKLROOT_LIB_DIR "_lin") - endif () - endif () - - foreach (IT ${BLAS_SEARCH_LIBS}) - string(REPLACE " " ";" SEARCH_LIBS ${IT}) - if (NOT ${_LIBRARIES}) - check_fortran_libraries( - ${_LIBRARIES} - BLAS - ${BLAS_mkl_SEARCH_SYMBOL} - "" - "${SEARCH_LIBS}" - "${CMAKE_THREAD_LIBS_INIT};${BLAS_mkl_LM};${BLAS_mkl_LDL}" - "${_BLAS_MKLROOT_LIB_DIR}" - ) - endif () - endforeach () - - endif () - unset(BLAS_mkl_ILP_MODE) - unset(BLAS_mkl_INTFACE) - unset(BLAS_mkl_THREADING) - unset(BLAS_mkl_OMP) - unset(BLAS_mkl_DLL_SUFFIX) - unset(BLAS_mkl_LM) - unset(BLAS_mkl_LDL) - endif () -endif () - -if(BLA_F95) - find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES) - set(BLAS95_FOUND ${BLAS_FOUND}) - if(BLAS_FOUND) - set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") - endif() -endif() - -if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - # gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "goto2" - "" - ) - endif() -endif () - -if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - # OpenBLAS (http://www.openblas.net) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "openblas" - "" - ) - endif() - if(NOT BLAS_LIBRARIES) - find_package(Threads) - # OpenBLAS (http://www.openblas.net) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "openblas" - "${CMAKE_THREAD_LIBS_INIT}" - ) - endif() -endif () - -if (BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - # FLAME's blis library (https://github.com/flame/blis) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "blis" - "" - ) - endif() -endif () - -if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - dgemm - "" - "f77blas;atlas" - "" - ) - endif() -endif () - -# BLAS in PhiPACK libraries? (requires generic BLAS lib, too) -if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "sgemm;dgemm;blas" - "" - ) - endif() -endif () - -# BLAS in Alpha CXML library? -if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "cxml" - "" - ) - endif() -endif () - -# BLAS in Alpha DXML library? (now called CXML, see above) -if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "dxml" - "" - ) - endif() -endif () - -# BLAS in Sun Performance library? -if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "-xlic_lib=sunperf" - "sunperf;sunmath" - "" - ) - if(BLAS_LIBRARIES) - set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf") - endif() - endif() -endif () - -# BLAS in SCSL library? (SGI/Cray Scientific Library) -if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "scsl" - "" - ) - endif() -endif () - -# BLAS in SGIMATH library? -if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "complib.sgimath" - "" - ) - endif() -endif () - -# BLAS in IBM ESSL library? (requires generic BLAS lib, too) -if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "essl;blas" - "" - ) - endif() -endif () - -#BLAS in acml library? -if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All") - if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR - ((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR - ((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS)) - ) - # try to find acml in "standard" paths - if( WIN32 ) - file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" ) - else() - file( GLOB _ACML_ROOT "/opt/acml*/ACML-EULA.txt" ) - endif() - if( WIN32 ) - file( GLOB _ACML_GPU_ROOT "C:/AMD/acml*/GPGPUexamples" ) - else() - file( GLOB _ACML_GPU_ROOT "/opt/acml*/GPGPUexamples" ) - endif() - list(GET _ACML_ROOT 0 _ACML_ROOT) - list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT) - if( _ACML_ROOT ) - get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH ) - if( SIZEOF_INTEGER EQUAL 8 ) - set( _ACML_PATH_SUFFIX "_int64" ) - else() - set( _ACML_PATH_SUFFIX "" ) - endif() - if( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" ) - set( _ACML_COMPILER32 "ifort32" ) - set( _ACML_COMPILER64 "ifort64" ) - elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro" ) - set( _ACML_COMPILER32 "sun32" ) - set( _ACML_COMPILER64 "sun64" ) - elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "PGI" ) - set( _ACML_COMPILER32 "pgi32" ) - if( WIN32 ) - set( _ACML_COMPILER64 "win64" ) - else() - set( _ACML_COMPILER64 "pgi64" ) - endif() - elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "Open64" ) - # 32 bit builds not supported on Open64 but for code simplicity - # We'll just use the same directory twice - set( _ACML_COMPILER32 "open64_64" ) - set( _ACML_COMPILER64 "open64_64" ) - elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" ) - set( _ACML_COMPILER32 "nag32" ) - set( _ACML_COMPILER64 "nag64" ) - else() - set( _ACML_COMPILER32 "gfortran32" ) - set( _ACML_COMPILER64 "gfortran64" ) - endif() - - if( BLA_VENDOR STREQUAL "ACML_MP" ) - set(_ACML_MP_LIB_DIRS - "${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib" - "${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" ) - else() - set(_ACML_LIB_DIRS - "${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib" - "${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" ) - endif() - endif() -elseif(BLAS_${BLA_VENDOR}_LIB_DIRS) - set(_${BLA_VENDOR}_LIB_DIRS ${BLAS_${BLA_VENDOR}_LIB_DIRS}) -endif() - -if( BLA_VENDOR STREQUAL "ACML_MP" ) - foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS}) - check_fortran_libraries ( - BLAS_LIBRARIES - BLAS - sgemm - "" "acml_mp;acml_mv" "" ${BLAS_ACML_MP_LIB_DIRS} - ) - if( BLAS_LIBRARIES ) - break() - endif() - endforeach() -elseif( BLA_VENDOR STREQUAL "ACML_GPU" ) - foreach( BLAS_ACML_GPU_LIB_DIRS ${_ACML_GPU_LIB_DIRS}) - check_fortran_libraries ( - BLAS_LIBRARIES - BLAS - sgemm - "" "acml;acml_mv;CALBLAS" "" ${BLAS_ACML_GPU_LIB_DIRS} - ) - if( BLAS_LIBRARIES ) - break() - endif() - endforeach() -else() - foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} ) - check_fortran_libraries ( - BLAS_LIBRARIES - BLAS - sgemm - "" "acml;acml_mv" "" ${BLAS_ACML_LIB_DIRS} - ) - if( BLAS_LIBRARIES ) - break() - endif() - endforeach() -endif() - -# Either acml or acml_mp should be in LD_LIBRARY_PATH but not both -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "acml;acml_mv" - "" - ) -endif() -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "acml_mp;acml_mv" - "" - ) -endif() -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "acml;acml_mv;CALBLAS" - "" - ) -endif() -endif () # ACML - -# Apple BLAS library? -if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - dgemm - "" - "Accelerate" - "" - ) - endif() -endif () - -if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") - if ( NOT BLAS_LIBRARIES ) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - dgemm - "" - "vecLib" - "" - ) - endif () -endif () - -# Generic BLAS library? -if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "blas" - "" - ) - endif() -endif () - -if(NOT BLA_F95) - find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS_LIBRARIES) -endif() - -# On compilers that implicitly link BLAS (such as ftn, cc, and CC on Cray HPC machines) -# we used a placeholder for empty BLAS_LIBRARIES to get through our logic above. -if (BLAS_LIBRARIES STREQUAL "BLAS_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES") - set(BLAS_LIBRARIES "") -endif() - -cmake_pop_check_state() -set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) diff --git a/ports/openblas/fix-marco-conflict.patch b/ports/openblas/fix-marco-conflict.patch new file mode 100644 index 00000000000000..939461875ea6c9 --- /dev/null +++ b/ports/openblas/fix-marco-conflict.patch @@ -0,0 +1,244 @@ +diff --git a/cmake/utils.cmake b/cmake/utils.cmake +index 1c21e77..3894011 100644 +--- a/cmake/utils.cmake ++++ b/cmake/utils.cmake +@@ -251,6 +251,19 @@ function(GenerateNamedObjects sources_in) + # now add the object and set the defines + set(obj_defines ${defines_in}) + ++ list(FIND obj_defines "RC" def_idx) ++ if (${def_idx} GREATER -1) ++ # list(REMOVE_AT ${obj_defines} ${def_idx}) ++ list (REMOVE_ITEM obj_defines "RC") ++ list(APPEND obj_defines "RC=RC") ++ endif () ++ list(FIND obj_defines "CR" def_idx) ++ if (${def_idx} GREATER -1) ++ # list(REMOVE_AT ${obj_defines} ${def_idx}) ++ list (REMOVE_ITEM obj_defines "CR") ++ list(APPEND obj_defines "CR=CR") ++ endif () ++ + if (use_cblas) + set(obj_name "cblas_${obj_name}") + list(APPEND obj_defines "CBLAS") +diff --git a/driver/level3/Makefile b/driver/level3/Makefile +index 09a62d9..970bc58 100644 +--- a/driver/level3/Makefile ++++ b/driver/level3/Makefile +@@ -371,7 +371,7 @@ cgemm_rr.$(SUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + cgemm_rc.$(SUFFIX) : gemm.c level3.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + cgemm_cn.$(SUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -419,7 +419,7 @@ zgemm_rr.$(SUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + zgemm_rc.$(SUFFIX) : gemm.c level3.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + zgemm_cn.$(SUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -467,7 +467,7 @@ xgemm_rr.$(SUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + xgemm_rc.$(SUFFIX) : gemm.c level3.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + xgemm_cn.$(SUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -578,7 +578,7 @@ cgemm_thread_rr.$(SUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + cgemm_thread_rc.$(SUFFIX) : gemm.c level3_thread.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + cgemm_thread_cn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -626,7 +626,7 @@ zgemm_thread_rr.$(SUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + zgemm_thread_rc.$(SUFFIX) : gemm.c level3_thread.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + zgemm_thread_cn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -674,7 +674,7 @@ xgemm_thread_rr.$(SUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + xgemm_thread_rc.$(SUFFIX) : gemm.c level3_thread.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + xgemm_thread_cn.$(SUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -1841,7 +1841,7 @@ cgemm3m_rr.$(SUFFIX) : gemm3m.c gemm3m_level3.c + $(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + cgemm3m_rc.$(SUFFIX) : gemm3m.c gemm3m_level3.c +- $(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + cgemm3m_cn.$(SUFFIX) : gemm3m.c gemm3m_level3.c + $(CC) $(CFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -1889,7 +1889,7 @@ zgemm3m_rr.$(SUFFIX) : gemm3m.c gemm3m_level3.c + $(CC) $(CFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + zgemm3m_rc.$(SUFFIX) : gemm3m.c gemm3m_level3.c +- $(CC) $(CFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + zgemm3m_cn.$(SUFFIX) : gemm3m.c gemm3m_level3.c + $(CC) $(CFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -1937,7 +1937,7 @@ xgemm3m_rr.$(SUFFIX) : gemm3m.c gemm3m_level3.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + xgemm3m_rc.$(SUFFIX) : gemm3m.c gemm3m_level3.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + xgemm3m_cn.$(SUFFIX) : gemm3m.c gemm3m_level3.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -1994,7 +1994,7 @@ cgemm3m_thread_rr.$(SUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + cgemm3m_thread_rc.$(SUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + cgemm3m_thread_cn.$(SUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -2042,7 +2042,7 @@ zgemm3m_thread_rr.$(SUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + zgemm3m_thread_rc.$(SUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + zgemm3m_thread_cn.$(SUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -2090,7 +2090,7 @@ xgemm3m_thread_rr.$(SUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + xgemm3m_thread_rc.$(SUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h +- $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + xgemm3m_thread_cn.$(SUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(CFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -2763,7 +2763,7 @@ cgemm_rr.$(PSUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + cgemm_rc.$(PSUFFIX) : gemm.c level3.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + cgemm_cn.$(PSUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -2811,7 +2811,7 @@ zgemm_rr.$(PSUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + zgemm_rc.$(PSUFFIX) : gemm.c level3.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + zgemm_cn.$(PSUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -2859,7 +2859,7 @@ xgemm_rr.$(PSUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + xgemm_rc.$(PSUFFIX) : gemm.c level3.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + xgemm_cn.$(PSUFFIX) : gemm.c level3.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -2971,7 +2971,7 @@ cgemm_thread_rr.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + cgemm_thread_rc.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + cgemm_thread_cn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -3019,7 +3019,7 @@ zgemm_thread_rr.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + zgemm_thread_rc.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + zgemm_thread_cn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -3067,7 +3067,7 @@ xgemm_thread_rr.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + xgemm_thread_rc.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + xgemm_thread_cn.$(PSUFFIX) : gemm.c level3_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -4234,7 +4234,7 @@ cgemm3m_rr.$(PSUFFIX) : gemm3m.c gemm3m_level3.c + $(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + cgemm3m_rc.$(PSUFFIX) : gemm3m.c gemm3m_level3.c +- $(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + cgemm3m_cn.$(PSUFFIX) : gemm3m.c gemm3m_level3.c + $(CC) $(PFLAGS) $(BLOCKS) -c -UDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -4282,7 +4282,7 @@ zgemm3m_rr.$(PSUFFIX) : gemm3m.c gemm3m_level3.c + $(CC) $(PFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + zgemm3m_rc.$(PSUFFIX) : gemm3m.c gemm3m_level3.c +- $(CC) $(PFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + zgemm3m_cn.$(PSUFFIX) : gemm3m.c gemm3m_level3.c + $(CC) $(PFLAGS) $(BLOCKS) -c -DDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -4330,7 +4330,7 @@ xgemm3m_rr.$(PSUFFIX) : gemm3m.c gemm3m_level3.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + xgemm3m_rc.$(PSUFFIX) : gemm3m.c gemm3m_level3.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + xgemm3m_cn.$(PSUFFIX) : gemm3m.c gemm3m_level3.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DXDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -4387,7 +4387,7 @@ cgemm3m_thread_rr.$(PSUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + cgemm3m_thread_rc.$(PSUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + cgemm3m_thread_cn.$(PSUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -UDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -4435,7 +4435,7 @@ zgemm3m_thread_rr.$(PSUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + zgemm3m_thread_rc.$(PSUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + zgemm3m_thread_cn.$(PSUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DDOUBLE -DCOMPLEX -DCN $< -o $(@F) +@@ -4483,7 +4483,7 @@ xgemm3m_thread_rr.$(PSUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRR $< -o $(@F) + + xgemm3m_thread_rc.$(PSUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h +- $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRC $< -o $(@F) ++ $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DRC=RC $< -o $(@F) + + xgemm3m_thread_cn.$(PSUFFIX) : gemm3m.c level3_gemm3m_thread.c ../../param.h + $(CC) $(PFLAGS) $(BLOCKS) -c -DTHREADED_LEVEL3 -DXDOUBLE -DCOMPLEX -DCN $< -o $(@F) diff --git a/ports/openblas/fix-redefinition-function.patch b/ports/openblas/fix-redefinition-function.patch new file mode 100644 index 00000000000000..176a29ff3fc2ba --- /dev/null +++ b/ports/openblas/fix-redefinition-function.patch @@ -0,0 +1,28 @@ +diff --git a/openblas_config_template.h b/openblas_config_template.h +index 52dd49d..239219d 100644 +--- a/openblas_config_template.h ++++ b/openblas_config_template.h +@@ -64,6 +64,7 @@ typedef int blasint; + #ifndef __cplusplus + #include + #endif ++ #ifndef OPENBLAS_COMPLEX_STRUCT + typedef float _Complex openblas_complex_float; + typedef double _Complex openblas_complex_double; + typedef xdouble _Complex openblas_complex_xdouble; +@@ -76,7 +77,9 @@ typedef int blasint; + #define openblas_complex_double_imag(z) (cimag(z)) + #define openblas_complex_xdouble_real(z) (creal(z)) + #define openblas_complex_xdouble_imag(z) (cimag(z)) ++ #endif + #else ++ #ifndef OPENBLAS_COMPLEX_STRUCT + #define OPENBLAS_COMPLEX_STRUCT + typedef struct { float real, imag; } openblas_complex_float; + typedef struct { double real, imag; } openblas_complex_double; +@@ -90,4 +93,5 @@ typedef int blasint; + #define openblas_complex_double_imag(z) ((z).imag) + #define openblas_complex_xdouble_real(z) ((z).real) + #define openblas_complex_xdouble_imag(z) ((z).imag) ++ #endif + #endif diff --git a/ports/openblas/fix-space-path.patch b/ports/openblas/fix-space-path.patch index 1ceacd90af9dd2..b782a994fe0f5b 100644 --- a/ports/openblas/fix-space-path.patch +++ b/ports/openblas/fix-space-path.patch @@ -1,45 +1,43 @@ -diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake -index fc66eb0..ffaffcf 100644 ---- a/cmake/prebuild.cmake -+++ b/cmake/prebuild.cmake -@@ -296,14 +296,14 @@ else(NOT CMAKE_CROSSCOMPILING) - - set(GETARCH_DIR "${PROJECT_BINARY_DIR}/getarch_build") - set(GETARCH_BIN "getarch${CMAKE_EXECUTABLE_SUFFIX}") -- file(MAKE_DIRECTORY ${GETARCH_DIR}) -- configure_file(${TARGET_CONF_TEMP} ${GETARCH_DIR}/${TARGET_CONF} COPYONLY) -+ file(MAKE_DIRECTORY "${GETARCH_DIR}") -+ configure_file(${TARGET_CONF_TEMP} "${GETARCH_DIR}/${TARGET_CONF}" COPYONLY) - if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") -- try_compile(GETARCH_RESULT ${GETARCH_DIR} -+ try_compile(GETARCH_RESULT "${GETARCH_DIR}" - SOURCES ${GETARCH_SRC} -- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I${GETARCH_DIR} -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}" -+ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I"${GETARCH_DIR}" -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}" - OUTPUT_VARIABLE GETARCH_LOG -- COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH_BIN} -+ COPY_FILE "${PROJECT_BINARY_DIR}/${GETARCH_BIN}" - ) - - if (NOT ${GETARCH_RESULT}) -@@ -324,14 +324,14 @@ execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH_BIN}" 1 OUTPUT_VARIA - - set(GETARCH2_DIR "${PROJECT_BINARY_DIR}/getarch2_build") - set(GETARCH2_BIN "getarch_2nd${CMAKE_EXECUTABLE_SUFFIX}") -- file(MAKE_DIRECTORY ${GETARCH2_DIR}) -- configure_file(${TARGET_CONF_TEMP} ${GETARCH2_DIR}/${TARGET_CONF} COPYONLY) -+ file(MAKE_DIRECTORY "${GETARCH2_DIR}") -+ configure_file(${TARGET_CONF_TEMP} "${GETARCH2_DIR}/${TARGET_CONF}" COPYONLY) - if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") -- try_compile(GETARCH2_RESULT ${GETARCH2_DIR} -- SOURCES ${PROJECT_SOURCE_DIR}/getarch_2nd.c -- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I${GETARCH2_DIR} -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}" -+ try_compile(GETARCH2_RESULT "${GETARCH2_DIR}" -+ SOURCES "${PROJECT_SOURCE_DIR}/getarch_2nd.c" -+ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I"${GETARCH2_DIR}" -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}" - OUTPUT_VARIABLE GETARCH2_LOG -- COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} -+ COPY_FILE "${PROJECT_BINARY_DIR}/${GETARCH2_BIN}" - ) - - if (NOT ${GETARCH2_RESULT}) +diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake +index 58ca1eb..e2f2134 100644 +--- a/cmake/prebuild.cmake ++++ b/cmake/prebuild.cmake +@@ -490,14 +490,14 @@ else(NOT CMAKE_CROSSCOMPILING) + + set(GETARCH_DIR "${PROJECT_BINARY_DIR}/getarch_build") + set(GETARCH_BIN "getarch${CMAKE_EXECUTABLE_SUFFIX}") +- file(MAKE_DIRECTORY ${GETARCH_DIR}) +- configure_file(${TARGET_CONF_TEMP} ${GETARCH_DIR}/${TARGET_CONF} COPYONLY) ++ file(MAKE_DIRECTORY "${GETARCH_DIR}") ++ configure_file(${TARGET_CONF_TEMP} "${GETARCH_DIR}/${TARGET_CONF}" COPYONLY) + if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") +- try_compile(GETARCH_RESULT ${GETARCH_DIR} ++ try_compile(GETARCH_RESULT "${GETARCH_DIR}" + SOURCES ${GETARCH_SRC} + COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I"${GETARCH_DIR}" -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}" + OUTPUT_VARIABLE GETARCH_LOG +- COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH_BIN} ++ COPY_FILE "${PROJECT_BINARY_DIR}/${GETARCH_BIN}" + ) + + if (NOT ${GETARCH_RESULT}) +@@ -518,14 +518,14 @@ execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH_BIN}" 1 OUTPUT_VARIA + + set(GETARCH2_DIR "${PROJECT_BINARY_DIR}/getarch2_build") + set(GETARCH2_BIN "getarch_2nd${CMAKE_EXECUTABLE_SUFFIX}") +- file(MAKE_DIRECTORY ${GETARCH2_DIR}) +- configure_file(${TARGET_CONF_TEMP} ${GETARCH2_DIR}/${TARGET_CONF} COPYONLY) ++ file(MAKE_DIRECTORY "${GETARCH2_DIR}") ++ configure_file(${TARGET_CONF_TEMP} "${GETARCH2_DIR}/${TARGET_CONF}" COPYONLY) + if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") +- try_compile(GETARCH2_RESULT ${GETARCH2_DIR} +- SOURCES ${PROJECT_SOURCE_DIR}/getarch_2nd.c ++ try_compile(GETARCH2_RESULT "${GETARCH2_DIR}" ++ SOURCES "${PROJECT_SOURCE_DIR}/getarch_2nd.c" + COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I"${GETARCH2_DIR}" -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}" + OUTPUT_VARIABLE GETARCH2_LOG +- COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} ++ COPY_FILE "${PROJECT_BINARY_DIR}/${GETARCH2_BIN}" + ) + + if (NOT ${GETARCH2_RESULT}) diff --git a/ports/openblas/fix-uwp-build.patch b/ports/openblas/fix-uwp-build.patch new file mode 100644 index 00000000000000..7604cf736c1c8e --- /dev/null +++ b/ports/openblas/fix-uwp-build.patch @@ -0,0 +1,35 @@ +diff --git a/common_stackalloc.h b/common_stackalloc.h +index d3d5466..cd157fc 100644 +--- a/common_stackalloc.h ++++ b/common_stackalloc.h +@@ -36,7 +36,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #define STACK_ALLOC_PROTECT_CHECK + #endif + +-#if defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 ++#if defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) + + /* + * Allocate a buffer on the stack if the size is smaller than MAX_STACK_ALLOC. +@@ -63,7 +63,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #endif + + +-#if defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 ++#if defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) + #define STACK_FREE(BUFFER) \ + STACK_ALLOC_PROTECT_CHECK \ + if(!stack_alloc_size) \ +diff --git a/interface/zgemv.c b/interface/zgemv.c +index 3e98dba..ee597f7 100644 +--- a/interface/zgemv.c ++++ b/interface/zgemv.c +@@ -244,7 +244,7 @@ void CNAME(enum CBLAS_ORDER order, + buffer_size = (buffer_size + 3) & ~3; + STACK_ALLOC(buffer_size, FLOAT, buffer); + +-#if defined(ARCH_X86_64) && defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 ++#if defined(ARCH_X86_64) && defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) + // cgemv_t.S return NaN if there are NaN or Inf in the buffer (see bug #746) + if(trans && stack_alloc_size) + memset(buffer, 0, MIN(BUFFER_SIZE, sizeof(FLOAT) * buffer_size)); diff --git a/ports/openblas/openblas_common.h b/ports/openblas/openblas_common.h index 10b25d4c7c2d47..9b798e577e50cb 100644 --- a/ports/openblas/openblas_common.h +++ b/ports/openblas/openblas_common.h @@ -1,5 +1,5 @@ #pragma once -#include "openblas_config.h" +#include "openblas/openblas_config.h" #if defined(OPENBLAS_OS_WINNT) || defined(OPENBLAS_OS_CYGWIN_NT) || defined(OPENBLAS_OS_INTERIX) #define OPENBLAS_WINDOWS_ABI @@ -13,6 +13,7 @@ #ifdef NEEDBUNDERSCORE #define BLASFUNC(FUNC) FUNC##_ + #else #define BLASFUNC(FUNC) FUNC #endif @@ -57,16 +58,3 @@ typedef int blasint; predefined macros with some compilers (e.g. GCC 4.7 on Linux). This occurs as a side effect of including either or . */ #include -#define OPENBLAS_COMPLEX_STRUCT -typedef struct { float real, imag; } openblas_complex_float; -typedef struct { double real, imag; } openblas_complex_double; -typedef struct { xdouble real, imag; } openblas_complex_xdouble; -#define openblas_make_complex_float(real, imag) {(real), (imag)} -#define openblas_make_complex_double(real, imag) {(real), (imag)} -#define openblas_make_complex_xdouble(real, imag) {(real), (imag)} -#define openblas_complex_float_real(z) ((z).real) -#define openblas_complex_float_imag(z) ((z).imag) -#define openblas_complex_double_real(z) ((z).real) -#define openblas_complex_double_imag(z) ((z).imag) -#define openblas_complex_xdouble_real(z) ((z).real) -#define openblas_complex_xdouble_imag(z) ((z).imag) diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index 179491cc4aa919..cec9cf2a98c99e 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -1,18 +1,15 @@ -include(vcpkg_common_functions) - -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - message(FATAL_ERROR "openblas can only be built for x64 currently") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xianyi/OpenBLAS - REF v0.3.6 - SHA512 1ad980176a51f70d8b0b2d158da8c01f30f77b7cf385b24a6340d3c5feb1513bd04b9390487d05cc9557db7dc5f7c135b1688dec9f17ebef35dba884ef7ddee9 + REF 904f9a267dddb30e9f187e57231ed160ab2f2704 # v0.3.15 + SHA512 ddb1eba7b0def08483d7610675335648017eff41de3cbe24357bd15c6938c7997f12c449f32d8225abbb5ef8f7a2e7501320ec05e970e8ddf8e4c25fd81e8002 HEAD_REF develop PATCHES uwp.patch fix-space-path.patch + fix-redefinition-function.patch + fix-uwp-build.patch + fix-marco-conflict.patch ) find_program(GIT NAMES git git.cmd) @@ -24,13 +21,33 @@ set(SED_EXE_PATH "${GIT_EXE_PATH}/../usr/bin") # openblas require perl to generate .def for exports vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${SED_EXE_PATH}") +set(PATH_BACKUP "$ENV{PATH}") +vcpkg_add_to_path("${PERL_EXE_PATH}") +vcpkg_add_to_path("${SED_EXE_PATH}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + threads USE_THREAD + simplethread USE_SIMPLE_THREADED_LEVEL3 +) set(COMMON_OPTIONS -DBUILD_WITHOUT_LAPACK=ON) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "dynamic-arch" DYNAMIC_ARCH +) + +if(VCPKG_TARGET_IS_OSX) + if("dynamic-arch" IN_LIST FEATURES) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + message(STATUS "Openblas with \"dynamic-arch\" option for OSX supports only dynamic linkage. It's not a bag of openblas but bug of combination cmake+ninja+osx. See: https://gitlab.kitware.com/cmake/cmake/-/issues/16731") + endif() +endif() + # for UWP version, must build non uwp first for helper # binaries. -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_UWP) message(STATUS "Building Windows helper files") set(TEMP_CMAKE_SYSTEM_NAME "${VCPKG_CMAKE_SYSTEM_NAME}") set(TEMP_CMAKE_SYSTEM_VERSION "${VCPKG_CMAKE_SYSTEM_VERSION}") @@ -41,14 +58,14 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS + OPTIONS ${FEATURE_OPTIONS} ${COMMON_OPTIONS} -DTARGET=NEHALEM ) # add just built path to environment for gen_config_h.exe, # getarch.exe and getarch_2nd.exe - set(ENV{PATH} "$ENV{PATH};${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + vcpkg_add_to_path("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") # restore target build information set(VCPKG_CMAKE_SYSTEM_NAME "${TEMP_CMAKE_SYSTEM_NAME}") @@ -59,26 +76,28 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS + OPTIONS ${COMMON_OPTIONS} -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DVS_WINRT_COMPONENT=TRUE "-DBLASHELPER_BINARY_DIR=${CURRENT_BUILDTREES_DIR}/x64-windows-rel") -elseif(NOT VCPKG_CMAKE_SYSTEM_NAME) +elseif(VCPKG_TARGET_IS_WINDOWS) vcpkg_configure_cmake( PREFER_NINJA SOURCE_PATH ${SOURCE_PATH} OPTIONS - ${COMMON_OPTIONS}) + ${COMMON_OPTIONS} + ${FEATURE_OPTIONS} + ) else() - list(APPEND VCPKG_C_FLAGS "-DNEEDBUNDERSCORE") # Required to get common BLASFUNC to append extra _ - list(APPEND VCPKG_CXX_FLAGS "-DNEEDBUNDERSCORE") + string(APPEND VCPKG_C_FLAGS " -DNEEDBUNDERSCORE") # Required to get common BLASFUNC to append extra _ + string(APPEND VCPKG_CXX_FLAGS " -DNEEDBUNDERSCORE") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS ${COMMON_OPTIONS} - -DCMAKE_SYSTEM_PROCESSOR=AMD64 + ${FEATURE_OPTIONS} -DNOFORTRAN=ON -DBU=_ #required for all blas functions to append extra _ using NAME ) @@ -87,6 +106,23 @@ endif() vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/OpenBLAS TARGET_PATH share/openblas) +set(ENV{PATH} "${PATH_BACKUP}") + +set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/openblas.pc") +if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + #file(CREATE_LINK "${pcfile}" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/blas.pc" COPY_ON_ERROR) +endif() +set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/openblas.pc") +if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + #file(CREATE_LINK "${pcfile}" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/blas.pc" COPY_ON_ERROR) +endif() +vcpkg_fixup_pkgconfig() #maybe we need also to write a wrapper inside share/blas to search implicitly for openblas, whenever we feel it's ready for its own -config.cmake file # openblas do not make the config file , so I manually made this @@ -98,13 +134,8 @@ file(READ ${SOURCE_PATH}/cblas.h CBLAS_H) string(REPLACE "#include \"common.h\"" "#include \"openblas_common.h\"" CBLAS_H "${CBLAS_H}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/cblas.h "${CBLAS_H}") -# openblas is BSD -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/openblas/LICENSE ${CURRENT_PACKAGES_DIR}/share/openblas/copyright) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/blas) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindBLAS.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/blas) - vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openblas/vcpkg-cmake-wrapper.cmake b/ports/openblas/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index fc074f33ca15e6..00000000000000 --- a/ports/openblas/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,2 +0,0 @@ -message(STATUS "Using VCPKG FindBLAS. Remove if CMake has been updated to account for Threads in OpenBLAS!") -include(${CMAKE_CURRENT_LIST_DIR}/FindBLAS.cmake) diff --git a/ports/openblas/vcpkg.json b/ports/openblas/vcpkg.json new file mode 100644 index 00000000000000..e0206c35c26925 --- /dev/null +++ b/ports/openblas/vcpkg.json @@ -0,0 +1,37 @@ +{ + "name": "openblas", + "version": "0.3.15", + "description": "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.", + "homepage": "https://github.com/xianyi/OpenBLAS", + "dependencies": [ + { + "name": "pthread", + "platform": "!windows & !uwp" + } + ], + "features": { + "dynamic-arch": { + "description": "Support for multiple targets in a single library" + }, + "simplethread": { + "description": "Use simple thread", + "dependencies": [ + { + "name": "openblas", + "features": [ + "threads" + ] + } + ] + }, + "threads": { + "description": "Use a threading backend", + "dependencies": [ + { + "name": "pthread", + "platform": "!windows & !uwp" + } + ] + } + } +} diff --git a/ports/opencascade/fix-install-prefix-path.patch b/ports/opencascade/fix-install-prefix-path.patch new file mode 100644 index 00000000000000..f523280ac9e524 --- /dev/null +++ b/ports/opencascade/fix-install-prefix-path.patch @@ -0,0 +1,15 @@ +diff --git a/adm/templates/OpenCASCADEConfig.cmake.in b/adm/templates/OpenCASCADEConfig.cmake.in +index e391ddf..c926c49 100644 +--- a/adm/templates/OpenCASCADEConfig.cmake.in ++++ b/adm/templates/OpenCASCADEConfig.cmake.in +@@ -24,6 +24,7 @@ set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@") + # - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade- + get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) + get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) ++get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) + if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$") + get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) + endif() +-- +2.14.3.windows.1 + diff --git a/ports/opencascade/fix-pdb-find.patch b/ports/opencascade/fix-pdb-find.patch new file mode 100644 index 00000000000000..dd9b108637d03e --- /dev/null +++ b/ports/opencascade/fix-pdb-find.patch @@ -0,0 +1,33 @@ +diff --git a/adm/cmake/cotire.cmake b/adm/cmake/cotire.cmake +index 6cf0cb66..2a9b1793 100644 +--- a/adm/cmake/cotire.cmake ++++ b/adm/cmake/cotire.cmake +@@ -3114,6 +3114,7 @@ function (cotire_setup_unity_build_target _languages _configurations _target) + OSX_ARCHITECTURES OSX_ARCHITECTURES_ PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST + IOS_INSTALL_COMBINED) + # copy Windows platform specific stuff ++ if (BUILD_SHARED_LIBS) + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + GNUtoMS + COMPILE_PDB_NAME COMPILE_PDB_NAME_ +@@ -3129,6 +3130,7 @@ function (cotire_setup_unity_build_target _languages _configurations _target) + WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS + DEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE + VS_SDK_REFERENCES) ++ endif() + # copy Android platform specific stuff + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + ANDROID_API ANDROID_API_MIN ANDROID_GUI +diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake +index 79605059..630a978e 100644 +--- a/adm/cmake/occt_toolkit.cmake ++++ b/adm/cmake/occt_toolkit.cmake +@@ -231,7 +231,7 @@ if (EXECUTABLE_PROJECT) + else() + add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES}) + +- if (MSVC) ++ if (MSVC AND BUILD_SHARED_LIBS) + install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb + CONFIGURATIONS Debug RelWithDebInfo + DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}") diff --git a/ports/opencascade/install-include-dir.patch b/ports/opencascade/install-include-dir.patch new file mode 100644 index 00000000000000..85ab582bd346f8 --- /dev/null +++ b/ports/opencascade/install-include-dir.patch @@ -0,0 +1,31 @@ +From 32c4bdd88555309752215c53842d438cb51bcb62 Mon Sep 17 00:00:00 2001 +From: bloess +Date: Mon, 15 Feb 2021 16:26:36 +0100 +Subject: [PATCH] install include-dir + +--- + CMakeLists.txt | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 100d613..464f95a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1171,6 +1171,14 @@ foreach (OCCT_MODULE ${OCCT_MODULES}) + endforeach() + set (OCCT_MODULES_ENABLED ${OCCT_MODULES_ENABLED_SORTED}) + ++foreach (OCCT_LIBRARY ${OCCT_LIBRARIES}) ++ target_include_directories( ++ ${OCCT_LIBRARY} ++ INTERFACE ++ $) ++ ++endforeach() ++ + # Add all targets to the build-tree export set + export (TARGETS ${OCCT_LIBRARIES} FILE "${CMAKE_BINARY_DIR}/OpenCASCADETargets.cmake") + +-- +2.14.3.windows.1 + diff --git a/ports/opencascade/portfile.cmake b/ports/opencascade/portfile.cmake new file mode 100644 index 00000000000000..86fc2a34eb80f4 --- /dev/null +++ b/ports/opencascade/portfile.cmake @@ -0,0 +1,110 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP" "OSX" "Linux") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Open-Cascade-SAS/OCCT + REF 628c0211d53c7fe1036a85e7a7b2b067c9c50f7a #V7.5.0 + SHA512 8d946e971417642264b318353fb34ebabf214bff5c705c60818da9e56e9cd658ed15b76b73d7207edffa398c23ad9982f4e9656b218b5edada325ca05c1283bb + HEAD_REF master + PATCHES + fix-pdb-find.patch + fix-install-prefix-path.patch + install-include-dir.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_TYPE "Shared") +else() + set(BUILD_TYPE "Static") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "freeimage" USE_FREEIMAGE + "tbb" USE_TBB +) + +# VTK option in opencascade not currently supported because only 6.1.0 is supported but vcpkg has >= 9.0 + + +# We turn off BUILD_MODULE_Draw as it requires TCL 8.6 and TK 8.6 specifically which conflicts with vcpkg only having TCL 9.0 +# And pre-built ActiveTCL binaries are behind a marketing wall :( +# We use the Unix install layout for Windows as it matches vcpkg +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_LIBRARY_TYPE=${BUILD_TYPE} + -DBUILD_MODULE_Draw=OFF + -DINSTALL_DIR_LAYOUT=Unix + -DBUILD_SAMPLES_MFC=OFF + -DBUILD_SAMPLES_QT=OFF + -DBUILD_DOC_Overview=OFF + -DINSTALL_TEST_CASES=OFF + -DINSTALL_SAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/opencascade) + +#make occt includes relative to source_file +list(APPEND ADDITIONAL_HEADERS + "ExprIntrp.tab.h" + "FlexLexer.h" + "glext.h" + "igesread.h" + "NCollection_Haft.h" + "OSD_PerfMeter.h" + "Standard_values.h" + ) + +file(GLOB files "${CURRENT_PACKAGES_DIR}/include/opencascade/[a-zA-Z0-9_]*\.[hgl]xx") +foreach(file_name ${files}) + file(READ ${file_name} filedata) + string(REGEX REPLACE "# *include \<([a-zA-Z0-9_]*\.[hgl]xx)\>" "#include \"\\1\"" filedata "${filedata}") + foreach(extra_header ${ADDITIONAL_HEADERS}) + string(REGEX REPLACE "# *include \<${extra_header}\>" "#include \"${extra_header}\"" filedata "${filedata}") + endforeach() + file(WRITE ${file_name} "${filedata}") +endforeach() + +# Remove libd to lib, libd just has cmake files we dont want too +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/libd ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + # debug creates libd and bind directories that need moving + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bind ${CURRENT_PACKAGES_DIR}/debug/bin) + + # fix paths in target files + list(APPEND TARGET_FILES + ${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEApplicationFrameworkTargets-debug.cmake + ${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADECompileDefinitionsAndFlags-debug.cmake + ${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEDataExchangeTargets-debug.cmake + ${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEFoundationClassesTargets-debug.cmake + ${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEModelingAlgorithmsTargets-debug.cmake + ${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEModelingDataTargets-debug.cmake + ${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEVisualizationTargets-debug.cmake + ) + + foreach(TARGET_FILE ${TARGET_FILES}) + file(READ ${TARGET_FILE} filedata) + string(REGEX REPLACE "libd" "lib" filedata "${filedata}") + string(REGEX REPLACE "bind" "bin" filedata "${filedata}") + file(WRITE ${TARGET_FILE} ${filedata}) + endforeach() + + # the bin directory ends up with bat files that are noise, let's clean that up + file(GLOB BATS ${CURRENT_PACKAGES_DIR}/bin/*.bat) + file(REMOVE_RECURSE ${BATS}) +else() + # remove scripts in bin dir + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/OCCT_LGPL_EXCEPTION.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/opencascade/vcpkg.json b/ports/opencascade/vcpkg.json new file mode 100644 index 00000000000000..8296c5a98ccefc --- /dev/null +++ b/ports/opencascade/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "opencascade", + "version-string": "7.5.0", + "port-version": 2, + "description": "Open CASCADE Technology (OCCT) is an open-source software development platform for 3D CAD, CAM, CAE.", + "supports": "!(uwp | osx | linux | arm)", + "dependencies": [ + "freetype" + ], + "features": { + "freeimage": { + "description": "Enable optional usage of freeimage", + "dependencies": [ + "freeimage" + ] + }, + "tbb": { + "description": "Enable optional usage of tbb", + "dependencies": [ + "tbb" + ] + } + } +} diff --git a/ports/opencc/portfile.cmake b/ports/opencc/portfile.cmake new file mode 100644 index 00000000000000..c67b2d33fc0e9e --- /dev/null +++ b/ports/opencc/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BYVoid/OpenCC + REF e8ec6d59f264a4a42e310148a9534a8cc0123928 + SHA512 e6b3f6d681223b299795c324a48e82609abd1f411d3cbd5f9d8607284ec04717fa9878953d037c25a931a0857f50a5c0e883e0d44ddbea18c50830ad49514c59 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_DIR}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_DOCUMENTATION=OFF + -DENABLE_GTEST=OFF +) + +vcpkg_install_cmake( + DISABLE_PARALLEL +) + +vcpkg_copy_pdbs() + +if(tools IN_LIST FEATURES) + foreach(opencc_tool opencc opencc_dict opencc_phrase_extract) + file(COPY + ${CURRENT_PACKAGES_DIR}/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} + ) + endforeach() + + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + foreach(opencc_tool opencc opencc_dict opencc_phrase_extract) + file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/debug/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX} + ) + endforeach() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/opencc/vcpkg.json b/ports/opencc/vcpkg.json new file mode 100644 index 00000000000000..dc346293c31b3d --- /dev/null +++ b/ports/opencc/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "opencc", + "version-string": "2020-04-26", + "port-version": 8, + "description": "A project for conversion between Traditional and Simplified Chinese", + "homepage": "https://github.com/BYVoid/OpenCC", + "supports": "!(arm | arm64 | uwp)", + "features": { + "tools": { + "description": "Build OpenCC command-line tools" + } + } +} diff --git a/ports/opencensus-cpp/fix-install.patch b/ports/opencensus-cpp/fix-install.patch new file mode 100644 index 00000000000000..ac8781da3f3596 --- /dev/null +++ b/ports/opencensus-cpp/fix-install.patch @@ -0,0 +1,154 @@ +diff --git a/cmake/OpenCensusHelpers.cmake b/cmake/OpenCensusHelpers.cmake +index c8d35e6..a15231a 100644 +--- a/cmake/OpenCensusHelpers.cmake ++++ b/cmake/OpenCensusHelpers.cmake +@@ -38,6 +38,13 @@ function(opencensus_test NAME SRC) + gmock + gtest_main) + add_test(NAME ${_NAME} COMMAND ${_NAME}) ++ ++ install( ++ TARGETS ${_NAME} ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + endfunction() + +@@ -51,6 +58,13 @@ function(opencensus_benchmark NAME SRC) + add_executable(${_NAME} ${SRC}) + prepend_opencensus(DEPS "${ARGN}") + target_link_libraries(${_NAME} "${DEPS}" benchmark) ++ ++ install( ++ TARGETS ${_NAME} ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + endfunction() + +@@ -76,6 +90,13 @@ function(opencensus_lib NAME) + if(ARG_PUBLIC) + add_library(${PROJECT_NAME}::${NAME} ALIAS ${_NAME}) + endif() ++ ++ install( ++ TARGETS ${_NAME} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endfunction() + + # Helper function for fuzzing. Usage: +@@ -88,5 +109,12 @@ function(opencensus_fuzzer NAME SRC) + prepend_opencensus(DEPS "${ARGN}") + target_link_libraries(${_NAME} "${DEPS}" ${FUZZER}) + target_compile_options(${_NAME} PRIVATE ${FUZZER}) ++ ++ install( ++ TARGETS ${_NAME} ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + endfunction() +diff --git a/examples/helloworld/CMakeLists.txt b/examples/helloworld/CMakeLists.txt +index 456169f..71e43d1 100644 +--- a/examples/helloworld/CMakeLists.txt ++++ b/examples/helloworld/CMakeLists.txt +@@ -22,3 +22,10 @@ target_link_libraries(opencensus_examples_helloworld + opencensus-cpp::stats + opencensus-cpp::trace + Threads::Threads) ++ ++install( ++ TARGETS opencensus_examples_helloworld ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) +\ No newline at end of file +diff --git a/opencensus/common/internal/CMakeLists.txt b/opencensus/common/internal/CMakeLists.txt +index c18859d..55a1121 100644 +--- a/opencensus/common/internal/CMakeLists.txt ++++ b/opencensus/common/internal/CMakeLists.txt +@@ -21,6 +21,8 @@ opencensus_lib(common_random + absl::base + absl::synchronization + absl::time) ++ ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/../version.h DESTINATION include/opencensus-cpp/common/internal) + + opencensus_lib(common_stats_object DEPS absl::time) + +diff --git a/opencensus/context/CMakeLists.txt b/opencensus/context/CMakeLists.txt +index 525885b..537de02 100644 +--- a/opencensus/context/CMakeLists.txt ++++ b/opencensus/context/CMakeLists.txt +@@ -21,6 +21,10 @@ opencensus_lib(context + tags + trace) + ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/context.h ++ ${CMAKE_CURRENT_LIST_DIR}/with_context.h ++ DESTINATION include/opencensus-cpp/context) ++ + opencensus_test(context_context_test + internal/context_test.cc + context +diff --git a/opencensus/exporters/stats/prometheus/CMakeLists.txt b/opencensus/exporters/stats/prometheus/CMakeLists.txt +index 4da7de7..39121f5 100644 +--- a/opencensus/exporters/stats/prometheus/CMakeLists.txt ++++ b/opencensus/exporters/stats/prometheus/CMakeLists.txt +@@ -28,6 +28,8 @@ opencensus_lib(exporters_stats_prometheus_utils + absl::strings + absl::time + prometheus-cpp::core) ++ ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/prometheus_exporter.h DESTINATION include/opencensus-cpp/exporters/stats/prometheus) + + opencensus_test(exporters_stats_prometheus_utils_test + internal/prometheus_utils_test.cc +diff --git a/opencensus/exporters/stats/stdout/CMakeLists.txt b/opencensus/exporters/stats/stdout/CMakeLists.txt +index b4f3110..31bc991 100644 +--- a/opencensus/exporters/stats/stdout/CMakeLists.txt ++++ b/opencensus/exporters/stats/stdout/CMakeLists.txt +@@ -21,6 +21,8 @@ opencensus_lib(exporters_stats_stdout + absl::memory + absl::strings + absl::time) ++ ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/stdout_exporter.h DESTINATION include/opencensus-cpp/exporters/stats/stdout) + + opencensus_test(exporters_stats_stdout_test + internal/stdout_exporter_test.cc +diff --git a/opencensus/exporters/trace/stdout/CMakeLists.txt b/opencensus/exporters/trace/stdout/CMakeLists.txt +index 2b8bc78..fce50e7 100644 +--- a/opencensus/exporters/trace/stdout/CMakeLists.txt ++++ b/opencensus/exporters/trace/stdout/CMakeLists.txt +@@ -21,6 +21,7 @@ opencensus_lib(exporters_trace_stdout + absl::base + absl::memory) + ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/stdout_exporter.h DESTINATION include/opencensus-cpp/exporters/trace/stdout) + opencensus_test(exporters_trace_stdout_test + internal/stdout_exporter_test.cc + exporters_trace_stdout +diff --git a/opencensus/tags/CMakeLists.txt b/opencensus/tags/CMakeLists.txt +index dbc4c9b..1b304ce 100644 +--- a/opencensus/tags/CMakeLists.txt ++++ b/opencensus/tags/CMakeLists.txt +@@ -40,6 +40,8 @@ opencensus_lib(tags_with_tag_map + context + absl::strings) + ++file(GLOB TAGS_HDRS ${CMAKE_CURRENT_LIST_DIR}/*.h) ++install(FILES ${TAGS_HDRS} DESTINATION include/opencensus-cpp/tags) + opencensus_test(tags_context_util_test + internal/context_util_test.cc + tags diff --git a/ports/opencensus-cpp/portfile.cmake b/ports/opencensus-cpp/portfile.cmake new file mode 100644 index 00000000000000..be9283a5ec8b0f --- /dev/null +++ b/ports/opencensus-cpp/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO census-instrumentation/opencensus-cpp + REF 2b0725c2d0f809351300c634c54e70e0a8c3f4ed #v0.4.0 + SHA512 16f3975ed0580aec83e0dd98f15a04d614cf45bfa7e07b0b94e881afc12e8e4bac3c0efde1f8e7da9f5dc66365415ae1e3ab10dfcbd9e078879246db6e81cd56 + HEAD_REF master + PATCHES fix-install.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_TESTING +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/opencensus-cpp/vcpkg.json b/ports/opencensus-cpp/vcpkg.json new file mode 100644 index 00000000000000..892a8754e7c715 --- /dev/null +++ b/ports/opencensus-cpp/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "opencensus-cpp", + "version-string": "0.4.0", + "port-version": 2, + "description": "OpenCensus is a toolkit for collecting application performance and behavior data. It currently includes an API for tracing and stats.", + "homepage": "https://github.com/census-instrumentation/opencensus-cpp", + "supports": "!windows", + "dependencies": [ + "abseil" + ], + "features": { + "test": { + "description": "Build test" + } + } +} diff --git a/ports/opencl/0001-include-unistd-for-gete-ug-id.patch b/ports/opencl/0001-include-unistd-for-gete-ug-id.patch new file mode 100644 index 00000000000000..4674aff794ca4d --- /dev/null +++ b/ports/opencl/0001-include-unistd-for-gete-ug-id.patch @@ -0,0 +1,27 @@ +From 0f783f1a8eac7a78bc92198e140d4a5c745382ca Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 11:50:21 -0700 +Subject: [PATCH] include unistd for gete?[ug]id + +--- + loader/linux/icd_linux_envvars.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/loader/linux/icd_linux_envvars.c b/loader/linux/icd_linux_envvars.c +index 4af5a08..92b0698 100644 +--- a/loader/linux/icd_linux_envvars.c ++++ b/loader/linux/icd_linux_envvars.c +@@ -25,6 +25,10 @@ + + #include + ++#if defined(__APPLE__) ++#include ++#endif ++ + char *khrIcd_getenv(const char *name) { + // No allocation of memory necessary for Linux. + return getenv(name); +-- +2.24.3 (Apple Git-128) + diff --git a/ports/opencl/CONTROL b/ports/opencl/CONTROL deleted file mode 100644 index 32308ad5d1a6c4..00000000000000 --- a/ports/opencl/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: opencl -Version: 2.2 (2017.07.18)-1 -Homepage: https://github.com/KhronosGroup/OpenCL-Headers -Description: C/C++ headers and ICD loader (Installable Client Driver) for OpenCL diff --git a/ports/opencl/portfile.cmake b/ports/opencl/portfile.cmake index 54096512fd4904..ad9c5c59937e5e 100644 --- a/ports/opencl/portfile.cmake +++ b/ports/opencl/portfile.cmake @@ -1,28 +1,19 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - -# OpenCL C headers vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/OpenCL-Headers - REF f039db6764d52388658ef15c30b2237bbda49803 - SHA512 5909a85f96477d731059528303435f06255e98ed8df9d4cd2b62c744b5fe41408c69c0d4068421a2813eb9ad9d70d7f1bace9ebf0db19cc09e71bb8066127c5f + REF 0d5f18c6e7196863bc1557a693f1509adfcee056 + SHA512 7e8fa6c8e73c660d8e9e31ddea3bfef887ed827fc21a1da559bde9dd4af6c52a91f609401bb718528b5c96d21e4c01aee7b8027bdf3dec4b0aa326270788a4b0 HEAD_REF master ) -file(INSTALL - "${SOURCE_PATH}/opencl22/CL" - DESTINATION - ${CURRENT_PACKAGES_DIR}/include -) +file(INSTALL "${SOURCE_PATH}/CL" DESTINATION ${CURRENT_PACKAGES_DIR}/include) # OpenCL C++ headers vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/OpenCL-CLHPP - REF 5dd8bb9e32a8e2f72621566b296ac8143a554270 - SHA512 2909fe2b979b52724ef8d285180d8bfd30bdd56cb79da4effc9e03b576ec7edb5497c99a9fa30541fe63037c84ddef21d4a73e7927f3813baab2a2afeecd55ab + REF d62a02090625655e5b2d791d6a58618b043c989c + SHA512 837bbe914931d2f18a468f21634dbd4d088eda0a2f22eea23304c0323b9ee064c3ee76db7ebf28ba67fbe07c44129241f8dca62512d89bc7a6b35c2b4b316ed7 HEAD_REF master ) @@ -49,39 +40,66 @@ message(STATUS "Generating OpenCL C++ headers done") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/OpenCL-ICD-Loader - REF 26a38983cbe5824fd5be03eab8d037758fc44360 - SHA512 3029f758ff0c39b57aa10d881af68e73532fd179c54063ed1d4529b7d6e27a5219e3c24b7fb5598d790ebcdc2441e00001a963671dc90fef2fc377c76d724f54 + REF e6e30ab9c7a61c171cf68d2e7f5c0ce28e2a4eae + SHA512 f3563c0a4c094d3795d8386ec0db41189d350ab8136d80ae5de611ee3db87fbb0ab851bad2b33e111eddf135add5dbfef77d96979473ca5a23c036608d443378 HEAD_REF master + PATCHES + 0001-include-unistd-for-gete-ug-id.patch ) +string(COMPARE EQUAL ${VCPKG_CRT_LINKAGE} dynamic USE_DYNAMIC_VCXX_RUNTIME) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DOPENCL_INCLUDE_DIRS=${CURRENT_PACKAGES_DIR}/include + -DOPENCL_ICD_LOADER_HEADERS_DIR=${CURRENT_PACKAGES_DIR}/include + -DOPENCL_ICD_LOADER_REQUIRE_WDK=OFF + -DUSE_DYNAMIC_VCXX_RUNTIME=${USE_DYNAMIC_VCXX_RUNTIME} ) vcpkg_build_cmake(TARGET OpenCL) -file(INSTALL - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/OpenCL.lib" - DESTINATION - ${CURRENT_PACKAGES_DIR}/lib -) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +else() + if(VCPKG_TARGET_IS_WINDOWS) + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + elseif(VCPKG_TARGET_IS_LINUX) + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1.2" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1.2" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + elseif(VCPKG_TARGET_IS_OSX) + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + endif() +endif() -file(INSTALL - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/OpenCL.lib" - DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/lib -) +vcpkg_copy_pdbs() -file(INSTALL - "${SOURCE_PATH}/LICENSE.txt" - DESTINATION - ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright -) -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/usage - DESTINATION - ${CURRENT_PACKAGES_DIR}/share/${PORT} -) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/opencl/usage b/ports/opencl/usage index 699ff0170655ff..adcd2232f07f43 100644 --- a/ports/opencl/usage +++ b/ports/opencl/usage @@ -1,7 +1,16 @@ -The package opencl is compatible with built-in CMake targets: +The package opencl is compatible with built-in CMake targets via CMake v3.6 and prior syntax find_package(OpenCL REQUIRED) target_link_libraries(main PRIVATE ${OpenCL_LIBRARIES}) target_include_directories(main PRIVATE ${OpenCL_INCLUDE_DIRS}) -You will also need to install an appropriate driver package from your CPU/GPU manufacturer. +and the CMake v3.7 and beyond imported target syntax + + find_package(OpenCL REQUIRED) + target_link_libraries(main PRIVATE OpenCL::OpenCL) + +This package is only an OpenCL SDK. To actually run OpenCL code you also need to install an implementation. + + WINDOWS: implementations typically ship with the drivers of you CPU/GPU vendors. + LINUX: implementations may be installed from your distro's repo or manually. There are too many to count. + APPLE: consult your distribution vendor on the state of OpenCL support: https://support.apple.com/en-us/HT202823 diff --git a/ports/opencl/vcpkg-cmake-wrapper.cmake b/ports/opencl/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..0893710ff58a4a --- /dev/null +++ b/ports/opencl/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,18 @@ +_find_package(${ARGS}) +if(NOT BUILD_SHARED_LIBS AND (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")) + find_package(Threads REQUIRED) + set(OpenCL_Extra_Libs ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) + if(CMAKE_SYSTEM_NAME MATCHES "Windows") + list(APPEND OpenCL_Extra_Libs cfgmgr32) + if($ENV{WindowsSDKVersion} MATCHES "^10") + list(APPEND OpenCL_Extra_Libs OneCoreUAP) + endif() + endif(CMAKE_SYSTEM_NAME MATCHES "Windows") + + if(TARGET OpenCL::OpenCL) + set_property(TARGET OpenCL::OpenCL APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${OpenCL_Extra_Libs}) + endif() + if(OpenCL_LIBRARIES) + list(APPEND OpenCL_LIBRARIES ${OpenCL_Extra_Libs}) + endif() +endif() \ No newline at end of file diff --git a/ports/opencl/vcpkg.json b/ports/opencl/vcpkg.json new file mode 100644 index 00000000000000..633a0ab8c874f4 --- /dev/null +++ b/ports/opencl/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "opencl", + "version-string": "2.2", + "port-version": 8, + "description": "C/C++ headers and ICD loader (Installable Client Driver) for OpenCL", + "homepage": "https://github.com/KhronosGroup/OpenCL-Headers", + "supports": "!uwp" +} diff --git a/ports/opencolorio/fix-pystring-name.patch b/ports/opencolorio/fix-pystring-name.patch new file mode 100644 index 00000000000000..50a4ef5b7d197b --- /dev/null +++ b/ports/opencolorio/fix-pystring-name.patch @@ -0,0 +1,13 @@ +diff --git a/share/cmake/modules/Findpystring.cmake b/share/cmake/modules/Findpystring.cmake +index a3e396de..4022ddf5 100644 +--- a/share/cmake/modules/Findpystring.cmake ++++ b/share/cmake/modules/Findpystring.cmake +@@ -50,7 +50,7 @@ if(NOT OCIO_INSTALL_EXT_PACKAGES STREQUAL ALL) + # Find library + find_library(pystring_LIBRARY + NAMES +- ${_pystring_STATIC} pystring ++ ${_pystring_STATIC} pystring libpystring + HINTS + ${_pystring_SEARCH_DIRS} + PATH_SUFFIXES diff --git a/ports/opencolorio/portfile.cmake b/ports/opencolorio/portfile.cmake new file mode 100644 index 00000000000000..5967543b01bf71 --- /dev/null +++ b/ports/opencolorio/portfile.cmake @@ -0,0 +1,59 @@ + +vcpkg_download_distfile(config_patch_path + URLS https://patch-diff.githubusercontent.com/raw/AcademySoftwareFoundation/OpenColorIO/pull/1397.diff + FILENAME AcademySoftwareFoundation-OpenColorIO-b8e18214b.diff + SHA512 34a1afb79521e43138b8a695817a9eaf6c0de8cc1d85b4640967d0ad531287a4beb41660d461067cb67103fb3ee90e11bc50e1426a0d1ae6050f3ca434dd2f3d +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AcademySoftwareFoundation/OpenColorIO + REF 0645fdd6b5279ab94851af0c56919ff9800e0c38 # v2.0.1 + SHA512 51568e21eaf863747f67fbcffa7f42ba32f5892e8295dac6c9deb0f6205f57c231ea34ce028d84915e4be2f2773e362b74eaf057c2e4cf3ad4b60bf13a0b73db + HEAD_REF master + PATCHES + ${config_patch_path} + fix-pystring-name.patch + use-find-openexr.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools OCIO_BUILD_APPS +) + + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DOCIO_BUILD_NUKE:BOOL=OFF + -DOCIO_BUILD_DOCS:BOOL=OFF + -DOCIO_BUILD_TESTS:BOOL=OFF + -DOCIO_BUILD_GPU_TESTS:BOOL=OFF + -DOCIO_BUILD_PYTHON:BOOL=OFF + -DOCIO_INSTALL_EXT_PACKAGES=NONE + -DCMAKE_DISABLE_FIND_PACKAGE_OpenImageIO=On + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/OpenColorIO") + +vcpkg_copy_pdbs() + +# Clean redundant files +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/OpenColorIOConfig.cmake + ${CURRENT_PACKAGES_DIR}/OpenColorIOConfig.cmake +) +if (OCIO_BUILD_APPS) + vcpkg_copy_tools( + TOOL_NAMES ociowrite ociomakeclf ociochecklut ociocheck ociobakelut + AUTO_CLEAN + ) +endif() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/opencolorio/use-find-openexr.patch b/ports/opencolorio/use-find-openexr.patch new file mode 100644 index 00000000000000..24f05e5a3fd8cc --- /dev/null +++ b/ports/opencolorio/use-find-openexr.patch @@ -0,0 +1,13 @@ +diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake +index 8d9bfdd7..cce2fde2 100644 +--- a/share/cmake/modules/FindExtPackages.cmake ++++ b/share/cmake/modules/FindExtPackages.cmake +@@ -34,7 +34,7 @@ find_package(yaml-cpp 0.6.3 REQUIRED) + + # Half (OpenEXR/IlmBase) + # https://github.com/openexr/openexr +-find_package(Half 2.4.0 REQUIRED) ++find_package(OpenEXR 2.4.0 CONFIG REQUIRED) + + # pystring + # https://github.com/imageworks/pystring diff --git a/ports/opencolorio/vcpkg.json b/ports/opencolorio/vcpkg.json new file mode 100644 index 00000000000000..f7be1eae537d04 --- /dev/null +++ b/ports/opencolorio/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "opencolorio", + "version-semver": "2.0.1", + "port-version": 1, + "description": "OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation. OCIO provides a straightforward and consistent user experience across all supporting applications while allowing for sophisticated back-end configuration options suitable for high-end production usage. OCIO is compatible with the Academy Color Encoding Specification (ACES) and is LUT-format agnostic, supporting many popular formats.", + "homepage": "https://opencolorio.org/", + "dependencies": [ + "expat", + "openexr", + "pystring", + { + "name": "vcpkg-cmake", + "host": true + }, + "yaml-cpp" + ], + "features": { + "tools": { + "description": "Installs tools", + "dependencies": [ + "glew", + "lcms" + ] + } + } +} diff --git a/ports/opencsg/CONTROL b/ports/opencsg/CONTROL deleted file mode 100644 index a2b5b0d7feb9e3..00000000000000 --- a/ports/opencsg/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: opencsg -Version: 1.4.2 -Build-Depends: glew -Description: OpenCSG is a library that does image-based CSG rendering using OpenGL. OpenCSG is written in C++ and supports most modern graphics hardware using Microsoft Windows or the Linux operating system. diff --git a/ports/opencsg/portfile.cmake b/ports/opencsg/portfile.cmake index e43a89ec552639..939b873cb8e5a6 100644 --- a/ports/opencsg/portfile.cmake +++ b/ports/opencsg/portfile.cmake @@ -1,17 +1,3 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -35,5 +21,4 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencsg RENAME copyright) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/opencsg/vcpkg.json b/ports/opencsg/vcpkg.json new file mode 100644 index 00000000000000..829a0f63aabde9 --- /dev/null +++ b/ports/opencsg/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "opencsg", + "version-string": "1.4.2", + "port-version": 2, + "description": "OpenCSG is a library that does image-based CSG rendering using OpenGL. OpenCSG is written in C++ and supports most modern graphics hardware using Microsoft Windows or the Linux operating system.", + "dependencies": [ + "glew" + ] +} diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL deleted file mode 100644 index 7b5ba5af93765b..00000000000000 --- a/ports/opencv/CONTROL +++ /dev/null @@ -1,102 +0,0 @@ -Source: opencv -Version: 4.1.1-1 -Homepage: https://github.com/opencv/opencv -Description: Computer vision library -Build-Depends: opencv4[core] -Default-Features: dnn, jpeg, opengl, png, tiff, webp - -Feature: nonfree -Build-Depends: opencv4[nonfree] -Description: opencv nonfree module - -Feature: ade -Build-Depends: opencv4[ade] -Description: graph api - -Feature: contrib -Build-Depends: opencv4[contrib] -Description: opencv_contrib module - -Feature: cuda -Build-Depends: opencv4[cuda] -Description: CUDA support for opencv - -Feature: dnn -Build-Depends: opencv4[dnn] -Description: Enable dnn module - -Feature: eigen -Build-Depends: opencv4[eigen] -Description: Eigen support for opencv - -Feature: ffmpeg -Build-Depends: opencv4[ffmpeg] -Description: ffmpeg support for opencv - -Feature: gdcm -Build-Depends: opencv4[gdcm] -Description: GDCM support for opencv - -Feature: ipp -Build-Depends: opencv4[ipp] -Description: Enable Intel Integrated Performance Primitives - -Feature: jasper -Build-Depends: opencv4[jasper] -Description: JPEG 2000 support for opencv - -Feature: jpeg -Build-Depends: opencv4[jpeg] -Description: JPEG support for opencv - -Feature: openexr -Build-Depends: opencv4[openexr] -Description: OpenEXR support for opencv - -Feature: opengl -Build-Depends: opencv4[opengl] -Description: opengl support for opencv - -Feature: openmp -Build-Depends: opencv4[openmp] -Description: Enable openmp support for opencv - -Feature: ovis -Build-Depends: opencv4[ovis] -Description: opencv_ovis module - -Feature: png -Build-Depends: opencv4[png] -Description: PNG support for opencv - -Feature: qt -Build-Depends: opencv4[qt] -Description: Qt GUI support for opencv - -Feature: sfm -Build-Depends: opencv4[sfm] -Description: opencv_sfm module - -Feature: tbb -Build-Depends: opencv4[tbb] -Description: Enable Intel Threading Building Blocks - -Feature: tiff -Build-Depends: opencv4[tiff] -Description: TIFF support for opencv - -Feature: vtk -Build-Depends: opencv4[vtk] -Description: vtk support for opencv - -Feature: webp -Build-Depends: opencv4[webp] -Description: WebP support for opencv - -Feature: halide -Build-Depends: opencv4[halide] -Description: Halide support for opencv - -Feature: world -Build-Depends: opencv4[world] -Description: Compile to a single package support for opencv diff --git a/ports/opencv/vcpkg.json b/ports/opencv/vcpkg.json new file mode 100644 index 00000000000000..23374c7cc4943a --- /dev/null +++ b/ports/opencv/vcpkg.json @@ -0,0 +1,346 @@ +{ + "name": "opencv", + "version": "4.5.3", + "description": "Computer vision library", + "homepage": "https://github.com/opencv/opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false + } + ], + "default-features": [ + "dnn", + "jpeg", + "png", + "quirc", + "tiff", + "webp" + ], + "features": { + "ade": { + "description": "graph api", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "ade" + ] + } + ] + }, + "contrib": { + "description": "opencv_contrib module", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "contrib" + ] + } + ] + }, + "cuda": { + "description": "CUDA support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "cuda" + ] + } + ] + }, + "cudnn": { + "description": "cuDNN support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "cudnn" + ] + } + ] + }, + "dnn": { + "description": "Enable dnn module", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "dnn" + ] + } + ] + }, + "eigen": { + "description": "Eigen support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "eigen" + ] + } + ] + }, + "ffmpeg": { + "description": "ffmpeg support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "ffmpeg" + ] + } + ] + }, + "gdcm": { + "description": "GDCM support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "gdcm" + ] + } + ] + }, + "halide": { + "description": "Halide support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "halide" + ] + } + ] + }, + "ipp": { + "description": "Enable Intel Integrated Performance Primitives", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "ipp" + ] + } + ] + }, + "jasper": { + "description": "JPEG 2000 support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "jasper" + ] + } + ] + }, + "jpeg": { + "description": "JPEG support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "jpeg" + ] + } + ] + }, + "lapack": { + "description": "LAPACK support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "lapack" + ] + } + ] + }, + "nonfree": { + "description": "opencv nonfree module", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "nonfree" + ] + } + ] + }, + "openexr": { + "description": "OpenEXR support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "openexr" + ] + } + ] + }, + "opengl": { + "description": "opengl support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "opengl" + ] + } + ] + }, + "openmp": { + "description": "Enable openmp support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "openmp" + ] + } + ] + }, + "ovis": { + "description": "opencv_ovis module", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "ovis" + ] + } + ] + }, + "png": { + "description": "PNG support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "png" + ] + } + ] + }, + "qt": { + "description": "Qt GUI support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "qt" + ] + } + ] + }, + "quirc": { + "description": "Enable QR code module", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "quirc" + ] + } + ] + }, + "sfm": { + "description": "opencv_sfm module", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "sfm" + ] + } + ] + }, + "tbb": { + "description": "Enable Intel Threading Building Blocks", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "tbb" + ] + } + ] + }, + "tiff": { + "description": "TIFF support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "tiff" + ] + } + ] + }, + "vtk": { + "description": "vtk support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "vtk" + ] + } + ] + }, + "webp": { + "description": "WebP support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "webp" + ] + } + ] + }, + "world": { + "description": "Compile to a single package support for opencv", + "dependencies": [ + { + "name": "opencv4", + "default-features": false, + "features": [ + "world" + ] + } + ] + } + } +} diff --git a/ports/opencv2/0002-install-options.patch b/ports/opencv2/0002-install-options.patch new file mode 100644 index 00000000000000..206fb287554ea4 --- /dev/null +++ b/ports/opencv2/0002-install-options.patch @@ -0,0 +1,359 @@ +diff --git a/3rdparty/libtiff/CMakeLists.txt b/3rdparty/libtiff/CMakeLists.txt +index b0e076f..3f7ade1 100644 +--- a/3rdparty/libtiff/CMakeLists.txt ++++ b/3rdparty/libtiff/CMakeLists.txt +@@ -102,7 +102,7 @@ if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)) + endif() + + add_library(${TIFF_LIBRARY} STATIC ${lib_srcs}) +-target_link_libraries(${TIFF_LIBRARY} ${ZLIB_LIBRARIES}) ++target_link_libraries(${TIFF_LIBRARY} ZLIB::ZLIB) + + set_target_properties(${TIFF_LIBRARY} + PROPERTIES +diff --git a/3rdparty/openexr/CMakeLists.txt b/3rdparty/openexr/CMakeLists.txt +index 9387616..54ecc1a 100644 +--- a/3rdparty/openexr/CMakeLists.txt ++++ b/3rdparty/openexr/CMakeLists.txt +@@ -55,7 +55,7 @@ if(MSVC AND CV_ICC) + endif() + + add_library(IlmImf STATIC ${lib_hdrs} ${lib_srcs}) +-target_link_libraries(IlmImf ${ZLIB_LIBRARIES}) ++target_link_libraries(IlmImf ZLIB::ZLIB) + + set_target_properties(IlmImf + PROPERTIES +diff --git a/3rdparty/tbb/CMakeLists.txt b/3rdparty/tbb/CMakeLists.txt +index fd8ef32..fe571a2 100644 +--- a/3rdparty/tbb/CMakeLists.txt ++++ b/3rdparty/tbb/CMakeLists.txt +@@ -116,7 +116,7 @@ endif() + + if(NOT EXISTS "${tbb_tarball}") + message(STATUS "Downloading ${tbb_ver}_src.tgz") +- file(DOWNLOAD "${tbb_url}" "${tbb_tarball}" TIMEOUT 600 STATUS __statvar) ++ message(FATAL_ERROR " Downloads are not permitted during configure. Please pre-download the file \"${CACHE_CANDIDATE}\":\n \n vcpkg_download_distfile(OCV_DOWNLOAD\n URLS \"${tbb_url}\"\n FILENAME \"${tbb_tarball}\"\n SHA512 0\n )") + if(NOT __statvar EQUAL 0) + message(FATAL_ERROR "Failed to download TBB sources (${__statvar}): ${tbb_url}") + endif() +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 90e16c2..6601820 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -275,23 +275,10 @@ if (ANDROID) + endif() + + if(NOT DEFINED OPENCV_DOC_INSTALL_PATH) +- if(ANDROID OR WIN32) +- set(OPENCV_DOC_INSTALL_PATH doc) +- elseif(INSTALL_TO_MANGLED_PATHS) +- set(OPENCV_DOC_INSTALL_PATH share/OpenCV-${OPENCV_VERSION}/doc) +- else() +- set(OPENCV_DOC_INSTALL_PATH share/OpenCV/doc) +- endif() ++ set(OPENCV_DOC_INSTALL_PATH share/opencv/doc) + endif() + +-if(WIN32) +- if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) +- set(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") +- else() +- message(STATUS "Can't detect runtime and/or arch") +- set(OpenCV_INSTALL_BINARIES_PREFIX "") +- endif() +-elseif(ANDROID) ++if(ANDROID) + set(OpenCV_INSTALL_BINARIES_PREFIX "sdk/native/") + else() + set(OpenCV_INSTALL_BINARIES_PREFIX "") +@@ -322,29 +309,13 @@ if(ANDROID) + set(OPENCV_INCLUDE_INSTALL_PATH sdk/native/jni/include) + set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native) + else() +- set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib") +- set(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}") +- if(WIN32) +- if(OpenCV_STATIC) +- set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") +- else() +- set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") +- endif() +- set(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") +- set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native) +- else() +- set(OPENCV_LIB_INSTALL_PATH lib${LIB_SUFFIX}) +- set(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}) +- set(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples) +- endif() +- set(OPENCV_INCLUDE_INSTALL_PATH "include") +- +- math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}") +- if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX) +- set(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/cmake/opencv) +- else() +- set(OPENCV_CONFIG_INSTALL_PATH share/OpenCV) +- endif() ++ set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib") ++ set(3P_LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}") ++ set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib") ++ set(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}") ++ set(OPENCV_SAMPLES_SRC_INSTALL_PATH "share/opencv/samples") ++ set(OPENCV_INCLUDE_INSTALL_PATH "include") ++ set(OPENCV_CONFIG_INSTALL_PATH "share/opencv") + endif() + + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}") +@@ -356,7 +327,7 @@ endif() + + if(WIN32) + # Postfix of DLLs: +- set(OPENCV_DLLVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}") ++ set(OPENCV_DLLVERSION "") + set(OPENCV_DEBUG_POSTFIX d) + else() + # Postfix of so's: +@@ -397,8 +368,6 @@ if(CMAKE_HOST_WIN32) + endif() + endif() + +-find_host_program(GIT_EXECUTABLE NAMES ${git_names} PATH_SUFFIXES Git/cmd Git/bin DOC "git command line client") +-mark_as_advanced(GIT_EXECUTABLE) + + if(GIT_EXECUTABLE) + execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always --dirty --match "2.[0-9].[0-9]*" +@@ -501,7 +470,6 @@ if(BUILD_DOCS) + endif(BUILD_DOCS) + + # --- Python Support --- +-include(cmake/OpenCVDetectPython.cmake) + + # --- Java Support --- + include(cmake/OpenCVDetectApacheAnt.cmake) +@@ -885,11 +853,7 @@ if(ANDROID) + endif() + + if(DEFINED WITH_FFMPEG OR HAVE_FFMPEG) +- if(WIN32) +- status(" FFMPEG:" WITH_FFMPEG THEN "YES (prebuilt binaries)" ELSE NO) +- else() + status(" FFMPEG:" HAVE_FFMPEG THEN YES ELSE NO) +- endif() + status(" avcodec:" FFMPEG_libavcodec_FOUND THEN "YES (ver ${FFMPEG_libavcodec_VERSION})" ELSE NO) + status(" avformat:" FFMPEG_libavformat_FOUND THEN "YES (ver ${FFMPEG_libavformat_VERSION})" ELSE NO) + status(" avutil:" FFMPEG_libavutil_FOUND THEN "YES (ver ${FFMPEG_libavutil_VERSION})" ELSE NO) +diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake +index e61059a..ec6f34f 100644 +--- a/cmake/OpenCVCompilerOptions.cmake ++++ b/cmake/OpenCVCompilerOptions.cmake +@@ -269,7 +269,6 @@ if(MSVC) + set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /bigobj") + endif() + if(BUILD_WITH_DEBUG_INFO) +- set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /Zi") + endif() + + if(ENABLE_SSE4_1 AND CV_ICC AND NOT OPENCV_EXTRA_FLAGS MATCHES "/arch:") +diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake +index 146043f..1202225 100644 +--- a/cmake/OpenCVFindLibsVideo.cmake ++++ b/cmake/OpenCVFindLibsVideo.cmake +@@ -185,12 +185,8 @@ endif(WITH_XIMEA) + # --- FFMPEG --- + ocv_clear_vars(HAVE_FFMPEG) + if(WITH_FFMPEG) +- if(WIN32 AND NOT ARM) +- include("${OpenCV_SOURCE_DIR}/3rdparty/ffmpeg/ffmpeg_version.cmake") ++ find_package(FFMPEG REQUIRED) + set(HAVE_FFMPEG TRUE) +- elseif(PKG_CONFIG_FOUND) +- ocv_check_modules(FFMPEG libavcodec libavformat libavutil libswscale) +- ocv_check_modules(FFMPEG_libavresample libavresample) + if(FFMPEG_libavresample_FOUND) + ocv_append_build_options(FFMPEG FFMPEG_libavresample) + endif() +@@ -211,9 +207,6 @@ if(WITH_FFMPEG) + ocv_append_build_options(HIGHGUI FFMPEG) + endif() + endif() +- else() +- message(STATUS "Can't find ffmpeg - 'pkg-config' utility is missing") +- endif() + endif(WITH_FFMPEG) + + # --- VideoInput/DirectShow --- +diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake +index dacfbb1..3760866 100644 +--- a/cmake/OpenCVGenConfig.cmake ++++ b/cmake/OpenCVGenConfig.cmake +@@ -101,7 +101,7 @@ endif() + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" @ONLY) + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake" @ONLY) + +-if(UNIX) # ANDROID configuration is created here also ++if(1) # ANDROID configuration is created here also + #http://www.vtk.org/Wiki/CMake/Tutorials/Packaging reference + # For a command "find_package( [major[.minor]] [EXACT] [REQUIRED|QUIET])" + # cmake will look in the following dir on unix: +@@ -126,7 +126,7 @@ endif() + # -------------------------------------------------------------------------------------------- + # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages + # -------------------------------------------------------------------------------------------- +-if(WIN32) ++if(0) + set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_CONFIG_PATH}/include\" \"\${OpenCV_CONFIG_PATH}/include/opencv\"") + set(OpenCV2_INCLUDE_DIRS_CONFIGCMAKE "\"\"") + +diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake +index 6f9fb0b..56f8879 100644 +--- a/cmake/OpenCVModule.cmake ++++ b/cmake/OpenCVModule.cmake +@@ -86,10 +86,10 @@ macro(ocv_add_dependencies full_modname) + endforeach() + unset(__depsvar) + +- ocv_list_unique(OPENCV_MODULE_${full_modname}_REQ_DEPS) +- ocv_list_unique(OPENCV_MODULE_${full_modname}_OPT_DEPS) +- ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_REQ_DEPS) +- ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_OPT_DEPS) ++ #ocv_list_unique(OPENCV_MODULE_${full_modname}_REQ_DEPS) ++ #ocv_list_unique(OPENCV_MODULE_${full_modname}_OPT_DEPS) ++ #ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_REQ_DEPS) ++ #ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_OPT_DEPS) + + set(OPENCV_MODULE_${full_modname}_REQ_DEPS ${OPENCV_MODULE_${full_modname}_REQ_DEPS} + CACHE INTERNAL "Required dependencies of ${full_modname} module") +@@ -277,7 +277,7 @@ endfunction() + + # sort modules by dependencies + function(__ocv_sort_modules_by_deps __lst) +- ocv_list_sort(${__lst}) ++ #ocv_list_sort(${__lst}) + set(${__lst}_ORDERED ${${__lst}} CACHE INTERNAL "") + set(__result "") + foreach (m ${${__lst}}) +@@ -382,7 +382,7 @@ function(__ocv_resolve_dependencies) + endforeach() + endforeach() + +- ocv_list_sort(OPENCV_MODULES_BUILD) ++ #ocv_list_sort(OPENCV_MODULES_BUILD) + + foreach(m ${OPENCV_MODULES_BUILD}) + # message(STATUS "FULL deps of ${m}: ${deps_${m}}") +@@ -397,7 +397,7 @@ function(__ocv_resolve_dependencies) + # reorder dependencies + foreach(m ${OPENCV_MODULES_BUILD}) + __ocv_sort_modules_by_deps(OPENCV_MODULE_${m}_DEPS) +- ocv_list_sort(OPENCV_MODULE_${m}_DEPS_EXT) ++ #ocv_list_sort(OPENCV_MODULE_${m}_DEPS_EXT) + + set(OPENCV_MODULE_${m}_DEPS ${OPENCV_MODULE_${m}_DEPS} CACHE INTERNAL "Flattened dependencies of ${m} module") + set(OPENCV_MODULE_${m}_DEPS_EXT ${OPENCV_MODULE_${m}_DEPS_EXT} CACHE INTERNAL "Extra dependencies of ${m} module") +diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt +index e3177bd..f902b2b 100644 +--- a/data/CMakeLists.txt ++++ b/data/CMakeLists.txt +@@ -5,8 +5,6 @@ if(ANDROID) + install(FILES ${HAAR_CASCADES} DESTINATION sdk/etc/haarcascades COMPONENT libs) + install(FILES ${LBP_CASCADES} DESTINATION sdk/etc/lbpcascades COMPONENT libs) + else() +- install(FILES ${HAAR_CASCADES} DESTINATION share/OpenCV/haarcascades COMPONENT libs) +- install(FILES ${LBP_CASCADES} DESTINATION share/OpenCV/lbpcascades COMPONENT libs) + endif() + + if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) +@@ -51,4 +49,4 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) + install(FILES ${DATAFILES_CASCADES} DESTINATION share/OpenCV/testdata/data/haarcascades COMPONENT tests) + endif() + endif() +-endif() +\ No newline at end of file ++endif() +diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt +index d9de52d..be604dc 100644 +--- a/modules/core/CMakeLists.txt ++++ b/modules/core/CMakeLists.txt +@@ -1,9 +1,9 @@ + set(the_description "The Core Functionality") + + if (NOT HAVE_CUDA OR ENABLE_DYNAMIC_CUDA) +- ocv_add_module(core PRIVATE_REQUIRED ${ZLIB_LIBRARIES}) ++ ocv_add_module(core PRIVATE_REQUIRED ZLIB::ZLIB) + else() +- ocv_add_module(core PRIVATE_REQUIRED ${ZLIB_LIBRARIES} ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) ++ ocv_add_module(core PRIVATE_REQUIRED ZLIB::ZLIB ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) + endif() + + ocv_module_include_directories("${OpenCV_SOURCE_DIR}/modules/dynamicuda/include/" ${ZLIB_INCLUDE_DIR}) +diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt +index d59e95a..ce7f87b 100644 +--- a/modules/highgui/CMakeLists.txt ++++ b/modules/highgui/CMakeLists.txt +@@ -15,23 +15,23 @@ endif() + + if(HAVE_PNG OR HAVE_TIFF OR HAVE_OPENEXR) + ocv_include_directories(${ZLIB_INCLUDE_DIR}) +- list(APPEND GRFMT_LIBS ${ZLIB_LIBRARIES}) ++ list(APPEND GRFMT_LIBS ZLIB::ZLIB) + endif() + + if(HAVE_JPEG) + ocv_include_directories(${JPEG_INCLUDE_DIR}) +- list(APPEND GRFMT_LIBS ${JPEG_LIBRARIES}) ++ list(APPEND GRFMT_LIBS JPEG::JPEG) + endif() + + if(HAVE_PNG) + add_definitions(${PNG_DEFINITIONS}) + ocv_include_directories(${PNG_INCLUDE_DIR}) +- list(APPEND GRFMT_LIBS ${PNG_LIBRARIES}) ++ list(APPEND GRFMT_LIBS PNG::PNG) + endif() + + if(HAVE_TIFF) + ocv_include_directories(${TIFF_INCLUDE_DIR}) +- list(APPEND GRFMT_LIBS ${TIFF_LIBRARIES}) ++ list(APPEND GRFMT_LIBS TIFF::TIFF) + endif() + + if(HAVE_JASPER) +@@ -296,38 +296,5 @@ endif() + ocv_add_precompiled_headers(${the_module}) + ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-deprecated-declarations -Wno-clobbered) + +-if(WIN32 AND WITH_FFMPEG) +- #copy ffmpeg dll to the output folder +- if(MSVC64 OR MINGW64) +- set(FFMPEG_SUFFIX _64) +- endif() +- +- set(ffmpeg_bare_name "opencv_ffmpeg${FFMPEG_SUFFIX}.dll") +- set(ffmpeg_bare_name_ver "opencv_ffmpeg${OPENCV_DLLVERSION}${FFMPEG_SUFFIX}.dll") +- set(ffmpeg_path "${OpenCV_SOURCE_DIR}/3rdparty/ffmpeg/${ffmpeg_bare_name}") +- +- #if(MSVC AND CMAKE_VERSION VERSION_GREATER "2.8.2") +- # add_custom_command(TARGET ${the_module} POST_BUILD +- # COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/$/${ffmpeg_bare_name_ver}" +- # COMMENT "Copying ${ffmpeg_path} to the output directory") +- #else +- if(MSVC_IDE) +- add_custom_command(TARGET ${the_module} POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/Release/${ffmpeg_bare_name_ver}" +- COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/Debug/${ffmpeg_bare_name_ver}" +- COMMENT "Copying ${ffmpeg_path} to the output directory") +- elseif(MSVC AND (CMAKE_GENERATOR MATCHES "Visual")) +- add_custom_command(TARGET ${the_module} POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/${ffmpeg_bare_name_ver}" +- COMMENT "Copying ${ffmpeg_path} to the output directory") +- else() +- add_custom_command(TARGET ${the_module} POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/${ffmpeg_bare_name_ver}" +- COMMENT "Copying ${ffmpeg_path} to the output directory") +- endif() +- +- install(FILES "${ffmpeg_path}" DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs RENAME "${ffmpeg_bare_name_ver}") +-endif() +- + ocv_add_accuracy_tests() + ocv_add_perf_tests() diff --git a/ports/opencv2/0003-force-package-requirements.patch b/ports/opencv2/0003-force-package-requirements.patch new file mode 100644 index 00000000000000..aea8936516aed2 --- /dev/null +++ b/ports/opencv2/0003-force-package-requirements.patch @@ -0,0 +1,58 @@ +diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake +index 43c3b16..9b43066 100644 +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -6,7 +6,7 @@ + if(BUILD_ZLIB) + ocv_clear_vars(ZLIB_FOUND) + else() +- include(FindZLIB) ++ find_package(ZLIB REQUIRED) + if(ZLIB_FOUND AND ANDROID) + if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so" OR + ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib64/libz.so") +@@ -32,7 +32,7 @@ if(WITH_TIFF) + if(BUILD_TIFF) + ocv_clear_vars(TIFF_FOUND) + else() +- include(FindTIFF) ++ find_package(TIFF REQUIRED) + if(TIFF_FOUND) + ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) + endif() +@@ -74,7 +74,7 @@ if(WITH_JPEG) + if(BUILD_JPEG) + ocv_clear_vars(JPEG_FOUND) + else() +- include(FindJPEG) ++ find_package(JPEG REQUIRED) + endif() + + if(NOT JPEG_FOUND) +@@ -95,7 +95,7 @@ if(WITH_JASPER) + if(BUILD_JASPER) + ocv_clear_vars(JASPER_FOUND) + else() +- include(FindJasper) ++ find_package(Jasper REQUIRED) + endif() + + if(NOT JASPER_FOUND) +@@ -119,7 +119,7 @@ if(WITH_PNG) + if(BUILD_PNG) + ocv_clear_vars(PNG_FOUND) + else() +- include(FindPNG) ++ find_package(PNG REQUIRED) + if(PNG_FOUND) + include(CheckIncludeFile) + check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) +@@ -151,7 +151,7 @@ if(WITH_OPENEXR) + if(BUILD_OPENEXR) + ocv_clear_vars(OPENEXR_FOUND) + else() +- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") ++ find_package(OpenEXR REQUIRED) + endif() + + if(NOT OPENEXR_FOUND) diff --git a/ports/opencv2/0004-add-ffmpeg-missing-defines.patch b/ports/opencv2/0004-add-ffmpeg-missing-defines.patch new file mode 100644 index 00000000000000..638581d01c66f5 --- /dev/null +++ b/ports/opencv2/0004-add-ffmpeg-missing-defines.patch @@ -0,0 +1,12 @@ +--- a/modules/highgui/src/cap_ffmpeg_impl.hpp ++++ b/modules/highgui/src/cap_ffmpeg_impl.hpp +@@ -42,6 +42,9 @@ + + #define HAVE_FFMPEG_SWSCALE + #define HAVE_GENTOO_FFMPEG ++#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22) ++#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++#define AVFMT_RAWPICTURE 0x0020 + + #include "cap_ffmpeg_api.hpp" + #include diff --git a/ports/opencv2/0005-fix-cuda.patch b/ports/opencv2/0005-fix-cuda.patch new file mode 100644 index 00000000000000..c5e21401a96c8e --- /dev/null +++ b/ports/opencv2/0005-fix-cuda.patch @@ -0,0 +1,138 @@ +--- a/cmake/OpenCVDetectCUDA.cmake ++++ b/cmake/OpenCVDetectCUDA.cmake +@@ -51,7 +51,7 @@ if(CUDA_FOUND) + + message(STATUS "CUDA detected: " ${CUDA_VERSION}) + +- set(_generations "Fermi" "Kepler") ++ set(_generations "Kepler" "Maxwell") + if(NOT CMAKE_CROSSCOMPILING) + list(APPEND _generations "Auto") + endif() +@@ -70,14 +70,10 @@ if(CUDA_FOUND) + endif() + + set(__cuda_arch_ptx "") +- if(CUDA_GENERATION STREQUAL "Fermi") +- set(__cuda_arch_bin "2.0 2.1(2.0)") +- elseif(CUDA_GENERATION STREQUAL "Kepler") +- if(${CUDA_VERSION} VERSION_LESS "5.0") +- set(__cuda_arch_bin "3.0") +- else() +- set(__cuda_arch_bin "3.0 3.5") +- endif() ++ if(CUDA_GENERATION STREQUAL "Kepler") ++ set(__cuda_arch_bin "3.0 3.5 3.7") ++ elseif(CUDA_GENERATION STREQUAL "Maxwell") ++ set(__cuda_arch_bin "5.0 5.2") + elseif(CUDA_GENERATION STREQUAL "Auto") + execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/" +@@ -87,7 +83,6 @@ if(CUDA_FOUND) + message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.") + else() + set(__cuda_arch_bin "${_nvcc_out}") +- string(REPLACE "2.1" "2.1(2.0)" __cuda_arch_bin "${__cuda_arch_bin}") + endif() + endif() + +@@ -102,11 +97,11 @@ if(CUDA_FOUND) + endif() + else() + if(${CUDA_VERSION} VERSION_LESS "5.0") +- set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0") ++ set(__cuda_arch_bin "3.0") + elseif(${CUDA_VERSION} VERSION_GREATER "6.5") +- set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5") ++ set(__cuda_arch_bin "3.0 3.5") + else() +- set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5") ++ set(__cuda_arch_bin "3.0 3.5") + endif() + set(__cuda_arch_ptx "3.0") + endif() +diff --git a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in +index fe85571..0f9d2f5 100644 +--- a/cmake/templates/OpenCVConfig.cmake.in ++++ b/cmake/templates/OpenCVConfig.cmake.in +@@ -256,7 +256,7 @@ if(OpenCV_CUDA_VERSION) + + set(OpenCV_CUDA_LIBS_ABSPATH ${CUDA_LIBRARIES}) + +- if(${CUDA_VERSION} VERSION_LESS "5.5") ++ if(CUDA_VERSION VERSION_LESS "5.5") + list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_npp_LIBRARY}) + else() + find_cuda_helper_libs(nppc) +@@ -281,14 +281,16 @@ if(OpenCV_CUDA_VERSION) + list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvenc_LIBRARIES}) + endif() + ++ set(OpenCV_CUDA_LIBS_RELPATH "") + foreach(l ${OpenCV_CUDA_LIBS_ABSPATH}) +- get_filename_component(_tmp "${l}" NAME_WE) +- string(REGEX REPLACE "^lib" "" _tmp "${_tmp}") +- if(NOT TARGET "opencv_dep_${_tmp}") # protect against repeated inclusions +- add_library("opencv_dep_${_tmp}" UNKNOWN IMPORTED) +- set_target_properties("opencv_dep_${_tmp}" PROPERTIES IMPORTED_LOCATION "${l}") ++ get_filename_component(_tmp ${l} PATH) ++ if(NOT ${_tmp} MATCHES "-Wl.*") ++ list(APPEND OpenCV_CUDA_LIBS_RELPATH ${_tmp}) + endif() + endforeach() ++ ++ list(REMOVE_DUPLICATES OpenCV_CUDA_LIBS_RELPATH) ++ link_directories(${OpenCV_CUDA_LIBS_RELPATH}) + endif() + + # ============================================================== +diff --git a/cmake/OpenCVDetectCUDA.cmake b/cmake/OpenCVDetectCUDA.cmake +index 30b5093..50dcdc9 100644 +--- a/cmake/OpenCVDetectCUDA.cmake ++++ b/cmake/OpenCVDetectCUDA.cmake +@@ -229,18 +229,40 @@ else() + endif() + + if(HAVE_CUDA) ++ set(CUDA_LIBS_PATH "") ++ foreach(p ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) ++ get_filename_component(_tmp ${p} PATH) ++ list(APPEND CUDA_LIBS_PATH ${_tmp}) ++ endforeach() ++ ++ if(HAVE_CUBLAS) ++ foreach(p ${CUDA_cublas_LIBRARY}) ++ get_filename_component(_tmp ${p} PATH) ++ list(APPEND CUDA_LIBS_PATH ${_tmp}) ++ endforeach() ++ endif() ++ ++ if(HAVE_CUFFT) ++ foreach(p ${CUDA_cufft_LIBRARY}) ++ get_filename_component(_tmp ${p} PATH) ++ list(APPEND CUDA_LIBS_PATH ${_tmp}) ++ endforeach() ++ endif() ++ ++ list(REMOVE_DUPLICATES CUDA_LIBS_PATH) ++ link_directories(${CUDA_LIBS_PATH}) ++ + set(CUDA_LIBRARIES_ABS ${CUDA_LIBRARIES}) +- ocv_create_imported_targets(CUDA_LIBRARIES ${CUDA_LIBRARIES}) ++ ocv_convert_to_lib_name(CUDA_LIBRARIES ${CUDA_LIBRARIES}) + set(CUDA_npp_LIBRARY_ABS ${CUDA_npp_LIBRARY}) +- ocv_create_imported_targets(CUDA_npp_LIBRARY ${CUDA_npp_LIBRARY}) +- ++ ocv_convert_to_lib_name(CUDA_npp_LIBRARY ${CUDA_npp_LIBRARY}) + if(HAVE_CUBLAS) + set(CUDA_cublas_LIBRARY_ABS ${CUDA_cublas_LIBRARY}) +- ocv_create_imported_targets(CUDA_cublas_LIBRARY ${CUDA_cublas_LIBRARY}) ++ ocv_convert_to_lib_name(CUDA_cublas_LIBRARY ${CUDA_cublas_LIBRARY}) + endif() + + if(HAVE_CUFFT) + set(CUDA_cufft_LIBRARY_ABS ${CUDA_cufft_LIBRARY}) +- ocv_create_imported_targets(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY}) ++ ocv_convert_to_lib_name(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY}) + endif() + endif() diff --git a/ports/opencv2/portfile.cmake b/ports/opencv2/portfile.cmake new file mode 100644 index 00000000000000..bc6805f48ac63e --- /dev/null +++ b/ports/opencv2/portfile.cmake @@ -0,0 +1,126 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv3") + message(FATAL_ERROR "OpenCV 3 is installed, please uninstall and try again:\n vcpkg remove opencv3") +endif() + +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv4") + message(FATAL_ERROR "OpenCV 4 is installed, please uninstall and try again:\n vcpkg remove opencv4") +endif() + +if (VCPKG_TARGET_IS_UWP) + # - opengl feature is broken on UWP + # - jasper and openexr are not available on UWP due to missing dependencies + # - opencv2 code itself fails even if previous conditions are avoided + message(FATAL_ERROR "${PORT} doesn't support UWP") +endif() + +set(OPENCV_VERSION "2.4.13.7") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO opencv/opencv + REF ${OPENCV_VERSION} + SHA512 de7d24ac7ed78ac14673011cbecc477cae688b74222a972e553c95a557b5cb8e5913f97db525421d6a72af30998ca300112fa0b285daed65f65832eb2cf7241a + HEAD_REF master + PATCHES + 0002-install-options.patch + 0003-force-package-requirements.patch + 0004-add-ffmpeg-missing-defines.patch + 0005-fix-cuda.patch +) + +file(REMOVE "${SOURCE_PATH}/cmake/FindCUDA.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/FindCUDA") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "cuda" WITH_CUDA + "eigen" WITH_EIGEN + "ffmpeg" WITH_FFMPEG + "jasper" WITH_JASPER + "jpeg" WITH_JPEG + "openexr" WITH_OPENEXR + "opengl" WITH_OPENGL + "png" WITH_PNG + "qt" WITH_QT + "tiff" WITH_TIFF + "world" BUILD_opencv_world +) + +set(WITH_MSMF ON) +if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + set(WITH_MSMF OFF) +endif() + +if("ffmpeg" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}") + set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}") + endif() +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ###### ocv_options + -DCMAKE_DEBUG_POSTFIX=d + # Do not build docs/examples + -DBUILD_DOCS=OFF + -DBUILD_EXAMPLES=OFF + ###### Disable build 3rd party libs + -DBUILD_JASPER=OFF + -DBUILD_JPEG=OFF + -DBUILD_OPENEXR=OFF + -DBUILD_PNG=OFF + -DBUILD_TIFF=OFF + -DBUILD_TBB=OFF + -DBUILD_ZLIB=OFF + ###### OpenCV Build components + -DBUILD_opencv_apps=OFF + -DBUILD_PACKAGE=OFF + -DBUILD_PERF_TESTS=OFF + -DBUILD_TESTS=OFF + -DBUILD_WITH_DEBUG_INFO=ON + # CMAKE + -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON + ###### customized properties + ## Options from vcpkg_check_features() + ${FEATURE_OPTIONS} + -DWITH_1394=OFF + -DWITH_IPP=OFF + -DWITH_LAPACK=OFF + -DWITH_MSMF=${WITH_MSMF} + -DWITH_OPENCLAMDBLAS=OFF + -DWITH_OPENMP=OFF + -DWITH_ZLIB=ON + -DWITH_CUBLAS=OFF # newer libcublas cannot be found by the old cuda cmake script in opencv2, requires a fix +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv") +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES) + string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1) +find_package(CUDA QUIET) +find_package(Threads QUIET) +find_package(PNG QUIET) +find_package(OpenEXR QUIET) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +find_package(Qt5 COMPONENTS OpenGL Concurrent Test QUIET) +find_package(TIFF QUIET)" OPENCV_MODULES "${OPENCV_MODULES}") + + file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" "${OPENCV_MODULES}") + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/opencv2/vcpkg.json b/ports/opencv2/vcpkg.json new file mode 100644 index 00000000000000..db74a35649dbe3 --- /dev/null +++ b/ports/opencv2/vcpkg.json @@ -0,0 +1,101 @@ +{ + "name": "opencv2", + "version": "2.4.13.7", + "port-version": 6, + "description": "computer vision library", + "homepage": "https://github.com/opencv/opencv", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "default-features": [ + "eigen", + "jpeg", + "png", + "tiff" + ], + "features": { + "cuda": { + "description": "CUDA support for opencv", + "dependencies": [ + "cuda" + ] + }, + "eigen": { + "description": "Eigen support for opencv", + "dependencies": [ + "eigen3" + ] + }, + "ffmpeg": { + "description": "ffmpeg support for opencv", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avformat", + "swresample", + "swscale" + ] + } + ] + }, + "jasper": { + "description": "JPEG 2000 support for opencv", + "dependencies": [ + "jasper" + ] + }, + "jpeg": { + "description": "JPEG support for opencv", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "openexr": { + "description": "OpenEXR support for opencv", + "dependencies": [ + "openexr" + ] + }, + "opengl": { + "description": "opengl support for opencv", + "dependencies": [ + "opengl" + ] + }, + "png": { + "description": "PNG support for opencv", + "dependencies": [ + "libpng" + ] + }, + "qt": { + "description": "Qt GUI support for opencv", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] + }, + "tiff": { + "description": "TIFF support for opencv", + "dependencies": [ + "tiff" + ] + }, + "world": { + "description": "Compile to a single package support for opencv" + } + } +} diff --git a/ports/opencv3/0001-disable-downloading.patch b/ports/opencv3/0001-disable-downloading.patch new file mode 100644 index 00000000000000..e2c886d455f229 --- /dev/null +++ b/ports/opencv3/0001-disable-downloading.patch @@ -0,0 +1,12 @@ +--- a/cmake/OpenCVDownload.cmake ++++ b/cmake/OpenCVDownload.cmake +@@ -157,6 +157,9 @@ function(ocv_download) + # Download + if(NOT EXISTS "${CACHE_CANDIDATE}") + ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"") ++ string(REPLACE "${OPENCV_DOWNLOAD_PATH}/" "opencv-cache/" CACHE_SUBPATH "${CACHE_CANDIDATE}") ++ message(FATAL_ERROR " Downloads are not permitted during configure. Please pre-download the file \"${CACHE_CANDIDATE}\":\n \n vcpkg_download_distfile(OCV_DOWNLOAD\n URLS \"${DL_URL}\"\n FILENAME \"${CACHE_SUBPATH}\"\n SHA512 0\n )") ++ + foreach(try ${OPENCV_DOWNLOAD_TRIES_LIST}) + ocv_download_log("#try ${try}") + file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" diff --git a/ports/opencv3/0001-winrt-fixes.patch b/ports/opencv3/0001-winrt-fixes.patch deleted file mode 100644 index b2fe1a0217bb88..00000000000000 --- a/ports/opencv3/0001-winrt-fixes.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- a/cmake/OpenCVModule.cmake -+++ b/cmake/OpenCVModule.cmake -@@ -848,7 +848,7 @@ macro(ocv_create_module) - set(the_module_target ${the_module}) - endif() - -- if(WINRT) -+ if(WINRT AND BUILD_TESTS) - # removing APPCONTAINER from modules to run from console - # in case of usual starting of WinRT test apps output is missing - # so starting of console version w/o APPCONTAINER is required to get test results ---- a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp -+++ b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp -@@ -24,6 +24,7 @@ - // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - // POSSIBILITY OF SUCH DAMAGE. - -+#include "opencv2/core/cvdef.h" - using namespace Windows::UI::Xaml::Controls; - - namespace cv ---- a/modules/highgui/src/window_winrt_bridge.hpp -+++ b/modules/highgui/src/window_winrt_bridge.hpp -@@ -28,6 +28,7 @@ - - #include - #include -+#include "opencv2/highgui/highgui_c.h" - - using namespace Windows::UI::Xaml::Controls; - ---- a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp -+++ b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp -@@ -94,10 +94,10 @@ Media::CaptureFrameGrabber::~CaptureFrameGrabber() - - void Media::CaptureFrameGrabber::ShowCameraSettings() - { --#if WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP -+#if (WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP) && (WINAPI_FAMILY!=WINAPI_FAMILY_APP) - if (_state == State::Started) - { -- CameraOptionsUI::Show(_capture.Get()); -+ CameraOptionsUI::Show(_capture.Get()); // TODO: Turn it on again in UWP mode by adding reference to UWP Desktop Extensions - } - #endif - } diff --git a/ports/opencv3/0002-install-options.patch b/ports/opencv3/0002-install-options.patch index 0719a7cb9fa3a8..2c76f7d1c0f572 100644 --- a/ports/opencv3/0002-install-options.patch +++ b/ports/opencv3/0002-install-options.patch @@ -1,137 +1,59 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -312,6 +312,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) - OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID ) - OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF IF (UNIX AND NOT ANDROID AND NOT APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) ) - OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binaries and test data" OFF) -+OCV_OPTION(INSTALL_HEADERS "Install header files" ON) -+OCV_OPTION(INSTALL_LICENSE "Install license file" ON) -+OCV_OPTION(INSTALL_OTHER "Install other files" ON) -+OCV_OPTION(INSTALL_FORCE_UNIX_PATHS "Force unix-style installation" OFF) +@@ -607,7 +607,7 @@ endif() + ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS) - # OpenCV build options - # =================================================== -@@ -378,7 +382,9 @@ else() + # --- Python Support --- +-if(NOT IOS) ++if(FALSE) + include(cmake/OpenCVDetectPython.cmake) endif() - if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) -- if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) -+ if(DEFINED OpenCV_DISABLE_ARCH_PATH) -+ ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "") -+ elseif(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) - ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") - else() - message(STATUS "Can't detect runtime and/or arch") -@@ -433,12 +439,8 @@ else() - ocv_update(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}") +--- a/cmake/OpenCVCompilerOptions.cmake ++++ b/cmake/OpenCVCompilerOptions.cmake +@@ -284,7 +284,6 @@ if(MSVC) + #endif() - if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) -- if(OpenCV_STATIC) -- ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") -- else() -- ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") -- endif() -- ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") -+ ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") -+ ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") - ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH samples) - ocv_update(OPENCV_JAR_INSTALL_PATH java) - ocv_update(OPENCV_OTHER_INSTALL_PATH etc) -@@ -901,7 +903,7 @@ if(NOT OPENCV_LICENSE_FILE) - endif() - - # for UNIX it does not make sense as LICENSE and readme will be part of the package automatically --if(ANDROID OR NOT UNIX) -+if(ANDROID OR NOT UNIX AND INSTALL_LICENSE) - install(FILES ${OPENCV_LICENSE_FILE} - PERMISSIONS OWNER_READ GROUP_READ WORLD_READ - DESTINATION ./ COMPONENT libs) + if(BUILD_WITH_DEBUG_INFO) +- set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /Zi") + set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE} /debug") + set(OPENCV_EXTRA_SHARED_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_SHARED_LINKER_FLAGS_RELEASE} /debug") + set(OPENCV_EXTRA_MODULE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_MODULE_LINKER_FLAGS_RELEASE} /debug") --- a/cmake/OpenCVGenConfig.cmake +++ b/cmake/OpenCVGenConfig.cmake -@@ -105,7 +105,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) +@@ -109,11 +109,11 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) endif() endfunction() -if((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) -+if(((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) OR INSTALL_FORCE_UNIX_PATHS) ++if(TRUE) ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "" "") endif() -@@ -117,7 +117,7 @@ endif() +-if(ANDROID) ++if(FALSE) + ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "abi-${ANDROID_NDK_ABI_NAME}" "OpenCVConfig.root-ANDROID.cmake.in") + install(FILES "${OpenCV_SOURCE_DIR}/platforms/android/android.toolchain.cmake" DESTINATION "${OPENCV_CONFIG_INSTALL_PATH}" COMPONENT dev) + endif() +@@ -121,7 +121,7 @@ endif() # -------------------------------------------------------------------------------------------- # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages # -------------------------------------------------------------------------------------------- -if(WIN32) -+if(WIN32 AND NOT INSTALL_FORCE_UNIX_PATHS) - if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - if(BUILD_SHARED_LIBS) - set(_lib_suffix "lib") ---- a/cmake/OpenCVGenHeaders.cmake -+++ b/cmake/OpenCVGenHeaders.cmake -@@ -1,7 +1,9 @@ - # platform-specific config file - configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h") - configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/cvconfig.h") --install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) -+if(INSTALL_HEADERS) -+ install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) -+endif() - - # platform-specific config file - ocv_compiler_optimization_fill_cpu_config() -@@ -29,4 +31,6 @@ set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE - #endforeach() - - configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp") --install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) -+if(INSTALL_HEADERS) -+ install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) -+endif() -\ No newline at end of file ---- a/cmake/OpenCVModule.cmake -+++ b/cmake/OpenCVModule.cmake -@@ -1000,7 +1000,9 @@ macro(_ocv_create_module) - foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS}) - string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}") - if(NOT hdr2 MATCHES "private" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" ) -- install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev) -+ if(INSTALL_HEADERS) -+ install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev) -+ endif() - endif() - endforeach() - endif() ++if(FALSE) + if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows AND NOT OPENCV_SKIP_CMAKE_ROOT_CONFIG) + ocv_gen_config("${CMAKE_BINARY_DIR}/win-install" + "${OPENCV_INSTALL_BINARIES_PREFIX}${OPENCV_INSTALL_BINARIES_SUFFIX}" +diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt +index 1f0d720..0bb1ff7 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt -@@ -1,8 +1,10 @@ +@@ -1,8 +1,6 @@ file(GLOB HAAR_CASCADES haarcascades/*.xml) file(GLOB LBP_CASCADES lbpcascades/*.xml) -install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) -install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) -+if(INSTALL_OTHER) -+ install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) -+ install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) -+endif() if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") ---- a/include/CMakeLists.txt -+++ b/include/CMakeLists.txt -@@ -1,7 +1,9 @@ --file(GLOB old_hdrs "opencv/*.h*") --install(FILES ${old_hdrs} -- DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv -- COMPONENT dev) --install(FILES "opencv2/opencv.hpp" -- DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 -- COMPONENT dev) -+if(INSTALL_HEADERS) -+ file(GLOB old_hdrs "opencv/*.h*") -+ install(FILES ${old_hdrs} -+ DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv -+ COMPONENT dev) -+ install(FILES "opencv2/opencv.hpp" -+ DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 -+ COMPONENT dev) -+endif() diff --git a/ports/opencv3/0003-disable-downloading.patch b/ports/opencv3/0003-disable-downloading.patch deleted file mode 100644 index 28b00251fe4f23..00000000000000 --- a/ports/opencv3/0003-disable-downloading.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/cmake/OpenCVDownload.cmake -+++ b/cmake/OpenCVDownload.cmake -@@ -151,6 +151,8 @@ function(ocv_download) - # Download - if(NOT EXISTS "${CACHE_CANDIDATE}") - ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"") -+ string(REPLACE "${OPENCV_DOWNLOAD_PATH}/" "opencv-cache/" CACHE_SUBPATH "${CACHE_CANDIDATE}") -+ message(FATAL_ERROR " Downloads are not permitted during configure. Please pre-download the file \"${CACHE_CANDIDATE}\":\n \n vcpkg_download_distfile(OCV_DOWNLOAD\n URLS \"${DL_URL}\"\n FILENAME \"${CACHE_SUBPATH}\"\n SHA512 0\n )") - file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" - INACTIVITY_TIMEOUT 60 - TIMEOUT 600 diff --git a/ports/opencv3/0003-force-package-requirements.patch b/ports/opencv3/0003-force-package-requirements.patch new file mode 100644 index 00000000000000..dd12caad531ab1 --- /dev/null +++ b/ports/opencv3/0003-force-package-requirements.patch @@ -0,0 +1,83 @@ +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -11,7 +11,7 @@ else() + set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES .so) + endif() +- find_package(ZLIB "${MIN_VER_ZLIB}") ++ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) + if(ANDROID) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) + unset(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) +@@ -41,7 +41,7 @@ if(WITH_JPEG) + ocv_clear_vars(JPEG_FOUND) + else() + ocv_clear_internal_cache_vars(JPEG_LIBRARY JPEG_INCLUDE_DIR) +- include(FindJPEG) ++ find_package(JPEG REQUIRED) + endif() + + if(NOT JPEG_FOUND) +@@ -87,7 +87,7 @@ if(WITH_TIFF) + ocv_clear_vars(TIFF_FOUND) + else() + ocv_clear_internal_cache_vars(TIFF_LIBRARY TIFF_INCLUDE_DIR) +- include(FindTIFF) ++ find_package(TIFF REQUIRED) + if(TIFF_FOUND) + ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) + endif() +@@ -131,7 +131,7 @@ if(WITH_WEBP) + ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR) + else() + ocv_clear_internal_cache_vars(WEBP_LIBRARY WEBP_INCLUDE_DIR) +- include(cmake/OpenCVFindWebP.cmake) ++ find_package(WebP REQUIRED) + if(WEBP_FOUND) + set(HAVE_WEBP 1) + endif() +@@ -172,7 +172,7 @@ if(WITH_JASPER) + if(BUILD_JASPER) + ocv_clear_vars(JASPER_FOUND) + else() +- include(FindJasper) ++ find_package(Jasper REQUIRED) + endif() + + if(NOT JASPER_FOUND) +@@ -197,7 +197,7 @@ if(WITH_PNG) + ocv_clear_vars(PNG_FOUND) + else() + ocv_clear_internal_cache_vars(PNG_LIBRARY PNG_INCLUDE_DIR) +- include(FindPNG) ++ find_package(PNG REQUIRED) + if(PNG_FOUND) + include(CheckIncludeFile) + check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) +@@ -229,7 +229,7 @@ if(WITH_OPENEXR) + ocv_clear_vars(HAVE_OPENEXR) + if(NOT BUILD_OPENEXR) + ocv_clear_internal_cache_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION) +- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") ++ find_package(OpenEXR REQUIRED) + endif() + + if(OPENEXR_FOUND) +@@ -247,7 +247,7 @@ endif() + + # --- GDAL (optional) --- + if(WITH_GDAL) +- find_package(GDAL QUIET) ++ find_package(GDAL REQUIRED) + + if(NOT GDAL_FOUND) + set(HAVE_GDAL NO) +@@ -259,7 +259,7 @@ if(WITH_GDAL) + endif() + + if(WITH_GDCM) +- find_package(GDCM QUIET) ++ find_package(GDCM REQUIRED) + if(NOT GDCM_FOUND) + set(HAVE_GDCM NO) + ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES) diff --git a/ports/opencv3/0004-fix-eigen.patch b/ports/opencv3/0004-fix-eigen.patch new file mode 100644 index 00000000000000..196542dcdd2ea6 --- /dev/null +++ b/ports/opencv3/0004-fix-eigen.patch @@ -0,0 +1,11 @@ +--- a/cmake/OpenCVFindLibsPerf.cmake ++++ b/cmake/OpenCVFindLibsPerf.cmake +@@ -55,7 +55,7 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN) + OR NOT (CMAKE_VERSION VERSION_LESS "3.0.0") # Eigen3Targets.cmake required CMake 3.0.0+ + ) AND NOT OPENCV_SKIP_EIGEN_FIND_PACKAGE_CONFIG + ) +- find_package(Eigen3 CONFIG QUIET) # Ceres 2.0.0 CMake scripts doesn't work with CMake's FindEigen3.cmake module (due to missing EIGEN3_VERSION_STRING) ++ find_package(Eigen3 CONFIG REQUIRED) # Ceres 2.0.0 CMake scripts doesn't work with CMake's FindEigen3.cmake module (due to missing EIGEN3_VERSION_STRING) + endif() + if(NOT Eigen3_FOUND) + find_package(Eigen3 QUIET) diff --git a/ports/opencv3/0004-use-find-package-required.patch b/ports/opencv3/0004-use-find-package-required.patch deleted file mode 100644 index 4e1daf65947d60..00000000000000 --- a/ports/opencv3/0004-use-find-package-required.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- a/cmake/OpenCVFindLibsGrfmt.cmake -+++ b/cmake/OpenCVFindLibsGrfmt.cmake -@@ -6,7 +6,7 @@ - if(BUILD_ZLIB) - ocv_clear_vars(ZLIB_FOUND) - else() -- find_package(ZLIB "${MIN_VER_ZLIB}") -+ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) - if(ZLIB_FOUND AND ANDROID) - if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$") - set(ZLIB_LIBRARIES z) -@@ -30,7 +30,7 @@ if(WITH_JPEG) - if(BUILD_JPEG) - ocv_clear_vars(JPEG_FOUND) - else() -- include(FindJPEG) -+ find_package(JPEG REQUIRED) - endif() - - if(NOT JPEG_FOUND) -@@ -51,7 +51,7 @@ if(WITH_TIFF) - if(BUILD_TIFF) - ocv_clear_vars(TIFF_FOUND) - else() -- include(FindTIFF) -+ find_package(TIFF REQUIRED) - if(TIFF_FOUND) - ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) - endif() -@@ -94,7 +94,7 @@ if(WITH_WEBP) - if(BUILD_WEBP) - ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR) - else() -- include(cmake/OpenCVFindWebP.cmake) -+ find_package(WebP REQUIRED) - if(WEBP_FOUND) - set(HAVE_WEBP 1) - endif() -@@ -135,7 +135,7 @@ if(WITH_JASPER) - if(BUILD_JASPER) - ocv_clear_vars(JASPER_FOUND) - else() -- include(FindJasper) -+ find_package(Jasper REQUIRED) - endif() - - if(NOT JASPER_FOUND) -@@ -159,7 +159,7 @@ if(WITH_PNG) - if(BUILD_PNG) - ocv_clear_vars(PNG_FOUND) - else() -- include(FindPNG) -+ find_package(PNG REQUIRED) - if(PNG_FOUND) - include(CheckIncludeFile) - check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) -@@ -191,7 +191,7 @@ if(WITH_OPENEXR) - if(BUILD_OPENEXR) - ocv_clear_vars(OPENEXR_FOUND) - else() -- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") -+ find_package(OpenEXR REQUIRED) - endif() - - if(NOT OPENEXR_FOUND) -@@ -207,7 +207,7 @@ endif() - - # --- GDAL (optional) --- - if(WITH_GDAL) -- find_package(GDAL QUIET) -+ find_package(GDAL REQUIRED) - - if(NOT GDAL_FOUND) - set(HAVE_GDAL NO) -@@ -219,7 +219,7 @@ if(WITH_GDAL) - endif() - - if (WITH_GDCM) -- find_package(GDCM QUIET) -+ find_package(GDCM REQUIRED) - if(NOT GDCM_FOUND) - set(HAVE_GDCM NO) - ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES) diff --git a/ports/opencv3/0005-fix-vtk9.patch b/ports/opencv3/0005-fix-vtk9.patch new file mode 100644 index 00000000000000..967cc9e94d32d8 --- /dev/null +++ b/ports/opencv3/0005-fix-vtk9.patch @@ -0,0 +1,466 @@ +--- a/cmake/OpenCVDetectVTK.cmake ++++ b/cmake/OpenCVDetectVTK.cmake +@@ -1,12 +1,30 @@ ++# VTK 9.0 ++if(NOT VTK_FOUND) ++ find_package(VTK 9 QUIET NAMES vtk COMPONENTS ++ FiltersExtraction ++ FiltersSources ++ FiltersTexture ++ IOExport ++ IOGeometry ++ IOPLY ++ InteractionStyle ++ RenderingCore ++ RenderingLOD ++ RenderingOpenGL2 ++ NO_MODULE) ++endif() ++ + # VTK 6.x components +-find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE) +-IF(VTK_FOUND) +- IF(VTK_RENDERING_BACKEND) #in vtk 7, the rendering backend is exported as a var. ++if(NOT VTK_FOUND) ++ find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE) ++ IF(VTK_FOUND) ++ IF(VTK_RENDERING_BACKEND) #in vtk 7, the rendering backend is exported as a var. + find_package(VTK QUIET COMPONENTS vtkRendering${VTK_RENDERING_BACKEND} vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport vtkIOGeometry NO_MODULE) +- ELSE(VTK_RENDERING_BACKEND) ++ ELSE(VTK_RENDERING_BACKEND) + find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE) +- ENDIF(VTK_RENDERING_BACKEND) +-ENDIF(VTK_FOUND) ++ ENDIF(VTK_RENDERING_BACKEND) ++ ENDIF(VTK_FOUND) ++endif() + + # VTK 5.x components + if(NOT VTK_FOUND) +diff --git a/modules/viz/CMakeLists.txt b/modules/viz/CMakeLists.txt +index 256b464..92698c3 100644 +--- a/modules/viz/CMakeLists.txt ++++ b/modules/viz/CMakeLists.txt +@@ -3,7 +3,6 @@ if(NOT HAVE_VTK) + endif() + + set(the_description "Viz") +-include(${VTK_USE_FILE}) + + if(NOT BUILD_SHARED_LIBS) + # We observed conflict between builtin 3rdparty libraries and +@@ -27,7 +26,14 @@ endif() + ocv_warnings_disable(CMAKE_CXX_FLAGS -Winconsistent-missing-override -Wsuggest-override) + + ocv_define_module(viz opencv_core WRAP python) +-ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES}) ++ ++if (VTK_VERSION VERSION_LESS "8.90.0") ++ include(${VTK_USE_FILE}) ++ ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES}) ++else () ++ ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES}) ++ vtk_module_autoinit(TARGETS ${the_module} MODULES ${VTK_LIBRARIES}) ++endif() + + if(APPLE AND BUILD_opencv_viz) + ocv_target_link_libraries(${the_module} PRIVATE "-framework Cocoa") +diff --git a/modules/viz/src/precomp.hpp b/modules/viz/src/precomp.hpp +index f92fdb6..4c4bf7c 100644 +--- a/modules/viz/src/precomp.hpp ++++ b/modules/viz/src/precomp.hpp +@@ -133,7 +133,8 @@ + #include + #include + #include +-#include "vtkCallbackCommand.h" ++#include ++#include + + #if !defined(_WIN32) || defined(__CYGWIN__) + # include /* unlink */ +@@ -149,6 +150,11 @@ + #include "vtk/vtkTrajectorySource.h" + #include "vtk/vtkImageMatSource.h" + ++#if VTK_MAJOR_VERSION >= 9 ++typedef vtkIdType const * CellIterT; ++#else ++typedef vtkIdType * CellIterT; ++#endif + + #include + #include +diff --git a/modules/viz/src/types.cpp b/modules/viz/src/types.cpp +index 65571a1..e9a470c 100644 +--- a/modules/viz/src/types.cpp ++++ b/modules/viz/src/types.cpp +@@ -97,10 +97,12 @@ cv::viz::Mesh cv::viz::Mesh::load(const String& file, int type) + // Now handle the polygons + vtkSmartPointer polygons = polydata->GetPolys(); + mesh.polygons.create(1, polygons->GetSize(), CV_32SC1); ++ mesh.polygons = 0; + int* poly_ptr = mesh.polygons.ptr(); + + polygons->InitTraversal(); +- vtkIdType nr_cell_points, *cell_points; ++ vtkIdType nr_cell_points; ++ CellIterT cell_points; + while (polygons->GetNextCell(nr_cell_points, cell_points)) + { + *poly_ptr++ = nr_cell_points; +--- a/modules/viz/src/vizimpl.cpp ++++ b/modules/viz/src/vizimpl.cpp +@@ -55,8 +55,17 @@ cv::viz::Viz3d::VizImpl::VizImpl(const String &name) : spin_once_state_(false), + + // Create render window + window_ = vtkSmartPointer::New(); +- cv::Vec2i window_size = cv::Vec2i(window_->GetScreenSize()) / 2; +- window_->SetSize(window_size.val); ++ int * sz = window_->GetScreenSize(); ++ if (sz) ++ { ++ cv::Vec2i window_size = cv::Vec2i(sz) / 2; ++ window_->SetSize(window_size.val); ++ } ++ else ++ { ++ int new_sz[2] = { 640, 480 }; ++ window_->SetSize(new_sz); ++ } + window_->AddRenderer(renderer_); + + // Create the interactor style +--- a/modules/viz/src/vtk/vtkOBJWriter.cpp ++++ b/modules/viz/src/vtk/vtkOBJWriter.cpp +@@ -72,7 +72,7 @@ void cv::viz::vtkOBJWriter::WriteData() + } + + vtkDebugMacro(<<"Opening vtk file for writing..."); +- ostream *outfilep = new ofstream(this->FileName, ios::out); ++ std::ostream *outfilep = new std::ofstream(this->FileName, ios::out); + if (outfilep->fail()) + { + vtkErrorMacro(<< "Unable to open file: "<< this->FileName); +@@ -127,7 +127,8 @@ void cv::viz::vtkOBJWriter::WriteData() + // write out verts if any + if (input->GetNumberOfVerts() > 0) + { +- vtkIdType npts = 0, *index = 0; ++ vtkIdType npts = 0; ++ CellIterT index = 0; + vtkCellArray *cells = input->GetVerts(); + for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) + { +@@ -141,7 +142,8 @@ void cv::viz::vtkOBJWriter::WriteData() + // write out lines if any + if (input->GetNumberOfLines() > 0) + { +- vtkIdType npts = 0, *index = 0; ++ vtkIdType npts = 0; ++ CellIterT index = 0; + vtkCellArray *cells = input->GetLines(); + for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) + { +@@ -162,7 +164,8 @@ void cv::viz::vtkOBJWriter::WriteData() + // write out polys if any + if (input->GetNumberOfPolys() > 0) + { +- vtkIdType npts = 0, *index = 0; ++ vtkIdType npts = 0; ++ CellIterT index = 0; + vtkCellArray *cells = input->GetPolys(); + for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) + { +@@ -191,7 +194,8 @@ void cv::viz::vtkOBJWriter::WriteData() + // write out tstrips if any + if (input->GetNumberOfStrips() > 0) + { +- vtkIdType npts = 0, *index = 0; ++ vtkIdType npts = 0; ++ CellIterT index = 0; + vtkCellArray *cells = input->GetStrips(); + for (cells->InitTraversal(); cells->GetNextCell(npts, index); ) + { +--- a/modules/viz/src/vtk/vtkXYZReader.cpp ++++ b/modules/viz/src/vtk/vtkXYZReader.cpp +@@ -77,7 +77,7 @@ int cv::viz::vtkXYZReader::RequestData(vtkInformation*, vtkInformationVector**, + } + + // Open the input file. +- ifstream fin(this->FileName); ++ std::ifstream fin(this->FileName); + if(!fin) + { + vtkErrorMacro("Error opening file " << this->FileName); +--- a/modules/viz/src/vtk/vtkXYZWriter.cpp ++++ b/modules/viz/src/vtk/vtkXYZWriter.cpp +@@ -69,7 +69,7 @@ void cv::viz::vtkXYZWriter::WriteData() + } + + vtkDebugMacro(<<"Opening vtk file for writing..."); +- ostream *outfilep = new ofstream(this->FileName, ios::out); ++ std::ostream *outfilep = new std::ofstream(this->FileName, ios::out); + if (outfilep->fail()) + { + vtkErrorMacro(<< "Unable to open file: "<< this->FileName); +--- a/modules/viz/test/test_tutorial2.cpp ++++ b/modules/viz/test/test_tutorial2.cpp +@@ -28,7 +28,7 @@ static void tutorial2() + /// Rodrigues vector + Vec3d rot_vec = Vec3d::all(0); + double translation_phase = 0.0, translation = 0.0; +- while(!myWindow.wasStopped()) ++ for(unsigned num = 0; num < 50; ++num) + { + /* Rotation using rodrigues */ + /// Rotate around (1,1,1) +@@ -45,7 +45,7 @@ static void tutorial2() + + myWindow.setWidgetPose("Cube Widget", pose); + +- myWindow.spinOnce(1, true); ++ myWindow.spinOnce(100, true); + } + } + +--- a/modules/viz/test/test_tutorial3.cpp ++++ b/modules/viz/test/test_tutorial3.cpp +@@ -48,7 +48,7 @@ static void tutorial3(bool camera_pov) + myWindow.setViewerPose(camera_pose); + + /// Start event loop. +- myWindow.spin(); ++ myWindow.spinOnce(500, true); + } + + TEST(Viz, tutorial3_global_view) +--- a/modules/viz/test/test_viz3d.cpp ++++ b/modules/viz/test/test_viz3d.cpp +@@ -59,7 +59,7 @@ TEST(Viz_viz3d, DISABLED_develop) + //cv::Mat cloud = cv::viz::readCloud(get_dragon_ply_file_path()); + //---->>>>> + +- viz.spin(); ++ viz.spinOnce(500, true); + } + + }} // namespace +--- a/modules/viz/test/tests_simple.cpp ++++ b/modules/viz/test/tests_simple.cpp +@@ -56,7 +56,7 @@ TEST(Viz, show_cloud_bluberry) + viz.showWidget("dragon", WCloud(dragon_cloud, Color::bluberry()), pose); + + viz.showWidget("text2d", WText("Bluberry cloud", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_cloud_random_color) +@@ -73,7 +73,7 @@ TEST(Viz, show_cloud_random_color) + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("dragon", WCloud(dragon_cloud, colors), pose); + viz.showWidget("text2d", WText("Random color cloud", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_cloud_masked) +@@ -91,7 +91,7 @@ TEST(Viz, show_cloud_masked) + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("dragon", WCloud(dragon_cloud), pose); + viz.showWidget("text2d", WText("Nan masked cloud", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_cloud_collection) +@@ -109,7 +109,7 @@ TEST(Viz, show_cloud_collection) + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("ccol", ccol); + viz.showWidget("text2d", WText("Cloud collection", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_painted_clouds) +@@ -124,7 +124,7 @@ TEST(Viz, show_painted_clouds) + viz.showWidget("cloud3", WPaintedCloud(cloud, Vec3d(0.0, 0.0, -1.0), Vec3d(0.0, 0.0, 1.0), Color::blue(), Color::red())); + viz.showWidget("arrow", WArrow(Vec3d(0.0, 1.0, -1.0), Vec3d(0.0, 1.0, 1.0), 0.009, Color::raspberry())); + viz.showWidget("text2d", WText("Painted clouds", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_mesh) +@@ -137,7 +137,7 @@ TEST(Viz, show_mesh) + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("mesh", WMesh(mesh), pose); + viz.showWidget("text2d", WText("Just mesh", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_mesh_random_colors) +@@ -152,7 +152,7 @@ TEST(Viz, show_mesh_random_colors) + viz.showWidget("mesh", WMesh(mesh), pose); + viz.setRenderingProperty("mesh", SHADING, SHADING_PHONG); + viz.showWidget("text2d", WText("Random color mesh", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_widget_merger) +@@ -173,7 +173,7 @@ TEST(Viz, show_widget_merger) + viz.showWidget("coo", WCoordinateSystem()); + viz.showWidget("merger", merger); + viz.showWidget("text2d", WText("Widget merger", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_textured_mesh) +@@ -210,7 +210,7 @@ TEST(Viz, show_textured_mesh) + viz.showWidget("mesh", WMesh(mesh)); + viz.setRenderingProperty("mesh", SHADING, SHADING_PHONG); + viz.showWidget("text2d", WText("Textured mesh", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_polyline) +@@ -229,7 +229,7 @@ TEST(Viz, show_polyline) + viz.showWidget("polyline", WPolyLine(polyline, colors)); + viz.showWidget("coosys", WCoordinateSystem()); + viz.showWidget("text2d", WText("Polyline", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_sampled_normals) +@@ -244,7 +244,7 @@ TEST(Viz, show_sampled_normals) + viz.showWidget("normals", WCloudNormals(mesh.cloud, mesh.normals, 30, 0.1f, Color::green()), pose); + viz.setRenderingProperty("normals", LINE_WIDTH, 2.0); + viz.showWidget("text2d", WText("Cloud or mesh normals", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_cloud_shaded_by_normals) +@@ -260,7 +260,7 @@ TEST(Viz, show_cloud_shaded_by_normals) + Viz3d viz("show_cloud_shaded_by_normals"); + viz.showWidget("cloud", cloud, pose); + viz.showWidget("text2d", WText("Cloud shaded by normals", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_trajectories) +@@ -287,15 +287,15 @@ TEST(Viz, show_trajectories) + viz.showWidget("text2d", WText("Different kinds of supported trajectories", Point(20, 20), 20, Color::green())); + + int i = 0; +- while(!viz.wasStopped()) ++ for(unsigned num = 0; num < 50; ++num) + { + double a = --i % 360; + Vec3d pose(sin(a * CV_PI/180), 0.7, cos(a * CV_PI/180)); + viz.setViewerPose(makeCameraPose(pose * 7.5, Vec3d(0.0, 0.5, 0.0), Vec3d(0.0, 0.1, 0.0))); +- viz.spinOnce(20, true); ++ viz.spinOnce(100, true); + } + viz.resetCamera(); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_trajectory_reposition) +@@ -306,7 +306,7 @@ TEST(Viz, show_trajectory_reposition) + viz.showWidget("coos", WCoordinateSystem()); + viz.showWidget("sub3", WTrajectory(Mat(path).rowRange(0, (int)path.size()/3), WTrajectory::BOTH, 0.2, Color::brown()), path.front().inv()); + viz.showWidget("text2d", WText("Trajectory resposition to origin", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_camera_positions) +@@ -330,7 +330,7 @@ TEST(Viz, show_camera_positions) + viz.showWidget("pos3", WCameraPosition(0.75), poses[1]); + viz.showWidget("pos4", WCameraPosition(K, gray, 3, Color::indigo()), poses[1]); + viz.showWidget("text2d", WText("Camera positions with images", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_overlay_image) +@@ -353,16 +353,16 @@ TEST(Viz, show_overlay_image) + viz.showWidget("text2d", WText("Overlay images", Point(20, 20), 20, Color::green())); + + int i = 0; +- while(!viz.wasStopped()) ++ for(unsigned num = 0; num < 50; ++num) + { + double a = ++i % 360; + Vec3d pose(sin(a * CV_PI/180), 0.7, cos(a * CV_PI/180)); + viz.setViewerPose(makeCameraPose(pose * 3, Vec3d(0.0, 0.5, 0.0), Vec3d(0.0, 0.1, 0.0))); + viz.getWidget("img1").cast().setImage(lena * pow(sin(i*10*CV_PI/180) * 0.5 + 0.5, 1.0)); +- viz.spinOnce(1, true); ++ viz.spinOnce(100, true); + } + viz.showWidget("text2d", WText("Overlay images (stopped)", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + +@@ -376,7 +376,7 @@ TEST(Viz, show_image_method) + viz.showImage(lena, lena.size()); + viz.spinOnce(1500, true); + +- cv::viz::imshow("show_image_method", make_gray(lena)).spin(); ++ cv::viz::imshow("show_image_method", make_gray(lena)).spinOnce(500, true); + } + + TEST(Viz, show_image_3d) +@@ -398,13 +398,13 @@ TEST(Viz, show_image_3d) + viz.showWidget("text2d", WText("Images in 3D", Point(20, 20), 20, Color::green())); + + int i = 0; +- while(!viz.wasStopped()) ++ for(unsigned num = 0; num < 50; ++num) + { + viz.getWidget("img0").cast().setImage(lena * pow(sin(i++*7.5*CV_PI/180) * 0.5 + 0.5, 1.0)); +- viz.spinOnce(1, true); ++ viz.spinOnce(100, true); + } + viz.showWidget("text2d", WText("Images in 3D (stopped)", Point(20, 20), 20, Color::green())); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_simple_widgets) +@@ -431,10 +431,10 @@ TEST(Viz, show_simple_widgets) + + viz.showWidget("grid1", WGrid(Vec2i(7,7), Vec2d::all(0.75), Color::gray()), Affine3d().translate(Vec3d(0.0, 0.0, -1.0))); + +- viz.spin(); ++ viz.spinOnce(500, true); + viz.getWidget("text2d").cast().setText("Different simple widgets (updated)"); + viz.getWidget("text3d").cast().setText("Updated text 3D"); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + TEST(Viz, show_follower) +@@ -446,9 +446,9 @@ TEST(Viz, show_follower) + viz.showWidget("t3d_2", WText3D("Simple 3D follower", Point3d(-0.5, -0.5, 0.5), 0.125, true, Color::green())); + viz.showWidget("text2d", WText("Follower: text always facing camera", Point(20, 20), 20, Color::green())); + viz.setBackgroundMeshLab(); +- viz.spin(); ++ viz.spinOnce(500, true); + viz.getWidget("t3d_2").cast().setText("Updated follower 3D"); +- viz.spin(); ++ viz.spinOnce(500, true); + } + + }} // namespace diff --git a/ports/opencv3/0005-remove-custom-protobuf-find-package.patch b/ports/opencv3/0005-remove-custom-protobuf-find-package.patch deleted file mode 100644 index 91ac137f9f7494..00000000000000 --- a/ports/opencv3/0005-remove-custom-protobuf-find-package.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -633,7 +633,10 @@ include(cmake/OpenCVFindLibsGUI.cmake) - include(cmake/OpenCVFindLibsVideo.cmake) - include(cmake/OpenCVFindLibsPerf.cmake) - include(cmake/OpenCVFindLAPACK.cmake) --include(cmake/OpenCVFindProtobuf.cmake) -+find_package(protobuf) -+if(Protobuf_LIBRARIES) -+ set(HAVE_PROTOBUF TRUE) -+endif() - - # ---------------------------------------------------------------------------- - # Detect other 3rd-party libraries/tools ---- a/modules/dnn/CMakeLists.txt -+++ b/modules/dnn/CMakeLists.txt -@@ -78,7 +78,7 @@ endif() - - set(include_dirs ${fw_inc}) - set(sources_options "") --set(libs libprotobuf ${LAPACK_LIBRARIES}) -+set(libs protobuf::libprotobuf ${LAPACK_LIBRARIES}) - if(OPENCV_DNN_OPENCL AND HAVE_OPENCL) - list(APPEND include_dirs ${OPENCL_INCLUDE_DIRS}) - else() diff --git a/ports/opencv3/0006-fix-missing-openjp2.patch b/ports/opencv3/0006-fix-missing-openjp2.patch deleted file mode 100644 index c0afb99529d538..00000000000000 --- a/ports/opencv3/0006-fix-missing-openjp2.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/modules/imgcodecs/CMakeLists.txt b/modules/imgcodecs/CMakeLists.txt -index 434278c..0d8f4d8 100644 ---- a/modules/imgcodecs/CMakeLists.txt -+++ b/modules/imgcodecs/CMakeLists.txt -@@ -36,6 +36,11 @@ if(HAVE_PNG) - endif() - - if(HAVE_GDCM) -+ if (CMAKE_BUILD_TYPE STREQUAL "Release") -+ link_directories("${CURRENT_INSTALLED_DIR}/lib") -+ else() -+ link_directories("${CURRENT_INSTALLED_DIR}/debug/lib") -+ endif() - ocv_include_directories(${GDCM_INCLUDE_DIRS}) - list(APPEND GRFMT_LIBS ${GDCM_LIBRARIES}) - endif() diff --git a/ports/opencv3/0006-fix-uwp.patch b/ports/opencv3/0006-fix-uwp.patch new file mode 100644 index 00000000000000..cc0216b16435c4 --- /dev/null +++ b/ports/opencv3/0006-fix-uwp.patch @@ -0,0 +1,11 @@ +--- a/cmake/OpenCVModule.cmake ++++ b/cmake/OpenCVModule.cmake +@@ -1188,7 +1188,7 @@ function(ocv_add_perf_tests) + set_target_properties(${the_target} PROPERTIES FOLDER "tests performance") + endif() + +- if(WINRT) ++ if(WINRT AND BUILD_TESTS) + # removing APPCONTAINER from tests to run from console + # look for detailed description inside of ocv_create_module macro above + add_custom_command(TARGET "opencv_perf_${name}" diff --git a/ports/opencv3/0007-fix-hdf5.patch b/ports/opencv3/0007-fix-hdf5.patch new file mode 100644 index 00000000000000..8e7e154ad40671 --- /dev/null +++ b/ports/opencv3/0007-fix-hdf5.patch @@ -0,0 +1,28 @@ +--- a/modules/hdf/CMakeLists.txt ++++ b/modules/hdf/CMakeLists.txt +@@ -1,25 +1,8 @@ + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}) + +-if(WIN32) +- # windows cmake internal lookups are broken for now +- # will lookup for headers and shared libs given HDF_DIR env +- find_path(HDF5_INCLUDE_DIRS hdf5.h HINTS "$ENV{HDF5_DIR}\\..\\include") +- find_library(HDF5_C_LIBRARY NAMES hdf5 HINTS "$ENV{HDF5_DIR}\\..\\lib") +- if(HDF5_INCLUDE_DIRS AND HDF5_C_LIBRARY) +- set(HDF5_FOUND "YES") +- set(HDF5_LIBRARIES ${HDF5_C_LIBRARY}) +- mark_as_advanced(HDF5_LIBRARIES) +- mark_as_advanced(HDF5_C_LIBRARY) +- mark_as_advanced(HDF5_INCLUDE_DIRS) +- add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB -D_HDF5USEDLL_) +- else() +- set(HDF5_FOUND "NO") +- endif() +-else() + if(NOT CMAKE_CROSSCOMPILING) # iOS build should not reuse OSX package + find_package(HDF5) + endif() +-endif() + + if(NOT HDF5_FOUND) + ocv_module_disable(hdf) # no return diff --git a/ports/opencv3/0008-devendor-quirc.patch b/ports/opencv3/0008-devendor-quirc.patch new file mode 100644 index 00000000000000..76803851bf94e8 --- /dev/null +++ b/ports/opencv3/0008-devendor-quirc.patch @@ -0,0 +1,22 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -778,7 +778,7 @@ if(WITH_OPENVX) + endif() + + if(WITH_QUIRC) +- add_subdirectory(3rdparty/quirc) ++ find_package(quirc CONFIG REQUIRED) + set(HAVE_QUIRC TRUE) + endif() + # ---------------------------------------------------------------------------- +--- a/modules/objdetect/CMakeLists.txt ++++ b/modules/objdetect/CMakeLists.txt +@@ -2,7 +2,5 @@ set(the_description "Object Detection") + ocv_define_module(objdetect opencv_core opencv_imgproc opencv_calib3d WRAP java python js) + + if(HAVE_QUIRC) +- get_property(QUIRC_INCLUDE GLOBAL PROPERTY QUIRC_INCLUDE_DIR) +- ocv_include_directories(${QUIRC_INCLUDE}) +- ocv_target_link_libraries(${the_module} quirc) ++ ocv_target_link_libraries(${the_module} quirc::quirc) + endif() diff --git a/ports/opencv3/0009-fix-protobuf.patch b/ports/opencv3/0009-fix-protobuf.patch new file mode 100644 index 00000000000000..38572e309f8469 --- /dev/null +++ b/ports/opencv3/0009-fix-protobuf.patch @@ -0,0 +1,26 @@ +--- a/cmake/OpenCVFindProtobuf.cmake ++++ b/cmake/OpenCVFindProtobuf.cmake +@@ -31,7 +31,7 @@ if(BUILD_PROTOBUF) + set(HAVE_PROTOBUF TRUE) + else() + unset(Protobuf_VERSION CACHE) +- find_package(Protobuf QUIET) ++ find_package(Protobuf CONFIG REQUIRED) + + # Backwards compatibility + # Define camel case versions of input variables +@@ -76,6 +76,7 @@ if(HAVE_PROTOBUF) + if(NOT BUILD_PROTOBUF) + if(TARGET "${Protobuf_LIBRARIES}") + get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_RELEASE) ++ get_target_property(__location_debug "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_DEBUG) + if(NOT __location) + get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION) + endif() +@@ -87,5 +88,5 @@ if(HAVE_PROTOBUF) + endif() + list(APPEND CUSTOM_STATUS_protobuf " Protobuf:" + BUILD_PROTOBUF THEN "build (${Protobuf_VERSION})" +- ELSE "${__location} (${Protobuf_VERSION})") ++ ELSE "optimized ${__location} debug ${__location_debug} ; version (${Protobuf_VERSION})") + endif() diff --git a/ports/opencv3/0010-fix-uwp-tiff-imgcodecs.patch b/ports/opencv3/0010-fix-uwp-tiff-imgcodecs.patch new file mode 100644 index 00000000000000..0bd3d701b959fc --- /dev/null +++ b/ports/opencv3/0010-fix-uwp-tiff-imgcodecs.patch @@ -0,0 +1,13 @@ +--- a/modules/imgcodecs/CMakeLists.txt ++++ b/modules/imgcodecs/CMakeLists.txt +@@ -9,6 +9,10 @@ ocv_add_module(imgcodecs opencv_imgproc WRAP java objc python) + + ocv_clear_vars(GRFMT_LIBS) + ++if(MSVC) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996") ++endif() ++ + if(HAVE_WINRT_CX AND NOT WINRT) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW") + endif() diff --git a/ports/opencv3/CONTROL b/ports/opencv3/CONTROL deleted file mode 100644 index 5f65d9e4379d07..00000000000000 --- a/ports/opencv3/CONTROL +++ /dev/null @@ -1,93 +0,0 @@ -Source: opencv3 -Version: 3.4.3-10 -Build-Depends: zlib -Homepage: https://github.com/opencv/opencv -Description: computer vision library -Default-Features: opengl, jpeg, png, tiff, eigen, flann - -Feature: opengl -Build-Depends: opengl -Description: opengl support for opencv - -Feature: dnn -Build-Depends: protobuf -Description: opencv_dnn module - -Feature: ovis -Build-Depends: ogre -Description: opencv_ovis module - -Feature: flann -Description: opencv_flann module - -Feature: sfm -Build-Depends: eigen3, glog, gflags, ceres -Description: opencv_sfm module - -Feature: contrib -Build-Depends: opencv3[flann] -Description: opencv_contrib module - -Feature: cuda -Build-Depends: cuda -Description: CUDA support for opencv - -Feature: ffmpeg -Description: prebuilt ffmpeg support for opencv - -Feature: ipp -Description: Enable Intel Integrated Performance Primitives - -Feature: tbb -Build-Depends: tbb -Description: Enable Intel Threading Building Blocks - -Feature: qt -Build-Depends: qt5 -Description: Qt GUI support for opencv - -Feature: vtk -Build-Depends: vtk -Description: vtk support for opencv - -Feature: gdcm -Build-Depends: gdcm -Description: GDCM support for opencv - -Feature: webp -Build-Depends: libwebp -Description: WebP support for opencv - -Feature: openexr -Build-Depends: openexr -Description: OpenEXR support for opencv - -Feature: tiff -Build-Depends: tiff -Description: TIFF support for opencv - -Feature: png -Build-Depends: libpng -Description: PNG support for opencv - -Feature: jpeg -Build-Depends: libjpeg-turbo -Description: JPEG support for opencv - -Feature: jasper -Build-Depends: jasper -Description: JPEG 2000 support for opencv - -Feature: eigen -Build-Depends: eigen3 -Description: Eigen support for opencv - -Feature: halide -Build-Depends: halide, opencv3[dnn] -Description: Halide support for opencv - -Feature: world -Description: Compile to a single package support for opencv - -Feature: nonfree -Description: allow nonfree and unredistributable libraries diff --git a/ports/opencv3/portfile.cmake b/ports/opencv3/portfile.cmake index 12c4dadaec7965..751f6423e69d74 100644 --- a/ports/opencv3/portfile.cmake +++ b/ports/opencv3/portfile.cmake @@ -1,52 +1,86 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv2") + message(FATAL_ERROR "OpenCV 2 is installed, please uninstall and try again:\n vcpkg remove opencv2") +endif() + if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv4") message(FATAL_ERROR "OpenCV 4 is installed, please uninstall and try again:\n vcpkg remove opencv4") endif() -include(vcpkg_common_functions) - -set(OPENCV_PORT_VERSION "3.4.3") +set(OPENCV_VERSION "3.4.15") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv - REF ${OPENCV_PORT_VERSION} - SHA512 d653a58eb5e3939b9fdb7438ac35f77cf4385cf72d5d22bfd21722a109e1b3283dbb9407985061b7548114f0d05c9395aac9bb62b4d2bc1f68da770a49987fef + REF ${OPENCV_VERSION} + SHA512 775149e56f0aa94d53eb024404866380d97ce423ef1c8343ee8f12c1377e454ae182b2528e86949b5f7250e551d464bd1a5de2e2d9f0d0e1dd3dc188a1db790d HEAD_REF master PATCHES - 0001-winrt-fixes.patch + 0001-disable-downloading.patch 0002-install-options.patch - 0003-disable-downloading.patch - 0004-use-find-package-required.patch - 0005-remove-custom-protobuf-find-package.patch - 0006-fix-missing-openjp2.patch + 0003-force-package-requirements.patch + 0004-fix-eigen.patch + 0005-fix-vtk9.patch + 0006-fix-uwp.patch + 0008-devendor-quirc.patch + 0009-fix-protobuf.patch + 0010-fix-uwp-tiff-imgcodecs.patch ) -string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(TARGET_IS_AARCH64 1) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(TARGET_IS_ARM 1) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(TARGET_IS_X86_64 1) +else() + set(TARGET_IS_X86 1) +endif() -set(CMAKE_MODULE_PATH) +file(REMOVE "${SOURCE_PATH}/cmake/FindCUDNN.cmake") -set(BUILD_opencv_world OFF) -if("world" IN_LIST FEATURES) - set(BUILD_opencv_world ON) -endif() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "contrib" WITH_CONTRIB + "cuda" WITH_CUBLAS + "cuda" WITH_CUDA + "dnn" BUILD_opencv_dnn + "eigen" WITH_EIGEN + "ffmpeg" WITH_FFMPEG + "flann" BUILD_opencv_flann + "gdcm" WITH_GDCM + "halide" WITH_HALIDE + "jasper" WITH_JASPER + "jpeg" WITH_JPEG + "lapack" WITH_LAPACK + "nonfree" OPENCV_ENABLE_NONFREE + "openexr" WITH_OPENEXR + "opengl" WITH_OPENGL + "png" WITH_PNG + "qt" WITH_QT + "quirc" WITH_QUIRC + "sfm" BUILD_opencv_sfm + "tiff" WITH_TIFF + "vtk" WITH_VTK + "webp" WITH_WEBP + "world" BUILD_opencv_world +) +# Cannot use vcpkg_check_features() for "dnn", "ipp", ovis", "tbb" +# As the respective value of their variables can be unset conditionally. set(BUILD_opencv_dnn OFF) -set(WITH_PROTOBUF OFF) if("dnn" IN_LIST FEATURES) - set(BUILD_opencv_dnn ON) - set(WITH_PROTOBUF ON) - set(PROTOBUF_UPDATE_FILES ON) - set(UPDATE_PROTO_FILES ON) - vcpkg_download_distfile(TINYDNN_ARCHIVE - URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" - FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" - SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b - ) + if(NOT VCPKG_TARGET_IS_ANDROID) + set(BUILD_opencv_dnn ON) + else() + message(WARNING "The dnn module cannot be enabled on Android") + endif() endif() -set(BUILD_opencv_flann OFF) -if("flann" IN_LIST FEATURES) - set(BUILD_opencv_flann ON) +set(WITH_IPP OFF) +if("ipp" IN_LIST FEATURES) + set(WITH_IPP ON) endif() set(BUILD_opencv_ovis OFF) @@ -54,28 +88,48 @@ if("ovis" IN_LIST FEATURES) set(BUILD_opencv_ovis ON) endif() -set(BUILD_opencv_sfm OFF) -if("sfm" IN_LIST FEATURES) - set(BUILD_opencv_sfm ON) +set(WITH_TBB OFF) +if("tbb" IN_LIST FEATURES) + set(WITH_TBB ON) +endif() + +if("dnn" IN_LIST FEATURES) + vcpkg_download_distfile(TINYDNN_ARCHIVE + URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" + FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" + SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b + ) endif() -set(BUILD_opencv_contrib OFF) +# Build image quality module when building with 'contrib' feature and not UWP. +set(BUILD_opencv_quality OFF) if("contrib" IN_LIST FEATURES) - set(BUILD_opencv_contrib ON) + if (VCPKG_TARGET_IS_UWP) + set(BUILD_opencv_quality OFF) + message(WARNING "The image quality module (quality) does not build for UWP, the module has been disabled.") + # The hdf module is silently disabled by OpenCVs buildsystem if HDF5 is not detected. + message(WARNING "The hierarchical data format module (hdf) depends on HDF5 which doesn't support UWP, the module has been disabled.") + else() + set(BUILD_opencv_quality CMAKE_DEPENDS_IN_PROJECT_ONLY) + endif() + + vcpkg_from_github( + OUT_SOURCE_PATH CONTRIB_SOURCE_PATH + REPO opencv/opencv_contrib + REF ${OPENCV_VERSION} + SHA512 639f5f869d68014fcc5041f5fe890c98635610d8b26c9964721e2fbe74ce8a12aef8f305364ff024fe0086bf2e7252c4fdd00a5de08854fdcd285c0f4916125a + HEAD_REF master + PATCHES + 0007-fix-hdf5.patch + ) + set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") - # Used for opencv's face module vcpkg_download_distfile(OCV_DOWNLOAD URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat" FILENAME "opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat" SHA512 c16e60a6c4bb4de3ab39b876ae3c3f320ea56f69c93e9303bd2dff8760841dcd71be4161fff8bc71e8fe4fe8747fa8465d49d6bd8f5ebcdaea161f4bc2da7c93 ) - vcpkg_download_distfile(TINYDNN_ARCHIVE - URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" - FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" - SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b - ) - function(download_opencv_3rdparty ID COMMIT HASH) if(NOT EXISTS "${DOWNLOADS}/opencv-cache/${ID}/${COMMIT}.stamp") vcpkg_download_distfile(OCV_DOWNLOAD @@ -83,9 +137,9 @@ if("contrib" IN_LIST FEATURES) FILENAME "opencv_3rdparty-${COMMIT}.zip" SHA512 ${HASH} ) - vcpkg_extract_source_archive(${OCV_DOWNLOAD}) + vcpkg_extract_source_archive(extracted_ocv ARCHIVE "${OCV_DOWNLOAD}") file(MAKE_DIRECTORY "${DOWNLOADS}/opencv-cache/${ID}") - file(GLOB XFEATURES2D_I ${CURRENT_BUILDTREES_DIR}/src/opencv_3rdparty-${COMMIT}/*) + file(GLOB XFEATURES2D_I "${extracted_ocv}/*") foreach(FILE ${XFEATURES2D_I}) file(COPY ${FILE} DESTINATION "${DOWNLOADS}/opencv-cache/${ID}") get_filename_component(XFEATURES2D_I_NAME "${FILE}" NAME) @@ -111,139 +165,86 @@ if("contrib" IN_LIST FEATURES) ) endif() -set(WITH_CUDA OFF) -if("cuda" IN_LIST FEATURES) - set(WITH_CUDA ON) -endif() - -set(WITH_FFMPEG OFF) -if("ffmpeg" IN_LIST FEATURES) - set(WITH_FFMPEG ON) - vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg.dll" - FILENAME "opencv-cache/ffmpeg/fa5a2a4e2f37defcb95bde8ed145c2b3-opencv_ffmpeg.dll" - SHA512 875f922e1d9fc2fe7c8e879ede35b1001b6ad8b3c4d71feb3823421ce861f580df3418c791315b23870fcb0378d297b01e0761d3f65277ff11ec2fef8c0b08b7 - ) - vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg_64.dll" - FILENAME "opencv-cache/ffmpeg/2cc08fc4fef8199fe80e0f126684834f-opencv_ffmpeg_64.dll" - SHA512 4e74aa4cb115f103b929f93bbc8dcf675de7d0c7916f8f0a80ac46761134b088634be95f959ce5827753ae9ecb2365ca40440dfbb9a9bf89f22ee11b6c8342b3 - ) - vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/ffmpeg_version.cmake" - FILENAME "opencv-cache/ffmpeg/3b90f67f4b429e77d3da36698cef700c-ffmpeg_version.cmake" - SHA512 7d0142c30ac6f6260c1bcabc22753030fd25a708477fa28053e8df847c366967d3b93a8ac14af19a2b7b73d9f8241749a431458faf21a0c8efc7d6d99eecfdcf - ) -endif() - -set(WITH_IPP OFF) -if("ipp" IN_LIST FEATURES) - set(WITH_IPP ON) - - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/bdb7bb85f34a8cb0d35e40a81f58da431aa1557a/ippicv/ippicv_2017u3_win_intel64_general_20180518.zip" - FILENAME "opencv-cache/ippicv/915ff92958089ede8ea532d3c4fe7187-ippicv_2017u3_win_intel64_general_20180518.zip" - SHA512 8aa08292d542d521c042864446e47a7a6bdbf3896d86fc7b43255459c24a2e9f34a4e9b177023d178fed7a2e82a9db410f89d81375a542d049785d263f46c64d +if(WITH_IPP) + if(VCPKG_TARGET_IS_OSX) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_mac_intel64_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/1c3d675c2a2395d094d523024896e01b-ippicv_2020_mac_intel64_20191018_general.tgz" + SHA512 454dfaaa245e3a3b2f1ffb1aa8e27e280b03685009d66e147482b14e5796fdf2d332cac0f9b0822caedd5760fda4ee0ce2961889597456bbc18202f10bf727cd ) + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() + elseif(VCPKG_TARGET_IS_LINUX) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_lnx_intel64_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/7421de0095c7a39162ae13a6098782f9-ippicv_2020_lnx_intel64_20191018_general.tgz" + SHA512 de6d80695cd6deef359376476edc4ff85fdddcf94972b936e0017f8a48aaa5d18f55c4253ae37deb83bff2f71410f68408063c88b5f3bf4df3c416aa93ceca87 + ) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_lnx_ia32_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/ad189a940fb60eb71f291321322fe3e8-ippicv_2020_lnx_ia32_20191018_general.tgz" + SHA512 5ca9dafc3a634e2a5f83f6a498611c990ef16d54358e9b44574b01694e9d64b118d46d6e2011506e40d37e5a9865f576f790e37ff96b7c8b503507633631a296 + ) + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() + elseif(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_intel64_20191018_general.zip" + FILENAME "opencv-cache/ippicv/879741a7946b814455eee6c6ffde2984-ippicv_2020_win_intel64_20191018_general.zip" + SHA512 50c4af4b7fe2161d652264230389dad2330e8c95b734d04fb7565bffdab855c06d43085e480da554c56b04f8538087d49503538d5943221ee2a772ee7be4c93c + ) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_ia32_20191018_general.zip" + FILENAME "opencv-cache/ippicv/cd39bdf0c2e1cac9a61101dad7a2413e-ippicv_2020_win_ia32_20191018_general.zip" + SHA512 058d00775d9f16955c7a557d554b8c2976ab9dbad4ba3fdb9823c0f768809edbd835e4397f01dc090a9bc80d81de834375e7006614d2a898f42e8004de0e04bf + ) + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() else() - vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/bdb7bb85f34a8cb0d35e40a81f58da431aa1557a/ippicv/ippicv_2017u3_win_ia32_general_20180518.zip" - FILENAME "opencv-cache/ippicv/928168c2d99ab284047dfcfb7a821d91-ippicv_2017u3_win_ia32_general_20180518.zip" - SHA512 b89b0fb739152303cafc9fb064fa8b24fd94850697137ccbb5c1e344e0f5094115603a5e3be3a25f85d0faefc5c53429a7d65da0142d012ada41e8db2bcdd6b7 - ) + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) endif() endif() -set(WITH_TBB OFF) -if("tbb" IN_LIST FEATURES) - set(WITH_TBB ON) -endif() - -set(WITH_QT OFF) -if("qt" IN_LIST FEATURES) - set(WITH_QT ON) -endif() - -set(WITH_VTK OFF) -if("vtk" IN_LIST FEATURES) - set(WITH_VTK ON) -endif() - -set(WITH_WEBP OFF) -if("webp" IN_LIST FEATURES) - set(WITH_WEBP ON) - list(APPEND CMAKE_MODULE_PATH ${CURRENT_INSTALLED_DIR}/share/libwebp) -endif() - -set(WITH_GDCM OFF) -if("gdcm" IN_LIST FEATURES) - set(WITH_GDCM ON) -endif() - -set(WITH_OPENGL OFF) -if("opengl" IN_LIST FEATURES) - set(WITH_OPENGL ON) -endif() - -set(WITH_OPENEXR OFF) -if("openexr" IN_LIST FEATURES) - set(WITH_OPENEXR ON) - list(APPEND CMAKE_MODULE_PATH ${CURRENT_INSTALLED_DIR}/share/openexr) -endif() - set(WITH_MSMF ON) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) set(WITH_MSMF OFF) endif() -set(WITH_TIFF OFF) -if("tiff" IN_LIST FEATURES) - set(WITH_TIFF ON) -endif() - -set(WITH_JPEG OFF) -if("jpeg" IN_LIST FEATURES) - set(WITH_JPEG ON) -endif() - -set(WITH_JASPER OFF) -if("jasper" IN_LIST FEATURES) - set(WITH_JASPER ON) -endif() - -set(WITH_PNG OFF) -if("png" IN_LIST FEATURES) - set(WITH_PNG ON) -endif() - -set(WITH_EIGEN OFF) -if("eigen" IN_LIST FEATURES) - set(WITH_EIGEN ON) -endif() +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + if (WITH_TBB) + message(WARNING "TBB is currently unsupported in this build configuration, turning it off") + set(WITH_TBB OFF) + endif() -set(WITH_HALIDE OFF) -if("halide" IN_LIST FEATURES) - set(WITH_HALIDE ON) + if (VCPKG_TARGET_IS_WINDOWS AND BUILD_opencv_ovis) + message(WARNING "OVIS is currently unsupported in this build configuration, turning it off") + set(BUILD_opencv_ovis OFF) + endif() endif() -set(OPENCV_ENABLE_NONFREE OFF) -if("nonfree" IN_LIST FEATURES) - set(OPENCV_ENABLE_NONFREE ON) +if("ffmpeg" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}") + set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}") + endif() endif() -if(BUILD_opencv_contrib) - vcpkg_from_github( - OUT_SOURCE_PATH CONTRIB_SOURCE_PATH - REPO opencv/opencv_contrib - REF ${OPENCV_PORT_VERSION} - SHA512 456c6f878fb3bd5459f6430405cf05c609431f8d7db743aa699fc75c305d019682ee3a804bf0cf5107597dd1dbbb69b08be3535a0e6c717e4773ed7c05d08e59 - HEAD_REF master - ) - set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") +if("qt" IN_LIST FEATURES) + list(APPEND ADDITIONAL_BUILD_FLAGS "-DCMAKE_AUTOMOC=ON") endif() -set(WITH_ZLIB ON) set(BUILD_opencv_line_descriptor ON) set(BUILD_opencv_saliency ON) set(BUILD_opencv_bgsegm ON) @@ -253,171 +254,204 @@ if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") set(BUILD_opencv_bgsegm OFF) endif() -string(REPLACE ";" "\\\\\;" CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}") - -vcpkg_configure_cmake( - PREFER_NINJA - SOURCE_PATH ${SOURCE_PATH} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - # Ungrouped Entries - -DOpenCV_DISABLE_ARCH_PATH=ON + ###### opencv cpu recognition is broken, always using host and not target: here we bypass that + -DOPENCV_SKIP_SYSTEM_PROCESSOR_DETECTION=TRUE + -DAARCH64=${TARGET_IS_AARCH64} + -DX86_64=${TARGET_IS_X86_64} + -DX86=${TARGET_IS_X86} + -DARM=${TARGET_IS_ARM} + ###### ocv_options + -DOpenCV_INSTALL_BINARIES_PREFIX= + -DOPENCV_BIN_INSTALL_PATH=bin + -DOPENCV_INCLUDE_INSTALL_PATH=include + -DOPENCV_LIB_INSTALL_PATH=lib + -DOPENCV_3P_LIB_INSTALL_PATH=lib + -DOPENCV_CONFIG_INSTALL_PATH=share/opencv + -DINSTALL_TO_MANGLED_PATHS=OFF + -DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG + -DOPENCV_FFMPEG_SKIP_BUILD_CHECK=TRUE + -DCMAKE_DEBUG_POSTFIX=d + -DOPENCV_DLLVERSION= + -DOPENCV_DEBUG_POSTFIX=d + -DOPENCV_GENERATE_SETUPVARS=OFF # Do not build docs/examples -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF - # Do not build integrated libraries, use external ones whenever possible + ###### Disable build 3rd party libs -DBUILD_JASPER=OFF -DBUILD_JPEG=OFF -DBUILD_OPENEXR=OFF - -DBUILD_PACKAGE=OFF - -DBUILD_PERF_TESTS=OFF -DBUILD_PNG=OFF - -DBUILD_PROTOBUF=OFF - -DBUILD_TESTS=OFF -DBUILD_TIFF=OFF -DBUILD_WEBP=OFF - -DBUILD_WITH_DEBUG_INFO=ON - -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} -DBUILD_ZLIB=OFF - # Select which OpenCV modules should be built + -DBUILD_TBB=OFF + -DBUILD_IPP_IW=OFF + -DBUILD_ITT=OFF + ###### Disable build 3rd party components + -DBUILD_PROTOBUF=OFF + ###### OpenCV Build components -DBUILD_opencv_apps=OFF -DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm} - -DBUILD_opencv_dnn=${BUILD_opencv_dnn} - -DBUILD_opencv_flann=${BUILD_opencv_flann} -DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor} - -DBUILD_opencv_ovis=${BUILD_opencv_ovis} - -DBUILD_opencv_python2=OFF - -DBUILD_opencv_python3=OFF -DBUILD_opencv_saliency=${BUILD_opencv_saliency} - -DBUILD_opencv_sfm=${BUILD_opencv_sfm} - -DBUILD_opencv_world=${BUILD_opencv_world} - # PROTOBUF - -DPROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES} - -DUPDATE_PROTO_FILES=${UPDATE_PROTO_FILES} + -DBUILD_ANDROID_PROJECT=OFF + -DBUILD_ANDROID_EXAMPLES=OFF + -DBUILD_PACKAGE=OFF + -DBUILD_PERF_TESTS=OFF + -DBUILD_TESTS=OFF + -DBUILD_WITH_DEBUG_INFO=ON + -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} + -DBUILD_JAVA=OFF + -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} + ###### PROTOBUF + -DPROTOBUF_UPDATE_FILES=${BUILD_opencv_flann} + -DUPDATE_PROTO_FILES=${BUILD_opencv_flann} + ###### PYLINT/FLAKE8 + -DENABLE_PYLINT=OFF + -DENABLE_FLAKE8=OFF # CMAKE -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON - "-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}" # ENABLE -DENABLE_CXX11=ON - -DENABLE_PYLINT=OFF - -DOPENCV_ENABLE_NONFREE=${OPENCV_ENABLE_NONFREE} - # INSTALL - -DINSTALL_FORCE_UNIX_PATHS=ON - -DINSTALL_LICENSE=OFF - # OPENCV - -DOPENCV_CONFIG_INSTALL_PATH=share/opencv + ###### OPENCV vars "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" ${BUILD_WITH_CONTRIB_FLAG} -DOPENCV_OTHER_INSTALL_PATH=share/opencv - # WITH - -DWITH_CUBLAS=${WITH_CUDA} - -DWITH_CUDA=${WITH_CUDA} - -DWITH_EIGEN=${WITH_EIGEN} - -DWITH_FFMPEG=${WITH_FFMPEG} - -DWITH_GDCM=${WITH_GDCM} - -DWITH_HALIDE=${WITH_HALIDE} + ###### customized properties + ## Options from vcpkg_check_features() + ${FEATURE_OPTIONS} + -DCMAKE_DISABLE_FIND_PACKAGE_Halide=ON + -DHALIDE_ROOT_DIR=${CURRENT_INSTALLED_DIR} + -DWITH_GTK=OFF -DWITH_IPP=${WITH_IPP} - -DWITH_JASPER=${WITH_JASPER} - -DWITH_JPEG=${WITH_JPEG} - -DWITH_LAPACK=OFF -DWITH_MATLAB=OFF -DWITH_MSMF=${WITH_MSMF} + -DWITH_OPENMP=OFF + -DWITH_PROTOBUF=${BUILD_opencv_flann} -DWITH_OPENCLAMDBLAS=OFF - -DWITH_OPENEXR=${WITH_OPENEXR} - -DWITH_OPENGL=${WITH_OPENGL} - -DWITH_PNG=${WITH_PNG} - -DWITH_PROTOBUF=${WITH_PROTOBUF} - -DWITH_QT=${WITH_QT} -DWITH_TBB=${WITH_TBB} - -DWITH_TIFF=${WITH_TIFF} - -DWITH_VTK=${WITH_VTK} - -DWITH_WEBP=${WITH_WEBP} - -DWITH_ZLIB=${WITH_ZLIB} - -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} - OPTIONS_DEBUG - -DINSTALL_HEADERS=OFF - -DINSTALL_OTHER=OFF + -DWITH_OPENJPEG=OFF + ###### BUILD_options (mainly modules which require additional libraries) + -DBUILD_opencv_ovis=${BUILD_opencv_ovis} + -DBUILD_opencv_dnn=${BUILD_opencv_dnn} + ###### The following modules are disabled for UWP + -DBUILD_opencv_quality=${BUILD_opencv_quality} + ###### Additional build flags + ${ADDITIONAL_BUILD_FLAGS} ) -vcpkg_install_cmake() - -if(VCPKG_PLATFORM_TOOLSET STREQUAL "v141") - set(OpenCV_RUNTIME vc15) -else() - set(OpenCV_RUNTIME vc14) -endif() -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(OpenCV_ARCH x64) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(OpenCV_ARCH ARM) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(OpenCV_ARCH ARM64) -else() - set(OpenCV_ARCH x86) -endif() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv") +vcpkg_copy_pdbs() -file(GLOB BIN_AND_LIB ${CURRENT_PACKAGES_DIR}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/*) -file(COPY ${BIN_AND_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}) -file(GLOB DEBUG_BIN_AND_LIB ${CURRENT_PACKAGES_DIR}/debug/${OpenCV_ARCH}/${OpenCV_RUNTIME}/*) -file(COPY ${DEBUG_BIN_AND_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/${OpenCV_ARCH}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${OpenCV_ARCH}) - -file(GLOB STATICLIB ${CURRENT_PACKAGES_DIR}/staticlib/*) -if(STATICLIB) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) - file(COPY ${STATICLIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/staticlib) -endif() -file(GLOB STATICLIB ${CURRENT_PACKAGES_DIR}/debug/staticlib/*) -if(STATICLIB) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) - file(COPY ${STATICLIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/staticlib) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES) + set(DEPS_STRING "include(CMakeFindDependencyMacro) +find_dependency(Protobuf CONFIG) +if(protobuf_FOUND) + if(TARGET protobuf::libprotobuf) + add_library (libprotobuf INTERFACE IMPORTED) + set_target_properties(libprotobuf PROPERTIES + INTERFACE_LINK_LIBRARIES protobuf::libprotobuf + ) + else() + add_library (libprotobuf UNKNOWN IMPORTED) + set_target_properties(libprotobuf PROPERTIES + IMPORTED_LOCATION \"${Protobuf_LIBRARY}\" + INTERFACE_INCLUDE_DIRECTORIES \"${Protobuf_INCLUDE_DIR}\" + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES \"${Protobuf_INCLUDE_DIR}\" + ) + endif() endif() +find_dependency(Threads)") + if("tiff" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(TIFF)") + endif() + if("cuda" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(CUDA)") + endif() + if(BUILD_opencv_quality) + string(APPEND DEPS_STRING " +# C language is required for try_compile tests in FindHDF5 +enable_language(C) +find_dependency(HDF5) +find_dependency(Tesseract)") + endif() + if(WITH_TBB) + string(APPEND DEPS_STRING "\nfind_dependency(TBB)") + endif() + if("vtk" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(VTK)") + endif() + if("sfm" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(gflags CONFIG)\nfind_dependency(Ceres CONFIG)") + endif() + if("eigen" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(Eigen3 CONFIG)") + endif() + if("lapack" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(LAPACK)") + endif() + if("openexr" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(OpenEXR CONFIG)") + endif() + if(WITH_OPENMP) + string(APPEND DEPS_STRING "\nfind_dependency(OpenMP)") + endif() + if(BUILD_opencv_ovis) + string(APPEND DEPS_STRING "\nfind_dependency(Ogre)\nfind_dependency(Freetype)") + endif() + if("quirc" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(quirc)") + endif() + if("qt" IN_LIST FEATURES) + string(APPEND DEPS_STRING " +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +find_dependency(Qt5 COMPONENTS OpenGL Concurrent Test)") + endif() + if("ade" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(ade)") + endif() + if("gdcm" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(GDCM)") + endif() -file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake OPENCV_CONFIG) -string(REPLACE "/staticlib/" - "/lib/" OPENCV_CONFIG "${OPENCV_CONFIG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake "${OPENCV_CONFIG}") + string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1)\n${DEPS_STRING}" OPENCV_MODULES "${OPENCV_MODULES}") -file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-release.cmake OPENCV_CONFIG_LIB) -string(REPLACE "/staticlib/" - "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-release.cmake "${OPENCV_CONFIG_LIB}") + if(WITH_OPENMP) + string(REPLACE "set_target_properties(opencv_core PROPERTIES + INTERFACE_LINK_LIBRARIES \"" + "set_target_properties(opencv_core PROPERTIES + INTERFACE_LINK_LIBRARIES \"\$;" OPENCV_MODULES "${OPENCV_MODULES}") + endif() -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/OpenCVModules-debug.cmake OPENCV_CONFIG_LIB) -string(REPLACE "/staticlib/" - "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -string(REPLACE "PREFIX}/lib" - "PREFIX}/debug/lib" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -string(REPLACE "PREFIX}/bin" - "PREFIX}/debug/bin" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake "${OPENCV_CONFIG_LIB}") + if(BUILD_opencv_ovis) + string(REPLACE "OgreGLSupportStatic" + "OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}") + endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share/opencv/OpenCVModules.cmake ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake) + file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" "${OPENCV_MODULES}") -file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake OPENCV_MODULES) -string(REPLACE "${CURRENT_INSTALLED_DIR}" - "\${_VCPKG_INSTALLED_DIR}/\${VCPKG_TARGET_TRIPLET}" OPENCV_MODULES "${OPENCV_MODULES}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake OPENCV_MODULES) - string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" - "set(CMAKE_IMPORT_FILE_VERSION 1) - find_package(TIFF REQUIRED)" OPENCV_MODULES "${OPENCV_MODULES}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE") -vcpkg_copy_pdbs() - -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/opencv3/LICENSE ${CURRENT_PACKAGES_DIR}/share/opencv3/copyright) +if(VCPKG_TARGET_IS_ANDROID) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.android") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/README.android") +endif() -set(VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT enabled) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/opencv3/usage b/ports/opencv3/usage deleted file mode 100644 index 1c30e5feaf10b7..00000000000000 --- a/ports/opencv3/usage +++ /dev/null @@ -1,5 +0,0 @@ -The package opencv provides CMake integration: - - find_package(OpenCV REQUIRED) - target_include_directories(main PRIVATE ${OpenCV_INCLUDE_DIRS}) - target_link_libraries(main PRIVATE ${OpenCV_LIBS}) diff --git a/ports/opencv3/vcpkg.json b/ports/opencv3/vcpkg.json new file mode 100644 index 00000000000000..6ed1d5032bcdae --- /dev/null +++ b/ports/opencv3/vcpkg.json @@ -0,0 +1,232 @@ +{ + "name": "opencv3", + "version": "3.4.15", + "port-version": 1, + "description": "computer vision library", + "homepage": "https://github.com/opencv/opencv", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "default-features": [ + "dnn", + "jpeg", + "png", + "quirc", + "tiff", + "webp" + ], + "features": { + "contrib": { + "description": "opencv_contrib module", + "dependencies": [ + { + "name": "hdf5", + "platform": "!uwp & !(windows & (arm | arm64))" + }, + { + "name": "opencv3", + "features": [ + "dnn" + ] + }, + { + "name": "tesseract", + "platform": "!uwp & !(windows & (arm | arm64))" + } + ] + }, + "cuda": { + "description": "CUDA support for opencv", + "dependencies": [ + "cuda", + "cudnn", + { + "name": "opencv3", + "features": [ + "contrib" + ] + } + ] + }, + "dnn": { + "description": "Enable dnn module", + "dependencies": [ + { + "name": "opencv3", + "features": [ + "flann" + ] + } + ] + }, + "eigen": { + "description": "Eigen support for opencv", + "dependencies": [ + "eigen3" + ] + }, + "ffmpeg": { + "description": "ffmpeg support for opencv", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avformat", + "swresample", + "swscale" + ] + } + ] + }, + "flann": { + "description": "opencv_flann module", + "dependencies": [ + "protobuf" + ] + }, + "gdcm": { + "description": "GDCM support for opencv", + "dependencies": [ + "gdcm" + ] + }, + "halide": { + "description": "Halide support for opencv", + "dependencies": [ + "halide", + { + "name": "opencv3", + "default-features": false + }, + { + "name": "opencv3", + "features": [ + "dnn" + ] + } + ] + }, + "ipp": { + "description": "Enable Intel Integrated Performance Primitives" + }, + "jasper": { + "description": "JPEG 2000 support for opencv", + "dependencies": [ + "jasper" + ] + }, + "jpeg": { + "description": "JPEG support for opencv", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "lapack": { + "description": "LAPACK support for opencv", + "dependencies": [ + "blas", + "lapack" + ] + }, + "nonfree": { + "description": "allow nonfree and unredistributable libraries" + }, + "openexr": { + "description": "OpenEXR support for opencv", + "dependencies": [ + "openexr" + ] + }, + "opengl": { + "description": "opengl support for opencv", + "dependencies": [ + "opengl" + ] + }, + "ovis": { + "description": "opencv_ovis module", + "dependencies": [ + "ogre", + { + "name": "opencv3", + "features": [ + "contrib" + ] + } + ] + }, + "png": { + "description": "PNG support for opencv", + "dependencies": [ + "libpng" + ] + }, + "qt": { + "description": "Qt GUI support for opencv", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] + }, + "quirc": { + "description": "Enable QR code module", + "dependencies": [ + "quirc" + ] + }, + "sfm": { + "description": "opencv_sfm module", + "dependencies": [ + "ceres", + "eigen3", + "gflags", + "glog", + { + "name": "opencv3", + "features": [ + "contrib" + ] + } + ] + }, + "tbb": { + "description": "Enable Intel Threading Building Blocks", + "dependencies": [ + "tbb" + ] + }, + "tiff": { + "description": "TIFF support for opencv", + "dependencies": [ + "tiff" + ] + }, + "vtk": { + "description": "vtk support for opencv", + "dependencies": [ + "vtk" + ] + }, + "webp": { + "description": "WebP support for opencv", + "dependencies": [ + "libwebp" + ] + }, + "world": { + "description": "Compile to a single package support for opencv" + } + } +} diff --git a/ports/opencv4/0001-disable-downloading.patch b/ports/opencv4/0001-disable-downloading.patch index 28b00251fe4f23..e2c886d455f229 100644 --- a/ports/opencv4/0001-disable-downloading.patch +++ b/ports/opencv4/0001-disable-downloading.patch @@ -1,11 +1,12 @@ --- a/cmake/OpenCVDownload.cmake +++ b/cmake/OpenCVDownload.cmake -@@ -151,6 +151,8 @@ function(ocv_download) +@@ -157,6 +157,9 @@ function(ocv_download) # Download if(NOT EXISTS "${CACHE_CANDIDATE}") ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"") + string(REPLACE "${OPENCV_DOWNLOAD_PATH}/" "opencv-cache/" CACHE_SUBPATH "${CACHE_CANDIDATE}") + message(FATAL_ERROR " Downloads are not permitted during configure. Please pre-download the file \"${CACHE_CANDIDATE}\":\n \n vcpkg_download_distfile(OCV_DOWNLOAD\n URLS \"${DL_URL}\"\n FILENAME \"${CACHE_SUBPATH}\"\n SHA512 0\n )") - file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" - INACTIVITY_TIMEOUT 60 - TIMEOUT 600 ++ + foreach(try ${OPENCV_DOWNLOAD_TRIES_LIST}) + ocv_download_log("#try ${try}") + file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" diff --git a/ports/opencv4/0002-install-options.patch b/ports/opencv4/0002-install-options.patch index 10aa08c24449da..a551023c3bf85b 100644 --- a/ports/opencv4/0002-install-options.patch +++ b/ports/opencv4/0002-install-options.patch @@ -1,17 +1,6 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8631bbc..e801558 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -647,7 +647,7 @@ endif() - - if(WIN32) - # Postfix of DLLs: -- set(OPENCV_DLLVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}") -+ set(OPENCV_DLLVERSION "") - set(OPENCV_DEBUG_POSTFIX d) - else() - # Postfix of so's: -@@ -698,7 +698,7 @@ endif() +@@ -616,7 +616,7 @@ endif() ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS) # --- Python Support --- @@ -20,42 +9,41 @@ index 8631bbc..e801558 100644 include(cmake/OpenCVDetectPython.cmake) endif() -diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake -index e3ae62f..d866162 100644 --- a/cmake/OpenCVCompilerOptions.cmake +++ b/cmake/OpenCVCompilerOptions.cmake -@@ -256,7 +256,6 @@ if(MSVC) +@@ -286,7 +286,6 @@ if(MSVC) #endif() if(BUILD_WITH_DEBUG_INFO) - set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /Zi") set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE} /debug") set(OPENCV_EXTRA_SHARED_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_SHARED_LINKER_FLAGS_RELEASE} /debug") - endif() -diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake -index cef9d0b..b6ddb81 100644 + set(OPENCV_EXTRA_MODULE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_MODULE_LINKER_FLAGS_RELEASE} /debug") --- a/cmake/OpenCVGenConfig.cmake +++ b/cmake/OpenCVGenConfig.cmake -@@ -109,7 +109,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) +@@ -114,11 +114,11 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) endif() endfunction() -if((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) -+if(NOT ANDROID) ++if(TRUE) ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "" "") endif() -@@ -121,7 +121,7 @@ endif() +-if(ANDROID) ++if(FALSE) + ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "abi-${ANDROID_NDK_ABI_NAME}" "OpenCVConfig.root-ANDROID.cmake.in") + install(FILES "${OpenCV_SOURCE_DIR}/platforms/android/android.toolchain.cmake" DESTINATION "${OPENCV_CONFIG_INSTALL_PATH}" COMPONENT dev) + endif() +@@ -126,7 +126,7 @@ endif() # -------------------------------------------------------------------------------------------- # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages # -------------------------------------------------------------------------------------------- -if(WIN32) +if(0) - if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - if(BUILD_SHARED_LIBS) - set(_lib_suffix "lib") -diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt -index 1f0d720..0bb1ff7 100644 + if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows AND NOT OPENCV_SKIP_CMAKE_ROOT_CONFIG) + ocv_gen_config("${CMAKE_BINARY_DIR}/win-install" + "${OPENCV_INSTALL_BINARIES_PREFIX}${OPENCV_INSTALL_BINARIES_SUFFIX}" --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,8 +1,6 @@ diff --git a/ports/opencv4/0003-force-package-requirements.patch b/ports/opencv4/0003-force-package-requirements.patch index b6051f8498b66b..15ce3756be50ee 100644 --- a/ports/opencv4/0003-force-package-requirements.patch +++ b/ports/opencv4/0003-force-package-requirements.patch @@ -1,44 +1,51 @@ -diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake -index 227cfb2..7a97a19 100644 --- a/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake -@@ -6,7 +6,7 @@ - if(BUILD_ZLIB) - ocv_clear_vars(ZLIB_FOUND) - else() +@@ -11,7 +11,7 @@ else() + set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES .so) + endif() - find_package(ZLIB "${MIN_VER_ZLIB}") + find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) - if(ZLIB_FOUND AND ANDROID) - if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$") - set(ZLIB_LIBRARIES z) -@@ -30,7 +30,7 @@ if(WITH_JPEG) - if(BUILD_JPEG) + if(ANDROID) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) + unset(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) +@@ -41,7 +41,7 @@ if(WITH_JPEG) ocv_clear_vars(JPEG_FOUND) else() + ocv_clear_internal_cache_vars(JPEG_LIBRARY JPEG_INCLUDE_DIR) - include(FindJPEG) + find_package(JPEG REQUIRED) endif() if(NOT JPEG_FOUND) -@@ -74,7 +74,7 @@ if(WITH_TIFF) - if(BUILD_TIFF) +@@ -87,7 +87,7 @@ if(WITH_TIFF) ocv_clear_vars(TIFF_FOUND) else() + ocv_clear_internal_cache_vars(TIFF_LIBRARY TIFF_INCLUDE_DIR) - include(FindTIFF) + find_package(TIFF REQUIRED) if(TIFF_FOUND) ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) endif() -@@ -117,7 +117,7 @@ if(WITH_WEBP) - if(BUILD_WEBP) +@@ -131,7 +131,7 @@ if(WITH_WEBP) ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR) else() + ocv_clear_internal_cache_vars(WEBP_LIBRARY WEBP_INCLUDE_DIR) - include(cmake/OpenCVFindWebP.cmake) + find_package(WebP REQUIRED) if(WEBP_FOUND) set(HAVE_WEBP 1) endif() -@@ -158,7 +158,7 @@ if(WITH_JASPER) +@@ -172,7 +172,7 @@ if(WITH_OPENJPEG) + if(BUILD_OPENJPEG) + ocv_clear_vars(OpenJPEG_FOUND) + else() +- find_package(OpenJPEG QUIET) ++ find_package(OpenJPEG REQUIRED) + endif() + + if(NOT OpenJPEG_FOUND OR OPENJPEG_MAJOR_VERSION LESS 2) +@@ -200,7 +200,7 @@ if(WITH_JASPER AND NOT HAVE_OPENJPEG) if(BUILD_JASPER) ocv_clear_vars(JASPER_FOUND) else() @@ -47,82 +54,39 @@ index 227cfb2..7a97a19 100644 endif() if(NOT JASPER_FOUND) -@@ -182,7 +182,7 @@ if(WITH_PNG) - if(BUILD_PNG) +@@ -225,7 +225,7 @@ if(WITH_PNG) ocv_clear_vars(PNG_FOUND) else() + ocv_clear_internal_cache_vars(PNG_LIBRARY PNG_INCLUDE_DIR) - include(FindPNG) + find_package(PNG REQUIRED) if(PNG_FOUND) include(CheckIncludeFile) check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) -@@ -213,7 +213,7 @@ endif() - if(WITH_OPENEXR) +@@ -257,7 +257,7 @@ if(WITH_OPENEXR) ocv_clear_vars(HAVE_OPENEXR) if(NOT BUILD_OPENEXR) + ocv_clear_internal_cache_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION) - include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") + find_package(OpenEXR REQUIRED) endif() if(OPENEXR_FOUND) -@@ -231,7 +231,7 @@ endif() +@@ -275,7 +275,7 @@ endif() # --- GDAL (optional) --- if(WITH_GDAL) - find_package(GDAL QUIET) -+ find_package(GDAL REQUIRED) ++ find_package(GDAL REQUIRED) if(NOT GDAL_FOUND) set(HAVE_GDAL NO) -@@ -243,7 +243,7 @@ if(WITH_GDAL) +@@ -287,7 +287,7 @@ if(WITH_GDAL) endif() - if (WITH_GDCM) + if(WITH_GDCM) - find_package(GDCM QUIET) + find_package(GDCM REQUIRED) if(NOT GDCM_FOUND) set(HAVE_GDCM NO) ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES) -@@ -273,4 +273,4 @@ if(WITH_IMGCODEC_PFM) - set(HAVE_IMGCODEC_PFM ON) - elseif(DEFINED WITH_IMGCODEC_PFM) - set(HAVE_IMGCODEC_PFM OFF) --endif() -\ No newline at end of file -+endif() -diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake -index a658bf6..5c9411a 100644 ---- a/cmake/OpenCVFindLibsPerf.cmake -+++ b/cmake/OpenCVFindLibsPerf.cmake -@@ -41,14 +41,9 @@ endif(WITH_CUDA) - - # --- Eigen --- - if(WITH_EIGEN AND NOT HAVE_EIGEN) -- find_package(Eigen3 QUIET) -+ find_package(Eigen3 REQUIRED) - - if(Eigen3_FOUND) -- if(TARGET Eigen3::Eigen) -- # Use Eigen3 imported target if possible -- list(APPEND OPENCV_LINKER_LIBS Eigen3::Eigen) -- set(HAVE_EIGEN 1) -- else() - if(DEFINED EIGEN3_INCLUDE_DIRS) - set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIRS}) - set(HAVE_EIGEN 1) -@@ -56,7 +51,6 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN) - set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIR}) - set(HAVE_EIGEN 1) - endif() -- endif() - if(HAVE_EIGEN) - if(DEFINED EIGEN3_WORLD_VERSION) # CMake module - set(EIGEN_WORLD_VERSION ${EIGEN3_WORLD_VERSION}) -@@ -67,6 +61,7 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN) - set(EIGEN_MAJOR_VERSION ${EIGEN3_VERSION_MINOR}) - set(EIGEN_MINOR_VERSION ${EIGEN3_VERSION_PATCH}) - endif() -+ ocv_include_directories(${EIGEN_INCLUDE_PATH}) - endif() - endif() - diff --git a/ports/opencv4/0004-fix-policy-CMP0057.patch b/ports/opencv4/0004-fix-policy-CMP0057.patch new file mode 100644 index 00000000000000..d126d9d96a14e7 --- /dev/null +++ b/ports/opencv4/0004-fix-policy-CMP0057.patch @@ -0,0 +1,7 @@ +--- a/modules/videoio/CMakeLists.txt ++++ b/modules/videoio/CMakeLists.txt +@@ -1,3 +1,4 @@ ++cmake_minimum_required(VERSION 3.3) + set(VIDEOIO_PLUGIN_LIST "" CACHE STRING "List of videoio backends to be compiled as plugins (ffmpeg, gstreamer, mfx, msmf or special value 'all')") + set(VIDEOIO_ENABLE_PLUGINS "ON" CACHE BOOL "Allow building and using of videoio plugins") + mark_as_advanced(VIDEOIO_PLUGIN_LIST VIDEOIO_ENABLE_PLUGINS) diff --git a/ports/opencv4/0005-fix-eigen.patch b/ports/opencv4/0005-fix-eigen.patch new file mode 100644 index 00000000000000..196542dcdd2ea6 --- /dev/null +++ b/ports/opencv4/0005-fix-eigen.patch @@ -0,0 +1,11 @@ +--- a/cmake/OpenCVFindLibsPerf.cmake ++++ b/cmake/OpenCVFindLibsPerf.cmake +@@ -55,7 +55,7 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN) + OR NOT (CMAKE_VERSION VERSION_LESS "3.0.0") # Eigen3Targets.cmake required CMake 3.0.0+ + ) AND NOT OPENCV_SKIP_EIGEN_FIND_PACKAGE_CONFIG + ) +- find_package(Eigen3 CONFIG QUIET) # Ceres 2.0.0 CMake scripts doesn't work with CMake's FindEigen3.cmake module (due to missing EIGEN3_VERSION_STRING) ++ find_package(Eigen3 CONFIG REQUIRED) # Ceres 2.0.0 CMake scripts doesn't work with CMake's FindEigen3.cmake module (due to missing EIGEN3_VERSION_STRING) + endif() + if(NOT Eigen3_FOUND) + find_package(Eigen3 QUIET) diff --git a/ports/opencv4/0006-fix-uwp.patch b/ports/opencv4/0006-fix-uwp.patch new file mode 100644 index 00000000000000..ec315b4980a897 --- /dev/null +++ b/ports/opencv4/0006-fix-uwp.patch @@ -0,0 +1,11 @@ +--- a/cmake/OpenCVModule.cmake ++++ b/cmake/OpenCVModule.cmake +@@ -1205,7 +1205,7 @@ function(ocv_add_perf_tests) + set_target_properties(${the_target} PROPERTIES FOLDER "tests performance") + endif() + +- if(WINRT) ++ if(WINRT AND BUILD_TESTS) + # removing APPCONTAINER from tests to run from console + # look for detailed description inside of ocv_create_module macro above + add_custom_command(TARGET "opencv_perf_${name}" diff --git a/ports/opencv4/0007-fix-hdf5.patch b/ports/opencv4/0007-fix-hdf5.patch new file mode 100644 index 00000000000000..8e7e154ad40671 --- /dev/null +++ b/ports/opencv4/0007-fix-hdf5.patch @@ -0,0 +1,28 @@ +--- a/modules/hdf/CMakeLists.txt ++++ b/modules/hdf/CMakeLists.txt +@@ -1,25 +1,8 @@ + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}) + +-if(WIN32) +- # windows cmake internal lookups are broken for now +- # will lookup for headers and shared libs given HDF_DIR env +- find_path(HDF5_INCLUDE_DIRS hdf5.h HINTS "$ENV{HDF5_DIR}\\..\\include") +- find_library(HDF5_C_LIBRARY NAMES hdf5 HINTS "$ENV{HDF5_DIR}\\..\\lib") +- if(HDF5_INCLUDE_DIRS AND HDF5_C_LIBRARY) +- set(HDF5_FOUND "YES") +- set(HDF5_LIBRARIES ${HDF5_C_LIBRARY}) +- mark_as_advanced(HDF5_LIBRARIES) +- mark_as_advanced(HDF5_C_LIBRARY) +- mark_as_advanced(HDF5_INCLUDE_DIRS) +- add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB -D_HDF5USEDLL_) +- else() +- set(HDF5_FOUND "NO") +- endif() +-else() + if(NOT CMAKE_CROSSCOMPILING) # iOS build should not reuse OSX package + find_package(HDF5) + endif() +-endif() + + if(NOT HDF5_FOUND) + ocv_module_disable(hdf) # no return diff --git a/ports/opencv4/0008-devendor-quirc.patch b/ports/opencv4/0008-devendor-quirc.patch new file mode 100644 index 00000000000000..62b02ce0ad0d84 --- /dev/null +++ b/ports/opencv4/0008-devendor-quirc.patch @@ -0,0 +1,22 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -803,7 +803,7 @@ if(WITH_OPENVX) + endif() + + if(WITH_QUIRC) +- add_subdirectory(3rdparty/quirc) ++ find_package(quirc CONFIG REQUIRED) + set(HAVE_QUIRC TRUE) + endif() + +--- a/modules/objdetect/CMakeLists.txt ++++ b/modules/objdetect/CMakeLists.txt +@@ -2,7 +2,5 @@ set(the_description "Object Detection") + ocv_define_module(objdetect opencv_core opencv_imgproc opencv_calib3d WRAP java objc python js) + + if(HAVE_QUIRC) +- get_property(QUIRC_INCLUDE GLOBAL PROPERTY QUIRC_INCLUDE_DIR) +- ocv_include_directories(${QUIRC_INCLUDE}) +- ocv_target_link_libraries(${the_module} quirc) ++ ocv_target_link_libraries(${the_module} quirc::quirc) + endif() diff --git a/ports/opencv4/0009-fix-protobuf.patch b/ports/opencv4/0009-fix-protobuf.patch new file mode 100644 index 00000000000000..38572e309f8469 --- /dev/null +++ b/ports/opencv4/0009-fix-protobuf.patch @@ -0,0 +1,26 @@ +--- a/cmake/OpenCVFindProtobuf.cmake ++++ b/cmake/OpenCVFindProtobuf.cmake +@@ -31,7 +31,7 @@ if(BUILD_PROTOBUF) + set(HAVE_PROTOBUF TRUE) + else() + unset(Protobuf_VERSION CACHE) +- find_package(Protobuf QUIET) ++ find_package(Protobuf CONFIG REQUIRED) + + # Backwards compatibility + # Define camel case versions of input variables +@@ -76,6 +76,7 @@ if(HAVE_PROTOBUF) + if(NOT BUILD_PROTOBUF) + if(TARGET "${Protobuf_LIBRARIES}") + get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_RELEASE) ++ get_target_property(__location_debug "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_DEBUG) + if(NOT __location) + get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION) + endif() +@@ -87,5 +88,5 @@ if(HAVE_PROTOBUF) + endif() + list(APPEND CUSTOM_STATUS_protobuf " Protobuf:" + BUILD_PROTOBUF THEN "build (${Protobuf_VERSION})" +- ELSE "${__location} (${Protobuf_VERSION})") ++ ELSE "optimized ${__location} debug ${__location_debug} ; version (${Protobuf_VERSION})") + endif() diff --git a/ports/opencv4/0009-fix-uwp.patch b/ports/opencv4/0009-fix-uwp.patch deleted file mode 100644 index 5c54256a598c5f..00000000000000 --- a/ports/opencv4/0009-fix-uwp.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake -index 799592b..3f44173 100644 ---- a/cmake/OpenCVModule.cmake -+++ b/cmake/OpenCVModule.cmake -@@ -852,7 +852,7 @@ macro(ocv_create_module) - set(the_module_target ${the_module}) - endif() - -- if(WINRT) -+ if(WINRT AND BUILD_TESTS) - # removing APPCONTAINER from modules to run from console - # in case of usual starting of WinRT test apps output is missing - # so starting of console version w/o APPCONTAINER is required to get test results -@@ -1175,7 +1175,7 @@ function(ocv_add_perf_tests) - set_target_properties(${the_target} PROPERTIES FOLDER "tests performance") - endif() - -- if(WINRT) -+ if(WINRT AND BUILD_TESTS) - # removing APPCONTAINER from tests to run from console - # look for detailed description inside of ocv_create_module macro above - add_custom_command(TARGET "opencv_perf_${name}" -diff --git a/modules/core/src/utils/datafile.cpp b/modules/core/src/utils/datafile.cpp -index aafbfdf..10543ae 100644 ---- a/modules/core/src/utils/datafile.cpp -+++ b/modules/core/src/utils/datafile.cpp -@@ -108,7 +108,7 @@ static cv::String getModuleLocation(const void* addr) - CV_UNUSED(addr); - #ifdef _WIN32 - HMODULE m = 0; --#if _WIN32_WINNT >= 0x0501 -+#if _WIN32_WINNT >= 0x0501 && (!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)) - ::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, - reinterpret_cast(addr), - &m); -@@ -155,7 +155,7 @@ bool getBinLocation(std::wstring& dst) - { - void* addr = (void*)getModuleLocation; // using code address, doesn't work with static linkage! - HMODULE m = 0; --#if _WIN32_WINNT >= 0x0501 -+#if _WIN32_WINNT >= 0x0501 && (!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)) - ::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, - reinterpret_cast(addr), - &m); -diff --git a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp -index 236e227..eccf97e 100644 ---- a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp -+++ b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp -@@ -94,7 +94,7 @@ Media::CaptureFrameGrabber::~CaptureFrameGrabber() - - void Media::CaptureFrameGrabber::ShowCameraSettings() - { --#if WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP -+#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) && (WINAPI_FAMILY != WINAPI_FAMILY_PC_APP) - if (_state == State::Started) - { - CameraOptionsUI::Show(_capture.Get()); diff --git a/ports/opencv4/0010-fix-uwp-tiff-imgcodecs.patch b/ports/opencv4/0010-fix-uwp-tiff-imgcodecs.patch new file mode 100644 index 00000000000000..0bd3d701b959fc --- /dev/null +++ b/ports/opencv4/0010-fix-uwp-tiff-imgcodecs.patch @@ -0,0 +1,13 @@ +--- a/modules/imgcodecs/CMakeLists.txt ++++ b/modules/imgcodecs/CMakeLists.txt +@@ -9,6 +9,10 @@ ocv_add_module(imgcodecs opencv_imgproc WRAP java objc python) + + ocv_clear_vars(GRFMT_LIBS) + ++if(MSVC) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996") ++endif() ++ + if(HAVE_WINRT_CX AND NOT WINRT) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW") + endif() diff --git a/ports/opencv4/CONTROL b/ports/opencv4/CONTROL deleted file mode 100644 index ca52577c7459b4..00000000000000 --- a/ports/opencv4/CONTROL +++ /dev/null @@ -1,96 +0,0 @@ -Source: opencv4 -Version: 4.1.1-1 -Build-Depends: protobuf, zlib -Description: computer vision library -Default-Features: dnn, jpeg, opengl, png, tiff, webp - -Feature: nonfree -Description: opencv nonfree module - -Feature: ade -Build-Depends: ade -Description: graph api - -Feature: contrib -Build-Depends: hdf5 (!uwp) -Description: opencv_contrib module - -Feature: cuda -Build-Depends: opencv4[contrib], cuda -Description: CUDA support for opencv - -Feature: dnn -Description: Enable dnn module - -Feature: eigen -Build-Depends: eigen3 -Description: Eigen support for opencv - -Feature: ffmpeg -Build-Depends: ffmpeg -Description: ffmpeg support for opencv - -Feature: gdcm -Build-Depends: gdcm -Description: GDCM support for opencv - -Feature: ipp -Description: Enable Intel Integrated Performance Primitives - -Feature: jasper -Build-Depends: jasper -Description: JPEG 2000 support for opencv - -Feature: jpeg -Build-Depends: libjpeg-turbo -Description: JPEG support for opencv - -Feature: openexr -Build-Depends: openexr -Description: OpenEXR support for opencv - -Feature: opengl -Build-Depends: opengl -Description: opengl support for opencv - -Feature: openmp -Description: Enable openmp support for opencv - -Feature: ovis -Build-Depends: opencv4[contrib], ogre -Description: opencv_ovis module - -Feature: png -Build-Depends: libpng -Description: PNG support for opencv - -Feature: qt -Build-Depends: qt5 -Description: Qt GUI support for opencv - -Feature: sfm -Build-Depends: opencv4[contrib], eigen3, glog, gflags, ceres -Description: opencv_sfm module - -Feature: tbb -Build-Depends: tbb -Description: Enable Intel Threading Building Blocks - -Feature: tiff -Build-Depends: tiff -Description: TIFF support for opencv - -Feature: vtk -Build-Depends: vtk -Description: vtk support for opencv - -Feature: webp -Build-Depends: libwebp -Description: WebP support for opencv - -Feature: halide -Build-Depends: halide, opencv4[dnn] -Description: Halide support for opencv - -Feature: world -Description: Compile to a single package support for opencv diff --git a/ports/opencv4/portfile.cmake b/ports/opencv4/portfile.cmake index efafab6146aa1a..e965dd2a07a461 100644 --- a/ports/opencv4/portfile.cmake +++ b/ports/opencv4/portfile.cmake @@ -1,63 +1,105 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv2") + message(FATAL_ERROR "OpenCV 2 is installed, please uninstall and try again:\n vcpkg remove opencv2") +endif() + if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv3") message(FATAL_ERROR "OpenCV 3 is installed, please uninstall and try again:\n vcpkg remove opencv3") endif() -include(vcpkg_common_functions) - -set(OPENCV_VERSION "4.1.1") - -if(VCPKG_TARGET_IS_LINUX) - message("OpenCV currently requires the following library from the system package manager:\n libgtk3\n\nThis can be installed on Ubuntu systems via apt-get install libgtk-3-dev") -endif() +set(OPENCV_VERSION "4.5.3") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv REF ${OPENCV_VERSION} - SHA512 80fa48d992ca06a2a4ab6740df6d8c21f4926165486b393969da2c5bbe2f3a0b799fb76dee5e3654e90c743e49bbd2b5b02ad59a4766896bbf4cd5b4e3251e0f + SHA512 efd2214f29b1eb2e1ae55280f9fc2f64af7c2e91154264c43d0d4186dd5b8f81e86942dff612d08cd9eaa834421457fe765760181160168cd4c52839a0739758 HEAD_REF master PATCHES 0001-disable-downloading.patch 0002-install-options.patch 0003-force-package-requirements.patch - 0009-fix-uwp.patch + 0004-fix-policy-CMP0057.patch + 0005-fix-eigen.patch + 0006-fix-uwp.patch + 0008-devendor-quirc.patch + 0009-fix-protobuf.patch + 0010-fix-uwp-tiff-imgcodecs.patch ) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(TARGET_IS_AARCH64 1) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(TARGET_IS_ARM 1) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(TARGET_IS_X86_64 1) +else() + set(TARGET_IS_X86 1) +endif() + +file(REMOVE "${SOURCE_PATH}/cmake/FindCUDNN.cmake") + string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) set(ADE_DIR ${CURRENT_INSTALLED_DIR}/share/ade CACHE PATH "Path to existing ADE CMake Config file") vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES "ade" WITH_ADE "contrib" WITH_CONTRIB - "cuda" WITH_CUDA "cuda" WITH_CUBLAS - "dnn" BUILD_opencv_dnn + "cuda" WITH_CUDA + "cudnn" WITH_CUDNN "eigen" WITH_EIGEN "ffmpeg" WITH_FFMPEG "gdcm" WITH_GDCM "halide" WITH_HALIDE "jasper" WITH_JASPER "jpeg" WITH_JPEG + "lapack" WITH_LAPACK "nonfree" OPENCV_ENABLE_NONFREE "openexr" WITH_OPENEXR "opengl" WITH_OPENGL - "openmp" WITH_OPENMP "png" WITH_PNG "qt" WITH_QT + "quirc" WITH_QUIRC "sfm" BUILD_opencv_sfm "tiff" WITH_TIFF + "vtk" WITH_VTK "webp" WITH_WEBP "world" BUILD_opencv_world ) -# Cannot use vcpkg_check_features() for "ipp", "ovis", "tbb", and "vtk". +# Cannot use vcpkg_check_features() for "dnn", ipp", "openmp", "ovis", "tbb" # As the respective value of their variables can be unset conditionally. +set(BUILD_opencv_dnn OFF) +if("dnn" IN_LIST FEATURES) + if(NOT VCPKG_TARGET_IS_ANDROID) + set(BUILD_opencv_dnn ON) + else() + message(WARNING "The dnn module cannot be enabled on Android") + endif() +endif() + +set(BUILD_opencv_gapi ON) +if(VCPKG_TARGET_IS_UWP) + set(BUILD_opencv_gapi OFF) + message(WARNING "The gapi module cannot be enabled on UWP platform") +endif() + set(WITH_IPP OFF) if("ipp" IN_LIST FEATURES) set(WITH_IPP ON) endif() +set(WITH_OPENMP OFF) +if("openmp" IN_LIST FEATURES) + if(NOT VCPKG_TARGET_IS_OSX) + set(WITH_OPENMP ON) + else() + message(WARNING "The OpenMP feature is not supported on macOS") + endif() +endif() + set(BUILD_opencv_ovis OFF) if("ovis" IN_LIST FEATURES) set(BUILD_opencv_ovis ON) @@ -68,16 +110,19 @@ if("tbb" IN_LIST FEATURES) set(WITH_TBB ON) endif() -set(WITH_VTK OFF) -if("vtk" IN_LIST FEATURES) - set(WITH_VTK ON) +if("dnn" IN_LIST FEATURES) + vcpkg_download_distfile(TINYDNN_ARCHIVE + URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" + FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" + SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b + ) endif() if("cuda" IN_LIST FEATURES) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/79c6cee80a2df9a196f20afd6b598a9810964c32.zip" - FILENAME "opencv-cache/nvidia_optical_flow/ca5acedee6cb45d0ec610a6732de5c15-79c6cee80a2df9a196f20afd6b598a9810964c32.zip" - SHA512 d80cdedec588dafaad4ebb8615349f842ecdc64d3ca9480fee7086d606e6f2362606a9a2ce273c5cf507be2840ec24bbcbe32c2962672c3bcfb72d31428ef73d + URLS "https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/edb50da3cf849840d680249aa6dbef248ebce2ca.zip" + FILENAME "opencv-cache/nvidia_optical_flow/a73cd48b18dcc0cc8933b30796074191-edb50da3cf849840d680249aa6dbef248ebce2ca.zip" + SHA512 12d655ac9fcfc6df0186daa62f7185dadd489f0eeea25567d78c2b47a9840dcce2bd03a3e9b3b42f125dbaf3150f52590ea7597dc1dc8acee852dc0aed56651e ) endif() @@ -97,8 +142,32 @@ if("contrib" IN_LIST FEATURES) OUT_SOURCE_PATH CONTRIB_SOURCE_PATH REPO opencv/opencv_contrib REF ${OPENCV_VERSION} - SHA512 8af13f0a5f350360316662c1ce5e58c21d906a58591acfbd575a8dacde19b6f3bbd694c3c199feb35c33549cf8c37e3fb4c494b586a00ad29fe3b4aeeb2d22ab + SHA512 5b48e2aedcf8c64fcfe80fad243c455c1bb9bfd10741c5ba03679ef26b28f61767fec632a9a9828a87a90542488354ebbbe8c65845bf2ae55b15a721c147a30a HEAD_REF master + PATCHES + 0007-fix-hdf5.patch + ) + set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") + + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.caffemodel" + FILENAME "opencv-cache/wechat_qrcode/238e2b2d6f3c18d6c3a30de0c31e23cf-detect.caffemodel" + SHA512 58d62faf8679d3f568a26a1d9f7c2e88060426a440315ca8bce7b3b5a8efa34be670afd0abfd0dd5d89f89a042a2408ea602f937080abc6910c2e497b7f5a4b8 + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.caffemodel" + FILENAME "opencv-cache/wechat_qrcode/cbfcd60361a73beb8c583eea7e8e6664-sr.caffemodel" + SHA512 917c6f6b84a898b8c8c85c79359e48a779c8a600de563dac2e1c5d013401e9ac9dbcd435013a4ed7a69fc936839fb189aaa3038c127d04ceb6fd3b8fd9dd67bd + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.prototxt" + FILENAME "opencv-cache/wechat_qrcode/6fb4976b32695f9f5c6305c19f12537d-detect.prototxt" + SHA512 2239d31a597049f358f09dbb4c0a7af0b384d9b67cfa3224f8c7e44329647cf19ee7929ac06199cca23bbbf431de0481b74ab51eace6aa20bb2e2fd19b536e49 + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.prototxt" + FILENAME "opencv-cache/wechat_qrcode/69db99927a70df953b471daaba03fbef-sr.prototxt" + SHA512 6b715ec45c3fd081e7e113e351edcef0f3d32a75f8b5a9ca2273cb5da9a1116a1b78cba45582a9acf67a7ab76dc4fcdf123f7b3a0d3de2f5c39b26ef450058b7 ) vcpkg_download_distfile(OCV_DOWNLOAD URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i" @@ -160,24 +229,15 @@ if("contrib" IN_LIST FEATURES) FILENAME "opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat" SHA512 c16e60a6c4bb4de3ab39b876ae3c3f320ea56f69c93e9303bd2dff8760841dcd71be4161fff8bc71e8fe4fe8747fa8465d49d6bd8f5ebcdaea161f4bc2da7c93 ) - set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") -endif() - -if("dnn" IN_LIST FEATURES) - vcpkg_download_distfile(TINYDNN_ARCHIVE - URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" - FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" - SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b - ) endif() if(WITH_IPP) if(VCPKG_TARGET_IS_OSX) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_mac_intel64_general_20180723.tgz" - FILENAME "opencv-cache/ippicv/fe6b2bb75ae0e3f19ad3ae1a31dfa4a2-ippicv_2019_mac_intel64_general_20180723.tgz" - SHA512 266fe3fecf8e95e1f51c09b65330a577743ef72b423b935d4d1fe8d87f1b4f258c282fe6a18fc805d489592f137ebed37c9f1d1b34026590d9f1ba107015132e + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_mac_intel64_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/1c3d675c2a2395d094d523024896e01b-ippicv_2020_mac_intel64_20191018_general.tgz" + SHA512 454dfaaa245e3a3b2f1ffb1aa8e27e280b03685009d66e147482b14e5796fdf2d332cac0f9b0822caedd5760fda4ee0ce2961889597456bbc18202f10bf727cd ) else() message(WARNING "This target architecture is not supported IPPICV") @@ -186,15 +246,15 @@ if(WITH_IPP) elseif(VCPKG_TARGET_IS_LINUX) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_lnx_intel64_general_20180723.tgz" - FILENAME "opencv-cache/ippicv/c0bd78adb4156bbf552c1dfe90599607-ippicv_2019_lnx_intel64_general_20180723.tgz" - SHA512 e4ec6b3b9fc03d7b3ae777c2a26f57913e83329fd2f7be26c259b07477ca2a641050b86979e0c96e25aa4c1f9f251b28727690358a77418e76dd910d0f4845c9 + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_lnx_intel64_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/7421de0095c7a39162ae13a6098782f9-ippicv_2020_lnx_intel64_20191018_general.tgz" + SHA512 de6d80695cd6deef359376476edc4ff85fdddcf94972b936e0017f8a48aaa5d18f55c4253ae37deb83bff2f71410f68408063c88b5f3bf4df3c416aa93ceca87 ) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_lnx_ia32_general_20180723.tgz" - FILENAME "opencv-cache/ippicv/4f38432c30bfd6423164b7a24bbc98a0-ippicv_2019_lnx_ia32_general_20180723.tgz" - SHA512 d96d3989928ff11a18e631bf5ecfdedf88fd350162a23fa2c8f7dbc3bf878bf442aff7fb2a07dc56671d7268cc20682055891be75b9834e9694d20173e92b6a3 + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_lnx_ia32_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/ad189a940fb60eb71f291321322fe3e8-ippicv_2020_lnx_ia32_20191018_general.tgz" + SHA512 5ca9dafc3a634e2a5f83f6a498611c990ef16d54358e9b44574b01694e9d64b118d46d6e2011506e40d37e5a9865f576f790e37ff96b7c8b503507633631a296 ) else() message(WARNING "This target architecture is not supported IPPICV") @@ -203,15 +263,15 @@ if(WITH_IPP) elseif(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_win_intel64_20180723_general.zip" - FILENAME "opencv-cache/ippicv/1d222685246896fe089f88b8858e4b2f-ippicv_2019_win_intel64_20180723_general.zip" - SHA512 b6c4f2696e2004b8f5471efd9bdc6c684b77830e0533d8880310c0b665b450d6f78e10744c937f5592ab900e187c475e46cb49e98701bb4bcbbc7da77723011d + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_intel64_20191018_general.zip" + FILENAME "opencv-cache/ippicv/879741a7946b814455eee6c6ffde2984-ippicv_2020_win_intel64_20191018_general.zip" + SHA512 50c4af4b7fe2161d652264230389dad2330e8c95b734d04fb7565bffdab855c06d43085e480da554c56b04f8538087d49503538d5943221ee2a772ee7be4c93c ) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_win_ia32_20180723_general.zip" - FILENAME "opencv-cache/ippicv/0157251a2eb9cd63a3ebc7eed0f3e59e-ippicv_2019_win_ia32_20180723_general.zip" - SHA512 c33fd4019c71b064b153e1b25e0307f9c7ada693af8ec910410edeab471c6f14df9b11bf9f5302ceb0fcd4282f5c0b6c92fb5df0e83eb50ed630c45820d1e184 + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_ia32_20191018_general.zip" + FILENAME "opencv-cache/ippicv/cd39bdf0c2e1cac9a61101dad7a2413e-ippicv_2020_win_ia32_20191018_general.zip" + SHA512 058d00775d9f16955c7a557d554b8c2976ab9dbad4ba3fdb9823c0f768809edbd835e4397f01dc090a9bc80d81de834375e7006614d2a898f42e8004de0e04bf ) else() message(WARNING "This target architecture is not supported IPPICV") @@ -234,30 +294,49 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(WITH_TBB OFF) endif() - if (WITH_VTK) - message(WARNING "VTK is currently unsupported in this build configuration, turning it off") - set(WITH_VTK OFF) - endif() - if (VCPKG_TARGET_IS_WINDOWS AND BUILD_opencv_ovis) message(WARNING "OVIS is currently unsupported in this build configuration, turning it off") set(BUILD_opencv_ovis OFF) endif() endif() -vcpkg_configure_cmake( - PREFER_NINJA - SOURCE_PATH ${SOURCE_PATH} +if("ffmpeg" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}") + set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}") + endif() +endif() + +if("qt" IN_LIST FEATURES) + list(APPEND ADDITIONAL_BUILD_FLAGS "-DCMAKE_AUTOMOC=ON") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS + ###### opencv cpu recognition is broken, always using host and not target: here we bypass that + -DOPENCV_SKIP_SYSTEM_PROCESSOR_DETECTION=TRUE + -DAARCH64=${TARGET_IS_AARCH64} + -DX86_64=${TARGET_IS_X86_64} + -DX86=${TARGET_IS_X86} + -DARM=${TARGET_IS_ARM} ###### ocv_options -DOpenCV_INSTALL_BINARIES_PREFIX= + -DOPENCV_BIN_INSTALL_PATH=bin + -DOPENCV_INCLUDE_INSTALL_PATH=include -DOPENCV_LIB_INSTALL_PATH=lib -DOPENCV_3P_LIB_INSTALL_PATH=lib -DOPENCV_CONFIG_INSTALL_PATH=share/opencv + -DINSTALL_TO_MANGLED_PATHS=OFF -DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG + -DOPENCV_FFMPEG_SKIP_BUILD_CHECK=TRUE -DCMAKE_DEBUG_POSTFIX=d - ###### Ungrouped Entries - -DBUILD_opencv_java=OFF + -DOPENCV_DLLVERSION= + -DOPENCV_DEBUG_POSTFIX=d + -DOPENCV_GENERATE_SETUPVARS=OFF + # Do not build docs/examples + -DBUILD_DOCS=OFF + -DBUILD_EXAMPLES=OFF -Dade_DIR=${ADE_DIR} ###### Disable build 3rd party libs -DBUILD_JASPER=OFF @@ -274,11 +353,10 @@ vcpkg_configure_cmake( -DBUILD_PROTOBUF=OFF ###### OpenCV Build components -DBUILD_opencv_apps=OFF + -DBUILD_opencv_java=OFF -DBUILD_opencv_js=OFF -DBUILD_ANDROID_PROJECT=OFF -DBUILD_ANDROID_EXAMPLES=OFF - -DBUILD_DOCS=OFF - -DBUILD_EXAMPLES=OFF -DBUILD_PACKAGE=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF @@ -287,15 +365,14 @@ vcpkg_configure_cmake( -DBUILD_JAVA=OFF -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} ###### PROTOBUF - -DPROTOBUF_UPDATE_FILES=ON - -DUPDATE_PROTO_FILES=ON + -DPROTOBUF_UPDATE_FILES=${BUILD_opencv_dnn} + -DUPDATE_PROTO_FILES=${BUILD_opencv_dnn} ###### PYLINT/FLAKE8 -DENABLE_PYLINT=OFF -DENABLE_FLAKE8=OFF # CMAKE -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON # ENABLE -DENABLE_CXX11=ON ###### OPENCV vars @@ -305,41 +382,45 @@ vcpkg_configure_cmake( ###### customized properties ## Options from vcpkg_check_features() ${FEATURE_OPTIONS} + -DCMAKE_DISABLE_FIND_PACKAGE_Halide=ON + -DHALIDE_ROOT_DIR=${CURRENT_INSTALLED_DIR} + -DWITH_GTK=OFF -DWITH_IPP=${WITH_IPP} + -DWITH_MATLAB=OFF -DWITH_MSMF=${WITH_MSMF} - -DWITH_PROTOBUF=ON + -DWITH_OPENMP=${WITH_OPENMP} + -DWITH_PROTOBUF=${BUILD_opencv_dnn} + -DWITH_OPENCLAMDBLAS=OFF -DWITH_TBB=${WITH_TBB} - -DWITH_VTK=${WITH_VTK} - ###### WITH PROPERTIES explicitly disabled, they have problems with libraries if already installed by user and that are "involuntarily" found during install - -DWITH_LAPACK=OFF + -DWITH_OPENJPEG=OFF ###### BUILD_options (mainly modules which require additional libraries) -DBUILD_opencv_ovis=${BUILD_opencv_ovis} + -DBUILD_opencv_dnn=${BUILD_opencv_dnn} ###### The following modules are disabled for UWP -DBUILD_opencv_quality=${BUILD_opencv_quality} + -DBUILD_opencv_gapi=${BUILD_opencv_gapi} + ###### The following module is disabled because it's broken #https://github.com/opencv/opencv_contrib/issues/2307 + -DBUILD_opencv_rgbd=OFF + ###### Additional build flags + ${ADDITIONAL_BUILD_FLAGS} ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/opencv" TARGET_PATH "share/opencv") +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv") vcpkg_copy_pdbs() -# OpenCV does not list TIFF as a dependency. -# We explicitly add it to the module file, -# in order to fix unresolved symbols linking problems -# for downstream projects using OpenCV as static library if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake OPENCV_MODULES) - string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" - "set(CMAKE_IMPORT_FILE_VERSION 1) -find_package(TIFF REQUIRED) -find_package(Protobuf REQUIRED) -if(Protobuf_FOUND) + file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES) + set(DEPS_STRING "include(CMakeFindDependencyMacro) +find_dependency(Protobuf CONFIG) +if(protobuf_FOUND) if(TARGET protobuf::libprotobuf) - add_library(libprotobuf INTERFACE IMPORTED) + add_library (libprotobuf INTERFACE IMPORTED) set_target_properties(libprotobuf PROPERTIES INTERFACE_LINK_LIBRARIES protobuf::libprotobuf ) else() - add_library(libprotobuf UNKNOWN IMPORTED) + add_library (libprotobuf UNKNOWN IMPORTED) set_target_properties(libprotobuf PROPERTIES IMPORTED_LOCATION \"${Protobuf_LIBRARY}\" INTERFACE_INCLUDE_DIRECTORIES \"${Protobuf_INCLUDE_DIR}\" @@ -347,33 +428,90 @@ if(Protobuf_FOUND) ) endif() endif() -find_package(HDF5 QUIET) -find_package(Freetype QUIET) -find_package(Ogre QUIET) -find_package(gflags QUIET) -find_package(Ceres QUIET) -find_package(ade QUIET) -find_package(VTK QUIET) -find_package(OpenMP QUIET) -find_package(GDCM QUIET)" OPENCV_MODULES "${OPENCV_MODULES}") - - if("openmp" IN_LIST FEATURES) +find_dependency(Threads)") + if("tiff" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(TIFF)") + endif() + if("cuda" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(CUDA)") + endif() + if(BUILD_opencv_quality) + string(APPEND DEPS_STRING " +# C language is required for try_compile tests in FindHDF5 +enable_language(C) +find_dependency(HDF5) +find_dependency(Tesseract)") + endif() + if(WITH_TBB) + string(APPEND DEPS_STRING "\nfind_dependency(TBB)") + endif() + if("vtk" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(VTK)") + endif() + if("sfm" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(gflags CONFIG)\nfind_dependency(Ceres CONFIG)") + endif() + if("eigen" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(Eigen3 CONFIG)") + endif() + if("lapack" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(LAPACK)") + endif() + if("openexr" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(OpenEXR CONFIG)") + endif() + if(WITH_OPENMP) + string(APPEND DEPS_STRING "\nfind_dependency(OpenMP)") + endif() + if(BUILD_opencv_ovis) + string(APPEND DEPS_STRING "\nfind_dependency(Ogre)\nfind_dependency(Freetype)") + endif() + if("quirc" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(quirc)") + endif() + if("qt" IN_LIST FEATURES) + string(APPEND DEPS_STRING " +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +find_dependency(Qt5 COMPONENTS OpenGL Concurrent Test)") + endif() + if("ade" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(ade)") + endif() + if("gdcm" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(GDCM)") + endif() + + string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1)\n${DEPS_STRING}" OPENCV_MODULES "${OPENCV_MODULES}") + + if(WITH_OPENMP) string(REPLACE "set_target_properties(opencv_core PROPERTIES INTERFACE_LINK_LIBRARIES \"" "set_target_properties(opencv_core PROPERTIES INTERFACE_LINK_LIBRARIES \"\$;" OPENCV_MODULES "${OPENCV_MODULES}") endif() - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}") + if(BUILD_opencv_ovis) + string(REPLACE "OgreGLSupportStatic" + "OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}") + endif() + + file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" "${OPENCV_MODULES}") + - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE ${CURRENT_PACKAGES_DIR}/setup_vars_opencv4.cmd) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/setup_vars_opencv4.cmd) -file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE") + +if(VCPKG_TARGET_IS_ANDROID) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.android") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/README.android") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv4 RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/opencv4/vcpkg.json b/ports/opencv4/vcpkg.json new file mode 100644 index 00000000000000..dce331bf1de4e9 --- /dev/null +++ b/ports/opencv4/vcpkg.json @@ -0,0 +1,251 @@ +{ + "name": "opencv4", + "version": "4.5.3", + "port-version": 1, + "description": "computer vision library", + "homepage": "https://github.com/opencv/opencv", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "default-features": [ + "dnn", + "jpeg", + "png", + "quirc", + "tiff", + "webp" + ], + "features": { + "ade": { + "description": "graph api", + "dependencies": [ + "ade" + ] + }, + "contrib": { + "description": "opencv_contrib module", + "dependencies": [ + { + "name": "hdf5", + "platform": "!uwp & !(windows & (arm | arm64))" + }, + { + "name": "tesseract", + "platform": "!uwp & !(windows & (arm | arm64))" + } + ] + }, + "cuda": { + "description": "CUDA support for opencv", + "dependencies": [ + "cuda", + { + "name": "opencv4", + "default-features": false, + "features": [ + "contrib" + ] + } + ] + }, + "cudnn": { + "description": "cuDNN support for opencv", + "dependencies": [ + "cudnn", + { + "name": "opencv4", + "default-features": false, + "features": [ + "cuda" + ] + } + ] + }, + "dnn": { + "description": "Enable dnn module", + "dependencies": [ + "protobuf" + ] + }, + "eigen": { + "description": "Eigen support for opencv", + "dependencies": [ + "eigen3" + ] + }, + "ffmpeg": { + "description": "ffmpeg support for opencv", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avformat", + "swresample", + "swscale" + ] + } + ] + }, + "gdcm": { + "description": "GDCM support for opencv", + "dependencies": [ + "gdcm" + ] + }, + "halide": { + "description": "Halide support for opencv", + "dependencies": [ + "halide", + { + "name": "opencv4", + "default-features": false + }, + { + "name": "opencv4", + "features": [ + "dnn" + ] + } + ] + }, + "ipp": { + "description": "Enable Intel Integrated Performance Primitives" + }, + "jasper": { + "description": "JPEG 2000 support for opencv", + "dependencies": [ + "jasper" + ] + }, + "jpeg": { + "description": "JPEG support for opencv", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "lapack": { + "description": "LAPACK support for opencv", + "dependencies": [ + "blas", + "lapack" + ] + }, + "nonfree": { + "description": "allow nonfree and unredistributable libraries" + }, + "openexr": { + "description": "OpenEXR support for opencv", + "dependencies": [ + "openexr" + ] + }, + "opengl": { + "description": "opengl support for opencv", + "dependencies": [ + "opengl" + ] + }, + "openmp": { + "description": "Enable openmp support for opencv" + }, + "ovis": { + "description": "opencv_ovis module", + "dependencies": [ + "ogre", + { + "name": "opencv4", + "default-features": false, + "features": [ + "contrib" + ] + } + ] + }, + "png": { + "description": "PNG support for opencv", + "dependencies": [ + "libpng" + ] + }, + "qt": { + "description": "Qt GUI support for opencv", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] + }, + "quirc": { + "description": "Enable QR code module", + "dependencies": [ + "quirc" + ] + }, + "sfm": { + "description": "opencv_sfm module", + "dependencies": [ + "ceres", + "gflags", + "glog", + { + "name": "opencv4", + "default-features": false, + "features": [ + "contrib" + ] + }, + { + "name": "opencv4", + "default-features": false, + "features": [ + "eigen" + ] + } + ] + }, + "tbb": { + "description": "Enable Intel Threading Building Blocks", + "dependencies": [ + "tbb" + ] + }, + "tiff": { + "description": "TIFF support for opencv", + "dependencies": [ + "tiff" + ] + }, + "vtk": { + "description": "vtk support for opencv", + "dependencies": [ + { + "name": "opencv4", + "features": [ + "contrib" + ] + }, + "vtk" + ] + }, + "webp": { + "description": "WebP support for opencv", + "dependencies": [ + "libwebp" + ] + }, + "world": { + "description": "Compile to a single package support for opencv" + } + } +} diff --git a/ports/opendnp3/opendnp3-config.cmake.in b/ports/opendnp3/opendnp3-config.cmake.in new file mode 100644 index 00000000000000..79b2ef89e526c6 --- /dev/null +++ b/ports/opendnp3/opendnp3-config.cmake.in @@ -0,0 +1,22 @@ +# Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set(@PROJECT_NAME@_VERSION @PROJECT_VERSION@) + +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) +@FIND_DEPENDS@ + +include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake) \ No newline at end of file diff --git a/ports/opendnp3/portfile.cmake b/ports/opendnp3/portfile.cmake new file mode 100644 index 00000000000000..c62261e2e5c87e --- /dev/null +++ b/ports/opendnp3/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATICLIBS) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dnp3/opendnp3 + REF 3.1.0 + SHA512 838a816a8d65d3c99dc489e0e3e4d25f0acdbe0f6f3cc21a6fdbaea11f84f7b1f54958097763d0eae8e1860ba209da4e5377cd3ea6ab08a48a25429860063179 + HEAD_REF master +) + +file(COPY ${CURRENT_PORT_DIR}/opendnp3-config.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DSTATICLIBS=${STATICLIBS} -DDNP3_TLS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/opendnp3) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/opendnp3/vcpkg.json b/ports/opendnp3/vcpkg.json new file mode 100644 index 00000000000000..d853f8c866f314 --- /dev/null +++ b/ports/opendnp3/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "opendnp3", + "version-string": "3.1.0", + "description": "DNP3 (IEEE-1815) protocol stack. Modern C++ with bindings for .NET and Java.", + "homepage": "https://github.com/dnp3/opendnp3/", + "dependencies": [ + "asio", + "openssl" + ] +} diff --git a/ports/openexr/0001-remove_find_package_macro.patch b/ports/openexr/0001-remove_find_package_macro.patch new file mode 100644 index 00000000000000..967e89a83c7e3f --- /dev/null +++ b/ports/openexr/0001-remove_find_package_macro.patch @@ -0,0 +1,87 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 111a603..109394f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,22 +25,12 @@ endif() + project(OpenEXRMetaProject) + + +-# An "official" way to make this a super-project +-# basically overrides the find_package to not find anything +-# for stuff we're including locally +-set(as_subproject IlmBase OpenEXR) +-macro(find_package) +- if(NOT "${ARGV0}" IN_LIST as_subproject) +- _find_package(${ARGV}) +- endif() +-endmacro() +- + + # If you want to use ctest to configure, build and + # upload the results, cmake has builtin support for + # submitting to CDash, or any server who speaks the + # same protocol +-# ++# + # These settings will need to be set for your environment, + # and then a script such as the example in + # +@@ -51,7 +41,7 @@ endmacro() + # cmake -S cmake/SampleCTestScript.cmake + # + # [or whatever you name the file you edit] +-# ++# + #set(CTEST_PROJECT_NAME "OpenEXR") + #set(CTEST_NIGHTLY_START_TIME "01:01:01 UTC") + #set(CTEST_DROP_METHOD "http") # there are others... +diff --git a/OpenEXR/CMakeLists.txt b/OpenEXR/CMakeLists.txt +index 390b27f..87b2d01 100644 +--- a/OpenEXR/CMakeLists.txt ++++ b/OpenEXR/CMakeLists.txt +@@ -35,7 +35,6 @@ include(config/OpenEXRSetup.cmake) + + # Everyone depends on IlmBase, and we currently rely on + # the version matched with our release +-find_package(IlmBase ${OPENEXR_VERSION} EXACT REQUIRED CONFIG) + + # generates config headers, package config files + add_subdirectory(config) +diff --git a/OpenEXR/config/OpenEXRSetup.cmake b/OpenEXR/config/OpenEXRSetup.cmake +index 5116726..34c7c87 100644 +--- a/OpenEXR/config/OpenEXRSetup.cmake ++++ b/OpenEXR/config/OpenEXRSetup.cmake +@@ -33,7 +33,7 @@ endif() + # Whether to build & install the various command line utility programs + option(OPENEXR_BUILD_UTILS "Enables building of utility programs" ON) + +-# This is a variable here for use in controlling where include files are ++# This is a variable here for use in controlling where include files are + # installed. Care must be taken when changing this, as many things + # probably assume this is OpenEXR + set(OPENEXR_OUTPUT_SUBDIR OpenEXR CACHE STRING "Destination sub-folder of the include path for install") +diff --git a/OpenEXR_Viewers/CMakeLists.txt b/OpenEXR_Viewers/CMakeLists.txt +index 5efa353..5246fa7 100644 +--- a/OpenEXR_Viewers/CMakeLists.txt ++++ b/OpenEXR_Viewers/CMakeLists.txt +@@ -24,8 +24,6 @@ project(OpenEXR_Viewers VERSION ${OPENEXR_VIEWERS_VERSION}) + ####################################### + include(config/OpenEXRViewersSetup.cmake) + +-find_package(IlmBase ${OPENEXR_VIEWERS_VERSION} EXACT REQUIRED CONFIG) +-find_package(OpenEXR ${OPENEXR_VIEWERS_VERSION} EXACT REQUIRED CONFIG) + + # This is for newer cmake versions who know about vendor versions + set(OpenGL_GL_PREFERENCE GLVND) +diff --git a/PyIlmBase/CMakeLists.txt b/PyIlmBase/CMakeLists.txt +index 291b96e..7d5074f 100644 +--- a/PyIlmBase/CMakeLists.txt ++++ b/PyIlmBase/CMakeLists.txt +@@ -27,7 +27,6 @@ project(PyIlmBase VERSION ${PYILMBASE_VERSION} LANGUAGES C CXX) + include(config/PyIlmBaseSetup.cmake) + + # we have a strong dependence on IlmBase being an exact match +-find_package(IlmBase ${PYILMBASE_VERSION} EXACT REQUIRED CONFIG) + + # we are building a python extension, so of course we depend on + # python as well. Except we don't know which version... diff --git a/ports/openexr/0002-fixup_cmake_exports_path.patch b/ports/openexr/0002-fixup_cmake_exports_path.patch new file mode 100644 index 00000000000000..e39bd3792ff8a7 --- /dev/null +++ b/ports/openexr/0002-fixup_cmake_exports_path.patch @@ -0,0 +1,78 @@ +diff --git a/IlmBase/config/CMakeLists.txt b/IlmBase/config/CMakeLists.txt +index d9c5ae4..45ee6cc 100644 +--- a/IlmBase/config/CMakeLists.txt ++++ b/IlmBase/config/CMakeLists.txt +@@ -105,7 +105,7 @@ endif() + include(CMakePackageConfigHelpers) + configure_package_config_file(IlmBaseConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake +- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ INSTALL_DESTINATION share/ilmbase + ) + write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + VERSION ${ILMBASE_VERSION} +@@ -113,10 +113,10 @@ write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/ilmbase + ) + install(EXPORT ${PROJECT_NAME} +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/ilmbase + FILE ${PROJECT_NAME}Targets.cmake + NAMESPACE ${PROJECT_NAME}:: + EXPORT_LINK_INTERFACE_LIBRARIES +diff --git a/OpenEXR/config/CMakeLists.txt b/OpenEXR/config/CMakeLists.txt +index b52ad0d..3dc6d22 100644 +--- a/OpenEXR/config/CMakeLists.txt ++++ b/OpenEXR/config/CMakeLists.txt +@@ -19,7 +19,7 @@ int main() + sysconf(_SC_NPROCESSORS_ONLN); + } + " OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN +-) ++) + + check_cxx_source_compiles( + " +@@ -100,7 +100,7 @@ endif() + include(CMakePackageConfigHelpers) + configure_package_config_file(OpenEXRConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake +- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ INSTALL_DESTINATION share/openexr + ) + write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + VERSION ${OPENEXR_VERSION} +@@ -108,10 +108,10 @@ write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/openexr + ) + install(EXPORT ${PROJECT_NAME} +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/openexr + FILE ${PROJECT_NAME}Targets.cmake + NAMESPACE ${PROJECT_NAME}:: + EXPORT_LINK_INTERFACE_LIBRARIES +diff --git a/PyIlmBase/config/CMakeLists.txt b/PyIlmBase/config/CMakeLists.txt +index 1872c89..bc61f43 100644 +--- a/PyIlmBase/config/CMakeLists.txt ++++ b/PyIlmBase/config/CMakeLists.txt +@@ -39,10 +39,10 @@ write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + COMPATIBILITY SameMajorVersion + ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/pyilmbase + ) + install(EXPORT ${PROJECT_NAME} +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/pyilmbase + FILE ${PROJECT_NAME}Config.cmake + NAMESPACE ${PROJECT_NAME}:: + EXPORT_LINK_INTERFACE_LIBRARIES diff --git a/ports/openexr/0003-remove_symlinks.patch b/ports/openexr/0003-remove_symlinks.patch new file mode 100644 index 00000000000000..89b9c53f3c96fc --- /dev/null +++ b/ports/openexr/0003-remove_symlinks.patch @@ -0,0 +1,40 @@ +diff --git a/IlmBase/config/LibraryDefine.cmake b/IlmBase/config/LibraryDefine.cmake +index 44254a7..1f5d2a6 100644 +--- a/IlmBase/config/LibraryDefine.cmake ++++ b/IlmBase/config/LibraryDefine.cmake +@@ -101,15 +101,6 @@ function(ILMBASE_DEFINE_LIBRARY libname) + if(BUILD_SHARED_LIBS AND (NOT "${ILMBASE_LIB_SUFFIX}" STREQUAL "")) + set(verlibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${ILMBASE_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(baselibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${CMAKE_SHARED_LIBRARY_SUFFIX}) +- if(WIN32) +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \"\$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_BINDIR}\" ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") +- install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_BINDIR} ${baselibname} -> ${verlibname}\")") +- else() +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \"\$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_LIBDIR}\" ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") +- install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_LIBDIR} ${baselibname} -> ${verlibname}\")") +- endif() +- set(verlibname) +- set(baselibname) + endif() + + if(ILMBASE_BUILD_BOTH_STATIC_SHARED) +diff --git a/OpenEXR/config/LibraryDefine.cmake b/OpenEXR/config/LibraryDefine.cmake +index a9561dc..42853af 100644 +--- a/OpenEXR/config/LibraryDefine.cmake ++++ b/OpenEXR/config/LibraryDefine.cmake +@@ -95,15 +95,6 @@ function(OPENEXR_DEFINE_LIBRARY libname) + if(BUILD_SHARED_LIBS AND (NOT "${OPENEXR_LIB_SUFFIX}" STREQUAL "")) + set(verlibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${OPENEXR_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(baselibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${CMAKE_SHARED_LIBRARY_SUFFIX}) +- if(WIN32) +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \"\$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_BINDIR}\" ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") +- install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_BINDIR} ${baselibname} -> ${verlibname}\")") +- else() +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \"\$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_LIBDIR}\" ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") +- install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_DIR} ${baselibname} -> ${verlibname}\")") +- endif() +- set(verlibname) +- set(baselibname) + endif() + + if(OPENEXR_BUILD_BOTH_STATIC_SHARED) diff --git a/ports/openexr/0004-Fix-pkg-config-lib-suffix-for-cmake-debug-builds.patch b/ports/openexr/0004-Fix-pkg-config-lib-suffix-for-cmake-debug-builds.patch new file mode 100644 index 00000000000000..83ab73a217c776 --- /dev/null +++ b/ports/openexr/0004-Fix-pkg-config-lib-suffix-for-cmake-debug-builds.patch @@ -0,0 +1,54 @@ +From 6cd6b32af052563e4cd5114a1d279736d1d8653a Mon Sep 17 00:00:00 2001 +From: "Matthias C. M. Troffaes" +Date: Tue, 1 Jun 2021 08:06:45 +0100 +Subject: [PATCH] Use CMAKE__POSTFIX for .pc file lib suffix. + +Signed-off-by: Matthias C. M. Troffaes +--- + IlmBase/config/CMakeLists.txt | 3 ++- + OpenEXR/config/CMakeLists.txt | 3 ++- + PyIlmBase/config/CMakeLists.txt | 3 ++- + 3 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/IlmBase/config/CMakeLists.txt b/IlmBase/config/CMakeLists.txt +index d9c5ae449..dfebb43bd 100644 +--- a/IlmBase/config/CMakeLists.txt ++++ b/IlmBase/config/CMakeLists.txt +@@ -78,7 +78,8 @@ if(ILMBASE_INSTALL_PKG_CONFIG) + set(exec_prefix "\${prefix}") + set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") + set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +- set(LIB_SUFFIX_DASH ${ILMBASE_LIB_SUFFIX}) ++ string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) ++ set(LIB_SUFFIX_DASH ${ILMBASE_LIB_SUFFIX}${CMAKE_${uppercase_CMAKE_BUILD_TYPE}_POSTFIX}) + if(TARGET Threads::Threads) + # hrm, can't use properties as they end up as generator expressions + # which don't seem to evaluate +diff --git a/OpenEXR/config/CMakeLists.txt b/OpenEXR/config/CMakeLists.txt +index 8386e3a0e..039190cd9 100644 +--- a/OpenEXR/config/CMakeLists.txt ++++ b/OpenEXR/config/CMakeLists.txt +@@ -77,7 +77,8 @@ if(OPENEXR_INSTALL_PKG_CONFIG) + set(exec_prefix "\${prefix}") + set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") + set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +- set(LIB_SUFFIX_DASH ${OPENEXR_LIB_SUFFIX}) ++ string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) ++ set(LIB_SUFFIX_DASH ${OPENEXR_LIB_SUFFIX}${CMAKE_${uppercase_CMAKE_BUILD_TYPE}_POSTFIX}) + if(TARGET Threads::Threads) + # hrm, can't use properties as they end up as generator expressions + # which don't seem to evaluate +diff --git a/PyIlmBase/config/CMakeLists.txt b/PyIlmBase/config/CMakeLists.txt +index 1872c89e7..a4139bcfd 100644 +--- a/PyIlmBase/config/CMakeLists.txt ++++ b/PyIlmBase/config/CMakeLists.txt +@@ -18,7 +18,8 @@ if(PYILMBASE_INSTALL_PKG_CONFIG) + set(exec_prefix ${CMAKE_INSTALL_BINDIR}) + set(libdir ${CMAKE_INSTALL_LIBDIR}) + set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) +- set(LIB_SUFFIX_DASH ${OPENEXR_LIB_SUFFIX}) ++ string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) ++ set(LIB_SUFFIX_DASH ${OPENEXR_LIB_SUFFIX}${CMAKE_${uppercase_CMAKE_BUILD_TYPE}_POSTFIX}) + string(REPLACE ".in" "" pcout ${pcinfile}) + configure_file(${pcinfile} ${CMAKE_CURRENT_BINARY_DIR}/${pcout} @ONLY) + install( diff --git a/ports/openexr/CONTROL b/ports/openexr/CONTROL deleted file mode 100644 index 5fc8b52d62e417..00000000000000 --- a/ports/openexr/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: openexr -Version: 2.3.0-4 -Homepage: https://www.openexr.com/ -Description: OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications -Build-Depends: zlib diff --git a/ports/openexr/FindOpenEXR.cmake b/ports/openexr/FindOpenEXR.cmake deleted file mode 100644 index 4b5b280a078c1d..00000000000000 --- a/ports/openexr/FindOpenEXR.cmake +++ /dev/null @@ -1,94 +0,0 @@ -include(FindPackageHandleStandardArgs) - -find_path(OpenEXR_INCLUDE_DIRS OpenEXR/OpenEXRConfig.h) -find_path(OPENEXR_INCLUDE_PATHS NAMES ImfRgbaFile.h PATH_SUFFIXES OpenEXR) - -file(STRINGS "${OpenEXR_INCLUDE_DIRS}/OpenEXR/OpenEXRConfig.h" OPENEXR_CONFIG_H) - -string(REGEX REPLACE "^.*define OPENEXR_VERSION_MAJOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MAJOR "${OPENEXR_CONFIG_H}") -string(REGEX REPLACE "^.*define OPENEXR_VERSION_MINOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MINOR "${OPENEXR_CONFIG_H}") -set(OpenEXR_LIB_SUFFIX "${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}") - -include(SelectLibraryConfigurations) - -if(NOT OpenEXR_BASE_LIBRARY) - find_library(OpenEXR_BASE_LIBRARY_RELEASE NAMES IlmImf-${OpenEXR_LIB_SUFFIX}) - find_library(OpenEXR_BASE_LIBRARY_DEBUG NAMES IlmImf-${OpenEXR_LIB_SUFFIX}_d) - select_library_configurations(OpenEXR_BASE) -endif() - -if(NOT OpenEXR_UTIL_LIBRARY) - find_library(OpenEXR_UTIL_LIBRARY_RELEASE NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}) - find_library(OpenEXR_UTIL_LIBRARY_DEBUG NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}_d) - select_library_configurations(OpenEXR_UTIL) -endif() - -if(NOT OpenEXR_HALF_LIBRARY) - find_library(OpenEXR_HALF_LIBRARY_RELEASE NAMES Half-${OpenEXR_LIB_SUFFIX}) - find_library(OpenEXR_HALF_LIBRARY_DEBUG NAMES Half-${OpenEXR_LIB_SUFFIX}_d) - select_library_configurations(OpenEXR_HALF) -endif() - -if(NOT OpenEXR_IEX_LIBRARY) - find_library(OpenEXR_IEX_LIBRARY_RELEASE NAMES Iex-${OpenEXR_LIB_SUFFIX}) - find_library(OpenEXR_IEX_LIBRARY_DEBUG NAMES Iex-${OpenEXR_LIB_SUFFIX}_d) - select_library_configurations(OpenEXR_IEX) -endif() - -if(NOT OpenEXR_MATH_LIBRARY) - find_library(OpenEXR_MATH_LIBRARY_RELEASE NAMES Imath-${OpenEXR_LIB_SUFFIX}) - find_library(OpenEXR_MATH_LIBRARY_DEBUG NAMES Imath-${OpenEXR_LIB_SUFFIX}_d) - select_library_configurations(OpenEXR_MATH) -endif() - -if(NOT OpenEXR_THREAD_LIBRARY) - find_library(OpenEXR_THREAD_LIBRARY_RELEASE NAMES IlmThread-${OpenEXR_LIB_SUFFIX}) - find_library(OpenEXR_THREAD_LIBRARY_DEBUG NAMES IlmThread-${OpenEXR_LIB_SUFFIX}_d) - select_library_configurations(OpenEXR_THREAD) -endif() - -if(NOT OpenEXR_IEXMATH_LIBRARY) - find_library(OpenEXR_IEXMATH_LIBRARY_RELEASE NAMES IexMath-${OpenEXR_LIB_SUFFIX}) - find_library(OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES IexMath-${OpenEXR_LIB_SUFFIX}d) - select_library_configurations(OpenEXR_IEXMATH) -endif() - -set(OPENEXR_HALF_LIBRARY "${OpenEXR_HALF_LIBRARY}") -set(OPENEXR_Half_LIBRARY "${OpenEXR_HALF_LIBRARY}") -set(OPENEXR_IEX_LIBRARY "${OpenEXR_IEX_LIBRARY}") -set(OPENEXR_Iex_LIBRARY "${OpenEXR_IEX_LIBRARY}") -set(OPENEXR_IMATH_LIBRARY "${OpenEXR_MATH_LIBRARY}") -set(OPENEXR_ILMIMF_LIBRARY "${OpenEXR_BASE_LIBRARY}") -set(OPENEXR_IlmImf_LIBRARY "${OpenEXR_BASE_LIBRARY}") -set(OPENEXR_ILMIMFUTIL_LIBRARY "${OpenEXR_UTIL_LIBRARY}") -set(OPENEXR_ILMTHREAD_LIBRARY "${OpenEXR_THREAD_LIBRARY}") - -set(OpenEXR_LIBRARY "${OpenEXR_BASE_LIBRARY}") - -set(OpenEXR_LIBRARIES - ${OpenEXR_LIBRARY} - ${OpenEXR_MATH_LIBRARY} - ${OpenEXR_IEXMATH_LIBRARY} - ${OpenEXR_UTIL_LIBRARY} - ${OpenEXR_HALF_LIBRARY} - ${OpenEXR_IEX_LIBRARY} - ${OpenEXR_THREAD_LIBRARY} -) - -set(OPENEXR_LIBRARIES - ${OPENEXR_HALF_LIBRARY} - ${OPENEXR_IEX_LIBRARY} - ${OPENEXR_IMATH_LIBRARY} - ${OPENEXR_ILMIMF_LIBRARY} - ${OPENEXR_ILMTHREAD_LIBRARY} -) - -set(OpenEXR_INCLUDE_DIR ${OpenEXR_INCLUDE_DIRS}) -set(OPENEXR_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIRS}) -set(OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_PATHS}) - -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR REQUIRED_VARS OpenEXR_LIBRARIES OpenEXR_INCLUDE_DIRS) - -if(OpenEXR_FOUND) - set(OPENEXR_FOUND 1) -endif() diff --git a/ports/openexr/fix_clang_not_setting_modern_cplusplus.patch b/ports/openexr/fix_clang_not_setting_modern_cplusplus.patch deleted file mode 100644 index 05e86b50c6e4ef..00000000000000 --- a/ports/openexr/fix_clang_not_setting_modern_cplusplus.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/IlmBase/CMakeLists.txt b/IlmBase/CMakeLists.txt -index e13c768..95942c8 100644 ---- a/IlmBase/CMakeLists.txt -+++ b/IlmBase/CMakeLists.txt -@@ -110,7 +110,7 @@ ENDIF () - - IF (OPENEXR_FORCE_CXX03) - FILE ( APPEND ${ILMBASE_TMP_CONFIG} "#define ILMBASE_FORCE_CXX03 1\n" ) --ELSEIF (NOT WIN32) -+ELSEIF (NOT WIN32 AND NOT APPLE) - # really only care about c++11 right now for the threading bits, but this can be changed to 14 - # when needed... - # Note that the __cplusplus check is not valid under MSVC diff --git a/ports/openexr/fix_install_ilmimf.patch b/ports/openexr/fix_install_ilmimf.patch deleted file mode 100644 index db65be73684da1..00000000000000 --- a/ports/openexr/fix_install_ilmimf.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/OpenEXR/IlmImf/CMakeLists.txt b/OpenEXR/IlmImf/CMakeLists.txt -index e1a8740..d31cf68 100644 ---- a/OpenEXR/IlmImf/CMakeLists.txt -+++ b/OpenEXR/IlmImf/CMakeLists.txt -@@ -2,14 +2,6 @@ - - SET(CMAKE_INCLUDE_CURRENT_DIR 1) - --IF (WIN32) -- SET(RUNTIME_DIR ${OPENEXR_PACKAGE_PREFIX}/bin) -- SET(WORKING_DIR ${RUNTIME_DIR}) --ELSE () -- SET(RUNTIME_DIR ${OPENEXR_PACKAGE_PREFIX}/lib) -- SET(WORKING_DIR .) --ENDIF () -- - SET(BUILD_B44EXPLOGTABLE OFF) - IF (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h") - SET(BUILD_B44EXPLOGTABLE ON) diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index 0cdd30b2e5f15d..aac8fea5528019 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -1,67 +1,61 @@ -include(vcpkg_common_functions) - if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "UWP build not supported") endif() -set(OPENEXR_VERSION 2.3.0) -set(OPENEXR_HASH 268ae64b40d21d662f405fba97c307dad1456b7d996a447aadafd41b640ca736d4851d9544b4741a94e7b7c335fe6e9d3b16180e710671abfc0c8b2740b147b2) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO openexr/openexr - REF v${OPENEXR_VERSION} - SHA512 ${OPENEXR_HASH} + REF ed64d5467dee9763f28baf300f7699e6288b9f5f + SHA512 549d37ed1ef4d1ff7e732d583f7213ee15c7f92625aea9fd65345e4c5b854902c02e5940d0692b1af5ae0a02abf46aaefea2662db2389d1b2fb4264a373baac2 HEAD_REF master PATCHES - fix_clang_not_setting_modern_cplusplus.patch - fix_install_ilmimf.patch + 0001-remove_find_package_macro.patch + 0002-fixup_cmake_exports_path.patch + 0003-remove_symlinks.patch + 0004-Fix-pkg-config-lib-suffix-for-cmake-debug-builds.patch # https://github.com/AcademySoftwareFoundation/openexr/pull/1032 ) vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DOPENEXR_BUILD_PYTHON_LIBS:BOOL=FALSE - OPTIONS_DEBUG - -DILMBASE_PACKAGE_PREFIX=${CURRENT_INSTALLED_DIR}/debug - OPTIONS_RELEASE - -DILMBASE_PACKAGE_PREFIX=${CURRENT_INSTALLED_DIR}) + -DCMAKE_DEBUG_POSTFIX=_d + -DPYILMBASE_ENABLE=FALSE +) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/ilmbase TARGET_PATH share/ilmbase) +vcpkg_fixup_cmake_targets() +vcpkg_fixup_pkgconfig() + +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrenvmap${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrheader${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmakepreview${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmaketiled${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultipart${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultiview${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrstdattr${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exr2aces${VCPKG_HOST_EXECUTABLE_SUFFIX}) -# NOTE: Only use ".exe" extension on Windows executables. -# Is there a cleaner way to do this? -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrenvmap${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrheader${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmakepreview${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmaketiled${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultipart${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultiview${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrstdattr${EXECUTABLE_SUFFIX}) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openexr/) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrenvmap${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrenvmap${EXECUTABLE_SUFFIX}) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrheader${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrheader${EXECUTABLE_SUFFIX}) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmakepreview${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmakepreview${EXECUTABLE_SUFFIX}) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmaketiled${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmaketiled${EXECUTABLE_SUFFIX}) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmultipart${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmultipart${EXECUTABLE_SUFFIX}) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmultiview${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmultiview${EXECUTABLE_SUFFIX}) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrstdattr${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrstdattr${EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrenvmap${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrenvmap${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrheader${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrheader${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmakepreview${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmakepreview${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmaketiled${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmaketiled${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmultipart${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmultipart${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmultiview${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmultiview${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrstdattr${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrstdattr${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exr2aces${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exr2aces${VCPKG_HOST_EXECUTABLE_SUFFIX}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openexr) vcpkg_copy_pdbs() -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if (VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOpenEXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openexr/vcpkg-cmake-wrapper.cmake b/ports/openexr/vcpkg-cmake-wrapper.cmake index a977a420e867d7..479cd302782d11 100644 --- a/ports/openexr/vcpkg-cmake-wrapper.cmake +++ b/ports/openexr/vcpkg-cmake-wrapper.cmake @@ -1,8 +1,38 @@ -set(OPENEXR_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +_find_package(${ARGS}) -if(NOT OpenEXR_LIBRARIES OR OPENEXR_LIBRARIES) - _find_package(${ARGS}) +if(TARGET OpenEXR::IlmImf AND NOT OPENEXR_LIBRARIES AND NOT OPENEXR_FOUND) + set(OPENEXR_FOUND TRUE CACHE BOOL "") + set(OpenEXR_FOUND TRUE CACHE BOOL "") + set(OPENEXR_VERSION "2.5.0" CACHE STRING "") + set(OpenEXR_VERSION "2.5.0" CACHE STRING "") + get_target_property(OpenEXR_INCLUDE_DIRS OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(OPENEXR_INCLUDE_PATHS OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(OPENEXR_INCLUDE_DIRS OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(OPENEXR_INCLUDE_DIR OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES) + set(OpenEXR_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIRS} CACHE STRING "") + set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATHS} CACHE STRING "") + set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIRS} CACHE STRING "") + set(OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR} CACHE STRING "") + set(OPENEXR_ILMIMF_LIBRARY "OpenEXR::IlmImf" CACHE STRING "") + set(OPENEXR_ILMIMFUTIL_LIBRARY "OpenEXR::IlmImfUtil" CACHE STRING "") + set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMFUTIL_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} CACHE STRING "") endif() -set(CMAKE_MODULE_PATH ${OPENEXR_PREV_MODULE_PATH}) +if(TARGET IlmBase::Half AND NOT ILMBASE_LIBRARIES AND NOT ILMBASE_FOUND) + set(ILMBASE_FOUND TRUE CACHE BOOL "") + set(IlmBASE_FOUND TRUE CACHE BOOL "") + set(ILMBASE_VERSION "2.5.0" CACHE STRING "") + set(IlmBASE_VERSION "2.5.0" CACHE STRING "") + get_target_property(ILMBASE_INCLUDE_DIR IlmBase::Half INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(ILMBASE_INCLUDE_DIRS IlmBase::Half INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(ILMBASE_INCLUDE_PATHS IlmBase::Half INTERFACE_INCLUDE_DIRECTORIES) + set(ILMBASE_INCLUDE_DIR ${ILMBASE_INCLUDE_DIR} CACHE STRING "") + set(ILMBASE_INCLUDE_DIRS ${ILMBASE_INCLUDE_DIRS} CACHE STRING "") + set(ILMBASE_INCLUDE_PATHS ${ILMBASE_INCLUDE_PATHS} CACHE STRING "") + set(OPENEXR_HALF_LIBRARY "IlmBase::Half" CACHE STRING "") + set(OPENEXR_IEX_LIBRARY "IlmBase::Iex" CACHE STRING "") + set(OPENEXR_IEXMATH_LIBRARY "IlmBase::IexMath" CACHE STRING "") + set(OPENEXR_ILMTHREAD_LIBRARY "IlmBase::IlmThread" CACHE STRING "") + set(OPENEXR_IMATH_LIBRARY "IlmBase::Imath" CACHE STRING "") + set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${OPENEXR_IEXMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} CACHE STRING "") +endif() diff --git a/ports/openexr/vcpkg.json b/ports/openexr/vcpkg.json new file mode 100644 index 00000000000000..b293e7047da35c --- /dev/null +++ b/ports/openexr/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "openexr", + "version-string": "2.5.0", + "port-version": 3, + "description": "OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications", + "homepage": "https://www.openexr.com/", + "supports": "!uwp", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/opengl-registry/CONTROL b/ports/opengl-registry/CONTROL deleted file mode 100644 index 1a3635c35000bb..00000000000000 --- a/ports/opengl-registry/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: opengl-registry -Version: 2018-06-30-1 -Build-Depends: egl-registry -Description: the API and Extension registries for the OpenGL family APIs diff --git a/ports/opengl-registry/portfile.cmake b/ports/opengl-registry/portfile.cmake index 7b38b2c0721857..13f9386d759016 100644 --- a/ports/opengl-registry/portfile.cmake +++ b/ports/opengl-registry/portfile.cmake @@ -1,24 +1,27 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/OpenGL-Registry - REF e18e52a14e902a9ee29c5bf87478ac2ca21bb06b - SHA512 3b883115e138178984a751ee314b0589a7a20db3bc7cff96fa0b886be1779c24031ce65847386aa2d4f42823b1597edccc5a9afc0aef42fea8611a44d2ca5df6 + REF 4594c03239fb76580bc5d5a13acb2a8f563f0158 + SHA512 c005a4eb7e5c17002647e7762ae1a7ecba0d0780a62d66f1afd3b7f45c1ca49bd5a069ab0fabb94de3ec971604586457932941fa8eb924cf5ac3a959d8f5f146 HEAD_REF master ) file(COPY ${SOURCE_PATH}/api/GL DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLES DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLES2 DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLES3 DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLSC DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLSC2 DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(COPY ${SOURCE_PATH}/xml/gl.xml ${SOURCE_PATH}/xml/glx.xml ${SOURCE_PATH}/xml/wgl.xml - DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl-registry + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} ) # Using the Makefile because it is the smallest file with a complete copy of the license text file( INSTALL ${SOURCE_PATH}/xml/Makefile - DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl-registry + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright ) diff --git a/ports/opengl-registry/vcpkg.json b/ports/opengl-registry/vcpkg.json new file mode 100644 index 00000000000000..2ba48cf6abcadd --- /dev/null +++ b/ports/opengl-registry/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "opengl-registry", + "version-string": "2020-03-25", + "port-version": 1, + "description": "the API and Extension registries for the OpenGL family APIs", + "homepage": "https://github.com/KhronosGroup/OpenGL-Registry", + "dependencies": [ + "egl-registry" + ] +} diff --git a/ports/opengl/CONTROL b/ports/opengl/CONTROL deleted file mode 100644 index 365b908cfbd1e5..00000000000000 --- a/ports/opengl/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: opengl -Version: 0.0-5 -Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake index 80df4ae74623db..72625fa15feb30 100644 --- a/ports/opengl/portfile.cmake +++ b/ports/opengl/portfile.cmake @@ -1,17 +1,14 @@ -include(vcpkg_common_functions) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") - set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") - set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") + file(TO_NATIVE_PATH "$ENV{WindowsSdkDir}Lib/${WINDOWS_SDK}/um/${TRIPLET_SYSTEM_ARCH}/OpenGL32.Lib" LIBGLFILEPATH) + file(TO_NATIVE_PATH "$ENV{WindowsSdkDir}Lib/${WINDOWS_SDK}/um/${TRIPLET_SYSTEM_ARCH}/GlU32.Lib" LIBGLUFILEPATH) + file(TO_NATIVE_PATH "$ENV{WindowsSdkDir}Include/${WINDOWS_SDK}/um" HEADERSPATH) elseif(WINDOWS_SDK MATCHES "8.") - set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") - set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") + file(TO_NATIVE_PATH "$ENV{WindowsSdkDir}Lib/winv6.3/um/${TRIPLET_SYSTEM_ARCH}/OpenGL32.Lib" LIBGLFILEPATH) + file(TO_NATIVE_PATH "$ENV{WindowsSdkDir}Lib/winv6.3/um/${TRIPLET_SYSTEM_ARCH}/GlU32.Lib" LIBGLUFILEPATH) + file(TO_NATIVE_PATH "$ENV{WindowsSdkDir}Include/um" HEADERSPATH) else() message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") endif() @@ -24,22 +21,41 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLUFILEPATH}") endif() + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/include/gl" INCLUDEGLPATH) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/opengl" SHAREOPENGLPATH) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/lib" RELEASELIBPATH) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug/lib" DEBUGLIBPATH) + file(TO_NATIVE_PATH "${HEADERSPATH}/gl/GL.h" GLGLHPATH) + file(TO_NATIVE_PATH "${HEADERSPATH}/gl/GLU.h" GLGLUHPATH) + file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/include/gl - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug/lib - ${CURRENT_PACKAGES_DIR}/share/opengl + "${INCLUDEGLPATH}" + "${SHAREOPENGLPATH}" ) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY + "${RELEASELIBPATH}" + ) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY + "${DEBUGLIBPATH}" + ) + endif() file(COPY - "${HEADERSPATH}\\gl\\GL.h" - "${HEADERSPATH}\\gl\\GLU.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl + "${GLGLHPATH}" + "${GLGLUHPATH}" + DESTINATION "${INCLUDEGLPATH}" ) - file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY ${LIBGLFILEPATH} DESTINATION "${RELEASELIBPATH}") + file(COPY ${LIBGLUFILEPATH} DESTINATION "${RELEASELIBPATH}") + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY ${LIBGLFILEPATH} DESTINATION "${DEBUGLIBPATH}") + file(COPY ${LIBGLUFILEPATH} DESTINATION "${DEBUGLIBPATH}") + endif() if (WINDOWS_SDK MATCHES "10.") file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") diff --git a/ports/opengl/usage b/ports/opengl/usage new file mode 100644 index 00000000000000..33e33f6c786908 --- /dev/null +++ b/ports/opengl/usage @@ -0,0 +1,24 @@ +The package opengl is compatible with built-in CMake targets via CMake v3.7 and prior syntax + + find_package(OpenGL REQUIRED) + target_link_libraries(main PRIVATE ${OPENGL_LIBRARIES}) + target_include_directories(main PRIVATE ${OPENGL_INCLUDE_DIR}) + +and the CMake v3.8 and beyond imported target syntax + + find_package(OpenGL REQUIRED) + target_link_libraries(main PRIVATE OpenGL::GL) + +introduction of various components + + find_package(OpenGL REQUIRED COMPONENTS GL # v3.8 + GLU # v3.8 + GLX # v3.10 + EGL # v3.10 + OpenGL) # v3.10 + +The OpenGL SDK is highly platform dependent and is usually an OS component. It's not realistic to build from source for every platform. + + WINDOWS: is part of the Windows SDK which this package installs. + LINUX: the SDK may be installed from your distro's repo or from 3rd parties manually. There are too many to count. + APPLE: consult your distribution vendor on the state of OpenGL support: https://support.apple.com/en-us/HT202823 diff --git a/ports/opengl/vcpkg.json b/ports/opengl/vcpkg.json new file mode 100644 index 00000000000000..da77cb58b28bf2 --- /dev/null +++ b/ports/opengl/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "opengl", + "version-string": "0.0", + "port-version": 9, + "description": "Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics." +} diff --git a/ports/openh264/0001-respect-default-library-option.patch b/ports/openh264/0001-respect-default-library-option.patch new file mode 100644 index 00000000000000..15e3c715451d5a --- /dev/null +++ b/ports/openh264/0001-respect-default-library-option.patch @@ -0,0 +1,57 @@ +From 328b15a962caa928373b55d85f9911f45442886e Mon Sep 17 00:00:00 2001 +From: Xavier Claessens +Date: Mon, 19 Oct 2020 17:03:25 -0400 +Subject: [PATCH] meson: Respect default_library option + +When using library() instead of shared_library() and static_library, +meson will build shared, static, or both depending on the +value of static_library option. + +As far as I know extract_all_objects() was uses as workaround for Meson +bugs fixed a while ago when using not installed static libraries. +--- + meson.build | 19 +++---------------- + 1 file changed, 3 insertions(+), 16 deletions(-) + +diff --git a/meson.build b/meson.build +index 283413375b..65641508de 100644 +--- a/meson.build ++++ b/meson.build +@@ -184,26 +184,13 @@ api_header_deps = [] + subdir ('codec') + subdir ('test') + +-all_objects = [ +- libcommon.extract_all_objects(), +- libprocessing.extract_all_objects(), +- libencoder.extract_all_objects(), +- libdecoder.extract_all_objects() +-] +- +-libopenh264_shared = shared_library('openh264', +- objects: all_objects, ++libopenh264 = library('openh264', ++ link_whole: [libcommon, libprocessing, libencoder, libdecoder], + install: true, + soversion: major_version, +- version: meson.project_version(), + vs_module_defs: 'openh264.def', + dependencies: deps) + +-libopenh264_static = static_library('openh264', +- objects: all_objects, +- install: true, +- dependencies: deps) +- + pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir')) + + foreach t : ['', '-static'] +@@ -235,7 +222,7 @@ foreach t : ['', '-static'] + endforeach + + openh264_dep = declare_dependency( +- link_with: libopenh264_shared, ++ link_with: libopenh264, + include_directories: include_directories('include'), + dependencies: deps + api_header_deps) + diff --git a/ports/openh264/portfile.cmake b/ports/openh264/portfile.cmake new file mode 100644 index 00000000000000..903bb593996a14 --- /dev/null +++ b/ports/openh264/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cisco/openh264 + REF f15f940425eebf24ce66984db2445733cf500b7b + SHA512 361003296e9cef2956aeff76ae4df7a949a585710facd84a92c1b4164c5a4522d6615fcc485ebc2e50be8a13feb942b870efdd28837307467081cb1eba1f17d2 + PATCHES + 0001-respect-default-library-option.patch # https://github.com/cisco/openh264/pull/3351 +) + +if((VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")) + vcpkg_find_acquire_program(NASM) + get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) + vcpkg_add_to_path(${NASM_EXE_PATH}) +elseif(VCPKG_TARGET_IS_WINDOWS) + vcpkg_find_acquire_program(GASPREPROCESSOR) + foreach(GAS_PATH ${GASPREPROCESSOR}) + get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) + vcpkg_add_to_path(${GAS_ITEM_PATH}) + endforeach(GAS_PATH) +endif() + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -Dtests=disabled +) + +vcpkg_install_meson() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/ports/openh264/vcpkg.json b/ports/openh264/vcpkg.json new file mode 100644 index 00000000000000..f05ee097824339 --- /dev/null +++ b/ports/openh264/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "openh264", + "version-date": "2021-03-16", + "port-version": 2, + "description": "OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC.", + "homepage": "https://www.openh264.org/", + "supports": "!uwp", + "dependencies": [ + "tool-meson" + ] +} diff --git a/ports/openigtlink/CONTROL b/ports/openigtlink/CONTROL deleted file mode 100644 index 488c4061b02371..00000000000000 --- a/ports/openigtlink/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: openigtlink -Version: 3.0 -Description: OpenIGTLink is an open-source network communication interface specifically designed for image-guided interventions. diff --git a/ports/openigtlink/portfile.cmake b/ports/openigtlink/portfile.cmake index a5a240fae30b17..e5e6dd466c35dc 100644 --- a/ports/openigtlink/portfile.cmake +++ b/ports/openigtlink/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO openigtlink/OpenIGTLink @@ -13,14 +11,12 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBUILD_TESTING=OFF + -DOpenIGTLink_INSTALL_PACKAGE_DIR=share/${PORT} ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/igtl/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_copy_pdbs() diff --git a/ports/openigtlink/vcpkg.json b/ports/openigtlink/vcpkg.json new file mode 100644 index 00000000000000..a106056b515650 --- /dev/null +++ b/ports/openigtlink/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "openigtlink", + "version-string": "3.0", + "port-version": 2, + "description": "OpenIGTLink is an open-source network communication interface specifically designed for image-guided interventions.", + "homepage": "https://github.com/openigtlink/OpenIGTLink" +} diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL deleted file mode 100644 index 94ae8654e521d8..00000000000000 --- a/ports/openimageio/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: openimageio -Version: 2019-08-08-1 -Homepage: https://github.com/OpenImageIO/oiio -Description: A library for reading and writing images, and a bunch of related classes, utilities, and application -Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace - -Feature: libraw -Build-Depends: libraw -Description: Enable RAW image files support diff --git a/ports/openimageio/disable-test.patch b/ports/openimageio/disable-test.patch new file mode 100644 index 00000000000000..fc46c40b47176a --- /dev/null +++ b/ports/openimageio/disable-test.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54fe7d9..65f47fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -281,11 +281,12 @@ install (EXPORT OIIO_EXPORTED_TARGETS + FILE ${OIIO_TARGETS_EXPORT_NAME} + NAMESPACE ${PROJECT_NAME}::) + +- ++if (0) + if (NOT ${PROJECT_NAME}_IS_SUBPROJECT) + oiio_setup_test_data() + oiio_add_all_tests() + endif () ++endif () + + if (NOT ${PROJECT_NAME}_IS_SUBPROJECT) + include (packaging) diff --git a/ports/openimageio/fix-config-cmake.patch b/ports/openimageio/fix-config-cmake.patch new file mode 100644 index 00000000000000..e943d1c1eb19bb --- /dev/null +++ b/ports/openimageio/fix-config-cmake.patch @@ -0,0 +1,12 @@ +diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in +index c578a1b..298362a 100644 +--- a/src/cmake/Config.cmake.in ++++ b/src/cmake/Config.cmake.in +@@ -14,6 +14,6 @@ set (@PROJECT_NAME@_PLUGIN_SEARCH_PATH "@PLUGIN_SEARCH_PATH_NATIVE@") + #...logic to determine installedPrefix from the own location... + #set (@PROJECT_NAME@_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@") + +-include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/OpenImageIOTargets.cmake") + + check_required_components ("@PROJECT_NAME@") diff --git a/ports/openimageio/fix-dependencies.patch b/ports/openimageio/fix-dependencies.patch new file mode 100644 index 00000000000000..81b95ff9c6f49f --- /dev/null +++ b/ports/openimageio/fix-dependencies.patch @@ -0,0 +1,75 @@ +diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in +index 740da06..1a326f7 100644 +--- a/src/cmake/Config.cmake.in ++++ b/src/cmake/Config.cmake.in +@@ -11,6 +11,9 @@ elseif (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 2.4 AND @FOUND_OPENEXR_WITH_CONF + HINTS @IlmBase_DIR@ @OpenEXR_DIR@) + find_dependency(OpenEXR @OpenEXR_VERSION@ + HINTS @OpenEXR_DIR@) ++ find_dependency(libpng CONFIG) ++ find_dependency(libheif CONFIG) ++ find_dependency(Libsquish) + find_dependency(ZLIB @ZLIB_VERSION@) # Because OpenEXR doesn't do it + find_dependency(Threads) # Because OpenEXR doesn't do it + endif () +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index 21e18b5..badee4b 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -151,7 +151,7 @@ find_python() + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) ++checked_find_package (png PREFER_CONFIG) + + checked_find_package (BZip2) # Used by ffmpeg and freetype + if (NOT BZIP2_FOUND) +@@ -185,7 +185,8 @@ checked_find_package (GIF + RECOMMEND_MIN_REASON "for stability and thread safety") + + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 ++checked_find_package (libheif VERSION_MIN 1.3 ++ PREFER_CONFIG + RECOMMEND_MIN 1.7 + RECOMMEND_MIN_REASON "for AVIF support") + if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt +index fed8001..15e87ae 100644 +--- a/src/heif.imageio/CMakeLists.txt ++++ b/src/heif.imageio/CMakeLists.txt +@@ -2,9 +2,9 @@ + # SPDX-License-Identifier: BSD-3-Clause + # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md + +-if (Libheif_FOUND) ++if (libheif_FOUND) + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- LINK_LIBRARIES Libheif::Libheif ++ LINK_LIBRARIES heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git a/src/ico.imageio/CMakeLists.txt b/src/ico.imageio/CMakeLists.txt +index 9ba76ac..13db4ac 100644 +--- a/src/ico.imageio/CMakeLists.txt ++++ b/src/ico.imageio/CMakeLists.txt +@@ -2,9 +2,15 @@ + # SPDX-License-Identifier: BSD-3-Clause + # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md + +-if (TARGET PNG::PNG) ++if (libpng_FOUND) ++ if (TARGET png_static) ++ set(PNG_TARGET png_static) ++ elseif (TARGET png) ++ set(PNG_TARGET png) ++ endif() ++ + add_oiio_plugin (icoinput.cpp icooutput.cpp +- LINK_LIBRARIES PNG::PNG ZLIB::ZLIB) ++ LINK_LIBRARIES ${PNG_TARGET} ZLIB::ZLIB) + else () + message (WARNING "libpng not found, so ICO support will not work") + set (format_plugin_definitions ${format_plugin_definitions} DISABLE_ICO=1 PARENT_SCOPE) diff --git a/ports/openimageio/fix_libraw.patch b/ports/openimageio/fix_libraw.patch deleted file mode 100644 index 707530247bf08b..00000000000000 --- a/ports/openimageio/fix_libraw.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 2692bb0..f2709d0 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -380,7 +380,7 @@ if (USE_LIBRAW) - message (STATUS "Looking for LibRaw with ${LIBRAW_PATH}") - endif () - find_package (LibRaw) -- if (LibRaw_r_LIBRARIES AND LibRaw_INCLUDE_DIR) -+ if (LibRaw_LIBRARIES AND LibRaw_INCLUDE_DIR) - set (LIBRAW_FOUND TRUE) - include_directories (${LibRaw_INCLUDE_DIR}) - if (NOT LibRaw_FIND_QUIETLY) -@@ -394,7 +394,7 @@ if (USE_LIBRAW) - if (LINKSTATIC) - find_package (Jasper) - find_library (LCMS2_LIBRARIES NAMES lcms2) -- set (LibRaw_r_LIBRARIES ${LibRaw_r_LIBRARIES} ${JASPER_LIBRARIES} ${LCMS2_LIBRARIES}) -+ set (LibRaw_LIBRARIES ${LibRaw_LIBRARIES} ${JASPER_LIBRARIES} ${LCMS2_LIBRARIES}) - endif () - else () - message (STATUS "Not using LibRaw") -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index e3608a2..f503035 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -1,7 +1,7 @@ - if (USE_LIBRAW AND LIBRAW_FOUND) - add_oiio_plugin (rawinput.cpp - INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -+ LINK_LIBRARIES ${LibRaw_LIBRARIES} - DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") diff --git a/ports/openimageio/fix_static_build.patch b/ports/openimageio/fix_static_build.patch new file mode 100644 index 00000000000000..a5ebb467a5d521 --- /dev/null +++ b/ports/openimageio/fix_static_build.patch @@ -0,0 +1,13 @@ +diff --git a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake +index 1468be3..ed4167a 100644 +--- a/src/cmake/compiler.cmake ++++ b/src/cmake/compiler.cmake +@@ -482,7 +482,7 @@ set (EXTRA_DSO_LINK_ARGS "" CACHE STRING "Extra command line definitions when bu + # + option (BUILD_SHARED_LIBS "Build shared libraries (set to OFF to build static libs)" ON) + if (NOT BUILD_SHARED_LIBS) +- add_definitions (-D${PROJ_NAME}_STATIC_DEFINE=1) ++ add_definitions (-DOIIO_STATIC_DEFINE=1) + endif () + + diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 7284d58b830ee0..124c7183b84bc5 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -1,79 +1,91 @@ -include(vcpkg_common_functions) +if("field3d" IN_LIST FEATURES) + vcpkg_fail_port_install( + ON_TARGET WINDOWS UWP + MESSAGE "The field3d feature is not supported on Windows" + ) +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenImageIO/oiio - REF ad1ab61a56c63d770e4beb335efe8b1f1a9e36cd - SHA512 48ee7862583e7adb86b56b20634c34aebf83ef0a3a14ad96182494ce6a84cb027334840a6c4c335e9342110c3a36532e3eeae22a3ed7363cd91b27cb7ca58154 + REF 9f74cf4d9813bfdcad5bca08b4ff75a25d056cb0 # 2.3.7.2 + SHA512 cebc388e842e983f010c5f3bf57bed3fe1ae9d2eac79019472f8431b194d6a8b156b27cc5688bd0998aa2d01959d47bcdc7e637417f755433ffe32c491cdc376 HEAD_REF master PATCHES - fix_libraw.patch - use-webp.patch - remove_wrong_dependency.patch + fix-config-cmake.patch + fix_static_build.patch + disable-test.patch + fix-dependencies.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/ext") + +file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindLibRaw.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindOpenCV.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindFFmpeg.cmake") + file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl") -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BUILDSTATIC ON) - set(LINKSTATIC ON) -else() - set(BUILDSTATIC OFF) - set(LINKSTATIC OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LINKSTATIC) -# Features -set(USE_LIBRAW OFF) -if("libraw" IN_LIST FEATURES) - set(USE_LIBRAW ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + libraw USE_LIBRAW + opencolorio USE_OPENCOLORIO + ffmpeg USE_FFMPEG + field3d USE_FIELD3D + freetype USE_FREETYPE + gif USE_GIF + opencv USE_OPENCV + openjpeg USE_OPENJPEG + webp USE_WEBP + pybind11 USE_PYTHON + tools OIIO_BUILD_TOOLS +) -vcpkg_configure_cmake( +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS - -DOIIO_BUILD_TOOLS=OFF + ${FEATURE_OPTIONS} -DOIIO_BUILD_TESTS=OFF - -DHIDE_SYMBOLS=ON - -DUSE_DICOM=OFF - -DUSE_FFMPEG=OFF - -DUSE_FIELD3D=OFF - -DUSE_FREETYPE=OFF - -DUSE_GIF=OFF - -DUSE_LIBRAW=${USE_LIBRAW} + -DUSE_DCMTK=OFF -DUSE_NUKE=OFF - -DUSE_OCIO=OFF - -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=OFF - -DUSE_OPENSSL=OFF - -DUSE_PTEX=OFF - -DUSE_PYTHON=OFF -DUSE_QT=OFF - -DUSE_WEBP=OFF - -DBUILDSTATIC=${BUILDSTATIC} + -DUSE_PTEX=OFF -DLINKSTATIC=${LINKSTATIC} - -DBUILD_MISSING_PYBIND11=OFF + -DBUILD_MISSING_FMT=OFF + -DBUILD_MISSING_ROBINMAP=OFF -DBUILD_MISSING_DEPS=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DSTOP_ON_WARNING=OFF -DVERBOSE=ON - OPTIONS_DEBUG - -DOPENEXR_CUSTOM_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(PACKAGE_NAME OpenImageIO CONFIG_PATH lib/cmake/OpenImageIO) + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES iconvert idiff igrep iinfo maketx oiiotool iv + AUTO_CLEAN + ) +endif() + # Clean -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc" + "${CURRENT_PACKAGES_DIR}/debug/doc" + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share") -file(COPY ${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY "${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/OpenImageIO") +file(COPY "${SOURCE_PATH}/src/cmake/modules/FindLibsquish.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/OpenImageIO") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/openimageio) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/openimageio/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/openimageio/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/openimageio/remove_wrong_dependency.patch b/ports/openimageio/remove_wrong_dependency.patch deleted file mode 100644 index 5338c6563c9dbe..00000000000000 --- a/ports/openimageio/remove_wrong_dependency.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt -index 5449675..cdd5235 100644 ---- a/src/libOpenImageIO/CMakeLists.txt -+++ b/src/libOpenImageIO/CMakeLists.txt -@@ -171,10 +171,6 @@ elseif(MINGW) - target_link_libraries (OpenImageIO psapi ws2_32) - endif () - --if (VISIBILITY_MAP_FILE) -- add_dependencies (OpenImageIO "${VISIBILITY_MAP_FILE}") --endif () -- - if (USE_EXTERNAL_PUGIXML) - target_link_libraries (OpenImageIO ${PUGIXML_LIBRARIES}) - endif () diff --git a/ports/openimageio/use-webp.patch b/ports/openimageio/use-webp.patch deleted file mode 100644 index ab03b1703721c0..00000000000000 --- a/ports/openimageio/use-webp.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7f43455..393af70 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -96,6 +96,7 @@ option (USE_GIF "Use GIF if found" ON) - option (USE_PTEX "Use PTex if found" ON) - option (USE_WEBP "Use WebP if found" ON) - option (USE_LIBRAW "Use LibRaw if found" ON) -+option (USE_WEBP "Use WebP if found" ON) - set (LIBRAW_PATH "" CACHE STRING "Custom LibRaw path") - option (OIIO_THREAD_ALLOW_DCLP "OIIO threads may use DCLP for speed" ON) - option (USE_NUKE "Build Nuke plugins, if Nuke is found" ON) -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index f2709d0..3a95da6 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -411,6 +411,7 @@ if (USE_WEBP) - if (NOT WEBP_FIND_QUIETLY) - message (STATUS "WEBP_HOME=${WEBP_HOME}") - endif () -+ if(USE_WEBP) - find_path (WEBP_INCLUDE_DIR webp/encode.h - "${PROJECT_SOURCE_DIR}/src/include" - "${WEBP_HOME}") -@@ -427,6 +428,9 @@ if (USE_WEBP) - set (WEBP_FOUND FALSE) - message (STATUS "WebP library not found") - endif() -+ else() -+ set (WEBP_FOUND FALSE) -+ endif() - else () - message (STATUS "Not using WebP") - endif () diff --git a/ports/openimageio/vcpkg-cmake-wrapper.cmake b/ports/openimageio/vcpkg-cmake-wrapper.cmake index 82dc991f066967..5976305769ad2c 100644 --- a/ports/openimageio/vcpkg-cmake-wrapper.cmake +++ b/ports/openimageio/vcpkg-cmake-wrapper.cmake @@ -1,8 +1,6 @@ set(OPENIMAGEIO_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../OpenImageIO") -if(NOT OPENIMAGEIO_LIBRARIES) - _find_package(${ARGS}) -endif() +_find_package(${ARGS}) set(CMAKE_MODULE_PATH ${OPENIMAGEIO_PREV_MODULE_PATH}) diff --git a/ports/openimageio/vcpkg.json b/ports/openimageio/vcpkg.json new file mode 100644 index 00000000000000..35ac6101109e12 --- /dev/null +++ b/ports/openimageio/vcpkg.json @@ -0,0 +1,113 @@ +{ + "name": "openimageio", + "version": "2.3.7.2", + "port-version": 2, + "description": "A library for reading and writing images, and a bunch of related classes, utilities, and application.", + "homepage": "https://github.com/OpenImageIO/oiio", + "dependencies": [ + "boost-algorithm", + "boost-asio", + "boost-config", + "boost-filesystem", + "boost-foreach", + "boost-random", + "boost-regex", + "boost-smart-ptr", + "boost-stacktrace", + "boost-static-assert", + "boost-system", + "boost-thread", + "boost-type-traits", + "fmt", + "libheif", + "libjpeg-turbo", + "libpng", + "libsquish", + "openexr", + "robin-map", + "tiff", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "ffmpeg": { + "description": "Enable ffmpeg support for openimageio", + "dependencies": [ + { + "name": "ffmpeg", + "features": [ + "avresample" + ] + } + ] + }, + "field3d": { + "description": "Enable field3D support for openimageio", + "dependencies": [ + "field3d" + ] + }, + "freetype": { + "description": "Enable freetype support for openimageio", + "dependencies": [ + "freetype" + ] + }, + "gif": { + "description": "Enable giflib support for openimageio", + "dependencies": [ + "giflib" + ] + }, + "libraw": { + "description": "Enable RAW image files support", + "dependencies": [ + "libraw" + ] + }, + "opencolorio": { + "description": "Enable opencolorio support for openimageio", + "dependencies": [ + "opencolorio" + ] + }, + "opencv": { + "description": "Enable opencv support for openimageio", + "dependencies": [ + "opencv" + ] + }, + "openjpeg": { + "description": "Enable openjpeg support for openimageio", + "dependencies": [ + "openjpeg" + ] + }, + "pybind11": { + "description": "Enable Python bindings support for openimageio", + "dependencies": [ + "pybind11" + ] + }, + "tools": { + "description": "Build openimageio tools", + "dependencies": [ + "opengl", + "qt5-base" + ] + }, + "webp": { + "description": "Enable libwebp support for openimageio", + "dependencies": [ + "libwebp" + ] + } + } +} diff --git a/ports/openjpeg/CONTROL b/ports/openjpeg/CONTROL deleted file mode 100644 index 0fd7d64a6a0ca2..00000000000000 --- a/ports/openjpeg/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: openjpeg -Version: 2.3.1-1 -Homepage: https://github.com/uclouvain/openjpeg -Description: JPEG 2000 image library diff --git a/ports/openjpeg/dll.location.patch b/ports/openjpeg/dll.location.patch new file mode 100644 index 00000000000000..bdc77a5427c31d --- /dev/null +++ b/ports/openjpeg/dll.location.patch @@ -0,0 +1,32 @@ +diff --git a/src/lib/openjp3d/CMakeLists.txt b/src/lib/openjp3d/CMakeLists.txt +index b0469af1f..75048ef13 100644 +--- a/src/lib/openjp3d/CMakeLists.txt ++++ b/src/lib/openjp3d/CMakeLists.txt +@@ -34,8 +34,9 @@ endif() + # Install library + install(TARGETS ${OPENJP3D_LIBRARY_NAME} + EXPORT OpenJP3DTargets +- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} +- COMPONENT Libraries ++ RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications ++ LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries ++ ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries + ) + + # Install includes files +diff --git a/src/lib/openmj2/CMakeLists.txt b/src/lib/openmj2/CMakeLists.txt +index 25294b20e..e3acfe8e7 100644 +--- a/src/lib/openmj2/CMakeLists.txt ++++ b/src/lib/openmj2/CMakeLists.txt +@@ -53,8 +53,9 @@ endif() + # Install library + install(TARGETS ${OPENMJ2_LIBRARY_NAME} + EXPORT OpenMJ2Targets +- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} +- COMPONENT Libraries ++ RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications ++ LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries ++ ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries + ) + + # Install includes files diff --git a/ports/openjpeg/fix-lrintf-to-opj_lrintf.patch b/ports/openjpeg/fix-lrintf-to-opj_lrintf.patch new file mode 100644 index 00000000000000..1d79d6332e2fc4 --- /dev/null +++ b/ports/openjpeg/fix-lrintf-to-opj_lrintf.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/openmj2/opj_includes.h b/src/lib/openmj2/opj_includes.h +index 340e8a9..11bb0e4 100644 +--- a/src/lib/openmj2/opj_includes.h ++++ b/src/lib/openmj2/opj_includes.h +@@ -93,7 +93,7 @@ Most compilers implement their own version of this keyword ... + + /* MSVC and Borland C do not have lrintf */ + #if defined(_MSC_VER) || defined(__BORLANDC__) +-static INLINE long lrintf(float f) ++static INLINE long opj_lrintf(float f) + { + #ifdef _M_X64 + return (long)((f > 0.0f) ? (f + 0.5f) : (f - 0.5f)); diff --git a/ports/openjpeg/portfile.cmake b/ports/openjpeg/portfile.cmake index 2296734ad1c872..348b2594fc7ac1 100644 --- a/ports/openjpeg/portfile.cmake +++ b/ports/openjpeg/portfile.cmake @@ -1,27 +1,75 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uclouvain/openjpeg REF v2.3.1 SHA512 339fbc899bddf2393d214df71ed5d6070a3a76b933b1e75576c8a0ae9dfcc4adec40bdc544f599e4b8d0bc173e4e9e7352408497b5b3c9356985605830c26c03 HEAD_REF master + PATCHES + dll.location.patch + fix-lrintf-to-opj_lrintf.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND OPTIONS "-DBUILD_SHARED_LIBS=OFF" + "-DBUILD_STATIC_LIBS=ON") +else() + list(APPEND OPTIONS "-DBUILD_SHARED_LIBS=ON" + "-DBUILD_STATIC_LIBS=OFF") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "jpwl" BUILD_JPWL + "mj2" BUILD_MJ2 + "jpip" BUILD_JPIP + "jp3d" BUILD_JP3D + ) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DBUILD_CODEC:BOOL=OFF + -DBUILD_DOC:BOOL=OFF -DOPENJPEG_INSTALL_PACKAGE_DIR=share/openjpeg -DOPENJPEG_INSTALL_INCLUDE_DIR=include + -DEXECUTABLE_OUTPUT_PATH=tools/${PORT} + -DBUILD_PKGCONFIG_FILES=ON + ${FEATURE_OPTIONS} + ${OPTIONS} ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +if(VCPKG_TARGET_IS_WINDOWS AND (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL MinGW)) + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libopenjp2.pc" "-lm" "") + endif() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libopenjp2.pc" "-lm" "") +else() + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libopenjp2.pc" "-lm" "-lm -pthread") + endif() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libopenjp2.pc" "-lm" "-lm -pthread") +endif() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets() - +set(TOOL_NAMES) +if("jpwl" IN_LIST FEATURES) + list(APPEND TOOL_NAMES opj_dec_server opj_jpwl_compress opj_jpwl_decompress) +endif() +if("mj2" IN_LIST FEATURES) + list(APPEND TOOL_NAMES opj_compress opj_decompress opj_dump opj_mj2_compress opj_mj2_decompress opj_mj2_extract opj_mj2_wrap) +endif() +if("jpip" IN_LIST FEATURES) + list(APPEND TOOL_NAMES opj_jpip_addxml opj_jpip_test opj_jpip_transcode) +endif() +if("jp3d" IN_LIST FEATURES) + list(APPEND TOOL_NAMES opj_jp3d_compress opj_jp3d_decompress) +endif() +if(TOOL_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif() file(READ ${CURRENT_PACKAGES_DIR}/include/openjpeg.h OPENJPEG_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") string(REPLACE "defined(OPJ_STATIC)" "1" OPENJPEG_H "${OPENJPEG_H}") @@ -32,7 +80,6 @@ string(REPLACE "defined(DLL_EXPORT)" "0" OPENJPEG_H "${OPENJPEG_H}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/openjpeg.h "${OPENJPEG_H}") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openjpeg) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/openjpeg/LICENSE ${CURRENT_PACKAGES_DIR}/share/openjpeg/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/openjpeg/vcpkg.json b/ports/openjpeg/vcpkg.json new file mode 100644 index 00000000000000..f910c2cc4d62ad --- /dev/null +++ b/ports/openjpeg/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "openjpeg", + "version-semver": "2.3.1", + "port-version": 4, + "description": "OpenJPEG is an open-source JPEG 2000 codec written in C language. It has been developed in order to promote the use of JPEG 2000, a still-image compression standard from the Joint Photographic Experts Group (JPEG). Since April 2015, it is officially recognized by ISO/IEC and ITU-T as a JPEG 2000 Reference Software.", + "homepage": "https://github.com/uclouvain/openjpeg", + "features": { + "jp3d": { + "description": "Build optional component jp3d" + }, + "jpip": { + "description": "Build optional component jpip" + }, + "jpwl": { + "description": "Build optional component jpwl" + }, + "mj2": { + "description": "Build optional component mj2" + } + } +} diff --git a/ports/openmama/CONTROL b/ports/openmama/CONTROL deleted file mode 100644 index fbfb815c3504bc..00000000000000 --- a/ports/openmama/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: openmama -Version: 6.2.3-1 -Build-Depends: libevent, apr, qpid-proton -Homepage: https://github.com/OpenMAMA/OpenMAMA -Description: OpenMAMA is a high performance vendor neutral lightweight wrapper that provides a common API interface to different middleware and messaging solutions across a variety of platforms and languages. diff --git a/ports/openmama/portfile.cmake b/ports/openmama/portfile.cmake index 62f76cf0b34109..dfd63074aef4b9 100644 --- a/ports/openmama/portfile.cmake +++ b/ports/openmama/portfile.cmake @@ -1,84 +1,54 @@ -include(vcpkg_common_functions) - vcpkg_find_acquire_program(FLEX) -vcpkg_find_acquire_program(SCONS) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO OpenMAMA/OpenMAMA - REF OpenMAMA-6.2.3-release - SHA512 2d641a34f4301f8aa0a33cc6c1172e2d3215792955a56f13858d758cedfea1c2ec3ae466112f06f9be7a67d80569f12238eca98008e6623558183b08dcd954c0 + REPO finos/OpenMAMA + REF c4925ee103add1a51c1d27be45b46d97af347f36 # https://github.com/finos/OpenMAMA/releases/tag/OpenMAMA-6.3.1-release + SHA512 e2773d082dd28e073fe81223fc113b1a5db7cd0d95e150e9f3f02c8c9483b9219b5d10682a125dd792c3a7877e15b90fd908084a4c89af4ec8d8c0389c282de2 HEAD_REF next ) -set(OPENMAMA_TARGET_ARCH ${TRIPLET_SYSTEM_ARCH}) -if(${TRIPLET_SYSTEM_ARCH} STREQUAL x64) - set(OPENMAMA_TARGET_ARCH x86_64) -endif() - -# Clean from any previous builds -vcpkg_execute_required_process( - COMMAND ${SCONS} - -c - target_arch=${OPENMAMA_TARGET_ARCH} - libevent_home=${CURRENT_INSTALLED_DIR} - apr_home=${CURRENT_INSTALLED_DIR} - qpid_home=${CURRENT_INSTALLED_DIR} - vcpkg_build=y - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME clean-${TARGET_TRIPLET}.log +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPROTON_ROOT=${CURRENT_INSTALLED_DIR} + -DAPR_ROOT=${CURRENT_INSTALLED_DIR} + -DINSTALL_RUNTIME_DEPENDENCIES=OFF + -DFLEX_EXECUTABLE=${FLEX} + -DWITH_EXAMPLES=OFF + -DWITH_TESTTOOLS=OFF ) -# This build -vcpkg_execute_required_process( - COMMAND ${SCONS} - with_unittest=False - with_examples=False - product=mamda - lex=${FLEX} - middleware=qpid - buildtype=dynamic,dynamic-debug - prefix=\#install - with_dependency_runtimes=False - target_arch=${OPENMAMA_TARGET_ARCH} - libevent_home=${CURRENT_INSTALLED_DIR} - apr_home=${CURRENT_INSTALLED_DIR} - qpid_home=${CURRENT_INSTALLED_DIR} - vcpkg_build=y - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}.log -) +vcpkg_install_cmake() -# Remove dependency files which build system creates for convenience -file(REMOVE ${SOURCE_PATH}/install/bin/dynamic/libapr-1.dll) -file(REMOVE ${SOURCE_PATH}/install/bin/dynamic/libapr-1.pdb) -file(REMOVE ${SOURCE_PATH}/install/bin/dynamic-debug/libapr-1.dll) -file(REMOVE ${SOURCE_PATH}/install/bin/dynamic-debug/libapr-1.pdb) -file(REMOVE ${SOURCE_PATH}/install/bin/dynamic/qpid-proton.dll) -file(REMOVE ${SOURCE_PATH}/install/bin/dynamic-debug/qpid-protond.dll) +# Copy across license files and copyright +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${SOURCE_PATH}/LICENSE-3RD-PARTY.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -# Custom install target - the build system doesn't really -# do prefixes properly and it has a different directory -# structure than vcpkg expects so reorganizing here -file(COPY ${SOURCE_PATH}/install/include - DESTINATION ${CURRENT_PACKAGES_DIR}) -file(COPY ${SOURCE_PATH}/install/lib/dynamic/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${SOURCE_PATH}/install/lib/dynamic-debug/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(COPY ${SOURCE_PATH}/install/bin/dynamic/ - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - FILES_MATCHING PATTERN "*.dll") -file(COPY ${SOURCE_PATH}/install/bin/dynamic-debug/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - FILES_MATCHING PATTERN "*.dll") +# Clean up LICENSE file - vcpkg doesn't expect it to be there +file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE.MD ${CURRENT_PACKAGES_DIR}/debug/LICENSE.MD) -# Copy across license files and copyright -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/openmama) -file(COPY ${SOURCE_PATH}/install/LICENSE.md - ${SOURCE_PATH}/install/LICENSE-3RD-PARTY.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmama/) -file(COPY ${SOURCE_PATH}/install/LICENSE.md - DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmama/copyright) +# Temporary workaround until upstream project puts dll in right place +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libmamaplugindqstrategymd.dll") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libmamaplugindqstrategymd.dll ${CURRENT_PACKAGES_DIR}/bin/libmamaplugindqstrategymd.dll) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libmamaplugindqstrategymd.dll") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmamaplugindqstrategymd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmamaplugindqstrategymd.dll) +endif() + +# Vcpkg does not expect include files to be in the debug directory +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +foreach(OPENMAMA_ROOT_HEADER destroyhandle.h platform.h list.h lookup2.h property.h timers.h wlock.h windows) + if(EXISTS "${CURRENT_PACKAGES_DIR}/include/${OPENMAMA_ROOT_HEADER}") + file(RENAME "${CURRENT_PACKAGES_DIR}/include/${OPENMAMA_ROOT_HEADER}" "${CURRENT_PACKAGES_DIR}/include/wombat/${OPENMAMA_ROOT_HEADER}") + endif() +endforeach() + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mama/integration/transport.h" "list.h" "wombat/list.h") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mama/integration/types.h" "list.h" "wombat/list.h") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mama/integration/mama.h" "property.h" "wombat/property.h") vcpkg_copy_pdbs() diff --git a/ports/openmama/vcpkg.json b/ports/openmama/vcpkg.json new file mode 100644 index 00000000000000..ae3b7957867cc2 --- /dev/null +++ b/ports/openmama/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "openmama", + "version-semver": "6.3.1", + "port-version": 1, + "description": "OpenMAMA is a high performance vendor neutral lightweight wrapper that provides a common API interface to different middleware and messaging solutions across a variety of platforms and languages", + "homepage": "https://github.com/finos/OpenMAMA", + "supports": "windows & (x64 | x86)", + "dependencies": [ + "apr", + "libevent", + "qpid-proton" + ] +} diff --git a/ports/openmesh/CONTROL b/ports/openmesh/CONTROL deleted file mode 100644 index d8a61f1f6d79a5..00000000000000 --- a/ports/openmesh/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: openmesh -Version: 8.0 -Description: A generic and efficient polygon mesh data structure diff --git a/ports/openmesh/portfile.cmake b/ports/openmesh/portfile.cmake index 04e624a033b2b6..7ff6cf13a31841 100644 --- a/ports/openmesh/portfile.cmake +++ b/ports/openmesh/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - -set(VERSION 8.0) +set(VERSION 8.1) # Note: upstream GitLab instance at https://graphics.rwth-aachen.de:9000 often goes down vcpkg_download_distfile(ARCHIVE URLS "https://www.openmesh.org/media/Releases/${VERSION}/OpenMesh-${VERSION}.tar.gz" FILENAME "OpenMesh-${VERSION}.tar.gz" - SHA512 6c9cb323d83d48daca7ddefe51df67f611befd657655d8013c2c620ad53e0b8521e6b8e25ebf3f5321f94182252ae0c75795875ff7ac11585e4ffa79e16f8008 + SHA512 c146e6b21d709a31772621a6a913def93a51460c4abb950c2eb64eea4528c7efd4c86166ba56ae0bc8090cc5878dd9328b570e094e61c1b64d6d298de05aca61 ) vcpkg_extract_source_archive_ex( @@ -15,21 +13,38 @@ vcpkg_extract_source_archive_ex( REF "${VERSION}" ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(OPENMESH_BUILD_SHARED ON) +else() + set(OPENMESH_BUILD_SHARED OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DBUILD_APPS=OFF - # [TODO]: add apps as feature, requires qt5 and freeglut - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA + OPTIONS + -DBUILD_APPS=OFF + -DOPENMESH_BUILD_SHARED=${OPENMESH_BUILD_SHARED} + # [TODO]: add apps as feature, requires qt5 and freeglut ) vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/OpenMesh/cmake TARGET_PATH share/OpenMesh/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/OpenMesh/Tools/VDPM/xpm) +# Only move dynamic libraries to bin on Windows +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/OpenMeshCore.dll ${CURRENT_PACKAGES_DIR}/bin/OpenMeshCore.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/OpenMeshTools.dll ${CURRENT_PACKAGES_DIR}/bin/OpenMeshTools.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/OpenMeshCored.dll ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMeshCored.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/OpenMeshToolsd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMeshToolsd.dll) +endif() +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmesh RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openmesh/usage b/ports/openmesh/usage new file mode 100644 index 00000000000000..1bfc821f505db2 --- /dev/null +++ b/ports/openmesh/usage @@ -0,0 +1,5 @@ +The package openmesh provides CMake targets: + + find_package(openmesh REQUIRED) + target_include_directories(main PRIVATE ${OPENMESH_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${OPENMESH_LIBRARIES}) diff --git a/ports/openmesh/vcpkg-cmake-wrapper.cmake b/ports/openmesh/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..ee59349e2e5209 --- /dev/null +++ b/ports/openmesh/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,18 @@ +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +find_path(OPENMESHCORE_INCLUDE_DIR EigenVectorT.hh PATH_SUFFIXES OpenMesh/Core/Geometry) +get_filename_component(OPENMESHCORE_INCLUDE_DIR ${OPENMESHCORE_INCLUDE_DIR} DIRECTORY) +get_filename_component(OPENMESHCORE_INCLUDE_DIR ${OPENMESHCORE_INCLUDE_DIR} DIRECTORY) +get_filename_component(OPENMESHCORE_INCLUDE_DIR ${OPENMESHCORE_INCLUDE_DIR} DIRECTORY) + +find_library(OPENMESHCORE_LIBRARY_DEBUG NAMES OpenMeshCored libOpenMeshCored NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(OPENMESHCORE_LIBRARY_RELEASE NAMES OpenMeshCore libOpenMeshCore NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) +find_library(OPENMESHTOOLS_LIBRARY_DEBUG NAMES OpenMeshToolsd libOpenMeshToolsd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(OPENMESHTOOLS_LIBRARY_RELEASE NAMES OpenMeshTools libOpenMeshTools NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(OPENMESHCORE) +select_library_configurations(OPENMESHTOOLS) + +set(OPENMESH_INCLUDE_DIRS ${OPENMESHCORE_INCLUDE_DIR}) +set(OPENMESH_LIBRARIES ${OPENMESHCORE_LIBRARY} ${OPENMESHTOOLS_LIBRARY}) \ No newline at end of file diff --git a/ports/openmesh/vcpkg.json b/ports/openmesh/vcpkg.json new file mode 100644 index 00000000000000..9d64ee9cac047d --- /dev/null +++ b/ports/openmesh/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "openmesh", + "version-string": "8.1", + "port-version": 1, + "description": "A generic and efficient polygon mesh data structure" +} diff --git a/ports/openmpi/CONTROL b/ports/openmpi/CONTROL deleted file mode 100644 index 6ea5a17c124926..00000000000000 --- a/ports/openmpi/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: openmpi -Version: 4.0.1 -Homepage: https://www.open-mpi.org/ -Description: The Open MPI Project is an open source Message Passing Interface implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers. diff --git a/ports/openmpi/keep_isystem.patch b/ports/openmpi/keep_isystem.patch new file mode 100644 index 00000000000000..9352e4ad129cf4 --- /dev/null +++ b/ports/openmpi/keep_isystem.patch @@ -0,0 +1,283 @@ +diff --git a/configure b/configure +index b2451c4..a7fb4da 100755 +--- a/configure ++++ b/configure +@@ -19562,6 +19562,10 @@ $as_echo "$as_me: WARNING: This usually indicates an error in configure." >&2;} + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -19653,6 +19657,10 @@ $as_echo "$as_me: WARNING: This usually indicates an error in configure." >&2;} + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -19759,6 +19767,10 @@ $as_echo "$as_me: WARNING: Code coverage functionality is currently available on + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -19946,6 +19958,10 @@ $as_echo "$opal_cv_cc_wno_long_double" >&6; } + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -20127,6 +20143,10 @@ $as_echo "$opal_cv_cc_fno_strict_aliasing" >&6; } + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -20267,6 +20287,10 @@ $as_echo "$opal_cv_cc_restrict_cflags" >&6; } + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -26120,6 +26144,10 @@ $as_echo "$as_me: WARNING: Code coverage functionality is currently available on + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -26297,6 +26325,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -26441,6 +26473,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -27799,6 +27835,10 @@ $as_echo "$as_me: WARNING: Code coverage functionality is currently available on + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -27973,6 +28013,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -28117,6 +28161,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -44127,6 +44175,10 @@ fi + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -60612,6 +60664,10 @@ $as_echo_n "checking if intel compiler _Quad == REAL*16... " >&6; } + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +@@ -60842,6 +60898,10 @@ $as_echo_n "checking if gnu compiler __float128 == REAL*16... " >&6; } + opal_found=0 + opal_i=`expr $opal_count + 1` + ;; ++ -isystem) ++ opal_found=0 ++ opal_i=`expr $opal_count + 1` ++ ;; + --param) + opal_found=0 + opal_i=`expr $opal_count + 1` +diff --git a/opal/mca/pmix/pmix3x/pmix/configure b/opal/mca/pmix/pmix3x/pmix/configure +index 0326a68..07df146 100755 +--- a/opal/mca/pmix/pmix3x/pmix/configure ++++ b/opal/mca/pmix/pmix3x/pmix/configure +@@ -19386,6 +19386,10 @@ $as_echo "$pmix_cv_cc_coverage" >&6; } + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` +@@ -19477,6 +19481,10 @@ $as_echo "$pmix_cv_cc_coverage" >&6; } + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` +@@ -19583,6 +19591,10 @@ $as_echo "$as_me: WARNING: Code coverage functionality is currently available on + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` +@@ -19770,6 +19782,10 @@ $as_echo "$pmix_cv_cc_wno_long_double" >&6; } + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` +@@ -19951,6 +19967,10 @@ $as_echo "$pmix_cv_cc_fno_strict_aliasing" >&6; } + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` +@@ -20091,6 +20111,10 @@ $as_echo "$pmix_cv_cc_restrict_cflags" >&6; } + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` +@@ -53914,6 +53938,10 @@ fi + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` +@@ -54005,6 +54033,10 @@ fi + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` +@@ -54096,6 +54128,10 @@ fi + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` +@@ -54187,6 +54223,10 @@ fi + pmix_found=0 + pmix_i=`expr $pmix_count + 1` + ;; ++ -isystem) ++ pmix_found=0 ++ pmix_i=`expr $pmix_count + 1` ++ ;; + --param) + pmix_found=0 + pmix_i=`expr $pmix_count + 1` diff --git a/ports/openmpi/portfile.cmake b/ports/openmpi/portfile.cmake index 9f69f9f9bfe621..3b926e6d1b594d 100644 --- a/ports/openmpi/portfile.cmake +++ b/ports/openmpi/portfile.cmake @@ -1,100 +1,40 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "This port is only for openmpi on Unix-like systems") -endif() +vcpkg_fail_port_install(ON_TARGET "Windows" "UWP") vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) -set(OpenMPI_FULL_VERSION "4.0.1") -set(OpenMPI_SHORT_VERSION "4.0") +set(OpenMPI_FULL_VERSION "4.1.0") +set(OpenMPI_SHORT_VERSION "4.1") vcpkg_download_distfile(ARCHIVE URLS "https://download.open-mpi.org/release/open-mpi/v${OpenMPI_SHORT_VERSION}/openmpi-${OpenMPI_FULL_VERSION}.tar.gz" FILENAME "openmpi-${OpenMPI_FULL_VERSION}.tar.gz" - SHA512 760716974cb6b25ad820184622e1ee7926bc6fda87db6b574f76792bc1ca99522e52195866c14b7cb2df5a4981efdaf9f71d2c5533cc0e8e45c2c4b3b74cbacc + SHA512 1f8117b11c5279d34194b4f5652b0223cf1258a4ac0efd40bab78f31f203068e027235a92a87e546b1b35c5b369bc90788b109c05a7068c75533a03649410e99 ) -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - list(APPEND BUILD_TYPES "release") -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - list(APPEND BUILD_TYPES "debug") -endif() - -set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/openmpi-${OpenMPI_FULL_VERSION}) -set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/openmpi-${OpenMPI_FULL_VERSION}) -set(OUT_PATH_DEBUG ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-debug) -set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/) -file(MAKE_DIRECTORY ${OUT_PATH_DEBUG}) -file(MAKE_DIRECTORY ${OUT_PATH_RELEASE}) - -foreach(BUILD_TYPE IN LISTS BUILD_TYPES) - vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) - #vcpkg_apply_patches(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/openmpi-${OpenMPI_FULL_VERSION} PATCHES patch.file) -endforeach() +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + keep_isystem.patch +) vcpkg_find_acquire_program(PERL) get_filename_component(PERL_PATH ${PERL} DIRECTORY) vcpkg_add_to_path(${PERL_PATH}) -set(BASH bash) +vcpkg_configure_make( + COPY_SOURCE + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --with-hwloc=internal + --with-libevent=internal + OPTIONS_DEBUG + --enable-debug +) -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "${SOURCE_PATH_DEBUG}/configure --prefix=${OUT_PATH_DEBUG} --enable-debug" - WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}" - LOGNAME "config-${TARGET_TRIPLET}-dbg" - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "make -j ${VCPKG_CONCURRENCY}" - NO_PARALLEL_COMMAND ${BASH} --noprofile --norc -c "make" - WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}" - LOGNAME "make-build-${TARGET_TRIPLET}-dbg" - ) - message(STATUS "Installing ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "make install" - WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}" - LOGNAME "make-install-${TARGET_TRIPLET}-dbg" - ) - file(COPY ${OUT_PATH_DEBUG}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) - message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") -endif() +vcpkg_install_make(DISABLE_PARALLEL) -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "${SOURCE_PATH_RELEASE}/configure --prefix=${OUT_PATH_RELEASE}" - WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}" - LOGNAME "config-${TARGET_TRIPLET}-rel" - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "make -j ${VCPKG_CONCURRENCY}" - NO_PARALLEL_COMMAND ${BASH} --noprofile --norc -c "make" - WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}" - LOGNAME "make-build-${TARGET_TRIPLET}-rel" - ) - message(STATUS "Installing ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "make install" - WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}" - LOGNAME "make-install-${TARGET_TRIPLET}-rel" - ) - file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) - file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR}) - file(COPY ${OUT_PATH_RELEASE}/share DESTINATION ${CURRENT_PACKAGES_DIR}) - file(COPY ${OUT_PATH_RELEASE}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) - message(STATUS "Installing ${TARGET_TRIPLET}-rel done") -endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(INSTALL ${SOURCE_PATH_DEBUG}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmpi RENAME copyright) -else() - file(INSTALL ${SOURCE_PATH_RELEASE}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmpi RENAME copyright) -endif() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openmpi/vcpkg.json b/ports/openmpi/vcpkg.json new file mode 100644 index 00000000000000..96fae3a06df50e --- /dev/null +++ b/ports/openmpi/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "openmpi", + "version-string": "4.1.0", + "port-version": 1, + "description": "The Open MPI Project is an open source Message Passing Interface implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.", + "homepage": "https://www.open-mpi.org/", + "supports": "!(windows | uwp)" +} diff --git a/ports/openmvg/CONTROL b/ports/openmvg/CONTROL deleted file mode 100644 index b083516640d050..00000000000000 --- a/ports/openmvg/CONTROL +++ /dev/null @@ -1,11 +0,0 @@ -Source: openmvg -Version: 1.4-5 -Description: open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion. -Build-Depends: coinutils, clp, osi, liblemon, flann, eigen3, ceres, cereal, libjpeg-turbo, tiff, libpng, zlib, suitesparse - -Feature: opencv -Build-Depends: opencv[contrib] -Description: opencv support for openmvg - -Feature: openmp -Description: openmp support for openmvg diff --git a/ports/openmvg/build_fixes.patch b/ports/openmvg/build_fixes.patch new file mode 100644 index 00000000000000..3b2b199b4b29ae --- /dev/null +++ b/ports/openmvg/build_fixes.patch @@ -0,0 +1,736 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9cfd06c..8859469 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -14,6 +14,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + message(FATAL_ERROR "In-source builds not allowed.") + endif() + ++if(0) + # ============================================================================== + # OpenMVG build options + # ============================================================================== +@@ -31,7 +32,7 @@ option(OpenMVG_USE_OPENMP "Enable OpenMP parallelization" ON) + # and openMVG simultaneously + # ============================================================================== + option(OpenMVG_USE_OPENCV "Build or not opencv+openMVG samples programs" OFF) +- ++endif() + # ============================================================================== + # Since OpenCV 3, SIFT is no longer in the default modules. See + # https://github.com/itseez/opencv_contrib for more informations. +@@ -85,6 +86,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + register_definitions(-DOPENMVG_STD_UNORDERED_MAP) + endif() + ++if(0) + # ============================================================================== + # Check that submodule have been initialized and updated + # ============================================================================== +@@ -93,6 +95,7 @@ if (NOT EXISTS ${PROJECT_SOURCE_DIR}/dependencies/cereal/include) + "\n submodule(s) are missing, please update your repository:\n" + " > git submodule update -i\n") + endif() ++endif() + + # ============================================================================== + # Additional cmake find modules +@@ -128,7 +131,6 @@ if (OpenMVG_USE_OPENMP) + find_package(OpenMP) + if (OPENMP_FOUND) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" ON) + register_definitions(-DOPENMVG_USE_OPENMP) + if (NOT MSVC) + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +@@ -139,11 +141,6 @@ if (OpenMVG_USE_OPENMP) + endif() + endif (NOT MSVC) + endif (OPENMP_FOUND) +-else (OpenMVG_USE_OPENMP) +- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" OFF) +- include(UpdateCacheVariable) +- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENMP OFF) +- remove_definitions(-DOPENMVG_USE_OPENMP) + endif (OpenMVG_USE_OPENMP) + + # ============================================================================== +@@ -160,10 +157,10 @@ endif() + # ============================================================================== + # IMAGE IO detection + # ============================================================================== +-find_package(JPEG QUIET) +-find_package(PNG QUIET) +-find_package(TIFF QUIET) +- ++find_package(JPEG REQUIRED) ++find_package(PNG REQUIRED) ++find_package(TIFF REQUIRED) ++find_package(vlfeat REQUIRED) + # Folders + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +@@ -182,6 +179,7 @@ if (OpenMVG_BUILD_OPENGL_EXAMPLES) + set_property(TARGET glfw PROPERTY FOLDER OpenMVG/3rdParty/glfw) + endif (OpenMVG_BUILD_OPENGL_EXAMPLES) + ++if(0) + # Dependencies install rules + install( + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/ +@@ -189,7 +187,7 @@ install( + COMPONENT headers + FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h" + ) +- ++endif() + # ============================================================================== + # --END-- SUBMODULE CONFIGURATION + # ============================================================================== +@@ -225,6 +223,7 @@ ENDMACRO(UNIT_TEST) + # - external by default + # - internal if cereal not found + # ============================================================================== ++if(0) + find_package(cereal QUIET CONFIG) + if (NOT TARGET cereal) + add_library(cereal INTERFACE) +@@ -237,6 +236,10 @@ if (NOT TARGET cereal) + + set(OpenMVG_USE_INTERNAL_CEREAL ON) + endif() ++endif() ++ ++find_package(cereal REQUIRED CONFIG) ++get_target_property(CEREAL_INCLUDE_DIRS cereal INTERFACE_INCLUDE_DIRECTORIES) + + # ============================================================================== + # Eigen +@@ -245,6 +248,7 @@ endif() + # - external if EIGEN_INCLUDE_DIR_HINTS is defined + # - internal if Eigen not found + # ============================================================================== ++if(0) + find_package(Eigen3 QUIET) + if (NOT Eigen3_FOUND) + set(EIGEN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/eigen) +@@ -253,13 +257,17 @@ if (NOT Eigen3_FOUND) + else() + set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) + endif() ++endif() + ++find_package(Eigen3 REQUIRED) ++set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) + # ============================================================================== + # Ceres + # ============================================================================== + # - external by default if CERES_DIR_HINTS or find_package found a valid Ceres + # - internal if ceres not found (ceres-solver+cxsparse+miniglog) + # ============================================================================== ++if(0) + find_package(Ceres QUIET HINTS ${CERES_DIR_HINTS}) + if (NOT Ceres_FOUND) + set(OpenMVG_USE_INTERNAL_CERES ON) +@@ -271,13 +279,16 @@ if (NOT Ceres_FOUND) + STRING(REGEX REPLACE "version ([0-9.]+).*" "\\1" CERES_VERSION ${CERES_CONFIG}) + set(CERES_LIBRARIES openMVG_ceres) + endif() ++endif() + ++find_package(Ceres REQUIRED) + # ============================================================================== + # Flann + # ============================================================================== + # - internal by default (flann), + # - external if FLANN_INCLUDE_DIR_HINTS and a valid Flann setup is found + # ============================================================================== ++if(0) + if (NOT DEFINED FLANN_INCLUDE_DIR_HINTS) + set(FLANN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) + set(OpenMVG_USE_INTERNAL_FLANN ON) +@@ -286,13 +297,16 @@ find_package(Flann QUIET) + if (NOT FLANN_FOUND OR OpenMVG_USE_INTERNAL_FLANN) + set(FLANN_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) + endif() ++endif() + ++find_package(flann REQUIRED) + # ============================================================================== + # CoinUtils + # ============================================================================== + # - internal by default (CoinUtils), + # - external if COINUTILS_INCLUDE_DIR_HINTS and a valid CoinUtils setup is found + # ============================================================================== ++if(0) + if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS) + set(COINUTILS_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/CoinUtils/src/) + set(OpenMVG_USE_INTERNAL_COINUTILS ON) +@@ -302,13 +316,16 @@ if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS) + else() + find_package(CoinUtils QUIET) + endif() ++endif() + ++find_package(CoinUtils REQUIRED) + ## ============================================================================== + ## Clp + ## ============================================================================== + ## - internal by default (Clp), + ## - external if CLP_INCLUDE_DIR_HINTS and a valid Clp setup is found + ## ============================================================================== ++if(0) + if (NOT DEFINED CLP_INCLUDE_DIR_HINTS) + set(CLP_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/) + set(OpenMVG_USE_INTERNAL_CLP ON) +@@ -320,6 +337,9 @@ if (NOT DEFINED CLP_INCLUDE_DIR_HINTS) + else() + find_package(Clp QUIET) + endif() ++endif() ++ ++find_package(Clp REQUIRED) + + # ============================================================================== + # Osi +@@ -327,6 +347,7 @@ endif() + # - internal by default (Osi), + # - external if OSI_INCLUDE_DIR_HINTS and a valid Osi setup is found + # ============================================================================== ++if(0) + if (NOT DEFINED OSI_INCLUDE_DIR_HINTS) + set(OSI_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Osi/src/) + set(OpenMVG_USE_INTERNAL_OSI ON) +@@ -336,6 +357,9 @@ if (NOT DEFINED OSI_INCLUDE_DIR_HINTS) + else() + find_package(Osi QUIET) + endif() ++endif() ++ ++find_package(Osi REQUIRED) + + # ============================================================================== + # Internal CLP/OSI/COINUTILS libraries: +@@ -354,6 +378,7 @@ endif() + # - internal by default (Lemon), + # - external if LEMON_INCLUDE_DIR_HINTS and a valid Lemon setup is found + # ============================================================================== ++if(0) + if (NOT DEFINED LEMON_INCLUDE_DIR_HINTS) + set(LEMON_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lemon) + set(OpenMVG_USE_INTERNAL_LEMON ON) +@@ -365,6 +390,9 @@ if (NOT LEMON_FOUND OR OpenMVG_USE_INTERNAL_LEMON) + ${PROJECT_BINARY_DIR}/third_party/lemon) + set(LEMON_LIBRARY openMVG_lemon) + endif() ++endif() ++ ++find_package(LEMON REQUIRED) + + # ============================================================================== + # OpenCV +@@ -372,20 +400,13 @@ endif() + # - only external and enabled only if OpenMVG_USE_OPENCV is set to ON + # ============================================================================== + if (OpenMVG_USE_OPENCV) +- find_package( OpenCV QUIET ) +- if (NOT OpenCV_FOUND OR OpenCV_VERSION VERSION_LESS "3.0.0") +- message(STATUS "OpenCV was not found (note that OpenCV version >= 3.0.0 is required). -> Disabling OpenCV support.") +- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENCV OFF) +- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OCVSIFT OFF) +- endif() ++ find_package( OpenCV REQUIRED ) + endif() + +- + # ============================================================================== + # Third-party libraries: + # ============================================================================== + add_subdirectory(third_party) +-add_subdirectory(testing) + + # ============================================================================== + # openMVG modules +@@ -472,67 +493,67 @@ message("** Use OpenCV SIFT features: " ${OpenMVG_USE_OCVSIFT}) + + message("\n") + +-if (DEFINED OpenMVG_USE_INTERNAL_CEREAL) ++if (OpenMVG_USE_INTERNAL_CEREAL) + message(STATUS "CEREAL: (internal)") + else() + message(STATUS "CEREAL: (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN) ++if (OpenMVG_USE_INTERNAL_EIGEN) + message(STATUS "EIGEN: " ${EIGEN_VERSION} " (internal)") + else() + message(STATUS "EIGEN: " ${EIGEN_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_CERES) ++if (OpenMVG_USE_INTERNAL_CERES) + message(STATUS "CERES: " ${CERES_VERSION} " (internal)") + else() + message(STATUS "CERES: " ${CERES_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_FLANN) ++if (OpenMVG_USE_INTERNAL_FLANN) + message(STATUS "FLANN: " ${FLANN_VERSION} " (internal)") + else() + message(STATUS "FLANN: " ${FLANN_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_TIFF) ++if (OpenMVG_USE_INTERNAL_TIFF) + message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (internal)") + else() + message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_PNG) ++if (OpenMVG_USE_INTERNAL_PNG) + message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (internal)") + else() + message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_JPEG) ++if (OpenMVG_USE_INTERNAL_JPEG) + message(STATUS "LIBJPEG (internal)") + else() + message(STATUS "LIBJPEG (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_CLP) ++if (OpenMVG_USE_INTERNAL_CLP) + message(STATUS "CLP: " ${CLP_VERSION} " (internal)") + else() + message(STATUS "CLP: " ${CLP_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_COINUTILS) ++if (OpenMVG_USE_INTERNAL_COINUTILS) + message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (internal)") + else() + message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_OSI) ++if (OpenMVG_USE_INTERNAL_OSI) + message(STATUS "OSI: " ${OSI_VERSION} " (internal)") + else() + message(STATUS "OSI: " ${OSI_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_LEMON) ++if (OpenMVG_USE_INTERNAL_LEMON) + message(STATUS "LEMON: " ${LEMON_VERSION} " (internal)") + else() + message(STATUS "LEMON: " ${LEMON_VERSION} " (external)") +diff --git a/src/cmakeFindModules/FindClp.cmake b/src/cmakeFindModules/FindClp.cmake +index 8a69c23..6a81580 100644 +--- a/src/cmakeFindModules/FindClp.cmake ++++ b/src/cmakeFindModules/FindClp.cmake +@@ -51,9 +51,8 @@ IF(EXISTS "${CLP_DIR}" AND NOT "${CLP_DIR}" STREQUAL "") + SET(CLP_INCLUDE_DIR ${CLP_DIR}) + + FIND_LIBRARY(CLP_LIBRARY NAMES Clp) +- FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver) +- FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp) +- ++ FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver Clp) ++ FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp Clp) + # locate Clp libraries + IF(DEFINED CLP_LIBRARY AND DEFINED CLPSOLVER_LIBRARY AND DEFINED OSICLP_LIBRARY) + SET(CLP_LIBRARIES ${CLP_LIBRARY} ${CLPSOLVER_LIBRARY} ${OSICLP_LIBRARY}) +diff --git a/src/cmakeFindModules/OpenMVGConfig.cmake.in b/src/cmakeFindModules/OpenMVGConfig.cmake.in +index e7dfbfd..c01910d 100644 +--- a/src/cmakeFindModules/OpenMVGConfig.cmake.in ++++ b/src/cmakeFindModules/OpenMVGConfig.cmake.in +@@ -19,7 +19,7 @@ + # OPENMVG_VERSION: Version of OpenMVG found. + # + +-# Called if we failed to find OpenMVG or any of it's required dependencies, ++# Called if we failed to find OpenMVG or any of its required dependencies, + # unsets all public (designed to be used externally) variables and reports + # error message at priority depending upon [REQUIRED/QUIET/] argument. + macro(OPENMVG_REPORT_NOT_FOUND REASON_MSG) +@@ -59,9 +59,19 @@ set(CALLERS_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) + # script. + set(CMAKE_MODULE_PATH ${CURRENT_CONFIG_INSTALL_DIR}) + ++include(CMakeFindDependencyMacro) ++find_dependency(CoinUtils) ++find_dependency(Clp) ++find_dependency(Osi) ++find_dependency(flann) ++find_dependency(Threads) ++find_dependency(cereal) ++find_dependency(Ceres) ++find_dependency(vlfeat) ++ + # Build the absolute root install directory as a relative path + get_filename_component(CURRENT_ROOT_INSTALL_DIR +- ${CMAKE_MODULE_PATH}/../../../ ABSOLUTE) ++ ${CMAKE_MODULE_PATH}/../../ ABSOLUTE) + if (NOT EXISTS ${CURRENT_ROOT_INSTALL_DIR}) + OPENMVG_REPORT_NOT_FOUND( + "OpenMVG install root: ${CURRENT_ROOT_INSTALL_DIR}, " +diff --git a/src/nonFree/sift/CMakeLists.txt b/src/nonFree/sift/CMakeLists.txt +index 402a2d8..60ddc11 100644 +--- a/src/nonFree/sift/CMakeLists.txt ++++ b/src/nonFree/sift/CMakeLists.txt +@@ -1,36 +1,36 @@ + +-# libs should be static +-set(BUILD_SHARED_LIBS OFF) +- +-# use PIC code for link into shared lib +-if(UNIX) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") +-endif(UNIX) +- +-if(NOT USE_SSE2) +- add_definitions(-DVL_DISABLE_SSE2) +-endif() +- +-add_definitions(-DVL_DISABLE_THREADS) +- +-include_directories(./vl) +-set(FEATS +- vl/generic.c +- vl/imopv_sse2.c +- vl/sift.c +- vl/imopv.c +- vl/mathop_sse2.c +- vl/sift.c +- vl/host.c +- vl/mathop.c +- vl/random.c) +-set_source_files_properties(${FEATS} PROPERTIES LANGUAGE C) +-add_library(vlsift ${FEATS}) +-install(TARGETS vlsift DESTINATION lib EXPORT openMVG-targets) +-set_property(TARGET vlsift PROPERTY FOLDER OpenMVG/nonFree) ++## libs should be static ++#set(BUILD_SHARED_LIBS OFF) ++# ++## use PIC code for link into shared lib ++#if(UNIX) ++# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ++#endif(UNIX) ++# ++#if(NOT USE_SSE2) ++# add_definitions(-DVL_DISABLE_SSE2) ++#endif() ++# ++#add_definitions(-DVL_DISABLE_THREADS) ++# ++#include_directories(./vl) ++#set(FEATS ++# vl/generic.c ++# vl/imopv_sse2.c ++# vl/sift.c ++# vl/imopv.c ++# vl/mathop_sse2.c ++# vl/sift.c ++# vl/host.c ++# vl/mathop.c ++# vl/random.c) ++#set_source_files_properties(${FEATS} PROPERTIES LANGUAGE C) ++#add_library(vlsift ${FEATS}) ++#install(TARGETS vlsift DESTINATION lib EXPORT openMVG-targets) ++#set_property(TARGET vlsift PROPERTY FOLDER OpenMVG/nonFree) + install( + DIRECTORY . + DESTINATION include/openMVG_dependencies/nonFree/sift + COMPONENT headers +- FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h" ++ FILES_MATCHING PATTERN "*.hpp" + ) +diff --git a/src/nonFree/sift/SIFT_describer.hpp b/src/nonFree/sift/SIFT_describer.hpp +index cd800b0..20e9c8e 100644 +--- a/src/nonFree/sift/SIFT_describer.hpp ++++ b/src/nonFree/sift/SIFT_describer.hpp +@@ -17,9 +17,7 @@ + #include + #include + +-extern "C" { +-#include "nonFree/sift/vl/sift.h" +-} ++#include + + namespace openMVG { + namespace features { +@@ -174,7 +172,7 @@ public: + const int nkeys = vl_sift_get_nkeypoints(filt); + + // Update gradient before launching parallel extraction +- vl_sift_update_gradient(filt); ++ update_gradient(filt); + + #ifdef OPENMVG_USE_OPENMP + #pragma omp parallel for private(descr, descriptor) +diff --git a/src/openMVG/linearProgramming/CMakeLists.txt b/src/openMVG/linearProgramming/CMakeLists.txt +index cc5212f..acc57dd 100644 +--- a/src/openMVG/linearProgramming/CMakeLists.txt ++++ b/src/openMVG/linearProgramming/CMakeLists.txt +@@ -15,16 +15,12 @@ target_link_libraries(openMVG_linearProgramming + PUBLIC + openMVG_numeric + PRIVATE +- ${CLP_LIBRARIES} # clp + solver wrapper +- ${COINUTILS_LIBRARY} # container tools +- ${OSI_LIBRARY} # generic LP ++ Coin::Clp # clp + solver wrapper ++ Coin::CoinUtils # container tools ++ Coin::Osi # generic LP + ) + + target_include_directories(openMVG_linearProgramming +- PRIVATE +- ${CLP_INCLUDE_DIRS} +- ${COINUTILS_INCLUDE_DIRS} +- ${OSI_INCLUDE_DIRS} + PUBLIC + $ + ) +diff --git a/src/openMVG/matching/CMakeLists.txt b/src/openMVG/matching/CMakeLists.txt +index 5fcd972..b21ea7b 100644 +--- a/src/openMVG/matching/CMakeLists.txt ++++ b/src/openMVG/matching/CMakeLists.txt +@@ -18,6 +18,7 @@ list(REMOVE_ITEM matching_files_cpp ${REMOVEFILESUNITTEST}) + + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) ++find_package(flann CONFIG REQUIRED) + + set_source_files_properties(${matching_files_cpp} PROPERTIES LANGUAGE CXX) + add_library(openMVG_matching +@@ -39,10 +40,10 @@ target_link_libraries(openMVG_matching + Threads::Threads + cereal + ) +-if (NOT DEFINED OpenMVG_USE_INTERNAL_FLANN) ++if (NOT OpenMVG_USE_INTERNAL_FLANN) + target_link_libraries(openMVG_matching + PUBLIC +- ${FLANN_LIBRARIES} ++ $,flann::flann_s,flann::flann> + ) + endif() + set_target_properties(openMVG_matching PROPERTIES SOVERSION ${OPENMVG_VERSION_MAJOR} VERSION "${OPENMVG_VERSION_MAJOR}.${OPENMVG_VERSION_MINOR}") +diff --git a/src/openMVG/numeric/CMakeLists.txt b/src/openMVG/numeric/CMakeLists.txt +index 1f3fc30..4097320 100644 +--- a/src/openMVG/numeric/CMakeLists.txt ++++ b/src/openMVG/numeric/CMakeLists.txt +@@ -26,7 +26,7 @@ target_include_directories(openMVG_numeric + $ + $ + ) +-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN) ++if (OpenMVG_USE_INTERNAL_EIGEN) + target_include_directories(openMVG_numeric PUBLIC + $) + else() +diff --git a/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt b/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt +index 862ffc7..326fc9a 100644 +--- a/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt ++++ b/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt +@@ -18,7 +18,7 @@ if (OpenMVG_BUILD_GUI_SOFTWARES) + add_executable( openMVG_sample_describe_and_match_GUI WIN32 ${FEATURES_PAIR_DEMO_SRCS} ${FEATURES_PAIR_DEMO_HDRS} ) + endif( APPLE ) + +- target_link_libraries( openMVG_sample_describe_and_match_GUI Qt5::Widgets openMVG_features openMVG_image openMVG_matching vlsift ) ++ target_link_libraries( openMVG_sample_describe_and_match_GUI Qt5::Widgets openMVG_features openMVG_image openMVG_matching unofficial::vlfeat::vl ) + + set_target_properties( openMVG_sample_describe_and_match_GUI PROPERTIES CXX_STANDARD 11) + +diff --git a/src/openMVG_Samples/features_image_matching/CMakeLists.txt b/src/openMVG_Samples/features_image_matching/CMakeLists.txt +index 18fb385..d44ffce 100644 +--- a/src/openMVG_Samples/features_image_matching/CMakeLists.txt ++++ b/src/openMVG_Samples/features_image_matching/CMakeLists.txt +@@ -5,7 +5,7 @@ target_link_libraries(openMVG_sample_image_matching + openMVG_features + openMVG_matching + ${STLPLUS_LIBRARY} +- vlsift) ++ unofficial::vlfeat::vl) + target_compile_definitions(openMVG_sample_image_matching + PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") + +diff --git a/src/openMVG_Samples/features_repeatability/CMakeLists.txt b/src/openMVG_Samples/features_repeatability/CMakeLists.txt +index fd2b7c6..91f2766 100644 +--- a/src/openMVG_Samples/features_repeatability/CMakeLists.txt ++++ b/src/openMVG_Samples/features_repeatability/CMakeLists.txt +@@ -6,7 +6,7 @@ target_link_libraries(openMVG_sample_main_features_repeatability_dataset + openMVG_matching + openMVG_system + openMVG_multiview +- vlsift ++ unofficial::vlfeat::vl + ${STLPLUS_LIBRARY}) + + set_property(TARGET openMVG_sample_main_features_repeatability_dataset PROPERTY FOLDER OpenMVG/Samples) +diff --git a/src/software/Localization/CMakeLists.txt b/src/software/Localization/CMakeLists.txt +index 2f60393..0d57d0a 100644 +--- a/src/software/Localization/CMakeLists.txt ++++ b/src/software/Localization/CMakeLists.txt +@@ -11,7 +11,7 @@ target_link_libraries(openMVG_main_SfM_Localization + openMVG_sfm + openMVG_exif + ${STLPLUS_LIBRARY} +- vlsift ++ unofficial::vlfeat::vl + ) + + # Installation rules +diff --git a/src/software/SfM/CMakeLists.txt b/src/software/SfM/CMakeLists.txt +index 013a6c8..f38daa9 100644 +--- a/src/software/SfM/CMakeLists.txt ++++ b/src/software/SfM/CMakeLists.txt +@@ -44,7 +44,7 @@ target_link_libraries(openMVG_main_ComputeFeatures + openMVG_multiview + openMVG_sfm + ${STLPLUS_LIBRARY} +- vlsift ++ unofficial::vlfeat::vl + ) + if (MSVC) + set_target_properties(openMVG_main_ComputeFeatures PROPERTIES COMPILE_FLAGS "/bigobj") +@@ -235,7 +235,7 @@ if(OpenMVG_USE_OPENCV) + openMVG_multiview + openMVG_sfm + ${STLPLUS_LIBRARY} +- vlsift ++ unofficial::vlfeat::vl + ${OpenCV_LIBS}) + target_include_directories(openMVG_main_ComputeFeatures_OpenCV PRIVATE ${OpenCV_INCLUDE_DIRS}) + +diff --git a/src/software/SfM/SfM_GlobalPipeline.py.in b/src/software/SfM/SfM_GlobalPipeline.py.in +index 42405a4..28b0246 100644 +--- a/src/software/SfM/SfM_GlobalPipeline.py.in ++++ b/src/software/SfM/SfM_GlobalPipeline.py.in +@@ -21,7 +21,7 @@ + OPENMVG_SFM_BIN = "@OPENMVG_SOFTWARE_SFM_BUILD_DIR@" + + # Indicate the openMVG camera sensor width directory +-CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_SOFTWARE_SFM_SRC_DIR@" + "/../../openMVG/exif/sensor_width_database" ++CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY@" + + import os + import subprocess +@@ -77,5 +77,3 @@ pRecons.wait() + + pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeSfM_DataColor"), "-i", reconstruction_dir+"/robust.bin", "-o", os.path.join(reconstruction_dir,"robust_colorized.ply")] ) + pRecons.wait() +- +- +diff --git a/src/software/SfM/SfM_SequentialPipeline.py.in b/src/software/SfM/SfM_SequentialPipeline.py.in +index 9a5a482..e804a19 100644 +--- a/src/software/SfM/SfM_SequentialPipeline.py.in ++++ b/src/software/SfM/SfM_SequentialPipeline.py.in +@@ -21,7 +21,7 @@ + OPENMVG_SFM_BIN = "@OPENMVG_SOFTWARE_SFM_BUILD_DIR@" + + # Indicate the openMVG camera sensor width directory +-CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_SOFTWARE_SFM_SRC_DIR@" + "/../../openMVG/exif/sensor_width_database" ++CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY@" + + import os + import subprocess +@@ -77,5 +77,3 @@ pRecons.wait() + + pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeSfM_DataColor"), "-i", reconstruction_dir+"/robust.bin", "-o", os.path.join(reconstruction_dir,"robust_colorized.ply")] ) + pRecons.wait() +- +- +diff --git a/src/software/SfM/main_ComputeFeatures_OpenCV.cpp b/src/software/SfM/main_ComputeFeatures_OpenCV.cpp +index 9cc46af..f8bd892 100644 +--- a/src/software/SfM/main_ComputeFeatures_OpenCV.cpp ++++ b/src/software/SfM/main_ComputeFeatures_OpenCV.cpp +@@ -208,7 +208,7 @@ public: + // Create a SIFT detector + std::vector< cv::KeyPoint > v_keypoints; + cv::Mat m_desc; +- cv::Ptr siftdetector = cv::xfeatures2d::SIFT::create(); ++ cv::Ptr siftdetector = cv::SIFT::create(); + + // Process SIFT computation + siftdetector->detectAndCompute(img, m_mask, v_keypoints, m_desc); +diff --git a/src/software/SfM/tutorial_demo.py.in b/src/software/SfM/tutorial_demo.py.in +index 259e24e..1097062 100644 +--- a/src/software/SfM/tutorial_demo.py.in ++++ b/src/software/SfM/tutorial_demo.py.in +@@ -12,7 +12,7 @@ + OPENMVG_SFM_BIN = "@OPENMVG_SOFTWARE_SFM_BUILD_DIR@" + + # Indicate the openMVG camera sensor width directory +-CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_SOFTWARE_SFM_SRC_DIR@" + "/../../openMVG/exif/sensor_width_database" ++CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY@" + + import os + import subprocess +@@ -89,5 +89,3 @@ pRecons.wait() + print ("4. Structure from Known Poses (robust triangulation)") + pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeStructureFromKnownPoses"), "-i", reconstruction_dir+"/sfm_data.bin", "-m", matches_dir, "-o", os.path.join(reconstruction_dir,"robust.ply")] ) + pRecons.wait() +- +- +diff --git a/src/software/VO/Tracker_opencv_klt.hpp b/src/software/VO/Tracker_opencv_klt.hpp +index aa7dffe..2c4d237 100644 +--- a/src/software/VO/Tracker_opencv_klt.hpp ++++ b/src/software/VO/Tracker_opencv_klt.hpp +@@ -80,7 +80,7 @@ struct Tracker_opencv_KLT : public Abstract_Tracker + std::vector m_nextKeypoints; + + cv::Ptr m_detector = cv::GFTTDetector::create(count); +- if (m_detector == NULL) ++ if (m_detector == nullptr) + return false; + + m_detector->detect(current_img, m_nextKeypoints); +diff --git a/src/third_party/CMakeLists.txt b/src/third_party/CMakeLists.txt +index b71dfab..ad98e51 100644 +--- a/src/third_party/CMakeLists.txt ++++ b/src/third_party/CMakeLists.txt +@@ -18,7 +18,7 @@ add_subdirectory(stlplus3) + set(STLPLUS_LIBRARY openMVG_stlplus PARENT_SCOPE) + + # Add graph library +-if(DEFINED OpenMVG_USE_INTERNAL_LEMON) ++if(OpenMVG_USE_INTERNAL_LEMON) + add_subdirectory(lemon) + set_property(TARGET openMVG_lemon PROPERTY FOLDER OpenMVG/3rdParty/lemon) + set_property(TARGET check PROPERTY FOLDER OpenMVG/3rdParty/lemon) +@@ -68,7 +68,7 @@ endif (NOT TIFF_FOUND) + add_subdirectory(vectorGraphics) + + # Add ceres-solver (A Nonlinear Least Squares Minimizer) +-if (DEFINED OpenMVG_USE_INTERNAL_CERES) ++if (OpenMVG_USE_INTERNAL_CERES) + add_subdirectory(cxsparse) + add_subdirectory(ceres-solver) + set_property(TARGET openMVG_cxsparse PROPERTY FOLDER OpenMVG/3rdParty/ceres) +@@ -76,7 +76,7 @@ if (DEFINED OpenMVG_USE_INTERNAL_CERES) + endif() + + # Add an Approximate Nearest Neighbor library +-if (DEFINED OpenMVG_USE_INTERNAL_FLANN) ++if (OpenMVG_USE_INTERNAL_FLANN) + set(FLANN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/flann/src/cpp) + add_subdirectory(flann) + endif() +@@ -90,7 +90,7 @@ add_subdirectory(fast) + ## + # Install Header only libraries if necessary + ## +-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN) ++if (OpenMVG_USE_INTERNAL_EIGEN) + #Configure Eigen install + set(EIGEN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/eigen) + add_subdirectory(eigen) diff --git a/ports/openmvg/fixcmake.patch b/ports/openmvg/fixcmake.patch deleted file mode 100644 index 2dd5201ec74701..00000000000000 --- a/ports/openmvg/fixcmake.patch +++ /dev/null @@ -1,427 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 654bebd..ab7dd90 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -17,27 +17,16 @@ endif() - # ============================================================================== - # OpenMVG build options - # ============================================================================== --option(OpenMVG_BUILD_SHARED "Build OpenMVG shared libs" OFF) --option(OpenMVG_BUILD_TESTS "Build OpenMVG tests" OFF) --option(OpenMVG_BUILD_DOC "Build OpenMVG documentation" ON) --option(OpenMVG_BUILD_EXAMPLES "Build OpenMVG samples applications." ON) --option(OpenMVG_BUILD_OPENGL_EXAMPLES "Build OpenMVG openGL examples" OFF) --option(OpenMVG_BUILD_SOFTWARES "Build OpenMVG softwares" ON) --option(OpenMVG_BUILD_GUI_SOFTWARES "Build OpenMVG GUI softwares (QT5)" ON) --option(OpenMVG_BUILD_COVERAGE "Enable code coverage generation (gcc only)" OFF) --option(OpenMVG_USE_OPENMP "Enable OpenMP parallelization" ON) - # ============================================================================== - # Opencv is not used by openMVG but some samples show how to use openCV - # and openMVG simultaneously - # ============================================================================== --option(OpenMVG_USE_OPENCV "Build or not opencv+openMVG samples programs" OFF) - - # ============================================================================== - # Since OpenCV 3, SIFT is no longer in the default modules. See - # https://github.com/itseez/opencv_contrib for more informations. - # Enable this to be able to use OpenCV SIFT in main_ComputeFeatures_OpenCV. - # ============================================================================== --option(OpenMVG_USE_OCVSIFT "Add or not OpenCV SIFT in available features" OFF) - - # ============================================================================== - # OpenMVG version -@@ -85,15 +74,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - register_definitions(-DOPENMVG_STD_UNORDERED_MAP) - endif() - --# ============================================================================== --# Check that submodule have been initialized and updated --# ============================================================================== --if (NOT EXISTS ${PROJECT_SOURCE_DIR}/dependencies/cereal/include) -- message(FATAL_ERROR -- "\n submodule(s) are missing, please update your repository:\n" -- " > git submodule update -i\n") --endif() -- - # ============================================================================== - # Additional cmake find modules - # ============================================================================== -@@ -129,7 +109,6 @@ if (OpenMVG_USE_OPENMP) - find_package(OpenMP) - if (OPENMP_FOUND) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") -- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" ON) - register_definitions(-DOPENMVG_USE_OPENMP) - if (NOT MSVC) - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") -@@ -140,11 +119,6 @@ if (OpenMVG_USE_OPENMP) - endif() - endif (NOT MSVC) - endif (OPENMP_FOUND) --else (OpenMVG_USE_OPENMP) -- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" OFF) -- include(UpdateCacheVariable) -- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENMP OFF) -- remove_definitions(-DOPENMVG_USE_OPENMP) - endif (OpenMVG_USE_OPENMP) - - # ============================================================================== -@@ -183,14 +157,6 @@ if (OpenMVG_BUILD_OPENGL_EXAMPLES) - set_property(TARGET glfw PROPERTY FOLDER OpenMVG/3rdParty/glfw) - endif (OpenMVG_BUILD_OPENGL_EXAMPLES) - --# Dependencies install rules --install( -- DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/ -- DESTINATION include/openMVG_dependencies -- COMPONENT headers -- FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h" --) -- - # ============================================================================== - # --END-- SUBMODULE CONFIGURATION - # ============================================================================== -@@ -226,14 +192,8 @@ ENDMACRO(UNIT_TEST) - # - external by default - # - internal if cereal not found - # ============================================================================== --find_package(cereal QUIET CONFIG) --if (NOT cereal_FOUND) -- set(CEREAL_INCLUDE_DIRS -- ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/cereal/include) -- set(OpenMVG_USE_INTERNAL_CEREAL ON) --else() -- get_target_property(CEREAL_INCLUDE_DIRS cereal INTERFACE_INCLUDE_DIRECTORIES) --endif() -+find_package(cereal REQUIRED CONFIG) -+get_target_property(CEREAL_INCLUDE_DIRS cereal INTERFACE_INCLUDE_DIRECTORIES) - - # ============================================================================== - # Eigen -@@ -242,14 +202,8 @@ endif() - # - external if EIGEN_INCLUDE_DIR_HINTS is defined - # - internal if Eigen not found - # ============================================================================== --find_package(eigen3 QUIET) --if (NOT eigen3_FOUND) -- set(EIGEN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/eigen) -- set(OpenMVG_USE_INTERNAL_EIGEN ON) -- find_package(Eigen QUIET) --else() -- set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) --endif() -+find_package(Eigen3 REQUIRED) -+set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) - - # ============================================================================== - # Ceres -@@ -257,17 +211,7 @@ endif() - # - external by default if CERES_DIR_HINTS or find_package found a valid Ceres - # - internal if ceres not found (ceres-solver+cxsparse+miniglog) - # ============================================================================== --find_package(Ceres QUIET HINTS ${CERES_DIR_HINTS}) --if (NOT Ceres_FOUND) -- set(OpenMVG_USE_INTERNAL_CERES ON) -- set(CERES_INCLUDE_DIRS -- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/ceres-solver/include -- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/ceres-solver/internal/ceres/miniglog -- ${PROJECT_BINARY_DIR}/third_party/ceres-solver/config) -- FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ceres-solver/VERSION" CERES_CONFIG) -- STRING(REGEX REPLACE "version ([0-9.]+).*" "\\1" CERES_VERSION ${CERES_CONFIG}) -- set(CERES_LIBRARIES openMVG_ceres) --endif() -+find_package(Ceres REQUIRED) - - # ============================================================================== - # Flann -@@ -275,14 +219,7 @@ endif() - # - internal by default (flann), - # - external if FLANN_INCLUDE_DIR_HINTS and a valid Flann setup is found - # ============================================================================== --if (NOT DEFINED FLANN_INCLUDE_DIR_HINTS) -- set(FLANN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) -- set(OpenMVG_USE_INTERNAL_FLANN ON) --endif() --find_package(Flann QUIET) --if (NOT FLANN_FOUND OR OpenMVG_USE_INTERNAL_FLANN) -- set(FLANN_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) --endif() -+find_package(flann REQUIRED) - - # ============================================================================== - # CoinUtils -@@ -290,15 +227,7 @@ endif() - # - internal by default (CoinUtils), - # - external if COINUTILS_INCLUDE_DIR_HINTS and a valid CoinUtils setup is found - # ============================================================================== --if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS) -- set(COINUTILS_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/CoinUtils/src/) -- set(OpenMVG_USE_INTERNAL_COINUTILS ON) --endif() --find_package(CoinUtils QUIET) --if (NOT COINUTILS_FOUND OR OpenMVG_USE_INTERNAL_COINUTILS) -- set(COINUTILS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/CoinUtils/src/) -- set(COINUTILS_LIBRARY lib_CoinUtils) --endif() -+find_package(CoinUtils REQUIRED) - - ## ============================================================================== - ## Clp -@@ -306,17 +235,7 @@ endif() - ## - internal by default (Clp), - ## - external if CLP_INCLUDE_DIR_HINTS and a valid Clp setup is found - ## ============================================================================== --if (NOT DEFINED CLP_INCLUDE_DIR_HINTS) -- set(CLP_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/) -- set(OpenMVG_USE_INTERNAL_CLP ON) --endif() --find_package(Clp QUIET) --if (NOT CLP_FOUND OR OpenMVG_USE_INTERNAL_CLP) -- set(CLP_INCLUDE_DIRS -- ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/ -- ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/OsiClp/) -- set(CLP_LIBRARIES lib_clp lib_OsiClpSolver) --endif() -+find_package(Clp REQUIRED) - - # ============================================================================== - # Osi -@@ -324,15 +243,7 @@ endif() - # - internal by default (Osi), - # - external if OSI_INCLUDE_DIR_HINTS and a valid Osi setup is found - # ============================================================================== --if (NOT DEFINED OSI_INCLUDE_DIR_HINTS) -- set(OSI_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Osi/src/) -- set(OpenMVG_USE_INTERNAL_OSI ON) --endif() --find_package(Osi QUIET) --if (NOT OSI_FOUND OR OpenMVG_USE_INTERNAL_OSI) -- set(OSI_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Osi/src/Osi/) -- set(OSI_LIBRARY lib_Osi) --endif() -+find_package(Osi REQUIRED) - - # ============================================================================== - # Internal CLP/OSI/COINUTILS libraries: -@@ -351,17 +262,7 @@ endif() - # - internal by default (Lemon), - # - external if LEMON_INCLUDE_DIR_HINTS and a valid Lemon setup is found - # ============================================================================== --if (NOT DEFINED LEMON_INCLUDE_DIR_HINTS) -- set(LEMON_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lemon) -- set(OpenMVG_USE_INTERNAL_LEMON ON) --endif() --find_package(Lemon QUIET) --if (NOT LEMON_FOUND OR OpenMVG_USE_INTERNAL_LEMON) -- set(LEMON_INCLUDE_DIRS -- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lemon -- ${PROJECT_BINARY_DIR}/third_party/lemon) -- set(LEMON_LIBRARY openMVG_lemon) --endif() -+find_package(LEMON REQUIRED) - - # ============================================================================== - # OpenCV -@@ -369,14 +270,13 @@ endif() - # - only external and enabled only if OpenMVG_USE_OPENCV is set to ON - # ============================================================================== - if (OpenMVG_USE_OPENCV) -- find_package( OpenCV QUIET ) -- if (NOT OpenCV_FOUND OR OpenCV_VERSION VERSION_LESS "3.0.0") -- message(STATUS "OpenCV was not found (note that OpenCV version >= 3.0.0 is required). -> Disabling OpenCV support.") -- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENCV OFF) -- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OCVSIFT OFF) -- endif() -+ find_package( OpenCV REQUIRED ) - endif() - -+# ============================================================================== -+# Suitesparse -+# ============================================================================== -+find_package(suitesparse REQUIRED) - - # ============================================================================== - # Third-party libraries: -@@ -469,67 +369,67 @@ message("** Use OpenCV SIFT features: " ${OpenMVG_USE_OCVSIFT}) - - message("\n") - --if (DEFINED OpenMVG_USE_INTERNAL_CEREAL) -+if (OpenMVG_USE_INTERNAL_CEREAL) - message(STATUS "CEREAL: (internal)") - else() - message(STATUS "CEREAL: (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_EIGEN) -+if (OpenMVG_USE_INTERNAL_EIGEN) - message(STATUS "EIGEN: " ${EIGEN_VERSION} " (internal)") - else() - message(STATUS "EIGEN: " ${EIGEN_VERSION} " (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_CERES) -+if (OpenMVG_USE_INTERNAL_CERES) - message(STATUS "CERES: " ${CERES_VERSION} " (internal)") - else() - message(STATUS "CERES: " ${CERES_VERSION} " (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_FLANN) -+if (OpenMVG_USE_INTERNAL_FLANN) - message(STATUS "FLANN: " ${FLANN_VERSION} " (internal)") - else() - message(STATUS "FLANN: " ${FLANN_VERSION} " (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_TIFF) -+if (OpenMVG_USE_INTERNAL_TIFF) - message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (internal)") - else() - message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_PNG) -+if (OpenMVG_USE_INTERNAL_PNG) - message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (internal)") - else() - message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_JPEG) -+if (OpenMVG_USE_INTERNAL_JPEG) - message(STATUS "LIBJPEG (internal)") - else() - message(STATUS "LIBJPEG (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_CLP) -+if (OpenMVG_USE_INTERNAL_CLP) - message(STATUS "CLP: " ${CLP_VERSION} " (internal)") - else() - message(STATUS "CLP: " ${CLP_VERSION} " (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_COINUTILS) -+if (OpenMVG_USE_INTERNAL_COINUTILS) - message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (internal)") - else() - message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_OSI) -+if (OpenMVG_USE_INTERNAL_OSI) - message(STATUS "OSI: " ${OSI_VERSION} " (internal)") - else() - message(STATUS "OSI: " ${OSI_VERSION} " (external)") - endif() - --if (DEFINED OpenMVG_USE_INTERNAL_LEMON) -+if (OpenMVG_USE_INTERNAL_LEMON) - message(STATUS "LEMON: " ${LEMON_VERSION} " (internal)") - else() - message(STATUS "LEMON: " ${LEMON_VERSION} " (external)") -diff --git a/src/cmakeFindModules/FindClp.cmake b/src/cmakeFindModules/FindClp.cmake -index c997b87..74c3aae 100644 ---- a/src/cmakeFindModules/FindClp.cmake -+++ b/src/cmakeFindModules/FindClp.cmake -@@ -51,8 +51,8 @@ IF(EXISTS "${CLP_DIR}" AND NOT "${CLP_DIR}" STREQUAL "") - SET(CLP_INCLUDE_DIR ${CLP_DIR}) - - FIND_LIBRARY(CLP_LIBRARY NAMES Clp) -- FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver) -- FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp) -+ FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver Clp) -+ FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp Clp) - - # locate Clp libraries - IF(DEFINED CLP_LIBRARY AND DEFINED CLPSOLVER_LIBRARY AND DEFINED OSICLP_LIBRARY) -diff --git a/src/openMVG/linearProgramming/CMakeLists.txt b/src/openMVG/linearProgramming/CMakeLists.txt -index cc5212f..acc57dd 100644 ---- a/src/openMVG/linearProgramming/CMakeLists.txt -+++ b/src/openMVG/linearProgramming/CMakeLists.txt -@@ -15,16 +15,12 @@ target_link_libraries(openMVG_linearProgramming - PUBLIC - openMVG_numeric - PRIVATE -- ${CLP_LIBRARIES} # clp + solver wrapper -- ${COINUTILS_LIBRARY} # container tools -- ${OSI_LIBRARY} # generic LP -+ Coin::Clp # clp + solver wrapper -+ Coin::CoinUtils # container tools -+ Coin::Osi # generic LP - ) - - target_include_directories(openMVG_linearProgramming -- PRIVATE -- ${CLP_INCLUDE_DIRS} -- ${COINUTILS_INCLUDE_DIRS} -- ${OSI_INCLUDE_DIRS} - PUBLIC - $ - ) -diff --git a/src/openMVG/matching/CMakeLists.txt b/src/openMVG/matching/CMakeLists.txt -index 80b1fe6..a091b47 100644 ---- a/src/openMVG/matching/CMakeLists.txt -+++ b/src/openMVG/matching/CMakeLists.txt -@@ -18,6 +18,7 @@ list(REMOVE_ITEM matching_files_cpp ${REMOVEFILESUNITTEST}) - - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) -+find_package(flann REQUIRED) - - set_source_files_properties(${matching_files_cpp} PROPERTIES LANGUAGE CXX) - add_library(openMVG_matching -@@ -38,10 +39,10 @@ target_link_libraries(openMVG_matching - openMVG_features - Threads::Threads - ) --if (NOT DEFINED OpenMVG_USE_INTERNAL_FLANN) -+if (NOT OpenMVG_USE_INTERNAL_FLANN) - target_link_libraries(openMVG_matching - PUBLIC -- ${FLANN_LIBRARIES} -+ flann::flann - ) - endif() - set_target_properties(openMVG_matching PROPERTIES SOVERSION ${OPENMVG_VERSION_MAJOR} VERSION "${OPENMVG_VERSION_MAJOR}.${OPENMVG_VERSION_MINOR}") -diff --git a/src/third_party/CMakeLists.txt b/src/third_party/CMakeLists.txt -index 816a941..f0b7145 100644 ---- a/src/third_party/CMakeLists.txt -+++ b/src/third_party/CMakeLists.txt -@@ -18,7 +18,7 @@ add_subdirectory(stlplus3) - set(STLPLUS_LIBRARY openMVG_stlplus PARENT_SCOPE) - - # Add graph library --if(DEFINED OpenMVG_USE_INTERNAL_LEMON) -+if(OpenMVG_USE_INTERNAL_LEMON) - add_subdirectory(lemon) - set_property(TARGET openMVG_lemon PROPERTY FOLDER OpenMVG/3rdParty/lemon) - set_property(TARGET check PROPERTY FOLDER OpenMVG/3rdParty/lemon) -@@ -68,7 +68,7 @@ endif (NOT TIFF_FOUND) - add_subdirectory(vectorGraphics) - - # Add ceres-solver (A Nonlinear Least Squares Minimizer) --if (DEFINED OpenMVG_USE_INTERNAL_CERES) -+if (OpenMVG_USE_INTERNAL_CERES) - add_subdirectory(cxsparse) - add_subdirectory(ceres-solver) - set_property(TARGET openMVG_cxsparse PROPERTY FOLDER OpenMVG/3rdParty/ceres) -@@ -76,7 +76,7 @@ if (DEFINED OpenMVG_USE_INTERNAL_CERES) - endif() - - # Add an Approximate Nearest Neighbor library --if (DEFINED OpenMVG_USE_INTERNAL_FLANN) -+if (OpenMVG_USE_INTERNAL_FLANN) - set(FLANN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/flann/src/cpp) - add_subdirectory(flann) - endif() -@@ -90,7 +90,7 @@ add_subdirectory(fast) - ## - # Install Header only libraries if necessary - ## --if (DEFINED OpenMVG_USE_INTERNAL_EIGEN) -+if (OpenMVG_USE_INTERNAL_EIGEN) - #Configure Eigen install - set(EIGEN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/eigen) - add_subdirectory(eigen) diff --git a/ports/openmvg/portfile.cmake b/ports/openmvg/portfile.cmake index a5dea72fa0896c..b8301a3c90e29b 100644 --- a/ports/openmvg/portfile.cmake +++ b/ports/openmvg/portfile.cmake @@ -1,68 +1,67 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() +vcpkg_buildpath_length_warning(37) #the port produces some empty dlls when building shared libraries, since some components do not export anything, breaking the internal build itself vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +if("software" IN_LIST FEATURES AND VCPKG_CRT_LINKAGE STREQUAL static) + message(FATAL_ERROR "OpenMVG software currently cannot be built with static CRT linking. Please open an issue if you require this feature.") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO openMVG/openMVG - REF v1.4 - SHA512 949cf3680375c87b06db0f4713c846422c98d1979d49e9db65761f63f6f3212f0fcd8425f23c6112f04fbbb90b241638c2fd9329bb6b8b612c1d073aac55759a + REF 74deb33d12bf275a3b3a9afc833f4760be90f031 # v1.6 + SHA512 6e74effbc66f5d5e7c2d5edd7dacf3c0fa7eec1cb666244db8e4147c08d2e6faca98c1164ca1305a5013d247d479184742e5156232d4d8430615af31811e216e PATCHES - fixcmake.patch + build_fixes.patch ) -set(ENABLE_OPENCV OFF) -if("opencv" IN_LIST FEATURES) - set(ENABLE_OPENCV ON) -endif() - -set(ENABLE_OPENMP OFF) +set(OpenMVG_USE_OPENMP OFF) if("openmp" IN_LIST FEATURES) - set(ENABLE_OPENMP ON) + if(VCPKG_TARGET_IS_WINDOWS) + message(WARNING "OpenMP feature is broken on Windows, disabled until fixed https://github.com/openMVG/openMVG/issues/1765") + else() + set(OpenMVG_USE_OPENMP ON) + endif() endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + opencv OpenMVG_USE_OPENCV + opencv OpenMVG_USE_OCVSIFT + software OpenMVG_BUILD_SOFTWARES + software OpenMVG_BUILD_GUI_SOFTWARES +) + # remove some deps to prevent conflict -file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/ceres-solver) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/cxsparse) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/eigen) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/flann) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/jpeg) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/lemon) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/png) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/tiff) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/zlib) +file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/ceres-solver + ${SOURCE_PATH}/src/third_party/cxsparse + ${SOURCE_PATH}/src/third_party/eigen + ${SOURCE_PATH}/src/third_party/flann + ${SOURCE_PATH}/src/third_party/jpeg + ${SOURCE_PATH}/src/third_party/lemon + ${SOURCE_PATH}/src/third_party/png + ${SOURCE_PATH}/src/third_party/tiff + ${SOURCE_PATH}/src/third_party/zlib) # remove some cmake modules to force using our configs -file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindEigen.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindLemon.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindFlann.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindCoinUtils.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindClp.cmake) -file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindOsi.cmake) +file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindEigen.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindLemon.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindFlann.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindCoinUtils.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindClp.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindOsi.cmake) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/src PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} + -DOpenMVG_USE_OPENMP=${OpenMVG_USE_OPENMP} -DOpenMVG_BUILD_SHARED=OFF -DOpenMVG_BUILD_TESTS=OFF -DOpenMVG_BUILD_DOC=OFF -DOpenMVG_BUILD_EXAMPLES=OFF -DOpenMVG_BUILD_OPENGL_EXAMPLES=OFF - -DOpenMVG_BUILD_SOFTWARES=OFF - -DOpenMVG_BUILD_GUI_SOFTWARES=OFF -DOpenMVG_BUILD_COVERAGE=OFF - -DOpenMVG_USE_OPENMP=${ENABLE_OPENMP} - -DOpenMVG_USE_OPENCV=${ENABLE_OPENCV} - -DOpenMVG_USE_OCVSIFT=${ENABLE_OPENCV} -DOpenMVG_USE_INTERNAL_CLP=OFF -DOpenMVG_USE_INTERNAL_COINUTILS=OFF -DOpenMVG_USE_INTERNAL_OSI=OFF @@ -75,29 +74,102 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/openMVG/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -#remove extra deprecated cmake target files left in unappropriate folders -file(GLOB REMOVE_CMAKE ${CURRENT_PACKAGES_DIR}/lib/*.cmake) -file(REMOVE_RECURSE ${REMOVE_CMAKE}) -file(GLOB REMOVE_CMAKE ${CURRENT_PACKAGES_DIR}/debug/lib/*.cmake) -file(REMOVE_RECURSE ${REMOVE_CMAKE}) +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/openMVG/image/image_test) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/openMVG/exif/image_data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/openMVG/image/image_test + ${CURRENT_PACKAGES_DIR}/include/openMVG/exif/image_data + ${CURRENT_PACKAGES_DIR}/include/openMVG_dependencies/nonFree/sift/vl) if(OpenMVG_BUILD_SHARED) - # release - file(GLOB DLL_FILES ${CURRENT_PACKAGES_DIR}/lib/*.dll) - file(COPY ${DLL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${DLL_FILES}) - # debug - file(GLOB DLL_FILES ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) - file(COPY ${DLL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE_RECURSE ${DLL_FILES}) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # release + file(GLOB DLL_FILES ${CURRENT_PACKAGES_DIR}/lib/*.dll) + file(COPY ${DLL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${DLL_FILES}) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # debug + file(GLOB DLL_FILES ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) + file(COPY ${DLL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${DLL_FILES}) + endif() endif() vcpkg_copy_pdbs() +if("software" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_OSX) + vcpkg_copy_tools(TOOL_NAMES + openMVG_main_AlternativeVO.app + ui_openMVG_MatchesViewer.app + ) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/openMVG_main_AlternativeVO.app) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ui_openMVG_MatchesViewer.app) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/openMVG_main_AlternativeVO.app) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ui_openMVG_MatchesViewer.app) + else() + vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + openMVG_main_AlternativeVO + ui_openMVG_MatchesViewer + ) + endif() + vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + openMVG_main_ChangeLocalOrigin + openMVG_main_ColHarmonize + openMVG_main_ComputeClusters + openMVG_main_ComputeFeatures + openMVG_main_ComputeMatches + openMVG_main_ComputeSfM_DataColor + openMVG_main_ComputeStructureFromKnownPoses + openMVG_main_ConvertList + openMVG_main_ConvertSfM_DataFormat + openMVG_main_evalQuality + openMVG_main_ExportCameraFrustums + openMVG_main_exportKeypoints + openMVG_main_exportMatches + openMVG_main_exportTracks + openMVG_main_ExportUndistortedImages + openMVG_main_FrustumFiltering + openMVG_main_geodesy_registration_to_gps_position + openMVG_main_GlobalSfM + openMVG_main_IncrementalSfM + openMVG_main_IncrementalSfM2 + openMVG_main_ListMatchingPairs + openMVG_main_MatchesToTracks + openMVG_main_openMVG2Agisoft + openMVG_main_openMVG2CMPMVS + openMVG_main_openMVG2Colmap + openMVG_main_openMVG2MESHLAB + openMVG_main_openMVG2MVE2 + openMVG_main_openMVG2MVSTEXTURING + openMVG_main_openMVG2NVM + openMVG_main_openMVG2openMVS + openMVG_main_openMVG2PMVS + openMVG_main_openMVG2WebGL + openMVG_main_openMVGSpherical2Cubic + openMVG_main_PointsFiltering + openMVG_main_SfMInit_ImageListing + openMVG_main_SfMInit_ImageListingFromKnownPoses + openMVG_main_SfM_Localization + openMVG_main_SplitMatchFileIntoMatchFiles + ui_openMVG_control_points_registration + ) + if("opencv" IN_LIST FEATURES) + vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + openMVG_main_ComputeFeatures_OpenCV + ) + endif() + + file(COPY ${SOURCE_PATH}/src/openMVG/exif/sensor_width_database/sensor_width_camera_database.txt DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + set(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${CURRENT_INSTALLED_DIR}/tools/${PORT}) + set(OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY ${CURRENT_INSTALLED_DIR}/tools/${PORT}) + configure_file("${SOURCE_PATH}/src/software/SfM/tutorial_demo.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/tutorial_demo.py" @ONLY) + configure_file("${SOURCE_PATH}/src/software/SfM/SfM_GlobalPipeline.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/SfM_GlobalPipeline.py" @ONLY) + configure_file("${SOURCE_PATH}/src/software/SfM/SfM_SequentialPipeline.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/SfM_SequentialPipeline.py" @ONLY) + message(STATUS "To use tools, you need graphviz installed and manually added to path (to have neato executable)") +endif() + # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmvg RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openmvg/vcpkg.json b/ports/openmvg/vcpkg.json new file mode 100644 index 00000000000000..e766b9606bcb29 --- /dev/null +++ b/ports/openmvg/vcpkg.json @@ -0,0 +1,50 @@ +{ + "name": "openmvg", + "version-string": "1.6", + "port-version": 2, + "description": "open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.", + "dependencies": [ + "cereal", + { + "name": "ceres", + "features": [ + "cxsparse", + "suitesparse" + ] + }, + "clp", + "coinutils", + "eigen3", + "flann", + "libjpeg-turbo", + "liblemon", + "libpng", + "osi", + "tiff", + "vlfeat", + "zlib" + ], + "features": { + "opencv": { + "description": "opencv support for openmvg", + "dependencies": [ + { + "name": "opencv", + "features": [ + "contrib" + ] + } + ] + }, + "openmp": { + "description": "openmp support for openmvg" + }, + "software": { + "description": "build openMVG tools", + "dependencies": [ + "qt5-base", + "qt5-svg" + ] + } + } +} diff --git a/ports/openmvs/CONTROL b/ports/openmvs/CONTROL deleted file mode 100644 index 6cbbe4119e0d1a..00000000000000 --- a/ports/openmvs/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: openmvs -Version: 1.0-1 -Description: OpenMVS: open Multi-View Stereo reconstruction library -Build-Depends: zlib, boost-iostreams, boost-program-options, boost-system, boost-serialization, eigen3, ceres, opencv, cgal[core], glew, glfw3, vcglib diff --git a/ports/openmvs/fix-build.patch b/ports/openmvs/fix-build.patch new file mode 100644 index 00000000000000..54d50c25f2a087 --- /dev/null +++ b/ports/openmvs/fix-build.patch @@ -0,0 +1,449 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7966ed5..f34b5b4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -63,9 +63,10 @@ INCLUDE_DIRECTORIES("${OpenMVS_SOURCE_DIR}") + SET(OpenMVS_EXTRA_LIBS "") + if(OpenMVS_USE_OPENMP) + SET(OpenMP_LIBS "") +- FIND_PACKAGE(OpenMP) +- if(OPENMP_FOUND) +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") ++ FIND_PACKAGE(OpenMP REQUIRED) ++ if(OpenMP_FOUND) ++ link_libraries(OpenMP::OpenMP_CXX) ++ link_libraries(OpenMP::OpenMP_C) + ADD_DEFINITIONS(-D_USE_OPENMP) + SET(_USE_OPENMP TRUE) + #cmake only check for separate OpenMP library on AppleClang 7+ +@@ -83,7 +84,7 @@ if(OpenMVS_USE_OPENGL) + if(POLICY CMP0072) + cmake_policy(SET CMP0072 NEW) + endif() +- FIND_PACKAGE(OpenGL) ++ FIND_PACKAGE(OpenGL REQUIRED) + if(OPENGL_FOUND) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + ADD_DEFINITIONS(${OpenGL_DEFINITIONS} -D_USE_OPENGL) +@@ -94,7 +95,7 @@ if(OpenMVS_USE_OPENGL) + endif() + + if(OpenMVS_USE_CUDA) +- FIND_PACKAGE(CUDA) ++ FIND_PACKAGE(CUDA REQUIRED) + if(CUDA_FOUND) + INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS}) + ADD_DEFINITIONS(-D_USE_CUDA) +@@ -108,7 +109,7 @@ else() + endif() + + if(OpenMVS_USE_BREAKPAD) +- FIND_PACKAGE(BREAKPAD) ++ FIND_PACKAGE(BREAKPAD REQUIRED) + if(BREAKPAD_FOUND) + INCLUDE_DIRECTORIES(${BREAKPAD_INCLUDE_DIRS}) + ADD_DEFINITIONS(${BREAKPAD_DEFINITIONS} -D_USE_BREAKPAD) +@@ -119,7 +120,7 @@ if(OpenMVS_USE_BREAKPAD) + endif() + endif() + +-FIND_PACKAGE(Boost ${SYSTEM_PACKAGE_REQUIRED} COMPONENTS iostreams program_options system serialization) ++FIND_PACKAGE(Boost COMPONENTS iostreams program_options system serialization REQUIRED) + if(Boost_FOUND) + INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) + ADD_DEFINITIONS(${Boost_DEFINITIONS} -D_USE_BOOST) +@@ -127,14 +128,14 @@ if(Boost_FOUND) + SET(_USE_BOOST TRUE) + endif() + +-FIND_PACKAGE(Eigen ${SYSTEM_PACKAGE_REQUIRED}) +-if(EIGEN_FOUND) +- INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIRS}) +- ADD_DEFINITIONS(${EIGEN_DEFINITIONS} -D_USE_EIGEN) ++FIND_PACKAGE(Eigen3 REQUIRED) ++if(EIGEN3_FOUND) ++ INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIRS}) ++ ADD_DEFINITIONS(${EIGEN3_DEFINITIONS} -D_USE_EIGEN) + SET(_USE_EIGEN TRUE) + endif() + +-FIND_PACKAGE(OpenCV ${SYSTEM_PACKAGE_REQUIRED}) ++FIND_PACKAGE(OpenCV REQUIRED) + if(OpenCV_FOUND) + INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS}) + ADD_DEFINITIONS(${OpenCV_DEFINITIONS}) +@@ -170,7 +171,9 @@ ADD_DEFINITIONS(${OpenMVS_DEFINITIONS}) + + # Add modules + ADD_SUBDIRECTORY(libs) ++if(OpenMVS_BUILD_TOOLS) + ADD_SUBDIRECTORY(apps) ++endif() + ADD_SUBDIRECTORY(docs) + + if(OpenMVS_USE_CERES) +@@ -188,7 +191,7 @@ export(TARGETS Common IO Math MVS FILE "${PROJECT_BINARY_DIR}/OpenMVSTargets.cma + # Export the package for use from the build-tree + # (this registers the build-tree with a global CMake-registry) + export(PACKAGE OpenMVS) +- ++ + # Create the OpenMVSConfig.cmake and OpenMVSConfigVersion files + file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}") + # ... for the build tree +@@ -199,7 +202,7 @@ set(CONF_INCLUDE_DIRS "${INSTALL_CMAKE_DIR}/${REL_INCLUDE_DIR}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/OpenMVSConfig.cmake.in" "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMVSConfig.cmake" @ONLY) + # ... for both + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/OpenMVSConfigVersion.cmake.in" "${PROJECT_BINARY_DIR}/OpenMVSConfigVersion.cmake" @ONLY) +- ++ + # Install the OpenMVSConfig.cmake and OpenMVSConfigVersion.cmake + install(FILES + "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMVSConfig.cmake" +diff --git a/MvgMvsPipeline.py b/MvgMvsPipeline.py.in +similarity index 97% +rename from MvgMvsPipeline.py +rename to MvgMvsPipeline.py.in +index f4914bf..23d03e6 100644 +--- a/MvgMvsPipeline.py ++++ b/MvgMvsPipeline.py.in +@@ -91,12 +91,12 @@ def find(afile): + return None + + # Try to find openMVG and openMVS binaries in PATH +-OPENMVG_BIN = whereis("openMVG_main_SfMInit_ImageListing") +-OPENMVS_BIN = whereis("ReconstructMesh") ++OPENMVG_BIN = "@OPENMVG_TOOLS_PATH@" ++OPENMVS_BIN = "@OPENMVS_TOOLS_PATH@" + + # Try to find openMVG camera sensor database +-CAMERA_SENSOR_DB_FILE = "sensor_width_camera_database.txt" +-CAMERA_SENSOR_DB_DIRECTORY = find(CAMERA_SENSOR_DB_FILE) ++CAMERA_SENSOR_DB_FILE = "@SENSOR_WIDTH_CAMERA_DATABASE_TXT_PATH@" ++CAMERA_SENSOR_DB_DIRECTORY = "@OPENMVG_TOOLS_PATH@" + + # Ask user for openMVG and openMVS directories if not found + if not OPENMVG_BIN: +@@ -175,10 +175,10 @@ class StepsStore: + ["-i", "%input_dir%", "-o", "%matches_dir%", "-d", "%camera_file_params%"]], + ["Compute features", # 1 + os.path.join(OPENMVG_BIN, "openMVG_main_ComputeFeatures"), +- ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-m", "SIFT", "-n", "4"]], ++ ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-m", "SIFT"]], + ["Compute matches", # 2 + os.path.join(OPENMVG_BIN, "openMVG_main_ComputeMatches"), +- ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-n", "HNSWL2", "-r", ".8"]], ++ ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-n", "AUTO", "-r", ".8"]], + ["Incremental reconstruction", # 3 + os.path.join(OPENMVG_BIN, "openMVG_main_IncrementalSfM"), + ["-i", "%matches_dir%/sfm_data.json", "-m", "%matches_dir%", "-o", "%reconstruction_dir%"]], +diff --git a/apps/Viewer/CMakeLists.txt b/apps/Viewer/CMakeLists.txt +index c519040..934cd50 100644 +--- a/apps/Viewer/CMakeLists.txt ++++ b/apps/Viewer/CMakeLists.txt +@@ -16,18 +16,6 @@ else() + MESSAGE("-- Can't find GLEW. Continuing without it.") + RETURN() + endif() +-if(CMAKE_COMPILER_IS_GNUCXX) +- FIND_PACKAGE(PkgConfig QUIET) +- pkg_search_module(GLFW QUIET glfw3) +- if(GLFW_FOUND) +- INCLUDE_DIRECTORIES(${GLFW_INCLUDE_DIRS}) +- ADD_DEFINITIONS(${GLFW_DEFINITIONS}) +- MESSAGE(STATUS "GLFW3 ${GLFW_VERSION} found (include: ${GLFW_INCLUDE_DIRS})") +- else() +- MESSAGE("-- Can't find GLFW3. Continuing without it.") +- RETURN() +- endif() +-else() + FIND_PACKAGE(glfw3 QUIET) + if(glfw3_FOUND) + INCLUDE_DIRECTORIES(${glfw3_INCLUDE_DIRS}) +@@ -37,7 +25,6 @@ else() + MESSAGE("-- Can't find GLFW3. Continuing without it.") + RETURN() + endif() +-endif() + + # List sources files + FILE(GLOB PCH_C "Common.cpp") +diff --git a/build/OpenMVSConfig.cmake.in b/build/OpenMVSConfig.cmake.in +index 96b8fe2..fa6d4a6 100644 +--- a/build/OpenMVSConfig.cmake.in ++++ b/build/OpenMVSConfig.cmake.in +@@ -3,16 +3,71 @@ + # OpenMVS_INCLUDE_DIRS - include directories for OpenMVS + # OpenMVS_LIBRARIES - libraries to link against + # OpenMVS_BINARIES - the binaries +- ++ + # Compute paths + get_filename_component(OpenMVS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + set(OpenMVS_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") +- ++list(APPEND CMAKE_MODULE_PATH "${OpenMVS_CMAKE_DIR}") ++ ++if (MSVC) ++ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL") ++ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL") ++ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG") ++ set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG") ++endif() ++ ++set(CMAKE_CXX_STANDARD 14) ++set(CMAKE_CXX_STANDARD_REQUIRED ON) ++ ++include(CMakeFindDependencyMacro) ++ ++if(@OpenMVS_USE_OPENMP@) ++ find_dependency(OpenMP) ++ add_definitions(-D_USE_OPENMP) ++endif() ++ ++if(@OpenMVS_USE_OPENGL@) ++ find_dependency(OpenGL) ++ add_definitions(${OpenGL_DEFINITIONS} -D_USE_OPENGL) ++endif() ++ ++if(@OpenMVS_USE_CUDA@) ++ find_dependency(CUDA) ++ add_definitions(-D_USE_CUDA) ++ include_directories(${CUDA_INCLUDE_DIRS}) ++endif() ++ ++if(@OpenMVS_USE_BREAKPAD@) ++ find_dependency(BREAKPAD) ++ add_definitions(${BREAKPAD_DEFINITIONS} -D_USE_BREAKPAD) ++endif() ++ ++find_dependency(Boost) ++add_definitions(${Boost_DEFINITIONS} -D_USE_BOOST) ++include_directories(${Boost_INCLUDE_DIRS}) ++find_dependency(Eigen3) ++add_definitions(${EIGEN3_DEFINITIONS} -D_USE_EIGEN) ++include_directories(${EIGEN3_INCLUDE_DIRS}) ++find_dependency(OpenCV) ++add_definitions(${OpenCV_DEFINITIONS}) ++find_dependency(CGAL) ++add_definitions(${CGAL_DEFINITIONS}) ++ ++find_dependency(VCG REQUIRED) ++add_definitions(${VCG_DEFINITIONS}) ++ ++if(@OpenMVS_USE_CERES@) ++ find_dependency(Ceres) ++ add_definitions(${CERES_DEFINITIONS}) ++endif() ++ ++add_definitions(@OpenMVS_DEFINITIONS@) ++ + # Our library dependencies (contains definitions for IMPORTED targets) + if(NOT TARGET MVS AND NOT OpenMVS_BINARY_DIR) + include("${OpenMVS_CMAKE_DIR}/OpenMVSTargets.cmake") + endif() +- ++ + # These are IMPORTED targets created by OpenMVSTargets.cmake + set(OpenMVS_LIBRARIES MVS) + set(OpenMVS_BINARIES InterfaceVisualSFM DensifyPointCloud ReconstructMesh RefineMesh TextureMesh) +diff --git a/build/Utils.cmake b/build/Utils.cmake +index f41c9d8..31cd292 100644 +--- a/build/Utils.cmake ++++ b/build/Utils.cmake +@@ -160,7 +160,7 @@ macro(GetOperatingSystemArchitectureBitness) + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES i686.*|i386.*|x86.*) + set(X86 1) + endif() +- ++ + if(NOT ${MY_VAR_PREFIX}_PACKAGE_REQUIRED) + set(${MY_VAR_PREFIX}_PACKAGE_REQUIRED "REQUIRED") + endif() +@@ -173,30 +173,6 @@ macro(ComposePackageLibSuffix) + set(PACKAGE_LIB_SUFFIX "") + set(PACKAGE_LIB_SUFFIX_DBG "") + set(PACKAGE_LIB_SUFFIX_REL "") +- if(MSVC) +- if("${MSVC_VERSION}" STREQUAL "1921") +- set(PACKAGE_LIB_SUFFIX "/vc16") +- elseif("${MSVC_VERSION}" STREQUAL "1916") +- set(PACKAGE_LIB_SUFFIX "/vc15") +- elseif("${MSVC_VERSION}" STREQUAL "1900") +- set(PACKAGE_LIB_SUFFIX "/vc14") +- elseif("${MSVC_VERSION}" STREQUAL "1800") +- set(PACKAGE_LIB_SUFFIX "/vc12") +- elseif("${MSVC_VERSION}" STREQUAL "1700") +- set(PACKAGE_LIB_SUFFIX "/vc11") +- elseif("${MSVC_VERSION}" STREQUAL "1600") +- set(PACKAGE_LIB_SUFFIX "/vc10") +- elseif("${MSVC_VERSION}" STREQUAL "1500") +- set(PACKAGE_LIB_SUFFIX "/vc9") +- endif() +- if("${SYSTEM_BITNESS}" STREQUAL "64") +- set(PACKAGE_LIB_SUFFIX "${PACKAGE_LIB_SUFFIX}/x64") +- else() +- set(PACKAGE_LIB_SUFFIX "${PACKAGE_LIB_SUFFIX}/x86") +- endif() +- set(PACKAGE_LIB_SUFFIX_DBG "${PACKAGE_LIB_SUFFIX}/Debug") +- set(PACKAGE_LIB_SUFFIX_REL "${PACKAGE_LIB_SUFFIX}/Release") +- endif() + endmacro() + + +@@ -511,7 +487,7 @@ macro(optimize_default_compiler_settings) + endif() + add_extra_compiler_option(-fdiagnostics-show-option) + add_extra_compiler_option(-ftemplate-backtrace-limit=0) +- ++ + # The -Wno-long-long is required in 64bit systems when including sytem headers. + if(X86_64) + add_extra_compiler_option(-Wno-long-long) +@@ -817,7 +793,7 @@ macro(ConfigCompilerAndLinker) + else() + set(cxx_rtti_support "${cxx_no_rtti_flags}") + endif() +- ++ + SET(cxx_default "${cxx_exception_support} ${cxx_rtti_support}" CACHE PATH "Common compile CXX flags") + SET(c_default "${CMAKE_C_FLAGS} ${cxx_base_flags}" CACHE PATH "Common compile C flags") + endmacro() +@@ -825,16 +801,12 @@ endmacro() + # Initialize variables needed for a library type project. + macro(ConfigLibrary) + # Offer the user the choice of overriding the installation directories +- set(INSTALL_LIB_DIR "lib/${PROJECT_NAME}" CACHE PATH "Installation directory for libraries") +- set(INSTALL_BIN_DIR "bin/${PROJECT_NAME}" CACHE PATH "Installation directory for executables") +- set(INSTALL_INCLUDE_DIR "include/${PROJECT_NAME}" CACHE PATH "Installation directory for header files") +- if(WIN32 AND NOT CYGWIN) +- set(DEF_INSTALL_CMAKE_DIR "CMake") +- else() +- set(DEF_INSTALL_CMAKE_DIR "lib/CMake/${PROJECT_NAME}") +- endif() ++ set(INSTALL_LIB_DIR "lib" CACHE PATH "Installation directory for libraries") ++ set(INSTALL_BIN_DIR "bin" CACHE PATH "Installation directory for executables") ++ set(INSTALL_INCLUDE_DIR "include/openmvs" CACHE PATH "Installation directory for header files") ++ set(DEF_INSTALL_CMAKE_DIR "share/openmvs") + set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files") +- ++ + # Make relative paths absolute (needed later on) + foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) +diff --git a/libs/Common/CMakeLists.txt b/libs/Common/CMakeLists.txt +index 2e6c1a4..6e1fa95 100644 +--- a/libs/Common/CMakeLists.txt ++++ b/libs/Common/CMakeLists.txt +@@ -18,6 +18,7 @@ set_target_pch(Common Common.h) + + # Link its dependencies + TARGET_LINK_LIBRARIES(Common ${Boost_LIBRARIES} ${OpenCV_LIBS}) ++TARGET_INCLUDE_DIRECTORIES(Common PUBLIC $ $) + + # Install + SET_TARGET_PROPERTIES(Common PROPERTIES +diff --git a/libs/Common/Strings.h b/libs/Common/MVSStrings.h +similarity index 100% +rename from libs/Common/Strings.h +rename to libs/Common/MVSStrings.h +diff --git a/libs/Common/Types.h b/libs/Common/Types.h +index bcac65c..9abeefb 100644 +--- a/libs/Common/Types.h ++++ b/libs/Common/Types.h +@@ -378,7 +378,7 @@ typedef TAliasCast CastD2I; + + // I N C L U D E S ///////////////////////////////////////////////// + +-#include "Strings.h" ++#include "MVSStrings.h" + #include "AutoPtr.h" + #include "List.h" + #include "Thread.h" +@@ -2558,7 +2558,7 @@ public: + + /// creates an SO3 as a rotation that takes Vector a into the direction of Vector b + /// with the rotation axis along a ^ b. If |a ^ b| == 0, it creates the identity rotation. +- /// An assertion will fail if Vector a and Vector b are in exactly opposite directions. ++ /// An assertion will fail if Vector a and Vector b are in exactly opposite directions. + /// @param a source Vector + /// @param b target Vector + SO3(const Vec3& a, const Vec3& b) { +@@ -2604,7 +2604,7 @@ public: + mat.row(2) -= mat.row(1) * d12; + mat.row(2).normalize(); + // check for positive determinant <=> right handed coordinate system of row vectors +- ASSERT(mat.row(0).cross(mat.row(1)).dot(mat.row(2)) > 0); ++ ASSERT(mat.row(0).cross(mat.row(1)).dot(mat.row(2)) > 0); + } + + /// Exponentiate a vector in the Lie algebra to generate a new SO3. +diff --git a/libs/IO/CMakeLists.txt b/libs/IO/CMakeLists.txt +index a354376..4fd478c 100644 +--- a/libs/IO/CMakeLists.txt ++++ b/libs/IO/CMakeLists.txt +@@ -43,7 +43,8 @@ cxx_library_with_type_no_pch(IO "Libs" "STATIC" "${cxx_default}" + set_target_pch(IO Common.h) + + # Link its dependencies +-TARGET_LINK_LIBRARIES(IO Common ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${EXIV2_LIBS}) ++TARGET_LINK_LIBRARIES(IO Common ${TIFF_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${EXIV2_LIBS}) ++TARGET_INCLUDE_DIRECTORIES(IO PUBLIC $ $) + + # Install + SET_TARGET_PROPERTIES(IO PROPERTIES +diff --git a/libs/MVS/CMakeLists.txt b/libs/MVS/CMakeLists.txt +index 14be620..867cfd5 100644 +--- a/libs/MVS/CMakeLists.txt ++++ b/libs/MVS/CMakeLists.txt +@@ -1,12 +1,12 @@ + # Find required packages +-FIND_PACKAGE(CGAL ${SYSTEM_PACKAGE_REQUIRED}) ++FIND_PACKAGE(CGAL REQUIRED) + if(CGAL_FOUND) + include_directories(${CGAL_INCLUDE_DIRS}) + add_definitions(${CGAL_DEFINITIONS}) + link_directories(${CGAL_LIBRARY_DIRS}) + endif() + +-FIND_PACKAGE(VCG ${SYSTEM_PACKAGE_REQUIRED}) ++FIND_PACKAGE(VCG REQUIRED) + if(VCG_FOUND) + include_directories(${VCG_INCLUDE_DIRS}) + add_definitions(${VCG_DEFINITIONS}) +@@ -14,12 +14,10 @@ endif() + + set(CERES_LIBS "") + if(OpenMVS_USE_CERES) +- FIND_PACKAGE(CERES) ++ FIND_PACKAGE(Ceres REQUIRED) + if(CERES_FOUND) + include_directories(${CERES_INCLUDE_DIRS}) + add_definitions(${CERES_DEFINITIONS}) +- else() +- set(OpenMVS_USE_CERES OFF) + endif() + endif() + +@@ -42,7 +40,8 @@ cxx_library_with_type_no_pch(MVS "Libs" "" "${cxx_default}" + set_target_pch(MVS Common.h) + + # Link its dependencies +-TARGET_LINK_LIBRARIES(MVS PRIVATE Common Math IO ${CERES_LIBS} ${CGAL_LIBS} ${CUDA_CUDA_LIBRARY}) ++TARGET_LINK_LIBRARIES(MVS PRIVATE Common Math IO ${CERES_LIBS} CGAL::CGAL ${CUDA_CUDA_LIBRARY}) ++TARGET_INCLUDE_DIRECTORIES(MVS PUBLIC $ $) + + # Install + SET_TARGET_PROPERTIES(MVS PROPERTIES +diff --git a/libs/Math/CMakeLists.txt b/libs/Math/CMakeLists.txt +index d592bd0..f1fe4c6 100644 +--- a/libs/Math/CMakeLists.txt ++++ b/libs/Math/CMakeLists.txt +@@ -35,6 +35,7 @@ set_target_pch(Math Common.h) + + # Link its dependencies + TARGET_LINK_LIBRARIES(Math Common) ++TARGET_INCLUDE_DIRECTORIES(Math PUBLIC $ $) + + # Install + INSTALL(FILES ${LIBRARY_FILES_H} DESTINATION "${INSTALL_INCLUDE_DIR}/Math" COMPONENT dev) diff --git a/ports/openmvs/glfw3_target_compat.patch b/ports/openmvs/glfw3_target_compat.patch deleted file mode 100644 index 85cbb549065ee1..00000000000000 --- a/ports/openmvs/glfw3_target_compat.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/apps/Viewer/CMakeLists.txt b/apps/Viewer/CMakeLists.txt -index f1690a6..78466cd 100644 ---- a/apps/Viewer/CMakeLists.txt -+++ b/apps/Viewer/CMakeLists.txt -@@ -16,28 +16,7 @@ else() - MESSAGE("-- Can't find GLEW. Continuing without it.") - RETURN() - endif() --if(CMAKE_COMPILER_IS_GNUCXX) -- FIND_PACKAGE(PkgConfig QUIET) -- pkg_search_module(GLFW QUIET glfw3) -- if(GLFW_FOUND) -- INCLUDE_DIRECTORIES(${GLFW_INCLUDE_DIRS}) -- ADD_DEFINITIONS(${GLFW_DEFINITIONS}) -- MESSAGE(STATUS "GLFW3 ${GLFW_VERSION} found (include: ${GLFW_INCLUDE_DIRS})") -- else() -- MESSAGE("-- Can't find GLFW3. Continuing without it.") -- RETURN() -- endif() --else() -- FIND_PACKAGE(glfw3 QUIET) -- if(glfw3_FOUND) -- INCLUDE_DIRECTORIES(${glfw3_INCLUDE_DIRS}) -- ADD_DEFINITIONS(${glfw3_DEFINITIONS}) -- MESSAGE(STATUS "GLFW3 ${glfw3_VERSION} found (include: ${glfw3_INCLUDE_DIRS})") -- else() -- MESSAGE("-- Can't find GLFW3. Continuing without it.") -- RETURN() -- endif() --endif() -+FIND_PACKAGE(glfw3 REQUIRED) - - # List sources files - FILE(GLOB PCH_C "Common.cpp") -@@ -54,7 +33,7 @@ FILE(GLOB LIBRARY_FILES_H "*.h" "*.inl") - LIST(REMOVE_ITEM LIBRARY_FILES_C ${PCH_C}) - SET(LIBRARY_FILES_C "${PCH_C};${LIBRARY_FILES_C}") - --cxx_executable_with_flags_no_pch(${VIEWER_NAME} "Apps" "${cxx_default}" "MVS;${OPENGL_LIBRARIES};${GLEW_LIBRARY};${GLFW_STATIC_LIBRARIES};GLEW::GLEW;${glfw3_LIBRARY};${GLFW3_LIBRARY};glfw" ${LIBRARY_FILES_C} ${LIBRARY_FILES_H}) -+cxx_executable_with_flags_no_pch(${VIEWER_NAME} "Apps" "${cxx_default}" "MVS;${OPENGL_LIBRARIES};${GLEW_LIBRARY};GLEW::GLEW;glfw" ${LIBRARY_FILES_C} ${LIBRARY_FILES_H}) - - # Manually set Common.h as the precompiled header - set_target_pch(${VIEWER_NAME} Common.h) diff --git a/ports/openmvs/portfile.cmake b/ports/openmvs/portfile.cmake index 97f78938331b5f..2ec1bd0944171d 100644 --- a/ports/openmvs/portfile.cmake +++ b/ports/openmvs/portfile.cmake @@ -1,68 +1,71 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cdcseacave/openMVS - REF v1.0 - SHA512 d5743660286068d2ec9e80b8cfdf1dd612d76f12f1f10c95d32bab55ae65032a200d820f2c76e4781068c61597e2533df8755fd5d9076d3aac9223134eb5b561 + REF v1.1 + SHA512 baa9149853dc08c602deeb1a04cf57643d1cb0733aee2776f4e99b210279aad3b4a1013ab1d790e91a3a95b7c72b9c12c6be25f2c30a76b69b5319b610cb8e7a HEAD_REF master PATCHES - glfw3_target_compat.patch + fix-build.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + cuda OpenMVS_USE_CUDA + openmp OpenMVS_USE_OPENMP ) +file(REMOVE "${SOURCE_PATH}/build/Modules/FindCERES.cmake") +file(REMOVE "${SOURCE_PATH}/build/Modules/FindCGAL.cmake") +file(REMOVE "${SOURCE_PATH}/build/Modules/FindEIGEN.cmake") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DOpenMVS_USE_NONFREE=ON + -DOpenMVS_USE_CERES=OFF + -DOpenMVS_USE_FAST_FLOAT2INT=ON + -DOpenMVS_USE_FAST_INVSQRT=OFF + -DOpenMVS_USE_FAST_CBRT=ON + -DOpenMVS_USE_SSE=ON + -DOpenMVS_USE_OPENGL=ON + -DOpenMVS_USE_BREAKPAD=OFF + OPTIONS_RELEASE + -DOpenMVS_BUILD_TOOLS=ON + OPTIONS_DEBUG + -DOpenMVS_BUILD_TOOLS=OFF ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) -else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/CMake/OpenMVS) -endif() - -#somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it -if(CMAKE_HOST_WIN32) -set(EXECUTABLE_SUFFIX ".exe") -else() -set(EXECUTABLE_SUFFIX "") -endif() +vcpkg_fixup_cmake_targets() +file(READ ${CURRENT_PACKAGES_DIR}/share/openmvs/OpenMVSTargets-release.cmake TARGETS_CMAKE) +string(REPLACE "bin/InterfaceCOLMAP" "tools/openmvs/InterfaceCOLMAP" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/InterfaceVisualSFM" "tools/openmvs/InterfaceVisualSFM" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/DensifyPointCloud" "tools/openmvs/DensifyPointCloud" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/ReconstructMesh" "tools/openmvs/ReconstructMesh" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/RefineMesh" "tools/openmvs/RefineMesh" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/TextureMesh" "tools/openmvs/TextureMesh" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/Viewer" "tools/openmvs/Viewer" TARGETS_CMAKE "${TARGETS_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/openmvs/OpenMVSTargets-release.cmake "${TARGETS_CMAKE}") -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/DensifyPointCloud${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/InterfaceCOLMAP${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/InterfaceVisualSFM${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/ReconstructMesh${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/RefineMesh${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/TextureMesh${EXECUTABLE_SUFFIX}) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openmvs/) -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/DensifyPointCloud${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/DensifyPointCloud${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/DensifyPointCloud${EXECUTABLE_SUFFIX}) -endif() -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceCOLMAP${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceCOLMAP${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/InterfaceCOLMAP${EXECUTABLE_SUFFIX}) -endif() -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceVisualSFM${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceVisualSFM${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/InterfaceVisualSFM${EXECUTABLE_SUFFIX}) -endif() -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/ReconstructMesh${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/ReconstructMesh${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/ReconstructMesh${EXECUTABLE_SUFFIX}) -endif() -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/RefineMesh${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/RefineMesh${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/RefineMesh${EXECUTABLE_SUFFIX}) -endif() -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/TextureMesh${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/TextureMesh${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/TextureMesh${EXECUTABLE_SUFFIX}) -endif() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openmvs) +vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + DensifyPointCloud + InterfaceCOLMAP + InterfaceVisualSFM + ReconstructMesh + RefineMesh + TextureMesh + Viewer +) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() +set(OPENMVG_TOOLS_PATH "${CURRENT_INSTALLED_DIR}/tools/openmvg") +set(OPENMVS_TOOLS_PATH "${CURRENT_INSTALLED_DIR}/tools/${PORT}") +set(SENSOR_WIDTH_CAMERA_DATABASE_TXT_PATH "${OPENMVG_TOOLS_PATH}/sensor_width_camera_database.txt") +configure_file("${SOURCE_PATH}/MvgMvsPipeline.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/MvgMvsPipeline.py" @ONLY) +file(INSTALL "${SOURCE_PATH}/build/Modules/FindVCG.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmvs RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openmvs/vcpkg.json b/ports/openmvs/vcpkg.json new file mode 100644 index 00000000000000..74df96ee51e340 --- /dev/null +++ b/ports/openmvs/vcpkg.json @@ -0,0 +1,43 @@ +{ + "name": "openmvs", + "version-string": "1.1", + "port-version": 5, + "description": "OpenMVS: open Multi-View Stereo reconstruction library", + "homepage": "https://cdcseacave.github.io/openMVS", + "dependencies": [ + "boost-iostreams", + "boost-program-options", + "boost-serialization", + "boost-system", + { + "name": "cgal", + "default-features": false + }, + "eigen3", + "glew", + "glfw3", + "libpng", + "opencv", + { + "name": "openmvg", + "features": [ + "software" + ], + "platform": "!(windows & static)" + }, + "tiff", + "vcglib", + "zlib" + ], + "features": { + "cuda": { + "description": "cuda support for openmvs", + "dependencies": [ + "cuda" + ] + }, + "openmp": { + "description": "openmp support for openmvs" + } + } +} diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL deleted file mode 100644 index 9dca0b47a6710b..00000000000000 --- a/ports/openni2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: openni2 -Version: 2.2.0.33-9 -Build-Depends: kinectsdk1 -Homepage: https://github.com/OpenNI/OpenNI2 -Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera. diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake index d5be0e3d4b01d8..0864fda611b2ff 100644 --- a/ports/openni2/portfile.cmake +++ b/ports/openni2/portfile.cmake @@ -1,8 +1,13 @@ -include(vcpkg_common_functions) if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "Error: UWP builds are currently not supported.") endif() +find_path(COR_H_PATH cor.h) +if(COR_H_PATH MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find . Ensure the NETFXSDK is installed.") +endif() +get_filename_component(NETFXSDK_PATH "${COR_H_PATH}/../.." ABSOLUTE) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) vcpkg_from_github( @@ -11,22 +16,14 @@ vcpkg_from_github( REF 2.2-beta2 SHA512 60a3a3043679f3069aea869e92dc5881328ce4393d4140ea8d089027321ac501ae27d283657214e2834d216d0d49bf4f29a4b3d3e43df27a6ed21f889cd0083f HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/upgrade_projects.patch" - "${CMAKE_CURRENT_LIST_DIR}/inherit_from_parent_or_project_defaults.patch" - "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch" + PATCHES upgrade_projects.patch + inherit_from_parent_or_project_defaults.patch + replace_environment_variable.patch ) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -get_filename_component(SOURCE_DIR_NAME "${SOURCE_PATH}" NAME) - -# Use fresh copy of sources for building and modification -set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${SOURCE_DIR_NAME}") file(TO_NATIVE_PATH ${CURRENT_INSTALLED_DIR} NATIVE_INSTALLED_DIR) configure_file("${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" "${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" @ONLY) @@ -34,6 +31,7 @@ configure_file("${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" "${SOURCE_P # Build OpenNI2 vcpkg_build_msbuild( PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln" + OPTIONS "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" ) # Install OpenNI2 diff --git a/ports/openni2/vcpkg.json b/ports/openni2/vcpkg.json new file mode 100644 index 00000000000000..6cb6c7c367fe78 --- /dev/null +++ b/ports/openni2/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "openni2", + "version-string": "2.2.0.33", + "port-version": 12, + "description": "OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera.", + "homepage": "https://github.com/OpenNI/OpenNI2", + "supports": "!uwp", + "dependencies": [ + "kinectsdk1" + ] +} diff --git a/ports/openscap/fix-build.patch b/ports/openscap/fix-build.patch new file mode 100644 index 00000000000000..57d22946b698ef --- /dev/null +++ b/ports/openscap/fix-build.patch @@ -0,0 +1,121 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4de5b57..5f483a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,15 +140,25 @@ find_package(SWIG) + find_package(LibXml2 REQUIRED) + find_package(LibXslt REQUIRED) + find_package(BZip2) ++find_package(OpenSSL REQUIRED) ++find_package(ZLIB REQUIRED) + + # PThread +-set(CMAKE_THREAD_PREFER_PTHREAD) +-set(THREADS_PREFER_PTHREAD_FLAG) +-set(THREADS_USE_PTHREADS_WIN32 true) +-find_package(Threads REQUIRED) +-check_library_exists(pthread pthread_timedjoin_np "" HAVE_PTHREAD_TIMEDJOIN_NP) +-check_library_exists(pthread pthread_setname_np "" HAVE_PTHREAD_SETNAME_NP) +-check_library_exists(pthread pthread_getname_np "" HAVE_PTHREAD_GETNAME_NP) ++if (WIN32) ++ set(CMAKE_THREAD_PREFER_PTHREAD) ++ set(THREADS_PREFER_PTHREAD_FLAG) ++ set(THREADS_USE_PTHREADS_WIN32 true) ++ find_package(pthread CONFIG REQUIRED) ++ set(CMAKE_THREAD_LIBS_INIT ${PThreads4W_LIBRARY}) ++ check_library_exists(pthread pthread_timedjoin_np "" HAVE_PTHREAD_TIMEDJOIN_NP) ++ check_library_exists(pthread pthread_setname_np "" HAVE_PTHREAD_SETNAME_NP) ++ check_library_exists(pthread pthread_getname_np "" HAVE_PTHREAD_GETNAME_NP) ++else() ++ set(THREADS_USE_PTHREADS_WIN32 -pthread) ++endif() ++ ++# OpenSSL ++link_libraries(OpenSSL::SSL OpenSSL::Crypto) + + # WITH_CRYPTO + set(WITH_CRYPTO "gcrypt" CACHE STRING "gcrypt|nss3") +@@ -373,19 +383,9 @@ message(STATUS "asciidoc: ${ASCIIDOC_EXECUTABLE}") + + # ---------- PATHS + +-if(WIN32) +- # Windows installer does not allow full paths. +- # The install path can be changed by user in Windows installer. +- # We will use relative names - "schemas", "xsl" and "cpe" +- # directories will be located in the same directory as oscap.exe. +- set(OSCAP_DEFAULT_SCHEMA_PATH "schemas") +- set(OSCAP_DEFAULT_XSLT_PATH "xsl") +- set(OSCAP_DEFAULT_CPE_PATH "cpe") +-else() +- set(OSCAP_DEFAULT_SCHEMA_PATH "${CMAKE_INSTALL_FULL_DATADIR}/openscap/schemas") +- set(OSCAP_DEFAULT_XSLT_PATH "${CMAKE_INSTALL_FULL_DATADIR}/openscap/xsl") +- set(OSCAP_DEFAULT_CPE_PATH "${CMAKE_INSTALL_FULL_DATADIR}/openscap/cpe") +-endif() ++set(OSCAP_DEFAULT_SCHEMA_PATH share/openscap/schemas) ++set(OSCAP_DEFAULT_XSLT_PATH share/openscap/xsl) ++set(OSCAP_DEFAULT_CPE_PATH share/openscap/cpe) + set(OSCAP_TEMP_DIR "/tmp" CACHE STRING "use different temporary directory to execute sce scripts (default=/tmp)") + + # ---------- RPATHS for linking +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index 2a3f373..781d05a 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -6,27 +6,32 @@ if(ENABLE_OSCAP_UTIL) + add_executable(oscap ${UTILS_SOURCES}) + target_link_libraries(oscap openscap) + if(WIN32) +- set(OSCAP_UTIL_DESTINATION ".") ++ find_path(GETOPT_INCLUDE_DIR getopt.h) ++ include(SelectLibraryConfigurations) ++ find_library(GETOPT_LIBRARY_RELEASE NAMES getopt) ++ find_library(GETOPT_LIBRARY_DEBUG NAMES getopt PATH_SUFFIXES debug/lib) ++ select_library_configurations(GETOPT) ++ ++ message("GETOPT_INCLUDE_DIR: ${GETOPT_INCLUDE_DIR}") ++ message("GETOPT_LIBRARY: ${GETOPT_LIBRARY}") ++ ++ target_include_directories(oscap PRIVATE ${GETOPT_INCLUDE_DIR}) ++ target_link_libraries(oscap PRIVATE ${GETOPT_LIBRARY}) ++ ++ set(OSCAP_UTIL_DESTINATION tools) + # Install the 'oscap' utility + install(TARGETS "oscap" + DESTINATION ${OSCAP_UTIL_DESTINATION} + ) +- # Install all recursively dependent DLLs for oscap.exe +- set(APPS "\${CMAKE_INSTALL_PREFIX}/oscap.exe") # the \ before $ is required by BundleUtilities +- set(VCPKG_DLL_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin") +- install(CODE " +- include(BundleUtilities) +- fixup_bundle(\"${APPS}\" \"\" \"${VCPKG_DLL_DIR}\") +- ") + else() +- set(OSCAP_UTIL_DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ set(OSCAP_UTIL_DESTINATION tools) + # Install the 'oscap' utility + install(TARGETS "oscap" + DESTINATION ${OSCAP_UTIL_DESTINATION} + ) + # Install manual page + install(FILES "oscap.8" +- DESTINATION "${CMAKE_INSTALL_MANDIR}/man8" ++ DESTINATION share/openscap/man8 + ) + endif() + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9e18613..e84a21f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -125,4 +125,8 @@ else() + set(OPENSCAP_INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + +-install(TARGETS openscap DESTINATION ${OPENSCAP_INSTALL_DESTINATION}) ++install(TARGETS openscap ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) diff --git a/ports/openscap/portfile.cmake b/ports/openscap/portfile.cmake new file mode 100644 index 00000000000000..70f55be56592c9 --- /dev/null +++ b/ports/openscap/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenSCAP/openscap + REF 3a4c635691380fa990a226acc8558db35d7ebabc #1.3.1 + SHA512 12681d43b2ce067c5a5c4eb47e14d91d6e9362b1f98f1d35b05d79ad84c7ee8c29f438eaae8e8465033155e500bb0f936eb79af46fab15e4a07e03c6be8b655d + HEAD_REF dev + PATCHES + fix-build.patch +) + +if ("python" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + docs ENABLE_DOCS + tests ENABLE_TESTS + util ENABLE_OSCAP_UTIL + python ENABLE_PYTHON3 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DPYTHON_EXECUTABLE=${PYTHON3} + -DENABLE_PERL=OFF + -DENABLE_MITRE=OFF + -DENABLE_VALGRIND=OFF + -DENABLE_OSCAP_UTIL_DOCKER=OFF + -DENABLE_OSCAP_UTIL_AS_RPM=OFF + -DENABLE_OSCAP_UTIL_SSH=OFF + -DENABLE_OSCAP_UTIL_VM=OFF + -DENABLE_OSCAP_UTIL_PODMAN=OFF + -DENABLE_OSCAP_UTIL_CHROOT=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/openscap/vcpkg.json b/ports/openscap/vcpkg.json new file mode 100644 index 00000000000000..3bab620ed2dd74 --- /dev/null +++ b/ports/openscap/vcpkg.json @@ -0,0 +1,39 @@ +{ + "name": "openscap", + "version-string": "1.3.1", + "port-version": 1, + "description": "The oscap program is a command line tool that allows users to load, scan, validate, edit, and export SCAP documents.", + "homepage": "https://github.com/OpenSCAP/openscap", + "dependencies": [ + "curl", + "glib", + "libpopt", + "libxml2", + "libxslt", + "libzip", + "openssl", + "pcre2", + "pthread", + "zlib" + ], + "features": { + "docs": { + "description": "install docs" + }, + "python": { + "description": "build with python3" + }, + "tests": { + "description": "build with tests" + }, + "util": { + "description": "build available utils", + "dependencies": [ + { + "name": "getopt-win32", + "platform": "windows" + } + ] + } + } +} diff --git a/ports/openssl-unix/CMakeLists.txt b/ports/openssl-unix/CMakeLists.txt deleted file mode 100644 index f9d94b1a20d714..00000000000000 --- a/ports/openssl-unix/CMakeLists.txt +++ /dev/null @@ -1,157 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -project(openssl C) - -if(NOT SOURCE_PATH) - message(FATAL_ERROR "Requires SOURCE_PATH") -endif() - -if(CMAKE_SYSTEM_NAME STREQUAL "Android") - set(PLATFORM android) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") - set(PLATFORM linux-generic64) - else() - set(PLATFORM linux-generic32) - endif() -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(PLATFORM darwin64-x86_64-cc) -elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - set(PLATFORM BSD-generic64) -else() - message(FATAL_ERROR "Unknown platform") -endif() - -get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY) - -message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}") -message("COMPILER_ROOT=${COMPILER_ROOT}") -message("CMAKE_SYSROOT=${CMAKE_SYSROOT}") -message("CMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}") -message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}") -message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}") -message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}") -message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}") - -set(CFLAGS "${CMAKE_C_FLAGS}") -if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}") -endif() -if(CMAKE_C_COMPILER_TARGET) - set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}") -endif() -if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN) - set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}") -endif() -if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) - set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") -elseif(CMAKE_OSX_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) - set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_OSX_SYSROOT}") -endif() - -string(REGEX REPLACE "^ " "" CFLAGS "${CFLAGS}") - -if(CMAKE_HOST_WIN32) - file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}") -else() - file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT}:$ENV{PATH}") -endif() -set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr") -set(ENV{CC} "${CMAKE_C_COMPILER}") - -message("ENV{ANDROID_DEV}=$ENV{ANDROID_DEV}") - -get_filename_component(SOURCE_PATH_NAME "${SOURCE_PATH}" NAME) -set(BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_PATH_NAME}") - -if(NOT EXISTS "${BUILDDIR}") - file(COPY ${SOURCE_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -endif() - -get_filename_component(MSYS_BIN_DIR "${MAKE}" DIRECTORY) - - -file(READ "${BUILDDIR}/Configure" _contents) -string(REPLACE "-mandroid" "" _contents "${_contents}") -file(WRITE "${BUILDDIR}/Configure" "${_contents}") - -if(BUILD_SHARED_LIBS) - set(SHARED shared) - file(STRINGS "${BUILDDIR}/crypto/opensslv.h" SHLIB_VERSION - REGEX "^#[\t ]*define[\t ]+SHLIB_VERSION_NUMBER[\t ]+\".*\".*") - string(REGEX REPLACE "^.*SHLIB_VERSION_NUMBER[\t ]+\"([^\"]*)\".*$" "\\1" - SHLIB_VERSION "${SHLIB_VERSION}") - if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(LIB_EXT dylib) - set(LIB_EXTS ${SHLIB_VERSION}.${LIB_EXT}) - else() - set(LIB_EXT so) - set(LIB_EXTS ${LIB_EXT}.${SHLIB_VERSION}) - endif() - list(APPEND LIB_EXTS ${LIB_EXT}) -else() - set(SHARED no-shared) - set(LIB_EXTS a) -endif() -foreach(lib ssl crypto) - foreach(ext ${LIB_EXTS}) - list(APPEND INSTALL_LIBS "${BUILDDIR}/lib${lib}.${ext}") - endforeach() -endforeach() - -if(CMAKE_HOST_WIN32) - set(ENV_COMMAND set) - set(PATH_VAR ";%PATH%") -else() - set(ENV_COMMAND export) - set(PATH_VAR ":$ENV{PATH}") -endif() - -add_custom_command( - OUTPUT "${BUILDDIR}/Makefile" - COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER} - COMMAND ${ENV_COMMAND} AR=${CMAKE_AR} - COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER} - COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB} - COMMAND ${ENV_COMMAND} MAKE=${MAKE} - COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER} - COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" - COMMAND "${PERL}" Configure - ${SHARED} - enable-static-engine - no-ssl2 - no-krb5 - no-idea - no-bf - no-cast - no-seed - no-md2 - ${PLATFORM} - "--prefix=${CMAKE_INSTALL_PREFIX}" - "--openssldir=/etc/ssl" - ${CFLAGS} - COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake" - VERBATIM - WORKING_DIRECTORY "${BUILDDIR}" -) - -add_custom_target(depend - COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" - COMMAND "${MAKE}" links # depend MAKEDEPPROG=${CMAKE_C_COMPILER} - VERBATIM - WORKING_DIRECTORY "${BUILDDIR}" - DEPENDS "${BUILDDIR}/Makefile" -) -add_custom_target(build_libs ALL - COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" - COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h" - COMMAND "${MAKE}" build_libs - VERBATIM - WORKING_DIRECTORY "${BUILDDIR}" - DEPENDS depend - BYPRODUCTS ${INSTALL_LIBS} -) - -install( - FILES ${INSTALL_LIBS} - DESTINATION lib -) diff --git a/ports/openssl-unix/CONTROL b/ports/openssl-unix/CONTROL deleted file mode 100644 index 873046ca85a81b..00000000000000 --- a/ports/openssl-unix/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: openssl-unix -Version: 1.0.2s-1 -Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl-unix/ConfigureIncludeQuotesFix.patch b/ports/openssl-unix/ConfigureIncludeQuotesFix.patch deleted file mode 100644 index 09494f56506481..00000000000000 --- a/ports/openssl-unix/ConfigureIncludeQuotesFix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Configure b/Configure -index c98107a..77ad9d3 100644 ---- a/Configure -+++ b/Configure -@@ -972,7 +972,7 @@ PROCESS_ARGS: - } - elsif (/^--with-zlib-include=(.*)$/) - { -- $withargs{"zlib-include"}="-I$1"; -+ $withargs{"zlib-include"}="-I\"$1\""; - } - elsif (/^--with-fipsdir=(.*)$/) - { diff --git a/ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch b/ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch deleted file mode 100644 index 1a8de2c4bdfcb4..00000000000000 --- a/ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl -index dba96cb..5722f6e 100644 ---- a/util/pl/VC-32.pl -+++ b/util/pl/VC-32.pl -@@ -154,9 +154,17 @@ else - $cflags=$opt_cflags.$base_cflags; - } - --# generate symbols.pdb unconditionally --$app_cflag.=" /Zi /Fd\$(TMP_D)/app"; --$lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; -+# generate symbols.pdb when building dlls and embed symbols when building static libs -+if ($shlib) -+ { -+ $app_cflag.=" /Zi /Fd\$(TMP_D)/app.pdb"; -+ $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib.pdb"; -+ } -+else -+ { -+ $app_cflag.=" /Z7"; -+ $lib_cflag.=" /Z7"; -+ } - $lflags.=" /debug"; - - $obj='.obj'; diff --git a/ports/openssl-unix/STRINGIFYPatch.patch b/ports/openssl-unix/STRINGIFYPatch.patch deleted file mode 100644 index dd8f9c29728f68..00000000000000 --- a/ports/openssl-unix/STRINGIFYPatch.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/crypto/cversion.c b/crypto/cversion.c -index bfff699..17b7912 100644 ---- a/crypto/cversion.c -+++ b/crypto/cversion.c -@@ -56,6 +56,9 @@ - * [including the GNU Public Licence.] - */ - -+#define STRINGIFY2(x) #x -+#define STRINGIFY(x) STRINGIFY2(x) -+ - #include "cryptlib.h" - - #ifndef NO_WINDOWS_BRAINDEATH -@@ -79,7 +82,7 @@ const char *SSLeay_version(int t) - } - if (t == SSLEAY_CFLAGS) { - #ifdef CFLAGS -- return (CFLAGS); -+ return STRINGIFY(CFLAGS); - #else - return ("compiler: information not available"); - #endif diff --git a/ports/openssl-unix/portfile.cmake b/ports/openssl-unix/portfile.cmake index a5915f1b9b6771..065116c276adcf 100644 --- a/ports/openssl-unix/portfile.cmake +++ b/ports/openssl-unix/portfile.cmake @@ -1,72 +1 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "This port is only for openssl on Unix-like systems") -endif() - -if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") - message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl") - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - return() -endif() - - -vcpkg_find_acquire_program(PERL) - -set(OPENSSL_VERSION 1.0.2s) - -vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE - URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" - FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 9f745452c4f777df694158e95003cde78a2cf8199bc481a563ec36644664c3c1415a774779b9791dd18f2aeb57fa1721cb52b3db12d025955e970071d5b66d2a -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH MASTER_COPY_SOURCE_PATH - ARCHIVE ${OPENSSL_SOURCE_ARCHIVE} - REF ${OPENSSL_VERSION} - PATCHES - ConfigureIncludeQuotesFix.patch - STRINGIFYPatch.patch - EmbedSymbolsInStaticLibsZ7.patch -) - -if(CMAKE_HOST_WIN32) - vcpkg_acquire_msys(MSYS_ROOT PACKAGES make) - set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) - set(MAKE ${MSYS_ROOT}/usr/bin/make.exe) -else() - find_program(MAKE make) - if(NOT MAKE) - message(FATAL_ERROR "Could not find make. Please install it through your package manager.") - endif() -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} - PREFER_NINJA - OPTIONS - -DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH} - -DPERL=${PERL} - -DMAKE=${MAKE} - OPTIONS_RELEASE - -DINSTALL_HEADERS=ON -) - -vcpkg_install_cmake() - -file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h) -set(RESOLVED_HEADERS) -foreach(HEADER ${HEADERS}) - get_filename_component(X "${HEADER}" REALPATH) - list(APPEND RESOLVED_HEADERS "${X}") -endforeach() - -file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl) -file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl-unix RENAME copyright) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl) -endif() - -vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/openssl-unix/usage b/ports/openssl-unix/usage deleted file mode 100644 index f535cb6a401ccd..00000000000000 --- a/ports/openssl-unix/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package openssl is compatible with built-in CMake targets: - - find_package(OpenSSL REQUIRED) - target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/ports/openssl-unix/vcpkg-cmake-wrapper.cmake b/ports/openssl-unix/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index 82313bdab67580..00000000000000 --- a/ports/openssl-unix/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,10 +0,0 @@ -_find_package(${ARGS}) -if(OPENSSL_FOUND) - find_library(OPENSSL_DL_LIBRARY NAMES dl) - if(OPENSSL_DL_LIBRARY) - list(APPEND OPENSSL_LIBRARIES "dl") - if(TARGET OpenSSL::Crypto) - set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") - endif() - endif() -endif() diff --git a/ports/openssl-unix/vcpkg.json b/ports/openssl-unix/vcpkg.json new file mode 100644 index 00000000000000..16ac635a7d548f --- /dev/null +++ b/ports/openssl-unix/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "openssl-unix", + "version-string": "1.1.1h", + "port-version": 2, + "description": "Deprecated OpenSSL port", + "supports": "!(windows | uwp)", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/openssl-uwp/CONTROL b/ports/openssl-uwp/CONTROL deleted file mode 100644 index aa0348e0b77810..00000000000000 --- a/ports/openssl-uwp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: openssl-uwp -Version: 1.0.2r -Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl-uwp/fix-uwp-configure-unicode.patch b/ports/openssl-uwp/fix-uwp-configure-unicode.patch deleted file mode 100644 index a3b645ad1e792b..00000000000000 --- a/ports/openssl-uwp/fix-uwp-configure-unicode.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/Configure b/Configure -index 67df080..57a15d8 100644 ---- a/Configure -+++ b/Configure -@@ -598,12 +598,12 @@ my %table=( - # 'perl Configure VC-WINSTORE - "VC-WINSTORE","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - # 'perf Configure VC-WINUNIVERSAL --"VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", -+"VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - - "debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - "debug-VC-WINPHONE","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DOPENSSL_WINAPP -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - "debug-VC-WINSTORE","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", --"debug-VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DOPENSSL_WINUCRT -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", -+"debug-VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DOPENSSL_WINUCRT -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - - # Unified CE target - "VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32", diff --git a/ports/openssl-uwp/fix-uwp-rs4.patch b/ports/openssl-uwp/fix-uwp-rs4.patch deleted file mode 100644 index d5a33909e4f08c..00000000000000 --- a/ports/openssl-uwp/fix-uwp-rs4.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/ms/winrtdef.h b/ms/winrtdef.h -index b1a7598..6ba2e1d 100644 ---- a/ms/winrtdef.h -+++ b/ms/winrtdef.h -@@ -6,9 +6,11 @@ - #if defined(OPENSSL_WINAPP) - //Include stdio.h to replace fprintf - # include -+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_WIN10_RS4) - # ifdef getenv - # undef getenv - # endif -+#endif - # ifdef setenv - # undef setenv - # endif -@@ -32,7 +34,9 @@ - # undef GetModuleHandle - # define GetModuleHandle winrt_GetModuleHandle - # endif -+#if !defined(NTDDI_WIN10_RS4) || (NTDDI_VERSION < NTDDI_WIN10_RS4) - # define getenv winrt_getenv -+#endif - # define setenv winrt_getenv - - int winrt_GetTickCount(void); diff --git a/ports/openssl-uwp/portfile.cmake b/ports/openssl-uwp/portfile.cmake index 239f98d2b40829..0015715fb66c72 100644 --- a/ports/openssl-uwp/portfile.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -1,93 +1 @@ -include(vcpkg_common_functions) - -if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "This portfile only supports UWP") -endif() - -if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") - message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl") - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - return() -endif() - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(UWP_PLATFORM "arm") -elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(UWP_PLATFORM "arm64") -elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(UWP_PLATFORM "x64") -elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(UWP_PLATFORM "Win32") -else () - message(FATAL_ERROR "Unsupported architecture") -endif() - -vcpkg_find_acquire_program(PERL) -vcpkg_find_acquire_program(JOM) -get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) -get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}") - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/openssl - REF OpenSSL_1_0_2r_WinRT - SHA512 3045693fca4b042b69675f6164d8cc82106582cf31081d65a0adbd528f04e77fa48b3761f3be7bdf8ab962a093b28fec0ae6d7da02058f2b049f79b784c39c2e - HEAD_REF master - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-rs4.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-configure-unicode.patch -) - -file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll) -file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll) -file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll) - -file( - COPY ${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat - DESTINATION ${SOURCE_PATH} -) - -message(STATUS "Build ${TARGET_TRIPLET}") -vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM} - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME make-openssl-${TARGET_TRIPLET} -) -message(STATUS "Build ${TARGET_TRIPLET} done") - -file( - COPY ${SOURCE_PATH}/inc32/openssl - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) - -file(INSTALL - ${SOURCE_PATH}/out32dll/libeay32.dll - ${SOURCE_PATH}/out32dll/libeay32.pdb - ${SOURCE_PATH}/out32dll/ssleay32.dll - ${SOURCE_PATH}/out32dll/ssleay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - -file(INSTALL - ${SOURCE_PATH}/out32dll/libeay32.lib - ${SOURCE_PATH}/out32dll/ssleay32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -file(INSTALL - ${SOURCE_PATH}/out32dll/libeay32.dll - ${SOURCE_PATH}/out32dll/libeay32.pdb - ${SOURCE_PATH}/out32dll/ssleay32.dll - ${SOURCE_PATH}/out32dll/ssleay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -file(INSTALL - ${SOURCE_PATH}/out32dll/libeay32.lib - ${SOURCE_PATH}/out32dll/ssleay32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) - -vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/openssl-uwp/usage b/ports/openssl-uwp/usage deleted file mode 100644 index f535cb6a401ccd..00000000000000 --- a/ports/openssl-uwp/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package openssl is compatible with built-in CMake targets: - - find_package(OpenSSL REQUIRED) - target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/ports/openssl-uwp/vcpkg.json b/ports/openssl-uwp/vcpkg.json new file mode 100644 index 00000000000000..eba2d4781ee4a3 --- /dev/null +++ b/ports/openssl-uwp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "openssl-uwp", + "version-string": "1.1.1h", + "port-version": 2, + "description": "Deprecated OpenSSL port", + "supports": "uwp", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/openssl-windows/CONTROL b/ports/openssl-windows/CONTROL deleted file mode 100644 index 33c30e638082df..00000000000000 --- a/ports/openssl-windows/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: openssl-windows -Version: 1.0.2s-1 -Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl-windows/ConfigureIncludeQuotesFix.patch b/ports/openssl-windows/ConfigureIncludeQuotesFix.patch deleted file mode 100644 index 09494f56506481..00000000000000 --- a/ports/openssl-windows/ConfigureIncludeQuotesFix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Configure b/Configure -index c98107a..77ad9d3 100644 ---- a/Configure -+++ b/Configure -@@ -972,7 +972,7 @@ PROCESS_ARGS: - } - elsif (/^--with-zlib-include=(.*)$/) - { -- $withargs{"zlib-include"}="-I$1"; -+ $withargs{"zlib-include"}="-I\"$1\""; - } - elsif (/^--with-fipsdir=(.*)$/) - { diff --git a/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch b/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch deleted file mode 100644 index 1a8de2c4bdfcb4..00000000000000 --- a/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl -index dba96cb..5722f6e 100644 ---- a/util/pl/VC-32.pl -+++ b/util/pl/VC-32.pl -@@ -154,9 +154,17 @@ else - $cflags=$opt_cflags.$base_cflags; - } - --# generate symbols.pdb unconditionally --$app_cflag.=" /Zi /Fd\$(TMP_D)/app"; --$lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; -+# generate symbols.pdb when building dlls and embed symbols when building static libs -+if ($shlib) -+ { -+ $app_cflag.=" /Zi /Fd\$(TMP_D)/app.pdb"; -+ $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib.pdb"; -+ } -+else -+ { -+ $app_cflag.=" /Z7"; -+ $lib_cflag.=" /Z7"; -+ } - $lflags.=" /debug"; - - $obj='.obj'; diff --git a/ports/openssl-windows/EnableWinARM32.patch b/ports/openssl-windows/EnableWinARM32.patch deleted file mode 100644 index f1eedcb7180198..00000000000000 --- a/ports/openssl-windows/EnableWinARM32.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl -index dba96cba5e..7fd99959f1 100644 ---- a/util/pl/VC-32.pl -+++ b/util/pl/VC-32.pl -@@ -261,6 +261,8 @@ if ($shlib && $FLAVOR !~ /CE/) - { - $mlflags.=" $lflags /dll"; - $lib_cflag.=" -D_WINDLL"; -+ if ($base_cflags !~ /-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE/) -+ { - # - # Engage Applink... - # -@@ -286,6 +288,7 @@ ___ - CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ) - ___ - } -+ } - elsif ($shlib && $FLAVOR =~ /CE/) - { - $mlflags.=" $lflags /dll"; diff --git a/ports/openssl-windows/EnableWinARM64.patch b/ports/openssl-windows/EnableWinARM64.patch deleted file mode 100644 index 9ec813a4e6de92..00000000000000 --- a/ports/openssl-windows/EnableWinARM64.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/Configure b/Configure -index 36a7a66..b31543d 100644 ---- a/Configure -+++ b/Configure -@@ -592,9 +592,9 @@ my %table=( - "debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32", - # x86 Win32 target defaults to ANSI API, if you want UNICODE, complement - # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE' --"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", -+"VC-WIN32","cl:-W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - # Unified CE target --"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", -+"debug-VC-WIN32","cl:-W3 -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - "VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32", - - # Borland C++ 4.5 diff --git a/ports/openssl-windows/STRINGIFYPatch.patch b/ports/openssl-windows/STRINGIFYPatch.patch deleted file mode 100644 index dd8f9c29728f68..00000000000000 --- a/ports/openssl-windows/STRINGIFYPatch.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/crypto/cversion.c b/crypto/cversion.c -index bfff699..17b7912 100644 ---- a/crypto/cversion.c -+++ b/crypto/cversion.c -@@ -56,6 +56,9 @@ - * [including the GNU Public Licence.] - */ - -+#define STRINGIFY2(x) #x -+#define STRINGIFY(x) STRINGIFY2(x) -+ - #include "cryptlib.h" - - #ifndef NO_WINDOWS_BRAINDEATH -@@ -79,7 +82,7 @@ const char *SSLeay_version(int t) - } - if (t == SSLEAY_CFLAGS) { - #ifdef CFLAGS -- return (CFLAGS); -+ return STRINGIFY(CFLAGS); - #else - return ("compiler: information not available"); - #endif diff --git a/ports/openssl-windows/portfile.cmake b/ports/openssl-windows/portfile.cmake index 3506be9ab9c457..0015715fb66c72 100644 --- a/ports/openssl-windows/portfile.cmake +++ b/ports/openssl-windows/portfile.cmake @@ -1,201 +1 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "This port is only for building openssl on Windows Desktop") -endif() - -if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") - message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl") - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - return() -endif() - -vcpkg_find_acquire_program(PERL) - -set(OPENSSL_VERSION 1.0.2s) - -get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") - -vcpkg_download_distfile(ARCHIVE - URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" - FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 9f745452c4f777df694158e95003cde78a2cf8199bc481a563ec36644664c3c1415a774779b9791dd18f2aeb57fa1721cb52b3db12d025955e970071d5b66d2a -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - ConfigureIncludeQuotesFix.patch - STRINGIFYPatch.patch - EnableWinARM32.patch - EmbedSymbolsInStaticLibsZ7.patch - EnableWinARM64.patch -) - -vcpkg_find_acquire_program(NASM) -get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}") - -vcpkg_find_acquire_program(JOM) - -set(CONFIGURE_COMMAND ${PERL} Configure - enable-static-engine - enable-capieng - no-ssl2 - -utf-8 -) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(OPENSSL_ARCH VC-WIN32) - set(OPENSSL_DO "ms\\do_nasm.bat") -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(OPENSSL_ARCH VC-WIN64A) - set(OPENSSL_DO "ms\\do_win64a.bat") -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(OPENSSL_ARCH VC-WIN32) - set(OPENSSL_DO "ms\\do_ms.bat") - set(CONFIGURE_COMMAND ${CONFIGURE_COMMAND} - no-asm - -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE - ) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(OPENSSL_ARCH VC-WIN32) - set(OPENSSL_DO "ms\\do_ms.bat") - set(CONFIGURE_COMMAND ${CONFIGURE_COMMAND} - no-asm - -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE - ) -else() - message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(OPENSSL_MAKEFILE "ms\\ntdll.mak") -else() - set(OPENSSL_MAKEFILE "ms\\nt.mak") -endif() - -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - - # Copy openssl sources. - message(STATUS "Copying openssl release source files...") - file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) - foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) - file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - endforeach() - message(STATUS "Copying openssl release source files... done") - set(SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - - set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) - - message(STATUS "Configure ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel - ) - vcpkg_execute_required_process( - COMMAND ${OPENSSL_DO} - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel - ) - message(STATUS "Configure ${TARGET_TRIPLET}-rel done") - - message(STATUS "Build ${TARGET_TRIPLET}-rel") - # Openssl's buildsystem has a race condition which will cause JOM to fail at some point. - # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. - make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) - execute_process( - COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log - ) - vcpkg_execute_required_process( - COMMAND nmake -f ${OPENSSL_MAKEFILE} install - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME build-${TARGET_TRIPLET}-rel-1) - - message(STATUS "Build ${TARGET_TRIPLET}-rel done") -endif() - - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - # Copy openssl sources. - message(STATUS "Copying openssl debug source files...") - file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) - foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) - file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - endforeach() - message(STATUS "Copying openssl debug source files... done") - set(SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - - set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) - - message(STATUS "Configure ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg - ) - vcpkg_execute_required_process( - COMMAND ${OPENSSL_DO} - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg - ) - message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") - - message(STATUS "Build ${TARGET_TRIPLET}-dbg") - make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) - execute_process( - COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log - ) - vcpkg_execute_required_process( - COMMAND nmake -f ${OPENSSL_MAKEFILE} install - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME build-${TARGET_TRIPLET}-dbg-1) - - message(STATUS "Build ${TARGET_TRIPLET}-dbg done") -endif() - - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE - ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe - ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf - ${CURRENT_PACKAGES_DIR}/openssl.cnf -) - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openssl/) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/openssl.exe ${CURRENT_PACKAGES_DIR}/tools/openssl/openssl.exe) - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openssl) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - # They should be empty, only the exes deleted above were in these directories - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) -endif() - -file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) -string(REPLACE "" "" _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") - -file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents) -string(REPLACE "# include " "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include " _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}") - -vcpkg_copy_pdbs() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/openssl-windows/usage b/ports/openssl-windows/usage deleted file mode 100644 index f535cb6a401ccd..00000000000000 --- a/ports/openssl-windows/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package openssl is compatible with built-in CMake targets: - - find_package(OpenSSL REQUIRED) - target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/ports/openssl-windows/vcpkg.json b/ports/openssl-windows/vcpkg.json new file mode 100644 index 00000000000000..069235b15ee031 --- /dev/null +++ b/ports/openssl-windows/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "openssl-windows", + "version-string": "1.1.1h", + "port-version": 2, + "description": "Deprecated OpenSSL port", + "supports": "windows", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL deleted file mode 100644 index b495ce0c3cbddf..00000000000000 --- a/ports/openssl/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: openssl -Version: 1 -Homepage: https://www.openssl.org -Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. -Build-Depends: openssl-windows (windows), openssl-uwp (uwp), openssl-unix (!uwp&!windows) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 4d25eff6bfc31c..be6029c71054fb 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -1,4 +1,25 @@ -include(vcpkg_common_functions) +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.") +endif() -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl/) +set(OPENSSL_VERSION 1.1.1l) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" + FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" + SHA512 d9611f393e37577cca05004531388d3e0ebbf714894cab9f95f4903909cd4f45c214faab664c0cbc3ad3cca309d500b9e6d0ecbf9a0a0588d1677dc6b047f9e0 +) + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path("${PERL_EXE_PATH}") + +if(VCPKG_TARGET_IS_UWP) + include("${CMAKE_CURRENT_LIST_DIR}/uwp/portfile.cmake") +elseif(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + include("${CMAKE_CURRENT_LIST_DIR}/windows/portfile.cmake") +else() + include("${CMAKE_CURRENT_LIST_DIR}/unix/portfile.cmake") +endif() + +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/openssl/unix/CMakeLists.txt b/ports/openssl/unix/CMakeLists.txt new file mode 100644 index 00000000000000..d434cf1f8a6655 --- /dev/null +++ b/ports/openssl/unix/CMakeLists.txt @@ -0,0 +1,281 @@ +cmake_minimum_required(VERSION 3.9) +project(openssl C) + +if(NOT SOURCE_PATH) + message(FATAL_ERROR "Requires SOURCE_PATH") +endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(PLATFORM linux-x86_64) + else() + set(PLATFORM linux-generic32) + endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") + if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm64") + set(PLATFORM ios64-xcrun) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + set(PLATFORM ios-xcrun) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" OR + VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(PLATFORM iossimulator-xcrun) + else() + message(FATAL_ERROR "Unknown iOS target architecture: ${VCPKG_TARGET_ARCHITECTURE}") + endif() + # disable that makes linkage error (e.g. require stderr usage) + list(APPEND DISABLES no-stdio no-ui no-asm) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm64") + set(PLATFORM darwin64-arm64-cc) + else() + set(PLATFORM darwin64-x86_64-cc) + endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(PLATFORM BSD-generic64) +elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + set(PLATFORM BSD-generic64) +elseif(MINGW) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(PLATFORM mingw64) + else() + set(PLATFORM mingw) + endif() +elseif(EMSCRIPTEN) + set(MAKE $ENV{EMSDK}/upstream/emscripten/emmake) + set(ENV{MAKE} $ENV{EMSDK}/upstream/emscripten/emmake) +else() + message(FATAL_ERROR "Unknown platform") +endif() + +get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY) + +message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}") +message("COMPILER_ROOT=${COMPILER_ROOT}") +message("CMAKE_SYSROOT=${CMAKE_SYSROOT}") +message("CMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}") +message("CMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") +message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}") +message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}") +message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}") +message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}") +message("CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG=${CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG}") + +set(CFLAGS "${CMAKE_C_FLAGS}") +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}") +endif() +if(CMAKE_C_COMPILER_TARGET AND CMAKE_C_COMPILE_OPTIONS_TARGET) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}") +endif() +if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN AND CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}") +endif() +if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") +elseif(CMAKE_OSX_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_OSX_SYSROOT}") +endif() +if (CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG) + set(CFLAGS "${CFLAGS} ${CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG}${CMAKE_OSX_DEPLOYMENT_TARGET}") +elseif((CMAKE_SYSTEM_NAME STREQUAL "Darwin") AND (VCPKG_TARGET_ARCHITECTURE MATCHES "arm64")) + set(CFLAGS "${CFLAGS} -mmacosx-version-min=11.0") +endif() + +string(REGEX REPLACE "^ " "" CFLAGS "${CFLAGS}") + +if(CMAKE_HOST_WIN32) + file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}") +else() + file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT}:$ENV{PATH}") +endif() +set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr") + +if(NOT IOS) + set(ENV{CC} "${CMAKE_C_COMPILER}") +endif() + +message("ENV{ANDROID_DEV}=$ENV{ANDROID_DEV}") + +get_filename_component(SOURCE_PATH_NAME "${SOURCE_PATH}" NAME) +set(BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_PATH_NAME}") + +if(NOT EXISTS "${BUILDDIR}") + file(COPY ${SOURCE_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +endif() + +get_filename_component(MSYS_BIN_DIR "${MAKE}" DIRECTORY) + +if(BUILD_SHARED_LIBS) + set(SHARED shared) + file(STRINGS "${BUILDDIR}/include/openssl/opensslv.h" SHLIB_VERSION + REGEX "^#[\t ]*define[\t ]+SHLIB_VERSION_NUMBER[\t ]+\".*\".*") + string(REGEX REPLACE "^.*SHLIB_VERSION_NUMBER[\t ]+\"([^\"]*)\".*$" "\\1" + SHLIB_VERSION "${SHLIB_VERSION}") + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(LIB_EXT dylib) + set(LIB_EXTS ${SHLIB_VERSION}.${LIB_EXT}) + elseif(MINGW) + string(REPLACE "." "_" SHLIB_VERSION "${SHLIB_VERSION}") + set(BIN_EXT dll) + set(LIB_EXT dll.a) + else() + set(LIB_EXT so) + set(LIB_EXTS ${LIB_EXT}.${SHLIB_VERSION}) + endif() + list(APPEND BIN_EXTS ${BIN_EXT}) + list(APPEND LIB_EXTS ${LIB_EXT}) +else() + set(SHARED no-shared) + set(LIB_EXTS a) +endif() +foreach(lib ssl crypto) + foreach(ext ${LIB_EXTS}) + list(APPEND INSTALL_LIBS "${BUILDDIR}/lib${lib}.${ext}") + list(APPEND INSTALL_PKG_CONFIGS "${BUILDDIR}/lib${lib}.pc") + endforeach() + foreach(ext ${BIN_EXTS}) + # This might be wrong for targets which don't follow this naming scheme, but I'm not aware of any + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + list(APPEND INSTALL_BINS "${BUILDDIR}/lib${lib}-${SHLIB_VERSION}-x64.${ext}") + else() + list(APPEND INSTALL_BINS "${BUILDDIR}/lib${lib}-${SHLIB_VERSION}.${ext}") + endif() + endforeach() +endforeach() + +if(CMAKE_HOST_WIN32) + set(ENV_COMMAND set) + set(PATH_VAR ";%PATH%") +else() + set(ENV_COMMAND export) + set(PATH_VAR ":$ENV{PATH}") +endif() + +add_custom_command( + OUTPUT "${BUILDDIR}/Makefile" + COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" + VERBATIM + WORKING_DIRECTORY "${BUILDDIR}" +) + +if(NOT IOS) + add_custom_command( + OUTPUT "${BUILDDIR}/Makefile" + COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER} + COMMAND ${ENV_COMMAND} AR=${CMAKE_AR} + COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER} + COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB} + COMMAND ${ENV_COMMAND} MAKE=${MAKE} + COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER} + VERBATIM + APPEND + ) + if(EMSCRIPTEN) + list(APPEND DISABLES + threads + no-engine + no-dso + no-asm + no-shared + no-sse2 + no-srtp + ) + else() + list(APPEND DISABLES + enable-static-engine + no-zlib + no-ssl2 + no-idea + no-cast + no-seed + no-md2 + no-tests) + endif() +endif() + +if(EMSCRIPTEN) + add_custom_command( + OUTPUT "${BUILDDIR}/Makefile" + COMMAND "$ENV{EMSDK}/upstream/emscripten/emconfigure" ./config + ${SHARED} + ${DISABLES} + "--prefix=${CMAKE_INSTALL_PREFIX}" + "--openssldir=/etc/ssl" + "--cross-compile-prefix=\"/\"" + VERBATIM + APPEND + ) + + add_custom_target(build_libs ALL + COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" + COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h" + COMMAND "${MAKE}" make build_libs + VERBATIM + WORKING_DIRECTORY "${BUILDDIR}" + DEPENDS "${BUILDDIR}/Makefile" + BYPRODUCTS ${INSTALL_LIBS} + ) +else() + add_custom_command( + OUTPUT "${BUILDDIR}/Makefile" + COMMAND "${PERL}" Configure + ${SHARED} + ${DISABLES} + ${PLATFORM} + "--prefix=${CMAKE_INSTALL_PREFIX}" + "--openssldir=/etc/ssl" + ${CFLAGS} + VERBATIM + APPEND + ) + + add_custom_target(build_libs ALL + COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" + COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h" + COMMAND "${MAKE}" -j ${VCPKG_CONCURRENCY} build_libs + VERBATIM + WORKING_DIRECTORY "${BUILDDIR}" + DEPENDS "${BUILDDIR}/Makefile" + BYPRODUCTS ${INSTALL_LIBS} + ) +endif() + +add_custom_command( + OUTPUT "${BUILDDIR}/Makefile" + COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake" + VERBATIM + APPEND +) + +if((CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS") AND BUILD_SHARED_LIBS) + if(DEFINED CMAKE_INSTALL_NAME_DIR) + set(ID_PREFIX "${CMAKE_INSTALL_NAME_DIR}") + else() + set(ID_PREFIX "@rpath") + endif() + + add_custom_command( + TARGET build_libs + COMMAND /usr/bin/install_name_tool -id "${ID_PREFIX}/libssl.${SHLIB_VERSION}.dylib" + "${BUILDDIR}/libssl.${SHLIB_VERSION}.dylib" + COMMAND /usr/bin/install_name_tool -id "${ID_PREFIX}/libcrypto.${SHLIB_VERSION}.dylib" + "${BUILDDIR}/libcrypto.1.1.dylib" + COMMAND /usr/bin/install_name_tool -change "${CMAKE_INSTALL_PREFIX}/lib/libcrypto.${SHLIB_VERSION}.dylib" + "${ID_PREFIX}/libcrypto.${SHLIB_VERSION}.dylib" + "${BUILDDIR}/libssl.${SHLIB_VERSION}.dylib" + VERBATIM + ) +endif() + +install( + FILES ${INSTALL_LIBS} + DESTINATION lib +) +install( + FILES ${INSTALL_BINS} + DESTINATION bin +) +install( + FILES ${INSTALL_PKG_CONFIGS} + DESTINATION lib/pkgconfig +) diff --git a/ports/openssl/unix/portfile.cmake b/ports/openssl/unix/portfile.cmake new file mode 100644 index 00000000000000..f051fd63975f16 --- /dev/null +++ b/ports/openssl/unix/portfile.cmake @@ -0,0 +1,45 @@ +if (NOT VCPKG_TARGET_IS_MINGW) + vcpkg_fail_port_install(MESSAGE "${PORT} is only for openssl on Unix-like systems" ON_TARGET "UWP" "Windows") +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH MASTER_COPY_SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF ${OPENSSL_VERSION} +) + +if(CMAKE_HOST_WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make perl) + set(MAKE ${MSYS_ROOT}/usr/bin/make.exe) + set(PERL ${MSYS_ROOT}/usr/bin/perl.exe) +else() + find_program(MAKE make) + if(NOT MAKE) + message(FATAL_ERROR "Could not find make. Please install it through your package manager.") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH} + -DPERL=${PERL} + -DMAKE=${MAKE} + -DVCPKG_CONCURRENCY=${VCPKG_CONCURRENCY} + OPTIONS_RELEASE + -DINSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_pkgconfig() + +file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h) +set(RESOLVED_HEADERS) +foreach(HEADER ${HEADERS}) + get_filename_component(X "${HEADER}" REALPATH) + list(APPEND RESOLVED_HEADERS "${X}") +endforeach() + +file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl) +file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openssl-unix/remove-deps.cmake b/ports/openssl/unix/remove-deps.cmake similarity index 100% rename from ports/openssl-unix/remove-deps.cmake rename to ports/openssl/unix/remove-deps.cmake diff --git a/ports/openssl/uwp/EnableUWPSupport.patch b/ports/openssl/uwp/EnableUWPSupport.patch new file mode 100644 index 00000000000000..fe7837445985cf --- /dev/null +++ b/ports/openssl/uwp/EnableUWPSupport.patch @@ -0,0 +1,170 @@ +diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf +index 3c4299d264..99fcb1f713 100644 +--- a/Configurations/10-main.conf ++++ b/Configurations/10-main.conf +@@ -1287,7 +1287,7 @@ my %targets = ( + }, + "VC-WIN64I" => { + inherit_from => [ "VC-WIN64-common", asm("ia64_asm"), +- sub { $disabled{shared} ? () : "ia64_uplink" } ], ++ sub { $disabled{uplink} ? () : "ia64_uplink" } ], + AS => "ias", + ASFLAGS => "-d debug", + asoutflag => "-o ", +@@ -1299,7 +1299,7 @@ my %targets = ( + }, + "VC-WIN64A" => { + inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"), +- sub { $disabled{shared} ? () : "x86_64_uplink" } ], ++ sub { $disabled{uplink} ? () : "x86_64_uplink" } ], + AS => sub { vc_win64a_info()->{AS} }, + ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} }, + asoutflag => sub { vc_win64a_info()->{asoutflag} }, +@@ -1312,7 +1312,7 @@ my %targets = ( + }, + "VC-WIN32" => { + inherit_from => [ "VC-noCE-common", asm("x86_asm"), +- sub { $disabled{shared} ? () : "uplink_common" } ], ++ sub { $disabled{uplink} ? () : "uplink_common" } ], + AS => sub { vc_win32_info()->{AS} }, + ASFLAGS => sub { vc_win32_info()->{ASFLAGS} }, + asoutflag => sub { vc_win32_info()->{asoutflag} }, +@@ -1374,7 +1374,7 @@ my %targets = ( + #### MinGW + "mingw" => { + inherit_from => [ "BASE_unix", asm("x86_asm"), +- sub { $disabled{shared} ? () : "x86_uplink" } ], ++ sub { $disabled{uplink} ? () : "x86_uplink" } ], + CC => "gcc", + CFLAGS => picker(default => "-Wall", + debug => "-g -O0", +diff --git a/Configurations/50-win-onecore.conf b/Configurations/50-win-onecore.conf +index d478f42b0f..e0fb70daca 100644 +--- a/Configurations/50-win-onecore.conf ++++ b/Configurations/50-win-onecore.conf +@@ -1,3 +1,4 @@ ++## -*- mode: perl; -*- + # Windows OneCore targets. + # + # OneCore is new API stability "contract" that transcends Desktop, IoT and +@@ -10,6 +11,25 @@ + # TODO: extend error handling to use ETW based eventing + # (Or rework whole error messaging) + ++my $UWP_info = {}; ++sub UWP_info { ++ unless (%$UWP_info) { ++ my $SDKver = `pwsh.exe -Command \"& {\$(Get-Item \\\"hklm:\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\\").GetValue(\\\"CurrentVersion\\\")}\"`; ++ $SDKver =~ s|\R$||; ++ my @SDKver_split = split(/\./, $SDKver); ++ # SDK version older than 10.0.17763 don't support our ASM builds ++ if ($SDKver_split[0] < 10 ++ || ($SDKver_split[0] == 10 ++ && $SDKver_split[1] == 0 ++ && $SDKver_split[2] < 17763)) { ++ $UWP_info->{disable} = [ 'asm' ]; ++ } else { ++ $UWP_info->{disable} = [ ]; ++ } ++ } ++ return $UWP_info; ++} ++ + my %targets = ( + "VC-WIN32-ONECORE" => { + inherit_from => [ "VC-WIN32" ], +@@ -61,4 +81,57 @@ my %targets = ( + ex_libs => "onecore.lib", + multilib => "-arm64", + }, ++ ++ # Universal Windows Platform (UWP) App Support ++ ++ # TODO ++ # ++ # The 'disable' attribute should have 'uplink'. ++ # however, these are checked in some 'inherit_from', which is processed ++ # very early, before the 'disable' attributes are seen. ++ # This is a problem that needs to be resolved in Configure first. ++ # ++ # But if you want to build library with Windows 10 Version 1809 SDK or ++ # earlier, the 'disable' attribute should also have 'asm'. ++ ++ "VC-WIN32-UWP" => { ++ inherit_from => [ "VC-WIN32-ONECORE" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, ++ "VC-WIN64A-UWP" => { ++ inherit_from => [ "VC-WIN64A-ONECORE" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, ++ "VC-WIN32-ARM-UWP" => { ++ inherit_from => [ "VC-WIN32-ARM" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, ++ "VC-WIN64-ARM-UWP" => { ++ inherit_from => [ "VC-WIN64-ARM" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, + ); +diff --git a/Configure b/Configure +index 5a699836f3..de45f1e299 100755 +--- a/Configure ++++ b/Configure +@@ -407,6 +408,7 @@ my @disablables = ( + "ubsan", + "ui-console", + "unit-test", ++ "uplink", + "whirlpool", + "weak-ssl-ciphers", + "zlib", +@@ -491,8 +493,8 @@ my @disable_cascades = ( + + # Without position independent code, there can be no shared libraries or DSOs + "pic" => [ "shared" ], +- "shared" => [ "dynamic-engine" ], ++ "shared" => [ "dynamic-engine", "uplink" ], + "dso" => [ "dynamic-engine" ], + "engine" => [ "afalgeng", "devcryptoeng" ], + + # no-autoalginit is only useful when building non-shared +diff --git a/INSTALL b/INSTALL +index 2119cbae9e..ee54e8c215 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -560,6 +560,10 @@ + likely to complement configuration command line with + suitable compiler-specific option. + ++ no-uplink ++ Don't build support for UPLINK interface. ++ ++ + no- + Don't build support for negotiating the specified SSL/TLS + protocol (one of ssl, ssl3, tls, tls1, tls1_1, tls1_2, diff --git a/ports/openssl-uwp/make-openssl.bat b/ports/openssl/uwp/make-openssl.bat similarity index 100% rename from ports/openssl-uwp/make-openssl.bat rename to ports/openssl/uwp/make-openssl.bat diff --git a/ports/openssl/uwp/portfile.cmake b/ports/openssl/uwp/portfile.cmake new file mode 100644 index 00000000000000..d474abe0373813 --- /dev/null +++ b/ports/openssl/uwp/portfile.cmake @@ -0,0 +1,165 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} is only for Windows Universal Platform" ON_TARGET "Linux" "OSX") + +vcpkg_find_acquire_program(JOM) +get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) +vcpkg_add_to_path("${PERL_EXE_PATH}") + +set(OPENSSL_SHARED no-shared) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(OPENSSL_SHARED shared) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + uwp/EnableUWPSupport.patch +) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}") + +set(CONFIGURE_COMMAND ${PERL} Configure + enable-static-engine + enable-capieng + no-unit-test + no-ssl2 + no-asm + no-uplink + no-tests + -utf-8 + ${OPENSSL_SHARED} +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(OPENSSL_ARCH VC-WIN32-UWP) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(OPENSSL_ARCH VC-WIN64A-UWP) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPENSSL_ARCH VC-WIN32-ARM-UWP) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPENSSL_ARCH VC-WIN64-ARM-UWP) +else() + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +set(OPENSSL_MAKEFILE "makefile") + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + + # Copy openssl sources. + message(STATUS "Copying openssl release source files...") + file(GLOB OPENSSL_SOURCE_FILES "${SOURCE_PATH}/*") + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + endforeach() + message(STATUS "Copying openssl release source files... done") + set(SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + set(OPENSSLDIR_RELEASE "${CURRENT_PACKAGES_DIR}") + + message(STATUS "Configure ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS + WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}" + LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-rel + ) + message(STATUS "Configure ${TARGET_TRIPLET}-rel done") + + message(STATUS "Build ${TARGET_TRIPLET}-rel") + # Openssl's buildsystem has a race condition which will cause JOM to fail at some point. + # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. + make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) + execute_process( + COMMAND "${JOM}" -k -j ${VCPKG_CONCURRENCY} -f "${OPENSSL_MAKEFILE}" build_libs + WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}" + OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log" + ERROR_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log" + ) + vcpkg_execute_required_process( + COMMAND nmake -f "${OPENSSL_MAKEFILE}" install_dev + WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}" + LOGNAME build-${TARGET_TRIPLET}-rel-1) + + message(STATUS "Build ${TARGET_TRIPLET}-rel done") +endif() + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Copy openssl sources. + message(STATUS "Copying openssl debug source files...") + file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY "${SOURCE_FILE}" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + endforeach() + message(STATUS "Copying openssl debug source files... done") + set(SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + set(OPENSSLDIR_DEBUG "${CURRENT_PACKAGES_DIR}/debug") + + message(STATUS "Configure ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS + WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}" + LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-dbg + ) + message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Build ${TARGET_TRIPLET}-dbg") + make_directory("${SOURCE_PATH_DEBUG}/inc32/openssl") + execute_process( + COMMAND "${JOM}" -k -j ${VCPKG_CONCURRENCY} -f "${OPENSSL_MAKEFILE}" build_libs + WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}" + OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log" + ERROR_FILE "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log" + ) + vcpkg_execute_required_process( + COMMAND nmake -f "${OPENSSL_MAKEFILE}" install_dev + WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}" + LOGNAME build-${TARGET_TRIPLET}-dbg-1) + + message(STATUS "Build ${TARGET_TRIPLET}-dbg done") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/certs") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/private") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/engines-1_1") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/certs") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/engines-1_1") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/private") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(REMOVE + "${CURRENT_PACKAGES_DIR}/bin/openssl.exe" + "${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe" + "${CURRENT_PACKAGES_DIR}/debug/openssl.cnf" + "${CURRENT_PACKAGES_DIR}/openssl.cnf" + "${CURRENT_PACKAGES_DIR}/ct_log_list.cnf" + "${CURRENT_PACKAGES_DIR}/ct_log_list.cnf.dist" + "${CURRENT_PACKAGES_DIR}/openssl.cnf.dist" + "${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf" + "${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist" + "${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + # They should be empty, only the exes deleted above were in these directories + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/") +endif() + +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) +string(REPLACE "" "" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") + +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents) +string(REPLACE "# include " "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include " _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}") + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/openssl/vcpkg-cmake-wrapper.cmake.in b/ports/openssl/vcpkg-cmake-wrapper.cmake.in new file mode 100644 index 00000000000000..f1c3176cf175ae --- /dev/null +++ b/ports/openssl/vcpkg-cmake-wrapper.cmake.in @@ -0,0 +1,73 @@ +set(OPENSSL_ROOT_DIR_BAK ${OPENSSL_ROOT_DIR}) +get_filename_component(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR}" PATH) +get_filename_component(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR}" PATH) + +if(CMAKE_HOST_WIN32) + file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" Z_VCPKG_PROGRAMFILES) + set(Z_VCPKG_PROGRAMFILESX86_NAME "PROGRAMFILES(x86)") + file(TO_CMAKE_PATH "$ENV{${Z_VCPKG_PROGRAMFILESX86_NAME}}" Z_VCPKG_PROGRAMFILESX86) + set(CMAKE_SYSTEM_IGNORE_PATH + "${Z_VCPKG_PROGRAMFILES}/OpenSSL" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32/lib/VC" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64/lib/VC" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32/lib/VC/static" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64/lib/VC/static" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32/lib/VC" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64/lib/VC" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32/lib/VC/static" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64/lib/VC/static" + "C:/OpenSSL/" + "C:/OpenSSL-Win32/" + "C:/OpenSSL-Win64/" + "C:/OpenSSL-Win32/lib/VC" + "C:/OpenSSL-Win64/lib/VC" + "C:/OpenSSL-Win32/lib/VC/static" + "C:/OpenSSL-Win64/lib/VC/static" + ) +endif() + +_find_package(${ARGS}) + +set(OPENSSL_ROOT_DIR ${OPENSSL_ROOT_DIR_BAK}) + +if(OPENSSL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + if(WIN32) + list(APPEND OPENSSL_LIBRARIES Crypt32.lib ws2_32.lib) + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Crypt32.lib;ws2_32.lib") + endif() + if(TARGET OpenSSL::SSL) + set_property(TARGET OpenSSL::SSL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Crypt32.lib;ws2_32.lib") + endif() + else() + cmake_policy(PUSH) + cmake_policy(SET CMP0057 NEW) + find_library(OPENSSL_DL_LIBRARY NAMES dl) + if(OPENSSL_DL_LIBRARY) + list(APPEND OPENSSL_LIBRARIES "dl") + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") + endif() + endif() + + if("REQUIRED" IN_LIST ARGS) + find_package(Threads REQUIRED) + else() + find_package(Threads) + endif() + list(APPEND OPENSSL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Threads::Threads") + endif() + if(TARGET OpenSSL::SSL) + set_property(TARGET OpenSSL::SSL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Threads::Threads") + endif() + cmake_policy(POP) + endif() +endif() diff --git a/ports/openssl/vcpkg.json b/ports/openssl/vcpkg.json new file mode 100644 index 00000000000000..3a4a62dda2d58e --- /dev/null +++ b/ports/openssl/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "openssl", + "version-string": "1.1.1l", + "port-version": 1, + "description": "OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.", + "homepage": "https://www.openssl.org" +} diff --git a/ports/openssl/windows/portfile.cmake b/ports/openssl/windows/portfile.cmake new file mode 100644 index 00000000000000..4987e810760761 --- /dev/null +++ b/ports/openssl/windows/portfile.cmake @@ -0,0 +1,174 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} is only for Windows Desktop" ON_TARGET "UWP" "Linux" "OSX") + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH "${NASM}" DIRECTORY) +vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}") + +vcpkg_find_acquire_program(JOM) + +set(OPENSSL_SHARED no-shared) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPENSSL_SHARED shared) +endif() + +set(CONFIGURE_OPTIONS + enable-static-engine + enable-capieng + no-ssl2 + no-tests + -utf-8 + ${OPENSSL_SHARED} +) + +if(DEFINED OPENSSL_USE_NOPINSHARED) + set(CONFIGURE_OPTIONS ${CONFIGURE_OPTIONS} no-pinshared) +endif() + +if(OPENSSL_NO_AUTOLOAD_CONFIG) + set(CONFIGURE_OPTIONS ${CONFIGURE_OPTIONS} no-autoload-config) +endif() + +set(CONFIGURE_COMMAND "${PERL}" Configure ${CONFIGURE_OPTIONS}) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(OPENSSL_ARCH VC-WIN32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(OPENSSL_ARCH VC-WIN64A) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPENSSL_ARCH VC-WIN32-ARM) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPENSSL_ARCH VC-WIN64-ARM) +else() + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +set(OPENSSL_MAKEFILE "makefile") + +file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + + # Copy openssl sources. + message(STATUS "Copying openssl release source files...") + file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + endforeach() + message(STATUS "Copying openssl release source files... done") + set(SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) + + message(STATUS "Configure ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME configure-perl-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configure ${TARGET_TRIPLET}-rel done") + + message(STATUS "Build ${TARGET_TRIPLET}-rel") + # Openssl's buildsystem has a race condition which will cause JOM to fail at some point. + # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. + make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) + execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f ${OPENSSL_MAKEFILE} install_sw install_ssldirs + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME build-${TARGET_TRIPLET}-rel-1) + + message(STATUS "Build ${TARGET_TRIPLET}-rel done") +endif() + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Copy openssl sources. + message(STATUS "Copying openssl debug source files...") + file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + endforeach() + message(STATUS "Copying openssl debug source files... done") + set(SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) + + message(STATUS "Configure ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME configure-perl-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Build ${TARGET_TRIPLET}-dbg") + make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) + execute_process( + COMMAND "${JOM}" -k -j ${VCPKG_CONCURRENCY} -f "${OPENSSL_MAKEFILE}" + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f "${OPENSSL_MAKEFILE}" install_sw install_ssldirs + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME build-${TARGET_TRIPLET}-dbg-1) + + message(STATUS "Build ${TARGET_TRIPLET}-dbg done") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/certs") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/private") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/engines-1_1") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/certs") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/engines-1_1") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/private") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(REMOVE + "${CURRENT_PACKAGES_DIR}/ct_log_list.cnf" + "${CURRENT_PACKAGES_DIR}/ct_log_list.cnf.dist" + "${CURRENT_PACKAGES_DIR}/openssl.cnf.dist" + "${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe" + "${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf" + "${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist" + "${CURRENT_PACKAGES_DIR}/debug/openssl.cnf" + "${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist" +) + +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl/") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/openssl.exe" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl.exe") +file(RENAME "${CURRENT_PACKAGES_DIR}/openssl.cnf" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl.cnf") + +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/openssl") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + # They should be empty, only the exes deleted above were in these directories + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/") +endif() + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" + "" + "" +) + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" + "# include " + "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include " +) + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/opensubdiv/fix-version-search.patch b/ports/opensubdiv/fix-version-search.patch new file mode 100644 index 00000000000000..7973472854feae --- /dev/null +++ b/ports/opensubdiv/fix-version-search.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindOpenCL.cmake b/cmake/FindOpenCL.cmake +index 485e55e..1c98b91 100644 +--- a/cmake/FindOpenCL.cmake ++++ b/cmake/FindOpenCL.cmake +@@ -177,7 +177,7 @@ if(_OPENCL_CPP_INCLUDE_DIRS) + + if(EXISTS "${OPENCL_INCLUDE_DIRS}/CL/cl.h") + +- file(STRINGS "${OPENCL_INCLUDE_DIRS}/CL/cl.h" LINES REGEX "^#define CL_VERSION_.*$") ++ file(STRINGS "${OPENCL_INCLUDE_DIRS}/CL/cl.h" LINES REGEX "^#define CL_VERSION_[0-9]+_[0-9]+.*$") + + foreach(LINE ${LINES}) + diff --git a/ports/opensubdiv/fix_compile-option.patch b/ports/opensubdiv/fix_compile-option.patch new file mode 100644 index 00000000000000..1acae92c8495e7 --- /dev/null +++ b/ports/opensubdiv/fix_compile-option.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b69912ae..dcde4297 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,7 +218,7 @@ elseif(MSVC) + + list(APPEND OSD_COMPILER_FLAGS + /W3 # Use warning level recommended for production purposes. +- /WX # Treat all compiler warnings as errors. ++ # /WX # Treat all compiler warnings as errors. + + # warning C4005: macro redefinition + /wd4005 diff --git a/ports/opensubdiv/portfile.cmake b/ports/opensubdiv/portfile.cmake new file mode 100644 index 00000000000000..03ec368c22f1fb --- /dev/null +++ b/ports/opensubdiv/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PixarAnimationStudios/OpenSubdiv + REF 82ab1b9f54c87fdd7e989a3470d53e137b8ca270 # 3.4.3 + SHA512 607cb9aa05d83a24bc2102bfd28abfec58f5723b1c56f6f431111ebf98f105ff7ca2a77610953acd21f73cb74d8d8ec68db3aeb11be1f9ca56d87c36c58dd095 + HEAD_REF master + PATCHES + fix_compile-option.patch + fix-version-search.patch +) + +if(VCPKG_TARGET_IS_LINUX) + message( +"OpenSubdiv currently requires the following libraries from the system package manager: + xinerama xxf86vm + +These can be installed on Ubuntu systems via sudo apt install libxinerama-dev libxxf86vm-dev") +endif() + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path("${PYTHON2_DIR}") + +if (VCPKG_CRT_LINKAGE STREQUAL static) + set(STATIC_CRT_LNK ON) +else() + set(STATIC_CRT_LNK OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DNO_DX=ON + -DNO_CUDA=ON + -DNO_EXAMPLES=ON + -DNO_TUTORIALS=ON + -DNO_REGRESSION=ON + -DNO_TESTS=ON + -DMSVC_STATIC_CRT=${STATIC_CRT_LNK} +) + +vcpkg_install_cmake() + +# # Moves all .cmake files from /debug/share/opensubdiv/ to /share/opensubdiv/ +# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details +# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/opensubdiv) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/opensubdiv/vcpkg.json b/ports/opensubdiv/vcpkg.json new file mode 100644 index 00000000000000..dc6b41f65afcab --- /dev/null +++ b/ports/opensubdiv/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "opensubdiv", + "version-semver": "3.4.3", + "port-version": 2, + "description": "An Open-Source subdivision surface library.", + "homepage": "https://github.com/PixarAnimationStudios/OpenSubdiv", + "supports": "!arm & !uwp" +} diff --git a/ports/opentelemetry-cpp/portfile.cmake b/ports/opentelemetry-cpp/portfile.cmake new file mode 100644 index 00000000000000..63ccb500bf07bd --- /dev/null +++ b/ports/opentelemetry-cpp/portfile.cmake @@ -0,0 +1,42 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +if ("etw" IN_LIST FEATURES) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "linux" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "OSX") + message(FATAL_ERROR "Feature 'ewt' does not support 'linux & osx'") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO open-telemetry/opentelemetry-cpp + REF v1.0.0-rc4 + SHA512 93de3e61b6bd0a9237cf81dedbcdb078fb92c1dc562975c82134d791ad911d4d3c0e717f390a0a993fbeda5d5c90206c0e7a0c7085e58d9cfefbc9fd4ff209d2 + HEAD_REF main +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + etw WITH_ETW + zipkin WITH_ZIPKIN + prometheus WITH_PROMETHEUS + elasticsearch WITH_ELASTICSEARCH + jaeger WITH_JAEGER +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DWITH_EXAMPLES=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/opentelemetry-cpp/vcpkg.json b/ports/opentelemetry-cpp/vcpkg.json new file mode 100644 index 00000000000000..d8d6a0dd3507d6 --- /dev/null +++ b/ports/opentelemetry-cpp/vcpkg.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "name": "opentelemetry-cpp", + "version-semver": "1.0.0-rc4", + "description": [ + "OpenTelemetry is a collection of tools, APIs, and SDKs.", + "You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior." + ], + "homepage": "https://github.com/open-telemetry/opentelemetry-cpp", + "supports": "!(windows & !static)", + "dependencies": [ + "curl", + "nlohmann-json", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "elasticsearch": { + "description": "Whether to include the Elasticsearch Client in the SDK" + }, + "etw": { + "description": "Whether to include the ETW Exporter in the SDK" + }, + "jaeger": { + "description": "Whether to include the Jaeger exporter", + "dependencies": [ + "thrift" + ] + }, + "prometheus": { + "description": "Whether to include the Prometheus Client in the SDK", + "dependencies": [ + "prometheus-cpp" + ] + }, + "zipkin": { + "description": "Whether to include the Zipkin exporter in the SDK" + } + } +} diff --git a/ports/opentracing/CONTROL b/ports/opentracing/CONTROL deleted file mode 100644 index 62f6dd30362c44..00000000000000 --- a/ports/opentracing/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: opentracing -Version: 1.5.1-1 -Description: C++ implementation of the OpenTracing API -Homepage: https://opentracing.io diff --git a/ports/opentracing/portfile.cmake b/ports/opentracing/portfile.cmake index 595faf1cf65fba..61c1516cb3f201 100644 --- a/ports/opentracing/portfile.cmake +++ b/ports/opentracing/portfile.cmake @@ -1,11 +1,7 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP build is not supported.") -endif() +vcpkg_fail_port_install(ON_TARGET uwp) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set( LOCAL_OPTIONS + set(LOCAL_OPTIONS -DBUILD_STATIC_LIBS=OFF ) else() @@ -16,15 +12,17 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opentracing/opentracing-cpp - REF cf9b9d5c26ef985af2213521a4f0701b7e715db2 - SHA512 75b77781c075c6814bf4a81d793e872ca47447fe82a4cad878bee99ffb2082e13e95ee285f32fb2e599765b08b4404d8e475bacff79a412a954d227b93ba53ef + REF 4bb431f7728eaf383a07e86f9754a5b67575dab0 # v1.6.0 + SHA512 1c69ff4cfd5f6037a48815367d3026c1bf06c3c49ebf232a64c43167385fb62e444c3b3224fc38f68ef0fdb378e3736db6ee6ba57160e6e578c87c09e92e527e + PATCHES + repair_mojibake.patch ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA OPTIONS - ${OPTIONS} + -DENABLE_LINTING=OFF ${LOCAL_OPTIONS} ) @@ -56,7 +54,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAM endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/opentracing RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) # Remove duplicate headers -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/opentracing/repair_mojibake.patch b/ports/opentracing/repair_mojibake.patch new file mode 100644 index 00000000000000..ae427e661aaea0 --- /dev/null +++ b/ports/opentracing/repair_mojibake.patch @@ -0,0 +1,59 @@ +From 31c92781ac953cb83963cfe5ac30324579fa7b2d Mon Sep 17 00:00:00 2001 +From: Billy Robert O'Neal III +Date: Fri, 18 Dec 2020 10:07:02 -0800 +Subject: [PATCH] Repair mojibake in expected.hpp + +The affected characters herein triggered warnings +C:\Dev\vcpkg\buildtrees\opentracing\src\b67575dab0-0250653c81.clean\3rd_party\include\opentracing/expected/expected.hpp(1): warning C4828: The file contains a character starting at offset 0x4a77 that is illegal in the current source character set (codepage 65001). +--- + 3rd_party/include/opentracing/expected/expected.hpp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/3rd_party/include/opentracing/expected/expected.hpp b/3rd_party/include/opentracing/expected/expected.hpp +index 8283a77..0d21d43 100644 +--- a/3rd_party/include/opentracing/expected/expected.hpp ++++ b/3rd_party/include/opentracing/expected/expected.hpp +@@ -778,13 +778,13 @@ class expected + // expected())),E> map(F&& func) ; + + // template +-// ’see below’ bind(F&& func); ++// 'see below' bind(F&& func); + + // template + // expected catch_error(F&& f); + + // template +-// ’see below’ then(F&& func); ++// 'see below' then(F&& func); + + private: + bool has_value_; +@@ -955,9 +955,9 @@ class expected + return ! has_value() && std::is_base_of< Ex, decltype( get_unexpected().value() ) >::value; + } + +-// template constexpr ’see below’ unwrap() const&; ++// template constexpr 'see below' unwrap() const&; + // +-// template ’see below’ unwrap() &&; ++// template 'see below' unwrap() &&; + + // factories + +@@ -968,13 +968,13 @@ class expected + // expected map(F&& func) ; + // + // template +-// ’see below’ bind(F&& func) ; ++// 'see below' bind(F&& func) ; + // + // template + // expected catch_error(F&& f); + // + // template +-// ’see below’ then(F&& func); ++// 'see below' then(F&& func); + + private: + bool has_value_; diff --git a/ports/opentracing/vcpkg.json b/ports/opentracing/vcpkg.json new file mode 100644 index 00000000000000..d61870038912f7 --- /dev/null +++ b/ports/opentracing/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "opentracing", + "version-string": "1.6.0", + "port-version": 1, + "description": "C++ implementation of the OpenTracing API", + "homepage": "https://opentracing.io", + "supports": "!uwp" +} diff --git a/ports/openvdb/0001-remove-pkgconfig.patch b/ports/openvdb/0001-remove-pkgconfig.patch deleted file mode 100644 index 01803d531a4260..00000000000000 --- a/ports/openvdb/0001-remove-pkgconfig.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake -index 03e361e..b44f46d 100644 ---- a/cmake/FindBlosc.cmake -+++ b/cmake/FindBlosc.cmake -@@ -104,11 +104,6 @@ else() - endif() - endif() - --# Additionally try and use pkconfig to find blosc -- --find_package(PkgConfig) --pkg_check_modules(PC_Blosc QUIET blosc) -- - # ------------------------------------------------------------------------ - # Search for blosc include DIR - # ------------------------------------------------------------------------ -diff --git a/cmake/FindCppUnit.cmake b/cmake/FindCppUnit.cmake -index fb8a28b..fea685e 100644 ---- a/cmake/FindCppUnit.cmake -+++ b/cmake/FindCppUnit.cmake -@@ -106,11 +106,6 @@ else() - endif() - endif() - --# Additionally try and use pkconfig to find cppunit -- --find_package(PkgConfig) --pkg_check_modules(PC_CppUnit QUIET cppunit) -- - # ------------------------------------------------------------------------ - # Search for CppUnit include DIR - # ------------------------------------------------------------------------ -diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake -index f0a0d7f..9f31355 100644 ---- a/cmake/FindIlmBase.cmake -+++ b/cmake/FindIlmBase.cmake -@@ -152,11 +152,6 @@ else() - endif() - endif() - --# Additionally try and use pkconfig to find IlmBase -- --find_package(PkgConfig) --pkg_check_modules(PC_IlmBase QUIET IlmBase) -- - # ------------------------------------------------------------------------ - # Search for IlmBase include DIR - # ------------------------------------------------------------------------ -diff --git a/cmake/FindLog4cplus.cmake b/cmake/FindLog4cplus.cmake -index 6890724..10dc931 100644 ---- a/cmake/FindLog4cplus.cmake -+++ b/cmake/FindLog4cplus.cmake -@@ -106,11 +106,6 @@ else() - endif() - endif() - --# Additionally try and use pkconfig to find log4cplus -- --find_package(PkgConfig) --pkg_check_modules(PC_Log4cplus QUIET log4cplus) -- - # ------------------------------------------------------------------------ - # Search for Log4cplus include DIR - # ------------------------------------------------------------------------ -diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake -index 302c1df..3d00c3d 100644 ---- a/cmake/FindOpenEXR.cmake -+++ b/cmake/FindOpenEXR.cmake -@@ -145,11 +145,6 @@ else() - endif() - endif() - --# Additionally try and use pkconfig to find OpenEXR -- --find_package(PkgConfig) --pkg_check_modules(PC_OpenEXR QUIET OpenEXR) -- - # ------------------------------------------------------------------------ - # Search for OpenEXR include DIR - # ------------------------------------------------------------------------ -diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake -index 783dfed..1fd43be 100644 ---- a/cmake/FindOpenVDB.cmake -+++ b/cmake/FindOpenVDB.cmake -@@ -153,11 +153,6 @@ else() - endif() - endif() - --# Additionally try and use pkconfig to find OpenVDB -- --find_package(PkgConfig) --pkg_check_modules(PC_OpenVDB QUIET OpenVDB) -- - # This CMake module supports being called from external packages AND from - # within the OpenVDB repository for building openvdb components with the - # core library build disabled. Determine where we are being called from: -diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake -index 01696ce..8fe73e5 100644 ---- a/cmake/FindTBB.cmake -+++ b/cmake/FindTBB.cmake -@@ -141,11 +141,6 @@ else() - endif() - endif() - --# Additionally try and use pkconfig to find Tbb -- --find_package(PkgConfig) --pkg_check_modules(PC_Tbb QUIET tbb) -- - # ------------------------------------------------------------------------ - # Search for tbb include DIR - # ------------------------------------------------------------------------ -diff --git a/cmake/OpenVDBGLFW3Setup.cmake b/cmake/OpenVDBGLFW3Setup.cmake -index 3a29dc7..4dc6269 100644 ---- a/cmake/OpenVDBGLFW3Setup.cmake -+++ b/cmake/OpenVDBGLFW3Setup.cmake -@@ -77,12 +77,6 @@ else() - endif() - endif() - --# Additionally try and use pkconfig to find glfw, though we only use --# pkg-config to re-direct to the cmake. In other words, glfw's cmake is --# expected to be installed --find_package(PkgConfig) --pkg_check_modules(PC_glfw3 QUIET glfw3) -- - if(PC_glfw3_FOUND) - foreach(DIR ${PC_glfw3_LIBRARY_DIRS}) - list(APPEND _GLFW3_ROOT_SEARCH_DIR ${DIR}) diff --git a/ports/openvdb/0002-fix-cmake-modules.patch b/ports/openvdb/0002-fix-cmake-modules.patch deleted file mode 100644 index 7b36161c5cb8b7..00000000000000 --- a/ports/openvdb/0002-fix-cmake-modules.patch +++ /dev/null @@ -1,1125 +0,0 @@ -diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake -index e8b57a2..61ba83b 100644 ---- a/cmake/FindBlosc.cmake -+++ b/cmake/FindBlosc.cmake -@@ -1,4 +1,4 @@ --# Copyright (c) 2012-2019 DreamWorks Animation LLC -+# Copyright (c) 2012-2016 DreamWorks Animation LLC - # - # All rights reserved. This software is distributed under the - # Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ ) -@@ -24,190 +24,51 @@ - # IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE - # LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00. - # --#[=======================================================================[.rst: - --FindBlosc ----------- -- --Find Blosc include dirs and libraries -- --Use this module by invoking find_package with the form:: -- -- find_package(Blosc -- [version] [EXACT] # Minimum or EXACT version e.g. 1.5.0 -- [REQUIRED] # Fail with error if Blosc is not found -- ) -- --IMPORTED Targets --^^^^^^^^^^^^^^^^ -- --``Blosc::blosc`` -- This module defines IMPORTED target Blosc::Blosc, if Blosc has been found. -- --Result Variables --^^^^^^^^^^^^^^^^ -- --This will define the following variables: -- --``Blosc_FOUND`` -- True if the system has the Blosc library. --``Blosc_VERSION`` -- The version of the Blosc library which was found. --``Blosc_INCLUDE_DIRS`` -- Include directories needed to use Blosc. --``Blosc_LIBRARIES`` -- Libraries needed to link to Blosc. --``Blosc_LIBRARY_DIRS`` -- Blosc library directories. -- --Cache Variables --^^^^^^^^^^^^^^^ -- --The following cache variables may also be set: -- --``Blosc_INCLUDE_DIR`` -- The directory containing ``blosc.h``. --``Blosc_LIBRARY`` -- The path to the Blosc library. -- --Hints --^^^^^ -- --Instead of explicitly setting the cache variables, the following variables --may be provided to tell this module where to look. -- --``BLOSC_ROOT`` -- Preferred installation prefix. --``BLOSC_INCLUDEDIR`` -- Preferred include directory e.g. /include --``BLOSC_LIBRARYDIR`` -- Preferred library directory e.g. /lib --``SYSTEM_LIBRARY_PATHS`` -- Paths appended to all include and lib searches. -- --#]=======================================================================] -- --mark_as_advanced( -- Blosc_INCLUDE_DIR -- Blosc_LIBRARY --) -- --# Append BLOSC_ROOT or $ENV{BLOSC_ROOT} if set (prioritize the direct cmake var) --set(_BLOSC_ROOT_SEARCH_DIR "") -- --if(BLOSC_ROOT) -- list(APPEND _BLOSC_ROOT_SEARCH_DIR ${BLOSC_ROOT}) --else() -- set(_ENV_BLOSC_ROOT $ENV{BLOSC_ROOT}) -- if(_ENV_BLOSC_ROOT) -- list(APPEND _BLOSC_ROOT_SEARCH_DIR ${_ENV_BLOSC_ROOT}) -- endif() --endif() -- --# ------------------------------------------------------------------------ --# Search for blosc include DIR --# ------------------------------------------------------------------------ -- --set(_BLOSC_INCLUDE_SEARCH_DIRS "") --list(APPEND _BLOSC_INCLUDE_SEARCH_DIRS -- ${BLOSC_INCLUDEDIR} -- ${_BLOSC_ROOT_SEARCH_DIR} -- ${PC_Blosc_INCLUDE_DIRS} -- ${SYSTEM_LIBRARY_PATHS} --) -+# -*- cmake -*- -+# - Find Blosc -+# -+# Author : Nicholas Yue yue.nicholas@gmail.com -+# -+# BLOSC_FOUND set if Blosc is found. -+# BLOSC_INCLUDE_DIR Blosc's include directory -+# BLOSC_LIBRARYDIR Blosc's library directory -+# BLOSC_LIBRARIES all Blosc libraries - --# Look for a standard blosc header file. --find_path(Blosc_INCLUDE_DIR blosc.h -- NO_DEFAULT_PATH -- PATHS ${_BLOSC_INCLUDE_SEARCH_DIRS} -- PATH_SUFFIXES include --) -+FIND_PACKAGE ( PackageHandleStandardArgs ) - --if(EXISTS "${Blosc_INCLUDE_DIR}/blosc.h") -- file(STRINGS "${Blosc_INCLUDE_DIR}/blosc.h" -- _blosc_version_major_string REGEX "#define BLOSC_VERSION_MAJOR +[0-9]+ " -- ) -- string(REGEX REPLACE "#define BLOSC_VERSION_MAJOR +([0-9]+).*$" "\\1" -- _blosc_version_major_string "${_blosc_version_major_string}" -- ) -- string(STRIP "${_blosc_version_major_string}" Blosc_VERSION_MAJOR) -+FIND_PATH( BLOSC_LOCATION include/blosc.h) - -- file(STRINGS "${Blosc_INCLUDE_DIR}/blosc.h" -- _blosc_version_minor_string REGEX "#define BLOSC_VERSION_MINOR +[0-9]+ " -+FIND_PACKAGE_HANDLE_STANDARD_ARGS ( Blosc -+ REQUIRED_VARS BLOSC_LOCATION - ) -- string(REGEX REPLACE "#define BLOSC_VERSION_MINOR +([0-9]+).*$" "\\1" -- _blosc_version_minor_string "${_blosc_version_minor_string}" -- ) -- string(STRIP "${_blosc_version_minor_string}" Blosc_VERSION_MINOR) -- -- unset(_blosc_version_major_string) -- unset(_blosc_version_minor_string) -- -- set(Blosc_VERSION ${Blosc_VERSION_MAJOR}.${Blosc_VERSION_MINOR}) --endif() -- --# ------------------------------------------------------------------------ --# Search for blosc lib DIR --# ------------------------------------------------------------------------ - --set(_BLOSC_LIBRARYDIR_SEARCH_DIRS "") --list(APPEND _BLOSC_LIBRARYDIR_SEARCH_DIRS -- ${BLOSC_LIBRARYDIR} -- ${_BLOSC_ROOT_SEARCH_DIR} -- ${PC_Blosc_LIBRARY_DIRS} -- ${SYSTEM_LIBRARY_PATHS} --) -+IF ( BLOSC_FOUND ) - --# Static library setup --if(UNIX AND BLOSC_USE_STATIC_LIBS) -- set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) -- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") --endif() -+# SET ( BLOSC_LIBRARYDIR ${BLOSC_LOCATION}/lib -+# CACHE STRING "Blosc library directories") - --set(BLOSC_PATH_SUFFIXES -- lib64 -- lib --) -+ SET ( _blosc_library_name "blosc" ) - --find_library(Blosc_LIBRARY blosc -- NO_DEFAULT_PATH -- PATHS ${_BLOSC_LIBRARYDIR_SEARCH_DIRS} -- PATH_SUFFIXES ${BLOSC_PATH_SUFFIXES} --) -+ # Static library setup -+ IF (Blosc_USE_STATIC_LIBS) -+ SET(CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP ${CMAKE_FIND_LIBRARY_SUFFIXES}) -+ IF (WIN32) -+ SET ( _blosc_library_name "libblosc" ) -+ ELSE () -+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") -+ ENDIF () -+ ENDIF() - --if(UNIX AND BLOSC_USE_STATIC_LIBS) -- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) -- unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) --endif() -- --# ------------------------------------------------------------------------ --# Cache and set Blosc_FOUND --# ------------------------------------------------------------------------ -- --include(FindPackageHandleStandardArgs) --find_package_handle_standard_args(Blosc -- FOUND_VAR Blosc_FOUND -- REQUIRED_VARS -- Blosc_LIBRARY -- Blosc_INCLUDE_DIR -- VERSION_VAR Blosc_VERSION --) -+ FIND_LIBRARY ( BLOSC_blosc_LIBRARY ${_blosc_library_name} -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) - --if(Blosc_FOUND) -- set(Blosc_LIBRARIES ${Blosc_LIBRARY}) -- set(Blosc_INCLUDE_DIRS ${Blosc_INCLUDE_DIR}) -- set(Blosc_DEFINITIONS ${PC_Blosc_CFLAGS_OTHER}) -+ # Static library tear down -+ IF (Blosc_USE_STATIC_LIBS) -+ SET( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP} ) -+ ENDIF() - -- get_filename_component(Blosc_LIBRARY_DIRS ${Blosc_LIBRARY} DIRECTORY) -+ SET( BLOSC_INCLUDE_DIR "${BLOSC_LOCATION}/include" CACHE STRING "Blosc include directory" ) - -- if(NOT TARGET Blosc::blosc) -- add_library(Blosc::blosc UNKNOWN IMPORTED) -- set_target_properties(Blosc::blosc PROPERTIES -- IMPORTED_LOCATION "${Blosc_LIBRARIES}" -- INTERFACE_COMPILE_DEFINITIONS "${Blosc_DEFINITIONS}" -- INTERFACE_INCLUDE_DIRECTORIES "${Blosc_INCLUDE_DIRS}" -- ) -- endif() --elseif(Blosc_FIND_REQUIRED) -- message(FATAL_ERROR "Unable to find Blosc") --endif() -+ENDIF ( BLOSC_FOUND ) -diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake -index 7f71a72..bb14fb4 100644 ---- a/cmake/FindIlmBase.cmake -+++ b/cmake/FindIlmBase.cmake -@@ -1,4 +1,4 @@ --# Copyright (c) 2012-2019 DreamWorks Animation LLC -+# Copyright (c) 2012-2016 DreamWorks Animation LLC - # - # All rights reserved. This software is distributed under the - # Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ ) -@@ -24,309 +24,162 @@ - # IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE - # LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00. - # --#[=======================================================================[.rst: - --FindIlmBase ------------- -- --Find IlmBase include dirs and libraries -- --Use this module by invoking find_package with the form:: -- -- find_package(IlmBase -- [version] [EXACT] # Minimum or EXACT version -- [REQUIRED] # Fail with error if IlmBase is not found -- [COMPONENTS ...] # IlmBase libraries by their canonical name -- # e.g. "Half" for "libHalf" -- ) -- --IMPORTED Targets --^^^^^^^^^^^^^^^^ -- --``IlmBase::Half`` -- The Half library target. --``IlmBase::Iex`` -- The Iex library target. --``IlmBase::IexMath`` -- The IexMath library target. --``IlmBase::IlmThread`` -- The IlmThread library target. --``IlmBase::Imath`` -- The Imath library target. -- --Result Variables --^^^^^^^^^^^^^^^^ -- --This will define the following variables: -- --``IlmBase_FOUND`` -- True if the system has the IlmBase library. --``IlmBase_VERSION`` -- The version of the IlmBase library which was found. --``IlmBase_INCLUDE_DIRS`` -- Include directories needed to use IlmBase. --``IlmBase_LIBRARIES`` -- Libraries needed to link to IlmBase. --``IlmBase_LIBRARY_DIRS`` -- IlmBase library directories. --``IlmBase_{COMPONENT}_FOUND`` -- True if the system has the named IlmBase component. -- --Cache Variables --^^^^^^^^^^^^^^^ -- --The following cache variables may also be set: -- --``IlmBase_INCLUDE_DIR`` -- The directory containing ``IlmBase/config-auto.h``. --``IlmBase_{COMPONENT}_LIBRARY`` -- Individual component libraries for IlmBase --``IlmBase_{COMPONENT}_DLL`` -- Individual component dlls for IlmBase on Windows. -- --Hints --^^^^^ -- --Instead of explicitly setting the cache variables, the following variables --may be provided to tell this module where to look. -- --``ILMBASE_ROOT`` -- Preferred installation prefix. --``ILMBASE_INCLUDEDIR`` -- Preferred include directory e.g. /include --``ILMBASE_LIBRARYDIR`` -- Preferred library directory e.g. /lib --``SYSTEM_LIBRARY_PATHS`` -- Paths appended to all include and lib searches. -- --#]=======================================================================] -- --# Support new if() IN_LIST operator --if(POLICY CMP0057) -- cmake_policy(SET CMP0057 NEW) --endif() -- --mark_as_advanced( -- IlmBase_INCLUDE_DIR -- IlmBase_LIBRARY --) -- --set(_ILMBASE_COMPONENT_LIST -- Half -- Iex -- IexMath -- IlmThread -- Imath --) -- --if(IlmBase_FIND_COMPONENTS) -- set(ILMBASE_COMPONENTS_PROVIDED TRUE) -- set(_IGNORED_COMPONENTS "") -- foreach(COMPONENT ${IlmBase_FIND_COMPONENTS}) -- if(NOT ${COMPONENT} IN_LIST _ILMBASE_COMPONENT_LIST) -- list(APPEND _IGNORED_COMPONENTS ${COMPONENT}) -- endif() -- endforeach() -- -- if(_IGNORED_COMPONENTS) -- message(STATUS "Ignoring unknown components of IlmBase:") -- foreach(COMPONENT ${_IGNORED_COMPONENTS}) -- message(STATUS " ${COMPONENT}") -- endforeach() -- list(REMOVE_ITEM IlmBase_FIND_COMPONENTS ${_IGNORED_COMPONENTS}) -- endif() --else() -- set(ILMBASE_COMPONENTS_PROVIDED FALSE) -- set(IlmBase_FIND_COMPONENTS ${_ILMBASE_COMPONENT_LIST}) --endif() -- --# Append ILMBASE_ROOT or $ENV{ILMBASE_ROOT} if set (prioritize the direct cmake var) --set(_ILMBASE_ROOT_SEARCH_DIR "") -- --if(ILMBASE_ROOT) -- list(APPEND _ILMBASE_ROOT_SEARCH_DIR ${ILMBASE_ROOT}) --else() -- set(_ENV_ILMBASE_ROOT $ENV{ILMBASE_ROOT}) -- if(_ENV_ILMBASE_ROOT) -- list(APPEND _ILMBASE_ROOT_SEARCH_DIR ${_ENV_ILMBASE_ROOT}) -- endif() --endif() -- --# ------------------------------------------------------------------------ --# Search for IlmBase include DIR --# ------------------------------------------------------------------------ -- --set(_ILMBASE_INCLUDE_SEARCH_DIRS "") --list(APPEND _ILMBASE_INCLUDE_SEARCH_DIRS -- ${ILMBASE_INCLUDEDIR} -- ${_ILMBASE_ROOT_SEARCH_DIR} -- ${PC_IlmBase_INCLUDEDIR} -- ${SYSTEM_LIBRARY_PATHS} --) -- --# Look for a standard IlmBase header file. --find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h -- NO_DEFAULT_PATH -- PATHS ${_ILMBASE_INCLUDE_SEARCH_DIRS} -- PATH_SUFFIXES include/OpenEXR OpenEXR --) -- --if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h") -- # Get the ILMBASE version information from the config header -- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" -- _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR " -- ) -- string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" -- _ilmbase_version_major_string "${_ilmbase_version_major_string}" -- ) -- string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR) -- -- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" -- _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR " -- ) -- string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" -- _ilmbase_version_minor_string "${_ilmbase_version_minor_string}" -- ) -- string(STRIP "${_ilmbase_version_minor_string}" IlmBase_VERSION_MINOR) -- -- unset(_ilmbase_version_major_string) -- unset(_ilmbase_version_minor_string) -- -- set(IlmBase_VERSION ${IlmBase_VERSION_MAJOR}.${IlmBase_VERSION_MINOR}) --endif() -- --# ------------------------------------------------------------------------ --# Search for ILMBASE lib DIR --# ------------------------------------------------------------------------ -- --set(_ILMBASE_LIBRARYDIR_SEARCH_DIRS "") -- --# Append to _ILMBASE_LIBRARYDIR_SEARCH_DIRS in priority order -- --list(APPEND _ILMBASE_LIBRARYDIR_SEARCH_DIRS -- ${ILMBASE_LIBRARYDIR} -- ${_ILMBASE_ROOT_SEARCH_DIR} -- ${PC_IlmBase_LIBDIR} -- ${SYSTEM_LIBRARY_PATHS} --) -- --# Build suffix directories -- --set(ILMBASE_PATH_SUFFIXES -- lib64 -- lib --) -- --if(UNIX) -- list(INSERT ILMBASE_PATH_SUFFIXES 0 lib/x86_64-linux-gnu) --endif() -- --set(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) -- --# library suffix handling --if(WIN32) -- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES -- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.lib" -- ) --else() -- if(ILMBASE_USE_STATIC_LIBS) -- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES -- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.a" -- ) -- else() -- if(APPLE) -- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES -- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.dylib" -- ) -- else() -- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES -- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.so" -- ) -- endif() -- endif() --endif() -- --set(IlmBase_LIB_COMPONENTS "") -- --foreach(COMPONENT ${IlmBase_FIND_COMPONENTS}) -- find_library(IlmBase_${COMPONENT}_LIBRARY ${COMPONENT} -- NO_DEFAULT_PATH -- PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS} -- PATH_SUFFIXES ${ILMBASE_PATH_SUFFIXES} -- ) -- list(APPEND IlmBase_LIB_COMPONENTS ${IlmBase_${COMPONENT}_LIBRARY}) -- -- if(WIN32 AND NOT ILMBASE_USE_STATIC_LIBS) -- set(_ILMBASE_TMP ${CMAKE_FIND_LIBRARY_SUFFIXES}) -- set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") -- find_library(IlmBase_${COMPONENT}_DLL ${COMPONENT} -- NO_DEFAULT_PATH -- PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS} -- PATH_SUFFIXES bin -- ) -- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_TMP}) -- unset(_ILMBASE_TMP) -- endif() -- -- if(IlmBase_${COMPONENT}_LIBRARY) -- set(IlmBase_${COMPONENT}_FOUND TRUE) -- else() -- set(IlmBase_${COMPONENT}_FOUND FALSE) -- endif() --endforeach() -- --# reset lib suffix -- --set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) --unset(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) -- --# ------------------------------------------------------------------------ --# Cache and set ILMBASE_FOUND --# ------------------------------------------------------------------------ -- --include(FindPackageHandleStandardArgs) --find_package_handle_standard_args(IlmBase -- FOUND_VAR IlmBase_FOUND -- REQUIRED_VARS -- IlmBase_INCLUDE_DIR -- IlmBase_LIB_COMPONENTS -- VERSION_VAR IlmBase_VERSION -- HANDLE_COMPONENTS --) -+#-*-cmake-*- -+# - Find ILMBase -+# -+# Author : Nicholas Yue yue.nicholas@gmail.com -+# -+# This auxiliary CMake file helps in find the ILMBASE headers and libraries -+# -+# ILMBASE_FOUND set if ILMBASE is found. -+# ILMBASE_INCLUDE_DIR ILMBASE's include directory -+# ILMBASE_LIBRARYDIR ILMBASE's include directory -+# Ilmbase_HALF_LIBRARY ILMBASE's Half libraries -+# Ilmbase_IEX_LIBRARY ILMBASE's Iex libraries -+# Ilmbase_IEXMATH_LIBRARY ILMBASE's IexMath libraries -+# Ilmbase_ILMTHREAD_LIBRARY ILMBASE's IlmThread libraries -+# Ilmbase_IMATH_LIBRARY ILMBASE's Imath libraries - --if(IlmBase_FOUND) -- set(IlmBase_LIBRARIES ${IlmBase_LIB_COMPONENTS}) -+FIND_PACKAGE ( PackageHandleStandardArgs ) - -- # We have to add both include and include/OpenEXR to the include -- # path in case OpenEXR and IlmBase are installed separately -+FIND_PATH ( ILMBASE_LOCATION include/OpenEXR/IlmBaseConfig.h) - -- set(IlmBase_INCLUDE_DIRS) -- list(APPEND IlmBase_INCLUDE_DIRS -- ${IlmBase_INCLUDE_DIR}/../ -- ${IlmBase_INCLUDE_DIR} -+FIND_PACKAGE_HANDLE_STANDARD_ARGS ( ILMBase -+ REQUIRED_VARS ILMBASE_LOCATION - ) -- set(IlmBase_DEFINITIONS ${PC_IlmBase_CFLAGS_OTHER}) -- -- set(IlmBase_LIBRARY_DIRS "") -- foreach(LIB ${IlmBase_LIB_COMPONENTS}) -- get_filename_component(_ILMBASE_LIBDIR ${LIB} DIRECTORY) -- list(APPEND IlmBase_LIBRARY_DIRS ${_ILMBASE_LIBDIR}) -- endforeach() -- list(REMOVE_DUPLICATES IlmBase_LIBRARY_DIRS) -- -- # Configure imported targets -- -- foreach(COMPONENT ${IlmBase_FIND_COMPONENTS}) -- if(NOT TARGET IlmBase::${COMPONENT}) -- add_library(IlmBase::${COMPONENT} UNKNOWN IMPORTED) -- set_target_properties(IlmBase::${COMPONENT} PROPERTIES -- IMPORTED_LOCATION "${IlmBase_${COMPONENT}_LIBRARY}" -- INTERFACE_COMPILE_OPTIONS "${IlmBase_DEFINITIONS}" -- INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}" -- ) -- endif() -- endforeach() - --elseif(IlmBase_FIND_REQUIRED) -- message(FATAL_ERROR "Unable to find IlmBase") --endif() -+OPTION ( ILMBASE_NAMESPACE_VERSIONING "Namespace versioning of libraries" ON ) -+ -+IF ( ILMBASE_FOUND ) -+ -+ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR ") -+ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" _ilmbase_version_major_unstrip "${_ilmbase_version_major_string}") -+ STRING ( STRIP "${_ilmbase_version_major_unstrip}" ILMBASE_VERSION_MAJOR ) -+ -+ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR ") -+ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" _ilmbase_version_minor_unstrip "${_ilmbase_version_minor_string}") -+ STRING ( STRIP "${_ilmbase_version_minor_unstrip}" ILMBASE_VERSION_MINOR ) -+ -+ IF ( ILMBASE_NAMESPACE_VERSIONING ) -+ SET ( IEX_LIBRARY_NAME Iex-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) -+ SET ( IEXMATH_LIBRARY_NAME IexMath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) -+ SET ( ILMTHREAD_LIBRARY_NAME IlmThread-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) -+ SET ( IMATH_LIBRARY_NAME Imath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) -+ SET ( HALF_LIBRARY_NAME Half-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) -+ ELSE ( ILMBASE_NAMESPACE_VERSIONING ) -+ SET ( IEX_LIBRARY_NAME Iex ) -+ SET ( IEXMATH_LIBRARY_NAME IexMath ) -+ SET ( ILMTHREAD_LIBRARY_NAME IlmThread ) -+ SET ( IMATH_LIBRARY_NAME Imath ) -+ SET ( HALF_LIBRARY_NAME Half ) -+ ENDIF ( ILMBASE_NAMESPACE_VERSIONING ) -+ -+ SET ( ILMBASE_INCLUDE_DIRS -+ ${ILMBASE_LOCATION}/include -+ ${ILMBASE_LOCATION}/include/OpenEXR -+ CACHE STRING "ILMBase include directories") -+ SET ( ILMBASE_LIBRARYDIR ${ILMBASE_LOCATION}/lib -+ CACHE STRING "ILMBase library directories") -+ SET ( ILMBASE_FOUND TRUE ) -+ -+ SET ( ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) -+ IF (Ilmbase_USE_STATIC_LIBS) -+ IF (APPLE) -+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") -+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} ) -+ ELSEIF (WIN32) -+ # Link library -+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") -+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half_static PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex_static PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread_static PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath_static PATHS ${ILMBASE_LIBRARYDIR} ) -+ ELSE (APPLE) -+ SET ( CMAKE_FIND_LIBRARY_SUFFIXES ".a") -+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ ENDIF (APPLE) -+ ELSE (Ilmbase_USE_STATIC_LIBS) -+ IF (APPLE) -+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib") -+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} ) -+ ELSEIF (WIN32) -+ # Link library -+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") -+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) -+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) -+ # Load library -+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") -+ FIND_LIBRARY ( Ilmbase_HALF_DLL ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LOCATION}/bin -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_IEX_DLL ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_IEXMATH_DLL ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_DLL ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_IMATH_DLL ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ ELSE (APPLE) -+ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} -+ NO_DEFAULT_PATH -+ NO_SYSTEM_ENVIRONMENT_PATH -+ ) -+ ENDIF (APPLE) -+ ENDIF () -+ # MUST reset -+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ${ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES}) -+ -+ELSE ( ILMBASE_FOUND ) -+ MESSAGE ( FATAL_ERROR "Unable to find ILMBase, ILMBASE_ROOT = $ENV{ILMBASE_ROOT}") -+ENDIF ( ILMBASE_FOUND ) -diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake -index 2f771ad..a381c6d 100644 ---- a/cmake/FindOpenEXR.cmake -+++ b/cmake/FindOpenEXR.cmake -@@ -1,324 +1,87 @@ --# Copyright (c) 2012-2019 DreamWorks Animation LLC --# --# All rights reserved. This software is distributed under the --# Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ ) --# --# Redistributions of source code must retain the above copyright --# and license notice and the following restrictions and disclaimer. --# --# * Neither the name of DreamWorks Animation nor the names of --# its contributors may be used to endorse or promote products derived --# from this software without specific prior written permission. --# --# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL, --# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --# IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE --# LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00. --# --#[=======================================================================[.rst: -- --FindOpenEXR ------------- -- --Find OpenEXR include dirs and libraries -- --Use this module by invoking find_package with the form:: -- -- find_package(OpenEXR -- [version] [EXACT] # Minimum or EXACT version -- [REQUIRED] # Fail with error if OpenEXR is not found -- [COMPONENTS ...] # OpenEXR libraries by their canonical name -- # e.g. "IlmImf" for "libIlmImf" -- ) -- --IMPORTED Targets --^^^^^^^^^^^^^^^^ -- --``OpenEXR::IlmImf`` -- The IlmImf library target. --``OpenEXR::IlmImfUtil`` -- The IlmImfUtil library target. -- --Result Variables --^^^^^^^^^^^^^^^^ -- --This will define the following variables: -- --``OpenEXR_FOUND`` -- True if the system has the OpenEXR library. --``OpenEXR_VERSION`` -- The version of the OpenEXR library which was found. --``OpenEXR_INCLUDE_DIRS`` -- Include directories needed to use OpenEXR. --``OpenEXR_LIBRARIES`` -- Libraries needed to link to OpenEXR. --``OpenEXR_LIBRARY_DIRS`` -- OpenEXR library directories. --``OpenEXR_DEFINITIONS`` -- Definitions to use when compiling code that uses OpenEXR. --``OpenEXR_{COMPONENT}_FOUND`` -- True if the system has the named OpenEXR component. -- --Cache Variables --^^^^^^^^^^^^^^^ -- --The following cache variables may also be set: -- --``OpenEXR_INCLUDE_DIR`` -- The directory containing ``OpenEXR/config-auto.h``. --``OpenEXR_{COMPONENT}_LIBRARY`` -- Individual component libraries for OpenEXR --``OpenEXR_{COMPONENT}_DLL`` -- Individual component dlls for OpenEXR on Windows. -- --Hints --^^^^^ -- --Instead of explicitly setting the cache variables, the following variables --may be provided to tell this module where to look. -- --``OPENEXR_ROOT`` -- Preferred installation prefix. --``OPENEXR_INCLUDEDIR`` -- Preferred include directory e.g. /include --``OPENEXR_LIBRARYDIR`` -- Preferred library directory e.g. /lib --``SYSTEM_LIBRARY_PATHS`` -- Paths appended to all include and lib searches. -- --#]=======================================================================] -- --# Support new if() IN_LIST operator --if(POLICY CMP0057) -- cmake_policy(SET CMP0057 NEW) --endif() -- --mark_as_advanced( -- OpenEXR_INCLUDE_DIR -- OpenEXR_LIBRARY --) -- --set(_OPENEXR_COMPONENT_LIST -- IlmImf -- IlmImfUtil --) -- --if(OpenEXR_FIND_COMPONENTS) -- set(OPENEXR_COMPONENTS_PROVIDED TRUE) -- set(_IGNORED_COMPONENTS "") -- foreach(COMPONENT ${OpenEXR_FIND_COMPONENTS}) -- if(NOT ${COMPONENT} IN_LIST _OPENEXR_COMPONENT_LIST) -- list(APPEND _IGNORED_COMPONENTS ${COMPONENT}) -- endif() -- endforeach() -- -- if(_IGNORED_COMPONENTS) -- message(STATUS "Ignoring unknown components of OpenEXR:") -- foreach(COMPONENT ${_IGNORED_COMPONENTS}) -- message(STATUS " ${COMPONENT}") -- endforeach() -- list(REMOVE_ITEM OpenEXR_FIND_COMPONENTS ${_IGNORED_COMPONENTS}) -- endif() --else() -- set(OPENEXR_COMPONENTS_PROVIDED FALSE) -- set(OpenEXR_FIND_COMPONENTS ${_OPENEXR_COMPONENT_LIST}) --endif() -- --# Append OPENEXR_ROOT or $ENV{OPENEXR_ROOT} if set (prioritize the direct cmake var) --set(_OPENEXR_ROOT_SEARCH_DIR "") -- --if(OPENEXR_ROOT) -- list(APPEND _OPENEXR_ROOT_SEARCH_DIR ${OPENEXR_ROOT}) --else() -- set(_ENV_OPENEXR_ROOT $ENV{OPENEXR_ROOT}) -- if(_ENV_OPENEXR_ROOT) -- list(APPEND _OPENEXR_ROOT_SEARCH_DIR ${_ENV_OPENEXR_ROOT}) -- endif() --endif() -- --# ------------------------------------------------------------------------ --# Search for OpenEXR include DIR --# ------------------------------------------------------------------------ -- --set(_OPENEXR_INCLUDE_SEARCH_DIRS "") --list(APPEND _OPENEXR_INCLUDE_SEARCH_DIRS -- ${OPENEXR_INCLUDEDIR} -- ${_OPENEXR_ROOT_SEARCH_DIR} -- ${PC_OpenEXR_INCLUDEDIR} -- ${SYSTEM_LIBRARY_PATHS} --) -- --# Look for a standard OpenEXR header file. --find_path(OpenEXR_INCLUDE_DIR OpenEXRConfig.h -- NO_DEFAULT_PATH -- PATHS ${_OPENEXR_INCLUDE_SEARCH_DIRS} -- PATH_SUFFIXES include/OpenEXR OpenEXR --) -- --if(EXISTS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h") -- # Get the EXR version information from the config header -- file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h" -- _openexr_version_major_string REGEX "#define OPENEXR_VERSION_MAJOR " -- ) -- string(REGEX REPLACE "#define OPENEXR_VERSION_MAJOR" "" -- _openexr_version_major_string "${_openexr_version_major_string}" -- ) -- string(STRIP "${_openexr_version_major_string}" OpenEXR_VERSION_MAJOR) -- -- file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h" -- _openexr_version_minor_string REGEX "#define OPENEXR_VERSION_MINOR " -- ) -- string(REGEX REPLACE "#define OPENEXR_VERSION_MINOR" "" -- _openexr_version_minor_string "${_openexr_version_minor_string}" -- ) -- string(STRIP "${_openexr_version_minor_string}" OpenEXR_VERSION_MINOR) -- -- unset(_openexr_version_major_string) -- unset(_openexr_version_minor_string) -- -- set(OpenEXR_VERSION ${OpenEXR_VERSION_MAJOR}.${OpenEXR_VERSION_MINOR}) --endif() -- --# ------------------------------------------------------------------------ --# Search for OPENEXR lib DIR --# ------------------------------------------------------------------------ -- --set(_OPENEXR_LIBRARYDIR_SEARCH_DIRS "") -- --# Append to _OPENEXR_LIBRARYDIR_SEARCH_DIRS in priority order -- --list(APPEND _OPENEXR_LIBRARYDIR_SEARCH_DIRS -- ${OPENEXR_LIBRARYDIR} -- ${_OPENEXR_ROOT_SEARCH_DIR} -- ${PC_OpenEXR_LIBDIR} -- ${SYSTEM_LIBRARY_PATHS} --) -- --# Build suffix directories -- --set(OPENEXR_PATH_SUFFIXES -- lib64 -- lib --) -- --if(UNIX ) -- list(INSERT OPENEXR_PATH_SUFFIXES 0 lib/x86_64-linux-gnu) --endif() -- --set(_OPENEXR_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) -- --# library suffix handling --if(WIN32) -- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES -- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.lib" -- ) --else() -- if(OPENEXR_USE_STATIC_LIBS) -- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES -- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.a" -- ) -- else() -- if(APPLE) -- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES -- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.dylib" -- ) -- else() -- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES -- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.so" -- ) -- endif() -- endif() --endif() -- --set(OpenEXR_LIB_COMPONENTS "") -- --foreach(COMPONENT ${OpenEXR_FIND_COMPONENTS}) -- find_library(OpenEXR_${COMPONENT}_LIBRARY ${COMPONENT} -- NO_DEFAULT_PATH -- PATHS ${_OPENEXR_LIBRARYDIR_SEARCH_DIRS} -- PATH_SUFFIXES ${OPENEXR_PATH_SUFFIXES} -- ) -- list(APPEND OpenEXR_LIB_COMPONENTS ${OpenEXR_${COMPONENT}_LIBRARY}) -- -- if(WIN32 AND NOT OPENEXR_USE_STATIC_LIBS) -- set(_OPENEXR_TMP ${CMAKE_FIND_LIBRARY_SUFFIXES}) -- set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") -- find_library(OpenEXR_${COMPONENT}_DLL ${COMPONENT} -- NO_DEFAULT_PATH -- PATHS ${_OPENEXR_LIBRARYDIR_SEARCH_DIRS} -- PATH_SUFFIXES bin -- ) -- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_OPENEXR_TMP}) -- unset(_OPENEXR_TMP) -- endif() -- -- if(OpenEXR_${COMPONENT}_LIBRARY) -- set(OpenEXR_${COMPONENT}_FOUND TRUE) -- else() -- set(OpenEXR_${COMPONENT}_FOUND FALSE) -- endif() --endforeach() -- --# reset lib suffix -- --set(CMAKE_FIND_LIBRARY_SUFFIXES ${_OPENEXR_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) --unset(_OPENEXR_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) -- --# ------------------------------------------------------------------------ --# Cache and set OPENEXR_FOUND --# ------------------------------------------------------------------------ -- --include(FindPackageHandleStandardArgs) --find_package_handle_standard_args(OpenEXR -- FOUND_VAR OpenEXR_FOUND -- REQUIRED_VARS -- OpenEXR_INCLUDE_DIR -- OpenEXR_LIB_COMPONENTS -- VERSION_VAR OpenEXR_VERSION -- HANDLE_COMPONENTS --) -- --if(OpenEXR_FOUND) -- set(OpenEXR_LIBRARIES ${OpenEXR_LIB_COMPONENTS}) -- -- # We have to add both include and include/OpenEXR to the include -- # path in case OpenEXR and IlmBase are installed separately -- -- set(OpenEXR_INCLUDE_DIRS) -- list(APPEND OpenEXR_INCLUDE_DIRS -- ${OpenEXR_INCLUDE_DIR}/../ -- ${OpenEXR_INCLUDE_DIR} -- ) -- set(OpenEXR_DEFINITIONS ${PC_OpenEXR_CFLAGS_OTHER}) -- -- set(OpenEXR_LIBRARY_DIRS "") -- foreach(LIB ${OpenEXR_LIB_COMPONENTS}) -- get_filename_component(_OPENEXR_LIBDIR ${LIB} DIRECTORY) -- list(APPEND OpenEXR_LIBRARY_DIRS ${_OPENEXR_LIBDIR}) -- endforeach() -- list(REMOVE_DUPLICATES OpenEXR_LIBRARY_DIRS) -- -- # Configure imported target -- -- foreach(COMPONENT ${OpenEXR_FIND_COMPONENTS}) -- if(NOT TARGET OpenEXR::${COMPONENT}) -- add_library(OpenEXR::${COMPONENT} UNKNOWN IMPORTED) -- set_target_properties(OpenEXR::${COMPONENT} PROPERTIES -- IMPORTED_LOCATION "${OpenEXR_${COMPONENT}_LIBRARY}" -- INTERFACE_COMPILE_OPTIONS "${OpenEXR_DEFINITIONS}" -- INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIRS}" -- ) -- endif() -- endforeach() --elseif(OpenEXR_FIND_REQUIRED) -- message(FATAL_ERROR "Unable to find OpenEXR") --endif() -+include(FindPackageHandleStandardArgs) -+ -+find_path(OpenEXR_INCLUDE_DIRS OpenEXR/OpenEXRConfig.h) -+find_path(OPENEXR_INCLUDE_PATHS NAMES ImfRgbaFile.h PATH_SUFFIXES OpenEXR) -+ -+file(STRINGS "${OpenEXR_INCLUDE_DIRS}/OpenEXR/OpenEXRConfig.h" OPENEXR_CONFIG_H) -+ -+string(REGEX REPLACE "^.*define OPENEXR_VERSION_MAJOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MAJOR "${OPENEXR_CONFIG_H}") -+string(REGEX REPLACE "^.*define OPENEXR_VERSION_MINOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MINOR "${OPENEXR_CONFIG_H}") -+set(OpenEXR_LIB_SUFFIX "${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}") -+ -+include(SelectLibraryConfigurations) -+ -+if(NOT OpenEXR_BASE_LIBRARY) -+ find_library(OpenEXR_BASE_LIBRARY_RELEASE NAMES IlmImf-${OpenEXR_LIB_SUFFIX}) -+ find_library(OpenEXR_BASE_LIBRARY_DEBUG NAMES IlmImf-${OpenEXR_LIB_SUFFIX}_d) -+ select_library_configurations(OpenEXR_BASE) -+endif() -+ -+if(NOT OpenEXR_UTIL_LIBRARY) -+ find_library(OpenEXR_UTIL_LIBRARY_RELEASE NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}) -+ find_library(OpenEXR_UTIL_LIBRARY_DEBUG NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}_d) -+ select_library_configurations(OpenEXR_UTIL) -+endif() -+ -+if(NOT OpenEXR_HALF_LIBRARY) -+ find_library(OpenEXR_HALF_LIBRARY_RELEASE NAMES Half-${OpenEXR_LIB_SUFFIX}) -+ find_library(OpenEXR_HALF_LIBRARY_DEBUG NAMES Half-${OpenEXR_LIB_SUFFIX}_d) -+ select_library_configurations(OpenEXR_HALF) -+endif() -+ -+if(NOT OpenEXR_IEX_LIBRARY) -+ find_library(OpenEXR_IEX_LIBRARY_RELEASE NAMES Iex-${OpenEXR_LIB_SUFFIX}) -+ find_library(OpenEXR_IEX_LIBRARY_DEBUG NAMES Iex-${OpenEXR_LIB_SUFFIX}_d) -+ select_library_configurations(OpenEXR_IEX) -+endif() -+ -+if(NOT OpenEXR_MATH_LIBRARY) -+ find_library(OpenEXR_MATH_LIBRARY_RELEASE NAMES Imath-${OpenEXR_LIB_SUFFIX}) -+ find_library(OpenEXR_MATH_LIBRARY_DEBUG NAMES Imath-${OpenEXR_LIB_SUFFIX}_d) -+ select_library_configurations(OpenEXR_MATH) -+endif() -+ -+if(NOT OpenEXR_THREAD_LIBRARY) -+ find_library(OpenEXR_THREAD_LIBRARY_RELEASE NAMES IlmThread-${OpenEXR_LIB_SUFFIX}) -+ find_library(OpenEXR_THREAD_LIBRARY_DEBUG NAMES IlmThread-${OpenEXR_LIB_SUFFIX}_d) -+ select_library_configurations(OpenEXR_THREAD) -+endif() -+ -+if(NOT OpenEXR_IEXMATH_LIBRARY) -+ find_library(OpenEXR_IEXMATH_LIBRARY_RELEASE NAMES IexMath-${OpenEXR_LIB_SUFFIX}) -+ find_library(OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES IexMath-${OpenEXR_LIB_SUFFIX}d) -+ select_library_configurations(OpenEXR_IEXMATH) -+endif() -+ -+set(OPENEXR_HALF_LIBRARY "${OpenEXR_HALF_LIBRARY}") -+set(OPENEXR_IEX_LIBRARY "${OpenEXR_IEX_LIBRARY}") -+set(OPENEXR_IMATH_LIBRARY "${OpenEXR_MATH_LIBRARY}") -+set(OPENEXR_ILMIMF_LIBRARY "${OpenEXR_BASE_LIBRARY}") -+set(OPENEXR_ILMIMFUTIL_LIBRARY "${OpenEXR_UTIL_LIBRARY}") -+set(OPENEXR_ILMTHREAD_LIBRARY "${OpenEXR_THREAD_LIBRARY}") -+ -+set(OpenEXR_LIBRARY "${OpenEXR_BASE_LIBRARY}") -+ -+set(OpenEXR_LIBRARIES -+ ${OpenEXR_LIBRARY} -+ ${OpenEXR_MATH_LIBRARY} -+ ${OpenEXR_IEXMATH_LIBRARY} -+ ${OpenEXR_UTIL_LIBRARY} -+ ${OpenEXR_HALF_LIBRARY} -+ ${OpenEXR_IEX_LIBRARY} -+ ${OpenEXR_THREAD_LIBRARY} -+) -+ -+set(OPENEXR_LIBRARIES -+ ${OPENEXR_HALF_LIBRARY} -+ ${OPENEXR_IEX_LIBRARY} -+ ${OPENEXR_IMATH_LIBRARY} -+ ${OPENEXR_ILMIMF_LIBRARY} -+ ${OPENEXR_ILMTHREAD_LIBRARY} -+) -+ -+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR REQUIRED_VARS OpenEXR_LIBRARIES OpenEXR_INCLUDE_DIRS) -+ -+if(OpenEXR_FOUND) -+ set(OPENEXR_FOUND 1) -+endif() diff --git a/ports/openvdb/0003-fix-cmake.patch b/ports/openvdb/0003-fix-cmake.patch index b70a4756f1204b..5db8cdde9ede53 100644 --- a/ports/openvdb/0003-fix-cmake.patch +++ b/ports/openvdb/0003-fix-cmake.patch @@ -1,90 +1,129 @@ -diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt -index b84d3e6..524a59e 100644 ---- a/openvdb/CMakeLists.txt -+++ b/openvdb/CMakeLists.txt -@@ -71,13 +71,13 @@ message(STATUS "----------------------------------------------------") - # Collect and configure lib dependencies - - if(USE_EXR) -- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED) -- find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED) -+ find_package(IlmBase REQUIRED) -+ find_package(OpenEXR REQUIRED) - else() -- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half) -+ find_package(IlmBase REQUIRED COMPONENTS Half) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3456346..f7e5796 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -354,13 +354,9 @@ endif() + + if(OPENVDB_INSTALL_CMAKE_MODULES) + set(OPENVDB_CMAKE_MODULES +- cmake/FindBlosc.cmake + cmake/FindJemalloc.cmake +- cmake/FindIlmBase.cmake + cmake/FindLog4cplus.cmake +- cmake/FindOpenEXR.cmake + cmake/FindOpenVDB.cmake +- cmake/FindTBB.cmake + cmake/OpenVDBGLFW3Setup.cmake + cmake/OpenVDBHoudiniSetup.cmake + cmake/OpenVDBMayaSetup.cmake +diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake +index 1dc5bc0..d84d8f1 100644 +--- a/cmake/FindOpenVDB.cmake ++++ b/cmake/FindOpenVDB.cmake +@@ -457,7 +457,7 @@ endif() + + # Add standard dependencies + +-find_package(TBB REQUIRED COMPONENTS tbb) ++find_package(TBB CONFIG REQUIRED) + + if(NOT OPENVDB_USE_STATIC_LIBS AND NOT Boost_USE_STATIC_LIBS) + # @note Both of these must be set for Boost 1.70 (VFX2020) to link against +@@ -607,7 +607,7 @@ elseif(NOT OPENVDB_USE_STATIC_LIBS) + endif() + + if(OpenVDB_USES_BLOSC) +- find_package(Blosc REQUIRED) ++ find_package(blosc CONFIG REQUIRED) + endif() + + if(OpenVDB_USES_ZLIB) +@@ -619,7 +619,7 @@ if(OpenVDB_USES_LOG4CPLUS) + endif() + + if(OpenVDB_USES_IMATH_HALF) +- find_package(IlmBase REQUIRED COMPONENTS Half) ++ find_package(IlmBase CONFIG REQUIRED) + if(WIN32) + # @note OPENVDB_OPENEXR_STATICLIB is old functionality and should be removed + if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY)) +@@ -664,7 +664,7 @@ set(_OPENVDB_HIDDEN_DEPENDENCIES) + + if(NOT OPENVDB_USE_STATIC_LIBS) + if(OpenVDB_USES_BLOSC) +- list(APPEND _OPENVDB_HIDDEN_DEPENDENCIES Blosc::blosc) ++ list(APPEND _OPENVDB_HIDDEN_DEPENDENCIES blosc) + endif() + if(OpenVDB_USES_ZLIB) + list(APPEND _OPENVDB_HIDDEN_DEPENDENCIES ZLIB::ZLIB) +diff --git a/openvdb/openvdb/CMakeLists.txt b/openvdb/openvdb/CMakeLists.txt +index 88543df..92efaee 100644 +--- a/openvdb/openvdb/CMakeLists.txt ++++ b/openvdb/openvdb/CMakeLists.txt +@@ -120,7 +120,7 @@ if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_BOOST_VERSION) + endif() endif() -find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbb) +find_package(TBB CONFIG REQUIRED) - find_package(ZLIB ${MINIMUM_ZLIB_VERSION} REQUIRED) - - if(USE_LOG4CPLUS) -@@ -115,15 +115,15 @@ endif() - set(OPENVDB_CORE_DEPENDENT_LIBS - Boost::iostreams - Boost::system -- IlmBase::Half -+ ${Ilmbase_HALF_LIBRARY} - ) - - if(USE_EXR) - list(APPEND OPENVDB_CORE_DEPENDENT_LIBS -- IlmBase::IlmThread -- IlmBase::Iex -- IlmBase::Imath -- OpenEXR::IlmImf -+ ${Ilmbase_ILMTHREAD_LIBRARY} -+ ${Ilmbase_IEX_LIBRARY} -+ ${Ilmbase_IMATH_LIBRARY} -+ ${OPENEXR_ILMIMF_LIBRARY} - ) + if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_TBB_VERSION) + if(${Tbb_VERSION} VERSION_LESS FUTURE_MINIMUM_TBB_VERSION) + message(DEPRECATION "Support for TBB versions < ${FUTURE_MINIMUM_TBB_VERSION} " +@@ -129,7 +129,7 @@ if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_TBB_VERSION) endif() -@@ -135,7 +135,7 @@ endif() + if(USE_IMATH_HALF) +- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half) ++ find_package(IlmBase CONFIG REQUIRED) + if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_ILMBASE_VERSION) + if(${IlmBase_VERSION} VERSION_LESS FUTURE_MINIMUM_ILMBASE_VERSION) + message(DEPRECATION "Support for IlmBase versions < ${FUTURE_MINIMUM_ILMBASE_VERSION} " +@@ -145,14 +145,7 @@ endif() + + if(USE_BLOSC) + # Find Blosc libraries +- find_package(Blosc ${MINIMUM_BLOSC_VERSION} REQUIRED) +- if(Blosc_FOUND AND Blosc_VERSION VERSION_GREATER MINIMUM_BLOSC_VERSION) +- message(WARNING "The version of Blosc located is greater than ${MINIMUM_BLOSC_VERSION}. " +- "There have been reported issues with using later versions of Blosc with OpenVDB. " +- "OpenVDB has been tested fully against Blosc ${MINIMUM_BLOSC_VERSION}, it is " +- "recommended that you use this version where possible." +- ) +- endif() ++ find_package(blosc CONFIG REQUIRED) + else() + message(WARNING "Blosc support is disabled. It is strongly recommended to " + "enable blosc for optimal builds of OpenVDB and to support compatible " +@@ -215,7 +208,7 @@ endif() # See FindOpenVDB.cmake if(USE_BLOSC) - list(APPEND OPENVDB_CORE_DEPENDENT_LIBS Blosc::blosc) -+ list(APPEND OPENVDB_CORE_DEPENDENT_LIBS ${BLOSC_blosc_LIBRARY}) ++ list(APPEND OPENVDB_CORE_DEPENDENT_LIBS blosc) endif() - list(APPEND OPENVDB_CORE_DEPENDENT_LIBS -@@ -160,7 +160,11 @@ endif() - - # @todo Should be target definitions - if(WIN32) -- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL) -+ add_definitions(-D_WIN32 -DNOMINMAX) -+ add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE -D__TBBMALLOC_NO_IMPLICIT_LINKAGE) -+ if (OPENVDB_SHARED) -+ add_definitions(-DOPENEXR_DLL -DOPENVDB_DLL) -+ endif() + if(USE_BLOSC OR USE_ZLIB) +diff --git a/openvdb/openvdb/cmd/CMakeLists.txt b/openvdb/openvdb/cmd/CMakeLists.txt +index 8d9c375..14e1296 100644 +--- a/openvdb/openvdb/cmd/CMakeLists.txt ++++ b/openvdb/openvdb/cmd/CMakeLists.txt +@@ -46,7 +46,7 @@ if(CONCURRENT_MALLOC STREQUAL "Jemalloc") + find_package(Jemalloc REQUIRED) + list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS Jemalloc::jemalloc) + elseif(CONCURRENT_MALLOC STREQUAL "Tbbmalloc") +- find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc) ++ find_package(TBB CONFIG REQUIRED) + list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS TBB::tbbmalloc) endif() - ##### Core library configuration -@@ -374,6 +378,7 @@ list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_PRIVATE") - if(USE_BLOSC) - list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_USE_BLOSC") - endif() -+list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "$<$:/bigobj>") - - # Public defines - -diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt -index 124bc3c..d58b3fe 100644 ---- a/openvdb/cmd/CMakeLists.txt -+++ b/openvdb/cmd/CMakeLists.txt -@@ -155,9 +155,9 @@ if(OPENVDB_BUILD_VDB_RENDER) - # headers - - target_link_libraries(vdb_render -- OpenEXR::IlmImf -- IlmBase::IlmThread -- IlmBase::Iex -+ ${OPENEXR_ILMIMF_LIBRARY} -+ ${Ilmbase_ILMTHREAD_LIBRARY} -+ ${Ilmbase_IEX_LIBRARY} - ${OPENVDB_BINARIES_DEPENDENT_LIBS} - ) +@@ -116,8 +116,8 @@ endif() + #### vdb_render + + if(OPENVDB_BUILD_VDB_RENDER) +- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half Iex IlmThread Imath) +- find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED COMPONENTS IlmImf) ++ find_package(IlmBase CONFIG REQUIRED) ++ find_package(OpenEXR CONFIG REQUIRED) + set(VDB_RENDER_SOURCE_FILES openvdb_render.cc) + add_executable(vdb_render ${VDB_RENDER_SOURCE_FILES}) diff --git a/ports/openvdb/CONTROL b/ports/openvdb/CONTROL deleted file mode 100644 index 5a49417d1a5e76..00000000000000 --- a/ports/openvdb/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: openvdb -Version: 6.1.0 -Build-Depends: boost-ptr-container, openexr, tbb, blosc, boost-iostreams, boost-system, boost-thread, boost-date-time, boost-any, boost-uuid, boost-interprocess, ilmbase -Homepage: https://github.com/dreamworksanimation/openvdb -Description: Sparse volume data structure and tools - -Feature: tools -Description: OpenVDB utilities: view, print and render -Build-Depends: glew, glfw3 diff --git a/ports/openvdb/portfile.cmake b/ports/openvdb/portfile.cmake index 1d837fcf93839d..116cbb34b50913 100644 --- a/ports/openvdb/portfile.cmake +++ b/ports/openvdb/portfile.cmake @@ -1,36 +1,40 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO AcademySoftwareFoundation/openvdb - REF v6.1.0 - SHA512 99ebbb50104ef87792ab73989e8714c4f283fb02d04c3033126b5f0d927ff7bbdebe35c8214ded841692941d8ed8ae551fd6d1bf90ad7dc07bedc3b38b9c4b38 + REF ea786c46b7a1b5158789293d9b148b379fc9914c # v8.1.0 + SHA512 3c4ab3db35b3eb019149ac455f0c7a262081e9866b7e49eaba05424bf837debccf0c987c2555d3c91a2cff2d1ba4b41862f544fd4684558f3a319616ef3c9eb3 HEAD_REF master PATCHES - 0001-remove-pkgconfig.patch - 0002-fix-cmake-modules.patch 0003-fix-cmake.patch ) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(OPENVDB_STATIC ON) - set(OPENVDB_SHARED OFF) -else() - set(OPENVDB_STATIC OFF) - set(OPENVDB_SHARED ON) -endif() +file(REMOVE ${SOURCE_PATH}/cmake/FindTBB.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindIlmBase.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindBlosc.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindOpenEXR.cmake) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" OPENVDB_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" OPENVDB_SHARED) + +set(OPENVDB_BUILD_TOOLS OFF) if ("tools" IN_LIST FEATURES) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(OPENVDB_BUILD_TOOLS ON) else() - message(ERROR "Unable to build tools if static libraries are required") + message(FATAL_ERROR "Unable to build tools if static libraries are required") + endif() +endif() + +if ("ax" IN_LIST FEATURES) + if(NOT VCPKG_TARGET_IS_WINDOWS) + set(OPENVDB_BUILD_AX ON) + else() + message(FATAL_ERROR "Currently no support for building OpenVDB AX on Windows.") endif() endif() -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DOPENVDB_BUILD_UNITTESTS=OFF -DOPENVDB_BUILD_PYTHON_MODULE=OFF @@ -40,33 +44,24 @@ vcpkg_configure_cmake( -DOPENVDB_CORE_SHARED=${OPENVDB_SHARED} -DOPENVDB_BUILD_VDB_PRINT=${OPENVDB_BUILD_TOOLS} -DOPENVDB_BUILD_VDB_VIEW=${OPENVDB_BUILD_TOOLS} - #-DOPENVDB_BUILD_VDB_RENDER=${OPENVDB_BUILD_TOOLS} # Enable vdb_render when https://github.com/openexr/openexr/issues/302 is fixed + -DOPENVDB_BUILD_VDB_RENDER=${OPENVDB_BUILD_TOOLS} -DOPENVDB_BUILD_VDB_LOD=${OPENVDB_BUILD_TOOLS} + -DUSE_PKGCONFIG=OFF + ${OPENVDB_BUILD_AX} ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenVDB TARGET_PATH share/openvdb) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenVDB) vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") if (OPENVDB_BUILD_TOOLS) - # copy tools to tools/openvdb directory - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_print.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_print.exe) - #file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_render.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_render.exe) - #file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_view.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_view.exe) # vdb_view does not support win32 currently. - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_lod.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_lod.exe) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - - # remove debug versions of tools - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_print.exe) - #file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_render.exe) - #file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_view.exe) # vdb_view does not support win32 currently. - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_lod.exe) + vcpkg_copy_tools(TOOL_NAMES vdb_print vdb_render vdb_view vdb_lod AUTO_CLEAN) endif() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/openvdb/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvdb RENAME copyright) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/openvdb/openvdb/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/openvdb/usage b/ports/openvdb/usage new file mode 100644 index 00000000000000..85407878067843 --- /dev/null +++ b/ports/openvdb/usage @@ -0,0 +1,4 @@ +The package openvdb provides CMake targets: + + find_package(OpenVDB CONFIG REQUIRED) + target_link_libraries(main PRIVATE OpenVDB::openvdb) diff --git a/ports/openvdb/vcpkg-cmake-wrapper.cmake.in b/ports/openvdb/vcpkg-cmake-wrapper.cmake.in new file mode 100644 index 00000000000000..7b9e5ac67ac170 --- /dev/null +++ b/ports/openvdb/vcpkg-cmake-wrapper.cmake.in @@ -0,0 +1,12 @@ +set(OPENVDB_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +set(OPENVDB_USE_STATIC_LIBS @OPENVDB_STATIC@) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${OPENVDB_PREV_MODULE_PATH}) diff --git a/ports/openvdb/vcpkg.json b/ports/openvdb/vcpkg.json new file mode 100644 index 00000000000000..242f3f46ea5d98 --- /dev/null +++ b/ports/openvdb/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "openvdb", + "version": "8.1.0", + "description": "Sparse volume data structure and tools", + "homepage": "https://github.com/dreamworksanimation/openvdb", + "dependencies": [ + "blosc", + "boost-any", + "boost-date-time", + "boost-interprocess", + "boost-iostreams", + "boost-ptr-container", + "boost-system", + "boost-thread", + "boost-uuid", + "ilmbase", + "openexr", + "tbb", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "ax": { + "description": "Provides a powerful and easy way of interacting with OpenVDB volume and point data." + }, + "tools": { + "description": "OpenVDB utilities: view, print and render", + "dependencies": [ + "glew", + "glfw3" + ] + } + } +} diff --git a/ports/openvpn3/CMakeLists.txt b/ports/openvpn3/CMakeLists.txt index 70ec9985856509..58514cbb08402e 100644 --- a/ports/openvpn3/CMakeLists.txt +++ b/ports/openvpn3/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(openvpncli CXX) find_path(ASIO_HPP asio.hpp) @@ -12,10 +12,13 @@ if(WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") endif() -add_definitions(-DNOMINMAX -DUSE_ASIO -DUSE_MBEDTLS) +add_definitions(-DNOMINMAX -DUSE_ASIO -DUSE_MBEDTLS -D_WIN32_WINNT=0x0600) +if(LINUX) + add_compile_options(-include bits/endian.h) +endif() add_library(ovpncli client/ovpncli.cpp) -target_link_libraries(ovpncli PRIVATE Iphlpapi.lib ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB} ${MBEDX509_LIB}) +target_link_libraries(ovpncli PRIVATE Iphlpapi.lib Wininet.lib Setupapi.lib Cfgmgr32.lib Rpcrt4.lib Fwpuclnt.lib Wtsapi32.lib ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB} ${MBEDX509_LIB}) install( TARGETS ovpncli @@ -26,5 +29,6 @@ install( if(BUILD_TOOL) add_executable(cli test/ovpncli/cli.cpp) - target_link_libraries(cli PRIVATE ovpncli) + target_compile_definitions(cli PRIVATE -DTAP_WIN_COMPONENT_ID=tap0901) + target_link_libraries(cli PRIVATE ovpncli) endif() diff --git a/ports/openvpn3/CONTROL b/ports/openvpn3/CONTROL deleted file mode 100644 index 3b8899f18bfd48..00000000000000 --- a/ports/openvpn3/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: openvpn3 -Version: 2018-03-21-1 -Build-Depends: asio, tap-windows6 (windows), mbedtls -Description: a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch. diff --git a/ports/openvpn3/portfile.cmake b/ports/openvpn3/portfile.cmake index aede361dd26fbd..e638f1a42c1aff 100644 --- a/ports/openvpn3/portfile.cmake +++ b/ports/openvpn3/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - set(VCPKG_LIBRARY_LINKAGE static) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenVPN/openvpn3 - REF 3d5dd9ee3b4182032044d775de5401fc6a7a63ae - SHA512 6a8ed20662efa576c57f38fb9579c5808f745d44e8cd6a84055bec10a58ede5d27e207a842f79ac6a2f7d986494fbd2415f9d59e2b23bd38e45c68546a227697 + REF release/3.4.1 + SHA512 2d0a7d2d48047c969ba1cb49b34d51c85dd82ae97296d7c096ead13a8e7cc69fa3908262228e29d93f60b7273814d8ef5a402a5d401cd7f91370868d5d308678 HEAD_REF master ) diff --git a/ports/openvpn3/vcpkg.json b/ports/openvpn3/vcpkg.json new file mode 100644 index 00000000000000..ea718ed621af0e --- /dev/null +++ b/ports/openvpn3/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "openvpn3", + "version-string": "3.4.1", + "port-version": 2, + "description": "a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch.", + "dependencies": [ + "asio", + "mbedtls", + { + "name": "tap-windows6", + "platform": "windows" + } + ] +} diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL deleted file mode 100644 index 6e43972bf839b8..00000000000000 --- a/ports/openvr/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: openvr -Version: 1.4.18 -Homepage: https://github.com/ValveSoftware/openvr -Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake index ca2902f5092e9e..9b4b3d6505276c 100644 --- a/ports/openvr/portfile.cmake +++ b/ports/openvr/portfile.cmake @@ -1,47 +1,40 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "osx") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ValveSoftware/openvr - REF 02bc73b9bcfe9cc2d2802bd5fdc91f724de8ef10 - SHA512 5b0b954b09570dcf72f0340d6bcc0a5ba9e754babf33aaee35c9d45ce08f5256643692705b014b8c94b098b554e7882a837cf6a2c25e946e6bc69ba3b9db0ede + REF 4c85abcb7f7f1f02adaf3812018c99fc593bc341 # v1.16.8 + SHA512 366e553e6c9caa2bf884caf41b29a7ae6bdad165aeb56ea469625dc963bd91fd8423e753d07a28f8b6a69eed3939ba5a5e4fb0f84b52074bf6279b510e66f793 HEAD_REF master ) -set(VCPKG_LIBRARY_LINKAGE dynamic) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(ARCH_PATH "win64") -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(ARCH_PATH "win32") +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCH_PATH "win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCH_PATH "win32") + else() + message(FATAL_ERROR "Package only supports x64 and x86 Windows.") + endif() +elseif(VCPKG_TARGET_IS_LINUX) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCH_PATH "linux64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCH_PATH "linux32") + else() + message(FATAL_ERROR "Package only supports x64 and x86 Linux.") + endif() else() - message(FATAL_ERROR "Package only supports x64 and x86 windows.") + message(FATAL_ERROR "Package only supports Windows and Linux.") endif() -if(VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "Package only supports windows desktop.") -endif() +file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/lib - ${CURRENT_PACKAGES_DIR}/debug/bin -) -file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(COPY - ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll - ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file(COPY - ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll - ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file(COPY ${SOURCE_PATH}/headers DESTINATION ${CURRENT_PACKAGES_DIR}) -file(RENAME ${CURRENT_PACKAGES_DIR}/headers ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/bin/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(COPY ${SOURCE_PATH}/bin/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +file(INSTALL ${SOURCE_PATH}/headers DESTINATION ${CURRENT_PACKAGES_DIR} RENAME include) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvr) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/openvr/LICENSE ${CURRENT_PACKAGES_DIR}/share/openvr/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openvr/vcpkg.json b/ports/openvr/vcpkg.json new file mode 100644 index 00000000000000..3a3b00bab4d153 --- /dev/null +++ b/ports/openvr/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "openvr", + "version-string": "1.16.8", + "port-version": 1, + "description": "an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting.", + "homepage": "https://github.com/ValveSoftware/openvr", + "supports": "!(arm | uwp | osx | android)" +} diff --git a/ports/openxr-loader/002-fix-hpp-gen.patch b/ports/openxr-loader/002-fix-hpp-gen.patch new file mode 100644 index 00000000000000..9f58f76268495e --- /dev/null +++ b/ports/openxr-loader/002-fix-hpp-gen.patch @@ -0,0 +1,16 @@ +diff --git a/scripts/hpp_genxr.py b/scripts/hpp_genxr.py +index 6b95fe4..3a19058 100755 +--- a/scripts/hpp_genxr.py ++++ b/scripts/hpp_genxr.py +@@ -80,6 +80,11 @@ def genTarget(args): + "XR_MSFT_controller_model", + # Projection of static string fails + "XR_MSFT_spatial_graph_bridge", ++ "XR_MSFT_spatial_anchor_persistence", ++ "XR_MSFT_holographic_window_attachment", ++ # Projection of UuidMSFT fails ++ "XR_MSFT_scene_understanding", ++ "XR_MSFT_scene_understanding_serialization", + )) + + # Turn lists of names/patterns into matching regular expressions diff --git a/ports/openxr-loader/CONTROL b/ports/openxr-loader/CONTROL deleted file mode 100644 index cff29cb1b8b9ec..00000000000000 --- a/ports/openxr-loader/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: openxr-loader -Version: 1.0.0-2 -Description: Khronos API for abstracting VR/MR/AR hardware - -Feature: vulkan -Description: Vulkan functionality for OpenXR -Build-Depends: vulkan diff --git a/ports/openxr-loader/fix-openxr-sdk-jsoncpp.patch b/ports/openxr-loader/fix-openxr-sdk-jsoncpp.patch new file mode 100644 index 00000000000000..24e6b5149be0ee --- /dev/null +++ b/ports/openxr-loader/fix-openxr-sdk-jsoncpp.patch @@ -0,0 +1,30 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index c75b145..386494c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -66,7 +66,7 @@ if(NOT VULKAN_INCOMPATIBLE) + endif() + + find_package(Threads REQUIRED) +-find_package(JsonCpp) ++find_package(jsoncpp CONFIG REQUIRED) + + ### All options defined here + option(BUILD_LOADER "Build loader" ON) +diff --git a/src/loader/CMakeLists.txt b/src/loader/CMakeLists.txt +index 6a88cf4..0821a3d 100644 +--- a/src/loader/CMakeLists.txt ++++ b/src/loader/CMakeLists.txt +@@ -67,7 +67,11 @@ add_library(openxr_loader ${LIBRARY_TYPE} + ${openxr_loader_RESOURCE_FILE} + ) + if(BUILD_WITH_SYSTEM_JSONCPP) +- target_link_libraries(openxr_loader PRIVATE JsonCpp::JsonCpp) ++ if(BUILD_SHARED_LIBS) ++ target_link_libraries(openxr_loader PRIVATE jsoncpp_lib) ++ else() ++ target_link_libraries(openxr_loader PRIVATE jsoncpp_static) ++ endif() + else() + target_sources(openxr_loader + PRIVATE diff --git a/ports/openxr-loader/portfile.cmake b/ports/openxr-loader/portfile.cmake index efb57b0c3b3ed4..c3046fdf9c7083 100644 --- a/ports/openxr-loader/portfile.cmake +++ b/ports/openxr-loader/portfile.cmake @@ -1,25 +1,38 @@ -if (VCPKG_TARGET_ARCHITECTURE MATCHES "^arm*") - message(FATAL_ERROR "OpenXR does not support arm") -endif() - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - # Due to UWP restricting the usage of static CRT OpenXR cannot be built. - message(FATAL_ERROR "OpenXR does not support UWP") -endif() - -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/OpenXR-SDK - REF release-1.0.0 - SHA512 423079b841a01f3b51283839c565cfa1b8ff38348c3f3d6f62e9120569d4ad540d8d6bfe8010e74d9bbb76aeaedcf273e5e3b1717bb0b424898793fb4712aa58 + REF 960c4a6aa8cc9f47e357c696b5377d817550bf88 + SHA512 515494520a31491587418ab6cb1b28333481e0a20cb25d3f9bc875ac211faf1636641afdfee2ecdf816ea1222305ea52565992953b3bab68fffe40fa25e23145 + HEAD_REF master + PATCHES + fix-openxr-sdk-jsoncpp.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH SDK_SOURCE_PATH + REPO KhronosGroup/OpenXR-SDK-Source + REF 09cbbc9d3bc540a53d5f2d76b8074ddc0b96e933 + SHA512 1fc777d7aaea585dd8e9f9ac60a71a7eb55017183f33e51f987b94af6bba8d7808771abf9fc377c6e2b613f282db08a095595b4bc6899d4eaa6eabb45405dc1b HEAD_REF master + PATCHES + fix-openxr-sdk-jsoncpp.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH HPP_SOURCE_PATH + REPO KhronosGroup/OpenXR-hpp + REF 6fcea9e472622c9c7f4df0b5f0bfe7ff5d8553f7 + SHA512 04d1f9db6fd0a01cdf3274089ab17bf17974ff799b4690561c16067e83710e1422a2aefd070b26023ff832eb58e6a3365297a818c9546ea4c531328bd1fb2de4 + HEAD_REF master + PATCHES + 002-fix-hpp-gen.patch ) # Weird behavior inside the OpenXR loader. On Windows they force shared libraries to use static crt, and # vice-versa. Might be better in future iterations to patch the CMakeLists.txt for OpenXR -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_WINDOWS) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(DYNAMIC_LOADER OFF) set(VCPKG_CRT_LINKAGE dynamic) @@ -40,33 +53,30 @@ vcpkg_configure_cmake( -DBUILD_CONFORMANCE_TESTS=OFF -DDYNAMIC_LOADER=${DYNAMIC_LOADER} -DPYTHON_EXECUTABLE=${PYTHON3} + -DBUILD_WITH_SYSTEM_JSONCPP=ON ) vcpkg_install_cmake() -function(COPY_BINARIES SOURCE DEST) - # hack, because CMAKE_SHARED_LIBRARY_SUFFIX seems to be unpopulated - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(SHARED_LIB_SUFFIX ".dll") - else() - set(SHARED_LIB_SUFFIX ".so") - endif() - file(MAKE_DIRECTORY ${DEST}) - file(GLOB_RECURSE SHARED_BINARIES ${SOURCE}/*${SHARED_LIB_SUFFIX}) - file(COPY ${SHARED_BINARIES} DESTINATION ${DEST}) - file(REMOVE_RECURSE ${SHARED_BINARIES}) -endfunction() +# Generate the OpenXR C++ bindings +set(ENV{OPENXR_REPO} ${SDK_SOURCE_PATH}) +file(STRINGS ${HPP_SOURCE_PATH}/headers.txt HEADER_LIST REGEX "^openxr.*") +foreach(HEADER ${HEADER_LIST}) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${HPP_SOURCE_PATH}/scripts/hpp_genxr.py -registry ${SDK_SOURCE_PATH}/specification/registry/xr.xml -o ${CURRENT_PACKAGES_DIR}/include/openxr ${HEADER} + WORKING_DIRECTORY ${HPP_SOURCE_PATH} + LOGNAME openxrhpp + ) +endforeach() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/OpenXR) +else(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/openxr TARGET_PATH share/OpenXR) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# No CMake files are contained in /share only docs -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) - -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openxr-loader RENAME copyright) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - COPY_BINARIES(${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/bin) - COPY_BINARIES(${CURRENT_PACKAGES_DIR}/debug/lib ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/openxr-loader/vcpkg.json b/ports/openxr-loader/vcpkg.json new file mode 100644 index 00000000000000..43ca0e1907caf9 --- /dev/null +++ b/ports/openxr-loader/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "openxr-loader", + "version-string": "1.0.18", + "port-version": 2, + "description": "Khronos API for abstracting VR/MR/AR hardware", + "supports": "!(arm | uwp)", + "dependencies": [ + "jsoncpp" + ], + "features": { + "vulkan": { + "description": "Vulkan functionality for OpenXR", + "dependencies": [ + "vulkan" + ] + } + } +} diff --git a/ports/optional-bare/CONTROL b/ports/optional-bare/CONTROL deleted file mode 100644 index 0c9fe141114a59..00000000000000 --- a/ports/optional-bare/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: optional-bare -Version: 1.1.0 -Description: A simple version of a C++17-like optional for default-constructible, copyable types, for C++98 and later in a single-file header-only library diff --git a/ports/optional-bare/portfile.cmake b/ports/optional-bare/portfile.cmake index 6474d81c7d6f18..6219df627627c4 100644 --- a/ports/optional-bare/portfile.cmake +++ b/ports/optional-bare/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/optional-bare diff --git a/ports/optional-bare/vcpkg.json b/ports/optional-bare/vcpkg.json new file mode 100644 index 00000000000000..673d184acc268e --- /dev/null +++ b/ports/optional-bare/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "optional-bare", + "version-string": "1.1.0", + "port-version": 1, + "description": "A simple version of a C++17-like optional for default-constructible, copyable types, for C++98 and later in a single-file header-only library" +} diff --git a/ports/optional-lite/CONTROL b/ports/optional-lite/CONTROL deleted file mode 100644 index 076a05640d3ff1..00000000000000 --- a/ports/optional-lite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: optional-lite -Version: 3.2.0 -Description: A C++17-like optional, a nullable object for C++98, C++11 and later in a single-file header-only library diff --git a/ports/optional-lite/portfile.cmake b/ports/optional-lite/portfile.cmake index 1716c89adcbbab..1817a54a9a6d03 100644 --- a/ports/optional-lite/portfile.cmake +++ b/ports/optional-lite/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/optional-lite diff --git a/ports/optional-lite/vcpkg.json b/ports/optional-lite/vcpkg.json new file mode 100644 index 00000000000000..452f75670e083c --- /dev/null +++ b/ports/optional-lite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "optional-lite", + "version-string": "3.2.0", + "port-version": 1, + "description": "A C++17-like optional, a nullable object for C++98, C++11 and later in a single-file header-only library" +} diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL deleted file mode 100644 index c7b8d246f5ce2c..00000000000000 --- a/ports/opus/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: opus -Version: 1.3.1 -Homepage: https://github.com/xiph/opus -Description: Totally open, royalty-free, highly versatile audio codec diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake index bf23718df81d3d..b2e1e3807b04ee 100644 --- a/ports/opus/portfile.cmake +++ b/ports/opus/portfile.cmake @@ -1,21 +1,36 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/opus REF - e85ed7726db5d677c9c0677298ea0cb9c65bdd23 + 5c94ec3205c30171ffd01056f5b4622b7c0ab54c SHA512 - a8c7e5bf383c06f1fdffd44d9b5f658f31eb4800cb59d12da95ddaeb5646f7a7b03025f4663362b888b1374d4cc69154f006ba07b5840ec61ddc1a1af01d6c54 + 2423b1fc86d5b46c32d8e3bde5fc2b410a5c25c001995ce234a94a3a6c7a8b1446fdf19eafe9d6a8a7356fe0857697053db5eb8380d18f8111818aa770b4c4ea HEAD_REF master) -vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + avx AVX_SUPPORTED +) + +if(VCPKG_TARGET_IS_MINGW) + set(STACK_PROTECTOR OFF) + string(APPEND VCPKG_C_FLAGS "-D_FORTIFY_SOURCE=0") + string(APPEND VCPKG_CXX_FLAGS "-D_FORTIFY_SOURCE=0") +else() + set(STACK_PROTECTOR ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${FEATURE_OPTIONS} + -DOPUS_STACK_PROTECTOR=${STACK_PROTECTOR} + PREFER_NINJA) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Opus) vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) file(INSTALL ${SOURCE_PATH}/COPYING diff --git a/ports/opus/vcpkg.json b/ports/opus/vcpkg.json new file mode 100644 index 00000000000000..f1ea43d6952d02 --- /dev/null +++ b/ports/opus/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "opus", + "version-string": "1.3.1", + "port-version": 6, + "description": "Totally open, royalty-free, highly versatile audio codec", + "homepage": "https://github.com/xiph/opus", + "features": { + "avx": { + "description": "Builds the library with avx instruction set" + } + } +} diff --git a/ports/opusfile/CONTROL b/ports/opusfile/CONTROL deleted file mode 100644 index 0ba3167a67f7eb..00000000000000 --- a/ports/opusfile/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: opusfile -Version: 0.11-3 -Homepage: https://github.com/xiph/opusfile -Description: Stand-alone decoder library for .opus streams -Build-Depends: libogg, opus - -Feature: opusurl -Description: Support decoding of http(s) streams -Build-Depends: openssl diff --git a/ports/opusfile/portfile.cmake b/ports/opusfile/portfile.cmake index aae9303f8668d9..ed687167c72668 100644 --- a/ports/opusfile/portfile.cmake +++ b/ports/opusfile/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) @@ -9,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/opusfile - REF v0.11 - SHA512 b67976176ffacbeecacd00815877d1b332e149430b49f68d41d6a2f95e6d291e979214903314e14b4cc3f20e07ec8975b906f12f12aef8c786f74f6160d8791d + REF a55c164e9891a9326188b7d4d216ec9a88373739 # v0.12 + SHA512 cfe90b63b8ec027caf6d472167aba863e62f02650245cf0e4d9a543bb565c9088d38b45f7dc2d42cdfcdac5397c3757f4377c24afee73cac52437c125830c411 HEAD_REF master) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/opusfile/vcpkg.json b/ports/opusfile/vcpkg.json new file mode 100644 index 00000000000000..212c393f55964c --- /dev/null +++ b/ports/opusfile/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "opusfile", + "version-string": "0.12", + "port-version": 1, + "description": "Stand-alone decoder library for .opus streams", + "homepage": "https://github.com/xiph/opusfile", + "supports": "!uwp", + "dependencies": [ + "libogg", + "opus" + ], + "features": { + "opusurl": { + "description": "Support decoding of http(s) streams", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/orc/0003-dependencies-from-vcpkg.patch b/ports/orc/0003-dependencies-from-vcpkg.patch index ae62d9fb0bdacc..fb7c591441744b 100644 --- a/ports/orc/0003-dependencies-from-vcpkg.patch +++ b/ports/orc/0003-dependencies-from-vcpkg.patch @@ -1,10 +1,10 @@ diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt -index 235ced8..0042a88 100644 +index 3d4a162..6926bc3 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt -@@ -218,12 +218,13 @@ endif(BUILD_LIBHDFSPP) +@@ -230,12 +230,13 @@ endif(BUILD_LIBHDFSPP) add_library (orc STATIC ${SOURCE_FILES}) - + target_link_libraries (orc - protobuf - zlib @@ -16,42 +16,23 @@ index 235ced8..0042a88 100644 + protobuf::libprotobuf + ZLIB::ZLIB + Snappy::snappy -+ ${LZ4_STATIC_LIB} -+ ${ZSTD_STATIC_LIB} ++ lz4::lz4 ++ $,zstd::libzstd_shared,zstd::libzstd_static> + ${LIBHDFSPP_LIBRARIES} ) - + install(TARGETS orc DESTINATION lib) -diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt -index db68578..709ad07 100644 ---- a/c++/test/CMakeLists.txt -+++ b/c++/test/CMakeLists.txt -@@ -50,10 +50,10 @@ add_executable (orc-test - - target_link_libraries (orc-test - orc -- lz4 -- protobuf -- snappy -- zlib -+ protobuf::libprotobuf -+ ZLIB::ZLIB -+ Snappy::snappy -+ ${LZ4_STATIC_LIB} - ${GTEST_LIBRARIES} - ) - diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake -index 1a28b1a..89f57d8 100644 +index 3a35325..56ffd74 100644 --- a/cmake_modules/ThirdpartyToolchain.cmake +++ b/cmake_modules/ThirdpartyToolchain.cmake @@ -59,8 +59,8 @@ endif () # ---------------------------------------------------------------------- # Snappy - + -if (NOT "${SNAPPY_HOME}" STREQUAL "") - find_package (Snappy REQUIRED) -+if (NOT "${SNAPPY_HOME}" STREQUAL "" OR 1) ++if (1) + find_package (Snappy CONFIG REQUIRED) set(SNAPPY_VENDORED FALSE) else () @@ -59,7 +40,7 @@ index 1a28b1a..89f57d8 100644 @@ -78,10 +78,6 @@ else () set(SNAPPY_VENDORED TRUE) endif () - + -include_directories (SYSTEM ${SNAPPY_INCLUDE_DIR}) -add_library (snappy STATIC IMPORTED) -set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB}) @@ -67,20 +48,19 @@ index 1a28b1a..89f57d8 100644 if (SNAPPY_VENDORED) add_dependencies (snappy snappy_ep) if (INSTALL_VENDORED_LIBS) -@@ -93,7 +89,8 @@ endif () +@@ -93,7 +89,7 @@ endif () # ---------------------------------------------------------------------- # ZLIB - + -if (NOT "${ZLIB_HOME}" STREQUAL "") -+ -+if (NOT "${ZLIB_HOME}" STREQUAL "" OR 1) ++if (1) find_package (ZLIB REQUIRED) set(ZLIB_VENDORED FALSE) else () -@@ -120,10 +117,6 @@ else () +@@ -120,10 +116,6 @@ else () set(ZLIB_VENDORED TRUE) endif () - + -include_directories (SYSTEM ${ZLIB_INCLUDE_DIR}) -add_library (zlib STATIC IMPORTED) -set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_STATIC_LIB}) @@ -88,22 +68,21 @@ index 1a28b1a..89f57d8 100644 if (ZLIB_VENDORED) add_dependencies (zlib zlib_ep) if (INSTALL_VENDORED_LIBS) -@@ -134,9 +127,8 @@ endif () - +@@ -135,8 +127,8 @@ endif () # ---------------------------------------------------------------------- # Zstd -- + -if (NOT "${ZSTD_HOME}" STREQUAL "") -- find_package (zstd REQUIRED) -+if (NOT "${ZSTD_HOME}" STREQUAL "" OR 1) -+ find_library(ZSTD_STATIC_LIB NAMES zstd zstd_static) +- find_package (ZSTD REQUIRED) ++if (1) ++ find_package (zstd CONFIG REQUIRED) set(ZSTD_VENDORED FALSE) else () set(ZSTD_HOME "${THIRDPARTY_DIR}/zstd_ep-install") @@ -169,10 +161,6 @@ else () set(ZSTD_VENDORED TRUE) endif () - + -include_directories (SYSTEM ${ZSTD_INCLUDE_DIR}) -add_library (zstd STATIC IMPORTED) -set_target_properties (zstd PROPERTIES IMPORTED_LOCATION ${ZSTD_STATIC_LIB}) @@ -111,22 +90,21 @@ index 1a28b1a..89f57d8 100644 if (ZSTD_VENDORED) add_dependencies (zstd zstd_ep) if (INSTALL_VENDORED_LIBS) -@@ -183,9 +171,8 @@ endif () - +@@ -184,8 +172,8 @@ endif () # ---------------------------------------------------------------------- # LZ4 -- + -if (NOT "${LZ4_HOME}" STREQUAL "") - find_package (LZ4 REQUIRED) -+if (NOT "${LZ4_HOME}" STREQUAL "" OR 1) -+ find_library(LZ4_STATIC_LIB NAMES lz4d lz4) ++if (1) ++ find_package (lz4 CONFIG REQUIRED) set(LZ4_VENDORED FALSE) else () set(LZ4_PREFIX "${THIRDPARTY_DIR}/lz4_ep-install") -@@ -211,10 +198,6 @@ else () +@@ -211,10 +199,6 @@ else () set(LZ4_VENDORED TRUE) endif () - + -include_directories (SYSTEM ${LZ4_INCLUDE_DIR}) -add_library (lz4 STATIC IMPORTED) -set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_STATIC_LIB}) @@ -134,24 +112,21 @@ index 1a28b1a..89f57d8 100644 if (LZ4_VENDORED) add_dependencies (lz4 lz4_ep) if (INSTALL_VENDORED_LIBS) -@@ -287,9 +270,8 @@ endif () - +@@ -288,8 +272,8 @@ endif () # ---------------------------------------------------------------------- # Protobuf -- + -if (NOT "${PROTOBUF_HOME}" STREQUAL "") - find_package (Protobuf REQUIRED) -+if (NOT "${PROTOBUF_HOME}" STREQUAL "" OR 1) -+ find_package (protobuf CONFIG REQUIRED) ++if (1) ++ find_package (Protobuf CONFIG REQUIRED) set(PROTOBUF_VENDORED FALSE) else () set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install") -@@ -325,14 +307,6 @@ else () - set(PROTOBUF_VENDORED TRUE) - endif () - --include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR}) -- +@@ -327,12 +311,6 @@ endif () + + include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR}) + -add_library (protobuf STATIC IMPORTED) -set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_STATIC_LIB}) - @@ -162,23 +137,26 @@ index 1a28b1a..89f57d8 100644 add_dependencies (protoc protobuf_ep) add_dependencies (protobuf protobuf_ep) diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt -index f5a53ca..15391bf 100644 +index f5a53ca..ec22e7a 100644 --- a/tools/src/CMakeLists.txt +++ b/tools/src/CMakeLists.txt @@ -51,7 +51,6 @@ add_executable (orc-metadata - + target_link_libraries (orc-metadata orc - protobuf ${CMAKE_THREAD_LIBS_INIT} ) - -@@ -95,4 +94,7 @@ install(TARGETS - orc-contents - orc-metadata - orc-statistics + +@@ -92,7 +91,7 @@ target_link_libraries (csv-import + ) + + install(TARGETS +- orc-contents +- orc-metadata +- orc-statistics - DESTINATION bin) -+ orc-scan -+ orc-memory -+ csv-import -+ DESTINATION tools/orc) ++ orc-scan ++ orc-memory ++ csv-import ++ DESTINATION tools/orc) diff --git a/ports/orc/0005-disable-tzdata.patch b/ports/orc/0005-disable-tzdata.patch new file mode 100644 index 00000000000000..829bd18b1fd3f4 --- /dev/null +++ b/ports/orc/0005-disable-tzdata.patch @@ -0,0 +1,30 @@ +diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt +index ea39023..599d79a 100644 +--- a/c++/test/CMakeLists.txt ++++ b/c++/test/CMakeLists.txt +@@ -67,6 +67,7 @@ target_link_libraries (create-test-files + protobuf + ) + ++if (ENABLE_TEST) + if (TEST_VALGRIND_MEMCHECK) + add_test (orc-test + valgrind --tool=memcheck --leak-check=full --error-exitcode=1 ./orc-test) +@@ -86,3 +87,4 @@ if (WIN32) + ENVIRONMENT "TZDIR=${TZDATA_DIR}" + ) + endif () ++endif() +diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake +index 3a35325..364470b 100644 +--- a/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cmake_modules/ThirdpartyToolchain.cmake +@@ -226,7 +226,7 @@ endif () + # ---------------------------------------------------------------------- + # IANA - Time Zone Database + +-if (WIN32) ++if (WIN32 AND TEST_VALGRIND_MEMCHECK) + ExternalProject_Add(tzdata_ep + URL "ftp://cygwin.osuosl.org/pub/cygwin/noarch/release/tzdata/tzdata-2019b-1.tar.xz" + URL_HASH MD5=17D8AB346BB1009D4EB35BC08040E51D diff --git a/ports/orc/CONTROL b/ports/orc/CONTROL deleted file mode 100644 index 4cb08a81414164..00000000000000 --- a/ports/orc/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: orc -Version: 1.5.5-1 -Build-Depends: zlib, protobuf, lz4, snappy, zstd, gtest -Description: The smallest, fastest columnar storage for Hadoop workloads. diff --git a/ports/orc/no-werror.patch b/ports/orc/no-werror.patch deleted file mode 100644 index d2572612f0e5bb..00000000000000 --- a/ports/orc/no-werror.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4484e373..87b5ed41 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -81,9 +81,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set (WARN_FLAGS "${WARN_FLAGS} -Wno-covered-switch-default") - set (WARN_FLAGS "${WARN_FLAGS} -Wno-missing-noreturn -Wno-unknown-pragmas") - set (WARN_FLAGS "${WARN_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") -- set (WARN_FLAGS "${WARN_FLAGS} -Wconversion -Werror") -+ set (WARN_FLAGS "${WARN_FLAGS} -Wconversion") - elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") -- set (WARN_FLAGS "-Wall -Wno-unknown-pragmas -Wconversion -Werror") -+ set (WARN_FLAGS "-Wall -Wno-unknown-pragmas -Wconversion") - if (CMAKE_CXX_COMPILER_VERSION STREQUAL "" OR - CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7") - set (CXX11_FLAGS "-std=c++0x") diff --git a/ports/orc/portfile.cmake b/ports/orc/portfile.cmake index f993755e9f4b11..722b6a10a5f0b5 100644 --- a/ports/orc/portfile.cmake +++ b/ports/orc/portfile.cmake @@ -1,14 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/orc - REF 47a490f083bd411bf04bfed8131eef42606d7789 - SHA512 c2650d9fd367a5ec04c79c16434728e5c20608131f21bfc89d412cbaf8dd4ae5900b03e59df21d3617d8c6a9504e4b14b1f788157afa90b57d733499d2995e39 + REF 23ecc03e87548f6d6783c2d8af2b46672c52214c # rel/release-1.6.4 + SHA512 907984c7e036ddaa90e7cbfabb9af4f6fd3520820b9a8732b304f2213030f7d67cef89ad87d50e028a51bff06f68ff359345ad6894850e299b2fca343d7c0c3e HEAD_REF master PATCHES - 0003-dependencies-from-vcpkg.patch - no-werror.patch + 0003-dependencies-from-vcpkg.patch + 0005-disable-tzdata.patch ) file(REMOVE "${SOURCE_PATH}/cmake_modules/FindGTest.cmake") @@ -24,7 +22,7 @@ else() set(PROTOBUF_EXECUTABLE ${CURRENT_INSTALLED_DIR}/tools/protobuf/protoc) endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_WINDOWS) set(BUILD_TOOLS OFF) else() set(BUILD_TOOLS ON) @@ -34,15 +32,18 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_TOOLS=${BUILD_TOOLS} - -DBUILD_CPP_TESTS=OFF - -DBUILD_JAVA=OFF - -DINSTALL_VENDORED_LIBS=OFF - -DBUILD_LIBHDFSPP=OFF - -DPROTOBUF_EXECUTABLE:FILEPATH=${PROTOBUF_EXECUTABLE} + -DBUILD_TOOLS=${BUILD_TOOLS} + -DBUILD_CPP_TESTS=OFF + -DBUILD_JAVA=OFF + -DINSTALL_VENDORED_LIBS=OFF + -DBUILD_LIBHDFSPP=OFF + -DPROTOBUF_EXECUTABLE:FILEPATH=${PROTOBUF_EXECUTABLE} + -DSTOP_BUILD_ON_WARNING=OFF + -DENABLE_TEST=OFF ) vcpkg_install_cmake() +vcpkg_copy_pdbs() file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/bin/orc-*) if(TOOLS) @@ -58,8 +59,6 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/orc RENAME copyright) - -vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/orc/vcpkg.json b/ports/orc/vcpkg.json new file mode 100644 index 00000000000000..7f87b3c6236d10 --- /dev/null +++ b/ports/orc/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "orc", + "version-string": "1.6.4", + "port-version": 2, + "description": "The smallest, fastest columnar storage for Hadoop workloads.", + "homepage": "https://orc.apache.org/", + "dependencies": [ + "gtest", + "lz4", + "protobuf", + "snappy", + "zlib", + "zstd" + ] +} diff --git a/ports/orocos-kdl/CONTROL b/ports/orocos-kdl/CONTROL deleted file mode 100644 index 983219ca0c991d..00000000000000 --- a/ports/orocos-kdl/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: orocos-kdl -Version: 1.4-1 -Description: Kinematics and Dynamics Library -Build-Depends: eigen3 diff --git a/ports/orocos-kdl/export-include-dir.patch b/ports/orocos-kdl/export-include-dir.patch new file mode 100644 index 00000000000000..8c75f56754ace8 --- /dev/null +++ b/ports/orocos-kdl/export-include-dir.patch @@ -0,0 +1,13 @@ +diff --git a/orocos_kdl/src/CMakeLists.txt b/orocos_kdl/src/CMakeLists.txt +index 079ca8a..07eff4f 100644 +--- a/orocos_kdl/src/CMakeLists.txt ++++ b/orocos_kdl/src/CMakeLists.txt +@@ -126,7 +126,7 @@ ENDIF() + #####end RPATH + + # Needed so that the generated config.h can be used +-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) ++TARGET_INCLUDE_DIRECTORIES(orocos-kdl PUBLIC $ $) + TARGET_LINK_LIBRARIES(orocos-kdl ${Boost_LIBRARIES}) + + INSTALL(TARGETS orocos-kdl diff --git a/ports/orocos-kdl/portfile.cmake b/ports/orocos-kdl/portfile.cmake index 58e28a045b5811..784987f7b2256b 100644 --- a/ports/orocos-kdl/portfile.cmake +++ b/ports/orocos-kdl/portfile.cmake @@ -1,47 +1,30 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO orocos/orocos_kinematics_dynamics REF v1.4.0 SHA512 7156465e2aff02f472933617512069355836a03a02d4587cfe03c1b1d667a9762a4e3ed6e055b2a44f1fce1b6746179203c7204389626a7b458dcab1b28930d8 HEAD_REF master + PATCHES export-include-dir.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/orocos_kdl - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/orocos_kdl/cmake TARGET_PATH share/orocos_kdl) +file(READ ${CURRENT_PACKAGES_DIR}/share/orocos_kdl/orocos_kdl-config.cmake _contents) +string(REPLACE "\${CMAKE_CURRENT_LIST_DIR}/../../.." "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") +string(REPLACE "\${_IMPORT_PREFIX}" "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/orocos_kdl/orocos_kdl-config.cmake "${_contents}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/doc/liborocos-kdl) - - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/orocos_kdl/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/orocos-kdl RENAME copyright) - -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME orocos-kdl) +file(INSTALL ${SOURCE_PATH}/orocos_kdl/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/orocos-kdl/vcpkg.json b/ports/orocos-kdl/vcpkg.json new file mode 100644 index 00000000000000..4535b0f93ad36f --- /dev/null +++ b/ports/orocos-kdl/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "orocos-kdl", + "version": "1.4", + "port-version": 4, + "description": "Kinematics and Dynamics Library.", + "homepage": "https://github.com/orocos/orocos_kinematics_dynamics", + "dependencies": [ + "eigen3" + ] +} diff --git a/ports/osg-qt/CMakeLists.patch b/ports/osg-qt/CMakeLists.patch new file mode 100644 index 00000000000000..0a60fb416be204 --- /dev/null +++ b/ports/osg-qt/CMakeLists.patch @@ -0,0 +1,16 @@ +diff --git a/src/osgQOpenGL/CMakeLists.txt b/src/osgQOpenGL/CMakeLists.txt +--- a/src/osgQOpenGL/CMakeLists.txt ++++ b/src/osgQOpenGL/CMakeLists.txt +@@ -14,7 +14,11 @@ + ${HEADER_PATH}/OSGRenderer + ) + +- qt5_wrap_cpp(SOURCES_H_MOC ${SOURCE_H} #[[OPTIONS ${MOC_OPTIONS}]]) ++ FOREACH(HEADER_FILE ${SOURCE_H}) ++ get_filename_component(HEADER_FILE_NAME "${CMAKE_CURRENT_LIST_DIR}/${HEADER_FILE}" NAME) ++ qt5_wrap_cpp(HEADER_FILE_MOC ${HEADER_FILE} OPTIONS "-f") ++ LIST(APPEND SOURCES_H_MOC ${HEADER_FILE_MOC}) ++ ENDFOREACH() + + SET(TARGET_H + ${SOURCE_H} diff --git a/ports/osg-qt/CONTROL b/ports/osg-qt/CONTROL deleted file mode 100644 index acc5db392e9e8e..00000000000000 --- a/ports/osg-qt/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: osg-qt -Version: Qt4 -Description: osgQt - Qt project for making use of OpenSceneGraph(OSG) -Build-Depends: osg, protobuf, qt5-base \ No newline at end of file diff --git a/ports/osg-qt/OsgMacroUtils.patch b/ports/osg-qt/OsgMacroUtils.patch index 96f040cd397518..d46f1f90ae8ebb 100644 --- a/ports/osg-qt/OsgMacroUtils.patch +++ b/ports/osg-qt/OsgMacroUtils.patch @@ -1,8 +1,8 @@ --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake -@@ -88,7 +88,7 @@ MACRO(LINK_CORELIB_DEFAULT CORELIB_NAME) +@@ -92,7 +92,7 @@ MACRO(LINK_CORELIB_DEFAULT CORELIB_NAME) ENDIF() - + LINK_EXTERNAL(${CORELIB_NAME} ${ALL_GL_LIBRARIES}) - LINK_WITH_VARIABLES(${CORELIB_NAME} OPENTHREADS_LIBRARY) + #LINK_WITH_VARIABLES(${CORELIB_NAME} OPENTHREADS_LIBRARY) diff --git a/ports/osg-qt/fix-static-install.patch b/ports/osg-qt/fix-static-install.patch new file mode 100644 index 00000000000000..4b2597c925fc0e --- /dev/null +++ b/ports/osg-qt/fix-static-install.patch @@ -0,0 +1,57 @@ +diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake +index eb26ba2..14b8bca 100644 +--- a/CMakeModules/ModuleInstall.cmake ++++ b/CMakeModules/ModuleInstall.cmake +@@ -40,10 +40,10 @@ + ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev + ) + +-IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ++IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH) + GET_TARGET_PROPERTY(PREFIX ${LIB_NAME} PREFIX) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${LIB_NAME}${CMAKE_BUILD_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph) +-ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ++ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH) + + IF(NOT OSG_COMPILE_FRAMEWORKS) + INSTALL ( +diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake +index 5688f8f..329f862 100644 +--- a/CMakeModules/OsgMacroUtils.cmake ++++ b/CMakeModules/OsgMacroUtils.cmake +@@ -333,9 +333,9 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME) + RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT} + ARCHIVE DESTINATION lib/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev + LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) +- IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ++ IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_BUILD_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) +- ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ++ ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH) + ELSE(WIN32) + INSTALL(TARGETS ${TARGET_TARGETNAME} + RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT} +@@ -436,9 +436,9 @@ MACRO(SETUP_APPLICATION APPLICATION_NAME) + INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin BUNDLE DESTINATION bin) + ELSE(APPLE) + INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph ) +- IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ++ IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH) + INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_NAME}${CMAKE_BUILD_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph) +- ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ++ ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH) + ENDIF(APPLE) + + ENDMACRO(SETUP_APPLICATION) +@@ -468,9 +468,9 @@ MACRO(SETUP_EXAMPLE EXAMPLE_NAME) + INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin ) + ELSE(APPLE) + INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples ) +- IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ++ IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_BUILD_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples) +- ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ++ ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH) + ENDIF(APPLE) + + ENDMACRO(SETUP_EXAMPLE) diff --git a/ports/osg-qt/portfile.cmake b/ports/osg-qt/portfile.cmake index f78dbf37fc9b56..97937f13d47ba9 100644 --- a/ports/osg-qt/portfile.cmake +++ b/ports/osg-qt/portfile.cmake @@ -1,19 +1,32 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO openscenegraph/osgQt - REF Qt4 - SHA512 426a4ba88f680978d24817248b99c68cafa4517144e6e3d2480612870c4a224bb955539cacb438274d4ee1c93c36d94f8437d142070b2ecde2b81517bf357e71 + REF 2cb70673a4e83a618290e7ee66d52402a94ec3f6 + SHA512 29aeb5b31e70d5b12e69de7970b36ab7d1541c984873384a46c6468394e8562688c46ef39179820990817c94f283c7836c2c6ff207eefe385086d850ba3f8306 HEAD_REF master - PATCHES + PATCHES OsgMacroUtils.patch + fix-static-install.patch + CMakeLists.patch ) +if(VCPKG_TARGET_IS_OSX) + string(APPEND VCPKG_CXX_FLAGS " -stdlib=libc++") + string(APPEND VCPKG_C_FLAGS "") # both must be set +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS -DDYNAMIC_OPENSCENEGRAPH=ON) +else() + set(OPTIONS -DDYNAMIC_OPENSCENEGRAPH=OFF) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS ${OPTIONS} + -DBUILD_OSG_EXAMPLES=OFF + -DOSG_BUILD_APPLICATION_BUNDLES=OFF ) vcpkg_install_cmake() @@ -22,5 +35,5 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle License -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osg-qt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/osg-qt/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osg-qt/copyright) \ No newline at end of file +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/osg-qt/vcpkg.json b/ports/osg-qt/vcpkg.json new file mode 100644 index 00000000000000..06848711055c55 --- /dev/null +++ b/ports/osg-qt/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "osg-qt", + "version-string": "Qt5", + "port-version": 2, + "description": "osgQt - Qt project for making use of OpenSceneGraph(OSG)", + "dependencies": [ + "osg", + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL deleted file mode 100644 index f677e0284b9b12..00000000000000 --- a/ports/osg/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: osg -Version: 3.6.4 -Homepage: https://github.com/openscenegraph/OpenSceneGraph -Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. -Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff, fontconfig - -Feature: collada -Description: Support for Collada (.dae) files -Build-Depends: collada-dom diff --git a/ports/osg/disable-present3d-staticview-in-linux.patch b/ports/osg/disable-present3d-staticview-in-linux.patch new file mode 100644 index 00000000000000..fd76db35bb59b6 --- /dev/null +++ b/ports/osg/disable-present3d-staticview-in-linux.patch @@ -0,0 +1,36 @@ +diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt +index ab491c6..bee3d1f 100644 +--- a/applications/CMakeLists.txt ++++ b/applications/CMakeLists.txt +@@ -32,12 +32,16 @@ IF(DYNAMIC_OPENSCENEGRAPH) + ADD_SUBDIRECTORY(osgconv) + ADD_SUBDIRECTORY(osgfilecache) + ADD_SUBDIRECTORY(osgversion) +- ADD_SUBDIRECTORY(present3D) ++ if (NOT UNIX) ++ ADD_SUBDIRECTORY(present3D) ++ endif() + ELSE() + # need to define this on win32 or linker cries about _declspecs + ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC) + + ADD_SUBDIRECTORY(osgversion) +- ADD_SUBDIRECTORY(present3D) ++ if (NOT UNIX) ++ ADD_SUBDIRECTORY(present3D) ++ endif() + ENDIF() + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 788e507..3c550bc 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -245,7 +245,7 @@ ELSE(DYNAMIC_OPENSCENEGRAPH) + + IF(OSG_BUILD_PLATFORM_IPHONE) + ADD_SUBDIRECTORY(osgviewerIPhone) +- ELSE() ++ ELSEIF (NOT UNIX) + ADD_SUBDIRECTORY(osgstaticviewer) + ENDIF() + diff --git a/ports/osg/fix-builderror-with-libtiff.patch b/ports/osg/fix-builderror-with-libtiff.patch new file mode 100644 index 00000000000000..d3a938e423fbb5 --- /dev/null +++ b/ports/osg/fix-builderror-with-libtiff.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeModules/OsgAndroidMacroUtils.cmake b/CMakeModules/OsgAndroidMacroUtils.cmake +index 50c22e0..8e79b09 100644 +--- a/CMakeModules/OsgAndroidMacroUtils.cmake ++++ b/CMakeModules/OsgAndroidMacroUtils.cmake +@@ -118,7 +118,7 @@ MACRO(ANDROID_3RD_PARTY) + #set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${TIFF_INCLUDE_DIR}/Android.mk \n") + if(TIFF_INCLUDE_DIR) + message(STATUS "TIF found ${TIFF_INCLUDE_DIR}" ) +- set(TIFF_FOUND "Yes") ++ #set(TIFF_FOUND "Yes") + install(DIRECTORY 3rdparty/build/libtiff/ DESTINATION ./ ) + else(TIFF_INCLUDE_DIR) + message(STATUS "TIF missing" ) +diff --git a/src/osgPlugins/CMakeLists.txt b/src/osgPlugins/CMakeLists.txt +index 77d66f8..1504bf9 100644 +--- a/src/osgPlugins/CMakeLists.txt ++++ b/src/osgPlugins/CMakeLists.txt +@@ -115,7 +115,7 @@ IF(PNG_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) + ADD_PLUGIN_DIRECTORY(png) + ENDIF() + IF(TIFF_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) +- ADD_PLUGIN_DIRECTORY(tiff) ++ #ADD_PLUGIN_DIRECTORY(tiff) + ENDIF() + IF(GDAL_FOUND) + ADD_PLUGIN_DIRECTORY(gdal) diff --git a/ports/osg/fix-curl.patch b/ports/osg/fix-curl.patch new file mode 100644 index 00000000000000..e95fbee5dc3dbc --- /dev/null +++ b/ports/osg/fix-curl.patch @@ -0,0 +1,18 @@ +diff --git a/src/osgPlugins/curl/CMakeLists.txt b/src/osgPlugins/curl/CMakeLists.txt +index cc459ff..370dbec 100644 +--- a/src/osgPlugins/curl/CMakeLists.txt ++++ b/src/osgPlugins/curl/CMakeLists.txt +@@ -23,11 +23,11 @@ SET(TARGET_H + + IF(ZLIB_FOUND) + SET(TARGET_LIBRARIES_VARS +- CURL_LIBRARY ++ CURL_LIBRARIES + ZLIB_LIBRARIES) + ELSE() + SET(TARGET_LIBRARIES_VARS +- CURL_LIBRARY) ++ CURL_LIBRARIES) + ENDIF() + + IF(WIN32 OR MINGW) diff --git a/ports/osg/fix-dependency-coin.patch b/ports/osg/fix-dependency-coin.patch new file mode 100644 index 00000000000000..b04318683331b5 --- /dev/null +++ b/ports/osg/fix-dependency-coin.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 798b8b9..c975d78 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -740,7 +740,7 @@ ELSE() + # Common to all platforms except android: + FIND_PACKAGE(Freetype) + FIND_PACKAGE(ilmbase) +- FIND_PACKAGE(Inventor) ++ FIND_PACKAGE(coin CONFIG) + FIND_PACKAGE(Jasper) + FIND_PACKAGE(OpenEXR) + FIND_PACKAGE(OpenCascade) +diff --git a/src/osgPlugins/Inventor/CMakeLists.txt b/src/osgPlugins/Inventor/CMakeLists.txt +index 963a494..e34b6b8 100644 +--- a/src/osgPlugins/Inventor/CMakeLists.txt ++++ b/src/osgPlugins/Inventor/CMakeLists.txt +@@ -17,10 +17,6 @@ SET(TARGET_HDRS + ShuttleCallback.h + ) + +-ADD_DEFINITIONS(-DCOIN_DLL) +- +-INCLUDE_DIRECTORIES(${INVENTOR_INCLUDE_DIR}) +- +-SET(TARGET_ADDED_LIBRARIES ${INVENTOR_LIBRARY}) ++SET(TARGET_ADDED_LIBRARIES Coin::Coin) + + SETUP_PLUGIN(iv iv) diff --git a/ports/osg/fix-example-application.patch b/ports/osg/fix-example-application.patch new file mode 100644 index 00000000000000..ebef27fd4764f6 --- /dev/null +++ b/ports/osg/fix-example-application.patch @@ -0,0 +1,34 @@ +diff --git a/applications/present3D/CMakeLists.txt b/applications/present3D/CMakeLists.txt +index df859d0..123313a 100644 +--- a/applications/present3D/CMakeLists.txt ++++ b/applications/present3D/CMakeLists.txt +@@ -103,6 +103,11 @@ ENDIF() + IF (WIN32) + # to support cluster code + SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32) ++ ++ find_package(EXPAT REQUIRED) ++ find_package(Iconv REQUIRED) ++ ++ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT Iconv::Iconv) + ELSE() + CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" LIB_NSL_HAS_GETHOSTBYNAME) + IF(LIB_NSL_HAS_GETHOSTBYNAME) +diff --git a/examples/osgstaticviewer/CMakeLists.txt b/examples/osgstaticviewer/CMakeLists.txt +index 071ab26..bf8d85f 100644 +--- a/examples/osgstaticviewer/CMakeLists.txt ++++ b/examples/osgstaticviewer/CMakeLists.txt +@@ -19,6 +19,13 @@ IF(FREETYPE_FOUND) + SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_freetype) + ENDIF(FREETYPE_FOUND) + ++IF (WIN32) ++ find_package(EXPAT REQUIRED) ++ find_package(Iconv REQUIRED) ++ ++ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT Iconv::Iconv) ++ENDIF() ++ + SET(TARGET_SRC osgstaticviewer.cpp ) + #### end var setup ### + SETUP_EXAMPLE(osgstaticviewer) diff --git a/ports/osg/fix-liblas.patch b/ports/osg/fix-liblas.patch new file mode 100644 index 00000000000000..c36396e97bfbb2 --- /dev/null +++ b/ports/osg/fix-liblas.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b84fa06..a991670 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -765,7 +765,10 @@ ELSE() + ENDIF() + FIND_PACKAGE(ZeroConf) + +- FIND_PACKAGE(LIBLAS) ++ FIND_PACKAGE(liblas CONFIG) ++ set(LIBLAS_FOUND ${liblas_FOUND}) ++ set(LIBLAS_LIBRARY liblas) ++ set(LIBLASC_LIBRARY liblas_c) + + IF (NOT(OSG_USE_LOCAL_LUA_SOURCE)) + FIND_PACKAGE(Lua52) diff --git a/ports/osg/fix-nvtt.patch b/ports/osg/fix-nvtt.patch new file mode 100644 index 00000000000000..3cc1c4d5883701 --- /dev/null +++ b/ports/osg/fix-nvtt.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a991670..5b530c5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -759,7 +759,9 @@ ELSE() + FIND_PACKAGE(RSVG) + FIND_PACKAGE(GtkGl) + FIND_PACKAGE(DirectInput) ++ if (ENABLE_NVTT) + FIND_PACKAGE(NVTT) ++ endif() + IF (NOT WIN32) + FIND_PACKAGE(Asio) + ENDIF() diff --git a/ports/osg/fix-sdl.patch b/ports/osg/fix-sdl.patch new file mode 100644 index 00000000000000..e97d86476f3cbd --- /dev/null +++ b/ports/osg/fix-sdl.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 81328ea..c735419 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -755,8 +755,6 @@ ELSE() + FIND_PACKAGE(GStreamer COMPONENTS app pbutils) + FIND_PACKAGE(GLIB COMPONENTS gobject) + FIND_PACKAGE(DirectShow) +- FIND_PACKAGE(SDL2) +- FIND_PACKAGE(SDL) + FIND_PACKAGE(Poppler-glib) + FIND_PACKAGE(RSVG) + FIND_PACKAGE(GtkGl) +@@ -775,6 +773,10 @@ ELSE() + FIND_PACKAGE(Lua51) + ENDIF() + ENDIF() ++ ++ find_package(SDL) ++ find_package(SDL2 CONFIG) ++ set(SDL2_LIBRARY SDL2::SDL2 SDL2::SDL2main) + + # V8 and Python plugins are tests for linking against these libraries but aren't functionality beyond this. + # FIND_PACKAGE(V8) +diff --git a/examples/osgmovie/osgmovie.cpp b/examples/osgmovie/osgmovie.cpp +index 9de15b1..ae96e11 100644 +--- a/examples/osgmovie/osgmovie.cpp ++++ b/examples/osgmovie/osgmovie.cpp +@@ -691,7 +691,7 @@ int main(int argc, char** argv) + + #if USE_SDL || USE_SDL2 + +-#include "SDL.h" ++#include + + static void soundReadCallback(void * user_data, uint8_t * data, int datalen) + { diff --git a/ports/osg/osgdb_zip_nozip.patch b/ports/osg/osgdb_zip_nozip.patch new file mode 100644 index 00000000000000..a16deca974d68f --- /dev/null +++ b/ports/osg/osgdb_zip_nozip.patch @@ -0,0 +1,52 @@ +From bee432e701c541f9a86bd051b795c3e056e36646 Mon Sep 17 00:00:00 2001 +From: Ankur Verma +Date: Sun, 16 Aug 2020 14:36:31 -0700 +Subject: [PATCH] osg + +--- + src/osgPlugins/zip/unzip.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/osgPlugins/zip/unzip.cpp b/src/osgPlugins/zip/unzip.cpp +index 0bec28f0c..74e7b2413 100644 +--- a/src/osgPlugins/zip/unzip.cpp ++++ b/src/osgPlugins/zip/unzip.cpp +@@ -1742,8 +1742,8 @@ int inflate_blocks_free(inflate_blocks_statef *s, z_streamp z) + + + +-extern const char inflate_copyright[] = +- " inflate 1.1.3 Copyright 1995-1998 Mark Adler "; ++//extern const char inflate_copyright[] = ++// " inflate 1.1.3 Copyright 1995-1998 Mark Adler "; + // If you use the zlib library in a product, an acknowledgment is welcome + // in the documentation of your product. If for some reason you cannot + // include such an acknowledgment, I would appreciate that you keep this +-- +2.26.2 + +From 24d4036036884b350bd6c519b64626faa2c7e660 Mon Sep 17 00:00:00 2001 +From: Ankur Verma +Date: Thu, 20 Aug 2020 23:16:12 -0700 +Subject: [PATCH] Symbol clashes + +--- + src/osgPlugins/zip/unzip.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/osgPlugins/zip/unzip.cpp b/src/osgPlugins/zip/unzip.cpp +index 74e7b2413..f5169c6f4 100644 +--- a/src/osgPlugins/zip/unzip.cpp ++++ b/src/osgPlugins/zip/unzip.cpp +@@ -213,7 +213,7 @@ DWORD GetFilePosU(HANDLE hfout) + return ftell(hfout); + } + +-bool FileExists(const TCHAR *fn) ++static bool FileExists(const TCHAR *fn) + { struct stat st; + int res=stat(fn,&st); + return (res==0); +-- +2.26.2 + diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake index 8c6b5f299b3dc5..b8aeaa71227085 100644 --- a/ports/osg/portfile.cmake +++ b/ports/osg/portfile.cmake @@ -1,15 +1,24 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +set(OSG_VER 3.6.5) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO openscenegraph/OpenSceneGraph - REF OpenSceneGraph-3.6.4 - SHA512 7cb34fc279ba62a7d7177d3f065f845c28255688bd29026ffb305346e1bb2e515a22144df233e8a7246ed392044ee3e8b74e51bf655282d33ab27dcaf12f4b19 + REF OpenSceneGraph-${OSG_VER} + SHA512 7002fa30a3bcf6551d2e1050b4ca75a3736013fd190e4f50953717406864da1952deb09f530bc8c5ddf6e4b90204baec7dbc283f497829846d46d561f66feb4b HEAD_REF master PATCHES collada.patch + static.patch + fix-sdl.patch + fix-example-application.patch + disable-present3d-staticview-in-linux.patch #Due to some link error we cannot solve yet, disable them in linux. + fix-curl.patch + remove-prefix.patch # Remove this patch when cmake fix Findosg_functions.cmake + fix-liblas.patch + fix-nvtt.patch + use-boost-asio.patch + fix-dependency-coin.patch + osgdb_zip_nozip.patch # This is fix symbol clashes with other libs when built in static-lib mode ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -17,42 +26,120 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") else() set(OSG_DYNAMIC ON) endif() + file(REMOVE ${SOURCE_PATH}/CMakeModules/FindSDL2.cmake) + +set(OSG_USE_UTF8_FILENAME ON) +if (NOT VCPKG_TARGET_IS_WINDOWS) + message("Build osg requires gcc with version higher than 4.7.") + # Enable OSG_USE_UTF8_FILENAME will call some windows-only functions. + set(OSG_USE_UTF8_FILENAME OFF) +endif() + +set(OPTIONS) +if(NOT "collada" IN_LIST FEATURES) + list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_COLLADA=ON) +endif() +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_DCMTK=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GStreamer=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GLIB=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_SDL=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_LIBLAS=ON) + +# Due to nvtt CRT linkage error, we can only enable static builds here +set(ENABLE_NVTT ON) +if (VCPKG_TARGET_IS_WINDOWS AND OSG_DYNAMIC) + set(ENABLE_NVTT OFF) +endif() +list(APPEND OPTIONS -DENABLE_NVTT=${ENABLE_NVTT}) + +if (VCPKG_TARGET_IS_WINDOWS) + list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_FONTCONFIG=ON) + list(APPEND OPTIONS -DOSG_TEXT_USE_FONTCONFIG=OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools BUILD_OSG_APPLICATIONS + examples BUILD_OSG_EXAMPLES + plugins BUILD_OSG_PLUGINS + packages BUILD_OSG_PACKAGES + docs BUILD_DOCUMENTATION + docs BUILD_REF_DOCS_SEARCHENGINE + docs BUILD_REF_DOCS_TAGFILE +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DOSG_USE_UTF8_FILENAME=ON + OPTIONS ${FEATURE_OPTIONS} + -DOSG_USE_UTF8_FILENAME=${OSG_USE_UTF8_FILENAME} + -DDYNAMIC_OPENSCENEGRAPH=${OSG_DYNAMIC} + -DDYNAMIC_OPENTHREADS=${OSG_DYNAMIC} + -DBUILD_DASHBOARD_REPORTS=OFF + -DCMAKE_CXX_STANDARD=11 + ${OPTIONS} ) vcpkg_install_cmake() +vcpkg_copy_pdbs() + # handle osg tools and plugins file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/osg) -file(MAKE_DIRECTORY ${OSG_TOOL_PATH}) +set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +if (OSG_TOOLS) + file(MAKE_DIRECTORY ${OSG_TOOL_PATH}) + file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH}) + file(REMOVE_RECURSE ${OSG_TOOLS}) + file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(REMOVE_RECURSE ${OSG_TOOLS_DBG}) +endif() +file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/share/OpenSceneGraph/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +if (OSG_TOOLS) + file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/OpenSceneGraph) +endif() -file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH}) -file(REMOVE_RECURSE ${OSG_TOOLS}) -file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE_RECURSE ${OSG_TOOLS_DBG}) -file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.6.4/*.dll) -file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/osg/osgPlugins-3.6.4) -file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.6.4/*.dll) -file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.6.4) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.6.4/) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.6.4/) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*) + if (OSG_PLUGINS_DBG) + file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER}) + endif() + file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*) + if (OSG_PLUGINS_REL) + if (NOT EXISTS ${OSG_TOOL_PATH}) + file(MAKE_DIRECTORY ${OSG_TOOL_PATH}) + endif() + file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER}) + endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/) +endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osg) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/osg/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osg/copyright) +file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*) +if (OSG_PLUGINS_DBG) + file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER}) +endif() + +file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*) +if (OSG_PLUGINS_REL) + if (NOT EXISTS ${OSG_TOOL_PATH}) + file(MAKE_DIRECTORY ${OSG_TOOL_PATH}) + endif() + file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER}) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/) #Cleanup file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() \ No newline at end of file +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/osg/remove-prefix.patch b/ports/osg/remove-prefix.patch new file mode 100644 index 00000000000000..ced94522cdb579 --- /dev/null +++ b/ports/osg/remove-prefix.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake +index bb3be63..356edcd 100644 +--- a/CMakeModules/ModuleInstall.cmake ++++ b/CMakeModules/ModuleInstall.cmake +@@ -21,7 +21,7 @@ SOURCE_GROUP( + FILES ${TARGET_H} + ) + +-IF(MSVC AND OSG_MSVC_VERSIONED_DLL) ++IF(0) + HANDLE_MSVC_DLL() + ENDIF() + +diff --git a/src/OpenThreads/win32/CMakeLists.txt b/src/OpenThreads/win32/CMakeLists.txt +index 84550bd..0e816f7 100644 +--- a/src/OpenThreads/win32/CMakeLists.txt ++++ b/src/OpenThreads/win32/CMakeLists.txt +@@ -39,7 +39,7 @@ LINK_DIRECTORIES( + ${CMAKE_CURRENT_BINARY_DIR} + ) + +-IF(MSVC AND OSG_MSVC_VERSIONED_DLL) ++IF(0) + HANDLE_MSVC_DLL(ot ${OPENTHREADS_SOVERSION}) + ENDIF() + diff --git a/ports/osg/use-boost-asio.patch b/ports/osg/use-boost-asio.patch new file mode 100644 index 00000000000000..4d804973c0b45a --- /dev/null +++ b/ports/osg/use-boost-asio.patch @@ -0,0 +1,92 @@ +diff --git a/CMakeModules/FindAsio.cmake b/CMakeModules/FindAsio.cmake +index 433d5c7..04a0edf 100644 +--- a/CMakeModules/FindAsio.cmake ++++ b/CMakeModules/FindAsio.cmake +@@ -1,22 +1,7 @@ + # Locate ASIO-headers (http://think-async.com/Asio) +-# This module defines +-# ASIO_FOUND, if false, do not try to link to gdal +-# ASIO_INCLUDE_DIR, where to find the headers +-# + # Created by Stephan Maximilian Huber + +-FIND_PATH(ASIO_INCLUDE_DIR +- NAMES +- asio.hpp +- PATHS +- /usr/include +- /usr/local/include +-) +- +-SET(ASIO_FOUND "NO") +-IF(ASIO_INCLUDE_DIR) +- FIND_PACKAGE( Boost 1.37 ) +- IF(Boost_FOUND) +- SET(ASIO_FOUND "YES") +- ENDIF() ++FIND_PACKAGE( Boost 1.37 COMPONENTS asio ) ++IF(Boost_FOUND) ++ SET(ASIO_FOUND "YES") + ENDIF() +diff --git a/src/osgPlugins/RestHttpDevice/CMakeLists.txt b/src/osgPlugins/RestHttpDevice/CMakeLists.txt +index 8464b9d..073e8ed 100644 +--- a/src/osgPlugins/RestHttpDevice/CMakeLists.txt ++++ b/src/osgPlugins/RestHttpDevice/CMakeLists.txt +@@ -1,5 +1,4 @@ + INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +-INCLUDE_DIRECTORIES(${ASIO_INCLUDE_DIR}) + + SET(TARGET_SRC + connection.cpp +diff --git a/src/osgPlugins/RestHttpDevice/connection.hpp b/src/osgPlugins/RestHttpDevice/connection.hpp +index 99f3a93..b205759 100644 +--- a/src/osgPlugins/RestHttpDevice/connection.hpp ++++ b/src/osgPlugins/RestHttpDevice/connection.hpp +@@ -11,7 +11,7 @@ + #ifndef HTTP_SERVER_CONNECTION_HPP + #define HTTP_SERVER_CONNECTION_HPP + +-#include ++#include + #include + #include + #include +diff --git a/src/osgPlugins/RestHttpDevice/io_service_pool.hpp b/src/osgPlugins/RestHttpDevice/io_service_pool.hpp +index 1d363a8..b6e7195 100644 +--- a/src/osgPlugins/RestHttpDevice/io_service_pool.hpp ++++ b/src/osgPlugins/RestHttpDevice/io_service_pool.hpp +@@ -11,7 +11,7 @@ + #ifndef HTTP_SERVER_IO_SERVICE_POOL_HPP + #define HTTP_SERVER_IO_SERVICE_POOL_HPP + +-#include ++#include + #include + #include + #include +diff --git a/src/osgPlugins/RestHttpDevice/reply.hpp b/src/osgPlugins/RestHttpDevice/reply.hpp +index 89f264a..b63d0b9 100644 +--- a/src/osgPlugins/RestHttpDevice/reply.hpp ++++ b/src/osgPlugins/RestHttpDevice/reply.hpp +@@ -13,7 +13,7 @@ + + #include + #include +-#include ++#include + #include "header.hpp" + + namespace http { +diff --git a/src/osgPlugins/RestHttpDevice/server.hpp b/src/osgPlugins/RestHttpDevice/server.hpp +index a14f263..91c4b62 100644 +--- a/src/osgPlugins/RestHttpDevice/server.hpp ++++ b/src/osgPlugins/RestHttpDevice/server.hpp +@@ -11,7 +11,7 @@ + #ifndef HTTP_SERVER_SERVER_HPP + #define HTTP_SERVER_SERVER_HPP + +-#include ++#include + #include + #include + #include diff --git a/ports/osg/vcpkg.json b/ports/osg/vcpkg.json new file mode 100644 index 00000000000000..8ad7f03b1621c5 --- /dev/null +++ b/ports/osg/vcpkg.json @@ -0,0 +1,124 @@ +{ + "name": "osg", + "version-string": "3.6.5", + "port-version": 8, + "description": "The OpenSceneGraph is an open source high performance 3D graphics toolkit.", + "homepage": "https://github.com/openscenegraph/OpenSceneGraph", + "dependencies": [ + { + "name": "expat", + "platform": "windows" + }, + { + "name": "fontconfig", + "platform": "!windows" + }, + { + "name": "openimageio", + "platform": "osx" + }, + "zlib" + ], + "features": { + "collada": { + "description": "Support for Collada (.dae) files", + "dependencies": [ + "collada-dom" + ] + }, + "docs": { + "description": "Build OpenSceneGraph reference documentation using doxygen (use: make doc_openscenegraph doc_openthreads" + }, + "examples": { + "description": "Enable to build OSG Examples", + "dependencies": [ + "freetype", + { + "name": "libiconv", + "platform": "windows" + }, + "sdl1", + "sdl2" + ] + }, + "packages": { + "description": "Set to ON to generate CPack configuration files and packaging targets" + }, + "plugins": { + "description": "Build OSG Plugins - Disable for compile testing examples on a time limit", + "dependencies": [ + { + "name": "boost-asio", + "platform": "!windows" + }, + { + "name": "boost-bind", + "platform": "!windows" + }, + { + "name": "boost-core", + "platform": "!windows" + }, + { + "name": "boost-lexical-cast", + "platform": "!windows" + }, + { + "name": "boost-logic", + "platform": "!windows" + }, + { + "name": "boost-smart-ptr", + "platform": "!windows" + }, + { + "name": "boost-tuple", + "platform": "!windows" + }, + "coin", + "curl", + "freetype", + "gdal", + { + "name": "giflib", + "platform": "windows" + }, + "ilmbase", + "jasper", + "libgta", + { + "name": "libiconv", + "platform": "windows" + }, + "libjpeg-turbo", + "liblas", + "libpng", + { + "name": "libxml2", + "platform": "windows" + }, + { + "name": "nvtt", + "platform": "!x86" + }, + "openexr", + "sdl1", + "tiff" + ] + }, + "tools": { + "description": "Enable to build OSG Applications (e.g. osgviewer)", + "dependencies": [ + "curl", + "freetype", + { + "name": "libiconv", + "platform": "windows" + }, + "libjpeg-turbo", + "libpng", + "sdl1" + ] + } + } +} diff --git a/ports/osgearth/CONTROL b/ports/osgearth/CONTROL deleted file mode 100644 index d54992b827fec4..00000000000000 --- a/ports/osgearth/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: osgearth -Version: 2.10.2 -Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping. -Build-Depends: osg diff --git a/ports/osgearth/RocksDB.patch b/ports/osgearth/RocksDB.patch deleted file mode 100644 index 07fd7e6031a11e..00000000000000 --- a/ports/osgearth/RocksDB.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/CMakeModules/FindRocksDB.cmake b/CMakeModules/FindRocksDB.cmake -index 109b383..8382ed9 100644 ---- a/CMakeModules/FindRocksDB.cmake -+++ b/CMakeModules/FindRocksDB.cmake -@@ -40,5 +40,49 @@ find_package_handle_standard_args(ROCKSDB - "Could NOT find ROCKSDB" - ) - -+if(ROCKSDB_FOUND) -+ FIND_PACKAGE(ZLIB REQUIRED) -+ -+ include(SelectLibraryConfigurations) -+ # Find Snappy library -+ find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd) -+ find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy) -+ select_library_configurations(SNAPPY) -+ find_package_handle_standard_args(SNAPPY -+ FOUND_VAR -+ SNAPPY_FOUND -+ REQUIRED_VARS -+ SNAPPY_LIBRARY -+ FAIL_MESSAGE -+ "Could NOT find SNAPPY" -+ ) -+ -+ # Find LZ4 library -+ find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) -+ find_library(LZ4_LIBRARY_RELEASE NAMES lz4) -+ select_library_configurations(LZ4) -+ find_package_handle_standard_args(LZ4 -+ FOUND_VAR -+ LZ4_FOUND -+ REQUIRED_VARS -+ LZ4_LIBRARY -+ FAIL_MESSAGE -+ "Could NOT find LZ4" -+ ) -+ -+ # Find ZSTD library -+ find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd) -+ find_library(ZSTD_LIBRARY_RELEASE NAMES zstd) -+ select_library_configurations(ZSTD) -+ find_package_handle_standard_args(ZSTD -+ FOUND_VAR -+ ZSTD_FOUND -+ REQUIRED_VARS -+ ZSTD_LIBRARY -+ FAIL_MESSAGE -+ "Could NOT find ZSTD_" -+ ) -+endif(ROCKSDB_FOUND) -+ - set(ROCKSDB_INCLUDE_DIRS ${ROCKSDB_INCLUDE_DIR} ) - set(ROCKSDB_LIBRARIES ${ROCKSDB_LIBRARY}) -- -- - -diff --git a/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt b/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt -index 68ad85d..86bb18a 100644 ---- a/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt -+++ b/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt -@@ -16,7 +16,19 @@ SET(TARGET_SRC - RocksDBCacheDriver.cpp - ) - --SET(TARGET_LIBRARIES_VARS ROCKSDB_LIBRARY ZLIB_LIBRARY) -+if(SNAPPY_FOUND) -+ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${SNAPPY_LIBRARY}) -+endif(SNAPPY_FOUND) -+ -+if(LZ4_FOUND) -+ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${LZ4_LIBRARY}) -+endif(LZ4_FOUND) -+ -+if(ZSTD_FOUND) -+ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${ZSTD_LIBRARY}) -+endif(ZSTD_FOUND) -+ -+SET(TARGET_LIBRARIES_VARS ROCKSDB_LIBRARY ZLIB_LIBRARY ROCKSDB_DEPENDENT_LIBRARY) - - IF(MSVC) - SET(TARGET_EXTERNAL_LIBRARIES ws2_32 winmm rpcrt4 shlwapi) -- -- \ No newline at end of file diff --git a/ports/osgearth/StaticOSG.patch b/ports/osgearth/StaticOSG.patch new file mode 100644 index 00000000000000..2f4b1bff11c7de --- /dev/null +++ b/ports/osgearth/StaticOSG.patch @@ -0,0 +1,84 @@ +From 4e719ceacdc8df729f3296f62c9f50075c862967 Mon Sep 17 00:00:00 2001 +From: Ankur Verma +Date: Sun, 27 Dec 2020 22:26:32 -0800 +Subject: [PATCH] StaticOSG + +--- + CMakeLists.txt | 9 ++++++ + CMakeModules/FindGEOS.cmake | 29 +++++++++++++++++++++++++++-- + 2 files changed, 36 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 049e37e..d75a3b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -266,6 +266,15 @@ ELSE() + SET(OSGEARTH_DYNAMIC_OR_STATIC "STATIC") + ENDIF() + ++IF(NOT OSGEARTH_BUILD_SHARED_LIBS) ++ ADD_DEFINITIONS(-DOSGEARTH_LIBRARY_STATIC) ++ENDIF() ++ ++OPTION(OSG_IS_STATIC "Set to ON to build OSG for static linking. Use OFF for dynamic." OFF) ++IF (OSG_IS_STATIC) ++ ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC) ++ LINK_LIBRARIES(${CMAKE_DL_LIBS}) ++ENDIF(OSG_IS_STATIC) + + # OE Libraries + ADD_SUBDIRECTORY(src) +diff --git a/CMakeModules/FindGEOS.cmake b/CMakeModules/FindGEOS.cmake +index e85f922..b1bbfed 100644 +--- a/CMakeModules/FindGEOS.cmake ++++ b/CMakeModules/FindGEOS.cmake +@@ -65,7 +65,7 @@ FIND_LIBRARY(GEOS_LIBRARY + ) + + FIND_LIBRARY(GEOS_LIBRARY_DEBUG +- NAMES geos_cd geos_i_d geosd ++ NAMES geos_cd geos_i_d + PATHS + ${GEOS_DIR}/lib + $ENV{GEOS_DIR} +@@ -74,7 +74,7 @@ FIND_LIBRARY(GEOS_LIBRARY_DEBUG + ) + + FIND_LIBRARY(GEOS_LIBRARY_DEBUG +- NAMES geos_cd geos_i_d geosd ++ NAMES geos_cd geos_i_d + PATHS + ~/Library/Frameworks + /Library/Frameworks +@@ -92,3 +92,28 @@ SET(GEOS_FOUND "NO") + IF(GEOS_LIBRARY AND GEOS_INCLUDE_DIR) + SET(GEOS_FOUND "YES") + ENDIF(GEOS_LIBRARY AND GEOS_INCLUDE_DIR) ++ ++OPTION(GEOS_IS_STATIC "Set to ON to build GEOS for static linking. Use OFF for dynamic." OFF) ++IF (GEOS_IS_STATIC) ++ FIND_LIBRARY(GEOS_CXX_LIBRARY ++ NAMES geos ++ PATHS ++ ${GEOS_DIR}/lib ++ $ENV{GEOS_DIR} ++ NO_DEFAULT_PATH ++ PATH_SUFFIXES lib64 lib ++ ) ++ ++ FIND_LIBRARY(GEOS_CXX_LIBRARY_DEBUG ++ NAMES geosd ++ PATHS ++ ${GEOS_DIR}/lib ++ $ENV{GEOS_DIR} ++ NO_DEFAULT_PATH ++ PATH_SUFFIXES lib64 lib ++ ) ++ ++ set(GEOS_LIBRARY "${GEOS_LIBRARY};${GEOS_CXX_LIBRARY}" CACHE STRING "Geos Libraries" FORCE ) ++ set(GEOS_LIBRARY_DEBUG "${GEOS_LIBRARY_DEBUG};${GEOS_CXX_LIBRARY_DEBUG}" CACHE STRING "Geos Debug Libraries" FORCE ) ++ ++ENDIF(GEOS_IS_STATIC) +-- +2.29.2 + diff --git a/ports/osgearth/deprecated_cpp_fix.patch b/ports/osgearth/deprecated_cpp_fix.patch new file mode 100644 index 00000000000000..7a56041983f2bd --- /dev/null +++ b/ports/osgearth/deprecated_cpp_fix.patch @@ -0,0 +1,28 @@ +From 89bea8378ae632b0caa134293f713b927774ab50 Mon Sep 17 00:00:00 2001 +From: ankurv +Date: Sun, 3 Jan 2021 11:05:32 -0800 +Subject: [PATCH] Patch + +--- + src/osgEarth/Threading | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/osgEarth/Threading b/src/osgEarth/Threading +index 9093ca6..0fbd9ce 100644 +--- a/src/osgEarth/Threading ++++ b/src/osgEarth/Threading +@@ -602,7 +602,11 @@ namespace osgEarth { namespace Threading + template + constexpr auto cpp11invoke(Fn&& f, Args&&... args) + noexcept(noexcept(std::forward(f)(std::forward(args)...))) ++#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703 ++ -> typename std::invoke_result::type ++#else + -> typename std::result_of::type ++#endif + { + return std::forward(f)(std::forward(args)...); + } +-- +2.29.2.windows.3 + diff --git a/ports/osgearth/fix-dependencies.patch b/ports/osgearth/fix-dependencies.patch new file mode 100644 index 00000000000000..54c414875bb15d --- /dev/null +++ b/ports/osgearth/fix-dependencies.patch @@ -0,0 +1,67 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 001ebf1..8e49af2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -128,24 +128,45 @@ ENDIF (OSGEARTH_USE_GLES) + + # required + find_package(OSG REQUIRED) +-find_package(CURL REQUIRED) ++find_package(CURL CONFIG REQUIRED) ++set(CURL_LIBRARY CURL::libcurl) ++ + find_package(GDAL REQUIRED) ++set(GDAL_LIBRARY ${GDAL_LIBRARIES}) ++set(GDAL_FOUND 1) + + # optional +-find_package(GEOS REQUIRED) +-find_package(Sqlite3 REQUIRED) ++find_package(geos CONFIG REQUIRED) ++set(GEOS_LIBRARY GEOS::geos GEOS::geos_c) ++set(GEOS_FOUND 1) ++ ++find_package(unofficial-sqlite3 CONFIG REQUIRED) ++set(SQLITE3_FOUND 1) ++set(SQLITE3_LIBRARY unofficial::sqlite3::sqlite3) ++ + find_package(Draco REQUIRED) + find_package(BASISU REQUIRED) ++ + find_package(GLEW REQUIRED) +-find_package(Protobuf REQUIRED) +-find_package(WEBP REQUIRED) ++set(GLEW_LIBRARIES GLEW::GLEW) ++set(GLEW_FOUND 1) ++ ++find_package(protobuf CONFIG REQUIRED) ++set(Protobuf_LIBRARIES protobuf::libprotoc protobuf::libprotobuf) ++set(Protobuf_FOUND 1) ++ ++find_package(WebP CONFIG REQUIRED) ++set(WEBP_LIBRARY WebP::webp) ++set(WEBP_FOUND 1) + + if(OSGEARTH_ENABLE_PROFILING) + find_package(Tracy REQUIRED) + endif() + + if(OSGEARTH_BUILD_ZIP_PLUGIN) +- find_package(LIBZIP REQUIRED) ++ find_package(libzip CONFIG REQUIRED) ++ set(LIBZIP_LIBRARY libzip::zip) ++ set(LIBZIP_FOUND 1) + endif() + + if(OSGEARTH_BUILD_TRITON_NODEKIT) +@@ -193,7 +214,9 @@ OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Mak + # TinyXML is an XML parsing library + SET (WITH_EXTERNAL_TINYXML FALSE CACHE BOOL "Use bundled or system wide version of TinyXML") + IF (WITH_EXTERNAL_TINYXML) +- find_package(TinyXML REQUIRED) ++ find_package(tinyxml CONFIG REQUIRED) ++ set(TINYXML_FOUND 1) ++ set(TINYXML_LIBRARY unofficial-tinyxml::unofficial-tinyxml) + ENDIF (WITH_EXTERNAL_TINYXML) + + # postfix settings for various configs diff --git a/ports/osgearth/fix-dependency-osg.patch b/ports/osgearth/fix-dependency-osg.patch new file mode 100644 index 00000000000000..18489b1c821a0d --- /dev/null +++ b/ports/osgearth/fix-dependency-osg.patch @@ -0,0 +1,171 @@ +diff --git a/CMakeModules/FindOSG.cmake b/CMakeModules/FindOSG.cmake +index b7dff11..d1ec2ff 100644 +--- a/CMakeModules/FindOSG.cmake ++++ b/CMakeModules/FindOSG.cmake +@@ -121,5 +121,36 @@ IF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) + SET( OSG_FOUND "YES" ) + SET( OSG_INCLUDE_DIRS ${OSG_INCLUDE_DIR} ${OSG_GEN_INCLUDE_DIR} ) + GET_FILENAME_COMPONENT( OSG_LIBRARIES_DIR ${OSG_LIBRARY} PATH ) ++ ++ find_package(ZLIB REQUIRED) ++ set(ZLIB_LIBRARY ZLIB::ZLIB) ++ ++ find_package(Freetype REQUIRED) ++ set(FREETYPE_LIBRARY Freetype::Freetype) ++ ++ find_package(unofficial-brotli CONFIG REQUIRED) ++ find_package(BZip2 REQUIRED) ++ find_package(expat CONFIG REQUIRED) ++ find_package(PNG REQUIRED) ++ find_package(JPEG REQUIRED) ++ find_package(TIFF REQUIRED) ++ find_package(zstd REQUIRED) ++ find_package(GIF REQUIRED) ++ ++ if (UNIX) ++ list(APPEND OSG_DEPENDS_LIBRARY ${OSG_DEPENDS_LIBRARY} -pthread) ++ # Due to Linux Linker dependency issues these need to included again ++ set(DEPEND_LIB_LIST fontconfig freetype uuid gdal json-c expat zstd proj sqlite3 webp gif cfitsio openjp2 xml2) ++ else(UNIX) ++ set(DEPEND_LIB_LIST cfitsio) ++ endif() ++ foreach (libname ${DEPEND_LIB_LIST}) ++ find_library(${libname}_LIBRARY_RELEASE NAMES ${libname} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) ++ find_library(${libname}_LIBRARY_DEBUG NAMES ${libname} ${libname}d ${libname}_d NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) ++ select_library_configurations(${libname}) ++ list(APPEND OSG_DEPENDS_LIBRARY ${${libname}_LIBRARY}) ++ endforeach() ++ list(APPEND OSG_DEPENDS_LIBRARY ZLIB::ZLIB Freetype::Freetype expat::expat PNG::PNG JPEG::JPEG TIFF::TIFF ${GIF_LIBRARIES} ${CFITSIO_LIBRARY}) ++ + ENDIF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) + +diff --git a/src/applications/osgearth_3pv/CMakeLists.txt b/src/applications/osgearth_3pv/CMakeLists.txt +index e1dc876..6d688ff 100644 +--- a/src/applications/osgearth_3pv/CMakeLists.txt ++++ b/src/applications/osgearth_3pv/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_3pv.cpp ) + +diff --git a/src/applications/osgearth_atlas/CMakeLists.txt b/src/applications/osgearth_atlas/CMakeLists.txt +index aadbb5e..69698c7 100644 +--- a/src/applications/osgearth_atlas/CMakeLists.txt ++++ b/src/applications/osgearth_atlas/CMakeLists.txt +@@ -1,6 +1,6 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) + +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_atlas.cpp ) + +diff --git a/src/applications/osgearth_boundarygen/CMakeLists.txt b/src/applications/osgearth_boundarygen/CMakeLists.txt +index fe9ec6b..52915b0 100644 +--- a/src/applications/osgearth_boundarygen/CMakeLists.txt ++++ b/src/applications/osgearth_boundarygen/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_H + BoundaryUtil +diff --git a/src/applications/osgearth_clamp/CMakeLists.txt b/src/applications/osgearth_clamp/CMakeLists.txt +index 996ea43..728ee77 100644 +--- a/src/applications/osgearth_clamp/CMakeLists.txt ++++ b/src/applications/osgearth_clamp/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_clamp.cpp) + +diff --git a/src/applications/osgearth_conv/CMakeLists.txt b/src/applications/osgearth_conv/CMakeLists.txt +index a77d703..2aac5f2 100644 +--- a/src/applications/osgearth_conv/CMakeLists.txt ++++ b/src/applications/osgearth_conv/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_conv.cpp ) + +diff --git a/src/applications/osgearth_overlayviewer/CMakeLists.txt b/src/applications/osgearth_overlayviewer/CMakeLists.txt +index bb2802a..5175cfc 100644 +--- a/src/applications/osgearth_overlayviewer/CMakeLists.txt ++++ b/src/applications/osgearth_overlayviewer/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_overlayviewer.cpp ) + +diff --git a/src/applications/osgearth_tfs/CMakeLists.txt b/src/applications/osgearth_tfs/CMakeLists.txt +index 90c153a..d331019 100644 +--- a/src/applications/osgearth_tfs/CMakeLists.txt ++++ b/src/applications/osgearth_tfs/CMakeLists.txt +@@ -1,6 +1,6 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) + +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_tfs.cpp ) + +diff --git a/src/applications/osgearth_toc/CMakeLists.txt b/src/applications/osgearth_toc/CMakeLists.txt +index b32c523..7b25b79 100644 +--- a/src/applications/osgearth_toc/CMakeLists.txt ++++ b/src/applications/osgearth_toc/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY OSGWIDGET_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGWIDGET_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_toc.cpp ) + +diff --git a/src/applications/osgearth_version/CMakeLists.txt b/src/applications/osgearth_version/CMakeLists.txt +index 1f1d48d..01e963b 100644 +--- a/src/applications/osgearth_version/CMakeLists.txt ++++ b/src/applications/osgearth_version/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_version.cpp ) + +diff --git a/src/applications/osgearth_viewer/CMakeLists.txt b/src/applications/osgearth_viewer/CMakeLists.txt +index 8c61e42..bbda7be 100644 +--- a/src/applications/osgearth_viewer/CMakeLists.txt ++++ b/src/applications/osgearth_viewer/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_viewer.cpp ) + +diff --git a/src/osgEarth/CMakeLists.txt b/src/osgEarth/CMakeLists.txt +index c49bfcd..a7b9a2d 100644 +--- a/src/osgEarth/CMakeLists.txt ++++ b/src/osgEarth/CMakeLists.txt +@@ -870,9 +870,11 @@ ENDIF(TRACY_FOUND) + + OPTION(NRL_STATIC_LIBRARIES "Link osgEarth against static GDAL and cURL, including static OpenSSL, Proj4, JPEG, PNG, and TIFF." OFF) + if(NOT NRL_STATIC_LIBRARIES) +- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY) ++ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY OSGMANIPULATOR_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY) ++ TARGET_LINK_LIBRARIES(${LIB_NAME} ${OSG_DEPENDS_LIBRARY} ${CURL_LIBRARY} ${GDAL_LIBRARIES}) + else(NOT NRL_STATIC_LIBRARIES) +- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY SSL_EAY_RELEASE LIB_EAY_RELEASE TIFF_LIBRARY PROJ4_LIBRARY PNG_LIBRARY JPEG_LIBRARY) ++ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY OSGMANIPULATOR_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY) ++ TARGET_LINK_LIBRARIES(${LIB_NAME} ${OSG_DEPENDS_LIBRARY} ${CURL_LIBRARY} ${GDAL_LIBRARIES} ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} ${TIFF_LIBRARY} ${PROJ4_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY}) + endif(NOT NRL_STATIC_LIBRARIES) + + LINK_CORELIB_DEFAULT(${LIB_NAME} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIBRARY}) diff --git a/ports/osgearth/make-all-find-packages-required.patch b/ports/osgearth/make-all-find-packages-required.patch new file mode 100644 index 00000000000000..f5ea6793f72114 --- /dev/null +++ b/ports/osgearth/make-all-find-packages-required.patch @@ -0,0 +1,84 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 049e37e..c78bd16 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -121,9 +121,9 @@ option(OSGEARTH_ENABLE_GEOCODER "Enable the geocoder (GDAL/OGR must be built wit + + # Mobile/GLES: + IF (OSGEARTH_USE_GLES) +- find_package(OpenGLES) ++ find_package(OpenGLES REQUIRED) + ELSE () +- find_package(OpenGL) ++ find_package(OpenGL REQUIRED) + ENDIF (OSGEARTH_USE_GLES) + + # required +@@ -132,28 +132,28 @@ find_package(CURL REQUIRED) + find_package(GDAL REQUIRED) + + # optional +-find_package(GEOS) +-find_package(Sqlite3) +-find_package(Draco) +-find_package(BASISU) +-find_package(GLEW) +-find_package(Protobuf) +-find_package(WEBP) ++find_package(GEOS REQUIRED) ++find_package(Sqlite3 REQUIRED) ++find_package(Draco REQUIRED) ++find_package(BASISU REQUIRED) ++find_package(GLEW REQUIRED) ++find_package(Protobuf REQUIRED) ++find_package(WEBP REQUIRED) + + if(OSGEARTH_ENABLE_PROFILING) +- find_package(Tracy) ++ find_package(Tracy REQUIRED) + endif() + + if(OSGEARTH_BUILD_ZIP_PLUGIN) +- find_package(LIBZIP) ++ find_package(LIBZIP REQUIRED) + endif() + + if(OSGEARTH_BUILD_TRITON_NODEKIT) +- find_package(Triton QUIET) ++ find_package(Triton QUIET REQUIRED) + endif() + + if(OSGEARTH_BUILD_SILVERLINING_NODEKIT) +- find_package(SilverLining QUIET) ++ find_package(SilverLining QUIET REQUIRED) + endif() + + # Sqlite enables the MBTiles format: +@@ -182,18 +182,18 @@ SET (PROTOBUF_USE_DLLS FALSE CACHE BOOL "Set this to true if Protobuf is compile + # Duktape is the JavaScript interpreter + SET (WITH_EXTERNAL_DUKTAPE FALSE CACHE BOOL "Use bundled or system wide version of Duktape") + IF (WITH_EXTERNAL_DUKTAPE) +- find_package(Duktape) ++ find_package(Duktape REQUIRED) + ENDIF (WITH_EXTERNAL_DUKTAPE) + + # Whether to install shaders (glsl files). +-# If true, shaders install into a resources folder. If false, they are inlined in the ++# If true, shaders install into a resources folder. If false, they are inlined in the + # code and you cannot tweak them after install. + OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Make INSTALL" OFF) + + # TinyXML is an XML parsing library + SET (WITH_EXTERNAL_TINYXML FALSE CACHE BOOL "Use bundled or system wide version of TinyXML") + IF (WITH_EXTERNAL_TINYXML) +- find_package(TinyXML) ++ find_package(TinyXML REQUIRED) + ENDIF (WITH_EXTERNAL_TINYXML) + + # postfix settings for various configs +@@ -272,4 +272,4 @@ ADD_SUBDIRECTORY(src) + + if (OSGEARTH_BUILD_DOCS) + ADD_SUBDIRECTORY(docs) +-endif() ++endif() diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake index 8f74dea63c421c..4a7270469740a5 100644 --- a/ports/osgearth/portfile.cmake +++ b/ports/osgearth/portfile.cmake @@ -1,66 +1,90 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) - -file(GLOB OSG_PLUGINS_SUBDIR ${CURRENT_INSTALLED_DIR}/tools/osg/osgPlugins-*) -list(LENGTH OSG_PLUGINS_SUBDIR OSG_PLUGINS_SUBDIR_LENGTH) -if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1) - message(FATAL_ERROR "Could not determine osg version") +# Only dynamic build need dlls +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB OSG_PLUGINS_SUBDIR ${CURRENT_INSTALLED_DIR}/tools/osg/osgPlugins-*) + list(LENGTH OSG_PLUGINS_SUBDIR OSG_PLUGINS_SUBDIR_LENGTH) + if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1) + message(FATAL_ERROR "Could not determine osg version") + endif() + string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}") endif() -string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gwaldron/osgearth - REF osgearth-2.10.2 - SHA512 fa306a82374716dafae9d834ed0fb07a7369ae0961696de36b6e2af45bc150040295985d9b9781ab713fd0707691451a6a8f173b34253749ab22764f51e60045 + REF 342fcadf4c8892ba84841cb5b4162bdc51519e3c #version 3.1 + SHA512 03378a918306846d2144e545785c783b01e33fa2dd5c77d16d390a275217b6ce7a3a743c35ae99a497b272a7516b055442c0a891bd312cce727a5538b40364f5 HEAD_REF master PATCHES - RocksDB.patch + StaticOSG.patch # Fix port compilation in static-md module + deprecated_cpp_fix.patch # Fix port headers to not use classes deprecated in c++17. Gives errors when using the installed port headers + make-all-find-packages-required.patch + fix-dependencies.patch + fix-dependency-osg.patch + remove-tool-debug-suffix.patch +) + +# Upstream bug, see https://github.com/gwaldron/osgearth/issues/1002 +file(REMOVE ${SOURCE_PATH}/src/osgEarth/tinyxml.h) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools OSGEARTH_BUILD_TOOLS ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DOSGEARTH_BUILD_SHARED_LIBS=${BUILD_SHARED} + -DNRL_STATIC_LIBRARIES=${BUILD_STATIC} + -DOSG_IS_STATIC=${BUILD_STATIC} + -DGEOS_IS_STATIC=${BUILD_STATIC} + -DCURL_IS_STATIC=${BUILD_STATIC} + -DOSGEARTH_BUILD_EXAMPLES=OFF + -DOSGEARTH_BUILD_TESTS=OFF + -DOSGEARTH_BUILD_DOCS=OFF + -DOSGEARTH_BUILD_PROCEDURAL_NODEKIT=OFF + -DOSGEARTH_BUILD_TRITON_NODEKIT=OFF + -DOSGEARTH_BUILD_SILVERLINING_NODEKIT=OFF + -DWITH_EXTERNAL_TINYXML=ON ) vcpkg_install_cmake() -#Release -set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/osgearth) -set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) +if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) + #Release + set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) -file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PATH}) -file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH}) + file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH}) + file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll) -file(GLOB OSGEARTH_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/osgdb*.dll) + file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}) -file(COPY ${OSGEARTH_TOOLS} DESTINATION ${OSGEARTH_TOOL_PATH}) -file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) + #Debug + set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) + set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) -file(REMOVE_RECURSE ${OSGEARTH_TOOLS}) -file(REMOVE_RECURSE ${OSGDB_PLUGINS}) + file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) -#Debug -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/osgearth) -set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) - -file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PATH}) -file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll) -file(GLOB OSGEARTH_DEBUG_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/osgdb*.dll) + file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) -file(COPY ${OSGEARTH_DEBUG_TOOLS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PATH}) -file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}) +endif() -file(REMOVE_RECURSE ${OSGEARTH_DEBUG_TOOLS}) -file(REMOVE_RECURSE ${OSGDB_DEBUG_PLUGINS}) +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES osgearth_3pv osgearth_atlas osgearth_boundarygen osgearth_clamp + osgearth_conv osgearth_overlayviewer osgearth_tfs osgearth_toc osgearth_version osgearth_viewer + AUTO_CLEAN + ) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osgearth) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/osgearth/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osgearth/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/osgearth/remove-tool-debug-suffix.patch b/ports/osgearth/remove-tool-debug-suffix.patch new file mode 100644 index 00000000000000..24cbb2fe58a900 --- /dev/null +++ b/ports/osgearth/remove-tool-debug-suffix.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeModules/OsgEarthMacroUtils.cmake b/CMakeModules/OsgEarthMacroUtils.cmake +index 6e0eb46..12388c4 100644 +--- a/CMakeModules/OsgEarthMacroUtils.cmake ++++ b/CMakeModules/OsgEarthMacroUtils.cmake +@@ -364,8 +364,6 @@ MACRO(SETUP_EXE IS_COMMANDLINE_APP) + + SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}") + SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES OUTPUT_NAME ${TARGET_NAME}) +- SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_OUTPUT_NAME "${TARGET_NAME}${CMAKE_DEBUG_POSTFIX}") +- SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES RELEASE_OUTPUT_NAME "${TARGET_NAME}${CMAKE_RELEASE_POSTFIX}") + SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES RELWITHDEBINFO_OUTPUT_NAME "${TARGET_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}") + SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES MINSIZEREL_OUTPUT_NAME "${TARGET_NAME}${CMAKE_MINSIZEREL_POSTFIX}") + diff --git a/ports/osgearth/vcpkg.json b/ports/osgearth/vcpkg.json new file mode 100644 index 00000000000000..c71392131c2fa7 --- /dev/null +++ b/ports/osgearth/vcpkg.json @@ -0,0 +1,34 @@ +{ + "name": "osgearth", + "version": "3.1", + "port-version": 4, + "description": "osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.", + "homepage": "https://github.com/gwaldron/osgearth", + "supports": "!(x86 | wasm32)", + "dependencies": [ + "basisu", + "draco", + "geos", + "glew", + "libwebp", + "libzip", + "opengl", + { + "name": "osg", + "features": [ + "plugins" + ] + }, + "protobuf", + "sqlite3", + "tinyxml" + ], + "default-features": [ + "tools" + ], + "features": { + "tools": { + "description": "Build tools" + } + } +} diff --git a/ports/osi/CONTROL b/ports/osi/CONTROL deleted file mode 100644 index 5f65e3cf2ce1cf..00000000000000 --- a/ports/osi/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: osi -Version: 0.108.4-2 -Description: Osi (Open Solver Interface) provides an abstract base class to a generic linear programming (LP) solver, along with derived classes for specific solvers. Many applications may be able to use the Osi to insulate themselves from a specific LP solver. -Build-Depends: coinutils diff --git a/ports/osi/portfile.cmake b/ports/osi/portfile.cmake index bb340eaca08c0b..ea585b1150ae0b 100644 --- a/ports/osi/portfile.cmake +++ b/ports/osi/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO coin-or/Osi - REF releases/0.108.4 - SHA512 43c4da11c7e8b83ef67b10b60fa0be9bd2302965a26447f85c4cf9e747b999710954948e041b7203ac69f5d3cb75ba9c383838184bee8399a95b9ba59eff3f06 + REF dfa6449d6756fdd96912cf96e168d0be07b1d37c # releases/0.108.6 + SHA512 8c23998a3f442766c515acd5549ed97608b972de61b9ef5b50b9e5d1d03b43fb5f77dc02d3562084fbf4f18f3397f9cd50c0f9bde4f576a4dff0dab795c04358 ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/osi/vcpkg.json b/ports/osi/vcpkg.json new file mode 100644 index 00000000000000..de8d0a488b76fe --- /dev/null +++ b/ports/osi/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "osi", + "version-string": "0.108.6", + "port-version": 1, + "description": "Osi (Open Solver Interface) provides an abstract base class to a generic linear programming (LP) solver, along with derived classes for specific solvers. Many applications may be able to use the Osi to insulate themselves from a specific LP solver.", + "dependencies": [ + "coinutils" + ] +} diff --git a/ports/otl/CONTROL b/ports/otl/CONTROL deleted file mode 100644 index c3950ec25eb237..00000000000000 --- a/ports/otl/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: otl -Version: 4.0.442 -Description: Oracle, Odbc and DB2-CLI Template Library -Homepage: http://otl.sourceforge.net/ diff --git a/ports/otl/portfile.cmake b/ports/otl/portfile.cmake index eeaa6f2254bdbe..54896c2899c374 100644 --- a/ports/otl/portfile.cmake +++ b/ports/otl/portfile.cmake @@ -1,17 +1,21 @@ -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "http://otl.sourceforge.net/otlv4_h2.zip" - FILENAME "otl-4.0.442.zip" - SHA512 2f4005c2351021c92b86411e9c5847757b3596c485c34aa6a7228d86c446b0d9f1dcbfd228e9262d10c7460b77af0709b8ba9d5c7599ae54442efd88ccdbb96d -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - NO_REMOVE_ONE_LEVEL - REF 4.0.422 -) - -file(INSTALL ${SOURCE_PATH}/otlv4.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/otl) -file(INSTALL ${SOURCE_PATH}/otlv4.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/otl RENAME copyright) +set(OTL_VERSION 40463) + +vcpkg_download_distfile(ARCHIVE + URLS "http://otl.sourceforge.net/otlv4_${OTL_VERSION}.zip" + FILENAME "otlv4_${OTL_VERSION}-9485a0fe15a7.zip" + SHA512 9485a0fe15a737d55b0746a7e289b1a20e9435ed5c69bda7010705f8cde0a456163d83221d0103236a723837596613b578edc6d3d0007ce80a6cc76b4ed83888 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +file(INSTALL "${SOURCE_PATH}/otlv${OTL_VERSION}.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}" + RENAME otlv4.h) + +file(INSTALL "${SOURCE_PATH}/otlv${OTL_VERSION}.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/ports/otl/vcpkg.json b/ports/otl/vcpkg.json new file mode 100644 index 00000000000000..e2a6b46978ee5f --- /dev/null +++ b/ports/otl/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "otl", + "version": "4.0.463", + "description": "Oracle, Odbc and DB2-CLI Template Library", + "homepage": "http://otl.sourceforge.net/" +} diff --git a/ports/outcome/outcome-prune-sources.patch b/ports/outcome/outcome-prune-sources.patch new file mode 100644 index 00000000000000..59c5db01a50f2b --- /dev/null +++ b/ports/outcome/outcome-prune-sources.patch @@ -0,0 +1,12 @@ +diff --git "a/cmake/headers.cmake" "b/cmake/headers.cmake" +index 108038d16..bf4807e16 100644 +--- "a/cmake/headers.cmake" ++++ "b/cmake/headers.cmake" +@@ -47,7 +47,6 @@ set(outcome_HEADERS + "include/outcome/experimental/status-code/include/system_code_from_exception.hpp" + "include/outcome/experimental/status-code/include/system_error2.hpp" + "include/outcome/experimental/status-code/include/win32_code.hpp" +- "include/outcome/experimental/status-code/single-header/system_error2.hpp" + "include/outcome/experimental/status_outcome.hpp" + "include/outcome/experimental/status_result.hpp" + "include/outcome/iostream_support.hpp" diff --git a/ports/outcome/portfile.cmake b/ports/outcome/portfile.cmake new file mode 100644 index 00000000000000..79dc21b8e669ff --- /dev/null +++ b/ports/outcome/portfile.cmake @@ -0,0 +1,77 @@ +# Outcome is composed of other third party libraries: +# Outcome +# <= status-code +# <= quickcpplib +# <= byte-lite +# <= gsl-lite +# <= Optional +# +# byte-lite and gsl-lite are in vcpkg, but may not be versions +# known to be compatible with Outcome. It has occurred in the +# past that newer versions were severely broken with Outcome. +# +# One can fetch an 'all sources' tarball from +# https://github.com/ned14/outcome/releases which contains +# the exact copy of those third party libraries known to +# have passed Outcome's CI process. + +message(WARNING [=[ +Outcome depends on QuickCppLib which uses the vcpkg versions of gsl-lite and byte-lite, rather than the versions tested by QuickCppLib's and Outcome's CI. It is not guaranteed to work with other versions, with failures experienced in the past up-to-and-including runtime crashes. See the warning message from QuickCppLib for how you can pin the versions of those dependencies in your manifest file to those with which QuickCppLib was tested. Do not report issues to upstream without first pinning the versions as QuickCppLib was tested against. +]=]) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ned14/outcome + REF v2.2.0 + SHA512 2391667304c0160b7c753df157c948fa7d7f362c9f7f238fc53b0dcbdabe23f6d481909bb8e267c749af8c5c1a1c5083e91c12365fe1beb9bc70e6287f526879 + HEAD_REF develop + PATCHES + outcome-prune-sources.patch +) + +# Outcome needs a copy of QuickCppLib with which to bootstrap its cmake +file(COPY "${CURRENT_INSTALLED_DIR}/include/quickcpplib" + DESTINATION "${SOURCE_PATH}/quickcpplib/repo/include/" +) +file(COPY "${CURRENT_INSTALLED_DIR}/share/ned14-internal-quickcpplib/" + DESTINATION "${SOURCE_PATH}/quickcpplib/repo/" +) + +# Outcome expects status-code to live inside its include directory +file(COPY "${CURRENT_INSTALLED_DIR}/include/status-code/" + DESTINATION "${SOURCE_PATH}/include/outcome/experimental/status-code/include/" +) +file(COPY "${CURRENT_INSTALLED_DIR}/include/status-code/detail/" + DESTINATION "${SOURCE_PATH}/include/outcome/experimental/status-code/include/detail/" +) + +# Because outcome's deployed files are header-only, the debug build is not necessary +set(VCPKG_BUILD_TYPE release) + +# Already installed dependencies don't appear on the include path, which Outcome assumes. +string(APPEND VCPKG_CXX_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"") +string(APPEND VCPKG_C_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"") + +# Use Outcome's own build process, skipping examples and tests. +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DPROJECT_IS_DEPENDENCY=On + -Dquickcpplib_FOUND=1 + -DOUTCOME_ENABLE_DEPENDENCY_SMOKE_TEST=ON # Leave this always on to test everything compiles + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON +) + +if("run-tests" IN_LIST FEATURES) + vcpkg_build_cmake(TARGET test) +endif() + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/outcome) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/outcome/usage b/ports/outcome/usage new file mode 100644 index 00000000000000..6bf00403606032 --- /dev/null +++ b/ports/outcome/usage @@ -0,0 +1,4 @@ +The package outcome provides CMake targets: + + find_package(outcome CONFIG REQUIRED) + target_link_libraries(main PUBLIC outcome::hl) diff --git a/ports/outcome/vcpkg.json b/ports/outcome/vcpkg.json new file mode 100644 index 00000000000000..6c0a4e93ad307e --- /dev/null +++ b/ports/outcome/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "outcome", + "version-string": "2.2.0-release", + "port-version": 1, + "description": "Provides very lightweight outcome and result (non-Boost edition)", + "homepage": "https://github.com/ned14/outcome", + "supports": "!uwp", + "dependencies": [ + "ned14-internal-quickcpplib", + "status-code" + ], + "features": { + "run-tests": { + "description": "Build and run the dependency validation tests" + } + } +} diff --git a/ports/p-ranav-csv/CONTROL b/ports/p-ranav-csv/CONTROL deleted file mode 100644 index 958341f9ed7e24..00000000000000 --- a/ports/p-ranav-csv/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: p-ranav-csv -Version: 2019-07-11 -Description: CSV for modern C++ -Homepage: https://github.com/p-ranav/csv diff --git a/ports/p-ranav-csv/portfile.cmake b/ports/p-ranav-csv/portfile.cmake index 123842478822b6..fcbaeee74bb9da 100644 --- a/ports/p-ranav-csv/portfile.cmake +++ b/ports/p-ranav-csv/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO p-ranav/csv diff --git a/ports/p-ranav-csv/vcpkg.json b/ports/p-ranav-csv/vcpkg.json new file mode 100644 index 00000000000000..86a2e0a0ca6061 --- /dev/null +++ b/ports/p-ranav-csv/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "p-ranav-csv", + "version-string": "2019-07-11", + "port-version": 1, + "description": "[deprecated] CSV for modern C++", + "homepage": "https://github.com/p-ranav/csv" +} diff --git a/ports/p-ranav-csv2/portfile.cmake b/ports/p-ranav-csv2/portfile.cmake new file mode 100644 index 00000000000000..99196f53d25129 --- /dev/null +++ b/ports/p-ranav-csv2/portfile.cmake @@ -0,0 +1,25 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/csv2 + REF a20992f7a1b75215609037c4cc66f690e8691aab + SHA512 4459f34d3d3d2c256743d93dd9c66ac584366120e3c8829173e6f047bf7dce2b08284c82af360a274dea0d43f5d6e1c84bcae51bf4de97751cf41a2fd48cb62b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCSV2_BUILD_TESTS=OFF + -DCSV2_SAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/licenses) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.mio DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/p-ranav-csv2/vcpkg.json b/ports/p-ranav-csv2/vcpkg.json new file mode 100644 index 00000000000000..2b3d4dd861591d --- /dev/null +++ b/ports/p-ranav-csv2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "p-ranav-csv2", + "version-string": "2020-12-14", + "port-version": 1, + "description": "CSV for modern C++", + "homepage": "https://github.com/p-ranav/csv2" +} diff --git a/ports/pagmo2/disable-C4701.patch b/ports/pagmo2/disable-C4701.patch new file mode 100644 index 00000000000000..05ed75bd2dc005 --- /dev/null +++ b/ports/pagmo2/disable-C4701.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 96653ba..1afaafa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -80,7 +80,7 @@ endif() + if(YACMA_COMPILER_IS_MSVC) + # Disable the idiotic minmax macros on MSVC, some annoying warnings, + # enable the bigobj option and the WIN32_LEAN_AND_MEAN definition. +- list(APPEND PAGMO_CXX_FLAGS_DEBUG "-DNOMINMAX" "/wd4459" "/wd4127" "/wd4702" "/wd4251" "/bigobj" "-DWIN32_LEAN_AND_MEAN") ++ list(APPEND PAGMO_CXX_FLAGS_DEBUG "-DNOMINMAX" "/wd4459" "/wd4127" "/wd4702" "/wd4251" "/wd4701" "/bigobj" "-DWIN32_LEAN_AND_MEAN") + list(APPEND PAGMO_CXX_FLAGS_RELEASE "-DNOMINMAX" "/wd4459" "/wd4127" "/wd4702" "/wd4251" "/bigobj" "-DWIN32_LEAN_AND_MEAN") + # Enable strict conformance mode, if supported. + set(CMAKE_REQUIRED_QUIET TRUE) diff --git a/ports/pagmo2/disable-md-override.patch b/ports/pagmo2/disable-md-override.patch new file mode 100644 index 00000000000000..a5e09d3fa3bb11 --- /dev/null +++ b/ports/pagmo2/disable-md-override.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 96653ba..549d9d4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -141,6 +141,7 @@ endif() + # Boost setup. + include(PagmoFindBoost) + ++if(0) + # Explanation: on MSVC, when building static libraries, it is good practice to link + # to the static runtime. CMake, however, is hard-coded to link to the dynamic runtime. + # Hence we hackishly replace the /MD flag with /MT. This is the approach suggested +@@ -161,6 +162,7 @@ if(YACMA_COMPILER_IS_MSVC AND PAGMO_BUILD_STATIC_LIBRARY) + endif() + endforeach() + endif() ++endif() + + # List of source files. + set(PAGMO_SRC_FILES diff --git a/ports/pagmo2/find-tbb.patch b/ports/pagmo2/find-tbb.patch new file mode 100644 index 00000000000000..8781910f8aae5c --- /dev/null +++ b/ports/pagmo2/find-tbb.patch @@ -0,0 +1,12 @@ +diff --git a/pagmo-config.cmake.in b/pagmo-config.cmake.in +index 9553fc8..cb5e90b 100644 +--- a/pagmo-config.cmake.in ++++ b/pagmo-config.cmake.in +@@ -8,6 +8,7 @@ set(THREADS_PREFER_PTHREAD_FLAG YES) + find_package(Threads REQUIRED) + unset(THREADS_PREFER_PTHREAD_FLAG) + include(PagmoFindBoost) ++find_package(TBB REQUIRED) + @_PAGMO_CONFIG_OPTIONAL_DEPS@ + # Restore original module path. + set(CMAKE_MODULE_PATH "${_PAGMO_CONFIG_OLD_MODULE_PATH}") diff --git a/ports/pagmo2/portfile.cmake b/ports/pagmo2/portfile.cmake new file mode 100644 index 00000000000000..a709a2fb6a61e5 --- /dev/null +++ b/ports/pagmo2/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO esa/pagmo2 + REF v2.16.1 + SHA512 dac85a8525316e827df809d187d40f14dc20db7119796b7384d7855f83ba37e0bb595f6d8199053aac857460816929dd599c9d43802f2ed920a6f42dd2f16a03 + HEAD_REF master + PATCHES + "disable-C4701.patch" + "disable-md-override.patch" + "find-tbb.patch" +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + nlopt PAGMO_WITH_NLOPT +) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAGMO_BUILD_STATIC_LIBRARY) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DPAGMO_WITH_EIGEN3=ON + -DPAGMO_BUILD_STATIC_LIBRARY=${PAGMO_BUILD_STATIC_LIBRARY} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/pagmo) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING.lgpl3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/ports/pagmo2/vcpkg.json b/ports/pagmo2/vcpkg.json new file mode 100644 index 00000000000000..4e491b4969ef1f --- /dev/null +++ b/ports/pagmo2/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "pagmo2", + "version": "2.16.1", + "description": "A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.", + "homepage": "https://esa.github.io/pagmo2/", + "dependencies": [ + "boost-any", + "boost-graph", + "boost-serialization", + "eigen3", + "tbb" + ], + "features": { + "nlopt": { + "description": "Enable the NLopt wrappers", + "dependencies": [ + "nlopt" + ] + } + } +} diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL deleted file mode 100644 index bd0781fad796e4..00000000000000 --- a/ports/paho-mqtt/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: paho-mqtt -Version: 1.3.0 -Homepage: https://github.com/eclipse/paho.mqtt.c -Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things -Build-Depends: openssl diff --git a/ports/paho-mqtt/fix-install-path.patch b/ports/paho-mqtt/fix-install-path.patch index 4781419315f5f1..68cb3b4c4b89cc 100644 --- a/ports/paho-mqtt/fix-install-path.patch +++ b/ports/paho-mqtt/fix-install-path.patch @@ -1,56 +1,28 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 64ae92c..6d552d1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -64,11 +64,11 @@ ENDIF() - IF (PAHO_ENABLE_CPACK) - ### packaging settings - FILE(GLOB samples "src/samples/*.c") -- INSTALL(FILES ${samples} DESTINATION samples) -+ INSTALL(FILES ${samples} DESTINATION share/paho-mqtt/samples) - - SET(CPACK_PACKAGE_VENDOR "Eclipse Paho") - SET(CPACK_PACKAGE_NAME "Eclipse-Paho-MQTT-C") -- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) -+ INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION share/paho-mqtt) - - IF (WIN32) - SET(CPACK_GENERATOR "ZIP") -diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt -index f15f314..54deec5 100644 ---- a/doc/CMakeLists.txt -+++ b/doc/CMakeLists.txt -@@ -39,7 +39,7 @@ ENDFOREACH(DOXYFILE_SRC) - - ADD_CUSTOM_TARGET(doc ALL DEPENDS ${DOXYTARGETS}) - IF (PAHO_ENABLE_CPACK) -- INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share) -+ INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share/paho-mqtt) - ELSE() - INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION ${CMAKE_INSTALL_DOCDIR}) - ENDIF() -\ No newline at end of file -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index b46eaca..a132062 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -89,7 +89,7 @@ INSTALL(TARGETS paho-mqtt3c paho-mqtt3a - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - INSTALL(TARGETS MQTTVersion -- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ RUNTIME DESTINATION tools/paho-mqtt) - - IF (PAHO_BUILD_STATIC) - ADD_LIBRARY(paho-mqtt3c-static STATIC $ MQTTClient.c) -@@ -102,8 +102,8 @@ IF (PAHO_BUILD_STATIC) - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - ENDIF() - --INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h MQTTReasonCodes.h MQTTSubscribeOpts.h -- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -+INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h MQTTReasonCodes.h MQTTSubscribeOpts.h -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/paho-mqtt) - - IF (PAHO_WITH_SSL) - SET(OPENSSL_SEARCH_PATH "" CACHE PATH "Directory containing OpenSSL libraries and includes") +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aa4ad05..669adde 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,8 +60,8 @@ IF (NOT PAHO_BUILD_SHARED AND NOT PAHO_BUILD_STATIC) + MESSAGE(FATAL_ERROR "You must set either PAHO_BUILD_SHARED, PAHO_BUILD_STATIC, or both") + ENDIF() + +-IF(PAHO_BUILD_DEB_PACKAGE) +- set(CMAKE_INSTALL_DOCDIR share/doc/libpaho-mqtt) ++IF(1) ++ set(CMAKE_INSTALL_DOCDIR share/paho-mqtt) + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + ENDIF() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 0bc7194..db4a0ac 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -183,7 +183,7 @@ IF (PAHO_BUILD_STATIC) + ENDIF() + + INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h MQTTReasonCodes.h MQTTSubscribeOpts.h MQTTExportDeclarations.h +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/paho-mqtt) + + IF (PAHO_WITH_SSL) + SET(OPENSSL_ROOT_DIR "" CACHE PATH "Directory containing OpenSSL libraries and includes") diff --git a/ports/paho-mqtt/fix-static-build.patch b/ports/paho-mqtt/fix-static-build.patch deleted file mode 100644 index 5e6aab04716812..00000000000000 --- a/ports/paho-mqtt/fix-static-build.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 14b94b1..508c5b1 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -65,28 +65,29 @@ ENDIF() - ADD_LIBRARY(common_obj OBJECT ${common_src}) - SET_PROPERTY(TARGET common_obj PROPERTY POSITION_INDEPENDENT_CODE ON) - --ADD_EXECUTABLE(MQTTVersion MQTTVersion.c) -- --ADD_LIBRARY(paho-mqtt3c SHARED $ MQTTClient.c) --ADD_LIBRARY(paho-mqtt3a SHARED $ MQTTAsync.c) -- --TARGET_LINK_LIBRARIES(paho-mqtt3c ${LIBS_SYSTEM}) --TARGET_LINK_LIBRARIES(paho-mqtt3a ${LIBS_SYSTEM}) -- --TARGET_LINK_LIBRARIES(MQTTVersion paho-mqtt3a paho-mqtt3c ${LIBS_SYSTEM}) --SET_TARGET_PROPERTIES( -- paho-mqtt3c paho-mqtt3a PROPERTIES -- VERSION ${CLIENT_VERSION} -- SOVERSION ${PAHO_VERSION_MAJOR}) -- --INSTALL(TARGETS paho-mqtt3c paho-mqtt3a -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) --INSTALL(TARGETS MQTTVersion -- RUNTIME DESTINATION tools/paho-mqtt) -- --IF (PAHO_BUILD_STATIC) -+IF (NOT PAHO_BUILD_STATIC) -+ ADD_EXECUTABLE(MQTTVersion MQTTVersion.c) -+ -+ ADD_LIBRARY(paho-mqtt3c SHARED $ MQTTClient.c) -+ ADD_LIBRARY(paho-mqtt3a SHARED $ MQTTAsync.c) -+ -+ TARGET_LINK_LIBRARIES(paho-mqtt3c ${LIBS_SYSTEM}) -+ TARGET_LINK_LIBRARIES(paho-mqtt3a ${LIBS_SYSTEM}) -+ -+ TARGET_LINK_LIBRARIES(MQTTVersion paho-mqtt3a paho-mqtt3c ${LIBS_SYSTEM}) -+ SET_TARGET_PROPERTIES( -+ paho-mqtt3c paho-mqtt3a PROPERTIES -+ VERSION ${CLIENT_VERSION} -+ SOVERSION ${PAHO_VERSION_MAJOR}) -+ -+ INSTALL(TARGETS paho-mqtt3c paho-mqtt3a -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ INSTALL(TARGETS MQTTVersion -+ RUNTIME DESTINATION tools/paho-mqtt) -+ELSE() -+ message("Build as static library") - ADD_LIBRARY(paho-mqtt3c-static STATIC $ MQTTClient.c) - ADD_LIBRARY(paho-mqtt3a-static STATIC $ MQTTAsync.c) - -@@ -132,22 +133,24 @@ IF (PAHO_WITH_SSL) - ADD_LIBRARY(common_ssl_obj OBJECT ${common_src}) - SET_PROPERTY(TARGET common_ssl_obj PROPERTY POSITION_INDEPENDENT_CODE ON) - SET_PROPERTY(TARGET common_ssl_obj PROPERTY COMPILE_DEFINITIONS "OPENSSL=1") -- ADD_LIBRARY(paho-mqtt3cs SHARED $ MQTTClient.c SSLSocket.c) -- ADD_LIBRARY(paho-mqtt3as SHARED $ MQTTAsync.c SSLSocket.c) -- -- TARGET_LINK_LIBRARIES(paho-mqtt3cs ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) -- TARGET_LINK_LIBRARIES(paho-mqtt3as ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) -- SET_TARGET_PROPERTIES( -- paho-mqtt3cs paho-mqtt3as PROPERTIES -- VERSION ${CLIENT_VERSION} -- SOVERSION ${PAHO_VERSION_MAJOR} -- COMPILE_DEFINITIONS "OPENSSL=1") -- INSTALL(TARGETS paho-mqtt3cs paho-mqtt3as -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -- -- IF (PAHO_BUILD_STATIC) -+ -+ IF (NOT PAHO_BUILD_STATIC) -+ ADD_LIBRARY(paho-mqtt3cs SHARED $ MQTTClient.c SSLSocket.c) -+ ADD_LIBRARY(paho-mqtt3as SHARED $ MQTTAsync.c SSLSocket.c) -+ -+ TARGET_LINK_LIBRARIES(paho-mqtt3cs ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) -+ TARGET_LINK_LIBRARIES(paho-mqtt3as ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) -+ SET_TARGET_PROPERTIES( -+ paho-mqtt3cs paho-mqtt3as PROPERTIES -+ VERSION ${CLIENT_VERSION} -+ SOVERSION ${PAHO_VERSION_MAJOR} -+ COMPILE_DEFINITIONS "OPENSSL=1") -+ INSTALL(TARGETS paho-mqtt3cs paho-mqtt3as -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ ELSE() -+ message("Build as static library") - ADD_LIBRARY(paho-mqtt3cs-static STATIC $ MQTTClient.c SSLSocket.c) - ADD_LIBRARY(paho-mqtt3as-static STATIC $ MQTTAsync.c SSLSocket.c) - diff --git a/ports/paho-mqtt/fix-unresolvedsymbol-arm.patch b/ports/paho-mqtt/fix-unresolvedsymbol-arm.patch index 16590188780c65..7726368326ef3d 100644 --- a/ports/paho-mqtt/fix-unresolvedsymbol-arm.patch +++ b/ports/paho-mqtt/fix-unresolvedsymbol-arm.patch @@ -1,12 +1,12 @@ -diff --git a/src/SHA1.c b/src/SHA1.c -index 9bb1175..b2ef930 100644 ---- a/src/SHA1.c -+++ b/src/SHA1.c -@@ -19,6 +19,7 @@ - #if !defined(OPENSSL) - #if defined(WIN32) || defined(WIN64) - #pragma comment(lib, "crypt32.lib") -+#pragma comment(lib, "Advapi32.lib") - - int SHA1_Init(SHA_CTX *c) - { +diff --git a/src/SHA1.c b/src/SHA1.c +index 3ef07d9..f0e82ce 100644 +--- a/src/SHA1.c ++++ b/src/SHA1.c +@@ -19,6 +19,7 @@ + #if !defined(OPENSSL) + #if defined(_WIN32) || defined(_WIN64) + #pragma comment(lib, "crypt32.lib") ++#pragma comment(lib, "Advapi32.lib") + + int SHA1_Init(SHA_CTX *c) + { diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake index 03b6c73bd75fdb..7c7875bb2be7b6 100644 --- a/ports/paho-mqtt/portfile.cmake +++ b/ports/paho-mqtt/portfile.cmake @@ -1,31 +1,37 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO eclipse/paho.mqtt.c - REF 9f715d0862a8e16099b5837c4e53a1bf6a6a0675 - SHA512 3ab5e25bfe303f51485696248e78a8a10f20c0e69b7ea6016165a97d61172336e8fbe5b9d059ae546357bace9f3adb8e2026643b61a6af82fae448a024e51d21 + REF 3b7ae6348bc917d42c04efa962e4868c09bbde9f # v1.3.9 + SHA512 73c10b7da7aa228100511db280ae56484cb8c42b8f0cfafb2fa3f6e230b4bb1d6b3611aa9219736a0baa9d7de0baf802dd70dbf308077f1a745bd61a67a797c7 HEAD_REF master PATCHES - remove_compiler_options.patch - fix-install-path.patch - fix-static-build.patch - fix-unresolvedsymbol-arm.patch + remove_compiler_options.patch + fix-install-path.patch + fix-unresolvedsymbol-arm.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAHO_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PAHO_BUILD_DYNAMIC) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC} -DPAHO_ENABLE_TESTING=FALSE + OPTIONS + -DPAHO_WITH_SSL=TRUE + -DPAHO_BUILD_SHARED=${PAHO_BUILD_DYNAMIC} + -DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC} + -DPAHO_ENABLE_TESTING=FALSE ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/eclipse-paho-mqtt-c TARGET_PATH share/eclipse-paho-mqtt-c) vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_copy_tools(TOOL_NAMES MQTTVersion AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") -file(RENAME ${CURRENT_PACKAGES_DIR}/share/paho-mqtt/README.md ${CURRENT_PACKAGES_DIR}/share/paho-mqtt/readme) -file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright) +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/paho-mqtt/remove_compiler_options.patch b/ports/paho-mqtt/remove_compiler_options.patch index 60bf370ce4532c..a1193fee87745b 100644 --- a/ports/paho-mqtt/remove_compiler_options.patch +++ b/ports/paho-mqtt/remove_compiler_options.patch @@ -1,9 +1,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index be8d2e8..418e2f2 100644 +index 531c39c..3df385a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -37,7 +37,7 @@ STRING(TIMESTAMP BUILD_TIMESTAMP UTC) - MESSAGE(STATUS "Timestamp is ${BUILD_TIMESTAMP}") +@@ -41,7 +41,7 @@ IF (PAHO_HIGH_PERFORMANCE) + ENDIF() IF(WIN32) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD) diff --git a/ports/paho-mqtt/vcpkg.json b/ports/paho-mqtt/vcpkg.json new file mode 100644 index 00000000000000..186e1299ef7af0 --- /dev/null +++ b/ports/paho-mqtt/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "paho-mqtt", + "version-semver": "1.3.9", + "description": "Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things", + "homepage": "https://github.com/eclipse/paho.mqtt.c", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/paho-mqttpp3/CONTROL b/ports/paho-mqttpp3/CONTROL deleted file mode 100644 index 7e3391668f5fa9..00000000000000 --- a/ports/paho-mqttpp3/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: paho-mqttpp3 -Version: 1.0.1-1 -Description: Paho project provides open-source C++ wrapper for Paho C library -Build-Depends: paho-mqtt -Default-Features: ssl - -Feature: ssl -Description: Build with SSL support -Build-Depends: openssl diff --git a/ports/paho-mqttpp3/fix-dependency.patch b/ports/paho-mqttpp3/fix-dependency.patch new file mode 100644 index 00000000000000..1ace8a30d024dd --- /dev/null +++ b/ports/paho-mqttpp3/fix-dependency.patch @@ -0,0 +1,84 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index a9f8908..5c98f3f 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -17,6 +17,5 @@ install(EXPORT ${package_name} DESTINATION lib/cmake/${package_name} + + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Config.cmake" +- FindPahoMqttC.cmake + "${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake" + DESTINATION lib/cmake/${package_name}) +diff --git a/cmake/PahoMqttCppConfig.cmake.in b/cmake/PahoMqttCppConfig.cmake.in +index 164e123..9beac1c 100644 +--- a/cmake/PahoMqttCppConfig.cmake.in ++++ b/cmake/PahoMqttCppConfig.cmake.in +@@ -5,7 +5,7 @@ set(PAHO_WITH_SSL @PAHO_WITH_SSL@) + + include(CMakeFindDependencyMacro) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +-find_dependency(PahoMqttC REQUIRED) ++find_dependency(eclipse-paho-mqtt-c REQUIRED) + list(REMOVE_AT CMAKE_MODULE_PATH -1) + find_dependency(Threads REQUIRED) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3d43595..a25f74d 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -23,7 +23,7 @@ + # Frank Pagliughi - made the shared library optional + #*******************************************************************************/ + +-find_package(PahoMqttC REQUIRED) ++find_package(eclipse-paho-mqtt-c CONFIG REQUIRED) + + # --- The headers --- + +@@ -81,13 +81,21 @@ target_include_directories(paho-cpp-objs + ## --- Build the shared library, if requested --- + + if(PAHO_BUILD_SHARED) ++ ## set PAHO_C_LIB ++ if(PAHO_WITH_SSL) ++ find_package(OpenSSL REQUIRED) ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3as eclipse-paho-mqtt-c::paho-mqtt3cs) ++ else() ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3a eclipse-paho-mqtt-c::paho-mqtt3c) ++ endif() ++ + ## create the shared library + add_library(paho-mqttpp3 SHARED $) + + ## add dependencies to the shared library + target_link_libraries(paho-mqttpp3 + PRIVATE ${LIBS_SYSTEM} +- PUBLIC PahoMqttC::PahoMqttC Threads::Threads) ++ PUBLIC ${_PAHO_MQTT_C_LIB_NAME} Threads::Threads) + + # It would be nice to exort the include paths from the obj lib, but we + # get an export error. Perhaps in a future version? +@@ -119,13 +127,22 @@ endif() + ## --- Build static version of the library, if requested --- + + if(PAHO_BUILD_STATIC) ++ ++ ## set PAHO_C_LIB ++ if(PAHO_WITH_SSL) ++ find_package(OpenSSL REQUIRED) ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3as-static eclipse-paho-mqtt-c::paho-mqtt3cs-static) ++ else() ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3a-static eclipse-paho-mqtt-c::paho-mqtt3c-static) ++ endif() ++ + ## create the static library + add_library(paho-mqttpp3-static STATIC $) + + ## add dependencies to the shared library + target_link_libraries(paho-mqttpp3-static + PRIVATE ${LIBS_SYSTEM} +- PUBLIC PahoMqttC::PahoMqttC Threads::Threads) ++ PUBLIC ${_PAHO_MQTT_C_LIB_NAME} Threads::Threads) + + target_include_directories(paho-mqttpp3-static PUBLIC + $ diff --git a/ports/paho-mqttpp3/fix-include-path.patch b/ports/paho-mqttpp3/fix-include-path.patch new file mode 100644 index 00000000000000..17310738de3f5d --- /dev/null +++ b/ports/paho-mqttpp3/fix-include-path.patch @@ -0,0 +1,249 @@ +diff --git a/src/mqtt/async_client.h b/src/mqtt/async_client.h +index 7fb13a4..59247ca 100644 +--- a/src/mqtt/async_client.h ++++ b/src/mqtt/async_client.h +@@ -25,7 +25,7 @@ + #ifndef __mqtt_async_client_h + #define __mqtt_async_client_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/token.h" + #include "mqtt/create_options.h" +diff --git a/src/mqtt/callback.h b/src/mqtt/callback.h +index 63f21a1..c4638fa 100644 +--- a/src/mqtt/callback.h ++++ b/src/mqtt/callback.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_callback_h + #define __mqtt_callback_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/delivery_token.h" + #include "mqtt/types.h" + #include +diff --git a/src/mqtt/connect_options.h b/src/mqtt/connect_options.h +index 8001fe3..650ba91 100644 +--- a/src/mqtt/connect_options.h ++++ b/src/mqtt/connect_options.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_connect_options_h + #define __mqtt_connect_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/message.h" + #include "mqtt/topic.h" +diff --git a/src/mqtt/create_options.h b/src/mqtt/create_options.h +index d57e32b..2bb3561 100644 +--- a/src/mqtt/create_options.h ++++ b/src/mqtt/create_options.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_create_options_h + #define __mqtt_create_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + + namespace mqtt { +diff --git a/src/mqtt/delivery_token.h b/src/mqtt/delivery_token.h +index b70d582..ee1b306 100644 +--- a/src/mqtt/delivery_token.h ++++ b/src/mqtt/delivery_token.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_delivery_token_h + #define __mqtt_delivery_token_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/token.h" + #include "mqtt/message.h" + #include +diff --git a/src/mqtt/disconnect_options.h b/src/mqtt/disconnect_options.h +index db93679..2739d89 100644 +--- a/src/mqtt/disconnect_options.h ++++ b/src/mqtt/disconnect_options.h +@@ -23,7 +23,7 @@ + #ifndef __mqtt_disconnect_options_h + #define __mqtt_disconnect_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/token.h" + #include "mqtt/properties.h" +diff --git a/src/mqtt/exception.h b/src/mqtt/exception.h +index 9db330a..32b7c97 100644 +--- a/src/mqtt/exception.h ++++ b/src/mqtt/exception.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_exception_h + #define __mqtt_exception_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include + #include +diff --git a/src/mqtt/iaction_listener.h b/src/mqtt/iaction_listener.h +index 1e34577..2af8c1b 100644 +--- a/src/mqtt/iaction_listener.h ++++ b/src/mqtt/iaction_listener.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_iaction_listener_h + #define __mqtt_iaction_listener_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include + +diff --git a/src/mqtt/iclient_persistence.h b/src/mqtt/iclient_persistence.h +index 635a292..aedc1d9 100644 +--- a/src/mqtt/iclient_persistence.h ++++ b/src/mqtt/iclient_persistence.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_iclient_persistence_h + #define __mqtt_iclient_persistence_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/buffer_view.h" + #include "mqtt/string_collection.h" +diff --git a/src/mqtt/message.h b/src/mqtt/message.h +index 4cb95a6..e036269 100644 +--- a/src/mqtt/message.h ++++ b/src/mqtt/message.h +@@ -25,7 +25,7 @@ + #ifndef __mqtt_message_h + #define __mqtt_message_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/buffer_ref.h" + #include "mqtt/properties.h" + #include "mqtt/exception.h" +diff --git a/src/mqtt/properties.h b/src/mqtt/properties.h +index 826bc97..42c286a 100644 +--- a/src/mqtt/properties.h ++++ b/src/mqtt/properties.h +@@ -25,7 +25,7 @@ + #define __mqtt_properties_h + + extern "C" { +- #include "MQTTProperties.h" ++ #include "paho-mqtt/MQTTAsync.h" + } + + #include "mqtt/types.h" +diff --git a/src/mqtt/response_options.h b/src/mqtt/response_options.h +index 7bcb45c..40e45a2 100644 +--- a/src/mqtt/response_options.h ++++ b/src/mqtt/response_options.h +@@ -7,7 +7,7 @@ + #ifndef __mqtt_response_options_h + #define __mqtt_response_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/token.h" + #include "mqtt/delivery_token.h" + #include "subscribe_options.h" +diff --git a/src/mqtt/server_response.h b/src/mqtt/server_response.h +index a111839..094135b 100644 +--- a/src/mqtt/server_response.h ++++ b/src/mqtt/server_response.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_server_response_h + #define __mqtt_server_response_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/properties.h" + +diff --git a/src/mqtt/ssl_options.h b/src/mqtt/ssl_options.h +index eba49ed..aad0da3 100644 +--- a/src/mqtt/ssl_options.h ++++ b/src/mqtt/ssl_options.h +@@ -27,7 +27,7 @@ + #ifndef __mqtt_ssl_options_h + #define __mqtt_ssl_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/message.h" + #include "mqtt/topic.h" + #include "mqtt/types.h" +diff --git a/src/mqtt/string_collection.h b/src/mqtt/string_collection.h +index bc43775..99a2674 100644 +--- a/src/mqtt/string_collection.h ++++ b/src/mqtt/string_collection.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_string_collection_h + #define __mqtt_string_collection_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include + #include +diff --git a/src/mqtt/subscribe_options.h b/src/mqtt/subscribe_options.h +index 753c811..5f0d86c 100644 +--- a/src/mqtt/subscribe_options.h ++++ b/src/mqtt/subscribe_options.h +@@ -24,8 +24,8 @@ + #ifndef __mqtt_subscribe_options_h + #define __mqtt_subscribe_options_h + +-#include "MQTTAsync.h" +-#include "MQTTSubscribeOpts.h" ++#include "paho-mqtt/MQTTAsync.h" ++#include "paho-mqtt/MQTTSubscribeOpts.h" + #include "mqtt/types.h" + + namespace mqtt { +diff --git a/src/mqtt/token.h b/src/mqtt/token.h +index 4cafda7..1815ab9 100644 +--- a/src/mqtt/token.h ++++ b/src/mqtt/token.h +@@ -25,7 +25,7 @@ + #ifndef __mqtt_token_h + #define __mqtt_token_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/iaction_listener.h" + #include "mqtt/exception.h" + #include "mqtt/types.h" +diff --git a/src/mqtt/topic.h b/src/mqtt/topic.h +index 618eb85..555de60 100644 +--- a/src/mqtt/topic.h ++++ b/src/mqtt/topic.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_topic_h + #define __mqtt_topic_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/delivery_token.h" + #include "mqtt/subscribe_options.h" + #include "mqtt/message.h" +diff --git a/src/mqtt/will_options.h b/src/mqtt/will_options.h +index 8c5c67d..63bfffc 100644 +--- a/src/mqtt/will_options.h ++++ b/src/mqtt/will_options.h +@@ -26,7 +26,7 @@ + #ifndef __mqtt_will_options_h + #define __mqtt_will_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/message.h" + #include "mqtt/topic.h" diff --git a/ports/paho-mqttpp3/portfile.cmake b/ports/paho-mqttpp3/portfile.cmake index f91177ac08d3b8..7926d0d73c174d 100644 --- a/ports/paho-mqttpp3/portfile.cmake +++ b/ports/paho-mqttpp3/portfile.cmake @@ -1,16 +1,18 @@ -include(vcpkg_common_functions) - # Download from Github vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO eclipse/paho.mqtt.cpp - REF v1.0.1 - SHA512 be612197fae387b9f1d8f10944d451ec9e7ebec6045beed365e642089c0a5fde882ed5c734f2b46a5008f98b8445a51114492f0f36fdc684b8a8fe4b71fe31a4 + REF 33921c8b68b351828650c36816e7ecf936764379 #v1.2.0 + SHA512 3f4a91987e0106e50e637d8d4fb13a4f8aca14eea168102664fdcebd1260609434e679f5986a1c4d71746735530f1b72fc29d2ac05cb35b3ce734a6aab1a0a55 HEAD_REF master + PATCHES + fix-include-path.patch + fix-dependency.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - "ssl" PAHO_WITH_SSL + FEATURES + "ssl" PAHO_WITH_SSL ) # Link with 'paho-mqtt3as' library @@ -24,10 +26,8 @@ else() endif() # Setting the include path where MqttClient.h is present -set(PAHO_C_INC "${CURRENT_INSTALLED_DIR}/include/paho-mqtt") +set(PAHO_C_INC "${CURRENT_INSTALLED_DIR}/include") -# Set the generator to Ninja -set(PAHO_CMAKE_GENERATOR "Ninja") # NOTE: the Paho C++ cmake files on Github are problematic. # It uses two different options PAHO_BUILD_STATIC and PAHO_BUILD_SHARED instead of just using one variable. @@ -46,13 +46,12 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - GENERATOR ${PAHO_CMAKE_GENERATOR} OPTIONS - -DPAHO_BUILD_STATIC=${PAHO_MQTTPP3_STATIC} - -DPAHO_BUILD_SHARED=${PAHO_MQTTPP3_SHARED} - -DPAHO_MQTT_C_INCLUDE_DIRS=${PAHO_C_INC} - ${FEATURE_OPTIONS} - ${PAHO_OPTIONS} + -DPAHO_BUILD_STATIC=${PAHO_MQTTPP3_STATIC} + -DPAHO_BUILD_SHARED=${PAHO_MQTTPP3_SHARED} + -DPAHO_MQTT_C_INCLUDE_DIRS=${PAHO_C_INC} + ${FEATURE_OPTIONS} + ${PAHO_OPTIONS} ) # Run the build, copy pdbs and fixup the cmake targets @@ -65,4 +64,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Add copyright -file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqttpp3 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/paho-mqttpp3/vcpkg.json b/ports/paho-mqttpp3/vcpkg.json new file mode 100644 index 00000000000000..b4152d7085e5c8 --- /dev/null +++ b/ports/paho-mqttpp3/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "paho-mqttpp3", + "version": "1.2.0", + "description": "Paho project provides open-source C++ wrapper for Paho C library", + "homepage": "https://github.com/eclipse/paho.mqtt.cpp", + "dependencies": [ + "paho-mqtt" + ], + "default-features": [ + "ssl" + ], + "features": { + "ssl": { + "description": "Build with SSL support", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/palsigslot/portfile.cmake b/ports/palsigslot/portfile.cmake new file mode 100644 index 00000000000000..0ec29449202d85 --- /dev/null +++ b/ports/palsigslot/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO palacaze/sigslot + REF v1.2.0 + SHA512 6a6fb862a9eeea78732f2191916c7384a4bcb65e42c948f726459ee3cb446f90c4bd18c7c94ee4f9b15c81c5aa729094013805161d532c2284d9e77cdffaa468 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSIGSLOT_COMPILE_EXAMPLES=OFF + -DSIGSLOT_COMPILE_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/PalSigslot TARGET_PATH share/PalSigslot) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/palsigslot/usage b/ports/palsigslot/usage new file mode 100644 index 00000000000000..6242d2829b8f33 --- /dev/null +++ b/ports/palsigslot/usage @@ -0,0 +1,4 @@ +The package palsigslot is compatible with built-in CMake targets: + + find_package(PalSigslot CONFIG REQUIRED) + target_link_libraries(main PRIVATE Pal::Sigslot) diff --git a/ports/palsigslot/vcpkg.json b/ports/palsigslot/vcpkg.json new file mode 100644 index 00000000000000..d3b7e9f898e142 --- /dev/null +++ b/ports/palsigslot/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "palsigslot", + "version-string": "1.2.0", + "description": "A header-only, thread safe implementation of signal-slots for C++.", + "homepage": "https://github.com/palacaze/sigslot" +} diff --git a/ports/pango/0001-fix-static-symbols-export.diff b/ports/pango/0001-fix-static-symbols-export.diff deleted file mode 100644 index a7ab60901ff1a6..00000000000000 --- a/ports/pango/0001-fix-static-symbols-export.diff +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/config.h.win32 b/config.h.win32 -index 31b330f..e5ed86c 100644 ---- a/config.h.win32 -+++ b/config.h.win32 -@@ -147,7 +147,11 @@ - - /* defines how to decorate public symbols while building */ - #ifdef _MSC_VER -+#ifdef PANGO_EXPORTS - #define _PANGO_EXTERN __declspec(dllexport) extern - #else -+#define _PANGO_EXTERN extern -+#endif -+#else - #define _PANGO_EXTERN __attribute__((visibility("default"))) __declspec(dllexport) extern - #endif diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt deleted file mode 100644 index f0e6d85e7e63fc..00000000000000 --- a/ports/pango/CMakeLists.txt +++ /dev/null @@ -1,206 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(pango C) - -set(PANGO_LIB_SUFFIX 1.0) -set(PANGO_DLL_SUFFIX 1) -set(GLIB_LIB_VERSION 2.0) - -if(WIN32) - configure_file(./config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) -else() - configure_file(./config.h.unix ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) -endif() - -if (WIN32) - # Set utf-8 charset to avoid compile error C2001 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8") -endif() - -add_definitions(-DHAVE_CONFIG_H) -include_directories(. ./pango ${CMAKE_CURRENT_BINARY_DIR}) - -if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") -# find libintl -find_path(LIBINTL_INCLUDE_DIR libintl.h) -find_library(LIBINTL_LIBRARY NAMES libintl intl) -endif() - -# find glib -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_VERSION}) -find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_VERSION}) -find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_VERSION}) -set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GOBJECT_LIBRARY} ${GLIB_GMODULE_LIBRARY}) - -# find cairo -find_path(CAIRO_INCLUDE_DIR cairo.h) -if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(CAIRO_SUFFIX d) -endif() -find_library(CAIRO_LIBRARY - NAMES - cairo${CAIRO_SUFFIX} - cairo-static${CAIRO_SUFFIX}) -find_library(CAIRO_GOBJECT_LIBRARY cairo-gobject${CAIRO_SUFFIX}) -set(CAIRO_LIBRARIES ${CAIRO_LIBRARY} ${CAIRO_GOBJECT_LIBRARY}) - -# find fontconfig -find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h) -find_library(FONTCONFIG_LIBRARY fontconfig) - -# find freetype -find_path(FREETYPE_INCLUDE_DIR ft2build.h) -if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(FT_SUFFIX d) -endif() -find_library(FREETYPE_LIBRARY freetype${FT_SUFFIX}) - -# find harfbuzz -find_path(HARFBUZZ_INCLUDE_DIR harfbuzz/hb.h) -find_library(HARFBUZZ_LIBRARY harfbuzz) - -set(FONT_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR} ${FONTCONFIG_INCLUDE_DIR} ${HARFBUZZ_INCLUDE_DIR}/harfbuzz) -set(FONT_LIBRARIES ${FREETYPE_LIBRARY} ${FONTCONFIG_LIBRARY} ${HARFBUZZ_LIBRARY}) - -macro(pango_add_module MODULE_NAME) - add_library(${MODULE_NAME} ${ARGN}) - target_include_directories(${MODULE_NAME} PRIVATE ${GLIB_INCLUDE_DIR} ${LIBINTL_INCLUDE_DIR}) - target_link_libraries(${MODULE_NAME} ${LIBINTL_LIBRARY} ${GLIB_LIBRARIES}) - target_compile_definitions(${MODULE_NAME} PRIVATE - G_LOG_DOMAIN="Pango" PANGO_ENABLE_BACKEND PANGO_ENABLE_ENGINE - G_DISABLE_SINGLE_INCLUDES SYSCONFDIR="/dummy/etc" LIBDIR="/dummy/lib") - target_compile_definitions(${MODULE_NAME} PRIVATE HAVE_CAIRO_FREETYPE=1) - set_target_properties(${MODULE_NAME} PROPERTIES - DEFINE_SYMBOL PANGO_EXPORTS - OUTPUT_NAME ${MODULE_NAME}-${PANGO_DLL_SUFFIX} - ARCHIVE_OUTPUT_NAME ${MODULE_NAME}-${PANGO_LIB_SUFFIX}) - install(TARGETS ${MODULE_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) -endmacro() - -pango_add_module(pango - pango/break-arabic.c - pango/break-indic.c - pango/mini-fribidi/fribidi.c - pango/mini-fribidi/fribidi_char_type.c - pango/mini-fribidi/fribidi_types.c - pango/break.c - pango/ellipsize.c - pango/fonts.c - pango/glyphstring.c - pango/modules.c - pango/pango-attributes.c - pango/pango-bidi-type.c - pango/pango-color.c - pango/pango-context.c - pango/pango-coverage.c - pango/pango-emoji.c - pango/pango-engine.c - pango/pango-fontmap.c - pango/pango-fontset.c - pango/pango-glyph-item.c - pango/pango-gravity.c - pango/pango-item.c - pango/pango-language.c - pango/pango-layout.c - pango/pango-markup.c - pango/pango-matrix.c - pango/pango-renderer.c - pango/pango-script.c - pango/pango-tabs.c - pango/pango-utils.c - pango/reorder-items.c - pango/shape.c - pango/pango-enum-types.c) - -if(WIN32) -pango_add_module(pangowin32 - pango/pangowin32.c - pango/pangowin32-fontcache.c - pango/pangowin32-fontmap.c - pango/pangowin32-shape.c) -target_link_libraries(pangowin32 usp10 pango) -endif() - -pango_add_module(pangoft2 - pango/pangofc-font.c - pango/pangofc-fontmap.c - pango/pangofc-decoder.c - pango/pangofc-shape.c - pango/pangoft2.c - pango/pangoft2-fontmap.c - pango/pangoft2-render.c - pango/pango-ot-buffer.c - pango/pango-ot-info.c - pango/pango-ot-ruleset.c - pango/pango-ot-tag.c) -target_link_libraries(pangoft2 pango ${FONT_LIBRARIES}) -target_include_directories(pangoft2 PRIVATE ${FONT_INCLUDE_DIRS}) - -list(APPEND PANGO_CAIRO_SOURCES - pango/pangocairo-fcfont.c - pango/pangocairo-fcfontmap.c - pango/pangocairo-context.c - pango/pangocairo-font.c - pango/pangocairo-fontmap.c - pango/pangocairo-render.c) - -if(WIN32) - list(APPEND PANGO_CAIRO_SOURCES - pango/pangocairo-win32font.c - pango/pangocairo-win32fontmap.c) -endif() - -pango_add_module(pangocairo ${PANGO_CAIRO_SOURCES}) -target_link_libraries(pangocairo ${CAIRO_LIBRARIES} pango pangowin32 pangoft2 ${FONT_LIBRARIES}) -target_include_directories(pangocairo PRIVATE ${CAIRO_INCLUDE_DIR} ${FONT_INCLUDE_DIRS}) - - -if(NOT PANGO_SKIP_HEADERS) - install(FILES - pango/pango.h - pango/pango-attributes.h - pango/pango-bidi-type.h - pango/pango-break.h - pango/pango-context.h - pango/pango-coverage.h - pango/pango-engine.h - pango/pango-font.h - pango/pango-fontmap.h - pango/pango-fontset.h - pango/pango-glyph.h - pango/pango-glyph-item.h - pango/pango-gravity.h - pango/pango-item.h - pango/pango-language.h - pango/pango-layout.h - pango/pango-matrix.h - pango/pango-modules.h - pango/pango-renderer.h - pango/pango-script.h - pango/pango-tabs.h - pango/pango-types.h - pango/pango-utils.h - pango/pango-version-macros.h - pango/pangocairo.h - pango/pangowin32.h - pango/pango-features.h - pango/pango-enum-types.h - pango/pangofc-decoder.h - pango/pangofc-font.h - pango/pangofc-fontmap.h - pango/pango-ot.h - pango/pangoft2.h - DESTINATION include/pango) -endif() - -message(STATUS "Link-time dependencies:") -message(STATUS " " ${LIBINTL_LIBRARY}) -foreach(GL ${GLIB_LIBRARIES}) - message(STATUS " " ${GL}) -endforeach() -foreach(CL ${CAIRO_LIBRARIES}) - message(STATUS " " ${CL}) -endforeach() -foreach(FL ${FONT_LIBRARIES}) - message(STATUS " " ${FL}) -endforeach() diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL deleted file mode 100644 index c221c1e370747e..00000000000000 --- a/ports/pango/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: pango -Version: 1.40.11-4 -Homepage: https://ftp.gnome.org/pub/GNOME/sources/pango/ -Description: Text and font handling library. -Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz[glib] (!(windows&static)) diff --git a/ports/pango/config.h.unix b/ports/pango/config.h.unix deleted file mode 100644 index 83b2f52fddc806..00000000000000 --- a/ports/pango/config.h.unix +++ /dev/null @@ -1,153 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Have usable Cairo library and font backend */ -#define HAVE_CAIRO 1 - -/* Whether Cairo can use FreeType for fonts */ -#define HAVE_CAIRO_FREETYPE 1 - -/* Whether Cairo has PDF support */ -/* #undef HAVE_CAIRO_PDF */ - -/* Whether Cairo has PNG support */ -/* #undef HAVE_CAIRO_PNG */ - -/* Whether Cairo has PS support */ -/* #undef HAVE_CAIRO_PS */ - -/* Whether Cairo can use Quartz for fonts */ -/* #undef HAVE_CAIRO_QUARTZ */ - -/* Whether Cairo can use the Win32 GDI for fonts */ -/* #undef HAVE_CAIRO_WIN32 */ - -/* Whether Cairo has Xlib support */ -/* #undef HAVE_CAIRO_XLIB */ - -/* Whether CoreText is available on the system */ -#ifdef __APPLE_CC__ - #define HAVE_CORE_TEXT 1 -#else - #undef HAVE_CORE_TEXT -#endif - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `FcWeightFromOpenType' function. */ -/* #undef HAVE_FCWEIGHTFROMOPENTYPE */ - -/* Define to 1 if you have the `flockfile' function. */ -#define HAVE_FLOCKFILE 1 - -/* Have FreeType 2 library */ -#define HAVE_FREETYPE 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Whether libthai is available */ -/* #undef HAVE_LIBTHAI */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Have Xft library */ -/* #undef HAVE_XFT */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "pango" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=pango" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "pango" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "pango 1.40.11" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "pango" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.40.11" - -/* PANGO binary age */ -#define PANGO_BINARY_AGE 4011 - -/* PANGO interface age */ -#define PANGO_INTERFACE_AGE 11 - -/* PANGO major version */ -#define PANGO_VERSION_MAJOR 1 - -/* PANGO micro version */ -#define PANGO_VERSION_MICRO 11 - -/* PANGO minor version */ -#define PANGO_VERSION_MINOR 40 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "1.40.11" - -/* defines how to decorate public symbols while building */ -#define _PANGO_EXTERN __attribute__((visibility("default"))) extern diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake index 926efd98ddecc9..db31f6f15e8a6c 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -1,29 +1,42 @@ -include(vcpkg_common_functions) - -set(PANGO_VERSION 1.40.11) -vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-${PANGO_VERSION}.tar.xz" - FILENAME "pango-${PANGO_VERSION}.tar.xz" - SHA512 e4ac40f8da9c326e1e4dfaf4b1d2070601b17f88f5a12991a9a8bbc58bb08640404e2a794a5c68c5ebb2e7e80d9c186d4b26cd417bb63a23f024ef8a38bb152a) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${PANGO_VERSION} - PATCHES 0001-fix-static-symbols-export.diff -) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.unix DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DPANGO_SKIP_HEADERS=ON -) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pango) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pango/COPYING ${CURRENT_PACKAGES_DIR}/share/pango/copyright) +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.gnome.org/ + OUT_SOURCE_PATH SOURCE_PATH + REPO GNOME/pango + REF 386639c3b118cc973f714eb485877f480391f31f #v1.48.4 + SHA512 d7de3bc3108826de9f0b34ca888e0c1eb97c1d0723b2dd68cfb1030fb78d1367e3ac4df88e4a5dea66b08854ef85ecf562d149a58f070351768d6ac144da8520 + HEAD_REF master # branch name +) + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Dintrospection=disabled # Build the GObject introspection data for Pango + -Dfontconfig=enabled # Build with FontConfig support. + -Dsysprof=disabled # include tracing support for sysprof + -Dlibthai=disabled # Build with libthai support + -Dcairo=enabled # Build with cairo support + -Dxft=disabled # Build with xft support + -Dfreetype=enabled # Build with freetype support + -Dgtk_doc=false #Build API reference for Pango using GTK-Doc + ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' +) + +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +vcpkg_copy_tools(TOOL_NAMES pango-view pango-list AUTO_CLEAN) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/pango.pc") +if(EXISTS "${_file}") + vcpkg_replace_string("${_file}" [[-I"${includedir}/pango-1.0"]] [[-I"${includedir}/pango-1.0" -I"${includedir}/harfbuzz"]]) +endif() +set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/pango.pc") +if(EXISTS "${_file}") + vcpkg_replace_string("${_file}" [[-I"${includedir}/pango-1.0"]] [[-I"${includedir}/pango-1.0" -I"${includedir}/harfbuzz"]]) +endif() diff --git a/ports/pango/vcpkg.json b/ports/pango/vcpkg.json new file mode 100644 index 00000000000000..f0741023681754 --- /dev/null +++ b/ports/pango/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "pango", + "version": "1.48.4", + "port-version": 1, + "description": "Text and font handling library.", + "homepage": "https://ftp.gnome.org/pub/GNOME/sources/pango/", + "dependencies": [ + { + "name": "cairo", + "features": [ + "gobject" + ] + }, + "fontconfig", + "freetype", + "fribidi", + "gettext", + "glib", + { + "name": "glib", + "host": true + }, + "harfbuzz", + { + "name": "harfbuzz", + "features": [ + "coretext" + ], + "platform": "osx" + } + ] +} diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL deleted file mode 100644 index 8963cc26bbe352..00000000000000 --- a/ports/pangolin/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: pangolin -Version: 0.5-7 -Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg -Homepage: https://github.com/stevenlovegrove/Pangolin -Description: Lightweight GUI Library diff --git a/ports/pangolin/deprecated_constants.patch b/ports/pangolin/deprecated_constants.patch deleted file mode 100644 index 813d2360d8f321..00000000000000 --- a/ports/pangolin/deprecated_constants.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff --git a/src/video/drivers/ffmpeg.cpp b/src/video/drivers/ffmpeg.cpp -index 435225d..ff30349 100644 ---- a/src/video/drivers/ffmpeg.cpp -+++ b/src/video/drivers/ffmpeg.cpp -@@ -34,6 +34,8 @@ extern "C" - #include - } - -+#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER -+ - namespace pangolin - { - -@@ -74,8 +76,10 @@ std::string FfmpegFmtToString(const AVPixelFormat fmt) - TEST_PIX_FMT_RETURN(YUVJ420P); - TEST_PIX_FMT_RETURN(YUVJ422P); - TEST_PIX_FMT_RETURN(YUVJ444P); -+#ifdef FF_API_XVMC - TEST_PIX_FMT_RETURN(XVMC_MPEG2_MC); - TEST_PIX_FMT_RETURN(XVMC_MPEG2_IDCT); -+#endif - TEST_PIX_FMT_RETURN(UYVY422); - TEST_PIX_FMT_RETURN(UYYVYY411); - TEST_PIX_FMT_RETURN(BGR8); -@@ -95,11 +99,13 @@ std::string FfmpegFmtToString(const AVPixelFormat fmt) - TEST_PIX_FMT_RETURN(YUV440P); - TEST_PIX_FMT_RETURN(YUVJ440P); - TEST_PIX_FMT_RETURN(YUVA420P); -+#ifdef FF_API_VDPAU - TEST_PIX_FMT_RETURN(VDPAU_H264); - TEST_PIX_FMT_RETURN(VDPAU_MPEG1); - TEST_PIX_FMT_RETURN(VDPAU_MPEG2); - TEST_PIX_FMT_RETURN(VDPAU_WMV3); - TEST_PIX_FMT_RETURN(VDPAU_VC1); -+#endif - TEST_PIX_FMT_RETURN(RGB48BE ); - TEST_PIX_FMT_RETURN(RGB48LE ); - TEST_PIX_FMT_RETURN(RGB565BE); -@@ -119,7 +125,9 @@ std::string FfmpegFmtToString(const AVPixelFormat fmt) - TEST_PIX_FMT_RETURN(YUV422P16BE); - TEST_PIX_FMT_RETURN(YUV444P16LE); - TEST_PIX_FMT_RETURN(YUV444P16BE); -+#ifdef FF_API_VDPAU - TEST_PIX_FMT_RETURN(VDPAU_MPEG4); -+#endif - TEST_PIX_FMT_RETURN(DXVA2_VLD); - TEST_PIX_FMT_RETURN(RGB444BE); - TEST_PIX_FMT_RETURN(RGB444LE); -@@ -559,7 +567,8 @@ void FfmpegVideoOutputStream::WriteFrame(AVFrame* frame) - - int ret; - int got_packet = 1; -- -+ -+#if FF_API_LAVF_FMT_RAWPICTURE - // Setup AVPacket - if (recorder.oc->oformat->flags & AVFMT_RAWPICTURE) { - /* Raw video case - directly store the picture in the packet */ -@@ -569,6 +578,10 @@ void FfmpegVideoOutputStream::WriteFrame(AVFrame* frame) - pkt.pts = frame->pts; - ret = 0; - } else { -+#else -+ { -+#endif -+ - /* encode the image */ - #if (LIBAVFORMAT_VERSION_MAJOR >= 54) - ret = avcodec_encode_video2(stream->codec, &pkt, frame, &got_packet); diff --git a/ports/pangolin/fix-build-error-in-vs2019.patch b/ports/pangolin/fix-build-error-in-vs2019.patch new file mode 100644 index 00000000000000..1b7be934ea3219 --- /dev/null +++ b/ports/pangolin/fix-build-error-in-vs2019.patch @@ -0,0 +1,13 @@ +diff --git a/include/mpark/variant.hpp b/include/mpark/variant.hpp +index fb2cf06..6debb99 100644 +--- a/include/mpark/variant.hpp ++++ b/include/mpark/variant.hpp +@@ -243,7 +243,7 @@ namespace std { + #endif + + #if defined(__cpp_constexpr) && __cpp_constexpr >= 201304 +-#define MPARK_CPP14_CONSTEXPR ++//#define MPARK_CPP14_CONSTEXPR + #endif + + #if __has_feature(cxx_exceptions) || defined(__cpp_exceptions) || \ diff --git a/ports/pangolin/fix-cmake-version.patch b/ports/pangolin/fix-cmake-version.patch new file mode 100644 index 00000000000000..0153d90eaf5948 --- /dev/null +++ b/ports/pangolin/fix-cmake-version.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0e13110..6adf1e2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 3.8) + project("Pangolin") + set(PANGOLIN_VERSION_MAJOR 0) + set(PANGOLIN_VERSION_MINOR 6) diff --git a/ports/pangolin/fix-dependencies.patch b/ports/pangolin/fix-dependencies.patch new file mode 100644 index 00000000000000..e3ced434ea2b4b --- /dev/null +++ b/ports/pangolin/fix-dependencies.patch @@ -0,0 +1,97 @@ +diff --git a/include/pangolin/gl/colour.h b/include/pangolin/gl/colour.h +index 92bedf4..8c3e542 100644 +--- a/include/pangolin/gl/colour.h ++++ b/include/pangolin/gl/colour.h +@@ -28,6 +28,7 @@ + #pragma once + + #include ++#include + + #include + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ddeb144..ee27d57 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -299,7 +299,9 @@ if(BUILD_PANGOLIN_PYTHON AND BUILD_PANGOLIN_GUI AND BUILD_PANGOLIN_VARS AND NOT + + if(pybind11_FOUND) + set(HAVE_PYTHON 1) +- ++ if (UNIX) ++ set(PYTHON_LIBRARY ${PYTHON_LIBRARY} dl util) ++ endif() + file(GLOB pypangolin_SRC "python/pypangolin/*.cpp" ) + file(GLOB pypangolin_HDR "python/pypangolin/*.hpp" ) + list(APPEND HEADERS +@@ -382,6 +384,7 @@ endif() + + option(BUILD_PANGOLIN_FFMPEG "Build support for ffmpeg video input" ON) + if(BUILD_PANGOLIN_FFMPEG AND BUILD_PANGOLIN_VIDEO) ++ add_definitions(-DHAVE_FFMPEG_AVPIXELFORMAT) + find_package(FFMPEG QUIET) + if(FFMPEG_FOUND) + set(HAVE_FFMPEG 1) +@@ -464,11 +467,14 @@ endif() + + option(BUILD_PANGOLIN_LIBUVC "Build support for libuvc video input" ON) + if(BUILD_PANGOLIN_LIBUVC AND BUILD_PANGOLIN_VIDEO) +- find_package(uvc QUIET) +- if(uvc_FOUND) ++ find_package(libuvc CONFIG QUIET) ++ if(libuvc_FOUND) + set(HAVE_UVC 1) +- list(APPEND INTERNAL_INC ${uvc_INCLUDE_DIRS} ) +- list(APPEND LINK_LIBS ${uvc_LIBRARIES} ) ++ if (TARGET LibUVC::UVCShared) ++ list(APPEND LINK_LIBS LibUVC::UVCShared ) ++ else() ++ list(APPEND LINK_LIBS LibUVC::UVCStatic ) ++ endif() + list(APPEND HEADERS ${INCDIR}/video/drivers/uvc.h ) + list(APPEND SOURCES video/drivers/uvc.cpp) + list(APPEND VIDEO_FACTORY_REG RegisterUvcVideoFactory ) +@@ -584,11 +590,10 @@ endif() + + option(BUILD_PANGOLIN_LIBOPENEXR "Build support for libopenexr image input" ON) + if(BUILD_PANGOLIN_LIBOPENEXR) +- find_package(OpenEXR QUIET) ++ find_package(OpenEXR CONFIG QUIET) + if(OpenEXR_FOUND) + set(HAVE_OPENEXR 1) +- list(APPEND INTERNAL_INC ${OpenEXR_INCLUDE_DIR} ) +- list(APPEND LINK_LIBS ${OpenEXR_LIBRARY} ) ++ list(APPEND LINK_LIBS OpenEXR::IlmImf OpenEXR::IlmImfUtil OpenEXR::IlmImfConfig ) + message(STATUS "libopenexr Found and Enabled") + endif() + endif() +@@ -630,6 +635,13 @@ endif() + + set(INSTALL_INCLUDE_DIR "include") + ++# Required by geometry ++if(NOT BUILD_EXTERN_GLEW) ++ find_package(GLEW REQUIRED) ++endif() ++list(APPEND USER_INC ${GLEW_INCLUDE_DIR}) ++list(APPEND LINK_LIBS ${GLEW_LIBRARY}) ++ + add_library(${LIBRARY_NAME} ${SOURCES} ${HEADERS}) + # 'System' includes shield us from warnings in those includes. + target_include_directories(${LIBRARY_NAME} SYSTEM PUBLIC ${USER_INC} PRIVATE ${INTERNAL_INC}) +@@ -692,7 +704,13 @@ CreateMethodCallFile( + option(BUILD_PYPANGOLIN_MODULE "Python wrapper for Pangolin" ON) + if(BUILD_PYPANGOLIN_MODULE AND HAVE_PYTHON ) + file(GLOB pypangolin_SRC "python/pypangolin/*.hpp" "python/pypangolin/*.cpp" "python/pypangolin_module.cpp") +- pybind11_add_module(pypangolin ${pypangolin_SRC}) ++ if (BUILD_SHARED_LIBS) ++ set(PYBIND11_MODULE_TYPE SHARED) ++ else() ++ set(PYBIND11_MODULE_TYPE STATIC) ++ endif() ++ ++ pybind11_add_module(pypangolin ${PYBIND11_MODULE_TYPE} ${pypangolin_SRC}) + target_link_libraries(pypangolin PRIVATE ${LIBRARY_NAME}) + target_include_directories(pypangolin PRIVATE "${USER_INC}") + endif() diff --git a/ports/pangolin/fix-includepath-error.patch b/ports/pangolin/fix-includepath-error.patch index debb3348ad70c5..a5ee1ad1d77948 100644 --- a/ports/pangolin/fix-includepath-error.patch +++ b/ports/pangolin/fix-includepath-error.patch @@ -1,8 +1,8 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index dd08d31..7f364a7 100644 +index a2c60ea..ddeb144 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -506,7 +506,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in +@@ -735,7 +735,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY IMMEDIATE ) # Install tree config diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index e22672ec00dd55..a3c79858635935 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -1,62 +1,95 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO stevenlovegrove/Pangolin - REF v0.5 - SHA512 7ebeec108f33f1aa8b1ad08e3ca128a837b22d33e3fc580021f981784043b023a1bf563bbfa8b51d46863db770b336d24fc84ee3d836b85e0da1848281b2a5b2 + REF dd801d244db3a8e27b7fe8020cd751404aa818fd #v0.6 + SHA512 8004ab6f146f319df41e4b8d4bdb6677b8faf6db725e34fea76fcbf065522fa286d334c2426dcb39faf0cfb3332946104f78393d2b2b2418fe02d91450916e78 HEAD_REF master - PATCHES - deprecated_constants.patch # Change from upstream pangolin to address build failures from latest ffmpeg library + PATCHES fix-includepath-error.patch # include path has one more ../ + fix-cmake-version.patch + fix-build-error-in-vs2019.patch + fix-dependencies.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test BUILD_TESTS + tools BUILD_TOOLS + examples BUILD_EXAMPLES + gui BUILD_PANGOLIN_GUI + vars BUILD_PANGOLIN_VARS + video BUILD_PANGOLIN_VIDEO + pybind11 BUILD_PANGOLIN_PYTHON + eigen BUILD_PANGOLIN_EIGEN + ffmpeg BUILD_PANGOLIN_FFMPEG + realsense BUILD_PANGOLIN_LIBREALSENSE2 + openni2 BUILD_PANGOLIN_OPENNI2 + uvc BUILD_PANGOLIN_LIBUVC + png BUILD_PANGOLIN_LIBPNG + jpeg BUILD_PANGOLIN_LIBJPEG + tiff BUILD_PANGOLIN_LIBTIFF + openexr BUILD_PANGOLIN_LIBOPENEXR + zstd BUILD_PANGOLIN_ZSTD + lz4 BUILD_PANGOLIN_LZ4 + module BUILD_PYPANGOLIN_MODULE ) -file(REMOVE ${SOURCE_PATH}/CMakeModules/FindGLEW.cmake) +file(REMOVE "${SOURCE_PATH}/CMakeModules/FindGLEW.cmake") +file(REMOVE "${SOURCE_PATH}/CMakeModules/FindFFMPEG.cmake") string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} -DBUILD_EXTERN_GLEW=OFF -DBUILD_EXTERN_LIBPNG=OFF -DBUILD_EXTERN_LIBJPEG=OFF + -DBUILD_PANGOLIN_PLEORA=OFF + -DBUILD_PANGOLIN_TELICAM=OFF + -DBUILD_PANGOLIN_DEPTHSENSE=OFF + -DBUILD_PANGOLIN_OPENNI=OFF + -DBUILD_PANGOLIN_UVC_MEDIAFOUNDATION=OFF + -DBUILD_PANGOLIN_LIBREALSENSE=OFF + -DBUILD_PANGOLIN_V4L=OFF + -DBUILD_PANGOLIN_LIBDC1394=OFF + -DBUILD_PANGOLIN_TOON=OFF + -DDISPLAY_WAYLAND=OFF + -DDISPLAY_X11=OFF + -DBUILD_FOR_GLES_2=OFF -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT} + MAYBE_UNUSED_VARIABLES + MSVC_USE_STATIC_CRT + BUILD_FOR_GLES_2 ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Pangolin) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Pangolin) vcpkg_copy_pdbs() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(GLOB EXE ${CURRENT_PACKAGES_DIR}/lib/*.dll) - file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${EXE}) - - file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) - file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_EXE}) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake PANGOLIN_TARGETS) - string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake "${PANGOLIN_TARGETS}") - - file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake PANGOLIN_TARGETS) - string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake "${PANGOLIN_TARGETS}") +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES Plotter VideoConvert VideoJsonPrint VideoJsonTransform VideoViewer AUTO_CLEAN) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() -# Copy missing header file -file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/include/pangolin/pangolin_export.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/pangolin) +if(VCPKG_TARGET_IS_WINDOWS) + # Copy missing header file + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/include/pangolin/pangolin_export.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/pangolin") +endif() # Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/Pangolin/) -file(COPY ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/Pangolin/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/Pangolin/LICENCE ${CURRENT_PACKAGES_DIR}/share/Pangolin/copyright) +file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENCE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/pangolin/vcpkg.json b/ports/pangolin/vcpkg.json new file mode 100644 index 00000000000000..b28451d10e978d --- /dev/null +++ b/ports/pangolin/vcpkg.json @@ -0,0 +1,131 @@ +{ + "name": "pangolin", + "version": "0.6", + "port-version": 1, + "description": "Lightweight GUI Library", + "homepage": "https://github.com/stevenlovegrove/Pangolin", + "supports": "!uwp", + "dependencies": [ + "glew", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "eigen", + "ffmpeg", + "gui", + "jpeg", + "png", + "vars", + "video" + ], + "features": { + "eigen": { + "description": "Build support for Eigen matrix types", + "dependencies": [ + "eigen3" + ] + }, + "examples": { + "description": "Build Examples" + }, + "ffmpeg": { + "description": "Build support for ffmpeg video input", + "dependencies": [ + { + "name": "ffmpeg", + "features": [ + "avformat" + ] + } + ] + }, + "gui": { + "description": "Build support for Pangolin GUI" + }, + "jpeg": { + "description": "Build support for libjpeg image input", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "lz4": { + "description": "Build support for liblz4 compression", + "dependencies": [ + "lz4" + ] + }, + "module": { + "description": "Python wrapper for Pangolin", + "dependencies": [ + "python3" + ] + }, + "openexr": { + "description": "Build support for libopenexr image input", + "dependencies": [ + "openexr" + ] + }, + "openni2": { + "description": "Build support for OpenNI2 video input", + "dependencies": [ + "openni2" + ] + }, + "png": { + "description": "Build support for libpng image input", + "dependencies": [ + "libpng" + ] + }, + "pybind11": { + "description": "Build support for Pangolin Interactive Console", + "dependencies": [ + "pybind11" + ] + }, + "realsense": { + "description": "Build support for LibRealSense2 video input", + "dependencies": [ + "realsense2" + ] + }, + "test": { + "description": "Build Tests" + }, + "tiff": { + "description": "Build support for libtiff image input", + "dependencies": [ + "tiff" + ] + }, + "tools": { + "description": "Build Tools" + }, + "uvc": { + "description": "Build support for MediaFoundation UVC input", + "dependencies": [ + "libuvc" + ] + }, + "vars": { + "description": "Build support for Pangolin Vars" + }, + "video": { + "description": "Build support for Pangolin Video Utilities" + }, + "zstd": { + "description": "Build support for libzstd compression", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/ports/pangomm/CONTROL b/ports/pangomm/CONTROL deleted file mode 100644 index 8109a58893b4ff..00000000000000 --- a/ports/pangomm/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: pangomm -Version: 2.40.1 -Homepage: https://ftp.gnome.org/pub/GNOME/sources/pangomm -Description: pangomm is the official C++ interface for the Pango font layout library. See, for instance, the Pango::Layout class. -Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz, pango, cairomm, glibmm diff --git a/ports/pangomm/README b/ports/pangomm/README deleted file mode 100644 index 37c05b4ee3d516..00000000000000 --- a/ports/pangomm/README +++ /dev/null @@ -1,3 +0,0 @@ -This is pangomm, a C++ API for Pango. -See http://www.gtkmm.org/ - diff --git a/ports/pangomm/fix_charset.patch b/ports/pangomm/fix_charset.patch deleted file mode 100644 index d57063c86e9330..00000000000000 --- a/ports/pangomm/fix_charset.patch +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj -index ceca956..c29a2a1 100644 ---- a/MSVC_Net2013/gendef.vcxproj -+++ b/MSVC_Net2013/gendef.vcxproj -@@ -21,26 +21,27 @@ - - {07324745-C9BE-4D65-B08A-9C88188C0C28} - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj -index fecde32..8f97675 100644 ---- a/MSVC_Net2013/install.vcxproj -+++ b/MSVC_Net2013/install.vcxproj -@@ -22,28 +22,29 @@ - {2093D218-190E-4194-9421-3BA7CBF33B10} - install - Win32Proj -+ 8.1 - - - - Utility -- MultiByte -+ Unicode - true - v120 - - - Utility -- MultiByte -+ Unicode - v120 - - - Utility -- MultiByte -+ Unicode - true - v120 - - - Utility -- MultiByte -+ Unicode - v120 - - -diff --git a/MSVC_Net2013/pangomm.vcxproj b/MSVC_Net2013/pangomm.vcxproj -index aa03fad..d63becf 100644 ---- a/MSVC_Net2013/pangomm.vcxproj -+++ b/MSVC_Net2013/pangomm.vcxproj -@@ -23,26 +23,27 @@ - {A93D607A-5C37-4AEC-BA08-6A655F6DC834} - pangomm - Win32Proj -+ 8.1 - - - - DynamicLibrary -- MultiByte -+ Unicode - v120 - - - DynamicLibrary -- MultiByte -+ Unicode - v120 - - - DynamicLibrary -- MultiByte -+ Unicode - v120 - - - DynamicLibrary -- MultiByte -+ Unicode - v120 - - diff --git a/ports/pangomm/fix_properties.patch b/ports/pangomm/fix_properties.patch deleted file mode 100644 index 22ee67bf1ced3c..00000000000000 --- a/ports/pangomm/fix_properties.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff --git a/MSVC_Net2013/pangomm-build-defines.props b/MSVC_Net2013/pangomm-build-defines.props -index 3c3108d..f30890b 100644 ---- a/MSVC_Net2013/pangomm-build-defines.props -+++ b/MSVC_Net2013/pangomm-build-defines.props -@@ -5,8 +5,6 @@ - - - PANGOMM_BUILD -- glibmm-vc$(VSVer)0-2_4.lib;cairomm-vc$(VSVer)0-1_0.lib;sigc-vc$(VSVer)0-2_0.lib -- glibmm-vc$(VSVer)0-d-2_4.lib;cairomm-vc$(VSVer)0-d-1_0.lib;sigc-vc$(VSVer)0-d-2_0.lib - - - <_PropertySheetDisplayName>panogmmbuilddefinesprops -@@ -15,14 +13,14 @@ - - - -- .\pangomm;..\pango;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\cairomm-1.0;$(GlibEtcInstallRoot)\lib\cairomm-1.0\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) -+ .\pangomm;..\pango;.;%(AdditionalIncludeDirectories) - msvc_recommended_pragmas.h;%(ForcedIncludeFiles) - true - /d2Zi+ %(AdditionalOptions) - - -- pangocairo-1.0.lib;pango-1.0.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) -- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) -+ %(AdditionalDependencies) -+ %(AdditionalLibraryDirectories) - - - -diff --git a/MSVC_Net2013/pangomm-version-paths.props b/MSVC_Net2013/pangomm-version-paths.props -index b287629..01a267e 100644 ---- a/MSVC_Net2013/pangomm-version-paths.props -+++ b/MSVC_Net2013/pangomm-version-paths.props -@@ -2,13 +2,9 @@ - - - 12 -- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) -- $(GlibEtcInstallRoot) - $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ - 1 - 4 -- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) -- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) - - - <_PropertySheetDisplayName>pangommversionpathsprops -@@ -17,12 +13,6 @@ - - $(VSVer) - -- -- $(GlibEtcInstallRoot) -- -- -- $(CopyDir) -- - - $(DefDir) - -@@ -32,11 +22,5 @@ - - $(ApiMinorVersion) - -- -- $(ReleaseDllSuffix) -- -- -- $(DebugDllSuffix) -- - - -\ No newline at end of file diff --git a/ports/pangomm/msvc_recommended_pragmas.h b/ports/pangomm/msvc_recommended_pragmas.h deleted file mode 100644 index c0eb1d5edf4cd5..00000000000000 --- a/ports/pangomm/msvc_recommended_pragmas.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _MSC_VER -#pragma error "This header is for Microsoft VC only." -#endif /* _MSC_VER */ - -/* Make MSVC more pedantic, this is a recommended pragma list - * from _Win32_Programming_ by Rector and Newcomer. - */ -#pragma warning(error:4002) /* too many actual parameters for macro */ -#pragma warning(error:4003) /* not enough actual parameters for macro */ -#pragma warning(1:4010) /* single-line comment contains line-continuation character */ -#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ -#pragma warning(1:4016) /* no function return type; using int as default */ -#pragma warning(error:4020) /* too many actual parameters */ -#pragma warning(error:4021) /* too few actual parameters */ -#pragma warning(error:4027) /* function declared without formal parameter list */ -#pragma warning(error:4029) /* declared formal parameter list different from definition */ -#pragma warning(error:4033) /* 'function' must return a value */ -#pragma warning(error:4035) /* 'function' : no return value */ -#pragma warning(error:4045) /* array bounds overflow */ -#pragma warning(error:4047) /* different levels of indirection */ -#pragma warning(error:4049) /* terminating line number emission */ -#pragma warning(error:4053) /* An expression of type void was used as an operand */ -#pragma warning(error:4071) /* no function prototype given */ -#pragma warning(disable:4101) /* unreferenced local variable */ -#pragma warning(error:4150) - -#pragma warning(disable:4244) /* No possible loss of data warnings */ -#pragma warning(disable:4305) /* No truncation from int to char warnings */ - -#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ - -/* work around Microsoft's premature attempt to deprecate the C-Library */ -#define _CRT_SECURE_NO_WARNINGS -#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/pangomm/portfile.cmake b/ports/pangomm/portfile.cmake index e3409fe15d9f65..85580c78ca5909 100644 --- a/ports/pangomm/portfile.cmake +++ b/ports/pangomm/portfile.cmake @@ -1,76 +1,28 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# +vcpkg_fail_port_install(ON_ARCH "arm" "arm64") -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pangomm-2.40.1) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/pangomm/2.40/pangomm-2.40.1.tar.xz" - FILENAME "pangomm-2.40.1.tar.xz" - SHA512 bed19800b76e69cc51abeb5997bdc2f687f261ebcbe36aeee51f1fbf5010a46f4b9469033c34a912502001d9985135fd5c7f7574d3de8ba33cc5832520c6aa6f + URLS "https://ftp.gnome.org/pub/GNOME/sources/pangomm/2.48/pangomm-2.48.0.tar.xz" + FILENAME "pangomm-2.48.0.tar.xz" + SHA512 0c1be5726740669c366214caf8b8b0bca1c7b223aafb2e6ce64f7a5a90d07c62ee509821ac787f3997ae78aa3a3ffd5cff7d33c73bc7ebd7fe642c56689d98a3 ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch -) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) - -set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) -if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) - set(VS_PLATFORM "Win32") -endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/pangomm.sln - TARGET pangomm - PLATFORM ${VS_PLATFORM} - USE_VCPKG_INTEGRATION -) - -# Handle headers -file(COPY ${SOURCE_PATH}/MSVC_Net2013/pangomm/pangommconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/pango/pangomm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file( - COPY - ${SOURCE_PATH}/pango/pangomm - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN *.h +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} ) -# Handle libraries -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/pangomm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/pangomm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/pangomm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/pangomm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Dmsvc14x-parallel-installable=false + ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' ) +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() -# Handle copyright and readme -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pangomm RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/pangomm RENAME readme.txt) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pangomm/vcpkg.json b/ports/pangomm/vcpkg.json new file mode 100644 index 00000000000000..9260a460fb91fd --- /dev/null +++ b/ports/pangomm/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "pangomm", + "version": "2.48.0", + "description": "pangomm is the official C++ interface for the Pango font layout library. See, for instance, the Pango::Layout class.", + "homepage": "https://ftp.gnome.org/pub/GNOME/sources/pangomm", + "dependencies": [ + "cairo", + "cairomm", + "fontconfig", + "freetype", + "gettext", + "glib", + { + "name": "glib", + "host": true + }, + "glibmm", + "harfbuzz", + "pango" + ] +} diff --git a/ports/parallel-hashmap/CONTROL b/ports/parallel-hashmap/CONTROL deleted file mode 100644 index 91be82ab3d766b..00000000000000 --- a/ports/parallel-hashmap/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: parallel-hashmap -Version: 1.23 -Description: A header-only, very fast and memory-friendly family of C++ hash maps. diff --git a/ports/parallel-hashmap/portfile.cmake b/ports/parallel-hashmap/portfile.cmake index d42dee4fd65b27..e8b81b15d18176 100644 --- a/ports/parallel-hashmap/portfile.cmake +++ b/ports/parallel-hashmap/portfile.cmake @@ -1,11 +1,10 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO greg7mdp/parallel-hashmap - REF 1.23 - SHA512 efdc717d965292949dc47c2614d97274d52e409a70b283d2b12a957bf3135c6682ed6f77a5b130b70f77eb2cc5c522626cc4b08cd792a7037844df5ba1538985 + REF 1.33 + SHA512 287f098229153d925632e68e3cdbabfae0ea0ab8864089e4c0553a166c6079ca82ed5246ba53afd2a2917abcf06f37bc18f098e721f5f3b8def4d2d8c1c8c745 HEAD_REF master ) @@ -22,5 +21,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug ${ file(COPY ${SOURCE_PATH}/phmap.natvis DESTINATION ${CURRENT_PACKAGES_DIR}/include) # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/parallel-hashmap) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/parallel-hashmap/LICENSE ${CURRENT_PACKAGES_DIR}/share/parallel-hashmap/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/parallel-hashmap/vcpkg.json b/ports/parallel-hashmap/vcpkg.json new file mode 100644 index 00000000000000..b1d7230cf1d651 --- /dev/null +++ b/ports/parallel-hashmap/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "parallel-hashmap", + "version-string": "1.33", + "port-version": 1, + "description": "A header-only, very fast and memory-friendly family of C++ hash maps." +} diff --git a/ports/parallelstl/fix-cmakelist.patch b/ports/parallelstl/fix-cmakelist.patch new file mode 100644 index 00000000000000..01a2c227176783 --- /dev/null +++ b/ports/parallelstl/fix-cmakelist.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 878b212..caa3cba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ add_library(pstl::ParallelSTL ALIAS ParallelSTL) + if (PARALLELSTL_USE_PARALLEL_POLICIES) + message(STATUS "Using Parallel Policies") + if (PARALLELSTL_BACKEND STREQUAL "tbb") +- find_package(TBB 2018 REQUIRED tbb OPTIONAL_COMPONENTS tbbmalloc) ++ find_package(TBB CONFIG REQUIRED tbb OPTIONAL_COMPONENTS tbbmalloc) + message(STATUS "Parallel STL uses TBB ${TBB_VERSION} (interface version: ${TBB_INTERFACE_VERSION})") + target_link_libraries(ParallelSTL INTERFACE TBB::tbb) + else() +@@ -64,8 +64,7 @@ target_include_directories(ParallelSTL + INTERFACE + $ + $ +- $ +- $) ++ $) + + target_compile_features(ParallelSTL + INTERFACE +@@ -100,6 +99,8 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfig.cmake" + DESTINATION lib/cmake/ParallelSTL) + install(DIRECTORY include/pstl + DESTINATION include) ++file(GLOB STDLIB_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/stdlib/pstl/*) ++install(FILES ${STDLIB_HEADERS} DESTINATION include/pstl) + + add_custom_target(install-pstl + COMMAND "${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake_install.cmake" -DCOMPONENT=ParallelSTL) diff --git a/ports/parallelstl/portfile.cmake b/ports/parallelstl/portfile.cmake new file mode 100644 index 00000000000000..a082b8b2b32708 --- /dev/null +++ b/ports/parallelstl/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO intel/parallelstl + REF 0241743d73bb405b16d9c4a24b693e4533dc34a7 # 20200330 + SHA512 cd2f1b60639e9da35a722bdef0bc6420ddca064e3bff979d8a6ea591fb43865b7614c811bced642fd5ff1fab659da1dfaa248dc2b321db7f27d0e74544a2f21e + HEAD_REF master + PATCHES + fix-cmakelist.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPARALLELSTL_USE_PARALLEL_POLICIES=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ParallelSTL) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/parallelstl/vcpkg.json b/ports/parallelstl/vcpkg.json new file mode 100644 index 00000000000000..f64a2af0fd0823 --- /dev/null +++ b/ports/parallelstl/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "parallelstl", + "version-string": "20200330", + "port-version": 1, + "description": "Parallel STL is an implementation of the C++ standard library algorithms with support for execution policies, as specified in ISO/IEC 14882:2017 standard, commonly called C++17.", + "homepage": "https://github.com/intel/parallelstl", + "dependencies": [ + "tbb" + ] +} diff --git a/ports/paraview/add-tools-option.patch b/ports/paraview/add-tools-option.patch new file mode 100644 index 00000000000000..86ba2c5a675694 --- /dev/null +++ b/ports/paraview/add-tools-option.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b33b25..10cadda 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -730,7 +730,10 @@ if (PARAVIEW_ENABLE_WEB) + @ONLY) + endif () + ++option(PARAVIEW_BUILD_TOOLS "Build paraview tools" OFF) ++if (PARAVIEW_BUILD_TOOLS) + add_subdirectory(Clients) ++endif() + + if (PARAVIEW_USE_PYTHON) + add_subdirectory(Wrapping/Python) diff --git a/ports/paraview/catalyst_install.patch b/ports/paraview/catalyst_install.patch new file mode 100644 index 00000000000000..e52802fbef3338 --- /dev/null +++ b/ports/paraview/catalyst_install.patch @@ -0,0 +1,24 @@ +diff --git a/Clients/InSitu/CMakeLists.txt b/Clients/InSitu/CMakeLists.txt +index 159aa8ffc..f9bfc7dfe 100644 +--- a/Clients/InSitu/CMakeLists.txt ++++ b/Clients/InSitu/CMakeLists.txt +@@ -86,5 +86,5 @@ _vtk_module_apply_properties(catalyst) + # Update install locations + catalyst_library( + TARGET catalyst +- LIBRARY_DESTINATION "${_vtk_build_LIBRARY_DESTINATION}" ++ #LIBRARY_DESTINATION "${_vtk_build_LIBRARY_DESTINATION}" + INSTALL_EXPORT_DEFAULT) +diff --git a/Remoting/Views/vtkGeometryRepresentationInternal.h b/Remoting/Views/vtkGeometryRepresentationInternal.h +index 86eb383af..cc204fba2 100644 +--- a/Remoting/Views/vtkGeometryRepresentationInternal.h ++++ b/Remoting/Views/vtkGeometryRepresentationInternal.h +@@ -22,7 +22,7 @@ + // serial backend. + #ifndef __VTK_WRAP__ + #if VTK_MODULE_ENABLE_VTK_vtkm +-#include "vtkmConfigFilters.h" // for VTKM_ENABLE_TBB ++//#include "vtkmConfigFilters.h" // for VTKM_ENABLE_TBB + #endif + + #if defined(VTKM_ENABLE_TBB) && VTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters diff --git a/ports/paraview/cgns.patch b/ports/paraview/cgns.patch new file mode 100644 index 00000000000000..2ebb05e1bd2ec2 --- /dev/null +++ b/ports/paraview/cgns.patch @@ -0,0 +1,29 @@ +diff --git a/CMake/FindCGNS.cmake b/CMake/FindCGNS.cmake +index 005f1afd9..a45103a9f 100644 +--- a/CMake/FindCGNS.cmake ++++ b/CMake/FindCGNS.cmake +@@ -16,7 +16,7 @@ mark_as_advanced(CGNS_INCLUDE_DIR) + + find_library(CGNS_LIBRARY + NAMES +- cgns ++ cgnsdll cgns + DOC "CGNS library") + mark_as_advanced(CGNS_LIBRARY) + +@@ -45,4 +45,15 @@ if (CGNS_FOUND) + IMPORTED_LOCATION "${CGNS_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CGNS_INCLUDE_DIR}") + endif () ++ include(CMakeFindDependencyMacro) ++ find_dependency(hdf5 CONFIG) ++ if(TARGET hdf5::hdf5-shared) ++ set_property(TARGET CGNS::CGNS APPEND PROPERTY ++ INTERFACE_LINK_LIBRARIES "hdf5::hdf5-shared") ++ elseif(TARGET hdf5::hdf5-static) ++ set_property(TARGET CGNS::CGNS APPEND PROPERTY ++ INTERFACE_LINK_LIBRARIES "hdf5::hdf5-static") ++ else() ++ message(FATAL_ERROR "No HDF5 target to link cgns against") ++ endif() + endif () diff --git a/ports/paraview/external_vtk.patch b/ports/paraview/external_vtk.patch new file mode 100644 index 00000000000000..0df160d6acb46f --- /dev/null +++ b/ports/paraview/external_vtk.patch @@ -0,0 +1,150 @@ +diff --git a/CMake/ParaViewClient.cmake b/CMake/ParaViewClient.cmake +index b0dea2b32..b035a9dc3 100644 +--- a/CMake/ParaViewClient.cmake ++++ b/CMake/ParaViewClient.cmake +@@ -516,6 +516,7 @@ function (paraview_client_documentation) + NAMES xmlpatterns-qt5 xmlpatterns + HINTS "${Qt5_DIR}/../../../bin" + "${Qt5_DIR}/../../../libexec/qt5/bin" ++ "${Qt5_DIR}/../../../tools/qt5/bin" + DOC "Path to xmlpatterns") + mark_as_advanced(qt_xmlpatterns_executable) + +diff --git a/CMake/ParaViewOptions.cmake b/CMake/ParaViewOptions.cmake +index f544a7c06..c51278931 100644 +--- a/CMake/ParaViewOptions.cmake ++++ b/CMake/ParaViewOptions.cmake +@@ -88,7 +88,7 @@ endif() + #======================================================================== + + # XXX(VTK): External VTK is not yet actually supported. +-if (FALSE) ++if (TRUE) + option(PARAVIEW_USE_EXTERNAL_VTK "Use an external VTK." OFF) + mark_as_advanced(PARAVIEW_USE_EXTERNAL_VTK) + else () +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1af77d164..bebcb83ee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,7 +72,8 @@ if (NOT CMAKE_INSTALL_LICENSEDIR) + endif () + + set(paraview_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/CMake") +-set(vtk_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake") ++set(vtk_cmake_dir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/vtk") ++message(STATUS "vtk_cmake_dir:${vtk_cmake_dir}") + if (NOT IS_DIRECTORY "${vtk_cmake_dir}") + message(FATAL_ERROR + "Failed to find the VTK CMake directory. Did you forget to initialize the " +@@ -383,9 +384,73 @@ endif () + + if (PARAVIEW_USE_EXTERNAL_VTK) + if (paraview_required_modules OR paraview_unrecognized_modules) +- message(FATAL_ERROR +- "The following modules were requested or required, but not found: " +- "${paraview_required_modules};${paraview_unrecognized_modules}.") ++ message(STATUS "REQUIRED:${paraview_required_modules}") ++ foreach(mod ${paraview_required_modules}) ++ if(NOT TARGET ${mod}) ++ message(STATUS "REQUIRED TARGET not defined: ${mod}") ++ list(APPEND modules_notarget ${mod}) ++ endif() ++ if(${mod} MATCHES "VTK::") # For better debugging ++ message(STATUS "VTK TARGET found: ${mod}") ++ list(APPEND vtk_modules ${mod}) ++ endif() ++ endforeach() ++ foreach(mod ${paraview_unrecognized_modules}) ++ if(NOT TARGET ${mod}) ++ message(STATUS "UNREC TARGET not defined: ${mod}") ++ list(FIND paraview_rejected_modules ${mod} _found_mod) ++ if(_found_mod GREATER_EQUAL 0) ++ message(STATUS "MODULE ${mod} not necessary; Removing from unrecognized") ++ list(APPEND _to_remove ${mod}) ++ endif() ++ else() ++ list(APPEND _to_remove ${mod}) ++ #list(APPEND vtk_modules ${mod}) #probably do not need to add unrecognized_modules to the wrapper ++ endif() ++ endforeach() ++ message(STATUS "UNRECOGNIZED:${paraview_unrecognized_modules}") ++ list(REMOVE_ITEM paraview_unrecognized_modules ${_to_remove}) ++ message(STATUS "REJECTED MODULES: ${paraview_rejected_modules}") ++ message(STATUS "UNRECOGNIZED WITHOUT REJECTED AND KNOWN TARGETS: ${paraview_unrecognized_modules}") ++ message(STATUS "ALL PROVIDED MODULES: ${paraview_modules}") ++ set(_unnecessary_moduls ${paraview_modules}) ++ list(REMOVE_ITEM _unnecessary_moduls ${paraview_required_modules}) ++ message(STATUS "Unnecessary MODULES: ${_unnecessary_moduls}") ++ if(modules_notarget) ++ message(FATAL_ERROR ++ "The following modules were requested or required, but not found: " ++ "${modules_notarget}") ++ endif() ++ list(REMOVE_DUPLICATES vtk_modules) ++ macro(search_dependent_targets) ++ set(vtk_mod_dep_list) ++ foreach(vtk_targ ${ARGN}) ++ get_target_property(vtk_mod_dep ${vtk_targ} "INTERFACE_vtk_module_depends") ++ if(vtk_mod_dep) ++ list(APPEND vtk_mod_dep_list ${vtk_mod_dep}) ++ endif() ++ get_target_property(vtk_mod_pdep ${vtk_targ} "INTERFACE_vtk_module_private_depends") ++ if(vtk_mod_pdep) ++ list(APPEND vtk_mod_dep_list ${vtk_mod_pdep}) ++ endif() ++ get_target_property(vtk_mod_odep ${vtk_targ} "INTERFACE_vtk_module_opional_depends") ++ if(vtk_mod_odep) ++ list(APPEND vtk_mod_dep_list ${vtk_mod_odep}) ++ endif() ++ if(vtk_mod_dep_list) ++ message(STATUS "Target ${vtk_targ} depends on ${vtk_mod_dep_list}") ++ list(REMOVE_ITEM vtk_mod_dep_list ${vtk_modules}) ++ if(vtk_mod_dep_list) ++ message(STATUS "Newly discovered modules: ${vtk_mod_dep_list}") ++ list(APPEND vtk_modules ${vtk_mod_dep_list}) ++ search_dependent_targets(${vtk_mod_dep_list}) ++ else() ++ message(STATUS "No new modules discovered!") ++ endif() ++ endif() ++ endforeach() ++ endmacro() ++ search_dependent_targets(${vtk_modules}) + endif () + + if (PARAVIEW_USE_PYTHON) +@@ -459,7 +524,7 @@ else () + endif() + + # Set up these variables now so that modules may acess them +- if (NOT PARAVIEW_USE_EXTERNAL_VTK AND PARAVIEW_INSTALL_DEVELOPMENT_FILES) ++ if (PARAVIEW_INSTALL_DEVELOPMENT_FILES) + set(vtk_cmake_dir + "${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake") + set(vtk_cmake_destination +@@ -558,6 +623,9 @@ set(_paraview_add_tests_default_data_directory + set(_paraview_add_tests_default_test_data_target + "ParaViewData") + ++list(REMOVE_DUPLICATES vtk_modules) # Missed this somewhere ++list(REMOVE_DUPLICATES paraview_modules) # probably not needed ++ + vtk_module_build( + MODULES ${paraview_modules} + KITS ${paraview_kits} +@@ -596,9 +664,11 @@ vtk_module_build( + TEST_OUTPUT_DATA_DIRECTORY "${paraview_test_data_directory_output}") + + include(vtkModuleJson) +-vtk_module_json( +- MODULES ${vtk_modules} +- OUTPUT "vtk-modules.json") ++if(NOT PARAVIEW_USE_EXTERNAL_VTK) ++ vtk_module_json( ++ MODULES ${vtk_modules} ++ OUTPUT "vtk-modules.json") ++endif() + vtk_module_json( + MODULES ${paraview_modules} + OUTPUT "paraview-modules.json") diff --git a/ports/paraview/portfile.cmake b/ports/paraview/portfile.cmake new file mode 100644 index 00000000000000..784efa6be443ea --- /dev/null +++ b/ports/paraview/portfile.cmake @@ -0,0 +1,183 @@ +file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _vcpkg_json) +string(JSON _ver_string GET "${_vcpkg_json}" "version-semver") +string(REGEX MATCH "^[0-9]+\.[0-9]+" VERSION "${_ver_string}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "cuda" PARAVIEW_USE_CUDA #untested; probably only affects internal VTK build so it does nothing here + "all_modules" PARAVIEW_BUILD_ALL_MODULES #untested + "mpi" PARAVIEW_USE_MPI #untested + "vtkm" PARAVIEW_USE_VTKM + "python" PARAVIEW_USE_PYTHON + "tools" PARAVIEW_BUILD_TOOLS +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Kitware/ParaView + REF aad4b6f1e92154879209102edfab8367f1e7d191 # v5.9.1 + SHA512 330fcb8525bdee9b02e06f05d4e91cc4d631d03df99c30f82bb97da5e06b5a2a6ff4ecee807b6f6c7110d2f53db1c17e4670d6078ae1cc89cfd7089b67d05bdb + HEAD_REF master + PATCHES + external_vtk.patch + cgns.patch + python_include.patch + python_wrapper.patch + add-tools-option.patch + catalyst_install.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND VisItPatches removedoublesymbols.patch) +endif() + +#The following two dependencies should probably be their own port +#but require additional patching in paraview to make it work. + +#Get VisItBridge Plugin +vcpkg_from_gitlab( + OUT_SOURCE_PATH VISITIT_SOURCE_PATH + GITLAB_URL https://gitlab.kitware.com/ + REPO paraview/visitbridge + REF 42fce8ad6863ca2c1308741955cca1d0cf570d22 + SHA512 03a6254989d3e286a462683af92caba1e90decbdcfb2e729f2d7e1116b04d63a05c28d02c4615d780fdd0d33e2719f96617233d6e0602410cc6d894f92fe6ee3 + PATCHES + ${VisItPatches} +) +#Get QtTesting Plugin +vcpkg_from_gitlab( + OUT_SOURCE_PATH QTTESTING_SOURCE_PATH + GITLAB_URL https://gitlab.kitware.com/ + REPO paraview/qttesting + REF 72290689c7c55622d729bf95c97e7627026a234e + SHA512 fb18c6745b784b294f01d5391ba4cdcaa109443a193eb35fbf1553fdb3a4f7217f784fd4893fab72784cec5bd3fc821bf1e766e943d0f562c5917788800599b0 +) + +#Get Catalyst +vcpkg_from_gitlab( + OUT_SOURCE_PATH CATALYST_SOURCE_PATH + GITLAB_URL https://gitlab.kitware.com/ + REPO paraview/catalyst + REF e36e4a5f3c67011c97c335cce23d2bc3abc0d086 + SHA512 9926c272ab8785997f9c98cfaf696943081b0ddb0e9e343602722671b6f3eaef5b8de5dd049ca783b6844c7e328a96e1b09c8b24c16f001eeeed2d154d290480 +) + + +file(COPY ${VISITIT_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/Utilities/VisItBridge) +file(COPY ${QTTESTING_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/ThirdParty/QtTesting/vtkqttesting) +file(COPY ${CATALYST_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/ThirdParty/catalyst/vtkcatalyst/catalyst) + +if("python" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + list(APPEND ADDITIONAL_OPTIONS + -DPython3_FIND_REGISTRY=NEVER + "-DPython3_EXECUTABLE:PATH=${PYTHON3}" # Required by more than one feature + ) + #VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS ${FEATURE_OPTIONS} + -DPARAVIEW_BUILD_WITH_EXTERNAL:BOOL=ON + -DPARAVIEW_USE_EXTERNAL_VTK:BOOL=ON + -DPARAVIEW_ENABLE_VISITBRIDGE:BOOL=ON + -DVTK_MODULE_ENABLE_ParaView_qttesting=YES + -DPARAVIEW_ENABLE_EMBEDDED_DOCUMENTATION:BOOL=OFF + -DPARAVIEW_USE_QTHELP:BOOL=OFF + + #A little bit of help in finding the boost headers + "-DBoost_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include" + + # Workarounds for CMake issues + -DHAVE_SYS_TYPES_H=0 ## For some strange reason the test first succeeds and then fails the second time around + -DWORDS_BIGENDIAN=0 ## Tests fails in VisItCommon.cmake for some unknown reason this is just a workaround since most systems are little endian. + ${ADDITIONAL_OPTIONS} + + #-DPARAVIEW_ENABLE_FFMPEG:BOOL=OFF +) +if(CMAKE_HOST_UNIX) + # ParaView runs Qt tools so LD_LIBRARY_PATH must be set correctly for them to find *.so files + set(BACKUP_LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH}) + set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}:${CURRENT_INSTALLED_DIR}/lib") +endif() + +vcpkg_install_cmake(ADD_BIN_TO_PATH) # Bin to path required since paraview will use some self build tools + +if(CMAKE_HOST_UNIX) + set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}") +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/paraview-${VERSION}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +set(TOOLVER pv${VERSION}) +set(TOOLS paraview + pvbatch + pvdataserver + pvpython + pvrenderserver + pvserver + smTestDriver + vtkProcessXML + vtkWrapClientServer) + +foreach(tool ${TOOLS}) + # Remove debug tools + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}d${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + + # Move release tools + set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(INSTALL ${filename} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(INSTALL ${filename} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${filename}) + endif() +endforeach() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/paraview RENAME Copyright.txt) # Which one is the correct one? +file(INSTALL ${SOURCE_PATH}/License_v1.2.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/paraview RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + macro(move_bin_to_lib name) + if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${name}) + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${name}" "${CURRENT_PACKAGES_DIR}/lib/${name}") + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin/${name}) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/${name}" "${CURRENT_PACKAGES_DIR}/debug/lib/${name}") + endif() + endmacro() + + set(to_move Lib paraview-${VERSION} paraview-config) + foreach(name ${to_move}) + move_bin_to_lib(${name}) + endforeach() + + file(GLOB_RECURSE cmake_files ${CURRENT_PACKAGES_DIR}/share/${PORT}/*.cmake) + foreach(cmake_file ${cmake_files}) + file(READ "${cmake_file}" _contents) + STRING(REPLACE "bin/" "lib/" _contents "${_contents}") + file(WRITE "${cmake_file}" "${_contents}") + endforeach() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() \ No newline at end of file diff --git a/ports/paraview/python_include.patch b/ports/paraview/python_include.patch new file mode 100644 index 00000000000000..42ada661bbc56b --- /dev/null +++ b/ports/paraview/python_include.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/ParaViewOptions.cmake b/CMake/ParaViewOptions.cmake +index 0ecb928e9..5b5459a37 100644 +--- a/CMake/ParaViewOptions.cmake ++++ b/CMake/ParaViewOptions.cmake +@@ -136,7 +136,7 @@ option(PARAVIEW_ENABLE_RAYTRACING "Build ParaView with OSPray and/or OptiX ray-t + + set(paraview_web_default ON) + if (PARAVIEW_USE_PYTHON AND WIN32) +- include("${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake/FindPythonModules.cmake") ++ include(FindPythonModules) + find_python_module(win32api have_pywin32) + set(paraview_web_default "${have_pywin32}") + endif () diff --git a/ports/paraview/python_wrapper.patch b/ports/paraview/python_wrapper.patch new file mode 100644 index 00000000000000..33a70f069acc51 --- /dev/null +++ b/ports/paraview/python_wrapper.patch @@ -0,0 +1,19 @@ +diff --git a/CMake/vtkModuleWrapClientServer.cmake b/CMake/vtkModuleWrapClientServer.cmake +index 3804a24e2..91fdd593a 100644 +--- a/CMake/vtkModuleWrapClientServer.cmake ++++ b/CMake/vtkModuleWrapClientServer.cmake +@@ -37,10 +37,13 @@ function (_vtk_module_wrap_client_server_sources module sources classes) + "$") + set(_vtk_client_server_genex_include_directories + "$") ++ set(_vtk_client_server_genex_interface_include_directories ++ "$") + file(GENERATE + OUTPUT "${_vtk_client_server_args_file}" + CONTENT "$<$:\n-D\'$\'>\n +-$<$:\n-I\'$\'>\n") ++ $<$:\n-I\'$\'>\n ++ $<$:\n-I\'$\'>\n") + + _vtk_module_get_module_property("${module}" + PROPERTY "hierarchy" diff --git a/ports/paraview/removedoublesymbols.patch b/ports/paraview/removedoublesymbols.patch new file mode 100644 index 00000000000000..70df9b0e8afaa3 --- /dev/null +++ b/ports/paraview/removedoublesymbols.patch @@ -0,0 +1,89 @@ +diff --git a/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C b/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C +index db64a0534..0d987d8e7 100644 +--- a/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C ++++ b/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C +@@ -69,7 +69,10 @@ + // + // Forward declare some of types used to hash faces. + // +-class Quad; ++namespace hidden { ++ class Quad; ++} ++using hidden::Quad; + class QuadMemoryManager; + class Tri; + class TriMemoryManager; +@@ -322,43 +325,43 @@ class HashEntryList + // Creation: October 21, 2002 + // + // **************************************************************************** ++namespace hidden { ++ class Quad ++ { ++ friend class Tri; + +-class Quad +-{ +- friend class Tri; +- +- public: +- Quad() { ordering_case = 255; }; +- +- vtkIdType AssignNodes(const vtkIdType *); +- bool Equals(Quad *); +- bool Equals(Tri *); +- void AddInRemainingTriangle(Tri *, int); +- inline void ReRegisterMemory(void) +- { +- hashEntryList->qmm.ReRegisterQuad(this); +- } ++ public: ++ Quad() { ordering_case = 255; }; + +- inline void SetOriginalZone(const int &oz) { orig_zone = oz; }; +- inline int GetOriginalZone(void) { return orig_zone; }; ++ vtkIdType AssignNodes(const vtkIdType *); ++ bool Equals(Quad *); ++ bool Equals(Tri *); ++ void AddInRemainingTriangle(Tri *, int); ++ inline void ReRegisterMemory(void) ++ { ++ hashEntryList->qmm.ReRegisterQuad(this); ++ } + +- void OutputCell(int,vtkPolyData *, vtkCellData *, vtkCellData *); ++ inline void SetOriginalZone(const int &oz) { orig_zone = oz; }; ++ inline int GetOriginalZone(void) { return orig_zone; }; + +- inline void RegisterHashEntryList(HashEntryList *hel) +- { hashEntryList = hel; }; +- inline void SetNumberOfPoints(int np) { npts = np; }; ++ void OutputCell(int,vtkPolyData *, vtkCellData *, vtkCellData *); + +- protected: +- unsigned char ordering_case; +- vtkIdType nodes[3]; +- vtkIdType orig_zone; ++ inline void RegisterHashEntryList(HashEntryList *hel) ++ { hashEntryList = hel; }; ++ inline void SetNumberOfPoints(int np) { npts = np; }; + +- HashEntryList *hashEntryList; +- int npts; ++ protected: ++ unsigned char ordering_case; ++ vtkIdType nodes[3]; ++ vtkIdType orig_zone; + +- void AddInRemainingTriangle(int, int); +-}; ++ HashEntryList *hashEntryList; ++ int npts; + ++ void AddInRemainingTriangle(int, int); ++ }; ++} + // + // We will be re-ordering the nodes into numerical order. This enumerated + // type will allow the ordering to be preserved. diff --git a/ports/paraview/vcpkg.json b/ports/paraview/vcpkg.json new file mode 100644 index 00000000000000..85570e754d082a --- /dev/null +++ b/ports/paraview/vcpkg.json @@ -0,0 +1,90 @@ +{ + "name": "paraview", + "version-semver": "5.9.1", + "description": "VTK-based Data Analysis and Visualization Application", + "homepage": "https://www.paraview.org/", + "dependencies": [ + "boost-algorithm", + "boost-core", + "boost-format", + "cgns", + "protobuf", + { + "name": "vtk", + "default-features": false, + "features": [ + "paraview" + ] + } + ], + "features": { + "all-modules": { + "description": "enables the build of all paraview modules", + "dependencies": [ + "ffmpeg", + "gdal", + "laszip", + "pdal" + ] + }, + "cuda": { + "description": "enables cuda within paraview", + "dependencies": [ + "cuda", + { + "name": "vtk", + "default-features": false, + "features": [ + "cuda" + ] + } + ] + }, + "mpi": { + "description": "enables cuda within paraview", + "dependencies": [ + { + "name": "hdf5", + "default-features": false, + "features": [ + "parallel" + ] + }, + { + "name": "vtk", + "default-features": false, + "features": [ + "mpi" + ] + } + ] + }, + "python": { + "description": "enables the build of python wrappers", + "dependencies": [ + { + "name": "vtk", + "default-features": false, + "features": [ + "python" + ] + } + ] + }, + "tools": { + "description": "Build paraview tools" + }, + "vtkm": { + "description": "enables vtkm for the build of paraview", + "dependencies": [ + { + "name": "vtk", + "default-features": false, + "features": [ + "vtkm" + ] + } + ] + } + } +} diff --git a/ports/parmetis/CONTROL b/ports/parmetis/CONTROL deleted file mode 100644 index c98d4869ff5a32..00000000000000 --- a/ports/parmetis/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: parmetis -Version: 4.0.3-3 -Homepage: https://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview -Description: Parallel Graph Partitioning and Fill-reducing Matrix Ordering -Build-Depends: metis, mpi diff --git a/ports/parmetis/fix-root-cmakelist-2.patch b/ports/parmetis/fix-root-cmakelist-2.patch new file mode 100644 index 00000000000000..8f4630bfac7433 --- /dev/null +++ b/ports/parmetis/fix-root-cmakelist-2.patch @@ -0,0 +1,18 @@ +--- a/CMakeLists.txt 2013-03-30 17:24:50.000000000 +0100 ++++ b/CMakeLists.txt 2021-04-20 10:41:49.946801222 +0200 +@@ -1,12 +1,12 @@ + cmake_minimum_required(VERSION 2.8) + project(ParMETIS) + +-set(GKLIB_PATH METIS/GKlib CACHE PATH "path to GKlib") +-set(METIS_PATH METIS CACHE PATH "path to METIS") ++set(GKLIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/metis/GKlib CACHE PATH "path to GKlib") ++set(METIS_PATH metis CACHE PATH "path to METIS") + + # Symlink ./metis to wherever metis is. This allows files to be + # included from metis/libmetis/. +-execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${METIS_PATH} metis) ++#execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${METIS_PATH} metis) + + # Search for MPI. + # GK commented this out as it seems to be creating problems diff --git a/ports/parmetis/portfile.cmake b/ports/parmetis/portfile.cmake index f3eee992f224cb..62d633eac110e0 100644 --- a/ports/parmetis/portfile.cmake +++ b/ports/parmetis/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(ADDITIONAL_OPTIONS -DSHARED=OFF) @@ -18,6 +16,7 @@ vcpkg_extract_source_archive_ex( fix-root-cmakelist.patch fix-libparmetis-cmakelist.patch use_stdint.patch + fix-root-cmakelist-2.patch ) vcpkg_configure_cmake( diff --git a/ports/parmetis/vcpkg.json b/ports/parmetis/vcpkg.json new file mode 100644 index 00000000000000..4b5cf996605b69 --- /dev/null +++ b/ports/parmetis/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "parmetis", + "version-string": "4.0.3", + "port-version": 5, + "description": "Parallel Graph Partitioning and Fill-reducing Matrix Ordering", + "homepage": "https://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview", + "dependencies": [ + "metis", + "mpi" + ] +} diff --git a/ports/parquet/CONTROL b/ports/parquet/CONTROL deleted file mode 100644 index 21584e8ee19268..00000000000000 --- a/ports/parquet/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: parquet -Version: 0 -Build-Depends: arrow -Description: Parquet-cpp is a C++ library to read and write the Apache Parquet columnar data format. It is now part of the arrow library. \ No newline at end of file diff --git a/ports/parquet/vcpkg.json b/ports/parquet/vcpkg.json new file mode 100644 index 00000000000000..c604f1a9f7fd72 --- /dev/null +++ b/ports/parquet/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "parquet", + "version-string": "0", + "port-version": 1, + "description": "Parquet-cpp is a C++ library to read and write the Apache Parquet columnar data format. It is now part of the arrow library.", + "dependencies": [ + "arrow" + ] +} diff --git a/ports/parson/CONTROL b/ports/parson/CONTROL deleted file mode 100644 index e97403221de9e1..00000000000000 --- a/ports/parson/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: parson -Version: 2019-04-19 -Description: a lighweight json library written in C diff --git a/ports/parson/portfile.cmake b/ports/parson/portfile.cmake index 579c44678211dc..887be6ec8152cb 100644 --- a/ports/parson/portfile.cmake +++ b/ports/parson/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") message("parson only supports static linkage") set(VCPKG_LIBRARY_LINKAGE "static") @@ -8,8 +6,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kgabis/parson - REF 809ef4b7d829d3929223387661b8e229e7191340 - SHA512 ba29478c7603a50c825f90e7d6d1fcb3f80a3ee0091fba07320544fc5a735653259cb1bb207e3124a36553569493e352f8a1d3233fc2d5dc4a9ec55a74e95b54 + REF 102a4467e10c77ffcfde1d233798780acd719cc5 # accessed on 2020-09-14 + SHA512 8498e667525a0f08881c4041877194bf68926af34c9f0cbd9fd3d9538c31e0ad1ab1c083fbee48423f4ffd99f46e25918928c43585206237c8f723e5e47b17b7 HEAD_REF master ) diff --git a/ports/parson/vcpkg.json b/ports/parson/vcpkg.json new file mode 100644 index 00000000000000..b128637b2a2509 --- /dev/null +++ b/ports/parson/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "parson", + "version-string": "2020-09-14", + "port-version": 1, + "description": "a lighweight json library written in C" +} diff --git a/ports/pbc/CONTROL b/ports/pbc/CONTROL deleted file mode 100644 index ba09843ded9ef8..00000000000000 --- a/ports/pbc/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pbc -Version: 0.5.14-1 -Build-Depends: mpir -Description: Pairing-Based Crypto library provides low-level routines for pairing-based cryptosystems. diff --git a/ports/pbc/portfile.cmake b/ports/pbc/portfile.cmake index 32e233420c7d45..93b06c5dbe090f 100644 --- a/ports/pbc/portfile.cmake +++ b/ports/pbc/portfile.cmake @@ -1,18 +1,8 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "PBC currently can only be built for desktop") -endif() - -if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "PBC currently can only be built using the dynamic CRT when building DLLs") -endif() +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") set(PBC_VERSION 0.5.14) -if(VCPKG_CMAKE_SYSTEM_NAME) +if(NOT VCPKG_TARGET_IS_WINDOWS) vcpkg_download_distfile( ARCHIVE URLS "https://crypto.stanford.edu/pbc/files/pbc-${PBC_VERSION}.tar.gz" @@ -37,49 +27,21 @@ if(VCPKG_CMAKE_SYSTEM_NAME) endif() set(OPTIONS ${SHARED_STATIC} LEX=${FLEX} YACC=${BISON}\ -y) - vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/setup - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME setup-${TARGET_TRIPLET} - ) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -O0 -g -I${SOURCE_PATH}/include") - set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") - vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR}/debug ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR}/debug - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME configure-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND make -j install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME install-${TARGET_TRIPLET}-dbg + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + COPY_SOURCE + OPTIONS + ${OPTIONS} ) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -O3 -I${SOURCE_PATH}/include") - set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") - vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR} ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME configure-${TARGET_TRIPLET}-rel - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND make -j install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME install-${TARGET_TRIPLET}-rel - ) + vcpkg_install_make() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/info) - configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/pbc/copyright COPYONLY) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) else() + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO blynn/pbc diff --git a/ports/pbc/vcpkg.json b/ports/pbc/vcpkg.json new file mode 100644 index 00000000000000..3f9c2fc8082728 --- /dev/null +++ b/ports/pbc/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "pbc", + "version-string": "0.5.14", + "port-version": 5, + "description": "Pairing-Based Crypto library provides low-level routines for pairing-based cryptosystems.", + "homepage": "https://crypto.stanford.edu/pbc", + "supports": "!uwp", + "dependencies": [ + { + "name": "gmp", + "platform": "!windows" + }, + { + "name": "mpir", + "platform": "windows" + } + ] +} diff --git a/ports/pcapplusplus/portfile.cmake b/ports/pcapplusplus/portfile.cmake new file mode 100644 index 00000000000000..2ec3eea70d34f3 --- /dev/null +++ b/ports/pcapplusplus/portfile.cmake @@ -0,0 +1,103 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO seladb/PcapPlusPlus + REF v21.05 + SHA512 35227707a48f0e41469247e0993c4aabef7f168a285354e19386b554e0e3d51dc6bf8b128658e16d50e0b6e6e0a029322dee1b4b241e84b8603e2cf73c7f3532 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(VS_VERSION "vs2015") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(VS_VERSION "vs2017") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(VS_VERSION "vs2019") + else() + message(FATAL_ERROR "Unsupported visual studio version") + endif() + + vcpkg_execute_required_process( + COMMAND configure-windows-visual-studio.bat -v ${VS_VERSION} -w . -p . + WORKING_DIRECTORY ${SOURCE_PATH} + ) + + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "mk/${VS_VERSION}/Common++.vcxproj" + PLATFORM ${TRIPLET_SYSTEM_ARCH} + INCLUDES_SUBPATH Dist/header + ALLOW_ROOT_INCLUDES + USE_VCPKG_INTEGRATION + ) + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "mk/${VS_VERSION}/Packet++.vcxproj" + PLATFORM ${TRIPLET_SYSTEM_ARCH} + INCLUDES_SUBPATH Dist/header + ALLOW_ROOT_INCLUDES + USE_VCPKG_INTEGRATION + ) + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "mk/${VS_VERSION}/Pcap++.vcxproj" + PLATFORM ${TRIPLET_SYSTEM_ARCH} + USE_VCPKG_INTEGRATION + INCLUDES_SUBPATH Dist/header + ALLOW_ROOT_INCLUDES + LICENSE_SUBPATH LICENSE + ) + + # Lib + file(GLOB LIB_FILES_RELEASE "${SOURCE_PATH}/Dist/**/Release/*") + file( + INSTALL ${LIB_FILES_RELEASE} + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + file(GLOB LIB_FILES_RELEASE "${SOURCE_PATH}/Dist/**/Debug/*") + file( + INSTALL ${LIB_FILES_RELEASE} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + + file( + REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/tools" "${CURRENT_PACKAGES_DIR}/lib/LightPcapNg.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/LightPcapNg.lib" + ) +else() + if(VCPKG_TARGET_IS_LINUX) + set(CONFIG_CMD "./configure-linux.sh") + elseif(VCPKG_TARGET_IS_OSX) + set(CONFIG_CMD "./configure-mac_os_x.sh") + else() + message(FATAL_ERROR "Unsupported platform") + endif() + + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/${CONFIG_CMD} --libpcap-include-dir ${CURRENT_INSTALLED_DIR}/include + WORKING_DIRECTORY ${SOURCE_PATH} + ) + + vcpkg_execute_build_process( + COMMAND make libs + WORKING_DIRECTORY ${SOURCE_PATH} + ) + + # Lib + file(GLOB LIB_FILES "${SOURCE_PATH}/Dist/*.a") + file( + INSTALL ${LIB_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + + # Include + file(GLOB HEADER_FILES "${SOURCE_PATH}/Dist/header/*.h") + file( + INSTALL ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) + + # Copyright + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endif() diff --git a/ports/pcapplusplus/vcpkg.json b/ports/pcapplusplus/vcpkg.json new file mode 100644 index 00000000000000..40a35228f2593f --- /dev/null +++ b/ports/pcapplusplus/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "pcapplusplus", + "version-string": "21.05", + "description": "PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets", + "homepage": "https://github.com/seladb/PcapPlusPlus", + "dependencies": [ + { + "name": "libpcap", + "platform": "!windows" + }, + { + "name": "pthreads", + "platform": "windows" + }, + { + "name": "winpcap", + "platform": "windows" + } + ] +} diff --git a/ports/pcg/CONTROL b/ports/pcg/CONTROL deleted file mode 100644 index e0103507637cd4..00000000000000 --- a/ports/pcg/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: pcg -Version: 0.98.1 -Description: Permuted Congruential Generator diff --git a/ports/pcg/portfile.cmake b/ports/pcg/portfile.cmake index 75a4c904057299..f165692dcc570d 100644 --- a/ports/pcg/portfile.cmake +++ b/ports/pcg/portfile.cmake @@ -1,14 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO imneme/pcg-cpp - REF v0.98.1 - SHA512 3625913eba3b5d3ff0763a00728535cd5273a335f0ce0a9ab8e0cd8183a52309cbf72ae50d089cfea89445201993466a5533469db1cb6e82b14c62564731fe70 + REF ffd522e7188bef30a00c74dc7eb9de5faff90092 + SHA512 e96e40bf63ddb29ebf8679ddaabbf5dc934173f38cb5ed97c5efe068a742a715daa05e38d9ae322a10fa538c8ec7a271622bfb6569256a471fe5e1c9a83f9e3f HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/include/pcg_extras.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(INSTALL ${SOURCE_PATH}/include/pcg_random.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(INSTALL ${SOURCE_PATH}/include/pcg_uint128.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcg RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE-MIT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pcg/vcpkg.json b/ports/pcg/vcpkg.json new file mode 100644 index 00000000000000..ce5e0de213f9b1 --- /dev/null +++ b/ports/pcg/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "pcg", + "version-string": "2021-04-06", + "port-version": 1, + "description": "Permuted Congruential Generator" +} diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL deleted file mode 100644 index 7d9e3a8db10736..00000000000000 --- a/ports/pcl/CONTROL +++ /dev/null @@ -1,28 +0,0 @@ -Source: pcl -Version: 1.9.1-8 -Homepage: https://github.com/PointCloudLibrary/pcl -Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. -Build-Depends: eigen3, flann, qhull, vtk, libpng, boost-system, boost-filesystem, boost-thread, boost-date-time, boost-iostreams, boost-random, boost-foreach, boost-dynamic-bitset, boost-property-map, boost-graph, boost-multi-array, boost-signals2, boost-ptr-container, boost-uuid, boost-interprocess, boost-asio - -Feature: openni2 -Description: OpenNI2 support for PCL -Build-Depends: openni2 - -Feature: qt -Description: Qt support for PCL -Build-Depends: vtk[qt] - -Feature: pcap -Description: PCAP support for PCL -Build-Depends: winpcap - -Feature: tools -Description: Build PCL utilities -Build-Depends: boost-accumulators - -Feature: cuda -Description: CUDA support for PCL -Build-Depends: cuda - -Feature: opengl -Description: OpenGL support for PCL diff --git a/ports/pcl/add-gcc-version-check.patch b/ports/pcl/add-gcc-version-check.patch new file mode 100644 index 00000000000000..a21b9e4731593e --- /dev/null +++ b/ports/pcl/add-gcc-version-check.patch @@ -0,0 +1,27 @@ +From 8a7a883b51e18645974921b1bfe9d3b6ef3c626c Mon Sep 17 00:00:00 2001 +From: Lars Glud +Date: Fri, 19 Mar 2021 22:22:57 +0100 +Subject: [PATCH] Add gcc-version-check + +--- + CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e5aa7f40a..1e346a316 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -304,6 +304,10 @@ if(NOT PCL_SHARED_LIBS OR ((WIN32 AND NOT MINGW) AND NOT PCL_BUILD_WITH_FLANN_DY + endif() + find_package(FLANN 1.7.0 REQUIRED) + ++if(UNIX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) ++ set (CMAKE_CXX_STANDARD 17) ++endif() ++ + # libusb-1.0 + option(WITH_LIBUSB "Build USB RGBD-Camera drivers" TRUE) + if(WITH_LIBUSB) +-- +2.29.2.windows.2 + diff --git a/ports/pcl/boost-1.70.patch b/ports/pcl/boost-1.70.patch index c4b9955d29f2e2..704b43e1979334 100644 --- a/ports/pcl/boost-1.70.patch +++ b/ports/pcl/boost-1.70.patch @@ -1,27 +1,14 @@ -diff --git a/segmentation/include/pcl/segmentation/supervoxel_clustering.h b/segmentation/include/pcl/segmentation/supervoxel_clustering.h -index 05e6002..99e3a07 100644 ---- a/segmentation/include/pcl/segmentation/supervoxel_clustering.h -+++ b/segmentation/include/pcl/segmentation/supervoxel_clustering.h -@@ -525,7 +525,7 @@ namespace pcl - }; - - //Make boost::ptr_list can access the private class SupervoxelHelper -- friend void boost::checked_delete<> (const typename pcl::SupervoxelClustering::SupervoxelHelper *); -+ //friend void boost::checked_delete<> (const typename pcl::SupervoxelClustering::SupervoxelHelper *); - - typedef boost::ptr_list HelperListT; - HelperListT supervoxel_helpers_; -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 68cc438..8cfa1c6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -416,6 +416,9 @@ endif() - - # Boost (required) - include("${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake") -+if (NOT APPLE) -+ add_definitions(-fext-numeric-literals) -+endif() - - ### ---[ Create the config.h file - set(pcl_config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/pcl_config.h.in") +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b301cf1..789b660 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -462,6 +462,9 @@ endif() + + # Boost (required) + include("${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake") ++if (NOT APPLE AND NOT WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") ++ add_definitions(-fext-numeric-literals) ++endif() + + ### ---[ Create the config.h file + set(pcl_config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/pcl_config.h.in") diff --git a/ports/pcl/cuda_10_1.patch b/ports/pcl/cuda_10_1.patch deleted file mode 100644 index 4b46149a4b1f72..00000000000000 --- a/ports/pcl/cuda_10_1.patch +++ /dev/null @@ -1,133 +0,0 @@ -diff --git a/cuda/common/include/pcl/cuda/thrust.h b/cuda/common/include/pcl/cuda/thrust.h -index 57586ab..af073d7 100644 ---- a/cuda/common/include/pcl/cuda/thrust.h -+++ b/cuda/common/include/pcl/cuda/thrust.h -@@ -42,6 +42,7 @@ - - #include - #include -+#include - #include - #include - #include -diff --git a/gpu/features/src/fpfh.cu b/gpu/features/src/fpfh.cu -index 8d34f76..59a5f0c 100644 ---- a/gpu/features/src/fpfh.cu -+++ b/gpu/features/src/fpfh.cu -@@ -231,12 +231,12 @@ namespace pcl - int *sinds = sindices + Warp::WARP_SIZE * warp_idx; - int size = sizes[idx]; - -- for(int i = lane; __any(i < size); i += Warp::STRIDE) -+ for(int i = lane; __any_sync(0xFFFFFFFF, i < size); i += Warp::STRIDE) - { - if (i < size) - sinds[lane] = ginds[i]; - -- int inds_num = __popc(__ballot(i < size)); -+ int inds_num = __popc(__ballot_sync(0xFFFFFFFF, i < size)); - - for(int j = 0; j < inds_num; ++j) - { -diff --git a/gpu/octree/src/cuda/approx_nsearch.cu b/gpu/octree/src/cuda/approx_nsearch.cu -index e457255..3e1adfe 100644 ---- a/gpu/octree/src/cuda/approx_nsearch.cu -+++ b/gpu/octree/src/cuda/approx_nsearch.cu -@@ -141,7 +141,7 @@ namespace pcl { namespace device { namespace appnearest_search - { - __shared__ volatile int per_warp_buffer[KernelPolicy::WARPS_COUNT]; - -- int mask = __ballot(node_idx != -1); -+ int mask = __ballot_sync(0xFFFFFFFF, node_idx != -1); - - while(mask) - { -@@ -275,7 +275,7 @@ namespace pcl { namespace device { namespace appnearest_search - - bool active = query_index < batch.queries_num; - -- if (__all(active == false)) -+ if (__all_sync(0xFFFFFFFF, active == false)) - return; - - Warp_appNearestSearch search(batch, query_index); -diff --git a/gpu/octree/src/cuda/knn_search.cu b/gpu/octree/src/cuda/knn_search.cu -index a99655d..b55e3c1 100644 ---- a/gpu/octree/src/cuda/knn_search.cu -+++ b/gpu/octree/src/cuda/knn_search.cu -@@ -106,7 +106,7 @@ namespace pcl { namespace device { namespace knn_search - else - query_index = -1; - -- while(__any(active)) -+ while(__any_sync(0xFFFFFFFF, active)) - { - int leaf = -1; - -@@ -163,7 +163,7 @@ namespace pcl { namespace device { namespace knn_search - - __device__ __forceinline__ void processLeaf(int node_idx) - { -- int mask = __ballot(node_idx != -1); -+ int mask = __ballot_sync(0xFFFFFFFF, node_idx != -1); - - unsigned int laneId = Warp::laneId(); - unsigned int warpId = Warp::id(); -@@ -310,7 +310,7 @@ namespace pcl { namespace device { namespace knn_search - - bool active = query_index < batch.queries_num; - -- if (__all(active == false)) -+ if (__all_sync(0xFFFFFFFF, active == false)) - return; - - Warp_knnSearch search(batch, query_index); -diff --git a/gpu/octree/src/cuda/radius_search.cu b/gpu/octree/src/cuda/radius_search.cu -index f90273f..8ae84e7 100644 ---- a/gpu/octree/src/cuda/radius_search.cu -+++ b/gpu/octree/src/cuda/radius_search.cu -@@ -155,7 +155,7 @@ namespace pcl - else - query_index = -1; - -- while(__any(active)) -+ while(__any_sync(0xFFFFFFFF, active)) - { - int leaf = -1; - -@@ -217,7 +217,7 @@ namespace pcl - - __device__ __forceinline__ void processLeaf(int leaf) - { -- int mask = __ballot(leaf != -1); -+ int mask = __ballot_sync(0xFFFFFFFF, leaf != -1); - - while(mask) - { -@@ -255,7 +255,7 @@ namespace pcl - int *out = batch.output + active_query_index * batch.max_results + active_found_count; - int length_left = batch.max_results - active_found_count; - -- int test = __any(active_lane == laneId && (leaf & KernelPolicy::CHECK_FLAG)); -+ int test = __any_sync(0xFFFFFFFF, active_lane == laneId && (leaf & KernelPolicy::CHECK_FLAG)); - - if (test) - { -@@ -329,7 +329,7 @@ namespace pcl - total_new += new_nodes; - out += new_nodes; - -- if (__all(idx >= length) || __any(out_of_bounds) || total_new == length_left) -+ if (__all_sync(0xFFFFFFFF, idx >= length) || __any_sync(0xFFFFFFFF, out_of_bounds) || total_new == length_left) - break; - } - return min(total_new, length_left); -@@ -343,7 +343,7 @@ namespace pcl - - bool active = query_index < batch.queries.size; - -- if (__all(active == false)) -+ if (__all_sync(0xFFFFFFFF, active == false)) - return; - - Warp_radiusSearch search(batch, query_index); diff --git a/ports/pcl/fix-check-sse.patch b/ports/pcl/fix-check-sse.patch new file mode 100644 index 00000000000000..4fd6e676b36a0e --- /dev/null +++ b/ports/pcl/fix-check-sse.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e580b1a..572ea06 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,7 +86,7 @@ endif() + + # check for SSE flags + include("${PCL_SOURCE_DIR}/cmake/pcl_find_sse.cmake") +-if(PCL_ENABLE_SSE AND "${CMAKE_CXX_FLAGS}" STREQUAL "${CMAKE_CXX_FLAGS_DEFAULT}") ++if(PCL_ENABLE_SSE) + PCL_CHECK_FOR_SSE() + endif() + diff --git a/ports/pcl/fix-find-qhull.patch b/ports/pcl/fix-find-qhull.patch new file mode 100644 index 00000000000000..79223eaf39b5f4 --- /dev/null +++ b/ports/pcl/fix-find-qhull.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2c50b8d..c5bdf35 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -354,10 +354,7 @@ if(WITH_QHULL) + if(NOT PCL_SHARED_LIBS OR ((WIN32 AND NOT MINGW) AND NOT PCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32)) + set(QHULL_USE_STATIC ON) + endif() +- find_package(Qhull) +- if(QHULL_FOUND) +- include_directories(SYSTEM ${QHULL_INCLUDE_DIRS}) +- endif() ++ find_package(Qhull CONFIG REQUIRED) + endif() + + # Cuda +diff --git a/surface/CMakeLists.txt b/surface/CMakeLists.txt +index e5e4231..2fb8a46 100644 +--- a/surface/CMakeLists.txt ++++ b/surface/CMakeLists.txt +@@ -12,7 +12,7 @@ if(NOT build) + return() + endif() + +-if(QHULL_FOUND) ++if(Qhull_FOUND) + set(HULL_INCLUDES + "include/pcl/${SUBSYS_NAME}/concave_hull.h" + "include/pcl/${SUBSYS_NAME}/convex_hull.h" +@@ -159,7 +159,12 @@ include_directories(SYSTEM + link_directories(${VTK_LIBRARY_DIRS}) + PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs} ${VTK_SMOOTHING_INCLUDES} ${POISSON_INCLUDES} ${OPENNURBS_INCLUDES} ${ON_NURBS_INCLUDES}) + target_link_libraries("${LIB_NAME}" pcl_common pcl_search pcl_kdtree pcl_octree ${VTK_LIBRARIES} ${ON_NURBS_LIBRARIES}) +-if(QHULL_FOUND) ++if(Qhull_FOUND) ++ if(QHULL_USE_STATIC) ++ set(QHULL_LIBRARIES Qhull::qhullcpp Qhull::qhullstatic Qhull::qhullstatic_r) ++ else() ++ set(QHULL_LIBRARIES Qhull::qhull_r Qhull::qhullcpp) ++ endif() + target_link_libraries("${LIB_NAME}" ${QHULL_LIBRARIES}) + endif() + PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS}) diff --git a/ports/pcl/fix-link-libpng.patch b/ports/pcl/fix-link-libpng.patch new file mode 100644 index 00000000000000..2d5ea5f3bd3f98 --- /dev/null +++ b/ports/pcl/fix-link-libpng.patch @@ -0,0 +1,20 @@ +diff --git a/io/CMakeLists.txt b/io/CMakeLists.txt +index f234971..86ea242 100644 +--- a/io/CMakeLists.txt ++++ b/io/CMakeLists.txt +@@ -333,12 +333,13 @@ set(LIB_NAME "pcl_${SUBSYS_NAME}") + add_definitions(${VTK_DEFINES}) + PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES}) + target_include_directories(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") +-link_directories(${VTK_LINK_DIRECTORIES}) +-target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES}) + if(PNG_FOUND) + target_link_libraries("${LIB_NAME}" ${PNG_LIBRARIES}) + endif() + ++link_directories(${VTK_LINK_DIRECTORIES}) ++target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES}) ++ + if(LIBUSB_1_FOUND) + target_link_libraries("${LIB_NAME}" ${LIBUSB_1_LIBRARIES}) + endif() diff --git a/ports/pcl/pcl_config.patch b/ports/pcl/pcl_config.patch index 17af6cfb6ef843..60bcec8a502efc 100644 --- a/ports/pcl/pcl_config.patch +++ b/ports/pcl/pcl_config.patch @@ -1,45 +1,33 @@ diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in -index 7ec40baa0..837d78c82 100644 +index 9f78fcf..0cbe94f 100644 --- a/PCLConfig.cmake.in +++ b/PCLConfig.cmake.in -@@ -388,25 +388,18 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) +@@ -396,25 +396,16 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) if(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/cmake get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) + get_filename_component(PCL_ROOT "${PCL_ROOT}" PATH) - else(WIN32 AND NOT MINGW) + else() # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) - endif(WIN32 AND NOT MINGW) + endif() # check whether PCLConfig.cmake is found into a PCL installation or in a build tree -if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h") -+if(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") - # Found a PCL installation - # pcl_message("Found a PCL installation") -- set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") +- # Found a PCL installation +- # pcl_message("Found a PCL installation") +- set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") - set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@") - if(EXISTS "${PCL_ROOT}/3rdParty") - set(PCL_ALL_IN_ONE_INSTALLER ON) -- endif(EXISTS "${PCL_ROOT}/3rdParty") +- endif() -elseif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") - # Found a non-standard (likely ANDROID) PCL installation - # pcl_message("Found a PCL installation") - set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include") ++if(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") + set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include") - set(PCL_LIBRARY_DIRS "${PCL_ROOT}/lib") + set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@" "${PCL_ROOT}/debug/@LIB_INSTALL_DIR@") if(EXISTS "${PCL_ROOT}/3rdParty") set(PCL_ALL_IN_ONE_INSTALLER ON) - endif(EXISTS "${PCL_ROOT}/3rdParty") -@@ -416,9 +409,9 @@ elseif(EXISTS "${PCL_DIR}/include/pcl/pcl_config.h") - set(PCL_INCLUDE_DIRS "${PCL_DIR}/include") # for pcl_config.h - set(PCL_LIBRARY_DIRS "${PCL_DIR}/@LIB_INSTALL_DIR@") - set(PCL_SOURCES_TREE "@CMAKE_SOURCE_DIR@") --else(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h") -+else(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") - pcl_report_not_found("PCL can not be found on this machine") --endif(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h") -+endif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") - - #set a suffix for debug libraries - set(PCL_DEBUG_SUFFIX "@CMAKE_DEBUG_POSTFIX@") + endif() diff --git a/ports/pcl/pcl_utils.patch b/ports/pcl/pcl_utils.patch index 9c12e4d05e8c3c..21b7593ac2723e 100644 --- a/ports/pcl/pcl_utils.patch +++ b/ports/pcl/pcl_utils.patch @@ -1,28 +1,28 @@ diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake -index f523dbc8c..a171b6d24 100644 +index d87d02d..7c951bf 100644 --- a/cmake/pcl_utils.cmake +++ b/cmake/pcl_utils.cmake -@@ -97,21 +97,12 @@ macro(SET_INSTALL_DIRS) - if (NOT DEFINED LIB_INSTALL_DIR) +@@ -94,21 +94,12 @@ macro(SET_INSTALL_DIRS) + if(NOT DEFINED LIB_INSTALL_DIR) set(LIB_INSTALL_DIR "lib") - endif (NOT DEFINED LIB_INSTALL_DIR) + endif() - if(NOT ANDROID) - set(INCLUDE_INSTALL_ROOT - "include/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") -- else(NOT ANDROID) +- else() - set(INCLUDE_INSTALL_ROOT "include") # Android, don't put into subdir -- endif(NOT ANDROID) -+ set(INCLUDE_INSTALL_ROOT "include") +- endif() ++ set(INCLUDE_INSTALL_ROOT "include") set(INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_ROOT}/pcl") set(DOC_INSTALL_DIR "share/doc/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") set(BIN_INSTALL_DIR "bin") set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig") - if(WIN32 AND NOT MINGW) - set(PCLCONFIG_INSTALL_DIR "cmake") -- else(WIN32 AND NOT MINGW) +- else() - set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") -- endif(WIN32 AND NOT MINGW) +- endif() + set(PCLCONFIG_INSTALL_DIR "share/pcl") - endmacro(SET_INSTALL_DIRS) + endmacro() diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index aa4435dd5fbca0..008b8934e562c9 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -1,32 +1,43 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO PointCloudLibrary/pcl - REF pcl-1.9.1 - SHA512 ca95028c23861ac2df0fa7e18fdd0202255cb2e49ab714325eb36c35289442c6eedbf489e6f9f232b30fa2a93eff4c9619f8a14d3fdfe58f353a4a6e26206bdf + REF d98313133b014553ab1b1b5b112f9aade837d55c # pcl-1.11.1 + SHA512 4d60f34d4fbf0a4b4caf9cc4391af471ebd260b3bbac106d45e5ff38448894ea4dc82d5320c2e395c537a4414eb13c6a6a0eb6c13e4e1cc1d831d4bf24067966 HEAD_REF master PATCHES pcl_utils.patch pcl_config.patch - use_flann_targets.patch boost-1.70.patch - cuda_10_1.patch + fix-link-libpng.patch + remove-broken-targets.patch + fix-check-sse.patch + realsense2.patch + add-gcc-version-check.patch + fix-find-qhull.patch ) -file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindFLANN.cmake) - +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindQhull.cmake) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) +if ("cuda" IN_LIST FEATURES AND VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + message(FATAL_ERROR "Feature cuda only supports 64-bit compilation.") +endif() + +if ("tools" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Feature tools only supports dynamic build") +endif() + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - openni2 WITH_OPENNI2 - qt WITH_QT - pcap WITH_PCAP - cuda WITH_CUDA - cuda BUILD_CUDA - cuda BUILD_GPU - tools BUILD_tools - opengl WITH_OPENGL + FEATURES + openni2 WITH_OPENNI2 + qt WITH_QT + pcap WITH_PCAP + cuda WITH_CUDA + cuda BUILD_CUDA + cuda BUILD_GPU + tools BUILD_tools + opengl WITH_OPENGL + vtk WITH_VTK ) vcpkg_configure_cmake( @@ -44,7 +55,6 @@ vcpkg_configure_cmake( -DWITH_LIBUSB=OFF -DWITH_PNG=ON -DWITH_QHULL=ON - -DWITH_VTK=ON # FEATURES ${FEATURE_OPTIONS} ) @@ -56,7 +66,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if("tools" IN_LIST FEATURES) +if("tools" IN_LIST FEATURES) file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pcl) @@ -64,5 +74,4 @@ if("tools" IN_LIST FEATURES) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/pcl) endif() -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcl) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcl/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/pcl/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pcl/realsense2.patch b/ports/pcl/realsense2.patch new file mode 100644 index 00000000000000..cfe2cc41f1b255 --- /dev/null +++ b/ports/pcl/realsense2.patch @@ -0,0 +1,13 @@ +diff --git a/io/src/real_sense_2_grabber.cpp b/io/src/real_sense_2_grabber.cpp +index d13231e..06d1238 100644 +--- a/io/src/real_sense_2_grabber.cpp ++++ b/io/src/real_sense_2_grabber.cpp +@@ -287,7 +287,7 @@ namespace pcl + cloud->width = sp.width (); + cloud->height = sp.height (); + cloud->is_dense = false; +- cloud->points.resize ( size () ); ++ cloud->points.resize ( points.size () ); + + const auto cloud_vertices_ptr = points.get_vertices (); + const auto cloud_texture_ptr = points.get_texture_coordinates (); diff --git a/ports/pcl/remove-broken-targets.patch b/ports/pcl/remove-broken-targets.patch new file mode 100644 index 00000000000000..b6a583153968ed --- /dev/null +++ b/ports/pcl/remove-broken-targets.patch @@ -0,0 +1,20 @@ +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index 1911f7b..11566a2 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -123,15 +123,6 @@ target_link_libraries(pcl_concatenate_points_pcd pcl_common pcl_io) + PCL_ADD_EXECUTABLE(pcl_poisson_reconstruction COMPONENT ${SUBSYS_NAME} SOURCES poisson_reconstruction.cpp) + target_link_libraries(pcl_poisson_reconstruction pcl_common pcl_io pcl_surface) + +-PCL_ADD_EXECUTABLE(pcl_train_linemod_template COMPONENT ${SUBSYS_NAME} SOURCES train_linemod_template.cpp) +-target_link_libraries(pcl_train_linemod_template pcl_common pcl_io pcl_segmentation pcl_recognition) +- +-PCL_ADD_EXECUTABLE(pcl_match_linemod_template COMPONENT ${SUBSYS_NAME} SOURCES match_linemod_template.cpp) +-target_link_libraries(pcl_match_linemod_template pcl_common pcl_io pcl_recognition) +- +-PCL_ADD_EXECUTABLE(pcl_linemod_detection COMPONENT ${SUBSYS_NAME} SOURCES linemod_detection.cpp) +-target_link_libraries(pcl_linemod_detection pcl_common pcl_io pcl_recognition) +- + PCL_ADD_EXECUTABLE(pcl_fast_bilateral_filter COMPONENT ${SUBSYS_NAME} SOURCES fast_bilateral_filter.cpp) + target_link_libraries(pcl_fast_bilateral_filter pcl_common pcl_io pcl_filters) + diff --git a/ports/pcl/use_flann_targets.patch b/ports/pcl/use_flann_targets.patch deleted file mode 100644 index 7e6289267a7eb5..00000000000000 --- a/ports/pcl/use_flann_targets.patch +++ /dev/null @@ -1,155 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0b4c1a3..94bb484 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -280,11 +280,9 @@ find_package(Eigen REQUIRED) - include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) - - # FLANN (required) --if(NOT PCL_SHARED_LIBS OR ((WIN32 AND NOT MINGW) AND NOT PCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32)) -- set(FLANN_USE_STATIC ON) --endif() -+set(FLANN_USE_STATIC ON) - find_package(FLANN 1.7.0 REQUIRED) --include_directories(${FLANN_INCLUDE_DIRS}) -+find_package(lz4) - - # libusb-1.0 - option(WITH_LIBUSB "Build USB RGBD-Camera drivers" TRUE) -diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in -index 6fadb59..6a9c5b7 100755 ---- a/PCLConfig.cmake.in -+++ b/PCLConfig.cmake.in -@@ -226,12 +226,6 @@ endmacro(find_rssdk) - - #remove this as soon as flann is shipped with FindFlann.cmake - macro(find_flann) -- if(PCL_ALL_IN_ONE_INSTALLER) -- set(FLANN_ROOT "${PCL_ROOT}/3rdParty/Flann") -- elseif(NOT FLANN_ROOT) -- get_filename_component(FLANN_ROOT "@FLANN_INCLUDE_DIRS@" PATH) -- endif(PCL_ALL_IN_ONE_INSTALLER) -- - set(FLANN_USE_STATIC @FLANN_USE_STATIC@) - find_package(FLANN) - endmacro(find_flann) -@@ -651,7 +645,7 @@ endif(NOT "${PCL_DEFINITIONS}" STREQUAL "") - pcl_remove_duplicate_libraries(PCL_COMPONENTS PCL_LIBRARIES) - - # Add 3rd party libraries, as user code might include our .HPP implementations --list(APPEND PCL_LIBRARIES ${BOOST_LIBRARIES} ${QHULL_LIBRARIES} ${OPENNI_LIBRARIES} ${OPENNI2_LIBRARIES} ${ENSENSO_LIBRARIES} ${davidSDK_LIBRARIES} ${DSSDK_LIBRARIES} ${RSSDK_LIBRARIES} ${FLANN_LIBRARIES} ${VTK_LIBRARIES}) -+list(APPEND PCL_LIBRARIES ${BOOST_LIBRARIES} ${QHULL_LIBRARIES} ${OPENNI_LIBRARIES} ${OPENNI2_LIBRARIES} ${ENSENSO_LIBRARIES} ${davidSDK_LIBRARIES} ${DSSDK_LIBRARIES} ${RSSDK_LIBRARIES} flann::flann_cpp ${VTK_LIBRARIES}) - - find_package_handle_standard_args(PCL DEFAULT_MSG PCL_LIBRARIES PCL_INCLUDE_DIRS) - mark_as_advanced(PCL_LIBRARIES PCL_INCLUDE_DIRS PCL_LIBRARY_DIRS) -diff --git a/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt b/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt -index 9693792..dcd4373 100755 ---- a/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt -+++ b/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt -@@ -1,6 +1,6 @@ - cmake_minimum_required(VERSION 2.8 FATAL_ERROR) - --# we need FindFLANN.cmake -+# we need FindFLANN.cmake - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - - project(vfh_cluster_classifier) -@@ -14,16 +14,15 @@ find_package(HDF5) - if(HDF5_FOUND) - - find_package(FLANN) -- include_directories(${FLANN_INCLUDE_DIRS}) - - include_directories(${HDF5_INCLUDE_DIR}) - - add_executable(build_tree build_tree.cpp) - target_link_libraries(build_tree ${PCL_LIBRARIES} ${Boost_LIBRARIES} -- ${FLANN_LIBRARIES} ${HDF5_hdf5_LIBRARY}) -+ flann::flann_cpp ${HDF5_hdf5_LIBRARY}) - - add_executable(nearest_neighbors nearest_neighbors.cpp) -- target_link_libraries(nearest_neighbors ${PCL_LIBRARIES} -- ${Boost_LIBRARIES} ${FLANN_LIBRARIES} ${HDF5_hdf5_LIBRARY} -+ target_link_libraries(nearest_neighbors ${PCL_LIBRARIES} -+ ${Boost_LIBRARIES} flann::flann_cpp ${HDF5_hdf5_LIBRARY} - ) - endif(HDF5_FOUND) -diff --git a/kdtree/CMakeLists.txt b/kdtree/CMakeLists.txt -index 311dffc..1a7712f 100755 ---- a/kdtree/CMakeLists.txt -+++ b/kdtree/CMakeLists.txt -@@ -9,18 +9,18 @@ PCL_SUBSYS_DEPEND(build "${SUBSYS_NAME}" DEPS ${SUBSYS_DEPS} EXT_DEPS flann) - PCL_ADD_DOC("${SUBSYS_NAME}") - - if(build) -- set(srcs -+ set(srcs - src/kdtree_flann.cpp - ) - -- set(incs -+ set(incs - "include/pcl/${SUBSYS_NAME}/kdtree.h" - "include/pcl/${SUBSYS_NAME}/io.h" - "include/pcl/${SUBSYS_NAME}/flann.h" - "include/pcl/${SUBSYS_NAME}/kdtree_flann.h" - ) - -- set(impl_incs -+ set(impl_incs - "include/pcl/${SUBSYS_NAME}/impl/io.hpp" - "include/pcl/${SUBSYS_NAME}/impl/kdtree_flann.hpp" - ) -@@ -28,7 +28,7 @@ if(build) - set(LIB_NAME "pcl_${SUBSYS_NAME}") - include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") - PCL_ADD_LIBRARY("${LIB_NAME}" "${SUBSYS_NAME}" ${srcs} ${incs} ${impl_incs}) -- target_link_libraries("${LIB_NAME}" pcl_common ${FLANN_LIBRARIES}) -+ target_link_libraries("${LIB_NAME}" pcl_common flann::flann_cpp) - set(EXT_DEPS flann) - PCL_MAKE_PKGCONFIG("${LIB_NAME}" "${SUBSYS_NAME}" "${SUBSYS_DESC}" - "${SUBSYS_DEPS}" "${EXT_DEPS}" "" "" "") -@@ -38,4 +38,3 @@ if(build) - PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl" ${impl_incs}) - - endif(build) -- -diff --git a/search/CMakeLists.txt b/search/CMakeLists.txt -index cd82a0e..1d15241 100755 ---- a/search/CMakeLists.txt -+++ b/search/CMakeLists.txt -@@ -38,7 +38,7 @@ if(build) - set(LIB_NAME "pcl_${SUBSYS_NAME}") - include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") - PCL_ADD_LIBRARY("${LIB_NAME}" "${SUBSYS_NAME}" ${srcs} ${incs} ${impl_incs}) -- target_link_libraries("${LIB_NAME}" pcl_common ${FLANN_LIBRARIES} pcl_octree pcl_kdtree) -+ target_link_libraries("${LIB_NAME}" pcl_common flann::flann_cpp pcl_octree pcl_kdtree) - list(APPEND EXT_DEPS flann) - PCL_MAKE_PKGCONFIG("${LIB_NAME}" "${SUBSYS_NAME}" "${SUBSYS_DESC}" "${SUBSYS_DEPS}" "" "" "" "") - -@@ -46,4 +46,3 @@ if(build) - PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl" ${impl_incs}) - - endif(build) -- -diff --git a/test/features/CMakeLists.txt b/test/features/CMakeLists.txt -index cedb0cb..4b37c73 100755 ---- a/test/features/CMakeLists.txt -+++ b/test/features/CMakeLists.txt -@@ -81,14 +81,14 @@ if (build) - PCL_ADD_TEST(feature_flare_estimation test_flare_estimation - FILES test_flare_estimation.cpp - LINK_WITH pcl_gtest pcl_features pcl_io -- ARGUMENTS "${PCL_SOURCE_DIR}/test/bun0.pcd") -+ ARGUMENTS "${PCL_SOURCE_DIR}/test/bun0.pcd") - PCL_ADD_TEST(feature_shot_lrf_estimation test_shot_lrf_estimation - FILES test_shot_lrf_estimation.cpp - LINK_WITH pcl_gtest pcl_features pcl_io - ARGUMENTS "${PCL_SOURCE_DIR}/test/bun0.pcd") - PCL_ADD_TEST(features_narf test_narf - FILES test_narf.cpp -- LINK_WITH pcl_gtest pcl_features ${FLANN_LIBRARIES}) -+ LINK_WITH pcl_gtest pcl_features flann::flann_cpp) - PCL_ADD_TEST(a_ii_normals_test test_ii_normals - FILES test_ii_normals.cpp - LINK_WITH pcl_gtest pcl_io pcl_features diff --git a/ports/pcl/vcpkg.json b/ports/pcl/vcpkg.json new file mode 100644 index 00000000000000..4f0fa3a87576d9 --- /dev/null +++ b/ports/pcl/vcpkg.json @@ -0,0 +1,84 @@ +{ + "name": "pcl", + "version": "1.11.1", + "port-version": 4, + "description": "Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.", + "homepage": "https://github.com/PointCloudLibrary/pcl", + "supports": "!(arm64 & windows)", + "dependencies": [ + "boost-asio", + "boost-date-time", + "boost-dynamic-bitset", + "boost-filesystem", + "boost-foreach", + "boost-graph", + "boost-interprocess", + "boost-iostreams", + "boost-multi-array", + "boost-property-map", + "boost-ptr-container", + "boost-random", + "boost-signals2", + "boost-sort", + "boost-system", + "boost-thread", + "boost-uuid", + "eigen3", + "flann", + "libpng", + "qhull" + ], + "features": { + "cuda": { + "description": "CUDA support for PCL", + "dependencies": [ + "cuda" + ] + }, + "opengl": { + "description": "OpenGL support for PCL" + }, + "openni2": { + "description": "OpenNI2 support for PCL", + "dependencies": [ + "openni2" + ] + }, + "pcap": { + "description": "PCAP support for PCL", + "dependencies": [ + { + "name": "libpcap", + "platform": "!windows" + }, + { + "name": "winpcap", + "platform": "windows" + } + ] + }, + "qt": { + "description": "Qt support for PCL", + "dependencies": [ + { + "name": "vtk", + "features": [ + "qt" + ] + } + ] + }, + "tools": { + "description": "Build PCL utilities", + "dependencies": [ + "boost-accumulators" + ] + }, + "vtk": { + "description": "VTK-Visualizations support for PCL", + "dependencies": [ + "vtk" + ] + } + } +} diff --git a/ports/pcre/CONTROL b/ports/pcre/CONTROL deleted file mode 100644 index 46e041be2ecbf9..00000000000000 --- a/ports/pcre/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: pcre -Version: 8.41-2 -Description: Perl Compatible Regular Expresions diff --git a/ports/pcre/export-cmake-targets.patch b/ports/pcre/export-cmake-targets.patch new file mode 100644 index 00000000000000..bdbd807d36fa61 --- /dev/null +++ b/ports/pcre/export-cmake-targets.patch @@ -0,0 +1,23 @@ +--- a/CMakeLists.txt 2021-06-14 10:33:38.000000000 +0200 ++++ b/CMakeLists.txt 2021-06-18 18:08:24.162881000 +0200 +@@ -934,10 +934,19 @@ + # Installation + SET(CMAKE_INSTALL_ALWAYS 1) + +-INSTALL(TARGETS ${targets} ++foreach(target ${targets}) ++ INSTALL(TARGETS ${target} ++ EXPORT pcre-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_include_directories(${target} PUBLIC $) ++endforeach() ++ ++INSTALL(EXPORT pcre-targets ++ NAMESPACE unofficial::pcre:: ++ FILE unofficial-pcre-targets.cmake ++ DESTINATION "share/unofficial-pcre") + + INSTALL(FILES ${PCRE_HEADERS} ${PCREPOSIX_HEADERS} DESTINATION include) + diff --git a/ports/pcre/fix-arm-config-define.patch b/ports/pcre/fix-arm-config-define.patch deleted file mode 100644 index eb136a8cd26956..00000000000000 --- a/ports/pcre/fix-arm-config-define.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h -index 4dc452f..5a9827d 100644 ---- "a/sljit/sljitConfigInternal.h" -+++ "b/sljit/sljitConfigInternal.h" -@@ -149,7 +149,7 @@ - - #if defined(_M_X64) || defined(__x86_64__) - #define SLJIT_CONFIG_X86_64 1 --#elif defined(_ARM_) -+#elif defined(_M_ARM) - #define SLJIT_CONFIG_ARM_V5 1 - #else - #define SLJIT_CONFIG_X86_32 1 -@@ -332,9 +332,16 @@ - - #else - -+#if defined(__linux__) - /* Calls __ARM_NR_cacheflush on ARM-Linux. */ - #define SLJIT_CACHE_FLUSH(from, to) \ - __clear_cache((char*)(from), (char*)(to)) -+#elif(_WIN32) -+#pragma comment(lib, "kernel32.lib") -+uint32_t FlushInstructionCache(void *hProcess, void *lpBaseAddress, uintptr_t dwSize); -+#define SLJIT_CACHE_FLUSH(from, to) \ -+ FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from)); -+#endif - - #endif - -diff --git a/sljit/sljitNativeARM_32.c b/sljit/sljitNativeARM_32.c -index 745da99..83942b0 100644 ---- a/sljit/sljitNativeARM_32.c -+++ b/sljit/sljitNativeARM_32.c -@@ -1573,12 +1573,8 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 - extern "C" { - #endif - --#if defined(__GNUC__) - extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator); - extern int __aeabi_idivmod(int numerator, int denominator); --#else --#error "Software divmod functions are needed" --#endif - - #ifdef __cplusplus - } -@@ -1635,12 +1631,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile - } - } - --#if defined(__GNUC__) - FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, - ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); --#else --#error "Software divmod functions are needed" --#endif - - if (saved_reg_count > 0) { - if (saved_reg_count >= 3) { diff --git a/ports/pcre/fix-arm64-config-define.patch b/ports/pcre/fix-arm64-config-define.patch deleted file mode 100644 index d92ced46bbc4c9..00000000000000 --- a/ports/pcre/fix-arm64-config-define.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h -index 2bda29e..56ba7a6 100644 ---- a/sljit/sljitConfigInternal.h -+++ b/sljit/sljitConfigInternal.h -@@ -151,6 +151,8 @@ - #define SLJIT_CONFIG_X86_64 1 - #elif defined(_M_ARM) - #define SLJIT_CONFIG_ARM_V5 1 -+#elif defined(_M_ARM64) -+#define SLJIT_CONFIG_ARM_64 1 - #else - #define SLJIT_CONFIG_X86_32 1 - #endif -@@ -330,7 +332,6 @@ - __clear_cache((char*)(from), (char*)(to)) - #elif(_WIN32) - #pragma comment(lib, "kernel32.lib") --uint32_t FlushInstructionCache(void *hProcess, void *lpBaseAddress, uintptr_t dwSize); - #define SLJIT_CACHE_FLUSH(from, to) \ - FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from)); - #endif diff --git a/ports/pcre/fix-option-2.patch b/ports/pcre/fix-option-2.patch deleted file mode 100644 index de78c5f16ae8f8..00000000000000 --- a/ports/pcre/fix-option-2.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git b/CMakeLists.txt a/CMakeLists.txt -index 858a34bd..d1a64570 100644 ---- b/CMakeLists.txt -+++ a/CMakeLists.txt -@@ -74,7 +74,6 @@ PROJECT(PCRE C CXX) - # CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY. - - CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) --CMAKE_POLICY(SET CMP0026 OLD) - - SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake - -@@ -191,9 +190,8 @@ IF (MINGW) - ENDIF(MINGW) - - IF(MSVC) -- OPTION(PCRE_STATIC_RUNTIME -- "ON=Compile against the static runtime (/MT)." -- OFF) -+ add_definitions(/wd4703 /wd4146 /wd4308) -+ OPTION(PCRE_STATIC_RUNTIME "ON=Compile against the static runtime (/MT)." OFF) - OPTION(INSTALL_MSVC_PDB - "ON=Install .pdb files built by MSVC, if generated" - OFF) diff --git a/ports/pcre/pcre-8.45_fix_postfix_for_debug_Windows_builds.patch b/ports/pcre/pcre-8.45_fix_postfix_for_debug_Windows_builds.patch new file mode 100644 index 00000000000000..bd9c9b4390abcc --- /dev/null +++ b/ports/pcre/pcre-8.45_fix_postfix_for_debug_Windows_builds.patch @@ -0,0 +1,161 @@ +Index: CMakeLists.txt +=================================================================== +--- CMakeLists.txt (revision 1767) ++++ CMakeLists.txt (working copy) +@@ -436,6 +436,12 @@ + @ONLY) + ENDIF(PCRE_BUILD_PCRECPP) + ++# Make sure to not link debug libs ++# against release libs and vice versa ++IF(WIN32) ++ SET(CMAKE_DEBUG_POSTFIX "d") ++ENDIF(WIN32) ++ + # Generate pkg-config files + SET(PACKAGE_VERSION "${PCRE_MAJOR}.${PCRE_MINOR}") + SET(prefix "${CMAKE_INSTALL_PREFIX}") +@@ -442,6 +448,9 @@ + SET(exec_prefix "\${prefix}") + SET(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") + SET(includedir "\${prefix}/include") ++IF(WIN32 AND (CMAKE_BUILD_TYPE MATCHES Debug)) ++ SET(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX}) ++ENDIF() + IF(NOT BUILD_SHARED_LIBS) + SET(PCRE_STATIC_CFLAG "-DPCRE_STATIC") + ENDIF(NOT BUILD_SHARED_LIBS) +@@ -659,11 +668,6 @@ + ENDIF(MSVC) + + SET(CMAKE_INCLUDE_CURRENT_DIR 1) +-# needed to make sure to not link debug libs +-# against release libs and vice versa +-IF(WIN32) +- SET(CMAKE_DEBUG_POSTFIX "d") +-ENDIF(WIN32) + + SET(targets) + +Index: configure.ac +=================================================================== +--- configure.ac (revision 1767) ++++ configure.ac (working copy) +@@ -1044,6 +1044,9 @@ + AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"]) + + # Produce these files, in addition to config.h. ++# LIB_POSTFIX is used by CMakeLists.txt for Windows debug builds. ++# Pass empty LIB_POSTFIX to *.pc files and pcre-config here. ++AC_SUBST(LIB_POSTFIX) + AC_CONFIG_FILES( + Makefile + libpcre.pc +Index: libpcre.pc.in +=================================================================== +--- libpcre.pc.in (revision 1767) ++++ libpcre.pc.in (working copy) +@@ -8,6 +8,6 @@ + Name: libpcre + Description: PCRE - Perl compatible regular expressions C library with 8 bit character support + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lpcre ++Libs: -L${libdir} -lpcre@LIB_POSTFIX@ + Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ +Index: libpcre16.pc.in +=================================================================== +--- libpcre16.pc.in (revision 1767) ++++ libpcre16.pc.in (working copy) +@@ -8,6 +8,6 @@ + Name: libpcre16 + Description: PCRE - Perl compatible regular expressions C library with 16 bit character support + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lpcre16 ++Libs: -L${libdir} -lpcre16@LIB_POSTFIX@ + Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ +Index: libpcre32.pc.in +=================================================================== +--- libpcre32.pc.in (revision 1767) ++++ libpcre32.pc.in (working copy) +@@ -8,6 +8,6 @@ + Name: libpcre32 + Description: PCRE - Perl compatible regular expressions C library with 32 bit character support + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lpcre32 ++Libs: -L${libdir} -lpcre32@LIB_POSTFIX@ + Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ +Index: libpcrecpp.pc.in +=================================================================== +--- libpcrecpp.pc.in (revision 1767) ++++ libpcrecpp.pc.in (working copy) +@@ -8,5 +8,5 @@ + Name: libpcrecpp + Description: PCRECPP - C++ wrapper for PCRE + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lpcre -lpcrecpp ++Libs: -L${libdir} -lpcre@LIB_POSTFIX@ -lpcrecpp@LIB_POSTFIX@ + Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ +Index: libpcreposix.pc.in +=================================================================== +--- libpcreposix.pc.in (revision 1767) ++++ libpcreposix.pc.in (working copy) +@@ -8,6 +8,6 @@ + Name: libpcreposix + Description: PCREPosix - Posix compatible interface to libpcre + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lpcreposix ++Libs: -L${libdir} -lpcreposix@LIB_POSTFIX@ + Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ + Requires.private: libpcre +Index: pcre-config.in +=================================================================== +--- pcre-config.in (revision 1767) ++++ pcre-config.in (working copy) +@@ -91,7 +91,7 @@ + ;; + --libs-posix) + if test @enable_pcre8@ = yes ; then +- echo $libS$libR -lpcreposix -lpcre ++ echo $libS$libR -lpcreposix@LIB_POSTFIX@ -lpcre@LIB_POSTFIX@ + else + echo "${usage}" 1>&2 + fi +@@ -98,7 +98,7 @@ + ;; + --libs) + if test @enable_pcre8@ = yes ; then +- echo $libS$libR -lpcre ++ echo $libS$libR -lpcre@LIB_POSTFIX@ + else + echo "${usage}" 1>&2 + fi +@@ -105,7 +105,7 @@ + ;; + --libs16) + if test @enable_pcre16@ = yes ; then +- echo $libS$libR -lpcre16 ++ echo $libS$libR -lpcre16@LIB_POSTFIX@ + else + echo "${usage}" 1>&2 + fi +@@ -112,7 +112,7 @@ + ;; + --libs32) + if test @enable_pcre32@ = yes ; then +- echo $libS$libR -lpcre32 ++ echo $libS$libR -lpcre32@LIB_POSTFIX@ + else + echo "${usage}" 1>&2 + fi +@@ -119,7 +119,7 @@ + ;; + --libs-cpp) + if test @enable_cpp@ = yes ; then +- echo $libS$libR -lpcrecpp -lpcre ++ echo $libS$libR -lpcrecpp@LIB_POSTFIX@ -lpcre@LIB_POSTFIX@ + else + echo "${usage}" 1>&2 + fi diff --git a/ports/pcre/pcre-8.45_suppress_cmake_and_compiler_warnings-errors.patch b/ports/pcre/pcre-8.45_suppress_cmake_and_compiler_warnings-errors.patch new file mode 100644 index 00000000000000..59dbc8b21f6680 --- /dev/null +++ b/ports/pcre/pcre-8.45_suppress_cmake_and_compiler_warnings-errors.patch @@ -0,0 +1,18 @@ +--- a/CMakeLists.txt 2021-06-14 10:33:38.000000000 +0200 ++++ b/CMakeLists.txt 2021-06-18 17:59:59.155148900 +0200 +@@ -77,7 +77,6 @@ + # CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY. + + CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5) +-CMAKE_POLICY(SET CMP0026 OLD) + + # For FindReadline.cmake. This was changed to allow setting CMAKE_MODULE_PATH + # on the command line. +@@ -199,6 +198,7 @@ + ENDIF(MINGW) + + IF(MSVC) ++ add_definitions(/wd4703 /wd4146 /wd4308) + OPTION(PCRE_STATIC_RUNTIME + "ON=Compile against the static runtime (/MT)." + OFF) diff --git a/ports/pcre/portfile.cmake b/ports/pcre/portfile.cmake index ac99a478bfe3fb..f96e2a5bfd45d6 100644 --- a/ports/pcre/portfile.cmake +++ b/ports/pcre/portfile.cmake @@ -1,43 +1,55 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# +set(PCRE_VERSION 8.45) +set(EXPECTED_SHA 71f246c0abbf356222933ad1604cab87a1a2a3cd8054a0b9d6deb25e0735ce9f40f923d14cbd21f32fdac7283794270afcb0f221ad24662ac35934fcb73675cd) +set(PATCHES + # Fix CMake Deprecation Warning concerning OLD behavior for policy CMP0026 + # Suppress MSVC compiler warnings C4703, C4146, C4308, which fixes errors + # under x64-uwp and arm-uwp + pcre-8.45_suppress_cmake_and_compiler_warnings-errors.patch + # Modified for 8.45 from https://bugs.exim.org/show_bug.cgi?id=2600 + pcre-8.45_fix_postfix_for_debug_Windows_builds.patch + export-cmake-targets.patch) -set(PCRE_VERSION 8.41) -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre-${PCRE_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PCRE_VERSION}.zip" - "https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VERSION}/pcre-${PCRE_VERSION}.zip" + URLS "https://ftp.pcre.org/pub/pcre/pcre-${PCRE_VERSION}.zip" FILENAME "pcre-${PCRE_VERSION}.zip" - SHA512 a3fd57090a5d9ce9d608aeecd59f42f04deea5b86a5c5899bdb25b18d8ec3a89b2b52b62e325c6485a87411eb65f1421604f80c3eaa653bd7dbab05ad22795ea + SHA512 ${EXPECTED_SHA} + SILENT_EXIT ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option-2.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-arm-config-define.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-arm64-config-define.patch) +if (EXISTS "${ARCHIVE}") + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES ${PATCHES} + ) +else() + vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO pcre/pcre + REF ${PCRE_VERSION} + FILENAME "pcre-${PCRE_VERSION}.zip" + SHA512 ${EXPECTED_SHA} + PATCHES ${PATCHES} + ) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DPCRE_BUILD_TESTS=NO - -DPCRE_BUILD_PCREGREP=NO - -DPCRE_BUILD_PCRE32=YES - -DPCRE_BUILD_PCRE16=YES - -DPCRE_BUILD_PCRE8=YES - -DPCRE_SUPPORT_JIT=YES - -DPCRE_SUPPORT_UTF=YES - -DPCRE_SUPPORT_UNICODE_PROPERTIES=YES - # optional dependencies for PCREGREP - -DPCRE_SUPPORT_LIBBZ2=OFF - -DPCRE_SUPPORT_LIBZ=OFF - -DPCRE_SUPPORT_LIBEDIT=OFF - -DPCRE_SUPPORT_LIBREADLINE=OFF + OPTIONS + -DPCRE_BUILD_TESTS=NO + -DPCRE_BUILD_PCREGREP=NO + -DPCRE_BUILD_PCRE32=YES + -DPCRE_BUILD_PCRE16=YES + -DPCRE_BUILD_PCRE8=YES + -DPCRE_SUPPORT_JIT=YES + -DPCRE_SUPPORT_UTF=YES + -DPCRE_SUPPORT_UNICODE_PROPERTIES=YES + # optional dependencies for PCREGREP + -DPCRE_SUPPORT_LIBBZ2=OFF + -DPCRE_SUPPORT_LIBZ=OFF + -DPCRE_SUPPORT_LIBEDIT=OFF + -DPCRE_SUPPORT_LIBREADLINE=OFF # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 @@ -45,6 +57,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + foreach(FILE ${CURRENT_PACKAGES_DIR}/include/pcre.h ${CURRENT_PACKAGES_DIR}/include/pcreposix.h) file(READ ${FILE} PCRE_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -55,15 +69,20 @@ foreach(FILE ${CURRENT_PACKAGES_DIR}/include/pcre.h ${CURRENT_PACKAGES_DIR}/incl file(WRITE ${FILE} "${PCRE_H}") endforeach() +vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/man) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +vcpkg_copy_pdbs() +configure_file(${CMAKE_CURRENT_LIST_DIR}/unofficial-pcre-config.cmake ${CURRENT_PACKAGES_DIR}/share/unofficial-pcre/unofficial-pcre-config.cmake @ONLY) -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcre) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcre/COPYING ${CURRENT_PACKAGES_DIR}/share/pcre/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/pcre/unofficial-pcre-config.cmake b/ports/pcre/unofficial-pcre-config.cmake new file mode 100644 index 00000000000000..edf30b9778d038 --- /dev/null +++ b/ports/pcre/unofficial-pcre-config.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-pcre-targets.cmake") diff --git a/ports/pcre/vcpkg.json b/ports/pcre/vcpkg.json new file mode 100644 index 00000000000000..2e6ddd7ca27c69 --- /dev/null +++ b/ports/pcre/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "pcre", + "version": "8.45", + "description": "Perl Compatible Regular Expressions", + "homepage": "https://www.pcre.org/" +} diff --git a/ports/pcre2/CONTROL b/ports/pcre2/CONTROL deleted file mode 100644 index 3d7824a27ca087..00000000000000 --- a/ports/pcre2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pcre2 -Version: 10.30-4 -Homepage: https://pcre.org/ -Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library diff --git a/ports/pcre2/fix-arm64-config.patch b/ports/pcre2/fix-arm64-config.patch deleted file mode 100644 index bba95718ae7726..00000000000000 --- a/ports/pcre2/fix-arm64-config.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/src/sljit/sljitConfigInternal.h b/src/sljit/sljitConfigInternal.h -index cc0810f..964afe8 100644 ---- a/src/sljit/sljitConfigInternal.h -+++ b/src/sljit/sljitConfigInternal.h -@@ -151,6 +151,8 @@ - #define SLJIT_CONFIG_X86_64 1 - #elif defined(_ARM_) - #define SLJIT_CONFIG_ARM_V5 1 -+#elif defined(_M_ARM64) -+#define SLJIT_CONFIG_ARM_64 1 - #else - #define SLJIT_CONFIG_X86_32 1 - #endif -@@ -324,9 +326,15 @@ - - #else - -+#if defined(__linux__) - /* Calls __ARM_NR_cacheflush on ARM-Linux. */ - #define SLJIT_CACHE_FLUSH(from, to) \ - __clear_cache((char*)(from), (char*)(to)) -+#elif(_WIN32) -+#pragma comment(lib, "kernel32.lib") -+#define SLJIT_CACHE_FLUSH(from, to) \ -+ FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from)); -+#endif - - #endif - diff --git a/ports/pcre2/fix-space.patch b/ports/pcre2/fix-space.patch deleted file mode 100644 index 70f88021af9bad..00000000000000 --- a/ports/pcre2/fix-space.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fbc37fe..54e25f2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -91,7 +91,7 @@ CMAKE_POLICY(SET CMP0026 OLD) - - SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake - --SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR}/src") -+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I\"${PROJECT_SOURCE_DIR}/src\"") - - # external packages - FIND_PACKAGE( BZip2 ) diff --git a/ports/pcre2/pcre2-10.35_fix-uwp.patch b/ports/pcre2/pcre2-10.35_fix-uwp.patch new file mode 100644 index 00000000000000..476dde0f6a4ccb --- /dev/null +++ b/ports/pcre2/pcre2-10.35_fix-uwp.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt 2020-05-09 16:43:10.000000000 +0200 ++++ b/CMakeLists.txt 2020-06-03 20:57:17.026182500 +0200 +@@ -619,6 +619,7 @@ + + IF(MSVC) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) ++ add_compile_options(/wd4146) + ENDIF(MSVC) + + SET(CMAKE_INCLUDE_CURRENT_DIR 1) diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake index 82b9014d11eba4..060fd67b00750c 100644 --- a/ports/pcre2/portfile.cmake +++ b/ports/pcre2/portfile.cmake @@ -1,16 +1,38 @@ -set(PCRE2_VERSION 10.30) -include(vcpkg_common_functions) +set(PCRE2_VERSION 10.37) +set(EXPECTED_SHA f91760a8e0747f52211612fb0e134d685e224d16bd884eb574718d077a586b1fd7b6435d4e3b75c879b12e02b252467ecc28cdc4bc2903c783dacab089f99c99) +set(PATCHES + pcre2-10.35_fix-uwp.patch +) vcpkg_download_distfile(ARCHIVE - URLS "https://ftp.pcre.org/pub/pcre/pcre2-${PCRE2_VERSION}.zip" "https://sourceforge.net/projects/pcre/files/pcre2/${PCRE2_VERSION}/pcre2-${PCRE2_VERSION}.zip/download" + URLS "https://ftp.pcre.org/pub/pcre/pcre2-${PCRE2_VERSION}.zip" FILENAME "pcre2-${PCRE2_VERSION}.zip" - SHA512 03e570b946ac29498a114b27e715a0fcf25702bfc9623f9fc085ee8a3214ab3c303baccb9c0af55da6916e8ce40d931d97f1ee9628690563041a943f0aa2bc54) + SHA512 ${EXPECTED_SHA} + SILENT_EXIT +) -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES fix-space.patch - fix-arm64-config.patch) +if (EXISTS "${ARCHIVE}") + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES ${PATCHES} + ) +else() + vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO pcre/pcre2 + REF ${PCRE2_VERSION} + FILENAME "pcre2-${PCRE2_VERSION}.zip" + SHA512 ${EXPECTED_SHA} + PATCHES ${PATCHES} + ) +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(JIT OFF) +else() + set(JIT ON) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -19,7 +41,7 @@ vcpkg_configure_cmake( -DPCRE2_BUILD_PCRE2_8=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON - -DPCRE2_SUPPORT_JIT=ON + -DPCRE2_SUPPORT_JIT=${JIT} -DPCRE2_SUPPORT_UNICODE=ON -DPCRE2_BUILD_TESTS=OFF -DPCRE2_BUILD_PCRE2GREP=OFF) @@ -34,10 +56,7 @@ else() endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/pcre2.h "${PCRE2_H}") -# don't install POSIX wrapper -file(REMOVE ${CURRENT_PACKAGES_DIR}/include/pcre2posix.h) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/pcre2-posix.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pcre2-posixd.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/pcre2-posix.dll ${CURRENT_PACKAGES_DIR}/debug/bin/pcre2-posixd.dll) +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() @@ -46,5 +65,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcre2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcre2/COPYING ${CURRENT_PACKAGES_DIR}/share/pcre2/copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pcre2/vcpkg.json b/ports/pcre2/vcpkg.json new file mode 100644 index 00000000000000..80d87e8feeaa58 --- /dev/null +++ b/ports/pcre2/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "pcre2", + "version-string": "10.37", + "description": "PCRE2 is a re-working of the original Perl Compatible Regular Expressions library", + "homepage": "https://pcre.org/" +} diff --git a/ports/pdal-c/CONTROL b/ports/pdal-c/CONTROL deleted file mode 100644 index 061e1a6597143f..00000000000000 --- a/ports/pdal-c/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pdal-c -Version: 1.8-2 -Description: C API for the Point Data Abstraction Library (PDAL) -Build-Depends: pdal diff --git a/ports/pdal-c/portfile.cmake b/ports/pdal-c/portfile.cmake index bdfdd387e8addb..3e1b8c1a93b405 100644 --- a/ports/pdal-c/portfile.cmake +++ b/ports/pdal-c/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( diff --git a/ports/pdal-c/vcpkg.json b/ports/pdal-c/vcpkg.json new file mode 100644 index 00000000000000..c0629c9909de99 --- /dev/null +++ b/ports/pdal-c/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "pdal-c", + "version-string": "1.8", + "port-version": 3, + "description": "C API for the Point Data Abstraction Library (PDAL)", + "dependencies": [ + "pdal" + ] +} diff --git a/ports/pdal/0003-fix-copy-vendor.patch b/ports/pdal/0003-fix-copy-vendor.patch index a29ad9018e17b9..3aad7af320a9e9 100644 --- a/ports/pdal/0003-fix-copy-vendor.patch +++ b/ports/pdal/0003-fix-copy-vendor.patch @@ -33,6 +33,15 @@ index 43e446a..c4c7d6f 100644 # # CPACK +@@ -348,7 +373,7 @@ add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) + + export( + TARGETS +- ${PDAL_BASE_LIB_NAME} ${PDAL_UTIL_LIB_NAME} ++ ${PDAL_BASE_LIB_NAME} ${PDAL_ARBITER_LIB_NAME} ${PDAL_KAZHDAN_LIB_NAME} ${PDAL_UTIL_LIB_NAME} + FILE + "${PDAL_BINARY_DIR}/PDALTargets.cmake") + diff --git a/cmake/directories.cmake b/cmake/directories.cmake index f079ec7..8e366e8 100644 --- a/cmake/directories.cmake diff --git a/ports/pdal/0004-fix-const-overloaded.patch b/ports/pdal/0004-fix-const-overloaded.patch new file mode 100644 index 00000000000000..1f820aef340053 --- /dev/null +++ b/ports/pdal/0004-fix-const-overloaded.patch @@ -0,0 +1,13 @@ +diff --git a/pdal/PointViewIter.hpp b/pdal/PointViewIter.hpp +index 0c387be..ccb0721 100644 +--- a/pdal/PointViewIter.hpp ++++ b/pdal/PointViewIter.hpp +@@ -139,7 +139,7 @@ public: + + bool operator==(const PointViewIter& i) + { return m_id == i.m_id; } +- bool operator!=(const PointViewIter& i) ++ bool operator!=(const PointViewIter& i) const + { return m_id != i.m_id; } + bool operator<=(const PointViewIter& i) + { return m_id <= i.m_id; } diff --git a/ports/pdal/CONTROL b/ports/pdal/CONTROL deleted file mode 100644 index 7c465df4e16105..00000000000000 --- a/ports/pdal/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pdal -Version: 1.7.1-5 -Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data. -Build-Depends: gdal, geos, jsoncpp, libgeotiff, laszip diff --git a/ports/pdal/PDALConfig.patch b/ports/pdal/PDALConfig.patch deleted file mode 100644 index ea7681dc10175d..00000000000000 --- a/ports/pdal/PDALConfig.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/PDALConfig.cmake.in b/PDALConfig.cmake.in -index a03ef142e..2d06a2937 100644 ---- a/PDALConfig.cmake.in -+++ b/PDALConfig.cmake.in -@@ -15,6 +15,8 @@ foreach(_dir @PDAL_CONFIG_LIBRARY_DIRS@) - list(APPEND PDAL_LIBRARY_DIRS ${_foo}) - endforeach(_dir) - -+include(CMakeFindDependencyMacro) -+find_dependency(GeoTIFF) - include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake") - - if (WIN32) diff --git a/ports/pdal/fix-CPL_DLL.patch b/ports/pdal/fix-CPL_DLL.patch new file mode 100644 index 00000000000000..ef7c2647273194 --- /dev/null +++ b/ports/pdal/fix-CPL_DLL.patch @@ -0,0 +1,15 @@ +diff --git a/io/GeotiffSupport.cpp b/io/GeotiffSupport.cpp +index 7b75818..909992d 100644 +--- a/io/GeotiffSupport.cpp ++++ b/io/GeotiffSupport.cpp +@@ -43,8 +43,8 @@ PDAL_C_START + + // These functions are available from GDAL, but they + // aren't exported. +-char CPL_DLL * GTIFGetOGISDefn(GTIF*, GTIFDefn*); +-int CPL_DLL GTIFSetFromOGISDefn(GTIF*, const char*); ++char GTIF_DLL * GTIFGetOGISDefn(GTIF*, GTIFDefn*); ++int GTIF_DLL GTIFSetFromOGISDefn(GTIF*, const char*); + + PDAL_C_END + diff --git a/ports/pdal/fix-dependency.patch b/ports/pdal/fix-dependency.patch new file mode 100644 index 00000000000000..ea2bcf8f844bd9 --- /dev/null +++ b/ports/pdal/fix-dependency.patch @@ -0,0 +1,231 @@ +diff --git a/cmake/geos.cmake b/cmake/geos.cmake +index 90b79d9..5942ee5 100644 +--- a/cmake/geos.cmake ++++ b/cmake/geos.cmake +@@ -1,8 +1,5 @@ + # + # GEOS (required) + # +-find_package(GEOS QUIET 3.3) +-set_package_properties(GEOS PROPERTIES TYPE REQUIRED +- PURPOSE "Provides general purpose geometry support") +- +-include_directories("${GEOS_INCLUDE_DIR}") ++find_package(geos CONFIG REQUIRED) ++set(GEOS_LIBRARY GEOS::geos GEOS::geos_c GEOS::geos_cxx_flags) +\ No newline at end of file +diff --git a/cmake/modules/FindPostgreSQL.cmake b/cmake/modules/FindPostgreSQL.cmake +index 8178418..31b54d6 100644 +--- a/cmake/modules/FindPostgreSQL.cmake ++++ b/cmake/modules/FindPostgreSQL.cmake +@@ -80,4 +80,11 @@ find_package_handle_standard_args(PostgreSQL + POSTGRESQL_LIBRARIES + POSTGRESQL_VERSION) + +-mark_as_advanced(POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARIES) ++include (CMakeFindDependencyMacro) ++find_package(OpenSSL REQUIRED) ++set(POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto) ++if (WIN32) ++ set(POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARIES} Secur32) ++endif() ++ ++mark_as_advanced(POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARIES) +\ No newline at end of file +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 42cca1e..43b0ced 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -174,7 +174,6 @@ if (WITH_TESTS) + add_subdirectory(test) + endif() + add_subdirectory(dimbuilder) +-add_subdirectory(vendor/pdalboost) + add_subdirectory(vendor/arbiter) + add_subdirectory(vendor/kazhdan) + if (NOT PDAL_HAVE_JSONCPP) +diff --git a/PDALConfig.cmake.in b/PDALConfig.cmake.in +index a03ef14..9d073e6 100644 +--- a/PDALConfig.cmake.in ++++ b/PDALConfig.cmake.in +@@ -15,6 +15,11 @@ foreach(_dir @PDAL_CONFIG_LIBRARY_DIRS@) + list(APPEND PDAL_LIBRARY_DIRS ${_foo}) + endforeach(_dir) + ++include(CMakeFindDependencyMacro) ++find_dependency(geotiff) ++find_dependency(CURL) ++find_dependency(Boost COMPONENTS system filesystem) ++find_dependency(geos CONFIG) + include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake") + + if (WIN32) +diff --git a/pdal/util/CMakeLists.txt b/pdal/util/CMakeLists.txt +index 19a2dd1..d498080 100644 +--- a/pdal/util/CMakeLists.txt ++++ b/pdal/util/CMakeLists.txt +@@ -8,6 +8,8 @@ endif() + + include(${PDAL_CMAKE_DIR}/execinfo.cmake) + ++find_package(Boost COMPONENTS system filesystem REQUIRED) ++ + set(PDAL_UTIL_SOURCES + "${PDAL_UTIL_DIR}/Bounds.cpp" + "${PDAL_UTIL_DIR}/Charbuf.cpp" +@@ -16,14 +18,14 @@ set(PDAL_UTIL_SOURCES + "${PDAL_UTIL_DIR}/Utils.cpp" + ) + +-PDAL_ADD_FREE_LIBRARY(${PDAL_UTIL_LIB_NAME} SHARED ${PDAL_UTIL_SOURCES}) ++PDAL_ADD_FREE_LIBRARY(${PDAL_UTIL_LIB_NAME} ${PDAL_UTIL_SOURCES}) + target_link_libraries(${PDAL_UTIL_LIB_NAME} + PRIVATE + ${EXECINFO_LIBRARY} +- ${PDAL_BOOST_LIB_NAME} ++ PUBLIC ++ Boost::system ++ Boost::filesystem + ) +-target_include_directories(${PDAL_UTIL_LIB_NAME} PRIVATE +- ${PDAL_VENDOR_DIR}/pdalboost) + + if (UNIX AND NOT APPLE) + target_link_libraries(${PDAL_UTIL_LIB_NAME} +diff --git a/pdal/util/FileUtils.cpp b/pdal/util/FileUtils.cpp +index 7679f22..b18b674 100644 +--- a/pdal/util/FileUtils.cpp ++++ b/pdal/util/FileUtils.cpp +@@ -124,19 +124,19 @@ std::ostream *createFile(std::string const& name, bool asBinary) + bool directoryExists(const std::string& dirname) + { + //ABELL - Seems we should be calling is_directory +- return pdalboost::filesystem::exists(dirname); ++ return boost::filesystem::exists(dirname); + } + + + bool createDirectory(const std::string& dirname) + { +- return pdalboost::filesystem::create_directory(dirname); ++ return boost::filesystem::create_directory(dirname); + } + + + void deleteDirectory(const std::string& dirname) + { +- pdalboost::filesystem::remove_all(dirname); ++ boost::filesystem::remove_all(dirname); + } + + +@@ -146,15 +146,15 @@ std::vector directoryList(const std::string& dir) + + try + { +- pdalboost::filesystem::directory_iterator it(dir); +- pdalboost::filesystem::directory_iterator end; ++ boost::filesystem::directory_iterator it(dir); ++ boost::filesystem::directory_iterator end; + while (it != end) + { + files.push_back(it->path().string()); + it++; + } + } +- catch (pdalboost::filesystem::filesystem_error) ++ catch (boost::filesystem::filesystem_error) + { + files.clear(); + } +@@ -194,13 +194,13 @@ void closeFile(std::istream* in) + + bool deleteFile(const std::string& file) + { +- return pdalboost::filesystem::remove(file); ++ return boost::filesystem::remove(file); + } + + + void renameFile(const std::string& dest, const std::string& src) + { +- pdalboost::filesystem::rename(src, dest); ++ boost::filesystem::rename(src, dest); + } + + +@@ -211,9 +211,9 @@ bool fileExists(const std::string& name) + + try + { +- return pdalboost::filesystem::exists(name); ++ return boost::filesystem::exists(name); + } +- catch (pdalboost::filesystem::filesystem_error) ++ catch (boost::filesystem::filesystem_error) + { + } + return false; +@@ -222,7 +222,7 @@ bool fileExists(const std::string& name) + + uintmax_t fileSize(const std::string& file) + { +- return pdalboost::filesystem::file_size(file); ++ return boost::filesystem::file_size(file); + } + + +@@ -243,7 +243,7 @@ std::string readFileIntoString(const std::string& filename) + + std::string getcwd() + { +- const pdalboost::filesystem::path p = pdalboost::filesystem::current_path(); ++ const boost::filesystem::path p = boost::filesystem::current_path(); + return addTrailingSlash(p.string()); + } + +@@ -271,7 +271,7 @@ std::string toAbsolutePath(const std::string& filename) + // otherwise, make it absolute (relative to current working dir) and return that + std::string toAbsolutePath(const std::string& filename) + { +- return pdalboost::filesystem::absolute(filename).string(); ++ return boost::filesystem::absolute(filename).string(); + } + + +@@ -283,7 +283,7 @@ std::string toAbsolutePath(const std::string& filename) + std::string toAbsolutePath(const std::string& filename, const std::string base) + { + const std::string newbase = toAbsolutePath(base); +- return pdalboost::filesystem::absolute(filename, newbase).string(); ++ return boost::filesystem::absolute(filename, newbase).string(); + } + + std::string getFilename(const std::string& path) +@@ -304,8 +304,8 @@ std::string getFilename(const std::string& path) + // Get the directory part of a filename. + std::string getDirectory(const std::string& path) + { +- const pdalboost::filesystem::path dir = +- pdalboost::filesystem::path(path).parent_path(); ++ const boost::filesystem::path dir = ++ boost::filesystem::path(path).parent_path(); + return addTrailingSlash(dir.string()); + } + +@@ -326,13 +326,13 @@ std::string stem(const std::string& path) + // Determine if the path represents a directory. + bool isDirectory(const std::string& path) + { +- return pdalboost::filesystem::is_directory(path); ++ return boost::filesystem::is_directory(path); + } + + // Determine if the path is an absolute path + bool isAbsolutePath(const std::string& path) + { +- return pdalboost::filesystem::path(path).is_absolute(); ++ return boost::filesystem::path(path).is_absolute(); + } + + diff --git a/ports/pdal/geotiff.patch b/ports/pdal/geotiff.patch new file mode 100644 index 00000000000000..00e376583d34b0 --- /dev/null +++ b/ports/pdal/geotiff.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/geotiff.cmake b/cmake/geotiff.cmake +index 1d1e8af..ec077bc 100644 +--- a/cmake/geotiff.cmake ++++ b/cmake/geotiff.cmake +@@ -2,8 +2,8 @@ + # GeoTIFF support + # + +-find_package(GeoTIFF REQUIRED 1.3.0) +-set_package_properties(GeoTIFF PROPERTIES TYPE REQUIRED) ++find_package(geotiff REQUIRED 1.3.0) ++set_package_properties(geotiff PROPERTIES TYPE REQUIRED) + if (GEOTIFF_FOUND) + include_directories("${GEOTIFF_INCLUDE_DIR}") + set(PDAL_HAVE_LIBGEOTIFF 1) diff --git a/ports/pdal/libpq.patch b/ports/pdal/libpq.patch new file mode 100644 index 00000000000000..3aac2188cd0f90 --- /dev/null +++ b/ports/pdal/libpq.patch @@ -0,0 +1,33 @@ +diff --git a/cmake/postgres.cmake b/cmake/postgres.cmake +index 0dad71069..32fdae2f8 100644 +--- a/cmake/postgres.cmake ++++ b/cmake/postgres.cmake +@@ -7,3 +7,27 @@ find_package(PostgreSQL REQUIRED) + mark_as_advanced(CLEAR POSTGRESQL_INCLUDE_DIR) + mark_as_advanced(CLEAR POSTGRESQL_LIBRARIES) + include_directories(${POSTGRESQL_INCLUDE_DIR}) ++ ++include(SelectLibraryConfigurations) ++ ++find_library(PostgreSQLCommon_LIBRARY_DEBUG ++NAMES libpgcommond pgcommond pgcommon libpgcommon ++NAMES_PER_DIR ++) ++find_library(PostgreSQLCommon_LIBRARY_RELEASE ++NAMES pgcommon libpgcommon ++NAMES_PER_DIR ++) ++select_library_configurations(PostgreSQLCommon) ++ ++find_library(PostgreSQLPort_LIBRARY_DEBUG ++NAMES pgportd libpgportd pgport libpgport ++NAMES_PER_DIR ++) ++find_library(PostgreSQLPort_LIBRARY_RELEASE ++NAMES pgport libpgport ++NAMES_PER_DIR ++) ++select_library_configurations(PostgreSQLPort) ++ ++list(APPEND POSTGRESQL_LIBRARIES ${PostgreSQLPort_LIBRARIES} ${PostgreSQLCommon_LIBRARIES}) +\ No newline at end of file diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake index 650849224f5c71..18d27a4c4b1cd2 100644 --- a/ports/pdal/portfile.cmake +++ b/ports/pdal/portfile.cmake @@ -1,10 +1,5 @@ -# vcpkg portfile.cmake for PDAL -# -# NOTE: update the version string for new PDAL release set(PDAL_VERSION_STR "1.7.1") -include(vcpkg_common_functions) - vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/pdal/PDAL-${PDAL_VERSION_STR}-src.tar.gz" FILENAME "PDAL-${PDAL_VERSION_STR}-src.tar.gz" @@ -18,7 +13,11 @@ vcpkg_extract_source_archive_ex( 0001-win32_compiler_options.cmake.patch 0002-no-source-dir-writes.patch 0003-fix-copy-vendor.patch - PDALConfig.patch + fix-dependency.patch + libpq.patch + fix-CPL_DLL.patch + 0004-fix-const-overloaded.patch + geotiff.patch ) file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") @@ -34,13 +33,7 @@ foreach(_module IN ITEMS FindGEOS) # Overwritten Modules. ) endforeach() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(VCPKG_BUILD_SHARED_LIBS ON) - set(VCPKG_BUILD_STATIC_LIBS OFF) -else() - set(VCPKG_BUILD_SHARED_LIBS OFF) - set(VCPKG_BUILD_STATIC_LIBS ON) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" VCPKG_BUILD_STATIC_LIBS) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -55,11 +48,6 @@ vcpkg_install_cmake(ADD_BIN_TO_PATH) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pdal/cmake) vcpkg_copy_pdbs() -# Install copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdal RENAME copyright -) - # Install PDAL executable file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(COPY ${_pdal_apps} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pdal) @@ -84,3 +72,5 @@ else() file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(REMOVE ${_pdal_apps}) endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pdal/vcpkg.json b/ports/pdal/vcpkg.json new file mode 100644 index 00000000000000..cdcbd4e7c22865 --- /dev/null +++ b/ports/pdal/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "pdal", + "version-string": "1.7.1", + "port-version": 12, + "description": "PDAL - Point Data Abstraction Library is a library for manipulating point cloud data.", + "dependencies": [ + "boost-filesystem", + "boost-system", + "gdal", + "geos", + "jsoncpp", + "laszip", + "libgeotiff" + ] +} diff --git a/ports/pdcurses/CONTROL b/ports/pdcurses/CONTROL deleted file mode 100644 index 3ea97de0b087dd..00000000000000 --- a/ports/pdcurses/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pdcurses -Version: 3.8 -Homepage: https://sourceforge.net/projects/pdcurses/ -Description: Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model. diff --git a/ports/pdcurses/portfile.cmake b/ports/pdcurses/portfile.cmake index 72c54e403ccc12..81b201c1b61b17 100644 --- a/ports/pdcurses/portfile.cmake +++ b/ports/pdcurses/portfile.cmake @@ -1,34 +1,19 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_CRT) -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "PDCurses only supports dynamic CRT linkage") -endif() - -include(vcpkg_common_functions) find_program(NMAKE nmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wmcbrine/PDCurses - REF 2467ab2b6c07163d0171b80ad6c252c29da28173 - SHA512 4d729a4e0ffa1b5d1fd35ed73329d08886e1e565936a008cd7b45f8e5fbaabcb86c65377fd1e33acef6271f828cd4158e8a56ed15cd664b2a8c8e1d66cf8c00a + REF 6c1f95c4fa9f9f105879c2d99dd72a5bf335c046 # 3.9 + SHA512 2d682a3516baaa58a97854aca64d985768b7af76d998240b54afc57ddf2a44894835a1748888f8dd7c1cc8045ede77488284f8adf1b73878879b4b4d3391218d HEAD_REF master ) -file(REMOVE_RECURSE - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} -) - -file(GLOB SOURCES ${SOURCE_PATH}/*) - -file(COPY ${SOURCES} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) - -set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") - -set(PDC_NMAKE_CMD ${NMAKE} /A -f ${SOURCE_PATH}/wincon/Makefile.vc WIDE=Y UTF8=Y) +set(PDC_NMAKE_CMD ${NMAKE} /A -f ${SOURCE_PATH}/wincon/Makefile.vc WIDE=Y UTF8=Y) - -set(PDC_NMAKE_CWD ${SOURCE_PATH}/wincon) -set(PDC_PDCLIB ${SOURCE_PATH}/wincon/pdcurses) +set(PDC_NMAKE_CWD ${SOURCE_PATH}/wincon) +set(PDC_PDCLIB ${SOURCE_PATH}/wincon/pdcurses) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(PDC_NMAKE_CMD ${PDC_NMAKE_CMD} DLL=Y) @@ -62,20 +47,27 @@ vcpkg_execute_required_process( message(STATUS "Build ${TARGET_TRIPLET}-dbg done") file ( - COPY ${PDC_PDCLIB}.lib + INSTALL ${PDC_PDCLIB}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file ( - COPY ${PDC_PDCLIB}.dll + INSTALL ${PDC_PDCLIB}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) endif() file( - COPY ${SOURCE_PATH}/curses.h ${SOURCE_PATH}/panel.h + INSTALL ${SOURCE_PATH}/curses.h ${SOURCE_PATH}/panel.h DESTINATION ${CURRENT_PACKAGES_DIR}/include ) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(READ ${CURRENT_PACKAGES_DIR}/include/curses.h _contents) + string(REPLACE "#ifdef PDC_DLL_BUILD" "#if 1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/curses.h "${_contents}") +endif() + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdcurses RENAME copyright) -vcpkg_copy_pdbs() +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/pdcurses/vcpkg.json b/ports/pdcurses/vcpkg.json new file mode 100644 index 00000000000000..55ae1a1d9e7a2d --- /dev/null +++ b/ports/pdcurses/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pdcurses", + "version-string": "3.9", + "port-version": 1, + "description": "Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model.", + "homepage": "https://sourceforge.net/projects/pdcurses/" +} diff --git a/ports/pdqsort/CONTROL b/ports/pdqsort/CONTROL deleted file mode 100644 index 6d1d9e6601b8d7..00000000000000 --- a/ports/pdqsort/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pdqsort -Version: 2019-07-30 -Homepage: https://github.com/orlp/pdqsort -Description: Pattern-defeating quicksort (pdqsort) is a novel sorting algorithm diff --git a/ports/pdqsort/portfile.cmake b/ports/pdqsort/portfile.cmake index a9c6a92118e9be..9e4c3e798a28b5 100644 --- a/ports/pdqsort/portfile.cmake +++ b/ports/pdqsort/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO orlp/pdqsort diff --git a/ports/pdqsort/vcpkg.json b/ports/pdqsort/vcpkg.json new file mode 100644 index 00000000000000..60a5647ea36fbb --- /dev/null +++ b/ports/pdqsort/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pdqsort", + "version-string": "2019-07-30", + "port-version": 1, + "description": "Pattern-defeating quicksort (pdqsort) is a novel sorting algorithm", + "homepage": "https://github.com/orlp/pdqsort" +} diff --git a/ports/pe-parse/portfile.cmake b/ports/pe-parse/portfile.cmake new file mode 100644 index 00000000000000..f0dc4de83a4f1e --- /dev/null +++ b/ports/pe-parse/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO trailofbits/pe-parse + REF v1.2.0 + SHA512 916ec515585ba1e83e2c6ae29667fd25bd4cac90c39e587ae6847dc9d503186e8853bd80f4e2a99177a3214f5c51eceff85fa610cadbc2bc1d3a79251e8ce942 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_COMMAND_LINE_TOOLS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/pe-parse TARGET_PATH share/pe-parse) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file( + INSTALL + "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/pe-parse" + RENAME copyright +) diff --git a/ports/pe-parse/vcpkg.json b/ports/pe-parse/vcpkg.json new file mode 100644 index 00000000000000..9243b0eb3362fe --- /dev/null +++ b/ports/pe-parse/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "pe-parse", + "version-string": "1.2.0", + "port-version": 1, + "description": "pe-parse is a principled, lightweight C/C++ PE parser", + "homepage": "https://github.com/trailofbits/pe-parse", + "supports": "!uwp" +} diff --git a/ports/pegtl-2/CONTROL b/ports/pegtl-2/CONTROL deleted file mode 100644 index fcbcd3bbafee99..00000000000000 --- a/ports/pegtl-2/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: pegtl-2 -Version: 2.8.0 -Description: The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG). This version maintains compatibility with C++11. diff --git a/ports/pegtl-2/portfile.cmake b/ports/pegtl-2/portfile.cmake index 79d6bb97e5642c..554f50c5c2b7f7 100644 --- a/ports/pegtl-2/portfile.cmake +++ b/ports/pegtl-2/portfile.cmake @@ -1,9 +1,8 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO taocpp/pegtl - REF 2.8.0 - SHA512 1652b0061cd4cbd0e687855ee2e61e97d020606c54329de8769c3a3f411002323900c11eaf0da28e107c17e269025f577f9205b7500c5bbb16502687be8ee77b + REF 47e878ad4fd72c91253c9d47b6f17e001ca2dfcf # 2.8.3 + SHA512 c7761e36dd28914d89a2d5e2a5ce5ea84bab50b7f7ad235b18dbeca41a675503b00b0fe152247515f81ec380f3c68cf827e667cb3b9a7e34c6d2f5dd60fb4106 HEAD_REF master ) @@ -25,7 +24,8 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/pegtl-2/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pegtl-2/LICENSE ${CURRENT_PACKAGES_DIR}/share/pegtl-2/copyright) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) # Handle collision with latest pegtl -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pegtl-2/pegtl-config.cmake ${CURRENT_PACKAGES_DIR}/share/pegtl-2/pegtl-2-config.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/pegtl-config.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/pegtl-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config-version.cmake) diff --git a/ports/pegtl-2/vcpkg.json b/ports/pegtl-2/vcpkg.json new file mode 100644 index 00000000000000..55ee5e69f1e1bc --- /dev/null +++ b/ports/pegtl-2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pegtl-2", + "version-string": "2.8.3", + "port-version": 1, + "description": "The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG). This version maintains compatibility with C++11.", + "homepage": "https://github.com/taocpp/PEGTL" +} diff --git a/ports/pegtl/CONTROL b/ports/pegtl/CONTROL deleted file mode 100644 index 52906a8c16e191..00000000000000 --- a/ports/pegtl/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: pegtl -Version: 3.0.0-pre-697aaa0 -Description: The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG). diff --git a/ports/pegtl/portfile.cmake b/ports/pegtl/portfile.cmake index 3e3f92f97a3d5b..265f596c4f2675 100644 --- a/ports/pegtl/portfile.cmake +++ b/ports/pegtl/portfile.cmake @@ -1,9 +1,8 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO taocpp/pegtl - REF 697aaa06564c6ea9d13f95de081a2d2d46b39160 - SHA512 453821966526569a2d1842ec0bebe6f65dee0241d6ab7d38255726243326356b6a972bf5ca58168e94f51dd87c74ce17fdefffd19fe67570fe9dc52f1f6a4f16 + REF 3.2.0 + SHA512 3ec457e37d87d95f3a89c550abbf611a1ce094c2f05f6d23086e70079a9cabddb4c75e9121e764ad1768845a39e62ab49ca658ffed0f09d0e9a0e36501a162ae HEAD_REF master ) @@ -24,4 +23,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/pegtl/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pegtl/LICENSE ${CURRENT_PACKAGES_DIR}/share/pegtl/copyright) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/pegtl/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/pegtl/vcpkg.json b/ports/pegtl/vcpkg.json new file mode 100644 index 00000000000000..0a56f3f726d460 --- /dev/null +++ b/ports/pegtl/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pegtl", + "version-string": "3.2.0", + "port-version": 1, + "description": "The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG).", + "homepage": "https://github.com/taocpp/PEGTL" +} diff --git a/ports/pfring/makefile.patch b/ports/pfring/makefile.patch new file mode 100644 index 00000000000000..cc17fb1f7f2db8 --- /dev/null +++ b/ports/pfring/makefile.patch @@ -0,0 +1,59 @@ +diff --git a/Makefile b/Makefile +index 4b377c628..39cbf5cb4 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,10 +1,12 @@ + all: +- cd kernel; make +- cd userland; ./configure; make +- cd drivers; make ++ $(MAKE) -C kernel; ++ #cd kernel; make ++ cd userland; ./configure; ++ $(MAKE) -C userland; ++ $(MAKE) -C drivers; + + install: +- cd userland; make install ++ $(MAKE) install -C userland; + + clean: + -cd kernel; make clean +diff --git a/userland/Makefile b/userland/Makefile +index 959470c0f..e35ca8de7 100644 +--- a/userland/Makefile ++++ b/userland/Makefile +@@ -9,22 +9,22 @@ lib/Makefile: + config: lib/Makefile + + libpfring: config +- cd lib; make ++ $(MAKE) -C lib + + build_nbpf: config +- cd nbpf; make ++ $(MAKE) -C nbpf + + build_c++: libpfring +- cd c++; make ++ $(MAKE) -C c++ + + tcpdump/Makefile: + cd tcpdump; ./configure --with_system_libpcap=yes + + build_tcpdump: libpfring tcpdump/Makefile +- cd tcpdump; make ++ $(MAKE) -C tcpdump + + build_extcap: libpfring +- cd wireshark/extcap; make ++ $(MAKE) -C wireshark/extcap + + ################### + +@@ -46,4 +46,4 @@ extcap_clean: + cd wireshark/extcap; make clean + + install: libpfring +- cd lib; make install ++ $(MAKE) -C lib install diff --git a/ports/pfring/portfile.cmake b/ports/pfring/portfile.cmake new file mode 100644 index 00000000000000..967bdc5eebb5f8 --- /dev/null +++ b/ports/pfring/portfile.cmake @@ -0,0 +1,65 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux and Mac platforms" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ntop/PF_RING + REF 582fa09bc58411cfe6f27facd7e6438924f779d2 + SHA512 78dd2d2f9df259483196905f80a904534632a835f742d1f8b3ad645ea80f2dad78356960a2b35e2678525786a7344fa248b708bd3f86101c43fb36c7abc05598 + HEAD_REF dev + PATCHES + use-vcpkg-libpcap.patch + makefile.patch +) + +file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY "${SOURCE_PATH}/" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY "${SOURCE_PATH}/" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +endif() +set(ENV{VCPKG_LIBPCAP_DIR} "${CURRENT_INSTALLED_DIR}") +vcpkg_build_make() +vcpkg_fixup_pkgconfig() + +vcpkg_copy_pdbs() + +# Install manually because pfring cannot set prefix +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + if (VCPKG_BUILD_TYPE STREQUAL debug) + file(GLOB_RECURSE PFRING_KO_FILES "${PFRING_OBJ_DIR}/*.ko") + file(INSTALL ${PFRING_KO_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}) + + file(INSTALL ${SOURCE_PATH}/userland/lib/pfring.h DESTINATION ${CURRENT_PACKAGES_DIR}/debug/include) + endif() + + file(GLOB_RECURSE PFRING_LIBS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") + file(INSTALL ${PFRING_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB_RECURSE PFRING_DLLS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + file(INSTALL ${PFRING_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +endif() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + + file(GLOB_RECURSE PFRING_KO_FILES "${PFRING_OBJ_DIR}/*.ko") + file(INSTALL ${PFRING_KO_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + + file(GLOB_RECURSE PFRING_LIBS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") + file(INSTALL ${PFRING_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB_RECURSE PFRING_DLLS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + file(INSTALL ${PFRING_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + + file(INSTALL ${SOURCE_PATH}/userland/lib/pfring.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +endif() + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pfring/use-vcpkg-libpcap.patch b/ports/pfring/use-vcpkg-libpcap.patch new file mode 100644 index 00000000000000..e005442bf7c350 --- /dev/null +++ b/ports/pfring/use-vcpkg-libpcap.patch @@ -0,0 +1,146 @@ +diff --git a/userland/Makefile b/userland/Makefile +index d5392c09..959470c0 100644 +--- a/userland/Makefile ++++ b/userland/Makefile +@@ -1,4 +1,4 @@ +-all: libpfring pcap build_examples build_examples_zc build_examples_ft build_extcap ++all: libpfring build_extcap + # build_tcpdump build_c++ + + ################### +@@ -14,52 +14,25 @@ libpfring: config + build_nbpf: config + cd nbpf; make + +-libpcap/Makefile: +- cd libpcap; ./configure --enable-ipv6 --enable-dbus=no --without-libnl --with-snf=no --disable-bluetooth --disable-canusb --with-dag=no +- +-pcap: libpfring libpcap/Makefile +- cd libpcap; make +- +-build_examples: config +- cd examples; make +- +-build_examples_zc: config +- cd examples_zc; make +- +-build_examples_ft: config +- cd examples_ft; make +- + build_c++: libpfring + cd c++; make + + tcpdump/Makefile: +- cd tcpdump; ./configure ++ cd tcpdump; ./configure --with_system_libpcap=yes + +-build_tcpdump: libpfring pcap tcpdump/Makefile ++build_tcpdump: libpfring tcpdump/Makefile + cd tcpdump; make + +-build_extcap: libpfring pcap ++build_extcap: libpfring + cd wireshark/extcap; make + + ################### + +-clean: libpfring_clean pcap_clean examples_clean examples_ft_clean examples_zc_clean c++_clean tcpdump_clean nbpf_clean extcap_clean ++clean: libpfring_clean c++_clean tcpdump_clean nbpf_clean extcap_clean + + libpfring_clean: + cd lib; make clean + +-pcap_clean: +- if test -f libpcap/config.status; then cd libpcap; make clean; fi +- +-examples_clean: +- cd examples; make clean +- +-examples_zc_clean: +- cd examples_zc; make clean +- +-examples_ft_clean: +- cd examples_ft; make clean +- + c++_clean: + cd c++; make clean + +@@ -72,8 +45,5 @@ nbpf_clean: + extcap_clean: + cd wireshark/extcap; make clean + +-install: libpfring pcap examples examples_zc examples_ft ++install: libpfring + cd lib; make install +- cd libpcap; make install +- cd examples; make install +- cd examples_zc; make install +diff --git a/userland/c++/Makefile.in b/userland/c++/Makefile.in +index 02bf5164..b0442d84 100644 +--- a/userland/c++/Makefile.in ++++ b/userland/c++/Makefile.in +@@ -1,8 +1,7 @@ + CPP=g++ -g + + KERNEL_DIR=../../kernel +-LIBPCAP_DIR=../libpcap +-INCLUDE=-I$(KERNEL_DIR) -I$(LIBPCAP_DIR) -I../lib `../lib/pfring_config --include` ++INCLUDE=-I$(KERNEL_DIR) -I$(VCPKG_LIBPCAP_DIR)/include -I../lib `../lib/pfring_config --include` + LIBPFRING_CPP=libpfring_cpp.a + RANLIB=ranlib + OBJ=PFring.o +@@ -11,7 +10,7 @@ LIBS=../lib/libpfring.a `../lib/pfring_config --libs` -lpthread + all: $(LIBPFRING_CPP) pf_test + + pf_test: pf_test.cpp $(LIBPFRING_CPP) +- $(CPP) $(INCLUDE) $< $(LIBPFRING_CPP) -o $@ $(LIBS) $(LIBPCAP_DIR)/libpcap.a @SYSLIBS@ ++ $(CPP) $(INCLUDE) $< $(LIBPFRING_CPP) -o $@ $(LIBS) $(VCPKG_LIBPCAP_DIR)/lib/libpcap.a @SYSLIBS@ + + $(LIBPFRING_CPP): $(OBJ) + @rm -f $@ +diff --git a/userland/snort/pfring-daq-module-zc/Makefile.am b/userland/snort/pfring-daq-module-zc/Makefile.am +index 7123de18..45998688 100644 +--- a/userland/snort/pfring-daq-module-zc/Makefile.am ++++ b/userland/snort/pfring-daq-module-zc/Makefile.am +@@ -4,5 +4,5 @@ ACLOCAL_AMFLAGS = -I m4 + + pkglib_LTLIBRARIES = daq_pfring_zc.la + daq_pfring_zc_la_SOURCES = daq_pfring_zc.c +-daq_pfring_zc_la_CFLAGS = -DBUILDING_SO -I../../libpcap +-daq_pfring_zc_la_LDFLAGS = -module -export-dynamic -avoid-version -shared -lrt ../../libpcap/libpcap.a ++daq_pfring_zc_la_CFLAGS = -DBUILDING_SO -I${VCPKG_LIBPCAP_DIR}/include ++daq_pfring_zc_la_LDFLAGS = -module -export-dynamic -avoid-version -shared -lrt ${VCPKG_LIBPCAP_DIR}/lib/libpcap.a +diff --git a/userland/tcpdump-4.9.2/Makefile.in b/userland/tcpdump-4.9.2/Makefile.in +index e2c74d13..47d9e2cc 100644 +--- a/userland/tcpdump-4.9.2/Makefile.in ++++ b/userland/tcpdump-4.9.2/Makefile.in +@@ -373,7 +373,7 @@ TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -t + + all: $(PROG) $(LIBNETDISSECT) + +-$(PROG): $(OBJ) @V_PCAPDEP@ ++$(PROG): $(OBJ) $(VCPKG_LIBPCAP_DIR)/lib/libpcap.a + @rm -f $@ + $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) + +diff --git a/userland/wireshark/extcap/Makefile.in b/userland/wireshark/extcap/Makefile.in +index 970b9680..3e34ccc8 100644 +--- a/userland/wireshark/extcap/Makefile.in ++++ b/userland/wireshark/extcap/Makefile.in +@@ -20,14 +20,13 @@ LIBPFRING = ${PFRINGDIR}/libpfring.a + # + O_FLAG = -O2 -DHAVE_PF_RING + EXTRA_LIBS = +-PCAPDIR = ../../libpcap +-LIBPCAP = ${PCAPDIR}/libpcap.a ${EXTRA_LIBS} ++LIBPCAP = ${VCPKG_LIBPCAP_DIR}/lib/libpcap.a ${EXTRA_LIBS} + + # + # Search directories + # + PFRING_KERNEL=../../../kernel +-INCLUDE = -I${PFRING_KERNEL} -I${PFRINGDIR} -I${PCAPDIR} -Ithird-party `../../lib/pfring_config --include` ++INCLUDE = -I${PFRING_KERNEL} -I${PFRINGDIR} -I${VCPKG_LIBPCAP_DIR}/include -Ithird-party `../../lib/pfring_config --include` + + # + # C compiler and flags diff --git a/ports/pfring/vcpkg.json b/ports/pfring/vcpkg.json new file mode 100644 index 00000000000000..9e78c638bb5dd9 --- /dev/null +++ b/ports/pfring/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "pfring", + "version-string": "2019-10-17", + "port-version": 3, + "description": "PF_RINGâ„¢ is a Linux kernel module and user-space framework that allows you to process packets at high-rates while providing you a consistent API for packet processing applications.", + "homepage": "https://github.com/ntop/PF_RING", + "dependencies": [ + "libpcap" + ] +} diff --git a/ports/pfultz2-linq/CONTROL b/ports/pfultz2-linq/CONTROL deleted file mode 100644 index e8185c327d570e..00000000000000 --- a/ports/pfultz2-linq/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pfultz2-linq -Version: 2019-05-14 -Description: Linq for list comprehension in C++ -Build-Depends: boost-fusion, boost-iterator, boost-mpl, boost-optional, boost-preprocessor, boost-range, boost-static-assert, boost-type-traits, boost-unordered, boost-utility diff --git a/ports/pfultz2-linq/portfile.cmake b/ports/pfultz2-linq/portfile.cmake index de0980b6ac1643..d3eeff7c439f55 100644 --- a/ports/pfultz2-linq/portfile.cmake +++ b/ports/pfultz2-linq/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pfultz2/Linq @@ -25,6 +23,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME linq) diff --git a/ports/pfultz2-linq/vcpkg.json b/ports/pfultz2-linq/vcpkg.json new file mode 100644 index 00000000000000..768c6118bca652 --- /dev/null +++ b/ports/pfultz2-linq/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "pfultz2-linq", + "version-string": "2019-05-14", + "port-version": 1, + "description": "Linq for list comprehension in C++", + "dependencies": [ + "boost-fusion", + "boost-iterator", + "boost-mpl", + "boost-optional", + "boost-preprocessor", + "boost-range", + "boost-static-assert", + "boost-type-traits", + "boost-unordered", + "boost-utility" + ] +} diff --git a/ports/phnt/portfile.cmake b/ports/phnt/portfile.cmake new file mode 100644 index 00000000000000..78f6a86c292c54 --- /dev/null +++ b/ports/phnt/portfile.cmake @@ -0,0 +1,12 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO processhacker/phnt + REF 3f19efe9fd402378c7cd12fe1c0aacd154c8cd3c + SHA512 88f1f5ab1f2c8b3100e47f43cee7bdcb412ef9f688e3840ddc8a78d8b75b4baf714aadc27829e0ea95d97a22031019d25f9916d09bb63cea37304e9c9c08285a + HEAD_REF master +) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) \ No newline at end of file diff --git a/ports/phnt/vcpkg.json b/ports/phnt/vcpkg.json new file mode 100644 index 00000000000000..cc10293aa754d7 --- /dev/null +++ b/ports/phnt/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "phnt", + "version-date": "2020-12-21", + "description": "Windows Native API header files", + "homepage": "https://github.com/processhacker/phnt" +} diff --git a/ports/physfs/001-fix-lzmasdk-arm64-windows.patch b/ports/physfs/001-fix-lzmasdk-arm64-windows.patch new file mode 100644 index 00000000000000..0fad2b58007f69 --- /dev/null +++ b/ports/physfs/001-fix-lzmasdk-arm64-windows.patch @@ -0,0 +1,20 @@ +diff --git a/src/physfs_lzmasdk.h b/src/physfs_lzmasdk.h +--- a/src/physfs_lzmasdk.h ++++ b/src/physfs_lzmasdk.h +@@ -506,6 +506,7 @@ MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned mem + #endif + + #if defined(MY_CPU_AMD64) \ ++ || defined(_M_ARM64) \ + || defined(_M_IA64) \ + || defined(__AARCH64EL__) \ + || defined(__AARCH64EB__) +@@ -531,6 +532,8 @@ MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned mem + + #if defined(_WIN32) && defined(_M_ARM) + #define MY_CPU_ARM_LE ++#elif defined(_WIN64) && defined(_M_ARM64) ++#define MY_CPU_ARM_LE + #endif + + #if defined(_WIN32) && defined(_M_IA64) diff --git a/ports/physfs/002-fix-posix-eintr.patch b/ports/physfs/002-fix-posix-eintr.patch new file mode 100644 index 00000000000000..08d314af1c142e --- /dev/null +++ b/ports/physfs/002-fix-posix-eintr.patch @@ -0,0 +1,73 @@ +diff --git a/src/physfs_platform_posix.c b/src/physfs_platform_posix.c +--- a/src/physfs_platform_posix.c ++++ b/src/physfs_platform_posix.c +@@ -6,8 +6,6 @@ + * This file written by Ryan C. Gordon. + */ + +-/* !!! FIXME: check for EINTR? */ +- + #define __PHYSICSFS_INTERNAL__ + #include "physfs_platforms.h" + +@@ -167,7 +165,9 @@ static void *doOpen(const char *filename, int mode) + /* O_APPEND doesn't actually behave as we'd like. */ + mode &= ~O_APPEND; + +- fd = open(filename, mode, S_IRUSR | S_IWUSR); ++ do { ++ fd = open(filename, mode, S_IRUSR | S_IWUSR); ++ } while ((fd < 0) && (errno == EINTR)); + BAIL_IF(fd < 0, errcodeFromErrno(), NULL); + + if (appending) +@@ -219,7 +219,9 @@ PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buffer, + if (!__PHYSFS_ui64FitsAddressSpace(len)) + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); + +- rc = read(fd, buffer, (size_t) len); ++ do { ++ rc = read(fd, buffer, (size_t) len); ++ } while ((rc == -1) && (errno == EINTR)); + BAIL_IF(rc == -1, errcodeFromErrno(), -1); + assert(rc >= 0); + assert(rc <= len); +@@ -236,7 +238,9 @@ PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, + if (!__PHYSFS_ui64FitsAddressSpace(len)) + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); + +- rc = write(fd, (void *) buffer, (size_t) len); ++ do { ++ rc = write(fd, (void *) buffer, (size_t) len); ++ } while ((rc == -1) && (errno == EINTR)); + BAIL_IF(rc == -1, errcodeFromErrno(), rc); + assert(rc >= 0); + assert(rc <= len); +@@ -275,8 +279,13 @@ PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) + int __PHYSFS_platformFlush(void *opaque) + { + const int fd = *((int *) opaque); +- if ((fcntl(fd, F_GETFL) & O_ACCMODE) != O_RDONLY) +- BAIL_IF(fsync(fd) == -1, errcodeFromErrno(), 0); ++ int rc = -1; ++ if ((fcntl(fd, F_GETFL) & O_ACCMODE) != O_RDONLY) { ++ do { ++ rc = fsync(fd); ++ } while ((rc == -1) && (errno == EINTR)); ++ BAIL_IF(rc == -1, errcodeFromErrno(), 0); ++ } + return 1; + } /* __PHYSFS_platformFlush */ + +@@ -284,7 +293,10 @@ int __PHYSFS_platformFlush(void *opaque) + void __PHYSFS_platformClose(void *opaque) + { + const int fd = *((int *) opaque); +- (void) close(fd); /* we don't check this. You should have used flush! */ ++ int rc = -1; ++ do { ++ rc = close(fd); /* we don't check this. You should have used flush! */ ++ } while ((rc == -1) && (errno == EINTR)); + allocator.Free(opaque); + } /* __PHYSFS_platformClose */ + diff --git a/ports/physfs/003-fix-posix-cloexec.patch b/ports/physfs/003-fix-posix-cloexec.patch new file mode 100644 index 00000000000000..6ff2114a5e7529 --- /dev/null +++ b/ports/physfs/003-fix-posix-cloexec.patch @@ -0,0 +1,34 @@ +diff --git a/src/physfs_platform_posix.c b/src/physfs_platform_posix.c +--- a/src/physfs_platform_posix.c ++++ b/src/physfs_platform_posix.c +@@ -160,16 +160,30 @@ static void *doOpen(const char *filename, int mode) + const int appending = (mode & O_APPEND); + int fd; + int *retval; ++ int flags; ++ flags = -1; + errno = 0; + + /* O_APPEND doesn't actually behave as we'd like. */ + mode &= ~O_APPEND; ++ ++#ifdef O_CLOEXEC ++ /* Add O_CLOEXEC if defined */ ++ mode |= O_CLOEXEC; ++#endif + + do { + fd = open(filename, mode, S_IRUSR | S_IWUSR); + } while ((fd < 0) && (errno == EINTR)); + BAIL_IF(fd < 0, errcodeFromErrno(), NULL); + ++#if !defined(O_CLOEXEC) && defined(FD_CLOEXEC) ++ flags = fcntl(fd, F_GETFD); ++ if (flags != -1) { ++ fcntl(fd, F_SETFD, flags | FD_CLOEXEC); ++ } ++#endif ++ + if (appending) + { + if (lseek(fd, 0, SEEK_END) < 0) diff --git a/ports/physfs/CONTROL b/ports/physfs/CONTROL deleted file mode 100644 index 07b90bcdf000cb..00000000000000 --- a/ports/physfs/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: physfs -Version: 3.0.2 -Homepage: https://icculus.org/physfs/ -Description: a library to provide abstract access to various archives -Build-Depends: zlib diff --git a/ports/physfs/portfile.cmake b/ports/physfs/portfile.cmake index 92f1cd4eecf0cb..879a2b0e0f14a7 100644 --- a/ports/physfs/portfile.cmake +++ b/ports/physfs/portfile.cmake @@ -1,34 +1,38 @@ -include(vcpkg_common_functions) set(PHYSFS_VERSION 3.0.2) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/physfs-${PHYSFS_VERSION}) + vcpkg_download_distfile(ARCHIVE URLS "https://icculus.org/physfs/downloads/physfs-${PHYSFS_VERSION}.tar.bz2" + "https://hg.icculus.org/icculus/physfs/archive/release-${PHYSFS_VERSION}.tar.bz2" FILENAME "physfs-${PHYSFS_VERSION}.tar.bz2" SHA512 4024b6c3348e0b6fc1036aac330192112dfe17de3e3d14773be9f06e9a062df5a1006869f21162b4e0b584989f463788a35e64186b1913225c073fea62754472 ) + vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${PHYSFS_VERSION} + PATCHES + "001-fix-lzmasdk-arm64-windows.patch" + "002-fix-posix-eintr.patch" # Remove this patch in the next update + "003-fix-posix-cloexec.patch" # Remove this patch in the next update ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS + OPTIONS -DPHYSFS_BUILD_STATIC=${PHYSFS_STATIC} -DPHYSFS_BUILD_SHARED=${PHYSFS_SHARED} -DPHYSFS_BUILD_TEST=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/physfs) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/physfs/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/physfs/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/physfs/vcpkg.json b/ports/physfs/vcpkg.json new file mode 100644 index 00000000000000..b740565cafc632 --- /dev/null +++ b/ports/physfs/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "physfs", + "version-semver": "3.0.2", + "port-version": 6, + "description": "a library to provide abstract access to various archives", + "homepage": "https://icculus.org/physfs/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + "zlib" + ] +} diff --git a/ports/physx/CONTROL b/ports/physx/CONTROL deleted file mode 100644 index 5d2e858966f1da..00000000000000 --- a/ports/physx/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: physx -Version: 4.1.1-1 -Description: The NVIDIA PhysX SDK is a scalable multi-platform physics solution supporting a wide range of devices, from smartphones to high-end multicore CPUs and GPUs diff --git a/ports/physx/fix-compiler-flag.patch b/ports/physx/fix-compiler-flag.patch new file mode 100644 index 00000000000000..cfb253e7e1c6e3 --- /dev/null +++ b/ports/physx/fix-compiler-flag.patch @@ -0,0 +1,58 @@ +diff --git a/physx/compiler/public/CMakeLists.txt b/physx/compiler/public/CMakeLists.txt +index 77776ca7..bd7b496d 100644 +--- a/physx/compiler/public/CMakeLists.txt ++++ b/physx/compiler/public/CMakeLists.txt +@@ -33,6 +33,8 @@ ENDIF() + + project(PhysXSDK C CXX) + ++SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE INTERNAL "PhysX Debug CXX Flags") ++ + OPTION(PX_BUILDSNIPPETS "Generate the snippets" OFF) + OPTION(PX_BUILDPUBLICSAMPLES "Generate the samples" OFF) + OPTION(PX_CMAKE_SUPPRESS_REGENERATION "Disable zero_check projects" OFF) +diff --git a/physx/source/compiler/cmake/uwp/CMakeLists.txt b/physx/source/compiler/cmake/uwp/CMakeLists.txt +index 20dcb6ae..c7e03c3e 100644 +--- a/physx/source/compiler/cmake/uwp/CMakeLists.txt ++++ b/physx/source/compiler/cmake/uwp/CMakeLists.txt +@@ -39,11 +39,13 @@ ELSE() + ENDIF() + + # Cache the CXX flags so the other CMakeLists.txt can use them if needed +-SET(PHYSX_CXX_FLAGS "/Wall /d2Zi+ /MP /WX /W4 /GF /GS- /GR- /Gd ${PHYSX_FP_MODE} ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") ++SET(PHYSX_CXX_FLAGS "${PHYSX_CXX_FLAGS} ${PHYSX_FP_MODE} ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") ++if(FALSE) + SET(PHYSX_CXX_FLAGS_DEBUG "/Od ${WINCRT_DEBUG} /Zi" CACHE INTERNAL "PhysX Debug CXX Flags") + SET(PHYSX_CXX_FLAGS_CHECKED "/O2 ${WINCRT_NDEBUG} /Zi" CACHE INTERNAL "PhysX Checked CXX Flags") + SET(PHYSX_CXX_FLAGS_PROFILE "/O2 ${WINCRT_NDEBUG} /Zi" CACHE INTERNAL "PhysX Profile CXX Flags") + SET(PHYSX_CXX_FLAGS_RELEASE "/O2 ${WINCRT_NDEBUG} /Zi" CACHE INTERNAL "PhysX Release CXX Flags") ++endif() + + # These flags are local to the directory the CMakeLists.txt is in, so don't get carried over to OTHER CMakeLists.txt (thus the CACHE variables above) + SET(CMAKE_CXX_FLAGS ${PHYSX_CXX_FLAGS}) +diff --git a/physx/source/compiler/cmake/windows/CMakeLists.txt b/physx/source/compiler/cmake/windows/CMakeLists.txt +index a1ab3596..dbd20fb0 100644 +--- a/physx/source/compiler/cmake/windows/CMakeLists.txt ++++ b/physx/source/compiler/cmake/windows/CMakeLists.txt +@@ -41,17 +41,19 @@ ELSE() + SET(PHYSX_FP_MODE "/fp:fast") + ENDIF() + IF(CMAKE_CL_64) +- SET(PHYSX_CXX_FLAGS "/d2Zi+ /MP /WX /W4 /GF /GS- /GR- /Gd ${PHYSX_FP_MODE} /Oy ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") ++ SET(PHYSX_CXX_FLAGS "${PHYSX_CXX_FLAGS} ${PHYSX_FP_MODE} ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") + ELSE() +- SET(PHYSX_CXX_FLAGS "/arch:SSE2 /d2Zi+ /MP /WX /W4 /GF /GS- /GR- /Gd ${PHYSX_FP_MODE} /Oy ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") ++ SET(PHYSX_CXX_FLAGS "${PHYSX_CXX_FLAGS} /arch:SSE2 ${PHYSX_FP_MODE} ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") + ENDIF() + ++if(FALSE) + SET(PHYSX_CXX_FLAGS_DEBUG "/Od ${WINCRT_DEBUG} /RTCu /Zi" CACHE INTERNAL "PhysX Debug CXX Flags") + # PT: changed /Ox to /O2 because "the /Ox compiler option enables only a subset of the speed optimization options enabled by /O2." + # See https://docs.microsoft.com/en-us/cpp/build/reference/ox-full-optimization?view=vs-2019 + SET(PHYSX_CXX_FLAGS_CHECKED "/O2 ${WINCRT_NDEBUG} /Zi" CACHE INTERNAL "PhysX Checked CXX Flags") + SET(PHYSX_CXX_FLAGS_PROFILE "/O2 ${WINCRT_NDEBUG} /Zi" CACHE INTERNAL "PhysX Profile CXX Flags") + SET(PHYSX_CXX_FLAGS_RELEASE "/O2 ${WINCRT_NDEBUG} /Zi" CACHE INTERNAL "PhysX Release CXX Flags") ++endif() + + # cache lib type defs + IF(PX_GENERATE_STATIC_LIBRARIES) diff --git a/ports/physx/msvc_142_bug_workaround.patch b/ports/physx/msvc_142_bug_workaround.patch deleted file mode 100644 index 55433350d837bb..00000000000000 --- a/ports/physx/msvc_142_bug_workaround.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/physx/source/foundation/include/windows/PsWindowsInlineAoS.h b/physx/source/foundation/include/windows/PsWindowsInlineAoS.h -index 881dffb..7111189 100644 ---- a/physx/source/foundation/include/windows/PsWindowsInlineAoS.h -+++ b/physx/source/foundation/include/windows/PsWindowsInlineAoS.h -@@ -363,7 +363,7 @@ - PX_FORCE_INLINE Vec3V V3LoadA(const PxF32* const f) - { - ASSERT_ISALIGNED16(f); -- return V4ClearW(_mm_load_ps(f)); -+ return [ & ](){ return V4ClearW(_mm_load_ps(f)); }(); // MSVC 142 bug workaround - } - - PX_FORCE_INLINE Vec3V V3LoadU(const PxF32* const i) diff --git a/ports/physx/portfile.cmake b/ports/physx/portfile.cmake index 0eef2901bd85f3..3b905cc010566a 100644 --- a/ports/physx/portfile.cmake +++ b/ports/physx/portfile.cmake @@ -1,105 +1,141 @@ -include(vcpkg_common_functions) - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "Error: UWP builds not supported.") -endif() - -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(WINDOWS_PLATFORM "32") - set(MSBUILD_PLATFORM "Win32") -elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(WINDOWS_PLATFORM "64") - set(MSBUILD_PLATFORM "x64") -else() - message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() - -if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140") - set(MSVC_VERSION "14") - set(TOOLSET_VERSION "140") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141") - set(MSVC_VERSION "15") - set(TOOLSET_VERSION "141") -elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142") - set(MSVC_VERSION "16") - set(TOOLSET_VERSION "142") -else() - message(FATAL_ERROR "Unsupported platform toolset.") -endif() - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO NVIDIAGameWorks/PhysX - REF ae80dede0546d652040ae6260a810e53e20a06fa - SHA512 f3a690039cf39fe2db9a728b82af0d39eaa02340a853bdad4b5152d63532367eb24fc7033a614882168049b80d803b6225fc60ed2900a9d0deab847f220540be - HEAD_REF master - PATCHES msvc_142_bug_workaround.patch -) - -set(BUILD_SNIPPETS "False") -set(BUILD_PUBLIC_SAMPLES "False") -set(FLOAT_POINT_PRECISE_MATH "False") - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(GENERATE_STATIC_LIBRARIES "True") -elseif (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(GENERATE_STATIC_LIBRARIES "False") -endif() - -if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") - set(USE_STATIC_WINCRT "False") - set(RUNTIME_LIBRARY_LINKAGE "md") -elseif (VCPKG_CRT_LINKAGE STREQUAL "static") - set(USE_STATIC_WINCRT "True") - set(RUNTIME_LIBRARY_LINKAGE "mt") -endif() - -set(PRESET_FILE vc${MSVC_VERSION}win${WINDOWS_PLATFORM}-${RUNTIME_LIBRARY_LINKAGE}-${VCPKG_LIBRARY_LINKAGE}) -file(REMOVE ${SOURCE_PATH}/physx/buildtools/presets/public/${PRESET_FILE}.xml) -configure_file(${CMAKE_CURRENT_LIST_DIR}/preset.xml.in ${SOURCE_PATH}/physx/buildtools/presets/public/${PRESET_FILE}.xml) - -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY) -vcpkg_add_to_path(${PYTHON3_DIR}) - -get_filename_component(CMAKE_DIR ${CMAKE_COMMAND} DIRECTORY) -# If cmake is not installed then adding it to the end of the path -# will allow generate_projects.bat to find the cmake used by vcpkg. -vcpkg_add_to_path(${CMAKE_DIR}) - -vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/physx/generate_projects.bat ${PRESET_FILE} - WORKING_DIRECTORY ${SOURCE_PATH}/physx - LOGNAME build-${TARGET_TRIPLET} -) - -set(RELEASE_CONFIGURATION "release") -set(DEBUG_CONFIGURATION "debug") - -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/physx/compiler/vc${MSVC_VERSION}win${WINDOWS_PLATFORM}/PhysXSDK.sln - RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} - DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} - PLATFORM ${MSBUILD_PLATFORM} -) - -file(INSTALL ${SOURCE_PATH}/physx/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/physx/) -file(INSTALL ${SOURCE_PATH}/pxshared/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/physx/) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB RELEASE_BINS ${SOURCE_PATH}/physx/bin/win.x86_${WINDOWS_PLATFORM}.vc${TOOLSET_VERSION}.${RUNTIME_LIBRARY_LINKAGE}/${RELEASE_CONFIGURATION}/*.dll) - file(INSTALL ${RELEASE_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - - file(GLOB DEBUG_BINS ${SOURCE_PATH}/physx/bin/win.x86_${WINDOWS_PLATFORM}.vc${TOOLSET_VERSION}.${RUNTIME_LIBRARY_LINKAGE}/${DEBUG_CONFIGURATION}/*.dll) - file(INSTALL ${DEBUG_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -file(GLOB RELEASE_LIBS ${SOURCE_PATH}/physx/bin/win.x86_${WINDOWS_PLATFORM}.vc${TOOLSET_VERSION}.${RUNTIME_LIBRARY_LINKAGE}/${RELEASE_CONFIGURATION}/*.lib) -file(INSTALL ${RELEASE_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -file(GLOB DEBUG_LIBS ${SOURCE_PATH}/physx/bin/win.x86_${WINDOWS_PLATFORM}.vc${TOOLSET_VERSION}.${RUNTIME_LIBRARY_LINKAGE}/${DEBUG_CONFIGURATION}/*.lib) -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -vcpkg_copy_pdbs() - -file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/physx RENAME copyright) +vcpkg_fail_port_install(ON_TARGET MINGW) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NVIDIAGameWorks/PhysX + REF 93c6dd21b545605185f2febc8eeacebe49a99479 + SHA512 c9f50255ca9e0f1ebdb9926992315a62b77e2eea3addd4e65217283490714e71e24f2f687717dd8eb155078a1a6b25c9fadc123ce8bc4c5615f7ac66cd6b11aa + HEAD_REF master + PATCHES + fix-compiler-flag.patch + remove-werror.patch +) + +if(NOT DEFINED RELEASE_CONFIGURATION) + set(RELEASE_CONFIGURATION "release") +endif() +set(DEBUG_CONFIGURATION "debug") + +set(OPTIONS + "-DPHYSX_ROOT_DIR=${SOURCE_PATH}/physx" + "-DPXSHARED_PATH=${SOURCE_PATH}/pxshared" + "-DPXSHARED_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}" + "-DCMAKEMODULES_PATH=${SOURCE_PATH}/externals/cmakemodules" + "-DCMAKEMODULES_NAME=CMakeModules" + "-DCMAKE_MODULES_VERSION=1.27" + "-DPX_BUILDSNIPPETS=OFF" + "-DPX_BUILDPUBLICSAMPLES=OFF" + "-DPX_FLOAT_POINT_PRECISE_MATH=OFF" + "-DPX_COPY_EXTERNAL_DLL=OFF" + "-DGPU_DLL_COPIED=ON" +) + +set(OPTIONS_RELEASE + "-DPX_OUTPUT_BIN_DIR=${CURRENT_PACKAGES_DIR}" + "-DPX_OUTPUT_LIB_DIR=${CURRENT_PACKAGES_DIR}" +) +set(OPTIONS_DEBUG + "-DPX_OUTPUT_BIN_DIR=${CURRENT_PACKAGES_DIR}/debug" + "-DPX_OUTPUT_LIB_DIR=${CURRENT_PACKAGES_DIR}/debug" + "-DNV_USE_DEBUG_WINCRT=ON" +) + +if(VCPKG_TARGET_IS_UWP) + list(APPEND OPTIONS "-DTARGET_BUILD_PLATFORM=uwp") +elseif(VCPKG_TARGET_IS_WINDOWS) + list(APPEND OPTIONS "-DTARGET_BUILD_PLATFORM=windows") +elseif(VCPKG_TARGET_IS_OSX) + list(APPEND OPTIONS "-DTARGET_BUILD_PLATFORM=mac") +elseif(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_FREEBSD) + list(APPEND OPTIONS "-DTARGET_BUILD_PLATFORM=linux") +elseif(VCPKG_TARGET_IS_ANDROID) + list(APPEND OPTIONS "-DTARGET_BUILD_PLATFORM=android") +else() + message(FATAL_ERROR "Unhandled or unsupported target platform.") +endif() + +if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) + list(APPEND OPTIONS "-DNV_FORCE_64BIT_SUFFIX=ON" "-DNV_FORCE_32BIT_SUFFIX=OFF") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND OPTIONS "-DPX_GENERATE_STATIC_LIBRARIES=OFF") +else() + list(APPEND OPTIONS "-DPX_GENERATE_STATIC_LIBRARIES=ON") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND OPTIONS "-DNV_USE_STATIC_WINCRT=OFF") +else() + list(APPEND OPTIONS "-DNV_USE_STATIC_WINCRT=ON") +endif() + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + list(APPEND OPTIONS "-DPX_OUTPUT_ARCH=arm") +else() + list(APPEND OPTIONS "-DPX_OUTPUT_ARCH=x86") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/physx/compiler/public" + DISABLE_PARALLEL_CONFIGURE + OPTIONS ${OPTIONS} + OPTIONS_DEBUG ${OPTIONS_DEBUG} + OPTIONS_RELEASE ${OPTIONS_RELEASE} +) +vcpkg_cmake_install() + +# NVIDIA Gameworks release structure is generally something like //[artifact] +# It would be nice to patch this out, but that directory structure is hardcoded over many cmake files. +# So, we have this helpful helper to copy the bins and libs out. +function(fixup_physx_artifacts) + macro(_fixup _IN_DIRECTORY _OUT_DIRECTORY) + foreach(_SUFFIX IN LISTS _fpa_SUFFIXES) + file(GLOB_RECURSE _ARTIFACTS + LIST_DIRECTORIES false + "${CURRENT_PACKAGES_DIR}/${_IN_DIRECTORY}/*${_SUFFIX}" + ) + if(_ARTIFACTS) + file(COPY ${_ARTIFACTS} DESTINATION "${CURRENT_PACKAGES_DIR}/${_OUT_DIRECTORY}") + endif() + endforeach() + endmacro() + + cmake_parse_arguments(_fpa "" "DIRECTORY" "SUFFIXES" ${ARGN}) + _fixup("bin" ${_fpa_DIRECTORY}) + _fixup("debug/bin" "debug/${_fpa_DIRECTORY}") +endfunction() + +fixup_physx_artifacts( + DIRECTORY "lib" + SUFFIXES ${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX} +) +fixup_physx_artifacts( + DIRECTORY "bin" + SUFFIXES ${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX} ".pdb" +) + +# Remove compiler directory and descendents. +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin/" + "${CURRENT_PACKAGES_DIR}/debug/bin/" + ) +else() + file(GLOB PHYSX_ARTIFACTS LIST_DIRECTORIES true + "${CURRENT_PACKAGES_DIR}/bin/*" + "${CURRENT_PACKAGES_DIR}/debug/bin/*" + ) + foreach(_ARTIFACT IN LISTS PHYSX_ARTIFACTS) + if(IS_DIRECTORY ${_ARTIFACT}) + file(REMOVE_RECURSE ${_ARTIFACT}) + endif() + endforeach() +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/source" + "${CURRENT_PACKAGES_DIR}/source" +) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/physx/preset.xml.in b/ports/physx/preset.xml.in deleted file mode 100644 index 03bc964f868e7c..00000000000000 --- a/ports/physx/preset.xml.in +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ports/physx/remove-werror.patch b/ports/physx/remove-werror.patch new file mode 100644 index 00000000000000..94f802e0f21a67 --- /dev/null +++ b/ports/physx/remove-werror.patch @@ -0,0 +1,66 @@ +diff --git a/physx/source/compiler/cmake/android/CMakeLists.txt b/physx/source/compiler/cmake/android/CMakeLists.txt +index 06e0d98b..e6a77f17 100644 +--- a/physx/source/compiler/cmake/android/CMakeLists.txt ++++ b/physx/source/compiler/cmake/android/CMakeLists.txt +@@ -33,15 +33,15 @@ STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWERCASE) + SET(PHYSX_WARNING_DISABLES "-Wno-invalid-offsetof -Wno-maybe-uninitialized -Wno-unused-variable -Wno-variadic-macros -Wno-array-bounds -Wno-strict-aliasing") + + IF(${ANDROID_ABI} STREQUAL "armeabi-v7a") +- SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") ++ SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") + ELSEIF(${ANDROID_ABI} STREQUAL "armeabi-v7a with NEON") +- SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") ++ SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector ${PHYSX_WARNING_DISABLES}" CACHE INTERNAL "PhysX CXX") + ELSEIF(${ANDROID_ABI} STREQUAL "arm64-v8a") +- SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections ${PHYSX_WARNING_DISABLES} " CACHE INTERNAL "PhysX CXX") ++ SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections ${PHYSX_WARNING_DISABLES} " CACHE INTERNAL "PhysX CXX") + ELSEIF(${ANDROID_ABI} STREQUAL "x86") +- SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections ${PHYSX_WARNING_DISABLES} -fpack-struct=8 -malign-double " CACHE INTERNAL "PhysX CXX") ++ SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections ${PHYSX_WARNING_DISABLES} -fpack-struct=8 -malign-double " CACHE INTERNAL "PhysX CXX") + ELSEIF(${ANDROID_ABI} STREQUAL "x86_64") +- SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections ${PHYSX_WARNING_DISABLES} -mstackrealign -msse3 " CACHE INTERNAL "PhysX CXX") ++ SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections ${PHYSX_WARNING_DISABLES} -mstackrealign -msse3 " CACHE INTERNAL "PhysX CXX") + ENDIF() + + # Build debug info for all configurations +diff --git a/physx/source/compiler/cmake/ios/CMakeLists.txt b/physx/source/compiler/cmake/ios/CMakeLists.txt +index 5605e9af..3d2fe6f0 100644 +--- a/physx/source/compiler/cmake/ios/CMakeLists.txt ++++ b/physx/source/compiler/cmake/ios/CMakeLists.txt +@@ -26,7 +26,7 @@ + ## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved. + + +-SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -ferror-limit=0 -Wall -Wextra -Werror -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-unknown-warning-option -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-undefined-reinterpret-cast -Wno-invalid-offsetof -Wno-zero-as-null-pointer-constant -Wno-atomic-implicit-seq-cst -gdwarf-2" CACHE INTERNAL "PhysX CXX") ++SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-unknown-warning-option -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-undefined-reinterpret-cast -Wno-invalid-offsetof -Wno-zero-as-null-pointer-constant -Wno-atomic-implicit-seq-cst -gdwarf-2" CACHE INTERNAL "PhysX CXX") + + SET(CMAKE_SHARED_LINKER_FLAGS_CHECKED "") + SET(CMAKE_SHARED_LINKER_FLAGS_PROFILE "") +diff --git a/physx/source/compiler/cmake/linux/CMakeLists.txt b/physx/source/compiler/cmake/linux/CMakeLists.txt +index aba53365..6246e488 100644 +--- a/physx/source/compiler/cmake/linux/CMakeLists.txt ++++ b/physx/source/compiler/cmake/linux/CMakeLists.txt +@@ -28,8 +28,8 @@ + STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWERCASE) + + #TODO: Fix warnings +-SET(CLANG_WARNINGS "-ferror-limit=0 -Wall -Wextra -Werror -Wno-alloca -Wno-anon-enum-enum-conversion -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-gnu-anonymous-struct -Wno-undef -Wno-unused-function -Wno-nested-anon-types -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-format-nonliteral -Wno-implicit-fallthrough -Wno-undefined-reinterpret-cast -Wno-disabled-macro-expansion -Wno-zero-as-null-pointer-constant -Wno-shadow -Wno-unknown-warning-option -Wno-atomic-implicit-seq-cst -Wno-extra-semi-stmt") +-SET(GCC_WARNINGS "-Wall -Werror -Wno-invalid-offsetof -Wno-uninitialized") ++SET(CLANG_WARNINGS "-ferror-limit=0 -Wall -Wextra -Wno-alloca -Wno-anon-enum-enum-conversion -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-gnu-anonymous-struct -Wno-undef -Wno-unused-function -Wno-nested-anon-types -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-format-nonliteral -Wno-implicit-fallthrough -Wno-undefined-reinterpret-cast -Wno-disabled-macro-expansion -Wno-zero-as-null-pointer-constant -Wno-shadow -Wno-unknown-warning-option -Wno-atomic-implicit-seq-cst -Wno-extra-semi-stmt") ++SET(GCC_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-uninitialized") + + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # using Clang +diff --git a/physx/source/compiler/cmake/mac/CMakeLists.txt b/physx/source/compiler/cmake/mac/CMakeLists.txt +index 36799700..97cb4c7f 100644 +--- a/physx/source/compiler/cmake/mac/CMakeLists.txt ++++ b/physx/source/compiler/cmake/mac/CMakeLists.txt +@@ -28,7 +28,7 @@ + SET(OSX_BITNESS "-arch x86_64") + SET(CMAKE_OSX_ARCHITECTURES "x86_64") + +-SET(PHYSX_CXX_FLAGS "${OSX_BITNESS} -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-unknown-warning-option -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-undefined-reinterpret-cast -Wno-invalid-offsetof -Wno-zero-as-null-pointer-constant -Wno-atomic-implicit-seq-cst -gdwarf-2" CACHE INTERNAL "PhysX CXX") ++SET(PHYSX_CXX_FLAGS "${OSX_BITNESS} -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-unknown-warning-option -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-undefined-reinterpret-cast -Wno-invalid-offsetof -Wno-zero-as-null-pointer-constant -Wno-atomic-implicit-seq-cst -gdwarf-2" CACHE INTERNAL "PhysX CXX") + + SET(CMAKE_SHARED_LINKER_FLAGS_CHECKED "") + SET(CMAKE_SHARED_LINKER_FLAGS_PROFILE "") diff --git a/ports/physx/vcpkg.json b/ports/physx/vcpkg.json new file mode 100644 index 00000000000000..1a93f3f5161822 --- /dev/null +++ b/ports/physx/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "physx", + "version-semver": "4.1.2", + "description": "The NVIDIA PhysX SDK is a scalable multi-platform physics solution supporting a wide range of devices, from smartphones to high-end multicore CPUs and GPUs", + "homepage": "https://github.com/NVIDIAGameWorks/PhysX", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/picojson/CONTROL b/ports/picojson/CONTROL deleted file mode 100644 index 4a3614202dec3c..00000000000000 --- a/ports/picojson/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: picojson -Version: 1.3.0 -Homepage: https://github.com/kazuho/picojson -Description: A header-file-only, JSON parser serializer in C++. - diff --git a/ports/picojson/portfile.cmake b/ports/picojson/portfile.cmake index c155275d350e3c..53bd084a02dbba 100644 --- a/ports/picojson/portfile.cmake +++ b/ports/picojson/portfile.cmake @@ -1,19 +1,13 @@ - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/picojson-rel-v1.3.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/kazuho/picojson/archive/rel/v1.3.0.zip" - FILENAME "picojson-1.3.0.zip" - SHA512 d1da5748b6a03e92ca4fa475a918842f5eede955f747359fa4d9d85f9ed9efac8b3748a306c2f9f71b9924099ba5e1f8f949e50cdf6f26bc3778865121725ddf +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kazuho/picojson + REF v1.3.0 + SHA512 76d5a6b3b9e1151198eee707faffcbbba28a2842daccf03d99a5d02ae017f9517ef3ac9da4acc74a4fc1357feaf19e14a15c34698a1d4cb65acb6d23b566b284 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) -# Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/picojson) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/picojson/LICENSE ${CURRENT_PACKAGES_DIR}/share/picojson/copyright) +file(INSTALL ${SOURCE_PATH}/picojson.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) -# Copy the header files -file(INSTALL ${SOURCE_PATH}/picojson.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/picojson) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() - diff --git a/ports/picojson/vcpkg.json b/ports/picojson/vcpkg.json new file mode 100644 index 00000000000000..540a2ad3d50907 --- /dev/null +++ b/ports/picojson/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "picojson", + "version-string": "1.3.0", + "port-version": 2, + "description": "A header-file-only, JSON parser serializer in C++.", + "homepage": "https://github.com/kazuho/picojson" +} diff --git a/ports/picosha2/CONTROL b/ports/picosha2/CONTROL deleted file mode 100644 index a388045a2289c0..00000000000000 --- a/ports/picosha2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: picosha2 -Version: 2018-07-30 -Homepage: https://github.com/okdshin/PicoSHA2 -Description: PicoSHA2 - a C++ SHA256 hash generator diff --git a/ports/picosha2/portfile.cmake b/ports/picosha2/portfile.cmake index 7a93b2d8f927a2..80db0c35f7d7e7 100644 --- a/ports/picosha2/portfile.cmake +++ b/ports/picosha2/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO okdshin/PicoSHA2 diff --git a/ports/picosha2/vcpkg.json b/ports/picosha2/vcpkg.json new file mode 100644 index 00000000000000..45091e449f79e2 --- /dev/null +++ b/ports/picosha2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "picosha2", + "version-string": "2018-07-30", + "port-version": 1, + "description": "PicoSHA2 - a C++ SHA256 hash generator", + "homepage": "https://github.com/okdshin/PicoSHA2" +} diff --git a/ports/piex/CONTROL b/ports/piex/CONTROL deleted file mode 100644 index 3f257fa203229d..00000000000000 --- a/ports/piex/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: piex -Version: 2018-03-13-1 -Homepage: https://github.com/google/piex -Description: The Preview Image Extractor (PIEX) is designed to find and extract the largest diff --git a/ports/piex/portfile.cmake b/ports/piex/portfile.cmake index 3238c013cd5352..485210da0180f2 100644 --- a/ports/piex/portfile.cmake +++ b/ports/piex/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/piex - REF 2aa74c2dd295758ef4562906a5525300972821fc - SHA512 4fbea41e8f21c2f4a75d899aa28e2d2e92201d429eb8504515466187befc1eac6c9b31d91b039f2aebe2101bbde6b87adce9bae578a536f264d207fe29e4bd8f + REF 256bd102be288c19b4165e0ecc7097a18c004e92 + SHA512 ae948588a99d586593788c995c3d65a488faaf99b2ab6c51ec39df7e11a42c89454dd505117e90b1f152f6abfc2e3e11f61b0af97e42ecdff0d978934e20f582 HEAD_REF master ) diff --git a/ports/piex/vcpkg.json b/ports/piex/vcpkg.json new file mode 100644 index 00000000000000..fdb727fb705db4 --- /dev/null +++ b/ports/piex/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "piex", + "version-string": "2019-07-11", + "port-version": 1, + "description": "The Preview Image Extractor (PIEX) is designed to find and extract the largest", + "homepage": "https://github.com/google/piex" +} diff --git a/ports/pistache/CONTROL b/ports/pistache/CONTROL deleted file mode 100644 index c1b4408cf55faa..00000000000000 --- a/ports/pistache/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pistache -Version: 2019-08-05 -Homepage: https://github.com/oktal/pistache -Description: Pistache is a modern and elegant HTTP and REST framework for C++. It is entirely written in pure-C++11 and provides a clear and pleasant API. \ No newline at end of file diff --git a/ports/pistache/portfile.cmake b/ports/pistache/portfile.cmake index d0400dcdff08bc..089814ed37db80 100644 --- a/ports/pistache/portfile.cmake +++ b/ports/pistache/portfile.cmake @@ -1,31 +1,21 @@ -include(vcpkg_common_functions) - -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(NOT VCPKG_TARGET_IS_LINUX) message(FATAL_ERROR "${PORT} currently only supports Linux platform.") endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO oktal/pistache - REF 4dc9e3ef9a1b953a62e5fadbed88e72b4b3734de - SHA512 427b6a6e7200e5f91ce8737cd1cc5d6cd689025033c85979c96f0ece64ae05d9c6839a936d7d6015b0e1065dc72362f6f70ab588ea7cae7aa718dfe5cd288554 + REPO pistacheio/pistache + REF 9dc080b9ebbe6fc1726b45e9db1550305938313e #2021-03-31 + SHA512 b55c395fb98af85317590ed2502564af5e92e30a35618132568c6ab589a6d0971570ad20ddbd1f49d9dd8cf54692866c69cfc1350c6fdccf9efb039aacf153b4 HEAD_REF master ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" ) +vcpkg_install_meson() -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +vcpkg_fixup_pkgconfig() # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/pistache/vcpkg.json b/ports/pistache/vcpkg.json new file mode 100644 index 00000000000000..d627fc301cadaf --- /dev/null +++ b/ports/pistache/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "pistache", + "version-date": "2021-03-31", + "port-version": 2, + "description": "Pistache is a modern and elegant HTTP and REST framework for C++. It is entirely written in pure-C++11 and provides a clear and pleasant API", + "homepage": "https://github.com/oktal/pistache", + "supports": "linux", + "dependencies": [ + "rapidjson" + ] +} diff --git a/ports/pixel/CONTROL b/ports/pixel/CONTROL deleted file mode 100644 index 50b1bd0a828228..00000000000000 --- a/ports/pixel/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pixel -Version: 0.3 -Description: Simple 2D Graphics based on standard and portable OpenGL. -Build-Depends: glew, opengl, sdl2 diff --git a/ports/pixel/portfile.cmake b/ports/pixel/portfile.cmake index 4e2e9d7ac26eaf..0b63c66f7ae867 100644 --- a/ports/pixel/portfile.cmake +++ b/ports/pixel/portfile.cmake @@ -1,4 +1,9 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "Windows") + +if(VCPKG_TARGET_IS_LINUX) + message(WARNING"${PORT} currently requires libglu1-mesa from the system package manager: + This can be installed on Ubuntu systems via sudo apt install libglu1-mesa-dev") +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/pixel/vcpkg.json b/ports/pixel/vcpkg.json new file mode 100644 index 00000000000000..a562aa8afbdf35 --- /dev/null +++ b/ports/pixel/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "pixel", + "version-string": "0.3", + "port-version": 2, + "description": "Simple 2D Graphics based on standard and portable OpenGL.", + "homepage": "https://github.com/dascandy/pixel", + "supports": "!windows", + "dependencies": [ + "glew", + "opengl", + "sdl2" + ] +} diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt deleted file mode 100644 index 1b8c311c19fe57..00000000000000 --- a/ports/pixman/CMakeLists.txt +++ /dev/null @@ -1,87 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(pixman VERSION 0.34.0 LANGUAGES C) - -set(CMAKE_DEBUG_POSTFIX "d") - -if(UNIX) - add_definitions(-DHAVE_PTHREADS) -endif() - -include_directories(".") - -file(GLOB SOURCES -"pixman.c" -"pixman-access.c" -"pixman-access-accessors.c" -"pixman-bits-image.c" -"pixman-combine32.c" -"pixman-combine-float.c" -"pixman-conical-gradient.c" -"pixman-filter.c" -"pixman-x86.c" -"pixman-mips.c" -"pixman-arm.c" -"pixman-ppc.c" -"pixman-edge.c" -"pixman-edge-accessors.c" -"pixman-fast-path.c" -"pixman-glyph.c" -"pixman-general.c" -"pixman-gradient-walker.c" -"pixman-image.c" -"pixman-implementation.c" -"pixman-linear-gradient.c" -"pixman-matrix.c" -"pixman-noop.c" -"pixman-radial-gradient.c" -"pixman-region16.c" -"pixman-region32.c" -"pixman-solid-fill.c" -"pixman-timer.c" -"pixman-trap.c" -"pixman-utils.c" -) - -# pixman requires the three PACKAGE* definitions in order to compile. -set(PIXMAN_DEFS - PRIVATE - PACKAGE="pixman-1" - PACKAGE_VERSION="0.34.0" - PACKAGE_BUGREPORT="" -) - -if(VCPKG_TARGET_TRIPLET STREQUAL arm64-windows OR VCPKG_TARGET_TRIPLET STREQUAL arm-windows) - # don't enable SSE2 for arm64-windows and arm-windows -else() - # The USE_SSE2 definition lets it use SSE2 instructions for speed. Every x86/64 target machine should have SSE2 these days. - set(PIXMAN_DEFS ${PIXMAN_DEFS} USE_SSE2) - file(GLOB SSE2_SOURCES "pixman-sse2.c") - set(SOURCES ${SOURCES} ${SSE2_SOURCES}) -endif() - -add_library(pixman-1 ${SOURCES}) -target_include_directories(pixman-1 PUBLIC $) -target_compile_definitions(pixman-1 ${PIXMAN_DEFS}) - -if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 4) - target_compile_options(pixman-1 PRIVATE -msse2) -endif() - -# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files -if(MSVC) - target_compile_options(pixman-1 PRIVATE "/wd4244" "/wd4146" "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" -endif() - -install(TARGETS pixman-1 - EXPORT pixman-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -install( - EXPORT pixman-targets - NAMESPACE unofficial::pixman:: - FILE unofficial-pixman-config.cmake - DESTINATION share/unofficial-pixman -) diff --git a/ports/pixman/CONTROL b/ports/pixman/CONTROL deleted file mode 100644 index 129ba37fe1f34d..00000000000000 --- a/ports/pixman/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pixman -Version: 0.38.0-3 -Homepage: https://www.cairographics.org/releases -Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization. diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake index 649bee4898bde6..43f4f3ddbaf08b 100644 --- a/ports/pixman/portfile.cmake +++ b/ports/pixman/portfile.cmake @@ -1,47 +1,57 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -set(PIXMAN_VERSION 0.38.0) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # Meson is not able to automatically export symbols for DLLs +endif() + +if(VCPKG_TARGET_IS_UWP) + list(APPEND OPTIONS + -Dmmx=disabled + -Dsse2=disabled + -Dssse3=disabled) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(VCPKG_CXX_FLAGS "/arch:SSE2 ${VCPKG_CXX_FLAGS}") + set(VCPKG_C_FLAGS "/arch:SSE2 ${VCPKG_C_FLAGS}") + list(APPEND OPTIONS + -Dmmx=enabled + -Dsse2=enabled + -Dssse3=enabled) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + #x64 in general has all those intrinsics. (except for UWP for some reason) + list(APPEND OPTIONS + -Dmmx=enabled + -Dsse2=enabled + -Dssse3=enabled) +elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + list(APPEND OPTIONS + #-Darm-simd=enabled does not work with arm64-windows + -Dmmx=disabled + -Dsse2=disabled + -Dssse3=disabled + ) +endif() + +set(PIXMAN_VERSION 0.40.0) vcpkg_download_distfile(ARCHIVE URLS "https://www.cairographics.org/releases/pixman-${PIXMAN_VERSION}.tar.gz" FILENAME "pixman-${PIXMAN_VERSION}.tar.gz" - SHA512 1b0205dbe9d9185c68813ce577a889f3c83e83fbd9955c3a72d411c3b476e6be93fc246b5b6ef4ee17e2bb8eb6fb5559e01dff7feb6a6c4c6314f980e960d690 + SHA512 063776e132f5d59a6d3f94497da41d6fc1c7dca0d269149c78247f0e0d7f520a25208d908cf5e421d1564889a91da44267b12d61c0bd7934cd54261729a7de5f ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${PIXMAN_VERSION} + PATCHES remove_test_demos.patch ) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/pixman) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/pixman - PREFER_NINJA +# Meson install wrongly pkgconfig file! +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${OPTIONS} + -Dlibpng=enabled ) +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-pixman TARGET_PATH share/unofficial-pixman) - -# Copy the appropriate header files. -file(COPY - "${SOURCE_PATH}/pixman/pixman.h" - "${SOURCE_PATH}/pixman/pixman-accessor.h" - "${SOURCE_PATH}/pixman/pixman-combine32.h" - "${SOURCE_PATH}/pixman/pixman-compiler.h" - "${SOURCE_PATH}/pixman/pixman-edge-imp.h" - "${SOURCE_PATH}/pixman/pixman-inlines.h" - "${SOURCE_PATH}/pixman/pixman-private.h" - "${SOURCE_PATH}/pixman/pixman-version.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) - -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pixman) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pixman/COPYING ${CURRENT_PACKAGES_DIR}/share/pixman/copyright) - -vcpkg_copy_pdbs() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -vcpkg_test_cmake(PACKAGE_NAME unofficial-pixman) +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/pixman/remove_test_demos.patch b/ports/pixman/remove_test_demos.patch new file mode 100644 index 00000000000000..18efbdc2f9b47d --- /dev/null +++ b/ports/pixman/remove_test_demos.patch @@ -0,0 +1,15 @@ +diff --git a/meson.build b/meson.build +index 1cec22728..fa6199ed0 100644 +--- a/meson.build ++++ b/meson.build +@@ -528,8 +528,8 @@ version_conf.set('PIXMAN_VERSION_MICRO', split[2]) + add_project_arguments('-DHAVE_CONFIG_H', language : ['c']) + + subdir('pixman') +-subdir('test') +-subdir('demos') ++# subdir('test') ++# subdir('demos') + + pkg = import('pkgconfig') + pkg.generate( diff --git a/ports/pixman/vcpkg.json b/ports/pixman/vcpkg.json new file mode 100644 index 00000000000000..17284edad02e9f --- /dev/null +++ b/ports/pixman/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "pixman", + "version": "0.40.0", + "description": "Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization.", + "homepage": "https://www.cairographics.org/releases", + "dependencies": [ + "libpng", + "tool-meson" + ] +} diff --git a/ports/pkgconf/fix-static-builds.patch b/ports/pkgconf/fix-static-builds.patch new file mode 100644 index 00000000000000..88a0b375c9bcdd --- /dev/null +++ b/ports/pkgconf/fix-static-builds.patch @@ -0,0 +1,54 @@ +diff --git a/libpkgconf.pc.in b/libpkgconf.pc.in +index d278136e3..ef0c7db5f 100644 +--- a/libpkgconf.pc.in ++++ b/libpkgconf.pc.in +@@ -8,4 +8,4 @@ Description: a library for accessing and manipulating development framework conf + URL: http://github.com/pkgconf/pkgconf + Version: @PACKAGE_VERSION@ + CFlags: -I${includedir}/pkgconf +-Libs: -L${libdir} -lpkgconf ++Libs: -L${libdir} -lpkgconf @build_static@ +diff --git a/meson.build b/meson.build +index e7822b8da..8f7aa0075 100644 +--- a/meson.build ++++ b/meson.build +@@ -45,6 +45,13 @@ cdata.set('abs_top_builddir', meson.build_root()) + + subdir('libpkgconf') + ++libtype = get_option('default_library') ++if libtype == 'static' ++ build_static = '-DPKGCONFIG_IS_STATIC' ++else ++ build_static = '' ++endif ++ + libpkgconf = library('pkgconf', + 'libpkgconf/argvsplit.c', + 'libpkgconf/audit.c', +@@ -60,7 +67,7 @@ libpkgconf = library('pkgconf', + 'libpkgconf/pkg.c', + 'libpkgconf/queue.c', + 'libpkgconf/tuple.c', +- c_args: '-DLIBPKGCONF_EXPORT', ++ c_args: ['-DLIBPKGCONF_EXPORT', build_static], + install : true, + version : '3.0.0', + soversion : '3', +@@ -73,13 +80,16 @@ pkg.generate(libpkgconf, + url: 'http://github.com/pkgconf/pkgconf', + filebase : 'libpkgconf', + subdirs: ['pkgconf'], ++ extra_cflags : build_static + ) + ++ + pkgconf_exe = executable('pkgconf', + 'cli/main.c', + 'cli/getopt_long.c', + 'cli/renderer-msvc.c', + link_with : libpkgconf, ++ c_args: build_static, + install : true) + + if get_option('tests') diff --git a/ports/pkgconf/portfile.cmake b/ports/pkgconf/portfile.cmake new file mode 100644 index 00000000000000..5daa05b65b4869 --- /dev/null +++ b/ports/pkgconf/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pkgconf/pkgconf + REF 458101e787a47378d2fc74c64f649fd3a5f75e55 + SHA512 36a68c7f452752ddfa7f4740f77277bcea0c1c2c70d36d48e74ac3f77d082771253eb9b78fcd097f55cac425cecabab163123103452ddf16bff7280254c6a715 + HEAD_REF master + PATCHES fix-static-builds.patch +) + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS -Dtests=false + ) +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_tools(TOOL_NAMES pkgconf AUTO_CLEAN) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pkgconf/vcpkg.json b/ports/pkgconf/vcpkg.json new file mode 100644 index 00000000000000..247c50300ea0c3 --- /dev/null +++ b/ports/pkgconf/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pkgconf", + "version": "1.7.4", + "description": "pkgconf is a program which helps to configure compiler and linker flags for development libraries. It is similar to pkg-config from freedesktop.org.", + "homepage": "https://github.com/pkgconf/pkgconf", + "supports": "!uwp" +} diff --git a/ports/platform-folders/CONTROL b/ports/platform-folders/CONTROL deleted file mode 100644 index 9ce30f45a6fe53..00000000000000 --- a/ports/platform-folders/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: platform-folders -Version: 4.0.0-5 -Description: A C++ library to look for special directories like "My Documents" and "%APPDATA%" diff --git a/ports/platform-folders/portfile.cmake b/ports/platform-folders/portfile.cmake index fef2bf327cf954..6b2344db639f1b 100644 --- a/ports/platform-folders/portfile.cmake +++ b/ports/platform-folders/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(TARGET_BUILD_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) @@ -26,7 +24,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(INSTALL ${TARGET_BUILD_PATH}-dbg/platform_folders.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) endif() -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") vcpkg_fixup_cmake_targets(CONFIG_PATH cmake/ TARGET_PATH /share/platform_folders) else() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ TARGET_PATH /share/) diff --git a/ports/platform-folders/vcpkg.json b/ports/platform-folders/vcpkg.json new file mode 100644 index 00000000000000..e0f57ccac5af8e --- /dev/null +++ b/ports/platform-folders/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "platform-folders", + "version-string": "4.0.0", + "port-version": 7, + "description": "A C++ library to look for special directories like \"My Documents\" and \"%APPDATA%\"" +} diff --git a/ports/plf-colony/CONTROL b/ports/plf-colony/CONTROL deleted file mode 100644 index 384ce2d194a71c..00000000000000 --- a/ports/plf-colony/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: plf-colony -Version: 2019-08-10 -Description: An unordered data container providing fast iteration/insertion/erasure while maintaining pointer validity to non-erased elements -Homepage: https://www.plflib.org/ diff --git a/ports/plf-colony/portfile.cmake b/ports/plf-colony/portfile.cmake index eef608ce84712c..97e64da711248f 100644 --- a/ports/plf-colony/portfile.cmake +++ b/ports/plf-colony/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mattreecebentley/plf_colony - REF 81fe8c4daf433491f14248837ee8ed5cf447c856 - SHA512 a6ae03d383c94b0a758e7aedee2838d46b3665881e2c0823b064a3579140a351d96fec66d456de5843b6c4c8d2f6f6efac5f547841c08edd349b0f153e9c4871 + REF e6e563b63dd9e64fc2fcc66a757e366641e62f01 + SHA512 61723a47387fb3ce9a342fbd6db11369774c1a5c5d28ba2db1fee3396a0588a0e9df50cbcaa4561f409d34ddadc17ae61dba29606aa6481647f3bcd003cfaafa HEAD_REF master ) diff --git a/ports/plf-colony/vcpkg.json b/ports/plf-colony/vcpkg.json new file mode 100644 index 00000000000000..5529658fae8dcf --- /dev/null +++ b/ports/plf-colony/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "plf-colony", + "version": "6.28", + "description": "An unordered C++ data container providing fast iteration/insertion/erasure while maintaining pointer/iterator validity to non-erased elements regardless of insertions/erasures.", + "homepage": "https://plflib.org/colony.htm" +} diff --git a/ports/plf-list/CONTROL b/ports/plf-list/CONTROL deleted file mode 100644 index 338eec5ea7804d..00000000000000 --- a/ports/plf-list/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: plf-list -Version: 2019-08-10 -Description: A drop-in replacement for std::list with 293% faster insertion, 57% faster erasure, 17% faster iteration and 77% faster sorting on average -Homepage: https://www.plflib.org/ diff --git a/ports/plf-list/portfile.cmake b/ports/plf-list/portfile.cmake index f9efd1e616b304..97fd0628036498 100644 --- a/ports/plf-list/portfile.cmake +++ b/ports/plf-list/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mattreecebentley/plf_list diff --git a/ports/plf-list/vcpkg.json b/ports/plf-list/vcpkg.json new file mode 100644 index 00000000000000..e86191647f677a --- /dev/null +++ b/ports/plf-list/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "plf-list", + "version-string": "2019-08-10", + "port-version": 1, + "description": "A drop-in replacement for std::list with 293% faster insertion, 57% faster erasure, 17% faster iteration and 77% faster sorting on average", + "homepage": "https://www.plflib.org/" +} diff --git a/ports/plf-nanotimer/CONTROL b/ports/plf-nanotimer/CONTROL deleted file mode 100644 index 10ac0ac2cd8547..00000000000000 --- a/ports/plf-nanotimer/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: plf-nanotimer -Version: 2019-08-10 -Description: A simple C++ 03/11/etc timer class for ~microsecond-precision cross-platform benchmarking -Homepage: https://www.plflib.org/ diff --git a/ports/plf-nanotimer/portfile.cmake b/ports/plf-nanotimer/portfile.cmake index 4c25a2c73fd276..c02495d730fe24 100644 --- a/ports/plf-nanotimer/portfile.cmake +++ b/ports/plf-nanotimer/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mattreecebentley/plf_nanotimer diff --git a/ports/plf-nanotimer/vcpkg.json b/ports/plf-nanotimer/vcpkg.json new file mode 100644 index 00000000000000..26e8a22e466f31 --- /dev/null +++ b/ports/plf-nanotimer/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "plf-nanotimer", + "version-string": "2019-08-10", + "port-version": 1, + "description": "A simple C++ 03/11/etc timer class for ~microsecond-precision cross-platform benchmarking", + "homepage": "https://www.plflib.org/" +} diff --git a/ports/plf-stack/CONTROL b/ports/plf-stack/CONTROL deleted file mode 100644 index d0a40be45cb3f5..00000000000000 --- a/ports/plf-stack/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: plf-stack -Version: 2019-08-10 -Description: A C++ data container replicating std::stack functionality but with better performance -Homepage: https://www.plflib.org/ diff --git a/ports/plf-stack/portfile.cmake b/ports/plf-stack/portfile.cmake index 11a9fb0681a337..370ea578ca30c3 100644 --- a/ports/plf-stack/portfile.cmake +++ b/ports/plf-stack/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mattreecebentley/plf_stack diff --git a/ports/plf-stack/vcpkg.json b/ports/plf-stack/vcpkg.json new file mode 100644 index 00000000000000..6c0a75f6815c0f --- /dev/null +++ b/ports/plf-stack/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "plf-stack", + "version-string": "2019-08-10", + "port-version": 1, + "description": "A C++ data container replicating std::stack functionality but with better performance", + "homepage": "https://www.plflib.org/" +} diff --git a/ports/plib/CONTROL b/ports/plib/CONTROL deleted file mode 100644 index b5abf00112d3ab..00000000000000 --- a/ports/plib/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: plib -Version: 1.8.5-3 -Description: A suite of portable game libraries diff --git a/ports/plib/portfile.cmake b/ports/plib/portfile.cmake index ed0f03af056234..1991b2f6be5d42 100644 --- a/ports/plib/portfile.cmake +++ b/ports/plib/portfile.cmake @@ -1,14 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/plib-1.8.5) vcpkg_download_distfile(ARCHIVE URLS "http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz" FILENAME "plib-1.8.5.tar.gz" SHA512 17154cc77243fe576c2bcbcb0285b98aef1a0634658f5473e95fe0ac8fa3ed477dbe5620e44ccf0b7cc616f812af0cd44d6fcbba0c563180d3b61c9d6f158e1d ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -21,5 +22,4 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/plib RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/plib/vcpkg.json b/ports/plib/vcpkg.json new file mode 100644 index 00000000000000..421823aff3c706 --- /dev/null +++ b/ports/plib/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "plib", + "version-string": "1.8.5", + "port-version": 5, + "description": "A suite of portable game libraries" +} diff --git a/ports/plibsys/CONTROL b/ports/plibsys/CONTROL deleted file mode 100644 index 004f0708486770..00000000000000 --- a/ports/plibsys/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: plibsys -Version: 0.0.4-2 -Homepage: https://github.com/saprykin/plibsys -Description: Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more. diff --git a/ports/plibsys/fix_configuration.patch b/ports/plibsys/fix_configuration.patch new file mode 100644 index 00000000000000..f48249bfd192ab --- /dev/null +++ b/ports/plibsys/fix_configuration.patch @@ -0,0 +1,142 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 343e3d2..aff7929 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -785,18 +785,18 @@ if (PLIBSYS_PLATFORM_DEFINES) + endif() + + # Add targets +-add_library (plibsys SHARED ${PLIBSYS_SRCS} ${PLIBSYS_PLATFORM_SRCS} ${PLIBSYS_PUBLIC_HDRS} ${PLIBSYS_PRIVATE_HDRS}) +- + if (PLIBSYS_BUILD_STATIC) + add_library (plibsysstatic STATIC ${PLIBSYS_SRCS} ${PLIBSYS_PLATFORM_SRCS} ${PLIBSYS_PUBLIC_HDRS} ${PLIBSYS_PRIVATE_HDRS}) ++else() ++ add_library (plibsys SHARED ${PLIBSYS_SRCS} ${PLIBSYS_PLATFORM_SRCS} ${PLIBSYS_PUBLIC_HDRS} ${PLIBSYS_PRIVATE_HDRS}) + endif() + + # Add include directories + if (COMMAND target_include_directories) +- target_include_directories (plibsys PUBLIC ${PLIBSYS_INCLUDE_DIRS}) +- + if (PLIBSYS_BUILD_STATIC) + target_include_directories (plibsysstatic PUBLIC ${PLIBSYS_INCLUDE_DIRS}) ++ else() ++ target_include_directories (plibsys PUBLIC ${PLIBSYS_INCLUDE_DIRS}) + endif() + else() + include_directories (${PLIBSYS_INCLUDE_DIRS}) +@@ -804,15 +804,16 @@ endif() + + # Add compile definitions + if (COMMAND target_compile_definitions) +- target_compile_definitions (plibsys PRIVATE ${PLIBSYS_COMPILE_DEFS}) +- + if (PLIBSYS_BUILD_STATIC) + target_compile_definitions (plibsysstatic PRIVATE ${PLIBSYS_COMPILE_DEFS}) ++ else() ++ target_compile_definitions (plibsys PRIVATE ${PLIBSYS_COMPILE_DEFS}) + endif() + else() + add_definitions (${PLIBSYS_COMPILE_DEFS}) + endif() + ++if(NOT PLIBSYS_BUILD_STATIC) + set_target_properties (plibsys PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR}) + set_target_properties (plibsys PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_DIR}) + set_target_properties (plibsys PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIR}) +@@ -820,6 +821,7 @@ set_target_properties (plibsys PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIR} + if (NOT PLIBSYS_TARGET_OS STREQUAL os2 AND NOT PLIBSYS_TARGET_OS STREQUAL amigaos) + set_target_properties (plibsys PROPERTIES SOVERSION ${PLIBSYS_SOVERSION}) + endif() ++endif() + + if (PLIBSYS_BUILD_STATIC) + set_target_properties (plibsysstatic PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIR}) +@@ -834,10 +836,10 @@ if (PLIBSYS_PLATFORM_CFLAGS) + set (PLIBSYS_PLATFORM_CFLAGS_STR "${PLIBSYS_PLATFORM_CFLAGS_STR} ${PLATFORM_CFLAG}") + endforeach() + +- set_target_properties (plibsys PROPERTIES COMPILE_FLAGS "${PLIBSYS_PLATFORM_CFLAGS_STR}") +- + if (PLIBSYS_BUILD_STATIC) + set_target_properties (plibsysstatic PROPERTIES COMPILE_FLAGS "${PLIBSYS_PLATFORM_CFLAGS_STR}") ++ else() ++ set_target_properties (plibsys PROPERTIES COMPILE_FLAGS "${PLIBSYS_PLATFORM_CFLAGS_STR}") + endif() + endif() + +@@ -846,29 +848,30 @@ if (PLIBSYS_PLATFORM_LDFLAGS) + set (PLIBSYS_PLATFORM_LDFLAGS_STR "${PLIBSYS_PLATFORM_LDFLAGS_STR} ${PLATFORM_LDFLAG}") + endforeach() + +- set_target_properties (plibsys PROPERTIES LINK_FLAGS "${PLIBSYS_PLATFORM_LDFLAGS_STR}") +- + if (PLIBSYS_BUILD_STATIC) + set_target_properties (plibsysstatic PROPERTIES LINK_FLAGS "${PLIBSYS_PLATFORM_LDFLAGS_STR}") ++ else() ++ set_target_properties (plibsys PROPERTIES LINK_FLAGS "${PLIBSYS_PLATFORM_LDFLAGS_STR}") + endif() + endif() + +-target_link_libraries (plibsys ${PLIBSYS_PLATFORM_LINK_LIBRARIES}) + + if (PLIBSYS_BUILD_STATIC) +- target_link_libraries (plibsysstatic ${PLIBSYS_PLATFORM_LINK_LIBRARIES}) ++ target_link_libraries (plibsysstatic ${PLIBSYS_PLATFORM_LINK_LIBRARIES}) ++else() ++ target_link_libraries (plibsys ${PLIBSYS_PLATFORM_LINK_LIBRARIES}) + endif() + + if (PLIBSYS_BUILD_STATIC) +- set (PLIBSYS_INSTALL_TARGETS plibsys plibsysstatic) ++ set (PLIBSYS_INSTALL_TARGETS plibsysstatic) + else() + set (PLIBSYS_INSTALL_TARGETS plibsys) + endif() + + if (PLIBSYS_NATIVE_WINDOWS) + install (TARGETS ${PLIBSYS_INSTALL_TARGETS} +- DESTINATION lib +- RUNTIME DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin + COMPONENT Core + ) + +@@ -878,11 +881,6 @@ if (PLIBSYS_NATIVE_WINDOWS) + + set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) + include (InstallRequiredSystemLibraries) +- +- install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} +- DESTINATION lib +- COMPONENT Core +- ) + endif() + + # Prepare installation dirs +@@ -890,18 +888,18 @@ if (NOT CMAKE_INSTALL_LIBDIR) + set (CMAKE_INSTALL_LIBDIR "lib") + endif() + ++if (NOT CMAKE_INSTALL_BINDIR) ++ set (CMAKE_INSTALL_BINDIR "bin") ++endif() ++ + if (NOT CMAKE_INSTALL_INCLUDEDIR) + set (CMAKE_INSTALL_INCLUDEDIR "include") + endif() + + install (TARGETS ${PLIBSYS_INSTALL_TARGETS} EXPORT plibsys-targets +- DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- COMPONENT Core +-) +-install (TARGETS ${PLIBSYS_INSTALL_TARGETS} +- DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT Core + ) + install (FILES diff --git a/ports/plibsys/portfile.cmake b/ports/plibsys/portfile.cmake index a4a032370cd88f..c6ab653b60714c 100644 --- a/ports/plibsys/portfile.cmake +++ b/ports/plibsys/portfile.cmake @@ -1,17 +1,16 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO saprykin/plibsys REF 0.0.4 SHA512 61957666fb454469e1ff68435463eaf426e960caed33540dbb495e1aa7c446c9803d100f33f1a6ea70d5f2ee2d0d19ec315f3a8c651747f65a186ad061c05e51 HEAD_REF master + PATCHES + fix_configuration.patch ) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - SET(PLIBSYS_STATIC OFF) -else() - SET(PLIBSYS_STATIC ON) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PLIBSYS_STATIC) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -19,6 +18,7 @@ vcpkg_configure_cmake( OPTIONS -DPLIBSYS_TESTS=OFF -DPLIBSYS_COVERAGE=OFF + -DPLIBSYS_BUILD_DOC=OFF -DPLIBSYS_BUILD_STATIC=${PLIBSYS_STATIC} ) @@ -26,45 +26,10 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/plibsys RENAME copyright) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(PLIBSYS_FILENAME plibsys) - - # Put shared libraries into the proper directory - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/plibsys.dll ${CURRENT_PACKAGES_DIR}/bin/plibsys.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.dll ${CURRENT_PACKAGES_DIR}/debug/bin/plibsys.dll) -else() - set(PLIBSYS_FILENAME plibsysstatic) - - # For static build remove dynamic libraries - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/plibsys.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/plibsys.dll) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.dll) -endif() - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tmp) - -# Save library files -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${PLIBSYS_FILENAME}.lib ${CURRENT_PACKAGES_DIR}/tmp/plibsys.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${PLIBSYS_FILENAME}.lib ${CURRENT_PACKAGES_DIR}/tmp/plibsys_debug.lib) - -# Remove unused shared libraries -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) +vcpkg_copy_pdbs() -# Re-install library files -file(RENAME ${CURRENT_PACKAGES_DIR}/tmp/plibsys.lib ${CURRENT_PACKAGES_DIR}/lib/plibsys.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/tmp/plibsys_debug.lib ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.lib) +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -# Remove duplicate library files (already installed) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tmp) -vcpkg_copy_pdbs() diff --git a/ports/plibsys/usage b/ports/plibsys/usage new file mode 100644 index 00000000000000..e679f1bdc7b388 --- /dev/null +++ b/ports/plibsys/usage @@ -0,0 +1,5 @@ +The package plibsys provides CMake targets: + + find_package(plibsys CONFIG REQUIRED) + target_include_directories(main PRIVATE ${PLIBSYS_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${PLIBSYS_LIBRARIES}) diff --git a/ports/plibsys/vcpkg-cmake-wrapper.cmake b/ports/plibsys/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..acf1ac9f8c434a --- /dev/null +++ b/ports/plibsys/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,12 @@ +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +find_path(PLIBSYS_INCLUDE_DIR NAMES plibsys.h HINTS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} PATH_SUFFIXES plibsys) + +find_library(PLIBSYS_LIBRARY_DEBUG NAMES plibsys plibsysstatic libplibsys NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(PLIBSYS_LIBRARY_RELEASE NAMES plibsys plibsysstatic libplibsys NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(PLIBSYS) + +set(PLIBSYS_INCLUDE_DIRS ${PLIBSYS_INCLUDE_DIR}) +set(PLIBSYS_LIBRARIES ${PLIBSYS_LIBRARY}) diff --git a/ports/plibsys/vcpkg.json b/ports/plibsys/vcpkg.json new file mode 100644 index 00000000000000..4960c01a26cb2c --- /dev/null +++ b/ports/plibsys/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "plibsys", + "version-string": "0.0.4", + "port-version": 5, + "description": "Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more.", + "homepage": "https://github.com/saprykin/plibsys", + "supports": "!uwp" +} diff --git a/ports/plog/CONTROL b/ports/plog/CONTROL deleted file mode 100644 index 0d6adaa08ac6ac..00000000000000 --- a/ports/plog/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: plog -Version: 1.1.4 -Homepage: https://github.com/SergiusTheBest/plog -Description: Portable, simple and extensible C++ logging library. diff --git a/ports/plog/portfile.cmake b/ports/plog/portfile.cmake index 847f2bd3762e56..a4b769dc345d10 100644 --- a/ports/plog/portfile.cmake +++ b/ports/plog/portfile.cmake @@ -1,11 +1,9 @@ # Header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SergiusTheBest/plog - REF 1.1.4 - SHA512 7af75af8343460d62e04cc0c27d4cf86373b136df73d2312d19a2e57fa309e916cef8625b8eed1b7270b93aa5d1ff27aee6edb74beb138e3a21c06a3c3debb41 + REF 1.1.5 + SHA512 c16b428e1855c905c486130c8610d043962bedc2b40d1d986c250c8f7fd7139540164a3cbb408ed08298370aa150d5937f358c13ccae2728ce8ea47fa897fd0b HEAD_REF master ) diff --git a/ports/plog/vcpkg.json b/ports/plog/vcpkg.json new file mode 100644 index 00000000000000..c1de0acffa0386 --- /dev/null +++ b/ports/plog/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "plog", + "version-string": "1.1.5", + "port-version": 1, + "description": "Portable, simple and extensible C++ logging library.", + "homepage": "https://github.com/SergiusTheBest/plog" +} diff --git a/ports/plplot/0001-findwxwidgets-fixes.patch b/ports/plplot/0001-findwxwidgets-fixes.patch index 72b1d6c2530df5..cc30ca56da89ac 100644 --- a/ports/plplot/0001-findwxwidgets-fixes.patch +++ b/ports/plplot/0001-findwxwidgets-fixes.patch @@ -1,59 +1,71 @@ diff --git a/cmake/modules/FindwxWidgets.cmake b/cmake/modules/FindwxWidgets.cmake -index 4d3a2d1..eaaa358 100644 +index 4d3a2d1..c83d8a6 100644 --- a/cmake/modules/FindwxWidgets.cmake +++ b/cmake/modules/FindwxWidgets.cmake -@@ -515,7 +515,16 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") +@@ -515,7 +515,14 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") set(_WX_ARCH _x64) endif() endif() - if(BUILD_SHARED_LIBS) -+ if(VCPKG_TARGET_TRIPLET) -+ find_library(wxWidgets_LIB_DIR -+ NAMES -+ wxmsw31ud_core.lib -+ wxmsw31u_core.lib -+ PATHS -+ DOC "Path to wxWidgets libraries" -+ ) -+ get_filename_component(wxWidgets_LIB_DIR ${wxWidgets_LIB_DIR} DIRECTORY) -+ elseif(BUILD_SHARED_LIBS) ++ ++ include(SelectLibraryConfigurations) ++ find_library(wxWidgets_LIB_DIR_LIBRARY_RELEASE NAMES wxmsw31u_core) ++ find_library(wxWidgets_LIB_DIR_LIBRARY_DEBUG NAMES wxmsw31ud_core) ++ select_library_configurations(wxWidgets_LIB_DIR) ++ get_filename_component(wxWidgets_LIB_DIR ${wxWidgets_LIB_DIR} DIRECTORY) ++ if(0) ++ if(BUILD_SHARED_LIBS) find_path(wxWidgets_LIB_DIR NAMES msw/wx/setup.h -@@ -571,6 +580,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") +@@ -554,6 +561,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + NO_DEFAULT_PATH + ) + endif() ++ endif() + unset(_WX_TOOL) + unset(_WX_TOOLVER) + unset(_WX_ARCH) +@@ -571,7 +579,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") set(wxWidgets_DEFINITIONS WXUSINGDLL) DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}") endif() -+ if(VCPKG_TARGET_TRIPLET) +- ++ if(BUILD_SHARED_LIBS) + set(wxWidgets_DEFINITIONS WXUSINGDLL) -+ endif(VCPKG_TARGET_TRIPLET) - ++ endif(BUILD_SHARED_LIBS) # Search for available configuration types. foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw) -@@ -582,6 +594,15 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") - endif() + set(WX_${CFG}_FOUND FALSE) +@@ -583,6 +593,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") endforeach() DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}") -+ -+ if(VCPKG_TARGET_TRIPLET) -+ if(CMAKE_BUILD_TYPE STREQUAL "Debug") -+ set(WX_CONFIGURATION "mswud") -+ else() -+ set(WX_CONFIGURATION "mswu") -+ endif() -+ set(WX_${WX_CONFIGURATION}_FOUND TRUE) -+ endif(VCPKG_TARGET_TRIPLET) ++ if(CMAKE_BUILD_TYPE STREQUAL "Debug") ++ set(WX_CONFIGURATION "mswud") ++ else() ++ set(WX_CONFIGURATION "mswu") ++ endif() ++ set(WX_${WX_CONFIGURATION}_FOUND TRUE) ++ if(WX_CONFIGURATION) set(wxWidgets_FOUND TRUE) -@@ -616,7 +637,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + +@@ -616,6 +633,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG) # Set wxWidgets lib setup include directory. -- if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) -+ if(VCPKG_TARGET_TRIPLET) -+ set(wxWidgets_INCLUDE_DIRS "${wxWidgets_ROOT_DIR}/include") -+ elseif(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) ++ set(wxWidgets_INCLUDE_DIRS "${wxWidgets_ROOT_DIR}/include") ++ if(0) + if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) set(wxWidgets_INCLUDE_DIRS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}) - else() +@@ -623,7 +642,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + DBG_MSG("wxWidgets_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.") + set(wxWidgets_FOUND FALSE) + endif() +- ++ endif() + # Set wxWidgets main include directory. + if(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) + list(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) diff --git a/ports/plplot/CONTROL b/ports/plplot/CONTROL deleted file mode 100644 index 71bdb1a51726e5..00000000000000 --- a/ports/plplot/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: plplot -Version: 5.13.0-2 -Build-Depends: freetype, zlib, libpng, bzip2 -Description: PLplot is a cross-platform software package for creating scientific plots whose (UTF-8) plot symbols and text are limited in practice only by what Unicode-aware system fonts are installed on a user's computer. - -Feature: wxwidgets -Build-Depends: wxwidgets -Description: plplot wxwidgets module \ No newline at end of file diff --git a/ports/plplot/fix-pkg-config.patch b/ports/plplot/fix-pkg-config.patch new file mode 100644 index 00000000000000..dd2601dbf124cc --- /dev/null +++ b/ports/plplot/fix-pkg-config.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/modules/psttf.cmake b/cmake/modules/psttf.cmake +index 950f41b..6c20af5 100644 +--- a/cmake/modules/psttf.cmake ++++ b/cmake/modules/psttf.cmake +@@ -56,7 +56,11 @@ if(PLD_psttf) + endif(PLD_psttf) + + if(PLD_psttf) +- pkg_check_pkgconfig("lasi;pango;pangoft2" includedir libdir linkflags cflags version _PSTTF) ++ set(PKG_LIST lasi pango pangoft2) ++ foreach (SELECTED_PKG ${PKG_LIST}) ++ pkg_check_pkgconfig("${SELECTED_PKG}" includedir libdir linkflags cflags version _PSTTF) ++ endforeach() ++ + if(linkflags) + #blank-separated required. + string(REGEX REPLACE ";" " " psttf_COMPILE_FLAGS "${cflags}") diff --git a/ports/plplot/fix_utils.patch b/ports/plplot/fix_utils.patch new file mode 100644 index 00000000000000..d1d8596d0faf2f --- /dev/null +++ b/ports/plplot/fix_utils.patch @@ -0,0 +1,23 @@ +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index 59cfe20..b936dad 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -75,7 +75,8 @@ add_executable(parity_bit_check parity_bit_check.c) + if(ENABLE_wxwidgets AND NOT OLD_WXWIDGETS) + # Build wxwidgets applications with same wxwidgets compile and link flags + # as used with the PLplot wxwidgets device driver. +- ++ find_package(JPEG REQUIRED) ++ find_package(TIFF REQUIRED) + set(wxPLViewer_SRCS wxplviewer.cpp wxplframe.cpp ${CMAKE_SOURCE_DIR}/drivers/wxwidgets_comms.cpp) + set_source_files_properties(${wxPLViewer_SRCS} + PROPERTIES COMPILE_FLAGS "${wxwidgets_COMPILE_FLAGS}") +@@ -90,7 +91,7 @@ if(ENABLE_wxwidgets AND NOT OLD_WXWIDGETS) + COMPILE_DEFINITIONS "USINGDLL" + ) + endif(BUILD_SHARED_LIBS) +- target_link_libraries(wxPLViewer plplotwxwidgets plplotcxx ${wxwidgets_LINK_FLAGS} ${MATH_LIB} ${RT_LIB}) ++ target_link_libraries(wxPLViewer plplotwxwidgets plplotcxx ${wxwidgets_LINK_FLAGS} ${MATH_LIB} ${RT_LIB} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES}) + + if(USE_RPATH) + # Assume that plplotwxwidgets and plplotcxx have the same install location as plplot diff --git a/ports/plplot/portfile.cmake b/ports/plplot/portfile.cmake index c98c8253bf5f63..eb20f613c5c33e 100644 --- a/ports/plplot/portfile.cmake +++ b/ports/plplot/portfile.cmake @@ -1,22 +1,18 @@ -include(vcpkg_common_functions) - set(PLPLOT_VERSION 5.13.0) -set(PLPLOT_HASH 1d5cb5da17d4bde6d675585bff1f8dcb581719249a0b2687867e767703f8dab0870e7ea44b9549a497f4ac0141a3cabf6761c49520c0e2b26ffe581468512cbb) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/plplot/files/plplot/${PLPLOT_VERSION}%20Source/plplot-${PLPLOT_VERSION}.tar.gz/download" - FILENAME "plplot-${PLPLOT_VERSION}.tar.gz" - SHA512 ${PLPLOT_HASH} -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${PLPLOT_VERSION} + REPO plplot/plplot + REF ${PLPLOT_VERSION}%20Source + FILENAME "plplot-${PLPLOT_VERSION}.tar.gz" + SHA512 1d5cb5da17d4bde6d675585bff1f8dcb581719249a0b2687867e767703f8dab0870e7ea44b9549a497f4ac0141a3cabf6761c49520c0e2b26ffe581468512cbb PATCHES - "${CMAKE_CURRENT_LIST_DIR}/0001-findwxwidgets-fixes.patch" - "${CMAKE_CURRENT_LIST_DIR}/0002-wxwidgets-dev-fixes.patch" - "${CMAKE_CURRENT_LIST_DIR}/install-interface-include-directories.patch" + 0001-findwxwidgets-fixes.patch + 0002-wxwidgets-dev-fixes.patch + install-interface-include-directories.patch + use-math-h-nan.patch + fix_utils.patch + fix-pkg-config.patch ) set(BUILD_with_wxwidgets OFF) @@ -29,10 +25,11 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DENABLE_tcl=OFF - -DPL_HAVE_QHULL=OFF + -DENABLE_d=OFF -DENABLE_qt=OFF - -DPLPLOT_USE_QT5=OFF -DENABLE_ocaml=OFF + -DPL_HAVE_QHULL=OFF + -DPLPLOT_USE_QT5=OFF -DPL_DOUBLE=ON -DPLD_wxwidgets=${BUILD_with_wxwidgets} -DENABLE_DYNDRIVERS=OFF @@ -45,14 +42,16 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_copy_pdbs() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/plplot) # Remove unnecessary tool file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/pltek.exe ${CURRENT_PACKAGES_DIR}/bin/pltek.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/wxPLViewer.exe - ${CURRENT_PACKAGES_DIR}/bin/wxPLViewer.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/wxPLViewer.exe + ${CURRENT_PACKAGES_DIR}/bin/wxPLViewer.exe ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -64,18 +63,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() # Remove unwanted and duplicate directories -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include -) - -file(INSTALL - ${SOURCE_PATH}/Copyright - DESTINATION ${CURRENT_PACKAGES_DIR}/share/plplot - RENAME copyright -) - -vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/share -) +file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/plplot/use-math-h-nan.patch b/ports/plplot/use-math-h-nan.patch new file mode 100644 index 00000000000000..1f398773086da8 --- /dev/null +++ b/ports/plplot/use-math-h-nan.patch @@ -0,0 +1,28 @@ +diff --git "a/lib/csa/nan.h" "b/lib/csa/nan.h" +index 29fd3d2f..7f16e8c8 100644 +--- "a/lib/csa/nan.h" ++++ "b/lib/csa/nan.h" +@@ -19,6 +19,16 @@ + #if !defined ( _NAN_H ) + #define _NAN_H + ++// Try to use the implementation-provided NAN constant: ++ ++#include ++ ++#if defined(NAN) ++ ++#define NaN ((double)NAN) ++ ++#else // ^^^ implementation provides NAN // implementation does not provide NAN vvv ++ + #if ( defined ( __GNUC__ ) && !defined ( __ICC ) ) || defined ( __BORLANDC__ ) + + static const double NaN = 0.0 / 0.0; +@@ -63,4 +73,6 @@ static const long long lNaN = ( (unsigned long long) 1 << 63 ) - 1; + + #endif + ++#endif // defined(NAN) ++ + #endif diff --git a/ports/plplot/vcpkg.json b/ports/plplot/vcpkg.json new file mode 100644 index 00000000000000..a4d0cf1cfe287c --- /dev/null +++ b/ports/plplot/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "plplot", + "version-string": "5.13.0", + "port-version": 10, + "description": "PLplot is a cross-platform software package for creating scientific plots whose (UTF-8) plot symbols and text are limited in practice only by what Unicode-aware system fonts are installed on a user's computer.", + "dependencies": [ + "bzip2", + "freetype", + "libpng", + "zlib" + ], + "features": { + "wxwidgets": { + "description": "plplot wxwidgets module", + "dependencies": [ + "wxwidgets" + ] + } + } +} diff --git a/ports/plustache/CONTROL b/ports/plustache/CONTROL deleted file mode 100644 index f01f1598b00237..00000000000000 --- a/ports/plustache/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: plustache -Version: 0.4.0-1 -Description: {{mustaches}} for C++ -Build-Depends: boost-regex, boost-algorithm diff --git a/ports/plustache/portfile.cmake b/ports/plustache/portfile.cmake index 237e1b26f7b081..def92fc15b8871 100644 --- a/ports/plustache/portfile.cmake +++ b/ports/plustache/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/plustache/vcpkg.json b/ports/plustache/vcpkg.json new file mode 100644 index 00000000000000..3908571d2fb904 --- /dev/null +++ b/ports/plustache/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "plustache", + "version-string": "0.4.0", + "port-version": 2, + "description": "{{mustaches}} for C++", + "dependencies": [ + "boost-algorithm", + "boost-regex" + ] +} diff --git a/ports/pmdk/CONTROL b/ports/pmdk/CONTROL deleted file mode 100644 index 803544c916471c..00000000000000 --- a/ports/pmdk/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: pmdk -Version: 1.6-1 -Description: Persistent Memory Development Kit diff --git a/ports/pmdk/addPowerShellExecutionPolicy.patch b/ports/pmdk/addPowerShellExecutionPolicy.patch deleted file mode 100644 index 692ff176a67e16..00000000000000 --- a/ports/pmdk/addPowerShellExecutionPolicy.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/windows/srcversion/srcversion.vcxproj b/src/windows/srcversion/srcversion.vcxproj -index 8761197..795d1a7 100644 ---- a/src/windows/srcversion/srcversion.vcxproj -+++ b/src/windows/srcversion/srcversion.vcxproj -@@ -72,7 +72,7 @@ - - - -- powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) -+ powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) - __NON_EXISTENT_FILE__ - generate srcversion.h - -@@ -99,7 +99,7 @@ - - - -- powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) -+ powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) - __NON_EXISTENT_FILE__ - generate srcversion.h - diff --git a/ports/pmdk/portfile.cmake b/ports/pmdk/portfile.cmake index 4bede2bb9f6877..60d53e11a06c3f 100644 --- a/ports/pmdk/portfile.cmake +++ b/ports/pmdk/portfile.cmake @@ -1,32 +1,21 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) -if (TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR "ARM is currently not supported") -elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86") - message(FATAL_ERROR "x86 is not supported. Please use pmdk:x64-windows instead.") -endif() +vcpkg_fail_port_install(ON_ARCH "arm" "x86") + +set(PMDK_VERSION "1.11.0") -# Download source vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pmem/pmdk - REF 1.6 - SHA512 f66e4edf1937d51abfa7c087b65a64109cd3d2a8d9587d6c4fc28a1003d67ec1f35a0011c9a9d0bfe76ad7227be83e86582f8405c988eac828d8ae5d0a399483 + REF 8583fcfd68764ac6779e6f93db89b06971b26704 #Commit id corresponding to the version 1.11.0 + SHA512 6d0a9697c97f75ac10e9e8736c2397c6ee23c26af96b65c746e0c32bc2d16f083b177e52bc399aa93c6f2e29ac6106c2696c6bbf9779788d9d19167ac07000b8 HEAD_REF master - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch" - "${CMAKE_CURRENT_LIST_DIR}/v141.patch" ) -get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME) -string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}") - # Build only the selected projects vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln - TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool" + TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmempool,Solution Items\\Tools\\pmempool" OPTIONS /p:SRCVERSION=${PMDK_VERSION} ) @@ -58,12 +47,10 @@ file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/libs/libpmem*.dll) file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) # Install tools (release only) -file(INSTALL ${RELEASE_ARTIFACTS_PATH}/libs/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pmdk) +file(INSTALL ${RELEASE_ARTIFACTS_PATH}/libs/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/pmdk) vcpkg_copy_pdbs() -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pmdk) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pmdk/LICENSE ${CURRENT_PACKAGES_DIR}/share/pmdk/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pmdk/v141.patch b/ports/pmdk/v141.patch deleted file mode 100644 index f77abe93f78358..00000000000000 --- a/ports/pmdk/v141.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/common/util.h b/src/common/util.h -index 04b098f..33a64c2 100644 ---- a/src/common/util.h -+++ b/src/common/util.h -@@ -284,7 +284,7 @@ typedef enum { - #error MSVC ports of util_atomic_ only work on X86_64 - #endif - --#if _MSC_VER > 1911 -+#if _MSC_VER >= 2000 - #error util_atomic_ utility functions not tested with this version of VC++ - #error These utility functions are not future proof, as they are not - #error based on publicly available documentation. diff --git a/ports/pmdk/vcpkg.json b/ports/pmdk/vcpkg.json new file mode 100644 index 00000000000000..b51a613f0ff579 --- /dev/null +++ b/ports/pmdk/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pmdk", + "version": "1.11.0", + "description": "Persistent Memory Development Kit", + "homepage": "https://github.com/pmem/pmdk", + "supports": "!(arm | x86)" +} diff --git a/ports/pngpp/portfile.cmake b/ports/pngpp/portfile.cmake new file mode 100644 index 00000000000000..1fa23e4445ab07 --- /dev/null +++ b/ports/pngpp/portfile.cmake @@ -0,0 +1,15 @@ +# Header only library +vcpkg_download_distfile(ARCHIVE + URLS "http://download.savannah.nongnu.org/releases/pngpp/png++-0.2.10.tar.gz" + FILENAME "png++-0.2.10.tar.gz" + SHA512 c54a74c0c20212bd0dcf86386c0c11dd824ad14952917ba0ff4c184b6547744458728a4f06018371acb7d5b842b641708914ccaa81bad8e72e173903f494ca85 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.hpp) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/png++) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pngpp/vcpkg.json b/ports/pngpp/vcpkg.json new file mode 100644 index 00000000000000..67312ef2f9f1dd --- /dev/null +++ b/ports/pngpp/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "pngpp", + "version-string": "0.2.10", + "description": "A C++ wrapper for libpng library.", + "dependencies": [ + "libpng" + ] +} diff --git a/ports/pngwriter/CONTROL b/ports/pngwriter/CONTROL deleted file mode 100644 index 286244e934f9cc..00000000000000 --- a/ports/pngwriter/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pngwriter -Version: 0.7.0-2 -Build-Depends: zlib, libpng, freetype -Description: PNGwriter is a very easy to use open source graphics library that uses PNG as its output format diff --git a/ports/pngwriter/portfile.cmake b/ports/pngwriter/portfile.cmake index 06793058a9f85f..610580b22f9ebc 100644 --- a/ports/pngwriter/portfile.cmake +++ b/ports/pngwriter/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/pngwriter/vcpkg.json b/ports/pngwriter/vcpkg.json new file mode 100644 index 00000000000000..f7fa371e323ea8 --- /dev/null +++ b/ports/pngwriter/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "pngwriter", + "version-string": "0.7.0", + "port-version": 3, + "description": "PNGwriter is a very easy to use open source graphics library that uses PNG as its output format", + "dependencies": [ + "freetype", + "libpng", + "zlib" + ] +} diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL deleted file mode 100644 index e7e1656bb4e1d1..00000000000000 --- a/ports/poco/CONTROL +++ /dev/null @@ -1,17 +0,0 @@ -Source: poco -Version: 1.9.2 -Build-Depends: expat, libpq, pcre, sqlite3, zlib, libpng -Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. -Homepage: https://github.com/pocoproject/poco - -Feature: mysql -Build-Depends: libmysql -Description: Mysql support for POCO - -Feature: mariadb -Build-Depends: libmariadb -Description: MariaDB support for POCO - -Feature: postgresql -Build-Depends: libpqxx -Description: PostgreSQL support for POCO diff --git a/ports/poco/arm64_pcre.patch b/ports/poco/arm64_pcre.patch index faf8ce99c4c50b..75151dc34f2d39 100644 --- a/ports/poco/arm64_pcre.patch +++ b/ports/poco/arm64_pcre.patch @@ -1,8 +1,8 @@ diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h -index 3f26008..d0bbd31 100644 +index 9a945f3..f5a9a7f 100644 --- a/Foundation/include/Poco/Platform.h +++ b/Foundation/include/Poco/Platform.h -@@ -193,7 +193,7 @@ +@@ -191,7 +191,7 @@ #else #define POCO_ARCH_LITTLE_ENDIAN 1 #endif @@ -12,7 +12,7 @@ index 3f26008..d0bbd31 100644 #if defined(__ARMEB__) #define POCO_ARCH_BIG_ENDIAN 1 diff --git a/Foundation/src/EventLogChannel.cpp b/Foundation/src/EventLogChannel.cpp -index 4d655da..26567c8 100644 +index 1f51296..c67b71b 100644 --- a/Foundation/src/EventLogChannel.cpp +++ b/Foundation/src/EventLogChannel.cpp @@ -11,6 +11,7 @@ @@ -24,20 +24,20 @@ index 4d655da..26567c8 100644 #include "Poco/EventLogChannel.h" #include "Poco/Message.h" diff --git a/Foundation/src/utils.h b/Foundation/src/utils.h -index e2b6a06..1b045c1 100644 +index 4328344..5eeafcd 100644 --- a/Foundation/src/utils.h +++ b/Foundation/src/utils.h -@@ -54,7 +54,7 @@ - // disabled.) - // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) +@@ -91,7 +91,7 @@ int main(int argc, char** argv) { + // + // If it prints "correct" then the architecture should be here, in the "correct" section. #if defined(_M_X64) || defined(__x86_64__) || \ -- defined(__ARMEL__) || defined(_M_ARM) || defined(__arm__) || defined(__arm64__) || \ +- defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \ + defined(__ARMEL__) || defined(_M_ARM) || defined(__arm__) || defined(__arm64__) || defined(_M_ARM64) || \ - defined(__avr32__) || \ defined(__hppa__) || defined(__ia64__) || \ defined(__mips__) || \ + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ diff --git a/Net/src/Net.cpp b/Net/src/Net.cpp -index e81b4b5..36ae436 100644 +index 1a75379..b4081fd 100644 --- a/Net/src/Net.cpp +++ b/Net/src/Net.cpp @@ -11,6 +11,7 @@ @@ -49,7 +49,7 @@ index e81b4b5..36ae436 100644 #include "Poco/Net/Net.h" diff --git a/Util/src/WinRegistryKey.cpp b/Util/src/WinRegistryKey.cpp -index 4c2ad7d..cf1de17 100644 +index 7fd1a28..a07c5d2 100644 --- a/Util/src/WinRegistryKey.cpp +++ b/Util/src/WinRegistryKey.cpp @@ -11,6 +11,7 @@ diff --git a/ports/poco/find_pcre.patch b/ports/poco/find_pcre.patch deleted file mode 100644 index 3b73ae4f121225..00000000000000 --- a/ports/poco/find_pcre.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cmake/FindPCRE.cmake b/cmake/FindPCRE.cmake -index 41a99cb..b1acb32 100644 ---- a/cmake/FindPCRE.cmake -+++ b/cmake/FindPCRE.cmake -@@ -14,9 +14,15 @@ ENDIF (PCRE_INCLUDE_DIRS) - - FIND_PATH(PCRE_INCLUDE_DIR pcre.h) - --SET(PCRE_NAMES pcre) -+if (WIN32) -+include(SelectLibraryConfigurations) -+find_library(PCRE_LIBRARY_RELEASE NAMES pcre) -+find_library(PCRE_LIBRARY_DEBUG NAMES pcred) -+select_library_configurations(PCRE) -+else() -+SET(PCRE_NAMES pcred pcre) - FIND_LIBRARY(PCRE_LIBRARY NAMES ${PCRE_NAMES} ) -- -+endif() - # handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if - # all listed variables are TRUE - INCLUDE(FindPackageHandleStandardArgs) diff --git a/ports/poco/fix-error-c3861.patch b/ports/poco/fix-error-c3861.patch new file mode 100644 index 00000000000000..85891622c75979 --- /dev/null +++ b/ports/poco/fix-error-c3861.patch @@ -0,0 +1,12 @@ +diff --git a/XML/include/Poco/XML/ParserEngine.h b/XML/include/Poco/XML/ParserEngine.h +index e0c8455..363654c 100644 +--- a/XML/include/Poco/XML/ParserEngine.h ++++ b/XML/include/Poco/XML/ParserEngine.h +@@ -19,6 +19,7 @@ + + #include "Poco/XML/XML.h" + #if defined(POCO_UNBUNDLED) ++#include + #include + #else + #include "Poco/XML/expat.h" diff --git a/ports/poco/fix-feature-sqlite3.patch b/ports/poco/fix-feature-sqlite3.patch new file mode 100644 index 00000000000000..1786c1f22198ea --- /dev/null +++ b/ports/poco/fix-feature-sqlite3.patch @@ -0,0 +1,13 @@ +diff --git a/Data/SQLite/cmake/PocoDataSQLiteConfig.cmake b/Data/SQLite/cmake/PocoDataSQLiteConfig.cmake +index 5478bab..c5d6d6d 100644 +--- a/Data/SQLite/cmake/PocoDataSQLiteConfig.cmake ++++ b/Data/SQLite/cmake/PocoDataSQLiteConfig.cmake +@@ -5,7 +5,7 @@ if(@POCO_UNBUNDLED@) + if(CMAKE_VERSION VERSION_LESS "3.14") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V313") + endif() +- find_dependency(SQLite3 REQUIRED) ++ find_dependency(unofficial-sqlite3 REQUIRED) + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/PocoDataSQLiteTargets.cmake") diff --git a/ports/poco/fix_dependency.patch b/ports/poco/fix_dependency.patch new file mode 100644 index 00000000000000..2fd917affa77de --- /dev/null +++ b/ports/poco/fix_dependency.patch @@ -0,0 +1,244 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4e05272..44dd7cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -82,8 +82,6 @@ option(FORCE_OPENSSL "Force usage of OpenSSL even under windows" OFF) + + if(ENABLE_CRYPTO OR ENABLE_NETSSL OR ENABLE_JWT) + find_package(OpenSSL REQUIRED) +-else() +- find_package(OpenSSL) + endif() + + if(OPENSSL_FOUND) +@@ -113,24 +111,19 @@ else() + option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF) + endif() + +-if(ENABLE_DATA_MYSQL) +- find_package(MySQL REQUIRED) +-else() +- find_package(MySQL) +-endif() ++option(ENABLE_DATA "Enable Data" OFF) ++option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF) + +-if(MYSQL_FOUND) +- option(ENABLE_DATA "Enable Data" ON) +- option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" ON) +-else() +- option(ENABLE_DATA "Enable Data" OFF) +- option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF) ++if(ENABLE_DATA_MYSQL) ++ find_package(libmysql) ++ if (NOT libmysql_FOUND) ++ find_package(unofficial-libmariadb CONFIG REQUIRED) ++ set(MYSQL_LIBRARIES libmariadb) ++ endif() + endif() + + if(ENABLE_DATA_POSTGRESQL) + find_package(PostgreSQL REQUIRED) +-else() +- find_package(PostgreSQL) + endif() + + if(PostgreSQL_FOUND) +@@ -207,6 +200,9 @@ include(DefinePlatformSpecifc) + # Collect the built libraries and include dirs, the will be used to create the PocoConfig.cmake file + set(Poco_COMPONENTS "") + ++# Do not declare the link library in the code! ++add_definitions(-DPOCO_NO_AUTOMATIC_LIBS) ++ + if(ENABLE_TESTS) + add_subdirectory(CppUnit) + set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE) +@@ -339,8 +335,11 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS) + list(APPEND Poco_COMPONENTS "Redis") + endif() + +-if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF) +- add_subdirectory(PDF) ++if(ENABLE_PDF) ++ include(SelectLibraryConfigurations) ++ find_library(PocoPDF_LIBRARY_RELEASE NAMES libhpdf) ++ find_library(PocoPDF_LIBRARY_DEBUG NAMES libhpdfd) ++ select_library_configurations(PocoPDF) + list(APPEND Poco_COMPONENTS "PDF") + endif() + +@@ -478,15 +477,6 @@ install( + Devel + ) + +-if(POCO_UNBUNDLED) +- install(FILES cmake/FindPCRE.cmake +- DESTINATION "${PocoConfigPackageLocation}") +- install(FILES cmake/V39/FindEXPAT.cmake +- DESTINATION "${PocoConfigPackageLocation}/V39") +- install(FILES cmake/V313/FindSQLite3.cmake +- DESTINATION "${PocoConfigPackageLocation}/V313") +-endif() +- + message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator") + message(STATUS "${PROJECT_NAME} package version: ${PROJECT_VERSION}") + if(BUILD_SHARED_LIBS) +diff --git a/Data/CMakeLists.txt b/Data/CMakeLists.txt +index 7d1e99e..9d0a85c 100644 +--- a/Data/CMakeLists.txt ++++ b/Data/CMakeLists.txt +@@ -45,7 +45,7 @@ else(ENABLE_DATA_SQLITE) + message(STATUS "SQLite Support Disabled") + endif() + +-if(MYSQL_FOUND AND ENABLE_DATA_MYSQL) ++if((MYSQL_FOUND OR unofficial-libmariadb_FOUND) AND ENABLE_DATA_MYSQL) + message(STATUS "MySQL Support Enabled") + add_subdirectory(MySQL) + else() +diff --git a/Data/MySQL/CMakeLists.txt b/Data/MySQL/CMakeLists.txt +index f71b145..7034974 100644 +--- a/Data/MySQL/CMakeLists.txt ++++ b/Data/MySQL/CMakeLists.txt +@@ -21,7 +21,7 @@ set_target_properties(DataMySQL + DEFINE_SYMBOL MySQL_EXPORTS + ) + +-target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client) ++target_link_libraries(DataMySQL PUBLIC Poco::Data ${MYSQL_LIBRARIES}) + target_include_directories(DataMySQL + PUBLIC + $ +diff --git a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h +index 6ddcd39..9e50803 100644 +--- a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h ++++ b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h +@@ -57,8 +57,6 @@ + #endif + #if defined(LIBMARIADB) + #pragma comment(lib, "libmariadb") +- #else +- #pragma comment(lib, "libmysql") + #endif + #endif + +diff --git a/Data/SQLite/CMakeLists.txt b/Data/SQLite/CMakeLists.txt +index b52e2c5..0dcfae2 100644 +--- a/Data/SQLite/CMakeLists.txt ++++ b/Data/SQLite/CMakeLists.txt +@@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h") + POCO_HEADERS_AUTO(SQLITE_SRCS ${HDRS_G}) + + if(POCO_UNBUNDLED) +- find_package(SQLite3 REQUIRED) ++ find_package(unofficial-sqlite3 CONFIG REQUIRED) + else() + # sqlite3 + POCO_SOURCES(SQLITE_SRCS sqlite3 +@@ -43,7 +43,7 @@ target_include_directories(DataSQLite + ) + + if(POCO_UNBUNDLED) +- target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3) ++ target_link_libraries(DataSQLite PUBLIC unofficial::sqlite3::sqlite3) + target_compile_definitions(DataSQLite PUBLIC + POCO_UNBUNDLED + SQLITE_THREADSAFE=1 +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index 6f5100f..c9fa2e5 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -35,7 +35,7 @@ POCO_MESSAGES(SRCS Logging src/pocomsg.mc) + # If POCO_UNBUNDLED is enabled we try to find the required packages + # The configuration will fail if the packages are not found + if(POCO_UNBUNDLED) +- find_package(PCRE REQUIRED) ++ find_package(unofficial-pcre CONFIG REQUIRED) + find_package(ZLIB REQUIRED) + + #HACK: Unicode.cpp requires functions from these files. The can't be taken from the library +@@ -101,7 +101,7 @@ set_target_properties(Foundation + ) + + if(POCO_UNBUNDLED) +- target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB) ++ target_link_libraries(Foundation PUBLIC unofficial::pcre::pcre ZLIB::ZLIB) + target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED) + add_definitions( + -D_pcre_utf8_table1=_poco_pcre_utf8_table1 +diff --git a/Foundation/cmake/PocoFoundationConfig.cmake b/Foundation/cmake/PocoFoundationConfig.cmake +index 46c2d3f..af2e78c 100644 +--- a/Foundation/cmake/PocoFoundationConfig.cmake ++++ b/Foundation/cmake/PocoFoundationConfig.cmake +@@ -2,7 +2,7 @@ if(@POCO_UNBUNDLED@) + include(CMakeFindDependencyMacro) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + find_dependency(ZLIB REQUIRED) +- find_dependency(PCRE REQUIRED) ++ find_dependency(unofficial-pcre REQUIRED) + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake") +diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt +index 4fbf06f..793285a 100644 +--- a/XML/CMakeLists.txt ++++ b/XML/CMakeLists.txt +@@ -20,7 +20,7 @@ endif() + # If POCO_UNBUNDLED is enabled we try to find the required packages + # The configuration will fail if the packages are not found + if(POCO_UNBUNDLED) +- find_package(EXPAT REQUIRED) ++ find_package(expat CONFIG REQUIRED) + else() + POCO_SOURCES(SRCS expat + src/xmlparse.cpp +@@ -50,7 +50,7 @@ target_include_directories(XML + ) + + if(POCO_UNBUNDLED) +- target_link_libraries(XML PUBLIC EXPAT::EXPAT) ++ target_link_libraries(XML PUBLIC expat::expat) + target_compile_definitions(XML PUBLIC POCO_UNBUNDLED) + else() + if(WIN32) +diff --git a/XML/cmake/PocoXMLConfig.cmake b/XML/cmake/PocoXMLConfig.cmake +index ef58207..4ed94ec 100644 +--- a/XML/cmake/PocoXMLConfig.cmake ++++ b/XML/cmake/PocoXMLConfig.cmake +@@ -4,7 +4,7 @@ if(@POCO_UNBUNDLED@) + if(CMAKE_VERSION VERSION_LESS "3.10") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V39") + endif() +- find_dependency(EXPAT REQUIRED) ++ find_dependency(expat CONFIG REQUIRED) + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/PocoXMLTargets.cmake") +diff --git a/cmake/PocoConfig.cmake.in b/cmake/PocoConfig.cmake.in +index 173eacd..936edf4 100644 +--- a/cmake/PocoConfig.cmake.in ++++ b/cmake/PocoConfig.cmake.in +@@ -8,6 +8,13 @@ if (NOT Poco_FIND_COMPONENTS) + return() + endif() + ++include(CMakeFindDependencyMacro) ++find_dependency(ZLIB REQUIRED) ++find_dependency(unofficial-pcre REQUIRED) ++if(Poco_FIND_REQUIRED_XML) ++ find_dependency(expat CONFIG REQUIRED) ++endif() ++ + set(_Poco_FIND_PARTS_REQUIRED) + if (Poco_FIND_REQUIRED) + set(_Poco_FIND_PARTS_REQUIRED REQUIRED) +@@ -23,7 +30,7 @@ set(_Poco_NOTFOUND_MESSAGE) + + # Let components find each other, but don't overwrite CMAKE_PREFIX_PATH + set(_Poco_CMAKE_PREFIX_PATH_old ${CMAKE_PREFIX_PATH}) +-set(CMAKE_PREFIX_PATH ${_Poco_install_prefix}) ++set(CMAKE_PREFIX_PATH ${_Poco_install_prefix} ${CMAKE_PREFIX_PATH}) + + foreach(module ${Poco_FIND_COMPONENTS}) + find_package(Poco${module} diff --git a/ports/poco/fix_foundation_link.patch b/ports/poco/fix_foundation_link.patch deleted file mode 100644 index c8830ed4f1df51..00000000000000 --- a/ports/poco/fix_foundation_link.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/Foundation/src/Environment_WIN32.cpp b/Foundation/src/Environment_WIN32.cpp -index 62845fa..edcf6fe 100644 ---- a/Foundation/src/Environment_WIN32.cpp -+++ b/Foundation/src/Environment_WIN32.cpp -@@ -22,6 +22,7 @@ - #include - #include - -+#pragma comment(lib, "IPHLPAPI.lib") - - namespace Poco { - -diff --git a/Foundation/src/Environment_WINCE.cpp b/Foundation/src/Environment_WINCE.cpp -index afa59b6..c43767b 100644 ---- a/Foundation/src/Environment_WINCE.cpp -+++ b/Foundation/src/Environment_WINCE.cpp -@@ -23,6 +23,7 @@ - #include - #include - -+#pragma comment(lib, "IPHLPAPI.lib") - - namespace Poco { - diff --git a/ports/poco/include_pcre.patch b/ports/poco/include_pcre.patch deleted file mode 100644 index 5db2372ea7e912..00000000000000 --- a/ports/poco/include_pcre.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt -index 26a2365..0b8f7bc 100644 ---- a/Foundation/CMakeLists.txt -+++ b/Foundation/CMakeLists.txt -@@ -168,6 +168,7 @@ target_link_libraries( "${LIBNAME}" ${SYSLIBS}) - target_include_directories( "${LIBNAME}" - PUBLIC - $ -+ $ - $ - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src - ) diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 6d53a004892c15..4ac9a949df8436 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -1,58 +1,57 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pocoproject/poco - REF 8a127d6f16795d914cadc342d3f4f3b9b7999e3b #1.9.2 - SHA512 282097ee2118ac55320ebdde05bb53ed27d68af49c201b0b26027706ef935ae08f8090abb8aab1cafe84c72520ea73b01263b439d32bd2d0bd55319b0634b168 + REF f81a38057f1d240fe7b7a069612776f788bc88ea # poco-1.11.0-release + SHA512 c5f39aca8b5464959b9337b0cbd8ee86d81f195f5a5ba864692c71b2bdbffdecef0537b6e6a2d9f41829bcd58f78825b10565d0c4ee7b3c856a4886a9e328118 HEAD_REF master PATCHES - # Find pcre in debug - find_pcre.patch - # Add include path to public interface for static build - include_pcre.patch # Fix embedded copy of pcre in static linking mode static_pcre.patch - # Fix source path of PDF - unbundled_pdf.patch # Add the support of arm64-windows arm64_pcre.patch - fix_foundation_link.patch + fix_dependency.patch + fix-feature-sqlite3.patch + fix-error-c3861.patch ) +file(REMOVE "${SOURCE_PATH}/Foundation/src/pcre.h") +file(REMOVE "${SOURCE_PATH}/cmake/V39/FindEXPAT.cmake") +file(REMOVE "${SOURCE_PATH}/cmake/V313/FindSQLite3.cmake") +file(REMOVE "${SOURCE_PATH}/cmake/FindPCRE.cmake") +file(REMOVE "${SOURCE_PATH}/XML/src/expat_config.h") +file(REMOVE "${SOURCE_PATH}/cmake/FindMySQL.cmake") + # define Poco linkage type string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT) -# MySQL / MariaDDB feature -if("mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES) - if("mysql" IN_LIST FEATURES) - # enabling MySQL support - set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") - set(MYSQL_LIBRARY "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") - set(MYSQL_LIBRARY_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib") - endif() - if("mariadb" IN_LIST FEATURES) - # enabling MariaDB support - set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") - set(MYSQL_LIBRARY "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib") - set(MYSQL_LIBRARY_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib") - endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + pdf ENABLE_PDF + netssl ENABLE_NETSSL + netssl ENABLE_NETSSL_WIN + netssl ENABLE_CRYPTO + sqlite3 ENABLE_DATA_SQLITE + postgresql ENABLE_DATA_POSTGRESQL +) + +if ("mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES) + set(POCO_USE_MYSQL ON) +else() + set(POCO_USE_MYSQL OFF) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA - OPTIONS - # Set to OFF|ON (default is OFF) to control linking dependencies as external +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + # force to use dependencies as external -DPOCO_UNBUNDLED=ON # Define linking feature -DPOCO_STATIC=${POCO_STATIC} -DPOCO_MT=${POCO_MT} - # Set to OFF|ON (default is OFF) to control build of POCO tests -DENABLE_TESTS=OFF - # Set to OFF|ON (default is OFF) to control build of POCO samples - -DENABLE_SAMPLES=OFF # Allow enabling and disabling components # POCO_ENABLE_SQL_ODBC, POCO_ENABLE_SQL_MYSQL and POCO_ENABLE_SQL_POSTGRESQL are # defined on the fly if the required librairies are present @@ -63,7 +62,6 @@ vcpkg_configure_cmake( -DENABLE_MONGODB=ON # -DPOCO_ENABLE_SQL_SQLITE=ON # SQLITE are not supported. -DENABLE_REDIS=ON - -DENABLE_PDF=ON -DENABLE_UTIL=ON -DENABLE_NET=ON -DENABLE_SEVENZIP=ON @@ -72,16 +70,17 @@ vcpkg_configure_cmake( -DENABLE_POCODOC=ON -DENABLE_PAGECOMPILER=ON -DENABLE_PAGECOMPILER_FILE2PAGE=ON - # - -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} - OPTIONS_RELEASE - -DMYSQL_LIB=${MYSQL_LIBRARY} - OPTIONS_DEBUG - -DMYSQL_LIB=${MYSQL_LIBRARY_DEBUG} + -DPOCO_DISABLE_INTERNAL_OPENSSL=ON + -DENABLE_APACHECONNECTOR=OFF + -DENABLE_DATA_MYSQL=${POCO_USE_MYSQL} ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +# Move apps to the tools folder +vcpkg_copy_tools(TOOL_NAMES cpspc f2cpsp PocoDoc tec arc AUTO_CLEAN) # Copy additional include files not part of any libraries if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL") @@ -101,55 +100,13 @@ if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/SQLite") file(COPY ${SOURCE_PATH}/Data/SQLite/include DESTINATION ${CURRENT_PACKAGES_DIR}) endif() - -# Move apps to the tools folder -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/cpspc.exe") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc.exe ${CURRENT_PACKAGES_DIR}/tools/cpspc.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.exe ${CURRENT_PACKAGES_DIR}/tools/f2cpsp.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/PocoDoc.exe ${CURRENT_PACKAGES_DIR}/tools/PocoDoc.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tec.exe ${CURRENT_PACKAGES_DIR}/tools/tec.exe) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_cmake_config_fixup(CONFIG_PATH cmake) else() - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc ${CURRENT_PACKAGES_DIR}/tools/cpspc) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp ${CURRENT_PACKAGES_DIR}/tools/f2cpsp) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/PocoDoc ${CURRENT_PACKAGES_DIR}/tools/PocoDoc) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tec ${CURRENT_PACKAGES_DIR}/tools/tec) + vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Poco) endif() +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) -else() - file(REMOVE - ${CURRENT_PACKAGES_DIR}/bin/cpspc.pdb - ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.pdb - ${CURRENT_PACKAGES_DIR}/bin/PocoDoc.pdb - ${CURRENT_PACKAGES_DIR}/bin/tec.pdb - ${CURRENT_PACKAGES_DIR}/debug/bin/cpspc.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/cpspc.pdb - ${CURRENT_PACKAGES_DIR}/debug/bin/f2cpsp.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/f2cpsp.pdb - ${CURRENT_PACKAGES_DIR}/debug/bin/PocoDoc.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/PocoDoc.pdb - ${CURRENT_PACKAGES_DIR}/debug/bin/tec.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/tec.pdb) -endif() - -# -if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") - vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/Poco") - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Poco) -endif() - -# remove unused files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -# copy license -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) - -vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/poco/static_pcre.patch b/ports/poco/static_pcre.patch index a6dab02ced084c..adfc5a7e8c00f9 100644 --- a/ports/poco/static_pcre.patch +++ b/ports/poco/static_pcre.patch @@ -1,11 +1,11 @@ diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt -index 0b8f7bc..c362890 100644 +index 6b276be..6f5100f 100644 --- a/Foundation/CMakeLists.txt +++ b/Foundation/CMakeLists.txt -@@ -53,6 +53,21 @@ if (POCO_UNBUNDLED) - include_directories(${ZLIB_INCLUDE_DIRS}) - - add_definitions(-DPOCO_UNBUNDLED) +@@ -103,6 +103,21 @@ set_target_properties(Foundation + if(POCO_UNBUNDLED) + target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB) + target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED) + add_definitions( + -D_pcre_utf8_table1=_poco_pcre_utf8_table1 + -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size @@ -21,6 +21,6 @@ index 0b8f7bc..c362890 100644 + -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype + -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable + ) + endif(POCO_UNBUNDLED) - else() - # pcre + target_include_directories(Foundation diff --git a/ports/poco/unbundled_pdf.patch b/ports/poco/unbundled_pdf.patch deleted file mode 100644 index e7f88f03559daa..00000000000000 --- a/ports/poco/unbundled_pdf.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/PDF/CMakeLists.txt b/PDF/CMakeLists.txt -index 3e44906..ae8fe6e 100644 ---- a/PDF/CMakeLists.txt -+++ b/PDF/CMakeLists.txt -@@ -97,6 +97,8 @@ POCO_SOURCES(SRCS hpdf - - # TODO: Currently only bundled is supported, in future this should also be possible - # with an unbundled version of libpng -+find_package(PNG REQUIRED) -+if (0) - POCO_SOURCES( SRCS libpng - src/png.c - src/pngerror.c -@@ -117,6 +119,7 @@ POCO_SOURCES( SRCS libpng - src/pngwtran.c - src/pngwutil.c - ) -+endif(0) - - # Version Resource - if(MSVC AND NOT POCO_STATIC) -@@ -136,7 +139,7 @@ set_target_properties( "${LIBNAME}" - DEFINE_SYMBOL PDF_EXPORTS - ) - --target_link_libraries( "${LIBNAME}" ${SYSLIBS} XML Util Foundation ) -+target_link_libraries( "${LIBNAME}" ${SYSLIBS} XML Util Foundation ${PNG_LIBRARIES}) - target_include_directories( "${LIBNAME}" - PUBLIC - $ diff --git a/ports/poco/vcpkg.json b/ports/poco/vcpkg.json new file mode 100644 index 00000000000000..0f6f37ab5ac9cf --- /dev/null +++ b/ports/poco/vcpkg.json @@ -0,0 +1,61 @@ +{ + "name": "poco", + "version-semver": "1.11.0", + "description": "Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems.", + "homepage": "https://github.com/pocoproject/poco", + "supports": "!uwp", + "dependencies": [ + "expat", + "pcre", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "mariadb": { + "description": "MariaDB support for POCO", + "dependencies": [ + "libmariadb" + ] + }, + "mysql": { + "description": "Mysql support for POCO", + "dependencies": [ + "libmysql" + ] + }, + "netssl": { + "description": "NetSSL support for POCO", + "dependencies": [ + { + "name": "openssl", + "platform": "!windows" + } + ] + }, + "pdf": { + "description": "Haru support for POCO", + "dependencies": [ + "libharu" + ] + }, + "postgresql": { + "description": "PostgreSQL support for POCO", + "dependencies": [ + "libpqxx" + ] + }, + "sqlite3": { + "description": "Sqlite3 support for POCO", + "dependencies": [ + "sqlite3" + ] + } + } +} diff --git a/ports/podofo/0001-unique_ptr.patch b/ports/podofo/0001-unique_ptr.patch deleted file mode 100644 index 5c70e847120643..00000000000000 --- a/ports/podofo/0001-unique_ptr.patch +++ /dev/null @@ -1,198 +0,0 @@ -diff -ruNp a/src/base/PdfFilter.cpp b/src/base/PdfFilter.cpp ---- a/src/base/PdfFilter.cpp 2016-11-18 20:08:56.000000000 +0100 -+++ b/src/base/PdfFilter.cpp 2019-01-16 10:25:22.934430500 +0100 -@@ -131,7 +131,7 @@ class PdfFilteredEncodeStream : public P - - private: - PdfOutputStream* m_pOutputStream; -- std::auto_ptr m_filter; -+ std::unique_ptr m_filter; - }; - - /** Create a filter that is a PdfOutputStream. -@@ -206,7 +206,7 @@ class PdfFilteredDecodeStream : public P - - private: - PdfOutputStream* m_pOutputStream; -- std::auto_ptr m_filter; -+ std::unique_ptr m_filter; - bool m_bFilterFailed; - }; - -@@ -264,7 +264,7 @@ PdfFilterFactory::PdfFilterFactory() - { - } - --std::auto_ptr PdfFilterFactory::Create( const EPdfFilter eFilter ) -+std::unique_ptr PdfFilterFactory::Create( const EPdfFilter eFilter ) - { - PdfFilter* pFilter = NULL; - switch( eFilter ) -@@ -316,7 +316,7 @@ std::auto_ptr PdfFilterFactor - break; - } - -- return std::auto_ptr(pFilter); -+ return std::unique_ptr(pFilter); - } - - PdfOutputStream* PdfFilterFactory::CreateEncodeStream( const TVecFilters & filters, PdfOutputStream* pStream ) -diff -ruNp a/src/base/PdfFilter.h b/src/base/PdfFilter.h ---- a/src/base/PdfFilter.h 2016-11-18 20:08:56.000000000 +0100 -+++ b/src/base/PdfFilter.h 2019-01-16 10:25:22.981323900 +0100 -@@ -454,7 +454,7 @@ class PODOFO_API PdfFilterFactory { - public: - /** Create a filter from an enum. - * -- * Ownership is transferred to the caller, who should let the auto_ptr -+ * Ownership is transferred to the caller, who should let the unique_ptr - * the filter is returned in take care of freeing it when they're done - * with it. - * -@@ -463,7 +463,7 @@ class PODOFO_API PdfFilterFactory { - * \returns a new PdfFilter allocated using new, or NULL if no - * filter is available for this type. - */ -- static std::auto_ptr Create( const EPdfFilter eFilter ); -+ static std::unique_ptr Create( const EPdfFilter eFilter ); - - /** Create a PdfOutputStream that applies a list of filters - * on all data written to it. -diff -ruNp a/src/base/PdfMemStream.cpp b/src/base/PdfMemStream.cpp ---- a/src/base/PdfMemStream.cpp 2016-11-18 20:08:56.000000000 +0100 -+++ b/src/base/PdfMemStream.cpp 2019-01-16 10:25:23.479681200 +0100 -@@ -245,7 +245,7 @@ void PdfMemStream::FlateCompressStreamDa - if( !m_lLength ) - return; - -- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_FlateDecode ); -+ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_FlateDecode ); - if( pFilter.get() ) - { - pFilter->Encode( m_buffer.GetBuffer(), m_buffer.GetSize(), &pBuffer, &lLen ); -diff -ruNp a/src/base/PdfStream.cpp b/src/base/PdfStream.cpp ---- a/src/base/PdfStream.cpp 2016-11-18 20:08:56.000000000 +0100 -+++ b/src/base/PdfStream.cpp 2019-01-16 10:25:24.387075400 +0100 -@@ -91,9 +91,9 @@ void PdfStream::GetFilteredCopy( char** - PdfMemoryOutputStream stream; - if( vecFilters.size() ) - { -- // Use std::auto_ptr so that pDecodeStream is deleted -+ // Use std::unique_ptr so that pDecodeStream is deleted - // even in the case of an exception -- std::auto_ptr pDecodeStream( PdfFilterFactory::CreateDecodeStream( vecFilters, &stream, -+ std::unique_ptr pDecodeStream( PdfFilterFactory::CreateDecodeStream( vecFilters, &stream, - m_pParent ? - &(m_pParent->GetDictionary()) : NULL ) ); - -diff -ruNp a/src/base/PdfString.cpp b/src/base/PdfString.cpp ---- a/src/base/PdfString.cpp 2018-03-10 17:30:53.000000000 +0100 -+++ b/src/base/PdfString.cpp 2019-01-16 10:25:24.480799400 +0100 -@@ -673,7 +673,7 @@ PdfString PdfString::HexEncode() const - return *this; - else - { -- std::auto_ptr pFilter; -+ std::unique_ptr pFilter; - - pdf_long lLen = (m_buffer.GetSize() - 1) << 1; - PdfString str; -@@ -702,7 +702,7 @@ PdfString PdfString::HexDecode() const - return *this; - else - { -- std::auto_ptr pFilter; -+ std::unique_ptr pFilter; - - pdf_long lLen = m_buffer.GetSize() >> 1; - PdfString str; -diff -ruNp a/src/doc/PdfFont.cpp b/src/doc/PdfFont.cpp ---- a/src/doc/PdfFont.cpp 2016-05-13 16:04:34.000000000 +0200 -+++ b/src/doc/PdfFont.cpp 2019-01-16 10:25:26.372048300 +0100 -@@ -145,7 +145,7 @@ void PdfFont::WriteStringToStream( const - pdf_long lLen = 0; - char* pBuffer = NULL; - -- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); -+ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); - pFilter->Encode( buffer.GetBuffer(), buffer.GetSize(), &pBuffer, &lLen ); - - pStream->Append( "<", 1 ); -diff -ruNp a/src/doc/PdfPainter.cpp b/src/doc/PdfPainter.cpp ---- a/src/doc/PdfPainter.cpp 2018-03-06 15:04:03.000000000 +0100 -+++ b/src/doc/PdfPainter.cpp 2019-01-16 10:25:28.512159900 +0100 -@@ -829,7 +829,7 @@ void PdfPainter::DrawText( double dX, do - - /* - char* pBuffer; -- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); -+ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); - pFilter->Encode( sString.GetString(), sString.GetLength(), &pBuffer, &lLen ); - - m_pCanvas->Append( pBuffer, lLen ); -diff -ruNp a/test/CreationTest/CreationTest.cpp b/test/CreationTest/CreationTest.cpp ---- a/test/CreationTest/CreationTest.cpp 2018-02-25 12:48:38.000000000 +0100 -+++ b/test/CreationTest/CreationTest.cpp 2019-01-16 10:25:29.605315700 +0100 -@@ -37,7 +37,7 @@ void WriteStringToStream( const PdfStrin - pdf_long lLen = 0; - char* pBuffer = NULL; - -- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); -+ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); - pFilter->Encode( buffer.GetBuffer(), buffer.GetSize(), &pBuffer, &lLen ); - - oss << "<"; -diff -ruNp a/test/FilterTest/FilterTest.cpp b/test/FilterTest/FilterTest.cpp ---- a/test/FilterTest/FilterTest.cpp 2018-03-10 15:06:27.000000000 +0100 -+++ b/test/FilterTest/FilterTest.cpp 2019-01-16 10:25:29.777214800 +0100 -@@ -57,7 +57,7 @@ void test_filter( EPdfFilter eFilter, co - pdf_long lEncoded; - pdf_long lDecoded; - -- std::auto_ptr pFilter = PdfFilterFactory::Create( eFilter ); -+ std::unique_ptr pFilter = PdfFilterFactory::Create( eFilter ); - if( !pFilter.get() ) - { - printf("!!! Filter %i not implemented.\n", eFilter); -@@ -256,7 +256,7 @@ int main() - char* pLargeBuffer2 = static_cast(malloc( strlen(pszInputAscii85Lzw) * 6 )); - - try { -- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCII85Decode ); -+ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCII85Decode ); - pFilter->Decode( pszInputAscii85Lzw, strlen(pszInputAscii85Lzw), - &pLargeBuffer1, &lLargeBufer1 ); - pFilter->Encode( pLargeBuffer1, lLargeBufer1, -diff -ruNp a/test/VariantTest/VariantTest.cpp b/test/VariantTest/VariantTest.cpp ---- a/test/VariantTest/VariantTest.cpp 2010-10-21 19:09:00.000000000 +0200 -+++ b/test/VariantTest/VariantTest.cpp 2019-01-16 10:25:32.418465600 +0100 -@@ -124,7 +124,7 @@ int main() - printf("This test tests the PdfVariant class.\n"); - printf("---\n"); - -- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); -+ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); - - // testing strings - TEST_SAFE_OP( Test( "(Hallo Welt!)", ePdfDataType_String ) ); -diff -ruNp a/test/unit/FilterTest.cpp b/test/unit/FilterTest.cpp ---- a/test/unit/FilterTest.cpp 2016-05-12 22:25:45.000000000 +0200 -+++ b/test/unit/FilterTest.cpp 2019-01-16 10:25:31.464162600 +0100 -@@ -59,7 +59,7 @@ void FilterTest::TestFilter( EPdfFilter - pdf_long lEncoded; - pdf_long lDecoded; - -- std::auto_ptr pFilter = PdfFilterFactory::Create( eFilter ); -+ std::unique_ptr pFilter = PdfFilterFactory::Create( eFilter ); - if( !pFilter.get() ) - { - printf("!!! Filter %i not implemented.\n", eFilter); -@@ -123,7 +123,7 @@ void FilterTest::testFilters() - - void FilterTest::testCCITT() - { -- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_CCITTFaxDecode ); -+ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_CCITTFaxDecode ); - if( !pFilter.get() ) - { - printf("!!! ePdfFilter_CCITTFaxDecode not implemented skipping test!\n"); diff --git a/ports/podofo/0003-uwp_fix.patch b/ports/podofo/0003-uwp_fix.patch index 91872d7ebeafd6..4801447c7f9421 100644 --- a/ports/podofo/0003-uwp_fix.patch +++ b/ports/podofo/0003-uwp_fix.patch @@ -1,7 +1,7 @@ -diff --git a/src/base/PdfCompilerCompat.h b/src/base/PdfCompilerCompat.h -index 706875f..8efb349 100644 ---- a/src/base/PdfCompilerCompat.h -+++ b/src/base/PdfCompilerCompat.h +diff --git a/src/podofo/base/PdfCompilerCompat.h b/src/podofo/base/PdfCompilerCompat.h +index 146731d..7041712 100644 +--- a/src/podofo/base/PdfCompilerCompat.h ++++ b/src/podofo/base/PdfCompilerCompat.h @@ -113,6 +113,10 @@ #define NOMINMAX #endif diff --git a/ports/podofo/0005-fix-crypto.patch b/ports/podofo/0005-fix-crypto.patch new file mode 100644 index 00000000000000..a873ee4c9efa19 --- /dev/null +++ b/ports/podofo/0005-fix-crypto.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f23dd5a..fd9e8ed 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -315,11 +315,12 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX) + FIND_PACKAGE(ZLIB REQUIRED) + MESSAGE("Found zlib headers in ${ZLIB_INCLUDE_DIR}, library at ${ZLIB_LIBRARIES}") + +-FIND_PACKAGE(LIBCRYPTO) ++FIND_PACKAGE(OpenSSL) + +-IF(LIBCRYPTO_FOUND) ++IF(OpenSSL_FOUND) + SET(PODOFO_HAVE_OPENSSL TRUE) +- INCLUDE_DIRECTORIES(${LIBCRYPTO_INCLUDE_DIR}) ++ LIST(APPEND OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto) ++ ADD_DEFINITIONS(-DPODOFO_HAVE_OPENSSL_1_1) + MESSAGE("Found OpenSSL's libCrypto headers in ${LIBCRYPTO_INCLUDE_DIR}, library at ${LIBCRYPTO_LIBRARIES}") + ELSE(LIBCRYPTO_FOUND) + MESSAGE("OpenSSL's libCrypto not found. Encryption support will be disabled") +@@ -396,8 +397,6 @@ ENDIF(CppUnit_FOUND) + + ENDIF(NOT PODOFO_BUILD_LIB_ONLY) + +-FIND_PACKAGE(OpenSSL) +- + FIND_PACKAGE(FREETYPE REQUIRED) + MESSAGE("Found freetype library at ${FREETYPE_LIBRARIES}, headers ${FREETYPE_INCLUDE_DIR}") + diff --git a/ports/podofo/CONTROL b/ports/podofo/CONTROL deleted file mode 100644 index 630b9efcf3c0e3..00000000000000 --- a/ports/podofo/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: podofo -Version: 0.9.6-7 -Homepage: https://sourceforge.net/projects/podofo/ -Description: PoDoFo is a library to work with the PDF file format -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype - -Feature: fontconfig -Description: Enable font manager support on Unix platforms. -Build-Depends: fontconfig diff --git a/ports/podofo/fix-x64-osx.patch b/ports/podofo/fix-x64-osx.patch new file mode 100644 index 00000000000000..621f0f68e8e43e --- /dev/null +++ b/ports/podofo/fix-x64-osx.patch @@ -0,0 +1,13 @@ +diff --git a/src/podofo/base/PdfDate.cpp b/src/podofo/base/PdfDate.cpp +index cefa221..75d80e4 100644 +--- a/src/podofo/base/PdfDate.cpp ++++ b/src/podofo/base/PdfDate.cpp +@@ -196,7 +196,7 @@ PdfDate::PdfDate( const PdfString & sDate ) + + strncpy(m_szDate,sDate.GetString(),PDF_DATE_BUFFER_SIZE); + +- struct tm _tm{}; ++ struct tm _tm; memset (&_tm, 0, sizeof(struct tm)); + _tm.tm_mday = 1; + + const char * pszDate = sDate.GetString(); diff --git a/ports/podofo/freetype.patch b/ports/podofo/freetype.patch new file mode 100644 index 00000000000000..f241690f719136 --- /dev/null +++ b/ports/podofo/freetype.patch @@ -0,0 +1,18 @@ +diff --git a/cmake/modules/FindFREETYPE.cmake b/cmake/modules/FindFREETYPE.cmake +index 41114798f..0911dc092 100644 +--- a/cmake/modules/FindFREETYPE.cmake ++++ b/cmake/modules/FindFREETYPE.cmake +@@ -15,9 +15,13 @@ SET(FREETYPE_FIND_QUIETLY 1) + # first we try to find ft2build.h in the new location as + # of freetype 2.5.1 + FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h ++ PATHS + /usr/include/freetype2 + /usr/local/include/freetype2 + /usr/X11/include/freetype2 ++ PATH_SUFFIXES ++ freetype2 ++ include/freetype2 + NO_CMAKE_SYSTEM_PATH + ) + diff --git a/ports/podofo/portfile.cmake b/ports/podofo/portfile.cmake index 759b6dbe130dac..b47fbaaf8a3a59 100644 --- a/ports/podofo/portfile.cmake +++ b/ports/podofo/portfile.cmake @@ -1,24 +1,21 @@ -include(vcpkg_common_functions) +set(PODOFO_VERSION 0.9.7) -set(PODOFO_VERSION 0.9.6) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/podofo/files/podofo/${PODOFO_VERSION}/podofo-${PODOFO_VERSION}.tar.gz/download" - FILENAME "podofo-${PODOFO_VERSION}.tar.gz" - SHA512 35c1a457758768bdadc93632385f6b9214824fead279f1b85420443fb2135837cefca9ced476df0d47066f060e9150e12fcd40f60fa1606b177da433feb20130 -) - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (VCPKG_TARGET_IS_UWP) set(ADDITIONAL_PATCH "0003-uwp_fix.patch") endif() -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + REPO podofo/podofo REF ${PODOFO_VERSION} + FILENAME "podofo-${PODOFO_VERSION}.tar.gz" + SHA512 0e699739c2fb7d4d02ffca371504bb19f3a8a97ddcbfc06f8d9636db9e73064b4f633f7f09bce92140bb2174610ad68c1e5f8460d474d176ab803ed28295251b PATCHES - 0001-unique_ptr.patch 0002-HAVE_UNISTD_H.patch + freetype.patch ${ADDITIONAL_PATCH} + 0005-fix-crypto.patch + fix-x64-osx.patch ) set(PODOFO_NO_FONTMANAGER ON) @@ -56,5 +53,4 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/podofo) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/podofo/COPYING ${CURRENT_PACKAGES_DIR}/share/podofo/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/podofo/vcpkg.json b/ports/podofo/vcpkg.json new file mode 100644 index 00000000000000..19429b858ad0f0 --- /dev/null +++ b/ports/podofo/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "podofo", + "version": "0.9.7", + "description": "PoDoFo is a library to work with the PDF file format", + "homepage": "https://sourceforge.net/projects/podofo/", + "supports": "!uwp", + "dependencies": [ + "freetype", + "libjpeg-turbo", + "libpng", + "openssl", + "tiff", + "zlib" + ], + "features": { + "fontconfig": { + "description": "Enable font manager support on Unix platforms", + "dependencies": [ + "fontconfig" + ] + } + } +} diff --git a/ports/poissonrecon/CMakeLists.txt b/ports/poissonrecon/CMakeLists.txt new file mode 100644 index 00000000000000..d0b108e4c907c0 --- /dev/null +++ b/ports/poissonrecon/CMakeLists.txt @@ -0,0 +1,89 @@ +cmake_minimum_required(VERSION 3.12) + +project(PoissonRecon LANGUAGES NONE) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/${PROJECT_NAME}" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/poissonrecon" CACHE PATH "Path where cmake configs will be installed") + +find_package(PNG REQUIRED) +find_package(JPEG REQUIRED) + +set(PoissonRecon_HEADERS +"Src/Allocator.h" +"Src/Array.h" +"Src/BinaryNode.h" +"Src/BlockedVector.h" +"Src/BSplineData.h" +"Src/CmdLineParser.h" +"Src/Factor.h" +"Src/FEMTree.h" +"Src/FunctionData.h" +"Src/Geometry.h" +"Src/Image.h" +"Src/JPEG.h" +"Src/LinearSolvers.h" +"Src/MarchingCubes.h" +"Src/MAT.h" +"Src/MyMiscellany.h" +"Src/Ply.h" +"Src/PlyFile.h" +"Src/PNG.h" +"Src/PointStream.h" +"Src/PointStreamData.h" +"Src/Polynomial.h" +"Src/PPolynomial.h" +"Src/PreProcessor.h" +#"Src/Rasterizer.h" +#"Src/RegularGrid.h" +"Src/RegularTree.h" +"Src/SparseMatrix.h" +"Src/SparseMatrixInterface.h" +"Src/Window.h" +) + +set(PoissonRecon_INLINES +"Src/Array.inl" +"Src/BMPStream.inl" +"Src/BSplineData.inl" +"Src/CmdLineParser.inl" +"Src/FEMTree.Evaluation.inl" +"Src/FEMTree.Initialize.inl" +"Src/FEMTree.inl" +"Src/FEMTree.IsoSurface.specialized.inl" +"Src/FEMTree.SortedTreeNodes.inl" +"Src/FEMTree.System.inl" +"Src/FEMTree.WeightedSamples.inl" +"Src/FunctionData.inl" +"Src/Geometry.inl" +"Src/JPEG.inl" +"Src/MAT.inl" +"Src/PlyFile.inl" +"Src/PNG.inl" +"Src/PointStream.inl" +"Src/Polynomial.inl" +"Src/PPolynomial.inl" +#"Src/Rasterizer.inl" +#"Src/RegularGrid.inl" +"Src/RegularTree.inl" +"Src/SparseMatrix.inl" +"Src/SparseMatrixInterface.inl" +"Src/Window.inl" +) + +add_library(PoissonRecon INTERFACE) +target_link_libraries(PoissonRecon INTERFACE PNG::PNG JPEG::JPEG) +set_target_properties(PoissonRecon PROPERTIES PUBLIC_HEADER "${PoissonRecon_HEADERS};${PoissonRecon_INLINES}") +target_include_directories(PoissonRecon INTERFACE $) + +install(TARGETS PoissonRecon EXPORT PoissonReconTargets + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}" +) +install(EXPORT PoissonReconTargets + NAMESPACE PoissonRecon:: + DESTINATION ${INSTALL_CMAKE_DIR} +) diff --git a/ports/poissonrecon/disable-gcc5-checks.patch b/ports/poissonrecon/disable-gcc5-checks.patch new file mode 100644 index 00000000000000..d147df944d86ed --- /dev/null +++ b/ports/poissonrecon/disable-gcc5-checks.patch @@ -0,0 +1,87 @@ +diff --git a/Src/FEMTree.System.inl b/Src/FEMTree.System.inl +index ae554d4..87f0423 100644 +--- a/Src/FEMTree.System.inl ++++ b/Src/FEMTree.System.inl +@@ -792,7 +792,7 @@ void FEMTree< Dim , Real >::_solveRegularMG( UIntPack< FEMSigs ... > , typename + } + } + +-#if defined( __GNUC__ ) && __GNUC__ < 5 ++#if defined( __GNUC__ ) && __GNUC__ < 5 && 0 + #warning "you've got me gcc version<5" + template< unsigned int Dim , class Real > + template< unsigned int ... FEMSigs > +@@ -1679,7 +1679,7 @@ SparseMatrix< Real , matrix_index_type > FEMTree< Dim , Real >::systemMatrix( UI + typename FEMTreeNode::template ConstNeighbors< OverlapSizes > neighbors; + neighborKey.getNeighbors( OverlapRadii() , OverlapRadii() , _sNodes.treeNodes[i] , neighbors ); + +-#if defined( __GNUC__ ) && __GNUC__ < 5 ++#if defined( __GNUC__ ) && __GNUC__ < 5 && 0 + #warning "you've got me gcc version<5" + matrix.setRowSize( ii , _getMatrixRowSize( UIntPack< FEMSigs ... >() , neighbors ) ); + #else // !__GNUC__ || __GNUC__ >=5 +diff --git a/Src/FEMTree.WeightedSamples.inl b/Src/FEMTree.WeightedSamples.inl +index b263dda..282387e 100644 +--- a/Src/FEMTree.WeightedSamples.inl ++++ b/Src/FEMTree.WeightedSamples.inl +@@ -225,7 +225,7 @@ Real FEMTree< Dim , Real >::_splatPointData( Allocator< FEMTreeNode > *nodeAlloc + + width = 1.0 / ( 1<<_localDepth( temp ) ); + _v = v * weight / Real( pow( width , dim ) ) * Real( dx ); +-#if defined( __GNUC__ ) && __GNUC__ < 5 ++#if defined( __GNUC__ ) && __GNUC__ < 5 && 0 + #warning "you've got me gcc version<5" + _splatPointData< CreateNodes , ThreadSafe , V >( nodeAllocator , temp , position , _v , dataInfo , dataKey ); + #else // !__GNUC__ || __GNUC__ >=5 +@@ -238,7 +238,7 @@ Real FEMTree< Dim , Real >::_splatPointData( Allocator< FEMTreeNode > *nodeAlloc + width = 1.0 / ( 1<<_localDepth( temp ) ); + + _v = v * weight / Real( pow( width , dim ) ) * Real( dx ); +-#if defined( __GNUC__ ) && __GNUC__ < 5 ++#if defined( __GNUC__ ) && __GNUC__ < 5 && 0 + #warning "you've got me gcc version<5" + _splatPointData< CreateNodes , ThreadSafe , V >( nodeAllocator , temp , position , _v , dataInfo , dataKey ); + #else // !__GNUC__ || __GNUC__ >=5 +diff --git a/Src/FEMTree.h b/Src/FEMTree.h +index 8aa3b41..0be77a1 100644 +--- a/Src/FEMTree.h ++++ b/Src/FEMTree.h +@@ -219,6 +219,7 @@ template< class Data , typename Pack > struct _SparseOrDenseNodeData{}; + template< class Data , unsigned int ... FEMSigs > + struct _SparseOrDenseNodeData< Data , UIntPack< FEMSigs ... > > + { ++ virtual ~_SparseOrDenseNodeData() {} + static const unsigned int Dim = sizeof ... ( FEMSigs ); + typedef UIntPack< FEMSigs ... > FEMSignatures; + typedef Data data_type; +@@ -1841,7 +1842,7 @@ protected: + + template< unsigned int ... FEMSigs > + int _getProlongedMatrixRowSize( const FEMTreeNode* node , const typename FEMTreeNode::template ConstNeighbors< UIntPack< BSplineOverlapSizes< FEMSignature< FEMSigs >::Degree >::OverlapSize ... > >& pNeighbors ) const; +-#if defined( __GNUC__ ) && __GNUC__ < 5 ++#if defined( __GNUC__ ) && __GNUC__ < 5 && 0 + #warning "you've got me gcc version<5" + template< unsigned int ... FEMSigs > + int _getMatrixRowSize( UIntPack< FEMSigs ... > , const typename FEMTreeNode::template ConstNeighbors< UIntPack< BSplineOverlapSizes< FEMSignature< FEMSigs >::Degree >::OverlapSize ... > >& neighbors ) const; +diff --git a/Src/FEMTree.inl b/Src/FEMTree.inl +index e4c2310..f88316b 100644 +--- a/Src/FEMTree.inl ++++ b/Src/FEMTree.inl +@@ -374,7 +374,7 @@ SparseNodeData< OutData , UIntPack< DataSigs ... > > FEMTree< Dim , Real >::setD + AddAtomic( weightSum , sample.weight ); + out *= sample.weight; + Allocator< FEMTreeNode > *nodeAllocator = nodeAllocators.size() ? nodeAllocators[ thread ] : NULL; +-#if defined( __GNUC__ ) && __GNUC__ < 5 ++#if defined( __GNUC__ ) && __GNUC__ < 5 && 0 + #warning "you've got me gcc version<5" + if( density ) AddAtomic( _pointWeightSum , _splatPointData< true , true , DensityDegree , OutData >( nodeAllocator , *density , p , out , dataField , densityKey , oneKey ? *( (DataKey*)&densityKey ) : dataKey , 0 , maxDepth , Dim , depthBias ) * sample.weight ); + #else // !__GNUC__ || __GNUC__ >=5 +@@ -383,7 +383,7 @@ + else + { + Real width = (Real)( 1.0 / ( 1<( nodeAllocator , _leaf< true >( nodeAllocator , p , maxDepth ) , p , out / (Real)pow( width , Dim ) , dataField , oneKey ? *( (DataKey*)&densityKey ) : dataKey ); + #else // !__GNUC__ || __GNUC__ >=5 diff --git a/ports/poissonrecon/portfile.cmake b/ports/poissonrecon/portfile.cmake new file mode 100644 index 00000000000000..f7c04b406bd631 --- /dev/null +++ b/ports/poissonrecon/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mkazhdan/PoissonRecon + REF 03f73754e994eb388de63285d3a2772493168e8a + SHA512 be1d6842952d2b27860b5a82d9cc536da213fd2e44d946c512e04881af66a4c7c039930347fe9db5b168cc356e55167c9bdbdb39eab9cea68882dc01a9482867 + HEAD_REF master + PATCHES + use-external-libs.patch + disable-gcc5-checks.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TOOLS=OFF +) + +file(WRITE "${CURRENT_PACKAGES_DIR}/share/poissonrecon/PoissonRecon-config.cmake" [=[ +include(CMakeFindDependencyMacro) +find_dependency(PNG) +find_dependency(JPEG) +include("${CMAKE_CURRENT_LIST_DIR}/PoissonReconTargets.cmake") +]=]) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/poissonrecon/use-external-libs.patch b/ports/poissonrecon/use-external-libs.patch new file mode 100644 index 00000000000000..cb2918a67f3b84 --- /dev/null +++ b/ports/poissonrecon/use-external-libs.patch @@ -0,0 +1,42 @@ +--- a/Src/JPEG.h ++++ b/Src/JPEG.h +@@ -6,14 +6,10 @@ + + #ifdef _WIN32 + #include +-#include "JPEG/jpeglib.h" +-#include "JPEG/jerror.h" +-#include "JPEG/jmorecfg.h" +-#else // !_WIN32 ++#endif // _WIN32 + #include + #include + #include +-#endif // _WIN32 + + struct my_error_mgr + { +--- a/Src/PNG.h ++++ b/Src/PNG.h +@@ -1,7 +1,7 @@ + #ifndef PNG_INCLUDED + #define PNG_INCLUDED + +-#include "PNG/png.h" ++#include + + struct PNGReader : public ImageReader + { +--- a/Src/PNG.inl ++++ b/Src/PNG.inl +@@ -1,10 +1,6 @@ + #include + #include +-#ifdef _WIN32 +-#include "PNG/png.h" +-#else // !_WIN32 + #include +-#endif // _WIN32 + + inline PNGReader::PNGReader( const char* fileName , unsigned int& width , unsigned int& height , unsigned int& channels ) + { diff --git a/ports/poissonrecon/vcpkg.json b/ports/poissonrecon/vcpkg.json new file mode 100644 index 00000000000000..513405c1226f79 --- /dev/null +++ b/ports/poissonrecon/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "poissonrecon", + "version-string": "2019-09-15", + "description": "Adaptive Multigrid Solvers", + "homepage": "https://github.com/mkazhdan/PoissonRecon", + "dependencies": [ + "libjpeg-turbo", + "libpng", + "zlib" + ] +} diff --git a/ports/poly2tri/CMakeLists.txt b/ports/poly2tri/CMakeLists.txt new file mode 100644 index 00000000000000..d3878712afaaf9 --- /dev/null +++ b/ports/poly2tri/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 3.0) + +project(poly2tri LANGUAGES C CXX) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/${PROJECT_NAME}" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/${PROJECT_NAME}" CACHE PATH "Path where cmake configs will be installed") + +set(${PROJECT_NAME}_HEADERS + "poly2tri/poly2tri.h" +) + +set(${PROJECT_NAME}_COMMON_HEADERS + "poly2tri/common/shapes.h" + "poly2tri/common/utils.h" +) + +set(${PROJECT_NAME}_SWEEP_HEADERS + "poly2tri/sweep/advancing_front.h" + "poly2tri/sweep/cdt.h" + "poly2tri/sweep/sweep.h" + "poly2tri/sweep/sweep_context.h" +) + +set(${PROJECT_NAME}_SOURCES + "poly2tri/common/shapes.cc" + "poly2tri/sweep/advancing_front.cc" + "poly2tri/sweep/cdt.cc" + "poly2tri/sweep/sweep.cc" + "poly2tri/sweep/sweep_context.cc" +) + +add_library(${PROJECT_NAME} "${${PROJECT_NAME}_HEADERS}" "${${PROJECT_NAME}_COMMON_HEADERS}" "${${PROJECT_NAME}_SWEEP_HEADERS}" "${${PROJECT_NAME}_SOURCES}") +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${${PROJECT_NAME}_HEADERS}") +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ + $ +) + +install(FILES ${${PROJECT_NAME}_COMMON_HEADERS} DESTINATION "${INSTALL_INCLUDE_DIR}/common") +install(FILES ${${PROJECT_NAME}_SWEEP_HEADERS} DESTINATION "${INSTALL_INCLUDE_DIR}/sweep") + +install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}" + COMPONENT dev +) + +install (EXPORT ${PROJECT_NAME}Targets + FILE ${PROJECT_NAME}Config.cmake + NAMESPACE ${PROJECT_NAME}:: + DESTINATION "${INSTALL_CMAKE_DIR}" +) diff --git a/ports/poly2tri/portfile.cmake b/ports/poly2tri/portfile.cmake new file mode 100644 index 00000000000000..278e3d8ee878d0 --- /dev/null +++ b/ports/poly2tri/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO greenm01/poly2tri + REF 88de49021b6d9bef6faa1bc94ceb3fbd85c3c204 + SHA512 fa256bcf923ad59f42205edf5a7e07cac6cbd9a37cefb9a0961a2e06aea7fa8ffd09d4e26154c0028601c12804483842cb935d9f602385f5f203c9628382c4fb + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/poly2tri/vcpkg.json b/ports/poly2tri/vcpkg.json new file mode 100644 index 00000000000000..9fbdff23afbfa0 --- /dev/null +++ b/ports/poly2tri/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "poly2tri", + "version-string": "2020-07-21", + "port-version": 1, + "description": "The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons.", + "homepage": "https://github.com/greenm01/poly2tri", + "supports": "!uwp" +} diff --git a/ports/polyclipping/CONTROL b/ports/polyclipping/CONTROL deleted file mode 100644 index 0e97f0a32019c6..00000000000000 --- a/ports/polyclipping/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: polyclipping -Version: 6.4.2 -Description: The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons. diff --git a/ports/polyclipping/FindCLIPPER.cmake b/ports/polyclipping/FindCLIPPER.cmake new file mode 100644 index 00000000000000..5a1fcab34ab7c6 --- /dev/null +++ b/ports/polyclipping/FindCLIPPER.cmake @@ -0,0 +1,45 @@ +# Distributed under the OSI-approved BSD 3-Clause License. + +#.rst: +# FindCLIPPER +# -------- +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module will set the following variables in your project:: +# +# ``CLIPPER_FOUND`` +# True if CLIPPER found on the local system +# +# ``CLIPPER_INCLUDE_DIRS`` +# Location of CLIPPER header files. +# +# ``CLIPPER_LIBRARIES`` +# The clipper libraries. +# + +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +if(NOT CLIPPER_INCLUDE_DIR) + find_path(CLIPPER_INCLUDE_DIR clipper.hpp + PATH_SUFFIXES polyclipping) +endif() + +if(NOT CLIPPER_LIBRARY) + find_library(CLIPPER_LIBRARY_RELEASE NAMES polyclipping PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib" NO_DEFAULT_PATH) + find_library(CLIPPER_LIBRARY_DEBUG NAMES polyclipping PATHS "${CMAKE_CURRENT_LIST_DIR}/../../debug/lib" NO_DEFAULT_PATH) + select_library_configurations(CLIPPER) +endif() + +mark_as_advanced(CLIPPER_LIBRARY CLIPPER_INCLUDE_DIR) + +find_package_handle_standard_args(CLIPPER + REQUIRED_VARS CLIPPER_LIBRARY CLIPPER_INCLUDE_DIR +) + +if(CLIPPER_FOUND) + set(CLIPPER_LIBRARIES ${CLIPPER_LIBRARY}) + set(CLIPPER_INCLUDE_DIRS ${CLIPPER_INCLUDE_DIR}) +endif() diff --git a/ports/polyclipping/fix_targets.patch b/ports/polyclipping/fix_targets.patch new file mode 100644 index 00000000000000..ebae8f69b129e6 --- /dev/null +++ b/ports/polyclipping/fix_targets.patch @@ -0,0 +1,17 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index f0ed7e8..a5ed444 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -19,3 +19,12 @@ INSTALL (TARGETS polyclipping LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + INSTALL (FILES "${PCFILE}" DESTINATION "${CMAKE_INSTALL_PKGCONFIGDIR}") + + SET_TARGET_PROPERTIES(polyclipping PROPERTIES VERSION 22.0.0 SOVERSION 22 ) ++ ++install(TARGETS polyclipping EXPORT polyclippingConfig) ++ ++install( ++ EXPORT polyclippingConfig ++ NAMESPACE polyclipping:: ++ DESTINATION share/polyclipping ++) ++target_include_directories(polyclipping PUBLIC $) diff --git a/ports/polyclipping/portfile.cmake b/ports/polyclipping/portfile.cmake index b1b1997cfc9a77..8eb73a6353ccab 100644 --- a/ports/polyclipping/portfile.cmake +++ b/ports/polyclipping/portfile.cmake @@ -1,18 +1,13 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/polyclipping/files/clipper_ver6.4.2.zip/download" - FILENAME "clipper_ver6.4.2.zip" - SHA512 ffc88818c44a38aa278d5010db6cfd505796f39664919f1e48c7fa9267563f62135868993e88f7246dcd688241d1172878e4a008a390648acb99738452e3e5dd -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + REPO polyclipping + FILENAME "clipper_ver6.4.2.zip" NO_REMOVE_ONE_LEVEL - REF 6.4.2 + SHA512 ffc88818c44a38aa278d5010db6cfd505796f39664919f1e48c7fa9267563f62135868993e88f7246dcd688241d1172878e4a008a390648acb99738452e3e5dd + PATCHES + fix_targets.patch ) vcpkg_configure_cmake( @@ -20,9 +15,13 @@ vcpkg_configure_cmake( PREFER_NINJA ) + vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindCLIPPER.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/clipper) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/clipper) file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/polyclipping/vcpkg-cmake-wrapper.cmake b/ports/polyclipping/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..bd89342084b657 --- /dev/null +++ b/ports/polyclipping/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +set(clipper_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${clipper_PREV_MODULE_PATH}) diff --git a/ports/polyclipping/vcpkg.json b/ports/polyclipping/vcpkg.json new file mode 100644 index 00000000000000..8e524232f81085 --- /dev/null +++ b/ports/polyclipping/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "polyclipping", + "version-string": "6.4.2", + "port-version": 7, + "description": "The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons.", + "homepage": "https://sourceforge.net/projects/polyclipping/" +} diff --git a/ports/polyhook2/portfile.cmake b/ports/polyhook2/portfile.cmake new file mode 100644 index 00000000000000..5d638eb9a15d82 --- /dev/null +++ b/ports/polyhook2/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "Linux" "OSX" "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stevemk14ebr/PolyHook_2_0 + REF 01ec7c7ddee1d0da9cc49c4adf930eb5d6a86ba1 + SHA512 9d482cd4ec9161b437ee976130b4e64b3acb5f1eb4c47291074110d86ca1ca7479b5c6d0af5be2c7628f702dc858e6a9ef10cd8dcf915b9f022f158e0e4ad0ba + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + capstone POLYHOOK_DISASM_CAPSTONE + zydis POLYHOOK_DISASM_ZYDIS + exception POLYHOOK_FEATURE_EXCEPTION + detours POLYHOOK_FEATURE_DETOURS + inlinentd POLYHOOK_FEATURE_INLINENTD + pe POLYHOOK_FEATURE_PE + virtuals POLYHOOK_FEATURE_VIRTUALS +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(BUILD_SHARED_LIB OFF) +else() + set(BUILD_SHARED_LIB ON) +endif() + +if (VCPKG_CRT_LINKAGE STREQUAL "static") + set(BUILD_STATIC_RUNTIME ON) +else() + set(BUILD_STATIC_RUNTIME OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DPOLYHOOK_BUILD_SHARED_LIB=${BUILD_SHARED_LIB} + -DPOLYHOOK_BUILD_STATIC_RUNTIME=${BUILD_STATIC_RUNTIME} + -DPOLYHOOK_USE_EXTERNAL_ASMJIT=ON + -DPOLYHOOK_USE_EXTERNAL_CAPSTONE=ON + -DPOLYHOOK_USE_EXTERNAL_ZYDIS=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/PolyHook_2 TARGET_PATH share/PolyHook_2) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/polyhook2/vcpkg.json b/ports/polyhook2/vcpkg.json new file mode 100644 index 00000000000000..252fb1a87217a2 --- /dev/null +++ b/ports/polyhook2/vcpkg.json @@ -0,0 +1,54 @@ +{ + "name": "polyhook2", + "version-string": "2021-05-09", + "port-version": 1, + "description": "C++17, x86/x64 Hooking Library v2.0", + "homepage": "https://github.com/stevemk14ebr/PolyHook_2_0", + "supports": "!(arm | uwp | linux | osx)", + "default-features": [ + "capstone", + "detours", + "exception", + "inlinentd", + "pe", + "virtuals", + "zydis" + ], + "features": { + "capstone": { + "description": "Capstone disassembler integration.", + "dependencies": [ + { + "name": "capstone", + "features": [ + "x86" + ] + } + ] + }, + "detours": { + "description": "Implement detour functionality" + }, + "exception": { + "description": "Implement all exception hooking functionality" + }, + "inlinentd": { + "description": "Support inline hooks without specifying typedefs by generating callback stubs at runtime with AsmJit", + "dependencies": [ + "asmjit" + ] + }, + "pe": { + "description": "Implement all win pe hooking functionality" + }, + "virtuals": { + "description": "Implement all virtual table hooking functionality" + }, + "zydis": { + "description": "Zydis disassembler integration.", + "dependencies": [ + "zydis" + ] + } + } +} diff --git a/ports/polymorphic-value/001_no_catch_submodule.patch b/ports/polymorphic-value/001_no_catch_submodule.patch new file mode 100644 index 00000000000000..8fec58a76a080c --- /dev/null +++ b/ports/polymorphic-value/001_no_catch_submodule.patch @@ -0,0 +1,33 @@ +diff --git C:/Users/Charles Barto/Source/vcpkg/buildtrees/polymorphic-value/src/1.3.0-33dc249788/CMakeLists.txt C:/Users/Charles Barto/patched_list.txt +index 2819bf6a4..0ee5fba76 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,9 +9,9 @@ set(POLYMOPHIC_VALUE_VERSION "1.3.0") # Revision 3, see paper p0201r3 + project(polymorphic_value VERSION ${POLYMOPHIC_VALUE_VERSION}) + + option(ENABLE_SANITIZERS "Enable Address Sanitizer and Undefined Behaviour Sanitizer if available" OFF) +- ++if(BUILD_TESTING) + add_subdirectory(externals/catch) +- ++endif() + add_library(polymorphic_value INTERFACE) + target_include_directories(polymorphic_value + INTERFACE +@@ -45,6 +45,7 @@ target_compile_features(polymorphic_value + add_library(polymorphic_value::polymorphic_value ALIAS polymorphic_value) + + if(POLYMORPHIC_IS_NOT_SUBPROJECT) ++ if(BUILD_TESTING) + add_executable(test_polymorphic_value test_polymorphic_value.cpp) + target_link_libraries(test_polymorphic_value + PRIVATE +@@ -107,7 +108,7 @@ if(POLYMORPHIC_IS_NOT_SUBPROJECT) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/externals/catch/contrib) + include(Catch) + catch_discover_tests(test_polymorphic_value) +- ++ endif() + install( + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/polymorphic_value.h" diff --git a/ports/polymorphic-value/002_fixed_config.patch b/ports/polymorphic-value/002_fixed_config.patch new file mode 100644 index 00000000000000..77a99b058681dd --- /dev/null +++ b/ports/polymorphic-value/002_fixed_config.patch @@ -0,0 +1,14 @@ +diff --git a/./broken_config.cmake.in b/./fixed_config.cmake.in +index e64f8a20f..38c441451 100644 +--- a/polymorphic_value-config.cmake.in ++++ b/polymorphic_value-config.cmake.in +@@ -1,5 +1,7 @@ + @PACKAGE_INIT@ + +-set_and_check(POLYMORPHIC_VALUE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") + +-check_required_components(Foo) ++ ++check_required_components(polymorphic_value) ++ ++include(${CMAKE_CURRENT_LIST_DIR}/polymorphic_value-target.cmake) diff --git a/ports/polymorphic-value/portfile.cmake b/ports/polymorphic-value/portfile.cmake new file mode 100644 index 00000000000000..5a03c827b810dd --- /dev/null +++ b/ports/polymorphic-value/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jbcoe/polymorphic_value + REF 1.3.0 + SHA512 67d49933c46d2a2bccb68c65c6f28b92603e193c68ff434b2c6b1602a573855a176fc98227d85cd24a64ae9299461adb42e792b4f165482bb250488620161742 + HEAD_REF master + PATCHES 001_no_catch_submodule.patch + 002_fixed_config.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +if(VCPKG_HEAD_VERSION) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/polymorphic_value TARGET_PATH share/polymorphic_value) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/polymorphic_value) + file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE.txt") +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file( + INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) + diff --git a/ports/polymorphic-value/vcpkg.json b/ports/polymorphic-value/vcpkg.json new file mode 100644 index 00000000000000..a47f482943f5cf --- /dev/null +++ b/ports/polymorphic-value/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "polymorphic-value", + "version-string": "1.3.0", + "port-version": 2, + "description": "A polymorphic value-type for C++", + "homepage": "https://github.com/jbcoe/polymorphic_value" +} diff --git a/ports/ponder/CONTROL b/ports/ponder/CONTROL deleted file mode 100644 index 7f935d30489158..00000000000000 --- a/ports/ponder/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: ponder -Version: 3.0.0 -Description: A C++ multi-purpose reflection library. diff --git a/ports/ponder/github-121.patch b/ports/ponder/github-121.patch new file mode 100644 index 00000000000000..e7564429d40141 --- /dev/null +++ b/ports/ponder/github-121.patch @@ -0,0 +1,21 @@ +From 83b292f263b92082e981a82f5777d927a61772ee Mon Sep 17 00:00:00 2001 +From: Cheney-Wang +Date: Fri, 13 Mar 2020 02:50:33 -0700 +Subject: [PATCH] Include in config.h + +--- + include/ponder/config.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/ponder/config.hpp b/include/ponder/config.hpp +index cd035c19..814403cd 100644 +--- a/include/ponder/config.hpp ++++ b/include/ponder/config.hpp +@@ -60,6 +60,7 @@ + #if defined(_MSC_VER) + #pragma warning(disable: 4275) // non dll-interface class 'X' used as base for dll-interface class 'Y' + #pragma warning(disable: 4251) // class 'X' needs to have dll-interface to be used by clients of class 'Y' ++ #include //In future MSVC, doesn't transitively , ponder will compile failed with error C2027 and C2065, so add for fixing these issues. + #endif + + #if defined(__GNUC__) && __GNUC__ <= 4 && __GNUC_MINOR__ < 9 diff --git a/ports/ponder/portfile.cmake b/ports/ponder/portfile.cmake index 8543643b5fdf9f..5c800cd7e877ab 100644 --- a/ports/ponder/portfile.cmake +++ b/ports/ponder/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO billyquith/ponder @@ -8,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES no-install-unused.patch + github-121.patch ) vcpkg_configure_cmake( diff --git a/ports/ponder/vcpkg.json b/ports/ponder/vcpkg.json new file mode 100644 index 00000000000000..265d12f5f67d77 --- /dev/null +++ b/ports/ponder/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ponder", + "version-string": "3.0.0", + "port-version": 2, + "description": "A C++ multi-purpose reflection library.", + "homepage": "https://github.com/billyquith/ponder" +} diff --git a/ports/poppler/0002-remove-test-subdirectory.patch b/ports/poppler/0002-remove-test-subdirectory.patch new file mode 100644 index 00000000000000..80dd5b53fcbdcd --- /dev/null +++ b/ports/poppler/0002-remove-test-subdirectory.patch @@ -0,0 +1,24 @@ +From aa0fa5f737b8ea3d2dfb396243be79af49274b6e Mon Sep 17 00:00:00 2001 +From: abc +Date: Fri, 18 Dec 2020 14:32:31 +0800 +Subject: [PATCH 2/2] remove test subdirectory + +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec66b515..cce875a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -749,7 +749,6 @@ endif() + if(ENABLE_GLIB) + add_subdirectory(glib) + endif() +-add_subdirectory(test) + if(ENABLE_QT5) + add_subdirectory(qt5) + endif() +-- +2.29.2.windows.2 + diff --git a/ports/poppler/0003-fix-gperf-not-recognized.patch b/ports/poppler/0003-fix-gperf-not-recognized.patch new file mode 100644 index 00000000000000..e6edf39e79325b --- /dev/null +++ b/ports/poppler/0003-fix-gperf-not-recognized.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cce875a..0b04be7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -530,8 +530,8 @@ endif() + if (GPERF AND RUN_GPERF_IF_PRESENT) + macro(ADD_GPERF_FILE input) + add_custom_command(OUTPUT poppler/${input}.c +- COMMAND gperf poppler/${input}.gperf > ${CMAKE_CURRENT_BINARY_DIR}/poppler/${input}.c +- COMMAND gperf poppler/${input}.gperf > ${CMAKE_CURRENT_SOURCE_DIR}/poppler/${input}.pregenerated.c ++ COMMAND ${GPERF} poppler/${input}.gperf > ${CMAKE_CURRENT_BINARY_DIR}/poppler/${input}.c ++ COMMAND ${GPERF} poppler/${input}.gperf > ${CMAKE_CURRENT_SOURCE_DIR}/poppler/${input}.pregenerated.c + COMMAND clang-format -i ${CMAKE_CURRENT_SOURCE_DIR}/poppler/${input}.pregenerated.c || true + DEPENDS poppler/${input}.gperf + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/ports/poppler/0004-disable-clang-format.patch b/ports/poppler/0004-disable-clang-format.patch new file mode 100644 index 00000000000000..43a48da787bd5e --- /dev/null +++ b/ports/poppler/0004-disable-clang-format.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0b04be7..947d5be 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -532,7 +532,6 @@ if (GPERF AND RUN_GPERF_IF_PRESENT) + add_custom_command(OUTPUT poppler/${input}.c + COMMAND ${GPERF} poppler/${input}.gperf > ${CMAKE_CURRENT_BINARY_DIR}/poppler/${input}.c + COMMAND ${GPERF} poppler/${input}.gperf > ${CMAKE_CURRENT_SOURCE_DIR}/poppler/${input}.pregenerated.c +- COMMAND clang-format -i ${CMAKE_CURRENT_SOURCE_DIR}/poppler/${input}.pregenerated.c || true + DEPENDS poppler/${input}.gperf + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake new file mode 100644 index 00000000000000..74e8b22e269bdc --- /dev/null +++ b/ports/poppler/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO freedesktop/poppler + REF poppler-20.12.1 + SHA512 f692682689c0b0fcc3953a1cc157b6e1d2ce3ccab185189d6dc0807f1dd3ea2d1a9773d0b805079a30b3c8a3b0cf3ee83239ed48d7b08dc7762eba29c2033674 + HEAD_REF master + PATCHES + 0002-remove-test-subdirectory.patch + 0003-fix-gperf-not-recognized.patch + 0004-disable-clang-format.patch +) + +vcpkg_find_acquire_program(GPERF) +get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) +vcpkg_add_to_path(${GPERF_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + curl ENABLE_CURL + zlib ENABLE_ZLIB + splash ENABLE_SPLASH +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_GTK_TESTS=OFF + -DBUILD_QT5_TESTS=OFF + -DBUILD_QT6_TESTS=OFF + -DBUILD_CPP_TESTS=OFF + -DENABLE_LIBCURL=${ENABLE_CURL} + -DENABLE_UTILS=OFF + -DENABLE_GLIB=OFF + -DENABLE_GLOBJECT_INTROSPECTION=OFF + -DENABLE_QT5=OFF + -DENABLE_QT6=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json new file mode 100644 index 00000000000000..b9c59fb01f00bb --- /dev/null +++ b/ports/poppler/vcpkg.json @@ -0,0 +1,46 @@ +{ + "name": "poppler", + "version": "20.12.1", + "port-version": 5, + "description": "a PDF rendering library", + "homepage": "https://poppler.freedesktop.org/", + "dependencies": [ + { + "name": "cairo", + "platform": "osx" + }, + { + "name": "devil", + "platform": "(windows | linux) & !arm" + }, + "fontconfig", + "freetype", + "libiconv", + "openjpeg" + ], + "default-features": [ + "splash", + "zlib" + ], + "features": { + "curl": { + "description": "curl for poppler", + "dependencies": [ + "curl" + ] + }, + "splash": { + "description": "Build the Splash graphics backend", + "dependencies": [ + "boost-container", + "boost-move" + ] + }, + "zlib": { + "description": "zlib for poppler", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/popsift/portfile.cmake b/ports/popsift/portfile.cmake new file mode 100644 index 00000000000000..a0269235f7fade --- /dev/null +++ b/ports/popsift/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alicevision/popsift + REF v0.9 + SHA512 56789520872203eea86e07e8210e00c0b67d85486af16df9d620b1aff10f8d9ef5d910cf1dda6c68af7ca2ed11658ab5414ac79117b543f91a7d8d6a96a17ce0 + HEAD_REF develop +) + +include(${CURRENT_INSTALLED_DIR}/share/cuda/vcpkg_find_cuda.cmake) +vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT) + +message(STATUS "CUDA_TOOLKIT_ROOT ${CUDA_TOOLKIT_ROOT}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + apps PopSift_BUILD_EXAMPLES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DCUDA_TOOLKIT_ROOT_DIR=${CUDA_TOOLKIT_ROOT} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/PopSift) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + + # copy the apps in tools directory + if ("apps" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES popsift-demo AUTO_CLEAN) + endif() + +file(INSTALL ${SOURCE_PATH}/COPYING.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/popsift/vcpkg.json b/ports/popsift/vcpkg.json new file mode 100644 index 00000000000000..aed5386b8f9e50 --- /dev/null +++ b/ports/popsift/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "popsift", + "version-string": "0.9", + "port-version": 2, + "description": "PopSift is an implementation of the SIFT algorithm in CUDA.", + "homepage": "https://github.com/alicevision/popsift", + "supports": "!(uwp | arm | arm64 | android | x86)", + "dependencies": [ + "cuda" + ], + "features": { + "apps": { + "description": "Application programs for popsift (detection and matching)", + "dependencies": [ + "boost-algorithm", + "boost-filesystem", + "boost-program-options", + "boost-system" + ] + } + } +} diff --git a/ports/portable-snippets/CMakeLists.txt b/ports/portable-snippets/CMakeLists.txt new file mode 100644 index 00000000000000..5f511265ad05bf --- /dev/null +++ b/ports/portable-snippets/CMakeLists.txt @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.14) + +project(portable-snippets LANGUAGES C) + +include(GNUInstallDirs) + +option(PSNIP_INSTALL_HEADERS "Install header files" ON) + +# https://stackoverflow.com/questions/7787823/cmake-how-to-get-the-name-of-all-subdirectories-of-a-directory +function (list_subdir output_variable path) + file(GLOB sub_entries RELATIVE ${path} ${path}/*) + + set(dirlist "") + + foreach (entry ${sub_entries}) + if (IS_DIRECTORY ${path}/${entry}) + list(APPEND dirlist ${entry}) + endif () + endforeach () + + set(${output_variable} ${dirlist} PARENT_SCOPE) +endfunction () + +function (check_if_header_only output_variable files) + set(is_header_only 1) + + foreach (entry ${files}) + get_filename_component(file_ext ${entry} EXT) + if (file_ext STREQUAL .c) + set(is_header_only 0) + endif () + endforeach () + + set(${output_variable} ${is_header_only} PARENT_SCOPE) +endfunction () + +list_subdir(subdirs ${CMAKE_CURRENT_LIST_DIR}) +list(REMOVE_ITEM subdirs tests) + +set(namespace unofficial::portable-snippets) + +foreach (subdir ${subdirs}) + set(module ${subdir}) + set(module_path "${CMAKE_CURRENT_LIST_DIR}/${subdir}") + + file(GLOB entries + LIST_DIRECTORIES false + ${module_path}/*.h + ${module_path}/*.c + ) + + check_if_header_only(header_only "${entries}") + + if (header_only) + add_library(${module} INTERFACE) + + target_include_directories( + ${module} + INTERFACE + $ + ) + else () + add_library(${module} STATIC ${entries}) + + set_target_properties( + ${module} + PROPERTIES + PREFIX "" + OUTPUT_NAME "psnip-${module}" + ) + + target_include_directories( + ${module} + PUBLIC + $ + $ + ) + + list(FILTER entries EXCLUDE REGEX "\.c$") + endif () + + add_library(${namespace}::${module} ALIAS ${module}) + + if (PSNIP_INSTALL_HEADERS) + install(FILES ${entries} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${subdir}) + endif () + + install(TARGETS ${module} EXPORT unofficial-portable-snippets-config) +endforeach () + +install( + EXPORT unofficial-portable-snippets-config + NAMESPACE ${namespace}:: + DESTINATION share/unofficial-portable-snippets + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/ports/portable-snippets/portfile.cmake b/ports/portable-snippets/portfile.cmake new file mode 100644 index 00000000000000..197008c3ec6ef9 --- /dev/null +++ b/ports/portable-snippets/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nemequ/portable-snippets + REF 26496acb37ab46ee249ea19d45381da6955d89c4 + SHA512 6213b22e4358b06f92396731d94fd27d4cf3568a47c56c057174c1839929c6a569ad5b1e1302fe0d092c4f393c570607b96e9e977223f86a9e3c2862010f3af0 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DPSNIP_INSTALL_HEADERS=OFF + OPTIONS_RELEASE + -DPSNIP_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/portable-snippets/vcpkg.json b/ports/portable-snippets/vcpkg.json new file mode 100644 index 00000000000000..acd3cde956da84 --- /dev/null +++ b/ports/portable-snippets/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "portable-snippets", + "version-string": "2019-09-20", + "port-version": 1, + "description": "Collection of miscellaneous portable C snippets", + "homepage": "https://github.com/nemequ/portable-snippets" +} diff --git a/ports/portaudio/CONTROL b/ports/portaudio/CONTROL deleted file mode 100644 index a60d598593ad93..00000000000000 --- a/ports/portaudio/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: portaudio -Version: 19.0.6.00-5 -Homepage: https://www.portaudio.com/ -Description: PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O. diff --git a/ports/portaudio/cmakelists-install.patch b/ports/portaudio/cmakelists-install.patch deleted file mode 100644 index 88c95260dafaf4..00000000000000 --- a/ports/portaudio/cmakelists-install.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -372,6 +372,8 @@ - ENDIF() - SET_TARGET_PROPERTIES(portaudio PROPERTIES OUTPUT_NAME portaudio_${TARGET_POSTFIX} FOLDER "Portaudio") - SET_TARGET_PROPERTIES(portaudio_static PROPERTIES OUTPUT_NAME portaudio_static_${TARGET_POSTFIX} FOLDER "Portaudio") -+ INSTALL(FILES ${PA_PUBLIC_INCLUDES} DESTINATION include) -+ INSTALL(TARGETS portaudio portaudio_static RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) - ELSE() - IF(APPLE AND CMAKE_VERSION VERSION_GREATER 3.4.2) - OPTION(PA_OUTPUT_OSX_FRAMEWORK "Generate an OS X framework instead of the simple library" OFF) diff --git a/ports/portaudio/crt_linkage_build_config.patch b/ports/portaudio/crt_linkage_build_config.patch deleted file mode 100644 index b1cef3014cf7b8..00000000000000 --- a/ports/portaudio/crt_linkage_build_config.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -10,32 +10,32 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - # project. If this is part of a larger project (i.e. the CMakeLists.txt has - # been imported by some other CMakeLists.txt), we don't want to trump over - # the top of that project's global settings. --IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_LIST_DIR}) -- IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) -- MESSAGE(STATUS "Setting CMAKE_BUILD_TYPE type to 'Debug' as none was specified.") -- SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) -- SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") -- ENDIF() -- -- PROJECT(portaudio) -- -- SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON) -- -- IF(WIN32 AND MSVC) -- OPTION(PA_DLL_LINK_WITH_STATIC_RUNTIME "Link with static runtime libraries (minimizes runtime dependencies)" ON) -- IF(PA_DLL_LINK_WITH_STATIC_RUNTIME) -- FOREACH(flag_var -- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO -- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE -- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) -- IF(${flag_var} MATCHES "/MD") -- STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") -- ENDIF() -- ENDFOREACH() -- ENDIF() -- ENDIF() --ENDIF() -+# IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_LIST_DIR}) -+ # IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) -+ # MESSAGE(STATUS "Setting CMAKE_BUILD_TYPE type to 'Debug' as none was specified.") -+ # SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) -+ # SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") -+ # ENDIF() -+ -+ # PROJECT(portaudio) -+ -+ # SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON) -+ -+ # IF(WIN32 AND MSVC) -+ # OPTION(PA_DLL_LINK_WITH_STATIC_RUNTIME "Link with static runtime libraries (minimizes runtime dependencies)" ON) -+ # IF(PA_DLL_LINK_WITH_STATIC_RUNTIME) -+ # FOREACH(flag_var -+ # CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -+ # CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO -+ # CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE -+ # CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) -+ # IF(${flag_var} MATCHES "/MD") -+ # STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") -+ # ENDIF() -+ # ENDFOREACH() -+ # ENDIF() -+ # ENDIF() -+# ENDIF() - - SET(PA_PKGCONFIG_VERSION 19) - diff --git a/ports/portaudio/find_dsound.patch b/ports/portaudio/find_dsound.patch deleted file mode 100644 index be82b56411ccef..00000000000000 --- a/ports/portaudio/find_dsound.patch +++ /dev/null @@ -1,114 +0,0 @@ ---- a/cmake_support/FindDXSDK.cmake -+++ b/cmake_support/FindDXSDK.cmake -@@ -16,44 +16,70 @@ else(WIN32) - message(FATAL_ERROR "FindDXSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" ) - endif(WIN32) - --find_path(DXSDK_ROOT_DIR -- include/dxsdkver.h -- HINTS -- $ENV{DXSDK_DIR} --) -- --find_path(DXSDK_INCLUDE_DIR -- dxsdkver.h -- PATHS -- ${DXSDK_ROOT_DIR}/include --) -- --IF(CMAKE_CL_64) --find_path(DXSDK_LIBRARY_DIR -- dsound.lib -- PATHS -- ${DXSDK_ROOT_DIR}/lib/x64 --) --ELSE(CMAKE_CL_64) --find_path(DXSDK_LIBRARY_DIR -- dsound.lib -- PATHS -- ${DXSDK_ROOT_DIR}/lib/x86 --) --ENDIF(CMAKE_CL_64) -- --find_library(DXSDK_DSOUND_LIBRARY -- dsound.lib -- PATHS -- ${DXSDK_LIBRARY_DIR} --) -- --# handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if --# all listed variables are TRUE --INCLUDE(FindPackageHandleStandardArgs) --FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR) -- --MARK_AS_ADVANCED( -- DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR -- DXSDK_LIBRARY_DIR DXSDK_DSOUND_LIBRARY --) -+# Dsound.lib is statically linked (i.e. dsound.dll not required) and DXSDK_LIBRARY_DIR not used. -+# In the environments supported by VCPKG we may as well avoid looking out for DX9 to avoid version -+# mismatch in find. -+ -+if(MSVC AND MSVC_VERSION GREATER_EQUAL 1900) -+ -+ # if the environment is set up properly, matching lib and header will be found -+ -+ find_path(DXSDK_INCLUDE_DIR -+ dsound.h -+ ) -+ find_library(DXSDK_DSOUND_LIBRARY -+ dsound.lib -+ ) -+ -+ INCLUDE(FindPackageHandleStandardArgs) -+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_INCLUDE_DIR DXSDK_DSOUND_LIBRARY) -+ -+ MARK_AS_ADVANCED( -+ DXSDK_INCLUDE_DIR DXSDK_DSOUND_LIBRARY -+ ) -+ -+else() -+ -+ find_path(DXSDK_ROOT_DIR -+ include/dxsdkver.h -+ HINTS -+ $ENV{DXSDK_DIR} -+ ) -+ -+ find_path(DXSDK_INCLUDE_DIR -+ dxsdkver.h -+ HINTS -+ ${DXSDK_ROOT_DIR}/include -+ ) -+ -+ IF(CMAKE_CL_64) -+ find_path(DXSDK_LIBRARY_DIR -+ dsound.lib -+ HINTS -+ ${DXSDK_ROOT_DIR}/lib/x64 -+ ) -+ ELSE(CMAKE_CL_64) -+ find_path(DXSDK_LIBRARY_DIR -+ dsound.lib -+ HINTS -+ ${DXSDK_ROOT_DIR}/lib/x86 -+ ) -+ ENDIF(CMAKE_CL_64) -+ -+ find_library(DXSDK_DSOUND_LIBRARY -+ dsound.lib -+ HINTS -+ ${DXSDK_LIBRARY_DIR} -+ ) -+ -+ # handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if -+ # all listed variables are TRUE -+ INCLUDE(FindPackageHandleStandardArgs) -+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR) -+ -+ MARK_AS_ADVANCED( -+ DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR -+ DXSDK_LIBRARY_DIR DXSDK_DSOUND_LIBRARY -+ ) -+ -+endif() diff --git a/ports/portaudio/fix-library-can-not-be-found.patch b/ports/portaudio/fix-library-can-not-be-found.patch new file mode 100644 index 00000000000000..7ef3e581d921d5 --- /dev/null +++ b/ports/portaudio/fix-library-can-not-be-found.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 122fe93..b571c38 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -360,11 +360,6 @@ ENDIF() + # embedded builds this is not an issue as they will only build the configuration + # used in the host application. + MARK_AS_ADVANCED(PA_LIBNAME_ADD_SUFFIX) +-IF(MSVC AND PA_BUILD_STATIC AND PA_BUILD_SHARED AND NOT PA_LIBNAME_ADD_SUFFIX) +- MESSAGE(WARNING "Building both shared and static libraries, and avoiding the suffix _static will lead to a name conflict") +- SET(PA_LIBNAME_ADD_SUFFIX ON CACHE BOOL "Forcing use of suffix _static to avoid name conflict between static and import library" FORCE) +- MESSAGE(WARNING "PA_LIBNAME_ADD_SUFFIX was set to ON") +-ENDIF() + + SET(PA_TARGETS "") + diff --git a/ports/portaudio/pa_win_waveformat.patch b/ports/portaudio/pa_win_waveformat.patch deleted file mode 100644 index cba07394775e32..00000000000000 --- a/ports/portaudio/pa_win_waveformat.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fa727918e9e56c2a18dbdcfd276c60ac616c56ba Mon Sep 17 00:00:00 2001 -From: Etienne Dechamps -Date: Sat, 27 Oct 2018 15:14:27 +0100 -Subject: [PATCH] Add pa_win_waveformat.h to public includes. - -pa_win_wasapi.h includes pa_win_waveformat.h, so it has to be -distributed for pa_win_wasapi.h to be usable. ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 789671a..6a3ed8e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -210,7 +210,7 @@ IF(WIN32) - IF(PA_USE_WASAPI) - SET(PA_WASAPI_SOURCES src/hostapi/wasapi/pa_win_wasapi.c) - SOURCE_GROUP("hostapi\\wasapi" FILES ${PA_WASAPI_SOURCES}) -- SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wasapi.h) -+ SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wasapi.h include/pa_win_waveformat.h) - SET(PA_SOURCES ${PA_SOURCES} ${PA_WASAPI_SOURCES}) - SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid) - IF(NOT MSVC) --- -2.14.1.windows.1 - diff --git a/ports/portaudio/portfile.cmake b/ports/portaudio/portfile.cmake index 6fcbdf4377484a..95d047b2432aed 100644 --- a/ports/portaudio/portfile.cmake +++ b/ports/portaudio/portfile.cmake @@ -1,58 +1,44 @@ -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz" - FILENAME "pa_stable_v190600_20161030.tgz" - SHA512 7ec692cbd8c23878b029fad9d9fd63a021f57e60c4921f602995a2fca070c29f17a280c7f2da5966c4aad29d28434538452f4c822eacf3a60af59a6dc8e9704c -) -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - cmakelists-install.patch - find_dsound.patch - wasapi_support.patch - crt_linkage_build_config.patch - pa_win_waveformat.patch -) - -# NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided -# in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DPA_USE_DS=ON - -DPA_USE_WASAPI=ON - -DPA_USE_WDMKS=ON - -DPA_USE_WMME=ON - -DPA_ENABLE_DEBUG_OUTPUT:BOOL=ON -) - -vcpkg_install_cmake() - -# Remove static builds from dynamic builds and otherwise -# Remove x86 and x64 from resulting files -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file (REMOVE ${CURRENT_PACKAGES_DIR}/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib) - file (REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib) - - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/lib/portaudio.lib) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio.lib) - else () - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/lib/portaudio.lib) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio.lib) - file (REMOVE ${CURRENT_PACKAGES_DIR}/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib) - file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file (REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib) - file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - endif () -endif () -vcpkg_copy_pdbs() - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/portaudio) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/portaudio/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/portaudio/copyright) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PortAudio/portaudio + REF 147dd722548358763a8b649b3e4b41dfffbcfbb6 + SHA512 0f56e5f5b004f51915f29771b8fc1fe886f1fef5d65ab5ea1db43f43c49917476b9eec14b36aa54d3e9fb4d8bdf61e68c79624d00b7e548d4c493395a758233a + PATCHES + fix-library-can-not-be-found.patch +) + +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} dynamic PA_BUILD_SHARED) +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} static PA_BUILD_STATIC) + +# NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided +# in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPA_USE_DS=ON + -DPA_USE_WASAPI=ON + -DPA_USE_WDMKS=ON + -DPA_USE_WMME=ON + -DPA_LIBNAME_ADD_SUFFIX=OFF + -DPA_BUILD_SHARED=${PA_BUILD_SHARED} + -DPA_BUILD_STATIC=${PA_BUILD_STATIC} + -DPA_DLL_LINK_WITH_STATIC_RUNTIME=OFF + OPTIONS_DEBUG + -DPA_ENABLE_DEBUG_OUTPUT:BOOL=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +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.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/portaudio/vcpkg.json b/ports/portaudio/vcpkg.json new file mode 100644 index 00000000000000..4d504978f70684 --- /dev/null +++ b/ports/portaudio/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "portaudio", + "version": "19.7", + "port-version": 1, + "description": "PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.", + "homepage": "http://www.portaudio.com", + "supports": "!uwp" +} diff --git a/ports/portaudio/wasapi_support.patch b/ports/portaudio/wasapi_support.patch deleted file mode 100644 index 0ff8a213430a54..00000000000000 --- a/ports/portaudio/wasapi_support.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists_org.txt -+++ b/CMakeLists.txt -@@ -200,7 +200,7 @@ - SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid) - ENDIF() - -- IF(MSVS) -+ IF(MSVC) - OPTION(PA_USE_WASAPI "Enable support for WASAPI" ON) - ELSE() - # I was unable to get WASAPI to compile outside of Visual Studio. If diff --git a/ports/portmidi/CONTROL b/ports/portmidi/CONTROL deleted file mode 100644 index 57550e485a8422..00000000000000 --- a/ports/portmidi/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: portmidi -Version: 0.217.1 -Homepage: https://sourceforge.net/projects/portmedia/ -Description: Free, cross-platform, open-source I/O library for MIDI diff --git a/ports/portmidi/add-feature-options.patch b/ports/portmidi/add-feature-options.patch new file mode 100644 index 00000000000000..605dfcd35bcccd --- /dev/null +++ b/ports/portmidi/add-feature-options.patch @@ -0,0 +1,50 @@ +diff --git a/portmidi/trunk/CMakeLists.txt b/portmidi/trunk/CMakeLists.txt +index e5e01b6..483b900 100644 +--- a/portmidi/trunk/CMakeLists.txt ++++ b/portmidi/trunk/CMakeLists.txt +@@ -72,10 +72,14 @@ endif(0) + include_directories(pm_common porttime) + add_subdirectory(pm_common) + ++if (0) + add_subdirectory(pm_test) ++endif() + + add_subdirectory(pm_dylib) + + # Cannot figure out how to make an xcode Java application with CMake ++if (JAVA_SUPPORT) + add_subdirectory(pm_java) ++endif() + +diff --git a/portmidi/trunk/pm_common/CMakeLists.txt b/portmidi/trunk/pm_common/CMakeLists.txt +index c829063..2597bea 100644 +--- a/portmidi/trunk/pm_common/CMakeLists.txt ++++ b/portmidi/trunk/pm_common/CMakeLists.txt +@@ -111,17 +111,25 @@ target_link_libraries(portmidi-static ${PM_NEEDED_LIBS}) + # define the jni library + include_directories(${JAVA_INCLUDE_PATHS}) + ++if (JAVA_SUPPORT) + set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c) + add_library(pmjni SHARED ${JNISRC}) + target_link_libraries(pmjni ${JNI_EXTRA_LIBS}) + set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib") ++endif() + + # install the libraries (Linux and Mac OS X command line) + if(1) +- INSTALL(TARGETS portmidi-static pmjni ++ INSTALL(TARGETS portmidi-static + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) ++ if (JAVA_SUPPORT) ++ INSTALL(TARGETS pmjni ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ endif() + # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here + INSTALL(FILES portmidi.h ../porttime/porttime.h + DESTINATION include) diff --git a/ports/portmidi/fix-build-install.patch b/ports/portmidi/fix-build-install.patch new file mode 100644 index 00000000000000..76f0f92bf215b2 --- /dev/null +++ b/ports/portmidi/fix-build-install.patch @@ -0,0 +1,148 @@ +diff --git a/portmidi/trunk/CMakeLists.txt b/portmidi/trunk/CMakeLists.txt +index 4919b78..e5e01b6 100644 +--- a/portmidi/trunk/CMakeLists.txt ++++ b/portmidi/trunk/CMakeLists.txt +@@ -4,6 +4,7 @@ + + cmake_minimum_required(VERSION 2.6) + ++if (0) + if(UNIX) + # allow user to set Release or Debug + set(CMAKE_BUILD_TYPE Release CACHE STRING +@@ -22,11 +23,13 @@ else(UNIX) + set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING + "Semicolon-separate list of supported configuration types") + endif(UNIX) ++endif() + + #set(CMAKE_RELATIVE_PATHS ON CACHE STRING "avoid absolute paths" FORCE) + + # Clear out the built-in C++ compiler and link flags for each of the + # unused configurations. ++if (0) + set(CMAKE_CXX_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused") + set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused") + set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused") +@@ -37,10 +40,11 @@ set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused") + set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused") + + set(CMAKE_OSX_ARCHITECTURES i386 ppc x86_64 CACHE STRING "change to needed architecture for a smaller library" FORCE) ++endif() + + PROJECT(portmidi) + +-if(UNIX) ++if(0) + # Problem: if there was an old Debug build and you change + # CMAKE_BUILD_TYPE to Release, then the OUTPUT_DIRECTORY's will + # still be Debug. Try to fix this by checking if the DIRECTORY's +@@ -63,7 +67,7 @@ if(UNIX) + ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE} + CACHE STRING "libraries go here" FORCE) + endif(CMAKE_LIBRARY_OUTPUT_DIRECTORY MATCHES ${BAD_DIR}) +-endif(UNIX) ++endif(0) + + include_directories(pm_common porttime) + add_subdirectory(pm_common) +diff --git a/portmidi/trunk/pm_common/CMakeLists.txt b/portmidi/trunk/pm_common/CMakeLists.txt +index cbeeade..c829063 100644 +--- a/portmidi/trunk/pm_common/CMakeLists.txt ++++ b/portmidi/trunk/pm_common/CMakeLists.txt +@@ -5,8 +5,6 @@ + if(APPLE OR WIN32) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) + # set the build directory for .dylib libraries +- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) +- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) + + # the first time CMake configures, save off CMake's built-in flags + if(NOT DEFAULT_DEBUG_FLAGS) +@@ -104,8 +102,9 @@ set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVA_JVM_LIBRARY}) + # this completes the list of library sources by adding shared code + list(APPEND LIBSRC pmutil portmidi) + ++if (NOT BUILD_SHARED_LIBS) + # now add the shared files to make the complete list of library sources +-add_library(portmidi-static ${LIBSRC}) ++add_library(portmidi-static STATIC ${LIBSRC}) + set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi_s") + target_link_libraries(portmidi-static ${PM_NEEDED_LIBS}) + +@@ -118,11 +117,13 @@ target_link_libraries(pmjni ${JNI_EXTRA_LIBS}) + set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib") + + # install the libraries (Linux and Mac OS X command line) +-if(UNIX) ++if(1) + INSTALL(TARGETS portmidi-static pmjni +- LIBRARY DESTINATION /usr/local/lib +- ARCHIVE DESTINATION /usr/local/lib) ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here +-# INSTALL(FILES portmidi.h ../porttime/porttime.h +-# DESTINATION /usr/local/include) +-endif(UNIX) ++ INSTALL(FILES portmidi.h ../porttime/porttime.h ++ DESTINATION include) ++endif(1) ++endif() +diff --git a/portmidi/trunk/pm_common/portmidi.h b/portmidi/trunk/pm_common/portmidi.h +index e07991e..6f48927 100644 +--- a/portmidi/trunk/pm_common/portmidi.h ++++ b/portmidi/trunk/pm_common/portmidi.h +@@ -108,6 +108,8 @@ typedef unsigned int uint32_t; + + #ifdef _WINDLL + #define PMEXPORT __declspec(dllexport) ++#elif defined _PM_USEDLL ++#define PMEXPORT __declspec(dllimport) + #else + #define PMEXPORT + #endif +diff --git a/portmidi/trunk/pm_dylib/CMakeLists.txt b/portmidi/trunk/pm_dylib/CMakeLists.txt +index f693dd6..69d4d24 100644 +--- a/portmidi/trunk/pm_dylib/CMakeLists.txt ++++ b/portmidi/trunk/pm_dylib/CMakeLists.txt +@@ -4,11 +4,8 @@ + # portmidi/pm_dylib + if(APPLE OR WIN32) + # set the build directory for .dylib libraries +- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) +- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) + # the "archive" output directory says where to put portmidi.lib, the + # static part of the lib/dll pair: +- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) + + # the first time CMake configures, save off CMake's built-in flags + if(NOT DEFAULT_DEBUG_FLAGS) +@@ -113,15 +110,21 @@ set(SHARED_FILES pmutil portmidi) + prepend_path(SHARED_PATHS ../pm_common/ ${SHARED_FILES}) + list(APPEND LIBSRC ${SHARED_PATHS}) + ++if (BUILD_SHARED_LIBS) + add_library(portmidi-dynamic SHARED ${LIBSRC}) + set_target_properties(portmidi-dynamic PROPERTIES OUTPUT_NAME "portmidi") + target_link_libraries(portmidi-dynamic ${PM_NEEDED_LIBS}) ++if (MSVC) ++ target_compile_definitions(portmidi-dynamic PRIVATE _WINDLL) ++endif() + + # install the libraries (Linux and Mac OS X command line) +-if(UNIX) ++if(1) + INSTALL(TARGETS portmidi-dynamic +- LIBRARY DESTINATION /usr/local/lib +- ARCHIVE DESTINATION /usr/local/lib) ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h +- DESTINATION /usr/local/include) +-endif(UNIX) ++ DESTINATION include) ++endif(1) ++endif() diff --git a/ports/portmidi/portfile.cmake b/ports/portmidi/portfile.cmake index 557f4a1ca743d3..45e15ab0520f82 100644 --- a/ports/portmidi/portfile.cmake +++ b/ports/portmidi/portfile.cmake @@ -1,49 +1,35 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "WindowsStore not supported") -endif() - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/portmidi) -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/portmedia/portmidi/217/portmidi-src-217.zip" - FILENAME "portmidi-src-217.zip" - SHA512 d08d4d57429d26d292b5fe6868b7c7a32f2f1d2428f6695cd403a697e2d91629bd4380242ab2720e8f21c895bb75cb56b709fb663a20e8e623120e50bfc5d90b +vcpkg_fail_port_install(ON_TARGET "uwp" ON_ARCH "arm") + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO portmedia + FILENAME "portmedia-code-r234.zip" + SHA512 cbc332d89bc465450b38245a83cc300dfd2e1e6de7c62284edf754ff4d8a9aa3dc49a395dcee535ed9688befb019186fa87fd6d8a3698898c2acbf3e6b7a0794 + PATCHES + fix-build-install.patch + add-feature-options.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) - -# Mark portmidi-static as static, disable pmjni library depending on the Java SDK -file(READ "${SOURCE_PATH}/pm_common/CMakeLists.txt" PM_CMAKE) -string(REPLACE "add_library(portmidi-static \${LIBSRC})" "add_library(portmidi-static STATIC \${LIBSRC})" PM_CMAKE "${PM_CMAKE}") -string(REPLACE "add_library(pmjni SHARED \${JNISRC})" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") -string(REPLACE "target_link_libraries(pmjni \${JNI_EXTRA_LIBS})" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") -string(REPLACE "set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION \"jnilib\")" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") -file(WRITE "${SOURCE_PATH}/pm_common/CMakeLists.txt" "${PM_CMAKE}") - -# Run cmake configure step -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/portmidi/trunk" OPTIONS + -DJAVA_SUPPORT=OFF -DJAVA_INCLUDE_PATH= -DJAVA_INCLUDE_PATH2= -DJAVA_JVM_LIBRARY= + MAYBE_UNUSED_VARIABLES + JAVA_INCLUDE_PATH + JAVA_INCLUDE_PATH2 ) -# Run cmake build step, nothing is installed on Windows -vcpkg_build_cmake() - -file(INSTALL ${SOURCE_PATH}/pm_common/portmidi.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/porttime/porttime.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_cmake_install() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi_s.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi_s.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -else() - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/portmidi.h" + "#elif defined _PM_USEDLL" "#elif 1" + ) endif() -file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/portmidi RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/portmidi/trunk/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/portmidi/vcpkg.json b/ports/portmidi/vcpkg.json new file mode 100644 index 00000000000000..91d162c4f11365 --- /dev/null +++ b/ports/portmidi/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "portmidi", + "version": "0.234", + "port-version": 3, + "description": "Free, cross-platform, open-source I/O library for MIDI", + "homepage": "https://sourceforge.net/projects/portmedia/", + "supports": "!uwp & !linux", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/portsmf/portfile.cmake b/ports/portsmf/portfile.cmake new file mode 100644 index 00000000000000..158094ee76c020 --- /dev/null +++ b/ports/portsmf/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tenacityteam/portsmf + REF 238 + SHA512 af619d1b0a656361af8f8b8b65d7f98047613ac8e9ea51354031629c1732ad02755f84d63ac7c4ed24cdf0ad3db46381061bf32d9afe29b7be3226dc814ef552 + HEAD_REF main +) + +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/PortSMF) +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/portsmf/vcpkg.json b/ports/portsmf/vcpkg.json new file mode 100644 index 00000000000000..c97b7711de8e7b --- /dev/null +++ b/ports/portsmf/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "portsmf", + "version": "0.238", + "description": "Portsmf is 'Port Standard MIDI File', a cross-platform, C++ library for reading and writing Standard MIDI Files.", + "homepage": "https://github.com/tenacityteam/portsmf", + "license": "MIT", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/ppconsul/CONTROL b/ports/ppconsul/CONTROL deleted file mode 100644 index cc122ecf6df517..00000000000000 --- a/ports/ppconsul/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: ppconsul -Version: 0.3-1 -Homepage: https://github.com/oliora/ppconsul -Description: A C++ client library for Consul. Consul is a distributed tool for discovering and configuring services in your infrastructure. -Build-Depends: boost-core, boost-variant, curl[openssl], json11 diff --git a/ports/ppconsul/cmake_build.patch b/ports/ppconsul/cmake_build.patch index 95c795743b71ab..a66c8e1d9f6f3d 100644 --- a/ports/ppconsul/cmake_build.patch +++ b/ports/ppconsul/cmake_build.patch @@ -56,7 +56,7 @@ index d747100..966c7e2 100644 source_group(${PROJECT_NAME} FILES ${SOURCES}) diff --git a/src/s11n.h b/src/s11n.h -index 962a1ac..6ab7f3b 100644 +index c317834..3cb03c4 100644 --- a/src/s11n.h +++ b/src/s11n.h @@ -6,7 +6,7 @@ @@ -66,5 +66,5 @@ index 962a1ac..6ab7f3b 100644 -#include +#include #include + #include #include - #include diff --git a/ports/ppconsul/portfile.cmake b/ports/ppconsul/portfile.cmake index a1290019fe8206..9b8c4c4e707efd 100644 --- a/ports/ppconsul/portfile.cmake +++ b/ports/ppconsul/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO oliora/ppconsul - REF fd3a22eba03a49623832a8f8c990fee499e3f8fb - SHA512 098f2fa0fdc3f219f5958d0d5b2a620231e3cd94dc3110cfbedb87e787e8402a7b0294f7ffa4fcb4169b0428b4f65376b621e5840706ff7cc8f02ac7fc1d7757 + REF 8aed30cae0e2df76d920b5cd77933604a4644ee9 + SHA512 756f07c7c8099868fa181571941f511987088abc110ad5eda517ad591ed10b40532cd7b1541dbdad76c2617ce804a1dc26a121380f20f8e4a40e29063523cbbd HEAD_REF master PATCHES "cmake_build.patch" ) @@ -22,7 +20,7 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ppconsul RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/ppconsul/vcpkg.json b/ports/ppconsul/vcpkg.json new file mode 100644 index 00000000000000..7dd7895a47f2f6 --- /dev/null +++ b/ports/ppconsul/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "ppconsul", + "version-string": "0.5", + "port-version": 2, + "description": "A C++ client library for Consul. Consul is a distributed tool for discovering and configuring services in your infrastructure.", + "homepage": "https://github.com/oliora/ppconsul", + "dependencies": [ + "boost-core", + "boost-fusion", + "boost-optional", + "boost-variant", + { + "name": "curl", + "features": [ + "openssl" + ] + }, + "json11" + ] +} diff --git a/ports/ppmagic/portfile.cmake b/ports/ppmagic/portfile.cmake new file mode 100644 index 00000000000000..18f491f8062494 --- /dev/null +++ b/ports/ppmagic/portfile.cmake @@ -0,0 +1,13 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kobalicek/ppmagic + REF 2c7894e3056c610d383027b2d48149ba9d4a1c62 + SHA512 4ab5f1dbef4c9b7892d8042e2a2b01df21a201b2b05a1b75a6ad594f50e2ec1c6a3e4782bb1d702266c90440df679d7eb24dfe595ce35680f7d263ec6c371a3b + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/ppmagic.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/ppmagic/vcpkg.json b/ports/ppmagic/vcpkg.json new file mode 100644 index 00000000000000..7bf584f3354678 --- /dev/null +++ b/ports/ppmagic/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ppmagic", + "version-string": "2020-07-03", + "port-version": 1, + "description": "C/C++ preprocessor macros that you can use to simplify your life.", + "homepage": "https://github.com/kobalicek/ppmagic" +} diff --git a/ports/pprint/CONTROL b/ports/pprint/CONTROL deleted file mode 100644 index ea94b198ecd7f4..00000000000000 --- a/ports/pprint/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pprint -Version: 2019-07-19 -Description: Pretty Printer for Modern C++ -Homepage: https://github.com/p-ranav/pprint diff --git a/ports/pprint/portfile.cmake b/ports/pprint/portfile.cmake index 3b360e68388e18..609117815d7b88 100644 --- a/ports/pprint/portfile.cmake +++ b/ports/pprint/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO p-ranav/pprint diff --git a/ports/pprint/vcpkg.json b/ports/pprint/vcpkg.json new file mode 100644 index 00000000000000..386ed290699d3d --- /dev/null +++ b/ports/pprint/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pprint", + "version-string": "2019-07-19", + "port-version": 1, + "description": "Pretty Printer for Modern C++", + "homepage": "https://github.com/p-ranav/pprint" +} diff --git a/ports/pqp/CMakeLists.txt b/ports/pqp/CMakeLists.txt index e46f17895f47a1..dab50802fbbe8e 100644 --- a/ports/pqp/CMakeLists.txt +++ b/ports/pqp/CMakeLists.txt @@ -1,12 +1,13 @@ cmake_minimum_required(VERSION 3.0) project(pqp) -include_directories(${SOURCE}/src) +set(SOURCE_CUSTOM_DIR "PQP_v1.3") +include_directories(${SOURCE_CUSTOM_DIR}/src) file(GLOB SRCS - "${SOURCE}/src/*.cpp") + "${SOURCE_CUSTOM_DIR}/src/*.cpp") file(GLOB HDRS - "${SOURCE}/src/*.h") + "${SOURCE_CUSTOM_DIR}/src/*.h") add_library(pqp STATIC ${SRCS}) @@ -18,4 +19,4 @@ install(TARGETS pqp EXPORT pqpConfig foreach (file ${HDRS}) get_filename_component(dir ${file} DIRECTORY) install(FILES ${file} DESTINATION include/ CONFIGURATIONS Release) -endforeach() \ No newline at end of file +endforeach() diff --git a/ports/pqp/CONTROL b/ports/pqp/CONTROL deleted file mode 100644 index 35986cf9f930c7..00000000000000 --- a/ports/pqp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pqp -Version: 1.3-3 -Homepage: https://gamma.cs.unc.edu/SSV/ -Description: a proximity query package diff --git a/ports/pqp/fix-math-functions.patch b/ports/pqp/fix-math-functions.patch index 6f81d1b2e5898a..51a4f15d5ecc2b 100644 --- a/ports/pqp/fix-math-functions.patch +++ b/ports/pqp/fix-math-functions.patch @@ -1,7 +1,5 @@ -diff --git a/src/PQP_Compile.h b/src/PQP_Compile.h -index f76c981..8a70710 100644 ---- a/src/PQP_Compile.h -+++ b/src/PQP_Compile.h +--- a/PQP_v1.3/src/PQP_Compile.h ++++ b/PQP_v1.3/src/PQP_Compile.h @@ -44,10 +44,10 @@ // prevents compiler warnings when PQP_REAL is float diff --git a/ports/pqp/portfile.cmake b/ports/pqp/portfile.cmake index a674e3af3ac578..ac6ab13b1981ef 100644 --- a/ports/pqp/portfile.cmake +++ b/ports/pqp/portfile.cmake @@ -1,18 +1,16 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pqp-1.3/PQP_v1.3) vcpkg_download_distfile(ARCHIVE URLS "http://gamma.cs.unc.edu/software/downloads/SSV/pqp-1.3.tar.gz" FILENAME "pqp-1.3.tar.gz" SHA512 baad7b050b13a6d13de5110cdec443048a3543b65b0d3b30d1b5f737b46715052661f762ef71345d39978c0c788a30a3a935717664806b4729722ee3594ebdc1 ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-math-functions.patch" +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-math-functions.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -20,8 +18,6 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DSOURCE=${SOURCE_PATH} ) vcpkg_install_cmake() diff --git a/ports/pqp/vcpkg.json b/ports/pqp/vcpkg.json new file mode 100644 index 00000000000000..70d452f261d6d6 --- /dev/null +++ b/ports/pqp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pqp", + "version-string": "1.3", + "port-version": 5, + "description": "a proximity query package", + "homepage": "https://gamma.cs.unc.edu/SSV/" +} diff --git a/ports/presentmon/CMakeLists.txt b/ports/presentmon/CMakeLists.txt new file mode 100644 index 00000000000000..1c8bd8620c9228 --- /dev/null +++ b/ports/presentmon/CMakeLists.txt @@ -0,0 +1,71 @@ +cmake_minimum_required(VERSION 3.11) +project(presentmon) + +option(INSTALL_HEADERS "Install presentmon headers" ON) +option(BUILD_TOOLS "Build tool PresentMon" OFF) + +set(PRESENTDATA_SRCS + PresentData/Debug.cpp + PresentData/MixedRealityTraceConsumer.cpp + PresentData/PresentMonTraceConsumer.cpp + PresentData/TraceConsumer.cpp + PresentData/TraceSession.cpp +) + +set(PRESENTDATA_HDRS + PresentData/Debug.hpp + PresentData/MixedRealityTraceConsumer.hpp + PresentData/PresentMonTraceConsumer.hpp + PresentData/TraceConsumer.hpp + PresentData/TraceSession.hpp + ${CMAKE_BINARY_DIR}/generated/version.h +) + + +file(GLOB EXTRA_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/PresentData/ETW/*.h) + +file(WRITE ${CMAKE_BINARY_DIR}/generated/version.h "char const* PRESENT_MON_VERSION = \"1.7.0\";") + +add_library(PresentData STATIC ${PRESENTDATA_SRCS} ${PRESENTDATA_HDRS} ${EXTRA_INCLUDES}) + +target_include_directories(PresentData PUBLIC + $ + $ +) +target_compile_definitions(PresentData PRIVATE UNICODE) + +# Install targets +install(TARGETS PresentData + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if (BUILD_TOOLS) + set(PresentMon_SRCS + PresentMon/CommandLine.cpp + PresentMon/Console.cpp + PresentMon/ConsumerThread.cpp + PresentMon/CsvOutput.cpp + PresentMon/LateStageReprojectionData.cpp + PresentMon/MainThread.cpp + PresentMon/OutputThread.cpp + PresentMon/Privilege.cpp + PresentMon/TraceSession.cpp + ) + + add_executable(PresentMon ${PresentMon_SRCS}) + target_include_directories(PresentMon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/PresentMon ${CMAKE_BINARY_DIR}) + target_compile_definitions(PresentMon PRIVATE UNICODE) + target_link_libraries(PresentMon PRIVATE PresentData Tdh Shlwapi) + + install(TARGETS PresentMon + RUNTIME DESTINATION bin + ) +endif() + +# Install headers +if (INSTALL_HEADERS) + install(FILES ${PRESENTDATA_HDRS} DESTINATION include/presentmon) + install(FILES ${EXTRA_INCLUDES} DESTINATION include/presentmon/ETW) +endif() diff --git a/ports/presentmon/portfile.cmake b/ports/presentmon/portfile.cmake new file mode 100644 index 00000000000000..b6a00824bde1fd --- /dev/null +++ b/ports/presentmon/portfile.cmake @@ -0,0 +1,35 @@ +# The upstream doesn't export any symbols +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install(ON_TARGET "linux" "osx" "uwp" "ios" "android" "freebsd") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GameTechDev/PresentMon + REF 47669ad0efaddc9787772d5e4900734417b2c07c # 1.7.0 + SHA512 fac2e2ca4d8476e2cdde7c3f77cf1881b7d7a9208387f12dbf07f3ea7f4012ce79602f4fedbf1e778871fd9ce898b101659a6f192de29dc6a4404213aee444be + HEAD_REF main +) + +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES presentmon AUTO_CLEAN) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/presentmon/vcpkg.json b/ports/presentmon/vcpkg.json new file mode 100644 index 00000000000000..b4e05670cba237 --- /dev/null +++ b/ports/presentmon/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "presentmon", + "version-semver": "1.7.0", + "description": "PresentMon is a tool to capture and analyze ETW events related to swap chain presentation on Windows.", + "supports": "windows & !uwp", + "features": { + "tools": { + "description": "Build tool PresentMon" + } + } +} diff --git a/ports/proj/CONTROL b/ports/proj/CONTROL deleted file mode 100644 index d6c204fda4cab2..00000000000000 --- a/ports/proj/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: proj -Version: 0 -Description: a stub package that pulls in proj4. Do not depend on this package. -Build-Depends: proj4 diff --git a/ports/proj/vcpkg.json b/ports/proj/vcpkg.json new file mode 100644 index 00000000000000..50beaca9bc8e84 --- /dev/null +++ b/ports/proj/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "proj", + "version-string": "0", + "port-version": 1, + "description": "a stub package that pulls in proj4. Do not depend on this package.", + "dependencies": [ + "proj4" + ] +} diff --git a/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch b/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch deleted file mode 100644 index 2f1f9ca2966444..00000000000000 --- a/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ca8bb14234091ab7b1ada2b9e5abb04f40d459cb Mon Sep 17 00:00:00 2001 -From: Manuel Massing -Date: Tue, 22 Nov 2016 12:00:39 +0100 -Subject: [PATCH 1/3] CMake: add detection of recent visual studio versions - ---- - cmake/Proj4SystemInfo.cmake | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/cmake/Proj4SystemInfo.cmake b/cmake/Proj4SystemInfo.cmake -index 294a50b..c7fb6bf 100644 ---- a/cmake/Proj4SystemInfo.cmake -+++ b/cmake/Proj4SystemInfo.cmake -@@ -50,6 +50,9 @@ if(WIN32) - if(MSVC_VERSION EQUAL 1800) - set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013 - endif() -+ if(MSVC_VERSION GREATER_EQUAL 1900) -+ set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015/2017/2019 -+ endif() - endif(MSVC) - - if(MINGW) --- -2.9.2.windows.1 - diff --git a/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch b/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch deleted file mode 100644 index 2c470570e4e223..00000000000000 --- a/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 1265d13f29259be05535241e9bcbfcf16857dc06 Mon Sep 17 00:00:00 2001 -From: Manuel Massing -Date: Tue, 22 Nov 2016 12:04:10 +0100 -Subject: [PATCH 2/3] CMake: fix error by only setting properties for targets - which are actually defined - ---- - src/CMakeLists.txt | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 8d7e7d1..59ad00a 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -22,25 +22,30 @@ if(NOT MSVC) - endif () - endif () - -+ - if(BUILD_CS2CS) -- include(bin_cs2cs.cmake) -+ list(APPEND BINARY_TARGETS cs2cs) -+ include(bin_cs2cs.cmake) - endif(BUILD_CS2CS) - - if(BUILD_PROJ) -+ list(APPEND BINARY_TARGETS proj) - include(bin_proj.cmake) - endif(BUILD_PROJ) - - if(BUILD_GEOD) -+ list(APPEND BINARY_TARGETS geod) - include(bin_geod.cmake) - include(bin_geodtest.cmake) - endif(BUILD_GEOD) - - if(BUILD_NAD2BIN) -+ list(APPEND BINARY_TARGETS nad2bin) - include(bin_nad2bin.cmake) - endif(BUILD_NAD2BIN) - --if (MSVC OR CMAKE_CONFIGURATION_TYPES) -+if ((MSVC OR CMAKE_CONFIGURATION_TYPES) AND BINARY_TARGETS) - # Add _d suffix for your debug versions of the tools -- set_target_properties (cs2cs binproj geod nad2bin PROPERTIES -- DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) -+ set_target_properties(${BINARY_TARGETS} PROPERTIES -+ DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) - endif () --- -2.9.2.windows.1 - diff --git a/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch b/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch deleted file mode 100644 index 5870e12ea507de..00000000000000 --- a/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 0be627798d943558c674d4d92767ca255d847631 Mon Sep 17 00:00:00 2001 -From: Manuel Massing -Date: Tue, 22 Nov 2016 12:26:39 +0100 -Subject: [PATCH 3/3] CMake: configurable cmake config install location - ---- - CMakeLists.txt | 1 + - cmake/CMakeLists.txt | 14 +++++++------- - cmake/Proj4InstallPath.cmake | 12 +++++++++--- - 3 files changed, 17 insertions(+), 10 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cde21f0..1b1f892 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -106,6 +106,7 @@ set(LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries in - set(DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.") - set(DOCDIR "${DEFAULT_DOCDIR}" CACHE PATH "The directory to install doc files into.") - set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}" CACHE PATH "The directory to install includes into.") -+set(CMAKEDIR "${DEFAULT_CMAKE_CONFIGDIR}" CACHE PATH "The directory to install cmake files into.") - - ################################################################################# - # Build configured components -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 742da0e..2bdef0d 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -2,13 +2,13 @@ - # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative - # path to the root from there. (Note that the whole install tree can - # be relocated.) --if (NOT WIN32) -- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") -- set (PROJECT_ROOT_DIR "../../..") --else () -- set (INSTALL_CMAKE_DIR "cmake") -- set (PROJECT_ROOT_DIR "..") --endif () -+ -+set (INSTALL_CMAKE_DIR ${CMAKEDIR}) -+if(NOT IS_ABSOLUTE ${INSTALL_CMAKE_DIR}) -+ set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKEDIR}") -+endif() -+ -+file(RELATIVE_PATH PROJECT_ROOT_DIR ${INSTALL_CMAKE_DIR} ${CMAKE_INSTALL_PREFIX}) - - string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) - configure_file (project-config.cmake.in project-config.cmake @ONLY) -diff --git a/cmake/Proj4InstallPath.cmake b/cmake/Proj4InstallPath.cmake -index da1491c..826fb29 100644 ---- a/cmake/Proj4InstallPath.cmake -+++ b/cmake/Proj4InstallPath.cmake -@@ -28,13 +28,15 @@ if(WIN32) - set(DEFAULT_DATA_SUBDIR share) - set(DEFAULT_INCLUDE_SUBDIR local/include) - set(DEFAULT_DOC_SUBDIR share/doc/proj) -+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "cmake") - else() -- # Common locatoins for Unix and Mac OS X -+ # Common locations for Unix and Mac OS X - set(DEFAULT_BIN_SUBDIR bin) - set(DEFAULT_LIB_SUBDIR lib) - set(DEFAULT_DATA_SUBDIR share/proj) - set(DEFAULT_DOC_SUBDIR doc/proj) - set(DEFAULT_INCLUDE_SUBDIR include) -+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "share/cmake/${PROJECT_NAME}") - endif() - - # Locations are changeable by user to customize layout of PDAL installation -@@ -49,19 +51,23 @@ set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING - "Subdirectory where data will be installed") - set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING - "Subdirectory where data will be installed") -- -+set(PROJ_CMAKE_CONFIG_SUBDIR ${DEFAULT_CMAKE_CONFIG_SUBDIR} CACHE STRING -+ "Subdirectory where cmake configuration files will be installed") -+ - # Mark *DIR variables as advanced and dedicated to use by power-users only. - mark_as_advanced(PROJ_ROOT_DIR - PROJ_BIN_SUBDIR - PROJ_LIB_SUBDIR - PROJ_INCLUDE_SUBDIR - PROJ_DATA_SUBDIR -- PROJ_DOC_SUBDIR ) -+ PROJ_DOC_SUBDIR -+ PROJ_CMAKE_CONFIG_SUBDIR) - - set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}") - set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}") - set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}") - set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}") - set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}") -+set(DEFAULT_CMAKE_CONFIGDIR "${PROJ_CMAKE_CONFIG_SUBDIR}") - - --- -2.9.2.windows.1 - diff --git a/ports/proj4/CONTROL b/ports/proj4/CONTROL deleted file mode 100644 index f2a6ae8b62fb57..00000000000000 --- a/ports/proj4/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: proj4 -Version: 4.9.3-4 -Homepage: https://download.osgeo.org/proj -Description: PROJ.4 library for cartographic projections diff --git a/ports/proj4/fix-filemanager-uwp.patch b/ports/proj4/fix-filemanager-uwp.patch new file mode 100644 index 00000000000000..14dba72c29c55b --- /dev/null +++ b/ports/proj4/fix-filemanager-uwp.patch @@ -0,0 +1,71 @@ +diff --git a/src/filemanager.cpp b/src/filemanager.cpp +index e6a9ed9..d85290b 100644 +--- a/src/filemanager.cpp ++++ b/src/filemanager.cpp +@@ -48,6 +48,12 @@ + + #include "proj_config.h" + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) ++#define UWP 1 ++#else ++#define UWP 0 ++#endif ++ + #ifdef _WIN32 + #include + #include +@@ -692,10 +698,21 @@ std::unique_ptr FileWin32::open(PJ_CONTEXT *ctx, const char *filename, + ? FILE_ATTRIBUTE_READONLY + : FILE_ATTRIBUTE_NORMAL; + try { ++#if UWP ++ CREATEFILE2_EXTENDED_PARAMETERS extendedParameters; ++ ZeroMemory(&extendedParameters, sizeof(extendedParameters)); ++ extendedParameters.dwSize = sizeof(extendedParameters); ++ extendedParameters.dwFileAttributes = dwFlagsAndAttributes; ++ HANDLE hFile = CreateFile2( ++ UTF8ToWString(std::string(filename)).c_str(), dwDesiredAccess, ++ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, ++ dwCreationDisposition, &extendedParameters); ++#else // UWP + HANDLE hFile = CreateFileW( + UTF8ToWString(std::string(filename)).c_str(), dwDesiredAccess, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr, + dwCreationDisposition, dwFlagsAndAttributes, nullptr); ++#endif // UWP + return std::unique_ptr(hFile != INVALID_HANDLE_VALUE + ? new FileWin32(filename, ctx, hFile) + : nullptr); +@@ -1211,6 +1228,9 @@ const char *proj_context_get_user_writable_directory(PJ_CONTEXT *ctx, + wPath.resize(wcslen(wPath.data())); + path = NS_PROJ::WStringToUTF8(wPath); + #else ++#if UWP ++ if (false) { ++#else // UWP + wchar_t *wPath; + if (SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, nullptr, &wPath) == + S_OK) { +@@ -1218,6 +1238,7 @@ const char *proj_context_get_user_writable_directory(PJ_CONTEXT *ctx, + std::string str = NS_PROJ::WStringToUTF8(ws); + path = str; + CoTaskMemFree(wPath); ++#endif // UWP + #endif + } else { + const char *local_app_data = getenv("LOCALAPPDATA"); +@@ -1311,11 +1332,13 @@ static std::string pj_get_relative_share_proj_internal_no_check() { + #if defined(_WIN32) || defined(HAVE_LIBDL) + #ifdef _WIN32 + HMODULE hm = NULL; ++#if !UWP + if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | + GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, + (LPCSTR)&pj_get_relative_share_proj, &hm) == 0) { + return std::string(); + } ++#endif // UWP + + DWORD path_size = 1024; + diff --git a/ports/proj4/fix-proj4-targets-cmake.patch b/ports/proj4/fix-proj4-targets-cmake.patch new file mode 100644 index 00000000000000..73fa76e50948e8 --- /dev/null +++ b/ports/proj4/fix-proj4-targets-cmake.patch @@ -0,0 +1,68 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7d736d129..2be8f8be9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -129,7 +129,22 @@ if(NOT EXE_SQLITE3) + message(SEND_ERROR "sqlite3 binary not found!") + endif() + +-find_package(Sqlite3 REQUIRED) ++find_package(unofficial-sqlite3 CONFIG REQUIRED) ++if(unofficial-sqlite3_FOUND) ++ set(SQLITE3_FOUND true) ++ get_target_property(SQLITE3_INCLUDE_DIR unofficial::sqlite3::sqlite3 INTERFACE_INCLUDE_DIRECTORIES) ++ set(SQLITE3_LIBRARY unofficial::sqlite3::sqlite3) ++ # Extract version information from the header file ++ if(SQLITE3_INCLUDE_DIR) ++ file(STRINGS ${SQLITE3_INCLUDE_DIR}/sqlite3.h _ver_line ++ REGEX "^#define SQLITE_VERSION *\"[0-9]+\\.[0-9]+\\.[0-9]+\"" ++ LIMIT_COUNT 1) ++ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" ++ SQLITE3_VERSION "${_ver_line}") ++ unset(_ver_line) ++ endif() ++endif() ++ + if(NOT SQLITE3_FOUND) + message(SEND_ERROR "sqlite3 dependency not found!") + endif() +@@ -171,6 +186,7 @@ if(ENABLE_CURL) + find_package(CURL REQUIRED) + if(CURL_FOUND) + set(CURL_ENABLED TRUE) ++ set(CURL_LIBRARY CURL::libcurl) + else() + message(SEND_ERROR "curl dependency not found!") + endif() + +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index c790fa4a8..6653a28b9 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -95,6 +95,10 @@ endif () + + foreach (PROJECT_VARIANT_NAME ${PROJECT_NAME} ${PROJECT_LEGACY_NAME}) + string (TOLOWER "${PROJECT_VARIANT_NAME}" PROJECT_VARIANT_LOWER) ++ set(FIND_DEPENDENCY_SQLITE3 "find_dependency(unofficial-sqlite3 CONFIG)") ++ if(CURL_ENABLED) ++ set(FIND_DEPENDENCY_CURL "find_dependency(CURL CONFIG)") ++ endif() + set (CMAKECONFIGSUBDIR "${CMAKECONFIGDIR}/${PROJECT_VARIANT_LOWER}") + # proj-config.cmake for the install tree. It's installed in + # ${CMAKECONFIGSUBDIR} and @PROJECT_ROOT_DIR@ is the relative + +diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in +index 23f997abd..8baef00f0 100644 +--- a/cmake/project-config.cmake.in ++++ b/cmake/project-config.cmake.in +@@ -7,6 +7,10 @@ + # @PROJECT_VARIANT_NAME@_LIBRARY_DIRS = /usr/local/lib + # @PROJECT_VARIANT_NAME@_BINARY_DIRS = /usr/local/bin + # @PROJECT_VARIANT_NAME@_VERSION = 4.9.1 (for example) ++include(CMakeFindDependencyMacro) ++ ++@FIND_DEPENDENCY_SQLITE3@ ++@FIND_DEPENDENCY_CURL@ + + # Tell the user project where to find our headers and libraries + get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) diff --git a/ports/proj4/fix-sqlite3-bin.patch b/ports/proj4/fix-sqlite3-bin.patch new file mode 100644 index 00000000000000..20fea7141b421f --- /dev/null +++ b/ports/proj4/fix-sqlite3-bin.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 75c4696..2e8a957 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -110,7 +110,7 @@ include(policies) + ################################################################################ + # Check for sqlite3 + ################################################################################ +-find_program(EXE_SQLITE3 sqlite3) ++# Use incoming parameter + if(NOT EXE_SQLITE3) + message(SEND_ERROR "sqlite3 binary not found!") + endif() diff --git a/ports/proj4/fix-win-output-name.patch b/ports/proj4/fix-win-output-name.patch new file mode 100644 index 00000000000000..09256144109853 --- /dev/null +++ b/ports/proj4/fix-win-output-name.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/ProjUtilities.cmake b/cmake/ProjUtilities.cmake +index 6f43edb5c..1ed89d597 100644 +--- a/cmake/ProjUtilities.cmake ++++ b/cmake/ProjUtilities.cmake +@@ -51,7 +51,7 @@ function(proj_target_output_name TARGET_NAME OUTPUT_NAME) + + # On Windows, ABI version is specified using binary file name suffix. + # On Unix, suffix is empty and SOVERSION is used instead. +- if(WIN32) ++ if(0) + string(LENGTH "${${PROJECT_NAME}_ABI_VERSION}" abilen) + if(abilen GREATER 0) + set(SUFFIX "_${${PROJECT_NAME}_ABI_VERSION}") diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index 70878aae640409..34fb1fd028cf9c 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -1,78 +1,70 @@ -include(vcpkg_common_functions) - -set(PROJ4_VERSION 4.9.3) - -vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/proj/proj-${PROJ4_VERSION}.zip" - FILENAME "proj-${PROJ4_VERSION}.zip" - SHA512 c9703008cd1f75fe1239b180158e560b9b88ae2ffd900b72923c716908eb86d1abbc4230647af5e3131f8c34481bdc66b03826d669620161ffcfbe67801cb631 -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${PROJ4_VERSION} + REPO OSGeo/PROJ + REF 7.2.1 + SHA512 e6e77266dcd70c939c16667c916cccab8de161221d2ef600cfca43382f50da2dc8d790561556b4416adbb4ac6fba939004e0cc936c278e0e808dc3566e9a70d4 + HEAD_REF master PATCHES - 0001-CMake-add-detection-of-recent-visual-studio-versions.patch - 0002-CMake-fix-error-by-only-setting-properties-for-targe.patch - 0003-CMake-configurable-cmake-config-install-location.patch + fix-filemanager-uwp.patch + fix-sqlite3-bin.patch + fix-win-output-name.patch + fix-proj4-targets-cmake.patch + tools-cmake.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(VCPKG_BUILD_SHARED_LIBS ON) + set(EXTRA_FEATURES tiff ENABLE_TIFF tools BUILD_PROJSYNC tools ENABLE_CURL) + set(TOOL_NAMES cct cs2cs geod gie proj projinfo projsync) else() set(VCPKG_BUILD_SHARED_LIBS OFF) + set(TOOL_NAMES cct cs2cs geod gie proj projinfo) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DBUILD_LIBPROJ_SHARED=${VCPKG_BUILD_SHARED_LIBS} - -DPROJ_LIB_SUBDIR=lib - -DPROJ_INCLUDE_SUBDIR=include - -DPROJ_DATA_SUBDIR=share/proj4 - -DPROJ_CMAKE_CONFIG_SUBDIR=share/proj4 - -DBUILD_CS2CS=NO - -DBUILD_PROJ=NO - -DBUILD_GEOD=NO - -DBUILD_NAD2BIN=NO - -DPROJ4_TESTS=NO +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + database BUILD_PROJ_DATABASE + tools BUILD_CCT + tools BUILD_CS2CS + tools BUILD_GEOD + tools BUILD_GIE + tools BUILD_PROJ + tools BUILD_PROJINFO + ${EXTRA_FEATURES} ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() - -# Rename library and adapt cmake configuration -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents) - string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(WARNING "ENABLE_TIFF ENABLE_CURL and BUILD_PROJSYNC will be off when building static") + set(FEATURE_OPTIONS ${FEATURE_OPTIONS} -DENABLE_TIFF=OFF -DENABLE_CURL=OFF -DBUILD_PROJSYNC=OFF) endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents) - string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}") +if ("database" IN_LIST FEATURES) + set(EXE_SQLITE3 ${CURRENT_HOST_INSTALLED_DIR}/tools/sqlite3${VCPKG_HOST_EXECUTABLE_SUFFIX}) endif() -file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake _contents) -string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" - "set(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\")\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" - _contents "${_contents}" +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${FEATURE_OPTIONS} + -DPROJ_LIB_SUBDIR=lib + -DPROJ_INCLUDE_SUBDIR=include + -DPROJ_DATA_SUBDIR=share/${PORT} + -DBUILD_TESTING=OFF + -DEXE_SQLITE3=${EXE_SQLITE3} ) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}") -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) - endif() -endif() +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME PROJ CONFIG_PATH lib/cmake/proj DO_NOT_DELETE_PARENT_CONFIG_PATH) +vcpkg_cmake_config_fixup(PACKAGE_NAME PROJ4 CONFIG_PATH lib/cmake/proj4) + +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif () + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/proj4 RENAME copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/proj4/tools-cmake.patch b/ports/proj4/tools-cmake.patch new file mode 100644 index 00000000000000..514a15ad193805 --- /dev/null +++ b/ports/proj4/tools-cmake.patch @@ -0,0 +1,15 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 534bc311b..f9fb0f1bb 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -83,10 +83,3 @@ if(BUILD_PROJSYNC) + endif() + + +-if(MSVC OR CMAKE_CONFIGURATION_TYPES) +- if(BIN_TARGETS) +- # Add _d suffix for your debug versions of the tools +- set_target_properties(${BIN_TARGETS} PROPERTIES +- DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) +- endif() +-endif() diff --git a/ports/proj4/usage b/ports/proj4/usage new file mode 100644 index 00000000000000..ebf9f6c8d5aae1 --- /dev/null +++ b/ports/proj4/usage @@ -0,0 +1,4 @@ +The package proj4 provides CMake targets: + + find_package(PROJ CONFIG REQUIRED) + target_link_libraries(main PRIVATE PROJ::proj) diff --git a/ports/proj4/vcpkg.json b/ports/proj4/vcpkg.json new file mode 100644 index 00000000000000..b2d12fc0013bf5 --- /dev/null +++ b/ports/proj4/vcpkg.json @@ -0,0 +1,51 @@ +{ + "name": "proj4", + "version-semver": "7.2.1", + "port-version": 5, + "description": "PROJ.4 library for cartographic projections", + "homepage": "https://github.com/OSGeo/PROJ", + "dependencies": [ + { + "name": "sqlite3", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "database", + "tiff" + ], + "features": { + "database": { + "description": "generate database", + "dependencies": [ + { + "name": "sqlite3", + "host": true, + "features": [ + "tool" + ] + } + ] + }, + "tiff": { + "description": "Enable TIFF support to read some grids", + "dependencies": [ + "tiff" + ] + }, + "tools": { + "description": "generate tools", + "dependencies": [ + "curl" + ] + } + } +} diff --git a/ports/prometheus-cpp/CONTROL b/ports/prometheus-cpp/CONTROL deleted file mode 100644 index 341af0e8ca70e0..00000000000000 --- a/ports/prometheus-cpp/CONTROL +++ /dev/null @@ -1,20 +0,0 @@ -Source: prometheus-cpp -Version: 0.7.0 -Description: Prometheus Client Library for Modern C++ -Default-Features: compression, pull - -Feature: compression -Build-Depends: zlib -Description: Enable zlib compression - -Feature: tests -Build-Depends: gtest -Description: Additional testing support - -Feature: pull -Build-Depends: civetweb -Description: Support for regular pull mode - -Feature: push -Build-Depends: curl -Description: Support push gateway diff --git a/ports/prometheus-cpp/portfile.cmake b/ports/prometheus-cpp/portfile.cmake index 20f58c8a25ce4e..ce2c018fff765a 100644 --- a/ports/prometheus-cpp/portfile.cmake +++ b/ports/prometheus-cpp/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jupp0r/prometheus-cpp - REF v0.7.0 - SHA512 ff946585e24d84596e851f838b42566512fe368f164254d309b2aa3bda770c5442b6eeb880055351f89e0e2d0b581fddb5b0e70dd5b2a15370e508c4aabbcb1c + REF 342de5e93bd0cbafde77ec801f9dd35a03bceb3f # v0.13.0 + SHA512 2edd093dff57109f4e7050f7d870010e696642f0445a8d50f689a9a7e8f4704e74659846c1afcdfcd700ceeb64b48ea83159e87ca00ca58de4866dd39975590b HEAD_REF master ) @@ -28,6 +26,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DUSE_THIRDPARTY_LIBRARIES=OFF # use vcpkg packages + -DGENERATE_PKGCONFIG=OFF ${FEATURE_OPTIONS} ) @@ -40,4 +39,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/prometheus-cpp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/prometheus-cpp/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/prometheus-cpp/vcpkg.json b/ports/prometheus-cpp/vcpkg.json new file mode 100644 index 00000000000000..371b1e7380deb0 --- /dev/null +++ b/ports/prometheus-cpp/vcpkg.json @@ -0,0 +1,35 @@ +{ + "name": "prometheus-cpp", + "version-semver": "0.13.0", + "description": "Prometheus Client Library for Modern C++", + "default-features": [ + "compression", + "pull" + ], + "features": { + "compression": { + "description": "Enable zlib compression", + "dependencies": [ + "zlib" + ] + }, + "pull": { + "description": "Support for regular pull mode", + "dependencies": [ + "civetweb" + ] + }, + "push": { + "description": "Support push gateway", + "dependencies": [ + "curl" + ] + }, + "tests": { + "description": "Additional testing support", + "dependencies": [ + "gtest" + ] + } + } +} diff --git a/ports/protobuf-c/fix-features.patch b/ports/protobuf-c/fix-features.patch new file mode 100644 index 00000000000000..89b2dd43201763 --- /dev/null +++ b/ports/protobuf-c/fix-features.patch @@ -0,0 +1,62 @@ +diff --git a/build-cmake/CMakeLists.txt b/build-cmake/CMakeLists.txt +index bc1728f..7c6a04d 100644 +--- a/build-cmake/CMakeLists.txt ++++ b/build-cmake/CMakeLists.txt +@@ -61,11 +61,15 @@ if (MSVC AND MSVC_STATIC_BUILD) + endif(${flag_var} MATCHES "/MD") + endforeach(flag_var) + endif (MSVC AND MSVC_STATIC_BUILD) ++ ++IF(WITH_TOOLS) + FILE(GLOB PROTOC_GEN_C_SRC ${MAIN_DIR}/protoc-c/*.h ${MAIN_DIR}/protoc-c/*.cc ) + ADD_EXECUTABLE(protoc-gen-c ${PROTOC_GEN_C_SRC}) + + TARGET_LINK_LIBRARIES(protoc-gen-c ${PROTOBUF_PROTOC_LIBRARY} ${PROTOBUF_LIBRARY}) ++ENDIF() + ++IF(WITH_TEST AND WITH_TOOLS) + IF(CMAKE_HOST_UNIX) + ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ln -sf protoc-gen-c protoc-c +@@ -79,8 +83,6 @@ FUNCTION(GENERATE_TEST_SOURCES PROTO_FILE SRC HDR) + DEPENDS protoc-gen-c) + ENDFUNCTION() + +- +-IF(CMAKE_BUILD_TYPE MATCHES Debug) + ENABLE_TESTING() + + GENERATE_TEST_SOURCES(${TEST_DIR}/test.proto t/test.pb-c.c t/test.pb-c.h) +@@ -126,17 +128,17 @@ GENERATE_TEST_SOURCES(${TEST_DIR}/test-proto3.proto t/test-proto3.pb-c.c t/test- + ADD_EXECUTABLE(test-generated-code3 ${TEST_DIR}/generated-code/test-generated-code.c t/test-proto3.pb-c.c t/test-proto3.pb-c.h) + TARGET_COMPILE_DEFINITIONS(test-generated-code3 PUBLIC -DPROTO3) + TARGET_LINK_LIBRARIES(test-generated-code3 protobuf-c) +- + ENDIF() + +-INSTALL(TARGETS protoc-gen-c protobuf-c RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) +-INSTALL(FILES ${MAIN_DIR}/protobuf-c/protobuf-c.h DESTINATION include/protobuf-c) +-INSTALL(FILES ${MAIN_DIR}/protobuf-c/protobuf-c.h DESTINATION include) ++IF (WITH_TOOLS) ++INSTALL(TARGETS protoc-gen-c RUNTIME DESTINATION tools LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ENDIF() + + IF(CMAKE_HOST_UNIX) + INSTALL(CODE "EXECUTE_PROCESS (COMMAND ln -sf protoc-gen-c protoc-c WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)") + ENDIF() + ++IF (WITH_TEST) + INCLUDE(Dart) + + SET(DART_TESTING_TIMEOUT 5) +@@ -147,5 +149,10 @@ ADD_TEST(test-issue220 test-issue220) + ADD_TEST(test-issue251 test-issue251) + ADD_TEST(test-version test-version) + ++ENDIF() ++ ++INSTALL(TARGETS protobuf-c RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++INSTALL(FILES ${MAIN_DIR}/protobuf-c/protobuf-c.h DESTINATION include/protobuf-c) ++INSTALL(FILES ${MAIN_DIR}/protobuf-c/protobuf-c.h DESTINATION include) + + INCLUDE(CPack) diff --git a/ports/protobuf-c/fix-usage-issue.patch b/ports/protobuf-c/fix-usage-issue.patch new file mode 100644 index 00000000000000..ce5e4cfa212c3a --- /dev/null +++ b/ports/protobuf-c/fix-usage-issue.patch @@ -0,0 +1,36 @@ +diff --git a/build-cmake/CMakeLists.txt b/build-cmake/CMakeLists.txt +index 7c6a04d..83534cb 100644 +--- a/build-cmake/CMakeLists.txt ++++ b/build-cmake/CMakeLists.txt +@@ -14,6 +14,11 @@ option(BUILD_PROTO3 "BUILD_PROTO3" ON) + INCLUDE(TestBigEndian) + TEST_BIG_ENDIAN(WORDS_BIGENDIAN) + ++ ++IF(CMAKE_HOST_UNIX) ++ FIND_PACKAGE(Threads REQUIRED) ++ENDIF() ++ + SET(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") + ADD_DEFINITIONS(-DPACKAGE_VERSION="${PACKAGE_VERSION}") + ADD_DEFINITIONS(-DPACKAGE_STRING="${PACKAGE_STRING}") +@@ -67,6 +72,9 @@ FILE(GLOB PROTOC_GEN_C_SRC ${MAIN_DIR}/protoc-c/*.h ${MAIN_DIR}/protoc-c/*.cc ) + ADD_EXECUTABLE(protoc-gen-c ${PROTOC_GEN_C_SRC}) + + TARGET_LINK_LIBRARIES(protoc-gen-c ${PROTOBUF_PROTOC_LIBRARY} ${PROTOBUF_LIBRARY}) ++IF(CMAKE_HOST_UNIX) ++ TARGET_LINK_LIBRARIES(protoc-gen-c ${CMAKE_THREAD_LIBS_INIT}) ++ENDIF() + ENDIF() + + IF(WITH_TEST AND WITH_TOOLS) +@@ -99,6 +107,9 @@ GENERATE_TEST_SOURCES(${TEST_DIR}/test-full.proto t/test-full.pb-c.c t/test-full + + ADD_EXECUTABLE(cxx-generate-packed-data ${TEST_DIR}/generated-code2/cxx-generate-packed-data.cc t/test-full.pb.h t/test-full.pb.cc) + TARGET_LINK_LIBRARIES(cxx-generate-packed-data ${PROTOBUF_LIBRARY}) ++IF (CMAKE_HOST_UNIX) ++ TARGET_LINK_LIBRARIES(cxx-generate-packed-data ${CMAKE_THREAD_LIBS_INIT}) ++ENDIF() + + FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/t/generated-code2) + ADD_CUSTOM_COMMAND(OUTPUT t/generated-code2/test-full-cxx-output.inc diff --git a/ports/protobuf-c/portfile.cmake b/ports/protobuf-c/portfile.cmake new file mode 100644 index 00000000000000..98f7035f642cff --- /dev/null +++ b/ports/protobuf-c/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux platform" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO protobuf-c/protobuf-c + REF 1390409f4ee4e26d0635310995b516eb702c3f9e #1.3.2 + SHA512 5c60883c4ef064c641875bfe7f89bf255a29dd20b5e0be5878cbaec03f2efd1f926c3e40dc0090cb172b8eef227fddafe86051f08edb3e1c26d0bd6aca673e41 + HEAD_REF master + PATCHES + fix-features.patch + fix-usage-issue.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools WITH_TOOLS + test WITH_TEST +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/build-cmake + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +# Include files should not be duplicated into the /debug/include directory. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/protobuf-c/vcpkg.json b/ports/protobuf-c/vcpkg.json new file mode 100644 index 00000000000000..548cce39b6c9a7 --- /dev/null +++ b/ports/protobuf-c/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "protobuf-c", + "version-string": "1.3.2", + "port-version": 3, + "description": "This is protobuf-c, a C implementation of the Google Protocol Buffers data serialization format.", + "homepage": "https://github.com/protobuf-c/protobuf-c", + "dependencies": [ + "protobuf" + ], + "features": { + "test": { + "description": "build test project.", + "dependencies": [ + { + "name": "protobuf-c", + "features": [ + "tools" + ] + } + ] + }, + "tools": { + "description": "build tools." + } + } +} diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL deleted file mode 100644 index ba4ce7d9192a45..00000000000000 --- a/ports/protobuf/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: protobuf -Version: 3.9.1 -Homepage: https://github.com/google/protobuf -Description: Protocol Buffers - Google's data interchange format - -Feature: zlib -Description: ZLib based features like Gzip streams -Build-Depends: zlib \ No newline at end of file diff --git a/ports/protobuf/fix-default-proto-file-path.patch b/ports/protobuf/fix-default-proto-file-path.patch new file mode 100644 index 00000000000000..a5af918b32786c --- /dev/null +++ b/ports/protobuf/fix-default-proto-file-path.patch @@ -0,0 +1,20 @@ +diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc +index f192ae6..22900ed 100644 +--- a/src/google/protobuf/compiler/command_line_interface.cc ++++ b/src/google/protobuf/compiler/command_line_interface.cc +@@ -260,11 +260,15 @@ void AddDefaultProtoPaths( + return; + } + // Check if the upper level directory has an "include" subdirectory. ++ // change "'$/bin' is next to 'include'" assumption to "'$/bin/tools' is next to 'include'" ++ for (int i = 0; i < 2; i++) ++ { + pos = path.find_last_of("/\\"); + if (pos == std::string::npos || pos == 0) { + return; + } + path = path.substr(0, pos); ++ } + if (IsInstalledProtoPath(path + "/include")) { + paths->push_back( + std::pair("", path + "/include")); diff --git a/ports/protobuf/fix-static-build.patch b/ports/protobuf/fix-static-build.patch new file mode 100644 index 00000000000000..0ba4982fe6f84e --- /dev/null +++ b/ports/protobuf/fix-static-build.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/install.cmake b/cmake/install.cmake +index 4091bc8..9850018 100644 +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -31,7 +31,7 @@ endforeach() + if (protobuf_BUILD_PROTOC_BINARIES) + install(TARGETS protoc EXPORT protobuf-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) +- if (UNIX AND NOT APPLE) ++ if (UNIX AND NOT APPLE AND NOT protobuf_MSVC_STATIC_RUNTIME) + set_property(TARGET protoc + PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") + elseif (APPLE) diff --git a/ports/protobuf/fix-uwp.patch b/ports/protobuf/fix-uwp.patch deleted file mode 100644 index ba09d5913199a8..00000000000000 --- a/ports/protobuf/fix-uwp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 3afe376..1a0b6a7 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -151,6 +151,7 @@ if (MSVC) - /wd4506 # no definition for inline function 'function' - /wd4800 # 'type' : forcing value to bool 'true' or 'false' (performance warning) - /wd4996 # The compiler encountered a deprecated declaration. -+ /wd4703 # Potentially uninitialized local pointer variable 'name' used. - ) - # Allow big object - add_definitions(/bigobj) diff --git a/ports/protobuf/port_def.patch b/ports/protobuf/port_def.patch new file mode 100644 index 00000000000000..31d71531d0aeaa --- /dev/null +++ b/ports/protobuf/port_def.patch @@ -0,0 +1,14 @@ +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc +index f7b64a080..3493d9082 100644 +--- a/src/google/protobuf/port_def.inc ++++ b/src/google/protobuf/port_def.inc +@@ -564,7 +564,8 @@ + + // Our use of constinit does not yet work with GCC: + // https://github.com/protocolbuffers/protobuf/issues/8310 +-#if defined(__cpp_constinit) && !defined(__GNUC__) ++// Does not work yet with Visual Studio 2019 Update 16.10 ++#if defined(__cpp_constinit) && !defined(__GNUC__) && !defined(_MSC_VER) + #define PROTOBUF_CONSTINIT constinit + #elif defined(__has_cpp_attribute) + #if __has_cpp_attribute(clang::require_constant_initialization) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index bb6726410f0cf7..a645866c94aba2 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -1,55 +1,47 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO protocolbuffers/protobuf - REF v3.9.1 - SHA512 9accb56c1aadef83bf27280e15a99809a3561cbd4b39d6605dec730cc112bf4fd2e9f1ac39127b32a1b87253e712be4b4f12afe4061a8f7be76266b3f4bca314 + REF 436bd7880e458532901c58f4d9d1ea23fa7edd52 #v3.15.8 + SHA512 88bb9a965bccfe11a07aee2c0c16eb9cc1845ea2d7500ef6def3e1c0a8155ac4eadd0ceef4b12552960dffe95a0fc82549d1abba71ca073ab86ec5de57d9cafb HEAD_REF master PATCHES - fix-uwp.patch + fix-static-build.patch + fix-default-proto-file-path.patch + port_def.patch ) -if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - set(protobuf_BUILD_PROTOC_BINARIES OFF) -elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME) - set(protobuf_BUILD_PROTOC_BINARIES OFF) -else() - set(protobuf_BUILD_PROTOC_BINARIES ON) -endif() - -if(NOT protobuf_BUILD_PROTOC_BINARIES AND NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/protobuf) - message(FATAL_ERROR "Cross-targetting protobuf requires the x86-windows protoc to be available. Please install protobuf:x86-windows first.") -endif() +string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" protobuf_BUILD_PROTOC_BINARIES) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" protobuf_BUILD_SHARED_LIBS) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" protobuf_MSVC_STATIC_RUNTIME) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(VCPKG_BUILD_SHARED_LIBS ON) -else() - set(VCPKG_BUILD_SHARED_LIBS OFF) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + zlib protobuf_WITH_ZLIB +) -if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - set(VCPKG_BUILD_STATIC_CRT OFF) +if(VCPKG_TARGET_IS_UWP) + set(protobuf_BUILD_LIBPROTOC OFF) else() - set(VCPKG_BUILD_STATIC_CRT ON) + set(protobuf_BUILD_LIBPROTOC ON) endif() -if("zlib" IN_LIST FEATURES) - set(protobuf_WITH_ZLIB ON) -else() - set(protobuf_WITH_ZLIB OFF) +if (VCPKG_DOWNLOAD_MODE) + # download PKGCONFIG in download mode which is used in `vcpkg_fixup_pkgconfig()` at the end of this script. + # download it here because `vcpkg_configure_cmake()` halts execution in download mode when running configure process. + vcpkg_find_acquire_program(PKGCONFIG) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake PREFER_NINJA OPTIONS - -Dprotobuf_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} - -Dprotobuf_MSVC_STATIC_RUNTIME=${VCPKG_BUILD_STATIC_CRT} - -Dprotobuf_WITH_ZLIB=${protobuf_WITH_ZLIB} + -Dprotobuf_BUILD_SHARED_LIBS=${protobuf_BUILD_SHARED_LIBS} + -Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME} -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_CMAKEDIR:STRING=share/protobuf -Dprotobuf_BUILD_PROTOC_BINARIES=${protobuf_BUILD_PROTOC_BINARIES} + -Dprotobuf_BUILD_LIBPROTOC=${protobuf_BUILD_LIBPROTOC} + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -67,16 +59,11 @@ endfunction() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/include) -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake + "\${_IMPORT_PREFIX}/bin/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}" + "\${_IMPORT_PREFIX}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}" + ) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") @@ -88,36 +75,53 @@ endif() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share) -if(CMAKE_HOST_WIN32) - if(protobuf_BUILD_PROTOC_BINARIES) - file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - else() - file(COPY ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) - endif() - - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) - protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) +if(protobuf_BUILD_PROTOC_BINARIES) + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_copy_tools(TOOL_NAMES protoc AUTO_CLEAN) else() - protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin/protoc.exe) - protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) + vcpkg_copy_tools(TOOL_NAMES protoc protoc-3.15.8.0 AUTO_CLEAN) endif() else() - file(GLOB EXECUTABLES ${CURRENT_PACKAGES_DIR}/bin/protoc*) - foreach(E IN LISTS EXECUTABLES) - file(INSTALL ${E} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ) - endforeach() - protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +endif() + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/${PORT}/protobuf-config.cmake + "if(protobuf_MODULE_COMPATIBLE)" + "if(ON)" +) +if(NOT protobuf_BUILD_LIBPROTOC) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/${PORT}/protobuf-module.cmake + "_protobuf_find_libraries(Protobuf_PROTOC protoc)" + "" + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(READ ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h _contents) - string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h "${_contents}") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h + "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" + "\#ifndef PROTOBUF_USE_DLLS\n\#define PROTOBUF_USE_DLLS\n\#endif // PROTOBUF_USE_DLLS\n\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" + ) endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() +set(packages protobuf protobuf-lite) +foreach(_package IN LISTS packages) + set(_file ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${_package}.pc) + if(EXISTS "${_file}") + vcpkg_replace_string(${_file} "-l${_package}" "-l${_package}d") + endif() +endforeach() + +vcpkg_fixup_pkgconfig() + +if(NOT protobuf_BUILD_PROTOC_BINARIES) + configure_file(${CMAKE_CURRENT_LIST_DIR}/protobuf-targets-vcpkg-protoc.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/protobuf-targets-vcpkg-protoc.cmake COPYONLY) +endif() + +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/protobuf/protobuf-targets-vcpkg-protoc.cmake b/ports/protobuf/protobuf-targets-vcpkg-protoc.cmake new file mode 100644 index 00000000000000..245adf56083899 --- /dev/null +++ b/ports/protobuf/protobuf-targets-vcpkg-protoc.cmake @@ -0,0 +1,8 @@ +# Create imported target protobuf::protoc +add_executable(protobuf::protoc IMPORTED) + +# Import target "protobuf::protoc" for configuration "Release" +set_property(TARGET protobuf::protoc APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(protobuf::protoc PROPERTIES + IMPORTED_LOCATION_RELEASE "${Protobuf_PROTOC_EXECUTABLE}" +) diff --git a/ports/protobuf/vcpkg-cmake-wrapper.cmake b/ports/protobuf/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..7269aedcca508f --- /dev/null +++ b/ports/protobuf/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,16 @@ +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.3) + cmake_policy(PUSH) + cmake_policy(SET CMP0057 NEW) + if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS) + if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + set(Protobuf_USE_STATIC_LIBS ON) + else() + set(Protobuf_USE_STATIC_LIBS OFF) + endif() + endif() + cmake_policy(POP) +endif() + +find_program(Protobuf_PROTOC_EXECUTABLE NAMES protoc PATHS "${CMAKE_CURRENT_LIST_DIR}/../../tools/protobuf" NO_DEFAULT_PATH) + +_find_package(${ARGS}) diff --git a/ports/protobuf/vcpkg.json b/ports/protobuf/vcpkg.json new file mode 100644 index 00000000000000..40b557dd3c30b7 --- /dev/null +++ b/ports/protobuf/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "protobuf", + "version-semver": "3.15.8", + "port-version": 4, + "description": "Protocol Buffers - Google's data interchange format", + "homepage": "https://github.com/protocolbuffers/protobuf", + "dependencies": [ + { + "name": "protobuf", + "host": true + } + ], + "features": { + "zlib": { + "description": "ZLib based features like Gzip streams", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/protopuf/portfile.cmake b/ports/protopuf/portfile.cmake new file mode 100644 index 00000000000000..80b7535e484873 --- /dev/null +++ b/ports/protopuf/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PragmaTwice/protopuf + REF v2.1.0 + SHA512 328fe2a861009c8eaa38299bf1ba31d3a47d73220018d3539b8457bb1d5d512c05e9652769a0261f0ae18be4e1e4e839e5471dfabdf0e6d130361e719ff6aadc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/protopuf/vcpkg.json b/ports/protopuf/vcpkg.json new file mode 100644 index 00000000000000..82833fd83a84e7 --- /dev/null +++ b/ports/protopuf/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "protopuf", + "version-semver": "2.1.0", + "description": "A little, highly templated, and protobuf-compatible serialization/deserialization library written in C++20", + "homepage": "https://github.com/PragmaTwice/protopuf" +} diff --git a/ports/protozero/portfile.cmake b/ports/protozero/portfile.cmake new file mode 100644 index 00000000000000..fda45303cc87cb --- /dev/null +++ b/ports/protozero/portfile.cmake @@ -0,0 +1,21 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/protozero + SHA512 d09a34865c535264c52f9c605ccb6f453c357f5e3a7b0dc72b097de288eabc6985a5b81ddbe79c47d0af2d8f74e33bd380fefce47acb15d8d51d5c151d71786b + REF v1.7.0 + HEAD_REF master +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug") +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/protozero/vcpkg.json b/ports/protozero/vcpkg.json new file mode 100644 index 00000000000000..aae619a1e56c20 --- /dev/null +++ b/ports/protozero/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "protozero", + "version-semver": "1.7.0", + "description": "Minimalist protocol buffer decoder and encoder in C++", + "homepage": "https://github.com/mapbox/protozero", + "dependencies": [ + "protobuf" + ] +} diff --git a/ports/proxygen/fix-duplicated-target.patch b/ports/proxygen/fix-duplicated-target.patch new file mode 100644 index 00000000000000..89d32e53db647d --- /dev/null +++ b/ports/proxygen/fix-duplicated-target.patch @@ -0,0 +1,16 @@ +diff --git a/build/fbcode_builder/CMake/FindSodium.cmake b/build/fbcode_builder/CMake/FindSodium.cmake +index c664ccbe3..3c3f1245c 100644 +--- a/build/fbcode_builder/CMake/FindSodium.cmake ++++ b/build/fbcode_builder/CMake/FindSodium.cmake +@@ -254,7 +254,10 @@ if(sodium_USE_STATIC_LIBS) + else() + set(_LIB_TYPE SHARED) + endif() +-add_library(sodium ${_LIB_TYPE} IMPORTED) ++ ++if(NOT TARGET sodium) ++ add_library(sodium ${_LIB_TYPE} IMPORTED) ++endif() + + set_target_properties(sodium PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${sodium_INCLUDE_DIR}" diff --git a/ports/proxygen/portfile.cmake b/ports/proxygen/portfile.cmake new file mode 100644 index 00000000000000..d2789572d9d96d --- /dev/null +++ b/ports/proxygen/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_fail_port_install(ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/proxygen + REF v2021.06.14.00 + SHA512 f5ab54514575f86897438f40a481796c34031101775b61a01581338c91686159995e4f822909e42eed4c006b2c6a6351887d469cc9df1df80711dba10cc15a19 + HEAD_REF master + PATCHES + remove-register.patch + fix-duplicated-target.patch # fixed in master +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_PATH}) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_find_acquire_program(GPERF) + get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) + vcpkg_add_to_path(${GPERF_PATH}) +else() + # gperf only have windows package in vcpkg now. + if (NOT EXISTS /usr/bin/gperf) + message(FATAL_ERROR "proxygen requires gperf, these can be installed on Ubuntu systems via apt-get install gperf.") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_tools(TOOL_NAMES proxygen_curl proxygen_echo proxygen_proxy proxygen_push proxygen_static AUTO_CLEAN) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/proxygen) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/proxygen/remove-register.patch b/ports/proxygen/remove-register.patch new file mode 100644 index 00000000000000..18a930649c3a43 --- /dev/null +++ b/ports/proxygen/remove-register.patch @@ -0,0 +1,12 @@ +diff --git a/proxygen/lib/utils/gen_perfect_hash_table.sh b/proxygen/lib/utils/gen_perfect_hash_table.sh +index a870b2d67..2dec9c5a1 100755 +--- a/proxygen/lib/utils/gen_perfect_hash_table.sh ++++ b/proxygen/lib/utils/gen_perfect_hash_table.sh +@@ -35,6 +35,7 @@ function generate_perfect_hash_table { + LC_ALL=C sort -u ${1?} | awk "${6?}" - "${5?}" | \ + ${8:-gperf} -m5 -D --output-file="${7?}" + perl -p -i -e "s/\/\*FALLTHROUGH\*\//FOLLY_FALLTHROUGH;/g" "${7?}" ++ perl -p -i -e "s/register//g" "${7?}" + + # Here we delete one of the comment lines gperf adds to the top of the file. + # i.e. /* Command-line: .../gperf -m5 --output-file=... */ diff --git a/ports/proxygen/vcpkg.json b/ports/proxygen/vcpkg.json new file mode 100644 index 00000000000000..2e8dd6606b95db --- /dev/null +++ b/ports/proxygen/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "proxygen", + "version-string": "2021.06.14.00", + "description": "It comprises the core C++ HTTP abstractions used at Facebook.", + "homepage": "https://github.com/facebook/proxygen", + "supports": "!windows", + "dependencies": [ + "boost-context", + "boost-date-time", + "boost-filesystem", + "boost-iostreams", + "boost-program-options", + "boost-regex", + "boost-system", + "boost-thread", + "fizz", + "folly", + "openssl", + "wangle", + "zlib", + "zstd" + ] +} diff --git a/ports/psimd/portfile.cmake b/ports/psimd/portfile.cmake new file mode 100644 index 00000000000000..f68dacb838f692 --- /dev/null +++ b/ports/psimd/portfile.cmake @@ -0,0 +1,15 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Maratyszcza/psimd + REF 072586a71b55b7f8c584153d223e95687148a900 + SHA512 a18faea093423dd9fe19ece8b228e011dccce0a2a22222f777ea19b023a13173966d4a8aea01147e8fc58de5d39cffcedeb2221a1572ae52bd5aba1295f86a94 +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) diff --git a/ports/psimd/vcpkg.json b/ports/psimd/vcpkg.json new file mode 100644 index 00000000000000..49fc6e93d97a65 --- /dev/null +++ b/ports/psimd/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "psimd", + "version-string": "2021-02-21", + "description": "Portable 128-bit SIMD intrinsics", + "homepage": "https://github.com/Maratyszcza/psimd" +} diff --git a/ports/ptex/CONTROL b/ports/ptex/CONTROL deleted file mode 100644 index 17e2bbe5ecafde..00000000000000 --- a/ports/ptex/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: ptex -Version: 2.1.28-1 -Homepage: https://github.com/wdas/ptex -Description: Per-Face Texture Mapping for Production Rendering. -Build-Depends: zlib diff --git a/ports/ptex/fix-build.patch b/ports/ptex/fix-build.patch index 6d6484d606a3b3..9c74eeda8fd991 100644 --- a/ports/ptex/fix-build.patch +++ b/ports/ptex/fix-build.patch @@ -1,35 +1,40 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index dd327d0..5043452 100644 +index c708153..0e004da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -6,15 +6,6 @@ include(CTest) - include(FindZLIB) +@@ -60,10 +60,11 @@ include(GNUInstallDirs) + include(CTest) include(FindThreads) --enable_testing() ++find_package(ZLIB REQUIRED) ++if (0) + # Use pkg-config to create a PkgConfig::Ptex_ZLIB imported target + find_package(PkgConfig REQUIRED) + pkg_checK_modules(Ptex_ZLIB REQUIRED zlib IMPORTED_TARGET) - --# Detect the build type from the $FLAVOR environment variable --if ("$ENV{FLAVOR}" MATCHES "debug") -- set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "type of build" FORCE) --else () -- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE) --endif () -- - if (NOT WIN32) - set(CMAKE_CXX_FLAGS "-std=c++98 -Wall -Wextra -pedantic") + enable_testing() + + if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) +@@ -77,6 +78,7 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE) + endif () endif () -@@ -40,6 +31,6 @@ include_directories(src/ptex) - include_directories(${ZLIB_INCLUDE_DIR}) ++endif() + + if (NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic") +@@ -99,7 +101,9 @@ endif () + include_directories(src/ptex) add_subdirectory(src/ptex) --add_subdirectory(src/utils) --add_subdirectory(src/tests) --add_subdirectory(src/doc) -+#add_subdirectory(src/utils) -+#add_subdirectory(src/tests) -+#add_subdirectory(src/doc) ++if (0) + add_subdirectory(src/utils) + add_subdirectory(src/tests) + add_subdirectory(src/doc) ++endif() + add_subdirectory(src/build) diff --git a/src/ptex/CMakeLists.txt b/src/ptex/CMakeLists.txt -index c926d98..ac2c71d 100644 +index ba3a3cc..1619ff1 100644 --- a/src/ptex/CMakeLists.txt +++ b/src/ptex/CMakeLists.txt @@ -1,6 +1,8 @@ @@ -42,24 +47,53 @@ index c926d98..ac2c71d 100644 + add_definitions(-DPTEX_STATIC) +endif () - set(SRCS - PtexCache.cpp -@@ -14,15 +16,11 @@ set(SRCS - PtexUtils.cpp + configure_file(PtexVersion.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/PtexVersion.h @ONLY) +@@ -18,29 +20,35 @@ set(SRCS PtexWriter.cpp) --add_library(Ptex_static STATIC ${SRCS}) --set_target_properties(Ptex_static PROPERTIES OUTPUT_NAME Ptex) -+add_library(Ptex ${SRCS}) - --add_library(Ptex_dynamic SHARED ${SRCS}) --set_target_properties(Ptex_dynamic PROPERTIES OUTPUT_NAME Ptex) -+target_link_libraries(Ptex ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES}) + if(PTEX_BUILD_STATIC_LIBS) +- add_library(Ptex_static STATIC ${SRCS}) +- set_target_properties(Ptex_static PROPERTIES OUTPUT_NAME Ptex) +- target_include_directories(Ptex_static ++ add_library(Ptex STATIC ${SRCS}) ++ target_include_directories(Ptex + PUBLIC + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}) +- target_link_libraries(Ptex_static +- PUBLIC ${CMAKE_THREAD_LIBS_INIT} PkgConfig::Ptex_ZLIB) +- install(TARGETS Ptex_static EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_link_libraries(Ptex ++ PUBLIC ${CMAKE_THREAD_LIBS_INIT} ZLIB::ZLIB) ++ install(TARGETS Ptex EXPORT Ptex ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() --target_link_libraries(Ptex_dynamic ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES}) -- --install(TARGETS Ptex_static Ptex_dynamic DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+install(TARGETS Ptex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(PTEX_BUILD_SHARED_LIBS) +- add_library(Ptex_dynamic SHARED ${SRCS}) +- set_target_properties(Ptex_dynamic PROPERTIES OUTPUT_NAME Ptex) +- target_include_directories(Ptex_dynamic ++ add_library(Ptex SHARED ${SRCS}) ++ target_include_directories(Ptex + PUBLIC + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}) +- target_link_libraries(Ptex_dynamic +- PUBLIC ${CMAKE_THREAD_LIBS_INIT} PkgConfig::Ptex_ZLIB) +- install(TARGETS Ptex_dynamic EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_link_libraries(Ptex ++ PUBLIC ${CMAKE_THREAD_LIBS_INIT} ZLIB::ZLIB) ++ install(TARGETS Ptex EXPORT Ptex ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() install(FILES - PtexHalf.h diff --git a/ports/ptex/fix-config.cmake.patch b/ports/ptex/fix-config.cmake.patch new file mode 100644 index 00000000000000..d635d4e05c1dad --- /dev/null +++ b/ports/ptex/fix-config.cmake.patch @@ -0,0 +1,18 @@ +diff --git a/src/build/ptex-config.cmake b/src/build/ptex-config.cmake +index f95df9e..2d3f58f 100644 +--- a/src/build/ptex-config.cmake ++++ b/src/build/ptex-config.cmake +@@ -1,11 +1,11 @@ + @PACKAGE_INIT@ + ++include(CMakeFindDependencyMacro) + include("${CMAKE_CURRENT_LIST_DIR}/ptex-version.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/ptex-exports.cmake") + + # Provide PkgConfig::ZLIB to downstream dependents +-find_package(PkgConfig REQUIRED) +-pkg_checK_modules(Ptex_ZLIB REQUIRED zlib IMPORTED_TARGET) ++find_dependency(ZLIB REQUIRED) + + set_and_check(Ptex_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@) + set_and_check(Ptex_LIBRARY_DIRS @PACKAGE_CMAKE_INSTALL_LIBDIR@) diff --git a/ports/ptex/portfile.cmake b/ports/ptex/portfile.cmake index 52d77096b37abf..6fe24666be5fa9 100644 --- a/ports/ptex/portfile.cmake +++ b/ports/ptex/portfile.cmake @@ -1,35 +1,49 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "UWP build not supported") -endif() +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(PTEX_VER 2.3.2) -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wdas/ptex - REF v2.1.28 - SHA512 ddce3c79f14d196e550c1e8a5b371482f88190cd667a2e2aa84601de1639f7cabb8571c1b3a49b48df46ce550d27088a00a67b1403c3bfec2ed73437c3dca3e8 - HEAD_REF master) + REF 1b8bc985a71143317ae9e4969fa08e164da7c2e5 + SHA512 37f2df9ec195f3d69d9526d0dea6a93ef49d69287bfae6ccd9671477491502ea760ed14e3b206b4f488831ab728dc749847b7d176c9b8439fb58b0a0466fe6c5 + HEAD_REF master + PATCHES + fix-build.patch + fix-config.cmake.patch +) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-build.patch) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIB ON) + set(BUILD_STATIC_LIB OFF) +else() + set(BUILD_SHARED_LIB OFF) + set(BUILD_STATIC_LIB ON) +endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA) +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DPTEX_VER=v${PTEX_VER} + -DPTEX_BUILD_SHARED_LIBS=${BUILD_SHARED_LIB} + -DPTEX_BUILD_STATIC_LIBS=${BUILD_STATIC_LIB} +) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/Ptex) vcpkg_copy_pdbs() foreach(HEADER PtexHalf.h Ptexture.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} PTEX_HEADER) + file(READ "${CURRENT_PACKAGES_DIR}/include/${HEADER}" PTEX_HEADER) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) string(REPLACE "ifndef PTEX_STATIC" "if 1" PTEX_HEADER "${PTEX_HEADER}") else() string(REPLACE "ifndef PTEX_STATIC" "if 0" PTEX_HEADER "${PTEX_HEADER}") endif() - file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${PTEX_HEADER}") + file(WRITE "${CURRENT_PACKAGES_DIR}/include/${HEADER}" "${PTEX_HEADER}") endforeach() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/src/doc/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ptex) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ptex/license.txt ${CURRENT_PACKAGES_DIR}/share/ptex/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/src/doc/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ptex/vcpkg.json b/ports/ptex/vcpkg.json new file mode 100644 index 00000000000000..355a40596ce1f7 --- /dev/null +++ b/ports/ptex/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "ptex", + "version": "2.3.2", + "port-version": 3, + "description": "Per-Face Texture Mapping for Production Rendering.", + "homepage": "https://github.com/wdas/ptex", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/pthread/CONTROL b/ports/pthread/CONTROL deleted file mode 100644 index 6ce3193256a23a..00000000000000 --- a/ports/pthread/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pthread -Version: 3.0.0 -Build-Depends: pthreads -Description: empty package, linking to other port diff --git a/ports/pthread/vcpkg.json b/ports/pthread/vcpkg.json new file mode 100644 index 00000000000000..7cc1edb464f4a3 --- /dev/null +++ b/ports/pthread/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "pthread", + "version-string": "3.0.0", + "port-version": 1, + "description": "empty package, linking to other port", + "dependencies": [ + "pthreads" + ] +} diff --git a/ports/pthreadpool/fix-cmakelists.patch b/ports/pthreadpool/fix-cmakelists.patch new file mode 100644 index 00000000000000..e46f679d1f4138 --- /dev/null +++ b/ports/pthreadpool/fix-cmakelists.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09d57b2..57d3a2c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,8 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR) + PROJECT(pthreadpool C CXX) + + # ---[ Options. +-SET(PTHREADPOOL_LIBRARY_TYPE "default" CACHE STRING "Type of library (shared, static, or default) to build") +-SET_PROPERTY(CACHE PTHREADPOOL_LIBRARY_TYPE PROPERTY STRINGS default static shared) + OPTION(PTHREADPOOL_ALLOW_DEPRECATED_API "Enable deprecated API functions" ON) + SET(PTHREADPOOL_SYNC_PRIMITIVE "default" CACHE STRING "Synchronization primitive (condvar, futex, gcd, event, or default) for worker threads") + SET_PROPERTY(CACHE PTHREADPOOL_SYNC_PRIMITIVE PROPERTY STRINGS default condvar futex gcd event) +@@ -14,7 +12,7 @@ IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$") + ELSE() + OPTION(PTHREADPOOL_ENABLE_FASTPATH "Enable fast path using atomic decrement instead of atomic compare-and-swap" OFF) + ENDIF() +-IF("${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}") ++IF(FALSE) + OPTION(PTHREADPOOL_BUILD_TESTS "Build pthreadpool unit tests" ON) + OPTION(PTHREADPOOL_BUILD_BENCHMARKS "Build pthreadpool micro-benchmarks" ON) + ELSE() +@@ -36,7 +34,8 @@ MACRO(PTHREADPOOL_TARGET_ENABLE_CXX11 target) + ENDMACRO() + + # ---[ Download deps +-IF(NOT DEFINED FXDIV_SOURCE_DIR) ++find_path(FXDIV_INCLUDE_DIRS "fxdiv.h") ++IF(FALSE) + MESSAGE(STATUS "Downloading FXdiv to ${CMAKE_BINARY_DIR}/FXdiv-source (define FXDIV_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadFXdiv.cmake "${CMAKE_BINARY_DIR}/FXdiv-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -87,21 +86,13 @@ ELSE() + ENDIF() + + ADD_LIBRARY(pthreadpool_interface INTERFACE) +-TARGET_INCLUDE_DIRECTORIES(pthreadpool_interface INTERFACE include) ++TARGET_INCLUDE_DIRECTORIES(pthreadpool_interface INTERFACE $ $) + IF(NOT PTHREADPOOL_ALLOW_DEPRECATED_API) + TARGET_COMPILE_DEFINITIONS(pthreadpool_interface INTERFACE PTHREADPOOL_NO_DEPRECATED_API=1) + ENDIF() + INSTALL(FILES include/pthreadpool.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + +-IF(PTHREADPOOL_LIBRARY_TYPE STREQUAL "default") +- ADD_LIBRARY(pthreadpool ${PTHREADPOOL_SRCS}) +-ELSEIF(PTHREADPOOL_LIBRARY_TYPE STREQUAL "shared") +- ADD_LIBRARY(pthreadpool SHARED ${PTHREADPOOL_SRCS}) +-ELSEIF(PTHREADPOOL_LIBRARY_TYPE STREQUAL "static") +- ADD_LIBRARY(pthreadpool STATIC ${PTHREADPOOL_SRCS}) +-ELSE() +- MESSAGE(FATAL_ERROR "Unsupported library type ${PTHREADPOOL_LIBRARY_TYPE}") +-ENDIF() ++ADD_LIBRARY(pthreadpool ${PTHREADPOOL_SRCS}) + + IF(PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "condvar") + TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_FUTEX=0) +@@ -150,18 +141,22 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + ENDIF() + + # ---[ Configure FXdiv +-IF(NOT TARGET fxdiv) ++IF(FALSE) + SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "") + SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( + "${FXDIV_SOURCE_DIR}" + "${CMAKE_BINARY_DIR}/FXdiv") + ENDIF() +-TARGET_LINK_LIBRARIES(pthreadpool PRIVATE fxdiv) ++TARGET_INCLUDE_DIRECTORIES(pthreadpool PRIVATE ${FXDIV_INCLUDE_DIRS}) + +-INSTALL(TARGETS pthreadpool ++INSTALL(TARGETS pthreadpool pthreadpool_interface ++ EXPORT unofficial-pthreadpool-config ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(EXPORT unofficial-pthreadpool-config NAMESPACE unofficial:: ++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/unofficial-${PROJECT_NAME}) # share/unofficial-pthreadpool + + IF(PTHREADPOOL_BUILD_TESTS) + # ---[ Build google test diff --git a/ports/pthreadpool/fix-uwp.patch b/ports/pthreadpool/fix-uwp.patch new file mode 100644 index 00000000000000..6ad039d21b5ff3 --- /dev/null +++ b/ports/pthreadpool/fix-uwp.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a07945c..6df83d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -75,7 +75,7 @@ ELSE() + LIST(APPEND PTHREADPOOL_SRCS src/portable-api.c src/memory.c) + IF(APPLE AND (PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "default" OR PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "gcd")) + LIST(APPEND PTHREADPOOL_SRCS src/gcd.c) +- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$" AND (PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "default" OR PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "event")) ++ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS)$" AND (PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "default" OR PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "event")) + LIST(APPEND PTHREADPOOL_SRCS src/windows.c) + ELSE() + LIST(APPEND PTHREADPOOL_SRCS src/pthreads.c) diff --git a/ports/pthreadpool/portfile.cmake b/ports/pthreadpool/portfile.cmake new file mode 100644 index 00000000000000..dbae48f4766d06 --- /dev/null +++ b/ports/pthreadpool/portfile.cmake @@ -0,0 +1,27 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Maratyszcza/pthreadpool + REF 052e441b70091656199e2283fb1c16a7db6f0f85 # there is a too much gap from the last release... + SHA512 33be676e65719ae8510ec4e8254809033528802681870f8c91b083ce4006e5f630b80207a7e675464b406a785cb45bc74628996ea4817c02816b7b58ddf3a2bc + PATCHES + fix-cmakelists.patch + fix-uwp.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPTHREADPOOL_BUILD_TESTS=OFF + -DPTHREADPOOL_BUILD_BENCHMARKS=OFF +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/pthreadpool/vcpkg.json b/ports/pthreadpool/vcpkg.json new file mode 100644 index 00000000000000..cff1bc65057ab9 --- /dev/null +++ b/ports/pthreadpool/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "pthreadpool", + "version-date": "2020-04-10", + "port-version": 1, + "description": "Portable (POSIX/Windows/Emscripten) thread pool for C/C++", + "homepage": "https://github.com/Maratyszcza/pthreadpool", + "dependencies": [ + "fxdiv" + ] +} diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL deleted file mode 100644 index 448fb9951ff64e..00000000000000 --- a/ports/pthreads/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pthreads -Version: 3.0.0-3 -Homepage: https://sourceware.org/pub/pthreads-win32/ -Description: pthreads for windows diff --git a/ports/pthreads/fix-arm-macro.patch b/ports/pthreads/fix-arm-macro.patch new file mode 100644 index 00000000000000..559b385794729a --- /dev/null +++ b/ports/pthreads/fix-arm-macro.patch @@ -0,0 +1,13 @@ +diff --git a/context.h b/context.h +index 33294c1..318b689 100644 +--- a/context.h ++++ b/context.h +@@ -62,7 +62,7 @@ + #endif + + #if defined(_ARM_) || defined(ARM) || defined(_M_ARM) || defined(_M_ARM64) +-#define PTW32_PROGCTR(Context) ((Context).Pc) ++#define __PTW32_PROGCTR(Context) ((Context).Pc) + #endif + + #if !defined (__PTW32_PROGCTR) diff --git a/ports/pthreads/fix-uwp-linkage.patch b/ports/pthreads/fix-uwp-linkage.patch new file mode 100644 index 00000000000000..77d3a5b15a5e38 --- /dev/null +++ b/ports/pthreads/fix-uwp-linkage.patch @@ -0,0 +1,17 @@ +diff --git a/implement.h b/implement.h +index 1579376..3a7d29b 100644 +--- a/implement.h ++++ b/implement.h +@@ -36,6 +36,12 @@ + #if !defined(_IMPLEMENT_H) + #define _IMPLEMENT_H + ++#if 1 // The condition should be `defined(__cplusplus_winrt)` when compile option is provided correctly. ++// porvide 2 static libs to resolve link error. 'kernel32' and 'windowsapp' ++#pragma comment(lib, "kernel32") ++#pragma comment(lib, "WindowsApp") ++#endif ++ + #if !defined (__PTW32_CONFIG_H) + # error "config.h was not #included" + #endif diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 393fefddc766d7..47493940e6a292 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -1,26 +1,31 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - message(FATAL_ERROR "${PORT} does not currently support UWP platform nor ARM architectures") -endif() - -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW) set(VCPKG_POLICY_EMPTY_PACKAGE enabled) return() endif() set(PTHREADS4W_VERSION "3.0.0") -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/pthreads4w/files/pthreads4w-code-v${PTHREADS4W_VERSION}.zip/download" - FILENAME "pthreads4w-code-v${PTHREADS4W_VERSION}.zip" - SHA512 49e541b66c26ddaf812edb07b61d0553e2a5816ab002edc53a38a897db8ada6d0a096c98a9af73a8f40c94283df53094f76b429b09ac49862465d8697ed20013 -) +if(VCPKG_TARGET_IS_UWP) + list(APPEND PATCH_FILES fix-uwp-linkage.patch) + # Inject linker option using the `LINK` environment variable + # https://docs.microsoft.com/en-us/cpp/build/reference/linker-options + # https://docs.microsoft.com/en-us/cpp/build/reference/linking#link-environment-variables + set(ENV{LINK} "/APPCONTAINER") +endif() +if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + list(APPEND PATCH_FILES use-md.patch) +else() + list(APPEND PATCH_FILES use-mt.patch) +endif() -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${PTHREADS4W_VERSION} +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO pthreads4w + FILENAME "pthreads4w-code-v${PTHREADS4W_VERSION}.zip" + SHA512 49e541b66c26ddaf812edb07b61d0553e2a5816ab002edc53a38a897db8ada6d0a096c98a9af73a8f40c94283df53094f76b429b09ac49862465d8697ed20013 + PATCHES + fix-arm-macro.patch + ${PATCH_FILES} ) find_program(NMAKE nmake REQUIRED) @@ -94,7 +99,10 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthread) file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads) file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads_windows) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/ports/pthreads/usage b/ports/pthreads/usage new file mode 100644 index 00000000000000..343c97f4406e59 --- /dev/null +++ b/ports/pthreads/usage @@ -0,0 +1,9 @@ +The package pthreads provides CMake targets: + + find_package(pthreads REQUIRED) + + target_link_libraries(main PRIVATE PThreads4W::PThreads4W) + #or + target_link_libraries(main PRIVATE PThreads4W::PThreads4W_CXXEXC) + #or + target_link_libraries(main PRIVATE PThreads4W::PThreads4W_STRUCTEXC) \ No newline at end of file diff --git a/ports/pthreads/use-md.patch b/ports/pthreads/use-md.patch new file mode 100644 index 00000000000000..b25a744a8ce44b --- /dev/null +++ b/ports/pthreads/use-md.patch @@ -0,0 +1,33 @@ +diff --git a/Makefile b/Makefile +index a703b9c..ff81e7c 100644 +--- a/Makefile ++++ b/Makefile +@@ -173,22 +173,22 @@ VC-debug: + # @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).small_static_stamp + + VCE-static: +- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp ++ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp + + VCE-static-debug: +- @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp ++ @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp + + VSE-static: +- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp ++ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp + + VSE-static-debug: +- @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp ++ @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp + + VC-static: +- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp ++ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp + + VC-static-debug: +- @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp ++ @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp + + + realclean: clean diff --git a/ports/pthreads/use-mt.patch b/ports/pthreads/use-mt.patch new file mode 100644 index 00000000000000..41154e0311a529 --- /dev/null +++ b/ports/pthreads/use-mt.patch @@ -0,0 +1,33 @@ +diff --git a/Makefile b/Makefile +index a703b9c..502275f 100644 +--- a/Makefile ++++ b/Makefile +@@ -134,22 +134,22 @@ all-tests-mt: + @ echo $@ completed successfully. + + VCE: +- @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).dll ++ @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).dll + + VCE-debug: +- @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll ++ @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll + + VSE: +- @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).dll ++ @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).dll + + VSE-debug: +- @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll ++ @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll + + VC: +- @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).dll ++ @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).dll + + VC-debug: +- @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll ++ @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll + + # + # Static builds diff --git a/ports/pthreads/vcpkg-cmake-wrapper.cmake b/ports/pthreads/vcpkg-cmake-wrapper.cmake index 12d390a7ae2182..f9818d38456d1b 100644 --- a/ports/pthreads/vcpkg-cmake-wrapper.cmake +++ b/ports/pthreads/vcpkg-cmake-wrapper.cmake @@ -77,13 +77,16 @@ mark_as_advanced(PThreads4W_INCLUDE_DIR PThreads4W_LIBRARY PThreads4W_CXXEXC_LIB set(PThreads4W_DLL_DIR ${PThreads4W_INCLUDE_DIR}) list(TRANSFORM PThreads4W_DLL_DIR APPEND "/../bin") message(STATUS "PThreads4W_DLL_DIR: ${PThreads4W_DLL_DIR}") +set(PThreads4W_DEBUG_DLL_DIR ${PThreads4W_INCLUDE_DIR}) +list(TRANSFORM PThreads4W_DEBUG_DLL_DIR APPEND "/../debug/bin") +message(STATUS "PThreads4W_DEBUG_DLL_DIR: ${PThreads4W_DEBUG_DLL_DIR}") find_file(PThreads4W_LIBRARY_RELEASE_DLL NAMES pthreadVC${PThreads4W_MAJOR_VERSION}.dll PATHS ${PThreads4W_DLL_DIR}) -find_file(PThreads4W_LIBRARY_DEBUG_DLL NAMES pthreadVC${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DLL_DIR}) +find_file(PThreads4W_LIBRARY_DEBUG_DLL NAMES pthreadVC${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DEBUG_DLL_DIR}) find_file(PThreads4W_CXXEXC_LIBRARY_RELEASE_DLL NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}.dll PATHS ${PThreads4W_DLL_DIR}) -find_file(PThreads4W_CXXEXC_LIBRARY_DEBUG_DLL NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DLL_DIR}) +find_file(PThreads4W_CXXEXC_LIBRARY_DEBUG_DLL NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DEBUG_DLL_DIR}) find_file(PThreads4W_STRUCTEXC_LIBRARY_RELEASE_DLL NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}.dll PATHS ${PThreads4W_DLL_DIR}) -find_file(PThreads4W_STRUCTEXC_LIBRARY_DEBUG_DLL NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DLL_DIR}) +find_file(PThreads4W_STRUCTEXC_LIBRARY_DEBUG_DLL NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DEBUG_DLL_DIR}) #Compatibility definitions, deprecated set(PTHREAD_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "") diff --git a/ports/pthreads/vcpkg.json b/ports/pthreads/vcpkg.json new file mode 100644 index 00000000000000..db809649bf64b0 --- /dev/null +++ b/ports/pthreads/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pthreads", + "version": "3.0.0", + "port-version": 10, + "description": "pthreads for windows", + "homepage": "https://sourceware.org/pub/pthreads-win32/" +} diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL deleted file mode 100644 index 7024b6b049be4f..00000000000000 --- a/ports/pugixml/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pugixml -Version: 1.9-3 -Homepage: https://github.com/zeux/pugixml -Description: C++ XML processing library diff --git a/ports/pugixml/portfile.cmake b/ports/pugixml/portfile.cmake index 746e9c2d4c5419..c27b1a89daeddb 100644 --- a/ports/pugixml/portfile.cmake +++ b/ports/pugixml/portfile.cmake @@ -1,22 +1,22 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeux/pugixml - REF v1.9 - SHA512 f97941941d98a1a056087edc0dde6376bf2cc12ce4523b67a2f2ec5ae0895c2a2e55da32fcca6a997f1a0d918c5f39564167da0a07ce0d7da92880ad8631c31e + REF v1.11.4 + SHA512 a1fdf4cbd744318fd339362465472279767777b18a3c8c7e8618d5e637213c632bf9dd8144d16ae22a75cfbde007f383e2feb49084e681c930fc89a2e3f2bc4f HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DUSE_POSTFIX=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/pugixml) +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pugixml RENAME copyright) +file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pugixml/vcpkg.json b/ports/pugixml/vcpkg.json new file mode 100644 index 00000000000000..28158b325349cd --- /dev/null +++ b/ports/pugixml/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pugixml", + "version-string": "1.11.4", + "port-version": 1, + "description": "Light-weight, simple and fast XML parser for C++ with XPath support", + "homepage": "https://github.com/zeux/pugixml" +} diff --git a/ports/pybind11/CONTROL b/ports/pybind11/CONTROL deleted file mode 100644 index 634afca381b06f..00000000000000 --- a/ports/pybind11/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: pybind11 -Version: 2.2.4 -Homepage: https://github.com/pybind/pybind11 -Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. -Build-Depends: python3 (windows) \ No newline at end of file diff --git a/ports/pybind11/aliastemplates.patch b/ports/pybind11/aliastemplates.patch deleted file mode 100644 index a692ad583fa019..00000000000000 --- a/ports/pybind11/aliastemplates.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 598ec67e4d6727dd9455bcc9959e32fee02a80ac Mon Sep 17 00:00:00 2001 -From: Michael Goulding -Date: Wed, 18 Jul 2018 10:59:15 -0700 -Subject: [PATCH 1/2] VS 15.8.0 Preview 4.0 has a bug with alias templates - ---- - include/pybind11/detail/common.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h -index 3c6722891..89d922190 100644 ---- a/include/pybind11/detail/common.h -+++ b/include/pybind11/detail/common.h -@@ -476,7 +476,7 @@ template struct void_t_impl { using type = void; }; - template using void_t = typename void_t_impl::type; - - /// Compile-time all/any/none of that check the boolean value of all template types --#ifdef __cpp_fold_expressions -+#if (!defined(_MSC_VER) || ( _MSC_VER >= 1916 )) && defined(__cpp_fold_expressions) - template using all_of = bool_constant<(Ts::value && ...)>; - template using any_of = bool_constant<(Ts::value || ...)>; - #elif !defined(_MSC_VER) - -From 7d534251ca67c5e725ed549900f04adeb5ddb99e Mon Sep 17 00:00:00 2001 -From: Michael Goulding -Date: Thu, 19 Jul 2018 10:27:41 -0700 -Subject: [PATCH 2/2] Address feedback - ---- - include/pybind11/detail/common.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h -index 89d922190..8d65b260d 100644 ---- a/include/pybind11/detail/common.h -+++ b/include/pybind11/detail/common.h -@@ -476,7 +476,7 @@ template struct void_t_impl { using type = void; }; - template using void_t = typename void_t_impl::type; - - /// Compile-time all/any/none of that check the boolean value of all template types --#if (!defined(_MSC_VER) || ( _MSC_VER >= 1916 )) && defined(__cpp_fold_expressions) -+#if defined(__cpp_fold_expressions) && !(defined(_MSC_VER) && (_MSC_VER < 1916)) - template using all_of = bool_constant<(Ts::value && ...)>; - template using any_of = bool_constant<(Ts::value || ...)>; - #elif !defined(_MSC_VER) diff --git a/ports/pybind11/portfile.cmake b/ports/pybind11/portfile.cmake index 55cfb1fa10fb0b..14e4d5a9a60804 100644 --- a/ports/pybind11/portfile.cmake +++ b/ports/pybind11/portfile.cmake @@ -1,39 +1,26 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pybind/pybind11 - REF v2.2.4 - SHA512 6bddf5c885ff92a3e373bcedc6574dfefe8be9ebb6176c6c96d475457466c76bfb982c6df4066cb0fbead4b867f87dbc4fbc1605c80852635016f614330ce041 + REF v2.7.1 + SHA512 f09f46622b394d3990ab82aa7ea15a06e298df109cd2df263ba9d6ac7fb248217df7450e1954a9679a8360335d5bbf662926a34c8b7c61b6e4c396bbdfd88305 HEAD_REF master - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/aliastemplates.patch ) -vcpkg_find_acquire_program(PYTHON3) - -get_filename_component(PYPATH ${PYTHON3} PATH) -set(ENV{PATH} "$ENV{PATH};${PYPATH}") - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DPYBIND11_TEST=OFF - -DPYTHONLIBS_FOUND=ON - -DPYTHON_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include - -DPYTHON_MODULE_EXTENSION=.dll + -DPYBIND11_FINDPYTHON=ON OPTIONS_RELEASE -DPYTHON_IS_DEBUG=OFF - -DPYTHON_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/python36.lib OPTIONS_DEBUG -DPYTHON_IS_DEBUG=ON - -DPYTHON_LIBRARIES=${CURRENT_INSTALLED_DIR}/debug/lib/python36_d.lib ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "share/cmake/pybind11") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/") # copy license -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pybind11/copyright) \ No newline at end of file +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/pybind11/vcpkg.json b/ports/pybind11/vcpkg.json new file mode 100644 index 00000000000000..cf79d75138670e --- /dev/null +++ b/ports/pybind11/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "pybind11", + "version-semver": "2.7.1", + "description": "pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code", + "homepage": "https://github.com/pybind/pybind11", + "dependencies": [ + "python3", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/pystring/CMakeLists.txt b/ports/pystring/CMakeLists.txt index ecfdaa4fb11ec7..48df849192b0fa 100644 --- a/ports/pystring/CMakeLists.txt +++ b/ports/pystring/CMakeLists.txt @@ -1,19 +1,31 @@ -cmake_minimum_required(VERSION 3.5.1) -project(libpystring C CXX) +cmake_minimum_required(VERSION 3.12) +project(pystring CXX) if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) endif() -add_library(libpystring pystring.cpp) +add_library(pystring pystring.cpp) +target_include_directories( + pystring + PUBLIC + $ + $ +) + +include(GNUInstallDirs) install( - TARGETS libpystring - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + TARGETS pystring + EXPORT pystring-config ) if(NOT DISABLE_INSTALL_HEADERS) - install(FILES pystring.h DESTINATION include) + install(FILES pystring.h DESTINATION include/pystring) endif() + +install( + EXPORT pystring-config + NAMESPACE pystring:: + DESTINATION share/pystring +) diff --git a/ports/pystring/CONTROL b/ports/pystring/CONTROL deleted file mode 100644 index 698e0466dea16d..00000000000000 --- a/ports/pystring/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: pystring -Version: 1.1.3-2 -Homepage: https://github.com/imageworks/pystring -Description: Pystring is a collection of C++ functions which match the interface and behavior of python's string class methods using std::string diff --git a/ports/pystring/portfile.cmake b/ports/pystring/portfile.cmake index 8384bc0183665f..31143c5c9cab97 100644 --- a/ports/pystring/portfile.cmake +++ b/ports/pystring/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -12,13 +10,14 @@ vcpkg_from_github( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pystring RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pystring/vcpkg.json b/ports/pystring/vcpkg.json new file mode 100644 index 00000000000000..4011f52e790ce6 --- /dev/null +++ b/ports/pystring/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "pystring", + "version-semver": "1.1.3", + "port-version": 4, + "description": "Pystring is a collection of C++ functions which match the interface and behavior of python's string class methods using std::string", + "homepage": "https://github.com/imageworks/pystring", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/python2/001-build-msvc.patch b/ports/python2/001-build-msvc.patch index e16258e1554c8c..c1749b7af1958e 100644 --- a/ports/python2/001-build-msvc.patch +++ b/ports/python2/001-build-msvc.patch @@ -1,28 +1,5 @@ -From 4988ea4f4ce6af0b567e6a2dc2c23aaf7cc5f12d Mon Sep 17 00:00:00 2001 -From: Jean-Christophe Fillion-Robin -Date: Mon, 31 Jul 2017 10:59:47 -0400 -Subject: [PATCH 1/3] VS2010 Support: Backport "Fix #13210. Port the Windows - build from VS2008 to VS2010." - -This commit is a partial backport of python/cpython@401f9f3. It was -originally designed to work with python-cmake-buildsystem. - -The following modules have NOT been backported: - -* Tools/msi -* Tools/buildbot -* PCBuild ---- - Lib/distutils/command/build_ext.py | 2 +- - Lib/distutils/msvc9compiler.py | 11 ++++++----- - PC/dl_nt.c | 11 ++++++++++- - PC/msvcrtmodule.c | 15 ++++++++++++++- - PC/pyconfig.h | 9 +++++++-- - Python/dynload_win.c | 8 ++++++++ - 6 files changed, 46 insertions(+), 10 deletions(-) - diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py -index 2c68be3..f1d184b 100644 +index 86a85c1..65a60b5 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -193,7 +193,7 @@ class build_ext (Command): @@ -35,7 +12,7 @@ index 2c68be3..f1d184b 100644 if self.plat_name == 'win32': suffix = '' diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py -index 33d3e51..f6de11c 100644 +index 33d3e51..9fe6417 100644 --- a/Lib/distutils/msvc9compiler.py +++ b/Lib/distutils/msvc9compiler.py @@ -662,11 +662,12 @@ class MSVCCompiler(CCompiler) : @@ -50,26 +27,24 @@ index 33d3e51..f6de11c 100644 + if self.__version < 10: + try: + self.spawn(['mt.exe', '-nologo', '-manifest', -+ temp_manifest, out_arg]) -+ except PackagingExecError as msg: ++ mffilename, out_arg]) ++ except DistutilsExecError, msg: + raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) diff --git a/PC/dl_nt.c b/PC/dl_nt.c -index ef1ce09..5ff07fd 100644 +index 3e58bac..cad9de5 100644 --- a/PC/dl_nt.c +++ b/PC/dl_nt.c -@@ -18,7 +18,8 @@ char dllVersionBuffer[16] = ""; // a private buffer +@@ -18,6 +18,7 @@ char dllVersionBuffer[16] = ""; // a private buffer HMODULE PyWin_DLLhModule = NULL; const char *PyWin_DLLVersionString = dllVersionBuffer; --// Windows "Activation Context" work: +#if HAVE_SXS -+// Windows "Activation Context" work. + // Windows "Activation Context" work: // Our .pyd extension modules are generally built without a manifest (ie, // those included with Python and those built with a default distutils. - // This requires we perform some "activation context" magic when loading our @@ -29,6 +30,8 @@ const char *PyWin_DLLVersionString = dllVersionBuffer; // As an added complication, this magic only works on XP or later - we simply // use the existence (or not) of the relevant function pointers from kernel32. @@ -79,16 +54,15 @@ index ef1ce09..5ff07fd 100644 typedef BOOL (WINAPI * PFN_GETCURRENTACTCTX)(HANDLE *); typedef BOOL (WINAPI * PFN_ACTIVATEACTCTX)(HANDLE, ULONG_PTR *); -@@ -76,6 +79,8 @@ void _Py_DeactivateActCtx(ULONG_PTR cookie) +@@ -75,6 +78,7 @@ void _Py_DeactivateActCtx(ULONG_PTR cookie) + if (!(*pfnDeactivateActCtx)(0, cookie)) OutputDebugString("Python failed to de-activate the activation context\n"); } - +#endif /* HAVE_SXS */ -+ + BOOL WINAPI DllMain (HANDLE hInst, ULONG ul_reason_for_call, - LPVOID lpReserved) -@@ -87,17 +92,21 @@ BOOL WINAPI DllMain (HANDLE hInst, +@@ -87,6 +91,7 @@ BOOL WINAPI DllMain (HANDLE hInst, // 1000 is a magic number I picked out of the air. Could do with a #define, I spose... LoadString(hInst, 1000, dllVersionBuffer, sizeof(dllVersionBuffer)); @@ -96,9 +70,10 @@ index ef1ce09..5ff07fd 100644 // and capture our activation context for use when loading extensions. _LoadActCtxPointers(); if (pfnGetCurrentActCtx && pfnAddRefActCtx) - if ((*pfnGetCurrentActCtx)(&PyWin_DLLhActivationContext)) - if (!(*pfnAddRefActCtx)(PyWin_DLLhActivationContext)) - OutputDebugString("Python failed to load the default activation context\n"); +@@ -98,12 +103,15 @@ BOOL WINAPI DllMain (HANDLE hInst, + "activation context\n"); + return FALSE; + } +#endif break; @@ -110,8 +85,9 @@ index ef1ce09..5ff07fd 100644 break; } return TRUE; + } diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c -index 44c82e4..68928dd 100644 +index 44c82e4..091957e 100644 --- a/PC/msvcrtmodule.c +++ b/PC/msvcrtmodule.c @@ -25,6 +25,8 @@ @@ -140,11 +116,10 @@ index 44c82e4..68928dd 100644 #ifdef _VC_ASSEMBLY_PUBLICKEYTOKEN st = PyModule_AddStringConstant(m, "VC_ASSEMBLY_PUBLICKEYTOKEN", _VC_ASSEMBLY_PUBLICKEYTOKEN); -@@ -427,4 +430,14 @@ initmsvcrt(void) +@@ -427,4 +430,13 @@ initmsvcrt(void) __LIBRARIES_ASSEMBLY_NAME_PREFIX); if (st < 0)return; #endif -+ +/* constants for the 2010 crt versions */ +#if defined(_VC_CRT_MAJOR_VERSION) && defined (_VC_CRT_MINOR_VERSION) && defined(_VC_CRT_BUILD_VERSION) && defined(_VC_CRT_RBUILD_VERSION) + version = PyUnicode_FromFormat("%d.%d.%d.%d", _VC_CRT_MAJOR_VERSION, @@ -156,12 +131,12 @@ index 44c82e4..68928dd 100644 +#endif } diff --git a/PC/pyconfig.h b/PC/pyconfig.h -index 5d1c90a..b60af1e 100644 +index 5fa6398..0cbd236 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h -@@ -231,14 +231,19 @@ typedef int pid_t; - #define hypot _hypot - #endif +@@ -226,14 +226,19 @@ typedef int pid_t; + #define Py_IS_FINITE(X) _finite(X) + #define copysign _copysign -#endif /* _MSC_VER */ +/* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/ @@ -222,6 +197,3 @@ index 4e5555e..8626642 100644 } /* restore old error mode settings */ --- -2.5.0 - diff --git a/ports/python2/002-build-msvc.patch b/ports/python2/002-build-msvc.patch index 85748fc8fa245b..c214ab2cc4a0e6 100644 --- a/ports/python2/002-build-msvc.patch +++ b/ports/python2/002-build-msvc.patch @@ -1,38 +1,5 @@ -From e6a1f39d2d876bbfc8b02e628dfd1d0fef4a0651 Mon Sep 17 00:00:00 2001 -From: Jean-Christophe Fillion-Robin -Date: Tue, 1 Aug 2017 15:40:29 -0400 -Subject: [PATCH 2/3] VS2015 Support: Backport "Issue #22919: Windows build - updated to support VC 14.0 (Visual Studio 2015), which will be used for the - official 3.5 release." - -This commit is a partial backport of python/cpython@65e4cb1. It was -originally designed to work with python-cmake-buildsystem. - -This patch do not backport the define "timezone" as "_timezone" as it was done in Python 3.x. -Keeping "timezone" is required in Python 2.7.x to avoid the following build issue -``error C2032: '__timezone': function cannot be member of struct '__timeb64'`` -associated with `sys/timeb.h`. The need for `sys/timeb.h` was removed in Python 3.x in python/cpython@6fc4ade and python/cpython@0011124 -but is still used in Python 2.7.x. - -The following modules have NOT been backported: - -* Lib/distutils/sysconfig -* Modules/socketmodule.c .... : Not required since changes related to WSA have been introduced in Python 3.x (see python/cpython@6b4883d) -* Tools/buildbot -* PCBuild ---- - Lib/ctypes/util.py | 6 +++++- - Lib/distutils/command/build_ext.py | 2 +- - Lib/distutils/msvc9compiler.py | 3 +++ - Lib/distutils/msvccompiler.py | 3 +++ - Modules/posixmodule.c | 22 ++++++++++++++++++++-- - Modules/timemodule.c | 4 ++-- - PC/bdist_wininst/install.c | 29 ++++++----------------------- - PC/pyconfig.h | 7 +++++++ - 8 files changed, 47 insertions(+), 29 deletions(-) - diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py -index ab10ec5..a163239 100644 +index ab10ec5..6c43d82 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -19,6 +19,8 @@ if os.name == "nt": @@ -57,7 +24,7 @@ index ab10ec5..a163239 100644 # If python was built with in debug mode import imp diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py -index f1d184b..0851690 100644 +index 65a60b5..b2ee260 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -196,7 +196,7 @@ class build_ext (Command): @@ -70,7 +37,7 @@ index f1d184b..0851690 100644 # win-amd64 or win-ia64 suffix = self.plat_name[4:] diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py -index f6de11c..ee61ac2 100644 +index 9fe6417..57d42b7 100644 --- a/Lib/distutils/msvc9compiler.py +++ b/Lib/distutils/msvc9compiler.py @@ -182,6 +182,9 @@ def get_build_version(): @@ -98,7 +65,7 @@ index 0e69fd3..77025c6 100644 # I don't think paths are affected by minor version in version 6 if majorVersion == 6: diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index e73805f..90d5318 100644 +index 7a1a694..7d07150 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -558,15 +558,33 @@ _PyInt_FromDev(PY_LONG_LONG v) @@ -138,7 +105,7 @@ index e73805f..90d5318 100644 #define FOPEN 0x01 #define _NO_CONSOLE_FILENO (intptr_t)-2 diff --git a/Modules/timemodule.c b/Modules/timemodule.c -index 12c43b0..db190b8 100644 +index 61b8d61..7678283 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -808,7 +808,7 @@ inittimezone(PyObject *m) { @@ -160,10 +127,10 @@ index 12c43b0..db190b8 100644 #endif PyModule_AddIntConstant(m, "daylight", daylight); diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c -index f1cc7fe..5b11dcc 100644 +index e3b52a8..a7d1c2c 100644 --- a/PC/bdist_wininst/install.c +++ b/PC/bdist_wininst/install.c -@@ -1184,7 +1184,7 @@ static void CenterWindow(HWND hwnd) +@@ -1185,7 +1185,7 @@ static void CenterWindow(HWND hwnd) #include @@ -172,7 +139,7 @@ index f1cc7fe..5b11dcc 100644 IntroDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { LPNMHDR lpnm; -@@ -1533,7 +1533,7 @@ SCHEME *GetScheme(int major, int minor) +@@ -1534,7 +1534,7 @@ SCHEME *GetScheme(int major, int minor) return old_scheme; } @@ -181,7 +148,7 @@ index f1cc7fe..5b11dcc 100644 SelectPythonDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { LPNMHDR lpnm; -@@ -1835,7 +1835,7 @@ static void CloseLogfile(void) +@@ -1836,7 +1836,7 @@ static void CloseLogfile(void) fclose(logfile); } @@ -190,7 +157,7 @@ index f1cc7fe..5b11dcc 100644 InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { LPNMHDR lpnm; -@@ -1990,7 +1990,7 @@ InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +@@ -1991,7 +1991,7 @@ InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } @@ -199,7 +166,7 @@ index f1cc7fe..5b11dcc 100644 FinishedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { LPNMHDR lpnm; -@@ -2166,23 +2166,6 @@ BOOL NeedAutoUAC() +@@ -2167,23 +2167,6 @@ BOOL NeedAutoUAC() return TRUE; } @@ -223,7 +190,7 @@ index f1cc7fe..5b11dcc 100644 // Spawn ourself as an elevated application. On failure, a message is // displayed to the user - but this app will always terminate, even // on error. -@@ -2238,7 +2221,7 @@ int DoInstall(void) +@@ -2239,7 +2222,7 @@ int DoInstall(void) // See if we need to do the Vista UAC magic. if (strcmp(user_access_control, "force")==0) { @@ -232,7 +199,7 @@ index f1cc7fe..5b11dcc 100644 SpawnUAC(); return 0; } -@@ -2246,7 +2229,7 @@ int DoInstall(void) +@@ -2247,7 +2230,7 @@ int DoInstall(void) } else if (strcmp(user_access_control, "auto")==0) { // Check if it looks like we need UAC control, based // on how Python itself was installed. @@ -242,12 +209,12 @@ index f1cc7fe..5b11dcc 100644 return 0; } diff --git a/PC/pyconfig.h b/PC/pyconfig.h -index b60af1e..b517146 100644 +index 0cbd236..d896a38 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h -@@ -231,6 +231,13 @@ typedef int pid_t; - #define hypot _hypot - #endif +@@ -226,6 +226,13 @@ typedef int pid_t; + #define Py_IS_FINITE(X) _finite(X) + #define copysign _copysign +/* VS 2015 defines these names with a leading underscore */ +#if _MSC_VER >= 1900 @@ -259,6 +226,3 @@ index b60af1e..b517146 100644 /* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/ #if _MSC_VER >= 1400 && _MSC_VER < 1600 #define HAVE_SXS 1 --- -2.5.0 - diff --git a/ports/python2/004-static-library-msvc.patch b/ports/python2/004-static-library-msvc.patch index 6c5cb75945fda1..a002de6b560faa 100644 --- a/ports/python2/004-static-library-msvc.patch +++ b/ports/python2/004-static-library-msvc.patch @@ -1,3 +1,5 @@ +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 92b32da..8dac984 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -41,7 +41,7 @@ @@ -13,8 +15,8 @@ /Zm200 %(AdditionalOptions) $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) -- _USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) -+ _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) +- _USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;_CRT_SECURE_NO_WARNINGS;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;_CRT_SECURE_NO_WARNINGS;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ws2_32.lib;%(AdditionalDependencies) @@ -35,4 +37,3 @@ --- diff --git a/ports/python2/005-static-crt-msvc.patch b/ports/python2/005-static-crt-msvc.patch index 0bcd389c1efbae..bd254f7d2a2660 100644 --- a/ports/python2/005-static-crt-msvc.patch +++ b/ports/python2/005-static-crt-msvc.patch @@ -1,9 +1,11 @@ +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 8dac984..c18ad1e 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -71,6 +71,10 @@ /Zm200 %(AdditionalOptions) $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) - _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;_CRT_SECURE_NO_WARNINGS;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + MultiThreadedDebug + MultiThreadedDebug + MultiThreaded @@ -11,5 +13,3 @@ ws2_32.lib;%(AdditionalDependencies) --- - diff --git a/ports/python2/CONTROL b/ports/python2/CONTROL deleted file mode 100644 index c0510dcac17989..00000000000000 --- a/ports/python2/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: python2 -Version: 2.7.15-1 -Description: The Python programming language as an embeddable library \ No newline at end of file diff --git a/ports/python2/portfile.cmake b/ports/python2/portfile.cmake index 0c53ec128711c7..fdbf8f415b97a6 100644 --- a/ports/python2/portfile.cmake +++ b/ports/python2/portfile.cmake @@ -1,4 +1,4 @@ -# Patches are from: +# Patches are from: # - https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/tree/master/patches/2.7.13/Windows-MSVC/1900 # - https://github.com/Microsoft/vcpkg/tree/master/ports/python3 @@ -9,22 +9,17 @@ endif() set(PYTHON_VERSION_MAJOR 2) set(PYTHON_VERSION_MINOR 7) -set(PYTHON_VERSION_PATCH 15) +set(PYTHON_VERSION_PATCH 18) set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/python-${PYTHON_VERSION}) - -include(vcpkg_common_functions) - -vcpkg_download_distfile( - PYTHON_ARCHIVE - URLS https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz - FILENAME Python-${PYTHON_VERSION}.tar.xz - SHA512 27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6 -) - -vcpkg_extract_source_archive(${PYTHON_ARCHIVE}) set(_PYTHON_PATCHES "") +if (VCPKG_TARGET_IS_WINDOWS) + list(APPEND _PYTHON_PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-build-msvc.patch + ${CMAKE_CURRENT_LIST_DIR}/002-build-msvc.patch + ${CMAKE_CURRENT_LIST_DIR}/003-build-msvc.patch + ) +endif() if (VCPKG_LIBRARY_LINKAGE STREQUAL static) list(APPEND _PYTHON_PATCHES @@ -36,44 +31,64 @@ if (VCPKG_CRT_LINKAGE STREQUAL static) list(APPEND _PYTHON_PATCHES ${CMAKE_CURRENT_LIST_DIR}/005-static-crt-msvc.patch) endif() -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/001-build-msvc.patch - ${CMAKE_CURRENT_LIST_DIR}/002-build-msvc.patch - ${CMAKE_CURRENT_LIST_DIR}/003-build-msvc.patch - ${_PYTHON_PATCHES} +if (VCPKG_TARGET_IS_WINDOWS) + list(APPEND _PYTHON_PATCHES ${CMAKE_CURRENT_LIST_DIR}/007-fix-build-path.patch -) - -if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - set(BUILD_ARCH "Win32") - set(OUT_DIR "win32") -elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") - set(BUILD_ARCH "x64") - set(OUT_DIR "amd64") -else() - message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") + ) endif() -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj - PLATFORM ${BUILD_ARCH}) -file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) -file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) +vcpkg_download_distfile(ARCHIVE + URLS https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz + FILENAME Python-${PYTHON_VERSION}.tar.xz + SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES ${_PYTHON_PATCHES} +) -file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) +if (VCPKG_TARGET_IS_WINDOWS) + if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(BUILD_ARCH "Win32") + set(OUT_DIR "win32") + elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(BUILD_ARCH "x64") + set(OUT_DIR "amd64") + else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") + endif() + + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj + PLATFORM ${BUILD_ARCH} + ) -file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + vcpkg_copy_pdbs() + + file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) + file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) + + file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) + + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +else() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + ) + + vcpkg_install_make() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") endif() # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) file(RENAME ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/copyright) - -vcpkg_copy_pdbs() diff --git a/ports/python2/vcpkg.json b/ports/python2/vcpkg.json new file mode 100644 index 00000000000000..9780104ac1d9d5 --- /dev/null +++ b/ports/python2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "python2", + "version": "2.7.18", + "port-version": 1, + "description": "The Python programming language as an embeddable library", + "homepage": "https://www.python.org" +} diff --git a/ports/python3/0001-static-library.patch b/ports/python3/0001-static-library.patch new file mode 100644 index 00000000000000..93a89a2e3c6e27 --- /dev/null +++ b/ports/python3/0001-static-library.patch @@ -0,0 +1,63 @@ +From 14d91e4f4a9377f47cc4cc33faeeb7c82f64b176 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Thu, 28 May 2020 17:25:21 -0400 +Subject: [PATCH 1/7] static library + +builds the pythoncore as a static library instead of a DLL +--- + PC/pyconfig.h | 9 +++++++++ + PCbuild/pythoncore.vcxproj | 4 ++-- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index d7d3cf081e..34269f0b75 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -251,6 +251,7 @@ typedef int pid_t; + + /* For Windows the Python core is in a DLL by default. Test + Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ ++#define Py_NO_ENABLE_SHARED + #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) + # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ + # define MS_COREDLL /* deprecated old symbol */ +@@ -276,6 +277,14 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ + # endif /* _DEBUG */ + # endif /* _MSC_VER */ + # endif /* Py_BUILD_CORE */ ++#else ++ /* So MSVC users need not specify the .lib file in their own config */ ++# pragma comment(lib, "version.lib") ++# pragma comment(lib, "shlwapi.lib") ++# pragma comment(lib, "ws2_32.lib") ++# if Py_WINVER > 0x0601 ++# pragma comment(lib, "pathcch.lib") ++# endif /* Py_WINVER */ + #endif /* MS_COREDLL */ + + #if defined(MS_WIN64) +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 2625d0293d..2f8bdaa931 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -73,7 +73,7 @@ + + + +- DynamicLibrary ++ StaticLibrary + false + + +@@ -102,7 +102,7 @@ + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;%(AdditionalIncludeDirectories) + $(zlibDir);%(AdditionalIncludeDirectories) +- _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) + + +-- +2.28.0.windows.1 + diff --git a/ports/python3/0002-use-vcpkg-zlib.patch b/ports/python3/0002-use-vcpkg-zlib.patch new file mode 100644 index 00000000000000..c7f9dd60e0224b --- /dev/null +++ b/ports/python3/0002-use-vcpkg-zlib.patch @@ -0,0 +1,39 @@ +From 196555707236f4387875749f66620fb519166963 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 9 Sep 2020 15:20:36 -0400 +Subject: [PATCH 2/6] use vcpkg zlib + +building without zlib is not a supported configuration, per the warning +messages. +--- + PCbuild/pythoncore.vcxproj | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index dbe236829a..5f30a35eb3 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -507,8 +507,10 @@ + + + +- ++ + ++ ++ + + + +@@ -556,7 +558,7 @@ + + + +- ++ + + + +-- +2.28.0.windows.1 + diff --git a/ports/python3/0003-devendor-external-dependencies.patch b/ports/python3/0003-devendor-external-dependencies.patch new file mode 100644 index 00000000000000..25e3a1489a8fa5 --- /dev/null +++ b/ports/python3/0003-devendor-external-dependencies.patch @@ -0,0 +1,117 @@ +From 6c5c3793cbc6ba2a1d0d623a2bdaa9c2125be516 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 9 Sep 2020 15:24:38 -0400 +Subject: [PATCH 3/6] devendor external dependencies + +externally fetched libraries may cause linker errors resulting from +duplicate symbols in downstream projects. +--- + PCbuild/_bz2.vcxproj | 4 +++- + PCbuild/_lzma.vcxproj | 5 ++--- + PCbuild/_sqlite3.vcxproj | 2 +- + PCbuild/_ssl.vcxproj | 2 +- + PCbuild/pyexpat.vcxproj | 6 ++++-- + 5 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/PCbuild/_bz2.vcxproj b/PCbuild/_bz2.vcxproj +index 3fe95fbf83..6b12e8818e 100644 +--- a/PCbuild/_bz2.vcxproj ++++ b/PCbuild/_bz2.vcxproj +@@ -101,6 +101,8 @@ + + + ++ ++ + + + +@@ -109,7 +111,7 @@ + + + +- ++ + + + +diff --git a/PCbuild/_lzma.vcxproj b/PCbuild/_lzma.vcxproj +index fe076a6fc5..70cc61dd95 100644 +--- a/PCbuild/_lzma.vcxproj ++++ b/PCbuild/_lzma.vcxproj +@@ -94,10 +94,9 @@ + + + $(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories) +- WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions) ++ WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + +- $(OutDir)liblzma$(PyDebugExt).lib;%(AdditionalDependencies) + + + +@@ -111,7 +110,7 @@ + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} + false + +- ++ + {12728250-16eC-4dc6-94d7-e21dd88947f8} + false + +diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj +index 7e0062692b..6fb3279a20 100644 +--- a/PCbuild/_sqlite3.vcxproj ++++ b/PCbuild/_sqlite3.vcxproj +@@ -127,7 +127,7 @@ + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} + false + +- ++ + {a1a295e5-463c-437f-81ca-1f32367685da} + false + +diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj +index 4907f49b66..4dffa202b7 100644 +--- a/PCbuild/_ssl.vcxproj ++++ b/PCbuild/_ssl.vcxproj +@@ -99,7 +99,7 @@ + + + +- ++ + _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions) + + +diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj +index b2d9f5d57d..4efb826a05 100644 +--- a/PCbuild/pyexpat.vcxproj ++++ b/PCbuild/pyexpat.vcxproj +@@ -89,17 +89,19 @@ + + + +- ++ + $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_STATIC;%(PreprocessorDefinitions) + + +- ++ + + + + + ++ ++ + + + +-- +2.28.0.windows.1 + diff --git a/ports/python3/0004-dont-copy-vcruntime.patch b/ports/python3/0004-dont-copy-vcruntime.patch new file mode 100644 index 00000000000000..174c27e5c9ea51 --- /dev/null +++ b/ports/python3/0004-dont-copy-vcruntime.patch @@ -0,0 +1,26 @@ +From 8086c67fa7ada1888a7808cbdc6fe74b62abe5b1 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 9 Sep 2020 16:12:49 -0400 +Subject: [PATCH 4/6] dont copy vcruntime + +VCRUNTIME140.dll should not be redistributed, ever. +--- + PCbuild/pythoncore.vcxproj | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 5f30a35eb3..3cf21ba39c 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -565,7 +565,7 @@ + + + +- ++ + + + +-- +2.28.0.windows.1 + diff --git a/ports/python3/0005-only-build-required-projects.patch b/ports/python3/0005-only-build-required-projects.patch new file mode 100644 index 00000000000000..dbbe372340118a --- /dev/null +++ b/ports/python3/0005-only-build-required-projects.patch @@ -0,0 +1,60 @@ +From 6492277e39dbe7dd77d32fdc9ae4b989213ef3c6 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 9 Sep 2020 20:15:58 -0400 +Subject: [PATCH 5/6] only build required projects + +strips out tests and unsupported externals (eg tkinter). +--- + PCbuild/_ssl.vcxproj | 2 +- + PCbuild/pcbuild.proj | 14 +++++++------- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj +index 4dffa202b7..e661cb6fb6 100644 +--- a/PCbuild/_ssl.vcxproj ++++ b/PCbuild/_ssl.vcxproj +@@ -111,7 +111,7 @@ + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} + false + +- ++ + {86937f53-c189-40ef-8ce8-8759d8e7d480} + false + +diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj +index 4d416c589e..ede9868a8f 100644 +--- a/PCbuild/pcbuild.proj ++++ b/PCbuild/pcbuild.proj +@@ -45,21 +45,21 @@ + false + + +- ++ + +- ++ + +- ++ + + + + + + +- +- +- +- ++ ++ ++ ++ + + + +-- +2.28.0.windows.1 + diff --git a/ports/python3/0006-fix-duplicate-symbols.patch b/ports/python3/0006-fix-duplicate-symbols.patch new file mode 100644 index 00000000000000..251c0186abf282 --- /dev/null +++ b/ports/python3/0006-fix-duplicate-symbols.patch @@ -0,0 +1,39 @@ +From 62e082c1eba79d46ba8ab4b7a556a57a2253d555 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Fri, 11 Sep 2020 12:35:36 -0400 +Subject: [PATCH 6/6] fix duplicate symbols + +--- + Modules/_winapi.c | 2 +- + Modules/overlapped.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Modules/_winapi.c b/Modules/_winapi.c +index e1672c4785..27148094d2 100644 +--- a/Modules/_winapi.c ++++ b/Modules/_winapi.c +@@ -304,7 +304,7 @@ static PyMemberDef overlapped_members[] = { + {NULL} + }; + +-PyTypeObject OverlappedType = { ++static PyTypeObject OverlappedType = { + PyVarObject_HEAD_INIT(NULL, 0) + /* tp_name */ "_winapi.Overlapped", + /* tp_basicsize */ sizeof(OverlappedObject), +diff --git a/Modules/overlapped.c b/Modules/overlapped.c +index cd7869fa8a..319ea0a4b7 100644 +--- a/Modules/overlapped.c ++++ b/Modules/overlapped.c +@@ -1756,7 +1756,7 @@ static PyGetSetDef Overlapped_getsets[] = { + {NULL}, + }; + +-PyTypeObject OverlappedType = { ++static PyTypeObject OverlappedType = { + PyVarObject_HEAD_INIT(NULL, 0) + /* tp_name */ "_overlapped.Overlapped", + /* tp_basicsize */ sizeof(OverlappedObject), +-- +2.28.0.windows.1 + diff --git a/ports/python3/0007-restore-support-for-windows-7.patch b/ports/python3/0007-restore-support-for-windows-7.patch new file mode 100644 index 00000000000000..837666393cb61c --- /dev/null +++ b/ports/python3/0007-restore-support-for-windows-7.patch @@ -0,0 +1,178 @@ +From e30a560527d17ae81685dd11d3268bc982af2048 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Tue, 16 Feb 2021 18:03:07 -0500 +Subject: [PATCH 7/7] restore support for windows 7 + +this backports the windows 7 compatible fix for bpo-39401 from gh-18234, +originally authored by Steve Dower, and removes explicit dependencies on +pathcch. + +The same mechanism is applied to fix posixmodule.c +--- +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index c984e2e..6c9787a 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -18,7 +18,7 @@ + + FSCTL_GET_REPARSE_POINT is not exported with WIN32_LEAN_AND_MEAN. */ + # include +-# include ++# include + #endif + + #include "pycore_ceval.h" // _PyEval_ReInitThreads() +@@ -4371,6 +4371,10 @@ os._path_splitroot + Removes everything after the root on Win32. + [clinic start generated code]*/ + ++static int _PathCchSkipRoot_Initialized = 0; ++typedef HRESULT (__stdcall *PPathCchSkipRoot) (PCWSTR pszPath, PCWSTR *ppszRootEnd); ++static PPathCchSkipRoot _PathCchSkipRoot; ++ + static PyObject * + os__path_splitroot_impl(PyObject *module, path_t *path) + /*[clinic end generated code: output=ab7f1a88b654581c input=dc93b1d3984cffb6]*/ +@@ -4380,6 +4384,19 @@ os__path_splitroot_impl(PyObject *module, path_t *path) + PyObject *result = NULL; + HRESULT ret; + ++ if (_PathCchSkipRoot_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ ++ if (pathapi) { ++ _PathCchSkipRoot = (PPathCchSkipRoot)GetProcAddress(pathapi, "PathCchSkipRoot"); ++ } else { ++ _PathCchSkipRoot = NULL; ++ } ++ ++ _PathCchSkipRoot_Initialized = 1; ++ } ++ + buffer = (wchar_t*)PyMem_Malloc(sizeof(wchar_t) * (wcslen(path->wide) + 1)); + if (!buffer) { + return NULL; +@@ -4390,7 +4407,14 @@ os__path_splitroot_impl(PyObject *module, path_t *path) + } + + Py_BEGIN_ALLOW_THREADS +- ret = PathCchSkipRoot(buffer, &end); ++ if (_PathCchSkipRoot) { ++ ret = _PathCchSkipRoot(buffer, &end); ++ } else { ++ end = PathSkipRootW(buffer); ++ if (!end) { ++ ret = E_FAIL; ++ } ++ } + Py_END_ALLOW_THREADS + if (FAILED(ret)) { + result = Py_BuildValue("sO", "", path->object); +diff --git a/PC/getpathp.c b/PC/getpathp.c +index 53da3a6..3d58bbf 100644 +--- a/PC/getpathp.c ++++ b/PC/getpathp.c +@@ -250,14 +250,43 @@ ismodule(wchar_t *filename, int update_filename) + stuff as fits will be appended. + */ + ++ ++static int _PathCchCombineEx_Initialized = 0; ++typedef HRESULT(__stdcall *PPathCchCombineEx) (PWSTR pszPathOut, size_t cchPathOut, ++ PCWSTR pszPathIn, PCWSTR pszMore, ++ unsigned long dwFlags); ++static PPathCchCombineEx _PathCchCombineEx; ++ + static void + join(wchar_t *buffer, const wchar_t *stuff) + { +- if (FAILED(PathCchCombineEx(buffer, MAXPATHLEN+1, buffer, stuff, 0))) { +- Py_FatalError("buffer overflow in getpathp.c's join()"); ++ if (_PathCchCombineEx_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ if (pathapi) { ++ _PathCchCombineEx = (PPathCchCombineEx)GetProcAddress(pathapi, "PathCchCombineEx"); ++ } ++ else { ++ _PathCchCombineEx = NULL; ++ } ++ _PathCchCombineEx_Initialized = 1; ++ } ++ if (_PathCchCombineEx) { ++ if (FAILED(_PathCchCombineEx(buffer, MAXPATHLEN+1, buffer, stuff, 0))) { ++ Py_FatalError("buffer overflow in getpathp.c's join()"); ++ } ++ } else { ++ if (!PathCombineW(buffer, buffer, stuff)) { ++ Py_FatalError("buffer overflow in getpathp.c's join()"); ++ } + } + } + ++static int _PathCchCanonicalizeEx_Initialized = 0; ++typedef HRESULT(__stdcall *PPathCchCanonicalizeEx) (PWSTR pszPathOut, size_t cchPathOut, ++ PCWSTR pszPathIn, unsigned long dwFlags); ++static PPathCchCanonicalizeEx _PathCchCanonicalizeEx; ++ + /* Call PathCchCanonicalizeEx(path): remove navigation elements such as "." + and ".." to produce a direct, well-formed path. */ + static PyStatus +@@ -267,8 +296,26 @@ canonicalize(wchar_t *buffer, const wchar_t *path) + return _PyStatus_NO_MEMORY(); + } + +- if (FAILED(PathCchCanonicalizeEx(buffer, MAXPATHLEN + 1, path, 0))) { +- return INIT_ERR_BUFFER_OVERFLOW(); ++ if (_PathCchCanonicalizeEx_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ if (pathapi) { ++ _PathCchCanonicalizeEx = (PPathCchCanonicalizeEx)GetProcAddress(pathapi, "PathCchCanonicalizeEx"); ++ } ++ else { ++ _PathCchCanonicalizeEx = NULL; ++ } ++ _PathCchCanonicalizeEx_Initialized = 1; ++ } ++ if (_PathCchCanonicalizeEx) { ++ if (FAILED(_PathCchCanonicalizeEx(buffer, MAXPATHLEN + 1, path, 0))) { ++ return INIT_ERR_BUFFER_OVERFLOW(); ++ } ++ } ++ else { ++ if (!PathCanonicalizeW(buffer, path)) { ++ return INIT_ERR_BUFFER_OVERFLOW(); ++ } + } + return _PyStatus_OK(); + } +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index d7d3cf0..6e9c090 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -136,8 +136,8 @@ WIN32 is still required for the locale module. + + /* set the version macros for the windows headers */ + /* Python 3.9+ requires Windows 8 or greater */ +-#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */ +-#define Py_NTDDI NTDDI_WIN8 ++#define Py_WINVER 0x0601 /* _WIN32_WINNT_WIN7 */ ++#define Py_NTDDI NTDDI_WIN7 + + /* We only set these values when building Python - we don't want to force + these values on extensions, as that will affect the prototypes and +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 2625d02..20e3d6e 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -106,7 +106,7 @@ + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) + + +- version.lib;shlwapi.lib;ws2_32.lib;pathcch.lib;%(AdditionalDependencies) ++ version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) + + + diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL deleted file mode 100644 index 1b9a01988776cc..00000000000000 --- a/ports/python3/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: python3 -Version: 3.7.3 -Homepage: https://github.com/python/cpython -Description: The Python programming language as an embeddable library \ No newline at end of file diff --git a/ports/python3/openssl.props.in b/ports/python3/openssl.props.in new file mode 100644 index 00000000000000..1d404ad57c115f --- /dev/null +++ b/ports/python3/openssl.props.in @@ -0,0 +1,14 @@ + + + + + Crypt32.lib;ws2_32.lib;%(AdditionalDependencies) + + ${CRYPTO_RELEASE};${SSL_RELEASE};%(AdditionalDependencies) + + + ${CRYPTO_DEBUG};${SSL_DEBUG};%(AdditionalDependencies) + + + + diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 809b825f2297a5..069008408025c4 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -4,55 +4,207 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static endif() set(PYTHON_VERSION_MAJOR 3) -set(PYTHON_VERSION_MINOR 7) -set(PYTHON_VERSION_PATCH 3) +set(PYTHON_VERSION_MINOR 9) +set(PYTHON_VERSION_PATCH 7) set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) -include(vcpkg_common_functions) +set(PATCHES + 0002-use-vcpkg-zlib.patch + 0003-devendor-external-dependencies.patch + 0004-dont-copy-vcruntime.patch + 0005-only-build-required-projects.patch + 0006-fix-duplicate-symbols.patch +) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(PREPEND PATCHES 0001-static-library.patch) +endif() + +# Python 3.9 removed support for Windows 7. This patch re-adds support for Windows 7 and is therefore +# required to build this port on Windows 7 itself due to Python using itself in its own build system. +if("deprecated-win7-support" IN_LIST FEATURES) + list(APPEND PATCHES 0007-restore-support-for-windows-7.patch) + message(WARNING "Windows 7 support is deprecated and may be removed at any time.") +elseif(VCPKG_TARGET_IS_WINDOWS AND CMAKE_SYSTEM_VERSION EQUAL 6.1) + message(FATAL_ERROR "python3 requires the feature deprecated-win7-support when building on Windows 7.") +endif() vcpkg_from_github( - OUT_SOURCE_PATH TEMP_SOURCE_PATH + OUT_SOURCE_PATH SOURCE_PATH REPO python/cpython REF v${PYTHON_VERSION} - SHA512 023960a2f570fe7178d3901df0c3c33346466906b6d55c73ef7947c19619dbab62efc42c7262a0539bc5e31543b1113eb7a088d4615ad7557a0707bdaca27940 + SHA512 05de4e485fb6f5f21e4e48fb4d7ec0e9a420fab243cba08663e52b8062f86df3e4f57b8afd49ad94d363ca0972ab85efe132b980a7f84188c82814b6df0ba191 HEAD_REF master + PATCHES ${PATCHES} ) -# We need per-triplet directories because we need to patch the project files differently based on the linkage -# Because the patches patch the same file, they have to be applied in the correct order -set(SOURCE_PATH "${TEMP_SOURCE_PATH}-Lib-${VCPKG_LIBRARY_LINKAGE}-crt-${VCPKG_CRT_LINKAGE}") -file(REMOVE_RECURSE ${SOURCE_PATH}) -file(RENAME "${TEMP_SOURCE_PATH}" ${SOURCE_PATH}) - -if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - set(BUILD_ARCH "Win32") - set(OUT_DIR "win32") -elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") - set(BUILD_ARCH "x64") - set(OUT_DIR "amd64") +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + # Due to the way Python handles C extension modules on Windows, a static python core cannot + # load extension modules. + string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" PYTHON_ALLOW_EXTENSIONS) + if(PYTHON_ALLOW_EXTENSIONS) + find_library(BZ2_RELEASE NAMES bz2 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(BZ2_DEBUG NAMES bz2d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(CRYPTO_RELEASE NAMES libcrypto PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(CRYPTO_DEBUG NAMES libcrypto PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(EXPAT_RELEASE NAMES libexpat libexpatMD PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(EXPAT_DEBUG NAMES libexpatd libexpatdMD PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(FFI_RELEASE NAMES libffi PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(FFI_DEBUG NAMES libffi PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(LZMA_RELEASE NAMES lzma PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(LZMA_DEBUG NAMES lzmad PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(SQLITE_RELEASE NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(SQLITE_DEBUG NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(SSL_RELEASE NAMES libssl PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(SSL_DEBUG NAMES libssl PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + else() + message(STATUS "WARNING: Static builds of Python will not have C extension modules available.") + endif() + find_library(ZLIB_RELEASE NAMES zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(ZLIB_DEBUG NAMES zlib zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + + configure_file("${SOURCE_PATH}/PC/pyconfig.h" "${SOURCE_PATH}/PC/pyconfig.h") + configure_file("${CMAKE_CURRENT_LIST_DIR}/python_vcpkg.props.in" "${SOURCE_PATH}/PCbuild/python_vcpkg.props") + configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.props.in" "${SOURCE_PATH}/PCbuild/openssl.props") + file(WRITE "${SOURCE_PATH}/PCbuild/libffi.props" + " + " + ) + + if(PYTHON_ALLOW_EXTENSIONS) + set(OPTIONS + "/p:IncludeExtensions=true" + "/p:IncludeExternals=true" + "/p:IncludeCTypes=true" + "/p:IncludeSSL=true" + "/p:IncludeTkinter=false" + "/p:IncludeTests=false" + "/p:ForceImportBeforeCppTargets=${SOURCE_PATH}/PCbuild/python_vcpkg.props" + ) + else() + set(OPTIONS + "/p:IncludeExtensions=false" + "/p:IncludeExternals=false" + "/p:IncludeTests=false" + "/p:ForceImportBeforeCppTargets=${SOURCE_PATH}/PCbuild/python_vcpkg.props" + ) + endif() + string(REPLACE "\\" "" WindowsSDKVersion "$ENV{WindowsSDKVersion}") + list(APPEND OPTIONS + "/p:WindowsTargetPlatformVersion=${WindowsSDKVersion}" + "/p:DefaultWindowsSDKVersion=${WindowsSDKVersion}" + ) + if(VCPKG_TARGET_IS_UWP) + list(APPEND OPTIONS "/p:IncludeUwp=true") + else() + list(APPEND OPTIONS "/p:IncludeUwp=false") + endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND OPTIONS "/p:_VcpkgPythonLinkage=DynamicLibrary") + else() + list(APPEND OPTIONS "/p:_VcpkgPythonLinkage=StaticLibrary") + endif() + + # _freeze_importlib.exe is run as part of the build process, so make sure the required dynamic libs are available. + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/bin") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/debug/bin") + endif() + + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH "PCbuild/pcbuild.proj" + OPTIONS ${OPTIONS} + LICENSE_SUBPATH "LICENSE" + SKIP_CLEAN + ) + + # The extension modules must be placed in the DLLs directory, so we can't use vcpkg_copy_tools() + if(PYTHON_ALLOW_EXTENSIONS) + file(GLOB_RECURSE PYTHON_EXTENSIONS "${CURRENT_BUILDTREES_DIR}/*.pyd") + list(FILTER PYTHON_EXTENSIONS EXCLUDE REGEX [[.*_d\.pyd]]) + file(COPY ${PYTHON_EXTENSIONS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/DLLs") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/DLLs") + file(REMOVE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/DLLs/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll") + endif() + + file(COPY "${SOURCE_PATH}/Include/" "${SOURCE_PATH}/PC/pyconfig.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" + FILES_MATCHING PATTERN *.h + ) + file(COPY "${SOURCE_PATH}/Lib" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + + # Remove any extension libraries and other unversioned binaries that could conflict with the python2 port. + # You don't need to link against these anyway. + file(GLOB PYTHON_LIBS + "${CURRENT_PACKAGES_DIR}/lib/*.lib" + "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib" + ) + list(FILTER PYTHON_LIBS EXCLUDE REGEX [[python[0-9]*(_d)?\.lib$]]) + file(GLOB PYTHON_INSTALLERS "${CURRENT_PACKAGES_DIR}/tools/${PORT}/wininst-*.exe") + file(REMOVE ${PYTHON_LIBS} ${PYTHON_INSTALLERS}) + + if(PYTHON_ALLOW_EXTENSIONS) + message(STATUS "Bootstrapping pip") + vcpkg_execute_required_process(COMMAND python -m ensurepip + WORKING_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}" + LOGNAME "ensurepip-${TARGET_TRIPLET}" + ) + endif() + + vcpkg_clean_msbuild() else() - message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() + set(OPTIONS + "--with-openssl=${CURRENT_INSTALLED_DIR}" + "--with-ensurepip" + [[--with-suffix=""]] + "--with-system-expat" + ) + if(VCPKG_TARGET_IS_OSX) + list(APPEND OPTIONS "LIBS=-liconv -lintl") + endif() -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj - PLATFORM ${BUILD_ARCH}) + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${OPTIONS} + OPTIONS_DEBUG "--with-pydebug" + ) + vcpkg_install_make(ADD_BIN_TO_PATH INSTALL_TARGET altinstall) -file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) -file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) + file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") -file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) + # Makefiles, c files, __pycache__, and other junk. + file(GLOB PYTHON_LIB_DIRS LIST_DIRECTORIES true + "${CURRENT_PACKAGES_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/*" + "${CURRENT_PACKAGES_DIR}/debug/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/*") + list(FILTER PYTHON_LIB_DIRS INCLUDE REGEX [[config-[0-9].*.*]]) + file(REMOVE_RECURSE ${PYTHON_LIB_DIRS}) -file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}d") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man1") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug") -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +function(_generate_finder) + cmake_parse_arguments(PythonFinder "NO_OVERRIDE" "DIRECTORY;PREFIX" "" ${ARGN}) + configure_file( + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" + "${CURRENT_PACKAGES_DIR}/share/${PythonFinder_DIRECTORY}/vcpkg-cmake-wrapper.cmake" + @ONLY + ) +endfunction() -vcpkg_copy_pdbs() +message(STATUS "Installing cmake wrappers") +_generate_finder(DIRECTORY "python" PREFIX "Python") +_generate_finder(DIRECTORY "python3" PREFIX "Python3") +_generate_finder(DIRECTORY "pythoninterp" PREFIX "PYTHON" NO_OVERRIDE) diff --git a/ports/python3/python_vcpkg.props.in b/ports/python3/python_vcpkg.props.in new file mode 100644 index 00000000000000..e5b6093a51c3a9 --- /dev/null +++ b/ports/python3/python_vcpkg.props.in @@ -0,0 +1,41 @@ + + + + + + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) + XML_STATIC;%(PreprocessorDefinitions) + + %(AdditionalIncludeDirectories);${CURRENT_INSTALLED_DIR}/include + + + MultiThreadedDebug + MultiThreaded + MultiThreadedDebugDLL + MultiThreadedDLL + + + + + ${ZLIB_RELEASE};%(AdditionalDependencies) + + + ${ZLIB_DEBUG};%(AdditionalDependencies) + + + + + ${BZ2_RELEASE};${EXPAT_RELEASE};${FFI_RELEASE};${LZMA_RELEASE};${SQLITE_RELEASE};%(AdditionalDependencies) + + + ${BZ2_DEBUG};${EXPAT_DEBUG};${FFI_DEBUG};${LZMA_DEBUG};${SQLITE_DEBUG};%(AdditionalDependencies) + + + + + + MachineX86 + MachineX64 + + + diff --git a/ports/python3/usage b/ports/python3/usage new file mode 100644 index 00000000000000..e177b11f63bd7d --- /dev/null +++ b/ports/python3/usage @@ -0,0 +1,4 @@ +The package python3 is compatible with built-in CMake targets: + + find_package(Python3 COMPONENTS Development REQUIRED) + target_link_libraries(main PRIVATE Python3::Python) diff --git a/ports/python3/vcpkg-cmake-wrapper.cmake b/ports/python3/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..83c3fbd1cfec33 --- /dev/null +++ b/ports/python3/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,120 @@ +# For very old ports whose upstream do not properly set the minimum CMake version. +cmake_policy(SET CMP0012 NEW) +cmake_policy(SET CMP0057 NEW) + +# This prevents the port's python.exe from overriding the Python fetched by +# vcpkg_find_acquire_program(PYTHON3) and prevents the vcpkg toolchain from +# stomping on FindPython's default functionality. +list(REMOVE_ITEM CMAKE_PROGRAM_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/python3") +if(@PythonFinder_NO_OVERRIDE@) + _find_package(${ARGS}) + return() +endif() + +# CMake's FindPython's separation of concerns is very muddy. We only want to force vcpkg's Python +# if the consumer is using the development component. What we don't want to do is break detection +# of the system Python, which may have certain packages the user expects. But - if the user is +# embedding Python or using both the development and interpreter components, then we need the +# interpreter matching vcpkg's Python libraries. Note that the "Development" component implies +# both "Development.Module" and "Development.Embed" +if("Development" IN_LIST ARGS OR "Development.Embed" IN_LIST ARGS) + set(_PythonFinder_WantInterp TRUE) + set(_PythonFinder_WantLibs TRUE) +elseif("Development.Module" IN_LIST ARGS) + if("Interpreter" IN_LIST ARGS) + set(_PythonFinder_WantInterp TRUE) + endif() + set(_PythonFinder_WantLibs TRUE) +endif() + +if(_PythonFinder_WantLibs) + find_path( + @PythonFinder_PREFIX@_INCLUDE_DIR + NAMES "Python.h" + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" + PATH_SUFFIXES "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@" + NO_DEFAULT_PATH + ) + + # Don't set the public facing hint or the finder will be unable to detect the debug library. + # Internally, it uses the same value with an underscore prepended. + find_library( + _@PythonFinder_PREFIX@_LIBRARY_RELEASE + NAMES + "python@PYTHON_VERSION_MAJOR@@PYTHON_VERSION_MINOR@" + "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@" + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" + NO_DEFAULT_PATH + ) + find_library( + _@PythonFinder_PREFIX@_LIBRARY_DEBUG + NAMES + "python@PYTHON_VERSION_MAJOR@@PYTHON_VERSION_MINOR@_d" + "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@d" + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" + NO_DEFAULT_PATH + ) + + if(_PythonFinder_WantInterp) + find_program( + @PythonFinder_PREFIX@_EXECUTABLE + NAMES "python" "python@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@" + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/python3" + NO_DEFAULT_PATH + ) + endif() + + _find_package(${ARGS}) + + if(@VCPKG_LIBRARY_LINKAGE@ STREQUAL static) + include(CMakeFindDependencyMacro) + + # Python for Windows embeds the zlib module into the core, so we have to link against it. + # This is a separate extension module on Unix-like platforms. + if(WIN32) + find_dependency(ZLIB) + if(TARGET @PythonFinder_PREFIX@::Python) + set_property(TARGET @PythonFinder_PREFIX@::Python APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) + endif() + if(TARGET @PythonFinder_PREFIX@::Module) + set_property(TARGET @PythonFinder_PREFIX@::Module APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) + endif() + if(DEFINED @PythonFinder_PREFIX@_LIBRARIES) + list(APPEND @PythonFinder_PREFIX@_LIBRARIES ${ZLIB_LIBRARIES}) + endif() + endif() + + if(APPLE) + find_dependency(Iconv) + find_dependency(Intl) + if(TARGET @PythonFinder_PREFIX@::Python) + get_target_property(_PYTHON_INTERFACE_LIBS @PythonFinder_PREFIX@::Python INTERFACE_LINK_LIBRARIES) + list(REMOVE_ITEM _PYTHON_INTERFACE_LIBS "-liconv" "-lintl") + list(APPEND _PYTHON_INTERFACE_LIBS + Iconv::Iconv + "$,${Intl_LIBRARY_DEBUG},${Intl_LIBRARY_RELEASE}>" + ) + set_property(TARGET @PythonFinder_PREFIX@::Python PROPERTY INTERFACE_LINK_LIBRARIES ${_PYTHON_INTERFACE_LIBS}) + unset(_PYTHON_INTERFACE_LIBS) + endif() + if(TARGET @PythonFinder_PREFIX@::Module) + get_target_property(_PYTHON_INTERFACE_LIBS @PythonFinder_PREFIX@::Module INTERFACE_LINK_LIBRARIES) + list(REMOVE_ITEM _PYTHON_INTERFACE_LIBS "-liconv" "-lintl") + list(APPEND _PYTHON_INTERFACE_LIBS + Iconv::Iconv + "$,${Intl_LIBRARY_DEBUG},${Intl_LIBRARY_RELEASE}>" + ) + set_property(TARGET @PythonFinder_PREFIX@::Module PROPERTY INTERFACE_LINK_LIBRARIES ${_PYTHON_INTERFACE_LIBS}) + unset(_PYTHON_INTERFACE_LIBS) + endif() + if(DEFINED @PythonFinder_PREFIX@_LIBRARIES) + list(APPEND @PythonFinder_PREFIX@_LIBRARIES "-framework CoreFoundation" ${Iconv_LIBRARIES} ${Intl_LIBRARIES}) + endif() + endif() + endif() +else() + _find_package(${ARGS}) +endif() + +unset(_PythonFinder_WantInterp) +unset(_PythonFinder_WantLibs) diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json new file mode 100644 index 00000000000000..5803414a87dad0 --- /dev/null +++ b/ports/python3/vcpkg.json @@ -0,0 +1,52 @@ +{ + "name": "python3", + "version-semver": "3.9.7", + "description": "The Python programming language", + "homepage": "https://github.com/python/cpython", + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "bzip2", + "platform": "!(windows & static)" + }, + "expat", + { + "name": "gettext", + "platform": "osx" + }, + { + "name": "libffi", + "platform": "!(windows & static)" + }, + { + "name": "libiconv", + "platform": "osx" + }, + { + "name": "liblzma", + "platform": "!(windows & static)" + }, + { + "name": "openssl", + "platform": "!(windows & static)" + }, + { + "name": "sqlite3", + "platform": "!(windows & static)" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "deprecated-win7-support": { + "description": "Deprecated support for the Windows 7 platform -- may be removed at any time." + } + } +} diff --git a/ports/qca/0001-fix-path-for-vcpkg.patch b/ports/qca/0001-fix-path-for-vcpkg.patch index 9db22af1d4f3ae..744fce107d513e 100644 --- a/ports/qca/0001-fix-path-for-vcpkg.patch +++ b/ports/qca/0001-fix-path-for-vcpkg.patch @@ -1,35 +1,47 @@ -From a3a8d50f3bdcb4df630f7126718c21f23efd7832 Mon Sep 17 00:00:00 2001 -From: Alexander Kaspar -Date: Wed, 30 Nov 2016 15:45:12 +0100 -Subject: [PATCH] fix path for vcpkg - ---- - CMakeLists.txt | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 605621b..3b5a9be 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -277,7 +277,7 @@ if(DEVELOPER_MODE) +diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" +index 1f84c2c9e..f72ee9d8d 100644 +--- "a/CMakeLists.txt" ++++ "b/CMakeLists.txt" +@@ -58,6 +58,7 @@ set(QCA_SUFFIX "qt5") + if(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC) + set(STATIC_PLUGINS ON) + add_definitions(-DQT_STATICPLUGIN) ++ add_definitions(-DQCA_STATIC) + set(PLUGIN_TYPE "STATIC") + else() + set(PLUGIN_TYPE "MODULE") +@@ -266,10 +267,17 @@ if(DEVELOPER_MODE) + add_definitions(-DDEVELOPER_MODE) + # To prefer plugins from build tree when run qca from build tree - file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf - "[Paths] +- file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf +-"[Paths] -Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME} -+Plugins=${CMAKE_BINARY_DIR}/bin/${QCA_LIB_NAME} - ") +-") ++ if(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC) ++ file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf ++ "[Paths] ++ Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME} ++ ") ++ else() ++ file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf ++ "[Paths] ++ Plugins=${CMAKE_BINARY_DIR}/bin/${QCA_LIB_NAME} ++ ") ++ endif() endif() -@@ -320,7 +320,7 @@ else (qca_CERTSTORE) + if (APPLE) +@@ -309,7 +317,7 @@ else() set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem") # note that INSTALL_FILES targets are relative to the current installation prefix... if(NOT DEVELOPER_MODE) - install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/certs") + install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/share/qca/certs") endif() - endif (qca_CERTSTORE) + endif() message(STATUS "certstore path: " ${qca_CERTSTORE}) -@@ -401,10 +401,10 @@ endif(DOXYGEN_FOUND) +@@ -390,10 +398,10 @@ endif() include(CMakePackageConfigHelpers) configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in" @@ -43,7 +55,7 @@ index 605621b..3b5a9be 100644 if(NOT DEVELOPER_MODE) -@@ -472,10 +472,10 @@ if(NOT DEVELOPER_MODE) +@@ -461,10 +469,10 @@ if(NOT DEVELOPER_MODE) endif() endif() @@ -58,6 +70,3 @@ index 605621b..3b5a9be 100644 + DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake ) endif() --- -2.8.1.windows.1 - diff --git a/ports/qca/0002-fix-build-error.patch b/ports/qca/0002-fix-build-error.patch index f4ddee3a0a482e..31aede75cee41e 100644 --- a/ports/qca/0002-fix-build-error.patch +++ b/ports/qca/0002-fix-build-error.patch @@ -1,57 +1,58 @@ -diff --git a/plugins/qca-gnupg/CMakeLists.txt b/plugins/qca-gnupg/CMakeLists.txt -index 1ed8e21..20890dd 100644 ---- a/plugins/qca-gnupg/CMakeLists.txt -+++ b/plugins/qca-gnupg/CMakeLists.txt -@@ -68,6 +68,4 @@ if(NOT DEVELOPER_MODE) - LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") -- -- install_pdb(qca-gnupg ${QCA_CRYPTO_INSTALL_DIR}) - endif() -diff --git a/plugins/qca-logger/CMakeLists.txt b/plugins/qca-logger/CMakeLists.txt -index ba6926e..45e1986 100644 ---- a/plugins/qca-logger/CMakeLists.txt -+++ b/plugins/qca-logger/CMakeLists.txt -@@ -20,6 +20,4 @@ if(NOT DEVELOPER_MODE) - LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") -- -- install_pdb(qca-logger ${QCA_CRYPTO_INSTALL_DIR}) - endif() -diff --git a/plugins/qca-ossl/CMakeLists.txt b/plugins/qca-ossl/CMakeLists.txt -index af3d756..c8480a3 100644 ---- a/plugins/qca-ossl/CMakeLists.txt -+++ b/plugins/qca-ossl/CMakeLists.txt -@@ -65,8 +65,6 @@ if(OPENSSL_FOUND) - LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") -- -- install_pdb(qca-ossl ${QCA_CRYPTO_INSTALL_DIR}) - endif() +diff --git "a/cmake/modules/QcaMacro.cmake" "b/cmake/modules/QcaMacro.cmake" +index 5d86e4725..62568626b 100644 +--- "a/cmake/modules/QcaMacro.cmake" ++++ "b/cmake/modules/QcaMacro.cmake" +@@ -61,15 +61,6 @@ macro(add_qca_test TARGET DESCRIPTION) + endmacro(add_qca_test) - else(OPENSSL_FOUND) -diff --git a/plugins/qca-softstore/CMakeLists.txt b/plugins/qca-softstore/CMakeLists.txt -index d7af072..3c64870 100644 ---- a/plugins/qca-softstore/CMakeLists.txt -+++ b/plugins/qca-softstore/CMakeLists.txt -@@ -20,6 +20,4 @@ if(NOT DEVELOPER_MODE) - LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") + macro(install_pdb TARGET INSTALL_PATH) +- if(MSVC) +- get_target_property(LOCATION ${TARGET} LOCATION_DEBUG) +- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}") +- install(FILES ${LOCATION} DESTINATION ${INSTALL_PATH} CONFIGURATIONS Debug) - -- install_pdb(qca-softstore ${QCA_CRYPTO_INSTALL_DIR}) - endif() -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 2e81974..907049c 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -184,6 +184,5 @@ if(NOT DEVELOPER_MODE) - FRAMEWORK DESTINATION "${QCA_LIBRARY_INSTALL_DIR}" - PUBLIC_HEADER DESTINATION "${QCA_FULL_INCLUDE_INSTALL_DIR}" INCLUDES DESTINATION "${QCA_FULL_INCLUDE_INSTALL_DIR}" - ) -- install_pdb(${QCA_LIB_NAME} ${QCA_BINARY_INSTALL_DIR}) - endif() +- get_target_property(LOCATION ${TARGET} LOCATION_RELWITHDEBINFO) +- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}") +- install(FILES ${LOCATION} DESTINATION ${INSTALL_PATH} CONFIGURATIONS RelWithDebInfo) +- endif() + endmacro(install_pdb) + macro(normalize_path PATH) +diff --git "a/plugins/qca-ossl/qca-ossl.cpp" "b/plugins/qca-ossl/qca-ossl.cpp" +index ee872d721..fa3e2c414 100644 +--- "a/plugins/qca-ossl/qca-ossl.cpp" ++++ "b/plugins/qca-ossl/qca-ossl.cpp" +@@ -6910,6 +6910,7 @@ public: + else if ( type == QLatin1String("aes256-ccm") ) + return new opensslCipherContext( EVP_aes_256_ccm(), 0, this, type); + #endif ++#ifndef OPENSSL_NO_BF + else if ( type == QLatin1String("blowfish-ecb") ) + return new opensslCipherContext( EVP_bf_ecb(), 0, this, type); + else if ( type == QLatin1String("blowfish-cfb") ) +@@ -6920,6 +6921,8 @@ public: + return new opensslCipherContext( EVP_bf_cbc(), 0, this, type); + else if ( type == QLatin1String("blowfish-cbc-pkcs7") ) + return new opensslCipherContext( EVP_bf_cbc(), 1, this, type); ++#endif ++#ifndef OPENSSL_NO_DES + else if ( type == QLatin1String("tripledes-ecb") ) + return new opensslCipherContext( EVP_des_ede3(), 0, this, type); + else if ( type == QLatin1String("tripledes-cbc") ) +@@ -6936,6 +6939,8 @@ public: + return new opensslCipherContext( EVP_des_cfb(), 0, this, type); + else if ( type == QLatin1String("des-ofb") ) + return new opensslCipherContext( EVP_des_ofb(), 0, this, type); ++#endif ++#ifndef OPENSSL_NO_CAST + else if ( type == QLatin1String("cast5-ecb") ) + return new opensslCipherContext( EVP_cast5_ecb(), 0, this, type); + else if ( type == QLatin1String("cast5-cbc") ) +@@ -6946,6 +6951,7 @@ public: + return new opensslCipherContext( EVP_cast5_cfb(), 0, this, type); + else if ( type == QLatin1String("cast5-ofb") ) + return new opensslCipherContext( EVP_cast5_ofb(), 0, this, type); ++#endif + else if ( type == QLatin1String("pkey") ) + return new MyPKeyContext( this ); + else if ( type == QLatin1String("dlgroup") ) diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL deleted file mode 100644 index 356dff560b22e2..00000000000000 --- a/ports/qca/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: qca -Version: 2.2.1 -Description: Qt Cryptographic Architecture (QCA). -Homepage: https://cgit.kde.org/qca.git/ -Build-Depends: qt5-base diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index 9b2b1539736fed..34a80616949eae 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -4,11 +4,6 @@ # Output directories according to vcpkg # Updated certstore. See certstore.pem in the output dirs # - -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) vcpkg_add_to_path(${PERL_EXE_PATH}) @@ -20,12 +15,38 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDE/qca - REF v2.2.1 - SHA512 6b10f9bbf9ebf136655d1c6464f3849c8581b3cd5ef07b0697ddd5f32611dce301af5148e8e6fe91e763301e68994957a62a278334ee7a78559101f411f27d49 + REF v2.3.1 + SHA512 e04a44fb395e24fd009bb6b005282880bef84ca492b5e15903f9ce3e5e3f93beae3a386a1a381507ed5b0c6550e64c6bf434328f9d965fa7f7d638c3e5d5948b PATCHES - 0001-fix-path-for-vcpkg.patch - 0002-fix-build-error.patch + 0001-fix-path-for-vcpkg.patch + 0002-fix-build-error.patch +) + +# Remove these files on the cmake next update +vcpkg_download_distfile(ARCHIVE_PKGCONFIG + URLS "https://gitlab.kitware.com/cmake/cmake/-/raw/ab8bd48352df060c4ead210fe30dc4736646206b/Modules/FindPkgConfig.cmake?inline=false" + FILENAME "FindPkgConfig.cmake" + SHA512 d9aada8107eac9ada197d0b1e9040cd3707de7f5838c90bca80321e8eb35931f520635800bea0e2aafeca7fafb08b8e4752d5c6c2d6b1a5d5b4e3225d7818aa6 ) +vcpkg_download_distfile(ARCHIVE_PKGHSA + URLS "https://gitlab.kitware.com/cmake/cmake/-/raw/ab8bd48352df060c4ead210fe30dc4736646206b/Modules/FindPackageHandleStandardArgs.cmake?inline=false" + FILENAME "FindPackageHandleStandardArgs.cmake" + SHA512 61a459a9e0797f976fae36ce4fd5a18a30bd13e8bc9d65d165ca760e13ddc27a8c8ad371ad4b41cc36fe227425424fe9bc6e4dfa5cfdc68bd59a3c10005cf3b4 +) +vcpkg_download_distfile(ARCHIVE_PKGMSG + URLS "https://gitlab.kitware.com/cmake/cmake/-/raw/ab8bd48352df060c4ead210fe30dc4736646206b/Modules/FindPackageMessage.cmake?inline=false" + FILENAME "FindPackageMessage.cmake" + SHA512 44af652038ecd98c1e54f440e67994759345290530b36f687b7e6d5c310caa55597f3718901fe7a3f8816b560f03b8f238d90aab6ce9b1b24391ab0bb2aa44a8 +) +file(COPY ${ARCHIVE_PKGCONFIG} ${ARCHIVE_PKGHSA} ${ARCHIVE_PKGMSG} DESTINATION ${SOURCE_PATH}/cmake/modules) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(QCA_FEATURE_INSTALL_DIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/Qca) + set(QCA_FEATURE_INSTALL_DIR_RELEASE ${CURRENT_PACKAGES_DIR}/bin/Qca) +else() + set(QCA_FEATURE_INSTALL_DIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/Qca) + set(QCA_FEATURE_INSTALL_DIR_RELEASE ${CURRENT_PACKAGES_DIR}/lib/Qca) +endif() # According to: # https://www.openssl.org/docs/faq.html#USER16 @@ -56,10 +77,11 @@ vcpkg_configure_cmake( -DBUILD_TOOLS=OFF -DQCA_SUFFIX=OFF -DQCA_FEATURE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/qca/mkspecs/features + -DOSX_FRAMEWORK=OFF OPTIONS_DEBUG - -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca + -DQCA_PLUGINS_INSTALL_DIR=${QCA_FEATURE_INSTALL_DIR_DEBUG} OPTIONS_RELEASE - -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca + -DQCA_PLUGINS_INSTALL_DIR=${QCA_FEATURE_INSTALL_DIR_RELEASE} ) vcpkg_install_cmake() @@ -94,5 +116,4 @@ file(REMOVE_RECURSE message(STATUS "Patching files done") # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/qca/COPYING ${CURRENT_PACKAGES_DIR}/share/qca/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/qca/vcpkg.json b/ports/qca/vcpkg.json new file mode 100644 index 00000000000000..f4376e6ee75fc0 --- /dev/null +++ b/ports/qca/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qca", + "version-string": "2.3.1", + "port-version": 3, + "description": "Qt Cryptographic Architecture (QCA).", + "homepage": "https://cgit.kde.org/qca.git/", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qcustomplot/CONTROL b/ports/qcustomplot/CONTROL deleted file mode 100644 index 4b82238444e9c7..00000000000000 --- a/ports/qcustomplot/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qcustomplot -Version: 2.0.1-1 -Description: QCustomPlot is a Qt C++ widget for plotting and data visualization. -Build-Depends: qt5-base diff --git a/ports/qcustomplot/portfile.cmake b/ports/qcustomplot/portfile.cmake index 1f3385eb28f122..026f62fb381356 100644 --- a/ports/qcustomplot/portfile.cmake +++ b/ports/qcustomplot/portfile.cmake @@ -1,6 +1,4 @@ -include(vcpkg_common_functions) - -set(QCP_VERSION 2.0.1) +set(QCP_VERSION 2.0.1) vcpkg_download_distfile(ARCHIVE URLS "https://www.qcustomplot.com/release/${QCP_VERSION}/QCustomPlot.tar.gz" @@ -18,52 +16,24 @@ vcpkg_download_distfile(ARCHIVE FILENAME "QCustomPlot-sharedlib-${QCP_VERSION}.tar.gz" SHA512 ce90540fca7226eac37746327e1939a9c7af38fc2595f385ed04d6d1f49560da08fb5fae15d1b9d22b6ba578583f70de8f89ef26796770d41bf599c1b15c535d ) -vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) +vcpkg_extract_source_archive(SharedLib_SOURCE_PATH ARCHIVE "${ARCHIVE}") +file(RENAME "${SharedLib_SOURCE_PATH}" "${SOURCE_PATH}/qcustomplot-sharedlib") + vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}/qcustomplot-sharedlib/sharedlib-compilation/sharedlib-compilation.pro ) -vcpkg_build_qmake( +vcpkg_install_qmake( RELEASE_TARGETS release-all DEBUG_TARGETS debug-all ) -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - # Install header file file(INSTALL ${SOURCE_PATH}/qcustomplot.h DESTINATION ${CURRENT_PACKAGES_DIR}/include ) -# Install module files -macro(_install_module_file source_dir target_dir filename_regex) - file(GLOB _files ${source_dir}/*) - list(FILTER _files INCLUDE REGEX ${filename_regex}) - file(INSTALL ${_files} DESTINATION ${target_dir}) -endmacro() - -_install_module_file(${DEBUG_DIR}/debug - ${CURRENT_PACKAGES_DIR}/debug/lib - "qcustomplotd[2]*\.(lib|a)$") - -_install_module_file(${RELEASE_DIR}/release - ${CURRENT_PACKAGES_DIR}/lib - "qcustomplot[2]*\.(lib|a)$") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL - ${DEBUG_DIR}/debug/qcustomplotd2.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - - file(INSTALL - ${RELEASE_DIR}/release/qcustomplot2.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) -endif() - vcpkg_copy_pdbs() # Handle copyright diff --git a/ports/qcustomplot/vcpkg.json b/ports/qcustomplot/vcpkg.json new file mode 100644 index 00000000000000..6d2c2c66533708 --- /dev/null +++ b/ports/qcustomplot/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qcustomplot", + "version": "2.0.1", + "port-version": 5, + "description": "QCustomPlot is a Qt C++ widget for plotting and data visualization.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL deleted file mode 100644 index 67812997bac70a..00000000000000 --- a/ports/qhull/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qhull -Version: 7.3.2-1 -Homepage: https://github.com/qhull/qhull -Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/qhull/fix-missing-symbols.patch b/ports/qhull/fix-missing-symbols.patch new file mode 100644 index 00000000000000..a1e0b6ecfe5fc2 --- /dev/null +++ b/ports/qhull/fix-missing-symbols.patch @@ -0,0 +1,29 @@ +From 02ba907908ccf5ed0d40a2251272b67cb05c23ea Mon Sep 17 00:00:00 2001 +From: Francisco Facioni +Date: Sat, 31 Jul 2021 22:30:45 +0100 +Subject: [PATCH] Missing symbols in the export + +--- + src/libqhull_r/qhull_r-exports.def | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libqhull_r/qhull_r-exports.def b/src/libqhull_r/qhull_r-exports.def +index 4c5e17c..b789673 100644 +--- a/src/libqhull_r/qhull_r-exports.def ++++ b/src/libqhull_r/qhull_r-exports.def +@@ -183,6 +183,7 @@ qh_maxouter + qh_maxsimplex + qh_maydropneighbor + qh_memalloc ++qh_memcheck + qh_memfree + qh_memfreeshort + qh_meminit +@@ -351,6 +352,7 @@ qh_setdelnth + qh_setdelnthsorted + qh_setdelsorted + qh_setduplicate ++qh_setendpointer + qh_setequal + qh_setequal_except + qh_setequal_skip diff --git a/ports/qhull/include-qhullcpp-shared.patch b/ports/qhull/include-qhullcpp-shared.patch new file mode 100644 index 00000000000000..cbf5eaa66ae94e --- /dev/null +++ b/ports/qhull/include-qhullcpp-shared.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f50b187..30109b3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -344,7 +344,7 @@ set(qhull_SHAREDP qhull_p) # libqhull and qhull_p are deprecated, use qhull_r i + + set(qhull_TARGETS_APPLICATIONS qhull rbox qconvex qdelaunay qvoronoi qhalf) + set(qhull_TARGETS_STATIC ${qhull_CPP} ${qhull_STATIC} ${qhull_STATICR}) +-set(qhull_TARGETS_SHARED ${qhull_SHAREDR}) ++set(qhull_TARGETS_SHARED ${qhull_CPP} ${qhull_SHAREDR}) + + set( + qhull_TARGETS_TEST # Unused +@@ -474,7 +474,6 @@ set_target_properties(${qhull_CPP} PROPERTIES + if(NOT ${BUILD_STATIC_LIBS}) + set_target_properties(${qhull_STATIC} PROPERTIES EXCLUDE_FROM_ALL TRUE) + set_target_properties(${qhull_STATICR} PROPERTIES EXCLUDE_FROM_ALL TRUE) +- set_target_properties(${qhull_CPP} PROPERTIES EXCLUDE_FROM_ALL TRUE) + endif() + if(NOT ${BUILD_SHARED_LIBS}) + set_target_properties(${qhull_SHARED} PROPERTIES EXCLUDE_FROM_ALL TRUE) diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake index ade241dc8ad2ca..5584c7b1926e04 100644 --- a/ports/qhull/portfile.cmake +++ b/ports/qhull/portfile.cmake @@ -1,67 +1,59 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO qhull/qhull - REF v7.3.2 # Qhull 2019.1 - SHA512 aea2c70179de10f648aba960129a3b9a3fe309a0eb085bdb86f697e3d4b214570c241e88d4f0b4d2974137759ee7086452d0a3957c4b2a256708402fb3c9eb3d + REF 613debeaea72ee66626dace9ba1a2eff11b5d37d + SHA512 5b8ff9665ba73621a9859a6e86717b980b67f8d79d6c78cbf5672bce66aed671f7d64fcbec457bca79eef2e17e105f136017afdf442bb430b9f4a059d7cb93c3 HEAD_REF master - PATCHES uwp.patch -) -if(${TARGET_TRIPLET} STREQUAL "x64-windows-static") -# workaround for visual studio toolset regression LNK1201 (remove if solved) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include - -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - OPTIONS_RELEASE - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib - OPTIONS_DEBUG - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib + PATCHES + include-qhullcpp-shared.patch + fix-missing-symbols.patch # upstream https://github.com/qhull/qhull/pull/93 ) -else() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include - -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - OPTIONS_RELEASE - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib - OPTIONS_DEBUG - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib + OPTIONS + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} ) -endif() vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Qhull) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(GLOB_RECURSE HTMFILES ${CURRENT_PACKAGES_DIR}/include/*.htm) -file(REMOVE ${HTMFILES}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) - -file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qhull) -if(EXEFILES_RELEASE OR EXEFILES_DEBUG) - file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) -endif() +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/share/man + ${CURRENT_PACKAGES_DIR}/share/doc + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share/man + ${CURRENT_PACKAGES_DIR}/debug/share/doc +) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Qhull) +file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/qhullstatic.pc + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/qhullstatic_d.pc +) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_d.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_p.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_pd.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_rd.lib) + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/qhull_r.pc + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/qhull_rd.pc + ) else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullcpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullcpp_d.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullstatic_d.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullstatic_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullstatic_rd.lib) + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/qhullstatic_r.pc + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/qhullstatic_rd.pc + ) endif() +vcpkg_fixup_pkgconfig() + +vcpkg_copy_tools(TOOL_NAMES + qconvex + qdelaunay + qhalf + qhull + qvoronoi + rbox + AUTO_CLEAN +) -file(COPY ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/qhull) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/qhull/README.txt ${CURRENT_PACKAGES_DIR}/share/qhull/copyright) +file(INSTALL ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/qhull/uwp.patch b/ports/qhull/uwp.patch deleted file mode 100644 index 98c74564efdda2..00000000000000 --- a/ports/qhull/uwp.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/libqhull/global.c b/src/libqhull/global.c -index e7de8e6..81be9df 100644 ---- a/src/libqhull/global.c -+++ b/src/libqhull/global.c -@@ -636,7 +636,7 @@ void qh_init_qhull_command(int argc, char *argv[]) { - */ - void qh_initflags(char *command) { - int k, i, lastproject; -- char *s= command, *t, *prev_s, *start, key, *lastwarning= NULL; -+ char *s= command, *t = NULL, *prev_s, *start, key, *lastwarning= NULL; - boolT isgeom= False, wasproject; - realT r; - -diff --git a/src/libqhull_r/global_r.c b/src/libqhull_r/global_r.c -index 3e6919f..8d13e47 100644 ---- a/src/libqhull_r/global_r.c -+++ b/src/libqhull_r/global_r.c -@@ -610,7 +610,7 @@ void qh_init_qhull_command(qhT *qh, int argc, char *argv[]) { - */ - void qh_initflags(qhT *qh, char *command) { - int k, i, lastproject; -- char *s= command, *t, *prev_s, *start, key, *lastwarning= NULL; -+ char *s= command, *t = NULL, *prev_s, *start, key, *lastwarning= NULL; - boolT isgeom= False, wasproject; - realT r; - diff --git a/ports/qhull/vcpkg.json b/ports/qhull/vcpkg.json new file mode 100644 index 00000000000000..b115f1331af5ef --- /dev/null +++ b/ports/qhull/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "qhull", + "version-string": "8.0.2", + "port-version": 2, + "description": "computes the convex hull, Delaunay triangulation, Voronoi diagram", + "homepage": "https://github.com/qhull/qhull" +} diff --git a/ports/qnnpack/portfile.cmake b/ports/qnnpack/portfile.cmake new file mode 100644 index 00000000000000..271bd11ca3b21c --- /dev/null +++ b/ports/qnnpack/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_fail_port_install(ON_TARGET "Windows") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pytorch/QNNPACK + REF 7d2a4e9931a82adc3814275b6219a03e24e36b4c + SHA512 437a835acfedae851a9a8572fa6eea9854dcb8bcca499bc4a2582314e44f5f199778e857932da4aecf943bea7cb2eb5b1c41d4b4ca6075bddbe0f18b2c7b9127 + HEAD_REF master + PATCHES + use-packages.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DQNNPACK_BUILD_TESTS=OFF + -DQNNPACK_BUILD_BENCHMARKS=OFF +) +vcpkg_cmake_install() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/bin +) diff --git a/ports/qnnpack/use-packages.patch b/ports/qnnpack/use-packages.patch new file mode 100644 index 00000000000000..33456516261ef0 --- /dev/null +++ b/ports/qnnpack/use-packages.patch @@ -0,0 +1,187 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a5ddc49..05e1279 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,8 +13,6 @@ PROJECT(QNNPACK C CXX ASM) + + # ---[ Options. + OPTION(QNNPACK_CUSTOM_THREADPOOL "Build QNNPACK for custom thread pool" OFF) +-SET(QNNPACK_LIBRARY_TYPE "default" CACHE STRING "Type of library (shared, static, or default) to build") +-SET_PROPERTY(CACHE QNNPACK_LIBRARY_TYPE PROPERTY STRINGS default static shared) + OPTION(QNNPACK_BUILD_TESTS "Build QNNPACK unit tests" ON) + OPTION(QNNPACK_BUILD_BENCHMARKS "Build QNNPACK benchmarks" ON) + +@@ -53,11 +51,11 @@ SET(CONFU_DEPENDENCIES_SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps" + SET(CONFU_DEPENDENCIES_BINARY_DIR "${CMAKE_BINARY_DIR}/deps" + CACHE PATH "Confu-style dependencies binary directory") + +-IF(NOT DEFINED CLOG_SOURCE_DIR) ++IF(FALSE) + SET(CLOG_SOURCE_DIR "${PROJECT_SOURCE_DIR}/deps/clog") + ENDIF() + +-IF(NOT DEFINED CPUINFO_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading cpuinfo to ${CONFU_DEPENDENCIES_SOURCE_DIR}/cpuinfo (define CPUINFO_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadCpuinfo.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -67,7 +65,7 @@ IF(NOT DEFINED CPUINFO_SOURCE_DIR) + SET(CPUINFO_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/cpuinfo" CACHE STRING "cpuinfo source directory") + ENDIF() + +-IF(NOT DEFINED FP16_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading FP16 to ${CONFU_DEPENDENCIES_SOURCE_DIR}/fp16 (define FP16_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadFP16.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -77,7 +75,7 @@ IF(NOT DEFINED FP16_SOURCE_DIR) + SET(FP16_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/fp16" CACHE STRING "FP16 source directory") + ENDIF() + +-IF(NOT DEFINED FXDIV_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading FXdiv to ${CONFU_DEPENDENCIES_SOURCE_DIR}/fxdiv (define FXDIV_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadFXdiv.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -87,7 +85,7 @@ IF(NOT DEFINED FXDIV_SOURCE_DIR) + SET(FXDIV_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/fxdiv" CACHE STRING "FXdiv source directory") + ENDIF() + +-IF(NOT DEFINED PSIMD_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading PSimd to ${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd (define PSIMD_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -97,7 +95,7 @@ IF(NOT DEFINED PSIMD_SOURCE_DIR) + SET(PSIMD_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd" CACHE STRING "PSimd source directory") + ENDIF() + +-IF(NOT DEFINED PTHREADPOOL_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading pthreadpool to ${CONFU_DEPENDENCIES_SOURCE_DIR}/pthreadpool (define PTHREADPOOL_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadPThreadPool.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/pthreadpool-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -107,7 +105,7 @@ IF(NOT DEFINED PTHREADPOOL_SOURCE_DIR) + SET(PTHREADPOOL_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/pthreadpool" CACHE STRING "pthreadpool source directory") + ENDIF() + +-IF(QNNPACK_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -117,7 +115,7 @@ IF(QNNPACK_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR) + SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory") + ENDIF() + +-IF(QNNPACK_BUILD_BENCHMARKS AND NOT DEFINED GOOGLEBENCHMARK_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading Google Benchmark to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark (define GOOGLEBENCHMARK_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleBenchmark.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -229,15 +227,7 @@ IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i[3-6]86|x86_64)$" OR IOS_ARCH MATCHES "^(i + LIST(APPEND QNNPACK_UKERNELS ${QNNPACK_X86_SSE2_UKERNELS}) + ENDIF() + +-IF(QNNPACK_LIBRARY_TYPE STREQUAL "default") +- ADD_LIBRARY(qnnpack ${QNNPACK_INIT_SRCS} ${QNNPACK_EXEC_SRCS} ${QNNPACK_UKERNELS}) +-ELSEIF(QNNPACK_LIBRARY_TYPE STREQUAL "shared") +- ADD_LIBRARY(qnnpack SHARED ${QNNPACK_INIT_SRCS} ${QNNPACK_EXEC_SRCS} ${QNNPACK_UKERNELS}) +-ELSEIF(QNNPACK_LIBRARY_TYPE STREQUAL "static") +- ADD_LIBRARY(qnnpack STATIC ${QNNPACK_INIT_SRCS} ${QNNPACK_EXEC_SRCS} ${QNNPACK_UKERNELS}) +-ELSE() +- MESSAGE(FATAL_ERROR "Unsupported QNNPACK library type \"${QNNPACK_LIBRARY_TYPE}\". Must be \"static\", \"shared\", or \"default\"") +-ENDIF() ++ADD_LIBRARY(qnnpack ${QNNPACK_INIT_SRCS} ${QNNPACK_EXEC_SRCS} ${QNNPACK_UKERNELS}) + SET_TARGET_PROPERTIES(qnnpack PROPERTIES + C_STANDARD 99 + C_EXTENSIONS YES) +@@ -272,7 +262,7 @@ TARGET_INCLUDE_DIRECTORIES(qnnpack PRIVATE src) + SET_TARGET_PROPERTIES(qnnpack PROPERTIES PUBLIC_HEADER include/qnnpack.h) + + # ---[ Configure clog +-IF(NOT TARGET clog) ++IF(FALSE) + SET(CLOG_BUILD_TESTS OFF CACHE BOOL "") + SET(CLOG_RUNTIME_TYPE "${CPUINFO_RUNTIME_TYPE}" CACHE STRING "") + ADD_SUBDIRECTORY( +@@ -281,10 +271,9 @@ IF(NOT TARGET clog) + # We build static version of clog but a dynamic library may indirectly depend on it + SET_PROPERTY(TARGET clog PROPERTY POSITION_INDEPENDENT_CODE ON) + ENDIF() +-TARGET_LINK_LIBRARIES(qnnpack PRIVATE clog) + + # ---[ Configure cpuinfo +-IF(NOT TARGET cpuinfo) ++IF(FALSE) + SET(CPUINFO_BUILD_TOOLS OFF CACHE BOOL "") + SET(CPUINFO_BUILD_UNIT_TESTS OFF CACHE BOOL "") + SET(CPUINFO_BUILD_MOCK_TESTS OFF CACHE BOOL "") +@@ -293,17 +282,19 @@ IF(NOT TARGET cpuinfo) + "${CPUINFO_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo") + ENDIF() +-TARGET_LINK_LIBRARIES(qnnpack PRIVATE cpuinfo) ++ ++find_package(unofficial-cpuinfo CONFIG REQUIRED) ++target_link_libraries(qnnpack PUBLIC unofficial::cpuinfo::clog unofficial::cpuinfo::cpuinfo) + + # ---[ Configure pthreadpool +-IF(NOT TARGET pthreadpool) ++IF(FALSE) + SET(PTHREADPOOL_BUILD_TESTS OFF CACHE BOOL "") + SET(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( + "${PTHREADPOOL_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/pthreadpool") + ENDIF() +-IF(QNNPACK_CUSTOM_THREADPOOL) ++IF(FALSE) + # Depend on pthreadpool interface, but not on implementation. + # This is used when QNNPACK user (e.g. Caffe2) provides its own threadpool implementation. + TARGET_LINK_LIBRARIES(qnnpack PUBLIC pthreadpool_interface) +@@ -312,34 +303,38 @@ ELSE() + ENDIF() + + # ---[ Configure FXdiv +-IF(NOT TARGET fxdiv) ++IF(FALSE) + SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "") + SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( + "${FXDIV_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv") + ENDIF() +-TARGET_LINK_LIBRARIES(qnnpack PRIVATE fxdiv) ++find_path(FXDIV_INCLUDE_DIRS "fxdiv.h") ++target_include_directories(qnnpack PRIVATE ${FXDIV_INCLUDE_DIRS}) + + # ---[ Configure psimd +-IF(NOT TARGET psimd) ++IF(FALSE) + ADD_SUBDIRECTORY( + "${PSIMD_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd") + ENDIF() +-TARGET_LINK_LIBRARIES(qnnpack PRIVATE psimd) ++find_path(PSIMD_INCLUDE_DIRS "psimd.h") ++target_include_directories(qnnpack PRIVATE ${PSIMD_INCLUDE_DIRS}) + + # ---[ Configure FP16 +-IF(NOT TARGET fp16) ++IF(FALSE) + SET(FP16_BUILD_TESTS OFF CACHE BOOL "") + SET(FP16_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( + "${FP16_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16") + ENDIF() +-TARGET_LINK_LIBRARIES(qnnpack PRIVATE fp16) ++find_path(FP16_INCLUDE_DIRS "fp16.h") ++target_include_directories(qnnpack PRIVATE ${FP16_INCLUDE_DIRS}) + + INSTALL(TARGETS qnnpack ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/ports/qnnpack/vcpkg.json b/ports/qnnpack/vcpkg.json new file mode 100644 index 00000000000000..20b4aa0e3ab5eb --- /dev/null +++ b/ports/qnnpack/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "qnnpack", + "version-date": "2021-02-26", + "description": "Quantized Neural Network PACKage - mobile-optimized implementation of quantized neural network operators", + "homepage": "https://github.com/pytorch/QNNPACK", + "supports": "linux | osx", + "dependencies": [ + "cpuinfo", + "fp16", + "fxdiv", + "psimd", + "pthreadpool", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/qpid-proton/CONTROL b/ports/qpid-proton/CONTROL deleted file mode 100644 index 8544cb959169dc..00000000000000 --- a/ports/qpid-proton/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: qpid-proton -Version: 0.28.0 -Build-Depends: openssl (!windows&!uwp), libuv (osx), jsoncpp -Homepage: https://github.com/apache/qpid-proton -Description: Qpid Proton is a high-performance, lightweight messaging library. \ No newline at end of file diff --git a/ports/qpid-proton/portfile.cmake b/ports/qpid-proton/portfile.cmake index 53aebeb0c673f3..e8a91146259f1a 100644 --- a/ports/qpid-proton/portfile.cmake +++ b/ports/qpid-proton/portfile.cmake @@ -1,14 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) -vcpkg_find_acquire_program(PYTHON2) +vcpkg_find_acquire_program(PYTHON3) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/qpid-proton - REF 0.28.0 - SHA512 dc253218a076ea56d64e0aaeb6ef9e7345bb9ac700c58b8ea6cb9b3c79d66b0667bcc62cbb45f9ce3455fa8f97b7dfb1c2096d269d1b5b9c5c650ef61a126cfe + REF dc244b1f7e886883a2bb416407f42ba55d0f5f42 # 0.32.0 + SHA512 19f191dd206fd43a8f5b8db95f6ada57bd60b93eb907cf32f463c23cfe8c5f4914c6f4750ebde50c970387fb62baf4451279803eeb000bc8bb5c200692e5d1d7 HEAD_REF next ) @@ -16,7 +14,11 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DPYTHON_EXECUTABLE=${PYTHON2} + -DPYTHON_EXECUTABLE=${PYTHON3} + -DLIB_SUFFIX= + -DBUILD_GO=no + -DBUILD_RUBY=no + -DBUILD_PYTHON=no -DENABLE_JSONCPP=ON -DCMAKE_DISABLE_FIND_PACKAGE_CyrusSASL=ON ) @@ -40,4 +42,8 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE ${CURRENT_PACKAGES_DIR}/share/qpid-proton/CMakeLists.txt) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qpid-proton/tests) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qpid-proton/examples) diff --git a/ports/qpid-proton/vcpkg.json b/ports/qpid-proton/vcpkg.json new file mode 100644 index 00000000000000..04bbec9af06e39 --- /dev/null +++ b/ports/qpid-proton/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "qpid-proton", + "version-string": "0.32.0", + "port-version": 1, + "description": "Qpid Proton is a high-performance, lightweight messaging library.", + "homepage": "https://github.com/apache/qpid-proton", + "dependencies": [ + "jsoncpp", + { + "name": "libuv", + "platform": "osx" + }, + { + "name": "openssl", + "platform": "!windows & !uwp" + } + ] +} diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL deleted file mode 100644 index ee8a7be2f18f80..00000000000000 --- a/ports/qscintilla/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: qscintilla -Version: 2.10-8 -Homepage: https://sourceforge.net/projects/pyqt -Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) -Build-Depends: qt5-base, qt5-macextras (osx), qt5-winextras (windows) diff --git a/ports/qscintilla/fix-static.patch b/ports/qscintilla/fix-static.patch new file mode 100644 index 00000000000000..1c0569d47d4309 --- /dev/null +++ b/ports/qscintilla/fix-static.patch @@ -0,0 +1,29 @@ +diff --git a/src/qscintilla.pro b/src/qscintilla.pro +index 8d0acd2..2246442 100644 +--- a/src/qscintilla.pro ++++ b/src/qscintilla.pro +@@ -37,13 +37,13 @@ CONFIG(debug, debug|release) { + TARGET = qscintilla2_qt$${QT_MAJOR_VERSION} + } + +-macx:!CONFIG(staticlib) { ++macx:!CONFIG(static) { + QMAKE_POST_LINK += install_name_tool -id @rpath/$(TARGET1) $(TARGET) + } + + INCLUDEPATH += . ../scintilla/include ../scintilla/lexlib ../scintilla/src + +-!CONFIG(staticlib) { ++!CONFIG(static) { + DEFINES += QSCINTILLA_MAKE_DLL + } + DEFINES += SCINTILLA_QT SCI_LEXER INCLUDE_DEPRECATED_FEATURES +@@ -82,7 +82,7 @@ qsci.files = ../qsci + INSTALLS += qsci + + features.path = $$[QT_HOST_DATA]/mkspecs/features +-CONFIG(staticlib) { ++CONFIG(static) { + features.files = $$PWD/features_staticlib/qscintilla2.prf + } else { + features.files = $$PWD/features/qscintilla2.prf diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index 8e241cfef12014..e239dcc375bdab 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -1,60 +1,50 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/QScintilla_gpl-2.10) vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10/QScintilla_gpl-2.10.zip" - FILENAME "QScintilla_gpl-2.10.zip" - SHA512 7c580cfee03af1056f530af756a0ff9cc2396a5419fa23aecc66a6bc8809a4fb154788956220bb0b068a5c214d571c053271c3906d6d541196fbbf7c6dbec917 + URLS "https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.12.0/QScintilla_src-2.12.0.tar.gz" + FILENAME "QScintilla-2.12.0.tar.gz" + SHA512 9bdaba5c33c1b11ccad83eb1fda72142758afc50c955a62d5a8ff102b41d4b67d897bf96ce0540e16bc5a7fae2ce1acbf06931d5f0ae6768759c9ff072c03daa +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-static.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_find_acquire_program(PYTHON3) # Add python3 to path -get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY) -vcpkg_add_to_path(PREPEND ${PYTHON_PATH}) -vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/bin) -vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/debug/bin) - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_PATH}) vcpkg_configure_qmake( - SOURCE_PATH ${SOURCE_PATH}/Qt4Qt5 + SOURCE_PATH ${SOURCE_PATH}/src OPTIONS CONFIG+=build_all CONFIG-=hide_symbols DEFINES+=SCI_NAMESPACE ) -if(CMAKE_HOST_WIN32) - vcpkg_build_qmake( +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_install_qmake( RELEASE_TARGETS release DEBUG_TARGETS debug ) else() - vcpkg_build_qmake() + vcpkg_install_qmake() endif() -file(GLOB HEADER_FILES ${SOURCE_PATH}/Qt4Qt5/Qsci/*) +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/Qsci/*) file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) -if(CMAKE_HOST_WIN32) - configure_file(${RELEASE_DIR}/release/qscintilla2_qt5.lib ${CURRENT_PACKAGES_DIR}/lib/qscintilla2.lib COPYONLY) - configure_file(${DEBUG_DIR}/debug/qscintilla2_qt5.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qscintilla2.lib COPYONLY) - - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY ${RELEASE_DIR}/release/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${DEBUG_DIR}/debug/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - endif() -elseif(CMAKE_HOST_APPLE) - configure_file(${RELEASE_DIR}/libqscintilla2_qt5.a ${CURRENT_PACKAGES_DIR}/lib/libqscintilla2.a COPYONLY) - configure_file(${DEBUG_DIR}/libqscintilla2_qt5.a ${CURRENT_PACKAGES_DIR}/debug/lib/libqscintilla2.a COPYONLY) +if (VCPKG_TARGET_IS_WINDOWS AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/Qsci/qsciglobal.h + "#if defined(QSCINTILLA_DLL)" + "#if 1" + ) endif() - vcpkg_copy_pdbs() # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/qscintilla) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/qscintilla/LICENSE ${CURRENT_PACKAGES_DIR}/share/qscintilla/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/qscintilla/vcpkg.json b/ports/qscintilla/vcpkg.json new file mode 100644 index 00000000000000..8e822764c2448e --- /dev/null +++ b/ports/qscintilla/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "qscintilla", + "version": "2.12.0", + "port-version": 1, + "description": "QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin)", + "homepage": "https://www.riverbankcomputing.com/software/qscintilla", + "supports": "!(windows & (arm | arm64))", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + { + "name": "qt5-macextras", + "platform": "osx" + }, + { + "name": "qt5-winextras", + "platform": "windows" + } + ] +} diff --git a/ports/qt-advanced-docking-system/config_changes.patch b/ports/qt-advanced-docking-system/config_changes.patch new file mode 100644 index 00000000000000..3ee543de47f8cc --- /dev/null +++ b/ports/qt-advanced-docking-system/config_changes.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 0bd721d..4848c5f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -52,7 +52,7 @@ if (UNIX) + set(ads_SRCS linux/FloatingWidgetTitleBar.cpp ${ads_SRCS}) + set(ads_HEADERS linux/FloatingWidgetTitleBar.h ${ads_HEADERS}) + endif() +-if(BUILD_STATIC) ++if(NOT BUILD_SHARED_LIBS) + add_library(qtadvanceddocking STATIC ${ads_SRCS} ${ads_HEADERS}) + target_compile_definitions(qtadvanceddocking PUBLIC ADS_STATIC) + else() diff --git a/ports/qt-advanced-docking-system/hardcode_version.patch b/ports/qt-advanced-docking-system/hardcode_version.patch new file mode 100644 index 00000000000000..f5fc9caf8329b7 --- /dev/null +++ b/ports/qt-advanced-docking-system/hardcode_version.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 94fdb8d..6febea2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,6 @@ + cmake_minimum_required(VERSION 3.5) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) +-include(GetGitRevisionDescription) +-git_describe(GitTagVersion --tags) +-string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GitTagVersion}") +-string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GitTagVersion}") +-string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GitTagVersion}") +-set(VERSION_SHORT "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") ++ + project(QtADS LANGUAGES CXX VERSION ${VERSION_SHORT}) + option(BUILD_STATIC "Build the static library" OFF) + option(BUILD_EXAMPLES "Build the examples" ON) diff --git a/ports/qt-advanced-docking-system/portfile.cmake b/ports/qt-advanced-docking-system/portfile.cmake new file mode 100644 index 00000000000000..a464049ec76ab2 --- /dev/null +++ b/ports/qt-advanced-docking-system/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO githubuser0xFFFF/Qt-Advanced-Docking-System + REF 44dc76bd19853dcb18d37d5be231af526c8f709e #v3.6.3 + SHA512 ff50cd65f82736eae90f823d332d63c5c024ecb9e510f95fb8d776a0763bbd0143094b789516193c4037ca2a82eba33d73a68193bb6777e285c8a1e397b3958c + HEAD_REF master + PATCHES + hardcode_version.patch + config_changes.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DVERSION_SHORT=3.6.3 +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/gnu-lgpl-v2.1.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/license) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/qtadvanceddocking TARGET_PATH share/qtadvanceddocking) diff --git a/ports/qt-advanced-docking-system/vcpkg.json b/ports/qt-advanced-docking-system/vcpkg.json new file mode 100644 index 00000000000000..ae8fe0ff68edb8 --- /dev/null +++ b/ports/qt-advanced-docking-system/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "qt-advanced-docking-system", + "version-string": "3.6.3", + "port-version": 2, + "description": "Create customizable layouts using an advanced window docking system similar to what is found in many popular IDEs such as Visual Studio", + "homepage": "https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System", + "dependencies": [ + "bzip2", + { + "name": "qt5-base", + "default-features": false + }, + { + "name": "qt5-x11extras", + "platform": "!windows" + }, + "zlib" + ] +} diff --git a/ports/qt/portfile.cmake b/ports/qt/portfile.cmake new file mode 100644 index 00000000000000..9aefc82414d125 --- /dev/null +++ b/ports/qt/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt/vcpkg.json b/ports/qt/vcpkg.json new file mode 100644 index 00000000000000..a0baa9d187e86d --- /dev/null +++ b/ports/qt/vcpkg.json @@ -0,0 +1,50 @@ +{ + "name": "qt", + "version-semver": "6.1.3", + "description": "Qt", + "homepage": "https://www.qt.io/", + "dependencies": [ + "qt5compat", + { + "name": "qtbase", + "default-features": false + }, + "qtcharts", + "qtcoap", + "qtdatavis3d", + "qtdeclarative", + "qtdoc", + "qtimageformats", + "qtlottie", + "qtmqtt", + "qtnetworkauth", + "qtopcua", + "qtquick3d", + "qtquickcontrols2", + "qtquicktimeline", + "qtscxml", + "qtshadertools", + "qtsvg", + "qttools", + "qttranslations", + "qtvirtualkeyboard" + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features", + "dependencies": [ + { + "name": "qtactiveqt", + "platform": "windows" + }, + { + "name": "qtwayland", + "platform": "linux" + } + ] + } + } +} diff --git a/ports/qt5-3d/CONTROL b/ports/qt5-3d/CONTROL deleted file mode 100644 index 0dfbdb027c8de3..00000000000000 --- a/ports/qt5-3d/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-3d -Version: 5.12.3-1 -Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-3d/portfile.cmake b/ports/qt5-3d/portfile.cmake index 444fbbcf2a0b53..62a01e4de459a9 100644 --- a/ports/qt5-3d/portfile.cmake +++ b/ports/qt5-3d/portfile.cmake @@ -1,5 +1,56 @@ -include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) +set(OPTIONS -system-assimp) -qt_modular_library(qt3d 679c2dbc60fc53c1c5469369f25244bd844c2e6e723a1b451f7cbb50bfa018e6fb715214e5a5df6fb32d7c7936bb6c99d85e299fe2b76344bcf774c93ed0acd0) +if(VCPKG_TARGET_IS_WINDOWS) + set(VCVER vc140 vc141 vc142 ) + set(CRT mt md) + set(DBG_NAMES) + set(REL_NAMES) + foreach(_ver IN LISTS VCVER) + foreach(_crt IN LISTS CRT) + list(APPEND DBG_NAMES assimp-${_ver}-${_crt}d) + list(APPEND REL_NAMES assimp-${_ver}-${_crt}) + endforeach() + endforeach() +endif() + +find_library(ASSIMP_REL NAMES assimp ${REL_NAMES} PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ASSIMP_DBG NAMES assimp assimpd ${DBG_NAMES} PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +find_library(MINIZIP_REL NAMES minizip PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(MINIZIP_DBG NAMES minizip minizipd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(KUBAZIP_REL NAMES kubazip PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(KUBAZIP_DBG NAMES kubazip kubazipd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(JPEG_REL NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(JPEG_DBG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(LIBPNG_REL NAMES png16 libpng16 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) #Depends on zlib +find_library(LIBPNG_DBG NAMES png16 png16d libpng16 libpng16d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(ZLIB_REL NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ZLIB_DBG NAMES z zlib zd zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(IRRLICHT_REL NAMES Irrlicht PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(IRRLICHT_DBG NAMES Irrlicht PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(POLYCLIPPING_REL NAMES polyclipping PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(POLYCLIPPING_DBG NAMES polyclipping polyclippingd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(POLY2TRI_REL NAMES poly2tri PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(POLY2TRI_DBG NAMES poly2tri poly2trid PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +# poly2tri +find_library(BZ2_REL bz2 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(BZ2_DBG bz2 bz2d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +if(BZ2_REL) + string(APPEND MINIZIP_REL " ${BZ2_REL}") +endif() +if(BZ2_DBG) + string(APPEND MINIZIP_DBG " ${BZ2_DBG}") +endif() +if(VCPKG_TARGET_IS_WINDOWS) + set(SYSTEM_LIBS "Advapi32.lib user32.lib gdi32.lib") +elseif(VCPKG_TARGET_IS_OSX) + set(SYSTEM_LIBS "-framework OpenGL -framework Cocoa -framework Carbon -framework IOKit -framework AppKit") +else() + set(SYSTEM_LIBS "-lGL -lXxf86vm -lX11") +endif() +set(OPT_REL "ASSIMP_LIBS=${ASSIMP_REL} ${POLYCLIPPING_REL} ${POLY2TRI_REL} ${IRRLICHT_REL} ${JPEG_REL} ${LIBPNG_REL} ${KUBAZIP_REL} ${MINIZIP_REL} ${ZLIB_REL} ${SYSTEM_LIBS}") +set(OPT_DBG "ASSIMP_LIBS=${ASSIMP_DBG} ${POLYCLIPPING_DBG} ${POLY2TRI_DBG} ${IRRLICHT_DBG} ${JPEG_DBG} ${LIBPNG_DBG} ${KUBAZIP_DBG} ${MINIZIP_DBG} ${ZLIB_DBG} ${SYSTEM_LIBS}") + +qt_submodule_installation(BUILD_OPTIONS ${OPTIONS} BUILD_OPTIONS_RELEASE ${OPT_REL} BUILD_OPTIONS_DEBUG ${OPT_DBG}) diff --git a/ports/qt5-3d/vcpkg.json b/ports/qt5-3d/vcpkg.json new file mode 100644 index 00000000000000..ea4f27ee834f1f --- /dev/null +++ b/ports/qt5-3d/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "qt5-3d", + "version-string": "5.15.2", + "port-version": 2, + "description": "Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering", + "dependencies": [ + "assimp", + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-gamepad", + "qt5-imageformats" + ] +} diff --git a/ports/qt5-activeqt/CONTROL b/ports/qt5-activeqt/CONTROL deleted file mode 100644 index e2084f0468fdac..00000000000000 --- a/ports/qt5-activeqt/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-activeqt -Version: 5.12.3-1 -Description: Qt5 ActiveQt Module - ActiveX components -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-activeqt/portfile.cmake b/ports/qt5-activeqt/portfile.cmake index 40c4875d92806b..a73a605512c32c 100644 --- a/ports/qt5-activeqt/portfile.cmake +++ b/ports/qt5-activeqt/portfile.cmake @@ -1,11 +1,6 @@ -include(vcpkg_common_functions) - if (NOT VCPKG_TARGET_IS_WINDOWS) message(FATAL_ERROR "qt5-activeqt only support Windows.") endif() -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtactiveqt 477c42653a59739aeeb17ab54bdd5cc50bc72a117250926e940c34d3f81d1b92356074056fb49f3cd811a88840377836b2d97cea8cbc62ae1d895168e7860753) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-activeqt/plugins/platforminputcontexts) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-activeqt/vcpkg.json b/ports/qt5-activeqt/vcpkg.json new file mode 100644 index 00000000000000..05dd52842bc86a --- /dev/null +++ b/ports/qt5-activeqt/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "qt5-activeqt", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 ActiveQt Module - ActiveX components", + "supports": "windows", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-androidextras/portfile.cmake b/ports/qt5-androidextras/portfile.cmake new file mode 100644 index 00000000000000..214726759f3cf1 --- /dev/null +++ b/ports/qt5-androidextras/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-androidextras/vcpkg.json b/ports/qt5-androidextras/vcpkg.json new file mode 100644 index 00000000000000..12024cbd29872a --- /dev/null +++ b/ports/qt5-androidextras/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-androidextras", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 androidextras Module;", + "supports": "android", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL deleted file mode 100644 index 853215dc429693..00000000000000 --- a/ports/qt5-base/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: qt5-base -Version: 5.12.3-3 -Homepage: https://www.qt.io/ -Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. -Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl diff --git a/ports/qt5-base/cmake/configure_qt.cmake b/ports/qt5-base/cmake/configure_qt.cmake new file mode 100644 index 00000000000000..ea62b744a2874e --- /dev/null +++ b/ports/qt5-base/cmake/configure_qt.cmake @@ -0,0 +1,151 @@ +function(configure_qt) + cmake_parse_arguments(_csc "" "SOURCE_PATH;TARGET_PLATFORM;HOST_PLATFORM;HOST_TOOLS_ROOT" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + + if(NOT _csc_TARGET_PLATFORM) + message(FATAL_ERROR "configure_qt requires a TARGET_PLATFORM argument.") + endif() + + if(DEFINED _csc_HOST_PLATFORM) + list(APPEND _csc_OPTIONS -platform ${_csc_HOST_PLATFORM}) + endif() + + if(DEFINED _csc_HOST_TOOLS_ROOT) + ## vcpkg internal file struture assumed here! + message(STATUS "Building Qt with prepared host tools from ${_csc_HOST_TOOLS_ROOT}!") + vcpkg_add_to_path("${_csc_HOST_TOOLS_ROOT}/bin") + vcpkg_add_to_path("${_csc_HOST_TOOLS_ROOT}") + set(EXT_BIN_DIR -external-hostbindir ${_csc_HOST_TOOLS_ROOT}/bin) # we only use release binaries for building + find_program(QMAKE_COMMAND NAMES qmake PATHS ${_csc_HOST_TOOLS_ROOT}/bin NO_DEFAULT_PATH) + set(INVOKE "${QMAKE_COMMAND}" ) + else() + if(CMAKE_HOST_WIN32) + set(CONFIGURE_BAT "configure.bat") + else() + set(CONFIGURE_BAT "configure") + endif() + set(INVOKE "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}") + endif() + + #Cleanup previous build folders + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + #Find and ad Perl to PATH + vcpkg_find_acquire_program(PERL) + get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) + vcpkg_add_to_path("${PERL_EXE_PATH}") + + if("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static") + list(APPEND _csc_OPTIONS -static) + else() + #list(APPEND _csc_OPTIONS_DEBUG -separate-debug-info) + endif() + + if(VCPKG_TARGET_IS_WINDOWS AND "${VCPKG_CRT_LINKAGE}" STREQUAL "static") + list(APPEND _csc_OPTIONS -static-runtime) + endif() + + list(APPEND _csc_OPTIONS_RELEASE -release) + list(APPEND _csc_OPTIONS_DEBUG -debug) + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + set(_build_type_${_buildname} "debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + set(_build_type_${_buildname} "release") + endif() + unset(_buildname) + + vcpkg_find_acquire_program(PKGCONFIG) + set(ENV{PKG_CONFIG} "${PKGCONFIG}") + get_filename_component(PKGCONFIG_PATH "${PKGCONFIG}" DIRECTORY) + vcpkg_add_to_path("${PKGCONFIG_PATH}") + + foreach(_buildname ${BUILDTYPES}) + set(PKGCONFIG_INSTALLED_DIR "${_VCPKG_INSTALLED_PKGCONF}${_path_suffix_${_buildname}}/lib/pkgconfig") + set(PKGCONFIG_INSTALLED_SHARE_DIR "${_VCPKG_INSTALLED_PKGCONF}/share/pkgconfig") + set(PKGCONFIG_PACKAGES_DIR "${_VCPKG_PACKAGES_PKGCONF}${_path_suffix_${_buildname}}/lib/pkgconfig") + set(PKGCONFIG_PACKAGES_SHARE_DIR "${_VCPKG_PACKAGES_PKGCONF}/share/pkgconfig") + if(DEFINED ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH_${_config} $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}") + endif() + + set(_build_triplet ${TARGET_TRIPLET}-${_short_name_${_buildname}}) + message(STATUS "Configuring ${_build_triplet}") + set(_build_dir "${CURRENT_BUILDTREES_DIR}/${_build_triplet}") + file(MAKE_DIRECTORY ${_build_dir}) + # These paths get hardcoded into qmake. So point them into the CURRENT_INSTALLED_DIR instead of CURRENT_PACKAGES_DIR + # makefiles will be fixed to install into CURRENT_PACKAGES_DIR in install_qt + set(BUILD_OPTIONS ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildname}} + -prefix ${CURRENT_INSTALLED_DIR} + #-extprefix ${CURRENT_INSTALLED_DIR} + ${EXT_BIN_DIR} + -hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}} + #-hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5 + -hostlibdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/lib # could probably be move to manual-link + -hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/bin + #-hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5/bin + # Qt VS Plugin requires a /bin subfolder with the executables in the root dir. But to use the wizard a correctly setup lib folder is also required + # So with the vcpkg layout there is no way to make it work unless all dll are are copied to tools/qt5/bin and all libs to tools/qt5/lib + -archdatadir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}} + -datadir ${CURRENT_INSTALLED_DIR}${_path_suffix}/share/qt5${_path_suffix_${_buildname}} + -plugindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/plugins + -qmldir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/qml + -headerdir ${CURRENT_INSTALLED_DIR}/include/qt5 + -libexecdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}} + -bindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/bin + -libdir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib + -I ${CURRENT_INSTALLED_DIR}/include + -I ${CURRENT_INSTALLED_DIR}/include/qt5 + -L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib + -L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib/manual-link + -platform ${_csc_TARGET_PLATFORM} + ) + + if(DEFINED _csc_HOST_TOOLS_ROOT) #use qmake + if(WIN32) + set(INVOKE_OPTIONS "QMAKE_CXX.QMAKE_MSC_VER=1911" "QMAKE_MSC_VER=1911") + endif() + vcpkg_execute_required_process( + COMMAND ${INVOKE} "${_csc_SOURCE_PATH}" "${INVOKE_OPTIONS}" -- ${BUILD_OPTIONS} + WORKING_DIRECTORY ${_build_dir} + LOGNAME config-${_build_triplet} + ) + else()# call configure (builds qmake for triplet and calls it like above) + vcpkg_execute_required_process( + COMMAND "${INVOKE}" ${BUILD_OPTIONS} + WORKING_DIRECTORY ${_build_dir} + LOGNAME config-${_build_triplet} + ) + endif() + + # Note archdatadir and datadir are required to be prefixed with the hostprefix? + message(STATUS "Configuring ${_build_triplet} done") + + # Copy configuration dependent qt.conf + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" CMAKE_CURRENT_PACKAGES_DIR_PATH) + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" CMAKE_CURRENT_INSTALLED_DIR_PATH) + file(READ "${CURRENT_BUILDTREES_DIR}/${_build_triplet}/bin/qt.conf" _contents) + string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR_PATH}" "\${CURRENT_INSTALLED_DIR}" _contents ${_contents}) + string(REPLACE "${CMAKE_CURRENT_INSTALLED_DIR_PATH}" "\${CURRENT_INSTALLED_DIR}" _contents ${_contents}) + #string(REPLACE "HostPrefix=\${CURRENT_PACKAGES_DIR}" "HostPrefix=\${CURRENT_INSTALLED_DIR}" _contents ${_contents}) + string(REPLACE "[EffectivePaths]\nPrefix=..\n" "" _contents ${_contents}) + string(REPLACE "[EffectiveSourcePaths]\nPrefix=${_csc_SOURCE_PATH}\n" "" _contents ${_contents}) + string(REPLACE "Sysroot=\n" "" _contents ${_contents}) + string(REPLACE "SysrootifyPrefix=false\n" "" _contents ${_contents}) + file(WRITE "${CURRENT_PACKAGES_DIR}/tools/qt5/qt_${_build_type_${_buildname}}.conf" "${_contents}") + endforeach() + +endfunction() diff --git a/ports/qt5-base/cmake/find_qt_mkspec.cmake b/ports/qt5-base/cmake/find_qt_mkspec.cmake new file mode 100644 index 00000000000000..c9c06c8bd9df17 --- /dev/null +++ b/ports/qt5-base/cmake/find_qt_mkspec.cmake @@ -0,0 +1,101 @@ +function(find_qt_mkspec TARGET_PLATFORM_MKSPEC_OUT HOST_PLATFORM_MKSPEC_OUT EXT_HOST_TOOLS_OUT) + ## Figure out QTs target mkspec + if(NOT DEFINED VCPKG_QT_TARGET_MKSPEC) + message(STATUS "Figuring out qt target mkspec. Target arch ${VCPKG_TARGET_ARCHITECTURE}") + if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_IS_UWP) + if(VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(msvc_year "2015") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(msvc_year "2017") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(msvc_year "2019") + else() + message(FATAL_ERROR "No target mkspec found!") + endif() + set(_tmp_targ_out "winrt-${VCPKG_TARGET_ARCHITECTURE}-msvc${msvc_year}") + else() + if("${VCPKG_TARGET_ARCHITECTURE}" MATCHES "arm64") + message(STATUS "Figuring out arm64") + set(_tmp_targ_out "win32-arm64-msvc2017") #mkspec does not have anything defined related to msvc2017 so this should work + else() + set(_tmp_targ_out "win32-msvc") + endif() + endif() + elseif(VCPKG_TARGET_IS_LINUX) + set(_tmp_targ_out "linux-g++" ) + elseif(VCPKG_TARGET_IS_OSX) + set(_tmp_targ_out "macx-clang") # switch to macx-g++ since vcpkg requires g++ to compile any way? + endif() + else() + set(_tmp_targ_out ${VCPKG_QT_TARGET_MKSPEC}) + endif() + message(STATUS "Target mkspec set to: ${_tmp_targ_out}") + set(${TARGET_PLATFORM_MKSPEC_OUT} ${_tmp_targ_out} PARENT_SCOPE) + + ## Figure out QTs host mkspec + if(NOT DEFINED VCPKG_QT_HOST_MKSPEC) + #if(WIN32) + # set(_tmp_host_out "win32-msvc") + #elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Linux") + # set(_tmp_host_out "linux-g++") + #elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Darwin") + # set(_tmp_host_out "macx-clang") + #endif() + if(DEFINED _tmp_host_out) + message(STATUS "Host mkspec set to: ${_tmp_host_out}") + else() + message(STATUS "Host mkspec not set. Qt's own buildsystem will try to figure out the host system") + endif() + else() + set(_tmp_host_out ${VCPKG_QT_HOST_MKSPEC}) + endif() + + if(DEFINED _tmp_host_out) + set(${HOST_PLATFORM_MKSPEC_OUT} ${_tmp_host_out} PARENT_SCOPE) + endif() + + ## Figure out VCPKG qt-tools directory for the port. + if(NOT DEFINED VCPKG_QT_HOST_TOOLS_ROOT AND DEFINED VCPKG_QT_HOST_PLATFORM) ## Root dir of the required host tools + if(NOT "${_tmp_host_out}" MATCHES "${_tmp_host_out}") + if(CMAKE_HOST_WIN32) + + if($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[aA][rR][mM]64") + list(APPEND _test_triplets arm64-windows) + elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[aA][mM][dD]64") + list(APPEND _test_triplets x64-windows x64-windows-static) + list(APPEND _test_triplets x86-windows x86-windows-static) + elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "x86") + list(APPEND _test_triplets x86-windows x86-windows-static) + else() + message(FATAL_ERROR "Unknown host processor! Host Processor $ENV{PROCESSOR_ARCHITECTURE}") + endif() + elseif(CMAKE_HOST_SYSTEM STREQUAL "Linux") + list(APPEND _test_triplets "x64-linux") + elseif(CMAKE_HOST_SYSTEM STREQUAL "Darwin") + list(APPEND _test_triplets "x64-osx") + else() + endif() + foreach(_triplet ${_test_triplets}) + find_program(QMAKE_PATH qmake PATHS ${VCPKG_INSTALLED_DIR}/${_triplet}/tools/qt5/bin NO_DEFAULT_PATHS) + message(STATUS "Checking: ${VCPKG_INSTALLED_DIR}/${_triplet}/tools/qt5/bin. ${QMAKE_PATH}") + if(QMAKE_PATH) + set(_tmp_host_root "${VCPKG_INSTALLED_DIR}/${_triplet}/tools/qt5") + set(_tmp_host_qmake ${QMAKE_PATH} PARENT_SCOPE) + message(STATUS "Qt host tools root dir within vcpkg: ${_tmp_host_root}") + break() + endif() + endforeach() + if(NOT DEFINED _tmp_host_root) + message(FATAL_ERROR "Unable to locate required host tools. Please define VCPKG_QT_HOST_TOOLS_ROOT to the required root dir of the host tools") + endif() + endif() + else() + set(_tmp_host_root ${VCPKG_QT_HOST_TOOLS_ROOT}) + endif() + + if(DEFINED _tmp_host_root) + set(${EXT_HOST_TOOLS_OUT} ${_tmp_host_root} PARENT_SCOPE) + endif() + +endfunction() diff --git a/ports/qt5-base/cmake/install_qt.cmake b/ports/qt5-base/cmake/install_qt.cmake new file mode 100644 index 00000000000000..39781cebe01ee7 --- /dev/null +++ b/ports/qt5-base/cmake/install_qt.cmake @@ -0,0 +1,129 @@ +include(qt_fix_makefile_install) + +function(install_qt) + if(CMAKE_HOST_WIN32) + if (VCPKG_QMAKE_USE_NMAKE) + find_program(NMAKE nmake REQUIRED) + set(INVOKE "${NMAKE}") + set(INVOKE_SINGLE "${NMAKE}") + get_filename_component(NMAKE_EXE_PATH ${NMAKE} DIRECTORY) + set(PATH_GLOBAL "$ENV{PATH}") + set(ENV{PATH} "$ENV{PATH};${NMAKE_EXE_PATH}") + set(ENV{CL} "$ENV{CL} /MP${VCPKG_CONCURRENCY}") + else() + vcpkg_find_acquire_program(JOM) + set(INVOKE "${JOM}" /J ${VCPKG_CONCURRENCY}) + set(INVOKE_SINGLE "${JOM}" /J 1) + endif() + else() + find_program(MAKE make) + set(INVOKE "${MAKE}" -j${VCPKG_CONCURRENCY}) + set(INVOKE_SINGLE "${MAKE}" -j1) + endif() + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") + + if (CMAKE_HOST_WIN32) + # flex and bison for ANGLE library + vcpkg_find_acquire_program(FLEX) + get_filename_component(FLEX_EXE_PATH ${FLEX} DIRECTORY) + get_filename_component(FLEX_DIR ${FLEX_EXE_PATH} NAME) + + file(COPY ${FLEX_EXE_PATH} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools" ) + set(FLEX_TEMP "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools/${FLEX_DIR}") + file(RENAME "${FLEX_TEMP}/win_bison.exe" "${FLEX_TEMP}/bison.exe") + file(RENAME "${FLEX_TEMP}/win_flex.exe" "${FLEX_TEMP}/flex.exe") + vcpkg_add_to_path("${FLEX_TEMP}") + endif() + + set(_path "$ENV{PATH}") + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + set(_build_type_${_buildname} "debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + set(_build_type_${_buildname} "release") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(_build_triplet ${TARGET_TRIPLET}-${_short_name_${_buildname}}) + + set(_installed_prefix_ "${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}") + set(_installed_libpath_ "${_installed_prefix_}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_installed_prefix_}/lib/manual-link/") + + vcpkg_add_to_path(PREPEND "${_installed_prefix_}/bin") + vcpkg_add_to_path(PREPEND "${_installed_prefix_}/lib") + + # We set LD_LIBRARY_PATH ENV variable to allow executing Qt tools (rcc,...) even with dynamic linking + if(CMAKE_HOST_UNIX) + if(DEFINED ENV{LD_LIBRARY_PATH}) + set(_ld_library_path_defined_ TRUE) + set(_ld_library_path_backup_ $ENV{LD_LIBRARY_PATH}) + set(ENV{LD_LIBRARY_PATH} "${_installed_libpath_}${VCPKG_HOST_PATH_SEPARATOR}${_ld_library_path_backup_}") + else() + set(_ld_library_path_defined_ FALSE) + set(ENV{LD_LIBRARY_PATH} "${_installed_libpath_}") + endif() + endif() + + if(VCPKG_TARGET_IS_OSX) + # For some reason there will be an error on MacOSX without this clean! + message(STATUS "Cleaning before build ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE_SINGLE} clean + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME cleaning-1-${_build_triplet} + ) + endif() + + message(STATUS "Building ${_build_triplet}") + vcpkg_execute_build_process( + COMMAND ${INVOKE} + NO_PARALLEL_COMMAND ${INVOKE_SINGLE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME build-${_build_triplet} + ) + + if(VCPKG_TARGET_IS_OSX) + # For some reason there will be an error on MacOSX without this clean! + message(STATUS "Cleaning after build before install ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE_SINGLE} clean + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME cleaning-2-${_build_triplet} + ) + endif() + + message(STATUS "Fixing makefile installation path ${_build_triplet}") + qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${_build_triplet}") + message(STATUS "Installing ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME package-${_build_triplet} + ) + message(STATUS "Package ${_build_triplet} done") + set(ENV{PATH} "${_path}") + + # Restore backup + if(CMAKE_HOST_UNIX) + if(_ld_library_path_defined_) + set(ENV{LD_LIBRARY_PATH} "${_ld_library_path_backup_}") + else() + unset(ENV{LD_LIBRARY_PATH}) + endif() + endif() + endforeach() +endfunction() diff --git a/ports/qt5-base/cmake/qt_build_submodule.cmake b/ports/qt5-base/cmake/qt_build_submodule.cmake new file mode 100644 index 00000000000000..52f9c6c1ba3f7f --- /dev/null +++ b/ports/qt5-base/cmake/qt_build_submodule.cmake @@ -0,0 +1,127 @@ + +function(qt_build_submodule SOURCE_PATH) + # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings + set(ENV{_CL_} "/utf-8") + + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) + vcpkg_add_to_path("${PYTHON2_EXE_PATH}") + + vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH} ${ARGV}) + + vcpkg_build_qmake(SKIP_MAKEFILES) + + #Fix the installation location within the makefiles + qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/") + qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/") + + #Install the module files + vcpkg_build_qmake(TARGETS install SKIP_MAKEFILES BUILD_LOGNAME install) + + qt_fix_cmake(${CURRENT_PACKAGES_DIR} ${PORT}) + vcpkg_fixup_pkgconfig() # Needs further investigation if this is enough! + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(CURRENT_BUILD_PACKAGE_DIR "${CURRENT_PACKAGES_DIR}${_path_suffix_${_buildname}}") + #Fix PRL files + file(GLOB_RECURSE PRL_FILES "${CURRENT_BUILD_PACKAGE_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5${_path_suffix_${_buildname}}/lib/*.prl" + "${CURRENT_PACKAGES_DIR}/tools/qt5${_path_suffix_${_buildname}}/mkspecs/*.pri") + qt_fix_prl("${CURRENT_BUILD_PACKAGE_DIR}" "${PRL_FILES}") + + # This makes it impossible to use the build tools in any meaningful way. qt5 assumes they are all in one folder! + # So does the Qt VS Plugin which even assumes all of the in a bin folder + #Move tools to the correct directory + #if(EXISTS ${CURRENT_BUILD_PACKAGE_DIR}/tools/qt5) + # file(RENAME ${CURRENT_BUILD_PACKAGE_DIR}/tools/qt5 ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + #endif() + + # Move executables in bin to tools + # This is ok since those are not build tools. + file(GLOB PACKAGE_EXE ${CURRENT_BUILD_PACKAGE_DIR}/bin/*.exe) + if(PACKAGE_EXE) + file(INSTALL ${PACKAGE_EXE} DESTINATION "${CURRENT_BUILD_PACKAGE_DIR}/tools/${PORT}") + file(REMOVE ${PACKAGE_EXE}) + foreach(_exe ${PACKAGE_EXE}) + string(REPLACE ".exe" ".pdb" _prb_file ${_exe}) + if(EXISTS ${_prb_file}) + file(INSTALL ${_prb_file} DESTINATION "${CURRENT_BUILD_PACKAGE_DIR}/tools/${PORT}") + file(REMOVE ${_prb_file}) + endif() + endforeach() + endif() + + #cleanup empty folders + file(GLOB PACKAGE_LIBS "${CURRENT_BUILD_PACKAGE_DIR}/lib/*") + if(NOT PACKAGE_LIBS) + file(REMOVE_RECURSE "${CURRENT_BUILD_PACKAGE_DIR}/lib") + endif() + + file(GLOB PACKAGE_BINS "${CURRENT_BUILD_PACKAGE_DIR}/bin/*") + if(NOT PACKAGE_BINS) + file(REMOVE_RECURSE "${CURRENT_BUILD_PACKAGE_DIR}/bin") + endif() + endforeach() + if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/qt5/bin") + file(COPY "${CURRENT_PACKAGES_DIR}/tools/qt5/bin" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + + set(CURRENT_INSTALLED_DIR_BACKUP "${CURRENT_INSTALLED_DIR}") + set(CURRENT_INSTALLED_DIR "./../../.." ) # Making the qt.conf relative and not absolute + configure_file(${CURRENT_INSTALLED_DIR_BACKUP}/tools/qt5/qt_release.conf ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/qt.conf) # This makes the tools at least useable for release + set(CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR_BACKUP}") + + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB_RECURSE DLL_DEPS_AVAIL "${CURRENT_INSTALLED_DIR}/tools/qt5/bin/*.dll") + string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/qt5/bin/" "" DLL_DEPS_AVAIL "${DLL_DEPS_AVAIL}") + file(GLOB_RECURSE DLL_DEPS_NEEDED "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/*.dll") + string(REPLACE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/" "" DLL_DEPS_NEEDED "${DLL_DEPS_NEEDED}") + if(DLL_DEPS_AVAIL AND DLL_DEPS_NEEDED) + list(REMOVE_ITEM DLL_DEPS_NEEDED ${DLL_DEPS_AVAIL}) + endif() + foreach(dll_dep ${DLL_DEPS_NEEDED}) + string(REGEX REPLACE "[^/]+$" "" dll_subpath "${dll_dep}") + file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/${dll_dep}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/qt5/bin/${dll_subpath}") + endforeach() + endif() + endif() + + #This should be removed if somehow possible + if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/bin") + set(CURRENT_INSTALLED_DIR_BACKUP "${CURRENT_INSTALLED_DIR}") + set(CURRENT_INSTALLED_DIR "./../../../.." ) # Making the qt.conf relative and not absolute + configure_file(${CURRENT_INSTALLED_DIR_BACKUP}/tools/qt5/qt_debug.conf ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/qt.conf) # This makes the tools at least useable for release + set(CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR_BACKUP}") + + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin") + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB_RECURSE DLL_DEPS_AVAIL "${CURRENT_INSTALLED_DIR}/tools/qt5/debug/bin/*.dll") + string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/qt5/debug/bin/" "" DLL_DEPS_AVAIL "${DLL_DEPS_AVAIL}") + file(GLOB_RECURSE DLL_DEPS_NEEDED "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/*.dll") + string(REPLACE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/" "" DLL_DEPS_NEEDED "${DLL_DEPS_NEEDED}") + if(DLL_DEPS_AVAIL AND DLL_DEPS_NEEDED) + list(REMOVE_ITEM DLL_DEPS_NEEDED ${DLL_DEPS_AVAIL}) + endif() + foreach(dll_dep ${DLL_DEPS_NEEDED}) + string(REGEX REPLACE "[^/]+$" "" dll_subpath "${dll_dep}") + file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/${dll_dep}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/bin/${dll_subpath}") + endforeach() + endif() + endif() + +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_download_submodule.cmake b/ports/qt5-base/cmake/qt_download_submodule.cmake new file mode 100644 index 00000000000000..63850a4ef2a831 --- /dev/null +++ b/ports/qt5-base/cmake/qt_download_submodule.cmake @@ -0,0 +1,41 @@ +function(qt_get_submodule_name OUT_NAME) + string(REPLACE "5-" "" _tmp_name ${PORT}) + set(${OUT_NAME} ${_tmp_name} PARENT_SCOPE) +endfunction() + +function(qt_download_submodule) + cmake_parse_arguments(_csc "" "OUT_SOURCE_PATH" "PATCHES;BUILD_OPTIONS;BUILD_OPTIONS_RELEASE;BUILD_OPTIONS_DEBUG" ${ARGN}) + + if(NOT DEFINED _csc_OUT_SOURCE_PATH) + message(FATAL_ERROR "qt_download_module requires parameter OUT_SOURCE_PATH to be set! Please correct the portfile!") + endif() + + vcpkg_buildpath_length_warning(37) + qt_get_submodule_name(NAME) + + set(FULL_VERSION "${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}") + set(ARCHIVE_NAME "${NAME}-everywhere-src-${FULL_VERSION}.tar.xz") + set(URLS "https://download.qt.io/official_releases/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" + "https://mirrors.ocf.berkeley.edu/qt/official_releases/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" + ) + vcpkg_download_distfile(ARCHIVE_FILE + URLS ${URLS} + FILENAME ${ARCHIVE_NAME} + SHA512 ${QT_HASH_${PORT}} + ) + + if(QT_UPDATE_VERSION) + file(SHA512 "${ARCHIVE_FILE}" ARCHIVE_HASH) + message(STATUS "${PORT} new hash is ${ARCHIVE_HASH}") + file(APPEND "${VCPKG_ROOT_DIR}/ports/qt5-base/cmake/qt_new_hashes.cmake" "set(QT_HASH_${PORT} ${ARCHIVE_HASH})\n") + else() + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE_FILE}" + REF ${FULL_VERSION} + PATCHES ${_csc_PATCHES} + ) + endif() + + set(${_csc_OUT_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_fix_cmake.cmake b/ports/qt5-base/cmake/qt_fix_cmake.cmake new file mode 100644 index 00000000000000..1b6522716e2da6 --- /dev/null +++ b/ports/qt5-base/cmake/qt_fix_cmake.cmake @@ -0,0 +1,21 @@ +function(qt_fix_cmake PACKAGE_DIR_TO_FIX PORT_TO_FIX) + + file(GLOB_RECURSE cmakefiles ${PACKAGE_DIR_TO_FIX}/share/cmake/*.cmake ${PACKAGE_DIR_TO_FIX}/lib/cmake/*.cmake) + foreach(cmakefile ${cmakefiles}) + file(READ "${cmakefile}" _contents) + if(_contents MATCHES "_install_prefix}/tools/qt5/bin/([a-z0-9]+)") # there are only about 3 to 5 cmake files which require the fix in ports: qt5-tools qt5-xmlpattern at5-activeqt qt5-quick + string(REGEX REPLACE "_install_prefix}/tools/qt5/bin/([a-z0-9]+)" "_install_prefix}/tools/${PORT_TO_FIX}/bin/\\1" _contents "${_contents}") + file(WRITE "${cmakefile}" "${_contents}") + endif() + endforeach() + + #Install cmake files + if(EXISTS ${PACKAGE_DIR_TO_FIX}/lib/cmake) + file(MAKE_DIRECTORY ${PACKAGE_DIR_TO_FIX}/share) + file(RENAME ${PACKAGE_DIR_TO_FIX}/lib/cmake ${PACKAGE_DIR_TO_FIX}/share/cmake) + endif() + #Remove extra cmake files + if(EXISTS ${PACKAGE_DIR_TO_FIX}/debug/lib/cmake) + file(REMOVE_RECURSE ${PACKAGE_DIR_TO_FIX}/debug/lib/cmake) + endif() +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_fix_makefile_install.cmake b/ports/qt5-base/cmake/qt_fix_makefile_install.cmake new file mode 100644 index 00000000000000..69b016fc883d1c --- /dev/null +++ b/ports/qt5-base/cmake/qt_fix_makefile_install.cmake @@ -0,0 +1,30 @@ +#Could probably be a vcpkg_fix_makefile_install for other ports? +function(qt_fix_makefile_install BUILD_DIR) + #Fix the installation location + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + + if(WIN32) + string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) + string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) + string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 0 2 INSTALLED_DRIVE) + string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 0 2 PACKAGES_DRIVE) + else() + set(INSTALLED_DRIVE) + set(PACKAGES_DRIVE) + set(INSTALLED_DIR_WITHOUT_DRIVE ${NATIVE_INSTALLED_DIR}) + set(PACKAGES_DIR_WITHOUT_DRIVE ${NATIVE_PACKAGES_DIR}) + endif() + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + + file(GLOB_RECURSE MAKEFILES "${BUILD_DIR}/*Makefile*") + + foreach(MAKEFILE ${MAKEFILES}) + file(READ "${MAKEFILE}" _contents) + #Set the correct install directory to packages + string(REPLACE "${INSTALLED_DRIVE}$(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "${PACKAGES_DRIVE}$(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}" _contents "${_contents}") + file(WRITE "${MAKEFILE}" "${_contents}") + endforeach() +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_fix_prl.cmake b/ports/qt5-base/cmake/qt_fix_prl.cmake new file mode 100644 index 00000000000000..551ec11347e133 --- /dev/null +++ b/ports/qt5-base/cmake/qt_fix_prl.cmake @@ -0,0 +1,15 @@ +function(qt_fix_prl PACKAGE_DIR PRL_FILES) + file(TO_CMAKE_PATH "${PACKAGE_DIR}/lib" CMAKE_LIB_PATH) + file(TO_CMAKE_PATH "${PACKAGE_DIR}/include/qt5" CMAKE_INCLUDE_PATH) + file(TO_CMAKE_PATH "${PACKAGE_DIR}/include" CMAKE_INCLUDE_PATH2) + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" CMAKE_INSTALLED_PREFIX) + foreach(PRL_FILE IN LISTS PRL_FILES) + file(READ "${PRL_FILE}" _contents) + string(REPLACE "${CMAKE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") + string(REPLACE "${CMAKE_INCLUDE_PATH}" "\$\$[QT_INSTALL_HEADERS]" _contents "${_contents}") + string(REPLACE "${CMAKE_INCLUDE_PATH2}" "\$\$[QT_INSTALL_HEADERS]/../" _contents "${_contents}") + string(REPLACE "${CMAKE_INSTALLED_PREFIX}" "\$\$[QT_INSTALL_PREFIX]" _contents "${_contents}") + #Note: This only works without an extra if case since QT_INSTALL_PREFIX is the same for debug and release + file(WRITE "${PRL_FILE}" "${_contents}") + endforeach() +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_install_copyright.cmake b/ports/qt5-base/cmake/qt_install_copyright.cmake new file mode 100644 index 00000000000000..ba4d70c28a1017 --- /dev/null +++ b/ports/qt5-base/cmake/qt_install_copyright.cmake @@ -0,0 +1,18 @@ +#Could probably be the beginning of a vcpkg_install_copyright? +function(qt_install_copyright SOURCE_PATH) + #Find the relevant license file and install it + if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.FDL") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.FDL") + endif() + file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_port_functions.cmake b/ports/qt5-base/cmake/qt_port_functions.cmake new file mode 100644 index 00000000000000..921f194a540c92 --- /dev/null +++ b/ports/qt5-base/cmake/qt_port_functions.cmake @@ -0,0 +1,19 @@ +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + +#Basic setup +include(qt_port_hashes) +if(QT_BUILD_LATEST) # only set in qt5-base + include(qt_port_hashes_latest) +elseif(NOT PORT STREQUAL "qt5-base") + include(qt_port_hashes_latest OPTIONAL) # will only be available for the other qt ports if qt5-base was build with latest +endif() +#Fixup scripts +include(qt_fix_makefile_install) +include(qt_fix_cmake) +include(qt_fix_prl) +#Helper functions +include(qt_download_submodule) +include(qt_build_submodule) +include(qt_install_copyright) + +include(qt_submodule_installation) diff --git a/ports/qt5-base/cmake/qt_port_hashes.cmake b/ports/qt5-base/cmake/qt_port_hashes.cmake new file mode 100644 index 00000000000000..c52196078e19ed --- /dev/null +++ b/ports/qt5-base/cmake/qt_port_hashes.cmake @@ -0,0 +1,67 @@ +#Every update requires an update of these hashes and the version within the control file of each of the 32 ports. +#So it is probably better to have a central location for these hashes and let the ports update via a script +set(QT_MAJOR_MINOR_VER 5.15) +set(QT_PATCH_VER 2) +set(QT_UPDATE_VERSION 0) # Switch to update qt and not build qt. Creates a file cmake/qt_new_hashes.cmake in qt5-base with the new hashes. + +set(QT_PORT_LIST base 3d activeqt charts connectivity datavis3d declarative gamepad graphicaleffects imageformats location macextras mqtt multimedia networkauth + purchasing quickcontrols quickcontrols2 remoteobjects script scxml sensors serialport speech svg tools virtualkeyboard webchannel websockets + webview winextras xmlpatterns doc x11extras androidextras translations serialbus webengine webglplugin wayland) + +set(QT_HASH_qt5-base a549bfaf867d746ff744ab224eb65ac1bdcdac7e8457dfa379941b2b225a90442fcfc1e1175b9afb1f169468f8130b7ab917c67be67156520a4bfb5c92d304f9) +set(QT_HASH_qt5-3d 38da6886b887f6d315dcb17192322efe184950716fdd0030df6c7d7c454ea43dc0250a201285da27683ce29768da6be41d4168e4f63c20adb0b5f26ae0934c1b) +set(QT_HASH_qt5-activeqt a2286a6736d14cf9b0dbf20af5ee8c23f94f57b6d4c0be41853e67109d87fd78dbf8f14eef2ce4b8d9ff2244af7ef139829ad7674d9ec9669434028961e65ec7) +set(QT_HASH_qt5-charts d16fc085a7e98078cf616cde07d57c5f04cd41e9687a26d42edf9042b4c95a837371b6b9616e7176c536d742aa9b5fc15bf3393f9f2e814ce942189ac151e65f) +set(QT_HASH_qt5-connectivity a934dcdd28645ba23dd429215643694d9a14449a4c3e1a6154a9a19cb3210f3d80978b46aefff2b110db533fa1816450f2f73a27d80df5330a92799e4cca1b9c) +set(QT_HASH_qt5-datavis3d 340b5ce1b1c2d8849b665e7bc84430fdf48e443fc149530ee132f325067f57d35594a23e3a8b920e1928ca5c429dcacfa098dadcbde63d4993f748c436af4cc3) +set(QT_HASH_qt5-declarative a084e4ace0d6868668c95f1b62598a7dd0f455bfb0943ac8956802d7041436686f20c7ccdde7d6fd6c4b8173c936dd8600cf3b87bf8575f55514edfbb51111d3) +set(QT_HASH_qt5-gamepad 67f299d36f70ac3205a136117bec7f983f889b6a1f7d0ff97eb03925f4789d9d90a7197f5e186a6d04aa486880c60f0f623ab56a8bd78e4682e84c7ff6cc9fe1) +set(QT_HASH_qt5-graphicaleffects 1620a4daa6f2afc13b84752fa92f6d603aea1f7c796a239691b271a455d6887bba87a9a07edbfe008045f051c3e71fc6e22fc337d146c1793e923cfeb20e897d) +set(QT_HASH_qt5-imageformats 3c821fac83b8d6177af256dc1d68aca14ae6d5cbdedb8d8665158ebcec0f6e6fb790b5d210a1aa8b0679ecff60fafd4e5d1387c6954498b41409ea44177e0d7e) +set(QT_HASH_qt5-location 6192922506b3ea354e85431df83c19d7cc9aebb17549c6a1de48f625bf8365ff3db3161080dde254a5fb9199d99c3c5dc8e1533429150be55df96ddb7d6ce16f) +set(QT_HASH_qt5-macextras 21e807a587da716615a447207abda2c3eb409111a0eb6f844c8f1281ccc842a7c2e8759c1d7ce62cc3bad3325b4570a0bae1fbe4e5592e905788dde8898c6cb0) +set(QT_HASH_qt5-mqtt 91efd3b1ebef3c95473c018bcacd0772e613b38c) # Git commit ID +set(QT_HASH_qt5-multimedia be58e6934976b04707399f8525dd5d50f73e0539efd1a76c2f9868e35e6f136e0991652df5d46350a9ac39d24313353e4aa826131f268a95e458e57279f448bd) +set(QT_HASH_qt5-networkauth 94843a74ae188eb0eff9559be6b246f61f87104479f6f52fe943b31a9263461a7051d967072d9061124b2bd056d7265645892104653c93dfcf68b11521f1c33d) +set(QT_HASH_qt5-purchasing 1a40fd3ca149f9c8fc98a45562b37fc97c7addc513d40f50997576648d441d379179370c6491a003982feafe96736047a8faf09caf36eaeea5a97553f75d1255) +set(QT_HASH_qt5-quickcontrols 52839e7442f4b6b5cbbb741d29ce28e9d2d9f5573499363d17252b166c1f318f37a19ecf1bf17f5cf6940bc29cc2987180b740ce036d924ff329dee9c37823a2) # deprecated +set(QT_HASH_qt5-quickcontrols2 5af506fd5842c505ae5fbd04fdd2a467c5b6a9547b4cea80c9cf051e9dea49bbf17843d8bc12e69e95810e70119c2843c24171c84e0f5df62dd2f59a39903c8f) +set(QT_HASH_qt5-remoteobjects 1cce1b6128f283fe8930e1e58b9620459c50b203a39607e9bcde8423930da08e5c70e7effaf64d2690f463cc7b37cfc67fb6c0ac89e27df3a57007aee1d5233d) +set(QT_HASH_qt5-script 71c70b34f7d4a0742df64d20d7e9a685cc640b9cc6a3d22847c04f45a437b3f5537f40225a522ed82787c2744d9a4949dea5b43c2ee81961d5ed175cf10deb32) # deprecated +set(QT_HASH_qt5-scxml 2a4719af94baefe7f0ca5a23239d07a05285a1698b052d17bb87bc221bbbc8bc25a70ff06d70d41ed7ac6a7e6646be9c516d8187c9098da1158c08e27a4b0bb8) +set(QT_HASH_qt5-sensors d0a34e0718cc727b1256601bc5f9a2975532d728fdf0cb7678824c7d36aa5049d9c2886053821ec93a238120441c980027306ac633677617867c7aee40bb560b) +set(QT_HASH_qt5-serialport 353cc5f708367d646bd312f7d675b417bad4df44356f1dfc8b6ce846a86fd6d5955ec4d26f943e50f4a7b94cc6389fe658959e90bbb5ab3cdaefed0efe6ae72b) +set(QT_HASH_qt5-speech 78a13218a639276c9b253566a1df52e2363847eac76df3962ba2a7178800206beb57859d22c7c99fa1579cb3aa7ab94baed1a6319ba946d4a64cba9e3bf52b05) +set(QT_HASH_qt5-svg 101e9c8fc05b1bb9c4e869564bff8e5723dd35f0ef557185e56e9dc12fdce74c531522c9642cdff639900eccf7ed0e04bfa48142741259697dded990fb481730) +set(QT_HASH_qt5-tools 3bd32a302af6e81cd5d4eb07d60c5ef233f1ca7af1aae180c933ac28fafffce28c6c868eb032108747937ea951d6d4f0df5516841bc65d22c529207147533a8b) +set(QT_HASH_qt5-virtualkeyboard 3ba04d171756a5434424833c5198a23e0df53eeebe9ea542047e094f83f38492d93f901cac67cf7e55aca6a71289ce3c6f5d8ac10a8d051b291155ebb8432016) +set(QT_HASH_qt5-webchannel 7ac5e372695616863d247c5a61e5763a3934b58165e35c43da5ef1797d80005aa3d6eb258931ae7ee2b1f6a6fa743635ac4678c9cfe375cefa76e74cc81d095b) +set(QT_HASH_qt5-websockets 1b23b79bff4289e785daf51441daaecf6de66ca5a3febfdd8fdb8ce871471bca4faf7663d68b23aaf562b1ebd6e9c8c27b3074f4b93bc9fcd3a0c54f7f79a9c4) +set(QT_HASH_qt5-webview 11502597d5e3a9b8a3a90025b56c086a3412743019384558617c397a8ad4a0f646b406a4fbeb31ca45e6e573d1fb06cd5b22b8c0179695d06cc3d492289a1c85) +set(QT_HASH_qt5-winextras 6555a42d4bbeb46b394f573b6ed7926ec21cf6024de3c5f43000373bf0a2f4544f19866e2c9469da2d60b5dd99fb046765be5d3f8d5025169e319795bbf66d9e) +set(QT_HASH_qt5-xmlpatterns 5cdf51878f8bb42db57110acc0c3985a95af098da44e5dda505e0716fef5afc780419058158f7a8f9a0fe3fed83fd64abd856b4dbcdca20efa5e985fa85cc348) # deprecated +##TODO +set(QT_HASH_qt5-doc ce2c003b37829da102f243ca271548cff0597b4b667109ca9533971a490b8b20eb3183af6e0b209ad58964f2be2e757f83933a3f8c484dd0814750e24d1a244e) +set(QT_HASH_qt5-x11extras beaefc865299f4e7c637baa96eb3a69adbe1a41fc7735b46cfec0768c9243391600e69078630fffb4aceba106b7512fd802e745abc38ddab5253233301c93ed9) +set(QT_HASH_qt5-androidextras cacd9252f313595d21eb6a94ffabbd5fff476af82aa619b4edfc77a9f405f52bd1b89da97c8f7dadf8c403035a243205a25a2f85250ebc0590bf68f914cdbf3a) +#set(QT_HASH_qt5-canvas3d 0) deprecated +set(QT_HASH_qt5-translations 483b5d919f43c96a032e610cf6316989e7b859ab177cb2f7cb9bb10ebcddf8c9be8e04ff12db38a317c618d13f88455a4d434c7a1133f453882da4e026dd8cbe) +set(QT_HASH_qt5-serialbus c4793f5425ca0191435d75a8fd95a623cc847d41b8722421c0bf0fdfddda1a158fd2a00f5d997f00de4fcb271a158f3273d636ef2553ccd6b90b4d072b1eb55b) +set(QT_HASH_qt5-webengine de64c30819f5e2f8620c853ff22b2f9717641477aef4432a552a72d1d67ed62ed61572afee6de3f2c9f32dee28f4f786ffd63fc465aa42c0ae1e87ea28341756) +set(QT_HASH_qt5-webglplugin 14b9a0c08472121165eba82f3c81518be7b19484b7bee7887df9751edc6e2e7e76d06f961b180427014beb71c725d343e9f196f37690e2d207511f7639bd2627) +set(QT_HASH_qt5-wayland e8657ed676873da7b949e6a1605d025918a03336af9c68f32741945ec3c71a604def55bb00737ba4d97b91c00d0e2df1a83cdcedcf5795c6b2a1ef2caa21c91c) + +if(QT_UPDATE_VERSION) + message(STATUS "Running Qt in automatic version port update mode!") + set(_VCPKG_INTERNAL_NO_HASH_CHECK 1) + if("${PORT}" MATCHES "qt5-base") + foreach(_current_qt_port ${QT_PORT_LIST}) + set(_current_control "${VCPKG_ROOT_DIR}/ports/qt5-${_current_qt_port}/CONTROL") + file(READ ${_current_control} _control_contents) + #message(STATUS "Before: \n${_control_contents}") + string(REGEX REPLACE "Version:[^0-9]+[0-9]\.[0-9]+\.[0-9]+[^\n]*\n" "Version: ${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}\n" _control_contents "${_control_contents}") + #message(STATUS "After: \n${_control_contents}") + file(WRITE ${_current_control} "${_control_contents}") + endforeach() + endif() +endif() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_port_hashes_latest.cmake b/ports/qt5-base/cmake/qt_port_hashes_latest.cmake new file mode 100644 index 00000000000000..c52196078e19ed --- /dev/null +++ b/ports/qt5-base/cmake/qt_port_hashes_latest.cmake @@ -0,0 +1,67 @@ +#Every update requires an update of these hashes and the version within the control file of each of the 32 ports. +#So it is probably better to have a central location for these hashes and let the ports update via a script +set(QT_MAJOR_MINOR_VER 5.15) +set(QT_PATCH_VER 2) +set(QT_UPDATE_VERSION 0) # Switch to update qt and not build qt. Creates a file cmake/qt_new_hashes.cmake in qt5-base with the new hashes. + +set(QT_PORT_LIST base 3d activeqt charts connectivity datavis3d declarative gamepad graphicaleffects imageformats location macextras mqtt multimedia networkauth + purchasing quickcontrols quickcontrols2 remoteobjects script scxml sensors serialport speech svg tools virtualkeyboard webchannel websockets + webview winextras xmlpatterns doc x11extras androidextras translations serialbus webengine webglplugin wayland) + +set(QT_HASH_qt5-base a549bfaf867d746ff744ab224eb65ac1bdcdac7e8457dfa379941b2b225a90442fcfc1e1175b9afb1f169468f8130b7ab917c67be67156520a4bfb5c92d304f9) +set(QT_HASH_qt5-3d 38da6886b887f6d315dcb17192322efe184950716fdd0030df6c7d7c454ea43dc0250a201285da27683ce29768da6be41d4168e4f63c20adb0b5f26ae0934c1b) +set(QT_HASH_qt5-activeqt a2286a6736d14cf9b0dbf20af5ee8c23f94f57b6d4c0be41853e67109d87fd78dbf8f14eef2ce4b8d9ff2244af7ef139829ad7674d9ec9669434028961e65ec7) +set(QT_HASH_qt5-charts d16fc085a7e98078cf616cde07d57c5f04cd41e9687a26d42edf9042b4c95a837371b6b9616e7176c536d742aa9b5fc15bf3393f9f2e814ce942189ac151e65f) +set(QT_HASH_qt5-connectivity a934dcdd28645ba23dd429215643694d9a14449a4c3e1a6154a9a19cb3210f3d80978b46aefff2b110db533fa1816450f2f73a27d80df5330a92799e4cca1b9c) +set(QT_HASH_qt5-datavis3d 340b5ce1b1c2d8849b665e7bc84430fdf48e443fc149530ee132f325067f57d35594a23e3a8b920e1928ca5c429dcacfa098dadcbde63d4993f748c436af4cc3) +set(QT_HASH_qt5-declarative a084e4ace0d6868668c95f1b62598a7dd0f455bfb0943ac8956802d7041436686f20c7ccdde7d6fd6c4b8173c936dd8600cf3b87bf8575f55514edfbb51111d3) +set(QT_HASH_qt5-gamepad 67f299d36f70ac3205a136117bec7f983f889b6a1f7d0ff97eb03925f4789d9d90a7197f5e186a6d04aa486880c60f0f623ab56a8bd78e4682e84c7ff6cc9fe1) +set(QT_HASH_qt5-graphicaleffects 1620a4daa6f2afc13b84752fa92f6d603aea1f7c796a239691b271a455d6887bba87a9a07edbfe008045f051c3e71fc6e22fc337d146c1793e923cfeb20e897d) +set(QT_HASH_qt5-imageformats 3c821fac83b8d6177af256dc1d68aca14ae6d5cbdedb8d8665158ebcec0f6e6fb790b5d210a1aa8b0679ecff60fafd4e5d1387c6954498b41409ea44177e0d7e) +set(QT_HASH_qt5-location 6192922506b3ea354e85431df83c19d7cc9aebb17549c6a1de48f625bf8365ff3db3161080dde254a5fb9199d99c3c5dc8e1533429150be55df96ddb7d6ce16f) +set(QT_HASH_qt5-macextras 21e807a587da716615a447207abda2c3eb409111a0eb6f844c8f1281ccc842a7c2e8759c1d7ce62cc3bad3325b4570a0bae1fbe4e5592e905788dde8898c6cb0) +set(QT_HASH_qt5-mqtt 91efd3b1ebef3c95473c018bcacd0772e613b38c) # Git commit ID +set(QT_HASH_qt5-multimedia be58e6934976b04707399f8525dd5d50f73e0539efd1a76c2f9868e35e6f136e0991652df5d46350a9ac39d24313353e4aa826131f268a95e458e57279f448bd) +set(QT_HASH_qt5-networkauth 94843a74ae188eb0eff9559be6b246f61f87104479f6f52fe943b31a9263461a7051d967072d9061124b2bd056d7265645892104653c93dfcf68b11521f1c33d) +set(QT_HASH_qt5-purchasing 1a40fd3ca149f9c8fc98a45562b37fc97c7addc513d40f50997576648d441d379179370c6491a003982feafe96736047a8faf09caf36eaeea5a97553f75d1255) +set(QT_HASH_qt5-quickcontrols 52839e7442f4b6b5cbbb741d29ce28e9d2d9f5573499363d17252b166c1f318f37a19ecf1bf17f5cf6940bc29cc2987180b740ce036d924ff329dee9c37823a2) # deprecated +set(QT_HASH_qt5-quickcontrols2 5af506fd5842c505ae5fbd04fdd2a467c5b6a9547b4cea80c9cf051e9dea49bbf17843d8bc12e69e95810e70119c2843c24171c84e0f5df62dd2f59a39903c8f) +set(QT_HASH_qt5-remoteobjects 1cce1b6128f283fe8930e1e58b9620459c50b203a39607e9bcde8423930da08e5c70e7effaf64d2690f463cc7b37cfc67fb6c0ac89e27df3a57007aee1d5233d) +set(QT_HASH_qt5-script 71c70b34f7d4a0742df64d20d7e9a685cc640b9cc6a3d22847c04f45a437b3f5537f40225a522ed82787c2744d9a4949dea5b43c2ee81961d5ed175cf10deb32) # deprecated +set(QT_HASH_qt5-scxml 2a4719af94baefe7f0ca5a23239d07a05285a1698b052d17bb87bc221bbbc8bc25a70ff06d70d41ed7ac6a7e6646be9c516d8187c9098da1158c08e27a4b0bb8) +set(QT_HASH_qt5-sensors d0a34e0718cc727b1256601bc5f9a2975532d728fdf0cb7678824c7d36aa5049d9c2886053821ec93a238120441c980027306ac633677617867c7aee40bb560b) +set(QT_HASH_qt5-serialport 353cc5f708367d646bd312f7d675b417bad4df44356f1dfc8b6ce846a86fd6d5955ec4d26f943e50f4a7b94cc6389fe658959e90bbb5ab3cdaefed0efe6ae72b) +set(QT_HASH_qt5-speech 78a13218a639276c9b253566a1df52e2363847eac76df3962ba2a7178800206beb57859d22c7c99fa1579cb3aa7ab94baed1a6319ba946d4a64cba9e3bf52b05) +set(QT_HASH_qt5-svg 101e9c8fc05b1bb9c4e869564bff8e5723dd35f0ef557185e56e9dc12fdce74c531522c9642cdff639900eccf7ed0e04bfa48142741259697dded990fb481730) +set(QT_HASH_qt5-tools 3bd32a302af6e81cd5d4eb07d60c5ef233f1ca7af1aae180c933ac28fafffce28c6c868eb032108747937ea951d6d4f0df5516841bc65d22c529207147533a8b) +set(QT_HASH_qt5-virtualkeyboard 3ba04d171756a5434424833c5198a23e0df53eeebe9ea542047e094f83f38492d93f901cac67cf7e55aca6a71289ce3c6f5d8ac10a8d051b291155ebb8432016) +set(QT_HASH_qt5-webchannel 7ac5e372695616863d247c5a61e5763a3934b58165e35c43da5ef1797d80005aa3d6eb258931ae7ee2b1f6a6fa743635ac4678c9cfe375cefa76e74cc81d095b) +set(QT_HASH_qt5-websockets 1b23b79bff4289e785daf51441daaecf6de66ca5a3febfdd8fdb8ce871471bca4faf7663d68b23aaf562b1ebd6e9c8c27b3074f4b93bc9fcd3a0c54f7f79a9c4) +set(QT_HASH_qt5-webview 11502597d5e3a9b8a3a90025b56c086a3412743019384558617c397a8ad4a0f646b406a4fbeb31ca45e6e573d1fb06cd5b22b8c0179695d06cc3d492289a1c85) +set(QT_HASH_qt5-winextras 6555a42d4bbeb46b394f573b6ed7926ec21cf6024de3c5f43000373bf0a2f4544f19866e2c9469da2d60b5dd99fb046765be5d3f8d5025169e319795bbf66d9e) +set(QT_HASH_qt5-xmlpatterns 5cdf51878f8bb42db57110acc0c3985a95af098da44e5dda505e0716fef5afc780419058158f7a8f9a0fe3fed83fd64abd856b4dbcdca20efa5e985fa85cc348) # deprecated +##TODO +set(QT_HASH_qt5-doc ce2c003b37829da102f243ca271548cff0597b4b667109ca9533971a490b8b20eb3183af6e0b209ad58964f2be2e757f83933a3f8c484dd0814750e24d1a244e) +set(QT_HASH_qt5-x11extras beaefc865299f4e7c637baa96eb3a69adbe1a41fc7735b46cfec0768c9243391600e69078630fffb4aceba106b7512fd802e745abc38ddab5253233301c93ed9) +set(QT_HASH_qt5-androidextras cacd9252f313595d21eb6a94ffabbd5fff476af82aa619b4edfc77a9f405f52bd1b89da97c8f7dadf8c403035a243205a25a2f85250ebc0590bf68f914cdbf3a) +#set(QT_HASH_qt5-canvas3d 0) deprecated +set(QT_HASH_qt5-translations 483b5d919f43c96a032e610cf6316989e7b859ab177cb2f7cb9bb10ebcddf8c9be8e04ff12db38a317c618d13f88455a4d434c7a1133f453882da4e026dd8cbe) +set(QT_HASH_qt5-serialbus c4793f5425ca0191435d75a8fd95a623cc847d41b8722421c0bf0fdfddda1a158fd2a00f5d997f00de4fcb271a158f3273d636ef2553ccd6b90b4d072b1eb55b) +set(QT_HASH_qt5-webengine de64c30819f5e2f8620c853ff22b2f9717641477aef4432a552a72d1d67ed62ed61572afee6de3f2c9f32dee28f4f786ffd63fc465aa42c0ae1e87ea28341756) +set(QT_HASH_qt5-webglplugin 14b9a0c08472121165eba82f3c81518be7b19484b7bee7887df9751edc6e2e7e76d06f961b180427014beb71c725d343e9f196f37690e2d207511f7639bd2627) +set(QT_HASH_qt5-wayland e8657ed676873da7b949e6a1605d025918a03336af9c68f32741945ec3c71a604def55bb00737ba4d97b91c00d0e2df1a83cdcedcf5795c6b2a1ef2caa21c91c) + +if(QT_UPDATE_VERSION) + message(STATUS "Running Qt in automatic version port update mode!") + set(_VCPKG_INTERNAL_NO_HASH_CHECK 1) + if("${PORT}" MATCHES "qt5-base") + foreach(_current_qt_port ${QT_PORT_LIST}) + set(_current_control "${VCPKG_ROOT_DIR}/ports/qt5-${_current_qt_port}/CONTROL") + file(READ ${_current_control} _control_contents) + #message(STATUS "Before: \n${_control_contents}") + string(REGEX REPLACE "Version:[^0-9]+[0-9]\.[0-9]+\.[0-9]+[^\n]*\n" "Version: ${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}\n" _control_contents "${_control_contents}") + #message(STATUS "After: \n${_control_contents}") + file(WRITE ${_current_control} "${_control_contents}") + endforeach() + endif() +endif() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_submodule_installation.cmake b/ports/qt5-base/cmake/qt_submodule_installation.cmake new file mode 100644 index 00000000000000..197c0ace4829eb --- /dev/null +++ b/ports/qt5-base/cmake/qt_submodule_installation.cmake @@ -0,0 +1,11 @@ + + +function(qt_submodule_installation) + qt_download_submodule(OUT_SOURCE_PATH TARGET_SOURCE_PATH ${ARGV}) + if(QT_UPDATE_VERSION) + SET(VCPKG_POLICY_EMPTY_PACKAGE enabled PARENT_SCOPE) + else() + qt_build_submodule(${TARGET_SOURCE_PATH} ${ARGV}) + qt_install_copyright(${TARGET_SOURCE_PATH}) + endif() +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/configure_qt.cmake b/ports/qt5-base/configure_qt.cmake deleted file mode 100644 index c396235625abf5..00000000000000 --- a/ports/qt5-base/configure_qt.cmake +++ /dev/null @@ -1,72 +0,0 @@ -function(configure_qt) - cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) - - if(NOT _csc_PLATFORM) - message(FATAL_ERROR "configure_qt requires a PLATFORM argument.") - endif() - - vcpkg_find_acquire_program(PERL) - get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) - - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_add_to_path("${PERL_EXE_PATH}") - - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - list(APPEND _csc_OPTIONS "-static") - endif() - - if(VCPKG_CRT_LINKAGE STREQUAL "static") - list(APPEND _csc_OPTIONS "-static-runtime") - endif() - - if(CMAKE_HOST_WIN32) - set(CONFIGURE_BAT "configure.bat") - else() - set(CONFIGURE_BAT "configure") - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} - -debug - -prefix ${CURRENT_INSTALLED_DIR}/debug - -extprefix ${CURRENT_PACKAGES_DIR}/debug - -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug - -datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug - -plugindir ${CURRENT_INSTALLED_DIR}/debug/plugins - -qmldir ${CURRENT_INSTALLED_DIR}/debug/qml - -headerdir ${CURRENT_PACKAGES_DIR}/include - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/debug/lib - -platform ${_csc_PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} - -release - -prefix ${CURRENT_INSTALLED_DIR} - -extprefix ${CURRENT_PACKAGES_DIR} - -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 - -archdatadir ${CURRENT_INSTALLED_DIR}/share/qt5 - -datadir ${CURRENT_INSTALLED_DIR}/share/qt5 - -plugindir ${CURRENT_INSTALLED_DIR}/plugins - -qmldir ${CURRENT_INSTALLED_DIR}/qml - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/lib - -platform ${_csc_PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - endif() - -endfunction() diff --git a/ports/qt5-base/fix-system-freetype.patch b/ports/qt5-base/fix-system-freetype.patch deleted file mode 100644 index d83fc98913bede..00000000000000 --- a/ports/qt5-base/fix-system-freetype.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- - src/gui/configure.json | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/gui/configure.json b/src/gui/configure.json -index 0332631e..bd64b7b1 100644 ---- a/src/gui/configure.json -+++ b/src/gui/configure.json -@@ -164,8 +164,7 @@ - }, - "sources": [ - { "type": "pkgConfig", "args": "freetype2" }, -- { "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" }, -- { "type": "freetype", "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" } -+ { "libs": "-lfreetype" } - ] - }, - "fontconfig": { diff --git a/ports/qt5-base/fix-system-pcre2-linux.patch b/ports/qt5-base/fix-system-pcre2-linux.patch deleted file mode 100644 index 92bdf04cec8f37..00000000000000 --- a/ports/qt5-base/fix-system-pcre2-linux.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur a/src/corelib/configure.json b/src/corelib/configure.json ---- a/src/corelib/configure.json 2018-08-23 02:58:54.544949500 -0400 -+++ b/src/corelib/configure.json 2018-08-23 02:59:31.481175300 -0400 -@@ -181,8 +181,10 @@ - "builds": { - "debug": "-lpcre2-16d", - "release": "-lpcre2-16" -- } -- } -+ }, -+ "condition": "config.win32" -+ }, -+ { "libs": "-lpcre2-16", "condition": "!config.win32" } - ] - }, - "pps": { diff --git a/ports/qt5-base/fix-system-pcre2.patch b/ports/qt5-base/fix-system-pcre2.patch deleted file mode 100644 index 5e8d4616e872e1..00000000000000 --- a/ports/qt5-base/fix-system-pcre2.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur a/src/corelib/configure.json b/src/corelib/configure.json ---- a/src/corelib/configure.json 2018-06-15 03:29:31.000000000 -0400 -+++ b/src/corelib/configure.json 2018-08-23 00:46:04.380187100 -0400 -@@ -177,7 +177,12 @@ - }, - "sources": [ - { "type": "pkgConfig", "args": "libpcre2-16" }, -- "-lpcre2-16" -+ { -+ "builds": { -+ "debug": "-lpcre2-16d", -+ "release": "-lpcre2-16" -+ } -+ } - ] - }, - "pps": { diff --git a/ports/qt5-base/fixcmake.py b/ports/qt5-base/fixcmake.py deleted file mode 100644 index bcfb12ac592569..00000000000000 --- a/ports/qt5-base/fixcmake.py +++ /dev/null @@ -1,68 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif "_install_prefix}/lib/qtmaind.lib" in line: - # qtmaind.lib has been moved to manual-link: - builder += line.replace("/lib/", "/debug/lib/manual-link/") - elif "_install_prefix}/lib/qtmain.lib" in line: - # qtmain(d).lib has been moved to manual-link: - builder += line.replace("/lib/", "/lib/manual-link/") - builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib\")\n" - builder += "\n" - builder += " set_target_properties(Qt5::WinMain PROPERTIES\n" - builder += " IMPORTED_LOCATION_DEBUG ${imported_location_debug}\n" - builder += " )\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5-base/install_qt.cmake b/ports/qt5-base/install_qt.cmake deleted file mode 100644 index 4eed6cbe5c1e96..00000000000000 --- a/ports/qt5-base/install_qt.cmake +++ /dev/null @@ -1,80 +0,0 @@ -function(install_qt) - cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) - - if (_bc_DISABLE_PARALLEL) - set(NUMBER_OF_PROCESSORS "1") - else() - if(DEFINED ENV{NUMBER_OF_PROCESSORS}) - set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS}) - else() - execute_process( - COMMAND nproc - OUTPUT_VARIABLE NUMBER_OF_PROCESSORS - ) - string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") - string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") - endif() - endif() - - if(CMAKE_HOST_WIN32) - vcpkg_find_acquire_program(JOM) - set(INVOKE "${JOM}" /J ${NUMBER_OF_PROCESSORS}) - else() - find_program(MAKE make) - set(INVOKE "${MAKE}" -j${NUMBER_OF_PROCESSORS}) - endif() - vcpkg_find_acquire_program(PYTHON3) - get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") - - if (CMAKE_HOST_WIN32) - # flex and bison for ANGLE library - vcpkg_find_acquire_program(FLEX) - get_filename_component(FLEX_EXE_PATH ${FLEX} DIRECTORY) - get_filename_component(FLEX_DIR ${FLEX_EXE_PATH} NAME) - - file(COPY ${FLEX_EXE_PATH} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools" ) - set(FLEX_TEMP "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools/${FLEX_DIR}") - file(RENAME "${FLEX_TEMP}/win_bison.exe" "${FLEX_TEMP}/bison.exe") - file(RENAME "${FLEX_TEMP}/win_flex.exe" "${FLEX_TEMP}/flex.exe") - vcpkg_add_to_path("${FLEX_TEMP}") - endif() - - set(_path "$ENV{PATH}") - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") - vcpkg_execute_required_process( - COMMAND ${INVOKE} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - vcpkg_execute_required_process( - COMMAND ${INVOKE} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Package ${TARGET_TRIPLET}-rel") - set(ENV{PATH} "${_path}") - vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") - vcpkg_execute_required_process( - COMMAND ${INVOKE} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel - ) - vcpkg_execute_required_process( - COMMAND ${INVOKE} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME package-${TARGET_TRIPLET}-rel - ) - message(STATUS "Package ${TARGET_TRIPLET}-rel done") - endif() - - set(ENV{PATH} "${_path}") - -endfunction() diff --git a/ports/qt5-base/patches/Qt5BasicConfig.patch b/ports/qt5-base/patches/Qt5BasicConfig.patch new file mode 100644 index 00000000000000..4f5d1fab0bc724 --- /dev/null +++ b/ports/qt5-base/patches/Qt5BasicConfig.patch @@ -0,0 +1,194 @@ +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index c72989288..a88234dca 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -53,8 +53,12 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura + set(_lib_deps) + set(_link_flags) + +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\") ++!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ if(\"${Configuration}\" STREQUAL \"DEBUG\") ++ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}\") ++ else() ++ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\") ++ endif() + !!ELSE + set(_qt5_install_libs \"$${CMAKE_LIB_DIR}\") + !!ENDIF +@@ -125,6 +129,8 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura + elseif(EXISTS \"${_flag}\") + # The flag is an absolute path to an existing library + list(APPEND _lib_deps \"${_flag}\") ++ elseif(_flag MATCHES \"\\\\.lib$\") #Library name only. No -l. Probably missing some cases ++ list(APPEND _lib_deps \"${_flag}\") + elseif(_flag MATCHES \"^-L(.*)$\") + # Handle -Lfoo flags by putting their paths in the search path used by find_library above + list(APPEND _search_paths \"${CMAKE_MATCH_1}\") +@@ -147,7 +153,11 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + + !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") ++ if(\"${Configuration}\" STREQUAL \"DEBUG\") # 1 ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") ++ else() ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") ++ endif() + !!ELSE + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ENDIF +@@ -174,21 +184,22 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + ) + + !!IF !isEmpty(CMAKE_STATIC_TYPE) +- if(NOT "${IsDebugAndRelease}") +- set(_genex_condition \"1\") ++ #if(NOT "${IsDebugAndRelease}") ++ # set(_genex_condition \"1\") ++ #else() ++ if("${Configuration}" STREQUAL "DEBUG") ++ set(_genex_condition \"$\") + else() +- if("${Configuration}" STREQUAL "DEBUG") +- set(_genex_condition \"$\") +- else() +- set(_genex_condition \"$>\") +- endif() ++ set(_genex_condition \"$>\") + endif() ++ #endif() + + if(_static_deps) + set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\") + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES + \"${_static_deps_genex}\" + ) ++ #message(STATUS \"Target Qt5::$${CMAKE_MODULE_NAME} static links: ${_static_dep} through ${_static_dep_genex}\") # Added for debugging + endif() + + set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\") +@@ -205,13 +216,18 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES + \"${_static_link_flags_genex}\" + ) ++ #message(STATUS \"Target Qt5::$${CMAKE_MODULE_NAME} static link flags: ${_static_link_flags} through ${_static_link_flags_genex}\") + endif() + endif() + !!ENDIF + + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") ++ if(\"${Configuration}\" STREQUAL \"DEBUG\") ++ set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") ++ else() ++ set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") ++ endif() + !!ELSE + set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") + !!ENDIF +@@ -373,13 +389,14 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + + !!IF !isEmpty(CMAKE_STATIC_TYPE) + if(NOT Qt5_EXCLUDE_STATIC_DEPENDENCIES) +-!!IF !isEmpty(CMAKE_DEBUG_TYPE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\") + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG + _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES + _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS + ) ++ endif() + !!ELSE + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG +@@ -387,22 +404,21 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS + ) + !!ENDIF +-!!ENDIF + +-!!IF !isEmpty(CMAKE_RELEASE_TYPE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\") + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE + _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES + _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS + ) ++ endif() + !!ELSE + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE + _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES + _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS + ) +-!!ENDIF + !!ENDIF + endif() + +@@ -466,7 +482,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF isEmpty(CMAKE_DEBUG_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) ++ if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE + if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE +@@ -474,13 +490,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS + !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" + !!ELSE + \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" + !!ENDIF + AND EXISTS + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ENDIF +@@ -543,7 +559,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + + !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++ if(\"${Configuration}\" STREQUAL \"DEBUG\") ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++ else() ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++ endif() + !!ELSE + set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") + !!ENDIF +@@ -557,15 +577,15 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + ${_Qt5${Plugin}_STATIC_${Configuration}_LIB_DEPENDENCIES} + ) + +- if(NOT "${IsDebugAndRelease}") +- set(_genex_condition \"1\") ++ #if(NOT "${IsDebugAndRelease}") ++ # set(_genex_condition \"1\") ++ #else() ++ if("${Configuration}" STREQUAL "DEBUG") ++ set(_genex_condition \"$\") + else() +- if("${Configuration}" STREQUAL "DEBUG") +- set(_genex_condition \"$\") +- else() +- set(_genex_condition \"$>\") +- endif() ++ set(_genex_condition \"$>\") + endif() ++ #endif() + if(_static_deps) + set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\") + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES diff --git a/ports/qt5-base/patches/Qt5GuiConfigExtras.patch b/ports/qt5-base/patches/Qt5GuiConfigExtras.patch new file mode 100644 index 00000000000000..0029f2aa5d6fc2 --- /dev/null +++ b/ports/qt5-base/patches/Qt5GuiConfigExtras.patch @@ -0,0 +1,13 @@ +diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in +index 84dbbfebd..accb86e3f 100644 +--- a/src/gui/Qt5GuiConfigExtras.cmake.in ++++ b/src/gui/Qt5GuiConfigExtras.cmake.in +@@ -148,6 +153,8 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) + !!ENDIF + unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE) + ++ find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d ${_lib} NAMES_PER_DIR ++ PATHS \"${_qt5Gui_install_prefix}/debug/lib\" NO_DEFAULT_PATH) + find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d + PATHS \"${LibDir}\" + !!IF !mac diff --git a/ports/qt5-base/patches/Qt5PluginTarget.patch b/ports/qt5-base/patches/Qt5PluginTarget.patch new file mode 100644 index 00000000000000..a8377b58577435 --- /dev/null +++ b/ports/qt5-base/patches/Qt5PluginTarget.patch @@ -0,0 +1,74 @@ +diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in +index 5baf0fdb1..185abfffd 100644 +--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in +@@ -15,13 +15,14 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES}) + endif() + endforeach() + +-!!IF !isEmpty(CMAKE_RELEASE_TYPE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file( +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE +- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES +- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS +-) ++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\") ++ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE ++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES ++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS ++ ) ++endif() + !!ELSE + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE +@@ -29,15 +30,15 @@ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS + ) + !!ENDIF +-!!ENDIF + +-!!IF !isEmpty(CMAKE_DEBUG_TYPE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file( +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG +- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES +- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS +-) ++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\") ++ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG ++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES ++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS ++ ) ++endif() + !!ELSE + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG +@@ -45,19 +46,18 @@ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS + ) + !!ENDIF +-!!ENDIF + + set_property(TARGET Qt5::$$CMAKE_PLUGIN_NAME PROPERTY INTERFACE_SOURCES + \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_$${CMAKE_PLUGIN_NAME}_Import.cpp\" + ) + !!ENDIF + +-!!IF !isEmpty(CMAKE_RELEASE_TYPE) +-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) +-!!ENDIF +-!!IF !isEmpty(CMAKE_DEBUG_TYPE) +-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) +-!!ENDIF ++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_RELEASE}\") ++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) ++endif() ++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_DEBUG}\") ++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) ++endif() + + list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} Qt5::$${CMAKE_PLUGIN_NAME}) diff --git a/ports/qt5-base/patches/create_cmake.patch b/ports/qt5-base/patches/create_cmake.patch new file mode 100644 index 00000000000000..69bd39a2a3a48d --- /dev/null +++ b/ports/qt5-base/patches/create_cmake.patch @@ -0,0 +1,41 @@ +diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf +index 4aa5dad46..cee6d2882 100644 +--- a/mkspecs/features/create_cmake.prf ++++ b/mkspecs/features/create_cmake.prf +@@ -212,10 +212,10 @@ contains(CONFIG, plugin) { + CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _) + + win32 { +- !mingw|qtConfig(debug_and_release): debug_suffix="d" ++ debug_suffix="d" + + CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl + CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl + + isEmpty(CMAKE_STATIC_TYPE) { + CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll +@@ -295,6 +295,7 @@ CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";") + equals(TEMPLATE, aux): CMAKE_FEATURE_PROPERTY_PREFIX = "INTERFACE_" + + mac { ++ CMAKE_FIND_OTHER_LIBRARY_BUILD = "true" + !isEmpty(CMAKE_STATIC_TYPE) { + CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a + CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a +@@ -315,7 +316,7 @@ mac { + CMAKE_WINDOWS_BUILD = "true" + CMAKE_FIND_OTHER_LIBRARY_BUILD = "true" + +- !mingw|qtConfig(debug_and_release): debug_suffix="d" ++ debug_suffix="d" + + CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll + CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll +@@ -342,6 +342,7 @@ mac { + CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib + } + } else { ++ CMAKE_FIND_OTHER_LIBRARY_BUILD = "true" + !isEmpty(CMAKE_STATIC_TYPE) { + CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a + CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a diff --git a/ports/qt5-base/patches/egl.patch b/ports/qt5-base/patches/egl.patch new file mode 100644 index 00000000000000..17f0a55dec2a82 --- /dev/null +++ b/ports/qt5-base/patches/egl.patch @@ -0,0 +1,16 @@ +diff --git a/src/gui/configure.json b/src/gui/configure.json +index 5fceb1150..7702cb261 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -220,7 +220,10 @@ + "headers": "EGL/egl.h", + "sources": [ + { "type": "pkgConfig", "args": "egl" }, +- { "type": "makeSpec", "spec": "EGL" } ++ { "type": "makeSpec", "spec": "EGL" }, ++ { "libs": "-lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" }, ++ { "libs": "-DGL_GLES_PROTOTYPES=1 -DGL_GLEXT_PROTOTYPES -DEGL_EGL_PROTOTYPES=1 -DEGL_EGLEXT_PROTOTYPES -lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" }, ++ { "libs": "-DANGLE_EXPORT -DANGLE_UTIL_EXPORT -DGL_API -DGL_APICALL -DEGLAPI -DGL_GLES_PROTOTYPES=1 -DGL_GLEXT_PROTOTYPES -DEGL_EGL_PROTOTYPES=1 -DEGL_EGLEXT_PROTOTYPES -lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" } + ] + }, + "freetype": { diff --git a/ports/qt5-base/patches/gui_configure.patch b/ports/qt5-base/patches/gui_configure.patch new file mode 100644 index 00000000000000..7a283dc623e085 --- /dev/null +++ b/ports/qt5-base/patches/gui_configure.patch @@ -0,0 +1,29 @@ +diff --git a/src/gui/configure.json b/src/gui/configure.json +index c51e3ceee..7f7e206b6 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -239,9 +239,9 @@ + "headers": "ft2build.h", + "sources": [ + { "type": "pkgConfig", "args": "freetype2" }, +- { "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" }, ++ { "type": "freetype", "libs": "-lbreakfreetypeautofind", "condition": "!config.wasm" }, + { "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" }, +- { "libs": "-lfreetype" } ++ { "libs": "-lbreakfreetypeautofind" } + ], + "use": [ + { "lib": "zlib", "condition": "features.system-zlib" } +@@ -262,7 +262,10 @@ + "headers": "fontconfig/fontconfig.h", + "sources": [ +- { "type": "pkgConfig", "args": "fontconfig" }, ++ { "type": "pkgConfig", "args": "breakfontconfig" }, +- { "type": "freetype", "libs": "-lfontconfig" } ++ { "type": "freetype", "libs": "-lbreakautofind" }, ++ { "libs": "-lfontconfig -lexpat" }, ++ { "libs": "-llibfontconfig -llibexpat" }, ++ "-lfontconfig" + ], + "use": "freetype" + }, diff --git a/ports/qt5-base/patches/icu.patch b/ports/qt5-base/patches/icu.patch new file mode 100644 index 00000000000000..16c13b0c36ce27 --- /dev/null +++ b/ports/qt5-base/patches/icu.patch @@ -0,0 +1,24 @@ +diff --git a/src/corelib/configure.json b/src/corelib/configure.json +index de8d26a12..068b80c51 100644 +--- a/src/corelib/configure.json ++++ b/src/corelib/configure.json +@@ -106,13 +106,17 @@ + "headers": [ "unicode/utypes.h", "unicode/ucol.h", "unicode/ustring.h" ], + "sources": [ + { ++ "libs": "", + "builds": { +- "debug": "-lsicuind -lsicuucd -lsicudtd", +- "release": "-lsicuin -lsicuuc -lsicudt" ++ "debug": "-licuind -licuucd -licudtd", ++ "release": "-licuin -licuuc -licudt" + }, + "condition": "config.win32 && !features.shared" + }, ++ { "libs": "-licuind -licuucd -licudtd", "condition": "config.win32 && !features.shared"}, ++ { "libs": "-licuin -licuuc -licudt", "condition": "config.win32 && !features.shared"}, + { "libs": "-licuin -licuuc -licudt", "condition": "config.win32 && features.shared" }, ++ { "libs": "-licuind -licuucd -licudtd", "condition": "config.win32 && features.shared" }, + { "libs": "-licui18n -licuuc -licudata", "condition": "!config.win32" } + ], + "use": [ diff --git a/ports/qt5-base/patches/limits_include.patch b/ports/qt5-base/patches/limits_include.patch new file mode 100644 index 00000000000000..0ed514b7633d2d --- /dev/null +++ b/ports/qt5-base/patches/limits_include.patch @@ -0,0 +1,51 @@ +From 61325e4547225b8b2ecefda4ca328a38c075c909 Mon Sep 17 00:00:00 2001 +From: Nicolas Fella +Date: Wed, 11 Aug 2021 15:35:05 +0200 +Subject: [PATCH] Add missing limits include + +--- + src/corelib/global/qendian.h | 1 + + src/corelib/global/qfloat16.h | 1 + + src/corelib/text/qbytearraymatcher.h | 2 ++ + 3 files changed, 4 insertions(+) + +diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h +index 257efbbdbe..05f11d6f81 100644 +--- a/src/corelib/global/qendian.h ++++ b/src/corelib/global/qendian.h +@@ -47,6 +47,7 @@ + // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems + #include + #include ++#include + + #ifdef min // MSVC + #undef min +diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h +index c7a9c87af3..3287d7cbf2 100644 +--- a/src/corelib/global/qfloat16.h ++++ b/src/corelib/global/qfloat16.h +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__) + // All processors that support AVX2 do support F16C too. That doesn't mean +diff --git a/src/corelib/text/qbytearraymatcher.h b/src/corelib/text/qbytearraymatcher.h +index 0eedfc1d20..f5f9bef7b8 100644 +--- a/src/corelib/text/qbytearraymatcher.h ++++ b/src/corelib/text/qbytearraymatcher.h +@@ -42,6 +42,8 @@ + + #include + ++#include ++ + QT_BEGIN_NAMESPACE + + +-- +2.32.0 + diff --git a/ports/qt5-base/patches/mysql-configure.patch b/ports/qt5-base/patches/mysql-configure.patch new file mode 100644 index 00000000000000..1ec06734ecbd9d --- /dev/null +++ b/ports/qt5-base/patches/mysql-configure.patch @@ -0,0 +1,11 @@ +--- a/src/plugins/sqldrivers/configure.json ++++ b/src/plugins/sqldrivers/configure.json +@@ -65,7 +65,7 @@ + ], + "main": "mysql_get_client_version();" + }, +- "headers": "mysql.h", ++ "headers": "mysql/mysql.h", + "sources": [ + { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": true }, + { "type": "mysqlConfig", "query": "--libs", "cleanlibs": true }, diff --git a/ports/qt5-base/patches/mysql_plugin_include.patch b/ports/qt5-base/patches/mysql_plugin_include.patch new file mode 100644 index 00000000000000..a66300d2c98910 --- /dev/null +++ b/ports/qt5-base/patches/mysql_plugin_include.patch @@ -0,0 +1,11 @@ +--- a/src/plugins/sqldrivers/mysql/qsql_mysql_p.h ++++ b/src/plugins/sqldrivers/mysql/qsql_mysql_p.h +@@ -57,7 +57,7 @@ + #include + #endif + +-#include ++#include + + #ifdef QT_PLUGIN + #define Q_EXPORT_SQLDRIVER_MYSQL diff --git a/ports/qt5-base/patches/qt_app.patch b/ports/qt5-base/patches/qt_app.patch new file mode 100644 index 00000000000000..e04446bf22478c --- /dev/null +++ b/ports/qt5-base/patches/qt_app.patch @@ -0,0 +1,17 @@ +diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf +index 8354f30e..8f24b72e 100644 +--- a/mkspecs/features/qt_app.prf ++++ b/mkspecs/features/qt_app.prf +@@ -27,10 +27,11 @@ host_build:force_bootstrap { + QT -= core core-private xml + QT += bootstrap-private + } + target.path = $$[QT_HOST_BINS] ++ CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable + } else { + !build_pass:qtConfig(debug_and_release): CONFIG += release +- target.path = $$[QT_INSTALL_BINS] ++ target.path = $$[QT_HOST_BINS] + CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable + } + INSTALLS += target diff --git a/ports/qt5-base/patches/static_opengl.patch b/ports/qt5-base/patches/static_opengl.patch new file mode 100644 index 00000000000000..51818b8b7cd70f --- /dev/null +++ b/ports/qt5-base/patches/static_opengl.patch @@ -0,0 +1,62 @@ +diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf +index f21848f94..202c49688 100644 +--- a/mkspecs/features/win32/opengl.prf ++++ b/mkspecs/features/win32/opengl.prf +@@ -30,7 +30,7 @@ qtConfig(opengles2) { + LIBS += $$QMAKE_LIBS_OPENGL_ES2 + QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE + } +- qtConfig(static): DEFINES += GL_APICALL= EGLAPI= ++ qtConfig(static): DEFINES += _GDI32_ GL_APICALL= EGLAPI= ANGLE_EXPORT= ANGLE_PLATFORM_EXPORT= + } else { + !qtConfig(dynamicgl) { + QMAKE_LIBS += $$QMAKE_LIBS_OPENGL +diff --git a/src/angle/src/common/gles_common.pri b/src/angle/src/common/gles_common.pri +index 70b65dd4c..1dcc96af5 100644 +--- a/src/angle/src/common/gles_common.pri ++++ b/src/angle/src/common/gles_common.pri +@@ -23,7 +23,8 @@ for(libname, STATICLIBS) { + PRE_TARGETDEPS += $$staticlib + } + +-DEFINES += LIBANGLE_IMPLEMENTATION LIBGLESV2_IMPLEMENTATION GL_APICALL= GL_GLEXT_PROTOTYPES= EGLAPI= ++!qtConfig(static): DEFINES += LIBANGLE_IMPLEMENTATION LIBGLESV2_IMPLEMENTATION ++qtConfig(static): DEFINES += GL_APICALL= EGLAPI= ANGLE_EXPORT= ANGLE_PLATFORM_EXPORT= + !winrt: DEFINES += ANGLE_ENABLE_D3D9 ANGLE_SKIP_DXGI_1_2_CHECK + + QT_FOR_CONFIG += gui-private +diff --git a/src/3rdparty/angle/include/platform/Platform.h b/src/3rdparty/angle/include/platform/Platform.h +index aa1221a86..a49ee4f6d 100644 +--- a/src/3rdparty/angle/include/platform/Platform.h ++++ b/src/3rdparty/angle/include/platform/Platform.h +@@ -12,7 +12,7 @@ + #include + #include + +-#if defined(_WIN32) ++#if defined(_WIN32) && !defined(ANGLE_PLATFORM_EXPORT) + # if !defined(LIBANGLE_IMPLEMENTATION) + # define ANGLE_PLATFORM_EXPORT __declspec(dllimport) + # else +diff --git a/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp b/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp +index d4459ec28..d1416041e 100644 +--- a/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp ++++ b/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp +@@ -3505,7 +3505,7 @@ ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id, + } + } + +-GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum target, ++ANGLE_EXPORT void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, +@@ -3530,7 +3530,7 @@ GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum targe + } + } + +-GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewSideBySideANGLE(GLenum target, ++ANGLE_EXPORT void GL_APIENTRY FramebufferTextureMultiviewSideBySideANGLE(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, diff --git a/ports/qt5-base/patches/windows_prf.patch b/ports/qt5-base/patches/windows_prf.patch new file mode 100644 index 00000000000000..6051daae8fab2f --- /dev/null +++ b/ports/qt5-base/patches/windows_prf.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf +index 272170d4..70b8ea2e 100644 +--- a/mkspecs/features/win32/windows.prf ++++ b/mkspecs/features/win32/windows.prf +@@ -6,7 +6,7 @@ contains(TEMPLATE, ".*app") { + + qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) { + isEqual(entryLib, -lqtmain) { +- lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB ++ lib = $$QT.core.libs/manual-link/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB + PRE_TARGETDEPS += $$lib + QMAKE_LIBS += $$lib + } else { diff --git a/ports/qt5-base/patches/winmain_pro.patch b/ports/qt5-base/patches/winmain_pro.patch new file mode 100644 index 00000000000000..66460ccd6f1755 --- /dev/null +++ b/ports/qt5-base/patches/winmain_pro.patch @@ -0,0 +1,27 @@ +diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro +index 9cb6ab0c..52c7876e 100644 +--- a/src/winmain/winmain.pro ++++ b/src/winmain/winmain.pro +@@ -3,7 +3,7 @@ + + TEMPLATE = lib + TARGET = qtmain +-DESTDIR = $$QT.core.libs ++DESTDIR = $$QT.core.libs/manual-link + + CONFIG += static + QT = core +@@ -27,7 +27,12 @@ winrt { + } + + load(qt_installs) +- ++!qt_no_install_library { ++ host_build: \ ++ target.path = $$[QT_HOST_LIBS]/manual-link ++ else: \ ++ target.path = $$[QT_INSTALL_LIBS]/manual-link ++} + TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end + + load(qt_targets) diff --git a/ports/qt5-base/patches/xlib.patch b/ports/qt5-base/patches/xlib.patch new file mode 100644 index 00000000000000..07cba5b8254a2e --- /dev/null +++ b/ports/qt5-base/patches/xlib.patch @@ -0,0 +1,39 @@ +diff --git a/src/gui/configure.json b/src/gui/configure.json +index 9a749516b..242f47504 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -568,7 +568,9 @@ + }, + "headers": "X11/Xlib.h", + "sources": [ +- { "type": "makeSpec", "spec": "X11" } ++ { "type": "makeSpec", "spec": "X11" }, ++ { "type": "pkgConfig", "args": "x11" }, ++ { "type": "pkgConfig", "args": "x11 --static" } + ] + }, + "x11sm": { +@@ -590,6 +592,7 @@ + "headers": "xcb/xcb.h", + "sources": [ + { "type": "pkgConfig", "args": "xcb >= 1.11" }, ++ { "type": "pkgConfig", "args": "xcb >= 1.11 --static" }, + "-lxcb" + ] + }, +@@ -691,6 +694,7 @@ + "headers": "X11/Xlib-xcb.h", + "sources": [ + { "type": "pkgConfig", "args": "x11-xcb" }, ++ { "type": "pkgConfig", "args": "x11-xcb --static" }, + "-lX11-xcb" + ], + "use": "xcb xlib" +@@ -711,6 +715,7 @@ + "headers": "xcb/xkb.h", + "sources": [ + { "type": "pkgConfig", "args": "xcb-xkb" }, ++ { "type": "pkgConfig", "args": "xcb-xkb --static" }, + "-lxcb-xkb" + ], + "use": "xcb" diff --git a/ports/qt5-base/patches/zstdd.patch b/ports/qt5-base/patches/zstdd.patch new file mode 100644 index 00000000000000..9d10890c0f752d --- /dev/null +++ b/ports/qt5-base/patches/zstdd.patch @@ -0,0 +1,16 @@ +diff --git a/configure.json b/configure.json +index 50d69b740..7149e6803 100644 +--- a/configure.json ++++ b/configure.json +@@ -182,7 +182,10 @@ + }, + "sources": [ + { "type": "pkgConfig", "args": "libzstd >= 1.3" }, +- "-lzstd" ++ "-lzstd", ++ "-lzstdd", ++ "-lzstd -pthread", ++ "-lzstdd -pthread" + ] + }, + "dbus": { diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index c53d30e5b1346c..2bd8475c9cfe9d 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -1,39 +1,105 @@ -include(vcpkg_common_functions) +vcpkg_buildpath_length_warning(37) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(QT_OPENSSL_LINK_DEFAULT ON) +else() + set(QT_OPENSSL_LINK_DEFAULT OFF) +endif() +option(QT_OPENSSL_LINK "Link against OpenSSL at compile-time." ${QT_OPENSSL_LINK_DEFAULT}) + +if (VCPKG_TARGET_IS_LINUX) + message(WARNING "qt5-base currently requires some packages from the system package manager, see https://doc.qt.io/qt-5/linux-requirements.html") + message(WARNING +[[ +qt5-base for qt5-x11extras requires several libraries from the system package manager. Please refer to + https://github.com/microsoft/vcpkg/blob/master/scripts/azure-pipelines/linux/provision-image.sh + for a complete list of them. +]] ) endif() list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) + +if("latest" IN_LIST FEATURES) # latest = core currently + set(QT_BUILD_LATEST ON) + set(PATCHES + patches/Qt5BasicConfig.patch + patches/Qt5PluginTarget.patch + patches/create_cmake.patch + ) +else() + set(PATCHES + patches/Qt5BasicConfig.patch + patches/Qt5PluginTarget.patch + patches/create_cmake.patch + ) +endif() + +set(WITH_PGSQL_PLUGIN OFF) +if("postgresqlplugin" IN_LIST FEATURES) + set(WITH_PGSQL_PLUGIN ON) +endif() + +set(WITH_MYSQL_PLUGIN OFF) +if ("mysqlplugin" IN_LIST FEATURES) + set(WITH_MYSQL_PLUGIN ON) +endif() +if(WITH_MYSQL_PLUGIN AND NOT VCPKG_TARGET_IS_WINDOWS) + message(WARNING "${PORT} is currently not setup to support feature 'mysqlplugin' on platforms other than windows. Feel free to open up a PR to fix it!") +endif() + +include(qt_port_functions) include(configure_qt) include(install_qt) -set(MAJOR_MINOR 5.12) -set(FULL_VERSION ${MAJOR_MINOR}.3) -set(ARCHIVE_NAME "qtbase-everywhere-src-${FULL_VERSION}.tar.xz") -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/${MAJOR_MINOR}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" - FILENAME ${ARCHIVE_NAME} - SHA512 1dab927573eb22b1ae772de3a418f7d3999ea78d6e667a7f2494390dd1f0981ea93f4f892cb6e124ac18812c780ee71da3021b485c61eaf1ef2234a5c12b7fe2 -) -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${ARCHIVE_FILE}" - REF ${FULL_VERSION} -) +######################### +## Find Host and Target mkspec name for configure +include(find_qt_mkspec) +find_qt_mkspec(TARGET_MKSPEC HOST_MKSPEC HOST_TOOLS) +set(QT_PLATFORM_CONFIGURE_OPTIONS TARGET_PLATFORM ${TARGET_MKSPEC}) +if(DEFINED HOST_MKSPEC) + list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_PLATFORM ${HOST_MKSPEC}) +endif() +if(DEFINED HOST_TOOLS) + list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_TOOLS_ROOT ${HOST_TOOLS}) +endif() + +######################### +## Downloading Qt5-Base + +qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH + PATCHES + patches/winmain_pro.patch #Moves qtmain to manual-link + patches/windows_prf.patch #fixes the qtmain dependency due to the above move + patches/qt_app.patch #Moves the target location of qt5 host apps to always install into the host dir. + patches/gui_configure.patch #Patches the gui configure.json to break freetype/fontconfig autodetection because it does not include its dependencies. + patches/icu.patch #Help configure find static icu builds in vcpkg on windows + patches/xlib.patch #Patches Xlib check to actually use Pkgconfig instead of makeSpec only + patches/egl.patch #Fix egl detection logic. + patches/zstdd.patch #Fix detection of zstd in debug builds + patches/mysql_plugin_include.patch #Fix include path of mysql plugin + patches/mysql-configure.patch #Fix mysql project + #patches/static_opengl.patch #Use this patch if you really want to statically link angle on windows (e.g. using -opengl es2 and -static). + #Be carefull since it requires definining _GDI32_ for all dependent projects due to redefinition errors in the + #the windows supplied gl.h header and the angle gl.h otherwise. + #CMake fixes + ${PATCHES} + patches/Qt5GuiConfigExtras.patch # Patches the library search behavior for EGL since angle is not build with Qt + patches/limits_include.patch # Add missing includes to build with gcc 11 + ) # Remove vendored dependencies to ensure they are not picked up by the build -foreach(DEPENDENCY freetype zlib harfbuzzng libjpeg libpng double-conversion sqlite) +foreach(DEPENDENCY zlib freetype harfbuzz-ng libjpeg libpng double-conversion sqlite pcre2) if(EXISTS ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) file(REMOVE_RECURSE ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) endif() endforeach() +#file(REMOVE_RECURSE ${SOURCE_PATH}/include/QtZlib) -file(REMOVE_RECURSE ${SOURCE_PATH}/include/QtZlib) +######################### +## Setup Configure options # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") @@ -41,6 +107,17 @@ set(ENV{_CL_} "/utf-8") set(CORE_OPTIONS -confirm-license -opensource + #-simulator_and_device + #-ltcg + #-combined-angle-lib + # ENV ANGLE_DIR to external angle source dir. (Will always be compiled with Qt) + #-optimized-tools + #-force-debug-info + -verbose +) + +## 3rd Party Libs +list(APPEND CORE_OPTIONS -system-zlib -system-libjpeg -system-libpng @@ -49,210 +126,387 @@ set(CORE_OPTIONS -system-doubleconversion -system-sqlite -system-harfbuzz - -no-fontconfig - -nomake examples - -nomake tests -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - list(APPEND CORE_OPTIONS - -static + -icu + -no-vulkan + -no-angle # Qt does not need to build angle. VCPKG will build angle! + -no-glib ) -endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(PLATFORM "win32-msvc") +if(QT_OPENSSL_LINK) + list(APPEND CORE_OPTIONS -openssl-linked) +endif() - configure_qt( - SOURCE_PATH ${SOURCE_PATH} - PLATFORM ${PLATFORM} - OPTIONS - ${CORE_OPTIONS} - -mp - -opengl dynamic # other options are "-no-opengl", "-opengl angle", and "-opengl desktop" - OPTIONS_RELEASE - LIBJPEG_LIBS="-ljpeg" - ZLIB_LIBS="-lzlib" - LIBPNG_LIBS="-llibpng16" - PSQL_LIBS="-llibpq" - PCRE2_LIBS="-lpcre2-16" - FREETYPE_LIBS="-lfreetype" - OPTIONS_DEBUG - LIBJPEG_LIBS="-ljpegd" - ZLIB_LIBS="-lzlibd" - LIBPNG_LIBS="-llibpng16d" - PSQL_LIBS="-llibpqd" - PCRE2_LIBS="-lpcre2-16d" - FREETYPE_LIBS="-lfreetyped" - ) +if(WITH_PGSQL_PLUGIN) + list(APPEND CORE_OPTIONS -sql-psql) +else() + list(APPEND CORE_OPTIONS -no-sql-psql) +endif() +if(WITH_MYSQL_PLUGIN) + list(APPEND CORE_OPTIONS -sql-mysql) +else() + list(APPEND CORE_OPTIONS -no-sql-mysql) +endif() -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - if (NOT EXISTS "/usr/include/GL/glu.h") - message(FATAL_ERROR "qt5 requires libgl1-mesa-dev and libglu1-mesa-dev, please use your distribution's package manager to install them.\nExample: \"apt-get install libgl1-mesa-dev\" and \"apt-get install libglu1-mesa-dev\"") - endif() +if ("vulkan" IN_LIST FEATURES) + list(APPEND CORE_OPTIONS --vulkan=yes) +else() + list(APPEND CORE_OPTIONS --vulkan=no) +endif() - configure_qt( - SOURCE_PATH ${SOURCE_PATH} - PLATFORM "linux-g++" - OPTIONS - ${CORE_OPTIONS} - OPTIONS_RELEASE - "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libjpeg.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libz.a" - "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/lib/libz.a" - "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" - "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libfreetype.a" - "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpq.a ${CURRENT_INSTALLED_DIR}/lib/libssl.a ${CURRENT_INSTALLED_DIR}/lib/libcrypto.a -ldl -lpthread" - "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libsqlite3.a -ldl -lpthread" - OPTIONS_DEBUG - "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libjpeg.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" - "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" - "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" - "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libfreetyped.a" - "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.a ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a ${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a -ldl -lpthread" - "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libsqlite3.a -ldl -lpthread" - ) +find_library(ZLIB_RELEASE NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ZLIB_DEBUG NAMES z zlib zd zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(JPEG_RELEASE NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(JPEG_DEBUG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(LIBPNG_RELEASE NAMES png16 libpng16 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) #Depends on zlib +find_library(LIBPNG_DEBUG NAMES png16 png16d libpng16 libpng16d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(PSQL_RELEASE NAMES pq libpq PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux) +find_library(PSQL_DEBUG NAMES pq libpq pqd libpqd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") -configure_qt( - SOURCE_PATH ${SOURCE_PATH} - PLATFORM "macx-clang" - OPTIONS - ${CORE_OPTIONS} - OPTIONS_RELEASE - "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libjpeg.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libz.a" - "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/lib/libz.a" - "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" - "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libfreetype.a" - "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpq.a ${CURRENT_INSTALLED_DIR}/lib/libssl.a ${CURRENT_INSTALLED_DIR}/lib/libcrypto.a -ldl -lpthread" - "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libsqlite3.a -ldl -lpthread" - "HARFBUZZ_LIBS=${CURRENT_INSTALLED_DIR}/lib/libharfbuzz.a -framework ApplicationServices" - OPTIONS_DEBUG - "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libjpeg.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" - "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" - "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" - "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libfreetyped.a" - "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.a ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a ${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a -ldl -lpthread" - "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libsqlite3.a -ldl -lpthread" - "HARFBUZZ_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libharfbuzz.a -framework ApplicationServices" -) +if(NOT (PSQL_RELEASE MATCHES ".*\.so") AND NOT (PSQL_DEBUG MATCHES ".*\.so")) + find_library(PSQL_COMMON_RELEASE NAMES pgcommon libpgcommon PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux) + find_library(PSQL_COMMON_DEBUG NAMES pgcommon libpgcommon pgcommond libpgcommond PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(PSQL_PORT_RELEASE NAMES pgport libpgport PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux) + find_library(PSQL_PORT_DEBUG NAMES pgport libpgport pgportd libpgportd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) endif() +find_library(MYSQL_RELEASE NAMES libmysql mysqlclient PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux) +find_library(MYSQL_DEBUG NAMES libmysql libmysqld mysqlclient mysqlclientd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - install_qt(DISABLE_PARALLEL) # prevent race condition on Mac -else() - install_qt() -endif() +find_library(PCRE2_RELEASE NAMES pcre2-16 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(PCRE2_DEBUG NAMES pcre2-16 pcre2-16d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(FREETYPE_RELEASE NAMES freetype PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) #zlib, bzip2, libpng +find_library(FREETYPE_DEBUG NAMES freetype freetyped PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(DOUBLECONVERSION_RELEASE NAMES double-conversion PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(DOUBLECONVERSION_DEBUG NAMES double-conversion PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(HARFBUZZ_RELEASE NAMES harfbuzz PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(HARFBUZZ_DEBUG NAMES harfbuzz PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(SQLITE_RELEASE NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux) +find_library(SQLITE_DEBUG NAMES sqlite3 sqlite3d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +find_library(BROTLI_COMMON_RELEASE NAMES brotlicommon brotlicommon-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(BROTLI_COMMON_DEBUG NAMES brotlicommon brotlicommon-static brotlicommond brotlicommon-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(BROTLI_DEC_RELEASE NAMES brotlidec brotlidec-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(BROTLI_DEC_DEBUG NAMES brotlidec brotlidec-static brotlidecd brotlidec-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*") - list(FILTER BINARY_TOOLS EXCLUDE REGEX "\\.dll\$") - file(INSTALL ${BINARY_TOOLS} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) - file(REMOVE ${BINARY_TOOLS}) +find_library(ICUUC_RELEASE NAMES icuuc libicuuc PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUUC_DEBUG NAMES icuucd libicuucd icuuc libicuuc PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(ICUTU_RELEASE NAMES icutu libicutu PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUTU_DEBUG NAMES icutud libicutud icutu libicutu PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +# Was installed in WSL but not on CI machine +# find_library(ICULX_RELEASE NAMES iculx libiculx PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +# find_library(ICULX_DEBUG NAMES iculxd libiculxd iculx libiculx PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +find_library(ICUIO_RELEASE NAMES icuio libicuio PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUIO_DEBUG NAMES icuiod libicuiod icuio libicuio PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(ICUIN_RELEASE NAMES icui18n libicui18n icuin PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUIN_DEBUG NAMES icui18nd libicui18nd icui18n libicui18n icuin icuind PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(ICUDATA_RELEASE NAMES icudata libicudata icudt PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUDATA_DEBUG NAMES icudatad libicudatad icudata libicudata icudtd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +set(ICU_RELEASE "${ICUIN_RELEASE} ${ICUTU_RELEASE} ${ICULX_RELEASE} ${ICUUC_RELEASE} ${ICUIO_RELEASE} ${ICUDATA_RELEASE}") +set(ICU_DEBUG "${ICUIN_DEBUG} ${ICUTU_DEBUG} ${ICULX_DEBUG} ${ICUUC_DEBUG} ${ICUIO_DEBUG} ${ICUDATA_DEBUG}") +if(VCPKG_TARGET_IS_WINDOWS) + set(ICU_RELEASE "${ICU_RELEASE} Advapi32.lib") + set(ICU_DEBUG "${ICU_DEBUG} Advapi32.lib" ) endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*") - list(FILTER BINARY_TOOLS EXCLUDE REGEX "\\.dll\$") - file(REMOVE ${BINARY_TOOLS}) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + +find_library(FONTCONFIG_RELEASE NAMES fontconfig PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(FONTCONFIG_DEBUG NAMES fontconfig PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(EXPAT_RELEASE NAMES expat PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(EXPAT_DEBUG NAMES expat PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +#Dependent libraries +find_library(ZSTD_RELEASE NAMES zstd zstd_static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ZSTD_DEBUG NAMES zstdd zstd_staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(BZ2_RELEASE bz2 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(BZ2_DEBUG bz2 bz2d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(SSL_RELEASE ssl ssleay32 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(SSL_DEBUG ssl ssleay32 ssld ssleay32d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(EAY_RELEASE libeay32 crypto libcrypto PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(EAY_DEBUG libeay32 crypto libcrypto libeay32d cryptod libcryptod PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +set(FREETYPE_RELEASE_ALL "${FREETYPE_RELEASE} ${BZ2_RELEASE} ${LIBPNG_RELEASE} ${ZLIB_RELEASE} ${BROTLI_DEC_RELEASE} ${BROTLI_COMMON_RELEASE}") +set(FREETYPE_DEBUG_ALL "${FREETYPE_DEBUG} ${BZ2_DEBUG} ${LIBPNG_DEBUG} ${ZLIB_DEBUG} ${BROTLI_DEC_DEBUG} ${BROTLI_COMMON_DEBUG}") + +# If HarfBuzz is built with GLib enabled, it must be statically link +x_vcpkg_pkgconfig_get_modules(PREFIX harfbuzz MODULES harfbuzz LIBRARIES) + +set(RELEASE_OPTIONS + "LIBJPEG_LIBS=${JPEG_RELEASE}" + "ZLIB_LIBS=${ZLIB_RELEASE}" + "LIBPNG_LIBS=${LIBPNG_RELEASE} ${ZLIB_RELEASE}" + "PCRE2_LIBS=${PCRE2_RELEASE}" + "FREETYPE_LIBS=${FREETYPE_RELEASE_ALL}" + "ICU_LIBS=${ICU_RELEASE}" + "QMAKE_LIBS_PRIVATE+=${BZ2_RELEASE}" + "QMAKE_LIBS_PRIVATE+=${LIBPNG_RELEASE}" + "QMAKE_LIBS_PRIVATE+=${ICU_RELEASE}" + "QMAKE_LIBS_PRIVATE+=${ZSTD_RELEASE}" + ) +set(DEBUG_OPTIONS + "LIBJPEG_LIBS=${JPEG_DEBUG}" + "ZLIB_LIBS=${ZLIB_DEBUG}" + "LIBPNG_LIBS=${LIBPNG_DEBUG} ${ZLIB_DEBUG}" + "PCRE2_LIBS=${PCRE2_DEBUG}" + "FREETYPE_LIBS=${FREETYPE_DEBUG_ALL}" + "ICU_LIBS=${ICU_DEBUG}" + "QMAKE_LIBS_PRIVATE+=${BZ2_DEBUG}" + "QMAKE_LIBS_PRIVATE+=${LIBPNG_DEBUG}" + "QMAKE_LIBS_PRIVATE+=${ICU_DEBUG}" + "QMAKE_LIBS_PRIVATE+=${ZSTD_DEBUG}" + ) + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_IS_UWP) + list(APPEND CORE_OPTIONS -appstore-compliant) + endif() + if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") + list(APPEND CORE_OPTIONS -opengl dynamic) # other options are "-no-opengl", "-opengl angle", and "-opengl desktop" and "-opengel es2" + else() + list(APPEND CORE_OPTIONS -opengl dynamic) # other possible option without moving angle dlls: "-opengl desktop". "-opengel es2" only works with commented patch + endif() + list(APPEND RELEASE_OPTIONS + "SQLITE_LIBS=${SQLITE_RELEASE}" + "HARFBUZZ_LIBS=${harfbuzz_LIBRARIES_RELEASE}" + "OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib" + ) + + list(APPEND DEBUG_OPTIONS + "SQLITE_LIBS=${SQLITE_DEBUG}" + "HARFBUZZ_LIBS=${harfbuzz_LIBRARIES_DEBUG}" + "OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib" + ) + if(WITH_PGSQL_PLUGIN) + list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib") + list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib") endif() + if (WITH_MYSQL_PLUGIN) + list(APPEND RELEASE_OPTIONS "MYSQL_LIBS=${MYSQL_RELEASE}") + list(APPEND DEBUG_OPTIONS "MYSQL_LIBS=${MYSQL_DEBUG}") + endif(WITH_MYSQL_PLUGIN) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +elseif(VCPKG_TARGET_IS_LINUX) + list(APPEND CORE_OPTIONS -fontconfig -xcb-xlib -xcb -linuxfb) + if (NOT EXISTS "/usr/include/GL/glu.h") + message(FATAL_ERROR "qt5 requires libgl1-mesa-dev and libglu1-mesa-dev, please use your distribution's package manager to install them.\nExample: \"apt-get install libgl1-mesa-dev libglu1-mesa-dev\"") + endif() + list(APPEND RELEASE_OPTIONS + "SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread" + "HARFBUZZ_LIBS=${harfbuzz_LIBRARIES_RELEASE}" + "OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread" + "FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE} -luuid" + ) + list(APPEND DEBUG_OPTIONS + "SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread" + "HARFBUZZ_LIBS=${harfbuzz_LIBRARIES_DEBUG}" + "OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" + "FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG} -luuid" + ) + if(WITH_PGSQL_PLUGIN) + list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread") + list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread") + endif() +elseif(VCPKG_TARGET_IS_OSX) + list(APPEND CORE_OPTIONS -fontconfig) + if("${VCPKG_TARGET_ARCHITECTURE}" MATCHES "arm64") + FILE(READ "${SOURCE_PATH}/mkspecs/common/macx.conf" _tmp_contents) + string(REPLACE "QMAKE_APPLE_DEVICE_ARCHS = x86_64" "QMAKE_APPLE_DEVICE_ARCHS = arm64" _tmp_contents ${_tmp_contents}) + FILE(WRITE "${SOURCE_PATH}/mkspecs/common/macx.conf" ${_tmp_contents}) + endif() + if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + else() + execute_process(COMMAND xcrun --show-sdk-version + OUTPUT_FILE OSX_SDK_VER.txt + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + FILE(STRINGS "${CURRENT_BUILDTREES_DIR}/OSX_SDK_VER.txt" VCPKG_OSX_DEPLOYMENT_TARGET REGEX "^[0-9][0-9]\.[0-9][0-9]*") + message(STATUS "Detected OSX SDK Version: ${VCPKG_OSX_DEPLOYMENT_TARGET}") + string(REGEX MATCH "^[0-9][0-9]\.[0-9][0-9]*" VCPKG_OSX_DEPLOYMENT_TARGET ${VCPKG_OSX_DEPLOYMENT_TARGET}) + message(STATUS "Major.Minor OSX SDK Version: ${VCPKG_OSX_DEPLOYMENT_TARGET}") + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + if(${VCPKG_OSX_DEPLOYMENT_TARGET} GREATER "10.15") # Max Version supported by QT. This version is defined in mkspecs/common/macx.conf as QT_MAC_SDK_VERSION_MAX + message(STATUS "Qt ${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER} only support OSX_DEPLOYMENT_TARGET up to 10.15") + set(VCPKG_OSX_DEPLOYMENT_TARGET "10.15") + endif() + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + message(STATUS "Enviromnent OSX SDK Version: $ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET}") + FILE(READ "${SOURCE_PATH}/mkspecs/common/macx.conf" _tmp_contents) + string(REPLACE "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13" "QMAKE_MACOSX_DEPLOYMENT_TARGET = ${VCPKG_OSX_DEPLOYMENT_TARGET}" _tmp_contents ${_tmp_contents}) + FILE(WRITE "${SOURCE_PATH}/mkspecs/common/macx.conf" ${_tmp_contents}) + endif() + #list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_PLATFORM ${TARGET_MKSPEC}) + list(APPEND RELEASE_OPTIONS + "SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread" + "HARFBUZZ_LIBS=${harfbuzz_LIBRARIES_RELEASE} -framework ApplicationServices" + "OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread" + "FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE} -liconv" + ) + list(APPEND DEBUG_OPTIONS + "SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread" + "HARFBUZZ_LIBS=${harfbuzz_LIBRARIES_DEBUG} -framework ApplicationServices" + "OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" + "FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG} -liconv" + ) + + if(WITH_PGSQL_PLUGIN) + list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread") + list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread") + endif() endif() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake - LOGNAME fix-cmake -) +## Do not build tests or examples +list(APPEND CORE_OPTIONS + -nomake examples + -nomake tests) + +if(QT_UPDATE_VERSION) + SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() + configure_qt( + SOURCE_PATH ${SOURCE_PATH} + ${QT_PLATFORM_CONFIGURE_OPTIONS} + OPTIONS ${CORE_OPTIONS} + OPTIONS_RELEASE ${RELEASE_OPTIONS} + OPTIONS_DEBUG ${DEBUG_OPTIONS} + ) + install_qt() + + ######################### + #TODO: Make this a function since it is also done by modular scripts! + # e.g. by patching mkspecs/features/qt_tools.prf somehow + file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/mkspecs/*.pri" + "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/mkspecs/*.pri") + + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/include" CMAKE_INCLUDE_PATH) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5) - -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) - #--------------------------------------------------------------------------- - # qtmain(d) vs. Qt5AxServer(d) - #--------------------------------------------------------------------------- - # Qt applications have to either link to qtmain(d) or to Qt5AxServer(d), - # never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info. - # - # Create manual-link folders: if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + qt_fix_prl("${CURRENT_INSTALLED_DIR}" "${PRL_FILES}") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + qt_fix_prl("${CURRENT_INSTALLED_DIR}/debug" "${PRL_FILES}") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) endif() - # - # Either have users explicitly link against qtmain.lib, qtmaind.lib: - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl) + + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) # TODO: check if important debug information for cmake is lost + + #This needs a new VCPKG policy or a static angle build (ANGLE needs to be fixed in VCPKG!) + if(VCPKG_TARGET_IS_WINDOWS AND ${VCPKG_LIBRARY_LINKAGE} MATCHES "static") # Move angle dll libraries + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin") + message(STATUS "Moving ANGLE dlls from /bin to /tools/qt5-angle/bin. In static builds dlls are not allowed in /bin") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/qt5-angle) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/qt5-angle/bin) + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/qt5-angle/debug) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/tools/qt5-angle/debug/bin) + endif() + endif() endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) + + ## Fix location of qtmain(d).lib. Has been moved into manual-link. Add debug version + set(cmakefile "${CURRENT_PACKAGES_DIR}/share/cmake/Qt5Core/Qt5CoreConfigExtras.cmake") + file(READ "${cmakefile}" _contents) + if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_BUILD_TYPE) + string(REPLACE "set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)" "set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE DEBUG)" _contents "${_contents}") + string(REPLACE + [[set(imported_location "${_qt5Core_install_prefix}/lib/qtmain.lib")]] + [[set(imported_location_release "${_qt5Core_install_prefix}/lib/manual-link/qtmain.lib") + set(imported_location_debug "${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib")]] + _contents "${_contents}") + string(REPLACE +[[ set_target_properties(Qt5::WinMain PROPERTIES + IMPORTED_LOCATION_RELEASE ${imported_location} + )]] +[[ set_target_properties(Qt5::WinMain PROPERTIES + IMPORTED_LOCATION_RELEASE ${imported_location_release} + IMPORTED_LOCATION_DEBUG ${imported_location_debug} + )]] + _contents "${_contents}") + else() # Single configuration build (either debug or release) + # Release case + string(REPLACE + [[set(imported_location "${_qt5Core_install_prefix}/lib/qtmain.lib")]] + [[set(imported_location "${_qt5Core_install_prefix}/lib/manual-link/qtmain.lib")]] + _contents "${_contents}") + # Debug case (whichever will match) + string(REPLACE + [[set(imported_location "${_qt5Core_install_prefix}/lib/qtmaind.lib")]] + [[set(imported_location "${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib")]] + _contents "${_contents}") + string(REPLACE + [[set(imported_location "${_qt5Core_install_prefix}/debug/lib/qtmaind.lib")]] + [[set(imported_location "${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib")]] + _contents "${_contents}") endif() + file(WRITE "${cmakefile}" "${_contents}") - #--------------------------------------------------------------------------- - # Qt5Bootstrap: only used to bootstrap qmake dependencies - #--------------------------------------------------------------------------- - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) + if(EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5/bin) + file(COPY ${CURRENT_PACKAGES_DIR}/tools/qt5/bin DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5/bin) endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5Bootstrap.lib ${CURRENT_PACKAGES_DIR}/tools/qt5/Qt5Bootstrap.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5Bootstrap.prl ${CURRENT_PACKAGES_DIR}/tools/qt5/Qt5Bootstrap.prl) + # This should be removed if possible! (Currently debug build of qt5-translations requires it.) + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/bin) + file(COPY ${CURRENT_PACKAGES_DIR}/tools/qt5/bin DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5/debug) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5/debug/bin) endif() - #--------------------------------------------------------------------------- -endif() -file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl") -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/lib" CMAKE_RELEASE_LIB_PATH) -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib" CMAKE_DEBUG_LIB_PATH) -endif() -foreach(PRL_FILE IN LISTS PRL_FILES) - file(READ "${PRL_FILE}" _contents) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - string(REPLACE "${CMAKE_RELEASE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - string(REPLACE "${CMAKE_DEBUG_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") + if(EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5/bin/qt.conf) + file(REMOVE "${CURRENT_PACKAGES_DIR}/tools/qt5/bin/qt.conf") endif() - file(WRITE "${PRL_FILE}" "${_contents}") -endforeach() + set(CURRENT_INSTALLED_DIR_BACKUP "${CURRENT_INSTALLED_DIR}") + set(CURRENT_INSTALLED_DIR "./../../.." ) # Making the qt.conf relative and not absolute + configure_file(${CURRENT_PACKAGES_DIR}/tools/qt5/qt_release.conf ${CURRENT_PACKAGES_DIR}/tools/qt5/bin/qt.conf) # This makes the tools at least useable for release + set(CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR_BACKUP}") -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) + qt_install_copyright(${SOURCE_PATH}) endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) +#install scripts for other qt ports +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_hashes.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_functions.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_fix_makefile_install.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_fix_cmake.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_fix_prl.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_download_submodule.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_build_submodule.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_install_copyright.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_submodule_installation.cmake + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/qt5 +) + +# Fix Qt5GuiConfigExtras EGL path +if(VCPKG_TARGET_IS_LINUX) + set(_file "${CURRENT_PACKAGES_DIR}/share/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake") + file(READ "${_file}" _contents) + string(REGEX REPLACE "_qt5gui_find_extra_libs\\\(EGL[^\\\n]+" "_qt5gui_find_extra_libs(EGL \"EGL\" \"\" \"\${_qt5Gui_install_prefix}/include\")\n" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") endif() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5core) +if(QT_BUILD_LATEST) + file(COPY + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_hashes_latest.cmake + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/qt5 + ) +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -# +# #Code to get generated CMake files from CI +# file(RENAME "${CURRENT_PACKAGES_DIR}/share/cmake/Qt5Core/Qt5CoreConfig.cmake" "${CURRENT_BUILDTREES_DIR}/Qt5CoreConfig.cmake.log") +# file(GLOB_RECURSE CMAKE_GUI_FILES "${CURRENT_PACKAGES_DIR}/share/cmake/Qt5Gui/*.cmake" ) +# foreach(cmake_file ${CMAKE_GUI_FILES}) + # get_filename_component(cmake_filename "${cmake_file}" NAME) + # file(COPY "${cmake_file}" DESTINATION "${CURRENT_BUILDTREES_DIR}") + # file(RENAME "${CURRENT_BUILDTREES_DIR}/${cmake_filename}" "${CURRENT_BUILDTREES_DIR}/${cmake_filename}.log") +# endforeach() +# #Copy config.log from buildtree/triplet to buildtree to get the log in CI in case of failure +# if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.log") + # file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.log" "${CURRENT_BUILDTREES_DIR}/config-rel.log") +# endif() +# if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/config.log") + # file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/config.log" "${CURRENT_BUILDTREES_DIR}/config-dbg.log") +# endif() +# message(FATAL_ERROR "Need Info from CI!") diff --git a/ports/qt5-base/qt_debug.conf b/ports/qt5-base/qt_debug.conf deleted file mode 100644 index d0b17866161224..00000000000000 --- a/ports/qt5-base/qt_debug.conf +++ /dev/null @@ -1,13 +0,0 @@ -[Paths] -Prefix = ${CURRENT_INSTALLED_DIR} -Documentation = share/qt5/doc -Headers = include -Libraries = debug/lib -Binaries = debug/tools/qt5 -LibraryExecutables = debug/tools/qt5 -Plugins = debug/plugins -Qml2Imports = debug/qml -Data = share/qt5/debug -ArchData = share/qt5/debug -HostData = share/qt5/debug -HostBinaries = tools/qt5 \ No newline at end of file diff --git a/ports/qt5-base/qt_release.conf b/ports/qt5-base/qt_release.conf deleted file mode 100644 index a04aef52546356..00000000000000 --- a/ports/qt5-base/qt_release.conf +++ /dev/null @@ -1,13 +0,0 @@ -[Paths] -Prefix = ${CURRENT_INSTALLED_DIR} -Documentation = share/qt5/doc -Headers = include -Libraries = lib -Binaries = tools/qt5 -LibraryExecutables = tools/qt5 -Plugins = plugins -Qml2Imports = qml -Data = share/qt5 -ArchData = share/qt5 -HostData = share/qt5 -HostBinaries = tools/qt5 \ No newline at end of file diff --git a/ports/qt5-base/qtdeploy.ps1 b/ports/qt5-base/qtdeploy.ps1 index c751e891e0aa1f..4973cfc3879a29 100644 --- a/ports/qt5-base/qtdeploy.ps1 +++ b/ports/qt5-base/qtdeploy.ps1 @@ -44,10 +44,15 @@ function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [str deployPlugins "styles" } elseif ($targetBinaryName -match "Qt5Networkd?.dll") { deployPlugins "bearer" - if (Test-Path "$binDir\libeay32.dll") + if (Test-Path "$binDir\libcrypto-1_1-x64.dll") { - deployBinary "$targetBinaryDir" "$binDir" "libeay32.dll" - deployBinary "$targetBinaryDir" "$binDir" "ssleay32.dll" + deployBinary "$targetBinaryDir" "$binDir" "libcrypto-1_1-x64.dll" + deployBinary "$targetBinaryDir" "$binDir" "libssl-1_1-x64.dll" + } + if (Test-Path "$binDir\libcrypto-1_1.dll") + { + deployBinary "$targetBinaryDir" "$binDir" "libcrypto-1_1.dll" + deployBinary "$targetBinaryDir" "$binDir" "libssl-1_1.dll" } } elseif ($targetBinaryName -match "Qt5Sqld?.dll") { deployPlugins "sqldrivers" @@ -69,7 +74,7 @@ function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [str } } } elseif ($targetBinaryName -match "Qt5Quickd?.dll") { - foreach ($a in @("Qt5QuickControls2", "Qt5QuickControls2d", "Qt5QuickTemplates2", "Qt5QuickTemplates2d")) + foreach ($a in @("Qt5QuickControls2", "Qt5QuickControls2d", "Qt5QuickShapes", "Qt5QuickShapesd", "Qt5QuickTemplates2", "Qt5QuickTemplates2d", "Qt5QmlWorkerScript", "Qt5QmlWorkerScriptd", "Qt5QuickParticles", "Qt5QuickParticlesd", "Qt5QuickWidgets", "Qt5QuickWidgetsd")) { if (Test-Path "$binDir\$a.dll") { diff --git a/ports/qt5-base/vcpkg-cmake-wrapper.cmake b/ports/qt5-base/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index 8e00aaca7f994a..00000000000000 --- a/ports/qt5-base/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,66 +0,0 @@ -_find_package(${ARGS}) - -function(add_qt_library _target) - foreach(_lib IN LISTS ARGN) - find_library(${_lib}_LIBRARY_DEBUG NAMES ${_lib}d PATH_SUFFIXES debug/plugins/platforms) - find_library(${_lib}_LIBRARY_RELEASE NAMES ${_lib} PATH_SUFFIXES plugins/platforms) - set_property(TARGET ${_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES - \$<\$>:${${_lib}_LIBRARY_RELEASE}>\$<\$:${${_lib}_LIBRARY_DEBUG}>) - endforeach() -endfunction() - -get_target_property(_target_type Qt5::Core TYPE) -if("${_target_type}" STREQUAL "STATIC_LIBRARY") - find_package(ZLIB) - find_package(JPEG) - find_package(PNG) - find_package(Freetype) - find_package(sqlite3 CONFIG) - find_package(PostgreSQL MODULE REQUIRED) - find_package(double-conversion CONFIG) - find_package(OpenSSL) - find_package(harfbuzz CONFIG) - - set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES - ZLIB::ZLIB JPEG::JPEG PNG::PNG Freetype::Freetype sqlite3 harfbuzz::harfbuzz - ${PostgreSQL_LIBRARY} double-conversion::double-conversion OpenSSL::SSL OpenSSL::Crypto - ) - - add_qt_library(Qt5::Core - pcre2-16 - Qt5ThemeSupport - Qt5EventDispatcherSupport - Qt5PlatformCompositorSupport - Qt5FontDatabaseSupport) - - if(MSVC) - set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES - Netapi32.lib Ws2_32.lib Mincore.lib Winmm.lib Iphlpapi.lib Wtsapi32.lib Dwmapi.lib Imm32.lib) - - add_qt_library(Qt5::Core Qt5WindowsUIAutomationSupport qwindows qdirect2d) - - elseif(APPLE) - set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES - "-weak_framework DiskArbitration" "-weak_framework IOKit" "-weak_framework Foundation" "-weak_framework CoreServices" - "-weak_framework AppKit" "-weak_framework Security" "-weak_framework ApplicationServices" - "-weak_framework CoreFoundation" "-weak_framework SystemConfiguration" - "-weak_framework Carbon" - "-weak_framework QuartzCore" - "-weak_framework CoreVideo" - "-weak_framework Metal" - "-weak_framework CoreText" - "-weak_framework ApplicationServices" - "-weak_framework CoreGraphics" - "-weak_framework OpenGL" - "-weak_framework AGL" - "-weak_framework ImageIO" - "z" "m" - cups) - add_qt_library(Qt5::Core - Qt5GraphicsSupport - Qt5ClipboardSupport - Qt5AccessibilitySupport - qcocoa) - endif() - -endif() diff --git a/ports/qt5-base/vcpkg.json b/ports/qt5-base/vcpkg.json new file mode 100644 index 00000000000000..6115a5e4fd4afa --- /dev/null +++ b/ports/qt5-base/vcpkg.json @@ -0,0 +1,59 @@ +{ + "name": "qt5-base", + "version-semver": "5.15.2", + "port-version": 11, + "description": "Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "angle", + "platform": "!windows" + }, + "double-conversion", + "egl-registry", + { + "name": "fontconfig", + "platform": "!windows" + }, + "freetype", + "harfbuzz", + { + "name": "icu", + "platform": "!uwp" + }, + "libjpeg-turbo", + "libpng", + "openssl", + "pcre2", + "sqlite3", + { + "name": "vcpkg-pkgconfig-get-modules", + "host": true + }, + "zlib", + "zstd" + ], + "features": { + "latest": { + "description": "Build latest qt version (5.15.2) instead of LTS (latest and LTS are currently the same)" + }, + "mysqlplugin": { + "description": "Build the sql plugin for connecting to mysql databases", + "dependencies": [ + "libmysql" + ] + }, + "postgresqlplugin": { + "description": "Build the sql plugin for connecting to postgresql databases", + "dependencies": [ + "libpq" + ] + }, + "vulkan": { + "description": "Enable Vulkan support in QtGui", + "dependencies": [ + "vulkan" + ] + } + } +} diff --git a/ports/qt5-canvas3d/portfile.cmake b/ports/qt5-canvas3d/portfile.cmake new file mode 100644 index 00000000000000..14a8cbdb2192d0 --- /dev/null +++ b/ports/qt5-canvas3d/portfile.cmake @@ -0,0 +1,4 @@ +message(FATAL_ERROR "${PORT} has been deprecated and will be removed in the future from VCPKG") +#set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +#include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +#qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-canvas3d/vcpkg.json b/ports/qt5-canvas3d/vcpkg.json new file mode 100644 index 00000000000000..f26c201b8e2fcc --- /dev/null +++ b/ports/qt5-canvas3d/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt5-canvas3d", + "version-string": "0", + "port-version": 1, + "description": "Qt5 Canvas 3d Module;", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-charts/CONTROL b/ports/qt5-charts/CONTROL deleted file mode 100644 index 849ee2af694456..00000000000000 --- a/ports/qt5-charts/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-charts -Version: 5.12.3-1 -Description: Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-charts/portfile.cmake b/ports/qt5-charts/portfile.cmake index 0d7b7f17096f76..214726759f3cf1 100644 --- a/ports/qt5-charts/portfile.cmake +++ b/ports/qt5-charts/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtcharts f5940589c7a2dc5fcd3484397613f13ab41311c8ffb70a3484e64dc5bad24e18c94c9ebbe6716c1ec7c81b7863113ebfdb593f2d194608b2e3fb0b0b5c9c9102) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-charts/vcpkg.json b/ports/qt5-charts/vcpkg.json new file mode 100644 index 00000000000000..9d0a9b981e7684 --- /dev/null +++ b/ports/qt5-charts/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "qt5-charts", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-multimedia" + ] +} diff --git a/ports/qt5-connectivity/CONTROL b/ports/qt5-connectivity/CONTROL deleted file mode 100644 index bd169d40d5c7e8..00000000000000 --- a/ports/qt5-connectivity/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-connectivity -Version: 5.12.3-1 -Description: Qt5 Connectivity module - Provides access to Bluetooth and NFC hardware -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-connectivity/portfile.cmake b/ports/qt5-connectivity/portfile.cmake index 5cc8777e514644..2cd1cf47965fa3 100644 --- a/ports/qt5-connectivity/portfile.cmake +++ b/ports/qt5-connectivity/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtconnectivity 4da406d88c3cf216d53c524d3896f50b19dae124baec904233dbb67163a30a955dee29148b5f5b71c35cb28638912423bb1cf4d38c62aeefa7353bd29e97a269) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-connectivity/vcpkg.json b/ports/qt5-connectivity/vcpkg.json new file mode 100644 index 00000000000000..a887329794d839 --- /dev/null +++ b/ports/qt5-connectivity/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt5-connectivity", + "version-string": "5.15.2", + "port-version": 2, + "description": "Qt5 Connectivity module - Provides access to Bluetooth and NFC hardware", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-datavis3d/CONTROL b/ports/qt5-datavis3d/CONTROL deleted file mode 100644 index 0957b7d2c0351d..00000000000000 --- a/ports/qt5-datavis3d/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-datavis3d -Version: 5.12.3-1 -Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-datavis3d/portfile.cmake b/ports/qt5-datavis3d/portfile.cmake index cc9df8c4ac2af3..214726759f3cf1 100644 --- a/ports/qt5-datavis3d/portfile.cmake +++ b/ports/qt5-datavis3d/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtdatavis3d cb295deb9aa33132294d7d7f4daaa53dd9ab4815e2d3a2c916d88e1882e018a49d8d66db9088f69375d8da759a3f3566f251802aaba82d74cad2eb45d9bbbcff) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-datavis3d/vcpkg.json b/ports/qt5-datavis3d/vcpkg.json new file mode 100644 index 00000000000000..ddb155c33834b0 --- /dev/null +++ b/ports/qt5-datavis3d/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "qt5-datavis3d", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-multimedia" + ] +} diff --git a/ports/qt5-declarative/CONTROL b/ports/qt5-declarative/CONTROL deleted file mode 100644 index 9b9c79e629fa4d..00000000000000 --- a/ports/qt5-declarative/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-declarative -Version: 5.12.3-2 -Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-declarative/limits_include.patch b/ports/qt5-declarative/limits_include.patch new file mode 100644 index 00000000000000..b4580dd217bf18 --- /dev/null +++ b/ports/qt5-declarative/limits_include.patch @@ -0,0 +1,24 @@ +From 2dfb893c130a9f9195805fcc81d7e5e242bc558d Mon Sep 17 00:00:00 2001 +From: Nicolas Fella +Date: Wed, 11 Aug 2021 17:03:06 +0200 +Subject: [PATCH] Add missing limits include + +--- + src/qmldebug/qqmlprofilerevent_p.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/qmldebug/qqmlprofilerevent_p.h b/src/qmldebug/qqmlprofilerevent_p.h +index a7e37d1964..01b2f58f16 100644 +--- a/src/qmldebug/qqmlprofilerevent_p.h ++++ b/src/qmldebug/qqmlprofilerevent_p.h +@@ -48,6 +48,7 @@ + #include + + #include ++#include + #include + + // +-- +2.32.0 + diff --git a/ports/qt5-declarative/portfile.cmake b/ports/qt5-declarative/portfile.cmake index 4c1a11b248103f..8b4ab0e9abca44 100644 --- a/ports/qt5-declarative/portfile.cmake +++ b/ports/qt5-declarative/portfile.cmake @@ -1,25 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtdeclarative 0caddcfee36cbf52bacd3a400d304511255715e2b5a58c1621ca8120610427c57511785457a9e7fa55975b86e7924a3cffddeb7e2e8e6622af85b7ebac35dd20) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/plugins/platforminputcontexts) - -if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - set(qt5decpath ${CURRENT_PACKAGES_DIR}/share/qt5/debug/mkspecs/modules/qt_lib_qmldevtools_private.pri) - file(READ "${qt5decpath}" _contents) - string(REPLACE [[QT.qmldevtools_private.libs = $$QT_MODULE_HOST_LIB_BASE]] [[QT.qmldevtools_private.libs = $$QT_MODULE_LIB_BASE]] _contents "${_contents}") - file(WRITE "${qt5decpath}" "${_contents}") -endif() - -# Copy qt5-declarative tools -# This is a temporary workaround and hope to fix and remove it after the version update. -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - if (EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/) - file(RENAME ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/ ${CURRENT_PACKAGES_DIR}/tools/qt5/) - endif() - if (EXISTS ${CURRENT_PACKAGES_DIR}/lib/libQt5QmlDevTools.a) - file(COPY ${CURRENT_PACKAGES_DIR}/lib/libQt5QmlDevTools.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - endif() -endif() \ No newline at end of file +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation(PATCHES limits_include.patch) diff --git a/ports/qt5-declarative/vcpkg.json b/ports/qt5-declarative/vcpkg.json new file mode 100644 index 00000000000000..9ac0dead3cbb68 --- /dev/null +++ b/ports/qt5-declarative/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "qt5-declarative", + "version-string": "5.15.2", + "port-version": 2, + "description": "Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-imageformats", + "qt5-svg" + ] +} diff --git a/ports/qt5-doc/portfile.cmake b/ports/qt5-doc/portfile.cmake new file mode 100644 index 00000000000000..4f6e6848e01854 --- /dev/null +++ b/ports/qt5-doc/portfile.cmake @@ -0,0 +1,7 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +if(VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + message(STATUS "${PORT} will not build any artifacts on Windows!") +endif() +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-doc/vcpkg.json b/ports/qt5-doc/vcpkg.json new file mode 100644 index 00000000000000..d311b5ada3a488 --- /dev/null +++ b/ports/qt5-doc/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "qt5-doc", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 doc Module;", + "supports": "linux", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-quickcontrols2", + "qt5-tools" + ] +} diff --git a/ports/qt5-gamepad/CONTROL b/ports/qt5-gamepad/CONTROL deleted file mode 100644 index 105e2f5ddd6c98..00000000000000 --- a/ports/qt5-gamepad/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-gamepad -Version: 5.12.3-1 -Description: Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-gamepad/portfile.cmake b/ports/qt5-gamepad/portfile.cmake index 71bc355174cf1d..214726759f3cf1 100644 --- a/ports/qt5-gamepad/portfile.cmake +++ b/ports/qt5-gamepad/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtgamepad fd4902b11021eb6b28b5d6e31e9857ddaace6de05106c665fa429223033e28f187ede5deaec6a7e27588c5db4fb1cc250a936f2ee2cadb24f1df31ddfc4b3123) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-gamepad/vcpkg.json b/ports/qt5-gamepad/vcpkg.json new file mode 100644 index 00000000000000..4bd3fb05f7507d --- /dev/null +++ b/ports/qt5-gamepad/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-gamepad", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-graphicaleffects/CONTROL b/ports/qt5-graphicaleffects/CONTROL deleted file mode 100644 index 80730b0fe0446a..00000000000000 --- a/ports/qt5-graphicaleffects/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-graphicaleffects -Version: 5.12.3-1 -Description: Qt5 GraphicalEffects Module. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-graphicaleffects/portfile.cmake b/ports/qt5-graphicaleffects/portfile.cmake index c639e46685ee48..d473c56257aced 100644 --- a/ports/qt5-graphicaleffects/portfile.cmake +++ b/ports/qt5-graphicaleffects/portfile.cmake @@ -1,7 +1,3 @@ -SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) - -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtgraphicaleffects 3c5e6d7dc51a92d48cce8424ab1fe60ee75b71ebe2e6bb22e719a35bdaf2210b03f90ac066569f5c086ed67ed1463510625307328299310fad7c587e9fd8b385) +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-graphicaleffects/vcpkg.json b/ports/qt5-graphicaleffects/vcpkg.json new file mode 100644 index 00000000000000..83055ba6e14dcf --- /dev/null +++ b/ports/qt5-graphicaleffects/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-graphicaleffects", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 GraphicalEffects Module.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-imageformats/CONTROL b/ports/qt5-imageformats/CONTROL deleted file mode 100644 index 40df95dbeb28ce..00000000000000 --- a/ports/qt5-imageformats/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-imageformats -Version: 5.12.3-1 -Description: Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-imageformats/portfile.cmake b/ports/qt5-imageformats/portfile.cmake index 1d66c9a2356637..abd88a60c27e1d 100644 --- a/ports/qt5-imageformats/portfile.cmake +++ b/ports/qt5-imageformats/portfile.cmake @@ -1,7 +1,54 @@ -include(vcpkg_common_functions) +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtimageformats 59cc9df597e6ac31b10ff7440b0793af13ee84a1b363db631a7aeea7413e650a99a42e8c3f4633926ec93d4ac4c2532674ea27df325ba98132bea83c81d6e6cc) +list(APPEND CORE_OPTIONS + -system-tiff + -system-webp + -jasper + -no-mng # must be explicitly disabled to not automatically pick up mng + -verbose) + +find_library(TIFF_RELEASE NAMES tiff PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on lzma +find_library(TIFF_DEBUG NAMES tiffd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(JPEG_RELEASE NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(JPEG_DEBUG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(ZLIB_RELEASE NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ZLIB_DEBUG NAMES z zlib zd zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +find_library(JASPER_RELEASE NAMES jasper PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(JASPER_DEBUG NAMES jasperd jasper libjasperd libjasper PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +if(NOT VCPKG_TARGET_IS_OSX) + find_library(FREEGLUT_RELEASE NAMES freeglut glut PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(FREEGLUT_DEBUG NAMES freeglutd freeglut glutd glut PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +endif() + +find_library(WEBP_RELEASE NAMES webp PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(WEBP_DEBUG NAMES webpd webp PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(WEBPDEMUX_RELEASE NAMES webpdemux PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(WEBPDEMUX_DEBUG NAMES webpdemuxd webpdemux PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(WEBPMUX_RELEASE NAMES webpmux libwebpmux PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(WEBPMUX_DEBUG NAMES webpmuxd webpmux libwebpmuxd libwebpmux PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(WEBPDECODER_RELEASE NAMES webpdecoder libwebpdecoder PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(WEBPDECODER_DEBUG NAMES webpdecoder libwebpdecoder webpdecoderd libwebpdecoderd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +# Depends on opengl in default build but might depend on giflib, libjpeg-turbo, zlib, libpng, tiff, freeglut (!osx), sdl1 (windows) +# which would require extra libraries to be linked e.g. giflib freeglut sdl1 other ones are already linked + +#Dependent libraries +find_library(LZMA_RELEASE lzma PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(LZMA_DEBUG lzmad lzma PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + string(APPEND WEBP_RELEASE " -pthread") + string(APPEND WEBP_DEBUG " -pthread") +endif() + +set(OPT_REL "TIFF_LIBS=${TIFF_RELEASE} ${LZMA_RELEASE} ${JPEG_RELEASE} ${ZLIB_RELEASE}" + "WEBP_LIBS=${WEBPDECODER_RELEASE} ${WEBPDEMUX_RELEASE} ${WEBPMUX_RELEASE} ${WEBP_RELEASE}" + "JASPER_LIBS=${JASPER_RELEASE} ${FREEGLUT_RELEASE} ${JPEG_RELEASE} ${ZLIB_RELEASE}") # This will still fail if LIBWEBP is installed with all available features due to the missing additional dependencies +set(OPT_DBG "TIFF_LIBS=${TIFF_DEBUG} ${LZMA_DEBUG} ${JPEG_DEBUG} ${ZLIB_DEBUG}" + "WEBP_LIBS=${WEBPDECODER_DEBUG} ${WEBPDEMUX_DEBUG} ${WEBPMUX_DEBUG} ${WEBP_DEBUG}" + "JASPER_LIBS=${JASPER_DEBUG} ${FREEGLUT_DEBUG} ${JPEG_DEBUG} ${ZLIB_DEBUG}") +list(APPEND CORE_OPTIONS "WEBP_INCDIR=${CURRENT_INSTALLED_DIR}/include") # Requires libwebp[all] + +qt_submodule_installation(BUILD_OPTIONS ${CORE_OPTIONS} BUILD_OPTIONS_RELEASE ${OPT_REL} BUILD_OPTIONS_DEBUG ${OPT_DBG}) \ No newline at end of file diff --git a/ports/qt5-imageformats/vcpkg.json b/ports/qt5-imageformats/vcpkg.json new file mode 100644 index 00000000000000..9c4d0e0f4e1370 --- /dev/null +++ b/ports/qt5-imageformats/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "qt5-imageformats", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP", + "dependencies": [ + "jasper", + "libwebp", + { + "name": "qt5-base", + "default-features": false + }, + "tiff" + ] +} diff --git a/ports/qt5-location/CONTROL b/ports/qt5-location/CONTROL deleted file mode 100644 index a6f469fc8e6af9..00000000000000 --- a/ports/qt5-location/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-location -Version: 5.12.3-1 -Description: Qt5 Location Module - Displays map, navigation, and place content in a QML application. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-location/portfile.cmake b/ports/qt5-location/portfile.cmake index 55e7b23ce53312..c8d591b2da5e63 100644 --- a/ports/qt5-location/portfile.cmake +++ b/ports/qt5-location/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtlocation 91b21e5bc78b960f15c60ae02827cd35292ab1a5dd5a47488d25ce6758177f0ce15545aef3ff9bd1456c6fd84f65cb74d385b726239e2f0be66de0f6fb9a7082) +message(STATUS "${PORT} has a spurious failure in which it is unable to create a parent directory! Just retry.") +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() diff --git a/ports/qt5-location/vcpkg.json b/ports/qt5-location/vcpkg.json new file mode 100644 index 00000000000000..8abfa73c8aff13 --- /dev/null +++ b/ports/qt5-location/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "qt5-location", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Location Module - Displays map, navigation, and place content in a QML application.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-quickcontrols", + "qt5-quickcontrols2", + "qt5-serialport" + ] +} diff --git a/ports/qt5-macextras/CONTROL b/ports/qt5-macextras/CONTROL deleted file mode 100644 index 7489191f32d3c9..00000000000000 --- a/ports/qt5-macextras/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-macextras -Version: 5.12.3-1 -Description: Qt5 Mac Extras Module. Provides platform-specific APIs for mac. -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-macextras/portfile.cmake b/ports/qt5-macextras/portfile.cmake index 676f0b23ee07f8..cc2391d870c954 100644 --- a/ports/qt5-macextras/portfile.cmake +++ b/ports/qt5-macextras/portfile.cmake @@ -1,9 +1,5 @@ -include(vcpkg_common_functions) - -if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT QT_UPDATE_VERSION) message(FATAL_ERROR "qt5-macextras only support OSX.") endif() - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtmacextras 56887c2a2d20c41a133af87aec8975e17c6335ffc51093f23a904e02a78f59a8117c7932827ca5dd33f538360e6fd9cfc9d0091c6f4c1e0b96528b5324c74033) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-macextras/vcpkg.json b/ports/qt5-macextras/vcpkg.json new file mode 100644 index 00000000000000..3ac6b3fc7f73d6 --- /dev/null +++ b/ports/qt5-macextras/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-macextras", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Mac Extras Module. Provides platform-specific APIs for mac.", + "supports": "osx", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL deleted file mode 100644 index a3751b61bec0a1..00000000000000 --- a/ports/qt5-modularscripts/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: qt5-modularscripts -Version: 2019-04-30-1 -Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5-modularscripts/fixcmake.py b/ports/qt5-modularscripts/fixcmake.py deleted file mode 100644 index 83a40ec6c7f054..00000000000000 --- a/ports/qt5-modularscripts/fixcmake.py +++ /dev/null @@ -1,66 +0,0 @@ -import os -import re -import sys -from glob import glob - -port="qt5" -if len(sys.argv) > 1: - port=sys.argv[1] - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] -tooldir="/tools/"+port+"/" - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - toolexepattern = re.compile("_install_prefix}/tools/qt5/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", tooldir) - elif toolexepattern.search(line) != None: - builder += line.replace("/tools/qt5/",tooldir) - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() diff --git a/ports/qt5-modularscripts/portfile.cmake b/ports/qt5-modularscripts/portfile.cmake index e7149adfcef687..0015715fb66c72 100644 --- a/ports/qt5-modularscripts/portfile.cmake +++ b/ports/qt5-modularscripts/portfile.cmake @@ -1,9 +1 @@ -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - ${CMAKE_CURRENT_LIST_DIR}/qt_modular_library.cmake - DESTINATION - ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts -) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts/copyright "") - -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake deleted file mode 100644 index e58d0bf919b5cd..00000000000000 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ /dev/null @@ -1,166 +0,0 @@ -set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}") - -function(qt_modular_fetch_library NAME HASH TARGET_SOURCE_PATH) - string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) - if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) - endif() - - set(MAJOR_MINOR 5.12) - set(FULL_VERSION ${MAJOR_MINOR}.3) - set(ARCHIVE_NAME "${NAME}-everywhere-src-${FULL_VERSION}.tar.xz") - - vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/${MAJOR_MINOR}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" - FILENAME ${ARCHIVE_NAME} - SHA512 ${HASH} - ) - vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${ARCHIVE_FILE}" - REF ${FULL_VERSION} - ) - - set(${TARGET_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE) -endfunction() - -function(qt_modular_build_library SOURCE_PATH) - # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings - set(ENV{_CL_} "/utf-8") - - #Store build paths - set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - - #Find Python and add it to the path - vcpkg_find_acquire_program(PYTHON2) - get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) - vcpkg_add_to_path("${PYTHON2_EXE_PATH}") - - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) - - if(WIN32) - string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) - string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) - else() - set(INSTALLED_DIR_WITHOUT_DRIVE ${NATIVE_INSTALLED_DIR}) - set(PACKAGES_DIR_WITHOUT_DRIVE ${NATIVE_PACKAGES_DIR}) - endif() - - #Configure debug+release - vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}) - #Build debug+release - if (CMAKE_HOST_WIN32) - vcpkg_build_qmake() - else() - vcpkg_build_qmake(SKIP_MAKEFILES) - endif() - - #Fix the cmake files if they exist - if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON2} ${_qt5base_port_dir}/fixcmake.py ${PORT} - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) - endif() - - file(GLOB_RECURSE MAKEFILES ${DEBUG_DIR}/*Makefile* ${RELEASE_DIR}/*Makefile*) - - foreach(MAKEFILE ${MAKEFILES}) - file(READ "${MAKEFILE}" _contents) - #Set the correct install directory to packages - string(REPLACE "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}" _contents "${_contents}") - file(WRITE "${MAKEFILE}" "${_contents}") - endforeach() - - #Install the module files - vcpkg_build_qmake(TARGETS install SKIP_MAKEFILES BUILD_LOGNAME install) - - #Install cmake files - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) - endif() - #Remove extra cmake files - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - endif() - - file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl") - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/lib" CMAKE_RELEASE_LIB_PATH) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib" CMAKE_DEBUG_LIB_PATH) - endif() - foreach(PRL_FILE IN LISTS PRL_FILES) - file(READ "${PRL_FILE}" _contents) - string(REPLACE "${CMAKE_RELEASE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") - string(REPLACE "${CMAKE_DEBUG_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") - file(WRITE "${PRL_FILE}" "${_contents}") - endforeach() - - file(GLOB RELEASE_LIBS "${CURRENT_PACKAGES_DIR}/lib/*") - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() - file(GLOB DEBUG_FILES "${CURRENT_PACKAGES_DIR}/debug/lib/*") - if(NOT DEBUG_FILES) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() - - #Move release and debug dlls to the correct directory - if(EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5) - file(RENAME ${CURRENT_PACKAGES_DIR}/tools/qt5 ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - endif() - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) - endif() - - file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*.dll) - file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/*.dll) - if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() - endif() - if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include) - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - endif() - - #Find the relevant license file and install it - if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") - endif() - file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -endfunction() - -function(qt_modular_library NAME HASH) - qt_modular_fetch_library(${NAME} ${HASH} TARGET_SOURCE_PATH) - qt_modular_build_library(${TARGET_SOURCE_PATH}) -endfunction() diff --git a/ports/qt5-modularscripts/vcpkg.json b/ports/qt5-modularscripts/vcpkg.json new file mode 100644 index 00000000000000..30de99c4c4a50c --- /dev/null +++ b/ports/qt5-modularscripts/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "qt5-modularscripts", + "version-string": "deprecated", + "port-version": 1, + "description": "now part of qt5-base, formerly vcpkg helpers to package qt5 modules" +} diff --git a/ports/qt5-mqtt/CONTROL b/ports/qt5-mqtt/CONTROL deleted file mode 100644 index 0e424dad9e2d8c..00000000000000 --- a/ports/qt5-mqtt/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-mqtt -Version: 5.12.3-1 -Description: Qt5 MQTT module. -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-mqtt/portfile.cmake b/ports/qt5-mqtt/portfile.cmake index 7ccdf913fb2a7d..ca6e25d0d4d746 100644 --- a/ports/qt5-mqtt/portfile.cmake +++ b/ports/qt5-mqtt/portfile.cmake @@ -1,21 +1,28 @@ -include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +#qt_submodule_installation() No binary package for this port. +if(QT_UPDATE_VERSION) + set(VCPKG_USE_HEAD_VERSION ON) +endif() -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -vcpkg_from_github( +vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH - REPO qt/qtmqtt - REF cf41d84738f0ed0c779f75db94d413ad938fb901 - SHA512 e9a818999e4befb0b945d609a1ee28a3e2d7e3b6d8c12ab82ae827fdb8f6bf5e8b82114c1850438d634fa24c9ac608ebae1d461385bd4e088f8cabf7eec0182c - HEAD_REF dev + URL git://code.qt.io/qt/qtmqtt.git + REF ${QT_HASH_${PORT}} + HEAD_REF "v${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}" + PATCHES ${_qis_PATCHES} ) -# Qt module builds from a git repository require a .git entry to invoke syncqt +if(QT_UPDATE_VERSION) + message(STATUS "New qtmqtt ref: ${VCPKG_HEAD_VERSION}") +endif() + +# qt module builds from a git repository require a .git entry to invoke syncqt file(WRITE "${SOURCE_PATH}/.git" "repocontent") -# syncqt is a PERL script +# syncqt is a perl script vcpkg_find_acquire_program(PERL) -get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -vcpkg_add_to_path("${PERL_EXE_PATH}") +get_filename_component(perl_exe_path ${PERL} DIRECTORY) +vcpkg_add_to_path("${perl_exe_path}") -qt_modular_build_library(${SOURCE_PATH}) +qt_build_submodule(${SOURCE_PATH}) +qt_install_copyright(${SOURCE_PATH}) diff --git a/ports/qt5-mqtt/vcpkg.json b/ports/qt5-mqtt/vcpkg.json new file mode 100644 index 00000000000000..c4dac430ad181d --- /dev/null +++ b/ports/qt5-mqtt/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt5-mqtt", + "version": "5.15.2", + "port-version": 1, + "description": "Qt5 MQTT module.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-multimedia/CONTROL b/ports/qt5-multimedia/CONTROL deleted file mode 100644 index 9e41198a68f6bb..00000000000000 --- a/ports/qt5-multimedia/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-multimedia -Version: 5.12.3-1 -Description: Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-multimedia/portfile.cmake b/ports/qt5-multimedia/portfile.cmake index d6292a1bad4f23..214726759f3cf1 100644 --- a/ports/qt5-multimedia/portfile.cmake +++ b/ports/qt5-multimedia/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtmultimedia 4f10e40aaf73dda2d70502e6a1441149c2b4389e9c7de72245c850d926c3ecb57ca6b09c63d208eff4b9ec63b7f9845eb2740cd0df4e4b7eee8f51746a6d3963) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-multimedia/vcpkg.json b/ports/qt5-multimedia/vcpkg.json new file mode 100644 index 00000000000000..bc35ddac76fd80 --- /dev/null +++ b/ports/qt5-multimedia/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-multimedia", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-networkauth/CONTROL b/ports/qt5-networkauth/CONTROL deleted file mode 100644 index 34f5d82a2a506b..00000000000000 --- a/ports/qt5-networkauth/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-networkauth -Version: 5.12.3-1 -Description: Qt5 Network Authorization Module -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-networkauth/portfile.cmake b/ports/qt5-networkauth/portfile.cmake index ef4e63989d8188..214726759f3cf1 100644 --- a/ports/qt5-networkauth/portfile.cmake +++ b/ports/qt5-networkauth/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtnetworkauth 07bf159360fe126c23387c6ed5b955218771ac37848ddb83542733c786b415f9aa5c22fd4a965fff591869d2d819bba420b69718e487df3cce382f411f493142) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-networkauth/vcpkg.json b/ports/qt5-networkauth/vcpkg.json new file mode 100644 index 00000000000000..5aa743b193dd37 --- /dev/null +++ b/ports/qt5-networkauth/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt5-networkauth", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Network Authorization Module", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-purchasing/CONTROL b/ports/qt5-purchasing/CONTROL deleted file mode 100644 index bd859657188ac0..00000000000000 --- a/ports/qt5-purchasing/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-purchasing -Version: 5.12.3-1 -Description: Qt5 Purchasing Module - Enables in-app purchase of products in Qt applications. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-purchasing/portfile.cmake b/ports/qt5-purchasing/portfile.cmake index c172817df283d3..2cd1cf47965fa3 100644 --- a/ports/qt5-purchasing/portfile.cmake +++ b/ports/qt5-purchasing/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtpurchasing 3069ece2083d0661a3599c631cf0832a80e01262b5858ffd407bc0d80e35711f2f973b2c085b6dd5539f3ec26004c684df99d477e58ab62da63d705a8a5616c9) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-purchasing/vcpkg.json b/ports/qt5-purchasing/vcpkg.json new file mode 100644 index 00000000000000..b1b52cd67b5a2c --- /dev/null +++ b/ports/qt5-purchasing/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-purchasing", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Purchasing Module - Enables in-app purchase of products in Qt applications.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-quickcontrols/CONTROL b/ports/qt5-quickcontrols/CONTROL deleted file mode 100644 index b7360350d9de43..00000000000000 --- a/ports/qt5-quickcontrols/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-quickcontrols -Version: 5.12.3-1 -Description: Qt5 QuickControls Module. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols/portfile.cmake b/ports/qt5-quickcontrols/portfile.cmake index bb4aa8a6615b7f..d473c56257aced 100644 --- a/ports/qt5-quickcontrols/portfile.cmake +++ b/ports/qt5-quickcontrols/portfile.cmake @@ -1,7 +1,3 @@ -SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) - -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtquickcontrols 23410fb82088591a8bed7e8e4127d13929a03adc0dfd18f7e2f906acdac21f7dcbb15cb2257272b893d937bbb54860992667c11aa0c6157d4a3b871616c4641c) +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-quickcontrols/vcpkg.json b/ports/qt5-quickcontrols/vcpkg.json new file mode 100644 index 00000000000000..ca2bd64054dd23 --- /dev/null +++ b/ports/qt5-quickcontrols/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "qt5-quickcontrols", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 QuickControls Module.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-graphicaleffects" + ] +} diff --git a/ports/qt5-quickcontrols2/CONTROL b/ports/qt5-quickcontrols2/CONTROL deleted file mode 100644 index 88358dd1613b9c..00000000000000 --- a/ports/qt5-quickcontrols2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-quickcontrols2 -Version: 5.12.3-1 -Description: Qt5 QuickControls2 Module. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols2/portfile.cmake b/ports/qt5-quickcontrols2/portfile.cmake index 6b65b022f804b8..214726759f3cf1 100644 --- a/ports/qt5-quickcontrols2/portfile.cmake +++ b/ports/qt5-quickcontrols2/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtquickcontrols2 afc1ae9a5a046845b085d5cf0019b79d99914a2d285676bd4d8966f1302513078c8279b71134281c03b2c1209295bca438b9e255774574520498b0b5385bad27) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-quickcontrols2/vcpkg.json b/ports/qt5-quickcontrols2/vcpkg.json new file mode 100644 index 00000000000000..bf9665c890991d --- /dev/null +++ b/ports/qt5-quickcontrols2/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "qt5-quickcontrols2", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 QuickControls2 Module.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-imageformats" + ] +} diff --git a/ports/qt5-remoteobjects/CONTROL b/ports/qt5-remoteobjects/CONTROL deleted file mode 100644 index ffe6095a54253b..00000000000000 --- a/ports/qt5-remoteobjects/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-remoteobjects -Version: 5.12.3-1 -Description: Qt5 Remoteobjects module - Provides an easy to use mechanism for sharing a QObject's API (Properties/Signals/Slots) between processes or devices. -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-remoteobjects/portfile.cmake b/ports/qt5-remoteobjects/portfile.cmake index 8d2d45a6e7b639..2cd1cf47965fa3 100644 --- a/ports/qt5-remoteobjects/portfile.cmake +++ b/ports/qt5-remoteobjects/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtremoteobjects f01b9497dab7e5db24f090d227fca5703a50b5065ad6c0798b78e83b41c374a04eb2857ffaf0225071791c9bb6b8703e37e47d31bf905fa819395b4d69819178) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-remoteobjects/vcpkg.json b/ports/qt5-remoteobjects/vcpkg.json new file mode 100644 index 00000000000000..38f4f5a8f39bd0 --- /dev/null +++ b/ports/qt5-remoteobjects/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-remoteobjects", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Remoteobjects module - Provides an easy to use mechanism for sharing a QObject's API (Properties/Signals/Slots) between processes or devices.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-script/CONTROL b/ports/qt5-script/CONTROL deleted file mode 100755 index 4fe0bb0280123e..00000000000000 --- a/ports/qt5-script/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-script -Version: 5.12.3-1 -Build-Depends: qt5-base, qt5-modularscripts -Description:Qt5 Script Module. diff --git a/ports/qt5-script/portfile.cmake b/ports/qt5-script/portfile.cmake old mode 100755 new mode 100644 index 0d2a8418d511a2..2cd1cf47965fa3 --- a/ports/qt5-script/portfile.cmake +++ b/ports/qt5-script/portfile.cmake @@ -1,5 +1,2 @@ - -include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtscript 4c4498acb39536bdc03643fb1717c7a47c82b1734cf67d17d40bc216084f01e837648d261f7f69e317387f9c6efa9aaa6b0df8f5532f55615252c95b1089ca1a) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-script/vcpkg.json b/ports/qt5-script/vcpkg.json new file mode 100644 index 00000000000000..874be0e27d5b96 --- /dev/null +++ b/ports/qt5-script/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-script", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Script Module.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-tools" + ] +} diff --git a/ports/qt5-scxml/CONTROL b/ports/qt5-scxml/CONTROL deleted file mode 100644 index accc5100aa6806..00000000000000 --- a/ports/qt5-scxml/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-scxml -Version: 5.12.3-1 -Description: Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-scxml/portfile.cmake b/ports/qt5-scxml/portfile.cmake index 860e25246c1bf2..214726759f3cf1 100644 --- a/ports/qt5-scxml/portfile.cmake +++ b/ports/qt5-scxml/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtscxml d515506d90ace5eedfe8bf3439dad0853dbbdbd36dfb509dfa13e3358838353de66d5f6245afe4eeebd19dd3f0ab0ce5e4c3e6fe5d40e5ab46763c453a562a49) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-scxml/vcpkg.json b/ports/qt5-scxml/vcpkg.json new file mode 100644 index 00000000000000..b32ce788301eb6 --- /dev/null +++ b/ports/qt5-scxml/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-scxml", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-sensors/CONTROL b/ports/qt5-sensors/CONTROL deleted file mode 100644 index a69df5531b0162..00000000000000 --- a/ports/qt5-sensors/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-sensors -Version: 5.12.3-1 -Description: Qt5 Sensors module - Provides access to sensor hardware and motion gesture recognition. -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-sensors/portfile.cmake b/ports/qt5-sensors/portfile.cmake index 3af79811730705..2cd1cf47965fa3 100644 --- a/ports/qt5-sensors/portfile.cmake +++ b/ports/qt5-sensors/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtsensors cf0c8c58bbb84debd6b464bd9b91af7e79a301031613b8a2d0715fa276573dafea0a1c8e472fa2a2d4debd9b26f86a5e6efa9a8d57f7ab9102b1314d609579e5) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-sensors/vcpkg.json b/ports/qt5-sensors/vcpkg.json new file mode 100644 index 00000000000000..2fe0948eda3baa --- /dev/null +++ b/ports/qt5-sensors/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-sensors", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Sensors module - Provides access to sensor hardware and motion gesture recognition.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-serialbus/portfile.cmake b/ports/qt5-serialbus/portfile.cmake new file mode 100644 index 00000000000000..d4e611db98f956 --- /dev/null +++ b/ports/qt5-serialbus/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() diff --git a/ports/qt5-serialbus/vcpkg.json b/ports/qt5-serialbus/vcpkg.json new file mode 100644 index 00000000000000..3e34dd716e8e12 --- /dev/null +++ b/ports/qt5-serialbus/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-serialbus", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Serialbus Module;", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-serialport" + ] +} diff --git a/ports/qt5-serialport/CONTROL b/ports/qt5-serialport/CONTROL deleted file mode 100644 index e9613f2351dbaa..00000000000000 --- a/ports/qt5-serialport/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-serialport -Version: 5.12.3-1 -Description: Qt5 Serial Port - provides access to hardware and virtual serial ports -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-serialport/portfile.cmake b/ports/qt5-serialport/portfile.cmake index 0c2a0f116c473e..214726759f3cf1 100644 --- a/ports/qt5-serialport/portfile.cmake +++ b/ports/qt5-serialport/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtserialport 42551b74abe1fcaa1972fb1134215987d7c1d0fe73874a4c6ad5b9aadad71a2066a1846c297569bb1562f94e54a406e8074d444deca510a566e27cd386b47ecf) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-serialport/vcpkg.json b/ports/qt5-serialport/vcpkg.json new file mode 100644 index 00000000000000..8d9e79ccf8d2ef --- /dev/null +++ b/ports/qt5-serialport/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt5-serialport", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Serial Port - provides access to hardware and virtual serial ports", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-speech/CONTROL b/ports/qt5-speech/CONTROL deleted file mode 100644 index ee1606cbd56c88..00000000000000 --- a/ports/qt5-speech/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-speech -Version: 5.12.3-1 -Description: Qt5 Speech Module -Build-Depends: qt5-modularscripts, qt5-base, atlmfc (windows) diff --git a/ports/qt5-speech/portfile.cmake b/ports/qt5-speech/portfile.cmake index f4402508daf4c5..214726759f3cf1 100644 --- a/ports/qt5-speech/portfile.cmake +++ b/ports/qt5-speech/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtspeech 9623a83cdfbed07dffcd8f0808c2a514c97fda72b68827d917f1a8ee3072286ef8bce06b114db94d7a0c3fc79425c2540fa5cadc6551367fd4431e5396395932) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-speech/vcpkg.json b/ports/qt5-speech/vcpkg.json new file mode 100644 index 00000000000000..387b650a306bc4 --- /dev/null +++ b/ports/qt5-speech/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "qt5-speech", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Speech Module", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + }, + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-multimedia" + ] +} diff --git a/ports/qt5-svg/CONTROL b/ports/qt5-svg/CONTROL deleted file mode 100644 index 8f7f9573741b0a..00000000000000 --- a/ports/qt5-svg/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-svg -Version: 5.12.3-1 -Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-svg/portfile.cmake b/ports/qt5-svg/portfile.cmake index a8379b1310534c..ca67a6846fa234 100644 --- a/ports/qt5-svg/portfile.cmake +++ b/ports/qt5-svg/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtsvg 23517dbdc30d7128fcbeb12a301eeeb300424bb17bc0d156d5e9298c092d3d3afd2cba45768f2512e58977ee2408450f50c385e03a47ccaf3ff6bc7e4fddf61a) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation(PATCHES "static_svg_link_fix.patch") \ No newline at end of file diff --git a/ports/qt5-svg/static_svg_link_fix.patch b/ports/qt5-svg/static_svg_link_fix.patch new file mode 100644 index 00000000000000..c6d21e83affd34 --- /dev/null +++ b/ports/qt5-svg/static_svg_link_fix.patch @@ -0,0 +1,24 @@ +diff --git a/src/plugins/iconengines/svgiconengine/svgiconengine.pro b/src/plugins/iconengines/svgiconengine/svgiconengine.pro +index bfc739fa8..c0df08194 100644 +--- a/src/plugins/iconengines/svgiconengine/svgiconengine.pro ++++ b/src/plugins/iconengines/svgiconengine/svgiconengine.pro +@@ -8,6 +8,6 @@ OTHER_FILES += qsvgiconengine-nocompress.json + QT += svg core-private gui-private + + PLUGIN_TYPE = iconengines +-PLUGIN_EXTENDS = svg ++PLUGIN_EXTENDS = gui + PLUGIN_CLASS_NAME = QSvgIconPlugin + load(qt_plugin) +diff --git a/src/plugins/imageformats/svg/svg.pro b/src/plugins/imageformats/svg/svg.pro +index 9db6a9ab0..dcfc4b555 100644 +--- a/src/plugins/imageformats/svg/svg.pro ++++ b/src/plugins/imageformats/svg/svg.pro +@@ -6,6 +6,6 @@ SOURCES += main.cpp \ + QT += svg + + PLUGIN_TYPE = imageformats +-PLUGIN_EXTENDS = svg ++PLUGIN_EXTENDS = gui + PLUGIN_CLASS_NAME = QSvgPlugin + load(qt_plugin) diff --git a/ports/qt5-svg/vcpkg.json b/ports/qt5-svg/vcpkg.json new file mode 100644 index 00000000000000..125ae9503bb110 --- /dev/null +++ b/ports/qt5-svg/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt5-svg", + "version-string": "5.15.2", + "port-version": 2, + "description": "Qt5 SVG Module - provides classes for displaying the contents of SVG files", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-tools/CONTROL b/ports/qt5-tools/CONTROL deleted file mode 100644 index c64f3536c69de4..00000000000000 --- a/ports/qt5-tools/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-tools -Version: 5.12.3-1 -Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-tools/icudt-debug-suffix.patch b/ports/qt5-tools/icudt-debug-suffix.patch new file mode 100644 index 00000000000000..9d9d8bb395b2ab --- /dev/null +++ b/ports/qt5-tools/icudt-debug-suffix.patch @@ -0,0 +1,13 @@ +diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp +index 4e480bb..e15f076 100644 +--- a/src/windeployqt/main.cpp ++++ b/src/windeployqt/main.cpp +@@ -1324,7 +1324,7 @@ static DeployResult deploy(const Options &options, + const QString icuVersion = icuLibs.front().mid(index, numberExpression.matchedLength()); + if (optVerboseLevel > 1) + std::wcout << "Adding ICU version " << icuVersion << '\n'; +- icuLibs.push_back(QStringLiteral("icudt") + icuVersion + QLatin1String(windowsSharedLibrarySuffix)); ++ icuLibs.push_back(QStringLiteral("icudt") + (result.isDebug && platformHasDebugSuffix(options.platform) ? QStringLiteral("d") : QString()) + icuVersion + QLatin1String(windowsSharedLibrarySuffix)); + } + for (const QString &icuLib : qAsConst(icuLibs)) { + const QString icuPath = findInPath(icuLib); diff --git a/ports/qt5-tools/portfile.cmake b/ports/qt5-tools/portfile.cmake index a563767da8c46a..c166ed7f5701c1 100644 --- a/ports/qt5-tools/portfile.cmake +++ b/ports/qt5-tools/portfile.cmake @@ -1,7 +1,9 @@ -include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) +qt_submodule_installation(PATCHES + icudt-debug-suffix.patch # https://bugreports.qt.io/browse/QTBUG-87677 +) -qt_modular_library(qttools d37c0e11a26a21aa60f29f3b17ddc9895385d848692956e4481e49003cbe9c227daf8fda1c40a2ab70ac8e7e56d3771c1b2964524589eb77ac1f2362c269162e) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-tools/plugins/platforminputcontexts) \ No newline at end of file +if(EXISTS "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + file(INSTALL "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/plugins/platforms") +endif() diff --git a/ports/qt5-tools/vcpkg.json b/ports/qt5-tools/vcpkg.json new file mode 100644 index 00000000000000..5c81111397b2f5 --- /dev/null +++ b/ports/qt5-tools/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "qt5-tools", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications", + "dependencies": [ + { + "name": "qt5-activeqt", + "platform": "windows" + }, + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-translations/portfile.cmake b/ports/qt5-translations/portfile.cmake new file mode 100644 index 00000000000000..d473c56257aced --- /dev/null +++ b/ports/qt5-translations/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-translations/vcpkg.json b/ports/qt5-translations/vcpkg.json new file mode 100644 index 00000000000000..c85cd0149e59d5 --- /dev/null +++ b/ports/qt5-translations/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-translations", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 translations module", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-tools" + ] +} diff --git a/ports/qt5-virtualkeyboard/CONTROL b/ports/qt5-virtualkeyboard/CONTROL deleted file mode 100644 index de343f928620c3..00000000000000 --- a/ports/qt5-virtualkeyboard/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-virtualkeyboard -Version: 5.12.3-1 -Description: Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-virtualkeyboard/portfile.cmake b/ports/qt5-virtualkeyboard/portfile.cmake index 4d8310f7a1abca..214726759f3cf1 100644 --- a/ports/qt5-virtualkeyboard/portfile.cmake +++ b/ports/qt5-virtualkeyboard/portfile.cmake @@ -1,7 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtvirtualkeyboard 1aa00fec7e333e4fd52891b82c239b532cf41657d9c3f44c6cc1c211a1412dbf5584823511e54f3feb33b3fed9c6e0171b55afde2df9f0a358e2e4885e1b2686) - -set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-virtualkeyboard/vcpkg.json b/ports/qt5-virtualkeyboard/vcpkg.json new file mode 100644 index 00000000000000..c53720d04842f3 --- /dev/null +++ b/ports/qt5-virtualkeyboard/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt5-virtualkeyboard", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes", + "dependencies": [ + "qt5-multimedia", + "qt5-quickcontrols", + "qt5-quickcontrols", + "qt5-svg" + ] +} diff --git a/ports/qt5-wayland/portfile.cmake b/ports/qt5-wayland/portfile.cmake new file mode 100644 index 00000000000000..42560f179f777b --- /dev/null +++ b/ports/qt5-wayland/portfile.cmake @@ -0,0 +1,8 @@ +#Will not build on Windows! +message(WARNING "This port is just a placeholder until the required wayland libraries have been added into VCPKG! \ + As such the build will most likely fail until your system has the required wayland libraries installed (untested)") +message(WARNING "qtwayland requires libwayland-dev from your system package manager. You can install it with +sudo apt install libwayland-dev +on Ubuntu systems.") +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() diff --git a/ports/qt5-wayland/vcpkg.json b/ports/qt5-wayland/vcpkg.json new file mode 100644 index 00000000000000..7ccb51624c5972 --- /dev/null +++ b/ports/qt5-wayland/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-wayland", + "version-string": "5.15.2", + "port-version": 2, + "description": "Qt5 wayland Module;", + "supports": "linux", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-webchannel/CONTROL b/ports/qt5-webchannel/CONTROL deleted file mode 100644 index 93b47e0e036c3a..00000000000000 --- a/ports/qt5-webchannel/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-webchannel -Version: 5.12.3-1 -Description: Qt5 Web Channel module - Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients. -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-webchannel/portfile.cmake b/ports/qt5-webchannel/portfile.cmake index a453326c5f1673..2cd1cf47965fa3 100644 --- a/ports/qt5-webchannel/portfile.cmake +++ b/ports/qt5-webchannel/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwebchannel 2dda4351f5f3a5895a955d0ee77e55f758233672005a068d3e840a01d379727f99287fc6c8fb96516f23a5a8c4ebcb61098690fd3351e79be608e28657534006) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-webchannel/vcpkg.json b/ports/qt5-webchannel/vcpkg.json new file mode 100644 index 00000000000000..a50e4f1a4f7201 --- /dev/null +++ b/ports/qt5-webchannel/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-webchannel", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Web Channel module - Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients.", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-webengine/build_1.patch b/ports/qt5-webengine/build_1.patch new file mode 100644 index 00000000000000..dfa3ea721f2718 --- /dev/null +++ b/ports/qt5-webengine/build_1.patch @@ -0,0 +1,12 @@ +diff --git a/src/3rdparty/chromium/third_party/angle/BUILD.gn b/src/3rdparty/chromium/third_party/angle/BUILD.gn +index ad7675f4e..4a43479d9 100644 +--- a/src/3rdparty/chromium/third_party/angle/BUILD.gn ++++ b/src/3rdparty/chromium/third_party/angle/BUILD.gn +@@ -126,7 +126,6 @@ config("extra_warnings") { + # Enable more default warnings on Windows. + if (is_win) { + cflags += [ +- "/we4244", # Conversion: possible loss of data. + "/we4456", # Variable shadowing. + "/we4458", # declaration hides class member. + "/we4715", # not all control paths return a value diff --git a/ports/qt5-webengine/build_2.patch b/ports/qt5-webengine/build_2.patch new file mode 100644 index 00000000000000..7a4622516d846f --- /dev/null +++ b/ports/qt5-webengine/build_2.patch @@ -0,0 +1,29 @@ +diff --git a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h +index 59dbfad04..134357395 100644 +--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h ++++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h +@@ -74,7 +74,7 @@ class CircularQueue { + return queue_->Get(pos_); + } + +- const T* operator->() const { ++ T* operator->() const { + #if PERFETTO_DCHECK_IS_ON() + PERFETTO_DCHECK(generation_ == queue_->generation()); + #endif +@@ -82,13 +82,13 @@ class CircularQueue { + } + + T& operator*() { return *(operator->()); } +- const T& operator*() const { return *(operator->()); } ++ T& operator*() const { return *(operator->()); } + + value_type& operator[](difference_type i) { + return *(*this + i); + } + +- const value_type& operator[](difference_type i) const { ++ value_type& operator[](difference_type i) const { + return *(*this + i); + } + diff --git a/ports/qt5-webengine/build_3.patch b/ports/qt5-webengine/build_3.patch new file mode 100644 index 00000000000000..a86c5dec4641b4 --- /dev/null +++ b/ports/qt5-webengine/build_3.patch @@ -0,0 +1,17 @@ +diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h b/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h +index 78c316e04..fdb0312e0 100644 +--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h ++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h +@@ -138,9 +138,9 @@ class LABColorSpace { + clamp(lab.Z(), -128.0f, 128.0f)}; + + return { +- invf((v.X() + 16.0f) / 116.0f + (v.Y() * 0.002f)) * kIlluminantD50.X(), +- invf((v.X() + 16.0f) / 116.0f) * kIlluminantD50.Y(), +- invf((v.X() + 16.0f) / 116.0f - (v.Z() * 0.005f)) * kIlluminantD50.Z()}; ++ (float)(invf((v.X() + 16.0f) / 116.0f + (v.Y() * 0.002f)) * kIlluminantD50.X()), ++ (float)(invf((v.X() + 16.0f) / 116.0f) * kIlluminantD50.Y()), ++ (float)(invf((v.X() + 16.0f) / 116.0f - (v.Z() * 0.005f)) * kIlluminantD50.Z())}; + } + + private: diff --git a/ports/qt5-webengine/common.pri.patch b/ports/qt5-webengine/common.pri.patch new file mode 100644 index 00000000000000..ad58ab9e14ae52 --- /dev/null +++ b/ports/qt5-webengine/common.pri.patch @@ -0,0 +1,12 @@ +diff --git a/src/buildtools/config/common.pri b/src/buildtools/config/common.pri +#latest diff --git a/src/buildtools/config/common.pri b/src/buildtools/config/common.pri +index 97d39535c..dc09da43a 100644 +--- a/src/buildtools/config/common.pri ++++ b/src/buildtools/config/common.pri +@@ -57,5 +57,5 @@ + precompile_header { +- gn_args += enable_precompiled_headers=true ++ gn_args += enable_precompiled_headers=false + } else { + gn_args += enable_precompiled_headers=false + } diff --git a/ports/qt5-webengine/gl.patch b/ports/qt5-webengine/gl.patch new file mode 100644 index 00000000000000..a48ddf6c302a4e --- /dev/null +++ b/ports/qt5-webengine/gl.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h b/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h +index d54583e8b..1921185f8 100644 +--- a/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h ++++ b/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h +@@ -16,7 +16,7 @@ + namespace gl { + + class GLContext; +- ++typedef void *GLeglImageOES; + typedef void(GL_BINDING_CALL* glActiveShaderProgramProc)(GLuint pipeline, + GLuint program); + typedef void(GL_BINDING_CALL* glActiveTextureProc)(GLenum texture); diff --git a/ports/qt5-webengine/portfile.cmake b/ports/qt5-webengine/portfile.cmake new file mode 100644 index 00000000000000..60020c83f8a139 --- /dev/null +++ b/ports/qt5-webengine/portfile.cmake @@ -0,0 +1,58 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +string(LENGTH "${CURRENT_BUILDTREES_DIR}" buildtrees_path_length) +if(buildtrees_path_length GREATER 35 AND CMAKE_HOST_WIN32) + vcpkg_buildpath_length_warning(35) + message(FATAL_ERROR "terminating due to source length.") +endif() +#set(VCPKG_BUILD_TYPE release) #You probably want to set this to reduce build type and space requirements +message(STATUS "${PORT} requires a lot of free disk space (>100GB), ram (>8 GB) and time (>2h per configuration) to be successfully build.\n\ +-- As such ${PORT} is currently experimental.\n\ +-- If ${PORT} fails post build validation please open up an issue. \n\ +-- If it fails due to post validation the successfully installed files can be found in ${CURRENT_PACKAGES_DIR} \n\ +-- and just need to be copied into ${CURRENT_INSTALLED_DIR}") +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(STATUS "If ${PORT} directly fails ${PORT} might require additional prerequisites on Linux and OSX. Please check the configure logs.\n") +endif() +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) +vcpkg_find_acquire_program(GPERF) +vcpkg_find_acquire_program(PYTHON2) +vcpkg_find_acquire_program(NINJA) +get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY ) +get_filename_component(BISON_DIR "${BISON}" DIRECTORY ) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY ) +get_filename_component(GPERF_DIR "${GPERF}" DIRECTORY ) +get_filename_component(NINJA_DIR "${NINJA}" DIRECTORY ) + +if(WIN32) # WIN32 HOST probably has win_flex and win_bison! + if(NOT EXISTS "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}") + file(CREATE_LINK "${FLEX}" "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}") + endif() + if(NOT EXISTS "${BISON_DIR}/BISON${VCPKG_HOST_EXECUTABLE_SUFFIX}") + file(CREATE_LINK "${BISON}" "${BISON_DIR}/bison${VCPKG_HOST_EXECUTABLE_SUFFIX}") + endif() +endif() + +vcpkg_add_to_path(PREPEND "${FLEX_DIR}") +vcpkg_add_to_path(PREPEND "${BISON_DIR}") +vcpkg_add_to_path(PREPEND "${PYTHON2_DIR}") +vcpkg_add_to_path(PREPEND "${GPERF_DIR}") +vcpkg_add_to_path(PREPEND "${NINJA_DIR}") + +set(PATCHES common.pri.patch + gl.patch + build_1.patch + build_2.patch + build_3.patch) + +set(OPTIONS) +if("proprietary-codecs" IN_LIST FEATURES) + list(APPEND OPTIONS "-webengine-proprietary-codecs") +endif() +if(NOT VCPKG_TARGET_IS_WINDOWS) + list(APPEND OPTIONS "-webengine-system-libwebp" "-webengine-system-ffmpeg" "-webengine-system-icu") +endif() + +qt_submodule_installation(PATCHES ${PATCHES} BUILD_OPTIONS ${OPTIONS}) diff --git a/ports/qt5-webengine/vcpkg.json b/ports/qt5-webengine/vcpkg.json new file mode 100644 index 00000000000000..83a599f65bf8b5 --- /dev/null +++ b/ports/qt5-webengine/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "qt5-webengine", + "version-string": "5.15.2", + "port-version": 3, + "description": "Qt5 webengine Module;", + "supports": "!static", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + }, + { + "name": "ffmpeg", + "default-features": false, + "platform": "!windows" + }, + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-location", + "qt5-quickcontrols", + "qt5-quickcontrols2", + "qt5-tools", + "qt5-webchannel" + ], + "features": { + "proprietary-codecs": { + "description": "Enable proprietary-codecs in qtwebengine" + } + } +} diff --git a/ports/qt5-webglplugin/portfile.cmake b/ports/qt5-webglplugin/portfile.cmake new file mode 100644 index 00000000000000..d473c56257aced --- /dev/null +++ b/ports/qt5-webglplugin/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-webglplugin/vcpkg.json b/ports/qt5-webglplugin/vcpkg.json new file mode 100644 index 00000000000000..596fb42c8b4fe6 --- /dev/null +++ b/ports/qt5-webglplugin/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt5-webglplugin", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 webglplugin Module;", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-websockets/CONTROL b/ports/qt5-websockets/CONTROL deleted file mode 100644 index 4fbf6c19a1942c..00000000000000 --- a/ports/qt5-websockets/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-websockets -Version: 5.12.3-1 -Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455 -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-websockets/portfile.cmake b/ports/qt5-websockets/portfile.cmake index 88cc1fd9ab9078..214726759f3cf1 100644 --- a/ports/qt5-websockets/portfile.cmake +++ b/ports/qt5-websockets/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwebsockets 212a98d987b4fd16216ac9a1c98e061be6a5bd2e2c4ec8be80424d6f23afeace790fe666abe8a11e2116dc20f17a41ad0c817fceacdfa5f766b93068ac614817) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-websockets/vcpkg.json b/ports/qt5-websockets/vcpkg.json new file mode 100644 index 00000000000000..173b65271dba34 --- /dev/null +++ b/ports/qt5-websockets/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-websockets", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5-webview/CONTROL b/ports/qt5-webview/CONTROL deleted file mode 100644 index b82afd8ef2dcd2..00000000000000 --- a/ports/qt5-webview/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-webview -Version: 5.12.3-1 -Description: Qt5 WebView module - Provides a way to display web content in a QML application without necessarily including a full web browser stack by using native APIs where it makes sense. -Build-Depends: qt5-base, qt5-modularscripts, qt5-declarative diff --git a/ports/qt5-webview/portfile.cmake b/ports/qt5-webview/portfile.cmake index 813c5601bd0ab7..2cd1cf47965fa3 100644 --- a/ports/qt5-webview/portfile.cmake +++ b/ports/qt5-webview/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwebview 426227b9b4cb61c0e88958dbaab21e842a25989098a0e94a06fe3efc8a2b9d4a5d3216296c8228da977ef52cd5844b66048bcb84019da4f06de1b1009dfdffa5) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-webview/vcpkg.json b/ports/qt5-webview/vcpkg.json new file mode 100644 index 00000000000000..c033a0465328ff --- /dev/null +++ b/ports/qt5-webview/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "qt5-webview", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 WebView module - Provides a way to display web content in a QML application without necessarily including a full web browser stack by using native APIs where it makes sense.", + "dependencies": [ + "qt5-declarative" + ] +} diff --git a/ports/qt5-winextras/CONTROL b/ports/qt5-winextras/CONTROL deleted file mode 100644 index cbb4a71c6574e8..00000000000000 --- a/ports/qt5-winextras/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-winextras -Version: 5.12.3-1 -Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. -Build-Depends: qt5-modularscripts, qt5-base, atlmfc (windows) diff --git a/ports/qt5-winextras/portfile.cmake b/ports/qt5-winextras/portfile.cmake index 90adb16c09b448..69c3adbb2e99ef 100644 --- a/ports/qt5-winextras/portfile.cmake +++ b/ports/qt5-winextras/portfile.cmake @@ -1,9 +1,5 @@ -include(vcpkg_common_functions) - if (NOT VCPKG_TARGET_IS_WINDOWS) message(FATAL_ERROR "qt5-winextras only support Windows.") endif() - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwinextras e50cb237359ce7a3bde6989ec4349fe67be3b4999092516e891bba12f0fb4acb9954de8e2f0171db0e849b7d3ef94bd80f77f81162afb239e49c6e2e0760343b) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() diff --git a/ports/qt5-winextras/vcpkg.json b/ports/qt5-winextras/vcpkg.json new file mode 100644 index 00000000000000..64434f24eb83fb --- /dev/null +++ b/ports/qt5-winextras/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "qt5-winextras", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Windows Extras Module. Provides platform-specific APIs for Windows.", + "supports": "windows", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + }, + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + "qt5-multimedia" + ] +} diff --git a/ports/qt5-x11extras/portfile.cmake b/ports/qt5-x11extras/portfile.cmake new file mode 100644 index 00000000000000..214726759f3cf1 --- /dev/null +++ b/ports/qt5-x11extras/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-x11extras/vcpkg.json b/ports/qt5-x11extras/vcpkg.json new file mode 100644 index 00000000000000..032093137ff979 --- /dev/null +++ b/ports/qt5-x11extras/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt5-x11extras", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 x11extras Module;", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/qt5-xmlpatterns/CONTROL b/ports/qt5-xmlpatterns/CONTROL deleted file mode 100644 index a2e394f3d682de..00000000000000 --- a/ports/qt5-xmlpatterns/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5-xmlpatterns -Version: 5.12.3-1 -Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation -Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-xmlpatterns/portfile.cmake b/ports/qt5-xmlpatterns/portfile.cmake index c92a6057b5d581..fdbfa8d8ef3f13 100644 --- a/ports/qt5-xmlpatterns/portfile.cmake +++ b/ports/qt5-xmlpatterns/portfile.cmake @@ -1,5 +1,5 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtxmlpatterns 4e421f0c78ca74f726f758bd95b33915297922f3b5a4fff84dde2600969f54f3914828fdb7903c7171e192f81966680b6c6bb4750de0be72728124470e7c798d) \ No newline at end of file +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() +if(EXISTS "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + file(INSTALL "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/plugins/platforms") +endif() \ No newline at end of file diff --git a/ports/qt5-xmlpatterns/vcpkg.json b/ports/qt5-xmlpatterns/vcpkg.json new file mode 100644 index 00000000000000..efe86ebc5f0245 --- /dev/null +++ b/ports/qt5-xmlpatterns/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qt5-xmlpatterns", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative" + ] +} diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL deleted file mode 100644 index 0f6bdeafd9c89f..00000000000000 --- a/ports/qt5/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: qt5 -Version: 5.12.3 -Homepage: https://www.qt.io/ -Description: Qt5 Application Framework -Build-Depends: qt5-3d, qt5-activeqt (windows), qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-graphicaleffects, qt5-imageformats, qt5-location, qt5-multimedia, qt5-mqtt, qt5-networkauth, qt5-purchasing, qt5-quickcontrols, qt5-quickcontrols2, qt5-script, qt5-scxml, qt5-sensors, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-webchannel, qt5-websockets, qt5-winextras (windows), qt5-macextras (osx), qt5-xmlpatterns diff --git a/ports/qt5/vcpkg.json b/ports/qt5/vcpkg.json new file mode 100644 index 00000000000000..bbf4197fdf3f6e --- /dev/null +++ b/ports/qt5/vcpkg.json @@ -0,0 +1,344 @@ +{ + "name": "qt5", + "version-string": "5.15.2", + "port-version": 1, + "description": "Qt5 Application Framework", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + } + ], + "default-features": [ + "essentials" + ], + "features": { + "3d": { + "description": [], + "dependencies": [ + "qt5-3d" + ] + }, + "activeqt": { + "description": "Windows Only", + "dependencies": [ + { + "name": "qt5-activeqt", + "platform": "windows" + } + ] + }, + "all": { + "description": "Install all Qt5 submodules (Warning: Could take a long time and fail...)", + "dependencies": [ + { + "name": "qt5", + "features": [ + "3d", + "activeqt", + "charts", + "connectivity", + "datavis3d", + "declarative", + "doc", + "extras", + "gamepad", + "graphicaleffects", + "imageformats", + "location", + "mqtt", + "multimedia", + "networkauth", + "purchasing", + "quickcontrols", + "quickcontrols2", + "remoteobjects", + "script", + "scxml", + "sensors", + "serialbus", + "serialport", + "speech", + "svg", + "tools", + "translations", + "virtualkeyboard", + "webchannel", + "webglplugin", + "websockets", + "webview", + "xmlpatterns" + ] + }, + { + "name": "qt5", + "default-features": false, + "features": [ + "mysqlplugin", + "webengine" + ], + "platform": "!static" + }, + { + "name": "qt5", + "default-features": false, + "features": [ + "wayland" + ], + "platform": "!windows" + } + ] + }, + "charts": { + "description": [], + "dependencies": [ + "qt5-charts" + ] + }, + "connectivity": { + "description": [], + "dependencies": [ + "qt5-connectivity" + ] + }, + "datavis3d": { + "description": [], + "dependencies": [ + "qt5-datavis3d" + ] + }, + "declarative": { + "description": [], + "dependencies": [ + "qt5-declarative" + ] + }, + "doc": { + "description": [], + "dependencies": [ + "qt5-doc" + ] + }, + "essentials": { + "description": "Build the essential qt modules", + "dependencies": [ + { + "name": "qt5", + "default-features": false, + "features": [ + "activeqt", + "declarative", + "imageformats", + "multimedia", + "networkauth", + "quickcontrols2", + "svg", + "tools" + ] + } + ] + }, + "extras": { + "description": [], + "dependencies": [ + { + "name": "qt5-androidextras", + "platform": "android" + }, + { + "name": "qt5-macextras", + "platform": "osx" + }, + { + "name": "qt5-winextras", + "platform": "windows" + }, + { + "name": "qt5-x11extras", + "platform": "linux" + } + ] + }, + "gamepad": { + "description": [], + "dependencies": [ + "qt5-gamepad" + ] + }, + "graphicaleffects": { + "description": [], + "dependencies": [ + "qt5-graphicaleffects" + ] + }, + "imageformats": { + "description": [], + "dependencies": [ + "qt5-imageformats" + ] + }, + "latest": { + "description": "Build latest qt version (5.15.2) instead of LTS (Currently latest==LTS)", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false, + "features": [ + "latest" + ] + } + ] + }, + "location": { + "description": [], + "dependencies": [ + "qt5-location" + ] + }, + "mqtt": { + "description": [], + "dependencies": [ + "qt5-mqtt" + ] + }, + "multimedia": { + "description": [], + "dependencies": [ + "qt5-multimedia" + ] + }, + "networkauth": { + "description": [], + "dependencies": [ + "qt5-networkauth" + ] + }, + "purchasing": { + "description": [], + "dependencies": [ + "qt5-purchasing" + ] + }, + "quickcontrols": { + "description": "(deprecated)", + "dependencies": [ + "qt5-quickcontrols" + ] + }, + "quickcontrols2": { + "description": [], + "dependencies": [ + "qt5-quickcontrols2" + ] + }, + "remoteobjects": { + "description": [], + "dependencies": [ + "qt5-remoteobjects" + ] + }, + "script": { + "description": "(deprecated)", + "dependencies": [ + "qt5-script" + ] + }, + "scxml": { + "description": [], + "dependencies": [ + "qt5-scxml" + ] + }, + "sensors": { + "description": [], + "dependencies": [ + "qt5-sensors" + ] + }, + "serialbus": { + "description": [], + "dependencies": [ + "qt5-serialbus" + ] + }, + "serialport": { + "description": [], + "dependencies": [ + "qt5-serialport" + ] + }, + "speech": { + "description": [], + "dependencies": [ + "qt5-speech" + ] + }, + "svg": { + "description": [], + "dependencies": [ + "qt5-svg" + ] + }, + "tools": { + "description": [], + "dependencies": [ + "qt5-tools" + ] + }, + "translations": { + "description": [], + "dependencies": [ + "qt5-translations" + ] + }, + "virtualkeyboard": { + "description": [], + "dependencies": [ + "qt5-virtualkeyboard" + ] + }, + "wayland": { + "description": [], + "dependencies": [ + "qt5-wayland" + ] + }, + "webchannel": { + "description": [], + "dependencies": [ + "qt5-webchannel" + ] + }, + "webengine": { + "description": [], + "dependencies": [ + "qt5-webengine" + ] + }, + "webglplugin": { + "description": [], + "dependencies": [ + "qt5-webglplugin" + ] + }, + "websockets": { + "description": [], + "dependencies": [ + "qt5-websockets" + ] + }, + "webview": { + "description": [], + "dependencies": [ + "qt5-webview" + ] + }, + "xmlpatterns": { + "description": "(deprecated)", + "dependencies": [ + "qt5-xmlpatterns" + ] + } + } +} diff --git a/ports/qt5compat/portfile.cmake b/ports/qt5compat/portfile.cmake new file mode 100644 index 00000000000000..15c35a056bb2ed --- /dev/null +++ b/ports/qt5compat/portfile.cmake @@ -0,0 +1,28 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "textcodec" FEATURE_textcodec + "codecs" FEATURE_codecs + "big-codecs" FEATURE_big_codecs + "iconv" FEATURE_iconv + "iconv" CMAKE_DISABLE_FIND_PACKAGE_ICU +INVERTED_FEATURES + "iconv" CMAKE_DISABLE_FIND_PACKAGE_WrapIconv + ) + +#For iconv feature to work the following must be true: +#CONDITION NOT FEATURE_icu AND FEATURE_textcodec AND NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND WrapIconv_FOUND +#TODO: check if qtbase was built with ICU and fail if iconv is given here. + +set(TOOL_NAMES) +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + ${FEATURE_OPTIONS} + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qt5compat/vcpkg.json b/ports/qt5compat/vcpkg.json new file mode 100644 index 00000000000000..0bb1654fbada93 --- /dev/null +++ b/ports/qt5compat/vcpkg.json @@ -0,0 +1,63 @@ +{ + "name": "qt5compat", + "version-semver": "6.1.3", + "description": "The module contains unsupported Qt 5 APIs", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + } + ], + "default-features": [ + "big-codecs", + "codecs", + "default-features", + "textcodec" + ], + "features": { + "big-codecs": { + "description": "Supports big codecs, e.g. CJK.", + "dependencies": [ + { + "name": "qt5compat", + "default-features": false, + "features": [ + "textcodec" + ] + } + ] + }, + "codecs": { + "description": "Supports non-unicode text conversions.", + "dependencies": [ + { + "name": "qt5compat", + "default-features": false, + "features": [ + "textcodec" + ] + } + ] + }, + "default-features": { + "description": "Platform-dependent default features" + }, + "iconv": { + "description": "Provides internationalization on Unix.", + "dependencies": [ + "libiconv", + { + "name": "qt5compat", + "default-features": false, + "features": [ + "textcodec" + ] + } + ] + }, + "textcodec": { + "description": "Supports conversions between text encodings." + } + } +} diff --git a/ports/qt6betablock/portfile.cmake b/ports/qt6betablock/portfile.cmake new file mode 100644 index 00000000000000..9aefc82414d125 --- /dev/null +++ b/ports/qt6betablock/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt6betablock/vcpkg.json b/ports/qt6betablock/vcpkg.json new file mode 100644 index 00000000000000..ddae387f7265cd --- /dev/null +++ b/ports/qt6betablock/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "qt6betablock", + "version-semver": "6.2.0-beta", + "description": "Port to block qt6 ports not in the current release to be build in CI", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + } + ] +} diff --git a/ports/qtactiveqt/portfile.cmake b/ports/qtactiveqt/portfile.cmake new file mode 100644 index 00000000000000..7284983c825668 --- /dev/null +++ b/ports/qtactiveqt/portfile.cmake @@ -0,0 +1,29 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +set(NO_BIN_AND_TOOLS FALSE) +if(VCPKG_TARGET_ARCHITECTURE MATCHES "^arm" AND VCPKG_TARGET_IS_WINDOWS) + set(NO_BIN_AND_TOOLS TRUE) +endif() + +if(NOT NO_BIN_AND_TOOLS) + set(TOOL_NAMES + dumpcpp + dumpdoc + idc + testcon + ) +endif() + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) + +if(NO_BIN_AND_TOOLS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/tools") +endif() diff --git a/ports/qtactiveqt/vcpkg.json b/ports/qtactiveqt/vcpkg.json new file mode 100644 index 00000000000000..bd8bcf93bb69dc --- /dev/null +++ b/ports/qtactiveqt/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "qtactiveqt", + "version-semver": "6.1.3", + "description": "ActiveQt", + "homepage": "https://www.qt.io/", + "supports": "windows", + "dependencies": [ + { + "name": "qtactiveqt", + "host": true, + "default-features": false + }, + { + "name": "qtbase", + "default-features": false + }, + { + "name": "qttools", + "default-features": false + } + ] +} diff --git a/ports/qtbase/20b3eb0.diff b/ports/qtbase/20b3eb0.diff new file mode 100644 index 00000000000000..978b30ffa5bc8a --- /dev/null +++ b/ports/qtbase/20b3eb0.diff @@ -0,0 +1,130 @@ +From 20b3eb0fd8b5f82cf432f2c06e7c5d3f533df0a5 Mon Sep 17 00:00:00 2001 +From: Cristian Adam +Date: Thu, 03 Jun 2021 12:42:07 +0200 +Subject: [PATCH] CMake: Add support for building with clang-cl + +qmake had support for building with clang-cl as the win32-clang-msvc mkspec. + +Task-number: QTBUG-89642 +Task-number: QTBUG-88081 +Change-Id: I0709c289f90fedb121620d1e67ef841602219816 +Reviewed-by: Alexandru Croitor +--- + +diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake +index bb8b146..792276e 100644 +--- a/cmake/QtBuild.cmake ++++ b/cmake/QtBuild.cmake +@@ -285,7 +285,9 @@ + list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS WIN64 _WIN64) + endif() + if(MSVC) +- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") ++ if (CLANG) ++ set(QT_DEFAULT_MKSPEC win32-clang-msvc) ++ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") + set(QT_DEFAULT_MKSPEC win32-arm64-msvc) + else() + set(QT_DEFAULT_MKSPEC win32-msvc) +diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake +index 0c57d9e..0eeccce 100644 +--- a/cmake/QtFlagHandlingHelpers.cmake ++++ b/cmake/QtFlagHandlingHelpers.cmake +@@ -235,7 +235,7 @@ + function(qt_set_msvc_cplusplus_options target visibility) + # For MSVC we need to explicitly pass -Zc:__cplusplus to get correct __cplusplus. + # Check qt_config_compile_test for more info. +- if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION GREATER_EQUAL 1913) ++ if(MSVC AND MSVC_VERSION GREATER_EQUAL 1913) + target_compile_options("${target}" ${visibility} "-Zc:__cplusplus" "-permissive-") + endif() + endfunction() +diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt +index 2c991f7..9f0c95e 100644 +--- a/src/corelib/CMakeLists.txt ++++ b/src/corelib/CMakeLists.txt +@@ -263,4 +263,24 @@ + # special case end + ) + ++if (MSVC AND CLANG) ++ foreach(subarch sse4_1 rdrnd rdseed) ++ if (TEST_subarch_${subarch}) ++ qt_internal_add_simd_part(Core SIMD ${subarch} ++ SOURCES ++ global/qsimd.cpp ++ ) ++ endif() ++ endforeach() ++ ++ foreach(subarch sse4_1 aesni) ++ if (TEST_subarch_${subarch}) ++ qt_internal_add_simd_part(Core SIMD ${subarch} ++ SOURCES ++ tools/qhash.cpp ++ ) ++ endif() ++ endforeach() ++endif() ++ + # special case begin +diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h +index 5869751..6108b07 100644 +--- a/src/corelib/global/qt_pch.h ++++ b/src/corelib/global/qt_pch.h +@@ -62,17 +62,22 @@ + # define _POSIX_ + # include + # undef _POSIX_ +-#endif +-#include +-#include +-#include +-#include +-#include /* All moc genereated code has this include */ +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++# if defined(Q_CC_CLANG) && defined(Q_CC_MSVC) ++// See https://bugs.llvm.org/show_bug.cgi?id=41226 ++# include ++__declspec(selectany) auto *__wmemchr_symbol_loader_value = wmemchr(L"", L'0', 0); ++# endif ++# endif ++# include ++# include ++# include ++# include ++# include /* All moc genereated code has this include */ ++# include ++# include ++# include ++# include ++# include ++# include ++# include + #endif +diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt +index 5fe4d59..04f58dd 100644 +--- a/src/gui/CMakeLists.txt ++++ b/src/gui/CMakeLists.txt +@@ -577,6 +577,15 @@ + ) + endif() + ++ if (MSVC AND CLANG AND TEST_subarch_sse4_1) ++ qt_internal_add_simd_part(Gui SIMD sse4_1 ++ SOURCES ++ painting/qdrawhelper.cpp ++ painting/qdrawhelper_sse2.cpp ++ painting/qdrawhelper_ssse3.cpp ++ ) ++ endif() ++ + qt_internal_add_simd_part(Gui SIMD ssse3 + SOURCES + image/qimage_ssse3.cpp diff --git a/ports/qtbase/allow_outside_prefix.patch b/ports/qtbase/allow_outside_prefix.patch new file mode 100644 index 00000000000000..7ddef9e4ffeffa --- /dev/null +++ b/ports/qtbase/allow_outside_prefix.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake +index bd186c28b..2c1994d2e 100644 +--- a/cmake/QtBuild.cmake ++++ b/cmake/QtBuild.cmake +@@ -28,11 +28,13 @@ function(qt_configure_process_path name default docstring) + elseif(rel_path MATCHES "^\.\./") + # INSTALL_SYSCONFDIR is allowed to be outside the prefix. + if(NOT name STREQUAL "INSTALL_SYSCONFDIR") +- message(FATAL_ERROR +- "Path component '${name}' is outside computed install prefix: ${rel_path} ") +- return() ++ #message(FATAL_ERROR ++ # "Path component '${name}' is outside computed install prefix: ${rel_path} ") ++ #return() ++ set("${name}" "${rel_path}" CACHE STRING "${docstring}" FORCE) ++ else() ++ set("${name}" "${${name}}" CACHE STRING "${docstring}" FORCE) + endif() +- set("${name}" "${${name}}" CACHE STRING "${docstring}" FORCE) + else() + set("${name}" "${rel_path}" CACHE STRING "${docstring}" FORCE) + endif() diff --git a/ports/qtbase/buildcmake.patch b/ports/qtbase/buildcmake.patch new file mode 100644 index 00000000000000..07c3e3704d39a4 --- /dev/null +++ b/ports/qtbase/buildcmake.patch @@ -0,0 +1,41 @@ +diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake +index d08126731..efd1ada92 100644 +--- a/cmake/QtBuild.cmake ++++ b/cmake/QtBuild.cmake +@@ -387,7 +387,7 @@ set(QT_KNOWN_MODULES_WITH_TOOLS "" CACHE INTERNAL "Known Qt modules with tools" + + # Reset syncqt cache variable, to make sure it gets recomputed on reconfiguration, otherwise + # it might not get installed. +-unset(QT_SYNCQT CACHE) ++# unset(QT_SYNCQT CACHE) + + # For adjusting variables when running tests, we need to know what + # the correct variable is for separating entries in PATH-alike +diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in +index 9eb913f4d..286f3287e 100644 +--- a/cmake/QtBuildInternalsExtra.cmake.in ++++ b/cmake/QtBuildInternalsExtra.cmake.in +@@ -35,8 +35,8 @@ endif() + set(QT_WILL_INSTALL @QT_WILL_INSTALL@ CACHE BOOL + "Boolean indicating if doing a Qt prefix build (vs non-prefix build)." FORCE) + +-set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH +-"A path to the source tree of the previously configured QtBase project." FORCE) ++# set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH ++# "A path to the source tree of the previously configured QtBase project." FORCE) + + # Propagate decision of building tests and examples to other repositories. + set(QT_BUILD_TESTS @QT_BUILD_TESTS@ CACHE BOOL "Build the testing tree.") +diff --git a/cmake/QtPrlHelpers.cmake b/cmake/QtPrlHelpers.cmake +index 30d3bd6d3..80bb2bf46 100644 +--- a/cmake/QtPrlHelpers.cmake ++++ b/cmake/QtPrlHelpers.cmake +@@ -222,7 +222,7 @@ function(qt_internal_walk_libs + qt_internal_should_not_promote_package_target_to_global( + "${lib_target_unaliased}" should_not_promote) + if(NOT is_global AND is_imported AND NOT should_not_promote) +- set_property(TARGET ${lib_target_unaliased} PROPERTY IMPORTED_GLOBAL TRUE) ++ #set_property(TARGET ${lib_target_unaliased} PROPERTY IMPORTED_GLOBAL TRUE) + endif() + endif() + else() diff --git a/ports/qtbase/clang-cl_source_location.patch b/ports/qtbase/clang-cl_source_location.patch new file mode 100644 index 00000000000000..1eeb67aaf74c07 --- /dev/null +++ b/ports/qtbase/clang-cl_source_location.patch @@ -0,0 +1,14 @@ +diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h +index 823b2057b..4a8cd4fa8 100644 +--- a/src/corelib/kernel/qproperty.h ++++ b/src/corelib/kernel/qproperty.h +@@ -49,8 +49,8 @@ + + #include + +-#if __has_include() && __cplusplus >= 202002L && !defined(Q_CLANG_QDOC) ++#if __has_include() && __cplusplus >= 202002L && !defined(Q_CLANG_QDOC) && defined(__cpp_consteval) + #include + #if defined(__cpp_lib_source_location) + #define QT_SOURCE_LOCATION_NAMESPACE std + #define QT_PROPERTY_COLLECT_BINDING_LOCATION diff --git a/ports/qtbase/cmake/qt_install_copyright.cmake b/ports/qtbase/cmake/qt_install_copyright.cmake new file mode 100644 index 00000000000000..5215f96758e5f5 --- /dev/null +++ b/ports/qtbase/cmake/qt_install_copyright.cmake @@ -0,0 +1,18 @@ +#Could probably be the beginning of a vcpkg_install_copyright? +function(qt_install_copyright SOURCE_PATH) + #Find the relevant license file and install it + if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.FDL") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.FDL") + endif() + file(INSTALL "${LICENSE_PATH}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endfunction() diff --git a/ports/qtbase/cmake/qt_install_submodule.cmake b/ports/qtbase/cmake/qt_install_submodule.cmake new file mode 100644 index 00000000000000..ed497a13e59ca7 --- /dev/null +++ b/ports/qtbase/cmake/qt_install_submodule.cmake @@ -0,0 +1,248 @@ +include("${CMAKE_CURRENT_LIST_DIR}/qt_install_copyright.cmake") + +if(QT_IS_LATEST AND PORT STREQUAL "qtbase") + include("${CMAKE_CURRENT_LIST_DIR}/qt_port_details-latest.cmake") +else() + include("${CMAKE_CURRENT_LIST_DIR}/qt_port_details.cmake") +endif() +#set(PORT_DEBUG ON) + +if(NOT DEFINED QT6_DIRECTORY_PREFIX) + set(QT6_DIRECTORY_PREFIX "Qt6/") +endif() + +macro(qt_stop_on_update) + if(QT_UPDATE_VERSION) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled CACHE INTERNAL "") + return() + endif() +endmacro() + +function(qt_download_submodule) + cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "" + "" + "PATCHES") + + if(QT_UPDATE_VERSION) + set(VCPKG_USE_HEAD_VERSION ON) + set(UPDATE_PORT_GIT_OPTIONS + HEAD_REF "${QT_GIT_TAG}") + endif() + + vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL "https://code.qt.io/qt/${PORT}.git" + #TAG ${${PORT}_TAG} + REF "${${PORT}_REF}" + ${UPDATE_PORT_GIT_OPTIONS} + PATCHES ${_qarg_PATCHES} + ) + + if(QT_UPDATE_VERSION) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled CACHE INTERNAL "") + message(STATUS "VCPKG_HEAD_VERSION:${VCPKG_HEAD_VERSION}") + file(APPEND "${VCPKG_ROOT_DIR}/ports/qtbase/cmake/qt_new_refs.cmake" "set(${PORT}_REF ${VCPKG_HEAD_VERSION})\n") + endif() + set(SOURCE_PATH "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() + + +function(qt_cmake_configure) + cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "DISABLE_NINJA" + "" + "TOOL_NAMES;OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE") + + vcpkg_find_acquire_program(PERL) # Perl is probably required by all qt ports for syncqt + get_filename_component(PERL_PATH ${PERL} DIRECTORY) + vcpkg_add_to_path(${PERL_PATH}) + if(NOT PORT STREQUAL "qtwebengine") # qtwebengine requires python2 + vcpkg_find_acquire_program(PYTHON3) # Python is required by some qt ports + get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) + vcpkg_add_to_path(${PYTHON3_PATH}) + endif() + + if(CMAKE_HOST_WIN32) + if(NOT ${PORT} MATCHES "qtbase") + list(APPEND _qarg_OPTIONS -DQT_SYNCQT:PATH="${CURRENT_HOST_INSTALLED_DIR}/tools/Qt6/bin/syncqt.pl") + endif() + set(PERL_OPTION -DHOST_PERL:PATH="${PERL}") + else() + if(NOT ${PORT} MATCHES "qtbase") + list(APPEND _qarg_OPTIONS -DQT_SYNCQT:PATH=${CURRENT_HOST_INSTALLED_DIR}/tools/Qt6/bin/syncqt.pl) + endif() + set(PERL_OPTION -DHOST_PERL:PATH=${PERL}) + endif() + + if(NOT _qarg_DISABLE_NINJA) + set(NINJA_OPTION PREFER_NINJA) + endif() + + if(VCPKG_CROSSCOMPILING) + list(APPEND _qarg_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}) + list(APPEND _qarg_OPTIONS -DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 AND VCPKG_TARGET_IS_WINDOWS) # Remove if PR #16111 is merged + list(APPEND _qarg_OPTIONS -DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64 -DCMAKE_SYSTEM_NAME:STRING=Windows) + endif() + endif() + + vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + ${NINJA_OPTION} + OPTIONS + #-DQT_HOST_PATH= # For crosscompiling + #-DQT_PLATFORM_DEFINITION_DIR=mkspecs/win32-msvc + #-DQT_QMAKE_TARGET_MKSPEC=win32-msvc + #-DQT_USE_CCACHE + -DQT_NO_MAKE_EXAMPLES:BOOL=TRUE + -DQT_NO_MAKE_TESTS:BOOL=TRUE + ${PERL_OPTION} + -DINSTALL_BINDIR:STRING=bin + -DINSTALL_LIBEXECDIR:STRING=bin + -DINSTALL_PLUGINSDIR:STRING=${qt_plugindir} + -DINSTALL_QMLDIR:STRING=${qt_qmldir} + ${_qarg_OPTIONS} + OPTIONS_RELEASE + ${_qarg_OPTIONS_RELEASE} + -DINSTALL_DOCDIR:STRING=doc/${QT6_DIRECTORY_PREFIX} + -DINSTALL_INCLUDEDIR:STRING=include/${QT6_DIRECTORY_PREFIX} + -DINSTALL_DESCRIPTIONSDIR:STRING=share/Qt6/modules + -DINSTALL_MKSPECSDIR:STRING=share/Qt6/mkspecs + -DINSTALL_TRANSLATIONSDIR:STRING=translations/${QT6_DIRECTORY_PREFIX} + OPTIONS_DEBUG + -DINPUT_debug:BOOL=ON + -DINSTALL_DOCDIR:STRING=../doc/${QT6_DIRECTORY_PREFIX} + -DINSTALL_INCLUDEDIR:STRING=../include/${QT6_DIRECTORY_PREFIX} + -DINSTALL_TRANSLATIONSDIR:STRING=../translations/${QT6_DIRECTORY_PREFIX} + -DINSTALL_DESCRIPTIONSDIR:STRING=../share/Qt6/modules + -DINSTALL_MKSPECSDIR:STRING=../share/Qt6/mkspecs + ${_qis_CONFIGURE_OPTIONS_DEBUG} + ) + set(Z_VCPKG_CMAKE_GENERATOR "${Z_VCPKG_CMAKE_GENERATOR}" PARENT_SCOPE) +endfunction() + +function(qt_fixup_and_cleanup) + cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "" + "" + "TOOL_NAMES") + vcpkg_copy_pdbs() + + ## Handle CMake files. + set(COMPONENTS) + file(GLOB COMPONENTS_OR_FILES LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/share/Qt6*") + list(REMOVE_ITEM COMPONENTS_OR_FILES "${CURRENT_PACKAGES_DIR}/share/Qt6") + foreach(_glob IN LISTS COMPONENTS_OR_FILES) + if(IS_DIRECTORY "${_glob}") + string(REPLACE "${CURRENT_PACKAGES_DIR}/share/Qt6" "" _component "${_glob}") + debug_message("Adding cmake component: '${_component}'") + list(APPEND COMPONENTS ${_component}) + endif() + endforeach() + + foreach(_comp IN LISTS COMPONENTS) + if(EXISTS "${CURRENT_PACKAGES_DIR}/share/Qt6${_comp}") + vcpkg_fixup_cmake_targets(CONFIG_PATH share/Qt6${_comp} TARGET_PATH share/Qt6${_comp} TOOLS_PATH "tools/Qt6/bin") + # Would rather put it into share/cmake as before but the import_prefix correction in vcpkg_fixup_cmake_targets is working against that. + else() + message(STATUS "WARNING: Qt component ${_comp} not found/built!") + endif() + endforeach() + #fix debug plugin paths (should probably be fixed in vcpkg_fixup_pkgconfig) + file(GLOB_RECURSE DEBUG_CMAKE_TARGETS "${CURRENT_PACKAGES_DIR}/share/**/*Targets-debug.cmake") + debug_message("DEBUG_CMAKE_TARGETS:${DEBUG_CMAKE_TARGETS}") + foreach(_debug_target IN LISTS DEBUG_CMAKE_TARGETS) + vcpkg_replace_string("${_debug_target}" "{_IMPORT_PREFIX}/${qt_plugindir}" "{_IMPORT_PREFIX}/debug/${qt_plugindir}") + vcpkg_replace_string("${_debug_target}" "{_IMPORT_PREFIX}/${qt_qmldir}" "{_IMPORT_PREFIX}/debug/${qt_qmldir}") + endforeach() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(GLOB_RECURSE STATIC_CMAKE_TARGETS "${CURRENT_PACKAGES_DIR}/share/Qt6Qml/QmlPlugins/*.cmake") + foreach(_plugin_target IN LISTS STATIC_CMAKE_TARGETS) + # restore a single get_filename_component which was remove by vcpkg_fixup_pkgconfig + vcpkg_replace_string("${_plugin_target}" + [[get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)]] + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)") + endforeach() + endif() + + set(qt_tooldest "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") + set(qt_searchdir "${CURRENT_PACKAGES_DIR}/bin") + ## Handle Tools + foreach(_tool IN LISTS _qarg_TOOL_NAMES) + if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + debug_message("Removed '${_tool}' from copy tools list since it was not found!") + list(REMOVE_ITEM _qarg_TOOL_NAMES ${_tool}) + endif() + endforeach() + if(_qarg_TOOL_NAMES) + set(tool_names ${_qarg_TOOL_NAMES}) + vcpkg_copy_tools(TOOL_NAMES ${tool_names} SEARCH_DIR "${qt_searchdir}" DESTINATION "${qt_tooldest}" AUTO_CLEAN) + if(EXISTS "${CURRENT_PACKAGES_DIR}/${qt_plugindir}") + file(COPY "${CURRENT_PACKAGES_DIR}/${qt_plugindir}/" DESTINATION "${qt_tooldest}") + endif() + endif() + + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/") + file(COPY "${CURRENT_PACKAGES_DIR}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") + endif() + file(GLOB_RECURSE _installed_dll_files RELATIVE "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin" "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/*.dll") + foreach(_dll_to_remove IN LISTS _installed_dll_files) + file(GLOB_RECURSE _packaged_dll_file "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${_dll_to_remove}") + if(EXISTS "${_packaged_dll_file}") + file(REMOVE "${_packaged_dll_file}") + endif() + endforeach() + file(GLOB_RECURSE _folders LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/") + file(GLOB_RECURSE _files "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/") + if(_files) + list(REMOVE_ITEM _folders ${_files}) + endif() + foreach(_dir IN LISTS _folders) + if(NOT "${_remaining_dll_files}" MATCHES "${_dir}") + file(REMOVE_RECURSE "${_dir}") + endif() + endforeach() + endif() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/lib/cmake/" + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(GLOB_RECURSE _bin_files "${CURRENT_PACKAGES_DIR}/bin/*") + debug_message("Files in bin: '${_bin_files}'") + if(NOT _bin_files) # Only clean if empty otherwise let vcpkg throw and error. + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/" "${CURRENT_PACKAGES_DIR}/debug/bin/") + endif() + endif() + +endfunction() + +function(qt_install_submodule) + cmake_parse_arguments(PARSE_ARGV 0 "_qis" "DISABLE_NINJA" + "" + "PATCHES;TOOL_NAMES;CONFIGURE_OPTIONS;CONFIGURE_OPTIONS_DEBUG;CONFIGURE_OPTIONS_RELEASE") + + set(qt_plugindir ${QT6_DIRECTORY_PREFIX}plugins) + set(qt_qmldir ${QT6_DIRECTORY_PREFIX}qml) + + qt_download_submodule(PATCHES ${_qis_PATCHES}) + if(QT_UPDATE_VERSION) + return() + endif() + + if(_qis_DISABLE_NINJA) + set(_opt DISABLE_NINJA) + endif() + qt_cmake_configure(${_opt} + OPTIONS ${_qis_CONFIGURE_OPTIONS} + OPTIONS_DEBUG ${_qis_CONFIGURE_OPTIONS_DEBUG} + OPTIONS_RELEASE ${_qis_CONFIGURE_OPTIONS_RELEASE}) + + vcpkg_install_cmake(ADD_BIN_TO_PATH) + + qt_fixup_and_cleanup(TOOL_NAMES ${_qis_TOOL_NAMES}) + + qt_install_copyright("${SOURCE_PATH}") + set(SOURCE_PATH "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/ports/qtbase/cmake/qt_port_details-latest.cmake b/ports/qtbase/cmake/qt_port_details-latest.cmake new file mode 100644 index 00000000000000..5dda21b7fc7ba5 --- /dev/null +++ b/ports/qtbase/cmake/qt_port_details-latest.cmake @@ -0,0 +1,80 @@ +set(QT_VERSION 6.1.0-beta3) +set(QT_GIT_TAG v${QT_VERSION}) +#set(QT_UPDATE_VERSION TRUE) +set(QT_IS_LATEST 1) +# List of added an removed modules https://doc-snapshots.qt.io/qt6-dev/whatsnew60.html#changes-to-supported-modules +#https://wiki.qt.io/Get_the_Source +#TODO:qtknx? + +set(QT_PORTS qtbase + qttools + qtdeclarative + qtsvg + qt5compat + qtshadertools + qtquicktimeline + qtquick3d + qttranslations + qtwayland + qtdoc + qtcoap + qtopcua + qtimageformats + qtmqtt + qtnetworkauth + qtquickcontrols2 + ### + qtactiveqt + qtdatavis3d + #qtdeviceutils + qtlottie + qtscxml + qtvirtualkeyboard + qtcharts + ) +# New: qtactiveqt qtdatavis3d qtlottie qtscxml qtvirtualkeyboard qtcharts + +foreach(_port IN LISTS QT_PORTS) + set(${_port}_TAG ${QT_GIT_TAG}) +endforeach() + +set(qtbase_REF 089b73de033190e511c0bd11cba22160024ef9a4) +set(qttools_REF a810532b7f68348281bac13fc03395bf08827c28) +set(qtdeclarative_REF 1e4730ae0f44ece8ff8a27d4de127d8da9ed8a13) +set(qtsvg_REF 1adf841f16cab093f7db6a1fbffd088b138afed3) +set(qt5compat_REF 6ab304e8d2fe7f58cf608f8a30abbf769680f027) +set(qtshadertools_REF c26caefc6f67f01ae52372a70d3887077477388d) +set(qtquicktimeline_REF a91e82010047c9422d573b4c8648c175b470839e) +set(qtquick3d_REF f6614a31bd8a092d2081092dc7043ead9e7475ea) +set(qttranslations_REF 8a39fca4b56817fa2f7393fd5c5850bb167ac8f3) +set(qtwayland_REF 8237b7384537e3bc1687c1e05a20d450a6ed38f3) +set(qtdoc_REF 9259552281e4322a63f2cd0edce7904af1147bca) +set(qtimageformats_REF acd9ad1f69606553bc975fb33ae4efd52b2fbe9f) +set(qtmqtt_REF 3bdd419302de7e1e8a819509d115c32d2fbf4d49) +set(qtquickcontrols2_REF a74819563efc3495a86a696e678bec11bab33ec6) +set(qtnetworkauth_REF 92a1ff5b63f56e77030cdfbe9c456a31d3a2d5e2) +set(qtcoap_REF bc8f5ff0e678aa4b4c9081e543fd7c119754a3a1) +set(qtopcua_REF 0cd72d5e9cfaaf96b6d9a2d4ce4a6c46ffbbcdd4) +### +set(qtactiveqt_REF 94a100baa75248ba49c01680ca3632cd7180a8e8) +set(qtdatavis3d_REF c1e7a47f47cc289652f2004403cb1e587308c290) +#set(qtdeviceutils_REF 0) #missing tag +set(qtlottie_REF ddda33a7294512487035de6338a91657501c9fd2) +set(qtscxml_REF 8e2ad5c798110337b90c582c68e903465e19e3fe) +set(qtvirtualkeyboard_REF 266626a0414aef2fcc65d412f02c993c87a1cae6) +set(qtcharts_REF 962a05cea44108d13f081a12bd53232ef856427c) + +if(QT_UPDATE_VERSION) + message(STATUS "Running Qt in automatic version port update mode!") + set(_VCPKG_INTERNAL_NO_HASH_CHECK 1) + if("${PORT}" MATCHES "qtbase") + file(REMOVE "${CMAKE_CURRENT_LIST_DIR}/cmake/qt_new_refs.cmake") + foreach(_current_qt_port IN LISTS QT_PORTS) + set(_current_control "${VCPKG_ROOT_DIR}/ports/${_current_qt_port}/vcpkg.json") + file(READ "${_current_control}" _control_contents) + string(REGEX REPLACE "\"version-string\": [^\n]+\n" "\"version-string\": \"${QT_VERSION}\",\n" _control_contents "${_control_contents}") + file(WRITE "${_current_control}" "${_control_contents}") + #need to run a vcpkg format-manifest --all after update once + endforeach() + endif() +endif() diff --git a/ports/qtbase/cmake/qt_port_details.cmake b/ports/qtbase/cmake/qt_port_details.cmake new file mode 100644 index 00000000000000..7d44bf87e9954d --- /dev/null +++ b/ports/qtbase/cmake/qt_port_details.cmake @@ -0,0 +1,80 @@ +set(QT_VERSION 6.1.3) +set(QT_GIT_TAG v${QT_VERSION}) +#set(QT_UPDATE_VERSION TRUE) +if(QT_UPDATE_VERSION) + function(vcpkg_extract_source_archive) + endfunction() +endif() +# List of added an removed modules https://doc-snapshots.qt.io/qt6-dev/whatsnew60.html#changes-to-supported-modules +#https://wiki.qt.io/Get_the_Source +#TODO:qtknx? + +set(QT_PORTS qtbase + qttools + qtdeclarative + qtsvg + qt5compat + qtshadertools + qtquicktimeline + qtquick3d + qttranslations + qtwayland + qtdoc + qtcoap + qtopcua + qtimageformats + qtmqtt + qtnetworkauth + qtquickcontrols2 + qtactiveqt + qtdatavis3d + #qtdeviceutils + qtlottie + qtscxml + qtvirtualkeyboard + qtcharts + qt + ) + +foreach(_port IN LISTS QT_PORTS) + set(${_port}_TAG ${QT_GIT_TAG}) +endforeach() + +set(qtbase_REF 3ff48409ed14c7a63010b14e053a7201a61391c5) +set(qttools_REF a69e290e25fd145a8b02223130192555f7962ea2) +set(qtdeclarative_REF 38845e18ef11ac2f1a1db82377b30f1649fdc499) +set(qtsvg_REF 24d635154689be46aaaf2ba0e3538d2f8fafeb3d) +set(qt5compat_REF fcacd7f544b496420db485187aa55d76898ce73d) +set(qtshadertools_REF 06fc3c49b7b8cba80e6b6ff31ac5d703e3a2abcb) +set(qtquicktimeline_REF be6321dc5164657072ff7069a7132d44222a503c) +set(qtquick3d_REF ccd45eb39ec1fb88d62438c9dd0007e26c0ccc18) +set(qttranslations_REF 2d30ad16d90abfc0806d28e3504348df84b1e62b) +set(qtwayland_REF 501c287f34a66ec89e3e49da218feb4bc69c9c5e) +set(qtdoc_REF 13fa00e32307bae90884a608880a542f6ed90646) +set(qtimageformats_REF 8d6e8efc1afbd5e9cf793fbf0507e1d332c45d1f) +set(qtmqtt_REF a6213a104f65dccb13508b58b0f07a249d9922c8) +set(qtquickcontrols2_REF 6d62c0677d60e42a19bb72d641129933770f7723) +set(qtnetworkauth_REF 7ce9e47b469141f9bace9661d07999dcc120e7f6) +set(qtcoap_REF 83b5b7e8e2c6afa9d5ab69123c40993c48b30970) +set(qtopcua_REF bda48fd7729fb65a7504a1bada496489ee15d245) +set(qtactiveqt_REF 32cad4a02f78205e85490f6b8cbde82ecb1b5f2f) +set(qtdatavis3d_REF 8d6c15fa8daa68a4d48368b8ceb8c517e973eac7) +#set(qtdeviceutils_REF 0) #missing tag +set(qtlottie_REF 266531117ba6646893d3806566144aff19d5e309) +set(qtscxml_REF aa27d28e302f3529940172ab2782c2d7e28fb532) +set(qtvirtualkeyboard_REF eb26e2af30e6cbb2c4b9224d8e9f489f198c82f0) +set(qtcharts_REF 3e0d6ffa572efe8a09774ac6c6263b6df5eaf718) + +if(QT_UPDATE_VERSION) + message(STATUS "Running Qt in automatic version port update mode!") + set(_VCPKG_INTERNAL_NO_HASH_CHECK 1) + if("${PORT}" MATCHES "qtbase") + foreach(_current_qt_port IN LISTS QT_PORTS) + set(_current_control "${VCPKG_ROOT_DIR}/ports/${_current_qt_port}/vcpkg.json") + file(READ "${_current_control}" _control_contents) + string(REGEX REPLACE "\"version-(string|semver)\": [^\n]+\n" "\"version-semver\": \"${QT_VERSION}\",\n" _control_contents "${_control_contents}") + file(WRITE "${_current_control}" "${_control_contents}") + #need to run a vcpkg format-manifest --all after update once + endforeach() + endif() +endif() diff --git a/ports/qtbase/config_install.patch b/ports/qtbase/config_install.patch new file mode 100644 index 00000000000000..51c6e975cf6d7e --- /dev/null +++ b/ports/qtbase/config_install.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake +index bd186c28b..edee52e8b 100644 +--- a/cmake/QtBuild.cmake ++++ b/cmake/QtBuild.cmake +@@ -194,7 +194,7 @@ function(qt_internal_set_up_global_paths) + if(QT_CONFIG_INSTALL_DIR) + string(APPEND QT_CONFIG_INSTALL_DIR "/") + endif() +- string(APPEND QT_CONFIG_INSTALL_DIR ${__config_path_part}) ++ string(APPEND QT_CONFIG_INSTALL_DIR "share") + + set(QT_BUILD_DIR "${QT_BUILD_DIR}" PARENT_SCOPE) + set(QT_INSTALL_DIR "${QT_INSTALL_DIR}" PARENT_SCOPE) diff --git a/ports/qtbase/dont_force_cmakecache.patch b/ports/qtbase/dont_force_cmakecache.patch new file mode 100644 index 00000000000000..f8e90f3a10e969 --- /dev/null +++ b/ports/qtbase/dont_force_cmakecache.patch @@ -0,0 +1,46 @@ +diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake +index 4f8106dfa..bec5c402e 100644 +--- a/cmake/QtPostProcessHelpers.cmake ++++ b/cmake/QtPostProcessHelpers.cmake +@@ -414,7 +414,7 @@ function(qt_generate_install_prefixes out_var) + + foreach(var ${vars}) + get_property(docstring CACHE "${var}" PROPERTY HELPSTRING) +- string(APPEND content "set(${var} \"${${var}}\" CACHE STRING \"${docstring}\" FORCE)\n") ++ string(APPEND content "set(${var} \"${${var}}\" CACHE STRING \"${docstring}\")\n") + endforeach() + + set(${out_var} "${content}" PARENT_SCOPE) +@@ -465,12 +465,12 @@ function(qt_generate_build_internals_extra_cmake_code) + # at the start of project configuration (with an empty value), + # so we need to force override it. + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS +- "set(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" CACHE STRING \"Choose the type of build.\" FORCE)\n") ++ "set(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" CACHE STRING \"Choose the type of build.\")\n") + + endif() + if(CMAKE_CONFIGURATION_TYPES) + string(APPEND multi_config_specific +- " set(CMAKE_CONFIGURATION_TYPES \"${CMAKE_CONFIGURATION_TYPES}\" CACHE STRING \"\" FORCE)\n") ++ " set(CMAKE_CONFIGURATION_TYPES \"${CMAKE_CONFIGURATION_TYPES}\" CACHE STRING \"\")\n") + endif() + if(CMAKE_TRY_COMPILE_CONFIGURATION) + string(APPEND multi_config_specific +@@ -492,7 +492,7 @@ function(qt_generate_build_internals_extra_cmake_code) + if(multi_config_specific) + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS " + if(QT_BUILD_STANDALONE_TESTS) +- set(CMAKE_BUILD_TYPE \"\${QT_MULTI_CONFIG_FIRST_CONFIG}\" CACHE STRING \"Choose the type of build.\" FORCE) ++ set(CMAKE_BUILD_TYPE \"\${QT_MULTI_CONFIG_FIRST_CONFIG}\" CACHE STRING \"Choose the type of build.\") + endif()\n") + endif() + +@@ -583,7 +583,7 @@ endif()\n") + if(\"$\{CMAKE_STAGING_PREFIX}\" STREQUAL \"\" + AND NOT QT_BUILD_INTERNALS_NO_FORCE_SET_STAGING_PREFIX) + set(CMAKE_STAGING_PREFIX \"${CMAKE_STAGING_PREFIX}\" CACHE PATH +- \"Staging path prefix, prepended onto install directories on the host machine.\" FORCE) ++ \"Staging path prefix, prepended onto install directories on the host machine.\" ) + endif() + ") + endif() diff --git a/ports/qtbase/fix_find_dep.patch b/ports/qtbase/fix_find_dep.patch new file mode 100644 index 00000000000000..0414198a1e6884 --- /dev/null +++ b/ports/qtbase/fix_find_dep.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 40c410aeb..c36084fb9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,6 +24,8 @@ project(QtBase + LANGUAGES CXX C ASM + ) + ++find_package(Threads REQUIRED) ++set_property(TARGET Threads::Threads PROPERTY _qt_no_promote_global TRUE) + # Make sure we only use latest private CMake API, aka no compatibility wrappers. + set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE) + diff --git a/ports/qtbase/harfbuzz.patch b/ports/qtbase/harfbuzz.patch new file mode 100644 index 00000000000000..a2f8e74249c393 --- /dev/null +++ b/ports/qtbase/harfbuzz.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindWrapSystemHarfbuzz.cmake b/cmake/FindWrapSystemHarfbuzz.cmake +index 3cb44aa76..9bf0d7165 100644 +--- a/cmake/FindWrapSystemHarfbuzz.cmake ++++ b/cmake/FindWrapSystemHarfbuzz.cmake +@@ -6,7 +6,7 @@ if(TARGET WrapSystemHarfbuzz::WrapSystemHarfbuzz) + endif() + set(WrapSystemHarfbuzz_REQUIRED_VARS __harfbuzz_found) + +-find_package(harfbuzz ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET) ++find_package(harfbuzz QUIET) # VCPKG is missing the version file for harfbuzz. + + # Gentoo has some buggy version of a harfbuzz Config file. Check if include paths are valid. + set(__harfbuzz_target_name "harfbuzz::harfbuzz") diff --git a/ports/qtbase/jpeg.patch b/ports/qtbase/jpeg.patch new file mode 100644 index 00000000000000..1f2080561e300d --- /dev/null +++ b/ports/qtbase/jpeg.patch @@ -0,0 +1,22 @@ +diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp +index 29bf5ab58..1a3cfd2bf 100644 +--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp ++++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp +@@ -63,12 +63,12 @@ + extern "C" { + // jpeglib.h->jmorecfg.h tries to typedef int boolean; but this conflicts with + // some Windows headers that may or may not have been included +-#ifdef HAVE_BOOLEAN +-# undef HAVE_BOOLEAN +-#endif +-#define boolean jboolean ++//#ifdef HAVE_BOOLEAN ++//# undef HAVE_BOOLEAN ++//#endif ++//#define boolean jboolean + +-#define XMD_H // shut JPEGlib up ++//#define XMD_H // shut JPEGlib up + #include + #ifdef const + # undef const // remove crazy C hackery in jconfig.h diff --git a/ports/qtbase/portfile.cmake b/ports/qtbase/portfile.cmake new file mode 100644 index 00000000000000..9d48e0ed5c445d --- /dev/null +++ b/ports/qtbase/portfile.cmake @@ -0,0 +1,354 @@ +set(QT_IS_LATEST OFF) + +## All above goes into the qt_port_hashes in the future +include("${CMAKE_CURRENT_LIST_DIR}/cmake/qt_install_submodule.cmake") + +set(${PORT}_PATCHES + jpeg.patch + harfbuzz.patch + config_install.patch + allow_outside_prefix.patch + buildcmake.patch + dont_force_cmakecache.patch + fix_find_dep.patch + 20b3eb0.diff # Upstream fix to build with clang-cl; didn't make 6.1.1 so I backported the patch. + clang-cl_source_location.patch + ) + +if(NOT VCPKG_USE_HEAD_VERSION AND NOT QT_IS_LATEST) + list(APPEND ${PORT}_PATCHES + ) +endif() + +if(VCPKG_TARGET_IS_WINDOWS AND NOT "doubleconversion" IN_LIST FEATURES) + message(FATAL_ERROR "${PORT} requires feature doubleconversion on windows!" ) +endif() + +# Features can be found via searching for qt_feature in all configure.cmake files in the source: +# The files also contain information about the Platform for which it is searched +# Always use FEATURE_ in vcpkg_configure_cmake +# (using QT_FEATURE_X overrides Qts condition check for the feature.) +# Theoretically there is a feature for every widget to enable/disable it but that is way to much for vcpkg + +set(input_vars doubleconversion freetype harfbuzz libb2 jpeg libmd4c png sql-sqlite) +set(INPUT_OPTIONS) +foreach(_input IN LISTS input_vars) + if(_input MATCHES "(png|jpeg)" ) + list(APPEND INPUT_OPTIONS -DINPUT_lib${_input}:STRING=) + elseif(_input MATCHES "(sql-sqlite)") + list(APPEND INPUT_OPTIONS -DINPUT_sqlite:STRING=) # Not yet used be the cmake build + else() + list(APPEND INPUT_OPTIONS -DINPUT_${_input}:STRING=) + endif() + if("${_input}" IN_LIST FEATURES) + string(APPEND INPUT_OPTIONS system) + elseif(_input STREQUAL "libb2" AND NOT VCPKG_TARGET_IS_WINDOWS) + string(APPEND INPUT_OPTIONS system) + elseif(_input STREQUAL "libmd4c") + string(APPEND INPUT_OPTIONS qt) # libmd4c is not yet in VCPKG (but required by qtdeclarative) + else() + string(APPEND INPUT_OPTIONS no) + endif() +endforeach() + +# General features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "appstore-compliant" FEATURE_appstore-compliant + "zstd" FEATURE_zstd + "framework" FEATURE_framework + "concurrent" FEATURE_concurrent + "dbus" FEATURE_dbus + "gui" FEATURE_gui + "network" FEATURE_network + "sql" FEATURE_sql + "widgets" FEATURE_widgets + #"xml" FEATURE_xml # Required to build moc + "testlib" FEATURE_testlib +INVERTED_FEATURES + "zstd" CMAKE_DISABLE_FIND_PACKAGE_ZSTD + "dbus" CMAKE_DISABLE_FIND_PACKAGE_WrapDBus1 + ) + +list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libudev:BOOL=ON) +list(APPEND FEATURE_OPTIONS -DFEATURE_xml:BOOL=ON) + +# Corelib features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_CORE_OPTIONS +FEATURES + "doubleconversion" FEATURE_doubleconversion + "glib" FEATURE_glib + "icu" FEATURE_icu + "pcre2" FEATURE_pcre2 +INVERTED_FEATURES + #"doubleconversion" CMAKE_DISABLE_FIND_PACKAGE_WrapDoubleConversion # Required + "icu" CMAKE_DISABLE_FIND_PACKAGE_ICU + #"pcre2" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemPCRE2 # Bug in qt cannot be deactivated + "glib" CMAKE_DISABLE_FIND_PACKAGE_GLIB2 + ) + +#list(APPEND FEATURE_CORE_OPTIONS -DFEATURE_doubleconversion:BOOL=ON) +list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_LTTngUST:BOOL=ON) +list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_PPS:BOOL=ON) +list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Slog2:BOOL=ON) +list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libsystemd:BOOL=ON) + + +# Network features: + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_NET_OPTIONS + FEATURES + "openssl" FEATURE_openssl + "brotli" FEATURE_brotli + INVERTED_FEATURES + "brotli" CMAKE_DISABLE_FIND_PACKAGE_WrapBrotli + "openssl" CMAKE_DISABLE_FIND_PACKAGE_WrapOpenSSL + ) + +if("openssl" IN_LIST FEATURES) + list(APPEND FEATURE_NET_OPTIONS -DINPUT_openssl=linked) +else() + list(APPEND FEATURE_NET_OPTIONS -DINPUT_openssl=no) +endif() + +list(APPEND FEATURE_NET_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libproxy:BOOL=ON) +list(APPEND FEATURE_NET_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GSSAPI:BOOL=ON) + +# Gui features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_GUI_OPTIONS + FEATURES + "freetype" FEATURE_freetype # required on windows + "harfbuzz" FEATURE_harfbuzz + "fontconfig" FEATURE_fontconfig # NOT WINDOWS + "jpeg" FEATURE_jpeg + "png" FEATURE_png + #"opengl" INPUT_opengl=something + INVERTED_FEATURES + "vulkan" CMAKE_DISABLE_FIND_PACKAGE_Vulkan + "egl" CMAKE_DISABLE_FIND_PACKAGE_EGL + "fontconfig" CMAKE_DISABLE_FIND_PACKAGE_Fontconfig + #"freetype" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemFreetype # Bug in qt cannot be deactivated + "harfbuzz" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemHarfbuzz + "jpeg" CMAKE_DISABLE_FIND_PACKAGE_JPEG + "png" CMAKE_DISABLE_FIND_PACKAGE_PNG + "xlib" CMAKE_DISABLE_FIND_PACKAGE_X11 + "xkb" CMAKE_DISABLE_FIND_PACKAGE_XKB + "xcb" CMAKE_DISABLE_FIND_PACKAGE_XCB + "xcb-xlib" CMAKE_DISABLE_FIND_PACKAGE_X11_XCB + "xkbcommon-x11" CMAKE_DISABLE_FIND_PACKAGE_XKB_COMMON_X11 + "xrender" CMAKE_DISABLE_FIND_PACKAGE_XRender + # There are more X features but I am unsure how to safely disable them! Most of them seem to be found automaticall with find_package(X11) + ) + +if("xcb" IN_LIST FEATURES) + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xcb=yes) +else() + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xcb=no) +endif() +if("xkb" IN_LIST FEATURES) + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xkbcommon=yes) +else() + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xkbcommon=no) +endif() +list(APPEND FEATURE_GUI_OPTIONS ) + +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_ATSPI2:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_DirectFB:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libdrm:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_gbm:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libinput:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Mtdev:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GLESv2:BOOL=ON) # only used if INPUT_opengl is correctly set +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Tslib:BOOL=ON) +# sql-drivers features: + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_SQLDRIVERS_OPTIONS + FEATURES + "sql-sqlite" FEATURE_system_sqlite + INVERTED_FEATURES + "sql-psql" CMAKE_DISABLE_FIND_PACKAGE_PostgreSQL + "sql-sqlite" CMAKE_DISABLE_FIND_PACKAGE_SQLite3 + # "sql-db2" FEATURE_sql-db2 + # "sql-ibase" FEATURE_sql-ibase + # "sql-mysql" FEATURE_sql-mysql + # "sql-oci" FEATURE_sql-oci + # "sql-odbc" FEATURE_sql-odbc + ) + +set(DB_LIST DB2 MySQL Oracle ODBC) +foreach(_db IN LISTS DB_LIST) + list(APPEND FEATURE_SQLDRIVERS_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${_db}:BOOL=ON) +endforeach() + +# printsupport features: +# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_PRINTSUPPORT_OPTIONS + # ) +list(APPEND FEATURE_PRINTSUPPORT_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_CUPS:BOOL=ON) + +# widgets features: +# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_WIDGETS_OPTIONS + # "gtk3" FEATURE_gtk3 + # There are a lot of additional features here to deactivate parts of widgets. + # ) +list(APPEND FEATURE_WIDGETS_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GTK3:BOOL=ON) + +set(TOOL_NAMES + androiddeployqt + androidtestrunner + cmake_automoc_parser + moc + qdbuscpp2xml + qdbusxml2cpp + qlalr + qmake + qmake6 + qvkgen + rcc + tracegen + uic + ) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + #--trace-expand + ${FEATURE_OPTIONS} + ${FEATURE_CORE_OPTIONS} + ${FEATURE_NET_OPTIONS} + ${FEATURE_GUI_OPTIONS} + ${FEATURE_SQLDRIVERS_OPTIONS} + ${FEATURE_PRINTSUPPORT_OPTIONS} + ${FEATURE_WIDGETS_OPTIONS} + ${INPUT_OPTIONS} + -DQT_USE_BUNDLED_BundledFreetype:BOOL=FALSE + -DQT_USE_BUNDLED_BundledHarfbuzz:BOOL=FALSE + -DQT_USE_BUNDLED_BundledLibpng:BOOL=FALSE + -DQT_USE_BUNDLED_BundledPcre2:BOOL=FALSE + -DINPUT_bundled_xcb_xinput:STRING=no + -DFEATURE_force_debug_info:BOOL=ON + -DFEATURE_relocatable:BOOL=ON + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + -DQT_NO_MAKE_TOOLS:BOOL=ON + -DFEATURE_debug:BOOL=ON + ) + +# Install CMake helper scripts +if(QT_IS_LATEST) + set(port_details "${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_details-latest.cmake") +else() + set(port_details "${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_details.cmake") +endif() +file(INSTALL + "${port_details}" + DESTINATION + "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME + "qt_port_details.cmake" + ) +file(COPY + "${CMAKE_CURRENT_LIST_DIR}/cmake/qt_install_copyright.cmake" + "${CMAKE_CURRENT_LIST_DIR}/cmake/qt_install_submodule.cmake" + DESTINATION + "${CURRENT_PACKAGES_DIR}/share/${PORT}" + ) + +qt_stop_on_update() + +set(script_files qt-cmake qt-cmake-private qt-cmake-standalone-test qt-configure-module qt-internal-configure-tests) +if(VCPKG_TARGET_IS_WINDOWS) + set(script_suffix .bat) +else() + set(script_suffix) +endif() +set(other_files + qt-cmake-private-install.cmake + syncqt.pl + android_cmakelist_patcher.sh + android_emulator_launcher.sh + ensure_pro_file.cmake + ) +foreach(_config debug release) + if(_config MATCHES "debug") + set(path_suffix debug/) + else() + set(path_suffix) + endif() + if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/${path_suffix}bin") + continue() + endif() + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${path_suffix}") + foreach(script IN LISTS script_files) + if(EXISTS "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${script}${script_suffix}") + set(target_script "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${path_suffix}${script}${script_suffix}") + file(RENAME "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${script}${script_suffix}" "${target_script}") + file(READ "${target_script}" _contents) + if(_config MATCHES "debug") + string(REPLACE "\\..\\share\\" "\\..\\..\\..\\..\\share\\" _contents "${_contents}") + else() + string(REPLACE "\\..\\share\\" "\\..\\..\\..\\share\\" _contents "${_contents}") + endif() + file(WRITE "${target_script}" "${_contents}") + endif() + endforeach() + foreach(other IN LISTS other_files) + if(EXISTS "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${other}") + file(RENAME "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${other}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${path_suffix}${other}") + endif() + endforeach() +endforeach() + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(GLOB_RECURSE _bin_files "${CURRENT_PACKAGES_DIR}/bin/*") + if(NOT _bin_files) # Only clean if empty otherwise let vcpkg throw and error. + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/" "${CURRENT_PACKAGES_DIR}/debug/bin/") + endif() +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/QtBuildInternals") + +if(NOT VCPKG_TARGET_IS_OSX) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/macos") +endif() +if(NOT VCPKG_TARGET_IS_IOS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/ios") +endif() + +set(_file "${CMAKE_CURRENT_LIST_DIR}/qt.conf.in") +set(REL_PATH) +configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/qt_release.conf" @ONLY) +set(BACKUP_CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}") +set(BACKUP_CURRENT_HOST_INSTALLED_DIR "${CURRENT_HOST_INSTALLED_DIR}") +set(CURRENT_INSTALLED_DIR "./../../../") +set(CURRENT_HOST_INSTALLED_DIR "./../../../") +configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qt.conf") +set(REL_PATH debug/) +configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qt.debug.conf") +set(CURRENT_INSTALLED_DIR "${BACKUP_CURRENT_INSTALLED_DIR}") +set(CURRENT_HOST_INSTALLED_DIR "${BACKUP_CURRENT_HOST_INSTALLED_DIR}") +configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/qt_debug.conf" @ONLY) + +if(VCPKG_TARGET_IS_WINDOWS) + set(_DLL_FILES brotlicommon brotlidec bz2 freetype harfbuzz libpng16) + set(DLLS_TO_COPY) + foreach(_file IN LISTS _DLL_FILES) + if(EXISTS "${CURRENT_INSTALLED_DIR}/bin/${_file}.dll") + list(APPEND DLLS_TO_COPY "${CURRENT_INSTALLED_DIR}/bin/${_file}.dll") + endif() + endforeach() + file(COPY ${DLLS_TO_COPY} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") +endif() + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/qmake.debug.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") +set(hostinfofile "${CURRENT_PACKAGES_DIR}/share/Qt6HostInfo/Qt6HostInfoConfig.cmake") +file(READ "${hostinfofile}" _contents) +string(REPLACE [[set(QT6_HOST_INFO_LIBEXECDIR "bin")]] [[set(QT6_HOST_INFO_LIBEXECDIR "tools/Qt6/bin")]] _contents "${_contents}") +string(REPLACE [[set(QT6_HOST_INFO_BINDIR "bin")]] [[set(QT6_HOST_INFO_BINDIR "tools/Qt6/bin")]] _contents "${_contents}") +file(WRITE "${hostinfofile}" "${_contents}") + +set(coretools "${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreTools.cmake") +if(EXISTS "${coretools}") + file(READ "${coretools}" _contents) + string(REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qmake.exe"]] [["${_IMPORT_PREFIX}/tools/Qt6/bin/qmake.debug.bat"]] _contents "${_contents}") + file(WRITE "${coretools}" "${_contents}") +endif() diff --git a/ports/qtbase/qmake.debug.bat b/ports/qtbase/qmake.debug.bat new file mode 100644 index 00000000000000..1b7440b3e08fc3 --- /dev/null +++ b/ports/qtbase/qmake.debug.bat @@ -0,0 +1,2 @@ +@echo off +"%0\..\qmake.exe" -qtconf "%0\..\qt.debug.conf" %* \ No newline at end of file diff --git a/ports/qtbase/qt.conf.in b/ports/qtbase/qt.conf.in new file mode 100644 index 00000000000000..ba5c0ee2d47240 --- /dev/null +++ b/ports/qtbase/qt.conf.in @@ -0,0 +1,31 @@ +[DevicePaths] +Prefix=${CURRENT_INSTALLED_DIR} +Headers=include/@QT6_DIRECTORY_PREFIX@ +Libraries=@REL_PATH@lib +Plugins=@REL_PATH@@QT6_DIRECTORY_PREFIX@plugins +Qml2Imports=@REL_PATH@@QT6_DIRECTORY_PREFIX@qml +Documentation=doc/@QT6_DIRECTORY_PREFIX@ +Binaries=@REL_PATH@bin +LibraryExecutables=tools/Qt6/bin +ArchData=share/Qt6 +Data=share/Qt6 +Translations=translations/@QT6_DIRECTORY_PREFIX@ +Examples=share/examples/@QT6_DIRECTORY_PREFIX@ +[Paths] +Prefix=${CURRENT_HOST_INSTALLED_DIR} +Headers=include/@QT6_DIRECTORY_PREFIX@ +Libraries=@REL_PATH@lib +Plugins=@REL_PATH@@QT6_DIRECTORY_PREFIX@plugins +Qml2Imports=@REL_PATH@@QT6_DIRECTORY_PREFIX@qml +Documentation=doc/@QT6_DIRECTORY_PREFIX@ +Binaries=@REL_PATH@bin +LibraryExecutables=tools/Qt6/bin +ArchData=share/Qt6 +Data=share/Qt6 +Translations=translations/@QT6_DIRECTORY_PREFIX@ +Examples=share/examples/@QT6_DIRECTORY_PREFIX@ +HostPrefix=${CURRENT_HOST_INSTALLED_DIR} +HostData=share/Qt6 +HostBinaries=@REL_PATH@bin +HostLibraries=@REL_PATH@lib +HostLibraryExecutables=tools/Qt6/bin diff --git a/ports/qtbase/vcpkg.json b/ports/qtbase/vcpkg.json new file mode 100644 index 00000000000000..72b43da6821318 --- /dev/null +++ b/ports/qtbase/vcpkg.json @@ -0,0 +1,322 @@ +{ + "name": "qtbase", + "version-semver": "6.1.3", + "description": "Qt Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.", + "homepage": "https://www.qt.io/", + "dependencies": [ + "freetype", + { + "name": "libb2", + "platform": "!windows" + }, + "pcre2", + { + "name": "qtbase", + "host": true, + "default-features": false + }, + "zlib" + ], + "default-features": [ + "brotli", + "concurrent", + "dbus", + "default-features", + "doubleconversion", + "freetype", + "gui", + "harfbuzz", + "icu", + "jpeg", + "network", + "openssl", + "pcre2", + "png", + "sql", + "sql-psql", + "sql-sqlite", + "testlib", + "widgets", + "zstd" + ], + "features": { + "appstore-compliant": { + "description": "Disable code that is not allowed in platform app stores. This is on by default for platforms which require distribution through an app store by default, in particular Android, iOS, tvOS, and watchOS." + }, + "brotli": { + "description": "Support for downloading and decompressing resources compressed with Brotli through QNetworkAccessManager.", + "dependencies": [ + "brotli", + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + } + ] + }, + "concurrent": { + "description": "Provides a high-level multi-threading API. Qt Concurrent" + }, + "dbus": { + "description": "Qt D-Bus" + }, + "default-features": { + "description": "Platform-dependent default features", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "appstore-compliant" + ], + "platform": "uwp" + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "egl", + "fontconfig", + "xcb", + "xcb-xlib", + "xrender" + ], + "platform": "linux" + } + ] + }, + "doubleconversion": { + "description": "Enable double conversion support", + "dependencies": [ + "double-conversion" + ] + }, + "egl": { + "description": "EGL", + "dependencies": [ + "egl-registry" + ] + }, + "fontconfig": { + "description": "Use fontconfig", + "dependencies": [ + "fontconfig", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "framework": { + "$platform": "osx", + "description": "MAC framework build" + }, + "freetype": { + "description": "Supports the FreeType 2 font engine (and its supported font formats).", + "dependencies": [ + { + "name": "freetype", + "default-features": false + } + ] + }, + "glib": { + "description": "GLib", + "dependencies": [ + "glib" + ] + }, + "gui": { + "description": "Qt Gui", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "freetype" + ] + } + ] + }, + "harfbuzz": { + "description": "Use harfbuzz", + "dependencies": [ + "harfbuzz", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "icu": { + "description": "Enable ICU support", + "dependencies": [ + "icu" + ] + }, + "jpeg": { + "description": "Enable JPEG", + "dependencies": [ + "libjpeg-turbo", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "network": { + "description": "Qt Network" + }, + "openssl": { + "description": "Enable OpenSSL", + "dependencies": [ + "openssl", + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + } + ] + }, + "pcre2": { + "description": "Enable PCRE2 support", + "dependencies": [ + "pcre2" + ] + }, + "png": { + "description": "Enable PNG", + "dependencies": [ + "libpng", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "sql": { + "description": "Qt Sql" + }, + "sql-psql": { + "description": "Enable SQL Driver psql", + "dependencies": [ + "libpq", + { + "name": "qtbase", + "default-features": false, + "features": [ + "sql" + ] + } + ] + }, + "sql-sqlite": { + "description": "Enable SQL Driver sqlite", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "sql" + ] + }, + "sqlite3" + ] + }, + "testlib": { + "description": "Qt Testlib" + }, + "vulkan": { + "description": "Enable Vulkan support" + }, + "widgets": { + "description": "Qt Widgets", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "xcb": { + "description": "XCB", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "xkbcommon-x11", + "xlib" + ] + } + ] + }, + "xcb-xlib": { + "description": "xcb-xlib", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "xlib" + ] + } + ] + }, + "xkb": { + "description": "XKB" + }, + "xkbcommon-x11": { + "description": "xkbcommon_x11", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "xkb" + ] + } + ] + }, + "xlib": { + "description": "XLib" + }, + "xrender": { + "description": "XRender for native painting", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "xcb" + ] + } + ] + }, + "zstd": { + "description": "Zstandard support", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/ports/qtcharts/portfile.cmake b/ports/qtcharts/portfile.cmake new file mode 100644 index 00000000000000..1a3a6f1bfedbd7 --- /dev/null +++ b/ports/qtcharts/portfile.cmake @@ -0,0 +1,10 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtcharts/vcpkg.json b/ports/qtcharts/vcpkg.json new file mode 100644 index 00000000000000..75ba14445ff8d7 --- /dev/null +++ b/ports/qtcharts/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "qtcharts", + "version-semver": "6.1.3", + "description": "QtCharts module", + "homepage": "https://www.qt.io/", + "dependencies": [ + "qtdeclarative", + "qttools" + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/qtcoap/portfile.cmake b/ports/qtcoap/portfile.cmake new file mode 100644 index 00000000000000..1a3a6f1bfedbd7 --- /dev/null +++ b/ports/qtcoap/portfile.cmake @@ -0,0 +1,10 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtcoap/vcpkg.json b/ports/qtcoap/vcpkg.json new file mode 100644 index 00000000000000..011cf9ea684c59 --- /dev/null +++ b/ports/qtcoap/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "qtcoap", + "version-semver": "6.1.3", + "description": "Qt CoAP client module", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + } + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/qtdatavis3d/portfile.cmake b/ports/qtdatavis3d/portfile.cmake new file mode 100644 index 00000000000000..1a3a6f1bfedbd7 --- /dev/null +++ b/ports/qtdatavis3d/portfile.cmake @@ -0,0 +1,10 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtdatavis3d/vcpkg.json b/ports/qtdatavis3d/vcpkg.json new file mode 100644 index 00000000000000..f998b145b98d54 --- /dev/null +++ b/ports/qtdatavis3d/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "qtdatavis3d", + "version-semver": "6.1.3", + "description": "Qt 3D data visualization framework", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + }, + "qttools" + ] +} diff --git a/ports/qtdeclarative/fix_alignment.patch b/ports/qtdeclarative/fix_alignment.patch new file mode 100644 index 00000000000000..088f60dc632894 --- /dev/null +++ b/ports/qtdeclarative/fix_alignment.patch @@ -0,0 +1,15 @@ +diff --git a/src/qml/jsruntime/qv4enginebase_p.h b/src/qml/jsruntime/qv4enginebase_p.h +index 612c2dd4530..17e47e1b059 100644 +--- a/src/qml/jsruntime/qv4enginebase_p.h ++++ b/src/qml/jsruntime/qv4enginebase_p.h +@@ -88,7 +88,9 @@ struct Q_QML_EXPORT EngineBase { + MemoryManager *memoryManager = nullptr; + + qint32 callDepth = 0; +- quint8 padding2[QT_POINTER_SIZE - sizeof(quint32)]; ++#if QT_POINTER_SIZE == 8 ++ quint32 padding2; ++#endif + Object *globalObject = nullptr; + Value *jsStackLimit = nullptr; + Value *jsStackBase = nullptr; diff --git a/ports/qtdeclarative/portfile.cmake b/ports/qtdeclarative/portfile.cmake new file mode 100644 index 00000000000000..fcea8ed2b3da09 --- /dev/null +++ b/ports/qtdeclarative/portfile.cmake @@ -0,0 +1,29 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +if(QT_IS_LATEST) + set(${PORT}_PATCHES fix_alignment.patch) +endif() + + set(TOOL_NAMES + qml + qmlcachegen + qmleasing + qmlformat + qmlimportscanner + qmllint + qmlplugindump + qmlpreview + qmlprofiler + qmlscene + qmltestrunner + qmltime + qmltyperegistrar + ) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtdeclarative/vcpkg.json b/ports/qtdeclarative/vcpkg.json new file mode 100644 index 00000000000000..b8249ab253ad19 --- /dev/null +++ b/ports/qtdeclarative/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "qtdeclarative", + "version-semver": "6.1.3", + "description": "Qt Declarative (Quick 2)", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "testlib" + ] + }, + { + "name": "qtdeclarative", + "host": true, + "default-features": false + } + ] +} diff --git a/ports/qtdoc/portfile.cmake b/ports/qtdoc/portfile.cmake new file mode 100644 index 00000000000000..a060db617d7e4e --- /dev/null +++ b/ports/qtdoc/portfile.cmake @@ -0,0 +1,15 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) +set(TOOL_NAMES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/qtdoc/vcpkg.json b/ports/qtdoc/vcpkg.json new file mode 100644 index 00000000000000..7391fc2d899138 --- /dev/null +++ b/ports/qtdoc/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "qtdoc", + "version-semver": "6.1.3", + "description": "Qt Documentation", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + "qtdeclarative" + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/qtimageformats/portfile.cmake b/ports/qtimageformats/portfile.cmake new file mode 100644 index 00000000000000..db31bc4d32c90f --- /dev/null +++ b/ports/qtimageformats/portfile.cmake @@ -0,0 +1,36 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) # Only plugins +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + "jasper" CMAKE_DISABLE_FIND_PACKAGE_WrapJasper + "webp" CMAKE_DISABLE_FIND_PACKAGE_WrapWebP + "tiff" CMAKE_DISABLE_FIND_PACKAGE_TIFF + ) + +if("jasper" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_jasper=system) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_jasper=no) +endif() +if("webp" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_webp=system) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_webp=no) +endif() +if("tiff" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_tiff=system) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_tiff=no) +endif() +list(APPEND FEATURE_OPTIONS -DINPUT_mng=no) # marked as FIXME + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + ${FEATURE_OPTIONS} + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtimageformats/vcpkg.json b/ports/qtimageformats/vcpkg.json new file mode 100644 index 00000000000000..998de3faa66cf9 --- /dev/null +++ b/ports/qtimageformats/vcpkg.json @@ -0,0 +1,44 @@ +{ + "name": "qtimageformats", + "version-semver": "6.1.3", + "description": "Additional Image Format plugins for Qt", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ], + "default-features": [ + "default-features", + "jasper", + "tiff", + "webp" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + }, + "jasper": { + "description": "Use jasper", + "dependencies": [ + "jasper" + ] + }, + "tiff": { + "description": "Use TIFF", + "dependencies": [ + "tiff" + ] + }, + "webp": { + "description": "Use WebP", + "dependencies": [ + "libwebp" + ] + } + } +} diff --git a/ports/qtkeychain/portfile.cmake b/ports/qtkeychain/portfile.cmake new file mode 100644 index 00000000000000..987d54fc343a65 --- /dev/null +++ b/ports/qtkeychain/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO frankosterfeld/qtkeychain + REF 6743abd98586fbabd01da9839f53f61ccfb7f83c # v0.11.1 + SHA512 0ad6b82b972ca1cc5f1f8318899637ce0a6786f912b7f9efc1b7eea132ccefbe9a5dc0eb82d0dc9a020bcd55cd538d9e962fc40eb5c828142a7f2186b19633b1 + HEAD_REF master +) + +list(APPEND QTKEYCHAIN_OPTIONS -DCMAKE_DEBUG_POSTFIX=d) +list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TEST_APPLICATION:BOOL=OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND QTKEYCHAIN_OPTIONS -DQTKEYCHAIN_STATIC:BOOL=ON) +else() + list(APPEND QTKEYCHAIN_OPTIONS -DQTKEYCHAIN_STATIC:BOOL=OFF) +endif() + +if (CMAKE_HOST_WIN32) + list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=ON) +else() + list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${QTKEYCHAIN_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Qt5Keychain TARGET_PATH share/Qt5Keychain) +# Remove unneeded dirs +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/qtkeychain/vcpkg.json b/ports/qtkeychain/vcpkg.json new file mode 100644 index 00000000000000..acf0e19985053a --- /dev/null +++ b/ports/qtkeychain/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "qtkeychain", + "version-string": "0.11.1", + "port-version": 1, + "description": "qtkeychain - Platform-independent Qt API for storing passwords securely", + "homepage": "https://github.com/frankosterfeld/qtkeychain", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-tools" + ] +} diff --git a/ports/qtlottie/portfile.cmake b/ports/qtlottie/portfile.cmake new file mode 100644 index 00000000000000..1a3a6f1bfedbd7 --- /dev/null +++ b/ports/qtlottie/portfile.cmake @@ -0,0 +1,10 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtlottie/vcpkg.json b/ports/qtlottie/vcpkg.json new file mode 100644 index 00000000000000..1f8731f9389d6a --- /dev/null +++ b/ports/qtlottie/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "qtlottie", + "version-semver": "6.1.3", + "description": "Lottie is a family of player software for a certain json-based file format for describing 2d vector graphics animations. These files are created/exported directly from After Effects by a plugin called Bodymovin.", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + "qtdeclarative", + "qttools" + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/qtmqtt/portfile.cmake b/ports/qtmqtt/portfile.cmake new file mode 100644 index 00000000000000..1a3a6f1bfedbd7 --- /dev/null +++ b/ports/qtmqtt/portfile.cmake @@ -0,0 +1,10 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtmqtt/vcpkg.json b/ports/qtmqtt/vcpkg.json new file mode 100644 index 00000000000000..cd0f253cd1051e --- /dev/null +++ b/ports/qtmqtt/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "qtmqtt", + "version-semver": "6.1.3", + "description": "Qt Module to implement MQTT protocol version 3.1 and 3.1.1 http://mqtt.org/", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + } + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/qtnetworkauth/portfile.cmake b/ports/qtnetworkauth/portfile.cmake new file mode 100644 index 00000000000000..1a3a6f1bfedbd7 --- /dev/null +++ b/ports/qtnetworkauth/portfile.cmake @@ -0,0 +1,10 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtnetworkauth/vcpkg.json b/ports/qtnetworkauth/vcpkg.json new file mode 100644 index 00000000000000..43565da8a873da --- /dev/null +++ b/ports/qtnetworkauth/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "qtnetworkauth", + "version-semver": "6.1.3", + "description": "Qt Network Authenticators; QtOAuth in particular", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + } + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/qtopcua/portfile.cmake b/ports/qtopcua/portfile.cmake new file mode 100644 index 00000000000000..258b358a2ff907 --- /dev/null +++ b/ports/qtopcua/portfile.cmake @@ -0,0 +1,30 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +# General features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "open62541" FEATURE_open62541 + "open62541" FEATURE_open62541-security + "uacpp" FEATURE_uacpp + "ns0idnames" FEATURE_ns0idnames + "ns0idgenerator" FEATURE_ns0idgenerator +INVERTED_FEATURES + ) +if("open62541" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_open62541=system + -DHAVE_open62541=true) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_open62541=no) +endif() + +if(NOT "open62541" IN_LIST FEATURES AND NOT "gds" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapOpenSSL=ON) +endif() + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + ${FEATURE_OPTIONS} + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtopcua/vcpkg.json b/ports/qtopcua/vcpkg.json new file mode 100644 index 00000000000000..89b264c53f05a0 --- /dev/null +++ b/ports/qtopcua/vcpkg.json @@ -0,0 +1,52 @@ +{ + "name": "qtopcua", + "version-semver": "6.1.3", + "description": "Qt wrapper for existing OPC UA stacks", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + }, + "qtdeclarative" + ], + "default-features": [ + "default-features", + "gds", + "ns0idnames", + "open62541" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + }, + "gds": { + "description": "Support for global discovery server" + }, + "ns0idgenerator": { + "description": "Namespace 0 NodeIds generator from the NodeIds.csv file." + }, + "ns0idnames": { + "description": "Support for namespace 0 NodeId names" + }, + "open62541": { + "description": "Open62541 with plugin to connect to servers with signing and encryption", + "dependencies": [ + { + "name": "open62541", + "default-features": false, + "features": [ + "amalgamation", + "openssl" + ] + } + ] + }, + "uacpp": { + "description": "Unified Automation C++ SDK" + } + } +} diff --git a/ports/qtquick3d/portfile.cmake b/ports/qtquick3d/portfile.cmake new file mode 100644 index 00000000000000..4b4b49a9fc3f26 --- /dev/null +++ b/ports/qtquick3d/portfile.cmake @@ -0,0 +1,28 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +# General features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "assimp" FEATURE_quick3d_assimp +INVERTED_FEATURES + "assimp" CMAKE_DISABLE_FIND_PACKAGE_WrapQuick3DAssimp + ) + +if("assimp" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_quick3d_assimp=system -DTEST_quick3d_assimp=ON -DHAVE_Assimp=ON) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_quick3d_assimp=no) +endif() + +set(TOOL_NAMES balsam meshdebug shadergen) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + ${FEATURE_OPTIONS} + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtquick3d/vcpkg.json b/ports/qtquick3d/vcpkg.json new file mode 100644 index 00000000000000..cc432867a2aa0f --- /dev/null +++ b/ports/qtquick3d/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "qtquick3d", + "version-semver": "6.1.3", + "description": "A new module and API for defining 3D content in Qt Quick.", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + "qtdeclarative", + { + "name": "qtquick3d", + "host": true, + "default-features": false + }, + "qtshadertools" + ], + "default-features": [ + "default-features" + ], + "features": { + "assimp": { + "description": "assimp", + "dependencies": [ + "assimp" + ] + }, + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/qtquickcontrols2/portfile.cmake b/ports/qtquickcontrols2/portfile.cmake new file mode 100644 index 00000000000000..df909777b91b3f --- /dev/null +++ b/ports/qtquickcontrols2/portfile.cmake @@ -0,0 +1,14 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +#make sure your path is really short! Otherwise the build will probably fail. +# or maybe try to switch the build to nmake. +#set(ENV{CMAKE_BUILD_PARALLEL_LEVEL} 1) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtquickcontrols2/vcpkg.json b/ports/qtquickcontrols2/vcpkg.json new file mode 100644 index 00000000000000..8de3a63c5d2e3f --- /dev/null +++ b/ports/qtquickcontrols2/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "qtquickcontrols2", + "version-semver": "6.1.3", + "description": "Qt Quick Controls 2", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + "qtdeclarative" + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/qtquicktimeline/portfile.cmake b/ports/qtquicktimeline/portfile.cmake new file mode 100644 index 00000000000000..5ed735d38c1595 --- /dev/null +++ b/ports/qtquicktimeline/portfile.cmake @@ -0,0 +1,15 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +set(TOOL_NAMES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) # QML plugin only diff --git a/ports/qtquicktimeline/vcpkg.json b/ports/qtquicktimeline/vcpkg.json new file mode 100644 index 00000000000000..9ca9a302012195 --- /dev/null +++ b/ports/qtquicktimeline/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "qtquicktimeline", + "version-semver": "6.1.3", + "description": "Module for keyframe-based timeline construction.", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + "qtdeclarative" + ] +} diff --git a/ports/qtscxml/portfile.cmake b/ports/qtscxml/portfile.cmake new file mode 100644 index 00000000000000..daa6b663e20be4 --- /dev/null +++ b/ports/qtscxml/portfile.cmake @@ -0,0 +1,13 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +set(TOOL_NAMES qscxmlc) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtscxml/vcpkg.json b/ports/qtscxml/vcpkg.json new file mode 100644 index 00000000000000..72af5b0121aeef --- /dev/null +++ b/ports/qtscxml/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "qtscxml", + "version-semver": "6.1.3", + "description": "SCXML (state machine notation) compiler and related tools", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + "qtdeclarative", + { + "name": "qtscxml", + "host": true, + "default-features": false + }, + { + "name": "qttools", + "default-features": false + } + ] +} diff --git a/ports/qtshadertools/portfile.cmake b/ports/qtshadertools/portfile.cmake new file mode 100644 index 00000000000000..0311a481a014ff --- /dev/null +++ b/ports/qtshadertools/portfile.cmake @@ -0,0 +1,13 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +set(TOOL_NAMES qsb) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtshadertools/vcpkg.json b/ports/qtshadertools/vcpkg.json new file mode 100644 index 00000000000000..534162d740fa80 --- /dev/null +++ b/ports/qtshadertools/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "qtshadertools", + "version-semver": "6.1.3", + "description": "APIs and tools in this module provide the producer functionality for the shader pipeline that allows Qt Quick to operate on Vulkan, Metal, and Direct3D, in addition to OpenGL.", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + }, + { + "name": "qtshadertools", + "host": true, + "default-features": false + } + ] +} diff --git a/ports/qtsvg/portfile.cmake b/ports/qtsvg/portfile.cmake new file mode 100644 index 00000000000000..975bf122fdd530 --- /dev/null +++ b/ports/qtsvg/portfile.cmake @@ -0,0 +1,13 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) + +set(TOOL_NAMES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtsvg/vcpkg.json b/ports/qtsvg/vcpkg.json new file mode 100644 index 00000000000000..97ab747c96917c --- /dev/null +++ b/ports/qtsvg/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "qtsvg", + "version-semver": "6.1.3", + "description": "Qt SVG", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] +} diff --git a/ports/qttools/fix_static_build.patch b/ports/qttools/fix_static_build.patch new file mode 100644 index 00000000000000..bc67faf5dc9dc1 --- /dev/null +++ b/ports/qttools/fix_static_build.patch @@ -0,0 +1,27 @@ +diff --git a/src/designer/src/components/lib/CMakeLists.txt b/src/designer/src/components/lib/CMakeLists.txt +index 53358741f..ce070bd6a 100644 +--- a/src/designer/src/components/lib/CMakeLists.txt ++++ b/src/designer/src/components/lib/CMakeLists.txt +@@ -878,7 +878,7 @@ qt_internal_add_resource(DesignerComponents "widgetbox" + ## Scopes: + ##################################################################### + +-qt_internal_extend_target(DesignerComponents CONDITION static ++qt_internal_extend_target(DesignerComponents CONDITION NOT BUILD_SHARED_LIBS + DEFINES + QT_DESIGNER_STATIC + ) +diff --git a/src/designer/src/designer/CMakeLists.txt b/src/designer/src/designer/CMakeLists.txt +index f786f1dd6..8c635ff14 100644 +--- a/src/designer/src/designer/CMakeLists.txt ++++ b/src/designer/src/designer/CMakeLists.txt +@@ -103,8 +103,8 @@ qt_internal_extend_target(designer CONDITION TARGET Qt::PrintSupport + PUBLIC_LIBRARIES + Qt::PrintSupport + ) + +-qt_internal_extend_target(designer CONDITION QT_CONFIG___contains___static ++qt_internal_extend_target(designer CONDITION NOT BUILD_SHARED_LIBS + DEFINES + QT_DESIGNER_STATIC + ) diff --git a/ports/qttools/portfile.cmake b/ports/qttools/portfile.cmake new file mode 100644 index 00000000000000..77b2787d688cd4 --- /dev/null +++ b/ports/qttools/portfile.cmake @@ -0,0 +1,94 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES )#fix_static_build.patch) + +#TODO check features and setup: (means force features!) + +# -- The following OPTIONAL packages have not been found: + + # * Qt6AxContainer + # * Clang + # * WrapLibClang (required version >= 8) + +# Configure summary: + +# Qt Tools: + # Qt Assistant ........................... yes + # QDoc ................................... no + # Clang-based lupdate parser ............. no + # Qt Designer ............................ yes + # Qt Distance Field Generator ............ yes + # kmap2qmap .............................. yes + # Qt Linguist ............................ yes + # Mac Deployment Tool .................... no + # pixeltool .............................. yes + # qdbus .................................. yes + # qev .................................... yes + # Qt Attributions Scanner ................ yes + # qtdiag ................................. yes + # qtpaths ................................ yes + # qtplugininfo ........................... yes + # Windows deployment tool ................ yes + +# General features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + "qdoc" CMAKE_DISABLE_FIND_PACKAGE_Clang + "qdoc" CMAKE_DISABLE_FIND_PACKAGE_WrapLibClang + ) + + set(TOOL_NAMES + assistant + designer + lconvert + linguist + lprodump + lrelease-pro + lrelease + lupdate-pro + lupdate + pixeltool + qcollectiongenerator + qdistancefieldgenerator + qhelpgenerator + qtattributionsscanner + qtdiag + qtdiag6 + qtpaths + qtplugininfo + qdbus + qdbusviewer + qdoc + ) +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND TOOL_NAMES windeployqt) +elseif(VCPKG_TARGET_IS_OSX) + list(APPEND TOOL_NAMES macdeployqt) +endif() + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS ${FEATURE_OPTIONS} + -DCMAKE_DISABLE_FIND_PACKAGE_Qt6AxContainer=ON + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) + +if(VCPKG_TARGET_IS_OSX) + set(OSX_APP_FOLDERS Designer.app Linguist.app pixeltool.app qdbusviewer.app) + foreach(_appfolder IN LISTS OSX_APP_FOLDERS) + message(STATUS "Moving: ${_appfolder}") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/${_appfolder}") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${_appfolder}/" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/${_appfolder}/") + endforeach() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +set(configfile "${CURRENT_PACKAGES_DIR}/share/Qt6ToolsTools/Qt6ToolsToolsTargets-debug.cmake") +if(EXISTS "${configfile}" AND EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/windeployqt.exe") + file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/windeployqt.debug.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") + file(READ "${configfile}" _contents) + string(REPLACE [[${_IMPORT_PREFIX}/tools/Qt6/bin/windeployqt.exe]] [[${_IMPORT_PREFIX}/tools/Qt6/bin/windeployqt.debug.bat]] _contents "${_contents}") + file(WRITE "${configfile}" "${_contents}") +endif() diff --git a/ports/qttools/vcpkg.json b/ports/qttools/vcpkg.json new file mode 100644 index 00000000000000..e9bd7dd30be3b8 --- /dev/null +++ b/ports/qttools/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "qttools", + "version-semver": "6.1.3", + "description": "Qt Tools", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + }, + "qtdeclarative", + { + "name": "qttools", + "host": true, + "default-features": false + } + ], + "features": { + "qdoc": { + "description": "Build QDoc.", + "dependencies": [ + "llvm" + ] + } + } +} diff --git a/ports/qttools/windeployqt.debug.bat b/ports/qttools/windeployqt.debug.bat new file mode 100644 index 00000000000000..d004e23f10d975 --- /dev/null +++ b/ports/qttools/windeployqt.debug.bat @@ -0,0 +1,10 @@ +@echo off +setlocal +set mypath=%~dp0 +set mypath=%mypath:~0,-1% +cd %mypath%\..\..\..\debug\bin +set BAKCD=%CD% +set PATH=%CD%;%PATH% +"%mypath%\windeployqt.exe" --qmake "%mypath%\qmake.debug.bat" %* +cd %BAKCD% +endlocal \ No newline at end of file diff --git a/ports/qttranslations/portfile.cmake b/ports/qttranslations/portfile.cmake new file mode 100644 index 00000000000000..30a09d5996876e --- /dev/null +++ b/ports/qttranslations/portfile.cmake @@ -0,0 +1,15 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES) +set(TOOL_NAMES) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) # only translation files. +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") diff --git a/ports/qttranslations/vcpkg.json b/ports/qttranslations/vcpkg.json new file mode 100644 index 00000000000000..fec110b00ae896 --- /dev/null +++ b/ports/qttranslations/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "qttranslations", + "version-semver": "6.1.3", + "description": "Qt Translations", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + "qttools" + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/qtvirtualkeyboard/hunspell_include_path_fix.patch b/ports/qtvirtualkeyboard/hunspell_include_path_fix.patch new file mode 100644 index 00000000000000..7c92d6a89b5d51 --- /dev/null +++ b/ports/qtvirtualkeyboard/hunspell_include_path_fix.patch @@ -0,0 +1,26 @@ +diff --git a/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp b/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp +index 8ee4d7503..0fb4461d2 100644 +--- a/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp ++++ b/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp +@@ -29,7 +29,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/plugins/hunspell/hunspellinputmethod/hunspellworker_p.h b/src/plugins/hunspell/hunspellinputmethod/hunspellworker_p.h +index b79354429..a843bdfa6 100644 +--- a/src/plugins/hunspell/hunspellinputmethod/hunspellworker_p.h ++++ b/src/plugins/hunspell/hunspellinputmethod/hunspellworker_p.h +@@ -50,7 +50,7 @@ + #include + #include + #include +-#include ++#include + #include + + QT_BEGIN_NAMESPACE diff --git a/ports/qtvirtualkeyboard/portfile.cmake b/ports/qtvirtualkeyboard/portfile.cmake new file mode 100644 index 00000000000000..528a0a4de21327 --- /dev/null +++ b/ports/qtvirtualkeyboard/portfile.cmake @@ -0,0 +1,29 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES hunspell_include_path_fix.patch) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + "xcb" CMAKE_DISABLE_FIND_PACKAGE_XCB + ) + + +if("hunspell" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_vkb_hunspell:STRING=system) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_vkb_hunspell=no) +endif() +if("t9write" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_vkb_handwriting=t9write) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_vkb_handwriting=no) +endif() + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS ${FEATURE_OPTIONS} + -DINPUT_vkb_style:STRING=default + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG -DFEATURE_vkb_record_trace_input=ON + -DFEATURE_vkb_sensitive_debug=ON + ) diff --git a/ports/qtvirtualkeyboard/vcpkg.json b/ports/qtvirtualkeyboard/vcpkg.json new file mode 100644 index 00000000000000..533af68a162002 --- /dev/null +++ b/ports/qtvirtualkeyboard/vcpkg.json @@ -0,0 +1,35 @@ +{ + "name": "qtvirtualkeyboard", + "version-semver": "6.1.3", + "description": "SCXML (state machine notation) compiler and related tools", + "homepage": "https://www.qt.io/", + "dependencies": [ + "qtdeclarative", + "qtsvg", + "qttools" + ], + "default-features": [ + "default-features", + "hunspell" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + }, + "hunspell": { + "description": "Use hunspell", + "dependencies": [ + "hunspell" + ] + }, + "t9write": { + "description": "T9Write handwriting (commercial SDK requires port overlay)", + "dependencies": [ + "t9write" + ] + }, + "xcb": { + "description": "XCB integration" + } + } +} diff --git a/ports/qtwayland/portfile.cmake b/ports/qtwayland/portfile.cmake new file mode 100644 index 00000000000000..cac3fa73e388d2 --- /dev/null +++ b/ports/qtwayland/portfile.cmake @@ -0,0 +1,17 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +message(WARNING "qtwayland requires libwayland-dev from your system package manager. You can install it with +sudo apt install libwayland-dev +on Ubuntu systems.") + +set(${PORT}_PATCHES) + +set(TOOL_NAMES qtwaylandscanner) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/ports/qtwayland/vcpkg.json b/ports/qtwayland/vcpkg.json new file mode 100644 index 00000000000000..cfe7d278f77061 --- /dev/null +++ b/ports/qtwayland/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "qtwayland", + "version-semver": "6.1.3", + "port-version": 2, + "description": "A toolbox for making Qt based Wayland compositors", + "homepage": "https://www.qt.io/", + "supports": "!windows", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + "qtdeclarative", + "qtopcua" + ], + "default-features": [ + "default-features" + ], + "features": { + "default-features": { + "description": "Platform-dependent default features" + } + } +} diff --git a/ports/quadtree/portfile.cmake b/ports/quadtree/portfile.cmake new file mode 100644 index 00000000000000..01e6b371a84cb2 --- /dev/null +++ b/ports/quadtree/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pvigier/Quadtree + REF fec2e1a011f656353ba12c58cefe33482e1a27b5 + SHA512 8291afb29b9ff5714125e411122f6f10e1c2e4c2109384e25afa834548dc1f63c90b2d09c7cfed213ad69a8c54cf32fc598783b3ff0882bc86562594895d5c35 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCODE_COVERAGE=OFF + -DBUILD_BENCHMARKS=OFF + -DBUILD_TESTING=OFF + -DBUILD_EXAMPLES=OFF +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/quadtree/vcpkg.json b/ports/quadtree/vcpkg.json new file mode 100644 index 00000000000000..49004d6907960d --- /dev/null +++ b/ports/quadtree/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "quadtree", + "version-string": "2020-04-13", + "port-version": 1, + "description": "A simple and modern C++ quadtree implementation", + "homepage": "https://github.com/pvigier/Quadtree" +} diff --git a/ports/quantlib/disable-examples-tests.patch b/ports/quantlib/disable-examples-tests.patch new file mode 100644 index 00000000000000..b42e0bc255d75e --- /dev/null +++ b/ports/quantlib/disable-examples-tests.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d046251cc..d8201bf6a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,8 +44,6 @@ if (Boost_FOUND) + endif (Boost_FOUND) + + add_subdirectory(ql) +-add_subdirectory(Examples) +-add_subdirectory(test-suite) + + # + # Copy across the ANSI config file into the build directory. Users diff --git a/ports/quantlib/fix-mac-build.patch b/ports/quantlib/fix-mac-build.patch new file mode 100644 index 00000000000000..a114f96e7d56ae --- /dev/null +++ b/ports/quantlib/fix-mac-build.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 62ab08a115..2b383c1dd5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,6 +2,10 @@ cmake_minimum_required() + + project(QuantLib) + ++if(APPLE AND NOT CMAKE_CXX_STANDARD) ++ set(CMAKE_CXX_STANDARD 11) ++endif() ++ + include(CTest) + include(${CMAKE_CURRENT_LIST_DIR}/cmake/quantlib.cmake) + diff --git a/ports/quantlib/portfile.cmake b/ports/quantlib/portfile.cmake new file mode 100644 index 00000000000000..f7cf9b7770da75 --- /dev/null +++ b/ports/quantlib/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lballabio/QuantLib + REF QuantLib-v1.22 + SHA512 279c2e9273dd0fbc03d19ac19814e8a3b5544545cc1441982232f89bd313fe76b6e252dbcae8a3d146ecc4f1d1e64632ac412096b89da882ba879a66776fdb91 + HEAD_REF master + PATCHES + disable-examples-tests.patch + fix-mac-build.patch # fixed in next release +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" USE_BOOST_DYNAMIC_LIBRARIES) + +set(QL_MSVC_RUNTIME ${VCPKG_LIBRARY_LINKAGE}) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_BOOST_DYNAMIC_LIBRARIES=${USE_BOOST_DYNAMIC_LIBRARIES} + -DMSVC_RUNTIME=${QL_MSVC_RUNTIME} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/quantlib/vcpkg.json b/ports/quantlib/vcpkg.json new file mode 100644 index 00000000000000..ee732abc26e96f --- /dev/null +++ b/ports/quantlib/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "quantlib", + "version": "1.22", + "description": "The QuantLib C++ library", + "homepage": "https://www.quantlib.org/", + "dependencies": [ + "boost-accumulators", + "boost-algorithm", + "boost-any", + "boost-array", + "boost-assert", + "boost-assign", + "boost-atomic", + "boost-bind", + "boost-config", + "boost-core", + "boost-date-time", + "boost-dynamic-bitset", + "boost-format", + "boost-function", + "boost-functional", + "boost-iterator", + "boost-lexical-cast", + "boost-math", + "boost-multi-array", + "boost-multiprecision", + "boost-optional", + "boost-preprocessor", + "boost-random", + "boost-serialization", + "boost-signals2", + "boost-smart-ptr", + "boost-thread", + "boost-tuple", + "boost-type-traits", + "boost-ublas", + "boost-unordered", + "boost-utility" + ] +} diff --git a/ports/quaternions/portfile.cmake b/ports/quaternions/portfile.cmake new file mode 100644 index 00000000000000..2613abed87fe30 --- /dev/null +++ b/ports/quaternions/portfile.cmake @@ -0,0 +1,12 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ferd36/quaternions + REF 68fc6c7fb392b1a920779d80bb75879263329ff5 + SHA512 b7b934a493645e9c9ec04d581d2e5af57298325086919c20fbaa13df264c16cb5a0e380042cf5a0cfddbf142c82e5da63b84e8f2bc90615b1eccad83a1c9df88 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/quaternions/vcpkg.json b/ports/quaternions/vcpkg.json new file mode 100644 index 00000000000000..b6d8b22e2c72ef --- /dev/null +++ b/ports/quaternions/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "quaternions", + "version-string": "1.0.0", + "port-version": 1, + "description": "A C++11 library to work with quaternions, as a single header file.", + "homepage": "https://github.com/ferd36/quaternions", + "dependencies": [ + "boost-mpl" + ] +} diff --git a/ports/quazip/portfile.cmake b/ports/quazip/portfile.cmake new file mode 100644 index 00000000000000..4c8602b69234a2 --- /dev/null +++ b/ports/quazip/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stachenov/quazip + REF v0.9.1 + SHA512 db31f3c7e3d7e95c25090ceb8379643e0b49ed69ece009dd015bee120b2b60f42e73408f580caed3138fa19ca64dcd23a05f16435abb54e2b8df21105c7b42c0 + PATCHES + vcpkg_remove_extra_static.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/QuaZip5/) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/quazip/vcpkg.json b/ports/quazip/vcpkg.json new file mode 100644 index 00000000000000..cf2a01f8a1e9d5 --- /dev/null +++ b/ports/quazip/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "quazip", + "version-string": "0.9.1", + "port-version": 1, + "description": "Qt/C++ wrapper over minizip", + "homepage": "https://stachenov.github.io/quazip/", + "dependencies": [ + "qt5-base", + "zlib" + ] +} diff --git a/ports/quazip/vcpkg_remove_extra_static.patch b/ports/quazip/vcpkg_remove_extra_static.patch new file mode 100644 index 00000000000000..e600424751c1d1 --- /dev/null +++ b/ports/quazip/vcpkg_remove_extra_static.patch @@ -0,0 +1,30 @@ +diff --git a/quazip/CMakeLists.txt b/quazip/CMakeLists.txt +index 1efb5e2..2412b8a 100644 +--- a/quazip/CMakeLists.txt ++++ b/quazip/CMakeLists.txt +@@ -10,22 +10,13 @@ ADD_DEFINITIONS(-DQUAZIP_BUILD) + qt_wrap_cpp(MOC_SRCS ${PUBLIC_HEADERS}) + set(SRCS ${SRCS} ${MOC_SRCS}) + +-add_library(${QUAZIP_LIB_TARGET_NAME} SHARED ${SRCS}) +-add_library(quazip_static STATIC ${SRCS}) +- +-# Windows uses .lib extension for both static and shared library +-# *nix systems use different extensions for SHARED and STATIC library and by convention both libraries have the same name +-if (NOT WIN32) +- set_target_properties(quazip_static PROPERTIES OUTPUT_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX}) +-endif () ++add_library(${QUAZIP_LIB_TARGET_NAME} ${SRCS}) + + target_include_directories(${QUAZIP_LIB_TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${ZLIB_INCLUDE_DIRS}) +-target_include_directories(quazip_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${ZLIB_INCLUDE_DIRS}) +-set_target_properties(${QUAZIP_LIB_TARGET_NAME} quazip_static PROPERTIES VERSION ${QUAZIP_LIB_VERSION} SOVERSION ${QUAZIP_LIB_SOVERSION} DEBUG_POSTFIX d) ++set_target_properties(${QUAZIP_LIB_TARGET_NAME} PROPERTIES VERSION ${QUAZIP_LIB_VERSION} SOVERSION ${QUAZIP_LIB_SOVERSION} DEBUG_POSTFIX d) + + # Link against ZLIB_LIBRARIES if needed (on Windows this variable is empty) + target_link_libraries(${QUAZIP_LIB_TARGET_NAME} ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES}) +-target_link_libraries(quazip_static ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES}) + + install(FILES ${PUBLIC_HEADERS} DESTINATION include/quazip${QUAZIP_LIB_VERSION_SUFFIX}) +-install(TARGETS ${QUAZIP_LIB_TARGET_NAME} quazip_static LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION}) ++install(TARGETS ${QUAZIP_LIB_TARGET_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/ports/quickfast/00001-fix-boost-asio.patch b/ports/quickfast/00001-fix-boost-asio.patch new file mode 100644 index 00000000000000..13a4cfa2a086fa --- /dev/null +++ b/ports/quickfast/00001-fix-boost-asio.patch @@ -0,0 +1,39 @@ +diff --git a/src/Common/QuickFASTPch.h b/src/Common/QuickFASTPch.h +index 3574df8..c4ef4e1 100644 +--- a/src/Common/QuickFASTPch.h ++++ b/src/Common/QuickFASTPch.h +@@ -32,7 +32,7 @@ + #include + + // If building for .NET, must link boost threads dynamically +-#define BOOST_THREAD_USE_DLL ++// #define BOOST_THREAD_USE_DLL + // This reports at compile time which boost libraries will be used + // #define BOOST_LIB_DIAGNOSTIC + +diff --git a/src/Communication/AsioService.h b/src/Communication/AsioService.h +index 4f61915..96f2198 100644 +--- a/src/Communication/AsioService.h ++++ b/src/Communication/AsioService.h +@@ -99,6 +99,7 @@ namespace QuickFAST + { + return ioService_; + } ++ boost::asio::io_service::executor_type get_executor() BOOST_ASIO_NOEXCEPT { return ioService_.get_executor();} + + ///@brief Post a completion handler for later processing (usually in a different thread) + /// @param handler is the handler to be posted +diff --git a/src/Communication/AsioService_fwd.h b/src/Communication/AsioService_fwd.h +index dc2f235..6ad5e68 100644 +--- a/src/Communication/AsioService_fwd.h ++++ b/src/Communication/AsioService_fwd.h +@@ -17,7 +17,8 @@ namespace boost + { + namespace asio + { +- class io_service; ++ class io_context; ++ typedef io_context io_service; + } + } + diff --git a/ports/quickfast/CMakeLists.txt b/ports/quickfast/CMakeLists.txt new file mode 100644 index 00000000000000..2464b6a25d98d1 --- /dev/null +++ b/ports/quickfast/CMakeLists.txt @@ -0,0 +1,54 @@ +cmake_minimum_required(VERSION 3.13) +project(quickfast CXX) + +option(BUILD_SHARED_LIBS "Build shared instead of static library" ON) + +find_package(Boost REQUIRED COMPONENTS thread) +find_package(XercesC REQUIRED) + +file(GLOB SOURCES + quickfast/Application/*.cpp + quickfast/Common/*.cpp + quickfast/Codecs/*.cpp + quickfast/Communication/*.cpp + quickfast/Messages/*.cpp +) + +file(GLOB HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + quickfast/Application/*.h + quickfast/Common/*.h + quickfast/Codecs/*.h + quickfast/Communication/*.h + quickfast/Messages/*.h +) + +if(BUILD_SHARED_LIBS) + add_library(quickfast SHARED ${HEADERS} ${SOURCES}) + target_compile_definitions(quickfast PRIVATE -DQUICKFAST_BUILD_DLL) +else() + add_library(quickfast STATIC ${HEADERS} ${SOURCES}) + target_compile_definitions(quickfast PUBLIC -DQUICKFAST_HAS_DLL=0) +endif() + +target_include_directories(quickfast PUBLIC + $ + $ + $ +) + +target_link_libraries(quickfast PRIVATE + ${Boost_LIBRARIES} + XercesC::XercesC +) + +install(TARGETS quickfast EXPORT quickfast-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +install(EXPORT quickfast-config DESTINATION share/cmake/quickfast) + +foreach (HEADER ${HEADERS} ) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install(FILES ${HEADER} DESTINATION include/${HEADER_DIR}) +endforeach() diff --git a/ports/quickfast/portfile.cmake b/ports/quickfast/portfile.cmake new file mode 100644 index 00000000000000..bf4878bd34cbb8 --- /dev/null +++ b/ports/quickfast/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO objectcomputing/quickfast + REF V1_5 + SHA512 f224ffbe0ee1b84616b46d536d27da01346103cf9ed135a87543da51e8e979ec3735e08ece8525ee1316ea323d41dcacc4d44eabe2e033d68f93432ea43d1ce9 + HEAD_REF master + PATCHES 00001-fix-boost-asio.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if(NOT EXISTS "${SOURCE_PATH}/quickfast") + file(RENAME ${SOURCE_PATH}/src ${SOURCE_PATH}/quickfast) +endif() + +file(GLOB_RECURSE SRC_FILES "${SOURCE_PATH}/quickfast/*.cpp" "${SOURCE_PATH}/quickfast/*.h") +foreach(SRC_FILE IN LISTS SRC_FILES) + file(READ "${SRC_FILE}" _contents) + string(REPLACE "#include ) + + set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${quickfix_VERSION} SOVERSION ${quickfix_VERSION_MAJOR} ) ++target_compile_definitions(${PROJECT_NAME} PUBLIC HAVE_STD_UNIQUE_PTR HAVE_STD_SHARED_PTR HAVE_SSL=1) + +-install(TARGETS ${PROJECT_NAME} DESTINATION lib) ++install(TARGETS ${PROJECT_NAME} EXPORT quickfix-config DESTINATION lib) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/C++/ DESTINATION include/quickfix + FILES_MATCHING PATTERN "*.h" + PATTERN double-conversion EXCLUDE + PATTERN test EXCLUDE) ++install(EXPORT quickfix-config DESTINATION share/cmake/quickfix) +diff --git a/src/C++/Utility.h b/src/C++/Utility.h +index 0aa2cd3e..2829e110 100644 +--- a/src/C++/Utility.h ++++ b/src/C++/Utility.h +@@ -242,4 +242,10 @@ using std::strtol; + using std::strerror; + #endif + ++#ifdef __cpp_noexcept_function_type ++#define QUICKFIX_THROW(...) noexcept(false) ++#else ++#define QUICKFIX_THROW(...) throw(__VA_ARGS__) ++#endif ++ + #endif +diff --git a/src/C++/UtilitySSL.cpp b/src/C++/UtilitySSL.cpp +index a01606ac..aee41bbf 100644 +--- a/src/C++/UtilitySSL.cpp ++++ b/src/C++/UtilitySSL.cpp +@@ -498,7 +498,11 @@ static void ssl_rand_seed(void) + /* + * seed in the current process id (usually just 4 bytes) + */ ++#ifdef _MSC_VER ++ pid = GetCurrentProcessId(); ++#else + pid = getpid(); ++#endif + l = sizeof(pid); + RAND_seed((unsigned char *)&pid, l); + /* +diff --git a/src/C++/double-conversion/utils.h b/src/C++/double-conversion/utils.h +index aef2f166..779b8ab7 100644 +--- a/src/C++/double-conversion/utils.h ++++ b/src/C++/double-conversion/utils.h +@@ -61,7 +61,7 @@ + // disabled.) + // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) + #if defined(_M_X64) || defined(__x86_64__) || \ +- defined(__ARMEL__) || defined(__avr32__) || \ ++ defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \ + defined(__hppa__) || defined(__ia64__) || \ + defined(__mips__) || \ + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ diff --git a/ports/quickfix/fix_wsl_symlink_error.patch b/ports/quickfix/fix_wsl_symlink_error.patch new file mode 100644 index 00000000000000..ce6465a4ef4042 --- /dev/null +++ b/ports/quickfix/fix_wsl_symlink_error.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/QuickfixPrebuildSetup.cmake b/cmake/QuickfixPrebuildSetup.cmake +index 9e53126ec..1c3368fcb 100644 +--- a/cmake/QuickfixPrebuildSetup.cmake ++++ b/cmake/QuickfixPrebuildSetup.cmake +@@ -3,8 +3,9 @@ + if (NOT WIN32) + add_custom_target(QUICKFIX_HEADERS_LINK ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/include/ +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/src/C++ ${CMAKE_SOURCE_DIR}/include/quickfix ++ #COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/src/C++ ${CMAKE_SOURCE_DIR}/include/quickfix + ) ++ include_directories(${CMAKE_SOURCE_DIR}/src/C++) + else() + add_custom_target(QUICKFIX_HEADERS_COPY ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/include/ diff --git a/ports/quickfix/portfile.cmake b/ports/quickfix/portfile.cmake new file mode 100644 index 00000000000000..d41a13c7c7436d --- /dev/null +++ b/ports/quickfix/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO quickfix/quickfix + REF v1.15.1 + SHA512 6c3dc53f25932c9b7516ab9228f634511ae0f399719f87f0ec2b38c380c0a7d1c808f0f9a14a70a063e1956118550d1121222283a9139f23cd4f8f038f595f70 + HEAD_REF master + PATCHES + 00001-fix-build.patch + fix_wsl_symlink_error.patch +) + +file(GLOB_RECURSE SRC_FILES RELATIVE ${SOURCE_PATH} + "${SOURCE_PATH}/src/*.cpp" + "${SOURCE_PATH}/src/*.h" +) + +list(REMOVE_ITEM SRC_FILES "src/C++/Utility.h") +list(REMOVE_ITEM SRC_FILES "src/C++/pugixml.cpp") + +foreach(SRC_FILE IN LISTS SRC_FILES) + file(READ "${SOURCE_PATH}/${SRC_FILE}" _contents) + string(REPLACE "throw(" "QUICKFIX_THROW(" _contents "${_contents}") + string(REPLACE "throw (" "QUICKFIX_THROW(" _contents "${_contents}") + file(WRITE "${SOURCE_PATH}/${SRC_FILE}" "${_contents}") +endforeach() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DHAVE_EMX=OFF + -DHAVE_MYSQL=OFF + -DHAVE_POSTGRESQL=OFF + -DHAVE_PYTHON=OFF + -DHAVE_PYTHON2=OFF + -DHAVE_PYTHON3=OFF + -DHAVE_SSL=ON + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/quickfix) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/quickfix/usage b/ports/quickfix/usage new file mode 100644 index 00000000000000..2bed80460eb2bc --- /dev/null +++ b/ports/quickfix/usage @@ -0,0 +1,4 @@ +The package quickfix provides CMake targets: + + find_package(quickfix CONFIG REQUIRED) + target_link_libraries(main PRIVATE quickfix) diff --git a/ports/quickfix/vcpkg.json b/ports/quickfix/vcpkg.json new file mode 100644 index 00000000000000..5a6e940a3b69bd --- /dev/null +++ b/ports/quickfix/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "quickfix", + "version-string": "1.15.1", + "port-version": 5, + "description": "QuickFIX is a free and open source implementation of the FIX protocol.", + "homepage": "https://github.com/quickfix/quickfix", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/quill/fix-c4189-warning.patch b/ports/quill/fix-c4189-warning.patch new file mode 100644 index 00000000000000..55ae52fc3e3de4 --- /dev/null +++ b/ports/quill/fix-c4189-warning.patch @@ -0,0 +1,15 @@ +diff --git a/quill/CMakeLists.txt b/quill/CMakeLists.txt +index 76872c2..c173804 100644 +--- a/quill/CMakeLists.txt ++++ b/quill/CMakeLists.txt +@@ -148,6 +148,10 @@ if (QUILL_NO_EXCEPTIONS) + endif () + endif () + ++if (MSVC) ++ add_definitions(/wd4189) ++endif() ++ + # Add target sources + target_sources(${TARGET_NAME} PRIVATE ${SOURCE_FILES} ${HEADER_FILES}) + diff --git a/ports/quill/portfile.cmake b/ports/quill/portfile.cmake new file mode 100644 index 00000000000000..2902e76edd29c7 --- /dev/null +++ b/ports/quill/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO odygrd/quill + REF v1.6.3 + SHA512 e75aca827fe0833422da0d38df482cbc39db0e43dcc3cb791f3e2649f7022dcc448831a5ede85daf6feada60a2d5eaf312a3411abbba92fb9d76466336a7244d + HEAD_REF master + PATCHES + fix-c4189-warning.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DQUILL_FMT_EXTERNAL=ON +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/quill) + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/quill/TweakMe.h" "// #define QUILL_FMT_EXTERNAL" "#define QUILL_FMT_EXTERNAL") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/quill/vcpkg.json b/ports/quill/vcpkg.json new file mode 100644 index 00000000000000..b180656a73cf98 --- /dev/null +++ b/ports/quill/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "quill", + "version-semver": "1.6.3", + "port-version": 1, + "description": "C++14 Asynchronous Low Latency Logging Library", + "homepage": "https://github.com/odygrd/quill/", + "supports": "!(uwp | android)", + "dependencies": [ + "fmt", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/quirc/CMakeLists.txt b/ports/quirc/CMakeLists.txt index a3400c70b86b35..236b281b7b42cf 100644 --- a/ports/quirc/CMakeLists.txt +++ b/ports/quirc/CMakeLists.txt @@ -1,17 +1,27 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.19) project(quirc C) add_library(quirc - lib/decode.c - lib/identify.c - lib/quirc.c - lib/version_db.c + lib/decode.c + lib/identify.c + lib/quirc.c + lib/version_db.c + lib/quirc.h ) +target_include_directories(quirc INTERFACE $) + install(TARGETS quirc - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) + EXPORT quirc-targets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install(FILES lib/quirc.h DESTINATION include) -install(FILES ${PROJECT_SOURCE_DIR}/lib/quirc.h DESTINATION include) +install(EXPORT quirc-targets + FILE quirc-config.cmake + NAMESPACE quirc:: + DESTINATION share/quirc +) diff --git a/ports/quirc/CONTROL b/ports/quirc/CONTROL deleted file mode 100644 index 0fedf24c222084..00000000000000 --- a/ports/quirc/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: quirc -Version: 1.0-3 -Description: quirc is one of the C library available for scanning QR Codes diff --git a/ports/quirc/patch-for-msvc.patch b/ports/quirc/patch-for-msvc.patch deleted file mode 100644 index c755d04a7c37db..00000000000000 --- a/ports/quirc/patch-for-msvc.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1c1ceecb70ad76751f0b573937380525d7643a87 Mon Sep 17 00:00:00 2001 -From: reyzal -Date: Sun, 4 Mar 2018 12:09:34 +0800 -Subject: [PATCH] for msvc - ---- - lib/identify.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/identify.c b/lib/identify.c -index bf7bd94..cd16b0a 100644 ---- a/lib/identify.c -+++ b/lib/identify.c -@@ -196,9 +196,9 @@ static void threshold(struct quirc *q) - threshold_s = THRESHOLD_S_MIN; - - for (y = 0; y < q->h; y++) { -- int row_average[q->w]; -+ int *row_average = malloc(q->w * sizeof(int)); - -- memset(row_average, 0, sizeof(row_average)); -+ memset(row_average, 0, q->w * sizeof(int)); - - for (x = 0; x < q->w; x++) { - int w, u; -@@ -229,6 +229,7 @@ static void threshold(struct quirc *q) - } - - row += q->w; -+ free(row_average); - } - } - --- -2.7.3.windows.1 - diff --git a/ports/quirc/portfile.cmake b/ports/quirc/portfile.cmake index d45b283b4a1611..225479cd4e20ef 100644 --- a/ports/quirc/portfile.cmake +++ b/ports/quirc/portfile.cmake @@ -1,33 +1,26 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO dlbeer/quirc - REF v1.0 - SHA512 a556b08f2e2c710648b342fd06a855aa577b2b8c047c45a1c47cf54cde9963faf612978afba80bfd60a6f4f63156566f549ea303f09ed6e5348c1c30f5d77c13 + REF 7e7ab596e4d0988faf1c12ae89c354b114181c40 + SHA512 d10a783a33ffcc168a287b03250c5ac00b942ec724da641b13fe2ef3f456453b143146422b7e18129a75ce00f13d2d9e3097ac4620134d832de8be4adbbc61c2 HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patch-for-msvc.patch -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA ) vcpkg_install_cmake() + vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/quirc) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/quirc/license ${CURRENT_PACKAGES_DIR}/share/quirc/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/quirc/copyright) diff --git a/ports/quirc/vcpkg.json b/ports/quirc/vcpkg.json new file mode 100644 index 00000000000000..9297f736626f9e --- /dev/null +++ b/ports/quirc/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "quirc", + "version": "1.1", + "port-version": 2, + "description": "quirc is one of the C library available for scanning QR Codes" +} diff --git a/ports/qwt/CONTROL b/ports/qwt/CONTROL deleted file mode 100644 index c1271a72f7cd89..00000000000000 --- a/ports/qwt/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: qwt -Version: 6.1.3-7 -Homepage: https://sourceforge.net/projects/qwt -Description: Qt widgets library for technical applications -Build-Depends: qt5-base, qt5-svg, qt5-tools diff --git a/ports/qwt/fix-dynamic-static.patch b/ports/qwt/fix-dynamic-static.patch deleted file mode 100644 index b608681f2ecc03..00000000000000 --- a/ports/qwt/fix-dynamic-static.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/qwtconfig.pri b/qwtconfig.pri -index 1fe6055..441c69b 100644 ---- a/qwtconfig.pri -+++ b/qwtconfig.pri -@@ -72,7 +72,10 @@ QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features - # it will be a static library. - ###################################################################### - -+CONFIG(dynamic, dynamic|static) { -+ - QWT_CONFIG += QwtDll -+} - - ###################################################################### - # QwtPlot enables all classes, that are needed to use the QwtPlot diff --git a/ports/qwt/portfile.cmake b/ports/qwt/portfile.cmake index 002272e2468075..4383d3bd1b5ffc 100644 --- a/ports/qwt/portfile.cmake +++ b/ports/qwt/portfile.cmake @@ -1,65 +1,36 @@ -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/qwt/files/qwt/6.1.3/qwt-6.1.3.zip" - FILENAME "qwt-6.1.3.zip" - SHA512 8f249e23d50f71d14fca37776ea40d8d6931db14d9602e03a343bfb7a9bf55502202103135b77f583c3890a7924220e8a142a01c448dbde311860d89a3b10fc8 -) - -vcpkg_extract_source_archive_ex( - ARCHIVE ${ARCHIVE} +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - PATCHES fix-dynamic-static.patch + REPO qwt/qwt + REF 6.2.0 + FILENAME "qwt-6.2.0.zip" + SHA512 a3946c6e23481b5a2193819a1c1298db5a069d514ca60de54accb3a249403f5acd778172ae6fae24fae252767b1e58deba524de6225462f1bafd7c947996aae9 ) -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - vcpkg_configure_qmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" OPTIONS CONFIG+=${VCPKG_LIBRARY_LINKAGE} ) -vcpkg_build_qmake( - RELEASE_TARGETS sub-src-release_ordered - DEBUG_TARGETS sub-src-debug_ordered -) - -#Set the correct install directory to packages -foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") -endforeach() - -#Install the header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/src/*.h) -file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/qwt) - -#Install the module files -file(INSTALL - ${RELEASE_DIR}/lib/qwt.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) - -file(INSTALL - ${DEBUG_DIR}/lib/qwtd.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL - ${RELEASE_DIR}/lib/qwt.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_install_qmake( + RELEASE_TARGETS sub-src-release_ordered + DEBUG_TARGETS sub-src-debug_ordered ) - - file(INSTALL - ${DEBUG_DIR}/lib/qwtd.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +else () + vcpkg_install_qmake( + RELEASE_TARGETS sub-src-all-ordered + DEBUG_TARGETS sub-src-all-ordered ) endif() -vcpkg_copy_pdbs() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +#Install the header files +file(GLOB HEADER_FILES "${SOURCE_PATH}/src/*.h") +file(INSTALL ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}") # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/qwt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/qwt/COPYING ${CURRENT_PACKAGES_DIR}/share/qwt/copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/qwt/vcpkg.json b/ports/qwt/vcpkg.json new file mode 100644 index 00000000000000..f837b6adbc0627 --- /dev/null +++ b/ports/qwt/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "qwt", + "version-semver": "6.2.0", + "description": "qt widgets library for technical applications", + "homepage": "https://sourceforge.net/projects/qwt", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + "qt5-svg", + "qt5-tools" + ] +} diff --git a/ports/qwtw/portfile.cmake b/ports/qwtw/portfile.cmake new file mode 100644 index 00000000000000..27dd91786110de --- /dev/null +++ b/ports/qwtw/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_fail_port_install(ON_TARGET "LINUX" "OSX" "UWP" "ANDROID" ON_ARCH "arm" "x86" ON_LIBRARY_LINKAGE "static") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ig-or/qwtw + REF 7d6e7c95437cbc7d5d123fc1ccf0d6a3c4e419e6 # v3.1.0 + SHA512 de5abf26d0975b9f0ed88e10cd4d5b4d12e25cce8c87ab6a18d8e7064697de6fc8da83e118b5a4e2819c09e2dbbfd20daeecc6a42748c019c6699666276d075a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/qwtw/vcpkg.json b/ports/qwtw/vcpkg.json new file mode 100644 index 00000000000000..2fa18ec80dcf15 --- /dev/null +++ b/ports/qwtw/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "qwtw", + "version-string": "3.1.0", + "port-version": 1, + "description": "qwt-based 2D plotting library", + "homepage": "https://github.com/ig-or/qwtw", + "supports": "windows & x64 & !static", + "dependencies": [ + "boost-asio", + "boost-chrono", + "boost-circular-buffer", + "boost-date-time", + "boost-filesystem", + "boost-regex", + "boost-system", + "boost-thread", + "marble", + "qt5-base", + "qt5-networkauth", + "qt5-svg", + "qwt" + ] +} diff --git a/ports/rabit/CONTROL b/ports/rabit/CONTROL deleted file mode 100644 index 7ad9bcfdb91d6d..00000000000000 --- a/ports/rabit/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: rabit -Version: 0.1 -Homepage: https://github.com/dmlc/rabit -Description: rabit is a light weight library that provides a fault tolerant interface of Allreduce and Broadcast. It is designed to support easy implementations of distributed machine learning programs, many of which fall naturally under the Allreduce abstraction. \ No newline at end of file diff --git a/ports/rabit/fix-file-conflict.patch b/ports/rabit/fix-file-conflict.patch new file mode 100644 index 00000000000000..665695305c5d70 --- /dev/null +++ b/ports/rabit/fix-file-conflict.patch @@ -0,0 +1,52 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 08330d9..a58d669 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,10 +5,16 @@ project(rabit VERSION 0.0.0) + option(RABIT_BUILD_TESTS "Build rabit tests" OFF) + option(RABIT_BUILD_MPI "Build MPI" OFF) + ++find_package(dmlc CONFIG REQUIRED) ++ + add_library(rabit src/allreduce_base.cc src/allreduce_robust.cc src/engine.cc src/c_api.cc) + add_library(rabit_base src/allreduce_base.cc src/engine_base.cc src/c_api.cc) + add_library(rabit_empty src/engine_empty.cc src/c_api.cc) + ++target_link_libraries(rabit dmlc::dmlc) ++target_link_libraries(rabit_base dmlc::dmlc) ++target_link_libraries(rabit_empty dmlc::dmlc) ++ + set(rabit_libs rabit rabit_base rabit_empty) + if(RABIT_BUILD_MPI) + find_package(MPI REQUIRED) +@@ -22,7 +28,6 @@ if(RABIT_BUILD_TESTS) + add_library(rabit_mock STATIC src/allreduce_base.cc src/allreduce_robust.cc src/engine_mock.cc src/c_api.cc) + list(APPEND rabit_libs rabit_mock) # add to list to apply build settings, then remove + endif() +- + foreach(lib ${rabit_libs}) + #include "./internal/utils.h" + target_include_directories(${lib} PUBLIC +@@ -42,7 +47,8 @@ if(RABIT_BUILD_TESTS) + if(RABIT_BUILD_MPI) + add_executable(speed_test_mpi test/speed_test.cc) + target_link_libraries(speed_test_mpi rabit_mpi) +- install(TARGETS speed_test_mpi DESTINATION bin) ++ install(TARGETS speed_test_mpi DESTINATION bin) ++ message("IN MPI ") + endif() + endif() + +diff --git a/include/rabit/serializable.h b/include/rabit/serializable.h +index 4a3c2a1..0fd4154 100644 +--- a/include/rabit/serializable.h ++++ b/include/rabit/serializable.h +@@ -9,7 +9,7 @@ + #include + #include + #include "./internal/utils.h" +-#include "../dmlc/io.h" ++#include + + namespace rabit { + /*! diff --git a/ports/rabit/portfile.cmake b/ports/rabit/portfile.cmake index cd009150f63f18..b8846b22ecd0da 100644 --- a/ports/rabit/portfile.cmake +++ b/ports/rabit/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP.") endif() @@ -10,22 +8,27 @@ vcpkg_from_github( REF v0.1 SHA512 145fd839898cb95eaab9a88ad3301a0ccac0c8b672419ee2b8eb6ba273cc9a26e069e5ecbc37a3078e46dc64d11efb3e5ab10e5f8fed714e7add85b9e6ac2ec7 HEAD_REF master + PATCHES fix-file-conflict.patch ) +file(REMOVE_RECURSE ${SOURCE_PATH}/include/dmlc) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + PREFER_NINJA + OPTIONS + -DRABIT_BUILD_TESTS=OFF + -DRABIT_BUILD_MPI=OFF ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) vcpkg_copy_pdbs() # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) - diff --git a/ports/rabit/vcpkg.json b/ports/rabit/vcpkg.json new file mode 100644 index 00000000000000..a7635dfa667a1e --- /dev/null +++ b/ports/rabit/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "rabit", + "version-string": "0.1", + "port-version": 3, + "description": "rabit is a light weight library that provides a fault tolerant interface of Allreduce and Broadcast. It is designed to support easy implementations of distributed machine learning programs, many of which fall naturally under the Allreduce abstraction.", + "homepage": "https://github.com/dmlc/rabit", + "supports": "!uwp", + "dependencies": [ + "dmlc" + ] +} diff --git a/ports/ragel/0001-Remove-unistd.h-include-1.patch b/ports/ragel/0001-Remove-unistd.h-include-1.patch deleted file mode 100644 index 2cdc39b72cc5a8..00000000000000 --- a/ports/ragel/0001-Remove-unistd.h-include-1.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 4a337ce9475c75497f4221cadd9d2dd8126835c7 Mon Sep 17 00:00:00 2001 -From: vlj -Date: Tue, 4 Oct 2016 17:54:22 +0200 -Subject: [PATCH 1/2] Remove unistd.h include 1 - ---- - ragel-6.10/ragel/main.cpp | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/ragel-6.10/ragel/main.cpp b/ragel-6.10/ragel/main.cpp -index f5fbd7b..e3bcc18 100644 ---- a/ragel-6.10/ragel/main.cpp -+++ b/ragel-6.10/ragel/main.cpp -@@ -24,7 +24,6 @@ - #include - #include - #include --#include - #include - #include - #include --- -2.10.0.windows.1 - diff --git a/ports/ragel/0001-remove-unistd-h.patch b/ports/ragel/0001-remove-unistd-h.patch new file mode 100644 index 00000000000000..fba598e0c2df9b --- /dev/null +++ b/ports/ragel/0001-remove-unistd-h.patch @@ -0,0 +1,14 @@ +diff --git a/ragel/main.cpp b/ragel/main.cpp +index f5fbd7b..947b1c8 100644 +--- a/ragel/main.cpp ++++ b/ragel/main.cpp +@@ -24,9 +24,7 @@ + #include + #include + #include +-#include + #include +-#include + #include + #include + #include diff --git a/ports/ragel/0002-Remove-unistd.h-include-2.patch b/ports/ragel/0002-Remove-unistd.h-include-2.patch deleted file mode 100644 index b2c0e497a6d279..00000000000000 --- a/ports/ragel/0002-Remove-unistd.h-include-2.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 259bb8be3f66e32063652cb4f1a456b7327ca513 Mon Sep 17 00:00:00 2001 -From: vlj -Date: Tue, 4 Oct 2016 17:54:38 +0200 -Subject: [PATCH 2/2] Remove unistd.h include 2 - ---- - ragel-6.10/ragel/main.cpp | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/ragel-6.10/ragel/main.cpp b/ragel-6.10/ragel/main.cpp -index e3bcc18..947b1c8 100644 ---- a/ragel-6.10/ragel/main.cpp -+++ b/ragel-6.10/ragel/main.cpp -@@ -25,7 +25,6 @@ - #include - #include - #include --#include - #include - #include - #include --- -2.10.0.windows.1 - diff --git a/ports/ragel/CONTROL b/ports/ragel/CONTROL deleted file mode 100644 index 1e23db11751301..00000000000000 --- a/ports/ragel/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ragel -Version: 6.10-2 -Homepage: https://www.colm.net/files/ragel -Description: Ragel State Machine Compiler diff --git a/ports/ragel/portfile.cmake b/ports/ragel/portfile.cmake index 820ded5df2dc4c..69c47a1cdd6ff2 100644 --- a/ports/ragel/portfile.cmake +++ b/ports/ragel/portfile.cmake @@ -1,22 +1,19 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ragel-6.10) vcpkg_download_distfile(ARCHIVE URLS "http://www.colm.net/files/ragel/ragel-6.10.tar.gz" FILENAME "ragel-6.10.tar.gz" SHA512 6c1fe4f6fa8546ae28b92ccfbae94355ff0d3cea346b9ae8ce4cf6c2bdbeb823e0ccd355332643ea72d3befd533a8b3030ddbf82be7ffa811c2c58cbb01aaa38 ) -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/ragel) - -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/0001-Remove-unistd.h-include-1.patch" - "${CMAKE_CURRENT_LIST_DIR}/0002-Remove-unistd.h-include-2.patch" + 0001-remove-unistd-h.patch ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/ragel) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/ports/ragel/vcpkg.json b/ports/ragel/vcpkg.json new file mode 100644 index 00000000000000..e55e333d8d5b8c --- /dev/null +++ b/ports/ragel/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "ragel", + "version-string": "6.10", + "port-version": 4, + "description": "Ragel State Machine Compiler", + "homepage": "https://www.colm.net/files/ragel" +} diff --git a/ports/rang/CONTROL b/ports/rang/CONTROL deleted file mode 100644 index 629bee4756fcb9..00000000000000 --- a/ports/rang/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: rang -Version: 3.1.0 -Description: Colors for your Terminal. \ No newline at end of file diff --git a/ports/rang/portfile.cmake b/ports/rang/portfile.cmake index 4c332a82ed1d03..f2eead8740aa9f 100644 --- a/ports/rang/portfile.cmake +++ b/ports/rang/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO agauniyal/rang diff --git a/ports/rang/vcpkg.json b/ports/rang/vcpkg.json new file mode 100644 index 00000000000000..c388d10d47dafd --- /dev/null +++ b/ports/rang/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "rang", + "version-string": "3.1.0", + "port-version": 1, + "description": "Colors for your Terminal." +} diff --git a/ports/range-v3-vs2015/CONTROL b/ports/range-v3-vs2015/CONTROL deleted file mode 100644 index 34ce349e190d9a..00000000000000 --- a/ports/range-v3-vs2015/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: range-v3-vs2015 -Version: 20151130-vcpkg5 -Homepage: https://github.com/Microsoft/Range-V3-VS2015 -Description: Range library for C++11/14/17. diff --git a/ports/range-v3-vs2015/portfile.cmake b/ports/range-v3-vs2015/portfile.cmake index bc7153a534a931..004711ab229031 100644 --- a/ports/range-v3-vs2015/portfile.cmake +++ b/ports/range-v3-vs2015/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/Range-V3-VS2015 diff --git a/ports/range-v3-vs2015/vcpkg.json b/ports/range-v3-vs2015/vcpkg.json new file mode 100644 index 00000000000000..289515dca67458 --- /dev/null +++ b/ports/range-v3-vs2015/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "range-v3-vs2015", + "version-string": "20151130-vcpkg5", + "port-version": 1, + "description": "Range library for C++11/14/17.", + "homepage": "https://github.com/Microsoft/Range-V3-VS2015" +} diff --git a/ports/range-v3/CONTROL b/ports/range-v3/CONTROL deleted file mode 100644 index 1e1274d4bf04da..00000000000000 --- a/ports/range-v3/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: range-v3 -Version: 0.5.0 -Homepage: https://github.com/ericniebler/range-v3 -Description: Range library for C++11/14/17. diff --git a/ports/range-v3/portfile.cmake b/ports/range-v3/portfile.cmake index 625d6dd4889977..47129ff1782a7a 100644 --- a/ports/range-v3/portfile.cmake +++ b/ports/range-v3/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ericniebler/range-v3 - REF 0.5.0 - SHA512 076be03b0f4113acb5fb4db83ed5e755bed60ff8df9a7b982b144949cce40f0bb0579ecca38c1f33643b63037b8d311afa6d613b50811e1191b63e2c42a0d4bf + REF 4989f3e9ff2efee1852942bb9328ef121369ba02 # 0.11.0 + SHA512 da571feff60d20a42e1e0593f132d4ab095f3ffbecaf0c020f295a2ec8b75c6934abb1974679e55ce8b7b16d105e0cbf3929210677c3b1b90cb349e583854fd4 HEAD_REF master ) @@ -26,5 +24,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/range-v3/vcpkg.json b/ports/range-v3/vcpkg.json new file mode 100644 index 00000000000000..6a5d15958936c6 --- /dev/null +++ b/ports/range-v3/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "range-v3", + "version-string": "0.11.0", + "port-version": 1, + "description": "Range library for C++11/14/17.", + "homepage": "https://github.com/ericniebler/range-v3" +} diff --git a/ports/rapidcheck/CONTROL b/ports/rapidcheck/CONTROL deleted file mode 100644 index 67c82313c24006..00000000000000 --- a/ports/rapidcheck/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: rapidcheck -Version: 2018-11-05-1 -Description: A property-based testing library for C++ (a la QuickCheck) with the goal of being simple to use with as little boilerplate as possible. diff --git a/ports/rapidcheck/portfile.cmake b/ports/rapidcheck/portfile.cmake index bdebdb656d432e..544319ce50f752 100644 --- a/ports/rapidcheck/portfile.cmake +++ b/ports/rapidcheck/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO emil-e/rapidcheck - REF cf9e0d8bd8c94e9dc00dc0ab302352bfaf1a3ac5 - SHA512 6cef62edbda391c3527d63db350842f669841ad2c751a64773250cd40bb65f26c2c394b107ef5530c2d3bd15b7079148fa9778d68a7346225bbb15227b1553c5 + REF 7bc7d302191a4f3d0bf005692677126136e02f60 + SHA512 8631f1034a0a24293d61a91cbb8f8b69c70acde02d60377d0a68d045e4d57acb878aafbea76907574c0cc6cdac3a16d207d310b49d7c48ee7edbede3236ed15b HEAD_REF master ) @@ -18,13 +16,10 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/rapidcheck/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}/cmake) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/rapidcheck/copyright COPYONLY) - -# Post-build test for cmake libraries -vcpkg_test_cmake(PACKAGE_NAME rapidcheck) +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/rapidcheck/vcpkg.json b/ports/rapidcheck/vcpkg.json new file mode 100644 index 00000000000000..60570b545e09fe --- /dev/null +++ b/ports/rapidcheck/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "rapidcheck", + "version-string": "2020-08-25", + "port-version": 1, + "description": "A property-based testing library for C++ (a la QuickCheck) with the goal of being simple to use with as little boilerplate as possible.", + "homepage": "https://github.com/emil-e/rapidcheck" +} diff --git a/ports/rapidcsv/portfile.cmake b/ports/rapidcsv/portfile.cmake new file mode 100644 index 00000000000000..9e2654e7910e01 --- /dev/null +++ b/ports/rapidcsv/portfile.cmake @@ -0,0 +1,16 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO d99kris/rapidcsv + REF v8.50 + SHA512 97eb3eb8e2bbd45d128a73129825b0ce28bf36db14ae21f759b46fefce98980743397e1d34df58cb48707cde0fea9b092438d7720bf67a40e8cd5f289395ba40 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} +) +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/rapidcsv/vcpkg.json b/ports/rapidcsv/vcpkg.json new file mode 100644 index 00000000000000..3b5257e01be0a8 --- /dev/null +++ b/ports/rapidcsv/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "rapidcsv", + "version": "8.50", + "description": "Rapidcsv is a C++ header-only library for CSV parsing.", + "homepage": "https://github.com/d99kris/rapidcsv/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/rapidjson/CONTROL b/ports/rapidjson/CONTROL deleted file mode 100644 index 53d344628707eb..00000000000000 --- a/ports/rapidjson/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: rapidjson -Version: d87b698-1 -Description: A fast JSON parser/generator for C++ with both SAX/DOM style API -Homepage: http://rapidjson.org/ \ No newline at end of file diff --git a/ports/rapidjson/arm64-endian.patch b/ports/rapidjson/arm64-endian.patch deleted file mode 100644 index 81fd921322933d..00000000000000 --- a/ports/rapidjson/arm64-endian.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/rapidjson/rapidjson.h b/include/rapidjson/rapidjson.h -index 053b2ce..1e0b8f3 100644 ---- a/include/rapidjson/rapidjson.h -+++ b/include/rapidjson/rapidjson.h -@@ -236,7 +236,7 @@ - # define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN - # elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__) - # define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN --# elif defined(_MSC_VER) && defined(_M_ARM) -+# elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) - # define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN - # elif defined(RAPIDJSON_DOXYGEN_RUNNING) - # define RAPIDJSON_ENDIAN diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 7438c0e33c84ee..118aa0b42401f8 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -1,13 +1,10 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Tencent/rapidjson - REF d87b698d0fcc10a5f632ecbc80a9cb2a8fa094a5 - SHA512 1770668c954e1bfa40da3956ccf2252703d2addb058bb8c0bf579abac585262452d0e15dcfed9ac2fa358c0da305d706226fdab8310b584017aba98e4f31db4f + REF ce81bc9edfe773667a7a4454ba81dac72ed4364c # accessed on 2020-09-14 + SHA512 a1bbc5668fca9ee34b05ae424a5177b66beaf7b3b4cdfbb3cb067fc58ce91717b4030e2c268ad32e4aa4a7ef59ab5e3aae05ff71d0d91d463eafa7d2e077df07 HEAD_REF master - PATCHES arm64-endian.patch ) # Use RapidJSON's own build process, skipping examples and tests @@ -22,17 +19,12 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -# Move CMake config files to the right place vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -# Delete redundant directories -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc) - -# Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/license.txt ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidjson/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidjson/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib" "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/share/doc") file(READ "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" _contents) string(REPLACE "\${RapidJSON_SOURCE_DIR}" "\${RapidJSON_CMAKE_DIR}/../.." _contents "${_contents}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" "${_contents}\nset(RAPIDJSON_INCLUDE_DIRS \"\${RapidJSON_INCLUDE_DIRS}\")\n") -# Note: adding this extra setting for RAPIDJSON_INCLUDE_DIRS maintains compatibility with previous rapidjson versions + +file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/rapidjson/usage b/ports/rapidjson/usage deleted file mode 100644 index b72b8e3d695be6..00000000000000 --- a/ports/rapidjson/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package rapidjson provides CMake integration: - - find_package(RapidJSON CONFIG REQUIRED) - target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS}) diff --git a/ports/rapidjson/vcpkg.json b/ports/rapidjson/vcpkg.json new file mode 100644 index 00000000000000..ef79ba87174057 --- /dev/null +++ b/ports/rapidjson/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "rapidjson", + "version-date": "2020-09-14", + "port-version": 1, + "description": "A fast JSON parser/generator for C++ with both SAX/DOM style API ", + "homepage": "http://rapidjson.org/" +} diff --git a/ports/rapidstring/CONTROL b/ports/rapidstring/CONTROL deleted file mode 100644 index e88c40ec285fc4..00000000000000 --- a/ports/rapidstring/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: rapidstring -Version: 2018-08-03 -Description: rapidstring is maybe the fastest string library ever written in ANSI C. diff --git a/ports/rapidstring/fix-cmake-install.patch b/ports/rapidstring/fix-cmake-install.patch deleted file mode 100644 index 624a71d2b8daa4..00000000000000 --- a/ports/rapidstring/fix-cmake-install.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8543256..8ebce9c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,15 +1,26 @@ - cmake_minimum_required(VERSION 3.8 FATAL_ERROR) - project(rapidstring LANGUAGES C VERSION 0.1.0) - add_library(rapidstring INTERFACE) --target_include_directories(rapidstring INTERFACE include) -+target_include_directories(rapidstring INTERFACE -+ $ -+ $) - - include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/utility.cmake) - - # TODO: Installation. -+install(FILES include/rapidstring.h DESTINATION include) -+ -+install(TARGETS rapidstring EXPORT rapidstringConfig) -+ -+install(EXPORT rapidstringConfig -+ FILE unofficial-rapidstringConfig.cmake -+ NAMESPACE unofficial::rapidstring:: -+ DESTINATION share/cmake/rapidstring -+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) - - if(BUILD_TESTING) - enable_testing() - endif() - --add_subdirectory(test) --add_subdirectory(benchmark) -+#add_subdirectory(test) -+#add_subdirectory(benchmark) diff --git a/ports/rapidstring/portfile.cmake b/ports/rapidstring/portfile.cmake deleted file mode 100644 index 2bce2d015e3ca2..00000000000000 --- a/ports/rapidstring/portfile.cmake +++ /dev/null @@ -1,27 +0,0 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO boyerjohn/rapidstring - REF ee433955c1e9cacfaecbf53c0a13318ab5825bd4 - SHA512 89e0656323d53dc3c47ba24ad9a032445b0985f21aaace05ea5bdbfb0ade5291193ac06145faf5984bcdff67c2a07a500109ce938174dbf1339fea2d79a6bd10 - HEAD_REF master - PATCHES - fix-cmake-install.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DBUILD_TESTING=OFF -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/rapidstring TARGET_PATH share/unofficial-rapidstring) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) - -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/rapidstring/copyright COPYONLY) diff --git a/ports/rapidxml-ns/CONTROL b/ports/rapidxml-ns/CONTROL deleted file mode 100644 index f932481e1bce9e..00000000000000 --- a/ports/rapidxml-ns/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: rapidxml-ns -Version: 1.13.2 -Description: RapidXML with added XML namespaces support. diff --git a/ports/rapidxml-ns/portfile.cmake b/ports/rapidxml-ns/portfile.cmake index d51fa031271e61..e2d9a0cc9432fc 100644 --- a/ports/rapidxml-ns/portfile.cmake +++ b/ports/rapidxml-ns/portfile.cmake @@ -1,6 +1,4 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO svgpp/rapidxml_ns diff --git a/ports/rapidxml-ns/vcpkg.json b/ports/rapidxml-ns/vcpkg.json new file mode 100644 index 00000000000000..a0422d1eb69c65 --- /dev/null +++ b/ports/rapidxml-ns/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "rapidxml-ns", + "version-string": "1.13.2", + "port-version": 1, + "description": "RapidXML with added XML namespaces support." +} diff --git a/ports/rapidxml/CONTROL b/ports/rapidxml/CONTROL deleted file mode 100644 index bfc1eb77b6f28d..00000000000000 --- a/ports/rapidxml/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: rapidxml -Version: 1.13 -Homepage: https://sourceforge.net/projects/rapidxml -Description: RapidXml is an attempt to create the fastest XML parser possible, while retaining useability, portability and reasonable W3C compatibility. diff --git a/ports/rapidxml/portfile.cmake b/ports/rapidxml/portfile.cmake index dd8f0d4c2f0c2b..b13d1a2bc86e49 100644 --- a/ports/rapidxml/portfile.cmake +++ b/ports/rapidxml/portfile.cmake @@ -1,12 +1,11 @@ #header-only library -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rapidxml-1.13) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/rapidxml/files/rapidxml/rapidxml%201.13/rapidxml-1.13.zip/download" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO rapidxml/rapidxml + REF rapidxml%201.13 FILENAME "rapidxml-1.13.zip" SHA512 6c10583e6631ccdb0217d0a5381172cb4c1046226de6ef1acf398d85e81d145228e14c3016aefcd7b70a1db8631505b048d8b4f5d4b0dbf1811d2482eefdd265 ) -vcpkg_extract_source_archive(${ARCHIVE}) # Handle copyright file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidxml) diff --git a/ports/rapidxml/vcpkg.json b/ports/rapidxml/vcpkg.json new file mode 100644 index 00000000000000..d43ff6cf8cb603 --- /dev/null +++ b/ports/rapidxml/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "rapidxml", + "version-string": "1.13", + "port-version": 5, + "description": "RapidXml is an attempt to create the fastest XML parser possible, while retaining useability, portability and reasonable W3C compatibility.", + "homepage": "https://sourceforge.net/projects/rapidxml" +} diff --git a/ports/rappture/CMakeLists.txt b/ports/rappture/CMakeLists.txt new file mode 100644 index 00000000000000..57d7739258e359 --- /dev/null +++ b/ports/rappture/CMakeLists.txt @@ -0,0 +1,110 @@ +cmake_minimum_required(VERSION 3.11) +cmake_policy(VERSION 3.11) + +project (rappture) + +set(SRC_RAPPTURE_CORE + src/core/scew_extras.c + src/core/RpBindingsDict.cc + src/core/RpBuffer.cc + src/core/RpBufferCInterface.cc + src/core/RpDXWriter.cc + src/core/RpDXWriterFInterface.cc + src/core/RpEncode.cc + src/core/RpEntityRef.cc + src/core/RpFortranCommon.cc + src/core/RpLibrary.cc + src/core/RpLibraryCInterface.cc + src/core/RpLibraryFInterface.cc + src/core/RpOutcome.cc + src/core/RpOutcomeCInterface.cc + src/core/RpPtr.cc + src/core/RpResult.cc + src/core/RpUnits.cc + src/core/RpUnitsCInterface.cc + src/core/RpUnitsFInterface.cc + src/core/RpUnitsStd.cc + src/core/RpUtils.cc + src/core/RpUtilsCInterface.cc + src/core/RpUtilsFInterface.cc + src/core/b64/cdecode.c + src/core/b64/cencode.c + src/core/scew/attribute.c + src/core/scew/element.c + src/core/scew/error.c + src/core/scew/parser.c + src/core/scew/str.c + src/core/scew/tree.c + src/core/scew/writer.c + src/core/scew/xattribute.c + src/core/scew/xerror.c + src/core/scew/xhandler.c + src/core/scew/xparser.c + src/core/scew/xprint.c +) + +set(HEADERS + src/core/rappture.h + src/core/RpBindingsDict.h + src/core/RpBuffer.h + src/core/RpBufferCHelper.h + src/core/RpBufferCInterface.h + src/core/RpDict.h + src/core/RpDXWriter.h + src/core/RpDXWriterFInterface.h + src/core/RpDXWriterFStubs.h + src/core/RpEncode.h + src/core/RpEntityRef.h + src/core/RpFortranCommon.h + src/core/RpLibrary.h + src/core/RpLibraryCInterface.h + src/core/RpLibraryFInterface.h + src/core/RpLibraryFStubs.h + src/core/RpOutcome.h + src/core/RpOutcomeCHelper.h + src/core/RpOutcomeCInterface.h + src/core/RpPtr.h + src/core/RpSimpleBuffer.h + src/core/RpUnits.h + src/core/RpUnitsCInterface.h + src/core/RpUnitsFInterface.h + src/core/RpUnitsFStubs.h + src/core/RpUnitsStd.h + src/core/RpUtils.h + src/core/RpUtilsCInterface.h + src/core/RpUtilsFInterface.h + src/core/RpUtilsFStubs.h + src/core/scew_extras.h + +) + +add_library(rappture ${SRC_RAPPTURE_CORE} ${HEADERS}) + +target_include_directories(rappture PUBLIC + $ + $ +) + +find_package(expat CONFIG REQUIRED) +find_package(ZLIB REQUIRED) + +target_compile_definitions(rappture PUBLIC + -D_CRT_SECURE_NO_WARNINGS + -DRAPPTURE_VERSION=1.9 + -DSVN_VERSION=6713 + -D_USE_MATH_DEFINES +) + +target_link_libraries(rappture PRIVATE + expat::expat + ZLIB::ZLIB +) + +install(TARGETS rappture EXPORT rappture-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) + +install(FILES ${HEADERS} DESTINATION include/rappture) +install(EXPORT rappture-config NAMESPACE unofficial::rappture:: DESTINATION share/rappture) diff --git a/ports/rappture/portfile.cmake b/ports/rappture/portfile.cmake new file mode 100644 index 00000000000000..e79ec308553930 --- /dev/null +++ b/ports/rappture/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://nanohub.org/app/site/downloads/rappture/rappture-src-20130903.tar.gz" + FILENAME "rappture-src-20130903.tar.gz" + SHA512 3b42569d056c5e80762eada3aff23d230d4ba8f6f0078de44d8571a713dde91e31e66fe3c37ceb66e934a1410b338fb481aeb5a29ef56b53da4ad2e8a2a2ae59 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/rappture.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file( + INSTALL ${SOURCE_PATH}/license.terms + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/ports/rappture/rappture.patch b/ports/rappture/rappture.patch new file mode 100644 index 00000000000000..d8c7ff6c8ca548 --- /dev/null +++ b/ports/rappture/rappture.patch @@ -0,0 +1,89 @@ +diff --git a/src/core/RpBuffer.cc b/src/core/RpBuffer.cc +index 6d439fe..ec45405 100644 +--- a/src/core/RpBuffer.cc ++++ b/src/core/RpBuffer.cc +@@ -16,7 +16,6 @@ + #include + #include + #include +-#include + #include + #include + #include "b64/encode.h" +@@ -24,6 +23,11 @@ + #include "RpBuffer.h" + #include "RpEncode.h" + ++#if defined(_MSC_VER) ++#include ++typedef SSIZE_T ssize_t; ++#endif ++ + namespace Rappture { + + /** +@@ -109,6 +113,9 @@ Buffer::operator+=(const Buffer& b) + Buffer::~Buffer() + {} + ++#ifndef _WIN32 ++# define _fileno fileno ++#endif + + bool + Buffer::load (Outcome &status, const char *path) +@@ -123,7 +130,7 @@ Buffer::load (Outcome &status, const char *path) + } + + struct stat stat; +- if (fstat(fileno(f), &stat) < 0) { ++ if (fstat(_fileno(f), &stat) < 0) { + status.addError("can't stat \"%s\": %s", path, strerror(errno)); + return false; + } +diff --git a/src/core/RpDXWriter.cc b/src/core/RpDXWriter.cc +index e4748b3..8990c0f 100644 +--- a/src/core/RpDXWriter.cc ++++ b/src/core/RpDXWriter.cc +@@ -18,6 +18,12 @@ + #include + #include + #include ++ ++#if defined(_MSC_VER) ++#include ++typedef SSIZE_T ssize_t; ++#endif ++ + using namespace Rappture; + + DXWriter::DXWriter() : +diff --git a/src/core/RpLibrary.cc b/src/core/RpLibrary.cc +index 2b9a540..4da787b 100644 +--- a/src/core/RpLibrary.cc ++++ b/src/core/RpLibrary.cc +@@ -11,7 +11,6 @@ + * ====================================================================== + */ + +-#include "config.h" + #include "scew/scew.h" + #include "scew_extras.h" + #include "RpLibrary.h" +diff --git a/src/core/scew/scew.h b/src/core/scew/scew.h +index 9741ed5..e335c2d 100644 +--- a/src/core/scew/scew.h ++++ b/src/core/scew/scew.h +@@ -61,12 +61,6 @@ + # define SCEW_LIB_D + # endif /* _DEBUG */ + +-# if defined(SCEW_LIB_U) || defined(SCEW_LIB_S) || defined(SCEW_LIB_D) +-# pragma comment( lib, "scew_" SCEW_LIB_U SCEW_LIB_S SCEW_LIB_D ".lib" ) +-# else +-# pragma comment( lib, "scew.lib" ) +-# endif +- + #endif /* _WIN32 */ + + #endif /* SCEW_H_ALEIX0211250134 */ diff --git a/ports/rappture/vcpkg.json b/ports/rappture/vcpkg.json new file mode 100644 index 00000000000000..68a1a5efa9467f --- /dev/null +++ b/ports/rappture/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "rappture", + "version": "1.9", + "port-version": 1, + "description": "Rappture is a toolkit supporting Rapid application infrastructure, making it quick and easy to develop powerful scientific applications.", + "dependencies": [ + "expat", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/raylib/CONTROL b/ports/raylib/CONTROL deleted file mode 100644 index 3be7c5eac42d4e..00000000000000 --- a/ports/raylib/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: raylib -Version: 2019-04-27-2 -Description: A simple and easy-to-use library to enjoy videogames programming -#Build-Depends: glfw3 - -Feature: non-audio -Description: Build raylib without audio module diff --git a/ports/raylib/portfile.cmake b/ports/raylib/portfile.cmake index 82c79a44c801af..7af3d4c36090de 100644 --- a/ports/raylib/portfile.cmake +++ b/ports/raylib/portfile.cmake @@ -1,9 +1,7 @@ # https://github.com/raysan5/raylib/issues/388 -if(TARGET_TRIPLET MATCHES "^arm" OR TARGET_TRIPLET MATCHES "uwp$") - message(FATAL_ERROR "raylib doesn't support ARM or UWP.") -endif() +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") -if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX) message( "raylib currently requires the following libraries from the system package manager: libgl1-mesa-dev @@ -15,23 +13,27 @@ These can be installed on Ubuntu systems via sudo apt install libgl1-mesa-dev li ) endif() -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO raysan5/raylib - REF f37e55a77bd6177dbaea4d7f484961c09104e104 - SHA512 57146ebc7ab22a4e60c1d9eecd4c7a8f1930d6709f45761af809da9ea4f161e9fd450fa1042252a80bd7952ed9571a5d8dee4d454c8903a778e3e1328300b2bd + REF b6c8d343dca2ef19c23c50975328a028124cf3cb # 3.7.0 + SHA512 565854b00452ae4ae17129f6ced83d842b06ee51a2b254cf02c881c36f9133e5cd605c07585428a7ec4c4e556d8edea908f1c09cd2ef826c30be35c9e5c2d009 HEAD_REF master ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC) -if("non-audio" IN_LIST FEATURES) - set(USE_AUDIO OFF) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + hidpi SUPPORT_HIGH_DPI + use-audio USE_AUDIO +) + +if(VCPKG_TARGET_IS_MINGW) + set(DEBUG_ENABLE_SANITIZERS OFF) else() - set(USE_AUDIO ON) + set(DEBUG_ENABLE_SANITIZERS ON) endif() vcpkg_configure_cmake( @@ -42,11 +44,11 @@ vcpkg_configure_cmake( -DBUILD_GAMES=OFF -DSHARED=${SHARED} -DSTATIC=${STATIC} - -DUSE_AUDIO=${USE_AUDIO} -DUSE_EXTERNAL_GLFW=OFF # externl glfw3 causes build errors on Windows + ${FEATURE_OPTIONS} OPTIONS_DEBUG - -DENABLE_ASAN=ON - -DENABLE_UBSAN=ON + -DENABLE_ASAN=${DEBUG_ENABLE_SANITIZERS} + -DENABLE_UBSAN=${DEBUG_ENABLE_SANITIZERS} -DENABLE_MSAN=OFF OPTIONS_RELEASE -DENABLE_ASAN=OFF @@ -79,11 +81,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) ) endif() -# Install usage configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) - -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -#vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/raylib/usage b/ports/raylib/usage index 936b74f502a845..94ce10978f78d5 100644 --- a/ports/raylib/usage +++ b/ports/raylib/usage @@ -1,5 +1,5 @@ The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: find_package(@PORT@ CONFIG REQUIRED) - target_include_directories(main PRIVATE ${raylib_INCLUDE_DIRS}) - target_link_libraries(main PRIVATE ${raylib_LIBRARIES}) + target_include_directories(main PRIVATE ${RAYLIB_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${RAYLIB_LIBRARIES}) diff --git a/ports/raylib/vcpkg-cmake-wrapper.cmake b/ports/raylib/vcpkg-cmake-wrapper.cmake index 1efda7c9e58240..2d7560eb0f3e46 100644 --- a/ports/raylib/vcpkg-cmake-wrapper.cmake +++ b/ports/raylib/vcpkg-cmake-wrapper.cmake @@ -1,14 +1,11 @@ -set(raylib_USE_STATIC_LIBS @STATIC@) +include(SelectLibraryConfigurations) -_find_package(${ARGS}) +find_path(RAYLIB_INCLUDE_DIR raylib.h) -if(raylib_FOUND) - get_filename_component(_raylib_lib_name ${raylib_LIBRARY} NAME) +find_library(RAYLIB_LIBRARY_DEBUG NAMES raylib libraylib raylib_static NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(RAYLIB_LIBRARY_RELEASE NAMES raylib libraylib raylib_static NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) - set(raylib_LIBRARY - debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/${_raylib_lib_name} - optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/${_raylib_lib_name} - ) +select_library_configurations(RAYLIB) - set(raylib_LIBRARIES ${raylib_LIBRARY}) -endif() +set(RAYLIB_INCLUDE_DIRS ${RAYLIB_INCLUDE_DIR}) +set(RAYLIB_LIBRARIES ${RAYLIB_LIBRARY}) diff --git a/ports/raylib/vcpkg.json b/ports/raylib/vcpkg.json new file mode 100644 index 00000000000000..f63f9a7ea9cdf3 --- /dev/null +++ b/ports/raylib/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "raylib", + "version-semver": "3.7.0", + "port-version": 1, + "description": "A simple and easy-to-use library to enjoy videogames programming", + "homepage": "https://github.com/raysan5/raylib", + "supports": "!(arm | uwp)", + "default-features": [ + "use-audio" + ], + "features": { + "hidpi": { + "description": "Support high-DPI displays" + }, + "use-audio": { + "description": "Build raylib with audio module" + } + } +} diff --git a/ports/rbdl-orb/portfile.cmake b/ports/rbdl-orb/portfile.cmake new file mode 100644 index 00000000000000..02da8be0784ad8 --- /dev/null +++ b/ports/rbdl-orb/portfile.cmake @@ -0,0 +1,42 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/rbdl/copyright") + message(FATAL_ERROR "${PORT} conflict with rbdl, please remove rbdl before install ${PORT}.") +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RBDL_STATIC) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ORB-HD/rbdl-orb + REF b22abab856a90dbc62e6b2e79f148bd383b5ce43 + SHA512 744a60145243454a9d148971d998ae7a3cc5b9d66131b5d6f3c7be80d6c9ef8b8bf4390b9d1b90b14be6c619c2e1d14c7c6104b3ca6e606e22e3581b548e4f9d + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH PARSER_SOURCE_PATH + REPO ORB-HD/URDF_Parser + REF 0f3310d766c658b72d54560833012c8fe63ce9d7 + SHA512 6cd8e300cc47b5a5370efb5a4cd843a1621e2832b790daedc1e260ba5bbcaaabdbcddce239f93c3900258093d483d332110ba7e9f0b4b6cda64ce51b6cf2365d +) +if(NOT EXISTS "${SOURCE_PATH}/addons/urdfreader/thirdparty/urdfparser/CMakeLists.txt") + file(REMOVE_RECURSE "${SOURCE_PATH}/addons/urdfreader/thirdparty/urdfparser") + file(RENAME "${PARSER_SOURCE_PATH}" "${SOURCE_PATH}/addons/urdfreader/thirdparty/urdfparser") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DRBDL_BUILD_STATIC=${RBDL_STATIC} + -DRBDL_BUILD_ADDON_LUAMODEL=ON + -DRBDL_BUILD_ADDON_GEOMETRY=ON + -DRBDL_BUILD_ADDON_URDFREADER=ON + -DRBDL_BUILD_EXECUTABLES=OFF +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/rbdl-orb/vcpkg.json b/ports/rbdl-orb/vcpkg.json new file mode 100644 index 00000000000000..8b460557a64d70 --- /dev/null +++ b/ports/rbdl-orb/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "rbdl-orb", + "version": "3.0.0", + "port-version": 1, + "description": "Rigid Body Dynamics Library - ORB", + "homepage": "https://github.com/orb-hd/rbdl-orb", + "dependencies": [ + "boost", + "eigen3", + "lua", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/rbdl/001_x64_number_of_sections_exceeded_in_object_file_patch.diff b/ports/rbdl/001_x64_number_of_sections_exceeded_in_object_file_patch.diff new file mode 100644 index 00000000000000..8aaf4d38439248 --- /dev/null +++ b/ports/rbdl/001_x64_number_of_sections_exceeded_in_object_file_patch.diff @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2db532da..42c004380 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -112,6 +112,10 @@ SET ( RBDL_SOURCES + src/Kinematics.cc + ) + ++IF (MSVC) ++ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") ++ENDIF (MSVC) ++ + IF (MSVC AND NOT RBDL_BUILD_STATIC) + MESSAGE (FATAL_ERROR, "Compiling RBDL as a DLL currently not supported. Please enable RBDL_BUILD_STATIC.") + ENDIF (MSVC AND NOT RBDL_BUILD_STATIC) diff --git a/ports/rbdl/portfile.cmake b/ports/rbdl/portfile.cmake new file mode 100644 index 00000000000000..362bb19bdd5de6 --- /dev/null +++ b/ports/rbdl/portfile.cmake @@ -0,0 +1,29 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/rbdl-orb/copyright") + message(FATAL_ERROR "${PORT} conflict with rbdl-orb, please remove rbdl-orb before install ${PORT}.") +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RBDL_STATIC) + +vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO rbdl/rbdl + REF v2.6.0 + SHA512 7b5fd03c0090277f295a28a1ff0542cd8cff76dda4379b3edc61ca3d868bf77d8b4882f81865fdffd0cf756c613fe55238b29a83bc163fc32aa94aa9d5781480 + HEAD_REF master + PATCHES 001_x64_number_of_sections_exceeded_in_object_file_patch.diff +) + + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DRBDL_BUILD_STATIC=${RBDL_STATIC} +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/rbdl/vcpkg.json b/ports/rbdl/vcpkg.json new file mode 100644 index 00000000000000..ee07f6de7664e3 --- /dev/null +++ b/ports/rbdl/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "rbdl", + "version": "2.6.0", + "port-version": 1, + "description": "Rigid Body Dynamics Library", + "homepage": "https://github.com/rbdl/rbdl", + "dependencies": [ + "eigen3", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL deleted file mode 100644 index d8ff925d80fe3f..00000000000000 --- a/ports/re2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: re2 -Version: 2019-05-07-2 -Homepage: https://github.com/google/re2 -Description: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index 690889c70f6943..7d646cd287bc31 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/re2 - REF cd23be77c716bf75ebb3ddc07fa3ef0c943da6d2 - SHA512 c307fc9294497dc3b4ae95db117f310e0db8f91a90c32bb316fe7e32414b2ade48264471e7a7bb0860aa9b0afe7dd460dadc552b1173ac35235ad3624c6f2ed5 + REF 2020-10-01 + SHA512 cd620878ffa6d4e47f1583f27a179f6520fc1226554bd7c0e104d3d45b2bee70873c0d661e87eb4a9d912b58f86f115766c35d08e124f5f67ddcc3b50535f726 HEAD_REF master ) diff --git a/ports/re2/vcpkg.json b/ports/re2/vcpkg.json new file mode 100644 index 00000000000000..9e8765d197916c --- /dev/null +++ b/ports/re2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "re2", + "version-string": "2020-10-01", + "port-version": 1, + "description": "RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.", + "homepage": "https://github.com/google/re2" +} diff --git a/ports/readerwriterqueue/CONTROL b/ports/readerwriterqueue/CONTROL deleted file mode 100644 index 42feb27255c3cf..00000000000000 --- a/ports/readerwriterqueue/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: readerwriterqueue -Version: 1.0.0-1 -Description: A single-producer, single-consumer lock-free queue diff --git a/ports/readerwriterqueue/portfile.cmake b/ports/readerwriterqueue/portfile.cmake index 2b05e98141fddd..859425cf5fb12e 100644 --- a/ports/readerwriterqueue/portfile.cmake +++ b/ports/readerwriterqueue/portfile.cmake @@ -1,15 +1,12 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cameron314/readerwriterqueue - REF v1.0.1 - SHA512 cb1cc0add78ec6994799c5b3406d310bfcdad74756a6995404d9ea659b7fc6cb7f2b3667c2e3fc0cfcb7ad9c376744c6a3988cb9cc4e0ae0d59ff5dd818d7f11 + REF 09732844aff873e8ec489e9005c775b6b1c58fa2 # v1.0.5 + SHA512 81a8e95766cfdb8828c9c311898bec17400f8f508cb398f3f2f367a470b42f9dcebf7ee327267d3dc35f98d0ad22732f0c3fca16074840fb032dfc576348c802 HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/readerwriterqueue RENAME copyright) - file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/readerwriterqueue) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/readerwriterqueue/vcpkg.json b/ports/readerwriterqueue/vcpkg.json new file mode 100644 index 00000000000000..4b525aca78b2f3 --- /dev/null +++ b/ports/readerwriterqueue/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "readerwriterqueue", + "version-semver": "1.0.5", + "description": "A single-producer, single-consumer lock-free queue", + "homepage": "https://github.com/cameron314/readerwriterqueue" +} diff --git a/ports/readline-win32/CONTROL b/ports/readline-win32/CONTROL deleted file mode 100644 index f8beab3d931f1e..00000000000000 --- a/ports/readline-win32/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: readline-win32 -Version: 5.0-2 -Description: Implementation of readline for Windows Desktop -Homepage: https://github.com/lltcggie \ No newline at end of file diff --git a/ports/readline-win32/portfile.cmake b/ports/readline-win32/portfile.cmake index 51ad377e77a6b3..c6fa9435f536e3 100644 --- a/ports/readline-win32/portfile.cmake +++ b/ports/readline-win32/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lltcggie/readline @@ -8,13 +6,11 @@ vcpkg_from_github( HEAD_REF master ) -set(SOURCE_PATH "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src") - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src/readline/5.0/readline-5.0-src) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/src/readline/5.0/readline-5.0-src) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/src/readline/5.0/readline-5.0-src PREFER_NINJA ) @@ -22,10 +18,9 @@ vcpkg_install_cmake() # Copy headers file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/readline) -file(GLOB headers "${SOURCE_PATH}/*.h") +file(GLOB headers "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src/*.h") file(COPY ${headers} DESTINATION ${CURRENT_PACKAGES_DIR}/include/readline) vcpkg_copy_pdbs() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/src/readline/5.0/readline-5.0-src/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/readline-win32/vcpkg.json b/ports/readline-win32/vcpkg.json new file mode 100644 index 00000000000000..86c8d73046ca32 --- /dev/null +++ b/ports/readline-win32/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "readline-win32", + "version-string": "5.0", + "port-version": 3, + "description": "Implementation of readline for Windows Desktop", + "homepage": "https://github.com/lltcggie" +} diff --git a/ports/readline/CONTROL b/ports/readline/CONTROL deleted file mode 100644 index 4fdb10939fb944..00000000000000 --- a/ports/readline/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: readline -Version: 0 -Description: GNU readline and history libraries -Build-Depends: readline-win32 (windows) diff --git a/ports/readline/vcpkg.json b/ports/readline/vcpkg.json new file mode 100644 index 00000000000000..7dba01a74c9b3a --- /dev/null +++ b/ports/readline/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "readline", + "version-string": "0", + "port-version": 1, + "description": "GNU readline and history libraries", + "supports": "!uwp", + "dependencies": [ + { + "name": "readline-win32", + "platform": "windows" + } + ] +} diff --git a/ports/readosm/CONTROL b/ports/readosm/CONTROL deleted file mode 100644 index caf32bf4b48a8c..00000000000000 --- a/ports/readosm/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: readosm -Version: 1.1.0-1 -Homepage: https://www.gaia-gis.it/gaia-sins/readosm-sources -Description: ReadOSM is an open source library to extract valid data from within an Open Street Map input file (.osm or .osm.pbf) -Build-Depends: expat, zlib diff --git a/ports/readosm/fix-makefiles.patch b/ports/readosm/fix-makefiles.patch index 3904b5136aa488..ea78af8572c730 100644 --- a/ports/readosm/fix-makefiles.patch +++ b/ports/readosm/fix-makefiles.patch @@ -1,13 +1,13 @@ diff --git a/makefile.vc b/makefile.vc -index 791aedf..d294548 100644 +index 8edb536b9..33fd83e35 100644 --- a/makefile.vc +++ b/makefile.vc @@ -8,7 +8,7 @@ LIBOBJ = src\readosm.obj src\osmxml.obj \ src\protobuf.obj src\osm_objects.obj READOSM_DLL = readosm$(VERSION).dll --CFLAGS = /nologo -IC:\OSGeo4W\include -Iheaders $(OPTFLAGS) -+CFLAGS = /nologo -I$(INSTALLED_ROOT)\include -Iheaders $(OPTFLAGS) +-CFLAGS = /nologo -I. -Iheaders -IC:\OSGeo4W\include $(OPTFLAGS) ++CFLAGS = /nologo -I. -Iheaders -I$(INSTALLED_ROOT)\include $(OPTFLAGS) default: all @@ -15,7 +15,7 @@ index 791aedf..d294548 100644 $(READOSM_DLL): readosm_i.lib readosm_i.lib: $(LIBOBJ) -- link /debug /dll /out:$(READOSM_DLL) \ +- link /dll /out:$(READOSM_DLL) \ + link $(LINK_FLAGS) /dll /out:$(READOSM_DLL) \ /implib:readosm_i.lib $(LIBOBJ) \ - C:\OSGeo4w\lib\libexpat.lib C:\OSGeo4w\lib\zlib.lib @@ -32,6 +32,7 @@ index 791aedf..d294548 100644 del *.pdb install: all + diff --git a/nmake.opt b/nmake.opt index 5e45c0e..61c44f9 100644 --- a/nmake.opt diff --git a/ports/readosm/fix-version-macro.patch b/ports/readosm/fix-version-macro.patch deleted file mode 100644 index b091b33597974a..00000000000000 --- a/ports/readosm/fix-version-macro.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/readosm.c b/src/readosm.c -index e1dda27..7977339 100644 ---- a/src/readosm.c -+++ b/src/readosm.c -@@ -50,7 +50,7 @@ - - #if defined(_WIN32) && !defined(__MINGW32__) - /* MSVC: avoiding to include at all config.h */ --#define VERSION 1.1.0 -+#define VERSION "1.1.0" - #else - #include "config.h" - #endif diff --git a/ports/readosm/portfile.cmake b/ports/readosm/portfile.cmake index 5bd5a134ffe5e5..9316b7d853c153 100644 --- a/ports/readosm/portfile.cmake +++ b/ports/readosm/portfile.cmake @@ -1,86 +1,89 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/readosm-1.1.0) +set(READOSM_VERSION_STR "1.1.0a") vcpkg_download_distfile(ARCHIVE - URLS "http://www.gaia-gis.it/gaia-sins/readosm-sources/readosm-1.1.0.tar.gz" - FILENAME "readosm-1.1.0.tar.gz" - SHA512 d3581f564c4461c6a1a3d5fd7d18a262c884b2ac935530064bfaebd6c05d692fb92cc600fb40e87e03f7160ebf0eeeb05f51a0e257935d056b233fe28fc01a11 + URLS "http://www.gaia-gis.it/gaia-sins/readosm-sources/readosm-${READOSM_VERSION_STR}.tar.gz" + FILENAME "readosm-${READOSM_VERSION_STR}.tar.gz" + SHA512 ec8516cdd0b02027cef8674926653f8bc76e2082c778b02fb2ebcfa6d01e21757aaa4fd5d5104059e2f5ba97190183e60184f381bfd592a635805aa35cd7a682 ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-version-macro.patch -) - -find_program(NMAKE nmake) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-makefiles.patch + ) -set(LIBS_ALL_DBG "\"${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib\" \"${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib\"") -set(LIBS_ALL_REL "\"${CURRENT_INSTALLED_DIR}/lib/expat.lib\" \"${CURRENT_INSTALLED_DIR}/lib/zlib.lib\"") - -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(CL_FLAGS_DBG "/MDd /Zi") - set(CL_FLAGS_REL "/MD /Ox") -else() - set(CL_FLAGS_DBG "/MTd /Zi") - set(CL_FLAGS_REL "/MT /Ox") -endif() - -################ -# Debug build -################ -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CL_FLAGS_DBG "/MDd /Zi") + set(CL_FLAGS_REL "/MD /Ox") + set(EXPAT_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libexpat.lib") + set(EXPAT_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd.lib") + else() + set(CL_FLAGS_DBG "/MTd /Zi") + set(CL_FLAGS_REL "/MT /Ox") + set(EXPAT_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libexpatMD.lib") + set(EXPAT_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatdMD.lib") + endif() - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" - "LIBS_ALL=${LIBS_ALL_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug - ) - vcpkg_copy_pdbs() - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") -endif() + if(VCPKG_TARGET_IS_UWP) + set(UWP_LIBS windowsapp.lib) + set(UWP_LINK_FLAGS /APPCONTAINER) + endif() -################ -# Release build -################ -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Building ${TARGET_TRIPLET}-rel") + set(LIBS_ALL_DBG + "${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \ + ${UWP_LIBS} \ + ${EXPAT_LIBS_DBG}" + ) + set(LIBS_ALL_REL + "${CURRENT_INSTALLED_DIR}/lib/zlib.lib \ + ${UWP_LIBS} \ + ${EXPAT_LIBS_REL}" + ) - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" - "LIBS_ALL=${LIBS_ALL_REL}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-release - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") -endif() + string(REPLACE "/" "\\\\" INST_DIR ${CURRENT_PACKAGES_DIR}) + list(APPEND OPTIONS_RELEASE + "LINK_FLAGS=${UWP_LINK_FLAGS}" "INST_DIR=${INST_DIR}" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" + ) + list(APPEND OPTIONS_DEBUG + "LINK_FLAGS=${UWP_LINK_FLAGS} /debug" "INST_DIR=${INST_DIR}\\debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" + ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/readosm RENAME copyright) + vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_RELEASE + ${OPTIONS_RELEASE} + OPTIONS_DEBUG + ${OPTIONS_DEBUG} + ) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) endif() -endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) # Build in UNIX + vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + ) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + "LIBS=-lpthread -ldl -lstdc++ -lm" + ) + vcpkg_install_make() + vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) +endif() -message(STATUS "Packaging ${TARGET_TRIPLET} done") +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/readosm/vcpkg.json b/ports/readosm/vcpkg.json new file mode 100644 index 00000000000000..f76990a8c98046 --- /dev/null +++ b/ports/readosm/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "readosm", + "version-string": "1.1.0a", + "port-version": 1, + "description": "ReadOSM is an open source library to extract valid data from within an Open Street Map input file (.osm or .osm.pbf)", + "homepage": "https://www.gaia-gis.it/gaia-sins/readosm-sources", + "dependencies": [ + "expat", + "zlib" + ] +} diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL deleted file mode 100644 index 40341f080a3bb6..00000000000000 --- a/ports/realsense2/CONTROL +++ /dev/null @@ -1,12 +0,0 @@ -Source: realsense2 -Version: 2.22.0-1 -Homepage: https://github.com/IntelRealSense/librealsense -Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). - -Feature: tools -Build-Depends: opengl -Description: Build Intel® RealSense™ examples and tools - -Feature: openni2 -Build-Depends: openni2 -Description: Build Intel® RealSense™ OpenNI2 driver diff --git a/ports/realsense2/fix-dependency-glfw3.patch b/ports/realsense2/fix-dependency-glfw3.patch new file mode 100644 index 00000000000000..c11a5cdd1ad091 --- /dev/null +++ b/ports/realsense2/fix-dependency-glfw3.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 16ced1b..ef1b158 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -69,7 +69,7 @@ include(CMake/install_config.cmake) + add_subdirectory(wrappers) + + if (BUILD_EXAMPLES AND BUILD_GLSL_EXTENSIONS) +- find_package(glfw3 3.3 QUIET) ++ find_package(glfw3 CONFIG REQUIRED) + if(NOT TARGET glfw) + message(STATUS "GLFW 3.3 not found; using internal version") + set(GLFW_INSTALL ON CACHE BOOL "" FORCE) diff --git a/ports/realsense2/fix_config_osx.patch b/ports/realsense2/fix_config_osx.patch new file mode 100644 index 00000000000000..d96f4bea58b989 --- /dev/null +++ b/ports/realsense2/fix_config_osx.patch @@ -0,0 +1,12 @@ +diff --git a/CMake/unix_config.cmake b/CMake/unix_config.cmake +index 3e5929b..57dbe76 100644 +--- a/CMake/unix_config.cmake ++++ b/CMake/unix_config.cmake +@@ -35,7 +35,6 @@ macro(os_set_flags) + + if(APPLE) + set(FORCE_RSUSB_BACKEND ON) +- set(BUILD_WITH_TM2 ON) + endif() + + if(FORCE_RSUSB_BACKEND) diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index decc9b504b273c..3b966e0353e45d 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -1,17 +1,23 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.22.0 - SHA512 7595780c1955a2d4a91df5b70ab6366c672f389bc3d2dcb9f2e78a2ea1fc875c65f878103df483205e17f62dfd024ee5f7ccb15afc5d18978d3c25aa071652ab - HEAD_REF development + REF bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d #v2.42.0 + SHA512 b2a2d24df4bdf4853df626942b1931bbe011a4e3faaa4e3c4bcb3f76506ae8edb955a458219fdc300018e640e2ffe4cd34f459786b909cf9aab71a767d691178 + HEAD_REF master PATCHES - "fix_openni2.patch" + fix_openni2.patch + fix-dependency-glfw3.patch + fix_config_osx.patch ) +file(COPY ${SOURCE_PATH}/src/win7/drivers/IntelRealSense_D400_series_win7.inf DESTINATION ${SOURCE_PATH}) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tm2 BUILD_WITH_TM2 +) + set(BUILD_TOOLS OFF) if("tools" IN_LIST FEATURES) set(BUILD_TOOLS ON) @@ -22,17 +28,22 @@ if(("openni2" IN_LIST FEATURES) AND (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")) set(BUILD_OPENNI2_BINDINGS ON) endif() +set(PLATFORM_OPTIONS) +if (VCPKG_TARGET_IS_ANDROID) + list(APPEND PLATFORM_OPTIONS -DFORCE_RSUSB_BACKEND=ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} -DENFORCE_METADATA=ON - -DBUILD_WITH_TM2=OFF -DBUILD_WITH_OPENMP=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_WITH_STATIC_CRT=${BUILD_CRT_LINKAGE} -DBUILD_OPENNI2_BINDINGS=${BUILD_OPENNI2_BINDINGS} -DOPENNI2_DIR=${CURRENT_INSTALLED_DIR}/include/openni2 + ${PLATFORM_OPTIONS} OPTIONS_RELEASE -DBUILD_EXAMPLES=${BUILD_TOOLS} -DBUILD_GRAPHICAL_EXAMPLES=${BUILD_TOOLS} @@ -47,7 +58,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/realsense2) vcpkg_copy_pdbs() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) @@ -68,13 +78,18 @@ if(BUILD_TOOLS) if(NOT BINS) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() + + # Issue#7109, remove mismatched dlls and libs when build with tools, this workaround should be removed when the post-build checks related feature implemented. + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/realsense2-gl.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/realsense2-gl.dll) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/realsense2-gl.pdb) endif() - if(BUILD_OPENNI2_BINDINGS) - file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/_out/rs2driver* - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers) + file(GLOB RS2DRIVER ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/_out/rs2driver*) + if(RS2DRIVER) + file(COPY ${RS2DRIVER} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers) + endif() endif() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/realsense2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/realsense2/LICENSE ${CURRENT_PACKAGES_DIR}/share/realsense2/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/realsense2/vcpkg.json b/ports/realsense2/vcpkg.json new file mode 100644 index 00000000000000..d14554b308de22 --- /dev/null +++ b/ports/realsense2/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "realsense2", + "version": "2.42.0", + "port-version": 1, + "description": "Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300).", + "homepage": "https://github.com/IntelRealSense/librealsense", + "dependencies": [ + { + "name": "libusb", + "platform": "linux" + } + ], + "features": { + "openni2": { + "description": "Build Intel® RealSense™ OpenNI2 driver", + "dependencies": [ + "openni2" + ] + }, + "tm2": { + "description": "Build Intel® RealSense™ T265 device" + }, + "tools": { + "description": "Build Intel® RealSense™ examples and tools", + "dependencies": [ + "glfw3", + "opengl" + ] + } + } +} diff --git a/ports/recast/CMakeLists.txt b/ports/recast/CMakeLists.txt index 5b54f6e208a621..7ccc0828a1f31b 100644 --- a/ports/recast/CMakeLists.txt +++ b/ports/recast/CMakeLists.txt @@ -1,14 +1,6 @@ cmake_minimum_required(VERSION 3.8) project(recast) -include_directories( - DebugUtils/Include - Detour/Include - DetourCrowd/Include - DetourTileCache/Include - Recast/Include -) - set(SRC DebugUtils/Source/DebugDraw.cpp DebugUtils/Source/DetourDebugDraw.cpp @@ -42,12 +34,30 @@ set(SRC add_library(recast ${SRC}) +target_include_directories( + recast PUBLIC + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ +) + install( TARGETS recast + EXPORT unofficial-recast-config LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) +install(EXPORT unofficial-recast-config DESTINATION share/unofficial-recast) + if(NOT DISABLE_INSTALL_HEADERS) install(DIRECTORY DebugUtils/Include/ DESTINATION include/recast/DebugUtils) install(DIRECTORY Detour/Include/ DESTINATION include/recast/Detour) diff --git a/ports/recast/CONTROL b/ports/recast/CONTROL deleted file mode 100644 index 3726b99d501307..00000000000000 --- a/ports/recast/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: recast -Version: 1.5.1-3 -Homepage: https://github.com/recastnavigation/recastnavigation -Description: Navigation-mesh Toolset for Games diff --git a/ports/recast/portfile.cmake b/ports/recast/portfile.cmake index a84d06e3c07541..11484caa16b9d1 100644 --- a/ports/recast/portfile.cmake +++ b/ports/recast/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -10,16 +8,18 @@ vcpkg_from_github( HEAD_REF master ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA ) -vcpkg_install_cmake() +vcpkg_cmake_install() -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/recast RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-recast CONFIG_PATH share/unofficial-recast) vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL "${SOURCE_PATH}/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/recast/vcpkg.json b/ports/recast/vcpkg.json new file mode 100644 index 00000000000000..5abe9f93b06f5d --- /dev/null +++ b/ports/recast/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "recast", + "version": "1.5.1", + "port-version": 4, + "description": "Navigation-mesh Toolset for Games", + "homepage": "https://github.com/recastnavigation/recastnavigation", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/redis-plus-plus/fix-conversion.patch b/ports/redis-plus-plus/fix-conversion.patch new file mode 100644 index 00000000000000..57d6da26e905f8 --- /dev/null +++ b/ports/redis-plus-plus/fix-conversion.patch @@ -0,0 +1,13 @@ +diff --git a/src/sw/redis++/shards.cpp b/src/sw/redis++/shards.cpp +index c5baf5a..08e96cd 100644 +--- a/src/sw/redis++/shards.cpp ++++ b/src/sw/redis++/shards.cpp +@@ -41,7 +41,7 @@ std::pair RedirectionError::_parse_error(const std::string &msg) con + auto host = msg.substr(space_pos + 1, colon_pos - space_pos - 1); + auto port = std::stoi(msg.substr(colon_pos + 1)); + +- return {slot, {host, port}}; ++ return {static_cast(slot), {host, port}}; + } catch (const std::exception &e) { + throw ProtoError("Invalid ASK error message: " + msg); + } diff --git a/ports/redis-plus-plus/fix-ws2-linking-windows.patch b/ports/redis-plus-plus/fix-ws2-linking-windows.patch new file mode 100644 index 00000000000000..06f75083ba3fa5 --- /dev/null +++ b/ports/redis-plus-plus/fix-ws2-linking-windows.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 452cc0f..90932ce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -148,6 +148,7 @@ if(REDIS_PLUS_PLUS_BUILD_SHARED) + target_compile_definitions(${SHARED_LIB} PRIVATE NOMINMAX) + set_target_properties(${SHARED_LIB} PROPERTIES CXX_STANDARD ${REDIS_PLUS_PLUS_CXX_STANDARD}) + set_target_properties(${SHARED_LIB} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) ++ target_link_libraries(${SHARED_LIB} PUBLIC Ws2_32.lib) + else() + target_compile_options(${SHARED_LIB} PRIVATE "-Wall" "-W" "-Werror") + endif() diff --git a/ports/redis-plus-plus/portfile.cmake b/ports/redis-plus-plus/portfile.cmake new file mode 100644 index 00000000000000..7e97b032311edc --- /dev/null +++ b/ports/redis-plus-plus/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sewenew/redis-plus-plus + REF df522812ba4114f1dd3386b81afc2369c82b717d # 1.2.3 + SHA512 2ac59c5416ba85a60061d941787cb3bc2e43042ca0a53829f866448015ed6800c38ecbde3319d9756a70bfba2860732136d89d296382a6b9a675bbe32173f22b + HEAD_REF master + PATCHES + fix-ws2-linking-windows.patch + fix-conversion.patch +) + +if("cxx17" IN_LIST FEATURES) + set(REDIS_PLUS_PLUS_CXX_STANDARD 17) +else() + set(REDIS_PLUS_PLUS_CXX_STANDARD 11) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(REDIS_PLUS_PLUS_BUILD_STATIC ON) + set(REDIS_PLUS_PLUS_BUILD_SHARED OFF) +else() + set(REDIS_PLUS_PLUS_BUILD_STATIC OFF) + set(REDIS_PLUS_PLUS_BUILD_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DREDIS_PLUS_PLUS_USE_TLS=OFF + -DREDIS_PLUS_PLUS_BUILD_STATIC=${REDIS_PLUS_PLUS_BUILD_STATIC} + -DREDIS_PLUS_PLUS_BUILD_SHARED=${REDIS_PLUS_PLUS_BUILD_SHARED} + -DREDIS_PLUS_PLUS_BUILD_TEST=OFF + -DREDIS_PLUS_PLUS_CXX_STANDARD=${REDIS_PLUS_PLUS_CXX_STANDARD} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright ) diff --git a/ports/redis-plus-plus/vcpkg.json b/ports/redis-plus-plus/vcpkg.json new file mode 100644 index 00000000000000..0e61b5d843390c --- /dev/null +++ b/ports/redis-plus-plus/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "redis-plus-plus", + "version-semver": "1.2.3", + "description": "This is a C++ client for Redis. It's based on hiredis, and written in C++ 11", + "homepage": "https://github.com/sewenew/redis-plus-plus", + "dependencies": [ + "hiredis" + ], + "features": { + "cxx17": { + "description": "Build redis-plus-plus with cxx 17 standard" + } + } +} diff --git a/ports/refl-cpp/portfile.cmake b/ports/refl-cpp/portfile.cmake new file mode 100644 index 00000000000000..9f4fc7bfa41409 --- /dev/null +++ b/ports/refl-cpp/portfile.cmake @@ -0,0 +1,13 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO veselink1/refl-cpp + REF v0.12.0 + SHA512 e9103ac491cc2d06cd5223a55094473f479eabd49c733d2d4a11e560f3063474e34785e2681a4c5fcec3f2912c3cccefca7fa1c40bd95fd01f4d40df6c322648 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/refl.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/refl-cpp/vcpkg.json b/ports/refl-cpp/vcpkg.json new file mode 100644 index 00000000000000..4674807c923025 --- /dev/null +++ b/ports/refl-cpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "refl-cpp", + "version-string": "0.12.0", + "port-version": 1, + "description": "A compile-time reflection library for modern C++ with support for overloads, templates, attributes and proxies", + "homepage": "https://github.com/veselink1/refl-cpp" +} diff --git a/ports/refprop-headers/CONTROL b/ports/refprop-headers/CONTROL deleted file mode 100644 index c9356556e2bc3c..00000000000000 --- a/ports/refprop-headers/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: refprop-headers -Version: 2017-11-7-882aec454b2bc3d5323b8691736ff09c288f4ed6 -Homepage: https://github.com/CoolProp/REFPROP-headers -Description: The REFPROP Headers diff --git a/ports/refprop-headers/portfile.cmake b/ports/refprop-headers/portfile.cmake index 4b6274e120ac67..befb0184be48b9 100644 --- a/ports/refprop-headers/portfile.cmake +++ b/ports/refprop-headers/portfile.cmake @@ -1,11 +1,8 @@ -include(vcpkg_common_functions) -set(PORT_COMMIT 882aec454b2bc3d5323b8691736ff09c288f4ed6) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CoolProp/REFPROP-headers - REF ${PORT_COMMIT} - SHA512 23ee3df4ffe21b2d790efa27a1b8ea5fa4fce0a274d78e493a2d71043670420e19216f925d23d04f6139ca084a21b97028bd2547f3dbd00ffbb33d0c0bbfece5 + REF 8df35c7cb557d385bb66431e92e836104a63a33c + SHA512 4424d036c3cd6c9028fffbeda0919d38f4b0a290fb141c6d1ff26c70cd416d9a0d2e1584c51b6ad2e989e84a8a71660f62dadaa88bb22428972165ba01131cb2 HEAD_REF master ) diff --git a/ports/refprop-headers/vcpkg.json b/ports/refprop-headers/vcpkg.json new file mode 100644 index 00000000000000..f0b73813b5494e --- /dev/null +++ b/ports/refprop-headers/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "refprop-headers", + "version-string": "2019-04-14", + "port-version": 1, + "description": "The REFPROP Headers", + "homepage": "https://github.com/CoolProp/REFPROP-headers" +} diff --git a/ports/replxx/add-stdexcept.patch b/ports/replxx/add-stdexcept.patch new file mode 100644 index 00000000000000..51fe01447f0dd0 --- /dev/null +++ b/ports/replxx/add-stdexcept.patch @@ -0,0 +1,17 @@ +diff --git a/src/io.cxx b/src/io.cxx +index a098867..6159e4b 100644 +--- a/src/io.cxx ++++ b/src/io.cxx +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include + + #ifdef _WIN32 +@@ -671,4 +672,3 @@ int Terminal::read_verbatim( char32_t* buffer_, int size_ ) { + #endif + + } +- diff --git a/ports/replxx/portfile.cmake b/ports/replxx/portfile.cmake new file mode 100644 index 00000000000000..cbf2c646a78987 --- /dev/null +++ b/ports/replxx/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AmokHuginnsson/replxx + REF 45696c250ce39ab21dedeea962b94d7827007a8c + SHA512 7beec508fa3049fe5a736a487728506d646d26d7194ef7453fc07bceade1982430808fab0a10ca9b1c43a8b87bf3a973f5cfe4aa22ed06927647c9a7244167fd + HEAD_REF master + PATCHES + add-stdexcept.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/replxxConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/replxx/replxxConfig.cmake b/ports/replxx/replxxConfig.cmake new file mode 100644 index 00000000000000..680ffc3eea630b --- /dev/null +++ b/ports/replxx/replxxConfig.cmake @@ -0,0 +1,20 @@ +function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + set(${NAMESPACE}_${LIB_NAME}_FOUND 1) +endfunction() + +get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) + +if (CMAKE_HOST_WIN32) + set_library_target("REPLXX" "replxx" "${ROOT}/debug/lib/replxx-d.lib" "${ROOT}/lib/replxx.lib" "${ROOT}/include/") +else () + set_library_target("REPLXX" "replxx" "${ROOT}/debug/lib/libreplxx-d.a" "${ROOT}/lib/libreplxx.a" "${ROOT}/include/") +endif () diff --git a/ports/replxx/usage b/ports/replxx/usage new file mode 100644 index 00000000000000..5be648855a9ed1 --- /dev/null +++ b/ports/replxx/usage @@ -0,0 +1,4 @@ +The package replxx is compatible with built-in CMake targets: + + FIND_PACKAGE(replxx REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE REPLXX::replxx) diff --git a/ports/replxx/vcpkg.json b/ports/replxx/vcpkg.json new file mode 100644 index 00000000000000..7e84aebc603db4 --- /dev/null +++ b/ports/replxx/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "replxx", + "version-string": "0.0.2", + "port-version": 3, + "description": "A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters.", + "homepage": "https://github.com/AmokHuginnsson/replxx", + "supports": "!uwp" +} diff --git a/ports/reproc/CONTROL b/ports/reproc/CONTROL deleted file mode 100644 index 07bf0e6ec2161e..00000000000000 --- a/ports/reproc/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: reproc -Version: 6.0.0-2 -Description: Cross-platform library that simplifies working with external CLI applications from C and C++ diff --git a/ports/reproc/portfile.cmake b/ports/reproc/portfile.cmake index f569340dfca7ce..8d6c0370682875 100644 --- a/ports/reproc/portfile.cmake +++ b/ports/reproc/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DaanDeMeyer/reproc - REF v6.0.0 - SHA512 482eb7b52961878877d1e4a4f1e1a5a867ff5b83f0df3ce47c0eb68f43eabcde720ea7ccb2eeb960dbc29fc61c888db62751984425e9b27c7498dfa4441aa801 + REF 8f70f97af263dd3f41bdc07f6f04e92436b1b55a # v14.2.1 + SHA512 98bc8cb8aac5da83407ce23911b97840180d0d6f0321ac68ab035717ab84dcf312f886477cd393e0ac322993a3d1acaa3bfdabb4fe8131916df53658d5a59adf HEAD_REF master ) @@ -13,20 +11,23 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DREPROC++=ON - -DREPROC++_INSTALL=ON - -DREPROC_INSTALL=ON + -DREPROC_INSTALL_PKGCONFIG=OFF + -DREPROC_INSTALL_CMAKECONFIGDIR=share ) vcpkg_install_cmake() -file(GLOB REPROC_CMAKE_FILES ${CURRENT_PACKAGES_DIR}/lib/cmake/reproc++/*) -file(INSTALL ${REPROC_CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/reproc++) -file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/reproc++/reproc++-targets-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/reproc++) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/reproc) - -# Debug file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle License -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/reproc) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/reproc/LICENSE ${CURRENT_PACKAGES_DIR}/share/reproc/copyright) +foreach(TARGET reproc reproc++) + vcpkg_fixup_cmake_targets( + CONFIG_PATH share/${TARGET} + TARGET_PATH share/${TARGET} + ) +endforeach() + +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/ports/reproc/vcpkg.json b/ports/reproc/vcpkg.json new file mode 100644 index 00000000000000..bf51252e324784 --- /dev/null +++ b/ports/reproc/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "reproc", + "version-string": "14.2.1", + "port-version": 1, + "description": "Cross-platform (C99/C++11) process library", + "homepage": "https://github.com/DaanDeMeyer/reproc" +} diff --git a/ports/rest-rpc/portfile.cmake b/ports/rest-rpc/portfile.cmake new file mode 100644 index 00000000000000..551ff14288eefe --- /dev/null +++ b/ports/rest-rpc/portfile.cmake @@ -0,0 +1,28 @@ +if (EXISTS ${CURRENT_INSTALLED_DIR}/include/msgpack/pack.h) + message(FATAL_ERROR "Cannot install ${PORT} when msgpack is already installed, please remove msgpack using \"./vcpkg remove msgpack:${TARGET_TRIPLET}\"") +endif() + +# header-only library +set(RESTRPC_VERSION V0.07) +set(RESTRPC_HASH 148152776c8c4f16e404c62ab3f46618e1817c0b4b186dbcc399c859efd110ed5a207bf56e961c312f80844f696f597068e0abc00e426409d50a2889d30c6d8e) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rest-rpc-${RESTRPC_VERSION}) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO qicosmos/rest_rpc + REF ${RESTRPC_VERSION} + SHA512 ${RESTRPC_HASH} + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/third/msgpack/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/rest_rpc.hpp" + "#include \"rest_rpc/rpc_server.h\"" + "#define ASIO_STANDALONE\n#include \"rest_rpc/rpc_server.h\"" +) + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/rest-rpc/vcpkg.json b/ports/rest-rpc/vcpkg.json new file mode 100644 index 00000000000000..478198e72246ba --- /dev/null +++ b/ports/rest-rpc/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "rest-rpc", + "version-string": "0.07", + "port-version": 2, + "description": "c++11, high performance, cross platform, easy to use rpc framework", + "homepage": "https://github.com/qicosmos/rest_rpc", + "dependencies": [ + "asio" + ] +} diff --git a/ports/restbed/CONTROL b/ports/restbed/CONTROL deleted file mode 100644 index 53f6ea0de04299..00000000000000 --- a/ports/restbed/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: restbed -Version: 4.16-07-28-2018-1 -Description: Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++11 applications. -Build-Depends: asio - -Feature: openssl -Build-Depends: openssl -Description: Secure over the wire communication allowing you to transmit private data online. \ No newline at end of file diff --git a/ports/restbed/add_openssl_support.patch b/ports/restbed/add_openssl_support.patch deleted file mode 100644 index 72d4dc4067c08b..00000000000000 --- a/ports/restbed/add_openssl_support.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/cmake/Findopenssl.cmake b/cmake/Findopenssl.cmake -index 8db9799..626ff55 100644 ---- a/cmake/Findopenssl.cmake -+++ b/cmake/Findopenssl.cmake -@@ -1,24 +1,7 @@ --find_library( ssl_LIBRARY_STATIC libssl.a ssleay32.lib HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) --find_library( crypto_LIBRARY_STATIC libcrypto.a libeay32.lib HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) -- --find_library( ssl_LIBRARY_SHARED libssl.so libssl.dylib ssleay32.dll HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) --find_library( crypto_LIBRARY_SHARED libcrypto.so libcrypto.dylib libeay32.dll HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) -- --find_path( ssl_INCLUDE openssl/ssl.h HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/inc32" "${PROJECT_SOURCE_DIR}/dependency/openssl/include" "/usr/local/opt/openssl/include" "/usr/include" "/usr/local/include" "/opt/local/include" ) -- --if ( ssl_LIBRARY_STATIC AND ssl_LIBRARY_SHARED AND crypto_LIBRARY_STATIC AND crypto_LIBRARY_SHARED ) -- set( OPENSSL_FOUND TRUE ) -- add_definitions( -DBUILD_SSL=TRUE ) -- -- if ( APPLE AND BUILD_SSL ) -- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" ) -- endif( ) -- -- message( STATUS "Found OpenSSL include at: ${ssl_INCLUDE}" ) -- message( STATUS "Found OpenSSL library at: ${ssl_LIBRARY_STATIC}" ) -- message( STATUS "Found OpenSSL library at: ${ssl_LIBRARY_SHARED}" ) -- message( STATUS "Found Crypto library at: ${crypto_LIBRARY_STATIC}" ) -- message( STATUS "Found Crypto library at: ${crypto_LIBRARY_SHARED}" ) --else ( ) -- message( FATAL_ERROR "Failed to locate OpenSSL dependency. see restbed/dependency/openssl; ./config shared; make all" ) --endif ( ) -+if (BUILD_SSL) -+ set( OPENSSL_FOUND TRUE ) -+ add_definitions( -DBUILD_SSL=TRUE ) -+ if ( APPLE AND BUILD_SSL ) -+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" ) -+ endif( ) -+endif() -\ No newline at end of file diff --git a/ports/restbed/asio-1-18-0-deprecations.patch b/ports/restbed/asio-1-18-0-deprecations.patch new file mode 100644 index 00000000000000..7007775a2c9dd7 --- /dev/null +++ b/ports/restbed/asio-1-18-0-deprecations.patch @@ -0,0 +1,112 @@ +diff --git a/source/corvusoft/restbed/detail/http_impl.cpp b/source/corvusoft/restbed/detail/http_impl.cpp +index 77f918a..08d2c9c 100644 +--- a/source/corvusoft/restbed/detail/http_impl.cpp ++++ b/source/corvusoft/restbed/detail/http_impl.cpp +@@ -153,7 +153,7 @@ namespace restbed + { + #endif + auto socket = make_shared< tcp::socket >( *request->m_pimpl->m_io_service ); +- request->m_pimpl->m_socket = make_shared< SocketImpl >( socket ); ++ request->m_pimpl->m_socket = make_shared< SocketImpl >( *request->m_pimpl->m_io_service, socket ); + #ifdef BUILD_SSL + } + +@@ -196,7 +196,7 @@ namespace restbed + } + + socket->set_verify_callback( asio::ssl::rfc2818_verification( request->get_host( ) ) ); +- request->m_pimpl->m_socket = make_shared< SocketImpl >( socket ); ++ request->m_pimpl->m_socket = make_shared< SocketImpl >( *request->m_pimpl->m_io_service, socket ); + } + #endif + void HttpImpl::request_handler( const error_code& error, const shared_ptr< Request >& request, const function< void ( const shared_ptr< Request >, const shared_ptr< Response > ) >& callback ) +diff --git a/source/corvusoft/restbed/detail/service_impl.cpp b/source/corvusoft/restbed/detail/service_impl.cpp +index 6772af1..87be1ce 100644 +--- a/source/corvusoft/restbed/detail/service_impl.cpp ++++ b/source/corvusoft/restbed/detail/service_impl.cpp +@@ -147,7 +147,7 @@ namespace restbed + + void ServiceImpl::http_listen( void ) const + { +- auto socket = make_shared< tcp::socket >( m_acceptor->get_io_service( ) ); ++ auto socket = make_shared< tcp::socket >( *m_io_service ); + m_acceptor->async_accept( *socket, bind( &ServiceImpl::create_session, this, socket, _1 ) ); + } + +@@ -273,7 +273,7 @@ namespace restbed + + void ServiceImpl::https_listen( void ) const + { +- auto socket = make_shared< asio::ssl::stream< tcp::socket > >( m_ssl_acceptor->get_io_service( ), *m_ssl_context ); ++ auto socket = make_shared< asio::ssl::stream< tcp::socket > >( *m_io_service, *m_ssl_context ); + m_ssl_acceptor->async_accept( socket->lowest_layer( ), bind( &ServiceImpl::create_ssl_session, this, socket, _1 ) ); + } + +@@ -289,7 +289,7 @@ namespace restbed + return; + } + +- auto connection = make_shared< SocketImpl >( socket, m_logger ); ++ auto connection = make_shared< SocketImpl >( *m_io_service, socket, m_logger ); + connection->set_timeout( m_settings->get_connection_timeout( ) ); + if (m_settings->get_keep_alive()) { + connection->set_keep_alive( m_settings->get_keep_alive_start(), +@@ -530,7 +530,7 @@ namespace restbed + { + if ( not error ) + { +- auto connection = make_shared< SocketImpl >( socket, m_logger ); ++ auto connection = make_shared< SocketImpl >( *m_io_service, socket, m_logger ); + connection->set_timeout( m_settings->get_connection_timeout( ) ); + if (m_settings->get_keep_alive()) { + connection->set_keep_alive( m_settings->get_keep_alive_start(), +diff --git a/source/corvusoft/restbed/detail/socket_impl.cpp b/source/corvusoft/restbed/detail/socket_impl.cpp +index fac0082..942eefa 100644 +--- a/source/corvusoft/restbed/detail/socket_impl.cpp ++++ b/source/corvusoft/restbed/detail/socket_impl.cpp +@@ -49,12 +49,12 @@ namespace restbed + { + namespace detail + { +- SocketImpl::SocketImpl( const shared_ptr< tcp::socket >& socket, const shared_ptr< Logger >& logger ) : m_error_handler( nullptr ), ++ SocketImpl::SocketImpl( asio::io_context& context, const shared_ptr< tcp::socket >& socket, const shared_ptr< Logger >& logger ) : m_error_handler( nullptr ), + m_is_open( socket->is_open( ) ), + m_pending_writes( ), + m_logger( logger ), + m_timeout( 0 ), +- m_io_service( socket->get_io_service( ) ), ++ m_io_service( context ), + m_timer( make_shared< asio::steady_timer >( m_io_service ) ), + m_strand( make_shared< io_service::strand > ( m_io_service ) ), + m_resolver( nullptr ), +@@ -66,12 +66,12 @@ namespace restbed + return; + } + #ifdef BUILD_SSL +- SocketImpl::SocketImpl( const shared_ptr< asio::ssl::stream< tcp::socket > >& socket, const shared_ptr< Logger >& logger ) : m_error_handler( nullptr ), ++ SocketImpl::SocketImpl( asio::io_context& context, const shared_ptr< asio::ssl::stream< tcp::socket > >& socket, const shared_ptr< Logger >& logger ) : m_error_handler( nullptr ), + m_is_open( socket->lowest_layer( ).is_open( ) ), + m_pending_writes( ), + m_logger( logger ), + m_timeout( 0 ), +- m_io_service( socket->get_io_service( ) ), ++ m_io_service( context ), + m_timer( make_shared< asio::steady_timer >( m_io_service ) ), + m_strand( make_shared< io_service::strand > ( m_io_service ) ), + m_resolver( nullptr ), +diff --git a/source/corvusoft/restbed/detail/socket_impl.hpp b/source/corvusoft/restbed/detail/socket_impl.hpp +index 41aec42..0977eba 100644 +--- a/source/corvusoft/restbed/detail/socket_impl.hpp ++++ b/source/corvusoft/restbed/detail/socket_impl.hpp +@@ -53,9 +53,9 @@ namespace restbed + //Definitions + + //Constructors +- SocketImpl( const std::shared_ptr< asio::ip::tcp::socket >& socket, const std::shared_ptr< Logger >& logger = nullptr ); ++ SocketImpl( asio::io_context& context, const std::shared_ptr< asio::ip::tcp::socket >& socket, const std::shared_ptr< Logger >& logger = nullptr ); + #ifdef BUILD_SSL +- SocketImpl( const std::shared_ptr< asio::ssl::stream< asio::ip::tcp::socket > >& socket, const std::shared_ptr< Logger >& logger = nullptr ); ++ SocketImpl( asio::io_context& context, const std::shared_ptr< asio::ssl::stream< asio::ip::tcp::socket > >& socket, const std::shared_ptr< Logger >& logger = nullptr ); + #endif + ~SocketImpl( void ) = default; + diff --git a/ports/restbed/cmake.patch b/ports/restbed/cmake.patch deleted file mode 100644 index 5d73409f9b8b78..00000000000000 --- a/ports/restbed/cmake.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b66143e..85c5315 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -42,7 +42,9 @@ endif ( ) - set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake" ) - - find_package( asio REQUIRED ) -+if(NOT DISABLE_TESTS) - find_package( catch REQUIRED ) -+endif() - if ( BUILD_SSL ) - find_package( openssl REQUIRED ) - endif ( ) -@@ -54,6 +56,7 @@ include_directories( ${INCLUDE_DIR} SYSTEM ${asio_INCLUDE} ${kashmir_INCLUDE} ${ - # - file( GLOB_RECURSE MANIFEST "${SOURCE_DIR}/*.cpp" ) - -+if(NOT BUILD_SHARED_LIBS) - set( STATIC_LIBRARY_NAME "${PROJECT_NAME}-static" ) - add_library( ${STATIC_LIBRARY_NAME} STATIC ${MANIFEST} ) - set_property( TARGET ${STATIC_LIBRARY_NAME} PROPERTY CXX_STANDARD 11 ) -@@ -64,7 +67,9 @@ if ( BUILD_SSL ) - else ( ) - target_link_libraries( ${STATIC_LIBRARY_NAME} ) - endif ( ) -+endif() - -+if(BUILD_SHARED_LIBS) - set( SHARED_LIBRARY_NAME "${PROJECT_NAME}-shared" ) - add_library( ${SHARED_LIBRARY_NAME} SHARED ${MANIFEST} ) - set_property( TARGET ${SHARED_LIBRARY_NAME} PROPERTY CXX_STANDARD 11 ) -@@ -76,12 +81,15 @@ if ( BUILD_SSL ) - else ( ) - target_link_libraries( ${SHARED_LIBRARY_NAME} ) - endif ( ) -+endif() - -+if(NOT DISABLE_TESTS) - enable_testing( ) - add_subdirectory( "${PROJECT_SOURCE_DIR}/test/unit" ) - add_subdirectory( "${PROJECT_SOURCE_DIR}/test/feature" ) - add_subdirectory( "${PROJECT_SOURCE_DIR}/test/regression" ) - add_subdirectory( "${PROJECT_SOURCE_DIR}/test/integration" ) -+endif() - - # - # Install -@@ -90,5 +98,8 @@ file( GLOB ARTIFACTS "${SOURCE_DIR}/*.hpp" ) - - install( FILES "${INCLUDE_DIR}/${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_PREFIX}/include" ) - install( FILES ${ARTIFACTS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/corvusoft/${PROJECT_NAME}" ) --install( TARGETS ${STATIC_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) --install( TARGETS ${SHARED_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) -+if(NOT BUILD_SHARED_LIBS) -+install( TARGETS ${STATIC_LIBRARY_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) -+else() -+install( TARGETS ${SHARED_LIBRARY_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) -+endif() diff --git a/ports/restbed/fix-ninja-duplicates.patch b/ports/restbed/fix-ninja-duplicates.patch new file mode 100644 index 00000000000000..9b10148cd18e6e --- /dev/null +++ b/ports/restbed/fix-ninja-duplicates.patch @@ -0,0 +1,67 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2fb74b3..602e05d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,26 +64,33 @@ include_directories( ${INCLUDE_DIR} SYSTEM ${asio_INCLUDE} ${ssl_INCLUDE} ) + # Build + # + file( GLOB_RECURSE MANIFEST "${SOURCE_DIR}/*.cpp" ) +- +-set( STATIC_LIBRARY_NAME "${PROJECT_NAME}-static" ) +-add_library( ${STATIC_LIBRARY_NAME} STATIC ${MANIFEST} ) +-set_property( TARGET ${STATIC_LIBRARY_NAME} PROPERTY CXX_STANDARD 14 ) +-set_property( TARGET ${STATIC_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON ) +-set_target_properties( ${STATIC_LIBRARY_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME} ) +- +-set( SHARED_LIBRARY_NAME "${PROJECT_NAME}-shared" ) +-add_library( ${SHARED_LIBRARY_NAME} SHARED ${MANIFEST} ) +-set_property( TARGET ${SHARED_LIBRARY_NAME} PROPERTY CXX_STANDARD 14 ) +-set_property( TARGET ${SHARED_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON ) +-set_target_properties( ${SHARED_LIBRARY_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME} ) +-set_target_properties( ${SHARED_LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR} VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} ) ++if(NOT BUILD_SHARED_LIBS) ++ set( STATIC_LIBRARY_NAME "${PROJECT_NAME}-static" ) ++ add_library( ${STATIC_LIBRARY_NAME} STATIC ${MANIFEST} ) ++ set_property( TARGET ${STATIC_LIBRARY_NAME} PROPERTY CXX_STANDARD 14 ) ++ set_property( TARGET ${STATIC_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON ) ++ set_target_properties( ${STATIC_LIBRARY_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME} ) ++else() ++ set( SHARED_LIBRARY_NAME "${PROJECT_NAME}-shared" ) ++ add_library( ${SHARED_LIBRARY_NAME} SHARED ${MANIFEST} ) ++ set_property( TARGET ${SHARED_LIBRARY_NAME} PROPERTY CXX_STANDARD 14 ) ++ set_property( TARGET ${SHARED_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON ) ++ set_target_properties( ${SHARED_LIBRARY_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME} ) ++ set_target_properties( ${SHARED_LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR} VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} ) ++endif() + + if ( BUILD_SSL ) +- target_link_libraries( ${SHARED_LIBRARY_NAME} LINK_PRIVATE ${ssl_LIBRARY_SHARED} ${crypto_LIBRARY_SHARED} ) +- target_link_libraries( ${STATIC_LIBRARY_NAME} LINK_PRIVATE ${ssl_LIBRARY_STATIC} ${crypto_LIBRARY_STATIC} ${CMAKE_DL_LIBS} ) ++ if(BUILD_SHARED_LIBS) ++ target_link_libraries( ${SHARED_LIBRARY_NAME} LINK_PRIVATE ${ssl_LIBRARY_SHARED} ${crypto_LIBRARY_SHARED} ) ++ else() ++ target_link_libraries( ${STATIC_LIBRARY_NAME} LINK_PRIVATE ${ssl_LIBRARY_STATIC} ${crypto_LIBRARY_STATIC} ${CMAKE_DL_LIBS} ) ++ endif() + else ( ) +- target_link_libraries( ${SHARED_LIBRARY_NAME} ) +- target_link_libraries( ${STATIC_LIBRARY_NAME} ${CMAKE_DL_LIBS} ) ++ if(BUILD_SHARED_LIBS) ++ target_link_libraries( ${SHARED_LIBRARY_NAME} ) ++ else() ++ target_link_libraries( ${STATIC_LIBRARY_NAME} ${CMAKE_DL_LIBS} ) ++ endif() + endif ( ) + + if ( BUILD_TESTS ) +@@ -103,5 +110,8 @@ file( GLOB ARTIFACTS "${SOURCE_DIR}/*.hpp" ) + + install( FILES "${INCLUDE_DIR}/${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_PREFIX}/include" ) + install( FILES ${ARTIFACTS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/corvusoft/${PROJECT_NAME}" ) +-install( TARGETS ${STATIC_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) +-install( TARGETS ${SHARED_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) ++if(NOT BUILD_SHARED_LIBS) ++ install( TARGETS ${STATIC_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) ++else() ++ install( TARGETS ${SHARED_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) ++endif() +\ No newline at end of file diff --git a/ports/restbed/portfile.cmake b/ports/restbed/portfile.cmake index 7b4a2d9447846d..dd9b4df45b9e28 100644 --- a/ports/restbed/portfile.cmake +++ b/ports/restbed/portfile.cmake @@ -1,31 +1,29 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + openssl BUILD_SSL +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Corvusoft/restbed - REF 0f8af8d8ed183a88e208adeb22da0080d5d74d1e - SHA512 f0175a10c88f1ad4f16c8e4cff7ceea7b80c56b0724b59791c23e91f1ecf146dfdbda9e9238d31a35f21d8cdcc413b586cc633725dd0ba87de6b599a7087916f + REF 4.7 + SHA512 f8aaa89ae5c862253f9a480fefa8827927e3a6c13c51938bbcd6c28ac4e6d54496ecf51610343e9a3efe3e969314f643a487506c606a65f56125b51ab8478652 HEAD_REF master - PATCHES cmake.patch + PATCHES + use-FindOpenSSL-cmake.patch + asio-1-18-0-deprecations.patch #https://github.com/Corvusoft/restbed/pull/444/files + fix-ninja-duplicates.patch ) -set(USE_OPENSSL OFF) -if("openssl" IN_LIST FEATURES) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES add_openssl_support.patch - ) - set(USE_OPENSSL ON) -endif() +file(REMOVE ${SOURCE_PATH}/cmake/Findopenssl.cmake) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_SSL=${USE_OPENSSL} - -DDISABLE_TESTS=ON + ${FEATURE_OPTIONS} + -DBUILD_TESTS=OFF ) vcpkg_install_cmake() @@ -34,4 +32,4 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/restbed/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/restbed/use-FindOpenSSL-cmake.patch b/ports/restbed/use-FindOpenSSL-cmake.patch new file mode 100644 index 00000000000000..efba4cbcf3004a --- /dev/null +++ b/ports/restbed/use-FindOpenSSL-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1ec4f07..2fb74b3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,7 +55,7 @@ set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake" ) + find_package( asio REQUIRED ) + + if ( BUILD_SSL ) +- find_package( openssl REQUIRED ) ++ find_package( OpenSSL REQUIRED ) + endif ( ) + + include_directories( ${INCLUDE_DIR} SYSTEM ${asio_INCLUDE} ${ssl_INCLUDE} ) diff --git a/ports/restbed/vcpkg.json b/ports/restbed/vcpkg.json new file mode 100644 index 00000000000000..d06ab063c1ceae --- /dev/null +++ b/ports/restbed/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "restbed", + "version-string": "4.7", + "description": "Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.", + "dependencies": [ + "asio" + ], + "features": { + "openssl": { + "description": "Secure over the wire communication allowing you to transmit private data online.", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/restc-cpp/0001-exclude-cmake-external-projects.patch b/ports/restc-cpp/0001-exclude-cmake-external-projects.patch new file mode 100644 index 00000000000000..fff79c1f4778bd --- /dev/null +++ b/ports/restc-cpp/0001-exclude-cmake-external-projects.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aa690fe..d3ff45d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,7 +16,7 @@ if (NOT DEFINED INSTALL_RAPIDJSON_HEADERS) + option(INSTALL_RAPIDJSON_HEADERS "Install rapidjson headers when make install is executed" ON) + endif() + +-include(cmake_scripts/external-projects.cmake) ++#include(cmake_scripts/external-projects.cmake) + + if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) + message(STATUS "Using conan configuration: ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +@@ -137,7 +137,9 @@ target_include_directories(${PROJECT_NAME} + + SET_CPP_STANDARD(${PROJECT_NAME}) + +-add_dependencies(${PROJECT_NAME} externalRapidJson) ++#add_dependencies(${PROJECT_NAME} externalRapidJson) ++find_package(RapidJSON CONFIG REQUIRED) ++target_include_directories(${PROJECT_NAME} PRIVATE ${RAPIDJSON_INCLUDE_DIRS}) + + if (NOT EMBEDDED_RESTC_CPP) + diff --git a/ports/restc-cpp/portfile.cmake b/ports/restc-cpp/portfile.cmake new file mode 100644 index 00000000000000..c7eacd2b377fde --- /dev/null +++ b/ports/restc-cpp/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jgaa/restc-cpp + REF v0.10.0 + SHA512 0f74d825d3958810c270748c2810953fe394d0bf1f147d81b9177803e29a86c702715d5995c5966c4fe671b7689f26d9a0fad4e82d111277bbd3ddce1a68f73a + HEAD_REF master + PATCHES + 0001-exclude-cmake-external-projects.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openssl RESTC_CPP_WITH_TLS + zlib RESTC_CPP_WITH_ZLIB + threaded-ctx RESTC_CPP_THREADED_CTX + boost-log RESTC_CPP_LOG_WITH_BOOST_LOG +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DINSTALL_RAPIDJSON_HEADERS=OFF + -DRESTC_CPP_WITH_EXAMPLES=OFF + -DRESTC_CPP_WITH_UNIT_TESTS=OFF + -DRESTC_CPP_WITH_FUNCTIONALT_TESTS=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/restc-cpp/vcpkg.json b/ports/restc-cpp/vcpkg.json new file mode 100644 index 00000000000000..b06c5faa823d03 --- /dev/null +++ b/ports/restc-cpp/vcpkg.json @@ -0,0 +1,47 @@ +{ + "name": "restc-cpp", + "version-semver": "0.10.0", + "port-version": 1, + "description": "Modern C++ REST Client library", + "homepage": "https://github.com/jgaa/restc-cpp", + "license": "MIT", + "dependencies": [ + "boost-asio", + "boost-chrono", + "boost-context", + "boost-coroutine", + "boost-date-time", + "boost-filesystem", + "boost-program-options", + "boost-system", + "boost-uuid", + "rapidjson" + ], + "default-features": [ + "openssl", + "zlib" + ], + "features": { + "boost-log": { + "description": "Use boost-log for logging.", + "dependencies": [ + "boost-log" + ] + }, + "openssl": { + "description": "OpenSSL support.", + "dependencies": [ + "openssl" + ] + }, + "threaded-ctx": { + "description": "Allow asio contexts with multiple threads. Enables thread-safe internal access." + }, + "zlib": { + "description": "Use zlib.", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/restclient-cpp/0001_fix_cmake_linking.patch b/ports/restclient-cpp/0001_fix_cmake_linking.patch deleted file mode 100644 index 815c2198cc25a0..00000000000000 --- a/ports/restclient-cpp/0001_fix_cmake_linking.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 45fc887..8b90048 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -39,7 +39,7 @@ find_package(Threads REQUIRED) - find_package(CURL REQUIRED) - find_package(jsoncpp) - --add_library(restclient-cpp SHARED -+add_library(restclient-cpp - source/restclient.cc - source/connection.cc - source/helpers.cc diff --git a/ports/restclient-cpp/CONTROL b/ports/restclient-cpp/CONTROL deleted file mode 100644 index 2aac1bbaf4e532..00000000000000 --- a/ports/restclient-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: restclient-cpp -Version: 0.5.1-2 -Build-Depends: curl -Description: Binn is a binary data serialization format designed to be compact, fast and easy to use. diff --git a/ports/restclient-cpp/portfile.cmake b/ports/restclient-cpp/portfile.cmake index 6ad2fa7cfa3249..c2ea8fa251c039 100644 --- a/ports/restclient-cpp/portfile.cmake +++ b/ports/restclient-cpp/portfile.cmake @@ -1,13 +1,13 @@ -include(vcpkg_common_functions) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mrtazz/restclient-cpp - REF 0.5.1 - SHA512 d5e17a984af44f863bc7cdc7307c2b06cae9252f86c6c6c2377cdb317f61b6419d8e9aedc5e5ccdb08fd1ee13848ec3b9ef8067a8d26dcf438a5c8793b5a2ce3 + REF 0.5.2 + SHA512 f6acc6a3d5cb852d6e507463d94d2f6192a941f0c26fef7c674e9ff7753cf5474522052a2065774050d01af5c6d2a3b86398f43cd2e4f5d03abcaac9a21ef4b7 HEAD_REF master - PATCHES - 0001_fix_cmake_linking.patch ) vcpkg_configure_cmake( @@ -22,12 +22,10 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/restclient-cpp) +vcpkg_copy_pdbs() + # Remove includes in debug -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/restclient-cpp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/restclient-cpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/restclient-cpp/copyright) - -# Copy pdb files -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/restclient-cpp/vcpkg.json b/ports/restclient-cpp/vcpkg.json new file mode 100644 index 00000000000000..fcef3266a3895c --- /dev/null +++ b/ports/restclient-cpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "restclient-cpp", + "version-string": "0.5.2", + "port-version": 1, + "description": "Simple REST client for C++. It wraps libcurl for HTTP requests.", + "homepage": "https://code.mrtazz.com/restclient-cpp/", + "dependencies": [ + "curl" + ] +} diff --git a/ports/restinio/CONTROL b/ports/restinio/CONTROL deleted file mode 100644 index fc536c2fe46e7d..00000000000000 --- a/ports/restinio/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: restinio -Version: 0.5.1.1 -Description: A header-only C++14 library that gives you an embedded HTTP/Websocket server targeted primarily for asynchronous processing of HTTP-requests. -Build-Depends: asio, fmt, http-parser diff --git a/ports/restinio/portfile.cmake b/ports/restinio/portfile.cmake index fa329a9bd89a7d..417b77698b4004 100644 --- a/ports/restinio/portfile.cmake +++ b/ports/restinio/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - -vcpkg_from_bitbucket( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO sobjectizerteam/restinio - REF v.0.5.1.1 - SHA512 f5eedd53f4459936d4b32a4243c703a350a611bfc7b0c17c2bb047944cc054f8a93f9fd4904f76d601eb2ce0c9b078c33a6a545b5698ddaf63c3f5327dabd5f6 + REPO stiffstream/restinio + REF 0052518f5692f8f051031e06d933b726191be97e # v.0.6.13 + SHA512 e7474aa1cef4145fe2f02c52cf80fdaf6724da45a4f3d0f1f56fc188ac50ff29a3ac72ea0e4402dc7ad378d0b2acfcea30cf8a57d218c3f5eb55d3f0d83dad29 ) vcpkg_configure_cmake( @@ -16,7 +14,5 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/restinio) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) - # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/restinio) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/restinio/LICENSE ${CURRENT_PACKAGES_DIR}/share/restinio/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/restinio/vcpkg.json b/ports/restinio/vcpkg.json new file mode 100644 index 00000000000000..7aace791bfa282 --- /dev/null +++ b/ports/restinio/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "restinio", + "version-string": "0.6.13", + "description": "A header-only C++14 library that gives you an embedded HTTP/Websocket server targeted primarily for asynchronous processing of HTTP-requests.", + "homepage": "https://github.com/Stiffstream/restinio", + "license": "BSD-3-Clause", + "dependencies": [ + "asio", + "fmt", + "http-parser" + ] +} diff --git a/ports/rexo/portfile.cmake b/ports/rexo/portfile.cmake new file mode 100644 index 00000000000000..9fdf507744275b --- /dev/null +++ b/ports/rexo/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "christophercrouzet/rexo" + REF "v0.2.2" + SHA512 "c7b093920bb23d1b8ecb905c8d3eb281e46607890c071c079df4c194215fc007d672ce3524848a1f0376188869f51fd9955e3fe027c10f3d286a003adfd78d09" + HEAD_REF "main" +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DREXO_BUILD_TESTS=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Rexo) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") +configure_file("${SOURCE_PATH}/UNLICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/ports/rexo/vcpkg.json b/ports/rexo/vcpkg.json new file mode 100644 index 00000000000000..5971ea422f424a --- /dev/null +++ b/ports/rexo/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "rexo", + "version-semver": "0.2.2", + "description": "Rexo is a neat single-file cross-platform unit testing framework for C/C++", + "homepage": "https://github.com/christophercrouzet/rexo", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/rhash/CMakeLists.txt b/ports/rhash/CMakeLists.txt index b395b5c9a7e66a..e3a088170a4943 100644 --- a/ports/rhash/CMakeLists.txt +++ b/ports/rhash/CMakeLists.txt @@ -4,7 +4,7 @@ project(rhash C) file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/Makefile RHASH_SOURCES REGEX "^SOURCES = .*$") string(REPLACE "SOURCES = " "" RHASH_SOURCES "${RHASH_SOURCES}") string(REPLACE " " ";" RHASH_SOURCES "${RHASH_SOURCES}") - +add_definitions(-DRHASH_XVERSION="${RHASH_XVERSION}") add_library(rhash ${RHASH_SOURCES}) set_target_properties(rhash PROPERTIES COMPILE_DEFINITIONS "IN_RHASH" DEFINE_SYMBOL "RHASH_EXPORTS") diff --git a/ports/rhash/CONTROL b/ports/rhash/CONTROL deleted file mode 100644 index a2bb52c2f26ead..00000000000000 --- a/ports/rhash/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: rhash -Version: 1.3.8 -Homepage: https://github.com/rhash/RHash -Description: C library for computing a wide variety of hash sums diff --git a/ports/rhash/portfile.cmake b/ports/rhash/portfile.cmake index 6eace63e41be05..76c03c58c05715 100644 --- a/ports/rhash/portfile.cmake +++ b/ports/rhash/portfile.cmake @@ -1,14 +1,13 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "UWP builds not supported") -endif() +set(RHASH_XVERSION 1.4.0) +vcpkg_fail_port_install(ON_TARGET "UWP") -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rhash/RHash - REF v1.3.8 - SHA512 9dba4fa4dd49d323f2e440c5b93eac1ef62eb4046ec4ef611f0978c12c1739002f1ac1f1ec5e61bd359dc89e9ed612db71be91a795184ac5d5433280d27fa4c1 - HEAD_REF master) + REF df0c969966b5da10f2db5060cf329790db95080e # v1.4.0 + SHA512 eebd5872f5d40d5ef5b7fe857ff3099c3b60e37cedaacf7ae8da63bd18790a16546de1809fa9f8e4fa7eef178121051b267fedd5d237135b80201f8609d613b6 + HEAD_REF master +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/librhash) @@ -16,10 +15,10 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/librhash PREFER_NINJA OPTIONS_DEBUG - -DRHASH_SKIP_HEADERS=ON) + -DRHASH_SKIP_HEADERS=ON +) vcpkg_install_cmake() vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/rhash) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/rhash/COPYING ${CURRENT_PACKAGES_DIR}/share/rhash/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/rhash/vcpkg.json b/ports/rhash/vcpkg.json new file mode 100644 index 00000000000000..1cdb5fef020e94 --- /dev/null +++ b/ports/rhash/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "rhash", + "version-string": "1.4.0", + "port-version": 1, + "description": "C library for computing a wide variety of hash sums", + "homepage": "https://github.com/rhash/RHash", + "supports": "!uwp" +} diff --git a/ports/riffcpp/CONTROL b/ports/riffcpp/CONTROL deleted file mode 100644 index 3667dd78666c20..00000000000000 --- a/ports/riffcpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: riffcpp -Version: 2.1.0 -Homepage: https://github.com/libdmusic/riffcpp -Description: Simple library for reading RIFF files diff --git a/ports/riffcpp/portfile.cmake b/ports/riffcpp/portfile.cmake index 85b623cb829b25..9460bd3f7fd6c3 100644 --- a/ports/riffcpp/portfile.cmake +++ b/ports/riffcpp/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libdmusic/riffcpp - REF v2.2.1 - SHA512 646a98e6f6cd3995081a6242a866effab2968e20b2700248e3d19036bed426236e3844ad09d4b542e023f5f280d74575c47abe5e5e94ce0d77536f4f0a33b8c1 + REF v2.2.4 + SHA512 abceba02441305267c444ed724ca769fa08369302eb74b7729b700883b9354f3db95d8c68ee15f25844a75f1609edd2bcf7482fc639b9e2d3ee3b8caf5e9585f HEAD_REF master ) @@ -23,4 +21,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/riffcpp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/riffcpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/riffcpp/copyright) -vcpkg_test_cmake(PACKAGE_NAME riffcpp) \ No newline at end of file diff --git a/ports/riffcpp/vcpkg.json b/ports/riffcpp/vcpkg.json new file mode 100644 index 00000000000000..13d88764720339 --- /dev/null +++ b/ports/riffcpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "riffcpp", + "version-string": "2.2.4", + "port-version": 1, + "description": "Simple library for reading RIFF files", + "homepage": "https://github.com/libdmusic/riffcpp" +} diff --git a/ports/ring-span-lite/CONTROL b/ports/ring-span-lite/CONTROL deleted file mode 100644 index 9d620b709d8e82..00000000000000 --- a/ports/ring-span-lite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: ring-span-lite -Version: 0.3.0 -Description: A C++yy-like ring_span type for C++98, C++11 and later in a single-file header-only library diff --git a/ports/ring-span-lite/portfile.cmake b/ports/ring-span-lite/portfile.cmake index b9b9930548aa60..a96a8af17fdc5f 100644 --- a/ports/ring-span-lite/portfile.cmake +++ b/ports/ring-span-lite/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/ring-span-lite diff --git a/ports/ring-span-lite/vcpkg.json b/ports/ring-span-lite/vcpkg.json new file mode 100644 index 00000000000000..06121f35198126 --- /dev/null +++ b/ports/ring-span-lite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "ring-span-lite", + "version-string": "0.3.0", + "port-version": 1, + "description": "A C++yy-like ring_span type for C++98, C++11 and later in a single-file header-only library" +} diff --git a/ports/rmlui/add-robin-hood.patch b/ports/rmlui/add-robin-hood.patch new file mode 100644 index 00000000000000..4a39a8a5a1aa96 --- /dev/null +++ b/ports/rmlui/add-robin-hood.patch @@ -0,0 +1,38 @@ +diff --git a/CMake/FileList.cmake b/CMake/FileList.cmake +index 9c3042c..c3820df 100644 +--- a/CMake/FileList.cmake ++++ b/CMake/FileList.cmake +@@ -133,7 +133,6 @@ set(Core_PUB_HDR_FILES + ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ComputedValues.h + ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Containers/chobo/flat_map.hpp + ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Containers/chobo/flat_set.hpp +- ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Containers/robin_hood.h + ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Context.h + ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ContextInstancer.h + ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ConvolutionFilter.h +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 62432f1..d9287c9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -387,6 +387,8 @@ if( ENABLE_SVG_PLUGIN ) + message("-- Can SVG plugin be enabled - yes - lunasvg library found") + endif() + ++find_path(ROBIN_HOOD_INCLUDE_DIR robin_hood.h) ++include_directories(${ROBIN_HOOD_INCLUDE_DIR}) + + if(NOT BUILD_FRAMEWORK) + #=================================== +diff --git a/Include/RmlUi/Config/Config.h b/Include/RmlUi/Config/Config.h +index dc42753..5249e1d 100644 +--- a/Include/RmlUi/Config/Config.h ++++ b/Include/RmlUi/Config/Config.h +@@ -57,7 +57,7 @@ + #else + #include "../Core/Containers/chobo/flat_map.hpp" + #include "../Core/Containers/chobo/flat_set.hpp" +-#include "../Core/Containers/robin_hood.h" ++#include + #endif // RMLUI_NO_THIRDPARTY_CONTAINERS + + namespace Rml { diff --git a/ports/rmlui/portfile.cmake b/ports/rmlui/portfile.cmake new file mode 100644 index 00000000000000..059c6325d13950 --- /dev/null +++ b/ports/rmlui/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mikke89/RmlUi + REF 4.2 + SHA512 848515d554d6a56bc5ba962c8a3db27801491236f17092ea6c658b35d6cb8b3330dff197d71fc65aaa061476a383a467fcc481571cdf3777f06024819bf9267c + HEAD_REF master + PATCHES + add-robin-hood.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + lua BUILD_LUA_BINDINGS + INVERTED_FEATURES + freetype NO_FONT_INTERFACE_DEFAULT +) + +# Remove built-in header, instead we use vcpkg version (from robin-hood-hashing port) +file(REMOVE ${SOURCE_PATH}/Include/RmlUi/Core/Containers/robin_hood.h) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup( + CONFIG_PATH lib/RmlUi/cmake +) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/RmlUi + ${CURRENT_PACKAGES_DIR}/lib/RmlUi +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/RmlUi/Core/Header.h + "#if !defined RMLUI_STATIC_LIB" + "#if 0" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/RmlUi/Debugger/Header.h + "#if !defined RMLUI_STATIC_LIB" + "#if 0" + ) + if ("lua" IN_LIST FEATURES) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/RmlUi/Lua/Header.h + "#if !defined RMLUI_STATIC_LIB" + "#if 0" + ) + endif() +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/rmlui/vcpkg.json b/ports/rmlui/vcpkg.json new file mode 100644 index 00000000000000..389bf88d45e88d --- /dev/null +++ b/ports/rmlui/vcpkg.json @@ -0,0 +1,34 @@ +{ + "name": "rmlui", + "version": "4.2", + "maintainers": "Michael R. P. Ragazzon ", + "description": "RmlUi is the C++ user interface library based on the HTML and CSS standards, designed as a complete solution for any project's interface needs.", + "homepage": "https://github.com/mikke89/RmlUi", + "documentation": "https://mikke89.github.io/RmlUiDoc/", + "license": "MIT", + "dependencies": [ + "robin-hood-hashing", + "vcpkg-cmake", + "vcpkg-cmake-config" + ], + "default-features": [ + "freetype" + ], + "features": { + "freetype": { + "description": "Include font engine based on FreeType", + "dependencies": [ + { + "name": "freetype", + "default-features": false + } + ] + }, + "lua": { + "description": "Build Lua bindings", + "dependencies": [ + "lua" + ] + } + } +} diff --git a/ports/roaring/CONTROL b/ports/roaring/CONTROL deleted file mode 100644 index 0b1327da47815e..00000000000000 --- a/ports/roaring/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: roaring -Version: 2019-03-05-2 -Description: A better compressed bitset in C (and C++) diff --git a/ports/roaring/portfile.cmake b/ports/roaring/portfile.cmake index 937fd075173f40..820e6f5db4e5da 100644 --- a/ports/roaring/portfile.cmake +++ b/ports/roaring/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if (TARGET_TRIPLET MATCHES "^x86") message(WARNING "The CRoaring authors recommend users of this lib against using a 32-bit build.") endif () @@ -33,6 +31,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/roaring/vcpkg.json b/ports/roaring/vcpkg.json new file mode 100644 index 00000000000000..598893916ee047 --- /dev/null +++ b/ports/roaring/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "roaring", + "version-string": "2019-03-05", + "port-version": 3, + "description": "A better compressed bitset in C (and C++)" +} diff --git a/ports/robin-hood-hashing/CONTROL b/ports/robin-hood-hashing/CONTROL deleted file mode 100644 index d3087151940312..00000000000000 --- a/ports/robin-hood-hashing/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: robin-hood-hashing -Version: 3.2.13 -Description: Fast & memory efficient hashtable based on robin hood hashing for C++14 diff --git a/ports/robin-hood-hashing/portfile.cmake b/ports/robin-hood-hashing/portfile.cmake index 890d6f86a6fe33..c6dbf8fde0f109 100644 --- a/ports/robin-hood-hashing/portfile.cmake +++ b/ports/robin-hood-hashing/portfile.cmake @@ -1,16 +1,26 @@ -# header-only library - -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO martinus/robin-hood-hashing - REF 3.2.13 - SHA512 5c508a1f43d2ca86c89b9aac3b17493a23b8ee3c7485438afc8e5eb4e697d663588e1945001ba3ba95dd1480b3c1b846079fadec5972e5ac4462117379052433 - HEAD_REF master -) - -file(COPY ${SOURCE_PATH}/src/include/robin_hood.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinus/robin-hood-hashing + REF 3.11.3 + SHA512 0a4bc04a7b474b80dc156492a12d29046a566272c7b5f2fbcbd27c68ec62fa5db753afe5eac521cd4bd6d6e5ce1b1dfd590ae0b64003a70e102c83a89045b1e6 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DRH_STANDALONE_PROJECT=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup( + PACKAGE_NAME robin_hood + CONFIG_PATH lib/cmake/robin_hood +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/robin-hood-hashing/vcpkg.json b/ports/robin-hood-hashing/vcpkg.json new file mode 100644 index 00000000000000..145bd2ba4c9db7 --- /dev/null +++ b/ports/robin-hood-hashing/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "robin-hood-hashing", + "version": "3.11.3", + "description": "Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20", + "homepage": "https://github.com/martinus/robin-hood-hashing", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/robin-map/CONTROL b/ports/robin-map/CONTROL deleted file mode 100644 index c11d679992b7f0..00000000000000 --- a/ports/robin-map/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: robin-map -Version: 0.6.1 -Description: A C++ implementation of a fast hash map and hash set using robin hood hashing diff --git a/ports/robin-map/portfile.cmake b/ports/robin-map/portfile.cmake index 73cd9c7d853932..209bda9fccdc1f 100644 --- a/ports/robin-map/portfile.cmake +++ b/ports/robin-map/portfile.cmake @@ -1,17 +1,18 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Tessil/robin-map - REF 3285ed7615b72020bd68ba6d30f9ec0c0c526098 - SHA512 3850a0ea06f62ba177a1746a92a3f9c999f6398d4d786dbc63dd276569e77e3d9c15e83c0cb74a1314e3c2b5ff73225675d914cf4ab3f052353b237ab9219bc8 + REF v0.6.3 + SHA512 485557f300d33bda62bb8accdf246819ee8ffe956bc022e7ddca54ff6ad1a9fdb8db8d80690add3ef238e834d1eb8e2905920cb0a0674e7df010f6946d01297b HEAD_REF master ) -file(COPY ${SOURCE_PATH}/include/tsl DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/robin-map - RENAME copyright +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} ) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/tsl-robin-map) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/robin-map/vcpkg.json b/ports/robin-map/vcpkg.json new file mode 100644 index 00000000000000..b200ae5c4fa271 --- /dev/null +++ b/ports/robin-map/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "robin-map", + "version-semver": "0.6.3", + "port-version": 1, + "description": "A C++ implementation of a fast hash map and hash set using robin hood hashing", + "homepage": "https://github.com/Tessil/robin-map", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/rocksdb/0001-disable-gtest.patch b/ports/rocksdb/0001-disable-gtest.patch deleted file mode 100644 index 82fe3ff6266b58..00000000000000 --- a/ports/rocksdb/0001-disable-gtest.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5b7d37359..9ab8954b6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -445,7 +445,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include) - include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) - find_package(Threads REQUIRED) - --add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) -+#add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) - - # Main library source code - diff --git a/ports/rocksdb/0002-only-build-one-flavor.patch b/ports/rocksdb/0002-only-build-one-flavor.patch index 00e46377dc3dfb..4ee4d23932726d 100644 --- a/ports/rocksdb/0002-only-build-one-flavor.patch +++ b/ports/rocksdb/0002-only-build-one-flavor.patch @@ -1,53 +1,29 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ff370fb..6916fcd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -810,24 +810,30 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) - ) - - install(DIRECTORY include/rocksdb COMPONENT devel DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") -- -- install( -- TARGETS ${ROCKSDB_STATIC_LIB} -- EXPORT RocksDBTargets -- COMPONENT devel -- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -- INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -- ) -- -- install( -- TARGETS ${ROCKSDB_SHARED_LIB} -- EXPORT RocksDBTargets -- COMPONENT runtime -- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -- INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -- ) -+ if(NOT ROCKSDB_DISABLE_INSTALL_STATIC_LIB) -+ install( -+ TARGETS ${ROCKSDB_STATIC_LIB} -+ EXPORT RocksDBTargets -+ COMPONENT devel -+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -+ ) -+ else() -+ set_target_properties(${ROCKSDB_STATIC_LIB} PROPERTIES EXCLUDE_FROM_ALL TRUE) -+ endif() -+ if(NOT ROCKSDB_DISABLE_INSTALL_SHARED_LIB) -+ install( -+ TARGETS ${ROCKSDB_SHARED_LIB} -+ EXPORT RocksDBTargets -+ COMPONENT runtime -+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -+ ) -+ else() -+ set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES EXCLUDE_FROM_ALL TRUE) -+ endif() - - install( - EXPORT RocksDBTargets +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6761929..4d2b0a1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -987,13 +987,17 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) + + install(DIRECTORY "${PROJECT_SOURCE_DIR}/cmake/modules" COMPONENT devel DESTINATION ${package_config_destination}) + +- install( +- TARGETS ${ROCKSDB_STATIC_LIB} +- EXPORT RocksDBTargets +- COMPONENT devel +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +- ) ++ if(NOT ROCKSDB_BUILD_SHARED) ++ install( ++ TARGETS ${ROCKSDB_STATIC_LIB} ++ EXPORT RocksDBTargets ++ COMPONENT devel ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ) ++ else() ++ set_target_properties(${ROCKSDB_STATIC_LIB} PROPERTIES EXCLUDE_FROM_ALL TRUE) ++ endif() + + if(ROCKSDB_BUILD_SHARED) + install( diff --git a/ports/rocksdb/0003-use-find-package.patch b/ports/rocksdb/0003-use-find-package.patch new file mode 100644 index 00000000000000..e05de2a4bb3964 --- /dev/null +++ b/ports/rocksdb/0003-use-find-package.patch @@ -0,0 +1,61 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6761929..6f74d31 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,7 +91,7 @@ include(CMakeDependentOption) + CMAKE_DEPENDENT_OPTION(WITH_GFLAGS "build with GFlags" ON + "NOT MSVC;NOT MINGW" OFF) + +-if(MSVC) ++if(MSVC AND NOT VCPKG_TOOLCHAIN) + option(WITH_XPRESS "build with windows built in compression" OFF) + include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc) + else() +@@ -130,10 +130,7 @@ else() + endif() + + if(WITH_SNAPPY) +- find_package(Snappy CONFIG) +- if(NOT Snappy_FOUND) +- find_package(Snappy REQUIRED) +- endif() ++ find_package(Snappy CONFIG REQUIRED) + add_definitions(-DSNAPPY) + list(APPEND THIRDPARTY_LIBS Snappy::snappy) + endif() +@@ -157,16 +154,19 @@ else() + endif() + + if(WITH_LZ4) +- find_package(lz4 REQUIRED) ++ find_package(lz4 CONFIG REQUIRED) + add_definitions(-DLZ4) + list(APPEND THIRDPARTY_LIBS lz4::lz4) + endif() + + if(WITH_ZSTD) +- find_package(zstd REQUIRED) ++ find_package(zstd CONFIG REQUIRED) + add_definitions(-DZSTD) +- include_directories(${ZSTD_INCLUDE_DIR}) +- list(APPEND THIRDPARTY_LIBS zstd::zstd) ++ if(TARGET zstd::libzstd_shared) ++ list(APPEND THIRDPARTY_LIBS zstd::libzstd_shared) ++ elseif(TARGET zstd::libzstd_static) ++ list(APPEND THIRDPARTY_LIBS zstd::libzstd_static) ++ endif() + endif() + endif() + +@@ -375,9 +375,9 @@ endif() + + option(WITH_TBB "build with Threading Building Blocks (TBB)" OFF) + if(WITH_TBB) +- find_package(TBB REQUIRED) ++ find_package(TBB CONFIG REQUIRED) + add_definitions(-DTBB) +- list(APPEND THIRDPARTY_LIBS TBB::TBB) ++ list(APPEND THIRDPARTY_LIBS TBB::tbb) + endif() + + # Stall notifications eat some performance from inserts diff --git a/ports/rocksdb/0003-zlib-findpackage.patch b/ports/rocksdb/0003-zlib-findpackage.patch deleted file mode 100644 index e66f8f17fe1a9c..00000000000000 --- a/ports/rocksdb/0003-zlib-findpackage.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6916fcd..a52c53f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -92,7 +92,7 @@ else() - endif() - - if(WITH_ZLIB) -- find_package(zlib REQUIRED) -+ find_package(ZLIB REQUIRED) - add_definitions(-DZLIB) - if(ZLIB_INCLUDE_DIRS) - # CMake 3 diff --git a/ports/rocksdb/0004-fix-dependency-in-config.patch b/ports/rocksdb/0004-fix-dependency-in-config.patch new file mode 100644 index 00000000000000..a2cde0d7b132ad --- /dev/null +++ b/ports/rocksdb/0004-fix-dependency-in-config.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/RocksDBConfig.cmake.in b/cmake/RocksDBConfig.cmake.in +index 0bd14be..f9f6aa8 100644 +--- a/cmake/RocksDBConfig.cmake.in ++++ b/cmake/RocksDBConfig.cmake.in +@@ -37,7 +37,7 @@ if(@WITH_LZ4@) + endif() + + if(@WITH_ZSTD@) +- find_dependency(zstd) ++ find_dependency(zstd CONFIG) + endif() + + if(@WITH_NUMA@) +@@ -45,7 +45,7 @@ if(@WITH_NUMA@) + endif() + + if(@WITH_TBB@) +- find_dependency(TBB) ++ find_dependency(TBB CONFIG) + endif() + + find_dependency(Threads) diff --git a/ports/rocksdb/0004-use-find-package.patch b/ports/rocksdb/0004-use-find-package.patch deleted file mode 100644 index c2b9e5a4f981cb..00000000000000 --- a/ports/rocksdb/0004-use-find-package.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1bae9a7..0303186 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,7 +53,7 @@ option(WITH_WINDOWS_UTF8_FILENAMES "use UTF8 as characterset for opening files, - if (WITH_WINDOWS_UTF8_FILENAMES) - add_definitions(-DROCKSDB_WINDOWS_UTF8_FILENAMES) - endif() --if(MSVC) -+if(MSVC AND NOT VCPKG_TOOLCHAIN) - # Defaults currently different for GFLAGS. - # We will address find_package work a little later - option(WITH_GFLAGS "build with GFlags" OFF) diff --git a/ports/rocksdb/0005-do-not-install-cmake-modules.patch b/ports/rocksdb/0005-do-not-install-cmake-modules.patch new file mode 100644 index 00000000000000..6517537c08f53a --- /dev/null +++ b/ports/rocksdb/0005-do-not-install-cmake-modules.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad4b711..b2061ae 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -981,7 +981,7 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) + + install(DIRECTORY include/rocksdb COMPONENT devel DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + +- install(DIRECTORY "${PROJECT_SOURCE_DIR}/cmake/modules" COMPONENT devel DESTINATION ${package_config_destination}) ++ #install(DIRECTORY "${PROJECT_SOURCE_DIR}/cmake/modules" COMPONENT devel DESTINATION ${package_config_destination}) + + if(NOT ROCKSDB_BUILD_SHARED) + install( diff --git a/ports/rocksdb/0005-static-linking-in-linux.patch b/ports/rocksdb/0005-static-linking-in-linux.patch deleted file mode 100644 index 89defde686b231..00000000000000 --- a/ports/rocksdb/0005-static-linking-in-linux.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0303186..2b09591 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -741,7 +741,12 @@ if(WIN32) - set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) - else() - set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT}) -- set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) -+ -+ if(ROCKSDB_DISABLE_INSTALL_SHARED_LIB) -+ set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) -+ else() -+ set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) -+ endif() - - add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES}) - target_link_libraries(${ROCKSDB_SHARED_LIB} diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL deleted file mode 100644 index 1d37c85cae5301..00000000000000 --- a/ports/rocksdb/CONTROL +++ /dev/null @@ -1,25 +0,0 @@ -Source: rocksdb -Version: 6.1.2-1 -Homepage: https://github.com/facebook/rocksdb -Description: A library that provides an embeddable, persistent key-value store for fast storage -Default-Features: zlib - -Feature: lz4 -Build-Depends: lz4 -Description: lz4 support in rocksdb - -Feature: snappy -Build-Depends: snappy -Description: snappy support in rocksdb - -Feature: zlib -Build-Depends: zlib -Description: zlib support in rocksdb - -Feature: tbb -Build-Depends: tbb -Description: tbb support in rocksdb - -Feature: zstd -Build-Depends: zstd -Description: zstd support in rocksdb diff --git a/ports/rocksdb/Findlz4.cmake b/ports/rocksdb/Findlz4.cmake deleted file mode 100644 index f80962c66e40ba..00000000000000 --- a/ports/rocksdb/Findlz4.cmake +++ /dev/null @@ -1,13 +0,0 @@ -find_path(LZ4_INCLUDE_DIR lz4.h) - -find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) -find_library(LZ4_LIBRARY_RELEASE NAMES lz4) - -include(SelectLibraryConfigurations) -select_library_configurations(LZ4) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( - LZ4 DEFAULT_MSG - LZ4_LIBRARY LZ4_INCLUDE_DIR -) diff --git a/ports/rocksdb/Findsnappy.cmake b/ports/rocksdb/Findsnappy.cmake deleted file mode 100644 index 253d0d84cf2571..00000000000000 --- a/ports/rocksdb/Findsnappy.cmake +++ /dev/null @@ -1,13 +0,0 @@ -find_path(SNAPPY_INCLUDE_DIR snappy.h) - -find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd) -find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy) - -include(SelectLibraryConfigurations) -select_library_configurations(SNAPPY) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( - SNAPPY DEFAULT_MSG - SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR -) diff --git a/ports/rocksdb/Findzstd.cmake b/ports/rocksdb/Findzstd.cmake deleted file mode 100644 index f047fc2a91763b..00000000000000 --- a/ports/rocksdb/Findzstd.cmake +++ /dev/null @@ -1,13 +0,0 @@ -find_path(ZSTD_INCLUDE_DIR zstd.h) - -find_library(ZSTD_LIBRARY_DEBUG NAMES zstd) -find_library(ZSTD_LIBRARY_RELEASE NAMES zstd) - -include(SelectLibraryConfigurations) -select_library_configurations(ZSTD) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( - ZSTD DEFAULT_MSG - ZSTD_LIBRARY ZSTD_INCLUDE_DIR -) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index e50a306fca6ce6..80a47d31715a0e 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -1,32 +1,20 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb - REF v6.1.2 - SHA512 3d9e994b202c9f1c1c188e37a4f781bb97af5ba72f2f3f59091b79f402b819c9765dcd1e7d0851b5119c0bf510aa3f5bed44a542798ee81795a8328d71554b38 + REF ed4316166f67ec892603014634840d29f460f611 # v6.14.6 + SHA512 a880a760f6f5a0a591c14fe942914a3ea85c387a901a922955bb2373ae903f96c6035cac8732d3000a3cbe6313016bfb21168bd3d8a7debf5a28c6e5c0aefb3f HEAD_REF master PATCHES - 0001-disable-gtest.patch 0002-only-build-one-flavor.patch - 0003-zlib-findpackage.patch - 0004-use-find-package.patch - 0005-static-linking-in-linux.patch -) - -file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake") -file(COPY - "${CMAKE_CURRENT_LIST_DIR}/Findlz4.cmake" - "${CMAKE_CURRENT_LIST_DIR}/Findsnappy.cmake" - "${CMAKE_CURRENT_LIST_DIR}/Findzstd.cmake" - DESTINATION "${SOURCE_PATH}/cmake/modules" + 0003-use-find-package.patch + 0004-fix-dependency-in-config.patch + 0005-do-not-install-cmake-modules.patch ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_MD_LIBRARY) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ROCKSDB_DISABLE_INSTALL_SHARED_LIB) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ROCKSDB_DISABLE_INSTALL_STATIC_LIB) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ROCKSDB_BUILD_SHARED) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES @@ -34,6 +22,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "snappy" WITH_SNAPPY "zlib" WITH_ZLIB "zstd" WITH_ZSTD + "bzip2" WITH_BZ2 "tbb" WITH_TBB INVERTED_FEATURES "tbb" CMAKE_DISABLE_FIND_PACKAGE_TBB @@ -43,20 +32,22 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DWITH_GFLAGS=0 - -DWITH_TESTS=OFF - -DUSE_RTTI=1 - -DROCKSDB_INSTALL_ON_WINDOWS=ON - -DFAIL_ON_WARNINGS=OFF - -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} - -DPORTABLE=ON - -DCMAKE_DEBUG_POSTFIX=d - -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} - -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} - -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE - -DCMAKE_DISABLE_FIND_PACKAGE_gtest=TRUE - -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE - ${FEATURE_OPTIONS} + -DWITH_GFLAGS=OFF + -DWITH_TESTS=OFF + -DWITH_BENCHMARK_TOOLS=OFF + -DWITH_TOOLS=OFF + -DWITH_FOLLY_DISTRIBUTED_MUTEX=OFF + -DUSE_RTTI=1 + -DROCKSDB_INSTALL_ON_WINDOWS=ON + -DFAIL_ON_WARNINGS=OFF + -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} + -DPORTABLE=ON + -DCMAKE_DEBUG_POSTFIX=d + -DROCKSDB_BUILD_SHARED=${ROCKSDB_BUILD_SHARED} + -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_gtest=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() @@ -65,7 +56,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rocksdb) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE.Apache DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb RENAME copyright) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${SOURCE_PATH}/LICENSE.leveldb DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb) - +file(INSTALL ${SOURCE_PATH}/LICENSE.Apache DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.leveldb DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") vcpkg_copy_pdbs() diff --git a/ports/rocksdb/vcpkg-cmake-wrapper.cmake b/ports/rocksdb/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index 455facf22bfcd6..00000000000000 --- a/ports/rocksdb/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,9 +0,0 @@ -_find_package(${ARGS}) -if(NOT TARGET RocksDB::rocksdb AND TARGET RocksDB::rocksdb-shared) - add_library(RocksDB::rocksdb INTERFACE IMPORTED) - set_target_properties(RocksDB::rocksdb PROPERTIES INTERFACE_LINK_LIBRARIES "RocksDB::rocksdb-shared") -endif() -if(TARGET RocksDB::rocksdb AND NOT TARGET RocksDB::rocksdb-shared) - add_library(RocksDB::rocksdb-shared INTERFACE IMPORTED) - set_target_properties(RocksDB::rocksdb-shared PROPERTIES INTERFACE_LINK_LIBRARIES "RocksDB::rocksdb") -endif() diff --git a/ports/rocksdb/vcpkg.json b/ports/rocksdb/vcpkg.json new file mode 100644 index 00000000000000..d1c4940f86657b --- /dev/null +++ b/ports/rocksdb/vcpkg.json @@ -0,0 +1,48 @@ +{ + "name": "rocksdb", + "version-string": "6.14.6", + "port-version": 1, + "description": "A library that provides an embeddable, persistent key-value store for fast storage", + "homepage": "https://github.com/facebook/rocksdb", + "default-features": [ + "zlib" + ], + "features": { + "bzip2": { + "description": "bzip2 support in rocksdb", + "dependencies": [ + "bzip2" + ] + }, + "lz4": { + "description": "lz4 support in rocksdb", + "dependencies": [ + "lz4" + ] + }, + "snappy": { + "description": "snappy support in rocksdb", + "dependencies": [ + "snappy" + ] + }, + "tbb": { + "description": "tbb support in rocksdb", + "dependencies": [ + "tbb" + ] + }, + "zlib": { + "description": "zlib support in rocksdb", + "dependencies": [ + "zlib" + ] + }, + "zstd": { + "description": "zstd support in rocksdb", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/ports/rpclib/CONTROL b/ports/rpclib/CONTROL deleted file mode 100644 index 15e6abd3edabad..00000000000000 --- a/ports/rpclib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: rpclib -Version: 2.2.1-1 -Homepage: https://github.com/rpclib/rpclib -Description: a RPC library for C++, providing both a client and server implementation. It is built using modern C++14. diff --git a/ports/rpclib/portfile.cmake b/ports/rpclib/portfile.cmake index 9865a2afe24820..eb42ebeba1a8fc 100644 --- a/ports/rpclib/portfile.cmake +++ b/ports/rpclib/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -12,6 +10,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE PREFER_NINJA ) @@ -23,5 +22,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rpclib) vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/rpclib) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/rpclib/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/rpclib/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/rpclib/vcpkg.json b/ports/rpclib/vcpkg.json new file mode 100644 index 00000000000000..7ac73846db17e9 --- /dev/null +++ b/ports/rpclib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "rpclib", + "version-string": "2.2.1", + "port-version": 3, + "description": "a RPC library for C++, providing both a client and server implementation. It is built using modern C++14.", + "homepage": "https://github.com/rpclib/rpclib" +} diff --git a/ports/rply/CMakeLists.txt b/ports/rply/CMakeLists.txt new file mode 100644 index 00000000000000..8885a79c4f8328 --- /dev/null +++ b/ports/rply/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required (VERSION 3.14) +project ("rply") +set (target_name ${CMAKE_PROJECT_NAME}) +set (target_include_prefix "rply") + +option (BUILD_SHARED_LIBS "Create ${target_name} as a shared library" ON) + +set (CMAKE_DEBUG_POSTFIX "d" CACHE STRING "postfix for debug lib") + +include (GNUInstallDirs) + +file (GLOB target_headers "*.h") +file (GLOB target_srcs "*.c" ) + +if (MSVC) + set(sources_msvc "rply.def") +endif() + +add_library (${target_name} ${target_srcs} ${target_headers} ${sources_msvc}) + +target_include_directories (${target_name} + PUBLIC $ +) + +set_target_properties(${target_name} PROPERTIES + C_STANDARD 11 +) + +if (MSVC) + target_compile_definitions(${target_name} PRIVATE _CRT_SECURE_NO_WARNINGS) + set_target_properties(${target_name} PROPERTIES + VS_DEBUGGER_WORKING_DIRECTORY $ + ) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${target_name}) +endif() + +install (TARGETS ${target_name} EXPORT ${target_name}-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + +install (FILES ${target_headers} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${target_name}" + CONFIGURATIONS Release +) + +install (EXPORT ${target_name}-targets + FILE ${target_name}-targets.cmake + NAMESPACE ${target_name}:: + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${target_name}" +) + +configure_file(${target_name}-config.cmake.in "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${target_name}-config.cmake" @ONLY) + +install(FILES + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${target_name}-config.cmake" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${target_name}" +) diff --git a/ports/rply/fix-uninitialized-local-variable.patch b/ports/rply/fix-uninitialized-local-variable.patch new file mode 100644 index 00000000000000..f23ad8450c4f79 --- /dev/null +++ b/ports/rply/fix-uninitialized-local-variable.patch @@ -0,0 +1,22 @@ +diff --git a/rply.c b/rply.c +index c4105ef..7c7e72a 100644 +--- a/rply.c ++++ b/rply.c +@@ -372,7 +372,7 @@ p_ply ply_open(const char *name, p_ply_error_cb error_cb, + + p_ply ply_open_from_file(FILE *fp, p_ply_error_cb error_cb, + long idata, void *pdata) { +- p_ply ply; ++ p_ply ply = NULL; + if (error_cb == NULL) error_cb = ply_error_cb; + assert(fp); + if (!ply_type_check()) { +@@ -475,7 +475,7 @@ p_ply ply_create(const char *name, e_ply_storage_mode storage_mode, + + p_ply ply_create_to_file(FILE *fp, e_ply_storage_mode storage_mode, + p_ply_error_cb error_cb, long idata, void *pdata) { +- p_ply ply; ++ p_ply ply = NULL; + assert(fp && storage_mode <= PLY_DEFAULT); + if (!ply_type_check()) { + error_cb(ply, "Incompatible type system"); diff --git a/ports/rply/portfile.cmake b/ports/rply/portfile.cmake new file mode 100644 index 00000000000000..665b9e300a4793 --- /dev/null +++ b/ports/rply/portfile.cmake @@ -0,0 +1,33 @@ + +set(VERSION 1.1.4) + +vcpkg_download_distfile(ARCHIVE + URLS "http://w3.impa.br/~diego/software/rply/rply-${VERSION}.tar.gz" + FILENAME "rply-${VERSION}.tar.gz" + SHA512 be389780b8ca74658433f271682d91e89709ced588c4012c152ccf4014557692a1afd37b1bd5e567cedf9c412d42721eb0412ff3331f38717e527bd5d29c27a7 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + fix-uninitialized-local-variable.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/rply.def DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/rply-config.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/rply RENAME copyright) + diff --git a/ports/rply/rply-config.cmake.in b/ports/rply/rply-config.cmake.in new file mode 100644 index 00000000000000..303034207039ae --- /dev/null +++ b/ports/rply/rply-config.cmake.in @@ -0,0 +1,8 @@ +get_filename_component(_RPLY_PREFIX_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) +set (_TARGET_NAME "rply") + +# IMPORTED targets +include("${_RPLY_PREFIX_DIR}/${_TARGET_NAME}-targets.cmake") + +set(_RPLY_PREFIX_DIR) +set(_TARGET_NAME) diff --git a/ports/rply/rply.def b/ports/rply/rply.def new file mode 100644 index 00000000000000..8662c2421f18df --- /dev/null +++ b/ports/rply/rply.def @@ -0,0 +1,28 @@ +EXPORTS + ply_get_ply_user_data + ply_open + ply_read_header + ply_set_read_cb + ply_get_argument_element + ply_get_argument_property + ply_get_argument_user_data + ply_get_argument_value + ply_read + ply_get_next_element + ply_get_next_comment + ply_get_next_obj_info + ply_get_element_info + ply_get_next_property + ply_get_property_info + ply_create + ply_add_element + ply_add_property + ply_add_list_property + ply_add_scalar_property + ply_add_comment + ply_add_obj_info + ply_write_header + ply_write + ply_close + ply_open_from_file + ply_create_to_file diff --git a/ports/rply/vcpkg.json b/ports/rply/vcpkg.json new file mode 100644 index 00000000000000..100177a4190471 --- /dev/null +++ b/ports/rply/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "rply", + "version-string": "1.1.4", + "port-version": 1, + "description": "ANSI C Library for PLY file format input and output", + "homepage": "http://w3.impa.br/~diego/software/rply" +} diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL deleted file mode 100644 index 1a766286b64865..00000000000000 --- a/ports/rs-core-lib/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: rs-core-lib -Version: 2019-05-07 -Homepage: https://github.com/CaptainCrowbar/rs-core-lib -Description: Minimal common utilities by Ross Smith - diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 239d611269f86b..3c56fd94b57e6c 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 4828e0dc8b7e7ed76935865cfe99181da0da211b - SHA512 97298d94c1cc4cd4cb580bde6c1413a2f429544dc80cae58bc436aad25e385d9ced611a2512a45f1e3d10fd613f26958fc5d3a03ea9bfaefd5170a4b2d1ac124 + REF 9eac3469ac13b2f1e9e4608a0710a76af68d1983 # accessed on 2020-09-14 + SHA512 ef3cb291efefff0ef13b683d70b99777cb403f5211a6f0e3099a91806cf3d7dd33d6e2e793ccbd836dcb145dc19cde99c4f4eb0bd49be3482d87d4e1a04ee2aa HEAD_REF master ) diff --git a/ports/rs-core-lib/vcpkg.json b/ports/rs-core-lib/vcpkg.json new file mode 100644 index 00000000000000..8ee5959e020cba --- /dev/null +++ b/ports/rs-core-lib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "rs-core-lib", + "version-string": "2020-09-14", + "port-version": 1, + "description": "Minimal common utilities by Ross Smith", + "homepage": "https://github.com/CaptainCrowbar/rs-core-lib" +} diff --git a/ports/rsasynccpp/portfile.cmake b/ports/rsasynccpp/portfile.cmake new file mode 100644 index 00000000000000..438f2cd8c49406 --- /dev/null +++ b/ports/rsasynccpp/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "ANDROID" "FREEBSD" "OPENBSD") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO renestein/Rstein.AsyncCpp + REF 0.0.7 + SHA512 b4cc1c68b6fc7bb8b418457ba18b834769abec07e44305955214f8918cc57f85c4258a0521ea55388fab3ec9724488e506d2b114c765b804991c38bf33133c55 + HEAD_REF master +) + +if("lib-cl-win-legacy-await" IN_LIST FEATURES) + if (VCPKG_CRT_LINKAGE MATCHES "static") + set(RELEASE_CONFIGURATION "ReleaseMT_VSAWAIT") + set(DEBUG_CONFIGURATION "DebugMT_VSAWAIT") + else() + set(RELEASE_CONFIGURATION "Release_VSAWAIT") + set(DEBUG_CONFIGURATION "Debug_VSAWAIT") + endif() +else() + if (VCPKG_CRT_LINKAGE MATCHES "static") + set(RELEASE_CONFIGURATION "ReleaseMT") + set(DEBUG_CONFIGURATION "DebugMT") + else() + set(RELEASE_CONFIGURATION "Release") + set(DEBUG_CONFIGURATION "Debug") + endif() +endif() + +if (TRIPLET_SYSTEM_ARCH MATCHES "x86") + set(MSBUILD_PLATFORM "x86") +else () + set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) +endif() + + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH RStein.AsyncCppLib.sln + LICENSE_SUBPATH LICENSE + PLATFORM ${MSBUILD_PLATFORM} + DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} + RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} +) + +file(COPY "${SOURCE_PATH}/RStein.AsyncCpp/" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/asynccpp" + FILES_MATCHING PATTERN "*.h") \ No newline at end of file diff --git a/ports/rsasynccpp/vcpkg.json b/ports/rsasynccpp/vcpkg.json new file mode 100644 index 00000000000000..f29d9388b49782 --- /dev/null +++ b/ports/rsasynccpp/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "rsasynccpp", + "version": "0.0.7", + "maintainers": "Rene Stein ", + "description": "Task Parallel Library (TPL)/dataflow/actors/async primitives for C++ based on C++ 20 coroutines.", + "homepage": "https://github.com/renestein/Rstein.AsyncCpp", + "supports": "windows & !arm", + "features": { + "lib-cl-win-legacy-await": { + "description": "Legacy coroutines (/await switch, std::experimental namespace)." + } + } +} diff --git a/ports/rsm-bsa/portfile.cmake b/ports/rsm-bsa/portfile.cmake new file mode 100644 index 00000000000000..9d94ff11f70ee2 --- /dev/null +++ b/ports/rsm-bsa/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "OSX" "UWP" ON_ARCH "x86") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Ryan-rsm-McKenzie/bsa + REF 2.0.3 + SHA512 b54f1cbc88e55b98b0c25ee81007dc42df736836784b2a1e2e91652b46a73054671d798cc0007ea79b7cf0c8181021bb0cbc95ae407d4a538298d668b4c8fe69 + HEAD_REF master +) + +if (VCPKG_TARGET_IS_LINUX) + message(WARNING "Build ${PORT} requires at least gcc 10.") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/bsa") + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/rsm-bsa/vcpkg.json b/ports/rsm-bsa/vcpkg.json new file mode 100644 index 00000000000000..a586e25659550b --- /dev/null +++ b/ports/rsm-bsa/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "rsm-bsa", + "version-semver": "2.0.3", + "description": "A C++ library for working with the Bethesda archive file format", + "homepage": "https://github.com/Ryan-rsm-McKenzie/bsa", + "documentation": "https://ryan-rsm-mckenzie.github.io/bsa/", + "supports": "!x86 & !osx & !uwp", + "dependencies": [ + "lz4", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/rsocket/fix-cmake-config.patch b/ports/rsocket/fix-cmake-config.patch new file mode 100644 index 00000000000000..d3bf7b886ee444 --- /dev/null +++ b/ports/rsocket/fix-cmake-config.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/rsocket-config.cmake.in b/cmake/rsocket-config.cmake.in +index d5579a85..ea12752a 100644 +--- a/cmake/rsocket-config.cmake.in ++++ b/cmake/rsocket-config.cmake.in +@@ -4,7 +4,7 @@ + @PACKAGE_INIT@ + + if(NOT TARGET rsocket::ReactiveSocket) +- include("${PACKAGE_PREFIX_DIR}/lib/cmake/rsocket/rsocket-exports.cmake") ++ include("${CMAKE_CURRENT_LIST_DIR}/rsocket-exports.cmake") + endif() + + if (NOT rsocket_FIND_QUIETLY) +diff --git a/yarpl/cmake/yarpl-config.cmake.in b/yarpl/cmake/yarpl-config.cmake.in +index d557b213..1b83fffc 100644 +--- a/yarpl/cmake/yarpl-config.cmake.in ++++ b/yarpl/cmake/yarpl-config.cmake.in +@@ -4,7 +4,7 @@ + @PACKAGE_INIT@ + + if(NOT TARGET yarpl::yarpl) +- include("${PACKAGE_PREFIX_DIR}/lib/cmake/yarpl/yarpl-exports.cmake") ++ include("${CMAKE_CURRENT_LIST_DIR}/yarpl-exports.cmake") + endif() + + set(YARPL_LIBRARIES yarpl::yarpl) diff --git a/ports/rsocket/fix-find-dependencies.patch b/ports/rsocket/fix-find-dependencies.patch new file mode 100644 index 00000000000000..287a6fa99df0fe --- /dev/null +++ b/ports/rsocket/fix-find-dependencies.patch @@ -0,0 +1,94 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f69e907..22570b5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,7 +124,7 @@ option(BUILD_BENCHMARKS "Build benchmarks" ON) + option(BUILD_EXAMPLES "Build examples" ON) + option(BUILD_TESTS "Build tests" ON) + +-enable_testing() ++#enable_testing() + + include(ExternalProject) + include(CTest) +@@ -172,7 +172,9 @@ endif() + + if("${BUILD_TYPE_LOWER}" MATCHES "debug") + message("debug mode was set") ++ if (NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unreachable-code") ++ endif() + else() + message("release mode was set") + endif() +@@ -181,18 +183,25 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + set(TEST_CXX_FLAGS ${TEST_CXX_FLAGS} -Wno-inconsistent-missing-override) + endif() + +-find_library(DOUBLE-CONVERSION double-conversion) ++find_package(double-conversion CONFIG REQUIRED) + + find_package(OpenSSL REQUIRED) + +-find_package(Gflags REQUIRED) ++find_package(gflags CONFIG REQUIRED) + +-# find glog::glog to satisfy the folly dep. +-find_package(Glog REQUIRED) ++find_package(ZLIB REQUIRED) + +-find_package(fmt CONFIG REQUIRED) ++if (BUILD_SHARED_LIBS) ++ set(gflags gflags_shared) ++else() ++ set(gflags gflags_static) ++endif() + +-include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR}) ++# find glog::glog to satisfy the folly dep. ++find_package(folly CONFIG REQUIRED) ++#find_package(glog CONFIG REQUIRED) ++# ++#find_package(fmt CONFIG REQUIRED) + + include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) + +@@ -327,7 +336,7 @@ target_compile_options( + ReactiveSocket + PRIVATE ${EXTRA_CXX_FLAGS}) + +-enable_testing() ++#enable_testing() + + install(TARGETS ReactiveSocket EXPORT rsocket-exports DESTINATION lib) + install(DIRECTORY rsocket DESTINATION include FILES_MATCHING PATTERN "*.h") +@@ -470,7 +479,7 @@ if(BUILD_TESTS) + ${GMOCK_LIBS} # This also needs the preceding `add_dependencies` + glog::glog + gflags +- ${DOUBLE-CONVERSION}) ++ double-conversion::double-conversion) + + # Download the latest TCK drivers JAR. + set(TCK_DRIVERS_JAR rsocket-tck-drivers-0.9.10.jar) +diff --git a/yarpl/CMakeLists.txt b/yarpl/CMakeLists.txt +index f4159b8..8c01ffb 100644 +--- a/yarpl/CMakeLists.txt ++++ b/yarpl/CMakeLists.txt +@@ -53,8 +53,14 @@ endif() + # Using NDEBUG in Release builds. + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") + +-find_package(Gflags REQUIRED) +-find_package(Glog REQUIRED) ++find_package(gflags CONFIG REQUIRED) ++if (BUILD_SHARED_LIBS) ++ set(gflags gflags_shared) ++else() ++ set(gflags gflags_static) ++endif() ++ ++find_package(glog CONFIG REQUIRED) + find_package(fmt CONFIG REQUIRED) + + IF(NOT FOLLY_VERSION) diff --git a/ports/rsocket/portfile.cmake b/ports/rsocket/portfile.cmake new file mode 100644 index 00000000000000..4ae31c106ef0fe --- /dev/null +++ b/ports/rsocket/portfile.cmake @@ -0,0 +1,44 @@ +# yarpl only support static build in Windows +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(ON_ARCH "x64") + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rsocket/rsocket-cpp #v2020.05.04.00 + REF 8038d05e741c3d3ecd6adb069b4a1b3daa230e14 + SHA512 d7bc93af7b6130d73fa0823f534ad57a531dfa7d7aa990a2a1a1b72b6761db7eeb60573d0d38f55daa991554e3ab4ac507047f8051a4390b3343cd708a48efbb + HEAD_REF master + PATCHES + fix-cmake-config.patch + fix-find-dependencies.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + -DBUILD_BENCHMARKS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/include/yarpl/perf + ${CURRENT_PACKAGES_DIR}/include/yarpl/cmake + ${CURRENT_PACKAGES_DIR}/include/yarpl/test + ${CURRENT_PACKAGES_DIR}/include/rsocket/examples + ${CURRENT_PACKAGES_DIR}/include/rsocket/test +) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/rsocket/vcpkg.json b/ports/rsocket/vcpkg.json new file mode 100644 index 00000000000000..cbaa74eb8b0435 --- /dev/null +++ b/ports/rsocket/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "rsocket", + "version-string": "2020.05.04.00", + "port-version": 2, + "description": "C++ implementation of RSocket http://rsocket.io", + "homepage": "https://github.com/rsocket/rsocket-cpp", + "supports": "!(windows & x64)", + "dependencies": [ + "boost-context", + "boost-filesystem", + "boost-program-options", + "boost-regex", + "boost-system", + "boost-thread", + "double-conversion", + "fmt", + "folly", + "gflags", + "glog", + "openssl", + "zlib" + ] +} diff --git a/ports/rtabmap/001_opencv.patch b/ports/rtabmap/001_opencv.patch new file mode 100644 index 00000000000000..5d3a9611ed179e --- /dev/null +++ b/ports/rtabmap/001_opencv.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1cb24ae36..a5414e26e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -320,6 +320,9 @@ IF(WITH_QT) + ENDIF() + ADD_DEFINITIONS(-DQT_NO_KEYWORDS) # To avoid conflicts with boost signals/foreach and Qt macros + ENDIF(QT4_FOUND OR Qt5_FOUND) ++ELSE() ++ # Unconditionally disable VTK related features since no visualization tools will be built. ++ ADD_DEFINITIONS("-DDISABLE_VTK") + ENDIF(WITH_QT) + + IF(WITH_SUPERPOINT_TORCH) +diff --git a/corelib/src/Features2d.cpp b/corelib/src/Features2d.cpp +index e4048eefb..862cdc68f 100644 +--- a/corelib/src/Features2d.cpp ++++ b/corelib/src/Features2d.cpp +@@ -982,7 +982,7 @@ std::vector SIFT::generateKeypointsImpl(const cv::Mat & image, con + { + UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U); + std::vector keypoints; +-#if defined(RTABMAP_NONFREE) || CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 3) ++#if defined(RTABMAP_NONFREE) && ( CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 3) ) + cv::Mat imgRoi(image, roi); + cv::Mat maskRoi; + if(!mask.empty()) +@@ -1000,7 +1000,7 @@ cv::Mat SIFT::generateDescriptorsImpl(const cv::Mat & image, std::vector 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 3) ++#if defined(RTABMAP_NONFREE) && ( CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 3) ) + _sift->compute(image, keypoints, descriptors); + + if( rootSIFT_ && !descriptors.empty()) diff --git a/ports/rtabmap/portfile.cmake b/ports/rtabmap/portfile.cmake new file mode 100644 index 00000000000000..e51690c4ec80e6 --- /dev/null +++ b/ports/rtabmap/portfile.cmake @@ -0,0 +1,89 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO introlab/rtabmap + REF 0a9d237ac2968463d36c4c9b4436871a6c3ea0ca # 0.20.3 + SHA512 47438eb07e4687855e89664479644b93f826da722c3556c30ed4b1a51cecb41494582d3ae3337ff4e0925f6db7ebf74fe29871bf930bb2eb51f5198090ac8554 + HEAD_REF master + PATCHES + 001_opencv.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_APP=OFF + -DBUILD_EXAMPLES=OFF + -DWITH_QT=OFF + -DWITH_SUPERPOINT_TORCH=OFF + -DWITH_PYMATCHER=OFF + -DWITH_FREENECT=OFF + -DWITH_FREENECT2=OFF + -DWITH_K4W2=OFF + -DWITH_K4A=OFF + -DWITH_OPENNI2=OFF + -DWITH_DC1394=OFF + -DWITH_G2O=OFF + -DWITH_GTSAM=OFF + -DWITH_CERES=OFF + -DWITH_VERTIGO=OFF + -DWITH_CVSBA=OFF + -DWITH_POINTMATCHER=OFF + -DWITH_LOAM=OFF + -DWITH_FLYCAPTURE2=OFF + -DWITH_ZED=OFF + -DWITH_REALSENSE=OFF + -DWITH_REALSENSE_SLAM=OFF + -DWITH_REALSENSE2=OFF + -DWITH_MYNTEYE=OFF + -DWITH_OCTOMAP=OFF + -DWITH_CPUTSDF=OFF + -DWITH_OPENCHISEL=OFF + -DWITH_ALICE_VISION=OFF + -DWITH_FOVIS=OFF + -DWITH_VISO2=OFF + -DWITH_DVO=OFF + -DWITH_ORB_SLAM2=OFF + -DWITH_OKVIS=OFF + -DWITH_MSCKF_VIO=OFF + -DWITH_VINS=OFF + -DWITH_FASTCV=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +vcpkg_copy_tools(TOOL_NAMES rtabmap-res_tool AUTO_CLEAN) + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES + rtabmap-camera + rtabmap-console + rtabmap-detectMoreLoopClosures + rtabmap-export + rtabmap-extractObject + rtabmap-info + rtabmap-kitti_dataset + rtabmap-recovery + rtabmap-report + rtabmap-reprocess + rtabmap-rgbd_dataset + rtabmap-euroc_dataset + AUTO_CLEAN + ) +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/rtabmap/vcpkg.json b/ports/rtabmap/vcpkg.json new file mode 100644 index 00000000000000..ef458fd628101f --- /dev/null +++ b/ports/rtabmap/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "rtabmap", + "version-string": "0.20.3", + "port-version": 1, + "description": "Real-Time Appearance-Based Mapping", + "homepage": "https://introlab.github.io/rtabmap/", + "supports": "windows & !static", + "dependencies": [ + "opencv", + "pcl", + "zlib" + ], + "features": { + "tools": { + "description": "Build tools", + "dependencies": [ + "yaml-cpp" + ] + } + } +} diff --git a/ports/rtaudio/portfile.cmake b/ports/rtaudio/portfile.cmake new file mode 100644 index 00000000000000..2d069486caf28e --- /dev/null +++ b/ports/rtaudio/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO thestk/rtaudio + REF bc7ad66581947f810ff4460396bbbd1846b1e7c8 + SHA512 ef5a41df15a8486550fb791ac21fcee4ecbf726fe9e91a56fcdd437cd554ea242f08c1061a9c6d5c261d721d86fbbcb32ce64db030976150862ed42a40137fc7 + HEAD_REF master +) + +if(VCPKG_HOST_IS_LINUX) + message(WARNING "rtaudio requires ALSA on Linux; this is available on ubuntu via apt install libasound2-dev") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(RTAUDIO_STATIC_MSVCRT ON) +else() + set(RTAUDIO_STATIC_MSVCRT OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + asio RTAUDIO_API_ASIO +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT} + -DRTAUDIO_API_JACK=OFF + -DRTAUDIO_API_PULSE=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/rtaudio/vcpkg.json b/ports/rtaudio/vcpkg.json new file mode 100644 index 00000000000000..6c24da39165273 --- /dev/null +++ b/ports/rtaudio/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "rtaudio", + "version-date": "2021-08-15", + "description": "A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO and WASAPI) operating systems.", + "homepage": "https://github.com/thestk/rtaudio", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "asio": { + "description": "Build with ASIO backend" + } + } +} diff --git a/ports/rtlsdr/Compile-with-msvc.patch b/ports/rtlsdr/Compile-with-msvc.patch new file mode 100644 index 00000000000000..5374ed41260080 --- /dev/null +++ b/ports/rtlsdr/Compile-with-msvc.patch @@ -0,0 +1,88 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2def354..674ff2d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,6 +66,12 @@ endif() + ######################################################################## + # Find build dependencies + ######################################################################## ++if(MSVC) ++find_package(pthreads) ++find_package(libusb) ++include_directories(${PThreads4W_INCLUDE_DIR}) ++include_directories(${LIBUSB_INCLUDE_DIRS}) ++else() + if(WIN32 AND NOT MINGW) + set(THREADS_USE_PTHREADS_WIN32 true) + endif() +@@ -79,6 +85,7 @@ endif() + if(NOT THREADS_FOUND) + message(FATAL_ERROR "pthreads(-win32) required to compile rtl-sdr") + endif() ++endif() + + ######################################################################## + # Create uninstall target +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 33faee7..fda4612 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -20,7 +20,11 @@ + ######################################################################## + add_library(rtlsdr SHARED librtlsdr.c + tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c tuner_r82xx.c) ++if(MSVC) ++target_link_libraries(rtlsdr ${LIBUSB_LIBRARIES}) ++else() + target_link_libraries(rtlsdr PkgConfig::LIBUSB) ++endif() + target_include_directories(rtlsdr PUBLIC + $ + $ # /include +@@ -36,7 +40,11 @@ generate_export_header(rtlsdr) + ######################################################################## + add_library(rtlsdr_static STATIC librtlsdr.c + tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c tuner_r82xx.c) ++if(MSVC) ++target_link_libraries(rtlsdr_static ${LIBUSB_LIBRARIES}) ++else() + target_link_libraries(rtlsdr_static PkgConfig::LIBUSB) ++endif() + target_include_directories(rtlsdr_static PUBLIC + $ + $ # /include +@@ -58,8 +66,8 @@ IF(MSVC) + ${CMAKE_CURRENT_SOURCE_DIR}/rtlsdr.rc.in + ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc + @ONLY) +- target_sources(rtlsdr ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) +- target_sources(rtlsdr_static ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) ++ target_sources(rtlsdr PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) ++ target_sources(rtlsdr_static PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) + ENDIF(MSVC) + + ######################################################################## +@@ -77,6 +85,11 @@ add_library(libgetopt_static STATIC + target_link_libraries(convenience_static + rtlsdr + ) ++if(MSVC) ++target_link_libraries(convenience_static ++ ${PThreads4W_LIBRARY} ++) ++endif() + endif() + + ######################################################################## +diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c +index 562198f..b4bfa51 100644 +--- a/src/rtl_tcp.c ++++ b/src/rtl_tcp.c +@@ -35,6 +35,7 @@ + #include + #else + #include ++#include + #include "getopt/getopt.h" + #endif + diff --git a/ports/rtlsdr/Findlibusb.cmake b/ports/rtlsdr/Findlibusb.cmake new file mode 100644 index 00000000000000..052ae21dfc2eb1 --- /dev/null +++ b/ports/rtlsdr/Findlibusb.cmake @@ -0,0 +1,17 @@ +find_path( + LIBUSB_INCLUDE_DIRS + NAMES libusb.h + PATH_SUFFIXES libusb-1.0 +) + +find_library( + LIBUSB_LIBRARIES + NAMES libusb-1.0 +) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args( + LIBUSB + REQUIRED_VARS LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS +) diff --git a/ports/rtlsdr/fix-version.patch b/ports/rtlsdr/fix-version.patch new file mode 100644 index 00000000000000..854a054abafcca --- /dev/null +++ b/ports/rtlsdr/fix-version.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/modules/Version.cmake b/cmake/modules/Version.cmake +index 2d4e76d..6acffe2 100644 +--- a/cmake/modules/Version.cmake ++++ b/cmake/modules/Version.cmake +@@ -39,7 +39,9 @@ if(GIT_FOUND) + OUTPUT_VARIABLE GIT_DESCRIBE OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) +-else() ++endif() ++ ++if ("${GIT_DESCRIBE}" STREQUAL "") + set(GIT_DESCRIBE "v${MAJOR_VERSION}.${MINOR_VERSION}.x-xxx-xunknown") + endif() + diff --git a/ports/rtlsdr/portfile.cmake b/ports/rtlsdr/portfile.cmake new file mode 100644 index 00000000000000..fdf48429032381 --- /dev/null +++ b/ports/rtlsdr/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_fail_port_install( + ON_TARGET "uwp" "linux" "osx" "android" "freebsd" + ON_ARCH "arm" "arm64" +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osmocom/rtl-sdr + REF d794155ba65796a76cd0a436f9709f4601509320 + SHA512 21fe10f1dbecca651650f03d1008560930fac439d220c33b4a23acce98d78d8476ff200765eed8cfa6cddde761d45f7ba36c8b5bc3662aa85819172830ea4938 + HEAD_REF master + PATCHES + Compile-with-msvc.patch + fix-version.patch +) + +file( + COPY ${CMAKE_CURRENT_LIST_DIR}/Findlibusb.cmake + DESTINATION ${SOURCE_PATH}/cmake/Modules +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rtlsdr) +vcpkg_copy_pdbs() + +file( + INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/rtlsdr + RENAME copyright +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(GLOB DEBUG_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") + file(GLOB RELEASE_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") + file( + INSTALL ${RELEASE_TOOLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} + ) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${DEBUG_TOOLS} ${RELEASE_TOOLS}) +endif() diff --git a/ports/rtlsdr/vcpkg.json b/ports/rtlsdr/vcpkg.json new file mode 100644 index 00000000000000..1dbd2b0da36b13 --- /dev/null +++ b/ports/rtlsdr/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "rtlsdr", + "version-string": "2020-04-16", + "port-version": 2, + "description": "rtl-sdr is a library that turns your Realtek RTL2832 based DVB dongle into a SDR receiver", + "homepage": "https://osmocom.org/projects/rtl-sdr", + "supports": "windows & (x86 | x64)", + "dependencies": [ + "libusb", + { + "name": "pthreads", + "platform": "windows" + } + ] +} diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt deleted file mode 100644 index 91782fd1817485..00000000000000 --- a/ports/rtmidi/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(rtmidi CXX) - -add_library(rtmidi RtMidi.cpp rtmidi_c.cpp) -if(BUILD_SHARED_LIBS) - target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) -endif() - -file(READ "${PROJECT_SOURCE_DIR}/rtmidi_c.h" RTMIDI_EXPORT) -if (BUILD_SHARED_LIBS) - string(REPLACE "if defined(RTMIDI_EXPORT)" "if 1" RTMIDI_EXPORT "${RTMIDI_EXPORT}") -else() - string(REPLACE "if defined(RTMIDI_EXPORT)" "if 0" RTMIDI_EXPORT "${RTMIDI_EXPORT}") -endif() -file(WRITE "${PROJECT_BINARY_DIR}/rtmidi_c.h" "${RTMIDI_EXPORT}") - -install( - TARGETS rtmidi - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES "RtMidi.h" DESTINATION include) - install(FILES "${PROJECT_BINARY_DIR}/rtmidi_c.h" DESTINATION include) -endif() diff --git a/ports/rtmidi/CONTROL b/ports/rtmidi/CONTROL deleted file mode 100644 index 3742ec9b16a450..00000000000000 --- a/ports/rtmidi/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: rtmidi -Version: 4.0.0 -Homepage: https://github.com/thestk/rtmidi -Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia) diff --git a/ports/rtmidi/portfile.cmake b/ports/rtmidi/portfile.cmake index 8aa949b5a4cea5..8d1316ff68cc12 100644 --- a/ports/rtmidi/portfile.cmake +++ b/ports/rtmidi/portfile.cmake @@ -1,22 +1,30 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") + +# Upstream uses CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS, which causes issues +# https://github.com/thestk/rtmidi/blob/4.0.0/CMakeLists.txt#L20 +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO thestk/rtmidi - REF 4.0.0 - SHA512 39383f121320c9471b31f8b9d283167bfadf4c7328b6664d1d54a4c52e3dd9b76362875258d90363c6044e87fcee31ccce80e19435dc620c88e6d60fc82d0f9d + REF dda792c5394375769466ab1c1d7773e741bbd950 # 4.0.0 + SHA512 cb1ded29c0b22cf7f38719131a9572a4daba7071fd8cf8b5b8d7306560a218bb0ef42150bf341b76f4ddee0ae087da975116c3b153e7bb908f2a674ecacb9d7a HEAD_REF master - PATCHES - fix-POSIXname.patch + PATCHES + fix-POSIXname.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRTMIDI_API_ALSA=OFF + -DRTMIDI_API_JACK=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/rtmidi RENAME copyright) +file(INSTALL "${SOURCE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/rtmidi/vcpkg.json b/ports/rtmidi/vcpkg.json new file mode 100644 index 00000000000000..82d6c482c962b6 --- /dev/null +++ b/ports/rtmidi/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "rtmidi", + "version-semver": "4.0.0", + "port-version": 3, + "description": "A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia)", + "homepage": "https://github.com/thestk/rtmidi", + "supports": "!uwp" +} diff --git a/ports/rttr/CONTROL b/ports/rttr/CONTROL deleted file mode 100644 index 7394927840ad71..00000000000000 --- a/ports/rttr/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: rttr -Version: 0.9.6-1 -Homepage: https://github.com/rttrorg/rttr -Description: an easy and intuitive way to use reflection in C++ diff --git a/ports/rttr/Fix-depends.patch b/ports/rttr/Fix-depends.patch new file mode 100644 index 00000000000000..8357a47c2628e6 --- /dev/null +++ b/ports/rttr/Fix-depends.patch @@ -0,0 +1,14 @@ +diff --git a/CMake/3rd_party_libs.cmake b/CMake/3rd_party_libs.cmake +index dca5071..4dd4471 100644 +--- a/CMake/3rd_party_libs.cmake ++++ b/CMake/3rd_party_libs.cmake +@@ -51,7 +51,8 @@ if (BUILD_BENCHMARKS) + find_package(Threads REQUIRED) + endif() + +-set(RAPID_JSON_DIR ${RTTR_3RD_PARTY_DIR}/rapidjson-1.1.0) ++find_package(RapidJSON CONFIG REQUIRED) ++set(RAPID_JSON_DIR ${RAPIDJSON_INCLUDE_DIRS}) + set(NONIUS_DIR ${RTTR_3RD_PARTY_DIR}/nonius-1.1.2) + + # Prepare "Catch" library for other executables diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index cb3bfe68cf01ce..56700768b9377f 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rttrorg/rttr @@ -8,7 +6,8 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-directory-output.patch - remove-owner-read-perms.patch + Fix-depends.patch + remove-owner-read-perms.patch ) #Handle static lib @@ -43,8 +42,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() #Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/rttr/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/rttr/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share diff --git a/ports/rttr/vcpkg.json b/ports/rttr/vcpkg.json new file mode 100644 index 00000000000000..fc7ff33bca8daa --- /dev/null +++ b/ports/rttr/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "rttr", + "version-string": "0.9.6", + "port-version": 3, + "description": "an easy and intuitive way to use reflection in C++", + "homepage": "https://github.com/rttrorg/rttr", + "dependencies": [ + "rapidjson" + ] +} diff --git a/ports/rxcpp/CONTROL b/ports/rxcpp/CONTROL deleted file mode 100644 index 2ada65d3bda85e..00000000000000 --- a/ports/rxcpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: rxcpp -Version: 4.1.0 -Homepage: https://github.com/Reactive-Extensions/RxCpp -Description: Reactive Extensions for C++ \ No newline at end of file diff --git a/ports/rxcpp/portfile.cmake b/ports/rxcpp/portfile.cmake index 5844f469b49aa3..b98701132e178f 100644 --- a/ports/rxcpp/portfile.cmake +++ b/ports/rxcpp/portfile.cmake @@ -1,25 +1,22 @@ -#header-only library -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/RxCpp-4.0.0) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO Reactive-Extensions/RxCpp + REPO ReactiveX/RxCpp REF v4.1.0 SHA512 a92e817ecbdf6f235cae724ada2615af9fa0c243249625d0f2c2f09ff5dd7f53fdabd03a0278fe2995fe27528c5511d71f87b7a6b3d54f73b49b65aef56e32fd HEAD_REF master + PATCHES support_find_package.patch ) -file(INSTALL - ${SOURCE_PATH}/Rx/v2/src/rxcpp - DESTINATION ${CURRENT_PACKAGES_DIR}/include +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF ) -file(INSTALL - ${SOURCE_PATH}/Ix/CPP/src/cpplinq - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}/cmake/) -file(INSTALL - ${SOURCE_PATH}/license.md - DESTINATION ${CURRENT_PACKAGES_DIR}/share/rxcpp RENAME copyright) \ No newline at end of file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(COPY ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/license.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/rxcpp/support_find_package.patch b/ports/rxcpp/support_find_package.patch new file mode 100644 index 00000000000000..bb1da2d2d77438 --- /dev/null +++ b/ports/rxcpp/support_find_package.patch @@ -0,0 +1,32 @@ +diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt +index 3d0744740..293f187c5 100644 +--- a/projects/CMake/CMakeLists.txt ++++ b/projects/CMake/CMakeLists.txt +@@ -146,3 +146,27 @@ set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE CACHE BOOL "Don't require all project + + install(DIRECTORY ${RXCPP_DIR}/Rx/v2/src/rxcpp/ DESTINATION include/rxcpp + FILES_MATCHING PATTERN "*.hpp") ++ ++# Here we are exporting TARGETS so that other projects can import rxcpp ++# just with find_package(rxcpp CONFIG) after rxcpp is installed into system by "make install". ++add_library(rxcpp INTERFACE) ++ ++target_include_directories(rxcpp INTERFACE ++ $ ++ $ ++) ++ ++install(TARGETS rxcpp EXPORT rxcppConfig) ++install(EXPORT rxcppConfig DESTINATION share/rxcpp/cmake) ++ ++# When find_package(rxcpp SOME_VERSION REQUIRED) will be used in third party project ++# where SOME_VERSION is any version incompatible with ${PROJECT_VERSION} then cmake will generate the error. ++# It means you don't need track versions manually. ++include(CMakePackageConfigHelpers) ++write_basic_package_version_file("${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake" ++ VERSION ++ ${PROJECT_VERSION} ++ COMPATIBILITY ++ AnyNewerVersion ++) ++install(FILES "${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake" DESTINATION share/rxcpp/cmake) diff --git a/ports/rxcpp/vcpkg.json b/ports/rxcpp/vcpkg.json new file mode 100644 index 00000000000000..013aa46a3e6222 --- /dev/null +++ b/ports/rxcpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "rxcpp", + "version-string": "4.1.0", + "port-version": 2, + "description": "Reactive Extensions for C++", + "homepage": "https://github.com/Reactive-Extensions/RxCpp" +} diff --git a/ports/rxqt/CONTROL b/ports/rxqt/CONTROL deleted file mode 100644 index eeaab0986669a7..00000000000000 --- a/ports/rxqt/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: rxqt -Version: bb2138c -Description: The Reactive Extensions for Qt. -Homepage: https://github.com/tetsurom/rxqt -Build-Depends: rxcpp \ No newline at end of file diff --git a/ports/rxqt/portfile.cmake b/ports/rxqt/portfile.cmake index f84bf7c7cebe3b..34799c346c38cd 100644 --- a/ports/rxqt/portfile.cmake +++ b/ports/rxqt/portfile.cmake @@ -1,7 +1,5 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tetsurom/rxqt diff --git a/ports/rxqt/vcpkg.json b/ports/rxqt/vcpkg.json new file mode 100644 index 00000000000000..71638f964408d2 --- /dev/null +++ b/ports/rxqt/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "rxqt", + "version-string": "bb2138c", + "port-version": 1, + "description": "The Reactive Extensions for Qt.", + "homepage": "https://github.com/tetsurom/rxqt", + "dependencies": [ + "rxcpp" + ] +} diff --git a/ports/rxspencer/portfile.cmake b/ports/rxspencer/portfile.cmake new file mode 100644 index 00000000000000..92e4fd31f06530 --- /dev/null +++ b/ports/rxspencer/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO garyhouston/rxspencer + REF 9f835b523f1af617ca54e06863a1924c23f6e56a #v3.9.0 + SHA512 fe7721bd4b4e4f7d31fd5a7e42d34d0c9735d062d8b146ee47a25f87c809eead7133265fc37fa958c37bc4ffeaf101d143202080508d98efd160b8fd0a278598 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCMAKE_CONFIG_DEST=share/rxspencer + -Drxshared=${BUILD_SHARED} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH "share/rxspencer") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/regex") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/rxspencer/vcpkg.json b/ports/rxspencer/vcpkg.json new file mode 100644 index 00000000000000..a4fef35bebbabf --- /dev/null +++ b/ports/rxspencer/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "rxspencer", + "version": "3.9.0", + "description": "Henry Spencer's BSD regular expression library.", + "homepage": "https://garyhouston.github.io/regex/", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/ryml/cmake-fix.patch b/ports/ryml/cmake-fix.patch new file mode 100644 index 00000000000000..e8a01c5a641a73 --- /dev/null +++ b/ports/ryml/cmake-fix.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3e4eb23..115b8aa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,8 +20,7 @@ option(RYML_BUILD_API "Enable API generation (python, etc)" OFF) + + #------------------------------------------------------- + +-c4_require_subproject(c4core INCORPORATE +- SUBDIRECTORY ${RYML_EXT_DIR}/c4core) ++find_package(c4core CONFIG REQUIRED) + + c4_add_library(ryml + SOURCES +@@ -46,10 +46,10 @@ c4_add_library(ryml + ryml.natvis + SOURCE_ROOT ${RYML_SRC_DIR} + INC_DIRS ++ $ + $ + $ +- LIBS c4core +- INCORPORATE c4core ++ LIBS c4core::c4core + ) + + if(NOT RYML_DEFAULT_CALLBACKS) + diff --git a/ports/ryml/portfile.cmake b/ports/ryml/portfile.cmake new file mode 100644 index 00000000000000..f3e2bf5c29dc91 --- /dev/null +++ b/ports/ryml/portfile.cmake @@ -0,0 +1,77 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install( + ON_TARGET "OSX" +) + +# Get rapidyaml src +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO biojppm/rapidyaml + REF affafd5db67208eb85413327595507314c068525 + SHA512 31d827ead680828b3c0ad879290b17d4729d412e30a20459aea4b92a8f4f3b8397f82b09c27d918ab4b955289560b17697d5f15eaa4d24661ff46f5dbbc50fa8 + HEAD_REF master + PATCHES cmake-fix.patch +) + +set(CM_COMMIT_HASH fe41e86552046c3df9ba73a40bf3d755df028c1e) + +# Get cmake scripts for rapidyaml +vcpkg_download_distfile(CMAKE_ARCHIVE + URLS "https://github.com/biojppm/cmake/archive/${CM_COMMIT_HASH}.zip" + FILENAME "cmake-${CM_COMMIT_HASH}.zip" + SHA512 7292f9856d9c41581f2731e73fdf08880e0f4353b757da38a13ec89b62c5c8cb52b9efc1a9ff77336efa0b6809727c17649e607d8ecacc965a9b2a7a49925237 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_CMAKE + ARCHIVE ${CMAKE_ARCHIVE} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps" +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/ext/c4core/cmake") +file(RENAME ${SOURCE_PATH_CMAKE} "${SOURCE_PATH}/ext/c4core/cmake") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + def-callbacks RYML_DEFAULT_CALLBACKS + dbg RYML_DBG +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/ryml) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ryml) +endif() + +# Move headers and natvis to own dir +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include/ryml") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/ryml.hpp" "${CURRENT_PACKAGES_DIR}/include/ryml/ryml.hpp") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/ryml_std.hpp" "${CURRENT_PACKAGES_DIR}/include/ryml/ryml_std.hpp") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/ryml.natvis" "${CURRENT_PACKAGES_DIR}/include/ryml/ryml.natvis") + +# Fix paths in headers file +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ryml/ryml.hpp" "./c4" "../c4") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ryml/ryml_std.hpp" "./c4" "../c4") + +# Fix paths in config file +file(READ "${CURRENT_PACKAGES_DIR}/share/ryml/rymlConfig.cmake" _contents) +string(REGEX REPLACE [[[ \t\r\n]*"\${PACKAGE_PREFIX_DIR}[\./\\]*"]] [["${PACKAGE_PREFIX_DIR}/../.."]] _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/ryml/rymlConfig.cmake" "${_contents}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL + "${SOURCE_PATH}/LICENSE.txt" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ryml/vcpkg.json b/ports/ryml/vcpkg.json new file mode 100644 index 00000000000000..01ec79dea3f659 --- /dev/null +++ b/ports/ryml/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "ryml", + "version-date": "2021-07-24", + "description": "Rapid YAML library", + "homepage": "https://github.com/biojppm/rapidyaml", + "supports": "!osx", + "dependencies": [ + { + "name": "c4core", + "default-features": false + } + ], + "default-features": [ + "def-callbacks" + ], + "features": { + "dbg": { + "description": "Enable (very verbose) ryml debug prints." + }, + "def-callbacks": { + "description": "Enable ryml's default implementation of callbacks: allocate(), free(), error()" + } + } +} diff --git a/ports/ryu/portfile.cmake b/ports/ryu/portfile.cmake new file mode 100644 index 00000000000000..332de8d31a5311 --- /dev/null +++ b/ports/ryu/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ulfjack/ryu + REF v2.0 + SHA512 88a0cca74a4889e8e579987abdc75a6ac87c1cdae557e5a15c29dbfd65733f9e591d6569e97a9374444918475099087f8056e696a97c9be24e38eb737e2304c2 + HEAD_REF master +) + +vcpkg_find_acquire_program(BAZEL) +get_filename_component(BAZEL_DIR "${BAZEL}" DIRECTORY) +vcpkg_add_to_path(PREPEND ${BAZEL_DIR}) +set(ENV{BAZEL_BIN_PATH} "${BAZEL}") + +if (CMAKE_HOST_WIN32) + set(ENV{BAZEL_VS} $ENV{VSInstallDir}) + set(ENV{BAZEL_VC} $ENV{VCInstallDir}) +endif () + +vcpkg_execute_build_process( + COMMAND ${BAZEL} build --verbose_failures --strategy=CppCompile=standalone //ryu //ryu:ryu_printf + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + +if (CMAKE_HOST_WIN32) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/ryu.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/ryu.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/ryu_printf.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/ryu_printf.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +else() + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/libryu.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/libryu.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/libryu_printf.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/libryu_printf.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE-Boost DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/ryu/ryu.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/ryu/) +file(INSTALL ${SOURCE_PATH}/ryu/ryu2.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/ryu/) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/ryuConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/ryu/ryuConfig.cmake b/ports/ryu/ryuConfig.cmake new file mode 100644 index 00000000000000..76e489d19245d5 --- /dev/null +++ b/ports/ryu/ryuConfig.cmake @@ -0,0 +1,26 @@ +function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + set(${NAMESPACE}_${LIB_NAME}_FOUND 1) +endfunction() + +get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) + +if (TRUE) +find_library(RYU_RELEASE_LIB ryu PATHS "${ROOT}/lib" NO_DEFAULT_PATH) +find_library(RYU_DEBUG_LIB ryu PATHS "${ROOT}/debug/lib" NO_DEFAULT_PATH) +find_library(RYUPF_RELEASE_LIB ryu_printf PATHS "${ROOT}/lib" NO_DEFAULT_PATH) +find_library(RYUPF_DEBUG_LIB ryu_printf PATHS "${ROOT}/debug/lib" NO_DEFAULT_PATH) +set_library_target("RYU" "ryu" "${RYU_DEBUG_LIB}" "${RYU_RELEASE_LIB}" "${ROOT}/include/") +set_library_target("RYU" "ryu_printf" "${RYUPF_DEBUG_LIB}" "${RYUPF_RELEASE_LIB}" "${ROOT}/include/") +else() +set_library_target("RYU" "ryu" "${ROOT}/debug/lib/libryu.a" "${ROOT}/lib/libryu.a" "${ROOT}/include/") +set_library_target("RYU" "ryu_printf" "${ROOT}/debug/lib/libryu_printf.a" "${ROOT}/lib/libryu_printf.a" "${ROOT}/include/") +endif() diff --git a/ports/ryu/vcpkg.json b/ports/ryu/vcpkg.json new file mode 100644 index 00000000000000..52d1ea6d76beb9 --- /dev/null +++ b/ports/ryu/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "ryu", + "version-string": "2.0", + "port-version": 5, + "description": "Ryu generates the shortest decimal representation of a floating point number that maintains round-trip safety.", + "homepage": "https://github.com/ulfjack/ryu", + "supports": "!(uwp | arm | x86)" +} diff --git a/ports/s2n/fix-cmake-target-path.patch b/ports/s2n/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..f83ac21e62b253 --- /dev/null +++ b/ports/s2n/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 132f414..c7cfb5f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -503,7 +503,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/${TARGET_DIR}" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/s2n-config.cmake b/cmake/s2n-config.cmake +index 09d1c3a..4e76ed6 100644 +--- a/cmake/s2n-config.cmake ++++ b/cmake/s2n-config.cmake +@@ -8,9 +8,5 @@ endif() + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/modules") + find_dependency(LibCrypto) + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/ports/s2n/portfile.cmake b/ports/s2n/portfile.cmake new file mode 100644 index 00000000000000..ee7d239069b40f --- /dev/null +++ b/ports/s2n/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aws/s2n-tls + REF b5b313b9ccddf268b30c642798f1d2a58d49ecd6 # v1.0.17 + SHA512 59750c9a3c9330e2b26b84d45665b222d23475090736d8299f81352c839a09af10be0d49d34ced1dadae65ca255e819df45b648387e26b7dca31d74782fdb834 + PATCHES fix-cmake-target-path.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) + +vcpkg_cmake_install() + +file(GLOB SHARED_CMAKE_FILES + "${CURRENT_PACKAGES_DIR}/debug/lib/s2n" + ) +file(COPY "${SHARED_CMAKE_FILES}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/") + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug" + "${CURRENT_PACKAGES_DIR}/lib/s2n" + ) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/s2n/vcpkg.json b/ports/s2n/vcpkg.json new file mode 100644 index 00000000000000..d1fda96cae8494 --- /dev/null +++ b/ports/s2n/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "s2n", + "version": "1.0.17", + "description": "C99 implementation of the TLS/SSL protocols.", + "homepage": "https://github.com/aws/s2n-tls", + "supports": "!uwp & !windows", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/safeint/CONTROL b/ports/safeint/CONTROL deleted file mode 100644 index 6ac85d36b0c66e..00000000000000 --- a/ports/safeint/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: safeint -Version: 3.20.0 -Description: SafeInt is a class library for C++ that manages integer overflows diff --git a/ports/safeint/portfile.cmake b/ports/safeint/portfile.cmake index bacd54541c9a01..298dd559f9a56b 100644 --- a/ports/safeint/portfile.cmake +++ b/ports/safeint/portfile.cmake @@ -1,13 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO dcleblanc/SafeInt - REF 3.20.0 - SHA512 ebd10ac2578b4ab7968b2f89b7c8114a55bfd1967d625498a555b5354acf5a8c6b145b38429eb0dc853e7a0a33728a2a5acb505888bc983e7b0de81d09f50918 + REF 3.0.26 + SHA512 fc58c244d8d4999ccfb89bcc214646d27238fd2e4e3081accb937276ebd3010807548576f6db1baf08878175133f4f6925773b4376df7669b65ed5c1e6572e26 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/SafeInt.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/safeint RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/safeint/vcpkg.json b/ports/safeint/vcpkg.json new file mode 100644 index 00000000000000..aa544da3beed08 --- /dev/null +++ b/ports/safeint/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "safeint", + "version": "3.0.26", + "description": "SafeInt is a class library for C++ that manages integer overflows", + "homepage": "https://github.com/dcleblanc/SafeInt" +} diff --git a/ports/sail/portfile.cmake b/ports/sail/portfile.cmake new file mode 100644 index 00000000000000..5be00ca62fbeef --- /dev/null +++ b/ports/sail/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO HappySeaFox/sail + REF v0.9.0-pre16 + SHA512 dca4b930c78d0d330cde0a0255efae6042e11914eec37be35b1fc39eaf3855a47f5b2d07be17c8b4c67f569acfab2cfe7ff86aaeba60eed4bbf2be637b1bf192 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SAIL_STATIC) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + + OPTIONS + -DSAIL_STATIC=${SAIL_STATIC} + -DSAIL_COMBINE_CODECS=ON + -DSAIL_BUILD_EXAMPLES=OFF + -DSAIL_BUILD_TESTS=OFF +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +# Remove duplicate files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Move cmake configs +vcpkg_cmake_config_fixup(PACKAGE_NAME sail CONFIG_PATH lib/cmake/sail DO_NOT_DELETE_PARENT_CONFIG_PATH) +vcpkg_cmake_config_fixup(PACKAGE_NAME sailcodecs CONFIG_PATH lib/cmake/sailcodecs DO_NOT_DELETE_PARENT_CONFIG_PATH) +vcpkg_cmake_config_fixup(PACKAGE_NAME sailcommon CONFIG_PATH lib/cmake/sailcommon DO_NOT_DELETE_PARENT_CONFIG_PATH) +vcpkg_cmake_config_fixup(PACKAGE_NAME sailc++ CONFIG_PATH lib/cmake/sailc++ DO_NOT_DELETE_PARENT_CONFIG_PATH) +vcpkg_cmake_config_fixup(PACKAGE_NAME sailmanip CONFIG_PATH lib/cmake/sailmanip DO_NOT_DELETE_PARENT_CONFIG_PATH) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake" + "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") + + +# Fix pkg-config files +vcpkg_fixup_pkgconfig() + +# Handle usage +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/sail/usage b/ports/sail/usage new file mode 100644 index 00000000000000..bf901e2e88c21c --- /dev/null +++ b/ports/sail/usage @@ -0,0 +1,11 @@ +The package sail provides CMake targets: + +C libraries: + + find_package(Sail CONFIG REQUIRED) + target_link_libraries(main PRIVATE SAIL::sail) + +C++ bindings: + + find_package(SailC++ CONFIG REQUIRED) + target_link_libraries(main PRIVATE SAIL::sail-c++) diff --git a/ports/sail/vcpkg.json b/ports/sail/vcpkg.json new file mode 100644 index 00000000000000..df5d694f2d81ea --- /dev/null +++ b/ports/sail/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "sail", + "version-semver": "0.9.0-pre16", + "description": "The missing small and fast image decoding library for humans (not for machines)", + "homepage": "https://github.com/HappySeaFox/sail", + "supports": "!uwp", + "dependencies": [ + "giflib", + "libavif", + "libjpeg-turbo", + "libpng", + "libwebp", + "tiff", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/sais/CONTROL b/ports/sais/CONTROL deleted file mode 100644 index 3c6262c6b054d1..00000000000000 --- a/ports/sais/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: sais -Version: 2.4.1 -Description: An implementation of the induced sorting algorithm diff --git a/ports/sais/portfile.cmake b/ports/sais/portfile.cmake index 0387f1313d54c0..0e5240b0bdc0c0 100644 --- a/ports/sais/portfile.cmake +++ b/ports/sais/portfile.cmake @@ -1,12 +1,14 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sais-2.4.1) vcpkg_download_distfile(ARCHIVE URLS "https://sites.google.com/site/yuta256/sais-2.4.1.zip" FILENAME "sais-2.4.1.zip" SHA512 6f6dd11f842f680bebc1d9b7f6b75752c9589c600fdd5e6373bb7290a686f1de35d4cc3226347e717f89a295363f7fee0ae8b1aa05ad341f4c2ea056fb5b1425 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -20,7 +22,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sais RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sais/vcpkg.json b/ports/sais/vcpkg.json new file mode 100644 index 00000000000000..59f2e9ad80d42e --- /dev/null +++ b/ports/sais/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "sais", + "version-string": "2.4.1", + "port-version": 2, + "description": "An implementation of the induced sorting algorithm" +} diff --git a/ports/sajson/CONTROL b/ports/sajson/CONTROL deleted file mode 100644 index c990cd3dfdabfe..00000000000000 --- a/ports/sajson/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: sajson -Version: 2018-09-21 -Description: Lightweight, extremely high-performance JSON parser for C++11 diff --git a/ports/sajson/portfile.cmake b/ports/sajson/portfile.cmake index 662ab01f718c2d..4fd0cac33d1c10 100644 --- a/ports/sajson/portfile.cmake +++ b/ports/sajson/portfile.cmake @@ -1,7 +1,5 @@ # Header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO chadaustin/sajson diff --git a/ports/sajson/vcpkg.json b/ports/sajson/vcpkg.json new file mode 100644 index 00000000000000..2cde87c546ed8b --- /dev/null +++ b/ports/sajson/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "sajson", + "version-string": "2018-09-21", + "port-version": 1, + "description": "Lightweight, extremely high-performance JSON parser for C++11" +} diff --git a/ports/sassc/portfile.cmake b/ports/sassc/portfile.cmake new file mode 100644 index 00000000000000..764873d043e629 --- /dev/null +++ b/ports/sassc/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sass/sassc + REF 46748216ba0b60545e814c07846ca10c9fefc5b6 # 3.6.1 + SHA512 98c5943ec485251fd5e3f41bcfe80dbbc6e2f334d4b6947895d3821b30009c40fb7cb944403304cede70360a5dd0ac103262644ef37a56e0fa76163657fbcc32 + HEAD_REF master + PATCHES remove_compiler_flags.patch +) + +find_library(LIBSASS_DEBUG sass PATHS "${CURRENT_INSTALLED_DIR}/debug/lib/" NO_DEFAULT_PATH) +find_library(LIBSASS_RELEASE sass PATHS "${CURRENT_INSTALLED_DIR}/lib/" NO_DEFAULT_PATH) +if(VCPKG_TARGET_IS_WINDOWS) + set(ENV{LIBS} "$ENV{LIBS} -lgetopt") +endif() +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + --with-libsass-include='${CURRENT_INSTALLED_DIR}/include' + OPTIONS_DEBUG + --with-libsass-lib='${LIBSASS_DEBUG}' + OPTIONS_RELEASE + --with-libsass-lib='${LIBSASS_RELEASE}' +) +vcpkg_install_make(MAKEFILE GNUmakefile) +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) \ No newline at end of file diff --git a/ports/sassc/remove_compiler_flags.patch b/ports/sassc/remove_compiler_flags.patch new file mode 100644 index 00000000000000..c5f644276bbdf1 --- /dev/null +++ b/ports/sassc/remove_compiler_flags.patch @@ -0,0 +1,12 @@ +diff --git a/GNUmakefile.am b/GNUmakefile.am +index 58e8aecd1..da6a7db98 100644 +--- a/GNUmakefile.am ++++ b/GNUmakefile.am +@@ -1,6 +1,6 @@ + ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -I script + +-AM_COPT = -Wall -O2 ++AM_COPT = + AM_COVLDFLAGS = + + if ENABLE_COVERAGE diff --git a/ports/sassc/vcpkg.json b/ports/sassc/vcpkg.json new file mode 100644 index 00000000000000..8b89777bc1c1df --- /dev/null +++ b/ports/sassc/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "sassc", + "version-string": "3.6.1", + "port-version": 1, + "description": "SassC is a wrapper around libsass (http://github.com/sass/libsass) used to generate a useful command-line application that can be installed and packaged for several operating systems.", + "homepage": "https://github.com/sass/sassc", + "dependencies": [ + "getopt", + "libsass" + ] +} diff --git a/ports/sbp/portfile.cmake b/ports/sbp/portfile.cmake new file mode 100644 index 00000000000000..219a548793bbaf --- /dev/null +++ b/ports/sbp/portfile.cmake @@ -0,0 +1,47 @@ +# Windows shared libraries are not supported yet +# See https://github.com/swift-nav/libsbp/issues/1062 +vcpkg_fail_port_install(ON_TARGET "uwp") + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO swift-nav/libsbp + REF v3.4.10 + SHA512 bbdcefad9ff8995759b577790bcffb94355bd0ee29f259fa8d51f54907e252b55871dc5a841e21d23e661fd5b33109761eb20b66c2fb73e9e7de8a34cc8d6528 + HEAD_REF master + PATCHES + "win32-install-fix.patch" +) + +vcpkg_from_github( + OUT_SOURCE_PATH CMAKE_EXTRA_MODS + REPO swift-nav/cmake + REF 373d4fcafbbc0c208dc9ecb278d36ed8c9448eda + SHA512 afefc8c7a3fb43ee65b9b8733968a5836938460abbf1bc9e8330f83c3ac4a5819f71a36dcb034004296161c592f4d61545ba10016d6666e7eaf1dca556d99e2e + HEAD_REF master +) + +# Copy cmake files to expected location +file(INSTALL "${CMAKE_EXTRA_MODS}/CCache.cmake" DESTINATION "${SOURCE_PATH}/c/cmake/common") +file(INSTALL "${CMAKE_EXTRA_MODS}/SwiftCmakeOptions.cmake" DESTINATION "${SOURCE_PATH}/c/cmake/common") +file(INSTALL "${CMAKE_EXTRA_MODS}/CompileOptions.cmake" DESTINATION "${SOURCE_PATH}/c/cmake/common") +file(INSTALL "${CMAKE_EXTRA_MODS}/LanguageStandards.cmake" DESTINATION "${SOURCE_PATH}/c/cmake/common") +file(INSTALL "${CMAKE_EXTRA_MODS}/ClangFormat.cmake" DESTINATION "${SOURCE_PATH}/c/cmake/common") +file(INSTALL "${CMAKE_EXTRA_MODS}/ClangTidy.cmake" DESTINATION "${SOURCE_PATH}/c/cmake/common") +file(INSTALL "${CMAKE_EXTRA_MODS}/CodeCoverage.cmake" DESTINATION "${SOURCE_PATH}/c/cmake/common") +file(INSTALL "${CMAKE_EXTRA_MODS}/TestTargets.cmake" DESTINATION "${SOURCE_PATH}/c/cmake/common") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/c" + OPTIONS + -Dlibsbp_ENABLE_TESTS=OFF + -Dlibsbp_ENABLE_DOCS=OFF +) + +vcpkg_cmake_install() +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/sbp/vcpkg.json b/ports/sbp/vcpkg.json new file mode 100644 index 00000000000000..248dc3139e1ca0 --- /dev/null +++ b/ports/sbp/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "sbp", + "version-semver": "3.4.10", + "description": "Swift Navigation Binary Protocol (SBP) is a binary protocol for communicating GNSS data used by Piksi devices.", + "homepage": "https://github.com/swift-nav/libsbp", + "documentation": "https://support.swiftnav.com/support/solutions/articles/44001850782-swift-binary-protocol", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/sbp/win32-install-fix.patch b/ports/sbp/win32-install-fix.patch new file mode 100644 index 00000000000000..5c880d3810ce14 --- /dev/null +++ b/ports/sbp/win32-install-fix.patch @@ -0,0 +1,27 @@ +commit 6023d12ca2df861b134b345151d2463a963e50c4 +Author: Rodrigo Reichert +Date: Wed Aug 4 13:24:43 2021 +1000 + + ESD-2166 Fix windows install dll directory (#1061) + +diff --git a/c/src/CMakeLists.txt b/c/src/CMakeLists.txt +index b00fa523..1019683f 100644 +--- a/c/src/CMakeLists.txt ++++ b/c/src/CMakeLists.txt +@@ -27,9 +27,13 @@ if (MINGW) + endif() + endif() + +-install(TARGETS sbp +- EXPORT sbp-export +- DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) ++install( ++ TARGETS sbp ++ EXPORT sbp-export ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) + install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/libsbp/" DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/libsbp") + + export(EXPORT sbp-export diff --git a/ports/scintilla/0001-static-lib.patch b/ports/scintilla/0001-static-lib.patch new file mode 100644 index 00000000000000..2661b0f2d7dee2 --- /dev/null +++ b/ports/scintilla/0001-static-lib.patch @@ -0,0 +1,14 @@ +diff --git a/win32/SciLexer.vcxproj b/win32/SciLexer.vcxproj +index b2e993c..c8774f1 100644 +--- a/win32/SciLexer.vcxproj ++++ b/win32/SciLexer.vcxproj +@@ -33,7 +33,7 @@ + + + +- DynamicLibrary ++ StaticLibrary + Unicode + v141 + +-- diff --git a/ports/scintilla/0002-static-crt.patch b/ports/scintilla/0002-static-crt.patch new file mode 100644 index 00000000000000..20268d7d9b2fef --- /dev/null +++ b/ports/scintilla/0002-static-crt.patch @@ -0,0 +1,37 @@ +diff --git a/win32/SciLexer.vcxproj b/win32/SciLexer.vcxproj +index b2e993c..c8774f1 100644 +--- a/win32/SciLexer.vcxproj ++++ b/win32/SciLexer.vcxproj +@@ -88,6 +88,7 @@ + + _DEBUG;%(PreprocessorDefinitions) + stdcpp17 ++ MultiThreadedDebug + + + Default +@@ -97,6 +98,7 @@ + + _DEBUG;%(PreprocessorDefinitions) + stdcpp17 ++ MultiThreadedDebug + + + Default +@@ -117,6 +119,7 @@ + true + NDEBUG;%(PreprocessorDefinitions) + stdcpp17 ++ MultiThreaded + + + true +@@ -129,6 +132,7 @@ + true + NDEBUG;%(PreprocessorDefinitions) + stdcpp17 ++ MultiThreaded + + + true +-- diff --git a/ports/scintilla/CONTROL b/ports/scintilla/CONTROL deleted file mode 100644 index 6b7aa54f6199ed..00000000000000 --- a/ports/scintilla/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: scintilla -Version: 4.1.2 -Homepage: https://www.scintilla.org/ -Description: A free source code editing component for Win32, GTK+, and OS X diff --git a/ports/scintilla/portfile.cmake b/ports/scintilla/portfile.cmake index aad39a8dc2b9f3..d1e1f1b77631c3 100644 --- a/ports/scintilla/portfile.cmake +++ b/ports/scintilla/portfile.cmake @@ -1,22 +1,30 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") vcpkg_download_distfile(ARCHIVE - URLS "http://www.scintilla.org/scintilla412.zip" - FILENAME "scintilla412.zip" - SHA512 10e24a2def5b3104b0f2eec473c53edb0a0cc19fbbef261e460a77415ec68ff83f9ee20c76cda7987627708c1d4ead5f964d4d5a98929d8256280bfa9bd0cddc + URLS "https://www.scintilla.org/scintilla446.zip" + FILENAME "scintilla446.zip" + SHA512 db6fa38283401497d8331f97dc5b57ea11d998988001f06b95892de769de5829b9f567635f3c1f2d9cfbc4384024d11666d28224ce90c5813ceef865b0dec255 ) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND PATCHES 0001-static-lib.patch) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND PATCHES 0002-static-crt.patch) +endif() + vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - REF 4.1.2 + REF 4.4.6 + PATCHES ${PATCHES} ) vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH Win32/SciLexer.vcxproj - INCLUDES_SUBPATH include LICENSE_SUBPATH License.txt - ALLOW_ROOT_INCLUDES ) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT} FILES_MATCHING PATTERN "*.*") diff --git a/ports/scintilla/vcpkg.json b/ports/scintilla/vcpkg.json new file mode 100644 index 00000000000000..c223db6a0bc996 --- /dev/null +++ b/ports/scintilla/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "scintilla", + "version": "4.4.6", + "description": "A free source code editing component for Win32, GTK+, and OS X", + "homepage": "https://www.scintilla.org/", + "supports": "!(uwp | linux | osx)" +} diff --git a/ports/sciplot/portfile.cmake b/ports/sciplot/portfile.cmake new file mode 100644 index 00000000000000..c6a369eb6bc180 --- /dev/null +++ b/ports/sciplot/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sciplot/sciplot + REF v0.2.2 + SHA512 2e7646e0fd52643bf86c09466d921d7b6a53349cd113e15177c3389654e0489df1d56f5fdcad7fc73834e632fff0a303d1366688ac7bb11937d49babd0742a7f + HEAD_REF vcpkg +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/sciplot) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sciplot/vcpkg.json b/ports/sciplot/vcpkg.json new file mode 100644 index 00000000000000..0fdf43a09f7e65 --- /dev/null +++ b/ports/sciplot/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "sciplot", + "version": "0.2.2", + "description": "A modern c++ scientific plotting library powered by gnuplot", + "homepage": "https://github.com/sciplot/sciplot", + "supports": "!uwp" +} diff --git a/ports/sciter/0001_patch_stdafx.patch b/ports/sciter/0001_patch_stdafx.patch deleted file mode 100644 index b4a85d5d37513b..00000000000000 --- a/ports/sciter/0001_patch_stdafx.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/include/sciter-win-main.cpp b/include/sciter-win-main.cpp -index 9f2699e..104b70a 100644 ---- a/include/sciter-win-main.cpp -+++ b/include/sciter-win-main.cpp -@@ -1,4 +1,6 @@ --#include "stdafx.h" -+// It is better to disable stdafx.h by default. -+// And enable it explicitly via /Fstdafx.h compiler option (C/C++ - Advanced - Force Include File). -+// #include "stdafx.h" - - #include - diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL deleted file mode 100644 index 0cd3bb219eb2ab..00000000000000 --- a/ports/sciter/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sciter -Version: 4.2.6.9-1 -Homepage: https://github.com/c-smile/sciter-sdk -Description: Sciter is an embeddable HTML/CSS/scripting engine. -Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index d94cc546962fac..eab17e4e65cf64 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -1,25 +1,21 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "Sciter only supports Windows Desktop") endif() - # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION c926703b2cce972875e7f6379c525eef66c95986) -set(SCITER_SHA 9a87ce12db9b2ef1e3abce3e475a9413a8a9301bab3d17341c94d4281e3bf616347ba8a4089f756ec38fed311bb4ee9045c8f85d0c40039ed3c0b96413aceeb4) +set(SCITER_REVISION 29a598b6d20220b93848b5e8abab704619296857) +set(SCITER_SHA dc9ebcc59a4ca7b154efcbd96c7e0aa53dc344f6a2cfa91f8c351c1edc5a0f060129715f8eac85e00df9b6c153322a9ba36b430da5020d38769740434cbcd52c) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(SCITER_ARCH 64) + set(SCITER_ARCH x64) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) - set(SCITER_ARCH 32) + set(SCITER_ARCH x32) endif() - # check out the `https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.tar.gz` # hash checksum can be obtained with `curl -L -o tmp.tgz ${URL} && vcpkg hash tmp.tgz` vcpkg_from_github( @@ -29,12 +25,6 @@ vcpkg_from_github( SHA512 ${SCITER_SHA} ) -# disable stdafx.h -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_patch_stdafx.patch -) - # install include directory file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter FILES_MATCHING @@ -50,8 +40,7 @@ set(TOOL_PERMS FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ # license file(COPY ${SOURCE_PATH}/logfile.htm DESTINATION ${SCITER_SHARE}) -file(COPY ${SOURCE_PATH}/license.htm DESTINATION ${SCITER_SHARE}) -file(RENAME ${SCITER_SHARE}/license.htm ${SCITER_SHARE}/copyright) +file(INSTALL ${SOURCE_PATH}/license.htm DESTINATION ${SCITER_SHARE} RENAME copyright) # samples & widgets file(COPY ${SOURCE_PATH}/samples DESTINATION ${SCITER_SHARE}) @@ -59,13 +48,19 @@ file(COPY ${SOURCE_PATH}/widgets DESTINATION ${SCITER_SHARE}) # tools if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux AND VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(SCITER_BIN ${SOURCE_PATH}/bin.gtk/x64) + set(SCITER_BIN ${SOURCE_PATH}/bin.lnx/x64) + + file(INSTALL ${SOURCE_PATH}/bin.lnx/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SOURCE_PATH}/bin.lnx/tiscript DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) - file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) file(INSTALL ${SCITER_BIN}/usciter DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) file(INSTALL ${SCITER_BIN}/inspector DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${SCITER_TOOLS}) + if ("windowless" IN_LIST FEATURES) + set(SCITER_BIN ${SOURCE_PATH}/bin.lnx/x64lite) + endif() + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/bin) file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) @@ -73,27 +68,38 @@ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) set(SCITER_BIN ${SOURCE_PATH}/bin.osx) file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/tiscript DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/inspector.app DESTINATION ${SCITER_TOOLS}) file(INSTALL ${SCITER_BIN}/sciter.app DESTINATION ${SCITER_TOOLS}) - file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/libsciter.dylib DESTINATION ${SCITER_TOOLS}) - file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + # not sure whether there is a better way to do this, because + # `file(INSTALL sciter.app FILE_PERMISSIONS EXECUTE)` + # would mark everything as executable which is no go. + execute_process(COMMAND sh -c "chmod +x sciter.app/Contents/MacOS/sciter" WORKING_DIRECTORY ${SCITER_TOOLS}) + execute_process(COMMAND sh -c "chmod +x inspector.app/Contents/MacOS/inspector" WORKING_DIRECTORY ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/libsciter.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/libsciter.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) else() - set(SCITER_BIN ${SOURCE_PATH}/bin/${SCITER_ARCH}) + set(SCITER_BIN ${SOURCE_PATH}/bin.win/${SCITER_ARCH}) + set(SCITER_BIN32 ${SOURCE_PATH}/bin.win/x32) + + file(INSTALL ${SOURCE_PATH}/bin.win/packfolder.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SOURCE_PATH}/bin.win/tiscript.exe DESTINATION ${SCITER_TOOLS}) - file(INSTALL ${SOURCE_PATH}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS}) - file(INSTALL ${SOURCE_PATH}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN32}/wsciter.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN32}/inspector.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN32}/sciter.dll DESTINATION ${SCITER_TOOLS}) - file(INSTALL ${SCITER_BIN}/sciter.exe DESTINATION ${SCITER_TOOLS}) - file(INSTALL ${SCITER_BIN}/inspector.exe DESTINATION ${SCITER_TOOLS}) - file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${SCITER_TOOLS}) + if ("windowless" IN_LIST FEATURES) + set(SCITER_BIN ${SOURCE_PATH}/bin.win/${SCITER_ARCH}lite) + endif() file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) endif() message(STATUS "Warning: Sciter requires manual deployment of the correct DLL files.") diff --git a/ports/sciter/vcpkg.json b/ports/sciter/vcpkg.json new file mode 100644 index 00000000000000..de007100f69427 --- /dev/null +++ b/ports/sciter/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "sciter", + "version-string": "4.4.8.3", + "port-version": 1, + "description": "Sciter is an embeddable HTML/CSS/scripting engine.", + "homepage": "https://github.com/c-smile/sciter-sdk", + "supports": "!uwp", + "features": { + "windowless": { + "description": "Uses Sciter.Lite builds" + } + } +} diff --git a/ports/scnlib/CONTROL b/ports/scnlib/CONTROL deleted file mode 100644 index 5b589084a03b05..00000000000000 --- a/ports/scnlib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: scnlib -Version: 0.1.2 -Description: scnlib is a modern C++ library for replacing scanf and std::istream -Homepage: https://scnlib.dev/ diff --git a/ports/scnlib/portfile.cmake b/ports/scnlib/portfile.cmake index 08343fc43bd576..8f2bd29950b167 100644 --- a/ports/scnlib/portfile.cmake +++ b/ports/scnlib/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO eliaskosunen/scnlib - REF v0.1.2 - SHA512 bb2aa176517d6547d62800839b7e9d86821a4006f7d09a8b3731b67f6fd7130f5cf8d73e7c8331c7c50f1dd5ca19bd3759bb0e181fcaed2f0bfb7fd8276ef141 + REF v0.4 + SHA512 a7059e70326e7d5af463b4ae09308644f8035092776f44001c1a4abf78421f55084e2fc30c6a9778eda62014354dba7c31b3f2f2d333bad04a2ec48b1f812ca0 HEAD_REF master ) @@ -24,8 +22,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/scn) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/scn) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/scnlib RENAME copyright) - +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share/scn) -vcpkg_test_cmake(PACKAGE_NAME scn) +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/ports/scnlib/vcpkg.json b/ports/scnlib/vcpkg.json new file mode 100644 index 00000000000000..04f4bd5e059b67 --- /dev/null +++ b/ports/scnlib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "scnlib", + "version-string": "0.4", + "port-version": 1, + "description": "scnlib is a modern C++ library for replacing scanf and std::istream", + "homepage": "https://scnlib.dev/" +} diff --git a/ports/scylla-wrapper/CONTROL b/ports/scylla-wrapper/CONTROL deleted file mode 100644 index bbe37c1171e75b..00000000000000 --- a/ports/scylla-wrapper/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: scylla-wrapper -Version: 2018-08-26-16e6f435 -Build-Depends: distorm -Description: This is a wrapper around Scylla. It exports functions for IAT fixing, dumping and PE rebuilding. based on https://github.com/NtQuery/Scylla commit 0f6b7198be (v0.9.6b). \ No newline at end of file diff --git a/ports/scylla-wrapper/portfile.cmake b/ports/scylla-wrapper/portfile.cmake index 69e28b649c38a4..03dfbb6f921cbb 100644 --- a/ports/scylla-wrapper/portfile.cmake +++ b/ports/scylla-wrapper/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - # scylla_wrapper_dll supplies a DllMain vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) diff --git a/ports/scylla-wrapper/vcpkg.json b/ports/scylla-wrapper/vcpkg.json new file mode 100644 index 00000000000000..6bceab9f7a8846 --- /dev/null +++ b/ports/scylla-wrapper/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "scylla-wrapper", + "version-string": "2018-08-26-16e6f435", + "port-version": 1, + "description": "This is a wrapper around Scylla. It exports functions for IAT fixing, dumping and PE rebuilding. based on https://github.com/NtQuery/Scylla commit 0f6b7198be (v0.9.6b).", + "dependencies": [ + "distorm" + ] +} diff --git a/ports/sdformat10/portfile.cmake b/ports/sdformat10/portfile.cmake new file mode 100644 index 00000000000000..d4166962f450c3 --- /dev/null +++ b/ports/sdformat10/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osrf/sdformat + REF sdformat10_10.0.0 + SHA512 1caf98427d25e7c17bfacaab20382c573fac0c965b40ad0c5e0efd32ddfdaa20250d8c79ecf574989ba10b1feb884a9df3927b18ec2cd88f7c66b4d8194bc731 + HEAD_REF sdf10 +) + +# Ruby is required by the sdformat build process +vcpkg_find_acquire_program(RUBY) +get_filename_component(RUBY_PATH ${RUBY} DIRECTORY) +set(_path $ENV{PATH}) +vcpkg_add_to_path(${RUBY_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DUSE_EXTERNAL_URDF=ON + -DUSE_EXTERNAL_TINYXML=ON +) + +vcpkg_install_cmake() + +# Restore original path +set(ENV{PATH} ${_path}) + +# Fix cmake targets and pkg-config file location +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sdformat10") +vcpkg_fixup_pkgconfig() + +# Remove debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sdformat10/vcpkg.json b/ports/sdformat10/vcpkg.json new file mode 100644 index 00000000000000..d7d3d8f242c62e --- /dev/null +++ b/ports/sdformat10/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "sdformat10", + "version-string": "10.0.0", + "port-version": 1, + "description": "Simulation Description Format (SDF) parser and description files.", + "homepage": "http://sdformat.org/", + "supports": "!uwp", + "dependencies": [ + "ignition-math6", + "tinyxml2", + "urdfdom" + ] +} diff --git a/ports/sdformat6/disable-unneeded-include-findboost.patch b/ports/sdformat6/disable-unneeded-include-findboost.patch new file mode 100644 index 00000000000000..6a922029272899 --- /dev/null +++ b/ports/sdformat6/disable-unneeded-include-findboost.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake +index c2a0ee4..2735a07 100644 +--- a/cmake/SearchForStuff.cmake ++++ b/cmake/SearchForStuff.cmake +@@ -13,7 +13,6 @@ if (WIN32) + set(Boost_USE_STATIC_RUNTIME OFF) + endif() + +-include(FindBoost) + find_package(Boost ${MIN_BOOST_VERSION}) + + if (NOT Boost_FOUND) diff --git a/ports/sdformat6/portfile.cmake b/ports/sdformat6/portfile.cmake new file mode 100644 index 00000000000000..1b6babd87aa93e --- /dev/null +++ b/ports/sdformat6/portfile.cmake @@ -0,0 +1,54 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osrf/sdformat + REF sdformat6_6.2.0 + SHA512 3d139ec4b4c9fbfd547ed8bfca0adb5cdca92c1b7cc4d4b554a7c51ccf755b9079c26a006ebfedc5bc5b1ba5e16ad950bb38c47ea97bf97e59a2fd7d12d60620 + HEAD_REF sdf6 + PATCHES + disable-unneeded-include-findboost.patch +) + +# Ruby is required by the sdformat build process +vcpkg_find_acquire_program(RUBY) +get_filename_component(RUBY_PATH ${RUBY} DIRECTORY) +set(_path $ENV{PATH}) +vcpkg_add_to_path(${RUBY_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=OFF + -DUSE_EXTERNAL_URDF=ON + -DUSE_EXTERNAL_TINYXML=ON +) + +vcpkg_install_cmake() + +# Restore original path +set(ENV{PATH} ${_path}) + +# Move location of sdformat.dll from lib to bin +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll + ${CURRENT_PACKAGES_DIR}/bin/sdformat.dll) +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/sdformat.dll) +endif() + +# Fix cmake targets location +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sdformat") + +# Remove debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sdformat6/vcpkg.json b/ports/sdformat6/vcpkg.json new file mode 100644 index 00000000000000..84c6969921f3fa --- /dev/null +++ b/ports/sdformat6/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "sdformat6", + "version": "6.2.0", + "port-version": 2, + "description": "Simulation Description Format (SDF) parser and description files.", + "homepage": "http://sdformat.org/", + "supports": "!(arm | uwp)", + "dependencies": [ + "boost-any", + "boost-variant", + "ignition-math4", + "tinyxml", + "urdfdom" + ] +} diff --git a/ports/sdformat9/fix-dependency-urdfdom.patch b/ports/sdformat9/fix-dependency-urdfdom.patch new file mode 100644 index 00000000000000..d9016c6de39f30 --- /dev/null +++ b/ports/sdformat9/fix-dependency-urdfdom.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake +index 965f1ec..cf2acf4 100644 +--- a/cmake/SearchForStuff.cmake ++++ b/cmake/SearchForStuff.cmake +@@ -53,10 +53,9 @@ if (NOT PKG_CONFIG_FOUND) + endif() + + if (NOT DEFINED USE_INTERNAL_URDF OR NOT USE_INTERNAL_URDF) +- # check for urdfdom with pkg-config +- pkg_check_modules(URDF urdfdom>=1.0) ++ find_package(urdfdom CONFIG REQUIRED) + +- if (NOT URDF_FOUND) ++ if (NOT urdfdom_FOUND) + find_package(urdfdom) + if (urdfdom_FOUND) + set(URDF_INCLUDE_DIRS ${urdfdom_INCLUDE_DIRS}) diff --git a/ports/sdformat9/portfile.cmake b/ports/sdformat9/portfile.cmake new file mode 100644 index 00000000000000..b8807e0fe0c4f3 --- /dev/null +++ b/ports/sdformat9/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_fail_port_install(ON_TARGET "linux" "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osrf/sdformat + REF sdformat9_9.4.0 + SHA512 b7ed458a5a9ba5b5dcf457d3e0c9de0bca3d514a6870aa977a00a84f8a3b8d1bd21f3b437c0651af7f0cc9b9c6c8b905c968525194605b334ab62280b9d55b0e + HEAD_REF sdf9 + PATCHES + fix-dependency-urdfdom.patch +) + +# Ruby is required by the sdformat build process +vcpkg_find_acquire_program(RUBY) +get_filename_component(RUBY_PATH ${RUBY} DIRECTORY) +set(_path $ENV{PATH}) +vcpkg_add_to_path(${RUBY_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DUSE_EXTERNAL_URDF=ON + -DUSE_EXTERNAL_TINYXML=ON +) + +vcpkg_install_cmake() + +# Restore original path +set(ENV{PATH} ${_path}) + +# Fix cmake targets and pkg-config file location +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sdformat9") +vcpkg_fixup_pkgconfig() + +# Remove debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sdformat9/vcpkg.json b/ports/sdformat9/vcpkg.json new file mode 100644 index 00000000000000..40de724cad7ba9 --- /dev/null +++ b/ports/sdformat9/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "sdformat9", + "version-string": "9.4.0", + "port-version": 1, + "description": "Simulation Description Format (SDF) parser and description files.", + "homepage": "http://sdformat.org/", + "supports": "!(linux | uwp)", + "dependencies": [ + "ignition-math6", + "tinyxml", + "urdfdom" + ] +} diff --git a/ports/sdl1-net/CONTROL b/ports/sdl1-net/CONTROL deleted file mode 100644 index 61544abec785cf..00000000000000 --- a/ports/sdl1-net/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: sdl1-net -Version: 1.2.8-3 -Description: Networking library for SDL -Build-Depends: sdl1 diff --git a/ports/sdl1-net/portfile.cmake b/ports/sdl1-net/portfile.cmake index 8bdf4bd3c18618..e88d99d3593744 100644 --- a/ports/sdl1-net/portfile.cmake +++ b/ports/sdl1-net/portfile.cmake @@ -1,12 +1,13 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL_net-1.2.8) vcpkg_download_distfile(ARCHIVE URLS "https://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.tar.gz" FILENAME "SDL_net-1.2.8.tar.gz" SHA512 2766ca55343127c619958ab3a3ae3052a27a676839f10a158f7dfc071b8db38c2f1fc853e8add32b9fef94ab07eaa986f46a68e264e8087b57c990af30ea9a0b ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/sdl1-net/vcpkg.json b/ports/sdl1-net/vcpkg.json new file mode 100644 index 00000000000000..cd4e84a0300edc --- /dev/null +++ b/ports/sdl1-net/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "sdl1-net", + "version-string": "1.2.8", + "port-version": 4, + "description": "Networking library for SDL", + "dependencies": [ + "sdl1" + ] +} diff --git a/ports/sdl1/CONTROL b/ports/sdl1/CONTROL deleted file mode 100644 index 59606dcb039c38..00000000000000 --- a/ports/sdl1/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: sdl1 -Version: 1.2.15-6 -Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/ports/sdl1/SDL.vcxproj.in b/ports/sdl1/SDL.vcxproj.in new file mode 100644 index 00000000000000..f4b29a2c8d78e1 --- /dev/null +++ b/ports/sdl1/SDL.vcxproj.in @@ -0,0 +1,462 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + @LIB_TYPE@ + v141 + false + + + @LIB_TYPE@ + v141 + false + + + @LIB_TYPE@ + v141 + false + + + @LIB_TYPE@ + v141 + false + + + @LIB_TYPE@ + v141 + false + + + @LIB_TYPE@ + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + false + + .\Debug/SDL.pch + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + false + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + MachineX64 + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + false + + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + false + true + + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ports/sdl1/SDL1_2017.sln b/ports/sdl1/SDL1_2017.sln index a255cb6aad1e74..ff6de0860b8481 100644 --- a/ports/sdl1/SDL1_2017.sln +++ b/ports/sdl1/SDL1_2017.sln @@ -8,34 +8,49 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain. EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 + Release_NoSTDIO|ARM64 = Release_NoSTDIO|ARM64 Release_NoSTDIO|Win32 = Release_NoSTDIO|Win32 Release_NoSTDIO|x64 = Release_NoSTDIO|x64 + Release|ARM64 = Release|ARM64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|ARM64.Build.0 = Debug|ARM64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|ARM64.ActiveCfg = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|ARM64.Build.0 = Release|ARM64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.Build.0 = Release|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.ActiveCfg = Release|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.Build.0 = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|ARM64.ActiveCfg = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|ARM64.Build.0 = Release|ARM64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|ARM64.Build.0 = Debug|ARM64 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|ARM64.ActiveCfg = Release_NoSTDIO|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|ARM64.Build.0 = Release_NoSTDIO|ARM64 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.ActiveCfg = Release_NoSTDIO|Win32 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.Build.0 = Release_NoSTDIO|Win32 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.ActiveCfg = Release_NoSTDIO|x64 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.Build.0 = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|ARM64.ActiveCfg = Release|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|ARM64.Build.0 = Release|ARM64 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 diff --git a/ports/sdl1/SDL_dynamic.vcxproj b/ports/sdl1/SDL_dynamic.vcxproj deleted file mode 100644 index 1db10bb7689d27..00000000000000 --- a/ports/sdl1/SDL_dynamic.vcxproj +++ /dev/null @@ -1,354 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - SDL - - - - DynamicLibrary - v141 - false - - - DynamicLibrary - v141 - false - - - DynamicLibrary - v141 - false - - - DynamicLibrary - v141 - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>15.0.27924.0 - - - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - - - $(SolutionDir)$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - - - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - - - $(SolutionDir)$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/SDL.tlb - - - Disabled - $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) - MultiThreadedDLL - false - - .\Debug/SDL.pch - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - /MACHINE:I386 %(AdditionalOptions) - winmm.lib;dxguid.lib;%(AdditionalDependencies) - .\Debug/SDL.dll - true - false - true - .\Debug/SDL.pdb - Windows - false - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Debug/SDL.tlb - - - Disabled - $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) - MultiThreadedDLL - false - - .\Debug/SDL.pch - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;dxguid.lib;%(AdditionalDependencies) - .\Debug/SDL.dll - true - false - true - .\Debug/SDL.pdb - Windows - MachineX64 - false - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/SDL.tlb - - - OnlyExplicitInline - false - $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - - .\Release/SDL.pch - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - /MACHINE:I386 %(AdditionalOptions) - winmm.lib;dxguid.lib;%(AdditionalDependencies) - .\Release/SDL.dll - true - false - .\Release/SDL.pdb - Windows - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Release/SDL.tlb - - - OnlyExplicitInline - false - $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - - .\Release/SDL.pch - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;dxguid.lib;%(AdditionalDependencies) - .\Release/SDL.dll - true - false - .\Release/SDL.pdb - Windows - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ports/sdl1/SDL_static.vcxproj b/ports/sdl1/SDL_static.vcxproj deleted file mode 100644 index c435662ab1e11a..00000000000000 --- a/ports/sdl1/SDL_static.vcxproj +++ /dev/null @@ -1,354 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - SDL - - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>15.0.27924.0 - - - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - - - $(SolutionDir)$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - - - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - - - $(SolutionDir)$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/SDL.tlb - - - Disabled - $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) - MultiThreadedDebug - false - - .\Debug/SDL.pch - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - /MACHINE:I386 %(AdditionalOptions) - winmm.lib;dxguid.lib;%(AdditionalDependencies) - .\Debug/SDL.dll - true - false - true - .\Debug/SDL.pdb - Windows - false - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Debug/SDL.tlb - - - Disabled - $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) - MultiThreadedDebug - false - - .\Debug/SDL.pch - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;dxguid.lib;%(AdditionalDependencies) - .\Debug/SDL.dll - true - false - true - .\Debug/SDL.pdb - Windows - MachineX64 - false - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/SDL.tlb - - - OnlyExplicitInline - false - $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - - .\Release/SDL.pch - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - /MACHINE:I386 %(AdditionalOptions) - winmm.lib;dxguid.lib;%(AdditionalDependencies) - .\Release/SDL.dll - true - false - .\Release/SDL.pdb - Windows - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Release/SDL.tlb - - - OnlyExplicitInline - false - $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - - .\Release/SDL.pch - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;dxguid.lib;%(AdditionalDependencies) - .\Release/SDL.dll - true - false - .\Release/SDL.pdb - Windows - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ports/sdl1/SDLmain.vcxproj.in b/ports/sdl1/SDLmain.vcxproj.in new file mode 100644 index 00000000000000..249b174401d678 --- /dev/null +++ b/ports/sdl1/SDLmain.vcxproj.in @@ -0,0 +1,313 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + ARM64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + .\Release\ + .\Release\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + + + .\Release/SDLmain.pch + Level3 + Default + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + @CRT_TYPE_REL@ + true + + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + @CRT_TYPE_DBG@ + + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + + + + \ No newline at end of file diff --git a/ports/sdl1/SDLmain_dynamic.vcxproj b/ports/sdl1/SDLmain_dynamic.vcxproj deleted file mode 100644 index 228045d417a27d..00000000000000 --- a/ports/sdl1/SDLmain_dynamic.vcxproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release_NoSTDIO - Win32 - - - Release_NoSTDIO - x64 - - - Release - Win32 - - - Release - x64 - - - - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>15.0.27924.0 - - - .\Release\ - .\Release\ - - - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - .\Release_NOSTDIO\ - .\Release_NOSTDIO\ - - - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - .\Debug\ - .\Debug\ - - - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - .\Release/SDLmain.pch - Level3 - Default - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - .\Release/SDLmain.pch - Level3 - Default - - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - .\Release_NOSTDIO/SDLmain.pch - Level3 - Default - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - .\Release_NOSTDIO/SDLmain.pch - Level3 - Default - - - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - - .\Debug/SDLmain.pch - Level3 - OldStyle - Default - - - - - X64 - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - - .\Debug/SDLmain.pch - Level3 - OldStyle - Default - - - - - - - - - \ No newline at end of file diff --git a/ports/sdl1/SDLmain_static.vcxproj b/ports/sdl1/SDLmain_static.vcxproj deleted file mode 100644 index 3f3b6ca0106b52..00000000000000 --- a/ports/sdl1/SDLmain_static.vcxproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release_NoSTDIO - Win32 - - - Release_NoSTDIO - x64 - - - Release - Win32 - - - Release - x64 - - - - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - StaticLibrary - v141 - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>15.0.27924.0 - - - .\Release\ - .\Release\ - - - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - .\Release_NOSTDIO\ - .\Release_NOSTDIO\ - - - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - .\Debug\ - .\Debug\ - - - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreaded - true - - .\Release/SDLmain.pch - Level3 - Default - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreaded - true - - .\Release/SDLmain.pch - Level3 - Default - - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) - true - MultiThreaded - true - - .\Release_NOSTDIO/SDLmain.pch - Level3 - Default - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) - true - MultiThreaded - true - - .\Release_NOSTDIO/SDLmain.pch - Level3 - Default - - - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - - .\Debug/SDLmain.pch - Level3 - OldStyle - Default - - - - - X64 - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - - .\Debug/SDLmain.pch - Level3 - OldStyle - Default - - - - - - - - - \ No newline at end of file diff --git a/ports/sdl1/fix-linux-build.patch b/ports/sdl1/fix-linux-build.patch new file mode 100644 index 00000000000000..f6ad36c2d61b15 --- /dev/null +++ b/ports/sdl1/fix-linux-build.patch @@ -0,0 +1,13 @@ +diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h +index 4875b98..10bf365 100644 +--- a/src/video/x11/SDL_x11sym.h ++++ b/src/video/x11/SDL_x11sym.h +@@ -165,7 +165,7 @@ SDL_X11_SYM(Bool,XShmQueryExtension,(Display* a),(a),return) + */ + #ifdef LONG64 + SDL_X11_MODULE(IO_32BIT) +-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) ++SDL_X11_SYM(int,_XData32,(Display *dpy,_Xconst register long *data,unsigned len),(dpy,data,len),return) + SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) + #endif + diff --git a/ports/sdl1/portfile.cmake b/ports/sdl1/portfile.cmake index 4e8d512df81c15..47f1b0730ec715 100644 --- a/ports/sdl1/portfile.cmake +++ b/ports/sdl1/portfile.cmake @@ -1,50 +1,83 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SDL-Mirror/SDL REF release-1.2.15 SHA512 38b94a650ec205377ae1503d0ec8a5254ef6d50ed0acac8d985b57b64bc16ea042cfa41e19e5ef8317980c4afb83186829f5bc3da9433d0a649dfd10554801b5 HEAD_REF master - PATCHES export-symbols-only-in-shared-build.patch + PATCHES + export-symbols-only-in-shared-build.patch + fix-linux-build.patch ) configure_file(${SOURCE_PATH}/include/SDL_config.h.default ${SOURCE_PATH}/include/SDL_config.h COPYONLY) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDL1_2017.sln DESTINATION ${SOURCE_PATH}/VisualC/ ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/SDL_static.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDL RENAME SDL.vcxproj) - file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/SDLmain_static.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDLmain RENAME SDLmain.vcxproj) +if (VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDL1_2017.sln DESTINATION ${SOURCE_PATH}/VisualC/ ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LIB_TYPE StaticLibrary) + else() + set(LIB_TYPE DynamicLibrary) + endif() + + if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(CRT_TYPE_DBG MultiThreadedDebugDLL) + set(CRT_TYPE_REL MultiThreadedDLL) + else() + set(CRT_TYPE_DBG MultiThreadedDebug) + set(CRT_TYPE_REL MultiThreaded) + endif() + + configure_file(${CURRENT_PORT_DIR}/SDL.vcxproj.in ${SOURCE_PATH}/VisualC/SDL/SDL.vcxproj @ONLY) + configure_file(${CURRENT_PORT_DIR}/SDLmain.vcxproj.in ${SOURCE_PATH}/VisualC/SDLmain/SDLmain.vcxproj @ONLY) + + # This text file gets copied as a library, and included as one in the package + file(REMOVE_RECURSE ${SOURCE_PATH}/src/hermes/COPYING.LIB) + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH VisualC/SDL1_2017.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + ALLOW_ROOT_INCLUDES + ) + + #Take all the fils into include/SDL to sovle conflict with SDL2 port + file(GLOB files ${CURRENT_PACKAGES_DIR}/include/*) + foreach(file ${files}) + file(COPY ${file} DESTINATION ${CURRENT_PACKAGES_DIR}/include/SDL) + file(REMOVE ${file}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/SDL/doxyfile) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDLmain.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDLmaind.lib) + endif() else() - file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/SDL_dynamic.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDL RENAME SDL.vcxproj) - file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/SDLmain_dynamic.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDLmain RENAME SDLmain.vcxproj) -endif() - -# This text file gets copied as a library, and included as one in the package -file(REMOVE_RECURSE ${SOURCE_PATH}/src/hermes/COPYING.LIB) - -vcpkg_install_msbuild( - SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH VisualC/SDL1_2017.sln - INCLUDES_SUBPATH include - LICENSE_SUBPATH COPYING - ALLOW_ROOT_INCLUDES -) - -#Take all the fils into include/SDL to sovle conflict with SDL2 port -file(GLOB files ${CURRENT_PACKAGES_DIR}/include/*) -foreach(file ${files}) - file(COPY ${file} DESTINATION ${CURRENT_PACKAGES_DIR}/include/SDL) - file(REMOVE ${file}) -endforeach() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/SDL/doxyfile) + message("libgles2-mesa-dev must be installed before sdl1 can build. Install it with \"apt install libgles2-mesa-dev\".") -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDLmain.lib) -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDLmaind.lib) -endif() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig(IGNORE_FLAGS -Wl,-rpath,${CURRENT_PACKAGES_DIR}/lib/pkgconfig/../../lib + -Wl,-rpath,${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/../../lib + SYSTEM_LIBRARIES pthread) + + file(GLOB SDL1_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*") + foreach (SDL1_TOOL ${SDL1_TOOLS}) + file(COPY ${SDL1_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${SDL1_TOOL}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +endif() \ No newline at end of file diff --git a/ports/sdl1/vcpkg.json b/ports/sdl1/vcpkg.json new file mode 100644 index 00000000000000..e75f7a2179642d --- /dev/null +++ b/ports/sdl1/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "sdl1", + "version-string": "1.2.15", + "port-version": 14, + "description": "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.", + "homepage": "https://www.libsdl.org" +} diff --git a/ports/sdl2-gfx/001-lrint-arm64.patch b/ports/sdl2-gfx/001-lrint-arm64.patch new file mode 100644 index 00000000000000..50de17973d43b5 --- /dev/null +++ b/ports/sdl2-gfx/001-lrint-arm64.patch @@ -0,0 +1,26 @@ +diff --git a/SDL2_gfxPrimitives.c b/SDL2_gfxPrimitives.c +index f81e6da..91817fd 100755 +--- a/SDL2_gfxPrimitives.c ++++ b/SDL2_gfxPrimitives.c +@@ -1771,8 +1771,20 @@ __declspec(naked) long int + __emit(0xE12FFF1E); // bx lr + } + #pragma warning(pop) ++#elif defined(_M_ARM64) ++#include ++#pragma warning(push) ++#pragma warning(disable: 4716) ++__declspec(naked) long ++ lrint (double f) ++{ ++ __emit(0x1e674000); // frintx d0, d0 ++ __emit(0x9e780000); // fcvtzs x0, d0 ++ __emit(0xd65f03c0); // ret ++} ++#pragma warning(pop) + #else +-#error lrint needed for MSVC on non X86/AMD64/ARM targets. ++#error lrint needed for MSVC on non X86/AMD64/ARM/ARM64 targets. + #endif + #endif + diff --git a/ports/sdl2-gfx/002-use-the-lrintf-intrinsic.patch b/ports/sdl2-gfx/002-use-the-lrintf-intrinsic.patch new file mode 100644 index 00000000000000..51af54d718a589 --- /dev/null +++ b/ports/sdl2-gfx/002-use-the-lrintf-intrinsic.patch @@ -0,0 +1,14 @@ +diff --git a/SDL2_gfxPrimitives.c b/SDL2_gfxPrimitives.c +index d8afb10..6c88288 100644 +--- a/SDL2_gfxPrimitives.c ++++ b/SDL2_gfxPrimitives.c +@@ -1757,7 +1757,8 @@ int filledCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Ui + /* ----- AA Ellipse */ + + /* Windows targets do not have lrint, so provide a local inline version */ +-#if defined(_MSC_VER) ++/* MSVC pre 16.8 do not have lrint */ ++#if defined(_MSC_VER) && _MSC_VER < 1928 + /* Detect 64bit and use intrinsic version */ + #ifdef _M_X64 + #include diff --git a/ports/sdl2-gfx/CMakeLists.txt b/ports/sdl2-gfx/CMakeLists.txt index 1a63d7f8b3a9f8..9c94b9b220ac8d 100644 --- a/ports/sdl2-gfx/CMakeLists.txt +++ b/ports/sdl2-gfx/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.0) -project(SDL2_GFX C) +project(SDL2_gfx VERSION 1.0.4 LANGUAGES C) + +set(CONFIG_NAME "sdl2-gfx") find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_package(SDL2 CONFIG REQUIRED) @@ -10,21 +12,42 @@ if(BUILD_SHARED_LIBS) list(APPEND SDL_GFX_DEFINES DLL_EXPORT) endif() -add_library(SDL2_gfx +add_library(${PROJECT_NAME} SDL2_framerate.c SDL2_gfxPrimitives.c SDL2_imageFilter.c SDL2_rotozoom.c) -target_compile_definitions(SDL2_gfx PRIVATE ${SDL_GFX_DEFINES}) -target_include_directories(SDL2_gfx PRIVATE ${SDL_INCLUDE_DIR}/SDL2) -target_link_libraries(SDL2_gfx PRIVATE SDL2::SDL2) +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ + $ +) + +if(WIN32) + add_compile_definitions(${SDL_GFX_DEFINES}) +endif() +target_include_directories(${PROJECT_NAME} PRIVATE ${SDL_INCLUDE_DIR}/SDL2) +target_link_libraries(${PROJECT_NAME} PRIVATE SDL2::SDL2) -install(TARGETS SDL2_gfx +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +install(EXPORT ${PROJECT_NAME} + FILE ${CONFIG_NAME}-targets.cmake + NAMESPACE SDL2:: + DESTINATION share/${CONFIG_NAME}/ +) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}-config.cmake +"include(CMakeFindDependencyMacro) +find_dependency(SDL2 CONFIG) +include(\${CMAKE_CURRENT_LIST_DIR}/${CONFIG_NAME}-targets.cmake)" +) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}-config.cmake DESTINATION share/${CONFIG_NAME}) + if(NOT SDL_GFX_SKIP_HEADERS) install(FILES SDL2_framerate.h SDL2_gfxPrimitives.h SDL2_imageFilter.h SDL2_rotozoom.h SDL2_gfxPrimitives_font.h DESTINATION include/SDL2) endif() diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL deleted file mode 100644 index 8b4af0e61d4bed..00000000000000 --- a/ports/sdl2-gfx/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: sdl2-gfx -Version: 1.0.4-2 -Build-Depends: sdl2 -Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. diff --git a/ports/sdl2-gfx/portfile.cmake b/ports/sdl2-gfx/portfile.cmake index ce83fd21e4988e..16616c23b01901 100644 --- a/ports/sdl2-gfx/portfile.cmake +++ b/ports/sdl2-gfx/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(VERSION 1.0.4) vcpkg_download_distfile(ARCHIVE @@ -12,6 +10,9 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${VERSION} + PATCHES + 001-lrint-arm64.patch + 002-use-the-lrintf-intrinsic.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -23,9 +24,9 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/COPYING ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/sdl2-gfx/vcpkg.json b/ports/sdl2-gfx/vcpkg.json new file mode 100644 index 00000000000000..8818ca6a36aab9 --- /dev/null +++ b/ports/sdl2-gfx/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "sdl2-gfx", + "version-string": "1.0.4", + "port-version": 8, + "description": "Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer.", + "dependencies": [ + "sdl2" + ] +} diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt index 9cc82de7afe7b4..689f0fcd74503a 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -57,7 +57,7 @@ if (APPLE) ) endif() -set_target_properties(SDL2_image PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) +set_target_properties(SDL2_image PROPERTIES DEFINE_SYMBOL DLL_EXPORT) foreach(FORMAT ${SUPPORTED_FORMATS}) add_definitions(-DLOAD_${FORMAT}) @@ -110,13 +110,20 @@ install(TARGETS SDL2_image install(FILES SDL_image.h DESTINATION include/SDL2 CONFIGURATIONS Release) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sdl2-image-config.cmake" +[[include(CMakeFindDependencyMacro) +find_dependency(SDL2 CONFIG) +include("${CMAKE_CURRENT_LIST_DIR}/sdl2-image-targets.cmake") +]]) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sdl2-image-config.cmake DESTINATION share/sdl2-image) + install(EXPORT SDL2_image DESTINATION share/sdl2-image/ - FILE sdl2-image-config.cmake + FILE sdl2-image-targets.cmake NAMESPACE SDL2:: ) - message(STATUS "Link-time dependencies:") message(STATUS " " SDL2::SDL2) foreach(DEPENDENCY ${DEPENDENCIES}) diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL deleted file mode 100644 index 19218ef3e2055d..00000000000000 --- a/ports/sdl2-image/CONTROL +++ /dev/null @@ -1,17 +0,0 @@ -Source: sdl2-image -Version: 2.0.5 -Build-Depends: sdl2, libpng -Homepage: https://www.libsdl.org/projects/SDL_image -Description: SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV - -Feature: libjpeg-turbo -Description: Support for JPEG image format -Build-Depends: libjpeg-turbo - -Feature: tiff -Description: Support for TIFF image format -Build-Depends: tiff - -Feature: libwebp -Description: Support for WEBP image format. -Build-Depends: libwebp diff --git a/ports/sdl2-image/portfile.cmake b/ports/sdl2-image/portfile.cmake index ea4744148f4f10..84e4e8268d192f 100644 --- a/ports/sdl2-image/portfile.cmake +++ b/ports/sdl2-image/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(SDL2_IMAGE_VERSION "2.0.5") vcpkg_download_distfile(ARCHIVE diff --git a/ports/sdl2-image/vcpkg.json b/ports/sdl2-image/vcpkg.json new file mode 100644 index 00000000000000..eb6fe4f3387692 --- /dev/null +++ b/ports/sdl2-image/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "sdl2-image", + "version-string": "2.0.5", + "port-version": 2, + "description": "SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV", + "homepage": "https://www.libsdl.org/projects/SDL_image", + "dependencies": [ + "libpng", + "sdl2" + ], + "features": { + "libjpeg-turbo": { + "description": "Support for JPEG image format", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "libwebp": { + "description": "Support for WEBP image format.", + "dependencies": [ + "libwebp" + ] + }, + "tiff": { + "description": "Support for TIFF image format", + "dependencies": [ + "tiff" + ] + } + } +} diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 1265145fa6266b..b6d0dbb92ac67c 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -15,8 +15,12 @@ if(SDL_MIXER_ENABLE_MP3) find_path(MPG123_INCLUDE_DIR mpg123.h) find_library(MPG123_LIBRARY NAMES libmpg123 mpg123) list(APPEND SDL_MIXER_INCLUDES ${MPG123_INCLUDE_DIR}) - list(APPEND SDL_MIXER_LIBRARIES ${MPG123_LIBRARY}) list(APPEND SDL_MIXER_DEFINES MUSIC_MP3_MPG123) + list(APPEND SDL_MIXER_LIBRARIES ${MPG123_LIBRARY}) + if (SDL_DYNAMIC_LOAD) + get_filename_component(MPG123_LIBRARY_NAME "${MPG123_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DMPG123_DYNAMIC="${MPG123_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() endif() # FLAC support @@ -24,8 +28,12 @@ if(SDL_MIXER_ENABLE_FLAC) find_path(FLAC_INCLUDE_DIR FLAC/all.h) find_library(FLAC_LIBRARY FLAC) list(APPEND SDL_MIXER_INCLUDES ${FLAC_INCLUDE_DIR}) - list(APPEND SDL_MIXER_LIBRARIES ${FLAC_LIBRARY}) list(APPEND SDL_MIXER_DEFINES MUSIC_FLAC) + list(APPEND SDL_MIXER_LIBRARIES ${FLAC_LIBRARY}) + if (SDL_DYNAMIC_LOAD) + get_filename_component(FLAC_LIBRARY_NAME "${FLAC_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DFLAC_DYNAMIC="${FLAC_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() endif() # MOD support @@ -33,8 +41,12 @@ if(SDL_MIXER_ENABLE_MOD) find_path(MODPLUG_INCLUDE_DIR libmodplug/modplug.h) find_library(MODPLUG_LIBRARY modplug) list(APPEND SDL_MIXER_INCLUDES ${MODPLUG_INCLUDE_DIR}) - list(APPEND SDL_MIXER_LIBRARIES ${MODPLUG_LIBRARY}) list(APPEND SDL_MIXER_DEFINES MUSIC_MOD_MODPLUG) + list(APPEND SDL_MIXER_LIBRARIES ${MODPLUG_LIBRARY}) + if (SDL_DYNAMIC_LOAD) + get_filename_component(MODPLUG_LIBRARY_NAME "${MODPLUG_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DMODPLUG_DYNAMIC="${MODPLUG_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() endif() # Ogg-Vorbis support @@ -42,19 +54,38 @@ if(SDL_MIXER_ENABLE_OGGVORBIS) find_path(VORBIS_INCLUDE_DIR vorbis/codec.h) find_library(VORBISFILE_LIBRARY vorbisfile) list(APPEND SDL_MIXER_INCLUDES ${VORBIS_INCLUDE_DIR}) - list(APPEND SDL_MIXER_LIBRARIES ${VORBISFILE_LIBRARY}) list(APPEND SDL_MIXER_DEFINES MUSIC_OGG) + list(APPEND SDL_MIXER_LIBRARIES ${VORBISFILE_LIBRARY}) + if (SDL_DYNAMIC_LOAD) + get_filename_component(VORBISFILE_LIBRARY_NAME "${VORBISFILE_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DOGG_DYNAMIC="${VORBISFILE_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() endif() # Opus support if(SDL_MIXER_ENABLE_OPUS) find_path(OPUS_INCLUDE_DIR opus/opusfile.h) - find_package(ogg CONFIG REQUIRED) - find_package(Opus CONFIG REQUIRED) find_library(OPUSFILE_LIBRARY opusfile) list(APPEND SDL_MIXER_INCLUDES ${OPUS_INCLUDE_DIR}) - list(APPEND SDL_MIXER_LIBRARIES ${OPUSFILE_LIBRARY} Ogg::ogg Opus::opus) list(APPEND SDL_MIXER_DEFINES MUSIC_OPUS) + list(APPEND SDL_MIXER_LIBRARIES ${OPUSFILE_LIBRARY}) + if (SDL_DYNAMIC_LOAD) + get_filename_component(OPUSFILE_LIBRARY_NAME "${OPUSFILE_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DOPUS_DYNAMIC="${OPUSFILE_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() +endif() + +# Fluidsynth support +if(SDL_MIXER_ENABLE_FLUIDSYNTH) + find_path(FLUIDSYNTH_INCLUDE_DIR fluidsynth.h) + find_library(FLUIDSYNTH_LIBRARY fluidsynth) + list(APPEND SDL_MIXER_INCLUDES ${FLUIDSYNTH_INCLUDE_DIR}) + list(APPEND SDL_MIXER_DEFINES MUSIC_MID_FLUIDSYNTH) + list(APPEND SDL_MIXER_LIBRARIES ${FLUIDSYNTH_LIBRARY}) + if (SDL_DYNAMIC_LOAD) + get_filename_component(FLUIDSYNTH_LIBRARY_NAME "${FLUIDSYNTH_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DFLUIDSYNTH_DYNAMIC="${FLUIDSYNTH_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() endif() add_library(SDL2_mixer @@ -78,14 +109,20 @@ add_library(SDL2_mixer music_wav.c version.rc) -if(WIN32) +if((WIN32 OR APPLE) AND SDL_MIXER_ENABLE_NATIVEMIDI) list(APPEND SDL_MIXER_DEFINES MUSIC_MID_NATIVE) - target_sources(SDL2_mixer PRIVATE music_nativemidi.c native_midi/native_midi_common.c native_midi/native_midi_win32.c) - target_link_libraries(SDL2_mixer ${SDL_MIXER_LIBRARIES} Winmm) + target_sources(SDL2_mixer PRIVATE music_nativemidi.c native_midi/native_midi_common.c) + target_link_libraries(SDL2_mixer ${SDL_MIXER_LIBRARIES}) + if(WIN32) + target_sources(SDL2_mixer PRIVATE native_midi/native_midi_win32.c) + target_link_libraries(SDL2_mixer Winmm) + elseif(APPLE) + target_sources(SDL2_mixer PRIVATE native_midi/native_midi_macosx.c) + endif() endif() -set_target_properties(SDL2_mixer PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) -target_compile_definitions(SDL2_mixer PRIVATE ${SDL_MIXER_DEFINES}) +set_target_properties(SDL2_mixer PROPERTIES DEFINE_SYMBOL DLL_EXPORT) +target_compile_definitions(SDL2_mixer PRIVATE ${SDL_MIXER_DEFINES} ${SDL_MIXER_LOAD_DEFINES}) target_include_directories(SDL2_mixer PRIVATE ${SDL_MIXER_INCLUDES} ./native_midi) install(TARGETS SDL2_mixer diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL deleted file mode 100644 index 2c76639dcd6908..00000000000000 --- a/ports/sdl2-mixer/CONTROL +++ /dev/null @@ -1,25 +0,0 @@ -Source: sdl2-mixer -Version: 2.0.4-3 -Homepage: https://www.libsdl.org/projects/SDL_mixer -Description: Multi-channel audio mixer library for SDL. -Build-Depends: sdl2 - -Feature: libflac -Description: Support for FLAC audio format. -Build-Depends: libflac - -Feature: mpg123 -Description: Support for MP3 audio format. -Build-Depends: mpg123 - -Feature: libmodplug -Description: Support for MOD audio format. -Build-Depends: libmodplug - -Feature: libvorbis -Description: Support for OGG Vorbis audio format. -Build-Depends: libvorbis - -Feature: opusfile -Description: Support for Opus audio format. -Build-Depends: opusfile diff --git a/ports/sdl2-mixer/portfile.cmake b/ports/sdl2-mixer/portfile.cmake index 977062a19d454a..aa89f98e7a5d36 100644 --- a/ports/sdl2-mixer/portfile.cmake +++ b/ports/sdl2-mixer/portfile.cmake @@ -1,5 +1,5 @@ -include(vcpkg_common_functions) set(SDL2_MIXER_VERSION 2.0.4) + vcpkg_download_distfile(ARCHIVE URLS "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${SDL2_MIXER_VERSION}.zip" FILENAME "SDL2_mixer-${SDL2_MIXER_VERSION}.zip" @@ -11,51 +11,47 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} REF ${SDL2_MIXER_VERSION} ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -set(USE_MP3 OFF) -if("mpg123" IN_LIST FEATURES) - set(USE_MP3 ON) -endif() - -set(USE_FLAC OFF) -if("libflac" IN_LIST FEATURES) - set(USE_FLAC ON) -endif() -set(USE_MOD OFF) -if("libmodplug" IN_LIST FEATURES) - set(USE_MOD ON) +if ("dynamic-load" IN_LIST FEATURES) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message("Building static library, disable dynamic loading") + elseif (NOT "mpg123" IN_LIST FEATURES + AND NOT "libflac" IN_LIST FEATURES + AND NOT "libmodplug" IN_LIST FEATURES + AND NOT "libvorbis" IN_LIST FEATURES + AND NOT "opusfile" IN_LIST FEATURES + ) + message("No features selected, dynamic loading will not be enabled") + endif() endif() -set(USE_OGGVORBIS OFF) -if("libvorbis" IN_LIST FEATURES) - set(USE_OGGVORBIS ON) -endif() - -set(USE_OPUS OFF) -if("opusfile" IN_LIST FEATURES) - set(USE_OPUS ON) -endif() +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + dynamic-load SDL_DYNAMIC_LOAD + mpg123 SDL_MIXER_ENABLE_MP3 + libflac SDL_MIXER_ENABLE_FLAC + libmodplug SDL_MIXER_ENABLE_MOD + libvorbis SDL_MIXER_ENABLE_OGGVORBIS + opusfile SDL_MIXER_ENABLE_OPUS + nativemidi SDL_MIXER_ENABLE_NATIVEMIDI + fluidsynth SDL_MIXER_ENABLE_FLUIDSYNTH +) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DSDL_MIXER_ENABLE_MP3=${USE_MP3} # mpg123 - -DSDL_MIXER_ENABLE_FLAC=${USE_FLAC} # libflac - -DSDL_MIXER_ENABLE_MOD=${USE_MOD} # libmodplug - -DSDL_MIXER_ENABLE_OGGVORBIS=${USE_OGGVORBIS} # libvorbis - -DSDL_MIXER_ENABLE_OPUS=${USE_OPUS} # opusfile + ${FEATURE_OPTIONS} + -DLIBRARY_SUFFIX=${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX} # It should always be dynamic suffix OPTIONS_DEBUG -DSDL_MIXER_SKIP_HEADERS=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets() +vcpkg_cmake_config_fixup() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-mixer) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-mixer/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-mixer/copyright) +file(INSTALL "${SOURCE_PATH}/COPYING.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/sdl2-mixer/vcpkg.json b/ports/sdl2-mixer/vcpkg.json new file mode 100644 index 00000000000000..02013acf1a11db --- /dev/null +++ b/ports/sdl2-mixer/vcpkg.json @@ -0,0 +1,65 @@ +{ + "name": "sdl2-mixer", + "version": "2.0.4", + "port-version": 13, + "description": "Multi-channel audio mixer library for SDL.", + "homepage": "https://www.libsdl.org/projects/SDL_mixer", + "dependencies": [ + "sdl2", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "nativemidi" + ], + "features": { + "dynamic-load": { + "description": "Load plugins with dynamic call." + }, + "fluidsynth": { + "description": "Support for FluidSynth MIDI/SF2 audio format.", + "dependencies": [ + "fluidsynth" + ] + }, + "libflac": { + "description": "Support for FLAC audio format.", + "dependencies": [ + "libflac" + ] + }, + "libmodplug": { + "description": "Support for MOD audio format.", + "dependencies": [ + "libmodplug" + ] + }, + "libvorbis": { + "description": "Support for OGG Vorbis audio format.", + "dependencies": [ + "libvorbis" + ] + }, + "mpg123": { + "description": "Support for MP3 audio format.", + "dependencies": [ + "mpg123" + ] + }, + "nativemidi": { + "description": "Support for MIDI audio format on Windows and macOS." + }, + "opusfile": { + "description": "Support for Opus audio format.", + "dependencies": [ + "opusfile" + ] + } + } +} diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index 0530936434b54b..87c77929c9b57d 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(SDL2 CONFIG REQUIRED) add_library(SDL2_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c version.rc) -set_target_properties(SDL2_net PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) +set_target_properties(SDL2_net PROPERTIES DEFINE_SYMBOL DLL_EXPORT) target_compile_definitions(SDL2_net PRIVATE _WINSOCK_DEPRECATED_NO_WARNINGS) target_include_directories(SDL2_net PRIVATE ${SDL_INCLUDE_DIR}/SDL2) diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL deleted file mode 100644 index 9270c5a823c7e9..00000000000000 --- a/ports/sdl2-net/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sdl2-net -Version: 2.0.1-7 -Homepage: https://www.libsdl.org/projects/SDL_net -Description: Networking library for SDL -Build-Depends: sdl2 diff --git a/ports/sdl2-net/portfile.cmake b/ports/sdl2-net/portfile.cmake index b047be96b512d7..9534a9aa4f8421 100644 --- a/ports/sdl2-net/portfile.cmake +++ b/ports/sdl2-net/portfile.cmake @@ -1,11 +1,13 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_net-2.0.1) vcpkg_download_distfile(ARCHIVE URLS "https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.0.1.tar.gz" FILENAME "SDL2_net-2.0.1.tar.gz" - SHA512 d27faee3cddc3592dae38947e6c1df0cbaa95f82fde9c87db6d11f6312d868cea74f6830ad07ceeb3d0d75e9424cebf39e54fddf9a1147e8d9e664609de92b7a) + SHA512 d27faee3cddc3592dae38947e6c1df0cbaa95f82fde9c87db6d11f6312d868cea74f6830ad07ceeb3d0d75e9424cebf39e54fddf9a1147e8d9e664609de92b7a +) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -21,5 +23,4 @@ vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-net) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-net/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-net/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sdl2-net/vcpkg.json b/ports/sdl2-net/vcpkg.json new file mode 100644 index 00000000000000..03aa452d8ed8d8 --- /dev/null +++ b/ports/sdl2-net/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "sdl2-net", + "version-string": "2.0.1", + "port-version": 9, + "description": "Networking library for SDL", + "homepage": "https://www.libsdl.org/projects/SDL_net", + "dependencies": [ + "sdl2" + ] +} diff --git a/ports/sdl2-ttf/CMakeLists.txt b/ports/sdl2-ttf/CMakeLists.txt index 8d34a413a25ca5..1ac20ec1f2c92c 100644 --- a/ports/sdl2-ttf/CMakeLists.txt +++ b/ports/sdl2-ttf/CMakeLists.txt @@ -7,7 +7,7 @@ find_package(Freetype REQUIRED) add_library(SDL2_ttf SDL_ttf.c version.rc) -set_target_properties(SDL2_ttf PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) +set_target_properties(SDL2_ttf PROPERTIES DEFINE_SYMBOL DLL_EXPORT) target_include_directories(SDL2_ttf PRIVATE ${SDL_INCLUDE_DIR}/SDL2 ${FREETYPE_INCLUDE_DIRS}) target_link_libraries(SDL2_ttf SDL2::SDL2 ${FREETYPE_LIBRARIES}) diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL deleted file mode 100644 index 34d12bafd5ac7e..00000000000000 --- a/ports/sdl2-ttf/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sdl2-ttf -Version: 2.0.15-3 -Homepage: https://www.libsdl.org/projects/SDL_ttf/ -Description: A library for rendering TrueType fonts with SDL -Build-Depends: sdl2, freetype diff --git a/ports/sdl2-ttf/portfile.cmake b/ports/sdl2-ttf/portfile.cmake index eb623e13eff10b..24f75241fd8c4c 100644 --- a/ports/sdl2-ttf/portfile.cmake +++ b/ports/sdl2-ttf/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(VERSION 2.0.15) vcpkg_download_distfile(ARCHIVE diff --git a/ports/sdl2-ttf/vcpkg.json b/ports/sdl2-ttf/vcpkg.json new file mode 100644 index 00000000000000..73035cb60d7102 --- /dev/null +++ b/ports/sdl2-ttf/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "sdl2-ttf", + "version-string": "2.0.15", + "port-version": 4, + "description": "A library for rendering TrueType fonts with SDL", + "homepage": "https://www.libsdl.org/projects/SDL_ttf/", + "dependencies": [ + "freetype", + "sdl2" + ] +} diff --git a/ports/sdl2/0001-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch b/ports/sdl2/0001-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch new file mode 100644 index 00000000000000..e69568b2323d76 --- /dev/null +++ b/ports/sdl2/0001-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch @@ -0,0 +1,35 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2348,7 +2348,6 @@ + execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh + WORKING_DIRECTORY ${SDL2_BINARY_DIR}) + endif() +-if(NOT WINDOWS OR CYGWIN OR MINGW) + + set(prefix ${CMAKE_INSTALL_PREFIX}) + +@@ -2375,7 +2375,7 @@ + set(SDL_STATIC_LIBS ${_SDL_STATIC_LIBS}) + listtostrrev(SDL_LIBS _SDL_LIBS) + set(SDL_LIBS ${_SDL_LIBS}) +- else() ++ elseif(NOT WINDOWS_STORE) + listtostr(EXTRA_LIBS _EXTRA_LIBS "-l") + set(SDL_STATIC_LIBS ${SDL_LIBS} ${EXTRA_LDFLAGS} ${_EXTRA_LIBS}) + list(REMOVE_DUPLICATES SDL_STATIC_LIBS) +@@ -2403,7 +2403,6 @@ + "${SDL2_BINARY_DIR}/sdl2-config" @ONLY) + configure_file("${SDL2_SOURCE_DIR}/SDL2.spec.in" + "${SDL2_BINARY_DIR}/SDL2.spec" @ONLY) +-endif() + + macro(check_add_debug_flag FLAG SUFFIX) + check_c_compiler_flag(${FLAG} HAS_C_FLAG_${SUFFIX}) +@@ -2728,6 +2728,7 @@ + # TODO: what about the .spec file? Is it only needed for RPM creation? + install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/aclocal") + endif() ++install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "lib${LIB_SUFFIX}/pkgconfig") + + ##### Uninstall target ##### + diff --git a/ports/sdl2/0002-sdl2-skip-ibus-on-linux.patch b/ports/sdl2/0002-sdl2-skip-ibus-on-linux.patch new file mode 100644 index 00000000000000..b23212fa031ab6 --- /dev/null +++ b/ports/sdl2/0002-sdl2-skip-ibus-on-linux.patch @@ -0,0 +1,15 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1295,12 +1295,6 @@ + set(HAVE_FCITX TRUE) + endif() + +- pkg_search_module(IBUS ibus-1.0 ibus) +- if(IBUS_FOUND) +- set(HAVE_IBUS_IBUS_H TRUE) +- include_directories(${IBUS_INCLUDE_DIRS}) +- list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES}) +- endif() + + if (HAVE_IBUS_IBUS_H OR HAVE_FCITX) + set(SDL_USE_IME TRUE) diff --git a/ports/sdl2/0003-sdl2-disable-sdlmain-target-search-on-uwp.patch b/ports/sdl2/0003-sdl2-disable-sdlmain-target-search-on-uwp.patch new file mode 100644 index 00000000000000..e5ab214675c804 --- /dev/null +++ b/ports/sdl2/0003-sdl2-disable-sdlmain-target-search-on-uwp.patch @@ -0,0 +1,34 @@ +--- a/SDL2Config.cmake ++++ b/SDL2Config.cmake +@@ -32,6 +2,7 @@ + endif() + endforeach() + ++if(NOT WINDOWS_STORE) + foreach(prop ${relprops}) + get_target_property(sdl2mainimplib SDL2::SDL2main ${prop}) + if(sdl2mainimplib) +@@ -37,6 +37,7 @@ + break() + endif() + endforeach() ++endif() + + foreach(prop ${dbgprops}) + get_target_property(sdl2implibdbg SDL2::SDL2 ${prop}) +@@ -47,6 +47,7 @@ + endif() + endforeach() + ++if(NOT WINDOWS_STORE) + foreach(prop ${dbgprops}) + get_target_property(sdl2mainimplibdbg SDL2::SDL2main ${prop}) + if(sdl2mainimplibdbg) +@@ -55,6 +55,7 @@ + break() + endif() + endforeach() ++endif() + + if( sdl2implib AND sdl2mainimplib AND sdl2implibdbg AND sdl2mainimplibdbg ) + # we have both release and debug builds of SDL2 and SDL2main, so use this ugly diff --git a/ports/sdl2/0004-sdl2-alias-on-static-build.patch b/ports/sdl2/0004-sdl2-alias-on-static-build.patch new file mode 100644 index 00000000000000..4fffb18027ee17 --- /dev/null +++ b/ports/sdl2/0004-sdl2-alias-on-static-build.patch @@ -0,0 +1,17 @@ +--- a/SDL2Config.cmake ++++ b/SDL2Config.cmake +@@ -2,5 +2,14 @@ + include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake") + ++# on static-only builds create an alias ++if(NOT TARGET SDL2::SDL2 AND TARGET SDL2::SDL2-static) ++ if(CMAKE_VERSION VERSION_LESS "3.18") ++ # Aliasing local targets is not supported on CMake < 3.18, so make it global. ++ set_target_properties(SDL2::SDL2-static PROPERTIES IMPORTED_GLOBAL TRUE) ++ endif() ++ add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static) ++endif() ++ + # provide ${SDL2_LIBRARIES}, ${SDL2_INCLUDE_DIRS} etc, like sdl2-config.cmake does, + # for compatibility between SDL2 built with autotools and SDL2 built with CMake + diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL deleted file mode 100644 index d76db966f87809..00000000000000 --- a/ports/sdl2/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: sdl2 -Version: 2.0.9-4 -Homepage: https://github.com/SDL-Mirror/SDL -Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. - -Feature: vulkan -Description: Vulkan functionality for SDL -Build-Depends: vulkan diff --git a/ports/sdl2/SDL-2.0.9-bug-4391-fix.patch b/ports/sdl2/SDL-2.0.9-bug-4391-fix.patch deleted file mode 100644 index f8fc64bda6ac01..00000000000000 --- a/ports/sdl2/SDL-2.0.9-bug-4391-fix.patch +++ /dev/null @@ -1,75 +0,0 @@ -# HG changeset patch -# User Sam Lantinga -# Date 1542691020 28800 -# Node ID 9091b20040cf04cdc348d290ca22373b36364c39 -# Parent 144400e4630d885d2eb0761b7174433b4c0d90bb -Fixed bug 4391 - hid_enumerate() sometimes causes game to freeze for a few seconds - -Daniel Gibson - -Even though my game (dhewm3) doesn't use SDL_INIT_JOYSTICK, SDL_PumpEvent() calls SDL_JoystickUpdate() which ends up calling hid_enumerate() every three seconds, and sometimes on my Win7 box hid_enumerate() takes about 5 seconds, which causes the whole game to freeze for that time. - -diff -r 144400e4630d -r 9091b20040cf include/SDL_bits.h ---- a/include/SDL_bits.h Sun Nov 18 19:28:20 2018 +0300 -+++ b/include/SDL_bits.h Mon Nov 19 21:17:00 2018 -0800 -@@ -101,6 +101,15 @@ - #endif - } - -+SDL_FORCE_INLINE SDL_bool -+SDL_HasExactlyOneBitSet32(Uint32 x) -+{ -+ if (x && !(x & (x - 1))) { -+ return SDL_TRUE; -+ } -+ return SDL_FALSE; -+} -+ - /* Ends C function definitions when using C++ */ - #ifdef __cplusplus - } -diff -r 144400e4630d -r 9091b20040cf src/SDL.c ---- a/src/SDL.c Sun Nov 18 19:28:20 2018 +0300 -+++ b/src/SDL.c Mon Nov 19 21:17:00 2018 -0800 -@@ -348,6 +348,12 @@ - int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount); - Uint32 initialized = 0; - -+ /* Fast path for checking one flag */ -+ if (SDL_HasExactlyOneBitSet32(flags)) { -+ int subsystem_index = SDL_MostSignificantBitIndex32(flags); -+ return SDL_SubsystemRefCount[subsystem_index] ? flags : 0; -+ } -+ - if (!flags) { - flags = SDL_INIT_EVERYTHING; - } -diff -r 144400e4630d -r 9091b20040cf src/joystick/SDL_joystick.c ---- a/src/joystick/SDL_joystick.c Sun Nov 18 19:28:20 2018 +0300 -+++ b/src/joystick/SDL_joystick.c Mon Nov 19 21:17:00 2018 -0800 -@@ -1016,6 +1016,10 @@ - int i; - SDL_Joystick *joystick; - -+ if (!SDL_WasInit(SDL_INIT_JOYSTICK)) { -+ return; -+ } -+ - SDL_LockJoysticks(); - - if (SDL_updating_joystick) { -diff -r 144400e4630d -r 9091b20040cf src/sensor/SDL_sensor.c ---- a/src/sensor/SDL_sensor.c Sun Nov 18 19:28:20 2018 +0300 -+++ b/src/sensor/SDL_sensor.c Mon Nov 19 21:17:00 2018 -0800 -@@ -505,6 +505,10 @@ - int i; - SDL_Sensor *sensor; - -+ if (!SDL_WasInit(SDL_INIT_SENSOR)) { -+ return; -+ } -+ - SDL_LockSensors(); - - if (SDL_updating_sensor) { - diff --git a/ports/sdl2/enable-winrt-cmake.patch b/ports/sdl2/enable-winrt-cmake.patch deleted file mode 100644 index 1d1356fba933d7..00000000000000 --- a/ports/sdl2/enable-winrt-cmake.patch +++ /dev/null @@ -1,175 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0128c7a..bd534e4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -5,6 +5,18 @@ endif() - cmake_minimum_required(VERSION 2.8.11) - project(SDL2 C) - -+if(WINDOWS_STORE) -+ enable_language(CXX) -+ cmake_minimum_required(VERSION 3.11) -+ add_definitions(-DSDL_BUILDING_WINRT=1 -ZW) -+ link_libraries( -+ -nodefaultlib:vccorlib$<$:d> -+ -nodefaultlib:msvcrt$<$:d> -+ vccorlib$<$:d>.lib -+ msvcrt$<$:d>.lib -+ ) -+endif() -+ - # !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property - # !!! FIXME: for the SDL2 shared library (so you get an - # !!! FIXME: install_name ("soname") of "@rpath/libSDL-whatever.dylib" -@@ -1166,6 +1178,11 @@ elseif(WINDOWS) - file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) - -+ if(WINDOWS_STORE) -+ file(GLOB WINRT_SOURCE_FILES ${SDL2_SOURCE_DIR}/src/core/winrt/*.c ${SDL2_SOURCE_DIR}/src/core/winrt/*.cpp) -+ list(APPEND SOURCE_FILES ${WINRT_SOURCE_FILES}) -+ endif() -+ - if(MSVC) - # Prevent codegen that would use the VC runtime libraries. - set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-") -@@ -1211,6 +1228,9 @@ elseif(WINDOWS) - check_include_file(ddraw.h HAVE_DDRAW_H) - check_include_file(dsound.h HAVE_DSOUND_H) - check_include_file(dinput.h HAVE_DINPUT_H) -+ if(WINDOWS_STORE OR VCPKG_TARGET_TRIPLET MATCHES "arm-windows") -+ set(HAVE_DINPUT_H 0) -+ endif() - check_include_file(dxgi.h HAVE_DXGI_H) - if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H) - set(HAVE_DIRECTX TRUE) -@@ -1229,18 +1249,20 @@ elseif(WINDOWS) - check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H) - - if(SDL_AUDIO) -+ if(NOT WINDOWS_STORE) - set(SDL_AUDIO_DRIVER_WINMM 1) - file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES}) -+ endif() - set(HAVE_SDL_AUDIO TRUE) - -- if(HAVE_DSOUND_H) -+ if(HAVE_DSOUND_H AND NOT WINDOWS_STORE) - set(SDL_AUDIO_DRIVER_DSOUND 1) - file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES}) - endif() - -- if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H) -+ if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H AND NOT WINDOWS_STORE) - set(SDL_AUDIO_DRIVER_WASAPI 1) - file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES}) -@@ -1252,11 +1274,20 @@ elseif(WINDOWS) - if(NOT SDL_LOADSO) - message_error("SDL_VIDEO requires SDL_LOADSO, which is not enabled") - endif() -+ if(WINDOWS_STORE) -+ set(SDL_VIDEO_DRIVER_WINRT 1) -+ file(GLOB WIN_VIDEO_SOURCES -+ ${SDL2_SOURCE_DIR}/src/video/winrt/*.c -+ ${SDL2_SOURCE_DIR}/src/video/winrt/*.cpp -+ ${SDL2_SOURCE_DIR}/src/render/direct3d11/*.cpp -+ ) -+ else() - set(SDL_VIDEO_DRIVER_WINDOWS 1) - file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c) -+ endif() - set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES}) - -- if(RENDER_D3D AND HAVE_D3D_H) -+ if(RENDER_D3D AND HAVE_D3D_H AND NOT WINDOWS_STORE) - set(SDL_VIDEO_RENDER_D3D 1) - set(HAVE_RENDER_D3D TRUE) - endif() -@@ -1279,20 +1310,31 @@ elseif(WINDOWS) - endif() - - if(SDL_POWER) -+ if(WINDOWS_STORE) -+ set(SDL_POWER_WINRT 1) -+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp) -+ else() - set(SDL_POWER_WINDOWS 1) - set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c) -+ endif() - set(HAVE_SDL_POWER TRUE) - endif() - - if(SDL_FILESYSTEM) - set(SDL_FILESYSTEM_WINDOWS 1) -+ if(WINDOWS_STORE) -+ file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/winrt/*.cpp) -+ else() - file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c) -+ endif() - set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES}) - set(HAVE_SDL_FILESYSTEM TRUE) - endif() - - # Libraries for Win32 native and MinGW -+ if(NOT WINDOWS_STORE) - list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 shell32) -+ endif() - - # TODO: in configure.in the check for timers is set on - # cygwin | mingw32* - does this include mingw32CE? -@@ -1314,7 +1356,7 @@ elseif(WINDOWS) - set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) - - if(SDL_VIDEO) -- if(VIDEO_OPENGL) -+ if(VIDEO_OPENGL AND NOT WINDOWS_STORE) - set(SDL_VIDEO_OPENGL 1) - set(SDL_VIDEO_OPENGL_WGL 1) - set(SDL_VIDEO_RENDER_OGL 1) -@@ -1731,12 +1773,14 @@ endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") - - # Always build SDLmain -+if(NOT WINDOWS_STORE) - add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) - target_include_directories(SDL2main PUBLIC "$" $) - set(_INSTALL_LIBS "SDL2main") - if (NOT ANDROID) - set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) - endif() -+endif() - - if(SDL_SHARED) - add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES}) -diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake -index 48dd2d4..0c4fa28 100644 ---- a/include/SDL_config.h.cmake -+++ b/include/SDL_config.h.cmake -@@ -324,6 +324,7 @@ - #cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@ - #cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@ - #cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@ -+#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@ - #cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@ - #cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@ - #cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@ -@@ -392,6 +393,7 @@ - #cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@ - #cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@ - #cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@ -+#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@ - #cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@ - #cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@ - #cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@ -@@ -414,7 +416,7 @@ - #cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@ - - /* Platform specific definitions */ --#if !defined(__WIN32__) -+#if !defined(__WIN32__) && !defined(__WINRT__) - # if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H) - typedef unsigned int size_t; - typedef signed char int8_t; diff --git a/ports/sdl2/export-symbols-only-in-shared-build.patch b/ports/sdl2/export-symbols-only-in-shared-build.patch deleted file mode 100644 index 7e6d503e2317d0..00000000000000 --- a/ports/sdl2/export-symbols-only-in-shared-build.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User Mikhail Paulyshka -# Date 1506252750 -10800 -# Sun Sep 24 14:32:30 2017 +0300 -# Branch SDL2-WIN-SYMBOLS_LEACKAGE -# Node ID 46ec9baae30cd4e0c584de125cae4a3cce2864ad -# Parent 8df7a59b55283aa09889522369a2b32674c048de -win32: fix symbols leakage for static libraries - -diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h ---- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700 -+++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300 -@@ -58,8 +58,10 @@ - # else - # define DECLSPEC __declspec(dllimport) - # endif -+# elif defined(_DLL) -+# define DECLSPEC __declspec(dllexport) - # else --# define DECLSPEC __declspec(dllexport) -+# define DECLSPEC - # endif - # elif defined(__OS2__) - # ifdef BUILD_SDL diff --git a/ports/sdl2/fix-x86-windows.patch b/ports/sdl2/fix-x86-windows.patch deleted file mode 100644 index 853b68722cd884..00000000000000 --- a/ports/sdl2/fix-x86-windows.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c -index ff23c5e..fc90bba 100644 ---- a/src/events/SDL_mouse.c -+++ b/src/events/SDL_mouse.c -@@ -20,6 +20,10 @@ - */ - #include "../SDL_internal.h" - -+#ifdef __WIN32__ -+#include "../core/windows/SDL_windows.h" -+#endif -+ - /* General mouse handling code for SDL */ - - #include "SDL_assert.h" diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index a2bc6363af664a..391ea4f762624c 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -1,34 +1,32 @@ -include(vcpkg_common_functions) - +set(SDL2_VERSION 2.0.16) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO SDL-Mirror/SDL - REF release-2.0.9 - SHA512 444c906c0baa720c86ca72d1b4cd66fdf6f516d5d2a9836169081a2997a5aebaaf9caa687ec060fa02292d79cfa4a62442333e00f90a0239edd1601529f6b056 + REPO libsdl-org/SDL + REF release-2.0.16 + SHA512 45ce71f77b01f5fd886f92e5b3d96f1f72c7e0f70c09e615384a900533b941cad65bf6b54a125a9eeb8499e2056e9a8e54d4e654bccfca9730584792a2b18fbc HEAD_REF master PATCHES - export-symbols-only-in-shared-build.patch - fix-x86-windows.patch - enable-winrt-cmake.patch - SDL-2.0.9-bug-4391-fix.patch # See: https://bugzilla.libsdl.org/show_bug.cgi?id=4391 # Can be removed once SDL 2.0.10 is released + 0001-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch + 0002-sdl2-skip-ibus-on-linux.patch + 0003-sdl2-disable-sdlmain-target-search-on-uwp.patch + 0004-sdl2-alias-on-static-build.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SDL_SHARED) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT) -set(VULKAN_VIDEO OFF) -if("vulkan" IN_LIST FEATURES) - set(VULKAN_VIDEO ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + vulkan VIDEO_VULKAN +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} -DSDL_STATIC=${SDL_STATIC} -DSDL_SHARED=${SDL_SHARED} - -DVIDEO_VULKAN=${VULKAN_VIDEO} -DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT} -DLIBC=ON ) @@ -72,12 +70,23 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME) file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake) foreach(SHARE_FILE ${SHARE_FILES}) - file(READ "${SHARE_FILE}" _contents) - string(REPLACE "lib/SDL2main" "lib/manual-link/SDL2main" _contents "${_contents}") - file(WRITE "${SHARE_FILE}" "${_contents}") + vcpkg_replace_string("${SHARE_FILE}" "lib/SDL2main" "lib/manual-link/SDL2main") endforeach() endif() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2) -configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2/copyright COPYONLY) +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) vcpkg_copy_pdbs() + +set(DYLIB_COMPATIBILITY_VERSION_REGEX "set\\(DYLIB_COMPATIBILITY_VERSION (.+)\\)") +set(DYLIB_CURRENT_VERSION_REGEX "set\\(DYLIB_CURRENT_VERSION (.+)\\)") +file(STRINGS "${SOURCE_PATH}/CMakeLists.txt" DYLIB_COMPATIBILITY_VERSION REGEX ${DYLIB_COMPATIBILITY_VERSION_REGEX}) +file(STRINGS "${SOURCE_PATH}/CMakeLists.txt" DYLIB_CURRENT_VERSION REGEX ${DYLIB_CURRENT_VERSION_REGEX}) +string(REGEX REPLACE ${DYLIB_COMPATIBILITY_VERSION_REGEX} "\\1" DYLIB_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}") +string(REGEX REPLACE ${DYLIB_CURRENT_VERSION_REGEX} "\\1" DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}") + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2main" "-lSDL2maind") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2 " "-lSDL2d ") +endif() + +vcpkg_fixup_pkgconfig() diff --git a/ports/sdl2/vcpkg-cmake-wrapper.cmake b/ports/sdl2/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index c99178db1a1a61..00000000000000 --- a/ports/sdl2/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,8 +0,0 @@ -_find_package(${ARGS}) -if(TARGET SDL2::SDL2 AND NOT TARGET SDL2::SDL2-static) - add_library( SDL2::SDL2-static INTERFACE IMPORTED) - set_target_properties(SDL2::SDL2-static PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2") -elseif(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2) - add_library( SDL2::SDL2 INTERFACE IMPORTED) - set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static") -endif() diff --git a/ports/sdl2/vcpkg.json b/ports/sdl2/vcpkg.json new file mode 100644 index 00000000000000..56e6aa57ed94b4 --- /dev/null +++ b/ports/sdl2/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "sdl2", + "version": "2.0.16", + "description": "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.", + "homepage": "https://www.libsdl.org/download-2.0.php", + "features": { + "vulkan": { + "description": "Vulkan functionality for SDL" + } + } +} diff --git a/ports/sdl2pp/CONTROL b/ports/sdl2pp/CONTROL deleted file mode 100644 index 6a3f7c50936862..00000000000000 --- a/ports/sdl2pp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sdl2pp -Version: 0.16.0-1 -Description: C++11 bindings/wrapper for SDL2 -Homepage: https://sdl2pp.amdmi3.ru -Build-Depends: sdl2, sdl2-mixer, sdl2-image, sdl2-ttf diff --git a/ports/sdl2pp/find-debug-libs.patch b/ports/sdl2pp/find-debug-libs.patch deleted file mode 100644 index 282324345e0a59..00000000000000 --- a/ports/sdl2pp/find-debug-libs.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake -index 8b2addb..4def5f3 100644 ---- a/cmake/FindSDL2.cmake -+++ b/cmake/FindSDL2.cmake -@@ -8,8 +8,8 @@ - - FIND_PATH(SDL2_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES SDL2) - --FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2) --FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2main) -+FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2d SDL2) -+FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2maind SDL2main) - - INCLUDE(FindPackageHandleStandardArgs) - -diff --git a/cmake/FindSDL2_image.cmake b/cmake/FindSDL2_image.cmake -index 88adb3f..d6e829d 100644 ---- a/cmake/FindSDL2_image.cmake -+++ b/cmake/FindSDL2_image.cmake -@@ -8,7 +8,7 @@ - - FIND_PATH(SDL2_IMAGE_INCLUDE_DIR NAMES SDL_image.h PATH_SUFFIXES SDL2) - --FIND_LIBRARY(SDL2_IMAGE_LIBRARY NAMES SDL2_image) -+FIND_LIBRARY(SDL2_IMAGE_LIBRARY NAMES SDL2_imaged SDL2_image) - - INCLUDE(FindPackageHandleStandardArgs) - -diff --git a/cmake/FindSDL2_mixer.cmake b/cmake/FindSDL2_mixer.cmake -index ef5748b..c2dbbde 100644 ---- a/cmake/FindSDL2_mixer.cmake -+++ b/cmake/FindSDL2_mixer.cmake -@@ -8,7 +8,7 @@ - - FIND_PATH(SDL2_MIXER_INCLUDE_DIR NAMES SDL_mixer.h PATH_SUFFIXES SDL2) - --FIND_LIBRARY(SDL2_MIXER_LIBRARY NAMES SDL2_mixer) -+FIND_LIBRARY(SDL2_MIXER_LIBRARY NAMES SDL2_mixerd SDL2_mixer) - - INCLUDE(FindPackageHandleStandardArgs) - -diff --git a/cmake/FindSDL2_ttf.cmake b/cmake/FindSDL2_ttf.cmake -index b480d55..9fb65b9 100644 ---- a/cmake/FindSDL2_ttf.cmake -+++ b/cmake/FindSDL2_ttf.cmake -@@ -8,7 +8,7 @@ - - FIND_PATH(SDL2_TTF_INCLUDE_DIR NAMES SDL_ttf.h PATH_SUFFIXES SDL2) - --FIND_LIBRARY(SDL2_TTF_LIBRARY NAMES SDL2_ttf) -+FIND_LIBRARY(SDL2_TTF_LIBRARY NAMES SDL2_ttfd SDL2_ttf) - - INCLUDE(FindPackageHandleStandardArgs) - diff --git a/ports/sdl2pp/fix-dependencies.patch b/ports/sdl2pp/fix-dependencies.patch new file mode 100644 index 00000000000000..48e5c8f979bf2e --- /dev/null +++ b/ports/sdl2pp/fix-dependencies.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cdfd2a6..dc08748 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,11 +23,15 @@ ENDIF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) + + # depends + FIND_PACKAGE(SDL2 REQUIRED) +-SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_INCLUDE_DIR}) +-SET(SDL2_ALL_LIBRARIES ${SDL2_LIBRARY}) ++SET(SDL2_ALL_INCLUDE_DIRS ) ++IF (BUILD_SHARED_LIBS) ++ SET(SDL2_ALL_LIBRARIES SDL2::SDL2) ++ELSE() ++ SET(SDL2_ALL_LIBRARIES SDL2::SDL2-static) ++ENDIF() + SET(SDL2_ALL_PKGCONFIG_MODULES sdl2) +-SET(SDL2PP_EXTRA_LIBRARIES ${SDL2MAIN_LIBRARY}) +-SET(SDL2PP_EXTRA_PKGCONFIG_LIBRARIES ${SDL2MAIN_LIBRARY}) ++SET(SDL2PP_EXTRA_LIBRARIES SDL2::SDL2main) ++SET(SDL2PP_EXTRA_PKGCONFIG_LIBRARIES SDL2::SDL2main) + + IF(MINGW) + SET(MINGW32_LIBRARY "mingw32" CACHE STRING "mingw32 library") +@@ -36,27 +40,27 @@ IF(MINGW) + ENDIF(MINGW) + + IF(SDL2PP_WITH_IMAGE) +- FIND_PACKAGE(SDL2_image REQUIRED) +- SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS} ${SDL2_IMAGE_INCLUDE_DIR}) +- SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} ${SDL2_IMAGE_LIBRARY}) ++ FIND_PACKAGE(sdl2-image CONFIG REQUIRED) ++ SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS}) ++ SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2_image) + SET(SDL2_ALL_PKGCONFIG_MODULES "${SDL2_ALL_PKGCONFIG_MODULES} SDL2_image") + ELSE(SDL2PP_WITH_IMAGE) + MESSAGE(STATUS "SDL2_image support disabled") + ENDIF(SDL2PP_WITH_IMAGE) + + IF(SDL2PP_WITH_TTF) +- FIND_PACKAGE(SDL2_ttf REQUIRED) +- SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS} ${SDL2_TTF_INCLUDE_DIR}) +- SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} ${SDL2_TTF_LIBRARY}) ++ FIND_PACKAGE(sdl2-ttf CONFIG REQUIRED) ++ SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS}) ++ SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2_ttf) + SET(SDL2_ALL_PKGCONFIG_MODULES "${SDL2_ALL_PKGCONFIG_MODULES} SDL2_ttf") + ELSE(SDL2PP_WITH_TTF) + MESSAGE(STATUS "SDL2_ttf support disabled") + ENDIF(SDL2PP_WITH_TTF) + + IF(SDL2PP_WITH_MIXER) +- FIND_PACKAGE(SDL2_mixer REQUIRED) +- SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS} ${SDL2_MIXER_INCLUDE_DIR}) +- SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} ${SDL2_MIXER_LIBRARY}) ++ FIND_PACKAGE(sdl2-mixer CONFIG REQUIRED) ++ SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS}) ++ SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2_mixer) + SET(SDL2_ALL_PKGCONFIG_MODULES "${SDL2_ALL_PKGCONFIG_MODULES} SDL2_mixer") + ELSE(SDL2PP_WITH_MIXER) + MESSAGE(STATUS "SDL2_mixer support disabled") +@@ -81,7 +85,6 @@ ELSE(MSVC) + ENDIF() + ENDIF(MSVC) + +-LIST(REMOVE_DUPLICATES SDL2_ALL_INCLUDE_DIRS) + + INCLUDE_DIRECTORIES(BEFORE ${PROJECT_SOURCE_DIR}) + INCLUDE_DIRECTORIES(SYSTEM ${SDL2_ALL_INCLUDE_DIRS}) +@@ -200,10 +203,10 @@ IF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) + OPTION(SDL2PP_STATIC "Build static library instead of shared one" OFF) + + # library +- IF(SDL2PP_STATIC) ++ IF(0) + ADD_LIBRARY(SDL2pp STATIC ${LIBRARY_SOURCES} ${LIBRARY_HEADERS}) + ELSE(SDL2PP_STATIC) +- ADD_LIBRARY(SDL2pp SHARED ${LIBRARY_SOURCES} ${LIBRARY_HEADERS}) ++ ADD_LIBRARY(SDL2pp ${LIBRARY_SOURCES} ${LIBRARY_HEADERS}) + TARGET_LINK_LIBRARIES(SDL2pp ${SDL2_ALL_LIBRARIES}) + SET_TARGET_PROPERTIES(SDL2pp PROPERTIES VERSION 8.3.0 SOVERSION 8) + ENDIF(SDL2PP_STATIC) diff --git a/ports/sdl2pp/portfile.cmake b/ports/sdl2pp/portfile.cmake index 7fbaf9c693a5c0..1e5cb8b503a4ee 100644 --- a/ports/sdl2pp/portfile.cmake +++ b/ports/sdl2pp/portfile.cmake @@ -1,11 +1,16 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libSDL2pp/libSDL2pp - REF 0.16.0 - SHA512 36603a0b1c3ba9294fffa5368357866e5689ceed9743352ff52c096d8b0070cc3f8708a5e837c10c871b410b6bda3ed7e8e3b95cb9afc136d91afb035cde6361 + REF a02d5a81c3d4122cb578fcd1e5cd4e836878f63b # 0.16.1 + SHA512 cf08abe69b3d313d1c3f63cb138f05105453ea0d04e26daa6d85da41cb742912a37766cce1f8af1277e92a227ea75f481f07bff76f0b501fadec392b8b62336a HEAD_REF master - PATCHES "${CMAKE_CURRENT_LIST_DIR}/find-debug-libs.patch" + PATCHES fix-dependencies.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindSDL2.cmake + ${SOURCE_PATH}/cmake/FindSDL2_image.cmake + ${SOURCE_PATH}/cmake/FindSDL2_mixer.cmake + ${SOURCE_PATH}/cmake/FindSDL2_ttf.cmake ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL2PP_STATIC) @@ -21,8 +26,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2pp RENAME copyright) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/sdl2pp/usage b/ports/sdl2pp/usage new file mode 100644 index 00000000000000..e19381a32ff5d6 --- /dev/null +++ b/ports/sdl2pp/usage @@ -0,0 +1,4 @@ +The package sdl2pp provides CMake targets: + + find_package(SDL2PP REQUIRED) + target_include_directories(main PRIVATE ${SDL2PP_INCLUDE_DIRS}) diff --git a/ports/sdl2pp/vcpkg-cmake-wrapper.cmake b/ports/sdl2pp/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..5141fdd39d295f --- /dev/null +++ b/ports/sdl2pp/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(SDL2PP_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../cmake/Modules) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${SDL2PP_PREV_MODULE_PATH}) diff --git a/ports/sdl2pp/vcpkg.json b/ports/sdl2pp/vcpkg.json new file mode 100644 index 00000000000000..814f0d3cf27642 --- /dev/null +++ b/ports/sdl2pp/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "sdl2pp", + "version-string": "0.16.1", + "port-version": 1, + "description": "C++11 bindings/wrapper for SDL2", + "homepage": "https://sdl2pp.amdmi3.ru", + "dependencies": [ + "sdl2", + "sdl2-image", + "sdl2-mixer", + "sdl2-ttf" + ] +} diff --git a/ports/seal/portfile.cmake b/ports/seal/portfile.cmake new file mode 100644 index 00000000000000..bea3e7af227084 --- /dev/null +++ b/ports/seal/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/SEAL + REF 2d2a25c916047d2f356d45ad50c98f0a9695905a + SHA512 81b2be39fca39dbd3a1246d0a1b8474d27eb6b1f3205f2107243bcd883b95814d2b642fa6807ed1f272d321233c2ec7992a256866ae1700c1203575594b42559 + HEAD_REF main +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + ms-gsl SEAL_USE_MSGSL + zlib SEAL_USE_ZLIB + zstd SEAL_USE_ZSTD + hexl SEAL_USE_INTEL_HEXL + INVERTED_FEATURES + no-throw-tran SEAL_THROW_ON_TRANSPARENT_CIPHERTEXT +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + OPTIONS + "-DSEAL_BUILD_DEPS=OFF" + "-DSEAL_BUILD_EXAMPLES=OFF" + "-DSEAL_BUILD_TESTS=OFF" + "-DSEAL_BUILD_SEAL_C=OFF" + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME "SEAL" CONFIG_PATH "lib/cmake/SEAL-3.7") + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") + +vcpkg_copy_pdbs() diff --git a/ports/seal/vcpkg.json b/ports/seal/vcpkg.json new file mode 100644 index 00000000000000..daafafc275e6d2 --- /dev/null +++ b/ports/seal/vcpkg.json @@ -0,0 +1,51 @@ +{ + "name": "seal", + "version-semver": "3.7.0", + "description": "Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library.", + "homepage": "https://github.com/microsoft/SEAL", + "supports": "!windows | (windows & static)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "ms-gsl", + "zlib", + "zstd" + ], + "features": { + "hexl": { + "description": "Use Intel® HEXL for acceleration of low-level kernels.", + "dependencies": [ + "hexl" + ] + }, + "ms-gsl": { + "description": "Use ms-gsl for span view", + "dependencies": [ + "ms-gsl" + ] + }, + "no-throw-tran": { + "description": "Do not throw when operating on transparent ciphertexts" + }, + "zlib": { + "description": "Use zlib for compressed serialization", + "dependencies": [ + "zlib" + ] + }, + "zstd": { + "description": "Use zstd for compressed serialization", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/ports/secp256k1/CMakeLists.txt b/ports/secp256k1/CMakeLists.txt index 2e6b46198aabd8..a3af313b6e7109 100644 --- a/ports/secp256k1/CMakeLists.txt +++ b/ports/secp256k1/CMakeLists.txt @@ -12,15 +12,24 @@ add_definitions( file(GLOB SOURCES src/secp256k1.c) add_library(secp256k1 ${SOURCES}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) -install(TARGETS secp256k1 +target_include_directories(secp256k1 PUBLIC $ $) + +if(INSTALL_HEADERS) + file(GLOB HEADERS include/*.h) + install(FILES ${HEADERS} DESTINATION include) +endif() + +install(TARGETS secp256k1 EXPORT unofficial-secp256k1-targets RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) -if(INSTALL_HEADERS) - file(GLOB HEADERS include/*.h) - install(FILES ${HEADERS} DESTINATION include) -endif() \ No newline at end of file +install( + EXPORT unofficial-secp256k1-targets + FILE unofficial-secp256k1-targets.cmake + NAMESPACE unofficial:: + DESTINATION share/unofficial-secp256k1 +) \ No newline at end of file diff --git a/ports/secp256k1/CONTROL b/ports/secp256k1/CONTROL deleted file mode 100644 index a0414b60c0af59..00000000000000 --- a/ports/secp256k1/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: secp256k1 -Version: 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4-2 -Homepage: https://github.com/bitcoin-core/secp256k1 -Description: Optimized C library for EC operations on curve diff --git a/ports/secp256k1/portfile.cmake b/ports/secp256k1/portfile.cmake index 28291c7eca389f..3bf158816ae426 100644 --- a/ports/secp256k1/portfile.cmake +++ b/ports/secp256k1/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -20,6 +18,8 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/secp256k1 RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +configure_file(${CMAKE_CURRENT_LIST_DIR}/secp256k1-config.cmake ${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-secp256k1-config.cmake @ONLY) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/secp256k1/secp256k1-config.cmake b/ports/secp256k1/secp256k1-config.cmake new file mode 100644 index 00000000000000..5cc40fe829a9ae --- /dev/null +++ b/ports/secp256k1/secp256k1-config.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-secp256k1-targets.cmake") diff --git a/ports/secp256k1/vcpkg.json b/ports/secp256k1/vcpkg.json new file mode 100644 index 00000000000000..43a10ad02447bc --- /dev/null +++ b/ports/secp256k1/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "secp256k1", + "version-string": "2017-19-10", + "port-version": 4, + "description": "Optimized C library for EC operations on curve", + "homepage": "https://github.com/bitcoin-core/secp256k1" +} diff --git a/ports/selene/CONTROL b/ports/selene/CONTROL deleted file mode 100644 index b3bbed2b6b8099..00000000000000 --- a/ports/selene/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: selene -Version: 0.3.1-1 -Description: A C++17 image representation, processing and I/O library. -Build-Depends: zlib, libpng, libjpeg-turbo, tiff diff --git a/ports/selene/portfile.cmake b/ports/selene/portfile.cmake index 11a2e89eb7cb7b..d300f5f839cb26 100644 --- a/ports/selene/portfile.cmake +++ b/ports/selene/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -10,19 +8,26 @@ vcpkg_from_github( HEAD_REF master PATCHES disable_x86_intrinsics_on_arm.patch + tiff-deprecated-typedefs.patch + trivial-pixel.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "opencv" SELENE_USE_OPENCV ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/selene) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/selene) vcpkg_copy_pdbs() -# Include files should not be duplicated into the /debug/include directory. -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/selene RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/selene/tiff-deprecated-typedefs.patch b/ports/selene/tiff-deprecated-typedefs.patch new file mode 100644 index 00000000000000..e2429138dc1471 --- /dev/null +++ b/ports/selene/tiff-deprecated-typedefs.patch @@ -0,0 +1,14 @@ +diff --git a/selene/CMakeLists.txt b/selene/CMakeLists.txt +index ab2760c..d1e1e6c 100644 +--- a/selene/CMakeLists.txt ++++ b/selene/CMakeLists.txt +@@ -229,6 +229,9 @@ if(TIFF_FOUND) + ) + + target_compile_options(selene_img_io_tiff PRIVATE ${SELENE_COMPILER_OPTIONS} ${SELENE_IMG_COMPILER_OPTIONS}) ++ if(MSVC) ++ target_compile_options(selene_img_io_tiff PRIVATE /wd4996) ++ endif() + + target_compile_definitions(selene_img_io_tiff PRIVATE ${SELENE_COMPILER_DEFINITIONS}) + diff --git a/ports/selene/trivial-pixel.patch b/ports/selene/trivial-pixel.patch new file mode 100644 index 00000000000000..9aeb7e44e17eae --- /dev/null +++ b/ports/selene/trivial-pixel.patch @@ -0,0 +1,23 @@ +--- a/selene/img/pixel/Pixel.hpp ++++ b/selene/img/pixel/Pixel.hpp +@@ -45,6 +45,6 @@ + constexpr Pixel() noexcept = default; ///< Default constructor. Pixel values are uninitialized. + +- template > +- constexpr Pixel(Args... args) noexcept; ++ template > ++ constexpr Pixel(Arg1 arg1, Args... args) noexcept; + + constexpr explicit Pixel(const std::array& arr) noexcept; +@@ -216,8 +216,8 @@ + template +-template +-constexpr Pixel::Pixel(Args... args) noexcept +- : data_{{static_cast(args)...}} ++template ++constexpr Pixel::Pixel(Arg1 arg1, Args... args) noexcept ++ : data_{{static_cast(arg1), static_cast(args)...}} + { + static_assert(std::is_trivial>::value, "Pixel type is not trivial"); + static_assert(std::is_standard_layout>::value, + "Pixel type is not standard layout"); diff --git a/ports/selene/vcpkg.json b/ports/selene/vcpkg.json new file mode 100644 index 00000000000000..71bcb2514063d6 --- /dev/null +++ b/ports/selene/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "selene", + "version": "0.3.1", + "port-version": 5, + "description": "A C++17 image representation, processing and I/O library.", + "homepage": "https://github.com/kmhofmann/selene", + "dependencies": [ + "libjpeg-turbo", + "libpng", + "tiff", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "opencv": { + "description": "Enable using OpenCV", + "dependencies": [ + { + "name": "opencv", + "default-features": false + } + ] + } + } +} diff --git a/ports/sentencepiece/CONTROL b/ports/sentencepiece/CONTROL deleted file mode 100644 index 41db3d5ff384dc..00000000000000 --- a/ports/sentencepiece/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: sentencepiece -Version: v0.1.82 -Description: SentencePiece is an unsupervised text tokenizer and detokenizer mainly for Neural Network-based text generation systems where the vocabulary size is predetermined prior to the neural model training \ No newline at end of file diff --git a/ports/sentencepiece/portfile.cmake b/ports/sentencepiece/portfile.cmake index 2623acac19d304..38c551cee6ce11 100644 --- a/ports/sentencepiece/portfile.cmake +++ b/ports/sentencepiece/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(NOT VCPKG_CMAKE_SYSTEM_NAME) vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT) endif() @@ -7,8 +5,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/sentencepiece - REF v0.1.82 - SHA512 669d6a1e86c44587d725b1e93f11b707e510a180dec08afb79268158f5de009cb20ffccc72c501c84f032360e52e53ae227504f3538f59978629433e0d6fcf65 + REF v0.1.95 + SHA512 22484cf0311315e25a3184561f4e18b45286ad068bfb722c860e1b44fb16913c96d34723b486fab5e4e1e69f4b620a0e3cff410f56cb6561a67193ebaf565a31 HEAD_REF master ) @@ -31,4 +29,4 @@ endif() configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/sentencepiece/vcpkg.json b/ports/sentencepiece/vcpkg.json new file mode 100644 index 00000000000000..0a621c341b9bac --- /dev/null +++ b/ports/sentencepiece/vcpkg.json @@ -0,0 +1,5 @@ +{ + "name": "sentencepiece", + "version": "0.1.95", + "description": "SentencePiece is an unsupervised text tokenizer and detokenizer mainly for Neural Network-based text generation systems where the vocabulary size is predetermined prior to the neural model training" +} diff --git a/ports/sentry-native/fix-config-cmake.patch b/ports/sentry-native/fix-config-cmake.patch new file mode 100644 index 00000000000000..3e7a33120bdd87 --- /dev/null +++ b/ports/sentry-native/fix-config-cmake.patch @@ -0,0 +1,23 @@ +diff --git a/sentry-config.cmake.in b/sentry-config.cmake.in +index 89ea345..21d8732 100644 +--- a/sentry-config.cmake.in ++++ b/sentry-config.cmake.in +@@ -5,7 +5,7 @@ set(SENTRY_TRANSPORT @SENTRY_TRANSPORT@) + + if(SENTRY_BACKEND STREQUAL "crashpad") + if(@SENTRY_CRASHPAD_SYSTEM@) +- find_package(crashpad REQUIRED) ++ find_dependency(crashpad) + else() + include("${CMAKE_CURRENT_LIST_DIR}/sentry_crashpad-targets.cmake") + endif() +@@ -14,7 +14,7 @@ endif() + include("${CMAKE_CURRENT_LIST_DIR}/sentry-targets.cmake") + + if(SENTRY_TRANSPORT STREQUAL "curl" AND NOT @BUILD_SHARED_LIBS@) +- find_package(CURL REQUIRED) ++ find_dependency(CURL) + set_property(TARGET sentry::sentry APPEND +- PROPERTY INTERFACE_LINK_LIBRARIES ${CURL_LIBRARIES}) ++ PROPERTY INTERFACE_LINK_LIBRARIES CURL::libcurl) + endif() diff --git a/ports/sentry-native/fix-warningC5105.patch b/ports/sentry-native/fix-warningC5105.patch new file mode 100644 index 00000000000000..52f0dc705bef6e --- /dev/null +++ b/ports/sentry-native/fix-warningC5105.patch @@ -0,0 +1,12 @@ +diff --git a/external/crashpad/third_party/zlib/zlib/x86.c b/external/crashpad/third_party/zlib/zlib/x86.c +index e56fe8b..902e373 100644 +--- a/external/crashpad/third_party/zlib/zlib/x86.c ++++ b/external/crashpad/third_party/zlib/zlib/x86.c +@@ -8,6 +8,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + ++#pragma warning(disable : 5105) + #include "x86.h" + #include "zutil.h" + diff --git a/ports/sentry-native/portfile.cmake b/ports/sentry-native/portfile.cmake new file mode 100644 index 00000000000000..64165b1c5eac50 --- /dev/null +++ b/ports/sentry-native/portfile.cmake @@ -0,0 +1,65 @@ +if(NOT VCPKG_TARGET_IS_OSX) + vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") +endif() + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/getsentry/sentry-native/releases/download/0.4.12/sentry-native.zip" + FILENAME "sentry-native-0.4.12.zip" + SHA512 15da4407ed5e2c8d5e56e497ccc6006b29235aef6b3a81e034c93443e20a7cfdf95d55e31b88e552c55e824eb15d6f7fafe988c453a5a6f36fe45136d7268b19 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + PATCHES + fix-warningC5105.patch + fix-config-cmake.patch + use-zlib-target.patch +) + +if (NOT DEFINED SENTRY_BACKEND) + if(MSVC AND CMAKE_GENERATOR_TOOLSET MATCHES "_xp$") + set(SENTRY_BACKEND "breakpad") + elseif(APPLE OR WIN32) + set(SENTRY_BACKEND "crashpad") + elseif(LINUX) + set(SENTRY_BACKEND "breakpad") + else() + set(SENTRY_BACKEND "inproc") + endif() +endif() + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DSENTRY_BUILD_TESTS=OFF + -DSENTRY_BUILD_EXAMPLES=OFF + -DSENTRY_BACKEND=${SENTRY_BACKEND} + -DCRASHPAD_ZLIB_SYSTEM=ON +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/sentry) + +if (SENTRY_BACKEND STREQUAL "crashpad") + vcpkg_copy_tools( + TOOL_NAMES crashpad_handler + AUTO_CLEAN + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/ports/sentry-native/use-zlib-target.patch b/ports/sentry-native/use-zlib-target.patch new file mode 100644 index 00000000000000..d4b3dfca33359b --- /dev/null +++ b/ports/sentry-native/use-zlib-target.patch @@ -0,0 +1,12 @@ +diff --git a/external/crashpad/CMakeLists.txt b/external/crashpad/CMakeLists.txt +index abb0697..a57ff04 100644 +--- a/external/crashpad/CMakeLists.txt ++++ b/external/crashpad/CMakeLists.txt +@@ -22,6 +22,7 @@ option(CRASHPAD_ZLIB_SYSTEM "Use system zlib library" "${CRASHPAD_ZLIB_SYSTEM_DE + + if(CRASHPAD_ZLIB_SYSTEM) + find_package(ZLIB REQUIRED) ++ set(ZLIB_LIBRARIES ZLIB::ZLIB) + endif() + + if(LINUX OR ANDROID) diff --git a/ports/sentry-native/vcpkg.json b/ports/sentry-native/vcpkg.json new file mode 100644 index 00000000000000..012a0d2e6321f1 --- /dev/null +++ b/ports/sentry-native/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "sentry-native", + "version-semver": "0.4.12", + "port-version": 1, + "description": "Sentry SDK for C, C++ and native applications.", + "homepage": "https://sentry.io/", + "supports": "!(arm | (arm64 & !osx) | uwp)", + "dependencies": [ + { + "name": "curl", + "platform": "!windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/septag-sx/CONTROL b/ports/septag-sx/CONTROL deleted file mode 100644 index ee9917e667d0f3..00000000000000 --- a/ports/septag-sx/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: septag-sx -Version: 2019-05-07-2 -Description: Portable base library for C programmers, designed for performance and simplicity. diff --git a/ports/septag-sx/portfile.cmake b/ports/septag-sx/portfile.cmake index 4fb87a250e5e84..0d7686bcf248f5 100644 --- a/ports/septag-sx/portfile.cmake +++ b/ports/septag-sx/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(TARGET_TRIPLET MATCHES "(uwp|arm)") message(FATAL_ERROR "septag-sx doesn't support ${TARGET_TRIPLET} currently.") endif() @@ -39,6 +37,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME sx) diff --git a/ports/septag-sx/vcpkg.json b/ports/septag-sx/vcpkg.json new file mode 100644 index 00000000000000..7348da8272fd48 --- /dev/null +++ b/ports/septag-sx/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "septag-sx", + "version-string": "2019-05-07", + "port-version": 3, + "description": "Portable base library for C programmers, designed for performance and simplicity.", + "supports": "!(uwp | arm)" +} diff --git a/ports/seqan/CONTROL b/ports/seqan/CONTROL deleted file mode 100644 index 09185ccf4c6f11..00000000000000 --- a/ports/seqan/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: seqan -Version: 2.4.0 -Description: SeqAn is an open source C++ library of efficient algorithms and data structures for the analysis of sequences with the focus on biological data. diff --git a/ports/seqan/portfile.cmake b/ports/seqan/portfile.cmake index 8741a709083e7b..b343b82c43b3e1 100644 --- a/ports/seqan/portfile.cmake +++ b/ports/seqan/portfile.cmake @@ -1,14 +1,14 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/seqan-library-2.4.0) vcpkg_download_distfile(ARCHIVE URLS "http://packages.seqan.de/seqan-library/seqan-library-2.4.0.zip" FILENAME "seqan-library-2.4.0.zip" SHA512 9a1b4fe9dff9ad49a8761798a6a6eaeebce683ccb5e2dd78ea4b8829093918606830a16ea458d67bf3f652531ddc55b550c12cb257be913bb187c8940d96a575 ) -vcpkg_extract_source_archive(${ARCHIVE}) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/share/doc/seqan/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/seqan RENAME copyright) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) -# Copy the seqan header files file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") + +file(INSTALL ${SOURCE_PATH}/share/doc/seqan/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/seqan RENAME copyright) diff --git a/ports/seqan/vcpkg.json b/ports/seqan/vcpkg.json new file mode 100644 index 00000000000000..e49b11d09f34b1 --- /dev/null +++ b/ports/seqan/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "seqan", + "version-string": "2.4.0", + "port-version": 2, + "description": "SeqAn is an open source C++ library of efficient algorithms and data structures for the analysis of sequences with the focus on biological data." +} diff --git a/ports/serd/CMakeLists.txt b/ports/serd/CMakeLists.txt new file mode 100644 index 00000000000000..2f07119871083d --- /dev/null +++ b/ports/serd/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 3.17) +project(serd C) + +add_library(serd + src/byte_source.c + src/env.c + src/n3.c + src/node.c + src/reader.c + src/string.c + src/uri.c + src/writer.c +) + +file(WRITE "${CMAKE_BINARY_DIR}/serd_config.h" "") + +target_include_directories(serd + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" +) + +set_target_properties(serd PROPERTIES + C_STANDARD 99 + C_STANDARD_REQUIRED ON +) + +target_compile_definitions(serd PRIVATE SERD_INTERNAL _CRT_SECURE_NO_WARNINGS) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(serd PUBLIC SERD_SHARED) +endif() + +install( + TARGETS serd + EXPORT serd-config + INCLUDES DESTINATION include +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY serd DESTINATION include) +endif() + +install( + EXPORT serd-config + NAMESPACE serd:: + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/serd" +) diff --git a/ports/serd/portfile.cmake b/ports/serd/portfile.cmake new file mode 100644 index 00000000000000..6e6173cc0bb103 --- /dev/null +++ b/ports/serd/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO drobilla/serd + REF v0.30.4 + SHA512 59b4f67dfa8a2c01119b1c69609030d851339ba6d85c5c559b7c2454492ef40498ce710e5cf5f7a698a292db81e6bffacb86f9dafa5d7f3fe0c60d53d6e2281f + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/serd/vcpkg.json b/ports/serd/vcpkg.json new file mode 100644 index 00000000000000..db40b57c24df3c --- /dev/null +++ b/ports/serd/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "serd", + "version-string": "0.30.4", + "description": "Serd is a lightweight C library for RDF syntax which supports reading and writing Turtle, TRiG, NTriples, and NQuads.", + "homepage": "https://drobilla.net/software/serd", + "license": "ISC" +} diff --git a/ports/sf2cute/CONTROL b/ports/sf2cute/CONTROL deleted file mode 100644 index bdba56cc709ed6..00000000000000 --- a/ports/sf2cute/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: sf2cute -Version: 0.2.0-1 -Description: C++14 Library for SoundFont 2 - -Feature: example -Description: Installs an example application diff --git a/ports/sf2cute/portfile.cmake b/ports/sf2cute/portfile.cmake index e4622239644523..d82c0f94f9a527 100644 --- a/ports/sf2cute/portfile.cmake +++ b/ports/sf2cute/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gocha/sf2cute @@ -36,6 +34,3 @@ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sf if(BUILD_EXAMPLE) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/sf2cute) endif() - -# Post-build test for cmake libraries -vcpkg_test_cmake(PACKAGE_NAME sf2cute) diff --git a/ports/sf2cute/vcpkg.json b/ports/sf2cute/vcpkg.json new file mode 100644 index 00000000000000..9db53abbc65b00 --- /dev/null +++ b/ports/sf2cute/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "sf2cute", + "version-string": "0.2.0", + "port-version": 2, + "description": "C++14 Library for SoundFont 2", + "features": { + "example": { + "description": "Installs an example application" + } + } +} diff --git a/ports/sfgui/001-fix-corefoundation-link.patch b/ports/sfgui/001-fix-corefoundation-link.patch new file mode 100644 index 00000000000000..e3c80bcf3a1f9b --- /dev/null +++ b/ports/sfgui/001-fix-corefoundation-link.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c0af720..774e2d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,16 +107,8 @@ if( WIN32 ) + set( LIB_PATH "lib" ) + elseif( APPLE ) + find_library( COREFOUNDATION_LIBRARY CoreFoundation ) +- mark_as_advanced( COREFOUNDATION_LIBRARY ) +- +- add_library( CoreFoundation SHARED IMPORTED ) +- set_target_properties( +- CoreFoundation PROPERTIES +- IMPORTED_LOCATION "${COREFOUNDATION_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "/System/Library/Frameworks/CoreFoundation.framework/Headers" +- ) +- +- target_link_libraries( ${TARGET} PUBLIC CoreFoundation ) ++ ++ target_link_libraries( ${TARGET} PUBLIC ${COREFOUNDATION_LIBRARY} ) + set( SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/SFGUI" ) + set( LIB_PATH "lib" ) + elseif( "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" ) diff --git a/ports/sfgui/CONTROL b/ports/sfgui/CONTROL deleted file mode 100644 index cd9f17ab9d5aa3..00000000000000 --- a/ports/sfgui/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sfgui -Version: 0.4.0 -Homepage: https://github.com/TankOs/SFGUI -Description: simple and fast graphical user interface library -Build-Depends: sfml diff --git a/ports/sfgui/portfile.cmake b/ports/sfgui/portfile.cmake index 16eeb561827ac7..b2c6787651e548 100644 --- a/ports/sfgui/portfile.cmake +++ b/ports/sfgui/portfile.cmake @@ -1,12 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO TankOs/SFGUI REF 0.4.0 SHA512 15456c6080b7095bcdcec08489b2b91b5cfc36cdf3c0b645b305072e7e835837eb4f95b59371ff176630b2b7ae51da475d8ea0bde5ff7fc0ba74c463bf5f54cf HEAD_REF master - PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-sfml-targets.patch" + PATCHES + "001-fix-corefoundation-link.patch" ) file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindSFML.cmake) @@ -16,7 +15,7 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SFGUI_BUILD_SHARED_LIB vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS -DSFGUI_BUILD_DOC=OFF -DSFGUI_BUILD_EXAMPLES=OFF -DSFGUI_BUILD_SHARED_LIBS=${SFGUI_BUILD_SHARED_LIBS} @@ -24,13 +23,16 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() - -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfgui RENAME copyright) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + file(GLOB_RECURSE SFGUI_DOC_RELEASE ${CURRENT_PACKAGES_DIR}/*.md) + file(GLOB_RECURSE SFGUI_DOC_DEBUG ${CURRENT_PACKAGES_DIR}/debug/*.md) + file(REMOVE ${SFGUI_DOC_RELEASE} ${SFGUI_DOC_DEBUG}) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH share/SFGUI/cmake) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(GLOB_RECURSE SFGUI_DOC_RELEASE ${CURRENT_PACKAGES_DIR}/*.md) -file(GLOB_RECURSE SFGUI_DOC_DEBUG ${CURRENT_PACKAGES_DIR}/debug/*.md) -file(REMOVE ${SFGUI_DOC_RELEASE} ${SFGUI_DOC_DEBUG}) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfgui RENAME copyright) diff --git a/ports/sfgui/use-sfml-targets.patch b/ports/sfgui/use-sfml-targets.patch deleted file mode 100644 index 337949f5ad8c0a..00000000000000 --- a/ports/sfgui/use-sfml-targets.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index abc9be0..eb999f5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -190,7 +190,6 @@ endif() - - include_directories( "${INCLUDE_PATH}" ) - include_directories( "${SOURCE_PATH}" ) --include_directories( SYSTEM "${SFML_INCLUDE_DIR}" ) - include_directories( SYSTEM "${PROJECT_SOURCE_DIR}/extlibs/libELL/include" ) - - # Set the library output directory -@@ -244,7 +243,7 @@ if( WIN32 ) - endif() - - add_definitions( -DWIN32 ) -- target_link_libraries( sfgui ${SFML_LIBRARIES} ${SFML_DEPENDENCIES} ${OPENGL_gl_LIBRARY} ) -+ target_link_libraries( sfgui sfml-graphics sfml-window sfml-system ${OPENGL_gl_LIBRARY} ) - - if( CMAKE_COMPILER_IS_GNUCXX ) - if( SFGUI_BUILD_SHARED_LIBS ) -@@ -261,11 +260,11 @@ elseif( APPLE ) - mark_as_advanced( COREFOUNDATION_LIBRARY ) - - include_directories( SYSTEM /System/Library/Frameworks/CoreFoundation.framework/Headers ) -- target_link_libraries( sfgui ${SFML_LIBRARIES} ${SFML_DEPENDENCIES} ${OPENGL_gl_LIBRARY} ${COREFOUNDATION_LIBRARY} ) -+ target_link_libraries( sfgui sfml-graphics sfml-window sfml-system ${OPENGL_gl_LIBRARY} ${COREFOUNDATION_LIBRARY} ) - set( SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/SFGUI" ) - set( LIB_PATH "lib" ) - elseif( "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" ) -- target_link_libraries( sfgui ${SFML_LIBRARIES} ${SFML_DEPENDENCIES} ${OPENGL_gl_LIBRARY} ${X11_LIBRARIES} ) -+ target_link_libraries( sfgui sfml-graphics sfml-window sfml-system ${OPENGL_gl_LIBRARY} ${X11_LIBRARIES} ) - set( SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/SFGUI" ) - - if( LIB_SUFFIX ) -@@ -274,7 +273,7 @@ elseif( "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" ) - set( LIB_PATH "lib" ) - endif() - else() -- target_link_libraries( sfgui ${SFML_LIBRARIES} ${SFML_DEPENDENCIES} ${OPENGL_gl_LIBRARY} ) -+ target_link_libraries( sfgui sfml-graphics sfml-window sfml-system ${OPENGL_gl_LIBRARY} ) - set( SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/SFGUI" ) - set( LIB_PATH "lib" ) - endif() diff --git a/ports/sfgui/vcpkg.json b/ports/sfgui/vcpkg.json new file mode 100644 index 00000000000000..aa4ea2c85d27bc --- /dev/null +++ b/ports/sfgui/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "sfgui", + "version-string": "0.4.0", + "port-version": 4, + "description": "simple and fast graphical user interface library", + "homepage": "https://github.com/TankOs/SFGUI", + "dependencies": [ + "sfml" + ] +} diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL deleted file mode 100644 index 606095d8823859..00000000000000 --- a/ports/sfml/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sfml -Version: 2.5.1-2 -Homepage: https://github.com/sfml/sfml -Description: Simple and fast multimedia library -Build-Depends: freetype, libflac, libogg, libvorbis, openal-soft, stb diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index a4c0d89c4264a6..f832303a78f684 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -1,57 +1,60 @@ - -include(vcpkg_common_functions) -vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH - REPO SFML/SFML - REF 2.5.1 - HEAD_REF master - SHA512 7aed2fc29d1da98e6c4d598d5c86cf536cb4eb5c2079cdc23bb8e502288833c052579dadbe0ce13ad6461792d959bf6d9660229f54c54cf90a541c88c6b03d59 - PATCHES use-system-freetype.patch -) - -file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) -# Without this, we get error: list sub-command REMOVE_DUPLICATES requires list to be present. -file(MAKE_DIRECTORY ${SOURCE_PATH}/extlibs/libs) -file(WRITE ${SOURCE_PATH}/extlibs/libs/x "") -# The embedded FindFreetype doesn't properly handle debug libraries -file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/Modules/FindFreetype.cmake) - -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message("SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev mesa-common-dev") -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DSFML_BUILD_FRAMEWORKS=OFF - -DSFML_USE_SYSTEM_DEPS=ON - -DSFML_MISC_INSTALL_PREFIX=share/sfml - -DSFML_GENERATE_PDB=OFF -) - -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SFML) -vcpkg_copy_pdbs() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - FILE(READ ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake SFML_CONFIG) - FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES true)\ninclude(CMakeFindDependencyMacro)\nfind_dependency(Freetype)\n${SFML_CONFIG}") -endif() - -# move sfml-main to manual link dir -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) - file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) - file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) - file(GLOB FILES "${CURRENT_PACKAGES_DIR}/share/sfml/SFML*Targets-*.cmake") - foreach(FILE ${FILES}) - file(READ "${FILE}" _contents) - string(REPLACE "/lib/sfml-main" "/lib/manual-link/sfml-main" _contents "${_contents}") - file(WRITE "${FILE}" "${_contents}") - endforeach() -endif() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) - -file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) +vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH + REPO SFML/SFML + REF 2.5.1 + HEAD_REF master + SHA512 7aed2fc29d1da98e6c4d598d5c86cf536cb4eb5c2079cdc23bb8e502288833c052579dadbe0ce13ad6461792d959bf6d9660229f54c54cf90a541c88c6b03d59 + PATCHES + use-system-freetype.patch + stb_include.patch +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) +# Without this, we get error: list sub-command REMOVE_DUPLICATES requires list to be present. +file(MAKE_DIRECTORY ${SOURCE_PATH}/extlibs/libs) +file(WRITE ${SOURCE_PATH}/extlibs/libs/x "") +# The embedded FindFreetype doesn't properly handle debug libraries +file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/Modules/FindFreetype.cmake) + +if(VCPKG_TARGET_IS_LINUX) + message(STATUS "SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev libgl1-mesa-dev") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSFML_BUILD_FRAMEWORKS=OFF + -DSFML_USE_SYSTEM_DEPS=ON + -DSFML_MISC_INSTALL_PREFIX=share/sfml + -DSFML_GENERATE_PDB=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SFML) +vcpkg_copy_pdbs() + +FILE(READ ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake SFML_CONFIG) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES true)\ninclude(CMakeFindDependencyMacro)\nfind_dependency(Freetype)\n${SFML_CONFIG}") +else() + FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES false)\n${SFML_CONFIG}") +endif() + +# move sfml-main to manual link dir +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) + file(GLOB FILES "${CURRENT_PACKAGES_DIR}/share/sfml/SFML*Targets-*.cmake") + foreach(FILE ${FILES}) + file(READ "${FILE}" _contents) + string(REPLACE "/lib/sfml-main" "/lib/manual-link/sfml-main" _contents "${_contents}") + file(WRITE "${FILE}" "${_contents}") + endforeach() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage COPYONLY) +configure_file(${SOURCE_PATH}/license.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/sfml/stb_include.patch b/ports/sfml/stb_include.patch new file mode 100644 index 00000000000000..3519b1c1e61233 --- /dev/null +++ b/ports/sfml/stb_include.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e821a49bc..c68264ef2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -188,6 +188,9 @@ if(SFML_USE_SYSTEM_DEPS) + endforeach() + + list(REMOVE_DUPLICATES CMAKE_IGNORE_PATH) ++ ++ find_path(STB_INCLUDE_DIR stb.h) ++ include_directories(${STB_INCLUDE_DIR}) + endif() + + # Visual C++: remove warnings regarding SL security and algorithms on pointers diff --git a/ports/sfml/usage b/ports/sfml/usage new file mode 100644 index 00000000000000..784d1173a47f97 --- /dev/null +++ b/ports/sfml/usage @@ -0,0 +1,7 @@ +The package sfml provides CMake targets: + + find_package(SFML COMPONENTS system window graphics CONFIG REQUIRED) + target_link_libraries(main PRIVATE sfml-system sfml-network sfml-graphics sfml-window) + + # If you want SFML to provide an implementation of main(): + target_link_libraries(main PRIVATE sfml-main) diff --git a/ports/sfml/use-system-freetype.patch b/ports/sfml/use-system-freetype.patch index c58fc1b9577afe..4d895b741e1949 100644 --- a/ports/sfml/use-system-freetype.patch +++ b/ports/sfml/use-system-freetype.patch @@ -1,13 +1,11 @@ -diff --git a/src/sfml/Graphics/CMakeLists.txt b/src/sfml/Graphics/CMakeLists.txt -index 883c758..76f3b6f 100644 ---- a/src/sfml/Graphics/CMakeLists.txt -+++ b/src/sfml/Graphics/CMakeLists.txt -@@ -135,7 +135,7 @@ if(SFML_OS_ANDROID) - endif() - - sfml_find_package(Freetype INCLUDE "FREETYPE_INCLUDE_DIRS" LINK "FREETYPE_LIBRARY") --target_link_libraries(sfml-graphics PRIVATE Freetype) -+target_link_libraries(sfml-graphics PRIVATE Freetype::Freetype) - - # add preprocessor symbols - target_compile_definitions(sfml-graphics PRIVATE "STBI_FAILURE_USERMSG") +--- a/src/SFML/Graphics/CMakeLists.txt ++++ b/src/SFML/Graphics/CMakeLists.txt +@@ -135,7 +135,7 @@ if(SFML_OS_ANDROID) + endif() + + sfml_find_package(Freetype INCLUDE "FREETYPE_INCLUDE_DIRS" LINK "FREETYPE_LIBRARY") +-target_link_libraries(sfml-graphics PRIVATE Freetype) ++target_link_libraries(sfml-graphics PRIVATE Freetype::Freetype) + + # add preprocessor symbols + target_compile_definitions(sfml-graphics PRIVATE "STBI_FAILURE_USERMSG") diff --git a/ports/sfml/vcpkg.json b/ports/sfml/vcpkg.json new file mode 100644 index 00000000000000..64c7f53581cd54 --- /dev/null +++ b/ports/sfml/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "sfml", + "version": "2.5.1", + "port-version": 10, + "description": "Simple and fast multimedia library", + "homepage": "https://github.com/sfml/sfml", + "dependencies": [ + "freetype", + "libflac", + "libogg", + "libvorbis", + "openal-soft", + "stb" + ] +} diff --git a/ports/sfsexp/CMakeLists.txt b/ports/sfsexp/CMakeLists.txt new file mode 100644 index 00000000000000..e770b9d6d7f3fc --- /dev/null +++ b/ports/sfsexp/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.13) +project(sexp) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) +endif() + +file(GLOB sources src/*.c src/*.h) +include_directories(src/) + +add_library(sexp ${sources}) + +set_target_properties(sexp PROPERTIES PUBLIC_HEADER "src/cstring.h;src/faststack.h;src/sexp.h;src/sexp_errors.h;src/sexp_memory.h;src/sexp_ops.h;src/sexp_vis.h") + +install(TARGETS sexp + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + PUBLIC_HEADER DESTINATION include +) \ No newline at end of file diff --git a/ports/sfsexp/portfile.cmake b/ports/sfsexp/portfile.cmake new file mode 100644 index 00000000000000..6bc6f2c9dc28f3 --- /dev/null +++ b/ports/sfsexp/portfile.cmake @@ -0,0 +1,23 @@ +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mjsottile/sfsexp + REF ad589f9e6e0eca20345320e9c82a3aecc0a5c8aa #v1.3 + SHA512 cdd469e23de48a5d6cd633b7b97b394cbfcba330ac2c3ae549811d856f2eec0c8558f99313e56a9f1cc9d72d4f17077584b6cf15c87814b91fe44ddd76895a8c + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file diff --git a/ports/sfsexp/vcpkg.json b/ports/sfsexp/vcpkg.json new file mode 100644 index 00000000000000..d47366b4fd5cca --- /dev/null +++ b/ports/sfsexp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "sfsexp", + "version-string": "1.3", + "port-version": 1, + "description": "Small Fast S-Expression Library", + "homepage": "https://github.com/mjsottile/sfsexp" +} diff --git a/ports/shaderc/CMakeLists.txt b/ports/shaderc/CMakeLists.txt deleted file mode 100644 index 7ecdd03f91e267..00000000000000 --- a/ports/shaderc/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D}) -if(NOT SUFFIX_D) - find_library(GLSLANG glslang) - find_library(OSDEPENDENT OSDependent) - find_library(OGLCOMPILER OGLCompiler) - find_library(HLSLLIB HLSL) - find_library(SPIRVLIB SPIRV) -ELSE() - find_library(GLSLANG glslangd) - find_library(OSDEPENDENT OSDependentd) - find_library(OGLCOMPILER OGLCompilerd) - find_library(HLSLLIB HLSLd) - find_library(SPIRVLIB SPIRVd) -ENDIF() - -add_library(glslang STATIC IMPORTED GLOBAL) -set_property(TARGET glslang PROPERTY IMPORTED_LOCATION "${GLSLANG}") -find_path(glslang_SOURCE_DIR glslang/Include/Common) -set_property(TARGET glslang APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${glslang_SOURCE_DIR}") - -add_library(OSDependent STATIC IMPORTED GLOBAL) -set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}") - -add_library(OGLCompiler STATIC IMPORTED GLOBAL) -set_property(TARGET OGLCompiler PROPERTY IMPORTED_LOCATION "${OGLCOMPILER}") - -add_library(HLSL STATIC IMPORTED GLOBAL) -set_property(TARGET HLSL PROPERTY IMPORTED_LOCATION "${HLSLLIB}") - -add_library(SPIRV STATIC IMPORTED GLOBAL) -set_property(TARGET SPIRV PROPERTY IMPORTED_LOCATION "${SPIRVLIB}") diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL deleted file mode 100644 index 0878b17bec4a2f..00000000000000 --- a/ports/shaderc/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: shaderc -Version: 2019-06-26-1 -Homepage: https://github.com/google/shaderc -Description: A collection of tools, libraries and tests for shader compilation. -Build-Depends: glslang, spirv-tools \ No newline at end of file diff --git a/ports/shaderc/build-version.inc b/ports/shaderc/build-version.inc index 00c140577a64f2..d5b1449e2bbda4 100644 --- a/ports/shaderc/build-version.inc +++ b/ports/shaderc/build-version.inc @@ -1,5 +1 @@ -"shaderc v2019.0-dev unknown hash, 2019-05-08\n" -"spirv-tools v2019.3-dev unknown hash, 2019-04-03\n" -"glslang unknown hash, 2019-03-05\n" - - +"shaderc v2021.1-dev unknown hash, 2021-06-21\n" diff --git a/ports/shaderc/disable-update-version.patch b/ports/shaderc/disable-update-version.patch index 5ee016bcb13c34..7bf47bd508d5f6 100644 --- a/ports/shaderc/disable-update-version.patch +++ b/ports/shaderc/disable-update-version.patch @@ -2,19 +2,18 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index a4e779b..dc5f1a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -81,12 +81,6 @@ add_subdirectory(libshaderc) - add_subdirectory(glslc) - add_subdirectory(examples) +@@ -121,11 +121,6 @@ if(${SHADERC_ENABLE_EXAMPLES}) + add_subdirectory(examples) + endif() -add_custom_target(build-version - ${PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py -- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} +- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc - COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") -- + function(define_pkg_config_file NAME LIBS) add_custom_target(${NAME}-pkg-config ALL - COMMAND ${CMAKE_COMMAND} diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt index acf6fb0..d0df7db 100644 --- a/glslc/CMakeLists.txt @@ -27,15 +26,3 @@ index acf6fb0..d0df7db 100644 shaderc_add_tests( TEST_PREFIX glslc -diff --git a/spvc/CMakeLists.txt b/spvc/CMakeLists.txt -index f465972..76f8c2e 100644 ---- a/spvc/CMakeLists.txt -+++ b/spvc/CMakeLists.txt -@@ -3,7 +3,6 @@ shaderc_default_compile_options(spvc_exe) - target_include_directories(spvc_exe PRIVATE ${shaderc_SOURCE_DIR}/libshaderc/include ${spirv-tools_SOURCE_DIR}/include) - set_target_properties(spvc_exe PROPERTIES OUTPUT_NAME spvc) - target_link_libraries(spvc_exe PRIVATE shaderc_spvc shaderc_util) --add_dependencies(spvc_exe build-version) - - shaderc_add_asciidoc(spvc_doc_README README) - diff --git a/ports/shaderc/fix-build-type.patch b/ports/shaderc/fix-build-type.patch new file mode 100644 index 00000000000000..8e5cd22db15ee2 --- /dev/null +++ b/ports/shaderc/fix-build-type.patch @@ -0,0 +1,67 @@ +diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt +index 3ada419..f3277f0 100644 +--- a/libshaderc/CMakeLists.txt ++++ b/libshaderc/CMakeLists.txt +@@ -24,13 +24,16 @@ set(SHADERC_SOURCES + src/shaderc_private.h + ) + ++if (NOT BUILD_SHARED_LIBS) + add_library(shaderc STATIC ${SHADERC_SOURCES}) + shaderc_default_compile_options(shaderc) + target_include_directories(shaderc + PUBLIC include + PRIVATE ${glslang_SOURCE_DIR} + ${SPIRV-Headers_SOURCE_DIR}/include) ++set(shaderc_install_target shaderc) + ++else() + add_library(shaderc_shared SHARED ${SHADERC_SOURCES}) + shaderc_default_compile_options(shaderc_shared) + target_include_directories(shaderc_shared +@@ -42,6 +45,8 @@ target_compile_definitions(shaderc_shared + PUBLIC SHADERC_SHAREDLIB + ) + set_target_properties(shaderc_shared PROPERTIES SOVERSION 1) ++set(shaderc_install_target shaderc_shared) ++endif() + + if(SHADERC_ENABLE_INSTALL) + install( +@@ -54,7 +59,7 @@ if(SHADERC_ENABLE_INSTALL) + DESTINATION + ${CMAKE_INSTALL_INCLUDEDIR}/shaderc) + +- install(TARGETS shaderc shaderc_shared ++ install(TARGETS ${shaderc_install_target} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@ -68,8 +73,11 @@ set(SHADERC_LIBS + SPIRV-Tools + ) + ++if(NOT BUILD_SHARED_LIBS) + target_link_libraries(shaderc PRIVATE ${SHADERC_LIBS}) ++else() + target_link_libraries(shaderc_shared PRIVATE ${SHADERC_LIBS}) ++endif() + + shaderc_add_tests( + TEST_PREFIX shaderc +@@ -93,6 +101,7 @@ shaderc_add_tests( + shaderc_cpp + shaderc_private) + ++if(0) + shaderc_combine_static_lib(shaderc_combined shaderc) + + if(SHADERC_ENABLE_INSTALL) +@@ -121,6 +130,7 @@ shaderc_add_tests( + TEST_NAMES + shaderc + shaderc_cpp) ++endif() + + if(${SHADERC_ENABLE_TESTS}) + add_executable(shaderc_c_smoke_test ./src/shaderc_c_smoke_test.c) diff --git a/ports/shaderc/fix-install-shaderc_util.patch b/ports/shaderc/fix-install-shaderc_util.patch new file mode 100644 index 00000000000000..7601f3020d3a57 --- /dev/null +++ b/ports/shaderc/fix-install-shaderc_util.patch @@ -0,0 +1,18 @@ +diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt +index 99ce3c4..4926203 100644 +--- a/libshaderc_util/CMakeLists.txt ++++ b/libshaderc_util/CMakeLists.txt +@@ -49,6 +49,13 @@ target_link_libraries(shaderc_util PRIVATE + glslang OSDependent OGLCompiler HLSL glslang SPIRV + SPIRV-Tools-opt ${CMAKE_THREAD_LIBS_INIT}) + ++if(SHADERC_ENABLE_INSTALL AND NOT BUILD_SHARED_LIBS) ++ install(TARGETS shaderc_util ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++endif(SHADERC_ENABLE_INSTALL) ++ + shaderc_add_tests( + TEST_PREFIX shaderc_util + LINK_LIBS shaderc_util diff --git a/ports/shaderc/fix-install.patch b/ports/shaderc/fix-install.patch deleted file mode 100644 index 1857ed8fed5d70..00000000000000 --- a/ports/shaderc/fix-install.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt -index 9d07136..0ffa06f 100644 ---- a/libshaderc/CMakeLists.txt -+++ b/libshaderc/CMakeLists.txt -@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL) - # around this problem by manually substitution. - string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" - install_location "${generated_location}") -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - else() - install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() -diff --git a/libshaderc_spvc/CMakeLists.txt b/libshaderc_spvc/CMakeLists.txt -index fae235e..b503e70 100644 ---- a/libshaderc_spvc/CMakeLists.txt -+++ b/libshaderc_spvc/CMakeLists.txt -@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL) - # around this problem by manually substitution. - string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" - install_location "${generated_location}") -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - else() - install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() diff --git a/ports/shaderc/glslang/CMakeLists.txt b/ports/shaderc/glslang/CMakeLists.txt new file mode 100644 index 00000000000000..0e745779dbd5d1 --- /dev/null +++ b/ports/shaderc/glslang/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.11) + +find_package(glslang CONFIG REQUIRED) + +set_property(TARGET glslang PROPERTY IMPORTED_GLOBAL TRUE) +set_property(TARGET OSDependent PROPERTY IMPORTED_GLOBAL TRUE) +set_property(TARGET OGLCompiler PROPERTY IMPORTED_GLOBAL TRUE) +set_property(TARGET HLSL PROPERTY IMPORTED_GLOBAL TRUE) +set_property(TARGET SPIRV PROPERTY IMPORTED_GLOBAL TRUE) +set_property(TARGET MachineIndependent PROPERTY IMPORTED_GLOBAL TRUE) + +find_path(glslang_SOURCE_DIR glslang/Public/ShaderLang.h) +set(glslang_SOURCE_DIR "${glslang_SOURCE_DIR}/glslang" "${glslang_SOURCE_DIR}" CACHE STRING "" FORCE) diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index 2978422965cc31..be59aa5ba2a8c9 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -1,25 +1,20 @@ -include(vcpkg_common_functions) +#Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/shaderc - REF 05c766a1f4615ee37d37d09271aaabca30ffd293 - SHA512 329697e8e23d619313440d57ef740a94c49d13533e1b8734fc8ff72fd5092c2addabb306f64cb69160fa5fee373a05ba39a5ee6d92d95e5e2e9c7ec96a51aadc + REF adca18dcadd460eb517fe44f6cd2460fa0650ebe + SHA512 3a27d4c51be9e9396b9a854cb96d88e78ff2ca6dcb8400bd3288f6984d25876af0eae649aa1c72ad613edbbcfa4324a12809f13ceb7a0134eef41cb1a698dfdf HEAD_REF master PATCHES - "disable-update-version.patch" - "fix-install.patch" + disable-update-version.patch + fix-build-type.patch + fix-install-shaderc_util.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_spirv.txt DESTINATION ${SOURCE_PATH}/third_party/spirv-tools) -file(RENAME ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists_spirv.txt ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists.txt) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src) -#Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work -set(VCPKG_LIBRARY_LINKAGE "static") set(OPTIONS) if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") list(APPEND OPTIONS -DSHADERC_ENABLE_SHARED_CRT=ON) @@ -33,21 +28,20 @@ vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} -Dglslang_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include -Dspirv-tools_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include - OPTIONS_DEBUG -DSUFFIX_D=true - OPTIONS_RELEASE -DSUFFIX_D=false + OPTIONS + ${OPTIONS} + -DSHADERC_SKIP_TESTS=true + -DSHADERC_GLSLANG_DIR=${CMAKE_CURRENT_LIST_DIR}/glslang + -DSHADERC_SPIRV_TOOLS_DIR=${CMAKE_CURRENT_LIST_DIR}/spirv-tools + -DSHADERC_ENABLE_EXAMPLES=OFF ) vcpkg_install_cmake() -file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*${CMAKE_EXECUTABLE_SUFFIX}") -file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +vcpkg_fixup_pkgconfig() + +vcpkg_copy_tools(TOOL_NAMES glslc AUTO_CLEAN) -#Safe to remove as libs are static -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shaderc) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/shaderc/LICENSE ${CURRENT_PACKAGES_DIR}/share/shaderc/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/shaderc/CMakeLists_spirv.txt b/ports/shaderc/spirv-tools/CMakeLists.txt similarity index 100% rename from ports/shaderc/CMakeLists_spirv.txt rename to ports/shaderc/spirv-tools/CMakeLists.txt diff --git a/ports/shaderc/vcpkg.json b/ports/shaderc/vcpkg.json new file mode 100644 index 00000000000000..e7e490c008bfd3 --- /dev/null +++ b/ports/shaderc/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "shaderc", + "version": "2021.1", + "port-version": 1, + "description": "A collection of tools, libraries and tests for shader compilation.", + "homepage": "https://github.com/google/shaderc", + "dependencies": [ + "glslang", + "spirv-tools" + ] +} diff --git a/ports/shaderwriter/portfile.cmake b/ports/shaderwriter/portfile.cmake new file mode 100644 index 00000000000000..c53367fe8882a0 --- /dev/null +++ b/ports/shaderwriter/portfile.cmake @@ -0,0 +1,43 @@ + +vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH + REPO DragonJoker/ShaderWriter + REF v1.1.0 + SHA512 7c2a311f332342a2fc7d37e646314fe79f28a00292ff082903b3fc30f3ff86f222936fd2bc9d85d79a66caf854b05bfa5546f9d299c0764d695c027c5101bc74 +) + +vcpkg_from_github(OUT_SOURCE_PATH CMAKE_SOURCE_PATH + REPO DragonJoker/CMakeUtils + REF 0d750fb17099157f0e15e09cdf834453f3e8557a + HEAD_REF master + SHA512 579ad01149180b2295a0441b3c4b575448d2f4335d013948b15c7b70c0232d3488ac296d4864a7808773fa3e3c1a8fc4de0c7b42a6595cc9b9d27f154321984a +) + +get_filename_component(SRC_PATH ${CMAKE_SOURCE_PATH} DIRECTORY) +if (EXISTS ${SRC_PATH}/CMake) + file(REMOVE_RECURSE ${SRC_PATH}/CMake) +endif() +file(RENAME ${CMAKE_SOURCE_PATH} ${SRC_PATH}/CMake) +set(CMAKE_SOURCE_PATH ${SRC_PATH}/CMake) +file(COPY ${CMAKE_SOURCE_PATH} DESTINATION ${SOURCE_PATH}) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPROJECTS_USE_PRECOMPILED_HEADERS=OFF + -DSDW_GENERATE_SOURCE=OFF + -DSDW_BUILD_VULKAN_LAYER=OFF + -DSDW_BUILD_TESTS=OFF + -DSDW_BUILD_STATIC_SDW=${BUILD_STATIC} + -DSDW_BUILD_STATIC_SDAST=${BUILD_STATIC} + -DSDW_BUILD_EXPORTER_GLSL_STATIC=${BUILD_STATIC} + -DSDW_BUILD_EXPORTER_HLSL_STATIC=${BUILD_STATIC} + -DSDW_BUILD_EXPORTER_SPIRV_STATIC=${BUILD_STATIC} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shaderwriter) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/shaderwriter/vcpkg.json b/ports/shaderwriter/vcpkg.json new file mode 100644 index 00000000000000..15f2a0bfd407f8 --- /dev/null +++ b/ports/shaderwriter/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "shaderwriter", + "version": "1.1.0", + "description": "Library to write shaders directly from C++ code, supports GLSL, HLSL and SPIRV outputs.", + "homepage": "https://github.com/DragonJoker/ShaderWriter" +} diff --git a/ports/shapelib/CONTROL b/ports/shapelib/CONTROL deleted file mode 100644 index 338be3ebe7bbaa..00000000000000 --- a/ports/shapelib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: shapelib -Version: 1.4.1-1 -Homepage: https://download.osgeo.org/shapelib -Description: Shapefile C Library is simple C API for reading and writing ESRI Shapefiles diff --git a/ports/shapelib/portfile.cmake b/ports/shapelib/portfile.cmake index eed76736f0dd3e..3aceff84d7a016 100644 --- a/ports/shapelib/portfile.cmake +++ b/ports/shapelib/portfile.cmake @@ -1,19 +1,17 @@ -include(vcpkg_common_functions) - -set(SHAPELIB_VERSION 1.4.1) -set(SHAPELIB_HASH e3e02dde8006773fed25d630896e79fd79d2008a029cc86b157fe0d92c143a9fab930fdb93d9700d4e1397c3b23ae4b86e91db1dbaca1c5388d4e3aea0309341) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/shapelib-${SHAPELIB_VERSION}) +set(SHAPELIB_VERSION 1.5.0) +set(SHAPELIB_HASH 230939afb33aee042808a32b38ee9dfc7ec1f39432e5a4ebe3fda99c2f87bfbebc91830d4e21691c51aae3f4bb65d7e71e7061472bb08124dcd3402c46800d6c) vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/shapelib/shapelib-${SHAPELIB_VERSION}.zip" FILENAME "shapelib-${SHAPELIB_VERSION}.zip" SHA512 ${SHAPELIB_HASH} ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/option-build-test.patch +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + option-build-test.patch ) vcpkg_configure_cmake( @@ -44,8 +42,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/shapelib) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/shapelib/COPYING ${CURRENT_PACKAGES_DIR}/share/shapelib/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/shapelib) diff --git a/ports/shapelib/vcpkg.json b/ports/shapelib/vcpkg.json new file mode 100644 index 00000000000000..1480abd4f745b5 --- /dev/null +++ b/ports/shapelib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "shapelib", + "version-string": "1.5.0", + "port-version": 1, + "description": "Shapefile C Library is simple C API for reading and writing ESRI Shapefiles", + "homepage": "https://download.osgeo.org/shapelib" +} diff --git a/ports/shiva-sfml/CONTROL b/ports/shiva-sfml/CONTROL deleted file mode 100644 index 0bd2f08c2f224c..00000000000000 --- a/ports/shiva-sfml/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: shiva-sfml -Version: 1.0 -Description: shiva-sfml plugins of shiva C++ engine -Build-Depends: sfml (windows), shiva diff --git a/ports/shiva-sfml/portfile.cmake b/ports/shiva-sfml/portfile.cmake index d3b8d7d718c201..0e603e8de47371 100644 --- a/ports/shiva-sfml/portfile.cmake +++ b/ports/shiva-sfml/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Milerius/shiva @@ -12,7 +10,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSHIVA_BUILD_TESTS=OFF -DSHIVA_USE_SFML_AS_RENDERER=ON -DSHIVA_INSTALL_PLUGINS=ON -DSHIVA_BUILD_EXAMPLES=OFF + -DSHIVA_BUILD_TESTS=OFF -DSHIVA_USE_SFML_AS_RENDERER=ON -DSHIVA_INSTALL_PLUGINS=ON -DSHIVA_BUILD_EXAMPLES=OFF ) vcpkg_install_cmake() @@ -67,22 +65,22 @@ file(COPY ${PLUGINS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY file(COPY ${PLUGINS_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Debug) if (NOT VCPKG_CMAKE_SYSTEM_NAME) - find_file(LUADLL lua.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(FMTDLL fmt.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(FLACDLL FLAC.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(FREETYPEDLL freetype.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(LIBBZ2DLL libbz2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(LIBPNG16DLL libpng16.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(OGGDLL ogg.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(OPENAL32DLL OpenAL32.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(SFMLAUDIO2DLL sfml-audio-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(SFMLGRAPHICS2DLL sfml-graphics-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(SFMLSYSTEM2DLL sfml-system-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(SFMLWINDOW2DLL sfml-window-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(VORBISDLL vorbis.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(VORBISENCDLL vorbisenc.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(VORBISFILEDLL vorbisfile.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) - find_file(ZLIB1DLL zlib1.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(LUADLL lua.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(FMTDLL fmt.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(FLACDLL FLAC.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(FREETYPEDLL freetype.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(LIBBZ2DLL libbz2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(LIBPNG16DLL libpng16.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(OGGDLL ogg.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(OPENAL32DLL OpenAL32.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(SFMLAUDIO2DLL sfml-audio-2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(SFMLGRAPHICS2DLL sfml-graphics-2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(SFMLSYSTEM2DLL sfml-system-2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(SFMLWINDOW2DLL sfml-window-2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(VORBISDLL vorbis.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(VORBISENCDLL vorbisenc.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(VORBISFILEDLL vorbisfile.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(ZLIB1DLL zlib1.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) set(DEPENDANCIES_RELEASE_DLL ${LUADLL} ${FMTDLL} @@ -100,23 +98,23 @@ if (NOT VCPKG_CMAKE_SYSTEM_NAME) ${VORBISENCDLL} ${VORBISFILEDLL} ${ZLIB1DLL}) - - find_file(LUADLL_D lua.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(FMTDLL_D fmtd.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(FLACDLL_D FLAC.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(FREETYPEDLL_D freetyped.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(LIBBZ2DLL_D libbz2d.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(LIBPNG16DLL_D libpng16d.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(OGGDLL_D ogg.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(OPENAL32DLL_D OpenAL32.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(SFMLAUDIO2DLL_D sfml-audio-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(SFMLGRAPHICS2DLL_D sfml-graphics-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(SFMLSYSTEM2DLL_D sfml-system-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(SFMLWINDOW2DLL_D sfml-window-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(VORBISDLL_D vorbis.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(VORBISENCDLL_D vorbisenc.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(VORBISFILEDLL_D vorbisfile.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) - find_file(ZLIB1DLL_D zlibd1.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + + find_file(LUADLL_D lua.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(FMTDLL_D fmtd.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(FLACDLL_D FLAC.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(FREETYPEDLL_D freetyped.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(LIBBZ2DLL_D libbz2d.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(LIBPNG16DLL_D libpng16d.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(OGGDLL_D ogg.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(OPENAL32DLL_D OpenAL32.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(SFMLAUDIO2DLL_D sfml-audio-d-2.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(SFMLGRAPHICS2DLL_D sfml-graphics-d-2.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(SFMLSYSTEM2DLL_D sfml-system-d-2.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(SFMLWINDOW2DLL_D sfml-window-d-2.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(VORBISDLL_D vorbis.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(VORBISENCDLL_D vorbisenc.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(VORBISFILEDLL_D vorbisfile.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(ZLIB1DLL_D zlibd1.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) set(DEPENDANCIES_DEBUG_DLL ${LUADLL_D} ${FMTDLL_D} @@ -135,7 +133,7 @@ if (NOT VCPKG_CMAKE_SYSTEM_NAME) ${VORBISFILEDLL_D} ${ZLIB1DLL_D} ) - + file(COPY ${DEPENDANCIES_RELEASE_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Release) file(COPY ${DEPENDANCIES_DEBUG_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Debug) endif() diff --git a/ports/shiva-sfml/vcpkg.json b/ports/shiva-sfml/vcpkg.json new file mode 100644 index 00000000000000..7fce5e80903ff8 --- /dev/null +++ b/ports/shiva-sfml/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "shiva-sfml", + "version-string": "1.0", + "port-version": 2, + "description": "shiva-sfml plugins of shiva C++ engine", + "dependencies": [ + { + "name": "sfml", + "platform": "windows" + }, + "shiva" + ] +} diff --git a/ports/shiva/CONTROL b/ports/shiva/CONTROL deleted file mode 100644 index 0ce81203de8494..00000000000000 --- a/ports/shiva/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: shiva -Version: 1.0-2 -Description: Modern C++ Game Engine -Build-Depends: boost-stacktrace, boost-filesystem, boost-dll, entt, lua, luafilesystem (windows), sol2, pybind11, spdlog, nlohmann-json diff --git a/ports/shiva/portfile.cmake b/ports/shiva/portfile.cmake index 372c318e00d3cc..72beec0e05fd03 100644 --- a/ports/shiva/portfile.cmake +++ b/ports/shiva/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_find_acquire_program(PYTHON2) vcpkg_from_github( diff --git a/ports/shiva/vcpkg.json b/ports/shiva/vcpkg.json new file mode 100644 index 00000000000000..d080dd5a026c84 --- /dev/null +++ b/ports/shiva/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "shiva", + "version-string": "1.0", + "port-version": 4, + "description": "Modern C++ Game Engine", + "homepage": "https://github.com/Milerius/shiva", + "dependencies": [ + "boost-dll", + "boost-filesystem", + "boost-stacktrace", + "entt", + "lua", + { + "name": "luafilesystem", + "platform": "windows" + }, + "nlohmann-json", + "pybind11", + "sol2", + "spdlog" + ] +} diff --git a/ports/shogun/CONTROL b/ports/shogun/CONTROL deleted file mode 100644 index e57f129febb458..00000000000000 --- a/ports/shogun/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: shogun -Version: 6.1.3-3 -Build-Depends: bzip2, eigen3, liblzma, libxml2, openblas (x64&!osx), nlopt, rxcpp, snappy, zlib, protobuf, curl, lzo, dirent -Description: Unified and efficient Machine Learning diff --git a/ports/shogun/MSDirent.cmake b/ports/shogun/MSDirent.cmake deleted file mode 100644 index dd895f9704e4a5..00000000000000 --- a/ports/shogun/MSDirent.cmake +++ /dev/null @@ -1 +0,0 @@ -find_path(MSDIRENT_INCLUDE_DIR NAMES dirent.h) diff --git a/ports/shogun/cmake-config.in.patch b/ports/shogun/cmake-config.in.patch new file mode 100644 index 00000000000000..8ee2a13430e73e --- /dev/null +++ b/ports/shogun/cmake-config.in.patch @@ -0,0 +1,11 @@ +diff --git a/cmake/ShogunConfig.cmake.in b/cmake/ShogunConfig.cmake.in +index e8e8035..a5097cb 100644 +--- a/cmake/ShogunConfig.cmake.in ++++ b/cmake/ShogunConfig.cmake.in +@@ -2,5 +2,5 @@ + + set_and_check(shogun_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") + +-include("@PACKAGE_CONFIG_PACKAGE_DIR@/ShogunTargets.cmake") ++include("@PACKAGE_CONFIG_PACKAGE_DIR@/../../../share/shogun/ShogunTargets.cmake") + check_required_components(shogun) diff --git a/ports/shogun/fix-ASSERT-not-found.patch b/ports/shogun/fix-ASSERT-not-found.patch new file mode 100644 index 00000000000000..ae8889caaae4a7 --- /dev/null +++ b/ports/shogun/fix-ASSERT-not-found.patch @@ -0,0 +1,12 @@ +diff --git a/src/shogun/base/Parallel.cpp b/src/shogun/base/Parallel.cpp +index 78ba319..53ac6c0 100644 +--- a/src/shogun/base/Parallel.cpp ++++ b/src/shogun/base/Parallel.cpp +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_CXX11 + #include diff --git a/ports/shogun/fix-dirent.patch b/ports/shogun/fix-dirent.patch new file mode 100644 index 00000000000000..f45102356d00c0 --- /dev/null +++ b/ports/shogun/fix-dirent.patch @@ -0,0 +1,17 @@ +diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt +index fd76961..396251c 100644 +--- a/src/shogun/CMakeLists.txt ++++ b/src/shogun/CMakeLists.txt +@@ -170,10 +170,10 @@ IF(MSVC) + ENDIF() + + # bundle dirent +- include(external/MSDirent) ++ find_path(MSDIRENT_INCLUDE_DIR NAMES dirent.h) + SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC + $ +- $ ++ $ + ) + + target_link_libraries(shogun PUBLIC winmm) diff --git a/ports/shogun/portfile.cmake b/ports/shogun/portfile.cmake index 37a75589408afb..05ca61af0811c7 100644 --- a/ports/shogun/portfile.cmake +++ b/ports/shogun/portfile.cmake @@ -1,27 +1,18 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(CMAKE_DISABLE_FIND_PACKAGE_BLAS 0) -else() - set(CMAKE_DISABLE_FIND_PACKAGE_BLAS 1) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO shogun-toolbox/shogun - REF shogun_6.1.3 - SHA512 11aeed456b13720099ca820ab9742c90ce4af2dc049602a425f8c44d2fa155327c7f1d3af2ec840666f600a91e75902d914ffe784d76ed35810da4f3a5815673 + REF ab274e7ab6bf24dd598c1daf1e626cb686d6e1cc + SHA512 fb90e5bf802c6fd59bf35ab7bbde5e8cfcdc5d46c69c52097140b30c6b29e28b8341dd1ece7f8a1f9d9123f4bc06d44d288584ce7dfddccf3d33fe05106884ae HEAD_REF master PATCHES cmake.patch + cmake-config.in.patch + fix-dirent.patch + fix-ASSERT-not-found.patch ) -file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/external) -file(MAKE_DIRECTORY ${SOURCE_PATH}/cmake/external) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/MSDirent.cmake DESTINATION ${SOURCE_PATH}/cmake/external) - vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) vcpkg_add_to_path(${PYTHON3_DIR}) @@ -48,11 +39,9 @@ vcpkg_configure_cmake( -DCMAKE_DISABLE_FIND_PACKAGE_ARPREC=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_Ctags=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_CCache=TRUE - -DCMAKE_DISABLE_FIND_PACKAGE_LAPACK=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_CURL=TRUE - -DCMAKE_DISABLE_FIND_PACKAGE_BLAS=${CMAKE_DISABLE_FIND_PACKAGE_BLAS} - + -DCMAKE_DISABLE_FIND_PACKAGE_OpenMP=TRUE -DINSTALL_TARGETS=shogun-static ) @@ -67,5 +56,4 @@ file(REMOVE_RECURSE ) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/shogun) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/shogun/COPYING ${CURRENT_PACKAGES_DIR}/share/shogun/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/shogun/vcpkg.json b/ports/shogun/vcpkg.json new file mode 100644 index 00000000000000..6711f2bfbf11cd --- /dev/null +++ b/ports/shogun/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "shogun", + "version-string": "6.1.4", + "port-version": 5, + "description": "Unified and efficient Machine Learning", + "homepage": "https://github.com/shogun-toolbox/shogun", + "dependencies": [ + "blas", + "bzip2", + "curl", + "dirent", + "eigen3", + "liblzma", + "libxml2", + "lzo", + "nlopt", + "protobuf", + "rxcpp", + "snappy", + "zlib" + ] +} diff --git a/ports/signalrclient/CONTROL b/ports/signalrclient/CONTROL deleted file mode 100644 index 85e4427d5bab14..00000000000000 --- a/ports/signalrclient/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: signalrclient -Version: 1.0.0-beta1-7 -Build-Depends: cpprestsdk, openssl -Homepage: https://github.com/aspnet/SignalR-Client-Cpp -Description: C++ client for SignalR. diff --git a/ports/signalrclient/portfile.cmake b/ports/signalrclient/portfile.cmake index 39f1992b86d8ce..f66b3a2fca8995 100644 --- a/ports/signalrclient/portfile.cmake +++ b/ports/signalrclient/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SignalR/SignalR-Client-Cpp diff --git a/ports/signalrclient/vcpkg.json b/ports/signalrclient/vcpkg.json new file mode 100644 index 00000000000000..e2faf07bc3d67e --- /dev/null +++ b/ports/signalrclient/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "signalrclient", + "version-string": "1.0.0-beta1-9", + "port-version": 2, + "description": "C++ client for SignalR.", + "homepage": "https://github.com/SignalR/SignalR-Client-Cpp", + "dependencies": [ + { + "name": "cpprestsdk", + "features": [ + "default-features", + "websockets" + ] + }, + "openssl" + ] +} diff --git a/ports/sigslot/LICENSE b/ports/sigslot/LICENSE new file mode 100644 index 00000000000000..d706712aa6c511 --- /dev/null +++ b/ports/sigslot/LICENSE @@ -0,0 +1,8 @@ +License +The sigslot library has been placed in the public domain. This means that you are free to use it however you like. + +The author takes no responsibility or liability of any kind for any use that you may make of this library. + +If you screw up, it's your fault. + +If the library screws up, you got it for free, so you should have tested it better - it's still your responsibility. \ No newline at end of file diff --git a/ports/sigslot/portfile.cmake b/ports/sigslot/portfile.cmake new file mode 100644 index 00000000000000..d841668bafd4d1 --- /dev/null +++ b/ports/sigslot/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO sigslot/sigslot + REF 1.0.0 + FILENAME "sigslot-1-0-0.tar.gz" + SHA512 3f16f94a653e49934ec1d695eac02234d15b203f42e9fa88723ee582a84670a645a89e5b87afe2378fa7a9eaef054049255bf3bd531ab1d6825a042641ba8906 +) + +file(INSTALL ${SOURCE_PATH}/sigslot.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${CURRENT_PORT_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sigslot/vcpkg.json b/ports/sigslot/vcpkg.json new file mode 100644 index 00000000000000..20bf9b068a55d1 --- /dev/null +++ b/ports/sigslot/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "sigslot", + "version-string": "1.0.0", + "port-version": 4, + "description": "Portable C++ type-safe, thread-safe signal/slot library for ISO C++, Unix/BSD/Linux and Win32. Sigslot allows C++ code to use the signal/slot paradigm made popular by, for example, Qt." +} diff --git a/ports/simage/portfile.cmake b/ports/simage/portfile.cmake new file mode 100644 index 00000000000000..6868fb16e13bc3 --- /dev/null +++ b/ports/simage/portfile.cmake @@ -0,0 +1,79 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(SIMAGE_VERSION 1.8.1) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Coin3D/simage + REF 72bdc2fddb171ab08325ced9c4e04b27bbd2da6c #v1.8.1 + SHA512 8e0d4b246318e9a08d9a17e0550fae4e3902e5d14ff9d7e43569624d1ceb9308c1cbc2401cedc4bff4da8b136fc57fc6b11c6800f1db15914b13186b0d5dc8f1 + HEAD_REF master + PATCHES requies-all-dependencies.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SIMAGE_BUILD_SHARED_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SIMAGE_USE_STATIC_LIBS) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" SIMAGE_USE_MSVC_STATIC_RUNTIME) + + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + oggvorbis SIMAGE_OGGVORBIS_SUPPORT + sndfile SIMAGE_LIBSNDFILE_SUPPORT +) + +# Depends on the platform +if(VCPKG_TARGET_IS_WINDOWS) + set(SIMAGE_ON_WIN ON) + set(SIMAGE_ON_NON_WIN OFF) +else() + set(SIMAGE_ON_WIN OFF) + set(SIMAGE_ON_NON_WIN ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DSIMAGE_BUILD_SHARED_LIBS:BOOL=${SIMAGE_BUILD_SHARED_LIBS} + -DSIMAGE_USE_STATIC_LIBS:BOOL=${SIMAGE_USE_STATIC_LIBS} + -DSIMAGE_USE_MSVC_STATIC_RUNTIME:BOOL=${SIMAGE_USE_MSVC_STATIC_RUNTIME} + -DSIMAGE_USE_AVIENC=${SIMAGE_ON_WIN} + -DSIMAGE_USE_GDIPLUS=${SIMAGE_ON_WIN} + # Available on Linux, OSX and Windows without gdiplus + -DSIMAGE_ZLIB_SUPPORT=${SIMAGE_ON_NON_WIN} + -DSIMAGE_GIF_SUPPORT=${SIMAGE_ON_NON_WIN} + -DSIMAGE_JPEG_SUPPORT=${SIMAGE_ON_NON_WIN} + -DSIMAGE_PNG_SUPPORT=${SIMAGE_ON_NON_WIN} + -DSIMAGE_TIFF_SUPPORT=${SIMAGE_ON_NON_WIN} + # + -DSIMAGE_USE_CGIMAGE=OFF + -DSIMAGE_USE_QIMAGE=OFF + -DSIMAGE_USE_QT6=OFF + -DSIMAGE_USE_QT5=OFF + -DSIMAGE_USE_CPACK=OFF + -DSIMAGE_LIBJASPER_SUPPORT=OFF + -DSIMAGE_EPS_SUPPORT=OFF + -DSIMAGE_MPEG2ENC_SUPPORT=OFF + -DSIMAGE_PIC_SUPPORT=OFF + -DSIMAGE_RGB_SUPPORT=OFF + -DSIMAGE_XWD_SUPPORT=OFF + -DSIMAGE_TGA_SUPPORT=OFF + -DSIMAGE_BUILD_MSVC_MP=OFF + -DSIMAGE_BUILD_EXAMPLES=OFF + -DSIMAGE_BUILD_TESTS=OFF + -DSIMAGE_BUILD_DOCUMENTATION=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/simage-${SIMAGE_VERSION}) + +if (NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW) + vcpkg_copy_tools(TOOL_NAMES simage-config AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/simage/requies-all-dependencies.patch b/ports/simage/requies-all-dependencies.patch new file mode 100644 index 00000000000000..ef0536a960c65e --- /dev/null +++ b/ports/simage/requies-all-dependencies.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d869715..073a73f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -117,10 +117,10 @@ endif() + # On Windows GDI+ supports GIF, JPEG, EXIF, PNG, and TIFF. + # see https://docs.microsoft.com/en-us/windows/desktop/gdiplus/-gdiplus-types-of-bitmaps-about + if(SIMAGE_USE_GDIPLUS) +- find_package(GdiPlus) ++ find_package(GdiPlus REQUIRED) + endif() + if(SIMAGE_USE_AVIENC) +- find_package(Vfw) ++ find_package(Vfw REQUIRED) + endif() + + # On macOS QuickTime supports BMP, GIF, JPEG, JPEG 2000, PNG, TIFF, and TGA. +@@ -267,7 +267,7 @@ if(SIMAGE_OGGVORBIS_SUPPORT) + find_package(Ogg REQUIRED) + find_package(Vorbis REQUIRED) + if(OGG_FOUND) +- find_package(Opus) ++ find_package(Opus REQUIRED) + endif() + endif() + +@@ -287,8 +287,8 @@ if(NOT SIMAGE_QUICKTIME_SUPPORT AND NOT SIMAGE_CGIMAGE_SUPPORT AND NOT SIMAGE_GD + if(SIMAGE_TIFF_SUPPORT) + find_package(TIFF REQUIRED) + if(TIFF_FOUND) +- find_package(LibLZMA) +- find_package(Zstd) ++ find_package(LibLZMA REQUIRED) ++ find_package(Zstd REQUIRED) + endif() + endif() + diff --git a/ports/simage/vcpkg.json b/ports/simage/vcpkg.json new file mode 100644 index 00000000000000..2b50a2c6dc19f6 --- /dev/null +++ b/ports/simage/vcpkg.json @@ -0,0 +1,118 @@ +{ + "name": "simage", + "version-semver": "1.8.1", + "description": "Image file format library abstraction layer", + "homepage": "https://github.com/coin3d/simage", + "supports": "!uwp", + "default-features": [ + "all" + ], + "features": { + "all": { + "description": "Enable all features", + "dependencies": [ + { + "name": "simage", + "default-features": false, + "features": [ + "oggvorbis" + ] + }, + { + "name": "simage", + "default-features": false, + "features": [ + "sndfile" + ] + }, + { + "name": "simage", + "default-features": false, + "features": [ + "giflib" + ], + "platform": "!windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "jpeg" + ], + "platform": "!windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "png" + ], + "platform": "!windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "tiff" + ], + "platform": "!windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "zlib" + ], + "platform": "!windows" + } + ] + }, + "giflib": { + "description": "Enable support for GIF images", + "dependencies": [ + "giflib" + ] + }, + "jpeg": { + "description": "Enable support for JPEG images", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "oggvorbis": { + "description": "Enable support for ogg/vorbis extensions", + "dependencies": [ + "libogg", + "libvorbis", + "opus" + ] + }, + "png": { + "description": "Enable support for PNG images", + "dependencies": [ + "libpng" + ] + }, + "sndfile": { + "description": "Use libsndfile to load/save sampled sound", + "dependencies": [ + "libflac", + "libsndfile" + ] + }, + "tiff": { + "description": "Enable support for TIFF images", + "dependencies": [ + "liblzma", + "tiff", + "zstd" + ] + }, + "zlib": { + "description": "Enable support for zlib library", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/simde/CONTROL b/ports/simde/CONTROL deleted file mode 100644 index 7f70f49113d272..00000000000000 --- a/ports/simde/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: simde -Version: 2019-06-05 -Description: Implementations of SIMD instruction sets for systems which don't natively support them diff --git a/ports/simde/portfile.cmake b/ports/simde/portfile.cmake index e79594acebb7ef..67c87d79faaea2 100644 --- a/ports/simde/portfile.cmake +++ b/ports/simde/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nemequ/simde - REF 6e3ba90605361069cf3422c44242c79171b87275 - SHA512 d62ff40882c2b3a17c900104b36ae77137cbb77917d409cba1c0693fdcf317a38ff3184deaaecca0ef31d88393bebf0102a8ab57a23ad5d0cee2d3e5fe799f6a + REF f68981de04072012dcc888716dedae2a345d0e45 #v0.7.0 + SHA512 63a00e8a3e0adbd3192f7416f4c163b8b671943042e4f64a91e6865d434a0d5949e97bca1e40d854b9868911ff8d93ac845ac25baa763554447d6be7cdfb084e HEAD_REF master ) diff --git a/ports/simde/vcpkg.json b/ports/simde/vcpkg.json new file mode 100644 index 00000000000000..159e857688c42d --- /dev/null +++ b/ports/simde/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "simde", + "version-string": "0.7.0", + "port-version": 1, + "description": "Implementations of SIMD instruction sets for systems which don't natively support them", + "homepage": "https://github.com/simd-everywhere/simde" +} diff --git a/ports/simdjson/CONTROL b/ports/simdjson/CONTROL deleted file mode 100644 index df8c5deba9257c..00000000000000 --- a/ports/simdjson/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: simdjson -Version: 2019-08-05 -Description: A extremely fast JSON library that can parse gigabytes of JSON per second -Homepage: https://github.com/lemire/simdjson diff --git a/ports/simdjson/portfile.cmake b/ports/simdjson/portfile.cmake index a5eea7b6829f35..1f14e309058e8e 100644 --- a/ports/simdjson/portfile.cmake +++ b/ports/simdjson/portfile.cmake @@ -1,43 +1,41 @@ -include(vcpkg_common_functions) - -# https://github.com/Microsoft/vcpkg/issues/5418#issuecomment-470519894 -if(TARGET_TRIPLET MATCHES "^(x86|arm-)") - message(FATAL_ERROR "simdjson doesn't support x86 or 32-bit ARM architecture.") -elseif(TARGET_TRIPLET MATCHES "^arm64") - message(FATAL_ERROR "simdjson doesn't support ARM64 architecture currently.") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO lemire/simdjson - REF d9a0e2b8f441c20ad46276fdb8ce24f2aebdc07b - SHA512 05523c59b95485b93646370ac1ef9f80a72351a5bfe76797c5bbbf249bedd81b962dad19040a7eaac80744aaec18be9bec1120da44a9a1e4328e68b3d671bdaf + REPO simdjson/simdjson + REF 3bd8b0b575f43403705dcce57d427944c11421f8 # v1.0.0 HEAD_REF master + SHA512 61c5db9bdf331cc692d85f135fda29ad5db7ee23d9518153adfd44cf26d76dae834a3071bd6c9e9b2a99a27a2881899162ac146750f444e9829a6dbbe986f769 +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + exceptions SIMDJSON_EXCEPTIONS + threads SIMDJSON_ENABLE_THREADS + INVERTED_FEATURES + deprecated SIMDJSON_DISABLE_DEPRECATED_API ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SIMDJSON_BUILD_STATIC) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS + -DSIMDJSON_JUST_LIBRARY=ON + -DSIMDJSON_SANITIZE_UNDEFINED=OFF + -DSIMDJSON_SANITIZE=OFF + -DSIMDJSON_SANITIZE_THREADS=OFF -DSIMDJSON_BUILD_STATIC=${SIMDJSON_BUILD_STATIC} - OPTIONS_DEBUG - -DSIMDJSON_SANITIZE=ON + -DSIMDJSON_DEVELOPMENT_CHECKS=OFF + -DSIMDJSON_VERBOSE_LOGGING=OFF + ${FEATURE_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include -) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/simdjson/vcpkg.json b/ports/simdjson/vcpkg.json new file mode 100644 index 00000000000000..010a5a73403d5a --- /dev/null +++ b/ports/simdjson/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "simdjson", + "version-semver": "1.0.0", + "description": "A extremely fast JSON library that can parse gigabytes of JSON per second", + "homepage": "https://simdjson.org/", + "license": "Apache-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "deprecated", + "exceptions", + "threads" + ], + "features": { + "deprecated": { + "description": "Enable deprecated APIs" + }, + "exceptions": { + "description": "Enable exception-throwing interface" + }, + "threads": { + "description": "Link with thread support" + } + } +} diff --git a/ports/simdutf/disable-tests-and-benchmarks.patch b/ports/simdutf/disable-tests-and-benchmarks.patch new file mode 100644 index 00000000000000..d621f6d7abff9c --- /dev/null +++ b/ports/simdutf/disable-tests-and-benchmarks.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5453644..d3f2869 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,17 +14,10 @@ include(cmake/simdutf-flags.cmake) + + set(SIMDUTF_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +-enable_testing() + add_subdirectory(src) +-add_subdirectory(tests) + + + +-if(CMAKE_CXX_COMPILER_ID MATCHES GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0) +- message(STATUS "The benchmark tool requires GCC 8.0 or better.") +-else() +- add_subdirectory(benchmarks) +-endif() + + + # ---- Install rules ---- diff --git a/ports/simdutf/portfile.cmake b/ports/simdutf/portfile.cmake new file mode 100644 index 00000000000000..809247a8c63c81 --- /dev/null +++ b/ports/simdutf/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO simdutf/simdutf + REF v1.0.0 + SHA512 3ab09aa61cb9765bf1a77de59c5b823ee58ae5e4badfd5dd70e511fd4f378f8d3917a5b577e7f275720b975740344968132ce0b3f628452bde67f2ab6cc82337 + HEAD_REF master + PATCHES + disable-tests-and-benchmarks.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/LICENSE-APACHE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/simdutf/vcpkg.json b/ports/simdutf/vcpkg.json new file mode 100644 index 00000000000000..68ddc24a221a04 --- /dev/null +++ b/ports/simdutf/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "simdutf", + "version-semver": "1.0.0", + "port-version": 1, + "description": "Unicode validation and transcoding at billions of characters per second", + "homepage": "https://github.com/simdutf/simdutf", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/simple-fft/portfile.cmake b/ports/simple-fft/portfile.cmake new file mode 100644 index 00000000000000..81f33e054c4b66 --- /dev/null +++ b/ports/simple-fft/portfile.cmake @@ -0,0 +1,20 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO d1vanov/Simple-FFT + REF a0cc843ff36d33ad09c08674b9503614742ad0b9 + SHA512 6fbbda1f172505f6627f97ae671d12ff282844ca50e6e6c8016f78ee333c32ce6d17763837c281e47f10cfc277cb1f67394169f6bbf137b09885c1a053d6d342 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/simple_fft/check_fft.hpp + ${SOURCE_PATH}/include/simple_fft/copy_array.hpp + ${SOURCE_PATH}/include/simple_fft/error_handling.hpp + ${SOURCE_PATH}/include/simple_fft/fft.h + ${SOURCE_PATH}/include/simple_fft/fft.hpp + ${SOURCE_PATH}/include/simple_fft/fft_impl.hpp + ${SOURCE_PATH}/include/simple_fft/fft_settings.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include/simple_fft +) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/simple-fft/vcpkg.json b/ports/simple-fft/vcpkg.json new file mode 100644 index 00000000000000..76b399066048cd --- /dev/null +++ b/ports/simple-fft/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "simple-fft", + "version-string": "2020-06-14", + "port-version": 1, + "description": "Header-only C++ library implementing fast Fourier transform of 1D, 2D and 3D data", + "homepage": "https://github.com/d1vanov/Simple-FFT" +} diff --git a/ports/simpleini/CONTROL b/ports/simpleini/CONTROL deleted file mode 100644 index b0c70335f5d539..00000000000000 --- a/ports/simpleini/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: simpleini -Version: 2018-08-31-1 -Description: Cross-platform C++ library providing a simple API to read and write INI-style configuration files diff --git a/ports/simpleini/portfile.cmake b/ports/simpleini/portfile.cmake index 508043cd17ae9e..46f1d25625659d 100644 --- a/ports/simpleini/portfile.cmake +++ b/ports/simpleini/portfile.cmake @@ -1,6 +1,4 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO brofield/simpleini @@ -9,6 +7,14 @@ vcpkg_from_github( HEAD_REF master ) -file(COPY ${SOURCE_PATH}/simpleini.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +# Install codes +set(SIMPLEINI_SOURCE ${SOURCE_PATH}/SimpleIni.h + ${SOURCE_PATH}/ConvertUTF.h + ${SOURCE_PATH}/ConvertUTF.c +) + +file(INSTALL ${SIMPLEINI_SOURCE} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +# Install sample +file(INSTALL ${SOURCE_PATH}/snippets.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/sample) -file(INSTALL ${SOURCE_PATH}/LICENCE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/simpleini RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENCE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/simpleini/vcpkg.json b/ports/simpleini/vcpkg.json new file mode 100644 index 00000000000000..020a8f5ddb14ab --- /dev/null +++ b/ports/simpleini/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "simpleini", + "version-string": "2018-08-31", + "port-version": 5, + "description": "Cross-platform C++ library providing a simple API to read and write INI-style configuration files", + "homepage": "https://github.com/brofield/simpleini" +} diff --git a/ports/skia/add-missing-tuple.patch b/ports/skia/add-missing-tuple.patch new file mode 100644 index 00000000000000..e33d44e3aefa0a --- /dev/null +++ b/ports/skia/add-missing-tuple.patch @@ -0,0 +1,12 @@ +diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h +index 7afe4f9..502f83e 100644 +--- a/include/private/SkPathRef.h ++++ b/include/private/SkPathRef.h +@@ -21,6 +21,7 @@ + + #include + #include ++#include + + class SkRBuffer; + class SkWBuffer; diff --git a/ports/skia/expat.gn b/ports/skia/expat.gn new file mode 100644 index 00000000000000..7e0e09b4cd9e4a --- /dev/null +++ b/ports/skia/expat.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("expat") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/ports/skia/freetype2.gn b/ports/skia/freetype2.gn new file mode 100644 index 00000000000000..5ea73b7a877a9a --- /dev/null +++ b/ports/skia/freetype2.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("freetype2") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/ports/skia/harfbuzz.gn b/ports/skia/harfbuzz.gn new file mode 100644 index 00000000000000..5095f6d8a13804 --- /dev/null +++ b/ports/skia/harfbuzz.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("harfbuzz") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/ports/skia/icu.gn b/ports/skia/icu.gn new file mode 100644 index 00000000000000..3da247995457a5 --- /dev/null +++ b/ports/skia/icu.gn @@ -0,0 +1,11 @@ +import("../third_party.gni") + +system("icu") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } + defines = @_DEFINITIONS@ +} diff --git a/ports/skia/libjpeg-turbo.gn b/ports/skia/libjpeg-turbo.gn new file mode 100644 index 00000000000000..92669bb92d515f --- /dev/null +++ b/ports/skia/libjpeg-turbo.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("libjpeg") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/ports/skia/libpng.gn b/ports/skia/libpng.gn new file mode 100644 index 00000000000000..0867ef8a9e04f0 --- /dev/null +++ b/ports/skia/libpng.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("libpng") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/ports/skia/libwebp.gn b/ports/skia/libwebp.gn new file mode 100644 index 00000000000000..bdcaffe2164b22 --- /dev/null +++ b/ports/skia/libwebp.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("libwebp") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/ports/skia/piex.gn b/ports/skia/piex.gn new file mode 100644 index 00000000000000..1d5a237b973ed3 --- /dev/null +++ b/ports/skia/piex.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("piex") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake new file mode 100644 index 00000000000000..30feaf013ddda6 --- /dev/null +++ b/ports/skia/portfile.cmake @@ -0,0 +1,216 @@ +vcpkg_fail_port_install( + ON_ARCH "x86" "arm" "arm64" + ON_TARGET "UWP" "LINUX" "ANDROID" "FREEBSD") + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://skia.googlesource.com/skia.git + REF fb0b35fed5580d49392df7ce9374551b348fffbf + PATCHES add-missing-tuple.patch +) + +function(checkout_in_path PATH URL REF) + if(EXISTS "${PATH}") + return() + endif() + + vcpkg_from_git( + OUT_SOURCE_PATH DEP_SOURCE_PATH + URL "${URL}" + REF "${REF}" + ) + file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") + file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") +endfunction() + +set(EXTERNALS "${SOURCE_PATH}/third_party/externals") +file(MAKE_DIRECTORY "${EXTERNALS}") + +# these following aren't available in vcpkg +checkout_in_path("${EXTERNALS}/sfntly" + "https://github.com/googlefonts/sfntly" + "b55ff303ea2f9e26702b514cf6a3196a2e3e2974" +) +checkout_in_path("${EXTERNALS}/dng_sdk" + "https://android.googlesource.com/platform/external/dng_sdk" + "c8d0c9b1d16bfda56f15165d39e0ffa360a11123" +) +checkout_in_path("${EXTERNALS}/libgifcodec" + "https://skia.googlesource.com/libgifcodec" + "d06d2a6d42baf6c0c91cacc28df2542a911d05fe" +) +checkout_in_path("${EXTERNALS}/piex" + "https://android.googlesource.com/platform/external/piex" + "bb217acdca1cc0c16b704669dd6f91a1b509c406" +) + +# turn a CMake list into a GN list of quoted items +# "a;b;c" -> ["a","b","c"] +function(cmake_to_gn_list OUTPUT_ INPUT_) + if(NOT INPUT_) + set(${OUTPUT_} "[]" PARENT_SCOPE) + else() + string(REPLACE ";" "\",\"" TEMP "${INPUT_}") + set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) + endif() +endfunction() + +# multiple libraries with multiple names may be passed as +# "libA,libA2;libB,libB2,libB3;..." +function(find_libraries RESOLVED LIBRARY_NAMES PATHS) + set(_RESOLVED "") + foreach(_LIB_GROUP ${LIBRARY_NAMES}) + string(REPLACE "," ";" _LIB_GROUP_NAMES "${_LIB_GROUP}") + unset(_LIB CACHE) + find_library(_LIB NAMES ${_LIB_GROUP_NAMES} + PATHS "${PATHS}" + NO_DEFAULT_PATH) + + if(_LIB MATCHES "-NOTFOUND") + message(FATAL_ERROR "Could not find library with names: ${_LIB_GROUP_NAMES}") + endif() + + list(APPEND _RESOLVED "${_LIB}") + endforeach() + set(${RESOLVED} "${_RESOLVED}" PARENT_SCOPE) +endfunction() + +# For each .gn file in the current list directory, configure and install at +# the corresponding directory to replace Skia dependencies with ones from vcpkg. +function(replace_skia_dep NAME INCLUDES LIBS_DBG LIBS_REL DEFINITIONS) + list(TRANSFORM INCLUDES PREPEND "${CURRENT_INSTALLED_DIR}") + cmake_to_gn_list(_INCLUDES "${INCLUDES}") + + find_libraries(_LIBS_DBG "${LIBS_DBG}" "${CURRENT_INSTALLED_DIR}/debug/lib") + cmake_to_gn_list(_LIBS_DBG "${_LIBS_DBG}") + + find_libraries(_LIBS_REL "${LIBS_REL}" "${CURRENT_INSTALLED_DIR}/lib") + cmake_to_gn_list(_LIBS_REL "${_LIBS_REL}") + + cmake_to_gn_list(_DEFINITIONS "${DEFINITIONS}") + + set(OUT_FILE "${SOURCE_PATH}/third_party/${NAME}/BUILD.gn") + file(REMOVE "${OUT_FILE}") + configure_file("${CMAKE_CURRENT_LIST_DIR}/${NAME}.gn" "${OUT_FILE}" @ONLY) +endfunction() + +set(_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include") + +replace_skia_dep(expat "/include" "libexpat,libexpatd,libexpatdMD" "libexpat,libexpatMD" "") +replace_skia_dep(freetype2 "/include" "freetype,freetyped" "freetype" "") +replace_skia_dep(harfbuzz "/include/harfbuzz" "harfbuzz-icu" "harfbuzz-icu" "") +replace_skia_dep(icu "/include" "icuuc,icuucd" "icuuc" "U_USING_ICU_NAMESPACE=0") +replace_skia_dep(libjpeg-turbo "/include" "jpeg,jpegd;turbojpeg,turbojpegd" "jpeg;turbojpeg" "") +replace_skia_dep(libpng "/include" "libpng16,libpng16d" "libpng16" "") +replace_skia_dep(libwebp "/include" + "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;libwebpmux,libwebpmuxd" + "webp;webpdemux;webpdecoder;libwebpmux" "") +replace_skia_dep(zlib "/include" "z,zlib,zlibd" "z,zlib" "") + +set(OPTIONS "\ +skia_use_lua=false \ +skia_enable_tools=false \ +skia_enable_spirv_validation=false") + +# used for passing feature-specific definitions to the config file +set(SKIA_PUBLIC_DEFINITIONS "") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS "${OPTIONS} is_component_build=true") +else() + set(OPTIONS "${OPTIONS} is_component_build=false") +endif() + +if("metal" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} skia_use_metal=true") + list(APPEND SKIA_PUBLIC_DEFINITIONS SK_METAL) +endif() + +set(OPTIONS_REL "${OPTIONS} is_official_build=true") +set(OPTIONS_DBG "${OPTIONS} is_debug=true") + +if(CMAKE_HOST_WIN32) + # Load toolchains + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + endif() + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + + # turn a space delimited string into a gn list: + # "a b c" -> ["a","b","c"] + function(to_gn_list OUTPUT_ INPUT_) + string(STRIP "${INPUT_}" TEMP) + string(REPLACE " " " " TEMP "${TEMP}") + string(REPLACE " " "\",\"" TEMP "${TEMP}") + set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) + endfunction() + + to_gn_list(SKIA_C_FLAGS_DBG "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}") + to_gn_list(SKIA_C_FLAGS_REL "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") + + to_gn_list(SKIA_CXX_FLAGS_DBG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") + to_gn_list(SKIA_CXX_FLAGS_REL "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") + + set(OPTIONS_DBG "${OPTIONS_DBG} extra_cflags_c=${SKIA_C_FLAGS_DBG} \ + extra_cflags_cc=${SKIA_CXX_FLAGS_DBG}") + + set(OPTIONS_REL "${OPTIONS_REL} extra_cflags_c=${SKIA_C_FLAGS_REL} \ + extra_cflags_cc=${SKIA_CXX_FLAGS_REL}") + + set(WIN_VC "$ENV{VCINSTALLDIR}") + string(REPLACE "\\VC\\" "\\VC" WIN_VC "${WIN_VC}") + set(OPTIONS_DBG "${OPTIONS_DBG} win_vc=\"${WIN_VC}\"") + set(OPTIONS_REL "${OPTIONS_REL} win_vc=\"${WIN_VC}\"") + +endif() + +vcpkg_configure_gn( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG "${OPTIONS_DBG}" + OPTIONS_RELEASE "${OPTIONS_REL}" +) + +vcpkg_install_gn( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS ":skia" +) + +message(STATUS "Installing: ${CURRENT_PACKAGES_DIR}/include/${PORT}") +file(COPY "${SOURCE_PATH}/include" + DESTINATION "${CURRENT_PACKAGES_DIR}/include") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" + "${CURRENT_PACKAGES_DIR}/include/${PORT}") +file(GLOB_RECURSE SKIA_INCLUDE_FILES LIST_DIRECTORIES false + "${CURRENT_PACKAGES_DIR}/include/${PORT}/*") +foreach(file_ ${SKIA_INCLUDE_FILES}) + vcpkg_replace_string("${file_}" "#include \"include/" "#include \"${PORT}/") +endforeach() + +# get a list of library dependencies for TARGET +function(gn_desc_target_libs OUTPUT BUILD_DIR TARGET) + vcpkg_find_acquire_program(GN) + execute_process( + COMMAND ${GN} desc "${BUILD_DIR}" "${TARGET}" libs + WORKING_DIRECTORY "${SOURCE_PATH}" + OUTPUT_VARIABLE OUTPUT_ + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(REGEX REPLACE "\n|(\r\n)" ";" OUTPUT_ "${OUTPUT_}") + set(${OUTPUT} ${OUTPUT_} PARENT_SCOPE) +endfunction() + +# skiaConfig.cmake.in input variables +gn_desc_target_libs(SKIA_DEP_DBG + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + //:skia) +gn_desc_target_libs(SKIA_DEP_REL + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + //:skia) + +configure_file("${CMAKE_CURRENT_LIST_DIR}/skiaConfig.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/skia/skiaConfig.cmake" @ONLY) + +vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/ports/skia/skiaConfig.cmake.in b/ports/skia/skiaConfig.cmake.in new file mode 100644 index 00000000000000..8ce8c1002d26a2 --- /dev/null +++ b/ports/skia/skiaConfig.cmake.in @@ -0,0 +1,85 @@ +add_library(skia INTERFACE) +add_library(skia::skia ALIAS skia) +set(SKIA_DEP_DBG @SKIA_DEP_DBG@) +set(SKIA_DEP_REL @SKIA_DEP_REL@) + +set(SKIA_LIBRARY_NAME_DBG @SKIA_LIBRARY_NAME_DBG@) +set(SKIA_LIBRARY_NAME_REL @SKIA_LIBRARY_NAME_REL@) +set(SKIA_LIBRARY_IMPLIB_DBG @SKIA_LIBRARY_IMPLIB_DBG@) +set(SKIA_LIBRARY_IMPLIB_REL @SKIA_LIBRARY_IMPLIB_REL@) + +set(SKIA_PUBLIC_DEFINITIONS @SKIA_PUBLIC_DEFINITIONS@) + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +find_library(SKIA_LIB NAMES skia skia.dll) +target_link_libraries(skia INTERFACE "${SKIA_LIB}") + +function(set_dependencies CONFIG LIBRARIES) + foreach(LIB ${LIBRARIES}) + if(LIB MATCHES "^/") + if(WIN32) + string(SUBSTRING "${LIB}" 1 -1 LIB) + endif() + target_link_libraries(skia INTERFACE + "$<$:${LIB}>") + else() + string(REGEX REPLACE "\\.framework" "" LIB ${LIB}) + string(REGEX REPLACE "[^a-zA-Z]" "_" LIB_NAME ${LIB}) + string(TOUPPER ${LIB_NAME} LIB_NAME) + set(LIB_NAME SKIA_${LIB_NAME}_LIBRARY) + find_library(${LIB_NAME} ${LIB}) + target_link_libraries(skia INTERFACE + "$<$:${${LIB_NAME}}>") + endif() + endforeach() +endfunction() + +set_dependencies(Debug "${SKIA_DEP_DBG}") +set_dependencies(Release "${SKIA_DEP_REL}") + +set(SKIA_DEFINITIONS_DBG + _CRT_SECURE_NO_WARNINGS + _HAS_EXCEPTIONS=0 + WIN32_LEAN_AND_MEAN + NOMINMAX + SK_GL + SK_ENABLE_DUMP_GPU + SK_SUPPORT_PDF + SK_HAS_JPEG_LIBRARY + SK_USE_LIBGIFCODEC + SK_HAS_HEIF_LIBRARY + SK_HAS_PNG_LIBRARY + SK_ENABLE_SKSL_INTERPRETER + SK_HAS_WEBP_LIBRARY + SK_XML + SKIA_DLL + SK_SUPPORT_ATLAS_TEXT=1) + +set(SKIA_DEFINITIONS_REL + _CRT_SECURE_NO_WARNINGS + _HAS_EXCEPTIONS=0 + WIN32_LEAN_AND_MEAN + NOMINMAX + NDEBUG + SK_GL + SK_SUPPORT_PDF + SK_HAS_JPEG_LIBRARY + SK_USE_LIBGIFCODEC + SK_HAS_PNG_LIBRARY + SK_HAS_WEBP_LIBRARY + SK_XML + SKIA_DLL) + +target_compile_definitions(skia INTERFACE + $<$:${SKIA_DEFINITIONS_DBG}> + $<$:${SKIA_DEFINITIONS_REL}>) + +target_include_directories(skia INTERFACE ${_IMPORT_PREFIX}/include) +target_compile_definitions(skia INTERFACE ${SKIA_PUBLIC_DEFINITIONS}) diff --git a/ports/skia/vcpkg.json b/ports/skia/vcpkg.json new file mode 100644 index 00000000000000..46bcc003fdea47 --- /dev/null +++ b/ports/skia/vcpkg.json @@ -0,0 +1,35 @@ +{ + "name": "skia", + "version-string": "2020-05-18", + "port-version": 5, + "description": [ + "Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms.", + "It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products.", + "Skia is sponsored and managed by Google, but is available for use by anyone under the BSD Free Software License. While engineering of the core components is done by the Skia development team, we consider contributions from any source." + ], + "homepage": "https://skia.org", + "supports": "x64 & (osx | windows)", + "dependencies": [ + "expat", + { + "name": "freetype", + "default-features": false + }, + { + "name": "harfbuzz", + "features": [ + "icu" + ] + }, + "icu", + "libjpeg-turbo", + "libpng", + "libwebp", + "zlib" + ], + "features": { + "metal": { + "description": "metal support for skia" + } + } +} diff --git a/ports/skia/zlib.gn b/ports/skia/zlib.gn new file mode 100644 index 00000000000000..5c2bc8fc1c1098 --- /dev/null +++ b/ports/skia/zlib.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("zlib") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/ports/skyr-url/portfile.cmake b/ports/skyr-url/portfile.cmake new file mode 100644 index 00000000000000..0bd2a407ac2d10 --- /dev/null +++ b/ports/skyr-url/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-netlib/url + REF v1.13.0 + SHA512 187898f5c0d2919095b293c7fbb6757d7b1391c9c79ccc3467ffc8b76a10685fd91faf9e9b8b0c0c21d0a9aecb3a50d52f2eab52823e770fc10ecd6ed874a748 + HEAD_REF main +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskyr_BUILD_TESTS=OFF + -Dskyr_BUILD_DOCS=OFF + -Dskyr_BUILD_EXAMPLES=OFF + -Dskyr_WARNINGS_AS_ERRORS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/skyr-url/vcpkg.json b/ports/skyr-url/vcpkg.json new file mode 100644 index 00000000000000..aff139261ab61d --- /dev/null +++ b/ports/skyr-url/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "skyr-url", + "version-string": "1.13.0", + "port-version": 1, + "description": "A C++ library that implements the WhatWG URL specification", + "homepage": "https://github.com/cpp-netlib/url", + "dependencies": [ + "nlohmann-json", + "range-v3", + "tl-expected" + ] +} diff --git a/ports/sleef/portfile.cmake b/ports/sleef/portfile.cmake new file mode 100644 index 00000000000000..ce37b7ce7e4f40 --- /dev/null +++ b/ports/sleef/portfile.cmake @@ -0,0 +1,29 @@ +# x86: Reports ICE(Internal Compiler Error) for x86-windows/release. +# see ${SOURCE_PATH}/src/libm/sleefsimddp.c +# uwp: codegen fails +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO shibatch/sleef + REF 3.5.1 + SHA512 e8e4e5028db52998c6b82bd462622c08d670e4e85273327f1c3bdbd900827dd7793b217c2876ca1229b6f672493bb96f40140e14366390cccea0e6780689e128 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_LIBM=ON + -DBUILD_DFT=ON + -DBUILD_QUAD=ON + -DBUILD_GNUABILIBS=${VCPKG_TARGET_IS_LINUX} + -DBUILD_TESTS=OFF + -DBUILD_INLINE_HEADERS=OFF +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/sleef/vcpkg.json b/ports/sleef/vcpkg.json new file mode 100644 index 00000000000000..dcd74f6fc96250 --- /dev/null +++ b/ports/sleef/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "sleef", + "version": "3.5.1", + "description": "SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT", + "homepage": "https://sleef.org/", + "license": "BSL-1.0", + "supports": "!uwp & !(arm & windows)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/sleepy-discord/portfile.cmake b/ports/sleepy-discord/portfile.cmake new file mode 100644 index 00000000000000..b59a2779f6ca95 --- /dev/null +++ b/ports/sleepy-discord/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "websocketpp" USE_WEBSOCKETPP + "websocketpp" USE_BOOST_ASIO + "cpr" USE_CPR + "voice" ENABLE_VOICE + "compression" USE_ZLIB +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yourWaifu/sleepy-discord + REF 53e68d6a569ab6da17b74279e308bf94919db933 + SHA512 1ee6de7aa70f3d7fc6ec0e21f5e65c6a868c23a29b4f26f614b59bbce3425c1305ce192562bf287d40f98060301b8638bc4bef95789fe8594ce5809adb6dc1e5 + HEAD_REF develop +) + +# Handle version data here to prevent issues from doing this twice in parallel +set(SLEEPY_DISCORD_VERSION_HASH 53e68d6a569ab6da17b74279e308bf94919db933) +set(SLEEPY_DISCORD_VERSION_BUILD 908) +set(SLEEPY_DISCORD_VERSION_BRANCH "develop") +set(SLEEPY_DISCORD_VERSION_IS_MASTER 0) +set(SLEEPY_DISCORD_VERSION_DESCRIPTION_CONCAT " ") +set(SLEEPY_DISCORD_VERSION_DESCRIPTION "53e68d6") +configure_file( + "${SOURCE_PATH}/include/sleepy_discord/version.h.in" + "${SOURCE_PATH}/include/sleepy_discord/version.h" +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DSLEEPY_VCPKG=ON + -DAUTO_DOWNLOAD_LIBRARY=OFF + ${FEATURE_OPTIONS} +) +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sleepy-discord) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sleepy-discord/vcpkg.json b/ports/sleepy-discord/vcpkg.json new file mode 100644 index 00000000000000..2e4ff128eeb36a --- /dev/null +++ b/ports/sleepy-discord/vcpkg.json @@ -0,0 +1,44 @@ +{ + "name": "sleepy-discord", + "version-date": "2021-07-07", + "description": "C++ library for the Discord chat client", + "homepage": "https://yourwaifu.dev/sleepy-discord/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + "cpr", + "websocketpp" + ], + "features": { + "compression": { + "description": "Allow compression for Websockets connection", + "dependencies": [ + "zlib" + ] + }, + "cpr": { + "description": "Use CPR library for handling HTTPS", + "dependencies": [ + "cpr" + ] + }, + "voice": { + "description": "Voice Chat support", + "dependencies": [ + "libsodium", + "opus" + ] + }, + "websocketpp": { + "description": "Use Websocketpp for handling WebSockets", + "dependencies": [ + "boost-random", + "websocketpp" + ] + } + } +} diff --git a/ports/slikenet/fix-install.patch b/ports/slikenet/fix-install.patch new file mode 100644 index 00000000000000..008dd1e7f29ce2 --- /dev/null +++ b/ports/slikenet/fix-install.patch @@ -0,0 +1,51 @@ +diff --git a/Lib/DLL/CMakeLists.txt b/Lib/DLL/CMakeLists.txt +index 7f6453d..48f9562 100644 +--- a/Lib/DLL/CMakeLists.txt ++++ b/Lib/DLL/CMakeLists.txt +@@ -50,6 +50,7 @@ ELSE(WIN32 AND NOT UNIX) + ENDIF(WIN32 AND NOT UNIX) + + target_link_libraries(SLikeNetDLL ${SLIKENET_LIBRARY_LIBS}) ++if(0) + IF(NOT WIN32 OR UNIX) + configure_file(../../slikenet-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake @ONLY) + +@@ -60,3 +61,12 @@ IF(NOT WIN32 OR UNIX) + INSTALL(FILES ../../slikenet-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake DESTINATION lib/slikenet-${SLikeNet_VERSION}) + INSTALL(EXPORT SLikeNetDLL DESTINATION lib/slikenet-${SLikeNet_VERSION}) + ENDIF(NOT WIN32 OR UNIX) ++endif() ++ ++install(TARGETS SLikeNetDLL ++ EXPORT SLikeNetDLL ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/slikenet) ++install(EXPORT SLikeNetDLL FILE slikenetTargets.cmake DESTINATION share/slikenet) +diff --git a/Lib/LibStatic/CMakeLists.txt b/Lib/LibStatic/CMakeLists.txt +index f936fa5..a5dcc4f 100644 +--- a/Lib/LibStatic/CMakeLists.txt ++++ b/Lib/LibStatic/CMakeLists.txt +@@ -50,6 +50,8 @@ ELSE(WIN32 AND NOT UNIX) + ENDIF(WIN32 AND NOT UNIX) + + target_link_libraries(SLikeNetLibStatic ${SLIKENET_LIBRARY_LIBS}) ++ ++if(0) + IF(WIN32 AND NOT UNIX) + IF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles") + set_target_properties(SLikeNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:\"LIBCD.lib LIBCMTD.lib MSVCRT.lib\"" ) +@@ -64,3 +66,12 @@ ELSE(WIN32 AND NOT UNIX) + INSTALL(FILES ../../slikenet-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake DESTINATION lib/slikenet-${SLikeNet_VERSION}) + INSTALL(EXPORT SLikeNetLibStatic FILE slikenet.cmake DESTINATION lib/slikenet-${SLikeNet_VERSION}) + ENDIF(WIN32 AND NOT UNIX) ++endif() ++ ++INSTALL(TARGETS SLikeNetLibStatic ++ EXPORT SLikeNetLibStatic ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/slikenet) ++INSTALL(EXPORT SLikeNetLibStatic FILE slikenetTargets.cmake DESTINATION share/slikenet) diff --git a/ports/slikenet/portfile.cmake b/ports/slikenet/portfile.cmake new file mode 100644 index 00000000000000..ba5ef493feef65 --- /dev/null +++ b/ports/slikenet/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SLikeSoft/SLikeNet + REF 358462052fce7e585fc1cce0a17a7042ba724c08 + SHA512 2c932b0a7910ec36dd6a340dd841cefcf259fbdadadff220747d13752181ea14e3c5f05331beb36dea21c0de360edc270ff4c55375bbea23ee2149828f07e9ab + HEAD_REF master + PATCHES + fix-install.patch +) +#Uses an outdated OpenSSL version and is in an experimental namespace any way. As such we delete it here +file(REMOVE_RECURSE "${SOURCE_PATH}/Source/src/crypto" "${SOURCE_PATH}/Source/include/slikenet/crypto") + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SLIKENET_ENABLE_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SLIKENET_ENABLE_DLL) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSLIKENET_ENABLE_DLL=${SLIKENET_ENABLE_DLL} + -DSLIKENET_ENABLE_STATIC=${SLIKENET_ENABLE_STATIC} + -DSLIKENET_ENABLE_SAMPLES=FALSE +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/slikenet) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file("${CMAKE_CURRENT_LIST_DIR}/slikenet-config.cmake" "${CURRENT_PACKAGES_DIR}/share/slikenet/slikenet-config.cmake" COPYONLY) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/slikenet/vcpkg-cmake-wrapper.cmake" COPYONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/slikenet/slikenet-config.cmake b/ports/slikenet/slikenet-config.cmake new file mode 100644 index 00000000000000..be473367afdbd5 --- /dev/null +++ b/ports/slikenet/slikenet-config.cmake @@ -0,0 +1,4 @@ +include(CMakeFindDependencyMacro) +find_dependency(OpenSSL) +set(slikenet_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include") +include(${CMAKE_CURRENT_LIST_DIR}/slikenetTargets.cmake) diff --git a/ports/slikenet/usage b/ports/slikenet/usage new file mode 100644 index 00000000000000..6f98ae5f83a145 --- /dev/null +++ b/ports/slikenet/usage @@ -0,0 +1,4 @@ +The package slikenet provides CMake targets: + + find_package(slikenet CONFIG REQUIRED) + target_link_libraries(main PRIVATE SLikeNet) \ No newline at end of file diff --git a/ports/slikenet/vcpkg-cmake-wrapper.cmake b/ports/slikenet/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..237389f63ff241 --- /dev/null +++ b/ports/slikenet/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS}) + +if(NOT TARGET SLikeNet AND TARGET SLikeNetDLL) +add_library(SLikeNet INTERFACE IMPORTED) +set_target_properties(SLikeNet PROPERTIES INTERFACE_LINK_LIBRARIES SLikeNetDLL) +endif() + +if(NOT TARGET SLikeNet AND TARGET SLikeNetLibStatic) +add_library(SLikeNet INTERFACE IMPORTED) +set_target_properties(SLikeNet PROPERTIES INTERFACE_LINK_LIBRARIES SLikeNetLibStatic) +endif() diff --git a/ports/slikenet/vcpkg.json b/ports/slikenet/vcpkg.json new file mode 100644 index 00000000000000..158a28c4851c81 --- /dev/null +++ b/ports/slikenet/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "slikenet", + "version-date": "2021-06-07", + "description": "SLikeNetT is an Open Source/Free Software cross-platform network engine written in C++ and specifially designed for games (and applications which have comparable requirements on a network engine like games) building upon the discontinued RakNet network engine which had more than 13 years of active development.", + "homepage": "https://github.com/SLikeSoft/SLikeNet", + "supports": "!uwp", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/sltbench/portfile.cmake b/ports/sltbench/portfile.cmake new file mode 100644 index 00000000000000..2111c896bf46fa --- /dev/null +++ b/ports/sltbench/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ivafanas/sltbench + REF 52c7c7852abc3159185eb79e699ad77fadfc35bd + SHA512 0c66b51f5a950a09df47019775941554538bc3642788f61aaf8c5ec3644d5fef721391f73c3fddfd9529159f9b81c7d7ed76c7995a79f37adaf8d0ff55a99d4b + HEAD_REF master) + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake/ TARGET_PATH share/sltbench) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/ports/sltbench/vcpkg.json b/ports/sltbench/vcpkg.json new file mode 100644 index 00000000000000..efa7c527f2de7a --- /dev/null +++ b/ports/sltbench/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "sltbench", + "version-string": "2.4.0", + "description": "C++ benchmark tool. Practical, stable and fast performance testing framework.", + "homepage": "https://github.com/ivafanas/sltbench" +} diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt index b0e284b05e2a07..5515c698f20b2f 100644 --- a/ports/smpeg2/CMakeLists.txt +++ b/ports/smpeg2/CMakeLists.txt @@ -45,7 +45,7 @@ add_library(smpeg2 MPEGsystem.cpp smpeg.cpp) -set_target_properties(smpeg2 PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) +set_target_properties(smpeg2 PROPERTIES DEFINE_SYMBOL DLL_EXPORT) if(BUILD_SHARED_LIBS) target_link_libraries(smpeg2 SDL2::SDL2) else() diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL deleted file mode 100644 index 3a761287ee730c..00000000000000 --- a/ports/smpeg2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: smpeg2 -Version: 2.0.0-6 -Homepage: https://www.libsdl.org/projects/smpeg/ -Description: SDL MPEG Player Library -Build-Depends: sdl2 diff --git a/ports/smpeg2/portfile.cmake b/ports/smpeg2/portfile.cmake index a7c6e9b076832f..acba2223774ad6 100644 --- a/ports/smpeg2/portfile.cmake +++ b/ports/smpeg2/portfile.cmake @@ -1,6 +1,4 @@ -include(vcpkg_common_functions) - set(VERSION 2.0.0) vcpkg_download_distfile(ARCHIVE URLS "https://www.libsdl.org/projects/smpeg/release/smpeg2-${VERSION}.tar.gz" diff --git a/ports/smpeg2/vcpkg.json b/ports/smpeg2/vcpkg.json new file mode 100644 index 00000000000000..24eb88e52e459f --- /dev/null +++ b/ports/smpeg2/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "smpeg2", + "version-string": "2.0.0", + "port-version": 7, + "description": "SDL MPEG Player Library", + "homepage": "https://www.libsdl.org/projects/smpeg/", + "dependencies": [ + "sdl2" + ] +} diff --git a/ports/snappy/CONTROL b/ports/snappy/CONTROL deleted file mode 100644 index a0a0cae03fdeaa..00000000000000 --- a/ports/snappy/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: snappy -Version: 1.1.7-2 -Homepage: https://github.com/google/snappy -Description: A fast compressor/decompressor. diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake index c88ff60eb29b2e..75dd133027dfb5 100644 --- a/ports/snappy/portfile.cmake +++ b/ports/snappy/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/snappy - REF 1.1.7 - SHA512 32046f532606ba545a4e4825c0c66a19be449f2ca2ff760a6fa170a3603731479a7deadb683546e5f8b5033414c50f4a9a29f6d23b7a41f047e566e69eca7caf + REF 537f4ad6240e586970fe554614542e9717df7902 # 1.1.8 + SHA512 555d3b69a6759592736cbaae8f41654f0cf14e8be693b5dde37640191e53daec189f895872557b173e905d10681ef502f3e6ed8566811add963ffef96ce4016d HEAD_REF master ) diff --git a/ports/snappy/vcpkg.json b/ports/snappy/vcpkg.json new file mode 100644 index 00000000000000..df302a6d6c604f --- /dev/null +++ b/ports/snappy/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "snappy", + "version-string": "1.1.8", + "port-version": 1, + "description": "A fast compressor/decompressor.", + "homepage": "https://github.com/google/snappy" +} diff --git a/ports/sndfile/CONTROL b/ports/sndfile/CONTROL deleted file mode 100644 index fb01b640840a31..00000000000000 --- a/ports/sndfile/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: sndfile -Version: 0 -Description:x Library to read, write and manipulate many soundfile types. -Build-Depends: libsndfile -Default-Features: external-libs - -Feature: external-libs -Description: Support Ogg Vorbis and FLAC audio files -Build-Depends: libsndfile[external-libs] diff --git a/ports/sndfile/vcpkg.json b/ports/sndfile/vcpkg.json new file mode 100644 index 00000000000000..2f91543bd334d0 --- /dev/null +++ b/ports/sndfile/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "sndfile", + "version-string": "0", + "port-version": 1, + "description": "x Library to read, write and manipulate many soundfile types.", + "dependencies": [ + "libsndfile" + ], + "default-features": [ + "external-libs" + ], + "features": { + "external-libs": { + "description": "Support Ogg Vorbis and FLAC audio files", + "dependencies": [ + { + "name": "libsndfile", + "features": [ + "external-libs" + ] + } + ] + } + } +} diff --git a/ports/snowhouse/CONTROL b/ports/snowhouse/CONTROL deleted file mode 100644 index ebd1a619276e69..00000000000000 --- a/ports/snowhouse/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: snowhouse -Version: 3.1.0 -Description: An assertion library for C++ diff --git a/ports/snowhouse/portfile.cmake b/ports/snowhouse/portfile.cmake index de5fd57e5d83fc..279fa6e4ab680d 100644 --- a/ports/snowhouse/portfile.cmake +++ b/ports/snowhouse/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO banditcpp/snowhouse - REF 5a612c248524a3b1bdd388bc0ef5a9ea0d2fa684 - SHA512 fd737b0f433093246883975ec70a407a62547e768f538e0540ac0634db1578f0ea46979b7055ae428f146499a0df3b1d6292b8d38c22d346476211757a271d21 + REF 3faaff8d836c726aa2001adf3d2253d3b368b06b # v5.0.0 + SHA512 d1fdd01b376ea26a4c9312df9f952f5b543d1f9d4a8049b7302961d3403200659cb448e5c032f9f05f4f0eeed7434d94beaf108f80cd155c37fe63eaf14651c2 HEAD_REF master ) diff --git a/ports/snowhouse/vcpkg.json b/ports/snowhouse/vcpkg.json new file mode 100644 index 00000000000000..f8d9a392febfd1 --- /dev/null +++ b/ports/snowhouse/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "snowhouse", + "version-string": "5.0.0", + "port-version": 1, + "description": "An assertion library for C++" +} diff --git a/ports/so5extra/CONTROL b/ports/so5extra/CONTROL deleted file mode 100644 index fbe4a1e16df0c4..00000000000000 --- a/ports/so5extra/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: so5extra -Version: 1.3.1-1 -Description: A set of additional tools for SObjectizer framework. -Build-Depends: sobjectizer diff --git a/ports/so5extra/portfile.cmake b/ports/so5extra/portfile.cmake index 71e1cb443ee85a..7ff8f47b6f46d4 100644 --- a/ports/so5extra/portfile.cmake +++ b/ports/so5extra/portfile.cmake @@ -1,17 +1,12 @@ -include(vcpkg_common_functions) - -set(VERSION 1.3.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so5extra-${VERSION}/dev/so_5_extra) - -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/so_5_extra/so5extra-${VERSION}.tar.bz2/download" - FILENAME "so5extra-${VERSION}.tar.bz2" - SHA512 58532426f85121f8f6c3b18a70950c048c8a695a7fca7be5d9c95434bdabdb2bfcf73d755737434a8d8aa5f3051785e13e7e293e057527c72047dad293a56ae7 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stiffstream/so5extra + REF 20f4c83ecde1509fbaf337dcf40f2f49dcf2690d # v.1.4.1.1 + SHA512 a3df042b60afc4c57361b5b3c21f4b7c077f1b0ab7a4d33fda14cc915f10b22a42ef0acbb1c7c8b356ce31ee84f24391164120642faf96235549204c83b40294 ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/dev/so_5_extra PREFER_NINJA OPTIONS -DSO5EXTRA_INSTALL=ON @@ -20,9 +15,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/so5extra) -# Remove unnecessary stuff. -# These paths are empty and should be removed too. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/../../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/so5extra RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/so5extra RENAME copyright) + diff --git a/ports/so5extra/vcpkg.json b/ports/so5extra/vcpkg.json new file mode 100644 index 00000000000000..0d172497cadc15 --- /dev/null +++ b/ports/so5extra/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "so5extra", + "version": "1.4.1.1", + "description": "A set of additional tools for SObjectizer framework.", + "homepage": "https://github.com/Stiffstream/so5extra", + "license": "BSD-3-Clause", + "dependencies": [ + "sobjectizer" + ] +} diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL deleted file mode 100644 index f5bfe31c0fe098..00000000000000 --- a/ports/sobjectizer/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: sobjectizer -Version: 5.6.0.2 -Homepage: https://sourceforge.net/projects/sobjectizer -Description: SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels. diff --git a/ports/sobjectizer/portfile.cmake b/ports/sobjectizer/portfile.cmake index 8231f372eaa90e..b6932058ecb32f 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,25 +1,15 @@ -include(vcpkg_common_functions) - -set(VERSION 5.6.0.2) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev) - -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/SObjectizer%20Core%20v.5.6/so-${VERSION}.tar.bz2" - FILENAME "so-${VERSION}.tar.bz2" - SHA512 8f330c757fe401d715584da224925158d97ab5bba59e442af29ac64cb6feeae00434bd9bf11601f0796737f901a4f8ada1728b60d5706294d607d4d365c2d6da +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stiffstream/sobjectizer + REF 972b5310b7a486dd4d4322ffb46f1c7e15c47ef6 # v.5.7.2.6 + SHA512 0e5160981218d49beda3ed367ed34fa05c706104f68b6b06619f62a9b2a1ef92b08ddfd3ae14451e51e41bb7742789da4536289ec9d2d23dce13cdf6284108c9 ) -vcpkg_extract_source_archive(${ARCHIVE}) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(SOBJECTIZER_BUILD_STATIC ON) - set(SOBJECTIZER_BUILD_SHARED OFF) -else() - set(SOBJECTIZER_BUILD_STATIC OFF) - set(SOBJECTIZER_BUILD_SHARED ON) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SOBJECTIZER_BUILD_STATIC ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOBJECTIZER_BUILD_SHARED) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/dev PREFER_NINJA OPTIONS -DSOBJECTIZER_BUILD_STATIC=${SOBJECTIZER_BUILD_STATIC} @@ -29,8 +19,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sobjectizer) -# Handle copyright -file(COPY ${SOURCE_PATH}/../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sobjectizer) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/sobjectizer/LICENSE ${CURRENT_PACKAGES_DIR}/share/sobjectizer/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/ports/sobjectizer/vcpkg.json b/ports/sobjectizer/vcpkg.json new file mode 100644 index 00000000000000..82297030b5793f --- /dev/null +++ b/ports/sobjectizer/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "sobjectizer", + "version": "5.7.2.6", + "description": "SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels.", + "homepage": "https://github.com/Stiffstream/sobjectizer", + "license": "BSD-3-Clause" +} diff --git a/ports/soci/0001-Deduce-reference-in-boost-fusion-for_each.patch b/ports/soci/0001-Deduce-reference-in-boost-fusion-for_each.patch deleted file mode 100644 index cab3585120fb2a..00000000000000 --- a/ports/soci/0001-Deduce-reference-in-boost-fusion-for_each.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 5c3b1e0a61d83d7a3c70fb882c7e0918777f0e00 Mon Sep 17 00:00:00 2001 -From: Andrei Lebedev -Date: Sun, 5 May 2019 19:52:01 +0300 -Subject: [PATCH] Deduce reference in boost::fusion::for_each - -Signed-off-by: Andrei Lebedev ---- - include/soci/bind-values.h | 27 +++++++++++++++++++++++---- - 1 file changed, 23 insertions(+), 4 deletions(-) - -diff --git a/include/soci/bind-values.h b/include/soci/bind-values.h -index eee416e..e84fb0e 100644 ---- a/include/soci/bind-values.h -+++ b/include/soci/bind-values.h -@@ -13,6 +13,13 @@ - #ifdef SOCI_HAVE_BOOST - # include - # include -+# include -+ -+# if BOOST_VERSION >= 106800 -+# define SOCI_BOOST_FUSION_FOREACH_REFERENCE & -+# else -+# define SOCI_BOOST_FUSION_FOREACH_REFERENCE -+# endif - #endif // SOCI_HAVE_BOOST - #include - -@@ -83,13 +90,19 @@ private: - template - void exchange_(use_container const &uc, boost::mpl::true_ * /* fusion sequence */) - { -- boost::fusion::for_each(uc.t, use_sequence(*this, uc.ind)); -+ use_sequence f(*this, uc.ind); -+ boost::fusion::for_each -+ SOCI_BOOST_FUSION_FOREACH_REFERENCE>(uc.t, f); - } - - template - void exchange_(use_container const &uc, boost::mpl::true_ * /* fusion sequence */) - { -- boost::fusion::for_each(uc.t, use_sequence(*this)); -+ use_sequence f(*this); -+ boost::fusion::for_each -+ SOCI_BOOST_FUSION_FOREACH_REFERENCE>(uc.t, f); - } - - #endif // SOCI_HAVE_BOOST -@@ -173,13 +186,19 @@ private: - template - void exchange_(into_container const &ic, boost::mpl::true_ * /* fusion sequence */) - { -- boost::fusion::for_each(ic.t, into_sequence(*this, ic.ind)); -+ into_sequence f(*this, ic.ind); -+ boost::fusion::for_each -+ SOCI_BOOST_FUSION_FOREACH_REFERENCE>(ic.t, f); - } - - template - void exchange_(into_container const &ic, boost::mpl::true_ * /* fusion sequence */) - { -- boost::fusion::for_each(ic.t, into_sequence(*this)); -+ into_sequence f(*this); -+ boost::fusion::for_each -+ SOCI_BOOST_FUSION_FOREACH_REFERENCE>(ic.t, f); - } - #endif // SOCI_HAVE_BOOST - --- -2.20.1.windows.1 - diff --git a/ports/soci/0002-Find-PostgreSQL-debug-library.patch b/ports/soci/0002-Find-PostgreSQL-debug-library.patch deleted file mode 100644 index fef23b751fc49d..00000000000000 --- a/ports/soci/0002-Find-PostgreSQL-debug-library.patch +++ /dev/null @@ -1,62 +0,0 @@ -From f1fa9cc84e67c9f28f651b926f55f93d60bbb963 Mon Sep 17 00:00:00 2001 -From: Andrei Lebedev -Date: Sun, 5 May 2019 21:22:49 +0300 -Subject: [PATCH] Find PostgreSQL debug library - -Signed-off-by: Andrei Lebedev ---- - cmake/modules/FindPostgreSQL.cmake | 31 +++++++++++++++++++----------- - 1 file changed, 20 insertions(+), 11 deletions(-) - -diff --git a/cmake/modules/FindPostgreSQL.cmake b/cmake/modules/FindPostgreSQL.cmake -index 48937e2..e2e557b 100644 ---- a/cmake/modules/FindPostgreSQL.cmake -+++ b/cmake/modules/FindPostgreSQL.cmake -@@ -124,16 +124,21 @@ if ( WIN32 ) - set (POSTGRESQL_LIBRARY_TO_FIND ${POSTGRESQL_LIB_PREFIX}${POSTGRESQL_LIBRARY_TO_FIND}) - endif() - --find_library(POSTGRESQL_LIBRARY -- NAMES ${POSTGRESQL_LIBRARY_TO_FIND} -- PATHS -- ${POSTGRESQL_ROOT_DIRECTORIES} -- PATH_SUFFIXES -- lib -- ${POSTGRESQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES} -- # Help the user find it if we cannot. -- DOC "The ${POSTGRESQL_LIBRARY_DIR_MESSAGE}" --) -+function(__postgresql_find_library _name) -+ find_library(${_name} -+ NAMES ${ARGN} -+ PATHS -+ ${POSTGRESQL_ROOT_DIRECTORIES} -+ PATH_SUFFIXES -+ lib -+ ${POSTGRESQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES} -+ # Help the user find it if we cannot. -+ DOC "The ${POSTGRESQL_LIBRARY_DIR_MESSAGE}" -+ ) -+endfunction() -+ -+__postgresql_find_library(POSTGRESQL_LIBRARY ${POSTGRESQL_LIBRARY_TO_FIND}) -+__postgresql_find_library(POSTGRESQL_LIBRARY_DEBUG ${POSTGRESQL_LIBRARY_TO_FIND}d) - get_filename_component(POSTGRESQL_LIBRARY_DIR ${POSTGRESQL_LIBRARY} PATH) - - if (POSTGRESQL_INCLUDE_DIR) -@@ -169,7 +174,11 @@ set(POSTGRESQL_FOUND ${POSTGRESQL_FOUND}) - if(POSTGRESQL_FOUND) - set(POSTGRESQL_INCLUDE_DIRS ${POSTGRESQL_INCLUDE_DIR}) - set(POSTGRESQL_LIBRARY_DIRS ${POSTGRESQL_LIBRARY_DIR}) -- set(POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARY}) -+ if(POSTGRESQL_LIBRARY AND POSTGRESQL_LIBRARY_DEBUG) -+ set(POSTGRESQL_LIBRARIES optimized ${POSTGRESQL_LIBRARY} debug ${POSTGRESQL_LIBRARY_DEBUG}) -+ else() -+ set(POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARY}) -+ endif() - set(POSTGRESQL_VERSION ${POSTGRESQL_VERSION_STRING}) - endif() - --- -2.20.1.windows.1 - diff --git a/ports/soci/CONTROL b/ports/soci/CONTROL deleted file mode 100644 index 224e3de64e26de..00000000000000 --- a/ports/soci/CONTROL +++ /dev/null @@ -1,19 +0,0 @@ -Source: soci -Version: 3.2.3-4 -Homepage: https://github.com/SOCI/soci -Description: SOCI database access library - -Feature: boost -Build-Depends: boost-date-time, boost-fusion, boost-optional, boost-preprocessor, boost-tuple -Description: Integration with Boost - -Feature: sqlite3 -Build-Depends: sqlite3 -Description: Build sqlite3 backend - -Feature: postgresql -Build-Depends: libpq -Description: Build postgresql backend - -Feature: odbc -Description: Build odbc backend diff --git a/ports/soci/export-include-dirs.patch b/ports/soci/export-include-dirs.patch new file mode 100644 index 00000000000000..e141363fc2e894 --- /dev/null +++ b/ports/soci/export-include-dirs.patch @@ -0,0 +1,36 @@ +diff --git a/cmake/SociBackend.cmake b/cmake/SociBackend.cmake +index 5d4ef0d..bb0edf2 100644 +--- a/cmake/SociBackend.cmake ++++ b/cmake/SociBackend.cmake +@@ -159,8 +159,14 @@ macro(soci_backend NAME) + ${THIS_BACKEND_HEADERS}) + + target_link_libraries(${THIS_BACKEND_TARGET} ++ PUBLIC + ${SOCI_CORE_TARGET} + ${THIS_BACKEND_DEPENDS_LIBRARIES}) ++ ++ target_include_directories(${THIS_BACKEND_TARGET} ++ PUBLIC ++ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS} ++ ) + + if(WIN32) + set_target_properties(${THIS_BACKEND_TARGET} +@@ -197,9 +203,15 @@ macro(soci_backend NAME) + + # Still need to link the libraries for tests to work + target_link_libraries (${THIS_BACKEND_TARGET_STATIC} ++ PUBLIC + ${THIS_BACKEND_DEPENDS_LIBRARIES} + ) +- ++ ++ target_include_directories(${THIS_BACKEND_TARGET_STATIC} ++ PUBLIC ++ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS} ++ ) ++ + set_target_properties(${THIS_BACKEND_TARGET_STATIC} + PROPERTIES + OUTPUT_NAME ${THIS_BACKEND_OUTPUT_NAME} diff --git a/ports/soci/fix-dependency-libmysql.patch b/ports/soci/fix-dependency-libmysql.patch new file mode 100644 index 00000000000000..809ec76d5be325 --- /dev/null +++ b/ports/soci/fix-dependency-libmysql.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake +index 1233568..9a7cb61 100644 +--- a/cmake/modules/FindMySQL.cmake ++++ b/cmake/modules/FindMySQL.cmake +@@ -13,6 +13,9 @@ + # + # Redistribution and use is allowed according to the terms of the BSD license. + # For details see the accompanying COPYING-CMAKE-SCRIPTS file. ++find_package(libmysql REQUIRED) ++set(MySQL_FOUND 1) ++return() + + include(CheckCXXSourceCompiles) + diff --git a/ports/soci/fix-mysql-feature-error.patch b/ports/soci/fix-mysql-feature-error.patch new file mode 100644 index 00000000000000..05e9c4bfe04a23 --- /dev/null +++ b/ports/soci/fix-mysql-feature-error.patch @@ -0,0 +1,12 @@ +diff --git a/src/backends/mysql/session.cpp b/src/backends/mysql/session.cpp +index 383248c..86a5bfd 100644 +--- a/src/backends/mysql/session.cpp ++++ b/src/backends/mysql/session.cpp +@@ -5,6 +5,7 @@ + // (See accompanying file LICENSE_1_0.txt or copy at + // http://www.boost.org/LICENSE_1_0.txt) + // ++typedef bool my_bool; + + #define SOCI_MYSQL_SOURCE + #include "soci/mysql/soci-mysql.h" diff --git a/ports/soci/portfile.cmake b/ports/soci/portfile.cmake index b70e43d3c8c4a4..b852d6da79af7f 100644 --- a/ports/soci/portfile.cmake +++ b/ports/soci/portfile.cmake @@ -1,12 +1,13 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SOCI/soci - REF c15b178a44b99ed3ff7fd953837fb97f6314abb7 - SHA512 037c44f29e80b5ec57046606b4672088917d469e9d2254e3e15253e170026cf0fe17e4f79a4b01df22fe7032708ca87354b1560d9880d4d165cdef869c3c6081 + REF 99e2d567161a302de4f99832af76e6d3b75b68e6 #version 4.0.2 + SHA512 d08d2383808d46d5e9550e9c7d93fb405d9e336eb38d974ba429e5b9446d3af53d4e702b90e80c67e298333da0145457fa1146d9773322676030be69de4ec4f4 HEAD_REF master - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Deduce-reference-in-boost-fusion-for_each.patch" - "${CMAKE_CURRENT_LIST_DIR}/0002-Find-PostgreSQL-debug-library.patch" + PATCHES + fix-dependency-libmysql.patch + export-include-dirs.patch + fix-mysql-feature-error.patch # https://bugs.mysql.com/bug.php?id=85131 ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC) @@ -26,32 +27,35 @@ foreach(_feature IN LISTS ALL_FEATURES) else() list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") endif() + + if(_feature MATCHES "mysql") + set(MYSQL_OPT -DMYSQL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/mysql) + endif() endforeach() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DSOCI_TESTS=OFF - -DSOCI_CXX_C11=ON - -DSOCI_LIBDIR:STRING=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds - -DLIBDIR:STRING=lib + -DSOCI_CXX11=ON -DSOCI_STATIC=${SOCI_STATIC} -DSOCI_SHARED=${SOCI_DYNAMIC} ${_COMPONENT_FLAGS} - - -DWITH_MYSQL=OFF - -DWITH_ORACLE=OFF - -DWITH_FIREBIRD=OFF - -DWITH_DB2=OFF + ${MYSQL_OPT} ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SOCI) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/debug/cmake ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +if ("mysql" IN_LIST FEATURES) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCIConfig.cmake" + "# Create imported target SOCI::soci_mysql" + "\ninclude(CMakeFindDependencyMacro)\nfind_dependency(libmysql)\n# Create imported target SOCI::soci_mysql" + ) +endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/soci/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/soci/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -vcpkg_copy_pdbs() +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/soci/vcpkg.json b/ports/soci/vcpkg.json new file mode 100644 index 00000000000000..03c3294448743a --- /dev/null +++ b/ports/soci/vcpkg.json @@ -0,0 +1,49 @@ +{ + "name": "soci", + "version": "4.0.2", + "description": "SOCI database access library", + "homepage": "https://github.com/SOCI/soci", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "boost": { + "description": "Integration with Boost", + "dependencies": [ + "boost-date-time", + "boost-fusion", + "boost-optional", + "boost-preprocessor", + "boost-tuple" + ] + }, + "mysql": { + "description": "Build mysql backend", + "dependencies": [ + "libmysql" + ] + }, + "odbc": { + "description": "Build odbc backend" + }, + "postgresql": { + "description": "Build postgresql backend", + "dependencies": [ + "libpq" + ] + }, + "sqlite3": { + "description": "Build sqlite3 backend", + "dependencies": [ + "sqlite3" + ] + } + } +} diff --git a/ports/socket-io-client/CONTROL b/ports/socket-io-client/CONTROL deleted file mode 100644 index bd7b036a8d09e9..00000000000000 --- a/ports/socket-io-client/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: socket-io-client -Version: 1.6.1-1 -Description: C++11 implementation of Socket.IO client -Build-Depends: boost, rapidjson, websocketpp diff --git a/ports/socket-io-client/fix-error-C3321.patch b/ports/socket-io-client/fix-error-C3321.patch new file mode 100644 index 00000000000000..6a36e9d979f87d --- /dev/null +++ b/ports/socket-io-client/fix-error-C3321.patch @@ -0,0 +1,13 @@ +diff --git a/src/internal/sio_client_impl.cpp b/src/internal/sio_client_impl.cpp +index f78aea4..6780e26 100644 +--- a/src/internal/sio_client_impl.cpp ++++ b/src/internal/sio_client_impl.cpp +@@ -286,7 +286,7 @@ namespace sio + if(ec || m_con.expired()) + { + if (ec != asio::error::operation_aborted) +- LOG("ping exit,con is expired?"<) - -if(INSTALL_HEADERS) - install(TARGETS SOIL - EXPORT SOILTargets - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) - - install(FILES src/SOIL.h - DESTINATION include/SOIL/) - - # Prepare and install package files - set(SOIL_VERSION "2018.7.7") - - export(TARGETS SOIL FILE "${PROJECT_BINARY_DIR}/SOILTargets.cmake") - - export(PACKAGE SOIL) - - # Create the SOILConfig.cmake and SOILConfigVersion files - configure_file(SOILConfig.cmake.in "${PROJECT_BINARY_DIR}/SOILConfig.cmake" @ONLY) - configure_file(SOILConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" @ONLY) - - # Install the SOILConfig.cmake and SOILConfigVersion.cmake - install(FILES - "${PROJECT_BINARY_DIR}/SOILConfig.cmake" - "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" - DESTINATION "${INSTALL_CMAKE_DIR}") - - # Install the export set for use with the install-tree - install(EXPORT SOILTargets DESTINATION - "${INSTALL_CMAKE_DIR}") -else() - install(TARGETS SOIL - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) -endif() diff --git a/ports/soil/CONTROL b/ports/soil/CONTROL deleted file mode 100644 index 4128570256a232..00000000000000 --- a/ports/soil/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: soil -Version: 2008.07.07-1 -Description: Simple OpenGL Image Library diff --git a/ports/soil/LICENSE b/ports/soil/LICENSE deleted file mode 100644 index 22f05fdf9ff1b5..00000000000000 --- a/ports/soil/LICENSE +++ /dev/null @@ -1,6 +0,0 @@ -https://www.lonesock.net/soil.html - -Simple OpenGL Image Library - -License: -Public Domain diff --git a/ports/soil/SOILConfig.cmake.in b/ports/soil/SOILConfig.cmake.in deleted file mode 100644 index 730e8879fb84af..00000000000000 --- a/ports/soil/SOILConfig.cmake.in +++ /dev/null @@ -1,13 +0,0 @@ -# - Config file for the SOIL package -# It defines the following variables -# SOIL_INCLUDE_DIRS - include directories for SOIL -# SOIL_LIBRARIES - libraries to link against - -# Load targets -get_filename_component(SOIL_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -include("${SOIL_CMAKE_DIR}/SOILTargets.cmake") - -# Set properties -get_target_property(SOIL_INCLUDE_DIRS SOIL INTERFACE_INCLUDE_DIRECTORIES) -set(SOIL_LIBRARIES SOIL) -mark_as_advanced(SOIL_INCLUDE_DIRS SOIL_LIBRARIES) diff --git a/ports/soil/fix-cmakelists.patch b/ports/soil/fix-cmakelists.patch new file mode 100644 index 00000000000000..406d45eea4881b --- /dev/null +++ b/ports/soil/fix-cmakelists.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c29d9bf..fc66b85 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,7 @@ + cmake_minimum_required(VERSION 2.6) + ++project(soil C) ++ + include_directories(inc) + + ADD_LIBRARY( soil STATIC +@@ -8,3 +10,31 @@ ADD_LIBRARY( soil STATIC + src/image_DXT.c + src/SOIL.c + ) ++ ++target_include_directories(soil INTERFACE $) ++ ++install(TARGETS soil ++ EXPORT soilTargets ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ ++install(FILES inc/SOIL/SOIL.h ++ DESTINATION include/SOIL) ++ ++# Prepare and install package files ++set(soil_VERSION "2021.4.22") ++ ++export(TARGETS soil FILE "${PROJECT_BINARY_DIR}/soilTargets.cmake") ++ ++export(PACKAGE soil) ++# Create the soilConfig.cmake and soilConfigVersion files ++configure_file(soilConfig.cmake.in "${PROJECT_BINARY_DIR}/soilConfig.cmake" @ONLY) ++configure_file(soilConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/soilConfigVersion.cmake" @ONLY) ++# Install the soilConfig.cmake and soilConfigVersion.cmake ++install(FILES ++ "${PROJECT_BINARY_DIR}/soilConfig.cmake" ++ "${PROJECT_BINARY_DIR}/soilConfigVersion.cmake" ++ DESTINATION "share/soil") ++# Install the export set for use with the install-tree ++install(EXPORT soilTargets DESTINATION ++ "share/soil") +\ No newline at end of file diff --git a/ports/soil/portfile.cmake b/ports/soil/portfile.cmake index 69073e22dfeefe..8c259bfb305b55 100644 --- a/ports/soil/portfile.cmake +++ b/ports/soil/portfile.cmake @@ -1,29 +1,28 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") -set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/Simple OpenGL Image Library") -vcpkg_download_distfile(ARCHIVE - URLS "http://www.lonesock.net/files/soil.zip" - FILENAME "soil-2008.07.07.zip" - SHA512 a575a84aa65b7556320779d635561341f5cf156418d0462473e5d1eb082829be3bcb30600b4887af75aeddd3715de16bdb3ca1668ebaa93eea62bacf22b79548 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO paralin/soil + REF 8bb18a909f94e58afbc0bda941ffc6eee58b4066 # committed on 2014-03-06 + SHA512 6cbaa10d8b2a274c389fda723db53a3f1ba7d25a7367df40efec4d0553c09f0d67fb16f927bba2ff0aed4234e3a83922edcc574ffac72dd7e05d6cec768b561b + HEAD_REF master + PATCHES fix-cmakelists.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) - file(COPY - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_LIST_DIR}/SOILConfig.cmake.in - ${CMAKE_CURRENT_LIST_DIR}/SOILConfigVersion.cmake.in - ${CMAKE_CURRENT_LIST_DIR}/LICENSE + ${CMAKE_CURRENT_LIST_DIR}/soilConfig.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/soilConfigVersion.cmake.in DESTINATION ${SOURCE_PATH} ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG -DINSTALL_HEADERS=OFF ) vcpkg_install_cmake() -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soil RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/soil/soilConfig.cmake.in b/ports/soil/soilConfig.cmake.in new file mode 100644 index 00000000000000..0c15a254c3a5fb --- /dev/null +++ b/ports/soil/soilConfig.cmake.in @@ -0,0 +1,13 @@ +# - Config file for the SOIL package +# It defines the following variables +# SOIL_INCLUDE_DIRS - include directories for SOIL +# SOIL_LIBRARIES - libraries to link against + +# Load targets +get_filename_component(SOIL_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +include("${SOIL_CMAKE_DIR}/soilTargets.cmake") + +# Set properties +get_target_property(SOIL_INCLUDE_DIRS soil INTERFACE_INCLUDE_DIRECTORIES) +set(SOIL_LIBRARIES soil) +mark_as_advanced(SOIL_INCLUDE_DIRS SOIL_LIBRARIES) diff --git a/ports/soil/SOILConfigVersion.cmake.in b/ports/soil/soilConfigVersion.cmake.in similarity index 100% rename from ports/soil/SOILConfigVersion.cmake.in rename to ports/soil/soilConfigVersion.cmake.in diff --git a/ports/soil/vcpkg.json b/ports/soil/vcpkg.json new file mode 100644 index 00000000000000..8920b977bbabe7 --- /dev/null +++ b/ports/soil/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "soil", + "version-date": "2021-04-22", + "description": "SOIL is a tiny C library used primarily for uploading textures into OpenGL.", + "homepage": "https://github.com/paralin/soil", + "supports": "!uwp" +} diff --git a/ports/soil2/CMakeLists.txt b/ports/soil2/CMakeLists.txt index 6b5368e47bb1ad..ca0b7ca6a0f53c 100644 --- a/ports/soil2/CMakeLists.txt +++ b/ports/soil2/CMakeLists.txt @@ -13,27 +13,27 @@ set(INSTALL_CMAKE_DIR share/soil2) # Set the source files to compile set(SOIL2_SRC - src/SOIL2/etc1_utils.c - src/SOIL2/image_DXT.c - src/SOIL2/image_helper.c - src/SOIL2/SOIL2.c -) - -# Set the soil2 headers -set(SOIL2_HEADERS - src/SOIL2/SOIL2.h - src/SOIL2/etc1_utils.h - src/SOIL2/image_DXT.h - src/SOIL2/image_helper.h - src/SOIL2/jo_jpeg.h - src/SOIL2/pkm_helper.h - src/SOIL2/pvr_helper.h - src/SOIL2/stb_image.h - src/SOIL2/stb_image_write.h - src/SOIL2/stbi_DDS.h - src/SOIL2/stbi_ext.h - src/SOIL2/stbi_pkm.h - src/SOIL2/stbi_pvr.h + "src/SOIL2/image_DXT.c" + "src/SOIL2/image_DXT.h" + "src/SOIL2/image_helper.c" + "src/SOIL2/image_helper.h" + "src/SOIL2/jo_jpeg.h" + "src/SOIL2/pkm_helper.h" + "src/SOIL2/pvr_helper.h" + "src/SOIL2/SOIL2.c" + "src/SOIL2/SOIL2.h" + "src/SOIL2/stbi_DDS.h" + "src/SOIL2/stbi_DDS_c.h" + "src/SOIL2/stbi_ext.h" + "src/SOIL2/stbi_ext_c.h" + "src/SOIL2/stbi_pkm.h" + "src/SOIL2/stbi_pkm_c.h" + "src/SOIL2/stbi_pvr.h" + "src/SOIL2/stbi_pvr_c.h" + "src/SOIL2/stb_image.h" + "src/SOIL2/stb_image_write.h" + "src/SOIL2/wfETC.c" + "src/SOIL2/wfETC.h" ) # Add the library as a static linkage @@ -58,11 +58,7 @@ if(INSTALL_HEADERS) ) # Install the headers - install(FILES ${SOIL2_HEADERS} - DESTINATION include/SOIL2/) - - # Prepare for install package files - set(SOIL2_VERSION "release-1.11") + install(FILES "src/SOIL2/SOIL2.h" DESTINATION include/SOIL2/) # Export the stuff export(TARGETS soil2 FILE "${PROJECT_BINARY_DIR}/soil2Targets.cmake") @@ -70,12 +66,10 @@ if(INSTALL_HEADERS) # Create the soil2Config.cmake and soil2ConfigVersion.cmake configure_file(soil2Config.cmake.in "${PROJECT_BINARY_DIR}/soil2Config.cmake" @ONLY) - configure_file(soil2ConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/soil2ConfigVersion.cmake" @ONLY) # Install the soil2Config.cmake and soil2ConfigVersion.cmake install(FILES "${PROJECT_BINARY_DIR}/soil2Config.cmake" - "${PROJECT_BINARY_DIR}/soil2ConfigVersion.cmake" DESTINATION "${INSTALL_CMAKE_DIR}" ) diff --git a/ports/soil2/CONTROL b/ports/soil2/CONTROL deleted file mode 100644 index c53cb77a507cdb..00000000000000 --- a/ports/soil2/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: soil2 -Version: release-1.11 -Description: Simple OpenGL Image Library 2 \ No newline at end of file diff --git a/ports/soil2/portfile.cmake b/ports/soil2/portfile.cmake index d54dcd7fc9e6ba..24f40a144d906b 100644 --- a/ports/soil2/portfile.cmake +++ b/ports/soil2/portfile.cmake @@ -1,33 +1,26 @@ -include(vcpkg_common_functions) - -# Download the release-1.11 from bitbucket -vcpkg_from_bitbucket( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SpartanJ/soil2 - REF release-1.11 - SHA512 203c2306fd72e24b9e990cb054f3b1b0391eaf26ed645842fb381971673dab8ea20c2739c8dff1fc11c83d6f66add0ad77ae79d8ff68930e3e1cb003e34f2414 + REF 51023d551d895fb4beb576d726d798ccfe358d34 + SHA512 5ce8b3f04eea674cdef7ee58778e81bcefa5df7afb1013ad28dcd2d502e26915529da8bf06b751b8c350165172866e4f99d4b1081bb6c7ba04ac83a78faba83c HEAD_REF master ) -# Copy the CMakeLists and LICENSE file( COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/soil2Config.cmake.in - ${CMAKE_CURRENT_LIST_DIR}/soil2ConfigVersion.cmake.in DESTINATION ${SOURCE_PATH} ) -# Configure the cmake file (we imported) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG -DINSTALL_HEADERS=OFF ) -# Run the install vcpkg_install_cmake() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soil2 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/soil2/soil2ConfigVersion.cmake.in b/ports/soil2/soil2ConfigVersion.cmake.in deleted file mode 100644 index a6ae96f3205821..00000000000000 --- a/ports/soil2/soil2ConfigVersion.cmake.in +++ /dev/null @@ -1,11 +0,0 @@ -set(PACKAGE_VERSION "@SOIL2_VERSION@") - -# Check whether the requested PACKAGE_FIND_VERSION is compatible -if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() diff --git a/ports/soil2/vcpkg.json b/ports/soil2/vcpkg.json new file mode 100644 index 00000000000000..4fe08daa32341a --- /dev/null +++ b/ports/soil2/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "soil2", + "version-date": "2021-05-01", + "description": "Simple OpenGL Image Library 2", + "homepage": "https://github.com/SpartanJ/SOIL2" +} diff --git a/ports/sokol/portfile.cmake b/ports/sokol/portfile.cmake new file mode 100644 index 00000000000000..9785eecca73c27 --- /dev/null +++ b/ports/sokol/portfile.cmake @@ -0,0 +1,18 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO floooh/sokol + REF 425e906d2af8c976c30f7e925a303fea9f0bf879 + SHA512 4606735b9466637f3b676402cc2d7ef96e4152836c901d7a84039c52951aec27922726de21a537e0fef2d2218f48e3a9a3c32c3bc67076c10d199f067f50dad9 + HEAD_REF master +) + +file(GLOB SOKOL_INCLUDE_FILES ${SOURCE_PATH}/*.h) +file(COPY ${SOKOL_INCLUDE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(GLOB SOKOL_UTIL_INCLUDE_FILES ${SOURCE_PATH}/util/*.h) +file(COPY ${SOKOL_UTIL_INCLUDE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/util) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/sokol/vcpkg.json b/ports/sokol/vcpkg.json new file mode 100644 index 00000000000000..375455b943865e --- /dev/null +++ b/ports/sokol/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "sokol", + "version-string": "2019-09-09", + "port-version": 1, + "description": "Minimal cross-platform standalone C headers", + "homepage": "https://github.com/floooh/sokol" +} diff --git a/ports/sol2/CONTROL b/ports/sol2/CONTROL deleted file mode 100644 index a43b1c7b45b458..00000000000000 --- a/ports/sol2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sol2 -Version: 3.0.2 -Homepage: https://github.com/ThePhD/sol2 -Description: Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great -Build-Depends: lua (windows) \ No newline at end of file diff --git a/ports/sol2/fix-namespace.patch b/ports/sol2/fix-namespace.patch new file mode 100644 index 00000000000000..bcce158dbf7077 --- /dev/null +++ b/ports/sol2/fix-namespace.patch @@ -0,0 +1,19 @@ +diff --git a/cmake/sol2-config.cmake.in b/cmake/sol2-config.cmake.in +index 70c448d..7965bc6 100644 +--- a/cmake/sol2-config.cmake.in ++++ b/cmake/sol2-config.cmake.in +@@ -26,11 +26,11 @@ include("${CMAKE_CURRENT_LIST_DIR}/sol2-targets.cmake") + + MESSAGE(STATUS ${CMAKE_CURRENT_LIST_DIR}) + +-if (TARGET sol2) ++if (TARGET sol2::sol2) + get_target_property(SOL2_INCLUDE_DIRS +- sol2 INTERFACE_INCLUDE_DIRECTORIES) ++ sol2::sol2 INTERFACE_INCLUDE_DIRECTORIES) + set_and_check(SOL2_INCLUDE_DIRS "${SOL2_INCLUDE_DIRS}") +- set(SOL2_LIBRARIES sol2) ++ set(SOL2_LIBRARIES sol2::sol2) + endif() + + if(TARGET sol2_single) diff --git a/ports/sol2/portfile.cmake b/ports/sol2/portfile.cmake index a055d18b12c961..cf20001db68d22 100644 --- a/ports/sol2/portfile.cmake +++ b/ports/sol2/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ThePhD/sol2 - REF 57990845726e17fba11a39cfcb1fc0127a7ea638 - SHA512 3894610a08f7a47c43fc14e2abe750fc41ce7ea90106a6f0290d1ae2bbcc829d340f2c211426686c061a42a77effec1f1c898f19153e9f904e5fab416c7b6399 + REF v3.2.2 + SHA512 e5a739b37aea7150f141f6a003c2689dd33155feed5bb3cf2569abbfe9f0062eacdaaf346be523d627f0e491b35e68822c80e1117fa09ece8c9d8d5af09fdbec HEAD_REF develop + PATCHES fix-namespace.patch ) vcpkg_configure_cmake( @@ -16,7 +15,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sol2) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file( + REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/include +) + +file(INSTALL ${SOURCE_PATH}/single/include/sol DESTINATION ${CURRENT_PACKAGES_DIR}/include/) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sol2 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sol2/vcpkg.json b/ports/sol2/vcpkg.json new file mode 100644 index 00000000000000..22de87e461a3fa --- /dev/null +++ b/ports/sol2/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "sol2", + "version-string": "3.2.2", + "port-version": 1, + "description": "Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great", + "homepage": "https://github.com/ThePhD/sol2", + "dependencies": [ + { + "name": "lua", + "platform": "windows" + } + ] +} diff --git a/ports/solid3/CONTROL b/ports/solid3/CONTROL deleted file mode 100644 index 7dce173ee840e7..00000000000000 --- a/ports/solid3/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: solid3 -Version: 3.5.8 -Description: Software Library for Interference Detection diff --git a/ports/solid3/portfile.cmake b/ports/solid3/portfile.cmake index dc61a5654e55b3..8cca23adac6e47 100644 --- a/ports/solid3/portfile.cmake +++ b/ports/solid3/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO dtecta/solid3 diff --git a/ports/solid3/vcpkg.json b/ports/solid3/vcpkg.json new file mode 100644 index 00000000000000..d8493859d87195 --- /dev/null +++ b/ports/solid3/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "solid3", + "version-string": "3.5.8", + "port-version": 1, + "description": "Software Library for Interference Detection" +} diff --git a/ports/sophus/CONTROL b/ports/sophus/CONTROL deleted file mode 100644 index d3c81de7744a9c..00000000000000 --- a/ports/sophus/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sophus -Version: 1.0.0-6 -Build-Depends: eigen3, ceres, suitesparse -Homepage: https://github.com/strasdat/Sophus -Description: Lie group library for C++ diff --git a/ports/sophus/disable-werror.patch b/ports/sophus/disable-werror.patch new file mode 100644 index 00000000000000..60bfa7d5bab48c --- /dev/null +++ b/ports/sophus/disable-werror.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 844f304..952915b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,11 +16,11 @@ set(CMAKE_CXX_STANDARD 14) + IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") + SET(CMAKE_CXX_FLAGS_RELEASE "-O3") +- SET(CMAKE_CXX_FLAGS "-Wall -Werror -Wextra -Wno-deprecated-register -std=c++14 -stdlib=libc++ -Wno-deprecated-register") ++ SET(CMAKE_CXX_FLAGS "-std=c++14 -stdlib=libc++") + ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") + SET(CMAKE_CXX_FLAGS_RELEASE "-O3") +- SET(CMAKE_CXX_FLAGS "-Wall -Werror -Wextra -std=c++14 -Wno-deprecated-declarations -ftemplate-backtrace-limit=0") ++ SET(CMAKE_CXX_FLAGS "-std=c++14 -ftemplate-backtrace-limit=0") + SET(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} --coverage -fno-inline -fno-inline-small-functions -fno-default-inline") + SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS_DEBUG} --coverage") + SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} --coverage") diff --git a/ports/sophus/portfile.cmake b/ports/sophus/portfile.cmake index c7480b904a5f50..a906401262388e 100644 --- a/ports/sophus/portfile.cmake +++ b/ports/sophus/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO strasdat/Sophus @@ -8,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES fix_cmakelists.patch + disable-werror.patch ) vcpkg_configure_cmake( @@ -22,4 +21,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/sophus/vcpkg.json b/ports/sophus/vcpkg.json new file mode 100644 index 00000000000000..ef8001d5eca167 --- /dev/null +++ b/ports/sophus/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "sophus", + "version": "1.0.0", + "port-version": 7, + "description": "Lie group library for C++", + "homepage": "https://github.com/strasdat/Sophus", + "dependencies": [ + "ceres", + "eigen3", + "suitesparse" + ] +} diff --git a/ports/soqt/disable-cpackd.patch b/ports/soqt/disable-cpackd.patch new file mode 100644 index 00000000000000..1450b2de3ec837 --- /dev/null +++ b/ports/soqt/disable-cpackd.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 802e512c..21cc23a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -393,4 +393,4 @@ add_subdirectory(test-code) + + ############################################################################ + # New CPACK section, please see the README file inside cpack.d directory. +-add_subdirectory(cpack.d) ++#add_subdirectory(cpack.d) diff --git a/ports/soqt/disable-test-code.patch b/ports/soqt/disable-test-code.patch new file mode 100644 index 00000000000000..3e1216a92eec4e --- /dev/null +++ b/ports/soqt/disable-test-code.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4b0815f2..236ffa8d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -390,7 +390,7 @@ set(PACKAGE_REQUIREMENTS "Coin, ${PACKAGE_ADDITIONAL_REQUIREMENTS}") + add_subdirectory(data) + add_subdirectory(src) + ##### small test programs (to be run interactively) +-add_subdirectory(test-code) ++#add_subdirectory(test-code) + + ############################################################################ + # New CPACK section, please see the README file inside cpack.d directory. diff --git a/ports/soqt/portfile.cmake b/ports/soqt/portfile.cmake new file mode 100644 index 00000000000000..73176be95d418c --- /dev/null +++ b/ports/soqt/portfile.cmake @@ -0,0 +1,63 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Coin3D/soqt + REF SoQt-1.6.0 + SHA512 204d49769dda1a9833093ff78bdb788df0c514e800ae0bc35d4ef832ece304c7c26fc7d893ee83db95c34d9457e27e04c74301bcd2029aa3a0f96ec2ecbb3984 + HEAD_REF master + PATCHES + disable-cpackd.patch + disable-test-code.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOANYDATA_SOURCE_PATH + REPO coin3d/soanydata + REF 3ff6e9203fbb0cc08a2bdf209212b7ef4d78a1f2 + SHA512 9e176feda43a12ccdf8756f7329517936357499771a7d0a58357d343bdea125c34f8734ff1cd16cda3eeee58090dc1680999849c50132c30940a23d3f81a5c66 + HEAD_REF master +) + +if(NOT EXISTS "${SOURCE_PATH}/data") + file(RENAME "${SOANYDATA_SOURCE_PATH}" "${SOURCE_PATH}/data") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOGUI_SOURCE_PATH + REPO coin3d/sogui + REF fb79af47cff89f0f3657501601a7ea5c11968b17 + SHA512 bcf4d2e04c3b6ac87a6425d90c6077ec655732bcc0f99bf181ff2dfce8d356509f52d71b884660fafddc135551ee8fbb139e02b6706d2a01be006193918d232b + HEAD_REF master +) + +if(NOT EXISTS ${SOURCE_PATH}/src/Inventor/Qt/common) + file(RENAME "${SOGUI_SOURCE_PATH}" "${SOURCE_PATH}/src/Inventor/Qt/common") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(SOQT_BUILD_SHARED_LIBS OFF) +else() + set(SOQT_BUILD_SHARED_LIBS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSOQT_BUILD_DOCUMENTATION=OFF + -DSOQT_BUILD_SHARED_LIBS=${SOQT_BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SoQt-1.6.0) + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/soqt/vcpkg.json b/ports/soqt/vcpkg.json new file mode 100644 index 00000000000000..6a336879d131ae --- /dev/null +++ b/ports/soqt/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "soqt", + "version-string": "1.6.0", + "port-version": 3, + "description": "A Qt Gui-toolkit binding for Coin", + "homepage": "https://github.com/coin3d/soqt", + "supports": "!(arm | arm64 | uwp)", + "dependencies": [ + "coin", + { + "name": "qt5-base", + "default-features": false + } + ] +} diff --git a/ports/sord/CMakeLists.txt b/ports/sord/CMakeLists.txt new file mode 100644 index 00000000000000..be83dc278c2be7 --- /dev/null +++ b/ports/sord/CMakeLists.txt @@ -0,0 +1,55 @@ +cmake_minimum_required(VERSION 3.17) +project(sord C) + +find_package(serd CONFIG REQUIRED) + +add_library(sord + src/sord.c + src/syntax.c +) + +file(WRITE "${CMAKE_BINARY_DIR}/sord_config.h" "") + +target_include_directories(sord + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}" +) + +target_link_libraries(sord PUBLIC serd::serd) + +set_target_properties(sord PROPERTIES + C_STANDARD 99 + C_STANDARD_REQUIRED ON +) + +target_compile_definitions(sord PRIVATE SORD_INTERNAL _CRT_SECURE_NO_WARNINGS) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(sord PUBLIC SORD_SHARED) +endif() + +install( + TARGETS sord + EXPORT sord-targets + INCLUDES DESTINATION include +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY sord DESTINATION include) +endif() + +install( + EXPORT sord-targets + NAMESPACE sord:: + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sord" +) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sord-config.cmake" [[ +include(CMakeFindDependencyMacro) +find_dependency(serd CONFIG) +include("${CMAKE_CURRENT_LIST_DIR}/sord-targets.cmake") +]]) + +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/sord-config.cmake" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sord" +) diff --git a/ports/sord/portfile.cmake b/ports/sord/portfile.cmake new file mode 100644 index 00000000000000..6725863d563edd --- /dev/null +++ b/ports/sord/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO drobilla/sord + REF v0.16.4 + SHA512 cad8f8fd07afb5075938fce247d95f9d666f61f4d913ff0c3fde335384177de066a5c0f2620c76e098178aeded0412b3e76ef63a1ae65aba7eb99e3e8ce15896 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/sord/vcpkg.json b/ports/sord/vcpkg.json new file mode 100644 index 00000000000000..51dacf79380e1f --- /dev/null +++ b/ports/sord/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "sord", + "version-string": "0.16.4", + "description": "Sord is a lightweight C library for storing RDF statements in memory.", + "homepage": "https://drobilla.net/software/sord", + "license": "ISC", + "dependencies": [ + "serd" + ] +} diff --git a/ports/soundtouch/CMakeLists.txt b/ports/soundtouch/CMakeLists.txt index a15daefe41e30d..075c8ee2dd5258 100644 --- a/ports/soundtouch/CMakeLists.txt +++ b/ports/soundtouch/CMakeLists.txt @@ -13,15 +13,18 @@ else() set(TYPE_SUFFIX $<$:D>) endif() -file(GLOB SOUNDTOUCH_SOURCES source/SoundTouch/*.cpp) +configure_file("${CMAKE_CURRENT_LIST_DIR}/include/soundtouch_config.h.in" ${CMAKE_CURRENT_BINARY_DIR}/include/soundtouch_config.h) + +file(GLOB SOUNDTOUCH_SOURCES "${CMAKE_CURRENT_LIST_DIR}/source/SoundTouch/*.cpp") add_library(libsoundtouch ${SOUNDTOUCH_SOURCES}) -target_include_directories(libsoundtouch PUBLIC include) +target_include_directories(libsoundtouch PUBLIC "${CMAKE_CURRENT_LIST_DIR}/include") +target_include_directories(libsoundtouch PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/include") set_target_properties(libsoundtouch PROPERTIES OUTPUT_NAME SoundTouch${TYPE_SUFFIX}${ARCH_SUFFIX}) -if(BUILD_SHARED_LIBS) +if(WIN32 AND BUILD_SHARED_LIBS) target_compile_definitions(libsoundtouch PRIVATE -DDLL_EXPORTS) target_sources(libsoundtouch PRIVATE - source/SoundTouchDLL/SoundTouchDLL.cpp - source/SoundTouchDLL/SoundTouchDLL.rc + "${CMAKE_CURRENT_LIST_DIR}/source/SoundTouchDLL/SoundTouchDLL.cpp" + "${CMAKE_CURRENT_LIST_DIR}/source/SoundTouchDLL/SoundTouchDLL.rc" ) endif() diff --git a/ports/soundtouch/CONTROL b/ports/soundtouch/CONTROL deleted file mode 100644 index f14e579b372e9c..00000000000000 --- a/ports/soundtouch/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: soundtouch -Version: 2.0.0-3 -Homepage: https://www.surina.net/soundtouch -Description: SoundTouch is an open-source audio processing library for changing the Tempo, Pitch and Playback Rates of audio streams or audio files. -Build-Depends: atlmfc (windows) diff --git a/ports/soundtouch/portfile.cmake b/ports/soundtouch/portfile.cmake index c9fbd3623591d5..12cc0b08468923 100644 --- a/ports/soundtouch/portfile.cmake +++ b/ports/soundtouch/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") @@ -7,14 +5,17 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() set(VERSION 2.0.0) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/soundtouch) vcpkg_download_distfile(ARCHIVE URLS "https://www.surina.net/soundtouch/soundtouch-${VERSION}.zip" FILENAME "soundtouch-${VERSION}.zip" SHA512 50ef36b6cd21c16e235b908c5518e29b159b11f658a014c47fe767d3d8acebaefefec0ce253b4ed322cbd26387c69c0ed464ddace0c098e61d56d55c198117a5 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -27,5 +28,4 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/source/SoundTouchDLL/SoundTouchDLL.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/COPYING.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/soundtouch) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/soundtouch/COPYING.TXT ${CURRENT_PACKAGES_DIR}/share/soundtouch/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/soundtouch/vcpkg.json b/ports/soundtouch/vcpkg.json new file mode 100644 index 00000000000000..f2d7f64aa5a4c2 --- /dev/null +++ b/ports/soundtouch/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "soundtouch", + "version-string": "2.0.0", + "port-version": 7, + "description": "SoundTouch is an open-source audio processing library for changing the Tempo, Pitch and Playback Rates of audio streams or audio files.", + "homepage": "https://www.surina.net/soundtouch", + "supports": "!uwp", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + } + ] +} diff --git a/ports/soxr/CONTROL b/ports/soxr/CONTROL deleted file mode 100644 index ebf120c060ccaf..00000000000000 --- a/ports/soxr/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: soxr -Version: 0.1.3. -Description: High quality audio resampling diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index 3a2e23c3000fb0..193eaecd484b85 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -1,14 +1,8 @@ -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "https://netcologne.dl.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz" - FILENAME "soxr-0.1.3-Source.tar.xz" - SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8 -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO soxr + FILENAME "soxr-0.1.3-Source.tar.xz" + SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8 PATCHES 001_initialize-resampler.patch 002_disable_warning.patch @@ -31,3 +25,5 @@ file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/so file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) diff --git a/ports/soxr/vcpkg.json b/ports/soxr/vcpkg.json new file mode 100644 index 00000000000000..acf2fc35ccc42b --- /dev/null +++ b/ports/soxr/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "soxr", + "version-string": "0.1.3", + "port-version": 4, + "description": "High quality audio resampling", + "homepage": "https://sourceforge.net/projects/soxr/" +} diff --git a/ports/spaceland/CONTROL b/ports/spaceland/CONTROL deleted file mode 100644 index 97b5a9156e7cd2..00000000000000 --- a/ports/spaceland/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: spaceland -Version: 7.8.2-3 -Description: Spaceland Lib (sl) is a suite for geometric computation, specifically adapted to OpenGL. -Build-Depends: zlib diff --git a/ports/spaceland/portfile.cmake b/ports/spaceland/portfile.cmake index def38d6d154ab0..2897f7367887a0 100644 --- a/ports/spaceland/portfile.cmake +++ b/ports/spaceland/portfile.cmake @@ -1,16 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sl-7.8.2-Source) - vcpkg_download_distfile(ARCHIVE URLS "http://vic.crs4.it/vic/download/pkgs/sl-7.8.2-Source.tar.gz" FILENAME "sl-7.8.2-Source.tar.gz" SHA512 1391dac1474ddb47d0cf0eb7baeb7db68d6356c2116f732dd57b8a050739523282ded0643cc466640f2b22f25dd6bfced00ede4e041b7ff83754a99ae6725d7d ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -27,10 +26,4 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle license -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/spaceland) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/spaceland/COPYING ${CURRENT_PACKAGES_DIR}/share/spaceland/license) - -# Handle copyright -file(COPY ${SOURCE_PATH}/copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/spaceland) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/spaceland/copyright.txt ${CURRENT_PACKAGES_DIR}/share/spaceland/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/spaceland/vcpkg.json b/ports/spaceland/vcpkg.json new file mode 100644 index 00000000000000..ddcdb9fde1c7e4 --- /dev/null +++ b/ports/spaceland/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "spaceland", + "version-string": "7.8.2", + "port-version": 5, + "description": "Spaceland Lib (sl) is a suite for geometric computation, specifically adapted to OpenGL.", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/span-lite/CONTROL b/ports/span-lite/CONTROL deleted file mode 100644 index e7001a83ac27b5..00000000000000 --- a/ports/span-lite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: span-lite -Version: 0.5.0 -Description: A C++20-like span for C++98, C++11 and later in a single-file header-only library diff --git a/ports/span-lite/portfile.cmake b/ports/span-lite/portfile.cmake index ad53591bdc1954..fd34b69ca06bd1 100644 --- a/ports/span-lite/portfile.cmake +++ b/ports/span-lite/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/span-lite - REF v0.5.0 - SHA512 4221d9897736257077b8ff6a5246d70315bebb975a30a119778f22c1859d14cca5e3035447561ca9684bef6dbca5a00b3b5ca208dada4fcf1f3b31df2aa0cb1f + REF v0.9.0 + SHA512 e7d8a5f2e85b4aa7dc148c5a17898729bafa6124affacf66280eaa74c6aad5a4c9a9231e664f95392aa4edb784eaf3e2e3e03d34914c90565b9026744d7f7276 ) vcpkg_configure_cmake( diff --git a/ports/span-lite/vcpkg.json b/ports/span-lite/vcpkg.json new file mode 100644 index 00000000000000..1227b0a5d05fd2 --- /dev/null +++ b/ports/span-lite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "span-lite", + "version-string": "0.9.0", + "description": "A C++20-like span for C++98, C++11 and later in a single-file header-only library", + "homepage": "https://github.com/martinmoene/span-lite" +} diff --git a/ports/sparsehash/00001-windows-use-std.patch b/ports/sparsehash/00001-windows-use-std.patch new file mode 100644 index 00000000000000..69d1966f895103 --- /dev/null +++ b/ports/sparsehash/00001-windows-use-std.patch @@ -0,0 +1,17 @@ +diff --git a/src/windows/sparsehash/internal/sparseconfig.h b/src/windows/sparsehash/internal/sparseconfig.h +index 3091559..f96e08c 100644 +--- a/src/windows/sparsehash/internal/sparseconfig.h ++++ b/src/windows/sparsehash/internal/sparseconfig.h +@@ -7,10 +7,10 @@ + #define GOOGLE_NAMESPACE ::google + + /* the location of the header defining hash functions */ +-#define HASH_FUN_H ++#define HASH_FUN_H + + /* the namespace of the hash<> function */ +-#define HASH_NAMESPACE stdext ++#define HASH_NAMESPACE std + + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H diff --git a/ports/sparsehash/Config.cmake.in b/ports/sparsehash/Config.cmake.in new file mode 100644 index 00000000000000..07739ddb675260 --- /dev/null +++ b/ports/sparsehash/Config.cmake.in @@ -0,0 +1,10 @@ + +get_filename_component(_sparsehash_root "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_sparsehash_root "${_sparsehash_root}" PATH) +get_filename_component(_sparsehash_root "${_sparsehash_root}" PATH) + +add_library(sparsehash::sparsehash INTERFACE IMPORTED) +set_target_properties(sparsehash::sparsehash + PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_sparsehash_root}/include") + +unset(_sparsehash_root) diff --git a/ports/sparsehash/portfile.cmake b/ports/sparsehash/portfile.cmake new file mode 100644 index 00000000000000..a999e88412ef91 --- /dev/null +++ b/ports/sparsehash/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sparsehash/sparsehash + REF sparsehash-2.0.3 + SHA512 bb00d0acb8eba65f7da8015ea4f6bebf8bba36ed6777881960ee215f22b7be17b069c59838d210551ce67a34baccfc7b2fed603677ec53c0c32714d8e76f5d6c + HEAD_REF master + PATCHES 00001-windows-use-std.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + + file(COPY ${SOURCE_PATH}/src/google DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${SOURCE_PATH}/src/sparsehash DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${SOURCE_PATH}/src/windows/sparsehash/internal/sparseconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/sparsehash/internal) + +else() + + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure ${OPTIONS} --prefix=${CURRENT_PACKAGES_DIR} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME configure-${TARGET_TRIPLET} + ) + + vcpkg_execute_required_process( + COMMAND make -j ${VCPKG_CONCURRENCY} install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME install-${TARGET_TRIPLET} + ) + +endif() + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in + ${CURRENT_PACKAGES_DIR}/share/sparsehash/sparsehash-config.cmake + @ONLY +) + +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/sparsehash/copyright COPYONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/sparsehash) diff --git a/ports/sparsehash/usage b/ports/sparsehash/usage new file mode 100644 index 00000000000000..5222b2402695c4 --- /dev/null +++ b/ports/sparsehash/usage @@ -0,0 +1,4 @@ +The package sparsehash provides CMake targets: + + find_package(sparsehash CONFIG REQUIRED) + target_link_libraries(main PRIVATE sparsehash::sparsehash) diff --git a/ports/sparsehash/vcpkg.json b/ports/sparsehash/vcpkg.json new file mode 100644 index 00000000000000..697aa7b6461fe2 --- /dev/null +++ b/ports/sparsehash/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "sparsehash", + "version-string": "2.0.3", + "port-version": 1, + "description": "The sparsehash package consists of two hashtable implementations: sparse, which is designed to be very space efficient, and dense, which is designed to be very time efficient.", + "homepage": "https://github.com/sparsehash/sparsehash" +} diff --git a/ports/sparsepp/CONTROL b/ports/sparsepp/CONTROL deleted file mode 100644 index 86550179ac40b3..00000000000000 --- a/ports/sparsepp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: sparsepp -Version: 1.22-1 -Description: A fast, memory efficient hash map for C++ diff --git a/ports/sparsepp/portfile.cmake b/ports/sparsepp/portfile.cmake index a98e1a6e676923..c326c214c96f59 100644 --- a/ports/sparsepp/portfile.cmake +++ b/ports/sparsepp/portfile.cmake @@ -1,6 +1,4 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/sparsepp/vcpkg.json b/ports/sparsepp/vcpkg.json new file mode 100644 index 00000000000000..9dda35239aa42e --- /dev/null +++ b/ports/sparsepp/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "sparsepp", + "version-string": "1.22", + "port-version": 2, + "description": "A fast, memory efficient hash map for C++" +} diff --git a/ports/spatialite-tools/CONTROL b/ports/spatialite-tools/CONTROL deleted file mode 100644 index 3ba32121c129b0..00000000000000 --- a/ports/spatialite-tools/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: spatialite-tools -Version: 4.3.0-1 -Homepage: https://www.gaia-gis.it/fossil/spatialite-tools/index -Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries) -Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat diff --git a/ports/spatialite-tools/fix-linux-configure.patch b/ports/spatialite-tools/fix-linux-configure.patch new file mode 100644 index 00000000000000..b31544b77cf23e --- /dev/null +++ b/ports/spatialite-tools/fix-linux-configure.patch @@ -0,0 +1,35 @@ +diff --git a/configure.ac b/configure.ac +index ff15f2922..c254b3619 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -142,6 +142,7 @@ fi + AC_ARG_WITH([geosconfig], + [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], + [GEOSCONFIG="$withval"], [GEOSCONFIG=""]) ++if 0; then + if test "x$GEOSCONFIG" = "x"; then + # GEOSCONFIG was not specified, so search within the current path + AC_PATH_PROG([GEOSCONFIG], [geos-config]) +@@ -164,6 +165,7 @@ fi + # Extract the linker and include flags + GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` + GEOS_CPPFLAGS=-I`$GEOSCONFIG --includes` ++fi + AC_SUBST([GEOS_LDFLAGS]) + AC_SUBST([GEOS_CPPFLAGS]) + # Ensure that we can parse geos_c.h +@@ -172,11 +174,14 @@ CPPFLAGS="$GEOS_CPPFLAGS" + AC_CHECK_HEADERS([geos_c.h],, [AC_MSG_ERROR([could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig])]) + CPPFLAGS="$CPPFLAGS_SAVE" + # Ensure we can link against libgeos_c ++if 0; then + LIBS_SAVE="$LIBS" + LIBS="$GEOS_LDFLAGS" + AC_SEARCH_LIBS(GEOSTopologyPreserveSimplify,geos_c,,AC_MSG_ERROR([could not find libgeos_c - you may need to specify the directory of a geos-config file using --with-geosconfig])) + LIBS="$LIBS_SAVE" + LIBS=$LIBS$GEOS_LDFLAGS' -lgeos_c' ++fi ++LIBS="$LIBS $GEOS_LDFLAGS" + + PKG_CHECK_MODULES([LIBSPATIALITE], [spatialite], , AC_MSG_ERROR(['libspatialite' is required but it doesn't seem to be installed on this system.])) + AC_SUBST(LIBSPATIALITE_CFLAGS) diff --git a/ports/spatialite-tools/fix-makefiles.patch b/ports/spatialite-tools/fix-makefiles.patch index ff6e0ad0de1c3b..3acc32b748bcc5 100644 --- a/ports/spatialite-tools/fix-makefiles.patch +++ b/ports/spatialite-tools/fix-makefiles.patch @@ -1,18 +1,18 @@ diff --git a/makefile.vc b/makefile.vc -index 33c85d2..c811e7d 100644 +index 53ef75197..d48fb02db 100644 --- a/makefile.vc +++ b/makefile.vc -@@ -15,7 +15,7 @@ SPATIALITE_OSM_RAW_EXE = spatialite_osm_raw.exe +@@ -16,7 +16,7 @@ SPATIALITE_OSM_RAW_EXE = spatialite_osm_raw.exe SPATIALITE_OSM_FILTER_EXE = spatialite_osm_filter.exe SPATIALITE_GML_EXE = spatialite_gml.exe -CFLAGS = /nologo -IC:\OSGeo4W\include $(OPTFLAGS) -+CFLAGS = /nologo -I$(INSTALLED_ROOT)\include $(OPTFLAGS) ++CFLAGS = /nologo $(OPTFLAGS) default: all -@@ -26,89 +26,58 @@ all: $(SPATIALITE_EXE) $(SHP_DOCTOR_EXE) $(SPATIALITE_TOOL_EXE) \ - $(SPATIALITE_OSM_FILTER_EXE) +@@ -27,96 +27,63 @@ all: $(SPATIALITE_EXE) $(SHP_DOCTOR_EXE) $(SPATIALITE_TOOL_EXE) \ + $(SPATIALITE_OSM_FILTER_EXE) $(SHP_SANITIZE_EXE) $(SPATIALITE_EXE): shell.obj - cl shell.obj C:\OSGeo4W\lib\proj_i.lib \ @@ -27,7 +27,7 @@ index 33c85d2..c811e7d 100644 - cl exif_loader.obj C:\OSGeo4W\lib\proj_i.lib \ - C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ - C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib -+ cl exif_loader.obj $(LIBS_ALL) ++ cl exif_loader.obj $(LIBS_ALL) if exist $(EXIF_LOADER_EXE).manifest mt -manifest \ $(EXIF_LOADER_EXE).manifest -outputresource:$(EXIF_LOADER_EXE);1 @@ -35,15 +35,23 @@ index 33c85d2..c811e7d 100644 - cl shp_doctor.obj C:\OSGeo4W\lib\proj_i.lib \ - C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ - C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib -+ cl shp_doctor.obj $(LIBS_ALL) ++ cl shp_doctor.obj $(LIBS_ALL) if exist $(SHP_DOCTOR_EXE).manifest mt -manifest \ $(SHP_DOCTOR_EXE).manifest -outputresource:$(SHP_DOCTOR_EXE);1 + $(SHP_SANITIZE_EXE): shp_sanitize.obj +- cl shp_sanitize.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl shp_sanitize.obj $(LIBS_ALL) + if exist $(SHP_SANITIZE_EXE).manifest mt -manifest \ + $(SHP_SANITIZE_EXE).manifest -outputresource:$(SHP_SANITIZE_EXE);1 + $(SPATIALITE_NETWORK_EXE): spatialite_network.obj - cl spatialite_network.obj C:\OSGeo4W\lib\proj_i.lib \ - C:\OSGeo4W\lib\iconv.lib \ - C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib -+ cl spatialite_network.obj $(LIBS_ALL) ++ cl spatialite_network.obj $(LIBS_ALL) if exist $(SPATIALITE_NETWORK_EXE).manifest mt -manifest \ $(SPATIALITE_TOOL_EXE).manifest \ -outputresource:$(SPATIALITE_TOOL_EXE);1 @@ -52,7 +60,7 @@ index 33c85d2..c811e7d 100644 - cl spatialite_tool.obj C:\OSGeo4W\lib\proj_i.lib \ - C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ - C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib -+ cl spatialite_tool.obj $(LIBS_ALL) ++ cl spatialite_tool.obj $(LIBS_ALL) if exist $(SPATIALITE_TOOL_EXE).manifest mt -manifest \ $(SPATIALITE_TOOL_EXE).manifest \ -outputresource:$(SPATIALITE_TOOL_EXE);1 @@ -64,7 +72,7 @@ index 33c85d2..c811e7d 100644 - C:\OSGeo4W\lib\libexpat.lib \ - C:\OSGeo4W\lib\zlib.lib \ - C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib -+ cl spatialite_osm_net.obj $(LIBS_ALL) ++ cl spatialite_osm_net.obj $(LIBS_ALL) if exist $(SPATIALITE_OSM_EXE).manifest mt -manifest \ $(SPATIALITE_OSM_EXE).manifest \ -outputresource:$(SPATIALITE_OSM_NET_EXE);1 @@ -76,7 +84,7 @@ index 33c85d2..c811e7d 100644 - C:\OSGeo4W\lib\libexpat.lib \ - C:\OSGeo4W\lib\zlib.lib \ - C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib -+ cl spatialite_osm_map.obj $(LIBS_ALL) ++ cl spatialite_osm_map.obj $(LIBS_ALL) if exist $(SPATIALITE_OSM_MAP_EXE).manifest mt -manifest \ $(SPATIALITE_OSM_MAP_EXE).manifest \ -outputresource:$(SPATIALITE_OSM_MAP_EXE);1 @@ -86,7 +94,7 @@ index 33c85d2..c811e7d 100644 - C:\OSGeo4W\lib\iconv.lib \ - C:\OSGeo4W\lib\libexpat.lib \ - C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib -+ cl spatialite_gml.obj $(LIBS_ALL) ++ cl spatialite_gml.obj $(LIBS_ALL) if exist $(SPATIALITE_GML_EXE).manifest mt -manifest \ $(SPATIALITE_GML_EXE).manifest \ -outputresource:$(SPATIALITE_GML_EXE);1 @@ -98,7 +106,7 @@ index 33c85d2..c811e7d 100644 - C:\OSGeo4W\lib\libexpat.lib \ - C:\OSGeo4W\lib\zlib.lib \ - C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib -+ cl spatialite_osm_raw.obj $(LIBS_ALL) ++ cl spatialite_osm_raw.obj $(LIBS_ALL) if exist $(SPATIALITE_OSM_RAW_EXE).manifest mt -manifest \ $(SPATIALITE_OSM_RAW_EXE).manifest \ -outputresource:$(SPATIALITE_OSM_RAW_EXE);1 @@ -107,12 +115,13 @@ index 33c85d2..c811e7d 100644 - cl spatialite_osm_filter.obj C:\OSGeo4W\lib\proj_i.lib \ - C:\OSGeo4W\lib\iconv.lib \ - C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib -+ cl spatialite_osm_filter.obj $(LIBS_ALL) ++ cl spatialite_osm_filter.obj $(LIBS_ALL) if exist $(SPATIALITE_OSM_FILTER_EXE).manifest mt -manifest \ $(SPATIALITE_OSM_FILTER_EXE).manifest \ -outputresource:$(SPATIALITE_OSM_FILTER_EXE);1 + diff --git a/nmake.opt b/nmake.opt -index 4f4a953..d9efecf 100644 +index 4f4a9538e..d9efecf7b 100644 --- a/nmake.opt +++ b/nmake.opt @@ -1,8 +1,8 @@ @@ -126,3 +135,55 @@ index 4f4a953..d9efecf 100644 /D_LARGE_FILE=1 /D_FILE_OFFSET_BITS=64 /D_LARGEFILE_SOURCE=1 #OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb +diff --git a/Makefile.am b/Makefile.am +index 75ac806..d680b74 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -39,7 +39,7 @@ bin_PROGRAMS = spatialite \ + spatialite_dem + endif + +-AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@ ++AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@ @RTTOPO_CFLAGS@ + AM_CPPFLAGS += -I$(top_srcdir) + + spatialite_SOURCES = shell.c +@@ -65,27 +65,27 @@ spatialite_osm_overpass_SOURCES = spatialite_osm_overpass.c + spatialite_dem_SOURCES = spatialite_dem.c + + spatialite_osm_map_LDADD = @LIBSPATIALITE_LIBS@ \ +- @LIBFREEXL_LIBS@ @LIBREADOSM_LIBS@ ++ @LIBFREEXL_LIBS@ @LIBREADOSM_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ + spatialite_osm_overpass_LDADD = @LIBSPATIALITE_LIBS@ \ +- @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ ++ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ + spatialite_osm_raw_LDADD = @LIBSPATIALITE_LIBS@ \ +- @LIBFREEXL_LIBS@ @LIBREADOSM_LIBS@ ++ @LIBFREEXL_LIBS@ @LIBREADOSM_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ + spatialite_osm_net_LDADD = @LIBSPATIALITE_LIBS@ \ +- @LIBFREEXL_LIBS@ @LIBREADOSM_LIBS@ ++ @LIBFREEXL_LIBS@ @LIBREADOSM_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ + spatialite_gml_LDADD = @LIBSPATIALITE_LIBS@ \ +- @LIBFREEXL_LIBS@ \ ++ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ \ + -lexpat +-spatialite_dem_LDADD = @LIBSPATIALITE_LIBS@ ++spatialite_dem_LDADD = @LIBSPATIALITE_LIBS@ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ + spatialite_LDADD = @LIBSPATIALITE_LIBS@ \ + @LIBFREEXL_LIBS@ \ +- @READLINE_LIBS@ ++ @READLINE_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ + spatialite_xml_validator_LDADD = @LIBXML2_LIBS@ +-spatialite_xml_load_LDADD = @LIBSPATIALITE_LIBS@ \ ++spatialite_xml_load_LDADD = @LIBSPATIALITE_LIBS@ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@\ + -lexpat +-spatialite_xml_collapse_LDADD = @LIBSPATIALITE_LIBS@ +-spatialite_xml_print_LADD = @LIBSPATIALIATE_LIBS@ ++spatialite_xml_collapse_LDADD = @LIBSPATIALITE_LIBS@ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ ++spatialite_xml_print_LADD = @LIBSPATIALITE_LIBS@ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ + LDADD = @LIBSPATIALITE_LIBS@ \ +- @LIBFREEXL_LIBS@ ++ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ @RTTOPO_LIBS@ + + EXTRA_DIST = makefile.vc nmake.opt makefile64.vc nmake64.opt \ + config-msvc.h \ diff --git a/ports/spatialite-tools/portfile.cmake b/ports/spatialite-tools/portfile.cmake index 25de070ee58d4c..b72e802b38ae87 100644 --- a/ports/spatialite-tools/portfile.cmake +++ b/ports/spatialite-tools/portfile.cmake @@ -1,118 +1,145 @@ -include(vcpkg_common_functions) - -option(BUILD_DEBUG_TOOLS "Build debug version of tools" OFF) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/spatialite-tools-4.3.0) +set(SPATIALITE_TOOLS_VERSION_STR "5.0.0") vcpkg_download_distfile(ARCHIVE - URLS "http://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-4.3.0.tar.gz" - FILENAME "spatialite-tools-4.3.0.tar.gz" - SHA512 e1de27c1c65ff2ff0b08583113517bea74edf33fff59ad6e9c77492ea3ae87d9c0f17d7670ee6602b32eea73ad3678bb5410ef2c6fac6e213bf2e341a907db88 + URLS "http://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-${SPATIALITE_TOOLS_VERSION_STR}.tar.gz" + FILENAME "spatialite-tools-${SPATIALITE_TOOLS_VERSION_STR}.tar.gz" + SHA512 a1497824df2c45ffa1ba6b4ec53794c2c4779b6357885ee6f1243f2bff137c3e4dd93b0a802239ced73f66be22faf0081b83bf0ad4effb8a04052712625865d1 ) -vcpkg_extract_source_archive(${ARCHIVE}) -find_program(NMAKE nmake) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-linux-configure.patch + fix-makefiles.patch ) -set(LDIR "\"${CURRENT_INSTALLED_DIR}\"") - -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(CL_FLAGS_DBG "/MDd /Zi") - set(CL_FLAGS_REL "/MD /Ox") - set(GEOS_LIBS_REL "${LDIR}/lib/geos_c.lib") - set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_cd.lib") - set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib") - set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib") - set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib") - set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib") - set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib") - set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib") -else() - set(CL_FLAGS_DBG "/MTd /Zi") - set(CL_FLAGS_REL "/MT /Ox") - set(GEOS_LIBS_REL "${LDIR}/lib/libgeos_c.lib ${LDIR}/lib/libgeos.lib") - set(GEOS_LIBS_DBG "${LDIR}/debug/lib/libgeos_c.lib ${LDIR}/debug/lib/libgeos.lib") - set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib ${LDIR}/lib/lzma.lib ws2_32.lib") - set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib ${LDIR}/debug/lib/lzma.lib ws2_32.lib") - set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib ${LDIR}/lib/freexl.lib") - set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib ${LDIR}/debug/lib/freexl.lib") - set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib ${LDIR}/lib/libcharset.lib") - set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib ${LDIR}/debug/lib/libcharset.lib ") -endif() - -set(LIBS_ALL_DBG - "${ICONV_LIBS_DBG} \ - ${LDIR}/debug/lib/sqlite3.lib \ - ${SPATIALITE_LIBS_DBG} \ - ${LIBXML2_LIBS_DBG} \ - ${GEOS_LIBS_DBG} \ - ${LDIR}/debug/lib/readosm.lib \ - ${LDIR}/debug/lib/expat.lib \ - ${LDIR}/debug/lib/zlibd.lib \ - ${LDIR}/debug/lib/projd.lib" - ) -set(LIBS_ALL_REL - "${ICONV_LIBS_REL} \ - ${LDIR}/lib/sqlite3.lib \ - ${SPATIALITE_LIBS_REL} \ - ${LIBXML2_LIBS_REL} \ - ${GEOS_LIBS_REL} \ - ${LDIR}/lib/readosm.lib \ - ${LDIR}/lib/expat.lib \ - ${LDIR}/lib/zlib.lib \ - ${LDIR}/lib/proj.lib" - ) - -if(BUILD_DEBUG_TOOLS) - ################ - # Debug build - ################ - message(STATUS "Building ${TARGET_TRIPLET}-dgb") - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - "INST_DIR=\"${INST_DIR_REL}\"" "INSTALLED_ROOT=${LDIR}" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/) -else() - ################ - # Release build - ################ - message(STATUS "Building ${TARGET_TRIPLET}-rel") - - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - "INST_DIR=\"${INST_DIR_REL}\"" "INSTALLED_ROOT=${LDIR}" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-release - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") - set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/) +if (VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib") + set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib") + set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib") + set(SPATIALITE_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib") + set(SPATIALITE_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib") + set(ICONV_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/iconv.lib") + set(ICONV_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib") + set(EXPAT_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libexpat.lib") + set(EXPAT_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd.lib") + else() + set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib") + set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib") + set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib ws2_32.lib") + set(SPATIALITE_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib ${CURRENT_INSTALLED_DIR}/lib/freexl.lib ${CURRENT_INSTALLED_DIR}/lib/librttopo.lib") + set(SPATIALITE_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib ${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib ${CURRENT_INSTALLED_DIR}/debug/lib/librttopo.lib") + set(ICONV_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/lib/charset.lib") + set(ICONV_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib") + set(EXPAT_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libexpatMD.lib") + set(EXPAT_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatdMD.lib") + endif() + + if(VCPKG_TARGET_IS_UWP) + set(UWP_LIBS windowsapp.lib) + set(UWP_LINK_FLAGS /APPCONTAINER) + endif() + + set(LIBS_ALL_DBG + "${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/readosm.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \ + ${LIBXML2_LIBS_DBG} \ + ${GEOS_LIBS_DBG} \ + ${ICONV_LIBS_DBG} \ + ${SPATIALITE_LIBS_DBG} \ + ${EXPAT_LIBS_DBG} \ + ${UWP_LIBS} \ + ${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib ole32.lib shell32.lib" + ) + set(LIBS_ALL_REL + "${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \ + ${CURRENT_INSTALLED_DIR}/lib/readosm.lib \ + ${CURRENT_INSTALLED_DIR}/lib/zlib.lib \ + ${LIBXML2_LIBS_REL} \ + ${GEOS_LIBS_REL} \ + ${ICONV_LIBS_REL} \ + ${SPATIALITE_LIBS_REL} \ + ${EXPAT_LIBS_REL} \ + ${UWP_LIBS} \ + ${CURRENT_INSTALLED_DIR}/lib/proj.lib ole32.lib shell32.lib" + ) + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR) + list(APPEND OPTIONS_RELEASE + "LINK_FLAGS=${UWP_LINK_FLAGS}" "INST_DIR=${INST_DIR}" "LIBS_ALL=${LIBS_ALL_REL}" + ) + list(APPEND OPTIONS_DEBUG + "LINK_FLAGS=/debug ${UWP_LINK_FLAGS}" "INST_DIR=${INST_DIR}\\debug" "LIBS_ALL=${LIBS_ALL_DBG}" + ) + + vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + "CL_FLAGS=/DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" + OPTIONS_RELEASE + ${OPTIONS_RELEASE} + OPTIONS_DEBUG + ${OPTIONS_DEBUG} + ) + + list(APPEND TOOL_EXES + shp_sanitize + spatialite_osm_filter + spatialite_osm_raw + spatialite_gml + spatialite_osm_map + exif_loader + spatialite_osm_net + spatialite_network + spatialite_tool + shp_doctor + spatialite + ) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_EXES} AUTO_CLEAN) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) # Build in UNIX + if(VCPKG_TARGET_IS_LINUX) + set(LIBS "-lpthread -ldl -lm -lz -lstdc++") + else() + set(LIBS "-lpthread -ldl -lm -lz -lc++ -liconv -lc") + endif() + + list(APPEND OPTIONS_RELEASE + "LIBXML2_LIBS=-lxml2 -llzma" + "GEOS_LDFLAGS=-lgeos_c -lgeos" + ) + list(APPEND OPTIONS_DEBUG + "LIBXML2_LIBS=-lxml2 -llzmad" + "GEOS_LDFLAGS=-lgeos_cd -lgeosd" + ) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + "LIBXML2_CFLAGS=-I\"${CURRENT_INSTALLED_DIR}/include\"" + "LIBS=${LIBS}" + "--disable-minizip" + OPTIONS_DEBUG + ${OPTIONS_DEBUG} + OPTIONS_RELEASE + ${OPTIONS_RELEASE} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) endif() +# Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) -file(GLOB EXES "${EXE_FOLDER}/*.exe") -file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) -file(REMOVE ${EXES}) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) - -if(NOT BUILD_DEBUG_TOOLS AND VCPKG_CRT_LINKAGE STREQUAL dynamic) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -endif() - -message(STATUS "Packaging ${TARGET_TRIPLET} done") - # Allow empty include directory set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/spatialite-tools/vcpkg.json b/ports/spatialite-tools/vcpkg.json new file mode 100644 index 00000000000000..a1a5bc3bb28984 --- /dev/null +++ b/ports/spatialite-tools/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "spatialite-tools", + "version-string": "5.0.0", + "port-version": 3, + "description": "Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries)", + "homepage": "https://www.gaia-gis.it/fossil/spatialite-tools/index", + "dependencies": [ + "expat", + "geos", + "libiconv", + "librttopo", + "libspatialite", + "proj4", + "readosm", + "sqlite3", + "zlib" + ] +} diff --git a/ports/spdk-dpdk/CONTROL b/ports/spdk-dpdk/CONTROL deleted file mode 100644 index 02647149a11ac6..00000000000000 --- a/ports/spdk-dpdk/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: spdk-dpdk -Version: 20181124 -Description: SPDK mirror of DPDK. A set of libraries and drivers for fast packet processing - diff --git a/ports/spdk-dpdk/portfile.cmake b/ports/spdk-dpdk/portfile.cmake index 0a120e4e5a6335..f8a8d46e17661c 100644 --- a/ports/spdk-dpdk/portfile.cmake +++ b/ports/spdk-dpdk/portfile.cmake @@ -1,5 +1,3 @@ -INCLUDE(vcpkg_common_functions) - IF (NOT VCPKG_CMAKE_SYSTEM_NAME OR NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") MESSAGE(FATAL_ERROR "Intel dpdk currently only supports Linux/BSD platforms") ENDIF () @@ -43,5 +41,3 @@ FILE(INSTALL ${REAL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/spdk-dpdkConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${SOURCE_PATH}/license/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/ports/spdk-dpdk/vcpkg.json b/ports/spdk-dpdk/vcpkg.json new file mode 100644 index 00000000000000..ec63984b9b438d --- /dev/null +++ b/ports/spdk-dpdk/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "spdk-dpdk", + "version-string": "20181124", + "port-version": 1, + "description": "SPDK mirror of DPDK. A set of libraries and drivers for fast packet processing", + "supports": "linux" +} diff --git a/ports/spdk-ipsec/CMakeLists.txt b/ports/spdk-ipsec/CMakeLists.txt index 4d778eb306bf18..fb02b164b91d4f 100644 --- a/ports/spdk-ipsec/CMakeLists.txt +++ b/ports/spdk-ipsec/CMakeLists.txt @@ -27,7 +27,7 @@ ENDIF () SET(MAKE_FLAGS) -IF (EXEC_ENV STREQUAL Windows) +IF (EXEC_ENV STREQUAL "Windows") LIST(APPEND MAKE_FLAGS /f win_x64.mak) ENDIF () @@ -35,7 +35,7 @@ IF (CMAKE_BUILD_TYPE STREQUAL Debug) LIST(APPEND MAKE_FLAGS DEBUG=y) ENDIF () -IF (LIBRARY_LINKAGE STREQUAL "static") +IF (NOT BUILD_SHARED_LIBS) LIST(APPEND MAKE_FLAGS SHARED=n) ENDIF () @@ -47,12 +47,10 @@ ADD_CUSTOM_TARGET(ipsec-mb ALL ) SET(LIB_PATH ${CMAKE_SOURCE_DIR}/) -IF (LIBRARY_LINKAGE STREQUAL "dynamic") +IF(BUILD_SHARED_LIBS) STRING(APPEND LIB_PATH libIPSec_MB.so) -ELSEIF (LIBRARY_LINKAGE STREQUAL "static") - STRING(APPEND LIB_PATH libIPSec_MB.a) ELSE () - MESSAGE(FATAL_ERROR "Unknown linkage type ${LIBRARY_LINKAGE}") + STRING(APPEND LIB_PATH libIPSec_MB.a) ENDIF () INSTALL(FILES ${LIB_PATH} DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/lib/) diff --git a/ports/spdk-ipsec/CONTROL b/ports/spdk-ipsec/CONTROL deleted file mode 100644 index 3f8e1a0344df64..00000000000000 --- a/ports/spdk-ipsec/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: spdk-ipsec -Version: 20180711 -Description: SPDK mirror of ipsec. Intel(R) Multi-Buffer Crypto for IPsec Library - diff --git a/ports/spdk-ipsec/portfile.cmake b/ports/spdk-ipsec/portfile.cmake index d91b6d0e76ee70..df7ee677140ec1 100644 --- a/ports/spdk-ipsec/portfile.cmake +++ b/ports/spdk-ipsec/portfile.cmake @@ -1,12 +1,10 @@ -INCLUDE(vcpkg_common_functions) - IF (NOT VCPKG_CMAKE_SYSTEM_NAME) SET(EXEC_ENV "Windows") ELSE () SET(EXEC_ENV "${VCPKG_CMAKE_SYSTEM_NAME}") ENDIF () -IF (NOT EXEC_ENV STREQUAL "Linux") +IF (NOT VCPKG_TARGET_IS_LINUX) MESSAGE(FATAL_ERROR "Intel(R) Multi-Buffer Crypto for IPsec Library currently only supports Linux/Windows platforms") MESSAGE(STATUS "Well, it is not true, but I didnt manage to get it working on Windows") ENDIF () @@ -18,36 +16,34 @@ ELSEIF (NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") ENDIF () VCPKG_FROM_GITHUB( - OUT_SOURCE_PATH SOURCE_PATH - REPO spdk/intel-ipsec-mb - REF spdk - SHA512 037fc382d9aa87b6645309f29cb761a584ed855c583638c9e27b5b7200ceb2ae21ad5adcc7c92b2b1d1387186a7fd2b5ae22f337a8f52dea3f6c35d8f90b42bd - HEAD_REF master + OUT_SOURCE_PATH SOURCE_PATH + REPO spdk/intel-ipsec-mb + REF spdk + SHA512 037fc382d9aa87b6645309f29cb761a584ed855c583638c9e27b5b7200ceb2ae21ad5adcc7c92b2b1d1387186a7fd2b5ae22f337a8f52dea3f6c35d8f90b42bd + HEAD_REF master ) VCPKG_FIND_ACQUIRE_PROGRAM(NASM) -EXEC_PROGRAM(${NASM} - ARGS -v - OUTPUT_VARIABLE NASM_OUTPUT - ) -STRING(REGEX REPLACE "NASM version ([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" - NASM_VERSION - ${NASM_OUTPUT}) +execute_process( + COMMAND "${NASM}" -v + OUTPUT_VARIABLE NASM_OUTPUT + ERROR_VARIABLE NASM_OUTPUT +) +STRING(REGEX REPLACE "NASM version ([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" NASM_VERSION "${NASM_OUTPUT}") IF (NASM_VERSION VERSION_LESS 2.13.03) MESSAGE(FATAL_ERROR "NASM version 2.13.03 (or newer) is required to build this package") ENDIF () GET_FILENAME_COMPONENT(NASM_PATH ${NASM} DIRECTORY) -SET(ENV{PATH} " $ENV{PATH};${NASM_PATH} ") +vcpkg_add_to_path("${NASM_PATH}") VCPKG_CONFIGURE_CMAKE( - SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} - PREFER_NINJA - OPTIONS + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS -DSOURCE_PATH=${SOURCE_PATH} -DEXEC_ENV=${VCPKG_CMAKE_SYSTEM_NAME} - -DLIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} ) VCPKG_INSTALL_CMAKE() @@ -58,5 +54,3 @@ FILE(INSTALL ${SOURCE_PATH}/Release/include/ DESTINATION ${CURRENT_PACKAGES_DIR} FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/spdk-ipsecConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/ports/spdk-ipsec/vcpkg.json b/ports/spdk-ipsec/vcpkg.json new file mode 100644 index 00000000000000..e41c9d957141d3 --- /dev/null +++ b/ports/spdk-ipsec/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "spdk-ipsec", + "version-string": "20180711", + "port-version": 1, + "description": "SPDK mirror of ipsec. Intel(R) Multi-Buffer Crypto for IPsec Library", + "supports": "x64 & linux" +} diff --git a/ports/spdk-isal/CONTROL b/ports/spdk-isal/CONTROL deleted file mode 100644 index abfbe3de01a90f..00000000000000 --- a/ports/spdk-isal/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: spdk-isal -Version: 20181006 -Description: SPDK mirror of isa-l. Intel(R) Intelligent Storage Acceleration Library - diff --git a/ports/spdk-isal/portfile.cmake b/ports/spdk-isal/portfile.cmake index 530d8da83c3de9..31461d9acb3c6d 100644 --- a/ports/spdk-isal/portfile.cmake +++ b/ports/spdk-isal/portfile.cmake @@ -1,5 +1,3 @@ -INCLUDE(vcpkg_common_functions) - IF (NOT VCPKG_CMAKE_SYSTEM_NAME) SET(EXEC_ENV "Windows") ELSE () @@ -48,5 +46,3 @@ FILE(INSTALL ${SOURCE_PATH}/Release/include/ DESTINATION ${CURRENT_PACKAGES_DIR} FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/spdk-isalConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/ports/spdk-isal/vcpkg.json b/ports/spdk-isal/vcpkg.json new file mode 100644 index 00000000000000..eb857863cedc18 --- /dev/null +++ b/ports/spdk-isal/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "spdk-isal", + "version-string": "20181006", + "port-version": 1, + "description": "SPDK mirror of isa-l. Intel(R) Intelligent Storage Acceleration Library", + "supports": "x64" +} diff --git a/ports/spdk/CONTROL b/ports/spdk/CONTROL deleted file mode 100644 index 5e2cf3ca2cccc1..00000000000000 --- a/ports/spdk/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: spdk -Version: 19.01.1 -Description: Storage Performance Development Kit -Build-Depends: spdk-dpdk, spdk-ipsec, spdk-isal \ No newline at end of file diff --git a/ports/spdk/portfile.cmake b/ports/spdk/portfile.cmake index cc5e829890f5ad..38c0326fe16cf0 100644 --- a/ports/spdk/portfile.cmake +++ b/ports/spdk/portfile.cmake @@ -1,5 +1,3 @@ -INCLUDE(vcpkg_common_functions) - IF (NOT VCPKG_CMAKE_SYSTEM_NAME OR NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") MESSAGE(FATAL_ERROR "Intel spdk currently only supports Linux/BSD platforms") ENDIF () @@ -38,5 +36,3 @@ FILE(INSTALL ${SOURCE_PATH}/include/spdk/pci_ids.h DESTINATION ${CURRENT_PACKAGE FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/spdkConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/ports/spdk/usage b/ports/spdk/usage index 6e791c3fe81907..f26b41649c99f2 100644 --- a/ports/spdk/usage +++ b/ports/spdk/usage @@ -7,7 +7,7 @@ Add following to build examples/nvme/perf/perf.c ADD_EXECUTABLE(SPDKTest perf.c) - TARGET_LINK_DIRECTORIES(SPDKTest PRIVATE ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/spdk) + TARGET_LINK_DIRECTORIES(SPDKTest PRIVATE ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/spdk) TARGET_LINK_LIBRARIES(SPDKTest PRIVATE SPDK::spdk_app_rpc SPDK::spdk_bdev diff --git a/ports/spdk/vcpkg.json b/ports/spdk/vcpkg.json new file mode 100644 index 00000000000000..90a9c4940634cf --- /dev/null +++ b/ports/spdk/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "spdk", + "version-string": "19.01.1", + "port-version": 2, + "description": "Storage Performance Development Kit", + "supports": "linux", + "dependencies": [ + "spdk-dpdk", + "spdk-ipsec", + "spdk-isal" + ] +} diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL deleted file mode 100644 index 0864d78582806f..00000000000000 --- a/ports/spdlog/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: spdlog -Version: 1.3.1-2 -Homepage: https://github.com/gabime/spdlog -Description: Very fast, header only, C++ logging library -Build-Depends: fmt - -Feature: benchmark -Description: Use google benchmark -Build-Depends: benchmark \ No newline at end of file diff --git a/ports/spdlog/disable-master-project-check.patch b/ports/spdlog/disable-master-project-check.patch deleted file mode 100644 index 69f5882daae2ce..00000000000000 --- a/ports/spdlog/disable-master-project-check.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e1d9656..f8cb60c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -46,9 +46,9 @@ add_library(spdlog::spdlog ALIAS spdlog) - - # Check if spdlog is being used directly or via add_subdirectory - set(SPDLOG_MASTER_PROJECT OFF) --if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) -- set(SPDLOG_MASTER_PROJECT ON) --endif() -+#if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) -+# set(SPDLOG_MASTER_PROJECT ON) -+#endif() - - option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT}) - option(SPDLOG_BUILD_BENCH "Build benchmarks" ${SPDLOG_MASTER_PROJECT}) diff --git a/ports/spdlog/fix-feature-export.patch b/ports/spdlog/fix-feature-export.patch deleted file mode 100644 index ad1239fd797c82..00000000000000 --- a/ports/spdlog/fix-feature-export.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/bench/CMakeLists.txt b/bench/CMakeLists.txt -index 3c4a3f9..3bc3813 100644 ---- a/bench/CMakeLists.txt -+++ b/bench/CMakeLists.txt -@@ -46,3 +46,8 @@ add_executable(formatter-bench formatter-bench.cpp) - target_link_libraries(formatter-bench PRIVATE benchmark::benchmark spdlog::spdlog Threads::Threads) - - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs") -+ -+install(TARGETS bench async_bench latency -+ RUNTIME DESTINATION tools/spdlog -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) -\ No newline at end of file diff --git a/ports/spdlog/fix-mingw-build.patch b/ports/spdlog/fix-mingw-build.patch new file mode 100644 index 00000000000000..1abfdd350b2def --- /dev/null +++ b/ports/spdlog/fix-mingw-build.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b969465..31e23cd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -142,7 +142,7 @@ if(SPDLOG_BUILD_SHARED OR BUILD_SHARED_LIBS) + endif() + add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS}) + target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB) +- if(MSVC) ++ if(MSVC AND NOT MINGW) + target_compile_options(spdlog PUBLIC $<$,$>>:/wd4251 + /wd4275>) + endif() diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake index d25f78712915b6..89651a6c9e2f06 100644 --- a/ports/spdlog/portfile.cmake +++ b/ports/spdlog/portfile.cmake @@ -1,43 +1,48 @@ -#header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gabime/spdlog - REF v1.3.1 - SHA512 a851a44b6384f493dd312ae0a611d068af46bbfe8daf1c2f61f13d8836a3801f41b339074fbe8da8e428131c82fa5c4a9e3320a55cbdd4b7aff8bb349dfff7dd + REF v1.9.0 + SHA512 df023847e49b2ad8e5dc4cb681d31515bb7f87644a4baa946836cf3cb4114bb95ad603b746969e0e7f8220d3bfa453220c00dfde812f1e610801a5cc62e1f0f2 HEAD_REF v1.x - PATCHES - disable-master-project-check.patch - fix-feature-export.patch + PATCHES fix-mingw-build.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + benchmark SPDLOG_BUILD_BENCH + wchar SPDLOG_WCHAR_SUPPORT ) -set(SPDLOG_USE_BENCHMARK OFF) -if("benchmark" IN_LIST FEATURES) - set(SPDLOG_USE_BENCHMARK ON) +# configured in triplet file +if(NOT DEFINED SPDLOG_WCHAR_FILENAMES) + set(SPDLOG_WCHAR_FILENAMES OFF) +endif() +if(NOT VCPKG_TARGET_IS_WINDOWS) + if("wchar" IN_LIST FEATURES) + message(WARNING "Feature 'wchar' is only supported for Windows and has no effect on other platforms.") + elseif(SPDLOG_WCHAR_FILENAMES) + message(FATAL_ERROR "Build option 'SPDLOG_WCHAR_FILENAMES' is for Windows.") + endif() endif() -vcpkg_configure_cmake( +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SPDLOG_BUILD_SHARED) + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS + ${FEATURE_OPTIONS} -DSPDLOG_FMT_EXTERNAL=ON - -DSPDLOG_BUILD_BENCH=${SPDLOG_USE_BENCHMARK} + -DSPDLOG_INSTALL=ON + -DSPDLOG_BUILD_SHARED=${SPDLOG_BUILD_SHARED} + -DSPDLOG_WCHAR_FILENAMES=${SPDLOG_WCHAR_FILENAMES} + -DSPDLOG_BUILD_EXAMPLE=OFF ) -vcpkg_install_cmake() - -if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}") - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) -elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/${PORT}/cmake") - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/${PORT}/cmake) -endif() - +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/spdlog) +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - # use vcpkg-provided fmt library (see also option SPDLOG_FMT_EXTERNAL above) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/bundled) @@ -51,7 +56,13 @@ vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/ostr.h "#if 0 // !defined(SPDLOG_FMT_EXTERNAL)" ) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/chrono.h + "#if !defined(SPDLOG_FMT_EXTERNAL)" + "#if 0 // !defined(SPDLOG_FMT_EXTERNAL)" +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spdlog) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/spdlog/LICENSE ${CURRENT_PACKAGES_DIR}/share/spdlog/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/spdlog/vcpkg.json b/ports/spdlog/vcpkg.json new file mode 100644 index 00000000000000..b545e191d4caa6 --- /dev/null +++ b/ports/spdlog/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "spdlog", + "version-semver": "1.9.0", + "port-version": 1, + "description": "Very fast, header only, C++ logging library", + "homepage": "https://github.com/gabime/spdlog", + "license": "MIT", + "dependencies": [ + "fmt", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "benchmark": { + "description": "Use google benchmark", + "dependencies": [ + "benchmark" + ] + }, + "wchar": { + "description": "Build with wchar_t (Windows only)" + } + } +} diff --git a/ports/spectra/CONTROL b/ports/spectra/CONTROL deleted file mode 100644 index 6aa712afdbf2a4..00000000000000 --- a/ports/spectra/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: spectra -Version: 0.8.0 -Description: A header-only C++ library for large scale eigenvalue problems -Homepage: https://spectralib.org -Build-Depends: eigen3 diff --git a/ports/spectra/portfile.cmake b/ports/spectra/portfile.cmake index 94ac9b4d767a26..6fefd4abb156f8 100644 --- a/ports/spectra/portfile.cmake +++ b/ports/spectra/portfile.cmake @@ -1,12 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO yixuan/spectra - REF v0.8.0 - SHA512 186bcd8efd5dc6cf0aa81b909184e056d1df1e55870c700f0ca060f504fa997e3ce27c3d15d7b4c74422e4d18bcbd471558392a89e307693b89cc1f480fecc71 + REF ec27cfd2210a9b2322825c4cb8e5d47f014e1ac3 # v0.9.0 + SHA512 c383405faab851ab302ee1ccb78741c60ab250c05321eee65078f72769ced396b2c8b4a49442cb5836f659e27adbbc3b538198ee877495e49a980a185d49d420 HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spectra RENAME copyright) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/spectra/vcpkg.json b/ports/spectra/vcpkg.json new file mode 100644 index 00000000000000..96bdfd299d85d9 --- /dev/null +++ b/ports/spectra/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "spectra", + "version": "0.9.0", + "port-version": 1, + "description": "A header-only C++ library for large scale eigenvalue problems", + "homepage": "https://spectralib.org", + "documentation": "https://spectralib.org/quick-start.html", + "license": "MPL-2.0", + "dependencies": [ + "eigen3" + ] +} diff --git a/ports/speex/0001-make-pkg-config-lib-name-configurable.patch b/ports/speex/0001-make-pkg-config-lib-name-configurable.patch new file mode 100644 index 00000000000000..72b61f4cc5a4e3 --- /dev/null +++ b/ports/speex/0001-make-pkg-config-lib-name-configurable.patch @@ -0,0 +1,13 @@ +diff --git a/speex.pc.in b/speex.pc.in +index 97bba4f..52a1d3c 100644 +--- a/speex.pc.in ++++ b/speex.pc.in +@@ -10,6 +10,6 @@ Description: Speex is an audio codec tuned for speech + Version: @SPEEX_VERSION@ + Requires: + Conflicts: +-Libs: -L${libdir} -lspeex ++Libs: -L${libdir} -l@SPEEXLIB@ + Libs.private: @LIBM@ + Cflags: -I${includedir} + diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index bdce0b3c3389d9..b151b2439f7077 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required (VERSION 3.8.0) project (libspeex C) +include(GNUInstallDirs) +include(CheckLibraryExists) + option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) if(MSVC) add_definitions(-DHAVE_CONFIG_H) @@ -28,6 +31,15 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def" "speex_header_free\n" ) +file(STRINGS "configure.ac" + _speex_version_defines REGEX "SPEEX_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") +foreach(ver ${_speex_version_defines}) + if(ver MATCHES "SPEEX_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") + set(SPEEX_${CMAKE_MATCH_1}_VERSION "${CMAKE_MATCH_2}" CACHE INTERNAL "") + endif() +endforeach() +set(SPEEX_VERSION ${SPEEX_MAJOR_VERSION}.${SPEEX_MINOR_VERSION}.${SPEEX_MICRO_VERSION}) + set(SRC "libspeex/bits.c" "libspeex/cb_search.c" @@ -78,3 +90,22 @@ install( if(NOT DISABLE_INSTALL_HEADERS) install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h") endif() + +# pkgconfig file +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) +set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) +set(LIBM ) +check_library_exists(m ceil "" LIBMEXIST) +if(LIBMEXIST) + list(APPEND LIBM -lm) +endif() +set(SPEEXLIB "${CMAKE_PROJECT_NAME}") +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(SPEEXLIB "${CMAKE_PROJECT_NAME}d") +endif() +configure_file(speex.pc.in speex.pc @ONLY) +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/speex.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL deleted file mode 100644 index 3291927c2888ba..00000000000000 --- a/ports/speex/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: speex -Version: 1.2.0-4 -Homepage: https://github.com/xiph/speex -Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index 271c2bc8873c5f..14a11d813f9708 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -1,4 +1,6 @@ -include(vcpkg_common_functions) +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND PATCHES "0001-make-pkg-config-lib-name-configurable.patch") +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -6,22 +8,35 @@ vcpkg_from_github( REF Speex-1.2.0 SHA512 612dfd67a9089f929b7f2a613ed3a1d2fda3d3ec0a4adafe27e2c1f4542de1870b42b8042f0dcb16d52e08313d686cc35b76940776419c775417f5bad18b448f HEAD_REF master + PATCHES ${PATCHES} ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) +if(VCPKG_TARGET_IS_WINDOWS) + file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + ) + vcpkg_install_cmake() -vcpkg_install_cmake() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/speex/speex.h" + "extern const SpeexMode" + "__declspec(dllimport) extern const SpeexMode" + ) + endif() +else() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + ) + vcpkg_install_make() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(READ "${CURRENT_PACKAGES_DIR}/include/speex/speex.h" _contents) - string(REPLACE "extern const SpeexMode" "__declspec(dllimport) extern const SpeexMode" _contents "${_contents}") - file(WRITE "${CURRENT_PACKAGES_DIR}/include/speex/speex.h" "${_contents}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/speex RENAME copyright) +vcpkg_fixup_pkgconfig() + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/speex/vcpkg.json b/ports/speex/vcpkg.json new file mode 100644 index 00000000000000..5265e6ab0e5b5d --- /dev/null +++ b/ports/speex/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "speex", + "version-string": "1.2.0", + "port-version": 9, + "description": "Speex is an Open Source/Free Software patent-free audio compression format designed for speech.", + "homepage": "https://github.com/xiph/speex" +} diff --git a/ports/speexdsp/CMakeLists.txt b/ports/speexdsp/CMakeLists.txt index 0708faa2d0d798..6d9658916aa3e8 100644 --- a/ports/speexdsp/CMakeLists.txt +++ b/ports/speexdsp/CMakeLists.txt @@ -1,37 +1,120 @@ -# CMAKE project for libspeexdsp cmake_minimum_required(VERSION 3.1) -option(SOURCE_PATH "Root directory.") -option(USE_SSE "Use SSE") -project (libspeexdsp) - -file(GLOB_RECURSE LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/libspeexdsp/*.c") -list(REMOVE_ITEM LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/libspeexdsp/testdenoise.c" - "${SOURCE_PATH}/libspeexdsp/testecho.c" - "${SOURCE_PATH}/libspeexdsp/testjitter.c" - "${SOURCE_PATH}/libspeexdsp/testresample.c") -file(GLOB_RECURSE LIBSPEEXDSP_HEADERS "${SOURCE_PATH}/libspeexdsp/*.h") -file(GLOB_RECURSE LIBSPEEXDSP_HEADERS_PUBLIC "${SOURCE_PATH}/include/**/*.h") - -if (BUILD_SHARED_LIBS) - add_definitions(-D_WINDOWS -D_USRDLL) - list(APPEND LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/win32/libspeexdsp.def") -else () - add_definitions(-D_LIB) -endif () - -add_definitions(-DHAVE_CONFIG_H -D_WIN32) - -if (USE_SSE) - add_definitions(-D_USE_SSE -D_USE_SSE2) +option(USE_SSE "Use SSE" OFF) +option(USE_NEON "Use NEON" OFF) +option(FIXED_POINT "Use Fixed Point Arithmetic" OFF) + +set(LIBSPEEXDSP_VERSION "1.2.0") +set(LIBSPEEXDSP_SOVERSION "1") +project(libspeexdsp) + +set(LIBSPEEXDSP_SOURCES + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/buffer.c" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/fftwrap.c" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/filterbank.c" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/jitter.c" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/mdf.c" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/preprocess.c" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/resample.c" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/scal.c" +) +set(LIBSPEEXDSP_HEADERS + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/arch.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/bfin.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/fftwrap.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/filterbank.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/fixed_arm4.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/fixed_arm5e.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/fixed_bfin.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/fixed_debug.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/fixed_generic.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/math_approx.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/misc_bfin.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/os_support.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/pseudofloat.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/resample_neon.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/resample_sse.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/smallft.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/stack_alloc.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/vorbis_psy.h" + "${CMAKE_CURRENT_LIST_DIR}/include/speex/speex_buffer.h" +) +set(LIBSPEEXDSP_HEADERS_PUBLIC + "${CMAKE_CURRENT_LIST_DIR}/include/speex/speex_echo.h" + "${CMAKE_CURRENT_LIST_DIR}/include/speex/speex_jitter.h" + "${CMAKE_CURRENT_LIST_DIR}/include/speex/speex_preprocess.h" + "${CMAKE_CURRENT_LIST_DIR}/include/speex/speex_resampler.h" + "${CMAKE_CURRENT_LIST_DIR}/include/speex/speexdsp_types.h" +) + +set(CMAKE_C_VISIBILITY_PRESET hidden) +if (NOT BUILD_SHARED_LIBS) + add_definitions("-DEXPORT=") +elseif(WIN32) + add_definitions("-DEXPORT=") + list(APPEND LIBSPEEXDSP_SOURCES "${CMAKE_CURRENT_LIST_DIR}/win32/libspeexdsp.def") +else() + add_definitions("-DEXPORT=__attribute__((visibility(\"default\")))") +endif() + +if (USE_SSE AND NOT FIXED_POINT) + add_definitions(-DUSE_SSE -DUSE_SSE2) +endif() +if (USE_NEON AND NOT MSVC) + add_definitions(-DUSE_NEON) endif() -include_directories("${SOURCE_PATH}/include" - "${SOURCE_PATH}/win32") -add_library(libspeexdsp ${LIBSPEEXDSP_SOURCES} ${LIBSPEEXDSP_HEADERS}) +if (FIXED_POINT) + add_definitions(-DFIXED_POINT -DUSE_KISS_FFT) + list(APPEND LIBSPEEXDSP_SOURCES + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/kiss_fft.c" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/kiss_fftr.c" + ) + list(APPEND LIBSPEEXDSP_HEADERS + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/_kiss_fft_guts.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/kiss_fft.h" + "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/kiss_fftr.h" + ) +else() + add_definitions(-DFLOATING_POINT -DUSE_SMALLFT) + list(APPEND LIBSPEEXDSP_SOURCES "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/smallft.c") +endif() + +if (NOT MSVC) + add_definitions(-DVAR_ARRAYS) +endif() + +# Basic speexdsp_config_types.h for Linux support +set(INCLUDE_STDINT "#include ") +set(SIZE16 "int16_t") +set(USIZE16 "uint16_t") +set(SIZE32 "int32_t") +set(USIZE32 "uint32_t") +configure_file("${CMAKE_CURRENT_LIST_DIR}/include/speex/speexdsp_config_types.h.in" + "${CMAKE_CURRENT_BINARY_DIR}/speexdsp_config_types.h" @ONLY) +list(APPEND LIBSPEEXDSP_HEADERS_PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/speexdsp_config_types.h") + +include_directories("${CMAKE_CURRENT_LIST_DIR}/include") +include_directories("${CMAKE_CURRENT_BINARY_DIR}") + +add_library(speexdsp ${LIBSPEEXDSP_SOURCES} ${LIBSPEEXDSP_HEADERS}) +set_target_properties(speexdsp PROPERTIES PUBLIC_HEADER "${LIBSPEEXDSP_HEADERS_PUBLIC}") +set_target_properties(speexdsp PROPERTIES VERSION "${LIBSPEEXDSP_VERSION}") +set_target_properties(speexdsp PROPERTIES SOVERSION "${LIBSPEEXDSP_SOVERSION}") -set_target_properties(libspeexdsp PROPERTIES PUBLIC_HEADER "${LIBSPEEXDSP_HEADERS_PUBLIC}") +# pkgconfig file +set(prefix "${CMAKE_INSTALL_PREFIX}") +set(exec_prefix \${prefix}) +SET(bindir \${exec_prefix}/${CMAKE_INSTALL_BINDIR}) +SET(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) +SET(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) +if(CMAKE_SYSTEM_NAME MATCHES BSD) + set(PKG_CONFIG_RPATH "-Wl,-R\${libdir}") +endif(CMAKE_SYSTEM_NAME MATCHES BSD) +set(PACKAGE_VERSION "${LIBSPEEXDSP_VERSION}") +configure_file(speexdsp.pc.in speexdsp.pc @ONLY) +install(FILES ${PROJECT_BINARY_DIR}/speexdsp.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -install(TARGETS libspeexdsp +install(TARGETS speexdsp ARCHIVE DESTINATION "lib" RUNTIME DESTINATION "bin" PUBLIC_HEADER DESTINATION "include/speex") diff --git a/ports/speexdsp/CONTROL b/ports/speexdsp/CONTROL deleted file mode 100644 index 793281d419c4da..00000000000000 --- a/ports/speexdsp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: speexdsp -Version: 1.2rc3-3 -Homepage: https://ftp.osuosl.org/pub/xiph/releases/speex/ -Description: A patent-free, Open Source/Free Software DSP library. -Build-Depends: diff --git a/ports/speexdsp/portfile.cmake b/ports/speexdsp/portfile.cmake index 0cc6ac71cba533..445bc2aca21804 100644 --- a/ports/speexdsp/portfile.cmake +++ b/ports/speexdsp/portfile.cmake @@ -1,31 +1,48 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/speexdsp-1.2rc3) -set(CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz" - FILENAME "speexdsp-1.2rc3.tar.xz" - SHA512 29dfa8345df025eeb076561648a9b5c0485692be699b6da3c2a3734b4329187a1c2eb181252f4df12b21f1309ecdf59797437dfb123d160fd723491ab216e858 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if(VCPKG_USE_HEAD_VERSION) + vcpkg_from_gitlab( + GITLAB_URL "https://gitlab.xiph.org" + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/speexdsp + HEAD_REF master + ) +else() + # Since the github repo is out-dated, use official download URL for release builds to reduce traffic to the Gitlab host + vcpkg_download_distfile(ARCHIVE + URLS "http://downloads.xiph.org/releases/speex/speexdsp-1.2.0.tar.gz" + FILENAME "speexdsp-1.2.0.tar.gz" + SHA512 e357cd5377415ea66c862302c7cf8bf6a10063cacd903f0846478975b87974cf5bdf00e2c6759d8f4f453c4c869cf284e9dc948a84a83d7b2ab96bd5405c05ec + ) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "1.2.0" + ) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) set(USE_SSE OFF) -set(USE_NEON OFF) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(USE_SSE ON) endif() +set(USE_NEON OFF) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(USE_NEON ON) +endif() vcpkg_configure_cmake( - SOURCE_PATH ${CMAKE_PATH} + SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DSOURCE_PATH=${SOURCE_PATH} -DUSE_SSE=${USE_SSE} + OPTIONS + -DUSE_SSE=${USE_SSE} + -DUSE_NEON=${USE_NEON} ) vcpkg_install_cmake() +vcpkg_copy_pdbs() -# Remove debug include -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_pkgconfig() -# Copy copright information -file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/speexdsp" RENAME "copyright") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") diff --git a/ports/speexdsp/vcpkg.json b/ports/speexdsp/vcpkg.json new file mode 100644 index 00000000000000..8cbd9c54d510cd --- /dev/null +++ b/ports/speexdsp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "speexdsp", + "version-string": "1.2.0", + "port-version": 6, + "description": "A patent-free, Open Source/Free Software DSP library.", + "homepage": "https://speex.org/" +} diff --git a/ports/spirit-po/CONTROL b/ports/spirit-po/CONTROL deleted file mode 100644 index e31bdcb2e6229f..00000000000000 --- a/ports/spirit-po/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: spirit-po -Version: 1.1.2-1 -Homepage: https://github.com/cbeck88/spirit-po -Description: A header-only C++ library for localization using GNU gettext po files, based on Boost.Spirit. -Build-Depends: boost diff --git a/ports/spirit-po/portfile.cmake b/ports/spirit-po/portfile.cmake index d961ce256ac299..36b9564bb21b09 100644 --- a/ports/spirit-po/portfile.cmake +++ b/ports/spirit-po/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cbeck88/spirit-po diff --git a/ports/spirit-po/vcpkg.json b/ports/spirit-po/vcpkg.json new file mode 100644 index 00000000000000..e088d9ebc5ad4b --- /dev/null +++ b/ports/spirit-po/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "spirit-po", + "version-string": "1.1.2", + "port-version": 2, + "description": "A header-only C++ library for localization using GNU gettext po files, based on Boost.Spirit.", + "homepage": "https://github.com/cbeck88/spirit-po", + "dependencies": [ + "boost" + ] +} diff --git a/ports/spirv-cross/CONTROL b/ports/spirv-cross/CONTROL deleted file mode 100644 index 665637d430df98..00000000000000 --- a/ports/spirv-cross/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: spirv-cross -Version: 2019-05-09 -Description: SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages. diff --git a/ports/spirv-cross/portfile.cmake b/ports/spirv-cross/portfile.cmake index f40c6b2de66cd8..951ba39cdd0c00 100644 --- a/ports/spirv-cross/portfile.cmake +++ b/ports/spirv-cross/portfile.cmake @@ -1,33 +1,43 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/SPIRV-Cross - REF fce83b7e8b0f6599efd4481992b2eb30f69f21de - SHA512 24bdb965f0248b57081d314f078a522ef8da842ee5480e1276da7bc70cae002cfe7a58903f99d13bcdee1e3863f77dfcd5a74e084e63a9c20edf42a833b2a874 + REF 2021-01-15 + SHA512 f934ef61602223f6fe6d9c826ed5beb129beb7a30b18b389625d4fc0b1efa1b8df930a2a2d2a0b4f377ef2899e8e034239819a4c6629a78c666f72004464da93 HEAD_REF master ) +if(VCPKG_TARGET_IS_IOS) + message(STATUS "Using iOS trplet. Executables won't be created...") + set(BUILD_CLI OFF) +else() + set(BUILD_CLI ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=OFF + OPTIONS + -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=OFF + -DSPIRV_CROSS_CLI=${BUILD_CLI} + -DSPIRV_CROSS_SKIP_INSTALL=OFF + -DSPIRV_CROSS_ENABLE_C_API=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() -foreach(COMPONENT core cpp glsl hlsl msl reflect util) +foreach(COMPONENT core c cpp glsl hlsl msl reflect util) vcpkg_fixup_cmake_targets(CONFIG_PATH share/spirv_cross_${COMPONENT}/cmake TARGET_PATH share/spirv_cross_${COMPONENT}) endforeach() -file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*") -file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +vcpkg_copy_tools( + TOOL_NAMES spirv-cross + AUTO_CLEAN +) -# cleanup -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-cross/copyright COPYONLY) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/spirv-cross/vcpkg.json b/ports/spirv-cross/vcpkg.json new file mode 100644 index 00000000000000..88b4a65f183e4e --- /dev/null +++ b/ports/spirv-cross/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "spirv-cross", + "version-date": "2021-01-15", + "port-version": 1, + "description": "SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.", + "homepage": "https://github.com/KhronosGroup/SPIRV-Cross", + "dependencies": [ + "spirv-headers" + ] +} diff --git a/ports/spirv-headers/CONTROL b/ports/spirv-headers/CONTROL deleted file mode 100644 index be9ef43928a30e..00000000000000 --- a/ports/spirv-headers/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: spirv-headers -Version: 2019-05-05 -Description: Machine-readable files for the SPIR-V Registry diff --git a/ports/spirv-headers/portfile.cmake b/ports/spirv-headers/portfile.cmake index e5191639dec72a..2256792e987453 100644 --- a/ports/spirv-headers/portfile.cmake +++ b/ports/spirv-headers/portfile.cmake @@ -1,18 +1,14 @@ -# header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/SPIRV-Headers - REF c4f8f65792d4bf2657ca751904c511bbcf2ac77b - SHA512 750af53a70f6f890657735ab0e2db5ae3dd8d612480efc2247753993752f687e22a0bdd65296c5751daf284604fe3dc9ee0a94feae88761a0e64adc64e6d17a4 + REF bcf55210f13a4fa3c3d0963b509ff1070e434c79 + SHA512 d0553b95f28b77209862059cd0a8c15ca3340f33e13d9bb75340ced07a5aa07b8b9eaa1bdc42daa0dbf78679c3b1ef3d344c73b17518061249cdc67000568c37 HEAD_REF master ) # This must be spirv as other spirv packages expect it there. -# Copy header files -file(COPY ${SOURCE_PATH}/include/spirv/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/spirv) +file(COPY "${SOURCE_PATH}/include/spirv/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/spirv") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirv-headers) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/spirv-headers/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-headers/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/spirv-headers/vcpkg.json b/ports/spirv-headers/vcpkg.json new file mode 100644 index 00000000000000..53093e4ffa49fc --- /dev/null +++ b/ports/spirv-headers/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "spirv-headers", + "version-date": "2021-03-25", + "description": "Machine-readable files for the SPIR-V Registry", + "homepage": "https://github.com/KhronosGroup/SPIRV-Headers" +} diff --git a/ports/spirv-tools/0001-don-t-use-MP4.patch b/ports/spirv-tools/0001-don-t-use-MP4.patch new file mode 100644 index 00000000000000..0203129be1b3f0 --- /dev/null +++ b/ports/spirv-tools/0001-don-t-use-MP4.patch @@ -0,0 +1,58 @@ +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 8247f6f..e28f6ee 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -420,7 +420,3 @@ if(ENABLE_SPIRV_TOOLS_INSTALL) + install(FILES ${CMAKE_BINARY_DIR}/${SPIRV_TOOLS}Config.cmake DESTINATION ${PACKAGE_DIR}) + endif(ENABLE_SPIRV_TOOLS_INSTALL) + +-if(MSVC AND (NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) +- # Enable parallel builds across four cores for this lib +- add_definitions(/MP4) +-endif() +diff --git a/source/fuzz/CMakeLists.txt b/source/fuzz/CMakeLists.txt +index 804fcf0..4915f07 100644 +--- a/source/fuzz/CMakeLists.txt ++++ b/source/fuzz/CMakeLists.txt +@@ -419,10 +419,6 @@ if(SPIRV_BUILD_FUZZER) + ${CMAKE_CURRENT_BINARY_DIR}/protobufs/spvtoolsfuzz.pb.cc + ) + +- if(MSVC AND (NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) +- # Enable parallel builds across four cores for this lib +- add_definitions(/MP4) +- endif() + + spvtools_pch(SPIRV_TOOLS_FUZZ_SOURCES pch_source_fuzz) + +diff --git a/source/opt/CMakeLists.txt b/source/opt/CMakeLists.txt +index 88d5658..e3faab7 100644 +--- a/source/opt/CMakeLists.txt ++++ b/source/opt/CMakeLists.txt +@@ -218,11 +218,6 @@ set(SPIRV_TOOLS_OPT_SOURCES + wrap_opkill.cpp + ) + +-if(MSVC AND (NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) +- # Enable parallel builds across four cores for this lib +- add_definitions(/MP4) +-endif() +- + spvtools_pch(SPIRV_TOOLS_OPT_SOURCES pch_source_opt) + + add_library(SPIRV-Tools-opt ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_TOOLS_OPT_SOURCES}) +diff --git a/source/reduce/CMakeLists.txt b/source/reduce/CMakeLists.txt +index e589ad5..b93a37b 100644 +--- a/source/reduce/CMakeLists.txt ++++ b/source/reduce/CMakeLists.txt +@@ -71,10 +71,6 @@ set(SPIRV_TOOLS_REDUCE_SOURCES + simple_conditional_branch_to_branch_reduction_opportunity.cpp + ) + +-if(MSVC AND (NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) +- # Enable parallel builds across four cores for this lib +- add_definitions(/MP4) +-endif() + + spvtools_pch(SPIRV_TOOLS_REDUCE_SOURCES pch_source_reduce) + diff --git a/ports/spirv-tools/CMake-targets.patch b/ports/spirv-tools/CMake-targets.patch deleted file mode 100644 index d3870f8c8bbf91..00000000000000 --- a/ports/spirv-tools/CMake-targets.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt -index 1f96018..c9a3758 100644 ---- a/source/CMakeLists.txt -+++ b/source/CMakeLists.txt -@@ -337,7 +337,7 @@ spvtools_pch(SPIRV_SOURCES pch_source) - add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES}) - spvtools_default_compile_options(${SPIRV_TOOLS}) - target_include_directories(${SPIRV_TOOLS} -- PUBLIC ${spirv-tools_SOURCE_DIR}/include -+ PUBLIC "$" - PRIVATE ${spirv-tools_BINARY_DIR} - PRIVATE ${SPIRV_HEADER_INCLUDE_DIR} - ) -@@ -370,10 +370,20 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") - endif() - - if(ENABLE_SPIRV_TOOLS_INSTALL) -- install(TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared -+ install(TARGETS ${SPIRV_TOOLS} EXPORT spirv-tools-config - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ export( -+ TARGETS ${SPIRV_TOOLS} -+ NAMESPACE spirv-tools:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-config.cmake" -+ ) -+ install( -+ EXPORT spirv-tools-config -+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/spirv-tools" -+ NAMESPACE spirv-tools:: -+ ) - endif(ENABLE_SPIRV_TOOLS_INSTALL) - - if(MSVC) -diff --git a/source/link/CMakeLists.txt b/source/link/CMakeLists.txt -index 8ca4df3..ac0aa62 100644 ---- a/source/link/CMakeLists.txt -+++ b/source/link/CMakeLists.txt -@@ -17,7 +17,7 @@ add_library(SPIRV-Tools-link - - spvtools_default_compile_options(SPIRV-Tools-link) - target_include_directories(SPIRV-Tools-link -- PUBLIC ${spirv-tools_SOURCE_DIR}/include -+ PUBLIC "$" - PUBLIC ${SPIRV_HEADER_INCLUDE_DIR} - PRIVATE ${spirv-tools_BINARY_DIR} - ) -@@ -29,8 +29,13 @@ set_property(TARGET SPIRV-Tools-link PROPERTY FOLDER "SPIRV-Tools libraries") - spvtools_check_symbol_exports(SPIRV-Tools-link) - - if(ENABLE_SPIRV_TOOLS_INSTALL) -- install(TARGETS SPIRV-Tools-link -+ install(TARGETS SPIRV-Tools-link EXPORT spirv-tools-config - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ export( -+ TARGETS ${SPIRV_TOOLS}-link -+ NAMESPACE spirv-tools:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-link-config.cmake" -+ ) - endif(ENABLE_SPIRV_TOOLS_INSTALL) -diff --git a/source/opt/CMakeLists.txt b/source/opt/CMakeLists.txt -index b02485a..111ce3c 100644 ---- a/source/opt/CMakeLists.txt -+++ b/source/opt/CMakeLists.txt -@@ -221,7 +221,7 @@ add_library(SPIRV-Tools-opt ${SPIRV_TOOLS_OPT_SOURCES}) - - spvtools_default_compile_options(SPIRV-Tools-opt) - target_include_directories(SPIRV-Tools-opt -- PUBLIC ${spirv-tools_SOURCE_DIR}/include -+ PUBLIC "$" - PUBLIC ${SPIRV_HEADER_INCLUDE_DIR} - PRIVATE ${spirv-tools_BINARY_DIR} - ) -@@ -233,8 +233,13 @@ set_property(TARGET SPIRV-Tools-opt PROPERTY FOLDER "SPIRV-Tools libraries") - spvtools_check_symbol_exports(SPIRV-Tools-opt) - - if(ENABLE_SPIRV_TOOLS_INSTALL) -- install(TARGETS SPIRV-Tools-opt -+ install(TARGETS SPIRV-Tools-opt EXPORT spirv-tools-config - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ export( -+ TARGETS ${SPIRV_TOOLS}-opt -+ NAMESPACE spirv-tools:: -+ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-opt-config.cmake" -+ ) - endif(ENABLE_SPIRV_TOOLS_INSTALL) diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL deleted file mode 100644 index 154783ca2e65b2..00000000000000 --- a/ports/spirv-tools/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: spirv-tools -Version: 2019.3-dev-1 -Homepage: https://github.com/KhronosGroup/SPIRV-Tools -Description: API and commands for processing SPIR-V modules -Build-Depends: spirv-headers \ No newline at end of file diff --git a/ports/spirv-tools/cmake-install.patch b/ports/spirv-tools/cmake-install.patch new file mode 100644 index 00000000000000..ef21cb8f0ca3c1 --- /dev/null +++ b/ports/spirv-tools/cmake-install.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6ed56a8..66d1e66 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -210,15 +210,9 @@ else() + endif() + + if(ENABLE_SPIRV_TOOLS_INSTALL) +- if(WIN32) +- macro(spvtools_config_package_dir TARGET PATH) +- set(${PATH} ${TARGET}/cmake) +- endmacro() +- else() +- macro(spvtools_config_package_dir TARGET PATH) +- set(${PATH} ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET}) +- endmacro() +- endif() ++ macro(spvtools_config_package_dir TARGET PATH) ++ set(${PATH} ${CMAKE_INSTALL_DATADIR}/${TARGET}) ++ endmacro() + + macro(spvtools_generate_config_file TARGET) + file(WRITE ${CMAKE_BINARY_DIR}/${TARGET}Config.cmake diff --git a/ports/spirv-tools/comment-distutils.patch b/ports/spirv-tools/comment-distutils.patch deleted file mode 100644 index 2426f82bae841b..00000000000000 --- a/ports/spirv-tools/comment-distutils.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/utils/generate_registry_tables.py b/utils/generate_registry_tables.py -index 8b1c3572..6ab28fe6 100644 ---- a/utils/generate_registry_tables.py -+++ b/utils/generate_registry_tables.py -@@ -16,7 +16,7 @@ - - from __future__ import print_function - --import distutils.dir_util -+#import distutils.dir_util - import os.path - import xml.etree.ElementTree - -@@ -64,7 +64,7 @@ def main(): - with open(args.xml) as xml_in: - registry = xml.etree.ElementTree.fromstring(xml_in.read()) - -- distutils.dir_util.mkpath(os.path.dirname(args.generator_output)) -+ #distutils.dir_util.mkpath(os.path.dirname(args.generator_output)) - print(generate_vendor_table(registry), file=open(args.generator_output, 'w')) - - diff --git a/ports/spirv-tools/install-config-typo.patch b/ports/spirv-tools/install-config-typo.patch new file mode 100644 index 00000000000000..c356f4b52ba868 --- /dev/null +++ b/ports/spirv-tools/install-config-typo.patch @@ -0,0 +1,17 @@ +diff --git a/source/reduce/CMakeLists.txt b/source/reduce/CMakeLists.txt +index 51e9b1d..90b1cb7 100644 +--- a/source/reduce/CMakeLists.txt ++++ b/source/reduce/CMakeLists.txt +@@ -96,10 +96,10 @@ if(ENABLE_SPIRV_TOOLS_INSTALL) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- export(EXPORT SPIRV-Tools-reduceTargets FILE SPIRV-Tools-reduceTarget.cmake) ++ export(EXPORT SPIRV-Tools-reduceTargets FILE SPIRV-Tools-reduceTargets.cmake) + + spvtools_config_package_dir(SPIRV-Tools-reduce PACKAGE_DIR) +- install(EXPORT SPIRV-Tools-reduceTargets FILE SPIRV-Tools-reduceTarget.cmake ++ install(EXPORT SPIRV-Tools-reduceTargets FILE SPIRV-Tools-reduceTargets.cmake + DESTINATION ${PACKAGE_DIR}) + + spvtools_generate_config_file(SPIRV-Tools-reduce) diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index 59cf97591e8d53..670b70a468a921 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -1,40 +1,57 @@ -include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/SPIRV-Tools - REF d0a1f5a05a2b0f8315e5b3f17b8e34c730861b31 - SHA512 7179751b0216368b4a4bf8c9b0c1c1e3b17d6aa4788b4aeaa7fbb2b6d9d50b34cf209082f3531a2e0994b5fc02416373666d4d12cee282cec2c3d02c13a640a8 + REF v2021.1 + SHA512 e8478eacb86415f75a1e5b3f66a0508b01a9f7e9d8b070eb0329ca56be137f5543dd42125a1033cb8552c01f46e11affd7fda866231b3742c66de9b4341930d5 PATCHES - comment-distutils.patch - CMake-targets.patch + cmake-install.patch + install-config-typo.patch + 0001-don-t-use-MP4.patch ) vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) vcpkg_add_to_path("${PYTHON3_DIR}") +if(VCPKG_TARGET_IS_IOS) + message(STATUS "Using iOS trplet. Executables won't be created...") + set(TOOLS_INSTALL OFF) + set(SKIP_EXECUTABLES ON) +else() + set(TOOLS_INSTALL ON) + set(SKIP_EXECUTABLES OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSPIRV-Headers_SOURCE_DIR=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET} + -DSPIRV-Headers_SOURCE_DIR=${CURRENT_INSTALLED_DIR} -DSPIRV_WERROR=OFF + -DSPIRV_SKIP_EXECUTABLES=${SKIP_EXECUTABLES} # option SPIRV_SKIP_TESTS follows this value + -DENABLE_SPIRV_TOOLS_INSTALL=${TOOLS_INSTALL} + -DSPIRV_TOOLS_BUILD_STATIC=ON ) vcpkg_install_cmake() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*${CMAKE_EXECUTABLE_SUFFIX}") -file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(REMOVE ${EXES}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirv-tools) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/spirv-tools/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-tools/copyright) - -vcpkg_test_cmake(PACKAGE_NAME spirv-tools) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools TARGET_PATH share/SPIRV-Tools) # the directory name is capitalized as opposed to the package name +vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-link TARGET_PATH share/SPIRV-Tools-link) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-opt TARGET_PATH share/SPIRV-Tools-opt) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-reduce TARGET_PATH share/SPIRV-Tools-reduce) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") # only static linkage, i.e. no need to preserve .dll/.so files +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/SPIRV-Tools-shared.dll") +file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libSPIRV-Tools-shared.so") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libSPIRV-Tools-shared.so") +if(TOOLS_INSTALL) + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/${PORT}") +endif() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/spirv-tools/vcpkg.json b/ports/spirv-tools/vcpkg.json new file mode 100644 index 00000000000000..bbd48de51ae83e --- /dev/null +++ b/ports/spirv-tools/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "spirv-tools", + "version-string": "2021.1", + "description": "API and commands for processing SPIR-V modules", + "homepage": "https://github.com/KhronosGroup/SPIRV-Tools", + "dependencies": [ + "spirv-headers" + ] +} diff --git a/ports/spix/portfile.cmake b/ports/spix/portfile.cmake new file mode 100644 index 00000000000000..91512aa78b4e52 --- /dev/null +++ b/ports/spix/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO faaxm/spix + REF v0.3 + SHA512 be5695e1e061583645a711c91f218c2038ed66896932d9f32129242d20d0a451a032d53aee2fdb917f1423de96ebcba97887421636a13260a7e7c228a13666c0 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ANYRPC_LIB_BUILD_SHARED) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DSPIX_BUILD_EXAMPLES=OFF + -DSPIX_BUILD_TESTS=OFF +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/spix/vcpkg.json b/ports/spix/vcpkg.json new file mode 100644 index 00000000000000..e2e1e5c48de4c9 --- /dev/null +++ b/ports/spix/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "spix", + "version": "0.3", + "description": "A minimally invasive UI testing library that enables your Qt/QML app's UI to be controlled either via c++ code, or through an http RPC interface.", + "homepage": "https://github.com/faaxm/spix", + "dependencies": [ + "anyrpc", + { + "name": "qt5-base", + "default-features": false + }, + "qt5-declarative", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/sprout/CONTROL b/ports/sprout/CONTROL deleted file mode 100644 index 67240a5e1c877b..00000000000000 --- a/ports/sprout/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sprout -Version: 2019-06-20 -Homepage: https://github.com/bolero-MURAKAMI/Sprout -Description: C++11/14 constexpr based Containers, Algorithms, Random numbers, Parsing, Ray tracing, Synthesizer, and others -Build-Depends: boost-array, boost-mpl diff --git a/ports/sprout/portfile.cmake b/ports/sprout/portfile.cmake index 7be1c19859e5ec..5cfb923b303f2b 100644 --- a/ports/sprout/portfile.cmake +++ b/ports/sprout/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO bolero-MURAKAMI/Sprout diff --git a/ports/sprout/vcpkg.json b/ports/sprout/vcpkg.json new file mode 100644 index 00000000000000..22bab62af4b35c --- /dev/null +++ b/ports/sprout/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "sprout", + "version-string": "2019-06-20", + "port-version": 1, + "description": "C++11/14 constexpr based Containers, Algorithms, Random numbers, Parsing, Ray tracing, Synthesizer, and others", + "homepage": "https://github.com/bolero-MURAKAMI/Sprout", + "dependencies": [ + "boost-array", + "boost-mpl" + ] +} diff --git a/ports/spscqueue/CONTROL b/ports/spscqueue/CONTROL deleted file mode 100644 index e8330caaa17376..00000000000000 --- a/ports/spscqueue/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: spscqueue -Version: 2019-07-26 -Description: A bounded single-producer single-consumer wait-free and lock-free queue written in C++11 -Homepage: https://github.com/rigtorp/SPSCQueue diff --git a/ports/spscqueue/portfile.cmake b/ports/spscqueue/portfile.cmake index 5bc0628bc0f6d2..e1650e852a166e 100644 --- a/ports/spscqueue/portfile.cmake +++ b/ports/spscqueue/portfile.cmake @@ -1,19 +1,22 @@ -# header-only library - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rigtorp/SPSCQueue - REF 5165a08ac4474c77c636050332eca6ebfdd53533 - SHA512 30cd60711f816e6003a5b114c48bd12da449cb7b0f19aa58dd57e3abc3e5200847c3eb492627b4013f57eec11d5d6f0a11fedbcb21dd8dd5c44682c49456e4e1 + REF v1.1 + SHA512 148d60b3677f9d96603413577ff7062d8830bfec955cf3631bea66e5937ee0564d3ff51d05bf9417e5f964e761b7d7fbb8a871e5b6e0fe21112479b4830b0025 HEAD_REF master ) -file(COPY - ${SOURCE_PATH}/include/rigtorp/SPSCQueue.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include/rigtorp +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SPSCQueue) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/spscqueue/vcpkg.json b/ports/spscqueue/vcpkg.json new file mode 100644 index 00000000000000..9ed6879f330b4e --- /dev/null +++ b/ports/spscqueue/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "spscqueue", + "version-string": "1.1", + "port-version": 1, + "description": "A bounded single-producer single-consumer wait-free and lock-free queue written in C++11", + "homepage": "https://github.com/rigtorp/SPSCQueue" +} diff --git a/ports/sqlcipher/CMakeLists.txt b/ports/sqlcipher/CMakeLists.txt new file mode 100644 index 00000000000000..0a505139bfc171 --- /dev/null +++ b/ports/sqlcipher/CMakeLists.txt @@ -0,0 +1,71 @@ +cmake_minimum_required(VERSION 3.10) +project(sqlcipher C) + +find_package(OpenSSL REQUIRED) + +include_directories(. ${OPENSSL_INCLUDE_DIR}) +if(BUILD_SHARED_LIBS) + if(UNIX) + set(API "-DSQLITE_API=__attribute__((visibility(\"default\")))") + elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") + set(API "-DSQLITE_API=__declspec(dllexport)") + else() + message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}") + endif() +else() + set(API "-DSQLITE_API=extern") +endif() +add_library(sqlcipher sqlite3.c) + +target_compile_definitions( + sqlcipher + PRIVATE + $<$:SQLITE_DEBUG> + ${API} + -DSQLITE_ENABLE_RTREE + -DSQLITE_ENABLE_UNLOCK_NOTIFY + -DSQLITE_ENABLE_COLUMN_METADATA + -DSQLITE_HAS_CODEC + -DSQLITE_TEMP_STORE=2 +) + +if(WITH_GEOPOLY) + add_compile_definitions(SQLITE_ENABLE_GEOPOLY) +endif() + +if(WITH_JSON1) + add_compile_definitions(SQLITE_ENABLE_JSON1) +endif() + +target_include_directories(sqlcipher INTERFACE $) +if(NOT WIN32) + find_package(Threads REQUIRED) + target_link_libraries(sqlcipher PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) +endif() + +target_link_libraries(sqlcipher PRIVATE ${OPENSSL_CRYPTO_LIBRARY}) + +if(CMAKE_SYSTEM_NAME MATCHES "WindowsStore") + target_compile_definitions(sqlcipher PRIVATE -DSQLITE_OS_WINRT=1) +endif() + +if(NOT SQLITE3_SKIP_TOOLS) + add_executable(sqlcipher-bin shell.c) + target_link_libraries(sqlcipher-bin PRIVATE sqlcipher) + install(TARGETS sqlcipher-bin sqlcipher + RUNTIME DESTINATION tools/sqlcipher + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +endif() + +install( + TARGETS sqlcipher + EXPORT sqlcipher-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES sqlite3.h sqlite3ext.h DESTINATION include/sqlcipher CONFIGURATIONS Release) +install(EXPORT sqlcipher-targets NAMESPACE sqlcipher:: FILE sqlcipher-targets.cmake DESTINATION share/sqlcipher) diff --git a/ports/sqlcipher/portfile.cmake b/ports/sqlcipher/portfile.cmake new file mode 100644 index 00000000000000..02c27357c85609 --- /dev/null +++ b/ports/sqlcipher/portfile.cmake @@ -0,0 +1,86 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_fail_port_install( ON_TARGET "UWP" "OSX" "Linux") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sqlcipher/sqlcipher + REF v4.4.3 + SHA512 d80177cf658c145f7328bafac14bc2779afa463fc94ef0a5e99b6654cf2eece3088ac296949130e7263f52948913ffeac253c47e33d91816e90caf1788301a9a + HEAD_REF master +) + +# Don't use vcpkg_build_nmake, because it doesn't handle nmake targets correctly. +find_program(NMAKE nmake REQUIRED) + +# Find tclsh Executable needed for Amalgamation of SQLite +file(GLOB TCLSH_CMD + ${CURRENT_INSTALLED_DIR}/tools/tcl/bin/tclsh*${VCPKG_HOST_EXECUTABLE_SUFFIX} +) +file(TO_NATIVE_PATH "${TCLSH_CMD}" TCLSH_CMD) +file(TO_NATIVE_PATH "${SOURCE_PATH}" SOURCE_PATH_NAT) + +# Determine TCL version (e.g. [path]tclsh90s.exe -> 90) +string(REGEX REPLACE ^.*tclsh "" TCLVERSION ${TCLSH_CMD}) +string(REGEX REPLACE [A-Za-z]?${VCPKG_HOST_EXECUTABLE_SUFFIX}$ "" TCLVERSION ${TCLVERSION}) + +list(APPEND NMAKE_OPTIONS + TCLSH_CMD="${TCLSH_CMD}" + TCLVERSION=${TCLVERSION} + ORIGINAL_SRC="${SOURCE_PATH_NAT}" + EXT_FEATURE_FLAGS=-DSQLITE_TEMP_STORE=2\ -DSQLITE_HAS_CODEC + LTLIBS=libcrypto.lib + LTLIBPATHS=/LIBPATH:"${CURRENT_INSTALLED_DIR}/lib/" +) + +set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") + +# Creating amalgamation files +message(STATUS "Pre-building ${TARGET_TRIPLET}") +vcpkg_execute_required_process( + COMMAND ${NMAKE} -f Makefile.msc /A /NOLOGO clean tcl + ${NMAKE_OPTIONS} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME pre-build-${TARGET_TRIPLET} +) +message(STATUS "Pre-building ${TARGET_TRIPLET} done") + +# The rest of the build process with the CMakeLists.txt is merely a copy of sqlite3 + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + geopoly WITH_GEOPOLY + json1 WITH_JSON1 + INVERTED_FEATURES + tool SQLITE3_SKIP_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DSQLITE3_SKIP_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT} TARGET_PATH share/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(NOT SQLITE3_SKIP_TOOLS AND EXISTS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/sqlcipher-bin${VCPKG_HOST_EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/${PORT}/sqlcipher-bin${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/${PORT}/sqlcipher${VCPKG_HOST_EXECUTABLE_SUFFIX}) +endif() + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/sqlcipher-config.in.cmake + ${CURRENT_PACKAGES_DIR}/share/${PORT}/sqlcipher-config.cmake + @ONLY +) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) diff --git a/ports/sqlcipher/sqlcipher-config.in.cmake b/ports/sqlcipher/sqlcipher-config.in.cmake new file mode 100644 index 00000000000000..308ea4715cddfb --- /dev/null +++ b/ports/sqlcipher/sqlcipher-config.in.cmake @@ -0,0 +1,7 @@ + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/sqlcipher-targets.cmake) diff --git a/ports/sqlcipher/vcpkg.json b/ports/sqlcipher/vcpkg.json new file mode 100644 index 00000000000000..ed3ff2876f44b5 --- /dev/null +++ b/ports/sqlcipher/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "sqlcipher", + "version": "4.4.3", + "description": "SQLCipher extends the SQLite database library to add security enhancements that make it more suitable for encrypted local data storage.", + "homepage": "https://www.zetetic.net/sqlcipher", + "supports": "windows & !uwp & !static", + "dependencies": [ + "openssl", + "tcl" + ], + "features": { + "geopoly": { + "description": "enable geopoly functionality for sqlite3" + }, + "json1": { + "description": "enable JSON functionality for sqlite3" + }, + "tool": { + "description": "sqlite3 executable" + } + } +} diff --git a/ports/sqlite-modern-cpp/CONTROL b/ports/sqlite-modern-cpp/CONTROL deleted file mode 100644 index c8e3ccb642d606..00000000000000 --- a/ports/sqlite-modern-cpp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sqlite-modern-cpp -Version: 3.2-936cd0c8 -Build-Depends: sqlite3 -Homepage: https://github.com/aminroosta/sqlite_modern_cpp -Description: The C++14 wrapper around sqlite library diff --git a/ports/sqlite-modern-cpp/portfile.cmake b/ports/sqlite-modern-cpp/portfile.cmake index 35b364ddeb7402..5d4cad0406cf27 100644 --- a/ports/sqlite-modern-cpp/portfile.cmake +++ b/ports/sqlite-modern-cpp/portfile.cmake @@ -1,6 +1,4 @@ # header only -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SqliteModernCpp/sqlite_modern_cpp diff --git a/ports/sqlite-modern-cpp/vcpkg.json b/ports/sqlite-modern-cpp/vcpkg.json new file mode 100644 index 00000000000000..39dbdc1d1fbb73 --- /dev/null +++ b/ports/sqlite-modern-cpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "sqlite-modern-cpp", + "version-string": "3.2-936cd0c8", + "port-version": 1, + "description": "The C++14 wrapper around sqlite library", + "homepage": "https://github.com/aminroosta/sqlite_modern_cpp", + "dependencies": [ + "sqlite3" + ] +} diff --git a/ports/sqlite-orm/CONTROL b/ports/sqlite-orm/CONTROL deleted file mode 100644 index 6382eeca09b679..00000000000000 --- a/ports/sqlite-orm/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: sqlite-orm -Version: 1.3-1 -Build-Depends: sqlite3 -Description: SQLite ORM light header only library for modern C++ diff --git a/ports/sqlite-orm/fix-dependency.patch b/ports/sqlite-orm/fix-dependency.patch new file mode 100644 index 00000000000000..7372d67fe588f0 --- /dev/null +++ b/ports/sqlite-orm/fix-dependency.patch @@ -0,0 +1,10 @@ +diff --git a/cmake/SqliteOrmConfig.cmake.in b/cmake/SqliteOrmConfig.cmake.in +index e0635d2..30403cd 100644 +--- a/cmake/SqliteOrmConfig.cmake.in ++++ b/cmake/SqliteOrmConfig.cmake.in +@@ -1,4 +1,4 @@ + include(CMakeFindDependencyMacro) +-find_dependency(SQLite3) ++find_dependency(unofficial-sqlite3) + + include(${CMAKE_CURRENT_LIST_DIR}/SqliteOrmTargets.cmake) diff --git a/ports/sqlite-orm/fix-features-build-error.patch b/ports/sqlite-orm/fix-features-build-error.patch new file mode 100644 index 00000000000000..ce34583d179b9c --- /dev/null +++ b/ports/sqlite-orm/fix-features-build-error.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dd86d2f..6696809 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,15 +32,14 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") + include(CTest) + + ### Dependencies +-add_subdirectory(dependencies) + + ### Main Build Targets + set(SqliteOrm_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/include") + add_library(sqlite_orm INTERFACE) + add_library(sqlite_orm::sqlite_orm ALIAS sqlite_orm) + +-find_package(SQLite3 REQUIRED) +-target_link_libraries(sqlite_orm INTERFACE SQLite::SQLite3) ++find_package(unofficial-sqlite3 CONFIG REQUIRED) ++target_link_libraries(sqlite_orm INTERFACE unofficial::sqlite3::sqlite3) + + target_sources(sqlite_orm INTERFACE $) + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 2857b65..3ee46e6 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -4,5 +4,5 @@ file(GLOB files "*.cpp") + foreach(file ${files}) + get_filename_component(file_basename ${file} NAME_WE) + add_executable(${file_basename} ${file}) +- target_link_libraries(${file_basename} PRIVATE sqlite_orm sqlite3) ++ target_link_libraries(${file_basename} PRIVATE sqlite_orm) + endforeach() +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index fd41e70..8087899 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -7,9 +7,11 @@ option(SqliteOrm_SysSqlite "Use system version of sqlite library" OFF) + if(SqliteOrm_SysSqlite) + message(FATAL_ERROR "WIP: please, disable the SqliteOrm_SysSqlite option.") + else() +- add_subdirectory(third_party/sqlite) ++ find_package(unofficial-sqlite3 CONFIG REQUIRED) + endif() + ++find_package(Catch2 CONFIG REQUIRED) ++ + add_executable(unit_tests tests.cpp tests2.cpp tests3.cpp tests4.cpp tests5.cpp private_getters_tests.cpp pragma_tests.cpp explicit_columns.cpp core_functions_tests.cpp index_tests.cpp constraints/composite_key.cpp static_tests.cpp operators/arithmetic_operators.cpp operators/like.cpp operators/glob.cpp operators/in.cpp operators/cast.cpp operators/is_null.cpp operators/not_operator.cpp operators/bitwise.cpp dynamic_order_by.cpp prepared_statement_tests/select.cpp prepared_statement_tests/get_all.cpp prepared_statement_tests/get_all_pointer.cpp prepared_statement_tests/get_all_optional.cpp prepared_statement_tests/update_all.cpp prepared_statement_tests/remove_all.cpp prepared_statement_tests/get.cpp prepared_statement_tests/get_pointer.cpp prepared_statement_tests/get_optional.cpp prepared_statement_tests/update.cpp prepared_statement_tests/remove.cpp prepared_statement_tests/insert.cpp prepared_statement_tests/replace.cpp prepared_statement_tests/insert_range.cpp prepared_statement_tests/replace_range.cpp prepared_statement_tests/insert_explicit.cpp pragma_tests.cpp simple_query.cpp static_tests/is_bindable.cpp static_tests/arithmetic_operators_result_type.cpp static_tests/tuple_conc.cpp static_tests/node_tuple.cpp static_tests/bindable_filter.cpp static_tests/count_tuple.cpp static_tests/member_traits_tests.cpp static_tests/select_return_type.cpp constraints/default.cpp constraints/unique.cpp constraints/foreign_key.cpp constraints/check.cpp table_tests.cpp statement_serializator_tests/primary_key.cpp statement_serializator_tests/column_names.cpp statement_serializator_tests/autoincrement.cpp statement_serializator_tests/arithmetic_operators.cpp statement_serializator_tests/core_functions.cpp statement_serializator_tests/comparison_operators.cpp statement_serializator_tests/unique.cpp statement_serializator_tests/foreign_key.cpp statement_serializator_tests/collate.cpp statement_serializator_tests/check.cpp statement_serializator_tests/index.cpp statement_serializator_tests/indexed_column.cpp unique_cases/get_all_with_two_tables.cpp unique_cases/prepare_get_all_with_case.cpp unique_cases/index_named_table_with_fk.cpp unique_cases/issue525.cpp unique_cases/delete_with_two_fields.cpp unique_cases/join_iterator_ctor_compilation_error.cpp get_all_custom_containers.cpp select_asterisk.cpp backup_tests.cpp transaction_tests.cpp) + + diff --git a/ports/sqlite-orm/portfile.cmake b/ports/sqlite-orm/portfile.cmake index 6df00f77f7f4fd..e72426449a1e34 100644 --- a/ports/sqlite-orm/portfile.cmake +++ b/ports/sqlite-orm/portfile.cmake @@ -1,15 +1,35 @@ -include(vcpkg_common_functions) +# header-only library + +set(FEATURE_PATCHES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fnc12/sqlite_orm - REF v1.3 - SHA512 43adcd28bdca5d0165ca0313c5ff90e048144e4841541704f49e443deaf0d8e027655a3bb88677f3f3c62c5764fdda8b1e472d74e68f3a32cad052f3b4ed63a7 + REF 4c6a46bd4dcfba14a650e0fafb86331526878587 # 1.6 + SHA512 9626fc20374aff5da718d32c7b942a7a6434920da9cf68df6146e9c25cca61936c2e3091c6476c369c8bf241dcb8473169ee726eaedfeb92d79ff4fa8a6b2d32 HEAD_REF master + PATCHES + fix-features-build-error.patch + fix-dependency.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_TESTING + example BUILD_EXAMPLES ) -file(COPY ${SOURCE_PATH}/include/sqlite_orm DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DSQLITE_ORM_ENABLE_CXX_17=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SqliteOrm TARGET_PATH share/SqliteOrm) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlite-orm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/sqlite-orm/vcpkg.json b/ports/sqlite-orm/vcpkg.json new file mode 100644 index 00000000000000..ab5e89652e7d11 --- /dev/null +++ b/ports/sqlite-orm/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "sqlite-orm", + "version-string": "1.6", + "port-version": 1, + "description": "SQLite ORM light header only library for modern C++", + "homepage": "https://github.com/fnc12/sqlite_orm", + "dependencies": [ + "sqlite3" + ], + "features": { + "example": { + "description": "Build examples" + }, + "test": { + "description": "Build sqlite_orm unit tests", + "dependencies": [ + "catch2" + ] + } + } +} diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index 64ff002623f446..6250eb7111b979 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -3,7 +3,7 @@ project(sqlite3 C) include_directories(.) if(BUILD_SHARED_LIBS) - if(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Darwin") + if(UNIX) set(API "-DSQLITE_API=__attribute__((visibility(\"default\")))") elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") set(API "-DSQLITE_API=__declspec(dllexport)") @@ -24,6 +24,15 @@ target_compile_definitions( -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_ENABLE_COLUMN_METADATA ) + +if(WITH_GEOPOLY) + add_compile_definitions(SQLITE_ENABLE_GEOPOLY) +endif() + +if(WITH_JSON1) + add_compile_definitions(SQLITE_ENABLE_JSON1) +endif() + target_include_directories(sqlite3 INTERFACE $) if(NOT WIN32) find_package(Threads REQUIRED) @@ -46,11 +55,11 @@ endif() install( TARGETS sqlite3 - EXPORT sqlite3 + EXPORT unofficial-sqlite3-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release) -install(EXPORT sqlite3 FILE sqlite3-targets.cmake DESTINATION share/sqlite3) +install(EXPORT unofficial-sqlite3-targets NAMESPACE unofficial::sqlite3:: FILE unofficial-sqlite3-targets.cmake DESTINATION share/unofficial-sqlite3) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL deleted file mode 100644 index d4109ccc996857..00000000000000 --- a/ports/sqlite3/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: sqlite3 -Version: 3.29.0-1 -Homepage: https://sqlite.org/ -Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. - -Feature: tool -Description: sqlite3 executable diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index 4ddc2d8b2d491b..d843ee537b48ff 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - -set(SQLITE_VERSION 3290000) -set(SQLITE_HASH 3306ac3e37ec46f1b2ac74155756c82afadff7bf5b8b4c9b5516f5e8c1c785b5f50ec9b840482292f2f6c5d72cf6d9a78a0dfb727f0a9cf134b6c5522606e9b3 ) +set(SQLITE_VERSION 3360000) +set(SQLITE_HASH 5c18f158a599b1e91d95c91de3aa5c5de52f986845ad0cb49dfd56b650587e55e24d469571b5b864229b870d0eaf85d78893f61ef950b95389cb41692be37f58) vcpkg_download_distfile(ARCHIVE - URLS "https://sqlite.org/2019/sqlite-amalgamation-${SQLITE_VERSION}.zip" + URLS "https://sqlite.org/2021/sqlite-amalgamation-${SQLITE_VERSION}.zip" FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip" SHA512 ${SQLITE_HASH} ) @@ -16,32 +14,41 @@ vcpkg_extract_source_archive_ex( PATCHES fix-arm-uwp.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -set(SQLITE3_SKIP_TOOLS ON) -if("tool" IN_LIST FEATURES) - set(SQLITE3_SKIP_TOOLS OFF) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + geopoly WITH_GEOPOLY + json1 WITH_JSON1 + INVERTED_FEATURES + tool SQLITE3_SKIP_TOOLS +) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DSQLITE3_SKIP_TOOLS=${SQLITE3_SKIP_TOOLS} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} OPTIONS_DEBUG -DSQLITE3_SKIP_TOOLS=ON ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH share/unofficial-${PORT}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +if(NOT SQLITE3_SKIP_TOOLS AND EXISTS "${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX}") + file(RENAME "${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/sqlite3${VCPKG_HOST_EXECUTABLE_SUFFIX}") +endif() configure_file( - ${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake - ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3-config.cmake + "${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake" + "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-sqlite3-config.cmake" @ONLY ) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n") +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sqlite3.h" "# define SQLITE_API\n" "# define SQLITE_API __declspec(dllimport)\n") +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n") vcpkg_copy_pdbs() diff --git a/ports/sqlite3/sqlite3-config.in.cmake b/ports/sqlite3/sqlite3-config.in.cmake index 538342cf42961f..e7e26bf2cde563 100644 --- a/ports/sqlite3/sqlite3-config.in.cmake +++ b/ports/sqlite3/sqlite3-config.in.cmake @@ -4,4 +4,4 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) find_dependency(Threads) endif() -include(${CMAKE_CURRENT_LIST_DIR}/sqlite3-targets.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/unofficial-sqlite3-targets.cmake) diff --git a/ports/sqlite3/vcpkg.json b/ports/sqlite3/vcpkg.json new file mode 100644 index 00000000000000..f5054f6f8a9420 --- /dev/null +++ b/ports/sqlite3/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "sqlite3", + "version": "3.36.0", + "description": "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.", + "homepage": "https://sqlite.org/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "geopoly": { + "description": "enable geopoly functionality for sqlite3" + }, + "json1": { + "description": "enable JSON functionality for sqlite3" + }, + "tool": { + "description": "sqlite3 executable" + } + } +} diff --git a/ports/sqlitecpp/0001-Find-external-sqlite3.patch b/ports/sqlitecpp/0001-Find-external-sqlite3.patch deleted file mode 100644 index a59df97ae52098..00000000000000 --- a/ports/sqlitecpp/0001-Find-external-sqlite3.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 00e058c..489b884 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -199,7 +199,8 @@ install(EXPORT ${PROJECT_NAME}Config DESTINATION lib/cmake/${PROJECT_NAME}) - ## Build provided copy of SQLite3 C library ## - - # TODO --#find_package(sqlite3) -+find_package(sqlite3 CONFIG) -+target_link_libraries(SQLiteCpp PRIVATE sqlite3) - #if(sqlite3_VERSION VERSION_LESS "3.19") - # set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT") - #endif() diff --git a/ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch b/ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch new file mode 100644 index 00000000000000..9b3e0e4afec4a1 --- /dev/null +++ b/ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 85c1061..684205f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -232,16 +232,17 @@ if (SQLITECPP_INTERNAL_SQLITE) + add_subdirectory(sqlite3) + target_link_libraries(SQLiteCpp PUBLIC sqlite3) + else (SQLITECPP_INTERNAL_SQLITE) +- find_package (SQLite3 REQUIRED) +- message(STATUS "Link to sqlite3 system library") +- target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3) +- if(SQLite3_VERSION VERSION_LESS "3.19") +- set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT") +- endif() ++ if(NOT SQLITE_HAS_CODEC) ++ find_package(unofficial-sqlite3 CONFIG) ++ message(STATUS "Link to sqlite3 system library") ++ target_link_libraries(SQLiteCpp PRIVATE unofficial::sqlite3::sqlite3) ++ if(SQLite3_VERSION VERSION_LESS "3.19") ++ set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT") ++ endif() ++ else() ++ # When using the SQLite codec, we need to link against the sqlcipher lib & include ++ # So this gets the lib & header, and links/includes everything + +- # When using the SQLite codec, we need to link against the sqlcipher lib & include +- # So this gets the lib & header, and links/includes everything +- if(SQLITE_HAS_CODEC) + # Make PkgConfig optional since Windows doesn't usually have it installed. + find_package(PkgConfig QUIET) + if(PKG_CONFIG_FOUND) diff --git a/ports/sqlitecpp/CONTROL b/ports/sqlitecpp/CONTROL deleted file mode 100644 index 8d0fb047e7b33d..00000000000000 --- a/ports/sqlitecpp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: sqlitecpp -Version: 2.3.0 -Build-Depends: sqlite3 -Homepage: https://github.com/SRombauts/SQLiteCpp -Description: SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper. diff --git a/ports/sqlitecpp/fix_dependency.patch b/ports/sqlitecpp/fix_dependency.patch new file mode 100644 index 00000000000000..a55c94cffebd8e --- /dev/null +++ b/ports/sqlitecpp/fix_dependency.patch @@ -0,0 +1,11 @@ +diff --git a/cmake/SQLiteCppConfig.cmake.in b/cmake/SQLiteCppConfig.cmake.in +index 568922f..01196db 100644 +--- a/cmake/SQLiteCppConfig.cmake.in ++++ b/cmake/SQLiteCppConfig.cmake.in +@@ -1,5 +1,5 @@ + include(CMakeFindDependencyMacro) +-find_dependency(SQLite3 REQUIRED) ++find_dependency(unofficial-sqlite3 REQUIRED) + if(@UNIX@) + set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@) + find_dependency(Threads REQUIRED) diff --git a/ports/sqlitecpp/portfile.cmake b/ports/sqlitecpp/portfile.cmake index b57573d735c89c..efeb214506094c 100644 --- a/ports/sqlitecpp/portfile.cmake +++ b/ports/sqlitecpp/portfile.cmake @@ -1,23 +1,25 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO "SRombauts/SQLiteCpp" - REF 09dd10886c560ab5af41cfe694567f34c88cd101 + REF 3.1.1 HEAD_REF master - SHA512 d0a440e2e96fca9aac7fe73d46bb6508825a82547dca1e9c93d8c3ca46878fa137e7a2a7a865bcfa641d0236e26307a3342d55fc83578552a37eec7565642d91 + SHA512 9030b5249c149db8a5b2fe350f71613e4ee91061765a771640ed3ffa7c24aada4000ba884ef91790fdc0f13dc4519038c1edeba64b85b85ac09c3e955a7988a1 + PATCHES + 0001-unofficial-sqlite3-and-sqlcipher.patch + fix_dependency.patch ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Find-external-sqlite3.patch) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + sqlcipher SQLITE_HAS_CODEC +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + ${FEATURE_OPTIONS} -DSQLITECPP_RUN_CPPLINT=OFF -DSQLITECPP_RUN_CPPCHECK=OFF -DSQLITECPP_INTERNAL_SQLITE=OFF @@ -30,4 +32,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SQLiteCpp) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlitecpp RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sqlitecpp/vcpkg.json b/ports/sqlitecpp/vcpkg.json new file mode 100644 index 00000000000000..c86c7b95edc530 --- /dev/null +++ b/ports/sqlitecpp/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "sqlitecpp", + "version-string": "3.1.1", + "port-version": 1, + "description": "SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.", + "homepage": "https://github.com/SRombauts/SQLiteCpp", + "default-features": [ + "sqlite" + ], + "features": { + "sqlcipher": { + "description": "Use the sqlcipher port", + "dependencies": [ + { + "name": "sqlcipher", + "default-features": false + } + ] + }, + "sqlite": { + "description": "Use the (unofficial) sqlite3 port of vcpkg", + "dependencies": [ + "sqlite3" + ] + } + } +} diff --git a/ports/sqlpp11-connector-mysql/CONTROL b/ports/sqlpp11-connector-mysql/CONTROL deleted file mode 100644 index 78817eae768bf7..00000000000000 --- a/ports/sqlpp11-connector-mysql/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: sqlpp11-connector-mysql -Version: 0.25-2 -Description: A C++ wrapper for MySQL meant to be used in combination with sqlpp11. -Build-Depends: date, libmariadb, sqlpp11 diff --git a/ports/sqlpp11-connector-mysql/portfile.cmake b/ports/sqlpp11-connector-mysql/portfile.cmake index 9f93058a4a6d15..2dd953ff7afd81 100644 --- a/ports/sqlpp11-connector-mysql/portfile.cmake +++ b/ports/sqlpp11-connector-mysql/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rbock/sqlpp11-connector-mysql - REF 0.25 - SHA512 1351161eff5ecc3c2bc720f537e474fadc8f4843999e33274a9b1bccf21fd2b5785eb9588dedc951dcf1c09e4a90c8e2193e9046a43a1bc9d355045aaec71740 + REF 0.29 + SHA512 0c71d2ea94933be3bbaa8d6afaac7059660bdb0af5ba905844d95facb5e73a122c3ccd723a48a7fd8db0c028309ac6dc8b91c6838dfbfe530727161d62a1481f HEAD_REF master ) diff --git a/ports/sqlpp11-connector-mysql/vcpkg.json b/ports/sqlpp11-connector-mysql/vcpkg.json new file mode 100644 index 00000000000000..8eb8e93f57f39f --- /dev/null +++ b/ports/sqlpp11-connector-mysql/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "sqlpp11-connector-mysql", + "version-string": "0.29", + "port-version": 2, + "description": "A C++ wrapper for MySQL meant to be used in combination with sqlpp11.", + "homepage": "https://github.com/rbock/sqlpp11-connector-mysql", + "dependencies": [ + "date", + "sqlpp11" + ], + "default-features": [ + "mariadb" + ], + "features": { + "mariadb": { + "description": "Use MariaDB connector", + "dependencies": [ + "libmariadb" + ] + }, + "mysql": { + "description": "Use MySQL connector", + "dependencies": [ + "libmysql" + ] + } + } +} diff --git a/ports/sqlpp11-connector-sqlite3/CONTROL b/ports/sqlpp11-connector-sqlite3/CONTROL deleted file mode 100644 index 564a9a9a4dec83..00000000000000 --- a/ports/sqlpp11-connector-sqlite3/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: sqlpp11-connector-sqlite3 -Version: 0.29-2 -Description: A C++ wrapper for sqlite3 meant to be used in combination with sqlpp11. -Build-Depends: date, sqlite3, sqlpp11 diff --git a/ports/sqlpp11-connector-sqlite3/portfile.cmake b/ports/sqlpp11-connector-sqlite3/portfile.cmake index 6587df313eb6fc..1663ca73a0e3fa 100644 --- a/ports/sqlpp11-connector-sqlite3/portfile.cmake +++ b/ports/sqlpp11-connector-sqlite3/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rbock/sqlpp11-connector-sqlite3 - REF 0.29 - SHA512 99d1b36209dc879b12b99ed0809f1d21f760c62c25aa32d8f83b571d0819e35783ad20be0754288da9cd5fcb81cbb672031928d159ff9a64c3635dcbc4bda8fa + REF a06d6944a55349fbd0ab0337c45d80c6efa2ff81 # 0.30 + SHA512 51efe8914b5ccf8092e15a9a7b29798db070ce0b47bb87b212724e209149c3a81821a3841ac317f506356430d87d3f16a066c74f60ad1ad7bf1333c9de36916b HEAD_REF master ) diff --git a/ports/sqlpp11-connector-sqlite3/vcpkg.json b/ports/sqlpp11-connector-sqlite3/vcpkg.json new file mode 100644 index 00000000000000..09ebb22b5171a4 --- /dev/null +++ b/ports/sqlpp11-connector-sqlite3/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "sqlpp11-connector-sqlite3", + "version-string": "0.30", + "port-version": 1, + "description": "A C++ wrapper for sqlite3 meant to be used in combination with sqlpp11.", + "dependencies": [ + "date", + "sqlite3", + "sqlpp11" + ] +} diff --git a/ports/sqlpp11/CONTROL b/ports/sqlpp11/CONTROL deleted file mode 100644 index b371f0a8c6c852..00000000000000 --- a/ports/sqlpp11/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: sqlpp11 -Version: 0.58-1 -Description: A type safe embedded domain specific language for SQL queries and results in C++. -Build-Depends: date diff --git a/ports/sqlpp11/FixForMSVC.patch b/ports/sqlpp11/FixForMSVC.patch deleted file mode 100644 index 7535907071e137..00000000000000 --- a/ports/sqlpp11/FixForMSVC.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/include/sqlpp11/char_sequence.h b/include/sqlpp11/char_sequence.h -index 5759525..96cdbd0 100644 ---- a/include/sqlpp11/char_sequence.h -+++ b/include/sqlpp11/char_sequence.h -@@ -54,16 +54,16 @@ namespace sqlpp - } - }; - -- template -+ template - struct make_char_sequence_impl; - -- template -+ template - struct make_char_sequence_impl> - { - using type = char_sequence; - }; - -- template -+ template - using make_char_sequence = - typename make_char_sequence_impl>::type; - } // namespace sqlpp diff --git a/ports/sqlpp11/ddl2cpp_path.patch b/ports/sqlpp11/ddl2cpp_path.patch new file mode 100644 index 00000000000000..bc828e829f3cc2 --- /dev/null +++ b/ports/sqlpp11/ddl2cpp_path.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/Sqlpp11Config.cmake b/cmake/Sqlpp11Config.cmake +index 18ea9b1..730bce1 100644 +--- a/cmake/Sqlpp11Config.cmake ++++ b/cmake/Sqlpp11Config.cmake +@@ -32,7 +32,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/Sqlpp11Targets.cmake") + + # Import "ddl2cpp" script + if(NOT TARGET sqlpp11::ddl2cpp) +- get_filename_component(sqlpp11_ddl2cpp_location "${CMAKE_CURRENT_LIST_DIR}/../../../bin/sqlpp11-ddl2cpp" REALPATH) ++ get_filename_component(sqlpp11_ddl2cpp_location "${CMAKE_CURRENT_LIST_DIR}/../../scripts/sqlpp11-ddl2cpp" REALPATH) + if(NOT EXISTS "${sqlpp11_ddl2cpp_location}") + message(FATAL_ERROR "The imported target sqlpp11::ddl2cpp references the file '${sqlpp11_ddl2cpp_location}' but this file does not exists.") + endif() diff --git a/ports/sqlpp11/fix-dependency.patch b/ports/sqlpp11/fix-dependency.patch new file mode 100644 index 00000000000000..d43e10bf39e74d --- /dev/null +++ b/ports/sqlpp11/fix-dependency.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b8de9fa..82dd632 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,14 +32,11 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") + + include(CTest) + +- +-### Dependencies +-add_subdirectory(dependencies) +- + ### Main targets + add_library(sqlpp11 INTERFACE) + add_library(sqlpp11::sqlpp11 ALIAS sqlpp11) + ++find_package(date CONFIG REQUIRED) + target_link_libraries(sqlpp11 INTERFACE date::date) + + target_include_directories(sqlpp11 INTERFACE diff --git a/ports/sqlpp11/portfile.cmake b/ports/sqlpp11/portfile.cmake index 7fe915213c2acb..312c16d4e8ac3e 100644 --- a/ports/sqlpp11/portfile.cmake +++ b/ports/sqlpp11/portfile.cmake @@ -1,12 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rbock/sqlpp11 - REF 0.58 - SHA512 c391e72638a748e0e25b53176dc371ba468bc14bdcb6dda2f2418c4ab4d620ebc5507ee284ff81c3104888d0d959703c6c91b55ccd69a8641b07dcb20cd56209 + REF 085713d4d301aeb58e7d14f44cfac6ce35fe2e77 # 0.60 + SHA512 835536482def61c9978cda58507a7f5983b99765f69e7865cf5597b06075dc3e7ad4a3be0b2de2e44e4a4c3a6998115bf567ff586fb656cf5d95a0a7465fb2fe HEAD_REF master - PATCHES FixForMSVC.patch + PATCHES + ddl2cpp_path.patch + fix-dependency.patch ) # Use sqlpp11's own build process, skipping tests @@ -14,20 +14,20 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DENABLE_TESTS:BOOL=OFF + -DENABLE_TESTS:BOOL=OFF ) vcpkg_install_cmake() # Move CMake config files to the right place -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Sqlpp11 TARGET_PATH share/${PORT}) # Delete redundant and unnecessary directories -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/include/date) # Move python script from bin directory file(COPY ${CURRENT_PACKAGES_DIR}/bin/sqlpp11-ddl2cpp DESTINATION ${CURRENT_PACKAGES_DIR}/scripts) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlpp11 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/sqlpp11/vcpkg.json b/ports/sqlpp11/vcpkg.json new file mode 100644 index 00000000000000..63951d79747e2f --- /dev/null +++ b/ports/sqlpp11/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "sqlpp11", + "version-string": "0.60", + "port-version": 1, + "description": "A type safe embedded domain specific language for SQL queries and results in C++.", + "homepage": "https://github.com/rbock/sqlpp11", + "dependencies": [ + "date" + ] +} diff --git a/ports/sratom/CMakeLists.txt b/ports/sratom/CMakeLists.txt new file mode 100644 index 00000000000000..040f151d574275 --- /dev/null +++ b/ports/sratom/CMakeLists.txt @@ -0,0 +1,54 @@ +cmake_minimum_required(VERSION 3.17) +project(sratom C) + +find_package(lv2 CONFIG REQUIRED) +find_package(serd CONFIG REQUIRED) +find_package(sord CONFIG REQUIRED) + +add_library(sratom + src/sratom.c +) + +target_include_directories(sratom PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") + +target_link_libraries(sratom PUBLIC lv2::lv2 serd::serd sord::sord) + +set_target_properties(sratom PROPERTIES + C_STANDARD 99 + C_STANDARD_REQUIRED ON +) + +target_compile_definitions(sratom PRIVATE SRATOM_INTERNAL _CRT_SECURE_NO_WARNINGS) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(sratom PUBLIC SRATOM_SHARED) +endif() + +install( + TARGETS sratom + EXPORT sratom-targets + INCLUDES DESTINATION include +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY sratom DESTINATION include) +endif() + +install( + EXPORT sratom-targets + NAMESPACE sratom:: + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sratom" +) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sratom-config.cmake" [[ +include(CMakeFindDependencyMacro) +find_dependency(lv2 CONFIG) +find_dependency(serd CONFIG) +find_dependency(sord CONFIG) +include("${CMAKE_CURRENT_LIST_DIR}/sratom-targets.cmake") +]]) + +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/sratom-config.cmake" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sratom" +) diff --git a/ports/sratom/portfile.cmake b/ports/sratom/portfile.cmake new file mode 100644 index 00000000000000..a0446c3bec06ae --- /dev/null +++ b/ports/sratom/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO lv2/sratom + REF v0.6.4 + SHA512 c155694365e9efe2f108135cccafd6369e896bd27ec816ac8bb429785d9218b1b30e8532188cfb39485d4b163a920ddb47466a461dcd6958d754ed0698d31081 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/sratom/vcpkg.json b/ports/sratom/vcpkg.json new file mode 100644 index 00000000000000..013a4b436c29ef --- /dev/null +++ b/ports/sratom/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "sratom", + "version-string": "0.6.4", + "description": "Sratom is a library for serialising LV2 atoms to and from RDF, particularly the Turtle syntax.", + "homepage": "https://drobilla.net/software/sratom", + "license": "ISC", + "dependencies": [ + "lv2", + "serd", + "sord" + ] +} diff --git a/ports/srpc/portfile.cmake b/ports/srpc/portfile.cmake new file mode 100644 index 00000000000000..5b5dbc81a8eb5d --- /dev/null +++ b/ports/srpc/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sogou/srpc + REF v0.9.3 + SHA512 e64cfec279f833ad24b1942ef2b572fc4bd3bfc5f9d623cd5d25b3c869d2ff9b35250cc814e8aaeb919ebed0929c44407eb9abb2e6793cfdc967708210f5f7e3 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/srpc) +vcpkg_copy_pdbs() +vcpkg_copy_tools( + TOOL_NAMES srpc_generator + AUTO_CLEAN +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/srpc/vcpkg.json b/ports/srpc/vcpkg.json new file mode 100644 index 00000000000000..3b95d8da00f2f8 --- /dev/null +++ b/ports/srpc/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "srpc", + "version-semver": "0.9.3", + "description": "RPC based on Sogou C++ Workflow", + "homepage": "https://github.com/sogou/srpc", + "dependencies": [ + "lz4", + "openssl", + "protobuf", + "snappy", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "workflow", + "zlib" + ] +} diff --git a/ports/starlink-ast/portfile.cmake b/ports/starlink-ast/portfile.cmake new file mode 100644 index 00000000000000..054da29008f1e2 --- /dev/null +++ b/ports/starlink-ast/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX") + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Starlink/ast/releases/download/v9.2.4/ast-9.2.4.tar.gz" + FILENAME "ast-9.2.4.tar.gz" + SHA512 84e6f243e6d9d77328b73b97355feb3990307fb9c8f9b2f30344d71e2f5e63a849cdce0090ff5b7cc16028e12d68516c885b13d76db841072c9d1d06a7742a9e +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +set(CONFIGURE_OPTIONS "--without-fortran star_cv_cnf_trail_type=long star_cv_cnf_f2c_compatible=no") + +if ("yaml" IN_LIST FEATURES) + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --with-yaml") +else() + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --without-yaml") +endif() + +if ("pthreads" IN_LIST FEATURES) + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --with-pthreads") +else() + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --without-pthreads") +endif() + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + USE_WRAPPERS + DETERMINE_BUILD_TRIPLET + ADDITIONAL_MSYS_PACKAGES perl + OPTIONS ${CONFIGURE_OPTIONS} + OPTIONS_RELEASE ${CONFIGURE_OPTIONS_RELEASE} + OPTIONS_DEBUG ${CONFIGURE_OPTIONS_DEBUG} +) + +vcpkg_install_make() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share") + +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/starlink-ast/vcpkg.json b/ports/starlink-ast/vcpkg.json new file mode 100644 index 00000000000000..3248e265940b14 --- /dev/null +++ b/ports/starlink-ast/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "starlink-ast", + "version-semver": "9.2.4", + "port-version": 1, + "description": "The AST library provides a comprehensive range of facilities for attaching world coordinate systems to astronomical data, for retrieving and interpreting that information and for generating graphical output based on it", + "homepage": "https://starlink.eao.hawaii.edu/starlink/AST", + "supports": "windows", + "features": { + "pthreads": { + "description": "build with POSIX threads support", + "dependencies": [ + "pthreads" + ] + }, + "yaml": { + "description": "build with YAML support", + "dependencies": [ + "libyaml" + ] + } + } +} diff --git a/ports/status-code/portfile.cmake b/ports/status-code/portfile.cmake new file mode 100644 index 00000000000000..f369a3ba05a17d --- /dev/null +++ b/ports/status-code/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ned14/status-code + REF ab3cd8217b6a89b91708a497f77f119c096fcce3 + SHA512 266c79875fd6edb4a239768da29401193d5b710fe3d06208df010c5ca56bf80fa4558f572c738ab9290ee378437c882d072e93e8fb10fb1e3787b460f40a7102 + HEAD_REF master +) + +# Because status-code's deployed files are header-only, the debug build is not necessary +set(VCPKG_BUILD_TYPE release) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DPROJECT_IS_DEPENDENCY=On +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/status-code) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +file(RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include2") +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include") +file(RENAME "${CURRENT_PACKAGES_DIR}/include2" "${CURRENT_PACKAGES_DIR}/include/status-code") + +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/status-code/usage b/ports/status-code/usage new file mode 100644 index 00000000000000..52d8cd77c88b66 --- /dev/null +++ b/ports/status-code/usage @@ -0,0 +1,4 @@ +The package status-code provides CMake targets: + + find_package(status-code CONFIG REQUIRED) + target_link_libraries(main PUBLIC status-code::hl) diff --git a/ports/status-code/vcpkg.json b/ports/status-code/vcpkg.json new file mode 100644 index 00000000000000..6a47ecd029f48c --- /dev/null +++ b/ports/status-code/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "status-code", + "version-string": "1.0.0-ab3cd821", + "port-version": 1, + "description": "Proposed SG14 status_code for the C++ standard (https://wg21.link/P1028).", + "homepage": "https://github.com/ned14/status-code" +} diff --git a/ports/status-value-lite/portfile.cmake b/ports/status-value-lite/portfile.cmake new file mode 100644 index 00000000000000..3e935cd5c369f1 --- /dev/null +++ b/ports/status-value-lite/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/status-value-lite + REF v1.1.0 + SHA512 09cad9f40f2b1592316b374e0d1a206e3a79a1c560a2ae3be3bdae9045fa026435cc29f1eee08e26e29a5499f8dc60e485adc50517a827977678d3a5a6e220d2 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_TESTS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNSSV_OPT_BUILD_TESTS=${BUILD_TESTS} + -DNSSV_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/status_value-lite) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/status-value-lite/vcpkg.json b/ports/status-value-lite/vcpkg.json new file mode 100644 index 00000000000000..9850afb43046a6 --- /dev/null +++ b/ports/status-value-lite/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "status-value-lite", + "version-string": "1.1.0", + "port-version": 1, + "description": "status_value is a single-file header-only library for objects that represent a status and an optional value. It is intended for use with C++11 and later.", + "homepage": "https://github.com/martinmoene/status-value-lite", + "features": { + "test": { + "description": "Build with test" + } + } +} diff --git a/ports/stb/CONTROL b/ports/stb/CONTROL deleted file mode 100644 index ff7778020ea1b2..00000000000000 --- a/ports/stb/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: stb -Version: 2019-05-07 -Homepage: https://github.com/nothings/stb -Description: stb single-file public domain libraries for C/C++ diff --git a/ports/stb/FindStb.cmake b/ports/stb/FindStb.cmake new file mode 100644 index 00000000000000..4ffa8b1ff478c7 --- /dev/null +++ b/ports/stb/FindStb.cmake @@ -0,0 +1,29 @@ +# Distributed under the OSI-approved BSD 3-Clause License. + +#.rst: +# FindStb +# ------------ +# +# Find the Stb include headers. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module defines the following variables: +# +# ``Stb_FOUND`` +# True if Stb library found +# +# ``Stb_INCLUDE_DIR`` +# Location of Stb headers +# + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + +if(NOT Stb_INCLUDE_DIR) + find_path(Stb_INCLUDE_DIR NAMES stb_image.h PATHS ${Stb_DIR} PATH_SUFFIXES include) +endif() + +find_package_handle_standard_args(Stb DEFAULT_MSG Stb_INCLUDE_DIR) +mark_as_advanced(Stb_INCLUDE_DIR) diff --git a/ports/stb/portfile.cmake b/ports/stb/portfile.cmake index 0a0f2397b9c303..439d154a006ef0 100644 --- a/ports/stb/portfile.cmake +++ b/ports/stb/portfile.cmake @@ -1,17 +1,14 @@ -#header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nothings/stb - REF 1034f5e5c4809ea0a7f4387e0cd37c5184de3cdd - SHA512 efc3deedd687615a6706b0d315ded8d76edb28fcd6726531956fde9bba81cc62f25df0a1f998b56e16ab0c62989687c7d5b58875789470c2bf7fd457b1ff6535 + REF b42009b3b9d4ca35bc703f5310eedc74f584be58 # accessed on 2020-09-14 + SHA512 a9ba80d19dae4e527171bb02e1caa4d3eb0704cdf7f8fef1a7a09e6b05c65b829b0aa580f469f158a39bf13018289f40c1680ab5c22bfa5e932bff94eced475d HEAD_REF master ) -# Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/stb/README.md) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/stb/README.md ${CURRENT_PACKAGES_DIR}/share/stb/copyright) - -# Copy the stb header files file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/FindStb.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/stb/vcpkg-cmake-wrapper.cmake b/ports/stb/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..e787d29f05cbe3 --- /dev/null +++ b/ports/stb/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(STB_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${STB_PREV_MODULE_PATH}) diff --git a/ports/stb/vcpkg.json b/ports/stb/vcpkg.json new file mode 100644 index 00000000000000..f7dd85dac89ce6 --- /dev/null +++ b/ports/stb/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "stb", + "version-string": "2020-09-14", + "port-version": 1, + "description": "public domain header-only libraries", + "homepage": "https://github.com/nothings/stb" +} diff --git a/ports/stlab/CONTROL b/ports/stlab/CONTROL deleted file mode 100644 index 6a289c53192822..00000000000000 --- a/ports/stlab/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: stlab -Version: 1.4.1-1 -Description: - stlab is the ongoing work of what was Adobe’s Software Technology Lab. - The Concurrency library provides futures and channels, high level constructs for implementing algorithms that eases the use of multiple CPU cores while minimizing contention. This library solves several problems of the C++11 and C++17 TS futures. -Build-Depends: boost-variant (osx) \ No newline at end of file diff --git a/ports/stlab/dont-require-testing.patch b/ports/stlab/dont-require-testing.patch deleted file mode 100644 index f5c2106e7f4f1a..00000000000000 --- a/ports/stlab/dont-require-testing.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d058bbe..260d940 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -123,8 +123,7 @@ if ( stlab.testing OR stlab.boost_variant OR stlab.boost_optional ) - endif() - endif() - -- -- if(NOT TARGET Boost::unit_test_framework) -+ if (stlab.testing AND NOT TARGET Boost::unit_test_framework) - message(FATAL_ERROR "Could not find Boost unit test framework.") - endif() - diff --git a/ports/stlab/portfile.cmake b/ports/stlab/portfile.cmake index 2bcb7d1028f4de..8bfecad31da6c6 100644 --- a/ports/stlab/portfile.cmake +++ b/ports/stlab/portfile.cmake @@ -1,12 +1,9 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO stlab/libraries - REF v1.4.1 - SHA512 e9da6f2c570397842f5e73a681f49c5a77977fda430ec730eed6f19d04161172829b7f1adcafd416f0a3f35ea8717ca14e9b935b5ec8fa423e4951c3ba961c7a - HEAD_REF develop - PATCHES dont-require-testing.patch + REF 0a7232a4120c2daf8ddb6621ec13f313a029e495 # V1.6.2 + SHA512 6e03a5370d02accd798fc14fd256ab593b9a33b4a9b9cda8f2233eeafacf70c389c2999d1834b7ffef6968008921d28d88bcf728a322ba7943106ddc9d8e6f16 + HEAD_REF develop ) vcpkg_configure_cmake( @@ -17,10 +14,14 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/stlab) +vcpkg_copy_pdbs() -# cleanup -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cmake/stlab ${CURRENT_PACKAGES_DIR}/share/stlab) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/cmake) -# handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/stlab RENAME copyright) \ No newline at end of file +file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/stlabConfig.cmake STLAB_CONFIG) +string(REPLACE "find_dependency(Boost 1.60.0)" "if(APPLE)\nfind_dependency(Boost)\nendif()" STLAB_CONFIG ${STLAB_CONFIG}) + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/stlabConfig.cmake "${STLAB_CONFIG}") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/stlab/vcpkg.json b/ports/stlab/vcpkg.json new file mode 100644 index 00000000000000..a3041dca71b1d7 --- /dev/null +++ b/ports/stlab/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "stlab", + "version-string": "1.6.2", + "port-version": 1, + "description": [ + "stlab is the ongoing work of what was Adobe Software Technology Lab.", + "The Concurrency library provides futures and channels, high level constructs for implementing algorithms that eases the use of multiple CPU cores while minimizing contention. This library solves several problems of the C++11 and C++17 TS futures." + ], + "dependencies": [ + { + "name": "boost-variant", + "platform": "osx" + } + ] +} diff --git a/ports/stormlib/CMakeLists.txt b/ports/stormlib/CMakeLists.txt index 6b0e2a66cd5d72..e8bf793abf1c1c 100644 --- a/ports/stormlib/CMakeLists.txt +++ b/ports/stormlib/CMakeLists.txt @@ -268,12 +268,19 @@ if(WIN32) target_compile_definitions(stormlib PRIVATE UNICODE _UNICODE) endif() +if(NOT MSVC) + # don't error on implicit declarations, which are invalid in C99 but commonly used + target_compile_options(stormlib PRIVATE -Wno-error=implicit-function-declaration) +endif() + + set_target_properties(stormlib PROPERTIES PUBLIC_HEADER "src/StormLib.h;src/StormPort.h") install(TARGETS stormlib EXPORT stormlibConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib + PUBLIC_HEADER DESTINATION include ) -install(EXPORT stormlibConfig NAMESPACE stormlib:: DESTINATION share/stormlib) \ No newline at end of file +install(EXPORT stormlibConfig NAMESPACE stormlib:: DESTINATION share/stormlib) diff --git a/ports/stormlib/CONTROL b/ports/stormlib/CONTROL deleted file mode 100644 index beb6fd3c12f233..00000000000000 --- a/ports/stormlib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: stormlib -Version: 2019-05-10 -Build-Depends: zlib, bzip2 -Description: StormLib is a library for opening and manipulating Blizzard MPQ files diff --git a/ports/stormlib/portfile.cmake b/ports/stormlib/portfile.cmake index d0e9e36a491015..b494d5606f2853 100644 --- a/ports/stormlib/portfile.cmake +++ b/ports/stormlib/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ladislav-zezula/StormLib diff --git a/ports/stormlib/vcpkg.json b/ports/stormlib/vcpkg.json new file mode 100644 index 00000000000000..b293260eca7458 --- /dev/null +++ b/ports/stormlib/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "stormlib", + "version-string": "2019-05-10", + "port-version": 3, + "description": "StormLib is a library for opening and manipulating Blizzard MPQ files", + "dependencies": [ + "bzip2", + "zlib" + ] +} diff --git a/ports/strict-variant/CONTROL b/ports/strict-variant/CONTROL deleted file mode 100644 index 598dd376c0d76c..00000000000000 --- a/ports/strict-variant/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: strict-variant -Version: 0.5 -Description: Tagged union implementation that will never throw an exception or make a dynamic allocation in the effort of supporting types that have throwing moves. diff --git a/ports/strict-variant/portfile.cmake b/ports/strict-variant/portfile.cmake index 98108b9b15f098..cc258b561c0fa8 100644 --- a/ports/strict-variant/portfile.cmake +++ b/ports/strict-variant/portfile.cmake @@ -1,6 +1,4 @@ # header-only -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cbeck88/strict-variant diff --git a/ports/strict-variant/vcpkg.json b/ports/strict-variant/vcpkg.json new file mode 100644 index 00000000000000..f95e19258ca59c --- /dev/null +++ b/ports/strict-variant/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "strict-variant", + "version-string": "0.5", + "port-version": 1, + "description": "Tagged union implementation that will never throw an exception or make a dynamic allocation in the effort of supporting types that have throwing moves." +} diff --git a/ports/string-theory/CONTROL b/ports/string-theory/CONTROL deleted file mode 100644 index ec053695c5b8c0..00000000000000 --- a/ports/string-theory/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: string-theory -Version: 2.2 -Homepage: https://github.com/zrax/string_theory -Description: Flexible C++11 string library with type-safe formatting. diff --git a/ports/string-theory/portfile.cmake b/ports/string-theory/portfile.cmake index f8f9b216ff868b..fb4a512eef51f4 100644 --- a/ports/string-theory/portfile.cmake +++ b/ports/string-theory/portfile.cmake @@ -1,24 +1,14 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zrax/string_theory - REF 2.2 - SHA512 84b0eb645fdb302f233c162afbcea1b1b201546a60d81448a86437fe599c4184d7abe3d6ea8bd1743bdffab75bcd4e4ab296ce1fffb7da8ae6aab880d0bbda2d + REF 3.4 + SHA512 36ad82c6da276b7cb66d350ceb4bed2a66f768a6604b2981331ceec6a96d03cc3a7e7e5f733de88ec15e0ea41f99f8657b959a51149c540f530d06268c5657ff HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(ST_BUILD_STATIC ON) -else() - set(ST_BUILD_STATIC OFF) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DST_BUILD_STATIC=${ST_BUILD_STATIC} ) vcpkg_install_cmake() @@ -26,14 +16,8 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/string_theory) file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory ${CURRENT_PACKAGES_DIR}/share/string_theory) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -vcpkg_copy_pdbs() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/string-theory) diff --git a/ports/string-theory/vcpkg.json b/ports/string-theory/vcpkg.json new file mode 100644 index 00000000000000..2a79ccb4f9c641 --- /dev/null +++ b/ports/string-theory/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "string-theory", + "version-string": "3.4", + "port-version": 1, + "description": "Flexible modern C++ string library with type-safe formatting.", + "homepage": "https://github.com/zrax/string_theory" +} diff --git a/ports/string-view-lite/CONTROL b/ports/string-view-lite/CONTROL deleted file mode 100644 index f14d36c97066e1..00000000000000 --- a/ports/string-view-lite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: string-view-lite -Version: 1.3.0 -Description: A C++17-like string_view for C++98, C++11 and later in a single-file header-only library diff --git a/ports/string-view-lite/portfile.cmake b/ports/string-view-lite/portfile.cmake index 068b16c084af1d..95e18d68a0ff01 100644 --- a/ports/string-view-lite/portfile.cmake +++ b/ports/string-view-lite/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/string-view-lite diff --git a/ports/string-view-lite/vcpkg.json b/ports/string-view-lite/vcpkg.json new file mode 100644 index 00000000000000..1e15f0164572c8 --- /dev/null +++ b/ports/string-view-lite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "string-view-lite", + "version-string": "1.3.0", + "port-version": 1, + "description": "A C++17-like string_view for C++98, C++11 and later in a single-file header-only library" +} diff --git a/ports/strtk/CONTROL b/ports/strtk/CONTROL deleted file mode 100644 index 0effa1bb04b12e..00000000000000 --- a/ports/strtk/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: strtk -Version: 2019-01-09 -Homepage: https://github.com/ArashPartow/strtk -Description: robust, optimized and portable string processing algorithms for the C++ language -Build-Depends: boost diff --git a/ports/strtk/portfile.cmake b/ports/strtk/portfile.cmake index 6790325bf102f2..770f183c06cc55 100644 --- a/ports/strtk/portfile.cmake +++ b/ports/strtk/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/strtk - REF c6168dda1deed942b2fbfde9d80f53049fa79f20 - SHA512 7595f412838e86d4b7cf0ca3da4dc8aebe40011fb29058e1ee42e23923fbbadeb9a2d0fceac3362b2d0a228ff86c111457f9204b533edb8e0379f3022976906e + REF d9cc24c696ca3aea25d2ac8c2c495e18d7e6cd89 # accessed on 2020-09-14 + SHA512 c37c0df1dd3f7bc1dfcceea83ed9303cf9388ba400ee645f26a24bca50bf85209f7b8a2169f6b98b0267ece986a29a27605ff3eaef50a44629fb7e042d06f26a ) file(COPY ${SOURCE_PATH}/strtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/strtk/vcpkg.json b/ports/strtk/vcpkg.json new file mode 100644 index 00000000000000..41a303b3753a05 --- /dev/null +++ b/ports/strtk/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "strtk", + "version-string": "2020-09-14", + "port-version": 1, + "description": "robust, optimized and portable string processing algorithms for the C++ language", + "homepage": "https://github.com/ArashPartow/strtk", + "dependencies": [ + "boost" + ] +} diff --git a/ports/stx/CMakeLists.patch b/ports/stx/CMakeLists.patch new file mode 100644 index 00000000000000..70aaccbfda8e73 --- /dev/null +++ b/ports/stx/CMakeLists.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4ed99e..b0d2b15 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -204,12 +204,7 @@ endif() + # =============================================== + + if(STX_ENABLE_BACKTRACE) +- if(NOT EXISTS third_party/abseil) +- execute_process( +- COMMAND git submodule update --init --recursive third_party/abseil +- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +- endif() +- add_subdirectory(third_party/abseil) ++ find_package(absl CONFIG REQUIRED) + endif() + + # the atomics library doesn't automatically link on my Android phone +@@ -246,13 +241,17 @@ else() + add_library(stx STATIC ${STX_SRCS}) + endif() + +-target_include_directories(stx PUBLIC include) ++target_include_directories(stx PUBLIC ++ $ ++ $ ++) ++ + target_compile_options(stx PRIVATE ${STX_FLAGS} ${STX_WARNING_FLAGS}) + target_compile_definitions(stx PUBLIC ${STX_COMPILER_DEFS}) + target_link_libraries(stx ${STX_LIB_DEPENDENCIES}) + + if(STX_ENABLE_BACKTRACE) +- target_link_libraries(stx absl::stacktrace absl::symbolize) ++ target_link_libraries(stx PUBLIC absl::stacktrace absl::symbolize) + endif() + + if(ANDROID) +@@ -288,6 +287,7 @@ endif() + # + # =============================================== + ++ + if(STX_BUILD_BENCHMARKS) + + if(NOT EXISTS third_party/benchmark) +@@ -433,3 +433,24 @@ if(STX_BUILD_DOCS) + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/docs/html/assets) + + endif() ++ ++install( ++ TARGETS stx ++ EXPORT stx ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin ++) ++ ++install( ++ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ ++ DESTINATION include ++ FILES_MATCHING PATTERN "*.h*") ++ ++install( ++ EXPORT stx ++ DESTINATION share/stx ++ FILE stxConfig.cmake ++ NAMESPACE stx:: ++) ++ diff --git a/ports/stx/portfile.cmake b/ports/stx/portfile.cmake new file mode 100644 index 00000000000000..ebfca54ab39778 --- /dev/null +++ b/ports/stx/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lamarrr/STX + REF v1.0.1 + SHA512 544ca32f07cd863082fa9688f5d56e2715b0129ff90d2a8533cc24a92c943e5848c4b2b06a71f54c12668f6e89e9e3c649f595f9eb886f671a5fa18d343f794b + HEAD_REF master + PATCHES + "CMakeLists.patch" +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + backtrace STX_ENABLE_BACKTRACE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DSTX_BUILD_DOCS=OFF + -DSTX_BUILD_BENCHMARKS=OFF + -DSTX_BUILD_SHARED=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/stx) +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" +) diff --git a/ports/stx/vcpkg.json b/ports/stx/vcpkg.json new file mode 100644 index 00000000000000..536f557519781e --- /dev/null +++ b/ports/stx/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "stx", + "version-string": "1.0.1", + "port-version": 1, + "description": "C++17 & C++ 20 error-handling and utility extensions", + "homepage": "https://github.com/lamarrr/STX", + "features": { + "backtrace": { + "description": "stacktrace support for STX", + "dependencies": [ + "abseil" + ] + } + } +} diff --git a/ports/stxxl/CONTROL b/ports/stxxl/CONTROL deleted file mode 100644 index 42609d34f35f57..00000000000000 --- a/ports/stxxl/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: stxxl -Version: 2018-11-15-2 -Description: Standard Template Library for Extra Large Data Sets diff --git a/ports/stxxl/portfile.cmake b/ports/stxxl/portfile.cmake index 01d072d0929541..a45fce791fb945 100644 --- a/ports/stxxl/portfile.cmake +++ b/ports/stxxl/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/stxxl/vcpkg.json b/ports/stxxl/vcpkg.json new file mode 100644 index 00000000000000..1a3847d57b2d0a --- /dev/null +++ b/ports/stxxl/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "stxxl", + "version-string": "2018-11-15", + "port-version": 3, + "description": "Standard Template Library for Extra Large Data Sets" +} diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL deleted file mode 100644 index 82ee5e5e0df753..00000000000000 --- a/ports/suitesparse/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: suitesparse -Version: 5.4.0-3 -Build-Depends: clapack (!osx) -Homepage: http://faculty.cse.tamu.edu/davis/SuiteSparse -Description: algebra library - -Feature: metis -Build-Depends: metis -Description: Use metis in SuiteSparse diff --git a/ports/suitesparse/FindCXSparse.cmake b/ports/suitesparse/FindCXSparse.cmake new file mode 100644 index 00000000000000..65d596acaea2c1 --- /dev/null +++ b/ports/suitesparse/FindCXSparse.cmake @@ -0,0 +1,73 @@ +# Distributed under the OSI-approved BSD 3-Clause License. +# +#.rst: +# FindCXSparse +# -------- +# +# Find the CXSparse library +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# The following variables will be defined: +# +# ``CXSparse_FOUND`` +# True if CXSparse found on the local system +# +# ``CXSPARSE_FOUND`` +# True if CXSparse found on the local system +# +# ``CXSparse_INCLUDE_DIRS`` +# Location of CXSparse header files +# +# ``CXSPARSE_INCLUDE_DIRS`` +# Location of CXSparse header files +# +# ``CXSparse_LIBRARIES`` +# List of the CXSparse libraries found +# +# ``CXSPARSE_LIBRARIES`` +# List of the CXSparse libraries found +# +# + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + +find_path(CXSPARSE_INCLUDE_DIR NAMES cs.h PATH_SUFFIXES suitesparse) + +find_library(CXSPARSE_LIBRARY_RELEASE NAMES cxsparse libcxsparse) +find_library(CXSPARSE_LIBRARY_DEBUG NAMES cxsparsed libcxsparsed) +select_library_configurations(CXSPARSE) + +if(CXSPARSE_INCLUDE_DIR) + set(CXSPARSE_VERSION_FILE ${CXSPARSE_INCLUDE_DIR}/cs.h) + file(READ ${CXSPARSE_INCLUDE_DIR}/cs.h CXSPARSE_VERSION_FILE_CONTENTS) + + string(REGEX MATCH "#define CS_VER [0-9]+" + CXSPARSE_MAIN_VERSION "${CXSPARSE_VERSION_FILE_CONTENTS}") + string(REGEX REPLACE "#define CS_VER ([0-9]+)" "\\1" + CXSPARSE_MAIN_VERSION "${CXSPARSE_MAIN_VERSION}") + + string(REGEX MATCH "#define CS_SUBVER [0-9]+" + CXSPARSE_SUB_VERSION "${CXSPARSE_VERSION_FILE_CONTENTS}") + string(REGEX REPLACE "#define CS_SUBVER ([0-9]+)" "\\1" + CXSPARSE_SUB_VERSION "${CXSPARSE_SUB_VERSION}") + + string(REGEX MATCH "#define CS_SUBSUB [0-9]+" + CXSPARSE_SUBSUB_VERSION "${CXSPARSE_VERSION_FILE_CONTENTS}") + string(REGEX REPLACE "#define CS_SUBSUB ([0-9]+)" "\\1" + CXSPARSE_SUBSUB_VERSION "${CXSPARSE_SUBSUB_VERSION}") + + set(CXSPARSE_VERSION "${CXSPARSE_MAIN_VERSION}.${CXSPARSE_SUB_VERSION}.${CXSPARSE_SUBSUB_VERSION}") +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(CXSparse + REQUIRED_VARS CXSPARSE_INCLUDE_DIR CXSPARSE_LIBRARIES + VERSION_VAR CXSPARSE_VERSION) + +set(CXSPARSE_FOUND ${CXSparse_FOUND}) +set(CXSPARSE_INCLUDE_DIRS ${CXSPARSE_INCLUDE_DIR}) +set(CXSparse_INCLUDE_DIRS ${CXSPARSE_INCLUDE_DIR}) +set(CXSparse_LIBRARIES ${CXSPARSE_LIBRARIES}) diff --git a/ports/suitesparse/build_fixes.patch b/ports/suitesparse/build_fixes.patch new file mode 100644 index 00000000000000..2734bb02cef03f --- /dev/null +++ b/ports/suitesparse/build_fixes.patch @@ -0,0 +1,281 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9602cce..dafb434 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,14 +5,6 @@ + # Updated by jesnault (jerome.esnault@inria.fr) 2014-01-21 + # ----------------------------------------------------------------- + +-option(HUNTER_ENABLED "Enable Hunter package manager support" OFF) +-include(cmake/HunterGate.cmake) +- +-HunterGate( +- URL "https://github.com/ruslo/hunter/archive/v0.23.214.tar.gz" +- SHA1 "e14bc153a7f16d6a5eeec845fb0283c8fad8c358" +-) +- + PROJECT(SuiteSparseProject) + + cmake_minimum_required(VERSION 3.1) +@@ -47,29 +39,9 @@ else() + message(STATUS "Using user defined CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") + endif() + +-# Fix GKlib path: +-IF(NOT WIN32) +- SET(GKLIB_PATH "${${PROJECT_NAME}_SOURCE_DIR}/SuiteSparse/metis-5.1.0/GKlib" CACHE INTERNAL "Path to GKlib (for METIS)" FORCE) +-ENDIF() +- +-# allow creating DLLs in Windows without touching the source code: +-IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.4.0" AND WIN32) +- set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +-ENDIF() +- + ## get CMAKE_INSTALL_BINDIR and CMAKE_INSTALL_LIBDIR + include(GNUInstallDirs) + +-if(CMAKE_SIZEOF_VOID_P MATCHES "8") +- set(SUITESPARSE_LIB_POSTFIX "64") +-else() +- set(SUITESPARSE_LIB_POSTFIX "") +-endif() +- +-## get POSTFIX for lib install dir +-set(LIB_POSTFIX "${SUITESPARSE_LIB_POSTFIX}" CACHE STRING "suffix for 32/64 inst dir placement") +-mark_as_advanced(LIB_POSTFIX) +- + # We want libraries to be named "libXXX" and "libXXXd" in all compilers: + # ------------------------------------------------------------------------ + set(CMAKE_DEBUG_POSTFIX "d") +@@ -77,59 +49,6 @@ IF(MSVC) + set(SP_LIB_PREFIX "lib") # Libs are: "libXXX" + ENDIF(MSVC) + +-## check if we can build metis +-SET(BUILD_METIS_DEFAULT ON) +-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/SuiteSparse/metis-5.1.0/CMakeLists.txt") +- SET(BUILD_METIS_DEFAULT OFF) +-endif() +- +-SET(WITH_CUDA OFF CACHE BOOL "Build with CUDA support") +- +-SET(BUILD_METIS ${BUILD_METIS_DEFAULT} CACHE BOOL "Build METIS for partitioning?") +-SET(METIS_DIR ${${PROJECT_NAME}_SOURCE_DIR}/SuiteSparse/metis-5.1.0 CACHE PATH "Source directory of METIS") +- +-if(BUILD_METIS) +- ## prepare the installation : +- ## using metis target here is not possible because this target is added in another branch of the CMake structure +- ## TRICK: need to dynamically modify the metis CMakeLists.txt file before it going to parsed... +- ## (very ugly/poor for a metis project get from SCM (git/svn/cvs) but it's works ;) and it doesn't matter if metis was get from .zip) +- if(EXISTS "${METIS_DIR}/libmetis/CMakeLists.txt") +- file(READ "${METIS_DIR}/libmetis/CMakeLists.txt" contentFile) +- string(REGEX MATCH "EXPORT SuiteSparseTargets" alreadyModified ${contentFile}) ## use a string pattern to check if we have to do the modif +- if(NOT alreadyModified) +- file(APPEND "${METIS_DIR}/libmetis/CMakeLists.txt" +- " +- set_target_properties(metis PROPERTIES PUBLIC_HEADER \"../include/metis.h\") +- install(TARGETS metis ## this line is also the string pattern to check if the modification had already done +- EXPORT SuiteSparseTargets +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- PUBLIC_HEADER DESTINATION include +- ) +- " +- ) +- endif() +- endif() +- add_subdirectory(SuiteSparse/metis-5.1.0) ## important part for building metis from its src files +-endif(BUILD_METIS) +- +- +-## For EXPORT only : +-## Previous version of cmake (>2.8.12) doesn't auto take into account external lib (here I mean blas and lapack) we need to link to for our current target we want to export. +-## Or at least we need to investigate how to do with previous version. +-## This may cause some trouble in case you want to build in static mode and then use it into another custom project. +-## You will need to manually link your target into your custom project to the correct dependencies link interfaces. +-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" GREATER 2.8.11) ## (policies introduced both in 2.8.12) +- set(EXPORT_USE_INTERFACE_LINK_LIBRARIES ON CACHE BOOL "") +- mark_as_advanced(EXPORT_USE_INTERFACE_LINK_LIBRARIES) +- if(EXPORT_USE_INTERFACE_LINK_LIBRARIES) +- cmake_policy(SET CMP0023 NEW) ## just for respecting the new target_link_libraries(...) signature procedure +- cmake_policy(SET CMP0022 NEW) ## use INTERFACE_LINK_LIBRARIES property for in-build targets and ignore old properties (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_)? +- ## Here, next version of cmake 2.8.12 auto take into account the link interface dependencies (see generated cmake/SuiteSparse-config*.cmake into your install dir) +- endif() +-endif() +- + ## install_suitesparse_project(targetName headersList) + ## factorise the way we will install all projects (part of the suitesparse project) + ## is the target of the current project you build +@@ -176,16 +95,16 @@ macro(declare_suitesparse_library targetName srcsList headersList) + set(dsl_TARGET_PUBLIC_LINK "") + endif() + if(WITH_CUDA) +- find_package(CUDA) ++ find_package(CUDA REQUIRED) + endif() +- IF(${CUDA_FOUND}) ++ IF(CUDA_FOUND) + INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS}) + INCLUDE_DIRECTORIES(${SuiteSparse_GPUQREngine_INCLUDE}) + INCLUDE_DIRECTORIES(${SuiteSparse_GPURuntime_INCLUDE}) + CUDA_ADD_LIBRARY(${targetName} ${srcsList} ${headersList}) +- ELSE(${CUDA_FOUND}) ++ ELSE() + ADD_LIBRARY(${targetName} ${srcsList} ${headersList}) +- ENDIF(${CUDA_FOUND}) ++ ENDIF() + SET_TARGET_PROPERTIES(${targetName} PROPERTIES + OUTPUT_NAME ${SP_LIB_PREFIX}${targetName} + ) +@@ -211,44 +130,30 @@ MACRO(REMOVE_MATCHING_FILES_FROM_LIST match_expr lst_files) + ENDMACRO(REMOVE_MATCHING_FILES_FROM_LIST) + + if(WITH_CUDA) +- FIND_PACKAGE(cuda) +- IF(${CUDA_FOUND}) ++ FIND_PACKAGE(CUDA REQUIRED) ++ IF(CUDA_FOUND) + ADD_DEFINITIONS(-DGPU_BLAS) +- ENDIF(${CUDA_FOUND}) ++ ENDIF() + endif() + +-hunter_add_package(LAPACK) # only in effect if HUNTER_ENABLED is set +-# prefer LAPACK config file +-find_package(LAPACK CONFIG) +-if (LAPACK_FOUND AND TARGET blas AND TARGET lapack) +- message(STATUS "found lapack and blas config file. Linking targets lapack and blas") +- message(STATUS "- LAPACK_CONFIG: ${LAPACK_CONFIG}") +- set(SuiteSparse_LINKER_LAPACK_BLAS_LIBS lapack blas) +- # for suitesparse-config file set method used to find LAPACK (and BLAS) +- set(SuiteSparse_LAPACK_used_CONFIG YES) +-else() +- # missing config file or targets, try BLAS and LAPACK +- find_package(BLAS) +- find_package(LAPACK) +- if (BLAS_FOUND AND LAPACK_FOUND) ++ find_package(BLAS REQUIRED) ++ find_package(LAPACK REQUIRED) + message(STATUS "found lapack and blas config file. Linking targets lapack and blas") + message(STATUS "- LAPACK_LIBRARIES: ${LAPACK_LIBRARIES}") + message(STATUS "- BLAS_LIBRARIES: ${BLAS_LIBRARIES}") + set(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) + # for suitesparse-config file set method used to find LAPACK (and BLAS) + set(SuiteSparse_LAPACK_used_CONFIG NO) +- else () # LAPACK is not found +- message(FATAL_ERROR "lapack not found") +- endif() +-endif() + +-IF(BUILD_METIS) ++IF(USE_VCPKG_METIS) ++ find_package(metis REQUIRED) + set(SuiteSparse_LINKER_METIS_LIBS "metis") +- ## namespaced library target for config +- set(SuiteSparse_EXPORTED_METIS_LIBS "SuiteSparse::metis") ++ set(SuiteSparse_EXPORTED_METIS_LIBS "metis") ++ set(SuiteSparse_FIND_DEPENDENCY_METIS "find_dependency(metis REQUIRED)") + else() + set(SuiteSparse_LINKER_METIS_LIBS "") + set(SuiteSparse_EXPORTED_METIS_LIBS "") ++ set(SuiteSparse_FIND_PACKAGE_METIS "") + ENDIF() + + add_subdirectory(SuiteSparse) +@@ -287,7 +192,7 @@ endmacro() + # get SuiteSparse version + get_SuiteSparse_Version() + +-set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/suitesparse-${SuiteSparse_VERSION}) ++set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/suitesparse) + ## create targets file + export(EXPORT SuiteSparseTargets + FILE "${CMAKE_CURRENT_BINARY_DIR}/suitesparse/suitesparse-targets.cmake" +@@ -301,7 +206,7 @@ configure_file(cmake/SuiteSparse-config-install.cmake.in + ## do the EXPORT for allowing other project to easily use suitesparse with cmake + install(EXPORT SuiteSparseTargets + FILE +- SuiteSparse-targets.cmake ++ suitesparse-targets.cmake + NAMESPACE + SuiteSparse:: + DESTINATION +diff --git a/SuiteSparse/CMakeLists.txt b/SuiteSparse/CMakeLists.txt +index c6e2834..6fdfb01 100644 +--- a/SuiteSparse/CMakeLists.txt ++++ b/SuiteSparse/CMakeLists.txt +@@ -1,23 +1,5 @@ + PROJECT(SuiteSparse) + +-# Set optimized building: +-IF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") +- # only optimize for native processer when NOT cross compiling +- if(NOT CMAKE_CROSSCOMPILING) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=native") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mtune=native") +- endif(NOT CMAKE_CROSSCOMPILING) +-ENDIF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") +- +-# Global flags: +-IF (BUILD_METIS) +- INCLUDE_DIRECTORIES("${METIS_SOURCE_DIR}/include") +-ELSE (BUILD_METIS) +- ADD_DEFINITIONS(-DNPARTITION) +-ENDIF ( BUILD_METIS) +- + # Disable COMPLEX numbers: disable it by default, since it causes problems in some platforms. + SET(HAVE_COMPLEX OFF CACHE BOOL "Enables building SuiteSparse with complex numbers (disabled by default to avoid problems in some platforms)") + IF (NOT HAVE_COMPLEX) +@@ -38,12 +20,12 @@ if(WITH_CUDA) + set(SUBPROJECTS_TO_ADD + ${SUBPROJECTS_TO_ADD} + SuiteSparse_GPURuntime +- GPUQREngine ++ GPUQREngine + ) + endif() + + set(SUBPROJECTS_TO_ADD +- ${SUBPROJECTS_TO_ADD} ++ ${SUBPROJECTS_TO_ADD} + SuiteSparse_config + AMD + BTF +diff --git a/cmake/SuiteSparse-config-install.cmake.in b/cmake/SuiteSparse-config-install.cmake.in +index 1e587d1..fd8f3a7 100644 +--- a/cmake/SuiteSparse-config-install.cmake.in ++++ b/cmake/SuiteSparse-config-install.cmake.in +@@ -2,20 +2,14 @@ + get_filename_component(_SuiteSparse_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_SELF_DIR}" PATH) + get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_PREFIX}" PATH) +-get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_PREFIX}" PATH) + + include(CMakeFindDependencyMacro) +-if (@SuiteSparse_LAPACK_used_CONFIG@) # SuiteSparse_LAPACK_used_CONFIG +- # use config file which provides LAPACK (and BLAS) for us +- find_dependency(LAPACK CONFIG) +-else() +- # try to find BLAS and LAPACK with modules + find_dependency(BLAS) + find_dependency(LAPACK) +-endif () ++ @SuiteSparse_FIND_DEPENDENCY_METIS@ + + # Load targets from the install tree. +-include(${_SuiteSparse_SELF_DIR}/SuiteSparse-targets.cmake) ++include(${_SuiteSparse_SELF_DIR}/suitesparse-targets.cmake) + + # Report SuiteSparse header search locations. + set(SuiteSparse_INCLUDE_DIRS ${_SuiteSparse_PREFIX}/include) +@@ -39,3 +33,7 @@ set(SuiteSparse_LIBRARIES + + unset(_SuiteSparse_PREFIX) + unset(_SuiteSparse_SELF_DIR) ++set(SUITESPARSE_FOUND TRUE) ++set(SuiteSparse_FOUND TRUE) ++set(SUITESPARSE_LIBRARIES ${SuiteSparse_LIBRARIES}) ++set(SUITESPARSE_INCLUDE_DIRS ${SuiteSparse_INCLUDE_DIRS}) diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake index 8fb2c26b2ea00a..44dfa8c36234b4 100644 --- a/ports/suitesparse/portfile.cmake +++ b/ports/suitesparse/portfile.cmake @@ -1,57 +1,41 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -set(SUITESPARSE_VER 5.4.0) -set(SUITESPARSEWIN_VER 1.4.0) - -vcpkg_download_distfile(SUITESPARSE - URLS "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${SUITESPARSE_VER}.tar.gz" - FILENAME "SuiteSparse-${SUITESPARSE_VER}.tar.gz" - SHA512 8328bcc2ef5eb03febf91b9c71159f091ff405c1ba7522e53714120fcf857ceab2d2ecf8bf9a2e1fc45e1a934665a341e3a47f954f87b59934f4fce6164775d6 -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${SUITESPARSE} + REPO DrTimothyAldenDavis/SuiteSparse + REF 71e330ca2bc0a2f12f416c461d23dbca21db4d8f + SHA512 06c75927c924cfd5511b07504e826714f504586243d6f3449d67408a33f3ecea824a7f2de7a165171791b9bda4fc09c0d7093125970895c2ed8d4d37ca1d5a3d + HEAD_REF master ) vcpkg_from_github( OUT_SOURCE_PATH SUITESPARSEWIN_SOURCE_PATH REPO jlblancoc/suitesparse-metis-for-windows - REF v${SUITESPARSEWIN_VER} - SHA512 35a2563d6e33ebe8157f8d023167abd8d2512e2a627b8dbea798c59afefc56b8f01c7d10553529b03a7b4759e200ca82bb26ebce5cefce6983ffb057a8622162 + REF c11e8dd7a2ef7d0d93af4c16f75374dd8ca029e2 + SHA512 fbd2a9e6f7df47eeb5d890c7b286bef7fc4c8bcb22783ce800723bacaf2cfe902177828ce5b9e1c2ed9fb5c54591c5fb046a8667e7d354d452a4baac693e47d2 HEAD_REF master PATCHES - suitesparse.patch + build_fixes.patch ) # Copy suitesparse sources. -message(STATUS "Copying SuiteSparse source files...") +message(STATUS "Overwriting SuiteSparseWin source files with SuiteSparse source files...") # Should probably remove everything but CMakeLists.txt files? file(GLOB SUITESPARSE_SOURCE_FILES ${SOURCE_PATH}/*) foreach(SOURCE_FILE ${SUITESPARSE_SOURCE_FILES}) file(COPY ${SOURCE_FILE} DESTINATION "${SUITESPARSEWIN_SOURCE_PATH}/SuiteSparse") endforeach() -message(STATUS "Copying SuiteSparse source files... done") -message(STATUS "Removing integrated lapack and metis libs...") +message(STATUS "Overwriting SuiteSparseWin source files with SuiteSparse source files... done") +message(STATUS "Removing integrated lapack and metis lib...") file(REMOVE_RECURSE ${SUITESPARSEWIN_SOURCE_PATH}/lapack_windows) -file(REMOVE_RECURSE ${SUITESPARSEWIN_SOURCE_PATH}/metis) -message(STATUS "Removing integrated lapack and metis libs... done") - -set(USE_VCPKG_METIS OFF) -if("metis" IN_LIST FEATURES) - set(USE_VCPKG_METIS ON) - set(ADDITIONAL_BUILD_OPTIONS "-DMETIS_SOURCE_DIR=${CURRENT_INSTALLED_DIR}") -endif() +file(REMOVE_RECURSE ${SUITESPARSEWIN_SOURCE_PATH}/SuiteSparse/metis-5.1.0) +message(STATUS "Removing integrated lapack and metis lib... done") vcpkg_configure_cmake( SOURCE_PATH ${SUITESPARSEWIN_SOURCE_PATH} PREFER_NINJA OPTIONS -DBUILD_METIS=OFF - -DUSE_VCPKG_METIS=${USE_VCPKG_METIS} - ${ADDITIONAL_BUILD_OPTIONS} + -DUSE_VCPKG_METIS=ON + "-DMETIS_SOURCE_DIR=${CURRENT_INSTALLED_DIR}" OPTIONS_DEBUG -DSUITESPARSE_INSTALL_PREFIX="${CURRENT_PACKAGES_DIR}/debug" OPTIONS_RELEASE @@ -60,9 +44,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/suitesparse-${SUITESPARSE_VER}) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/suitesparse) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse RENAME copyright) -file(INSTALL ${SUITESPARSEWIN_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse RENAME copyright_suitesparse-metis-for-windows) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SUITESPARSEWIN_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright_suitesparse-metis-for-windows) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cxsparse) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper_cxsparse.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxsparse RENAME vcpkg-cmake-wrapper.cmake) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCXSparse.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxsparse) diff --git a/ports/suitesparse/suitesparse.patch b/ports/suitesparse/suitesparse.patch deleted file mode 100644 index e26a5b8cbd62e1..00000000000000 --- a/ports/suitesparse/suitesparse.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3486f05..b8c2e63 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -191,68 +191,14 @@ if(WITH_CUDA) - ENDIF(${CUDA_FOUND}) - endif() - --find_package(BLAS) --find_package(LAPACK) --if (LAPACK_FOUND AND BLAS_FOUND) -+find_package(BLAS REQUIRED) -+find_package(LAPACK REQUIRED) -+if(LAPACK_FOUND AND BLAS_FOUND) - message(STATUS "found lapack and blas config file. Linking targets lapack and blas") - set(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) --else () # LAPACK is not found -- --## Need to use SuiteSparse_LINKER_LAPACK_BLAS_LIBS in our subproject in case of SHARED flag is set to ON --SET(SUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS OFF CACHE BOOL "Check if you have custom LAPACK/BLAS libraries (AMD,...)") --IF (SUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS) -- SET(SUITESPARSE_CUSTOM_BLAS_LIB "" CACHE FILE "Path to custom library file for BLAS") -- SET(SUITESPARSE_CUSTOM_LAPACK_LIB "" CACHE FILE "Path to custom library file for LAPACK") -- IF (NOT EXISTS "${SUITESPARSE_CUSTOM_BLAS_LIB}" OR NOT EXISTS "${SUITESPARSE_CUSTOM_LAPACK_LIB}") -- MESSAGE("*Error*: Correctly set SUITESPARSE_CUSTOM_BLAS_LIB and SUITESPARSE_CUSTOM_LAPACK_LIB or uncheck SUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS") -- ELSE() -- SET(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${SUITESPARSE_CUSTOM_BLAS_LIB} ${SUITESPARSE_CUSTOM_LAPACK_LIB}) -- ENDIF() --ELSE() -- IF (UNIX) -- SET(SuiteSparse_LINKER_LAPACK_BLAS_LIBS lapack blas rt) -- ELSE() -- IF(CMAKE_SIZEOF_VOID_P EQUAL 8) # Size in bytes! -- set(PATH_WORD_SIZE "x64") -- ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8) # Size in bytes! -- set(PATH_WORD_SIZE "x32") -- ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8) -- -- add_library(blas SHARED IMPORTED) -- set_property(TARGET blas PROPERTY IMPORTED_LOCATION ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/libblas.dll) -- set_property(TARGET blas PROPERTY IMPORTED_IMPLIB ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/libblas.lib) -- -- add_library(lapack SHARED IMPORTED) -- set_property(TARGET lapack PROPERTY IMPORTED_LOCATION ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/liblapack.dll) -- set_property(TARGET lapack PROPERTY IMPORTED_IMPLIB ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/liblapack.lib) -- -- SET(SuiteSparse_LINKER_LAPACK_BLAS_LIBS blas lapack) -- -- ## install lapack and blas dependencies -- file(GLOB lapack_blas_windows_libs "${CMAKE_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/*.lib") -- file(GLOB lapack_blas_windows_dll "${CMAKE_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/*.dll") -- if(lapack_blas_windows_dll AND lapack_blas_windows_libs) -- set(SuiteSparse_LAPACK_BLAS_LIB_DIR "lib${LIB_POSTFIX}/lapack_blas_windows") -- install(FILES ${lapack_blas_windows_libs} -- ${lapack_blas_windows_dll} -- DESTINATION ${SuiteSparse_LAPACK_BLAS_LIB_DIR} -- ) -- endif() -- ENDIF() --ENDIF() --ENDIF() # LAPACK found -- --if(SuiteSparse_LAPACK_BLAS_LIB_DIR) # "Export" the imported targets in config.cmake manually -- set(ExternConfig "add_library(blas SHARED IMPORTED) -- set_property(TARGET blas PROPERTY IMPORTED_LOCATION \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/libblas.dll) -- set_property(TARGET blas PROPERTY IMPORTED_IMPLIB \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/libblas.lib) -- -- add_library(lapack SHARED IMPORTED) -- set_property(TARGET lapack PROPERTY IMPORTED_LOCATION \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/liblapack.dll) -- set_property(TARGET lapack PROPERTY IMPORTED_IMPLIB \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/liblapack.lib)") --endif() -+endif() # LAPACK is not found - --IF(BUILD_METIS) -+IF(BUILD_METIS OR USE_VCPKG_METIS) - set(SuiteSparse_LINKER_METIS_LIBS "metis") - ## namespaced library target for config - set(SuiteSparse_EXPORTED_METIS_LIBS "SuiteSparse::metis") -@@ -311,7 +257,7 @@ configure_file(cmake/SuiteSparse-config-install.cmake.in - ## do the EXPORT for allowing other project to easily use suitesparse with cmake - install(EXPORT SuiteSparseTargets - FILE -- SuiteSparse-targets.cmake -+ suitesparse-targets.cmake - NAMESPACE - SuiteSparse:: - DESTINATION -diff --git a/SuiteSparse/CHOLMOD/Include/cholmod_blas.h b/SuiteSparse/CHOLMOD/Include/cholmod_blas.h -index aef3e63..907512b 100644 ---- a/SuiteSparse/CHOLMOD/Include/cholmod_blas.h -+++ b/SuiteSparse/CHOLMOD/Include/cholmod_blas.h -@@ -27,6 +27,7 @@ - #elif defined (__linux) || defined (MGLNX86) || defined (ARCH_GLNX86) - #define CHOLMOD_LINUX - #define CHOLMOD_ARCHITECTURE "Linux" -+#define BLAS_NO_UNDERSCORE - - #elif defined (__APPLE__) - #define CHOLMOD_MAC -diff --git a/SuiteSparse/CMakeLists.txt b/SuiteSparse/CMakeLists.txt -index c6e2834..5ef08a6 100644 ---- a/SuiteSparse/CMakeLists.txt -+++ b/SuiteSparse/CMakeLists.txt -@@ -12,11 +12,11 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") - ENDIF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") - - # Global flags: --IF (BUILD_METIS) -+IF (BUILD_METIS OR USE_VCPKG_METIS) - INCLUDE_DIRECTORIES("${METIS_SOURCE_DIR}/include") --ELSE (BUILD_METIS) -+ELSE () - ADD_DEFINITIONS(-DNPARTITION) --ENDIF ( BUILD_METIS) -+ENDIF () - - # Disable COMPLEX numbers: disable it by default, since it causes problems in some platforms. - SET(HAVE_COMPLEX OFF CACHE BOOL "Enables building SuiteSparse with complex numbers (disabled by default to avoid problems in some platforms)") -diff --git a/cmake/SuiteSparse-config-install.cmake.in b/cmake/SuiteSparse-config-install.cmake.in -index cb1f51f..49387b8 100644 ---- a/cmake/SuiteSparse-config-install.cmake.in -+++ b/cmake/SuiteSparse-config-install.cmake.in -@@ -4,13 +4,10 @@ get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_SELF_DIR}" PATH) - get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_PREFIX}" PATH) - get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_PREFIX}" PATH) - --find_package(LAPACK CONFIG) --if (NOT LAPACK_FOUND) # Load the LAPACK package with which we were built. -- @ExternConfig@ --endif () -+find_package(LAPACK REQUIRED) - - # Load targets from the install tree. --include(${_SuiteSparse_SELF_DIR}/SuiteSparse-targets.cmake) -+include(${_SuiteSparse_SELF_DIR}/suitesparse-targets.cmake) - - # Report SuiteSparse header search locations. - set(SuiteSparse_INCLUDE_DIRS ${_SuiteSparse_PREFIX}/include) -@@ -31,6 +28,11 @@ set(SuiteSparse_LIBRARIES - SuiteSparse::spqr - @SuiteSparse_EXPORTED_METIS_LIBS@ - ) -+set(SUITESPARSE_LIBRARIES ${SuiteSparse_LIBRARIES}) - - unset(_SuiteSparse_PREFIX) - unset(_SuiteSparse_SELF_DIR) -+ -+set(SUITESPARSE_FOUND TRUE) -+set(SuiteSparse_FOUND TRUE) -+ diff --git a/ports/suitesparse/vcpkg-cmake-wrapper_cxsparse.cmake b/ports/suitesparse/vcpkg-cmake-wrapper_cxsparse.cmake new file mode 100644 index 00000000000000..67d87e8b69055b --- /dev/null +++ b/ports/suitesparse/vcpkg-cmake-wrapper_cxsparse.cmake @@ -0,0 +1,10 @@ +set(CXSPARSE_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${CXSPARSE_PREV_MODULE_PATH}) diff --git a/ports/suitesparse/vcpkg.json b/ports/suitesparse/vcpkg.json new file mode 100644 index 00000000000000..71f44d7242847e --- /dev/null +++ b/ports/suitesparse/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "suitesparse", + "version-semver": "5.8.0", + "port-version": 1, + "description": "A suite of sparse matrix algorithms. Also provides libcxsparse.", + "homepage": "http://suitesparse.com", + "dependencies": [ + "lapack", + "metis" + ] +} diff --git a/ports/sundials/CONTROL b/ports/sundials/CONTROL deleted file mode 100644 index 101325d3790745..00000000000000 --- a/ports/sundials/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: sundials -Version: 3.1.1-1 -Homepage: https://computation.llnl.gov/projects/sundials -Description: SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers) diff --git a/ports/sundials/install-dlls-in-bin.patch b/ports/sundials/install-dlls-in-bin.patch new file mode 100644 index 00000000000000..2a4ab5a49ccc90 --- /dev/null +++ b/ports/sundials/install-dlls-in-bin.patch @@ -0,0 +1,11 @@ +--- a/cmake/macros/SundialsAddLibrary.cmake ++++ b/cmake/macros/SundialsAddLibrary.cmake +@@ -323,7 +323,7 @@ + set_target_properties(${_actual_target_name} PROPERTIES ${_properties}) + endif() + + # install phase +- install(TARGETS ${_actual_target_name} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT sundials-targets) ++ install(TARGETS ${_actual_target_name} EXPORT sundials-targets) + + endif() diff --git a/ports/sundials/portfile.cmake b/ports/sundials/portfile.cmake index da4d9c4a25c575..ae72b89a24cc67 100644 --- a/ports/sundials/portfile.cmake +++ b/ports/sundials/portfile.cmake @@ -1,58 +1,32 @@ -include(vcpkg_common_functions) - -set(ARCHIVE_NAME "sundials-3.1.1") -set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}") - -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://computation.llnl.gov/projects/sundials/download/${ARCHIVE_NAME}.tar.gz" - FILENAME "${ARCHIVE_NAME}.tar.gz" - SHA512 3e8fc7183c5503943f1ba00c73b04c1614a48b6e6cb90559ec5481f9acffaa19acd97bd961611b251ebdc032f1a13f0919b0ab0cdfe9d9b4ddc99d40bef5719f -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LLNL/sundials + REF 73c280cd55ca2b42019c8a9aa54af10e41e27b9d # v5.7.0 + SHA512 c70c53e5f5efe47255d23f36e71ffd75d61905a13a634a26bfbbd43c3c8764b7805db9a8cbe48c6cf69b2a1028701cb7118074bbbc01de71faf4f30bf0be22f9 + HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/uwp-c4703-warning.patch + install-dlls-in-bin.patch ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SUN_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SUN_BUILD_SHARED) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DEXAMPLES_ENABLE=OFF + OPTIONS + -D_BUILD_EXAMPLES=OFF + -DBUILD_STATIC_LIBS=${SUN_BUILD_STATIC} + -DBUILD_SHARED_LIBS=${SUN_BUILD_SHARED} ) vcpkg_install_cmake(DISABLE_PARALLEL) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(GLOB REMOVE_DLLS - "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" - "${CURRENT_PACKAGES_DIR}/lib/*.dll" -) - -file(GLOB DEBUG_DLLS - "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" -) - -file(GLOB DLLS - "${CURRENT_PACKAGES_DIR}/lib/*.dll" -) - -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() - -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sundials RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE") file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE") -if(REMOVE_DLLS) - file(REMOVE ${REMOVE_DLLS}) -endif() - vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) diff --git a/ports/sundials/uwp-c4703-warning.patch b/ports/sundials/uwp-c4703-warning.patch deleted file mode 100644 index 3718753cfba5ae..00000000000000 --- a/ports/sundials/uwp-c4703-warning.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4030f4d..afef556 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -602,6 +602,7 @@ MARK_AS_ADVANCED(FORCE SUNDIALS_DEVTESTS) - - IF(WIN32) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) -+ ADD_COMPILE_OPTIONS(/wd4703) # Needed for uwp - ENDIF(WIN32) - - IF(APPLE) diff --git a/ports/sundials/vcpkg.json b/ports/sundials/vcpkg.json new file mode 100644 index 00000000000000..9245e80d2228ce --- /dev/null +++ b/ports/sundials/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "sundials", + "version-semver": "5.7.0", + "port-version": 1, + "description": "SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)", + "homepage": "https://computation.llnl.gov/projects/sundials" +} diff --git a/ports/superlu/fix-libm.patch b/ports/superlu/fix-libm.patch new file mode 100644 index 00000000000000..a356bbda28e098 --- /dev/null +++ b/ports/superlu/fix-libm.patch @@ -0,0 +1,17 @@ +diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt +index e627f06..9aa8949 100644 +--- a/SRC/CMakeLists.txt ++++ b/SRC/CMakeLists.txt +@@ -232,7 +232,11 @@ if(enable_complex16) + endif() + + add_library(superlu ${sources} ${HEADERS}) +-target_link_libraries(superlu PUBLIC ${BLAS_LIB} m) ++if(CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ target_link_libraries(superlu PUBLIC ${BLAS_LIB}) ++else() ++ target_link_libraries(superlu PUBLIC ${BLAS_LIB} m) ++endif() + target_include_directories(superlu PUBLIC + $ + $ diff --git a/ports/superlu/portfile.cmake b/ports/superlu/portfile.cmake new file mode 100644 index 00000000000000..807981f5dd9044 --- /dev/null +++ b/ports/superlu/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiaoyeli/superlu + REF a3d5233770f0caad4bc4578b46d3b26af99e9c19 + SHA512 c07e64be51ddef7774a367e1309ef4e596e93571531ec58a0c7b9db60a3db8b3a4a8b1262d66fcd512ad467db5df59a3726db342b259e392a08f56f5dd67c6ef + HEAD_REF master + PATCHES + fix-libm.patch + remove-make.inc.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DXSDK_ENABLE_Fortran=OFF + -Denable_tests=OFF + -Denable_blaslib=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/superlu/remove-make.inc.patch b/ports/superlu/remove-make.inc.patch new file mode 100644 index 00000000000000..8f7716aadd5dfd --- /dev/null +++ b/ports/superlu/remove-make.inc.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b414f5f..22f29ce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,7 +155,6 @@ endif() + # file(WRITE "make.defs" "# can be exposed to users" + # ${CMAKE_C_COMPILER} ) + # configure_file(${CMAKE_SOURCE_DIR}/make.inc.in ${CMAKE_SOURCE_DIR}/make.inc) +-configure_file(${SuperLU_SOURCE_DIR}/make.inc.in ${SuperLU_SOURCE_DIR}/make.inc) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/superlu.pc.in ${CMAKE_CURRENT_BINARY_DIR}/superlu.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/superlu.pc diff --git a/ports/superlu/vcpkg.json b/ports/superlu/vcpkg.json new file mode 100644 index 00000000000000..9de4be6746d655 --- /dev/null +++ b/ports/superlu/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "superlu", + "version-string": "2020-01-07", + "port-version": 3, + "description": "Supernodal sparse direct solver.", + "homepage": "https://github.com/xiaoyeli/superlu", + "supports": "!(uwp | arm)", + "dependencies": [ + "blas" + ] +} diff --git a/ports/symengine/fix-build.patch b/ports/symengine/fix-build.patch new file mode 100644 index 00000000000000..5087428e60f7f7 --- /dev/null +++ b/ports/symengine/fix-build.patch @@ -0,0 +1,13 @@ +diff --git a/symengine/mp_boost.cpp b/symengine/mp_boost.cpp +index db20930c4..f3997707e 100644 +--- a/symengine/mp_boost.cpp ++++ b/symengine/mp_boost.cpp +@@ -279,7 +279,7 @@ unsigned long mp_scan1(const integer_class &i) + if (i == 0) { + return ULONG_MAX; + } +- return find_lsb(i, int_<0>()); ++ return find_lsb(i, {}); + } + + // define simple 2x2 matrix with exponentiation by repeated squaring diff --git a/ports/symengine/portfile.cmake b/ports/symengine/portfile.cmake new file mode 100644 index 00000000000000..a0677af8a2dcbc --- /dev/null +++ b/ports/symengine/portfile.cmake @@ -0,0 +1,64 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO symengine/symengine + REF v0.7.0 + SHA512 fd3198bc4a05ca2b9b8a58039cc21af65b44457f295362a1a9b8dbf9c6e3df5186c0c84b289bc9fe85d9efd5ac1a683f6b7ba9a661fb6d913d6ceefb14ee2348 + HEAD_REF master + PATCHES + fix-build.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + arb WITH_ARB + flint WITH_FLINT + mpfr WITH_MPFR + tcmalloc WITH_TCMALLOC +) + +if(integer-class-boostmp IN_LIST FEATURES) + set(INTEGER_CLASS boostmp) + + if(integer-class-flint IN_LIST FEATURES) + message(WARNING "Both boostmp and flint are given for integer class, will use boostmp only.") + endif() +elseif(integer-class-flint IN_LIST FEATURES) + set(INTEGER_CLASS flint) +endif() + +if(VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE") +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MSVC_USE_MT) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DINTEGER_CLASS=${INTEGER_CLASS} + -DBUILD_BENCHMARKS=no + -DBUILD_TESTS=no + -DMSVC_WARNING_LEVEL=3 + -DMSVC_USE_MT=${MSVC_USE_MT} + -DWITH_SYMENGINE_RCP=yes + -DWITH_SYMENGINE_TEUCHOS=no + -DINTEGER_CLASS=${INTEGER_CLASS} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/symengine/vcpkg.json b/ports/symengine/vcpkg.json new file mode 100644 index 00000000000000..4768ffb5660858 --- /dev/null +++ b/ports/symengine/vcpkg.json @@ -0,0 +1,52 @@ +{ + "name": "symengine", + "version": "0.7.0", + "description": "SymEngine is a fast symbolic manipulation library", + "homepage": "https://github.com/symengine/symengine", + "dependencies": [ + "boost-math", + "boost-random" + ], + "default-features": [ + "integer-class-boostmp" + ], + "features": { + "arb": { + "description": "Build with arb", + "dependencies": [ + "arb" + ] + }, + "flint": { + "description": "Build with flint", + "dependencies": [ + "flint" + ] + }, + "integer-class-boostmp": { + "description": "Use Boost.multiprecision integer class", + "dependencies": [ + "boost-multiprecision" + ] + }, + "integer-class-flint": { + "description": "Use flint integer class", + "dependencies": [ + "flint", + "gmp" + ] + }, + "mpfr": { + "description": "Build with mpfr", + "dependencies": [ + "mpfr" + ] + }, + "tcmalloc": { + "description": "Build with tcmalloc", + "dependencies": [ + "gperftools" + ] + } + } +} diff --git a/ports/systemc/CONTROL b/ports/systemc/CONTROL deleted file mode 100644 index 4f1bd67d99c0cb..00000000000000 --- a/ports/systemc/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: systemc -Version: 2.3.3-3 -Description: A set of C++ classes and macros which provide an event-driven simulation kernel in C++ diff --git a/ports/systemc/portfile.cmake b/ports/systemc/portfile.cmake index 8ecb7e8fb875d2..e6439eb5c77b44 100644 --- a/ports/systemc/portfile.cmake +++ b/ports/systemc/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(SYSTEMC_VERSION 2.3.3) @@ -14,7 +12,6 @@ vcpkg_extract_source_archive_ex( REF ${SYSTEMC_VERSION} PATCHES install.patch - tlm_correct_dependency.patch ) vcpkg_configure_cmake( diff --git a/ports/systemc/vcpkg.json b/ports/systemc/vcpkg.json new file mode 100644 index 00000000000000..6c456295db39c6 --- /dev/null +++ b/ports/systemc/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "systemc", + "version-string": "2.3.3", + "port-version": 5, + "description": "A set of C++ classes and macros which provide an event-driven simulation kernel in C++" +} diff --git a/ports/szip/CONTROL b/ports/szip/CONTROL deleted file mode 100644 index 8f1fedbc647f87..00000000000000 --- a/ports/szip/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: szip -Version: 2.1.1-5 -Homepage: https://support.hdfgroup.org/ftp/lib-external/szip -Description: Szip compression software, providing lossless compression of scientific data diff --git a/ports/szip/fix-linkage-config.patch b/ports/szip/fix-linkage-config.patch new file mode 100644 index 00000000000000..6d862e41877303 --- /dev/null +++ b/ports/szip/fix-linkage-config.patch @@ -0,0 +1,47 @@ +diff -urN a/config/cmake/szip-config.cmake.in b/config/cmake/szip-config.cmake.in +--- a/config/cmake/szip-config.cmake.in 2017-01-09 16:14:35.000000000 +0100 ++++ b/config/cmake/szip-config.cmake.in 2021-05-14 21:26:09.490134839 +0200 +@@ -39,8 +39,13 @@ + + # Handle default component(static) : + if (NOT ${SZIP_PACKAGE_NAME}_FIND_COMPONENTS) ++ if(@BUILD_SHARED_LIBS@) ++ set (${SZIP_PACKAGE_NAME}_FIND_COMPONENTS shared) ++ set (${SZIP_PACKAGE_NAME}_FIND_REQUIRED_shared true) ++ else() + set (${SZIP_PACKAGE_NAME}_FIND_COMPONENTS static) + set (${SZIP_PACKAGE_NAME}_FIND_REQUIRED_static true) ++ endif() + endif () + + # Handle requested components: +diff -urN a/src/CMakeLists.txt b/src/CMakeLists.txt +--- a/src/CMakeLists.txt 2017-02-03 20:42:43.000000000 +0100 ++++ b/src/CMakeLists.txt 2021-05-14 22:20:28.237632925 +0200 +@@ -22,6 +22,7 @@ + ${SZIP_SRC_SOURCE_DIR}/szlib.h + ) + ++if(NOT BUILD_SHARED_LIBS) + add_library (${SZIP_LIB_TARGET} STATIC ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS}) + #set_target_properties (${SZIP_LIB_TARGET} + # PROPERTIES +@@ -36,6 +37,7 @@ + set_global_variable (SZIP_LIBRARIES_TO_EXPORT ${SZIP_LIB_TARGET}) + SZIP_SET_LIB_OPTIONS (${SZIP_LIB_TARGET} ${SZIP_LIB_NAME} STATIC) + set (install_targets ${SZIP_LIB_TARGET}) ++endif(NOT BUILD_SHARED_LIBS) + + if (BUILD_SHARED_LIBS) + add_library (${SZIP_LIBSH_TARGET} SHARED ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS}) +@@ -62,8 +64,9 @@ + if (SZIP_EXPORTED_TARGETS) + if (BUILD_SHARED_LIBS) + INSTALL_TARGET_PDB (${SZIP_LIBSH_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) +- endif (BUILD_SHARED_LIBS) ++ else() + INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) ++ endif() + + install ( + TARGETS diff --git a/ports/szip/fix-szip-config-to-set-szip-found.patch b/ports/szip/fix-szip-config-to-set-szip-found.patch deleted file mode 100644 index f662916f975e16..00000000000000 --- a/ports/szip/fix-szip-config-to-set-szip-found.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urN szip-2.1.1-a/config/cmake/szip-config.cmake.in szip-2.1.1-b/config/cmake/szip-config.cmake.in ---- szip-2.1.1-a/config/cmake/szip-config.cmake.in 2018-02-10 11:06:46.890685077 +0900 -+++ szip-2.1.1-b/config/cmake/szip-config.cmake.in 2018-02-10 11:11:25.369274127 +0900 -@@ -51,6 +51,7 @@ - set (${SZIP_PACKAGE_NAME}_${comp}_FOUND 0) - else () - set (${SZIP_PACKAGE_NAME}_${comp}_FOUND 1) -+ set (${SZIP_PACKAGE_NAME}_FOUND 1) - string(TOUPPER ${SZIP_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY) - set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @SZIP_LIB_CORENAME@-${comp}) - endif () diff --git a/ports/szip/mingw-lib-names.patch b/ports/szip/mingw-lib-names.patch new file mode 100644 index 00000000000000..c9d2c249fee777 --- /dev/null +++ b/ports/szip/mingw-lib-names.patch @@ -0,0 +1,30 @@ +diff -urN a/config/cmake/SZIPMacros.cmake b/config/cmake/SZIPMacros.cmake +--- a/config/cmake/SZIPMacros.cmake 2021-05-15 09:06:50.546455249 +0200 ++++ b/config/cmake/SZIPMacros.cmake 2021-05-15 09:01:24.933765423 +0200 +@@ -126,7 +126,7 @@ + macro (SZIP_SET_BASE_OPTIONS libtarget libname libtype) + # message (STATUS "${libname} libtype: ${libtype}") + if (${libtype} MATCHES "SHARED") +- if (WIN32) ++ if (WIN32 AND NOT MINGW) + set (LIB_RELEASE_NAME "${libname}") + set (LIB_DEBUG_NAME "${libname}_D") + else () +@@ -134,7 +134,7 @@ + set (LIB_DEBUG_NAME "${libname}_debug") + endif () + else () +- if (WIN32) ++ if (WIN32 AND NOT MINGW) + set (LIB_RELEASE_NAME "lib${libname}") + set (LIB_DEBUG_NAME "lib${libname}_D") + else () +@@ -164,7 +164,7 @@ + endif () + + #----- Use MSVC Naming conventions for Shared Libraries +- if (MINGW AND ${libtype} MATCHES "SHARED") ++ if (FALSE AND MINGW AND ${libtype} MATCHES "SHARED") + set_target_properties (${libtarget} + PROPERTIES + IMPORT_SUFFIX ".lib" diff --git a/ports/szip/portfile.cmake b/ports/szip/portfile.cmake index cffb1693c63913..038736e7a99002 100644 --- a/ports/szip/portfile.cmake +++ b/ports/szip/portfile.cmake @@ -1,33 +1,68 @@ -include(vcpkg_common_functions) - -#set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/szip-2.1.1) +set(SZIP_VERSION "2.1.1") vcpkg_download_distfile(ARCHIVE - URLS "https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz" - FILENAME "szip-2.1.1.tar.gz" + URLS "https://support.hdfgroup.org/ftp/lib-external/szip/${SZIP_VERSION}/src/szip-${SZIP_VERSION}.tar.gz" + FILENAME "szip-${SZIP_VERSION}.tar.gz" SHA512 ada6406efb096cd8a2daf8f9217fe9111a96dcae87e29d1c31f58ddd2ad2aa7bac03f23c7205dc9360f3b62d259461759330c7189ef0c2fe559704b1ea9d40dd ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF szip-2.1.1 + ARCHIVE "${ARCHIVE}" + REF szip-${SZIP_VERSION} PATCHES - fix-szip-config-to-set-szip-found.patch # This patch is required for linux on osx; It does not matter for windows + fix-linkage-config.patch + mingw-lib-names.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA OPTIONS -DSZIP_INSTALL_DATA_DIR=share/szip/data -DSZIP_INSTALL_CMAKE_DIR=share/szip ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets() +vcpkg_cmake_config_fixup() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/szip_adpt.h" + "\n#ifdef SZ_BUILT_AS_DYNAMIC_LIB" + "\n#if 1 // SZ_BUILT_AS_DYNAMIC_LIB") +endif() + +if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW) + set(SZIP_LIB_RELEASE "-lszip") + set(SZIP_LIB_DEBUG "-lszip_debug") + set(SZIP_LIBS_PRIVATE "-lm") +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(SZIP_LIB_RELEASE "-llibszip") + set(SZIP_LIB_DEBUG "-llibszip_D") + set(SZIP_LIBS_PRIVATE "") +else() + set(SZIP_LIB_RELEASE "-lszip") + set(SZIP_LIB_DEBUG "-lszip_D") + set(SZIP_LIBS_PRIVATE "") +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(SZIP_LINKAGE_FLAGS "-DSZ_BUILT_AS_DYNAMIC_LIB=1") +else() + set(SZIP_LINKAGE_FLAGS "") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib") + set(SZIP_LIB "${SZIP_LIB_RELEASE}") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") + configure_file("${CMAKE_CURRENT_LIST_DIR}/szip.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/szip.pc" @ONLY) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib") + set(SZIP_LIB "${SZIP_LIB_DEBUG}") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") + configure_file("${CMAKE_CURRENT_LIST_DIR}/szip.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/szip.pc" @ONLY) +endif() +vcpkg_fixup_pkgconfig() -file(RENAME ${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING ${CURRENT_PACKAGES_DIR}/share/szip/copyright) +file(RENAME "${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING" "${CURRENT_PACKAGES_DIR}/share/szip/copyright") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/szip/szip.pc.in b/ports/szip/szip.pc.in new file mode 100644 index 00000000000000..b89c9a1ddeddb8 --- /dev/null +++ b/ports/szip/szip.pc.in @@ -0,0 +1,16 @@ +prefix=${pcfiledir}/../.. + +exec_prefix=${prefix} +libdir=${prefix}/lib +sharedlibdir=${prefix}/lib +includedir=${prefix}/include + +Name: szip +Description: Szip compression software +Version: @SZIP_VERSION@ + +Requires: +Cflags: -I"${includedir}" @SZIP_LINKAGE_FLAGS@ +Libs: -L"${libdir}" @SZIP_LIB@ +Libs.private: @SZIP_LIBS_PRIVATE@ + diff --git a/ports/szip/vcpkg.json b/ports/szip/vcpkg.json new file mode 100644 index 00000000000000..7c83b1a157ffdc --- /dev/null +++ b/ports/szip/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "szip", + "version": "2.1.1", + "port-version": 7, + "description": "Szip compression software, providing lossless compression of scientific data", + "homepage": "https://support.hdfgroup.org/ftp/lib-external/szip", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/tabulate/portfile.cmake b/ports/tabulate/portfile.cmake new file mode 100644 index 00000000000000..284dc218afcf95 --- /dev/null +++ b/ports/tabulate/portfile.cmake @@ -0,0 +1,26 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/tabulate + REF 8f7a31b58806384b755858fe5e69593f9f216ed0 + SHA512 33a51617d363f9e8eed2153f60c5a087ed84edaeb21a0bc779d0af6228d4d7deb211e03c1eb7c8d56ac538de6a1cc0b641d219b4ff95d277f3daa7762f64a8f6 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dtabulate_BUILD_TESTS=OFF + -DSAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.termcolor DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/tabulate/vcpkg.json b/ports/tabulate/vcpkg.json new file mode 100644 index 00000000000000..cdbb579bb19676 --- /dev/null +++ b/ports/tabulate/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tabulate", + "version-string": "2019-01-06", + "port-version": 1, + "description": "Table maker for modern C++", + "homepage": "https://github.com/p-ranav/tabulate" +} diff --git a/ports/tacopie/CONTROL b/ports/tacopie/CONTROL deleted file mode 100644 index a800a26be0ff58..00000000000000 --- a/ports/tacopie/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tacopie -Version: 3.2.0-1 -Homepage: https://github.com/Cylix/tacopie -Description: Tacopie is a TCP Client & Server C++11 library diff --git a/ports/tacopie/portfile.cmake b/ports/tacopie/portfile.cmake index e814418d47f5f5..4cf2d73dcbc4b2 100644 --- a/ports/tacopie/portfile.cmake +++ b/ports/tacopie/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO Cylix/tacopie + REPO cpp-redis/tacopie REF 3.2.0 SHA512 079b294b537aaffe3bcf43a485c3be5b15f633c3f7c70140032d60cb010d35b76e76ef4ddd7596f6bfaf3f7edca7cb086c67552efffbf65846e725d7be54ce72 HEAD_REF master @@ -40,6 +38,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tacopie RENAME copyright) - vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tacopie/vcpkg.json b/ports/tacopie/vcpkg.json new file mode 100644 index 00000000000000..4c1167a8a616c2 --- /dev/null +++ b/ports/tacopie/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tacopie", + "version-string": "3.2.0", + "port-version": 3, + "description": "Tacopie is a TCP Client & Server C++11 library", + "homepage": "https://github.com/cpp-redis/tacopie" +} diff --git a/ports/taglib/CONTROL b/ports/taglib/CONTROL deleted file mode 100644 index 9756e8e8c9dcf3..00000000000000 --- a/ports/taglib/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: taglib -Version: 1.11.1-20190531 -Description: TagLib Audio Meta-Data Library -Homepage: https://github.com/taglib/taglib -Build-Depends: zlib diff --git a/ports/taglib/msvc-disable-deprecated-warnings.patch b/ports/taglib/msvc-disable-deprecated-warnings.patch new file mode 100644 index 00000000000000..4d99bb8bc730aa --- /dev/null +++ b/ports/taglib/msvc-disable-deprecated-warnings.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5fc91cc6..6f57e4ee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,10 +58,17 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + endif() + +-if(MSVC AND ENABLE_STATIC_RUNTIME) +- foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) +- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") +- endforeach(flag_var) ++if(MSVC) ++ if(ENABLE_STATIC_RUNTIME) ++ foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) ++ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") ++ endforeach(flag_var) ++ endif() ++ # Disable warnings for internal invocations of API functions ++ # that have been marked with TAGLIB_DEPRECATED ++ # https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996 ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996") + endif() + + # Read version information from file taglib/toolkit/taglib.h into variables diff --git a/ports/taglib/portfile.cmake b/ports/taglib/portfile.cmake index 4ccb6a9fe0d047..bce8b1f869eb57 100644 --- a/ports/taglib/portfile.cmake +++ b/ports/taglib/portfile.cmake @@ -1,15 +1,20 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO taglib/taglib - REF ba7adc2bc261ed634c2a964185bcffb9365ad2f4 - SHA512 faf516f40f12031a37414ce9246ec409e64e570faebe2d604afdefbb7d665e0a0c9c68bec0e6dcb1c5ceb8fa8e1c3477f5ac75029f17beedd679fa3ea735ce6d + REF v1.12 + SHA512 63c96297d65486450908bda7cc1583ec338fa5a56a7c088fc37d6e125e1ee76e6d20343556a8f3d36f5b7e5187c58a5d15be964c996e3586ea1438910152b1a6 HEAD_REF master + PATCHES msvc-disable-deprecated-warnings.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_SHARED_LIBS OFF) +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIBS ON) +endif() + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(WINRT_OPTIONS -DHAVE_VSNPRINTF=1 -DPLATFORM_WINRT=1) + set(WINRT_OPTIONS -DHAVE_VSNPRINTF=1 -DPLATFORM_WINRT=1) endif() vcpkg_configure_cmake( @@ -20,6 +25,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_pkgconfig() + # remove the debug/include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -33,4 +40,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/taglib/vcpkg.json b/ports/taglib/vcpkg.json new file mode 100644 index 00000000000000..f3f7239ced4d9b --- /dev/null +++ b/ports/taglib/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "taglib", + "version-semver": "1.12.0", + "description": "TagLib Audio Meta-Data Library", + "homepage": "https://taglib.org/", + "license": "LGPL-2.1 OR MPL-1.1", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/taocpp-json/CONTROL b/ports/taocpp-json/CONTROL deleted file mode 100644 index e3f90f4619a6bb..00000000000000 --- a/ports/taocpp-json/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: taocpp-json -Version: 2019-05-08 -Description: C++ header-only JSON library diff --git a/ports/taocpp-json/portfile.cmake b/ports/taocpp-json/portfile.cmake index 3e6c19f1eaf9f2..653a3d201ed101 100644 --- a/ports/taocpp-json/portfile.cmake +++ b/ports/taocpp-json/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO taocpp/json - REF 6adce3b8e55c16e25b22ec0e33348eefa6aa4533 - SHA512 078af33eed0bae7671f31a010ba19088d07ac4f78b834bc7565562ee75199e90338dfd450a1d592c4f4ae58eddb3a26018b571381099d22dfc7d3c4143911390 + REF f357d7269b7503eed21d0c3b98b9075c28a98f56 # accessed on 2020-09-14 + SHA512 4a4be970779ed0c6044c7ad40918ad6b3908ca10dbfb3738cbebb62154d437ad13ca27947119a6b1a6c8d92b22a9282477c73ddc5721ca30b8b355b77d7ce729 HEAD_REF master ) @@ -33,6 +31,3 @@ configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copy file(COPY ${SOURCE_PATH}/LICENSE.double-conversion DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(COPY ${SOURCE_PATH}/LICENSE.itoa DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(COPY ${SOURCE_PATH}/LICENSE.ryu DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/taocpp-json/vcpkg.json b/ports/taocpp-json/vcpkg.json new file mode 100644 index 00000000000000..b1e5f2fb91052e --- /dev/null +++ b/ports/taocpp-json/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "taocpp-json", + "version-string": "2020-09-14", + "port-version": 1, + "description": "C++ header-only JSON library" +} diff --git a/ports/tap-windows6/CONTROL b/ports/tap-windows6/CONTROL deleted file mode 100644 index 744247c323ce8f..00000000000000 --- a/ports/tap-windows6/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tap-windows6 -Version: 9.21.2-0e30f5c -Description: an NDIS 6 implementation of the TAP-Windows driver, used by OpenVPN and other apps. Note: This package only contains the headers for the driver. \ No newline at end of file diff --git a/ports/tap-windows6/portfile.cmake b/ports/tap-windows6/portfile.cmake index 4e2725d1e01b74..dcd27824e99e22 100644 --- a/ports/tap-windows6/portfile.cmake +++ b/ports/tap-windows6/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenVPN/tap-windows6 diff --git a/ports/tap-windows6/vcpkg.json b/ports/tap-windows6/vcpkg.json new file mode 100644 index 00000000000000..777db703c20904 --- /dev/null +++ b/ports/tap-windows6/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tap-windows6", + "version-string": "9.21.2-0e30f5c", + "port-version": 1, + "description": "an NDIS 6 implementation of the TAP-Windows driver, used by OpenVPN and other apps. Note: This package only contains the headers for the driver." +} diff --git a/ports/taskflow/portfile.cmake b/ports/taskflow/portfile.cmake new file mode 100644 index 00000000000000..56e6564a3cfeff --- /dev/null +++ b/ports/taskflow/portfile.cmake @@ -0,0 +1,29 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO taskflow/taskflow + REF cbcf750895259d1e01089d4cc4535dc962bc7848 #v3.2.0 + SHA512 584f81a8c9d314fbd5bc3497cead659488e17ded90cca9144e867ea5d18f50bd8bc554eaefc21ed82e73b5c92a89c5502434e214b0543b65442a2c261d2ef396 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTF_BUILD_BENCHMARKS=OFF + -DTF_BUILD_CUDA=OFF + -DTF_BUILD_TESTS=OFF + -DTF_BUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DCMAKE_CUDA_COMPILER=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Taskflow) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/taskflow/vcpkg.json b/ports/taskflow/vcpkg.json new file mode 100644 index 00000000000000..a71f3220841c39 --- /dev/null +++ b/ports/taskflow/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "taskflow", + "version": "3.2.0", + "description": "Fast Parallel Tasking Programming Library using Modern C++", + "homepage": "https://github.com/taskflow/taskflow" +} diff --git a/ports/tbb/CMakeLists.txt b/ports/tbb/CMakeLists.txt index 7216e3474aa205..ae53c40f2a6251 100644 --- a/ports/tbb/CMakeLists.txt +++ b/ports/tbb/CMakeLists.txt @@ -7,7 +7,26 @@ include(${CMAKE_CURRENT_BINARY_DIR}/src/cmake/TBBBuild.cmake REQUIRED) if(NOT BUILD_SHARED_LIBS) set(TBB_STATIC_INCLUDE extra_inc=big_iron.inc) endif() -tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS ${TBB_STATIC_INCLUDE}) +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(FORWARD_SDK_ROOT "SDKROOT=${CMAKE_OSX_SYSROOT}") + if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64") + set(arch "arch=arm64") + endif() +endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL CMAKE_SYSTEM_PROCESSOR) + set(arch "arch=${CMAKE_SYSTEM_PROCESSOR}") + if(CMAKE_CXX_COMPILER) + set(CPLUS "CPLUS=${CMAKE_CXX_COMPILER}") + endif() + if(CMAKE_C_COMPILER) + set(CONLY "CONLY=${CMAKE_C_COMPILER}") + endif() + endif() +endif() + +tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS ${arch} ${CPLUS} ${CONLY} ${TBB_STATIC_INCLUDE} ${FORWARD_SDK_ROOT}) set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir) if(CMAKE_BUILD_TYPE STREQUAL "Release") diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL deleted file mode 100644 index 39c34d78492af4..00000000000000 --- a/ports/tbb/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tbb -Version: 2019_U7-1 -Homepage: https://github.com/01org/tbb -Description: Intel's Threading Building Blocks. diff --git a/ports/tbb/fix-static-build.patch b/ports/tbb/fix-static-build.patch new file mode 100644 index 00000000000000..18f3e2b493f95f --- /dev/null +++ b/ports/tbb/fix-static-build.patch @@ -0,0 +1,13 @@ +diff --git a/src/tbb/cilk-tbb-interop.h b/src/tbb/cilk-tbb-interop.h +index 295734b..f35531e 100644 +--- a/src/tbb/cilk-tbb-interop.h ++++ b/src/tbb/cilk-tbb-interop.h +@@ -29,6 +29,8 @@ + #else + #ifdef IN_CILK_RUNTIME + #define CILK_EXPORT __declspec(dllexport) ++#elif defined(IN_CILK_STATIC) ++#define CILK_EXPORT /* nothing */ + #else + #define CILK_EXPORT __declspec(dllimport) + #endif // IN_CILK_RUNTIME diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 4030bec4b229c2..bf65511b788943 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -1,20 +1,21 @@ -include(vcpkg_common_functions) - -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +if (NOT VCPKG_TARGET_IS_LINUX AND NOT VCPKG_TARGET_IS_OSX) + vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO intel/tbb - REF 4233fef583b4f8cbf9f781311717600feaaa0694 - SHA512 6eb239f16e0ecacb825264869aafad7fb39aa1b1f8a3c03c92344c4255d1c1a34ca0a47a366c471fd2da808f3be14262c7e2305294677f2f490c1a48f6f76ec3 + REPO oneapi-src/oneTBB + REF eca91f16d7490a8abfdee652dadf457ec820cc37 # 2020_U3 + SHA512 7144e1dc68304b5358e6ea330431b6f0c61fadb147efa353a5b242777d6fabf7b8cf99b79cffb51b49b911dd17a9f1879619d6eebdf319f23ec3235c89cffc25 HEAD_REF tbb_2019 + PATCHES + fix-static-build.patch + terminate-when-buildtool-notfound.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (NOT VCPKG_TARGET_IS_WINDOWS) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -23,7 +24,17 @@ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStor vcpkg_install_cmake() # Settings for TBBConfigInternal.cmake.in - set(TBB_LIB_EXT a) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(TBB_LIB_EXT a) + else() + if (VCPKG_TARGET_IS_LINUX) + set(TBB_LIB_EXT "so.2") + elseif(VCPKG_TARGET_IS_OSX) + set(TBB_LIB_EXT "dylib") + else() + set(TBB_LIB_EXT "so") + endif() + endif() set(TBB_LIB_PREFIX lib) else() if (VCPKG_CRT_LINKAGE STREQUAL static) @@ -34,6 +45,30 @@ else() set(DEBUG_CONFIGURATION Debug) endif() + macro(CONFIGURE_PROJ_FILE arg) + set(CONFIGURE_FILE_NAME ${arg}) + set(CONFIGURE_BAK_FILE_NAME ${arg}.bak) + if (NOT EXISTS ${CONFIGURE_BAK_FILE_NAME}) + configure_file(${CONFIGURE_FILE_NAME} ${CONFIGURE_BAK_FILE_NAME} COPYONLY) + endif() + configure_file(${CONFIGURE_BAK_FILE_NAME} ${CONFIGURE_FILE_NAME} COPYONLY) + file(READ ${CONFIGURE_FILE_NAME} SLN_CONFIGURE) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "DynamicLibrary<\/ConfigurationType>" + "StaticLibrary<\/ConfigurationType>" SLN_CONFIGURE "${SLN_CONFIGURE}") + string(REPLACE "\/D_CRT_SECURE_NO_DEPRECATE" + "\/D_CRT_SECURE_NO_DEPRECATE \/DIN_CILK_STATIC" SLN_CONFIGURE "${SLN_CONFIGURE}") + else() + string(REPLACE "\/D_CRT_SECURE_NO_DEPRECATE" + "\/D_CRT_SECURE_NO_DEPRECATE \/DIN_CILK_RUNTIME" SLN_CONFIGURE "${SLN_CONFIGURE}") + endif() + file(WRITE ${CONFIGURE_FILE_NAME} "${SLN_CONFIGURE}") + endmacro() + + CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbb.vcxproj) + CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc.vcxproj) + CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc_proxy.vcxproj) + vcpkg_install_msbuild( SOURCE_PATH ${SOURCE_PATH} PROJECT_SUBPATH build/vs2013/makefile.sln @@ -70,6 +105,13 @@ configure_file( ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake @ONLY ) + +configure_file( + ${SOURCE_PATH}/cmake/templates/TBBConfigVersion.cmake.in + ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfigVersion.cmake + @ONLY +) + file(READ ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake _contents) string(REPLACE "get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" @@ -89,12 +131,10 @@ string(REPLACE _contents "${_contents}" ) + string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright) - -vcpkg_test_cmake(PACKAGE_NAME TBB) -# +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tbb/terminate-when-buildtool-notfound.patch b/ports/tbb/terminate-when-buildtool-notfound.patch new file mode 100644 index 00000000000000..9599b48cd09116 --- /dev/null +++ b/ports/tbb/terminate-when-buildtool-notfound.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/TBBBuild.cmake b/cmake/TBBBuild.cmake +index a2222e3..756d85c 100644 +--- a/cmake/TBBBuild.cmake ++++ b/cmake/TBBBuild.cmake +@@ -158,7 +158,7 @@ function(tbb_build) + mark_as_advanced(TBB_MAKE_TOOL) + + if (NOT TBB_MAKE_TOOL) +- message(STATUS "Intel TBB can not be built: required make-tool (${make_tool_name}) was not found") ++ message(FATAL_ERROR "Intel TBB can not be built: required make-tool (${make_tool_name}) was not found") + set(${tbb_build_CONFIG_DIR} ${tbb_build_CONFIG_DIR}-NOTFOUND PARENT_SCOPE) + return() + endif() diff --git a/ports/tbb/vcpkg.json b/ports/tbb/vcpkg.json new file mode 100644 index 00000000000000..101e41bd7b5b17 --- /dev/null +++ b/ports/tbb/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "tbb", + "version-string": "2020_U3", + "port-version": 6, + "description": "Intel's Threading Building Blocks.", + "homepage": "https://github.com/01org/tbb", + "supports": "!(uwp | arm | arm64) | linux | osx" +} diff --git a/ports/tcl/force-shell-install.patch b/ports/tcl/force-shell-install.patch new file mode 100644 index 00000000000000..0725945f7719c6 --- /dev/null +++ b/ports/tcl/force-shell-install.patch @@ -0,0 +1,27 @@ +From 85842ba83b70d99f90ee3fff8c956e82d17759f2 Mon Sep 17 00:00:00 2001 +From: Marek Roszko +Date: Tue, 18 Aug 2020 23:11:27 -0400 +Subject: [PATCH] Remove broken exist check for shell install + +--- + win/makefile.vc | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/win/makefile.vc b/win/makefile.vc +index f5d2f4a..6bffe32 100644 +--- a/win/makefile.vc ++++ b/win/makefile.vc +@@ -869,10 +869,8 @@ install-binaries: + @$(CPY) "$(TCLLIB)" "$(BIN_INSTALL_DIR)\" + !endif + @$(CPY) "$(TCLIMPLIB)" "$(LIB_INSTALL_DIR)\" +-!if exist($(TCLSH)) + @echo Installing $(TCLSHNAME) + @$(CPY) "$(TCLSH)" "$(BIN_INSTALL_DIR)\" +-!endif + @echo Installing $(TCLSTUBLIBNAME) + @$(CPY) "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)\" + +-- +2.28.0.windows.1 + diff --git a/ports/tcl/portfile.cmake b/ports/tcl/portfile.cmake new file mode 100644 index 00000000000000..7dbfe7b271545e --- /dev/null +++ b/ports/tcl/portfile.cmake @@ -0,0 +1,139 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tcltk/tcl + REF 0fa6a4e5aad821a5c34fdfa070c37c3f1ffc8c8e + SHA512 9d7f35309fe8b1a7c116639aaea50cc01699787c7afb432389bee2b9ad56a67034c45d90c9585ef1ccf15bdabf0951cbef86257c0c6aedbd2591bbfae3e93b76 + PATCHES force-shell-install.patch +) + +if (VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(TCL_BUILD_MACHINE_STR MACHINE=AMD64) + else() + set(TCL_BUILD_MACHINE_STR MACHINE=IX86) + endif() + + # Handle features + set(TCL_BUILD_OPTS OPTS=pdbs) + set(TCL_BUILD_STATS STATS=none) + set(TCL_BUILD_CHECKS CHECKS=none) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},static,staticpkg) + endif() + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},msvcrt) + endif() + + if ("thrdalloc" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},thrdalloc) + endif() + if ("profile" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},profile) + endif() + if ("unchecked" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},unchecked) + endif() + if ("utfmax" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},time64bit) + endif() + + vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH win + OPTIONS + ${TCL_BUILD_MACHINE_STR} + ${TCL_BUILD_STATS} + ${TCL_BUILD_CHECKS} + OPTIONS_DEBUG + ${TCL_BUILD_OPTS},symbols + INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug + SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/debug/lib/tcl9.0 + OPTIONS_RELEASE + release + ${TCL_BUILD_OPTS} + INSTALLDIR=${CURRENT_PACKAGES_DIR} + SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/lib/tcl9.0 + ) + + + # Install + # Note: tcl shell requires it to be in a folder adjacent to the /lib/ folder, i.e. in a /bin/ folder + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + file(GLOB_RECURSE TOOL_BIN + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/bin/*.dll + ) + file(COPY ${TOOL_BIN} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/bin/) + + # Remove .exes only after copying + file(GLOB_RECURSE TOOL_EXES + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ) + file(REMOVE ${TOOL_EXES}) + + file(GLOB_RECURSE TOOLS + ${CURRENT_PACKAGES_DIR}/lib/dde1.4/* + ${CURRENT_PACKAGES_DIR}/lib/nmake/* + ${CURRENT_PACKAGES_DIR}/lib/reg1.3/* + ${CURRENT_PACKAGES_DIR}/lib/tcl8/* + ${CURRENT_PACKAGES_DIR}/lib/tcl8.6/* + ${CURRENT_PACKAGES_DIR}/lib/tdbcsqlite31.1.0/* + ) + + foreach(TOOL ${TOOLS}) + get_filename_component(DST_DIR ${TOOL} PATH) + file(COPY ${TOOL} DESTINATION ${DST_DIR}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/dde1.4 + ${CURRENT_PACKAGES_DIR}/lib/nmake + ${CURRENT_PACKAGES_DIR}/lib/reg1.3 + ${CURRENT_PACKAGES_DIR}/lib/tcl8 + ${CURRENT_PACKAGES_DIR}/lib/tcl8.6 + ${CURRENT_PACKAGES_DIR}/lib/tdbcsqlite31.1.0 + ) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(GLOB_RECURSE TOOL_BIN + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll + ) + file(COPY ${TOOL_BIN} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/debug/bin/) + + # Remove .exes only after copying + file(GLOB_RECURSE EXES + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe + ) + file(REMOVE ${EXES}) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/dde1.4 + ${CURRENT_PACKAGES_DIR}/debug/lib/nmake + ${CURRENT_PACKAGES_DIR}/debug/lib/reg1.3 + ${CURRENT_PACKAGES_DIR}/debug/lib/tcl8 + ${CURRENT_PACKAGES_DIR}/debug/lib/tcl8.6 + ${CURRENT_PACKAGES_DIR}/debug/lib/tdbcsqlite31.1.0 + ) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +else() + file(REMOVE "${SOURCE_PATH}/unix/configure") + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH unix + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +file(INSTALL ${SOURCE_PATH}/license.terms DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tcl/vcpkg.json b/ports/tcl/vcpkg.json new file mode 100644 index 00000000000000..c4f28240fdb9c7 --- /dev/null +++ b/ports/tcl/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "tcl", + "version-string": "core-9-0-a1", + "port-version": 2, + "description": "Tcl provides a powerful platform for creating integration applications that tie together diverse applications, protocols, devices, and frameworks. When paired with the Tk toolkit, Tcl provides the fastest and most powerful way to create GUI applications that run on PCs, Unix, and Mac OS X. Tcl can also be used for a variety of web-related tasks and for creating powerful command languages for applications.", + "homepage": "https://github.com/tcltk/tcl", + "features": { + "profile": { + "description": "Adds profiling hooks. Map file is assumed." + }, + "thrdalloc": { + "description": "Use the thread allocator (shared global free pool)." + }, + "unchecked": { + "description": "Allows a symbols build to not use the debug enabled runtime (msvcrt.dll not msvcrtd.dll or libcmt.lib not libcmtd.lib)." + }, + "utfmax": { + "description": "Forces Tcl_UniChar to be a 32-bit quantity in stead of 16-bits" + } + } +} diff --git a/ports/tclap/CONTROL b/ports/tclap/CONTROL deleted file mode 100644 index 652593d40c26d1..00000000000000 --- a/ports/tclap/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tclap -Version: 1.2.2 -Homepage: https://sourceforge.net/projects/tclap/ -Description: Templatized command-line argument parser for C++ diff --git a/ports/tclap/portfile.cmake b/ports/tclap/portfile.cmake index 96337418a3f99f..d23ae531dfd81a 100644 --- a/ports/tclap/portfile.cmake +++ b/ports/tclap/portfile.cmake @@ -1,18 +1,10 @@ -#header-only library -include(vcpkg_common_functions) -set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/tclap-1.2.2") -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/tclap/tclap-1.2.2.tar.gz" +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO tclap FILENAME "tclap-1.2.2.tar.gz" SHA512 516ec17f82a61277922bc8c0ed66973300bf42a738847fbbd2912c6405c34f94a13e47dc964854a5b26a9a9f1f518cce682ca54e769d6016851656c647866107 ) -vcpkg_extract_source_archive(${ARCHIVE}) -# Copy all header files -file(COPY "${SOURCE_PATH}/include/tclap" - DESTINATION "${CURRENT_PACKAGES_DIR}/include" - FILES_MATCHING PATTERN "*.h") +file(COPY "${SOURCE_PATH}/include/tclap" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h") -# Handle copyright -file(COPY "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/tclap") -file(RENAME "${CURRENT_PACKAGES_DIR}/share/tclap/COPYING" "${CURRENT_PACKAGES_DIR}/share/tclap/copyright") +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/tclap/vcpkg.json b/ports/tclap/vcpkg.json new file mode 100644 index 00000000000000..c8ad1ac88de44f --- /dev/null +++ b/ports/tclap/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tclap", + "version-string": "1.2.2", + "port-version": 4, + "description": "Templatized command-line argument parser for C++", + "homepage": "https://sourceforge.net/projects/tclap/" +} diff --git a/ports/teemo/portfile.cmake b/ports/teemo/portfile.cmake new file mode 100644 index 00000000000000..94118a36d95c36 --- /dev/null +++ b/ports/teemo/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO winsoft666/teemo + REF f8019d3ea75b20bbd0d05693ba9f12a1ed0cebce + SHA512 f9ce0273909d07485d04c09dd29e2336186b058f4bfe4809ada1b7e831431ecf96049fb18cda21c27f3e8a652eb1f4c50a4b957b7f69b3918d41ab7a777240fe + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" TEEMO_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTEEMO_STATIC:BOOL=${TEEMO_STATIC} + -DBUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/teemo) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/teemo) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/teemo) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/teemo) +endif() + +file(READ ${CURRENT_PACKAGES_DIR}/include/teemo/teemo.h TEEMO_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "#ifdef TEEMO_STATIC" "#if 1" TEEMO_H "${TEEMO_H}") +else() + string(REPLACE "#ifdef TEEMO_STATIC" "#if 0" TEEMO_H "${TEEMO_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/teemo/teemo.h "${TEEMO_H}") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/teemo/vcpkg.json b/ports/teemo/vcpkg.json new file mode 100644 index 00000000000000..4905c32f965dec --- /dev/null +++ b/ports/teemo/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "teemo", + "version-string": "2.2", + "port-version": 1, + "description": "C++ File Download Library, support Multithreading, Breakpoint Transmission, Speed Limit, Real-time Speed.", + "homepage": "https://github.com/winsoft666/teemo", + "dependencies": [ + { + "name": "curl", + "default-features": false + } + ] +} diff --git a/ports/telnetpp/CONTROL b/ports/telnetpp/CONTROL deleted file mode 100644 index 563a12f5618336..00000000000000 --- a/ports/telnetpp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: telnetpp -Version: 1.2.4-1 -Homepage: https://github.com/KazDragon/telnetpp -Description: Telnet++ is an implementation of the Telnet Session Layer protocol using C++14 -Build-Depends: boost, gtest, zlib diff --git a/ports/telnetpp/fix-install-paths.patch b/ports/telnetpp/fix-install-paths.patch new file mode 100644 index 00000000000000..5e2bdd55022e2c --- /dev/null +++ b/ports/telnetpp/fix-install-paths.patch @@ -0,0 +1,48 @@ + CMakeLists.txt | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09722a9..7bf9952 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -277,18 +277,18 @@ install( + EXPORT + telnetpp-config + ARCHIVE DESTINATION +- lib/telnetpp-${TELNETPP_VERSION} ++ lib + RUNTIME DESTINATION +- lib/telnetpp-${TELNETPP_VERSION} ++ bin + LIBRARY DESTINATION +- lib/telnetpp-${TELNETPP_VERSION} ++ lib + ) + + install( + DIRECTORY + include/ + DESTINATION +- include/telnetpp-${TELNETPP_VERSION} ++ include + ) + + export( +@@ -302,7 +302,7 @@ install( + EXPORT + telnetpp-config + DESTINATION +- lib/telnetpp-${TELNETPP_VERSION} ++ share/telnetpp + ) + + include(CMakePackageConfigHelpers) +@@ -317,7 +317,7 @@ install( + FILES + "${CMAKE_CURRENT_BINARY_DIR}/telnetpp-config-version.cmake" + DESTINATION +- lib/telnetpp-${TELNETPP_VERSION} ++ share/telnetpp + ) + + if (TELNETPP_WITH_TESTS) diff --git a/ports/telnetpp/portfile.cmake b/ports/telnetpp/portfile.cmake index 7af2342e106fa4..f4a196144ecd0c 100644 --- a/ports/telnetpp/portfile.cmake +++ b/ports/telnetpp/portfile.cmake @@ -1,47 +1,35 @@ -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KazDragon/telnetpp - REF v1.2.4 - SHA512 16879fd377a7d13aac497bc9989c026acc1ed5b4eb9338d151d3d827c7c4c44fab84dd06c5fe55be4efe49a98ea46e62e80bbc51c8503d6ba1bf5534fee16c84 + REF f370ebd0c0dc6505708065ee5afdc59a6de54387 # v2.1.2 + MSVC patches + SHA512 c58cb9159a8fb6c4b089a0212a995f70f08b93877d98828aa263e9f065f42a932d98749b56741d9e711c0805dcc2dcf0607dc86b0553c4e34bd3fad99e0bf157 HEAD_REF master + PATCHES fix-install-paths.patch ) +set(USE_ZLIB OFF) +if("zlib" IN_LIST FEATURES) + set(USE_ZLIB ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE PREFER_NINJA + OPTIONS + -DGSL_INCLUDE_PATH=${CURRENT_INSTALLED_DIR}/include + -DTELNETPP_WITH_ZLIB=${USE_ZLIB} + -DTELNETPP_WITH_TESTS=OFF ) vcpkg_install_cmake() -# Remove duplicate header files and CMake input file -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE ${CURRENT_PACKAGES_DIR}/include/telnetpp/version.hpp.in) - -# The install target in the upstream package does not install the binary output -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/telnetpp.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/telnetpp.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -# Move CMake installed configuration files and adjust for vcpkg debug location -file(COPY ${CURRENT_PACKAGES_DIR}/lib/telnetpp/telnetpp-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/telnetpp/telnetpp-config-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/telnetpp/telnetpp-config-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/telnetpp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/telnetpp) - -file(READ ${CURRENT_PACKAGES_DIR}/share/telnetpp/telnetpp-config-debug.cmake DEBUG_CONFIG) -string(REPLACE "\${_IMPORT_PREFIX}/lib/telnetpp.lib" - "\${_IMPORT_PREFIX}/debug/lib/telnetpp.lib" DEBUG_CONFIG ${DEBUG_CONFIG}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/telnetpp/telnetpp-config-debug.cmake "${DEBUG_CONFIG}") +vcpkg_fixup_cmake_targets(CONFIG_PATH share/telnetpp) vcpkg_copy_pdbs() +# Remove duplicate header files and CMake input file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/telnetpp/version.hpp.in) # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME copyright) diff --git a/ports/telnetpp/vcpkg.json b/ports/telnetpp/vcpkg.json new file mode 100644 index 00000000000000..b59fcde67ffceb --- /dev/null +++ b/ports/telnetpp/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "telnetpp", + "version-string": "2.1.2", + "port-version": 1, + "description": "Telnet++ is an implementation of the Telnet Session Layer protocol using C++14", + "homepage": "https://github.com/KazDragon/telnetpp", + "supports": "!uwp", + "dependencies": [ + "boost-container", + "boost-exception", + "boost-range", + "boost-signals2", + "boost-variant", + "gsl-lite" + ], + "default-features": [ + "zlib" + ], + "features": { + "zlib": { + "description": "Zlib support", + "dependencies": [ + "zlib" + ] + } + } +} diff --git a/ports/tensorflow-cc/portfile.cmake b/ports/tensorflow-cc/portfile.cmake new file mode 100644 index 00000000000000..2c1cfc2db2da9b --- /dev/null +++ b/ports/tensorflow-cc/portfile.cmake @@ -0,0 +1,13 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm" ON_TARGET "UWP") + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +set(TF_LIB_SUFFIX "_cc") +set(TF_PORT_SUFFIX "-cc") +set(TF_INCLUDE_DIRS "${CURRENT_INSTALLED_DIR}/include/tensorflow-external ${CURRENT_INSTALLED_DIR}/include/tensorflow-external/src") +list(APPEND CMAKE_MODULE_PATH "${CURRENT_INSTALLED_DIR}/share/tensorflow-common") +include(tensorflow-common) + +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow-external") diff --git a/ports/tensorflow-cc/vcpkg.json b/ports/tensorflow-cc/vcpkg.json new file mode 100644 index 00000000000000..d67e50c93e6ab8 --- /dev/null +++ b/ports/tensorflow-cc/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "tensorflow-cc", + "version-semver": "2.4.1", + "port-version": 1, + "description": "Library for computation using data flow graphs for scalable machine learning (C++ API version)", + "homepage": "https://github.com/tensorflow/tensorflow", + "supports": "!(x86 | arm | uwp)", + "dependencies": [ + "tensorflow-common" + ] +} diff --git a/ports/tensorflow-common/LICENSE.txt b/ports/tensorflow-common/LICENSE.txt new file mode 100644 index 00000000000000..2e4eac8264fa4c --- /dev/null +++ b/ports/tensorflow-common/LICENSE.txt @@ -0,0 +1,23 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ports/tensorflow-common/README-linux b/ports/tensorflow-common/README-linux new file mode 100644 index 00000000000000..4e0cb514ac3278 --- /dev/null +++ b/ports/tensorflow-common/README-linux @@ -0,0 +1,13 @@ +Warning: Static TensorFlow build contains several external dependencies that may cause linking conflicts + (for example, one cannot use both openssl and TensorFlow in the same project, since TensorFlow contains boringssl). + +Note: Besides TensorFlow itself, you'll also need to pass its dependencies to the linker: + * libm + * libdl + * libpthread +for example, '-ltensorflow_cc -lm -ldl -lpthread'. + +Note: There is no separate libtensorflow_framework.a as it got merged into libtensorflow_cc.a to avoid linking conflicts. + +Note: For some TensorFlow features (e.g. OpRegistry), it might be necessary to tell the linker to include the whole library: + '-Wl,--whole-archive -ltensorflow_cc -Wl,--no-whole-archive [rest of linker arguments]' diff --git a/ports/tensorflow-common/README-macos b/ports/tensorflow-common/README-macos new file mode 100644 index 00000000000000..6bbfd07811b119 --- /dev/null +++ b/ports/tensorflow-common/README-macos @@ -0,0 +1,12 @@ +Warning: Static TensorFlow build contains several external dependencies that may cause linking conflicts + (for example, one cannot use both openssl and TensorFlow in the same project, since TensorFlow contains boringssl). + +Note: Besides TensorFlow itself, you'll also need to pass its dependencies to the linker: + * CoreFoundation + * Security (only when linking against the whole library, see below) +for example, '-ltensorflow_cc -framework CoreFoundation -framework Security'. + +Note: There is no separate libtensorflow_framework.a as it got merged into libtensorflow_cc.a to avoid linking conflicts. + +Note: For some TensorFlow features (e.g. OpRegistry), it might be necessary to tell the linker to include the whole library: + '-Wl,-force_load,path/to/libtensorflow_cc.a [rest of linker arguments]' diff --git a/ports/tensorflow-common/README-windows b/ports/tensorflow-common/README-windows new file mode 100644 index 00000000000000..5a195297605c5e --- /dev/null +++ b/ports/tensorflow-common/README-windows @@ -0,0 +1,5 @@ +Warning: Static TensorFlow build contains several external dependencies that may cause linking conflicts + (for example, one cannot use both openssl and TensorFlow in the same project, since TensorFlow contains boringssl). + +Note: For some TensorFlow features (e.g. OpRegistry), it might be necessary to convince the linker to include the whole library, i.e., link using options + '/WHOLEARCHIVE:tensorflow_cc.lib /WHOLEARCHIVE:tensorflow_cc-part2.lib /WHOLEARCHIVE:tensorflow_cc-part3.lib ...' diff --git a/ports/tensorflow-common/Update-bazel-max-version.patch b/ports/tensorflow-common/Update-bazel-max-version.patch new file mode 100644 index 00000000000000..9dffd884b0206b --- /dev/null +++ b/ports/tensorflow-common/Update-bazel-max-version.patch @@ -0,0 +1,13 @@ +diff --git a/configure.py b/configure.py +index e5428a6..9324d7b 100644 +--- a/configure.py ++++ b/configure.py +@@ -47,7 +47,7 @@ _TF_WORKSPACE_ROOT = '' + _TF_BAZELRC = '' + _TF_CURRENT_BAZEL_VERSION = None + _TF_MIN_BAZEL_VERSION = '3.1.0' +-_TF_MAX_BAZEL_VERSION = '3.99.0' ++_TF_MAX_BAZEL_VERSION = '4.1.0' + + NCCL_LIB_PATHS = [ + 'lib64/', 'lib/powerpc64le-linux-gnu/', 'lib/x86_64-linux-gnu/', '' diff --git a/ports/tensorflow-common/change-macros-for-static-lib.patch b/ports/tensorflow-common/change-macros-for-static-lib.patch new file mode 100644 index 00000000000000..daff655cebc670 --- /dev/null +++ b/ports/tensorflow-common/change-macros-for-static-lib.patch @@ -0,0 +1,265 @@ +diff --git a/tensorflow/core/platform/macros.h b/tensorflow/core/platform/macros.h +--- a/tensorflow/core/platform/macros.h ++++ b/tensorflow/core/platform/macros.h +@@ -57,16 +57,7 @@ + #define TF_SCANF_ATTRIBUTE(string_index, first_to_check) + #endif + +-// Control visibility outside .so +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_EXPORT __declspec(dllexport) +-#else +-#define TF_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 ++#define TF_EXPORT + + #ifdef __has_builtin + #define TF_HAS_BUILTIN(x) __has_builtin(x) + +diff --git a/tensorflow/c/c_api.h b/tensorflow/c/c_api.h +--- a/tensorflow/c/c_api.h ++++ b/tensorflow/c/c_api.h +@@ -71,24 +71,7 @@ + // and the API just provides high level controls over the number of + // devices of each type. + +-// Macro to control visibility of exported symbols in the shared library (.so, +-// .dylib, .dll). +-// This duplicates the TF_EXPORT macro definition in +-// tensorflow/core/platform/macros.h in order to keep this .h file independent +-// of any other includes. +-#ifdef SWIG + #define TF_CAPI_EXPORT +-#else +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_CAPI_EXPORT __declspec(dllexport) +-#else +-#define TF_CAPI_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_CAPI_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 +-#endif // SWIG + + #ifdef __cplusplus + extern "C" { + +diff --git a/tensorflow/c/c_api_experimental.h b/tensorflow/c/c_api_experimental.h +--- a/tensorflow/c/c_api_experimental.h ++++ b/tensorflow/c/c_api_experimental.h +@@ -28,24 +28,7 @@ + // The API here is subject to changes in the future. + // -------------------------------------------------------------------------- + +-// Macro to control visibility of exported symbols in the shared library (.so, +-// .dylib, .dll). +-// This duplicates the TF_EXPORT macro definition in +-// tensorflow/core/platform/macros.h in order to keep this .h file independent +-// of any other includes.$a +-#ifdef SWIG + #define TF_CAPI_EXPORT +-#else +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_CAPI_EXPORT __declspec(dllexport) +-#else +-#define TF_CAPI_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_CAPI_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 +-#endif // SWIG + + #ifdef __cplusplus + extern "C" { + +diff --git a/tensorflow/c/c_api_macros.h b/tensorflow/c/c_api_macros.h +--- a/tensorflow/c/c_api_macros.h ++++ b/tensorflow/c/c_api_macros.h +@@ -16,17 +16,5 @@ + #ifndef TENSORFLOW_C_C_API_MACROS_H_ + #define TENSORFLOW_C_C_API_MACROS_H_ + +-#ifdef SWIG + #define TF_CAPI_EXPORT +-#else +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_CAPI_EXPORT __declspec(dllexport) +-#else +-#define TF_CAPI_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_CAPI_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 +-#endif // SWIG + + +diff --git a/tensorflow/c/kernels.h b/tensorflow/c/kernels.h +--- a/tensorflow/c/kernels.h ++++ b/tensorflow/c/kernels.h +@@ -23,24 +23,7 @@ + #include "tensorflow/c/tf_status.h" + #include "tensorflow/c/tf_tensor.h" + +-// Macro to control visibility of exported symbols in the shared library (.so, +-// .dylib, .dll). +-// This duplicates the TF_EXPORT macro definition in +-// tensorflow/core/platform/macros.h in order to keep this .h file independent +-// of any other includes. +-#ifdef SWIG + #define TF_CAPI_EXPORT +-#else +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_CAPI_EXPORT __declspec(dllexport) +-#else +-#define TF_CAPI_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_CAPI_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 +-#endif // SWIG + + #ifdef __cplusplus + extern "C" { + +diff --git a/tensorflow/c/ops.h b/tensorflow/c/ops.h +--- a/tensorflow/c/ops.h ++++ b/tensorflow/c/ops.h +@@ -76,19 +76,7 @@ + #include "tensorflow/c/tf_datatype.h" + #include "tensorflow/c/tf_status.h" + +-#ifdef SWIG + #define TF_CAPI_EXPORT +-#else +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_CAPI_EXPORT __declspec(dllexport) +-#else +-#define TF_CAPI_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_CAPI_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 +-#endif // SWIG + + #ifdef __cplusplus + extern "C" { + +diff --git a/tensorflow/c/tf_datatype.h b/tensorflow/c/tf_datatype.h +--- a/tensorflow/c/tf_datatype.h ++++ b/tensorflow/c/tf_datatype.h +@@ -18,24 +18,7 @@ + + #include + +-// Macro to control visibility of exported symbols in the shared library (.so, +-// .dylib, .dll). +-// This duplicates the TF_EXPORT macro definition in +-// tensorflow/core/platform/macros.h in order to keep this .h file independent +-// of any other includes. +-#ifdef SWIG + #define TF_CAPI_EXPORT +-#else +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_CAPI_EXPORT __declspec(dllexport) +-#else +-#define TF_CAPI_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_CAPI_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 +-#endif // SWIG + + #ifdef __cplusplus + extern "C" { + +diff --git a/tensorflow/c/tf_status.h b/tensorflow/c/tf_status.h +--- a/tensorflow/c/tf_status.h ++++ b/tensorflow/c/tf_status.h +@@ -16,19 +16,7 @@ + #ifndef TENSORFLOW_C_TF_STATUS_H_ + #define TENSORFLOW_C_TF_STATUS_H_ + +-#ifdef SWIG + #define TF_CAPI_EXPORT +-#else +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_CAPI_EXPORT __declspec(dllexport) +-#else +-#define TF_CAPI_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_CAPI_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 +-#endif // SWIG + + #ifdef __cplusplus + extern "C" { + +diff --git a/tensorflow/c/tf_tensor.h b/tensorflow/c/tf_tensor.h +--- a/tensorflow/c/tf_tensor.h ++++ b/tensorflow/c/tf_tensor.h +@@ -23,24 +23,7 @@ + #include "tensorflow/c/tf_datatype.h" + #include "tensorflow/c/tf_status.h" + +-// Macro to control visibility of exported symbols in the shared library (.so, +-// .dylib, .dll). +-// This duplicates the TF_EXPORT macro definition in +-// tensorflow/core/platform/macros.h in order to keep this .h file independent +-// of any other includes. +-#ifdef SWIG + #define TF_CAPI_EXPORT +-#else +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_CAPI_EXPORT __declspec(dllexport) +-#else +-#define TF_CAPI_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_CAPI_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 +-#endif // SWIG + + #ifdef __cplusplus + extern "C" { + +diff --git a/tensorflow/c/eager/c_api.h b/tensorflow/c/eager/c_api.h +--- a/tensorflow/c/eager/c_api.h ++++ b/tensorflow/c/eager/c_api.h +@@ -22,24 +22,7 @@ + + #include "tensorflow/c/c_api.h" + +-// Macro to control visibility of exported symbols in the shared library (.so, +-// .dylib, .dll). +-// This duplicates the TF_EXPORT macro definition in +-// tensorflow/core/platform/macros.h in order to keep this .h file independent +-// of any other includes.$a +-#ifdef SWIG + #define TF_CAPI_EXPORT +-#else +-#if defined(_WIN32) +-#ifdef TF_COMPILE_LIBRARY +-#define TF_CAPI_EXPORT __declspec(dllexport) +-#else +-#define TF_CAPI_EXPORT __declspec(dllimport) +-#endif // TF_COMPILE_LIBRARY +-#else +-#define TF_CAPI_EXPORT __attribute__((visibility("default"))) +-#endif // _WIN32 +-#endif // SWIG + + #ifdef __cplusplus + extern "C" { diff --git a/ports/tensorflow-common/convert_lib_params_linux.py b/ports/tensorflow-common/convert_lib_params_linux.py new file mode 100644 index 00000000000000..b24d45d634f3aa --- /dev/null +++ b/ports/tensorflow-common/convert_lib_params_linux.py @@ -0,0 +1,30 @@ +import sys + +version = sys.argv[1] +lib_suffix = "" if len(sys.argv) < 3 else sys.argv[2] + +with open(f"libtensorflow{lib_suffix}.a.{version}-2.params", "w") as f_out: + parts = [] + with open(f"libtensorflow_framework.so.{version}-2.params", "r") as f_in: + skip_next = False + for line in f_in: + if skip_next: + skip_next = False + continue + if line.startswith("-o"): + skip_next = True + elif line.startswith("bazel-out"): + f_out.write(line) + parts.append(line) + parts = set(parts) + with open(f"libtensorflow{lib_suffix}.so.{version}-2.params", "r") as f_in: + skip_next = False + for line in f_in: + if skip_next: + skip_next = False + continue + if line.startswith("-o"): + skip_next = True + elif line.startswith("bazel-out"): + if line not in parts: + f_out.write(line) diff --git a/ports/tensorflow-common/convert_lib_params_macos.py b/ports/tensorflow-common/convert_lib_params_macos.py new file mode 100644 index 00000000000000..b3c419363e6cf4 --- /dev/null +++ b/ports/tensorflow-common/convert_lib_params_macos.py @@ -0,0 +1,18 @@ +import sys + +version = sys.argv[1] +lib_suffix = "" if len(sys.argv) < 3 else sys.argv[2] + +with open(f"libtensorflow{lib_suffix}.{version}.a-2.params", "w") as f_out: + parts = [] + with open(f"libtensorflow_framework.{version}.dylib-2.params", "r") as f_in: + for line in f_in: + if line.startswith("-Wl,-force_load,"): + f_out.write(line[16:]) + parts.append(line[16:]) + parts = set(parts) + with open(f"libtensorflow{lib_suffix}.{version}.dylib-2.params", "r") as f_in: + for line in f_in: + if line.startswith("-Wl,-force_load,"): + if line[16:] not in parts: + f_out.write(line[16:]) diff --git a/ports/tensorflow-common/convert_lib_params_windows.py b/ports/tensorflow-common/convert_lib_params_windows.py new file mode 100644 index 00000000000000..e150b4e5be525a --- /dev/null +++ b/ports/tensorflow-common/convert_lib_params_windows.py @@ -0,0 +1,28 @@ +import os +import sys + +lib_suffix = "" if len(sys.argv) < 2 else sys.argv[1] + +file_no = 1 +with open(f"tensorflow{lib_suffix}.dll-2.params", "r") as f_in: + lib_name = None + acc_size = 0 + f_out = open(f"tensorflow{lib_suffix}.lib-2.params-part1", "w") + for line in f_in: + if line.startswith("/OUT:"): + lib_name = line + line = line.replace(".dll", "-part1.lib") + f_out.write(line) + elif line.startswith("/WHOLEARCHIVE:"): + line = line[len("/WHOLEARCHIVE:"):] + size = os.stat(f"../../{line.strip()}").st_size + if acc_size + size > 0xFFFFFFFF: + # we need to split the library if it is >4GB, because it's not supported even on x64 Windows + f_out.close() + file_no += 1 + f_out = open(f"tensorflow{lib_suffix}.lib-2.params-part{file_no}", "w") + acc_size = 0 + f_out.write(lib_name.replace(".dll", f"-part{file_no}.lib")) + acc_size += size + f_out.write(line) + f_out.close() diff --git a/ports/tensorflow-common/fix-build-error.patch b/ports/tensorflow-common/fix-build-error.patch new file mode 100644 index 00000000000000..89a15f17a44c17 --- /dev/null +++ b/ports/tensorflow-common/fix-build-error.patch @@ -0,0 +1,22 @@ +diff --git a/tensorflow/core/platform/default/logging.h b/tensorflow/core/platform/default/logging.h +index 99dd6de..3cbe8ed 100644 +--- a/tensorflow/core/platform/default/logging.h ++++ b/tensorflow/core/platform/default/logging.h +@@ -82,13 +82,13 @@ class LogMessageFatal : public LogMessage { + }; + + #define _TF_LOG_INFO \ +- ::tensorflow::internal::LogMessage(__FILE__, __LINE__, ::tensorflow::INFO) ++ tensorflow::internal::LogMessage(__FILE__, __LINE__, tensorflow::INFO) + #define _TF_LOG_WARNING \ +- ::tensorflow::internal::LogMessage(__FILE__, __LINE__, ::tensorflow::WARNING) ++ tensorflow::internal::LogMessage(__FILE__, __LINE__, tensorflow::WARNING) + #define _TF_LOG_ERROR \ +- ::tensorflow::internal::LogMessage(__FILE__, __LINE__, ::tensorflow::ERROR) ++ tensorflow::internal::LogMessage(__FILE__, __LINE__, tensorflow::ERROR) + #define _TF_LOG_FATAL \ +- ::tensorflow::internal::LogMessageFatal(__FILE__, __LINE__) ++ tensorflow::internal::LogMessageFatal(__FILE__, __LINE__) + + #define _TF_LOG_QFATAL _TF_LOG_FATAL + diff --git a/ports/tensorflow-common/fix-linux-build.patch b/ports/tensorflow-common/fix-linux-build.patch new file mode 100644 index 00000000000000..e3eaca5177b5bb --- /dev/null +++ b/ports/tensorflow-common/fix-linux-build.patch @@ -0,0 +1,25 @@ +diff --git a/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.cc b/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.cc +--- a/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.cc ++++ b/tensorflow/core/kernels/data/experimental/snapshot_dataset_op.cc +@@ -72,6 +72,8 @@ + SnapshotDatasetV2Op::kReaderFuncTarguments; + /* static */ constexpr const char* const + SnapshotDatasetV2Op::kShardFuncTarguments; ++/* static */ constexpr const char* const SnapshotDatasetV2Op::kReaderPrefix; ++/* static */ constexpr const char* const SnapshotDatasetV2Op::kWriterPrefix; + /* static */ constexpr const int SnapshotDatasetV2Op::kFileFormatVersion; + + // ==== Snapshot Implementation ==== + +diff --git a/tensorflow/core/kernels/data/experimental/data_service_dataset_op.cc b/tensorflow/core/kernels/data/experimental/data_service_dataset_op.cc +--- a/tensorflow/core/kernels/data/experimental/data_service_dataset_op.cc ++++ b/tensorflow/core/kernels/data/experimental/data_service_dataset_op.cc +@@ -53,6 +53,8 @@ + /* static */ constexpr const char* const + DataServiceDatasetOp::kMaxOutstandingRequests; + /* static */ constexpr const char* const ++ DataServiceDatasetOp::kTaskRefreshIntervalHintMs; ++/* static */ constexpr const char* const + DataServiceDatasetOp::kIterationCounter; + /* static */ constexpr const char* const DataServiceDatasetOp::kOutputTypes; + /* static */ constexpr const char* const DataServiceDatasetOp::kOutputShapes; diff --git a/ports/tensorflow-common/fix-windows-build.patch b/ports/tensorflow-common/fix-windows-build.patch new file mode 100644 index 00000000000000..89536836fccf77 --- /dev/null +++ b/ports/tensorflow-common/fix-windows-build.patch @@ -0,0 +1,12 @@ +diff --git a/core/platform/default/logging.h b/core/platform/default/logging.h +--- a/tensorflow/core/platform/default/logging.h ++++ b/tensorflow/core/platform/default/logging.h +@@ -13,6 +13,8 @@ + limitations under the License. + ==============================================================================*/ + ++#pragma warning(disable:4716) ++ + #ifndef TENSORFLOW_CORE_PLATFORM_DEFAULT_LOGGING_H_ + #define TENSORFLOW_CORE_PLATFORM_DEFAULT_LOGGING_H_ + diff --git a/ports/tensorflow-common/generate_static_link_cmd_linux.py b/ports/tensorflow-common/generate_static_link_cmd_linux.py new file mode 100644 index 00000000000000..7b17552154b6b3 --- /dev/null +++ b/ports/tensorflow-common/generate_static_link_cmd_linux.py @@ -0,0 +1,23 @@ +import re +import sys + +lib_suffix = "" if len(sys.argv) < 3 else sys.argv[2] +with open(sys.argv[1], "r") as f_in: + with open("static_link.sh", "w") as f_out: + p_cd = re.compile(r"^\((cd .*) && \\$") + p_linker = re.compile(fr"^\s*(.+)gcc.+(@bazel-out\S+libtensorflow{lib_suffix}\.so\.\d\.\d\.\d-2\.params).*") + f_out.write("#!/bin/bash\n# note: ar/binutils version 2.27 required to support output files > 4GB\n") + env = [] + for line in f_in: + if line.startswith("(cd"): + # new command, reset + env = [line] + else: + m1 = p_linker.match(line) + if m1: + m2 = p_cd.match(env[0]) + f_out.write(m2.group(1) + "\n") + line = f'"{m1.group(1)}ar" rcs {m1.group(2)[1:-9].replace(".so", ".a")} {m1.group(2).replace(".so", ".a")}\n' + f_out.write(line) + else: + env.append(line) diff --git a/ports/tensorflow-common/generate_static_link_cmd_macos.py b/ports/tensorflow-common/generate_static_link_cmd_macos.py new file mode 100644 index 00000000000000..5894c99b00232c --- /dev/null +++ b/ports/tensorflow-common/generate_static_link_cmd_macos.py @@ -0,0 +1,23 @@ +import re +import sys + +lib_suffix = "" if len(sys.argv) < 3 else sys.argv[2] +with open(sys.argv[1], "r") as f_in: + with open("static_link.sh", "w") as f_out: + p_cd = re.compile(r"^\((cd .*) && \\$") + p_linker = re.compile(fr"^\s*.+cc_wrapper.sh.+(@bazel-out\S+libtensorflow{lib_suffix}\.\d\.\d\.\d\.dylib-2\.params).*") + f_out.write("#!/bin/bash\n# note: ar/binutils version 2.27 required to support output files > 4GB\n") + env = [] + for line in f_in: + if line.startswith("(cd"): + # new command, reset + env = [line] + else: + m1 = p_linker.match(line) + if m1: + m2 = p_cd.match(env[0]) + f_out.write(m2.group(1) + "\n") + line = f'"/usr/bin/libtool" -static -o {m1.group(1)[1:-9].replace(".dylib", ".a")} {m1.group(1).replace(".dylib", ".a")}\n' + f_out.write(line) + else: + env.append(line) diff --git a/ports/tensorflow-common/generate_static_link_cmd_windows.py b/ports/tensorflow-common/generate_static_link_cmd_windows.py new file mode 100644 index 00000000000000..84ec9eede2186a --- /dev/null +++ b/ports/tensorflow-common/generate_static_link_cmd_windows.py @@ -0,0 +1,42 @@ +import os.path +import re +import sys + +lib_suffix = "" if len(sys.argv) < 3 else sys.argv[2] +with open(sys.argv[1], "r") as f_in: + with open("static_link.bat", "w") as f_out: + p_setenv = re.compile(r"^\s*(SET .+=.*)$") + p_linker = re.compile(fr".+link\.exe.+tensorflow{lib_suffix}\.dll-2\.params.*") + env = [] + for line in f_in: + if line.startswith("cd"): + # new command, reset + env = [] + else: + m = p_setenv.match(line) + if m: + env.append(m.group(1)) + else: + m = p_linker.match(line) + if m: + for e in env: + f_out.write(e + "\n") + tokens = line.split() + line = "\"" + params_file = None + for t in tokens: + if t.endswith("link.exe"): + t = t[:-len("link.exe")] + "lib.exe\"" + elif t == "/DLL" or t.lower()[1:].startswith("defaultlib:") or t.lower()[1:].startswith("ignore") or t.startswith("/OPT:") or t.startswith("/DEF:") or t.startswith("/DEBUG:") or t.startswith("/INCREMENTAL:"): + continue + elif t[0] == '@' and t.endswith(f"tensorflow{lib_suffix}.dll-2.params"): + t = t[:-len("dll-2.params")] + "lib-2.params-part1" + params_file = t[1:-len("-part1")] + line += t + " " + f_out.write(line + "\n") + # check for more parts if library needs to be split + file_no = 2 + while os.path.isfile(f"{params_file}-part{file_no}"): + f_out.write(line.replace("lib-2.params-part1", f"lib-2.params-part{file_no}") + "\n") + file_no += 1 + break diff --git a/ports/tensorflow-common/portfile.cmake b/ports/tensorflow-common/portfile.cmake new file mode 100644 index 00000000000000..edd171aa48e322 --- /dev/null +++ b/ports/tensorflow-common/portfile.cmake @@ -0,0 +1,28 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +set(TENSORFLOW_FILES + "${CMAKE_CURRENT_LIST_DIR}/change-macros-for-static-lib.patch" + "${CMAKE_CURRENT_LIST_DIR}/convert_lib_params_linux.py" + "${CMAKE_CURRENT_LIST_DIR}/convert_lib_params_macos.py" + "${CMAKE_CURRENT_LIST_DIR}/convert_lib_params_windows.py" + "${CMAKE_CURRENT_LIST_DIR}/fix-build-error.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-linux-build.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-windows-build.patch" + "${CMAKE_CURRENT_LIST_DIR}/generate_static_link_cmd_linux.py" + "${CMAKE_CURRENT_LIST_DIR}/generate_static_link_cmd_macos.py" + "${CMAKE_CURRENT_LIST_DIR}/generate_static_link_cmd_windows.py" + "${CMAKE_CURRENT_LIST_DIR}/README-linux" + "${CMAKE_CURRENT_LIST_DIR}/README-macos" + "${CMAKE_CURRENT_LIST_DIR}/README-windows" + "${CMAKE_CURRENT_LIST_DIR}/tensorflow-common.cmake" + "${CMAKE_CURRENT_LIST_DIR}/tensorflow-config-shared.cmake.in" + "${CMAKE_CURRENT_LIST_DIR}/tensorflow-config-static.cmake.in" + "${CMAKE_CURRENT_LIST_DIR}/tensorflow-config-windows-dll.cmake.in" + "${CMAKE_CURRENT_LIST_DIR}/tensorflow-config-windows-lib.cmake.in" + "${CMAKE_CURRENT_LIST_DIR}/Update-bazel-max-version.patch" + ) + +file(COPY ${TENSORFLOW_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +# Use vcpkg's license +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/tensorflow-common/tensorflow-common.cmake b/ports/tensorflow-common/tensorflow-common.cmake new file mode 100644 index 00000000000000..403f32c6cb8f0e --- /dev/null +++ b/ports/tensorflow-common/tensorflow-common.cmake @@ -0,0 +1,459 @@ +set(TF_VERSION 2.4.1) +set(TF_VERSION_SHORT 2.4) + +vcpkg_find_acquire_program(BAZEL) +get_filename_component(BAZEL_DIR "${BAZEL}" DIRECTORY) +vcpkg_add_to_path(PREPEND ${BAZEL_DIR}) +set(ENV{BAZEL_BIN_PATH} "${BAZEL}") + +function(tensorflow_try_remove_recurse_wait PATH_TO_REMOVE) + file(REMOVE_RECURSE ${PATH_TO_REMOVE}) + if(EXISTS "${PATH_TO_REMOVE}") + vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E sleep 5 WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} LOGNAME prerequesits-sleep-${TARGET_TRIPLET}) + file(REMOVE_RECURSE ${PATH_TO_REMOVE}) + endif() +endfunction() + +vcpkg_find_acquire_program(GIT) +get_filename_component(GIT_DIR "${GIT}" DIRECTORY) +vcpkg_add_to_path(PREPEND ${GIT_DIR}) + +string(FIND "${CURRENT_BUILDTREES_DIR}" " " POS) +if(NOT POS EQUAL -1) + message(FATAL_ERROR "Your vcpkg path contains spaces. This is not supported by the bazel build tool. Aborting.") +endif() + +if(CMAKE_HOST_WIN32) + string(FIND "$ENV{USERNAME}" " " POS) + if(NOT POS EQUAL -1) + message(WARNING "Your Windows username '$ENV{USERNAME}' contains spaces. Applying work-around to bazel. Be warned of possible further issues.") + endif() + + vcpkg_acquire_msys(MSYS_ROOT PACKAGES bash unzip patch diffutils libintl gzip coreutils mingw-w64-x86_64-python-numpy) + vcpkg_add_to_path(${MSYS_ROOT}/usr/bin) + vcpkg_add_to_path(${MSYS_ROOT}/mingw64/bin) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + + set(ENV{BAZEL_SH} ${MSYS_ROOT}/usr/bin/bash.exe) + set(ENV{BAZEL_VC} $ENV{VCInstallDir}) + set(ENV{BAZEL_VC_FULL_VERSION} $ENV{VCToolsVersion}) + + set(PYTHON3 "${MSYS_ROOT}/mingw64/bin/python3.exe") + vcpkg_execute_required_process(COMMAND ${PYTHON3} -c "import site; print(site.getsitepackages()[0])" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} LOGNAME prerequesits-pypath-${TARGET_TRIPLET} OUTPUT_VARIABLE PYTHON_LIB_PATH) +else() + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) + vcpkg_add_to_path(PREPEND ${PYTHON3_DIR}) + + if(VCPKG_TARGET_IS_OSX) + # acceleration libs currently broken on macOS => force numpy user space reinstall without BLAS/LAPACK/ATLAS + # remove this work-around again, i.e. default to "else" branch, once acceleration libs are fixed upstream + set(ENV{BLAS} "None") + set(ENV{LAPACK} "None") + set(ENV{ATLAS} "None") + vcpkg_execute_required_process(COMMAND ${PYTHON3} -m pip install --user -U --force-reinstall numpy WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} LOGNAME prerequesits-pip-${TARGET_TRIPLET}) + else() + vcpkg_execute_required_process(COMMAND ${PYTHON3} -m pip install --user -U numpy WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} LOGNAME prerequesits-pip-${TARGET_TRIPLET}) + endif() + vcpkg_execute_required_process(COMMAND ${PYTHON3} -c "import site; print(site.getusersitepackages())" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} LOGNAME prerequesits-pypath-${TARGET_TRIPLET} OUTPUT_VARIABLE PYTHON_LIB_PATH) +endif() +set(ENV{PYTHON_BIN_PATH} "${PYTHON3}") +set(ENV{PYTHON_LIB_PATH} "${PYTHON_LIB_PATH}") + +# check if numpy can be loaded +vcpkg_execute_required_process(COMMAND ${PYTHON3} -c "import numpy" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} LOGNAME prerequesits-numpy-${TARGET_TRIPLET}) + +set(ENV{USE_DEFAULT_PYTHON_LIB_PATH} 1) +set(ENV{TF_NEED_KAFKA} 0) +set(ENV{TF_NEED_OPENCL_SYCL} 0) +set(ENV{TF_NEED_AWS} 0) +set(ENV{TF_NEED_GCP} 0) +set(ENV{TF_NEED_HDFS} 0) +set(ENV{TF_NEED_S3} 0) +set(ENV{TF_ENABLE_XLA} 0) +set(ENV{TF_NEED_GDR} 0) +set(ENV{TF_NEED_VERBS} 0) +set(ENV{TF_NEED_OPENCL} 0) +set(ENV{TF_NEED_MPI} 0) +set(ENV{TF_NEED_TENSORRT} 0) +set(ENV{TF_NEED_NGRAPH} 0) +set(ENV{TF_NEED_IGNITE} 0) +set(ENV{TF_NEED_ROCM} 0) +set(ENV{TF_SET_ANDROID_WORKSPACE} 0) +set(ENV{TF_DOWNLOAD_CLANG} 0) +set(ENV{TF_NCCL_VERSION} ${TF_VERSION_SHORT}) +set(ENV{NCCL_INSTALL_PATH} "") +set(ENV{CC_OPT_FLAGS} "/arch:AVX") +set(ENV{TF_NEED_CUDA} 0) +set(ENV{TF_CONFIGURE_IOS} 0) + +if(VCPKG_TARGET_IS_WINDOWS) + set(BAZEL_LIB_NAME tensorflow${TF_LIB_SUFFIX}.dll) + set(PLATFORM_SUFFIX windows) + set(STATIC_LINK_CMD static_link.bat) +elseif(VCPKG_TARGET_IS_OSX) + set(BAZEL_LIB_NAME libtensorflow${TF_LIB_SUFFIX}.dylib) + set(PLATFORM_SUFFIX macos) + set(STATIC_LINK_CMD sh static_link.sh) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(TF_LIB_NAME "libtensorflow${TF_LIB_SUFFIX}.dylib") + set(TF_LIB_NAME_SHORT "libtensorflow${TF_LIB_SUFFIX}.2.dylib") + set(TF_LIB_NAME_FULL "libtensorflow${TF_LIB_SUFFIX}.${TF_VERSION}.dylib") + set(TF_FRAMEWORK_NAME "libtensorflow_framework.dylib") + set(TF_FRAMEWORK_NAME_SHORT "libtensorflow_framework.2.dylib") + set(TF_FRAMEWORK_NAME_FULL "libtensorflow_framework.${TF_VERSION}.dylib") + else() + set(TF_LIB_NAME "libtensorflow${TF_LIB_SUFFIX}.a") + set(TF_LIB_NAME_SHORT "libtensorflow${TF_LIB_SUFFIX}.2.a") + set(TF_LIB_NAME_FULL "libtensorflow${TF_LIB_SUFFIX}.${TF_VERSION}.a") + endif() +else() + set(BAZEL_LIB_NAME libtensorflow${TF_LIB_SUFFIX}.so) + set(PLATFORM_SUFFIX linux) + set(STATIC_LINK_CMD sh static_link.sh) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(TF_LIB_NAME "libtensorflow${TF_LIB_SUFFIX}.so") + set(TF_LIB_NAME_SHORT "libtensorflow${TF_LIB_SUFFIX}.so.2") + set(TF_LIB_NAME_FULL "libtensorflow${TF_LIB_SUFFIX}.so.${TF_VERSION}") + set(TF_FRAMEWORK_NAME "libtensorflow_framework.so") + set(TF_FRAMEWORK_NAME_SHORT "libtensorflow_framework.so.2") + set(TF_FRAMEWORK_NAME_FULL "libtensorflow_framework.so.${TF_VERSION}") + else() + set(TF_LIB_NAME "libtensorflow${TF_LIB_SUFFIX}.a") + set(TF_LIB_NAME_SHORT "libtensorflow${TF_LIB_SUFFIX}.a.2") + set(TF_LIB_NAME_FULL "libtensorflow${TF_LIB_SUFFIX}.a.${TF_VERSION}") + endif() +endif() + +foreach(BUILD_TYPE dbg rel) + # prefer repeated source extraction here for each build type over extracting once above the loop and copying because users reported issues with copying symlinks + set(STATIC_ONLY_PATCHES) + set(WINDOWS_ONLY_PATCHES) + set(LINUX_ONLY_PATCHES) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(STATIC_ONLY_PATCHES "${CMAKE_CURRENT_LIST_DIR}/change-macros-for-static-lib.patch") # there is no static build option - change macros via patch and link library manually at the end + endif() + if(VCPKG_TARGET_IS_WINDOWS) + set(WINDOWS_ONLY_PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-windows-build.patch") + endif() + if(VCPKG_TARGET_IS_LINUX) + set(LINUX_ONLY_PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-linux-build.patch") + endif() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tensorflow/tensorflow + REF "v${TF_VERSION}" + SHA512 be8273f464c1c1c392f3ab0190dbba36d56a0edcc7991c1a86f16604c859056d3188737d11c3b41ec7918e1cf46d13814c50c00be8f459dde9f0fb618740ee3c + HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-build-error.patch" # Fix namespace error + "${CMAKE_CURRENT_LIST_DIR}/Update-bazel-max-version.patch" + ${STATIC_ONLY_PATCHES} + ${WINDOWS_ONLY_PATCHES} + ${LINUX_ONLY_PATCHES} + ) + + message(STATUS "Configuring TensorFlow (${BUILD_TYPE})") + tensorflow_try_remove_recurse_wait(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}) + file(RENAME ${SOURCE_PATH} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}) + set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}") + + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${SOURCE_PATH}/configure.py --workspace "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE} + LOGNAME config-${TARGET_TRIPLET}-${BUILD_TYPE} + ) + + if(DEFINED ENV{BAZEL_CUSTOM_CACERTS}) + file(APPEND ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/.bazelrc "startup --host_jvm_args=-Djavax.net.ssl.trustStore='$ENV{BAZEL_CUSTOM_CACERTS}'\n") + message(STATUS "Using custom CA certificate store at: $ENV{BAZEL_CUSTOM_CACERTS}") + if(DEFINED ENV{BAZEL_CUSTOM_CACERTS_PASSWORD}) + file(APPEND ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/.bazelrc "startup --host_jvm_args=-Djavax.net.ssl.trustStorePassword='$ENV{BAZEL_CUSTOM_CACERTS_PASSWORD}'\n") + message(STATUS "Using supplied custom CA certificate store password.") + endif() + else() + if(DEFINED ENV{HTTPS_PROXY}) + message(STATUS "You are using HTTPS_PROXY. In case you encounter bazel certificate errors, you might want to set: BAZEL_CUSTOM_CACERTS=/path/to/trust.store (and optionally BAZEL_CUSTOM_CACERTS_PASSWORD), and to enable vcpkg to actually use it: VCPKG_KEEP_ENV_VARS=BAZEL_CUSTOM_CACERTS;BAZEL_CUSTOM_CACERTS_PASSWORD") + if(CMAKE_HOST_WIN32) + message(STATUS "(For BAZEL_CUSTOM_CACERTS please use forward slashes instead of backslashes on Windows systems.") + endif() + endif() + endif() + + message(STATUS "Warning: Building TensorFlow can take an hour or more.") + set(COPTS) + set(CXXOPTS) + set(LINKOPTS) + if(VCPKG_TARGET_IS_WINDOWS) + set(PLATFORM_COMMAND WINDOWS_COMMAND) + else() + set(PLATFORM_COMMAND UNIX_COMMAND) + endif() + if(BUILD_TYPE STREQUAL dbg) + if(VCPKG_TARGET_IS_WINDOWS) + set(BUILD_OPTS "--compilation_mode=dbg --features=fastbuild") # link with /DEBUG:FASTLINK instead of /DEBUG:FULL to avoid .pdb >4GB error + else() + set(BUILD_OPTS "--compilation_mode=dbg") + endif() + + separate_arguments(VCPKG_C_FLAGS ${PLATFORM_COMMAND} ${VCPKG_C_FLAGS}) + separate_arguments(VCPKG_C_FLAGS_DEBUG ${PLATFORM_COMMAND} ${VCPKG_C_FLAGS_DEBUG}) + foreach(OPT IN LISTS VCPKG_C_FLAGS VCPKG_C_FLAGS_DEBUG) + list(APPEND COPTS "--copt='${OPT}'") + endforeach() + separate_arguments(VCPKG_CXX_FLAGS ${PLATFORM_COMMAND} ${VCPKG_CXX_FLAGS}) + separate_arguments(VCPKG_CXX_FLAGS_DEBUG ${PLATFORM_COMMAND} ${VCPKG_CXX_FLAGS_DEBUG}) + foreach(OPT IN LISTS VCPKG_CXX_FLAGS VCPKG_CXX_FLAGS_DEBUG) + list(APPEND CXXOPTS "--cxxopt='${OPT}'") + endforeach() + separate_arguments(VCPKG_LINKER_FLAGS ${PLATFORM_COMMAND} ${VCPKG_LINKER_FLAGS}) + separate_arguments(VCPKG_LINKER_FLAGS_DEBUG ${PLATFORM_COMMAND} ${VCPKG_LINKER_FLAGS_DEBUG}) + foreach(OPT IN LISTS VCPKG_LINKER_FLAGS VCPKG_LINKER_FLAGS_DEBUG) + list(APPEND LINKOPTS "--linkopt='${OPT}'") + endforeach() + else() + set(BUILD_OPTS "--compilation_mode=opt") + + separate_arguments(VCPKG_C_FLAGS ${PLATFORM_COMMAND} ${VCPKG_C_FLAGS}) + separate_arguments(VCPKG_C_FLAGS_RELEASE ${PLATFORM_COMMAND} ${VCPKG_C_FLAGS_RELEASE}) + foreach(OPT IN LISTS VCPKG_C_FLAGS VCPKG_C_FLAGS_RELEASE) + list(APPEND COPTS "--copt='${OPT}'") + endforeach() + separate_arguments(VCPKG_CXX_FLAGS ${PLATFORM_COMMAND} ${VCPKG_CXX_FLAGS}) + separate_arguments(VCPKG_CXX_FLAGS_RELEASE ${PLATFORM_COMMAND} ${VCPKG_CXX_FLAGS_RELEASE}) + foreach(OPT IN LISTS VCPKG_CXX_FLAGS VCPKG_CXX_FLAGS_RELEASE) + list(APPEND CXXOPTS "--cxxopt='${OPT}'") + endforeach() + separate_arguments(VCPKG_LINKER_FLAGS ${PLATFORM_COMMAND} ${VCPKG_LINKER_FLAGS}) + separate_arguments(VCPKG_LINKER_FLAGS_RELEASE ${PLATFORM_COMMAND} ${VCPKG_LINKER_FLAGS_RELEASE}) + foreach(OPT IN LISTS VCPKG_LINKER_FLAGS VCPKG_LINKER_FLAGS_RELEASE) + list(APPEND LINKOPTS "--linkopt='${OPT}'") + endforeach() + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + if(VCPKG_TARGET_IS_WINDOWS) + list(JOIN COPTS " " COPTS) + list(JOIN CXXOPTS " " CXXOPTS) + list(JOIN LINKOPTS " " LINKOPTS) + # use --output_user_root to work-around too-long-path-names issue and username-with-spaces issue + vcpkg_execute_build_process( + COMMAND ${BASH} --noprofile --norc -c "'${BAZEL}' --output_user_root='${CURRENT_BUILDTREES_DIR}/.bzl' build --verbose_failures ${BUILD_OPTS} ${COPTS} ${CXXOPTS} ${LINKOPTS} --python_path='${PYTHON3}' --define=no_tensorflow_py_deps=true ///tensorflow:${BAZEL_LIB_NAME} ///tensorflow:install_headers" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE} + LOGNAME build-${TARGET_TRIPLET}-${BUILD_TYPE} + ) + else() + vcpkg_execute_build_process( + COMMAND ${BAZEL} --output_user_root=${CURRENT_BUILDTREES_DIR}/.bzl build --verbose_failures ${BUILD_OPTS} --python_path=${PYTHON3} ${COPTS} ${CXXOPTS} ${LINKOPTS} --define=no_tensorflow_py_deps=true //tensorflow:${BAZEL_LIB_NAME} //tensorflow:install_headers + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE} + LOGNAME build-${TARGET_TRIPLET}-${BUILD_TYPE} + ) + endif() + else() + if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_CRT_LINKAGE STREQUAL static) + if(BUILD_TYPE STREQUAL dbg) + list(APPEND COPTS "--copt=-MTd") + else() + list(APPEND COPTS "--copt=-MT") + endif() + endif() + list(JOIN COPTS " " COPTS) + list(JOIN CXXOPTS " " CXXOPTS) + list(JOIN LINKOPTS " " LINKOPTS) + # use --output_user_root to work-around too-long-path-names issue and username-with-spaces issue + vcpkg_execute_build_process( + COMMAND ${BASH} --noprofile --norc -c "${BAZEL} --output_user_root='${CURRENT_BUILDTREES_DIR}/.bzl' build -s --verbose_failures ${BUILD_OPTS} --features=fully_static_link ${COPTS} ${CXXOPTS} ${LINKOPTS} --python_path='${PYTHON3}' --define=no_tensorflow_py_deps=true ///tensorflow:${BAZEL_LIB_NAME} ///tensorflow:install_headers" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE} + LOGNAME build-${TARGET_TRIPLET}-${BUILD_TYPE} + ) + else() + vcpkg_execute_build_process( + COMMAND ${BAZEL} --output_user_root=${CURRENT_BUILDTREES_DIR}/.bzl build -s --verbose_failures ${BUILD_OPTS} ${COPTS} ${CXXOPTS} ${LINKOPTS} --python_path=${PYTHON3} --define=no_tensorflow_py_deps=true //tensorflow:${BAZEL_LIB_NAME} //tensorflow:install_headers + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE} + LOGNAME build-${TARGET_TRIPLET}-${BUILD_TYPE} + ) + endif() + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_execute_build_process( + COMMAND ${PYTHON3} "${CMAKE_CURRENT_LIST_DIR}/convert_lib_params_${PLATFORM_SUFFIX}.py" ${TF_LIB_SUFFIX} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow + LOGNAME postbuild1-${TARGET_TRIPLET}-${BUILD_TYPE} + ) + else() + vcpkg_execute_build_process( + COMMAND ${PYTHON3} "${CMAKE_CURRENT_LIST_DIR}/convert_lib_params_${PLATFORM_SUFFIX}.py" ${TF_VERSION} ${TF_LIB_SUFFIX} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow + LOGNAME postbuild1-${TARGET_TRIPLET}-${BUILD_TYPE} + ) + endif() + # for some reason stdout of bazel ends up in stderr, so use err log file in the following command + vcpkg_execute_build_process( + COMMAND ${PYTHON3} "${CMAKE_CURRENT_LIST_DIR}/generate_static_link_cmd_${PLATFORM_SUFFIX}.py" "${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-${BUILD_TYPE}-err.log" ${TF_LIB_SUFFIX} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-${TARGET_TRIPLET}-${BUILD_TYPE} + LOGNAME postbuild2-${TARGET_TRIPLET}-${BUILD_TYPE} + ) + vcpkg_execute_build_process( + COMMAND ${STATIC_LINK_CMD} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-${TARGET_TRIPLET}-${BUILD_TYPE} + LOGNAME postbuild3-${TARGET_TRIPLET}-${BUILD_TYPE} + ) + endif() + + if(BUILD_TYPE STREQUAL "dbg") + set(DIR_PREFIX "/debug") + else() + set(DIR_PREFIX "") + endif() + + if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow/tensorflow${TF_LIB_SUFFIX}.dll DESTINATION ${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/bin) + # rename before copy because after copy the file might be locked by anti-malware scanners for some time so that renaming fails + file(RENAME ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow/tensorflow${TF_LIB_SUFFIX}.dll.if.lib ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow/tensorflow${TF_LIB_SUFFIX}.lib) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow/tensorflow${TF_LIB_SUFFIX}.lib DESTINATION ${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/lib) + if(BUILD_TYPE STREQUAL dbg) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow/tensorflow${TF_LIB_SUFFIX}.pdb DESTINATION ${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/bin) + message(STATUS "Warning: debug information tensorflow${TF_LIB_SUFFIX}.pdb will be of limited use because only a reduced set could be produced due to the 4GB internal PDB file limit even on x64.") + endif() + else() + if(BUILD_TYPE STREQUAL dbg) + set(library_parts_variable TF_LIB_PARTS_DEBUG) + else() + set(library_parts_variable TF_LIB_PARTS_RELEASE) + endif() + set(${library_parts_variable}) + + # library might have been split because no more than 4GB are supported even on x64 Windows + foreach(PART_NO RANGE 1 100) + set(source "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow/tensorflow${TF_LIB_SUFFIX}-part${PART_NO}.lib") + if(EXISTS "${source}") + file(COPY "${source}" DESTINATION "${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/lib") + list(APPEND ${library_parts_variable} "tensorflow${TF_LIB_SUFFIX}-part${PART_NO}.lib") + else() + break() + endif() + endforeach() + endif() + else() + file(COPY + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow/${TF_LIB_NAME_FULL} + DESTINATION ${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/lib + ) + + # Note: these use relative links + file(CREATE_LINK ${TF_LIB_NAME_FULL} + ${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/lib/${TF_LIB_NAME_SHORT} + SYMBOLIC + ) + file(CREATE_LINK ${TF_LIB_NAME_FULL} + ${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/lib/${TF_LIB_NAME} + SYMBOLIC + ) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}/bazel-bin/tensorflow/${TF_FRAMEWORK_NAME_FULL} + DESTINATION ${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/lib + ) + file(CREATE_LINK + ${TF_FRAMEWORK_NAME_FULL} + ${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/lib/${TF_FRAMEWORK_NAME_SHORT} + SYMBOLIC + ) + file(CREATE_LINK + ${TF_FRAMEWORK_NAME_FULL} + ${CURRENT_PACKAGES_DIR}${DIR_PREFIX}/lib/${TF_FRAMEWORK_NAME} + SYMBOLIC + ) + endif() + endif() +endforeach() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static TensorFlow build contains several external dependencies that may cause linking conflicts (for example, one cannot use both openssl and TensorFlow in the same project, since TensorFlow contains boringssl).") + if(VCPKG_TARGET_IS_WINDOWS) + message(STATUS "Note: For some TensorFlow features (e.g. OpRegistry), it might be necessary to tell the linker to include the whole library, i.e., link using options '/WHOLEARCHIVE:tensorflow${TF_LIB_SUFFIX}-part1.lib /WHOLEARCHIVE:tensorflow${TF_LIB_SUFFIX}-part2.lib ...'") + else() + message(STATUS "Note: There is no separate libtensorflow_framework.a as it got merged into libtensorflow${TF_LIB_SUFFIX}.a to avoid linking conflicts.") + if(VCPKG_TARGET_IS_OSX) + message(STATUS "Note: Beside TensorFlow itself, you'll need to also pass its dependancies to the linker, for example '-ltensorflow${TF_LIB_SUFFIX} -framework CoreFoundation'") + message(STATUS "Note: For some TensorFlow features (e.g. OpRegistry), it might be necessary to tell the linker to include the whole library: '-Wl,-force_load,path/to/libtensorflow${TF_LIB_SUFFIX}.a -framework CoreFoundation -framework Security [rest of linker arguments]'") + else() + message(STATUS "Note: Beside TensorFlow itself, you'll need to also pass its dependancies to the linker, for example '-ltensorflow${TF_LIB_SUFFIX} -lm -ldl -lpthread'") + message(STATUS "Note: For some TensorFlow features (e.g. OpRegistry), it might be necessary to tell the linker to include the whole library: '-Wl,--whole-archive -ltensorflow${TF_LIB_SUFFIX} -Wl,--no-whole-archive [rest of linker arguments]'") + endif() + endif() + + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/README-${PLATFORM_SUFFIX} + ${CURRENT_PACKAGES_DIR}/share/tensorflow${TF_PORT_SUFFIX}/README + COPYONLY) +endif() + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tensorflow${TF_PORT_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tensorflow${TF_PORT_SUFFIX}/LICENSE ${CURRENT_PACKAGES_DIR}/share/tensorflow${TF_PORT_SUFFIX}/copyright) + + +# NOTE: if this port ever supports VCPKG_BUILD_TYPE, use that to set these. +set(TENSORFLOW_HAS_RELEASE ON) +set(TENSORFLOW_HAS_DEBUG ON) + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/tensorflow-config-windows-dll.cmake.in + ${CURRENT_PACKAGES_DIR}/share/tensorflow${TF_PORT_SUFFIX}/tensorflow${TF_PORT_SUFFIX}-config.cmake + @ONLY) + else() + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/tensorflow-config-windows-lib.cmake.in + ${CURRENT_PACKAGES_DIR}/share/tensorflow${TF_PORT_SUFFIX}/tensorflow${TF_PORT_SUFFIX}-config.cmake + @ONLY) + + set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled) + + set(prefix [[${TENSORFLOW_INSTALL_PREFIX}]]) + + set(libs_to_link) + foreach(lib IN LISTS TF_LIB_PARTS_RELEASE) + list(APPEND libs_to_link "$<$:${prefix}/lib/${lib}>") + endforeach() + foreach(lib IN LISTS TF_LIB_PARTS_DEBUG) + list(APPEND libs_to_link "$<$:${prefix}/debug/lib/${lib}>") + endforeach() + if(TENSORFLOW_HAS_RELEASE) + set(TF_LIB_PARTS_DEFAULT ${TF_LIB_PARTS_RELEASE}) + set(prefix_DEFAULT "${prefix}") + elseif(TENSORFLOW_HAS_DEBUG) + set(TF_LIB_PARTS_DEFAULT ${TF_LIB_PARTS_DEBUG}) + set(prefix_DEFAULT "${prefix}/debug") + endif() + + foreach(lib IN LISTS TF_LIB_PARTS_DEFAULT) + list(APPEND libs_to_link + "$<$,$>>:${prefix}/lib/${lib}>") + endforeach() + + string(REPLACE ";" "\n\t\t" libs_to_link "${libs_to_link}") + file(APPEND ${CURRENT_PACKAGES_DIR}/share/tensorflow${TF_PORT_SUFFIX}/tensorflow${TF_PORT_SUFFIX}-config.cmake " +target_link_libraries(tensorflow${TF_LIB_SUFFIX}::tensorflow${TF_LIB_SUFFIX} + INTERFACE + ${libs_to_link} +)" + ) + endif() +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/tensorflow-config-shared.cmake.in + ${CURRENT_PACKAGES_DIR}/share/tensorflow${TF_PORT_SUFFIX}/tensorflow${TF_PORT_SUFFIX}-config.cmake + @ONLY) + else() + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/tensorflow-config-static.cmake.in + ${CURRENT_PACKAGES_DIR}/share/tensorflow${TF_PORT_SUFFIX}/tensorflow${TF_PORT_SUFFIX}-config.cmake + @ONLY) + endif() +endif() + +message(STATUS "You may want to delete ${CURRENT_BUILDTREES_DIR} to free diskspace.") diff --git a/ports/tensorflow-common/tensorflow-config-shared.cmake.in b/ports/tensorflow-common/tensorflow-config-shared.cmake.in new file mode 100644 index 00000000000000..df4ad83b670979 --- /dev/null +++ b/ports/tensorflow-common/tensorflow-config-shared.cmake.in @@ -0,0 +1,85 @@ +if(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ OR TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow_framework) + if(NOT (TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ AND TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow_framework)) + message(FATAL_ERROR "Some (but not all) targets in this config.cmake were already defined.") + endif() + + return() +endif() + +add_library(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ SHARED IMPORTED GLOBAL) +add_library(tensorflow@TF_LIB_SUFFIX@::tensorflow_framework SHARED IMPORTED GLOBAL) + +# Compute the installation prefix from this tensorflow@TF_PORT_SUFFIX@-config.cmake file location. +# CMAKE_CURRENT_LIST_DIR = [vcpkg_installed_dir]/[target_triplet]/share/tensorflow@TF_PORT_SUFFIX@ +get_filename_component(TENSORFLOW_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY) +# TENSORFLOW_INSTALL_PREFIX = [vcpkg_installed_dir]/[target_triplet]/share +get_filename_component(TENSORFLOW_INSTALL_PREFIX "${TENSORFLOW_INSTALL_PREFIX}" DIRECTORY) +# TENSORFLOW_INSTALL_PREFIX = [vcpkg_installed_dir]/[target_triplet] + +target_include_directories(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + INTERFACE + @TF_INCLUDE_DIRS@ +) +target_include_directories(tensorflow@TF_LIB_SUFFIX@::tensorflow_framework + INTERFACE + @TF_INCLUDE_DIRS@ +) + +if(@TENSORFLOW_HAS_RELEASE@) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTY IMPORTED_LOCATION + "${TENSORFLOW_INSTALL_PREFIX}/lib/@TF_LIB_NAME@" + ) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow_framework + PROPERTY IMPORTED_LOCATION + "${TENSORFLOW_INSTALL_PREFIX}/lib/@TF_FRAMEWORK_NAME@" + ) + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE + ) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow_framework + APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE + ) + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTY IMPORTED_LOCATION_RELEASE + "${TENSORFLOW_INSTALL_PREFIX}/lib/@TF_LIB_NAME@" + ) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow_framework + PROPERTY IMPORTED_LOCATION_RELEASE + "${TENSORFLOW_INSTALL_PREFIX}/lib/@TF_FRAMEWORK_NAME@" + ) +endif() + +if(@TENSORFLOW_HAS_DEBUG) + if(NOT @TENSORFLOW_HAS_RELEASE) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTY IMPORTED_LOCATION + "${TENSORFLOW_INSTALL_PREFIX}/debug/lib/@TF_LIB_NAME@" + ) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow_framework + PROPERTY IMPORTED_LOCATION + "${TENSORFLOW_INSTALL_PREFIX}/debug/lib/@TF_FRAMEWORK_NAME@" + ) + endif() + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG + ) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow_framework + APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG + ) + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTY IMPORTED_LOCATION_DEBUG + "${TENSORFLOW_INSTALL_PREFIX}/debug/lib/@TF_LIB_NAME@" + ) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow_framework + PROPERTY IMPORTED_LOCATION_DEBUG + "${TENSORFLOW_INSTALL_PREFIX}/debug/lib/@TF_FRAMEWORK_NAME@" + ) +endif() + +set(tensorflow@TF_LIB_SUFFIX@_FOUND TRUE) +set(tensorflow_framework_FOUND TRUE) diff --git a/ports/tensorflow-common/tensorflow-config-static.cmake.in b/ports/tensorflow-common/tensorflow-config-static.cmake.in new file mode 100644 index 00000000000000..bd8510c5e8edd7 --- /dev/null +++ b/ports/tensorflow-common/tensorflow-config-static.cmake.in @@ -0,0 +1,55 @@ +if(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@) + return() +endif() + +add_library(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ STATIC IMPORTED GLOBAL) + +# Compute the installation prefix from this tensorflow@TF_PORT_SUFFIX@-config.cmake file location. +# CMAKE_CURRENT_LIST_DIR = [vcpkg_installed_dir]/[target_triplet]/share/tensorflow@TF_PORT_SUFFIX@ +get_filename_component(TENSORFLOW_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY) +# TENSORFLOW_INSTALL_PREFIX = [vcpkg_installed_dir]/[target_triplet]/share +get_filename_component(TENSORFLOW_INSTALL_PREFIX "${TENSORFLOW_INSTALL_PREFIX}" DIRECTORY) +# TENSORFLOW_INSTALL_PREFIX = [vcpkg_installed_dir]/[target_triplet] + +target_include_directories(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + INTERFACE + @TF_INCLUDE_DIRS@ +) + +if(@TENSORFLOW_HAS_RELEASE@) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTY IMPORTED_LOCATION + "${TENSORFLOW_INSTALL_PREFIX}/lib/@TF_LIB_NAME@" + ) + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + APPEND PROPERTY IMPORTED_CONFIGURATIONS + RELEASE + ) + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTY IMPORTED_LOCATION_RELEASE + "${TENSORFLOW_INSTALL_PREFIX}/lib/@TF_LIB_NAME@" + ) +endif() + +if(@TENSORFLOW_HAS_DEBUG@) + if(NOT @TENSORFLOW_HAS_RELEASE@) + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTY IMPORTED_LOCATION + "${TENSORFLOW_INSTALL_PREFIX}/debug/lib/@TF_LIB_NAME@" + ) + endif() + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + APPEND PROPERTY IMPORTED_CONFIGURATIONS + DEBUG + ) + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTY IMPORTED_LOCATION_DEBUG + "${TENSORFLOW_INSTALL_PREFIX}/debug/lib/@TF_LIB_NAME@" + ) +endif() + +set(tensorflow@TF_LIB_SUFFIX@_FOUND TRUE) diff --git a/ports/tensorflow-common/tensorflow-config-windows-dll.cmake.in b/ports/tensorflow-common/tensorflow-config-windows-dll.cmake.in new file mode 100644 index 00000000000000..1c3cfa23eeed8c --- /dev/null +++ b/ports/tensorflow-common/tensorflow-config-windows-dll.cmake.in @@ -0,0 +1,55 @@ +if(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@) + return() +endif() + +add_library(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ SHARED IMPORTED GLOBAL) + +# Compute the installation prefix from this tensorflow@TF_PORT_SUFFIX@-config.cmake file location. +# CMAKE_CURRENT_LIST_DIR = [vcpkg_installed_dir]/[target_triplet]/share/tensorflow@TF_PORT_SUFFIX@ +get_filename_component(TENSORFLOW_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY) +# TENSORFLOW_INSTALL_PREFIX = [vcpkg_installed_dir]/[target_triplet]/share +get_filename_component(TENSORFLOW_INSTALL_PREFIX "${TENSORFLOW_INSTALL_PREFIX}" DIRECTORY) +# TENSORFLOW_INSTALL_PREFIX = [vcpkg_installed_dir]/[target_triplet] + +target_include_directories(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + INTERFACE + @TF_INCLUDE_DIRS@ +) + +if(@TENSORFLOW_HAS_RELEASE@) + set_target_properties(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTIES + IMPORTED_LOCATION "${TENSORFLOW_INSTALL_PREFIX}/bin/tensorflow@TF_LIB_SUFFIX@.dll" + IMPORTED_IMPLIB "${TENSORFLOW_INSTALL_PREFIX}/lib/tensorflow@TF_LIB_SUFFIX@.lib" + ) + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE + ) + set_target_properties(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTIES + IMPORTED_LOCATION_RELEASE "${TENSORFLOW_INSTALL_PREFIX}/bin/tensorflow@TF_LIB_SUFFIX@.dll" + IMPORTED_IMPLIB_RELEASE "${TENSORFLOW_INSTALL_PREFIX}/lib/tensorflow@TF_LIB_SUFFIX@.lib" + ) +endif() + +if(@TENSORFLOW_HAS_DEBUG@) + if(NOT @TENSORFLOW_HAS_RELEASE@) + set_target_properties(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTIES + IMPORTED_LOCATION "${TENSORFLOW_INSTALL_PREFIX}/debug/bin/tensorflow@TF_LIB_SUFFIX@.dll" + IMPORTED_IMPLIB "${TENSORFLOW_INSTALL_PREFIX}/debug/lib/tensorflow@TF_LIB_SUFFIX@.lib" + ) + endif() + + set_property(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG + ) + set_target_properties(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + PROPERTIES + IMPORTED_LOCATION_DEBUG "${TENSORFLOW_INSTALL_PREFIX}/debug/bin/tensorflow@TF_LIB_SUFFIX@.dll" + IMPORTED_IMPLIB_DEBUG "${TENSORFLOW_INSTALL_PREFIX}/debug/lib/tensorflow@TF_LIB_SUFFIX@.lib" + ) +endif() + +set(tensorflow@TF_LIB_SUFFIX@_FOUND TRUE) diff --git a/ports/tensorflow-common/tensorflow-config-windows-lib.cmake.in b/ports/tensorflow-common/tensorflow-config-windows-lib.cmake.in new file mode 100644 index 00000000000000..00382b187cb1e6 --- /dev/null +++ b/ports/tensorflow-common/tensorflow-config-windows-lib.cmake.in @@ -0,0 +1,18 @@ +if(TARGET tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@) + return() +endif() + +set(tensorflow@TF_LIB_SUFFIX@_FOUND TRUE) + +# Compute the installation prefix from this tensorflow@TF_PORT_SUFFIX@-config.cmake file location. +# CMAKE_CURRENT_LIST_DIR = [vcpkg_installed_dir]/[target_triplet]/share/tensorflow@TF_PORT_SUFFIX@ +get_filename_component(TENSORFLOW_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY) +# TENSORFLOW_INSTALL_PREFIX = [vcpkg_installed_dir]/[target_triplet]/share +get_filename_component(TENSORFLOW_INSTALL_PREFIX "${TENSORFLOW_INSTALL_PREFIX}" DIRECTORY) +# TENSORFLOW_INSTALL_PREFIX = [vcpkg_installed_dir]/[target_triplet] + +add_library(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ INTERFACE IMPORTED GLOBAL) +target_include_directories(tensorflow@TF_LIB_SUFFIX@::tensorflow@TF_LIB_SUFFIX@ + INTERFACE + @TF_INCLUDE_DIRS@ +) diff --git a/ports/tensorflow-common/vcpkg.json b/ports/tensorflow-common/vcpkg.json new file mode 100644 index 00000000000000..b0dfa7959bea25 --- /dev/null +++ b/ports/tensorflow-common/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tensorflow-common", + "version-semver": "2.4.1", + "port-version": 4, + "description": "This meta package holds common files for the C [tensorflow] and the C++ [tensorflow-cc] API version of TensorFlow but is not installable on its own.", + "homepage": "https://github.com/tensorflow/tensorflow" +} diff --git a/ports/tensorflow/portfile.cmake b/ports/tensorflow/portfile.cmake new file mode 100644 index 00000000000000..a393a6ab9488b3 --- /dev/null +++ b/ports/tensorflow/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm" ON_TARGET "uwp") + +set(TF_LIB_SUFFIX "") +set(TF_PORT_SUFFIX "") +set(TF_INCLUDE_DIRS "${CURRENT_INSTALLED_DIR}/include") +list(APPEND CMAKE_MODULE_PATH "${CURRENT_INSTALLED_DIR}/share/tensorflow-common") +include(tensorflow-common) + +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/c_api.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/c_api_experimental.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/c_api_macros.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/tensor_interface.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/tf_attrtype.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/tf_datatype.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/tf_file_statistics.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/tf_status.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/tf_tensor.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/tf_tstring.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/eager/c_api.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c/eager") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/eager/c_api_experimental.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c/eager") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/c/eager/dlpack.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/c/eager") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/core/platform/ctstring.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/core/platform") +file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/include/tensorflow/core/platform/ctstring_internal.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/tensorflow/core/platform") diff --git a/ports/tensorflow/vcpkg.json b/ports/tensorflow/vcpkg.json new file mode 100644 index 00000000000000..b6fb8e6136086b --- /dev/null +++ b/ports/tensorflow/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "tensorflow", + "version-semver": "2.4.1", + "description": "Library for computation using data flow graphs for scalable machine learning (C API version)", + "homepage": "https://github.com/tensorflow/tensorflow", + "supports": "!(x86 | arm | uwp)", + "dependencies": [ + "tensorflow-common" + ] +} diff --git a/ports/tensorpipe/fix-cmakelists.patch b/ports/tensorpipe/fix-cmakelists.patch new file mode 100644 index 00000000000000..172ac1e671e727 --- /dev/null +++ b/ports/tensorpipe/fix-cmakelists.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 640054e..18de9ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,6 +23,6 @@ include(MiscCheck) + + add_subdirectory(tensorpipe) + +-install(EXPORT TensorpipeTargets +- DESTINATION share/cmake/Tensorpipe +- FILE TensorpipeTargets.cmake) ++install(EXPORT tensorpipeTargets ++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME} # share/tensorpipe ++ FILE tensorpipeTargets.cmake) +diff --git a/tensorpipe/CMakeLists.txt b/tensorpipe/CMakeLists.txt +index d8624b4..dce5c6f 100644 +--- a/tensorpipe/CMakeLists.txt ++++ b/tensorpipe/CMakeLists.txt +@@ -168,8 +168,9 @@ set(TP_PUBLIC_HEADERS ${TP_PUBLIC_HEADERS} + transport/uv/error.h + transport/uv/factory.h + transport/uv/utility.h) +-find_package(uv REQUIRED) +-target_link_libraries(tensorpipe PRIVATE uv::uv) ++# `libuv` in vcpkg ++find_package(unofficial-libuv CONFIG REQUIRED) ++target_link_libraries(tensorpipe PUBLIC unofficial::libuv::libuv ${CMAKE_DL_LIBS}) + + ### shm + +@@ -233,11 +234,14 @@ configure_file(config.h.in config.h) + + ## Libnop + +-# We should keep libnop headers private as they should not be exposed to downstream users, +-# but they're currently transitively included by tensorpipe/transport/connection.h (which +-# is still unclear whether it should be a public or private header). +-target_include_directories(tensorpipe PUBLIC $) +- ++# `libnop` in vcpkg ++find_path(LIBNOP_INCLUDE_DIRS "nop/serializer.h") ++if(LIBNOP_INCLUDE_DIRS-NOTFOUND) ++ message(FATAL_ERROR "Failed to find header of the 'libnop' package from vcpkg.") ++else() ++ message(STATUS "Using 'libnop': ${LIBNOP_INCLUDE_DIRS}") ++endif() ++target_include_directories(tensorpipe PUBLIC $) + + ## Python bindings + +@@ -262,10 +266,17 @@ endif() + + ## Install + ++install(DIRECTORY channel common core transport util ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tensorpipe ++ FILES_MATCHING PATTERN "*.h") ++install(FILES tensorpipe.h ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tensorpipe) ++ + install(TARGETS tensorpipe +- EXPORT TensorpipeTargets +- LIBRARY DESTINATION ${TP_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${TP_INSTALL_LIBDIR}) ++ EXPORT tensorpipeTargets ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + foreach(_header_file ${TP_PUBLIC_HEADERS}) + get_filename_component(_TP_HEADER_SUBDIR "${_header_file}" DIRECTORY) diff --git a/ports/tensorpipe/portfile.cmake b/ports/tensorpipe/portfile.cmake new file mode 100644 index 00000000000000..d6e941d72f4d80 --- /dev/null +++ b/ports/tensorpipe/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_TARGET "windows" "uwp") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pytorch/tensorpipe + REF c5a21994bc766659f7f85edb75478e13f429f46c + SHA512 05a3989286610edea2f0fcfb9197c563e947f0386f2b52110dd060053d68b62477fcd4778a45a3030b9a53b6ceccead91e4dd96c9f0153023e97414459fbd8dd + PATCHES + fix-cmakelists.patch + support-test.patch + support-pybind11.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + cuda TP_USE_CUDA + cuda TP_ENABLE_CUDA_IPC + pybind11 TP_BUILD_PYTHON + test TP_BUILD_TESTING +) + +if("pybind11" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + list(APPEND FEATURE_OPTIONS -DPYTHON_EXECUTABLE=${PYTHON3}) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} + -DTP_ENABLE_SHM=${VCPKG_TARGET_IS_LINUX} + -DTP_ENABLE_IBV=OFF + -DTP_ENABLE_CMA=OFF + -DTP_BUILD_LIBUV=OFF # will use libuv package + -DTP_ENABLE_CUDA_GDR=OFF +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) diff --git a/ports/tensorpipe/support-pybind11.patch b/ports/tensorpipe/support-pybind11.patch new file mode 100644 index 00000000000000..7a87cd285f4adc --- /dev/null +++ b/ports/tensorpipe/support-pybind11.patch @@ -0,0 +1,30 @@ +diff --git a/tensorpipe/python/CMakeLists.txt b/tensorpipe/python/CMakeLists.txt +index 41958dd..02562b4 100644 +--- a/tensorpipe/python/CMakeLists.txt ++++ b/tensorpipe/python/CMakeLists.txt +@@ -4,13 +4,17 @@ + # This source code is licensed under the BSD-style license found in the + # LICENSE file in the root directory of this source tree. + +-if(NOT (COMMAND pybind11_add_module)) +- add_subdirectory( +- ${PROJECT_SOURCE_DIR}/third_party/pybind11 +- ${PROJECT_BINARY_DIR}/third_party/pybind11 +- EXCLUDE_FROM_ALL) +-endif() ++find_package(pybind11 CONFIG REQUIRED) + +-set(PYBIND11_CPP_STANDARD -std=c++14) + pybind11_add_module(pytensorpipe tensorpipe.cc) +-target_link_libraries(pytensorpipe PRIVATE tensorpipe) ++set_target_properties(pytensorpipe ++PROPERTIES ++ CXX_STANDARD 14 ++) ++target_link_libraries(pytensorpipe PRIVATE tensorpipe pybind11::module) ++ ++install(TARGETS pytensorpipe ++ EXPORT tensorpipeTargets ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/ports/tensorpipe/support-test.patch b/ports/tensorpipe/support-test.patch new file mode 100644 index 00000000000000..16c54ab37dee05 --- /dev/null +++ b/ports/tensorpipe/support-test.patch @@ -0,0 +1,39 @@ +diff --git a/tensorpipe/test/CMakeLists.txt b/tensorpipe/test/CMakeLists.txt +index c0320aa..1414bdd 100644 +--- a/tensorpipe/test/CMakeLists.txt ++++ b/tensorpipe/test/CMakeLists.txt +@@ -86,11 +86,8 @@ if(TP_USE_CUDA) + endif() + + +-add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/googletest +- ${PROJECT_BINARY_DIR}/third_party/googletest) ++find_package(GTest CONFIG REQUIRED) + + target_link_libraries(tensorpipe_test PRIVATE + tensorpipe +- uv::uv +- gmock +- gtest_main) ++ unofficial::libuv::libuv GTest::gmock GTest::gtest_main) + +diff --git a/tensorpipe/test/CMakeLists.txt b/tensorpipe/test/CMakeLists.txt +index fecc731..031e40d 100644 +--- a/tensorpipe/test/CMakeLists.txt ++++ b/tensorpipe/test/CMakeLists.txt +@@ -80,10 +80,11 @@ if(TP_USE_CUDA) + channel/cuda_ipc/cuda_ipc_test.cc + ) + endif() +- +- target_sources(tensorpipe_test PRIVATE +- channel/cuda_gdr/cuda_gdr_test.cc +- ) ++ if(TP_ENABLE_CUDA_GDR) ++ target_sources(tensorpipe_test PRIVATE ++ channel/cuda_gdr/cuda_gdr_test.cc ++ ) ++ endif() + endif() + + diff --git a/ports/tensorpipe/vcpkg.json b/ports/tensorpipe/vcpkg.json new file mode 100644 index 00000000000000..82971d8ad4a6d4 --- /dev/null +++ b/ports/tensorpipe/vcpkg.json @@ -0,0 +1,39 @@ +{ + "name": "tensorpipe", + "version-date": "2021-04-26", + "description": "A tensor-aware point-to-point communication primitive for machine learning", + "homepage": "https://github.com/pytorch/tensorpipe", + "supports": "linux | osx", + "dependencies": [ + "libnop", + "libuv", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "cuda": { + "description": "Enable support for CUDA tensors, CUDA IPC channel", + "dependencies": [ + "cuda" + ] + }, + "pybind11": { + "description": "Build Python bindings", + "dependencies": [ + "pybind11" + ] + }, + "test": { + "description": "Build with Google.Test", + "dependencies": [ + "gtest" + ] + } + } +} diff --git a/ports/termcolor/portfile.cmake b/ports/termcolor/portfile.cmake new file mode 100644 index 00000000000000..5a781d65daef2c --- /dev/null +++ b/ports/termcolor/portfile.cmake @@ -0,0 +1,17 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ikalnytskyi/termcolor + REF 67eb0aa55e48ead9fe2aab049f0b1aa7943ba0ea #v2.0.0 + SHA512 c076f0acafa455fb3ed58bca5f0a0989dc3824e9b4f264fc5aa5b599068cc6551ccc2cfe1180a4ff0f8424e6adbfbbfeed50d395ab5f288b8c678cfa42e8fa17 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${port}/ TARGET_PATH share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/termcolor/vcpkg.json b/ports/termcolor/vcpkg.json new file mode 100644 index 00000000000000..5ea5c349cc9635 --- /dev/null +++ b/ports/termcolor/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "termcolor", + "version-semver": "2.0.0", + "description": "Termcolor is a header-only C++ library for printing colored messages to the terminal.", + "homepage": "https://github.com/ikalnytskyi/termcolor" +} diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL deleted file mode 100644 index a24dd9435a0bbe..00000000000000 --- a/ports/tesseract/CONTROL +++ /dev/null @@ -1,12 +0,0 @@ -Source: tesseract -Version: 4.1.0-2 -Homepage: https://github.com/tesseract-ocr/tesseract -Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. -Build-Depends: leptonica - -Feature: training_tools -Description: build training tools -Build-Depends: icu, pango, cairo, fontconfig - -Feature: cpu_independed -Description: build on any cpu extension commands support diff --git a/ports/tesseract/fix-text2image.patch b/ports/tesseract/fix-text2image.patch deleted file mode 100644 index a4ff21d6bb5f36..00000000000000 --- a/ports/tesseract/fix-text2image.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/src/training/CMakeLists.txt b/src/training/CMakeLists.txt -index 8fd96a9..ef258e1 100644 ---- a/src/training/CMakeLists.txt -+++ b/src/training/CMakeLists.txt -@@ -253,7 +253,7 @@ if (NOT CPPAN_BUILD) - find_package(PkgConfig) - endif() - --if (PKG_CONFIG_FOUND OR CPPAN_BUILD) -+if (1) - - if (PKG_CONFIG_FOUND) - pkg_check_modules(Pango REQUIRED pango) -@@ -261,8 +261,35 @@ pkg_check_modules(Cairo REQUIRED cairo) - pkg_check_modules(PangoFt2 REQUIRED pangoft2) - pkg_check_modules(PangoCairo REQUIRED pangocairo) - pkg_check_modules(FontConfig REQUIRED fontconfig) --endif() -+else() -+find_library(Glib_LIBRARY_RELEASE NAMES glib-2.0) -+find_library(Glib_LIBRARY_DEBUG NAMES glib-2.0) -+select_library_configurations(Glib) -+ -+find_library(GObject_LIBRARY_RELEASE NAMES gobject-2.0) -+find_library(GObject_LIBRARY_DEBUG NAMES gobject-2.0) -+select_library_configurations(GObject) -+ -+find_library(Pango_LIBRARY_RELEASE NAMES pango-1.0) -+find_library(Pango_LIBRARY_DEBUG NAMES pango-1.0) -+select_library_configurations(Pango) -+ -+find_library(Cairo_LIBRARY_RELEASE NAMES cairo) -+find_library(Cairo_LIBRARY_DEBUG NAMES cairod) -+select_library_configurations(Cairo) - -+find_library(FontConfig_LIBRARY_RELEASE NAMES fontconfig) -+find_library(FontConfig_LIBRARY_DEBUG NAMES fontconfig) -+select_library_configurations(FontConfig) -+ -+find_library(PangoFt2_LIBRARY_RELEASE NAMES pangoft2-1.0) -+find_library(PangoFt2_LIBRARY_DEBUG NAMES pangoft2-1.0) -+select_library_configurations(PangoFt2) -+ -+find_library(PangoCairo_LIBRARY_RELEASE NAMES pangocairo-1.0) -+find_library(PangoCairo_LIBRARY_DEBUG NAMES pangocairo-1.0) -+select_library_configurations(PangoCairo) -+endif() - set(text2image_src - text2image.cpp - boxchar.cpp -@@ -285,10 +312,12 @@ set(text2image_src - - add_executable (text2image ${text2image_src}) - target_link_libraries (text2image unicharset_training) --if (PKG_CONFIG_FOUND) -+if (1) - target_include_directories (text2image BEFORE PRIVATE ${Cairo_INCLUDE_DIRS} ${Pango_INCLUDE_DIRS}) - target_compile_definitions (text2image PRIVATE -DPANGO_ENABLE_ENGINE) - target_link_libraries (text2image -+ ${GObject_LIBRARIES} -+ ${Glib_LIBRARIES} - ${Pango_LIBRARIES} - ${Cairo_LIBRARIES} - ${PangoCairo_LIBRARIES} diff --git a/ports/tesseract/portfile.cmake b/ports/tesseract/portfile.cmake index 08f581cfeb37cd..68926f963aee4d 100644 --- a/ports/tesseract/portfile.cmake +++ b/ports/tesseract/portfile.cmake @@ -1,90 +1,68 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tesseract-ocr/tesseract - REF 4.1.0 - SHA512 d617f5c5b826640b2871dbe3d7973bcc5e66fafd837921a20e009d683806ed50f0f258aa455019d99fc54f5cb65c2fa0380e3a3c92b39ab0684b8799c730b09d + REF 4.1.1 + SHA512 017723a2268be789fe98978eed02fd294968cc8050dde376dee026f56f2b99df42db935049ae5e72c4519a920e263b40af1a6a40d9942e66608145b3131a71a2 PATCHES fix-tiff-linkage.patch - fix-text2image.patch ) # The built-in cmake FindICU is better file(REMOVE ${SOURCE_PATH}/cmake/FindICU.cmake) -# Handle Static Library Output -if(VCPKG_LIBRARY_LINKAGE EQUAL "static") - list(APPEND OPTIONS_LIST -DSTATIC=ON) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) -# Handle CONTROL -if("training_tools" IN_LIST FEATURES) - list(APPEND OPTIONS_LIST -DBUILD_TRAINING_TOOLS=ON) -else() - list(APPEND OPTIONS_LIST -DBUILD_TRAINING_TOOLS=OFF) -endif() -if("independed_architecture" IN_LIST FEATURES) - list(APPEND OPTIONS_LIST -DTARGET_ARCHITECTURE=none) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + training-tools BUILD_TRAINING_TOOLS +) + +if("cpu-independed" IN_LIST FEATURES) + set(TARGET_ARCHITECTURE none) else() - list(APPEND OPTIONS_LIST -DTARGET_ARCHITECTURE=auto) + set(TARGET_ARCHITECTURE auto) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DSTATIC=ON + OPTIONS ${FEATURE_OPTIONS} + -DSTATIC=${BUILD_STATIC} -DUSE_SYSTEM_ICU=True -DCMAKE_DISABLE_FIND_PACKAGE_LibArchive=ON -DCMAKE_DISABLE_FIND_PACKAGE_OpenCL=ON -DLeptonica_DIR=YES - ${OPTIONS_LIST} + -DTARGET_ARCHITECTURE=${TARGET_ARCHITECTURE} ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +file(READ ${CURRENT_PACKAGES_DIR}/share/tesseract/TesseractConfig.cmake TESSERACT_CONFIG) +string(REPLACE "find_package(Leptonica REQUIRED)" + "find_package(Leptonica REQUIRED) +find_package(LibArchive REQUIRED)" TESSERACT_CONFIG "${TESSERACT_CONFIG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/tesseract/TesseractConfig.cmake "${TESSERACT_CONFIG}") -# Install tool -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/tesseract) -set(EXTENSION) -if(WIN32) - set(EXTENSION ".exe") -endif() +vcpkg_copy_tools(TOOL_NAMES tesseract AUTO_CLEAN) -# copy training tools -set(TRAINING_TOOLS_DIR ${CURRENT_PACKAGES_DIR}/tools/tesseract/training) -if("training_tools" IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/ambiguous_words${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/classifier_tester${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/combine_tessdata${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/cntraining${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/dawg2wordlist${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/mftraining${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/shapeclustering${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/wordlist2dawg${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/combine_lang_model${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/lstmeval${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/lstmtraining${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/set_unicharset_properties${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/unicharset_extractor${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/text2image${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) +if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/tesseract.pc" "-ltesseract41" "-ltesseract41d") endif() +vcpkg_fixup_pkgconfig() -file(COPY ${CURRENT_PACKAGES_DIR}/bin/tesseract${EXTENSION} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tesseract) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/tesseract) +if("training-tools" IN_LIST FEATURES) + list(APPEND TRAINING_TOOLS + ambiguous_words classifier_tester combine_tessdata + cntraining dawg2wordlist mftraining shapeclustering + wordlist2dawg combine_lang_model lstmeval lstmtraining + set_unicharset_properties unicharset_extractor text2image + ) + vcpkg_copy_tools(TOOL_NAMES ${TRAINING_TOOLS} AUTO_CLEAN) +endif() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tesseract) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/tesseract/LICENSE ${CURRENT_PACKAGES_DIR}/share/tesseract/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tesseract/vcpkg.json b/ports/tesseract/vcpkg.json new file mode 100644 index 00000000000000..4418a631100977 --- /dev/null +++ b/ports/tesseract/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "tesseract", + "version": "4.1.1", + "port-version": 8, + "description": "An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.", + "homepage": "https://github.com/tesseract-ocr/tesseract", + "supports": "!(windows & (arm | arm64))", + "dependencies": [ + "leptonica", + "libarchive" + ], + "features": { + "cpu-independed": { + "description": "build on any cpu extension commands support" + }, + "training-tools": { + "description": "build training tools", + "dependencies": [ + "cairo", + "fontconfig", + "icu", + "pango" + ] + } + } +} diff --git a/ports/tfhe/mac-fix.patch b/ports/tfhe/mac-fix.patch new file mode 100644 index 00000000000000..20161feb5bc694 --- /dev/null +++ b/ports/tfhe/mac-fix.patch @@ -0,0 +1,13 @@ +diff --git a/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp b/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp +index 26de3f0..422c7f6 100644 +--- a/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp ++++ b/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp +@@ -12,7 +12,7 @@ FFT_Processor_nayuki::FFT_Processor_nayuki(const int N): _2N(2*N),N(N),Ns2(N/2) + tables_reverse = fft_init_reverse(_2N); + omegaxminus1 = (cplx*) malloc(sizeof(cplx) * _2N); + for (int x=0; x<_2N; x++) { +- omegaxminus1[x]=cos(x*M_PI/N)-1. + sin(x*M_PI/N) * 1i; ++ omegaxminus1[x]=cplx(cos(x*M_PI/N)-1., sin(x*M_PI/N)); // instead of cos(x*M_PI/N)-1. + sin(x*M_PI/N) * 1i + //exp(i.x.pi/N)-1 + } + } diff --git a/ports/tfhe/portfile.cmake b/ports/tfhe/portfile.cmake new file mode 100644 index 00000000000000..fc06a54a600b4f --- /dev/null +++ b/ports/tfhe/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Unix" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tfhe/tfhe + REF v1.0.1 + SHA512 1d625eb00bf6a36fd86cfad8e1763d7030dd73d68f2422d1678f51352708e9275f0ce69c23fb0d9fec30fba00e1ca4a3df29fb4fc6dfe3b7f16e0d350aa7f170 + HEAD_REF master + PATCHES + mac-fix.patch +) + +# Workaround for https://github.com/tfhe/tfhe/issues/246 +vcpkg_replace_string("${SOURCE_PATH}/src/CMakeLists.txt" "-Wall -Werror" "") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tfhe/vcpkg.json b/ports/tfhe/vcpkg.json new file mode 100644 index 00000000000000..73898248b8f2d9 --- /dev/null +++ b/ports/tfhe/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "tfhe", + "version-semver": "1.0.1", + "port-version": 2, + "description": "TFHE is open-source software distributed under the terms of the Apache 2.0 license.", + "homepage": "https://github.com/tfhe/tfhe", + "supports": "!windows" +} diff --git a/ports/tgbot-cpp/portfile.cmake b/ports/tgbot-cpp/portfile.cmake new file mode 100644 index 00000000000000..859b5d03edc6c1 --- /dev/null +++ b/ports/tgbot-cpp/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO reo7sp/tgbot-cpp + REF v1.2.1 + SHA512 b094f9c80dd15b7930b7d7250169b3199d9c84b84826adececa8237111f5ba384ec790dbe969999f362ca2fb35b93950d053777ce5f167007e33c3e4eb133453 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/tgbot-cpp/vcpkg.json b/ports/tgbot-cpp/vcpkg.json new file mode 100644 index 00000000000000..360b9c706d1351 --- /dev/null +++ b/ports/tgbot-cpp/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "tgbot-cpp", + "version-string": "1.2.1", + "port-version": 1, + "description": "C++14 library for Telegram bot API.", + "homepage": "https://github.com/reo7sp/tgbot-cpp", + "dependencies": [ + "boost-algorithm", + "boost-asio", + "boost-lexical-cast", + "boost-property-tree", + "boost-system", + "boost-test", + "boost-variant", + "curl", + "openssl", + "zlib" + ] +} diff --git a/ports/tgc/CONTROL b/ports/tgc/CONTROL deleted file mode 100644 index 85466c147b28ed..00000000000000 --- a/ports/tgc/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tgc -Version: 2019-08-11 -Description: A tiny garbage collector for C -Homepage: https://github.com/orangeduck/tgc diff --git a/ports/tgc/portfile.cmake b/ports/tgc/portfile.cmake index ebd9c66c324ab5..3171461910a110 100644 --- a/ports/tgc/portfile.cmake +++ b/ports/tgc/portfile.cmake @@ -1,35 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_VERSION 35207051557c79ea25942c021fb18856c72af8e3) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/orangeduck-tgc-${SOURCE_VERSION}) - -file(MAKE_DIRECTORY ${SOURCE_PATH}) - -# See ports/nlohmann-json/portfile.cmake -function(download_src SUBPATH SHA512) - vcpkg_download_distfile( - FILE - URLS "https://raw.githubusercontent.com/orangeduck/tgc/master/${SUBPATH}" - FILENAME "orangeduck-tgc-${SOURCE_VERSION}/${SUBPATH}" - SHA512 ${SHA512} - ) - get_filename_component(SUBPATH_DIR "${SOURCE_PATH}/${SUBPATH}" DIRECTORY) - file(COPY ${FILE} DESTINATION ${SUBPATH_DIR}) -endfunction() - -download_src( - tgc.h - 55944055fa83cfc1cbdf026f6ea65d42c1704800d26a7cb6d31a0afcfc61a2ca61d5e539edbf354c4572a885dbc6f38cbb6593cbb66d5dc78eb7d3b66d613dd8 -) -download_src( - tgc.c - 942eefd9b02558f94315023734e9b3b74e326d5a705e9e8809cb4ddb0c6272d8ba9b9715f7d53d7a6151b8cff1377561d169a310c48d200698f9d26ba2c106c3 -) -download_src( - LICENSE.md - 89c46e23f61d2912f47a10e807ee823e78b708804c5cfea2382e1d5a9955f0f1a67e421453b5868db2f71229aae8b83c271bb1cf89631b43e91e5d6c4fcbf1a7 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO orangeduck/tgc + REF 35207051557c79ea25942c021fb18856c72af8e3 + SHA512 d56153cfb00ad4941c7c88e6cc54b54812466e95b61581e9f71e41b6200746e2143344f0d292032e92f7c90eaa60d0df91120b36e3aad0e354836df6d28e2c35 + HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -47,8 +23,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/ports/tgc/vcpkg.json b/ports/tgc/vcpkg.json new file mode 100644 index 00000000000000..960f3fe19bbafd --- /dev/null +++ b/ports/tgc/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tgc", + "version-string": "2019-08-11", + "port-version": 2, + "description": "A tiny garbage collector for C", + "homepage": "https://github.com/orangeduck/tgc" +} diff --git a/ports/tgui/CONTROL b/ports/tgui/CONTROL deleted file mode 100644 index 3c1f18e1abec71..00000000000000 --- a/ports/tgui/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: tgui -Version: 0.8.5 -Description: TGUI is an easy to use, cross-platform, C++ GUI for SFML. -Build-Depends: sfml - -Feature: tool -Description: Build GUI builder diff --git a/ports/tgui/fix-dependencies.patch b/ports/tgui/fix-dependencies.patch new file mode 100644 index 00000000000000..ad6b7107c0b8a5 --- /dev/null +++ b/ports/tgui/fix-dependencies.patch @@ -0,0 +1,27 @@ +diff --git a/src/Backends/SDL/CMakeLists.txt b/src/Backends/SDL/CMakeLists.txt +index d86f11d..1e31e21 100644 +--- a/src/Backends/SDL/CMakeLists.txt ++++ b/src/Backends/SDL/CMakeLists.txt +@@ -1,10 +1,10 @@ + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake_modules) + +-find_package(SDL2 REQUIRED) +-find_package(SDL2_ttf REQUIRED) ++find_package(SDL2 CONFIG REQUIRED) ++find_package(sdl2-ttf CONFIG REQUIRED) + + # Link to SDL and set include and library search directories +-target_link_libraries(tgui PRIVATE SDL2::Core SDL2::TTF) ++target_link_libraries(tgui PRIVATE SDL2::SDL2 SDL2::SDL2_ttf) + + # Add the backend source files to the library + target_sources(tgui PRIVATE +@@ -19,7 +19,7 @@ target_sources(tgui PRIVATE + ) + + add_library(tgui-sdl-interface INTERFACE) +-target_link_libraries(tgui-sdl-interface INTERFACE SDL2::Core SDL2::TTF SDL2::Main) ++target_link_libraries(tgui-sdl-interface INTERFACE SDL2::SDL2 SDL2::SDL2_ttf SDL2::SDL2main) + + # Also link to OpenGL or OpenGL ES + if(NOT TGUI_USE_GLES) diff --git a/ports/tgui/fix-usage.patch b/ports/tgui/fix-usage.patch new file mode 100644 index 00000000000000..cbc43b4e779d47 --- /dev/null +++ b/ports/tgui/fix-usage.patch @@ -0,0 +1,23 @@ +diff --git a/cmake/TGUIConfig.cmake.in b/cmake/TGUIConfig.cmake.in +index 63e8a45..01804cd 100644 +--- a/cmake/TGUIConfig.cmake.in ++++ b/cmake/TGUIConfig.cmake.in +@@ -44,6 +44,9 @@ + # add_executable(myapp ...) + # target_link_libraries(myapp tgui) + ++include(CMakeFindDependencyMacro) ++find_dependency(SFML COMPONENTS graphics CONFIG) ++ + set(FIND_TGUI_PATHS + "${CMAKE_CURRENT_LIST_DIR}/../.." + ${TGUI_ROOT} +@@ -58,7 +61,7 @@ set(FIND_TGUI_PATHS + /opt) + + # Choose which target definitions must be imported +-if (TGUI_STATIC_LIBRARIES) ++if (NOT @TGUI_SHARED_LIBS@) + set(TGUI_IS_FRAMEWORK_INSTALL "@TGUI_BUILD_FRAMEWORKS@") + if (TGUI_IS_FRAMEWORK_INSTALL) + message(WARNING "Static frameworks are not supported by TGUI. Clear TGUI_DIR cache entry, \ diff --git a/ports/tgui/portfile.cmake b/ports/tgui/portfile.cmake index dd326c9ae82e27..e30d93ac4f745e 100644 --- a/ports/tgui/portfile.cmake +++ b/ports/tgui/portfile.cmake @@ -1,11 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO texus/TGUI - REF v0.8.5 - SHA512 36d8c29f246ca4d79d791f0368441762de0609d5cc0e507520ae0648ed3dc0bf47891582f283de241892bf9810f4d5049df46f566916d0bfffc383319d953002 - HEAD_REF 0.8 + REF 6515153c2466e6677ba933679b3dca6c283daf87 + SHA512 109e64c114336979a4bd0d44765e4bc26cb4ecb6e4db92d7441230d148438b084d01cb56dd292f09a6fd28b0f7420044455ffb519147cc3aea71e322142cd9a0 + HEAD_REF 0.9 + PATCHES + fix-usage.patch + fix-dependencies.patch ) set(TGUI_SHARE_PATH ${CURRENT_PACKAGES_DIR}/share/tgui) @@ -13,39 +14,37 @@ set(TGUI_TOOLS_PATH ${CURRENT_PACKAGES_DIR}/tools/tgui) # Enable static build file(REMOVE "${SOURCE_PATH}/cmake/Modules/FindSFML.cmake") -string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" TGUI_SHARED_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" TGUI_SHARED_LIBS) -# gui-builder -set(BUILD_GUI_BUILDER OFF) -if("tool" IN_LIST FEATURES) - set(BUILD_GUI_BUILDER ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + sdl2 TGUI_HAS_BACKEND_SDL + sfml TGUI_HAS_BACKEND_SFML + tool TGUI_BUILD_GUI_BUILDER +) vcpkg_configure_cmake( SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE PREFER_NINJA - OPTIONS - -DTGUI_BUILD_GUI_BUILDER=${BUILD_GUI_BUILDER} + OPTIONS ${FEATURE_OPTIONS} -DTGUI_MISC_INSTALL_PREFIX=${TGUI_SHARE_PATH} -DTGUI_SHARED_LIBS=${TGUI_SHARED_LIBS} + -DTGUI_BACKEND=Custom + -DTGUI_BUILD_EXAMPLES=OFF ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/TGUI) vcpkg_copy_pdbs() -if(BUILD_GUI_BUILDER) - set(EXECUTABLE_SUFFIX "") - if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(EXECUTABLE_SUFFIX ".exe") - endif() - - message(STATUS "Check for: ${TGUI_SHARE_PATH}/gui-builder/gui-builder${EXECUTABLE_SUFFIX}") - if(EXISTS "${TGUI_SHARE_PATH}/gui-builder/gui-builder${EXECUTABLE_SUFFIX}") +if("tool" IN_LIST FEATURES) + message(STATUS "Check for: ${TGUI_SHARE_PATH}/gui-builder/gui-builder${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + if(EXISTS "${TGUI_SHARE_PATH}/gui-builder/gui-builder${VCPKG_TARGET_EXECUTABLE_SUFFIX}") file(MAKE_DIRECTORY "${TGUI_TOOLS_PATH}") file(RENAME - "${TGUI_SHARE_PATH}/gui-builder/gui-builder${EXECUTABLE_SUFFIX}" - "${TGUI_TOOLS_PATH}/gui-builder${EXECUTABLE_SUFFIX}") + "${TGUI_SHARE_PATH}/gui-builder/gui-builder${VCPKG_TARGET_EXECUTABLE_SUFFIX}" + "${TGUI_TOOLS_PATH}/gui-builder${VCPKG_TARGET_EXECUTABLE_SUFFIX}") # Need to copy `resources` and `themes` directories file(COPY "${TGUI_SHARE_PATH}/gui-builder/resources" DESTINATION "${TGUI_TOOLS_PATH}") file(COPY "${TGUI_SHARE_PATH}/gui-builder/themes" DESTINATION "${TGUI_TOOLS_PATH}") @@ -54,8 +53,12 @@ if(BUILD_GUI_BUILDER) endif() endif() -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/TGUI/nanosvg") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/TGUI/extlibs/nanosvg" "${CURRENT_PACKAGES_DIR}/include/TGUI/extlibs/glad" + "${CURRENT_PACKAGES_DIR}/include/TGUI/extlibs/stb" +) # All folders are empty + +file(RENAME "${CURRENT_PACKAGES_DIR}/share/doc" "${CURRENT_PACKAGES_DIR}/share/${PORT}/doc") # Handle copyright -file(RENAME "${CURRENT_PACKAGES_DIR}/share/tgui/license.txt" "${CURRENT_PACKAGES_DIR}/share/tgui/copyright") +file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/tgui/vcpkg.json b/ports/tgui/vcpkg.json new file mode 100644 index 00000000000000..387a20c909c0ac --- /dev/null +++ b/ports/tgui/vcpkg.json @@ -0,0 +1,50 @@ +{ + "name": "tgui", + "version-date": "2021-04-19", + "port-version": 2, + "description": "TGUI is an easy to use, cross-platform, C++ GUI for SFML.", + "homepage": "https://tgui.eu", + "default-features": [ + "sdl2", + "sfml" + ], + "features": { + "sdl2": { + "description": "build the SDL backend", + "dependencies": [ + "sdl2", + "sdl2-ttf" + ] + }, + "sfml": { + "description": "build the SFML backend", + "dependencies": [ + { + "name": "glad", + "features": [ + "egl" + ], + "platform": "!android & !ios" + }, + { + "name": "opengl", + "platform": "android | ios" + }, + "sfml", + "stb" + ] + }, + "tool": { + "description": "Build GUI builder", + "dependencies": [ + { + "name": "tgui", + "features": [ + "sdl2", + "sfml" + ] + } + ] + } + } +} diff --git a/ports/theia/CONTROL b/ports/theia/CONTROL deleted file mode 100644 index 2d527adcdf1295..00000000000000 --- a/ports/theia/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: theia -Version: 0.8-2 -Build-Depends: flann, cereal, ceres[suitesparse], openimageio, glew, freeglut (!osx) -Homepage: https://github.com/sweeneychris/TheiaSfM -Description: An open source library for multiview geometry and structure from motion diff --git a/ports/theia/fix-external-dependencies.patch b/ports/theia/fix-external-dependencies.patch index 7a4b009611cf99..fc6e540f31e227 100644 --- a/ports/theia/fix-external-dependencies.patch +++ b/ports/theia/fix-external-dependencies.patch @@ -1,7 +1,22 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9c1b150..5810156 100644 +index 9c1b150..1adbfed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -105,10 +105,10 @@ add_definitions(-DTHEIA_DATA_DIR="${CMAKE_SOURCE_DIR}/data") + + # Eigen + set(MIN_EIGEN_VERSION 3.2.0) +-find_package(Eigen ${MIN_EIGEN_VERSION} REQUIRED) +-if (EIGEN_FOUND) +- message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}") +-endif (EIGEN_FOUND) ++find_package(Eigen3 ${MIN_EIGEN_VERSION} REQUIRED) ++if (EIGEN3_FOUND) ++ message("-- Found Eigen version ${EIGEN3_VERSION}: ${EIGEN3_INCLUDE_DIRS}") ++endif (EIGEN3_FOUND) + + # Use a larger inlining threshold for Clang, since it hobbles Eigen, + # resulting in an unreasonably slow version of the blas routines. The @@ -129,70 +129,27 @@ endif () # GFlags. The namespace patch is borrow from Ceres Solver (see license in @@ -299,10 +314,48 @@ index 84f3829..f88d75a 100644 -add_subdirectory(visual_sfm) \ No newline at end of file +add_subdirectory(visual_sfm) +diff --git a/libraries/optimo/CMakeLists.txt b/libraries/optimo/CMakeLists.txt +index 80f5e5f..ea57f1b 100644 +--- a/libraries/optimo/CMakeLists.txt ++++ b/libraries/optimo/CMakeLists.txt +@@ -67,11 +67,11 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + + # Locations to search for Eigen + # Eigen +-find_package(Eigen REQUIRED) +-if (EIGEN_FOUND) +- message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}") +-endif (EIGEN_FOUND) +-include_directories(${EIGEN_INCLUDE_DIRS}) ++find_package(Eigen3 REQUIRED) ++if (EIGEN3_FOUND) ++ message("-- Found Eigen version ${EIGEN3_VERSION_STRING}: ${EIGEN3_INCLUDE_DIRS}") ++endif (EIGEN3_FOUND) ++include_directories(${EIGEN3_INCLUDE_DIRS}) + + # Setting CXX FLAGS appropriately. The code below was inspired from + # Google CERES and modified for this library. diff --git a/libraries/statx/CMakeLists.txt b/libraries/statx/CMakeLists.txt -index 23b9e49..af236a3 100644 +index 23b9e49..c58a550 100644 --- a/libraries/statx/CMakeLists.txt +++ b/libraries/statx/CMakeLists.txt +@@ -72,11 +72,11 @@ message("-- Default Install prefix: ${CMAKE_INSTALL_PREFIX}") + option(STATX_WITH_CERES "Enables GEV parameter estimation using Ceres" ON) + + # Eigen +-find_package(Eigen REQUIRED) +-if (EIGEN_FOUND) +- message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}") +-endif (EIGEN_FOUND) +-include_directories(${EIGEN_INCLUDE_DIRS}) ++find_package(Eigen3 REQUIRED) ++if (EIGEN3_FOUND) ++ message("-- Found Eigen version ${EIGEN3_VERSION_STRING}: ${EIGEN3_INCLUDE_DIRS}") ++endif (EIGEN3_FOUND) ++include_directories(${EIGEN3_INCLUDE_DIRS}) + + # Google Flags + find_package(Gflags REQUIRED) @@ -103,7 +103,11 @@ if(STATX_WITH_CERES) endif(CERES_FOUND) diff --git a/ports/theia/portfile.cmake b/ports/theia/portfile.cmake index c131ac095435c3..e5e7ffcab3de99 100644 --- a/ports/theia/portfile.cmake +++ b/ports/theia/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -15,11 +13,15 @@ vcpkg_from_github( file(REMOVE ${SOURCE_PATH}/cmake/FindSuiteSparse.cmake) file(REMOVE ${SOURCE_PATH}/cmake/FindGflags.cmake) file(REMOVE ${SOURCE_PATH}/cmake/FindGlog.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindEigen.cmake) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DCMAKE_CXX_STANDARD=14 + -DCMAKE_CXX_EXTENSIONS=OFF + -DCMAKE_CXX_STANDARD_REQUIRED=ON -DBUILD_TESTING=OFF -DTHEIA_USE_EXTERNAL_CEREAL=ON -DTHEIA_USE_EXTERNAL_FLANN=ON @@ -40,5 +42,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/akaze/datase file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/spectra/doxygen) # Handle copyright -file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/theia RENAME copyright) -file(COPY ${SOURCE_PATH}/data/camera_sensor_database_license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/theia) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${SOURCE_PATH}/data/camera_sensor_database_license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/theia/vcpkg.json b/ports/theia/vcpkg.json new file mode 100644 index 00000000000000..adcfa7f40187cd --- /dev/null +++ b/ports/theia/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "theia", + "version-string": "0.8", + "port-version": 4, + "description": "An open source library for multiview geometry and structure from motion", + "homepage": "https://github.com/sweeneychris/TheiaSfM", + "dependencies": [ + "cereal", + { + "name": "ceres", + "features": [ + "suitesparse" + ] + }, + "flann", + { + "name": "freeglut", + "platform": "!osx" + }, + "glew", + "openimageio" + ] +} diff --git a/ports/think-cell-range/CONTROL b/ports/think-cell-range/CONTROL deleted file mode 100644 index 985f071753198c..00000000000000 --- a/ports/think-cell-range/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: think-cell-range -Maintainer: jfrederich@gmail.com -Version: 498839d-1 -Description: think-cell's range library -Homepage: https://github.com/think-cell/range -Build-Depends: boost diff --git a/ports/think-cell-range/portfile.cmake b/ports/think-cell-range/portfile.cmake index d1acc2c5183ad0..2599e517dbc23a 100644 --- a/ports/think-cell-range/portfile.cmake +++ b/ports/think-cell-range/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO think-cell/range diff --git a/ports/think-cell-range/vcpkg.json b/ports/think-cell-range/vcpkg.json new file mode 100644 index 00000000000000..3296cf65438623 --- /dev/null +++ b/ports/think-cell-range/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "think-cell-range", + "version-string": "498839d", + "port-version": 2, + "description": "think-cell's range library", + "homepage": "https://github.com/think-cell/range", + "dependencies": [ + "boost" + ] +} diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL deleted file mode 100644 index 5391f5d62d7137..00000000000000 --- a/ports/thor/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: thor -Version: 2.0-3 -Description: Extends the multimedia library SFML with higher-level features -Build-Depends: sfml, aurora diff --git a/ports/thor/fix-dependency-sfml.patch b/ports/thor/fix-dependency-sfml.patch new file mode 100644 index 00000000000000..8b6fb09daef902 --- /dev/null +++ b/ports/thor/fix-dependency-sfml.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 03536be..abcff44 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -115,11 +115,10 @@ set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/;${CMAKE_MODULE_PATH + if(NOT THOR_SHARED_LIBS) + set(SFML_STATIC_LIBRARIES TRUE) + endif() +-find_package(SFML 2 COMPONENTS audio graphics window system) ++find_package(SFML COMPONENTS system window graphics CONFIG REQUIRED) ++set(SFML_LIBRARIES sfml-system sfml-network sfml-graphics sfml-window) + +-if(SFML_FOUND) +- include_directories(${SFML_INCLUDE_DIR}) +-else() ++if(0) + set(SFML_ROOT "" CACHE PATH "SFML top-level directory") + message("\n-> SFML directory not found. Set SFML_ROOT to SFML's top-level path (containing \"include\" and \"lib\" directories).") + message("-> Make sure the SFML libraries with the same configuration (Release/Debug, Static/Dynamic) exist.\n") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 75e118e..0f90ac8 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -72,6 +72,7 @@ else() + add_library(${THOR_LIB} STATIC ${THOR_SRC}) + set_target_properties(${THOR_LIB} PROPERTIES DEBUG_POSTFIX -s-d) + set_target_properties(${THOR_LIB} PROPERTIES RELEASE_POSTFIX -s) ++ thor_link_sfml(${THOR_LIB}) + endif() + + diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index 19f65f8062fb0b..8371f16139dd21 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -1,13 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github(ARCHIVE OUT_SOURCE_PATH SOURCE_PATH REPO Bromeon/Thor REF v2.0 SHA512 634fa5286405d9a8a837c082ace98bbb02e609521418935855b9e2fcad57003dbe35088bd771cf6a9292e55d3787f7e463d7a4cca0d0f007509de2520d9a8cf9 HEAD_REF master - PATCHES "${CMAKE_CURRENT_LIST_DIR}/sfml-no-depend-libjpeg.patch" + PATCHES fix-dependency-sfml.patch ) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindSFML.cmake) file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) file(COPY ${CURRENT_INSTALLED_DIR}/include/Aurora DESTINATION ${SOURCE_PATH}/extlibs/aurora/include) @@ -26,15 +25,17 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -set(CONFIG_FILE "${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp") +vcpkg_copy_pdbs() -file(READ ${CONFIG_FILE} CONFIG_H) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "defined(SFML_STATIC)" "1" CONFIG_H "${CONFIG_H}") - else() - string(REPLACE "defined(SFML_STATIC)" "0" CONFIG_H "${CONFIG_H}") - endif() -file(WRITE ${CONFIG_FILE} "${CONFIG_H}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp" + "defined(SFML_STATIC)" "1" + ) +else() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp" + "defined(SFML_STATIC)" "0" + ) +endif() file(GLOB LICENSE "${CURRENT_PACKAGES_DIR}/debug/LicenseThor.txt" @@ -47,12 +48,10 @@ if(LICENSE) file(REMOVE ${LICENSE}) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/Aurora) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/Aurora) -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) +if(NOT VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endif() -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/thor/sfml-no-depend-libjpeg.patch b/ports/thor/sfml-no-depend-libjpeg.patch deleted file mode 100644 index 7fcf73ff0ebd69..00000000000000 --- a/ports/thor/sfml-no-depend-libjpeg.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/cmake/Modules/FindSFML.cmake b/cmake/Modules/FindSFML.cmake -index 48873ef..a1834f6 100644 ---- a/cmake/Modules/FindSFML.cmake -+++ b/cmake/Modules/FindSFML.cmake -@@ -312,10 +312,9 @@ if(SFML_STATIC_LIBRARIES) - - # find libraries - find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype) -- find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg) - - # update the list -- set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${JPEG_LIBRARY}) -+ set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY}) - set(SFML_DEPENDENCIES ${SFML_GRAPHICS_DEPENDENCIES} ${SFML_DEPENDENCIES}) - endif() - diff --git a/ports/thor/vcpkg.json b/ports/thor/vcpkg.json new file mode 100644 index 00000000000000..3b1c3cfee0b324 --- /dev/null +++ b/ports/thor/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "thor", + "version": "2.0", + "port-version": 4, + "description": "Extends the multimedia library SFML with higher-level features", + "homepage": "www.bromeon.ch/libraries/thor", + "dependencies": [ + "aurora", + "sfml" + ] +} diff --git a/ports/threadpool/portfile.cmake b/ports/threadpool/portfile.cmake new file mode 100644 index 00000000000000..05d47be5213fb6 --- /dev/null +++ b/ports/threadpool/portfile.cmake @@ -0,0 +1,14 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO threadpool/threadpool + REF "0.2.5 (Stable)" + SHA512 961576b619e5227098fa37a3c8d903128b3c2a9cf1e55c057c6f9126062bcccfa6fe2510b4e8ee5d1a0e3d0425f0077c50eccad2120a423f69e2705460780e7c + FILENAME "threadpool-0_2_5-src.zip" +) + +file(INSTALL ${SOURCE_PATH}/threadpool/boost + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/threadpool/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/ports/threadpool/vcpkg.json b/ports/threadpool/vcpkg.json new file mode 100644 index 00000000000000..3e16feecc429f1 --- /dev/null +++ b/ports/threadpool/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "threadpool", + "version-string": "0.2.5", + "port-version": 2, + "description": "threadpool is a cross-platform C++ thread pool library. It provides a convenient way for dispatching asynchronous tasks and can be easily customized. threadpool is based on the high-quality Boost source libraries.", + "homepage": "http://threadpool.sourceforge.net/", + "dependencies": [ + "boost-thread" + ] +} diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL deleted file mode 100644 index cfff0ac7e90679..00000000000000 --- a/ports/thrift/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: thrift -Version: 2019-05-07-3 -Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit -Homepage: https://github.com/apache/thrift -Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. diff --git a/ports/thrift/correct-paths.patch b/ports/thrift/correct-paths.patch new file mode 100644 index 00000000000000..26c21dd02418e1 --- /dev/null +++ b/ports/thrift/correct-paths.patch @@ -0,0 +1,15 @@ +diff --git a/build/cmake/GenerateConfigModule.cmake b/build/cmake/GenerateConfigModule.cmake +index 9533c82..d074a1b 100644 +--- a/build/cmake/GenerateConfigModule.cmake ++++ b/build/cmake/GenerateConfigModule.cmake +@@ -19,8 +19,8 @@ + + include(CMakePackageConfigHelpers) + set(PACKAGE_INCLUDE_INSTALL_DIR "${includedir}/thrift") +-set(PACKAGE_CMAKE_INSTALL_DIR "${cmakedir}/thrift") +-set(PACKAGE_BIN_INSTALL_DIR "${exec_prefix}") ++set(PACKAGE_CMAKE_INSTALL_DIR "${prefix}/share/thrift") ++set(PACKAGE_BIN_INSTALL_DIR "${prefix}/tools/thrift") + + # In CYGWIN enviroment below commands does not work properly + if (NOT CYGWIN) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 5c5a76e9f2067c..f39ba11b90c674 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -1,10 +1,7 @@ -include(vcpkg_common_functions) - # We currently insist on static only because: # - Thrift doesn't yet support building as a DLL on Windows, # - x64-linux only builds static anyway. # From https://github.com/apache/thrift/blob/master/CHANGES.md -# it looks like it will be supported in v0.13. vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_find_acquire_program(FLEX) @@ -13,11 +10,18 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF acdd4226c210336e9e15eb812e5932a645fcd5ce - SHA512 53986b1cde7b2bd19974f32b8c31736566061a228dda368d3d850355c566d910499c16519bbff078a6cdab19931cd9833a7d684ac63fb1ec40b2a123ff263aaa + REF cecee50308fc7e6f77f55b3fd906c1c6c471fa2f #0.13.0 + SHA512 4097fd7951a4d47f2fadc520a54fd1b91b10769d65e899c6bab490dd7ac459e12bb2aa335df8fdfc61a32095033bfac928a54660abb1ee54ca14a144216c3339 HEAD_REF master + PATCHES + "correct-paths.patch" ) +if (VCPKG_TARGET_IS_OSX) + message(WARNING "${PORT} requires bison version greater than 2.5,\n\ +please use command \`brew install bison\` to install bison") +endif() + # note we specify values for WITH_STATIC_LIB and WITH_SHARED_LIB because even though # they're marked as deprecated, Thrift incorrectly hard-codes a value for BUILD_SHARED_LIBS. vcpkg_configure_cmake( @@ -42,7 +46,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright) +vcpkg_copy_pdbs() # Move CMake config files to the right place vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/thrift) @@ -66,4 +70,4 @@ if ("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) endif() -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/thrift/vcpkg.json b/ports/thrift/vcpkg.json new file mode 100644 index 00000000000000..ebc179aa157edb --- /dev/null +++ b/ports/thrift/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "thrift", + "version-string": "0.13.0", + "port-version": 1, + "description": "Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible.", + "homepage": "https://github.com/apache/thrift", + "dependencies": [ + "boost-date-time", + "boost-locale", + "boost-range", + "boost-scope-exit", + "boost-smart-ptr", + "libevent", + "openssl", + "zlib" + ] +} diff --git a/ports/tidy-html5/CONTROL b/ports/tidy-html5/CONTROL deleted file mode 100644 index af8276ee5ff633..00000000000000 --- a/ports/tidy-html5/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tidy-html5 -Version: 5.6.0-1 -Homepage: https://github.com/htacg/tidy-html5 -Description: Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools. diff --git a/ports/tidy-html5/portfile.cmake b/ports/tidy-html5/portfile.cmake index e599049235d234..ddf60c6b29131b 100644 --- a/ports/tidy-html5/portfile.cmake +++ b/ports/tidy-html5/portfile.cmake @@ -1,15 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO htacg/tidy-html5 - REF 5.6.0 - SHA512 179088a6dbd29bb0e4f0219222f755b186145495f7414f6d0e178803ab67140391283d35352d946f9790c6b1b5b462ee6e24f1cc84f19391cb9b65e73979ffd1 + REF d1b906991a7587688d384b648c55731f9be52506 + SHA512 ac1229f95db9ab6367d7650e27b87e76a0874e01c9d404e8c5fb75ba2761318218b658a4f7522188fda8008974393a333a8a5fbed8e3a472c98445f13e459ad5 HEAD_REF master - PATCHES - remove_execution_character_set.patch ) vcpkg_configure_cmake( @@ -25,8 +21,14 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tidyd.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tidyd) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/tidy-html5) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tidy.exe ${CURRENT_PACKAGES_DIR}/tools/tidy-html5/tidy.exe) + +if(VCPKG_TARGET_IS_WINDOWS) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tidy.exe ${CURRENT_PACKAGES_DIR}/tools/tidy-html5/tidy.exe) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tidy ${CURRENT_PACKAGES_DIR}/tools/tidy-html5/tidy) +endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) @@ -35,3 +37,4 @@ endif() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) file(INSTALL ${SOURCE_PATH}/README/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tidy-html5 RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/tidy-html5/remove_execution_character_set.patch b/ports/tidy-html5/remove_execution_character_set.patch deleted file mode 100644 index 9f5ebf3e709fb1..00000000000000 --- a/ports/tidy-html5/remove_execution_character_set.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff --git a/src/language_en.h b/src/language_en.h -index ab191e0..e1cd96b 100644 ---- a/src/language_en.h -+++ b/src/language_en.h -@@ -18,10 +18,6 @@ - * Created by Jim Derry on 11/28/15. - */ - --#ifdef _MSC_VER --#pragma execution_character_set("utf-8") --#endif -- - #include "language.h" - #include "access.h" - #include "message.h" -diff --git a/src/language_en_gb.h b/src/language_en_gb.h -index a89f0fe..7b14d6f 100644 ---- a/src/language_en_gb.h -+++ b/src/language_en_gb.h -@@ -31,10 +31,6 @@ - * PO_REVISION_DATE=2016-03-24 10:59:55 - */ - --#ifdef _MSC_VER --#pragma execution_character_set("utf-8") --#endif -- - #include "language.h" - #include "access.h" - #include "message.h" -diff --git a/src/language_es.h b/src/language_es.h -index db09f2a..1e474b5 100644 ---- a/src/language_es.h -+++ b/src/language_es.h -@@ -31,10 +31,6 @@ - * PO_REVISION_DATE=2016-03-24 10:59:55 - */ - --#ifdef _MSC_VER --#pragma execution_character_set("utf-8") --#endif -- - #include "language.h" - #include "access.h" - #include "message.h" -diff --git a/src/language_es_mx.h b/src/language_es_mx.h -index 5574b3b..530c9f1 100644 ---- a/src/language_es_mx.h -+++ b/src/language_es_mx.h -@@ -31,10 +31,6 @@ - * PO_REVISION_DATE=2016-03-24 10:59:55 - */ - --#ifdef _MSC_VER --#pragma execution_character_set("utf-8") --#endif -- - #include "language.h" - #include "access.h" - #include "message.h" -diff --git a/src/language_fr.h b/src/language_fr.h -index c87ae7b..91baa5e 100644 ---- a/src/language_fr.h -+++ b/src/language_fr.h -@@ -31,10 +31,6 @@ - * PO_REVISION_DATE= - */ - --#ifdef _MSC_VER --#pragma execution_character_set("utf-8") --#endif -- - #include "language.h" - #include "access.h" - #include "message.h" -diff --git a/src/language_zh_cn.h b/src/language_zh_cn.h -index 1c35fef..218203d 100644 ---- a/src/language_zh_cn.h -+++ b/src/language_zh_cn.h -@@ -31,10 +31,6 @@ - * PO_REVISION_DATE=2016-03-24 10:59:55 - */ - --#ifdef _MSC_VER --#pragma execution_character_set("utf-8") --#endif -- - #include "language.h" - #include "access.h" - #include "message.h" diff --git a/ports/tidy-html5/vcpkg.json b/ports/tidy-html5/vcpkg.json new file mode 100644 index 00000000000000..f910fd5f571e18 --- /dev/null +++ b/ports/tidy-html5/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tidy-html5", + "version-string": "5.7.28", + "port-version": 3, + "description": "Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools.", + "homepage": "https://github.com/htacg/tidy-html5" +} diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL deleted file mode 100644 index 7cf6005dcdf5ae..00000000000000 --- a/ports/tiff/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: tiff -Version: 4.0.10-7 -Build-Depends: zlib, libjpeg-turbo, liblzma -Homepage: https://download.osgeo.org/libtiff -Description: A library that supports the manipulation of TIFF image files diff --git a/ports/tiff/FindCMath.patch b/ports/tiff/FindCMath.patch new file mode 100644 index 00000000000000..9158f6fcf816b9 --- /dev/null +++ b/ports/tiff/FindCMath.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindCMath.cmake b/cmake/FindCMath.cmake +index 2da3b7f..e6d5145 100644 +--- a/cmake/FindCMath.cmake ++++ b/cmake/FindCMath.cmake +@@ -32,7 +32,7 @@ include(CheckLibraryExists) + + check_symbol_exists(pow "math.h" CMath_HAVE_LIBC_POW) + if(NOT CMath_HAVE_LIBC_POW) +- find_library(CMath_LIBRARY NAMES m) ++ find_library(CMath_LIBRARY NAMES m PATHS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}) + + set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMath_LIBRARY}) diff --git a/ports/tiff/cmakelists.patch b/ports/tiff/cmakelists.patch index 597c980c5571f4..67c953714ae6f2 100644 --- a/ports/tiff/cmakelists.patch +++ b/ports/tiff/cmakelists.patch @@ -1,99 +1,59 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 845ddf0..9ccb9b3 100644 +index dddbaf6..ee57b7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -181,9 +181,7 @@ foreach(flag ${test_flags}) - endif (${test_c_flag}) - endforeach(flag ${test_flags}) +@@ -133,16 +133,28 @@ find_package(CMath REQUIRED) + # Release support + include(Release) --if(MSVC) -- set(CMAKE_DEBUG_POSTFIX "d") --endif() -+set(CMAKE_DEBUG_POSTFIX "d") - - option(ld-version-script "Enable linker version script" ON) - # Check if LD supports linker scripts. -@@ -601,12 +599,15 @@ check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H) - check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H) - - # Win32 IO --set(win32_io FALSE) --if(WIN32) -- set(win32_io TRUE) -+set(USE_WIN32_FILEIO FALSE CACHE BOOL "") +if(MSVC) -+ if (NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") #on UWP we use the unix I/O api -+ set(USE_WIN32_FILEIO TRUE CACHE BOOL "" FORCE) -+ add_definitions(-DUSE_WIN32_FILEIO) -+ endif() -+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS /wd4996) - endif() - --set(USE_WIN32_FILEIO ${win32_io}) - - # Orthogonal features - -@@ -708,16 +709,28 @@ endif() - - #report_values(TIFF_INCLUDES TIFF_LIBRARY_DEPS) ++ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) ++ add_compile_options(/wd4996) ++endif() -+option(BUILD_TOOLS "Build tool executables" ON) -+option(BUILD_DOCS "Build docs" ON) -+option(BUILD_CONTRIB "Build contributed executables" ON) -+option(BUILD_TESTS "Build tests" ON) -+ # Process subdirectories add_subdirectory(port) add_subdirectory(libtiff) --add_subdirectory(tools) --add_subdirectory(test) --add_subdirectory(contrib) --add_subdirectory(build) --add_subdirectory(man) --add_subdirectory(html) -- +if(BUILD_TOOLS) -+ add_subdirectory(tools) + add_subdirectory(tools) +endif() +if(BUILD_TESTS) -+ add_subdirectory(test) + add_subdirectory(test) +endif() +if(BUILD_CONTRIB) -+ add_subdirectory(contrib) + add_subdirectory(contrib) + add_subdirectory(build) +endif() +if(BUILD_DOCS) -+ add_subdirectory(build) -+ add_subdirectory(man) -+ add_subdirectory(html) + add_subdirectory(man) + add_subdirectory(html) +endif() - #message(STATUS "EXTRA_DIST: ${EXTRA_DIST}") + message(STATUS "") diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt -index 1cf1b75..4ee29f6 100644 +index 90105b2..db5f140 100755 --- a/libtiff/CMakeLists.txt +++ b/libtiff/CMakeLists.txt -@@ -104,11 +104,11 @@ set(tiffxx_HEADERS - set(tiffxx_SOURCES - tif_stream.cxx) +@@ -161,7 +161,7 @@ if(CXX_SUPPORT) + set(tiffxx_HEADERS + tiffio.hxx) --if(WIN32_IO) -- extra_dist(tif_unix.c) -+if(USE_WIN32_FILEIO) -+ extra_dist(tif_win32.c) - list(APPEND tiff_SOURCES tif_win32.c) - else() -- extra_dist(tif_win32.c) -+ extra_dist(tif_unix.c) - list(APPEND tiff_SOURCES tif_unix.c) - endif() +- add_library(tiffxx) ++ add_library(tiffxx STATIC) + target_sources(tiffxx PRIVATE + ${tiffxx_HEADERS} + tif_stream.cxx) +@@ -189,6 +189,7 @@ if(CXX_SUPPORT) -@@ -143,7 +143,7 @@ install(FILES ${tiff_HEADERS} ${nodist_tiff_HEADERS} - DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + endif() - if(CXX_SUPPORT) -- add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS}) -+ add_library(tiffxx STATIC ${tiffxx_SOURCES} ${tiffxx_HEADERS}) - target_link_libraries(tiffxx tiff) - set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION}) - if(NOT CYGWIN) ++if(NOT CMAKE_CROSSCOMPILING) + add_executable(mkg3states) + target_sources(mkg3states PRIVATE mkg3states.c tif_fax3.h) + target_link_libraries(mkg3states tiff port) +@@ -198,3 +199,4 @@ add_custom_target(faxtable + COMMAND ${CMAKE_COMMAND} -E rm "tif_fax3sm.c" + COMMAND mkg3states -b -c const "tif_fax3sm.c" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") ++endif() diff --git a/ports/tiff/fix-pkgconfig.patch b/ports/tiff/fix-pkgconfig.patch new file mode 100644 index 00000000000000..a67910ef5709f5 --- /dev/null +++ b/ports/tiff/fix-pkgconfig.patch @@ -0,0 +1,84 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2188f97..93e6a34 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,8 +124,6 @@ include(WindowsSupport) + # Orthogonal features + include(LibraryFeatures) + +-# pkg-config support +-include(PkgConfig) + + # math.h/libm portability + find_package(CMath REQUIRED) +@@ -156,6 +154,8 @@ add_subdirectory(man) + add_subdirectory(html) + endif() + ++# pkg-config support ++include(PkgConfig) + + message(STATUS "") + message(STATUS "Libtiff is now configured for ${CMAKE_SYSTEM}") +diff --git a/libtiff-4.pc.in b/libtiff-4.pc.in +index abe75a6..8899725 100644 +--- a/libtiff-4.pc.in ++++ b/libtiff-4.pc.in +@@ -5,7 +5,8 @@ includedir=@includedir@ + + Name: libtiff + Description: Tag Image File Format (TIFF) library. +-Version: @VERSION@ ++Version: @LIBTIFF_VERSION_FULL@ + Libs: -L${libdir} -ltiff + Libs.private: @tiff_libs_private@ + Cflags: -I${includedir} ++Requires.private: @tiff_requires_private@ +diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt +index db5f140..6db71ee 100755 +--- a/libtiff/CMakeLists.txt ++++ b/libtiff/CMakeLists.txt +@@ -106,14 +106,19 @@ target_include_directories(tiff + ${TIFF_INCLUDES} + ) + ++set(tiff_libs_private "") ++set(tiff_requires_private "") ++ + if(ZIP_SUPPORT) + target_link_libraries(tiff PRIVATE ZLIB::ZLIB) ++ string(APPEND tiff_requires_private " zlib") + endif() + if(ZIP_SUPPORT AND LIBDEFLATE_SUPPORT) + target_link_libraries(tiff PRIVATE Deflate::Deflate) + endif() + if(JPEG_SUPPORT) + target_link_libraries(tiff PRIVATE JPEG::JPEG) ++ string(APPEND tiff_requires_private " libjpeg") + if(JPEG_DUAL_MODE_8_12) + target_include_directories(tiff PRIVATE ${JPEG12_INCLUDE_DIR}) + target_link_libraries(tiff PRIVATE ${JPEG12_LIBRARIES}) +@@ -127,14 +132,23 @@ if(LERC_SUPPORT) + endif() + if(LZMA_SUPPORT) + target_link_libraries(tiff PRIVATE LibLZMA::LibLZMA) ++ string(APPEND tiff_requires_private " liblzma") + endif() + if(ZSTD_SUPPORT) + target_link_libraries(tiff PRIVATE ZSTD::ZSTD) ++ string(APPEND tiff_requires_private " libzstd") + endif() + if(WEBP_SUPPORT) + target_link_libraries(tiff PRIVATE WebP::WebP) ++ string(APPEND tiff_requires_private " libwebp") + endif() + target_link_libraries(tiff PRIVATE CMath::CMath) ++if(CMath_LIBRARY) ++ string(APPEND tiff_libs_private " -lm") ++endif() ++ ++set(tiff_libs_private "${tiff_libs_private}" PARENT_SCOPE) ++set(tiff_requires_private "${tiff_requires_private}" PARENT_SCOPE) + + set_target_properties(tiff PROPERTIES SOVERSION ${SO_COMPATVERSION}) + if(NOT CYGWIN) diff --git a/ports/tiff/fix-stddef.patch b/ports/tiff/fix-stddef.patch deleted file mode 100644 index a9c2ddf0b0679b..00000000000000 --- a/ports/tiff/fix-stddef.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/port/lfind.c port/lfind.c -index 087dfa9..20fa8b4 100644 ---- a/port/lfind.c -+++ b/port/lfind.c -@@ -38,7 +38,7 @@ - #ifdef _WIN32_WCE - # include - #else --# include -+# include - #endif - - #ifndef NULL diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake index 373ceac7cb974c..57b7543b30367b 100644 --- a/ports/tiff/portfile.cmake +++ b/ports/tiff/portfile.cmake @@ -1,53 +1,102 @@ -include(vcpkg_common_functions) - -set(LIBTIFF_VERSION 4.0.10) +set(LIBTIFF_VERSION 4.3.0) vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz" + URLS "https://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz" FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz" - SHA512 d213e5db09fd56b8977b187c5a756f60d6e3e998be172550c2892dbdb4b2a8e8c750202bc863fe27d0d1c577ab9de1710d15e9f6ed665aadbfd857525a81eea8 + SHA512 e04a4a6c542e58a174c1e9516af3908acf1d3d3e1096648c5514f4963f73e7af27387a76b0fbabe43cf867a18874088f963796a7cd6e45deb998692e3e235493 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + ARCHIVE "${ARCHIVE}" REF ${LIBTIFF_VERSION} PATCHES - fix-stddef.patch cmakelists.patch + fix-pkgconfig.patch + FindCMath.patch ) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set (TIFF_CXX_TARGET -Dcxx=OFF) +set(EXTRA_OPTIONS "") +if(VCPKG_TARGET_IS_UWP) + list(APPEND EXTRA_OPTIONS "-DUSE_WIN32_FILEIO=OFF") # On UWP we use the unix I/O api. +endif() + +if("cxx" IN_LIST FEATURES) + vcpkg_fail_port_install( + MESSAGE "Feature 'cxx' is not supported on ${VCPKG_TARGET_ARCHITECTURE}." + ON_ARCH arm arm64 + ) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + cxx cxx + jpeg jpeg + lzma lzma + tools BUILD_TOOLS + webp webp + zip zlib + zstd zstd +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DBUILD_TOOLS=OFF + ${FEATURE_OPTIONS} + ${EXTRA_OPTIONS} -DBUILD_DOCS=OFF -DBUILD_CONTRIB=OFF -DBUILD_TESTS=OFF + -DCMAKE_DEBUG_POSTFIX=d # tiff sets "d" for MSVC only. + -Dlibdeflate=OFF -Djbig=OFF # This is disabled by default due to GPL/Proprietary licensing. -Djpeg12=OFF - -Dwebp=OFF - -Dzstd=OFF + -Dlerc=OFF -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON -DCMAKE_DISABLE_FIND_PACKAGE_GLUT=ON - ${TIFF_CXX_TARGET} ) -vcpkg_install_cmake() +vcpkg_cmake_install() + +set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libtiff-4.pc") +if(EXISTS "${_file}") + vcpkg_replace_string("${_file}" "-ltiff" "-ltiffd") +endif() +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/share + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/share" ) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff) -file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff RENAME copyright) +if ("tools" IN_LIST FEATURES) + set(_tools + fax2ps + fax2tiff + pal2rgb + ppm2tiff + raw2tiff + tiff2bw + tiff2pdf + tiff2ps + tiff2rgba + tiffcmp + tiffcp + tiffcrop + tiffdither + tiffdump + tiffinfo + tiffmedian + tiffset + tiffsplit + ) + vcpkg_copy_tools(TOOL_NAMES ${_tools} AUTO_CLEAN) +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() vcpkg_copy_pdbs() diff --git a/ports/tiff/vcpkg-cmake-wrapper.cmake b/ports/tiff/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index a35deceee5bda2..00000000000000 --- a/ports/tiff/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,23 +0,0 @@ -_find_package(${ARGS}) - -find_package(LibLZMA CONFIG) -find_package(JPEG) -find_package(ZLIB) -if(TARGET TIFF::TIFF) - set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibLZMA::LibLZMA JPEG::JPEG ZLIB::ZLIB) - if(UNIX) - set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES m) - endif() -endif() -if(TIFF_LIBRARIES) - list(APPEND TIFF_LIBRARIES ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) - if(UNIX) - list(APPEND TIFF_LIBRARIES m) - endif() -endif() -if(TIFF_LIBRARY) - list(APPEND TIFF_LIBRARY ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) - if(UNIX) - list(APPEND TIFF_LIBRARY m) - endif() -endif() diff --git a/ports/tiff/vcpkg-cmake-wrapper.cmake.in b/ports/tiff/vcpkg-cmake-wrapper.cmake.in new file mode 100644 index 00000000000000..cd356483a7d0a7 --- /dev/null +++ b/ports/tiff/vcpkg-cmake-wrapper.cmake.in @@ -0,0 +1,49 @@ +_find_package(${ARGS}) + +set(_tiff_features ";@FEATURES@;") +set(_tiff_link_libraries "") +set(_tiff_libraries "") +if(_tiff_features MATCHES ";webp;") + find_package(WebP CONFIG REQUIRED) + list(APPEND _tiff_link_libraries WebP::WebP) + list(APPEND _tiff_libraries ${WEBP_LIBRARIES}) +endif() +if(_tiff_features MATCHES ";lzma;") + find_package(LibLZMA CONFIG REQUIRED) + list(APPEND _tiff_link_libraries LibLZMA::LibLZMA) + list(APPEND _tiff_libraries ${LZMA_LIBRARIES}) +endif() +if(_tiff_features MATCHES ";jpeg;") + find_package(JPEG REQUIRED) + list(APPEND _tiff_link_libraries JPEG::JPEG) + list(APPEND _tiff_libraries ${JPEG_LIBRARIES}) +endif() +if(_tiff_features MATCHES ";zstd;") + find_package(ZSTD CONFIG REQUIRED) + if(TARGET zstd::libzstd_shared) + set(_tiff_zstd zstd::libzstd_shared) + else() + set(_tiff_zstd zstd::libzstd_static) + endif() + list(APPEND _tiff_link_libraries ${_tiff_zstd}) + list(APPEND _tiff_libraries ${_tiff_zstd}) +endif() +if(_tiff_features MATCHES ";zip;") + find_package(ZLIB REQUIRED) + list(APPEND _tiff_link_libraries ZLIB::ZLIB) + list(APPEND _tiff_libraries ${ZLIB_LIBRARIES}) +endif() +if(UNIX) + list(APPEND _tiff_link_libraries m) + list(APPEND _tiff_libraries m) +endif() + +if(TARGET TIFF::TIFF) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${_tiff_link_libraries}) +endif() +if(TIFF_LIBRARIES) + list(APPEND TIFF_LIBRARIES ${_tiff_libraries}) +endif() +if(TIFF_LIBRARY) + list(APPEND TIFF_LIBRARY ${_tiff_libraries}) +endif() diff --git a/ports/tiff/vcpkg.json b/ports/tiff/vcpkg.json new file mode 100644 index 00000000000000..f31b99cdce643e --- /dev/null +++ b/ports/tiff/vcpkg.json @@ -0,0 +1,56 @@ +{ + "name": "tiff", + "version": "4.3.0", + "port-version": 1, + "description": "A library that supports the manipulation of TIFF image files", + "homepage": "https://libtiff.gitlab.io/libtiff/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + "jpeg", + "lzma", + "zip" + ], + "features": { + "cxx": { + "description": "Build C++ libtiffxx library" + }, + "jpeg": { + "description": "Support JPEG compression in TIFF image files", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "lzma": { + "description": "Support LZMA compression in TIFF image files", + "dependencies": [ + "liblzma" + ] + }, + "tools": { + "description": "Build tools" + }, + "webp": { + "description": "Support WEBP compression in TIFF image files", + "dependencies": [ + "libwebp" + ] + }, + "zip": { + "description": "Support ZIP/deflate compression in TIFF image files", + "dependencies": [ + "zlib" + ] + }, + "zstd": { + "description": "Support ZSTD compression in TIFF image files", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/ports/tinkerforge/CMakeLists.txt b/ports/tinkerforge/CMakeLists.txt new file mode 100644 index 00000000000000..3cd9916504e695 --- /dev/null +++ b/ports/tinkerforge/CMakeLists.txt @@ -0,0 +1,68 @@ +cmake_minimum_required (VERSION 3.13 FATAL_ERROR) +include(GNUInstallDirs) + +if(WIN32) + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}") +endif() + +project(tinkerforge LANGUAGES C VERSION 2.1.25) + +if(NOT CONFIG_INSTALL_DIR) + set(CONFIG_INSTALL_DIR "share/${PROJECT_NAME}/") +endif() +if(NOT INCLUDE_INSTALL_DIR) + set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") +endif() +if(NOT TARGET_INSTALL_DIR) + set(TARGET_INSTALL_DIR "share/${PROJECT_NAME}") +endif() + + +file(GLOB CPP_FILES source/*.c) +file(GLOB H_FILES source/*.h) +file(GLOB DEF_FILE source/*.def) + +add_library(${PROJECT_NAME} ${CPP_FILES} ${H_FILES} ${DEF_FILE}) +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $) + +find_package(Threads) +target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads) + +if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") + target_link_libraries(${PROJECT_NAME} PUBLIC Ws2_32 advapi32) +endif() +##---------------------------------------------------------------------------------------## +##----- Package definition. +##---------------------------------------------------------------------------------------## +include(CMakePackageConfigHelpers) + +#Export as Package +set_target_properties (${PROJECT_NAME} PROPERTIES EXPORT_NAME ${PROJECT_NAME}) +export(TARGETS ${PROJECT_NAME} NAMESPACE ${PROJECT_NAME}:: FILE cmake/${PROJECT_NAME}Targets.cmake) +export(PACKAGE ${PROJECT_NAME}) + +#Config files for find_package +configure_package_config_file( + ${PROJECT_NAME}Config.cmake.in cmake/${PROJECT_NAME}Config.cmake + INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}/${PROJECT_NAME}Config.cmake" + PATH_VARS TARGET_INSTALL_DIR INCLUDE_INSTALL_DIR +) +write_basic_package_version_file(cmake/${PROJECT_NAME}ConfigVersion.cmake COMPATIBILITY SameMinorVersion) + +#Install the target and all it build outputs. +install (TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Runtime + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT Runtime + PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development + BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT Runtime) +#Install public headers +install(FILES ${H_FILES} DESTINATION "${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}") +#Install the config files for find_package +install(FILES "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake" + "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake" + DESTINATION "${CONFIG_INSTALL_DIR}") +#install the targets file included by the config +install(EXPORT ${PROJECT_NAME}Targets NAMESPACE ${PROJECT_NAME}:: DESTINATION "${TARGET_INSTALL_DIR}") \ No newline at end of file diff --git a/ports/tinkerforge/portfile.cmake b/ports/tinkerforge/portfile.cmake new file mode 100644 index 00000000000000..cfc5c3989075b9 --- /dev/null +++ b/ports/tinkerforge/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(VERSION 2_1_25) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.tinkerforge.com/bindings/c/tinkerforge_c_bindings_${VERSION}.zip" + FILENAME "tinkerforge-${VERSION}.zip" + SHA512 c02b789bd466803d60aeb39a544b0aa17af811377b065a0b273bcfc15c5844f8cfe981d8143743e32bd05470c2c6af297df50924da0d2895a4cdf4bc9e9bd0b8 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF tinker-${VERSION} + NO_REMOVE_ONE_LEVEL +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/tinkerforgeConfig.cmake.in" DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/tinkerforge/tinkerforgeConfig.cmake.in b/ports/tinkerforge/tinkerforgeConfig.cmake.in new file mode 100644 index 00000000000000..07b771c65bf346 --- /dev/null +++ b/ports/tinkerforge/tinkerforgeConfig.cmake.in @@ -0,0 +1,5 @@ +@PACKAGE_INIT@ + +include ("@PACKAGE_TARGET_INSTALL_DIR@/@PROJECT_NAME@Targets.cmake") +set_and_check(TINKERFORGE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +check_required_components("@PROJECT_NAME@") diff --git a/ports/tinkerforge/vcpkg.json b/ports/tinkerforge/vcpkg.json new file mode 100644 index 00000000000000..6590a57f116195 --- /dev/null +++ b/ports/tinkerforge/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinkerforge", + "version-string": "2.1.25", + "port-version": 1, + "description": "Tinkerforge C API bindings for bricks and bricklets", + "supports": "!uwp" +} diff --git a/ports/tiny-aes-c/CONTROL b/ports/tiny-aes-c/CONTROL deleted file mode 100644 index e874990740b37b..00000000000000 --- a/ports/tiny-aes-c/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tiny-aes-c -Version: 2019-07-31 -Description: Small portable AES128/192/256 in C -Homepage: https://github.com/kokke/tiny-AES-c diff --git a/ports/tiny-aes-c/portfile.cmake b/ports/tiny-aes-c/portfile.cmake index e1bb5cb31d9478..80439c1e0be24b 100644 --- a/ports/tiny-aes-c/portfile.cmake +++ b/ports/tiny-aes-c/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -25,6 +23,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/unlicense.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/ports/tiny-aes-c/vcpkg.json b/ports/tiny-aes-c/vcpkg.json new file mode 100644 index 00000000000000..d4999595781088 --- /dev/null +++ b/ports/tiny-aes-c/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tiny-aes-c", + "version-string": "2019-07-31", + "port-version": 1, + "description": "Small portable AES128/192/256 in C", + "homepage": "https://github.com/kokke/tiny-AES-c" +} diff --git a/ports/tiny-bignum-c/CONTROL b/ports/tiny-bignum-c/CONTROL deleted file mode 100644 index 5015bc2d07340f..00000000000000 --- a/ports/tiny-bignum-c/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tiny-bignum-c -Version: 2019-07-31 -Description: Small portable multiple-precision unsigned integer arithmetic in C -Homepage: https://github.com/kokke/tiny-bignum-c diff --git a/ports/tiny-bignum-c/portfile.cmake b/ports/tiny-bignum-c/portfile.cmake index 732271241daa10..81bdd55a6e58d1 100644 --- a/ports/tiny-bignum-c/portfile.cmake +++ b/ports/tiny-bignum-c/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -25,6 +23,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/ports/tiny-bignum-c/vcpkg.json b/ports/tiny-bignum-c/vcpkg.json new file mode 100644 index 00000000000000..2d78d4dfd87d4f --- /dev/null +++ b/ports/tiny-bignum-c/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tiny-bignum-c", + "version-string": "2019-07-31", + "port-version": 1, + "description": "Small portable multiple-precision unsigned integer arithmetic in C", + "homepage": "https://github.com/kokke/tiny-bignum-c" +} diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL deleted file mode 100644 index 2a31c833a8ccc1..00000000000000 --- a/ports/tiny-dnn/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tiny-dnn -Version: 2018-10-25 -Homepage: https://github.com/tiny-dnn/tiny-dnn -Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake index 500a42906a16b2..77d7fe4e4228e5 100644 --- a/ports/tiny-dnn/portfile.cmake +++ b/ports/tiny-dnn/portfile.cmake @@ -1,5 +1,4 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tiny-dnn/tiny-dnn diff --git a/ports/tiny-dnn/vcpkg.json b/ports/tiny-dnn/vcpkg.json new file mode 100644 index 00000000000000..977ae26adf1669 --- /dev/null +++ b/ports/tiny-dnn/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tiny-dnn", + "version-string": "2018-10-25", + "port-version": 1, + "description": "A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource.", + "homepage": "https://github.com/tiny-dnn/tiny-dnn" +} diff --git a/ports/tiny-process-library/CONTROL b/ports/tiny-process-library/CONTROL deleted file mode 100644 index 938277aa99652b..00000000000000 --- a/ports/tiny-process-library/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tiny-process-library -Version: 2018-12-06 -Description: A small platform independent library diff --git a/ports/tiny-process-library/fix-cmake.patch b/ports/tiny-process-library/fix-cmake.patch deleted file mode 100644 index c8a264622b81fb..00000000000000 --- a/ports/tiny-process-library/fix-cmake.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ace2879..15c7f44 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8) - project(tiny-process-library) - - if(MSVC) -+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - add_definitions(/D_CRT_SECURE_NO_WARNINGS) - else() - add_compile_options(-std=c++11 -Wall -Wextra) -@@ -23,7 +24,7 @@ endif() - find_package(Threads REQUIRED) - - target_link_libraries(tiny-process-library ${CMAKE_THREAD_LIBS_INIT}) --target_include_directories(tiny-process-library PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -+target_include_directories(tiny-process-library PUBLIC $) - - option(BUILD_TESTING OFF) - -@@ -34,7 +35,17 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - - set(BUILD_TESTING ON) - -- install(TARGETS tiny-process-library DESTINATION lib) -+ install(TARGETS tiny-process-library -+ EXPORT ${PROJECT_NAME}-config -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ ) -+ install(EXPORT ${PROJECT_NAME}-config -+ FILE unofficial-${PROJECT_NAME}-config.cmake -+ NAMESPACE unofficial::${PROJECT_NAME}:: -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME} -+ ) - install(FILES process.hpp DESTINATION include) - endif() - diff --git a/ports/tiny-process-library/portfile.cmake b/ports/tiny-process-library/portfile.cmake index bcab0c4a47744f..20af73f6a0faee 100644 --- a/ports/tiny-process-library/portfile.cmake +++ b/ports/tiny-process-library/portfile.cmake @@ -1,14 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_gitlab( GITLAB_URL https://gitlab.com OUT_SOURCE_PATH SOURCE_PATH REPO eidheim/tiny-process-library - REF 273270d0f9d0cf4a8282fadd589060a7b0eab425 - SHA512 f99e586ee6fa9b7c0a3633b59e0e099becba48e2ef375268eeecd9099a233e3b528ba373edc74983d49934ff10f99884fdeb594ff546054fc91d1341d0e86c0a + REF v2.0.4 + SHA512 bbdd268361159b7c64cb60f29afa780ee5e57fa696f0683a55cb9824ec5985c8229a9a8217d2b9ecdd194b9a3acbbd75a1a821392361fbc85b1f6841f40c95db HEAD_REF master - PATCHES - fix-cmake.patch ) vcpkg_configure_cmake( @@ -16,6 +12,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBUILD_TESTING=OFF + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) vcpkg_install_cmake() @@ -23,8 +20,8 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets( - CONFIG_PATH lib/cmake/unofficial-${PORT} - TARGET_PATH share/unofficial-${PORT} + CONFIG_PATH lib/cmake/${PORT} + TARGET_PATH share/${PORT} ) file(REMOVE_RECURSE @@ -34,6 +31,3 @@ file(REMOVE_RECURSE # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -#vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/tiny-process-library/vcpkg.json b/ports/tiny-process-library/vcpkg.json new file mode 100644 index 00000000000000..e6daaf3228eecf --- /dev/null +++ b/ports/tiny-process-library/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tiny-process-library", + "version-string": "2.0.4", + "port-version": 1, + "description": "A small platform independent library to create and stop new processes in C++" +} diff --git a/ports/tiny-regex-c/CONTROL b/ports/tiny-regex-c/CONTROL deleted file mode 100644 index 12b5ea0c5ec724..00000000000000 --- a/ports/tiny-regex-c/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tiny-regex-c -Version: 2019-07-31 -Description: A small regex implementation in C -Homepage: https://github.com/kokke/tiny-regex-c diff --git a/ports/tiny-regex-c/portfile.cmake b/ports/tiny-regex-c/portfile.cmake index 2e21fb4337f207..4a5564cf6e6dfe 100644 --- a/ports/tiny-regex-c/portfile.cmake +++ b/ports/tiny-regex-c/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -25,6 +23,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/ports/tiny-regex-c/vcpkg.json b/ports/tiny-regex-c/vcpkg.json new file mode 100644 index 00000000000000..c9a39a6af66283 --- /dev/null +++ b/ports/tiny-regex-c/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tiny-regex-c", + "version-string": "2019-07-31", + "port-version": 1, + "description": "A small regex implementation in C", + "homepage": "https://github.com/kokke/tiny-regex-c" +} diff --git a/ports/tinycthread/CONTROL b/ports/tinycthread/CONTROL deleted file mode 100644 index da87db1411c33f..00000000000000 --- a/ports/tinycthread/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tinycthread -Version: 2019-08-06 -Description: Small, portable implementation of the C11 threads API -Homepage: https://tinycthread.github.io/ diff --git a/ports/tinycthread/portfile.cmake b/ports/tinycthread/portfile.cmake index e521ffb004e97a..2d6c8b18b2d4f3 100644 --- a/ports/tinycthread/portfile.cmake +++ b/ports/tinycthread/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/tinycthread/vcpkg.json b/ports/tinycthread/vcpkg.json new file mode 100644 index 00000000000000..d67a40f5368605 --- /dev/null +++ b/ports/tinycthread/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinycthread", + "version-string": "2019-08-06", + "port-version": 1, + "description": "Small, portable implementation of the C11 threads API", + "homepage": "https://tinycthread.github.io/" +} diff --git a/ports/tinydir/CONTROL b/ports/tinydir/CONTROL deleted file mode 100644 index 04a6b7b60b47a8..00000000000000 --- a/ports/tinydir/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tinydir -Version: 1.2.4 -Homepage: https://github.com/cxong/tinydir -Description: Lightweight, portable and easy to integrate C directory and file reader diff --git a/ports/tinydir/portfile.cmake b/ports/tinydir/portfile.cmake index 223b7d7631e7d0..b5e5647bc2abfb 100644 --- a/ports/tinydir/portfile.cmake +++ b/ports/tinydir/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cxong/tinydir diff --git a/ports/tinydir/vcpkg.json b/ports/tinydir/vcpkg.json new file mode 100644 index 00000000000000..7326cdd2008e06 --- /dev/null +++ b/ports/tinydir/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinydir", + "version-string": "1.2.4", + "port-version": 1, + "description": "Lightweight, portable and easy to integrate C directory and file reader", + "homepage": "https://github.com/cxong/tinydir" +} diff --git a/ports/tinyexif/CONTROL b/ports/tinyexif/CONTROL deleted file mode 100644 index 7d2da6da0454fa..00000000000000 --- a/ports/tinyexif/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: tinyexif -Version: 1.0.2-6 -Build-Depends: tinyxml2 -Homepage: https://github.com/cdcseacave/TinyEXIF -Description: tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG images diff --git a/ports/tinyexif/portfile.cmake b/ports/tinyexif/portfile.cmake index b1940ad944678a..12e6f5cb97ed6c 100644 --- a/ports/tinyexif/portfile.cmake +++ b/ports/tinyexif/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cdcseacave/TinyEXIF diff --git a/ports/tinyexif/vcpkg.json b/ports/tinyexif/vcpkg.json new file mode 100644 index 00000000000000..1d5a0f8cc2d930 --- /dev/null +++ b/ports/tinyexif/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "tinyexif", + "version-string": "1.0.2", + "port-version": 7, + "description": "tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG images", + "homepage": "https://github.com/cdcseacave/TinyEXIF", + "dependencies": [ + "tinyxml2" + ] +} diff --git a/ports/tinyexpr/CMakeLists.txt b/ports/tinyexpr/CMakeLists.txt new file mode 100644 index 00000000000000..60f38348ab4df0 --- /dev/null +++ b/ports/tinyexpr/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.14) + +project(tinyexpr LANGUAGES C) + +include(CheckSymbolExists) +include(GNUInstallDirs) + +if(WIN32 AND BUILD_SHARED_LIBS) + add_library(tinyexpr tinyexpr.c exports.def) +else() + add_library(tinyexpr tinyexpr.c) +endif() + +target_include_directories( + tinyexpr + PUBLIC + $ +) + +# https://stackoverflow.com/questions/32816646/can-cmake-detect-if-i-need-to-link-to-libm-when-using-pow-in-c +if(NOT POW_FUNCTION_EXISTS AND NOT NEED_LINKING_AGAINST_LIBM) + check_symbol_exists(pow "math.h" POW_FUNCTION_EXISTS) + if(NOT POW_FUNCTION_EXISTS) + unset(POW_FUNCTION_EXISTS CACHE) + list(APPEND CMAKE_REQUIRED_LIBRARIES m) + check_symbol_exists(pow "math.h" POW_FUNCTION_EXISTS) + if(POW_FUNCTION_EXISTS) + set(NEED_LINKING_AGAINST_LIBM True CACHE BOOL "" FORCE) + else() + message(FATAL_ERROR "Failed making the pow() function available") + endif() + endif() +endif() + +if(NEED_LINKING_AGAINST_LIBM) + target_link_libraries(tinyexpr PUBLIC m) +endif() + +set_target_properties(tinyexpr PROPERTIES PUBLIC_HEADER tinyexpr.h) + +install(TARGETS tinyexpr EXPORT unofficial-tinyexpr-config) + +install( + EXPORT unofficial-tinyexpr-config + NAMESPACE unofficial::tinyexpr:: + DESTINATION share/unofficial-tinyexpr + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/ports/tinyexpr/exports.def b/ports/tinyexpr/exports.def new file mode 100644 index 00000000000000..a43f437d27c950 --- /dev/null +++ b/ports/tinyexpr/exports.def @@ -0,0 +1,6 @@ +EXPORTS + te_compile + te_eval + te_free + te_interp + te_print diff --git a/ports/tinyexpr/fix-issue-34.patch b/ports/tinyexpr/fix-issue-34.patch new file mode 100644 index 00000000000000..000fea053e6086 --- /dev/null +++ b/ports/tinyexpr/fix-issue-34.patch @@ -0,0 +1,16 @@ +diff --git a/tinyexpr.c b/tinyexpr.c +index 90ed8fc..570f2fd 100755 +--- a/tinyexpr.c ++++ b/tinyexpr.c +@@ -49,6 +49,11 @@ For log = natural log uncomment the next line. */ + #define INFINITY (1.0/0.0) + #endif + ++/* https://github.com/codeplea/tinyexpr/issues/34 */ ++#ifdef _MSC_VER ++#pragma function(ceil) ++#pragma function(floor) ++#endif + + typedef double (*te_fun2)(double, double); + diff --git a/ports/tinyexpr/portfile.cmake b/ports/tinyexpr/portfile.cmake new file mode 100644 index 00000000000000..480c67a24d5ffe --- /dev/null +++ b/ports/tinyexpr/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO codeplea/tinyexpr + REF ffb0d41b13e5f8d318db95feb071c220c134fe70 + SHA512 fe4975f8b444a50d7ba8135450a42007a81f1545eebd7775f92307b87b72bc9abee4591e56ddeb76ec9e5aa41f0852ba98c99881d671f47a58caca8bd1ca9999 + HEAD_REF master + PATCHES + fix-issue-34.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tinyexpr/vcpkg.json b/ports/tinyexpr/vcpkg.json new file mode 100644 index 00000000000000..6ed72b483aaba3 --- /dev/null +++ b/ports/tinyexpr/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinyexpr", + "version-string": "2020-09-25", + "description": "Tiny recursive descent parser and evaluation engine in C", + "homepage": "https://codeplea.com/tinyexpr", + "license": "Zlib" +} diff --git a/ports/tinyexr/CONTROL b/ports/tinyexr/CONTROL deleted file mode 100644 index 076322a0fbd39e..00000000000000 --- a/ports/tinyexr/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tinyexr -Version: 0.9.5-d16ea6-1 -Homepage: https://github.com/syoyo/tinyexr -Description: Library to load and save OpenEXR(.exr) images diff --git a/ports/tinyexr/copyright b/ports/tinyexr/copyright deleted file mode 100644 index 975a80794e0d46..00000000000000 --- a/ports/tinyexr/copyright +++ /dev/null @@ -1,5 +0,0 @@ -3-clause BSD - -tinyexr uses miniz, which is developed by Rich Geldreich richgel99@gmail.com, and licensed under public domain. - -tinyexr tools uses stb, which is licensed under public domain: https://github.com/nothings/stb tinyexr uses some code from OpenEXR, which is licensed under 3-clause BSD license. \ No newline at end of file diff --git a/ports/tinyexr/fixtargets.patch b/ports/tinyexr/fixtargets.patch new file mode 100644 index 00000000000000..e06f1831e7b97a --- /dev/null +++ b/ports/tinyexr/fixtargets.patch @@ -0,0 +1,46 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3613642..93fb6c1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,6 +7,20 @@ set(SAMPLE_TARGET "test_tinyexr") + + project(${BUILD_TARGET} CXX) + ++set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") ++set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") ++set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed") ++set(INSTALL_CMAKE_DIR "share/tinyexr" CACHE PATH "Path where cmake configs will be installed") ++ ++# Make relative paths absolute (needed later on) ++set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) ++foreach(p LIB BIN INCLUDE CMAKE) ++ set(var INSTALL_${p}_DIR) ++ if(NOT IS_ABSOLUTE "${${var}}") ++ set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") ++ endif() ++endforeach() ++ + # options + option(TINYEXR_BUILD_SAMPLE "Build a sample" ON) + +@@ -60,3 +74,20 @@ if (TINYEXR_BUILD_SAMPLE) + endif(WIN32) + + endif (TINYEXR_BUILD_SAMPLE) ++ ++target_include_directories(${BUILD_TARGET} PUBLIC $ $) ++set_target_properties(${BUILD_TARGET} PROPERTIES PUBLIC_HEADER "${PROJECT_SOURCE_DIR}/tinyexr.h") ++ ++install(TARGETS ${BUILD_TARGET} EXPORT ${BUILD_TARGET}Targets ++ RUNTIME DESTINATION "${INSTALL_BIN_DIR}" ++ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ++ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" ++ PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}" ++ COMPONENT dev ++) ++ ++install(EXPORT ${BUILD_TARGET}Targets ++ FILE ${BUILD_TARGET}Config.cmake ++ NAMESPACE unofficial::${BUILD_TARGET}:: ++ DESTINATION "${INSTALL_CMAKE_DIR}" ++) diff --git a/ports/tinyexr/portfile.cmake b/ports/tinyexr/portfile.cmake index bc3effdc36274c..fe1dcce4ff5a75 100644 --- a/ports/tinyexr/portfile.cmake +++ b/ports/tinyexr/portfile.cmake @@ -1,15 +1,23 @@ -# header-only -include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO syoyo/tinyexr - REF d16ea6347ae78bcee984fb57cab1f023aeda4fb0 - SHA512 63399688d7894f9ac4b893b2142202b36108b5029b11c40c3f9ad0f0135625fb0c8e0d54cec88d92c016774648dc829a946d9575c5f19afea56542c00759546e + REF v1.0.0 + SHA512 5c7dc7201ea57d98505ece22161dc72c284b3db1a7993e46317254dfc42b0f0e76a59227c3cc601fd8a347f0d3aedf2e5f7d7eb9434068face94f503b94711fd HEAD_REF master + PATCHES + fixtargets.patch ) -file(COPY ${SOURCE_PATH}/tinyexr.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTINYEXR_BUILD_SAMPLE=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Handle copyright -file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyexr) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tinyexr/vcpkg.json b/ports/tinyexr/vcpkg.json new file mode 100644 index 00000000000000..a1e89b42ae93c6 --- /dev/null +++ b/ports/tinyexr/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinyexr", + "version-string": "1.0.0", + "port-version": 1, + "description": "Library to load and save OpenEXR(.exr) images", + "homepage": "https://github.com/syoyo/tinyexr" +} diff --git a/ports/tinyfiledialogs/CMakeLists.txt b/ports/tinyfiledialogs/CMakeLists.txt index 34940b79d21f4d..c4bbfd23bceafb 100644 --- a/ports/tinyfiledialogs/CMakeLists.txt +++ b/ports/tinyfiledialogs/CMakeLists.txt @@ -3,6 +3,8 @@ project(tinyfiledialogs C) add_library(tinyfiledialogs tinyfiledialogs.c) +target_include_directories(tinyfiledialogs INTERFACE $) + install( TARGETS tinyfiledialogs EXPORT tinyfiledialogsConfig @@ -23,5 +25,5 @@ export( install( EXPORT tinyfiledialogsConfig NAMESPACE tinyfiledialogs:: - DESTINATION "${CMAKE_INSTALL_PREFIX}/share/tinyfiledialogs" + DESTINATION share/tinyfiledialogs ) diff --git a/ports/tinyfiledialogs/CONTROL b/ports/tinyfiledialogs/CONTROL deleted file mode 100644 index 485cc43512e6b9..00000000000000 --- a/ports/tinyfiledialogs/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tinyfiledialogs -Version: 3.3.8 -Description: Highly portable and cross-platform dialogs for native inputbox, passwordbox, colorpicker and more diff --git a/ports/tinyfiledialogs/portfile.cmake b/ports/tinyfiledialogs/portfile.cmake index 73fd52d91893e0..10929dec1d0501 100644 --- a/ports/tinyfiledialogs/portfile.cmake +++ b/ports/tinyfiledialogs/portfile.cmake @@ -1,34 +1,31 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SHA 21998464c84ddaa9f911d8d05378d6f23a3a3671) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SHA}) - -vcpkg_download_distfile(HEADERFILE - URLS "https://sourceforge.net/p/tinyfiledialogs/code/ci/${SHA}/tree/tinyfiledialogs.h?format=raw" - FILENAME "tinyfiledialogs-h-${SHA}" - SHA512 3f15192e2e2ba674308330eca88f5f2430980b93a53389125fab4de0fce775b9a0e2a0464a3a69bd86e362715c866504e752bfea402f1072005f6da3c97316d8 -) -vcpkg_download_distfile(SOURCEFILE - URLS "https://sourceforge.net/p/tinyfiledialogs/code/ci/${SHA}/tree/tinyfiledialogs.c?format=raw" - FILENAME "tinyfiledialogs-c-${SHA}" - SHA512 b03260ba84872b3cf4eae2fed3a1770480021e3d4109f5ef243a433da48e443b7f244b105a16ce9d5655e086774d9098628e56b1559a6862fb5add547210ca58 +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + FETCH_REF master + HEAD_REF master + URL https://git.code.sf.net/p/tinyfiledialogs/code + REF e11f94cd7887b101d64f74892d769f0139b5e166 ) -configure_file(${HEADERFILE} ${SOURCE_PATH}/tinyfiledialogs.h COPYONLY) -configure_file(${SOURCEFILE} ${SOURCE_PATH}/tinyfiledialogs.c COPYONLY) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(READ ${HEADERFILE} _contents) -string(SUBSTRING "${_contents}" 0 1024 _contents) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/tinyfiledialogs/copyright "${_contents}") +file(READ "${CURRENT_PACKAGES_DIR}/include/tinyfiledialogs/tinyfiledialogs.h" _contents) +# reads between the line "- License -" and a closing "*/" +if (NOT _contents MATCHES [[- License -(([^*]|\*[^/])*)\*/]]) + message(FATAL_ERROR "Failed to parse license from tinyfiledialogs.h") +endif() +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "${CMAKE_MATCH_1}") diff --git a/ports/tinyfiledialogs/vcpkg.json b/ports/tinyfiledialogs/vcpkg.json new file mode 100644 index 00000000000000..6bc220ee0eac32 --- /dev/null +++ b/ports/tinyfiledialogs/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "tinyfiledialogs", + "version": "3.8.8", + "port-version": 3, + "description": "Highly portable and cross-platform dialogs for native inputbox, passwordbox, colorpicker and more", + "homepage": "https://sourceforge.net/projects/tinyfiledialogs/", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/tinygltf/CONTROL b/ports/tinygltf/CONTROL deleted file mode 100644 index 4baf2cf212dcf6..00000000000000 --- a/ports/tinygltf/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tinygltf -Version: 2.2.0 -Description: A header only C++11 glTF 2.0 library. -Build-Depends: stb, nlohmann-json \ No newline at end of file diff --git a/ports/tinygltf/portfile.cmake b/ports/tinygltf/portfile.cmake index f78f2b0174dfa5..fbb2d2ff9f20bf 100644 --- a/ports/tinygltf/portfile.cmake +++ b/ports/tinygltf/portfile.cmake @@ -1,17 +1,15 @@ # Header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO syoyo/tinygltf - REF v2.2.0 - SHA512 5a63fab31dd49e25fe2a32f66bbcae5a6340ced403dc51de65ee7363bb9b358e546bbecd116a53062099f90a2579a5178dcc5c4268d4b99c0afe30fac20ad7cf + REF 91da29972987bb4d715a09d94ecd2cefd3a487d4 #v2.4.2 + SHA512 bede1f995b8f6cdab04140ab284576444ddb5baa8894150ac697e53bafbe03c339c274a2b9559572751a9408b33750d86105d8d24ebccbdfbc98555e7b3a1efd HEAD_REF master ) # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinygltf/LICENSE) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinygltf/LICENSE ${CURRENT_PACKAGES_DIR}/share/tinygltf/copyright) +# Copy the tinygltf header files and fix the path to json +vcpkg_replace_string(${SOURCE_PATH}/tiny_gltf.h "#include \"json.hpp\"" "#include ") +file(INSTALL ${SOURCE_PATH}/tiny_gltf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -# Copy the tinygltf header files -file(COPY ${SOURCE_PATH}/tiny_gltf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tinygltf/vcpkg.json b/ports/tinygltf/vcpkg.json new file mode 100644 index 00000000000000..b18a092ad77a66 --- /dev/null +++ b/ports/tinygltf/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "tinygltf", + "version-string": "2020-07-28", + "port-version": 2, + "description": "A header only C++11 glTF 2.0 library.", + "homepage": "https://github.com/syoyo/tinygltf", + "dependencies": [ + "nlohmann-json", + "stb" + ] +} diff --git a/ports/tinynpy/CONTROL b/ports/tinynpy/CONTROL deleted file mode 100644 index ccef53ad8e7115..00000000000000 --- a/ports/tinynpy/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tinynpy -Version: 1.0.0-2 -Build-Depends: zlib -Description: tiny C++ loader/exporter of python numpy array NPY/NPZ files diff --git a/ports/tinynpy/portfile.cmake b/ports/tinynpy/portfile.cmake index 7daf6f7a3e17bb..283a91b1021aea 100644 --- a/ports/tinynpy/portfile.cmake +++ b/ports/tinynpy/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cdcseacave/TinyNPY - REF 721a498ebff5ba537a136c9df330158f5c85c00c - SHA512 c22382306ed7c33b147a93093cfb1217504e6dee8172b1684c0519e3b95bb3ac7ed48de7c6b6759db5187ce85301880702e28e08f149f369dbc630e5b646a06a + REF 0a11001009cc3e8f3c95c61b92c0ce1bd52d5383 + SHA512 a5fe962e433896a5c7363808e87fca1297c98496cf6b6fd98154f4f4bc113ea213e281ebcdbceadf47fc573b6d707097f3a06cc58bf26351ebf7f935954d79c0 HEAD_REF master ) diff --git a/ports/tinynpy/vcpkg.json b/ports/tinynpy/vcpkg.json new file mode 100644 index 00000000000000..438863c4741bab --- /dev/null +++ b/ports/tinynpy/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "tinynpy", + "version-string": "1.0.0", + "port-version": 4, + "description": "tiny C++ loader/exporter of python numpy array NPY/NPZ files", + "dependencies": [ + "zlib" + ] +} diff --git a/ports/tinyobjloader/CONTROL b/ports/tinyobjloader/CONTROL deleted file mode 100644 index 4dc5eebb27ffa0..00000000000000 --- a/ports/tinyobjloader/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tinyobjloader -Version: 1.0.7-1 -Description: Tiny but powerful single file wavefront obj loader diff --git a/ports/tinyobjloader/portfile.cmake b/ports/tinyobjloader/portfile.cmake index 7b8741d346aec2..86f76edb04d083 100644 --- a/ports/tinyobjloader/portfile.cmake +++ b/ports/tinyobjloader/portfile.cmake @@ -1,20 +1,24 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO syoyo/tinyobjloader - REF v1.0.7 - SHA512 e88554ead20354da443489e1b6576b328e92b2e6665071df9b6473b38c34c036dbffb6655330e970c01ccf7f99bbd4f9f5418ce48a14239576ec5e0513256637 + REF v2.0.0-rc2 + SHA512 936f7897a87fe00d474231ad5f69816da127f14296c3591144c26c6058bd11ea1490c2db6b8c4a8adf629ae148423705d0c4020f4ed034921f0f2f711498f3bb HEAD_REF master ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + double TINYOBJLOADER_USE_DOUBLE +) + vcpkg_configure_cmake( SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA OPTIONS -DCMAKE_INSTALL_DOCDIR:STRING=share/tinyobjloader + # FEATURES + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() diff --git a/ports/tinyobjloader/vcpkg.json b/ports/tinyobjloader/vcpkg.json new file mode 100644 index 00000000000000..45ed27c108b4ea --- /dev/null +++ b/ports/tinyobjloader/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "tinyobjloader", + "version-string": "2.0.0-rc2", + "port-version": 1, + "description": "Tiny but powerful single file wavefront obj loader", + "features": { + "double": { + "description": "enable double(64bit) precision" + } + } +} diff --git a/ports/tinyply/fix-cmake.patch b/ports/tinyply/fix-cmake.patch new file mode 100644 index 00000000000000..681e30f1fc847d --- /dev/null +++ b/ports/tinyply/fix-cmake.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2bd9563..4d4d9fe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -50,6 +50,8 @@ set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") + set(targets_export_name "${PROJECT_NAME}Targets") + set(namespace "") + ++include(GNUInstallDirs) ++ + write_basic_package_version_file( + "${version_config}" + VERSION ${PROJECT_VERSION} +@@ -63,9 +65,10 @@ configure_package_config_file( + + # Install + install(TARGETS tinyply EXPORT ${targets_export_name} +- RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib +- LIBRARY DESTINATION lib) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(FILES source/tinyply.h + DESTINATION include) + diff --git a/ports/tinyply/portfile.cmake b/ports/tinyply/portfile.cmake new file mode 100644 index 00000000000000..a5e93530c9d1df --- /dev/null +++ b/ports/tinyply/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ddiakopoulos/tinyply + REF ca7b279fb6c9af931ffdaed96a3b11ca3ccd79ea + SHA512 d3adfe7cce849a14fd473cfd67baef0163d4e45ff32724516270d5893a18086f7ac17d87bda5c33381442766849b41516bd2c7757e97038c95af0c70d5f0edde + HEAD_REF master + PATCHES + # TODO: Remove this patch if https://github.com/ddiakopoulos/tinyply/pull/41 was accepted. + fix-cmake.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIB) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSHARED_LIB=${SHARED_LIB} + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License +file(READ "${SOURCE_PATH}/readme.md" readme_contents) +string(FIND "${readme_contents}" "License" license_line_pos) +string(SUBSTRING "${readme_contents}" ${license_line_pos} -1 license_contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${license_contents}") diff --git a/ports/tinyply/vcpkg.json b/ports/tinyply/vcpkg.json new file mode 100644 index 00000000000000..5cf3b739825e59 --- /dev/null +++ b/ports/tinyply/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinyply", + "version-string": "2020-05-22", + "port-version": 1, + "description": "C++11 ply 3d mesh format importer & exporter", + "homepage": "https://github.com/ddiakopoulos/tinyply" +} diff --git a/ports/tinyspline/CONTROL b/ports/tinyspline/CONTROL deleted file mode 100644 index f1f4739c9d81e4..00000000000000 --- a/ports/tinyspline/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tinyspline -Version: 0.2.0-3 -Description: Library for NURBS, B-Splines, and B?zier curves, allowing you to handle splines with ease diff --git a/ports/tinyspline/portfile.cmake b/ports/tinyspline/portfile.cmake index 5d202b7ca9527b..a62d2f42c4427e 100644 --- a/ports/tinyspline/portfile.cmake +++ b/ports/tinyspline/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO msteinbeck/tinyspline diff --git a/ports/tinyspline/vcpkg.json b/ports/tinyspline/vcpkg.json new file mode 100644 index 00000000000000..bd01f70b978f85 --- /dev/null +++ b/ports/tinyspline/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tinyspline", + "version-string": "0.2.0", + "port-version": 4, + "description": "Library for NURBS, B-Splines, and B?zier curves, allowing you to handle splines with ease" +} diff --git a/ports/tinythread/CONTROL b/ports/tinythread/CONTROL deleted file mode 100644 index c837708ce713d7..00000000000000 --- a/ports/tinythread/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tinythread -Version: 1.1-2 -Homepage: https://tinythreadpp.bitsnbites.eu/ -Description: Implements a fairly compatible subset of the C++11 thread management classes diff --git a/ports/tinythread/portfile.cmake b/ports/tinythread/portfile.cmake index 550a192bc4fe81..7b29ab146d918b 100644 --- a/ports/tinythread/portfile.cmake +++ b/ports/tinythread/portfile.cmake @@ -1,17 +1,17 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/TinyThread++-1.1") vcpkg_download_distfile(ARCHIVE URLS "http://tinythreadpp.bitsnbites.eu/files/TinyThread%2B%2B-1.1-src.tar.bz2" FILENAME "TinyThread++-1.1.tar.bz2" SHA512 407f54fcf3f68dd7fec25e9e0749a1803dffa5d52d606905155714d29f519b5eae64ff654b11768fecc32c0123a78c48be37c47993e0caf157a63349a2f869c6 ) -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH +) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/tinythread/vcpkg.json b/ports/tinythread/vcpkg.json new file mode 100644 index 00000000000000..3e45f68b012591 --- /dev/null +++ b/ports/tinythread/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinythread", + "version-string": "1.1", + "port-version": 4, + "description": "Implements a fairly compatible subset of the C++11 thread management classes", + "homepage": "https://tinythreadpp.bitsnbites.eu/" +} diff --git a/ports/tinytoml/CONTROL b/ports/tinytoml/CONTROL deleted file mode 100644 index ba262920f9dd73..00000000000000 --- a/ports/tinytoml/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tinytoml -Version: 20180219-1 -Homepage: https://github.com/mayah/tinytoml -Description: A header only C++11 library for parsing TOML. diff --git a/ports/tinytoml/portfile.cmake b/ports/tinytoml/portfile.cmake index 9d7275cf24310f..6f3af53f486401 100644 --- a/ports/tinytoml/portfile.cmake +++ b/ports/tinytoml/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mayah/tinytoml diff --git a/ports/tinytoml/vcpkg.json b/ports/tinytoml/vcpkg.json new file mode 100644 index 00000000000000..f7a894c86e93ea --- /dev/null +++ b/ports/tinytoml/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinytoml", + "version-string": "20180219", + "port-version": 2, + "description": "A header only C++11 library for parsing TOML.", + "homepage": "https://github.com/mayah/tinytoml" +} diff --git a/ports/tinyutf8/CONTROL b/ports/tinyutf8/CONTROL deleted file mode 100644 index 107d4bd66e3101..00000000000000 --- a/ports/tinyutf8/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tinyutf8 -Version: 3 -Description: TINYUTF8 is a library for extremely easy integration of Unicode into an arbitrary C++11 project. diff --git a/ports/tinyutf8/fixbuild.patch b/ports/tinyutf8/fixbuild.patch index c1798ada1948cf..a2008089dfc01b 100644 --- a/ports/tinyutf8/fixbuild.patch +++ b/ports/tinyutf8/fixbuild.patch @@ -1,29 +1,43 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4ec8787..cfea5b3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,7 +1,7 @@ - cmake_minimum_required(VERSION 3.1) - project(tinyutf8) - --set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD 17) - - option(TINYUTF8_BUILD_STATIC "Build as static library" On) - -@@ -14,3 +14,14 @@ endif() - add_library(tinyutf8 ${LIB_BUILD_TYPE} lib/tinyutf8.cpp) - - target_include_directories(tinyutf8 PUBLIC include) -+ -+if(MSVC) -+ ADD_DEFINITIONS(-D_UNICODE) -+endif() -+ -+install(TARGETS tinyutf8 -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib) -+ -+install(FILES include/tinyutf8.h DESTINATION include) -\ No newline at end of file +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eef0c41..5d2c0d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,7 @@ + cmake_minimum_required(VERSION 3.1) + project(tinyutf8) + +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 17) + + option(TINYUTF8_BUILD_STATIC "Build as static library" On) + +@@ -12,3 +12,14 @@ else() + endif() + + add_library(tinyutf8 ${LIB_BUILD_TYPE} tinyutf8.cpp) ++ ++if(MSVC) ++ ADD_DEFINITIONS(-D_UNICODE) ++endif() ++ ++install(TARGETS tinyutf8 ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ ++install(FILES tinyutf8.h DESTINATION include) +diff --git a/tinyutf8.cpp b/tinyutf8.cpp +index ca07b1e..502312f 100644 +--- a/tinyutf8.cpp ++++ b/tinyutf8.cpp +@@ -1,6 +1,6 @@ + #include "tinyutf8.h" + + // Explicit template instantiations for utf8_string +-template struct tiny_utf8::basic_utf8_string<>; +-template extern std::ostream& operator<<( std::ostream& stream , const tiny_utf8::basic_utf8_string<>& str ); +-template extern std::istream& operator>>( std::istream& stream , tiny_utf8::basic_utf8_string<>& str ); +\ No newline at end of file ++template class tiny_utf8::basic_utf8_string<>; ++extern template std::ostream& operator<<( std::ostream& stream , const tiny_utf8::basic_utf8_string<>& str ); ++extern template std::istream& operator>>( std::istream& stream , tiny_utf8::basic_utf8_string<>& str ); diff --git a/ports/tinyutf8/portfile.cmake b/ports/tinyutf8/portfile.cmake index 5444310cea08bf..2dad4fbaa532d9 100644 --- a/ports/tinyutf8/portfile.cmake +++ b/ports/tinyutf8/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DuffsDevice/tinyutf8 - REF v3 - SHA512 a11e7e7728afec7b2d9b6ed58ca20f29ca71823854a42b99b622e42b42389290f49ce7dd3bb6c5596e15fa369266a47364887bb253643440882d31f7689affec + REF 68eaf247a3761c324b1a3806a954d773dfe9106b + SHA512 e8bd51ea66a84d236be7c2028b6f3a67b5b01f0fac758729f3152542c8a6a859ddb3f72d6c5abb058c909bf84862ed816e2235cfde6bfa7edaa8026a4f7f4b2a HEAD_REF master PATCHES fixbuild.patch ) diff --git a/ports/tinyutf8/vcpkg.json b/ports/tinyutf8/vcpkg.json new file mode 100644 index 00000000000000..008757cdd91ba7 --- /dev/null +++ b/ports/tinyutf8/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tinyutf8", + "version-string": "4.0.2", + "port-version": 1, + "description": "TINYUTF8 is a library for extremely easy integration of Unicode into an arbitrary C++11 project." +} diff --git a/ports/tinyxml/CMakeLists.txt b/ports/tinyxml/CMakeLists.txt index b849c07f9ce9df..2004da4af71acd 100644 --- a/ports/tinyxml/CMakeLists.txt +++ b/ports/tinyxml/CMakeLists.txt @@ -10,20 +10,31 @@ set(SOURCES "tinyxml.cpp" option(BUILD_SHARED_LIBS "Build shared libs" OFF) -add_library(tinyxml ${SOURCES}) -target_compile_definitions(tinyxml PRIVATE "-DTIXML_USE_STL") +add_library(unofficial-tinyxml ${SOURCES}) +target_compile_definitions(unofficial-tinyxml PRIVATE "-DTIXML_USE_STL") +set_target_properties(unofficial-tinyxml PROPERTIES OUTPUT_NAME tinyxml) include(GenerateExportHeader) -generate_export_header(tinyxml) +generate_export_header(unofficial-tinyxml BASE_NAME tinyxml) -target_include_directories(tinyxml PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) - -install( - TARGETS tinyxml +target_include_directories(unofficial-tinyxml + PUBLIC + $ + $ +) +install(TARGETS unofficial-tinyxml + EXPORT tinyxml-export ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) - +install(EXPORT tinyxml-export +FILE + tinyxmlTargets.cmake +NAMESPACE + unofficial-tinyxml:: +DESTINATION + share/tinyxml +) install(FILES ${HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/tinyxml_export.h DESTINATION include) diff --git a/ports/tinyxml/CONTROL b/ports/tinyxml/CONTROL deleted file mode 100644 index 749dc2e7e686ac..00000000000000 --- a/ports/tinyxml/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tinyxml -Version: 2.6.2-4 -Homepage: https://sourceforge.net/projects/tinyxml -Description: A simple, small, minimal, C++ XML parser that can be easily integrating into other programs. diff --git a/ports/tinyxml/portfile.cmake b/ports/tinyxml/portfile.cmake index b43526efa4714f..1f42e4d75c6cbd 100644 --- a/ports/tinyxml/portfile.cmake +++ b/ports/tinyxml/portfile.cmake @@ -1,17 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz" - FILENAME "tinyxml_2_6_2.tar.gz" - SHA512 133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56 -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + REPO tinyxml/tinyxml REF 2.6.2 + FILENAME "tinyxml_2_6_2.tar.gz" + SHA512 133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56 PATCHES 0001_use_stl.patch 0002_export_tinyxml.patch @@ -26,8 +20,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() - +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml RENAME copyright) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/tinyxml-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml) diff --git a/ports/tinyxml/tinyxml-config.cmake b/ports/tinyxml/tinyxml-config.cmake index 1bdc5ad7f32f2a..15ad7bdc5d6a82 100644 --- a/ports/tinyxml/tinyxml-config.cmake +++ b/ports/tinyxml/tinyxml-config.cmake @@ -3,17 +3,6 @@ if (tinyxml_CONFIG_INCLUDED) endif() set(tinyxml_CONFIG_INCLUDED TRUE) -set(tinyxml_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include") - -foreach(lib tinyxml) - set(onelib "${lib}-NOTFOUND") - find_library(onelib ${lib} - PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib" - NO_DEFAULT_PATH - ) - if(NOT onelib) - message(FATAL_ERROR "Library '${lib}' in package tinyxml is not installed properly") - endif() - list(APPEND tinyxml_LIBRARIES ${onelib}) -endforeach() - +include(${CMAKE_CURRENT_LIST_DIR}/tinyxmlTargets.cmake) +set(tinyxml_LIBRARIES unofficial-tinyxml::unofficial-tinyxml) +get_target_property(tinyxml_INCLUDE_DIRS unofficial-tinyxml::unofficial-tinyxml INTERFACE_INCLUDE_DIRECTORIES) \ No newline at end of file diff --git a/ports/tinyxml/vcpkg.json b/ports/tinyxml/vcpkg.json new file mode 100644 index 00000000000000..8ee2d5d2dd0047 --- /dev/null +++ b/ports/tinyxml/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinyxml", + "version-string": "2.6.2", + "port-version": 8, + "description": "A simple, small, minimal, C++ XML parser that can be easily integrating into other programs.", + "homepage": "https://sourceforge.net/projects/tinyxml" +} diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL deleted file mode 100644 index c0016a412f057b..00000000000000 --- a/ports/tinyxml2/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: tinyxml2 -Version: 7.0.1-2 -Homepage: https://github.com/leethomason/tinyxml2 -Description: A simple, small, efficient, C++ XML parser - diff --git a/ports/tinyxml2/fix-debug-postfix.patch b/ports/tinyxml2/fix-debug-postfix.patch new file mode 100644 index 00000000000000..8021e0f633ee85 --- /dev/null +++ b/ports/tinyxml2/fix-debug-postfix.patch @@ -0,0 +1,43 @@ +From 1e384d50313a08dd36a43df1925588741dc33301 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= +Date: Wed, 17 Jun 2020 06:17:06 +0200 +Subject: [PATCH] Fix debug postfix in pkgconfig file + +CMakeLists.txt uses set(CMAKE_DEBUG_POSTFIX "d") to distinguish +between debug and release lib. Use this postfix also in the +generated tinyxml2.pc file in case of a CMake Debug build. +This results in the following contents of tinyxml2.pc +- Release: + Libs: -L${libdir} -ltinyxml2 +- Debug: + Libs: -L${libdir} -ltinyxml2d +--- + CMakeLists.txt | 3 +++ + tinyxml2.pc.in | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9f9ab07..7085276 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,6 +106,9 @@ endif() + + install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT tinyxml2_headers) + ++if(CMAKE_BUILD_TYPE MATCHES Debug) ++ set(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX}) ++endif() + configure_file(tinyxml2.pc.in tinyxml2.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT tinyxml2_config) + +diff --git a/tinyxml2.pc.in b/tinyxml2.pc.in +index b040b0e..b100f60 100644 +--- a/tinyxml2.pc.in ++++ b/tinyxml2.pc.in +@@ -6,5 +6,5 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + Name: TinyXML2 + Description: simple, small, C++ XML parser + Version: @GENERIC_LIB_VERSION@ +-Libs: -L${libdir} -ltinyxml2 ++Libs: -L${libdir} -ltinyxml2@LIB_POSTFIX@ + Cflags: -I${includedir} diff --git a/ports/tinyxml2/fix-symbol-exports.patch b/ports/tinyxml2/fix-symbol-exports.patch new file mode 100644 index 00000000000000..7108d054064e6a --- /dev/null +++ b/ports/tinyxml2/fix-symbol-exports.patch @@ -0,0 +1,36 @@ +From f8b048656b9937252ce5fb4ebea9e5df5b203bdb Mon Sep 17 00:00:00 2001 +From: Owen Rudge +Date: Wed, 27 May 2020 09:40:59 +0100 +Subject: [PATCH] cmake: Don't export symbols if building static library + +--- + CMakeLists.txt | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9f9ab07..67b4f33 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -50,10 +50,16 @@ set(CMAKE_DEBUG_POSTFIX "d") + + add_library(tinyxml2 tinyxml2.cpp tinyxml2.h) + +-set_target_properties(tinyxml2 PROPERTIES ++if(BUILD_SHARED_LIBS) ++ set_target_properties(tinyxml2 PROPERTIES + COMPILE_DEFINITIONS "TINYXML2_EXPORT" +- VERSION "${GENERIC_LIB_VERSION}" +- SOVERSION "${GENERIC_LIB_SOVERSION}") ++ VERSION "${GENERIC_LIB_VERSION}" ++ SOVERSION "${GENERIC_LIB_SOVERSION}") ++else() ++ set_target_properties(tinyxml2 PROPERTIES ++ VERSION "${GENERIC_LIB_VERSION}" ++ SOVERSION "${GENERIC_LIB_SOVERSION}") ++endif() + + target_compile_definitions(tinyxml2 PUBLIC $<$:TINYXML2_DEBUG>) + +-- +2.25.1.windows.1 + diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index b98e45a5a45917..d4fb1c3f97f260 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -1,11 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO leethomason/tinyxml2 - REF 7.0.1 - SHA512 623cd7eff542d20b434a67111ac98110101c95a18767318bf906e5e56d8cc25622269f740f50477fe907a4c52d875b614cb6167f4760d42ab18dc55b9d4bf380 + REF 8.0.0 + SHA512 bcbb065c2af34ea681ec556377fd22e720b6f5d4caa73f432b1e34e08603a96f2233763f0ec5ae86b9ee71ddbe3062f58d3794cd3a162ce6903435530de0bba6 HEAD_REF master + PATCHES + fix-symbol-exports.patch + fix-debug-postfix.patch ) vcpkg_configure_cmake( @@ -16,14 +17,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/tinyxml2) +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY - ${SOURCE_PATH}/readme.md - DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2 -) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyxml2/readme.md ${CURRENT_PACKAGES_DIR}/share/tinyxml2/copyright) +file(INSTALL ${SOURCE_PATH}/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tinyxml2/vcpkg.json b/ports/tinyxml2/vcpkg.json new file mode 100644 index 00000000000000..83d8b3fc3782d3 --- /dev/null +++ b/ports/tinyxml2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinyxml2", + "version-string": "8.0.0", + "port-version": 2, + "description": "A simple, small, efficient, C++ XML parser", + "homepage": "https://github.com/leethomason/tinyxml2" +} diff --git a/ports/tl-expected/CONTROL b/ports/tl-expected/CONTROL deleted file mode 100644 index b07479595c910d..00000000000000 --- a/ports/tl-expected/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tl-expected -Version: 1.0.0-1 -Description: C++11/14/17 std::expected implementation with functional-style extensions diff --git a/ports/tl-expected/portfile.cmake b/ports/tl-expected/portfile.cmake index 80ec7e89bf3991..1c99d0741558cc 100644 --- a/ports/tl-expected/portfile.cmake +++ b/ports/tl-expected/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO TartanLlama/expected diff --git a/ports/tl-expected/vcpkg.json b/ports/tl-expected/vcpkg.json new file mode 100644 index 00000000000000..1f27474b5310fe --- /dev/null +++ b/ports/tl-expected/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tl-expected", + "version-string": "1.0.0", + "port-version": 2, + "description": "C++11/14/17 std::expected implementation with functional-style extensions" +} diff --git a/ports/tl-function-ref/CONTROL b/ports/tl-function-ref/CONTROL deleted file mode 100644 index be89f774177183..00000000000000 --- a/ports/tl-function-ref/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tl-function-ref -Version: 1.0.0-1 -Description: A lightweight, non-owning reference to a callable. \ No newline at end of file diff --git a/ports/tl-function-ref/portfile.cmake b/ports/tl-function-ref/portfile.cmake index 07df6a048a8118..ea5274796c55ab 100644 --- a/ports/tl-function-ref/portfile.cmake +++ b/ports/tl-function-ref/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO TartanLlama/function_ref diff --git a/ports/tl-function-ref/vcpkg.json b/ports/tl-function-ref/vcpkg.json new file mode 100644 index 00000000000000..e8cf323a4ba1c1 --- /dev/null +++ b/ports/tl-function-ref/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tl-function-ref", + "version-string": "1.0.0", + "port-version": 2, + "description": "A lightweight, non-owning reference to a callable." +} diff --git a/ports/tl-optional/CONTROL b/ports/tl-optional/CONTROL deleted file mode 100644 index 5464d80542df2d..00000000000000 --- a/ports/tl-optional/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tl-optional -Version: 1.0.0-1 -Description: C++11/14/17 std::optional implementation with functional-style extensions diff --git a/ports/tl-optional/portfile.cmake b/ports/tl-optional/portfile.cmake index 3c3085cc93edb3..bbd80307d42b4b 100644 --- a/ports/tl-optional/portfile.cmake +++ b/ports/tl-optional/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO TartanLlama/optional diff --git a/ports/tl-optional/vcpkg.json b/ports/tl-optional/vcpkg.json new file mode 100644 index 00000000000000..4dc6d13b75e548 --- /dev/null +++ b/ports/tl-optional/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tl-optional", + "version-string": "1.0.0", + "port-version": 2, + "description": "C++11/14/17 std::optional implementation with functional-style extensions" +} diff --git a/ports/tlx/portfile.cmake b/ports/tlx/portfile.cmake new file mode 100644 index 00000000000000..525894d28041b9 --- /dev/null +++ b/ports/tlx/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +# TODO: Fix .dlls not producing .lib files + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tlx/tlx + REF 903b9b35df8731496a90d8d74f8bedbad2517d9b + SHA512 17087973f2f4751538c589e9f80d2b5ea872d2e7d90659769ae3350d441bda0b64aec9a4150d01a7cf5323ce327ebd104cdca7b4a3bc4eebdf574e71e013ba6e + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVERBOSE=1 + -DTLX_BUILD_TESTS=off + -DTLX_USE_GCOV=off + -DTLX_TRY_COMPILE_HEADERS=off + -DTLX_MORE_TESTS=off + -DTLX_BUILD_STATIC_LIBS=${BUILD_STATIC} + -DTLX_BUILD_SHARED_LIBS=${BUILD_SHARED} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake/") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tlx") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tlx/vcpkg.json b/ports/tlx/vcpkg.json new file mode 100644 index 00000000000000..072971f8f65a55 --- /dev/null +++ b/ports/tlx/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tlx", + "version-string": "0.5.20191212", + "port-version": 1, + "description": "tlx is a collection of C++ helpers and extensions universally needed, but not found in the STL", + "homepage": "https://github.com/tlx/tlx" +} diff --git a/ports/tmx/CONTROL b/ports/tmx/CONTROL deleted file mode 100644 index 6f55421cca9ad6..00000000000000 --- a/ports/tmx/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tmx -Version: 1.0.0-1 -Description: A portable C library to load tiled maps in your games. -Build-Depends: zlib, libxml2 diff --git a/ports/tmx/portfile.cmake b/ports/tmx/portfile.cmake index 4faec9b9d16421..4a3801b8a0f798 100644 --- a/ports/tmx/portfile.cmake +++ b/ports/tmx/portfile.cmake @@ -1,11 +1,9 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO baylej/tmx - REF tmx_1.0.0 + REF tmx_1.1.0 HEAD_REF master - SHA512 d045c45efd03f91a81dae471cb9ddc80d222b3ac52e13b729deeaf3e07d0a03b8e0956b30336ef410c72ddbbf33bea6811da5454b88d44b1db75683ef2a9383a + SHA512 4f57cea30cf01518812cb7279e4d09fd3524e02a29950c2a40aed07ed0f5bd44601517d8a6216a3ca878e1d6bfa15651e92b9e8024e0325baae1dadc7a79acd1 ) vcpkg_configure_cmake( @@ -26,4 +24,4 @@ file(REMOVE_RECURSE ) # Handle copyright -configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/tmx/copyright COPYONLY) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/tmx/vcpkg.json b/ports/tmx/vcpkg.json new file mode 100644 index 00000000000000..bad3ca97e2ea1d --- /dev/null +++ b/ports/tmx/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "tmx", + "version-string": "1.1.0", + "port-version": 1, + "description": "A portable C library to load tiled maps in your games.", + "dependencies": [ + "libxml2", + "zlib" + ] +} diff --git a/ports/tmxlite/CONTROL b/ports/tmxlite/CONTROL deleted file mode 100644 index eb3cfdd55c0330..00000000000000 --- a/ports/tmxlite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tmxlite -Version: 2019-03-05 -Description: A lightweight C++14 parsing library for tmx map files created with the Tiled map editor. \ No newline at end of file diff --git a/ports/tmxlite/portfile.cmake b/ports/tmxlite/portfile.cmake index 14f1234f4bba78..6c0dda980e0abb 100644 --- a/ports/tmxlite/portfile.cmake +++ b/ports/tmxlite/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fallahn/tmxlite diff --git a/ports/tmxlite/vcpkg.json b/ports/tmxlite/vcpkg.json new file mode 100644 index 00000000000000..0b710f19d4c063 --- /dev/null +++ b/ports/tmxlite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tmxlite", + "version-string": "2019-03-05", + "port-version": 1, + "description": "A lightweight C++14 parsing library for tmx map files created with the Tiled map editor." +} diff --git a/ports/tmxparser/CONTROL b/ports/tmxparser/CONTROL deleted file mode 100644 index 7a3e3e2f803714..00000000000000 --- a/ports/tmxparser/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tmxparser -Version: 2.1.0-2 -Description: C++11 library for parsing the maps generated by the Map Editor called Tiled. -Build-Depends: zlib, tinyxml2 diff --git a/ports/tmxparser/fix_include_paths.patch b/ports/tmxparser/fix_include_paths.patch new file mode 100644 index 00000000000000..fedcb43bc55b25 --- /dev/null +++ b/ports/tmxparser/fix_include_paths.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d06cb4..593bbfd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,6 +43,8 @@ endif (NOT USE_MINIZ) + + set(EXAMPLE_CFLAGS "-std=c++11 -pedantic -Werror -Wall -g") + #include_directories("${PROJECT_SOURCE_DIR}/include") ++include_directories("${PROJECT_BINARY_DIR}") ++include_directories("${PROJECT_SOURCE_DIR}/src") + + add_library(tmxparser_static STATIC ${SOURCES} ${HEADERS}) + set_target_properties(tmxparser_static PROPERTIES +@@ -67,8 +69,6 @@ add_executable(run_tests test/test.cpp) + set_target_properties(run_tests PROPERTIES + COMPILE_FLAGS ${EXAMPLE_CFLAGS}) + target_link_libraries(run_tests tmxparser ${TINYXML2_LIBRARIES}) +-include_directories("${PROJECT_BINARY_DIR}") +-include_directories("${PROJECT_SOURCE_DIR}/src") + + install(FILES ${HEADERS} DESTINATION include/tmxparser) + install(TARGETS tmxparser tmxparser_static DESTINATION lib) diff --git a/ports/tmxparser/portfile.cmake b/ports/tmxparser/portfile.cmake index ffe58c89f913ba..1f1b9e28616144 100644 --- a/ports/tmxparser/portfile.cmake +++ b/ports/tmxparser/portfile.cmake @@ -1,11 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sainteos/tmxparser REF v2.1.0 HEAD_REF master SHA512 011cce3bb98057f8e2a0a82863fedb7c4b9e41324d5cfa6daade4d000c3f6c8c157da7b153f7f2564ecdefe8019fc8446c9b1b8a675be04329b04a0891ee1c27 + PATCHES + fix_include_paths.patch ) vcpkg_configure_cmake( @@ -34,4 +34,4 @@ else() endif() # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/tmxparser/copyright COPYONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tmxparser/vcpkg.json b/ports/tmxparser/vcpkg.json new file mode 100644 index 00000000000000..769ae662bc8c95 --- /dev/null +++ b/ports/tmxparser/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "tmxparser", + "version-string": "2.1.0", + "port-version": 5, + "description": "C++11 library for parsing the maps generated by the Map Editor called Tiled.", + "dependencies": [ + "tinyxml2", + "zlib" + ] +} diff --git a/ports/toml11/portfile.cmake b/ports/toml11/portfile.cmake new file mode 100644 index 00000000000000..46e042e2a4b26b --- /dev/null +++ b/ports/toml11/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ToruNiina/toml11 + REF v3.5.0 + SHA512 19c6ee42aa1e186689062e5d2be05f375c8ae4be40be4b6a8e803a642f37214270d5600ccec3d06b4e69aec6896d823e3a8faea29a41643279922d1fe9fae70a + HEAD_REF master +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -Dtoml11_BUILD_TEST=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/toml11 TARGET_PATH share/toml11) + +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/toml11/toml11Config.cmake + "\${PACKAGE_PREFIX_DIR}/lib/cmake/toml11/toml11Targets.cmake" + "\${PACKAGE_PREFIX_DIR}/share/toml11/toml11Targets.cmake" +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) \ No newline at end of file diff --git a/ports/toml11/vcpkg.json b/ports/toml11/vcpkg.json new file mode 100644 index 00000000000000..b6577aafd4e71e --- /dev/null +++ b/ports/toml11/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "toml11", + "version-string": "3.5.0", + "port-version": 2, + "description": "A C++11 header-only toml parser/encoder depending only on C++ standard library.", + "homepage": "https://github.com/ToruNiina/toml11" +} diff --git a/ports/tomlplusplus/portfile.cmake b/ports/tomlplusplus/portfile.cmake new file mode 100644 index 00000000000000..406224e8df632d --- /dev/null +++ b/ports/tomlplusplus/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "osx" "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO marzer/tomlplusplus + REF v2.5.0 + SHA512 7394cda2009b37e88f9028ee5d1887120bed7042833c7cb218d7705cdc92273c81a84163ff0be034d3f23c8dd93e63b7615134a4b0e1c580e1e945fae45c7d35 + HEAD_REF master +) + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Dgenerate_cmake_config=true + -Dbuild_tests=false + -Dbuild_examples=false +) + +vcpkg_install_meson() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" + "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tomlplusplus/vcpkg.json b/ports/tomlplusplus/vcpkg.json new file mode 100644 index 00000000000000..08d6aeb2908b15 --- /dev/null +++ b/ports/tomlplusplus/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tomlplusplus", + "version": "2.5.0", + "description": "Header-only TOML config file parser and serializer for modern C++.", + "homepage": "https://marzer.github.io/tomlplusplus/", + "supports": "!(arm | uwp | osx)" +} diff --git a/ports/tool-meson/portfile.cmake b/ports/tool-meson/portfile.cmake new file mode 100644 index 00000000000000..c39e614071f42d --- /dev/null +++ b/ports/tool-meson/portfile.cmake @@ -0,0 +1,7 @@ +# This port represents a dependency on the Meson build system. +# In the future, it is expected that this port acquires and installs Meson. +# Currently is used in ports that call vcpkg_find_acquire_program(MESON) in order to force rebuilds. + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +vcpkg_find_acquire_program(MESON) +message(STATUS "Using meson: ${MESON}") \ No newline at end of file diff --git a/ports/tool-meson/vcpkg.json b/ports/tool-meson/vcpkg.json new file mode 100644 index 00000000000000..936b5d6c54ab48 --- /dev/null +++ b/ports/tool-meson/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tool-meson", + "version": "0.58.1", + "description": "Meson build system", + "homepage": "https://github.com/mesonbuild/meson" +} diff --git a/ports/torch-th/CONTROL b/ports/torch-th/CONTROL deleted file mode 100644 index 1ffe36b0a5b80a..00000000000000 --- a/ports/torch-th/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: torch-th -Version: 2019-04-19-1 -Homepage: https://github.com/torch/torch7 -Description: Torch's TH library diff --git a/ports/torch-th/portfile.cmake b/ports/torch-th/portfile.cmake index 2b653da221504d..7fd23944b5eb90 100644 --- a/ports/torch-th/portfile.cmake +++ b/ports/torch-th/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) vcpkg_from_github( @@ -8,11 +6,8 @@ vcpkg_from_github( REF dde9e56fb61eee040d7f3dba2331c6d6c095aee8 SHA512 ef813e6f583f26019da362be1e5d9886ecf3306a2b41e5f7a73d432872eacd2745e0cf26bfcc691452f87611e02e302c54f07b2f3a3288744535e57d154a73db HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/debug.patch" + PATCHES + debug.patch ) vcpkg_configure_cmake( diff --git a/ports/torch-th/vcpkg.json b/ports/torch-th/vcpkg.json new file mode 100644 index 00000000000000..81f500f820fe71 --- /dev/null +++ b/ports/torch-th/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "torch-th", + "version-string": "2019-04-19", + "port-version": 3, + "description": "Torch's TH library", + "homepage": "https://github.com/torch/torch7" +} diff --git a/ports/transwarp/portfile.cmake b/ports/transwarp/portfile.cmake new file mode 100644 index 00000000000000..1535c08294a5b2 --- /dev/null +++ b/ports/transwarp/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bloomen/transwarp + REF 2.2.2 + SHA512 32e5dce698bff565f98ac73e7a4213858f5024003f01d798a6f7eb99289f192dd56b45c975c0e42be36e28e0b828c9810f5d27e62312649606b78ec93e4afae4 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/transwarp/vcpkg.json b/ports/transwarp/vcpkg.json new file mode 100644 index 00000000000000..de9a2a114d908e --- /dev/null +++ b/ports/transwarp/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "transwarp", + "version": "2.2.2", + "description": "A header-only C++ library for task concurrency", + "homepage": "https://github.com/bloomen/transwarp", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/trantor/portfile.cmake b/ports/trantor/portfile.cmake new file mode 100644 index 00000000000000..95ef049c54fb82 --- /dev/null +++ b/ports/trantor/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO an-tao/trantor + REF v1.5.1 + SHA512 9f6664abc94943598805192ee09a98340e6e20efb15e448aac5e21480f1798b0991782d18766f5ef54399251d4980c2f68aeda3136c7e058e3c31623c8f7ce3f + HEAD_REF master + PATCHES + vcpkg.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() + +# Fix CMake files +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Trantor) + +vcpkg_fixup_pkgconfig() + +# # Remove includes in debug +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +# Handle copyright +file(INSTALL "${SOURCE_PATH}/License" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +# Copy pdb files +vcpkg_copy_pdbs() diff --git a/ports/trantor/vcpkg.json b/ports/trantor/vcpkg.json new file mode 100644 index 00000000000000..122efa0a7c72c1 --- /dev/null +++ b/ports/trantor/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "trantor", + "version-semver": "1.5.1", + "description": "A non-blocking I/O cross-platform TCP network library, using C++14", + "homepage": "https://github.com/an-tao/trantor", + "dependencies": [ + "c-ares", + "openssl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/trantor/vcpkg.patch b/ports/trantor/vcpkg.patch new file mode 100644 index 00000000000000..5e484c8568f7ca --- /dev/null +++ b/ports/trantor/vcpkg.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad5a1b3..7d59844 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,6 +133,9 @@ if(c-ares_FOUND) + set(private_headers + ${private_headers} + trantor/net/inner/AresResolver.h) ++ if(APPLE) ++ target_link_libraries(${PROJECT_NAME} PRIVATE resolv) ++ endif() + else(c-ares_FOUND) + set(TRANTOR_SOURCES + ${TRANTOR_SOURCES} diff --git a/ports/tre/CONTROL b/ports/tre/CONTROL deleted file mode 100644 index 70a5ce003fd175..00000000000000 --- a/ports/tre/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: tre -Version: 0.8.0-1 -Homepage: https://github.com/laurikari/tre -Description: TRE is a lightweight, robust, and efficient POSIX compliant regexp matching library with some exciting features such as approximate (fuzzy) matching. diff --git a/ports/tre/portfile.cmake b/ports/tre/portfile.cmake index 0cf99308220486..cbc904e6e3c1b7 100644 --- a/ports/tre/portfile.cmake +++ b/ports/tre/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO laurikari/tre @@ -12,6 +10,10 @@ file(READ ${SOURCE_PATH}/win32/config.h CONFIG_H) string(REPLACE "#define snprintf sprintf_s" "" CONFIG_H ${CONFIG_H}) file(WRITE ${SOURCE_PATH}/win32/config.h "${CONFIG_H}") +if(VCPKG_TARGET_IS_MINGW) + vcpkg_replace_string(${SOURCE_PATH}/win32/tre.def "tre.dll" "libtre.dll") +endif() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( diff --git a/ports/tre/vcpkg.json b/ports/tre/vcpkg.json new file mode 100644 index 00000000000000..cada62daea61c1 --- /dev/null +++ b/ports/tre/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tre", + "version-string": "0.8.0", + "port-version": 3, + "description": "TRE is a lightweight, robust, and efficient POSIX compliant regexp matching library with some exciting features such as approximate (fuzzy) matching.", + "homepage": "https://github.com/laurikari/tre" +} diff --git a/ports/treehopper/CONTROL b/ports/treehopper/CONTROL deleted file mode 100644 index f50e84f1b74462..00000000000000 --- a/ports/treehopper/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: treehopper -Version: 1.11.3-3 -Description: Treehopper connects the physical world to your computer, tablet, or smartphone. -Homepage: https://treehopper.io -Build-Depends: libusb diff --git a/ports/treehopper/portfile.cmake b/ports/treehopper/portfile.cmake index 46ed0d85e386d1..c9e9855ceffbe4 100644 --- a/ports/treehopper/portfile.cmake +++ b/ports/treehopper/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) vcpkg_from_github( @@ -18,8 +16,9 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(INSTALL ${SOURCE_PATH}/C++/API/inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/Treehopper/) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/treehopper RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/treehopper/vcpkg.json b/ports/treehopper/vcpkg.json new file mode 100644 index 00000000000000..822c8c949a4fe2 --- /dev/null +++ b/ports/treehopper/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "treehopper", + "version-string": "1.11.3", + "port-version": 5, + "description": "Treehopper connects the physical world to your computer, tablet, or smartphone.", + "homepage": "https://treehopper.io", + "dependencies": [ + "libusb" + ] +} diff --git a/ports/triangle/CMakeLists.txt b/ports/triangle/CMakeLists.txt new file mode 100644 index 00000000000000..6157c00f37e2b6 --- /dev/null +++ b/ports/triangle/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 2.8.12) +project(triangle) + +include(GNUInstallDirs) + +add_library(triangleLib triangle.c exports.def) +add_executable(triangle triangle.c) + +target_compile_definitions(triangleLib PRIVATE -DTRILIBRARY -DANSI_DECLARATORS) +target_compile_definitions(triangle PRIVATE -DANSI_DECLARATORS) +if(WIN32) + target_compile_definitions(triangleLib PRIVATE -DNO_TIMER) + target_compile_definitions(triangle PRIVATE -DNO_TIMER) +endif() + +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(triangle m) +endif() + +target_include_directories(triangleLib PUBLIC + $ +) + +set_target_properties(triangleLib PROPERTIES POSITION_INDEPENDENT_CODE ON) + +set_target_properties(triangleLib PROPERTIES PUBLIC_HEADER + "${CMAKE_SOURCE_DIR}/triangle.h" +) + +set_target_properties(triangleLib PROPERTIES OUTPUT_NAME "triangle") + +install(TARGETS triangleLib EXPORT triangleTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +install(TARGETS triangle DESTINATION tools/triangle) + +install(EXPORT triangleTargets + FILE triangleConfig.cmake + NAMESPACE triangle:: + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/triangle" +) diff --git a/ports/triangle/enable_64bit_architecture.patch b/ports/triangle/enable_64bit_architecture.patch new file mode 100644 index 00000000000000..9ad7b8079654c8 --- /dev/null +++ b/ports/triangle/enable_64bit_architecture.patch @@ -0,0 +1,418 @@ + triangle.c | 116 ++++++++++++++++++++++++++----------------------------------- + triangle.h | 29 +++++++++------- + 2 files changed, 66 insertions(+), 79 deletions(-) + +diff --git a/triangle.c b/triangle.c +index f7a5700..084902e 100644 +--- a/triangle.c ++++ b/triangle.c +@@ -194,27 +194,8 @@ + /* */ + /*****************************************************************************/ + +-/* For single precision (which will save some memory and reduce paging), */ +-/* define the symbol SINGLE by using the -DSINGLE compiler switch or by */ +-/* writing "#define SINGLE" below. */ +-/* */ +-/* For double precision (which will allow you to refine meshes to a smaller */ +-/* edge length), leave SINGLE undefined. */ +-/* */ +-/* Double precision uses more memory, but improves the resolution of the */ +-/* meshes you can generate with Triangle. It also reduces the likelihood */ +-/* of a floating exception due to overflow. Finally, it is much faster */ +-/* than single precision on 64-bit architectures like the DEC Alpha. I */ +-/* recommend double precision unless you want to generate a mesh for which */ +-/* you do not have enough memory. */ +- +-/* #define SINGLE */ +- +-#ifdef SINGLE +-#define REAL float +-#else /* not SINGLE */ + #define REAL double +-#endif /* not SINGLE */ ++#define VOID void + + /* If yours is not a Unix system, define the NO_TIMER compiler switch to */ + /* remove the Unix-specific timing code. */ +@@ -308,12 +289,6 @@ + #define DEADVERTEX -32768 + #define UNDEADVERTEX -32767 + +-/* The next line is used to outsmart some very stupid compilers. If your */ +-/* compiler is smarter, feel free to replace the "int" with "void". */ +-/* Not that it matters. */ +- +-#define VOID int +- + /* Two constants for algorithms based on random sampling. Both constants */ + /* have been chosen empirically to optimize their respective algorithms. */ + +@@ -340,6 +315,7 @@ + + #define ONETHIRD 0.333333333333333333333333333333333333333333333333333333333333 + ++#include + #include + #include + #include +@@ -938,16 +914,16 @@ int minus1mod3[3] = {2, 0, 1}; + /* extracted from the two least significant bits of the pointer. */ + + #define decode(ptr, otri) \ +- (otri).orient = (int) ((unsigned long) (ptr) & (unsigned long) 3l); \ ++ (otri).orient = (int) ((uintptr_t) (ptr) & (uintptr_t) 3l); \ + (otri).tri = (triangle *) \ +- ((unsigned long) (ptr) ^ (unsigned long) (otri).orient) ++ ((uintptr_t) (ptr) ^ (uintptr_t) (otri).orient) + + /* encode() compresses an oriented triangle into a single pointer. It */ + /* relies on the assumption that all triangles are aligned to four-byte */ + /* boundaries, so the two least significant bits of (otri).tri are zero. */ + + #define encode(otri) \ +- (triangle) ((unsigned long) (otri).tri | (unsigned long) (otri).orient) ++ (triangle) ((uintptr_t) (otri).tri | (uintptr_t) (otri).orient) + + /* The following handle manipulation primitives are all described by Guibas */ + /* and Stolfi. However, Guibas and Stolfi use an edge-based data */ +@@ -1111,16 +1087,16 @@ int minus1mod3[3] = {2, 0, 1}; + + #define infect(otri) \ + (otri).tri[6] = (triangle) \ +- ((unsigned long) (otri).tri[6] | (unsigned long) 2l) ++ ((uintptr_t) (otri).tri[6] | (uintptr_t) 2l) + + #define uninfect(otri) \ + (otri).tri[6] = (triangle) \ +- ((unsigned long) (otri).tri[6] & ~ (unsigned long) 2l) ++ ((uintptr_t) (otri).tri[6] & ~ (uintptr_t) 2l) + + /* Test a triangle for viral infection. */ + + #define infected(otri) \ +- (((unsigned long) (otri).tri[6] & (unsigned long) 2l) != 0l) ++ (((uintptr_t) (otri).tri[6] & (uintptr_t) 2l) != 0l) + + /* Check or set a triangle's attributes. */ + +@@ -1158,16 +1134,16 @@ int minus1mod3[3] = {2, 0, 1}; + /* are masked out to produce the real pointer. */ + + #define sdecode(sptr, osub) \ +- (osub).ssorient = (int) ((unsigned long) (sptr) & (unsigned long) 1l); \ ++ (osub).ssorient = (int) ((uintptr_t) (sptr) & (uintptr_t) 1l); \ + (osub).ss = (subseg *) \ +- ((unsigned long) (sptr) & ~ (unsigned long) 3l) ++ ((uintptr_t) (sptr) & ~ (uintptr_t) 3l) + + /* sencode() compresses an oriented subsegment into a single pointer. It */ + /* relies on the assumption that all subsegments are aligned to two-byte */ + /* boundaries, so the least significant bit of (osub).ss is zero. */ + + #define sencode(osub) \ +- (subseg) ((unsigned long) (osub).ss | (unsigned long) (osub).ssorient) ++ (subseg) ((uintptr_t) (osub).ss | (uintptr_t) (osub).ssorient) + + /* ssym() toggles the orientation of a subsegment. */ + +@@ -3891,7 +3867,7 @@ struct memorypool *pool; + #endif /* not ANSI_DECLARATORS */ + + { +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + pool->items = 0; + pool->maxitems = 0; +@@ -3899,11 +3875,11 @@ struct memorypool *pool; + /* Set the currently active block. */ + pool->nowblock = pool->firstblock; + /* Find the first item in the pool. Increment by the size of (VOID *). */ +- alignptr = (unsigned long) (pool->nowblock + 1); ++ alignptr = (uintptr_t) (pool->nowblock + 1); + /* Align the item on an `alignbytes'-byte boundary. */ + pool->nextitem = (VOID *) +- (alignptr + (unsigned long) pool->alignbytes - +- (alignptr % (unsigned long) pool->alignbytes)); ++ (alignptr + (uintptr_t) pool->alignbytes - ++ (alignptr % (uintptr_t) pool->alignbytes)); + /* There are lots of unallocated items left in this block. */ + pool->unallocateditems = pool->itemsfirstblock; + /* The stack of deallocated items is empty. */ +@@ -4008,7 +3984,7 @@ struct memorypool *pool; + { + VOID *newitem; + VOID **newblock; +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + /* First check the linked list of dead items. If the list is not */ + /* empty, allocate an item from the list rather than a fresh one. */ +@@ -4033,11 +4009,11 @@ struct memorypool *pool; + pool->nowblock = (VOID **) *(pool->nowblock); + /* Find the first item in the block. */ + /* Increment by the size of (VOID *). */ +- alignptr = (unsigned long) (pool->nowblock + 1); ++ alignptr = (uintptr_t) (pool->nowblock + 1); + /* Align the item on an `alignbytes'-byte boundary. */ + pool->nextitem = (VOID *) +- (alignptr + (unsigned long) pool->alignbytes - +- (alignptr % (unsigned long) pool->alignbytes)); ++ (alignptr + (uintptr_t) pool->alignbytes - ++ (alignptr % (uintptr_t) pool->alignbytes)); + /* There are lots of unallocated items left in this block. */ + pool->unallocateditems = pool->itemsperblock; + } +@@ -4092,16 +4068,16 @@ struct memorypool *pool; + #endif /* not ANSI_DECLARATORS */ + + { +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + /* Begin the traversal in the first block. */ + pool->pathblock = pool->firstblock; + /* Find the first item in the block. Increment by the size of (VOID *). */ +- alignptr = (unsigned long) (pool->pathblock + 1); ++ alignptr = (uintptr_t) (pool->pathblock + 1); + /* Align with item on an `alignbytes'-byte boundary. */ + pool->pathitem = (VOID *) +- (alignptr + (unsigned long) pool->alignbytes - +- (alignptr % (unsigned long) pool->alignbytes)); ++ (alignptr + (uintptr_t) pool->alignbytes - ++ (alignptr % (uintptr_t) pool->alignbytes)); + /* Set the number of items left in the current block. */ + pool->pathitemsleft = pool->itemsfirstblock; + } +@@ -4129,7 +4105,7 @@ struct memorypool *pool; + + { + VOID *newitem; +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + /* Stop upon exhausting the list of items. */ + if (pool->pathitem == pool->nextitem) { +@@ -4141,11 +4117,11 @@ struct memorypool *pool; + /* Find the next block. */ + pool->pathblock = (VOID **) *(pool->pathblock); + /* Find the first item in the block. Increment by the size of (VOID *). */ +- alignptr = (unsigned long) (pool->pathblock + 1); ++ alignptr = (uintptr_t) (pool->pathblock + 1); + /* Align with item on an `alignbytes'-byte boundary. */ + pool->pathitem = (VOID *) +- (alignptr + (unsigned long) pool->alignbytes - +- (alignptr % (unsigned long) pool->alignbytes)); ++ (alignptr + (uintptr_t) pool->alignbytes - ++ (alignptr % (uintptr_t) pool->alignbytes)); + /* Set the number of items left in the current block. */ + pool->pathitemsleft = pool->itemsperblock; + } +@@ -4197,16 +4173,16 @@ int subsegbytes; + #endif /* not ANSI_DECLARATORS */ + + { +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + /* Set up `dummytri', the `triangle' that occupies "outer space." */ + m->dummytribase = (triangle *) trimalloc(trianglebytes + + m->triangles.alignbytes); + /* Align `dummytri' on a `triangles.alignbytes'-byte boundary. */ +- alignptr = (unsigned long) m->dummytribase; ++ alignptr = (uintptr_t) m->dummytribase; + m->dummytri = (triangle *) +- (alignptr + (unsigned long) m->triangles.alignbytes - +- (alignptr % (unsigned long) m->triangles.alignbytes)); ++ (alignptr + (uintptr_t) m->triangles.alignbytes - ++ (alignptr % (uintptr_t) m->triangles.alignbytes)); + /* Initialize the three adjoining triangles to be "outer space." These */ + /* will eventually be changed by various bonding operations, but their */ + /* values don't really matter, as long as they can legally be */ +@@ -4226,10 +4202,10 @@ int subsegbytes; + m->dummysubbase = (subseg *) trimalloc(subsegbytes + + m->subsegs.alignbytes); + /* Align `dummysub' on a `subsegs.alignbytes'-byte boundary. */ +- alignptr = (unsigned long) m->dummysubbase; ++ alignptr = (uintptr_t) m->dummysubbase; + m->dummysub = (subseg *) +- (alignptr + (unsigned long) m->subsegs.alignbytes - +- (alignptr % (unsigned long) m->subsegs.alignbytes)); ++ (alignptr + (uintptr_t) m->subsegs.alignbytes - ++ (alignptr % (uintptr_t) m->subsegs.alignbytes)); + /* Initialize the two adjoining subsegments to be the omnipresent */ + /* subsegment. These will eventually be changed by various bonding */ + /* operations, but their values don't really matter, as long as they */ +@@ -4586,7 +4562,7 @@ int number; + { + VOID **getblock; + char *foundvertex; +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + int current; + + getblock = m->vertices.firstblock; +@@ -4603,9 +4579,9 @@ int number; + } + + /* Now find the right vertex. */ +- alignptr = (unsigned long) (getblock + 1); +- foundvertex = (char *) (alignptr + (unsigned long) m->vertices.alignbytes - +- (alignptr % (unsigned long) m->vertices.alignbytes)); ++ alignptr = (uintptr_t) (getblock + 1); ++ foundvertex = (char *) (alignptr + (uintptr_t) m->vertices.alignbytes - ++ (alignptr % (uintptr_t) m->vertices.alignbytes)); + return (vertex) (foundvertex + m->vertices.itembytes * (number - current)); + } + +@@ -4883,6 +4859,7 @@ struct osub *newsubseg; + /* */ + /*****************************************************************************/ + ++static + void exactinit() + { + REAL half; +@@ -4956,6 +4933,7 @@ void exactinit() + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + int fast_expansion_sum_zeroelim(int elen, REAL *e, int flen, REAL *f, REAL *h) + #else /* not ANSI_DECLARATORS */ +@@ -5050,6 +5028,7 @@ REAL *h; + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + int scale_expansion_zeroelim(int elen, REAL *e, REAL b, REAL *h) + #else /* not ANSI_DECLARATORS */ +@@ -5106,6 +5085,7 @@ REAL *h; + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + REAL estimate(int elen, REAL *e) + #else /* not ANSI_DECLARATORS */ +@@ -5303,6 +5283,7 @@ vertex pc; + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + REAL incircleadapt(vertex pa, vertex pb, vertex pc, vertex pd, REAL permanent) + #else /* not ANSI_DECLARATORS */ +@@ -5882,6 +5863,7 @@ REAL permanent; + return finnow[finlength - 1]; + } + ++static + #ifdef ANSI_DECLARATORS + REAL incircle(struct mesh *m, struct behavior *b, + vertex pa, vertex pb, vertex pc, vertex pd) +@@ -5964,6 +5946,7 @@ vertex pd; + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + REAL orient3dadapt(vertex pa, vertex pb, vertex pc, vertex pd, + REAL aheight, REAL bheight, REAL cheight, REAL dheight, +@@ -6389,6 +6372,7 @@ REAL permanent; + return finnow[finlength - 1]; + } + ++static + #ifdef ANSI_DECLARATORS + REAL orient3d(struct mesh *m, struct behavior *b, + vertex pa, vertex pb, vertex pc, vertex pd, +@@ -7649,7 +7633,7 @@ struct otri *searchtri; + char *firsttri; + struct otri sampletri; + vertex torg, tdest; +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + REAL searchdist, dist; + REAL ahead; + long samplesperblock, totalsamplesleft, samplesleft; +@@ -7721,11 +7705,11 @@ struct otri *searchtri; + population = totalpopulation; + } + /* Find a pointer to the first triangle in the block. */ +- alignptr = (unsigned long) (sampleblock + 1); ++ alignptr = (uintptr_t) (sampleblock + 1); + firsttri = (char *) (alignptr + +- (unsigned long) m->triangles.alignbytes - ++ (uintptr_t) m->triangles.alignbytes - + (alignptr % +- (unsigned long) m->triangles.alignbytes)); ++ (uintptr_t) m->triangles.alignbytes)); + + /* Choose `samplesleft' randomly sampled triangles in this block. */ + do { +diff --git a/triangle.h b/triangle.h +index 9df1f39..8d9c754 100644 +--- a/triangle.h ++++ b/triangle.h +@@ -248,16 +248,20 @@ + /* */ + /*****************************************************************************/ + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + struct triangulateio { +- REAL *pointlist; /* In / out */ +- REAL *pointattributelist; /* In / out */ ++ double *pointlist; /* In / out */ ++ double *pointattributelist; /* In / out */ + int *pointmarkerlist; /* In / out */ + int numberofpoints; /* In / out */ + int numberofpointattributes; /* In / out */ + + int *trianglelist; /* In / out */ +- REAL *triangleattributelist; /* In / out */ +- REAL *trianglearealist; /* In only */ ++ double *triangleattributelist; /* In / out */ ++ double *trianglearealist; /* In only */ + int *neighborlist; /* Out only */ + int numberoftriangles; /* In / out */ + int numberofcorners; /* In / out */ +@@ -267,23 +271,22 @@ struct triangulateio { + int *segmentmarkerlist; /* In / out */ + int numberofsegments; /* In / out */ + +- REAL *holelist; /* In / pointer to array copied out */ ++ double *holelist; /* In / pointer to array copied out */ + int numberofholes; /* In / copied out */ + +- REAL *regionlist; /* In / pointer to array copied out */ ++ double *regionlist; /* In / pointer to array copied out */ + int numberofregions; /* In / copied out */ + + int *edgelist; /* Out only */ + int *edgemarkerlist; /* Not used with Voronoi diagram; out only */ +- REAL *normlist; /* Used only with Voronoi diagram; out only */ ++ double *normlist; /* Used only with Voronoi diagram; out only */ + int numberofedges; /* Out only */ + }; + +-#ifdef ANSI_DECLARATORS + void triangulate(char *, struct triangulateio *, struct triangulateio *, + struct triangulateio *); +-void trifree(VOID *memptr); +-#else /* not ANSI_DECLARATORS */ +-void triangulate(); +-void trifree(); +-#endif /* not ANSI_DECLARATORS */ ++void trifree(void *memptr); ++ ++#ifdef __cplusplus ++} ++#endif +\ No newline at end of file diff --git a/ports/triangle/exports.def b/ports/triangle/exports.def new file mode 100644 index 00000000000000..5c4ba321e7cb2c --- /dev/null +++ b/ports/triangle/exports.def @@ -0,0 +1,3 @@ +EXPORTS + triangulate + trifree \ No newline at end of file diff --git a/ports/triangle/portfile.cmake b/ports/triangle/portfile.cmake new file mode 100644 index 00000000000000..38b027986b68f3 --- /dev/null +++ b/ports/triangle/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.netlib.org/voronoi/triangle.zip" + FILENAME "triangle.zip" + SHA512 c9c1ac527c4bf836ed877b1c5495abf9fd2c453741f4c9698777e23cde939ebf0dd73c84cec64f35a93ca01bff4b86ce32ec559da33e570a0744a764e46d2186 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + NO_REMOVE_ONE_LEVEL + ARCHIVE ${ARCHIVE_FILE} + PATCHES + "enable_64bit_architecture.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools") + +file(INSTALL ${SOURCE_PATH}/README DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/triangle/vcpkg.json b/ports/triangle/vcpkg.json new file mode 100644 index 00000000000000..816f5015221ca4 --- /dev/null +++ b/ports/triangle/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "triangle", + "version-string": "1.6", + "port-version": 1, + "description": "A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator.", + "homepage": "http://www.cs.cmu.edu/~quake/triangle.html", + "supports": "!uwp" +} diff --git a/ports/trompeloeil/CONTROL b/ports/trompeloeil/CONTROL deleted file mode 100644 index 135a473f33bbf7..00000000000000 --- a/ports/trompeloeil/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: trompeloeil -Version: 34-1 -Description: A thread-safe header-only mocking framework for C++11/14 using the Boost Software License 1.0 -Homepage: https://github.com/rollbear/trompeloeil diff --git a/ports/trompeloeil/portfile.cmake b/ports/trompeloeil/portfile.cmake index 03385928f37da3..130faddfa35e56 100644 --- a/ports/trompeloeil/portfile.cmake +++ b/ports/trompeloeil/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rollbear/trompeloeil - REF v34 - SHA512 0fffdb38287699c413e35d541e14ddf2e355a0a3df3b3f7be3a56d02f012571af1f4cad3de0a23863ab9b70aa75d2a7ef0227f3896195a51c04ccf817fe1c9dc + REF 08cba57ed7207c8ad5c94fd2a20dc0bfecabe878 # v38 + SHA512 b51626eb263f971f1ed6e29d86256adde19f9f60487e00a6098933de37d0a1cb64b6d797447fcde6f5121a1b29f39bd7b6aed8f5889450d72ef6a76d46eb921f HEAD_REF master PATCHES disable_master_project.patch ) diff --git a/ports/trompeloeil/vcpkg.json b/ports/trompeloeil/vcpkg.json new file mode 100644 index 00000000000000..8084fce18c190d --- /dev/null +++ b/ports/trompeloeil/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "trompeloeil", + "version-string": "38", + "port-version": 1, + "description": "A thread-safe header-only mocking framework for C++11/14 using the Boost Software License 1.0", + "homepage": "https://github.com/rollbear/trompeloeil" +} diff --git a/ports/tsl-hopscotch-map/CONTROL b/ports/tsl-hopscotch-map/CONTROL deleted file mode 100644 index 0f2b82e3601d55..00000000000000 --- a/ports/tsl-hopscotch-map/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tsl-hopscotch-map -Version: 2.2.1-1 -Description: C++ implementation of a fast hash map and hash set using hopscotch hashing diff --git a/ports/tsl-hopscotch-map/portfile.cmake b/ports/tsl-hopscotch-map/portfile.cmake index 00998338a07910..b74e41409fb8f6 100644 --- a/ports/tsl-hopscotch-map/portfile.cmake +++ b/ports/tsl-hopscotch-map/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Tessil/hopscotch-map - REF v2.2.1 - SHA512 389fb09b6e47d8005d4a1b6c0db0c5f03de67686e9d4b97e473bf88f0c398d3118be0dcfdc5d509c082fd53f52f5d779d04c3d9bafe65c5eba11d03c62b60ddc + REF 29030f55ca518bb1be5113ab0a8e134772024a9d # v2.3.0 + SHA512 944f26fe0faa59b799ddf741c4f86b715934e740bfbb40a157f667eaff07013a35ad40a343b720b36279acefbb5b206a54cfcfec1f6cd052314936d19e5da413 ) vcpkg_configure_cmake( diff --git a/ports/tsl-hopscotch-map/vcpkg.json b/ports/tsl-hopscotch-map/vcpkg.json new file mode 100644 index 00000000000000..b3d3792e24ec05 --- /dev/null +++ b/ports/tsl-hopscotch-map/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tsl-hopscotch-map", + "version-string": "2.3.0", + "port-version": 1, + "description": "C++ implementation of a fast hash map and hash set using hopscotch hashing" +} diff --git a/ports/tsl-ordered-map/CONTROL b/ports/tsl-ordered-map/CONTROL deleted file mode 100644 index 2170432d227afc..00000000000000 --- a/ports/tsl-ordered-map/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tsl-ordered-map -Version: 0.8.1-1 -Description: C++ hash map and hash set which preserve the order of insertion diff --git a/ports/tsl-ordered-map/portfile.cmake b/ports/tsl-ordered-map/portfile.cmake index 9f4fe996b1214a..4605d72ebd7dfd 100644 --- a/ports/tsl-ordered-map/portfile.cmake +++ b/ports/tsl-ordered-map/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Tessil/ordered-map - REF v0.8.1 - SHA512 c776fc82c971ec507f12fa071c5831bbbf94a0351f7ae936f60b73b91be2a264737b606a6be7bae0cc6b971f01c619a78dad3072ac603b26a2a13836184a8f3a + REF 4051af7e344e0c0c6af5573b064342c0987d1028 # v1.0.0 + SHA512 c4789df12db34bba1a1b2e07ada39afd6bfb637d34006675ee7f83253e49b5741d301cebb7c368c7a99311c51304f844a6229d00df3717e346e5fc1254e7721b ) vcpkg_configure_cmake( diff --git a/ports/tsl-ordered-map/vcpkg.json b/ports/tsl-ordered-map/vcpkg.json new file mode 100644 index 00000000000000..8ce8f079fa8802 --- /dev/null +++ b/ports/tsl-ordered-map/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tsl-ordered-map", + "version-string": "1.0.0", + "port-version": 1, + "description": "C++ hash map and hash set which preserve the order of insertion" +} diff --git a/ports/tsl-sparse-map/CONTROL b/ports/tsl-sparse-map/CONTROL deleted file mode 100644 index 5563868572d625..00000000000000 --- a/ports/tsl-sparse-map/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: tsl-sparse-map -Version: 0.6.1-1 -Description: C++ implementation of a memory efficient hash map and hash set diff --git a/ports/tsl-sparse-map/portfile.cmake b/ports/tsl-sparse-map/portfile.cmake index 44a366d878a2f2..9feba6cc3b5ba0 100644 --- a/ports/tsl-sparse-map/portfile.cmake +++ b/ports/tsl-sparse-map/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Tessil/sparse-map - REF v0.6.1 - SHA512 c77e7625a0ff13a538f1a8c96d3f70a178e9bedfb22592d6ca848e6d1e6b1566c9a216b2df68592c27308156b776677d52e0d75cf09254acb62f60a00a4bc054 + REF d71e6fd75f4970f07f4f1fe67438055be70d0945 # v0.6.2 + SHA512 ad270be66b3d5f96cb0305f0e086807aee1c909dd022c19ca99e5f7a72d5116f2ecb4b67fcb80e8bdb4f98925387d95bdc0bcc450a10b97c61f9b92c681f95b5 ) vcpkg_configure_cmake( diff --git a/ports/tsl-sparse-map/vcpkg.json b/ports/tsl-sparse-map/vcpkg.json new file mode 100644 index 00000000000000..ff5229abcc09be --- /dev/null +++ b/ports/tsl-sparse-map/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tsl-sparse-map", + "version-string": "0.6.2", + "port-version": 1, + "description": "C++ implementation of a memory efficient hash map and hash set" +} diff --git a/ports/ttauri/portfile.cmake b/ports/ttauri/portfile.cmake new file mode 100644 index 00000000000000..7a998177537592 --- /dev/null +++ b/ports/ttauri/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm" "arm64") +vcpkg_fail_port_install(ON_TARGET "linux" "uwp" "osx") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ttauri-project/ttauri + REF v0.4.0 + SHA512 85a15b9d9b1b98b5811a5833415d1ab8a34b39e055959038507b3d873c3544b5193817ce8d474ffc4f8b7ad1602bc0f6401e3565225cf58a90ddee3f9f0a0731 + HEAD_REF main +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTT_BUILD_TESTS=OFF + -DTT_BUILD_EXAMPLES=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/ttauri/vcpkg.json b/ports/ttauri/vcpkg.json new file mode 100644 index 00000000000000..7b989bb4cc3b5c --- /dev/null +++ b/ports/ttauri/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "ttauri", + "version": "0.4.0", + "maintainers": "@takev", + "description": "A portable, low latency, retained-mode GUI framework written in C++.", + "homepage": "https://github.com/ttauri-project/ttauri", + "license": "BSL-1.0", + "supports": "windows & x64", + "dependencies": [ + "vulkan", + "vulkan-memory-allocator" + ] +} diff --git a/ports/turbobase64/CMakeLists.txt b/ports/turbobase64/CMakeLists.txt new file mode 100644 index 00000000000000..c4fcebc4709a4a --- /dev/null +++ b/ports/turbobase64/CMakeLists.txt @@ -0,0 +1,70 @@ +cmake_minimum_required(VERSION 3.14) + +project(turbobase64 C) +if (SOURCE_PATH) + set(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +endif () + +#Copyright 2016-2020 Yandex LLC +# https://github.com/ClickHouse/ClickHouse/blob/master/contrib/base64-cmake/CMakeLists.txt +# +#Apache License +#Version 2.0, January 2004 +#http://www.apache.org/licenses/ +#Yandex code starts + +SET(LIBRARY_DIR ${CMAKE_SOURCE_DIR}) + +add_library(base64_scalar OBJECT ${LIBRARY_DIR}/turbob64c.c ${LIBRARY_DIR}/turbob64d.c) +add_library(base64_ssse3 OBJECT ${LIBRARY_DIR}/turbob64sse.c) # This file also contains code for ARM NEON + +if (ARCH_AMD64) + add_library(base64_avx OBJECT ${LIBRARY_DIR}/turbob64sse.c) # This is not a mistake. One file is compiled twice. + add_library(base64_avx2 OBJECT ${LIBRARY_DIR}/turbob64avx2.c) +endif () + +target_compile_options(base64_scalar PRIVATE -falign-loops) + +if (ARCH_AMD64) + target_compile_options(base64_ssse3 PRIVATE -mssse3 -falign-loops) + target_compile_options(base64_avx PRIVATE -falign-loops -mavx) + target_compile_options(base64_avx2 PRIVATE -falign-loops -mavx2) +else () + target_compile_options(base64_ssse3 PRIVATE -falign-loops) +endif () + +if (ARCH_AMD64) + add_library(base64 + $ + $ + $ + $) +else () + add_library(base64 + $ + $) +endif () + +# End of Yandex code + +target_include_directories(base64 SYSTEM PUBLIC $) +set_target_properties(base64 PROPERTIES PUBLIC_HEADER "${CMAKE_SOURCE_DIR}/turbob64.h") + +install(TARGETS base64 + EXPORT base64Config + RUNTIME DESTINATION "bin" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + PUBLIC_HEADER DESTINATION "include" + COMPONENT dev + ) + +export(TARGETS base64 + NAMESPACE TURBO:: + FILE "share/base64/base64Config.cmake" + ) + +install(EXPORT base64Config + DESTINATION "share/base64" + NAMESPACE TURBO:: + ) \ No newline at end of file diff --git a/ports/turbobase64/portfile.cmake b/ports/turbobase64/portfile.cmake new file mode 100644 index 00000000000000..0c4e89e63a7992 --- /dev/null +++ b/ports/turbobase64/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO powturbo/Turbo-Base64 + REF 95ba56a9b041f9933f5cd2bbb2ee4e083468c20a + SHA512 bacab8ede5e20974207e01c13a93e6d8afc8d08bc84f1da2b6efa1b4d17408cef6cea085e209a8b7d3b2e2a7223a785f8c76aa954c3c787e9b8d891880b63606 + HEAD_REF master +) + +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/turbobase64/vcpkg.json b/ports/turbobase64/vcpkg.json new file mode 100644 index 00000000000000..dc418d68ba07c8 --- /dev/null +++ b/ports/turbobase64/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "turbobase64", + "version-string": "2020-01-12", + "port-version": 1, + "description": "Fastest Base64 SIMD/Neon library", + "homepage": "https://github.com/powturbo/Turbo-Base64" +} diff --git a/ports/tvision/portfile.cmake b/ports/tvision/portfile.cmake new file mode 100644 index 00000000000000..c8f42021d83bf5 --- /dev/null +++ b/ports/tvision/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO magiblot/tvision + REF 638f963fe4f6c84854f60f1e9c5772bf6603e4b2 + HEAD_REF master + SHA512 87c26fed26a332dd4b2a431dfbe0f8629d6565c59f61a3968fc658beda313ee8dad9bb59f53d47b1d664c0494841850b09e5c05533b2a74a372cc03548def2c5 +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DTV_BUILD_EXAMPLES=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/tvision/vcpkg.json b/ports/tvision/vcpkg.json new file mode 100644 index 00000000000000..4e1f52a18962ce --- /dev/null +++ b/ports/tvision/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "tvision", + "version-date": "2021-08-10", + "description": "A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces.", + "homepage": "https://github.com/magiblot/tvision", + "license": "MIT", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/tweeny/portfile.cmake b/ports/tweeny/portfile.cmake new file mode 100644 index 00000000000000..9aa0e901ce6223 --- /dev/null +++ b/ports/tweeny/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mobius3/tweeny + REF v3.2.0 + SHA512 809b8250f7df6c3e9d27e9967c586d1ca4be29e3b551b57285da1060a6928c91e0afa6b3ef6b546cae48035383939f19d67889b632dd60a2fbb0a22aafaabe89 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "/lib/cmake/Tweeny/") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake/Tweeny) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tweeny/vcpkg.json b/ports/tweeny/vcpkg.json new file mode 100644 index 00000000000000..a68863b6751994 --- /dev/null +++ b/ports/tweeny/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "tweeny", + "version": "3.2.0", + "description": "A modern C++ tweening library", + "homepage": "https://github.com/mobius3/tweeny" +} diff --git a/ports/type-lite/portfile.cmake b/ports/type-lite/portfile.cmake new file mode 100644 index 00000000000000..421fbf51ecaa84 --- /dev/null +++ b/ports/type-lite/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/type-lite + REF v0.1.0 + SHA512 5a5ea623890af9c88c7f82869278af743e08b3dbda3c48c4523737244a7da76d2509501b4502efc2226aaef5df72b6ff69cd6b5b36c8cfc282b8c8406525016b + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_TESTS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTYPE_LITE_OPT_BUILD_TESTS=${BUILD_TESTS} + -DTYPE_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/type-lite/vcpkg.json b/ports/type-lite/vcpkg.json new file mode 100644 index 00000000000000..9fa6607e1e39e9 --- /dev/null +++ b/ports/type-lite/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "type-lite", + "version-string": "0.1.0", + "port-version": 1, + "description": "Strong types for C++98, C++11 and later in a single-file header-only library.", + "homepage": "https://github.com/martinmoene/type-lite", + "features": { + "test": { + "description": "Build with test" + } + } +} diff --git a/ports/type-safe/disable_tests.patch b/ports/type-safe/disable_tests.patch new file mode 100644 index 00000000000000..f18d2ebbfaa2a1 --- /dev/null +++ b/ports/type-safe/disable_tests.patch @@ -0,0 +1,12 @@ +diff -ur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,7 +136,7 @@ + # other subdirectories + # only add if not inside add_subdirectory() + option(TYPE_SAFE_BUILD_TEST_EXAMPLE "build test and example" OFF) +-if(${TYPE_SAFE_BUILD_TEST_EXAMPLE} OR (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)) ++if(${TYPE_SAFE_BUILD_TEST_EXAMPLE}) + enable_testing() + add_subdirectory(example/) + add_subdirectory(test/) diff --git a/ports/type-safe/portfile.cmake b/ports/type-safe/portfile.cmake new file mode 100644 index 00000000000000..8930f3f9247288 --- /dev/null +++ b/ports/type-safe/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO foonathan/type_safe + REF da1d15abc612afbdc81d70c817b49ba1752177de + SHA512 5b344af89378e34f05d96bff2de61615bc16e21601d9fe9d0886c71db211bd3b42afb2467dd2eb7f3d11176dc9adc2d71c6dc0b60722e12aaf8c1d79ea869289 + HEAD_REF v0.2.1 + PATCHES + disable_tests.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTYPE_SAFE_BUILD_TEST_EXAMPLE=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/type_safe TARGET_PATH share/type_safe) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/type-safe/vcpkg.json b/ports/type-safe/vcpkg.json new file mode 100644 index 00000000000000..3b16d3c7b101eb --- /dev/null +++ b/ports/type-safe/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "type-safe", + "version-string": "0.2.1", + "description": "Zero overhead abstractions that use the C++ type system to prevent bugs.", + "homepage": "https://github.com/foonathan/type_safe", + "dependencies": [ + "debug-assert" + ] +} diff --git a/ports/uchardet/fix-uwp-build.patch b/ports/uchardet/fix-uwp-build.patch new file mode 100644 index 00000000000000..d08ba9e7927cab --- /dev/null +++ b/ports/uchardet/fix-uwp-build.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 50a11e8..3a93c83 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,6 +54,10 @@ if (TARGET_ARCHITECTURE MATCHES ".*(x86|amd|i686).*") + endif (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH) + endif (TARGET_ARCHITECTURE MATCHES ".*(x86|amd|i686).*") + ++if (MSVC) ++ add_compile_options(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) ++endif (MSVC) ++ + configure_file( + uchardet.pc.in + uchardet.pc diff --git a/ports/uchardet/portfile.cmake b/ports/uchardet/portfile.cmake new file mode 100644 index 00000000000000..a407fd7831a55f --- /dev/null +++ b/ports/uchardet/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://gitlab.freedesktop.org/uchardet/uchardet + REF 6f38ab95f55afd45ee6ccefcb92d21034b4a2521 + PATCHES + fix-uwp-build.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tool BUILD_BINARY +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG + -DBUILD_BINARY=OFF + OPTIONS_RELEASE + ${FEATURE_OPTIONS} + OPTIONS + -DBUILD_STATIC=${BUILD_STATIC} +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +if(tool IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES uchardet AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/share/man" +) + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/uchardet/vcpkg.json b/ports/uchardet/vcpkg.json new file mode 100644 index 00000000000000..41a2bbe78438e8 --- /dev/null +++ b/ports/uchardet/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "uchardet", + "version-date": "2021-09-03", + "description": "An encoding detector library ported from Mozilla.", + "homepage": "https://cgit.freedesktop.org/uchardet/uchardet/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "features": { + "tool": { + "description": "Build uchardet CLI tool.", + "dependencies": [ + "getopt" + ] + } + } +} diff --git a/ports/umock-c/CONTROL b/ports/umock-c/CONTROL deleted file mode 100644 index 108a1dfd18bd06..00000000000000 --- a/ports/umock-c/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: umock-c -Version: 2019-05-16.1 -Description: A pure C mocking library -Build-Depends: azure-macro-utils-c - diff --git a/ports/umock-c/portfile.cmake b/ports/umock-c/portfile.cmake index 0b30e8942e07df..71fb57c1d75869 100644 --- a/ports/umock-c/portfile.cmake +++ b/ports/umock-c/portfile.cmake @@ -1,14 +1,22 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Azure/umock-c - REF 92772d9d8317a37dd0b656e95877ffb03bc67e92 - SHA512 4dd738c7b2c7e1237ad874a7ad90bf81b864aa242af335dcc82d0cfea51bc33fe84de4eebedb6e00944c70d01d1ade4827716dbcf95754165b35981bde4147e7 - HEAD_REF master -) +if("public-preview" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/umock-c + REF 87d2214384c886a1e2406ac0756a0b3786add8da + SHA512 230b6c79a8346727bbc124d1aefaa14da8ecd82b2a56d68b3d2511b8efa5931872da440137a5d266835ba8c5193b83b4bc5ee85abb5242d07904a0706727926c + HEAD_REF master + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/umock-c + REF 504193e65d1c2f6eb50c15357167600a296df7ff + SHA512 68d5d986314dbd46d20de2a9b9454154c11675c25d1b5a5b1cfecdd0c0945d9dc68d0348ec1dbb00b5d1a6a1f0356121ba561d7c8fffb97ab37864edade5a85b + HEAD_REF master + ) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -25,7 +33,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/umock_c) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -configure_file(${SOURCE_PATH}/readme.md ${CURRENT_PACKAGES_DIR}/share/umock-c/copyright COPYONLY) +configure_file(${SOURCE_PATH}/readme.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/umock-c/vcpkg.json b/ports/umock-c/vcpkg.json new file mode 100644 index 00000000000000..0456f2b9876d5d --- /dev/null +++ b/ports/umock-c/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "umock-c", + "version-string": "2020-06-17", + "port-version": 2, + "description": "A pure C mocking library", + "homepage": "https://github.com/Azure/umock-c", + "dependencies": [ + "azure-macro-utils-c" + ], + "features": { + "public-preview": { + "description": "A pure C mocking library (public-preview)", + "dependencies": [ + { + "name": "azure-macro-utils-c", + "features": [ + "public-preview" + ] + } + ] + } + } +} diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL deleted file mode 100644 index 9da8c56e9187b7..00000000000000 --- a/ports/unicorn-lib/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: unicorn-lib -Version: 2019-05-07-1 -Homepage: https://github.com/CaptainCrowbar/unicorn-lib -Description: Unicode library for C++ by Ross Smith -Build-Depends: rs-core-lib, pcre2, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake index 305d659ac17b91..dfdc82bcacfac4 100644 --- a/ports/unicorn-lib/portfile.cmake +++ b/ports/unicorn-lib/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message("unicorn-lib is a static library, now build with static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -8,8 +6,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/unicorn-lib - REF 3e4e014bbf6fe24721a14c63f2a4f7ebfa401e7c - SHA512 f73f288fb50f9f727edfc84810a15f1fdde76df9030c4b0d5292351e84ec8cd6c8a7e670b2a62301a77521bf60ebcf1bf7c8c9d97ddb77385ed945b55075c927 + REF 01cc7fcd2d60dbc083767d448477638e5ec8b92a # 2020-03-02 + SHA512 d8ffb80c589b34d850a507570d7d8ec707a6a23b469d484f47c80566883bd4883da23a4701434f361231a7615065ff5f1e42e40c028975f43f198c307353ec9d HEAD_REF master ) @@ -28,4 +26,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/unicorn-lib RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/unicorn-lib/vcpkg.json b/ports/unicorn-lib/vcpkg.json new file mode 100644 index 00000000000000..03b4dbaa4e2e11 --- /dev/null +++ b/ports/unicorn-lib/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "unicorn-lib", + "version-string": "2020-03-02", + "port-version": 1, + "description": "Unicode library for C++ by Ross Smith", + "homepage": "https://github.com/CaptainCrowbar/unicorn-lib", + "dependencies": [ + "libiconv", + "pcre2", + "rs-core-lib", + "zlib" + ] +} diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL deleted file mode 100644 index 71a3bd18cc5a41..00000000000000 --- a/ports/unicorn/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: unicorn -Version: 2019-04-19 -Homepage: https://github.com/unicorn-engine/unicorn -Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index 37120935ca9f47..aee7b65b9790fc 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "WindowsStore not supported") endif() @@ -14,8 +12,8 @@ set(VCPKG_CRT_LINKAGE "static") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO unicorn-engine/unicorn - REF 778171fc9546c1fc3d1341ff1151eab379848ea0 - SHA512 cad25326259d054718c8e338278374ba6b5dffbc84598023c14b64218139b106e8004dc9f6e2cd679638258da3de2f3cc5974e07639eda346d7e4ebcf44bd00e + REF abe452babc13299f598a47f7c87873a4ae34bf09 # accessed on 2020-09-14 + SHA512 8ad4b76cc98fc9d21421c93ad7084665622fd0ed4de87cb189c5d7ed1bbc83ccd365bd08c4ccfa81539e42fa3a74ffc7e2e33a74f2bfdfd4b2b9e2e5425f2fc9 HEAD_REF master ) diff --git a/ports/unicorn/vcpkg.json b/ports/unicorn/vcpkg.json new file mode 100644 index 00000000000000..bc01677b816118 --- /dev/null +++ b/ports/unicorn/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "unicorn", + "version-string": "2020-09-14", + "port-version": 1, + "description": "Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework", + "homepage": "https://github.com/unicorn-engine/unicorn", + "supports": "!uwp" +} diff --git a/ports/units/CONTROL b/ports/units/CONTROL deleted file mode 100644 index 21c7f44b13153c..00000000000000 --- a/ports/units/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: units -Version: 2.3.0 -Homepage: https://github.com/nholthaus/units -Description: A compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies. diff --git a/ports/units/portfile.cmake b/ports/units/portfile.cmake index 910626f6d9e2b5..4d1d281c0d0456 100644 --- a/ports/units/portfile.cmake +++ b/ports/units/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nholthaus/units - REF v2.3.0 - SHA512 1b9d7806e82d0f437574562e647077b6d22c0add81a19b5ec71f53ab608642db2d785a70d03d13cb2eeea2a8bc2d20f112b6bdf49acf0afce44e8e07bb6b7c39 + REF v2.3.1 + SHA512 1ec9e4d7d60f073ad82a02116f16b9dda57406a3b22a5b06d34f9e5a4df8fd20cc28fc7acfd8fc33054718e0efca3973df0424563f7e1833687a6c1696b9c340 ) vcpkg_configure_cmake( @@ -16,9 +14,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Handle copyright/readme/package files -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/units RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/units) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/unitsConfig.cmake ${CURRENT_PACKAGES_DIR}/share/units/unitsConfig.cmake) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) # remove uneeded directories file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) diff --git a/ports/units/vcpkg.json b/ports/units/vcpkg.json new file mode 100644 index 00000000000000..3169b9319ce9d8 --- /dev/null +++ b/ports/units/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "units", + "version-string": "2.3.1", + "port-version": 1, + "description": "A compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.", + "homepage": "https://github.com/nholthaus/units" +} diff --git a/ports/unittest-cpp/CONTROL b/ports/unittest-cpp/CONTROL deleted file mode 100644 index 195b41fe40f8ce..00000000000000 --- a/ports/unittest-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: unittest-cpp -Version: 2.0.0-1 -Homepage: https://github.com/unittest-cpp/unittest-cpp -Description: A lightweight unit testing framework for C++ diff --git a/ports/unittest-cpp/fix-include-path.patch b/ports/unittest-cpp/fix-include-path.patch new file mode 100644 index 00000000000000..32455dec53c585 --- /dev/null +++ b/ports/unittest-cpp/fix-include-path.patch @@ -0,0 +1,11 @@ +diff --git a/cmake/UnitTest++Config.cmake b/cmake/UnitTest++Config.cmake +index afe165c..cc43a2b 100644 +--- a/cmake/UnitTest++Config.cmake ++++ b/cmake/UnitTest++Config.cmake +@@ -1,2 +1,4 @@ + include("${CMAKE_CURRENT_LIST_DIR}/UnitTest++Targets.cmake") +-get_filename_component(UTPP_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../../include/" ABSOLUTE) ++get_filename_component(UTPP_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include/" ABSOLUTE) ++ ++get_filename_component(UnitTest++_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include/" ABSOLUTE) +\ No newline at end of file diff --git a/ports/unittest-cpp/portfile.cmake b/ports/unittest-cpp/portfile.cmake index 597444d3bc9699..4558d8a1769058 100644 --- a/ports/unittest-cpp/portfile.cmake +++ b/ports/unittest-cpp/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -8,6 +6,8 @@ vcpkg_from_github( REF v2.0.0 SHA512 39318f4ed31534c116679a3257bf1438a6c4b3bef1894dfd40aea934950c6c8197af6a7f61539b8e9ddc67327c9388d7e8a6f8a3e0e966ad26c07554e2429cab HEAD_REF master + PATCHES + fix-include-path.patch ) vcpkg_configure_cmake( @@ -21,7 +21,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/UnitTest++) file(RENAME ${CURRENT_PACKAGES_DIR}/share/unittest-cpp ${CURRENT_PACKAGES_DIR}/share/unittest++) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/unittest-cpp RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) # Remove duplicate includes file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/unittest-cpp/vcpkg.json b/ports/unittest-cpp/vcpkg.json new file mode 100644 index 00000000000000..b80cbbad575091 --- /dev/null +++ b/ports/unittest-cpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "unittest-cpp", + "version-semver": "2.0.0", + "port-version": 2, + "description": "A lightweight unit testing framework for C++", + "homepage": "https://github.com/unittest-cpp/unittest-cpp" +} diff --git a/ports/unixodbc/portfile.cmake b/ports/unixodbc/portfile.cmake new file mode 100644 index 00000000000000..f54488163325f1 --- /dev/null +++ b/ports/unixodbc/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lurcher/unixODBC + REF 2.3.7 + SHA512 94e95730304990fc5ed4f76ebfb283d8327a59a3329badaba752a502a2d705549013fd95f0c92704828c301eae54081c8704acffb412fd1e1a71f4722314cec0 + HEAD_REF master +) + +set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + COPY_SOURCE +) + +vcpkg_install_make() + +vcpkg_copy_pdbs() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif () + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/etc" + "${CURRENT_PACKAGES_DIR}/etc" + "${CURRENT_PACKAGES_DIR}/share/man" + ) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/unixodbcConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/unixodbc/unixodbcConfig.cmake b/ports/unixodbc/unixodbcConfig.cmake new file mode 100644 index 00000000000000..c0bd25993eaf15 --- /dev/null +++ b/ports/unixodbc/unixodbcConfig.cmake @@ -0,0 +1,16 @@ +function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + set(${NAMESPACE}_${LIB_NAME}_FOUND 1) +endfunction() + +get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) + +set_library_target("UNIX" "odbc" "${ROOT}/debug/lib/libodbc.so" "${ROOT}/lib/libodbc.so" "${ROOT}/include/") \ No newline at end of file diff --git a/ports/unixodbc/usage b/ports/unixodbc/usage new file mode 100644 index 00000000000000..7901a3ef2a32c7 --- /dev/null +++ b/ports/unixodbc/usage @@ -0,0 +1,4 @@ +The package unixodbc is compatible with built-in CMake targets: + + FIND_PACKAGE(unixodbc REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE UNIX::odbc) for linkage diff --git a/ports/unixodbc/vcpkg.json b/ports/unixodbc/vcpkg.json new file mode 100644 index 00000000000000..0ceb1a24fa56d1 --- /dev/null +++ b/ports/unixodbc/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "unixodbc", + "version-string": "2.3.7", + "port-version": 3, + "description": "unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux, Mac OSX, and UNIX", + "homepage": "https://github.com/lurcher/unixODBC", + "supports": "osx | linux" +} diff --git a/ports/unqlite/portfile.cmake b/ports/unqlite/portfile.cmake new file mode 100644 index 00000000000000..a976c307fb7d7c --- /dev/null +++ b/ports/unqlite/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO symisc/unqlite + REF ddb1687036d207bbfc67b98cb470fe52ddf22f62 # 1.1.9 + SHA512 eaabaf5f35662a6ea734c18878f55f5e6e956cd151bb941321f97247bbe0b7f402ceca39c191d31e87db1c04188ca0eaf69c9b202848babfe23d5ffee48df9a7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/unqlite/vcpkg.json b/ports/unqlite/vcpkg.json new file mode 100644 index 00000000000000..4efa6c6ca65888 --- /dev/null +++ b/ports/unqlite/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "unqlite", + "version-string": "1.1.9", + "description": "An embedded NoSQL, transactional database engine", + "homepage": "https://unqlite.org/", + "license": "BSD-2-Clause" +} diff --git a/ports/unrar/CONTROL b/ports/unrar/CONTROL deleted file mode 100644 index f105d84bc095d6..00000000000000 --- a/ports/unrar/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: unrar -Version: 5.5.8-2 -Homepage: https://www.rarlab.com -Description: rarlab's unrar libary diff --git a/ports/unrar/msbuild-use-default-sma.patch b/ports/unrar/msbuild-use-default-sma.patch new file mode 100644 index 00000000000000..928f5a377bedd0 --- /dev/null +++ b/ports/unrar/msbuild-use-default-sma.patch @@ -0,0 +1,52 @@ +diff --git a/UnRARDll.vcxproj b/UnRARDll.vcxproj +index ec5c17b00..7d3d91bc6 100644 +--- a/UnRARDll.vcxproj ++++ b/UnRARDll.vcxproj +@@ -138,7 +138,6 @@ + Sync + EnableFastChecks + MultiThreadedDebug +- 4Bytes + false + Use + rar.hpp +@@ -168,7 +167,6 @@ + Sync + EnableFastChecks + MultiThreadedDebug +- 4Bytes + false + Use + rar.hpp +@@ -198,7 +196,6 @@ + false + Sync + MultiThreaded +- 4Bytes + true + true + NoExtensions +@@ -239,7 +236,6 @@ + false + Sync + MultiThreaded +- 4Bytes + true + true + false +@@ -274,7 +270,6 @@ + false + Sync + MultiThreaded +- 4Bytes + true + true + NoExtensions +@@ -315,7 +310,6 @@ + false + Sync + MultiThreaded +- 4Bytes + true + true + false diff --git a/ports/unrar/portfile.cmake b/ports/unrar/portfile.cmake index 458d51783fad5d..239316f0766c9c 100644 --- a/ports/unrar/portfile.cmake +++ b/ports/unrar/portfile.cmake @@ -1,9 +1,7 @@ -include(vcpkg_common_functions) -set(UNRAR_VERSION "5.5.8") -set(UNRAR_SHA512 9eac83707fa47a03925e5f3e8adf47889064d748304b732d12a2d379ab525b441f1aa33216377d4ef445f45c4e8ad73d2cd0b560601ceac344c60571b77fd6aa) +set(UNRAR_VERSION "5.8.1") +set(UNRAR_SHA512 31303df575e8a5ed9fc03e20d0482306536c3496894a39788052c5c9dfde61eb7f5ca29b8c48354581622a020aa446f108af956ab43024a48731a12233155612) set(UNRAR_FILENAME unrarsrc-${UNRAR_VERSION}.tar.gz) -set(UNRAR_URL http://www.rarlab.com/rar/${UNRAR_FILENAME}) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/unrar) +set(UNRAR_URL https://www.rarlab.com/rar/${UNRAR_FILENAME}) vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) @@ -13,7 +11,12 @@ vcpkg_download_distfile(ARCHIVE FILENAME ${UNRAR_FILENAME} SHA512 ${UNRAR_SHA512} ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${UNRAR_VERSION} + PATCHES msbuild-use-default-sma.patch +) vcpkg_build_msbuild( PROJECT_PATH "${SOURCE_PATH}/UnRARDll.vcxproj" diff --git a/ports/unrar/vcpkg.json b/ports/unrar/vcpkg.json new file mode 100644 index 00000000000000..5646a0190afb94 --- /dev/null +++ b/ports/unrar/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "unrar", + "version-string": "5.8.1", + "port-version": 1, + "description": "rarlab's unrar library", + "homepage": "https://www.rarlab.com" +} diff --git a/ports/upb/add-all-libs-target.patch b/ports/upb/add-all-libs-target.patch new file mode 100644 index 00000000000000..701004b175579f --- /dev/null +++ b/ports/upb/add-all-libs-target.patch @@ -0,0 +1,52 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 0155a7b..7850b2d 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -66,7 +66,7 @@ endif() + enable_testing() + + add_library(port INTERFACE) +-add_library(descriptor_upbproto INTERFACE) ++add_library(descriptor_upb_proto INTERFACE) + add_library(upb + ../upb/decode.c + ../upb/decode.int.h +@@ -167,6 +167,25 @@ target_link_libraries(upb_json + upb_pb) + add_library(wyhash INTERFACE) + ++add_library(all_libs INTERFACE) ++target_link_libraries(all_libs ++ INTERFACE ++ upb ++ fastdecode ++ upb_json ++ upb_pb ++ port ++ table ++ descriptor_upb_proto ++ handlers ++ reflection ++ textformat ++) ++set_target_properties(reflection PROPERTIES OUTPUT_NAME upb_reflection) ++set_target_properties(handlers PROPERTIES OUTPUT_NAME upb_handlers) ++set_target_properties(fastdecode PROPERTIES OUTPUT_NAME upb_fastdecode) ++set_target_properties(textformat PROPERTIES OUTPUT_NAME upb_textformat) ++ + install( + DIRECTORY ../upb + DESTINATION include +@@ -184,9 +203,11 @@ install(TARGETS + upb_pb + port + table +- descriptor_upbproto ++ descriptor_upb_proto + handlers + reflection ++ textformat ++ all_libs + EXPORT upb-config + ) + install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb) diff --git a/ports/upb/add-cmake-install.patch b/ports/upb/add-cmake-install.patch new file mode 100644 index 00000000000000..0cc9aba3e87a8a --- /dev/null +++ b/ports/upb/add-cmake-install.patch @@ -0,0 +1,49 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index d4cbcc9..a6b432f 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -8,7 +8,7 @@ else() + cmake_policy(VERSION 3.12) + endif() + +-cmake_minimum_required (VERSION 3.0) ++cmake_minimum_required (VERSION 3.14) + cmake_policy(SET CMP0048 NEW) + + project(upb) +@@ -62,6 +62,7 @@ endif() + enable_testing() + + add_library(port INTERFACE) ++add_library(descriptor_upbproto INTERFACE) + add_library(upb + ../upb/decode.c + ../upb/decode.int.h +@@ -162,4 +163,27 @@ target_link_libraries(upb_json + upb_pb) + add_library(wyhash INTERFACE) + ++install( ++ DIRECTORY ../upb ++ DESTINATION include ++ FILES_MATCHING ++ PATTERN "*.h" ++ PATTERN "*.hpp" ++ PATTERN "*.inc" ++ PATTERN "*.int.h" ++) ++target_include_directories(upb PUBLIC $) ++install(TARGETS ++ upb ++ fastdecode ++ upb_json ++ upb_pb ++ port ++ table ++ descriptor_upbproto ++ handlers ++ reflection ++ EXPORT upb-config ++) ++install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb) + diff --git a/ports/upb/fix-uwp.patch b/ports/upb/fix-uwp.patch new file mode 100644 index 00000000000000..c681fa336a7a88 --- /dev/null +++ b/ports/upb/fix-uwp.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index a6b432f..003615e 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -59,6 +59,10 @@ elseif(UNIX) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id") + endif() + ++if (MSVC) ++ add_compile_options(/wd4146 /wd4703 -D_CRT_SECURE_NO_WARNINGS) ++endif() ++ + enable_testing() + + add_library(port INTERFACE) +diff --git a/upb/json_decode.c b/upb/json_decode.c +index bb33744..1fadd26 100644 +--- a/upb/json_decode.c ++++ b/upb/json_decode.c +@@ -1160,7 +1160,7 @@ static void jsondec_struct(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + static void jsondec_wellknownvalue(jsondec *d, upb_msg *msg, + const upb_msgdef *m) { + upb_msgval val; +- const upb_fielddef *f; ++ const upb_fielddef *f = NULL; + upb_msg *submsg; + + switch (jsondec_peek(d)) { diff --git a/ports/upb/no-wyhash.patch b/ports/upb/no-wyhash.patch new file mode 100644 index 00000000000000..e9754eedb72430 --- /dev/null +++ b/ports/upb/no-wyhash.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index ed494d9..0155a7b 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -84,7 +84,7 @@ add_library(upb + target_link_libraries(upb + fastdecode + port +- /third_party/wyhash) ++ ) + add_library(fastdecode + ../upb/decode.int.h + ../upb/decode_fast.c diff --git a/ports/upb/portfile.cmake b/ports/upb/portfile.cmake new file mode 100644 index 00000000000000..13fdc729050bb4 --- /dev/null +++ b/ports/upb/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO protocolbuffers/upb + REF 60607da72e89ba0c84c84054d2e562d8b6b61177 # 2020-12-19 + SHA512 d7de03f4a4024136ecccbcd3381058f26ace480f1817cbc1874a8ed4abbbad58dcf61cc77220400004927ab8e8c95ab5a2e1f27172ee3ed3bbd3f1dda2dda07c + HEAD_REF master + PATCHES + add-cmake-install.patch + fix-uwp.patch + no-wyhash.patch + add-all-libs-target.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/cmake + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/upb/vcpkg.json b/ports/upb/vcpkg.json new file mode 100644 index 00000000000000..058833064dd99f --- /dev/null +++ b/ports/upb/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "upb", + "version-date": "2020-12-19", + "port-version": 1, + "description": "μpb (often written 'upb') is a small protobuf implementation written in C.", + "homepage": "https://github.com/protocolbuffers/upb/" +} diff --git a/ports/urdfdom-headers/CONTROL b/ports/urdfdom-headers/CONTROL deleted file mode 100644 index d2399647f5ad77..00000000000000 --- a/ports/urdfdom-headers/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: urdfdom-headers -Version: 1.0.4-1 -Homepage: https://github.com/ros/urdfdom_headers -Description: The URDF (U-Robot Description Format) headers provides core data structure headers for URDF. diff --git a/ports/urdfdom-headers/fix-include-path.patch b/ports/urdfdom-headers/fix-include-path.patch new file mode 100644 index 00000000000000..6ecfad8eb9cf91 --- /dev/null +++ b/ports/urdfdom-headers/fix-include-path.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/urdfdom_headers-config.cmake.in b/cmake/urdfdom_headers-config.cmake.in +index 4686d39..026b65e 100644 +--- a/cmake/urdfdom_headers-config.cmake.in ++++ b/cmake/urdfdom_headers-config.cmake.in +@@ -3,8 +3,8 @@ if (@PACKAGE_NAME@_CONFIG_INCLUDED) + endif() + set(@PACKAGE_NAME@_CONFIG_INCLUDED TRUE) + +-set(@PACKAGE_NAME@_INCLUDE_DIRS "${@PROJECT_NAME@_DIR}/@RELATIVE_PATH_CMAKE_DIR_TO_PREFIX@/include") ++set(@PACKAGE_NAME@_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include") + +-include("${@PACKAGE_NAME@_DIR}/@PACKAGE_NAME@Export.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/@PACKAGE_NAME@Export.cmake") + + list(APPEND @PACKAGE_NAME@_TARGETS @PACKAGE_NAME@::@PACKAGE_NAME@) diff --git a/ports/urdfdom-headers/portfile.cmake b/ports/urdfdom-headers/portfile.cmake index 5f7430f767df81..eac0cb96e7c1a0 100644 --- a/ports/urdfdom-headers/portfile.cmake +++ b/ports/urdfdom-headers/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ros/urdfdom_headers - REF 00c1c9c231e46b2300d04073ad696521758fa45c - SHA512 8622cfad074454ae34be3e77c37b201adeb0e348df251e1c2fd57f35ae24817bbd2880a9c465056976eb8815fda041ba2fbd70ccb7cac6efc5ed3d7a082e80ef + REF a15d906ff16a7fcbf037687b9c63b946c0cc04a1 # 1.0.5 + SHA512 794acd3b077a1d8fa27d0a698cecbce42f3a7b30f867e79b9897b0d97dcd9e80d2cf3b0c75ee34f628f73afb871c439fffe4a1d7ed85c7fac6553fb1e5b56c36 HEAD_REF master + PATCHES fix-include-path.patch ) vcpkg_configure_cmake( @@ -23,11 +22,20 @@ else() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom_headers) endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + vcpkg_fixup_pkgconfig() +endif() + # The config files for this project use underscore if(EXISTS ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers) file(RENAME ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/urdfdom-headers/vcpkg.json b/ports/urdfdom-headers/vcpkg.json new file mode 100644 index 00000000000000..4326813b3d48b4 --- /dev/null +++ b/ports/urdfdom-headers/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "urdfdom-headers", + "version-string": "1.0.5", + "port-version": 2, + "description": "The URDF (U-Robot Description Format) headers provides core data structure headers for URDF.", + "homepage": "https://github.com/ros/urdfdom_headers" +} diff --git a/ports/urdfdom/0003_import_prefix.patch b/ports/urdfdom/0003_import_prefix.patch new file mode 100644 index 00000000000000..3353774af69c10 --- /dev/null +++ b/ports/urdfdom/0003_import_prefix.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in +index fb81b47..3ccad51 100644 +--- a/cmake/urdfdom-config.cmake.in ++++ b/cmake/urdfdom-config.cmake.in +@@ -3,6 +3,10 @@ if (@PKG_NAME@_CONFIG_INCLUDED) + endif() + set(@PKG_NAME@_CONFIG_INCLUDED TRUE) + ++# Vcpkg fix-ups ++get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) ++ + set(@PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include" "@TinyXML_INCLUDE_DIRS@") + + foreach(lib @PKG_LIBRARIES@) diff --git a/ports/urdfdom/0004_fix-dependency-console_bridge.patch b/ports/urdfdom/0004_fix-dependency-console_bridge.patch new file mode 100644 index 00000000000000..4e149b1a08dd26 --- /dev/null +++ b/ports/urdfdom/0004_fix-dependency-console_bridge.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92762f1..f0d115d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,7 @@ if (NOT MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() + +-find_package(console_bridge 0.3 REQUIRED) ++find_package(console_bridge REQUIRED) + include_directories(SYSTEM ${console_bridge_INCLUDE_DIRS}) + link_directories(${console_bridge_LIBRARY_DIRS}) + diff --git a/ports/urdfdom/CONTROL b/ports/urdfdom/CONTROL deleted file mode 100644 index 7420aaca63bd75..00000000000000 --- a/ports/urdfdom/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: urdfdom -Version: 1.0.3-1 -Homepage: https://github.com/ros/urdfdom -Description: Provides core data structures and a simple XML parsers for populating the class data structures from an URDF file. -Build-Depends: console-bridge, tinyxml, urdfdom-headers diff --git a/ports/urdfdom/portfile.cmake b/ports/urdfdom/portfile.cmake index cf5b3220b272d7..46226bc0e59bf2 100644 --- a/ports/urdfdom/portfile.cmake +++ b/ports/urdfdom/portfile.cmake @@ -1,20 +1,16 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ros/urdfdom - REF 1.0.3 - SHA512 240181d9c61dd7544f16a79a400d9a2c4dc0a682bef165b46529efcb4b31e2a34e27896933b60b9ddbaa5c4a8d575ebda42752599ff3b0a98d1eeef8f9b0b7a7 + REF 0da4b20675cdbe14b532d484a1c17df85b4e1584 # 1.0.4 + SHA512 cad59307fef466e2bbe3769a4123571d48223ea25a80dde76cb25c9f6dfc961570090d188ddaf8fc93f41f355ffa240eb00abe20cdea4a5ee3e49f56d1258686 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_use_math_defines.patch - ${CMAKE_CURRENT_LIST_DIR}/0002_fix_exports.patch + 0001_use_math_defines.patch + 0002_fix_exports.patch + 0003_import_prefix.patch + 0004_fix-dependency-console_bridge.patch ) vcpkg_configure_cmake( @@ -33,11 +29,16 @@ else() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom) endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + vcpkg_fixup_pkgconfig() +endif() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ ${CURRENT_PACKAGES_DIR}/tools/urdfdom/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) file(GLOB URDFDOM_DLLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) foreach(URDFDOM_DLL_DEBUG ${URDFDOM_DLLS_DEBUG}) @@ -51,4 +52,4 @@ foreach(URDFDOM_DLL_RELEASE ${URDFDOM_DLLS_RELEASE}) file(REMOVE ${URDFDOM_DLL_RELEASE}) endforeach() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/urdfdom/vcpkg.json b/ports/urdfdom/vcpkg.json new file mode 100644 index 00000000000000..d235316bcb11e7 --- /dev/null +++ b/ports/urdfdom/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "urdfdom", + "version-string": "1.0.4", + "port-version": 4, + "description": "Provides core data structures and a simple XML parsers for populating the class data structures from an URDF file.", + "homepage": "https://github.com/ros/urdfdom", + "dependencies": [ + "console-bridge", + "tinyxml", + "urdfdom-headers" + ] +} diff --git a/ports/urho3d/add_options.patch b/ports/urho3d/add_options.patch new file mode 100644 index 00000000000000..73a88cb4831ee7 --- /dev/null +++ b/ports/urho3d/add_options.patch @@ -0,0 +1,17 @@ +diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt +index 866fc22..ee02d2e 100644 +--- a/Source/CMakeLists.txt ++++ b/Source/CMakeLists.txt +@@ -147,8 +147,12 @@ endif () + + # In order to get clean module segregation, always exclude player/samples from AAR + if (NOT ANDROID) ++ if (URHO3D_BUILD_TOOLS) + add_subdirectory (Tools) ++ endif() ++ if (URHO3D_BUILD_SAMPLES) + add_subdirectory (Samples) ++ endif() + endif () + + if (URHO3D_EXTRAS) diff --git a/ports/urho3d/asm_files.patch b/ports/urho3d/asm_files.patch new file mode 100644 index 00000000000000..91318e1d7be1c7 --- /dev/null +++ b/ports/urho3d/asm_files.patch @@ -0,0 +1,36 @@ +diff --git a/Source/ThirdParty/AngelScript/CMakeLists.txt b/Source/ThirdParty/AngelScript/CMakeLists.txt +index 6709cf5fc..4842f20b1 100644 +--- a/Source/ThirdParty/AngelScript/CMakeLists.txt ++++ b/Source/ThirdParty/AngelScript/CMakeLists.txt +@@ -44,10 +44,10 @@ if (ARM) + elseif (MSVC AND URHO3D_64BIT) + enable_language (ASM_MASM) + # Commented out due to cmake bug - todo: Recheck if this workaround is still necessary when increasing CMake minimum version +- #set (ASM_FILES source/as_callfunc_x64_msvc_asm.asm) ++ set (ASM_FILES source/as_callfunc_x64_msvc_asm.asm) + # As a temporary workaround +- add_custom_command (OUTPUT as_callfunc_x64_msvc_asm.obj COMMAND ${CMAKE_ASM_MASM_COMPILER} -Fo ${CMAKE_CURRENT_BINARY_DIR}/as_callfunc_x64_msvc_asm.obj -c ${CMAKE_CURRENT_SOURCE_DIR}/source/as_callfunc_x64_msvc_asm.asm DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/as_callfunc_x64_msvc_asm.asm COMMENT "Temporary workaround for MASM") +- set (ASM_FILES ${CMAKE_CURRENT_BINARY_DIR}/as_callfunc_x64_msvc_asm.obj ${CMAKE_CURRENT_SOURCE_DIR}/source/as_callfunc_x64_msvc_asm.asm) ++ #add_custom_command (OUTPUT as_callfunc_x64_msvc_asm.obj COMMAND ${CMAKE_ASM_MASM_COMPILER} -Fo ${CMAKE_CURRENT_BINARY_DIR}/as_callfunc_x64_msvc_asm.obj -c ${CMAKE_CURRENT_SOURCE_DIR}/source/as_callfunc_x64_msvc_asm.asm DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/as_callfunc_x64_msvc_asm.asm COMMENT "Temporary workaround for MASM") ++ #set (ASM_FILES ${CMAKE_CURRENT_BINARY_DIR}/as_callfunc_x64_msvc_asm.obj ${CMAKE_CURRENT_SOURCE_DIR}/source/as_callfunc_x64_msvc_asm.asm) + endif () + list (APPEND SOURCE_FILES ${ASM_FILES}) + +diff --git a/Source/ThirdParty/LibCpuId/CMakeLists.txt b/Source/ThirdParty/LibCpuId/CMakeLists.txt +index 0aecafb06..677fd4b84 100644 +--- a/Source/ThirdParty/LibCpuId/CMakeLists.txt ++++ b/Source/ThirdParty/LibCpuId/CMakeLists.txt +@@ -33,10 +33,10 @@ endif () + if (MSVC AND URHO3D_64BIT) + enable_language (ASM_MASM) + # Commented out due to cmake bug +- #set (ASM_FILES src/masm-x64.asm) ++ set (ASM_FILES src/masm-x64.asm) + # As a temporary workaround +- add_custom_command (OUTPUT masm-x64.obj COMMAND ${CMAKE_ASM_MASM_COMPILER} -Fo ${CMAKE_CURRENT_BINARY_DIR}/masm-x64.obj -c ${CMAKE_CURRENT_SOURCE_DIR}/src/masm-x64.asm DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/masm-x64.asm COMMENT "Temporary workaround for MASM") +- set (ASM_FILES ${CMAKE_CURRENT_BINARY_DIR}/masm-x64.obj ${CMAKE_CURRENT_SOURCE_DIR}/src/masm-x64.asm) ++ #add_custom_command (OUTPUT masm-x64.obj COMMAND ${CMAKE_ASM_MASM_COMPILER} -Fo ${CMAKE_CURRENT_BINARY_DIR}/masm-x64.obj -c ${CMAKE_CURRENT_SOURCE_DIR}/src/masm-x64.asm DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/masm-x64.asm COMMENT "Temporary workaround for MASM") ++ #set (ASM_FILES ${CMAKE_CURRENT_BINARY_DIR}/masm-x64.obj ${CMAKE_CURRENT_SOURCE_DIR}/src/masm-x64.asm) + endif () + + # Define source files diff --git a/ports/urho3d/externalproject.patch b/ports/urho3d/externalproject.patch new file mode 100644 index 00000000000000..89d5dba7ffead7 --- /dev/null +++ b/ports/urho3d/externalproject.patch @@ -0,0 +1,12 @@ +diff --git a/Source/Urho3D/CMakeLists.txt b/Source/Urho3D/CMakeLists.txt +index ae341cb3e..743302069 100644 +--- a/Source/Urho3D/CMakeLists.txt ++++ b/Source/Urho3D/CMakeLists.txt +@@ -316,6 +316,7 @@ if (URHO3D_LUA) + else () + set (ALTERNATE_COMMAND CMAKE_COMMAND ${CMAKE_COMMAND} -E env CC=${SAVED_CC} CXX=${SAVED_CXX} CI=$ENV{CI} ${CMAKE_COMMAND}) + endif () ++ set(CMAKE_DISABLE_SOURCE_CHANGES OFF) + ExternalProject_Add (tolua++ + SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source/ThirdParty/toluapp/src/bin + CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/bin/tool -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D URHO3D_UPDATE_SOURCE_TREE=${URHO3D_UPDATE_SOURCE_TREE} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} diff --git a/ports/urho3d/fix-install.patch b/ports/urho3d/fix-install.patch new file mode 100644 index 00000000000000..50934bfc4201f5 --- /dev/null +++ b/ports/urho3d/fix-install.patch @@ -0,0 +1,187 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b8f54e9..1c23bbc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,7 +37,6 @@ set (PATH_SUFFIX Urho3D) + if (WIN32) + set (SCRIPT_EXT .bat) + if (CMAKE_HOST_WIN32) +- set (PATH_SUFFIX .) + if (URHO3D_64BIT AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + string (REPLACE " (x86)" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + endif () +@@ -45,7 +44,7 @@ if (WIN32) + else () + set (SCRIPT_EXT .sh) + endif () +-if (URHO3D_64BIT) ++if (0) + # Install to 'lib64' when one of these conditions is true + if ((MINGW AND CMAKE_CROSSCOMPILING) OR URHO3D_USE_LIB64_RPM OR (HAS_LIB64 AND NOT URHO3D_USE_LIB_DEB)) + set (LIB_SUFFIX 64) +@@ -59,7 +58,7 @@ set (DEST_LIBRARY_DIR lib${LIB_SUFFIX}/${PATH_SUFFIX}) + set (DEST_PKGCONFIG_DIR lib${LIB_SUFFIX}/pkgconfig) + # Install application launcher scripts + file (GLOB APP_SCRIPTS ${CMAKE_SOURCE_DIR}/bin/*${SCRIPT_EXT}) +-install (PROGRAMS ${APP_SCRIPTS} DESTINATION ${DEST_RUNTIME_DIR}) # DEST_RUNTIME_DIR variable is set by the set_output_directories() macro call in the UrhoCommon module ++install (PROGRAMS ${APP_SCRIPTS} DESTINATION ${DEST_SHARE_DIR}/script) # DEST_RUNTIME_DIR variable is set by the set_output_directories() macro call in the UrhoCommon module + # Install CMake modules and toolchains provided by and for Urho3D + install (DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/ DESTINATION ${DEST_SHARE_DIR}/cmake) # Note: the trailing slash is significant + # Install CMake build scripts and rakefile +diff --git a/Docs/CMakeLists.txt b/Docs/CMakeLists.txt +index 9993d07..9a58363 100644 +--- a/Docs/CMakeLists.txt ++++ b/Docs/CMakeLists.txt +@@ -99,7 +99,7 @@ if (DOXYGEN_FOUND) + execute_process (COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaPkgToDox.txt.new) + file (GLOB_RECURSE API_PKG_FILES ${CMAKE_SOURCE_DIR}/Source/Urho3D/LuaScript/pkgs/*.pkg) + add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaScriptAPI.dox +- COMMAND ${CMAKE_BINARY_DIR}/bin/tool/tolua++ -L ToDoxHook.lua -P -o ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaScriptAPI.dox ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaPkgToDox.txt ++ COMMAND ${CMAKE_BINARY_DIR}/tools/urho3d/tolua++ -L ToDoxHook.lua -P -o ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaScriptAPI.dox ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaPkgToDox.txt + DEPENDS tolua++ ${API_PKG_FILES} ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaPkgToDox.txt ${CMAKE_SOURCE_DIR}/Source/Urho3D/LuaScript/pkgs/ToDoxHook.lua + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Source/Urho3D/LuaScript/pkgs + COMMENT "Dumping LuaScript API to LuaScriptAPI.dox") +diff --git a/Source/ThirdParty/LuaJIT/CMakeLists.txt b/Source/ThirdParty/LuaJIT/CMakeLists.txt +index f1ec925..c310fcc 100644 +--- a/Source/ThirdParty/LuaJIT/CMakeLists.txt ++++ b/Source/ThirdParty/LuaJIT/CMakeLists.txt +@@ -603,7 +603,7 @@ if (NOT CMAKE_PROJECT_NAME MATCHES ^Urho3D-ExternalProject-LuaJIT AND NOT IOS AN + + # Install dependency files required by luajit + if (DEST_RUNTIME_DIR) +- install (DIRECTORY ${LUAJIT_DEP_DIR} DESTINATION ${DEST_RUNTIME_DIR}) ++ install (DIRECTORY ${LUAJIT_DEP_DIR} DESTINATION share/Urho3D) + endif () + endif () + +diff --git a/Source/ThirdParty/toluapp/src/bin/CMakeLists.txt b/Source/ThirdParty/toluapp/src/bin/CMakeLists.txt +index 0cd69fc..e761ef6 100644 +--- a/Source/ThirdParty/toluapp/src/bin/CMakeLists.txt ++++ b/Source/ThirdParty/toluapp/src/bin/CMakeLists.txt +@@ -52,7 +52,7 @@ if (URHO3D_UPDATE_SOURCE_TREE) + endif () + file (GLOB TOLUA lua/*.lua) + add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c +- COMMAND ${CMAKE_BINARY_DIR}/bin/tool/tolua++ -o ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c -H ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.h -n tolua tolua_scons.pkg 2>${NULL_DEVICE} || ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/toluabind.c ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c ++ COMMAND ${CMAKE_BINARY_DIR}/tools/urho3d/tolua++ -o ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c -H ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.h -n tolua tolua_scons.pkg 2>${NULL_DEVICE} || ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/toluabind.c ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c + ${UPDATE_COMMAND} + DEPENDS ${TOLUA} tolua_scons.pkg + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +diff --git a/Source/Tools/CMakeLists.txt b/Source/Tools/CMakeLists.txt +index 65b59d9..db8f5cd 100644 +--- a/Source/Tools/CMakeLists.txt ++++ b/Source/Tools/CMakeLists.txt +@@ -51,24 +51,24 @@ if (CMAKE_CROSSCOMPILING) + if (URHO3D_PACKAGING) + ExternalProject_Add (PackageTool + SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source/Tools/PackageTool +- CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/bin/tool -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D BAKED_CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} ++ CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/tools/urho3d -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D BAKED_CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} + ${ALTERNATE_COMMAND}) + add_make_clean_files (${CMAKE_BINARY_DIR}/bin/tool/PackageTool) + if (CMAKE_HOST_WIN32 AND NOT HAS_MKLINK) + add_dependencies (PackageTool Urho3D) # Ensure Urho3D headers are fresh when building PackageTool externally on Windows host system without MKLINK + endif () +- install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/tool/PackageTool DESTINATION ${DEST_RUNTIME_DIR}/tool) ++ install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/tool/PackageTool DESTINATION ${DEST_RUNTIME_DIR}) + endif () + if (URHO3D_GENERATEBINDINGS) + ExternalProject_Add (BindingGenerator + SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source/Tools/BindingGenerator +- CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/bin/tool -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D BAKED_CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} ++ CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/tools/urho3d -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D BAKED_CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} + ${ALTERNATE_COMMAND}) + add_make_clean_files (${CMAKE_BINARY_DIR}/bin/tool/BindingGenerator) + if (CMAKE_HOST_WIN32 AND NOT HAS_MKLINK) + add_dependencies (BindingGenerator Urho3D) + endif () +- install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/tool/BindingGenerator DESTINATION ${DEST_RUNTIME_DIR}/tool) ++ install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/tool/BindingGenerator DESTINATION ${DEST_RUNTIME_DIR}) + endif () + endif () + +diff --git a/Source/Urho3D/CMakeLists.txt b/Source/Urho3D/CMakeLists.txt +index 7433020..8161011 100644 +--- a/Source/Urho3D/CMakeLists.txt ++++ b/Source/Urho3D/CMakeLists.txt +@@ -283,7 +283,7 @@ if (URHO3D_BINDINGS) + endif () + ExternalProject_Add (AutoBinder + SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source/Clang-Tools +- CMAKE_ARGS -D URHO3D_CLANG_TOOLS=AutoBinder -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/bin/tool/clang -D DEST_INCLUDE_DIR=${DEST_INCLUDE_DIR} -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} ++ CMAKE_ARGS -D URHO3D_CLANG_TOOLS=AutoBinder -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/tools/urho3d/clang -D DEST_INCLUDE_DIR=${DEST_INCLUDE_DIR} -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} + ${ALTERNATE_COMMAND}) + add_make_clean_files (${CMAKE_BINARY_DIR}/bin/tool/clang/AutoBinder) + file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated/generated) +@@ -319,10 +319,10 @@ if (URHO3D_LUA) + set(CMAKE_DISABLE_SOURCE_CHANGES OFF) + ExternalProject_Add (tolua++ + SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source/ThirdParty/toluapp/src/bin +- CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/bin/tool -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D URHO3D_UPDATE_SOURCE_TREE=${URHO3D_UPDATE_SOURCE_TREE} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} ++ CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/tools/urho3d -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D URHO3D_UPDATE_SOURCE_TREE=${URHO3D_UPDATE_SOURCE_TREE} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} + ${TRAVIS_ANDROID_FIX} + ${ALTERNATE_COMMAND}) +- add_make_clean_files (${CMAKE_BINARY_DIR}/bin/tool/tolua++) ++ add_make_clean_files (${CMAKE_BINARY_DIR}/tools/urho3d/tolua++) + else () + # Otherwise, build it internally as per normal + add_subdirectory (../ThirdParty/toluapp/src/bin ../ThirdParty/toluapp/src/bin) +@@ -343,7 +343,7 @@ if (URHO3D_LUA) + list (APPEND LUA_GEN_CPP_FILES ${GEN_CPP_FILE}) + file (GLOB PKG_FILES LuaScript/pkgs/${DIR}/*.pkg) + add_custom_command (OUTPUT ${GEN_CPP_FILE} +- COMMAND ${CMAKE_BINARY_DIR}/bin/tool/tolua++ -E ${CMAKE_PROJECT_NAME} -L ToCppHook.lua -o ${GEN_CPP_FILE} ${NAME} ++ COMMAND ${CMAKE_BINARY_DIR}/tools/urho3d/tolua++ -E ${CMAKE_PROJECT_NAME} -L ToCppHook.lua -o ${GEN_CPP_FILE} ${NAME} + DEPENDS tolua++ ${API_PKG_FILE} ${PKG_FILES} LuaScript/pkgs/ToCppHook.lua + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/LuaScript/pkgs + COMMENT "Generating tolua++ API binding on the fly for ${DIR}") +diff --git a/cmake/Modules/UrhoCommon.cmake b/cmake/Modules/UrhoCommon.cmake +index cfac648..b196095 100644 +--- a/cmake/Modules/UrhoCommon.cmake ++++ b/cmake/Modules/UrhoCommon.cmake +@@ -1358,7 +1358,7 @@ macro (find_Urho3D_tool VAR NAME) + find_program (${VAR} ${NAME} HINTS ${ARG_HINTS} PATHS ${ARG_PATHS} PATH_SUFFIXES ${ARG_PATH_SUFFIXES} DOC ${ARG_DOC} NO_DEFAULT_PATH) + mark_as_advanced (${VAR}) # Hide it from cmake-gui in non-advanced mode + if (NOT ${VAR}) +- set (${VAR} ${CMAKE_BINARY_DIR}/bin/tool/${NAME}) ++ set (${VAR} ${CMAKE_BINARY_DIR}/tools/urho3d/${NAME}) + if (ARG_MSG_MODE AND NOT CMAKE_PROJECT_NAME STREQUAL Urho3D) + message (${ARG_MSG_MODE} + "Could not find ${VAR} tool in the Urho3D build tree or Urho3D SDK. Your project may not build successfully without this tool. " +@@ -1515,8 +1515,8 @@ macro (setup_executable) + if (ARG_TOOL) + list (APPEND TARGET_PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH YES) + if (NOT ARG_PRIVATE AND NOT DEST_RUNTIME_DIR MATCHES tool) +- set_output_directories (${CMAKE_BINARY_DIR}/bin/tool LOCAL RUNTIME PDB) +- set (RUNTIME_DIR ${CMAKE_BINARY_DIR}/bin/tool) ++ set_output_directories (${CMAKE_BINARY_DIR}/tools/urho3d LOCAL RUNTIME PDB) ++ set (RUNTIME_DIR ${CMAKE_BINARY_DIR}/tools/urho3d) + endif () + endif () + if (NOT ARG_NODEPS) +@@ -1570,7 +1570,6 @@ macro (setup_executable) + endif () + if (DIRECT3D_DLL AND NOT DIRECT3D_DLL_INSTALLED) + # Make a copy of the D3D DLL to the runtime directory in the installed location +- install (FILES ${DIRECT3D_DLL} DESTINATION ${DEST_RUNTIME_DIR}) + set (DIRECT3D_DLL_INSTALLED TRUE) + endif () + endif () +@@ -1692,7 +1691,7 @@ macro (setup_main_executable) + if (URHO3D_PACKAGING) + # Urho3D project builds the PackageTool as required; downstream project uses PackageTool found in the Urho3D build tree or Urho3D SDK + find_Urho3d_tool (PACKAGE_TOOL PackageTool +- HINTS ${CMAKE_BINARY_DIR}/bin/tool ${URHO3D_HOME}/bin/tool ++ HINTS ${CMAKE_BINARY_DIR}/tools/urho3d ${URHO3D_HOME}/bin/tool + DOC "Path to PackageTool" MSG_MODE WARNING) + if (CMAKE_PROJECT_NAME STREQUAL Urho3D) + set (PACKAGING_DEP DEPENDS PackageTool) +@@ -1741,7 +1740,7 @@ macro (setup_main_executable) + foreach (DIR ${RESOURCE_DIRS}) + list (FIND INSTALLED_RESOURCE_DIRS ${DIR} FOUND_INDEX) + if (FOUND_INDEX EQUAL -1) +- install (DIRECTORY ${DIR} DESTINATION ${DEST_SHARE_DIR}/resources) ++ install (DIRECTORY ${DIR} DESTINATION tools/urho3d) + list (APPEND INSTALLED_RESOURCE_DIRS ${DIR}) + endif () + # This cache variable is used to keep track of whether a resource directory has been instructed to be installed by CMake or not diff --git a/ports/urho3d/macosx.patch b/ports/urho3d/macosx.patch new file mode 100644 index 00000000000000..edcae1460d4cc5 --- /dev/null +++ b/ports/urho3d/macosx.patch @@ -0,0 +1,27 @@ +diff --git a/Source/ThirdParty/Assimp/contrib/zlib/gzguts.h b/Source/ThirdParty/Assimp/contrib/zlib/gzguts.h +index 6378d468a..c8563db52 100644 +--- a/Source/ThirdParty/Assimp/contrib/zlib/gzguts.h ++++ b/Source/ThirdParty/Assimp/contrib/zlib/gzguts.h +@@ -38,6 +38,9 @@ + #if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) + # include + #endif ++#ifdef __APPLE__ ++# include ++#endif + + #if defined(_WIN32) + # define WIDECHAR +diff --git a/Source/ThirdParty/Civetweb/src/civetweb.c b/Source/ThirdParty/Civetweb/src/civetweb.c +index 4d26e0a83..2bd577e81 100644 +--- a/Source/ThirdParty/Civetweb/src/civetweb.c ++++ b/Source/ThirdParty/Civetweb/src/civetweb.c +@@ -167,6 +167,8 @@ mg_static_assert(sizeof(void *) >= sizeof(int), "data type size check"); + + #endif + ++#include ++ + #if !defined(DEBUG_TRACE) + #if defined(DEBUG) + diff --git a/ports/urho3d/portfile.cmake b/ports/urho3d/portfile.cmake new file mode 100644 index 00000000000000..dafdbe1afb8d66 --- /dev/null +++ b/ports/urho3d/portfile.cmake @@ -0,0 +1,118 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO urho3d/Urho3D + REF fff115a0c0cd50b8a34dfa20b4c5f33eb4f765c8 + SHA512 4bddcd1d4165b74134a499616710c382d0463db24382aaa3111b8b38e82818053144d4ecb0ba7156589da1e18d85c0f20e0d847237291685ea80957f0bf7f8be + HEAD_REF master + PATCHES + asm_files.patch + macosx.patch + shared_libs.patch + externalproject.patch + add_options.patch + fix-install.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(URHO3D_LIB_TYPE "STATIC") +else() + set(URHO3D_LIB_TYPE "SHARED") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools URHO3D_BUILD_TOOLS + examples URHO3D_BUILD_SAMPLES +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} + -DURHO3D_LIB_TYPE=${URHO3D_LIB_TYPE} + -DURHO3D_C++11=ON + -DURHO3D_PCH=OFF +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +vcpkg_fixup_pkgconfig() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/share/Urho3D/CMake/Modules") + vcpkg_cmake_config_fixup(CONFIG_PATH share/Urho3D/CMake/Modules) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/share/CMake/Modules") + vcpkg_cmake_config_fixup(CONFIG_PATH share/CMake/Modules) +endif() + +# Handle tools +if ("tools" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_ANDROID) + vcpkg_copy_tools(TOOL_NAMES AssetImporter OgreImporter PackageTool RampGenerator ScriptCompiler SpritePacker + SEARCH_DIR "${CURRENT_PACKAGES_DIR}/tools/urho3d" + AUTO_CLEAN + ) + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/tool" "${CURRENT_PACKAGES_DIR}/debug/bin/tool") + + vcpkg_copy_tools(TOOL_NAMES Urho3DPlayer AUTO_CLEAN) + + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/Urho3DPlayer_d${VCPKG_TARGET_EXECUTABLE_SUFFIX}") +endif() + +# Handle examples +if ("examples" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_ANDROID) + file(GLOB URHO3D_BINARIES "${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + foreach(URHO3D_BINARY ${URHO3D_BINARIES}) + get_filename_component(BINARY_NAME ${URHO3D_BINARY} NAME_WE) + if (BINARY_NAME MATCHES "[0-9][0-9]\_.+") + list(APPEND URHO3D_TOOLS ${BINARY_NAME}) + endif() + endforeach() + vcpkg_copy_tools(TOOL_NAMES ${URHO3D_TOOLS} AUTO_CLEAN) + + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + foreach(URHO3D_TOOL IN_LIST ${URHO3D_TOOLS}) + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${URHO3D_TOOL}_d${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + endforeach() + endif() +endif() + +if (EXISTS "${CURRENT_PACKAGES_DIR}/bin/luajit${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + list(APPEND LUA_EXES "luajit") +endif() +if (EXISTS "${CURRENT_PACKAGES_DIR}/bin/lua${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + list(APPEND LUA_EXES "lua") +endif() +if (EXISTS "${CURRENT_PACKAGES_DIR}/bin/luac${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + list(APPEND LUA_EXES "luac") +endif() +vcpkg_copy_tools(TOOL_NAMES ${LUA_EXES} AUTO_CLEAN) + +# Cleanup +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +# Fix includes +list(APPEND SDL_RELATED_HEADERS + "${CURRENT_PACKAGES_DIR}/include/Urho3D/Input/InputConstants.h" + "${CURRENT_PACKAGES_DIR}/include/Urho3D/IO/NamedPipe.h" + "${CURRENT_PACKAGES_DIR}/include/Urho3D/IO/RWOpsWrapper.h" +) +foreach (SDL_RELATED_HEADER ${SDL_RELATED_HEADERS}) + vcpkg_replace_string("${SDL_RELATED_HEADER}" + "#include + Level3 + Disabled +- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T;HAVE_LIBIMOBILEDEVICE ++ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T;HAVE_LIBIMOBILEDEVICE;HAVE_ENUM_IDEVICE_CONNECTION_TYPE;PACKAGE_URL="";PACKAGE_BUGREPORT="" + 4013 + + +@@ -144,7 +144,7 @@ + + Level3 + Disabled +- _DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;WIN32;HAVE_LIBIMOBILEDEVICE ++ _DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;WIN32;HAVE_LIBIMOBILEDEVICE;HAVE_ENUM_IDEVICE_CONNECTION_TYPE;PACKAGE_URL="";PACKAGE_BUGREPORT="" + + + Console +@@ -160,7 +160,7 @@ + MaxSpeed + true + true +- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T;HAVE_LIBIMOBILEDEVICE ++ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T;HAVE_LIBIMOBILEDEVICE;HAVE_ENUM_IDEVICE_CONNECTION_TYPE;PACKAGE_URL="";PACKAGE_BUGREPORT="" + 4013 + + +@@ -179,7 +179,7 @@ + MaxSpeed + true + true +- NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;WIN32;HAVE_LIBIMOBILEDEVICE ++ NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;WIN32;HAVE_LIBIMOBILEDEVICE;HAVE_ENUM_IDEVICE_CONNECTION_TYPE;PACKAGE_URL="";PACKAGE_BUGREPORT="" + + + Console diff --git a/ports/usbmuxd/portfile.cmake b/ports/usbmuxd/portfile.cmake index 6f952633a3c621..c9ac23d3593a2c 100644 --- a/ports/usbmuxd/portfile.cmake +++ b/ports/usbmuxd/portfile.cmake @@ -1,13 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libimobiledevice-win32/usbmuxd - REF v1.2.76 - SHA512 b1bb479bf4ba0a71d7b70f55db4d01b68e024fe559265947e096d85cd736e4cc23c9ddbe07360641b63a5e1276c243e7fe2aa557323d1f5d22058c9a45de4f1a + REF f1329e742825c93fd080bdb8253d710ef8b6f751 # v1.2.235 + SHA512 3259040a3266ce068a6fa1fdecdea824d22f04391ca073fc61d72a1f6d401d93469b9681ddc89a8016ef410bb7443875b2c5df2b571227dd34c66248cbe87fe7 HEAD_REF master-msvc PATCHES fix-dependence-pthreads.patch + fix-definitions.patch ) vcpkg_install_msbuild( diff --git a/ports/usbmuxd/vcpkg.json b/ports/usbmuxd/vcpkg.json new file mode 100644 index 00000000000000..7f660afafd2324 --- /dev/null +++ b/ports/usbmuxd/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "usbmuxd", + "version-string": "1.2.235", + "port-version": 1, + "description": "A socket daemon to multiplex connections from and to iOS devices", + "homepage": "http://www.libimobiledevice.org", + "dependencies": [ + "libimobiledevice", + "libusb", + "libusb-win32", + "pthreads" + ] +} diff --git a/ports/usd/CONTROL b/ports/usd/CONTROL deleted file mode 100644 index d14831d543bc14..00000000000000 --- a/ports/usd/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: usd -Version: 0.8.4-2 -Build-Depends: boost-assign, boost-crc, boost-date-time, boost-filesystem, boost-format, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-vmd, tbb, zlib -Description: Universal Scene Description (USD) is an efficient, scalable system for authoring, reading, and streaming time-sampled scene description for interchange between graphics applications. diff --git a/ports/usd/fix_build-location.patch b/ports/usd/fix_build-location.patch new file mode 100644 index 00000000000000..34d77cae637ab6 --- /dev/null +++ b/ports/usd/fix_build-location.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/macros/Private.cmake b/cmake/macros/Private.cmake +index 3825e2a19..0a79b49bd 100644 +--- a/cmake/macros/Private.cmake ++++ b/cmake/macros/Private.cmake +@@ -1238,7 +1238,7 @@ function(_pxr_library NAME) + MFB_PACKAGE_NAME=${PXR_PACKAGE} + MFB_ALT_PACKAGE_NAME=${PXR_PACKAGE} + MFB_PACKAGE_MODULE=${pythonModuleName} +- PXR_BUILD_LOCATION=usd ++ PXR_BUILD_LOCATION=../lib/usd + PXR_PLUGIN_BUILD_LOCATION=../plugin/usd + ${pxrInstallLocation} + ${pythonModulesEnabled} diff --git a/ports/usd/portfile.cmake b/ports/usd/portfile.cmake index 76b1473be7acac..6abb5c15e33930 100644 --- a/ports/usd/portfile.cmake +++ b/ports/usd/portfile.cmake @@ -1,20 +1,27 @@ +vcpkg_fail_port_install(ON_ARCH "x86") + # Don't file if the bin folder exists. We need exe and custom files. SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO PixarAnimationStudios/USD - REF v19.05 - SHA512 4d708835f6efd539d5fff5cbaf0ec4d68c6d0c4d813ee531c4b9589ee585b720c34e993ef0a7ad0104a921ebd7ab8dec46d0c9284ec7f11993057fe81d3729e0 + REF 71b4baace2044ea4400ba802e91667f9ebe342f0 # v20.08 + SHA512 0f23b84d314d88d3524f22ebc344e2b506cb7e8ac064726df432a968a4bae0fd2249e968bd10845de9067290eaaa3f8c9e2a483551ffc06b826f3eba816061a9 HEAD_REF master + PATCHES + fix_build-location.patch ) vcpkg_find_acquire_program(PYTHON2) get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) vcpkg_add_to_path("${PYTHON2_DIR}") +IF (VCPKG_TARGET_IS_WINDOWS) +ELSE() +file(REMOVE ${SOURCE_PATH}/cmake/modules/FindTBB.cmake) +ENDIF() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -27,6 +34,9 @@ vcpkg_configure_cmake( -DPXR_BUILD_TESTS:BOOL=OFF -DPXR_BUILD_USD_IMAGING:BOOL=OFF -DPXR_ENABLE_PYTHON_SUPPORT:BOOL=OFF + -DPXR_BUILD_EXAMPLES:BOOL=OFF + -DPXR_BUILD_TUTORIALS:BOOL=OFF + -DPXR_BUILD_USD_TOOLS:BOOL=OFF ) vcpkg_install_cmake() @@ -36,7 +46,7 @@ file( "${CURRENT_PACKAGES_DIR}/pxrConfig.cmake" "${CURRENT_PACKAGES_DIR}/cmake/pxrConfig.cmake") -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/pxr) vcpkg_copy_pdbs() @@ -44,14 +54,32 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file( - COPY ${SOURCE_PATH}/LICENSE.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/usd/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) # Move all dlls to bin file(GLOB RELEASE_DLL ${CURRENT_PACKAGES_DIR}/lib/*.dll) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) file(GLOB DEBUG_DLL ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) foreach(CURRENT_FROM ${RELEASE_DLL} ${DEBUG_DLL}) string(REPLACE "/lib/" "/bin/" CURRENT_TO ${CURRENT_FROM}) file(RENAME ${CURRENT_FROM} ${CURRENT_TO}) endforeach() + +function(file_replace_regex filename match_string replace_string) + file(READ ${filename} _contents) + string(REGEX REPLACE "${match_string}" "${replace_string}" _contents "${_contents}") + file(WRITE ${filename} "${_contents}") +endfunction() + +# fix dll path for cmake +file_replace_regex(${CURRENT_PACKAGES_DIR}/share/pxr/pxrConfig.cmake "/cmake/pxrTargets.cmake" "/pxrTargets.cmake") +file_replace_regex(${CURRENT_PACKAGES_DIR}/share/pxr/pxrTargets-debug.cmake "debug/lib/([a-zA-Z0-9_]+)\\.dll" "debug/bin/\\1.dll") +file_replace_regex(${CURRENT_PACKAGES_DIR}/share/pxr/pxrTargets-release.cmake "lib/([a-zA-Z0-9_]+)\\.dll" "bin/\\1.dll") + +# fix plugInfo.json for runtime +file(GLOB_RECURSE PLUGINFO_FILES ${CURRENT_PACKAGES_DIR}/lib/usd/*/resources/plugInfo.json) +file(GLOB_RECURSE PLUGINFO_FILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/usd/*/resources/plugInfo.json) +foreach(PLUGINFO ${PLUGINFO_FILES} ${PLUGINFO_FILES_DEBUG}) + file_replace_regex(${PLUGINFO} [=["LibraryPath": "../../([a-zA-Z0-9_]+).dll"]=] [=["LibraryPath": "../../../bin/\1.dll"]=]) +endforeach() diff --git a/ports/usd/vcpkg.json b/ports/usd/vcpkg.json new file mode 100644 index 00000000000000..e284433ec8fbb2 --- /dev/null +++ b/ports/usd/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "usd", + "version-string": "20.08", + "port-version": 1, + "description": "Universal Scene Description (USD) is an efficient, scalable system for authoring, reading, and streaming time-sampled scene description for interchange between graphics applications.", + "homepage": "https://github.com/PixarAnimationStudios/USD", + "supports": "!x86", + "dependencies": [ + "boost-assign", + "boost-crc", + "boost-date-time", + "boost-filesystem", + "boost-format", + "boost-multi-index", + "boost-program-options", + "boost-regex", + "boost-system", + "boost-vmd", + "tbb", + "zlib" + ] +} diff --git a/ports/usockets/CMakeLists.txt b/ports/usockets/CMakeLists.txt index 21f6294e8dc9a8..a57ce6b08a626e 100644 --- a/ports/usockets/CMakeLists.txt +++ b/ports/usockets/CMakeLists.txt @@ -20,6 +20,29 @@ include_directories(APPEND "${CMAKE_CURRENT_LIST_DIR}/src") file(GLOB SOURCES src/*.c src/eventing/*.c) +set(USOCKETS_EXT_INCLUDE_DIR ) +set(USOCKETS_EXT_LIBS ) + +if (CMAKE_USE_OPENSSL) + # It requires C++17 or later, see https://github.com/uNetworking/uSockets/blob/master/Makefile#L43 + set(CMAKE_CXX_STANDARD 17) + find_package(OpenSSL REQUIRED) + file(GLOB SSL_SOURCES src/crypto/*.c*) + list(APPEND SOURCES ${SSL_SOURCES}) + list(APPEND USOCKETS_EXT_LIBS OpenSSL::SSL OpenSSL::Crypto) +endif() + +if (CMAKE_USE_EVENT) + file(GLOB SSL_SOURCES src/eventing/*.c) + list(APPEND SOURCES ${SSL_SOURCES}) + list(APPEND USOCKETS_EXT_INCLUDE_DIR src/internal/eventing) +endif() + +if (CMAKE_USE_NETWORK) + list(APPEND USOCKETS_EXT_INCLUDE_DIR src/internal/networking) + list(APPEND USOCKETS_EXT_LIBS Ws2_32) +endif() + add_library(uSockets ${SOURCES}) if (${LIBUS_USE_LIBUV}) @@ -27,8 +50,8 @@ if (${LIBUS_USE_LIBUV}) endif() target_compile_definitions(uSockets PRIVATE ${NOT_USE_OPENSSL} ${USE_OPENSSL}) -target_include_directories(uSockets PUBLIC ${OPENSSL_INCLUDE_DIR} ${LIBUV_INCLUDE_DIR} ) -target_link_libraries(uSockets PUBLIC ${OPENSSL_LIBRARIES} ${LIBUV_LIBRARY}) +target_include_directories(uSockets PUBLIC ${OPENSSL_INCLUDE_DIR} ${LIBUV_INCLUDE_DIR} ${USOCKETS_EXT_INCLUDE_DIR}) +target_link_libraries(uSockets PUBLIC ${OPENSSL_LIBRARIES} ${LIBUV_LIBRARY} ${USOCKETS_EXT_LIBS}) install(TARGETS uSockets RUNTIME DESTINATION bin diff --git a/ports/usockets/CONTROL b/ports/usockets/CONTROL deleted file mode 100644 index 69db6dce9584b6..00000000000000 --- a/ports/usockets/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: usockets -Version: 0.3.1 -Build-Depends:libuv -Description: Miniscule cross-platform eventing, networking & crypto for async applications \ No newline at end of file diff --git a/ports/usockets/portfile.cmake b/ports/usockets/portfile.cmake index c5b92f84fd599c..cdb75c5d3d8f6d 100644 --- a/ports/usockets/portfile.cmake +++ b/ports/usockets/portfile.cmake @@ -1,26 +1,31 @@ -include(vcpkg_common_functions) - -IF (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +IF (NOT VCPKG_TARGET_IS_LINUX) set(USE_LIBUV ON) EndIF () vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uNetworking/uSockets - REF v0.3.1 - SHA512 f02b72844fb87acbf435d86a89e55244e45e047b049f36bda8e89c9ddeba8d7e6432008d33d33771faec60dcca60a3e3bfa3918c3af08ba80741e09df62c91fd + REF 5440dbac79bd76444175b76ee95dfcade12a6aac # 0.7.1 + SHA512 d4827982a288c81edfcb167cfa6ee8fe11bbae90d25ed9086c006cf6098dfad8b6b910f8fb93ecc67fbea76452627dd4666c7ae3d74fb20112f8e22f7091ec11 HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -set(USE_OPENSSL OFF) +if ("network" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature network only support Windows") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + ssl CMAKE_USE_OPENSSL + event CMAKE_USE_EVENT + network CMAKE_USE_NETWORK +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DCMAKE_USE_OPENSSL=${USE_OPENSSL} + OPTIONS ${FEATURE_OPTIONS} -DLIBUS_USE_LIBUV=${USE_LIBUV} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF @@ -28,7 +33,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/usockets) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/usockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/usockets/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/usockets/vcpkg.json b/ports/usockets/vcpkg.json new file mode 100644 index 00000000000000..49a66360296cdd --- /dev/null +++ b/ports/usockets/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "usockets", + "version": "0.7.1", + "description": "Miniscule cross-platform eventing, networking & crypto for async applications", + "homepage": "https://github.com/uNetworking/uSockets", + "dependencies": [ + "libuv" + ], + "features": { + "event": { + "description": "Build usockets with epoll support" + }, + "network": { + "description": "Build usockets with winsock support", + "dependencies": [ + "winsock2" + ] + }, + "ssl": { + "description": "Build usockets with openssl support", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/ports/usrsctp/CONTROL b/ports/usrsctp/CONTROL deleted file mode 100644 index 42699473266e48..00000000000000 --- a/ports/usrsctp/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: usrsctp -Version: 35c1d97020a-2 -Description: This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows. diff --git a/ports/usrsctp/portfile.cmake b/ports/usrsctp/portfile.cmake index 416cdc6c33d026..f560279e5e8651 100644 --- a/ports/usrsctp/portfile.cmake +++ b/ports/usrsctp/portfile.cmake @@ -1,29 +1,24 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sctplab/usrsctp - REF 35c1d97020a20014b989bba4f20225fd9429c4f4 - SHA512 18786825ec2c8c8aeb6b0bcab97deeac40420f7a9bdb427c891b26633ff759266409381ae2545c5572a740322ae1a56f80da1a784d71e50fce97177c343d27ce + REF 0.9.5.0 + SHA512 7b28706449f9365ba9750fd39925e7171516a1e3145d123ec69a12486637ae2393ad4c587b056403298dc13c149f0b01a262cbe4852abca42e425d7680c77ee3 HEAD_REF master ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -Dsctp_werror=OFF -Dsctp_build_programs=OFF + OPTIONS + -Dsctp_werror=OFF + -Dsctp_build_programs=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/lib/usrsctp.dll - ${CURRENT_PACKAGES_DIR}/lib/usrsctp.dll -) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/usrsctp/copyright COPYONLY) +configure_file("${SOURCE_PATH}/LICENSE.md" "${CURRENT_PACKAGES_DIR}/share/usrsctp/copyright" COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/usrsctp/vcpkg.json b/ports/usrsctp/vcpkg.json new file mode 100644 index 00000000000000..64d475e3bfda8d --- /dev/null +++ b/ports/usrsctp/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "usrsctp", + "version": "0.9.5.0", + "description": "A userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/utf8h/CONTROL b/ports/utf8h/CONTROL deleted file mode 100644 index 5f1acf4c0395d7..00000000000000 --- a/ports/utf8h/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: utf8h -Version: 841cb2deb8eb806e73fff0e1f43a11fca4f5da45 -Description: Single header utf8 string functions for C and C++ diff --git a/ports/utf8h/portfile.cmake b/ports/utf8h/portfile.cmake index 11b35c21a378b3..e8167fe466f752 100644 --- a/ports/utf8h/portfile.cmake +++ b/ports/utf8h/portfile.cmake @@ -1,15 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sheredom/utf8.h - REF 841cb2deb8eb806e73fff0e1f43a11fca4f5da45 - SHA512 cce44011abc58556c031c0de1018b83225bdbbc0e8d7374e3fd6f0b63c8e200086c49e7caac61b559f1e6d5a7ad349a58a13876a1b1341c18349a5cee59a105b + REF 817789676b1c3ac9b117a0f9e04378d3e33a79be + SHA512 3e8455cbc03fa02b1f6f87832c89104510012e8dda968fd56ad5661ffb1c40498e59ea7b65f41f551233f28ee526974086efad3dd767bf944844a3ffede04e1d HEAD_REF master ) -# Copy the utf8h header files file(COPY ${SOURCE_PATH}/utf8.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/utf8h) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/utf8h RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/utf8h/vcpkg.json b/ports/utf8h/vcpkg.json new file mode 100644 index 00000000000000..06b6c330ae3d69 --- /dev/null +++ b/ports/utf8h/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "utf8h", + "version-string": "2020-06-14", + "port-version": 1, + "description": "Single header utf8 string functions for C and C++", + "homepage": "https://github.com/sheredom/utf8.h" +} diff --git a/ports/utf8proc/CONTROL b/ports/utf8proc/CONTROL deleted file mode 100644 index 4afe2da7ce7b20..00000000000000 --- a/ports/utf8proc/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: utf8proc -Version: 2.4.0 -Homepage: https://github.com/JuliaLang/utf8proc -Description: Clean C library for processing UTF-8 Unicode data. diff --git a/ports/utf8proc/export-cmake-targets.patch b/ports/utf8proc/export-cmake-targets.patch new file mode 100644 index 00000000000000..9c75e4a46b88dc --- /dev/null +++ b/ports/utf8proc/export-cmake-targets.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ea6b80e..5e5e829 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,7 +22,7 @@ add_library (utf8proc + ) + + # expose header path, for when this is part of a larger cmake project +-target_include_directories(utf8proc PUBLIC .) ++target_include_directories(utf8proc PUBLIC $ $) + + if (BUILD_SHARED_LIBS) + # Building shared library +@@ -51,10 +51,13 @@ set_target_properties (utf8proc PROPERTIES + + if (UTF8PROC_INSTALL) + install(TARGETS utf8proc ++ EXPORT unofficial-utf8proc-config + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + ++ install(EXPORT unofficial-utf8proc-config DESTINATION share/unofficial-utf8proc) ++ + install( + FILES + "${PROJECT_SOURCE_DIR}/utf8proc.h" diff --git a/ports/utf8proc/fix-buildsystem.patch b/ports/utf8proc/fix-buildsystem.patch deleted file mode 100644 index 17af16c9ba47e3..00000000000000 --- a/ports/utf8proc/fix-buildsystem.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index be676ba..7a2b6d8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -13,9 +13,9 @@ set(SO_MAJOR 2) - set(SO_MINOR 1) - set(SO_PATCH 0) - --add_definitions ( -- -DUTF8PROC_EXPORTS --) -+if(BUILD_SHARED_LIBS) -+ add_definitions(-DUTF8PROC_EXPORTS -DUTF8PROC_SHARED) -+endif() - - if (NOT MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=c99 -pedantic -Wall") -@@ -31,3 +31,10 @@ set_target_properties (utf8proc PROPERTIES - VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}" - SOVERSION ${SO_MAJOR} - ) -+ -+install(TARGETS utf8proc -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib) -+ -+install(FILES utf8proc.h DESTINATION include) -diff --git a/utf8proc.h b/utf8proc.h -index edf46d4..7b3f11a 100644 ---- a/utf8proc.h -+++ b/utf8proc.h -@@ -120,13 +120,13 @@ typedef bool utf8proc_bool; - #endif - #include - --#ifdef _WIN32 -+#if defined _WIN32 && defined UTF8PROC_SHARED - # ifdef UTF8PROC_EXPORTS - # define UTF8PROC_DLLEXPORT __declspec(dllexport) - # else - # define UTF8PROC_DLLEXPORT __declspec(dllimport) - # endif --#elif __GNUC__ >= 4 -+#elif __GNUC__ >= 4 && defined UTF8PROC_SHARED - # define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default"))) - #else - # define UTF8PROC_DLLEXPORT diff --git a/ports/utf8proc/portfile.cmake b/ports/utf8proc/portfile.cmake index 113f4d6d868ca0..e8e4f9c05db097 100644 --- a/ports/utf8proc/portfile.cmake +++ b/ports/utf8proc/portfile.cmake @@ -1,28 +1,33 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO JuliaLang/utf8proc - REF v2.4.0 - SHA512 2bbd056b488cd30faca26618389d8af84edc39ade9b705e147b676bf39eee65b40239d01c32c46dfc2a289d79e869ed1bb3c347365603dcaab2f69e34427441a) + REF 3203baa7374d67132384e2830b2183c92351bffc # v2.6.1 + SHA512 582831c4c2d118f1c6f9e6de812878b96428d8fa1b9a2bbca32633a3853cb1981c917c724d2a8db51282ed13fd1654ca45f5d227731f5b90b17e7fc3acc93b07 + PATCHES + export-cmake-targets.patch +) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch) - -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA) + OPTIONS + -DUTF8PROC_ENABLE_TESTING=OFF + -DUTF8PROC_INSTALL=ON +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-utf8proc CONFIG_PATH share/unofficial-utf8proc) -vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(READ ${CURRENT_PACKAGES_DIR}/include/utf8proc.h UTF8PROC_H) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(READ "${CURRENT_PACKAGES_DIR}/include/utf8proc.h" UTF8PROC_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) string(REPLACE "defined UTF8PROC_SHARED" "0" UTF8PROC_H "${UTF8PROC_H}") else() string(REPLACE "defined UTF8PROC_SHARED" "1" UTF8PROC_H "${UTF8PROC_H}") endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/utf8proc.h "${UTF8PROC_H}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/utf8proc.h" "${UTF8PROC_H}") -file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/utf8proc) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/utf8proc/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/utf8proc/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/utf8proc/vcpkg.json b/ports/utf8proc/vcpkg.json new file mode 100644 index 00000000000000..4ecd90926b7e3c --- /dev/null +++ b/ports/utf8proc/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "utf8proc", + "version": "2.6.1", + "description": "Clean C library for processing UTF-8 Unicode data.", + "homepage": "https://github.com/JuliaLang/utf8proc", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/utfcpp/CONTROL b/ports/utfcpp/CONTROL deleted file mode 100644 index fd18722416cdac..00000000000000 --- a/ports/utfcpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: utfcpp -Version: 3.1 -Homepage: https://github.com/nemtrif/utfcpp -Description: UTF-8 with C++ in a Portable Way diff --git a/ports/utfcpp/portfile.cmake b/ports/utfcpp/portfile.cmake index bbbfe663fa1d12..7eb0f624237aa0 100644 --- a/ports/utfcpp/portfile.cmake +++ b/ports/utfcpp/portfile.cmake @@ -1,16 +1,29 @@ -#header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nemtrif/utfcpp - REF v3.1 - SHA512 826ac7aa61215ac2144fa3f5edc7f291c3dd25dc69b0c82526840f4651f822515ec262915e1117d975e5c5dd729f6166806a5d397262f59a2b323eb7009671f5 + REF v3.2.1 + SHA512 5798487f12b1bc55d3e06aed38f7604271ca3402963efcf85d181fd590d8a088d21e961e77698e60dc2cdae8cf4506645903442c45fd328201752d9589180e0d HEAD_REF master ) -# Put the licence file where vcpkg expects it -file(INSTALL ${SOURCE_PATH}/source/utf8.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/utfcpp RENAME copyright) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUTF8_INSTALL=ON + -DUTF8_SAMPLES=OFF + -DUTF8_TESTS=OFF +) + +vcpkg_install_cmake() + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/utf8cpp) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/utf8cpp TARGET_PATH share/utf8cpp) +endif() + +# Header only +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) -# Copy the utf8-cpp header files -file(COPY ${SOURCE_PATH}/source/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/utfcpp/vcpkg.json b/ports/utfcpp/vcpkg.json new file mode 100644 index 00000000000000..d7f0c4639c0cee --- /dev/null +++ b/ports/utfcpp/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "utfcpp", + "version": "3.2.1", + "description": "UTF-8 with C++ in a Portable Way", + "homepage": "https://github.com/nemtrif/utfcpp" +} diff --git a/ports/utfz/CONTROL b/ports/utfz/CONTROL deleted file mode 100644 index 1212c4d6d8b83c..00000000000000 --- a/ports/utfz/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: utfz -Version: 1.2-1 -Homepage: https://github.com/IMQS/utfz -Description: A tiny C++ library for parsing and encoding utf-8 diff --git a/ports/utfz/portfile.cmake b/ports/utfz/portfile.cmake index 27b5d17c4e01f6..d81f1aeb179620 100644 --- a/ports/utfz/portfile.cmake +++ b/ports/utfz/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IMQS/utfz diff --git a/ports/utfz/vcpkg.json b/ports/utfz/vcpkg.json new file mode 100644 index 00000000000000..480e32b4d1e75a --- /dev/null +++ b/ports/utfz/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "utfz", + "version-string": "1.2", + "port-version": 2, + "description": "A tiny C++ library for parsing and encoding utf-8", + "homepage": "https://github.com/IMQS/utfz" +} diff --git a/ports/uthash/portfile.cmake b/ports/uthash/portfile.cmake new file mode 100644 index 00000000000000..c84a29b383cdcc --- /dev/null +++ b/ports/uthash/portfile.cmake @@ -0,0 +1,13 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO troydhanson/uthash + REF e493aa90a2833b4655927598f169c31cfcdf7861 + SHA512 a4a2cdee11b238f57bdc3104eee1b3d2014359b65ada896dd26c7f21dda13921f63b44d3d0e7b6fa03731f64b4b4013861d0a49df8b54d7e3726454cbfebaa39 + HEAD_REF master +) + +file(GLOB uthash_PUBLIC_HEADERS ${SOURCE_PATH}/src/*.h) +file(INSTALL ${uthash_PUBLIC_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/uthash/vcpkg.json b/ports/uthash/vcpkg.json new file mode 100644 index 00000000000000..46e36906e3af56 --- /dev/null +++ b/ports/uthash/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "uthash", + "version-semver": "2.3.0", + "description": "C macros for hash tables and more.", + "homepage": "https://troydhanson.github.io/uthash/", + "license": "BSD-1-Clause" +} diff --git a/ports/uthenticode/portfile.cmake b/ports/uthenticode/portfile.cmake new file mode 100644 index 00000000000000..236d72bf20dfa7 --- /dev/null +++ b/ports/uthenticode/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO trailofbits/uthenticode + REF v1.0.4 + SHA512 82d5ff61071adefec886a140d253b733cb2318ccf34e831087973b05f7e274b207031e606303f65269a5ed1b45c3c599d79e217cf6229d60c8cc2396e842f32e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/uthenticode TARGET_PATH share/uthenticode) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file( + INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/ports/uthenticode/vcpkg.json b/ports/uthenticode/vcpkg.json new file mode 100644 index 00000000000000..5bca1b7437e905 --- /dev/null +++ b/ports/uthenticode/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "uthenticode", + "version-string": "1.0.4", + "port-version": 1, + "description": "A cross-platform library for verifying Authenticode signatures", + "homepage": "https://github.com/trailofbits/uthenticode", + "supports": "!uwp", + "dependencies": [ + "openssl", + "pe-parse" + ] +} diff --git a/ports/uvatlas/CONTROL b/ports/uvatlas/CONTROL deleted file mode 100644 index 972c6741b12296..00000000000000 --- a/ports/uvatlas/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: uvatlas -Version: apr2019 -Homepage: https://github.com/Microsoft/UVAtlas -Description: UVAtlas isochart texture atlas \ No newline at end of file diff --git a/ports/uvatlas/portfile.cmake b/ports/uvatlas/portfile.cmake index df0d322b3080ba..a8888d05cdb235 100644 --- a/ports/uvatlas/portfile.cmake +++ b/ports/uvatlas/portfile.cmake @@ -1,52 +1,65 @@ -include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) - -if(VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "UVAtlas only supports Windows Desktop") -endif() +vcpkg_fail_port_install(ON_TARGET "OSX") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/UVAtlas - REF 8309d95904d3a8f3559d73e07f3a0472f161c28b - SHA512 e0031812824f179dffdec487b2e70fc80748a722c4bccf67a7e0bd865700b6e61e1f14160557a1a797a84a9e7cc559f5e66bd8cabd5da4728ee479e4247d9aa2 + REF jun2021b + SHA512 d08bacacba324ddf60b003c5cbd5ad715bdbc1cf352a0dc9de58c40fd8f4bcbb562b8285ff1a443453399167a96e5b1af51d32ffc5e1e8f65391ef124c0706d4 HEAD_REF master ) -IF(TRIPLET_SYSTEM_ARCH MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSE() - SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -ENDIF() +if (VCPKG_HOST_IS_LINUX) + message(WARNING "Build ${PORT} requires GCC version 9 or later") +endif() -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/UVAtlas/UVAtlas_2015.sln - PLATFORM ${BUILD_ARCH} +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + eigen ENABLE_USE_EIGEN ) -file(INSTALL - ${SOURCE_PATH}/UVAtlas/Inc/ - DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL - ${SOURCE_PATH}/UVAtlas/Bin/Desktop_2015/${BUILD_ARCH}/Release/UVAtlas.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL - ${SOURCE_PATH}/UVAtlas/Bin/Desktop_2015/${BUILD_ARCH}/Debug/UVAtlas.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -vcpkg_download_distfile(uvatlastool - URLS "https://github.com/Microsoft/UVAtlas/releases/download/sept2016/uvatlastool.exe" - FILENAME "uvatlastool.exe" - SHA512 2583ba8179d0a58fb85d871368b17571e36242436b5a5dbaf6f99ec2f2ee09f4e11e8f922b29563da3cb3b5bacdb771036c84d5b94f405c7988bfe5f2881c3df +if(VCPKG_TARGET_IS_UWP) + set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF) +else() + set(EXTRA_OPTIONS -DBUILD_TOOLS=ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS} ) -file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/uvatlas/") +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64) AND (NOT ("eigen" IN_LIST FEATURES))) + vcpkg_download_distfile( + UVATLASTOOL_EXE + URLS "https://github.com/Microsoft/UVAtlas/releases/download/jun2021/uvatlastool.exe" + FILENAME "uvatlastool-jun2021.exe" + SHA512 af2e57a2d6aa41b53784c78ea8b5e181bb6ea6f66b23bfb3710ae3d7aebf3184c1739d02822a1eab438ebaac5fccb053bfac29b77d5ce81ae1f9c8e0bd396b49 + ) + + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/uvatlas/") + + file(INSTALL + ${UVATLASTOOL_EXE} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/uvatlas/) + + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/uvatlas/uvatlastool-jun2021.exe ${CURRENT_PACKAGES_DIR}/tools/uvatlas/uvatlastool.exe) + +elseif((VCPKG_TARGET_IS_WINDOWS) AND (NOT VCPKG_TARGET_IS_UWP)) + + vcpkg_copy_tools( + TOOL_NAMES uvatlastool + SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake + ) + +endif() -file(INSTALL - ${DOWNLOADS}/uvatlastool.exe - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/uvatlas/) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvatlas) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/uvatlas/LICENSE ${CURRENT_PACKAGES_DIR}/share/uvatlas/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/uvatlas/vcpkg.json b/ports/uvatlas/vcpkg.json new file mode 100644 index 00000000000000..4f5a81fee004c9 --- /dev/null +++ b/ports/uvatlas/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "uvatlas", + "version-string": "jun2021b", + "description": "UVAtlas isochart texture atlas", + "homepage": "https://github.com/Microsoft/UVAtlas", + "documentation": "https://github.com/Microsoft/UVAtlas/wiki", + "license": "MIT", + "supports": "windows | linux", + "dependencies": [ + "directx-headers", + "directxmath", + { + "name": "directxmesh", + "platform": "!(uwp | linux)" + }, + { + "name": "directxtex", + "platform": "!(uwp | linux)" + } + ], + "features": { + "eigen": { + "description": "Use Eigen & Spectra for eigen-value computations", + "dependencies": [ + "eigen3", + "spectra" + ] + } + } +} diff --git a/ports/uvw/CONTROL b/ports/uvw/CONTROL deleted file mode 100644 index a3507632b31490..00000000000000 --- a/ports/uvw/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: uvw -Version: 1.17.0_libuv-v1.29-1 -Description: Header-only, event based, tiny and easy to use libuv wrapper in modern C++. -Homepage: https://github.com/skypjack/uvw -Build-Depends: libuv diff --git a/ports/uvw/portfile.cmake b/ports/uvw/portfile.cmake index ba640b597a08ac..a6eb493e79f073 100644 --- a/ports/uvw/portfile.cmake +++ b/ports/uvw/portfile.cmake @@ -1,11 +1,9 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO skypjack/uvw - REF v1.17.0_libuv-v1.29 - SHA512 2e3ee6e55950185e1889c99b07d63d811d89ad20705253ad699a828073f5ea7860616e0ae980232c7819d3fd21a4cb7a2e9d084fd8c4f40b19951106f08b9ad0 + REF 77af4a3fc4d932a52652807506fc50d0e58e875c # v2.7.0_libuv_v1.39 + SHA512 b9ee4a60928fbcea84a9c551ce4d97095db68352546054116ecc8303eaeb46aecaef15ca2e5d3ebd14d8292be798fdea50b353ffdc727faa43c23cfd314ea407 ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/uvw/vcpkg.json b/ports/uvw/vcpkg.json new file mode 100644 index 00000000000000..bd896d781bd00d --- /dev/null +++ b/ports/uvw/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "uvw", + "version-string": "2.7.0", + "port-version": 1, + "description": "Header-only, event based, tiny and easy to use libuv wrapper in modern C++.", + "homepage": "https://github.com/skypjack/uvw", + "dependencies": [ + "libuv" + ] +} diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL deleted file mode 100644 index 663538f9646a09..00000000000000 --- a/ports/uwebsockets/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: uwebsockets -Version: 0.15.6 -Build-Depends: zlib, usockets -Homepage: https://github.com/uWebSockets/uWebSockets -Description: Simple, secure & standards compliant web I/O for the most demanding of applications diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index dc8f5255ea0233..220a202073ec48 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -1,16 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uNetworking/uWebSockets - REF v0.15.6 - SHA512 ba5dc18412ecceadb48e3c0f9b6f6d9ea920b76c36b12456bc96198346149010257c0f7807a1e1cc262ae0eca07e1994d3f1e3be0b3c815ce455d778c5375311 + REF d40c2d1a3119e5855ddc187f6647d79fd2229e08 # v19.5.0 + SHA512 c99df55c1e557ba2ea035a4774988d76b0d5d239b42b5cccd267d7d0344aa84d5134efb960f46520f246d8bd7b2034f3626942e07a080e8493e9664dd2de5f49 HEAD_REF master ) -file(COPY ${SOURCE_PATH}/src DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/include/src ${CURRENT_PACKAGES_DIR}/include/uwebsockets/) - -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/uwebsockets) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/uwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/uwebsockets/copyright) +file(COPY "${SOURCE_PATH}/src" DESTINATION "${CURRENT_PACKAGES_DIR}/include") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/src" "${CURRENT_PACKAGES_DIR}/include/uwebsockets") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/uwebsockets/vcpkg.json b/ports/uwebsockets/vcpkg.json new file mode 100644 index 00000000000000..e886f53a1a9337 --- /dev/null +++ b/ports/uwebsockets/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "uwebsockets", + "version": "19.5.0", + "description": "Simple, secure & standards compliant web I/O for the most demanding of applications", + "homepage": "https://github.com/uWebSockets/uWebSockets", + "dependencies": [ + "usockets", + "zlib" + ] +} diff --git a/ports/v-hacd/CMakeLists.txt b/ports/v-hacd/CMakeLists.txt new file mode 100644 index 00000000000000..f4451ecaa89c29 --- /dev/null +++ b/ports/v-hacd/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR) + +project(VHACD) + +# Determine if VHACD is built as a subproject (using add_subdirectory) +# or if it is the master project. +set(MASTER_PROJECT OFF) +if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) + set(MASTER_PROJECT ON) + message(STATUS "CMake version: ${CMAKE_VERSION}") +endif () + +option(NO_OPENCL "NO_OPENCL" OFF) +option(NO_OPENMP "NO_OPENMP" OFF) + +message("NO_OPENCL " ${NO_OPENCL}) +message("NO_OPENMP " ${NO_OPENMP}) + +add_subdirectory(src) \ No newline at end of file diff --git a/ports/v-hacd/fix-cmake.patch b/ports/v-hacd/fix-cmake.patch new file mode 100644 index 00000000000000..46c53da114ceab --- /dev/null +++ b/ports/v-hacd/fix-cmake.patch @@ -0,0 +1,140 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2bbb283..2f7eb52 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,12 +1 @@ +-cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) +-project(VHACD) +-option(NO_OPENCL "NO_OPENCL" OFF) +-option(NO_OPENMP "NO_OPENMP" OFF) +- +-message("NO_OPENCL " ${NO_OPENCL}) +-message("NO_OPENMP " ${NO_OPENMP}) +- +-#set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/output" CACHE PATH "project install prefix" FORCE) +-set(CMAKE_COMMON_INC "${CMAKE_SOURCE_DIR}/../scripts/cmake_common.cmake") +-add_subdirectory ("${CMAKE_SOURCE_DIR}/VHACD_Lib") +-add_subdirectory ("${CMAKE_SOURCE_DIR}/test") ++add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR}/VHACD_Lib") +\ No newline at end of file +diff --git a/src/VHACD_Lib/CMakeLists.txt b/src/VHACD_Lib/CMakeLists.txt +index 46fc1b1..2260fdc 100644 +--- a/src/VHACD_Lib/CMakeLists.txt ++++ b/src/VHACD_Lib/CMakeLists.txt +@@ -1,77 +1,79 @@ ++cmake_minimum_required(VERSION 3.10.0) ++ + project(VHACD_LIB CXX C) +-include(${CMAKE_COMMON_INC}) ++include("${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/cmake_common.cmake") ++ ++set(CMAKE_CXX_STANDARD 11) + +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") ++set(LIB_TYPE "STATIC" CACHE STRING "STATIC, SHARED or MODULE?") ++message("[VHACD] \t LIB_TYPE " ${LIB_TYPE}) ++add_library(vhacd ${LIB_TYPE} ${PROJECT_CPP_FILES} ${PROJECT_C_FILES} ${PROJECT_INC_FILES} ${PROJECT_INL_FILES} ${PROJECT_CL_FILES}) + + if (NOT NO_OPENCL) + #include(FindOpenCL OPTIONAL) +- find_package(OpenCL) ++ find_package(OpenCL REQUIRED) + endif() + if (NOT NO_OPENMP) + #include(FindOpenMP OPTIONAL) +- find_package(OpenMP) ++ find_package(OpenMP REQUIRED) + endif() + if(OPENMP_FOUND) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") ++ target_link_libraries(vhacd PRIVATE OpenMP::OpenMP_CXX) + endif() +-set(LIB_TYPE "STATIC" CACHE STRING "STATIC, SHARED or MODULE?") +-message("[VHACD] \t LIB_TYPE " ${LIB_TYPE}) +-add_library(vhacd ${LIB_TYPE} ${PROJECT_CPP_FILES} ${PROJECT_C_FILES} ${PROJECT_INC_FILES} ${PROJECT_INL_FILES} ${PROJECT_CL_FILES}) + + if (OpenCL_FOUND) +- target_include_directories(vhacd PRIVATE "${OpenCL_INCLUDE_DIR}") +- target_link_libraries(vhacd PRIVATE "${OpenCL_LIBRARY}") ++ target_link_libraries(vhacd PRIVATE OpenCL::OpenCL) + target_compile_definitions(vhacd PRIVATE -DOPENCL_FOUND=1 ) + target_compile_definitions(vhacd PRIVATE -DOPENCL_CL_FILES="${PROJECT_CL_FILES}" ) + endif() + +- + target_include_directories(vhacd PUBLIC ++ $ ++ $) ++ ++target_include_directories(vhacd PRIVATE + $ +- $ # /include/mylib + ) + + + message("[VHACD] \t -> CMAKE_INSTALL_PREFIX " ${CMAKE_INSTALL_PREFIX}) + install(TARGETS vhacd EXPORT vhacd-targets DESTINATION lib) +-install(FILES ${PROJECT_INC_FILES} DESTINATION include) +-install(FILES ${PROJECT_INL_FILES} DESTINATION include) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/public/VHACD.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/) ++ + + + set(VHACD_LIB_VERSION 3.2.0) + include(CMakePackageConfigHelpers) + write_basic_package_version_file( +- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config-version.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config-version.cmake" + VERSION ${VHACD_LIB_VERSION} + COMPATIBILITY AnyNewerVersion + ) + +-export(EXPORT vhacd-targets NAMESPACE :: +- FILE "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-targets.cmake" ++export(EXPORT vhacd-targets NAMESPACE vhacd:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-targets.cmake" + ) + + configure_file(cmake/vhacd-config.cmake +- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config.cmake" + COPYONLY + ) + + set(ConfigPackageLocation lib/cmake/vhacd) + install(EXPORT vhacd-targets + FILE +- vhacd-targets.cmake ++ v-hacd-targets.cmake + DESTINATION + ${ConfigPackageLocation} +- NAMESPACE :: ++ NAMESPACE vhacd:: + ) + install( + FILES +- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config-version.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config-version.cmake" + DESTINATION + ${ConfigPackageLocation} + COMPONENT + Devel + ) + + +diff --git a/src/VHACD_Lib/cmake/vhacd-config.cmake b/src/VHACD_Lib/cmake/vhacd-config.cmake +index 8fc5c58..7677f58 100644 +--- a/src/VHACD_Lib/cmake/vhacd-config.cmake ++++ b/src/VHACD_Lib/cmake/vhacd-config.cmake +@@ -1,4 +1,4 @@ + + find_package(OpenCL) + find_package(OpenMP) +-include("${CMAKE_CURRENT_LIST_DIR}/vhacd-targets.cmake") +\ No newline at end of file ++include("${CMAKE_CURRENT_LIST_DIR}/v-hacd-targets.cmake") +\ No newline at end of file diff --git a/ports/v-hacd/portfile.cmake b/ports/v-hacd/portfile.cmake new file mode 100644 index 00000000000000..3e4cdefa32a2de --- /dev/null +++ b/ports/v-hacd/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_fail_port_install(ON_ARCH "arm") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kmammou/v-hacd + REF 1a49edf29c69039df15286181f2f27e17ceb9aef + SHA512 14157e5fd9cbfeb44735dc2952d7b4f43337ea2243f3b690125dda27e3bb8328cc38050415c7150cf11fbd85c5258c3aaa8899f306ce118f78a4d5e6139ef0f0 + HEAD_REF master + PATCHES + fix-cmake.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(LIB_TYPE "SHARED") +else() + set(LIB_TYPE "STATIC") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + openmp NO_OPENMP + opencl NO_OPENCL +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DLIB_TYPE=${LIB_TYPE} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/vhacd) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/v-hacd/vcpkg.json b/ports/v-hacd/vcpkg.json new file mode 100644 index 00000000000000..338e0337be3fcf --- /dev/null +++ b/ports/v-hacd/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "v-hacd", + "version-string": "3.2.0", + "port-version": 2, + "description": "The V-HACD library decomposes a 3D surface into a set of \"near\" convex parts.", + "homepage": "https://github.com/kmammou/v-hacd", + "supports": "!arm", + "features": { + "opencl": { + "description": "Builds opencl enabled lib", + "dependencies": [ + "opencl" + ] + }, + "openmp": { + "description": "Builds openmp enabled lib" + } + } +} diff --git a/ports/v8/V8Config-shared.cmake b/ports/v8/V8Config-shared.cmake new file mode 100644 index 00000000000000..a27074ea37cdcb --- /dev/null +++ b/ports/v8/V8Config-shared.cmake @@ -0,0 +1,112 @@ +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +include(SelectLibraryConfigurations) + +find_path(V8_INCLUDE_DIR NAMES v8.h PATH_SUFFIXES include) + +if(EXISTS ${_IMPORT_PREFIX}/bin/snapshot_blob.bin) + set(V8_SNAPSHOT_BLOB_RELEASE ${_IMPORT_PREFIX}/bin/snapshot_blob.bin CACHE FILEPATH "Release version of V8 snapshot blob location") +endif() +if(EXISTS ${_IMPORT_PREFIX}/debug/bin/snapshot_blob.bin) + set(V8_SNAPSHOT_BLOB_DEBUG ${_IMPORT_PREFIX}/debug/bin/snapshot_blob.bin CACHE FILEPATH "Debug version of V8 snapshot blob location") +endif() +string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE) +set(V8_SNAPSHOT_BLOB ${V8_SNAPSHOT_BLOB_${BUILD_TYPE}}) + +if(EXISTS "${_IMPORT_PREFIX}/lib/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8_LIBRARY_RELEASE "${_IMPORT_PREFIX}/lib/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Release version of the V8 library location") +endif() +if(EXISTS "${_IMPORT_PREFIX}/debug/lib/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8_LIBRARY_DEBUG "${_IMPORT_PREFIX}/debug/lib/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Debug version of the V8 library location") +endif() +select_library_configurations(V8) + +if(EXISTS "${_IMPORT_PREFIX}/lib/v8_libbase${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8LIBBASE_LIBRARY_RELEASE "${_IMPORT_PREFIX}/lib/v8_libbase${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Release version of the V8 libbase library location") +endif() +if(EXISTS "${_IMPORT_PREFIX}/debug/lib/v8_libbase${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8LIBBASE_LIBRARY_DEBUG "${_IMPORT_PREFIX}/debug/lib/v8_libbase${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Debug version of the V8 libbase library location") +endif() +select_library_configurations(V8LIBBASE) + +if(EXISTS "${_IMPORT_PREFIX}/lib/v8_libplatform${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8LIBPLATFORM_LIBRARY_RELEASE "${_IMPORT_PREFIX}/lib/v8_libplatform${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Release version of the V8 libplatform library location") +endif() +if(EXISTS "${_IMPORT_PREFIX}/debug/lib/v8_libplatform${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8LIBPLATFORM_LIBRARY_DEBUG "${_IMPORT_PREFIX}/debug/lib/v8_libplatform${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Delete version of the V8 libplatform library location") +endif() +select_library_configurations(V8LIBPLATFORM) + +mark_as_advanced(V8_INCLUDE_DIR) + +if(V8_INCLUDE_DIR AND EXISTS "${V8_INCLUDE_DIR}/v8-version.h") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_MAJOR_VERSION REGEX "^#define V8_MAJOR_VERSION [0-9]+.*$") + string(REGEX REPLACE "^#define V8_MAJOR_VERSION ([0-9]+).*$" "\\1" V8_MAJOR_VERSION "${V8_MAJOR_VERSION}") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_MINOR_VERSION REGEX "^#define V8_MINOR_VERSION [0-9]+.*$") + string(REGEX REPLACE "^#define V8_MINOR_VERSION ([0-9]+).*$" "\\1" V8_MINOR_VERSION "${V8_MINOR_VERSION}") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_BUILD_NUMBER REGEX "^#define V8_BUILD_NUMBER [0-9]+.*$") + string(REGEX REPLACE "^#define V8_BUILD_NUMBER ([0-9]+).*$" "\\1" V8_BUILD_NUMBER "${V8_BUILD_NUMBER}") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_PATCH_LEVEL REGEX "^#define V8_PATCH_LEVEL [0-9]+.*$") + string(REGEX REPLACE "^#define V8_PATCH_LEVEL ([0-9]+).*$" "\\1" V8_PATCH_LEVEL "${V8_PATCH_LEVEL}") + set(V8_VERSION_STRING "${V8_MAJOR_VERSION}.${V8_MINOR_VERSION}.${V8_BUILD_NUMBER}.${V8_PATCH_LEVEL}") +endif() + + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(V8_COMPILE_DEFINITIONS "V8_COMPRESS_POINTERS;V8_31BIT_SMIS_ON_64BIT_ARCH") +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(V8_COMPILE_DEFINITIONS " ") +endif() + +mark_as_advanced(V8_COMPILE_DEFINITIONS) + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(V8 REQUIRED_VARS V8_LIBRARY V8LIBBASE_LIBRARY V8LIBPLATFORM_LIBRARY V8_INCLUDE_DIR V8_COMPILE_DEFINITIONS +VERSION_VAR V8_VERSION_STRING) +set(V8_LIBRARIES ${V8_LIBRARY} ${V8LIBBASE_LIBRARY} ${V8LIBPLATFORM_LIBRARY}) + +mark_as_advanced(V8_LIBRARIES) + +if(NOT TARGET V8::V8) + add_library(V8::V8 SHARED IMPORTED) + set_target_properties(V8::V8 PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${V8_INCLUDE_DIR}" + INTERFACE_COMPILE_DEFINITIONS "${V8_COMPILE_DEFINITIONS}") + + if(V8_LIBRARY_RELEASE) + set_property(TARGET V8::V8 APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" + IMPORTED_IMPLIB_RELEASE "${V8_LIBRARY_RELEASE}" + ) + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE + "${V8LIBBASE_LIBRARY_RELEASE};${V8LIBPLATFORM_LIBRARY_RELEASE}") + endif() + + if(V8_LIBRARY_DEBUG) + set_property(TARGET V8::V8 APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin/v8${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}" + IMPORTED_IMPLIB_DEBUG "${V8_LIBRARY_DEBUG}") + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG + "${V8LIBBASE_LIBRARY_DEBUG};${V8LIBPLATFORM_LIBRARY_DEBUG}") + endif() + + if(NOT V8_LIBRARY_RELEASE AND NOT V8_LIBRARY_DEBUG) + set_property(TARGET V8::V8 APPEND PROPERTY + IMPORTED_IMPLIB "${V8_LIBRARY}") + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LINK_INTERFACE_LIBRARIES + "${V8LIBBASE_LIBRARY};${V8LIBPLATFORM_LIBRARY}") + endif() +endif() diff --git a/ports/v8/V8Config-static.cmake b/ports/v8/V8Config-static.cmake new file mode 100644 index 00000000000000..6a47593efb6ded --- /dev/null +++ b/ports/v8/V8Config-static.cmake @@ -0,0 +1,98 @@ +include(CMakeFindDependencyMacro) +find_dependency(ICU REQUIRED COMPONENTS in uc dt) +find_dependency(ZLIB REQUIRED) +if(UNIX) + find_package(PkgConfig REQUIRED) + pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 IMPORTED_TARGET) + set(V8_IMPORTED_LINK_INTERFACE_LIBRARIES + "ICU::in;ICU::uc;ICU::dt;ZLIB::ZLIB") +elseif(WIN32) + set(V8_IMPORTED_LINK_INTERFACE_LIBRARIES + "Winmm;DbgHelp;ZLIB::ZLIB;PkgConfig::GLIB2;ICU::in;ICU::uc;ICU::dt") +endif() + +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +include(SelectLibraryConfigurations) + +find_path(V8_INCLUDE_DIR NAMES v8.h PATH_SUFFIXES include) + +if(EXISTS "${_IMPORT_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}v8_monolith${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8_LIBRARY_RELEASE "${_IMPORT_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}v8_monolith${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Release version of the V8 library location") +endif() +if(EXISTS "${_IMPORT_PREFIX}/debug/lib/${CMAKE_STATIC_LIBRARY_PREFIX}v8_monolith${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(V8_LIBRARY_DEBUG "${_IMPORT_PREFIX}/debug/lib/${CMAKE_STATIC_LIBRARY_PREFIX}v8_monolith${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE FILEPATH "Debug version of the V8 library location") +endif() +select_library_configurations(V8) + +mark_as_advanced(V8_INCLUDE_DIR) + +if(V8_INCLUDE_DIR AND EXISTS "${V8_INCLUDE_DIR}/v8-version.h") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_MAJOR_VERSION REGEX "^#define V8_MAJOR_VERSION [0-9]+.*$") + string(REGEX REPLACE "^#define V8_MAJOR_VERSION ([0-9]+).*$" "\\1" V8_MAJOR_VERSION "${V8_MAJOR_VERSION}") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_MINOR_VERSION REGEX "^#define V8_MINOR_VERSION [0-9]+.*$") + string(REGEX REPLACE "^#define V8_MINOR_VERSION ([0-9]+).*$" "\\1" V8_MINOR_VERSION "${V8_MINOR_VERSION}") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_BUILD_NUMBER REGEX "^#define V8_BUILD_NUMBER [0-9]+.*$") + string(REGEX REPLACE "^#define V8_BUILD_NUMBER ([0-9]+).*$" "\\1" V8_BUILD_NUMBER "${V8_BUILD_NUMBER}") + file(STRINGS "${V8_INCLUDE_DIR}/v8-version.h" V8_PATCH_LEVEL REGEX "^#define V8_PATCH_LEVEL [0-9]+.*$") + string(REGEX REPLACE "^#define V8_PATCH_LEVEL ([0-9]+).*$" "\\1" V8_PATCH_LEVEL "${V8_PATCH_LEVEL}") + set(V8_VERSION_STRING "${V8_MAJOR_VERSION}.${V8_MINOR_VERSION}.${V8_BUILD_NUMBER}.${V8_PATCH_LEVEL}") +endif() + + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(V8_COMPILE_DEFINITIONS "V8_COMPRESS_POINTERS;V8_31BIT_SMIS_ON_64BIT_ARCH") +else() + set(V8_COMPILE_DEFINITIONS " ") +endif() + +mark_as_advanced(V8_COMPILE_DEFINITIONS) + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(V8 REQUIRED_VARS V8_LIBRARY V8_INCLUDE_DIR V8_COMPILE_DEFINITIONS +VERSION_VAR V8_VERSION_STRING) +set(V8_LIBRARIES ${V8_LIBRARY}) + +mark_as_advanced(V8_LIBRARIES) + +if(NOT TARGET V8::V8) + add_library(V8::V8 STATIC IMPORTED) + set_target_properties(V8::V8 PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${V8_INCLUDE_DIR}" + INTERFACE_COMPILE_DEFINITIONS "${V8_COMPILE_DEFINITIONS}") + if(MSVC) + set_target_properties(V8::V8 PROPERTIES + INTERFACE_COMPILE_OPTIONS "/MT$<$:d>") + endif() + + if(V8_LIBRARY_RELEASE) + set_property(TARGET V8::V8 APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LOCATION_RELEASE "${V8_LIBRARY_RELEASE}" + IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE + "${V8_IMPORTED_LINK_INTERFACE_LIBRARIES}") + endif() + + if(V8_LIBRARY_DEBUG) + set_property(TARGET V8::V8 APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(V8::V8 PROPERTIES + IMPORTED_LOCATION_DEBUG "${V8_LIBRARY_DEBUG}" + IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG + "${V8_IMPORTED_LINK_INTERFACE_LIBRARIES}") + endif() + + if(NOT V8_LIBRARY_RELEASE AND NOT V8_LIBRARY_DEBUG) + set_property(TARGET V8::V8 APPEND PROPERTY + IMPORTED_LOCATION "${V8_LIBRARY}" + IMPORTED_LINK_INTERFACE_LIBRARIES + "${V8_IMPORTED_LINK_INTERFACE_LIBRARIES}") + endif() +endif() diff --git a/ports/v8/build.patch b/ports/v8/build.patch new file mode 100644 index 00000000000000..15fede3fe87c31 --- /dev/null +++ b/ports/v8/build.patch @@ -0,0 +1,187 @@ +diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn +index 1904a2559..e66586c88 100644 +--- a/config/compiler/BUILD.gn ++++ b/config/compiler/BUILD.gn +@@ -1571,6 +1571,7 @@ config("default_warnings") { + # Disables. + "-Wno-missing-field-initializers", # "struct foo f = {0};" + "-Wno-unused-parameter", # Unused function parameters. ++ "-Wno-invalid-offsetof", # Use of "conditionally-supported" offsetof in c++17 + ] + } + +@@ -1987,8 +1988,17 @@ config("no_incompatible_pointer_warnings") { + # Shared settings for both "optimize" and "optimize_max" configs. + # IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags. + if (is_win) { +- common_optimize_on_cflags = [ +- "/Ob2", # Both explicit and auto inlining. ++ common_optimize_on_cflags = [] ++ if(is_clang) { ++ common_optimize_on_cflags += [ ++ "/Ob2", # Both explicit and auto inlining. ++ ] ++ } else { ++ common_optimize_on_cflags += [ ++ "/Ob3", # Both explicit and auto inlining. ++ ] ++ } ++ common_optimize_on_cflags += [ + "/Oy-", # Disable omitting frame pointers, must be after /O2. + "/Zc:inline", # Remove unreferenced COMDAT (faster links). + ] +diff --git a/config/linux/pkg-config.py b/config/linux/pkg-config.py +index 5adf70cc3..dab159f98 100755 +--- a/config/linux/pkg-config.py ++++ b/config/linux/pkg-config.py +@@ -41,6 +41,11 @@ from optparse import OptionParser + # Additionally, you can specify the option --atleast-version. This will skip + # the normal outputting of a dictionary and instead print true or false, + # depending on the return value of pkg-config for the given package. ++# ++# --pkg_config_libdir= allows direct override ++# of the PKG_CONFIG_LIBDIR environment library. ++# ++# --full-path-libs causes lib names to include their full path. + + + def SetConfigPath(options): +@@ -105,11 +110,32 @@ def RewritePath(path, strip_prefix, sysroot): + return path + + ++flag_regex = re.compile("(-.)(.+)") ++ ++ ++def FlagReplace(matchobj): ++ if matchobj.group(1) == '-I': ++ return matchobj.group(1) + subprocess.check_output([u'cygpath',u'-w',matchobj.group(2)]).strip().decode("utf-8") ++ if matchobj.group(1) == '-L': ++ return matchobj.group(1) + subprocess.check_output([u'cygpath',u'-w',matchobj.group(2)]).strip().decode("utf-8") ++ if matchobj.group(1) == '-l': ++ return matchobj.group(1) + matchobj.group(2) + '.lib' ++ return matchobj.group(0) ++ ++ ++def ConvertGCCToMSVC(flags): ++ """Rewrites GCC flags into MSVC flags.""" ++ # need a better way to determine mingw vs msvc build ++ if 'win32' not in sys.platform or "GCC" in sys.version: ++ return flags ++ return [ flag_regex.sub(FlagReplace,flag) for flag in flags] ++ ++ + def main(): + # If this is run on non-Linux platforms, just return nothing and indicate + # success. This allows us to "kind of emulate" a Linux build from other + # platforms. +- if "linux" not in sys.platform: ++ if "linux" not in sys.platform and 'win32' not in sys.platform: + print("[[],[],[],[],[]]") + return 0 + +@@ -128,6 +154,9 @@ def main(): + parser.add_option('--dridriverdir', action='store_true', dest='dridriverdir') + parser.add_option('--version-as-components', action='store_true', + dest='version_as_components') ++ parser.add_option('--pkg_config_libdir', action='store', dest='pkg_config_libdir', ++ type='string') ++ parser.add_option('--full-path-libs', action='store_true', dest='full_path_libs') + (options, args) = parser.parse_args() + + # Make a list of regular expressions to strip out. +@@ -144,6 +173,10 @@ def main(): + else: + prefix = '' + ++ # Override PKG_CONFIG_LIBDIR ++ if options.pkg_config_libdir: ++ os.environ['PKG_CONFIG_LIBDIR'] = options.pkg_config_libdir ++ + if options.atleast_version: + # When asking for the return value, just run pkg-config and print the return + # value, no need to do other work. +@@ -203,7 +236,7 @@ def main(): + # For now just split on spaces to get the args out. This will break if + # pkgconfig returns quoted things with spaces in them, but that doesn't seem + # to happen in practice. +- all_flags = flag_string.strip().split(' ') ++ all_flags = ConvertGCCToMSVC(flag_string.strip().split(' ')) + + + sysroot = options.sysroot +@@ -220,7 +253,10 @@ def main(): + continue; + + if flag[:2] == '-l': +- libs.append(RewritePath(flag[2:], prefix, sysroot)) ++ library = RewritePath(flag[2:], prefix, sysroot) ++ # Skip math library on MSVC ++ if library != 'm.lib': ++ libs.append(library) + elif flag[:2] == '-L': + lib_dirs.append(RewritePath(flag[2:], prefix, sysroot)) + elif flag[:2] == '-I': +@@ -237,6 +273,14 @@ def main(): + else: + cflags.append(flag) + ++ if options.full_path_libs: ++ full_path_libs = [] ++ for lib_dir in lib_dirs: ++ for lib in libs: ++ if os.path.isfile(lib_dir+"/"+lib): ++ full_path_libs.append(lib_dir+"/"+lib) ++ libs = full_path_libs ++ + # Output a GN array, the first one is the cflags, the second are the libs. The + # JSON formatter prints GN compatible lists when everything is a list of + # strings. +diff --git a/config/linux/pkg_config.gni b/config/linux/pkg_config.gni +index 428e44ac0..a0d2175ee 100644 +--- a/config/linux/pkg_config.gni ++++ b/config/linux/pkg_config.gni +@@ -45,6 +45,9 @@ declare_args() { + # in similar fashion by setting the `system_libdir` variable in the build's + # args.gn file to 'lib' or 'lib64' as appropriate for the target architecture. + system_libdir = "lib" ++ ++ # Allow directly overriding the PKG_CONFIG_LIBDIR enviroment variable ++ pkg_config_libdir = "" + } + + pkg_config_script = "//build/config/linux/pkg-config.py" +@@ -87,6 +90,17 @@ if (host_pkg_config != "") { + host_pkg_config_args = pkg_config_args + } + ++if (pkg_config_libdir != "") { ++ pkg_config_args += [ ++ "--pkg_config_libdir", ++ pkg_config_libdir, ++ ] ++ host_pkg_config_args += [ ++ "--pkg_config_libdir", ++ pkg_config_libdir, ++ ] ++} ++ + template("pkg_config") { + assert(defined(invoker.packages), + "Variable |packages| must be defined to be a list in pkg_config.") +diff --git a/util/lastchange.py b/util/lastchange.py +index 02a36642b..78934f1b0 100755 +--- a/util/lastchange.py ++++ b/util/lastchange.py +@@ -192,7 +192,10 @@ def GetGitTopDirectory(source_dir): + Returns: + The output of "git rev-parse --show-toplevel" as a string + """ +- return _RunGitCommand(source_dir, ['rev-parse', '--show-toplevel']) ++ directory = _RunGitCommand(source_dir, ['rev-parse', '--show-toplevel']) ++ if "GCC" in sys.version and sys.platform=='win32': ++ return subprocess.check_output(["cygpath", "-w", directory]).strip(b"\n").decode() ++ return directory + + + def WriteIfChanged(file_name, contents): diff --git a/ports/v8/icu.gn b/ports/v8/icu.gn new file mode 100644 index 00000000000000..60dc6b8b7ab656 --- /dev/null +++ b/ports/v8/icu.gn @@ -0,0 +1,71 @@ +import("//build/config/linux/pkg_config.gni") + +declare_args() { + # Tells icu to load an external data file rather than rely on the icudata + # being linked directly into the binary. + icu_use_data_file = true + # If true, compile icu into a standalone static library. Currently this is + # only useful on Chrome OS. + icu_disable_thin_archive = false +} + +pkg_config("system_icui18n") { + packages = [ "icu-i18n" ] + if (is_win) { + extra_args = ["--full-path-libs"] # Workaround the WinSDK having an older version of ICU + } +} + +pkg_config("system_icuuc") { + packages = [ "icu-uc" ] + if (is_win) { + extra_args = ["--full-path-libs"] # Workaround the WinSDK having an older version of ICU + } +} + +group("icu") { + public_deps = [ + ":icui18n", + ":icuuc", + ] +} + +config("icu_config") { + defines = [ + "USING_SYSTEM_ICU=1", + ] + if(is_win){ + if(!is_component_build) { + ldflags = ["/ignore:4099"] # needed on CI builds + } + defines += [ "UCHAR_TYPE=wchar_t" ] + } + else{ + defines += [ "UCHAR_TYPE=uint16_t" ] + } + if (icu_use_data_file) { + defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ] + } else { + defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC" ] + } +} + +source_set("icui18n") { + public_configs = [ + ":icu_config", + ":system_icui18n" + ] +} + +source_set("icuuc") { + public_configs = [ + ":icu_config", + ":system_icuuc" + ] +} + +source_set("icudata") { + public_configs = [ + ":icu_config", + ] +} diff --git a/ports/v8/portfile.cmake b/ports/v8/portfile.cmake new file mode 100644 index 00000000000000..bbf42562308728 --- /dev/null +++ b/ports/v8/portfile.cmake @@ -0,0 +1,198 @@ + +set(pkgver "9.1.269.39") + +set(ENV{DEPOT_TOOLS_WIN_TOOLCHAIN} 0) + +get_filename_component(GIT_PATH ${GIT} DIRECTORY) +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_PATH ${PYTHON2} DIRECTORY) +vcpkg_find_acquire_program(GN) +get_filename_component(GN_PATH ${GN} DIRECTORY) +vcpkg_find_acquire_program(NINJA) +get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) + +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") +vcpkg_add_to_path(PREPEND "${GIT_PATH}") +vcpkg_add_to_path(PREPEND "${PYTHON2_PATH}") +vcpkg_add_to_path(PREPEND "${GN_PATH}") +vcpkg_add_to_path(PREPEND "${NINJA_PATH}") +if(WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES pkg-config) + vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") +endif() + +set(VCPKG_KEEP_ENV_VARS PATH;DEPOT_TOOLS_WIN_TOOLCHAIN) + +function(v8_fetch) + set(oneValueArgs DESTINATION URL REF SOURCE) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(V8 "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT DEFINED V8_DESTINATION) + message(FATAL_ERROR "DESTINATION must be specified.") + endif() + + if(NOT DEFINED V8_URL) + message(FATAL_ERROR "The git url must be specified") + endif() + + if(NOT DEFINED V8_REF) + message(FATAL_ERROR "The git ref must be specified.") + endif() + + if(EXISTS ${V8_SOURCE}/${V8_DESTINATION}) + vcpkg_execute_required_process( + COMMAND ${GIT} reset --hard + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + else() + vcpkg_execute_required_process( + COMMAND ${GIT} clone --depth 1 ${V8_URL} ${V8_DESTINATION} + WORKING_DIRECTORY ${V8_SOURCE} + LOGNAME build-${TARGET_TRIPLET}) + vcpkg_execute_required_process( + COMMAND ${GIT} fetch --depth 1 origin ${V8_REF} + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + vcpkg_execute_required_process( + COMMAND ${GIT} checkout FETCH_HEAD + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + endif() + foreach(PATCH ${V8_PATCHES}) + vcpkg_execute_required_process( + COMMAND ${GIT} apply ${PATCH} + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + endforeach() +endfunction() + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://chromium.googlesource.com/v8/v8.git + REF 7d3d62c91f69a702e5aa54c6b4dbbaa883683717 + PATCHES ${CURRENT_PORT_DIR}/v8.patch +) + +message(STATUS "Fetching submodules") +v8_fetch( + DESTINATION build + URL https://chromium.googlesource.com/chromium/src/build.git + REF fd86d60f33cbc794537c4da2ef7e298d7f81138e + SOURCE ${SOURCE_PATH} + PATCHES ${CURRENT_PORT_DIR}/build.patch) +v8_fetch( + DESTINATION third_party/zlib + URL https://chromium.googlesource.com/chromium/src/third_party/zlib.git + REF 156be8c52f80cde343088b4a69a80579101b6e67 + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION base/trace_event/common + URL https://chromium.googlesource.com/chromium/src/base/trace_event/common.git + REF dab187b372fc17e51f5b9fad8201813d0aed5129 + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION third_party/googletest/src + URL https://chromium.googlesource.com/external/github.com/google/googletest.git + REF 10b1902d893ea8cc43c69541d70868f91af3646b + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION third_party/jinja2 + URL https://chromium.googlesource.com/chromium/src/third_party/jinja2.git + REF b41863e42637544c2941b574c7877d3e1f663e25 + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION third_party/markupsafe + URL https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git + REF 8f45f5cfa0009d2a70589bcda0349b8cb2b72783 + SOURCE ${SOURCE_PATH}) + +vcpkg_execute_required_process( + COMMAND ${PYTHON2} build/util/lastchange.py -o build/util/LASTCHANGE + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET} +) + +file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party/icu") +configure_file(${CURRENT_PORT_DIR}/zlib.gn ${SOURCE_PATH}/third_party/zlib/BUILD.gn COPYONLY) +configure_file(${CURRENT_PORT_DIR}/icu.gn ${SOURCE_PATH}/third_party/icu/BUILD.gn COPYONLY) +file(WRITE ${SOURCE_PATH}/build/config/gclient_args.gni "checkout_google_benchmark = false\n") +if(WIN32) + string(REGEX REPLACE "\\\\+$" "" WindowsSdkDir $ENV{WindowsSdkDir}) + file(APPEND ${SOURCE_PATH}/build/config/gclient_args.gni "windows_sdk_path = \"${WindowsSdkDir}\"\n") +endif() + +if(UNIX) + set(UNIX_CURRENT_INSTALLED_DIR ${CURRENT_INSTALLED_DIR}) + set(LIBS "-ldl -lpthread") + set(REQUIRES ", gmodule-2.0, gobject-2.0, gthread-2.0") +elseif(WIN32) + execute_process(COMMAND cygpath "${CURRENT_INSTALLED_DIR}" OUTPUT_VARIABLE UNIX_CURRENT_INSTALLED_DIR) + string(STRIP ${UNIX_CURRENT_INSTALLED_DIR} UNIX_CURRENT_INSTALLED_DIR) + set(LIBS "-lWinmm -lDbgHelp") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(is_component_build true) + set(v8_monolithic false) + set(v8_use_external_startup_data true) + set(targets :v8_libbase :v8_libplatform :v8) +else() + set(is_component_build false) + set(v8_monolithic true) + set(v8_use_external_startup_data false) + set(targets :v8_monolith) +endif() + +message(STATUS "Generating v8 build files. Please wait...") + +vcpkg_configure_gn( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS "is_component_build=${is_component_build} target_cpu=\"${VCPKG_TARGET_ARCHITECTURE}\" v8_monolithic=${v8_monolithic} v8_use_external_startup_data=${v8_use_external_startup_data} use_sysroot=false is_clang=false use_custom_libcxx=false v8_enable_verify_heap=false icu_use_data_file=false" + OPTIONS_DEBUG "is_debug=true enable_iterator_debugging=true pkg_config_libdir=\"${UNIX_CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig\"" + OPTIONS_RELEASE "is_debug=false enable_iterator_debugging=false pkg_config_libdir=\"${UNIX_CURRENT_INSTALLED_DIR}/lib/pkgconfig\"" +) + +message(STATUS "Building v8. Please wait...") + +vcpkg_install_gn( + SOURCE_PATH ${SOURCE_PATH} + TARGETS ${targets} +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CFLAGS "-DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH") +endif() + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(PREFIX ${CURRENT_PACKAGES_DIR}) + configure_file(${CURRENT_PORT_DIR}/v8.pc.in ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/v8_libbase.pc.in ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8_libbase.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/v8_libplatform.pc.in ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8_libplatform.pc @ONLY) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/snapshot_blob.bin DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + + set(PREFIX ${CURRENT_PACKAGES_DIR}/debug) + configure_file(${CURRENT_PORT_DIR}/v8.pc.in ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/v8_libbase.pc.in ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8_libbase.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/v8_libplatform.pc.in ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8_libplatform.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/V8Config-shared.cmake ${CURRENT_PACKAGES_DIR}/share/v8/V8Config.cmake @ONLY) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/snapshot_blob.bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + set(PREFIX ${CURRENT_PACKAGES_DIR}) + configure_file(${CURRENT_PORT_DIR}/v8_monolith.pc.in ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8_monolith.pc @ONLY) + set(PREFIX ${CURRENT_PACKAGES_DIR}/debug) + configure_file(${CURRENT_PORT_DIR}/v8_monolith.pc.in ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8_monolith.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/V8Config-static.cmake ${CURRENT_PACKAGES_DIR}/share/v8/V8Config.cmake @ONLY) +endif() + + +vcpkg_copy_pdbs() + +# v8 libraries are listed as SYSTEM_LIBRARIES because the pc files reference each other. +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m dl pthread Winmm DbgHelp v8_libbase v8_libplatform v8) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/v8/v8.patch b/ports/v8/v8.patch new file mode 100644 index 00000000000000..7b41c8d3e6c47c --- /dev/null +++ b/ports/v8/v8.patch @@ -0,0 +1,241 @@ +diff --git a/BUILD.gn b/BUILD.gn +index d2bfb6129d..c5ab18ee44 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -5366,6 +5366,7 @@ if (is_component_build) { + + public_deps = [ + ":v8_base", ++ ":v8_initializers", + ":v8_snapshot", + ] + +diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h +index 72b8fbc8a8..3ebfc23f1f 100644 +--- a/src/codegen/code-stub-assembler.h ++++ b/src/codegen/code-stub-assembler.h +@@ -303,7 +303,7 @@ enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; + // it's possible to add JavaScript-specific useful CodeAssembler "macros" + // without modifying files in the compiler directory (and requiring a review + // from a compiler directory OWNER). +-class V8_EXPORT_PRIVATE CodeStubAssembler ++class V8_EXPORT CodeStubAssembler + : public compiler::CodeAssembler, + public TorqueGeneratedExportedMacrosAssembler { + public: +diff --git a/src/common/globals.h b/src/common/globals.h +index f51c3210f8..5291285337 100644 +--- a/src/common/globals.h ++++ b/src/common/globals.h +@@ -1364,7 +1364,7 @@ class BinaryOperationFeedback { + // This is distinct from BinaryOperationFeedback on purpose, because the + // feedback that matters differs greatly as well as the way it is consumed. + class CompareOperationFeedback { +- enum { ++ enum : uint32_t { + kSignedSmallFlag = 1 << 0, + kOtherNumberFlag = 1 << 1, + kBooleanFlag = 1 << 2, +@@ -1378,7 +1378,7 @@ class CompareOperationFeedback { + }; + + public: +- enum Type { ++ enum Type : uint32_t { + kNone = 0, + + kBoolean = kBooleanFlag, +diff --git a/src/compiler/node-cache.h b/src/compiler/node-cache.h +index 8e1d3d4eae..c55d8329de 100644 +--- a/src/compiler/node-cache.h ++++ b/src/compiler/node-cache.h +@@ -29,7 +29,7 @@ class Node; + // nodes such as constants, parameters, etc. + template , + typename Pred = std::equal_to > +-class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) NodeCache final { ++class V8_EXPORT_PRIVATE NodeCache final { + public: + explicit NodeCache(Zone* zone) : map_(zone) {} + ~NodeCache() = default; +diff --git a/src/heap/paged-spaces-inl.h b/src/heap/paged-spaces-inl.h +index e135e30efc..0c055247bc 100644 +--- a/src/heap/paged-spaces-inl.h ++++ b/src/heap/paged-spaces-inl.h +@@ -19,7 +19,7 @@ namespace internal { + // ----------------------------------------------------------------------------- + // PagedSpaceObjectIterator + +-HeapObject PagedSpaceObjectIterator::Next() { ++inline HeapObject PagedSpaceObjectIterator::Next() { + do { + HeapObject next_obj = FromCurrentPage(); + if (!next_obj.is_null()) return next_obj; +diff --git a/src/heap/paged-spaces.h b/src/heap/paged-spaces.h +index 621d92aa89..a8592a5b4d 100644 +--- a/src/heap/paged-spaces.h ++++ b/src/heap/paged-spaces.h +@@ -45,7 +45,7 @@ class V8_EXPORT_PRIVATE PagedSpaceObjectIterator : public ObjectIterator { + // Advance to the next object, skipping free spaces and other fillers and + // skipping the special garbage section of which there is one per space. + // Returns nullptr when the iteration has ended. +- inline HeapObject Next() override; ++ HeapObject Next() override; + + private: + // Fast (inlined) path of next(). +diff --git a/src/objects/feedback-vector.cc b/src/objects/feedback-vector.cc +index a77ea5d265..0cddb92a02 100644 +--- a/src/objects/feedback-vector.cc ++++ b/src/objects/feedback-vector.cc +@@ -114,9 +114,9 @@ Handle FeedbackMetadata::New(LocalIsolate* isolate, + return metadata; + } + +-template Handle FeedbackMetadata::New( ++template V8_EXPORT Handle FeedbackMetadata::New( + Isolate* isolate, const FeedbackVectorSpec* spec); +-template Handle FeedbackMetadata::New( ++template V8_EXPORT Handle FeedbackMetadata::New( + LocalIsolate* isolate, const FeedbackVectorSpec* spec); + + bool FeedbackMetadata::SpecDiffersFrom( +diff --git a/src/objects/fixed-array-inl.h b/src/objects/fixed-array-inl.h +index cca6d40070..d6d36ff59f 100644 +--- a/src/objects/fixed-array-inl.h ++++ b/src/objects/fixed-array-inl.h +@@ -88,7 +88,7 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) { + return get(isolate, index).IsTheHole(isolate); + } + +-void FixedArray::set(int index, Smi value) { ++inline V8_EXPORT_PRIVATE void FixedArray::set(int index, Smi value) { + DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map()); + DCHECK_LT(static_cast(index), static_cast(length())); + DCHECK(Object(value).IsSmi()); +diff --git a/src/objects/fixed-array.h b/src/objects/fixed-array.h +index 98c5d8d5b5..bd5303e44c 100644 +--- a/src/objects/fixed-array.h ++++ b/src/objects/fixed-array.h +@@ -132,7 +132,7 @@ class FixedArray + inline bool is_the_hole(Isolate* isolate, int index); + + // Setter that doesn't need write barrier. +- inline void set(int index, Smi value); ++ inline V8_EXPORT_PRIVATE void set(int index, Smi value); + // Setter with explicit barrier mode. + inline void set(int index, Object value, WriteBarrierMode mode); + +diff --git a/src/snapshot/snapshot-utils.cc b/src/snapshot/snapshot-utils.cc +index eb2372372c..7defadb4b1 100644 +--- a/src/snapshot/snapshot-utils.cc ++++ b/src/snapshot/snapshot-utils.cc +@@ -5,7 +5,7 @@ + #include "src/snapshot/snapshot-utils.h" + + #include "src/sanitizer/msan.h" +-#include "third_party/zlib/zlib.h" ++#include "zlib.h" + + namespace v8 { + namespace internal { +diff --git a/src/wasm/function-body-decoder-impl.h b/src/wasm/function-body-decoder-impl.h +index d37f718681..3a409e1d76 100644 +--- a/src/wasm/function-body-decoder-impl.h ++++ b/src/wasm/function-body-decoder-impl.h +@@ -2013,7 +2013,7 @@ class WasmDecoder : public Decoder { + } + + // TODO(clemensb): This is only used by the interpreter; move there. +- V8_EXPORT_PRIVATE std::pair StackEffect(const byte* pc) { ++ std::pair StackEffect(const byte* pc) { + WasmOpcode opcode = static_cast(*pc); + // Handle "simple" opcodes with a fixed signature first. + const FunctionSig* sig = WasmOpcodes::Signature(opcode); +diff --git a/test/cctest/BUILD.gn b/test/cctest/BUILD.gn +index ffa4e3a136..a279faee9b 100644 +--- a/test/cctest/BUILD.gn ++++ b/test/cctest/BUILD.gn +@@ -493,6 +493,10 @@ v8_source_set("cctest_sources") { + # C4309: 'static_cast': truncation of constant value + cflags += [ "/wd4309" ] + ++ if(!is_clang) { ++ cflags += [ "/wd4789" ] ++ } ++ + # MSVS wants this for gay-{precision,shortest}.cc. + cflags += [ "/bigobj" ] + +diff --git a/tools/debug_helper/BUILD.gn b/tools/debug_helper/BUILD.gn +index 2256df1f55..29e27c6af9 100644 +--- a/tools/debug_helper/BUILD.gn ++++ b/tools/debug_helper/BUILD.gn +@@ -100,10 +100,12 @@ v8_component("v8_debug_helper") { + "../..:v8_libbase", + "../..:v8_shared_internal_headers", + "../..:v8_tracing", ++ "../..:v8", + ] + + configs = [ ":internal_config" ] + if (v8_enable_i18n_support) { ++ public_deps = [ "//third_party/icu" ] + configs += [ "//third_party/icu:icu_config" ] + } + +diff --git a/tools/v8windbg/BUILD.gn b/tools/v8windbg/BUILD.gn +index 5618d2d945..71568f1670 100644 +--- a/tools/v8windbg/BUILD.gn ++++ b/tools/v8windbg/BUILD.gn +@@ -6,7 +6,7 @@ import("../../gni/v8.gni") + + config("v8windbg_config") { + # Required for successful compilation of SDK header file DbgModel.h. +- cflags_cc = [ "/Zc:twoPhase-" ] ++ cflags_cc = [ "/Zc:twoPhase-", "/std:c++latest" ] + + include_dirs = [ "../.." ] + } +diff --git a/tools/v8windbg/base/dbgext.h b/tools/v8windbg/base/dbgext.h +index 8b36a8f361..f8d9f0d64e 100644 +--- a/tools/v8windbg/base/dbgext.h ++++ b/tools/v8windbg/base/dbgext.h +@@ -9,6 +9,7 @@ + #error Unicode not defined + #endif + ++#include + #include + #include + #include +diff --git a/tools/v8windbg/src/v8-debug-helper-interop.h b/tools/v8windbg/src/v8-debug-helper-interop.h +index f7d78c5dd3..1c70e54e7a 100644 +--- a/tools/v8windbg/src/v8-debug-helper-interop.h ++++ b/tools/v8windbg/src/v8-debug-helper-interop.h +@@ -5,10 +5,11 @@ + #ifndef V8_TOOLS_V8WINDBG_SRC_V8_DEBUG_HELPER_INTEROP_H_ + #define V8_TOOLS_V8WINDBG_SRC_V8_DEBUG_HELPER_INTEROP_H_ + +-#include +- ++#include ++#include + #include + ++#include + #include + #include + #include +diff --git a/tools/v8windbg/test/debug-callbacks.h b/tools/v8windbg/test/debug-callbacks.h +index 8855d6ffbc..ed2b0f62e9 100644 +--- a/tools/v8windbg/test/debug-callbacks.h ++++ b/tools/v8windbg/test/debug-callbacks.h +@@ -9,6 +9,7 @@ + #error Unicode not defined + #endif + ++#include + #include + #include + #include diff --git a/ports/v8/v8.pc.in b/ports/v8/v8.pc.in new file mode 100644 index 00000000000000..5f5721725626cc --- /dev/null +++ b/ports/v8/v8.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine +Version: @pkgver@ +Requires: zlib, icu-uc, icu-i18n, v8_libbase = @pkgver@ +Libs: -L${libdir} -lv8 +Cflags: -I${includedir} @CFLAGS@ diff --git a/ports/v8/v8_libbase.pc.in b/ports/v8/v8_libbase.pc.in new file mode 100644 index 00000000000000..ad472abf9bc3c3 --- /dev/null +++ b/ports/v8/v8_libbase.pc.in @@ -0,0 +1,10 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine - Base library +Version: @pkgver@ +Libs: -L${libdir} -lv8_libbase +Cflags: -I${includedir} @CFLAGS@ diff --git a/ports/v8/v8_libplatform.pc.in b/ports/v8/v8_libplatform.pc.in new file mode 100644 index 00000000000000..19c54ba7988d1e --- /dev/null +++ b/ports/v8/v8_libplatform.pc.in @@ -0,0 +1,10 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine - Platform library +Version: @pkgver@ +Libs: -L${libdir} -lv8_libplatform +Cflags: -I${includedir} @CFLAGS@ diff --git a/ports/v8/v8_monolith.pc.in b/ports/v8/v8_monolith.pc.in new file mode 100644 index 00000000000000..b23c661e817c85 --- /dev/null +++ b/ports/v8/v8_monolith.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine +Version: @pkgver@ +Requires: zlib, icu-uc, icu-i18n @REQUIRES@ +Libs: -L${libdir} -lv8_monolith @LIBS@ +Cflags: -I${includedir} @CFLAGS@ diff --git a/ports/v8/vcpkg.json b/ports/v8/vcpkg.json new file mode 100644 index 00000000000000..2478ba4f9e1e57 --- /dev/null +++ b/ports/v8/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "v8", + "version-string": "9.1.269.39", + "description": "Google Chrome's JavaScript engine", + "homepage": "https://v8.dev", + "supports": "!(arm | arm64 | uwp | osx)", + "dependencies": [ + { + "name": "glib", + "platform": "linux" + }, + "icu", + { + "name": "pthread", + "platform": "linux" + }, + "zlib" + ] +} diff --git a/ports/v8/zlib.gn b/ports/v8/zlib.gn new file mode 100644 index 00000000000000..570d0e22a36caa --- /dev/null +++ b/ports/v8/zlib.gn @@ -0,0 +1,21 @@ +import("//build/config/linux/pkg_config.gni") + +pkg_config("system_zlib") { + packages = [ "zlib" ] + defines = [ "USE_SYSTEM_ZLIB=1" ] +} + +config("zlib_config") { + if(is_win && !is_component_build) { + ldflags = ["/ignore:4099"] # needed on VCPKG CI builds + } + configs = [ + ":system_zlib", + ] +} + +source_set("zlib") { + public_configs = [ + ":system_zlib", + ] +} diff --git a/ports/valijson/CONTROL b/ports/valijson/CONTROL deleted file mode 100644 index 4ea2b5d1ebb770..00000000000000 --- a/ports/valijson/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: valijson -Version: 2018-11-17 -Description: Header-only C++ library for JSON Schema validation \ No newline at end of file diff --git a/ports/valijson/portfile.cmake b/ports/valijson/portfile.cmake index 6c0b8453052ac7..ec32fa10082b33 100644 --- a/ports/valijson/portfile.cmake +++ b/ports/valijson/portfile.cmake @@ -1,9 +1,6 @@ #header-only library -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/valijson) - -vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH REPO tristanpenman/valijson REF dd084d747448bb56ddfeab5946b4f2f4617b99c4 SHA512 ee241eefc816360608f86792a4c25abadea79cbffc94d7e31a2dbd0a483ed4d7a303b6d2410b99ab7694e58a3d299f0df0baa52fa16f89e9233d90b190a4d799 @@ -25,4 +22,4 @@ file(COPY ${SOURCE_PATH}/include/compat/optional.hpp # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/valijson) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/valijson/LICENSE ${CURRENT_PACKAGES_DIR}/share/valijson/copyright) \ No newline at end of file +file(RENAME ${CURRENT_PACKAGES_DIR}/share/valijson/LICENSE ${CURRENT_PACKAGES_DIR}/share/valijson/copyright) diff --git a/ports/valijson/vcpkg.json b/ports/valijson/vcpkg.json new file mode 100644 index 00000000000000..92fcdf98b157bb --- /dev/null +++ b/ports/valijson/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "valijson", + "version-string": "2018-11-17", + "port-version": 2, + "description": "Header-only C++ library for JSON Schema validation" +} diff --git a/ports/value-ptr-lite/portfile.cmake b/ports/value-ptr-lite/portfile.cmake new file mode 100644 index 00000000000000..b272643d6509b5 --- /dev/null +++ b/ports/value-ptr-lite/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/value-ptr-lite + REF v0.2.1 + SHA512 96bea32310b3b3f91d19706d8ae9bdfa9a6ba485f529562e3b7cf89311d1e9b99fd24c0c6f23d169c5a7c84ebd9bd7b8ace972ee279b38c4c1caa398a3dd1590 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test VALUE_PTR_LITE_OPT_BUILD_TESTS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + -DVALUE_PTR_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME value_ptr-lite CONFIG_PATH lib/cmake/value_ptr-lite) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/value-ptr-lite/vcpkg.json b/ports/value-ptr-lite/vcpkg.json new file mode 100644 index 00000000000000..3615f49716f70c --- /dev/null +++ b/ports/value-ptr-lite/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "value-ptr-lite", + "version-semver": "0.2.1", + "port-version": 1, + "description": "A C++ smart-pointer with value semantics for C++98, C++11 and later in a single-file header-only library.", + "homepage": "https://github.com/martinmoene/value-ptr-lite", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "test": { + "description": "Build and perform value_ptr-lite tests." + } + } +} diff --git a/ports/vamp-sdk/CMakeLists.txt b/ports/vamp-sdk/CMakeLists.txt new file mode 100644 index 00000000000000..a3d98073dba784 --- /dev/null +++ b/ports/vamp-sdk/CMakeLists.txt @@ -0,0 +1,113 @@ +cmake_minimum_required(VERSION 3.8) +project(vamp-cmake) + +find_package(SndFile REQUIRED) + +set(VAMP_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/vamp/vamp.h) + +set(SDK_HEADERS + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/Plugin.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/PluginAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/PluginBase.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/RealTime.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/FFT.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/plugguard.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/vamp-sdk.h) + +set(SDK_SRC + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-sdk/acsymbols.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-sdk/FFT.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-sdk/PluginAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-sdk/RealTime.cpp) + +set(HOST_SDK_HEADERS + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/Plugin.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginBase.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginHostAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/RealTime.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginBufferingAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginChannelAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginInputDomainAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginLoader.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginSummarisingAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginWrapper.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/hostguard.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/host-c.h + ${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/vamp-hostsdk.h) + +set(HOST_SDK_SRC + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/acsymbols.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/Files.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginBufferingAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginChannelAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginHostAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginInputDomainAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginLoader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginSummarisingAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginWrapper.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/RealTime.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/host-c.cpp) + +if(BUILD_SHARED_LIBS) + if(MSVC) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + endif() +endif() + +add_library(vamp-sdk ${SDK_SRC} ${SDK_HEADERS}) +add_library(vamp-hostsdk ${HOST_SDK_SRC} ${HOST_SDK_HEADERS}) + +message(${SDK_HEADERS}) + +set_target_properties(vamp-sdk PROPERTIES PUBLIC_HEADER "${SDK_HEADERS}") +set_target_properties(vamp-hostsdk PROPERTIES PUBLIC_HEADER + "${HOST_SDK_HEADERS}") + +# The Visual Studio project files upstream intentionally output different +# library file names than autotools. +# https://github.com/tenacityteam/tenacity/pull/577#discussion_r702328284 +if(WIN32) + set_target_properties(vamp-sdk PROPERTIES OUTPUT_NAME VampPluginSDK) + set_target_properties(vamp-hostsdk PROPERTIES OUTPUT_NAME VampHostSDK) +endif() + +set_property(TARGET vamp-sdk PROPERTY CXX_STANDARD 11) +set_property(TARGET vamp-hostsdk PROPERTY CXX_STANDARD 11) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +add_definitions(-D_LIB -D_USE_MATH_DEFINES) + +target_link_libraries(vamp-hostsdk PUBLIC SndFile::sndfile) + +target_link_libraries(vamp-sdk PUBLIC SndFile::sndfile) + +install( + TARGETS vamp-hostsdk vamp-sdk + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY vamp-hostsdk/ + DESTINATION include/vamp-hostsdk + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_priv.h" EXCLUDE + PATTERN "config.h" EXCLUDE) + install( + DIRECTORY vamp-sdk/ + DESTINATION include/vamp-sdk + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_priv.h" EXCLUDE + PATTERN "config.h" EXCLUDE) + install( + DIRECTORY vamp/ + DESTINATION include/vamp + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_priv.h" EXCLUDE + PATTERN "config.h" EXCLUDE) +endif() diff --git a/ports/vamp-sdk/portfile.cmake b/ports/vamp-sdk/portfile.cmake new file mode 100644 index 00000000000000..890f68e4a7ed8b --- /dev/null +++ b/ports/vamp-sdk/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + REPO c4dm/vamp-plugin-sdk + REF vamp-plugin-sdk-v2.10 + SHA512 67a71e5396eab5ce9503e9111b4cfc16fc9755cf6ae2d8dfc99ed29fd91e75eaf0de9a9c55ce8f7751f04c235eb86430856eff18f02adde54f1850a87c917ef0 + OUT_SOURCE_PATH SOURCE_PATH +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/vamp-sdk/vcpkg.json b/ports/vamp-sdk/vcpkg.json new file mode 100644 index 00000000000000..2e6b1fea4fc92e --- /dev/null +++ b/ports/vamp-sdk/vcpkg.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "name": "vamp-sdk", + "version": "2.10", + "port-version": 1, + "description": "Library for Vamp plugins", + "homepage": "https://www.vamp-plugins.org/develop.html", + "supports": "!uwp", + "dependencies": [ + "libsndfile" + ] +} diff --git a/ports/variant-lite/CONTROL b/ports/variant-lite/CONTROL deleted file mode 100644 index 8654b8a3447646..00000000000000 --- a/ports/variant-lite/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: variant-lite -Version: 1.2.2 -Description: A C++17-like variant, a type-safe union for C++98, C++11 and later in a single-file header-only library diff --git a/ports/variant-lite/portfile.cmake b/ports/variant-lite/portfile.cmake index 764fd74efe7dd4..0bb4fc48df9b19 100644 --- a/ports/variant-lite/portfile.cmake +++ b/ports/variant-lite/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO martinmoene/variant-lite diff --git a/ports/variant-lite/vcpkg.json b/ports/variant-lite/vcpkg.json new file mode 100644 index 00000000000000..ad3bad903a56ae --- /dev/null +++ b/ports/variant-lite/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "variant-lite", + "version-string": "1.2.2", + "port-version": 1, + "description": "A C++17-like variant, a type-safe union for C++98, C++11 and later in a single-file header-only library" +} diff --git a/ports/vc/correct_cmake_config_path.patch b/ports/vc/correct_cmake_config_path.patch new file mode 100644 index 00000000000000..bb1d5437b3d5a3 --- /dev/null +++ b/ports/vc/correct_cmake_config_path.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/VcConfig.cmake.in b/cmake/VcConfig.cmake.in +index 36de476..5cb0e5b 100644 +--- a/cmake/VcConfig.cmake.in ++++ b/cmake/VcConfig.cmake.in +@@ -4,7 +4,7 @@ + set_and_check(@PROJECT_NAME@_INSTALL_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@) + set_and_check(@PROJECT_NAME@_INCLUDE_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@/include) + set_and_check(@PROJECT_NAME@_LIB_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@) +-set_and_check(@PROJECT_NAME@_CMAKE_MODULES_DIR ${@PROJECT_NAME@_LIB_DIR}/cmake/Vc) ++set_and_check(@PROJECT_NAME@_CMAKE_MODULES_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@/share/vc) + set(@PROJECT_NAME@_VERSION_STRING "@PROJECT_VERSION@") + + ### Setup @PROJECT_NAME@ defaults +@@ -20,7 +20,7 @@ list(APPEND @PROJECT_NAME@_ALL_FLAGS ${@PROJECT_NAME@_COMPILE_FLAGS}) + list(APPEND @PROJECT_NAME@_ALL_FLAGS ${@PROJECT_NAME@_ARCHITECTURE_FLAGS}) + + ### Import targets +-include("@PACKAGE_CMAKE_INSTALL_PREFIX@/@PACKAGE_INSTALL_DESTINATION@/@PROJECT_NAME@Targets.cmake") ++include(${@PROJECT_NAME@_CMAKE_MODULES_DIR}/@PROJECT_NAME@Targets.cmake) + + ### Define @PROJECT_NAME@_LIBRARIES for backwards compatibility + get_target_property(vc_lib_location @PROJECT_NAME@::Vc INTERFACE_LOCATION) diff --git a/ports/vc/portfile.cmake b/ports/vc/portfile.cmake new file mode 100644 index 00000000000000..3b51c814190784 --- /dev/null +++ b/ports/vc/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_ARCH "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO VcDevel/Vc + REF 1.4.2 + SHA512 9a929cd48bdf6b8e94765bd649e7ec42b10dea28e36eff288223d72cffa5f4fc8693e942aa3f780b42d8a0c1824fcabff22ec0622aa8ea5232c9123858b8bbbf + HEAD_REF 1.4 + PATCHES + "correct_cmake_config_path.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Vc/) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/vc/vcpkg.json b/ports/vc/vcpkg.json new file mode 100644 index 00000000000000..d63975fbe86f8b --- /dev/null +++ b/ports/vc/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "vc", + "version-string": "1.4.2", + "port-version": 1, + "description": "SIMD Vector Classes for C++ .", + "homepage": "https://github.com/VcDevel/Vc", + "supports": "!arm64" +} diff --git a/ports/vcglib/CONTROL b/ports/vcglib/CONTROL deleted file mode 100644 index 7f52548f4d0d31..00000000000000 --- a/ports/vcglib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: vcglib -Version: 1.0.1 -Description: library for manipulation, processing, cleaning, simplifying triangle meshes. -Build-Depends: eigen3 \ No newline at end of file diff --git a/ports/vcglib/portfile.cmake b/ports/vcglib/portfile.cmake index 5389a69fb031d6..1af58bdcb9b2d3 100644 --- a/ports/vcglib/portfile.cmake +++ b/ports/vcglib/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cnr-isti-vclab/vcglib diff --git a/ports/vcglib/vcpkg.json b/ports/vcglib/vcpkg.json new file mode 100644 index 00000000000000..bde2be1d109475 --- /dev/null +++ b/ports/vcglib/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "vcglib", + "version-string": "1.0.1", + "port-version": 1, + "description": "library for manipulation, processing, cleaning, simplifying triangle meshes.", + "dependencies": [ + "eigen3" + ] +} diff --git a/ports/vcpkg-cmake-config/README.md b/ports/vcpkg-cmake-config/README.md new file mode 100644 index 00000000000000..18e7bb9ac87083 --- /dev/null +++ b/ports/vcpkg-cmake-config/README.md @@ -0,0 +1,10 @@ +# vcpkg-cmake-config + +`vcpkg-cmake-config` provides `vcpkg_cmake_config_fixup()`, +a function which both: + +- Fixes common mistakes in port build systems, like using absolute paths +- Merges the debug and release config files. + +This function should almost always be used when a port has `*config.cmake` files, +even when the buildsystem of the project is not CMake. diff --git a/ports/vcpkg-cmake-config/copyright b/ports/vcpkg-cmake-config/copyright new file mode 100644 index 00000000000000..2e4eac8264fa4c --- /dev/null +++ b/ports/vcpkg-cmake-config/copyright @@ -0,0 +1,23 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ports/vcpkg-cmake-config/portfile.cmake b/ports/vcpkg-cmake-config/portfile.cmake new file mode 100644 index 00000000000000..fc3dbafd51847b --- /dev/null +++ b/ports/vcpkg-cmake-config/portfile.cmake @@ -0,0 +1,12 @@ +if(NOT TARGET_TRIPLET STREQUAL _HOST_TRIPLET) + # make FATAL_ERROR in CI when issue #16773 fixed + message(WARNING "vcpkg-cmake-config is a host-only port; please mark it as a host port in your dependencies.") +endif() + +file(INSTALL + "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_config_fixup.cmake" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" + "${CMAKE_CURRENT_LIST_DIR}/copyright" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/vcpkg-cmake-config/vcpkg-port-config.cmake b/ports/vcpkg-cmake-config/vcpkg-port-config.cmake new file mode 100644 index 00000000000000..980d411315c717 --- /dev/null +++ b/ports/vcpkg-cmake-config/vcpkg-port-config.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_config_fixup.cmake") diff --git a/ports/vcpkg-cmake-config/vcpkg.json b/ports/vcpkg-cmake-config/vcpkg.json new file mode 100644 index 00000000000000..49faaf4d402b37 --- /dev/null +++ b/ports/vcpkg-cmake-config/vcpkg.json @@ -0,0 +1,5 @@ +{ + "name": "vcpkg-cmake-config", + "version-date": "2021-05-22", + "port-version": 1 +} diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake new file mode 100644 index 00000000000000..a145d324a91d8c --- /dev/null +++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake @@ -0,0 +1,237 @@ +#[===[.md: +# vcpkg_cmake_config_fixup + +Merge release and debug CMake targets and configs to support multiconfig generators. + +Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. + +```cmake +vcpkg_cmake_config_fixup( + [PACKAGE_NAME ] + [CONFIG_PATH ] + [DO_NOT_DELETE_PARENT_CONFIG_PATH] + [NO_PREFIX_CORRECTION] +) +``` + +For many ports, `vcpkg_cmake_config_fixup()` on its own should work, +as `PACKAGE_NAME` defaults to `${PORT}` and `CONFIG_PATH` defaults to `share/${PACKAGE_NAME}`. +For ports where the package name passed to `find_package` is distinct from the port name, +`PACKAGE_NAME` should be changed to be that name instead. +For ports where the directory of the `*config.cmake` files cannot be set, +use the `CONFIG_PATH` to change the directory where the files come from. + +By default the parent directory of CONFIG_PATH is removed if it is named "cmake". +Passing the `DO_NOT_DELETE_PARENT_CONFIG_PATH` option disable such behavior, +as it is convenient for ports that install +more than one CMake package configuration file. + +The `NO_PREFIX_CORRECTION` option disables the correction of `_IMPORT_PREFIX` +done by vcpkg due to moving the config files. +Currently the correction does not take into account how the files are moved, +and applies a rather simply correction which in some cases will yield the wrong results. + +## How it Works + +1. Moves `/debug//*targets-debug.cmake` to `/share/${PACKAGE_NAME}`. +2. Removes `/debug//*config.cmake`. +3. Transform all references matching `/bin/*.exe` to `/tools//*.exe` on Windows. +4. Transform all references matching `/bin/*` to `/tools//*` on other platforms. +5. Fixes `${_IMPORT_PREFIX}` in auto generated targets. +6. Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. + +## Examples + +* [concurrentqueue](https://github.com/Microsoft/vcpkg/blob/master/ports/concurrentqueue/portfile.cmake) +* [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake) +* [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake) +#]===] +if(Z_VCPKG_CMAKE_CONFIG_FIXUP_GUARD) + return() +endif() +set(Z_VCPKG_CMAKE_CONFIG_FIXUP_GUARD ON CACHE INTERNAL "guard variable") + +function(vcpkg_cmake_config_fixup) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "DO_NOT_DELETE_PARENT_CONFIG_PATH" "PACKAGE_NAME;CONFIG_PATH;NO_PREFIX_CORRECTION" "") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_config_fixup was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT arg_PACKAGE_NAME) + set(arg_PACKAGE_NAME "${PORT}") + endif() + if(NOT arg_CONFIG_PATH) + set(arg_CONFIG_PATH "share/${arg_PACKAGE_NAME}") + endif() + set(target_path "share/${arg_PACKAGE_NAME}") + + string(REPLACE "." "\\." EXECUTABLE_SUFFIX "${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + + set(debug_share "${CURRENT_PACKAGES_DIR}/debug/${target_path}") + set(release_share "${CURRENT_PACKAGES_DIR}/${target_path}") + + if(NOT arg_CONFIG_PATH STREQUAL "share/${arg_PACKAGE_NAME}") + if(arg_CONFIG_PATH STREQUAL "share") + set(arg_CONFIG_PATH z_vcpkg_share) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}") + file(RENAME "${CURRENT_PACKAGES_DIR}/share" "${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}") + endif() + + set(debug_config "${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}") + set(release_config "${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(NOT EXISTS "${debug_config}") + message(FATAL_ERROR "'${debug_config}' does not exist.") + endif() + + # This roundabout handling enables CONFIG_PATH = share + file(MAKE_DIRECTORY "${debug_share}") + file(GLOB files "${debug_config}/*") + file(COPY ${files} DESTINATION "${debug_share}") + file(REMOVE_RECURSE "${debug_config}") + endif() + + file(GLOB files "${release_config}/*") + file(COPY ${files} DESTINATION "${release_share}") + file(REMOVE_RECURSE "${release_config}") + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + get_filename_component(debug_config_dir_name "${debug_config}" NAME) + string(TOLOWER "${debug_config_dir_name}" debug_config_dir_name) + if(debug_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE "${debug_config}") + else() + get_filename_component(debug_config_parent_dir "${debug_config}" DIRECTORY) + get_filename_component(debug_config_dir_name "${debug_config_parent_dir}" NAME) + string(TOLOWER "${debug_config_dir_name}" debug_config_dir_name) + if(debug_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE "${debug_config_parent_dir}") + endif() + endif() + endif() + + get_filename_component(release_config_dir_name "${release_config}" NAME) + string(TOLOWER "${release_config_dir_name}" release_config_dir_name) + if(release_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE "${release_config}") + else() + get_filename_component(release_config_parent_dir "${release_config}" DIRECTORY) + get_filename_component(release_config_dir_name "${release_config_parent_dir}" NAME) + string(TOLOWER "${release_config_dir_name}" release_config_dir_name) + if(release_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE "${release_config_parent_dir}") + endif() + endif() + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(NOT EXISTS "${debug_share}") + message(FATAL_ERROR "'${debug_share}' does not exist.") + endif() + endif() + + file(GLOB_RECURSE unused_files + "${debug_share}/*[Tt]argets.cmake" + "${debug_share}/*[Cc]onfig.cmake" + "${debug_share}/*[Cc]onfigVersion.cmake" + "${debug_share}/*[Cc]onfig-version.cmake" + ) + foreach(unused_file IN LISTS unused_files) + file(REMOVE "${unused_file}") + endforeach() + + file(GLOB_RECURSE release_targets + "${release_share}/*-release.cmake" + ) + foreach(release_target IN LISTS release_targets) + file(READ "${release_target}" contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" contents "${contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" contents "${contents}") + file(WRITE "${release_target}" "${contents}") + endforeach() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB_RECURSE debug_targets + "${debug_share}/*-debug.cmake" + ) + foreach(debug_target IN LISTS debug_targets) + file(RELATIVE_PATH debug_target_rel "${debug_share}" "${debug_target}") + + file(READ "${debug_target}" contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" contents "${contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" contents "${contents}") + string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" contents "${contents}") + string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" contents "${contents}") + file(WRITE "${release_share}/${debug_target_rel}" "${contents}") + + file(REMOVE "${debug_target}") + endforeach() + endif() + + #Fix ${_IMPORT_PREFIX} in cmake generated targets and configs; + #Since those can be renamed we have to check in every *.cmake + file(GLOB_RECURSE main_cmakes "${release_share}/*.cmake") + + foreach(main_cmake IN LISTS main_cmakes) + file(READ "${main_cmake}" contents) + # Note: I think the following comment is no longer true, since we now require the path to be `share/blah` + # however, I don't know it for sure. + # - nimazzuc + + #This correction is not correct for all cases. To make it correct for all cases it needs to consider + #original folder deepness to CURRENT_PACKAGES_DIR in comparison to the moved to folder deepness which + #is always at least (>=) 2, e.g. share/${PORT}. Currently the code assumes it is always 2 although + #this requirement is only true for the *Config.cmake. The targets are not required to be in the same + #folder as the *Config.cmake! + if(NOT arg_NO_PREFIX_CORRECTION) + string(REGEX REPLACE +[[get_filename_component\(_IMPORT_PREFIX "\${CMAKE_CURRENT_LIST_FILE}" PATH\)( +get_filename_component\(_IMPORT_PREFIX "\${_IMPORT_PREFIX}" PATH\))*]] +[[get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]] + contents "${contents}") # see #1044 for details why this replacement is necessary. See #4782 why it must be a regex. + string(REGEX REPLACE +[[get_filename_component\(PACKAGE_PREFIX_DIR "\${CMAKE_CURRENT_LIST_DIR}/\.\./(\.\./)*" ABSOLUTE\)]] +[[get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)]] + contents "${contents}") + string(REGEX REPLACE +[[get_filename_component\(PACKAGE_PREFIX_DIR "\${CMAKE_CURRENT_LIST_DIR}/\.\.((\\|/)\.\.)*" ABSOLUTE\)]] +[[get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)]] + contents "${contents}") # This is a meson-related workaround, see https://github.com/mesonbuild/meson/issues/6955 + endif() + + #Fix wrongly absolute paths to install dir with the correct dir using ${_IMPORT_PREFIX} + #This happens if vcpkg built libraries are directly linked to a target instead of using + #an imported target for it. We could add more logic here to identify defect target files. + #Since the replacement here in a multi config build always requires a generator expression + #in front of the absoulte path to ${CURRENT_INSTALLED_DIR}. So the match should always be at + #least >:${CURRENT_INSTALLED_DIR}. + #In general the following generator expressions should be there: + #\$<\$:${CURRENT_INSTALLED_DIR}/debug/lib/somelib> + #and/or + #\$<\$>:${CURRENT_INSTALLED_DIR}/lib/somelib> + #with ${CURRENT_INSTALLED_DIR} being fully expanded + string(REPLACE "${CURRENT_INSTALLED_DIR}" [[${_IMPORT_PREFIX}]] contents "${contents}") + + # Patch out any remaining absolute references + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" cmake_current_packages_dir) + string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR}" [[${_IMPORT_PREFIX}]] contents "${contents}") + + file(WRITE "${main_cmake}" "${contents}") + endforeach() + + # Remove /debug// if it's empty. + file(GLOB_RECURSE remaining_files "${debug_share}/*") + if(remaining_files STREQUAL "") + file(REMOVE_RECURSE "${debug_share}") + endif() + + # Remove /debug/share/ if it's empty. + file(GLOB_RECURSE remaining_files "${CURRENT_PACKAGES_DIR}/debug/share/*") + if(remaining_files STREQUAL "") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + endif() +endfunction() + + diff --git a/ports/vcpkg-cmake/README.md b/ports/vcpkg-cmake/README.md new file mode 100644 index 00000000000000..b84c58869c8e27 --- /dev/null +++ b/ports/vcpkg-cmake/README.md @@ -0,0 +1,7 @@ +# vcpkg-cmake + +This port contains cmake functions for dealing with a CMake buildsystem. + +In the common case, `vcpkg_cmake_configure()` (with appropriate arguments) +followed by `vcpkg_cmake_install()` will be enough to build and install a port. +`vcpkg_cmake_build()` is provided for more complex cases. diff --git a/ports/vcpkg-cmake/cmake_get_vars/CMakeLists.txt b/ports/vcpkg-cmake/cmake_get_vars/CMakeLists.txt new file mode 100644 index 00000000000000..084042fb116ab2 --- /dev/null +++ b/ports/vcpkg-cmake/cmake_get_vars/CMakeLists.txt @@ -0,0 +1,148 @@ +cmake_minimum_required(VERSION 3.20) + +set(VCPKG_LANGUAGES "C;CXX" CACHE STRING "Languages to enables for this project") + +set(OUTPUT_STRING) +# Build default checklists +list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_CROSSCOMPILING + CMAKE_SYSTEM_NAME + CMAKE_HOST_SYSTEM_NAME + CMAKE_SYSTEM_PROCESSOR + CMAKE_HOST_SYSTEM_PROCESSOR) +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_OSX_DEPLOYMENT_TARGET + CMAKE_OSX_SYSROOT) +endif() +# Programs to check +set(PROGLIST AR RANLIB STRIP NM OBJDUMP DLLTOOL MT LINKER) +foreach(prog IN LISTS PROGLIST) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${prog}) +endforeach() +set(COMPILERS ${VCPKG_LANGUAGES} RC) +foreach(prog IN LISTS COMPILERS) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${prog}_COMPILER) +endforeach() +# Variables to check +foreach(_lang IN LISTS VCPKG_LANGUAGES) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_STANDARD_INCLUDE_DIRECTORIES) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_STANDARD_LIBRARIES) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_STANDARD) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_COMPILE_FEATURES) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_EXTENSION) + # Probably never required since implicit. + #list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES) + #list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_INCLUDE_DIRECTORIES) + #list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_DIRECTORIES) + #list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_LIBRARIES) +endforeach() +list(REMOVE_DUPLICATES VCPKG_DEFAULT_VARS_TO_CHECK) + +# Environment variables to check. +list(APPEND VCPKG_DEFAULT_ENV_VARS_TO_CHECK PATH INCLUDE C_INCLUDE_PATH CPLUS_INCLUDE_PATH LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) +list(REMOVE_DUPLICATES VCPKG_DEFAULT_ENV_VARS_TO_CHECK) + +#Flags to check. Flags are a bit special since they are configuration aware. +set(FLAGS ${VCPKG_LANGUAGES} RC SHARED_LINKER STATIC_LINKER EXE_LINKER) +foreach(flag IN LISTS FLAGS) + list(APPEND VCPKG_DEFAULT_FLAGS_TO_CHECK CMAKE_${flag}_FLAGS) +endforeach() +list(REMOVE_DUPLICATES VCPKG_DEFAULT_FLAGS_TO_CHECK) + +#Language-specific flags. +foreach(_lang IN LISTS VCPKG_LANGUAGES) + list(APPEND VCPKG_LANG_FLAGS CMAKE_${_lang}_FLAGS) +endforeach() +list(REMOVE_DUPLICATES VCPKG_LANG_FLAGS) + +# TODO if ever necessary: Properties to check + +set(VCPKG_VAR_PREFIX "VCPKG_DETECTED" CACHE STRING "Variable prefix to use for detected flags") +set(VCPKG_VARS_TO_CHECK "${VCPKG_DEFAULT_VARS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") +set(VCPKG_FLAGS_TO_CHECK "${VCPKG_DEFAULT_FLAGS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") +set(VCPKG_ENV_VARS_TO_CHECK "${VCPKG_DEFAULT_ENV_VARS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") + +if(NOT VCPKG_OUTPUT_FILE) + message(FATAL_ERROR "VCPKG_OUTPUT_FILE is required to be defined") +endif() + +if(NOT CMAKE_BUILD_TYPE) + message(FATAL_ERROR "CMAKE_BUILD_TYPE is required to be defined") +else() + string(TOUPPER "${CMAKE_BUILD_TYPE}" VCPKG_CONFIGS) +endif() + + +project(get_cmake_vars LANGUAGES ${VCPKG_LANGUAGES}) + +foreach(VAR IN LISTS VCPKG_VARS_TO_CHECK) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${VAR} \"${${VAR}}\")\n") +endforeach() + +foreach(_env IN LISTS VCPKG_ENV_VARS_TO_CHECK) + if(CMAKE_HOST_WIN32) + string(REPLACE "\\" "/" ENV_${_env} "$ENV{${_env}}") + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_ENV_${_env} \"${ENV_${_env}}\")\n") + else() + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_ENV_${_env} \"$ENV{${_env}}\")\n") + endif() +endforeach() + +macro(_vcpkg_adjust_flags flag_var) + if(MSVC) # Transform MSVC /flags to -flags due to bash scripts intepreting /flag as a path. + string(REGEX REPLACE "(^| )/" "\\1-" ${flag_var} "${${flag_var}}") + endif() + if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + if("${flag_var}" IN_LIST VCPKG_LANG_FLAGS) + # macOS - append arch and isysroot if cross-compiling + if(NOT "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}") + + foreach(arch IN LISTS CMAKE_OSX_ARCHITECTURES) + string(APPEND ${flag_var} " -arch ${arch}") + endforeach() + string(APPEND ${flag_var} " -isysroot ${CMAKE_OSX_SYSROOT}") + endif() + endif() + endif() +endmacro() + +foreach(flag IN LISTS VCPKG_FLAGS_TO_CHECK) + string(STRIP "${${flag}}" ${flag}) # Strip leading and trailing whitespaces + _vcpkg_adjust_flags(${flag}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag} \" ${${flag}}\")\n") + foreach(config IN LISTS VCPKG_CONFIGS) + string(STRIP "${${flag}_${config}}" ${flag}_${config}) + _vcpkg_adjust_flags(${flag}_${config}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag}_${config} \"${CMAKE_${flag}_FLAGS_${config}}\")\n") + set(COMBINED_${flag}_${config} "${${flag}} ${${flag}_${config}}") + string(STRIP "${COMBINED_${flag}_${config}}" COMBINED_${flag}_${config}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${flag}_${config} \"${COMBINED_${flag}_${config}}\")\n") + endforeach() +endforeach() + + +file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}") + +# Programs: +# CMAKE_AR +# CMAKE__COMPILER_AR (Wrapper) +# CMAKE_RANLIB +# CMAKE__COMPILER_RANLIB +# CMAKE_STRIP +# CMAKE_NM +# CMAKE_OBJDUMP +# CMAKE_DLLTOOL +# CMAKE_MT +# CMAKE_LINKER +# CMAKE_C_COMPILER +# CMAKE_CXX_COMPILER +# CMAKE_RC_COMPILER + +# Flags: +# CMAKE__FLAGS +# CMAKE__FLAGS_ +# CMAKE_RC_FLAGS +# CMAKE_SHARED_LINKER_FLAGS +# CMAKE_STATIC_LINKER_FLAGS +# CMAKE_STATIC_LINKER_FLAGS_ +# CMAKE_EXE_LINKER_FLAGS +# CMAKE_EXE_LINKER_FLAGS_ diff --git a/ports/vcpkg-cmake/copyright b/ports/vcpkg-cmake/copyright new file mode 100644 index 00000000000000..2e4eac8264fa4c --- /dev/null +++ b/ports/vcpkg-cmake/copyright @@ -0,0 +1,23 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ports/vcpkg-cmake/portfile.cmake b/ports/vcpkg-cmake/portfile.cmake new file mode 100644 index 00000000000000..afc1ffbb47c81f --- /dev/null +++ b/ports/vcpkg-cmake/portfile.cmake @@ -0,0 +1,16 @@ +if(NOT TARGET_TRIPLET STREQUAL _HOST_TRIPLET) + # make FATAL_ERROR in CI when issue #16773 fixed + message(WARNING "vcpkg-cmake is a host-only port; please mark it as a host port in your dependencies.") +endif() + +file(INSTALL + "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_configure.cmake" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_build.cmake" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_install.cmake" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_get_vars.cmake" + "${CMAKE_CURRENT_LIST_DIR}/cmake_get_vars" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" + "${CMAKE_CURRENT_LIST_DIR}/copyright" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/vcpkg-cmake/vcpkg-port-config.cmake b/ports/vcpkg-cmake/vcpkg-port-config.cmake new file mode 100644 index 00000000000000..2eb9f372339010 --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg-port-config.cmake @@ -0,0 +1,4 @@ +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_configure.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_build.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_install.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_get_vars.cmake") diff --git a/ports/vcpkg-cmake/vcpkg.json b/ports/vcpkg-cmake/vcpkg.json new file mode 100644 index 00000000000000..49b1387178e8c5 --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg.json @@ -0,0 +1,4 @@ +{ + "name": "vcpkg-cmake", + "version-date": "2021-09-13" +} diff --git a/ports/vcpkg-cmake/vcpkg_cmake_build.cmake b/ports/vcpkg-cmake/vcpkg_cmake_build.cmake new file mode 100644 index 00000000000000..ef27a6c91bf3f3 --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg_cmake_build.cmake @@ -0,0 +1,115 @@ +#[===[.md: +# vcpkg_cmake_build + +Build a cmake project. + +```cmake +vcpkg_cmake_build( + [TARGET ] + [LOGFILE_BASE ] + [DISABLE_PARALLEL] + [ADD_BIN_TO_PATH] +) +``` + +`vcpkg_cmake_build` builds an already-configured cmake project. +You can use the alias [`vcpkg_cmake_install()`] function +if your CMake build system supports the `install` TARGET, +and this is something we recommend doing whenever possible. +Otherwise, you can use `TARGET` to set the target to build. +This function defaults to not passing a target to cmake. + +`LOGFILE_BASE` is used to set the base of the logfile names; +by default, this is `build`, and thus the logfiles end up being something like +`build-x86-windows-dbg.log`; if you use `vcpkg_cmake_install`, +this is set to `install`, so you'll get log names like `install-x86-windows-dbg.log`. + +For build systems that are buggy when run in parallel, +using `DISABLE_PARALLEL` will run the build with only one job. + +Finally, `ADD_BIN_TO_PATH` adds the appropriate (either release or debug) +`bin/` directories to the path during the build, +such that executables run during the build will be able to access those DLLs. +#]===] +if(Z_VCPKG_CMAKE_BUILD_GUARD) + return() +endif() +set(Z_VCPKG_CMAKE_BUILD_GUARD ON CACHE INTERNAL "guard variable") + +function(vcpkg_cmake_build) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_BASE" "") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_build was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT DEFINED arg_LOGFILE_BASE) + set(arg_LOGFILE_BASE "build") + endif() + + set(build_args) + set(target_args) + set(parallel_args) + set(no_parallel_args) + + if(Z_VCPKG_CMAKE_GENERATOR STREQUAL "Ninja") + set(build_args "-v") # verbose output + set(parallel_args "-j${VCPKG_CONCURRENCY}") + set(no_parallel_args "-j1") + elseif(Z_VCPKG_CMAKE_GENERATOR MATCHES "^Visual Studio") + set(build_args + "/p:VCPkgLocalAppDataDisabled=true" + "/p:UseIntelMKL=No" + ) + set(parallel_args "/m") + elseif(Z_VCPKG_CMAKE_GENERATOR STREQUAL "NMake Makefiles") + # No options are currently added for nmake builds + else() + message(FATAL_ERROR "Unrecognized GENERATOR setting from vcpkg_configure_cmake(). Valid generators are: Ninja, Visual Studio, and NMake Makefiles") + endif() + + if(DEFINED arg_TARGET) + set(target_args "--target" "${arg_TARGET}") + endif() + + foreach(buildtype IN ITEMS debug release) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL buildtype) + if(buildtype STREQUAL "debug") + set(short_buildtype "dbg") + set(cmake_config "Debug") + else() + set(short_buildtype "rel") + set(cmake_config "Release") + endif() + + message(STATUS "Building ${TARGET_TRIPLET}-${short_buildtype}") + + if(arg_ADD_BIN_TO_PATH) + set(env_path_backup "$ENV{PATH}") + if(buildtype STREQUAL "debug") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") + else() + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") + endif() + endif() + + if (arg_DISABLE_PARALLEL) + vcpkg_execute_build_process( + COMMAND "${CMAKE_COMMAND}" --build . --config "${cmake_config}" ${target_args} -- ${build_args} ${no_parallel_args} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${short_buildtype}" + LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}-${short_buildtype}" + ) + else() + vcpkg_execute_build_process( + COMMAND "${CMAKE_COMMAND}" --build . --config "${cmake_config}" ${target_args} -- ${build_args} ${parallel_args} + NO_PARALLEL_COMMAND "${CMAKE_COMMAND}" --build . --config "${cmake_config}" ${target_args} -- ${build_args} ${no_parallel_args} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${short_buildtype}" + LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}-${short_buildtype}" + ) + endif() + + if(arg_ADD_BIN_TO_PATH) + set(ENV{PATH} "${env_path_backup}") + endif() + endif() + endforeach() +endfunction() diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake new file mode 100644 index 00000000000000..c9657bfa9a0941 --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -0,0 +1,494 @@ +#[===[.md: +# vcpkg_cmake_configure + +Configure a CMake buildsystem. + +```cmake +vcpkg_cmake_configure( + SOURCE_PATH + [LOGFILE_BASE ] + [DISABLE_PARALLEL_CONFIGURE] + [NO_CHARSET_FLAG] + [WINDOWS_USE_MSBUILD] + [GENERATOR ] + [OPTIONS + ...] + [OPTIONS_RELEASE + ...] + [OPTIONS_DEBUG + ...] + [MAYBE_UNUSED_VARIABLES + ...] +) +``` + +`vcpkg_cmake_configure` configures a CMake build system for use with +`vcpkg_cmake_buildsystem_build` and `vcpkg_cmake_buildsystem_install`. +`source-path` is where the source is located; by convention, +this is usually `${SOURCE_PATH}`, which is set by one of the `vcpkg_from_*` functions. +This function configures the build system for both Debug and Release builds by default, +assuming that `VCPKG_BUILD_TYPE` is not set; if it is, then it will only configure for +that build type. + +Use the `OPTIONS` argument to set the configure settings for both release and debug, +and use `OPTIONS_RELEASE` and `OPTIONS_DEBUG` to set the configure settings for +release only and debug only respectively. + +By default, when possible, `vcpkg_cmake_configure` uses [ninja-build] +as its build system. If the `WINDOWS_USE_MSBUILD` argument is passed, then +`vcpkg_cmake_configure` will use a Visual Studio generator on Windows; +on every other platform, `vcpkg_cmake_configure` just uses Ninja. + +[ninja-build]: https://ninja-build.org/ + +Additionally, one may pass the specific generator a port should use with `GENERATOR`. +This is useful if some project-specific buildsystem +has been wrapped in a CMake build system that doesn't perform an actual build. +If used for this purpose, it should be set to `"NMake Makefiles"`. +`vcpkg_cmake_buildsystem_build` and `install` do not support this being set to anything +except for NMake. + +For libraries which cannot be configured in parallel, +pass the `DISABLE_PARALLEL_CONFIGURE` flag. This is needed, for example, +if the library's build system writes back into the source directory during configure. +This also disables the `CMAKE_DISABLE_SOURCE_CHANGES` option. + +By default, this function adds flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` +which set the default character set to utf-8 for MSVC. +If the library sets its own code page, pass the `NO_CHARSET_FLAG` option. + +This function makes certain that all options passed in are used by the +underlying CMake build system. If there are options that might be unused, +perhaps on certain platforms, pass those variable names to +`MAYBE_UNUSED_VARIABLES`. For example: +```cmake +vcpkg_cmake_configure( + ... + OPTIONS + -DBUILD_EXAMPLE=OFF + ... + MAYBE_UNUSED_VARIABLES + BUILD_EXAMPLE +) +``` + +`LOGFILE_BASE` is used to set the base of the logfile names; +by default, this is `config`, and thus the logfiles end up being something like +`config-x86-windows-dbg.log`. You can set it to anything you like; +if you set it to `config-the-first`, +you'll get something like `config-the-first-x86-windows.dbg.log`. + +## Notes +This command supplies many common arguments to CMake. To see the full list, examine the source. + +## Examples + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +#]===] +if(Z_VCPKG_CMAKE_CONFIGURE_GUARD) + return() +endif() +set(Z_VCPKG_CMAKE_CONFIGURE_GUARD ON CACHE INTERNAL "guard variable") + +macro(z_vcpkg_cmake_configure_both_set_or_unset var1 var2) + if(DEFINED ${var1} AND NOT DEFINED ${var2}) + message(FATAL_ERROR "If ${var1} is set, then ${var2} must be set.") + elseif(NOT DEFINED ${var1} AND DEFINED ${var2}) + message(FATAL_ERROR "If ${var2} is set, then ${var1} must be set.") + endif() +endmacro() + +function(vcpkg_cmake_configure) + cmake_parse_arguments(PARSE_ARGV 0 "arg" + "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;WINDOWS_USE_MSBUILD;NO_CHARSET_FLAG;Z_CMAKE_GET_VARS_USAGE" + "SOURCE_PATH;GENERATOR;LOGFILE_BASE" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;MAYBE_UNUSED_VARIABLES" + ) + + if(NOT arg_Z_CMAKE_GET_VARS_USAGE AND DEFINED CACHE{Z_VCPKG_CMAKE_GENERATOR}) + message(WARNING "vcpkg_cmake_configure already called; this function should only be called once.") + endif() + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_buildsystem_build was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT DEFINED arg_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH must be set") + endif() + if(NOT DEFINED arg_LOGFILE_BASE) + set(arg_LOGFILE_BASE "config-${TARGET_TRIPLET}") + endif() + + set(manually_specified_variables "") + + if(arg_Z_CMAKE_GET_VARS_USAGE) + set(configuring_message "Getting CMake variables for ${TARGET_TRIPLET}") + else() + set(configuring_message "Configuring ${TARGET_TRIPLET}") + + foreach(option IN LISTS arg_OPTIONS arg_OPTIONS_RELEASE arg_OPTIONS_DEBUG) + if(option MATCHES "^-D([^:=]*)[:=]") + list(APPEND manually_specified_variables "${CMAKE_MATCH_1}") + endif() + endforeach() + list(REMOVE_DUPLICATES manually_specified_variables) + list(REMOVE_ITEM manually_specified_variables ${arg_MAYBE_UNUSED_VARIABLES}) + debug_message("manually specified variables: ${manually_specified_variables}") + endif() + + if(CMAKE_HOST_WIN32) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(host_architecture "$ENV{PROCESSOR_ARCHITEW6432}") + else() + set(host_architecture "$ENV{PROCESSOR_ARCHITECTURE}") + endif() + endif() + + set(ninja_can_be_used ON) # Ninja as generator + set(ninja_host ON) # Ninja as parallel configurator + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(targetting_uwp ON) + endif() + + if(host_architecture STREQUAL "x86") + # Prebuilt ninja binaries are only provided for x64 hosts + set(ninja_can_be_used OFF) + set(ninja_host OFF) + elseif(targetting_uwp) + # Ninja and MSBuild have many differences when targetting UWP, so use MSBuild to maximize existing compatibility + set(ninja_can_be_used OFF) + endif() + + set(generator) + if(DEFINED arg_GENERATOR) + set(generator "${arg_GENERATOR}") + elseif(arg_WINDOWS_USE_MSBUILD OR NOT ninja_can_be_used) + if(VCPKG_PLATFORM_TOOLSET STREQUAL "v120") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(generator "Visual Studio 12 2013") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(generator "Visual Studio 12 2013 Win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(generator "Visual Studio 12 2013 ARM") + endif() + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(generator "Visual Studio 14 2015") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(generator "Visual Studio 14 2015 Win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(generator "Visual Studio 14 2015 ARM") + endif() + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(generator "Visual Studio 15 2017") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(generator "Visual Studio 15 2017 Win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(generator "Visual Studio 15 2017 ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(generator "Visual Studio 15 2017") + set(arch "ARM64") + endif() + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(generator "Visual Studio 16 2019") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(arch "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(arch "x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(arch "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(arch "ARM64") + else() + set(generator) + endif() + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v143") + set(generator "Visual Studio 17 2022") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(arch "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(arch "x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(arch "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(arch "ARM64") + else() + set(generator) + endif() + endif() + else() + set(generator "Ninja") + endif() + + if(NOT DEFINED generator) + if(NOT VCPKG_CMAKE_SYSTEM_NAME) + set(VCPKG_CMAKE_SYSTEM_NAME Windows) + endif() + message(FATAL_ERROR "Unable to determine appropriate generator for: " + "${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}") + endif() + + # If we use Ninja, make sure it's on PATH + if(generator STREQUAL "Ninja" AND NOT DEFINED ENV{VCPKG_FORCE_SYSTEM_BINARIES}) + vcpkg_find_acquire_program(NINJA) + get_filename_component(ninja_path "${NINJA}" DIRECTORY) + vcpkg_add_to_path("${ninja_path}") + list(APPEND arg_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") + endif() + + file(REMOVE_RECURSE + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) + list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") + if(targetting_uwp AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android" AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + set(VCPKG_CMAKE_SYSTEM_VERSION 21) + endif() + endif() + + if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND arg_OPTIONS "-DBUILD_SHARED_LIBS=ON") + elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND arg_OPTIONS "-DBUILD_SHARED_LIBS=OFF") + else() + message(FATAL_ERROR + "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". " + "It must be \"static\" or \"dynamic\"") + endif() + + z_vcpkg_cmake_configure_both_set_or_unset(VCPKG_CXX_FLAGS_DEBUG VCPKG_C_FLAGS_DEBUG) + z_vcpkg_cmake_configure_both_set_or_unset(VCPKG_CXX_FLAGS_RELEASE VCPKG_C_FLAGS_RELEASE) + z_vcpkg_cmake_configure_both_set_or_unset(VCPKG_CXX_FLAGS VCPKG_C_FLAGS) + + set(VCPKG_SET_CHARSET_FLAG ON) + if(arg_NO_CHARSET_FLAG) + set(VCPKG_SET_CHARSET_FLAG OFF) + endif() + + if(NOT DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + if(NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME OR _TARGETTING_UWP) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/linux.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/android.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/osx.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/ios.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/freebsd.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/openbsd.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/mingw.cmake") + endif() + endif() + + + list(JOIN VCPKG_TARGET_ARCHITECTURE "\;" target_architecture_string) + list(APPEND arg_OPTIONS + "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" + "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" + "-DVCPKG_SET_CHARSET_FLAG=${VCPKG_SET_CHARSET_FLAG}" + "-DVCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}" + "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" + "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" + "-DCMAKE_VERBOSE_MAKEFILE=ON" + "-DVCPKG_APPLOCAL_DEPS=OFF" + "-DCMAKE_TOOLCHAIN_FILE=${SCRIPTS}/buildsystems/vcpkg.cmake" + "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" + "-DVCPKG_CXX_FLAGS=${VCPKG_CXX_FLAGS}" + "-DVCPKG_CXX_FLAGS_RELEASE=${VCPKG_CXX_FLAGS_RELEASE}" + "-DVCPKG_CXX_FLAGS_DEBUG=${VCPKG_CXX_FLAGS_DEBUG}" + "-DVCPKG_C_FLAGS=${VCPKG_C_FLAGS}" + "-DVCPKG_C_FLAGS_RELEASE=${VCPKG_C_FLAGS_RELEASE}" + "-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}" + "-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}" + "-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}" + "-DVCPKG_LINKER_FLAGS_RELEASE=${VCPKG_LINKER_FLAGS_RELEASE}" + "-DVCPKG_LINKER_FLAGS_DEBUG=${VCPKG_LINKER_FLAGS_DEBUG}" + "-DVCPKG_TARGET_ARCHITECTURE=${target_architecture_string}" + "-DCMAKE_INSTALL_LIBDIR:STRING=lib" + "-DCMAKE_INSTALL_BINDIR:STRING=bin" + "-D_VCPKG_ROOT_DIR=${VCPKG_ROOT_DIR}" + "-D_VCPKG_INSTALLED_DIR=${_VCPKG_INSTALLED_DIR}" + "-DVCPKG_MANIFEST_INSTALL=OFF" + ) + + if(DEFINED arch) + list(APPEND arg_OPTIONS "-A${arch}") + endif() + + # Sets configuration variables for macOS builds + foreach(config_var IN ITEMS INSTALL_NAME_DIR OSX_DEPLOYMENT_TARGET OSX_SYSROOT OSX_ARCHITECTURES) + if(DEFINED VCPKG_${config_var}) + list(JOIN VCPKG_${config_var} "\;" config_var_value) + list(APPEND arg_OPTIONS "-DCMAKE_${config_var}=${config_var_value}") + endif() + endforeach() + + # Allow overrides / additional configuration variables from triplets + if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS) + list(APPEND arg_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS}") + endif() + if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE) + list(APPEND arg_OPTIONS_RELEASE "${VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE}") + endif() + if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG) + list(APPEND arg_OPTIONS_DEBUG "${VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG}") + endif() + + if(ninja_host AND CMAKE_HOST_WIN32 AND NOT arg_DISABLE_PARALLEL_CONFIGURE) + list(APPEND arg_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON") + + vcpkg_find_acquire_program(NINJA) + + if(NOT DEFINED ninja_path) + # if ninja_path was defined above, we've already done this + get_filename_component(ninja_path "${NINJA}" DIRECTORY) + vcpkg_add_to_path("${ninja_path}") + endif() + + #parallelize the configure step + set(parallel_configure_contents + "rule CreateProcess\n command = $process\n\n" + ) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(line "build ../CMakeCache.txt: CreateProcess\n ") + string(APPEND line "process = \"${CMAKE_COMMAND}\" -S \"${arg_SOURCE_PATH}\" -B .. ") + + if(DEFINED arg_OPTIONS AND NOT arg_OPTIONS STREQUAL "") + list(JOIN arg_OPTIONS "\" \"" options) + string(APPEND line "\"${options}\" ") + endif() + if(DEFINED arg_OPTIONS_RELEASE AND NOT arg_OPTIONS_RELEASE STREQUAL "") + list(JOIN arg_OPTIONS_RELEASE "\" \"" options_rel) + string(APPEND line "\"${options_rel}\" ") + endif() + string(APPEND line "-G \"${generator}\" ") + string(APPEND line "\"-DCMAKE_BUILD_TYPE=Release\" ") + string(APPEND line "\"-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}\"") + string(APPEND parallel_configure_contents "${line}\n\n") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(line "build ../../${TARGET_TRIPLET}-dbg/CMakeCache.txt: CreateProcess\n ") + string(APPEND line "process = \"${CMAKE_COMMAND}\" -S \"${arg_SOURCE_PATH}\" -B \"../../${TARGET_TRIPLET}-dbg\" ") + + if(DEFINED arg_OPTIONS AND NOT arg_OPTIONS STREQUAL "") + list(JOIN arg_OPTIONS "\" \"" options) + string(APPEND line "\"${options}\" ") + endif() + if(DEFINED arg_OPTIONS_DEBUG AND NOT arg_OPTIONS_DEBUG STREQUAL "") + list(JOIN arg_OPTIONS_DEBUG "\" \"" options_dbg) + string(APPEND line "\"${options_dbg}\" ") + endif() + string(APPEND line "-G \"${generator}\" ") + string(APPEND line "\"-DCMAKE_BUILD_TYPE=Debug\" ") + string(APPEND line "\"-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug\"") + string(APPEND parallel_configure_contents "${line}\n\n") + endif() + + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure") + file(WRITE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure/build.ninja" "${parallel_configure_contents}") + + message(STATUS "${configuring_message}") + vcpkg_execute_required_process( + COMMAND ninja -v + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure" + LOGNAME "${arg_LOGFILE_BASE}" + ) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-err.log") + else() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "${configuring_message}-dbg") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND + "${CMAKE_COMMAND}" "${arg_SOURCE_PATH}" + ${arg_OPTIONS} + ${arg_OPTIONS_DEBUG} + -G "${generator}" + "-DCMAKE_BUILD_TYPE=Debug" + "-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME "${arg_LOGFILE_BASE}-dbg" + ) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-err.log") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "${configuring_message}-rel") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND + "${CMAKE_COMMAND}" "${arg_SOURCE_PATH}" + ${arg_OPTIONS} + ${arg_OPTIONS_RELEASE} + -G "${generator}" + "-DCMAKE_BUILD_TYPE=Release" + "-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME "${arg_LOGFILE_BASE}-rel" + ) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-err.log") + endif() + endif() + + set(all_unused_variables) + foreach(config_log IN LISTS config_logs) + if(NOT EXISTS "${config_log}") + continue() + endif() + file(READ "${config_log}" log_contents) + debug_message("Reading configure log ${config_log}...") + if(NOT log_contents MATCHES "Manually-specified variables were not used by the project:\n\n(( [^\n]*\n)*)") + continue() + endif() + string(STRIP "${CMAKE_MATCH_1}" unused_variables) # remove leading ` ` and trailing `\n` + string(REPLACE "\n " ";" unused_variables "${unused_variables}") + debug_message("unused variables: ${unused_variables}") + foreach(unused_variable IN LISTS unused_variables) + if(unused_variable IN_LIST manually_specified_variables) + debug_message("manually specified unused variable: ${unused_variable}") + list(APPEND all_unused_variables "${unused_variable}") + else() + debug_message("unused variable (not manually specified): ${unused_variable}") + endif() + endforeach() + endforeach() + + if(DEFINED all_unused_variables) + list(REMOVE_DUPLICATES all_unused_variables) + list(JOIN all_unused_variables "\n " all_unused_variables) + message(WARNING "The following variables are not used in CMakeLists.txt: + ${all_unused_variables} +Please recheck them and remove the unnecessary options from the `vcpkg_cmake_configure` call. +If these options should still be passed for whatever reason, please use the `MAYBE_UNUSED_VARIABLES` argument.") + endif() + + if(NOT arg_Z_CMAKE_GET_VARS_USAGE) + set(Z_VCPKG_CMAKE_GENERATOR "${generator}" CACHE INTERNAL "The generator which was used to configure CMake.") + endif() +endfunction() diff --git a/ports/vcpkg-cmake/vcpkg_cmake_get_vars.cmake b/ports/vcpkg-cmake/vcpkg_cmake_get_vars.cmake new file mode 100644 index 00000000000000..ec1a9980901c98 --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg_cmake_get_vars.cmake @@ -0,0 +1,61 @@ +#[===[.md: +# vcpkg_cmake_get_vars + +Runs a cmake configure with a dummy project to extract certain cmake variables + +## Usage +```cmake +vcpkg_cmake_get_vars() +``` + +`vcpkg_cmake_get_vars()` sets `` to +a path to a generated CMake file, with the detected `CMAKE_*` variables +re-exported as `VCPKG_DETECTED_CMAKE_*`. + +## Notes +Avoid usage in portfiles. + +All calls to `vcpkg_cmake_get_vars` will result in the same output file; +the output file is not generated multiple times. + +### Basic Usage + +```cmake +vcpkg_cmake_get_vars(cmake_vars_file) +include("${cmake_vars_file}") +message(STATUS "detected CXX flags: ${VCPKG_DETECTED_CMAKE_CXX_FLAGS}") +``` +#]===] + +set(Z_VCPKG_CMAKE_GET_VARS_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_DIR}") + +function(vcpkg_cmake_get_vars out_file) + cmake_parse_arguments(PARSE_ARGV 1 arg "" "" "") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + if(NOT DEFINED CACHE{Z_VCPKG_CMAKE_GET_VARS_FILE}) + set(Z_VCPKG_CMAKE_GET_VARS_FILE "${CURRENT_BUILDTREES_DIR}/cmake-get-vars-${TARGET_TRIPLET}.cmake.log" + CACHE PATH "The file to include to access the CMake variables from a generated project.") + vcpkg_cmake_configure( + SOURCE_PATH "${Z_VCPKG_CMAKE_GET_VARS_CURRENT_LIST_DIR}/cmake_get_vars" + OPTIONS_DEBUG "-DVCPKG_OUTPUT_FILE:PATH=${CURRENT_BUILDTREES_DIR}/cmake-get-vars-${TARGET_TRIPLET}-dbg.cmake.log" + OPTIONS_RELEASE "-DVCPKG_OUTPUT_FILE:PATH=${CURRENT_BUILDTREES_DIR}/cmake-get-vars-${TARGET_TRIPLET}-rel.cmake.log" + LOGFILE_BASE cmake-get-vars-${TARGET_TRIPLET} + Z_CMAKE_GET_VARS_USAGE # be quiet, don't set variables... + ) + + set(include_string "") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + string(APPEND include_string "include(\"\${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-${TARGET_TRIPLET}-rel.cmake.log\")\n") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + string(APPEND include_string "include(\"\${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-${TARGET_TRIPLET}-dbg.cmake.log\")\n") + endif() + file(WRITE "${Z_VCPKG_CMAKE_GET_VARS_FILE}" "${include_string}") + endif() + + set("${out_file}" "${Z_VCPKG_CMAKE_GET_VARS_FILE}" PARENT_SCOPE) +endfunction() diff --git a/ports/vcpkg-cmake/vcpkg_cmake_install.cmake b/ports/vcpkg-cmake/vcpkg_cmake_install.cmake new file mode 100644 index 00000000000000..0a609aa8da35fd --- /dev/null +++ b/ports/vcpkg-cmake/vcpkg_cmake_install.cmake @@ -0,0 +1,46 @@ +#[===[.md: +# vcpkg_cmake_install + +Build and install a cmake project. + +```cmake +vcpkg_cmake_install( + [DISABLE_PARALLEL] + [ADD_BIN_TO_PATH] +) +``` + +`vcpkg_cmake_install` transparently forwards to [`vcpkg_cmake_build()`], +with additional parameters to set the `TARGET` to `install`, +and to set the `LOGFILE_ROOT` to `install` as well. + +[`vcpkg_cmake_build()`]: vcpkg_cmake_build.cmake + +## Examples: + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +#]===] +if(Z_VCPKG_CMAKE_INSTALL_GUARD) + return() +endif() +set(Z_VCPKG_CMAKE_INSTALL_GUARD ON CACHE INTERNAL "guard variable") + +function(vcpkg_cmake_install) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "" "") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + set(args) + foreach(arg IN ITEMS DISABLE_PARALLEL ADD_BIN_TO_PATH) + if(arg_${arg}) + list(APPEND args "${arg}") + endif() + endforeach() + + vcpkg_cmake_build( + ${args} + LOGFILE_BASE install + TARGET install + ) +endfunction() diff --git a/ports/vcpkg-gfortran/portfile.cmake b/ports/vcpkg-gfortran/portfile.cmake new file mode 100644 index 00000000000000..7939c7684da28a --- /dev/null +++ b/ports/vcpkg-gfortran/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "linux" "osx") +include(vcpkg_find_fortran) +vcpkg_find_fortran(FORTRAN_CMAKE) +if(VCPKG_USE_INTERNAL_Fortran) + set(VCPKG_CRT_LINKAGE dynamic) # Will always be dynamic no way to overwrite internal CRT linkage here + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(HOST_ARCH $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(HOST_ARCH $ENV{PROCESSOR_ARCHITECTURE}) + endif() + + if(HOST_ARCH MATCHES "(amd|AMD)64") + set(MINGW_W w64) + set(MSYS_HOST x86_64) + elseif(HOST_ARCH MATCHES "(x|X)86") + set(MINGW_W w32) + set(MSYS_HOST i686) + else() + message(FATAL_ERROR "Unsupported host architecture ${HOST_ARCH}!" ) + endif() + + if(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)64") + set(MSYS_TARGET x86_64) + set(MINGW_W_TARGET 64) + set(GCC_LIB_SUFFIX s_seh-1) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)86") + set(MSYS_TARGET i686) + set(MINGW_W_TARGET 32) + set(GCC_LIB_SUFFIX s_dw2-1) + else() + message(FATAL_ERROR "Unsupported target architecture ${VCPKG_TARGET_ARCHITECTURE}!" ) + endif() + + set(MINGW_BIN "${vcpkg_find_fortran_MSYS_ROOT}/mingw${MINGW_W_TARGET}/bin/") + set(MINGW_Fortran_DLLS + "${MINGW_BIN}/libgfortran-5.dll" + "${MINGW_BIN}/libquadmath-0.dll" + "${MINGW_BIN}/libwinpthread-1.dll" + "${MINGW_BIN}/libgcc_${GCC_LIB_SUFFIX}.dll" + ) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${MINGW_Fortran_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(COPY ${MINGW_Fortran_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + file(COPY "${vcpkg_find_fortran_MSYS_ROOT}/mingw${MINGW_W_TARGET}/share/licenses" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + file(INSTALL "${vcpkg_find_fortran_MSYS_ROOT}/mingw${MINGW_W_TARGET}/share/licenses/crt/COPYING.MinGW-w64-runtime.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + set(VCPKG_POLICY_SKIP_DUMPBIN_CHECKS enabled) # due to outdated msvcrt + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +else() + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +endif() \ No newline at end of file diff --git a/ports/vcpkg-gfortran/vcpkg.json b/ports/vcpkg-gfortran/vcpkg.json new file mode 100644 index 00000000000000..604a1626d30cd0 --- /dev/null +++ b/ports/vcpkg-gfortran/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "vcpkg-gfortran", + "version-string": "3", + "port-version": 1, + "description": "Metaport to install gfortran dependencies from msys if VCPKG_USE_EXTERNAL_Fortran is false", + "supports": "windows & !arm" +} diff --git a/ports/vcpkg-pkgconfig-get-modules/README.md b/ports/vcpkg-pkgconfig-get-modules/README.md new file mode 100644 index 00000000000000..ac99412c2484bd --- /dev/null +++ b/ports/vcpkg-pkgconfig-get-modules/README.md @@ -0,0 +1,6 @@ +# vcpkg-pkgconfig-get-modules + +**Experimental: will change or be removed at any time** + +`vcpkg-pkgconfig-get-modules` provides `x_vcpkg_pkgconfig_get_modules()`, a function which simplifies calling +`pkg-config` in portfiles in order to gather dependencies for exotic buildsystems. diff --git a/ports/vcpkg-pkgconfig-get-modules/copyright b/ports/vcpkg-pkgconfig-get-modules/copyright new file mode 100644 index 00000000000000..2e4eac8264fa4c --- /dev/null +++ b/ports/vcpkg-pkgconfig-get-modules/copyright @@ -0,0 +1,23 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ports/vcpkg-pkgconfig-get-modules/portfile.cmake b/ports/vcpkg-pkgconfig-get-modules/portfile.cmake new file mode 100644 index 00000000000000..18df919b49f362 --- /dev/null +++ b/ports/vcpkg-pkgconfig-get-modules/portfile.cmake @@ -0,0 +1,12 @@ +if(NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET) + # make FATAL_ERROR in CI when issue #16773 fixed + message(WARNING "vcpkg-pkgconfig-get-modules is a host-only port; please mark it as a host port in your dependencies.") +endif() + +file(COPY + "${CMAKE_CURRENT_LIST_DIR}/x_vcpkg_pkgconfig_get_modules.cmake" + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" + "${CMAKE_CURRENT_LIST_DIR}/copyright" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/vcpkg-pkgconfig-get-modules/vcpkg-port-config.cmake b/ports/vcpkg-pkgconfig-get-modules/vcpkg-port-config.cmake new file mode 100644 index 00000000000000..01c9e6aec63bf6 --- /dev/null +++ b/ports/vcpkg-pkgconfig-get-modules/vcpkg-port-config.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/x_vcpkg_pkgconfig_get_modules.cmake") diff --git a/ports/vcpkg-pkgconfig-get-modules/vcpkg.json b/ports/vcpkg-pkgconfig-get-modules/vcpkg.json new file mode 100644 index 00000000000000..3098b94f3fd7a1 --- /dev/null +++ b/ports/vcpkg-pkgconfig-get-modules/vcpkg.json @@ -0,0 +1,5 @@ +{ + "name": "vcpkg-pkgconfig-get-modules", + "version-date": "2021-04-02", + "port-version": 1 +} diff --git a/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.cmake b/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.cmake new file mode 100644 index 00000000000000..cfe417be0a1cd3 --- /dev/null +++ b/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.cmake @@ -0,0 +1,146 @@ +#[===[.md: +# x_vcpkg_pkgconfig_get_modules + +Experimental +Retrieve required module information from pkgconfig modules + +## Usage +```cmake +x_vcpkg_pkgconfig_get_modules( + PREFIX + MODULES ... + [LIBS] + [LIBRARIES] + [LIBRARIES_DIRS] + [INCLUDE_DIRS] +) +``` +## Parameters + +### PREFIX +Used variable prefix to use + +### MODULES +List of pkgconfig modules to retrieve information for. + +### LIBS +Returns `"${PKGCONFIG}" --libs` in _LIBS_(DEBUG|RELEASE) + +### LIBRARIES +Returns `"${PKGCONFIG}" --libs-only-l` in _LIBRARIES_(DEBUG|RELEASE) + +### LIBRARIES_DIRS +Returns `"${PKGCONFIG}" --libs-only-L` in _LIBRARIES_DIRS_(DEBUG|RELEASE) + +### INCLUDE_DIRS +Returns `"${PKGCONFIG}" --cflags-only-I` in _INCLUDE_DIRS_(DEBUG|RELEASE) + +## Examples + +* [qt5-base](https://github.com/microsoft/vcpkg/blob/master/ports/qt5-base/portfile.cmake) +#]===] +if(Z_VCPKG_PKGCONFIG_GET_MODULES_GUARD) + return() +endif() +set(Z_VCPKG_PKGCONFIG_GET_MODULES_GUARD ON CACHE INTERNAL "guard variable") + +function(x_vcpkg_pkgconfig_get_modules) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "LIBS;LIBRARIES;LIBRARIES_DIR;INCLUDE_DIRS" "PREFIX" "MODULES") + if(NOT DEFINED arg_PREFIX OR arg_PREFIX STREQUAL "") + message(FATAL_ERROR "x_vcpkg_pkgconfig_get_modules requires parameter PREFIX!") + endif() + if(NOT DEFINED arg_MODULES OR arg_MODULES STREQUAL "") + message(FATAL_ERROR "x_vcpkg_pkgconfig_get_modules requires parameter MODULES!") + endif() + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "extra arguments passed to x_vcpkg_pkgconfig_get_modules: ${arg_UNPARSED_ARGUMENTS}") + endif() + + vcpkg_find_acquire_program(PKGCONFIG) + set(backup_PKG_CONFIG_PATH "$ENV{PKG_CONFIG_PATH}") + + set(var_suffixes) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + z_vcpkg_set_pkgconfig_path("${CURRENT_INSTALLED_DIR}/lib/pkgconfig${VCPKG_HOST_PATH_SEPARATOR}${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${backup_PKG_CONFIG_PATH}") + if(arg_LIBS) + execute_process( + COMMAND "${PKGCONFIG}" --libs ${arg_MODULES} + OUTPUT_VARIABLE ${arg_PREFIX}_LIBS_RELEASE + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + list(APPEND var_suffixes LIBS_RELEASE) + endif() + if(arg_LIBRARIES) + execute_process( + COMMAND "${PKGCONFIG}" --libs-only-l ${arg_MODULES} + OUTPUT_VARIABLE ${arg_PREFIX}_LIBRARIES_RELEASE + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + list(APPEND var_suffixes LIBRARIES_RELEASE) + endif() + if(arg_LIBRARIES_DIRS) + execute_process( + COMMAND "${PKGCONFIG}" --libs-only-L ${arg_MODULES} + OUTPUT_VARIABLE ${arg_PREFIX}_LIBRARIES_DIRS_RELEASE + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + list(APPEND var_suffixes LIBRARIES_DIRS_RELEASE) + endif() + if(arg_INCLUDE_DIRS) + execute_process( + COMMAND "${PKGCONFIG}" --cflags-only-I ${arg_MODULES} + OUTPUT_VARIABLE ${arg_PREFIX}_INCLUDE_DIRS_RELEASE + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + list(APPEND var_suffixes INCLUDE_DIRS_RELEASE) + endif() + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + z_vcpkg_set_pkgconfig_path("${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig${VCPKG_HOST_PATH_SEPARATOR}${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" "${backup_PKG_CONFIG_PATH}") + if(arg_LIBS) + execute_process( + COMMAND "${PKGCONFIG}" --libs ${arg_MODULES} + OUTPUT_VARIABLE ${arg_PREFIX}_LIBS_DEBUG + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + list(APPEND var_suffixes LIBS_DEBUG) + endif() + if(arg_LIBRARIES) + execute_process( + COMMAND "${PKGCONFIG}" --libs-only-l ${arg_MODULES} + OUTPUT_VARIABLE ${arg_PREFIX}_LIBRARIES_DEBUG + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + list(APPEND var_suffixes LIBRARIES_DEBUG) + endif() + if(arg_LIBRARIES_DIRS) + execute_process( + COMMAND "${PKGCONFIG}" --libs-only-L ${arg_MODULES} + OUTPUT_VARIABLE ${arg_PREFIX}_LIBRARIES_DIRS_DEBUG + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + list(APPEND var_suffixes LIBRARIES_DIRS_DEBUG) + endif() + if(arg_INCLUDE_DIRS) + execute_process( + COMMAND "${PKGCONFIG}" --cflags-only-I ${arg_MODULES} + OUTPUT_VARIABLE ${arg_PREFIX}_INCLUDE_DIRS_DEBUG + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + list(APPEND var_suffixes INCLUDE_DIRS_DEBUG) + endif() + endif() + set(ENV{PKG_CONFIG_PATH} "${backup_PKG_CONFIG_PATH}") + + foreach(_var IN LISTS var_suffixes) + set("${arg_PREFIX}_${_var}" "${${arg_PREFIX}_${_var}}" PARENT_SCOPE) + endforeach() +endfunction() + +function(z_vcpkg_set_pkgconfig_path _path _backup) + if(NOT _backup STREQUAL "") + set(ENV{PKG_CONFIG_PATH} "${_path}${VCPKG_HOST_PATH_SEPARATOR}${_backup}") + else() + set(ENV{PKG_CONFIG_PATH} "${_path}") + endif() +endfunction() diff --git a/ports/vectorclass/CMakeLists.txt b/ports/vectorclass/CMakeLists.txt new file mode 100644 index 00000000000000..54b83b267ce447 --- /dev/null +++ b/ports/vectorclass/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.8.0) +project(vectorclass VERSION 2.00.01 LANGUAGES CXX) + +add_library(${PROJECT_NAME} STATIC instrset_detect.cpp) + +target_include_directories(${PROJECT_NAME} INTERFACE + $ + $) + +target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17) + +include(CMakePackageConfigHelpers) +write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" + VERSION ${${PROJECT_NAME}_VERSION} + COMPATIBILITY SameMajorVersion) + +install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-config) +install( + EXPORT ${PROJECT_NAME}-config DESTINATION lib/cmake/${PROJECT_NAME} + NAMESPACE ${PROJECT_NAME}::) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" + DESTINATION lib/cmake/${PROJECT_NAME}) +install(DIRECTORY . DESTINATION include/${PROJECT_NAME} FILES_MATCHING PATTERN *.h) \ No newline at end of file diff --git a/ports/vectorclass/portfile.cmake b/ports/vectorclass/portfile.cmake new file mode 100644 index 00000000000000..2ec2732627b062 --- /dev/null +++ b/ports/vectorclass/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vectorclass/version2 + REF v2.00.01 + SHA512 2e1f714cf0e23cf7986f0e78b4c1eeab4da6434ac92449b81990931e19ae189df6fbbef50f11e9532a41dc6eaff0a4fea840349a3747621ff537bbd7519f2c3d + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/vectorclass/vcpkg.json b/ports/vectorclass/vcpkg.json new file mode 100644 index 00000000000000..ce2f69c8423b4e --- /dev/null +++ b/ports/vectorclass/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "vectorclass", + "version-string": "2.00.01", + "port-version": 1, + "description": "C++ class library for using the Single Instruction Multiple Data (SIMD) instructions in modern Microprocessors", + "homepage": "https://github.com/vectorclass/version2", + "supports": "!(arm | arm64)" +} diff --git a/ports/visit-struct/CONTROL b/ports/visit-struct/CONTROL deleted file mode 100644 index bf895349dc3901..00000000000000 --- a/ports/visit-struct/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: visit-struct -Version: 1.0-1 -Description: A header-only library providing structure visitors for C++11 and C++14 diff --git a/ports/visit-struct/portfile.cmake b/ports/visit-struct/portfile.cmake index 8a87471c5d2b5a..a797803ef70a22 100644 --- a/ports/visit-struct/portfile.cmake +++ b/ports/visit-struct/portfile.cmake @@ -1,6 +1,4 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cbeck88/visit_struct diff --git a/ports/visit-struct/vcpkg.json b/ports/visit-struct/vcpkg.json new file mode 100644 index 00000000000000..0227710a416278 --- /dev/null +++ b/ports/visit-struct/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "visit-struct", + "version-string": "1.0", + "port-version": 2, + "description": "A header-only library providing structure visitors for C++11 and C++14" +} diff --git a/ports/vlfeat/CMakeLists.txt b/ports/vlfeat/CMakeLists.txt new file mode 100644 index 00000000000000..39ecfbc6be59f3 --- /dev/null +++ b/ports/vlfeat/CMakeLists.txt @@ -0,0 +1,159 @@ +cmake_minimum_required (VERSION 3.10) +project (vlfeat) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/vlfeat" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/vlfeat" CACHE PATH "Path where cmake configs will be installed") + +# Make relative paths absolute (needed later on) +set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) +foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) + if(NOT IS_ABSOLUTE "${${var}}") + set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + endif() +endforeach() + +# make sure that the default is a RELEASE +set(default_build_type "Release") +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE + STRING "Choose the type of build." FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + +if(ENABLE_OPENMP) + find_package(OpenMP REQUIRED) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") +endif() + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D__LITTLE_ENDIAN__) + add_definitions(/Zp8) + add_definitions(/wd4146) + if(CMAKE_C_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W1" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + endif() +endif() + +if(CMAKE_COMPILER_IS_GNUCC) + add_definitions(-std=c99) + add_definitions(-Wno-unused-function) + add_definitions(-Wno-long-long) + add_definitions(-Wno-variadic-macros) +endif() + +if(USE_SSE) + add_definitions(-D__SSE2__) + set(SSE2_VL_C_FILES "vl/mathop_sse2.c" "vl/imopv_sse2.c") + set(SSE2_VL_H_FILES "vl/mathop_sse2.h" "vl/imopv_sse2.h") +else() + add_definitions(-DVL_DISABLE_SSE2) +endif() + +if(USE_AVX) + set(AVX_VL_C_FILES "vl/mathop_avx.c") + set(AVX_VL_H_FILES "vl/mathop_avx.h") +else() + add_definitions(-DVL_DISABLE_AVX) +endif() + + +set (C_SOURCES + vl/aib.c + vl/array.c + vl/covdet.c + vl/dsift.c + vl/fisher.c + vl/generic.c + vl/getopt_long.c + vl/gmm.c + vl/hikmeans.c + vl/hog.c + vl/homkermap.c + vl/host.c + vl/ikmeans.c + vl/imopv.c + vl/kdtree.c + vl/kmeans.c + vl/lbp.c + vl/liop.c + vl/mathop.c + ${AVX_VL_C_FILES} + ${SSE2_VL_C_FILES} + vl/mser.c + vl/pgm.c + vl/quickshift.c + vl/random.c + vl/rodrigues.c + vl/scalespace.c + vl/sift.c + vl/slic.c + vl/stringop.c + vl/svm.c + vl/svmdataset.c + vl/vlad.c +) + +set (H_SOURCES + vl/aib.h + vl/array.h + vl/covdet.h + vl/dsift.h + vl/fisher.h + vl/generic.h + vl/getopt_long.h + vl/gmm.h + vl/heap-def.h + vl/hikmeans.h + vl/hog.h + vl/homkermap.h + vl/host.h + vl/ikmeans.h + vl/imopv.h + vl/kdtree.h + vl/kmeans.h + vl/lbp.h + vl/liop.h + vl/mathop.h + ${AVX_VL_H_FILES} + ${SSE2_VL_H_FILES} + vl/mser.h + vl/pgm.h + vl/qsort-def.h + vl/quickshift.h + vl/random.h + vl/rodrigues.h + vl/scalespace.h + vl/shuffle-def.h + vl/sift.h + vl/slic.h + vl/stringop.h + vl/svm.h + vl/svmdataset.h + vl/vlad.h +) + +add_library(vl ${C_SOURCES} ${H_SOURCES}) +set_property(TARGET vl PROPERTY POSITION_INDEPENDENT_CODE ON) +target_compile_definitions(vl PRIVATE -DVL_BUILD_DLL) +target_include_directories(vl PUBLIC $ $) +set_target_properties(vl PROPERTIES PUBLIC_HEADER "${H_SOURCES}") + +install(TARGETS vl EXPORT vlfeatTargets + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}" + COMPONENT dev +) + +install(EXPORT vlfeatTargets + FILE vlfeatConfig.cmake + NAMESPACE unofficial::vlfeat:: + DESTINATION "${INSTALL_CMAKE_DIR}" +) diff --git a/ports/vlfeat/expose_missing_symbols.patch b/ports/vlfeat/expose_missing_symbols.patch new file mode 100644 index 00000000000000..02e9ce0a6614c2 --- /dev/null +++ b/ports/vlfeat/expose_missing_symbols.patch @@ -0,0 +1,79 @@ +diff --git a/vl/generic.c b/vl/generic.c +index c6f84a9..8617ed2 100644 +--- a/vl/generic.c ++++ b/vl/generic.c +@@ -1513,13 +1513,13 @@ vl_thread_specific_state_delete (VlThreadState * self) + */ + + #if (defined(VL_OS_LINUX) || defined(VL_OS_MACOSX)) && defined(VL_COMPILER_GNUC) +-static void vl_constructor () __attribute__ ((constructor)) ; +-static void vl_destructor () __attribute__ ((destructor)) ; ++//static void vl_constructor () __attribute__ ((constructor)) ; ++//static void vl_destructor () __attribute__ ((destructor)) ; + #endif + + #if defined(VL_OS_WIN) +-static void vl_constructor () ; +-static void vl_destructor () ; ++//static void vl_constructor () ; ++//static void vl_destructor () ; + + BOOL WINAPI DllMain( + HINSTANCE hinstDLL, // handle to DLL module +@@ -1563,7 +1563,7 @@ BOOL WINAPI DllMain( + /* ---------------------------------------------------------------- */ + + /** @internal @brief Initialize VLFeat state */ +-static void ++void + vl_constructor (void) + { + VlState * state ; +@@ -1637,7 +1637,7 @@ vl_constructor (void) + } + + /** @internal @brief Destruct VLFeat */ +-static void ++void + vl_destructor () + { + VlState * state ; +diff --git a/vl/generic.h b/vl/generic.h +index 4ef87f2..30a974e 100644 +--- a/vl/generic.h ++++ b/vl/generic.h +@@ -206,5 +206,7 @@ VL_EXPORT double vl_toc (void) ; + VL_EXPORT double vl_get_cpu_time (void) ; + /** @} */ + ++VL_EXPORT void vl_constructor(); ++VL_EXPORT void vl_destructor(); + /* VL_GENERIC_H */ + #endif +diff --git a/vl/sift.c b/vl/sift.c +index 03963fe..6477a81 100644 +--- a/vl/sift.c ++++ b/vl/sift.c +@@ -1443,7 +1443,7 @@ vl_sift_detect (VlSiftFilt * f) + ** @remark The minimum octave size is 2x2xS. + **/ + +-static void ++void + update_gradient (VlSiftFilt *f) + { + int s_min = f->s_min ; +diff --git a/vl/sift.h b/vl/sift.h +index 50e03f4..f9558ad 100644 +--- a/vl/sift.h ++++ b/vl/sift.h +@@ -138,7 +138,8 @@ void vl_sift_keypoint_init (VlSiftFilt const *f, + double y, + double sigma) ; + /** @} */ +- ++VL_EXPORT ++void update_gradient(VlSiftFilt* f); + /** @name Retrieve data and parameters + ** @{ + **/ diff --git a/ports/vlfeat/portfile.cmake b/ports/vlfeat/portfile.cmake new file mode 100644 index 00000000000000..a075bdef7ec25b --- /dev/null +++ b/ports/vlfeat/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vlfeat/vlfeat + REF 1b9075fc42fe54b42f0e937f8b9a230d8e2c7701 + SHA512 6d317a1a9496ccac80244553d555fe060b150ccc7ee397a353b64f3a8451f24d1f03d8c00ed04cd9fc2dc066a5c5089b03695c614cb43ffa09be363660278255 + PATCHES + expose_missing_symbols.patch +) + +set(USE_SSE ON) +set(USE_AVX OFF) # feature is broken, so it's always off anyway + +if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + set(USE_SSE OFF) + set(USE_AVX OFF) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_SSE=${USE_SSE} + -DUSE_AVX=${USE_AVX} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/vlfeat/vcpkg.json b/ports/vlfeat/vcpkg.json new file mode 100644 index 00000000000000..0e0c0d78bf9665 --- /dev/null +++ b/ports/vlfeat/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "vlfeat", + "version-string": "2020-07-10", + "port-version": 1, + "description": "An open library of computer vision algorithms", + "homepage": "https://www.vlfeat.org" +} diff --git a/ports/vlpp/CONTROL b/ports/vlpp/CONTROL deleted file mode 100644 index bd453ffc239e0f..00000000000000 --- a/ports/vlpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: vlpp -Version: 0.10.0.0 -Homepage: https://github.com/vczh-libraries/Release -Description: Common C++ construction, including string operation / generic container / linq / General-LR parser generator / multithreading / reflection for C++ / etc diff --git a/ports/vlpp/portfile.cmake b/ports/vlpp/portfile.cmake index 4b44ea53e93730..96a04e6cbd5faf 100644 --- a/ports/vlpp/portfile.cmake +++ b/ports/vlpp/portfile.cmake @@ -1,12 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vczh-libraries/Release - REF 579f51f5b30197386ccadcf0f3e0a3159ef3602f - SHA512 89cd5c86d04bc393180846c10e1122d01cd4d3ad041ca7e9199341bdc758903edf7b892a424a3b90aa2753bfede230ff3434cefd7f2fefefafa7959f5b8660d4 + REF 5dfe25c4f4997da2d7a23bdc80c2438e72d9813a # 0.11.0.0 + SHA512 5d585e561246385b074c625a3644b79defa22328dab0ab14112c846cb917f384abb617a5f400971ca29e4ee5ac391b88b17ee65d594caf9ebf279806db669a4a HEAD_REF master ) diff --git a/ports/vlpp/vcpkg.json b/ports/vlpp/vcpkg.json new file mode 100644 index 00000000000000..85650b62a2ee16 --- /dev/null +++ b/ports/vlpp/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "vlpp", + "version-string": "0.11.0.0", + "port-version": 1, + "description": "Common C++ construction, including string operation / generic container / linq / General-LR parser generator / multithreading / reflection for C++ / etc", + "homepage": "https://github.com/vczh-libraries/Release" +} diff --git a/ports/volk/portfile.cmake b/ports/volk/portfile.cmake new file mode 100644 index 00000000000000..e2083887df3840 --- /dev/null +++ b/ports/volk/portfile.cmake @@ -0,0 +1,25 @@ +# volk is not prepared to be a DLL. +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeux/volk + REF 5a605f5d6997bd929b666700a36ca3d9bd1d7a47 + SHA512 ed6faf13828f3e47c4f12f8d19952c94589420539e98405bf2a4b7959518357dcc2f210746f3683d3862ac8c80821f3c863d49f4625e2dac85d2a680567e4f00 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DVOLK_INSTALL=ON +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/volk) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the file containing the license where vcpkg expects it +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/volk/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/volk/README.md ${CURRENT_PACKAGES_DIR}/share/volk/copyright) diff --git a/ports/volk/vcpkg.json b/ports/volk/vcpkg.json new file mode 100644 index 00000000000000..3d3f4a1e64f8b0 --- /dev/null +++ b/ports/volk/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "volk", + "version-string": "2019-09-26", + "port-version": 1, + "description": [ + "Meta loader for Vulkan API.", + "Note that the static library target volk::volk is built without platform-specific defines.", + "Use the header-only target volk::volk_headers if you require platform-specific extensions." + ], + "homepage": "https://github.com/zeux/volk", + "dependencies": [ + "vulkan" + ] +} diff --git a/ports/vs-yasm/fix_paths.patch b/ports/vs-yasm/fix_paths.patch new file mode 100644 index 00000000000000..8b74a3aa179b06 --- /dev/null +++ b/ports/vs-yasm/fix_paths.patch @@ -0,0 +1,23 @@ +diff --git a/yasm.props b/yasm.props +index 06efe7a..10f6309 100644 +--- a/yasm.props ++++ b/yasm.props +@@ -6,15 +6,15 @@ + CustomBuild + + +- $(VCInstallDir) ++ $(VCInstallDir) + + + + 0 + 0 + $(IntDir)%(FileName).obj +- "$(YasmPath)"yasm.exe -Xvc -f win32 [AllOptions] [AdditionalOptions] "%(FullPath)" +- "$(YasmPath)"yasm.exe -Xvc -f win64 [AllOptions] [AdditionalOptions] "%(FullPath)" ++ "$(YasmPath)" -Xvc -f win32 [AllOptions] [AdditionalOptions] "%(FullPath)" ++ "$(YasmPath)" -Xvc -f win64 [AllOptions] [AdditionalOptions] "%(FullPath)" + echo YASM not supported on this platform + exit 1 + %(Identity) diff --git a/ports/vs-yasm/portfile.cmake b/ports/vs-yasm/portfile.cmake new file mode 100644 index 00000000000000..fc291c259001e5 --- /dev/null +++ b/ports/vs-yasm/portfile.cmake @@ -0,0 +1,17 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/VSYASM + REF deb50d9f18e8461538468339d508cdf240e64897 #v0.5 + SHA512 04627546020d33e5ea91f74b09c5ce3b817dce5f6ae4548c3b4148daa82fbd837c81675ac8730d3ca1cdf91fefa8bb23eec76d1bcd02c03dda1203d0c261178d + HEAD_REF master + PATCHES + fix_paths.patch +) + +set(_files yasm.props yasm.targets yasm.xml) +foreach(_file ${_files}) + file(INSTALL "${SOURCE_PATH}/${_file}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +endforeach() + +configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/ports/vs-yasm/vcpkg.json b/ports/vs-yasm/vcpkg.json new file mode 100644 index 00000000000000..830838cc7bde85 --- /dev/null +++ b/ports/vs-yasm/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "vs-yasm", + "version-string": "0.5.0", + "port-version": 1, + "description": "Provides Visual Studio integration for the YASM assembler.", + "homepage": "https://github.com/ShiftMediaProject/VSYASM", + "supports": "windows & !arm" +} diff --git a/ports/vtk-dicom/CONTROL b/ports/vtk-dicom/CONTROL deleted file mode 100644 index 4d6a1df3041baa..00000000000000 --- a/ports/vtk-dicom/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: vtk-dicom -Version: 0.8.9 -Description: DICOM for VTK -Build-Depends: vtk, zlib - -Feature: gdcm -Description: Use gdcm for decompressing DICOM files. -Build-Depends: gdcm diff --git a/ports/vtk-dicom/portfile.cmake b/ports/vtk-dicom/portfile.cmake index dd890ec2659204..171a046a26fbb0 100644 --- a/ports/vtk-dicom/portfile.cmake +++ b/ports/vtk-dicom/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO dgobbi/vtk-dicom - REF v0.8.9 - SHA512 f75295a25896b4d571e9d9bb04fbedbd8bcf5e12637d17b6eadceda296fc105decb44c6cb09f1d69daf17093bb61cdb8909fcde347137f30eb6b8b2b298ff065 + REF 5034c68450de857b70fbe4a4b9f8dddb62badef3 # v0.8.12 + SHA512 bad1ed6a4a412402a2cd69e5f85b2b73f1ee7ea46a6bbcac31c5f66d07ae006679ffbd9a3c70f9baa1b05b1af0a2d4ca0efc34ec0a85a92f5116b900e81635cd HEAD_REF master + PATCHES std.patch # similar patch is already in master ) if ("gdcm" IN_LIST FEATURES) @@ -21,22 +20,23 @@ if(USE_GDCM) -DUSE_DCMTK=OFF ) endif() - +vcpkg_find_acquire_program(PYTHON3) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DBUILD_PROGRAMS=OFF -DBUILD_EXAMPLES=OFF + "-DPython3_EXECUTABLE=${PYTHON3}" ${ADDITIONAL_OPTIONS} ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk-dicom) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/copyright) +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/vtk-dicom/std.patch b/ports/vtk-dicom/std.patch new file mode 100644 index 00000000000000..59160f089b7b7c --- /dev/null +++ b/ports/vtk-dicom/std.patch @@ -0,0 +1,74 @@ +diff --git a/Source/vtkScancoCTReader.cxx b/Source/vtkScancoCTReader.cxx +index a71f2e46e..afe202ffc 100644 +--- a/Source/vtkScancoCTReader.cxx ++++ b/Source/vtkScancoCTReader.cxx +@@ -176,7 +176,7 @@ int vtkScancoCTReader::CheckVersion(const char header[16]) + //---------------------------------------------------------------------------- + int vtkScancoCTReader::CanReadFile(const char *filename) + { +- ifstream infile(filename, ios::in | ios::binary); ++ std::ifstream infile(filename, ios::in | ios::binary); + + bool canRead = false; + if (infile.good()) +@@ -409,7 +409,7 @@ void vtkScancoCTReader::StripString(char *dest, const char *cp, size_t l) + } + + //---------------------------------------------------------------------------- +-int vtkScancoCTReader::ReadISQHeader(ifstream *file, unsigned long bytesRead) ++int vtkScancoCTReader::ReadISQHeader(std::ifstream *file, unsigned long bytesRead) + { + if (bytesRead < 512) + { +@@ -620,7 +620,7 @@ int vtkScancoCTReader::ReadISQHeader(ifstream *file, unsigned long bytesRead) + } + + //---------------------------------------------------------------------------- +-int vtkScancoCTReader::ReadAIMHeader(ifstream *file, unsigned long bytesRead) ++int vtkScancoCTReader::ReadAIMHeader(std::ifstream *file, unsigned long bytesRead) + { + if (bytesRead < 160) + { +@@ -987,7 +987,7 @@ int vtkScancoCTReader::RequestInformation( + const char *ufilename = filename; + #endif + +- ifstream infile(ufilename, ios::in | ios::binary); ++ std::ifstream infile(ufilename, ios::in | ios::binary); + if (!infile.good()) + { + vtkErrorMacro("Cannot open file " << filename); +@@ -1115,7 +1115,7 @@ int vtkScancoCTReader::RequestData( + static_cast(data->GetScalarPointer()); + + // open the file +- ifstream infile(filename, ios::in | ios::binary); ++ std::ifstream infile(filename, ios::in | ios::binary); + if (!infile.good()) + { + vtkErrorMacro("Cannot open file " << filename); +diff --git a/Source/vtkScancoCTReader.h b/Source/vtkScancoCTReader.h +index ca31d7572..240d532f2 100644 +--- a/Source/vtkScancoCTReader.h ++++ b/Source/vtkScancoCTReader.h +@@ -34,6 +34,7 @@ + #ifndef vtkScancoCTReader_h + #define vtkScancoCTReader_h + ++#include + #include "vtkImageReader2.h" + #include "vtkDICOMModule.h" // For export macro + #include "vtkDICOMConfig.h" // For configuration details +@@ -185,10 +186,10 @@ protected: + void InitializeHeader(); + + //! Read an ISQ header. +- int ReadISQHeader(ifstream *file, unsigned long bytesRead); ++ int ReadISQHeader(std::ifstream *file, unsigned long bytesRead); + + //! Read AIM header. +- int ReadAIMHeader(ifstream *file, unsigned long bytesRead); ++ int ReadAIMHeader(std::ifstream *file, unsigned long bytesRead); + + //! Check the file header to see what type of file it is. + /*! diff --git a/ports/vtk-dicom/vcpkg.json b/ports/vtk-dicom/vcpkg.json new file mode 100644 index 00000000000000..097ecde742f4c7 --- /dev/null +++ b/ports/vtk-dicom/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "vtk-dicom", + "version-string": "0.8.12", + "port-version": 2, + "description": "DICOM for VTK", + "homepage": "https://github.com/dgobbi/vtk-dicom", + "dependencies": [ + { + "name": "vtk", + "default-features": false + }, + "zlib" + ], + "features": { + "gdcm": { + "description": "Use gdcm for decompressing DICOM files.", + "dependencies": [ + "gdcm" + ] + } + } +} diff --git a/ports/vtk-m/portfile.cmake b/ports/vtk-m/portfile.cmake new file mode 100644 index 00000000000000..b8e90bc9840635 --- /dev/null +++ b/ports/vtk-m/portfile.cmake @@ -0,0 +1,59 @@ +# VENDORED DEPENDENCIES! +# TODO: Should be replaced in the future with VCPKG internal versions +# add_subdirectory(thirdparty/diy) +# add_subdirectory(thirdparty/lodepng) +# if(VTKm_ENABLE_LOGGING) + # add_subdirectory(thirdparty/loguru) +# endif() +# add_subdirectory(thirdparty/optionparser) +# add_subdirectory(thirdparty/taotuple) +# add_subdirectory(thirdparty/lcl) + +vcpkg_check_features (OUT_FEATURE_OPTIONS OPTIONS + FEATURES + cuda VTKm_ENABLE_CUDA + omp VTKm_ENABLE_OPENMP + tbb VTKm_ENABLE_TBB + mpi VTKm_ENABLE_MPI + double VTKm_USE_DOUBLE_PRECISION + ) + +if("cuda" IN_LIST FEATURES AND NOT ENV{CUDACXX}) + set(ENV{CUDACXX} "$ENV{CUDA_PATH}/bin/nvcc") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(STATUS "Feature CUDA forces static build!") + endif() + set(VCPKG_LIBRARY_LINKAGE "static") # CUDA forces static build. +endif() + +list(APPEND OPTIONS -DVTKm_ENABLE_RENDERING=ON) +list(APPEND OPTIONS -DVTKm_ENABLE_DEVELOPER_FLAGS=OFF) +list(APPEND OPTIONS -DVTKm_ENABLE_CPACK=OFF) +list(APPEND OPTIONS -DVTKm_USE_DEFAULT_TYPES_FOR_VTK=ON) +# For port customizations on unix systems. +# Please feel free to make these port features if it makes any sense +#list(APPEND OPTIONS -DVTKm_ENABLE_GL_CONTEXT=ON) # or +#list(APPEND OPTIONS -DVTKm_ENABLE_EGL_CONTEXT=ON) # or +#list(APPEND OPTIONS -DVTKm_ENABLE_OSMESA_CONTEXT=ON) +list(APPEND OPTIONS -DBUILD_TESTING=OFF) + +vcpkg_from_gitlab(GITLAB_URL "https://gitlab.kitware.com" + OUT_SOURCE_PATH SOURCE_PATH + REPO vtk/vtk-m + REF 13a117e0e8935eef3f320b5a1cd71d9911ad9853 # v1.6.0 Version is strongly locked to VTK 9.0. Upgrading will most likly brake the VTK build + SHA512 54f7f52ab4ee7954b6a303ffd3b8bcb18105b5d2fd8ed54b4e487fce2ebfbc51507e632189f775c79eea22ad24bd56bca401ddd679fc03d787342dd33d2ba18b + FILE_DISAMBIGUATOR 1) +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${OPTIONS}) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/vtkm-1.6 TARGET_PATH share/vtkm) + +file(READ ${CURRENT_PACKAGES_DIR}/share/vtkm/VTKmConfig.cmake _contents) +string(REPLACE [[set_and_check(VTKm_CONFIG_DIR "${PACKAGE_PREFIX_DIR}/lib/cmake/vtkm-1.6")]] [[set_and_check(VTKm_CONFIG_DIR "${PACKAGE_PREFIX_DIR}/share/vtkm")]] _contents ${_contents}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtkm/VTKmConfig.cmake ${_contents}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/vtk-m/vcpkg.json b/ports/vtk-m/vcpkg.json new file mode 100644 index 00000000000000..0b5c4fcc64d5f0 --- /dev/null +++ b/ports/vtk-m/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "vtk-m", + "version-semver": "1.6.0", + "description": "VTK-m is a toolkit of scientific visualization algorithms for emerging processor architectures.", + "homepage": "https://gitlab.kitware.com/vtk/vtk-m/", + "supports": "x64 & !uwp", + "features": { + "cuda": { + "description": "Use the NVIDIA CUDA device adapter.", + "dependencies": [ + "cuda" + ] + }, + "double": { + "description": "Use double precision in floating point calculations" + }, + "mpi": { + "description": "Use the MPI controller.", + "dependencies": [ + "mpi" + ] + }, + "omp": { + "description": "Use the OpenMP device adapter." + }, + "tbb": { + "description": "Use the Intel TBB device adapter.", + "dependencies": [ + "tbb" + ] + } + } +} diff --git a/ports/vtk/156fb524.patch b/ports/vtk/156fb524.patch new file mode 100644 index 00000000000000..716fd5c7e3e2f6 --- /dev/null +++ b/ports/vtk/156fb524.patch @@ -0,0 +1,393 @@ +diff --git a/Accelerators/Vtkm/Filters/CMakeLists.txt b/Accelerators/Vtkm/Filters/CMakeLists.txt +index 14e84f1dd6e8b9da275045fe5d80868b2e52ad5a..3a41bc4d2bffca8c3df79da218443b90f8ceb7d3 100644 +--- a/Accelerators/Vtkm/Filters/CMakeLists.txt ++++ b/Accelerators/Vtkm/Filters/CMakeLists.txt +@@ -46,6 +46,10 @@ foreach (class IN LISTS impl_classes) + list(APPEND headers "${class}.h") + endforeach () + ++list(APPEND sources ++ "vtkmClipInstantiationsWithField.cxx" ++ "vtkmClipInstantiationsWithImplicitFunction.cxx") ++ + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/vtkmConfigFilters.h.in" + "${CMAKE_CURRENT_BINARY_DIR}/vtkmConfigFilters.h" +diff --git a/Accelerators/Vtkm/Filters/vtkmClip.cxx b/Accelerators/Vtkm/Filters/vtkmClip.cxx +index 0b1dc86d3bedd425d4846f524818a68ada052ce9..65fec3110ebb6522900cbc965c5298031921e1e4 100644 +--- a/Accelerators/Vtkm/Filters/vtkmClip.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmClip.cxx +@@ -14,6 +14,7 @@ + =========================================================================*/ + + #include "vtkmClip.h" ++#include "vtkmClipInternals.h" + + #include "vtkCellIterator.h" + #include "vtkDataArray.h" +@@ -36,11 +37,9 @@ + + #include "vtkmFilterPolicy.h" + ++#include + #include + +-#include +-#include +- + #include + + vtkStandardNewMacro(vtkmClip); +@@ -50,19 +49,17 @@ void vtkmClip::PrintSelf(std::ostream& os, vtkIndent indent) + { + this->Superclass::PrintSelf(os, indent); + +- os << indent << "ClipValue: " << this->ClipValue << "\n"; ++ os << indent << "ClipValue: " << this->GetClipValue() << "\n"; + os << indent << "ClipFunction: \n"; +- this->ClipFunction->PrintSelf(os, indent.GetNextIndent()); +- os << indent << "ComputeScalars: " << this->ComputeScalars << "\n"; ++ this->GetClipFunction()->PrintSelf(os, indent.GetNextIndent()); ++ os << indent << "ComputeScalars: " << this->GetComputeScalars() << "\n"; + } + + //------------------------------------------------------------------------------ + vtkmClip::vtkmClip() +- : ClipValue(0.) +- , ComputeScalars(true) +- , ClipFunction(nullptr) +- , ClipFunctionConverter(new tovtkm::ImplicitFunctionConverter) ++ : Internals(new vtkmClip::internals) + { ++ this->Internals->ClipFunctionConverter.reset(new tovtkm::ImplicitFunctionConverter()); + // Clip active point scalars by default + this->SetInputArrayToProcess( + 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, vtkDataSetAttributes::SCALARS); +@@ -75,24 +72,54 @@ vtkmClip::~vtkmClip() = default; + vtkMTimeType vtkmClip::GetMTime() + { + vtkMTimeType mTime = this->Superclass::GetMTime(); +- if (this->ClipFunction) ++ if (this->GetClipFunction()) + { +- mTime = std::max(mTime, this->ClipFunction->GetMTime()); ++ mTime = std::max(mTime, this->GetClipFunction()->GetMTime()); + } + return mTime; + } + ++//------------------------------------------------------------------------------ ++double vtkmClip::GetClipValue() ++{ ++ return this->Internals->ClipValue; ++} ++ ++//------------------------------------------------------------------------------ ++void vtkmClip::SetClipValue(double val) ++{ ++ this->Internals->ClipValue = val; ++} ++ ++//------------------------------------------------------------------------------ ++bool vtkmClip::GetComputeScalars() ++{ ++ return this->Internals->ComputeScalars; ++} ++ ++//------------------------------------------------------------------------------ ++void vtkmClip::SetComputeScalars(bool val) ++{ ++ this->Internals->ComputeScalars = val; ++} ++ + //------------------------------------------------------------------------------ + void vtkmClip::SetClipFunction(vtkImplicitFunction* clipFunction) + { +- if (this->ClipFunction != clipFunction) ++ if (this->GetClipFunction() != clipFunction) + { +- this->ClipFunction = clipFunction; +- this->ClipFunctionConverter->Set(clipFunction); ++ this->Internals->ClipFunction = clipFunction; ++ this->Internals->ClipFunctionConverter->Set(clipFunction); + this->Modified(); + } + } + ++//------------------------------------------------------------------------------ ++vtkImplicitFunction* vtkmClip::GetClipFunction() ++{ ++ return this->Internals->ClipFunction; ++} ++ + //------------------------------------------------------------------------------ + int vtkmClip::RequestData( + vtkInformation*, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) +@@ -111,7 +138,7 @@ int vtkmClip::RequestData( + // Find the scalar array: + int assoc = this->GetInputArrayAssociation(0, inInfoVec); + vtkDataArray* scalars = this->GetInputArrayToProcess(0, inInfoVec); +- if (!this->ClipFunction && ++ if (!this->GetClipFunction() && + (assoc != vtkDataObject::FIELD_ASSOCIATION_POINTS || scalars == nullptr || + scalars->GetName() == nullptr || scalars->GetName()[0] == '\0')) + { +@@ -129,37 +156,18 @@ int vtkmClip::RequestData( + { + // Convert inputs to vtkm objects: + auto fieldsFlag = +- this->ComputeScalars ? tovtkm::FieldsFlag::PointsAndCells : tovtkm::FieldsFlag::None; ++ this->GetComputeScalars() ? tovtkm::FieldsFlag::PointsAndCells : tovtkm::FieldsFlag::None; + auto in = tovtkm::Convert(input, fieldsFlag); + + // Run filter: + vtkm::cont::DataSet result; +- if (this->ClipFunction) ++ if (this->GetClipFunction()) + { +- vtkm::filter::ClipWithImplicitFunction functionFilter; +- auto function = this->ClipFunctionConverter->Get(); +- if (function.GetValid()) +- { +- functionFilter.SetImplicitFunction(function); +- result = functionFilter.Execute(in); +- } ++ result = this->Internals->ExecuteClipWithImplicitFunction(in); + } + else + { +- vtkm::filter::ClipWithField fieldFilter; +- if (!this->ComputeScalars) +- { +- // explicitly convert just the field we need +- auto inField = tovtkm::Convert(scalars, assoc); +- in.AddField(inField); +- // don't pass this field +- fieldFilter.SetFieldsToPass( +- vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE)); +- } +- +- fieldFilter.SetActiveField(scalars->GetName(), vtkm::cont::Field::Association::POINTS); +- fieldFilter.SetClipValue(this->ClipValue); +- result = fieldFilter.Execute(in); ++ result = this->Internals->ExecuteClipWithField(in, scalars, assoc); + } + + // Convert result to output: +@@ -169,7 +177,7 @@ int vtkmClip::RequestData( + return 0; + } + +- if (!this->ClipFunction && this->ComputeScalars) ++ if (!this->GetClipFunction() && this->GetComputeScalars()) + { + output->GetPointData()->SetActiveScalars(scalars->GetName()); + } +@@ -189,8 +197,8 @@ int vtkmClip::RequestData( + << "Falling back to serial implementation."); + + vtkNew filter; +- filter->SetClipFunction(this->ClipFunction); +- filter->SetValue(this->ClipValue); ++ filter->SetClipFunction(this->GetClipFunction()); ++ filter->SetValue(this->GetClipValue()); + filter->SetInputData(input); + filter->Update(); + output->ShallowCopy(filter->GetOutput()); +diff --git a/Accelerators/Vtkm/Filters/vtkmClip.h b/Accelerators/Vtkm/Filters/vtkmClip.h +index edb3cebfadc9ebeddf3c5030716ba532c0e149fe..6f33d36460d72de340eb81bb321ee868d70e6b5b 100644 +--- a/Accelerators/Vtkm/Filters/vtkmClip.h ++++ b/Accelerators/Vtkm/Filters/vtkmClip.h +@@ -32,13 +32,6 @@ + + class vtkImplicitFunction; + +-namespace tovtkm +-{ +- +-class ImplicitFunctionConverter; +- +-} // namespace tovtkm +- + class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmClip : public vtkUnstructuredGridAlgorithm + { + public: +@@ -50,15 +43,15 @@ public: + * The scalar value to use when clipping the dataset. Values greater than + * ClipValue are preserved in the output dataset. Default is 0. + */ +- vtkGetMacro(ClipValue, double); +- vtkSetMacro(ClipValue, double); ++ double GetClipValue(); ++ void SetClipValue(double); + + /** + * If true, all input point data arrays will be mapped onto the output + * dataset. Default is true. + */ +- vtkGetMacro(ComputeScalars, bool); +- vtkSetMacro(ComputeScalars, bool); ++ bool GetComputeScalars(); ++ void SetComputeScalars(bool); + + /** + * Set the implicit function with which to perform the clipping. If set, +@@ -66,7 +59,7 @@ public: + * function. + */ + void SetClipFunction(vtkImplicitFunction*); +- vtkGetObjectMacro(ClipFunction, vtkImplicitFunction); ++ vtkImplicitFunction* GetClipFunction(); + + vtkMTimeType GetMTime() override; + +@@ -87,17 +80,13 @@ protected: + ~vtkmClip() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; +- + int FillInputPortInformation(int port, vtkInformation* info) override; + +- double ClipValue; +- bool ComputeScalars; +- +- vtkImplicitFunction* ClipFunction; +- std::unique_ptr ClipFunctionConverter; +- + vtkTypeBool ForceVTKm = false; + ++ struct internals; ++ std::unique_ptr Internals; ++ + private: + vtkmClip(const vtkmClip&) = delete; + void operator=(const vtkmClip&) = delete; +diff --git a/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithField.cxx b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithField.cxx +new file mode 100644 +index 0000000000000000000000000000000000000000..e81b5cdab62a436ef09afac33ffa0599cb9dd2a8 +--- /dev/null ++++ b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithField.cxx +@@ -0,0 +1,39 @@ ++/*========================================================================= ++ ++ Program: Visualization Toolkit ++ Module: vtkmClipInstantiationsWithField.cxx ++ ++ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen ++ All rights reserved. ++ See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ++ ++ This software is distributed WITHOUT ANY WARRANTY; without even ++ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++ PURPOSE. See the above copyright notice for more information. ++ ++=========================================================================*/ ++ ++#include "vtkmClipInternals.h" ++#include "vtkmlib/DataSetConverters.h" ++ ++#include ++ ++//------------------------------------------------------------------------------ ++vtkm::cont::DataSet vtkmClip::internals::ExecuteClipWithField( ++ vtkm::cont::DataSet& in, vtkDataArray* scalars, int assoc) ++{ ++ vtkm::filter::ClipWithField fieldFilter; ++ if (!this->ComputeScalars) ++ { ++ // explicitly convert just the field we need ++ auto inField = tovtkm::Convert(scalars, assoc); ++ in.AddField(inField); ++ // don't pass this field ++ fieldFilter.SetFieldsToPass( ++ vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE)); ++ } ++ ++ fieldFilter.SetActiveField(scalars->GetName(), vtkm::cont::Field::Association::POINTS); ++ fieldFilter.SetClipValue(this->ClipValue); ++ return fieldFilter.Execute(in); ++} +diff --git a/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx +new file mode 100644 +index 0000000000000000000000000000000000000000..04a637a92d487b019742bbf81884750c48ba105d +--- /dev/null ++++ b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx +@@ -0,0 +1,35 @@ ++/*========================================================================= ++ ++ Program: Visualization Toolkit ++ Module: vtkmClipInstantiationsWithImplicitFunction.cxx ++ ++ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen ++ All rights reserved. ++ See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ++ ++ This software is distributed WITHOUT ANY WARRANTY; without even ++ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++ PURPOSE. See the above copyright notice for more information. ++ ++=========================================================================*/ ++ ++#include "vtkmClipInternals.h" ++#include "vtkmlib/DataSetConverters.h" ++ ++#include ++ ++//------------------------------------------------------------------------------ ++vtkm::cont::DataSet vtkmClip::internals::ExecuteClipWithImplicitFunction(vtkm::cont::DataSet& in) ++{ ++ auto function = this->ClipFunctionConverter->Get(); ++ ++ vtkm::cont::DataSet result; ++ if (function.GetValid()) ++ { ++ vtkm::filter::ClipWithImplicitFunction functionFilter; ++ functionFilter.SetImplicitFunction(function); ++ result = functionFilter.Execute(in); ++ } ++ ++ return result; ++} +diff --git a/Accelerators/Vtkm/Filters/vtkmClipInternals.h b/Accelerators/Vtkm/Filters/vtkmClipInternals.h +new file mode 100644 +index 0000000000000000000000000000000000000000..5384347bf9d48f04f5d2847753c92b64fc82346e +--- /dev/null ++++ b/Accelerators/Vtkm/Filters/vtkmClipInternals.h +@@ -0,0 +1,37 @@ ++/*========================================================================= ++ ++ Program: Visualization Toolkit ++ Module: vtkmClipInternals.h ++ ++ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen ++ All rights reserved. ++ See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ++ ++ This software is distributed WITHOUT ANY WARRANTY; without even ++ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++ PURPOSE. See the above copyright notice for more information. ++ ++=========================================================================*/ ++ ++#ifndef vtkmClipInternals_h ++#define vtkmClipInternals_h ++ ++#include "vtkDataArray.h" ++#include "vtkmClip.h" ++#include "vtkmlib/ImplicitFunctionConverter.h" ++ ++#include ++ ++struct vtkmClip::internals ++{ ++ double ClipValue = .0; ++ bool ComputeScalars = true; ++ ++ vtkImplicitFunction* ClipFunction = nullptr; ++ std::unique_ptr ClipFunctionConverter; ++ ++ vtkm::cont::DataSet ExecuteClipWithImplicitFunction(vtkm::cont::DataSet&); ++ vtkm::cont::DataSet ExecuteClipWithField(vtkm::cont::DataSet&, vtkDataArray*, int); ++}; ++ ++#endif diff --git a/ports/vtk/1f00a0c9.patch b/ports/vtk/1f00a0c9.patch new file mode 100644 index 00000000000000..4cd8f196354c26 --- /dev/null +++ b/ports/vtk/1f00a0c9.patch @@ -0,0 +1,185 @@ +diff --git a/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx b/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx +index da8f2e6498c2a08165500fc458eb3c9c7dc0b7e6..147c3c6e175dbd342095805750bfc4fee81735dc 100644 +--- a/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx ++++ b/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx +@@ -265,7 +265,7 @@ vtkIdType vtkmDataSet::FindPoint(double x[3]) + std::lock_guard lock(locator.lock); + if (locator.buildTime < this->GetMTime()) + { +- locator.control.reset(new vtkm::cont::PointLocatorUniformGrid); ++ locator.control.reset(new vtkm::cont::PointLocatorSparseGrid); + locator.control->SetCoordinates(this->Internals->Coordinates); + locator.control->Update(); + locator.buildTime = this->GetMTime(); +diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.cxx +index f311f90e17814a05d082a0df67108f242018bb69..7ecfa50e4aa9922987fd33f7b29eb1bf4be3577a 100644 +--- a/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.cxx ++++ b/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.cxx +@@ -240,11 +240,11 @@ bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkRectilinearGrid* output, vtk + auto coordsArray = vtkm::cont::Cast(vtkmOut.GetCoordinateSystem().GetData()); + + vtkSmartPointer xArray = +- Convert(vtkm::cont::make_FieldPoint("xArray", coordsArray.GetStorage().GetFirstArray())); ++ Convert(vtkm::cont::make_FieldPoint("xArray", coordsArray.GetFirstArray())); + vtkSmartPointer yArray = +- Convert(vtkm::cont::make_FieldPoint("yArray", coordsArray.GetStorage().GetSecondArray())); ++ Convert(vtkm::cont::make_FieldPoint("yArray", coordsArray.GetSecondArray())); + vtkSmartPointer zArray = +- Convert(vtkm::cont::make_FieldPoint("zArray", coordsArray.GetStorage().GetThirdArray())); ++ Convert(vtkm::cont::make_FieldPoint("zArray", coordsArray.GetThirdArray())); + + if (!xArray || !yArray || !zArray) + { +diff --git a/Accelerators/Vtkm/Filters/vtkmAverageToCells.cxx b/Accelerators/Vtkm/Filters/vtkmAverageToCells.cxx +index 334ec1219dd269e323ae11e61a5a68e9e6e3d2e7..ed9d58fe91713a12e7b2588471275e694f71f618 100644 +--- a/Accelerators/Vtkm/Filters/vtkmAverageToCells.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmAverageToCells.cxx +@@ -27,7 +27,6 @@ + #include "vtkmFilterPolicy.h" + + #include +-#include + + vtkStandardNewMacro(vtkmAverageToCells); + +diff --git a/Accelerators/Vtkm/Filters/vtkmAverageToPoints.cxx b/Accelerators/Vtkm/Filters/vtkmAverageToPoints.cxx +index 1003f88c4d4e1dcf0be24b7f9f4e6d58e4e735f0..00c722f3162ebb042fb3973bb28a3c1c2fb48c45 100644 +--- a/Accelerators/Vtkm/Filters/vtkmAverageToPoints.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmAverageToPoints.cxx +@@ -28,7 +28,6 @@ + #include "vtkmFilterPolicy.h" + + #include +-#include + + vtkStandardNewMacro(vtkmAverageToPoints); + +diff --git a/Accelerators/Vtkm/Filters/vtkmCleanGrid.cxx b/Accelerators/Vtkm/Filters/vtkmCleanGrid.cxx +index 98f0fdb70a296a8dd97df56f706f11e0aca20f32..0cfde7e99f8f07289b08310675ee16f438bc61be 100644 +--- a/Accelerators/Vtkm/Filters/vtkmCleanGrid.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmCleanGrid.cxx +@@ -30,7 +30,6 @@ + #include "vtkmFilterPolicy.h" + + #include +-#include + + vtkStandardNewMacro(vtkmCleanGrid); + +diff --git a/Accelerators/Vtkm/Filters/vtkmClip.cxx b/Accelerators/Vtkm/Filters/vtkmClip.cxx +index 2649b2da024310f58159574758d278318e23f4b9..0b1dc86d3bedd425d4846f524818a68ada052ce9 100644 +--- a/Accelerators/Vtkm/Filters/vtkmClip.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmClip.cxx +@@ -39,9 +39,7 @@ + #include + + #include +-#include + #include +-#include + + #include + +diff --git a/Accelerators/Vtkm/Filters/vtkmContour.cxx b/Accelerators/Vtkm/Filters/vtkmContour.cxx +index c9d35a544641a629ee4fb4f54c4d8245be8e6fd5..eae3a03398ffeef8b0f8ec449f89163f8c275122 100644 +--- a/Accelerators/Vtkm/Filters/vtkmContour.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmContour.cxx +@@ -33,7 +33,6 @@ + + #include + #include +-#include + + vtkStandardNewMacro(vtkmContour); + +diff --git a/Accelerators/Vtkm/Filters/vtkmExternalFaces.cxx b/Accelerators/Vtkm/Filters/vtkmExternalFaces.cxx +index 58969b5707aab56e6fcd6300ca650c9b2d88e32f..3661060164d738eb9055316fd6c0b023b09ef72f 100644 +--- a/Accelerators/Vtkm/Filters/vtkmExternalFaces.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmExternalFaces.cxx +@@ -33,7 +33,6 @@ + #include "vtkmFilterPolicy.h" + + #include +-#include + + vtkStandardNewMacro(vtkmExternalFaces); + +diff --git a/Accelerators/Vtkm/Filters/vtkmExtractVOI.cxx b/Accelerators/Vtkm/Filters/vtkmExtractVOI.cxx +index 3606f28de2229436afbcb8b0cf3ed61430055b8e..32bf94f630931a0d052cf5880d950df4588046cb 100644 +--- a/Accelerators/Vtkm/Filters/vtkmExtractVOI.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmExtractVOI.cxx +@@ -27,7 +27,6 @@ + #include "vtkmFilterPolicy.h" + + #include "vtkm/filter/ExtractStructured.h" +-#include "vtkm/filter/ExtractStructured.hxx" + + vtkStandardNewMacro(vtkmExtractVOI); + +diff --git a/Accelerators/Vtkm/Filters/vtkmGradient.cxx b/Accelerators/Vtkm/Filters/vtkmGradient.cxx +index 9b79c9e5a5e434ae810df73b51bc6bf52cefa829..6aa284878c88e2fcaf243f6721477536891f002f 100644 +--- a/Accelerators/Vtkm/Filters/vtkmGradient.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmGradient.cxx +@@ -31,7 +31,6 @@ + + #include + #include +-#include + + vtkStandardNewMacro(vtkmGradient); + +diff --git a/Accelerators/Vtkm/Filters/vtkmHistogram.cxx b/Accelerators/Vtkm/Filters/vtkmHistogram.cxx +index ed09a73d938997fe0dab1ae7eb4338f4914bad15..c13fd742477686e2dd51e95c4757628630788a77 100644 +--- a/Accelerators/Vtkm/Filters/vtkmHistogram.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmHistogram.cxx +@@ -32,7 +32,6 @@ + #include "vtkSmartPointer.h" + + #include "vtkmFilterPolicy.h" +-#include + #include + + vtkStandardNewMacro(vtkmHistogram); +diff --git a/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.cxx b/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.cxx +index 04ccdce35f14b708c111302c759b5d328225cdef..db8d3f64b5e9b96f9b3e491f044056b14ae1bcdd 100644 +--- a/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.cxx +@@ -33,7 +33,6 @@ + #include + // To handle computing custom coordinate sets bounds we need to include + // the following +-#include + + vtkStandardNewMacro(vtkmLevelOfDetail); + +diff --git a/Accelerators/Vtkm/Filters/vtkmPointTransform.cxx b/Accelerators/Vtkm/Filters/vtkmPointTransform.cxx +index 9906573f18312cb803e5ab2bce30218e4f95772c..685fb618764fc62969b5373cd922aaea7d1311e3 100644 +--- a/Accelerators/Vtkm/Filters/vtkmPointTransform.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmPointTransform.cxx +@@ -33,7 +33,6 @@ + + #include "vtkm/cont/Error.h" + #include "vtkm/filter/PointTransform.h" +-#include "vtkm/filter/PointTransform.hxx" + + #include "vtkmFilterPolicy.h" + +diff --git a/Accelerators/Vtkm/Filters/vtkmThreshold.cxx b/Accelerators/Vtkm/Filters/vtkmThreshold.cxx +index 7604acd333978a72b1e34584d14640e097b34292..647514050c42771cda57b439280d238de72911e2 100644 +--- a/Accelerators/Vtkm/Filters/vtkmThreshold.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmThreshold.cxx +@@ -31,7 +31,6 @@ + #include "vtkmFilterPolicy.h" + + #include +-#include + + vtkStandardNewMacro(vtkmThreshold); + +diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m b/ThirdParty/vtkm/vtkvtkm/vtk-m +index 0457427ed7b4d21e1a8e33e96713414ca11a42fc..ff7de5a72e917eac39f9a3c3a0002da5fa26c3f7 160000 +--- a/ThirdParty/vtkm/vtkvtkm/vtk-m ++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m +@@ -1 +1 @@ +-Subproject commit 0457427ed7b4d21e1a8e33e96713414ca11a42fc ++Subproject commit ff7de5a72e917eac39f9a3c3a0002da5fa26c3f7 diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL deleted file mode 100644 index c44c77880644df..00000000000000 --- a/ports/vtk/CONTROL +++ /dev/null @@ -1,21 +0,0 @@ -Source: vtk -Version: 8.2.0-5 -Description: Software system for 3D computer graphics, image processing, and visualization -Homepage: https://github.com/Kitware/VTK -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, atlmfc (windows), eigen3, double-conversion, pugixml, libharu, sqlite3, netcdf-c - -Feature: openvr -Description: OpenVR functionality for VTK -Build-Depends: sdl2, openvr - -Feature: qt -Description: Qt functionality for VTK -Build-Depends: qt5 - -Feature: mpi -Description: MPI functionality for VTK -Build-Depends: mpi, hdf5[parallel] - -Feature: python -Description: Python functionality for VTK -Build-Depends: python3 diff --git a/ports/vtk/FindExpat.patch b/ports/vtk/FindExpat.patch new file mode 100644 index 00000000000000..a9fdc46bd54386 --- /dev/null +++ b/ports/vtk/FindExpat.patch @@ -0,0 +1,48 @@ +diff --git a/CMake/FindEXPAT.cmake b/CMake/FindEXPAT.cmake +index 45d923764..0ebcd3c83 100644 +--- a/CMake/FindEXPAT.cmake ++++ b/CMake/FindEXPAT.cmake +@@ -73,15 +73,37 @@ if(EXPAT_FOUND) + + if(NOT TARGET EXPAT::EXPAT) + include(vtkDetectLibraryType) +- vtk_detect_library_type(expat_library_type +- PATH "${EXPAT_LIBRARY}") ++ if(EXPAT_LIBRARY_RELEASE) ++ vtk_detect_library_type(expat_library_type ++ PATH "${EXPAT_LIBRARY_RELEASE}") ++ elseif(EXPAT_LIBRARY_DEBUG) ++ vtk_detect_library_type(expat_library_type ++ PATH "${EXPAT_LIBRARY_RELEASE}") ++ else() ++ vtk_detect_library_type(expat_library_type ++ PATH "${EXPAT_LIBRARY}") ++ endif() ++ + add_library(EXPAT::EXPAT "${expat_library_type}" IMPORTED) + unset(expat_library_type) + set_target_properties(EXPAT::EXPAT PROPERTIES +- IMPORTED_LINK_INTERFACE_LANGUAGES "C" +- IMPORTED_LOCATION "${EXPAT_LIBRARY}" +- IMPORTED_IMPLIB "${EXPAT_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${EXPAT_INCLUDE_DIRS}") ++ IMPORTED_LINK_INTERFACE_LANGUAGES "C" ++ INTERFACE_INCLUDE_DIRECTORIES "${EXPAT_INCLUDE_DIRS}") ++ if(EXPAT_LIBRARY_RELEASE) ++ set_target_properties(EXPAT::EXPAT PROPERTIES ++ IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}" ++ IMPORTED_IMPLIB_RELEASE "${EXPAT_LIBRARY_RELEASE}") ++ endif() ++ if(EXPAT_LIBRARY_DEBUG) ++ set_target_properties(EXPAT::EXPAT PROPERTIES ++ IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}" ++ IMPORTED_IMPLIB_DEBUG "${EXPAT_LIBRARY_DEBUG}") ++ endif() ++ if(EXPAT_LIBRARY_RELEASE OR EXPAT_LIBRARY_DEBUG AND NOT (EXPAT_LIBRARY_RELEASE AND EXPAT_LIBRARY_DEBUG)) ++ set_target_properties(EXPAT::EXPAT PROPERTIES ++ IMPORTED_LOCATION "${EXPAT_LIBRARY}" ++ IMPORTED_IMPLIB "${EXPAT_LIBRARY}") ++ endif() + endif() + endif() + diff --git a/ports/vtk/FindGDAL.cmake b/ports/vtk/FindGDAL.cmake deleted file mode 100644 index e4f2f303be3bca..00000000000000 --- a/ports/vtk/FindGDAL.cmake +++ /dev/null @@ -1,127 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#.rst: -# FindGDAL -# -------- -# -# -# -# Locate gdal -# -# This module accepts the following environment variables: -# -# :: -# -# GDAL_DIR or GDAL_ROOT - Specify the location of GDAL -# -# -# -# This module defines the following CMake variables: -# -# :: -# -# GDAL_FOUND - True if libgdal is found -# GDAL_LIBRARY - A variable pointing to the GDAL library -# GDAL_INCLUDE_DIR - Where to find the headers - -# -# $GDALDIR is an environment variable that would -# correspond to the ./configure --prefix=$GDAL_DIR -# used in building gdal. -# -# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it -# for osgTerrain so I whipped this module together for completeness. -# I actually don't know the conventions or where files are typically -# placed in distros. -# Any real gdal users are encouraged to correct this (but please don't -# break the OS X framework stuff when doing so which is what usually seems -# to happen). - -# This makes the presumption that you are include gdal.h like -# -#include "gdal.h" - -find_path(GDAL_INCLUDE_DIR gdal.h - HINTS - ENV GDAL_DIR - ENV GDAL_ROOT - PATH_SUFFIXES - include/gdal - include/GDAL - include - PATHS - ~/Library/Frameworks/gdal.framework/Headers - /Library/Frameworks/gdal.framework/Headers - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt -) - -if(UNIX) - # Use gdal-config to obtain the library version (this should hopefully - # allow us to -lgdal1.x.y where x.y are correct version) - # For some reason, libgdal development packages do not contain - # libgdal.so... - find_program(GDAL_CONFIG gdal-config - HINTS - ENV GDAL_DIR - ENV GDAL_ROOT - PATH_SUFFIXES bin - PATHS - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - ) - - if(GDAL_CONFIG) - exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS) - if(GDAL_CONFIG_LIBS) - string(REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS}) - string(REPLACE "-l" "" _gdal_lib "${_gdal_dashl}") - string(REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS}) - string(REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}") - endif() - endif() -endif() - -find_library(GDAL_LIBRARY_RELEASE - NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL - HINTS - ENV GDAL_DIR - ENV GDAL_ROOT - ${_gdal_libpath} - PATH_SUFFIXES lib - PATHS - /sw - /opt/local - /opt/csw - /opt - /usr/freeware -) - -find_library(GDAL_LIBRARY_DEBUG - NAMES ${_gdal_lib} gdald gdald_i gdald1.5.0 gdald1.4.0 gdald1.3.2 GDALD - HINTS - ENV GDAL_DIR - ENV GDAL_ROOT - ${_gdal_libpath} - PATH_SUFFIXES lib - PATHS - /sw - /opt/local - /opt/csw - /opt - /usr/freeware -) - -include(SelectLibraryConfigurations) -select_library_configurations(GDAL) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY GDAL_INCLUDE_DIR) - -set(GDAL_LIBRARIES ${GDAL_LIBRARY}) -set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR}) diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake new file mode 100644 index 00000000000000..27d8a8c74c8247 --- /dev/null +++ b/ports/vtk/FindHDF5.cmake @@ -0,0 +1,30 @@ +find_package(hdf5 QUIET NO_MODULE) +if(TARGET hdf5::hdf5-shared) + set_target_properties(hdf5::hdf5-shared PROPERTIES IMPORTED_GLOBAL TRUE) + if(NOT TARGET hdf5::hdf5) + add_library(hdf5::hdf5 ALIAS hdf5::hdf5-shared) + endif() +elseif(TARGET hdf5::hdf5-static) + set_target_properties(hdf5::hdf5-static PROPERTIES IMPORTED_GLOBAL TRUE) + if(NOT TARGET hdf5::hdf5) + add_library(hdf5::hdf5 ALIAS hdf5::hdf5-static) + endif() +else() + message(FATAL_ERROR "HDF5 target not found") +endif() +if(TARGET hdf5::hdf5_hl-shared) + set_target_properties(hdf5::hdf5_hl-shared PROPERTIES IMPORTED_GLOBAL TRUE) + if(NOT TARGET hdf5::hdf5_hl) + add_library(hdf5::hdf5_hl ALIAS hdf5::hdf5_hl-shared) + endif() +elseif(TARGET hdf5::hdf5_hl-static) + set_target_properties(hdf5::hdf5_hl-static PROPERTIES IMPORTED_GLOBAL TRUE) + if(NOT TARGET hdf5::hdf5_hl) + add_library(hdf5::hdf5_hl ALIAS hdf5::hdf5_hl-static) + endif() +else() + message(FATAL_ERROR "HDF5 HL target not found") +endif() +set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL} CACHE BOOL "" FORCE) +set(HDF5_FOUND ON CACHE BOOL "" FORCE) +set(hdf5_FOUND ON CACHE BOOL "" FORCE) diff --git a/ports/vtk/FindLZ4.patch b/ports/vtk/FindLZ4.patch new file mode 100644 index 00000000000000..7f65de529cd788 --- /dev/null +++ b/ports/vtk/FindLZ4.patch @@ -0,0 +1,49 @@ +diff --git a/CMake/FindLZ4.cmake b/CMake/FindLZ4.cmake +index 8c94e3bcd..ade3f9451 100644 +--- a/CMake/FindLZ4.cmake ++++ b/CMake/FindLZ4.cmake +@@ -1,38 +1,5 @@ +-find_path(LZ4_INCLUDE_DIR +- NAMES lz4.h +- DOC "lz4 include directory") +-mark_as_advanced(LZ4_INCLUDE_DIR) +-find_library(LZ4_LIBRARY +- NAMES lz4 liblz4 +- DOC "lz4 library") +-mark_as_advanced(LZ4_LIBRARY) +- +-if (LZ4_INCLUDE_DIR) +- file(STRINGS "${LZ4_INCLUDE_DIR}/lz4.h" _lz4_version_lines +- REGEX "#define[ \t]+LZ4_VERSION_(MAJOR|MINOR|RELEASE)") +- string(REGEX REPLACE ".*LZ4_VERSION_MAJOR *\([0-9]*\).*" "\\1" _lz4_version_major "${_lz4_version_lines}") +- string(REGEX REPLACE ".*LZ4_VERSION_MINOR *\([0-9]*\).*" "\\1" _lz4_version_minor "${_lz4_version_lines}") +- string(REGEX REPLACE ".*LZ4_VERSION_RELEASE *\([0-9]*\).*" "\\1" _lz4_version_release "${_lz4_version_lines}") +- set(LZ4_VERSION "${_lz4_version_major}.${_lz4_version_minor}.${_lz4_version_release}") +- unset(_lz4_version_major) +- unset(_lz4_version_minor) +- unset(_lz4_version_release) +- unset(_lz4_version_lines) +-endif () +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(LZ4 +- REQUIRED_VARS LZ4_LIBRARY LZ4_INCLUDE_DIR +- VERSION_VAR LZ4_VERSION) +- +-if (LZ4_FOUND) +- set(LZ4_INCLUDE_DIRS "${LZ4_INCLUDE_DIR}") +- set(LZ4_LIBRARIES "${LZ4_LIBRARY}") +- +- if (NOT TARGET LZ4::LZ4) +- add_library(LZ4::LZ4 UNKNOWN IMPORTED) +- set_target_properties(LZ4::LZ4 PROPERTIES +- IMPORTED_LOCATION "${LZ4_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${LZ4_INCLUDE_DIR}") +- endif () +-endif () ++find_package(LZ4 CONFIG REQUIRED) ++set_target_properties(lz4::lz4 PROPERTIES IMPORTED_GLOBAL TRUE) ++if(NOT TARGET LZ4::LZ4) ++add_library(LZ4::LZ4 ALIAS lz4::lz4) ++endif() +\ No newline at end of file diff --git a/ports/vtk/FindLZMA.patch b/ports/vtk/FindLZMA.patch new file mode 100644 index 00000000000000..cb7f80963a2916 --- /dev/null +++ b/ports/vtk/FindLZMA.patch @@ -0,0 +1,86 @@ +diff --git a/CMake/FindLZMA.cmake b/CMake/FindLZMA.cmake +index 0c8c7943c..d60669484 100644 +--- a/CMake/FindLZMA.cmake ++++ b/CMake/FindLZMA.cmake +@@ -1,9 +1,17 @@ + find_path(LZMA_INCLUDE_DIR + NAMES lzma.h + DOC "lzma include directory") +-find_library(LZMA_LIBRARY ++# Note LZMA_LIBRARY is set somewhere else. Maybe one of the configs/wrappers installed by VCPKG defines it. ++# The original FindLZMA chokes on it since it contains optimized/debug keywords ++# VTK should probably switch to FindLibLZMA from CMake ++find_library(LZMA_LIBRARY_RELEASE + NAMES lzma + DOC "lzma library") ++find_library(LZMA_LIBRARY_DEBUG ++ NAMES lzmad lzma NAMES_PER_DIR ++ DOC "lzma library") ++ include(SelectLibraryConfigurations) ++ select_library_configurations( LZMA ) + + if (LZMA_INCLUDE_DIR) + file(STRINGS "${LZMA_INCLUDE_DIR}/lzma/version.h" _lzma_version_lines +@@ -20,22 +26,50 @@ endif () + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(LZMA +- REQUIRED_VARS LZMA_LIBRARY LZMA_INCLUDE_DIR ++ REQUIRED_VARS LZMA_LIBRARY LZMA_LIBRARY_RELEASE LZMA_LIBRARY_DEBUG LZMA_INCLUDE_DIR + VERSION_VAR LZMA_VERSION) + + if (LZMA_FOUND) + set(LZMA_LIBRARIES "${LZMA_LIBRARY}") + set(LZMA_INCLUDE_DIRS "${LZMA_INCLUDE_DIR}") +- ++ + if (NOT TARGET LZMA::LZMA) + include(vtkDetectLibraryType) +- vtk_detect_library_type(lzma_library_type +- PATH "${LZMA_LIBRARY}") +- add_library(LZMA::LZMA "${lzma_library_type}" IMPORTED) +- unset(lzma_library_type) +- set_target_properties(LZMA::LZMA PROPERTIES +- IMPORTED_LOCATION "${LZMA_LIBRARY}" +- IMPORTED_IMPLIB "${LZMA_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${LZMA_INCLUDE_DIR}") +- endif () ++ if(LZMA_LIBRARY_RELEASE) ++ vtk_detect_library_type(lzma_library_type ++ PATH "${LZMA_LIBRARY_RELEASE}") ++ elseif(LZMA_LIBRARY_DEBUG) ++ vtk_detect_library_type(lzma_library_type ++ PATH "${LZMA_LIBRARY_DEBUG}") ++ else() ++ vtk_detect_library_type(lzma_library_type ++ PATH "${LZMA_LIBRARY}") ++ endif() ++ ++ add_library(LZMA::LZMA "${lzma_library_type}" IMPORTED) ++ set_target_properties(LZMA::LZMA PROPERTIES ++ INTERFACE_INCLUDE_DIRECTORIES "${LZMA_INCLUDE_DIR}") ++ if(LZMA_LIBRARY_RELEASE) ++ set_target_properties(LZMA::LZMA PROPERTIES ++ IMPORTED_LOCATION_RELEASE "${LZMA_LIBRARY_RELEASE}" ++ IMPORTED_IMPLIB_RELEASE "${LZMA_LIBRARY_RELEASE}") ++ endif() ++ if(LZMA_LIBRARY_DEBUG) ++ set_target_properties(LZMA::LZMA PROPERTIES ++ IMPORTED_LOCATION_DEBUG "${LZMA_LIBRARY_DEBUG}" ++ IMPORTED_IMPLIB_DEBUG "${LZMA_LIBRARY_DEBUG}") ++ endif() ++ ++ # Guard against possible stupidity of depending projects reading only LOCATION without configuration ++ if(CMAKE_BUILD_TYPE MATCHES "Debug") ++ set_target_properties(LZMA::LZMA PROPERTIES ++ IMPORTED_LOCATION "${LZMA_LIBRARY_DEBUG}" ++ IMPORTED_IMPLIB "${LZMA_LIBRARY_DEBUG}") ++ else() ++ set_target_properties(LZMA::LZMA PROPERTIES ++ IMPORTED_LOCATION "${LZMA_LIBRARY_RELEASE}" ++ IMPORTED_IMPLIB "${LZMA_LIBRARY_RELEASE}") ++ endif() ++ endif() ++ #set_target_properties(LZMA::LZMA PROPERTIES IMPORTED_GLOBAL TRUE) + endif () + \ No newline at end of file diff --git a/ports/vtk/Findproj.patch b/ports/vtk/Findproj.patch new file mode 100644 index 00000000000000..d83b0f4510d8ea --- /dev/null +++ b/ports/vtk/Findproj.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/FindLibPROJ.cmake b/CMake/FindLibPROJ.cmake +index e2344bb17..bac4c747e 100644 +--- a/CMake/FindLibPROJ.cmake ++++ b/CMake/FindLibPROJ.cmake +@@ -9,7 +9,7 @@ find_library(LibPROJ_LIBRARY_RELEASE + mark_as_advanced(LibPROJ_LIBRARY_RELEASE) + + find_library(LibPROJ_LIBRARY_DEBUG +- NAMES projd ++ NAMES projd proj_d proj NAMES_PER_DIR + DOC "libproj debug library") + mark_as_advanced(LibPROJ_LIBRARY_DEBUG) + diff --git a/ports/vtk/NoUndefDebug.patch b/ports/vtk/NoUndefDebug.patch new file mode 100644 index 00000000000000..a7bb750e7c5957 --- /dev/null +++ b/ports/vtk/NoUndefDebug.patch @@ -0,0 +1,13 @@ +diff --git a/Utilities/Python/vtkPython.h b/Utilities/Python/vtkPython.h +index 166f24104..79ae1d371 100644 +--- a/Utilities/Python/vtkPython.h ++++ b/Utilities/Python/vtkPython.h +@@ -53,7 +53,7 @@ + #include + #include + #include +-#undef _DEBUG ++ + #if defined(_MSC_VER) + #define _CRT_NOFORCE_MANIFEST 1 + #endif diff --git a/ports/vtk/SplitLibraryConfigurations.cmake b/ports/vtk/SplitLibraryConfigurations.cmake deleted file mode 100644 index fc4d87ec8b55d7..00000000000000 --- a/ports/vtk/SplitLibraryConfigurations.cmake +++ /dev/null @@ -1,28 +0,0 @@ - -cmake_minimum_required(VERSION 3.2.0) - -function(split_library_configurations LIBRARIES OPTIMIZED_OUT_VAR DEBUG_OUT_VAR GENERAL_OUT_VAR) - set(OPTIMIZED_LIBRARIES) - set(DEBUG_LIBRARIES) - set(GENERAL_LIBRARIES) - - set(CURRENT_TYPE) - foreach(LIBRARY ${LIBRARIES}) - if("${LIBRARY}" STREQUAL "optimized" OR "${LIBRARY}" STREQUAL "debug" OR "${LIBRARY}" STREQUAL "general") - set(CURRENT_TYPE "${LIBRARY}") - else() - if("${CURRENT_TYPE}" STREQUAL "optimized") - list(APPEND OPTIMIZED_LIBRARIES "${LIBRARY}") - elseif("${CURRENT_TYPE}" STREQUAL "debug") - list(APPEND DEBUG_LIBRARIES "${LIBRARY}") - else() - list(APPEND GENERAL_LIBRARIES "${LIBRARY}") - endif() - set(CURRENT_TYPE) - endif() - endforeach() - - set(${OPTIMIZED_OUT_VAR} "${OPTIMIZED_LIBRARIES}" PARENT_SCOPE) - set(${DEBUG_OUT_VAR} "${DEBUG_LIBRARIES}" PARENT_SCOPE) - set(${GENERAL_OUT_VAR} "${GENERAL_LIBRARIES}" PARENT_SCOPE) -endfunction() \ No newline at end of file diff --git a/ports/vtk/d107698a.patch b/ports/vtk/d107698a.patch new file mode 100644 index 00000000000000..1a7ac087789cd3 --- /dev/null +++ b/ports/vtk/d107698a.patch @@ -0,0 +1,291 @@ +diff --git a/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.h b/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.h +index 0b3f1a963063cdf5f1685dbde55deaaea7a77d2f..24198dada846d6d81fb9f1c155e5a6612e1e7055 100644 +--- a/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.h ++++ b/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.h +@@ -25,6 +25,7 @@ + + #include + #include ++#include + + #include // for std::underlying_type + +diff --git a/Accelerators/Vtkm/DataModel/Testing/Cxx/TestVTKMDataSet.cxx b/Accelerators/Vtkm/DataModel/Testing/Cxx/TestVTKMDataSet.cxx +index ec41b18b60db354a8c4a1532eb5cedfd70ce7534..2493ae5b03cf29c5dfc90614489a8049fc623715 100644 +--- a/Accelerators/Vtkm/DataModel/Testing/Cxx/TestVTKMDataSet.cxx ++++ b/Accelerators/Vtkm/DataModel/Testing/Cxx/TestVTKMDataSet.cxx +@@ -274,18 +274,19 @@ vtkm::cont::testing::MakeTestDataSet Maker; + void TestUniformDataSet() + { + auto dataset = Maker.Make3DUniformDataSet0(); +- auto coords = +- dataset.GetCoordinateSystem().GetData().Cast(); ++ auto coords = dataset.GetCoordinateSystem() ++ .GetData() ++ .AsArrayHandle(); + auto portal = coords.ReadPortal(); + auto dims = portal.GetDimensions(); + auto origin = portal.GetOrigin(); + auto spacing = portal.GetSpacing(); + + vtkNew pointField, cellField; +- FieldCopy(dataset.GetField("pointvar").GetData().Cast>(), ++ FieldCopy(dataset.GetField("pointvar").GetData().AsArrayHandle>(), + "pointvar", pointField); +- FieldCopy(dataset.GetField("cellvar").GetData().Cast>(), "cellvar", +- cellField); ++ FieldCopy(dataset.GetField("cellvar").GetData().AsArrayHandle>(), ++ "cellvar", cellField); + + vtkNew imageData; + imageData->SetDimensions(dims[0], dims[1], dims[2]); +@@ -315,10 +316,10 @@ void TestCurvilinearDataSet() + CoordsCopy(dataset.GetCoordinateSystem(), points); + + vtkNew pointField, cellField; +- FieldCopy(dataset.GetField("pointvar").GetData().Cast>(), ++ FieldCopy(dataset.GetField("pointvar").GetData().AsArrayHandle>(), + "pointvar", pointField); +- FieldCopy(dataset.GetField("cellvar").GetData().Cast>(), "cellvar", +- cellField); ++ FieldCopy(dataset.GetField("cellvar").GetData().AsArrayHandle>(), ++ "cellvar", cellField); + + vtkNew dsVtk; + dsVtk->SetDimensions(dims[0], dims[1], dims[2]); +@@ -357,10 +358,10 @@ void TestExplicitDataSet() + } + + vtkNew pointField, cellField; +- FieldCopy(dataset.GetField("pointvar").GetData().Cast>(), ++ FieldCopy(dataset.GetField("pointvar").GetData().AsArrayHandle>(), + "pointvar", pointField); +- FieldCopy(dataset.GetField("cellvar").GetData().Cast>(), "cellvar", +- cellField); ++ FieldCopy(dataset.GetField("cellvar").GetData().AsArrayHandle>(), ++ "cellvar", cellField); + + vtkNew dsVtk; + dsVtk->SetPoints(points); +diff --git a/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx b/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx +index 147c3c6e175dbd342095805750bfc4fee81735dc..f1ef72ffae91ca843ca56bdc305ab68bbc955157 100644 +--- a/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx ++++ b/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx +@@ -35,8 +35,7 @@ + #include + #include + #include +-#include +-#include ++#include + #include + + #include +@@ -62,8 +61,8 @@ struct vtkmDataSet::DataMembers + vtkm::cont::CoordinateSystem Coordinates; + vtkNew Cell; + +- VtkmLocator PointLocator; +- VtkmLocator CellLocator; ++ VtkmLocator PointLocator; ++ VtkmLocator CellLocator; + }; + + //------------------------------------------------------------------------------ +@@ -172,7 +171,7 @@ void vtkmDataSet::GetCellBounds(vtkIdType cellId, double bounds[6]) + this->Internals->CellSet.IsType>()) + { + auto portal = this->Internals->Coordinates.GetData() +- .Cast() ++ .AsArrayHandle() + .ReadPortal(); + + vtkm::internal::ConnectivityStructuredInternals<3> helper; +@@ -279,7 +278,7 @@ vtkIdType vtkmDataSet::FindPoint(double x[3]) + vtkm::Id pointId = -1; + vtkm::FloatDefault d2 = 0; + // exec object created for the Serial device can be called directly +- execLocator->FindNearestNeighbor(point, pointId, d2); ++ execLocator.FindNearestNeighbor(point, pointId, d2); + return pointId; + } + +@@ -316,7 +315,7 @@ vtkIdType vtkmDataSet::FindCell(double x[3], vtkCell*, vtkGenericCell*, vtkIdTyp + vtkm::Vec pc; + vtkm::Id cellId = -1; + // exec object created for the Serial device can be called directly +- execLocator->FindCell(point, cellId, pc); ++ execLocator.FindCell(point, cellId, pc); + + if (cellId >= 0) + { +diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.cxx +index 351c0d5ce169cf455d2d3c0a1307ba8e60510371..c7ecff3c9fc5eafecb9dd11d9dbea15cbd44bd3d 100644 +--- a/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.cxx ++++ b/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.cxx +@@ -121,7 +121,7 @@ bool Convert( + return false; + } + +- auto points = cs.GetData().Cast(); ++ auto points = cs.GetData().AsArrayHandle(); + auto portal = points.ReadPortal(); + + auto origin = portal.GetOrigin(); +@@ -156,7 +156,7 @@ bool Convert(const vtkm::cont::DataSet& voutput, vtkImageData* output, vtkDataSe + return false; + } + +- auto points = cs.GetData().Cast(); ++ auto points = cs.GetData().AsArrayHandle(); + auto portal = points.ReadPortal(); + + auto dim = portal.GetDimensions(); +diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.cxx +index f2411d0e70505435cd312ee23b3cb2e653eb28d8..814af43cc168b4c3b44107b0c19e68cc1b42538d 100644 +--- a/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.cxx ++++ b/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.cxx +@@ -52,8 +52,7 @@ void ImplicitFunctionConverter::Set(vtkImplicitFunction* function) + box->GetXMin(xmin); + box->GetXMax(xmax); + +- auto b = new vtkm::Box(MakeFVec3(xmin), MakeFVec3(xmax)); +- this->OutFunction.Reset(b, true); ++ this->OutFunction = vtkm::Box(MakeFVec3(xmin), MakeFVec3(xmax)); + } + else if ((cylinder = vtkCylinder::SafeDownCast(function))) + { +@@ -62,9 +61,8 @@ void ImplicitFunctionConverter::Set(vtkImplicitFunction* function) + cylinder->GetAxis(axis); + radius = cylinder->GetRadius(); + +- auto c = new vtkm::Cylinder( +- MakeFVec3(center), MakeFVec3(axis), static_cast(radius)); +- this->OutFunction.Reset(c, true); ++ this->OutFunction = ++ vtkm::Cylinder(MakeFVec3(center), MakeFVec3(axis), static_cast(radius)); + } + else if ((plane = vtkPlane::SafeDownCast(function))) + { +@@ -72,8 +70,7 @@ void ImplicitFunctionConverter::Set(vtkImplicitFunction* function) + plane->GetOrigin(origin); + plane->GetNormal(normal); + +- auto p = new vtkm::Plane(MakeFVec3(origin), MakeFVec3(normal)); +- this->OutFunction.Reset(p, true); ++ this->OutFunction = vtkm::Plane(MakeFVec3(origin), MakeFVec3(normal)); + } + else if ((sphere = vtkSphere::SafeDownCast(function))) + { +@@ -81,8 +78,7 @@ void ImplicitFunctionConverter::Set(vtkImplicitFunction* function) + sphere->GetCenter(center); + radius = sphere->GetRadius(); + +- auto s = new vtkm::Sphere(MakeFVec3(center), static_cast(radius)); +- this->OutFunction.Reset(s, true); ++ this->OutFunction = vtkm::Sphere(MakeFVec3(center), static_cast(radius)); + } + else + { +@@ -95,7 +91,7 @@ void ImplicitFunctionConverter::Set(vtkImplicitFunction* function) + this->InFunction = function; + } + +-const vtkm::cont::ImplicitFunctionHandle& ImplicitFunctionConverter::Get() const ++const vtkm::ImplicitFunctionGeneral& ImplicitFunctionConverter::Get() + { + if (this->InFunction && (this->MTime < this->InFunction->GetMTime())) + { +@@ -110,9 +106,7 @@ const vtkm::cont::ImplicitFunctionHandle& ImplicitFunctionConverter::Get() const + box->GetXMin(xmin); + box->GetXMax(xmax); + +- auto b = static_cast(this->OutFunction.Get()); +- b->SetMinPoint(MakeFVec3(xmin)); +- b->SetMaxPoint(MakeFVec3(xmax)); ++ this->OutFunction = vtkm::Box(MakeFVec3(xmin), MakeFVec3(xmax)); + } + else if ((cylinder = vtkCylinder::SafeDownCast(this->InFunction))) + { +@@ -121,10 +115,8 @@ const vtkm::cont::ImplicitFunctionHandle& ImplicitFunctionConverter::Get() const + cylinder->GetAxis(axis); + radius = cylinder->GetRadius(); + +- auto c = static_cast(this->OutFunction.Get()); +- c->SetCenter(MakeFVec3(center)); +- c->SetAxis(MakeFVec3(axis)); +- c->SetRadius(static_cast(radius)); ++ this->OutFunction = ++ vtkm::Cylinder(MakeFVec3(center), MakeFVec3(axis), static_cast(radius)); + } + else if ((plane = vtkPlane::SafeDownCast(this->InFunction))) + { +@@ -132,9 +124,7 @@ const vtkm::cont::ImplicitFunctionHandle& ImplicitFunctionConverter::Get() const + plane->GetOrigin(origin); + plane->GetNormal(normal); + +- auto p = static_cast(this->OutFunction.Get()); +- p->SetOrigin(MakeFVec3(origin)); +- p->SetNormal(MakeFVec3(normal)); ++ this->OutFunction = vtkm::Plane(MakeFVec3(origin), MakeFVec3(normal)); + } + else if ((sphere = vtkSphere::SafeDownCast(this->InFunction))) + { +@@ -142,9 +132,7 @@ const vtkm::cont::ImplicitFunctionHandle& ImplicitFunctionConverter::Get() const + sphere->GetCenter(center); + radius = sphere->GetRadius(); + +- auto s = static_cast(this->OutFunction.Get()); +- s->SetCenter(MakeFVec3(center)); +- s->SetRadius(static_cast(radius)); ++ this->OutFunction = vtkm::Sphere(MakeFVec3(center), static_cast(radius)); + } + + this->MTime = this->InFunction->GetMTime(); +diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.h b/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.h +index 10e2ae99ae819ca86516bf7ab5a0988c75b6323e..a1a571c93d44a7d62f79afc86aab05d1f359af82 100644 +--- a/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.h ++++ b/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.h +@@ -20,7 +20,7 @@ + #include "vtkType.h" // For vtkMTimeType + #include "vtkmConfigDataModel.h" //required for general vtkm setup + +-#include "vtkm/cont/ImplicitFunctionHandle.h" ++#include "vtkm/ImplicitFunction.h" + + class vtkImplicitFunction; + +@@ -33,11 +33,11 @@ public: + ImplicitFunctionConverter(); + + void Set(vtkImplicitFunction*); +- const vtkm::cont::ImplicitFunctionHandle& Get() const; ++ const vtkm::ImplicitFunctionGeneral& Get(); + + private: + vtkImplicitFunction* InFunction; +- vtkm::cont::ImplicitFunctionHandle OutFunction; ++ vtkm::ImplicitFunctionGeneral OutFunction; + mutable vtkMTimeType MTime; + }; + +diff --git a/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx +index 04a637a92d487b019742bbf81884750c48ba105d..674d9b6e0dfe36edd787e519e70ec0bf46602c81 100644 +--- a/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx ++++ b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx +@@ -24,12 +24,9 @@ vtkm::cont::DataSet vtkmClip::internals::ExecuteClipWithImplicitFunction(vtkm::c + auto function = this->ClipFunctionConverter->Get(); + + vtkm::cont::DataSet result; +- if (function.GetValid()) +- { +- vtkm::filter::ClipWithImplicitFunction functionFilter; +- functionFilter.SetImplicitFunction(function); +- result = functionFilter.Execute(in); +- } ++ vtkm::filter::ClipWithImplicitFunction functionFilter; ++ functionFilter.SetImplicitFunction(function); ++ result = functionFilter.Execute(in); + + return result; + } diff --git a/ports/vtk/fix-find-lz4.patch b/ports/vtk/fix-find-lz4.patch deleted file mode 100644 index 7389a24f438d78..00000000000000 --- a/ports/vtk/fix-find-lz4.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMake/FindLZ4.cmake b/CMake/FindLZ4.cmake -index 07343e1f79..b43a9af2c7 100644 ---- a/CMake/FindLZ4.cmake -+++ b/CMake/FindLZ4.cmake -@@ -1,7 +1,13 @@ -- --find_library(LZ4_LIBRARIES NAMES lz4) -+find_library(LZ4_LIBRARY NAMES lz4 PATH_SUFFIXES lib) -+find_library(LZ4_LIBRARY_DEBUG NAME lz4d PATH_SUFFIXES debug/lib) - find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) - -+if(NOT LZ4_LIBRARY_DEBUG) -+ set(LZ4_LIBRARY_DEBUG ${LZ4_LIBRARY}) -+endif(NOT LZ4_LIBRARY_DEBUG) -+ -+set(LZ4_LIBRARIES optimized ${LZ4_LIBRARY} debug ${LZ4_LIBRARY_DEBUG}) -+ - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LZ4 - DEFAULT_MSG diff --git a/ports/vtk/fix-pugixml-link.patch b/ports/vtk/fix-pugixml-link.patch deleted file mode 100644 index 8708506b6e8ac4..00000000000000 --- a/ports/vtk/fix-pugixml-link.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/IO/CityGML/CMakeLists.txt b/IO/CityGML/CMakeLists.txt -index ce979ba..322e2de 100644 ---- a/IO/CityGML/CMakeLists.txt -+++ b/IO/CityGML/CMakeLists.txt -@@ -4,8 +4,5 @@ vtk_module_library(vtkIOCityGML ${Module_SRCS}) - # pugixml does not set _INCLUDE_DIRS or _LIBRARIES - if(VTK_USE_SYSTEM_PUGIXML AND NOT pugixml_INCLUDE_DIRS) - find_package(pugixml REQUIRED) -- get_target_property(pugixml_INCLUDE_DIRS pugixml INTERFACE_INCLUDE_DIRECTORIES) -- get_target_property(pugixml_LIBRARIES pugixml LOCATION) -- include_directories(${pugixml_INCLUDE_DIRS}) -- vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE ${pugixml_LIBRARIES}) -+ vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE pugixml) - endif() diff --git a/ports/vtk/fix-using-hdf5.patch b/ports/vtk/fix-using-hdf5.patch new file mode 100644 index 00000000000000..834ab15e942f6e --- /dev/null +++ b/ports/vtk/fix-using-hdf5.patch @@ -0,0 +1,22 @@ +diff --git a/ThirdParty/h5part/vtkh5part/src/H5Part.c b/ThirdParty/h5part/vtkh5part/src/H5Part.c +index 228d246..41af04d 100644 +--- a/ThirdParty/h5part/vtkh5part/src/H5Part.c ++++ b/ThirdParty/h5part/vtkh5part/src/H5Part.c +@@ -2092,7 +2092,7 @@ _H5Part_iteration_operator2 ( + case H5L_TYPE_HARD: { + + H5O_info_t objinfo; +- if( H5Oget_info_by_name( group_id, member_name, &objinfo, H5P_DEFAULT ) < 0 ) { ++ if( H5Oget_info_by_name1( group_id, member_name, &objinfo, H5P_DEFAULT ) < 0 ) { + return (herr_t)HANDLE_H5G_GET_OBJINFO_ERR ( member_name ); + } + +@@ -2142,7 +2142,7 @@ _H5Part_iteration_operator2 ( + if ( obj_id < 0 ) { + return (herr_t)HANDLE_H5G_OPEN_ERR ( member_name ); + } +- else if ( H5Oget_info ( obj_id, &objinfo ) < 0 ) { ++ else if ( H5Oget_info1 ( obj_id, &objinfo ) < 0 ) { + return (herr_t)HANDLE_H5G_GET_OBJINFO_ERR ( member_name ); + } + else { diff --git a/ports/vtk/fix_ogg_linkage.patch b/ports/vtk/fix_ogg_linkage.patch deleted file mode 100644 index c7f22f4c8f0369..00000000000000 --- a/ports/vtk/fix_ogg_linkage.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/IO/Movie/module.cmake b/IO/Movie/module.cmake -index 4275171..88204ad 100644 ---- a/IO/Movie/module.cmake -+++ b/IO/Movie/module.cmake -@@ -14,6 +14,7 @@ vtk_module(vtkIOMovie - vtkIO - DEPENDS - ${vtkIOMovie_vtkoggtheora} -+ vtkogg - vtkCommonExecutionModel - PRIVATE_DEPENDS - vtkCommonCore diff --git a/ports/vtk/hdf5_static.patch b/ports/vtk/hdf5_static.patch deleted file mode 100644 index 52ade3f082f9c2..00000000000000 --- a/ports/vtk/hdf5_static.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake -index 6d558e39..c301e165 100644 ---- a/CMake/FindHDF5.cmake -+++ b/CMake/FindHDF5.cmake -@@ -8,7 +8,16 @@ if(CMAKE_VERSION VERSION_LESS 3.6.1) - else() - include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) - endif() -- -+#It would be better if VTK would actually use HDF5 & SZIP targets. -+#But current module load order is wrong which will lead to the target being used before it is defined! -+if("${HDF5_LIBRARIES}" MATCHES "libhdf5") -+ find_library(SZIP_LIBRARY_RELEASE NAMES sz libsz szip libszip NAMES_PER_DIR) -+ find_library(SZIP_LIBRARY_DEBUG NAMES sz_d libsz_d szip_d libszip_d NAMES_PER_DIR) -+ select_library_configurations(SZIP) -+ list(APPEND HDF5_LIBRARIES "${SZIP_LIBRARIES}") -+ find_package(ZLIB) -+ list(APPEND HDF5_LIBRARIES "${ZLIB_LIBRARIES}") -+endif() - if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)) - include(vtkMPI) - if(MPI_C_INCLUDE_PATH) diff --git a/ports/vtk/pegtl.patch b/ports/vtk/pegtl.patch new file mode 100644 index 00000000000000..cbd1d86930c86f --- /dev/null +++ b/ports/vtk/pegtl.patch @@ -0,0 +1,73 @@ +diff --git a/CMake/FindPEGTL.cmake b/CMake/FindPEGTL.cmake +index 73eee02f7..22d8bc159 100644 +--- a/CMake/FindPEGTL.cmake ++++ b/CMake/FindPEGTL.cmake +@@ -19,31 +19,42 @@ + # Copyright (c) 2009 Benoit Jacob + # Redistribution and use is allowed according to the terms of the 2-clause BSD license. + +-find_path(PEGTL_INCLUDE_DIR +- NAMES pegtl/version.hpp +- PATH_SUFFIXES tao +- DOC "Path to PEGTL headers") +-mark_as_advanced(PEGTL_INCLUDE_DIR) ++message(STATUS "Searching for PEGTL") ++find_package(PEGTL CONFIG NAMES PEGTL-2) ++if(TARGET taocpp::pegtl) ++ message(STATUS "Searching for PEGTL - found target taocpp::pegtl") ++ set_target_properties(taocpp::pegtl PROPERTIES IMPORTED_GLOBAL TRUE) ++ if(NOT TARGET PEGTL::PEGTL) ++ add_library(PEGTL::PEGTL ALIAS taocpp::pegtl) ++ endif() ++else() ++ find_path(PEGTL_INCLUDE_DIR ++ NAMES pegtl/version.hpp ++ PATH_SUFFIXES tao ++ DOC "Path to PEGTL headers") ++ mark_as_advanced(PEGTL_INCLUDE_DIR) + +-if (PEGTL_INCLUDE_DIR) +- file(STRINGS "${PEGTL_INCLUDE_DIR}/pegtl/version.hpp" _pegtl_version_header +- REGEX "TAO_PEGTL_VERSION") +- string(REGEX MATCH "define[ \t]+TAO_PEGTL_VERSION[ \t]+\"([0-9.]+)\"" _pegtl_version_match "${_pegtl_version_header}") +- set(PEGTL_VERSION "${CMAKE_MATCH_1}") +- unset(_pegtl_version_header) +- unset(_pegtl_version_match) +-endif () ++ if (PEGTL_INCLUDE_DIR) ++ file(STRINGS "${PEGTL_INCLUDE_DIR}/pegtl/version.hpp" _pegtl_version_header ++ REGEX "TAO_PEGTL_VERSION") ++ string(REGEX MATCH "define[ \t]+TAO_PEGTL_VERSION[ \t]+\"([0-9.]+)\"" _pegtl_version_match "${_pegtl_version_header}") ++ set(PEGTL_VERSION "${CMAKE_MATCH_1}") ++ unset(_pegtl_version_header) ++ unset(_pegtl_version_match) ++ endif () + +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(PEGTL +- REQUIRED_VARS PEGTL_INCLUDE_DIR +- VERSION_VAR PEGTL_VERSION) ++ include(FindPackageHandleStandardArgs) ++ find_package_handle_standard_args(PEGTL ++ REQUIRED_VARS PEGTL_INCLUDE_DIR ++ VERSION_VAR PEGTL_VERSION) + +-if (PEGTL_FOUND) +- set(PEGTL_INCLUDE_DIRS "${PEGTL_INCLUDE_DIR}") +- if (NOT TARGET PEGTL::PEGTL) +- add_library(PEGTL::PEGTL INTERFACE IMPORTED) +- set_target_properties(PEGTL::PEGTL PROPERTIES +- INTERFACE_INCLUDE_DIRECTORIES "${PEGTL_INCLUDE_DIR}") +- endif () +-endif () ++ if (PEGTL_FOUND) ++ set(PEGTL_INCLUDE_DIRS "${PEGTL_INCLUDE_DIR}") ++ if (NOT TARGET PEGTL::PEGTL) ++ add_library(PEGTL::PEGTL INTERFACE IMPORTED) ++ set_target_properties(PEGTL::PEGTL PROPERTIES ++ INTERFACE_INCLUDE_DIRECTORIES "${PEGTL_INCLUDE_DIR}") ++ endif () ++ message(STATUS "Searching for PEGTL - found") ++ endif () ++endif () +\ No newline at end of file diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 69d2ddd2a660fc..b9af50ad87860d 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -1,133 +1,187 @@ -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_TARGET_IS_WINDOWS) message(WARNING "You will need to install Xorg dependencies to build vtk:\napt-get install libxt-dev\n") endif() -include(vcpkg_common_functions) +# TODO: +# - add loguru as a dependency requires #8682 -set(VTK_SHORT_VERSION "8.2") -set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0") # ============================================================================= # Options: +# Collect CMake options for optional components +if("qt" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_GROUP_ENABLE_Qt=YES + -DVTK_MODULE_ENABLE_VTK_GUISupportQt=YES + -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL=YES + -DVTK_MODULE_ENABLE_VTK_RenderingQt=YES + -DVTK_MODULE_ENABLE_VTK_ViewsQt=YES + ) -if ("qt" IN_LIST FEATURES) - set(VTK_WITH_QT ON ) -else() - set(VTK_WITH_QT OFF ) endif() - -if ("mpi" IN_LIST FEATURES) - set(VTK_Group_MPI ON) -else() - set(VTK_Group_MPI OFF) +if("atlmfc" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_GUISupportMFC=YES + ) endif() - -if ("python" IN_LIST FEATURES) - set(VTK_WITH_PYTHON ON) -else() - set(VTK_WITH_PYTHON OFF) +if("vtkm" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmCore=YES + -DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmDataModel=YES + -DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters=YES + -DVTK_MODULE_ENABLE_VTK_vtkm=YES + ) endif() -if("openvr" IN_LIST FEATURES) - set(Module_vtkRenderingOpenVR ON) -else() - set(Module_vtkRenderingOpenVR OFF) +if("python" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_WRAP_PYTHON=ON + -DVTK_PYTHON_VERSION=3 + -DPython3_FIND_REGISTRY=NEVER + "-DPython3_EXECUTABLE:PATH=${PYTHON3}" + -DVTK_MODULE_ENABLE_VTK_Python=YES + -DVTK_MODULE_ENABLE_VTK_PythonContext2D=YES + -DVTK_MODULE_ENABLE_VTK_PythonInterpreter=YES + ) + #VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages endif() -set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`, - # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file - -# ============================================================================= -# Clone & patch -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Kitware/VTK - REF "v${VTK_LONG_VERSION}" - SHA512 fd1d9c2872baa6eca7f8105b0057b56ec554e9d5eaf25985302e7fc032bdce72255d79e3f5f16ca50504151bda49cb3a148272ba32e0f410b4bdb70959b8f3f4 - HEAD_REF master - PATCHES - fix-find-lz4.patch - fix_ogg_linkage.patch - fix-pugixml-link.patch - hdf5_static.patch -) +if("paraview" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_FiltersParallelStatistics=YES + -DVTK_MODULE_ENABLE_VTK_IOParallelExodus=YES + -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingParallel=YES + -DVTK_MODULE_ENABLE_VTK_RenderingVolumeAMR=YES + -DVTK_MODULE_ENABLE_VTK_IOXdmf2=YES + -DVTK_MODULE_ENABLE_VTK_IOH5part=YES + -DVTK_MODULE_ENABLE_VTK_IOParallelLSDyna=YES + -DVTK_MODULE_ENABLE_VTK_IOTRUCHAS=YES + -DVTK_MODULE_ENABLE_VTK_IOVPIC=YES + -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingAnnotation=YES + -DVTK_MODULE_ENABLE_VTK_DomainsChemistry=YES + -DVTK_MODULE_ENABLE_VTK_DomainsChemistryOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_FiltersParallelDIY2=YES + ) + if("python" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_RenderingMatplotlib=YES + ) + endif() +endif() -# Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK, -# since they do not detect the debug libraries correctly. -# The default files distributed with CMake (>= 3.9) should be superior by all means. -# For GDAL, the one distributed with CMake does not detect the debug libraries correctly, -# so we provide an own one. -file(REMOVE ${SOURCE_PATH}/CMake/FindGLEW.cmake) -file(REMOVE ${SOURCE_PATH}/CMake/FindPythonLibs.cmake) +if("mpi" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_GROUP_ENABLE_MPI=YES + -DVTK_USE_MPI=YES + ) +endif() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGDAL.cmake DESTINATION ${SOURCE_PATH}/CMake) +if("mpi" IN_LIST FEATURES AND "python" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_USE_EXTERNAL_VTK_mpi4py=OFF + ) +endif() -# ============================================================================= -# Collect CMake options for optional components -if(VTK_WITH_QT) +if("opengl" IN_LIST FEATURES) list(APPEND ADDITIONAL_OPTIONS - -DVTK_Group_Qt=ON - -DVTK_QT_VERSION=5 - -DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF + -DVTK_MODULE_ENABLE_VTK_DomainsChemistryOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingGL2PSOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingVolumeOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_opengl=YES + ) +endif() + +if ("openvr" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_RenderingOpenVR=YES ) endif() -if(VTK_WITH_PYTHON) +if("cuda" IN_LIST FEATURES AND CMAKE_HOST_WIN32) + vcpkg_add_to_path("$ENV{CUDA_PATH}/bin") +endif() + +if("utf8" IN_LIST FEATURES) list(APPEND ADDITIONAL_OPTIONS - -DVTK_WRAP_PYTHON=ON - -DVTK_PYTHON_VERSION=3 + -DKWSYS_ENCODING_DEFAULT_CODEPAGE=CP_UTF8 ) endif() -if(VTK_WITH_ALL_MODULES) +if("all" IN_LIST FEATURES) list(APPEND ADDITIONAL_OPTIONS - -DVTK_BUILD_ALL_MODULES=ON -DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg - # -DVTK_USE_SYSTEM_AUTOBAHN=ON - # -DVTK_USE_SYSTEM_SIX=ON - # -DVTK_USE_SYSTEM_MPI4PY=ON - # -DVTK_USE_SYSTEM_CONSTANTLY=ON - # -DVTK_USE_SYSTEM_INCREMENTAL=ON - # -DVTK_USE_SYSTEM_TWISTED=ON - # -DVTK_USE_SYSTEM_XDMF2=ON - # -DVTK_USE_SYSTEM_XDMF3=ON - # -DVTK_USE_SYSTEM_ZFP=ON - # -DVTK_USE_SYSTEM_ZOPE=ON ) endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME) - set(Module_vtkGUISupportMFC ON) -else() - set(Module_vtkGUISupportMFC OFF) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "cuda" VTK_USE_CUDA + "all" VTK_BUILD_ALL_MODULES +) + + +# ============================================================================= +# Clone & patch + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Kitware/VTK + REF 2959413ff190bc6e3ff40f5b6c1342edd2e5233f # v9.0.x used by ParaView 5.9.1 + SHA512 16229c107ed904e8fa6850c3814b8bdcdf9700ef44f6ff5b3a77e7d793ce19954fc2c7b1219a0162cf588def6e990883cd3f808c316a4db6e65bd6cd1769dd3f + HEAD_REF master + PATCHES + FindLZMA.patch + FindLZ4.patch + Findproj.patch + pegtl.patch + pythonwrapper.patch # Required by ParaView to Wrap required classes + NoUndefDebug.patch # Required to link against correct Python library depending on build type. + python_debug.patch + fix-using-hdf5.patch + # CHECK: module-name-mangling.patch + # Last patch TODO: Patch out internal loguru + FindExpat.patch # The find_library calls are taken care of by vcpkg-cmake-wrapper.cmake of expat + # upstream vtkm patches to make it work with vtkm 1.6 + vtkm.patch # To include an external VTKm build + 1f00a0c9.patch + 156fb524.patch + d107698a.patch +) + +# ============================================================================= +#Overwrite outdated modules if they have not been patched: +file(COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake/patches/99") # due to usage of targets in netcdf-c +# ============================================================================= # ============================================================================= # Configure & Install +# We set all libraries to "system" and explicitly list the ones that should use embedded copies vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} -DBUILD_TESTING=OFF - -DBUILD_EXAMPLES=OFF - -DVTK_INSTALL_INCLUDE_DIR=include - -DVTK_INSTALL_DATA_DIR=share/vtk/data - -DVTK_INSTALL_DOC_DIR=share/vtk/doc - -DVTK_INSTALL_PACKAGE_DIR=share/vtk - -DVTK_INSTALL_RUNTIME_DIR=bin + -DVTK_BUILD_TESTING=OFF + -DVTK_BUILD_EXAMPLES=OFF -DVTK_FORBID_DOWNLOADS=ON - - # We set all libraries to "system" and explicitly list the ones that should use embedded copies - -DVTK_USE_SYSTEM_LIBRARIES=ON - -DVTK_USE_SYSTEM_GL2PS=OFF - + -DVTK_ENABLE_REMOTE_MODULES=OFF + # VTK groups to enable + -DVTK_GROUP_ENABLE_StandAlone=YES + -DVTK_GROUP_ENABLE_Rendering=YES + -DVTK_GROUP_ENABLE_Views=YES + # Disable deps not in VCPKG + -DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg # Select modules / groups to install - -DVTK_Group_Imaging=ON - -DVTK_Group_Views=ON - -DModule_vtkGUISupportMFC=${Module_vtkGUISupportMFC} - -DModule_vtkRenderingOpenVR=${Module_vtkRenderingOpenVR} - -DVTK_Group_MPI=${VTK_Group_MPI} - + -DVTK_USE_EXTERNAL:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF # Not yet in VCPKG ${ADDITIONAL_OPTIONS} ) @@ -136,91 +190,49 @@ vcpkg_copy_pdbs() # ============================================================================= # Fixup target files -vcpkg_fixup_cmake_targets() - -# For some reason the references to the XDMF libraries in the target files do not end up -# correctly, so we fix them here. -if(VTK_WITH_ALL_MODULES) - file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_CONTENT) - string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") - string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") - string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") - string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake "${VTK_TARGETS_RELEASE_CONTENT}") - - file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake VTK_TARGETS_DEBUG_CONTENT) - string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") - string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") - string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") - string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_CONTENT}") -endif() - -#file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT) -# Remove unset of _IMPORT_PREFIX in VTKTargets.cmake -#_IMPORT_PREFIX is required by vtkModules due to vcpkg_fixup_cmake_targets changing all cmake files (to use _IMPORT_PREFIX). -#STRING(REPLACE [[set(_IMPORT_PREFIX)]] -#[[ -# VCPKG: The value of _IMPORT_PREFIX should not be unset. -#set(_IMPORT_PREFIX) -#]] -#VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}") -#file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}") - -#file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT) - -# Fix _IMPORT_PREFIX. It is not set within the Modules cmake (only set in VTKTargets.cmake). -# Since for VCPKG _IMPORT_PREFIX == VTK_INSTALL_PREFIX we just replace it with that. -file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/Modules/*.cmake) -foreach(FILE IN LISTS CMAKE_FILES) - file(READ "${FILE}" _contents) - string(REPLACE "\${_IMPORT_PREFIX}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}") - file(WRITE "${FILE}" "${_contents}") -endforeach() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/vtk-9.0) # ============================================================================= # Clean-up other directories # Delete the debug binary TOOL_NAME that is not required function(_vtk_remove_debug_tool TOOL_NAME) - # on windows, the tools end with .exe - set(filename_win ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe) - if(EXISTS ${filename_win}) - file(REMOVE ${filename_win}) + set(filename "${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + if(EXISTS "${filename}") + file(REMOVE "${filename}") + endif() + set(filename "${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}d${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + if(EXISTS "${filename}") + file(REMOVE "${filename}") endif() - # on other OS, it doesn't - set(filename_unix ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}) - if(EXISTS ${filename_unix}) - file(REMOVE ${filename_unix}) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + # we also have to bend the lines referencing the tools in VTKTargets-debug.cmake + # to make them point to the release version of the tools + file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-debug.cmake" VTK_TARGETS_CONTENT_DEBUG) + string(REPLACE "debug/bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_DEBUG "${VTK_TARGETS_CONTENT_DEBUG}") + string(REPLACE "tools/vtk/${TOOL_NAME}d" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_DEBUG "${VTK_TARGETS_CONTENT_DEBUG}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-debug.cmake" "${VTK_TARGETS_CONTENT_DEBUG}") endif() - # we also have to bend the lines referencing the tools in VTKTargets-debug.cmake - # to make them point to the release version of the tools - file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake" VTK_TARGETS_CONTENT_DEBUG) - string(REPLACE "debug/bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_DEBUG "${VTK_TARGETS_CONTENT_DEBUG}") - file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake" "${VTK_TARGETS_CONTENT_DEBUG}") endfunction() # Move the release binary TOOL_NAME from bin to tools function(_vtk_move_release_tool TOOL_NAME) - # on windows, the tools end with .exe - set(old_filename_win "${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe") - if(EXISTS ${old_filename_win}) - file(INSTALL ${old_filename_win} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/vtk") - file(REMOVE ${old_filename_win}) + set(old_filename "${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + if(EXISTS "${old_filename}") + file(INSTALL "${old_filename}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/vtk" USE_SOURCE_PERMISSIONS) + file(REMOVE "${old_filename}") endif() - # on other OS, it doesn't - set(old_filename_unix "${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}") - if(EXISTS ${old_filename_unix}) - file(INSTALL ${old_filename_unix} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/vtk") - file(REMOVE ${old_filename_unix}) + + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + # we also have to bend the lines referencing the tools in VTKTargets-release.cmake + # to make them point to the tool folder + file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-release.cmake" VTK_TARGETS_CONTENT_RELEASE) + string(REPLACE "bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_RELEASE "${VTK_TARGETS_CONTENT_RELEASE}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-release.cmake" "${VTK_TARGETS_CONTENT_RELEASE}") endif() - # we also have to bend the lines referencing the tools in VTKTargets-release.cmake - # to make them point to the tool folder - file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake" VTK_TARGETS_CONTENT_RELEASE) - string(REPLACE "bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_RELEASE "${VTK_TARGETS_CONTENT_RELEASE}") - file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake" "${VTK_TARGETS_CONTENT_RELEASE}") endfunction() +set(VTK_SHORT_VERSION 9.0) set(VTK_TOOLS vtkEncodeString-${VTK_SHORT_VERSION} vtkHashSource-${VTK_SHORT_VERSION} @@ -232,38 +244,68 @@ set(VTK_TOOLS vtkWrapHierarchy-${VTK_SHORT_VERSION} vtkParseJava-${VTK_SHORT_VERSION} vtkParseOGLExt-${VTK_SHORT_VERSION} + vtkProbeOpenGLVersion-${VTK_SHORT_VERSION} + vtkTestOpenGLVersion-${VTK_SHORT_VERSION} vtkpython pvtkpython ) - +# TODO: Replace with vcpkg_copy_tools if known which tools are built with which feature +# or add and option to vcpkg_copy_tools which does not require the tool to be present foreach(TOOL_NAME IN LISTS VTK_TOOLS) _vtk_remove_debug_tool("${TOOL_NAME}") _vtk_move_release_tool("${TOOL_NAME}") endforeach() -file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkhdf5.cmake" _contents) -string(REPLACE "vtk::hdf5::hdf5_hl" "" _contents "${_contents}") -string(REPLACE "vtk::hdf5::hdf5" "" _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkhdf5.cmake" "${_contents}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/vtk") + +## Files Modules needed by ParaView +if("paraview" IN_LIST FEATURES) + set(VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType + vtkSupportMacros vtkVersion FindPythonModules vtkModuleDebugging vtkExternalData) + foreach(module ${VTK_CMAKE_NEEDED}) + file(INSTALL "${SOURCE_PATH}/CMake/${module}.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") + endforeach() + + ## Check List on UPDATE !! + file(INSTALL "${SOURCE_PATH}/CMake/vtkRequireLargeFilesSupport.cxx" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") + file(INSTALL "${SOURCE_PATH}/Rendering/Volume/vtkBlockSortHelper.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK + file(INSTALL "${SOURCE_PATH}/Filters/ParallelDIY2/vtkDIYKdTreeUtilities.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") + file(INSTALL "${SOURCE_PATH}/Parallel/DIY/vtkDIYUtilities.txx" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") + + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Rendering/OpenGL2/vtkTextureObjectVS.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") -# ============================================================================= -# Remove other files and directories that are not valid for vcpkg -if(VTK_WITH_ALL_MODULES) - file(REMOVE ${CURRENT_PACKAGES_DIR}/XdmfConfig.cmake) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/XdmfConfig.cmake) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/vtkpythonmodules/static_python) #python headers + file(GLOB_RECURSE STATIC_PYTHON_FILES "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/*/static_python/*.h") + file(INSTALL ${STATIC_PYTHON_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) + endif() endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +#remove one get_filename_component(_vtk_module_import_prefix "${_vtk_module_import_prefix}" DIRECTORY) from vtk-prefix.cmake and VTK-vtk-module-properties and vtk-python.cmake +set(filenames_fix_prefix vtk-prefix VTK-vtk-module-properties vtk-python) +foreach(name IN LISTS filenames_fix_prefix) +if(EXISTS "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake") + file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake" _contents) + string(REPLACE +[[set(_vtk_module_import_prefix "${CMAKE_CURRENT_LIST_DIR}") +get_filename_component(_vtk_module_import_prefix "${_vtk_module_import_prefix}" DIRECTORY)]] +[[set(_vtk_module_import_prefix "${CMAKE_CURRENT_LIST_DIR}")]] _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake" "${_contents}") +else() + debug_message("FILE:${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake does not exist! No prefix correction!") +endif() +endforeach() # ============================================================================= # Handle copyright -file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk/copyright) - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/vtk) +file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") diff --git a/ports/vtk/python_debug.patch b/ports/vtk/python_debug.patch new file mode 100644 index 00000000000000..6b69d8094dd597 --- /dev/null +++ b/ports/vtk/python_debug.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/patches/3.18/FindPython/Support.cmake b/CMake/patches/3.18/FindPython/Support.cmake +index 0879537ed..122e7228d 100644 +--- a/CMake/patches/3.18/FindPython/Support.cmake ++++ b/CMake/patches/3.18/FindPython/Support.cmake +@@ -2253,7 +2257,7 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS + NAMES ${_${_PYTHON_PREFIX}_LIB_NAMES_DEBUG} + NAMES_PER_DIR + HINTS "${_${_PYTHON_PREFIX}_PATH}" ${_${_PYTHON_PREFIX}_HINTS} +- NO_DEFAULT_PATH) ++ ) + endif() + + # retrieve runtime libraries diff --git a/ports/vtk/pythonwrapper.patch b/ports/vtk/pythonwrapper.patch new file mode 100644 index 00000000000000..6cdd4162aa099c --- /dev/null +++ b/ports/vtk/pythonwrapper.patch @@ -0,0 +1,19 @@ +diff --git a/CMake/vtkModuleWrapPython.cmake b/CMake/vtkModuleWrapPython.cmake +index 5d2c2e1bf..e33a16d68 100644 +--- a/CMake/vtkModuleWrapPython.cmake ++++ b/CMake/vtkModuleWrapPython.cmake +@@ -152,11 +152,14 @@ function (_vtk_module_wrap_python_sources module sources classes) + set(_vtk_python_genex_compile_definitions + "$") + set(_vtk_python_genex_include_directories + "$") ++ set(_vtk_python_genex_interface_include_directories ++ "$") + file(GENERATE + OUTPUT "${_vtk_python_args_file}" + CONTENT "$<$:\n-D\'$\'>\n + $<$:\n-I\'$\'>\n ++$<$:\n-I\'$\'>\n + $<$:\n--types \'$\'>\n") + + set(_vtk_python_sources) diff --git a/ports/vtk/vcpkg.json b/ports/vtk/vcpkg.json new file mode 100644 index 00000000000000..a22785db36c0dd --- /dev/null +++ b/ports/vtk/vcpkg.json @@ -0,0 +1,175 @@ +{ + "name": "vtk", + "version-semver": "9.0.3-pv5.9.1", + "port-version": 1, + "description": "Software system for 3D computer graphics, image processing, and visualization", + "homepage": "https://github.com/Kitware/VTK", + "dependencies": [ + "double-conversion", + "eigen3", + "expat", + "freetype", + "glew", + { + "name": "hdf5", + "default-features": false + }, + "jsoncpp", + { + "name": "libharu", + "features": [ + "notiffsymbols" + ] + }, + "libjpeg-turbo", + "liblzma", + "libogg", + "libpng", + "libtheora", + "libxml2", + "lz4", + "netcdf-c", + "pegtl-2", + "proj4", + "pugixml", + "sqlite3", + "tiff", + "utfcpp", + "zlib" + ], + "features": { + "all": { + "description": "Build all vtk modules", + "dependencies": [ + "ffmpeg", + "gdal", + "libmysql", + { + "name": "vtk", + "default-features": false, + "features": [ + "mpi", + "python", + "qt" + ] + }, + { + "name": "vtk", + "default-features": false, + "features": [ + "atlmfc", + "utf8" + ], + "platform": "windows" + } + ] + }, + "atlmfc": { + "description": "Mfc functionality for vtk on Windows", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + } + ] + }, + "cuda": { + "description": "Support CUDA compilation", + "dependencies": [ + "cuda" + ] + }, + "mpi": { + "description": "MPI functionality for VTK", + "dependencies": [ + { + "name": "hdf5", + "default-features": false, + "features": [ + "parallel" + ] + }, + "mpi", + { + "name": "vtk-m", + "default-features": false, + "features": [ + "mpi" + ] + } + ] + }, + "opengl": { + "description": "All opengl related modules", + "dependencies": [ + { + "name": "vtk", + "default-features": false + } + ] + }, + "openvr": { + "description": "OpenVR functionality for VTK", + "dependencies": [ + "openvr", + "sdl2" + ] + }, + "paraview": { + "description": "Build vtk modules required by paraview", + "dependencies": [ + { + "name": "vtk", + "default-features": false, + "features": [ + "qt" + ] + }, + { + "name": "vtk", + "default-features": false, + "features": [ + "atlmfc" + ], + "platform": "windows" + } + ] + }, + "python": { + "description": "Python functionality for VTK", + "dependencies": [ + "python3" + ] + }, + "qt": { + "description": "Qt functionality for VTK", + "dependencies": [ + "qt5-imageformats", + "qt5-tools", + { + "name": "qt5-x11extras", + "platform": "linux" + }, + "qt5-xmlpatterns" + ] + }, + "utf8": { + "description": "Enables vtk reader/writer with utf-8 path support", + "dependencies": [ + { + "name": "vtk", + "default-features": false + } + ] + }, + "vtkm": { + "description": "Build with vtk-m accelerator and module.", + "dependencies": [ + { + "name": "vtk-m", + "default-features": false + } + ] + } + } +} diff --git a/ports/vtk/vtkm.patch b/ports/vtk/vtkm.patch new file mode 100644 index 00000000000000..72c8ce2bd3495d --- /dev/null +++ b/ports/vtk/vtkm.patch @@ -0,0 +1,168 @@ +diff --git a/Accelerators/Vtkm/Core/CMakeLists.txt b/Accelerators/Vtkm/Core/CMakeLists.txt +index b889a771f..317d83f75 100644 +--- a/Accelerators/Vtkm/Core/CMakeLists.txt ++++ b/Accelerators/Vtkm/Core/CMakeLists.txt +@@ -14,8 +14,9 @@ + ## + ##============================================================================= + +-list(INSERT 0 CMAKE_MODULE_PATH +- "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") ++find_package(VTKm CONFIG REQUIRED) ++#list(INSERT 0 CMAKE_MODULE_PATH ++# "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") + + set(private_headers + vtkmlib/DataArrayConverters.hxx +@@ -77,9 +78,9 @@ vtkm_add_target_information(${vtkm_accel_target} + MODIFY_CUDA_FLAGS + DEVICE_SOURCES ${sources}) + +-vtk_module_set_property(VTK::AcceleratorsVTKmCore +- PROPERTY JOB_POOL_COMPILE +- VALUE vtkm_pool) ++#vtk_module_set_property(VTK::AcceleratorsVTKmCore ++# PROPERTY JOB_POOL_COMPILE ++# VALUE vtkm_pool) + + if (TARGET vtkm::cuda) + vtk_module_set_property(VTK::AcceleratorsVTKmCore +diff --git a/Accelerators/Vtkm/DataModel/CMakeLists.txt b/Accelerators/Vtkm/DataModel/CMakeLists.txt +index 56307be8d..30fff98e8 100644 +--- a/Accelerators/Vtkm/DataModel/CMakeLists.txt ++++ b/Accelerators/Vtkm/DataModel/CMakeLists.txt +@@ -14,8 +14,9 @@ + ## + ##============================================================================= + +-list(INSERT 0 CMAKE_MODULE_PATH +- "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") ++find_package(VTKm CONFIG REQUIRED) ++#list(INSERT 0 CMAKE_MODULE_PATH ++# "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") + + set(sources + vtkmlib/ArrayConvertersReal.cxx +@@ -85,9 +86,9 @@ vtkm_add_target_information(${vtkm_accel_target} + MODIFY_CUDA_FLAGS + DEVICE_SOURCES ${sources}) + +-vtk_module_set_property(VTK::AcceleratorsVTKmDataModel +- PROPERTY JOB_POOL_COMPILE +- VALUE vtkm_pool) ++#vtk_module_set_property(VTK::AcceleratorsVTKmDataModel ++# PROPERTY JOB_POOL_COMPILE ++# VALUE vtkm_pool) + + if (TARGET vtkm::cuda) + vtk_module_set_property(VTK::AcceleratorsVTKmDataModel +diff --git a/Accelerators/Vtkm/Filters/CMakeLists.txt b/Accelerators/Vtkm/Filters/CMakeLists.txt +index 14e84f1dd..0a931285d 100644 +--- a/Accelerators/Vtkm/Filters/CMakeLists.txt ++++ b/Accelerators/Vtkm/Filters/CMakeLists.txt +@@ -14,8 +14,9 @@ + ## + ##============================================================================= + +-list(INSERT 0 CMAKE_MODULE_PATH +- "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") ++find_package(VTKm CONFIG REQUIRED) ++#list(INSERT 0 CMAKE_MODULE_PATH ++# "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") + + set(impl_classes + vtkmAverageToCells +@@ -80,9 +81,9 @@ vtkm_add_target_information(${vtkm_accel_target} + MODIFY_CUDA_FLAGS + DEVICE_SOURCES ${sources}) + +-vtk_module_set_property(VTK::AcceleratorsVTKmFilters +- PROPERTY JOB_POOL_COMPILE +- VALUE vtkm_pool) ++#vtk_module_set_property(VTK::AcceleratorsVTKmFilters ++# PROPERTY JOB_POOL_COMPILE ++# VALUE vtkm_pool) + vtk_module_link(VTK::AcceleratorsVTKmFilters + PRIVATE + vtkm_worklet +diff --git a/CMake/vtk-config.cmake.in b/CMake/vtk-config.cmake.in +index 5a5e8b8df..96413875f 100644 +--- a/CMake/vtk-config.cmake.in ++++ b/CMake/vtk-config.cmake.in +@@ -121,9 +121,7 @@ set("${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS" "@vtk_all_components@") + unset("${CMAKE_FIND_PACKAGE_NAME}_FOUND") + set("${CMAKE_FIND_PACKAGE_NAME}_HAS_VTKm" "@vtk_has_vtkm@") + if (${CMAKE_FIND_PACKAGE_NAME}_HAS_VTKm) +- find_package(VTKm +- PATHS "${CMAKE_CURRENT_LIST_DIR}/vtkm" +- NO_DEFAULT_PATH) ++ find_package(VTKm CONFIG REQUIRED) + if (NOT VTKm_FOUND) + set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0) + endif () +diff --git a/ThirdParty/vtkm/CMakeLists.txt b/ThirdParty/vtkm/CMakeLists.txt +index 5817d42f8..f21d17da8 100644 +--- a/ThirdParty/vtkm/CMakeLists.txt ++++ b/ThirdParty/vtkm/CMakeLists.txt +@@ -1,6 +1,41 @@ +-vtk_module_third_party_internal( +- LICENSE_FILES "vtkvtkm/vtk-m/LICENSE.txt" +- VERSION "master" +- SUBDIRECTORY vtkvtkm +- STANDARD_INCLUDE_DIRS +- INTERFACE) ++#vtk_module_third_party_internal( ++# LICENSE_FILES "vtkvtkm/vtk-m/LICENSE.txt" ++# VERSION "master" ++# SUBDIRECTORY vtkvtkm ++# STANDARD_INCLUDE_DIRS ++# INTERFACE) ++ ++message(STATUS "VTK_MODULE_USE_EXTERNAL_VTK_vtkm: ${VTK_MODULE_USE_EXTERNAL_VTK_vtkm}") ++if(TRUE) ++ message(STATUS "Searching for external VTKm") ++ find_package(VTKm CONFIG REQUIRED) ++ if(TARGET vtkm_compiler_flags) ++ get_target_property(VTKm_INCLUDE_DIRS vtkm_compiler_flags INTERFACE_INCLUDE_DIRECTORIES) ++ message(STATUS "INCLUDE: ${VTKm_INCLUDE_DIRS}") ++ get_target_property(VTKm_DIY_INCLUDE_DIRS vtkm_diy INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(VTKm_OPTION_INCLUDE_DIRS vtkm_optionparser INTERFACE_INCLUDE_DIRECTORIES) ++ if(MSVC) ++ set(VTKm_DEFINITIONS /bigobj) ++ endif() ++ else() ++ message(FATAL_ERROR "VTKM target missing") ++ endif() ++ if(VTKM_FOUND) ++ message(STATUS "Found VTKm") ++ endif() ++endif() ++ ++vtk_module_third_party( ++ INTERNAL ++ HEADER_ONLY ++ LICENSE_FILES "vtkvtkm/vtk-m/LICENSE.txt" ++ VERSION "master" ++ SUBDIRECTORY vtkvtkm ++ STANDARD_INCLUDE_DIRS ++ INTERFACE ++ EXTERNAL ++ PACKAGE VTKm ++ TARGETS vtkm_cont vtkm_filter vtkm_diy vtkm_optionparser vtkm_taotuple ++ #LIBRARIES vtkm_cont vtkm_filter vtkm_diy vtkm_optionparser vtkm_taotuple ++ INCLUDE_DIRS VTKm_INCLUDE_DIRS VTKm_DIY_INCLUDE_DIRS VTKm_OPTION_INCLUDE_DIRS ++) +\ No newline at end of file +diff --git a/ThirdParty/vtkm/vtk.module b/ThirdParty/vtkm/vtk.module +index a8e4dad0f..c7bbbf0e8 100644 +--- a/ThirdParty/vtkm/vtk.module ++++ b/ThirdParty/vtkm/vtk.module +@@ -3,5 +3,7 @@ NAME + PRIVATE_DEPENDS + # While not needed to satisfy symbols, this is necessary to guarantee that + # VTK_SMP_IMPLEMENTATION_TYPE is available when configuring vtk-m. +- VTK::CommonCore ++ # VTK::CommonCore ++LIBRARY_NAME ++ VTKm + THIRD_PARTY diff --git a/ports/vulkan-headers/portfile.cmake b/ports/vulkan-headers/portfile.cmake new file mode 100644 index 00000000000000..c6f59423e9eb7f --- /dev/null +++ b/ports/vulkan-headers/portfile.cmake @@ -0,0 +1,15 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/Vulkan-Headers + REF v1.2.184 + SHA512 95ee241ca82ba4373dc53aefec36839b6a08478434742bd8de6750d875a7a5fcb2225afae5f6f400a7b302af87da7e226b725be5435236694e816e141a3b24ef + HEAD_REF master +) + +# This must be vulkan as other vulkan packages expect it there. +file(COPY "${SOURCE_PATH}/include/vulkan/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vulkan") +file(COPY "${SOURCE_PATH}/include/vk_video/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vk_video") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/vulkan-headers/vcpkg.json b/ports/vulkan-headers/vcpkg.json new file mode 100644 index 00000000000000..8059e77b7d4e02 --- /dev/null +++ b/ports/vulkan-headers/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "vulkan-headers", + "version-semver": "1.2.184", + "description": "Vulkan header files and API registry", + "homepage": "https://github.com/KhronosGroup/Vulkan-Headers" +} diff --git a/ports/vulkan-hpp/CONTROL b/ports/vulkan-hpp/CONTROL deleted file mode 100644 index 95b59f3f818480..00000000000000 --- a/ports/vulkan-hpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: vulkan-hpp -Version: 2019-05-11 -Description: Header only C++ bindings for the Vulkan C API -Build-Depends: vulkan diff --git a/ports/vulkan-hpp/portfile.cmake b/ports/vulkan-hpp/portfile.cmake index 809b8149c5a60d..9e790f5f4be7ee 100644 --- a/ports/vulkan-hpp/portfile.cmake +++ b/ports/vulkan-hpp/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/Vulkan-Hpp - REF 5ce8ae7fd0d9c0543d02f33cfa8a66e6a43e2150 - SHA512 dc58332f5075f0b4d001abd4e78664be099509b8cee525a211aa33599f2351bf5e200fef37dccc84895d8f7a056f075ae3cf404f9aac7281970ff903e4a67a96 + REF v1.2.184 + SHA512 564bb5fd3b89fc8078e3c4d99c719f4d62166d78891bc529d6d07add1843137ec8f62a92dbdcfa9ffa8a9677fba41da1b591a033c61b27c43c70c25be32c3205 HEAD_REF master ) diff --git a/ports/vulkan-hpp/vcpkg.json b/ports/vulkan-hpp/vcpkg.json new file mode 100644 index 00000000000000..b0e141774dc1cb --- /dev/null +++ b/ports/vulkan-hpp/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "vulkan-hpp", + "version-string": "1.2.184", + "port-version": 1, + "description": "Header only C++ bindings for the Vulkan C API", + "dependencies": [ + "vulkan" + ] +} diff --git a/ports/vulkan-memory-allocator/CONTROL b/ports/vulkan-memory-allocator/CONTROL deleted file mode 100644 index ac18202c286049..00000000000000 --- a/ports/vulkan-memory-allocator/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: vulkan-memory-allocator -Version: 2.2.0 -Description: Easy to integrate Vulkan memory allocation library from GPUOpen diff --git a/ports/vulkan-memory-allocator/portfile.cmake b/ports/vulkan-memory-allocator/portfile.cmake index 5bbdeda1523ebf..c0b27259ace19c 100644 --- a/ports/vulkan-memory-allocator/portfile.cmake +++ b/ports/vulkan-memory-allocator/portfile.cmake @@ -1,14 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator - REF v2.2.0 - SHA512 85b49a1c55f469fd7340075809b045507db162b7dc663b885d963e3b3fd17759608401d353d3460f2ebf771e97f89af46e409cf9f5186325c3ce2c68d9b7e08f + REF 55868965ae1fa956c07695d4642e1add8c9450f7 + SHA512 433d8a961a1fa4c80894f014fdfbbcafeb94932a3eea2eced9c7109dcbf7350a60efb9fb1d8f3c621f2d72c118f47f82f8e9e6f4db75038fbad3a727b5896479 HEAD_REF master ) -file(COPY "${SOURCE_PATH}/src/vk_mem_alloc.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") +file(COPY "${SOURCE_PATH}/include/vk_mem_alloc.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-vulkan-memory-allocator-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-vulkan-memory-allocator) diff --git a/ports/vulkan-memory-allocator/vcpkg.json b/ports/vulkan-memory-allocator/vcpkg.json new file mode 100644 index 00000000000000..fe8efacdc1818c --- /dev/null +++ b/ports/vulkan-memory-allocator/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "vulkan-memory-allocator", + "version-string": "2021-07-07", + "port-version": 1, + "description": "Easy to integrate Vulkan memory allocation library from GPUOpen" +} diff --git a/ports/vulkan/CONTROL b/ports/vulkan/CONTROL deleted file mode 100644 index 2d4947d31a3db5..00000000000000 --- a/ports/vulkan/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: vulkan -Version: 1.1.82.1-1 -Description: A graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs on a wide variety of devices. \ No newline at end of file diff --git a/ports/vulkan/portfile.cmake b/ports/vulkan/portfile.cmake index 5035acd3524387..7493614e1bbf61 100644 --- a/ports/vulkan/portfile.cmake +++ b/ports/vulkan/portfile.cmake @@ -1,8 +1,6 @@ # Due to the complexity involved, this package doesn't install the Vulkan SDK. # It instead verifies that Vulkan is installed. # Other packages can depend on this package to declare a dependency on Vulkan. -include(vcpkg_common_functions) - message(STATUS "Querying VULKAN_SDK Enviroment variable") file(TO_CMAKE_PATH "$ENV{VULKAN_SDK}" VULKAN_DIR) set(VULKAN_INCLUDE "${VULKAN_DIR}/include/vulkan/") diff --git a/ports/vulkan/usage b/ports/vulkan/usage index 7924cf3cdf8589..62130b840a8f50 100644 --- a/ports/vulkan/usage +++ b/ports/vulkan/usage @@ -2,7 +2,7 @@ The package vulkan does not provide cmake or visual studio integration directly. However, it can still easily be used. Visual Studio: - Include ${VULKAN_SDK}/include to your include path. + Include $(VULKAN_SDK)/include to your include path. CMake: find_package(Vulkan REQUIRED) diff --git a/ports/vulkan/vcpkg.json b/ports/vulkan/vcpkg.json new file mode 100644 index 00000000000000..fa84de0377a5ff --- /dev/null +++ b/ports/vulkan/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "vulkan", + "version-string": "1.1.82.1", + "port-version": 2, + "description": "A graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs on a wide variety of devices." +} diff --git a/ports/vxl/CONTROL b/ports/vxl/CONTROL deleted file mode 100644 index a24672f83be763..00000000000000 --- a/ports/vxl/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: vxl -Version: v1.18.0-4 -Build-Depends: bzip2, expat, libgeotiff, libjpeg-turbo, libpng, shapelib, tiff, zlib -# Build-Depends: bzip2, dcmtk, expat, libgeotiff, libjpeg-turbo, openjpeg, libpng, shapelib, tiff, zlib -Description: A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding. - -Feature: core_imaging -Description: core_imaging support for vxl diff --git a/ports/vxl/fix_dependency.patch b/ports/vxl/fix_dependency.patch index 1c8e2ad54921b2..88cecfd660c70d 100644 --- a/ports/vxl/fix_dependency.patch +++ b/ports/vxl/fix_dependency.patch @@ -1,13 +1,13 @@ -diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt -index b6af7c2..7ca75d3 100644 ---- a/core/CMakeLists.txt -+++ b/core/CMakeLists.txt -@@ -100,7 +100,7 @@ endif() - - - # coordinate systems --if(BUILD_CORE_GEOMETRY AND BUILD_CORE_NUMERICS) -+if(BUILD_CORE_GEOMETRY AND BUILD_CORE_NUMERICS AND BUILD_CORE_IMAGING) - add_subdirectory(vcsl) - add_subdirectory(vpgl) - endif() +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index 3483f9c..57e149b 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -100,7 +100,7 @@ endif() + + + # coordinate systems +-if(VXL_BUILD_CORE_GEOMETRY AND VXL_BUILD_CORE_NUMERICS) ++if(VXL_BUILD_CORE_GEOMETRY AND VXL_BUILD_CORE_NUMERICS AND VXL_BUILD_CORE_IMAGING) + add_subdirectory(vcsl) + add_subdirectory(vpgl) + endif() diff --git a/ports/vxl/portfile.cmake b/ports/vxl/portfile.cmake index ea61e081e794c9..c3124ce202c978 100644 --- a/ports/vxl/portfile.cmake +++ b/ports/vxl/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - -set(BUILD_CORE_IMAGING OFF) -if("core_imaging" IN_LIST FEATURES) - set(BUILD_CORE_IMAGING ON) +set(VXL_BUILD_CORE_IMAGING OFF) +if("core-imaging" IN_LIST FEATURES) + set(VXL_BUILD_CORE_IMAGING ON) if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openjpeg.h") - set(BUILD_CORE_IMAGING OFF) + set(VXL_BUILD_CORE_IMAGING OFF) message(WARNING "Can't build VXL CORE_IMAGING features with non built-in OpenJpeg. Please remove OpenJpeg, and try install VXL again if you need them.") endif() endif() @@ -12,15 +10,15 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vxl/vxl - REF v1.18.0 - SHA512 6666d647b2e7010b91cb0b05016b5f49ae46d198f6bd160fe13fc09bc674eff5b937331fa11d81a8496473968b63452d950eee4fc2512152af57304a14bed63f + REF dac1c7ed8e183e9c6de8b928c8b0294a7bd1d8ee # v2.0.2 + SHA512 4c6f6dcd793a50cbbc9c7f61c561ed4a747ded67e3dceb09792998c0f0d4294445a441fed668d59297560f196274b1c25593ce67b0aa7597cbb773328e8612c0 HEAD_REF master PATCHES fix_dependency.patch ) set(USE_WIN_WCHAR_T OFF) -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_WINDOWS) set(USE_WIN_WCHAR_T ON) endif() @@ -28,9 +26,9 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBUILD_EXAMPLES=OFF + -DVXL_BUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF - -DBUILD_CORE_IMAGING=${BUILD_CORE_IMAGING} + -DVXL_BUILD_CORE_IMAGING=${VXL_BUILD_CORE_IMAGING} -DVXL_FORCE_V3P_BZLIB2=OFF -DVXL_USING_NATIVE_BZLIB2=TRUE # for disable build built-in bzip2 (v3p/bzlib/CMakeLists.txt#L10-L26) -DVXL_FORCE_V3P_CLIPPER=ON # TODO : need add clipper port to turn off @@ -43,7 +41,7 @@ vcpkg_configure_cmake( -DVXL_FORCE_V3P_TIFF=OFF -DVXL_FORCE_V3P_ZLIB=OFF -DVXL_USE_DCMTK=OFF # TODO : need fix dcmtk support to turn on - -DXVL_USE_GEOTIFF=ON + -DVXL_USE_GEOTIFF=ON -DVXL_USE_WIN_WCHAR_T=${USE_WIN_WCHAR_T} ) @@ -55,5 +53,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/core/vxl_copyright.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -# +file(INSTALL ${SOURCE_PATH}/core/vxl_copyright.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/vxl/vcpkg.json b/ports/vxl/vcpkg.json new file mode 100644 index 00000000000000..c039f14ae26719 --- /dev/null +++ b/ports/vxl/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "vxl", + "version-string": "2.0.2", + "port-version": 3, + "description": "A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding.", + "dependencies": [ + "bzip2", + "expat", + "libgeotiff", + "libjpeg-turbo", + "libpng", + "shapelib", + "tiff", + "zlib" + ], + "features": { + "core-imaging": { + "description": "core-imaging support for vxl" + } + } +} diff --git a/ports/wampcc/portfile.cmake b/ports/wampcc/portfile.cmake new file mode 100644 index 00000000000000..8b31ecb4670285 --- /dev/null +++ b/ports/wampcc/portfile.cmake @@ -0,0 +1,51 @@ +if (VCPKG_TARGET_IS_WINDOWS) + message("Shared build is broken under Windows. See https://github.com/darrenjs/wampcc/issues/57") + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BUILD_ARCH "Win32") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(BUILD_ARCH "x64") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(BUILD_ARCH "ARM") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO darrenjs/wampcc + REF 43d10a7ccf37ec1b895742712dd4a05577b73ff1 + SHA512 e830d26de00e8f5f378145f06691cb16121c40d3bd2cd663fad9a97db37251a11b56053178b619e3a2627f0cd518b6290a8381b26e517a9f16f0246d2f91958e + HEAD_REF master +) + +# Utils build is broken under Windows +if ("utils" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "'utils' build is broken under Windows") + endif() + + set(ENABLE_UTILS ON) +else() + set(ENABLE_UTILS OFF) +endif() + +if ("examples" IN_LIST FEATURES) + set(ENABLE_EXAMPLES ON) +else() + set(ENABLE_EXAMPLES OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_UTILS:BOOL=${ENABLE_UTILS} + -DBUILD_EXAMPLES:BOOL=${ENABLE_EXAMPLES} + -DBUILD_TESTS:BOOL=OFF # Tests build is broken +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wampcc RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/wampcc/vcpkg.json b/ports/wampcc/vcpkg.json new file mode 100644 index 00000000000000..da8a456f1e77c2 --- /dev/null +++ b/ports/wampcc/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "wampcc", + "version-string": "2019-09-04", + "port-version": 1, + "description": "Wampcc is C++ library that implements the Web Application Messaging Protocol (WAMP) protocol.", + "dependencies": [ + "jansson", + "libuv", + "openssl" + ], + "features": { + "examples": { + "description": "Build example apps" + }, + "utils": { + "description": "Build utility apps" + } + } +} diff --git a/ports/wangle/CONTROL b/ports/wangle/CONTROL deleted file mode 100644 index 2597d8afde4d9e..00000000000000 --- a/ports/wangle/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: wangle -Version: 2019.05.20.00-1 -Build-Depends: fizz, folly, openssl, glog, libevent, double-conversion, boost-system, boost-thread, boost-filesystem, boost-regex, boost-context -Description: Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way. diff --git a/ports/wangle/build.patch b/ports/wangle/build.patch deleted file mode 100644 index 13b85b037843b8..00000000000000 --- a/ports/wangle/build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/wangle/CMakeLists.txt b/wangle/CMakeLists.txt -index 15dc8b6..ed8c79b 100644 ---- a/wangle/CMakeLists.txt -+++ b/wangle/CMakeLists.txt -@@ -123,6 +123,7 @@ target_include_directories( - PUBLIC - $ - $ -+ PRIVATE - ${FIZZ_INCLUDE_DIR} - ${FOLLY_INCLUDE_DIR} - ${Boost_INCLUDE_DIR} diff --git a/ports/wangle/fix-config-cmake.patch b/ports/wangle/fix-config-cmake.patch index c72b70cddb815c..1d5949ceada07e 100644 --- a/ports/wangle/fix-config-cmake.patch +++ b/ports/wangle/fix-config-cmake.patch @@ -1,19 +1,22 @@ -diff --git a/wangle/cmake/wangle-config.cmake.in b/wangle/cmake/wangle-config.cmake.in -index e50af54..a16cdbb 100644 ---- a/wangle/cmake/wangle-config.cmake.in -+++ b/wangle/cmake/wangle-config.cmake.in -@@ -12,7 +12,13 @@ - @PACKAGE_INIT@ - - set_and_check(WANGLE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") --set_and_check(WANGLE_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@") -+set_and_check(WANGLE_CMAKE_DIR "${PACKAGE_PREFIX_DIR}/share/wangle") -+ -+find_package(folly REQUIRED) -+find_package(fizz REQUIRED) -+find_package(glog REQUIRED) -+find_package(threads REQUIRED) -+find_package(libevent REQUIRED) - - if (NOT TARGET wangle::wangle) - include("${WANGLE_CMAKE_DIR}/wangle-targets.cmake") +diff --git a/wangle/cmake/wangle-config.cmake.in b/wangle/cmake/wangle-config.cmake.in +index e50af54..e0fd0dc 100644 +--- a/wangle/cmake/wangle-config.cmake.in ++++ b/wangle/cmake/wangle-config.cmake.in +@@ -12,7 +12,16 @@ + @PACKAGE_INIT@ + + set_and_check(WANGLE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +-set_and_check(WANGLE_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@") ++set_and_check(WANGLE_CMAKE_DIR "${PACKAGE_PREFIX_DIR}/share/wangle") ++ ++include(CMakeFindDependencyMacro) ++find_dependency(folly REQUIRED) ++find_dependency(fizz REQUIRED) ++find_dependency(glog REQUIRED) ++find_dependency(Threads REQUIRED) ++find_dependency(Libevent REQUIRED) ++find_dependency(OpenSSL REQUIRED) ++find_dependency(double-conversion REQUIRED) + + if (NOT TARGET wangle::wangle) + include("${WANGLE_CMAKE_DIR}/wangle-targets.cmake") diff --git a/ports/wangle/fix_dependency.patch b/ports/wangle/fix_dependency.patch new file mode 100644 index 00000000000000..6b80a68f8d993c --- /dev/null +++ b/ports/wangle/fix_dependency.patch @@ -0,0 +1,56 @@ +diff --git a/wangle/CMakeLists.txt b/wangle/CMakeLists.txt +index 8df7c76..f605f25 100644 +--- a/wangle/CMakeLists.txt ++++ b/wangle/CMakeLists.txt +@@ -62,7 +62,7 @@ find_package(folly CONFIG REQUIRED) + find_package(fizz CONFIG REQUIRED) + find_package(fmt CONFIG REQUIRED) + find_package(OpenSSL REQUIRED) +-find_package(Glog REQUIRED) ++find_package(glog CONFIG REQUIRED) + find_package(gflags CONFIG QUIET) + if (gflags_FOUND) + message(STATUS "Found gflags from package config") +@@ -70,8 +70,8 @@ if (gflags_FOUND) + else() + find_package(Gflags REQUIRED) + endif() +-find_package(LibEvent MODULE REQUIRED) +-find_package(DoubleConversion REQUIRED) ++find_package(Libevent CONFIG REQUIRED) ++find_package(double-conversion CONFIG REQUIRED) + find_package(Threads REQUIRED) + if (UNIX AND NOT APPLE) + find_package(Librt) +@@ -153,24 +153,23 @@ target_include_directories( + PUBLIC + $ + $ ++ PRIVATE + ${FIZZ_INCLUDE_DIR} + ${FOLLY_INCLUDE_DIR} + ${Boost_INCLUDE_DIR} +- ${OPENSSL_INCLUDE_DIR} +- ${GLOG_INCLUDE_DIRS} + ${GFLAGS_INCLUDE_DIRS} +- ${LIBEVENT_INCLUDE_DIR} +- ${DOUBLE_CONVERSION_INCLUDE_DIRS} + ) + target_link_libraries(wangle PUBLIC + ${FOLLY_LIBRARIES} + ${FIZZ_LIBRARIES} + ${Boost_LIBRARIES} +- ${OPENSSL_LIBRARIES} +- ${GLOG_LIBRARIES} ++ OpenSSL::SSL ++ OpenSSL::Crypto ++ glog::glog + ${GFLAGS_LIBRARIES} +- ${LIBEVENT_LIB} +- ${DOUBLE_CONVERSION_LIBRARIES} ++ libevent::core ++ libevent::extra ++ double-conversion::double-conversion + ${CMAKE_DL_LIBS} + ${LIBRT_LIBRARIES} + Threads::Threads) diff --git a/ports/wangle/portfile.cmake b/ports/wangle/portfile.cmake index 2ae73025a2fafc..dca45cfe4502b1 100644 --- a/ports/wangle/portfile.cmake +++ b/ports/wangle/portfile.cmake @@ -1,18 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/wangle - REF 19300a75c27759339c44cf06ecedf7ab00703e8b - SHA512 cc9a5a956862e9d4321df7c0394fbb877c5f0b0f8eae1da6aad88239a2cc0b4cd694bd25e0f70f3da8a24c34f4f035bcfb53919fd99634219e0816c78477cee2 + REF v2021.06.14.00 + SHA512 15fd2c9515ec3d0c3293a8f96d01d3e91e2ef82694d592aae6573648957f691a7da5d7c2aef7391a827a67e2f58fef7668778e0f0323aac11c5b16a1ba889cc3 HEAD_REF master PATCHES - build.patch fix-config-cmake.patch + fix_dependency.patch ) -# message(FATAL_ERROR "patch") vcpkg_configure_cmake( SOURCE_PATH "${SOURCE_PATH}/wangle" @@ -41,6 +38,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/wangle/deprecated/rx/test ) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wangle RENAME copyright) -file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/wangle) +file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/wangle/vcpkg.json b/ports/wangle/vcpkg.json new file mode 100644 index 00000000000000..c499e71f04ece4 --- /dev/null +++ b/ports/wangle/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "wangle", + "version-string": "2021.06.14.00", + "description": "Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.", + "homepage": "https://github.com/facebook/wangle", + "dependencies": [ + "boost-context", + "boost-filesystem", + "boost-regex", + "boost-system", + "boost-thread", + "double-conversion", + "fizz", + "folly", + "glog", + "libevent", + "openssl" + ] +} diff --git a/ports/wavelib/portfile.cmake b/ports/wavelib/portfile.cmake new file mode 100644 index 00000000000000..4951cf40a542ce --- /dev/null +++ b/ports/wavelib/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rafat/wavelib + REF a92456d2e20451772dd76c2a0a3368537ee94184 + SHA512 d14ebc0d96e86d9226fa346cb6ef157b2949985dfedf4228dd4356ccacaac48fde47edfcba31e7455b25dc95c7a1cb148ad6845143c17ae5972659c98e683865 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_UT=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/wavelib/vcpkg.json b/ports/wavelib/vcpkg.json new file mode 100644 index 00000000000000..1c346cf8702897 --- /dev/null +++ b/ports/wavelib/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "wavelib", + "version-date": "2021-08-10", + "description": "C implementation of wavelet transform (DWT,SWT and MODWT)", + "homepage": "https://github.com/rafat/wavelib", + "license": "BSD-3-Clause", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/wavpack/CONTROL b/ports/wavpack/CONTROL deleted file mode 100644 index 7b169e0608ddf3..00000000000000 --- a/ports/wavpack/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: wavpack -Version: 5.1.0-00d9a4a-1 -Description: WavPack encode/decode library, command-line programs, and several plugins diff --git a/ports/wavpack/fix-symbol-exports.patch b/ports/wavpack/fix-symbol-exports.patch new file mode 100644 index 00000000000000..999a05417cfeb7 --- /dev/null +++ b/ports/wavpack/fix-symbol-exports.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70e1043f..d8cb8b10 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -328,7 +328,7 @@ foreach(EXPORT_SYMBOL ${WAVPACK_EXPORT_SYMBOLS}) + list(APPEND FILE_CONTENTS "_${EXPORT_SYMBOL}\n") + endforeach() + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/libwavpack.sym ${FILE_CONTENTS}) +- target_link_libraries(wavpack PRIVATE "-Wl,-exported_symbols_list,'${CMAKE_CURRENT_BINARY_DIR}/libwavpack.sym'") ++ set_target_properties(wavpack PROPERTIES LINK_FLAGS "-Wl,-exported_symbols_list,'${CMAKE_CURRENT_BINARY_DIR}/libwavpack.sym'") + else() + set(CONFTTEST_CONTENTS "VERS_1 {\n global: sym\;\n\n};\n\nVERS_2 {\n global: sym;\n} VERS_1\;") + file(WRITE ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/conftest.map "${CONFTTEST_CONTENTS}") +@@ -340,7 +340,7 @@ list(APPEND FILE_CONTENTS "${EXPORT_SYMBOL}\;\n") + endforeach() + list(APPEND FILE_CONTENTS "local: *\; }\;") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/libwavpack.map ${FILE_CONTENTS}) +- target_link_libraries(wavpack PRIVATE "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/libwavpack.map';-Wl,-no-undefined") ++ set_target_properties(wavpack PROPERTIES LINK_FLAGS "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/libwavpack.map';-Wl,-no-undefined") + endif() + endif() + diff --git a/ports/wavpack/portfile.cmake b/ports/wavpack/portfile.cmake index db2df1cdeb9cbe..13d35a8f2f2457 100644 --- a/ports/wavpack/portfile.cmake +++ b/ports/wavpack/portfile.cmake @@ -1,26 +1,14 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/00d9a4ac58a52b52495736be614cb06ba102663c) +vcpkg_fail_port_install(ON_ARCH "arm" "arm64") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO dbry/WavPack - REF 00d9a4ac58a52b52495736be614cb06ba102663c - SHA512 a0d08ac2ff46bd4cc606626c8e0da18a83392722a2e40df18f9e40710e5e147c0a24800174bfdf42ed7a12be4d9679f6302c51d8409724d31ca2a29ab4972481 + REF 350b6d7737383029573ea2cce9bd94f1b6756bbd # 5.3.0 + SHA512 42116b41b8df179193822d25ea34d2c1d9a2af3598f7d25c6665d31aca11a3a11984cdb17b05e5d0874c94562e1b471736f6a1ae67bd3a22d018cd142676634c HEAD_REF master PATCHES OpenSSL.patch + fix-symbol-exports.patch ) vcpkg_configure_cmake( @@ -37,14 +25,23 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WavPack) +endif() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wavpack RENAME copyright) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME wavpack) +if(WIN32 AND (NOT MINGW)) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/wavpack.pc" "-lwavpack" "-lwavpackdll") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/wavpack.pc" "-lwavpack" "-lwavpackdll") + endif() +endif() + +vcpkg_fixup_pkgconfig() diff --git a/ports/wavpack/vcpkg.json b/ports/wavpack/vcpkg.json new file mode 100644 index 00000000000000..6812cdcd5b4cf9 --- /dev/null +++ b/ports/wavpack/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "wavpack", + "version-string": "5.3.0", + "port-version": 2, + "description": "WavPack encode/decode library, command-line programs, and several plugins", + "homepage": "https://github.com/dbry/WavPack", + "supports": "!(arm | arm64)" +} diff --git a/ports/websocketpp/CONTROL b/ports/websocketpp/CONTROL deleted file mode 100644 index 4a284f09e46296..00000000000000 --- a/ports/websocketpp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: websocketpp -Version: 0.8.1-1 -Build-Depends: zlib, openssl, boost-asio -Homepage: https://github.com/zaphoyd/websocketpp -Description: Library that implements RFC6455 The WebSocket Protocol \ No newline at end of file diff --git a/ports/websocketpp/portfile.cmake b/ports/websocketpp/portfile.cmake index 2da84ba264ce9c..8feb3bd8e9d9e6 100644 --- a/ports/websocketpp/portfile.cmake +++ b/ports/websocketpp/portfile.cmake @@ -1,25 +1,24 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zaphoyd/websocketpp - REF 1c699ce46843a787482a703fdeff9271fbb7bb5d - SHA512 9de30e02e09b066dca8d840963e78673ef118e5183f9638b8a5c941116422916fe9fe02bb5271843aeb292a460f159b5957887594c0824a88600e6c4a5620dbd + REF 56123c87598f8b1dd471be83ca841ceae07f95ba # 0.8.2 + SHA512 f185a66e5a7c783254352a6ef87e2e559f681032b7368765d08393ed12bcae76825abed7dcaea73de09df644320409dad46279701f5f469520542a2c9b6a6163 HEAD_REF master ) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/websocketpp) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) # Copy the header files file(COPY "${SOURCE_PATH}/websocketpp" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.hpp") set(PACKAGE_INSTALL_INCLUDE_DIR "\${CMAKE_CURRENT_LIST_DIR}/../../include") -set(WEBSOCKETPP_VERSION 0.8.1) +set(WEBSOCKETPP_VERSION 0.8.2) set(PACKAGE_INIT " macro(set_and_check) set(\${ARGV}) endmacro() ") -configure_file(${SOURCE_PATH}/websocketpp-config.cmake.in "${CURRENT_PACKAGES_DIR}/share/websocketpp/websocketpp-config.cmake" @ONLY) -configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/websocketpp/copyright COPYONLY) +configure_file(${SOURCE_PATH}/websocketpp-config.cmake.in "${CURRENT_PACKAGES_DIR}/share/${PORT}/websocketpp-config.cmake" @ONLY) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/websocketpp/vcpkg.json b/ports/websocketpp/vcpkg.json new file mode 100644 index 00000000000000..460fa86cabddc7 --- /dev/null +++ b/ports/websocketpp/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "websocketpp", + "version": "0.8.2", + "port-version": 1, + "description": "Library that implements RFC6455 The WebSocket Protocol", + "homepage": "https://github.com/zaphoyd/websocketpp", + "documentation": "http://docs.websocketpp.org/", + "default-features": [ + "recommended" + ], + "features": { + "recommended": { + "description": "Use recommended dependencies", + "dependencies": [ + "boost-asio", + "openssl", + "zlib" + ] + } + } +} diff --git a/ports/wepoll/CMakeLists.txt b/ports/wepoll/CMakeLists.txt new file mode 100644 index 00000000000000..cd8d29a2ca8d75 --- /dev/null +++ b/ports/wepoll/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) + +project(wepoll C) + +add_library(wepoll wepoll.c) + +if (MSVC) + if (BUILD_SHARED_LIBS) + target_compile_definitions( + wepoll + PRIVATE + "-DWEPOLL_EXPORT=__declspec(dllexport)" + ) + endif () + + target_compile_options(wepoll PRIVATE /Wall /wd4127 /wd4201 /wd4242 /wd4710 /wd4711 /wd4820) + + if (MSVC_VERSION GREATER_EQUAL 1900) + target_compile_options(wepoll PRIVATE /wd5045) + endif () +else () + target_compile_definitions( + wepoll + PRIVATE + "-DWEPOLL_EXPORT=__attribute__((visibility(\"default\")))" + ) + + target_compile_options(wepoll PRIVATE -Wall -Wextra -Werror -fvisibility=hidden) +endif () + +target_link_libraries(wepoll PUBLIC ws2_32) + +set_target_properties( + wepoll + PROPERTIES + OUTPUT_NAME wepoll + PUBLIC_HEADER wepoll.h +) + +install(TARGETS wepoll) diff --git a/ports/wepoll/portfile.cmake b/ports/wepoll/portfile.cmake new file mode 100644 index 00000000000000..8032e6000ca5fd --- /dev/null +++ b/ports/wepoll/portfile.cmake @@ -0,0 +1,30 @@ +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "${PORT} only supports Windows.") +endif() + +# We use `dist` branch instead of `master` branch here, +# as suggested by the library author. +# https://github.com/microsoft/vcpkg/pull/8280 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO piscisaureus/wepoll + REF v1.5.8 + SHA512 e87fbdd0f64a06910fdf29565acff0443b500c409cf7456657829ece3674563581a5c9a298f9ac70f5a0bb78c0a5eb17cfd1a164ab5cbd6fdaacd19d015a3f85 + HEAD_REF dist +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/wepoll/vcpkg.json b/ports/wepoll/vcpkg.json new file mode 100644 index 00000000000000..c2d14c63730b74 --- /dev/null +++ b/ports/wepoll/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "wepoll", + "version-string": "1.5.8", + "port-version": 1, + "description": "Fast epoll for windows", + "homepage": "https://github.com/piscisaureus/wepoll", + "supports": "windows" +} diff --git a/ports/wg21-sg14/CONTROL b/ports/wg21-sg14/CONTROL deleted file mode 100644 index e096972261daba..00000000000000 --- a/ports/wg21-sg14/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: wg21-sg14 -Version: 2019-08-13 -Description: A library for Study Group 14 of Working Group 21 (C++) -Homepage: https://github.com/WG21-SG14/SG14 diff --git a/ports/wg21-sg14/portfile.cmake b/ports/wg21-sg14/portfile.cmake index d72be282a5175d..4fdf80df53b44b 100644 --- a/ports/wg21-sg14/portfile.cmake +++ b/ports/wg21-sg14/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO WG21-SG14/SG14 diff --git a/ports/wg21-sg14/vcpkg.json b/ports/wg21-sg14/vcpkg.json new file mode 100644 index 00000000000000..4999f444bd8d7d --- /dev/null +++ b/ports/wg21-sg14/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "wg21-sg14", + "version-string": "2019-08-13", + "port-version": 1, + "description": "A library for Study Group 14 of Working Group 21 (C++)", + "homepage": "https://github.com/WG21-SG14/SG14" +} diff --git a/ports/wil/CONTROL b/ports/wil/CONTROL deleted file mode 100644 index f58d9f0146d61f..00000000000000 --- a/ports/wil/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: wil -Version: 2019-07-16 -Description: The Windows Implementation Libraries (WIL) is a header-only C++ library created to make life easier for developers on Windows through readable type-safe C++ interfaces for common Windows coding patterns. \ No newline at end of file diff --git a/ports/wil/portfile.cmake b/ports/wil/portfile.cmake index d9e50a16c6ff3e..d6b3bcbb194347 100644 --- a/ports/wil/portfile.cmake +++ b/ports/wil/portfile.cmake @@ -1,13 +1,24 @@ #header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/wil - REF 7a6f0679be9cd625f54a21bb0ce06c39958b13a5 - SHA512 155b8ed9f3622e7d802b41d6086f2b5984e52a3c21d068157d5d428a2efe24f1960186412c61719bf32a4c12c313930defa590d07d7b05a6376fe0ae68a85b2e + REF 5a21cac10640f54b7ef886031f4d9ed427bef4c5 + SHA512 b1a6703dd75eee66f81c54bb5c01bc9acc7354c113fd556afb2dd95361db7e9f94c9e958d9a0b897359084c9c08cb725bbe214fdaccf2e662c1ca4aa73c3345a HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wil RENAME copyright) \ No newline at end of file +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWIL_BUILD_TESTS=OFF + -DWIL_BUILD_PACKAGING=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/WIL) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/ports/wil/vcpkg.json b/ports/wil/vcpkg.json new file mode 100644 index 00000000000000..fca2add1144a16 --- /dev/null +++ b/ports/wil/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "wil", + "version-string": "2021-08-03", + "port-version": 1, + "description": "The Windows Implementation Libraries (WIL) is a header-only C++ library created to make life easier for developers on Windows through readable type-safe C++ interfaces for common Windows coding patterns.", + "homepage": "https://github.com/microsoft/wil" +} diff --git a/ports/wildmidi/0002-use-ansi.patch b/ports/wildmidi/0002-use-ansi.patch deleted file mode 100644 index 68acb7b3452469..00000000000000 --- a/ports/wildmidi/0002-use-ansi.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/file_io.c b/src/file_io.c -index 9db9759..7110e8b 100644 ---- a/src/file_io.c -+++ b/src/file_io.c -@@ -118,7 +118,7 @@ void *_WM_BufferFile(const char *filename, uint32_t *size) { - #elif defined(_WIN32) - int buffer_fd; - HANDLE h; -- WIN32_FIND_DATA wfd; -+ WIN32_FIND_DATAA wfd; - #elif defined(__OS2__) || defined(__EMX__) - int buffer_fd; - HDIR h = HDIR_CREATE; -@@ -186,7 +186,7 @@ void *_WM_BufferFile(const char *filename, uint32_t *size) { - } - *size = f.ff_fsize; - #elif defined(_WIN32) -- if ((h = FindFirstFile(buffer_file, &wfd)) == INVALID_HANDLE_VALUE) { -+ if ((h = FindFirstFileA(buffer_file, &wfd)) == INVALID_HANDLE_VALUE) { - _WM_GLOBAL_ERROR(__FUNCTION__, __LINE__, WM_ERR_STAT, filename, ENOENT); - free(buffer_file); - return NULL; diff --git a/ports/wildmidi/CONTROL b/ports/wildmidi/CONTROL deleted file mode 100644 index 35e0bfffc4199f..00000000000000 --- a/ports/wildmidi/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: wildmidi -Version: 0.4.3 -Homepage: https://github.com/Mindwerks/wildmidi -Description: MIDI software synthesizer library. diff --git a/ports/wildmidi/portfile.cmake b/ports/wildmidi/portfile.cmake index d3765f790a63af..2280c4aca05f2e 100644 --- a/ports/wildmidi/portfile.cmake +++ b/ports/wildmidi/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Mindwerks/wildmidi @@ -8,7 +6,6 @@ vcpkg_from_github( HEAD_REF master PATCHES 0001-add-install-target.patch - 0002-use-ansi.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/wildmidi/vcpkg.json b/ports/wildmidi/vcpkg.json new file mode 100644 index 00000000000000..8831d91f0c1390 --- /dev/null +++ b/ports/wildmidi/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "wildmidi", + "version-string": "0.4.3", + "port-version": 2, + "description": "MIDI software synthesizer library.", + "homepage": "https://github.com/Mindwerks/wildmidi" +} diff --git a/ports/wincrypt/CONTROL b/ports/wincrypt/CONTROL deleted file mode 100644 index c838654071dbdc..00000000000000 --- a/ports/wincrypt/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: wincrypt -Version: 0.0-1 -Description: Windows Cryptography. \ No newline at end of file diff --git a/ports/wincrypt/portfile.cmake b/ports/wincrypt/portfile.cmake index 5cb5a1b196dc84..9eaedf3d243da2 100644 --- a/ports/wincrypt/portfile.cmake +++ b/ports/wincrypt/portfile.cmake @@ -1,14 +1,11 @@ -include(vcpkg_common_functions) - -vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") - set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\${WINDOWS_SDK}\\um") elseif(WINDOWS_SDK MATCHES "8.") - set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\um") else() message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") endif() @@ -27,4 +24,4 @@ elseif(WINDOWS_SDK MATCHES "8.") endif() # Allow empty include directory -set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) \ No newline at end of file +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/wincrypt/vcpkg.json b/ports/wincrypt/vcpkg.json new file mode 100644 index 00000000000000..02cad22f7c9d86 --- /dev/null +++ b/ports/wincrypt/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "wincrypt", + "version-string": "0.0", + "port-version": 3, + "description": "Windows Cryptography." +} diff --git a/ports/winlamb/portfile.cmake b/ports/winlamb/portfile.cmake new file mode 100644 index 00000000000000..d4509647b0631b --- /dev/null +++ b/ports/winlamb/portfile.cmake @@ -0,0 +1,17 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rodrigocfd/winlamb + REF b7a6767994b2a8c0782c6b6e7b9e78a224a078cf + SHA512 343a900ef003eac47489b34d2b5affc1f133929ff036d535f604fbc5771767075835eed59acd7b93674729badf28ac99f6ba10ac3bf34af6aa4ac49021925e7c + HEAD_REF master +) + +file(GLOB WINLAMB_PUBLIC_HEADERS ${SOURCE_PATH}/*.h) +file(GLOB WINLAMB_INTERNAL_HEADERS ${SOURCE_PATH}/internals/*.h) +file(INSTALL ${WINLAMB_PUBLIC_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${WINLAMB_INTERNAL_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}/internals) + +file(INSTALL ${SOURCE_PATH}/win10.exe.manifest DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/winlamb/vcpkg.json b/ports/winlamb/vcpkg.json new file mode 100644 index 00000000000000..d290ada8829bcb --- /dev/null +++ b/ports/winlamb/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "winlamb", + "version-date": "2020-10-15", + "description": "A lightweight modern C++11 library for Win32 API, using lambdas to handle Windows messages.", + "homepage": "https://github.com/rodrigocfd/winlamb", + "license": "MIT", + "supports": "windows" +} diff --git a/ports/winpcap/CONTROL b/ports/winpcap/CONTROL deleted file mode 100644 index ddddcab1cbcdff..00000000000000 --- a/ports/winpcap/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: winpcap -Version: 4.1.3-2 -Homepage: https://www.winpcap.org -Description: WinPcap is the industry-standard tool for link-layer network access in Windows environments. diff --git a/ports/winpcap/portfile.cmake b/ports/winpcap/portfile.cmake index 964122d1789248..8549c543d26c8a 100644 --- a/ports/winpcap/portfile.cmake +++ b/ports/winpcap/portfile.cmake @@ -1,4 +1,6 @@ -include(vcpkg_common_functions) +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/libpcap") + message(FATAL_ERROR "FATAL ERROR: libpcap and winpcap are incompatible.") +endif() set(WINPCAP_VERSION 4_1_3) @@ -43,12 +45,7 @@ vcpkg_extract_source_archive_ex( "${CMAKE_CURRENT_LIST_DIR}/fix-create-lib-batch.patch" ) -file( - COPY - "${CURRENT_PORT_DIR}/create_bin.bat" - DESTINATION - ${SOURCE_PATH} -) +file(COPY "${CURRENT_PORT_DIR}/create_bin.bat" DESTINATION ${SOURCE_PATH}) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(PLATFORM Win32) @@ -109,8 +106,7 @@ vcpkg_execute_required_process( LOGNAME create_include-${TARGET_TRIPLET} ) -file( - INSTALL +file(INSTALL "${SOURCE_PATH}/WpdPack/Include/bittypes.h" "${SOURCE_PATH}/WpdPack/Include/ip6_misc.h" "${SOURCE_PATH}/WpdPack/Include/Packet32.h" @@ -120,12 +116,9 @@ file( "${SOURCE_PATH}/WpdPack/Include/pcap-stdinc.h" "${SOURCE_PATH}/WpdPack/Include/remote-ext.h" "${SOURCE_PATH}/WpdPack/Include/Win32-Extensions.h" - DESTINATION - ${CURRENT_PACKAGES_DIR}/include -) + DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file( - INSTALL +file(INSTALL "${SOURCE_PATH}/WpdPack/Include/pcap/bluetooth.h" "${SOURCE_PATH}/WpdPack/Include/pcap/bpf.h" "${SOURCE_PATH}/WpdPack/Include/pcap/namedb.h" @@ -133,9 +126,7 @@ file( "${SOURCE_PATH}/WpdPack/Include/pcap/sll.h" "${SOURCE_PATH}/WpdPack/Include/pcap/usb.h" "${SOURCE_PATH}/WpdPack/Include/pcap/vlan.h" - DESTINATION - ${CURRENT_PACKAGES_DIR}/include/pcap -) + DESTINATION ${CURRENT_PACKAGES_DIR}/include/pcap) vcpkg_execute_required_process( COMMAND ${SOURCE_PATH}/create_lib.bat @@ -148,21 +139,15 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(PCAP_LIBRARY_PATH "${PCAP_LIBRARY_PATH}/x64") endif() -file( - INSTALL +file(INSTALL "${PCAP_LIBRARY_PATH}/Packet.lib" "${PCAP_LIBRARY_PATH}/wpcap.lib" - DESTINATION - ${CURRENT_PACKAGES_DIR}/lib -) + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file( - INSTALL +file(INSTALL "${PCAP_LIBRARY_PATH}/debug/Packet.lib" "${PCAP_LIBRARY_PATH}/debug/wpcap.lib" - DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/lib -) + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") vcpkg_execute_required_process( @@ -176,21 +161,17 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(PCAP_BINARY_PATH "${PCAP_BINARY_PATH}/x64") endif() - file( - INSTALL + file(INSTALL "${PCAP_BINARY_PATH}/Packet.dll" "${PCAP_BINARY_PATH}/wpcap.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/bin - ) + DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file( - INSTALL + file(INSTALL "${PCAP_BINARY_PATH}/Packet.dll" "${PCAP_BINARY_PATH}/wpcap.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/bin - ) + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -configure_file(${COPYRIGHT} ${CURRENT_PACKAGES_DIR}/share/winpcap/copyright COPYONLY) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/pcap-stdinc.h "#define inline __inline" "#ifndef __cplusplus\n#define inline __inline\n#endif") + +configure_file(${COPYRIGHT} ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/winpcap/vcpkg.json b/ports/winpcap/vcpkg.json new file mode 100644 index 00000000000000..b584c0f6bd6bd1 --- /dev/null +++ b/ports/winpcap/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "winpcap", + "version-string": "4.1.3", + "port-version": 5, + "description": "WinPcap is the industry-standard tool for link-layer network access in Windows environments.", + "homepage": "https://www.winpcap.org" +} diff --git a/ports/winreg/portfile.cmake b/ports/winreg/portfile.cmake new file mode 100644 index 00000000000000..62f573aaacc8a3 --- /dev/null +++ b/ports/winreg/portfile.cmake @@ -0,0 +1,16 @@ +# WinReg - Header-only library +vcpkg_fail_port_install(ON_TARGET "linux" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GiovanniDicanio/WinReg + REF 023ad61dc77c83407e7ae061f177a3ba3d3941e6 #v4.1.0 + SHA512 e62bf4a7926c720ad2c9a56b71b19ff48f566d56ddd5c858c25cec3fc6d8fd829267d3d1789b4841140b95d4e7ed0718af55317f6b4f76c1094bd1c69dda24f1 + HEAD_REF master +) + +# Copy the single reusable library header +file(COPY ${SOURCE_PATH}/WinReg/WinReg.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/winreg/vcpkg.json b/ports/winreg/vcpkg.json new file mode 100644 index 00000000000000..76836441ebb03b --- /dev/null +++ b/ports/winreg/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "winreg", + "version-string": "4.1.0", + "port-version": 1, + "description": "High-level C++ wrapper around the Windows Registry C API.", + "homepage": "https://github.com/GiovanniDicanio/WinReg", + "supports": "windows | uwp" +} diff --git a/ports/winsock2/CONTROL b/ports/winsock2/CONTROL deleted file mode 100644 index 298fd7ebd4b07e..00000000000000 --- a/ports/winsock2/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: winsock2 -Version: 0.0-1 -Description: Windows Sockets. \ No newline at end of file diff --git a/ports/winsock2/portfile.cmake b/ports/winsock2/portfile.cmake index 76f3bc23db0827..b684c2f4327697 100644 --- a/ports/winsock2/portfile.cmake +++ b/ports/winsock2/portfile.cmake @@ -1,14 +1,11 @@ -include(vcpkg_common_functions) - -vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") - set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\${WINDOWS_SDK}\\um") elseif(WINDOWS_SDK MATCHES "8.") - set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\um") else() message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") endif() @@ -27,4 +24,4 @@ elseif(WINDOWS_SDK MATCHES "8.") endif() # Allow empty include directory -set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) \ No newline at end of file +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/winsock2/vcpkg.json b/ports/winsock2/vcpkg.json new file mode 100644 index 00000000000000..472dc00d27e74c --- /dev/null +++ b/ports/winsock2/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "winsock2", + "version-string": "0.0", + "port-version": 3, + "description": "Windows Sockets." +} diff --git a/ports/wintoast/CONTROL b/ports/wintoast/CONTROL deleted file mode 100644 index d9d410796d7696..00000000000000 --- a/ports/wintoast/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: wintoast -Version: 1.2.0 -Description: WinToast is a lightly library written in C++ which brings a complete integration of the modern toast notifications of Windows 8 & Windows 10. \ No newline at end of file diff --git a/ports/wintoast/portfile.cmake b/ports/wintoast/portfile.cmake index c7f2f895286d75..c99d50212da6ef 100644 --- a/ports/wintoast/portfile.cmake +++ b/ports/wintoast/portfile.cmake @@ -2,8 +2,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/ports/wintoast/vcpkg.json b/ports/wintoast/vcpkg.json new file mode 100644 index 00000000000000..2d0a41de5d2fe4 --- /dev/null +++ b/ports/wintoast/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "wintoast", + "version-string": "1.2.0", + "port-version": 1, + "description": "WinToast is a lightly library written in C++ which brings a complete integration of the modern toast notifications of Windows 8 & Windows 10.", + "supports": "!uwp" +} diff --git a/ports/woff2/0001-unofficial-brotli.patch b/ports/woff2/0001-unofficial-brotli.patch new file mode 100644 index 00000000000000..a0163a02c151e0 --- /dev/null +++ b/ports/woff2/0001-unofficial-brotli.patch @@ -0,0 +1,90 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ecfbb83..7fb7a15 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,13 +34,23 @@ endif() + # Find Brotli dependencies + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + find_package(BrotliDec) +-if (NOT BROTLIDEC_FOUND) +- message(FATAL_ERROR "librotlidec is needed to build woff2.") +-endif () + find_package(BrotliEnc) +-if (NOT BROTLIENC_FOUND) +- message(FATAL_ERROR "librotlienc is needed to build woff2.") +-endif () ++if(BROTLIDEC_FOUND AND BROTLIENC_FOUND) ++ include_directories("${BROTLIDEC_INCLUDE_DIRS}" "${BROTLIENC_INCLUDE_DIRS}") ++ set(WOFF2_BROTLIDEC libbrotlidec) ++ set(WOFF2_BROTLIENC libbrotlienc) ++ set(WOFF2_BORTLIDEC_LIBRARIES "${BROTLIDEC_LIBRARIES}") ++ set(WOFF2_BORTLIENC_LIBRARIES "${BROTLIENC_LIBRARIES}") ++else() ++ find_package(unofficial-brotli REQUIRED) ++ if(TARGET unofficial::brotli::brotlidec-static) ++ set(BROTLI_LINKAGE -static) ++ endif() ++ set(WOFF2_BROTLIDEC unofficial::brotli::brotlidec${BROTLI_LINKAGE}) ++ set(WOFF2_BROTLIENC unofficial::brotli::brotlienc${BROTLI_LINKAGE}) ++ set(WOFF2_BORTLIDEC_LIBRARIES unofficial::brotli::brotlidec${BROTLI_LINKAGE} unofficial::brotli::brotlicommon${BROTLI_LINKAGE}) ++ set(WOFF2_BORTLIENC_LIBRARIES unofficial::brotli::brotlienc${BROTLI_LINKAGE} unofficial::brotli::brotlicommon${BROTLI_LINKAGE}) ++endif() + + # Set compiler flags + if (NOT CANONICAL_PREFIXES) +@@ -63,9 +73,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAG}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAG}") + set(CMAKE_CXX_STANDARD 11) + +-# Set search path for our private/public headers as well as Brotli headers +-include_directories("src" "include" +- "${BROTLIDEC_INCLUDE_DIRS}" "${BROTLIENC_INCLUDE_DIRS}") ++# Set search path for our private/public headers ++include_directories("src" "include") + + # Common part used by decoder and encoder + add_library(woff2common +@@ -77,7 +86,7 @@ add_library(woff2common + add_library(woff2dec + src/woff2_dec.cc + src/woff2_out.cc) +-target_link_libraries(woff2dec woff2common "${BROTLIDEC_LIBRARIES}") ++target_link_libraries(woff2dec woff2common ${WOFF2_BORTLIDEC_LIBRARIES}) + add_executable(woff2_decompress src/woff2_decompress.cc) + target_link_libraries(woff2_decompress woff2dec) + +@@ -88,7 +97,7 @@ add_library(woff2enc + src/normalize.cc + src/transform.cc + src/woff2_enc.cc) +-target_link_libraries(woff2enc woff2common "${BROTLIENC_LIBRARIES}") ++target_link_libraries(woff2enc woff2common ${WOFF2_BORTLIENC_LIBRARIES}) + add_executable(woff2_compress src/woff2_compress.cc) + target_link_libraries(woff2_compress woff2enc) + +@@ -246,7 +255,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2dec.pc" + DESCRIPTION "WOFF2 decoder library" + URL "https://github.com/google/woff2" + VERSION "${WOFF2_VERSION}" +- DEPENDS libbrotlidec ++ DEPENDS ${WOFF2_BROTLIDEC} + DEPENDS_PRIVATE libwoff2common + LIBRARIES woff2dec) + +@@ -255,7 +264,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2enc.pc" + DESCRIPTION "WOFF2 encoder library" + URL "https://github.com/google/woff2" + VERSION "${WOFF2_VERSION}" +- DEPENDS libbrotlienc ++ DEPENDS ${WOFF2_BROTLIENC} + DEPENDS_PRIVATE libwoff2common + LIBRARIES woff2enc) + +@@ -264,6 +273,7 @@ if (NOT BUILD_SHARED_LIBS) + install( + TARGETS woff2_decompress woff2_compress woff2_info + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" + ) + endif() + diff --git a/ports/woff2/CONTROL b/ports/woff2/CONTROL deleted file mode 100644 index e4e6511ca5c5ea..00000000000000 --- a/ports/woff2/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: woff2 -Version: 1.0.2 -Build-Depends: brotli -Description: font compression reference code diff --git a/ports/woff2/portfile.cmake b/ports/woff2/portfile.cmake index 41efbba0a207b4..7e71859bf04bd7 100644 --- a/ports/woff2/portfile.cmake +++ b/ports/woff2/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage( ONLY_STATIC_LIBRARY ) @@ -10,11 +8,15 @@ vcpkg_from_github( REF v1.0.2 SHA512 c788bba1530aec463e755e901f9342f4b599e3a07f54645fef1dc388ab5d5c30625535e5dd38e9e792e04a640574baa50eeefb6b7338ab403755f4a4e0c3044d HEAD_REF master + PATCHES + 0001-unofficial-brotli.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DCANONICAL_PREFIXES=ON ) vcpkg_install_cmake() diff --git a/ports/woff2/vcpkg.json b/ports/woff2/vcpkg.json new file mode 100644 index 00000000000000..122fc73cc10d32 --- /dev/null +++ b/ports/woff2/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "woff2", + "version-string": "1.0.2", + "port-version": 2, + "description": "font compression reference code", + "dependencies": [ + "brotli" + ] +} diff --git a/ports/wordnet/CMakeLists.txt b/ports/wordnet/CMakeLists.txt new file mode 100644 index 00000000000000..78a16c1d79d026 --- /dev/null +++ b/ports/wordnet/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required (VERSION 3.14) +project ("wordnet") +set (target_name ${CMAKE_PROJECT_NAME}) # CMAKE_PROJECT_NAME for the top-level project() call + +option (BUILD_SHARED_LIBS "Create ${target_name} as a shared library" OFF) +set (CMAKE_DEBUG_POSTFIX "d" CACHE STRING "postfix for debug lib") + +set (INCLUDE_DIR_BUILD "${CMAKE_CURRENT_LIST_DIR}/include") + +include (GNUInstallDirs) + +file (GLOB wordnet_headers ${INCLUDE_DIR_BUILD}/wn.h) +file (GLOB wordnet_srcs "lib/*.c") + +add_library (${target_name} ${wordnet_srcs} ${wordnet_headers}) + +target_include_directories (${target_name} + PRIVATE ${INCLUDE_DIR_BUILD} + PUBLIC $ +) + +set_target_properties(${target_name} PROPERTIES + C_STANDARD 11 +) + +target_compile_definitions(${PROJECT_NAME} PUBLIC DEFAULTPATH="${WORDNET_DICT_PATH}") + +if (MSVC) + set_target_properties(${target_name} PROPERTIES + VS_DEBUGGER_WORKING_DIRECTORY $ + COMPILE_FLAGS "/wd4996 /wd4267 /wd4244 /wd4047" + ) + target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${target_name}) +endif() + +install (TARGETS ${target_name} EXPORT ${target_name}-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + +install(FILES + ${wordnet_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${target_name} + CONFIGURATIONS Release +) + +install (EXPORT ${target_name}-targets + FILE ${target_name}-targets.cmake + NAMESPACE ${target_name}:: + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${target_name}" +) + +configure_file(${target_name}-config.cmake.in "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${target_name}-config.cmake" @ONLY) + +install(FILES + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${target_name}-config.cmake" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${target_name}" +) + +install(DIRECTORY + dict/ DESTINATION ${WORDNET_DICT_PATH} + CONFIGURATIONS Release +) +install(DIRECTORY + doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR} + CONFIGURATIONS Release +) diff --git a/ports/wordnet/fix_gobal_vars_uninit_local_ptr.patch b/ports/wordnet/fix_gobal_vars_uninit_local_ptr.patch new file mode 100644 index 00000000000000..8686779e73f077 --- /dev/null +++ b/ports/wordnet/fix_gobal_vars_uninit_local_ptr.patch @@ -0,0 +1,78 @@ +diff --git a/include/wn.h b/include/wn.h +index d3ffa08..8452377 100644 +--- a/include/wn.h ++++ b/include/wn.h +@@ -151,14 +151,6 @@ + #define PREDICATIVE PADJ + #define IMMED_POSTNOMINAL IPADJ + +-extern char *wnrelease; /* WordNet release/version number */ +- +-extern char *lexfiles[]; /* names of lexicographer files */ +-extern char *ptrtyp[]; /* pointer characters */ +-extern char *partnames[]; /* POS strings */ +-extern char partchars[]; /* single chars for each POS */ +-extern char *adjclass[]; /* adjective class strings */ +-extern char *frametext[]; /* text of verb frames */ + + /* Data structures used by search code functions. */ + +@@ -236,6 +228,21 @@ typedef struct { + + typedef SearchResults *SearchResultsPtr; + ++/* Make all the functions compatible with c++ files */ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++extern char* wnrelease; /* WordNet release/version number */ ++ ++extern char* lexfiles[]; /* names of lexicographer files */ ++extern char* ptrtyp[]; /* pointer characters */ ++extern char* partnames[]; /* POS strings */ ++extern char partchars[]; /* single chars for each POS */ ++extern char* adjclass[]; /* adjective class strings */ ++extern char* frametext[]; /* text of verb frames */ ++ ++ + /* Global variables and flags */ + + extern SearchResults wnresults; /* structure containing results of search */ +@@ -271,11 +278,6 @@ extern int default_display_message(char *); + extern int (*display_message)(char *); + + +-/* Make all the functions compatible with c++ files */ +-#ifdef __cplusplus +-extern "C" { +-#endif +- + /* External library function prototypes */ + + /*** Search and database functions (search.c) ***/ +diff --git a/lib/search.c b/lib/search.c +index 1cdedc3..72c4bb5 100644 +--- a/lib/search.c ++++ b/lib/search.c +@@ -1256,7 +1256,7 @@ static void add_relatives(int pos, IndexPtr idx, int rel1, int rel2) + { + int i; + struct relgrp *rel, *last, *r; +- ++ last = NULL; + /* If either of the new relatives are already in a relative group, + then add the other to the existing group (transitivity). + Otherwise create a new group and add these 2 senses to it. */ +@@ -1281,8 +1281,9 @@ static void add_relatives(int pos, IndexPtr idx, int rel1, int rel2) + rel->senses[rel1] = rel->senses[rel2] = 1; + if (rellist == NULL) + rellist = rel; +- else +- last->next = rel; ++ else if (last) { ++ last->next = rel; ++ } + } + + static struct relgrp *mkrellist(void) diff --git a/ports/wordnet/portfile.cmake b/ports/wordnet/portfile.cmake new file mode 100644 index 00000000000000..59ca6805105024 --- /dev/null +++ b/ports/wordnet/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(VERSION 3.0) + +vcpkg_download_distfile(ARCHIVE + URLS "http://wordnetcode.princeton.edu/${VERSION}/WordNet-${VERSION}.tar.gz" + FILENAME "wordnet-${VERSION}.tar.gz" + SHA512 9539bc016d710f31d65072bbf5068edffcd735978d8cc6f1b361b19428b97546ef6c7e246e1b6f2ff4557a0885a8305341e35173a6723f0740dda18d097ca248 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + fix_gobal_vars_uninit_local_ptr.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/wordnet-config.cmake.in DESTINATION ${SOURCE_PATH}) + +if("dbfiles" IN_LIST FEATURES) + vcpkg_download_distfile(WORDNET_DICT_DBFILES + URLS "http://wordnetcode.princeton.edu/wn3.1.dict.tar.gz" + FILENAME "wordnet-cache/wn3.1.dict.tar.gz" + SHA512 16dca17a87026d8a0b7b4758219cd21a869c3ef3da23ce7875924546f2eacac4c2f376cb271b798b2c458fe8c078fb43d681356e3d9beef40f4bd88d3579394f + ) + file(REMOVE_RECURSE "${SOURCE_PATH}/dict/") + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH WORDNET_DICT_DBFILES_EX + ARCHIVE ${WORDNET_DICT_DBFILES} + REF 3.1 + WORKING_DIRECTORY ${SOURCE_PATH} + ) + file(RENAME ${WORDNET_DICT_DBFILES_EX} "${SOURCE_PATH}/dict") +endif() + +set (WORDNET_DICT_PATH "${CURRENT_PACKAGES_DIR}/tools/${PORT}/dict") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DWORDNET_DICT_PATH=${WORDNET_DICT_PATH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wordnet RENAME copyright) + diff --git a/ports/wordnet/vcpkg.json b/ports/wordnet/vcpkg.json new file mode 100644 index 00000000000000..ffa68c3f26bfc9 --- /dev/null +++ b/ports/wordnet/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "wordnet", + "version-string": "3.0", + "port-version": 1, + "description": "WordNet is a large lexical database of English", + "features": { + "dbfiles": { + "description": "WordNet 3.1 database files" + } + } +} diff --git a/ports/wordnet/wordnet-config.cmake.in b/ports/wordnet/wordnet-config.cmake.in new file mode 100644 index 00000000000000..1de99b5e8d97d7 --- /dev/null +++ b/ports/wordnet/wordnet-config.cmake.in @@ -0,0 +1,14 @@ +# Config file for the wordnet package + +get_filename_component(_WORDNET_PREFIX_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) + +set (_TARGET_NAME "wordnet") + +set (WORDNET_DICT_PATH @WORDNET_DICT_PATH@) +message (STATUS "WORDNET_DICT_PATH: @WORDNET_DICT_PATH@") + +# IMPORTED targets for wordnet +include("${_WORDNET_PREFIX_DIR}/${_TARGET_NAME}-targets.cmake") + +set(_WORDNET_PREFIX_DIR) +set(_TARGET_NAME) diff --git a/ports/workflow/portfile.cmake b/ports/workflow/portfile.cmake new file mode 100644 index 00000000000000..7dfa7e906f8d87 --- /dev/null +++ b/ports/workflow/portfile.cmake @@ -0,0 +1,31 @@ +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sogou/workflow + REF v0.9.6-win + SHA512 ecbc641d9d7bae707387248060af91375cd0c80d50eee2ae1dd24f0f61eda0d3faf0ea835bf6a03a7d25b5708771c3e432b8ad135ae5d1620e705a1ef93bb84e + HEAD_REF windows + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sogou/workflow + REF v0.9.6 + SHA512 a9078223b3437bd73a3988310490ad867796707ccc25483120bca1249197a12abe07d09647df16f6efc63ba52b808d2bee8e2f2a10dd3e62335409fa06089621 + HEAD_REF master + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/workflow/vcpkg.json b/ports/workflow/vcpkg.json new file mode 100644 index 00000000000000..ba7f8f7baa7691 --- /dev/null +++ b/ports/workflow/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "workflow", + "version": "0.9.6", + "description": "About C++ Parallel Computing and Asynchronous Networking Engine", + "homepage": "https://github.com/sogou/workflow", + "dependencies": [ + "openssl" + ] +} diff --git a/ports/wpilib/CONTROL b/ports/wpilib/CONTROL deleted file mode 100644 index a7542e8b80fe4a..00000000000000 --- a/ports/wpilib/CONTROL +++ /dev/null @@ -1,12 +0,0 @@ -Source: wpilib -Version: 2019.5.1 -Build-Depends: libuv -Description: WPILib is the software library package for the FIRST Robotics Competition. The core install includes wpiutil, a common utilies library, and ntcore, the base NetworkTables library. - -Feature: cameraserver -Build-Depends: opencv -Description: Enables the CameraServer and CSCore libraries for manipulating USB Cameras and HTTP Camera Streams - -Feature: allwpilib -Build-Depends: wpilib[cameraserver] opencv -Description: Enables the simulation HAL, and the high level wpilibc library. diff --git a/ports/wpilib/portfile.cmake b/ports/wpilib/portfile.cmake index 314f0111b86069..cbe4051f75fec1 100644 --- a/ports/wpilib/portfile.cmake +++ b/ports/wpilib/portfile.cmake @@ -1,59 +1,54 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "OSX") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wpilibsuite/allwpilib - REF 3dfb01d45b971ffdfeea50ce58653eff592807d9 - SHA512 188923cbe166f5812a24a06d8af56bda289aaed38231d45583d423e51e9cd23bb257ade02fdc26e8d0fdd6cdcb793282c04ac80ebad76f29fdbd0a3c1a10f05c + REF 35eb90c135eba994a2ca2cbd50a68c367910f4b6 + SHA512 55bc608632ab67c097f3cce7c5ad9790b2b123a633c93bf5b4008f90bf79538cc142c911850d5f49b75e3a12f43ffad9f6f5f9bcdf1351cce7513ecc4b04e439 ) -set(WITHOUT_JAVA ON) -set(WITHOUT_CSCORE ON) -set(WITHOUT_ALLWPILIB ON) - -if ("cameraserver" IN_LIST FEATURES) - set(WITHOUT_CSCORE OFF) -endif() - -if ("allwpilib" IN_LIST FEATURES) - set(WITHOUT_ALLWPILIB OFF) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + cameraserver WITHOUT_CSCORE + allwpilib WITHOUT_ALLWPILIB +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DWITHOUT_JAVA=${WITHOUT_JAVA} - -DWITHOUT_CSCORE=${WITHOUT_CSCORE} - -DWITHOUT_ALLWPILIB=${WITHOUT_ALLWPILIB} + -DWITHOUT_JAVA=ON + ${FEATURE_OPTIONS} -DUSE_VCPKG_LIBUV=ON + -DUSE_VCPKG_EIGEN=ON -DFLAT_INSTALL_WPILIB=ON ) vcpkg_install_cmake() file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/ntcore/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/wpiutil/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -if (NOT WITHOUT_ALLWPILIB) -file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/wpilibc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/hal/gen/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/hal/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/gen) + +if ("allwpilib" IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/wpilibc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/hal/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/gen) endif() -if (NOT WITHOUT_CSCORE) -file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/cameraserver/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/cscore/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if ("cameraserver" IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/cameraserver/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/cscore/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) endif() if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") - file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll") + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") + file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll") - file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.so") - file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.so") + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.so") + file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.so") - file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dylib") - file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dylib") + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dylib") + file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dylib") endif() file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib") @@ -64,4 +59,4 @@ file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAG vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wpilib RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/wpilib/vcpkg.json b/ports/wpilib/vcpkg.json new file mode 100644 index 00000000000000..c96157cc6ad224 --- /dev/null +++ b/ports/wpilib/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "wpilib", + "version-string": "2020.3.2", + "port-version": 1, + "description": "WPILib is the software library package for the FIRST Robotics Competition. The core install includes wpiutil, a common utilies library, and ntcore, the base NetworkTables library.", + "homepage": "https://github.com/wpilibsuite/allwpilib", + "supports": "!osx", + "dependencies": [ + "eigen3", + "libuv" + ], + "features": { + "allwpilib": { + "description": "Enables the simulation HAL, and the high level wpilibc library.", + "dependencies": [ + "opencv", + { + "name": "wpilib", + "features": [ + "cameraserver" + ] + } + ] + }, + "cameraserver": { + "description": "Enables the CameraServer and CSCore libraries for manipulating USB Cameras and HTTP Camera Streams", + "dependencies": [ + "opencv" + ] + } + } +} diff --git a/ports/wren/CMakeLists.txt b/ports/wren/CMakeLists.txt new file mode 100644 index 00000000000000..b57a6a907527a4 --- /dev/null +++ b/ports/wren/CMakeLists.txt @@ -0,0 +1,50 @@ +# CMake taken from https://github.com/walterschell/wren/blob/cmake/CMakeLists.txt + +# Need transitive dependencies introduced in 2.8.12 +cmake_minimum_required(VERSION 2.8.12) + +project(Wren LANGUAGES "C") + +set(wren_warning_flags "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter") + +IF (WIN32) + ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS ) +ENDIF () + +set(opt_DIR "src/optional") +set(vm_DIR "src/vm") + +# TODO: Don't glob +file(GLOB opt_SRCS ${opt_DIR}/*.c) +file(GLOB vm_SRCS ${vm_DIR}/*.c) + +set(wren_SRCS ${vm_SRCS} ${opt_SRCS}) + +add_library(wren ${wren_SRCS}) + +target_include_directories(wren PUBLIC src/include PRIVATE src/vm src/optional) + +target_link_libraries(wren INTERFACE m) + +target_compile_options(wren PRIVATE "-Wall") + +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + target_compile_options(wren PUBLIC -DDEBUG) +endif() + + +INSTALL (TARGETS wren + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) + + +IF (NOT DEFINED SKIP_INSTALL_HEADERS) + INSTALL( + FILES + src/include/wren.h + src/include/wren.hpp + DESTINATION include + ) +ENDIF () diff --git a/ports/wren/portfile.cmake b/ports/wren/portfile.cmake new file mode 100644 index 00000000000000..dbd71b8df67090 --- /dev/null +++ b/ports/wren/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wren-lang/wren + REF d1a0d0682ac072fa20f2dcca356dac06565e93a1 + SHA512 d6b7555da10ea209d04308467563ec401f699a22ca8524e4ae65fd050b0403c5e70430047dbb6a883b8021ab50525c17bb63d76543e7c59dfe4b521cfde6c413 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOMPILE_AS_CPP=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/ports/wren/vcpkg.json b/ports/wren/vcpkg.json new file mode 100644 index 00000000000000..09f2b8aed7aece --- /dev/null +++ b/ports/wren/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "wren", + "version-string": "2019-07-01", + "port-version": 1, + "description": "Wren is a small, fast, class-based concurrent scripting language.", + "homepage": "https://github.com/wren-lang/wren" +} diff --git a/ports/wt/0003-disable-boost-autolink.patch b/ports/wt/0003-disable-boost-autolink.patch deleted file mode 100644 index 910fbf8006f921..00000000000000 --- a/ports/wt/0003-disable-boost-autolink.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 21dd691c8ac8d60f49cd051193402187f6912f92 Mon Sep 17 00:00:00 2001 -From: Robert Schumacher -Date: Fri, 23 Feb 2018 03:29:09 -0800 -Subject: [PATCH 3/3] disable boost autolink - - -diff --git a/cmake/WtFindBoost-cmake.txt b/cmake/WtFindBoost-cmake.txt -index b708803..b0c2846 100644 ---- a/cmake/WtFindBoost-cmake.txt -+++ b/cmake/WtFindBoost-cmake.txt -@@ -89,7 +89,7 @@ IF (Boost_FOUND) - SET(BOOST_WTHTTP_MT_FOUND TRUE) - SET(BOOST_WTHTTP_FOUND TRUE) - -- IF(MSVC) -+ IF(MSVC AND 0) - # use autolink - SET(BOOST_WT_LIBRARIES "") - SET(BOOST_WTHTTP_LIBRARIES "") --- -2.16.2.windows.1 - diff --git a/ports/wt/0004-link-ssl.patch b/ports/wt/0004-link-ssl.patch deleted file mode 100644 index 8579223dc0fa76..00000000000000 --- a/ports/wt/0004-link-ssl.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/cmake/WtFindSsl.txt b/cmake/WtFindSsl.txt -index c5f7bbc8..6e2c2f4d 100644 ---- a/cmake/WtFindSsl.txt -+++ b/cmake/WtFindSsl.txt -@@ -121,6 +121,16 @@ ELSEIF(APPLE) - /usr/local/lib - NO_DEFAULT_PATH - ) -+ FIND_LIBRARY(CRYPTO_LIB -+ NAMES -+ crypto -+ PATHS -+ ${SSL_PREFIX}/lib -+ ${SSL_PREFIX}/lib/VC -+ /usr/lib -+ /usr/local/lib -+ NO_DEFAULT_PATH -+ ) - ELSE (WIN32) - FIND_LIBRARY(SSL_LIB - NAMES -@@ -131,6 +141,15 @@ ELSE (WIN32) - /usr/lib - /usr/local/lib - ) -+ FIND_LIBRARY(CRYPTO_LIB -+ NAMES -+ crypto -+ PATHS -+ ${SSL_PREFIX}/lib -+ ${SSL_PREFIX}/lib/VC -+ /usr/lib -+ /usr/local/lib -+ ) - ENDIF (WIN32) - - IF(SSL_LIB -@@ -144,7 +163,7 @@ IF(SSL_LIB - ENDIF(SSL_TOO_LIB) - ELSE(WIN32) - SET(SSL_FOUND true) -- SET(SSL_LIBRARIES ${SSL_LIB} -lcrypto) -+ SET(SSL_LIBRARIES ${SSL_LIB} ${CRYPTO_LIB}) - ENDIF(WIN32) - ENDIF(SSL_LIB - AND SSL_INCLUDE_DIRS) diff --git a/ports/wt/0006-GraphicsMagick.patch b/ports/wt/0006-GraphicsMagick.patch new file mode 100644 index 00000000000000..2f1b50a60ced61 --- /dev/null +++ b/ports/wt/0006-GraphicsMagick.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5012cfd1b..95f812685 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -338,7 +338,7 @@ ELSE (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 8) + ENDIF (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 8) + + IF (${WT_WRASTERIMAGE_IMPLEMENTATION} STREQUAL "GraphicsMagick") +- IF (NOT GM_FOUND) ++ IF (0) + MESSAGE(FATAL_ERROR "WT_WRASTERIMAGE_IMPLEMENTATION set to GraphicsMagick but GM is not found. Indicate the location of your graphicsmagick library using -DGM_PREFIX=...") + ENDIF (NOT GM_FOUND) + SET(WT_HAS_WRASTERIMAGE true) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 78d82ee53..01ac5f42a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -595,8 +595,9 @@ ELSE(HAVE_HARU) + ENDIF(HAVE_HARU) + + IF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "GraphicsMagick") +- TARGET_LINK_LIBRARIES(wt PRIVATE ${GM_LIBRARIES}) +- INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS}) ++ find_package(unofficial-graphicsmagick REQUIRED) ++ TARGET_LINK_LIBRARIES(wt PRIVATE unofficial::graphicsmagick::graphicsmagick) ++ # INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS}) + ADD_DEFINITIONS(-DHAVE_GRAPHICSMAGICK) + ELSEIF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "skia") + TARGET_LINK_LIBRARIES(wt PRIVATE ${SKIA_LIBRARIES}) diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL deleted file mode 100644 index b712ca73887857..00000000000000 --- a/ports/wt/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: wt -Version: 4.0.5-1 -Homepage: https://github.com/emweb/wt -Description: Wt is a C++ library for developing web applications -Build-Depends: openssl, sqlite3, libpq, pango, glew, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic, boost-interprocess diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index bc39a7a642baa3..d7d70dab77e5ad 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -1,41 +1,69 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO emweb/wt - REF 4.0.5 - SHA512 5513b428bfd3e778726c947606677f3e0774b38e640e61cd94906a2e0c75d204a68072b54ddeb3614a7ba08f5668e6eb3a96d9c8df3744b09dc36ad9be12d924 + REF d3ee790da1826529e3d025d919f5c3608d029562 # 4.5.0 + SHA512 2fe66269bb59db81d3611f2857ac3ba0ae7448a54d216bd7aa72701f1e6e291a738421f460f4614198785bbd084ab1e19e84a3f67cbc15556015e2f259941f11 HEAD_REF master PATCHES 0002-link-glew.patch - 0003-disable-boost-autolink.patch - 0004-link-ssl.patch - 0005-XML_file_path.patch + 0005-XML_file_path.patch + 0006-GraphicsMagick.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIBS) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + dbo ENABLE_LIBWTDBO + postgresql ENABLE_POSTGRES + sqlite3 ENABLE_SQLITE + sqlserver ENABLE_MSSQLSERVER + openssl ENABLE_SSL +) + +if(VCPKG_TARGET_IS_WINDOWS) + set(WT_PLATFORM_SPECIFIC_OPTIONS + -DWT_WRASTERIMAGE_IMPLEMENTATION=Direct2D + -DCONNECTOR_ISAPI=ON + -DENABLE_PANGO=OFF) +else() + set(WT_PLATFORM_SPECIFIC_OPTIONS + -DCONNECTOR_FCGI=OFF + -DENABLE_PANGO=ON + -DHARFBUZZ_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/harfbuzz) + + if ("graphicsmagick" IN_LIST FEATURES) + list(APPEND WT_PLATFORM_SPECIFIC_OPTIONS + -DWT_WRASTERIMAGE_IMPLEMENTATION=GraphicsMagick) + else() + list(APPEND WT_PLATFORM_SPECIFIC_OPTIONS + -DWT_WRASTERIMAGE_IMPLEMENTATION=none) + endif() +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DINSTALL_CONFIG_FILE_PATH="${DOWNLOADS}/wt" + -DINSTALL_CONFIG_FILE_PATH="${DOWNLOADS}/wt" -DSHARED_LIBS=${SHARED_LIBS} - -DBOOST_DYNAMIC=ON + -DBOOST_DYNAMIC=${SHARED_LIBS} -DDISABLE_BOOST_AUTOLINK=ON -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF - -DENABLE_SSL=ON - -DENABLE_HARU=OFF - -DENABLE_PANGO=ON - -DENABLE_SQLITE=ON - -DENABLE_POSTGRES=ON - -DENABLE_FIREBIRD=OFF + -DCONNECTOR_HTTP=ON + -DENABLE_HARU=ON + -DHARU_DYNAMIC=${SHARED_LIBS} -DENABLE_MYSQL=OFF + -DENABLE_FIREBIRD=OFF -DENABLE_QT4=OFF - -DENABLE_LIBWTTEST=OFF + -DENABLE_QT5=OFF + -DENABLE_LIBWTTEST=ON -DENABLE_OPENGL=ON + ${FEATURE_OPTIONS} + ${WT_PLATFORM_SPECIFIC_OPTIONS} + -DUSE_SYSTEM_SQLITE3=ON -DUSE_SYSTEM_GLEW=ON @@ -51,5 +79,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/var) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/var) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wt RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/wt/vcpkg.json b/ports/wt/vcpkg.json new file mode 100644 index 00000000000000..7a92d9228ed5f2 --- /dev/null +++ b/ports/wt/vcpkg.json @@ -0,0 +1,107 @@ +{ + "name": "wt", + "version-string": "4.5.0", + "port-version": 1, + "description": "Wt is a C++ library for developing web applications", + "homepage": "https://github.com/emweb/wt", + "dependencies": [ + "boost-algorithm", + "boost-array", + "boost-asio", + "boost-bind", + "boost-config", + "boost-container-hash", + "boost-filesystem", + "boost-fusion", + "boost-interprocess", + "boost-lexical-cast", + "boost-logic", + "boost-math", + "boost-multi-index", + "boost-optional", + "boost-phoenix", + "boost-pool", + "boost-program-options", + "boost-range", + "boost-serialization", + "boost-smart-ptr", + "boost-spirit", + "boost-system", + "boost-thread", + "boost-tokenizer", + "boost-tuple", + "boost-ublas", + "boost-variant", + "glew", + { + "name": "harfbuzz", + "platform": "!windows" + }, + "libharu", + "libpng", + { + "name": "pango", + "platform": "!windows" + }, + "zlib" + ], + "default-features": [ + "openssl" + ], + "features": { + "dbo": { + "description": "Wt::Dbo" + }, + "graphicsmagick": { + "description": "WRasterImage support on non-Windows based on GraphicsMagick", + "dependencies": [ + "graphicsmagick" + ] + }, + "openssl": { + "description": "TLS support", + "dependencies": [ + "openssl" + ] + }, + "postgresql": { + "description": "Wt::Dbo PostgreSQL backend", + "dependencies": [ + "libpq", + { + "name": "wt", + "features": [ + "dbo" + ] + } + ] + }, + "sqlite3": { + "description": "Wt::Dbo Sqlite 3 backend", + "dependencies": [ + "sqlite3", + { + "name": "wt", + "features": [ + "dbo" + ] + } + ] + }, + "sqlserver": { + "description": "Wt::Dbo MS SQL Server backend", + "dependencies": [ + { + "name": "unixodbc", + "platform": "!windows" + }, + { + "name": "wt", + "features": [ + "dbo" + ] + } + ] + } + } +} diff --git a/ports/wtl/CONTROL b/ports/wtl/CONTROL deleted file mode 100644 index 126b4d7681c3d5..00000000000000 --- a/ports/wtl/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: wtl -Maintainer: jfrederich@gmail.com -Version: 10.0-2 -Homepage: https://sourceforge.net/projects/wtl/ -Description: Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. -Build-Depends: diff --git a/ports/wtl/portfile.cmake b/ports/wtl/portfile.cmake index 85cbca6e691971..4c1bb2b77ac348 100644 --- a/ports/wtl/portfile.cmake +++ b/ports/wtl/portfile.cmake @@ -1,16 +1,14 @@ -#header-only library -include(vcpkg_common_functions) -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/wtl/WTL%2010/WTL%2010.0.8356/WTL10_8356.zip" - FILENAME "WTL10_8356.zip" - SHA512 4eb24151f4009cdfebc17f08312cae65d46c8ea205ccc7b56f14c46b54d28d8d4e6290de3150e558dc076d7815a9dde2a8952695f46f4402c83b0da2bf65f241 +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO wtl/WTL%2010 + REF WTL%2010.0.10320%20Release + FILENAME "WTL10_10320_Release.zip" + NO_REMOVE_ONE_LEVEL + SHA512 086a6cf6a49a4318a8c519136ba6019ded7aa7f2c1d85f78c30b21183654537b3428a400a64fcdacba3a7a10a9ef05137b6f2119f59594da300d55f9ebfb1309 ) -vcpkg_extract_source_archive(${ARCHIVE}) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/Include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/wtl FILES_MATCHING PATTERN "*.h") +file(INSTALL ${SOURCE_PATH}/Include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT} FILES_MATCHING PATTERN "*.h") +file(COPY ${SOURCE_PATH}/Samples DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${SOURCE_PATH}/AppWizard DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/MS-PL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/wtl/MS-PL.txt ${CURRENT_PACKAGES_DIR}/share/wtl/copyright) - -file(COPY ${CURRENT_BUILDTREES_DIR}/src/Samples DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/AppWizard DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) +file(INSTALL ${SOURCE_PATH}/MS-PL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/wtl/vcpkg.json b/ports/wtl/vcpkg.json new file mode 100644 index 00000000000000..733316f0d96575 --- /dev/null +++ b/ports/wtl/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "wtl", + "version-string": "10.0.10320", + "port-version": 1, + "description": "Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components.", + "homepage": "https://sourceforge.net/projects/wtl/" +} diff --git a/ports/wxchartdir/CMakeLists.txt b/ports/wxchartdir/CMakeLists.txt new file mode 100644 index 00000000000000..3ad43897010bee --- /dev/null +++ b/ports/wxchartdir/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.13) +project(wxchartdir CXX) + +set(wxWidgets_EXCLUDE_COMMON_LIBRARIES TRUE) +find_package(wxWidgets REQUIRED COMPONENTS core base) +include(${wxWidgets_USE_FILE}) + +find_package(chartdir CONFIG REQUIRED) + +add_library(wxchartdir STATIC wxdemo/common/wxchartviewer.cpp) + +target_include_directories(wxchartdir PUBLIC + $ +) + +target_link_libraries(wxchartdir + PRIVATE ${wxWidgets_LIBRARIES} + PRIVATE chartdir +) + +install(TARGETS wxchartdir EXPORT wxchartdir-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(EXPORT wxchartdir-config DESTINATION share/cmake/wxchartdir) + +install(FILES wxdemo/common/mondrian.xpm DESTINATION include/wxchartdir) +install(FILES wxdemo/common/wxchartviewer.h DESTINATION include/wxchartdir) +install(FILES wxdemo/common/wxchartviewer_defs.h DESTINATION include/wxchartdir) +install(FILES wxdemo/common/wxchartviewer_version.h DESTINATION include/wxchartdir) +install(FILES wxdemo/common/wxchartviewer_version.rc DESTINATION include/wxchartdir) diff --git a/ports/wxchartdir/portfile.cmake b/ports/wxchartdir/portfile.cmake new file mode 100644 index 00000000000000..2947d7922d8391 --- /dev/null +++ b/ports/wxchartdir/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO utelle/wxchartdir + REF v1.0.0 + SHA512 018e588a4bcff594e0049c64597d55b680e58ae239822fcc20d415a1efd8a6b3c0c7c6c836969f01a378209307b9720b938e3826a31e18c843d52897b44b4818 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/wxchartdir) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/wxchartdir/copyright COPYONLY) + +file(COPY ${SOURCE_PATH}/CHARTDIRECTOR-LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/CHARTDIRECTOR-README.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/GPL-3.0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/LGPL-3.0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/LICENSE.spdx DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/WxWindows-exception-3.1.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) diff --git a/ports/wxchartdir/vcpkg.json b/ports/wxchartdir/vcpkg.json new file mode 100644 index 00000000000000..29f8cb251e9f47 --- /dev/null +++ b/ports/wxchartdir/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "wxchartdir", + "version": "1.0.0", + "port-version": 1, + "description": "wxChartDir provides components for the integration and use of the commercial C++ library ChartDirector, a universal chart component developed by Advanced Software Engineering Ltd, in wxWidgets based applications.", + "homepage": "https://github.com/utelle/wxchartdir", + "dependencies": [ + "chartdir", + "wxwidgets" + ] +} diff --git a/ports/wxwidgets/CONTROL b/ports/wxwidgets/CONTROL deleted file mode 100644 index 542fdf327693b8..00000000000000 --- a/ports/wxwidgets/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: wxwidgets -Version: 3.1.2-1 -Homepage: https://github.com/wxWidgets/wxWidgets -Description: wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. -Build-Depends: zlib, libpng, tiff, expat diff --git a/ports/wxwidgets/disable-platform-lib-dir.patch b/ports/wxwidgets/disable-platform-lib-dir.patch index 2a1de613eed16f..930477c010327d 100644 --- a/ports/wxwidgets/disable-platform-lib-dir.patch +++ b/ports/wxwidgets/disable-platform-lib-dir.patch @@ -1,13 +1,13 @@ diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake -index 06256b1..2960a31 100644 +index d013e92..c03135d 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake -@@ -66,7 +66,7 @@ else() +@@ -149,7 +149,7 @@ else() set(wxCOMPILER_PREFIX) endif() --if(MSVC OR MINGW) -+if((MSVC OR MINGW) AND NOT wxBUILD_DISABLE_PLATFORM_LIB_DIR) +-if(MSVC) ++if(MSVC AND NOT wxBUILD_DISABLE_PLATFORM_LIB_DIR) if(wxBUILD_SHARED) set(lib_suffix "dll") else() diff --git a/ports/wxwidgets/fix-build.patch b/ports/wxwidgets/fix-build.patch new file mode 100644 index 00000000000000..e47bc97e601572 --- /dev/null +++ b/ports/wxwidgets/fix-build.patch @@ -0,0 +1,13 @@ +diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake +index 06116384c7..f82ff941bb 100644 +--- a/build/cmake/functions.cmake ++++ b/build/cmake/functions.cmake +@@ -383,7 +383,7 @@ endmacro() + # Enable cotire for target, use optional second argument for prec. header + macro(wx_target_enable_precomp target_name) + target_compile_definitions(${target_name} PRIVATE WX_PRECOMP) +- if(NOT ${ARGV1} STREQUAL "") ++ if(${ARGC} GREATER 1 AND NOT ${ARGV1} STREQUAL "") + set_target_properties(${target_name} PROPERTIES + COTIRE_CXX_PREFIX_HEADER_INIT ${ARGV1}) + endif() diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index 7319f9749bb001..5b5ecd730724d9 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -1,18 +1,35 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "uwp") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wxWidgets/wxWidgets - REF v3.1.2 - SHA512 c6f8a6065e837e145633ddbd0e10910f32009900e1f7155abe0ef53b6fc83dceb9eaf6c56369d13b6526e4b8bd6073bbcbdb790d667c0dab381b67ec5d567f6f + REF 9c0a8be1dc32063d91ed1901fd5fcd54f4f955a1 #v3.1.5 + SHA512 33817f766b36d24e5e6f4eb7666f2e4c1ec305063cb26190001e0fc82ce73decc18697e8005da990a1c99dc1ccdac9b45bb2bbe5ba73e6e2aa860c768583314c HEAD_REF master - PATCHES disable-platform-lib-dir.patch + PATCHES + disable-platform-lib-dir.patch + fix-build.patch ) set(OPTIONS) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") +if(VCPKG_TARGET_IS_OSX) set(OPTIONS -DCOTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES=9999) endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + set(OPTIONS + -DwxUSE_OPENGL=OFF + -DwxUSE_STACKWALKER=OFF + ) +endif() + +# This may be set to ON by users in a custom triplet. +# wxUSE_STL=ON and wxUSE_STL=OFF are not API compatible which is why this must be set +# in a custom triplet rather than a port feature. +if(NOT DEFINED WXWIDGETS_USE_STL) + set(WXWIDGETS_USE_STL OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -23,15 +40,13 @@ vcpkg_configure_cmake( -DwxUSE_LIBJPEG=sys -DwxUSE_LIBPNG=sys -DwxUSE_LIBTIFF=sys - -DwxUSE_STL=ON -DwxBUILD_DISABLE_PLATFORM_LIB_DIR=ON + -DwxUSE_STL=${WXWIDGETS_USE_STL} ${OPTIONS} ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") if(DLLS) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) @@ -49,14 +64,48 @@ if(DLLS) endforeach() endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/docs/licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxwidgets) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/wxwidgets/licence.txt ${CURRENT_PACKAGES_DIR}/share/wxwidgets/copyright) - -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h ${CURRENT_PACKAGES_DIR}/include/wx/setup.h) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_copy_tools(TOOL_NAMES wxrc AUTO_CLEAN) +else() + vcpkg_copy_tools(TOOL_NAMES wxrc wx-config wxrc-3.1 AUTO_CLEAN) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/mswu) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/mswud) + +# do the copy pdbs now after the dlls got moved to the expected /bin folder above +vcpkg_copy_pdbs() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/msvc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB_RECURSE INCLUDES ${CURRENT_PACKAGES_DIR}/include/*.h) +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h) + list(APPEND INCLUDES ${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/mswud/wx/setup.h) + list(APPEND INCLUDES ${CURRENT_PACKAGES_DIR}/debug/lib/mswud/wx/setup.h) +endif() +foreach(INC IN LISTS INCLUDES) + file(READ "${INC}" _contents) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(WXUSINGDLL)" "0" _contents "${_contents}") + else() + string(REPLACE "defined(WXUSINGDLL)" "1" _contents "${_contents}") + endif() + # Remove install prefix from setup.h to ensure package is relocatable + string(REGEX REPLACE "\n#define wxINSTALL_PREFIX [^\n]*" "\n#define wxINSTALL_PREFIX \"\"" _contents "${_contents}") + file(WRITE "${INC}" "${_contents}") +endforeach() + +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/wx/setup.h) + file(GLOB_RECURSE WX_SETUP_H_FILES_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/*.h) + file(GLOB_RECURSE WX_SETUP_H_FILES_REL ${CURRENT_PACKAGES_DIR}/lib/*.h) + + string(REPLACE "${CURRENT_PACKAGES_DIR}/debug/lib/" "" WX_SETUP_H_FILES_DBG "${WX_SETUP_H_FILES_DBG}") + string(REPLACE "/setup.h" "" WX_SETUP_H_DBG_RELATIVE "${WX_SETUP_H_FILES_DBG}") + + string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/" "" WX_SETUP_H_FILES_REL "${WX_SETUP_H_FILES_REL}") + string(REPLACE "/setup.h" "" WX_SETUP_H_REL_RELATIVE "${WX_SETUP_H_FILES_REL}") + + configure_file(${CMAKE_CURRENT_LIST_DIR}/setup.h.in ${CURRENT_PACKAGES_DIR}/include/wx/setup.h @ONLY) +endif() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxwidgets) +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/wxwidgets/usage COPYONLY) +file(INSTALL ${SOURCE_PATH}/docs/licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/wxwidgets/setup.h.in b/ports/wxwidgets/setup.h.in new file mode 100644 index 00000000000000..ad9579727c031d --- /dev/null +++ b/ports/wxwidgets/setup.h.in @@ -0,0 +1,5 @@ +#ifdef _DEBUG +#include "../../debug/lib/@WX_SETUP_H_DBG_RELATIVE@/setup.h" +#else +#include "../../lib/@WX_SETUP_H_REL_RELATIVE@/setup.h" +#endif diff --git a/ports/wxwidgets/usage b/ports/wxwidgets/usage new file mode 100644 index 00000000000000..e873e4ae343aa8 --- /dev/null +++ b/ports/wxwidgets/usage @@ -0,0 +1,5 @@ +The package wxwidgets provides CMake integration: + + find_package(wxWidgets REQUIRED) + target_include_directories(main PRIVATE ${wxWidgets_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${wxWidgets_LIBRARIES}) diff --git a/ports/wxwidgets/vcpkg-cmake-wrapper.cmake b/ports/wxwidgets/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..55557b36097a05 --- /dev/null +++ b/ports/wxwidgets/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,25 @@ +set(wxWidgets_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." CACHE INTERNAL "" FORCE) +set(WX_ROOT_DIR "${wxWidgets_ROOT_DIR}") +set(wxWidgets_LIB_DIR "${wxWidgets_ROOT_DIR}/lib" CACHE INTERNAL "" FORCE) +set(WX_LIB_DIR "${wxWidgets_LIB_DIR}") +find_library(WX_based NAMES wxbase31ud PATHS "${wxWidgets_ROOT_DIR}/debug/lib" NO_DEFAULT_PATH) +file(GLOB WX_DEBUG_LIBS "${wxWidgets_ROOT_DIR}/debug/lib/wx*d_*.lib") +foreach(WX_DEBUG_LIB ${WX_DEBUG_LIBS}) + string(REGEX REPLACE ".*wx([^/]*)d_([^/\\.]*)\\.[^/\\.]*\$" "WX_\\2d" varname "${WX_DEBUG_LIB}") + set(${varname} "${WX_DEBUG_LIB}" CACHE INTERNAL "" FORCE) +endforeach() +_find_package(${ARGS}) +find_package(ZLIB QUIET) +find_package(libpng CONFIG QUIET) +find_package(TIFF QUIET) +find_package(expat CONFIG QUIET) + +if(wxWidgets_LIBRARIES AND NOT wxWidgets_LIBRARIES MATCHES "TIFF::TIFF;png;expat::expat;ZLIB::ZLIB") + list(APPEND wxWidgets_LIBRARIES "TIFF::TIFF;expat::expat;ZLIB::ZLIB") + + if (TARGET png) + list(APPEND wxWidgets_LIBRARIES "png") + elseif(TARGET png_static) + list(APPEND wxWidgets_LIBRARIES "png_static") + endif() +endif() diff --git a/ports/wxwidgets/vcpkg.json b/ports/wxwidgets/vcpkg.json new file mode 100644 index 00000000000000..540e2147fc7923 --- /dev/null +++ b/ports/wxwidgets/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "wxwidgets", + "version-semver": "3.1.5", + "port-version": 3, + "description": [ + "Widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. ", + "Set WXWIDGETS_USE_STL in a custom triplet to build with the wxUSE_STL build option." + ], + "homepage": "https://github.com/wxWidgets/wxWidgets", + "supports": "!uwp", + "dependencies": [ + "expat", + "libpng", + "tiff", + "zlib" + ] +} diff --git a/ports/x-plane/CONTROL b/ports/x-plane/CONTROL deleted file mode 100644 index a2b267ed0e47e7..00000000000000 --- a/ports/x-plane/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: x-plane -Version: 3.0.1 -Description: The X-Plane Plugin SDK. \ No newline at end of file diff --git a/ports/x-plane/portfile.cmake b/ports/x-plane/portfile.cmake index cfc5fedd3299ce..56ea2e77e82bad 100644 --- a/ports/x-plane/portfile.cmake +++ b/ports/x-plane/portfile.cmake @@ -1,43 +1,39 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_ARCH "x86" "arm" "arm64" "wasm32") -if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) - message(FATAL_ERROR "the x-plane SDK cannot be built for the x86 architecture") -endif() - -vcpkg_download_distfile( - OUT_SOURCE_PATH - URLS http://developer.x-plane.com/wp-content/plugins/code-sample-generation/sample_templates/XPSDK301.zip - FILENAME XPSDK301.zip - SHA512 3044d606039be8230f35a5992d322d4c009b4056f8fb17e929a9f5c2204c084e2c83ddad10801b21727645ec957c8942b83938f81256ec3778dbe75df525e62a -) - -vcpkg_extract_source_archive( - ${OUT_SOURCE_PATH} ${CURRENT_PACKAGES_DIR}/temp/ +vcpkg_download_distfile(ARCHIVE + URLS "http://developer.x-plane.com/wp-content/plugins/code-sample-generation/sample_templates/XPSDK303.zip" + FILENAME "XPSDK303.zip" + SHA512 23a1efc893fdb838ce90307ac2e1bf592b03880e9c7bf7aac51cf0d358816931b56a3d603e266f3c9041620190c689dc4d3b28b288bc39cf6e653db6f2125395 ) -file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug/lib +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} ) -file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/CHeaders/Widgets/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/CHeaders/Wrappers/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/CHeaders/XPLM/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +# create lib dir +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_OSX) + file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug/lib + ) +endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) -elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Mac/XPLM.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Mac/XPWidgets.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Mac/XPLM.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Mac/XPWidgets.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +# copy headers & sources +file(COPY ${SOURCE_PATH}/CHeaders/Widgets/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/CHeaders/Wrappers/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/CHeaders/XPLM/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# copy prebuilt libs +if(VCPKG_TARGET_IS_WINDOWS) + file(COPY ${SOURCE_PATH}/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +elseif (VCPKG_TARGET_IS_OSX) + file(COPY ${SOURCE_PATH}/Libraries/Mac/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Mac/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) endif() # Handle copyright -file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/x-plane/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/x-plane/license.txt ${CURRENT_PACKAGES_DIR}/share/x-plane/copyright) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/temp/) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/x-plane/vcpkg.json b/ports/x-plane/vcpkg.json new file mode 100644 index 00000000000000..4884ca8e8d0ceb --- /dev/null +++ b/ports/x-plane/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "x-plane", + "version-string": "3.0.3", + "description": "The X-Plane Plugin SDK", + "homepage": "https://developer.x-plane.com/sdk/", + "supports": "!(x86 | arm | wasm32)" +} diff --git a/ports/x264/CONTROL b/ports/x264/CONTROL deleted file mode 100644 index ef3e80bcb44bd0..00000000000000 --- a/ports/x264/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: x264 -Version: 157-303c484ec828ed0-2 -Homepage: https://github.com/mirror/x264 -Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format diff --git a/ports/x264/portfile.cmake b/ports/x264/portfile.cmake index 4dfb4368359d00..abd2f1d558a41f 100644 --- a/ports/x264/portfile.cmake +++ b/ports/x264/portfile.cmake @@ -1,7 +1,7 @@ -include(vcpkg_common_functions) - set(X264_VERSION 157) +vcpkg_fail_port_install(ON_ARCH "arm") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mirror/x264 @@ -12,116 +12,67 @@ vcpkg_from_github( "uwp-cflags.patch" ) -# Acquire tools -vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15) +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(${NASM_EXE_PATH}) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86 OR VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - vcpkg_find_acquire_program(NASM) - get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) - set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") +if(VCPKG_TARGET_IS_WINDOWS) + _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) + _vcpkg_determine_autotools_target_cpu(HOST_ARCH) + list(APPEND OPTIONS --build=${BUILD_ARCH}-pc-mingw32) + list(APPEND OPTIONS --host=${HOST_ARCH}-pc-mingw32) + set(ENV{AS} "${NASM}") endif() -# Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". -string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") -set(ENV{PATH} "${NEWPATH}") -set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) - -set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15) -#file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source) - -set(CONFIGURE_OPTIONS "--host=i686-pc-mingw32 --enable-strip --disable-lavf --disable-swscale --disable-avs --disable-ffms --disable-gpac --disable-lsmash") - -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x86 AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --disable-asm") +if(VCPKG_TARGET_IS_UWP) + list(APPEND OPTIONS --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00) + list(APPEND OPTIONS --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib) + list(APPEND OPTIONS --disable-asm) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-shared") - if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") - endif() -else() - set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-static") +if(VCPKG_TARGET_IS_LINUX) + list(APPEND OPTIONS --enable-pic) endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") - set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") -endif() +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + NO_ADDITIONAL_PATHS + OPTIONS + ${OPTIONS} + --enable-strip + --disable-lavf + --disable-swscale + --disable-avs + --disable-ffms + --disable-gpac + --disable-lsmash + --enable-debug -set(CONFIGURE_OPTIONS_RELEASE "--prefix=${CURRENT_PACKAGES_DIR}") -set(CONFIGURE_OPTIONS_DEBUG "--enable-debug --prefix=${CURRENT_PACKAGES_DIR}/debug") +) -if(VCPKG_CRT_LINKAGE STREQUAL "static") - set(X264_RUNTIME "-MT") -else() - set(X264_RUNTIME "-MD") -endif() +vcpkg_install_make() -# Configure release -message(STATUS "Configuring ${TARGET_TRIPLET}-rel") -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -set(ENV{CFLAGS} "${X264_RUNTIME} -O2 -Oi -Zi") -set(ENV{CXXFLAGS} "${X264_RUNTIME} -O2 -Oi -Zi") -set(ENV{LDFLAGS} "-DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF") -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c - "CC=cl ${SOURCE_PATH}/configure ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_RELEASE}" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - LOGNAME "configure-${TARGET_TRIPLET}-rel") -message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - -# Configure debug -message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -set(ENV{CFLAGS} "${X264_RUNTIME}d -Od -Zi -RTC1") -set(ENV{CXXFLAGS} "${X264_RUNTIME}d -Od -Zi -RTC1") -set(ENV{LDFLAGS} "-DEBUG") -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c - "CC=cl ${SOURCE_PATH}/configure ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEBUG}" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - LOGNAME "configure-${TARGET_TRIPLET}-dbg") -message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - -unset(ENV{CFLAGS}) -unset(ENV{CXXFLAGS}) -unset(ENV{LDFLAGS}) - -# Build release -message(STATUS "Package ${TARGET_TRIPLET}-rel") -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "make && make install" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - LOGNAME "build-${TARGET_TRIPLET}-rel") -message(STATUS "Package ${TARGET_TRIPLET}-rel done") - -# Build debug -message(STATUS "Package ${TARGET_TRIPLET}-dbg") -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "make && make install" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - LOGNAME "build-${TARGET_TRIPLET}-dbg") -message(STATUS "Package ${TARGET_TRIPLET}-dbg done") - -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x264) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x264.exe ${CURRENT_PACKAGES_DIR}/tools/x264/x264.exe) +if(NOT VCPKG_TARGET_IS_UWP) + vcpkg_copy_tools(TOOL_NAMES x264 AUTO_CLEAN) endif() -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/lib/pkgconfig - ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig - ${CURRENT_PACKAGES_DIR}/debug/bin/x264.exe - ${CURRENT_PACKAGES_DIR}/debug/include -) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") +if(VCPKG_TARGET_IS_WINDOWS) + set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x264.pc") + if(EXISTS "${pcfile}") + vcpkg_replace_string("${pcfile}" "-lx264" "-llibx264") + endif() + set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x264.pc") + if(EXISTS "${pcfile}") + vcpkg_replace_string("${pcfile}" "-lx264" "-llibx264") + endif() +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/lib/libx264.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.lib) -else() +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") # force U_STATIC_IMPLEMENTATION macro file(READ ${CURRENT_PACKAGES_DIR}/include/x264.h HEADER_CONTENTS) string(REPLACE "defined(U_STATIC_IMPLEMENTATION)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") @@ -133,7 +84,8 @@ else() ) endif() +vcpkg_fixup_pkgconfig() + vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/x264) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/x264/COPYING ${CURRENT_PACKAGES_DIR}/share/x264/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/x264/vcpkg.json b/ports/x264/vcpkg.json new file mode 100644 index 00000000000000..128d8ccf410125 --- /dev/null +++ b/ports/x264/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "x264", + "version-string": "157-303c484ec828ed0", + "port-version": 15, + "description": "x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format", + "homepage": "https://github.com/mirror/x264", + "supports": "!arm", + "dependencies": [ + { + "name": "pthread", + "platform": "linux & osx" + } + ] +} diff --git a/ports/x265/CONTROL b/ports/x265/CONTROL deleted file mode 100644 index fcfb78170b4f73..00000000000000 --- a/ports/x265/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: x265 -Version: 3.0-1 -Homepage: https://bitbucket.org/multicoreware/x265 -Description: x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream. diff --git a/ports/x265/disable-install-pdb.patch b/ports/x265/disable-install-pdb.patch index 4d57d764bd7f24..6826fe8558b6a8 100644 --- a/ports/x265/disable-install-pdb.patch +++ b/ports/x265/disable-install-pdb.patch @@ -2,7 +2,7 @@ diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 33b6523..06e3193 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt -@@ -559,13 +559,13 @@ endif() +@@ -580,13 +580,13 @@ endif() install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED)) if(MSVC_IDE) diff --git a/ports/x265/portfile.cmake b/ports/x265/portfile.cmake index 987e7224681968..8dd9dd1e348cd4 100644 --- a/ports/x265/portfile.cmake +++ b/ports/x265/portfile.cmake @@ -1,20 +1,15 @@ -include(vcpkg_common_functions) - -vcpkg_from_bitbucket( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO multicoreware/x265 - REF 3.0 - SHA512 698fd31bf30c65896717225de69714523bcbd3d835474f777bf32c3a6d6dbbf941a09db076e13e76917a5ca014c89fca924fcb0ea3d15bc09748b6fc834a4ba2 + REPO videolan/x265 + REF 07295ba7ab551bb9c1580fdaee3200f1b45711b7 #v3.4 + SHA512 21a4ef8733a9011eec8b336106c835fbe04689e3a1b820acb11205e35d2baba8c786d9d8cf5f395e78277f921857e4eb8622cf2ef3597bce952d374f7fe9ec29 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-install-pdb.patch + PATCHES + disable-install-pdb.patch ) set(ENABLE_ASSEMBLY OFF) -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (VCPKG_TARGET_IS_WINDOWS) vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") @@ -37,22 +32,65 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() # remove duplicated include files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +endif() +vcpkg_copy_tools(TOOL_NAMES x265 AUTO_CLEAN) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x265) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_IS_LINUX) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x265 ${CURRENT_PACKAGES_DIR}/tools/x265/x265) -elseif(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x265.exe ${CURRENT_PACKAGES_DIR}/tools/x265/x265.exe) +if(VCPKG_TARGET_IS_WINDOWS AND (NOT VCPKG_TARGET_IS_MINGW)) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static") + endif() + endif() endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +# maybe create vcpkg_regex_replace_string? + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(READ ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc _contents) + string(REGEX REPLACE "-l(std)?c\\+\\+" "" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc "${_contents}") +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc _contents) + string(REGEX REPLACE "-l(std)?c\\+\\+" "" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc "${_contents}") endif() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/x265) +if(VCPKG_TARGET_IS_MINGW AND ENABLE_SHARED) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libx265.a) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libx265.a) + endif() +endif() + +if(UNIX) + foreach(FILE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc") + if(EXISTS "${FILE}") + file(READ "${FILE}" _contents) + string(REPLACE " -lstdc++" "" _contents "${_contents}") + string(REPLACE " -lc++" "" _contents "${_contents}") + string(REPLACE " -lgcc_s" "" _contents "${_contents}") + string(REPLACE " -lgcc" "" _contents "${_contents}") + string(REPLACE " -lrt" "" _contents "${_contents}") + file(WRITE "${FILE}" "${_contents}") + endif() + endforeach() + vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES numa) +else() + vcpkg_fixup_pkgconfig() +endif() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/x265) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/x265/COPYING ${CURRENT_PACKAGES_DIR}/share/x265/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/x265/vcpkg.json b/ports/x265/vcpkg.json new file mode 100644 index 00000000000000..cc19a6f2b9ab02 --- /dev/null +++ b/ports/x265/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "x265", + "version-string": "3.4", + "port-version": 5, + "description": "x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.", + "homepage": "https://github.com/videolan/x265", + "supports": "!(uwp | arm)" +} diff --git a/ports/xalan-c/CONTROL b/ports/xalan-c/CONTROL deleted file mode 100644 index 6a6ead6ad63747..00000000000000 --- a/ports/xalan-c/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: xalan-c -Version: 1.11-7 -Homepage: https://github.com/apache/xalan-c -Description: Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types -Build-Depends: xerces-c diff --git a/ports/xalan-c/fix-linux-no-bin.patch b/ports/xalan-c/fix-linux-no-bin.patch new file mode 100644 index 00000000000000..3d468a1c58be96 --- /dev/null +++ b/ports/xalan-c/fix-linux-no-bin.patch @@ -0,0 +1,20 @@ +diff --git a/src/xalanc/Utils/CMakeLists.txt b/src/xalanc/Utils/CMakeLists.txt +index 2d78685..72b611b 100644 +--- a/src/xalanc/Utils/CMakeLists.txt ++++ b/src/xalanc/Utils/CMakeLists.txt +@@ -41,11 +41,15 @@ add_custom_target(locale ALL) + set_target_properties(locale PROPERTIES FOLDER "Message Library") + + # workaround for case of missing xerces-c dll ++if(CMAKE_HOST_WIN32) + if(EXISTS ${XercesC_INCLUDE_DIR}/../bin) + set(MsgCreator_WD $/../bin) + else() + set(MsgCreator_WD "${XSL_NLS_GEN_DIR}") + endif() ++else() ++ set(MsgCreator_WD "${PROJECT_BINARY_DIR}") ++endif() + + if(msgloader STREQUAL "inmemory") + add_custom_command( diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake index 0460c7464305d6..33f3edecd036f5 100644 --- a/ports/xalan-c/portfile.cmake +++ b/ports/xalan-c/portfile.cmake @@ -1,26 +1,29 @@ -include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/xalan-c - REF 177da75646a80fae2c22a315c0d987a5eadba143 - SHA512 e0f095b7031394c39c8e0fdca1f820c4222466f8c6e9df7bc40a21f9ca0e9291b7b6cdfb0a2d67db275ae97d7a7cdd447637102639e74716f0fb23a946b30ebe + REF 4055bb0c58e3053b04fcd0c68fdcda8f84411213 #1.12 + SHA512 0d591f5a07dbc69050c7b696189c46a32e6dd7a80a302fd38dcc82f9454688729e361c4d5c3b0aacfc3acc7df78c0981ba54eb3ce82b1ca6566a30aa19648280 PATCHES fix-win-deprecated-err.patch - fix-missing-dll-error.patch + fix-missing-dll-error.patch + fix-linux-no-bin.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON ) vcpkg_install_cmake() +vcpkg_copy_tools(TOOL_NAMES Xalan AUTO_CLEAN) if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) - vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xalan-c) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xalanc) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XalanC TARGET_PATH share/xalan-c) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XalanC TARGET_PATH share/xalanc) endif() # cleanup @@ -29,14 +32,7 @@ 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) -else() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/Xalan.exe ${CURRENT_PACKAGES_DIR}/debug/bin/Xalan.exe) -endif() - # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xalan-c) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/xalan-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/xalan-c/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/xalan-c/vcpkg.json b/ports/xalan-c/vcpkg.json new file mode 100644 index 00000000000000..faf80bf2bba6e0 --- /dev/null +++ b/ports/xalan-c/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "xalan-c", + "version": "1.12", + "description": "Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types", + "homepage": "https://github.com/apache/xalan-c", + "dependencies": [ + "xerces-c" + ] +} diff --git a/ports/xaudio2redist/portfile.cmake b/ports/xaudio2redist/portfile.cmake new file mode 100644 index 00000000000000..005791cc94a83c --- /dev/null +++ b/ports/xaudio2redist/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "${PORT} only supports Windows.") +endif() + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.nuget.org/api/v2/package/Microsoft.XAudio2.Redist/1.2.6" + FILENAME "xaudio2redist.1.2.6.zip" + SHA512 f9b0bacb5787e0239cbf1ffed8e1e8896aa32f69755b084995b2fd1bfe4d49a876d9a69e26469e8779a461e8ff74dc9d5ea86e1ff045dfe2770dfb08b8ba16c3 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH PACKAGE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +file(GLOB HEADER_FILES ${PACKAGE_PATH}/build/native/include/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +file(COPY ${PACKAGE_PATH}/build/native/release/lib/${VCPKG_TARGET_ARCHITECTURE}/xaudio2_9redist.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) +file(COPY ${PACKAGE_PATH}/build/native/debug/lib/${VCPKG_TARGET_ARCHITECTURE}/xaudio2_9redist.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) + +file(COPY ${PACKAGE_PATH}/build/native/release/lib/${VCPKG_TARGET_ARCHITECTURE}/xapobaseredist.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) +file(COPY ${PACKAGE_PATH}/build/native/debug/lib/${VCPKG_TARGET_ARCHITECTURE}/xapobaseredist.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +file(COPY ${PACKAGE_PATH}/build/native/release/lib/${VCPKG_TARGET_ARCHITECTURE}/xapobaseredist_md.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) +file(COPY ${PACKAGE_PATH}/build/native/debug/lib/${VCPKG_TARGET_ARCHITECTURE}/xapobaseredist_md.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) + +file(COPY ${PACKAGE_PATH}/build/native/release/bin/${VCPKG_TARGET_ARCHITECTURE}/xaudio2_9redist.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/) +file(COPY ${PACKAGE_PATH}/build/native/debug/bin/${VCPKG_TARGET_ARCHITECTURE}/xaudio2_9redist.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) + +file(INSTALL ${PACKAGE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xaudio2redist/vcpkg.json b/ports/xaudio2redist/vcpkg.json new file mode 100644 index 00000000000000..846499500a2d24 --- /dev/null +++ b/ports/xaudio2redist/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "xaudio2redist", + "version-string": "1.2.6", + "description": "Redistributable version of XAudio 2.9 for Windows 7 SP1 or later", + "homepage": "https://aka.ms/XAudio2Redist", + "supports": "windows & !arm & !uwp & !static" +} diff --git a/ports/xbyak/portfile.cmake b/ports/xbyak/portfile.cmake new file mode 100644 index 00000000000000..a2a06b1aa8c517 --- /dev/null +++ b/ports/xbyak/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO herumi/xbyak + REF 77ffe717376d194f1e5cc910bbd755d99bbba94e # 5.991 + cmake targets + SHA512 4e1ffa98dc63444aebf0a6e7a4ea57a9040cbf261f3a6fa43d23f0361cece71f1f4b597e95b6c85efbd4668e421081730b04ee924450ea0b0114923c36fc9c74 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xbyak/vcpkg.json b/ports/xbyak/vcpkg.json new file mode 100644 index 00000000000000..3f18d44c5c6abf --- /dev/null +++ b/ports/xbyak/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "xbyak", + "version-string": "5.991", + "description": "Xbyak is a JIT assembler for x86(IA-32)/x64(AMD64, x86-64).", + "homepage": "https://github.com/herumi/xbyak", + "supports": "!(arm | uwp)" +} diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL deleted file mode 100644 index 6a7b0d216d77c3..00000000000000 --- a/ports/xerces-c/CONTROL +++ /dev/null @@ -1,12 +0,0 @@ -Source: xerces-c -Version: 3.2.2-11 -Homepage: https://github.com/apache/xerces-c -Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. - -Feature: icu -Description: ICU support -Build-Depends: icu - -Feature: xmlch_wchar -Description: XMLCh type uses wchar_t - diff --git a/ports/xerces-c/no-symlinks-in-static-build.patch b/ports/xerces-c/no-symlinks-in-static-build.patch deleted file mode 100644 index 34bd732d3c8857..00000000000000 --- a/ports/xerces-c/no-symlinks-in-static-build.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index c29aa25..3106d77 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -1285,15 +1285,17 @@ if(MSVC) - set_target_properties(xerces-c PROPERTIES RUNTIME_OUTPUT_NAME "xerces-c_${INTERFACE_VERSION_U}") - set_target_properties(xerces-c PROPERTIES DEBUG_POSTFIX "D") - elseif(UNIX) -- # For strict libtool compatibility on Unix. It's a horrible hack to -- # set the version in the filename, and create the symlink at install -- # time. Note: could be dropped when the SONAME is updated and -- # libtool compatibility is no longer required. -- set_target_properties(xerces-c PROPERTIES OUTPUT_NAME "xerces-c-${INTERFACE_VERSION_D}") -- file(GENERATE -- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake" -- CONTENT "execute_process(COMMAND ln -sf \"$\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/libxerces-c.so\")") -- install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake") -+ if(BUILD_SHARED_LIBS) -+ # For strict libtool compatibility on Unix. It's a horrible hack to -+ # set the version in the filename, and create the symlink at install -+ # time. Note: could be dropped when the SONAME is updated and -+ # libtool compatibility is no longer required. -+ set_target_properties(xerces-c PROPERTIES OUTPUT_NAME "xerces-c-${INTERFACE_VERSION_D}") -+ file(GENERATE -+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake" -+ CONTENT "execute_process(COMMAND ln -sf \"$\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/libxerces-c.so\")") -+ install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake") -+ endif() - else() - # Not used for the common cases, though this would be the default if - # not for libtool compatibility. diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index 214cf971b7d3d9..18a29890b22317 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -1,22 +1,19 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/xerces-c - REF Xerces-C_3_2_2 - SHA512 66f60fe9194376ac0ca99d13ea5bce23ada86e0261dde30686c21ceb5499e754dab8eb0a98adadd83522bda62709377715501f6dac49763e3a686f9171cc63ea - HEAD_REF trunk + REF v3.2.3 + SHA512 aaafe2de4ea156d94e71e3631c79bd66660badf17bf2a19587a0ca34011f70bd1584a0beef909409a3ff05eecea9d37ffee6dbb267625f59217fd86705d2cd28 + HEAD_REF master PATCHES disable-tests.patch remove-dll-export-macro.patch - no-symlinks-in-static-build.patch ) set(DISABLE_ICU ON) if("icu" IN_LIST FEATURES) set(DISABLE_ICU OFF) endif() -if ("xmlch_wchar" IN_LIST FEATURES) +if ("xmlch-wchar" IN_LIST FEATURES) set(XMLCHTYPE -Dxmlch-type=wchar_t) endif() @@ -34,6 +31,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_copy_pdbs() + if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xercesc) else() @@ -57,14 +56,11 @@ configure_file( ${CURRENT_PACKAGES_DIR}/share/xercesc @ONLY ) - + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" ) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xerces-c) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/xerces-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/xerces-c/copyright) - -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xerces-c/vcpkg.json b/ports/xerces-c/vcpkg.json new file mode 100644 index 00000000000000..fb3ff4cab6bed4 --- /dev/null +++ b/ports/xerces-c/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "xerces-c", + "version-string": "3.2.3", + "port-version": 2, + "description": "Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs.", + "homepage": "https://github.com/apache/xerces-c", + "features": { + "icu": { + "description": "ICU support", + "dependencies": [ + "icu" + ] + }, + "xmlch-wchar": { + "description": "XMLCh type uses wchar_t" + } + } +} diff --git a/ports/xeus/CONTROL b/ports/xeus/CONTROL deleted file mode 100644 index c85f193c3b4d44..00000000000000 --- a/ports/xeus/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: xeus -Version: 0.19.2 -Description: C++ implementation of the Jupyter kernel protocol -Build-Depends: cppzmq, libuuid (linux), nlohmann-json, openssl, xtl, zeromq diff --git a/ports/xeus/Fix-Compile-nlohmann-json.patch b/ports/xeus/Fix-Compile-nlohmann-json.patch new file mode 100644 index 00000000000000..463c09170e01a7 --- /dev/null +++ b/ports/xeus/Fix-Compile-nlohmann-json.patch @@ -0,0 +1,12 @@ +diff --git a/src/xmessage.cpp b/src/xmessage.cpp +index 1ab9544..5a14ba0 100644 +--- a/src/xmessage.cpp ++++ b/src/xmessage.cpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "nlohmann/json.hpp" + diff --git a/ports/xeus/portfile.cmake b/ports/xeus/portfile.cmake index f040af0c73d1a5..85ffb5e8bd5834 100644 --- a/ports/xeus/portfile.cmake +++ b/ports/xeus/portfile.cmake @@ -1,21 +1,23 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO QuantStack/xeus - REF 4bc3d2017fcf35ee6e69babf9be1e463483cd11c - SHA512 6f68f564a3dfaab5fdfbf9778602c75c883d761e8dd00a4b19f3f57c16e87b8252d40479abdd8eedb350799479e3213f16010176da286e5c3e6c9b9e76e6793d + REF 0f6327a2782181e7ded9729abb32b7d8eb690aea # 0.24.3 + SHA512 2c0ccd1bebf487a9a73e73ecfb74b7605756652b2a84c71e739d7b2d8923960594c025e36d75cec850c5f0e38614a20299feccea6cfbe9ea0f66bdf315af02b4 HEAD_REF master + PATCHES + Fix-Compile-nlohmann-json.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DBUILD_EXAMPLES=OFF - -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DXEUS_BUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DXEUS_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DBUILD_TESTS=OFF -DDOWNLOAD_GTEST=OFF -DDISABLE_ARCH_NATIVE=OFF @@ -27,28 +29,20 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} -) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/share -) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/xeus/xeus.hpp "#ifdef XEUS_STATIC_LIB" "#if 1 // #ifdef XEUS_STATIC_LIB" ) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) # Install usage -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/xeus/vcpkg.json b/ports/xeus/vcpkg.json new file mode 100644 index 00000000000000..178c6e7163bf02 --- /dev/null +++ b/ports/xeus/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "xeus", + "version-string": "0.24.3", + "port-version": 1, + "description": "C++ implementation of the Jupyter kernel protocol", + "homepage": "https://github.com/jupyter-xeus/xeus", + "dependencies": [ + "cppzmq", + { + "name": "libuuid", + "platform": "linux" + }, + "nlohmann-json", + "openssl", + "xtl", + "zeromq" + ] +} diff --git a/ports/xframe/portfile.cmake b/ports/xframe/portfile.cmake new file mode 100644 index 00000000000000..cb3111bd984d20 --- /dev/null +++ b/ports/xframe/portfile.cmake @@ -0,0 +1,22 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xtensor-stack/xframe + REF 0.3.0 + SHA512 880fe8ca00bd189a197cc71e5f32539562db69433fdfa03db5f0db8211230db36eb96757a5ca3c667ae1d4edc96eae38393718e7a1e3f7c1827130cf21579b07 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/xframe) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xframe/vcpkg.json b/ports/xframe/vcpkg.json new file mode 100644 index 00000000000000..663ca1f2a3084e --- /dev/null +++ b/ports/xframe/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "xframe", + "version-string": "0.3.0", + "port-version": 1, + "description": "xframe is a dataframe for C++, based on xtensor and xtl.", + "homepage": "https://github.com/xtensor-stack/xframe", + "dependencies": [ + "xtensor", + "xtl" + ] +} diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL deleted file mode 100644 index b3fbc8422526bc..00000000000000 --- a/ports/xlnt/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: xlnt -Version: 1.3.0-2 -Homepage: https://github.com/tfussell/xlnt -Description: Cross-platform user-friendly xlsx library for C++14 diff --git a/ports/xlnt/fix-not-found-include.patch b/ports/xlnt/fix-not-found-include.patch new file mode 100644 index 00000000000000..a3068b14ce8c7c --- /dev/null +++ b/ports/xlnt/fix-not-found-include.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/XlntConfig.cmake.in b/cmake/XlntConfig.cmake.in +index 01fe4981..9cefa6e0 100644 +--- a/cmake/XlntConfig.cmake.in ++++ b/cmake/XlntConfig.cmake.in +@@ -7,7 +7,6 @@ + get_filename_component(XLNT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +-set_and_check(XLNT_INCLUDE_DIR "@XLNT_INCLUDE_INSTALL_DIR@") + + check_required_components(xlnt) + + if(NOT TARGET xlnt::xlnt) diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index 1e1a9cb435a5a5..29101c2010724d 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -1,30 +1,40 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO tfussell/xlnt - REF v1.3.0 - SHA512 716b93a6138daf1e293980a3c26801bfd00aa713afdd9cbe9be672ccff8c86b69b26eb0f3e8259bd0844e04d0e6148b64467d7db6815c76ecf412715d506786f - HEAD_REF master -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(STATIC OFF) -else() - set(STATIC ON) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DTESTS=OFF -DSAMPLES=OFF -DBENCHMARKS=OFF -DSTATIC=${STATIC} -) - -vcpkg_install_cmake() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) - -vcpkg_copy_pdbs() +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(win_patch "static-linking-for-windows.patch") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tfussell/xlnt + REF 568ac85346bc37757b0cd16464e7e1ea7656df91 # v1.5.0 + SHA512 414d691b372934326dc0da134eb7752c27c3223b6e92b433494d0758ca657f43b66894ad54ac97a8410387a2531a573c81572daa6a0434fa023e8e29ca74331c + HEAD_REF master + PATCHES + "fix-not-found-include.patch" + ${win_patch} +) +file(REMOVE "${SOURCE_PATH}/third-party/libstudxml/version") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(STATIC OFF) +else() + set(STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DTESTS=OFF -DSAMPLES=OFF -DBENCHMARKS=OFF -DSTATIC=${STATIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/xlnt) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/xlnt/static-linking-for-windows.patch b/ports/xlnt/static-linking-for-windows.patch new file mode 100644 index 00000000000000..603286cf9d75a9 --- /dev/null +++ b/ports/xlnt/static-linking-for-windows.patch @@ -0,0 +1,16 @@ +diff --git a/include/xlnt/xlnt.hpp b/include/xlnt/xlnt.hpp +index fdd33c38..0d21128f 100644 +--- a/include/xlnt/xlnt.hpp ++++ b/include/xlnt/xlnt.hpp +@@ -23,6 +23,11 @@ + + #pragma once + ++// Patched by vcpkg to handle static non-cmake builds ++#ifndef XLNT_STATIC ++#define XLNT_STATIC ++#endif ++ + #include + + // cell diff --git a/ports/xlnt/vcpkg.json b/ports/xlnt/vcpkg.json new file mode 100644 index 00000000000000..df61b6066421f2 --- /dev/null +++ b/ports/xlnt/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "xlnt", + "version": "1.5.0", + "port-version": 2, + "description": "Cross-platform user-friendly xlsx library for C++14", + "homepage": "https://github.com/tfussell/xlnt" +} diff --git a/ports/xlsxio/fix-dependencies.patch b/ports/xlsxio/fix-dependencies.patch new file mode 100644 index 00000000000000..7a02d8f9de7635 --- /dev/null +++ b/ports/xlsxio/fix-dependencies.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 490ee5c..05c7ee5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,9 +49,8 @@ IF(WITH_LIBZIP) + SET(ANYZIP_LIBRARIES ${LIBZIP_LIBRARIES}) + SET(ANYZIP_DEF USE_LIBZIP) + ELSE() +- FIND_PACKAGE(Minizip REQUIRED) +- SET(ANYZIP_INCLUDE_DIRS ${MINIZIP_INCLUDE_DIRS}) +- SET(ANYZIP_LIBRARIES ${MINIZIP_LIBRARIES}) ++ FIND_PACKAGE(minizip CONFIG REQUIRED) ++ SET(ANYZIP_LIBRARIES minizip::minizip) + SET(ANYZIP_DEF USE_MINIZIP) + ENDIF() + # dependancy: expat diff --git a/ports/xlsxio/portfile.cmake b/ports/xlsxio/portfile.cmake new file mode 100644 index 00000000000000..74b004755dc9da --- /dev/null +++ b/ports/xlsxio/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO brechtsanders/xlsxio + REF e3acace39e5fb153f5ce3500a4952c2bf93175bd + SHA512 8148b89c43cf45653c583d51fb8050714d3cd0a76ab9a05d46604f3671a06487e4fc58d3f6f9f2a9f9b57a9f9fe1863ef07017c74197f151390576c5aac360ea + HEAD_REF master + PATCHES fix-dependencies.patch +) + +file(REMOVE ${SOURCE_PATH}/CMake/FindMinizip.cmake) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + libzip WITH_LIBZIP +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC ON) + set(BUILD_SHARED OFF) +else() + set(BUILD_SHARED ON) + set(BUILD_STATIC OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_SHARED=${BUILD_SHARED} + -DBUILD_STATIC=${BUILD_STATIC} + -DWITH_WIDE=OFF + -DBUILD_DOCUMENTATION=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_PC_FILES=OFF + -DBUILD_TOOLS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xlsxio/vcpkg.json b/ports/xlsxio/vcpkg.json new file mode 100644 index 00000000000000..bc61d92e4176c8 --- /dev/null +++ b/ports/xlsxio/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "xlsxio", + "version-date": "2021-03-24", + "description": "Cross-platform C library for reading values from and writing values to .xlsx files", + "homepage": "https://github.com/brechtsanders/xlsxio", + "dependencies": [ + "expat", + { + "name": "minizip", + "features": [ + "bzip2" + ] + } + ] +} diff --git a/ports/xmlsec/0001-uwp-fix.patch b/ports/xmlsec/0001-uwp-fix.patch deleted file mode 100644 index f48cbf589c0b48..00000000000000 --- a/ports/xmlsec/0001-uwp-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/src/dl.c b/src/dl.c -index b13f9d4..4a1b0c1 100644 ---- a/src/dl.c -+++ b/src/dl.c -@@ -148,7 +148,14 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) { - #endif /* XMLSEC_DL_LIBLTDL */ - - #ifdef XMLSEC_DL_WIN32 -- lib->handle = LoadLibraryA((char*)lib->filename); -+#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP -+ lib->handle = LoadLibraryA((char*)lib->filename); -+#else -+ LPTSTR wcLib = NULL; -+ wcLib = xmlSecWin32ConvertUtf8ToTstr((char*)lib->filename); -+ if (wcLib) -+ lib->handle = LoadPackagedLibrary(wcLib, 0); -+#endif - if(lib->handle == NULL) { - xmlSecIOError("LoadLibraryA", lib->filename, NULL); - xmlSecCryptoDLLibraryDestroy(lib); diff --git a/ports/xmlsec/CMakeLists.txt b/ports/xmlsec/CMakeLists.txt index 75b10f88765869..cf019d51c670df 100644 --- a/ports/xmlsec/CMakeLists.txt +++ b/ports/xmlsec/CMakeLists.txt @@ -1,14 +1,11 @@ cmake_minimum_required (VERSION 3.8) -project (xmlsec C) +project (xmlsec1 C) option(INSTALL_HEADERS_TOOLS "Install public header files and tools" ON) -set(CMAKE_SHARED_LIBRARY_PREFIX) -set(CMAKE_STATIC_LIBRARY_PREFIX) - find_package(LibXml2 REQUIRED) find_package(OpenSSL REQUIRED) -find_package(unofficial-iconv REQUIRED) +find_package(Iconv REQUIRED) FILE(GLOB SOURCESXMLSEC src/*.c @@ -58,20 +55,23 @@ if(MSVC) add_compile_options(/wd4130 /wd4127 /wd4152) endif() -add_library(libxmlsec ${SOURCESXMLSEC}) -add_library(libxmlsec-openssl ${SOURCESXMLSECOPENSSL}) +set(CMAKE_SHARED_LIBRARY_PREFIX "lib") +set(CMAKE_STATIC_LIBRARY_PREFIX "lib") + +add_library(xmlsec1 ${SOURCESXMLSEC}) +add_library(xmlsec1-openssl ${SOURCESXMLSECOPENSSL}) include_directories(${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBXML2_INCLUDE_DIRS}) -target_link_libraries(libxmlsec PRIVATE +target_link_libraries(xmlsec1 PRIVATE ${LIBXML2_LIBRARIES} OpenSSL::SSL ) -target_link_libraries(libxmlsec-openssl PRIVATE - ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec +target_link_libraries(xmlsec1-openssl PRIVATE + ${LIBXML2_LIBRARIES} OpenSSL::SSL xmlsec1 ) add_compile_definitions(inline=__inline) -add_compile_definitions(PACKAGE="xmlsec") +add_compile_definitions(PACKAGE="xmlsec1") add_compile_definitions(XMLSEC_MSCRYPTO_NT4=1) add_compile_definitions(HAVE_STDIO_H) add_compile_definitions(HAVE_STDLIB_H) @@ -89,27 +89,33 @@ add_compile_definitions(_UNICODE) add_compile_definitions(_MBCS) add_compile_definitions(_REENTRANT) -target_compile_definitions(libxmlsec-openssl PRIVATE +target_compile_definitions(xmlsec1-openssl PRIVATE -DXMLSEC_CRYPTO_OPENSSL ) -set_target_properties(libxmlsec PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}) -set_target_properties(libxmlsec-openssl PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}) +set_target_properties(xmlsec1 PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}) +set_target_properties(xmlsec1-openssl PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}) if(NOT BUILD_SHARED_LIBS) - target_compile_definitions(libxmlsec PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING) - target_compile_definitions(libxmlsec-openssl PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING) + set(XMLSEC_CORE_CFLAGS "-DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING") + set(XMLSEC_OPENSSL_CFLAGS ${XMLSEC_CORE_CFLAGS}) else() - target_compile_definitions(libxmlsec PRIVATE -DXMLSEC_DL_WIN32) - target_compile_definitions(libxmlsec-openssl PRIVATE -DXMLSEC_DL_WIN32) + set(XMLSEC_CORE_CFLAGS "-DXMLSEC_DL_WIN32") + set(XMLSEC_OPENSSL_CFLAGS ${XMLSEC_CORE_CFLAGS}) endif() -install(TARGETS libxmlsec libxmlsec-openssl +target_compile_definitions(xmlsec1 PRIVATE ${XMLSEC_CORE_CFLAGS}) +target_compile_definitions(xmlsec1-openssl PRIVATE ${XMLSEC_OPENSSL_CFLAGS}) + +install(TARGETS xmlsec1 xmlsec1-openssl + EXPORT xmlsecExport RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) +install(EXPORT xmlsecExport FILE xmlsec-config.cmake DESTINATION share/xmlsec) + if(INSTALL_HEADERS_TOOLS) file(GLOB PUBLIC_HEADERS include/xmlsec/*.h @@ -136,9 +142,12 @@ if(INSTALL_HEADERS_TOOLS) endif() target_link_libraries(xmlsec PRIVATE - ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec libxmlsec-openssl unofficial::iconv::libiconv + ${LIBXML2_LIBRARIES} OpenSSL::SSL xmlsec1 xmlsec1-openssl ) - + if(NOT Iconv_IS_BUILT_IN) + target_link_libraries(xmlsec PRIVATE Iconv::Iconv) + endif() + target_compile_definitions(xmlsec PRIVATE -DXMLSEC_CRYPTO_OPENSSL ) @@ -146,7 +155,28 @@ if(INSTALL_HEADERS_TOOLS) if(BUILD_SHARED_LIBS) target_compile_definitions(xmlsec PRIVATE -DXMLSEC_CRYPTO_DYNAMIC_LOADING) else() + find_package(Threads REQUIRED) target_compile_definitions(xmlsec PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC) + target_link_libraries(xmlsec PUBLIC Threads::Threads) endif() install(TARGETS xmlsec DESTINATION tools/xmlsec) endif() + +message(STATUS "Generating pkgconfig files") + +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${prefix}) +set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR}) +set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) +set(VERSION ${XMLSEC_VERSION}) +set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING}) +set(OPENSSL_LIBS "-lssl -lcrypto") +set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1") +set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl") +set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1") +set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}") + +configure_file(${PROJECT_SOURCE_DIR}/xmlsec.pc.in ${PROJECT_BINARY_DIR}/xmlsec1.pc @ONLY) +configure_file(${PROJECT_SOURCE_DIR}/xmlsec-openssl.pc.in ${PROJECT_BINARY_DIR}/xmlsec1-openssl.pc @ONLY) +install(FILES ${PROJECT_BINARY_DIR}/xmlsec1.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) +install(FILES ${PROJECT_BINARY_DIR}/xmlsec1-openssl.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) diff --git a/ports/xmlsec/CONTROL b/ports/xmlsec/CONTROL deleted file mode 100644 index ea122c78e2d17d..00000000000000 --- a/ports/xmlsec/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: xmlsec -Version: 1.2.28 -Homepage: https://www.aleksey.com/xmlsec/ -Description: XML Security Library is a C library based on LibXML2. The library supports major XML security standards. -Build-Depends: libxml2, openssl diff --git a/ports/xmlsec/pkgconfig_fixes.patch b/ports/xmlsec/pkgconfig_fixes.patch new file mode 100644 index 00000000000000..c923ea59765156 --- /dev/null +++ b/ports/xmlsec/pkgconfig_fixes.patch @@ -0,0 +1,21 @@ +diff --git a/xmlsec-openssl.pc.in b/xmlsec-openssl.pc.in +index af3ae29..40635cf 100644 +--- a/xmlsec-openssl.pc.in ++++ b/xmlsec-openssl.pc.in +@@ -8,5 +8,4 @@ Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards + Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@ + Cflags: @XMLSEC_OPENSSL_CFLAGS@ +-Cflags.private: -DXMLSEC_STATIC + Libs: @XMLSEC_OPENSSL_LIBS@ +diff --git a/xmlsec.pc.in b/xmlsec.pc.in +index 2d5a3ad..0f72d68 100644 +--- a/xmlsec.pc.in ++++ b/xmlsec.pc.in +@@ -7,5 +7,5 @@ Name: xmlsec1 + Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards + Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@ +-Cflags: -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 @XMLSEC_CORE_CFLAGS@ ++Cflags: @XMLSEC_CORE_CFLAGS@ + Libs: -L${libdir} @XMLSEC_CORE_LIBS@ diff --git a/ports/xmlsec/portfile.cmake b/ports/xmlsec/portfile.cmake index 4a29ae19ab4364..280f9aea7448e9 100644 --- a/ports/xmlsec/portfile.cmake +++ b/ports/xmlsec/portfile.cmake @@ -1,13 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lsh123/xmlsec - REF xmlsec-1_2_28 - SHA512 fb0c775f6455ce5a5579a69bb91d60fe90c023e538c32bdf2a70aa413a53b22ef938349a3ce6b42bb23f8f70b4e00f1b9917f877487bb1507c927ec70c3d95f5 + REF xmlsec-1_2_32 + SHA512 45e2efc6bdf6ec09db6ff01b521c3fbcf44aa9804d5692bea5296e80d7fc2f05fac322868f82840a7b67e0abd4233222098aa94a29ec9a6a7d049180cf131c57 HEAD_REF master PATCHES - 0001-uwp-fix.patch + pkgconfig_fixes.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -21,6 +19,8 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_fixup_pkgconfig() file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xmlsec/vcpkg.json b/ports/xmlsec/vcpkg.json new file mode 100644 index 00000000000000..0d2c235da2d803 --- /dev/null +++ b/ports/xmlsec/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "xmlsec", + "version": "1.2.32", + "description": "XML Security Library is a C library based on LibXML2. The library supports major XML security standards.", + "homepage": "https://www.aleksey.com/xmlsec/", + "dependencies": [ + "libxml2", + "openssl" + ] +} diff --git a/ports/xmsh/CONTROL b/ports/xmsh/CONTROL deleted file mode 100644 index 7f53c582ca6fe7..00000000000000 --- a/ports/xmsh/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: xmsh -Version: 0.4.1 -Description: Reference Implementation of XMSH Library -Build-Depends: tl-expected diff --git a/ports/xmsh/portfile.cmake b/ports/xmsh/portfile.cmake index 285205b61d8949..7d74e7da9cd9dd 100644 --- a/ports/xmsh/portfile.cmake +++ b/ports/xmsh/portfile.cmake @@ -1,13 +1,15 @@ -include(vcpkg_common_functions) - vcpkg_find_acquire_program(PYTHON3) -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO libxmsh/xmsh - REF v0.4.1 - SHA512 7bd9fe9e565b33722fec37a7e3d9bd8b7b132692add5d26e31954367fb284b49a26a21532ddcb0e425af7f8208e755f21f2d8de81b33ed2a1149724f4ccd2c38 - HEAD_REF master +vcpkg_fail_port_install(ON_TARGET "Windows") +message("Building with a gcc version less than 7.1.0 is not supported.") + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO libxmsh/xmsh + REF e1900845b796ef977db70519b2ac08eebd788236 + SHA512 643c6c94956de9b6fae635b6528e8ba756f4a2bc38de71613c2dd8d47f4a043aee7b6e7fec1870b306be3bea9f5c0c81d1d343bfc27883b3fba986fbc5b15406 + HEAD_REF master ) vcpkg_configure_cmake( @@ -17,8 +19,14 @@ vcpkg_configure_cmake( -DPYTHON3_EXECUTABLE=${PYTHON3} ) +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYPATH ${PYTHON3} PATH) +set(ENV{PATH} "$ENV{PATH};${PYPATH}") + vcpkg_install_cmake() +vcpkg_copy_pdbs() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -26,4 +34,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/copyright.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xmsh/vcpkg.json b/ports/xmsh/vcpkg.json new file mode 100644 index 00000000000000..fedee5f028236e --- /dev/null +++ b/ports/xmsh/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "xmsh", + "version-string": "0.5.2", + "port-version": 2, + "description": "Reference Implementation of XMSH Library", + "homepage": "https://gitlab.com/libxmsh/xmsh", + "dependencies": [ + "nlohmann-json", + "tl-expected" + ] +} diff --git a/ports/xnnpack/portfile.cmake b/ports/xnnpack/portfile.cmake new file mode 100644 index 00000000000000..28abad2a4039e1 --- /dev/null +++ b/ports/xnnpack/portfile.cmake @@ -0,0 +1,33 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/XNNPACK + REF 5223fd1922d9d965ddb07865d1d13293069fab65 # 2021-05-17 + SHA512 5c1eb9171a046c683d5a96ae70b6dab36c415c981e8f29857d16ad67afa22681f0fe6f7623527200fd954403d50b036bb2892ba44e397d639860b9ec4873e7c6 + HEAD_REF master + PATCHES + use-packages.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DXNNPACK_USE_SYSTEM_LIBS=ON + -DXNNPACK_ENABLE_ASSEMBLY=ON + -DXNNPACK_ENABLE_MEMOPT=ON + -DXNNPACK_ENABLE_SPARSE=ON + -DXNNPACK_BUILD_TESTS=OFF + -DXNNPACK_BUILD_BENCHMARKS=OFF +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/share +) diff --git a/ports/xnnpack/use-packages.patch b/ports/xnnpack/use-packages.patch new file mode 100644 index 00000000000000..17d274c994ca82 --- /dev/null +++ b/ports/xnnpack/use-packages.patch @@ -0,0 +1,90 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b69ce50c..1e8938b7 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3042,7 +3032,7 @@ ELSE() + ENDIF() + ENDIF() + +-TARGET_INCLUDE_DIRECTORIES(XNNPACK PUBLIC include) ++TARGET_INCLUDE_DIRECTORIES(XNNPACK PUBLIC $ $) + TARGET_INCLUDE_DIRECTORIES(XNNPACK PRIVATE src) + IF(WIN32) + # Target Windows 7+ API +@@ -3057,7 +3047,7 @@ IF(LIBM) + ENDIF() + + # ---[ Configure clog +-IF(NOT TARGET clog) ++IF(FALSE) + IF(NOT XNNPACK_USE_SYSTEM_LIBS) + SET(CLOG_BUILD_TESTS OFF CACHE BOOL "") + SET(CLOG_RUNTIME_TYPE "${CPUINFO_RUNTIME_TYPE}" CACHE STRING "") +@@ -3075,10 +3065,9 @@ IF(NOT TARGET clog) + SET_PROPERTY(TARGET clog PROPERTY IMPORTED_LOCATION "${CLOG_LIBRARY}") + ENDIF() + ENDIF() +-TARGET_LINK_LIBRARIES(XNNPACK PRIVATE clog) + + # ---[ Configure cpuinfo +-IF(NOT TARGET cpuinfo) ++IF(FALSE) + IF(NOT XNNPACK_USE_SYSTEM_LIBS) + SET(CPUINFO_BUILD_TOOLS OFF CACHE BOOL "") + SET(CPUINFO_BUILD_UNIT_TESTS OFF CACHE BOOL "") +@@ -3096,10 +3085,11 @@ IF(NOT TARGET cpuinfo) + SET_PROPERTY(TARGET cpuinfo PROPERTY IMPORTED_LOCATION "${CPUINFO_LIBRARY}") + ENDIF() + ENDIF() +-TARGET_LINK_LIBRARIES(XNNPACK PRIVATE cpuinfo) ++find_package(unofficial-cpuinfo CONFIG REQUIRED) ++target_link_libraries(XNNPACK PUBLIC unofficial::cpuinfo::clog unofficial::cpuinfo::cpuinfo) + + # ---[ Configure pthreadpool +-IF(NOT TARGET pthreadpool) ++IF(FALSE) + IF(NOT XNNPACK_USE_SYSTEM_LIBS) + SET(PTHREADPOOL_BUILD_TESTS OFF CACHE BOOL "") + SET(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE BOOL "") +@@ -3119,7 +3109,7 @@ ENDIF() + TARGET_LINK_LIBRARIES(XNNPACK PUBLIC pthreadpool) + + # ---[ Configure FXdiv +-IF(NOT TARGET fxdiv) ++IF(FALSE) + IF(NOT XNNPACK_USE_SYSTEM_LIBS) + SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "") + SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") +@@ -3135,10 +3125,11 @@ IF(NOT TARGET fxdiv) + SET_PROPERTY(TARGET fxdiv PROPERTY LINKER_LANGUAGE C) + ENDIF() + ENDIF() +-TARGET_LINK_LIBRARIES(XNNPACK PRIVATE fxdiv) ++find_path(FXDIV_INCLUDE_DIRS "fxdiv.h") ++target_include_directories(XNNPACK PRIVATE ${FXDIV_INCLUDE_DIRS}) + + # ---[ Configure FP16 +-IF(NOT TARGET fp16) ++IF(FALSE) + IF(NOT XNNPACK_USE_SYSTEM_LIBS) + SET(FP16_BUILD_TESTS OFF CACHE BOOL "") + SET(FP16_BUILD_BENCHMARKS OFF CACHE BOOL "") +@@ -3154,12 +3145,17 @@ IF(NOT TARGET fp16) + SET_PROPERTY(TARGET fp16 PROPERTY LINKER_LANGUAGE C) + ENDIF() + ENDIF() +-TARGET_LINK_LIBRARIES(XNNPACK PRIVATE fp16) ++find_path(FP16_INCLUDE_DIRS "fp16.h") ++target_include_directories(XNNPACK PRIVATE ${FP16_INCLUDE_DIRS}) + + INSTALL(TARGETS XNNPACK ++ EXPORT xnnpack-config ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(EXPORT xnnpack-config NAMESPACE unofficial:: ++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/xnnpack) + + # ---[ XNNPACK unit tests + IF(XNNPACK_BUILD_TESTS) diff --git a/ports/xnnpack/vcpkg.json b/ports/xnnpack/vcpkg.json new file mode 100644 index 00000000000000..cb0339e2829053 --- /dev/null +++ b/ports/xnnpack/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "xnnpack", + "version-date": "2021-05-17", + "port-version": 1, + "description": "High-efficiency floating-point neural network inference operators for mobile, server, and Web", + "homepage": "https://github.com/google/XNNPACK", + "supports": "!(arm & windows) & !uwp", + "dependencies": [ + "cpuinfo", + "fp16", + "fxdiv", + "pthreadpool", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/xorstr/CONTROL b/ports/xorstr/CONTROL deleted file mode 100644 index f3555680cb5b88..00000000000000 --- a/ports/xorstr/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: xorstr -Version: 2019-08-10 -Description: Heavily vectorized c++17 compile time string encryption -Homepage: https://github.com/JustasMasiulis/xorstr diff --git a/ports/xorstr/portfile.cmake b/ports/xorstr/portfile.cmake index 3d97ba190c8ecc..3a227fcbe7be49 100644 --- a/ports/xorstr/portfile.cmake +++ b/ports/xorstr/portfile.cmake @@ -1,16 +1,11 @@ -# header-only library - -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO JustasMasiulis/xorstr - REF 5d7371dcb70601ce9c252d475cc3dc6cf8f1e0db - SHA512 7625d2ebdb95a5414f0a1ac7ac8951b612d5159be5eccce4e13b88a4d17ffa3c65ff81ce5df5b64064b5712da7238ec1f564d2c213852731cad30c367ebad72e + REF 42464c4fc1c32cb0d15f3656b30bfb38d9b65fc7 + SHA512 e8d6ed2ed64bbd11ca304b6c8a6c2dd14544cedc8b8f7364ef8c34af374ebee76bfddd97258b7ff024f6d9929800158d1b3897d64c2b74d8c6f6f105d2844a1c HEAD_REF master ) file(COPY ${SOURCE_PATH}/include/xorstr.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -# Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/xorstr/vcpkg.json b/ports/xorstr/vcpkg.json new file mode 100644 index 00000000000000..05ce8862e66c93 --- /dev/null +++ b/ports/xorstr/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "xorstr", + "version-date": "2020-11-29", + "description": "Heavily vectorized c++17 compile time string encryption", + "homepage": "https://github.com/JustasMasiulis/xorstr" +} diff --git a/ports/xproperty/CONTROL b/ports/xproperty/CONTROL deleted file mode 100644 index ba2ed12ab6f463..00000000000000 --- a/ports/xproperty/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: xproperty -Version: 0.8.1 -Build-Depends: xtl -Description: Traitlets-like C++ properties and implementation of the observer pattern diff --git a/ports/xproperty/portfile.cmake b/ports/xproperty/portfile.cmake index 8a415f2a16d237..364f95c50f1f56 100644 --- a/ports/xproperty/portfile.cmake +++ b/ports/xproperty/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO QuantStack/xproperty diff --git a/ports/xproperty/vcpkg.json b/ports/xproperty/vcpkg.json new file mode 100644 index 00000000000000..31b7c10940884f --- /dev/null +++ b/ports/xproperty/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "xproperty", + "version-string": "0.8.1", + "port-version": 1, + "description": "Traitlets-like C++ properties and implementation of the observer pattern", + "dependencies": [ + "xtl" + ] +} diff --git a/ports/xsimd/CONTROL b/ports/xsimd/CONTROL deleted file mode 100644 index dc442f85886648..00000000000000 --- a/ports/xsimd/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: xsimd -Version: 7.2.3-2 -Description: Modern, portable C++ wrappers for SIMD intrinsics -Homepage: https://github.com/QuantStack/xsimd - -Feature: xcomplex -Description: xtl complex support -Build-Depends: xtl diff --git a/ports/xsimd/portfile.cmake b/ports/xsimd/portfile.cmake index ab293c4081e923..b487d350cc5851 100644 --- a/ports/xsimd/portfile.cmake +++ b/ports/xsimd/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO QuantStack/xsimd - REF 7.2.3 - SHA512 fb34eeb585f6820499734f10f03a4efd0d9a9b4be56f9bee21f3564eb92be56e7abe7682e476fafaff4733939f33f91cb4ab9209140b19f7b740538853433532 + REPO xtensor-stack/xsimd + REF 0c8e9e7b67369003ba291a3df8060d605ae3bd4f # 7.4.9 + SHA512 6c22c3a349ff1aa495d0aa66c0159539e10e1b9418eb4c4b7b1b42ce36a8a33e87cc93484daadae7b837f72fb20429ef50461316c6107b2b68c969323d68bcf9 HEAD_REF master ) @@ -30,8 +28,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xsimd/vcpkg.json b/ports/xsimd/vcpkg.json new file mode 100644 index 00000000000000..239aa1315044c8 --- /dev/null +++ b/ports/xsimd/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "xsimd", + "version-string": "7.4.9", + "port-version": 1, + "description": "Modern, portable C++ wrappers for SIMD intrinsics", + "homepage": "https://github.com/xtensor-stack/xsimd", + "features": { + "xcomplex": { + "description": "xtl complex support", + "dependencies": [ + "xtl" + ] + } + } +} diff --git a/ports/xtensor-blas/CONTROL b/ports/xtensor-blas/CONTROL deleted file mode 100644 index 1779f176019797..00000000000000 --- a/ports/xtensor-blas/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: xtensor-blas -Version: 0.16.1 -Description: BLAS extension to xtensor -Build-Depends: xtensor diff --git a/ports/xtensor-blas/portfile.cmake b/ports/xtensor-blas/portfile.cmake index 000a567a3f37c1..e805340e8a0bd6 100644 --- a/ports/xtensor-blas/portfile.cmake +++ b/ports/xtensor-blas/portfile.cmake @@ -1,12 +1,10 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO QuantStack/xtensor-blas - REF 0.16.1 - SHA512 3bdbd48b74d7be0b9f4ad2d435789e266b3cc1e043bbe73739978678bd1ca81504a688cdd80c03667305d210d299127be9939333c9bd0ac27dff0423ccb4861d + REPO xtensor-stack/xtensor-blas + REF 2876b041a2759f10dfde13ab3a2fc09578ae4b40 # 0.17.2 + SHA512 64c78d093f24fc15715bc7dfa486cfb1342a6752ea497f43553d031fc8be30718d01157e5b6412c516e6ce2be9045a89963d912e60f4eb7431675331b8ed6f90 HEAD_REF master ) @@ -31,8 +29,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xflens/cxxblas/netlib) -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xtensor-blas/vcpkg.json b/ports/xtensor-blas/vcpkg.json new file mode 100644 index 00000000000000..cdf9ce55ca7643 --- /dev/null +++ b/ports/xtensor-blas/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "xtensor-blas", + "version-string": "0.17.2", + "port-version": 1, + "description": "BLAS extension to xtensor", + "homepage": "https://github.com/xtensor-stack/xtensor-blas", + "dependencies": [ + "xtensor" + ] +} diff --git a/ports/xtensor-fftw/portfile.cmake b/ports/xtensor-fftw/portfile.cmake new file mode 100644 index 00000000000000..e22efc2e345b2d --- /dev/null +++ b/ports/xtensor-fftw/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xtensor-stack/xtensor-fftw + REF 29f0442c98f1a219e970c96e99d7be8a42954a0b + SHA512 09b02fe6b906cde2a7f9071673a140c994316d50aaf639eb402706aaa52b66e73bc77fa1beb683d3740914ff5157283891634a806809c03f12c1def85b49595a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOMPILE_WARNINGS=OFF + -DBUILD_TESTS=OFF + -DDOWNLOAD_GTEST=OFF + -DBUILD_BENCHMARK=OFF + -DDOWNLOAD_GBENCHMARK=OFF + -DBENCHMARK_ENABLE_TESTING=OFF + -DDEFAULT_COLUMN_MAJOR=OFF + -DCOVERAGE=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xtensor-fftw/vcpkg.json b/ports/xtensor-fftw/vcpkg.json new file mode 100644 index 00000000000000..22d6e69a88e7e2 --- /dev/null +++ b/ports/xtensor-fftw/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "xtensor-fftw", + "version-string": "2019-11-30", + "port-version": 1, + "description": "FFTW bindings for the xtensor C++14 multi-dimensional array library", + "homepage": "https://github.com/xtensor-stack/xtensor-fftw", + "dependencies": [ + "fftw3", + "xtensor" + ] +} diff --git a/ports/xtensor-io/CONTROL b/ports/xtensor-io/CONTROL deleted file mode 100644 index 734c0becf9a175..00000000000000 --- a/ports/xtensor-io/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: xtensor-io -Version: 0.7.0 -Description: xtensor plugin to read and write images, audio files, numpy (compressed) npz and HDF5 -Build-Depends: xtensor, xtl - diff --git a/ports/xtensor-io/portfile.cmake b/ports/xtensor-io/portfile.cmake index d8cc89a0923581..d1f1bb1a03cb7e 100644 --- a/ports/xtensor-io/portfile.cmake +++ b/ports/xtensor-io/portfile.cmake @@ -1,31 +1,25 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO QuantStack/xtensor-io - REF 0.7.0 - SHA512 6c8416c595d022ed60cd802deec6d63128d205d6fd13962098b6242ace4fa9e61122e5b05837a1aab3b64bc042da7cbf2f72f2328155c342de3a6db741d4d4ee + REPO xtensor-stack/xtensor-io + REF 2bc048b3f34731385f29e2f3b307103ee6d4e5ab # 0.12.8 + SHA512 d7c5c85489aea9b9d8af7ee33a43dd8ab888e7f03da8b533ace39e143f89acbae4fe88bb10253931a3cc44041e1532bd76483686f7f20c00e2850647a574349c HEAD_REF master ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE OPTIONS -DBUILD_TESTS=OFF -DDOWNLOAD_GTEST=OFF -DDOWNLOAD_GBENCHMARK=OFF + -DHAVE_HighFive=OFF ) -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/xtensor-io/vcpkg.json b/ports/xtensor-io/vcpkg.json new file mode 100644 index 00000000000000..403c06c79d18bb --- /dev/null +++ b/ports/xtensor-io/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "xtensor-io", + "version": "0.12.8", + "description": "xtensor plugin to read and write images, audio files, numpy (compressed) npz and HDF5", + "homepage": "https://github.com/xtensor-stack/xtensor-io", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "xtensor", + "xtl" + ] +} diff --git a/ports/xtensor/CONTROL b/ports/xtensor/CONTROL deleted file mode 100644 index 14df243d9c5aba..00000000000000 --- a/ports/xtensor/CONTROL +++ /dev/null @@ -1,13 +0,0 @@ -Source: xtensor -Version: 0.20.7-2 -Description: C++ tensors with broadcasting and lazy computing -Homepage: https://quantstack.net/xtensor -Build-Depends: nlohmann-json, xtl - -Feature: xsimd -Description: xtensor with xsimd support -Build-Depends: xsimd - -Feature: tbb -Description: xtensor with tbb support -Build-Depends: tbb diff --git a/ports/xtensor/portfile.cmake b/ports/xtensor/portfile.cmake index d30743a408ee7e..a9be2459d94a0b 100644 --- a/ports/xtensor/portfile.cmake +++ b/ports/xtensor/portfile.cmake @@ -1,18 +1,17 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO QuantStack/xtensor - REF 0.20.7 - SHA512 de09900d0934f9b10453f16e43d1c3af28503f365224f9c6789b88a0cf00db820ca31e12099df1a2e3aafa73d7d83223df82f01b7611c1addb48367f936e5122 + REPO xtensor-stack/xtensor + REF f3c11b2d810159e7063daddeaa0764f4006e5a73 # 0.23.10 + SHA512 85d94a3e346a13f8d802260e7b182a34f83ed7adddb5c082f10fdaac995ba5b895ea20daf33ac99d3f44e9eb95fdc4ec051eb006259258c4c2ae762c5f08399f HEAD_REF master ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - xsimd XTENSOR_USE_XSIMD - tbb XTENSOR_USE_TBB + FEATURES + xsimd XTENSOR_USE_XSIMD + tbb XTENSOR_USE_TBB ) vcpkg_configure_cmake( @@ -36,8 +35,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xtensor/vcpkg.json b/ports/xtensor/vcpkg.json new file mode 100644 index 00000000000000..439e46066c058d --- /dev/null +++ b/ports/xtensor/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "xtensor", + "version": "0.23.10", + "description": "C++ tensors with broadcasting and lazy computing", + "homepage": "https://github.com/xtensor-stack/xtensor", + "dependencies": [ + "nlohmann-json", + "xtl" + ], + "features": { + "tbb": { + "description": "xtensor with tbb support", + "dependencies": [ + "tbb" + ] + }, + "xsimd": { + "description": "xtensor with xsimd support", + "dependencies": [ + "xsimd" + ] + } + } +} diff --git a/ports/xtl/CONTROL b/ports/xtl/CONTROL deleted file mode 100644 index 423ee09dc4577d..00000000000000 --- a/ports/xtl/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: xtl -Version: 0.6.4 -Build-Depends: nlohmann-json -Description: The x template library. diff --git a/ports/xtl/fix-fixup-cmake.patch b/ports/xtl/fix-fixup-cmake.patch new file mode 100644 index 00000000000000..9bc25bf0ba95d3 --- /dev/null +++ b/ports/xtl/fix-fixup-cmake.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cbc6651..4e31f71 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,7 +122,7 @@ install(FILES ${XTL_HEADERS} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/xtl) + endif() + +-set(XTL_CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME}" CACHE ++set(XTL_CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" CACHE + STRING "install path for xtlConfig.cmake") + + configure_package_config_file(${PROJECT_NAME}Config.cmake.in +@@ -157,4 +157,4 @@ configure_file(${PROJECT_NAME}.pc.in + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" + @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" +- DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig/") ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/") diff --git a/ports/xtl/portfile.cmake b/ports/xtl/portfile.cmake index 0b3b5dad1ccc15..6dd16a174a88d3 100644 --- a/ports/xtl/portfile.cmake +++ b/ports/xtl/portfile.cmake @@ -1,13 +1,13 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO QuantStack/xtl - REF 0.6.4 - SHA512 92ff932634a88fee9bfd27d092ebdf91752d90be8a4f3fc41aef90c195718c989082e53f1fcfae9d67b153ecd29d3dde6f8e2b540eeec0db1d0d229a9b0d2fe8 + REPO xtensor-stack/xtl + REF e0f00666d90086bb245ae73abb6123d0e2c1b30b # 0.7.2 + SHA512 d7a552dc4e43a3270a56c57fde8fdc48a108909d4fa1e3fdd7ab12b178b3e271ed4d89aac9fd184e2739ddacfb3b5cb248538ed50a0ba56e740875c0faf5aa62 HEAD_REF master + PATCHES + fix-fixup-cmake.patch ) vcpkg_configure_cmake( @@ -22,7 +22,8 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/xtl/vcpkg.json b/ports/xtl/vcpkg.json new file mode 100644 index 00000000000000..3570c661fd2425 --- /dev/null +++ b/ports/xtl/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "xtl", + "version": "0.7.2", + "description": "The x template library", + "homepage": "https://github.com/xtensor-stack/xtl", + "dependencies": [ + "nlohmann-json" + ] +} diff --git a/ports/xxhash/CONTROL b/ports/xxhash/CONTROL deleted file mode 100644 index be4cc2900c2e8b..00000000000000 --- a/ports/xxhash/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: xxhash -Version: 0.7.0 -Homepage: https://github.com/Cyan4973/xxHash -Description: Extremely fast hash algorithm diff --git a/ports/xxhash/fix-arm-uwp.patch b/ports/xxhash/fix-arm-uwp.patch deleted file mode 100644 index 51bbc74748aab9..00000000000000 --- a/ports/xxhash/fix-arm-uwp.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/xxh3.h b/xxh3.h -index 0972c46..e5c7101 100644 ---- a/xxh3.h -+++ b/xxh3.h -@@ -40,7 +40,7 @@ - #ifndef XXH3_H - #define XXH3_H - -- -+#pragma warning (disable : 4146) - /* === Dependencies === */ - - #undef XXH_INLINE_ALL /* in case it's already defined */ -@@ -97,7 +97,7 @@ - #endif - - /* U64 XXH_mult32to64(U32 a, U64 b) { return (U64)a * (U64)b; } */ --#ifdef _MSC_VER -+#if defined(_MSC_VER) && (!_WIN32_WINNT >= 0x0A00) - # include - /* MSVC doesn't do a good job with the mull detection. */ - # define XXH_mult32to64 __emulu -diff --git a/xxhsum.c b/xxhsum.c -index 0ec11c0..7d39c24 100644 ---- a/xxhsum.c -+++ b/xxhsum.c -@@ -31,6 +31,7 @@ - #ifndef XXHASH_C_2097394837 - #define XXHASH_C_2097394837 - -+#pragma warning (disable : 4146) - /* ************************************ - * Compiler Options - **************************************/ diff --git a/ports/xxhash/portfile.cmake b/ports/xxhash/portfile.cmake index 74b19715f160f4..817a557c25ad71 100644 --- a/ports/xxhash/portfile.cmake +++ b/ports/xxhash/portfile.cmake @@ -1,27 +1,30 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cyan4973/xxHash - REF a728fc9fe895460ff0e5f1efc2ce233d2095fd20 - SHA512 7795be00054d5f7abf4afab5912cc532bfc47f0bc8278cf09a44feb854f11e921d3d43e734efda1edbae0722450e4f9f02eeb5954220293eac930b4fa13ff737 + REF 94e5f23e736f2bb67ebdf90727353e65344f9fc0 # v0.8.0 + SHA512 367c82b37fd188890574446a7c237294a4a9ba038aff9a19a5d5d119058df74c089c682e9abad3281d5e14020c08834666343b2ea18378f400c8a0ee640098b8 HEAD_REF dev - PATCHES fix-arm-uwp.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + xxhsum XXHASH_BUILD_XXHSUM ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake_unofficial PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} ) vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/xxHash TARGET_PATH share/${PORT}) + +if("xxhsum" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES xxhsum AUTO_CLEAN) +endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xxhash) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/xxhash/LICENSE ${CURRENT_PACKAGES_DIR}/share/xxhash/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/xxhash/vcpkg.json b/ports/xxhash/vcpkg.json new file mode 100644 index 00000000000000..3337184136eae1 --- /dev/null +++ b/ports/xxhash/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "xxhash", + "version-string": "0.8.0", + "port-version": 2, + "description": "Extremely fast hash algorithm", + "homepage": "https://github.com/Cyan4973/xxHash", + "features": { + "xxhsum": { + "description": "Build the xxhsum binary" + } + } +} diff --git a/ports/yajl/CONTROL b/ports/yajl/CONTROL deleted file mode 100644 index 6811dc84af43e9..00000000000000 --- a/ports/yajl/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: yajl -Version: 2.1.0-1 -Description: Yet Another JSON Library diff --git a/ports/yajl/portfile.cmake b/ports/yajl/portfile.cmake index 92742e0a775bcb..c01987dee9fe93 100644 --- a/ports/yajl/portfile.cmake +++ b/ports/yajl/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lloyd/yajl diff --git a/ports/yajl/vcpkg.json b/ports/yajl/vcpkg.json new file mode 100644 index 00000000000000..7d05045ab23362 --- /dev/null +++ b/ports/yajl/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "yajl", + "version-string": "2.1.0", + "port-version": 2, + "description": "Yet Another JSON Library" +} diff --git a/ports/yaml-cpp/0001-noexcept.patch b/ports/yaml-cpp/0001-noexcept.patch deleted file mode 100644 index e5e1882c0412bb..00000000000000 --- a/ports/yaml-cpp/0001-noexcept.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/include/yaml-cpp/exceptions.h b/include/yaml-cpp/exceptions.h -index 9c96859..a6045ee 100644 ---- a/include/yaml-cpp/exceptions.h -+++ b/include/yaml-cpp/exceptions.h -@@ -15,7 +15,7 @@ - - // This is here for compatibility with older versions of Visual Studio - // which don't support noexcept --#ifdef _MSC_VER -+#if defined(_MSC_VER) && _MSC_VER < 1900 - #define YAML_CPP_NOEXCEPT _NOEXCEPT - #else - #define YAML_CPP_NOEXCEPT noexcept -diff --git a/src/exceptions.cpp b/src/exceptions.cpp -index 9b6d891..931b4bc 100644 ---- a/src/exceptions.cpp -+++ b/src/exceptions.cpp -@@ -2,7 +2,7 @@ - - // This is here for compatibility with older versions of Visual Studio - // which don't support noexcept --#ifdef _MSC_VER -+#if defined(_MSC_VER) && _MSC_VER < 1900 - #define YAML_CPP_NOEXCEPT _NOEXCEPT - #else - #define YAML_CPP_NOEXCEPT noexcept diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL deleted file mode 100644 index 93988ece9e7791..00000000000000 --- a/ports/yaml-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: yaml-cpp -Version: 0.6.2-2 -Homepage: https://github.com/jbeder/yaml-cpp -Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 6233bc07681918..de519bd6018984 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -1,68 +1,42 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jbeder/yaml-cpp - REF yaml-cpp-0.6.2 - SHA512 fea8ce0a20a00cbc75023d1db442edfcd32d0ac57a3c41b32ec8d56f87cc1d85d7dd7a923ce662f5d3a315f91a736d6be0d649997acd190915c1d68cc93795e4 + REF 0579ae3d976091d7d664aa9d2527e0d0cff25763 # yaml-cpp-0.7.0 + SHA512 930f13737c23faf06be3fa9821492d6c677359e532212ced495173367a8aec45f87fbf3a5da47d4d1b61a95c25e0101bc7f8d175752434c63b25e097186e1745 HEAD_REF master - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-noexcept.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" YAML_BUILD_SHARED_LIBS) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DYAML_CPP_BUILD_TOOLS=OFF -DYAML_CPP_BUILD_TESTS=OFF + -DYAML_BUILD_SHARED_LIBS=${YAML_BUILD_SHARED_LIBS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/yaml-cpp) - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/yaml-cpp) -endif() -# Adjust paths and remove hardcoded ones from the config files -file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-config.cmake YAML_CONFIG) -string(REPLACE "set(YAML_CPP_INCLUDE_DIR \"\${YAML_CPP_CMAKE_DIR}/../include\")" - "set(YAML_CPP_INCLUDE_DIR \"\${YAML_CPP_CMAKE_DIR}/../../include\")" YAML_CONFIG "${YAML_CONFIG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-config.cmake "${YAML_CONFIG}") - -file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets.cmake YAML_CONFIG) -string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" -"get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH) -get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH) -get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" YAML_CONFIG "${YAML_CONFIG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets.cmake "${YAML_CONFIG}") - -set(_targets_cmake_conf) +vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/${PORT}) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - list(APPEND _targets_cmake_conf "debug") -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - list(APPEND _targets_cmake_conf "release") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/yaml-cpp.pc" "-lyaml-cpp" "-lyaml-cppd") endif() -foreach(CONF ${_targets_cmake_conf}) - file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake YAML_CONFIG) - string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" YAML_CONFIG "${YAML_CONFIG}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake "${YAML_CONFIG}") -endforeach() +file(RENAME "${CURRENT_PACKAGES_DIR}/share/pkgconfig" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") +vcpkg_fixup_pkgconfig() -# Remove debug include files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Remove debug include and pkgconfig files +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/pkgconfig") -file(READ ${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h DLL_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - string(REPLACE "#ifdef YAML_CPP_DLL" "#if 1" DLL_H "${DLL_H}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h" "#ifdef YAML_CPP_DLL" "#if 1") else() - string(REPLACE "#ifdef YAML_CPP_DLL" "#if 0" DLL_H "${DLL_H}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h" "#ifdef YAML_CPP_DLL" "#if 0") endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h "${DLL_H}") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/yaml-cpp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/yaml-cpp/vcpkg.json b/ports/yaml-cpp/vcpkg.json new file mode 100644 index 00000000000000..039bcd47e6cb8f --- /dev/null +++ b/ports/yaml-cpp/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "yaml-cpp", + "version-semver": "0.7.0", + "port-version": 1, + "description": "yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec.", + "homepage": "https://github.com/jbeder/yaml-cpp", + "documentation": "https://codedocs.xyz/jbeder/yaml-cpp/index.html", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/yara/CMakeLists.txt b/ports/yara/CMakeLists.txt index 89780ce42222e8..b25a162b135757 100644 --- a/ports/yara/CMakeLists.txt +++ b/ports/yara/CMakeLists.txt @@ -37,6 +37,8 @@ set( libyara/ahocorasick.c libyara/arena.c libyara/atoms.c + libyara/base64.c + libyara/bitmask.c libyara/compiler.c libyara/endian.c libyara/exec.c @@ -50,16 +52,17 @@ set( libyara/libyara.c libyara/mem.c libyara/modules.c - libyara/modules/cuckoo.c - libyara/modules/dotnet.c - libyara/modules/elf.c - libyara/modules/hash.c - libyara/modules/math.c - libyara/modules/macho.c - libyara/modules/pe.c - libyara/modules/pe_utils.c - libyara/modules/tests.c - libyara/modules/time.c + libyara/modules/cuckoo/cuckoo.c + libyara/modules/dotnet/dotnet.c + libyara/modules/elf/elf.c + libyara/modules/hash/hash.c + libyara/modules/math/math.c + libyara/modules/macho/macho.c + libyara/modules/pe/pe.c + libyara/modules/pe/pe_utils.c + libyara/modules/tests/tests.c + libyara/modules/time/time.c + libyara/notebook.c libyara/object.c libyara/parser.c libyara/proc.c @@ -69,7 +72,9 @@ set( libyara/re_lexer.c libyara/rules.c libyara/scan.c + libyara/scanner.c libyara/sizedstr.c + libyara/stack.c libyara/stopwatch.c libyara/stream.c libyara/strutils.c @@ -78,13 +83,13 @@ set( set( yara_sources - args.c - threading.c - yara.c + cli/args.c + cli/threading.c + cli/yara.c ) set( yarac_sources - args.c - yarac.c + cli/args.c + cli/yarac.c ) @@ -98,6 +103,9 @@ set( ${JANSSON_LIBRARY} ) +IF(CMAKE_SYSTEM_NAME MATCHES "Windows") +list(APPEND libyara_dependencies Crypt32.lib Ws2_32.lib) +endif() if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") list(APPEND libyara_dependencies m) endif() diff --git a/ports/yara/CONTROL b/ports/yara/CONTROL deleted file mode 100644 index b1d90b471590b4..00000000000000 --- a/ports/yara/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: yara -Version: e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9-2 -Homepage: https://github.com/VirusTotal/yara -Description: The pattern matching swiss knife -Build-Depends: openssl, jansson diff --git a/ports/yara/portfile.cmake b/ports/yara/portfile.cmake index d4869df63f48a4..b7ab617b77e6cf 100644 --- a/ports/yara/portfile.cmake +++ b/ports/yara/portfile.cmake @@ -1,13 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO VirusTotal/yara - REF e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9 - SHA512 2cb837c8e2617e66766b45339a99f3f441f842cb14ce7efe38f5ec2141a51696a400279d98514be4471234c8ef7c99419f56f5b7398af13d771294b2923090aa - HEAD_REF dev + REF v4.1.1 + SHA512 e4474254249d5b3fbb7231fdec5f4e080be042098e1b2bc953aa93513ce0b4742e34acac2911687e75055ecd589d942f71b79c58ca47eee243626ab3ec8add71 + HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -15,10 +13,12 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON ) vcpkg_install_cmake() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/yara RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/yara/vcpkg.json b/ports/yara/vcpkg.json new file mode 100644 index 00000000000000..22f217411e549e --- /dev/null +++ b/ports/yara/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "yara", + "version": "4.1.1", + "description": "The pattern matching swiss knife", + "homepage": "https://github.com/VirusTotal/yara", + "dependencies": [ + "jansson", + "openssl" + ] +} diff --git a/ports/yas/portfile.cmake b/ports/yas/portfile.cmake new file mode 100644 index 00000000000000..3673b2c40ff995 --- /dev/null +++ b/ports/yas/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO niXman/yas + REF 7.0.5 + SHA512 52f7e28d4487286d1ead5cdebcd6c584f7e182d9890a6d367b73deacff14f43caa2412cc1f487e6682cc52e17015638bc41eb540e2a0074c8cb1b30344ccc89e + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/yas DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/include/yas/version.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/yas/vcpkg.json b/ports/yas/vcpkg.json new file mode 100644 index 00000000000000..13dd7c5addb9a5 --- /dev/null +++ b/ports/yas/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "yas", + "version-string": "7.0.5", + "port-version": 1, + "description": "Yet Another Serialization is a header only serialization library", + "homepage": "https://github.com/niXman/yas" +} diff --git a/ports/yasm-tool-helper/portfile.cmake b/ports/yasm-tool-helper/portfile.cmake new file mode 100644 index 00000000000000..91f4fc738b2f54 --- /dev/null +++ b/ports/yasm-tool-helper/portfile.cmake @@ -0,0 +1,5 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +configure_file( + "${CMAKE_CURRENT_LIST_DIR}/yasm-tool-helper.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/yasm-tool-helper.cmake" + @ONLY) diff --git a/ports/yasm-tool-helper/vcpkg.json b/ports/yasm-tool-helper/vcpkg.json new file mode 100644 index 00000000000000..72e1fba3bd2de2 --- /dev/null +++ b/ports/yasm-tool-helper/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "yasm-tool-helper", + "version-string": "2020-03-11", + "description": "Backfill that depends on yasm-tool:host", + "homepage": "https://github.com/Microsoft/vcpkg", + "dependencies": [ + { + "name": "yasm-tool", + "host": true + } + ] +} diff --git a/ports/yasm-tool-helper/yasm-tool-helper.cmake.in b/ports/yasm-tool-helper/yasm-tool-helper.cmake.in new file mode 100644 index 00000000000000..48bd805f3bf270 --- /dev/null +++ b/ports/yasm-tool-helper/yasm-tool-helper.cmake.in @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/../../../@HOST_TRIPLET@/share/yasm-tool/vcpkg-port-config.cmake") diff --git a/ports/yasm-tool/portfile.cmake b/ports/yasm-tool/portfile.cmake new file mode 100644 index 00000000000000..d4949bc9c2ff04 --- /dev/null +++ b/ports/yasm-tool/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +if(VCPKG_TARGET_IS_WINDOWS) + set(YASM_BUILD_BINARY ON) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + set(VCPKG_LIBRARY_LINKAGE static) + + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yasm/yasm + REF 009450c7ad4d425fa5a10ac4bd6efbd25248d823 # 1.3.0 plus bugfixes for https://github.com/yasm/yasm/issues/153 + SHA512 a542577558676d11b52981925ea6219bffe699faa1682c033b33b7534f5a0dfe9f29c56b32076b68c48f65e0aef7c451be3a3af804c52caa4d4357de4caad83c + ) + + file(INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) + foreach(LICENSE Artistic.txt BSD.txt GNU_GPL-2.0 GNU_LGPL-2.0) + file(COPY "${SOURCE_PATH}/${LICENSE}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + endforeach() + + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) + vcpkg_add_to_path("${PYTHON3_DIR}") + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_NLS=OFF + -DYASM_BUILD_TESTS=OFF + ) + vcpkg_install_cmake() + + vcpkg_copy_tools(TOOL_NAMES yasm) + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include") +else() + set(YASM_BUILD_BINARY OFF) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +endif() + +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" @ONLY) diff --git a/ports/yasm-tool/vcpkg-port-config.cmake.in b/ports/yasm-tool/vcpkg-port-config.cmake.in new file mode 100644 index 00000000000000..5abe7520aca905 --- /dev/null +++ b/ports/yasm-tool/vcpkg-port-config.cmake.in @@ -0,0 +1,31 @@ +set(Z_YASM_TOOL_HELPER_LIST_DIR "${CMAKE_CURRENT_LIST_DIR}") + +function(yasm_tool_helper) + cmake_parse_arguments(PARSE_ARGV 0 arg + "APPEND_TO_PATH;PREPEND_TO_PATH" + "OUT_VAR" + "" + ) + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unexpected arguments to yasm_tool_helper: ${arg_UNPARSED_ARGUMENTS}") + endif() + + if(@YASM_BUILD_BINARY@) + set(YASM "${Z_YASM_TOOL_HELPER_LIST_DIR}/../../tools/yasm-tool/yasm.exe") + else() + vcpkg_find_acquire_program(YASM) + endif() + + if(arg_APPEND_TO_PATH) + get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) + vcpkg_add_to_path("${YASM_EXE_PATH}") + endif() + if(arg_PREPEND_TO_PATH) + get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) + vcpkg_add_to_path(PREPEND "${YASM_EXE_PATH}") + endif() + if(DEFINED arg_OUT_VAR) + set("${arg_OUT_VAR}" "${YASM}" PARENT_SCOPE) + endif() +endfunction() diff --git a/ports/yasm-tool/vcpkg.json b/ports/yasm-tool/vcpkg.json new file mode 100644 index 00000000000000..a3552faaa69c60 --- /dev/null +++ b/ports/yasm-tool/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "yasm-tool", + "version": "1.3.0", + "description": "A modular assembler.", + "homepage": "http://yasm.tortall.net/", + "supports": "native & !uwp" +} diff --git a/ports/yasm/CONTROL b/ports/yasm/CONTROL deleted file mode 100644 index 5cb34927087a43..00000000000000 --- a/ports/yasm/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: yasm -Version: 1.3.0 -Homepage: https://github.com/yasm/yasm -Description: Yasm is a complete rewrite of the NASM assembler under the “new†BSD License. diff --git a/ports/yasm/portfile.cmake b/ports/yasm/portfile.cmake index 5dfe2a51cfeae3..75090b3713837d 100644 --- a/ports/yasm/portfile.cmake +++ b/ports/yasm/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if (NOT VCPKG_TARGET_IS_WINDOWS) message(FATAL_ERROR "${PORT} only supports windows") elseif (TRIPLET_SYSTEM_ARCH MATCHES "arm") diff --git a/ports/yasm/vcpkg.json b/ports/yasm/vcpkg.json new file mode 100644 index 00000000000000..6a0176dd8ff53a --- /dev/null +++ b/ports/yasm/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "yasm", + "version-string": "1.3.0", + "port-version": 1, + "description": "Yasm is a complete rewrite of the NASM assembler under the “new†BSD License.", + "homepage": "https://github.com/yasm/yasm", + "supports": "windows & !uwp & !arm" +} diff --git a/ports/yato/CONTROL b/ports/yato/CONTROL deleted file mode 100644 index 65546494d0e1e8..00000000000000 --- a/ports/yato/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: yato -Version: 1.0-2 -Description: Modern C++14 containers and utilities, actors system, typesafe config diff --git a/ports/yato/portfile.cmake b/ports/yato/portfile.cmake index 76a54ee1367bc7..e0b7a916b6e377 100644 --- a/ports/yato/portfile.cmake +++ b/ports/yato/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH REPO alexey_gruzdev/yato diff --git a/ports/yato/vcpkg.json b/ports/yato/vcpkg.json new file mode 100644 index 00000000000000..7a5840b6ffaaad --- /dev/null +++ b/ports/yato/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "yato", + "version-string": "1.0", + "port-version": 3, + "description": "Modern C++14 containers and utilities, actors system, typesafe config" +} diff --git a/ports/yoga/CONTROL b/ports/yoga/CONTROL deleted file mode 100644 index 14ed48f163f8f1..00000000000000 --- a/ports/yoga/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: yoga -Version: 1.14.0 -Homepage: https://github.com/facebook/yoga -Description: Yoga is a cross-platform layout engine which implements Flexbox diff --git a/ports/yoga/add-project-declaration.patch b/ports/yoga/add-project-declaration.patch new file mode 100644 index 00000000000000..b3052a14ceb89f --- /dev/null +++ b/ports/yoga/add-project-declaration.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,6 +7,8 @@ + + set(CMAKE_VERBOSE_MAKEFILE on) + ++project(yogacore CXX) ++ + add_compile_options( + -fno-omit-frame-pointer + -fexceptions diff --git a/ports/yoga/portfile.cmake b/ports/yoga/portfile.cmake index a98b92c7ad3992..7b07a63999dd0e 100644 --- a/ports/yoga/portfile.cmake +++ b/ports/yoga/portfile.cmake @@ -1,17 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds not supported yet.") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/yoga - REF 1.14.0 - SHA512 c634cb9be08a4f4f478c50de9f26a2e1a18b9c6313b78665cd3a28047bd04e14aac2f06702c3bc9f55dba605177b787424a405c4043f052a94d311c76e38bef1 + REF 1.18.0 + SHA512 dba75bff0fd3b72a3c17a6856253bd14d8af7fbb2832b432118c6ee509f9fe234874969a9cfb56690ec5a2649637a6bf090da5c5f5e8907c1e1e9c09f05977e2 HEAD_REF master + PATCHES add-project-declaration.patch ) vcpkg_configure_cmake( @@ -22,13 +17,26 @@ vcpkg_build_cmake() vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/yoga DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") + +set(YOGA_LIB_PREFFIX ) +if (NOT VCPKG_TARGET_IS_WINDOWS) + set(YOGA_LIB_PREFFIX lib) +endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + set(YOGA_BINARY_PATH ) + if (VCPKG_TARGET_IS_WINDOWS) + set(YOGA_BINARY_PATH Release/) + endif() + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${YOGA_BINARY_PATH}${YOGA_LIB_PREFFIX}yogacore${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + set(YOGA_BINARY_PATH ) + if (VCPKG_TARGET_IS_WINDOWS) + set(YOGA_BINARY_PATH Debug/) + endif() + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${YOGA_BINARY_PATH}${YOGA_LIB_PREFFIX}yogacore${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) endif() vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/yoga RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/yoga/vcpkg.json b/ports/yoga/vcpkg.json new file mode 100644 index 00000000000000..03e86b78587536 --- /dev/null +++ b/ports/yoga/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "yoga", + "version-string": "1.18.0", + "port-version": 2, + "description": "Yoga is a cross-platform layout engine which implements Flexbox", + "homepage": "https://github.com/facebook/yoga", + "supports": "!uwp" +} diff --git a/ports/yomm2/fix_find_boost.patch b/ports/yomm2/fix_find_boost.patch new file mode 100644 index 00000000000000..f5b167083f57a4 --- /dev/null +++ b/ports/yomm2/fix_find_boost.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b7b88b1..02297e7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,7 +11,7 @@ project(YOMM2 VERSION 1.0) + # Find Boost dependency + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + include(find_or_download_package) +-find_or_download_package(Boost INSTALL_WITH_YOMM) ++find_package(Boost REQUIRED) + message(STATUS "Using Boost libraries from ${Boost_INCLUDE_DIRS}") + + if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in +index 7272504..9f8b2ae 100644 +--- a/cmake/Config.cmake.in ++++ b/cmake/Config.cmake.in +@@ -1,7 +1,7 @@ + include(CMakeFindDependencyMacro) + + # Tell library users about the Boost dependency +-find_dependency(Boost 1.53 HINTS ${CMAKE_CURRENT_LIST_DIR}/..) ++find_dependency(Boost 1.53) + + # Add the targets file + include("${CMAKE_CURRENT_LIST_DIR}/YOMM2Targets.cmake") diff --git a/ports/yomm2/fix_uwp_osx.patch b/ports/yomm2/fix_uwp_osx.patch new file mode 100644 index 00000000000000..34ee35c8fc264a --- /dev/null +++ b/ports/yomm2/fix_uwp_osx.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2f16eb6..a46c8b7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,14 +15,15 @@ find_package(Boost) + message(STATUS "Using Boost libraries from ${Boost_INCLUDE_DIRS}") + + if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -save-temps") + endif() + endif() + + if(MSVC) +- set(CMAKE_CXX_FLAGS "/std:c++17 -D_SCL_SECURE_NO_WARNINGS /EHsc") ++ set(CMAKE_CXX_FLAGS "/std:c++17 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS /EHsc") ++else() ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + endif() + + add_subdirectory(src) diff --git a/ports/yomm2/portfile.cmake b/ports/yomm2/portfile.cmake new file mode 100644 index 00000000000000..e127c94cb4e1d7 --- /dev/null +++ b/ports/yomm2/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jll63/yomm2 + REF v1.1.2 + SHA512 f45c3f3d267dedaa3c76f9dab1a75be01941e3715e71b30b878be49157a5ba97f2188c9e635272be3ca396019b161bb21a30199ca504c94a18673685f5dbf06d + HEAD_REF master + PATCHES "fix_find_boost.patch" "fix_uwp_osx.patch" +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DYOMM2_ENABLE_EXAMPLES=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/YOMM2) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/yomm2/vcpkg.json b/ports/yomm2/vcpkg.json new file mode 100644 index 00000000000000..c1696f6f2aea1c --- /dev/null +++ b/ports/yomm2/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "yomm2", + "version-string": "1.1.2", + "description": "YOMM2 is an implementation of open multi-methods.", + "homepage": "https://github.com/jll63/yomm2", + "dependencies": [ + "boost-dynamic-bitset", + "boost-integer", + "boost-move", + "boost-preprocessor", + "boost-type-traits" + ] +} diff --git a/ports/yyjson/portfile.cmake b/ports/yyjson/portfile.cmake new file mode 100644 index 00000000000000..a4c8ffa07fe3e2 --- /dev/null +++ b/ports/yyjson/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ibireme/yyjson + REF 1f7dc19c7664dc1aed74045e3b6f316ccd271442 # 0.3.0 + SHA512 fa44dc86d2e7d4a1a178d01085d707b266c2bc32a5bf372a68b74d149b099d346f72dea5865fc1ba37a0c1525d3ac90a38df404d9008bca4577825a603524a91 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DYYJSON_BUILD_TESTS=OFF + -DYYJSON_BUILD_MISC=OFF +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/yyjson/vcpkg.json b/ports/yyjson/vcpkg.json new file mode 100644 index 00000000000000..cd5cc93f100bb6 --- /dev/null +++ b/ports/yyjson/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "yyjson", + "version": "0.3.0", + "description": "A high performance JSON library written in ANSI C", + "homepage": "https://github.com/ibireme/yyjson", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/z3/CONTROL b/ports/z3/CONTROL deleted file mode 100644 index 5a806da95bc735..00000000000000 --- a/ports/z3/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: z3 -Version: 4.8.5-1 -Description: An SMT solver diff --git a/ports/z3/LICENSE b/ports/z3/LICENSE deleted file mode 100644 index cc90bed7477d08..00000000000000 --- a/ports/z3/LICENSE +++ /dev/null @@ -1,10 +0,0 @@ -Z3 -Copyright (c) Microsoft Corporation -All rights reserved. -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/ports/z3/fix-install-path.patch b/ports/z3/fix-install-path.patch index 170ca085a934b4..cb21e13609c061 100644 --- a/ports/z3/fix-install-path.patch +++ b/ports/z3/fix-install-path.patch @@ -1,85 +1,23 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6e73daf63..c6bca7918 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -615,7 +615,7 @@ install(EXPORT - Z3_EXPORTED_TARGETS - FILE "Z3Targets.cmake" - NAMESPACE z3:: -- DESTINATION "${CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR}" -+ DESTINATION share/z3 - ) - set(Z3_INSTALL_TREE_CMAKE_CONFIG_FILE "${PROJECT_BINARY_DIR}/cmake/Z3Config.cmake") - set(Z3_FIRST_PACKAGE_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}") -@@ -640,7 +640,7 @@ unset(CONFIG_FILE_TYPE) - # Add install rule to install ${Z3_INSTALL_TREE_CMAKE_CONFIG_FILE} - install( - FILES "${Z3_INSTALL_TREE_CMAKE_CONFIG_FILE}" -- DESTINATION "${CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR}" -+ DESTINATION share/z3 - ) - - # TODO: Provide a `Z3Version.cmake` file so that clients can specify the version -diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt -index d5778add9..35b7e4c55 100644 ---- a/doc/CMakeLists.txt -+++ b/doc/CMakeLists.txt -@@ -88,6 +88,6 @@ set(CMAKE_INSTALL_API_BINDINGS_DOC - if (INSTALL_API_BINDINGS_DOCUMENTATION) - install( - DIRECTORY "${DOC_DEST_DIR}" -- DESTINATION "${CMAKE_INSTALL_API_BINDINGS_DOC}" -+ DESTINATION share/z3 - ) - endif() -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 9b6f00b62..8b47125d3 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -173,7 +173,8 @@ install(TARGETS libz3 - EXPORT Z3_EXPORTED_TARGETS - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" # On Windows this installs ``libz3.lib`` which CMake calls the "corresponding import library". Do we want this installed? -- RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}" # For Windows. DLLs are runtime targets for CMake -+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" # For Windows. DLLs are runtime targets for CMake -+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" # For MACOSX. - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" - ) - -diff --git a/src/api/java/CMakeLists.txt b/src/api/java/CMakeLists.txt -index f593d91a4..70682b721 100644 ---- a/src/api/java/CMakeLists.txt -+++ b/src/api/java/CMakeLists.txt -@@ -228,7 +228,7 @@ if (INSTALL_JAVA_BINDINGS) - PATH - "Directory to install Z3 Java JNI bridge library relative to install prefix" - ) -- install(TARGETS z3java DESTINATION "${Z3_JAVA_JNI_LIB_INSTALLDIR}") -+ install(TARGETS z3java DESTINATION share/z3) - # Note: Don't use ``DESTINATION`` here as the version of ``UseJava.cmake`` shipped - # with CMake 2.8.12.2 handles that incorrectly. - install_jar(z3JavaJar "${Z3_JAVA_JAR_INSTALLDIR}") -diff --git a/src/api/python/CMakeLists.txt b/src/api/python/CMakeLists.txt -index 6cabb779a..0b79861bf 100644 ---- a/src/api/python/CMakeLists.txt -+++ b/src/api/python/CMakeLists.txt -@@ -136,7 +136,7 @@ if (INSTALL_PYTHON_BINDINGS) - # Using DESTDIR still seems to work even if we use an absolute path - message(STATUS "Python bindings will be installed to \"${CMAKE_INSTALL_PYTHON_PKG_DIR}\"") - install(FILES ${build_z3_python_bindings_target_depends} -- DESTINATION "${CMAKE_INSTALL_PYTHON_PKG_DIR}/z3" -+ DESTINATION share/z3 - ) - else() - message(STATUS "Not emitting rules to install Z3 python bindings") -diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt -index 278246341..b6cd2f1c1 100644 ---- a/src/shell/CMakeLists.txt -+++ b/src/shell/CMakeLists.txt -@@ -44,5 +44,5 @@ target_link_libraries(shell PRIVATE ${Z3_DEPENDENT_LIBS}) - z3_add_component_dependencies_to_target(shell ${shell_expanded_deps}) - z3_append_linker_flag_list_to_target(shell ${Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS}) - install(TARGETS shell -- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -+ RUNTIME DESTINATION tools/z3 - ) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e8de0c7e4..064c18eab 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -173,6 +173,7 @@ install(TARGETS libz3 + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" # On Windows this installs ``libz3.lib`` which CMake calls the "corresponding import library". Do we want this installed? + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" # For Windows. DLLs are runtime targets for CMake ++ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" # For MACOSX. + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + +diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt +index 278246341..b6cd2f1c1 100644 +--- a/src/shell/CMakeLists.txt ++++ b/src/shell/CMakeLists.txt +@@ -44,5 +44,5 @@ target_link_libraries(shell PRIVATE ${Z3_DEPENDENT_LIBS}) + z3_add_component_dependencies_to_target(shell ${shell_expanded_deps}) + z3_append_linker_flag_list_to_target(shell ${Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS}) + install(TARGETS shell +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ RUNTIME DESTINATION tools/z3 + ) diff --git a/ports/z3/portfile.cmake b/ports/z3/portfile.cmake index e3adeabb0049af..34c2429b6c40a7 100644 --- a/ports/z3/portfile.cmake +++ b/ports/z3/portfile.cmake @@ -1,12 +1,4 @@ -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - message(FATAL_ERROR "Z3 doesn't currently support ARM64") -endif() - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "Z3 doesn't currently support UWP") -endif() - -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_find_acquire_program(PYTHON2) get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) @@ -15,15 +7,14 @@ vcpkg_add_to_path("${PYTHON2_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Z3Prover/z3 - REF Z3-4.8.5 - SHA512 ca36e1a0332bd473a64f41dfdb31656fb3486178473e4fd4934dccce109a84c9686c08f94998df74bacb588eb12ea5db25dc17a564ee76f82fd2559349697309 + REF 517d907567f4283ad8b48ff9c2a3f6dce838569e # z3-4.8.10 + SHA512 5102f8c5fb988e93c586fa288267e4803d31a9cd0e2dbc7ce836a33b297cdbc9f3428933d0304ef4cef86812c7b9a6d000094cc13b3ed23ab0712dcc3d4677a8 HEAD_REF master - PATCHES - fix-install-path.patch + PATCHES fix-install-path.patch ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(BUILD_STATIC "-DBUILD_LIBZ3_SHARED=OFF") + set(BUILD_STATIC "-DZ3_BUILD_LIBZ3_SHARED=OFF") endif() vcpkg_configure_cmake( @@ -34,9 +25,9 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/z3 TARGET_PATH share/Z3) vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/z3 RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/z3/vcpkg.json b/ports/z3/vcpkg.json new file mode 100644 index 00000000000000..41101a650bc5a6 --- /dev/null +++ b/ports/z3/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "z3", + "version-semver": "4.8.10", + "description": "Z3 is a theorem prover from Microsoft Research", + "homepage": "https://github.com/Z3Prover/z3", + "supports": "!uwp" +} diff --git a/ports/z85/CONTROL b/ports/z85/CONTROL deleted file mode 100644 index 24fc16050ced41..00000000000000 --- a/ports/z85/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: z85 -Version: 1.0 -Description: Z85 is a binary-to-text encoding library. It implements ZeroMQ Base-85 Encoding Algorithm and provides custom padding. \ No newline at end of file diff --git a/ports/z85/portfile.cmake b/ports/z85/portfile.cmake index 578b46ba3c08df..b3316ee9a63e58 100644 --- a/ports/z85/portfile.cmake +++ b/ports/z85/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO artemkin/z85 diff --git a/ports/z85/vcpkg.json b/ports/z85/vcpkg.json new file mode 100644 index 00000000000000..66f96178accb29 --- /dev/null +++ b/ports/z85/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "z85", + "version-string": "1.0", + "port-version": 1, + "description": "Z85 is a binary-to-text encoding library. It implements ZeroMQ Base-85 Encoding Algorithm and provides custom padding." +} diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL deleted file mode 100644 index d0dbe6be90408b..00000000000000 --- a/ports/zeromq/CONTROL +++ /dev/null @@ -1,8 +0,0 @@ -Source: zeromq -Version: 2019-07-09-1 -Homepage: https://github.com/zeromq/libzmq -Description: The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products - -Feature: sodium -Description: Using libsodium for CURVE security -Build-Depends: libsodium diff --git a/ports/zeromq/fix-arm.patch b/ports/zeromq/fix-arm.patch new file mode 100644 index 00000000000000..3f6c6486b459dd --- /dev/null +++ b/ports/zeromq/fix-arm.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dd3d8eb..c08cad9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -551,6 +551,8 @@ if(ZMQ_HAVE_WINDOWS) + set(CMAKE_REQUIRED_LIBRARIES "") + # TODO: This not the symbol we're looking for. What is the symbol? + check_library_exists(ws2 fopen "" HAVE_WS2) ++ ++ check_cxx_symbol_exists(CryptAcquireContext "windows.h;wincrypt.h" HAVE_ADVAPI32) + else() + check_cxx_symbol_exists(if_nametoindex net/if.h HAVE_IF_NAMETOINDEX) + check_cxx_symbol_exists(SO_PEERCRED sys/socket.h ZMQ_HAVE_SO_PEERCRED) +@@ -1452,6 +1454,10 @@ if(BUILD_SHARED) + elseif(HAVE_WS2) + target_link_libraries(libzmq ws2) + endif() ++ ++ if (HAVE_ADVAPI32) ++ target_link_libraries(libzmq advapi32) ++ endif() + + if(HAVE_RPCRT4) + target_link_libraries(libzmq rpcrt4) +@@ -1497,6 +1503,10 @@ if(BUILD_STATIC) + elseif(HAVE_WS2) + target_link_libraries(libzmq-static ws2) + endif() ++ ++ if (HAVE_ADVAPI32) ++ target_link_libraries(libzmq-static advapi32) ++ endif() + + if(HAVE_RPCRT4) + target_link_libraries(libzmq-static rpcrt4) +diff --git a/src/clock.cpp b/src/clock.cpp +index 79522ad..0667c59 100644 +--- a/src/clock.cpp ++++ b/src/clock.cpp +@@ -41,8 +41,10 @@ + #include + #else + #include +-#if defined(_M_ARM) || defined(_M_ARM64) ++#if defined(_M_ARM) + #include ++#elif defined(_M_ARM64) ++#include + #endif + #endif + #endif diff --git a/ports/zeromq/portfile.cmake b/ports/zeromq/portfile.cmake index 7f42cf5216b770..01c5aa49cd6426 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -1,65 +1,65 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF b5db4b4421c8b2766321e70e5e9ca07c197fac47 - SHA512 e1166b9eec3c0613c2b085bf995e6d711554ba77e180f7b86aa2d04157f2ab7dca8131b855568f8fc931ac256628f6018e6bc67bc9fbecfd498776b4151d6e63 - HEAD_REF master + REF v4.3.4 + SHA512 ad828b1ab5a87983285a6b44b08240816ed1c4e2c73306ab1a851bf80df1892b5e2f92064a49fbadc1f4c75043625ace77dd25b64d5d1c2a7d1d61cc916fba0b + PATCHES fix-arm.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - sodium WITH_LIBSODIUM +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + sodium WITH_LIBSODIUM + draft ENABLE_DRAFTS + websockets-sha1 ENABLE_WS ) -vcpkg_configure_cmake( +set(PLATFORM_OPTIONS) +if(VCPKG_TARGET_IS_MINGW) + set(PLATFORM_OPTIONS "-DCMAKE_SYSTEM_VERSION=6.0") +endif() + +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DZMQ_BUILD_TESTS=OFF - -DPOLLER=select -DBUILD_STATIC=${BUILD_STATIC} -DBUILD_SHARED=${BUILD_SHARED} -DWITH_PERF_TOOL=OFF + -DWITH_DOCS=OFF + -DWITH_NSS=OFF + -DWITH_LIBSODIUM_STATIC=${BUILD_STATIC} ${FEATURE_OPTIONS} + ${PLATFORM_OPTIONS} OPTIONS_DEBUG "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/ZeroMQ) - vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_cmake_config_fixup(CONFIG_PATH CMake) +else() + vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ZeroMQ) endif() file(COPY - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/zmq.h - "defined ZMQ_STATIC" - "1 //defined ZMQ_STATIC" - ) -endif() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() # Handle copyright -file(RENAME ${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt ${CURRENT_PACKAGES_DIR}/share/zeromq/copyright) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/zmq) +file(RENAME "${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ZeroMQ) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/share/zmq") diff --git a/ports/zeromq/vcpkg.json b/ports/zeromq/vcpkg.json new file mode 100644 index 00000000000000..631f9cf784659d --- /dev/null +++ b/ports/zeromq/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "zeromq", + "version": "4.3.4", + "port-version": 1, + "description": "The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products", + "homepage": "https://github.com/zeromq/libzmq", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "draft": { + "description": "Build and install draft APIs" + }, + "sodium": { + "description": "Using libsodium for CURVE security", + "dependencies": [ + "libsodium" + ] + }, + "websockets-sha1": { + "description": "Enable WebSocket transport through builtin sha1 (libzmq#3676)" + } + } +} diff --git a/ports/zfp/fix-build-error.patch b/ports/zfp/fix-build-error.patch new file mode 100644 index 00000000000000..0c1e1576347494 --- /dev/null +++ b/ports/zfp/fix-build-error.patch @@ -0,0 +1,11 @@ +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index a960d2c..e6a492d 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -1,5 +1,5 @@ + add_executable(zfpcmd zfp.c) +-set_property(TARGET zfpcmd PROPERTY OUTPUT_NAME zfp) ++#set_property(TARGET zfpcmd PROPERTY OUTPUT_NAME zfp) + target_link_libraries(zfpcmd zfp) + if(HAVE_LIBM_MATH) + target_link_libraries(zfpcmd m) diff --git a/ports/zfp/fix-install-tools.patch b/ports/zfp/fix-install-tools.patch new file mode 100644 index 00000000000000..49a511d44ddd1e --- /dev/null +++ b/ports/zfp/fix-install-tools.patch @@ -0,0 +1,72 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 47179fd..96add54 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -220,8 +220,8 @@ add_subdirectory(src) + option(BUILD_ALL "Build all subdirectories" OFF) + if(BUILD_ALL) + set(BUILD_CFP ON CACHE BOOL "Build CFP arrays library" FORCE) +- set(BUILD_ZFORP ON CACHE BOOL "Build Fortran library" FORCE) +- set(BUILD_ZFPY ON CACHE BOOL "Build python bindings for zfp" FORCE) ++ set(BUILD_ZFORP OFF CACHE BOOL "Build Fortran library" FORCE) ++ set(BUILD_ZFPY OFF CACHE BOOL "Build python bindings for zfp" FORCE) + set(BUILD_UTILITIES ON CACHE BOOL "Build command line utilities for zfp" FORCE) + set(BUILD_EXAMPLES ON CACHE BOOL "Build Examples" FORCE) + endif() +diff --git a/cfp/src/CMakeLists.txt b/cfp/src/CMakeLists.txt +index 386698c..ecba525 100644 +--- a/cfp/src/CMakeLists.txt ++++ b/cfp/src/CMakeLists.txt +@@ -36,3 +36,5 @@ install(TARGETS cfp EXPORT cfp-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ ++install(DIRECTORY ${ZFP_SOURCE_DIR}/cfp/include DESTINATION include) +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 7cc7606..6ca1034 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -34,3 +34,20 @@ if(HAVE_LIBM_MATH) + target_link_libraries(pgm m) + target_link_libraries(simple m) + endif() ++ ++install(TARGETS diffusion ++ RUNTIME DESTINATION tools) ++ if(BUILD_CFP) ++ install(TARGETS diffusionC ++ RUNTIME DESTINATION tools) ++ endif() ++install(TARGETS inplace ++ RUNTIME DESTINATION tools) ++install(TARGETS iterator ++ RUNTIME DESTINATION tools) ++install(TARGETS pgm ++ RUNTIME DESTINATION tools) ++install(TARGETS simple ++ RUNTIME DESTINATION tools) ++install(TARGETS speed ++ RUNTIME DESTINATION tools) +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index d15246e..7a6c6cb 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -19,3 +19,6 @@ if(ZFP_BUILD_TESTING_LARGE) + endforeach() + endforeach() + endif() ++ ++install(TARGETS testzfp ++ RUNTIME DESTINATION tools) +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index a960d2c..5fcbf87 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -4,3 +4,6 @@ target_link_libraries(zfpcmd zfp) + if(HAVE_LIBM_MATH) + target_link_libraries(zfpcmd m) + endif() ++ ++install(TARGETS zfpcmd ++ RUNTIME DESTINATION tools) diff --git a/ports/zfp/portfile.cmake b/ports/zfp/portfile.cmake new file mode 100644 index 00000000000000..64d1f7e3cc89ba --- /dev/null +++ b/ports/zfp/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LLNL/zfp + REF 0.5.5 + SHA512 c043cee73f6e972e047452552ab2ceb9247a6747fdb7e5f863aeab3a05208737c0bcabbe29f3c10e5c1aba961ec47aa6a0abdb395486fa0d5fb16a4ad45733c4 + HEAD_REF master + PATCHES + fix-build-error.patch + fix-install-tools.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + all BUILD_ALL + cfp BUILD_CFP + test BUILD_TESTING + example BUILD_EXAMPLES + utility BUILD_UTILITIES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_ZFPY=OFF + -DBUILD_ZFORP=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +# Rename problematic root include "bitstream.h"; conflicts with x265's private headers +file(RENAME ${CURRENT_PACKAGES_DIR}/include/bitstream.h ${CURRENT_PACKAGES_DIR}/include/zfp/bitstream.h) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/zfp.h "\"bitstream.h\"" "\"zfp/bitstream.h\"") + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/zfp/vcpkg.json b/ports/zfp/vcpkg.json new file mode 100644 index 00000000000000..e0313dbf8493d4 --- /dev/null +++ b/ports/zfp/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "zfp", + "version-string": "0.5.5", + "port-version": 3, + "description": "Zfp is an open source C/C++ library for compressed numerical arrays that support high throughput read and write random access. zfp also supports streaming compression of integer and floating-point data, e.g., for applications that read and write large data sets to and from disk. zfp is primarily written in C and C++ but also includes Python and Fortran bindings.", + "homepage": "https://github.com/LLNL/zfp", + "features": { + "all": { + "description": "Build all components" + }, + "cfp": { + "description": "cfp support for cfp" + }, + "example": { + "description": "Build example" + }, + "test": { + "description": "Build test" + }, + "utility": { + "description": "Build utility" + } + } +} diff --git a/ports/zkpp/CMakeLists.txt b/ports/zkpp/CMakeLists.txt new file mode 100644 index 00000000000000..9705c580d4f528 --- /dev/null +++ b/ports/zkpp/CMakeLists.txt @@ -0,0 +1,111 @@ +# +# This file is based on https://github.com/tgockel/zookeeper-cpp/blob/a8d5f905e01893256299d5532b1836f64c89b5b9/CMakeLists.txt +# Which is licensed under Apache License 2.0 +# http://www.apache.org/licenses/LICENSE-2.0 +# + +cmake_minimum_required(VERSION 3.5) + +file(READ src/zk/config.hpp CONFIG_HPP_STR) +string(REGEX REPLACE ".*# *define +ZKPP_VERSION_MAJOR +([0-9]+).*" "\\1" ZKPP_VERSION_MAJOR "${CONFIG_HPP_STR}") +string(REGEX REPLACE ".*# *define +ZKPP_VERSION_MINOR +([0-9]+).*" "\\1" ZKPP_VERSION_MINOR "${CONFIG_HPP_STR}") +string(REGEX REPLACE ".*# *define +ZKPP_VERSION_PATCH +([0-9]+).*" "\\1" ZKPP_VERSION_PATCH "${CONFIG_HPP_STR}") + +set(ZKPP_VERSION "${ZKPP_VERSION_MAJOR}.${ZKPP_VERSION_MINOR}.${ZKPP_VERSION_PATCH}") +project(zookeeper-cpp + LANGUAGES CXX + VERSION "${ZKPP_VERSION}" + ) +set(PROJECT_SO_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") +message(STATUS "Software Version: ${ZKPP_VERSION}") + +################################################################################ +# CMake # +################################################################################ + +cmake_policy(VERSION 3.5) +cmake_policy(SET CMP0037 OLD) # allow generation of "test" target +set(CMAKE_REQUIRED_QUIET YES) # tell check_include_file_cxx to keep quiet + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") + +include(BuildFunctions) +include(CheckIncludeFileCXX) +include(ConfigurationSetting) +include(ListSplit) +include(GNUInstallDirs) + +################################################################################ +# Build Configuration # +################################################################################ + +find_package(Threads REQUIRED) + +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Debug") + message(STATUS "No build type selected, default to ${CMAKE_BUILD_TYPE}") +endif() + +set(VALID_BUILD_TYPES Debug Release) +if(NOT ${CMAKE_BUILD_TYPE} IN_LIST VALID_BUILD_TYPES) + message(FATAL_ERROR "Invalid CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}\nValid build types are: ${VALID_BUILD_TYPES}") +endif() +message(STATUS "Configuration: ${CMAKE_BUILD_TYPE}") + +message(STATUS "Features:") +build_option(NAME CODE_COVERAGE + DOC "Enable code coverage (turns on the test-coverage target)" + DEFAULT OFF + CONFIGS_ON Debug + ) + +configuration_setting(NAME BUFFER + DOC "Type to use for zk::buffer" + DEFAULT STD_VECTOR + OPTIONS + STD_VECTOR + CUSTOM + ) + +configuration_setting(NAME FUTURE + DOC "Type to use for zk::future and zk::promise" + DEFAULT STD + OPTIONS + STD + STD_EXPERIMENTAL + CUSTOM + ) + +set(CXX_STANDARD c++17 + CACHE STRING "The language standard to target for C++." + ) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=${CXX_STANDARD}") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DZKPP_DEBUG=1") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") + +################################################################################ +# External Libraries # +################################################################################ + +find_package(zookeeper REQUIRED) + + +build_module(NAME zkpp + PATH src/zk + NO_RECURSE + ) + +target_include_directories(zkpp PUBLIC $ $) +target_link_libraries(zkpp PRIVATE zookeeper::zookeeper) + +install(TARGETS zkpp + EXPORT zkpp + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(FILES ${zkpp_LIBRARY_HEADERS} DESTINATION include/zk/) + +install(EXPORT zkpp DESTINATION share/zkpp/ FILE zkppConfig.cmake) diff --git a/ports/zkpp/portfile.cmake b/ports/zkpp/portfile.cmake new file mode 100644 index 00000000000000..5ec1e78af82c92 --- /dev/null +++ b/ports/zkpp/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tgockel/zookeeper-cpp + REF v0.2.3 + SHA512 086f31d4ca53f5a585fd8640caf9f2f21c90cf46d9cfe6c0e8e5b8c620e73265bb8aebec62ea4328f3f098a9b3000280582569966c0d3401627ab8c3edc31ca8 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(GLOB_RECURSE test_files LIST_DIRECTORIES false "${SOURCE_PATH}/src/zk/*_tests.cpp") +if (NOT "${test_files}" STREQUAL "") + file(REMOVE ${test_files}) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() diff --git a/ports/zkpp/vcpkg.json b/ports/zkpp/vcpkg.json new file mode 100644 index 00000000000000..51000a32df1ff8 --- /dev/null +++ b/ports/zkpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "zkpp", + "version-string": "0.2.3", + "port-version": 1, + "description": "A ZooKeeper client for C++.", + "homepage": "https://github.com/tgockel/zookeeper-cpp", + "dependencies": [ + "zookeeper" + ] +} diff --git a/ports/zlib-ng/portfile.cmake b/ports/zlib-ng/portfile.cmake new file mode 100644 index 00000000000000..778e08c9d1e392 --- /dev/null +++ b/ports/zlib-ng/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zlib-ng/zlib-ng + REF 2.0.3 + SHA512 e1afe91e1a8b4c54a004b672f539ae68f7dc1f1b08ba93514c0de674230354c944d496753f00ad272f16ef322705f275b5b72dac6c2a757ec741ef3f1ea1d59a + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DZLIB_FULL_VERSION=2.0.3 + -DZLIB_ENABLE_TESTS=OFF + -DWITH_NEW_STRATEGIES=ON + OPTIONS_RELEASE + -DWITH_OPTIM=ON +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/include +) +file(INSTALL ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) \ No newline at end of file diff --git a/ports/zlib-ng/vcpkg.json b/ports/zlib-ng/vcpkg.json new file mode 100644 index 00000000000000..b7b2ae46305939 --- /dev/null +++ b/ports/zlib-ng/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "zlib-ng", + "version": "2.0.3", + "description": "zlib replacement with optimizations for 'next generation' systems", + "homepage": "https://github.com/zlib-ng/zlib-ng", + "license": "Zlib", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch b/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch new file mode 100644 index 00000000000000..8fe2b2f5a6683c --- /dev/null +++ b/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch @@ -0,0 +1,53 @@ +diff --git a/zconf.h.cmakein b/zconf.h.cmakein +index a7f24cc..a1b359b 100644 +--- a/zconf.h.cmakein ++++ b/zconf.h.cmakein +@@ -434,11 +434,19 @@ typedef uLong FAR uLongf; + #endif + + #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +-# define Z_HAVE_UNISTD_H ++# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1 ++# define Z_HAVE_UNISTD_H ++# elif HAVE_UNISTD_H != 0 ++# define Z_HAVE_UNISTD_H ++# endif + #endif + + #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +-# define Z_HAVE_STDARG_H ++# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1 ++# define Z_HAVE_STDARG_H ++# elif HAVE_STDARG_H != 0 ++# define Z_HAVE_STDARG_H ++# endif + #endif + + #ifdef STDC +diff --git a/zconf.h.in b/zconf.h.in +index 5e1d68a..32f53c8 100644 +--- a/zconf.h.in ++++ b/zconf.h.in +@@ -432,11 +432,19 @@ typedef uLong FAR uLongf; + #endif + + #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +-# define Z_HAVE_UNISTD_H ++# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1 ++# define Z_HAVE_UNISTD_H ++# elif HAVE_UNISTD_H != 0 ++# define Z_HAVE_UNISTD_H ++# endif + #endif + + #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +-# define Z_HAVE_STDARG_H ++# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1 ++# define Z_HAVE_STDARG_H ++# elif HAVE_STDARG_H != 0 ++# define Z_HAVE_STDARG_H ++# endif + #endif + + #ifdef STDC + diff --git a/ports/zlib/0002-android-build-mingw.patch b/ports/zlib/0002-android-build-mingw.patch new file mode 100644 index 00000000000000..188499df0b758b --- /dev/null +++ b/ports/zlib/0002-android-build-mingw.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt (date 1618364429263) ++++ b/CMakeLists.txt (date 1618364429263) +@@ -170,7 +170,7 @@ + string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" + "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) + +-if(MINGW) ++if(MINGW AND NOT ANDROID) + # This gets us DLL resource information when compiling on MinGW. + if(NOT CMAKE_RC_COMPILER) + set(CMAKE_RC_COMPILER windres.exe) +@@ -186,7 +186,7 @@ + if(BUILD_SHARED_LIBS) + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) + endif() +-endif(MINGW) ++endif(MINGW AND NOT ANDROID) + + add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) diff --git a/ports/zlib/CONTROL b/ports/zlib/CONTROL deleted file mode 100644 index aa7c7b6e92b665..00000000000000 --- a/ports/zlib/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: zlib -Version: 1.2.11-5 -Homepage: https://www.zlib.net/ -Description: A compression library diff --git a/ports/zlib/add_debug_postfix_on_mingw.patch b/ports/zlib/add_debug_postfix_on_mingw.patch new file mode 100644 index 00000000000000..22172ccfcaaef0 --- /dev/null +++ b/ports/zlib/add_debug_postfix_on_mingw.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0fe939d..e4fc213 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,7 +59,7 @@ endif() + # + check_include_file(unistd.h Z_HAVE_UNISTD_H) + +-if(MSVC) ++if(WIN32) + set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) diff --git a/ports/zlib/cmake_dont_build_more_than_needed.patch b/ports/zlib/cmake_dont_build_more_than_needed.patch index 229a2d055be52f..a374f76d628096 100644 --- a/ports/zlib/cmake_dont_build_more_than_needed.patch +++ b/ports/zlib/cmake_dont_build_more_than_needed.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0fe939d..8d2f5f1 100644 +index 0fe939d..a1291d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ set(VERSION "1.2.11") @@ -10,24 +10,56 @@ index 0fe939d..8d2f5f1 100644 set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") -@@ -211,7 +212,15 @@ elseif(BUILD_SHARED_LIBS AND WIN32) +@@ -124,9 +125,11 @@ set(ZLIB_SRCS + ) + + if(NOT MINGW) +- set(ZLIB_DLL_SRCS +- win32/zlib1.rc # If present will override custom build rule below. +- ) ++ if(BUILD_SHARED_LIBS) ++ set(ZLIB_DLL_SRCS ++ win32/zlib1.rc # If present will override custom build rule below. ++ ) ++ endif() + endif() + + if(CMAKE_COMPILER_IS_GNUCC) +@@ -180,11 +183,12 @@ if(MINGW) + -I ${CMAKE_CURRENT_BINARY_DIR} + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) +- set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) ++ if(BUILD_SHARED_LIBS) ++ set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) ++ endif() + endif(MINGW) + +-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) + +@@ -201,7 +205,7 @@ endif() + + if(UNIX) + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +@@ -211,7 +215,7 @@ elseif(BUILD_SHARED_LIBS AND WIN32) endif() if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) - install(TARGETS zlib zlibstatic -+ if (BUILD_SHARED_LIBS) -+ set(ZLIB_TARGETS zlib) -+ set_target_properties(zlibstatic PROPERTIES EXCLUDE_FROM_ALL ON) -+ else() -+ set(ZLIB_TARGETS zlibstatic) -+ set_target_properties(zlib PROPERTIES EXCLUDE_FROM_ALL ON) -+ endif() -+ -+ install(TARGETS ${ZLIB_TARGETS} ++ install(TARGETS zlib RUNTIME DESTINATION "${INSTALL_BIN_DIR}" ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) -@@ -230,6 +239,7 @@ endif() +@@ -230,6 +234,7 @@ endif() # Example binaries #============================================================================ @@ -35,7 +67,7 @@ index 0fe939d..8d2f5f1 100644 add_executable(example test/example.c) target_link_libraries(example zlib) add_test(example example) -@@ -247,3 +257,4 @@ if(HAVE_OFF64_T) +@@ -247,3 +252,4 @@ if(HAVE_OFF64_T) target_link_libraries(minigzip64 zlib) set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") endif() diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index 78030309b1b2a3..88e9e0fe486f5c 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -1,9 +1,7 @@ -include(vcpkg_common_functions) - set(VERSION 1.2.11) vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://www.zlib.net/zlib-${VERSION}.tar.gz" "https://downloads.sourceforge.net/project/libpng/zlib/${VERSION}/zlib-${VERSION}.tar.gz" + URLS "https://www.zlib.net/zlib-${VERSION}.tar.gz" "https://downloads.sourceforge.net/project/libpng/zlib/${VERSION}/zlib-${VERSION}.tar.gz" FILENAME "zlib1211.tar.gz" SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae ) @@ -14,6 +12,9 @@ vcpkg_extract_source_archive_ex( REF ${VERSION} PATCHES "cmake_dont_build_more_than_needed.patch" + "0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch" + "add_debug_postfix_on_mingw.patch" + "0002-android-build-mingw.patch" ) # This is generated during the cmake build @@ -30,21 +31,26 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -# Both dynamic and static are built, so keep only the one needed -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zlib.lib) +# Install the pkgconfig file +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/zlib.pc "-lz" "-lzlib") endif() - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibd.lib) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/zlib.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/zlib.pc "-lz" "-lzlibd") endif() + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/zlib.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) endif() -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zlib RENAME copyright) +vcpkg_fixup_pkgconfig() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) - -vcpkg_test_cmake(PACKAGE_NAME ZLIB MODULE) diff --git a/ports/zlib/vcpkg-cmake-wrapper.cmake b/ports/zlib/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..5060c550257696 --- /dev/null +++ b/ports/zlib/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,13 @@ +set(ZLIB_ROOT "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}") +find_path(ZLIB_INCLUDE_DIR NAMES zlib.h PATHS "${ZLIB_ROOT}/include" NO_DEFAULT_PATH) +find_library(ZLIB_LIBRARY_RELEASE NAMES zlib z PATHS "${ZLIB_ROOT}/lib" NO_DEFAULT_PATH) +find_library(ZLIB_LIBRARY_DEBUG NAMES zlibd z PATHS "${ZLIB_ROOT}/debug/lib" NO_DEFAULT_PATH) +if(NOT ZLIB_INCLUDE_DIR OR NOT ZLIB_LIBRARY_RELEASE OR (NOT ZLIB_LIBRARY_DEBUG AND EXISTS "${ZLIB_ROOT}/debug/lib")) + message("Broken installation of vcpkg port zlib") +endif() +if(CMAKE_VERSION VERSION_LESS 3.4) + include(SelectLibraryConfigurations) + select_library_configurations(ZLIB) + unset(ZLIB_FOUND) +endif() +_find_package(${ARGS}) diff --git a/ports/zlib/vcpkg.json b/ports/zlib/vcpkg.json new file mode 100644 index 00000000000000..fd85f6b122ec1f --- /dev/null +++ b/ports/zlib/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "zlib", + "version-string": "1.2.11", + "port-version": 12, + "description": "A compression library", + "homepage": "https://www.zlib.net/" +} diff --git a/ports/zookeeper/CONTROL b/ports/zookeeper/CONTROL deleted file mode 100644 index d10b1683a5db16..00000000000000 --- a/ports/zookeeper/CONTROL +++ /dev/null @@ -1,7 +0,0 @@ -Source: zookeeper -Version: 3.5.5 -Description: ZooKeeper C bindings -Default-Features: sync - -Feature: sync -Description: ZooKeeper with the sync API \ No newline at end of file diff --git a/ports/zookeeper/cmake.patch b/ports/zookeeper/cmake.patch index 4dd8ef93b15757..f47d4697e564c5 100644 --- a/ports/zookeeper/cmake.patch +++ b/ports/zookeeper/cmake.patch @@ -1,50 +1,74 @@ -diff --git a/zookeeper-client/zookeeper-client-c/CMakeLists.txt b/zookeeper-client/zookeeper-client-c/CMakeLists.txt -index 24a5a1b..1b0ce4a 100644 ---- a/zookeeper-client/zookeeper-client-c/CMakeLists.txt -+++ b/zookeeper-client/zookeeper-client-c/CMakeLists.txt -@@ -153,7 +153,7 @@ configure_file(cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.h) - # hashtable library - set(hashtable_sources src/hashtable/hashtable_itr.c src/hashtable/hashtable.c) - add_library(hashtable STATIC ${hashtable_sources}) --target_include_directories(hashtable PUBLIC include) -+target_include_directories(hashtable PUBLIC $ $) - target_link_libraries(hashtable PUBLIC $<$,$>:m>) - - # zookeeper library -@@ -176,7 +176,10 @@ if(WIN32) - endif() - - add_library(zookeeper STATIC ${zookeeper_sources}) --target_include_directories(zookeeper PUBLIC include ${CMAKE_CURRENT_BINARY_DIR}/include generated) -+target_include_directories(zookeeper PUBLIC -+ $ -+ $) -+ - target_link_libraries(zookeeper PUBLIC - hashtable - $<$:rt> # clock_gettime -@@ -247,3 +250,23 @@ if(WANT_CPPUNIT) - "ZKROOT=${CMAKE_CURRENT_SOURCE_DIR}/../.." - "CLASSPATH=$CLASSPATH:$CLOVER_HOME/lib/clover*.jar") - endif() -+ -+ -+target_compile_definitions(zookeeper PRIVATE _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE) -+target_compile_definitions(cli PRIVATE _CRT_SECURE_NO_WARNINGS) -+ -+file(GLOB ZOOKEEPER_HEADERS include/*.h) -+ -+install(FILES ${ZOOKEEPER_HEADERS} generated/zookeeper.jute.h DESTINATION include/zookeeper) -+ -+install(TARGETS zookeeper hashtable -+ EXPORT zookeeperConfig -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib -+) -+install(EXPORT zookeeperConfig -+ FILE zookeeperConfig.cmake -+ NAMESPACE zookeeper:: -+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/zookeeper" -+) -\ No newline at end of file +diff --git a/zookeeper-client/zookeeper-client-c/CMakeLists.txt b/zookeeper-client/zookeeper-client-c/CMakeLists.txt +index 24a5a1b..40fa67e 100644 +--- a/zookeeper-client/zookeeper-client-c/CMakeLists.txt ++++ b/zookeeper-client/zookeeper-client-c/CMakeLists.txt +@@ -147,13 +147,15 @@ endforeach() + include(CheckStructHasMember) + check_struct_has_member("struct sockaddr_in6" sin6_addr "netinet/in.h" ZOO_IPV6_ENABLED) + ++include(GNUInstallDirs) ++ + # configure + configure_file(cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.h) + + # hashtable library + set(hashtable_sources src/hashtable/hashtable_itr.c src/hashtable/hashtable.c) + add_library(hashtable STATIC ${hashtable_sources}) +-target_include_directories(hashtable PUBLIC include) ++target_include_directories(hashtable PUBLIC $ $) + target_link_libraries(hashtable PUBLIC $<$,$>:m>) + + # zookeeper library +@@ -176,11 +178,16 @@ if(WIN32) + endif() + + add_library(zookeeper STATIC ${zookeeper_sources}) +-target_include_directories(zookeeper PUBLIC include ${CMAKE_CURRENT_BINARY_DIR}/include generated) ++target_include_directories(zookeeper PUBLIC ++ $ ++ $ ++ $ ++ $) ++ + target_link_libraries(zookeeper PUBLIC +- hashtable + $<$:rt> # clock_gettime +- $<$:ws2_32>) # Winsock 2.0 ++ $<$:ws2_32> # Winsock 2.0 ++ PRIVATE hashtable) + + if(WANT_SYNCAPI AND NOT WIN32) + find_package(Threads REQUIRED) +@@ -189,7 +196,7 @@ endif() + + # cli executable + add_executable(cli src/cli.c) +-target_link_libraries(cli zookeeper) ++target_link_libraries(cli PRIVATE zookeeper) + + # load_gen executable + if(WANT_SYNCAPI AND NOT WIN32) +@@ -247,3 +254,23 @@ if(WANT_CPPUNIT) + "ZKROOT=${CMAKE_CURRENT_SOURCE_DIR}/../.." + "CLASSPATH=$CLASSPATH:$CLOVER_HOME/lib/clover*.jar") + endif() ++ ++ ++target_compile_definitions(zookeeper PRIVATE _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE) ++target_compile_definitions(cli PRIVATE _CRT_SECURE_NO_WARNINGS) ++ ++file(GLOB ZOOKEEPER_HEADERS include/*.h) ++ ++install(FILES ${ZOOKEEPER_HEADERS} generated/zookeeper.jute.h DESTINATION include/zookeeper) ++ ++install(TARGETS zookeeper hashtable ++ EXPORT zookeeperConfig ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++) ++install(EXPORT zookeeperConfig ++ FILE zookeeperConfig.cmake ++ NAMESPACE zookeeper:: ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/zookeeper" ++) diff --git a/ports/zookeeper/portfile.cmake b/ports/zookeeper/portfile.cmake index 2e315a61fdf447..1dfcfb376b2fcf 100644 --- a/ports/zookeeper/portfile.cmake +++ b/ports/zookeeper/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_download_distfile(ARCHIVE @@ -10,21 +8,19 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + ARCHIVE ${ARCHIVE} PATCHES cmake.patch win32.patch ) -set(SOURCE_PATH ${SOURCE_PATH}/zookeeper-client/zookeeper-client-c) - set(WANT_SYNCAPI OFF) if("sync" IN_LIST FEATURES) set(WANT_SYNCAPI ON) endif() vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/zookeeper-client/zookeeper-client-c DISABLE_PARALLEL_CONFIGURE PREFER_NINJA OPTIONS @@ -34,7 +30,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zookeeper RENAME copyright) +file(INSTALL ${SOURCE_PATH}/zookeeper-client/zookeeper-client-c/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zookeeper RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/zookeeper/vcpkg.json b/ports/zookeeper/vcpkg.json new file mode 100644 index 00000000000000..20e655e5aa6ca1 --- /dev/null +++ b/ports/zookeeper/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "zookeeper", + "version-string": "3.5.5", + "port-version": 2, + "description": "ZooKeeper C bindings", + "default-features": [ + "sync" + ], + "features": { + "sync": { + "description": "ZooKeeper with the sync API" + } + } +} diff --git a/ports/zopfli/CONTROL b/ports/zopfli/CONTROL deleted file mode 100644 index 9db22d1057fb2c..00000000000000 --- a/ports/zopfli/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: zopfli -Version: 2019-01-19-1 -Description: Zopfli Compression Algorithm compression library programmed in C diff --git a/ports/zopfli/portfile.cmake b/ports/zopfli/portfile.cmake index bb5b9c21100bdf..7ce1dfeffb871f 100644 --- a/ports/zopfli/portfile.cmake +++ b/ports/zopfli/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/zopfli - REF ef109ddf164911cf1e5612e90b4a619839a1e3ca - SHA512 9067d14c3ca7f5f07a0c4913ae1804128cf928770359618eab3c655ccbfa7260a11ec1db871a7e5be7d92098c2dda5a55b948eb779c9c64647bddfd1e9ace1f5 + REF bd64b2f0553d4f1ef4e6627647c5d9fc8c71ffc0 # zopfli-1.0.3 + SHA512 3c99a4cdf3b2f0b619944bf2173ded8e10a89271fc4b2c713378b85d976a8580d15a473d5b0e6229f2911908fb1cc7397e516d618e61831c3becd65623214d94 HEAD_REF master ) @@ -68,8 +66,4 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/zopfli/vcpkg.json b/ports/zopfli/vcpkg.json new file mode 100644 index 00000000000000..668234f532cbe7 --- /dev/null +++ b/ports/zopfli/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "zopfli", + "version-string": "1.0.3", + "port-version": 1, + "description": "Zopfli Compression Algorithm compression library programmed in C", + "homepage": "https://github.com/google/zopfli" +} diff --git a/ports/zserge-webview/CONTROL b/ports/zserge-webview/CONTROL deleted file mode 100644 index a595bee399013a..00000000000000 --- a/ports/zserge-webview/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: zserge-webview -Version: 2019-04-27-2 -Description: Tiny cross-platform webview library for C/C++/Golang. diff --git a/ports/zserge-webview/portfile.cmake b/ports/zserge-webview/portfile.cmake index 7f0603d88046bb..47b3e0c5808261 100644 --- a/ports/zserge-webview/portfile.cmake +++ b/ports/zserge-webview/portfile.cmake @@ -1,7 +1,5 @@ # header-only library -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zserge/webview diff --git a/ports/zserge-webview/vcpkg.json b/ports/zserge-webview/vcpkg.json new file mode 100644 index 00000000000000..dbdfa5bf12e410 --- /dev/null +++ b/ports/zserge-webview/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "zserge-webview", + "version-string": "2019-04-27", + "port-version": 3, + "description": "Tiny cross-platform webview library for C/C++/Golang." +} diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL deleted file mode 100644 index bab75367d7d3aa..00000000000000 --- a/ports/zstd/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: zstd -Version: 1.4.0 -Description: Zstandard - Fast real-time compression algorithm -Homepage: https://facebook.github.io/zstd/ diff --git a/ports/zstd/enable-debug-mode.patch b/ports/zstd/enable-debug-mode.patch deleted file mode 100644 index a3e829032267e1..00000000000000 --- a/ports/zstd/enable-debug-mode.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt -index 1e2921d..31fe3d5 100644 ---- a/build/cmake/CMakeLists.txt -+++ b/build/cmake/CMakeLists.txt -@@ -12,7 +12,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9) - SET(ZSTD_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") - - # Ensure Release build even if not invoked via Makefile --SET(CMAKE_BUILD_TYPE "Release") -+# SET(CMAKE_BUILD_TYPE "Release") - - LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") - INCLUDE(GNUInstallDirs) diff --git a/ports/zstd/fix-c4703-error.patch b/ports/zstd/fix-c4703-error.patch new file mode 100644 index 00000000000000..9af18d74125df3 --- /dev/null +++ b/ports/zstd/fix-c4703-error.patch @@ -0,0 +1,15 @@ +diff --git a/lib/compress/zstd_lazy.c b/lib/compress/zstd_lazy.c +index 3d523e8..3dd1426 100644 +--- a/lib/compress/zstd_lazy.c ++++ b/lib/compress/zstd_lazy.c +@@ -1296,8 +1296,8 @@ size_t ZSTD_RowFindBestMatch_generic ( + size_t ddsIdx; + U32 ddsExtraAttempts; /* cctx hash tables are limited in searches, but allow extra searches into DDS */ + U32 dmsTag; +- U32* dmsRow; +- BYTE* dmsTagRow; ++ U32* dmsRow = NULL; ++ BYTE* dmsTagRow = NULL; + + if (dictMode == ZSTD_dedicatedDictSearch) { + const U32 ddsHashLog = dms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG; diff --git a/ports/zstd/install_pkgpc.patch b/ports/zstd/install_pkgpc.patch new file mode 100644 index 00000000000000..a0582d98b21cc3 --- /dev/null +++ b/ports/zstd/install_pkgpc.patch @@ -0,0 +1,13 @@ +diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt +index 5f75665..dabc9d5 100644 +--- a/build/cmake/lib/CMakeLists.txt ++++ b/build/cmake/lib/CMakeLists.txt +@@ -130,7 +130,7 @@ if (ZSTD_BUILD_STATIC) + OUTPUT_NAME ${STATIC_LIBRARY_BASE_NAME}) + endif () + +-if (UNIX OR MINGW) ++if (1) + # pkg-config + set(PREFIX "${CMAKE_INSTALL_PREFIX}") + set(EXEC_PREFIX "\${prefix}") diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index 4b7522c7619284..f15e717100fab9 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -1,53 +1,69 @@ -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/zstd - REF v1.4.0 - SHA512 8614934e25eb1e82b554c483bc9d2d055f51344697295e83b22a8d726321b12068cfa7f7d2a9fe28a2de7c9edda59733826277efc7046e13674d6f7f02af5671 + REF a488ba114ec17ea1054b9057c26a046fc122b3b6 #v1.5.0 + SHA512 659576d0f52d2271b6b53f638b407b873888b1cffe4f014c3149d33a961653c2fcf7ff270bc669a5647205b573ef2809907645a4c89ab6c030ad65bce15547ae HEAD_REF dev - PATCHES enable-debug-mode.patch + PATCHES + install_pkgpc.patch + fix-c4703-error.patch ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(ZSTD_STATIC 1) - set(ZSTD_SHARED 0) -else() - set(ZSTD_STATIC 0) - set(ZSTD_SHARED 1) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ZSTD_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZSTD_BUILD_SHARED) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) +if(VCPKG_TARGET_IS_WINDOWS) # Enable multithreaded mode. CMake build doesn't provide a multithreaded # library target, but it is the default in Makefile and VS projects. set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -DZSTD_MULTITHREAD") set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS}") endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/build/cmake - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/build/cmake" OPTIONS - -DZSTD_BUILD_SHARED=${ZSTD_SHARED} - -DZSTD_BUILD_STATIC=${ZSTD_STATIC} + -DZSTD_BUILD_SHARED=${ZSTD_BUILD_SHARED} + -DZSTD_BUILD_STATIC=${ZSTD_BUILD_STATIC} -DZSTD_LEGACY_SUPPORT=1 -DZSTD_BUILD_PROGRAMS=0 -DZSTD_BUILD_TESTS=0 -DZSTD_BUILD_CONTRIB=0 OPTIONS_DEBUG - -DCMAKE_DEBUG_POSTFIX=d) + -DCMAKE_DEBUG_POSTFIX=d) # this is against the maintainer guidelines. + # Removing it probably requires a vcpkg-cmake-wrapper.cmake to correct downstreams FindZSTD.cmake -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/zstd) + +# This enables find_package(ZSTD) and find_package(zstd) to find zstd on Linux(case sensitive filesystems) +file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/zstdConfig.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/zstd-config.cmake") +file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/zstdConfigVersion.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/zstd-configVersion.cmake") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND VCPKG_TARGET_IS_WINDOWS) + set(static_suffix "_static") +else() + set(static_suffix ) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libzstd.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libzstd.pc" "-lzstd" "-lzstd${static_suffix}") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzstd.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzstd.pc" "-lzstd" "-lzstd${static_suffix}d") +endif() + +vcpkg_fixup_pkgconfig() -if((VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") foreach(HEADER zdict.h zstd.h zstd_errors.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} HEADER_CONTENTS) - string(REPLACE "defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${HEADER_CONTENTS}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${HEADER}" "defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)" "1" ) endforeach() endif() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zstd) -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/zstd) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/zstd/copyright "ZSTD is dual licensed - see LICENSE and COPYING files\n") +file(COPY "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(COPY "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "ZSTD is dual licensed - see LICENSE and COPYING files\n") + + diff --git a/ports/zstd/vcpkg.json b/ports/zstd/vcpkg.json new file mode 100644 index 00000000000000..b0f5e21a8c55fb --- /dev/null +++ b/ports/zstd/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "zstd", + "version-semver": "1.5.0", + "description": "Zstandard - Fast real-time compression algorithm", + "homepage": "https://facebook.github.io/zstd/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/zstr/CONTROL b/ports/zstr/CONTROL deleted file mode 100644 index fe7e50c847cbd4..00000000000000 --- a/ports/zstr/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: zstr -Version: 1.0.1 -Description: This C++ header-only library enables the use of C++ standard iostreams to access ZLib-compressed streams. \ No newline at end of file diff --git a/ports/zstr/portfile.cmake b/ports/zstr/portfile.cmake index 61244eb60aaf75..b44ddc3ebe259d 100644 --- a/ports/zstr/portfile.cmake +++ b/ports/zstr/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mateidavid/zstr - REF v1.0.1 - SHA512 616df2394c41038bc8512748a6a699cb45310ff518e75f591c7f957d6ab3da66a384755a6015c3eb588b576940cbff429ff9798985c452b6eda6e22f94dfb264 + REF v1.0.4 + SHA512 148dd7741747917d826f0caf291730e14317c700961bec6ae360c1f6a3988d5db555c36428c9641fba3cd76a63b5880dce6b2af47a4388c5451bddce45c39944 HEAD_REF master ) diff --git a/ports/zstr/vcpkg.json b/ports/zstr/vcpkg.json new file mode 100644 index 00000000000000..d0f5f31b39f3fa --- /dev/null +++ b/ports/zstr/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "zstr", + "version-string": "1.0.4", + "port-version": 1, + "description": "This C++ header-only library enables the use of C++ standard iostreams to access ZLib-compressed streams." +} diff --git a/ports/zug/portfile.cmake b/ports/zug/portfile.cmake new file mode 100644 index 00000000000000..d222436fe24f8e --- /dev/null +++ b/ports/zug/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arximboldi/zug + REF 033dadbed463ff3430b7ebc36df8a46f4f0f5078 + SHA512 a8067a90f7a427775872f8198419aa791b647e273ed148b93c189d3b81a4564a19b9321b4bb8cd5681627d8ab13e40be09ed1d75c7b65d74078f21daddaef929 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + docs zug_BUILD_DOCS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dzug_BUILD_EXAMPLES=OFF + -Dzug_BUILD_TESTS=OFF + ${FEATURE_OPTIONS} +) + + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Zug) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/zug/vcpkg.json b/ports/zug/vcpkg.json new file mode 100644 index 00000000000000..ac59f865eb87f5 --- /dev/null +++ b/ports/zug/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "zug", + "version-date": "2021-04-23", + "description": "Transducers for C++", + "homepage": "https://sinusoid.es/zug/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "docs": { + "description": "Build documentation" + } + } +} diff --git a/ports/zxing-cpp/0002-improve-features.patch b/ports/zxing-cpp/0002-improve-features.patch new file mode 100644 index 00000000000000..5776c36eac36b4 --- /dev/null +++ b/ports/zxing-cpp/0002-improve-features.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ade734..54071bd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.0) + project(zxing) + set(CMAKE_CXX_STANDARD 11) + option(BUILD_TESTING "Enable generation of test targets" OFF) ++option(WITH_OPENCV "Build with opencv" OFF) ++option(WITH_ICONV "Build with iconv" OFF) + + set(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH}) + +@@ -43,8 +45,8 @@ if(WIN32) + endif() + + # OpenCV classes +-find_package(OpenCV) +-if(OpenCV_FOUND) ++if(WITH_OPENCV) ++ find_package(OpenCV REQUIRED) + list(APPEND LIBZXING_FILES + opencv/src/zxing/MatSource.cpp + opencv/src/zxing/MatSource.h +@@ -58,10 +60,10 @@ include_directories(core/src) + add_library(libzxing ${LIBZXING_FILES}) + set_target_properties(libzxing PROPERTIES PREFIX "") + +-find_package(Iconv) +-if(ICONV_FOUND) +- include_directories(${ICONV_INCLUDE_DIR}) +- target_link_libraries(libzxing ${ICONV_LIBRARIES}) ++if(WITH_ICONV) ++ find_package(Iconv REQUIRED) ++ include_directories(${Iconv_INCLUDE_DIRS}) ++ target_link_libraries(libzxing ${Iconv_LIBRARIES}) + else() + add_definitions(-DNO_ICONV=1) + endif() diff --git a/ports/zxing-cpp/0003-fix-dependency-bigint.patch b/ports/zxing-cpp/0003-fix-dependency-bigint.patch new file mode 100644 index 00000000000000..e1453a21d63f7e --- /dev/null +++ b/ports/zxing-cpp/0003-fix-dependency-bigint.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0f172d3..4999942 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,10 +42,13 @@ include(source_files.cmake) + if(WIN32) + include_directories(core/lib/win32) + set(CMAKE_DEBUG_POSTFIX -debug) +-else() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() + ++# Bigint ++find_package(bigint CONFIG REQUIRED) ++ ++link_libraries(bigint::bigint) ++ + # OpenCV classes + if(WITH_OPENCV) + find_package(OpenCV REQUIRED) +diff --git a/source_files.cmake b/source_files.cmake +index db3d8d4..39abe82 100644 +--- a/source_files.cmake ++++ b/source_files.cmake +@@ -1,28 +1,4 @@ + set(LIBZXING_FILES +- core/src/bigint/BigInteger.cc +- core/src/bigint/BigInteger.cc +- core/src/bigint/BigInteger.hh +- core/src/bigint/BigInteger.hh +- core/src/bigint/BigIntegerAlgorithms.cc +- core/src/bigint/BigIntegerAlgorithms.cc +- core/src/bigint/BigIntegerAlgorithms.hh +- core/src/bigint/BigIntegerAlgorithms.hh +- core/src/bigint/BigIntegerLibrary.hh +- core/src/bigint/BigIntegerLibrary.hh +- core/src/bigint/BigIntegerUtils.cc +- core/src/bigint/BigIntegerUtils.cc +- core/src/bigint/BigIntegerUtils.hh +- core/src/bigint/BigIntegerUtils.hh +- core/src/bigint/BigUnsigned.cc +- core/src/bigint/BigUnsigned.cc +- core/src/bigint/BigUnsigned.hh +- core/src/bigint/BigUnsigned.hh +- core/src/bigint/BigUnsignedInABase.cc +- core/src/bigint/BigUnsignedInABase.cc +- core/src/bigint/BigUnsignedInABase.hh +- core/src/bigint/BigUnsignedInABase.hh +- core/src/bigint/NumberlikeArray.hh +- core/src/bigint/NumberlikeArray.hh + core/src/zxing/aztec/AztecDetectorResult.cpp + core/src/zxing/aztec/AztecDetectorResult.h + core/src/zxing/aztec/AztecReader.cpp diff --git a/ports/zxing-cpp/CONTROL b/ports/zxing-cpp/CONTROL deleted file mode 100644 index 16343782db3bc6..00000000000000 --- a/ports/zxing-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: zxing-cpp -Version: 3.3.3-6 -Build-Depends: opencv -Description: Barcode detection and decoding library. diff --git a/ports/zxing-cpp/portfile.cmake b/ports/zxing-cpp/portfile.cmake index 044342ed660ff5..ce2a45669f7601 100644 --- a/ports/zxing-cpp/portfile.cmake +++ b/ports/zxing-cpp/portfile.cmake @@ -1,25 +1,39 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO glassechidna/zxing-cpp - REF 5aad4744a3763d814df98a18886979893e638274 - SHA512 a079ad47171224de4469e76bf0779b6ebc9c6dfb3604bd5dbf5e6e5f321d9e6255f689daa749855f8400023602f1773214013c006442e9b32dd4b8146c888c02 + REF e0e40ddec63f38405aca5c8c1ff60b85ec8b1f10 + SHA512 222be56e3937136bd699a5d259a068b354ffcd34287bc8e0e8c33b924e9760501b81c56420d8062e0a924fefe95451778781b2aaa07207b0f18ce4ec33732581 HEAD_REF master PATCHES - 0001-opencv4-compat.patch + 0001-opencv4-compat.patch + 0002-improve-features.patch + 0003-fix-dependency-bigint.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindModules/FindIconv.cmake) +# Depends on port bigint +file(REMOVE_RECURSE ${SOURCE_PATH}/core/src/bigint) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + opencv WITH_OPENCV + iconv WITH_ICONV ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Iconv=ON + OPTIONS ${FEATURE_OPTIONS} ) vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/zxing/cmake TARGET_PATH share/zxing) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) @@ -28,18 +42,12 @@ if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStor else() file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) endif() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/zxing) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/zxing) # Handle copyright -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/zxing-cpp) -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/zxing-cpp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/zxing-cpp/COPYING ${CURRENT_PACKAGES_DIR}/share/zxing-cpp/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/zxing-cpp/vcpkg.json b/ports/zxing-cpp/vcpkg.json new file mode 100644 index 00000000000000..feb43da34a559a --- /dev/null +++ b/ports/zxing-cpp/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "zxing-cpp", + "version-string": "2020-12", + "port-version": 3, + "description": "Barcode detection and decoding library.", + "homepage": "https://github.com/glassechidna/zxing-cpp", + "dependencies": [ + "bigint" + ], + "default-features": [ + "iconv", + "opencv" + ], + "features": { + "iconv": { + "description": "Build with libiconv", + "dependencies": [ + "libiconv" + ] + }, + "opencv": { + "description": "Build with opencv", + "dependencies": [ + "opencv" + ] + } + } +} diff --git a/ports/zydis/CONTROL b/ports/zydis/CONTROL deleted file mode 100644 index bd4f59d9528d16..00000000000000 --- a/ports/zydis/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: zydis -Version: 2.0.3 -Description: Fast and lightweight x86/x86-64 disassembler library. \ No newline at end of file diff --git a/ports/zydis/portfile.cmake b/ports/zydis/portfile.cmake index 412cbdf87717c8..eea63d5a7771b0 100644 --- a/ports/zydis/portfile.cmake +++ b/ports/zydis/portfile.cmake @@ -1,16 +1,38 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zyantific/zydis - REF v2.0.3 - SHA512 254aee734f93ee51a8b963404f79d6edfd0831867763243b8020c44ec2d7dd4cb7e445248df4a9af7cd2743c020674df482661d59d3278a44d2ad9a2e0611a39 + REF bfee99f49274a0eec3ffea16ede3a5bda9cda88f + SHA512 de47c4a22d22e753b3d06cb6210a9df2f944b0828e49d573cadb9b0c37d590a44db74542e07eced4b0188a97b825f4990943bab1b14edfd58d80368de4299759 HEAD_REF master ) +vcpkg_from_github( + OUT_SOURCE_PATH ZYCORE_SOURCE_PATH + REPO zyantific/zycore-c + REF 3435866ecaa837376807ce934d2088ae46aa3fa3 + SHA512 7e25254a0c17158789a3eca417cea8abe6a938cdc91cb395bd0ce1d791c8bd6b4ee0c994ca6c8372e17c03abfb3653c9053c5d56e0a4641d765c8474fae771d2 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(ZYDIS_BUILD_SHARED_LIB OFF) +else() + set(ZYDIS_BUILD_SHARED_LIB ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + "-DZYDIS_BUILD_SHARED_LIB=${ZYDIS_BUILD_SHARED_LIB}" + "-DZYDIS_ZYCORE_PATH=${ZYCORE_SOURCE_PATH}" +) + +vcpkg_install_cmake() + +vcpkg_configure_cmake( + SOURCE_PATH ${ZYCORE_SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() @@ -27,5 +49,4 @@ endif() vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/zydis/vcpkg.json b/ports/zydis/vcpkg.json new file mode 100644 index 00000000000000..1a04f16a8731ee --- /dev/null +++ b/ports/zydis/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "zydis", + "version-string": "3.1.0", + "port-version": 2, + "description": "Fast and lightweight x86/x86-64 disassembler library.", + "homepage": "https://zydis.re" +} diff --git a/ports/zyre/CONTROL b/ports/zyre/CONTROL deleted file mode 100644 index ca8a4507e31edb..00000000000000 --- a/ports/zyre/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: zyre -Version: 2019-07-07 -Build-Depends: czmq -Description: An open-source framework for proximity-based peer-to-peer applications -Homepage: https://github.com/zeromq/zyre diff --git a/ports/zyre/portfile.cmake b/ports/zyre/portfile.cmake index db7e8e8ccde2e9..e2a3f9878bab27 100644 --- a/ports/zyre/portfile.cmake +++ b/ports/zyre/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/zyre @@ -50,25 +48,7 @@ file(COPY DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} ) -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() - -file(COPY ${CURRENT_PACKAGES_DIR}/bin/zpinger${EXECUTABLE_SUFFIX} - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - -if(ZYRE_BUILD_SHARED) - file(REMOVE - ${CURRENT_PACKAGES_DIR}/debug/bin/zpinger${EXECUTABLE_SUFFIX} - ${CURRENT_PACKAGES_DIR}/bin/zpinger${EXECUTABLE_SUFFIX}) -else() - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() +vcpkg_copy_tools(TOOL_NAMES zpinger AUTO_CLEAN) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -82,6 +62,3 @@ endif() # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) - -# CMake integration test -vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/ports/zyre/vcpkg.json b/ports/zyre/vcpkg.json new file mode 100644 index 00000000000000..ca7068be0f19e3 --- /dev/null +++ b/ports/zyre/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "zyre", + "version-string": "2019-07-07", + "port-version": 2, + "description": "An open-source framework for proximity-based peer-to-peer applications", + "homepage": "https://github.com/zeromq/zyre", + "dependencies": [ + "czmq" + ] +} diff --git a/ports/zziplib/CMakeLists.txt b/ports/zziplib/CMakeLists.txt deleted file mode 100644 index 634bc5edb85d69..00000000000000 --- a/ports/zziplib/CMakeLists.txt +++ /dev/null @@ -1,89 +0,0 @@ -cmake_minimum_required(VERSION 3.0) - -include(GNUInstallDirs) - -project(zziplib C) - -find_package(zlib) - -include_directories(${ZLIB_INCLUDE_DIRS}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -if(MSVC) - set(CMAKE_DEBUG_POSTFIX "d") - add_definitions(-D_CRT_SECURE_NO_DEPRECATE) - add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) -endif() - -if(UNIX) - # Find autotools output - set(ZZLIB_AUTOOLS_INCLUDE_DIRS) - file(GLOB CHILDREN RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*") - foreach(CHILD ${CHILDREN}) - string(REGEX MATCH "x86_64*" ZZLIB_AUTOOLS_OUTPUT_FOLDER "${CHILD}") - if (ZZLIB_AUTOOLS_OUTPUT_FOLDER) - set(ZZLIB_AUTOOLS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${CHILD}) - include_directories(${ZZLIB_AUTOOLS_INCLUDE_DIRS}) - include_directories(${ZZLIB_AUTOOLS_INCLUDE_DIRS}/zzip) - endif() - endforeach() -endif() - -configure_file("${CMAKE_CURRENT_LIST_DIR}/config.h.in" "${CMAKE_CURRENT_LIST_DIR}/zzip/config.h") -# List the header files -set(HEADERS zzip/__debug.h - zzip/__dirent.h - zzip/__fnmatch.h - zzip/__hints.h - zzip/__mmap.h - zzip/config.h - zzip/_msvc.h - zzip/autoconf.h - zzip/conf.h - zzip/fetch.h - zzip/file.h - zzip/format.h - zzip/fseeko.h - zzip/info.h - zzip/lib.h - zzip/memdisk.h - zzip/mmapped.h - zzip/plugin.h - zzip/stdint.h - zzip/types.h - zzip/write.h - zzip/zzip.h -) -if(UNIX) - file(GLOB OTHER_HEADERS ${ZZLIB_AUTOOLS_INCLUDE_DIRS}/zzip/*.h) - list(APPEND HEADERS ${OTHER_HEADERS}) -else() - list(APPEND HEADERS zzip/_msvc.h) -endif() - -# List the source files -set(SRCS zzip/dir.c - zzip/err.c - zzip/fetch.c - zzip/file.c - zzip/info.c - zzip/plugin.c - zzip/stat.c - zzip/zip.c -) - -add_library(zziplib ${SRCS} ${HEADERS}) - -if(BUILD_SHARED_LIBS) - target_compile_definitions(zziplib PRIVATE -DZZIPLIB_EXPORTS) -endif() - -target_link_libraries(zziplib ${ZLIB_LIBRARIES}) - -install(TARGETS zziplib - COMPONENT runtime - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) - -install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zzip) diff --git a/ports/zziplib/CONTROL b/ports/zziplib/CONTROL deleted file mode 100644 index cd879d0a33f064..00000000000000 --- a/ports/zziplib/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: zziplib -Version: 0.13.69-4 -Build-Depends: zlib -Homepage: https://github.com/gdraheim/zziplib -Description: library providing read access on ZIP-archives diff --git a/ports/zziplib/always-find-unixcommands-on-unix.patch b/ports/zziplib/always-find-unixcommands-on-unix.patch new file mode 100644 index 00000000000000..9d3a39ade7b975 --- /dev/null +++ b/ports/zziplib/always-find-unixcommands-on-unix.patch @@ -0,0 +1,13 @@ +diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt +index 52555d4..de06eae 100644 +--- a/zzip/CMakeLists.txt ++++ b/zzip/CMakeLists.txt +@@ -27,7 +27,7 @@ set(ZZIP_VERSION "${PROJECT_VERSION}") + set(ZZIP_PACKAGE_NAME "${PROJECT_NAME}lib") + set(ZZIP_PACKAGE_VERSION "${PROJECT_VERSION}") + +-if(ZZIPCOMPAT) ++if(UNIX) + find_package ( UnixCommands REQUIRED ) # bash cp mv rm gzip tar + endif() + diff --git a/ports/zziplib/fix-export-define.patch b/ports/zziplib/fix-export-define.patch new file mode 100644 index 00000000000000..b57a9a6988fcdc --- /dev/null +++ b/ports/zziplib/fix-export-define.patch @@ -0,0 +1,13 @@ +diff --git a/zzip/conf.h b/zzip/conf.h +index 27b834a..7f01456 100644 +--- a/zzip/conf.h ++++ b/zzip/conf.h +@@ -203,7 +203,7 @@ + # endif + + +-#if defined ZZIP_EXPORTS || defined ZZIPLIB_EXPORTS ++#if defined ZZIP_EXPORTS || defined ZZIPLIB_EXPORTS || defined libzzip_EXPORTS // CMake export defines + # undef ZZIP_DLL + #define ZZIP_DLL 1 + #endif diff --git a/ports/zziplib/install-dll-to-proper-folder.patch b/ports/zziplib/install-dll-to-proper-folder.patch new file mode 100644 index 00000000000000..4361fb983aa00a --- /dev/null +++ b/ports/zziplib/install-dll-to-proper-folder.patch @@ -0,0 +1,27 @@ +diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt +index a9f6e3a..f3a758b 100644 +--- a/zzip/CMakeLists.txt ++++ b/zzip/CMakeLists.txt +@@ -247,12 +247,14 @@ endif() + + install(FILES ${libzzip_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zzip ) + install(TARGETS libzzip ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + if(ZZIPFSEEKO) + install(FILES ${libzzipfseeko_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zzip ) + install(TARGETS libzzipfseeko ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +@@ -260,6 +262,7 @@ endif() + if(ZZIPMMAPPED) + install(FILES ${libzzipmmapped_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zzip ) + install(TARGETS libzzipmmapped ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() diff --git a/ports/zziplib/no-release-postfix.patch b/ports/zziplib/no-release-postfix.patch new file mode 100644 index 00000000000000..f81c7451357bfe --- /dev/null +++ b/ports/zziplib/no-release-postfix.patch @@ -0,0 +1,24 @@ +diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt +index a9f6e3a..407827b 100644 +--- a/zzip/CMakeLists.txt ++++ b/zzip/CMakeLists.txt +@@ -180,16 +180,16 @@ target_link_libraries(libzzipmmapped ZLIB::ZLIB ) + target_include_directories (libzzipmmapped PRIVATE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) + endif() + +-set_target_properties(libzzip PROPERTIES OUTPUT_NAME "zzip" RELEASE_POSTFIX "-${RELNUM}") ++set_target_properties(libzzip PROPERTIES OUTPUT_NAME "zzip") + SET_TARGET_PROPERTIES(libzzip PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM}) + + if(ZZIPFSEEKO) +-set_target_properties(libzzipfseeko PROPERTIES OUTPUT_NAME "zzipfseeko" RELEASE_POSTFIX "-${RELNUM}") ++set_target_properties(libzzipfseeko PROPERTIES OUTPUT_NAME "zzipfseeko") + SET_TARGET_PROPERTIES(libzzipfseeko PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM}) + endif() + + if(ZZIPMMAPPED) +-set_target_properties(libzzipmmapped PROPERTIES OUTPUT_NAME "zzipmmapped" RELEASE_POSTFIX "-${RELNUM}") ++set_target_properties(libzzipmmapped PROPERTIES OUTPUT_NAME "zzipmmapped") + SET_TARGET_PROPERTIES(libzzipmmapped PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM}) + endif() + diff --git a/ports/zziplib/portfile.cmake b/ports/zziplib/portfile.cmake index 7ca3ca2c477b41..cc1d4905475b2a 100644 --- a/ports/zziplib/portfile.cmake +++ b/ports/zziplib/portfile.cmake @@ -1,29 +1,49 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gdraheim/zziplib - REF v0.13.69 - SHA512 ade026289737f43ca92a8746818d87dd7618d473dbce159546ce9071c9e4cbe164a6b1c9efff16efb7aa0327b2ec6b34f3256c6bda19cd6e325703fffc810ef0 + REF 24a6c6de1956189bffcd8dffd2ef3197c6f3df29 # v0.13.71 + SHA512 246ee1d93f3f8a6889e9ab362e04e6814813844f2cdea0a782910bf07ca55ecd6d8b1c456b4180935464cebf291e7849af27ac0ed5cc080de5fb158f9f3aeffb + PATCHES + install-dll-to-proper-folder.patch + no-release-postfix.patch + fix-export-define.patch + always-find-unixcommands-on-unix.patch ) -# Run configure -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - message(STATUS "Configuring zziplib") - vcpkg_execute_required_process( - COMMAND "./configure" --prefix=${CURRENT_INSTALLED_DIR} --with-zlib - WORKING_DIRECTORY "${SOURCE_PATH}" - LOGNAME "autotools-config-${TARGET_TRIPLET}" - ) +if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(MSVC_STATIC_RUNTIME ON) +else() + set(MSVC_STATIC_RUNTIME OFF) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(BUILD_STATIC_LIBS ON) +else() + set(BUILD_STATIC_LIBS OFF) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + set(ZZIPLIBTOOL OFF) endif() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS") +set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - DISABLE_PARALLEL_CONFIGURE - OPTIONS -DZLIB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include + OPTIONS + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DMSVC_STATIC_RUNTIME=${MSVC_STATIC_RUNTIME} + -DZZIPMMAPPED=OFF + -DZZIPFSEEKO=OFF + -DZZIPWRAP=OFF + -DZZIPSDL=OFF + -DZZIPBINS=OFF + -DZZIPTEST=OFF + -DZZIPDOCS=OFF + -DZZIPCOMPAT=OFF + -DZZIPLIBTOOL=${ZZIPLIBTOOL} ) vcpkg_install_cmake() @@ -31,5 +51,4 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/zziplib) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/zziplib/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/zziplib/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/zziplib/vcpkg.json b/ports/zziplib/vcpkg.json new file mode 100644 index 00000000000000..95279853a3dac6 --- /dev/null +++ b/ports/zziplib/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "zziplib", + "version-string": "0.13.71", + "port-version": 2, + "description": "library providing read access on ZIP-archives", + "homepage": "https://github.com/gdraheim/zziplib", + "dependencies": [ + "zlib" + ] +} diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1 index 1dd27aacff564e..185f658c984a0d 100644 --- a/scripts/addPoshVcpkgToPowershellProfile.ps1 +++ b/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -16,7 +16,7 @@ function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string] $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition $profileEntry = "Import-Module '$scriptsDir\posh-vcpkg'" -$profilePath = $PROFILE # Implicit powershell variable +$profilePath = $PROFILE # Implicit PowerShell variable $profileDir = Split-Path $profilePath -Parent if (!(Test-Path $profileDir)) { @@ -33,7 +33,7 @@ if ($existingImports.Count -gt 0) $existingImportsOut = $existingImports -join "`n " Write-Host "`nposh-vcpkg is already imported to your PowerShell profile. The following entries were found:" Write-Host " $existingImportsOut" - Write-Host "`nPlease make sure you have started a new Powershell window for the changes to take effect." + Write-Host "`nPlease make sure you have started a new PowerShell window for the changes to take effect." return } @@ -53,4 +53,4 @@ if (Test-Path $profilePath) } Add-Content $profilePath -Value "`n$profileEntry" -Encoding UTF8 -Write-Host "`nSuccessfully added posh-vcpkg to your PowerShell profile. Please start a new Powershell window for the changes to take effect." +Write-Host "`nSuccessfully added posh-vcpkg to your PowerShell profile. Please start a new PowerShell window for the changes to take effect." diff --git a/scripts/azure-pipelines/Create-PRDiff.ps1 b/scripts/azure-pipelines/Create-PRDiff.ps1 new file mode 100644 index 00000000000000..59911808921e56 --- /dev/null +++ b/scripts/azure-pipelines/Create-PRDiff.ps1 @@ -0,0 +1,20 @@ +[CmdletBinding(PositionalBinding=$False)] +Param( + [Parameter(Mandatory=$True)] + [String]$DiffFile +) + +Start-Process -FilePath 'git' -ArgumentList 'diff' ` + -NoNewWindow -Wait ` + -RedirectStandardOutput $DiffFile +if (0 -ne (Get-Item -LiteralPath $DiffFile).Length) +{ + $msg = @( + 'The formatting of the files in the repo were not what we expected,', + 'or the documentation was not regenerated.', + 'Please access the diff from format.diff in the build artifacts,' + 'and apply the patch with `git apply`' + ) + Write-Error ($msg -join "`n") + throw +} \ No newline at end of file diff --git a/scripts/azure-pipelines/analyze-test-results.ps1 b/scripts/azure-pipelines/analyze-test-results.ps1 new file mode 100755 index 00000000000000..29cf01cc30d04d --- /dev/null +++ b/scripts/azure-pipelines/analyze-test-results.ps1 @@ -0,0 +1,453 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Analyze the test results as output by the CI system. + +.DESCRIPTION +Takes the set of port test results from $logDir, +and the baseline from $baselineFile, and makes certain that the set +of failures we expected are exactly the set of failures we got. +Then, uploads the logs from any unexpected failures. + +.PARAMETER logDir +Directory of xml test logs to analyze. + +.PARAMETER allResults +Include tests that have no change from the baseline in the output. + +.PARAMETER triplet +The triplet to analyze. + +.PARAMETER baselineFile +The path to the ci.baseline.txt file in the vcpkg repository. + +.PARAMETER passingIsPassing +Indicates that 'Passing, remove from fail list' results should not be emitted as failures. (For example, this is used +when using vcpkg to test a prerelease MSVC++ compiler) +#> +[CmdletBinding()] +Param( + [Parameter(Mandatory = $true)] + [string]$logDir, + [switch]$allResults, + [Parameter(Mandatory = $true)] + [string]$triplet, + [Parameter(Mandatory = $true)] + [string]$baselineFile, + [switch]$passingIsPassing = $false +) + +$ErrorActionPreference = 'Stop' + +if ( -not (Test-Path $logDir) ) { + [System.Console]::Error.WriteLine("Log directory does not exist: $logDir") + exit +} + +<# +.SYNOPSIS +Creates an object the represents the test run. + +.DESCRIPTION +build_test_results takes an XML file of results from the CI run, +and constructs an object based on that XML file for further +processing. + +.OUTPUTS +An object with the following elements: + assemblyName: + assemblyStartDate: + assemblyStartTime: + assemblyTime: + collectionName: + collectionTime: + allTests: A hashtable with an entry for each port tested + The key is the name of the port + The value is an object with the following elements: + name: Name of the port (Does not include the triplet name) + result: Pass/Fail/Skip result from xunit + time: Test time in seconds + originalResult: Result as defined by Build.h in vcpkg source code + abi_tag: The port hash + features: The features installed + +.PARAMETER xmlFilename +The path to the XML file to parse. +#> +function build_test_results { + [CmdletBinding()] + Param + ( + [string]$xmlFilename + ) + if ( ($xmlFilename.Length -eq 0) -or ( -not( Test-Path $xmlFilename))) { + #write-error "Missing file: $xmlFilename" + return $null + } + + Write-Verbose "building test hash for $xmlFilename" + + [xml]$xmlContents = Get-Content $xmlFilename + + # This currently only supports one collection per assembly, which is the way + # the vcpkg tests are designed to run in the pipeline. + $xmlAssembly = $xmlContents.assemblies.assembly + $assemblyName = $xmlAssembly.name + $assemblyStartDate = $xmlAssembly."run-date" + $assemblyStartTime = $xmlAssembly."run-time" + $assemblyTime = $xmlAssembly.time + $xmlCollection = $xmlAssembly.collection + $collectionName = $xmlCollection.name + $collectionTime = $xmlCollection.time + + $allTestResults = @{ } + foreach ( $test in $xmlCollection.test) { + if (!$test.name.endswith(":$triplet")) + { + continue + } + $name = ($test.name -replace ":.*$") + + # Reconstruct the original BuildResult enumeration (defined in Build.h) + # failure.message - why the test failed (valid only on test failure) + # reason - why the test was skipped (valid only when the test is skipped) + # case BuildResult::POST_BUILD_CHECKS_FAILED: + # case BuildResult::FILE_CONFLICTS: + # case BuildResult::BUILD_FAILED: + # case BuildResult::EXCLUDED: + # case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: + $originalResult = "NULLVALUE" + switch ($test.result) { + "Skip" { + $originalResult = $test.reason.InnerText + } + "Fail" { + $originalResult = $test.failure.message.InnerText + } + "Pass" { + $originalResult = "SUCCEEDED" + } + } + + $abi_tag = "" + $features = "" + foreach ( $trait in $test.traits.trait) { + switch ( $trait.name ) { + "abi_tag" { $abi_tag = $trait.value } + "features" { $features = $trait.value } + } + } + + # If additional fields get saved in the XML, then they should be added to this hash + # also consider using a PSCustomObject here instead of a hash + $testHash = @{ name = $name; result = $test.result; time = $test.time; originalResult = $originalResult; abi_tag = $abi_tag; features = $features } + $allTestResults[$name] = $testHash + } + + return @{ + assemblyName = $assemblyName; + assemblyStartDate = $assemblyStartDate; + assemblyStartTime = $assemblyStartTime; + assemblyTime = $assemblyTime; + collectionName = $collectionName; + collectionTime = $collectionTime; + allTests = $allTestResults + } +} + +<# +.SYNOPSIS +Creates an object that represents the baseline expectations. + +.DESCRIPTION +build_baseline_results converts the baseline file to an object representing +the expectations set up by the baseline file. It records four states: + 1) fail + 2) skip + 3) ignore + 4) pass -- this is represented by not being recorded +In other words, if a port is not contained in the object returned by this +cmdlet, expect it to pass. + +.OUTPUTS +An object containing the following fields: + collectionName: the triplet + fail: ports marked as fail + skip: ports marked as skipped + ignore: ports marked as ignore + +.PARAMETER baselineFile +The path to vcpkg's ci.baseline.txt. + +.PARAMETER triplet +The triplet to create the result object for. +#> +function build_baseline_results { + [CmdletBinding()] + Param( + $baselineFile, + $triplet + ) + #read in the file, strip out comments and blank lines and spaces, leave only the current triplet + #remove comments, remove empty lines, remove whitespace, then keep only those lines for $triplet + $baseline_list_raw = Get-Content -Path $baselineFile ` + | Where-Object { -not ($_ -match "\s*#") } ` + | Where-Object { -not ( $_ -match "^\s*$") } ` + | ForEach-Object { $_ -replace "\s" } ` + | Where-Object { $_ -match ":$triplet=" } + + #filter to skipped and trim the triplet + $skip_hash = @{ } + foreach ( $port in $baseline_list_raw | ? { $_ -match "=skip$" } | % { $_ -replace ":.*$" }) { + if ($skip_hash[$port] -ne $null) { + [System.Console]::Error.WriteLine("$($port):$($triplet) has multiple definitions in $baselineFile") + } + $skip_hash[$port] = $true + } + $fail_hash = @{ } + $baseline_list_raw | ? { $_ -match "=fail$" } | % { $_ -replace ":.*$" } | ? { $fail_hash[$_] = $true } | Out-Null + $ignore_hash = @{ } + $baseline_list_raw | ? { $_ -match "=ignore$" } | % { $_ -replace ":.*$" } | ? { $ignore_hash[$_] = $true } | Out-Null + + return @{ + collectionName = $triplet; + skip = $skip_hash; + fail = $fail_hash; + ignore = $ignore_hash + } +} + +<# +.SYNOPSIS +Analyzes the results of the current run against the baseline. + +.DESCRIPTION +combine_results compares the results to the baselie, and generates the results +for the CI -- whether it should pass or fail. + +.OUTPUTS +An object containing the following: +(Note that this is not the same data structure as build_test_results) + assemblyName: + assemblyStartDate: + assemblyStartTime: + assemblyTime: + collectionName: + collectionTime: + allTests: A hashtable of each port with a different status from the baseline + The key is the name of the port + The value is an object with the following data members: + name: The name of the port + result: xunit test result Pass/Fail/Skip + message: Human readable message describing the test result + time: time the current test results took to run. + baselineResult: + currentResult: + features: + ignored: list of ignored tests + +.PARAMETER baseline +The baseline object to use from build_baseline_results. + +.PARAMETER current +The results object to use from build_test_results. +#> +function combine_results { + [CmdletBinding()] + Param + ( + $baseline, + $current + ) + + if ($baseline.collectionName -ne $current.collectionName) { + Write-Warning "Comparing mismatched collections $($baseline.collectionName) and $($current.collectionName)" + } + + $currentTests = $current.allTests + + # lookup table with the results of all of the tests + $allTestResults = @{ } + + $ignoredList = @() + + Write-Verbose "analyzing $($currentTests.count) tests" + + foreach ($key in $currentTests.keys) { + Write-Verbose "analyzing $key" + + $message = $null + $result = $null + $time = $null + $currentResult = $null + $features = $currentTest.features + + $baselineResult = "Pass" + if ($baseline.fail[$key] -ne $null) { + Write-Verbose "$key is failing" + $baselineResult = "Fail" + } + elseif ( $baseline.skip[$key] -ne $null) { + Write-Verbose "$key is skipped" + $baselineResult = "Skip" + } + elseif ( $baseline.ignore[$key] -ne $null) { + $baselineResult = "ignore" + } + + $currentTest = $currentTests[$key] + + if ( $currentTest.result -eq $baselineResult) { + Write-Verbose "$key has no change from baseline" + $currentResult = $currentTest.result + if ($allResults) { + # Only marking regressions as failures but keep the skipped status + if ($currentResult -eq "Skip") { + $result = "Skip" + } + else { + $result = "Pass" + } + $message = "No change from baseline" + $time = $currentTest.time + } + } + elseif ( $baselineResult -eq "ignore") { + if ( $currentTest.result -eq "Fail" ) { + Write-Verbose "ignoring failure on $key" + $ignoredList += $key + } + } + else { + Write-Verbose "$key had a change from the baseline" + + $currentResult = $currentTest.result + # Test exists in both test runs but does not match. Determine if this is a regression + # Pass -> Fail = Fail (Regression) + # Pass -> Skip = Skip + # Fail -> Pass = Fail (need to update baseline) + # Fail -> Skip = Skip + # Skip -> Fail = Fail (Should not happen) + # Skip -> Pass = Fail (should not happen) + + $lookupTable = @{ + 'Pass' = @{ + 'Fail' = @('Fail', "Test passes in baseline but fails in current run. If expected update ci.baseline.txt with '$($key):$($current.collectionName)=fail'"); + 'Skip' = @($null, 'Test was skipped due to missing dependencies') + }; + 'Fail' = @{ + 'Pass' = @('Fail', "Test fails in baseline but now passes. Update ci.baseline.txt with '$($key):$($current.collectionName)=pass'"); + 'Skip' = @($null, 'Test fails in baseline but is skipped in current run') + }; + 'Skip' = @{ + 'Fail' = @('Skip', "Test is skipped in baseline but fails in current run. Results are ignored") + 'Pass' = @('Skip', "Test is skipped in baseline but passes in current run. Results are ignored") + } + } + $resultList = $lookupTable[$baselineResult][$currentResult] + $result = $resultList[0] + $message = $resultList[1] + $time = $currentTest.time + Write-Verbose ">$key $message" + } + + if ($result -ne $null) { + Write-Verbose "Adding $key to result list" + $allTestResults[$key] = @{ name = $key; result = $result; message = $message; time = $time; abi_tag = $currentTest.abi_tag; baselineResult = $baselineResult; currentResult = $currentResult; features = $features } + } + } + + return @{ + assemblyName = $current.assemblyName; + assemblyStartDate = $current.assemblyStartDate; + assemblyStartTime = $current.assemblyStartTime; + assemblyTime = $current.assemblyTime; + collectionName = $current.collectionName; + collectionTime = $current.collectionTime; + allTests = $allTestResults; + ignored = $ignoredList + } +} + +<# +.SYNOPSIS +Writes short errors to the CI logs. + +.DESCRIPTION +write_errors_for_summary takes a hashtable from triplets to combine_results +objects, and writes short errors to the CI logs. + +.PARAMETER complete_results +A hashtable from triplets to combine_results objects. +#> +function write_errors_for_summary { + [CmdletBinding()] + Param( + $complete_results + ) + + $failure_found = $false + + Write-Verbose "preparing error output for Azure Devops" + + foreach ($triplet in $complete_results.Keys) { + $triplet_results = $complete_results[$triplet] + + Write-Verbose "searching $triplet triplet" + + # add each port results + foreach ($testName in $triplet_results.allTests.Keys) { + $test = $triplet_results.allTests[$testName] + + Write-Verbose "checking $($testName):$triplet $($test.result)" + + if ($test.result -eq 'Fail') { + if (($test.currentResult) -eq "pass" -and $passingIsPassing) { + continue; + } + + $failure_found = $true + if ($test.currentResult -eq "pass") { + [System.Console]::Error.WriteLine( ` + "PASSING, REMOVE FROM FAIL LIST: $($test.name):$triplet ($baselineFile)" ` + ) + } + else { + [System.Console]::Error.WriteLine( ` + "REGRESSION: $($test.name):$triplet. If expected, add $($test.name):$triplet=fail to $baselineFile." ` + ) + } + } + } + } +} + + +$complete_results = @{ } +Write-Verbose "looking for $triplet logs" + +# The standard name for logs is: +# .xml +# for example: +# x64-linux.xml + +$current_test_hash = build_test_results( Convert-Path "$logDir\$($triplet).xml" ) +$baseline_results = build_baseline_results -baselineFile $baselineFile -triplet $triplet + +if ($current_test_hash -eq $null) { + [System.Console]::Error.WriteLine("Missing $triplet test results in current test run") + $missing_triplets[$triplet] = "test" +} +else { + Write-Verbose "combining results..." + $complete_results[$triplet] = combine_results -baseline $baseline_results -current $current_test_hash +} + +Write-Verbose "done analyzing results" + +# emit error last. Unlike the table output this is going to be seen in the "status" section of the pipeline +# and needs to be formatted for a single line. +write_errors_for_summary -complete_results $complete_results diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml new file mode 100644 index 00000000000000..e5102c32cdbf4e --- /dev/null +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -0,0 +1,97 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# +variables: + windows-pool: 'PrWin-2021-09-08' + linux-pool: 'PrLin-2021-09-08' + osx-pool: 'PrOsx-2021-07-27' + +stages: +- stage: FormatChecks + displayName: 'Formatting and Documentation Checks' + pool: $(windows-pool) + jobs: + - job: + workspace: + clean: resources + variables: + - name: VCPKG_DOWNLOADS + value: D:\downloads + - name: DiffFile + value: $(Build.ArtifactStagingDirectory)\format.diff + steps: + - task: Powershell@2 + displayName: 'Generate Documentation' + inputs: + filePath: 'docs/regenerate.ps1' + arguments: '-VcpkgRoot . -WarningAction Stop' + pwsh: true + - script: .\bootstrap-vcpkg.bat + displayName: 'Bootstrap vcpkg' + - script: '.\vcpkg.exe format-manifest --all' + displayName: 'Format Manifests' + - task: Powershell@2 + displayName: 'Create Diff' + inputs: + filePath: scripts/azure-pipelines/Create-PRDiff.ps1 + arguments: '-DiffFile $(DiffFile)' + pwsh: true + - task: PublishBuildArtifacts@1 + condition: failed() + displayName: 'Publish Format and Documentation Diff' + inputs: + PathtoPublish: '$(DiffFile)' + ArtifactName: 'format.diff' +- stage: RunPrTests + displayName: 'Run PR Tests:' + dependsOn: FormatChecks + jobs: + - template: windows/azure-pipelines.yml + parameters: + triplet: x86-windows + jobName: x86_windows + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: x64-windows + jobName: x64_windows + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: x64-windows-static + jobName: x64_windows_static + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: x64-windows-static-md + jobName: x64_windows_static_md + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: x64-uwp + jobName: x64_uwp + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: arm64-windows + jobName: arm64_windows + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: arm-uwp + jobName: arm_uwp + poolName: $(windows-pool) + + - template: osx/azure-pipelines.yml + parameters: + poolName: $(osx-pool) + + - template: linux/azure-pipelines.yml + parameters: + poolName: $(linux-pool) diff --git a/scripts/azure-pipelines/create-vmss-helpers.psm1 b/scripts/azure-pipelines/create-vmss-helpers.psm1 new file mode 100755 index 00000000000000..b7d862cf80e8d7 --- /dev/null +++ b/scripts/azure-pipelines/create-vmss-helpers.psm1 @@ -0,0 +1,348 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +<# +.SYNOPSIS +Returns whether there's a name collision in the resource group. + +.DESCRIPTION +Find-ResourceGroupNameCollision takes a list of resources, and checks if $Test +collides names with any of the resources. + +.PARAMETER Test +The name to test. + +.PARAMETER Resources +The list of resources. +#> +function Find-ResourceGroupNameCollision { + [CmdletBinding()] + Param([string]$Test, $Resources) + + foreach ($resource in $Resources) { + if ($resource.ResourceGroupName -eq $Test) { + return $true + } + } + + return $false +} + +<# +.SYNOPSIS +Attempts to find a name that does not collide with any resources in the resource group. + +.DESCRIPTION +Find-ResourceGroupName takes a set of resources from Get-AzResourceGroup, and finds the +first name in {$Prefix, $Prefix-1, $Prefix-2, ...} such that the name doesn't collide with +any of the resources in the resource group. + +.PARAMETER Prefix +The prefix of the final name; the returned name will be of the form "$Prefix(-[1-9][0-9]*)?" +#> +function Find-ResourceGroupName { + [CmdletBinding()] + Param([string] $Prefix) + + $resources = Get-AzResourceGroup + $result = $Prefix + $suffix = 0 + while (Find-ResourceGroupNameCollision -Test $result -Resources $resources) { + $suffix++ + $result = "$Prefix-$suffix" + } + + return $result +} + +<# +.SYNOPSIS +Returns whether there's a name collision for an image in the resource group. + +.DESCRIPTION +Find-ImageNameCollision takes a list of images, and checks if $Test +collides names with any of the image names. + +.PARAMETER Test +The name to test. + +.PARAMETER Images +The list of images. +#> +function Find-ImageNameCollision { + [CmdletBinding()] + Param([string]$Test, $Images) + + foreach ($resource in $Images) { + if ($resource.Name -eq $Test) { + return $true + } + } + + return $false +} + +<# +.SYNOPSIS +Attempts to find a name that does not collide with any images in the resource group. + +.DESCRIPTION +Find-ResourceGroupName takes a set of resources from Get-AzResourceGroup, and finds the +first name in {$Prefix, $Prefix-1, $Prefix-2, ...} such that the name doesn't collide with +any of the resources in the resource group. + +.PARAMETER Prefix +The prefix of the final name; the returned name will be of the form "$Prefix(-[1-9][0-9]*)?" +#> +function Find-ImageName { + [CmdLetBinding()] + Param([string]$ResourceGroupName, [string]$Prefix) + + $images = Get-AzImage -ResourceGroupName $ResourceGroupName + $result = $Prefix + $suffix = 0 + while (Find-ImageNameCollision -Test $result -Images $images) { + $suffix++ + $result = "$Prefix-$suffix" + } + + return $result +} + +<# +.SYNOPSIS +Generates a random password. + +.DESCRIPTION +New-Password generates a password, randomly, of length $Length, containing +only alphanumeric characters, underscore, and dash. + +.PARAMETER Length +The length of the returned password. +#> +function New-Password { + Param ([int] $Length = 32) + + # This 64-character alphabet generates 6 bits of entropy per character. + # The power-of-2 alphabet size allows us to select a character by masking a random Byte with bitwise-AND. + $alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-" + $mask = 63 + if ($alphabet.Length -ne 64) { + throw 'Bad alphabet length' + } + + [Byte[]]$randomData = [Byte[]]::new($Length) + $rng = $null + try { + $rng = [System.Security.Cryptography.RandomNumberGenerator]::Create() + $rng.GetBytes($randomData) + } + finally { + if ($null -ne $rng) { + $rng.Dispose() + } + } + + $result = '' + for ($idx = 0; $idx -lt $Length; $idx++) { + $result += $alphabet[$randomData[$idx] -band $mask] + } + + return $result +} + +<# +.SYNOPSIS +Waits for the shutdown of the specified resource. + +.DESCRIPTION +Wait-Shutdown takes a VM, and checks if there's a 'PowerState/stopped' +code; if there is, it returns. If there isn't, it waits ten seconds and +tries again. + +.PARAMETER ResourceGroupName +The name of the resource group to look up the VM in. + +.PARAMETER Name +The name of the virtual machine to wait on. +#> +function Wait-Shutdown { + [CmdletBinding()] + Param([string]$ResourceGroupName, [string]$Name) + + Write-Host "Waiting for $Name to stop..." + while ($true) { + $Vm = Get-AzVM -ResourceGroupName $ResourceGroupName -Name $Name -Status + $highestStatus = $Vm.Statuses.Count + for ($idx = 0; $idx -lt $highestStatus; $idx++) { + if ($Vm.Statuses[$idx].Code -eq 'PowerState/stopped') { + return + } + } + + Write-Host "... not stopped yet, sleeping for 10 seconds" + Start-Sleep -Seconds 10 + } +} + +<# +.SYNOPSIS +Sanitizes a name to be used in a storage account. + +.DESCRIPTION +Sanitize-Name takes a string, and removes all of the '-'s and +lowercases the string, since storage account names must have no +'-'s and must be completely lowercase alphanumeric. It then makes +certain that the length of the string is not greater than 24, +since that is invalid. + +.PARAMETER RawName +The name to sanitize. +#> +function Sanitize-Name { + [CmdletBinding()] + Param( + [string]$RawName + ) + + $result = $RawName.Replace('-', '').ToLowerInvariant() + if ($result.Length -gt 24) { + Write-Error 'Sanitized name for storage account $result was too long.' + throw + } + + return $result +} + +<# +.SYNOPSIS +Creates a new Azure virtual network with locked down firewall rules. + +.PARAMETER ResourceGroupName +The name of the resource group in which the virtual network should be created. + +.PARAMETER Location +The location (region) where the network is to be created. +#> +function Create-LockedDownNetwork { + [CmdletBinding()] + Param( + [parameter(Mandatory=$true)] + [string]$ResourceGroupName, + [parameter(Mandatory=$true)] + [string]$Location + ) + + $allFirewallRules = @() + + $allFirewallRules += New-AzNetworkSecurityRuleConfig ` + -Name AllowHTTP ` + -Description 'Allow HTTP(S)' ` + -Access Allow ` + -Protocol Tcp ` + -Direction Outbound ` + -Priority 1008 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange @(80, 443) + + $allFirewallRules += New-AzNetworkSecurityRuleConfig ` + -Name AllowSFTP ` + -Description 'Allow (S)FTP' ` + -Access Allow ` + -Protocol Tcp ` + -Direction Outbound ` + -Priority 1009 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange @(21, 22) + + $allFirewallRules += New-AzNetworkSecurityRuleConfig ` + -Name AllowDNS ` + -Description 'Allow DNS' ` + -Access Allow ` + -Protocol * ` + -Direction Outbound ` + -Priority 1010 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange 53 + + $allFirewallRules += New-AzNetworkSecurityRuleConfig ` + -Name AllowGit ` + -Description 'Allow git' ` + -Access Allow ` + -Protocol Tcp ` + -Direction Outbound ` + -Priority 1011 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange 9418 + + $allFirewallRules += New-AzNetworkSecurityRuleConfig ` + -Name DenyElse ` + -Description 'Deny everything else' ` + -Access Deny ` + -Protocol * ` + -Direction Outbound ` + -Priority 1013 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange * + + $NetworkSecurityGroupName = $ResourceGroupName + 'NetworkSecurity' + $NetworkSecurityGroup = New-AzNetworkSecurityGroup ` + -Name $NetworkSecurityGroupName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -SecurityRules $allFirewallRules + + $SubnetName = $ResourceGroupName + 'Subnet' + $Subnet = New-AzVirtualNetworkSubnetConfig ` + -Name $SubnetName ` + -AddressPrefix "10.0.0.0/16" ` + -NetworkSecurityGroup $NetworkSecurityGroup ` + -ServiceEndpoint "Microsoft.Storage" + + $VirtualNetworkName = $ResourceGroupName + 'Network' + $VirtualNetwork = New-AzVirtualNetwork ` + -Name $VirtualNetworkName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -AddressPrefix "10.0.0.0/16" ` + -Subnet $Subnet + + return $VirtualNetwork +} + +function Invoke-AzVMRunCommandWithRetries { + try { + return Invoke-AzVMRunCommand @args + } catch { + for ($idx = 0; $idx -lt 5; $idx++) { + Write-Host "Running command failed. $_ Retrying after 10 seconds..." + Start-Sleep -Seconds 10 + try { + return Invoke-AzVMRunCommand @args + } catch { + # ignore + } + } + + Write-Host "Running command failed too many times. Giving up!" + throw $_ + } +} + +Export-ModuleMember -Function Find-ResourceGroupName +Export-ModuleMember -Function Find-ImageName +Export-ModuleMember -Function New-Password +Export-ModuleMember -Function Wait-Shutdown +Export-ModuleMember -Function Sanitize-Name +Export-ModuleMember -Function Create-LockedDownNetwork +Export-ModuleMember -Function Invoke-AzVMRunCommandWithRetries diff --git a/scripts/azure-pipelines/generate-skip-list.ps1 b/scripts/azure-pipelines/generate-skip-list.ps1 new file mode 100755 index 00000000000000..84b78b33878721 --- /dev/null +++ b/scripts/azure-pipelines/generate-skip-list.ps1 @@ -0,0 +1,83 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Generates a list of ports to skip in the CI. + +.DESCRIPTION +generate-skip-list takes a triplet, and the path to the ci.baseline.txt +file, and generates a skip list string to pass to vcpkg. + +.PARAMETER Triplet +The triplet to find skipped ports for. + +.PARAMETER BaselineFile +The path to the ci.baseline.txt file. +#> +[CmdletBinding()] +Param( + [string]$Triplet, + [string]$BaselineFile, + [switch]$SkipFailures = $false +) + +$ErrorActionPreference = 'Stop' + +if (-not (Test-Path -Path $BaselineFile)) { + Write-Error "Unable to find baseline file $BaselineFile" + throw +} + +#read in the file, strip out comments and blank lines and spaces +$baselineListRaw = Get-Content -Path $BaselineFile ` + | Where-Object { -not ($_ -match "\s*#") } ` + | Where-Object { -not ( $_ -match "^\s*$") } ` + | ForEach-Object { $_ -replace "\s" } + +############################################################### +# This script is running at the beginning of the CI test, so do a little extra +# checking so things can fail early. + +#verify everything has a valid value +$missingValues = $baselineListRaw | Where-Object { -not ($_ -match "=\w") } + +if ($missingValues) { + Write-Error "The following are missing values: $missingValues" + throw +} + +$invalidValues = $baselineListRaw ` + | Where-Object { -not ($_ -match "=(skip|pass|fail|ignore)$") } + +if ($invalidValues) { + Write-Error "The following have invalid values: $invalidValues" + throw +} + +$baselineForTriplet = $baselineListRaw ` + | Where-Object { $_ -match ":$Triplet=" } + +# Verify there are no duplicates (redefinitions are not allowed) +$file_map = @{ } +foreach ($port in $baselineForTriplet | ForEach-Object { $_ -replace ":.*$" }) { + if ($null -ne $file_map[$port]) { + Write-Error ` + "$($port):$($Triplet) has multiple definitions in $baselineFile" + throw + } + $file_map[$port] = $true +} + +# Format the skip list for the command line +if ($SkipFailures) { + $targetRegex = "=(?:skip|fail)$" +} else { + $targetRegex = "=skip$" +} + +$skip_list = $baselineForTriplet ` + | Where-Object { $_ -match $targetRegex } ` + | ForEach-Object { $_ -replace ":.*$" } +[string]::Join(",", $skip_list) diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml new file mode 100644 index 00000000000000..f68f971e5a3219 --- /dev/null +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -0,0 +1,69 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +jobs: +- job: x64_linux + pool: + name: ${{ parameters.poolName }} + workspace: + clean: resources + timeoutInMinutes: 1440 # 1 day + variables: + - name: WORKING_ROOT + value: /mnt/vcpkg-ci + - name: VCPKG_DOWNLOADS + value: /mnt/vcpkg-ci/downloads + - group: vcpkg-asset-caching-credentials + - name: X_VCPKG_ASSET_SOURCES + value: "x-azurl,$(root-url),$(sas),readwrite" + - group: vcpkg-binary-caching-credentials + - name: X_VCPKG_BINARY_SOURCE_STUB + value: "x-azblob,$(root-bin-url),$(sas-bin)" + + steps: + - bash: df -h + displayName: 'Report on Disk Space' + - bash: | + sudo mkdir /home/agent -m=777 + sudo chown `id -u` /home/agent + exit 0 + displayName: 'Create /home/agent' + # Note: /mnt is the Azure machines' temporary disk. + - bash: | + sudo rm -rf ${{ variables.VCPKG_DOWNLOADS }} + sudo mkdir ${{ variables.WORKING_ROOT }} -m=777 + sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} -m=777 + exit 0 + displayName: 'Create ${{ variables.WORKING_ROOT }} and ${{ variables.VCPKG_DOWNLOADS }}' + - task: Bash@3 + displayName: 'Bootstrap vcpkg' + inputs: + filePath: bootstrap-vcpkg.sh + - task: PowerShell@2 + displayName: '*** Test Modified Ports and Prepare Test Logs ***' + inputs: + failOnStderr: true + filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' + arguments: '-Triplet x64-linux -BuildReason $(Build.Reason) -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)' + pwsh: true + - bash: | + df -h + displayName: 'Report on Disk Space After Build' + condition: always() + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: failure logs for x64-linux' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs' + ArtifactName: 'failure logs for x64-linux' + condition: always() + - bash: | + python3 scripts/file_script.py /mnt/vcpkg-ci/installed/vcpkg/info/ + displayName: 'Build a file list for all packages' + condition: always() + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: file lists for x64-linux' + condition: always() + inputs: + PathtoPublish: scripts/list_files + ArtifactName: 'file lists for x64-linux' diff --git a/scripts/azure-pipelines/linux/create-image.ps1 b/scripts/azure-pipelines/linux/create-image.ps1 new file mode 100644 index 00000000000000..5eacd2b8c01970 --- /dev/null +++ b/scripts/azure-pipelines/linux/create-image.ps1 @@ -0,0 +1,161 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Creates a Linux virtual machine image, set up for vcpkg's CI. + +.DESCRIPTION +create-image.ps1 creates an Azure Linux VM image, set up for vcpkg's CI system. +This script assumes you have installed Azure tools into PowerShell by following the instructions +at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1 +or are running from Azure Cloud Shell. + +This script assumes you have installed the OpenSSH Client optional Windows component. +#> + +$Location = 'westus2' +$Prefix = 'Lin-' +$Prefix += (Get-Date -Format 'yyyy-MM-dd') +$VMSize = 'Standard_D32as_v4' +$ProtoVMName = 'PROTOTYPE' +$ErrorActionPreference = 'Stop' + +$ProgressActivity = 'Creating Linux Image' +$TotalProgress = 9 +$CurrentProgress = 1 + +Import-Module "$PSScriptRoot/../create-vmss-helpers.psm1" -DisableNameChecking + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating SSH key' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$sshDir = [System.IO.Path]::GetTempPath() + [System.IO.Path]::GetRandomFileName() +mkdir $sshDir +try { + ssh-keygen.exe -q -b 2048 -t rsa -f "$sshDir/key" -P [string]::Empty + $sshPublicKey = Get-Content "$sshDir/key.pub" +} finally { + Remove-Item $sshDir -Recurse -Force +} + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating resource group' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$ResourceGroupName = Find-ResourceGroupName $Prefix +$AdminPW = New-Password +New-AzResourceGroup -Name $ResourceGroupName -Location $Location +$AdminPWSecure = ConvertTo-SecureString $AdminPW -AsPlainText -Force +$Credential = New-Object System.Management.Automation.PSCredential ("AdminUser", $AdminPWSecure) + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating virtual network' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$VirtualNetwork = Create-LockedDownNetwork -ResourceGroupName $ResourceGroupName -Location $Location + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating prototype VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$NicName = $ResourceGroupName + 'NIC' +$Nic = New-AzNetworkInterface ` + -Name $NicName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -Subnet $VirtualNetwork.Subnets[0] + +$VM = New-AzVMConfig -Name $ProtoVMName -VMSize $VMSize -Priority 'Spot' -MaxPrice -1 +$VM = Set-AzVMOperatingSystem ` + -VM $VM ` + -Linux ` + -ComputerName $ProtoVMName ` + -Credential $Credential ` + -DisablePasswordAuthentication + +$VM = Add-AzVMNetworkInterface -VM $VM -Id $Nic.Id +$VM = Set-AzVMSourceImage ` + -VM $VM ` + -PublisherName 'Canonical' ` + -Offer '0001-com-ubuntu-server-focal' ` + -Skus '20_04-lts-gen2' ` + -Version latest + +$VM = Set-AzVMBootDiagnostic -VM $VM -Disable + +$VM = Add-AzVMSshPublicKey ` + -VM $VM ` + -KeyData $sshPublicKey ` + -Path "/home/AdminUser/.ssh/authorized_keys" + +New-AzVm ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -VM $VM + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Running provisioning script provision-image.sh in VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$ProvisionImageResult = Invoke-AzVMRunCommandWithRetries ` + -ResourceGroupName $ResourceGroupName ` + -VMName $ProtoVMName ` + -CommandId 'RunShellScript' ` + -ScriptPath "$PSScriptRoot\provision-image.sh" + +Write-Host "provision-image.sh output: $($ProvisionImageResult.value.Message)" + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Restarting VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Restart-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Converting VM to Image' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Stop-AzVM ` + -ResourceGroupName $ResourceGroupName ` + -Name $ProtoVMName ` + -Force + +Set-AzVM ` + -ResourceGroupName $ResourceGroupName ` + -Name $ProtoVMName ` + -Generalized + +$VM = Get-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName +$ImageConfig = New-AzImageConfig -Location $Location -SourceVirtualMachineId $VM.ID -HyperVGeneration 'V2' +$ImageName = Find-ImageName -ResourceGroupName 'vcpkg-image-minting' -Prefix $Prefix +New-AzImage -Image $ImageConfig -ImageName $ImageName -ResourceGroupName 'vcpkg-image-minting' + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Deleting unused temporary resources' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Remove-AzResourceGroup $ResourceGroupName -Force + +#################################################################################################### +Write-Progress -Activity $ProgressActivity -Completed +Write-Host "Generated Image: $ImageName" +Write-Host 'Finished!' diff --git a/scripts/azure-pipelines/linux/create-vmss.ps1 b/scripts/azure-pipelines/linux/create-vmss.ps1 new file mode 100755 index 00000000000000..08210cc0d18765 --- /dev/null +++ b/scripts/azure-pipelines/linux/create-vmss.ps1 @@ -0,0 +1,108 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Creates a Linux virtual machine scale set, set up for vcpkg's CI. + +.DESCRIPTION +create-vmss.ps1 creates an Azure Linux VM scale set, set up for vcpkg's CI +system. See https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview +for more information. + +This script assumes you have installed Azure tools into PowerShell by following the instructions +at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1 +or are running from Azure Cloud Shell. + +This script assumes you have installed the OpenSSH Client optional Windows component. + + +.PARAMETER ImageName +The name of the image to deploy into the scale set. +#> + +[CmdLetBinding()] +Param( + [parameter(Mandatory=$true)] + [string]$ImageName +) + +$Location = 'westus2' +$Prefix = 'PrLin-' +$Prefix += (Get-Date -Format 'yyyy-MM-dd') +$VMSize = 'Standard_D32a_v4' +$LiveVMPrefix = 'BUILD' +$ErrorActionPreference = 'Stop' + +Import-Module "$PSScriptRoot/../create-vmss-helpers.psm1" -DisableNameChecking + +$sshDir = [System.IO.Path]::GetTempPath() + [System.IO.Path]::GetRandomFileName() +mkdir $sshDir +try { + ssh-keygen.exe -q -b 2048 -t rsa -f "$sshDir/key" -P [string]::Empty + $sshPublicKey = Get-Content "$sshDir/key.pub" +} finally { + Remove-Item $sshDir -Recurse -Force +} +$ResourceGroupName = Find-ResourceGroupName $Prefix +$AdminPW = New-Password +$Image = Get-AzImage -ResourceGroupName 'vcpkg-image-minting' -ImageName $ImageName + +New-AzResourceGroup -Name $ResourceGroupName -Location $Location + +$VirtualNetwork = Create-LockedDownNetwork -ResourceGroupName $ResourceGroupName -Location $Location +$VmssIpConfigName = $ResourceGroupName + 'VmssIpConfig' +$VmssIpConfig = New-AzVmssIpConfig -SubnetId $VirtualNetwork.Subnets[0].Id -Primary -Name $VmssIpConfigName +$VmssName = $ResourceGroupName + 'Vmss' +$Vmss = New-AzVmssConfig ` + -Location $Location ` + -SkuCapacity 0 ` + -SkuName $VMSize ` + -SkuTier 'Standard' ` + -Overprovision $false ` + -UpgradePolicyMode Manual ` + -EvictionPolicy Delete ` + -Priority Spot ` + -MaxPrice -1 + +$NicName = $ResourceGroupName + 'NIC' +New-AzNetworkInterface ` + -Name $NicName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -Subnet $VirtualNetwork.Subnets[0] + +$Vmss = Add-AzVmssNetworkInterfaceConfiguration ` + -VirtualMachineScaleSet $Vmss ` + -Primary $true ` + -IpConfiguration $VmssIpConfig ` + -NetworkSecurityGroupId $VirtualNetwork.Subnets[0].NetworkSecurityGroup.Id ` + -Name $NicName + +$VmssPublicKey = New-Object -TypeName 'Microsoft.Azure.Management.Compute.Models.SshPublicKey' ` + -ArgumentList @('/home/AdminUser/.ssh/authorized_keys', $sshPublicKey) + +$Vmss = Set-AzVmssOsProfile ` + -VirtualMachineScaleSet $Vmss ` + -ComputerNamePrefix $LiveVMPrefix ` + -AdminUsername AdminUser ` + -AdminPassword $AdminPW ` + -LinuxConfigurationDisablePasswordAuthentication $true ` + -PublicKey @($VmssPublicKey) + +$Vmss = Set-AzVmssStorageProfile ` + -VirtualMachineScaleSet $Vmss ` + -OsDiskCreateOption 'FromImage' ` + -OsDiskCaching ReadOnly ` + -DiffDiskSetting Local ` + -ImageReferenceId $Image.Id + +New-AzVmss ` + -ResourceGroupName $ResourceGroupName ` + -Name $VmssName ` + -VirtualMachineScaleSet $Vmss + +Write-Host "Location: $Location" +Write-Host "Resource group name: $ResourceGroupName" +Write-Host 'Finished!' diff --git a/scripts/azure-pipelines/linux/provision-image.sh b/scripts/azure-pipelines/linux/provision-image.sh new file mode 100755 index 00000000000000..942952f0997fe4 --- /dev/null +++ b/scripts/azure-pipelines/linux/provision-image.sh @@ -0,0 +1,83 @@ +#!/bin/bash +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +sudo apt -y update +sudo apt -y dist-upgrade +# Install common build dependencies +APT_PACKAGES="at curl unzip tar libxt-dev gperf libxaw7-dev cifs-utils \ + build-essential g++ gfortran zip libx11-dev libxkbcommon-x11-dev libxi-dev \ + libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxinerama-dev libxxf86vm-dev \ + libxcursor-dev yasm libnuma1 libnuma-dev python-six python3-six python-yaml \ + flex libbison-dev autoconf libudev-dev libncurses5-dev libtool libxrandr-dev \ + xutils-dev dh-autoreconf autoconf-archive libgles2-mesa-dev ruby-full \ + pkg-config meson" + +# Additionally required by qt5-base +APT_PACKAGES="$APT_PACKAGES libxext-dev libxfixes-dev libxrender-dev \ + libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev" + +# Additionally required by qt5-base for qt5-x11extras +APT_PACKAGES="$APT_PACKAGES libxkbcommon-dev libxcb-keysyms1-dev \ + libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev \ + libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev \ + libxcb-render-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev" + +# Additionally required by libhdfs3 +APT_PACKAGES="$APT_PACKAGES libkrb5-dev" + +# Additionally required by kf5windowsystem +APT_PACKAGES="$APT_PACKAGES libxcb-res0-dev" + +# Additionally required by mesa +APT_PACKAGES="$APT_PACKAGES python3-setuptools python3-mako" + +# Additionally required by some packages to install additional python packages +APT_PACKAGES="$APT_PACKAGES python3-pip" + +# Additionally required by rtaudio +APT_PACKAGES="$APT_PACKAGES libasound2-dev" + +# Additionally required by qtwebengine +APT_PACKAGES="$APT_PACKAGES nodejs" + +# Additionally required by qtwayland +APT_PACKAGES="$APT_PACKAGES libwayland-dev" + +# Additionally required by all GN projects +APT_PACKAGES="$APT_PACKAGES python2 python-is-python3" + +# Additionally required/installed by Azure DevOps Scale Set Agents +APT_PACKAGES="$APT_PACKAGES liblttng-ust0 libkrb5-3 zlib1g libicu66" + +sudo apt -y install $APT_PACKAGES + +# Install newer version of nasm than the apt package, required by intel-ipsec +mkdir /tmp/nasm +cd /tmp/nasm +curl -O https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.gz +tar -xf nasm-2.15.05.tar.gz +cd nasm-2.15.05/ +./configure --prefix=/usr && make -j +sudo make install +cd ~ + +# Install the latest Haskell stack +curl -sSL https://get.haskellstack.org/ | sudo sh + +# Install CUDA +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin +sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 +sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub +sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" +sudo apt -y update +sudo apt install -y --no-install-recommends cuda-compiler-11-3 cuda-libraries-dev-11-3 cuda-driver-dev-11-3 \ + cuda-cudart-dev-11-3 libcublas-11-3 libcurand-dev-11-3 libcudnn8-dev libnccl2 libnccl-dev + +# Install PowerShell +wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb +sudo dpkg -i packages-microsoft-prod.deb +sudo apt update +sudo add-apt-repository universe +sudo apt install -y powershell diff --git a/scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 b/scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 new file mode 100755 index 00000000000000..5264d2ecb566c3 --- /dev/null +++ b/scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 @@ -0,0 +1,68 @@ +#!pwsh +#Requires -Version 6.0 + +<# +.SYNOPSIS +Installs the base box at the specified version from the share. + +.PARAMETER FileshareMachine +The machine which is acting as a fileshare + +.PARAMETER BoxVersion +The version of the box to add. Defaults to latest if nothing is passed. +#> +[CmdletBinding()] +Param( + [Parameter(Mandatory=$True)] + [String]$FileshareMachine, + + [Parameter()] + [String]$BoxVersion +) + +Set-StrictMode -Version 2 + +if (-not $IsMacOS) { + throw 'This script should only be run on a macOS host' +} + +$mountPoint = '/Users/vcpkg/vagrant/share' + +if (mount | grep "on $mountPoint (") { + umount $mountPoint + if (-not $?) { + Write-Error "umount $mountPoint failed with return code $LASTEXITCODE." + throw + } +} + +sshfs "fileshare@${FileshareMachine}:/Users/fileshare/share" $mountPoint +if ($LASTEXITCODE -eq 1) { + Write-Error 'sshfs returned 1. +This means that the osxfuse kernel extension was not allowed to load. +You may need to force un/reinstall osxfuse and/or sshfs with + brew uninstall osxfuse + brew uninstall sshfs + brew install osxfuse + brew install sshfs +Then, rerun this script. + +If you''ve already done that, Please open +System Preferences > Security & Privacy > General, +and allow the kernel extension to load. +Then, rerun this script. + +If you''ve already done this, you probably need to add your ssh keys to the fileshare machine.' + throw +} elseif (-not $?) { + Write-Error "sshfs failed with return code $LASTEXITCODE." + throw +} + +if (-not [String]::IsNullOrEmpty($BoxVersion)) { + $versionArgs = @("--box-version", $BoxVersion) +} else { + $versionArgs = @() +} + +vagrant box add "$mountPoint/vcpkg-boxes/macos-ci.json" @versionArgs diff --git a/scripts/azure-pipelines/osx/Install-Prerequisites.ps1 b/scripts/azure-pipelines/osx/Install-Prerequisites.ps1 new file mode 100755 index 00000000000000..1202025834d4a3 --- /dev/null +++ b/scripts/azure-pipelines/osx/Install-Prerequisites.ps1 @@ -0,0 +1,132 @@ +#!pwsh +#Requires -Version 6.0 + +<# +.SYNOPSIS +Installs the set of prerequisites for the macOS CI hosts. + +.DESCRIPTION +Install-Prerequisites.ps1 installs all of the necessary prerequisites +to run the vcpkg macOS CI in a vagrant virtual machine, +skipping all prerequisites that are already installed and of the right version. + +.INPUTS +None + +.OUTPUTS +None +#> +[CmdletBinding()] +Param() + +Set-StrictMode -Version 2 + +if (-not $IsMacOS) { + Write-Error 'This script should only be run on a macOS host' + throw +} + +Import-Module "$PSScriptRoot/Utilities.psm1" + +$Installables = Get-Content "$PSScriptRoot/configuration/installables.json" | ConvertFrom-Json + +$Installables.Applications | ForEach-Object { + $VersionCommand = $_.VersionCommand + $InstalledVersion = (& $VersionCommand[0] $VersionCommand[1..$VersionCommand.Length]) + if (-not $?) { + Write-Host "$($_.Name) not installed; installing now" + } else { + $InstalledVersion = $InstalledVersion -join "`n" + if ($InstalledVersion -match $_.VersionRegex) { + if ($Matches.Count -ne 2) { + Write-Error "$($_.Name) has a malformed version regex ($($_.VersionRegex)); it should have a single capture group + (it has $($Matches.Count - 1))" + throw + } + if ($Matches[1] -eq $_.Version) { + Write-Host "$($_.Name) already installed and at the correct version ($($Matches[1]))" + return + } else { + Write-Host "$($_.Name) already installed but with the incorrect version + installed version: '$($Matches[1])' + required version : '$($_.Version)' +upgrading now." + } + } else { + Write-Warning "$($_.Name)'s version command ($($VersionCommand -join ' ')) returned a value we did not expect: + $InstalledVersion + expected a version matching the regex: $($_.VersionRegex) +Installing anyways." + } + } + + if ($null -ne (Get-Member -InputObject $_ -Name 'DmgUrl')) { + $pathToDmg = "~/Downloads/$($_.Name).dmg" + Get-RemoteFile -OutFile $pathToDmg -Uri $_.DmgUrl -Sha256 $_.Sha256 + + hdiutil attach $pathToDmg -mountpoint /Volumes/setup-installer + sudo installer -pkg "/Volumes/setup-installer/$($_.InstallerPath)" -target / + hdiutil detach /Volumes/setup-installer + } elseif ($null -ne (Get-Member -InputObject $_ -Name 'PkgUrl')) { + $pathToPkg = "~/Downloads/$($_.Name).pkg" + Get-RemoteFile -OutFile $pathToPkg -Uri $_.PkgUrl -Sha256 $_.Sha256 + + sudo installer -pkg $pathToPkg -target / + } else { + Write-Error "$($_.Name) does not have an installer in the configuration file." + throw + } +} + +$Installables.Brew | ForEach-Object { + $installable = $_ + if ($null -eq (Get-Member -InputObject $installable -Name 'Kind')) { + brew install $installable.Name + } else { + switch ($installable.Kind) { + 'cask' { brew install --cask $installable.Name } + default { + Write-Error "Invalid kind: $_. Expected either empty, or 'cask'." + } + } + } +} +brew upgrade + +$installedVagrantPlugins = @{} +vagrant plugin list --machine-readable | ForEach-Object { + $timestamp, $target, $type, $data = $_ -split ',' + switch ($type) { + # these are not important + 'ui' { } + 'plugin-version-constraint' { } + 'plugin-name' { + $installedVagrantPlugins[$data] = $Null + } + 'plugin-version' { + $version = $data -replace '%!\(VAGRANT_COMMA\)',',' + if ($version -notmatch '^(.*), global') { + Write-Error "Invalid version string for plugin ${target}: $version" + throw + } + $installedVagrantPlugins[$target] = $Matches[1] + } + default { + Write-Warning "Unknown plugin list member type $type for plugin $target" + } + } +} +$Installables.VagrantPlugins | ForEach-Object { + if (-not $installedVagrantPlugins.Contains($_.Name)) { + Write-Host "$($_.Name) not installed; installing now" + } elseif ($installedVagrantPlugins[$_.Name] -ne $_.Version) { + Write-Host "$($_.Name) already installed but with the incorrect version + installed version: '$($installedVagrantPlugins[$_.Name])' + required version: '$($_.Version)'" + } else { + Write-Host "$($_.Name) already installed and at the correct version ($($_.Version))" + return + } + + vagrant plugin install $_.Name --plugin-version $_.Version +} diff --git a/scripts/azure-pipelines/osx/README.md b/scripts/azure-pipelines/osx/README.md new file mode 100644 index 00000000000000..9d6fb40b74a4a9 --- /dev/null +++ b/scripts/azure-pipelines/osx/README.md @@ -0,0 +1,229 @@ +# `vcpkg-eg-mac` VMs + +## Table of Contents + +- [`vcpkg-eg-mac` VMs](#vcpkg-eg-mac-vms) + - [Table of Contents](#table-of-contents) + - [Basic Usage](#basic-usage) + - [Setting up a new macOS machine](#setting-up-a-new-macos-machine) + - [Troubleshooting](#troubleshooting) + - [Creating a new Vagrant box](#creating-a-new-vagrant-box) + - [VM Software Versions](#vm-software-versions) + - [(Internal) Accessing the macOS fileshare](#internal-accessing-the-macos-fileshare) + +## Basic Usage + +The simplest usage, and one which should be used for when spinning up +new VMs, and when restarting old ones, is a simple: + +``` +$ cd ~/vagrant/vcpkg-eg-mac +$ vagrant up +``` + +Any modifications to the machines should be made in `configuration/Vagrantfile` +and `Setup-VagrantMachines.ps1`, and make sure to push any changes! + +## Setting up a new macOS machine + +Before anything else, one must download `brew` and `powershell`. + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +$ brew cask install powershell +``` + +Then, we need to download the `vcpkg` repository: + +```sh +$ git clone https://github.com/microsoft/vcpkg +``` + +Then, we need to mint an SSH key: + +```sh +$ ssh-keygen +$ cat .ssh/id_rsa.pub +``` + +Add that SSH key to `authorized_keys` on the file share machine with the base box. + +Next, install prerequisites and grab the current base box with: +```sh +$ cd vcpkg/scripts/azure-pipelines/osx +$ ./Install-Prerequisites.ps1 -Force +$ ./Get-InternalBaseBox.ps1 -FileshareMachine vcpkgmm-01.guest.corp.microsoft.com -BoxVersion 2020-09-28 +``` + +... where -BoxVersion is the version you want to use. + +Getting the base box will fail due to missing kernel modules for osxfuse, sshfs, and/or VirtualBox. +Log in to the machine, open System Preferences > Security & Privacy > General, and allow the kernel +extensions for VirtualBox and sshfs to load. Then, again: + +```sh +$ ./Get-InternalBaseBox.ps1 -FileshareMachine vcpkgmm-01.guest.corp.microsoft.com -BoxVersion 2020-09-28 +``` + +Replace `XX` with the number of +the virtual machine. Generally, that should be the same as the number +for the physical machine; i.e., vcpkgmm-04 would use 04. + +```sh + # NOTE: you may get an error about CoreCLR; see the following paragraph if you do +$ ./Setup-VagrantMachines.ps1 \ + -MachineId XX \ + -DevopsPat '' \ + -Date +$ cd ~/vagrant/vcpkg-eg-mac +$ vagrant up +``` + +If you see the following error: + +``` +Failed to initialize CoreCLR, HRESULT: 0x8007001F +``` + +You have to reboot the machine; run + +```sh +$ sudo shutdown -r now +``` + +and wait for the machine to start back up. Then, start again from where the error was emitted. + +### Troubleshooting + +The following are issues that we've run into: + +- (with a Parallels box) `vagrant up` doesn't work, and vagrant gives the error that the VM is `'stopped'`. + - Try logging into the GUI with the KVM, and retrying `vagrant up`. + +## Creating a new Vagrant box + +Whenever we want to install updated versions of the command line tools, +or of macOS, we need to create a new vagrant box. +This is pretty easy, but the results of the creation are not public, +since we're concerned about licensing. +However, if you're sure you're following Apple's licensing, +you can set up your own vagrant boxes that are the same as ours by doing the following: + +You'll need some prerequisites: + +- vagrant - found at + - The vagrant-parallels plugin - `vagrant plugin install vagrant-parallels` +- Parallels - found at +- An Xcode installer - you can get this from Apple's developer website, + although you'll need to sign in first: + +First, you'll need to create a base VM; +this is where you determine what version of macOS is installed. +Just follow the Parallels process for creating a macOS VM. + +Once you've done this, you can run through the installation of macOS onto a new VM. +You should set the username to `vagrant`. + +Once it's finished installing, make sure to turn on the SSH server. +Open System Preferences, then go to Sharing > Remote Login, +and turn it on. +You'll then want to add the vagrant SSH keys to the VM's vagrant user. +Open the terminal application and run the following: + +```sh +$ # basic stuff +$ date | sudo tee '/etc/vagrant_box_build_time' +$ printf 'vagrant\tALL=(ALL)\tNOPASSWD:\tALL\n' | sudo tee -a '/etc/sudoers.d/vagrant' +$ sudo chmod 0440 '/etc/sudoers.d/vagrant' +$ # then install vagrant keys +$ mkdir -p ~/.ssh +$ curl -fsSL 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' >~/.ssh/authorized_keys +$ chmod 0600 ~/.ssh/authorized_keys +``` + +Finally, you'll need to install the Parallel Tools. +From your host, in the top bar, +go to Actions > Install Parallels Tools..., +and then follow the instructions. + +Now, let's package the VM into a base box. +(The following instructions are adapted from +[these official instructions][base-box-instructions]). + +Run the following commands: + +```sh +$ cd ~/Parallels +$ echo '{ "provider": "parallels" }' >metadata.json +$ tar zcvf .box ./metadata.json ./.pvm +``` + +This will create a box file which contains all the necessary data. +You can delete the `metadata.json` file after. + +Once you've done that, you can upload it to the fileshare, +under `share/boxes/macos-base`, add it to `share/boxes/macos-base.json`, +and finally add it to vagrant: + +```sh +$ vagrant box add ~/vagrant/share/boxes/macos-base.json +``` + +Then, we'll create the final box, +which contains all the necessary programs for doing CI work. +Copy `configuration/Vagrantfile-box.rb` as `Vagrantfile`, and +`configuration/vagrant-box-configuration.json` +into a new directory; into that same directory, +download the Xcode command line tools dmg, and name it `clt.dmg`. +Then, run the following in that directory: + +```sh +$ vagrant up +$ vagrant package +``` + +This will create a `package.box`, which is the box file for the base VM. +Once you've created this box, if you're making it the new box for the CI, +upload it to the fileshare, under `share/boxes/macos-ci`. +Then, add the metadata about the box (the name and version) to +`share/boxes/macos-ci.json`. +Once you've done that, add the software versions under [VM Software Versions](#vm-software-versions). + +[base-box-instructions]: https://parallels.github.io/vagrant-parallels/docs/boxes/base.html + +### VM Software Versions + +* 2020-09-28: + * macOS: 10.15.6 + * Xcode CLTs: 12 +* 2021-04-16: + * macOS: 11.2.3 + * Xcode CLTs: 12.4 +* 2021-07-27: + * macOS: 11.5.1 + * Xcode CLTs: 12.5.1 + +### (Internal) Accessing the macOS fileshare + +The fileshare is located on `vcpkgmm-01`, under the `fileshare` user, in the `share` directory. +In order to get `sshfs` working on the physical machine, +You can run `Install-Prerequisites.ps1` to grab the right software, then either: + +```sh +$ mkdir vagrant/share +$ sshfs fileshare@:/Users/fileshare/share vagrant/share +``` + +or you can just run + +```sh +$ ./Get-InternalBaseBox.ps1 +``` + +which will do the thing automatically. + +If you get an error, that means that gatekeeper has prevented the kernel extension from loading, +so you'll need to access the GUI of the machine, go to System Preferences, +Security & Privacy, General, unlock the settings, +and allow system extensions from the osxfuse developer to run. +Then, you'll be able to add the fileshare as an sshfs. diff --git a/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 b/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 new file mode 100755 index 00000000000000..88b64594ad60de --- /dev/null +++ b/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 @@ -0,0 +1,124 @@ +#!pwsh +#Requires -Version 6.0 + +<# +.SYNOPSIS +Sets up the configuration for the vagrant virtual machines. + +.DESCRIPTION +Setup-VagrantMachines.ps1 sets up the virtual machines for +vcpkg's macOS CI. It puts the VagrantFile and necessary +configuration JSON file into ~/vagrant/vcpkg-eg-mac. + +.PARAMETER MachineId +The number to give the machine; should match [0-9]{2}. +Defaults to the numbers at the end of the machine name, +assuming that that machine name matches `VCPKGMM-[0-9]{2}`. + +.PARAMETER DevopsPat +The personal access token which has Read & Manage permissions on the ADO pool. + +.PARAMETER Date +The date on which this pool is being created. Sets the default values for BoxVersion and AgentPool. + +.PARAMETER BoxVersion +The version of the box to use. If -Date is passed, uses that as the version. + +.PARAMETER AgentPool +The agent pool to add the machine to. If -Date is passed, uses "PrOsx-$Date" as the pool. + +.PARAMETER DevopsUrl +The URL of the ADO instance; defaults to vcpkg's, which is https://dev.azure.com/vcpkg. + +.PARAMETER BaseName +The base name for the vagrant VM; the machine name is $BaseName-$MachineId. +Defaults to 'vcpkg-eg-mac'. + +.PARAMETER BoxName +The name of the box to use. Defaults to 'vcpkg/macos-ci', +which is only available internally. + +.INPUTS +None + +.OUTPUTS +None +#> +[CmdletBinding(PositionalBinding=$False, DefaultParameterSetName='DefineDate')] +Param( + [Parameter(Mandatory=$False)] + [String]$MachineId, + + [Parameter(Mandatory=$True)] + [String]$DevopsPat, + + [Parameter(Mandatory=$True, ParameterSetName='DefineDate')] + [String]$Date, + + [Parameter(Mandatory=$True, ParameterSetName='DefineVersionAndAgentPool')] + [String]$BoxVersion, + + [Parameter(Mandatory=$True, ParameterSetName='DefineVersionAndAgentPool')] + [String]$AgentPool, + + [Parameter(Mandatory=$False)] + [String]$DevopsUrl = 'https://dev.azure.com/vcpkg', + + [Parameter()] + [String]$BaseName = 'vcpkg-eg-mac', + + [Parameter()] + [String]$BoxName = 'vcpkg/macos-ci' +) + +Set-StrictMode -Version 2 + +if (-not $IsMacOS) { + throw 'This script should only be run on a macOS host' +} + +if (-not [String]::IsNullOrEmpty($Date)) { + $BoxVersion = $Date + $AgentPool = "PrOsx-$Date" +} + +if ([String]::IsNullOrEmpty($MachineId)) { + $hostname = hostname -s + if ($hostname -match '^VCPKGMM-([0-9]{2})$') { + $MachineId = $matches[1] + } else { + Write-Error "Hostname ($hostname) does not match the expected format (VCPKGMM-NN). Please pass -MachineId in order to give the VM a number." + } +} + +if (Test-Path '~/vagrant/vcpkg-eg-mac') { + Push-Location '~/vagrant/vcpkg-eg-mac' + try { + Write-Host 'Deleting existing directories' + vagrant destroy -f + Remove-Item -Recurse -Force -LiteralPath '~/vagrant/vcpkg-eg-mac' | Out-Null + } finally { + Pop-Location + } +} + +Write-Host 'Creating new directories' +if (-not (Test-Path -Path '~/vagrant')) { + New-Item -ItemType 'Directory' -Path '~/vagrant' | Out-Null +} +New-Item -ItemType 'Directory' -Path '~/vagrant/vcpkg-eg-mac' | Out-Null + +Copy-Item ` + -Path "$PSScriptRoot/configuration/Vagrantfile-vm.rb" ` + -Destination '~/vagrant/vcpkg-eg-mac/Vagrantfile' + +$configuration = @{ + pat = $DevopsPat + agent_pool = $AgentPool + devops_url = $DevopsUrl + machine_name = "${BaseName}-${MachineId}" + box_name = $BoxName + box_version = $BoxVersion +} +ConvertTo-Json -InputObject $configuration -Depth 5 ` + | Set-Content -Path '~/vagrant/vcpkg-eg-mac/vagrant-configuration.json' diff --git a/scripts/azure-pipelines/osx/Utilities.psm1 b/scripts/azure-pipelines/osx/Utilities.psm1 new file mode 100644 index 00000000000000..620ec7f4b06eac --- /dev/null +++ b/scripts/azure-pipelines/osx/Utilities.psm1 @@ -0,0 +1,90 @@ +#Requires -Version 6.0 +Set-StrictMode -Version 2 + +<# +.SYNOPSIS +Returns whether the specified command exists in the current environment. + +.DESCRIPTION +Get-CommandExists takes a string as a parameter, +and returns whether it exists in the current environment; +either a function, alias, or an executable in the path. +It's somewhat equivalent to `which`. + +.PARAMETER Name +Specifies the name of the command which may or may not exist. + +.INPUTS +System.String + The name of the command. + +.OUTPUTS +System.Boolean + Whether the command exists. +#> +function Get-CommandExists +{ + [CmdletBinding()] + [OutputType([Boolean])] + Param( + [Parameter(ValueFromPipeline)] + [String]$Name + ) + + $null -ne (Get-Command -Name $Name -ErrorAction SilentlyContinue) +} + +<# +.SYNOPSIS +Downloads a file and checks its hash. + +.DESCRIPTION +Get-RemoteFile takes a URI and a hash, +downloads the file at that URI to OutFile, +and checks that the hash of the downloaded file. +It then returns a FileInfo object corresponding to the downloaded file. + +.PARAMETER OutFile +Specifies the file path to download to. + +.PARAMETER Uri +The URI to download from. + +.PARAMETER Sha256 +The expected SHA256 of the downloaded file. + +.INPUTS +None + +.OUTPUTS +System.IO.FileInfo + The FileInfo for the downloaded file. +#> +function Get-RemoteFile +{ + [CmdletBinding(PositionalBinding=$False)] + [OutputType([System.IO.FileInfo])] + Param( + [Parameter(Mandatory=$True)] + [String]$OutFile, + [Parameter(Mandatory=$True)] + [String]$Uri, + [Parameter(Mandatory=$True)] + [String]$Sha256 + ) + + Invoke-WebRequest -OutFile $OutFile -Uri $Uri + $actualHash = Get-FileHash -Algorithm SHA256 -Path $OutFile + + if ($actualHash.Hash -ne $Sha256) { + throw @" +Invalid hash for file $OutFile; + expected: $Sha256 + found: $($actualHash.Hash) +Please make sure that the hash in the powershell file is correct. +"@ + } + + Get-Item $OutFile +} + diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml new file mode 100644 index 00000000000000..154247da47481b --- /dev/null +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -0,0 +1,63 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +jobs: +- job: x64_osx + pool: + name: ${{ parameters.poolName }} + workspace: + clean: resources + timeoutInMinutes: 1440 # 1 day + variables: + - name: WORKING_ROOT + value: /Users/vagrant/Data + - name: VCPKG_DOWNLOADS + value: /Users/vagrant/Data/downloads + - group: osx-binary-caching-credentials + - name: BINARY_SOURCE_STUB + value: "x-azblob,$(root-url),$(sas)" + - group: vcpkg-asset-caching-credentials + - name: X_VCPKG_ASSET_SOURCES + value: "x-azurl,$(root-url),$(sas),readwrite" + + steps: + - bash: df -h + displayName: 'Report on Disk Space' + - bash: | + sudo rm -rf ${{ variables.VCPKG_DOWNLOADS }} || 0 + sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} || 0 + sudo chmod 777 ${{ variables.VCPKG_DOWNLOADS }} || 0 + exit 0 + displayName: 'Create ${{ variables.VCPKG_DOWNLOADS }}' + - task: Bash@3 + displayName: 'Build vcpkg' + inputs: + filePath: bootstrap-vcpkg.sh + - task: PowerShell@2 + displayName: '*** Test Modified Ports and Prepare Test Logs ***' + inputs: + failOnStderr: true + filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' + arguments: '-Triplet x64-osx -BuildReason $(Build.Reason) -BinarySourceStub "$(BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)' + pwsh: true + - bash: | + df -h + displayName: 'Report on Disk Space After Build' + condition: always() + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: failure logs for x64-osx' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs' + ArtifactName: 'failure logs for x64-osx' + condition: always() + - bash: | + python3 scripts/file_script.py /Users/vagrant/Data/installed/vcpkg/info/ + displayName: 'Build a file list for all packages' + condition: always() + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: file lists for x64-osx' + condition: always() + inputs: + PathtoPublish: scripts/list_files + ArtifactName: 'file lists for x64-osx' diff --git a/scripts/azure-pipelines/osx/configuration/Vagrantfile-box.rb b/scripts/azure-pipelines/osx/configuration/Vagrantfile-box.rb new file mode 100644 index 00000000000000..cbe76a72076ff5 --- /dev/null +++ b/scripts/azure-pipelines/osx/configuration/Vagrantfile-box.rb @@ -0,0 +1,35 @@ +require 'json' + +configuration = JSON.parse(File.read("#{__dir__}/vagrant-box-configuration.json")) + +Vagrant.configure('2') do |config| + config.vm.box = 'vcpkg/macos-base' + config.vm.synced_folder '.', '/Users/vagrant/shared' + + config.vm.provision 'shell', + run: 'once', + name: 'Install Xcode Command Line Tools: attach dmg file', + inline: 'hdiutil attach shared/clt.dmg -mountpoint /Volumes/setup-installer', + privileged: false + config.vm.provision 'shell', + run: 'once', + name: 'Install Xcode Command Line Tools: run installer', + inline: 'installer -pkg "/Volumes/setup-installer/Command Line Tools.pkg" -target /', + privileged: true + config.vm.provision 'shell', + run: 'once', + name: 'Install XCode Command Line Tools: detach dmg file', + inline: 'hdiutil detach /Volumes/setup-installer', + privileged: false + + config.vm.provision 'shell', + run: 'once', + name: 'Install brew', + inline: '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"', + privileged: false + config.vm.provision 'shell', + run: 'once', + name: 'Install brew applications', + inline: "brew install #{configuration['brew'].join(' ')} && brew install --cask #{configuration['brew-cask'].join(' ')}", + privileged: false +end diff --git a/scripts/azure-pipelines/osx/configuration/Vagrantfile-vm.rb b/scripts/azure-pipelines/osx/configuration/Vagrantfile-vm.rb new file mode 100644 index 00000000000000..ed689ab7be1c17 --- /dev/null +++ b/scripts/azure-pipelines/osx/configuration/Vagrantfile-vm.rb @@ -0,0 +1,68 @@ +require 'json' + +configuration = JSON.parse(File.read("#{__dir__}/vagrant-configuration.json")) + +server = { + :hostname => configuration['machine_name'], + :box => configuration['box_name'], + :box_version => configuration['box_version'], + :ram => 12000, + :cpu => 11 +} + +azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/2.185.1/vsts-agent-osx-x64-2.185.1.tar.gz' +devops_url = configuration['devops_url'] +agent_pool = configuration['agent_pool'] +pat = configuration['pat'] + +Vagrant.configure('2') do |config| + config.vm.box = server[:box] + config.vm.box_version = server[:box_version] + config.vm.hostname = server[:hostname] + config.vm.synced_folder '.', '/vagrant', disabled: true + + config.vm.provider 'parallels' do |prl| + prl.memory = server[:ram] + prl.cpus = server[:cpu] + end + + config.vm.provision 'shell', + run: 'once', + name: 'Create the data directory', + inline: "mkdir ~/Data", + privileged: false + + config.vm.provision 'shell', + run: 'once', + name: 'Download azure agent', + inline: "curl -s -o ~/Downloads/azure-agent.tar.gz #{azure_agent_url}", + privileged: false + + config.vm.provision 'shell', + run: 'once', + name: 'Unpack azure agent', + inline: 'mkdir myagent; cd myagent; tar xf ~/Downloads/azure-agent.tar.gz', + privileged: false + + config.vm.provision 'shell', + run: 'once', + name: 'Add VM to azure agent pool', + inline: "cd ~/myagent;\ + ./config.sh --unattended \ + --url #{devops_url} \ + --work ~/Data/work \ + --auth pat --token #{pat} \ + --pool #{agent_pool} \ + --agent `hostname` \ + --replace \ + --acceptTeeEula", + privileged: false + + # Start listening for jobs + config.vm.provision 'shell', + run: 'always', + name: 'Start running azure pipelines', + inline: 'cd /Users/vagrant/myagent;\ + nohup ./run.sh&', + privileged: false +end diff --git a/scripts/azure-pipelines/osx/configuration/installables.json b/scripts/azure-pipelines/osx/configuration/installables.json new file mode 100644 index 00000000000000..179b03f15ea197 --- /dev/null +++ b/scripts/azure-pipelines/osx/configuration/installables.json @@ -0,0 +1,40 @@ +{ + "$schema": "./installables.schema.json", + + "Applications": [ + { + "Name": "vagrant", + "VersionCommand": [ "vagrant", "-v" ], + "VersionRegex": "Vagrant (.*)", + "Version": "2.2.18", + "DmgUrl": "https://releases.hashicorp.com/vagrant/2.2.18/vagrant_2.2.18_x86_64.dmg", + "Sha256": "B4E8103AABDF29F18F592CD6DE4FA03BF182FBC192A0757B5E18156CB18FA672", + "InstallerPath": "vagrant.pkg" + }, + { + "Name": "osxfuse", + "VersionCommand": [ "cat", "/Library/Filesystems/macfuse.fs/Contents/version.plist" ], + "VersionRegex": "CFBundleVersion[\\n\\t ]*([0-9.]+)", + "Version": "4.1.2", + "DmgUrl": "https://github.com/osxfuse/osxfuse/releases/download/macfuse-4.1.2/macfuse-4.1.2.dmg", + "Sha256": "9FF344DE38BAD5AC5ECA5194DA00A2BA35DD6AFDB9039133B5446168F8EDAFDB", + "InstallerPath": "Install macFUSE.pkg" + }, + { + "Name": "sshfs", + "VersionCommand": [ "sshfs", "--version" ], + "VersionRegex": "SSHFS version [0-9.]* \\(OSXFUSE SSHFS (.*)\\)", + "Version": "2.5.0", + "PkgUrl": "https://github.com/osxfuse/sshfs/releases/download/osxfuse-sshfs-2.5.0/sshfs-2.5.0.pkg", + "Sha256": "F8F4F71814273EA42DBE6CD92199F7CFF418571FFD1B10C0608878D3472D2162" + } + ], + "Brew": [ + ], + "VagrantPlugins": [ + { + "Name": "vagrant-parallels", + "Version": "2.2.3" + } + ] +} diff --git a/scripts/azure-pipelines/osx/configuration/installables.schema.json b/scripts/azure-pipelines/osx/configuration/installables.schema.json new file mode 100644 index 00000000000000..b7ec7ae801e05e --- /dev/null +++ b/scripts/azure-pipelines/osx/configuration/installables.schema.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema", + "type": "object", + "definitions": { + "sha256": { + "type": "string", + "pattern": "[A-Z0-9]{64}" + } + }, + "required": [ + "Applications", + "Brew", + "VagrantPlugins" + ], + "properties": { + "Applications": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "VersionCommand": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "VersionRegex": { + "type": "string", + "format": "regex" + }, + "Version": { + "type": "string" + }, + "DmgUrl": { + "type": "string", + "format": "uri" + }, + "Sha256": { + "$ref": "#/definitions/sha256" + }, + "InstallerPath": { + "type": "string" + } + } + } + }, + "Brew": { + "type": "array", + "items": { + "type": "object", + "required": [ "Name" ], + "properties": { + "Name": { + "type": "string" + }, + "Kind": { + "type": "string", + "enum": [ "cask" ] + } + } + } + }, + "VagrantPlugins": { + "type": "array", + "items": { + "type": "object", + "required": [ "Name", "Version" ], + "properties": { + "Name": { + "type": "string" + }, + "Version": { + "type": "string" + } + } + } + } + } +} diff --git a/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.json b/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.json new file mode 100644 index 00000000000000..d800c257aa41bb --- /dev/null +++ b/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.json @@ -0,0 +1,21 @@ +{ + "$schema": "./vagrant-vm-configuration.schema.json", + "brew": [ + "autoconf", + "automake", + "bison", + "gettext", + "gfortran", + "gperf", + "gtk-doc", + "libtool", + "meson", + "mono", + "nasm", + "pkg-config", + "yasm" + ], + "brew-cask": [ + "powershell" + ] +} diff --git a/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.schema.json b/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.schema.json new file mode 100644 index 00000000000000..80845f70f97722 --- /dev/null +++ b/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.schema.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema", + "type": "object", + "required": [ + "brew", + "brew-cask" + ], + "properties": { + "brew": { + "type": "array", + "items": { "type": "string" } + }, + "brew-cask": { + "type": "array", + "items": { "type": "string" } + } + } +} diff --git a/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json b/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json new file mode 100644 index 00000000000000..91540d77c91ac8 --- /dev/null +++ b/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + + "type": "object", + + "required": [ + "pat", + "agent_pool", + "devops_url", + "machine_name", + "box_name", + "box_version" + ], + + "properties": { + "pat": { + "type": "string" + }, + "agent_pool": { + "type": "string" + }, + "devops_url": { + "type": "string" + }, + "machine_name": { + "type": "string" + }, + "box_name": { + "type": "string" + }, + "box_version": { + "type": "string" + } + } +} diff --git a/scripts/azure-pipelines/test-modified-ports.ps1 b/scripts/azure-pipelines/test-modified-ports.ps1 new file mode 100755 index 00000000000000..8212509d0134b2 --- /dev/null +++ b/scripts/azure-pipelines/test-modified-ports.ps1 @@ -0,0 +1,148 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Runs the 'Test Modified Ports' part of the vcpkg CI system for all platforms. + +.PARAMETER Triplet +The triplet to test. + +.PARAMETER WorkingRoot +The location used as scratch space for 'installed', 'packages', and 'buildtrees' vcpkg directories. + +.PARAMETER ArtifactStagingDirectory +The Azure Pipelines artifacts directory. If not supplied, defaults to the current directory. + +.PARAMETER ArchivesRoot +Equivalent to '-BinarySourceStub "files,$ArchivesRoot"' + +.PARAMETER BinarySourceStub +The type and parameters of the binary source. Shared across runs of this script. If +this parameter is not set, binary caching will not be used. Example: "files,W:\" + +.PARAMETER BuildReason +The reason Azure Pipelines is running this script (controls in which mode Binary Caching is used). +If BinarySourceStub is not set, this parameter has no effect. If BinarySourceStub is set and this is +not, binary caching will default to read-write mode. + +.PARAMETER PassingIsPassing +Indicates that 'Passing, remove from fail list' results should not be emitted as failures. (For example, this is used +when using vcpkg to test a prerelease MSVC++ compiler) +#> + +[CmdletBinding(DefaultParameterSetName="ArchivesRoot")] +Param( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$Triplet, + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + $WorkingRoot, + [ValidateNotNullOrEmpty()] + $ArtifactStagingDirectory = '.', + [Parameter(ParameterSetName='ArchivesRoot')] + $ArchivesRoot = $null, + [Parameter(ParameterSetName='BinarySourceStub')] + $BinarySourceStub = $null, + $BuildReason = $null, + [switch] + $PassingIsPassing = $false +) + +if (-Not ((Test-Path "triplets/$Triplet.cmake") -or (Test-Path "triplets/community/$Triplet.cmake"))) { + Write-Error "Incorrect triplet '$Triplet', please supply a valid triplet." + throw +} + +if ((-Not [string]::IsNullOrWhiteSpace($ArchivesRoot))) { + if ((-Not [string]::IsNullOrWhiteSpace($BinarySourceStub))) { + Write-Error "Only one binary caching setting may be used." + throw + } + + $BinarySourceStub = "files,$ArchivesRoot" +} + +$env:VCPKG_DOWNLOADS = Join-Path $WorkingRoot 'downloads' +$buildtreesRoot = Join-Path $WorkingRoot 'buildtrees' +$installRoot = Join-Path $WorkingRoot 'installed' +$packagesRoot = Join-Path $WorkingRoot 'packages' + +$commonArgs = @( + "--x-buildtrees-root=$buildtreesRoot", + "--x-install-root=$installRoot", + "--x-packages-root=$packagesRoot", + "--overlay-ports=scripts/test_ports" +) + +$skipFailures = $false +if ([string]::IsNullOrWhiteSpace($BinarySourceStub)) { + $commonArgs += @('--no-binarycaching') +} else { + $commonArgs += @('--binarycaching') + $binaryCachingMode = 'readwrite' + if ([string]::IsNullOrWhiteSpace($BuildReason)) { + Write-Host 'Build reason not specified, defaulting to using binary caching in read write mode.' + } + elseif ($BuildReason -eq 'PullRequest') { + Write-Host 'Build reason was Pull Request, using binary caching in read write mode, skipping failures.' + $skipFailures = $true + } + else { + Write-Host "Build reason was $BuildReason, using binary caching in write only mode." + $binaryCachingMode = 'write' + } + + $commonArgs += @("--binarysource=clear;$BinarySourceStub,$binaryCachingMode") +} + +if ($Triplet -eq 'x64-linux') { + $env:HOME = '/home/agent' + $executableExtension = [string]::Empty +} +elseif ($Triplet -eq 'x64-osx') { + $executableExtension = [string]::Empty +} +else { + $executableExtension = '.exe' +} + +$xmlResults = Join-Path $ArtifactStagingDirectory 'xml-results' +mkdir $xmlResults +$xmlFile = Join-Path $xmlResults "$Triplet.xml" + +$failureLogs = Join-Path $ArtifactStagingDirectory 'failure-logs' + +& "./vcpkg$executableExtension" x-ci-clean @commonArgs +if ($LASTEXITCODE -ne 0) +{ + throw "vcpkg clean failed" +} + +$skipList = . "$PSScriptRoot/generate-skip-list.ps1" ` + -Triplet $Triplet ` + -BaselineFile "$PSScriptRoot/../ci.baseline.txt" ` + -SkipFailures:$skipFailures + +if ($Triplet -in @('x64-windows', 'x64-osx', 'x64-linux')) +{ + # WORKAROUND: These triplets are native-targetting which triggers an issue in how vcpkg handles the skip list. + # The workaround is to pass the skip list as host-excludes as well. + & "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --host-exclude=$skipList --failure-logs=$failureLogs @commonArgs +} +else +{ + & "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @commonArgs +} + +if ($LASTEXITCODE -ne 0) +{ + throw "vcpkg ci failed" +} + +& "$PSScriptRoot/analyze-test-results.ps1" -logDir $xmlResults ` + -triplet $Triplet ` + -baselineFile .\scripts\ci.baseline.txt ` + -passingIsPassing:$PassingIsPassing diff --git a/scripts/azure-pipelines/windows-unstable/README.md b/scripts/azure-pipelines/windows-unstable/README.md new file mode 100644 index 00000000000000..d60367247ac768 --- /dev/null +++ b/scripts/azure-pipelines/windows-unstable/README.md @@ -0,0 +1,4 @@ +The "unstable" build is used internally by Microsoft to test prerelease versions +of our C++ compiler; not seeing results from these build definitions in the +GitHub portal is normal as these builds depend on acquisition of private +compiler bits that aren't yet shipping. diff --git a/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml b/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml new file mode 100644 index 00000000000000..65ee8decfcc7ec --- /dev/null +++ b/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml @@ -0,0 +1,11 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# +variables: + unstable-pool: 'VcpkgUnstable1ES' + +jobs: +- template: job.yml + parameters: + triplet: x64-windows + jobName: x64_windows diff --git a/scripts/azure-pipelines/windows-unstable/job.yml b/scripts/azure-pipelines/windows-unstable/job.yml new file mode 100644 index 00000000000000..346e2bcf3b2aac --- /dev/null +++ b/scripts/azure-pipelines/windows-unstable/job.yml @@ -0,0 +1,103 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +jobs: +- job: ${{ parameters.jobName }} + pool: + name: $(unstable-pool) + workspace: + clean: resources + timeoutInMinutes: 1440 # 1 day + variables: + - name: WORKING_ROOT + value: D:\ + - name: VCPKG_DOWNLOADS + value: D:\downloads + - group: vcpkg-asset-caching-credentials + - name: X_VCPKG_ASSET_SOURCES + value: "x-azurl,$(root-url),$(sas),readwrite" + + steps: + - task: DownloadBuildArtifacts@0 + displayName: 'Download DropBuildNumber if not specified' + inputs: + buildType: specific + project: '0bdbc590-a062-4c3f-b0f6-9383f67865ee' + pipeline: 8136 + buildVersionToDownload: latestFromBranch + branchName: 'refs/heads/$(MSVCBranchName)' + artifactName: BuildNumber + downloadPath: 'D:\msvc-drops' + condition: eq(variables['DropBuildNumber'], '') + - task: PowerShell@2 + displayName: 'Set DropBuildNumber if not specified' + inputs: + targetType: inline + script: | + $DropBuildNumber = Get-Content -Path D:\msvc-drops\BuildNumber\Build.BuildNumber.txt + Write-Host "##vso[task.setvariable variable=DropBuildNumber]$DropBuildNumber" + Write-Host "Build Number set to: $DropBuildNumber" + pwsh: true + condition: eq(variables['DropBuildNumber'], '') + - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0 + displayName: 'Download msvc x86 ret' + inputs: + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection' + buildNumber: 'msvc/builds/$(DropBuildNumber)/x86ret' + destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.x86ret' + - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0 + displayName: 'Download msvc amd64 ret' + inputs: + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection' + buildNumber: 'msvc/builds/$(DropBuildNumber)/amd64ret' + destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.amd64ret' + - task: PowerShell@2 + displayName: 'Rearrange MSVC Drop Layout' + inputs: + targetType: filePath + filePath: 'scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1' + arguments: '-DropRoot "D:\msvc-drops\$(DropBuildNumber)" -BuildType ret' + pwsh: true + - task: PowerShell@2 + displayName: 'Report on Disk Space' + condition: always() + inputs: + filePath: 'scripts/azure-pipelines/windows/disk-space.ps1' + pwsh: true + - script: .\bootstrap-vcpkg.bat + displayName: 'Build vcpkg' + - task: PowerShell@2 + displayName: '*** Test Modified Ports and Prepare Test Logs ***' + inputs: + failOnStderr: true + filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' + arguments: '-Triplet ${{ parameters.triplet }} -BuildReason $(Build.Reason) -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) -PassingIsPassing' + pwsh: true + - task: PowerShell@2 + displayName: 'Report on Disk Space After Build' + condition: always() + inputs: + filePath: 'scripts/azure-pipelines/windows/disk-space.ps1' + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: failure logs for ${{ parameters.triplet }}' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\failure-logs' + ArtifactName: 'failure logs for ${{ parameters.triplet }}' + condition: always() + - task: PowerShell@2 + displayName: 'Build a file list for all packages' + condition: always() + inputs: + targetType: inline + script: | + ./vcpkg.exe fetch python3 + & $(.\vcpkg fetch python3) .\scripts\file_script.py D:\installed\vcpkg\info\ + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: file lists for ${{ parameters.triplet }}' + condition: always() + inputs: + PathtoPublish: scripts/list_files + ArtifactName: 'file lists for ${{ parameters.triplet }}' diff --git a/scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1 b/scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1 new file mode 100644 index 00000000000000..d409bc2085516f --- /dev/null +++ b/scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1 @@ -0,0 +1,75 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# +<# +.SYNOPSIS +Moves files from an MSVC compiler drop to the locations where they are installed in a Visual Studio installation. + +.PARAMETER DropRoot +The location where the MSVC compiler drop has been downloaded. + +.PARAMETER BuildType +The MSVC drop build type set with /p:_BuildType when MSVC was built. Defaults to 'ret'. + +#> +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)][string]$DropRoot, + [Parameter(Mandatory = $false)][ValidateSet('ret', 'chk')][string]$BuildType = 'ret' +) + +Set-StrictMode -Version Latest + +$MSVCRoot = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC" + +$ErrorActionPreference = "Stop" + +$tempRoot = "$DropRoot\readytodeploy" + +New-Item -ItemType Directory -Path $tempRoot | Out-Null + +Write-Host "Rearranging x86$BuildType" +New-Item -ItemType Directory -Path "$tempRoot\bin\HostX86" | Out-Null +Move-Item "$DropRoot\binaries.x86$BuildType\bin\i386" "$tempRoot\bin\HostX86\x86" +Move-Item "$DropRoot\binaries.x86$BuildType\bin\x86_amd64" "$tempRoot\bin\HostX86\x64" +Move-Item "$DropRoot\binaries.x86$BuildType\bin\x86_arm" "$tempRoot\bin\HostX86\arm" + +Write-Host "Rearranging amd64$BuildType" +New-Item -ItemType Directory -Path "$tempRoot\bin\HostX64" | Out-Null +Move-Item "$DropRoot\binaries.amd64$BuildType\bin\amd64" "$tempRoot\bin\HostX64\x64" +Move-Item "$DropRoot\binaries.amd64$BuildType\bin\amd64_x86" "$tempRoot\bin\HostX64\x86" +Move-Item "$DropRoot\binaries.amd64$BuildType\bin\amd64_arm" "$tempRoot\bin\HostX64\arm" + +# Only copy files and directories that already exist in the VS installation. +Write-Host "Rearranging inc, lib" +New-Item -ItemType Directory -Path "$tempRoot\lib" | Out-Null +Move-Item "$DropRoot\binaries.x86$BuildType\inc" "$tempRoot\include" +Move-Item "$DropRoot\binaries.x86$BuildType\lib\i386" "$tempRoot\lib\x86" +Move-Item "$DropRoot\binaries.amd64$BuildType\lib\amd64" "$tempRoot\lib\x64" + +Write-Host "Rearranging atlmfc" +New-Item -ItemType Directory -Path "$tempRoot\atlmfc" | Out-Null +New-Item -ItemType Directory -Path "$tempRoot\atlmfc\lib" | Out-Null +Move-Item "$DropRoot\binaries.x86$BuildType\atlmfc\include" "$tempRoot\atlmfc\include" +Move-Item "$DropRoot\binaries.x86$BuildType\atlmfc\lib\i386" "$tempRoot\atlmfc\lib\x86" +Move-Item "$DropRoot\binaries.amd64$BuildType\atlmfc\lib\amd64" "$tempRoot\atlmfc\lib\x64" + +$toolsets = Get-ChildItem -Path $MSVCRoot -Directory | Sort-Object -Descending +if ($toolsets.Length -eq 0) { + throw "Could not find Visual Studio toolset!" +} + +Write-Host "Found toolsets:`n$($toolsets -join `"`n`")`n" +$selectedToolset = $toolsets[0] +Write-Host "Using toolset: $selectedToolset" +for ($idx = 1; $idx -lt $toolsets.Length; $idx++) { + $badToolset = $toolsets[$idx] + Write-Host "Deleting toolset: $badToolset" + Remove-Item $badToolset -Recurse -Force +} + +Write-Host "Deploying $tempRoot => $selectedToolset" +Copy-Item "$tempRoot\*" $selectedToolset -Recurse -Force +Write-Host "Deleting $DropRoot..." +Remove-Item $DropRoot -Recurse -Force +Write-Host "Done!" diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml new file mode 100644 index 00000000000000..b88a5f12036372 --- /dev/null +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -0,0 +1,106 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +jobs: +- job: ${{ parameters.jobName }} + pool: + name: ${{ parameters.poolName }} + workspace: + clean: resources + timeoutInMinutes: 1440 # 1 day + variables: + - name: WORKING_ROOT + value: D:\ + - name: VCPKG_DOWNLOADS + value: D:\downloads + - group: vcpkg-asset-caching-credentials + - name: X_VCPKG_ASSET_SOURCES + value: "x-azurl,$(root-url),$(sas),readwrite" + - group: vcpkg-binary-caching-credentials + - name: X_VCPKG_BINARY_SOURCE_STUB + value: "x-azblob,$(root-bin-url),$(sas-bin)" + + steps: + - task: PowerShell@2 + displayName: 'Report on Disk Space' + condition: always() + inputs: + filePath: 'scripts/azure-pipelines/windows/disk-space.ps1' + pwsh: true + # Note: E: is the Azure machines' temporary disk. + - script: .\bootstrap-vcpkg.bat + displayName: 'Bootstrap vcpkg' + - script: | + if exist ${{ variables.VCPKG_DOWNLOADS }} rmdir /S /Q ${{ variables.VCPKG_DOWNLOADS }} 2>&1 + displayName: 'Clean downloads' + - task: PowerShell@2 + displayName: '*** Test Modified Ports and Prepare Test Logs ***' + inputs: + failOnStderr: true + filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' + arguments: '-Triplet ${{ parameters.triplet }} -BuildReason $(Build.Reason) -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)' + pwsh: true + - task: PowerShell@2 + displayName: 'Validate version files' + condition: eq('${{ parameters.triplet }}', 'x86-windows') + inputs: + targetType: inline + script: | + ./vcpkg.exe --feature-flags=versions x-ci-verify-versions --verbose | + ForEach-Object -Begin { + $long_error = '' + } -Process { + if ($long_error -ne '' -and $_ -match '^$|^ ') { + # Extend multi-line message + $long_error = -join($long_error, "%0D%0A", $_ -replace '^ ','' ` + -replace '(git add) [^ ]*\\ports\\([^ ]*)', '$1 ports/$2' ) + } else { + if ($long_error -ne '') { + # Flush multi-line message + $long_error + $long_error = '' + } + if ($_ -match '^Error: ') { + # Start multi-line message + $long_error = $_ -replace '^Error: ', '##vso[task.logissue type=error]' ` + -replace '(^##vso[^\]]*)](.*) [^ ]*\\versions\\(.-)\\(.*.json)(.*)', '$1;sourcepath=versions/$3/$4;linenumber=2]$2 version/$3/$4$5' + } else { + # Normal line + $_ + } + } + } -End { + if ($long_error -ne '') { + # Flush multi-line message + $long_error + } + } + pwsh: true + - task: PowerShell@2 + displayName: 'Report on Disk Space After Build' + condition: always() + inputs: + filePath: 'scripts/azure-pipelines/windows/disk-space.ps1' + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: failure logs for ${{ parameters.triplet }}' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\failure-logs' + ArtifactName: 'failure logs for ${{ parameters.triplet }}' + condition: always() + - task: PowerShell@2 + displayName: 'Build a file list for all packages' + condition: always() + inputs: + targetType: inline + script: | + ./vcpkg.exe fetch python3 + & $(.\vcpkg fetch python3) .\scripts\file_script.py D:\installed\vcpkg\info\ + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: file lists for ${{ parameters.triplet }}' + condition: always() + inputs: + PathtoPublish: scripts/list_files + ArtifactName: 'file lists for ${{ parameters.triplet }}' diff --git a/scripts/azure-pipelines/windows/create-image.ps1 b/scripts/azure-pipelines/windows/create-image.ps1 new file mode 100644 index 00000000000000..9a03fe8ed60ccd --- /dev/null +++ b/scripts/azure-pipelines/windows/create-image.ps1 @@ -0,0 +1,271 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Creates a Windows virtual machine image, set up for vcpkg's CI. + +.DESCRIPTION +create-image.ps1 creates an Azure Windows VM image, set up for vcpkg's CI system. + +This script assumes you have installed Azure tools into PowerShell by following the instructions +at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1 +or are running from Azure Cloud Shell. +#> + +$Location = 'westus2' +$Prefix = 'Win-' +$Prefix += (Get-Date -Format 'yyyy-MM-dd') +$VMSize = 'Standard_D32as_v4' +$ProtoVMName = 'PROTOTYPE' +$WindowsServerSku = '2019-datacenter-gensecond' +$ErrorActionPreference = 'Stop' +$CudnnBaseUrl = 'https://vcpkgimageminting.blob.core.windows.net/assets/cudnn-11.2-windows-x64-v8.1.1.33.zip' + +$ProgressActivity = 'Creating Windows Image' +$TotalProgress = 18 +$CurrentProgress = 1 + +Import-Module "$PSScriptRoot/../create-vmss-helpers.psm1" -DisableNameChecking + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating resource group' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$ResourceGroupName = Find-ResourceGroupName $Prefix +$AdminPW = New-Password +New-AzResourceGroup -Name $ResourceGroupName -Location $Location +$AdminPWSecure = ConvertTo-SecureString $AdminPW -AsPlainText -Force +$Credential = New-Object System.Management.Automation.PSCredential ("AdminUser", $AdminPWSecure) + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating virtual network' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$VirtualNetwork = Create-LockedDownNetwork -ResourceGroupName $ResourceGroupName -Location $Location + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating prototype VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$NicName = $ResourceGroupName + 'NIC' +$Nic = New-AzNetworkInterface ` + -Name $NicName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -Subnet $VirtualNetwork.Subnets[0] + +$VM = New-AzVMConfig -Name $ProtoVMName -VMSize $VMSize -Priority 'Spot' -MaxPrice -1 +$VM = Set-AzVMOperatingSystem ` + -VM $VM ` + -Windows ` + -ComputerName $ProtoVMName ` + -Credential $Credential ` + -ProvisionVMAgent + +$VM = Add-AzVMNetworkInterface -VM $VM -Id $Nic.Id +$VM = Set-AzVMSourceImage ` + -VM $VM ` + -PublisherName 'MicrosoftWindowsServer' ` + -Offer 'WindowsServer' ` + -Skus $WindowsServerSku ` + -Version latest + +$VM = Set-AzVMBootDiagnostic -VM $VM -Disable +New-AzVm ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -VM $VM + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Running provisioning script deploy-tlssettings.ps1 in VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$ProvisionImageResult = Invoke-AzVMRunCommandWithRetries ` + -ResourceGroupName $ResourceGroupName ` + -VMName $ProtoVMName ` + -CommandId 'RunPowerShellScript' ` + -ScriptPath "$PSScriptRoot\deploy-tlssettings.ps1" + +Write-Host "deploy-tlssettings.ps1 output: $($ProvisionImageResult.value.Message)" +Write-Host 'Waiting 1 minute for VM to reboot...' +Start-Sleep -Seconds 60 + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Running provisioning script deploy-psexec.ps1 in VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$DeployPsExecResult = Invoke-AzVMRunCommandWithRetries ` + -ResourceGroupName $ResourceGroupName ` + -VMName $ProtoVMName ` + -CommandId 'RunPowerShellScript' ` + -ScriptPath "$PSScriptRoot\deploy-psexec.ps1" + +Write-Host "deploy-psexec.ps1 output: $($DeployPsExecResult.value.Message)" + +#################################################################################################### +function Invoke-ScriptWithPrefix { + param( + [string]$ScriptName, + [switch]$AddAdminPw, + [string]$CudnnUrl + ) + + Write-Progress ` + -Activity $ProgressActivity ` + -Status "Running provisioning script $ScriptName in VM" ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + + $DropToAdminUserPrefix = Get-Content "$PSScriptRoot\drop-to-admin-user-prefix.ps1" -Encoding utf8NoBOM -Raw + $UtilityPrefixContent = Get-Content "$PSScriptRoot\utility-prefix.ps1" -Encoding utf8NoBOM -Raw + + $tempScriptFilename = [System.IO.Path]::GetTempPath() + [System.IO.Path]::GetRandomFileName() + ".txt" + try { + $script = Get-Content "$PSScriptRoot\$ScriptName" -Encoding utf8NoBOM -Raw + if ($AddAdminPw) { + $script = $script.Replace('# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1', $DropToAdminUserPrefix) + } + + if (-Not ([string]::IsNullOrWhiteSpace($CudnnUrl))) { + $script = $script.Replace('# REPLACE WITH $CudnnUrl', "`$CudnnUrl = '$CudnnUrl'") + } + + $script = $script.Replace('# REPLACE WITH UTILITY-PREFIX.ps1', $UtilityPrefixContent); + Set-Content -Path $tempScriptFilename -Value $script -Encoding utf8NoBOM + + $parameter = $null + if ($AddAdminPw) { + $parameter = @{AdminUserPassword = $AdminPW;} + } + + $InvokeResult = Invoke-AzVMRunCommandWithRetries ` + -ResourceGroupName $ResourceGroupName ` + -VMName $ProtoVMName ` + -CommandId 'RunPowerShellScript' ` + -ScriptPath $tempScriptFilename ` + -Parameter $parameter + + Write-Host "$ScriptName output: $($InvokeResult.value.Message)" + } finally { + Remove-Item $tempScriptFilename -Force + } +} + +Invoke-ScriptWithPrefix -ScriptName 'deploy-windows-sdks.ps1' -AddAdminPw + +#################################################################################################### +Invoke-ScriptWithPrefix -ScriptName 'deploy-visual-studio.ps1' -AddAdminPw + +#################################################################################################### +Invoke-ScriptWithPrefix -ScriptName 'deploy-mpi.ps1' -AddAdminPw + +#################################################################################################### +$StorageAccountKeys = Get-AzStorageAccountKey ` + -ResourceGroupName 'vcpkg-image-minting' ` + -Name 'vcpkgimageminting' + +$StorageContext = New-AzStorageContext ` + -StorageAccountName 'vcpkgimageminting' ` + -StorageAccountKey $StorageAccountKeys[0].Value + +$StartTime = [DateTime]::Now +$ExpiryTime = $StartTime.AddDays(1) + +$SetupSasToken = New-AzStorageAccountSASToken ` + -Service Blob ` + -Permission "r" ` + -Context $StorageContext ` + -StartTime $StartTime ` + -ExpiryTime $ExpiryTime ` + -ResourceType Object ` + -Protocol HttpsOnly + +Invoke-ScriptWithPrefix -ScriptName 'deploy-cuda.ps1' -AddAdminPw -CudnnUrl ($CudnnBaseUrl + $SetupSasToken) + +#################################################################################################### +Invoke-ScriptWithPrefix -ScriptName 'deploy-inteloneapi.ps1' -AddAdminPw + +#################################################################################################### +Invoke-ScriptWithPrefix -ScriptName 'deploy-pwsh.ps1' -AddAdminPw + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Running provisioning script deploy-settings.txt (as a .ps1) in VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$ProvisionImageResult = Invoke-AzVMRunCommandWithRetries ` + -ResourceGroupName $ResourceGroupName ` + -VMName $ProtoVMName ` + -CommandId 'RunPowerShellScript' ` + -ScriptPath "$PSScriptRoot\deploy-settings.txt" + +Write-Host "deploy-settings.txt output: $($ProvisionImageResult.value.Message)" +Restart-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Running provisioning script sysprep.ps1 in VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$SysprepResult = Invoke-AzVMRunCommandWithRetries ` + -ResourceGroupName $ResourceGroupName ` + -VMName $ProtoVMName ` + -CommandId 'RunPowerShellScript' ` + -ScriptPath "$PSScriptRoot\sysprep.ps1" + +Write-Host "sysprep.ps1 output: $($SysprepResult.value.Message)" + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Waiting for VM to shut down' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Wait-Shutdown -ResourceGroupName $ResourceGroupName -Name $ProtoVMName + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Converting VM to Image' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Stop-AzVM ` + -ResourceGroupName $ResourceGroupName ` + -Name $ProtoVMName ` + -Force + +Set-AzVM ` + -ResourceGroupName $ResourceGroupName ` + -Name $ProtoVMName ` + -Generalized + +$VM = Get-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName +$ImageConfig = New-AzImageConfig -Location $Location -SourceVirtualMachineId $VM.ID -HyperVGeneration 'V2' +$ImageName = Find-ImageName -ResourceGroupName 'vcpkg-image-minting' -Prefix $Prefix +New-AzImage -Image $ImageConfig -ImageName $ImageName -ResourceGroupName 'vcpkg-image-minting' + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Deleting unused temporary resources' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Remove-AzResourceGroup $ResourceGroupName -Force + +#################################################################################################### +Write-Progress -Activity $ProgressActivity -Completed +Write-Host "Generated Image: $ImageName" +Write-Host 'Finished!' diff --git a/scripts/azure-pipelines/windows/create-vmss.ps1 b/scripts/azure-pipelines/windows/create-vmss.ps1 new file mode 100644 index 00000000000000..96135831f1f36b --- /dev/null +++ b/scripts/azure-pipelines/windows/create-vmss.ps1 @@ -0,0 +1,94 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Creates a Windows virtual machine scale set, set up for vcpkg's CI. + +.DESCRIPTION +create-vmss.ps1 creates an Azure Windows VM scale set, set up for vcpkg's CI +system. See https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview +for more information. + +This script assumes you have installed Azure tools into PowerShell by following the instructions +at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1 +or are running from Azure Cloud Shell. + +.PARAMETER ImageName +The name of the image to deploy into the scale set. +#> + +[CmdLetBinding()] +Param( + [parameter(Mandatory=$true)] + [string]$ImageName +) + +$Location = 'westus2' +$Prefix = 'PrWin-' +$Prefix += (Get-Date -Format 'yyyy-MM-dd') +$VMSize = 'Standard_D32a_v4' +$LiveVMPrefix = 'BUILD' +$ErrorActionPreference = 'Stop' + +Import-Module "$PSScriptRoot/../create-vmss-helpers.psm1" -DisableNameChecking + +$ResourceGroupName = Find-ResourceGroupName $Prefix +$AdminPW = New-Password +$Image = Get-AzImage -ResourceGroupName 'vcpkg-image-minting' -ImageName $ImageName + +New-AzResourceGroup -Name $ResourceGroupName -Location $Location + +$VirtualNetwork = Create-LockedDownNetwork -ResourceGroupName $ResourceGroupName -Location $Location +$VmssIpConfigName = $ResourceGroupName + 'VmssIpConfig' +$VmssIpConfig = New-AzVmssIpConfig -SubnetId $VirtualNetwork.Subnets[0].Id -Primary -Name $VmssIpConfigName +$VmssName = $ResourceGroupName + 'Vmss' +$Vmss = New-AzVmssConfig ` + -Location $Location ` + -SkuCapacity 0 ` + -SkuName $VMSize ` + -SkuTier 'Standard' ` + -Overprovision $false ` + -UpgradePolicyMode Manual ` + -EvictionPolicy Delete ` + -Priority Spot ` + -MaxPrice -1 + +$NicName = $ResourceGroupName + 'NIC' +New-AzNetworkInterface ` + -Name $NicName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -Subnet $VirtualNetwork.Subnets[0] + +$Vmss = Add-AzVmssNetworkInterfaceConfiguration ` + -VirtualMachineScaleSet $Vmss ` + -Primary $true ` + -IpConfiguration $VmssIpConfig ` + -NetworkSecurityGroupId $VirtualNetwork.Subnets[0].NetworkSecurityGroup.Id ` + -Name $NicName + +$Vmss = Set-AzVmssOsProfile ` + -VirtualMachineScaleSet $Vmss ` + -ComputerNamePrefix $LiveVMPrefix ` + -AdminUsername 'AdminUser' ` + -AdminPassword $AdminPW ` + -WindowsConfigurationProvisionVMAgent $true ` + -WindowsConfigurationEnableAutomaticUpdate $false + +$Vmss = Set-AzVmssStorageProfile ` + -VirtualMachineScaleSet $Vmss ` + -OsDiskCreateOption 'FromImage' ` + -OsDiskCaching ReadOnly ` + -DiffDiskSetting Local ` + -ImageReferenceId $Image.Id + +New-AzVmss ` + -ResourceGroupName $ResourceGroupName ` + -Name $VmssName ` + -VirtualMachineScaleSet $Vmss + +Write-Host "Location: $Location" +Write-Host "Resource group name: $ResourceGroupName" +Write-Host 'Finished!' diff --git a/scripts/azure-pipelines/windows/deploy-cuda.ps1 b/scripts/azure-pipelines/windows/deploy-cuda.ps1 new file mode 100644 index 00000000000000..ab1cc1c54bd371 --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-cuda.ps1 @@ -0,0 +1,62 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1 + +# REPLACE WITH UTILITY-PREFIX.ps1 + +# REPLACE WITH $CudnnUrl + +$CudnnLocalZipPath = "$PSScriptRoot\cudnn-11.2-windows-x64-v8.1.1.33.zip" + +$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/11.3.0/network_installers/cuda_11.3.0_win10_network.exe' + +$CudaFeatures = 'nvcc_11.3 cuobjdump_11.3 nvprune_11.3 cupti_11.3 memcheck_11.3 nvdisasm_11.3 nvprof_11.3 ' + ` + 'visual_studio_integration_11.3 visual_profiler_11.3 visual_profiler_11.3 cublas_11.3 cublas_dev_11.3 ' + ` + 'cudart_11.3 cufft_11.3 cufft_dev_11.3 curand_11.3 curand_dev_11.3 cusolver_11.3 cusolver_dev_11.3 ' + ` + 'cusparse_11.3 cusparse_dev_11.3 npp_11.3 npp_dev_11.3 nvrtc_11.3 nvrtc_dev_11.3 nvml_dev_11.3 ' + ` + 'occupancy_calculator_11.3 thrust_11.3 ' + +$destination = "$env:ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v11.3" + +try { + Write-Host 'Downloading CUDA...' + [string]$installerPath = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $installerPath -s -S $CudaUrl + Write-Host 'Installing CUDA...' + $proc = Start-Process -FilePath $installerPath -ArgumentList @('-s ' + $CudaFeatures) -Wait -PassThru + $exitCode = $proc.ExitCode + if ($exitCode -eq 0) { + Write-Host 'Installation successful!' + } + else { + Write-Error "Installation failed! Exited with $exitCode." + throw + } +} +catch { + Write-Error "Failed to install CUDA! $($_.Exception.Message)" + throw +} + +try { + if ([string]::IsNullOrWhiteSpace($CudnnUrl)) { + if (-Not (Test-Path $CudnnLocalZipPath)) { + throw "CUDNN zip ($CudnnLocalZipPath) was missing, please download from NVidia and place next to this script." + } + + $cudnnZipPath = $CudnnLocalZipPath + } else { + Write-Host 'Downloading CUDNN...' + $cudnnZipPath = Get-TempFilePath -Extension 'zip' + curl.exe -L -o $cudnnZipPath -s -S $CudnnUrl + } + + Write-Host "Installing CUDNN to $destination..." + tar.exe -xvf "$cudnnZipPath" --strip 1 --directory "$destination" + Write-Host 'Installation successful!' +} +catch { + Write-Error "Failed to install CUDNN! $($_.Exception.Message)" + throw +} diff --git a/scripts/azure-pipelines/windows/deploy-install-disk.ps1 b/scripts/azure-pipelines/windows/deploy-install-disk.ps1 new file mode 100644 index 00000000000000..6bbc175872eec8 --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-install-disk.ps1 @@ -0,0 +1,60 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +# REPLACE WITH UTILITY-PREFIX.ps1 + +<# +.SYNOPSIS +Partitions a new physical disk. +.DESCRIPTION +Takes the disk $DiskNumber, turns it on, then partitions it for use with label +$Label and drive letter $Letter. +.PARAMETER DiskNumber +The number of the disk to set up. +.PARAMETER Letter +The drive letter at which to mount the disk. +.PARAMETER Label +The label to give the disk. +#> +Function New-PhysicalDisk { +Param( + [int]$DiskNumber, + [string]$Letter, + [string]$Label +) + if ($Letter.Length -ne 1) { + throw "Bad drive letter $Letter, expected only one letter. (Did you accidentially add a : ?)" + } + + try { + Write-Host "Attempting to online physical disk $DiskNumber" + [string]$diskpartScriptPath = Get-TempFilePath -Extension 'txt' + [string]$diskpartScriptContent = + "SELECT DISK $DiskNumber`r`n" + + "ONLINE DISK`r`n" + + Write-Host "Writing diskpart script to $diskpartScriptPath with content:" + Write-Host $diskpartScriptContent + Set-Content -Path $diskpartScriptPath -Value $diskpartScriptContent + Write-Host 'Invoking DISKPART...' + & diskpart.exe /s $diskpartScriptPath + + Write-Host "Provisioning physical disk $DiskNumber as drive $Letter" + [string]$diskpartScriptContent = + "SELECT DISK $DiskNumber`r`n" + + "ATTRIBUTES DISK CLEAR READONLY`r`n" + + "CREATE PARTITION PRIMARY`r`n" + + "FORMAT FS=NTFS LABEL=`"$Label`" QUICK`r`n" + + "ASSIGN LETTER=$Letter`r`n" + Write-Host "Writing diskpart script to $diskpartScriptPath with content:" + Write-Host $diskpartScriptContent + Set-Content -Path $diskpartScriptPath -Value $diskpartScriptContent + Write-Host 'Invoking DISKPART...' + & diskpart.exe /s $diskpartScriptPath + } + catch { + Write-Error "Failed to provision physical disk $DiskNumber as drive $Letter! $($_.Exception.Message)" + } +} + +New-PhysicalDisk -DiskNumber 1 -Letter 'E' -Label 'install disk' diff --git a/scripts/azure-pipelines/windows/deploy-inteloneapi.ps1 b/scripts/azure-pipelines/windows/deploy-inteloneapi.ps1 new file mode 100644 index 00000000000000..45d8db3c10dd45 --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-inteloneapi.ps1 @@ -0,0 +1,74 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1 + +# REPLACE WITH UTILITY-PREFIX.ps1 + +# Seems like only the HPC kit is really needed? +#$oneAPIBaseUrl = 'https://registrationcenter-download.intel.com/akdlm/irc_nas/17768/w_BaseKit_p_2021.2.0.2871_offline.exe' +$oneAPIHPCUrl = 'https://registrationcenter-download.intel.com/akdlm/irc_nas/17762/w_HPCKit_p_2021.2.0.2901_offline.exe' + +# Possible oneAPI Base components: +#intel.oneapi.win.vtune 2021.1.1-68 true Intel® VTune(TM) Profiler +#intel.oneapi.win.tbb.devel 2021.1.1-133 true Intel® oneAPI Threading Building Blocks +#intel.oneapi.win.dnnl 2021.1.1-44 true Intel® oneAPI Deep Neural Network Library +#intel.oneapi.win.mkl.devel 2021.1.1-52 true Intel® oneAPI Math Kernel Library +#intel.oneapi.win.vpl 2021.1.1-76 true Intel® oneAPI Video Processing Library +#intel.oneapi.win.dpcpp_debugger 10.0.0-2213 true Intel® Distribution for GDB* +#intel.oneapi.win.ipp.devel 2021.1.1-47 true Intel® Integrated Performance Primitives +#intel.oneapi.win.ippcp 2021.1.1-53 true Intel® Integrated Performance Primitives Cryptography +#intel.oneapi.win.dpcpp-compiler 2021.1.1-191 true Intel® oneAPI DPC++/C++ Compiler +#intel.oneapi.win.dpcpp-library 2021.1.1-191 true Intel® oneAPI DPC++ Library +#intel.oneapi.win.dpcpp_ct.common 2021.1.1-54 true Intel® DPC++ Compatibility Tool +#intel.oneapi.win.dal.devel 2021.1.1-71 true Intel® oneAPI Data Analytics Library +#intel.oneapi.win.python3 2021.1.1-46 true Intel® Distribution for Python* +#intel.oneapi.win.advisor 2021.1.1-53 true Intel® Advisor +#$oneAPIBaseComponents = 'intel.oneapi.win.dpcpp-compiler:intel.oneapi.win.dpcpp-library:intel.oneapi.win.mkl.devel:intel.oneapi.win.ipp.devel:intel.oneapi.win.ippcp:intel.oneapi.win.dal.devel:intel.oneapi.win.dnnl:intel.oneapi.win.vpl:intel.oneapi.win.tbb.devel' +$oneAPIHPCComponents = 'intel.oneapi.win.cpp-compiler:intel.oneapi.win.ifort-compiler' + +<# +.SYNOPSIS +Installs Intel oneAPI compilers and toolsets. Examples for CI can be found here: https://github.com/oneapi-src/oneapi-ci + +.DESCRIPTION +InstallInteloneAPI installs the Intel oneAPI Compiler & Toolkit with the components specified as a +:-separated list of strings in $Components. + +.PARAMETER Url +The URL of the Intel Toolkit installer. + +.PARAMETER Components +A :-separated list of components to install. +#> +Function InstallInteloneAPI { + Param( + [String]$Url, + [String]$Components + ) + + try { + [string]$installerPath = Get-TempFilePath -Extension 'exe' + [string]$extractionPath = [System.IO.Path]::GetTempPath() + [System.IO.Path]::GetRandomFileName() + Write-Host 'Downloading Intel oneAPI...to: ' $installerPath + curl.exe -L -o $installerPath -s -S $Url + Write-Host 'Extracting Intel oneAPI...to folder: ' $extractionPath + $proc = Start-Process -FilePath $installerPath -ArgumentList @('-s ', '-x ', '-f ' + $extractionPath , '--log extract.log') -Wait -PassThru + Write-Host 'Install Intel oneAPI...from folder: ' $extractionPath + $proc = Start-Process -FilePath $extractionPath/bootstrapper.exe -ArgumentList @('-s ', '--action install', "--components=$Components" , '--eula=accept', '--continue-with-optional-error=yes', '-p=NEED_VS2017_INTEGRATION=0', '-p=NEED_VS2019_INTEGRATION=0', '--log-dir=.') -Wait -PassThru + $exitCode = $proc.ExitCode + if ($exitCode -eq 0) { + Write-Host 'Installation successful!' + } + else { + Write-Error "Installation failed! Exited with $exitCode." + throw + } + } + catch { + Write-Error "Failed to install Intel oneAPI! $($_.Exception.Message)" + throw + } +} + +InstallInteloneAPI -Url $oneAPIHPCUrl -Components $oneAPIHPCComponents diff --git a/scripts/azure-pipelines/windows/deploy-mpi.ps1 b/scripts/azure-pipelines/windows/deploy-mpi.ps1 new file mode 100644 index 00000000000000..ba369f7971d733 --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-mpi.ps1 @@ -0,0 +1,47 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1 + +# REPLACE WITH UTILITY-PREFIX.ps1 + +$MpiUrl = 'https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe' + +<# +.SYNOPSIS +Installs MPI + +.DESCRIPTION +Downloads the MPI installer located at $Url, and installs it with the +correct flags. + +.PARAMETER Url +The URL of the installer. +#> +Function InstallMpi { + Param( + [String]$Url + ) + + try { + Write-Host 'Downloading MPI...' + [string]$installerPath = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $installerPath -s -S $Url + Write-Host 'Installing MPI...' + $proc = Start-Process -FilePath $installerPath -ArgumentList @('-force', '-unattend') -Wait -PassThru + $exitCode = $proc.ExitCode + if ($exitCode -eq 0) { + Write-Host 'Installation successful!' + } + else { + Write-Error "Installation failed! Exited with $exitCode." + throw + } + } + catch { + Write-Error "Failed to install MPI! $($_.Exception.Message)" + throw + } +} + +InstallMpi -Url $MpiUrl diff --git a/scripts/azure-pipelines/windows/deploy-psexec.ps1 b/scripts/azure-pipelines/windows/deploy-psexec.ps1 new file mode 100644 index 00000000000000..2a1f6fb14a87e4 --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-psexec.ps1 @@ -0,0 +1,8 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' +$PsExecPath = 'C:\PsExec64.exe' +Write-Host "Downloading psexec to: $PsExecPath" +& curl.exe -L -o $PsExecPath -s -S https://live.sysinternals.com/PsExec64.exe diff --git a/scripts/azure-pipelines/windows/deploy-pwsh.ps1 b/scripts/azure-pipelines/windows/deploy-pwsh.ps1 new file mode 100644 index 00000000000000..d500745840a1b9 --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-pwsh.ps1 @@ -0,0 +1,9 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1 + +# REPLACE WITH UTILITY-PREFIX.ps1 + +$PwshUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.1.4/PowerShell-7.1.4-win-x64.msi' +InstallMSI -Url $PwshUrl -Name 'PowerShell Core' diff --git a/scripts/azure-pipelines/windows/deploy-settings.txt b/scripts/azure-pipelines/windows/deploy-settings.txt new file mode 100644 index 00000000000000..c340453c69e366 --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-settings.txt @@ -0,0 +1,21 @@ +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' + +Write-Host 'Disabling pagefile...' +wmic computersystem set AutomaticManagedPagefile=False +wmic pagefileset delete + +$av = Get-Command Add-MPPreference -ErrorAction SilentlyContinue +if ($null -eq $av) { + Write-Host 'AntiVirus not installed, skipping exclusions.' +} else { + Write-Host 'Configuring AntiVirus exclusions...' + Add-MpPreference -ExclusionPath C:\agent + Add-MPPreference -ExclusionPath D:\ + Add-MPPreference -ExclusionPath E:\ + Add-MPPreference -ExclusionProcess ninja.exe + Add-MPPreference -ExclusionProcess clang-cl.exe + Add-MPPreference -ExclusionProcess cl.exe + Add-MPPreference -ExclusionProcess link.exe + Add-MPPreference -ExclusionProcess python.exe +} diff --git a/scripts/azure-pipelines/windows/deploy-tlssettings.ps1 b/scripts/azure-pipelines/windows/deploy-tlssettings.ps1 new file mode 100644 index 00000000000000..4b00a6deacee3f --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-tlssettings.ps1 @@ -0,0 +1,738 @@ +#*************************************************************************************************************** +# This script supports the TLS 1.2 everywhere project +# It does the following: +# * By default it disables TLS 1.O, TLS 1.1, SSLv2, SSLv3 and Enables TLS1.2 +# * The CipherSuite order is set to the SDL approved version. +# * The FIPS MinEncryptionLevel is set to 3. +# * RC4 is disabled +# * A log with a transcript of all actions taken is generated +#*************************************************************************************************************** + +#************************************************ SCRIPT USAGE ************************************************ +# .\TLSSettings.ps1 +# -SetCipherOrder : Excellence/Min-Bar, default(Excellence), use B to set Min-Bar. (Min-Bar ordering prefers ciphers with smaller key sizes to improve performance over security) +# -RebootIfRequired : $true/$false, default($true), use $false to disable auto-reboot (Settings won't take effect until a reboot is completed) +# -EnableOlderTlsVersions : $true/$false, default($false), use $true to explicitly Enable TLS1.0, TLS1.1 +#*************************************************************************************************************** + +#***************************TEAM CAN DETERMINE WHAT CIPHER SUITE ORDER IS CHOSEN ****************************** +# Option B provides the min-bar configuration (small trade-off: performance over security) +# Syntax: .\TLSSettings.ps1 -SetCipherOrder B +# if no option is supplied, you will get the opportunity for excellence cipher order (small trade-off: security over performance) +# Syntax: .\TLSSettings.ps1 +#*************************************************************************************************************** + +param ( + [string]$SetCipherOrder = " ", + [bool]$RebootIfRequired = $true, + [bool]$EnableOlderTlsVersions = $false +) + +#******************* FUNCTION THAT ACTUALLY UPDATES KEYS; WILL RETURN REBOOT FLAG IF CHANGES *********************** +Function Set-CryptoSetting { + param ( + $regKeyName, + $value, + $valuedata, + $valuetype + ) + + $restart = $false + + # Check for existence of registry key, and create if it does not exist + If (!(Test-Path -Path $regKeyName)) { + New-Item $regKeyName | Out-Null + } + + + # Get data of registry value, or null if it does not exist + $val = (Get-ItemProperty -Path $regKeyName -Name $value -ErrorAction SilentlyContinue).$value + + + If ($val -eq $null) { + # Value does not exist - create and set to desired value + New-ItemProperty -Path $regKeyName -Name $value -Value $valuedata -PropertyType $valuetype | Out-Null + $restart = $true + } + Else { + # Value does exist - if not equal to desired value, change it + If ($val -ne $valuedata) { + Set-ItemProperty -Path $regKeyName -Name $value -Value $valuedata + $restart = $true + } + } + + + $restart +} +#*************************************************************************************************************** + + +#******************* FUNCTION THAT DISABLES RC4 *********************** +Function DisableRC4 { + + $restart = $false + $subkeys = Get-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL" + $ciphers = $subkeys.OpenSubKey("Ciphers", $true) + + Write-Log -Message "----- Checking the status of RC4 -----" -Logfile $logLocation -Severity Information + + $RC4 = $false + if ($ciphers.SubKeyCount -eq 0) { + $k1 = $ciphers.CreateSubKey("RC4 128/128") + $k1.SetValue("Enabled", 0, [Microsoft.Win32.RegistryValueKind]::DWord) + $restart = $true + $k2 = $ciphers.CreateSubKey("RC4 64/128") + $k2.SetValue("Enabled", 0, [Microsoft.Win32.RegistryValueKind]::DWord) + $k3 = $ciphers.CreateSubKey("RC4 56/128") + $k3.SetValue("Enabled", 0, [Microsoft.Win32.RegistryValueKind]::DWord) + $k4 = $ciphers.CreateSubKey("RC4 40/128") + $k4.SetValue("Enabled", 0, [Microsoft.Win32.RegistryValueKind]::DWord) + + Write-Log -Message "RC4 was disabled " -Logfile $logLocation -Severity Information + $RC4 = $true + } + + If ($RC4 -ne $true) { + Write-Log -Message "There was no change for RC4 " -Logfile $logLocation -Severity Information + } + + $restart +} +#*************************************************************************************************************** + +#******************* FUNCTION CHECKS FOR PROBLEMATIC FIPS SETTING AND FIXES IT *********************** +Function Test-RegistryValueForFipsSettings { + + $restart = $false + + $fipsPath = @( + "HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp", + "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services", + "HKLM:\System\CurrentControlSet\Control\Terminal Server\DefaultUserConfiguration" + ) + + $fipsValue = "MinEncryptionLevel" + + + foreach ($path in $fipsPath) { + + Write-Log -Message "Checking to see if $($path)\$fipsValue exists" -Logfile $logLocation -Severity Information + + $ErrorActionPreference = "stop" + Try { + + $result = Get-ItemProperty -Path $path | Select-Object -ExpandProperty $fipsValue + if ($result -eq 4) { + set-itemproperty -Path $path -Name $fipsValue -value 3 + Write-Log -Message "Regkey $($path)\$fipsValue was changed from value $result to a value of 3" -Logfile $logLocation -Severity Information + $restart = $true + } + else { + Write-Log -Message "Regkey $($path)\$fipsValue left at value $result" -Logfile $logLocation -Severity Information + } + + } + Catch [System.Management.Automation.ItemNotFoundException] { + + Write-Log -Message "Reg path $path was not found" -Logfile $logLocation -Severity Information + } + Catch [System.Management.Automation.PSArgumentException] { + + Write-Log -Message "Regkey $($path)\$fipsValue was not found" -Logfile $logLocation -Severity Information + } + Catch { + Write-Log -Message "Error of type $($Error[0].Exception.GetType().FullName) trying to get $($path)\$fipsValue" -Logfile $logLocation -Severity Information + } + Finally {$ErrorActionPreference = "Continue" + } + } + $restart +} +#*************************************************************************************************************** + +#********************************** FUNCTION THAT CREATE LOG DIRECTORY IF IT DOES NOT EXIST ******************************* +function CreateLogDirectory { + + $TARGETDIR = "$env:HOMEDRIVE\Logs" + if ( -Not (Test-Path -Path $TARGETDIR ) ) { + New-Item -ItemType directory -Path $TARGETDIR | Out-Null + } + + $TARGETDIR = $TARGETDIR + "\" + "TLSSettingsLogFile.csv" + + return $TARGETDIR +} +#*************************************************************************************************************** + + +#********************************** FUNCTION THAT LOGS WHAT THE SCRIPT IS DOING ******************************* +function Write-Log { + [CmdletBinding()] + param( + [Parameter()] + [ValidateNotNullOrEmpty()] + [string]$Message, + + [Parameter()] + [ValidateNotNullOrEmpty()] + [string]$LogFile, + + [Parameter()] + [ValidateNotNullOrEmpty()] + [ValidateSet('Information', 'Warning', 'Error')] + [string]$Severity = 'Information' + ) + + + [pscustomobject]@{ + Time = (Get-Date -f g) + Message = $Message + Severity = $Severity + } | ConvertTo-Csv -NoTypeInformation | Select-Object -Skip 1 | Out-File -Append -FilePath $LogFile +} + +#********************************TLS CipherSuite Settings ******************************************* + +# CipherSuites for windows OS < 10 +function Get-BaseCipherSuitesOlderWindows() +{ + param + ( + [Parameter(Mandatory=$true, Position=0)][bool] $isExcellenceOrder + ) + $cipherorder = @() + + if ($isExcellenceOrder -eq $true) + { + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384_P384" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256_P256" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384_P384" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256_P256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256" + } + else + { + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256_P256" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384_P384" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256_P256" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384_P384" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384" + } + + # Add additional ciphers when EnableOlderTlsVersions flag is set to true + if ($EnableOlderTlsVersions) + { + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA_P256" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256" + $cipherorder += "TLS_RSA_WITH_AES_256_GCM_SHA384" + $cipherorder += "TLS_RSA_WITH_AES_128_GCM_SHA256" + $cipherorder += "TLS_RSA_WITH_AES_256_CBC_SHA256" + $cipherorder += "TLS_RSA_WITH_AES_128_CBC_SHA256" + $cipherorder += "TLS_RSA_WITH_AES_256_CBC_SHA" + $cipherorder += "TLS_RSA_WITH_AES_128_CBC_SHA" + } + return $cipherorder +} + +# Ciphersuites needed for backwards compatibility with Firefox, Chrome +# Server 2012 R2 doesn't support TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 +# Both firefox and chrome negotiate ECDHE_RSA_AES_256_CBC_SHA1, Edge negotiates ECDHE_RSA_AES_256_CBC_SHA384 +function Get-BrowserCompatCipherSuitesOlderWindows() +{ + param + ( + [Parameter(Mandatory=$true, Position=0)][bool] $isExcellenceOrder + ) + $cipherorder = @() + + if ($isExcellenceOrder -eq $true) + { + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384" # (uses SHA-1) + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256" # (uses SHA-1) + } + else + { + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256" # (uses SHA-1) + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384" # (uses SHA-1) + } + return $cipherorder +} + +# Ciphersuites for OS versions windows 10 and above +function Get-BaseCipherSuitesWin10Above() +{ + param + ( + [Parameter(Mandatory=$true, Position=0)][bool] $isExcellenceOrder + ) + + $cipherorder = @() + + if ($isExcellenceOrder -eq $true) + { + + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + } + else + { + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + } + # Add additional ciphers when EnableOlderTlsVersions flag is set to true + if ($EnableOlderTlsVersions) + { + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA_P256" + $cipherorder += "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256" + $cipherorder += "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256" + $cipherorder += "TLS_RSA_WITH_AES_256_GCM_SHA384" + $cipherorder += "TLS_RSA_WITH_AES_128_GCM_SHA256" + $cipherorder += "TLS_RSA_WITH_AES_256_CBC_SHA256" + $cipherorder += "TLS_RSA_WITH_AES_128_CBC_SHA256" + $cipherorder += "TLS_RSA_WITH_AES_256_CBC_SHA" + $cipherorder += "TLS_RSA_WITH_AES_128_CBC_SHA" + } + + return $cipherorder +} + + +#******************************* TLS Version Settings **************************************************** + +function Get-RegKeyPathForTls12() +{ + $regKeyPath = @( + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" + ) + return $regKeyPath +} + +function Get-RegKeyPathForTls11() +{ + $regKeyPath = @( + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" + ) + return $regKeyPath +} + +function Get-RegKeypathForTls10() +{ + $regKeyPath = @( + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" + ) + return $regKeyPath +} + +function Get-RegKeyPathForSsl30() +{ + $regKeyPath = @( + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server" + ) + return $regKeyPath +} + +function Get-RegKeyPathForSsl20() +{ + $regKeyPath = @( + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client", + "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server" + ) + return $regKeyPath +} + +#Initialize reboot value to false +$reboot = $false + +#*****************************Create the logfile if not does not exist*************************************** +$logLocation = CreateLogDirectory + + +#Start writing to the logs +Write-Log -Message "========== Start of logging for a script execution ==========" -Logfile $logLocation -Severity Information + +$registryPathGoodGuys = @() +$registryPathBadGuys = @() + +# we enable TLS 1.2 and disable SSL 2.0, 3.0 in any case +$registryPathGoodGuys += Get-RegKeyPathForTls12 + +$registryPathBadGuys += Get-RegKeyPathForSsl20 +$registryPathBadGuys += Get-RegKeyPathForSsl30 + +# add TLS 1.0/1.1 to good/bad depending on user's preference +# default is adding TLS 1.0/1.1 to bad +if ($EnableOlderTlsVersions) +{ + $registryPathGoodGuys += Get-RegKeypathForTls10 + $registryPathGoodGuys += Get-RegKeyPathForTls11 + Write-Log -Message "Enabling TLS1.2, TLS1.1, TLS1.0. Disabling SSL3.0, SSL2.0" -Logfile $logLocation -Severity Information +} +else +{ + $registryPathBadGuys += Get-RegKeypathForTls10 + $registryPathBadGuys += Get-RegKeyPathForTls11 + Write-Log -Message "Enabling TLS1.2. Disabling TLS1.1, TLS1.0, SSL3.0, SSL2.0" -Logfile $logLocation -Severity Information +} + + +Write-Log -Message "Check which registry keys exist already and which registry keys need to be created." -Logfile $logLocation -Severity Information + +#******************* CREATE THE REGISTRY KEYS IF THEY DON'T EXIST******************************** +# Check for existence of GoodGuy registry keys, and create if they do not exist +For ($i = 0; $i -lt $registryPathGoodGuys.Length; $i = $i + 1) { + + Write-Log -Message "Checking for existing of key: $($registryPathGoodGuys[$i]) " -Logfile $logLocation -Severity Information + If (!(Test-Path -Path $registryPathGoodGuys[$i])) { + New-Item $registryPathGoodGuys[$i] | Out-Null + Write-Log -Message "Creating key: $($registryPathGoodGuys[$i]) " -Logfile $logLocation -Severity Information + } +} + +# Check for existence of BadGuy registry keys, and create if they do not exist +For ($i = 0; $i -lt $registryPathBadGuys.Length; $i = $i + 1) { + + Write-Log -Message "Checking for existing of key: $($registryPathBadGuys[$i]) " -Logfile $logLocation -Severity Information + If (!(Test-Path -Path $registryPathBadGuys[$i])) { + Write-Log -Message "Creating key: $($registryPathBadGuys[$i]) " -Logfile $logLocation -Severity Information + New-Item $registryPathBadGuys[$i] | Out-Null + } +} + +#******************* EXPLICITLY DISABLE SSLV2, SSLV3, TLS10 AND TLS11 ******************************** +For ($i = 0; $i -lt $registryPathBadGuys.Length; $i = $i + 1) { + + if ($registryPathBadGuys[$i].Contains("Client") -Or $registryPathBadGuys[$i].Contains("Server")) { + + Write-Log -Message "Disabling this key: $($registryPathBadGuys[$i]) " -Logfile $logLocation -Severity Information + $result = Set-CryptoSetting $registryPathBadGuys[$i].ToString() Enabled 0 DWord + $result = Set-CryptoSetting $registryPathBadGuys[$i].ToString() DisabledByDefault 1 DWord + $reboot = $reboot -or $result + } +} + +#********************************* EXPLICITLY Enable TLS12 **************************************** +For ($i = 0; $i -lt $registryPathGoodGuys.Length; $i = $i + 1) { + + if ($registryPathGoodGuys[$i].Contains("Client") -Or $registryPathGoodGuys[$i].Contains("Server")) { + + Write-Log -Message "Enabling this key: $($registryPathGoodGuys[$i]) " -Logfile $logLocation -Severity Information + $result = Set-CryptoSetting $registryPathGoodGuys[$i].ToString() Enabled 1 DWord + $result = Set-CryptoSetting $registryPathGoodGuys[$i].ToString() DisabledByDefault 0 DWord + $reboot = $reboot -or $result + } +} + +#************************************** Disable RC4 ************************************************ +$result = DisableRC4 +$reboot = $reboot -or $result + + +#************************************** Set Cipher Suite Order ************************************** +Write-Log -Message "----- starting ciphersuite order calculation -----" -Logfile $logLocation -Severity Information +$configureExcellenceOrder = $true +if ($SetCipherOrder.ToUpper() -eq "B") +{ + $configureExcellenceOrder = $false + Write-Host "The min bar cipher suite order was chosen." + Write-Log -Message "The min bar cipher suite order was chosen." -Logfile $logLocation -Severity Information +} +else +{ + Write-Host "The opportunity for excellence cipher suite order was chosen." + Write-Log -Message "The opportunity for excellence cipher suite order was chosen." -Logfile $logLocation -Severity Information +} +$cipherlist = @() + +if ([Environment]::OSVersion.Version.Major -lt 10) +{ + $cipherlist += Get-BaseCipherSuitesOlderWindows -isExcellenceOrder $configureExcellenceOrder + $cipherlist += Get-BrowserCompatCipherSuitesOlderWindows -isExcellenceOrder $configureExcellenceOrder +} +else +{ + $cipherlist += Get-BaseCipherSuitesWin10Above -isExcellenceOrder $configureExcellenceOrder +} +$cipherorder = [System.String]::Join(",", $cipherlist) + Write-Host "Appropriate ciphersuite order : $cipherorder" + Write-Log -Message "Appropriate ciphersuite order : $cipherorder" -Logfile $logLocation -Severity Information + +$CipherSuiteRegKey = "HKLM:\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002" + +if (!(Test-Path -Path $CipherSuiteRegKey)) +{ + New-Item $CipherSuiteRegKey | Out-Null + $reboot = $True + Write-Log -Message "Creating key: $($CipherSuiteRegKey) " -Logfile $logLocation -Severity Information +} + +$val = (Get-Item -Path $CipherSuiteRegKey -ErrorAction SilentlyContinue).GetValue("Functions", $null) +Write-Log -Message "Previous cipher suite value: $val " -Logfile $logLocation -Severity Information +Write-Log -Message "New cipher suite value : $cipherorder " -Logfile $logLocation -Severity Information + +if ($val -ne $cipherorder) +{ + Write-Log -Message "Cipher suite order needs to be updated. " -Logfile $logLocation -Severity Information + Write-Host "The original cipher suite order needs to be updated", `n, $val + Set-ItemProperty -Path $CipherSuiteRegKey -Name Functions -Value $cipherorder + Write-Log -Message "Cipher suite value was updated. " -Logfile $logLocation -Severity Information + $reboot = $True +} +else +{ + Write-Log -Message "Cipher suite order does not need to be updated. " -Logfile $logLocation -Severity Information + Write-Log -Message "Cipher suite value was not updated as there was no change. " -Logfile $logLocation -Severity Information +} + +#****************************** CHECK THE FIPS SETTING WHICH IMPACTS RDP'S ALLOWED CIPHERS ************************** +#Check for FipsSettings +Write-Log -Message "Checking to see if reg keys exist and if MinEncryptionLevel is set to 4" -Logfile $logLocation -Severity Information +$result = Test-RegistryValueForFipsSettings +$reboot = $reboot -or $result + + +#************************************** REBOOT ************************************** + +if ($RebootIfRequired) +{ + Write-Log -Message "You set the RebootIfRequired flag to true. If changes are made, the system will reboot " -Logfile $logLocation -Severity Information + # If any settings were changed, reboot + If ($reboot) + { + Write-Log -Message "Rebooting now... " -Logfile $logLocation -Severity Information + Write-Log -Message "Using this command: shutdown.exe /r /t 5 /c ""Crypto settings changed"" /f /d p:2:4 " -Logfile $logLocation -Severity Information + Write-Host "Rebooting now..." + shutdown.exe /r /t 5 /c "Crypto settings changed" /f /d p:2:4 + } + Else + { + Write-Host "Nothing get updated." + Write-Log -Message "Nothing get updated. " -Logfile $logLocation -Severity Information + } +} +else +{ + + Write-Log -Message "You set the RebootIfRequired flag to false. If changes are made, the system will NOT reboot " -Logfile $logLocation -Severity Information + Write-Log -Message "No changes will take effect until a reboot has been completed. " -Logfile $logLocation -Severity Information + Write-Log -Message "Script does not include a reboot by design" -Logfile $logLocation -Severity Information +} +Write-Log -Message "========== End of logging for a script execution ==========" -Logfile $logLocation -Severity Information +# SIG # Begin signature block +# MIIjhgYJKoZIhvcNAQcCoIIjdzCCI3MCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAHtlEJwNffjnOP +# Sr2t1yq5EfE0ll4GozyZt3UXO9BXKKCCDYEwggX/MIID56ADAgECAhMzAAABh3IX +# chVZQMcJAAAAAAGHMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjAwMzA0MTgzOTQ3WhcNMjEwMzAzMTgzOTQ3WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQDOt8kLc7P3T7MKIhouYHewMFmnq8Ayu7FOhZCQabVwBp2VS4WyB2Qe4TQBT8aB +# znANDEPjHKNdPT8Xz5cNali6XHefS8i/WXtF0vSsP8NEv6mBHuA2p1fw2wB/F0dH +# sJ3GfZ5c0sPJjklsiYqPw59xJ54kM91IOgiO2OUzjNAljPibjCWfH7UzQ1TPHc4d +# weils8GEIrbBRb7IWwiObL12jWT4Yh71NQgvJ9Fn6+UhD9x2uk3dLj84vwt1NuFQ +# itKJxIV0fVsRNR3abQVOLqpDugbr0SzNL6o8xzOHL5OXiGGwg6ekiXA1/2XXY7yV +# Fc39tledDtZjSjNbex1zzwSXAgMBAAGjggF+MIIBejAfBgNVHSUEGDAWBgorBgEE +# AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUhov4ZyO96axkJdMjpzu2zVXOJcsw +# UAYDVR0RBEkwR6RFMEMxKTAnBgNVBAsTIE1pY3Jvc29mdCBPcGVyYXRpb25zIFB1 +# ZXJ0byBSaWNvMRYwFAYDVQQFEw0yMzAwMTIrNDU4Mzg1MB8GA1UdIwQYMBaAFEhu +# ZOVQBdOCqhc3NyK1bajKdQKVMFQGA1UdHwRNMEswSaBHoEWGQ2h0dHA6Ly93d3cu +# bWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01pY0NvZFNpZ1BDQTIwMTFfMjAxMS0w +# Ny0wOC5jcmwwYQYIKwYBBQUHAQEEVTBTMFEGCCsGAQUFBzAChkVodHRwOi8vd3d3 +# Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NlcnRzL01pY0NvZFNpZ1BDQTIwMTFfMjAx +# MS0wNy0wOC5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAgEAixmy +# S6E6vprWD9KFNIB9G5zyMuIjZAOuUJ1EK/Vlg6Fb3ZHXjjUwATKIcXbFuFC6Wr4K +# NrU4DY/sBVqmab5AC/je3bpUpjtxpEyqUqtPc30wEg/rO9vmKmqKoLPT37svc2NV +# BmGNl+85qO4fV/w7Cx7J0Bbqk19KcRNdjt6eKoTnTPHBHlVHQIHZpMxacbFOAkJr +# qAVkYZdz7ikNXTxV+GRb36tC4ByMNxE2DF7vFdvaiZP0CVZ5ByJ2gAhXMdK9+usx +# zVk913qKde1OAuWdv+rndqkAIm8fUlRnr4saSCg7cIbUwCCf116wUJ7EuJDg0vHe +# yhnCeHnBbyH3RZkHEi2ofmfgnFISJZDdMAeVZGVOh20Jp50XBzqokpPzeZ6zc1/g +# yILNyiVgE+RPkjnUQshd1f1PMgn3tns2Cz7bJiVUaqEO3n9qRFgy5JuLae6UweGf +# AeOo3dgLZxikKzYs3hDMaEtJq8IP71cX7QXe6lnMmXU/Hdfz2p897Zd+kU+vZvKI +# 3cwLfuVQgK2RZ2z+Kc3K3dRPz2rXycK5XCuRZmvGab/WbrZiC7wJQapgBodltMI5 +# GMdFrBg9IeF7/rP4EqVQXeKtevTlZXjpuNhhjuR+2DMt/dWufjXpiW91bo3aH6Ea +# jOALXmoxgltCp1K7hrS6gmsvj94cLRf50QQ4U8Qwggd6MIIFYqADAgECAgphDpDS +# AAAAAAADMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK +# V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0 +# IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0 +# ZSBBdXRob3JpdHkgMjAxMTAeFw0xMTA3MDgyMDU5MDlaFw0yNjA3MDgyMTA5MDla +# MH4xCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS +# ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMT +# H01pY3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBIDIwMTEwggIiMA0GCSqGSIb3DQEB +# AQUAA4ICDwAwggIKAoICAQCr8PpyEBwurdhuqoIQTTS68rZYIZ9CGypr6VpQqrgG +# OBoESbp/wwwe3TdrxhLYC/A4wpkGsMg51QEUMULTiQ15ZId+lGAkbK+eSZzpaF7S +# 35tTsgosw6/ZqSuuegmv15ZZymAaBelmdugyUiYSL+erCFDPs0S3XdjELgN1q2jz +# y23zOlyhFvRGuuA4ZKxuZDV4pqBjDy3TQJP4494HDdVceaVJKecNvqATd76UPe/7 +# 4ytaEB9NViiienLgEjq3SV7Y7e1DkYPZe7J7hhvZPrGMXeiJT4Qa8qEvWeSQOy2u +# M1jFtz7+MtOzAz2xsq+SOH7SnYAs9U5WkSE1JcM5bmR/U7qcD60ZI4TL9LoDho33 +# X/DQUr+MlIe8wCF0JV8YKLbMJyg4JZg5SjbPfLGSrhwjp6lm7GEfauEoSZ1fiOIl +# XdMhSz5SxLVXPyQD8NF6Wy/VI+NwXQ9RRnez+ADhvKwCgl/bwBWzvRvUVUvnOaEP +# 6SNJvBi4RHxF5MHDcnrgcuck379GmcXvwhxX24ON7E1JMKerjt/sW5+v/N2wZuLB +# l4F77dbtS+dJKacTKKanfWeA5opieF+yL4TXV5xcv3coKPHtbcMojyyPQDdPweGF +# RInECUzF1KVDL3SV9274eCBYLBNdYJWaPk8zhNqwiBfenk70lrC8RqBsmNLg1oiM +# CwIDAQABo4IB7TCCAekwEAYJKwYBBAGCNxUBBAMCAQAwHQYDVR0OBBYEFEhuZOVQ +# BdOCqhc3NyK1bajKdQKVMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIAQwBBMAsGA1Ud +# DwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFHItOgIxkEO5FAVO +# 4eqnxzHRI4k0MFoGA1UdHwRTMFEwT6BNoEuGSWh0dHA6Ly9jcmwubWljcm9zb2Z0 +# LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0NlckF1dDIwMTFfMjAxMV8wM18y +# Mi5jcmwwXgYIKwYBBQUHAQEEUjBQME4GCCsGAQUFBzAChkJodHRwOi8vd3d3Lm1p +# Y3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY1Jvb0NlckF1dDIwMTFfMjAxMV8wM18y +# Mi5jcnQwgZ8GA1UdIASBlzCBlDCBkQYJKwYBBAGCNy4DMIGDMD8GCCsGAQUFBwIB +# FjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2RvY3MvcHJpbWFyeWNw +# cy5odG0wQAYIKwYBBQUHAgIwNB4yIB0ATABlAGcAYQBsAF8AcABvAGwAaQBjAHkA +# XwBzAHQAYQB0AGUAbQBlAG4AdAAuIB0wDQYJKoZIhvcNAQELBQADggIBAGfyhqWY +# 4FR5Gi7T2HRnIpsLlhHhY5KZQpZ90nkMkMFlXy4sPvjDctFtg/6+P+gKyju/R6mj +# 82nbY78iNaWXXWWEkH2LRlBV2AySfNIaSxzzPEKLUtCw/WvjPgcuKZvmPRul1LUd +# d5Q54ulkyUQ9eHoj8xN9ppB0g430yyYCRirCihC7pKkFDJvtaPpoLpWgKj8qa1hJ +# Yx8JaW5amJbkg/TAj/NGK978O9C9Ne9uJa7lryft0N3zDq+ZKJeYTQ49C/IIidYf +# wzIY4vDFLc5bnrRJOQrGCsLGra7lstnbFYhRRVg4MnEnGn+x9Cf43iw6IGmYslmJ +# aG5vp7d0w0AFBqYBKig+gj8TTWYLwLNN9eGPfxxvFX1Fp3blQCplo8NdUmKGwx1j +# NpeG39rz+PIWoZon4c2ll9DuXWNB41sHnIc+BncG0QaxdR8UvmFhtfDcxhsEvt9B +# xw4o7t5lL+yX9qFcltgA1qFGvVnzl6UJS0gQmYAf0AApxbGbpT9Fdx41xtKiop96 +# eiL6SJUfq/tHI4D1nvi/a7dLl+LrdXga7Oo3mXkYS//WsyNodeav+vyL6wuA6mk7 +# r/ww7QRMjt/fdW1jkT3RnVZOT7+AVyKheBEyIXrvQQqxP/uozKRdwaGIm1dxVk5I +# RcBCyZt2WwqASGv9eZ/BvW1taslScxMNelDNMYIVWzCCFVcCAQEwgZUwfjELMAkG +# A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx +# HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEoMCYGA1UEAxMfTWljcm9z +# b2Z0IENvZGUgU2lnbmluZyBQQ0EgMjAxMQITMwAAAYdyF3IVWUDHCQAAAAABhzAN +# BglghkgBZQMEAgEFAKCBrjAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIBBDAcBgor +# BgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvBgkqhkiG9w0BCQQxIgQgOQvu7NUq +# wmve+qCoalj/s9HX5Hz9/zYISdJyOFTC4FIwQgYKKwYBBAGCNwIBDDE0MDKgFIAS +# AE0AaQBjAHIAbwBzAG8AZgB0oRqAGGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbTAN +# BgkqhkiG9w0BAQEFAASCAQAHbtGz0AChe0qMPM3c7iU8BQCfJklePUlAlhwFSuCx +# careoloxao+ZtS+dQRlrxLu/ZSqtmJHNsyRoWzsHdOs65pwUYhV3svzaXd7pJwkc +# nbDXedLBbNuQrQrrL2xbGtzT3U+EwgpJ1TTEYwHgqkTFogIelGa2sjD5N+4Vvalq +# t+vxaYrWwkTtsm0qczLKGRUjJqCjARjviE1xsOvs4zwbpXx/bEs/6M7U9tR+w/DS +# nDY/5KAKYET0DCVDhmsMmzJi3xXdBr4sAz0484AAB0CIRVgPCgdgr8E0NQUESJzm +# xm3K4bMAgTMWRiGTL4MRYSuMIn09sbfYXP9hjXLvTV4YoYIS5TCCEuEGCisGAQQB +# gjcDAwExghLRMIISzQYJKoZIhvcNAQcCoIISvjCCEroCAQMxDzANBglghkgBZQME +# AgEFADCCAVEGCyqGSIb3DQEJEAEEoIIBQASCATwwggE4AgEBBgorBgEEAYRZCgMB +# MDEwDQYJYIZIAWUDBAIBBQAEIJBynrmlQmGS0UNGTk53HVKEc4aHvNdYrs5eCcHM +# puc5AgZfEgElnvMYEzIwMjAwNzI0MTgwNDM3Ljg3NlowBIACAfSggdCkgc0wgcox +# CzAJBgNVBAYTAlVTMQswCQYDVQQIEwJXQTEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG +# A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNyb3NvZnQg +# SXJlbGFuZCBPcGVyYXRpb25zIExpbWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1Mg +# RVNOOkUwNDEtNEJFRS1GQTdFMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFt +# cCBzZXJ2aWNloIIOPDCCBPEwggPZoAMCAQICEzMAAAEHfjdomIdaN9YAAAAAAQcw +# DQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0 +# b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3Jh +# dGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcN +# MTkxMDA4MTczODM1WhcNMjEwMTAzMTczODM1WjCByjELMAkGA1UEBhMCVVMxCzAJ +# BgNVBAgTAldBMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQg +# Q29ycG9yYXRpb24xLTArBgNVBAsTJE1pY3Jvc29mdCBJcmVsYW5kIE9wZXJhdGlv +# bnMgTGltaXRlZDEmMCQGA1UECxMdVGhhbGVzIFRTUyBFU046RTA0MS00QkVFLUZB +# N0UxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIHNlcnZpY2UwggEiMA0G +# CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUuqOUlbaeWirgwbCwhhNIOqTshpo+ +# QdSYxAt9JnkeulQFeKrQ6rOSECXxwgOjL/TNMIXtkig1MaifFON6si/Ri+AsV8Gu +# rQp4fylJzLDMFdJcGSpV3CGRdpDb0au8kNQLmnZuxLxAL91R7//3mH2QDQI20w3G +# 06s+Xv8+js9wQksXAfclXX1TJoBIx1Pi1FGqCnY3KlW81+Plhz0T4yStm1MgnqH4 +# RKYyPdcempCYC/BI04Ph2EJL+uQQfAfYdbf9vGqpKYjsuktnWr5uowD3H5At+x3l +# YH5rz4JCleKjeLpB/j74H7VZ0I5eTEbls9e2lEKaUzb9o0wjnjDc+t4BAgMBAAGj +# ggEbMIIBFzAdBgNVHQ4EFgQUNOHjlxlIJXMcP9n/0ogYdX8p6HcwHwYDVR0jBBgw +# FoAU1WM6XIoxkPNDe3xGG8UzaFqFbVUwVgYDVR0fBE8wTTBLoEmgR4ZFaHR0cDov +# L2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwvcHJvZHVjdHMvTWljVGltU3RhUENB +# XzIwMTAtMDctMDEuY3JsMFoGCCsGAQUFBwEBBE4wTDBKBggrBgEFBQcwAoY+aHR0 +# cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNUaW1TdGFQQ0FfMjAx +# MC0wNy0wMS5jcnQwDAYDVR0TAQH/BAIwADATBgNVHSUEDDAKBggrBgEFBQcDCDAN +# BgkqhkiG9w0BAQsFAAOCAQEAGN3/7XWSzHGKjk444w+2q1D3k7Bh/ZahUvWHFJ6E +# UKU5vLzEGsdsgJSvWXHZDRrpf5rcUGQyjnlo1hAY1mDteNKFushS6bedxcxPHJje +# lVZ9N2/e5+/7zLu18YjnKw5bFu7dWqYBMI3J0FOr56XJOJ1KTtMiJhpxuib+FWy+ +# pyhVVgHGTUHuUdbE09dY9WxuRsbpb4DdWAWNrPDB6VAOO50QfEj+0tW+zF6h3RhB +# TI0ilj0+AzgXE+6DyJ7/br6aVvCEvNRJzE6akJnMyn/kzmC32LxvRZWKEwWDR0Fn +# zeXj5ynSStZ6iifTBP7gqiDsidguxh+BFX7HxhN1eHf7jTCCBnEwggRZoAMCAQIC +# CmEJgSoAAAAAAAIwDQYJKoZIhvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRp +# ZmljYXRlIEF1dGhvcml0eSAyMDEwMB4XDTEwMDcwMTIxMzY1NVoXDTI1MDcwMTIx +# NDY1NVowfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNV +# BAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQG +# A1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwggEiMA0GCSqGSIb3 +# DQEBAQUAA4IBDwAwggEKAoIBAQCpHQ28dxGKOiDs/BOX9fp/aZRrdFQQ1aUKAIKF +# ++18aEssX8XD5WHCdrc+Zitb8BVTJwQxH0EbGpUdzgkTjnxhMFmxMEQP8WCIhFRD +# DNdNuDgIs0Ldk6zWczBXJoKjRQ3Q6vVHgc2/JGAyWGBG8lhHhjKEHnRhZ5FfgVSx +# z5NMksHEpl3RYRNuKMYa+YaAu99h/EbBJx0kZxJyGiGKr0tkiVBisV39dx898Fd1 +# rL2KQk1AUdEPnAY+Z3/1ZsADlkR+79BL/W7lmsqxqPJ6Kgox8NpOBpG2iAg16Hgc +# sOmZzTznL0S6p/TcZL2kAcEgCZN4zfy8wMlEXV4WnAEFTyJNAgMBAAGjggHmMIIB +# 4jAQBgkrBgEEAYI3FQEEAwIBADAdBgNVHQ4EFgQU1WM6XIoxkPNDe3xGG8UzaFqF +# bVUwGQYJKwYBBAGCNxQCBAweCgBTAHUAYgBDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +# EwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU1fZWy4/oolxiaNE9lJBb186aGMQwVgYD +# VR0fBE8wTTBLoEmgR4ZFaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwv +# cHJvZHVjdHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYtMjMuY3JsMFoGCCsGAQUFBwEB +# BE4wTDBKBggrBgEFBQcwAoY+aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9j +# ZXJ0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcnQwgaAGA1UdIAEB/wSBlTCB +# kjCBjwYJKwYBBAGCNy4DMIGBMD0GCCsGAQUFBwIBFjFodHRwOi8vd3d3Lm1pY3Jv +# c29mdC5jb20vUEtJL2RvY3MvQ1BTL2RlZmF1bHQuaHRtMEAGCCsGAQUFBwICMDQe +# MiAdAEwAZQBnAGEAbABfAFAAbwBsAGkAYwB5AF8AUwB0AGEAdABlAG0AZQBuAHQA +# LiAdMA0GCSqGSIb3DQEBCwUAA4ICAQAH5ohRDeLG4Jg/gXEDPZ2joSFvs+umzPUx +# vs8F4qn++ldtGTCzwsVmyWrf9efweL3HqJ4l4/m87WtUVwgrUYJEEvu5U4zM9GAS +# inbMQEBBm9xcF/9c+V4XNZgkVkt070IQyK+/f8Z/8jd9Wj8c8pl5SpFSAK84Dxf1 +# L3mBZdmptWvkx872ynoAb0swRCQiPM/tA6WWj1kpvLb9BOFwnzJKJ/1Vry/+tuWO +# M7tiX5rbV0Dp8c6ZZpCM/2pif93FSguRJuI57BlKcWOdeyFtw5yjojz6f32WapB4 +# pm3S4Zz5Hfw42JT0xqUKloakvZ4argRCg7i1gJsiOCC1JeVk7Pf0v35jWSUPei45 +# V3aicaoGig+JFrphpxHLmtgOR5qAxdDNp9DvfYPw4TtxCd9ddJgiCGHasFAeb73x +# 4QDf5zEHpJM692VHeOj4qEir995yfmFrb3epgcunCaw5u+zGy9iCtHLNHfS4hQEe +# gPsbiSpUObJb2sgNVZl6h3M7COaYLeqN4DMuEin1wC9UJyH3yKxO2ii4sanblrKn +# QqLJzxlBTeCG+SqaoxFmMNO7dDJL32N79ZmKLxvHIa9Zta7cRDyXUHHXodLFVeNp +# 3lfB0d4wwP3M5k37Db9dT+mdHhk4L7zPWAUu7w2gUDXa7wknHNWzfjUeCLraNtvT +# X4/edIhJEqGCAs4wggI3AgEBMIH4oYHQpIHNMIHKMQswCQYDVQQGEwJVUzELMAkG +# A1UECBMCV0ExEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD +# b3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxhbmQgT3BlcmF0aW9u +# cyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjpFMDQxLTRCRUUtRkE3 +# RTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgc2VydmljZaIjCgEBMAcG +# BSsOAwIaAxUAwwu+tfgG3rC7RZrxuFO2CmZSfPiggYMwgYCkfjB8MQswCQYDVQQG +# EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG +# A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQg +# VGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIFAOLFEVUwIhgPMjAy +# MDA3MjQxNTUwNDVaGA8yMDIwMDcyNTE1NTA0NVowdzA9BgorBgEEAYRZCgQBMS8w +# LTAKAgUA4sURVQIBADAKAgEAAgIa9QIB/zAHAgEAAgIR9DAKAgUA4sZi1QIBADA2 +# BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIBAAIDB6EgoQowCAIB +# AAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBADwvhE9bln801RR+oEXjtPJXTqtYMakR +# ymItUlO2HRorDqEv2SJR/V/kQjcsqS6ig54bOiKs0Il2fW/s/pi+x1ydJMpOyhM7 +# zzqm3acQ9kbYHIDoPWVT/Rq2Oo33Dq380zXENcc0hpLAKF3Cu06SbbNbqu+A/wbI +# z5IClz6kU8kiMYIDDTCCAwkCAQEwgZMwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgT +# Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m +# dCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENB +# IDIwMTACEzMAAAEHfjdomIdaN9YAAAAAAQcwDQYJYIZIAWUDBAIBBQCgggFKMBoG +# CSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0BCQQxIgQg6+NCew+c +# OhYIOzhUKofOF7MxtgOvSMWQCMCIWlTFNMgwgfoGCyqGSIb3DQEJEAIvMYHqMIHn +# MIHkMIG9BCBBYvCj4pFkwhumagATn0gLh9fdDNzImQkKNeOtRj/LHjCBmDCBgKR+ +# MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS +# ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT +# HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAABB343aJiHWjfWAAAA +# AAEHMCIEIGIH6vLdbEFNnxTxBhtIN7CtmhcKy/9m6/xoAA3LHzXUMA0GCSqGSIb3 +# DQEBCwUABIIBAKGg3zNulscnGBDlD6Q/U6yLQ5dN3gF9UrprgACiQ1gs/DexU7oC +# hjNZxBnH5RTA/7q9TFf2a1rBydHWVnqXuuQQJ0HuskdpXahxR4y1jboDdGwr7F08 +# v/gmPeeUik28Je72QZp5m/R0O61/kMQaDpLO9iPH0Z9iMGfqJonFPDeY4VX8Da2n +# cPY7mrv6YAI+ydZ+mUdBp2yjas7+/N8MntcNtAO0HpWFXQTAmb77RrSssfeZphRA +# mBD+gLx5C3q4uSmuOqaQxUaF0y8FeuetHp0bw2sfce6GlMXJwzTpC6HvXnaVtMy0 +# pgzd/KPHW7EgSvmRVKmvwiQGiZBoRG/Gcg8= +# SIG # End signature block diff --git a/scripts/azure-pipelines/windows/deploy-visual-studio.ps1 b/scripts/azure-pipelines/windows/deploy-visual-studio.ps1 new file mode 100644 index 00000000000000..0ec5ff7110688c --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-visual-studio.ps1 @@ -0,0 +1,87 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1 + +# REPLACE WITH UTILITY-PREFIX.ps1 + +$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/16/release/vs_enterprise.exe' +$Workloads = @( + 'Microsoft.VisualStudio.Workload.NativeDesktop', + 'Microsoft.VisualStudio.Workload.Universal', + 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', + 'Microsoft.VisualStudio.Component.VC.Tools.ARM', + 'Microsoft.VisualStudio.Component.VC.Tools.ARM64', + 'Microsoft.VisualStudio.Component.VC.ATL', + 'Microsoft.VisualStudio.Component.VC.ATLMFC', + 'Microsoft.VisualStudio.Component.VC.v141.x86.x64.Spectre', + 'Microsoft.VisualStudio.Component.Windows10SDK.18362', + 'Microsoft.VisualStudio.Component.Windows10SDK.19041', + 'Microsoft.Net.Component.4.8.SDK', + 'Microsoft.Net.Component.4.7.2.TargetingPack', + 'Microsoft.Component.NetFX.Native', + 'Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset', + 'Microsoft.VisualStudio.Component.VC.Llvm.Clang', + 'Microsoft.VisualStudio.Component.VC.v141.x86.x64', + 'Microsoft.VisualStudio.Component.VC.140' +) + +<# +.SYNOPSIS +Install Visual Studio. + +.DESCRIPTION +InstallVisualStudio takes the $Workloads array, and installs it with the +installer that's pointed at by $BootstrapperUrl. + +.PARAMETER Workloads +The set of VS workloads to install. + +.PARAMETER BootstrapperUrl +The URL of the Visual Studio installer, i.e. one of vs_*.exe. + +.PARAMETER InstallPath +The path to install Visual Studio at. + +.PARAMETER Nickname +The nickname to give the installation. +#> +Function InstallVisualStudio { + Param( + [String[]]$Workloads, + [String]$BootstrapperUrl, + [String]$InstallPath = $null, + [String]$Nickname = $null + ) + + try { + Write-Host 'Downloading Visual Studio...' + [string]$bootstrapperExe = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $bootstrapperExe -s -S $BootstrapperUrl + Write-Host 'Installing Visual Studio...' + $vsArgs = @('/c', $bootstrapperExe, '--quiet', '--norestart', '--wait', '--nocache') + foreach ($workload in $Workloads) { + $vsArgs += '--add' + $vsArgs += $workload + } + + if (-not ([String]::IsNullOrWhiteSpace($InstallPath))) { + $vsArgs += '--installpath' + $vsArgs += $InstallPath + } + + if (-not ([String]::IsNullOrWhiteSpace($Nickname))) { + $vsArgs += '--nickname' + $vsArgs += $Nickname + } + + $proc = Start-Process -FilePath cmd.exe -ArgumentList $vsArgs -Wait -PassThru + PrintMsiExitCodeMessage $proc.ExitCode + } + catch { + Write-Error "Failed to install Visual Studio! $($_.Exception.Message)" + throw + } +} + +InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl -Nickname 'Stable' diff --git a/scripts/azure-pipelines/windows/deploy-windows-sdks.ps1 b/scripts/azure-pipelines/windows/deploy-windows-sdks.ps1 new file mode 100644 index 00000000000000..9c6ca0a5d110b2 --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-windows-sdks.ps1 @@ -0,0 +1,49 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1 + +# REPLACE WITH UTILITY-PREFIX.ps1 + +<# +.SYNOPSIS +Installs Windows PSDK/WDK + +.DESCRIPTION +Downloads the Windows PSDK/DDK installer located at $Url, and installs it with the +correct flags. + +.PARAMETER Url +The URL of the installer. +#> +Function InstallWindowsDK { + Param( + [String]$Url + ) + + try { + Write-Host "Downloading Windows PSDK or DDK $Url..." + [string]$installerPath = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $installerPath -s -S $Url + Write-Host 'Installing...' + $proc = Start-Process -FilePath $installerPath -ArgumentList @('/features', '+', '/q') -Wait -PassThru + $exitCode = $proc.ExitCode + if ($exitCode -eq 0) { + Write-Host 'Installation successful!' + } + else { + Write-Error "Installation failed! Exited with $exitCode." + throw + } + } + catch { + Write-Error "Failed to install Windows PSDK or DDK! $($_.Exception.Message)" + throw + } +} + +# Windows 10 SDK, version 2004 (10.0.19041.0) +InstallWindowsDK 'https://go.microsoft.com/fwlink/?linkid=2120843' + +# Windows 10 WDK, version 2004 +InstallWindowsDK 'https://go.microsoft.com/fwlink/?linkid=2128854' diff --git a/scripts/azure-pipelines/windows/disk-space.ps1 b/scripts/azure-pipelines/windows/disk-space.ps1 new file mode 100644 index 00000000000000..8680d770158c35 --- /dev/null +++ b/scripts/azure-pipelines/windows/disk-space.ps1 @@ -0,0 +1,35 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Prints total and free disk space for each disk on the system +#> + +Function Format-Size { + [CmdletBinding()] + Param([long]$Size) + + if ($Size -lt 1024) { + $Size = [int]$Size + return "$Size B" + } + + $Size = $Size / 1024 + if ($Size -lt 1024) { + $Size = [int]$Size + return "$Size KiB" + } + + $Size = $Size / 1024 + if ($Size -lt 1024) { + $Size = [int]$Size + return "$Size MiB" + } + + $Size = [int]($Size / 1024) + return "$Size GiB" +} + +Get-CimInstance -ClassName Win32_LogicalDisk | Format-Table -Property @{Label="Disk"; Expression={ $_.DeviceID }},@{Label="Label"; Expression={ $_.VolumeName }},@{Label="Size"; Expression={ Format-Size($_.Size) }},@{Label="Free Space"; Expression={ Format-Size($_.FreeSpace) }} diff --git a/scripts/azure-pipelines/windows/drop-to-admin-user-prefix.ps1 b/scripts/azure-pipelines/windows/drop-to-admin-user-prefix.ps1 new file mode 100644 index 00000000000000..b4592eabd4eee4 --- /dev/null +++ b/scripts/azure-pipelines/windows/drop-to-admin-user-prefix.ps1 @@ -0,0 +1,27 @@ +param( + [string]$AdminUserPassword = $null +) + +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' +if (-Not [string]::IsNullOrEmpty($AdminUserPassword)) { + $PsExecPath = 'C:\PsExec64.exe' + $PsExecArgs = @( + '-u', + 'AdminUser', + '-p', + $AdminUserPassword, + '-accepteula', + '-i', + '-h', + 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe', + '-ExecutionPolicy', + 'Unrestricted', + '-File', + $PSCommandPath + ) + + Write-Host "Executing: $PsExecPath $PsExecArgs" + $proc = Start-Process -FilePath $PsExecPath -ArgumentList $PsExecArgs -Wait -PassThru + exit $proc.ExitCode +} diff --git a/scripts/azure-pipelines/windows/provision-entire-image.ps1 b/scripts/azure-pipelines/windows/provision-entire-image.ps1 new file mode 100644 index 00000000000000..00c2d28cac0068 --- /dev/null +++ b/scripts/azure-pipelines/windows/provision-entire-image.ps1 @@ -0,0 +1,18 @@ +# This script runs all the scripts we run on Azure machines to deploy prerequisites, +# and assumes it is being run as an admin user. + +. "$PSScriptRoot\utility-prefix.ps1" + +. "$PSScriptRoot\deploy-tlssettings.ps1" -RebootIfRequired 0 +. "$PSScriptRoot\deploy-windows-sdks.ps1" +. "$PSScriptRoot\deploy-visual-studio.ps1" +. "$PSScriptRoot\deploy-mpi.ps1" +. "$PSScriptRoot\deploy-cuda.ps1" +. "$PSScriptRoot\deploy-inteloneapi.ps1" +. "$PSScriptRoot\deploy-pwsh.ps1" +try { + Copy-Item "$PSScriptRoot\deploy-settings.txt" "$PSScriptRoot\deploy-settings.ps1" + . "$PSScriptRoot\deploy-settings.ps1" +} finally { + Remove-Item "$PSScriptRoot\deploy-settings.ps1" +} diff --git a/scripts/azure-pipelines/windows/sysprep.ps1 b/scripts/azure-pipelines/windows/sysprep.ps1 new file mode 100644 index 00000000000000..a29950044ff6ca --- /dev/null +++ b/scripts/azure-pipelines/windows/sysprep.ps1 @@ -0,0 +1,17 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Prepares the virtual machine for imaging. + +.DESCRIPTION +Runs the `sysprep` utility to prepare the system for imaging. +See https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--system-preparation--overview +for more information. +#> + +$ErrorActionPreference = 'Stop' +Write-Host 'Running sysprep' +& C:\Windows\system32\sysprep\sysprep.exe /oobe /generalize /mode:vm /shutdown diff --git a/scripts/azure-pipelines/windows/utility-prefix.ps1 b/scripts/azure-pipelines/windows/utility-prefix.ps1 new file mode 100644 index 00000000000000..8cd0066db60097 --- /dev/null +++ b/scripts/azure-pipelines/windows/utility-prefix.ps1 @@ -0,0 +1,125 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +<# +.SYNOPSIS +Gets a random file path in the temp directory. + +.DESCRIPTION +Get-TempFilePath takes an extension, and returns a path with a random +filename component in the temporary directory with that extension. + +.PARAMETER Extension +The extension to use for the path. +#> +Function Get-TempFilePath { + Param( + [String]$Extension + ) + + if ([String]::IsNullOrWhiteSpace($Extension)) { + throw 'Missing Extension' + } + + $tempPath = [System.IO.Path]::GetTempPath() + $tempName = [System.IO.Path]::GetRandomFileName() + '.' + $Extension + return Join-Path $tempPath $tempName +} + +<# +.SYNOPSIS +Writes a message to the screen depending on ExitCode. + +.DESCRIPTION +Since msiexec can return either 0 or 3010 successfully, in both cases +we write that installation succeeded, and which exit code it exited with. +If msiexec returns anything else, we write an error. + +.PARAMETER ExitCode +The exit code that msiexec returned. +#> +Function PrintMsiExitCodeMessage { + Param( + $ExitCode + ) + + # 3010 is probably ERROR_SUCCESS_REBOOT_REQUIRED + if ($ExitCode -eq 0 -or $ExitCode -eq 3010) { + Write-Host "Installation successful! Exited with $ExitCode." + } + else { + Write-Error "Installation failed! Exited with $ExitCode." + throw + } +} + +<# +.SYNOPSIS +Install a .msi file. + +.DESCRIPTION +InstallMSI takes a url where an .msi lives, and installs that .msi to the system. + +.PARAMETER Name +The name of the thing to install. + +.PARAMETER Url +The URL at which the .msi lives. +#> +Function InstallMSI { + Param( + [String]$Name, + [String]$Url + ) + + try { + Write-Host "Downloading $Name..." + [string]$msiPath = Get-TempFilePath -Extension 'msi' + curl.exe -L -o $msiPath -s -S $Url + Write-Host "Installing $Name..." + $args = @('/i', $msiPath, '/norestart', '/quiet', '/qn') + $proc = Start-Process -FilePath 'msiexec.exe' -ArgumentList $args -Wait -PassThru + PrintMsiExitCodeMessage $proc.ExitCode + } + catch { + Write-Error "Failed to install $Name! $($_.Exception.Message)" + throw + } +} + +<# +.SYNOPSIS +Unpacks a zip file to $Dir. + +.DESCRIPTION +InstallZip takes a URL of a zip file, and unpacks the zip file to the directory +$Dir. + +.PARAMETER Name +The name of the tool being installed. + +.PARAMETER Url +The URL of the zip file to unpack. + +.PARAMETER Dir +The directory to unpack the zip file to. +#> +Function InstallZip { + Param( + [String]$Name, + [String]$Url, + [String]$Dir + ) + + try { + Write-Host "Downloading $Name..." + [string]$zipPath = Get-TempFilePath -Extension 'zip' + curl.exe -L -o $zipPath -s -S $Url + Write-Host "Installing $Name..." + Expand-Archive -Path $zipPath -DestinationPath $Dir -Force + } + catch { + Write-Error "Failed to install $Name! $($_.Exception.Message)" + throw + } +} diff --git a/scripts/boost/.gitignore b/scripts/boost/.gitignore new file mode 100644 index 00000000000000..f8e31288e6aa09 --- /dev/null +++ b/scripts/boost/.gitignore @@ -0,0 +1,3 @@ +/boost +/downloads +/libs \ No newline at end of file diff --git a/scripts/boost/generate-ports.ps1 b/scripts/boost/generate-ports.ps1 new file mode 100644 index 00000000000000..1079514720b16b --- /dev/null +++ b/scripts/boost/generate-ports.ps1 @@ -0,0 +1,478 @@ +[CmdletBinding()] +param ( + $libraries = @(), + $version = "1.76.0", + $portsDir = $null +) + +$ErrorActionPreference = 'Stop' + +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +if ($null -eq $portsDir) +{ + $portsDir = "$scriptsDir/../../ports" +} + +if ($IsWindows) +{ + $vcpkg = "$scriptsDir/../../vcpkg.exe" + $curl = "curl.exe" +} +else +{ + $vcpkg = "$scriptsDir/../../vcpkg" + $curl = "curl" +} + +# Clear this array when moving to a new boost version +$port_versions = @{ + #e.g. "asio" = 1; + "python" = 1; +} + +$per_port_data = @{ + "asio" = @{ "supports" = "!emscripten" }; + "beast" = @{ "supports" = "!emscripten" }; + "fiber" = @{ "supports" = "!osx&!uwp&!arm&!emscripten" }; + "filesystem" = @{ "supports" = "!uwp" }; + "iostreams" = @{ "supports" = "!uwp" }; + "context" = @{ "supports" = "!uwp&!emscripten" }; + "stacktrace" = @{ "supports" = "!uwp" }; + "coroutine" = @{ "supports" = "!arm&!uwp&!emscripten" }; + "coroutine2" = @{ "supports" = "!emscripten" }; + "test" = @{ "supports" = "!uwp" }; + "wave" = @{ "supports" = "!uwp" }; + "log" = @{ "supports" = "!uwp&!emscripten" }; + "locale" = @{ + "supports" = "!uwp"; + "features" = @{ + icu=@{ + dependencies=@("icu") + description="ICU backend for Boost.Locale" + } + } + }; + "parameter-python" = @{ "supports" = "!emscripten" }; + "process" = @{ "supports" = "!emscripten" }; + "python" = @{ + "supports" = "!uwp&!(arm&windows)&!emscripten"; + "features" = @{ + python2=@{ + dependencies=@("python2") + description="Build with Python2 support" + } + } + }; + "regex" = @{ + "features" = @{ + icu=@{ + dependencies=@("icu") + description="ICU backend for Boost.Regex" + } + } + } +} + +function TransformReference() +{ + param ( + [string]$library + ) + + if ($per_port_data.Contains($library) -and $per_port_data[$library].Contains('supports')) + { + @{name="boost-$library"; platform=$per_port_data[$library]['supports']} + } + else + { + "boost-$library" + } +} + +function Generate() +{ + param ( + [string]$Name, + [string]$PortName, + [string]$Hash, + [bool]$NeedsBuild, + $Depends = @() + ) + + New-Item -ItemType "Directory" "$portsDir/boost-$PortName" -erroraction SilentlyContinue | out-null + $controlLines = @{ + name="boost-$PortName"; ` + "version"=$version; ` + dependencies=$Depends; ` + homepage="https://github.com/boostorg/$Name"; ` + description="Boost $Name module" ` + } + if ($port_versions.Contains($PortName)) + { + $controlLines["port-version"] = $port_versions[$PortName] + } + + if ($per_port_data.Contains($PortName)) + { + $controlLines += $per_port_data[$PortName] + } + $controlLines | ConvertTo-Json -Depth 10 -Compress | out-file -enc ascii "$portsDir/boost-$PortName/vcpkg.json" + & $vcpkg format-manifest "$portsDir/boost-$PortName/vcpkg.json" + + $portfileLines = @( + "# Automatically generated by scripts/boost/generate-ports.ps1" + "" + ) + + if ($PortName -eq "system") + { + $portfileLines += @( + "vcpkg_buildpath_length_warning(37)" + "" + ) + } + + $portfileLines += @( + "vcpkg_from_github(" + " OUT_SOURCE_PATH SOURCE_PATH" + " REPO boostorg/$Name" + " REF boost-$version" + " SHA512 $Hash" + " HEAD_REF master" + ) + [Array]$patches = Get-Item -Path "$portsDir/boost-$PortName/*.patch" + if ($null -eq $patches -or $patches.Count -eq 0) + { + } + elseif ($patches.Count -eq 1) + { + $portfileLines += @(" PATCHES $($patches.name)") + } + else + { + $portfileLines += @(" PATCHES") + foreach ($patch in $patches) + { + $portfileLines += @(" $($patch.name)") + } + } + $portfileLines += @( + ")" + "" + ) + + if (Test-Path "$scriptsDir/post-source-stubs/$PortName.cmake") + { + $portfileLines += @(get-content "$scriptsDir/post-source-stubs/$PortName.cmake") + } + + if ($NeedsBuild) + { + $portfileLines += @( + "if(NOT DEFINED CURRENT_HOST_INSTALLED_DIR)" + " message(FATAL_ERROR `"boost-$PortName requires a newer version of vcpkg in order to build.`")" + "endif()" + "include(`${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" + ) + # b2-options.cmake contains port-specific build options + if (Test-Path "$portsDir/boost-$PortName/b2-options.cmake") + { + $portfileLines += @( + "boost_modular_build(" + " SOURCE_PATH `${SOURCE_PATH}" + " BOOST_CMAKE_FRAGMENT `"`${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake`"" + ")" + ) + } + elseif (Test-Path "$portsDir/boost-$PortName/b2-options.cmake.in") + { + $portfileLines += @( + 'configure_file(' + ' "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake.in"' + ' "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake"' + ' @ONLY' + ')' + 'boost_modular_build(' + ' SOURCE_PATH ${SOURCE_PATH}' + ' BOOST_CMAKE_FRAGMENT "${CURRENT_BUILDTREES_DIR}/vcpkg-b2-options.cmake"' + ')' + ) + } + else + { + $portfileLines += @( + "boost_modular_build(SOURCE_PATH `${SOURCE_PATH})" + ) + } + } + + $portfileLines += @( + "include(`${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)" + "boost_modular_headers(SOURCE_PATH `${SOURCE_PATH})" + ) + + if (Test-Path "$scriptsDir/post-build-stubs/$PortName.cmake") + { + $portfileLines += @(get-content "$scriptsDir/post-build-stubs/$PortName.cmake") + } + + $portfileLines += @("") + Set-Content -LiteralPath "$portsDir/boost-$PortName/portfile.cmake" ` + -Value "$($portfileLines -join "`r`n")" ` + -Encoding UTF8 ` + -NoNewline +} + +if (!(Test-Path "$scriptsDir/boost")) +{ + "Cloning boost..." + pushd $scriptsDir + try + { + git clone https://github.com/boostorg/boost --branch boost-$version + } + finally + { + popd + } +} +else +{ + pushd $scriptsDir/boost + try + { + git fetch + git checkout -f boost-$version + } + finally + { + popd + } +} + +$libraries_found = Get-ChildItem $scriptsDir/boost/libs -directory | % name | % { + if ($_ -match "numeric") + { + "numeric_conversion" + "interval" + "odeint" + "ublas" + "safe_numerics" + } + elseif ($_ -eq "headers") + { + } + else + { + $_ + } +} + +New-Item -ItemType "Directory" $scriptsDir/downloads -erroraction SilentlyContinue | out-null + +if ($libraries.Length -eq 0) +{ + $libraries = $libraries_found +} + +$libraries_in_boost_port = @() + +foreach ($library in $libraries) +{ + "Handling boost/$library..." + $archive = "$scriptsDir/downloads/$library-boost-$version.tar.gz" + if (!(Test-Path $archive)) + { + "Downloading boost/$library..." + & $curl -L "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" --output "$scriptsDir/downloads/$library-boost-$version.tar.gz" + } + $hash = & $vcpkg --x-wait-for-lock hash $archive + # remove prefix "Waiting to take filesystem lock on /.vcpkg-root... " + if($hash -is [Object[]]) + { + $hash = $hash[1] + } + + $unpacked = "$scriptsDir/libs/$library-boost-$version" + if (!(Test-Path $unpacked)) + { + "Unpacking boost/$library..." + New-Item -ItemType "Directory" $scriptsDir/libs -erroraction SilentlyContinue | out-null + pushd $scriptsDir/libs + try + { + cmake -E tar xf $archive + } + finally + { + popd + } + } + pushd $unpacked + try + { + $groups = Get-ChildItem -Recurse -Path include,src -File ` + | ? { $_ -is [System.IO.FileInfo] } ` + | % { Get-Content -LiteralPath $_ } ` + | ? { $_ -match 'include [<"]boost/' } + + $groups = $groups | % { + $_ ` + -replace "boost/numeric/conversion/","boost/numeric_conversion/" ` + -replace "boost/functional/hash.hpp","boost/container_hash/hash.hpp" ` + -replace "boost/detail/([^/]+)/","boost/`$1/" ` + -replace " *# *include *[<`"]boost/([a-zA-Z0-9\._]*)[/>`"].*", "`$1" ` + -replace "/|\.hp?p?| ","" + } | group | % name | % { + # mappings + Write-Verbose "${library}: $_" + if ($_ -match "aligned_storage") { "type_traits" } + elseif ($_ -match "noncopyable|ref|swap|get_pointer|checked_delete|visit_each") { "core" } + elseif ($_ -eq "type") { "core" } + elseif ($_ -match "concept|concept_archetype") { "concept_check" } + elseif ($_ -match "unordered_") { "unordered" } + elseif ($_ -match "integer_fwd|integer_traits") { "integer" } + elseif ($_ -match "call_traits|operators|current_function|cstdlib|next_prior|compressed_pair") { "utility" } + elseif ($_ -match "^version|^workaround|^config|cstdint|cxx11_char_types|limits") { "config" } + elseif ($_ -match "enable_shared_from_this|shared_ptr|make_shared|make_unique|intrusive_ptr|scoped_ptr|pointer_cast|pointer_to_other|weak_ptr|shared_array|scoped_array") { "smart_ptr" } + elseif ($_ -match "iterator_adaptors|generator_iterator|pointee") { "iterator" } + elseif ($_ -eq "regex_fwd") { "regex" } + elseif ($_ -eq "make_default") { "convert" } + elseif ($_ -eq "foreach_fwd") { "foreach" } + elseif ($_ -eq "cerrno") { "system" } + elseif ($_ -eq "circular_buffer_fwd") { "circular_buffer" } + elseif ($_ -eq "archive") { "serialization" } + elseif ($_ -match "none|none_t") { "optional" } + elseif ($_ -match "cstdfloat|math_fwd") { "math" } + elseif ($_ -eq "cast") { "conversion"; "numeric_conversion" } # DEPRECATED header file, includes and + elseif ($_ -match "polymorphic_cast|implicit_cast") { "conversion" } + elseif ($_ -eq "nondet_random") { "random" } + elseif ($_ -eq "memory_order") { "atomic" } + elseif ($_ -match "blank|blank_fwd|numeric_traits|fenv") { "detail" } + elseif ($_ -match "is_placeholder|mem_fn") { "bind" } + elseif ($_ -eq "exception_ptr") { "exception" } + elseif ($_ -match "multi_index_container|multi_index_container_fwd") { "multi_index" } + elseif ($_ -eq "lexical_cast") { "lexical_cast"; "math" } + elseif ($_ -match "token_iterator|token_functions") { "tokenizer" } + elseif ($_ -eq "numeric" -and $library -notmatch "numeric_conversion|interval|odeint|ublas") { "numeric_conversion"; "interval"; "odeint"; "ublas" } + elseif ($_ -eq "io_fwd") { "io" } + else { $_ } + } | group | % name | ? { + $_ -ne $library + } + + #"`nFor ${library}:" + " [known] " + $($groups | ? { $libraries_found -contains $_ }) + " [unknown] " + $($groups | ? { $libraries_found -notcontains $_ }) + + $deps = @($groups | ? { $libraries_found -contains $_ }) + + $deps = @($deps | ? { + # Boost contains cycles, so remove a few dependencies to break the loop. + (($library -notmatch "core|assert|mpl|detail|throw_exception|type_traits|^exception") -or ($_ -notmatch "utility")) ` + -and ` + (($library -notmatch "assert") -or ($_ -notmatch "integer"))` + -and ` + (($library -notmatch "range") -or ($_ -notmatch "algorithm"))` + -and ` + (($library -ne "config") -or ($_ -notmatch "integer"))` + -and ` + (($library -notmatch "multiprecision") -or ($_ -notmatch "random|math"))` + -and ` + (($library -notmatch "lexical_cast") -or ($_ -notmatch "math"))` + -and ` + (($library -notmatch "functional") -or ($_ -notmatch "function"))` + -and ` + (($library -notmatch "detail") -or ($_ -notmatch "static_assert|integer|mpl|type_traits"))` + -and ` + ($_ -notmatch "mpi")` + -and ` + (($library -notmatch "spirit") -or ($_ -notmatch "serialization"))` + -and ` + (($library -notmatch "throw_exception") -or ($_ -notmatch "^exception"))` + -and ` + (($library -notmatch "iostreams|math") -or ($_ -notmatch "random"))` + -and ` + (($library -notmatch "utility|concept_check") -or ($_ -notmatch "iterator")) + } | % { $_ -replace "_","-" } | % { TransformReference $_ }) + + $deps += @("boost-vcpkg-helpers") + + $needsBuild = $false + if (((Test-Path $unpacked/build/Jamfile.v2) -or (Test-Path $unpacked/build/Jamfile)) -and $library -notmatch "(metaparse|graph_parallel|function_types)") + { + $deps += @( + @{ name="boost-build"; host=$True }, + @{ name="boost-modular-build-helper"; host=$True } + ) + $needsBuild = $true + } + + if ($library -eq "python") + { + $deps += @("python3") + $needsBuild = $true + } + elseif ($library -eq "iostreams") + { + $deps += @("zlib", "bzip2", "liblzma", "zstd") + } + elseif ($library -eq "locale") + { + $deps += @(@{ name="libiconv"; platform="!uwp&!windows&!mingw" }, "boost-system") + } + elseif ($library -eq "asio") + { + $deps += @("openssl") + } + elseif ($library -eq "mpi") + { + $deps += @("mpi") + } + + $portName = $library -replace "_","-" + + Generate ` + -Name $library ` + -PortName $portName ` + -Hash $hash ` + -Depends $deps ` + -NeedsBuild $needsBuild + + $libraries_in_boost_port += @(TransformReference $portName) + } + finally + { + popd + } +} + +if ($libraries_in_boost_port.length -gt 1) { + # Generate master boost control file which depends on each individual library + # mpi is excluded due to it having a dependency on msmpi/openmpi + $boostDependsList = $libraries_in_boost_port | ? { $_ -notmatch "boost-mpi" } + + @{ + name = "boost"; + "version" = $version; + "port-version" = $port_versions.Contains('boost') ? $port_versions['boost'] : 0; + homepage = "https://boost.org"; + description = "Peer-reviewed portable C++ source libraries"; + dependencies = $boostDependsList; + features = @( + @{ + name = "mpi"; + description = "Build with MPI support"; + dependencies = @("boost-mpi"); + } + ); + } ` + | ConvertTo-Json -Depth 10 -Compress ` + | Out-File -Encoding UTF8 -FilePath "$portsDir/boost/vcpkg.json" + & $vcpkg format-manifest "$portsDir/boost/vcpkg.json" + + Set-Content -LiteralPath "$portsDir/boost/portfile.cmake" ` + -Value "set(VCPKG_POLICY_EMPTY_PACKAGE enabled)`n" ` + -Encoding UTF8 ` + -NoNewline +} diff --git a/ports/boost-vcpkg-helpers/post-build-stubs/config.cmake b/scripts/boost/post-build-stubs/config.cmake similarity index 100% rename from ports/boost-vcpkg-helpers/post-build-stubs/config.cmake rename to scripts/boost/post-build-stubs/config.cmake diff --git a/ports/boost-vcpkg-helpers/post-build-stubs/context.cmake b/scripts/boost/post-build-stubs/context.cmake similarity index 100% rename from ports/boost-vcpkg-helpers/post-build-stubs/context.cmake rename to scripts/boost/post-build-stubs/context.cmake diff --git a/ports/boost-vcpkg-helpers/post-build-stubs/exception.cmake b/scripts/boost/post-build-stubs/exception.cmake similarity index 100% rename from ports/boost-vcpkg-helpers/post-build-stubs/exception.cmake rename to scripts/boost/post-build-stubs/exception.cmake diff --git a/ports/boost-vcpkg-helpers/post-build-stubs/predef.cmake b/scripts/boost/post-build-stubs/predef.cmake similarity index 100% rename from ports/boost-vcpkg-helpers/post-build-stubs/predef.cmake rename to scripts/boost/post-build-stubs/predef.cmake diff --git a/ports/boost-vcpkg-helpers/post-build-stubs/test.cmake b/scripts/boost/post-build-stubs/test.cmake similarity index 100% rename from ports/boost-vcpkg-helpers/post-build-stubs/test.cmake rename to scripts/boost/post-build-stubs/test.cmake diff --git a/scripts/boost/post-source-stubs/atomic.cmake b/scripts/boost/post-source-stubs/atomic.cmake new file mode 100644 index 00000000000000..0715d20f709a46 --- /dev/null +++ b/scripts/boost/post-source-stubs/atomic.cmake @@ -0,0 +1,8 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE + "project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ]" + "project.load [ path.join [ path.make $(here:D) ] config/checks/architecture ]" + _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/context.cmake b/scripts/boost/post-source-stubs/context.cmake similarity index 100% rename from ports/boost-vcpkg-helpers/post-source-stubs/context.cmake rename to scripts/boost/post-source-stubs/context.cmake diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/fiber.cmake b/scripts/boost/post-source-stubs/fiber.cmake similarity index 100% rename from ports/boost-vcpkg-helpers/post-source-stubs/fiber.cmake rename to scripts/boost/post-source-stubs/fiber.cmake diff --git a/scripts/boost/post-source-stubs/json.cmake b/scripts/boost/post-source-stubs/json.cmake new file mode 100644 index 00000000000000..bdc751886f89f7 --- /dev/null +++ b/scripts/boost/post-source-stubs/json.cmake @@ -0,0 +1,8 @@ +# see https://github.com/boostorg/json/issues/556 fore more details +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile" "import ../../config/checks/config" "import config/checks/config") +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile" "\n /boost//container/off" "") + +vcpkg_replace_string("${SOURCE_PATH}/Jamfile" "import ../config/checks/config" "import build/config/checks/config") +vcpkg_replace_string("${SOURCE_PATH}/Jamfile" "..//check_basic_alignas" "..//..//..//check_basic_alignas") + +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") diff --git a/scripts/boost/post-source-stubs/log.cmake b/scripts/boost/post-source-stubs/log.cmake new file mode 100644 index 00000000000000..be17a0419c3ed1 --- /dev/null +++ b/scripts/boost/post-source-stubs/log.cmake @@ -0,0 +1,13 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +string(REPLACE " @select-arch-specific-sources" "#@select-arch-specific-sources" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + +file(READ ${SOURCE_PATH}/build/log-arch-config.jam _contents) +string(REPLACE + "project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ]" + "project.load [ path.join [ path.make $(here:D) ] config/checks/architecture ]" + _contents "${_contents}") +file(WRITE ${SOURCE_PATH}/build/log-arch-config.jam "${_contents}") + diff --git a/scripts/boost/post-source-stubs/math.cmake b/scripts/boost/post-source-stubs/math.cmake new file mode 100644 index 00000000000000..fcbdd58149f1a2 --- /dev/null +++ b/scripts/boost/post-source-stubs/math.cmake @@ -0,0 +1,6 @@ +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile.v2" "import ../../config/checks/config" "import config/checks/config") +vcpkg_replace_string("${SOURCE_PATH}/build/Jamfile.v2" "check-target-builds ../config//has_gcc_visibility" "check-target-builds ../has_gcc_visibility.cpp") + +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") +file(COPY "${SOURCE_PATH}/config/has_gcc_visibility.cpp" DESTINATION "${SOURCE_PATH}/build/config") +file(COPY "${SOURCE_PATH}/config/has_gcc_visibility.cpp" DESTINATION "${SOURCE_PATH}/") diff --git a/scripts/boost/post-source-stubs/nowide.cmake b/scripts/boost/post-source-stubs/nowide.cmake new file mode 100644 index 00000000000000..a523422597e271 --- /dev/null +++ b/scripts/boost/post-source-stubs/nowide.cmake @@ -0,0 +1,7 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +string(REPLACE "check-target-builds ../config//cxx11_moveable_fstreams" "check-target-builds ../check_movable_fstreams.cpp" _contents "${_contents}") +string(REPLACE "check-target-builds ../config//lfs_support" "check-target-builds ../check_lfs_support.cpp" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") +file(COPY "${SOURCE_PATH}/config/check_lfs_support.cpp" "${SOURCE_PATH}/config/check_movable_fstreams.cpp" DESTINATION "${SOURCE_PATH}/build/config") diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/test.cmake b/scripts/boost/post-source-stubs/test.cmake similarity index 100% rename from ports/boost-vcpkg-helpers/post-source-stubs/test.cmake rename to scripts/boost/post-source-stubs/test.cmake diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 6234efaa3d3d8f..e6f841647349d8 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -1,10 +1,10 @@ [CmdletBinding()] param( $badParam, - [Parameter(Mandatory=$False)][switch]$disableMetrics = $false, [Parameter(Mandatory=$False)][switch]$win64 = $false, [Parameter(Mandatory=$False)][string]$withVSPath = "", - [Parameter(Mandatory=$False)][string]$withWinSDK = "" + [Parameter(Mandatory=$False)][string]$withWinSDK = "", + [Parameter(Mandatory=$False)][switch]$disableMetrics = $false ) Set-StrictMode -Version Latest # Powershell2-compatible way of forcing named-parameters @@ -12,407 +12,65 @@ if ($badParam) { if ($disableMetrics -and $badParam -eq "1") { - Write-Warning "'disableMetrics 1' is deprecated, please change to 'disableMetrics' (without '1')" + Write-Warning "'disableMetrics 1' is deprecated, please change to 'disableMetrics' (without '1')." } else { - throw "Only named parameters are allowed" + throw "Only named parameters are allowed." } } -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash - -function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) +if ($win64) { - if ($null -eq $object) - { - return $false - } - - return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"}) + Write-Warning "-win64 no longer has any effect; ignored." } -function getProgramFiles32bit() +if (-Not [string]::IsNullOrWhiteSpace($withVSPath)) { - $out = ${env:PROGRAMFILES(X86)} - if ($null -eq $out) - { - $out = ${env:PROGRAMFILES} - } - - if ($null -eq $out) - { - throw "Could not find [Program Files 32-bit]" - } + Write-Warning "-withVSPath no longer has any effect; ignored." +} - return $out +if (-Not [string]::IsNullOrWhiteSpace($withWinSDK)) +{ + Write-Warning "-withWinSDK no longer has any effect; ignored." } +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition $vcpkgRootDir = $scriptsDir while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) { Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root" $vcpkgRootDir = Split-path $vcpkgRootDir -Parent } -Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" - -$vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" - -if (!(Test-Path $vcpkgSourcesPath)) -{ - Write-Error "Unable to determine vcpkg sources directory. '$vcpkgSourcesPath' does not exist." - return -} - -function getVisualStudioInstances() -{ - $programFiles = getProgramFiles32bit - $results = New-Object System.Collections.ArrayList - $vswhereExe = "$programFiles\Microsoft Visual Studio\Installer\vswhere.exe" - if (Test-Path $vswhereExe) - { - $output = & $vswhereExe -prerelease -legacy -products * -format xml - [xml]$asXml = $output - - foreach ($instance in $asXml.instances.instance) - { - $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash - $installationVersion = $instance.InstallationVersion - - $isPrerelease = -7 - if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") - { - $isPrerelease = $instance.isPrerelease - } - - if ($isPrerelease -eq 0) - { - $releaseType = "PreferenceWeight3::StableRelease" - } - elseif ($isPrerelease -eq 1) - { - $releaseType = "PreferenceWeight2::PreRelease" - } - else - { - $releaseType = "PreferenceWeight1::Legacy" - } - # Placed like that for easy sorting according to preference - $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null - } - } - else - { - Write-Verbose "Could not locate vswhere at $vswhereExe" - } - - if ("$env:vs140comntools" -ne "") - { - $installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") - $clExe = "$installationPath\VC\bin\cl.exe" - $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - - if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) - { - $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null - } - } - - $installationPath = "$programFiles\Microsoft Visual Studio 14.0" - $clExe = "$installationPath\VC\bin\cl.exe" - $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - - if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) - { - $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null - } +Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" - $results.Sort() - $results.Reverse() +& "$scriptsDir/tls12-download.exe" github.com "/microsoft/vcpkg-tool/releases/download/2021-09-10/vcpkg.exe" "$vcpkgRootDir\vcpkg.exe" +Write-Host "" - return $results -} - -function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) +if ($LASTEXITCODE -ne 0) { - $VisualStudioInstances = getVisualStudioInstances - if ($null -eq $VisualStudioInstances) - { - throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." - } - - Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstances))" - foreach ($instanceCandidate in $VisualStudioInstances) - { - Write-Verbose "Inspecting: $instanceCandidate" - $split = $instanceCandidate -split "::" - # $preferenceWeight = $split[0] - # $releaseType = $split[1] - $version = $split[2] - $path = $split[3] - - if ($withVSPath -ne "" -and $withVSPath -ne $path) - { - Write-Verbose "Skipping: $instanceCandidate" - continue - } - - $majorVersion = $version.Substring(0,2); - if ($majorVersion -eq "16") - { - $VCFolder= "$path\VC\Tools\MSVC\" - if (Test-Path $VCFolder) - { - Write-Verbose "Picking: $instanceCandidate" - return "$path\MSBuild\Current\Bin\MSBuild.exe", "v142" - } - } - - if ($majorVersion -eq "15") - { - $VCFolder= "$path\VC\Tools\MSVC\" - if (Test-Path $VCFolder) - { - Write-Verbose "Picking: $instanceCandidate" - return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" - } - } - - if ($majorVersion -eq "14") - { - $clExe= "$path\VC\bin\cl.exe" - if (Test-Path $clExe) - { - Write-Verbose "Picking: $instanceCandidate" - $programFilesPath = getProgramFiles32bit - return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" - } - } - } - - throw "Could not find MSBuild version with C++ support. VS2015, VS2017, or VS2019 (with C++) needs to be installed." + Write-Error "Downloading vcpkg.exe failed. Please check your internet connection, or consider downloading a recent vcpkg.exe from https://github.com/microsoft/vcpkg-tool with a browser." + throw } -function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = $False, - [Parameter(Mandatory=$False)][switch]$DisableWin81SDK = $False, - [Parameter(Mandatory=$False)][string]$withWinSDK) -{ - if ($DisableWin10SDK -and $DisableWin81SDK) - { - throw "Both Win10SDK and Win81SDK were disabled." - } - - Write-Verbose "Finding WinSDK" - - $validInstances = New-Object System.Collections.ArrayList - # Windows 10 SDK - function CheckWindows10SDK($path) - { - if ($null -eq $path) - { - return - } - - $folder = (Join-Path $path "Include") - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) - [array]::Reverse($win10sdkVersions) # Newest SDK first - - foreach ($win10sdkV in $win10sdkVersions) - { - $windowsheader = "$folder\$win10sdkV\um\windows.h" - if (!(Test-Path $windowsheader)) - { - Write-Verbose "$windowsheader - Not Found" - continue - } - Write-Verbose "$windowsheader - Found" - - $ddkheader = "$folder\$win10sdkV\shared\sdkddkver.h" - if (!(Test-Path $ddkheader)) - { - Write-Verbose "$ddkheader - Not Found" - continue - } - - Write-Verbose "$ddkheader - Found" - $win10sdkVersionString = $win10sdkV.ToString() - Write-Verbose "Found $win10sdkVersionString" - $validInstances.Add($win10sdkVersionString) > $null - } - } - - Write-Verbose "`n" - Write-Verbose "Looking for Windows 10 SDK" - $regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue - $regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue - if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } - if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } - CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") - CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") - - # Windows 8.1 SDK - function CheckWindows81SDK($path) - { - if ($null -eq $path) - { - return - } - - $folder = "$path\Include" - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win81sdkVersionString = "8.1" - Write-Verbose "Found $win81sdkVersionString" - $validInstances.Add($win81sdkVersionString) > $null - } - - Write-Verbose "`n" - Write-Verbose "Looking for Windows 8.1 SDK" - $regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue - $regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue - if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } - if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } - CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") - CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") - - Write-Verbose "`n`n`n" - Write-Verbose "The following Windows SDKs were found:" - foreach ($instance in $validInstances) - { - Write-Verbose $instance - } - - # Selecting - if ($withWinSDK -ne "") - { - foreach ($instance in $validInstances) - { - if ($instance -eq $withWinSDK) - { - return $instance - } - } - - throw "Could not find the requested Windows SDK version: $withWinSDK" - } - - foreach ($instance in $validInstances) - { - if (!$DisableWin10SDK -and $instance -match "10.") - { - return $instance - } - - if (!$DisableWin81SDK -and $instance -match "8.1") - { - return $instance - } - } - - throw "Could not detect a Windows SDK / TargetPlatformVersion" -} - -$msbuildExeWithPlatformToolset = findAnyMSBuildWithCppPlatformToolset $withVSPath -$msbuildExe = $msbuildExeWithPlatformToolset[0] -$platformToolset = $msbuildExeWithPlatformToolset[1] -$windowsSDK = getWindowsSDK -withWinSDK $withWinSDK - -$disableMetricsValue = "0" if ($disableMetrics) { - $disableMetricsValue = "1" -} - -$platform = "x86" -$vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x86.release" -if($PSVersionTable.PSVersion.Major -le 2) -{ - $architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture -} -else -{ - $architecture=(Get-CimInstance win32_operatingsystem | Select-Object osarchitecture).osarchitecture -} -if ($win64) -{ - if (-not $architecture -like "*64*") - { - throw "Cannot build 64-bit on non-64-bit system" - } - - $platform = "x64" - $vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x64.release" + Set-Content -Value "" -Path "$vcpkgRootDir\vcpkg.disable-metrics" -Force } - -if ($architecture -like "*64*") +elseif (-Not (Test-Path "$vcpkgRootDir\vcpkg.disable-metrics")) { - $PreferredToolArchitecture = "x64" + # Note that we intentionally leave any existing vcpkg.disable-metrics; once a user has + # opted out they should stay opted out. + Write-Host @" +Telemetry +--------- +vcpkg collects usage data in order to help us improve your experience. +The data collected by Microsoft is anonymous. +You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics, +passing --disable-metrics to vcpkg on the command line, +or by setting the VCPKG_DISABLE_METRICS environment variable. + +Read more about vcpkg telemetry at docs/about/privacy.md +"@ } -else -{ - $PreferredToolArchitecture = "x86" -} - -$arguments = ( -"`"/p:VCPKG_VERSION=-nohash`"", -"`"/p:DISABLE_METRICS=$disableMetricsValue`"", -"/p:Configuration=Release", -"/p:Platform=$platform", -"/p:PlatformToolset=$platformToolset", -"/p:TargetPlatformVersion=$windowsSDK", -"/p:PreferredToolArchitecture=$PreferredToolArchitecture", -"/verbosity:minimal", -"/m", -"/nologo", -"`"$vcpkgSourcesPath\dirs.proj`"") -join " " - -function vcpkgInvokeCommandClean() -{ - param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "") - - Write-Verbose "Clean-Executing: ${executable} ${arguments}" - $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition - $cleanEnvScript = "$scriptsDir\cleanEnvironmentHelper.ps1" - $tripleQuotes = "`"`"`"" - $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes - $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" - $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" - - $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - return $ec -} - -# vcpkgInvokeCommandClean cmd "/c echo %PATH%" -Write-Host "`nBuilding vcpkg.exe ...`n" -$ec = vcpkgInvokeCommandClean $msbuildExe $arguments - -if ($ec -ne 0) -{ - Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." - return -} -Write-Host "`nBuilding vcpkg.exe... done.`n" - -Write-Verbose "Placing vcpkg.exe in the correct location" - -Copy-Item "$vcpkgReleaseDir\vcpkg.exe" "$vcpkgRootDir\vcpkg.exe" -Copy-Item "$vcpkgReleaseDir\vcpkgmetricsuploader.exe" "$vcpkgRootDir\scripts\vcpkgmetricsuploader.exe" -Remove-Item "$vcpkgReleaseDir" -Force -Recurse -ErrorAction SilentlyContinue diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 09d77b07db21bd..ef8138c9908b55 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -6,18 +6,11 @@ while [ "$vcpkgRootDir" != "/" ] && ! [ -e "$vcpkgRootDir/.vcpkg-root" ]; do vcpkgRootDir="$(dirname "$vcpkgRootDir")" done -# Enable using this entry point on windows from git bash by redirecting to the .bat file. -unixName=$(uname -s | sed 's/MINGW.*_NT.*/MINGW_NT/') -if [ "$unixName" = "MINGW_NT" ]; then - vcpkgRootDir=$(cygpath -aw "$vcpkgRootDir") - cmd "/C $vcpkgRootDir\\bootstrap-vcpkg.bat" || exit 1 - exit 0 -fi - # Argument parsing vcpkgDisableMetrics="OFF" vcpkgUseSystem=false -vcpkgAllowAppleClang=OFF +vcpkgAllowAppleClang=false +vcpkgBuildTests="OFF" for var in "$@" do if [ "$var" = "-disableMetrics" -o "$var" = "--disableMetrics" ]; then @@ -25,7 +18,9 @@ do elif [ "$var" = "-useSystemBinaries" -o "$var" = "--useSystemBinaries" ]; then vcpkgUseSystem=true elif [ "$var" = "-allowAppleClang" -o "$var" = "--allowAppleClang" ]; then - vcpkgAllowAppleClang=ON + vcpkgAllowAppleClang=true + elif [ "$var" = "-buildTests" ]; then + vcpkgBuildTests="ON" elif [ "$var" = "-help" -o "$var" = "--help" ]; then echo "Usage: ./bootstrap-vcpkg.sh [options]" echo @@ -41,6 +36,20 @@ do fi done +# Enable using this entry point on windows from git bash by redirecting to the .bat file. +unixName=$(uname -s | sed 's/MINGW.*_NT.*/MINGW_NT/') +if [ "$unixName" = "MINGW_NT" ]; then + if [ "$vcpkgDisableMetrics" = "ON" ]; then + args="-disableMetrics" + else + args="" + fi + + vcpkgRootDir=$(cygpath -aw "$vcpkgRootDir") + cmd "/C $vcpkgRootDir\\bootstrap-vcpkg.bat $args" || exit 1 + exit 0 +fi + if [ -z ${VCPKG_DOWNLOADS+x} ]; then downloadsDir="$vcpkgRootDir/downloads" else @@ -65,11 +74,21 @@ vcpkgCheckRepoTool() __tool=$1 if ! command -v "$__tool" >/dev/null 2>&1 ; then echo "Could not find $__tool. Please install it (and other dependencies) with:" - echo "sudo apt-get install curl unzip tar" + echo "sudo apt-get install curl zip unzip tar" exit 1 fi } +vcpkgCheckBuildTool() +{ + __tool=$1 + if ! command -v "$__tool" >/dev/null 2>&1 ; then + echo "Could not find $__tool. Please install it (and other dependencies) with:" + echo "sudo apt-get install cmake ninja-build" + exit 1 + fi +} + vcpkgCheckEqualFileHash() { url=$1; filePath=$2; expectedHash=$3 @@ -100,7 +119,7 @@ vcpkgDownloadFile() url=$1; downloadPath=$2 sha512=$3 vcpkgCheckRepoTool "curl" rm -rf "$downloadPath.part" - curl -L $url --create-dirs --retry 3 --output "$downloadPath.part" || exit 1 + curl -L $url --tlsv1.2 --create-dirs --retry 3 --output "$downloadPath.part" --silent --show-error --fail || exit 1 vcpkgCheckEqualFileHash $url "$downloadPath.part" $sha512 mv "$downloadPath.part" "$downloadPath" @@ -146,10 +165,11 @@ fetchTool() xmlFileAsString=`cat "$vcpkgRootDir/scripts/vcpkgTools.xml"` toolRegexStart="" toolData="$(extractStringBetweenDelimiters "$xmlFileAsString" "$toolRegexStart" "")" - if [ "$toolData" = "" ]; then - echo "Unknown tool: $tool" + case "$toolData" in + "" | "" "")" @@ -199,11 +219,12 @@ fetchTool() selectCXX() { - __output=$1 - if [ "x$CXX" = "x" ]; then - CXX=g++ - if which g++-9 >/dev/null 2>&1; then + if which g++-11 >/dev/null 2>&1; then + CXX=g++-11 + elif which g++-10 >/dev/null 2>&1; then + CXX=g++-10 + elif which g++-9 >/dev/null 2>&1; then CXX=g++-9 elif which g++-8 >/dev/null 2>&1; then CXX=g++-8 @@ -211,46 +232,100 @@ selectCXX() CXX=g++-7 elif which g++-6 >/dev/null 2>&1; then CXX=g++-6 + elif which g++ >/dev/null 2>&1; then + CXX=g++ fi + # If we can't find g++, allow CMake to do the look-up fi - - gccversion="$("$CXX" -v 2>&1)" - gccversion="$(extractStringBetweenDelimiters "$gccversion" "gcc version " ".")" - if [ "$gccversion" -lt "6" ]; then - echo "CXX ($CXX) is too old; please install a newer compiler such as g++-7." - echo "On Ubuntu try the following:" - echo " sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y" - echo " sudo apt-get update -y" - echo " sudo apt-get install g++-7 -y" - echo "On CentOS try the following:" - echo " sudo yum install centos-release-scl" - echo " sudo yum install devtoolset-7" - echo " scl enable devtoolset-7 bash" - return 1 - fi - - eval $__output="'$CXX'" } # Preparation UNAME="$(uname)" +ARCH="$(uname -m)" + +# Force using system utilities for building vcpkg if host arch is arm, arm64, s390x, or ppc64le. +if [ "$ARCH" = "armv7l" -o "$ARCH" = "aarch64" -o "$ARCH" = "s390x" -o "$ARCH" = "ppc64le" ]; then + vcpkgUseSystem=true +fi + +if [ "$UNAME" = "OpenBSD" ]; then + vcpkgUseSystem=true + + if [ -z "$CXX" ]; then + CXX=/usr/bin/clang++ + fi + if [ -z "$CC" ]; then + CC=/usr/bin/clang + fi +fi if $vcpkgUseSystem; then cmakeExe="cmake" ninjaExe="ninja" + vcpkgCheckBuildTool "$cmakeExe" + vcpkgCheckBuildTool "$ninjaExe" else fetchTool "cmake" "$UNAME" cmakeExe || exit 1 fetchTool "ninja" "$UNAME" ninjaExe || exit 1 fi -selectCXX CXX || exit 1 +if [ "$os" = "osx" ]; then + if [ "$vcpkgAllowAppleClang" = "true" ] || [[ $(sw_vers -productVersion | awk -F '.' '{print $1}') -ge 11 ]]; then + CXX=clang++ + else + selectCXX + fi +else + selectCXX +fi # Do the build -buildDir="$vcpkgRootDir/toolsrc/build.rel" -rm -rf "$buildDir" +vcpkgToolReleaseTag="2021-09-10" +vcpkgToolReleaseSha="0bea4c7bdd91933d44a0214e2202eb5ef988826d32ae7a00a8868e510710e7de0b336b1cc6aa1ea20af2f6e24d92f2ab665046089bb4ec43bc2add94a901d5fc" +vcpkgToolReleaseTarball="$vcpkgToolReleaseTag.tar.gz" +vcpkgToolUrl="https://github.com/microsoft/vcpkg-tool/archive/$vcpkgToolReleaseTarball" +baseBuildDir="$vcpkgRootDir/buildtrees/_vcpkg" +buildDir="$baseBuildDir/build" +tarballPath="$downloadsDir/$vcpkgToolReleaseTarball" +srcBaseDir="$baseBuildDir/src" +srcDir="$srcBaseDir/vcpkg-tool-$vcpkgToolReleaseTag" + +if [ -e "$tarballPath" ]; then + vcpkgCheckEqualFileHash "$vcpkgToolUrl" "$tarballPath" "$vcpkgToolReleaseSha" +else + echo "Downloading vcpkg tool sources" + vcpkgDownloadFile "$vcpkgToolUrl" "$tarballPath" "$vcpkgToolReleaseSha" +fi + +echo "Building vcpkg-tool..." +rm -rf "$baseBuildDir" mkdir -p "$buildDir" +vcpkgExtractArchive "$tarballPath" "$srcBaseDir" +cmakeConfigOptions="-DCMAKE_BUILD_TYPE=Release -G 'Ninja' -DCMAKE_MAKE_PROGRAM='$ninjaExe'" + +if [ "${VCPKG_MAX_CONCURRENCY}" != "" ] ; then + cmakeConfigOptions=" $cmakeConfigOptions '-DCMAKE_JOB_POOL_COMPILE:STRING=compile' '-DCMAKE_JOB_POOL_LINK:STRING=link' '-DCMAKE_JOB_POOLS:STRING=compile=$VCPKG_MAX_CONCURRENCY;link=$VCPKG_MAX_CONCURRENCY' " +fi -(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DBUILD_TESTING=OFF" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1 +(cd "$buildDir" && CXX="$CXX" eval "$cmakeExe" "$srcDir" $cmakeConfigOptions "-DBUILD_TESTING=$vcpkgBuildTests" "-DVCPKG_DEVELOPMENT_WARNINGS=OFF" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1 (cd "$buildDir" && "$cmakeExe" --build .) || exit 1 rm -rf "$vcpkgRootDir/vcpkg" cp "$buildDir/vcpkg" "$vcpkgRootDir/" + +if [ "$vcpkgDisableMetrics" = "ON" ]; then + touch "$vcpkgRootDir/vcpkg.disable-metrics" +elif ! [ -f "$vcpkgRootDir/vcpkg.disable-metrics" ]; then + # Note that we intentionally leave any existing vcpkg.disable-metrics; once a user has + # opted out they should stay opted out. + cat < cppstdtmp.h + #while IFS= read -r line; do + # printf '%s' "$line" + #done + #exec 3<&- + #echo "$( cppstdtmp.h + exec $prog ${cppopt[@]} $tmpout + rm -f $tmpout +else + #echo "FILE" + exec $prog ${cppopt[@]} $input_file +fi + diff --git a/scripts/buildsystems/make_wrapper/windres-rc b/scripts/buildsystems/make_wrapper/windres-rc new file mode 100644 index 00000000000000..bb2aac0d8790f0 --- /dev/null +++ b/scripts/buildsystems/make_wrapper/windres-rc @@ -0,0 +1,128 @@ +#! /bin/sh +# Wrapper for windres to rc which do not understand '-i -o --output-format'. +# cvtres is invoked by the linker +scriptversion=2021-04-02.18; # UTC + + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_windres_wrapper rc args... +# Adjust compile command to suit rc instead of windres +func_windres_wrapper () +{ + # Assume a capable shell + in= + out= + + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + eat=1 + func_file_conv "$2" + out="$file" + echo "OUTPUT:$file" + set x "$@" + shift + ;; + *.obj) + func_file_conv "$1" + out="$file" + echo "OUTPUT:$file" + set x "$@" + shift + ;; + --output-format=*) + set x "$@" + shift + ;; + -i) + eat=1 + func_file_conv "$2" mingw + in="$file" + echo "INPUT:$file" + set x "$@" + shift + ;; + -*) + set x "$@" "${1//\\\"/\"}" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + echo "$@" -fo "$out" "$in" + exec "$@" -fo "$out" "$in" + exit 1 +} + +eat= + +func_windres_wrapper "$@" + + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/scripts/buildsystems/meson/none.txt b/scripts/buildsystems/meson/none.txt new file mode 100644 index 00000000000000..6dafc80904f97d --- /dev/null +++ b/scripts/buildsystems/meson/none.txt @@ -0,0 +1,19 @@ +# native file used to make the build machine compiler unusable + +[host_machine] +system = 'none' +cpu_family = 'none' +cpu = 'none' +endian = 'little' + +[properties] + +[binaries] +c = ['false'] +cpp = ['false'] +objc = ['false'] +objcpp = ['false'] +ar = ['false'] +pkgconfig = ['false'] +cmake = ['false'] +ninja = ['false'] \ No newline at end of file diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index ab51dc9be1d22d..abd102ab06a2ed 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -12,24 +12,53 @@ if ($copiedFilesLog) Set-Content -Path $copiedFilesLog -Value "" -Encoding UTF8 } +function computeHash([System.Security.Cryptography.HashAlgorithm]$alg, [string]$str) { + $bytes = [System.Text.Encoding]::UTF8.GetBytes($str) + $hash = $alg.ComputeHash($bytes) + return [Convert]::ToBase64String($hash) +} + +function getMutex([string]$targetDir) { + $sha512Hash = [System.Security.Cryptography.SHA512]::Create() + if ($sha512Hash) { + $hash = computeHash $sha512Hash $targetDir + $mtxName = "VcpkgAppLocalDeployBinary-" + $hash + return New-Object System.Threading.Mutex($false, $mtxName) + } + + return New-Object System.Threading.Mutex($false, "VcpkgAppLocalDeployBinary") +} + # Note: this function signature is depended upon by the qtdeploy.ps1 script introduced in 5.7.1-7 function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$targetBinaryName) { - if (Test-Path "$targetBinaryDir\$targetBinaryName") { - $sourceModTime = (Get-Item $SourceDir\$targetBinaryName).LastWriteTime - $destModTime = (Get-Item $targetBinaryDir\$targetBinaryName).LastWriteTime - if ($destModTime -lt $sourceModTime) { - Write-Verbose " ${targetBinaryName}: Updating $SourceDir\$targetBinaryName" + try { + $mtx = getMutex($targetBinaryDir) + if ($mtx) { + $mtx.WaitOne() | Out-Null + } + + if (Test-Path "$targetBinaryDir\$targetBinaryName") { + $sourceModTime = (Get-Item $SourceDir\$targetBinaryName).LastWriteTime + $destModTime = (Get-Item $targetBinaryDir\$targetBinaryName).LastWriteTime + if ($destModTime -lt $sourceModTime) { + Write-Verbose " ${targetBinaryName}: Updating $SourceDir\$targetBinaryName" + Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir + } else { + Write-Verbose " ${targetBinaryName}: already present" + } + } + else { + Write-Verbose " ${targetBinaryName}: Copying $SourceDir\$targetBinaryName" Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir - } else { - Write-Verbose " ${targetBinaryName}: already present" + } + if ($copiedFilesLog) { Add-Content $copiedFilesLog "$targetBinaryDir\$targetBinaryName" -Encoding UTF8 } + if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" -Encoding Unicode } + } finally { + if ($mtx) { + $mtx.ReleaseMutex() | Out-Null + $mtx.Dispose() | Out-Null } } - else { - Write-Verbose " ${targetBinaryName}: Copying $SourceDir\$targetBinaryName" - Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir - } - if ($copiedFilesLog) { Add-Content $copiedFilesLog "$targetBinaryDir\$targetBinaryName" -Encoding UTF8 } - if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" -Encoding Unicode } } @@ -57,7 +86,15 @@ function resolve([string]$targetBinary) { } $targetBinaryDir = Split-Path $targetBinaryPath -parent - $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" }) + if (Get-Command "dumpbin" -ErrorAction SilentlyContinue) { + $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" }) + } elseif (Get-Command "llvm-objdump" -ErrorAction SilentlyContinue) { + $a = $(llvm-objdump -p $targetBinary| ? { $_ -match "^ {4}DLL Name: .*\.dll" } | % { $_ -replace "^ {4}DLL Name: ","" }) + } elseif (Get-Command "objdump" -ErrorAction SilentlyContinue) { + $a = $(objdump -p $targetBinary| ? { $_ -match "^\tDLL Name: .*\.dll" } | % { $_ -replace "^\tDLL Name: ","" }) + } else { + Write-Error "Neither dumpbin, llvm-objdump nor objdump could be found. Can not take care of dll dependencies." + } $a | % { if ([string]::IsNullOrEmpty($_)) { return @@ -78,6 +115,7 @@ function resolve([string]$targetBinary) { deployPluginsIfMagnum $targetBinaryDir "$g_install_root\bin\magnum" "$_" } } + if (Test-Path function:\deployAzureKinectSensorSDK) { deployAzureKinectSensorSDK $targetBinaryDir "$g_install_root" "$_" } resolve "$baseTargetBinaryDir\$_" } elseif (Test-Path "$targetBinaryDir\$_") { Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed" @@ -107,5 +145,10 @@ if (Test-Path "$g_install_root\bin\magnum\magnumdeploy.ps1") { . "$g_install_root\bin\magnum-d\magnumdeploy.ps1" } +# Note: This is a hack to make Azure Kinect Sensor SDK work. +if (Test-Path "$g_install_root\tools\azure-kinect-sensor-sdk\k4adeploy.ps1") { + . "$g_install_root\tools\azure-kinect-sensor-sdk\k4adeploy.ps1" +} + resolve($targetBinary) Write-Verbose $($g_searched | out-string) diff --git a/scripts/buildsystems/msbuild/vcpkg-general.xml b/scripts/buildsystems/msbuild/vcpkg-general.xml new file mode 100644 index 00000000000000..5c84aa0daaa740 --- /dev/null +++ b/scripts/buildsystems/msbuild/vcpkg-general.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/buildsystems/msbuild/vcpkg.props b/scripts/buildsystems/msbuild/vcpkg.props new file mode 100644 index 00000000000000..9a01beb5ade60f --- /dev/null +++ b/scripts/buildsystems/msbuild/vcpkg.props @@ -0,0 +1,21 @@ + + + + true + true + $(Configuration) + false + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..')) + + true + + false + true + + + false + true + $([MSbuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), vcpkg.json)) + + diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 8807befd8248f7..36fd347648160d 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -1,103 +1,209 @@ - - true - x86-windows + + + + + + + + <_ZVcpkgRoot>$(VcpkgRoot) + <_ZVcpkgManifestRoot>$(VcpkgManifestRoot) + <_ZVcpkgInstalledDir>$(VcpkgInstalledDir) - - true - x86-uwp + + + <_ZVcpkgRoot Condition="!$(_ZVcpkgRoot.EndsWith('\'))">$(_ZVcpkgRoot)\ + <_ZVcpkgManifestRoot Condition="'$(_ZVcpkgManifestRoot)' != '' and !$(_ZVcpkgManifestRoot.EndsWith('\'))">$(_ZVcpkgManifestRoot)\ + <_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' != '' and !$(_ZVcpkgInstalledDir.EndsWith('\'))">$(_ZVcpkgInstalledDir)\ - - true - x86-windows + + + windows + uwp - - true - x86-uwp + + $(Platform) + x86 - - true - x64-windows + + <_ZVcpkgLinkage /> + <_ZVcpkgLinkage Condition="'$(VcpkgUseStatic)' == 'true'">-static + $(VcpkgPlatformTarget)-$(VcpkgOSTarget)$(_ZVcpkgLinkage) - - true - arm-windows + + + VcpkgTriplet=$(VcpkgTriplet):$(ProjectStateLine) - - true - arm64-windows - + + + + + <_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' == ''">$(_ZVcpkgManifestRoot)vcpkg_installed\$(VcpkgTriplet)\ + + + + + <_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' == ''">$(_ZVcpkgRoot)installed\ + + + - - true - x64-uwp - + + <_ZVcpkgCurrentInstalledDir>$(_ZVcpkgInstalledDir)\$(VcpkgTriplet)\ + <_ZVcpkgNormalizedConfiguration Condition="$(VcpkgConfiguration.StartsWith('Debug'))">Debug + <_ZVcpkgNormalizedConfiguration Condition="$(VcpkgConfiguration.StartsWith('Release')) or '$(VcpkgConfiguration)' == 'RelWithDebInfo' or '$(VcpkgConfiguration)' == 'MinSizeRel'">Release - - true - arm-uwp + <_ZVcpkgConfigSubdir Condition="'$(_ZVcpkgNormalizedConfiguration)' == 'Debug'">debug\ + <_ZVcpkgExecutable>$(_ZVcpkgRoot)vcpkg.exe - - true - arm64-uwp + + + $(_ZVcpkgRoot)scripts\buildsystems\msbuild\vcpkg-general.xml - - $(Configuration) - Debug - Release - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root))\installed\$(VcpkgTriplet)\ - true - - false - + + + Project + + + + + %(AdditionalLibraryDirectories);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib;$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\manual-link + - %(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib - %(AdditionalDependencies);$(VcpkgRoot)lib\*.lib - %(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link - %(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link + %(AdditionalDependencies);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\*.lib + %(AdditionalLibraryDirectories);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib;$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\manual-link - %(AdditionalIncludeDirectories);$(VcpkgRoot)include + %(AdditionalIncludeDirectories);$(_ZVcpkgCurrentInstalledDir)include - %(AdditionalIncludeDirectories);$(VcpkgRoot)include + %(AdditionalIncludeDirectories);$(_ZVcpkgCurrentInstalledDir)include + + + + + - - - + + + + + + + + + <_ZVcpkgHostTripletParameter>"--host-triplet=$(VcpkgHostTriplet)" + <_ZVcpkgHostTripletSuffix>$(VcpkgHostTriplet). + + + + + <_ZVcpkgHostTripletParameter /> + <_ZVcpkgHostTripletSuffix /> + + + + + + <_ZVcpkgManifestFileLocation>$(_ZVcpkgManifestRoot)vcpkg.json + <_ZVcpkgConfigurationFileLocation>$(_ZVcpkgManifestRoot)vcpkg-configuration.json + <_ZVcpkgMSBuildStampFile>$(_ZVcpkgInstalledDir).msbuildstamp-$(VcpkgTriplet).$(_ZVcpkgHostTripletSuffix)stamp + + + + <_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgManifestFileLocation)"/> + <_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgConfigurationFileLocation)" Condition="Exists('$(_ZVcpkgConfigurationFileLocation)')"/> + + + + + + <_ZVcpkgTLogFileLocation>$(TLogLocation)VcpkgInstallManifest$(VcpkgTriplet).$(_ZVcpkgHostTripletSuffix)read.1u.tlog + + + + + + + + + + + + - - - + + + + <_ZVcpkgAppLocalPowerShellCommonArguments>-ExecutionPolicy Bypass -noprofile -File "$(MSBuildThisFileDirectory)applocal.ps1" "$(TargetPath)" "$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)bin" "$(TLogLocation)$(ProjectName).write.1u.tlog" "$(IntDir)vcpkg.applocal.log" + + + + - + + + + - + + + - - + + diff --git a/scripts/buildsystems/osx/applocal.py b/scripts/buildsystems/osx/applocal.py index b3f8f138e8409a..5237f1fdd0a98c 100644 --- a/scripts/buildsystems/osx/applocal.py +++ b/scripts/buildsystems/osx/applocal.py @@ -84,7 +84,7 @@ def get_dependencies(filename): deps = [] if proc_out.retcode == 0: # some string splitting - deps = [s.strip().split(' ')[0] for s in proc_out.stdout.splitlines()[1:] if s] + deps = [s.strip().split(b' ')[0].decode('utf-8') for s in proc_out.stdout.splitlines()[1:] if s] # prevent infinite recursion when a binary depends on itself (seen with QtWidgets)... deps = [s for s in deps if os.path.basename(filename) not in s] return deps @@ -259,6 +259,11 @@ def fix_dependency(binary, dep): else: return True + # if the source path doesn't exist it's probably not a dependency + # originating with vcpkg and we should leave it alone + if not os.path.exists(qtnamesrc): + return True + dep_ok = True # check that rpath of 'dep' inside binary has been correctly set # (ie: relative to exepath using '@executable_path' syntax) @@ -417,4 +422,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 6eb0f62dd2c415..9769b611328b20 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,10 +1,214 @@ # Mark variables as used so cmake doesn't complain about them mark_as_advanced(CMAKE_TOOLCHAIN_FILE) -# This is a backport of CMAKE_TRY_COMPILE_PLATFORM_VARIABLES to cmake 3.0 -get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) -if( _CMAKE_IN_TRY_COMPILE ) - include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL ) +# NOTE: to figure out what cmake versions are required for different things, +# grep for `CMake 3`. All version requirement comments should follow that format. + +#[===[.md: +# z_vcpkg_add_fatal_error +Add a fatal error. + +```cmake +z_vcpkg_add_fatal_error(...) +``` + +We use this system, instead of `message(FATAL_ERROR)`, +since cmake prints a lot of nonsense if the toolchain errors out before it's found the build tools. + +This `Z_VCPKG_HAS_FATAL_ERROR` must be checked before any filesystem operations are done, +since otherwise you might be doing something with bad variables set up. +#]===] +# this is defined above everything else so that it can be used. +set(Z_VCPKG_FATAL_ERROR) +set(Z_VCPKG_HAS_FATAL_ERROR OFF) +function(z_vcpkg_add_fatal_error ERROR) + if(NOT Z_VCPKG_HAS_FATAL_ERROR) + set(Z_VCPKG_HAS_FATAL_ERROR ON PARENT_SCOPE) + set(Z_VCPKG_FATAL_ERROR "${ERROR}" PARENT_SCOPE) + else() + string(APPEND Z_VCPKG_FATAL_ERROR "\n${ERROR}") + endif() +endfunction() + +set(Z_VCPKG_CMAKE_REQUIRED_MINIMUM_VERSION "3.1") +if(CMAKE_VERSION VERSION_LESS Z_VCPKG_CMAKE_REQUIRED_MINIMUM_VERSION) + message(FATAL_ERROR "vcpkg.cmake requires at least CMake ${Z_VCPKG_CMAKE_REQUIRED_MINIMUM_VERSION}.") +endif() +# this policy is required for this file; thus, CMake 3.1 is required. +cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) + +include(CMakeDependentOption) + +# VCPKG toolchain options. +option(VCPKG_VERBOSE "Enables messages from the VCPKG toolchain for debugging purposes." OFF) +mark_as_advanced(VCPKG_VERBOSE) + +option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) +option(X_VCPKG_APPLOCAL_DEPS_SERIALIZED "(experimental) Add USES_TERMINAL to VCPKG_APPLOCAL_DEPS to force serialization." OFF) + +# requires CMake 3.14 +option(X_VCPKG_APPLOCAL_DEPS_INSTALL "(experimental) Automatically copy dependencies into the install target directory for executables. Requires CMake 3.14." OFF) +option(VCPKG_PREFER_SYSTEM_LIBS "Appends the vcpkg paths to CMAKE_PREFIX_PATH, CMAKE_LIBRARY_PATH and CMAKE_FIND_ROOT_PATH so that vcpkg libraries/packages are found after toolchain/system libraries/packages." OFF) + +# Manifest options and settings +if(NOT DEFINED VCPKG_MANIFEST_DIR) + if(EXISTS "${CMAKE_SOURCE_DIR}/vcpkg.json") + set(VCPKG_MANIFEST_DIR "${CMAKE_SOURCE_DIR}") + endif() +endif() +set(VCPKG_MANIFEST_DIR "${VCPKG_MANIFEST_DIR}" + CACHE PATH "The path to the vcpkg manifest directory." FORCE) + +if(DEFINED VCPKG_MANIFEST_DIR AND NOT VCPKG_MANIFEST_DIR STREQUAL "") + set(Z_VCPKG_HAS_MANIFEST_DIR ON) +else() + set(Z_VCPKG_HAS_MANIFEST_DIR OFF) +endif() + +option(VCPKG_MANIFEST_MODE "Use manifest mode, as opposed to classic mode." "${Z_VCPKG_HAS_MANIFEST_DIR}") + +if(VCPKG_MANIFEST_MODE AND NOT Z_VCPKG_HAS_MANIFEST_DIR) + z_vcpkg_add_fatal_error( +"vcpkg manifest mode was enabled, but we couldn't find a manifest file (vcpkg.json) +in the current source directory (${CMAKE_CURRENT_SOURCE_DIR}). +Please add a manifest, or disable manifests by turning off VCPKG_MANIFEST_MODE." + ) +endif() + +if(NOT DEFINED CACHE{Z_VCPKG_CHECK_MANIFEST_MODE}) + set(Z_VCPKG_CHECK_MANIFEST_MODE "${VCPKG_MANIFEST_MODE}" + CACHE INTERNAL "Making sure VCPKG_MANIFEST_MODE doesn't change") +endif() + +if(NOT VCPKG_MANIFEST_MODE AND Z_VCPKG_CHECK_MANIFEST_MODE) + z_vcpkg_add_fatal_error([[ +vcpkg manifest mode was disabled for a build directory where it was initially enabled. +This is not supported. Please delete the build directory and reconfigure. +]]) +elseif(VCPKG_MANIFEST_MODE AND NOT Z_VCPKG_CHECK_MANIFEST_MODE) + z_vcpkg_add_fatal_error([[ +vcpkg manifest mode was enabled for a build directory where it was initially disabled. +This is not supported. Please delete the build directory and reconfigure. +]]) +endif() + +CMAKE_DEPENDENT_OPTION(VCPKG_MANIFEST_INSTALL [[ +Install the dependencies listed in your manifest: + If this is off, you will have to manually install your dependencies. + See https://github.com/microsoft/vcpkg/tree/master/docs/specifications/manifests.md for more info. +]] + ON + "VCPKG_MANIFEST_MODE" + OFF) + +if(VCPKG_MANIFEST_INSTALL) + set(VCPKG_BOOTSTRAP_OPTIONS "${VCPKG_BOOTSTRAP_OPTIONS}" CACHE STRING "Additional options to bootstrap vcpkg" FORCE) + set(VCPKG_OVERLAY_PORTS "${VCPKG_OVERLAY_PORTS}" CACHE STRING "Overlay ports to use for vcpkg install in manifest mode" FORCE) + set(VCPKG_OVERLAY_TRIPLETS "${VCPKG_OVERLAY_TRIPLETS}" CACHE STRING "Overlay triplets to use for vcpkg install in manifest mode" FORCE) + set(VCPKG_INSTALL_OPTIONS "${VCPKG_INSTALL_OPTIONS}" CACHE STRING "Additional install options to pass to vcpkg" FORCE) + set(Z_VCPKG_UNUSED VCPKG_BOOTSTRAP_OPTIONS) + set(Z_VCPKG_UNUSED VCPKG_OVERLAY_PORTS) + set(Z_VCPKG_UNUSED VCPKG_OVERLAY_TRIPLETS) + set(Z_VCPKG_UNUSED VCPKG_INSTALL_OPTIONS) +endif() + +# CMake helper utilities + +#[===[.md: +# z_vcpkg_function_arguments + +Get a list of the arguments which were passed in. +Unlike `ARGV`, which is simply the arguments joined with `;`, +so that `(A B)` is not distinguishable from `("A;B")`, +this macro gives `"A;B"` for the first argument list, +and `"A\;B"` for the second. + +```cmake +z_vcpkg_function_arguments( []) +``` + +`z_vcpkg_function_arguments` gets the arguments between `ARGV` and the last argument. +`` defaults to `0`, so that all arguments are taken. + +## Example: +```cmake +function(foo_replacement) + z_vcpkg_function_arguments(ARGS) + foo(${ARGS}) + ... +endfunction() +``` +#]===] + +# NOTE: this function definition is copied directly from scripts/cmake/z_vcpkg_function_arguments.cmake +# do not make changes here without making the same change there. +macro(z_vcpkg_function_arguments OUT_VAR) + if("${ARGC}" EQUAL 1) + set(z_vcpkg_function_arguments_FIRST_ARG 0) + elseif("${ARGC}" EQUAL 2) + set(z_vcpkg_function_arguments_FIRST_ARG "${ARGV1}") + else() + # vcpkg bug + message(FATAL_ERROR "z_vcpkg_function_arguments: invalid arguments (${ARGV})") + endif() + + set("${OUT_VAR}" "") + + # this allows us to get the value of the enclosing function's ARGC + set(z_vcpkg_function_arguments_ARGC_NAME "ARGC") + set(z_vcpkg_function_arguments_ARGC "${${z_vcpkg_function_arguments_ARGC_NAME}}") + + math(EXPR z_vcpkg_function_arguments_LAST_ARG "${z_vcpkg_function_arguments_ARGC} - 1") + # GREATER_EQUAL added in CMake 3.7 + if(NOT z_vcpkg_function_arguments_LAST_ARG LESS z_vcpkg_function_arguments_FIRST_ARG) + foreach(z_vcpkg_function_arguments_N RANGE "${z_vcpkg_function_arguments_FIRST_ARG}" "${z_vcpkg_function_arguments_LAST_ARG}") + string(REPLACE ";" "\\;" z_vcpkg_function_arguments_ESCAPED_ARG "${ARGV${z_vcpkg_function_arguments_N}}") + # adds an extra `;` on the first time through + set("${OUT_VAR}" "${${OUT_VAR}};${z_vcpkg_function_arguments_ESCAPED_ARG}") + endforeach() + # remove leading `;` + string(SUBSTRING "${${OUT_VAR}}" 1 -1 "${OUT_VAR}") + endif() +endmacro() + +#[===[.md: +# z_vcpkg_set_powershell_path + +Gets either the path to powershell or powershell core, +and places it in the variable Z_VCPKG_POWERSHELL_PATH. +#]===] +function(z_vcpkg_set_powershell_path) + # Attempt to use pwsh if it is present; otherwise use powershell + if(NOT DEFINED Z_VCPKG_POWERSHELL_PATH) + find_program(Z_VCPKG_PWSH_PATH pwsh) + if(Z_VCPKG_PWSH_PATH) + set(Z_VCPKG_POWERSHELL_PATH "${Z_VCPKG_PWSH_PATH}" CACHE INTERNAL "The path to the PowerShell implementation to use.") + else() + message(DEBUG "vcpkg: Could not find PowerShell Core; falling back to PowerShell") + find_program(Z_VCPKG_BUILTIN_POWERSHELL_PATH powershell REQUIRED) + if(Z_VCPKG_BUILTIN_POWERSHELL_PATH) + set(Z_VCPKG_POWERSHELL_PATH "${Z_VCPKG_BUILTIN_POWERSHELL_PATH}" CACHE INTERNAL "The path to the PowerShell implementation to use.") + else() + message(WARNING "vcpkg: Could not find PowerShell; using static string 'powershell.exe'") + set(Z_VCPKG_POWERSHELL_PATH "powershell.exe" CACHE INTERNAL "The path to the PowerShell implementation to use.") + endif() + endif() + endif() # Z_VCPKG_POWERSHELL_PATH +endfunction() + + +# Determine whether the toolchain is loaded during a try-compile configuration +get_property(Z_VCPKG_CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE) + +if(CMAKE_VERSION VERSION_LESS "3.6.0") + set(Z_VCPKG_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES ON) +else() + set(Z_VCPKG_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES OFF) +endif() + +if(Z_VCPKG_CMAKE_IN_TRY_COMPILE AND Z_VCPKG_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES) + include("${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL) endif() if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) @@ -12,237 +216,563 @@ if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) endif() if(VCPKG_TOOLCHAIN) + cmake_policy(POP) return() endif() +#If CMake does not have a mapping for MinSizeRel and RelWithDebInfo in imported targets +#it will map those configuration to the first valid configuration in CMAKE_CONFIGURATION_TYPES or the targets IMPORTED_CONFIGURATIONS. +#In most cases this is the debug configuration which is wrong. +if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL) + set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL "MinSizeRel;Release;") + if(VCPKG_VERBOSE) + message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL set to MinSizeRel;Release;") + endif() +endif() +if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO) + set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO "RelWithDebInfo;Release;") + if(VCPKG_VERBOSE) + message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO set to RelWithDebInfo;Release;") + endif() +endif() + if(VCPKG_TARGET_TRIPLET) + # This is required since a user might do: 'set(VCPKG_TARGET_TRIPLET somevalue)' [no CACHE] before the first project() call + # Latter within the toolchain file we do: 'set(VCPKG_TARGET_TRIPLET somevalue CACHE STRING "")' which + # will otherwise override the user setting of VCPKG_TARGET_TRIPLET in the current scope of the toolchain since the CACHE value + # did not exist previously. Since the value is newly created CMake will use the CACHE value within this scope since it is the more + # recently created value in directory scope. This 'strange' behaviour only happens on the very first configure call since subsequent + # configure call will see the user value as the more recent value. The same logic must be applied to all cache values within this file! + # The FORCE keyword is required to ALWAYS lift the user provided/previously set value into a CACHE value. + set(VCPKG_TARGET_TRIPLET "${VCPKG_TARGET_TRIPLET}" CACHE STRING "Vcpkg target triplet (ex. x86-windows)" FORCE) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) + set(Z_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) + set(Z_VCPKG_TARGET_TRIPLET_ARCH x64) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]64$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm64) + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64) else() if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) + set(Z_VCPKG_TARGET_TRIPLET_ARCH x64) elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm) elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) + set(Z_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) + set(Z_VCPKG_TARGET_TRIPLET_ARCH x64) elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm) elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) + set(Z_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 16 2019$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) + set(Z_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 17 2022$") + set(Z_VCPKG_TARGET_TRIPLET_ARCH x64) else() - find_program(_VCPKG_CL cl) - if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(_VCPKG_CL MATCHES "arm/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(_VCPKG_CL MATCHES "arm64/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm64) - elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) + find_program(Z_VCPKG_CL cl) + if(Z_VCPKG_CL MATCHES "amd64/cl.exe$" OR Z_VCPKG_CL MATCHES "x64/cl.exe$") + set(Z_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(Z_VCPKG_CL MATCHES "arm/cl.exe$") + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(Z_VCPKG_CL MATCHES "arm64/cl.exe$") + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64) + elseif(Z_VCPKG_CL MATCHES "bin/cl.exe$" OR Z_VCPKG_CL MATCHES "x86/cl.exe$") + set(Z_VCPKG_TARGET_TRIPLET_ARCH x86) + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND DEFINED CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") + list(LENGTH CMAKE_OSX_ARCHITECTURES Z_VCPKG_OSX_ARCH_COUNT) + if(Z_VCPKG_OSX_ARCH_COUNT EQUAL 0) + message(WARNING "Unable to determine target architecture. " + "Consider providing a value for the CMAKE_OSX_ARCHITECTURES cache variable. " + "Continuing without vcpkg.") + set(VCPKG_TOOLCHAIN ON) + cmake_policy(POP) + return() + endif() + + if(Z_VCPKG_OSX_ARCH_COUNT GREATER 1) + message(WARNING "Detected more than one target architecture. Using the first one.") + endif() + list(GET CMAKE_OSX_ARCHITECTURES 0 Z_VCPKG_OSX_TARGET_ARCH) + if(Z_VCPKG_OSX_TARGET_ARCH STREQUAL "arm64") + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64) + elseif(Z_VCPKG_OSX_TARGET_ARCH STREQUAL "arm64s") + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64s) + elseif(Z_VCPKG_OSX_TARGET_ARCH STREQUAL "armv7s") + set(Z_VCPKG_TARGET_TRIPLET_ARCH armv7s) + elseif(Z_VCPKG_OSX_TARGET_ARCH STREQUAL "armv7") + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(Z_VCPKG_OSX_TARGET_ARCH STREQUAL "x86_64") + set(Z_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(Z_VCPKG_OSX_TARGET_ARCH STREQUAL "i386") + set(Z_VCPKG_TARGET_TRIPLET_ARCH x86) + else() + message(WARNING "Unable to determine target architecture, continuing without vcpkg.") + set(VCPKG_TOOLCHAIN ON) + cmake_policy(POP) + return() + endif() + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" OR + CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64" OR + CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "amd64") + set(Z_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "s390x") + set(Z_VCPKG_TARGET_TRIPLET_ARCH s390x) + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ppc64le") + set(Z_VCPKG_TARGET_TRIPLET_ARCH ppc64le) + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv7l") + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$") + set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64) else() - if( _CMAKE_IN_TRY_COMPILE ) + if(Z_VCPKG_CMAKE_IN_TRY_COMPILE) message(STATUS "Unable to determine target architecture, continuing without vcpkg.") else() message(WARNING "Unable to determine target architecture, continuing without vcpkg.") endif() set(VCPKG_TOOLCHAIN ON) + cmake_policy(POP) return() endif() endif() endif() if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") - set(_VCPKG_TARGET_TRIPLET_PLAT uwp) + set(Z_VCPKG_TARGET_TRIPLET_PLAT uwp) elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")) - set(_VCPKG_TARGET_TRIPLET_PLAT linux) + set(Z_VCPKG_TARGET_TRIPLET_PLAT linux) elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")) - set(_VCPKG_TARGET_TRIPLET_PLAT osx) + set(Z_VCPKG_TARGET_TRIPLET_PLAT osx) +elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(Z_VCPKG_TARGET_TRIPLET_PLAT ios) elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")) - set(_VCPKG_TARGET_TRIPLET_PLAT windows) + set(Z_VCPKG_TARGET_TRIPLET_PLAT windows) elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")) - set(_VCPKG_TARGET_TRIPLET_PLAT freebsd) + set(Z_VCPKG_TARGET_TRIPLET_PLAT freebsd) endif() -set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") -set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR}) +set(VCPKG_TARGET_TRIPLET "${Z_VCPKG_TARGET_TRIPLET_ARCH}-${Z_VCPKG_TARGET_TRIPLET_PLAT}" CACHE STRING "Vcpkg target triplet (ex. x86-windows)") +set(Z_VCPKG_TOOLCHAIN_DIR "${CMAKE_CURRENT_LIST_DIR}") -if(NOT DEFINED _VCPKG_ROOT_DIR) +if(NOT DEFINED Z_VCPKG_ROOT_DIR) # Detect .vcpkg-root to figure VCPKG_ROOT_DIR - set(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) - while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") - get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) - if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive - message(FATAL_ERROR "Could not find .vcpkg-root") + set(Z_VCPKG_ROOT_DIR_CANDIDATE "${CMAKE_CURRENT_LIST_DIR}") + while(IS_DIRECTORY "${Z_VCPKG_ROOT_DIR_CANDIDATE}" AND NOT EXISTS "${Z_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") + get_filename_component(Z_VCPKG_ROOT_DIR_TEMP "${Z_VCPKG_ROOT_DIR_CANDIDATE}" DIRECTORY) + if(Z_VCPKG_ROOT_DIR_TEMP STREQUAL Z_VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive else() - SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) + SET(Z_VCPKG_ROOT_DIR_CANDIDATE "${Z_VCPKG_ROOT_DIR_TEMP}") endif() endwhile() - set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE} CACHE INTERNAL "Vcpkg root directory") + set(Z_VCPKG_ROOT_DIR "${Z_VCPKG_ROOT_DIR_CANDIDATE}" CACHE INTERNAL "Vcpkg root directory") endif() -set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) -if(NOT EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" AND NOT _CMAKE_IN_TRY_COMPILE) - message(WARNING "There are no libraries installed for the Vcpkg triplet ${VCPKG_TARGET_TRIPLET}.") +if(NOT Z_VCPKG_ROOT_DIR) + z_vcpkg_add_fatal_error("Could not find .vcpkg-root") endif() -if(CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$" OR NOT DEFINED CMAKE_BUILD_TYPE) #Debug build: Put Debug paths before Release paths. - list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} - ) - list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link - ) - list(APPEND CMAKE_FIND_ROOT_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} - ) -else() #Release build: Put Release paths before Debug paths. Debug Paths are required so that CMake generates correct info in autogenerated target files. - list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug - ) - list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link - ) - list(APPEND CMAKE_FIND_ROOT_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug +if(DEFINED VCPKG_INSTALLED_DIR) + # do nothing +elseif(DEFINED _VCPKG_INSTALLED_DIR) + set(VCPKG_INSTALLED_DIR "${_VCPKG_INSTALLED_DIR}") +elseif(VCPKG_MANIFEST_MODE) + set(VCPKG_INSTALLED_DIR "${CMAKE_BINARY_DIR}/vcpkg_installed") +else() + set(VCPKG_INSTALLED_DIR "${Z_VCPKG_ROOT_DIR}/installed") +endif() + +set(VCPKG_INSTALLED_DIR "${VCPKG_INSTALLED_DIR}" + CACHE PATH + "The directory which contains the installed libraries for each triplet" FORCE) +set(_VCPKG_INSTALLED_DIR "${VCPKG_INSTALLED_DIR}" + CACHE PATH + "The directory which contains the installed libraries for each triplet" FORCE) + +function(z_vcpkg_add_vcpkg_to_cmake_path list suffix) + set(vcpkg_paths + "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}${suffix}" + "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug${suffix}" ) + if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$") + list(REVERSE vcpkg_paths) # Debug build: Put Debug paths before Release paths. + endif() + if(VCPKG_PREFER_SYSTEM_LIBS) + list(APPEND "${list}" "${vcpkg_paths}") + else() + list(INSERT "${list}" 0 "${vcpkg_paths}") # CMake 3.15 is required for list(PREPEND ...). + endif() + set("${list}" "${${list}}" PARENT_SCOPE) +endfunction() +z_vcpkg_add_vcpkg_to_cmake_path(CMAKE_PREFIX_PATH "") +z_vcpkg_add_vcpkg_to_cmake_path(CMAKE_LIBRARY_PATH "/lib/manual-link") +z_vcpkg_add_vcpkg_to_cmake_path(CMAKE_FIND_ROOT_PATH "") + +# If one CMAKE_FIND_ROOT_PATH_MODE_* variables is set to ONLY, to make sure that ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} +# and ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug are searched, it is not sufficient to just add them to CMAKE_FIND_ROOT_PATH, +# as CMAKE_FIND_ROOT_PATH specify "one or more directories to be prepended to all other search directories", so to make sure that +# the libraries are searched as they are, it is necessary to add "/" to the CMAKE_PREFIX_PATH +if(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE STREQUAL "ONLY" OR + CMAKE_FIND_ROOT_PATH_MODE_LIBRARY STREQUAL "ONLY" OR + CMAKE_FIND_ROOT_PATH_MODE_PACKAGE STREQUAL "ONLY") + list(APPEND CMAKE_PREFIX_PATH "/") endif() -file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) -set(_PROGRAMFILESX86 "PROGRAMFILES(x86)") -file(TO_CMAKE_PATH "$ENV{${_PROGRAMFILESX86}}" _programfiles_x86) -set(CMAKE_SYSTEM_IGNORE_PATH - "${_programfiles}/OpenSSL" - "${_programfiles}/OpenSSL-Win32" - "${_programfiles}/OpenSSL-Win64" - "${_programfiles}/OpenSSL-Win32/lib/VC" - "${_programfiles}/OpenSSL-Win64/lib/VC" - "${_programfiles}/OpenSSL-Win32/lib/VC/static" - "${_programfiles}/OpenSSL-Win64/lib/VC/static" - "${_programfiles_x86}/OpenSSL" - "${_programfiles_x86}/OpenSSL-Win32" - "${_programfiles_x86}/OpenSSL-Win64" - "${_programfiles_x86}/OpenSSL-Win32/lib/VC" - "${_programfiles_x86}/OpenSSL-Win64/lib/VC" - "${_programfiles_x86}/OpenSSL-Win32/lib/VC/static" - "${_programfiles_x86}/OpenSSL-Win64/lib/VC/static" - "C:/OpenSSL/" - "C:/OpenSSL-Win32/" - "C:/OpenSSL-Win64/" - "C:/OpenSSL-Win32/lib/VC" - "C:/OpenSSL-Win64/lib/VC" - "C:/OpenSSL-Win32/lib/VC/static" - "C:/OpenSSL-Win64/lib/VC/static" -) - -list(APPEND CMAKE_PROGRAM_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) -file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) -foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) - if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) - list(APPEND CMAKE_PROGRAM_PATH ${_VCPKG_TOOLS_DIR}) +set(VCPKG_CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}") + +# CMAKE_EXECUTABLE_SUFFIX is not yet defined +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(Z_VCPKG_EXECUTABLE "${Z_VCPKG_ROOT_DIR}/vcpkg.exe") + set(Z_VCPKG_BOOTSTRAP_SCRIPT "${Z_VCPKG_ROOT_DIR}/bootstrap-vcpkg.bat") +else() + set(Z_VCPKG_EXECUTABLE "${Z_VCPKG_ROOT_DIR}/vcpkg") + set(Z_VCPKG_BOOTSTRAP_SCRIPT "${Z_VCPKG_ROOT_DIR}/bootstrap-vcpkg.sh") +endif() + +if(VCPKG_MANIFEST_MODE AND VCPKG_MANIFEST_INSTALL AND NOT Z_VCPKG_CMAKE_IN_TRY_COMPILE AND NOT Z_VCPKG_HAS_FATAL_ERROR) + if(NOT EXISTS "${Z_VCPKG_EXECUTABLE}" AND NOT Z_VCPKG_HAS_FATAL_ERROR) + message(STATUS "Bootstrapping vcpkg before install") + + file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/vcpkg-bootstrap.log" Z_VCPKG_BOOTSTRAP_LOG) + execute_process( + COMMAND "${Z_VCPKG_BOOTSTRAP_SCRIPT}" ${VCPKG_BOOTSTRAP_OPTIONS} + OUTPUT_FILE "${Z_VCPKG_BOOTSTRAP_LOG}" + ERROR_FILE "${Z_VCPKG_BOOTSTRAP_LOG}" + RESULT_VARIABLE Z_VCPKG_BOOTSTRAP_RESULT) + + if(Z_VCPKG_BOOTSTRAP_RESULT EQUAL 0) + message(STATUS "Bootstrapping vcpkg before install - done") + else() + message(STATUS "Bootstrapping vcpkg before install - failed") + z_vcpkg_add_fatal_error("vcpkg install failed. See logs for more information: ${Z_VCPKG_BOOTSTRAP_LOG}") + endif() + endif() + + if(NOT Z_VCPKG_HAS_FATAL_ERROR) + message(STATUS "Running vcpkg install") + + set(Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS) + + if(DEFINED VCPKG_HOST_TRIPLET AND NOT VCPKG_HOST_TRIPLET STREQUAL "") + list(APPEND Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS "--host-triplet=${VCPKG_HOST_TRIPLET}") + endif() + + if(VCPKG_OVERLAY_PORTS) + foreach(Z_VCPKG_OVERLAY_PORT IN LISTS VCPKG_OVERLAY_PORTS) + list(APPEND Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS "--overlay-ports=${Z_VCPKG_OVERLAY_PORT}") + endforeach() + endif() + if(VCPKG_OVERLAY_TRIPLETS) + foreach(Z_VCPKG_OVERLAY_TRIPLET IN LISTS VCPKG_OVERLAY_TRIPLETS) + list(APPEND Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS "--overlay-triplets=${Z_VCPKG_OVERLAY_TRIPLET}") + endforeach() + endif() + + if(DEFINED VCPKG_FEATURE_FLAGS OR DEFINED CACHE{VCPKG_FEATURE_FLAGS}) + list(JOIN VCPKG_FEATURE_FLAGS "," Z_VCPKG_FEATURE_FLAGS) + set(Z_VCPKG_FEATURE_FLAGS "--feature-flags=${Z_VCPKG_FEATURE_FLAGS}") + endif() + + foreach(Z_VCPKG_FEATURE IN LISTS VCPKG_MANIFEST_FEATURES) + list(APPEND Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS "--x-feature=${Z_VCPKG_FEATURE}") + endforeach() + + if(VCPKG_MANIFEST_NO_DEFAULT_FEATURES) + list(APPEND Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS "--x-no-default-features") + endif() + + if(NOT CMAKE_VERSION VERSION_LESS "3.18") # == GREATER_EQUAL, but that was added in CMake 3.7 + set(Z_VCPKG_MANIFEST_INSTALL_ECHO_PARAMS ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE) + else() + set(Z_VCPKG_MANIFEST_INSTALL_ECHO_PARAMS) + endif() + + execute_process( + COMMAND "${Z_VCPKG_EXECUTABLE}" install + --triplet "${VCPKG_TARGET_TRIPLET}" + --vcpkg-root "${Z_VCPKG_ROOT_DIR}" + "--x-wait-for-lock" + "--x-manifest-root=${VCPKG_MANIFEST_DIR}" + "--x-install-root=${_VCPKG_INSTALLED_DIR}" + "${Z_VCPKG_FEATURE_FLAGS}" + ${Z_VCPKG_ADDITIONAL_MANIFEST_PARAMS} + ${VCPKG_INSTALL_OPTIONS} + OUTPUT_VARIABLE Z_VCPKG_MANIFEST_INSTALL_LOGTEXT + ERROR_VARIABLE Z_VCPKG_MANIFEST_INSTALL_LOGTEXT + RESULT_VARIABLE Z_VCPKG_MANIFEST_INSTALL_RESULT + ${Z_VCPKG_MANIFEST_INSTALL_ECHO_PARAMS} + ) + + file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/vcpkg-manifest-install.log" Z_VCPKG_MANIFEST_INSTALL_LOGFILE) + file(WRITE "${Z_VCPKG_MANIFEST_INSTALL_LOGFILE}" "${Z_VCPKG_MANIFEST_INSTALL_LOGTEXT}") + + if(Z_VCPKG_MANIFEST_INSTALL_RESULT EQUAL 0) + message(STATUS "Running vcpkg install - done") + + # file(TOUCH) added in CMake 3.12 + file(WRITE "${_VCPKG_INSTALLED_DIR}/.cmakestamp" "") + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS + "${VCPKG_MANIFEST_DIR}/vcpkg.json" + "${_VCPKG_INSTALLED_DIR}/.cmakestamp") + if(EXISTS "${VCPKG_MANIFEST_DIR}/vcpkg-configuration.json") + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS + "${VCPKG_MANIFEST_DIR}/vcpkg-configuration.json") + endif() + else() + message(STATUS "Running vcpkg install - failed") + z_vcpkg_add_fatal_error("vcpkg install failed. See logs for more information: ${Z_VCPKG_MANIFEST_INSTALL_LOGFILE}") + endif() + endif() +endif() + +list(APPEND CMAKE_PROGRAM_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools") +file(GLOB Z_VCPKG_TOOLS_DIRS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*") +foreach(Z_VCPKG_TOOLS_DIR IN LISTS Z_VCPKG_TOOLS_DIRS) + if(IS_DIRECTORY "${Z_VCPKG_TOOLS_DIR}") + list(APPEND CMAKE_PROGRAM_PATH "${Z_VCPKG_TOOLS_DIR}") endif() endforeach() -option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) -function(add_executable name) - _add_executable(${ARGV}) +function(add_executable) + z_vcpkg_function_arguments(ARGS) + _add_executable(${ARGS}) + set(target_name "${ARGV0}") + list(FIND ARGV "IMPORTED" IMPORTED_IDX) list(FIND ARGV "ALIAS" ALIAS_IDX) list(FIND ARGV "MACOSX_BUNDLE" MACOSX_BUNDLE_IDX) if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) if(VCPKG_APPLOCAL_DEPS) - if(_VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") - add_custom_command(TARGET ${name} POST_BUILD - COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 - -targetBinary $ + if(Z_VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") + z_vcpkg_set_powershell_path() + set(EXTRA_OPTIONS "") + if(X_VCPKG_APPLOCAL_DEPS_SERIALIZED) + set(EXTRA_OPTIONS USES_TERMINAL) + endif() + add_custom_command(TARGET "${target_name}" POST_BUILD + COMMAND "${Z_VCPKG_POWERSHELL_PATH}" -noprofile -executionpolicy Bypass -file "${Z_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1" + -targetBinary "$" -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" -OutVariable out + ${EXTRA_OPTIONS} ) - elseif(_VCPKG_TARGET_TRIPLET_PLAT MATCHES "osx") - if (NOT MACOSX_BUNDLE_IDX EQUAL -1) - add_custom_command(TARGET ${name} POST_BUILD - COMMAND python ${_VCPKG_TOOLCHAIN_DIR}/osx/applocal.py - $ + elseif(Z_VCPKG_TARGET_TRIPLET_PLAT MATCHES "osx") + if(NOT MACOSX_BUNDLE_IDX EQUAL -1) + add_custom_command(TARGET "${target_name}" POST_BUILD + COMMAND python "${Z_VCPKG_TOOLCHAIN_DIR}/osx/applocal.py" + "$" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>" ) endif() endif() endif() - set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) - set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + set_target_properties("${target_name}" PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties("${target_name}" PROPERTIES VS_GLOBAL_VcpkgEnabled false) endif() endfunction() -function(add_library name) - _add_library(${ARGV}) - list(FIND ARGV "IMPORTED" IMPORTED_IDX) - list(FIND ARGV "INTERFACE" INTERFACE_IDX) - list(FIND ARGV "ALIAS" ALIAS_IDX) +function(add_library) + z_vcpkg_function_arguments(ARGS) + _add_library(${ARGS}) + set(target_name "${ARGV0}") + + list(FIND ARGS "IMPORTED" IMPORTED_IDX) + list(FIND ARGS "INTERFACE" INTERFACE_IDX) + list(FIND ARGS "ALIAS" ALIAS_IDX) if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - get_target_property(IS_LIBRARY_SHARED ${name} TYPE) - if(VCPKG_APPLOCAL_DEPS AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp" AND (IS_LIBRARY_SHARED STREQUAL "SHARED_LIBRARY" OR IS_LIBRARY_SHARED STREQUAL "MODULE_LIBRARY")) - add_custom_command(TARGET ${name} POST_BUILD - COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 - -targetBinary $ + get_target_property(IS_LIBRARY_SHARED "${target_name}" TYPE) + if(VCPKG_APPLOCAL_DEPS AND Z_VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp" AND (IS_LIBRARY_SHARED STREQUAL "SHARED_LIBRARY" OR IS_LIBRARY_SHARED STREQUAL "MODULE_LIBRARY")) + z_vcpkg_set_powershell_path() + add_custom_command(TARGET "${target_name}" POST_BUILD + COMMAND "${Z_VCPKG_POWERSHELL_PATH}" -noprofile -executionpolicy Bypass -file "${Z_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1" + -targetBinary "$" -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" -OutVariable out ) endif() - set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) - set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + set_target_properties("${target_name}" PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties("${target_name}" PROPERTIES VS_GLOBAL_VcpkgEnabled false) + endif() +endfunction() + +# This is an experimental function to enable applocal install of dependencies as part of the `make install` process +# Arguments: +# TARGETS - a list of installed targets to have dependencies copied for +# DESTINATION - the runtime directory for those targets (usually `bin`) +# COMPONENT - the component this install command belongs to (optional) +# +# Note that this function requires CMake 3.14 for policy CMP0087 +function(x_vcpkg_install_local_dependencies) + if(CMAKE_VERSION VERSION_LESS "3.14") + message(FATAL_ERROR "x_vcpkg_install_local_dependencies and X_VCPKG_APPLOCAL_DEPS_INSTALL require at least CMake 3.14 +(current version: ${CMAKE_VERSION})" + ) + endif() + + cmake_parse_arguments(PARSE_ARGV 0 arg + "" + "DESTINATION;COMPONENT" + "TARGETS" + ) + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT DEFINED arg_DESTINATION) + message(FATAL_ERROR "DESTINATION must be specified") + endif() + + if(Z_VCPKG_TARGET_TRIPLET_PLAT MATCHES "^(windows|uwp)$") + # Install CODE|SCRIPT allow the use of generator expressions + cmake_policy(SET CMP0087 NEW) + + z_vcpkg_set_powershell_path() + if(NOT IS_ABSOLUTE "${arg_DESTINATION}") + set(arg_DESTINATION "\${CMAKE_INSTALL_PREFIX}/${arg_DESTINATION}") + endif() + + set(component_param "") + if(DEFINED arg_COMPONENT) + set(component_param COMPONENT "${arg_COMPONENT}") + endif() + + foreach(target IN LISTS arg_TARGETS) + get_target_property(target_type "${target}" TYPE) + if(NOT target_type STREQUAL "INTERFACE_LIBRARY") + install(CODE "message(\"-- Installing app dependencies for ${target}...\") + execute_process(COMMAND \"${Z_VCPKG_POWERSHELL_PATH}\" -noprofile -executionpolicy Bypass -file \"${Z_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1\" + -targetBinary \"${arg_DESTINATION}/$\" + -installedDir \"${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin\" + -OutVariable out)" + ${component_param} + ) + endif() + endforeach() endif() endfunction() -macro(find_package name) - string(TOLOWER "${name}" _vcpkg_lowercase_name) - if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake") - set(ARGS "${ARGV}") - include(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake) - elseif("${name}" STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost") +if(X_VCPKG_APPLOCAL_DEPS_INSTALL) + function(install) + z_vcpkg_function_arguments(ARGS) + _install(${ARGS}) + + if(ARGV0 STREQUAL "TARGETS") + # Will contain the list of targets + set(parsed_targets "") + + # Destination - [RUNTIME] DESTINATION argument overrides this + set(destination "bin") + + set(component_param "") + + # Parse arguments given to the install function to find targets and (runtime) destination + set(modifier "") # Modifier for the command in the argument + set(last_command "") # Last command we found to process + foreach(arg IN LISTS ARGS) + if(arg MATCHES "^(ARCHIVE|LIBRARY|RUNTIME|OBJECTS|FRAMEWORK|BUNDLE|PRIVATE_HEADER|PUBLIC_HEADER|RESOURCE|INCLUDES)$") + set(modifier "${arg}") + continue() + endif() + if(arg MATCHES "^(TARGETS|DESTINATION|PERMISSIONS|CONFIGURATIONS|COMPONENT|NAMELINK_COMPONENT|OPTIONAL|EXCLUDE_FROM_ALL|NAMELINK_ONLY|NAMELINK_SKIP|EXPORT)$") + set(last_command "${arg}") + continue() + endif() + + if(last_command STREQUAL "TARGETS") + list(APPEND parsed_targets "${arg}") + endif() + + if(last_command STREQUAL "DESTINATION" AND (modifier STREQUAL "" OR modifier STREQUAL "RUNTIME")) + set(destination "${arg}") + endif() + if(last_command STREQUAL "COMPONENT") + set(component_param "COMPONENT" "${arg}") + endif() + endforeach() + + x_vcpkg_install_local_dependencies( + TARGETS ${parsed_targets} + DESTINATION "${destination}" + ${component_param} + ) + endif() + endfunction() +endif() + +if(NOT DEFINED VCPKG_OVERRIDE_FIND_PACKAGE_NAME) + set(VCPKG_OVERRIDE_FIND_PACKAGE_NAME find_package) +endif() +# NOTE: this is not a function, which means that arguments _are not_ perfectly forwarded +# this is fine for `find_package`, since there are no usecases for `;` in arguments, +# so perfect forwarding is not important +macro("${VCPKG_OVERRIDE_FIND_PACKAGE_NAME}" z_vcpkg_find_package_package_name) + set(z_vcpkg_find_package_package_name "${z_vcpkg_find_package_package_name}") + set(z_vcpkg_find_package_ARGN "${ARGN}") + set(z_vcpkg_find_package_backup_vars) + + # Workaround to set the ROOT_PATH until upstream CMake stops overriding + # the ROOT_PATH at apple OS initialization phase. + # See https://gitlab.kitware.com/cmake/cmake/merge_requests/3273 + # Fixed in CMake 3.15 + if(CMAKE_SYSTEM_NAME STREQUAL iOS) + list(APPEND z_vcpkg_find_package_backup_vars "CMAKE_FIND_ROOT_PATH") + if(DEFINED CMAKE_FIND_ROOT_PATH) + set(z_vcpkg_find_package_backup_CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}") + else() + set(z_vcpkg_find_package_backup_CMAKE_FIND_ROOT_PATH) + endif() + + list(APPEND CMAKE_FIND_ROOT_PATH "${VCPKG_CMAKE_FIND_ROOT_PATH}") + endif() + string(TOLOWER "${z_vcpkg_find_package_package_name}" z_vcpkg_find_package_lowercase_package_name) + + set(z_vcpkg_find_package_vcpkg_cmake_wrapper_path + "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${z_vcpkg_find_package_lowercase_package_name}/vcpkg-cmake-wrapper.cmake") + + if(EXISTS "${z_vcpkg_find_package_vcpkg_cmake_wrapper_path}") + list(APPEND z_vcpkg_find_package_backup_vars "ARGS") + if(DEFINED ARGS) + set(z_vcpkg_find_package_backup_ARGS "${ARGS}") + else() + set(z_vcpkg_find_package_backup_ARGS) + endif() + + set(ARGS "${z_vcpkg_find_package_package_name};${z_vcpkg_find_package_ARGN}") + include("${z_vcpkg_find_package_vcpkg_cmake_wrapper_path}") + elseif(z_vcpkg_find_package_package_name STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost") # Checking for the boost headers disables this wrapper unless the user has installed at least one boost library + # these intentionally are not backed up set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) - unset(Boost_USE_STATIC_RUNTIME) set(Boost_NO_BOOST_CMAKE ON) + set(Boost_USE_STATIC_RUNTIME) unset(Boost_USE_STATIC_RUNTIME CACHE) - set(Boost_COMPILER "-vc140") - _find_package(${ARGV}) - elseif("${name}" STREQUAL "ICU" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/unicode/utf.h") - function(_vcpkg_find_in_list) - list(FIND ARGV "COMPONENTS" COMPONENTS_IDX) - set(COMPONENTS_IDX ${COMPONENTS_IDX} PARENT_SCOPE) - endfunction() - _vcpkg_find_in_list(${ARGV}) - if(NOT COMPONENTS_IDX EQUAL -1) - _find_package(${ARGV} COMPONENTS data) + if(CMAKE_VS_PLATFORM_TOOLSET STREQUAL "v120") + set(Boost_COMPILER "-vc120") + else() + set(Boost_COMPILER "-vc140") + endif() + _find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN}) + elseif(z_vcpkg_find_package_package_name STREQUAL "ICU" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/unicode/utf.h") + list(FIND z_vcpkg_find_package_ARGN "COMPONENTS" z_vcpkg_find_package_COMPONENTS_IDX) + if(NOT z_vcpkg_find_package_COMPONENTS_IDX EQUAL -1) + _find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN} COMPONENTS data) else() - _find_package(${ARGV}) + _find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN}) endif() - elseif("${name}" STREQUAL "GSL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/gsl") - _find_package(${ARGV}) + elseif(z_vcpkg_find_package_package_name STREQUAL "GSL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/gsl") + _find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN}) if(GSL_FOUND AND TARGET GSL::gsl) set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Release ) set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Release ) if( EXISTS "${GSL_LIBRARY_DEBUG}" AND EXISTS "${GSL_CBLAS_LIBRARY_DEBUG}") - set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) - set_target_properties( GSL::gsl PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_LIBRARY_DEBUG}" ) + set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( GSL::gsl PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_LIBRARY_DEBUG}" ) set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) set_target_properties( GSL::gslcblas PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG}" ) endif() endif() - elseif("${name}" STREQUAL "CURL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/curl") - _find_package(${ARGV}) + elseif("${z_vcpkg_find_package_package_name}" STREQUAL "CURL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/curl") + _find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN}) if(CURL_FOUND) if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") list(APPEND CURL_LIBRARIES @@ -250,27 +780,53 @@ macro(find_package name) "optimized" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") endif() endif() - elseif("${_vcpkg_lowercase_name}" STREQUAL "grpc" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/grpc") - _find_package(gRPC ${ARGN}) + elseif("${z_vcpkg_find_package_lowercase_package_name}" STREQUAL "grpc" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/grpc") + _find_package(gRPC ${z_vcpkg_find_package_ARGN}) else() - _find_package(${ARGV}) + _find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN}) endif() + + foreach(z_vcpkg_find_package_backup_var IN LISTS z_vcpkg_find_package_backup_vars) + if(DEFINED z_vcpkg_find_package_backup_${z_vcpkg_find_package_backup_var}) + set("${z_vcpkg_find_package_backup_var}" "${z_vcpkg_find_package_backup_${z_vcpkg_find_package_backup_var}}") + else() + set("${z_vcpkg_find_package_backup_var}") + endif() + endforeach() endmacro() set(VCPKG_TOOLCHAIN ON) -set(_UNUSED ${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}) -set(_UNUSED ${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}) -set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}) -set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}) -set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}) - -if(NOT _CMAKE_IN_TRY_COMPILE) - file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file) - file(TO_CMAKE_PATH "${_VCPKG_ROOT_DIR}" _root_dir) - file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake" - "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n" - "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n" - "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n" - "set(_VCPKG_ROOT_DIR \"${_root_dir}\" CACHE STRING \"\")\n" +set(Z_VCPKG_UNUSED "${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}") +set(Z_VCPKG_UNUSED "${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}") +set(Z_VCPKG_UNUSED "${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}") +set(Z_VCPKG_UNUSED "${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}") +set(Z_VCPKG_UNUSED "${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}") + +# Propogate these values to try-compile configurations so the triplet and toolchain load +if(NOT Z_VCPKG_CMAKE_IN_TRY_COMPILE) + if(Z_VCPKG_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES) + file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" Z_VCPKG_CHAINLOAD_FILE_CMAKE) + file(TO_CMAKE_PATH "${Z_VCPKG_ROOT_DIR}" Z_VCPKG_ROOT_DIR_CMAKE) + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake" + "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n" + "set(VCPKG_TARGET_ARCHITECTURE \"${VCPKG_TARGET_ARCHITECTURE}\" CACHE STRING \"\")\n" + "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n" + "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${Z_VCPKG_CHAINLOAD_FILE_CMAKE}\" CACHE STRING \"\")\n" + "set(Z_VCPKG_ROOT_DIR \"${Z_VCPKG_ROOT_DIR_CMAKE}\" CACHE STRING \"\")\n" ) + else() + list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES + VCPKG_TARGET_TRIPLET + VCPKG_TARGET_ARCHITECTURE + VCPKG_APPLOCAL_DEPS + VCPKG_CHAINLOAD_TOOLCHAIN_FILE + Z_VCPKG_ROOT_DIR + ) + endif() endif() + +if(Z_VCPKG_HAS_FATAL_ERROR) + message(FATAL_ERROR "${Z_VCPKG_FATAL_ERROR}") +endif() + +cmake_policy(POP) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt new file mode 100644 index 00000000000000..9793facf03aa55 --- /dev/null +++ b/scripts/ci.baseline.txt @@ -0,0 +1,1749 @@ +########################################################################### +## This file defines the current expected build state of ports in CI. +## +## States +## pass - (default) the port builds in the CI system. If a port is +## missing from this file then it is assumed to build. +## fail - the port does not build in the CI system. +## This is not necessarily the same as if a port is expected to build +## on a developers machine because it may fail due to the machine +## configuration. When set to fail the CI system will still attempt +## to build the port and will report a CI failure until this file is updated. +## skip - Do not build this port in the CI system. +## This is added to ports that may be flaky or conflict with other +## ports. Please comment for why a port is skipped so it can be +## removed when the issue is resolved. +## +## +## CI tested triplets: +## arm64-windows +## arm-uwp +## x64-linux +## x64-osx +## x64-uwp +## x64-windows +## x64-windows-static +## x64-windows-static-md +## x86-windows +## + +# Add new items alphabetically + +# script ports +#vcpkg-cmake:arm64-windows=fail +#vcpkg-cmake:arm-uwp=fail +#vcpkg-cmake:x64-uwp=fail +#vcpkg-cmake:x64-windows-static=fail +#vcpkg-cmake:x64-windows-static-md=fail +#vcpkg-cmake:x86-windows=fail + +#vcpkg-cmake-config:arm64-windows=fail +#vcpkg-cmake-config:arm-uwp=fail +#vcpkg-cmake-config:x64-uwp=fail +#vcpkg-cmake-config:x64-windows-static=fail +#vcpkg-cmake-config:x64-windows-static-md=fail +#vcpkg-cmake-config:x86-windows=fail + +# other ports +# Cross compiling CI machine cannot run gen_test_char to generate apr_escape_test_char.h +apr:arm64-windows=fail +# Requires ATL for ARM64 to be installed in CI +azure-storage-cpp:arm64-windows=fail + +aubio:arm-uwp=fail +aubio:x64-uwp=fail +# broken when `python` is python3, https://github.com/microsoft/vcpkg/issues/18937 +bde:x64-linux=fail +bitserializer:x64-osx=fail +bitserializer:arm64-windows=fail +bitserializer:arm-uwp=fail +blend2d:arm64-windows=fail +blend2d:arm-uwp=fail +blend2d:x64-uwp=fail +blitz:x64-uwp=fail +blitz:arm64-windows=fail +blitz:arm-uwp=fail +blosc:arm64-windows=fail +blosc:arm-uwp=fail +blosc:x64-uwp=fail +bond:arm-uwp=fail +bond:x64-osx=fail +bond:x64-uwp=fail +botan:x64-uwp=fail +breakpad:arm64-windows=fail +bullet3:arm64-windows=fail +bullet3:arm-uwp=fail +bullet3:x64-uwp=fail +caf:arm-uwp=fail +caf:x64-uwp=fail +caffe2:x86-windows=fail +caffe2:arm64-windows=fail +# Requires VM update for gtk-doc +cairo:x64-osx=fail +c-ares:arm-uwp=fail +c-ares:x64-uwp=fail +cartographer:x64-osx=fail +casclib:arm-uwp=fail +casclib:x64-uwp=fail +catch-classic:arm64-windows = skip +catch-classic:arm-uwp = skip +catch-classic:x64-linux = skip +catch-classic:x64-osx = skip +catch-classic:x64-uwp = skip +catch-classic:x64-windows = skip +catch-classic:x64-windows-static = skip +catch-classic:x64-windows-static-md=skip +catch-classic:x86-windows = skip +ccd:arm-uwp=fail +ccd:x64-uwp=fail +cctag:x64-windows-static-md=fail +cello:arm-uwp=fail +cello:x64-uwp=fail +cfitsio:arm-uwp=fail +cfitsio:x64-uwp=fail +cgicc:arm-uwp=fail +cgicc:x64-uwp=fail +chakracore:x64-linux=skip +# DCMTK currently has a vendored copy of libcharls.a, which causes conflicts with charls (TODO: use charls' copy) +charls:arm64-windows=skip +charls:arm-uwp=skip +charls:x64-linux=skip +charls:x64-osx=skip +charls:x64-uwp=skip +charls:x64-windows=skip +charls:x64-windows-static=skip +charls:x64-windows-static-md=skip +charls:x86-windows=skip +# chartdir does not offer stable download URLs +chartdir:arm64-windows=fail +chartdir:arm-uwp=fail +chartdir:x64-uwp=fail +chartdir:x64-windows-static=fail +chartdir:x86-windows=fail +chartdir:x64-windows=fail +chartdir:x64-windows-static-md=fail +chartdir:x64-osx=fail +chmlib:arm-uwp=fail +chmlib:x64-uwp=fail +# Chromium Base requires a recent version of Clang to be installed. +chromium-base:x64-linux=skip +civetweb:arm64-windows = skip +civetweb:arm-uwp = skip +civetweb:x64-uwp = skip +clamav:arm64-windows=fail +clblas:arm64-windows=fail +clblast:x64-linux=fail +clblast:x64-windows-static=fail +clblast:x64-windows-static-md=fail +clockutils:x64-linux=fail +clockutils:x64-osx=fail +cmcstl2:arm64-windows = skip +cmcstl2:arm-uwp = skip +cmcstl2:x64-linux = skip +cmcstl2:x64-osx = skip +cmcstl2:x64-uwp = skip +cmcstl2:x64-windows = skip +cmcstl2:x64-windows-static = skip +cmcstl2:x64-windows-static-md=skip +cmcstl2:x86-windows = skip +coin:arm64-windows=fail +coin:arm-uwp=fail +coin:x64-uwp=fail +colmap:x64-windows-static=fail +concurrencpp:x64-linux=fail +concurrencpp:x64-osx=fail +constexpr-contracts:x64-linux=fail +coolprop:arm-uwp=fail +coolprop:x64-osx=fail +coolprop:x64-uwp=fail +coroutine:arm-uwp=fail +coroutine:x64-linux=fail +coroutine:x64-uwp=fail +corrade:arm-uwp=fail +corrade:x64-uwp=fail +cppcms:x64-linux=fail +cppcms:x64-osx=fail +cppcms:x64-windows-static=fail +cppfs:arm-uwp=fail +cppfs:x64-uwp=fail +cppmicroservices:arm64-windows=fail +cppmicroservices:arm-uwp=fail +cppmicroservices:x64-uwp=fail +cpp-netlib:arm-uwp=fail +cpp-netlib:x64-uwp=fail +cppcoro:x64-linux=fail +cppcoro:arm-uwp=fail +cppcoro:x64-uwp=fail +cpuinfo:arm64-windows=fail +crashpad:arm64-windows=fail +crashpad:arm-uwp=fail +crashpad:x64-linux=fail +crashpad:x64-uwp=fail +crashpad:x86-windows=fail +crossguid:x64-osx=fail +ctemplate:arm64-windows=fail +ctemplate:arm-uwp=fail +ctemplate:x64-linux=fail +ctemplate:x64-osx=fail +cuda:x64-osx=fail +cudnn:arm64-windows=fail +cudnn:arm-uwp=fail +cudnn:x64-uwp=fail +cudnn:x64-windows-static=fail +cudnn:x86-windows=fail +# Since pipeline cannot automatically install dbghelp dependency, skip this detection +dbghelp:arm-uwp=skip +dbghelp:arm64-windows=skip +dbghelp:x64-linux=fail +dbghelp:x64-osx=fail +dbghelp:x64-uwp=skip +dbghelp:x64-windows-static=skip +dbghelp:x64-windows-static-md=skip +dbghelp:x64-windows=skip +dbghelp:x86-windows=skip +dcmtk:arm-uwp=fail +dcmtk:arm64-windows=fail +dcmtk:x64-uwp=fail +detours:x64-linux=fail +detours:x64-osx=fail +devicenameresolver:arm-uwp=fail +devicenameresolver:x64-linux=fail +devicenameresolver:x64-osx=fail +devicenameresolver:x64-uwp=fail +devicenameresolver:x64-windows-static=fail +dimcli:arm-uwp=fail +dimcli:x64-osx=fail +dimcli:x64-uwp=fail +discord-game-sdk:x64-windows-static=fail +discord-game-sdk:x64-windows-static-md=fail +discord-rpc:arm-uwp=fail +discord-rpc:x64-uwp=fail +dlfcn-win32:arm-uwp=fail +dlfcn-win32:x64-linux=fail +dlfcn-win32:x64-osx=fail +dlfcn-win32:x64-uwp=fail +dmlc:arm-uwp=fail +dmlc:x64-uwp=fail +dpdk:arm-uwp=fail +dpdk:arm64-windows=fail +dpdk:x64-linux=fail +dpdk:x64-osx=fail +dpdk:x64-uwp=fail +dpdk:x64-windows-static=fail +dpdk:x64-windows-static-md=fail +dpdk:x64-windows=fail +dpdk:x86-windows=fail +duckx:arm64-windows = skip +duckx:arm-uwp = skip +duckx:x64-linux = skip +duckx:x64-osx = skip +duckx:x64-uwp = skip +duckx:x64-windows = skip +duckx:x64-windows-static = skip +duckx:x64-windows-static-md=skip +duckx:x86-windows = skip +duilib:arm-uwp=fail +duilib:x64-linux=fail +duilib:x64-osx=fail +duilib:x64-uwp=fail + +# requires python@2 from brew, but that no longer exists +# python2 EOL yay! +duktape:x64-osx=skip + +eastl:arm-uwp=fail +easyloggingpp:arm-uwp=fail +easyloggingpp:x64-uwp=fail +eathread:arm64-windows=fail +eathread:arm-uwp=fail +eathread:x64-uwp=fail +eathread:x86-windows=fail +ebml:arm-uwp=fail +ebml:x64-uwp=fail +ecsutil:arm64-windows=fail +ecsutil:arm-uwp=fail +ecsutil:x64-linux=fail +ecsutil:x64-osx=fail +ecsutil:x64-uwp=fail +# Checks for gnu extension so only works with gcc. +elfutils:x64-osx=fail +# embree creates common conflicting static library names when built in static mode, reported upstream: +# https://github.com/embree/embree/issues/331 +embree2:x64-windows-static=skip +embree2:x64-windows-static-md=skip +enet:arm-uwp=fail +enet:x64-uwp=fail +epsilon:arm-uwp=fail +epsilon:x64-linux=fail +epsilon:x64-osx=fail +epsilon:x64-uwp=fail +epsilon:x64-windows-static=fail +faad2:x64-linux=fail +faad2:x64-osx=fail +fann:x64-windows-static=fail +farmhash:arm64-windows=fail +farmhash:arm-uwp=fail +farmhash:x64-uwp=fail +farmhash:x64-windows=fail +farmhash:x64-windows-static=fail +farmhash:x64-windows-static-md=fail +farmhash:x86-windows=fail +fastrtps:arm-uwp=fail +fastrtps:x64-uwp=fail +fastrtps:x64-windows-static=fail +fastrtps:x64-windows-static-md=fail +fdlibm:arm-uwp=fail +fdlibm:x64-uwp=fail +fftw3:arm-uwp=fail +fftw3:x64-uwp=fail +flint:x64-linux=fail +flint:x64-osx=fail +fltk:arm-uwp=fail +fltk:x64-uwp=fail +fluidsynth:x64-osx=fail +fluidsynth:x64-windows-static-md=fail +# fluidlite conflicts with fluidsynth; we test fluidsynth rather than fluidlite because +# fluidlite has no dependencies and thus is less likely to be broken by another package. +fluidlite:arm-uwp=skip +fluidlite:arm64-windows=skip +fluidlite:x64-linux=skip +fluidlite:x64-osx=skip +fluidlite:x64-uwp=skip +fluidlite:x64-windows-static=skip +fluidlite:x64-windows-static-md=skip +fluidlite:x64-windows=skip +fluidlite:x86-windows=skip +fmem:arm-uwp=fail +fmem:x64-uwp=fail +fmi4cpp:arm-uwp=fail +fmi4cpp:x64-uwp=fail +fmilib:arm64-windows=fail +fmilib:arm-uwp=fail +fmilib:x64-linux=fail +fmilib:x64-uwp=fail +fontconfig:x64-uwp=fail +fontconfig:arm-uwp=fail +foonathan-memory:arm64-windows=fail +foonathan-memory:arm-uwp=fail +foonathan-memory:x64-uwp=fail +forge:x86-windows=fail +freeglut:arm64-windows=fail +freeglut:arm-uwp=fail +freeglut:x64-uwp=fail +freeglut:x64-osx=fail +# Needs /bigobj +freeopcua:arm64-windows=fail +freetype-gl:x64-uwp=fail +freexl:arm-uwp=fail +freexl:x64-uwp=fail +fribidi:arm64-windows=fail +fribidi:arm-uwp=fail +fribidi:x64-uwp=fail +ftgl:x64-uwp=fail +# https://github.com/GoogleCloudPlatform/functions-framework-cpp/issues/207 +functions-framework-cpp:x64-uwp=fail +fuzzylite:arm-uwp=fail +fuzzylite:x64-linux=fail +fuzzylite:x64-osx=fail +fuzzylite:x64-uwp=fail +gainput:arm-uwp=fail +gainput:x64-linux=fail +gainput:x64-uwp=fail +gasol:arm64-windows=fail +gasol:arm-uwp=fail +gasol:x64-uwp=fail +geos:arm-uwp=fail +geos:x64-uwp=fail + +# gsoap does not offer stable public source downloads +gsoap:x64-windows = skip +gsoap:x86-windows = skip +gsoap:x64-windows-static = skip +gsoap:x64-windows-static-md = skip + +# Port geotrans source ftp://ftp.nga.mil server +# extremely slow may take several hours to download +geotrans:x64-linux = skip +geotrans:x64-windows = skip +geotrans:x86-windows = skip +getopt:arm-uwp=fail +getopt:x64-uwp=fail +getopt-win32:arm64-windows=fail +getopt-win32:arm-uwp=fail +getopt-win32:x64-linux=fail +getopt-win32:x64-osx=fail +getopt-win32:x64-uwp=fail +gflags:arm-uwp=fail +gflags:x64-uwp=fail + +# Conflicts with libevent +gherkin-c:arm64-windows = skip +gherkin-c:arm-uwp = skip +gherkin-c:x64-linux=fail +gherkin-c:x64-osx=fail +gherkin-c:x64-uwp = skip +gherkin-c:x64-windows = skip +gherkin-c:x64-windows-static = skip +gherkin-c:x64-windows-static-md=skip +gherkin-c:x86-windows = skip +gl3w:arm64-windows=fail +gl3w:arm-uwp=fail +glew:arm64-windows=fail +glew:arm-uwp=fail +glfw3:arm-uwp=fail +glfw3:x64-uwp=fail +glib:x64-uwp=fail +glib:x64-windows-static=fail +gmmlib:arm64-windows=fail +gmmlib:arm-uwp=fail +gmmlib:x64-osx=fail +gmmlib:x64-uwp=fail +gmmlib:x64-windows=fail +gmmlib:x64-windows-static=fail +gmmlib:x64-windows-static-md=fail +gmmlib:x86-windows=fail +google-cloud-cpp:arm-uwp=fail +google-cloud-cpp:x64-uwp=fail +gppanel:x64-osx=fail +gperf:x64-uwp=fail +gperf:arm-uwp=fail +gperftools:arm64-windows=fail +gperftools:x64-uwp=fail +gperftools:arm-uwp=fail +graphicsmagick:arm-uwp=fail +graphicsmagick:x64-uwp=fail +graphite2:arm-uwp=fail +graphite2:x64-uwp=fail +graphqlparser:arm-uwp=fail +graphqlparser:x64-uwp=fail +gsl:arm-uwp=fail +gsl:x64-uwp=fail +gtk:x64-windows-static=fail +gtk:x64-windows-static-md=fail +gts:x64-osx=fail +guetzli:x64-osx=fail +halide:x64-windows-static=fail +hdf5:arm64-windows=fail +hdf5:arm-uwp=fail +hdf5:x64-uwp=fail +healpix:x86-windows=fail +healpix:x64-windows=fail +healpix:x64-windows-static=fail +healpix:x64-windows-static-md=fail +healpix:x64-uwp=fail +healpix:arm64-windows=fail +healpix:arm-uwp=fail +healpix:x64-osx=fail +hiredis:arm-uwp=fail +hiredis:x64-uwp=fail +hpx:x64-windows-static=fail +hpx:x64-linux=fail +hunspell:x64-windows-static-md=fail +ideviceinstaller:x64-windows-static-md=fail +idevicerestore:x64-linux=fail +idevicerestore:x64-osx=fail +ignition-common1:x64-linux=fail +ignition-msgs1:arm64-windows=fail +ignition-msgs1:arm-uwp=fail +ignition-msgs1:x64-uwp=fail +ignition-msgs5:arm64-windows=fail +ignition-msgs5:arm-uwp=fail +ignition-msgs5:x64-uwp=fail +ignition-msgs5:x64-osx=skip +# Conflicts with libjpeg-turbo, mozjpeg +ijg-libjpeg:arm64-windows = skip +ijg-libjpeg:arm-uwp = skip +ijg-libjpeg:x64-linux = skip +ijg-libjpeg:x64-osx = skip +ijg-libjpeg:x64-uwp = skip +ijg-libjpeg:x64-windows = skip +ijg-libjpeg:x64-windows-static = skip +ijg-libjpeg:x86-windows = skip +intel-ipsec:arm64-windows=fail +intel-ipsec:arm-uwp=fail +intel-ipsec:x64-osx=fail +intel-ipsec:x64-uwp=fail +intel-ipsec:x64-windows=fail +intel-ipsec:x64-windows-static=fail +intel-ipsec:x64-windows-static-md=fail +intel-ipsec:x86-windows=fail +intel-mkl:arm64-windows=fail +intel-mkl:arm-uwp=fail +intel-mkl:x64-linux=fail +intel-mkl:x64-osx=fail +intel-mkl:x64-uwp=fail +intel-mkl:x64-windows=fail +intel-mkl:x64-windows-static=fail +intel-mkl:x64-windows-static-md=fail +intel-mkl:x86-windows=fail +intelrdfpmathlib:arm-uwp=fail +intelrdfpmathlib:x64-linux=fail +intelrdfpmathlib:x64-uwp=fail +irrlicht:arm64-windows=fail +irrlicht:arm-uwp=fail +irrlicht:x64-uwp=fail +isal:arm64-windows=fail +isal:arm-uwp=fail +isal:x64-osx=fail +isal:x64-uwp=fail +isal:x64-windows=fail +isal:x64-windows-static=fail +isal:x64-windows-static-md=fail +isal:x86-windows=fail +jbig2dec:arm-uwp=fail +jbig2dec:x64-uwp=fail +jemalloc:arm64-windows=fail +jemalloc:arm-uwp=fail +jemalloc:x64-linux=fail +jemalloc:x64-osx=fail +jemalloc:x64-uwp=fail +jemalloc:x64-windows-static=fail +jinja2cpplight:arm-uwp=fail +jinja2cpplight:x64-uwp=fail +kfr:arm64-windows=fail +kfr:arm-uwp=fail +kfr:x64-linux=fail +kinectsdk1:arm64-windows=fail +kinectsdk1:arm-uwp=fail +kinectsdk1:x64-linux=fail +kinectsdk1:x64-osx=fail +kinectsdk2:arm64-windows=fail +kinectsdk2:arm-uwp=fail +kinectsdk2:x64-linux=fail +kinectsdk2:x64-osx=fail +lastools:arm-uwp=fail +lastools:x64-uwp=fail +laszip:arm-uwp=fail +laszip:x64-uwp=fail +lcm:x64-osx=fail +leptonica:x64-uwp=fail +leptonica:arm-uwp=fail +leveldb:arm-uwp=fail +leveldb:x64-uwp=fail +libbacktrace:arm64-windows=fail +libbacktrace:arm-uwp=fail +libbacktrace:x64-uwp=fail +libbacktrace:x64-windows=fail +libbacktrace:x64-windows-static=fail +libbacktrace:x64-windows-static-md=fail +libbacktrace:x86-windows=fail +libaiff:x64-linux=fail +libarchive:arm-uwp=fail +libbf:arm64-windows=fail +libbf:arm-uwp=fail +libbf:x64-uwp=fail +libbf:x64-windows=fail +libbf:x64-windows-static=fail +libbf:x64-windows-static-md=fail +libbf:x86-windows=fail +libbson:arm-uwp=fail +libbson:x64-uwp=fail +libcds:arm64-windows=fail +libcds:arm-uwp=fail +libcds:x64-uwp=fail +libcopp:arm64-windows=fail +libcopp:arm-uwp=fail +libgeotiff:arm-uwp=fail +libgeotiff:x64-uwp=fail +# Missing system libraries on linux to run/prepare autoconf +libgpod:x64-linux=fail +libgpod:x64-osx=fail +cpuid:arm-uwp=fail +cpuid:x64-uwp=fail +cpuid:arm64-windows=fail +libdatrie:x64-linux=fail +libdatrie:x64-osx=fail +libdisasm:arm-uwp=fail +libdisasm:x64-uwp=fail +libdshowcapture:arm-uwp=fail +libdshowcapture:x64-linux=fail +libdshowcapture:x64-osx=fail +libdshowcapture:x64-uwp=fail +libepoxy:arm-uwp=fail +libepoxy:x64-uwp=fail +libepoxy:x64-windows-static=fail +libevent:arm-uwp=fail +libevent:x64-uwp=fail +libevhtp:x86-windows=fail +libevhtp:x64-windows=fail +libevhtp:x64-windows-static=fail +libevhtp:x64-windows-static-md=fail +libevhtp:x64-uwp=fail +libevhtp:arm64-windows=fail +libevhtp:arm-uwp=fail +libexif:arm-uwp=fail +libexif:x64-uwp=fail +libfabric:arm-uwp=fail +libfabric:x64-linux=fail +libfabric:x64-osx=fail +libfabric:x64-uwp=fail +libfabric:x64-windows-static=fail +libfabric:x64-windows-static-md=fail +libfreenect2:arm64-windows=fail +libfreenect2:x64-osx=fail +libgit2:arm-uwp=fail +libgit2:x64-uwp=fail +libgo:arm-uwp=fail +libgo:x64-uwp=fail +libgo:arm64-windows=fail +libgpod:arm64-windows=fail +libgpod:arm-uwp=fail +libgpod:x64-uwp=fail +libgpod:x64-windows=fail +libgpod:x64-windows-static=fail +libgpod:x64-windows-static-md=fail +libgpod:x86-windows=fail +libhdfs3:arm64-windows=fail +libhdfs3:arm-uwp=fail +libhdfs3:x64-uwp=fail +libhdfs3:x64-windows=fail +libhdfs3:x64-windows-static=fail +libhdfs3:x64-windows-static-md=fail +libhdfs3:x86-windows=fail +libhdfs3:x64-linux=fail +libhydrogen:arm64-windows=fail +libics:arm-uwp=fail +libics:x64-uwp=fail +libigl:arm64-windows=fail +libigl:arm-uwp=fail +libigl:x64-uwp=fail +libirecovery:x64-windows-static-md=fail +liblas:arm64-windows=fail +liblemon:arm-uwp=fail +liblemon:x64-uwp=fail +liblo:arm-uwp=fail +liblo:x64-uwp=fail +liblsl:arm64-windows=fail +liblsl:arm-uwp=fail +liblsl:x64-uwp=fail +libmad:arm-uwp=fail +libmad:x64-uwp=fail +libmagic:x64-uwp=fail +libmagic:arm64-windows=fail +libmagic:arm-uwp=fail +libmariadb:arm64-windows = skip +libmariadb:arm-uwp = skip +libmariadb:x64-linux = skip +libmariadb:x64-osx = skip +libmariadb:x64-uwp = skip +libmariadb:x64-windows = skip +libmariadb:x64-windows-static = skip +libmariadb:x64-windows-static-md=skip +libmariadb:x86-windows = skip +# libmesh installs tons of problematic files that conflict with other ports (boost, eigen, etc) +libmesh:arm64-windows=skip +libmesh:arm-uwp=skip +libmesh:x64-uwp=skip +libmesh:x64-windows=skip +libmesh:x64-windows-static=skip +libmesh:x64-windows-static-md=skip +libmesh:x86-windows=skip +libmesh:x64-osx=skip +libmesh:x64-linux=skip +libmodman:arm-uwp=fail +libmodman:x64-uwp=fail +libmodman:x64-windows-static=fail +libmodplug:arm-uwp=fail +libmodplug:x64-uwp=fail +libmpeg2:arm-uwp=fail +libmpeg2:x64-linux=fail +libmpeg2:x64-osx=fail +libmpeg2:x64-uwp=fail +libmupdf:x64-osx=fail +libmysql:x86-windows=fail +libmysql:arm64-windows=fail +#The official website of libnice https://nice.freedesktop.org cannot be accessed +libnice:x86-windows=skip +libnice:x64-windows=skip +libnice:x64-windows-static=skip +libnice:x64-uwp=skip +libnice:arm64-windows=skip +libnice:x64-linux=skip +libnice:x64-osx=skip +libopenmpt:x64-linux=fail +libopenmpt:x64-osx=fail +libopusenc:arm-uwp=fail +libopusenc:x64-osx=fail +libopusenc:x64-uwp=fail +libosip2:x64-windows-static-md=fail +libpff:arm-uwp=fail +libpff:x64-linux=fail +libpff:x64-osx=fail +libpff:x64-uwp=fail +libpff:x64-windows-static=fail +libpff:x64-windows-static-md=fail +libplist:x64-windows-static=fail +libpng-apng:arm64-windows = skip +libpng-apng:arm-uwp = skip +libpng-apng:x64-linux = skip +libpng-apng:x64-osx = skip +libpng-apng:x64-uwp = skip +libpng-apng:x64-windows = skip +libpng-apng:x64-windows-static = skip +libpng-apng:x64-windows-static-md=skip +libpng-apng:x86-windows = skip +libpq:arm-uwp=fail +libpq:x64-uwp=fail +# The developer of libqcow does not offer stable release archives +libqcow:arm-uwp=skip +libqcow:x64-uwp=skip +libqcow:x64-windows-static=skip +libqcow:x64-windows-static-md=skip +libqcow:x64-osx=skip +libqcow:x64-windows=skip +libqcow:x64-linux=skip +libqcow:x86-windows=skip +libqcow:arm64-windows=skip +librdkafka:arm-uwp=fail +librdkafka:x64-uwp=fail +# Conflicts with openssl +boringssl:arm64-windows = skip +boringssl:arm-uwp = skip +boringssl:x64-linux = skip +boringssl:x64-osx = skip +boringssl:x64-uwp = skip +boringssl:x64-windows = skip +boringssl:x64-windows-static = skip +boringssl:x64-windows-static-md=skip +boringssl:x86-windows = skip +libressl:arm64-windows = skip +libressl:arm-uwp = skip +libressl:x64-linux = skip +libressl:x64-osx = skip +libressl:x64-uwp = skip +libressl:x64-windows = skip +libressl:x64-windows-static = skip +libressl:x64-windows-static-md=skip +libressl:x86-windows = skip +libsamplerate:x64-osx=fail +libsoundio:arm64-windows=fail +libsoundio:arm-uwp=fail +libsoundio:x64-uwp=fail +libsrt:arm-uwp=fail +libsrt:x64-uwp=fail +libssh:arm64-windows=fail +libssh:arm-uwp=fail +libssh:x64-uwp=fail +libstk:arm-uwp=fail +libstk:x64-uwp=fail +libtins:arm-uwp=fail +libtins:x64-uwp=fail +libtomcrypt:arm64-windows=fail +libtomcrypt:arm-uwp=fail +libudis86:arm-uwp=fail +libudis86:x64-linux=fail +libudis86:x64-osx=fail +libudis86:x64-uwp=fail +libudns:arm64-windows=fail +libudns:arm-uwp=fail +libudns:x64-uwp=fail +libudns:x64-windows=fail +libudns:x64-windows-static=fail +libudns:x64-windows-static-md=fail +libudns:x86-windows=fail +libudns:x64-osx=fail +libui:arm-uwp=fail +libui:x64-linux=fail +libui:x64-uwp=fail +libusb:arm-uwp=fail +libusb:x64-uwp=fail +libusbmuxd:arm-uwp=fail +libusbmuxd:x64-uwp=fail +libusbmuxd:x64-linux=fail +libusbmuxd:x64-osx=fail +libusb-win32:arm-uwp=fail +libusb-win32:x64-linux=fail +libusb-win32:x64-osx=fail +libusb-win32:x64-uwp=fail +libuuid:arm64-windows=fail +libuuid:arm-uwp=fail + +# Causes build failures in vxl and podofo on osx +# Conflicts with Darwin kernel sdk uuid.h (has missing definitions) +libuuid:x64-osx = skip +libuuid:x64-uwp=fail +libuuid:x64-windows=fail +libuuid:x64-windows-static=fail +libuuid:x64-windows-static-md=fail +libuuid:x86-windows=fail +libuv:arm-uwp=fail +libuv:x64-uwp=fail +libvmdk:arm-uwp=fail +libvmdk:x64-uwp=fail +#Skip detection to avoid upstream remove older releases +libvmdk:x86-windows=skip +libvmdk:x64-windows=skip +libvmdk:x64-windows-static=skip +libvmdk:x64-windows-static-md=skip +libvmdk:arm64=skip +libvmdk:x64-linux=skip +libvmdk:x64-osx=skip +libwandio:x86-windows=fail +libwandio:x64-windows=fail +libwandio:x64-windows-static=fail +libwandio:x64-windows-static-md=fail +libwandio:x64-uwp=fail +libwandio:arm64-windows=fail +libwandio:arm-uwp=fail +libxmp-lite:x64-linux=fail +libxmp-lite:x64-osx=fail +libyuv:arm-uwp=fail +libyuv:x64-uwp=fail +licensepp:arm-uwp=fail +licensepp:x64-uwp=fail +linenoise-ng:arm-uwp=fail +linenoise-ng:x64-uwp=fail +live555:arm64-windows=fail +live555:arm-uwp=fail +live555:x64-linux=fail +live555:x64-osx=fail +live555:x64-uwp=fail +live555:x64-windows=fail +live555:x64-windows-static=fail +live555:x64-windows-static-md=fail +live555:x86-windows=fail +llgl:arm-uwp=fail +llgl:x64-uwp=fail +llvm:arm64-windows=fail +llvm:arm-uwp=fail +llvm:x64-uwp=fail +lmdb:arm-uwp=fail +lmdb:x64-uwp=fail +# Conflict with loadpng-c +lodepng:arm64-windows = skip +lodepng:arm-uwp = skip +lodepng:x64-linux = skip +lodepng:x64-osx = skip +lodepng:x64-uwp = skip +lodepng:x64-windows = skip +lodepng:x64-windows-static = skip +lodepng:x64-windows-static-md=skip +lodepng:x86-windows = skip +log4cplus:arm-uwp=fail +log4cplus:x64-uwp=fail +log4cxx:arm-uwp=fail +log4cxx:x64-uwp=fail +luajit:arm64-windows = skip +luajit:arm-uwp = skip +luajit:x64-linux = skip +luajit:x64-osx = skip +luajit:x64-uwp = skip +luajit:x64-windows = skip +luajit:x64-windows-static = skip +luajit:x64-windows-static-md=skip +luajit:x86-windows = skip +luafilesystem:arm-uwp=fail +luafilesystem:x64-uwp=fail +luasec:x64-windows-static=fail +luasocket:arm-uwp=fail +luasocket:x64-linux=fail +luasocket:x64-osx=fail +luasocket:x64-uwp=fail +lzfse:arm-uwp=fail +magnum:arm64-windows=skip +marble:x64-windows-static=fail +marble:x64-windows-static-md=fail +marble:arm64-windows=fail +marble:arm-uwp=fail +marble:x64-linux=fail +marble:x64-osx=fail +marble:x86-windows=fail +marl:arm-uwp=fail +marl:x64-uwp=fail +mathgl:x64-osx=fail +mathgl:x64-uwp=fail +matio:x64-osx=fail +mdnsresponder:arm64-windows=fail +mdnsresponder:arm-uwp=fail +mdnsresponder:x64-linux=fail +mdnsresponder:x64-osx=fail +mdnsresponder:x64-uwp=fail +mecab:arm64-windows = skip +mecab:arm-uwp = skip +mecab:x64-linux = skip +mecab:x64-uwp = skip +mecab:x64-windows = skip +mecab:x64-windows-static = skip +mecab:x64-windows-static-md=skip +mecab:x86-windows = skip +memorymodule:arm-uwp=fail +memorymodule:x64-linux=fail +memorymodule:x64-osx=fail +memorymodule:x64-uwp=fail +# Due to static crt. +mesa:x64-windows-static=fail +mesa:x64-windows-static-md=fail +# Missing dependent libraries. +mesa:x64-linux=fail +mesa:x64-osx=fail +meschach:arm-uwp=fail +meschach:x64-linux=fail +meschach:x64-osx=fail +meschach:x64-uwp=fail +metis:arm-uwp=fail +metis:x64-uwp=fail +mfl:x64-linux=skip +mhook:arm64-windows=fail +mhook:arm-uwp=fail +mhook:x64-linux=fail +mhook:x64-osx=fail +mhook:x64-uwp=fail +milerius-sfml-imgui:x64-osx=fail +milerius-sfml-imgui:x64-windows-static=fail +minhook:arm64-windows=fail +minhook:arm-uwp=fail +minhook:x64-linux=fail +minhook:x64-osx=fail +minhook:x64-uwp=fail +minifb:arm-uwp=fail +minifb:x64-uwp=fail +minisat-master-keying:arm-uwp=fail +minisat-master-keying:x64-uwp=fail +miniupnpc:arm-uwp=fail +miniupnpc:x64-uwp=fail +minizip:arm-uwp=fail +minizip:x64-uwp=fail +# Conflicts with signalrclient +microsoft-signalr:arm64-windows=skip +microsoft-signalr:arm-uwp=skip +microsoft-signalr:x64-linux=skip +microsoft-signalr:x64-osx=skip +microsoft-signalr:x64-uwp=skip +microsoft-signalr:x64-windows=skip +microsoft-signalr:x64-windows-static=skip +microsoft-signalr:x64-windows-static-md=skip +microsoft-signalr:x86-windows=skip +# https://github.com/mlpack/mlpack/pull/2945 +mlpack:x64-uwp=fail +mman:x64-linux=fail +mman:x64-osx=fail +mmloader:arm64-windows=fail +mmloader:arm-uwp=fail +mmloader:x64-linux=fail +mmloader:x64-osx=fail +mmloader:x64-uwp=fail +mmloader:x64-windows=fail +mmloader:x86-windows=fail +# mmx installs many problematic headers, such as `json.h` and `sched.h` +mmx:x64-windows=skip +mmx:x64-windows-static=skip +mmx:x64-windows-static-md=skip +mmx:x86-windows=skip +mmx:x64-linux=skip +mmx:x64-osx=skip +mmx:arm-uwp=skip +mmx:x64-uwp=skip +mmx:arm64-windows=skip +# Flaky strange linker error +mongo-c-driver:x64-osx=skip +mongoose:arm-uwp=fail +mongoose:x64-uwp=fail +monkeys-audio:arm64-windows=fail +monkeys-audio:arm-uwp=fail +monkeys-audio:x64-linux=fail +monkeys-audio:x64-osx=fail +monkeys-audio:x64-uwp=fail +monkeys-audio:x64-windows-static=fail +moos-core:arm-uwp=fail +moos-core:x64-uwp=fail +moos-core:x64-windows-static=fail +moos-essential:arm64-windows=fail +moos-essential:x64-windows-static-md=fail +moos-essential:x64-windows=fail +moos-essential:x86-windows=fail +# Conflicts with libjpeg-turbo +mozjpeg:arm64-windows = skip +mozjpeg:arm-uwp = skip +mozjpeg:x64-linux = skip +mozjpeg:x64-osx = skip +mozjpeg:x64-uwp = skip +mozjpeg:x64-windows = skip +mozjpeg:x64-windows-static = skip +mozjpeg:x64-windows-static-md=skip +mozjpeg:x86-windows = skip +# mpir conflicts with gmp +# see https://github.com/microsoft/vcpkg/issues/11756 +mpir:x86-windows=skip +mpir:x64-windows=skip +mpir:x64-windows-static=skip +mpir:x64-windows-static-md=skip +mpir:arm64-windows=skip +mpir:x64-osx=skip +mpir:x64-linux=skip +mpfr:x64-osx=fail +mpfr:x64-linux=fail +msix:x64-linux=fail +msix:x64-osx=fail +msix:x64-windows-static=fail +msmpi:arm64-windows=fail +msmpi:arm-uwp=fail +msmpi:x64-linux=fail +msmpi:x64-osx=fail +msmpi:x64-uwp=fail +munit:arm-uwp=fail +munit:arm64-windows=fail +munit:x64-uwp=fail +murmurhash:arm-uwp=fail +murmurhash:x64-uwp=fail +murmurhash:arm64-windows=fail +nana:arm-uwp=fail +nana:x64-linux=fail +nana:x64-osx=fail +nana:x64-uwp=fail +nanodbc:arm-uwp=fail +nanodbc:x64-uwp=fail +nanodbc:x64-linux=skip +nanorange:arm64-windows=fail +nanorange:arm-uwp=fail +nanorange:x64-linux=fail +nanorange:x64-osx=fail +nanorange:x64-uwp=fail +nanorange:x64-windows=fail +nanorange:x64-windows-static=fail +nanorange:x64-windows-static-md=fail +nanorange:x86-windows=fail +nanovg:arm-uwp=fail +nanovg:x64-uwp=fail +nativefiledialog:arm-uwp=fail +nativefiledialog:x64-uwp=fail +nethost:x64-uwp=fail +nethost:arm-uwp=fail +ngspice:x64-windows-static=fail +nng:arm-uwp=fail +nng:x64-uwp=fail +nrf-ble-driver:arm-uwp=fail +nrf-ble-driver:x64-uwp=fail +numactl:arm64-windows=fail +numactl:arm-uwp=fail +numactl:x64-osx=fail +numactl:x64-uwp=fail +numactl:x64-windows=fail +numactl:x64-windows-static=fail +numactl:x64-windows-static-md=fail +numactl:x86-windows=fail +nvtt:arm64-windows=fail +nvtt:arm-uwp=fail +nvtt:x64-uwp=fail +ocilib:arm-uwp=fail +ocilib:arm64-windows=fail +ocilib:x64-uwp=fail +ocilib:x64-windows-static=fail +ocilib:x64-windows-static-md=fail +octomap:arm-uwp=fail +octomap:x64-uwp=fail +ode:arm64-windows=fail +ode:arm-uwp=fail +ode:x64-uwp=fail +offscale-libetcd-cpp:arm-uwp=fail +offscale-libetcd-cpp:x64-uwp=fail +ogdf:arm64-windows = skip +ogdf:arm-uwp = skip +ogdf:x64-osx=fail +ogdf:x64-uwp = skip +ogdf:x64-windows = skip +ogdf:x64-windows-static = skip +ogdf:x64-windows-static-md=skip +ogdf:x86-windows = skip +# broken when `python` is python3, https://github.com/microsoft/vcpkg/issues/18936 +ogdf:x64-linux=fail +ogre:x64-osx=fail +# Conflicts with ogre +ogre-next:arm64-windows = skip +ogre-next:arm-uwp = skip +ogre-next:x64-osx = skip +ogre-next:x64-linux = skip +ogre-next:x64-uwp = skip +ogre-next:x64-windows = skip +ogre-next:x64-windows-static = skip +ogre-next:x64-windows-static-md=skip +ogre-next:x86-windows = skip +ois:arm64-windows=fail +ois:arm-uwp=fail +ois:x64-uwp=fail +# ompl is vulnerable to some form of race in its dependent ports, and adding 'ode' as a dependency +# does not resolve the issue +# src/ompl/CMakeFiles/ompl.dir/extensions/ode/src/OpenDEStateValidityChecker.cpp.o +# -L/mnt/vcpkg-ci/packages/flann_x64-linux/debug/lib -L/mnt/vcpkg-ci/packages/ode_x64-linux/debug/lib +# -Wl,-rpath,/mnt/vcpkg-ci/packages/flann_x64-linux/debug/lib:/mnt/vcpkg-ci/packages/ode_x64-linux/debug/lib:::::::::::::::::::::::::::::::::::::::::::::::: +# -lode /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_serialization.a +# /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_filesystem.a +# /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_system.a -lpthread && : +# /usr/bin/ld: cannot find -lode +ompl:x64-osx=fail +ompl:x64-linux=fail +openal-soft:arm-uwp=fail +openal-soft:x64-uwp=fail +openblas:arm64-windows=fail +openblas:arm-uwp=fail +# opencc/deps/rapidjson-1.1.0/rapidjson.h: Unknown machine endianess detected +opencc:arm64-windows=fail +# opencc/deps/marisa-0.2.5/lib/marisa/grimoire/io/mapper.cc currently doesn't support UWP. +opencc:arm-uwp=fail +opencc:x64-uwp=fail +opencensus-cpp:arm64-windows=fail +opencensus-cpp:x64-windows=fail +opencensus-cpp:x64-windows-static=fail +opencensus-cpp:x64-windows-static-md=fail +opencensus-cpp:x86-windows=fail +opencensus-cpp:x64-uwp=fail +opencl:arm-uwp=fail +opencl:x64-uwp=fail +opencsg:x64-uwp=fail +opencv2:arm64-windows = skip +opencv2:arm-uwp = skip +opencv2:x64-linux = skip +opencv2:x64-osx = skip +opencv2:x64-uwp = skip +opencv2:x64-windows = skip +opencv2:x64-windows-static = skip +opencv2:x64-windows-static-md=skip +opencv2:x86-windows = skip +opencv3:arm64-windows = skip +opencv3:arm-uwp = skip +opencv3:x64-linux = skip +opencv3:x64-osx = skip +opencv3:x64-uwp = skip +opencv3:x64-windows = skip +opencv3:x64-windows-static = skip +opencv3:x64-windows-static-md=skip +opencv3:x86-windows = skip +opendnp3:x64-uwp=fail +opendnp3:arm-uwp=fail +openexr:arm64-windows=fail +openexr:arm-uwp=fail +openexr:x64-uwp=fail +opengl:arm64-windows=fail +opengl:arm-uwp=fail +openmama:x64-windows-static-md=fail +openmesh:arm64-windows=fail +openmesh:arm-uwp=fail +openmesh:x64-uwp=fail +openmpi:arm64-windows=fail +openmpi:arm-uwp=fail +openmpi:x64-uwp=fail +openmpi:x64-windows=fail +openmpi:x64-windows-static=fail +openmpi:x64-windows-static-md=fail +openmpi:x86-windows=fail +openni2:x64-uwp=fail +openni2:x64-windows-static=fail +openscap:x64-linux=fail +openscap:x64-osx=fail +openssl-unix:arm64-windows=fail +openssl-unix:arm-uwp=fail +openssl-unix:x64-uwp=fail +openssl-unix:x64-windows=fail +openssl-unix:x64-windows-static=fail +openssl-unix:x64-windows-static-md=fail +openssl-unix:x86-windows=fail +openssl-uwp:arm64-windows=fail +openssl-uwp:x64-linux=fail +openssl-uwp:x64-osx=fail +openssl-uwp:x64-windows=fail +openssl-uwp:x64-windows-static=fail +openssl-uwp:x64-windows-static-md=fail +openssl-uwp:x86-windows=fail +opentracing:arm-uwp=fail +opentracing:x64-uwp=fail +openvpn3:x64-osx=fail +openvr:arm64-windows=fail +openvr:arm-uwp=fail +openvr:x64-osx=fail +openvr:x64-uwp=fail +openvr:x64-windows-static=fail +openxr-loader:arm64-windows=fail +openxr-loader:arm-uwp=fail +openxr-loader:x64-osx=fail +openxr-loader:x64-uwp=fail +optional-bare:arm64-windows = skip +optional-bare:arm-uwp = skip +optional-bare:x64-linux = skip +optional-bare:x64-osx = skip +optional-bare:x64-uwp = skip +optional-bare:x64-windows = skip +optional-bare:x64-windows-static = skip +optional-bare:x64-windows-static-md=skip +optional-bare:x86-windows = skip +opusfile:arm-uwp=fail +opusfile:x64-uwp=fail +orocos-kdl:arm-uwp=fail +orocos-kdl:x64-uwp=fail +paho-mqtt:arm-uwp=fail +paho-mqtt:x64-uwp=fail +pango:x64-windows-static=fail +pango:x64-windows-static-md=fail +pangomm:arm64-windows=fail +pdal:x64-linux=fail +pdal:x64-osx=fail +pdal-c:x64-windows-static=fail +pdal-c:x64-windows-static-md=fail +pdcurses:arm-uwp=fail +pdcurses:x64-linux=fail +pdcurses:x64-osx=fail +pdcurses:x64-uwp=fail +pdcurses:x64-windows-static=fail +pdcurses:x64-windows-static-md=fail +pfring:arm64-windows=fail +pfring:arm-uwp=fail +pfring:x64-uwp=fail +pfring:x64-windows=fail +pfring:x64-windows-static=fail +pfring:x64-windows-static-md=fail +pfring:x86-windows=fail +pfring:x64-osx=fail +# pfring on Linux currently fails because its build scripts enable warnings as +# errors, and warnings trigger with the Linux kernel headers in the Azure images. +pfring:x64-linux=fail +physx:arm64-windows=fail +piex:x64-osx=fail +pixel:x64-uwp=fail +pixel:x64-windows=fail +pixel:x64-windows-static=fail +pixel:x64-windows-static-md=fail +pixel:x86-windows=fail +pixman:arm-uwp=fail +platform-folders:arm-uwp=fail +platform-folders:x64-uwp=fail +plib:arm-uwp=fail +plib:x64-osx=fail +plib:x64-uwp=fail +plibsys:arm-uwp=fail +plibsys:x64-uwp=fail +plplot:arm64-windows=fail +plplot:arm-uwp=fail +plplot:x64-uwp=fail +pmdk:arm-uwp=fail +pmdk:arm64-windows=fail +pmdk:x64-linux=fail +pmdk:x64-osx=fail +pmdk:x64-uwp=fail +pmdk:x64-windows-static=fail +pmdk:x86-windows=fail +pngwriter:arm-uwp=fail +pngwriter:x64-uwp=fail +popsift:x64-windows-static-md=fail +poppler:arm64-windows=fail +portable-snippets:arm-uwp=fail +pqp:arm-uwp=fail +pqp:x64-uwp=fail +protobuf-c:x86-windows=fail +protobuf-c:x64-windows=fail +protobuf-c:x64-windows-static=fail +protobuf-c:x64-windows-static-md=fail +protobuf-c:x64-uwp=fail +protobuf-c:arm64-windows=fail +protobuf-c:arm-uwp=fail +python2:arm64-windows=fail +python2:arm-uwp=fail +python2:x64-uwp=fail +# Not yet ready for these platforms. +qbittorrent:x64-osx=fail +qbittorrent:x64-linux=fail +qhull:x64-uwp=fail +qhull:arm-uwp=fail +qpid-proton:arm-uwp=fail +qpid-proton:x64-uwp=fail +qpid-proton:x64-windows-static=fail +# Skip ports not available in Qt 6.1.0 (for Qt 6.2) +qt6betablock:x86-windows=skip +qt6betablock:x64-windows=skip +qt6betablock:x64-windows-static=skip +qt6betablock:x64-windows-static-md=skip +qt6betablock:x64-linux=skip +qt6betablock:x64-osx=skip +qt5-base:arm64-windows=fail +# Skip deprecated Qt module +# (remove after 1 year or longer due to vcpkg upgrade not handling removed ports correctly) +qt5-canvas3d:x64-linux=skip +qt5-canvas3d:x64-osx=skip +qt5-canvas3d:x64-windows=skip +qt5-canvas3d:x64-windows-static=skip +qt5-canvas3d:x64-windows-static-md=skip +qt5-canvas3d:x86-windows=skip +# Missing system libraries +qt5-wayland:x64-osx=fail +qtwayland:x64-osx=fail +# Missing prerequisites for CI success +qt5-webengine:x64-linux=fail +qt5-webengine:x64-osx=fail +# Fail due to outdated protoc headers. +# D:\buildtrees\qt5-webengine\x64-windows-dbg\src\core\debug\gen\net/third_party/quiche/src/quic/core/proto/cached_network_parameters.pb.h(17): +# fatal error C1189: #error: This file was generated by an older version of protoc which is +# Succesful built requires protobuf to be installed after qt5-webengine not before. Otherwise the build picks up the wrong headers from inside vcpkg. +qt5-webengine:x64-windows=skip +qt5-webengine:x86-windows=skip +# Static builds of qt5-webengine are not supported by the port itself +qt5-webengine:x64-windows-static=skip +qt5-webengine:x64-windows-static-md=skip +# Missing system libraries +qt5-x11extras:x64-osx=fail +# Missing libraries +qt5-x11extras:x86-windows=fail +qt5-x11extras:x64-windows=fail +qt5-x11extras:x64-windows-static=fail +qt5-x11extras:x64-windows-static-md=fail +quickfix:arm-uwp=fail +quickfix:arm64-windows=fail +quickfix:x64-uwp=fail +quickfix:x64-windows-static=fail +quickfix:x64-windows-static-md=fail +quickfix:x64-windows=fail +quickfix:x86-windows=fail +qwt:x64-osx=fail +rabit:x64-osx=fail +ragel:arm-uwp=fail +ragel:x64-uwp=fail +range-v3-vs2015:arm64-windows = skip +range-v3-vs2015:arm-uwp = skip +range-v3-vs2015:x64-linux = skip +range-v3-vs2015:x64-osx = skip +range-v3-vs2015:x64-uwp = skip +range-v3-vs2015:x64-windows = skip +range-v3-vs2015:x64-windows-static = skip +range-v3-vs2015:x64-windows-static-md=skip +range-v3-vs2015:x86-windows = skip +rapidstring:arm64-windows=fail +rapidstring:arm-uwp=fail +rapidstring:x64-linux=fail +rapidstring:x64-uwp=fail +rapidstring:x64-windows=fail +rapidstring:x64-windows-static=fail +rapidstring:x64-windows-static-md=fail +rapidstring:x86-windows=fail +raylib:arm64-windows=fail +raylib:arm-uwp=fail +raylib:x64-uwp=fail +# file conflicts with rbdl +rbdl-orb:x86-windows=skip +rbdl-orb:x64-windows=skip +rbdl-orb:x64-windows-static=skip +rbdl-orb:x64-windows-static-md=skip +rbdl-orb:x64-uwp=skip +rbdl-orb:arm-uwp=skip +rbdl-orb:arm64-windows=skip +rbdl-orb:x64-linux=skip +rbdl-orb:x64-osx=skip +readline:arm-uwp=fail +readline:x64-uwp=fail +readline-win32:arm-uwp=fail +readline-win32:x64-linux=fail +readline-win32:x64-osx=fail +readline-win32:x64-uwp=fail +realsense2:arm64-windows=fail +realsense2:arm-uwp=fail +realsense2:x64-uwp=fail +replxx:arm-uwp=fail +replxx:x64-uwp=fail +reproc:arm-uwp=fail +reproc:x64-uwp=fail +restbed:arm-uwp=fail +restbed:x64-uwp=fail +# file conflicts with msgpack +rest-rpc:x86-windows=skip +rest-rpc:x64-windows=skip +rest-rpc:x64-windows-static=skip +rest-rpc:x64-windows-static-md=skip +rest-rpc:x64-uwp=skip +rest-rpc:arm-uwp=skip +rest-rpc:arm64-windows=skip +rest-rpc:x64-linux=skip +rest-rpc:x64-osx=skip +rhash:arm64-windows=fail +rocksdb:arm-uwp=fail +rocksdb:x64-uwp=fail +rpclib:arm64-windows=fail +rpclib:arm-uwp=fail +rpclib:x64-uwp=fail +rsasynccpp:arm64-windows=fail +rsasynccpp:arm-uwp=fail +rsasynccpp:x64-linux=fail +rsasynccpp:x64-osx=fail +# Requires g++10 but CI compiler only has g++9 +rsm-bsa:x64-linux=fail +rsocket:x64-windows=fail +rsocket:x64-windows-static=fail +rsocket:x64-windows-static-md=fail +rtlsdr:x64-uwp=fail +rtlsdr:arm64-windows=fail +rtlsdr:arm-uwp=fail +rtlsdr:x64-linux=fail +rtlsdr:x64-osx=fail +rttr:arm-uwp=fail +rttr:x64-uwp=fail +ryml:x64-osx=fail +ryu:arm-uwp=fail +ryu:x64-uwp=fail +ryu:x64-windows-static=fail +ryu:x64-windows-static-md=fail +ryu:x86-windows=fail +ryu::arm64-windows=fail +sciter:arm64-windows=fail +sciter:arm-uwp=fail +sciter:x64-uwp=fail +sciter:x64-windows-static=fail +scnlib:arm-uwp=fail +scnlib:x64-uwp=fail +scylla-wrapper:arm-uwp=fail +scylla-wrapper:x64-linux=fail +scylla-wrapper:x64-osx=fail +scylla-wrapper:x64-uwp=fail +scylla-wrapper:x64-windows-static=fail +sdformat10:x64-windows-static-md=fail +sdformat6:arm-uwp=fail +sdformat6:arm64-windows=fail +sdformat6:x64-uwp=fail +sdformat6:x64-windows-static-md=fail +sdformat9:arm-uwp=fail +sdformat9:x64-linux=fail +sdformat9:x64-uwp=fail +sdformat9:x64-windows-static-md=fail +sdl1:arm-uwp=fail +sdl1:x64-uwp=fail +sdl1:x64-osx=fail +sdl2-image:arm-uwp=fail +sdl2-image:x64-uwp=fail +sdl2-mixer:arm-uwp=fail +sdl2-mixer:x64-uwp=fail +sdl2-net:arm-uwp=fail +sdl2-net:x64-uwp=fail +# https://github.com/microsoft/vcpkg/issues/10918 +seal:arm-uwp=fail +seal:x64-uwp=fail +sentencepiece:arm64-windows=fail +sentencepiece:arm-uwp=fail +sentencepiece:x64-uwp=fail +sentencepiece:x64-windows=fail +sentencepiece:x86-windows=fail +septag-sx:arm64-windows=fail +septag-sx:arm-uwp=fail +septag-sx:x64-uwp=fail +sfml:arm64-windows=fail +shapelib:arm-uwp=fail +shapelib:x64-uwp=fail +shiva:x64-windows-static=fail +shiva:x64-windows-static-md=fail +shiva-sfml:x64-linux=fail +shiva-sfml:x64-osx=fail +shiva-sfml:x86-windows=fail +shiva-sfml:x64-windows=fail +shogun:arm64-windows = skip +shogun:arm-uwp = skip +shogun:x64-osx = skip +shogun:x64-uwp = skip +shogun:x64-windows = skip +shogun:x64-windows-static = skip +shogun:x64-windows-static-md=skip +shogun:x86-windows = skip +signalrclient:x64-uwp=fail +signalrclient:arm-uwp=fail +skia:arm64-windows=fail +skia:arm-uwp=fail +skia:x64-linux=fail +skia:x64-uwp=fail +skia:x86-windows=fail +sleef:x86-windows=fail +slikenet:arm-uwp=fail +slikenet:x64-uwp=fail +smpeg2:arm-uwp=fail +smpeg2:x64-linux=fail +smpeg2:x64-uwp=fail +soci:arm-uwp=fail +soci:x64-uwp=fail +sockpp:arm-uwp=fail +sockpp:x64-uwp=fail +soil2:arm-uwp=fail +soil2:x64-uwp=fail +soqt:arm64-windows=fail +soqt:arm-uwp=fail +soqt:x64-uwp=fail +soundtouch:arm-uwp=fail +soundtouch:x64-uwp=fail +soundtouch:x64-windows-static=fail +spaceland:arm64-windows=fail +spaceland:arm-uwp=fail +spaceland:x64-uwp=fail +spdk:x64-linux=fail +spdk-dpdk:arm64-windows=fail +spdk-dpdk:arm-uwp=fail +spdk-dpdk:x64-osx=fail +spdk-dpdk:x64-uwp=fail +spdk-dpdk:x64-windows=fail +spdk-dpdk:x64-windows-static=fail +spdk-dpdk:x64-windows-static-md=fail +spdk-dpdk:x86-windows=fail +spdk-ipsec:arm64-windows=fail +spdk-ipsec:arm-uwp=fail +spdk-ipsec:x64-osx=fail +spdk-ipsec:x64-uwp=fail +spdk-ipsec:x64-windows=fail +spdk-ipsec:x64-windows-static=fail +spdk-ipsec:x64-windows-static-md=fail +spdk-ipsec:x86-windows=fail +spdk-isal:arm64-windows=fail +spdk-isal:arm-uwp=fail +spdk-isal:x64-osx=fail +spdk-isal:x64-uwp=fail +spdk-isal:x64-windows=fail +spdk-isal:x64-windows-static=fail +spdk-isal:x64-windows-static-md=fail +spdk-isal:x86-windows=fail +spirv-tools:arm-uwp=fail +spirv-tools:x64-uwp=fail +stormlib:arm-uwp=fail +stormlib:x64-uwp=fail +stxxl:arm-uwp=fail +stxxl:x64-uwp=fail +# upstream issue https://github.com/stxxl/stxxl/issues/99 +stxxl:x86-windows=skip +stxxl:x64-windows=skip +stxxl:x64-windows-static=skip +stxxl:x64-windows-static-md=skip +symengine:arm64-windows=fail +symengine:arm-uwp=fail +systemc:arm64-windows=fail +systemc:arm-uwp=fail +systemc:x64-uwp=fail +tbb:arm64-windows=fail +tbb:arm-uwp=fail +tbb:x64-uwp=fail +tcl:arm-uwp=fail +tcl:arm64-windows=fail +tcl:x64-uwp=fail +teemo:x64-uwp=fail +teemo:arm-uwp=fail +teemo:arm64-windows=fail +teemo:x64-osx=fail +telnetpp:arm-uwp=fail +telnetpp:x64-uwp=fail +theia:arm64-windows = skip +theia:arm-uwp = skip +theia:x64-uwp = skip +theia:x64-windows = skip +theia:x64-windows-static = skip +theia:x64-windows-static-md=skip +theia:x86-windows = skip +tidy-html5:arm-uwp=fail +tidy-html5:x64-uwp=fail +tinkerforge:arm-uwp=fail +tinkerforge:x64-uwp=fail +tinyexif:arm-uwp=fail +tinyexif:x64-uwp=fail +tiny-process-library:arm-uwp=fail +tiny-process-library:x64-uwp=fail +tmxlite:arm-uwp=fail +tmxlite:x64-uwp=fail +tmxparser:arm64-windows=fail +tmxparser:arm-uwp=fail +tmxparser:x64-uwp=fail +tmxparser:x64-windows=fail +tmxparser:x64-windows-static=fail +tmxparser:x64-windows-static-md=fail +tmxparser:x86-windows=fail +torch-th:arm64-windows=fail +torch-th:arm-uwp=fail +torch-th:x64-uwp=fail +torch-th:x64-windows-static=fail +tre:x64-osx=fail +treehopper:x64-windows-static=fail +treehopper:x64-linux=fail +turbobase64:arm64-windows=fail +turbobase64:arm-uwp=fail +turbobase64:x64-uwp=fail +turbobase64:x64-windows=fail +turbobase64:x64-windows-static=fail +turbobase64:x64-windows-static-md=fail +turbobase64:x86-windows=fail +unicorn:arm64-windows=fail +unicorn:arm-uwp=fail +unicorn:x64-linux=fail +unicorn:x64-osx=fail +unicorn:x64-uwp=fail +unicorn-lib:arm-uwp=fail +unicorn-lib:x64-uwp=fail +unittest-cpp:arm64-windows=fail +unittest-cpp:arm-uwp=fail +unittest-cpp:x64-uwp=fail +unixodbc:arm64-windows=fail +unixodbc:arm-uwp=fail +unixodbc:x64-uwp=fail +unixodbc:x64-windows=fail +unixodbc:x64-windows-static=fail +unixodbc:x64-windows-static-md=fail +unixodbc:x86-windows=fail +unrar:arm64-windows=fail +unrar:arm-uwp=fail +unrar:x64-linux=fail +unrar:x64-osx=fail +unrar:x64-uwp=fail +unrar:x64-windows-static=fail +urdfdom:x64-windows-static=fail +usd:x86-windows=fail +uthenticode:arm-uwp=fail +uthenticode:x64-uwp=fail +v8:arm64-windows=fail +v8:arm-uwp=fail +v8:x64-osx=fail +v8:x64-uwp=fail +vectorclass:arm64-windows=fail +vectorclass:arm-uwp=fail +vlpp:x64-osx=fail +vulkan:arm64-windows=fail +vulkan:arm-uwp=fail +vulkan:x64-linux=fail +vulkan:x64-osx=fail +vulkan:x64-uwp=fail +vulkan:x64-windows=fail +vulkan:x64-windows-static=fail +vulkan:x64-windows-static-md=fail +vulkan:x86-windows=fail +# Conflicts with latest openjpeg port (vxl ships with an old version of openjpeg) +# conflicts with qt5-location +vxl:arm64-windows = skip +vxl:arm-uwp = skip +vxl:x64-linux = skip +vxl:x64-osx = skip +vxl:x64-uwp = skip +vxl:x64-windows = skip +vxl:x64-windows-static = skip +vxl:x64-windows-static-md=skip +vxl:x86-windows = skip +wampcc:arm64-windows=fail +wildmidi:x64-osx=fail +wincrypt:x64-linux=fail +wincrypt:x64-osx=fail +winpcap:arm64-windows = skip +winpcap:arm-uwp = skip +winpcap:x64-linux=fail +winpcap:x64-osx=fail +winpcap:x64-uwp = skip +winpcap:x64-windows = skip +winpcap:x64-windows-static = skip +winpcap:x64-windows-static-md=skip +winpcap:x86-windows = skip +winreg:x64-linux=fail +winreg:x64-osx=fail +winsock2:x64-linux=fail +winsock2:x64-osx=fail +wintoast:arm-uwp=fail +wintoast:x64-linux=fail +wintoast:x64-osx=fail +wintoast:x64-uwp=fail +wpilib:arm64-windows=fail +wpilib:x64-osx=fail +wxchartdir:x64-osx=fail +wxwidgets:x64-linux=fail +x265:arm64-windows=fail +x265:arm-uwp=fail +x265:x64-uwp=fail +xalan-c:x64-windows-static=fail +xalan-c:arm64-windows=fail +xbyak:arm64-windows=fail +xbyak:arm-uwp=fail +xbyak:x64-uwp=fail +xerces-c:arm-uwp=fail +xerces-c:x64-uwp=fail +xmlsec:arm-uwp=fail +xmlsec:x64-uwp=fail +# The xmsh upstream repository is gone, if we find no replacement before +# 2021-01-01 we will remove the port outright. +xmsh:arm-uwp=skip +xmsh:arm64-windows=skip +xmsh:x64-linux=skip +xmsh:x64-osx=skip +xmsh:x64-uwp=skip +xmsh:x64-windows-static=skip +xmsh:x64-windows-static-md=skip +xmsh:x64-windows=skip +xmsh:x86-windows=skip +yajl:arm-uwp=fail +yajl:x64-uwp=fail +yara:arm-uwp=fail +yara:x64-uwp=fail +yasm:arm64-windows=fail +yasm:arm-uwp=fail +yasm:x64-linux=fail +yasm:x64-osx=fail +yasm:x64-uwp=fail +yato:arm64-windows=fail +yato:arm-uwp=fail +yato:x64-uwp=fail +z3:arm-uwp=fail +z3:x64-uwp=fail +zkpp:x86-windows=fail +zkpp:x64-windows=fail +zkpp:x64-windows-static=fail +zkpp:x64-windows-static-md=fail +zkpp:arm64-windows=fail +zkpp:x64-uwp=fail +zkpp:arm-uwp=fail + +# Official downloading server of CTP library is only guaranteed to be available during trading hours of China futures market +# Skip CI to avoid random failures +ctp:arm64-windows=skip +ctp:arm-uwp=skip +ctp:x64-linux=skip +ctp:x64-osx=skip +ctp:x64-uwp=skip +ctp:x64-windows=skip +ctp:x64-windows-static=skip +ctp:x64-windows-static-md=skip +ctp:x86-windows=skip +protozero:arm-uwp=fail +protozero:x64-uwp=fail + +# clapack is replaced by lapack-reference on the platforms lapack-reference supports +clapack:x64-linux=skip +clapack:x64-osx=skip +clapack:x64-windows-static=skip +clapack:x64-windows-static-md=skip +clapack:x64-windows=skip +clapack:x86-windows=skip +clapack:x64-uwp=skip +lapack-reference:arm64-windows=skip +lapack-reference:arm-uwp=skip + +# failures for x64-windows-static-md +ace:x64-windows-static-md=fail +activemq-cpp:x64-windows-static-md=fail +akali:x64-windows-static-md=fail +chromium-base:x64-windows-static-md=fail +clockutils:x64-windows-static-md=fail +fastcgi:x64-windows-static-md=fail +gmp:x64-windows-static-md=fail +ijg-libjpeg:x64-windows-static-md=fail +libcerf:x64-windows-static-md=fail +libmicrohttpd:x64-windows-static-md=fail +libspatialite:x64-windows-static-md=fail +linenoise-ng:x64-windows-static-md=fail +mmloader:x64-windows-static-md=fail +netcdf-cxx4:x64-windows-static-md=fail +open62541:x64-windows-static-md=fail +openscap:x64-windows-static-md=fail +portmidi:x64-windows-static-md=fail +quantlib:x64-windows-static-md=fail +readosm:x64-windows-static-md=fail +sentencepiece:x64-windows-static-md=fail +symengine:x64-windows-static-md=fail +teemo:x64-windows-static-md=fail +unicorn:x64-windows-static-md=fail +v8:x64-windows-static-md=fail +yato:x64-windows-static-md=fail +zyre:x64-windows-static-md=fail +usbmuxd:x64-windows-static-md=fail +workflow:x64-uwp=fail +workflow:arm-uwp=fail + +# wangle triggers an internal compiler error +# https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1269468 +wangle:x64-windows=fail +wangle:x64-windows-static=fail +wangle:x64-windows-static-md=fail + +# VS2019 version 16.9.4's project system changes where PDBs are placed in a way that breaks the +# upstream build script of this port. +# See https://developercommunity.visualstudio.com/t/Toolset-169-regression-vcxproj-producin/1356639 +dimcli:x64-windows-static-md=fail +dimcli:x64-windows-static=fail + +# cppgraphqlgen triggers an ICE on Apple Clang that comes with MacOS 11. +cppgraphqlgen:x64-osx=fail diff --git a/scripts/cleanEnvironmentHelper.ps1 b/scripts/cleanEnvironmentHelper.ps1 deleted file mode 100644 index fa5fe869dd371e..00000000000000 --- a/scripts/cleanEnvironmentHelper.ps1 +++ /dev/null @@ -1,52 +0,0 @@ -# Capture environment variables for the System and User. Also add some special/built-in variables. -# These will be used to synthesize a clean environment -$specialEnvironmentMap = @{ "SystemDrive"=$env:SystemDrive; "SystemRoot"=$env:SystemRoot; "UserProfile"=$env:UserProfile; "TMP"=$env:TMP } # These are built-in and not set in the registry -$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment -$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment - -# Identify the keySet of environment variable names -$nameSet = ($specialEnvironmentMap.Keys + $machineEnvironmentMap.Keys + $userEnvironmentMap.Keys) | Sort-Object | Select-Object -Unique - -# Any environment variable in the $nameSet should be restored to its original value -foreach ($name in $nameSet) -{ - if ($specialEnvironmentMap.ContainsKey($name)) - { - [Environment]::SetEnvironmentVariable($name, $specialEnvironmentMap[$name], 'Process') - continue; - } - - # PATH needs to be concatenated as it has values in both machine and user environment. Any other values should be set. - if ($name -eq 'path') - { - $pathValuePartial = @() - # Machine values before user values - $pathValuePartial += $machineEnvironmentMap[$name] -split ';' - $pathValuePartial += $userEnvironmentMap[$name] -split ';' - $pathValue = $pathValuePartial -join ';' - [Environment]::SetEnvironmentVariable($name, $pathValue, 'Process') - continue; - } - - if ($userEnvironmentMap.ContainsKey($name)) - { - [Environment]::SetEnvironmentVariable($name, $userEnvironmentMap[$name], 'Process') - continue; - } - - if ($machineEnvironmentMap.ContainsKey($name)) - { - [Environment]::SetEnvironmentVariable($name, $machineEnvironmentMap[$name], 'Process') - continue; - } - - throw "Unreachable: Unknown variable $name" -} - -# Any environment variable NOT in the $nameSet should be removed -$processEnvironmentMap = [Environment]::GetEnvironmentVariables('Process') -$variablesForRemoval = $processEnvironmentMap.Keys | Where-Object {$nameSet -notcontains $_} -foreach ($name in $variablesForRemoval) -{ - [Environment]::SetEnvironmentVariable($name, $null, 'Process') -} diff --git a/scripts/cmake/execute_process.cmake b/scripts/cmake/execute_process.cmake new file mode 100644 index 00000000000000..be45604d6b4c46 --- /dev/null +++ b/scripts/cmake/execute_process.cmake @@ -0,0 +1,21 @@ +#[===[.md: +# execute_process + +Intercepts all calls to execute_process() inside portfiles and fails when Download Mode +is enabled. + +In order to execute a process in Download Mode call `vcpkg_execute_in_download_mode()` instead. +#]===] + +if (NOT DEFINED Z_VCPKG_OVERRIDEN_EXECUTE_PROCESS) + set(Z_VCPKG_OVERRIDEN_EXECUTE_PROCESS ON) + + if (DEFINED VCPKG_DOWNLOAD_MODE) + function(execute_process) + message(FATAL_ERROR "This command cannot be executed in Download Mode.\nHalting portfile execution.\n") + endfunction() + set(Z_VCPKG_EXECUTE_PROCESS_NAME "_execute_process") + else() + set(Z_VCPKG_EXECUTE_PROCESS_NAME "execute_process") + endif() +endif() diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 09090db684f96e..c07fe7d62c1ca0 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -1,125 +1,569 @@ -## # vcpkg_acquire_msys -## -## Download and prepare an MSYS2 instance. -## -## ## Usage -## ```cmake -## vcpkg_acquire_msys( [PACKAGES ...]) -## ``` -## -## ## Parameters -## ### MSYS_ROOT_VAR -## An out-variable that will be set to the path to MSYS2. -## -## ### PACKAGES -## A list of packages to acquire in msys. -## -## To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15)` -## -## ## Notes -## A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`: -## ```cmake -## vcpkg_acquire_msys(MSYS_ROOT) -## set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) -## -## vcpkg_execute_required_process( -## COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh" -## WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel -## LOGNAME build-${TARGET_TRIPLET}-rel -## ) -## ``` -## -## ## Examples -## -## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) -## * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) -## * [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake) - -function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) - set(TOOLPATH ${DOWNLOADS}/tools/msys2) - cmake_parse_arguments(_am "" "" "PACKAGES" ${ARGN}) - - if(NOT CMAKE_HOST_WIN32) - message(FATAL_ERROR "vcpkg_acquire_msys() can only be used on Windows hosts") - endif() - - # detect host architecture - if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) - set(_vam_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) - else() - set(_vam_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) - endif() - - if(_vam_HOST_ARCHITECTURE STREQUAL "AMD64") - set(TOOLSUBPATH msys64) - set(URLS - "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20181211.tar.xz" - ) - set(ARCHIVE "msys2-base-x86_64-20181211.tar.xz") - set(HASH 1efb9a7ff1daa2d3147ac0fda8e9a645696dbd19a33c986b844bc037d946dddb3353db5a52794ac668718812854400d918e4db13b4a2d0e6f5a9dfe716b48056) - set(STAMP "initialized-msys2_64.stamp") - else() - set(TOOLSUBPATH msys32) - set(URLS - "http://repo.msys2.org/distrib/i686/msys2-base-i686-20181211.tar.xz" - ) - set(ARCHIVE "msys2-base-i686-20181211.tar.xz") - set(HASH a9b9680a511bb205b87811b303eb29d62e2fd851000304f8b087c5893a3891c2aa2d46217ae989e31b5d52a6ba34ac5e6a5e624d9c917df00a752ade4debc20f) - set(STAMP "initialized-msys2_32.stamp") - endif() - - set(PATH_TO_ROOT ${TOOLPATH}/${TOOLSUBPATH}) - - if(NOT EXISTS "${TOOLPATH}/${STAMP}") - - message(STATUS "Acquiring MSYS2...") - vcpkg_download_distfile(ARCHIVE_PATH - URLS ${URLS} - FILENAME ${ARCHIVE} - SHA512 ${HASH} - ) - - file(REMOVE_RECURSE ${TOOLPATH}/${TOOLSUBPATH}) - file(MAKE_DIRECTORY ${TOOLPATH}) - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} - WORKING_DIRECTORY ${TOOLPATH} - ) - execute_process( - COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman-key --init;pacman-key --populate" - WORKING_DIRECTORY ${TOOLPATH} - ) - execute_process( - COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Syu --noconfirm" - WORKING_DIRECTORY ${TOOLPATH} - ) - file(WRITE "${TOOLPATH}/${STAMP}" "0") - message(STATUS "Acquiring MSYS2... OK") - endif() - - if(_am_PACKAGES) - message(STATUS "Acquiring MSYS Packages...") - string(REPLACE ";" " " _am_PACKAGES "${_am_PACKAGES}") - - set(_ENV_ORIGINAL $ENV{PATH}) - set(ENV{PATH} ${PATH_TO_ROOT}/usr/bin) - vcpkg_execute_required_process( - COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "pacman -Sy --noconfirm --needed ${_am_PACKAGES}" - WORKING_DIRECTORY ${TOOLPATH} - LOGNAME msys-pacman-${TARGET_TRIPLET} - ) - set(ENV{PATH} "${_ENV_ORIGINAL}") - - message(STATUS "Acquiring MSYS Packages... OK") - endif() - - # Deal with a stale process created by MSYS - if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_execute_required_process( - COMMAND TASKKILL /F /IM gpg-agent.exe /fi "memusage gt 2" - WORKING_DIRECTORY ${SOURCE_PATH} - ) - endif() - - set(${PATH_TO_ROOT_OUT} ${PATH_TO_ROOT} PARENT_SCOPE) +#[===[.md: +# vcpkg_acquire_msys + +Download and prepare an MSYS2 instance. + +## Usage +```cmake +vcpkg_acquire_msys( + PACKAGES ... + [NO_DEFAULT_PACKAGES] + [DIRECT_PACKAGES ...] +) +``` + +## Parameters +### MSYS_ROOT_VAR +An out-variable that will be set to the path to MSYS2. + +### PACKAGES +A list of packages to acquire in msys. + +To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.16)` + +### NO_DEFAULT_PACKAGES +Exclude the normal base packages. + +The list of base packages includes: bash, coreutils, sed, grep, gawk, diffutils, make, and pkg-config + +### DIRECT_PACKAGES +A list of URL/SHA512 pairs to acquire in msys. + +This parameter can be used by a port to privately extend the list of msys packages to be acquired. +The URLs can be found on the msys2 website[1] and should be a direct archive link: + + https://repo.msys2.org/mingw/i686/mingw-w64-i686-gettext-0.19.8.1-9-any.pkg.tar.zst + +[1] https://packages.msys2.org/search + +## Notes +A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`: +```cmake +vcpkg_acquire_msys(MSYS_ROOT) +set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel +) +``` + +## Examples + +* [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +* [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) +* [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake) +#]===] + +# Mirror list from https://github.com/msys2/MSYS2-packages/blob/master/pacman-mirrors/mirrorlist.msys +# Sourceforge is not used because it does not keep older package versions +set(Z_VCPKG_ACQUIRE_MSYS_MIRRORS + "https://www2.futureware.at/~nickoe/msys2-mirror/" + "https://mirror.yandex.ru/mirrors/msys2/" + "https://mirrors.tuna.tsinghua.edu.cn/msys2/" + "https://mirrors.ustc.edu.cn/msys2/" + "https://mirror.bit.edu.cn/msys2/" + "https://mirror.selfnet.de/msys2/" + "https://mirrors.sjtug.sjtu.edu.cn/msys2/" +) + +function(z_vcpkg_acquire_msys_download_package out_archive) + cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "URL;SHA512;FILENAME" "") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "internal error: z_vcpkg_acquire_msys_download_package passed extra args: ${arg_UNPARSED_ARGUMENTS}") + endif() + + set(all_urls "${arg_URL}") + + foreach(mirror IN LISTS Z_VCPKG_ACQUIRE_MSYS_MIRRORS) + string(REPLACE "https://repo.msys2.org/" "${mirror}" mirror_url "${arg_URL}") + list(APPEND all_urls "${mirror_url}") + endforeach() + + vcpkg_download_distfile(msys_archive + URLS ${all_urls} + SHA512 "${arg_SHA512}" + FILENAME "msys-${arg_FILENAME}" + QUIET + ) + set("${out_archive}" "${msys_archive}" PARENT_SCOPE) +endfunction() + +# writes to the following variables in parent scope: +# - Z_VCPKG_MSYS_ARCHIVES +# - Z_VCPKG_MSYS_TOTAL_HASH +# - Z_VCPKG_MSYS_PACKAGES +function(z_vcpkg_acquire_msys_declare_package) + cmake_parse_arguments(PARSE_ARGV 0 arg "" "NAME;URL;SHA512" "DEPS") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "internal error: z_vcpkg_acquire_msys_declare_package passed extra args: ${arg_UNPARSED_ARGUMENTS}") + endif() + foreach(required_arg IN ITEMS URL SHA512) + if(NOT DEFINED arg_${required_arg}) + message(FATAL_ERROR "internal error: z_vcpkg_acquire_msys_declare_package requires argument: ${required_arg}") + endif() + endforeach() + + if(NOT arg_URL MATCHES [[^https://repo\.msys2\.org/.*/(([^-]+(-[^0-9][^-]*)*)-.+\.pkg\.tar\.(xz|zst))$]]) + message(FATAL_ERROR "internal error: regex does not match supplied URL to vcpkg_acquire_msys: ${arg_URL}") + endif() + + set(filename "${CMAKE_MATCH_1}") + if(NOT DEFINED arg_NAME) + set(arg_NAME "${CMAKE_MATCH_2}") + endif() + + if("${arg_NAME}" IN_LIST Z_VCPKG_MSYS_PACKAGES OR arg_Z_ALL_PACKAGES) + list(REMOVE_ITEM Z_VCPKG_MSYS_PACKAGES "${arg_NAME}") + list(APPEND Z_VCPKG_MSYS_PACKAGES ${arg_DEPS}) + set(Z_VCPKG_MSYS_PACKAGES "${Z_VCPKG_MSYS_PACKAGES}" PARENT_SCOPE) + + z_vcpkg_acquire_msys_download_package(archive + URL "${arg_URL}" + SHA512 "${arg_SHA512}" + FILENAME "${filename}" + ) + + list(APPEND Z_VCPKG_MSYS_ARCHIVES "${archive}") + set(Z_VCPKG_MSYS_ARCHIVES "${Z_VCPKG_MSYS_ARCHIVES}" PARENT_SCOPE) + string(APPEND Z_VCPKG_MSYS_TOTAL_HASH "${arg_SHA512}") + set(Z_VCPKG_MSYS_TOTAL_HASH "${Z_VCPKG_MSYS_TOTAL_HASH}" PARENT_SCOPE) + endif() +endfunction() + +function(vcpkg_acquire_msys out_msys_root) + cmake_parse_arguments(PARSE_ARGV 1 "arg" + "NO_DEFAULT_PACKAGES;Z_ALL_PACKAGES" + "" + "PACKAGES;DIRECT_PACKAGES" + ) + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "vcpkg_acquire_msys was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + set(Z_VCPKG_MSYS_TOTAL_HASH) + set(Z_VCPKG_MSYS_ARCHIVES) + + set(Z_VCPKG_MSYS_PACKAGES "${arg_PACKAGES}") + + if(NOT arg_NO_DEFAULT_PACKAGES) + list(APPEND Z_VCPKG_MSYS_PACKAGES bash coreutils sed grep gawk diffutils make pkg-config) + endif() + + if(DEFINED arg_DIRECT_PACKAGES AND NOT arg_DIRECT_PACKAGES STREQUAL "") + list(LENGTH arg_DIRECT_PACKAGES direct_packages_length) + math(EXPR direct_packages_parity "${direct_packages_length} % 2") + math(EXPR direct_packages_number "${direct_packages_length} / 2") + math(EXPR direct_packages_last "${direct_packages_number} - 1") + + if(direct_packages_parity EQUAL 1) + message(FATAL_ERROR "vcpkg_acquire_msys(... DIRECT_PACKAGES ...) requires exactly pairs of URL/SHA512") + endif() + + # direct_packages_last > direct_packages_number - 1 > 0 - 1 >= 0, so this is fine + foreach(index RANGE "${direct_packages_last}") + math(EXPR url_index "${index} * 2") + math(EXPR sha512_index "${url_index} + 1") + list(GET arg_DIRECT_PACKAGES "${url_index}" url) + list(GET arg_DIRECT_PACKAGES "${sha512_index}" sha512) + + get_filename_component(filename "${url}" NAME) + z_vcpkg_acquire_msys_download_package(archive + URL "${url}" + SHA512 "${sha512}" + FILENAME "${filename}" + ) + list(APPEND Z_VCPKG_MSYS_ARCHIVES "${archive}") + string(APPEND Z_VCPKG_MSYS_TOTAL_HASH "${sha512}") + endforeach() + endif() + + # To add new entries, use https://packages.msys2.org/package/$PACKAGE?repo=msys + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/unzip-6.0-2-x86_64.pkg.tar.xz" + SHA512 b8a1e0ce6deff26939cb46267f80ada0a623b7d782e80873cea3d388b4dc3a1053b14d7565b31f70bc904bf66f66ab58ccc1cd6bfa677065de1f279dd331afb9 + DEPS libbz2 + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libbz2-1.0.8-2-x86_64.pkg.tar.xz" + SHA512 d128bd1792d0f5750e6a63a24db86a791e7ee457db8c0bef68d217099be4a6eef27c85caf6ad09b0bcd5b3cdac6fc0a2b9842cc58d381a4035505906cc4803ec + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/patch-2.7.6-1-x86_64.pkg.tar.xz" + SHA512 04d06b9d5479f129f56e8290e0afe25217ffa457ec7bed3e576df08d4a85effd80d6e0ad82bd7541043100799b608a64da3c8f535f8ea173d326da6194902e8c + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/gzip-1.10-1-x86_64.pkg.tar.xz" + SHA512 2d0a60f2c384e3b9e2bed2212867c85333545e51ee0f583a33914e488e43c265ed0017cd4430a6e3dafdca99c0414b3756a4b9cc92a6f04d5566eff8b68def75 + DEPS msys2-runtime + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/texinfo-6.7-3-x86_64.pkg.tar.zst" + SHA512 d8bcce1a338d45a8c2350af3edee1d021a76524b767d465d3f7fd9cb03c8799d9cd3454526c10e4a2b4d58f75ae26a1a8177c50079dfdb4299129e0d45b093bc + DEPS bash perl + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/bash-4.4.023-2-x86_64.pkg.tar.xz" + SHA512 1cf2a07022113010e00e150e7004732013a793d49e7a6ac7c2be27a0b2c0ce3366150584b9974e30df042f8876a84d6a77c1a46f0607e38ebe18f8a25f51c32d + DEPS msys2-runtime + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/autoconf-2.71-1-any.pkg.tar.zst" + SHA512 c5683bdf72bb3ba28ec0cb6a211ae1f9eebc79d03f17fc8a55d78a35dc6499209936e099d3725573255a48578b71fac6b7b17afb933fd22fe1204daf50689609 + DEPS m4 perl + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/autoconf-archive-2019.01.06-1-any.pkg.tar.xz" + SHA512 77540d3d3644d94a52ade1f5db27b7b4b5910bbcd6995195d511378ca6d394a1dd8d606d57161c744699e6c63c5e55dfe6e8664d032cc8c650af9fdbb2db08b0 + DEPS m4 perl + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/diffutils-3.7-1-x86_64.pkg.tar.xz" + SHA512 0c39837a26b2111bb6310cdfe0bc14656e3d57456ad8023f59c9386634a8f1f236915c79a57348b64c508897c73ed88d8abce2b9ac512a427e9a3956939f2040 + DEPS msys2-runtime + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/binutils-2.34-4-x86_64.pkg.tar.zst" + SHA512 5271288d11489879082bc1f2298bb8bedbcfcf6ee19f8a9b3b552b6a4395543d9385bb833e3c32b1560bff1b411d2be503e2c12a7201bf37b85cfacc5f5baba3 + DEPS libiconv libintl + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz" + SHA512 b309799e5a9d248ef66eaf11a0bd21bf4e8b9bd5c677c627ec83fa760ce9f0b54ddf1b62cbb436e641fbbde71e3b61cb71ff541d866f8ca7717a3a0dbeb00ebf + DEPS grep sed coreutils file findutils + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/file-5.39-1-x86_64.pkg.tar.zst" + SHA512 be51dd0f6143a2f34f2a3e7d412866eb12511f25daaf3a5478240537733a67d7797a3a55a8893e5638589c06bca5af20aed5ded7db0bf19fbf52b30fae08cadd + DEPS gcc-libs zlib libbz2 + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz" + SHA512 b607da40d3388b440f2a09e154f21966cd55ad77e02d47805f78a9dee5de40226225bf0b8335fdfd4b83f25ead3098e9cb974d4f202f28827f8468e30e3b790d + DEPS gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/bzip2-1.0.8-2-x86_64.pkg.tar.xz" + SHA512 336f5b59eb9cf4e93b537a212509d84f72cd9b8a97bf8ac0596eff298f3c0979bdea6c605244d5913670b9d20b017e5ee327f1e606f546a88e177a03c589a636 + DEPS gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libbz2-1.0.8-2-x86_64.pkg.tar.xz" + SHA512 d128bd1792d0f5750e6a63a24db86a791e7ee457db8c0bef68d217099be4a6eef27c85caf6ad09b0bcd5b3cdac6fc0a2b9842cc58d381a4035505906cc4803ec + DEPS gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/coreutils-8.32-1-x86_64.pkg.tar.xz" + SHA512 1a2ae4f296954421ce36f764b9b1c77ca72fc8583c46060b817677d0ad6adc7d7e3c2bbe1ae0179afd116a3d62f28e59eae2f7c84c1c8ffb7d22d2f2b40c0cdc + DEPS libiconv libintl gmp + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz" + SHA512 c784d5f8a929ae251f2ffaccf7ab0b3936ae9f012041e8f074826dd6077ad0a859abba19feade1e71b3289cc640626dfe827afe91c272b38a1808f228f2fdd00 + DEPS libiconv libintl libpcre + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/sed-4.8-1-x86_64.pkg.tar.xz" + SHA512 b6e7ed0af9e04aba4992ee26d8616f7ac675c8137bb28558c049d50709afb571b33695ce21d01e5b7fe8e188c008dd2e8cbafc72a7e2a919c2d678506095132b + DEPS libintl + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libpcre-8.44-1-x86_64.pkg.tar.xz" + SHA512 e9e56386fc5cca0f3c36cee21eda91300d9a13a962ec2f52eeea00f131915daea1cfeb0e1b30704bf3cc4357d941d356e0d72192bab3006c2548e18cd96dad77 + DEPS gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/m4-1.4.19-1-x86_64.pkg.tar.zst" + SHA512 8f100fef907ae6668af68538cae559a531761b51bb556d345b752c698fee938a503818cbd2003722d449f6c9a080c7ddabe12dddbee4d407377ca1e96e7d08b1 + DEPS msys2-runtime + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/automake-wrapper-11-1-any.pkg.tar.xz" + SHA512 0fcfc80c31fd0bda5a46c55e9100a86d2fc788a92c7e2ca4fd281e551375c62eb5b9cc9ad9338bb44a815bf0b1d1b60b882c8e68ca3ea529b442f2d03d1d3e1f + DEPS gawk + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/gawk-5.1.0-1-x86_64.pkg.tar.xz" + SHA512 4e2be747b184f27945df6fb37d52d56fd8117d2fe4b289370bcdb5b15a4cf90cbeaea98cf9e64bcbfa2c13db50d8bd14cbd719c5f31b420842da903006dbc959 + DEPS libintl libreadline mpfr + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst" + SHA512 d64fa60e188124591d41fc097d7eb51d7ea4940bac05cdcf5eafde951ed1eaa174468f5ede03e61106e1633e3428964b34c96de76321ed8853b398fbe8c4d072 + DEPS gmp gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/gmp-6.2.0-1-x86_64.pkg.tar.xz" + SHA512 1389a443e775bb255d905665dd577bef7ed71d51a8c24d118097f8119c08c4dfe67505e88ddd1e9a3764dd1d50ed8b84fa34abefa797d257e90586f0cbf54de8 + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/xz-5.2.5-1-x86_64.pkg.tar.xz" # this seems to require immediate updating on version bumps. + SHA512 99d092c3398277e47586cead103b41e023e9432911fb7bdeafb967b826f6a57d32e58afc94c8230dad5b5ec2aef4f10d61362a6d9e410a6645cf23f076736bba + DEPS liblzma libiconv gettext + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/liblzma-5.2.5-1-x86_64.pkg.tar.xz" + SHA512 8d5c04354fdc7309e73abce679a4369c0be3dc342de51cef9d2a932b7df6a961c8cb1f7e373b1b8b2be40343a95fbd57ac29ebef63d4a2074be1d865e28ca6ad + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libreadline-8.0.004-1-x86_64.pkg.tar.xz" + SHA512 42760bddedccc8d93507c1e3a7a81595dc6392b5e4319d24a85275eb04c30eb79078e4247eb2cdd00ff3884d932639130c89bf1b559310a17fa4858062491f97 + DEPS ncurses + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/ncurses-6.2-1-x86_64.pkg.tar.xz" + SHA512 d4dc566d3dbd32e7646e328cb350689ede7eaa7008c8ed971072f8869a2986fe3935e7df1700851b52716af7ef20c49f9e6628d3163a5e9208a8872b5014eaea + DEPS msys2-runtime + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/automake1.16-1.16.3-1-any.pkg.tar.zst" + SHA512 174e6b9d1512eb710d48cda5bb4fef2b5d9b32071f425c76ea32c48081da0281f9fde1aa185845fa68a881233937f8cfd3ebda640d55764c1d48ec50e4de3390 + DEPS perl + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/perl-5.32.1-1-x86_64.pkg.tar.zst" + SHA512 600b919c7299566aa6abf9a432c166fdd81be5ed052ad4062cc54ee952ea556992e8aba25a44757965d66827dc6e98fddb492867399be3bbed44803e17367cb8 + DEPS libcrypt + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libcrypt-2.1-3-x86_64.pkg.tar.zst" + SHA512 15cee333a82b55ff6072b7be30bf1c33c926d8ac21a0a91bc4cbf655b6f547bc29496df5fa288eb47ca2f88af2a4696f9b718394437b65dd06e3d6669ca0c2e5 + DEPS gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst" + SHA512 9f72c81d8095ca1c341998bc80788f7ce125770ec4252f1eb6445b9cba74db5614caf9a6cc7c0fcc2ac18d4a0f972c49b9f245c3c9c8e588126be6c72a8c1818 + DEPS libiconv + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/make-4.3-1-x86_64.pkg.tar.xz" + SHA512 7306dec7859edc27d70a24ab4b396728481484a426c5aa2f7e9fed2635b3b25548b05b7d37a161a86a8edaa5922948bee8c99b1e8a078606e69ca48a433fe321 + DEPS libintl msys2-runtime + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/gettext-devel-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 648f74c23e4f92145cdd0d45ff5285c2df34e855a9e75e5463dd6646967f8cf34a18ce357c6f498a4680e6d7b84e2d1697ba9deee84da8ea6bb14bbdb594ee22 + DEPS gettext + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/gettext-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 c8c42d084c297746548963f7ec7a7df46241886f3e637e779811ee4a8fee6058f892082bb2658f6777cbffba2de4bcdfd68e846ba63c6a6552c9efb0c8c1de50 + DEPS libintl libgettextpo libasprintf tar + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/tar-1.32-1-x86_64.pkg.tar.xz" + SHA512 379525f4b8a3f21d67d6506647aec8367724e1b4c896039f46845d9e834298280381e7261a87440925ee712794d43074f4ffb5e09e67a5195af810bbc107ad9a + DEPS libiconv libintl + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libgettextpo-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 480b782a79b0ce71ed9939ae3a6821fc2f5a63358733965c62cee027d0e6c88e255df1d62379ee47f5a7f8ffe163e554e318dba22c67dc67469b10aa3248edf7 + DEPS gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libasprintf-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 a2e8027b9bbee20f8cf60851130ca2af436641b1fb66054f8deba118da7ebecb1cd188224dcf08e4c5b7cde85b412efab058afef2358e843c9de8eb128ca448c + DEPS gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/findutils-4.7.0-1-x86_64.pkg.tar.xz" + SHA512 fd09a24562b196ff252f4b5de86ed977280306a8c628792930812f146fcf7355f9d87434bbabe25e6cc17d8bd028f6bc68fc02e5bea83137a49cf5cc6f509e10 + DEPS libintl libiconv + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libintl-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 4e54c252b828c862f376d8f5a2410ee623a43d70cbb07d0b8ac20c25096f59fb3ae8dcd011d1792bec76f0b0b9411d0e184ee23707995761dc50eb76f9fc6b92 + DEPS libiconv + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst" + SHA512 3ab569eca9887ef85e7dd5dbca3143d8a60f7103f370a7ecc979a58a56b0c8dcf1f54ac3df4495bc306bd44bf36ee285aaebbb221c4eebfc912cf47d347d45fc + DEPS gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/gcc-libs-9.3.0-1-x86_64.pkg.tar.xz" + SHA512 2816afbf45aa0ff47f94a623ad083d9421bca5284dc55683c2f1bc09ea0eadfe720afb75aafef60c2ff6384d051c4fbe2a744bb16a20acf34c04dc59b17c3d8c + DEPS msys2-runtime + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst" + SHA512 fdd86f4ffa6e274d6fef1676a4987971b1f2e1ec556eee947adcb4240dc562180afc4914c2bdecba284012967d3d3cf4d1a392f798a3b32a3668d6678a86e8d3 + ) + + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-python-numpy-1.19.0-1-any.pkg.tar.zst" + SHA512 15791fff23deda17a4452c9ca3f23210ed77ee20dcdd6e0c31d0e626a63aeb93d15ed814078729101f1cce96129b4b5e3c898396b003d794a52d7169dd027465 + DEPS mingw-w64-x86_64-openblas mingw-w64-x86_64-python + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-openblas-0.3.10-2-any.pkg.tar.zst" + SHA512 3cf15ef191ceb303a7e40ad98aca94c56211b245617c17682379b5606a1a76e12d04fa1a83c6109e89620200a74917bcd981380c7749dda12fa8e79f0b923877 + DEPS mingw-w64-x86_64-gcc-libgfortran mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-libwinpthread + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libgfortran-10.2.0-1-any.pkg.tar.zst" + SHA512 c2dee2957356fa51aae39d907d0cc07f966028b418f74a1ea7ea551ff001c175d86781f980c0cf994207794322dcd369fa122ab78b6c6d0f0ab01e39a754e780 + DEPS mingw-w64-x86_64-gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-python-3.8.5-1-any.pkg.tar.zst" + SHA512 49bbcaa9479ff95fd21b473a1bc286886b204ec3e2e0d9466322e96a9ee07ccd8116024b54b967a87e4752057004475cac5060605e87bd5057de45efe5122a25 + DEPS mingw-w64-x86_64-bzip2 mingw-w64-x86_64-expat mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-libffi mingw-w64-x86_64-mpdecimal mingw-w64-x86_64-ncurses mingw-w64-x86_64-openssl mingw-w64-x86_64-sqlite3 mingw-w64-x86_64-tcl mingw-w64-x86_64-tk mingw-w64-x86_64-xz mingw-w64-x86_64-zlib + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-bzip2-1.0.8-1-any.pkg.tar.xz" + SHA512 6e01b26a2144f99ca00406dbce5b8c3e928ec8a3ff77e0b741b26aaf9c927e9bea8cb1b5f38cd59118307e10dd4523a0ea2a1ea61f798f99e6d605ef1d100503 + DEPS mingw-w64-x86_64-gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpdecimal-2.5.0-1-any.pkg.tar.zst" + SHA512 48130ff676c0235bad4648527021e597ee00aa49a4443740a134005877e2ff2ca27b30a0ac86b923192a65348b36de4e8d3f9c57d76ab42b2e21d1a92dbf7ccf + DEPS mingw-w64-x86_64-gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-ncurses-6.2-1-any.pkg.tar.xz" + SHA512 1cbffe0e181a3d4ceaa8f39b2a649584b2c7d689e6a057d85cb9f84edece2cf60eddc220127c7fa4f29e4aa6e8fb4f568ef9d73582d08168607135af977407e0 + DEPS mingw-w64-x86_64-libsystre + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libsystre-1.0.1-4-any.pkg.tar.xz" + SHA512 6540e896636d00d1ea4782965b3fe4d4ef1e32e689a98d25e2987191295b319eb1de2e56be3a4b524ff94f522a6c3e55f8159c1a6f58c8739e90f8e24e2d40d8 + DEPS mingw-w64-x86_64-libtre + ) + z_vcpkg_acquire_msys_declare_package( + NAME "mingw-w64-x86_64-libtre" + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libtre-git-r128.6fb7206-2-any.pkg.tar.xz" + SHA512 d595dbcf3a3b6ed098e46f370533ab86433efcd6b4d3dcf00bbe944ab8c17db7a20f6535b523da43b061f071a3b8aa651700b443ae14ec752ae87500ccc0332d + DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-gettext + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-openssl-1.1.1.g-1-any.pkg.tar.xz" + SHA512 81681089a19cae7dbdee1bc9d3148f03458fa7a1d2fd105be39299b3a0c91b34450bcfe2ad86622bc6819da1558d7217deb0807b4a7bed942a9a7a786fcd54a3 + DEPS mingw-w64-x86_64-ca-certificates mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-zlib + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-ca-certificates-20200601-1-any.pkg.tar.zst" + SHA512 21a81e1529a3ad4f6eceb3b7d4e36400712d3a690d3991131573d4aae8364965757f9b02054d93c853eb75fbb7f6173a278b122450c800b2c9a1e8017dd35e28 + DEPS mingw-w64-x86_64-p11-kit + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-p11-kit-0.23.20-2-any.pkg.tar.xz" + SHA512 c441c4928465a98aa53917df737b728275bc0f6e9b41e13de7c665a37d2111b46f057bb652a1d5a6c7cdf8a74ea15e365a727671b698f5bbb5a7cfd0b889935e + DEPS mingw-w64-x86_64-gettext mingw-w64-x86_64-libffi mingw-w64-x86_64-libtasn1 + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libtasn1-4.16.0-1-any.pkg.tar.xz" + SHA512 c450cd49391b46af552a89f2f6e2c21dd5da7d40e7456b380290c514a0f06bcbd63f0f972b3c173c4237bec7b652ff22d2d330e8fdf5c888558380bd2667be64 + DEPS mingw-w64-x86_64-gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-sqlite3-3.33.0-1-any.pkg.tar.zst" + SHA512 eae319f87c9849049347f132efc2ecc46e9ac1ead55542e31a3ea216932a4fa5c5bae8d468d2f050e1e22068ac9fbe9d8e1aa7612cc0110cafe6605032adeb0f + DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-readline mingw-w64-x86_64-tcl + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-readline-8.0.004-1-any.pkg.tar.xz" + SHA512 e3fb3030a50f677697bec0da39ba2eb979dc28991ad0e29012cbf1bda82723176148510bf924b7fce7a0b79e7b078232d69e07f3fbb7d657b8ee631841730120 + DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-termcap + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-termcap-1.3.1-6-any.pkg.tar.zst" + SHA512 602d182ba0f1e20c4c51ae09b327c345bd736e6e4f22cd7d58374ac68c705dd0af97663b9b94d41870457f46bb9110abb29186d182196133618fc460f71d1300 + DEPS mingw-w64-x86_64-gcc-libs + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-tk-8.6.10-2-any.pkg.tar.zst" + SHA512 a2d05ce3070d3a3bdf823fa5c790b124aa7493e60758e2911d3f9651899cf58328044f9b06edd82060d8a4b5efb5c4cb32085d827aecd796dbb5e42441da305f + DEPS mingw-w64-x86_64-tcl + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-tcl-8.6.10-1-any.pkg.tar.xz" + SHA512 c3f21588e19725598878ef13145fbe7a995c2a0c678ef0a4782e28fd64d65fe3271178369bf0c54e92123eba82f2d3da6ae2fc34acd3b20150d1e173be1c0f8f + DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-zlib + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-xz-5.2.5-2-any.pkg.tar.zst" + SHA512 94fcf8b9f9fbc2cfdb2ed53dbe72797806aa3399c4dcfea9c6204702c4504eb4d4204000accd965fcd0680d994bf947eae308bc576e629bbaa3a4cefda3aea52 + DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-gettext + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gettext-0.19.8.1-10-any.pkg.tar.zst" + SHA512 ebe948028942738918930b1f3b7aa0314ce0fb617dbd36dcfaf3980958555c7c476f2b50c21d272d01fd3b0bb87ac4f800e485a5b7f8fcc7b30aacdf76740348 + DEPS mingw-w64-x86_64-expat mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-libiconv + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-10.2.0-9-any.pkg.tar.zst" + SHA512 b2952015e0b27c51219fe15d7550a349e6d73032bbe328f00d6654008c4bda28766d75ce8898d765879ec5f4815695d0f047d01811d8253ed2d433cd5c77d5a9 + DEPS mingw-w64-x86_64-gmp mingw-w64-x86_64-libwinpthread mingw-w64-x86_64-mpc mingw-w64-x86_64-mpfr + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpc-1.2.0-2-any.pkg.tar.zst" + SHA512 f094b3ec407382018b3454afa07ea82b94acf3b92c094c46ab6d27e56cd2647cf5bc4986ecb18f8a5da721fd267dceba25353822e7cac33d9107604ac5d429bc + DEPS mingw-w64-x86_64-mpfr + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpfr-4.1.0-3-any.pkg.tar.zst" + SHA512 be8ad04e53804f18cfeec5b9cba1877af1516762de60891e115826fcfe95166751a68e24cdf351a021294e3189c31ce3c2db0ebf9c1d4d4ab6fea1468f73ced5 + DEPS mingw-w64-x86_64-gmp + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gmp-6.2.0-3-any.pkg.tar.zst" + SHA512 2736ba40bd7cac4ed12aae3d677aa0b788b161d2488976fbbae0fc6cff9ab154a09c903c1eec38ffe408a41abc62fd6106b55e17d7826b6dc10e720053685b1f + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-expat-2.2.10-1-any.pkg.tar.zst" + SHA512 ea3069abd7b9809186d1204479a49d605797535e5d618c5c4fc068511134ef9a277facd67fc47fa9a00da2018db90291190fdb2187cb6a7bd99331a1c0c7e119 + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libffi-3.3-3-any.pkg.tar.zst" + SHA512 6d7700e218018454e406737108c40328038deb8d159b147b4159192d01fb72f8df90a81cf769c0b452fdab1f2ff110ead2e1894e3804f7e827fa2770349c63f8 + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libiconv-1.16-2-any.pkg.tar.zst" + SHA512 542ed5d898a57a79d3523458f8f3409669b411f87d0852bb566d66f75c96422433f70628314338993461bcb19d4bfac4dadd9d21390cb4d95ef0445669288658 + ) + z_vcpkg_acquire_msys_declare_package( + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-zlib-1.2.11-9-any.pkg.tar.zst" + SHA512 f386d3a8d8c169a62a4580af074b7fdc0760ef0fde22ef7020a349382dd374a9e946606c757d12da1c1fe68baf5e2eaf459446e653477035a63e0e20df8f4aa0 + ) + z_vcpkg_acquire_msys_declare_package( + NAME "mingw-w64-x86_64-libwinpthread" + URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + SHA512 a6969a5db1c55ba458c1a047d0a2a9d2db6cc24266ea47f740598b149a601995d2de734a0984ac5e57ee611d5982cbc03fd6fc0f498435e8d6401bf15724caad + ) + + if(NOT Z_VCPKG_MSYS_PACKAGES STREQUAL "") + message(FATAL_ERROR "Unknown packages were required for vcpkg_acquire_msys(${arg_PACKAGES}): ${packages} +This can be resolved by explicitly passing URL/SHA pairs to DIRECT_PACKAGES.") + endif() + + string(SHA512 total_hash "${Z_VCPKG_MSYS_TOTAL_HASH}") + string(SUBSTRING "${total_hash}" 0 16 total_hash) + set(path_to_root "${DOWNLOADS}/tools/msys2/${total_hash}") + if(NOT EXISTS "${path_to_root}") + file(REMOVE_RECURSE "${path_to_root}.tmp") + file(MAKE_DIRECTORY "${path_to_root}.tmp/tmp") + set(index 0) + foreach(archive IN LISTS Z_VCPKG_MSYS_ARCHIVES) + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND "${CMAKE_COMMAND}" -E tar xzf "${archive}" + LOGNAME "msys-${TARGET_TRIPLET}-${index}" + WORKING_DIRECTORY "${path_to_root}.tmp" + ) + math(EXPR index "${index} + 1") + endforeach() + file(RENAME "${path_to_root}.tmp" "${path_to_root}") + endif() + # Due to skipping the regular MSYS2 installer, + # some config files need to be established explicitly. + if(NOT EXISTS "${path_to_root}/etc/fstab") + # This fstab entry removes the cygdrive prefix from paths. + file(WRITE "${path_to_root}/etc/fstab" "none / cygdrive binary,posix=0,noacl,user 0 0") + endif() + message(STATUS "Using msys root at ${path_to_root}") + set("${out_msys_root}" "${path_to_root}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_add_to_path.cmake b/scripts/cmake/vcpkg_add_to_path.cmake index 7ab08c88e824b9..fe780c72a8d131 100644 --- a/scripts/cmake/vcpkg_add_to_path.cmake +++ b/scripts/cmake/vcpkg_add_to_path.cmake @@ -1,47 +1,37 @@ -## # vcpkg_add_to_path -## -## Add a directory to the PATH environment variable -## -## ## Usage -## ```cmake -## vcpkg_add_to_path([PREPEND] <${PYTHON3_DIR}>) -## ``` -## -## ## Parameters -## ### -## The directory to add -## -## ### PREPEND -## Prepends the directory. -## -## The default is to append. -## -## ## Examples: -## * [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake#L75) -## * [folly](https://github.com/Microsoft/vcpkg/blob/master/ports/folly/portfile.cmake#L15) -## * [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) -## +#[===[ +# vcpkg_add_to_path + +Add a directory or directories to the PATH environment variable + +```cmake +vcpkg_add_to_path([PREPEND] [...]) +``` + +`vcpkg_add_to_path` adds all of the paths passed to it to the PATH environment variable. +If PREPEND is passed, then those paths are prepended to the PATH environment variable, +so that they are searched first; otherwise, those paths are appended, so they are +searched after the paths which are already in the environment variable. + +The paths are added in the order received, so that the first path is always searched +before a later path. + +If no paths are passed, then nothing will be done. + +## Examples: +* [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake#L75) +* [folly](https://github.com/Microsoft/vcpkg/blob/master/ports/folly/portfile.cmake#L15) +* [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) +#]===] function(vcpkg_add_to_path) - if(NOT "${ARGC}" STREQUAL "1" AND NOT "${ARGC}" STREQUAL "2") - message(FATAL_ERROR "vcpkg_add_to_path() only accepts 1 or 2 arguments.") + cmake_parse_arguments(PARSE_ARGV 0 "arg" "PREPEND" "" "") + if(NOT DEFINED arg_UNPARSED_ARGUMENTS) + return() endif() - if("${ARGV0}" STREQUAL "PREPEND") - if(NOT "${ARGC}" STREQUAL "2") - message(FATAL_ERROR "Expected second argument.") - endif() - if(CMAKE_HOST_WIN32) - set(ENV{PATH} "${ARGV1};$ENV{PATH}") - else() - set(ENV{PATH} "${ARGV1}:$ENV{PATH}") - endif() + + list(JOIN arg_UNPARSED_ARGUMENTS "${VCPKG_HOST_PATH_SEPARATOR}" add_to_path) + if(arg_PREPEND) + set(ENV{PATH} "${add_to_path}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PATH}") else() - if(NOT "${ARGC}" STREQUAL "1") - message(FATAL_ERROR "Unexpected second argument: ${ARGV1}") - endif() - if(CMAKE_HOST_WIN32) - set(ENV{PATH} "$ENV{PATH};${ARGV0}") - else() - set(ENV{PATH} "$ENV{PATH}:${ARGV0}") - endif() + set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${add_to_path}") endif() -endfunction() \ No newline at end of file +endfunction() diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index ac0b78e20c2b8d..dae9e6018b1e55 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -1,57 +1,33 @@ -## # vcpkg_apply_patches -## -## Apply a set of patches to a source tree. -## -## ## Usage -## ```cmake -## vcpkg_apply_patches( -## SOURCE_PATH <${SOURCE_PATH}> -## [QUIET] -## PATCHES ... -## ) -## ``` -## -## ## Parameters -## ### SOURCE_PATH -## The source path in which apply the patches. By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. -## -## ### PATCHES -## A list of patches that are applied to the source tree. -## -## Generally, these take the form of `${CMAKE_CURRENT_LIST_DIR}/some.patch` to select patches in the `port\\` directory. -## -## ### QUIET -## Disables the warning message upon failure. -## -## This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. -## -## ## Examples -## -## * [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) -## * [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake) -## * [libpng](https://github.com/Microsoft/vcpkg/blob/master/ports/libpng/portfile.cmake) +# DEPRECATED: in favor of the `PATCHES` argument to [`vcpkg_from_github()`](vcpkg_from_github.md) et al. + +#[===[.md +# vcpkg_apply_patches + +Apply a set of patches to a source tree. + +```cmake +vcpkg_apply_patches( + SOURCE_PATH <${SOURCE_PATH}> + [QUIET] + PATCHES ... +) +``` +#]===] function(vcpkg_apply_patches) - cmake_parse_arguments(_ap "QUIET" "SOURCE_PATH" "PATCHES" ${ARGN}) + z_vcpkg_deprecation_message("vcpkg_apply_patches has been deprecated in favor of the `PATCHES` argument to `vcpkg_from_*`.") - find_program(GIT NAMES git git.cmd) - set(PATCHNUM 0) - foreach(PATCH ${_ap_PATCHES}) - get_filename_component(ABSOLUTE_PATCH "${PATCH}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}") - message(STATUS "Applying patch ${PATCH}") - set(LOGNAME patch-${TARGET_TRIPLET}-${PATCHNUM}) - execute_process( - COMMAND ${GIT} --work-tree=. --git-dir=.git apply "${ABSOLUTE_PATCH}" --ignore-whitespace --whitespace=nowarn --verbose - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log - WORKING_DIRECTORY ${_ap_SOURCE_PATH} - RESULT_VARIABLE error_code - ) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "QUIET" "SOURCE_PATH" "PATCHES") - if(error_code AND NOT _ap_QUIET) - message(STATUS "Applying patch failed. This is expected if this patch was previously applied.") - endif() + if(arg_QUIET) + set(quiet "QUIET") + else() + set(quiet) + endif() - math(EXPR PATCHNUM "${PATCHNUM}+1") - endforeach() + z_vcpkg_apply_patches( + SOURCE_PATH "${arg_SOURCE_PATH}" + ${quiet} + PATCHES ${arg_PATCHES} + ) endfunction() diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index b110d2cc900d71..637e4a1602902c 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,61 +1,74 @@ -## # vcpkg_build_cmake -## -## Build a cmake project. -## -## ## Usage: -## ```cmake -## vcpkg_build_cmake([DISABLE_PARALLEL] [TARGET ]) -## ``` -## -## ## Parameters: -## ### DISABLE_PARALLEL -## The underlying buildsystem will be instructed to not parallelize -## -## ### TARGET -## The target passed to the cmake build command (`cmake --build . --target `). If not specified, no target will -## be passed. -## -## ### ADD_BIN_TO_PATH -## Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. -## -## ## Notes: -## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). -## You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the -## "install" target -## -## ## Examples: -## -## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) -## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) -## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) -## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +# DEPRECATED BY ports/vcpkg-cmake/vcpkg_cmake_build +#[===[.md: +# vcpkg_build_cmake + +Build a cmake project. + +## Usage: +```cmake +vcpkg_build_cmake([DISABLE_PARALLEL] [TARGET ]) +``` + +## Parameters: +### DISABLE_PARALLEL +The underlying buildsystem will be instructed to not parallelize + +### TARGET +The target passed to the cmake build command (`cmake --build . --target `). If not specified, no target will +be passed. + +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + +## Notes: +This command should be preceded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). +You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the +"install" target + +## Examples: + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +#]===] + function(vcpkg_build_cmake) - cmake_parse_arguments(_bc "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_ROOT" "" ${ARGN}) + cmake_parse_arguments(PARSE_ARGV 0 "arg" + "DISABLE_PARALLEL;ADD_BIN_TO_PATH" + "TARGET;LOGFILE_ROOT" + "" + ) + + if(Z_VCPKG_CMAKE_BUILD_GUARD) + message(FATAL_ERROR "The ${PORT} port already depends on vcpkg-cmake; using both vcpkg-cmake and vcpkg_build_cmake in the same port is unsupported.") + endif() - if(NOT _bc_LOGFILE_ROOT) - set(_bc_LOGFILE_ROOT "build") + if(NOT arg_LOGFILE_ROOT) + set(arg_LOGFILE_ROOT "build") endif() set(PARALLEL_ARG) set(NO_PARALLEL_ARG) - if(_VCPKG_CMAKE_GENERATOR MATCHES "Ninja") + if(Z_VCPKG_CMAKE_GENERATOR MATCHES "Ninja") set(BUILD_ARGS "-v") # verbose output + set(PARALLEL_ARG "-j${VCPKG_CONCURRENCY}") set(NO_PARALLEL_ARG "-j1") - elseif(_VCPKG_CMAKE_GENERATOR MATCHES "Visual Studio") + elseif(Z_VCPKG_CMAKE_GENERATOR MATCHES "Visual Studio") set(BUILD_ARGS "/p:VCPkgLocalAppDataDisabled=true" "/p:UseIntelMKL=No" ) set(PARALLEL_ARG "/m") - elseif(_VCPKG_CMAKE_GENERATOR MATCHES "NMake") + elseif(Z_VCPKG_CMAKE_GENERATOR MATCHES "NMake") # No options are currently added for nmake builds else() message(FATAL_ERROR "Unrecognized GENERATOR setting from vcpkg_configure_cmake(). Valid generators are: Ninja, Visual Studio, and NMake Makefiles") endif() - if(_bc_TARGET) - set(TARGET_PARAM "--target" ${_bc_TARGET}) + if(arg_TARGET) + set(TARGET_PARAM "--target" ${arg_TARGET}) else() set(TARGET_PARAM) endif() @@ -72,36 +85,31 @@ function(vcpkg_build_cmake) message(STATUS "Building ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") - if(_bc_ADD_BIN_TO_PATH) + if(arg_ADD_BIN_TO_PATH) set(_BACKUP_ENV_PATH "$ENV{PATH}") - if(CMAKE_HOST_WIN32) - set(_PATHSEP ";") - else() - set(_PATHSEP ":") - endif() if(BUILDTYPE STREQUAL "debug") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin${_PATHSEP}$ENV{PATH}") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") else() - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin${_PATHSEP}$ENV{PATH}") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") endif() endif() - if (_bc_DISABLE_PARALLEL) + if (arg_DISABLE_PARALLEL) vcpkg_execute_build_process( COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE} - LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" + LOGNAME "${arg_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" ) else() vcpkg_execute_build_process( COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} NO_PARALLEL_COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE} - LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" + LOGNAME "${arg_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" ) endif() - if(_bc_ADD_BIN_TO_PATH) + if(arg_ADD_BIN_TO_PATH) set(ENV{PATH} "${_BACKUP_ENV_PATH}") endif() endif() diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake new file mode 100755 index 00000000000000..18f857fcede233 --- /dev/null +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -0,0 +1,247 @@ +#[===[.md: +# vcpkg_build_make + +Build a linux makefile project. + +## Usage: +```cmake +vcpkg_build_make([BUILD_TARGET ] + [ADD_BIN_TO_PATH] + [ENABLE_INSTALL] + [MAKEFILE ] + [LOGFILE_ROOT ]) +``` + +### BUILD_TARGET +The target passed to the make build command (`./make `). If not specified, the 'all' target will +be passed. + +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + +### ENABLE_INSTALL +IF the port supports the install target use vcpkg_install_make() instead of vcpkg_build_make() + +### MAKEFILE +Specifies the Makefile as a relative path from the root of the sources passed to `vcpkg_configure_make()` + +### BUILD_TARGET +The target passed to the make build command (`./make `). Defaults to 'all'. + +### INSTALL_TARGET +The target passed to the make build command (`./make `) if `ENABLE_INSTALL` is used. Defaults to 'install'. + +### DISABLE_PARALLEL +The underlying buildsystem will be instructed to not parallelize + +### SUBPATH +Additional subdir to invoke make in. Useful if only parts of a port should be built. + +## Notes: +This command should be preceded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md). +You can use the alias [`vcpkg_install_make()`](vcpkg_install_make.md) function if your makefile supports the +"install" target + +## Examples + +* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake) +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +* [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) +#]===] + +function(vcpkg_build_make) + z_vcpkg_get_cmake_vars(cmake_vars_file) + include("${cmake_vars_file}") + + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET;SUBPATH;MAKEFILE;INSTALL_TARGET" "") + + if(NOT _bc_LOGFILE_ROOT) + set(_bc_LOGFILE_ROOT "build") + endif() + + if(NOT _bc_BUILD_TARGET) + set(_bc_BUILD_TARGET "all") + endif() + + if (NOT _bc_MAKEFILE) + set(_bc_MAKEFILE Makefile) + endif() + + if(NOT _bc_INSTALL_TARGET) + set(_bc_INSTALL_TARGET "install") + endif() + + if(WIN32) + set(_VCPKG_PREFIX ${CURRENT_PACKAGES_DIR}) + set(_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) + else() + string(REPLACE " " "\ " _VCPKG_PREFIX "${CURRENT_PACKAGES_DIR}") + string(REPLACE " " "\ " _VCPKG_INSTALLED "${CURRENT_INSTALLED_DIR}") + endif() + + set(MAKE_OPTS ) + set(INSTALL_OPTS ) + if (CMAKE_HOST_WIN32) + set(PATH_GLOBAL "$ENV{PATH}") + vcpkg_add_to_path(PREPEND "${SCRIPTS}/buildsystems/make_wrapper") + if(NOT DEFINED Z_VCPKG_MAKE) + vcpkg_acquire_msys(MSYS_ROOT) + find_program(Z_VCPKG_MAKE make PATHS "${MSYS_ROOT}/usr/bin" NO_DEFAULT_PATH REQUIRED) + endif() + set(MAKE_COMMAND "${Z_VCPKG_MAKE}") + set(MAKE_OPTS ${_bc_MAKE_OPTIONS} -j ${VCPKG_CONCURRENCY} --trace -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET}) + set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} -j 1 --trace -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET}) + + string(REPLACE " " "\\\ " _VCPKG_PACKAGE_PREFIX ${CURRENT_PACKAGES_DIR}) + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PACKAGE_PREFIX "${_VCPKG_PACKAGE_PREFIX}") + set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} --trace -f ${_bc_MAKEFILE} ${_bc_INSTALL_TARGET} DESTDIR=${_VCPKG_PACKAGE_PREFIX}) + #TODO: optimize for install-data (release) and install-exec (release/debug) + else() + if(VCPKG_HOST_IS_OPENBSD) + find_program(Z_VCPKG_MAKE gmake REQUIRED) + else() + find_program(Z_VCPKG_MAKE make REQUIRED) + endif() + set(MAKE_COMMAND "${Z_VCPKG_MAKE}") + set(MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET}) + set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j 1 -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET}) + set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} -f ${_bc_MAKEFILE} ${_bc_INSTALL_TARGET} DESTDIR=${CURRENT_PACKAGES_DIR}) + endif() + + # Since includes are buildtype independent those are setup by vcpkg_configure_make + _vcpkg_backup_env_variables(LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) + + foreach(BUILDTYPE "debug" "release") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) + if(BUILDTYPE STREQUAL "debug") + # Skip debug generate + if (_VCPKG_NO_DEBUG) + continue() + endif() + set(SHORT_BUILDTYPE "-dbg") + set(CMAKE_BUILDTYPE "DEBUG") + set(PATH_SUFFIX "/debug") + else() + # In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory. + if (_VCPKG_NO_DEBUG) + set(SHORT_BUILDTYPE "") + else() + set(SHORT_BUILDTYPE "-rel") + endif() + set(CMAKE_BUILDTYPE "RELEASE") + set(PATH_SUFFIX "") + endif() + + set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}${_bc_SUBPATH}") + message(STATUS "Building ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + + _vcpkg_extract_cpp_flags_and_set_cflags_and_cxxflags(${CMAKE_BUILDTYPE}) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_STATIC_LINKER_FLAGS_${CMAKE_BUILDTYPE}}") + else() # dynamic + set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_SHARED_LINKER_FLAGS_${CMAKE_BUILDTYPE}}") + endif() + if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") + set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link") + set(LINK_ENV_${CMAKE_BUILDTYPE} "$ENV{_LINK_} ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") + else() + set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") + endif() + + # Setup environment + set(ENV{CPPFLAGS} "${CPPFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{CFLAGS} "${CFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{CXXFLAGS} "${CXXFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{RCFLAGS} "${VCPKG_DETECTED_CMAKE_RC_FLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{LDFLAGS} "${LDFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{LIB} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIB_PATHLIKE_CONCAT}") + set(ENV{LIBPATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBPATH_PATHLIKE_CONCAT}") + set(ENV{LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBRARY_PATH_PATHLIKE_CONCAT}") + #set(ENV{LD_LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/manual-link/${LD_LIBRARY_PATH_PATHLIKE_CONCAT}") + + if(LINK_ENV_${_VAR_SUFFIX}) + set(_LINK_CONFIG_BACKUP "$ENV{_LINK_}") + set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}") + endif() + + if(_bc_ADD_BIN_TO_PATH) + set(_BACKUP_ENV_PATH "$ENV{PATH}") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX}/bin") + endif() + + if(MAKE_BASH) + set(MAKE_CMD_LINE "${MAKE_COMMAND} ${MAKE_OPTS}") + set(NO_PARALLEL_MAKE_CMD_LINE "${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS}") + else() + set(MAKE_CMD_LINE ${MAKE_COMMAND} ${MAKE_OPTS}) + set(NO_PARALLEL_MAKE_CMD_LINE ${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS}) + endif() + + if (_bc_DISABLE_PARALLEL) + vcpkg_execute_build_process( + COMMAND ${MAKE_BASH} ${NO_PARALLEL_MAKE_CMD_LINE} + WORKING_DIRECTORY "${WORKING_DIRECTORY}" + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" + ) + else() + vcpkg_execute_build_process( + COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} + NO_PARALLEL_COMMAND ${MAKE_BASH} ${NO_PARALLEL_MAKE_CMD_LINE} + WORKING_DIRECTORY "${WORKING_DIRECTORY}" + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" + ) + endif() + + file(READ "${CURRENT_BUILDTREES_DIR}/${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}-out.log" LOGDATA) + if(LOGDATA MATCHES "Warning: linker path does not have real file for library") + message(FATAL_ERROR "libtool could not find a file being linked against!") + endif() + + if (_bc_ENABLE_INSTALL) + message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + if(MAKE_BASH) + set(MAKE_CMD_LINE "${MAKE_COMMAND} ${INSTALL_OPTS}") + else() + set(MAKE_CMD_LINE ${MAKE_COMMAND} ${INSTALL_OPTS}) + endif() + vcpkg_execute_build_process( + COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} + WORKING_DIRECTORY "${WORKING_DIRECTORY}" + LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" + ) + endif() + + if(_LINK_CONFIG_BACKUP) + set(ENV{_LINK_} "${_LINK_CONFIG_BACKUP}") + unset(_LINK_CONFIG_BACKUP) + endif() + + if(_bc_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") + endif() + endif() + endforeach() + + if (_bc_ENABLE_INSTALL) + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALL_PREFIX "${CURRENT_INSTALLED_DIR}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}_tmp") + file(RENAME "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}_tmp") + file(RENAME "${CURRENT_PACKAGES_DIR}_tmp${_VCPKG_INSTALL_PREFIX}" "${CURRENT_PACKAGES_DIR}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}_tmp") + endif() + + # Remove libtool files since they contain absolute paths and are not necessary. + file(GLOB_RECURSE LIBTOOL_FILES "${CURRENT_PACKAGES_DIR}/**/*.la") + if(LIBTOOL_FILES) + file(REMOVE ${LIBTOOL_FILES}) + endif() + + if (CMAKE_HOST_WIN32) + set(ENV{PATH} "${PATH_GLOBAL}") + endif() + + _vcpkg_restore_env_variables(LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) +endfunction() diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index 50432f8fa39cc1..831887dc29a250 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -1,141 +1,151 @@ -## # vcpkg_build_msbuild -## -## Build a msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`. -## -## ## Usage -## ```cmake -## vcpkg_build_msbuild( -## PROJECT_PATH <${SOURCE_PATH}/port.sln> -## [RELEASE_CONFIGURATION ] -## [DEBUG_CONFIGURATION ] -## [TARGET ] -## [TARGET_PLATFORM_VERSION <10.0.15063.0>] -## [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] -## [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] -## [OPTIONS ...] -## [OPTIONS_RELEASE ...] -## [OPTIONS_DEBUG ...] -## [USE_VCPKG_INTEGRATION] -## ) -## ``` -## -## ## Parameters -## ### USE_VCPKG_INTEGRATION -## Apply the normal `integrate install` integration for building the project. -## -## By default, projects built with this command will not automatically link libraries or have header paths set. -## -## ### PROJECT_PATH -## The path to the solution (`.sln`) or project (`.vcxproj`) file. -## -## ### RELEASE_CONFIGURATION -## The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. -## -## ### DEBUG_CONFIGURATION -## The configuration (``/p:Configuration`` msbuild parameter) -## used for Debug builds. -## -## ### TARGET_PLATFORM_VERSION -## The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) -## -## ### TARGET -## The MSBuild target to build. (``/t:``) -## -## ### PLATFORM -## The platform (``/p:Platform`` msbuild parameter) used for the build. -## -## ### PLATFORM_TOOLSET -## The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. -## -## ### OPTIONS -## Additional options passed to msbuild for all builds. -## -## ### OPTIONS_RELEASE -## Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. -## -## ### OPTIONS_DEBUG -## Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. -## -## ## Examples -## -## * [chakracore](https://github.com/Microsoft/vcpkg/blob/master/ports/chakracore/portfile.cmake) -## * [cppunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cppunit/portfile.cmake) +#[===[.md: +# vcpkg_build_msbuild + +Build a msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`. + +## Usage +```cmake +vcpkg_build_msbuild( + PROJECT_PATH <${SOURCE_PATH}/port.sln> + [RELEASE_CONFIGURATION ] + [DEBUG_CONFIGURATION ] + [TARGET ] + [TARGET_PLATFORM_VERSION <10.0.15063.0>] + [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] + [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] + [OPTIONS ...] + [OPTIONS_RELEASE ...] + [OPTIONS_DEBUG ...] + [USE_VCPKG_INTEGRATION] +) +``` + +## Parameters +### USE_VCPKG_INTEGRATION +Apply the normal `integrate install` integration for building the project. + +By default, projects built with this command will not automatically link libraries or have header paths set. + +### PROJECT_PATH +The path to the solution (`.sln`) or project (`.vcxproj`) file. + +### RELEASE_CONFIGURATION +The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. + +### DEBUG_CONFIGURATION +The configuration (``/p:Configuration`` msbuild parameter) +used for Debug builds. + +### TARGET_PLATFORM_VERSION +The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) + +### TARGET +The MSBuild target to build. (``/t:``) + +### PLATFORM +The platform (``/p:Platform`` msbuild parameter) used for the build. + +### PLATFORM_TOOLSET +The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. + +### OPTIONS +Additional options passed to msbuild for all builds. + +### OPTIONS_RELEASE +Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. + +## Examples + +* [chakracore](https://github.com/Microsoft/vcpkg/blob/master/ports/chakracore/portfile.cmake) +#]===] function(vcpkg_build_msbuild) cmake_parse_arguments( - _csc + PARSE_ARGV 0 + arg "USE_VCPKG_INTEGRATION" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" - ${ARGN} ) - if(NOT DEFINED _csc_RELEASE_CONFIGURATION) - set(_csc_RELEASE_CONFIGURATION Release) + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "vcpkg_build_msbuild was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + if(NOT DEFINED arg_RELEASE_CONFIGURATION) + set(arg_RELEASE_CONFIGURATION Release) endif() - if(NOT DEFINED _csc_DEBUG_CONFIGURATION) - set(_csc_DEBUG_CONFIGURATION Debug) + if(NOT DEFINED arg_DEBUG_CONFIGURATION) + set(arg_DEBUG_CONFIGURATION Debug) endif() - if(NOT DEFINED _csc_PLATFORM) - set(_csc_PLATFORM ${TRIPLET_SYSTEM_ARCH}) + if(NOT DEFINED arg_PLATFORM) + set(arg_PLATFORM "${TRIPLET_SYSTEM_ARCH}") endif() - if(NOT DEFINED _csc_PLATFORM_TOOLSET) - set(_csc_PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET}) + if(NOT DEFINED arg_PLATFORM_TOOLSET) + set(arg_PLATFORM_TOOLSET "${VCPKG_PLATFORM_TOOLSET}") endif() - if(NOT DEFINED _csc_TARGET_PLATFORM_VERSION) - vcpkg_get_windows_sdk(_csc_TARGET_PLATFORM_VERSION) + if(NOT DEFINED arg_TARGET_PLATFORM_VERSION) + vcpkg_get_windows_sdk(arg_TARGET_PLATFORM_VERSION) endif() - if(NOT DEFINED _csc_TARGET) - set(_csc_TARGET Rebuild) + if(NOT DEFINED arg_TARGET) + set(arg_TARGET Rebuild) endif() - list(APPEND _csc_OPTIONS - /t:${_csc_TARGET} - /p:Platform=${_csc_PLATFORM} - /p:PlatformToolset=${_csc_PLATFORM_TOOLSET} - /p:VCPkgLocalAppDataDisabled=true - /p:UseIntelMKL=No - /p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION} - /m + list(APPEND arg_OPTIONS + "/t:${arg_TARGET}" + "/p:Platform=${arg_PLATFORM}" + "/p:PlatformToolset=${arg_PLATFORM_TOOLSET}" + "/p:VCPkgLocalAppDataDisabled=true" + "/p:UseIntelMKL=No" + "/p:WindowsTargetPlatformVersion=${arg_TARGET_PLATFORM_VERSION}" + "/p:VcpkgManifestInstall=false" + "/p:VcpkgManifestEnabled=false" + "/m" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") # Disable LTCG for static libraries because this setting introduces ABI incompatibility between minor compiler versions # TODO: Add a way for the user to override this if they want to opt-in to incompatibility - list(APPEND _csc_OPTIONS /p:WholeProgramOptimization=false) + list(APPEND arg_OPTIONS "/p:WholeProgramOptimization=false") endif() - if(_csc_USE_VCPKG_INTEGRATION) + if(arg_USE_VCPKG_INTEGRATION) list( - APPEND _csc_OPTIONS - /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + APPEND arg_OPTIONS + "/p:ForceImportBeforeCppTargets=${SCRIPTS}/buildsystems/msbuild/vcpkg.targets" "/p:VcpkgTriplet=${TARGET_TRIPLET}" + "/p:VcpkgInstalledDir=${_VCPKG_INSTALLED_DIR}" ) + else() + list(APPEND arg_OPTIONS "/p:VcpkgEnabled=false") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Building ${_csc_PROJECT_PATH} for Release") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + message(STATUS "Building ${arg_PROJECT_PATH} for Release") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND msbuild ${_csc_PROJECT_PATH} - /p:Configuration=${_csc_RELEASE_CONFIGURATION} - ${_csc_OPTIONS} - ${_csc_OPTIONS_RELEASE} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel + COMMAND msbuild "${arg_PROJECT_PATH}" + "/p:Configuration=${arg_RELEASE_CONFIGURATION}" + ${arg_OPTIONS} + ${arg_OPTIONS_RELEASE} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME "build-${TARGET_TRIPLET}-rel" ) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Building ${_csc_PROJECT_PATH} for Debug") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + message(STATUS "Building ${arg_PROJECT_PATH} for Debug") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND msbuild ${_csc_PROJECT_PATH} - /p:Configuration=${_csc_DEBUG_CONFIGURATION} - ${_csc_OPTIONS} - ${_csc_OPTIONS_DEBUG} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg + COMMAND msbuild "${arg_PROJECT_PATH}" + "/p:Configuration=${arg_DEBUG_CONFIGURATION}" + ${arg_OPTIONS} + ${arg_OPTIONS_DEBUG} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME "build-${TARGET_TRIPLET}-dbg" ) endif() endfunction() diff --git a/scripts/cmake/vcpkg_build_ninja.cmake b/scripts/cmake/vcpkg_build_ninja.cmake new file mode 100644 index 00000000000000..5a0a1755fa8c2a --- /dev/null +++ b/scripts/cmake/vcpkg_build_ninja.cmake @@ -0,0 +1,47 @@ +#[===[.md: +# vcpkg_build_ninja + +Build a ninja project + +## Usage: +```cmake +vcpkg_build_ninja( + [TARGETS ...] +) +``` + +## Parameters: +### TARGETS +Only build the specified targets. +#]===] + +function(z_vcpkg_build_ninja_build config targets) + message(STATUS "Building (${config})...") + vcpkg_execute_build_process( + COMMAND "${NINJA}" -C "${CURRENT_BUILDTREES_DIR}/${config}" ${targets} + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME "build-${config}" + ) +endfunction() + + +function(vcpkg_build_ninja) + cmake_parse_arguments(PARSE_ARGV 0 arg "" "" "TARGETS") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT DEFINED arg_TARGETS) + set(arg_TARGETS "") + endif() + + vcpkg_find_acquire_program(NINJA) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + z_vcpkg_build_ninja_build("${TARGET_TRIPLET}-dbg" "${arg_TARGETS}") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + z_vcpkg_build_ninja_build("${TARGET_TRIPLET}-rel" "${arg_TARGETS}") + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_build_nmake.cmake b/scripts/cmake/vcpkg_build_nmake.cmake new file mode 100755 index 00000000000000..06fb93a6a09453 --- /dev/null +++ b/scripts/cmake/vcpkg_build_nmake.cmake @@ -0,0 +1,232 @@ +#[===[.md: +# vcpkg_build_nmake + +Build a msvc makefile project. + +## Usage: +```cmake +vcpkg_build_nmake( + SOURCE_PATH <${SOURCE_PATH}> + [NO_DEBUG] + [ENABLE_INSTALL] + [TARGET ] + [PROJECT_SUBPATH <${SUBPATH}>] + [PROJECT_NAME <${MAKEFILE_NAME}>] + [PRERUN_SHELL <${SHELL_PATH}>] + [PRERUN_SHELL_DEBUG <${SHELL_PATH}>] + [PRERUN_SHELL_RELEASE <${SHELL_PATH}>] + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] + [TARGET ]) +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the source files. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PROJECT_SUBPATH +Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile. + +### PROJECT_NAME +Specifies the name of msvc makefile name. +Default is `makefile.vc` + +### NO_DEBUG +This port doesn't support debug mode. + +### ENABLE_INSTALL +Install binaries after build. + +### PRERUN_SHELL +Script that needs to be called before build + +### PRERUN_SHELL_DEBUG +Script that needs to be called before debug build + +### PRERUN_SHELL_RELEASE +Script that needs to be called before release build + +### OPTIONS +Additional options passed to generate during the generation. + +### OPTIONS_RELEASE +Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`. + +### TARGET +The target passed to the nmake build command (`nmake/nmake install`). If not specified, no target will +be passed. + +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + +## Notes: +You can use the alias [`vcpkg_install_nmake()`](vcpkg_install_nmake.md) function if your makefile supports the +"install" target + +## Examples + +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +#]===] + +function(vcpkg_build_nmake) + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 _bn + "ADD_BIN_TO_PATH;ENABLE_INSTALL;NO_DEBUG" + "SOURCE_PATH;PROJECT_SUBPATH;PROJECT_NAME;LOGFILE_ROOT" + "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE;TARGET" + ) + + if (NOT CMAKE_HOST_WIN32) + message(FATAL_ERROR "vcpkg_build_nmake only support windows.") + endif() + + if (_bn_OPTIONS_DEBUG STREQUAL _bn_OPTIONS_RELEASE) + message(FATAL_ERROR "Detected debug configuration is equal to release configuration, please use NO_DEBUG for vcpkg_build_nmake/vcpkg_install_nmake") + endif() + + if(NOT _bn_LOGFILE_ROOT) + set(_bn_LOGFILE_ROOT "build") + endif() + + if (NOT _bn_PROJECT_NAME) + set(MAKEFILE_NAME makefile.vc) + else() + set(MAKEFILE_NAME ${_bn_PROJECT_NAME}) + endif() + + set(MAKE ) + set(MAKE_OPTS_BASE ) + + find_program(NMAKE nmake REQUIRED) + get_filename_component(NMAKE_EXE_PATH ${NMAKE} DIRECTORY) + # Load toolchains + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + endif() + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + # Set needed env + set(ENV{PATH} "$ENV{PATH};${NMAKE_EXE_PATH}") + set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") + # Set make command and install command + set(MAKE ${NMAKE} /NOLOGO /G /U) + set(MAKE_OPTS_BASE -f ${MAKEFILE_NAME}) + if (_bn_ENABLE_INSTALL) + set(INSTALL_COMMAND install) + endif() + if (_bn_TARGET) + set(MAKE_OPTS_BASE ${MAKE_OPTS_BASE} ${_bn_TARGET} ${INSTALL_COMMAND}) + else() + set(MAKE_OPTS_BASE ${MAKE_OPTS_BASE} all ${INSTALL_COMMAND}) + endif() + # Add subpath to work directory + if (_bn_PROJECT_SUBPATH) + set(_bn_PROJECT_SUBPATH /${_bn_PROJECT_SUBPATH}) + else() + set(_bn_PROJECT_SUBPATH ) + endif() + + foreach(BUILDTYPE "debug" "release") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) + if(BUILDTYPE STREQUAL "debug") + # Skip debug generate + if (_bn_NO_DEBUG) + continue() + endif() + # Generate obj dir suffix + set(SHORT_BUILDTYPE "-dbg") + set(CONFIG "Debug") + # Add install command and arguments + set(MAKE_OPTS ${MAKE_OPTS_BASE}) + if (_bn_ENABLE_INSTALL) + set(INSTALL_OPTS INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug) + set(MAKE_OPTS ${MAKE_OPTS} ${INSTALL_OPTS}) + endif() + set(MAKE_OPTS ${MAKE_OPTS} ${_bn_OPTIONS} ${_bn_OPTIONS_DEBUG}) + + unset(ENV{CL}) + set(TMP_CL_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") + string(REPLACE "/" "-" TMP_CL_FLAGS "${TMP_CL_FLAGS}") + set(ENV{CL} "$ENV{CL} ${TMP_CL_FLAGS}") + else() + # In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory. + if (_bn_NO_DEBUG) + set(SHORT_BUILDTYPE "") + else() + set(SHORT_BUILDTYPE "-rel") + endif() + set(CONFIG "Release") + # Add install command and arguments + set(MAKE_OPTS ${MAKE_OPTS_BASE}) + if (_bn_ENABLE_INSTALL) + set(INSTALL_OPTS INSTALLDIR=${CURRENT_PACKAGES_DIR}) + set(MAKE_OPTS ${MAKE_OPTS} ${INSTALL_OPTS}) + endif() + set(MAKE_OPTS ${MAKE_OPTS} ${_bn_OPTIONS} ${_bn_OPTIONS_RELEASE}) + + unset(ENV{CL}) + set(TMP_CL_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") + string(REPLACE "/" "-" TMP_CL_FLAGS "${TMP_CL_FLAGS}") + set(ENV{CL} "$ENV{CL} ${TMP_CL_FLAGS}") + endif() + + set(CURRENT_TRIPLET_NAME ${TARGET_TRIPLET}${SHORT_BUILDTYPE}) + set(OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${CURRENT_TRIPLET_NAME}) + + file(REMOVE_RECURSE ${OBJ_DIR}) + file(MAKE_DIRECTORY ${OBJ_DIR}) + file(GLOB_RECURSE SOURCE_FILES ${_bn_SOURCE_PATH}/*) + foreach(ONE_SOUCRCE_FILE ${SOURCE_FILES}) + get_filename_component(DST_DIR ${ONE_SOUCRCE_FILE} PATH) + string(REPLACE "${_bn_SOURCE_PATH}" "${OBJ_DIR}" DST_DIR "${DST_DIR}") + file(COPY ${ONE_SOUCRCE_FILE} DESTINATION ${DST_DIR}) + endforeach() + + if (_bn_PRERUN_SHELL) + message(STATUS "Prerunning ${CURRENT_TRIPLET_NAME}") + vcpkg_execute_required_process( + COMMAND ${_bn_PRERUN_SHELL} + WORKING_DIRECTORY ${OBJ_DIR}${_bn_PROJECT_SUBPATH} + LOGNAME "$prerun-${CURRENT_TRIPLET_NAME}" + ) + endif() + if (BUILDTYPE STREQUAL "debug" AND _bn_PRERUN_SHELL_DEBUG) + message(STATUS "Prerunning ${CURRENT_TRIPLET_NAME}") + vcpkg_execute_required_process( + COMMAND ${_bn_PRERUN_SHELL_DEBUG} + WORKING_DIRECTORY ${OBJ_DIR}${_bn_PROJECT_SUBPATH} + LOGNAME "prerun-${CURRENT_TRIPLET_NAME}-dbg" + ) + endif() + if (BUILDTYPE STREQUAL "release" AND _bn_PRERUN_SHELL_RELEASE) + message(STATUS "Prerunning ${CURRENT_TRIPLET_NAME}") + vcpkg_execute_required_process( + COMMAND ${_bn_PRERUN_SHELL_RELEASE} + WORKING_DIRECTORY ${OBJ_DIR}${_bn_PROJECT_SUBPATH} + LOGNAME "prerun-${CURRENT_TRIPLET_NAME}-rel" + ) + endif() + + if (NOT _bn_ENABLE_INSTALL) + message(STATUS "Building ${CURRENT_TRIPLET_NAME}") + else() + message(STATUS "Building and installing ${CURRENT_TRIPLET_NAME}") + endif() + + vcpkg_execute_build_process( + COMMAND ${MAKE} ${MAKE_OPTS} + WORKING_DIRECTORY ${OBJ_DIR}${_bn_PROJECT_SUBPATH} + LOGNAME "${_bn_LOGFILE_ROOT}-${CURRENT_TRIPLET_NAME}" + ) + + if(_bn_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") + endif() + endif() + endforeach() +endfunction() diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index cf79fe8fcaad27..6b85234c838793 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -1,52 +1,48 @@ -#.rst: -# .. command:: vcpkg_build_qmake -# -# Build a qmake-based project, previously configured using vcpkg_configure_qmake. -# -# :: -# vcpkg_build_qmake() -# +#[===[.md: +# vcpkg_build_qmake + +Build a qmake-based project, previously configured using vcpkg_configure_qmake. + +```cmake +vcpkg_build_qmake() +``` +#]===] function(vcpkg_build_qmake) - cmake_parse_arguments(_csc "SKIP_MAKEFILES" "BUILD_LOGNAME" "TARGETS;RELEASE_TARGETS;DEBUG_TARGETS" ${ARGN}) + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 _csc "SKIP_MAKEFILES" "BUILD_LOGNAME" "TARGETS;RELEASE_TARGETS;DEBUG_TARGETS") if(CMAKE_HOST_WIN32) - set(_PATHSEP ";") - vcpkg_find_acquire_program(JOM) - set(INVOKE "${JOM}") + if (VCPKG_QMAKE_USE_NMAKE) + find_program(NMAKE nmake) + set(INVOKE "${NMAKE}") + get_filename_component(NMAKE_EXE_PATH ${NMAKE} DIRECTORY) + set(PATH_GLOBAL "$ENV{PATH}") + set(ENV{PATH} "$ENV{PATH};${NMAKE_EXE_PATH}") + set(ENV{CL} "$ENV{CL} /MP${VCPKG_CONCURRENCY}") + else() + vcpkg_find_acquire_program(JOM) + set(INVOKE "${JOM}") + endif() else() - set(_PATHSEP ":") find_program(MAKE make) set(INVOKE "${MAKE}") endif() - # Make sure that the linker finds the libraries used + # Make sure that the linker finds the libraries used set(ENV_PATH_BACKUP "$ENV{PATH}") - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - set(DEBUG_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - set(RELEASE_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - endif() file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - list(APPEND _csc_RELEASE_TARGETS ${_csc_TARGETS}) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - list(APPEND _csc_DEBUG_TARGETS ${_csc_TARGETS}) - endif() - if(NOT _csc_BUILD_LOGNAME) set(_csc_BUILD_LOGNAME build) endif() function(run_jom TARGETS LOG_PREFIX LOG_SUFFIX) message(STATUS "Package ${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX}") - vcpkg_execute_required_process( - COMMAND ${INVOKE} ${TARGETS} + vcpkg_execute_build_process( + COMMAND ${INVOKE} -j ${VCPKG_CONCURRENCY} ${TARGETS} + NO_PARALLEL_COMMAND ${INVOKE} -j 1 ${TARGETS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${LOG_SUFFIX} LOGNAME package-${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX} ) @@ -56,55 +52,57 @@ function(vcpkg_build_qmake) set(ENV_CL_BACKUP "$ENV{_CL_}") set(ENV{_CL_} "/utf-8") - #First generate the makefiles so we can modify them + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/lib${_PATHSEP}${CURRENT_INSTALLED_DIR}/debug/bin${_PATHSEP}${CURRENT_INSTALLED_DIR}/tools/qt5${_PATHSEP}${ENV_PATH_BACKUP}") - if(NOT _csc_SKIP_MAKEFILES) - run_jom(qmake_all makefiles dbg) - - #Store debug makefiles path - file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - - foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - file(READ "${DEBUG_MAKEFILE}" _contents) - string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") - string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib shell32.lib" _contents "${_contents}") - string(REPLACE "tools\\qt5\\qmlcachegen.exe" "tools\\qt5-declarative\\qmlcachegen.exe" _contents "${_contents}") - string(REPLACE "tools/qt5/qmlcachegen" "tools/qt5-declarative/qmlcachegen" _contents "${_contents}") - string(REPLACE "debug\\lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") - string(REPLACE "lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") - string(REPLACE " Qt5Bootstrap.lib " " ${NATIVE_INSTALLED_DIR}\\tools\\qt5\\Qt5Bootstrap.lib Ole32.lib Netapi32.lib Advapi32.lib ${NATIVE_INSTALLED_DIR}\\lib\\zlib.lib Shell32.lib " _contents "${_contents}") - file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") - endforeach() - endif() - - run_jom("${_csc_DEBUG_TARGETS}" ${_csc_BUILD_LOGNAME} dbg) + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib${_PATHSEP}${CURRENT_INSTALLED_DIR}/bin${_PATHSEP}${CURRENT_INSTALLED_DIR}/tools/qt5${_PATHSEP}${ENV_PATH_BACKUP}") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(_installed_prefix_ "${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}") + set(_installed_libpath_ "${_installed_prefix_}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_installed_prefix_}/lib/manual-link/") + + vcpkg_add_to_path(PREPEND "${_installed_prefix_}/bin") + vcpkg_add_to_path(PREPEND "${_installed_prefix_}/lib") + + # We set LD_LIBRARY_PATH ENV variable to allow executing Qt tools (rcc,...) even with dynamic linking + if(CMAKE_HOST_UNIX) + if(DEFINED ENV{LD_LIBRARY_PATH}) + set(_ld_library_path_defined_ TRUE) + set(_ld_library_path_backup_ $ENV{LD_LIBRARY_PATH}) + set(ENV{LD_LIBRARY_PATH} "${_installed_libpath_}${VCPKG_HOST_PATH_SEPARATOR}${_ld_library_path_backup_}") + else() + set(_ld_library_path_defined_ FALSE) + set(ENV{LD_LIBRARY_PATH} "${_installed_libpath_}") + endif() + endif() + + list(APPEND _csc_${_buildname}_TARGETS ${_csc_TARGETS}) if(NOT _csc_SKIP_MAKEFILES) - run_jom(qmake_all makefiles rel) - - #Store release makefile path - file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - - foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - file(READ "${RELEASE_MAKEFILE}" _contents) - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib shell32.lib" _contents "${_contents}") - string(REPLACE "tools\\qt5\\qmlcachegen.exe" "tools\\qt5-declarative\\qmlcachegen.exe" _contents "${_contents}") - string(REPLACE "tools/qt5/qmlcachegen" "tools/qt5-declarative/qmlcachegen" _contents "${_contents}") - string(REPLACE "debug\\lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") - string(REPLACE "lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") - string(REPLACE " Qt5Bootstrap.lib " " ${NATIVE_INSTALLED_DIR}\\tools\\qt5\\Qt5Bootstrap.lib Ole32.lib Netapi32.lib Advapi32.lib ${NATIVE_INSTALLED_DIR}\\lib\\zlib.lib Shell32.lib " _contents "${_contents}") - file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") - endforeach() + run_jom(qmake_all makefiles ${_short_name_${_buildname}}) + endif() + run_jom("${_csc_${_buildname}_TARGETS}" ${_csc_BUILD_LOGNAME} ${_short_name_${_buildname}}) + + # Restore backup + if(CMAKE_HOST_UNIX) + if(_ld_library_path_defined_) + set(ENV{LD_LIBRARY_PATH} "${_ld_library_path_backup_}") + else() + unset(ENV{LD_LIBRARY_PATH}) + endif() endif() + endforeach() - run_jom("${_csc_RELEASE_TARGETS}" ${_csc_BUILD_LOGNAME} rel) - endif() - # Restore the original value of ENV{PATH} set(ENV{PATH} "${ENV_PATH_BACKUP}") set(ENV{_CL_} "${ENV_CL_BACKUP}") diff --git a/scripts/cmake/vcpkg_buildpath_length_warning.cmake b/scripts/cmake/vcpkg_buildpath_length_warning.cmake new file mode 100644 index 00000000000000..7b4032e7cd7255 --- /dev/null +++ b/scripts/cmake/vcpkg_buildpath_length_warning.cmake @@ -0,0 +1,22 @@ +#[===[.md: +# vcpkg_buildpath_length_warning + +Warns the user if their vcpkg installation path might be too long for the package they're installing. + +```cmake +vcpkg_buildpath_length_warning() +``` + +`vcpkg_buildpath_length_warning` warns the user if the number of bytes in the +path to `buildtrees` is bigger than `N`. Note that this is simply a warning, +and isn't relied on for correctness. +#]===] + +function(vcpkg_buildpath_length_warning warning_length) + string(LENGTH "${CURRENT_BUILDTREES_DIR}" buildtrees_path_length) + if(buildtrees_path_length GREATER warning_length AND CMAKE_HOST_WIN32) + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_check_features.cmake b/scripts/cmake/vcpkg_check_features.cmake index 81ebc234d94720..7679b0d11aa547 100644 --- a/scripts/cmake/vcpkg_check_features.cmake +++ b/scripts/cmake/vcpkg_check_features.cmake @@ -1,191 +1,233 @@ -## # vcpkg_check_features -## Check if one or more features are a part of a package installation. -## -## ## Usage -## ```cmake -## vcpkg_check_features( -## OUT_FEATURE_OPTIONS -## [FEATURES -## -## [ ] -## ...] -## [INVERTED_FEATURES -## -## [ ] -## ...] -## ) -## ``` -## `vcpkg_check_features()` accepts these parameters: -## -## * `OUT_FEATURE_OPTIONS`: -## An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS` -## and then set it to contain a list of option definitions (`-D=ON|OFF`). -## -## This should be set to `FEATURE_OPTIONS` by convention. -## -## * `FEATURES`: -## A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs. -## For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: -## -## * `-D=ON`, if a feature is specified for installation, -## * `-D=OFF`, otherwise. -## -## * `INVERTED_FEATURES`: -## A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`. -## For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: -## -## * `-D=OFF`, if a feature is specified for installation, -## * `-D=ON`, otherwise. -## -## -## ## Notes -## -## The `FEATURES` name parameter can be omitted if no `INVERTED_FEATURES` are used. -## -## At least one (`FEATURE_NAME`, `OPTION_NAME`) pair must be passed to the function call. -## -## Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication. -## If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists, -## two conflicting definitions are added to `OUT_FEATURE_OPTIONS`. -## -## -## ## Examples -## -## ### Example 1: Regular features -## -## ```cmake -## $ ./vcpkg install mimalloc[asm,secure] -## -## # ports/mimalloc/portfile.cmake -## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS -## # Keyword FEATURES is optional if INVERTED_FEATURES are not used -## asm MI_SEE_ASM -## override MI_OVERRIDE -## secure MI_SECURE -## ) -## -## vcpkg_configure_cmake( -## SOURCE_PATH ${SOURCE_PATH} -## PREFER_NINJA -## OPTIONS -## # Expands to "-DMI_SEE_ASM=ON; -DMI_OVERRIDE=OFF; -DMI_SECURE=ON" -## ${FEATURE_OPTIONS} -## ) -## ``` -## -## ### Example 2: Inverted features -## -## ```cmake -## $ ./vcpkg install cpprestsdk[websockets] -## -## # ports/cpprestsdk/portfile.cmake -## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS -## INVERTED_FEATURES # <- Keyword INVERTED_FEATURES required -## brotli CPPREST_EXCLUDE_BROTLI -## websockets CPPREST_EXCLUDE_WEBSOCKETS -## ) -## -## vcpkg_configure_cmake( -## SOURCE_PATH ${SOURCE_PATH} -## PREFER_NINJA -## OPTIONS -## # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON; -DCPPREST_EXCLUDE_WEBSOCKETS=OFF" -## ${FEATURE_OPTIONS} -## ) -## ``` -## -## ### Example 3: Set multiple options for same feature -## -## ```cmake -## $ ./vcpkg install pcl[cuda] -## -## # ports/pcl/portfile.cmake -## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS -## cuda WITH_CUDA -## cuda BUILD_CUDA -## cuda BUILD_GPU -## ) -## -## vcpkg_configure_cmake( -## SOURCE_PATH ${SOURCE_PATH} -## PREFER_NINJA -## OPTIONS -## # Expands to "-DWITH_CUDA=ON; -DBUILD_CUDA=ON; -DBUILD_GPU=ON" -## ${FEATURE_OPTIONS} -## ) -## ``` -## -## ### Example 4: Use regular and inverted features -## -## ```cmake -## $ ./vcpkg install rocksdb[tbb] -## -## # ports/rocksdb/portfile.cmake -## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS -## FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used -## tbb WITH_TBB -## INVERTED_FEATURES -## tbb ROCKSDB_IGNORE_PACKAGE_TBB -## ) -## -## vcpkg_configure_cmake( -## SOURCE_PATH ${SOURCE_PATH} -## PREFER_NINJA -## OPTIONS -## # Expands to "-DWITH_TBB=ON; -DROCKSDB_IGNORE_PACKAGE_TBB=OFF" -## ${FEATURE_OPTIONS} -## ) -## ``` -## -## ## Examples in portfiles -## -## * [cpprestsdk](https://github.com/microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) -## * [pcl](https://github.com/microsoft/vcpkg/blob/master/ports/pcl/portfile.cmake) -## * [rocksdb](https://github.com/microsoft/vcpkg/blob/master/ports/rocksdb/portfile.cmake) -## +#[===[.md: +# vcpkg_check_features +Check if one or more features are a part of a package installation. + +```cmake +vcpkg_check_features( + OUT_FEATURE_OPTIONS + [PREFIX ] + [FEATURES + [ ]... + ] + [INVERTED_FEATURES + [ ]... + ] +) +``` + +The `` should be set to `FEATURE_OPTIONS` by convention. + +`vcpkg_check_features()` will: + +- for each `` passed in `FEATURES`: + - if the feature is set, add `-D=ON` to ``, + and set `_` to ON. + - if the feature is not set, add `-D=OFF` to ``, + and set `_` to OFF. +- for each `` passed in `INVERTED_FEATURES`: + - if the feature is set, add `-D=OFF` to ``, + and set `_` to OFF. + - if the feature is not set, add `-D=ON` to ``, + and set `_` to ON. + +If `` is not passed, then the feature vars set are simply ``, +not `_`. + +If `INVERTED_FEATURES` is not passed, then the `FEATURES` keyword is optional. +This behavior is deprecated. + +If the same `` is passed multiple times, +then `vcpkg_check_features` will cause a fatal error, +since that is a bug. + +## Examples + +### Example 1: Regular features + +```cmake +$ ./vcpkg install mimalloc[asm,secure] + +# ports/mimalloc/portfile.cmake +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + asm MI_SEE_ASM + override MI_OVERRIDE + secure MI_SECURE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DMI_SEE_ASM=ON;-DMI_OVERRIDE=OFF;-DMI_SECURE=ON" + ${FEATURE_OPTIONS} +) +``` + +### Example 2: Inverted features + +```cmake +$ ./vcpkg install cpprestsdk[websockets] + +# ports/cpprestsdk/portfile.cmake +vcpkg_check_features( + INVERTED_FEATURES + brotli CPPREST_EXCLUDE_BROTLI + websockets CPPREST_EXCLUDE_WEBSOCKETS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON;-DCPPREST_EXCLUDE_WEBSOCKETS=OFF" + ${FEATURE_OPTIONS} +) +``` + +### Example 3: Set multiple options for same feature + +```cmake +$ ./vcpkg install pcl[cuda] + +# ports/pcl/portfile.cmake +vcpkg_check_features( + FEATURES + cuda WITH_CUDA + cuda BUILD_CUDA + cuda BUILD_GPU +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DWITH_CUDA=ON;-DBUILD_CUDA=ON;-DBUILD_GPU=ON" + ${FEATURE_OPTIONS} +) +``` + +### Example 4: Use regular and inverted features + +```cmake +$ ./vcpkg install rocksdb[tbb] + +# ports/rocksdb/portfile.cmake +vcpkg_check_features( + FEATURES + tbb WITH_TBB + INVERTED_FEATURES + tbb ROCKSDB_IGNORE_PACKAGE_TBB +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Expands to "-DWITH_TBB=ON;-DROCKSDB_IGNORE_PACKAGE_TBB=OFF" + ${FEATURE_OPTIONS} +) +``` + +## Examples in portfiles + +* [cpprestsdk](https://github.com/microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [pcl](https://github.com/microsoft/vcpkg/blob/master/ports/pcl/portfile.cmake) +* [rocksdb](https://github.com/microsoft/vcpkg/blob/master/ports/rocksdb/portfile.cmake) +#]===] + +function(z_vcpkg_check_features_last_feature out_var features_name features_list) + list(LENGTH features_list features_length) + math(EXPR features_length_mod_2 "${features_length} % 2") + if(NOT features_length_mod_2 EQUAL 0) + message(FATAL_ERROR "vcpkg_check_features has an incorrect number of arguments to ${features_name}") + endif() + + math(EXPR last_feature "${features_length} / 2 - 1") + set("${out_var}" "${last_feature}" PARENT_SCOPE) +endfunction() + +function(z_vcpkg_check_features_get_feature idx features_list out_feature_name out_feature_var) + math(EXPR feature_name_idx "${idx} * 2") + math(EXPR feature_var_idx "${feature_name_idx} + 1") + + list(GET features_list "${feature_name_idx}" feature_name) + list(GET features_list "${feature_var_idx}" feature_var) + + set("${out_feature_name}" "${feature_name}" PARENT_SCOPE) + set("${out_feature_var}" "${feature_var}" PARENT_SCOPE) +endfunction() + function(vcpkg_check_features) - cmake_parse_arguments(_vcf "" "OUT_FEATURE_OPTIONS" "FEATURES;INVERTED_FEATURES" ${ARGN}) + cmake_parse_arguments( + PARSE_ARGV 0 "arg" + "" + "OUT_FEATURE_OPTIONS;PREFIX" + "FEATURES;INVERTED_FEATURES" + ) - if (NOT DEFINED _vcf_OUT_FEATURE_OPTIONS) - message(FATAL_ERROR "OUT_FEATURE_OPTIONS must be specified.") + if(NOT DEFINED arg_OUT_FEATURE_OPTIONS) + message(FATAL_ERROR "OUT_FEATURE_OPTIONS must be defined.") + endif() + if(NOT DEFINED arg_PREFIX) + set(prefix "") + else() + set(prefix "${arg_PREFIX}_") endif() - macro(_check_features _vcf_ARGUMENT _set_if _set_else) - list(LENGTH ${_vcf_ARGUMENT} FEATURES_SET_LEN) - math(EXPR _vcf_INCORRECT_ARGN "${FEATURES_SET_LEN} % 2") - if(_vcf_INCORRECT_ARGN) - message(FATAL_ERROR "Called with incorrect number of arguments.") - endif() + set(feature_options) + set(feature_variables) - set(_vcf_IS_FEATURE_NAME_ARG ON) - foreach(_vcf_ARG ${${_vcf_ARGUMENT}}) - if(_vcf_IS_FEATURE_NAME_ARG) - set(_vcf_FEATURE_NAME ${_vcf_ARG}) - if(NOT ${_vcf_FEATURE_NAME} IN_LIST ALL_FEATURES) - message(FATAL_ERROR "Unknown feature: ${_vcf_FEATURE_NAME}") - endif() - set(_vcf_IS_FEATURE_NAME_ARG OFF) + if(NOT DEFINED arg_FEATURES AND NOT DEFINED arg_INVERTED_FEATURES) + message(DEPRECATION +"calling `vcpkg_check_features` without the `FEATURES` keyword has been deprecated. + Please add the `FEATURES` keyword to the call.") + set(arg_FEATURES "${arg_UNPARSED_ARGUMENTS}") + elseif(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_check_features called with unknown arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + + + z_vcpkg_check_features_last_feature(last_feature "FEATURES" "${arg_FEATURES}") + if(last_feature GREATER_EQUAL 0) + foreach(feature_pair_idx RANGE "${last_feature}") + z_vcpkg_check_features_get_feature("${feature_pair_idx}" "${arg_FEATURES}" feature_name feature_var) + + list(APPEND feature_variables "${feature_var}") + if(feature_name IN_LIST FEATURES) + list(APPEND feature_options "-D${feature_var}=ON") + set("${prefix}${feature_var}" ON PARENT_SCOPE) else() - set(_vcf_FEATURE_VARIABLE ${_vcf_ARG}) - if(${_vcf_FEATURE_NAME} IN_LIST FEATURES) - list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_if}") - else() - list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_else}") - endif() - set(_vcf_IS_FEATURE_NAME_ARG ON) + list(APPEND feature_options "-D${feature_var}=OFF") + set("${prefix}${feature_var}" OFF PARENT_SCOPE) endif() endforeach() - endmacro() + endif() - set(_vcf_FEATURE_OPTIONS) + z_vcpkg_check_features_last_feature(last_inverted_feature "INVERTED_FEATURES" "${arg_INVERTED_FEATURES}") + if(last_inverted_feature GREATER_EQUAL 0) + foreach(feature_pair_idx RANGE "${last_inverted_feature}") + z_vcpkg_check_features_get_feature("${feature_pair_idx}" "${arg_INVERTED_FEATURES}" feature_name feature_var) - if (DEFINED _vcf_FEATURES OR DEFINED _vcf_INVERTED_FEATURES) - _check_features(_vcf_FEATURES ON OFF) - _check_features(_vcf_INVERTED_FEATURES OFF ON) - else() - # Skip arguments that correspond to OUT_FEATURE_OPTIONS and its value. - list(SUBLIST ARGN 2 -1 _vcf_ARGN) - _check_features(_vcf_ARGN ON OFF) + list(APPEND feature_variables "${feature_var}") + if(feature_name IN_LIST FEATURES) + list(APPEND feature_options "-D${feature_var}=OFF") + set("${prefix}${feature_var}" OFF PARENT_SCOPE) + else() + list(APPEND feature_options "-D${feature_var}=ON") + set("${prefix}${feature_var}" ON PARENT_SCOPE) + endif() + endforeach() endif() - set(${_vcf_OUT_FEATURE_OPTIONS} "${_vcf_FEATURE_OPTIONS}" PARENT_SCOPE) + + list(SORT feature_variables) + set(last_variable) + foreach(variable IN LISTS feature_variables) + if(variable STREQUAL last_variable) + message(FATAL_ERROR "vcpkg_check_features passed the same feature variable multiple times: '${variable}'") + endif() + endforeach() + + set("${arg_OUT_FEATURE_OPTIONS}" "${feature_options}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_check_linkage.cmake b/scripts/cmake/vcpkg_check_linkage.cmake index 101adc4fd5864b..f2e9fe10aabcf0 100644 --- a/scripts/cmake/vcpkg_check_linkage.cmake +++ b/scripts/cmake/vcpkg_check_linkage.cmake @@ -1,53 +1,72 @@ -## # vcpkg_check_linkage -## -## Asserts the available library and CRT linkage options for the port. -## -## ## Usage -## ```cmake -## vcpkg_check_linkage( -## [ONLY_STATIC_LIBRARY | ONLY_DYNAMIC_LIBRARY] -## [ONLY_STATIC_CRT | ONLY_DYNAMIC_CRT] -## ) -## ``` -## -## ## Parameters -## ### ONLY_STATIC_LIBRARY -## Indicates that this port can only be built with static library linkage. -## -## ### ONLY_DYNAMIC_LIBRARY -## Indicates that this port can only be built with dynamic/shared library linkage. -## -## ### ONLY_STATIC_CRT -## Indicates that this port can only be built with static CRT linkage. -## -## ### ONLY_DYNAMIC_CRT -## Indicates that this port can only be built with dynamic/shared CRT linkage. -## -## ## Notes -## This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, depending on what was requested by the user versus what the library supports. -## -## ## Examples -## -## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) +#[===[.md: +# vcpkg_check_linkage + +Asserts the available library and CRT linkage options for the port. + +## Usage +```cmake +vcpkg_check_linkage( + [ONLY_STATIC_LIBRARY | ONLY_DYNAMIC_LIBRARY] + [ONLY_STATIC_CRT | ONLY_DYNAMIC_CRT] +) +``` + +## Parameters +### ONLY_STATIC_LIBRARY +Indicates that this port can only be built with static library linkage. + +Note: If the user requested a dynamic build ONLY_STATIC_LIBRARY will result in a note being printed, not a fatal error. + +### ONLY_DYNAMIC_LIBRARY +Indicates that this port can only be built with dynamic/shared library linkage. + +### ONLY_STATIC_CRT +Indicates that this port can only be built with static CRT linkage. + +### ONLY_DYNAMIC_CRT +Indicates that this port can only be built with dynamic/shared CRT linkage. + +## Notes +This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, depending on what was requested by the user versus what the library supports. + +## Examples + +* [abseil](https://github.com/Microsoft/vcpkg/blob/master/ports/abseil/portfile.cmake) +#]===] + function(vcpkg_check_linkage) - cmake_parse_arguments(_csc "ONLY_STATIC_LIBRARY;ONLY_DYNAMIC_LIBRARY;ONLY_DYNAMIC_CRT;ONLY_STATIC_CRT" "" "" ${ARGN}) + cmake_parse_arguments(PARSE_ARGV 0 arg + "ONLY_STATIC_LIBRARY;ONLY_DYNAMIC_LIBRARY;ONLY_DYNAMIC_CRT;ONLY_STATIC_CRT" + "" + "" + ) - if(_csc_ONLY_STATIC_LIBRARY AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + if(arg_ONLY_STATIC_LIBRARY AND arg_ONLY_DYNAMIC_LIBRARY) + message(FATAL_ERROR "Requesting both ONLY_STATIC_LIBRARY and ONLY_DYNAMIC_LIBRARY; this is an error.") + endif() + if(arg_ONLY_STATIC_CRT AND arg_ONLY_DYNAMIC_CRT) + message(FATAL_ERROR "Requesting both ONLY_STATIC_CRT and ONLY_DYNAMIC_CRT; this is an error.") + endif() + + if(arg_ONLY_STATIC_LIBRARY AND "${VCPKG_LIBRARY_LINKAGE}" STREQUAL "dynamic") message(STATUS "Note: ${PORT} only supports static library linkage. Building static library.") set(VCPKG_LIBRARY_LINKAGE static PARENT_SCOPE) - endif() - if(_csc_ONLY_DYNAMIC_LIBRARY AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + elseif(arg_ONLY_DYNAMIC_LIBRARY AND "${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static") message(STATUS "Note: ${PORT} only supports dynamic library linkage. Building dynamic library.") - if(VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "Refusing to build unexpected dynamic library against the static CRT. If this is desired, please configure your triplet to directly request this configuration.") + if("${VCPKG_CRT_LINKAGE}" STREQUAL "static") + message(FATAL_ERROR "Refusing to build unexpected dynamic library against the static CRT. + If this is desired, please configure your triplet to directly request this configuration.") endif() set(VCPKG_LIBRARY_LINKAGE dynamic PARENT_SCOPE) endif() - if(_csc_ONLY_DYNAMIC_CRT AND VCPKG_CRT_LINKAGE STREQUAL "static") + if(arg_ONLY_DYNAMIC_CRT AND "${VCPKG_CRT_LINKAGE}" STREQUAL "static") message(FATAL_ERROR "${PORT} only supports dynamic crt linkage") - endif() - if(_csc_ONLY_STATIC_CRT AND VCPKG_CRT_LINKAGE STREQUAL "dynamic") + elseif(arg_ONLY_STATIC_CRT AND "${VCPKG_CRT_LINKAGE}" STREQUAL "dynamic") message(FATAL_ERROR "${PORT} only supports static crt linkage") endif() endfunction() diff --git a/scripts/cmake/vcpkg_clean_executables_in_bin.cmake b/scripts/cmake/vcpkg_clean_executables_in_bin.cmake new file mode 100644 index 00000000000000..e1cea3a958af05 --- /dev/null +++ b/scripts/cmake/vcpkg_clean_executables_in_bin.cmake @@ -0,0 +1,63 @@ +#[===[.md: +# vcpkg_clean_executables_in_bin + +Remove specified executables found in `${CURRENT_PACKAGES_DIR}/bin` and `${CURRENT_PACKAGES_DIR}/debug/bin`. If, after all specified executables have been removed, and the `bin` and `debug/bin` directories are empty, then also delete `bin` and `debug/bin` directories. + +## Usage +```cmake +vcpkg_clean_executables_in_bin( + FILE_NAMES ... +) +``` + +## Parameters +### FILE_NAMES +A list of executable filenames without extension. + +## Notes +Generally, there is no need to call this function manually. Instead, pass an extra `AUTO_CLEAN` argument when calling `vcpkg_copy_tools`. + +## Examples +* [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake) +#]===] + +function(z_vcpkg_clean_executables_in_bin_remove_directory_if_empty directory) + if(NOT EXISTS "${directory}") + return() + endif() + + if(NOT IS_DIRECTORY "${directory}") + message(FATAL_ERROR "${directory} must be a directory") + endif() + + file(GLOB items "${directory}/*") + if("${items}" STREQUAL "") + file(REMOVE_RECURSE "${directory}") + endif() +endfunction() + + +function(vcpkg_clean_executables_in_bin) + cmake_parse_arguments(PARSE_ARGV 0 arg "" "" "FILE_NAMES") + + if(NOT DEFINED arg_FILE_NAMES) + message(FATAL_ERROR "FILE_NAMES must be specified.") + endif() + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + + foreach(file_name IN LISTS arg_FILE_NAMES) + file(REMOVE + "${CURRENT_PACKAGES_DIR}/bin/${file_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" + "${CURRENT_PACKAGES_DIR}/debug/bin/${file_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" + "${CURRENT_PACKAGES_DIR}/bin/${file_name}.pdb" + "${CURRENT_PACKAGES_DIR}/debug/bin/${file_name}.pdb" + ) + endforeach() + + z_vcpkg_clean_executables_in_bin_remove_directory_if_empty("${CURRENT_PACKAGES_DIR}/bin") + z_vcpkg_clean_executables_in_bin_remove_directory_if_empty("${CURRENT_PACKAGES_DIR}/debug/bin") +endfunction() diff --git a/scripts/cmake/vcpkg_clean_msbuild.cmake b/scripts/cmake/vcpkg_clean_msbuild.cmake index b0d77dfd2b6537..068208fb8b6345 100644 --- a/scripts/cmake/vcpkg_clean_msbuild.cmake +++ b/scripts/cmake/vcpkg_clean_msbuild.cmake @@ -1,19 +1,24 @@ -## # vcpkg_clean_msbuild -## -## Clean intermediate files generated by `vcpkg_install_msbuild()`. -## -## ## Usage -## ```cmake -## vcpkg_clean_msbuild() -## ``` -## -## ## Examples -## -## * [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) +#[===[.md: +# vcpkg_clean_msbuild + +Clean intermediate files generated by `vcpkg_install_msbuild()`. + +## Usage +```cmake +vcpkg_clean_msbuild() +``` + +## Examples + +* [python3](https://github.com/Microsoft/vcpkg/blob/master/ports/python3/portfile.cmake) +#]===] function(vcpkg_clean_msbuild) + if(NOT ARGC EQUAL 0) + message(WARNING "vcpkg_clean_msbuild was passed extra arguments: ${ARGV}") + endif() file(REMOVE_RECURSE - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" ) endfunction() diff --git a/scripts/cmake/vcpkg_common_definitions.cmake b/scripts/cmake/vcpkg_common_definitions.cmake index 8dc05de3cc14be..e53d9396354171 100644 --- a/scripts/cmake/vcpkg_common_definitions.cmake +++ b/scripts/cmake/vcpkg_common_definitions.cmake @@ -1,14 +1,208 @@ -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(VCPKG_TARGET_IS_WINDOWS 1) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(VCPKG_TARGET_IS_UWP 1) - endif() -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(VCPKG_TARGET_IS_OSX 1) -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(VCPKG_TARGET_IS_LINUX 1) -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") - set(VCPKG_TARGET_IS_ANDROID 1) -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - set(VCPKG_TARGET_IS_FREEBSD 1) -endif() +#[===[.md: +# vcpkg_common_definitions + +This file defines the following variables which are commonly needed or used in portfiles: + +```cmake +VCPKG_TARGET_IS_ with being one of the following: WINDOWS, UWP, MINGW, LINUX, OSX, ANDROID, FREEBSD, OPENBSD. only defined if +VCPKG_HOST_IS_ with being one of the following: WINDOWS, LINUX, OSX, FREEBSD, OPENBSD. only defined if +VCPKG_HOST_PATH_SEPARATOR Host specific path separator (USAGE: "${VCPKG_HOST_PATH_SEPARATOR}"; only use and pass variables with VCPKG_HOST_PATH_SEPARATOR within "") +VCPKG_HOST_EXECUTABLE_SUFFIX executable suffix of the host +VCPKG_TARGET_EXECUTABLE_SUFFIX executable suffix of the target +VCPKG_TARGET_STATIC_LIBRARY_PREFIX static library prefix for target (same as CMAKE_STATIC_LIBRARY_PREFIX) +VCPKG_TARGET_STATIC_LIBRARY_SUFFIX static library suffix for target (same as CMAKE_STATIC_LIBRARY_SUFFIX) +VCPKG_TARGET_SHARED_LIBRARY_PREFIX shared library prefix for target (same as CMAKE_SHARED_LIBRARY_PREFIX) +VCPKG_TARGET_SHARED_LIBRARY_SUFFIX shared library suffix for target (same as CMAKE_SHARED_LIBRARY_SUFFIX) +VCPKG_TARGET_IMPORT_LIBRARY_PREFIX import library prefix for target (same as CMAKE_IMPORT_LIBRARY_PREFIX) +VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX import library suffix for target (same as CMAKE_IMPORT_LIBRARY_SUFFIX) +VCPKG_FIND_LIBRARY_PREFIXES target dependent prefixes used for find_library calls in portfiles +VCPKG_FIND_LIBRARY_SUFFIXES target dependent suffixes used for find_library calls in portfiles +VCPKG_SYSTEM_LIBRARIES list of libraries are provide by the toolchain and are not managed by vcpkg +TARGET_TRIPLET the name of the current triplet to build for +CURRENT_INSTALLED_DIR the absolute path to the installed files for the current triplet +HOST_TRIPLET the name of the triplet corresponding to the host +CURRENT_HOST_INSTALLED_DIR the absolute path to the installed files for the host triplet +VCPKG_CROSSCOMPILING Whether vcpkg is cross-compiling: in other words, whether TARGET_TRIPLET and HOST_TRIPLET are different +``` + +CMAKE_STATIC_LIBRARY_(PREFIX|SUFFIX), CMAKE_SHARED_LIBRARY_(PREFIX|SUFFIX) and CMAKE_IMPORT_LIBRARY_(PREFIX|SUFFIX) are defined for the target +Furthermore the variables CMAKE_FIND_LIBRARY_(PREFIXES|SUFFIXES) are also defined for the target so that +portfiles are able to use find_library calls to discover dependent libraries within the current triplet for ports. +#]===] + +string(COMPARE NOTEQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" VCPKG_CROSSCOMPILING) +#Helper variable to identify the Target system. VCPKG_TARGET_IS_ +if (NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "") + set(VCPKG_TARGET_IS_WINDOWS ON) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_TARGET_IS_WINDOWS ON) + set(VCPKG_TARGET_IS_UWP ON) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_TARGET_IS_OSX ON) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(VCPKG_TARGET_IS_IOS ON) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(VCPKG_TARGET_IS_LINUX ON) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") + set(VCPKG_TARGET_IS_ANDROID ON) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(VCPKG_TARGET_IS_FREEBSD ON) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + set(VCPKG_TARGET_IS_OPENBSD ON) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + set(VCPKG_TARGET_IS_WINDOWS ON) + set(VCPKG_TARGET_IS_MINGW ON) +endif() + +#Helper variables to identify the host system name +if (CMAKE_HOST_WIN32) + set(VCPKG_HOST_IS_WINDOWS ON) +elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_HOST_IS_OSX ON) +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(VCPKG_HOST_IS_LINUX ON) +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD") + set(VCPKG_HOST_IS_FREEBSD ON) +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "OpenBSD") + set(VCPKG_HOST_IS_OPENBSD ON) +endif() + +#Helper variable to identify the host path separator. +if(CMAKE_HOST_WIN32) + set(VCPKG_HOST_PATH_SEPARATOR ";") +elseif(CMAKE_HOST_UNIX) + set(VCPKG_HOST_PATH_SEPARATOR ":") +endif() + +#Helper variables to identify executables on host/target +if(CMAKE_HOST_WIN32) + set(VCPKG_HOST_EXECUTABLE_SUFFIX ".exe") +else() + set(VCPKG_HOST_EXECUTABLE_SUFFIX "") +endif() +#set(CMAKE_EXECUTABLE_SUFFIX ${VCPKG_HOST_EXECUTABLE_SUFFIX}) not required by find_program + +if(VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_TARGET_EXECUTABLE_SUFFIX ".exe") +else() + set(VCPKG_TARGET_EXECUTABLE_SUFFIX "") +endif() + +#Helper variables for libraries +if(VCPKG_TARGET_IS_MINGW) + set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".a") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX ".dll.a") + set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".dll") + set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "lib") + set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "lib") + set(VCPKG_TARGET_IMPORT_LIBRARY_PREFIX "lib") + set(VCPKG_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib") + set(VCPKG_FIND_LIBRARY_PREFIXES "lib" "") +elseif(VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".lib") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX ".lib") + set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".dll") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX ".lib") + set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "") + set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "") + set(VCPKG_TARGET_IMPORT_LIBRARY_PREFIX "") + set(VCPKG_FIND_LIBRARY_SUFFIXES ".lib" ".dll") #This is a slight modification to CMakes value which does not include ".dll". + set(VCPKG_FIND_LIBRARY_PREFIXES "" "lib") #This is a slight modification to CMakes value which does not include "lib". +elseif(VCPKG_TARGET_IS_OSX) + set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".a") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX "") + set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".dylib") + set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "lib") + set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "lib") + set(VCPKG_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".so" ".a") + set(VCPKG_FIND_LIBRARY_PREFIXES "lib" "") +else() + set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".a") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX "") + set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".so") + set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "lib") + set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "lib") + set(VCPKG_FIND_LIBRARY_SUFFIXES ".so" ".a") + set(VCPKG_FIND_LIBRARY_PREFIXES "lib" "") +endif() +#Setting these variables allows find_library to work in script mode and thus in portfiles! +#This allows us scale down on hardcoded target dependent paths in portfiles +set(CMAKE_STATIC_LIBRARY_SUFFIX "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") +set(CMAKE_SHARED_LIBRARY_SUFFIX "${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") +set(CMAKE_IMPORT_LIBRARY_SUFFIX "${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}") +set(CMAKE_STATIC_LIBRARY_PREFIX "${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}") +set(CMAKE_SHARED_LIBRARY_PREFIX "${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}") +set(CMAKE_IMPORT_LIBRARY_PREFIX "${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}") + +set(CMAKE_FIND_LIBRARY_SUFFIXES "${VCPKG_FIND_LIBRARY_SUFFIXES}" CACHE INTERNAL "") # Required by find_library +set(CMAKE_FIND_LIBRARY_PREFIXES "${VCPKG_FIND_LIBRARY_PREFIXES}" CACHE INTERNAL "") # Required by find_library + +# Append platform libraries to VCPKG_SYSTEM_LIBRARIES +# The variable are just appended to permit to custom triplets define the variable + +# Platforms with libdl +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_OSX) + list(APPEND VCPKG_SYSTEM_LIBRARIES dl) +endif() + +# Platforms with libm +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_OPENBSD OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_MINGW) + list(APPEND VCPKG_SYSTEM_LIBRARIES m) +endif() + +# Platforms with pthread +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_OPENBSD OR VCPKG_TARGET_IS_MINGW) + list(APPEND VCPKG_SYSTEM_LIBRARIES pthread) +endif() + +# Platforms with libstdc++ +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_OPENBSD OR VCPKG_TARGET_IS_MINGW) + list(APPEND VCPKG_SYSTEM_LIBRARIES [[stdc\+\+]]) +endif() + +# Platforms with libc++ +if(VCPKG_TARGET_IS_OSX) + list(APPEND VCPKG_SYSTEM_LIBRARIES [[c\+\+]]) +endif() + +# Platforms with librt +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_MINGW) + list(APPEND VCPKG_SYSTEM_LIBRARIES rt) +endif() + +# Platforms with GCC libs +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_OPENBSD OR VCPKG_TARGET_IS_MINGW) + list(APPEND VCPKG_SYSTEM_LIBRARIES gcc) + list(APPEND VCPKG_SYSTEM_LIBRARIES gcc_s) +endif() + +# Platforms with system iconv +if(VCPKG_TARGET_IS_OSX) + list(APPEND VCPKG_SYSTEM_LIBRARIES iconv) +endif() + +# Windows system libs +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND VCPKG_SYSTEM_LIBRARIES advapi32) + list(APPEND VCPKG_SYSTEM_LIBRARIES bcrypt) + list(APPEND VCPKG_SYSTEM_LIBRARIES dinput8) + list(APPEND VCPKG_SYSTEM_LIBRARIES gdi32) + list(APPEND VCPKG_SYSTEM_LIBRARIES imm32) + list(APPEND VCPKG_SYSTEM_LIBRARIES oleaut32) + list(APPEND VCPKG_SYSTEM_LIBRARIES ole32) + list(APPEND VCPKG_SYSTEM_LIBRARIES psapi) + list(APPEND VCPKG_SYSTEM_LIBRARIES secur32) + list(APPEND VCPKG_SYSTEM_LIBRARIES setupapi) + list(APPEND VCPKG_SYSTEM_LIBRARIES shell32) + list(APPEND VCPKG_SYSTEM_LIBRARIES shlwapi) + list(APPEND VCPKG_SYSTEM_LIBRARIES strmiids) + list(APPEND VCPKG_SYSTEM_LIBRARIES user32) + list(APPEND VCPKG_SYSTEM_LIBRARIES uuid) + list(APPEND VCPKG_SYSTEM_LIBRARIES version) + list(APPEND VCPKG_SYSTEM_LIBRARIES vfw32) + list(APPEND VCPKG_SYSTEM_LIBRARIES winmm) + list(APPEND VCPKG_SYSTEM_LIBRARIES wsock32) + list(APPEND VCPKG_SYSTEM_LIBRARIES Ws2_32) + list(APPEND VCPKG_SYSTEM_LIBRARIES wldap32) + list(APPEND VCPKG_SYSTEM_LIBRARIES crypt32) +endif() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index e9e52bad841d2c..5151647894b33d 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -1,36 +1,3 @@ -include(vcpkg_acquire_msys) -include(vcpkg_add_to_path) -include(vcpkg_check_features) -include(vcpkg_check_linkage) -include(vcpkg_clean_msbuild) -include(vcpkg_download_distfile) -include(vcpkg_extract_source_archive) -include(vcpkg_extract_source_archive_ex) -include(vcpkg_execute_required_process) -include(vcpkg_execute_required_process_repeat) -include(vcpkg_execute_build_process) -include(vcpkg_fail_port_install) -include(vcpkg_find_acquire_program) -include(vcpkg_fixup_cmake_targets) -include(vcpkg_from_github) -include(vcpkg_from_gitlab) -include(vcpkg_from_bitbucket) -include(vcpkg_build_cmake) -include(vcpkg_build_msbuild) -include(vcpkg_build_qmake) -include(vcpkg_install_cmake) -include(vcpkg_install_meson) -include(vcpkg_install_msbuild) -include(vcpkg_configure_cmake) -include(vcpkg_configure_meson) -include(vcpkg_configure_qmake) -include(vcpkg_apply_patches) -include(vcpkg_copy_pdbs) -include(vcpkg_copy_tool_dependencies) -include(vcpkg_get_program_files_32_bit) -include(vcpkg_get_program_files_platform_bitness) -include(vcpkg_get_windows_sdk) -include(vcpkg_replace_string) -include(vcpkg_from_git) -include(vcpkg_test_cmake) -include(vcpkg_prettify_command) +# DEPRECATED + +message("${Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL}" "vcpkg_common_functions has been removed and all values are automatically provided in all portfile.cmake invocations. Please remove `include(vcpkg_common_functions)`.") diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 6c392d385b7704..1e0a1100d5fb7f 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -1,85 +1,130 @@ -## # vcpkg_configure_cmake -## -## Configure CMake for Debug and Release builds of a project. -## -## ## Usage -## ```cmake -## vcpkg_configure_cmake( -## SOURCE_PATH <${SOURCE_PATH}> -## [PREFER_NINJA] -## [DISABLE_PARALLEL_CONFIGURE] -## [NO_CHARSET_FLAG] -## [GENERATOR <"NMake Makefiles">] -## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] -## [OPTIONS_RELEASE <-DOPTIMIZE=1>...] -## [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] -## ) -## ``` -## -## ## Parameters -## ### SOURCE_PATH -## Specifies the directory containing the `CMakeLists.txt`. -## By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. -## -## ### PREFER_NINJA -## Indicates that, when available, Vcpkg should use Ninja to perform the build. -## This should be specified unless the port is known to not work under Ninja. -## -## ### DISABLE_PARALLEL_CONFIGURE -## Disables running the CMake configure step in parallel. -## This is needed for libraries which write back into their source directory during configure. -## -## ### NO_CHARSET_FLAG -## Disables passing `utf-8` as the default character set to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`. -## -## This is needed for libraries that set their own source code's character set. -## -## ### GENERATOR -## Specifies the precise generator to use. -## -## This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build. -## If used for this purpose, it should be set to "NMake Makefiles". -## -## ### OPTIONS -## Additional options passed to CMake during the configuration. -## -## ### OPTIONS_RELEASE -## Additional options passed to CMake during the Release configuration. These are in addition to `OPTIONS`. -## -## ### OPTIONS_DEBUG -## Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. -## -## ## Notes -## This command supplies many common arguments to CMake. To see the full list, examine the source. -## -## ## Examples -## -## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) -## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) -## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) -## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +# DEPRECATED BY ports/vcpkg-cmake/vcpkg_cmake_configure +#[===[.md: +# vcpkg_configure_cmake + +Configure CMake for Debug and Release builds of a project. + +## Usage +```cmake +vcpkg_configure_cmake( + SOURCE_PATH <${SOURCE_PATH}> + [PREFER_NINJA] + [DISABLE_PARALLEL_CONFIGURE] + [NO_CHARSET_FLAG] + [GENERATOR <"NMake Makefiles">] + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] + [MAYBE_UNUSED_VARIABLES ...] +) +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the `CMakeLists.txt`. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PREFER_NINJA +Indicates that, when available, Vcpkg should use Ninja to perform the build. +This should be specified unless the port is known to not work under Ninja. + +### DISABLE_PARALLEL_CONFIGURE +Disables running the CMake configure step in parallel. +This is needed for libraries which write back into their source directory during configure. + +This also disables CMAKE_DISABLE_SOURCE_CHANGES. + +### NO_CHARSET_FLAG +Disables passing `utf-8` as the default character set to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`. + +This is needed for libraries that set their own source code's character set. + +### GENERATOR +Specifies the precise generator to use. + +This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build. +If used for this purpose, it should be set to `"NMake Makefiles"`. + +### OPTIONS +Additional options passed to CMake during the configuration. + +### OPTIONS_RELEASE +Additional options passed to CMake during the Release configuration. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. + +### MAYBE_UNUSED_VARIABLES +Any CMake variables which are explicitly passed in, but which may not be used on all platforms. +For example: +```cmake +vcpkg_cmake_configure( + ... + OPTIONS + -DBUILD_EXAMPLE=OFF + ... + MAYBE_UNUSED_VARIABLES + BUILD_EXAMPLE +) +``` + +### LOGNAME +Name of the log to write the output of the configure call to. + +## Notes +This command supplies many common arguments to CMake. To see the full list, examine the source. + +## Examples + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +#]===] + function(vcpkg_configure_cmake) - cmake_parse_arguments(_csc - "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG" - "SOURCE_PATH;GENERATOR" - "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" - ${ARGN} + cmake_parse_arguments(PARSE_ARGV 0 arg + "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG;Z_GET_CMAKE_VARS_USAGE" + "SOURCE_PATH;GENERATOR;LOGNAME" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;MAYBE_UNUSED_VARIABLES" ) + if(NOT arg_Z_GET_CMAKE_VARS_USAGE AND Z_VCPKG_CMAKE_CONFIGURE_GUARD) + message(FATAL_ERROR "The ${PORT} port already depends on vcpkg-cmake; using both vcpkg-cmake and vcpkg_configure_cmake in the same port is unsupported.") + endif() + if(NOT VCPKG_PLATFORM_TOOLSET) message(FATAL_ERROR "Vcpkg has been updated with VS2017 support; " "however, vcpkg.exe must be rebuilt by re-running bootstrap-vcpkg.bat\n") endif() + if(NOT arg_LOGNAME) + set(arg_LOGNAME config-${TARGET_TRIPLET}) + endif() + + set(manually_specified_variables "") + + if(arg_Z_GET_CMAKE_VARS_USAGE) + set(configuring_message "Getting CMake variables for ${TARGET_TRIPLET}") + else() + set(configuring_message "Configuring ${TARGET_TRIPLET}") + + foreach(option IN LISTS arg_OPTIONS arg_OPTIONS_RELEASE arg_OPTIONS_DEBUG) + if(option MATCHES "^-D([^:=]*)[:=]") + list(APPEND manually_specified_variables "${CMAKE_MATCH_1}") + endif() + endforeach() + list(REMOVE_DUPLICATES manually_specified_variables) + list(REMOVE_ITEM manually_specified_variables ${arg_MAYBE_UNUSED_VARIABLES}) + debug_message("manually specified variables: ${manually_specified_variables}") + endif() + if(CMAKE_HOST_WIN32) - set(_PATHSEP ";") if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) - set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) + set(arg_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) else() - set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) + set(arg_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) endif() - else() - set(_PATHSEP ":") endif() set(NINJA_CAN_BE_USED ON) # Ninja as generator @@ -89,7 +134,7 @@ function(vcpkg_configure_cmake) set(_TARGETTING_UWP 1) endif() - if(_csc_HOST_ARCHITECTURE STREQUAL "x86") + if(arg_HOST_ARCHITECTURE STREQUAL "x86") # Prebuilt ninja binaries are only provided for x64 hosts set(NINJA_CAN_BE_USED OFF) set(NINJA_HOST OFF) @@ -98,9 +143,9 @@ function(vcpkg_configure_cmake) set(NINJA_CAN_BE_USED OFF) endif() - if(_csc_GENERATOR) - set(GENERATOR ${_csc_GENERATOR}) - elseif(_csc_PREFER_NINJA AND NINJA_CAN_BE_USED) + if(arg_GENERATOR) + set(GENERATOR ${arg_GENERATOR}) + elseif(arg_PREFER_NINJA AND NINJA_CAN_BE_USED) set(GENERATOR "Ninja") elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT _TARGETTING_UWP)) set(GENERATOR "Ninja") @@ -142,6 +187,18 @@ function(vcpkg_configure_cmake) set(GENERATOR "Visual Studio 16 2019") set(ARCH "ARM64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v143") + set(GENERATOR "Visual Studio 17 2022") + set(ARCH "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v143") + set(GENERATOR "Visual Studio 17 2022") + set(ARCH "x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v143") + set(GENERATOR "Visual Studio 17 2022") + set(ARCH "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v143") + set(GENERATOR "Visual Studio 17 2022") + set(ARCH "ARM64") else() if(NOT VCPKG_CMAKE_SYSTEM_NAME) set(VCPKG_CMAKE_SYSTEM_NAME Windows) @@ -151,67 +208,75 @@ function(vcpkg_configure_cmake) endif() # If we use Ninja, make sure it's on PATH - if(GENERATOR STREQUAL "Ninja") + if(GENERATOR STREQUAL "Ninja" AND NOT DEFINED ENV{VCPKG_FORCE_SYSTEM_BINARIES}) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) - set(ENV{PATH} "$ENV{PATH}${_PATHSEP}${NINJA_PATH}") - list(APPEND _csc_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") + vcpkg_add_to_path("${NINJA_PATH}") + list(APPEND arg_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") endif() file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) - list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") + list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") if(_TARGETTING_UWP AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android" AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + set(VCPKG_CMAKE_SYSTEM_VERSION 21) endif() endif() if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) - list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") + list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON) + list(APPEND arg_OPTIONS -DBUILD_SHARED_LIBS=ON) elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) + list(APPEND arg_OPTIONS -DBUILD_SHARED_LIBS=OFF) else() message(FATAL_ERROR "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". " "It must be \"static\" or \"dynamic\"") endif() - + macro(check_both_vars_are_set var1 var2) if((NOT DEFINED ${var1} OR NOT DEFINED ${var2}) AND (DEFINED ${var1} OR DEFINED ${var2})) message(FATAL_ERROR "Both ${var1} and ${var2} must be set.") endif() endmacro() - + check_both_vars_are_set(VCPKG_CXX_FLAGS_DEBUG VCPKG_C_FLAGS_DEBUG) check_both_vars_are_set(VCPKG_CXX_FLAGS_RELEASE VCPKG_C_FLAGS_RELEASE) check_both_vars_are_set(VCPKG_CXX_FLAGS VCPKG_C_FLAGS) set(VCPKG_SET_CHARSET_FLAG ON) - if(_csc_NO_CHARSET_FLAG) + if(arg_NO_CHARSET_FLAG) set(VCPKG_SET_CHARSET_FLAG OFF) endif() if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) if(NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME OR _TARGETTING_UWP) - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/windows.cmake") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/linux.cmake") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/linux.cmake") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/android.cmake") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/android.cmake") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/osx.cmake") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/osx.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/ios.cmake") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${VCPKG_ROOT_DIR}/scripts/toolchains/freebsd.cmake") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/freebsd.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/openbsd.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/mingw.cmake") endif() endif() - - list(APPEND _csc_OPTIONS + list(JOIN VCPKG_TARGET_ARCHITECTURE "\;" target_architecure_string) + list(APPEND arg_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" "-DVCPKG_SET_CHARSET_FLAG=${VCPKG_SET_CHARSET_FLAG}" @@ -222,7 +287,7 @@ function(vcpkg_configure_cmake) "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" - "-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/buildsystems/vcpkg.cmake" + "-DCMAKE_TOOLCHAIN_FILE=${SCRIPTS}/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=${VCPKG_CXX_FLAGS}" "-DVCPKG_CXX_FLAGS_RELEASE=${VCPKG_CXX_FLAGS_RELEASE}" @@ -232,40 +297,47 @@ function(vcpkg_configure_cmake) "-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}" "-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}" "-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}" - "-DVCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}" + "-DVCPKG_LINKER_FLAGS_RELEASE=${VCPKG_LINKER_FLAGS_RELEASE}" + "-DVCPKG_LINKER_FLAGS_DEBUG=${VCPKG_LINKER_FLAGS_DEBUG}" + "-DVCPKG_TARGET_ARCHITECTURE=${target_architecure_string}" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" + "-D_VCPKG_ROOT_DIR=${VCPKG_ROOT_DIR}" + "-D_VCPKG_INSTALLED_DIR=${_VCPKG_INSTALLED_DIR}" + "-DVCPKG_MANIFEST_INSTALL=OFF" ) if(DEFINED ARCH) - list(APPEND _csc_OPTIONS + list(APPEND arg_OPTIONS "-A${ARCH}" ) endif() # Sets configuration variables for macOS builds - foreach(config_var INSTALL_NAME_DIR OSX_DEPLOYMENT_TARGET OSX_SYSROOT) + foreach(config_var INSTALL_NAME_DIR OSX_DEPLOYMENT_TARGET OSX_SYSROOT OSX_ARCHITECTURES) if(DEFINED VCPKG_${config_var}) - list(APPEND _csc_OPTIONS "-DCMAKE_${config_var}=${VCPKG_${config_var}}") + list(JOIN VCPKG_${config_var} "\;" config_var_value) + list(APPEND arg_OPTIONS "-DCMAKE_${config_var}=${config_var_value}") endif() endforeach() set(rel_command - ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_RELEASE}" + ${CMAKE_COMMAND} ${arg_SOURCE_PATH} "${arg_OPTIONS}" "${arg_OPTIONS_RELEASE}" -G ${GENERATOR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}) set(dbg_command - ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_DEBUG}" + ${CMAKE_COMMAND} ${arg_SOURCE_PATH} "${arg_OPTIONS}" "${arg_OPTIONS_DEBUG}" -G ${GENERATOR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug) - if(NINJA_HOST AND CMAKE_HOST_WIN32 AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) + if(NINJA_HOST AND CMAKE_HOST_WIN32 AND NOT arg_DISABLE_PARALLEL_CONFIGURE) + list(APPEND arg_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON") vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) - set(ENV{PATH} "$ENV{PATH}${_PATHSEP}${NINJA_PATH}") + vcpkg_add_to_path("${NINJA_PATH}") #parallelize the configure step set(_contents @@ -292,33 +364,79 @@ function(vcpkg_configure_cmake) file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure) file(WRITE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure/build.ninja "${_contents}") - message(STATUS "Configuring ${TARGET_TRIPLET}") + message(STATUS "${configuring_message}") vcpkg_execute_required_process( COMMAND ninja -v WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure - LOGNAME config-${TARGET_TRIPLET} + LOGNAME ${arg_LOGNAME} ) + + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-err.log") else() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + message(STATUS "${configuring_message}-dbg") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) vcpkg_execute_required_process( COMMAND ${dbg_command} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg + LOGNAME ${arg_LOGNAME}-dbg ) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-dbg-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-dbg-err.log") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + message(STATUS "${configuring_message}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( COMMAND ${rel_command} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel + LOGNAME ${arg_LOGNAME}-rel ) + list(APPEND config_logs + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-rel-out.log" + "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-rel-err.log") endif() endif() + + # Check unused variables + set(all_unused_variables) + foreach(config_log IN LISTS config_logs) + if (NOT EXISTS "${config_log}") + continue() + endif() + file(READ "${config_log}" log_contents) + debug_message("Reading configure log ${config_log}...") + if(NOT log_contents MATCHES "Manually-specified variables were not used by the project:\n\n(( [^\n]*\n)*)") + continue() + endif() + string(STRIP "${CMAKE_MATCH_1}" unused_variables) # remove leading ` ` and trailing `\n` + string(REPLACE "\n " ";" unused_variables "${unused_variables}") + debug_message("unused variables: ${unused_variables}") + + foreach(unused_variable IN LISTS unused_variables) + if(unused_variable IN_LIST manually_specified_variables) + debug_message("manually specified unused variable: ${unused_variable}") + list(APPEND all_unused_variables "${unused_variable}") + else() + debug_message("unused variable (not manually specified): ${unused_variable}") + endif() + endforeach() + endforeach() - set(_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) + if(DEFINED all_unused_variables) + list(REMOVE_DUPLICATES all_unused_variables) + list(JOIN all_unused_variables "\n " all_unused_variables) + message(WARNING "The following variables are not used in CMakeLists.txt: + ${all_unused_variables} +Please recheck them and remove the unnecessary options from the `vcpkg_configure_cmake` call. +If these options should still be passed for whatever reason, please use the `MAYBE_UNUSED_VARIABLES` argument.") + endif() + + if(NOT arg_Z_GET_CMAKE_VARS_USAGE) + set(Z_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) + endif() endfunction() diff --git a/scripts/cmake/vcpkg_configure_gn.cmake b/scripts/cmake/vcpkg_configure_gn.cmake new file mode 100644 index 00000000000000..e844d8d70c6850 --- /dev/null +++ b/scripts/cmake/vcpkg_configure_gn.cmake @@ -0,0 +1,76 @@ +#[===[.md: +# vcpkg_configure_gn + +Generate Ninja (GN) targets + +## Usage: +```cmake +vcpkg_configure_gn( + SOURCE_PATH + [OPTIONS ] + [OPTIONS_DEBUG ] + [OPTIONS_RELEASE ] +) +``` + +## Parameters: +### SOURCE_PATH (required) +The path to the GN project. + +### OPTIONS +Options to be passed to both the debug and release targets. +Note: Must be provided as a space-separated string. + +### OPTIONS_DEBUG (space-separated string) +Options to be passed to the debug target. + +### OPTIONS_RELEASE (space-separated string) +Options to be passed to the release target. +#]===] + +function(z_vcpkg_configure_gn_generate) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "" "SOURCE_PATH;CONFIG;ARGS" "") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Internal error: generate was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + message(STATUS "Generating build (${arg_CONFIG})...") + vcpkg_execute_required_process( + COMMAND "${GN}" gen "${CURRENT_BUILDTREES_DIR}/${arg_CONFIG}" "${arg_ARGS}" + WORKING_DIRECTORY "${arg_SOURCE_PATH}" + LOGNAME "generate-${arg_CONFIG}" + ) +endfunction() + +function(vcpkg_configure_gn) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "" "SOURCE_PATH;OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" "") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "vcpkg_configure_gn was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT DEFINED arg_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH must be specified.") + endif() + + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) + vcpkg_add_to_path(PREPEND "${PYTHON2_DIR}") + + vcpkg_find_acquire_program(GN) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + z_vcpkg_configure_gn_generate( + SOURCE_PATH "${arg_SOURCE_PATH}" + CONFIG "${TARGET_TRIPLET}-dbg" + ARGS "--args=${arg_OPTIONS} ${arg_OPTIONS_DEBUG}" + ) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + z_vcpkg_configure_gn_generate( + SOURCE_PATH "${arg_SOURCE_PATH}" + CONFIG "${TARGET_TRIPLET}-rel" + ARGS "--args=${arg_OPTIONS} ${arg_OPTIONS_RELEASE}" + ) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake new file mode 100644 index 00000000000000..067bf4da011f8c --- /dev/null +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -0,0 +1,878 @@ +#[===[.md: +# vcpkg_configure_make + +Configure configure for Debug and Release builds of a project. + +## Usage +```cmake +vcpkg_configure_make( + SOURCE_PATH <${SOURCE_PATH}> + [AUTOCONFIG] + [USE_WRAPPERS] + [DETERMINE_BUILD_TRIPLET] + [BUILD_TRIPLET "--host=x64 --build=i686-unknown-pc"] + [NO_ADDITIONAL_PATHS] + [CONFIG_DEPENDENT_ENVIRONMENT ...] + [CONFIGURE_ENVIRONMENT_VARIABLES ...] + [ADD_BIN_TO_PATH] + [NO_DEBUG] + [SKIP_CONFIGURE] + [PROJECT_SUBPATH <${PROJ_SUBPATH}>] + [PRERUN_SHELL <${SHELL_PATH}>] + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +) +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the `configure`/`configure.ac`. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PROJECT_SUBPATH +Specifies the directory containing the ``configure`/`configure.ac`. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### SKIP_CONFIGURE +Skip configure process + +### USE_WRAPPERS +Use autotools ar-lib and compile wrappers (only applies to windows cl and lib) + +### BUILD_TRIPLET +Used to pass custom --build/--target/--host to configure. Can be globally overwritten by VCPKG_MAKE_BUILD_TRIPLET + +### DETERMINE_BUILD_TRIPLET +For ports having a configure script following the autotools rules for selecting the triplet + +### NO_ADDITIONAL_PATHS +Don't pass any additional paths except for --prefix to the configure call + +### AUTOCONFIG +Need to use autoconfig to generate configure file. + +### PRERUN_SHELL +Script that needs to be called before configuration (do not use for batch files which simply call autoconf or configure) + +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during configure such that executables can run against the in-tree DLLs. + +## DISABLE_VERBOSE_FLAGS +do not pass '--disable-silent-rules --verbose' to configure + +### OPTIONS +Additional options passed to configure during the configuration. + +### OPTIONS_RELEASE +Additional options passed to configure during the Release configuration. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to configure during the Debug configuration. These are in addition to `OPTIONS`. + +### CONFIG_DEPENDENT_ENVIRONMENT +List of additional configuration dependent environment variables to set. +Pass SOMEVAR to set the environment and have SOMEVAR_(DEBUG|RELEASE) set in the portfile to the appropriate values +General environment variables can be set from within the portfile itself. + +### CONFIGURE_ENVIRONMENT_VARIABLES +List of additional environment variables to pass via the configure call. + +## Notes +This command supplies many common arguments to configure. To see the full list, examine the source. + +## Examples + +* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake) +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +* [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) +#]===] + +macro(_vcpkg_determine_host_mingw out_var) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(HOST_ARCH $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(HOST_ARCH $ENV{PROCESSOR_ARCHITECTURE}) + endif() + if(HOST_ARCH MATCHES "(amd|AMD)64") + set(${out_var} mingw64) + elseif(HOST_ARCH MATCHES "(x|X)86") + set(${out_var} mingw32) + else() + message(FATAL_ERROR "Unsupported mingw architecture ${HOST_ARCH} in _vcpkg_determine_autotools_host_cpu!" ) + endif() + unset(HOST_ARCH) +endmacro() + +macro(_vcpkg_determine_autotools_host_cpu out_var) + # TODO: the host system processor architecture can differ from the host triplet target architecture + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(HOST_ARCH $ENV{PROCESSOR_ARCHITEW6432}) + elseif(DEFINED ENV{PROCESSOR_ARCHITECTURE}) + set(HOST_ARCH $ENV{PROCESSOR_ARCHITECTURE}) + else() + set(HOST_ARCH "${VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR}") + endif() + if(HOST_ARCH MATCHES "(amd|AMD)64") + set(${out_var} x86_64) + elseif(HOST_ARCH MATCHES "(x|X)86") + set(${out_var} i686) + elseif(HOST_ARCH MATCHES "^(ARM|arm)64$") + set(${out_var} aarch64) + elseif(HOST_ARCH MATCHES "^(ARM|arm)$") + set(${out_var} arm) + else() + message(FATAL_ERROR "Unsupported host architecture ${HOST_ARCH} in _vcpkg_determine_autotools_host_cpu!" ) + endif() + unset(HOST_ARCH) +endmacro() + +macro(_vcpkg_determine_autotools_target_cpu out_var) + if(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)64") + set(${out_var} x86_64) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)86") + set(${out_var} i686) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)64$") + set(${out_var} aarch64) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)$") + set(${out_var} arm) + else() + message(FATAL_ERROR "Unsupported VCPKG_TARGET_ARCHITECTURE architecture ${VCPKG_TARGET_ARCHITECTURE} in _vcpkg_determine_autotools_target_cpu!" ) + endif() +endmacro() + +macro(_vcpkg_determine_autotools_host_arch_mac out_var) + set(${out_var} "${VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR}") +endmacro() + +macro(_vcpkg_determine_autotools_target_arch_mac out_var) + list(LENGTH VCPKG_OSX_ARCHITECTURES _num_osx_archs) + if(_num_osx_archs EQUAL 0) + set(${out_var} "${VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR}") + elseif(_num_osx_archs GREATER_EQUAL 2) + set(${out_var} "universal") + else() + # Better match the arch behavior of config.guess + # See: https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + if(VCPKG_OSX_ARCHITECTURES MATCHES "^(ARM|arm)64$") + set(${out_var} "aarch64") + else() + set(${out_var} "${VCPKG_OSX_ARCHITECTURES}") + endif() + endif() + unset(_num_osx_archs) +endmacro() + +macro(_vcpkg_backup_env_variable envvar) + if(DEFINED ENV{${envvar}}) + set(${envvar}_BACKUP "$ENV{${envvar}}") + set(${envvar}_PATHLIKE_CONCAT "${VCPKG_HOST_PATH_SEPARATOR}$ENV{${envvar}}") + else() + set(${envvar}_BACKUP) + set(${envvar}_PATHLIKE_CONCAT) + endif() +endmacro() + +macro(_vcpkg_backup_env_variables) + foreach(_var ${ARGV}) + _vcpkg_backup_env_variable(${_var}) + endforeach() +endmacro() + +macro(_vcpkg_restore_env_variable envvar) + if(${envvar}_BACKUP) + set(ENV{${envvar}} "${${envvar}_BACKUP}") + else() + unset(ENV{${envvar}}) + endif() +endmacro() + +macro(_vcpkg_restore_env_variables) + foreach(_var ${ARGV}) + _vcpkg_restore_env_variable(${_var}) + endforeach() +endmacro() + +macro(_vcpkg_extract_cpp_flags_and_set_cflags_and_cxxflags _SUFFIX) + string(REGEX MATCHALL "( |^)-D[^ ]+" CPPFLAGS_${_SUFFIX} "${VCPKG_DETECTED_CMAKE_C_FLAGS_${_SUFFIX}}") + string(REGEX MATCHALL "( |^)-D[^ ]+" CXXPPFLAGS_${_SUFFIX} "${VCPKG_DETECTED_CMAKE_CXX_FLAGS_${_SUFFIX}}") + list(JOIN CXXPPFLAGS_${_SUFFIX} "|" CXXREGEX) + if(CXXREGEX) + list(FILTER CPPFLAGS_${_SUFFIX} INCLUDE REGEX "(${CXXREGEX})") + else() + set(CPPFLAGS_${_SUFFIX}) + endif() + list(JOIN CPPFLAGS_${_SUFFIX} "|" CPPREGEX) + list(JOIN CPPFLAGS_${_SUFFIX} " " CPPFLAGS_${_SUFFIX}) + set(CPPFLAGS_${_SUFFIX} "${CPPFLAGS_${_SUFFIX}}") + if(CPPREGEX) + string(REGEX REPLACE "(${CPPREGEX})" "" CFLAGS_${_SUFFIX} "${VCPKG_DETECTED_CMAKE_C_FLAGS_${_SUFFIX}}") + string(REGEX REPLACE "(${CPPREGEX})" "" CXXFLAGS_${_SUFFIX} "${VCPKG_DETECTED_CMAKE_CXX_FLAGS_${_SUFFIX}}") + else() + set(CFLAGS_${_SUFFIX} "${VCPKG_DETECTED_CMAKE_C_FLAGS_${_SUFFIX}}") + set(CXXFLAGS_${_SUFFIX} "${VCPKG_DETECTED_CMAKE_CXX_FLAGS_${_SUFFIX}}") + endif() + string(REGEX REPLACE " +" " " CPPFLAGS_${_SUFFIX} "${CPPFLAGS_${_SUFFIX}}") + string(REGEX REPLACE " +" " " CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") + string(REGEX REPLACE " +" " " CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") + # libtool has and -R option so we need to guard against -RTC by using -Xcompiler + # while configuring there might be a lot of unknown compiler option warnings due to that + # just ignore them. + string(REGEX REPLACE "((-|/)RTC[^ ]+)" "-Xcompiler \\1" CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") + string(REGEX REPLACE "((-|/)RTC[^ ]+)" "-Xcompiler \\1" CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") + string(STRIP "${CPPFLAGS_${_SUFFIX}}" CPPFLAGS_${_SUFFIX}) + string(STRIP "${CFLAGS_${_SUFFIX}}" CFLAGS_${_SUFFIX}) + string(STRIP "${CXXFLAGS_${_SUFFIX}}" CXXFLAGS_${_SUFFIX}) + debug_message("CPPFLAGS_${_SUFFIX}: ${CPPFLAGS_${_SUFFIX}}") + debug_message("CFLAGS_${_SUFFIX}: ${CFLAGS_${_SUFFIX}}") + debug_message("CXXFLAGS_${_SUFFIX}: ${CXXFLAGS_${_SUFFIX}}") +endmacro() + +function(vcpkg_configure_make) + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 _csc + "AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH;USE_WRAPPERS;DETERMINE_BUILD_TRIPLET" + "SOURCE_PATH;PROJECT_SUBPATH;PRERUN_SHELL;BUILD_TRIPLET" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT;ADDITIONAL_MSYS_PACKAGES" + ) + z_vcpkg_get_cmake_vars(cmake_vars_file) + debug_message("Including cmake vars from: ${cmake_vars_file}") + include("${cmake_vars_file}") + if(DEFINED VCPKG_MAKE_BUILD_TRIPLET) + set(_csc_BUILD_TRIPLET ${VCPKG_MAKE_BUILD_TRIPLET}) # Triplet overwrite for crosscompiling + endif() + + set(SRC_DIR "${_csc_SOURCE_PATH}/${_csc_PROJECT_SUBPATH}") + + set(REQUIRES_AUTOGEN FALSE) # use autogen.sh + set(REQUIRES_AUTOCONFIG FALSE) # use autotools and configure.ac + if(EXISTS "${SRC_DIR}/configure" AND "${SRC_DIR}/configure.ac") # remove configure; rerun autoconf + if(NOT VCPKG_MAINTAINER_SKIP_AUTOCONFIG) # If fixing bugs skipping autoconfig saves a lot of time + set(REQUIRES_AUTOCONFIG TRUE) + file(REMOVE "${SRC_DIR}/configure") # remove possible autodated configure scripts + set(_csc_AUTOCONFIG ON) + endif() + elseif(EXISTS "${SRC_DIR}/configure" AND NOT _csc_SKIP_CONFIGURE) # run normally; no autoconf or autgen required + elseif(EXISTS "${SRC_DIR}/configure.ac") # Run autoconfig + set(REQUIRES_AUTOCONFIG TRUE) + set(_csc_AUTOCONFIG ON) + elseif(EXISTS "${SRC_DIR}/autogen.sh") # Run autogen + set(REQUIRES_AUTOGEN TRUE) + else() + message(FATAL_ERROR "Could not determine method to configure make") + endif() + + debug_message("REQUIRES_AUTOGEN:${REQUIRES_AUTOGEN}") + debug_message("REQUIRES_AUTOCONFIG:${REQUIRES_AUTOCONFIG}") + + if(CMAKE_HOST_WIN32 AND VCPKG_DETECTED_CMAKE_C_COMPILER MATCHES "cl.exe") #only applies to windows (clang-)cl and lib + if(_csc_AUTOCONFIG) + set(_csc_USE_WRAPPERS TRUE) + else() + # Keep the setting from portfiles. + # Without autotools we assume a custom configure script which correctly handles cl and lib. + # Otherwise the port needs to set CC|CXX|AR and probably CPP. + endif() + else() + set(_csc_USE_WRAPPERS FALSE) + endif() + + # Backup environment variables + # CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJCXX R UPC Y + set(_cm_FLAGS AS CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJXX R UPC Y RC) + list(TRANSFORM _cm_FLAGS APPEND "FLAGS") + _vcpkg_backup_env_variables(${_cm_FLAGS}) + + + # FC fotran compiler | FF Fortran 77 compiler + # LDFLAGS -> pass -L flags + # LIBS -> pass -l flags + + #Used by gcc/linux + _vcpkg_backup_env_variables(C_INCLUDE_PATH CPLUS_INCLUDE_PATH LIBRARY_PATH LD_LIBRARY_PATH) + + #Used by cl + _vcpkg_backup_env_variables(INCLUDE LIB LIBPATH) + + set(_vcm_paths_with_spaces FALSE) + if(CURRENT_PACKAGES_DIR MATCHES " " OR CURRENT_INSTALLED_DIR MATCHES " ") + # Don't bother with whitespace. The tools will probably fail and I tried very hard trying to make it work (no success so far)! + message(WARNING "Detected whitespace in root directory. Please move the path to one without whitespaces! The required tools do not handle whitespaces correctly and the build will most likely fail") + set(_vcm_paths_with_spaces TRUE) + endif() + + # Pre-processing windows configure requirements + if (VCPKG_TARGET_IS_WINDOWS) + if(CMAKE_HOST_WIN32) + list(APPEND MSYS_REQUIRE_PACKAGES binutils libtool autoconf automake-wrapper automake1.16 m4) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${MSYS_REQUIRE_PACKAGES} ${_csc_ADDITIONAL_MSYS_PACKAGES}) + endif() + if (_csc_AUTOCONFIG AND NOT _csc_BUILD_TRIPLET OR _csc_DETERMINE_BUILD_TRIPLET OR VCPKG_CROSSCOMPILING AND NOT _csc_BUILD_TRIPLET) + _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) # VCPKG_HOST => machine you are building on => --build= + _vcpkg_determine_autotools_target_cpu(TARGET_ARCH) + # --build: the machine you are building on + # --host: the machine you are building for + # --target: the machine that CC will produce binaries for + # https://stackoverflow.com/questions/21990021/how-to-determine-host-value-for-configure-when-using-cross-compiler + # Only for ports using autotools so we can assume that they follow the common conventions for build/target/host + if(CMAKE_HOST_WIN32) + set(_csc_BUILD_TRIPLET "--build=${BUILD_ARCH}-pc-mingw32") # This is required since we are running in a msys + # shell which will be otherwise identified as ${BUILD_ARCH}-pc-msys + endif() + if(NOT TARGET_ARCH MATCHES "${BUILD_ARCH}" OR NOT CMAKE_HOST_WIN32) # we don't need to specify the additional flags if we build nativly, this does not hold when we are not on windows + string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-pc-mingw32") # (Host activates crosscompilation; The name given here is just the prefix of the host tools for the target) + endif() + if(VCPKG_TARGET_IS_UWP AND NOT _csc_BUILD_TRIPLET MATCHES "--host") + # Needs to be different from --build to enable cross builds. + string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-unknown-mingw32") + endif() + debug_message("Using make triplet: ${_csc_BUILD_TRIPLET}") + endif() + if(CMAKE_HOST_WIN32) + set(APPEND_ENV) + if(_csc_USE_WRAPPERS) + set(APPEND_ENV ";${MSYS_ROOT}/usr/share/automake-1.16") + string(APPEND APPEND_ENV ";${SCRIPTS}/buildsystems/make_wrapper") # Other required wrappers are also located there + endif() + # This inserts msys before system32 (which masks sort.exe and find.exe) but after MSVC (which avoids masking link.exe) + string(REPLACE ";$ENV{SystemRoot}\\System32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "$ENV{PATH}") + string(REPLACE ";$ENV{SystemRoot}\\system32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") + set(ENV{PATH} "${NEWPATH}") + set(BASH "${MSYS_ROOT}/usr/bin/bash.exe") + endif() + + macro(_vcpkg_append_to_configure_environment inoutstring var defaultval) + # Allows to overwrite settings in custom triplets via the environment on windows + if(CMAKE_HOST_WIN32 AND DEFINED ENV{${var}}) + string(APPEND ${inoutstring} " ${var}='$ENV{${var}}'") + else() + string(APPEND ${inoutstring} " ${var}='${defaultval}'") + endif() + endmacro() + + set(CONFIGURE_ENV "V=1") + # Remove full filepaths due to spaces and prepend filepaths to PATH (cross-compiling tools are unlikely on path by default) + set(progs VCPKG_DETECTED_CMAKE_C_COMPILER VCPKG_DETECTED_CMAKE_CXX_COMPILER VCPKG_DETECTED_CMAKE_AR + VCPKG_DETECTED_CMAKE_LINKER VCPKG_DETECTED_CMAKE_RANLIB VCPKG_DETECTED_CMAKE_OBJDUMP + VCPKG_DETECTED_CMAKE_STRIP VCPKG_DETECTED_CMAKE_NM VCPKG_DETECTED_CMAKE_DLLTOOL VCPKG_DETECTED_CMAKE_RC_COMPILER) + foreach(prog IN LISTS progs) + if(${prog}) + set(path "${${prog}}") + unset(prog_found CACHE) + get_filename_component(${prog} "${${prog}}" NAME) + find_program(prog_found ${${prog}} PATHS ENV PATH NO_DEFAULT_PATH) + if(NOT path STREQUAL prog_found) + get_filename_component(path "${path}" DIRECTORY) + vcpkg_add_to_path(PREPEND ${path}) + endif() + endif() + endforeach() + if (_csc_USE_WRAPPERS) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile ${VCPKG_DETECTED_CMAKE_C_COMPILER} -E") + + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile ${VCPKG_DETECTED_CMAKE_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC_FOR_BUILD "compile ${VCPKG_DETECTED_CMAKE_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile ${VCPKG_DETECTED_CMAKE_CXX_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV RC "windres-rc ${VCPKG_DETECTED_CMAKE_RC_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV WINDRES "windres-rc ${VCPKG_DETECTED_CMAKE_RC_COMPILER}") + if(VCPKG_DETECTED_CMAKE_AR) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib ${VCPKG_DETECTED_CMAKE_AR}") + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib lib.exe -verbose") + endif() + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "${VCPKG_DETECTED_CMAKE_C_COMPILER} -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "${VCPKG_DETECTED_CMAKE_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC_FOR_BUILD "${VCPKG_DETECTED_CMAKE_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "${VCPKG_DETECTED_CMAKE_CXX_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV RC "${VCPKG_DETECTED_CMAKE_RC_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV WINDRES "${VCPKG_DETECTED_CMAKE_RC_COMPILER}") + if(VCPKG_DETECTED_CMAKE_AR) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "${VCPKG_DETECTED_CMAKE_AR}") + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "lib.exe -verbose") + endif() + endif() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV LD "${VCPKG_DETECTED_CMAKE_LINKER} -verbose") + if(VCPKG_DETECTED_CMAKE_RANLIB) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV RANLIB "${VCPKG_DETECTED_CMAKE_RANLIB}") # Trick to ignore the RANLIB call + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV RANLIB ":") + endif() + if(VCPKG_DETECTED_CMAKE_OBJDUMP) #Objdump is required to make shared libraries. Otherwise define lt_cv_deplibs_check_method=pass_all + _vcpkg_append_to_configure_environment(CONFIGURE_ENV OBJDUMP "${VCPKG_DETECTED_CMAKE_OBJDUMP}") # Trick to ignore the RANLIB call + endif() + if(VCPKG_DETECTED_CMAKE_STRIP) # If required set the ENV variable STRIP in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP "${VCPKG_DETECTED_CMAKE_STRIP}") + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP ":") + list(APPEND _csc_OPTIONS ac_cv_prog_ac_ct_STRIP=:) + endif() + if(VCPKG_DETECTED_CMAKE_NM) # If required set the ENV variable NM in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV NM "${VCPKG_DETECTED_CMAKE_NM}") + else() + # Would be better to have a true nm here! Some symbols (mainly exported variables) get not properly imported with dumpbin as nm + # and require __declspec(dllimport) for some reason (same problem CMake has with WINDOWS_EXPORT_ALL_SYMBOLS) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV NM "dumpbin.exe -symbols -headers") + endif() + if(VCPKG_DETECTED_CMAKE_DLLTOOL) # If required set the ENV variable DLLTOOL in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV DLLTOOL "${VCPKG_DETECTED_CMAKE_DLLTOOL}") + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV DLLTOOL "link.exe -verbose -dll") + endif() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CCAS ":") # If required set the ENV variable CCAS in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AS ":") # If required set the ENV variable AS in the portfile correctly + + foreach(_env IN LISTS _csc_CONFIGURE_ENVIRONMENT_VARIABLES) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV ${_env} "${${_env}}") + endforeach() + debug_message("CONFIGURE_ENV: '${CONFIGURE_ENV}'") + # Other maybe interesting variables to control + # COMPILE This is the command used to actually compile a C source file. The file name is appended to form the complete command line. + # LINK This is the command used to actually link a C program. + # CXXCOMPILE The command used to actually compile a C++ source file. The file name is appended to form the complete command line. + # CXXLINK The command used to actually link a C++ program. + + # Variables not correctly detected by configure. In release builds. + list(APPEND _csc_OPTIONS gl_cv_double_slash_root=yes + ac_cv_func_memmove=yes) + #list(APPEND _csc_OPTIONS lt_cv_deplibs_check_method=pass_all) # Just ignore libtool checks + if(VCPKG_TARGET_ARCHITECTURE MATCHES "^[Aa][Rr][Mm]64$") + list(APPEND _csc_OPTIONS gl_cv_host_cpu_c_abi=no) + # Currently needed for arm64 because objdump yields: "unrecognised machine type (0xaa64) in Import Library Format archive" + list(APPEND _csc_OPTIONS lt_cv_deplibs_check_method=pass_all) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "^[Aa][Rr][Mm]$") + # Currently needed for arm because objdump yields: "unrecognised machine type (0x1c4) in Import Library Format archive" + list(APPEND _csc_OPTIONS lt_cv_deplibs_check_method=pass_all) + endif() + endif() + + if(CMAKE_HOST_WIN32) + #Some PATH handling for dealing with spaces....some tools will still fail with that! + string(REPLACE " " "\\\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PREFIX "${_VCPKG_PREFIX}") + set(_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) + set(prefix_var "'\${prefix}'") # Windows needs extra quotes or else the variable gets expanded in the makefile! + else() + string(REPLACE " " "\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) + string(REPLACE " " "\ " _VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) + set(EXTRA_QUOTES) + set(prefix_var "\${prefix}") + endif() + + # macOS - cross-compiling support + if(VCPKG_TARGET_IS_OSX) + if (_csc_AUTOCONFIG AND NOT _csc_BUILD_TRIPLET OR _csc_DETERMINE_BUILD_TRIPLET) + _vcpkg_determine_autotools_host_arch_mac(BUILD_ARCH) # machine you are building on => --build= + _vcpkg_determine_autotools_target_arch_mac(TARGET_ARCH) + # --build: the machine you are building on + # --host: the machine you are building for + # --target: the machine that CC will produce binaries for + # https://stackoverflow.com/questions/21990021/how-to-determine-host-value-for-configure-when-using-cross-compiler + # Only for ports using autotools so we can assume that they follow the common conventions for build/target/host + if(NOT "${TARGET_ARCH}" STREQUAL "${BUILD_ARCH}") # we don't need to specify the additional flags if we build natively. + set(_csc_BUILD_TRIPLET "--host=${TARGET_ARCH}-apple-darwin") # (Host activates crosscompilation; The name given here is just the prefix of the host tools for the target) + endif() + debug_message("Using make triplet: ${_csc_BUILD_TRIPLET}") + endif() + endif() + + # Cleanup previous build dirs + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") + + # Set configure paths + set(_csc_OPTIONS_RELEASE ${_csc_OPTIONS_RELEASE} "--prefix=${EXTRA_QUOTES}${_VCPKG_PREFIX}${EXTRA_QUOTES}") + set(_csc_OPTIONS_DEBUG ${_csc_OPTIONS_DEBUG} "--prefix=${EXTRA_QUOTES}${_VCPKG_PREFIX}/debug${EXTRA_QUOTES}") + if(NOT _csc_NO_ADDITIONAL_PATHS) + set(_csc_OPTIONS_RELEASE ${_csc_OPTIONS_RELEASE} + # Important: These should all be relative to prefix! + "--bindir=${prefix_var}/tools/${PORT}/bin" + "--sbindir=${prefix_var}/tools/${PORT}/sbin" + #"--libdir='\${prefix}'/lib" # already the default! + #"--includedir='\${prefix}'/include" # already the default! + "--mandir=${prefix_var}/share/${PORT}" + "--docdir=${prefix_var}/share/${PORT}" + "--datarootdir=${prefix_var}/share/${PORT}") + set(_csc_OPTIONS_DEBUG ${_csc_OPTIONS_DEBUG} + # Important: These should all be relative to prefix! + "--bindir=${prefix_var}/../tools/${PORT}/debug/bin" + "--sbindir=${prefix_var}/../tools/${PORT}/debug/sbin" + #"--libdir='\${prefix}'/lib" # already the default! + "--includedir=${prefix_var}/../include" + "--datarootdir=${prefix_var}/share/${PORT}") + endif() + # Setup common options + if(NOT DISABLE_VERBOSE_FLAGS) + list(APPEND _csc_OPTIONS --disable-silent-rules --verbose) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + list(APPEND _csc_OPTIONS --enable-shared --disable-static) + else() + list(APPEND _csc_OPTIONS --disable-shared --enable-static) + endif() + + # Can be set in the triplet to append options for configure + if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS) + list(APPEND _csc_OPTIONS ${VCPKG_MAKE_CONFIGURE_OPTIONS}) + endif() + if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS_RELEASE) + list(APPEND _csc_OPTIONS_RELEASE ${VCPKG_MAKE_CONFIGURE_OPTIONS_RELEASE}) + endif() + if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS_DEBUG) + list(APPEND _csc_OPTIONS_DEBUG ${VCPKG_MAKE_CONFIGURE_OPTIONS_DEBUG}) + endif() + + file(RELATIVE_PATH RELATIVE_BUILD_PATH "${CURRENT_BUILDTREES_DIR}" "${_csc_SOURCE_PATH}/${_csc_PROJECT_SUBPATH}") + + set(base_cmd) + if(CMAKE_HOST_WIN32) + set(base_cmd ${BASH} --noprofile --norc --debug) + else() + find_program(base_cmd bash REQUIRED) + endif() + if(VCPKG_TARGET_IS_WINDOWS) + list(JOIN _csc_OPTIONS " " _csc_OPTIONS) + list(JOIN _csc_OPTIONS_RELEASE " " _csc_OPTIONS_RELEASE) + list(JOIN _csc_OPTIONS_DEBUG " " _csc_OPTIONS_DEBUG) + endif() + + # Setup include environment (since these are buildtype independent restoring them is unnecessary) + macro(prepend_include_path var) + if("${${var}_BACKUP}" STREQUAL "") + set(ENV{${var}} "${_VCPKG_INSTALLED}/include") + else() + set(ENV{${var}} "${_VCPKG_INSTALLED}/include${VCPKG_HOST_PATH_SEPARATOR}${${var}_BACKUP}") + endif() + endmacro() + # Used by CL + prepend_include_path(INCLUDE) + # Used by GCC + prepend_include_path(C_INCLUDE_PATH) + prepend_include_path(CPLUS_INCLUDE_PATH) + + # Flags should be set in the toolchain instead (Setting this up correctly requires a function named vcpkg_determined_cmake_compiler_flags which can also be used to setup CC and CXX etc.) + if(VCPKG_TARGET_IS_WINDOWS) + _vcpkg_backup_env_variables(_CL_ _LINK_) + # TODO: Should be CPP flags instead -> rewrite when vcpkg_determined_cmake_compiler_flags defined + if(VCPKG_TARGET_IS_UWP) + # Be aware that configure thinks it is crosscompiling due to: + # error while loading shared libraries: VCRUNTIME140D_APP.dll: + # cannot open shared object file: No such file or directory + # IMPORTANT: The only way to pass linker flags through libtool AND the compile wrapper + # is to use the CL and LINK environment variables !!! + # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) + string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") + # Can somebody please check if CMake's compiler flags for UWP are correct? + set(ENV{_CL_} "$ENV{_CL_} /D_UNICODE /DUNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") + string(APPEND VCPKG_DETECTED_CMAKE_CXX_FLAGS_RELEASE " -ZW:nostdlib") + string(APPEND VCPKG_DETECTED_CMAKE_CXX_FLAGS_DEBUG " -ZW:nostdlib") + set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") + endif() + endif() + + macro(convert_to_list input output) + string(REGEX MATCHALL "(( +|^ *)[^ ]+)" ${output} "${${input}}") + endmacro() + convert_to_list(VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES C_LIBS_LIST) + convert_to_list(VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES CXX_LIBS_LIST) + set(ALL_LIBS_LIST ${C_LIBS_LIST} ${CXX_LIBS_LIST}) + list(REMOVE_DUPLICATES ALL_LIBS_LIST) + list(TRANSFORM ALL_LIBS_LIST STRIP) + #Do lib list transformation from name.lib to -lname if necessary + set(_VCPKG_TRANSFORM_LIBS TRUE) + if(VCPKG_TARGET_IS_UWP) + set(_VCPKG_TRANSFORM_LIBS FALSE) + # Avoid libtool choke: "Warning: linker path does not have real file for library -lWindowsApp." + # The problem with the choke is that libtool always falls back to built a static library even if a dynamic was requested. + # Note: Env LIBPATH;LIB are on the search path for libtool by default on windows. + # It even does unix/dos-short/unix transformation with the path to get rid of spaces. + endif() + set(_lprefix) + if(_VCPKG_TRANSFORM_LIBS) + set(_lprefix "-l") + list(TRANSFORM ALL_LIBS_LIST REPLACE "(.dll.lib|.lib|.a|.so)$" "") + if(VCPKG_TARGET_IS_WINDOWS) + list(REMOVE_ITEM ALL_LIBS_LIST "uuid") + endif() + list(TRANSFORM ALL_LIBS_LIST REPLACE "^(${_lprefix})" "") + endif() + list(JOIN ALL_LIBS_LIST " ${_lprefix}" ALL_LIBS_STRING) + if(VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + # libtool must be told explicitly that there is no dynamic linkage for uuid. + # The "-Wl,..." syntax is understood by libtool and gcc, but no by ld. + string(REPLACE " -luuid" " -Wl,-Bstatic,-luuid,-Bdynamic" ALL_LIBS_STRING "${ALL_LIBS_STRING}") + endif() + + if(ALL_LIBS_STRING) + set(ALL_LIBS_STRING "${_lprefix}${ALL_LIBS_STRING}") + if(DEFINED ENV{LIBS}) + set(ENV{LIBS} "$ENV{LIBS} ${ALL_LIBS_STRING}") + else() + set(ENV{LIBS} "${ALL_LIBS_STRING}") + endif() + endif() + debug_message("ENV{LIBS}:$ENV{LIBS}") + vcpkg_find_acquire_program(PKGCONFIG) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT PKGCONFIG STREQUAL "--static") + set(PKGCONFIG "${PKGCONFIG} --static") # Is this still required or was the PR changing the pc files accordingly merged? + endif() + + # Run autoconf if necessary + set(_GENERATED_CONFIGURE FALSE) + if (_csc_AUTOCONFIG OR REQUIRES_AUTOCONFIG) + find_program(AUTORECONF autoreconf) + if(NOT AUTORECONF) + message(FATAL_ERROR "${PORT} requires autoconf from the system package manager (example: \"sudo apt-get install autoconf\")") + endif() + message(STATUS "Generating configure for ${TARGET_TRIPLET}") + if (CMAKE_HOST_WIN32) + vcpkg_execute_required_process( + COMMAND ${base_cmd} -c "autoreconf -vfi" + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME autoconf-${TARGET_TRIPLET} + ) + else() + vcpkg_execute_required_process( + COMMAND ${AUTORECONF} -vfi + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME autoconf-${TARGET_TRIPLET} + ) + endif() + message(STATUS "Finished generating configure for ${TARGET_TRIPLET}") + endif() + if(REQUIRES_AUTOGEN) + message(STATUS "Generating configure for ${TARGET_TRIPLET} via autogen.sh") + if (CMAKE_HOST_WIN32) + vcpkg_execute_required_process( + COMMAND ${base_cmd} -c "./autogen.sh" + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME autoconf-${TARGET_TRIPLET} + ) + else() + vcpkg_execute_required_process( + COMMAND "./autogen.sh" + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME autoconf-${TARGET_TRIPLET} + ) + endif() + message(STATUS "Finished generating configure for ${TARGET_TRIPLET}") + endif() + + if (_csc_PRERUN_SHELL) + message(STATUS "Prerun shell with ${TARGET_TRIPLET}") + vcpkg_execute_required_process( + COMMAND ${base_cmd} -c "${_csc_PRERUN_SHELL}" + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME prerun-${TARGET_TRIPLET} + ) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" AND NOT _csc_NO_DEBUG) + set(_VAR_SUFFIX DEBUG) + set(PATH_SUFFIX_${_VAR_SUFFIX} "/debug") + set(SHORT_NAME_${_VAR_SUFFIX} "dbg") + list(APPEND _buildtypes ${_VAR_SUFFIX}) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS_${_VAR_SUFFIX}}") + else() # dynamic + set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() + _vcpkg_extract_cpp_flags_and_set_cflags_and_cxxflags(${_VAR_SUFFIX}) + if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_CMAKE_C_COMPILER MATCHES "cl.exe") + if(NOT _vcm_paths_with_spaces) + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + endif() + if(DEFINED ENV{_LINK_}) + set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + else() + set(LINK_ENV_${_VAR_SUFFIX} "${LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() + else() + set(_link_dirs) + if(EXISTS "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib") + set(_link_dirs "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib") + endif() + if(EXISTS "{_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + set(_link_dirs "${_link_dirs} -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + endif() + string(STRIP "${_link_dirs}" _link_dirs) + set(LDFLAGS_${_VAR_SUFFIX} "${_link_dirs} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() + unset(_VAR_SUFFIX) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_VAR_SUFFIX RELEASE) + set(PATH_SUFFIX_${_VAR_SUFFIX} "") + set(SHORT_NAME_${_VAR_SUFFIX} "rel") + list(APPEND _buildtypes ${_VAR_SUFFIX}) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS_${_VAR_SUFFIX}}") + else() # dynamic + set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() + _vcpkg_extract_cpp_flags_and_set_cflags_and_cxxflags(${_VAR_SUFFIX}) + if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_CMAKE_C_COMPILER MATCHES "cl.exe") + if(NOT _vcm_paths_with_spaces) + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + endif() + if(DEFINED ENV{_LINK_}) + set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + else() + set(LINK_ENV_${_VAR_SUFFIX} "${LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() + else() + set(_link_dirs) + if(EXISTS "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib") + set(_link_dirs "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib") + endif() + if(EXISTS "{_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + set(_link_dirs "${_link_dirs} -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + endif() + string(STRIP "${_link_dirs}" _link_dirs) + set(LDFLAGS_${_VAR_SUFFIX} "${_link_dirs} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() + unset(_VAR_SUFFIX) + endif() + + foreach(_buildtype IN LISTS _buildtypes) + foreach(ENV_VAR ${_csc_CONFIG_DEPENDENT_ENVIRONMENT}) + if(DEFINED ENV{${ENV_VAR}}) + set(BACKUP_CONFIG_${ENV_VAR} "$ENV{${ENV_VAR}}") + endif() + set(ENV{${ENV_VAR}} "${${ENV_VAR}_${_buildtype}}") + endforeach() + + set(TAR_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}") + file(MAKE_DIRECTORY "${TAR_DIR}") + file(RELATIVE_PATH RELATIVE_BUILD_PATH "${TAR_DIR}" "${SRC_DIR}") + + if(_csc_COPY_SOURCE) + file(COPY "${SRC_DIR}/" DESTINATION "${TAR_DIR}") + set(RELATIVE_BUILD_PATH .) + endif() + + # Setup PKG_CONFIG_PATH + set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/lib/pkgconfig") + set(PKGCONFIG_INSTALLED_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig") + if(ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype} $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}") + endif() + + # Setup environment + set(ENV{CPPFLAGS} "${CPPFLAGS_${_buildtype}}") + set(ENV{CFLAGS} "${CFLAGS_${_buildtype}}") + set(ENV{CXXFLAGS} "${CXXFLAGS_${_buildtype}}") + set(ENV{RCFLAGS} "${VCPKG_DETECTED_CMAKE_RC_FLAGS_${_buildtype}}") + set(ENV{LDFLAGS} "${LDFLAGS_${_buildtype}}") + + # https://www.gnu.org/software/libtool/manual/html_node/Link-mode.html + # -avoid-version is handled specially by libtool link mode, this flag is not forwarded to linker, + # and libtool tries to avoid versioning for shared libraries and no symbolic links are created. + if(VCPKG_TARGET_IS_ANDROID) + set(ENV{LDFLAGS} "-avoid-version $ENV{LDFLAGS}") + endif() + + if(LINK_ENV_${_VAR_SUFFIX}) + set(_LINK_CONFIG_BACKUP "$ENV{_LINK_}") + set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}") + endif() + set(ENV{PKG_CONFIG} "${PKGCONFIG}") + + set(_lib_env_vars LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) + foreach(_lib_env_var IN LISTS _lib_env_vars) + set(_link_path) + if(EXISTS "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib") + set(_link_path "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib") + endif() + if(EXISTS "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/manual-link") + if(_link_path) + set(_link_path "${_link_path}${VCPKG_HOST_PATH_SEPARATOR}") + endif() + set(_link_path "${_link_path}${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/manual-link") + endif() + set(ENV{${_lib_env_var}} "${_link_path}${${_lib_env_var}_PATHLIKE_CONCAT}") + endforeach() + unset(_link_path) + unset(_lib_env_vars) + + if(CMAKE_HOST_WIN32) + set(command "${base_cmd}" -c "${CONFIGURE_ENV} ./${RELATIVE_BUILD_PATH}/configure ${_csc_BUILD_TRIPLET} ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildtype}}") + elseif(VCPKG_TARGET_IS_WINDOWS) + set(command "${base_cmd}" -c "${CONFIGURE_ENV} $@" -- "./${RELATIVE_BUILD_PATH}/configure" ${_csc_BUILD_TRIPLET} ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildtype}}) + else() + set(command "${base_cmd}" "./${RELATIVE_BUILD_PATH}/configure" ${_csc_BUILD_TRIPLET} ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildtype}}) + endif() + + if(_csc_ADD_BIN_TO_PATH) + set(PATH_BACKUP $ENV{PATH}) + vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/bin") + endif() + debug_message("Configure command:'${command}'") + if (NOT _csc_SKIP_CONFIGURE) + message(STATUS "Configuring ${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}") + vcpkg_execute_required_process( + COMMAND ${command} + WORKING_DIRECTORY "${TAR_DIR}" + LOGNAME config-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}} + ) + if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB_RECURSE LIBTOOL_FILES "${TAR_DIR}*/libtool") + foreach(lt_file IN LISTS LIBTOOL_FILES) + file(READ "${lt_file}" _contents) + string(REPLACE ".dll.lib" ".lib" _contents "${_contents}") + file(WRITE "${lt_file}" "${_contents}") + endforeach() + endif() + + if(EXISTS "${TAR_DIR}/config.log") + file(RENAME "${TAR_DIR}/config.log" "${CURRENT_BUILDTREES_DIR}/config.log-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}.log") + endif() + endif() + + if(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}) + set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}}") + else() + unset(ENV{PKG_CONFIG_PATH}) + endif() + unset(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}) + + if(_LINK_CONFIG_BACKUP) + set(ENV{_LINK_} "${_LINK_CONFIG_BACKUP}") + unset(_LINK_CONFIG_BACKUP) + endif() + + if(_csc_ADD_BIN_TO_PATH) + set(ENV{PATH} "${PATH_BACKUP}") + endif() + # Restore environment (config dependent) + foreach(ENV_VAR ${_csc_CONFIG_DEPENDENT_ENVIRONMENT}) + if(BACKUP_CONFIG_${ENV_VAR}) + set(ENV{${ENV_VAR}} "${BACKUP_CONFIG_${ENV_VAR}}") + else() + unset(ENV{${ENV_VAR}}) + endif() + endforeach() + endforeach() + + # Export matching make program for vcpkg_build_make (cache variable) + if(CMAKE_HOST_WIN32 AND MSYS_ROOT) + find_program(Z_VCPKG_MAKE make PATHS "${MSYS_ROOT}/usr/bin" NO_DEFAULT_PATH REQUIRED) + elseif(VCPKG_HOST_IS_OPENBSD) + find_program(Z_VCPKG_MAKE gmake REQUIRED) + else() + find_program(Z_VCPKG_MAKE make REQUIRED) + endif() + + # Restore environment + _vcpkg_restore_env_variables(${_cm_FLAGS} LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) + + SET(_VCPKG_PROJECT_SOURCE_PATH ${_csc_SOURCE_PATH} PARENT_SCOPE) + set(_VCPKG_PROJECT_SUBPATH ${_csc_PROJECT_SUBPATH} PARENT_SCOPE) +endfunction() diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake index f907c76f15c375..499d488252500c 100644 --- a/scripts/cmake/vcpkg_configure_meson.cmake +++ b/scripts/cmake/vcpkg_configure_meson.cmake @@ -1,82 +1,541 @@ -function(vcpkg_configure_meson) - cmake_parse_arguments(_vcm "" "SOURCE_PATH" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) - - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - - # use the same compiler options as in vcpkg_configure_cmake - set(MESON_COMMON_CFLAGS "${MESON_COMMON_CFLAGS} /DWIN32 /D_WINDOWS /W3 /utf-8") - set(MESON_COMMON_CXXFLAGS "${MESON_COMMON_CXXFLAGS} /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc") - - if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1") - set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1") - - set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Z7") - set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Z7") - elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1") - set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1") +#[===[.md: +# vcpkg_configure_meson + +Configure Meson for Debug and Release builds of a project. + +## Usage +```cmake +vcpkg_configure_meson( + SOURCE_PATH <${SOURCE_PATH}> + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +) +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the `meson.build`. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### OPTIONS +Additional options passed to Meson during the configuration. + +### OPTIONS_RELEASE +Additional options passed to Meson during the Release configuration. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to Meson during the Debug configuration. These are in addition to `OPTIONS`. + +## Notes +This command supplies many common arguments to Meson. To see the full list, examine the source. + +## Examples + +* [fribidi](https://github.com/Microsoft/vcpkg/blob/master/ports/fribidi/portfile.cmake) +* [libepoxy](https://github.com/Microsoft/vcpkg/blob/master/ports/libepoxy/portfile.cmake) +#]===] + +function(vcpkg_internal_meson_generate_native_file _additional_binaries) #https://mesonbuild.com/Native-environments.html + set(NATIVE "[binaries]\n") + #set(proglist AR RANLIB STRIP NM OBJDUMP DLLTOOL MT) + if(VCPKG_TARGET_IS_WINDOWS) + set(proglist MT) + else() + set(proglist AR RANLIB STRIP NM OBJDUMP DLLTOOL MT) + endif() + foreach(prog IN LISTS proglist) + if(VCPKG_DETECTED_CMAKE_${prog}) + string(TOLOWER "${prog}" proglower) + string(APPEND NATIVE "${proglower} = '${VCPKG_DETECTED_CMAKE_${prog}}'\n") + endif() + endforeach() + set(compiler C CXX RC) + foreach(prog IN LISTS compiler) + if(VCPKG_DETECTED_CMAKE_${prog}_COMPILER) + string(REPLACE "CXX" "CPP" mesonprog "${prog}") + string(REPLACE "RC" "windres" mesonprog "${mesonprog}") # https://mesonbuild.com/Windows-module.html + string(TOLOWER "${mesonprog}" proglower) + string(APPEND NATIVE "${proglower} = '${VCPKG_DETECTED_CMAKE_${prog}_COMPILER}'\n") + endif() + endforeach() + if(VCPKG_DETECTED_CMAKE_LINKER AND VCPKG_TARGET_IS_WINDOWS) + if (NOT VCPKG_DETECTED_CMAKE_C_COMPILER_ID MATCHES "^(GNU|Intel)$") # for gcc and icc the linker flag -fuse-ld is used. See https://github.com/mesonbuild/meson/issues/8647#issuecomment-878673456 + string(APPEND NATIVE "c_ld = '${VCPKG_DETECTED_CMAKE_LINKER}'\n") + endif() + endif() + if(VCPKG_DETECTED_CMAKE_LINKER AND VCPKG_TARGET_IS_WINDOWS) + if (NOT VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Intel)$") # for gcc and icc the linker flag -fuse-ld is used. See https://github.com/mesonbuild/meson/issues/8647#issuecomment-878673456 + string(APPEND NATIVE "cpp_ld = '${VCPKG_DETECTED_CMAKE_LINKER}'\n") + endif() + endif() + string(APPEND NATIVE "cmake = '${CMAKE_COMMAND}'\n") + foreach(_binary IN LISTS ${_additional_binaries}) + string(APPEND NATIVE "${_binary}\n") + endforeach() + + string(APPEND NATIVE "[built-in options]\n") #https://mesonbuild.com/Builtin-options.html + if(VCPKG_DETECTED_CMAKE_C_COMPILER MATCHES "cl.exe") + # This is currently wrongly documented in the meson docs or buggy. The docs say: 'none' = no flags + # In reality however 'none' tries to deactivate eh and meson passes the flags for it resulting in a lot of warnings + # about overriden flags. Until this is fixed in meson vcpkg should not pass this here. + # string(APPEND NATIVE "cpp_eh='none'\n") # To make sure meson is not adding eh flags by itself using msvc + endif() + if(VCPKG_TARGET_IS_WINDOWS) + string(REGEX REPLACE "( |^)(-|/)" ";\\2" WIN_C_STANDARD_LIBRARIES "${VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES}") + string(REGEX REPLACE "\\.lib " ".lib;" WIN_C_STANDARD_LIBRARIES "${WIN_C_STANDARD_LIBRARIES}") + list(TRANSFORM WIN_C_STANDARD_LIBRARIES APPEND "'") + list(TRANSFORM WIN_C_STANDARD_LIBRARIES PREPEND "'") + list(REMOVE_ITEM WIN_C_STANDARD_LIBRARIES "''") + list(JOIN WIN_C_STANDARD_LIBRARIES ", " WIN_C_STANDARD_LIBRARIES) + string(APPEND NATIVE "c_winlibs = [${WIN_C_STANDARD_LIBRARIES}]\n") + string(REGEX REPLACE "( |^)(-|/)" ";\\2" WIN_CXX_STANDARD_LIBRARIES "${VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES}") + string(REGEX REPLACE "\\.lib " ".lib;" WIN_CXX_STANDARD_LIBRARIES "${WIN_CXX_STANDARD_LIBRARIES}") + list(TRANSFORM WIN_CXX_STANDARD_LIBRARIES APPEND "'") + list(TRANSFORM WIN_CXX_STANDARD_LIBRARIES PREPEND "'") + list(REMOVE_ITEM WIN_CXX_STANDARD_LIBRARIES "''") + list(JOIN WIN_CXX_STANDARD_LIBRARIES ", " WIN_CXX_STANDARD_LIBRARIES) + string(APPEND NATIVE "cpp_winlibs = [${WIN_CXX_STANDARD_LIBRARIES}]\n") + endif() + + set(_file "${CURRENT_BUILDTREES_DIR}/meson-nativ-${TARGET_TRIPLET}.log") + set(VCPKG_MESON_NATIVE_FILE "${_file}" PARENT_SCOPE) + file(WRITE "${_file}" "${NATIVE}") +endfunction() + +function(vcpkg_internal_meson_convert_compiler_flags_to_list _out_var _compiler_flags) + string(REPLACE ";" "\\\;" tmp_var "${_compiler_flags}") + string(REGEX REPLACE [=[( +|^)((\"(\\\"|[^"])+\"|\\\"|\\ |[^ ])+)]=] ";\\2" ${_out_var} "${tmp_var}") + list(POP_FRONT ${_out_var}) # The first element is always empty due to the above replacement + list(TRANSFORM ${_out_var} STRIP) # Strip leading trailing whitespaces from each element in the list. + set(${_out_var} "${${_out_var}}" PARENT_SCOPE) +endfunction() + +function(vcpkg_internal_meson_convert_list_to_python_array _out_var) + set(FLAG_LIST ${ARGN}) + list(TRANSFORM FLAG_LIST APPEND "'") + list(TRANSFORM FLAG_LIST PREPEND "'") + list(JOIN FLAG_LIST ", " ${_out_var}) + string(REPLACE "'', " "" ${_out_var} "${${_out_var}}") # remove empty elements if any + set(${_out_var} "[${${_out_var}}]" PARENT_SCOPE) +endfunction() + +# Generates the required compiler properties for meson +function(vcpkg_internal_meson_generate_flags_properties_string _out_var _config) + if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(L_FLAG /LIBPATH:) + else() + set(L_FLAG -L) + endif() + set(PATH_SUFFIX_DEBUG /debug) + set(LIBPATH_${_config} "${L_FLAG}${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_config}}/lib") + vcpkg_internal_meson_convert_compiler_flags_to_list(MESON_CFLAGS_${_config} "${VCPKG_DETECTED_CMAKE_C_FLAGS_${_config}}") + list(APPEND MESON_CFLAGS_${_config} "-I${CURRENT_INSTALLED_DIR}/include") + vcpkg_internal_meson_convert_list_to_python_array(MESON_CFLAGS_${_config} ${MESON_CFLAGS_${_config}}) + string(APPEND ${_out_var} "c_args = ${MESON_CFLAGS_${_config}}\n") + vcpkg_internal_meson_convert_compiler_flags_to_list(MESON_CXXFLAGS_${_config} "${VCPKG_DETECTED_CMAKE_CXX_FLAGS_${_config}}") + list(APPEND MESON_CXXFLAGS_${_config} "-I${CURRENT_INSTALLED_DIR}/include") + vcpkg_internal_meson_convert_list_to_python_array(MESON_CXXFLAGS_${_config} ${MESON_CXXFLAGS_${_config}}) + string(APPEND ${_out_var} "cpp_args = ${MESON_CXXFLAGS_${_config}}\n") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(LINKER_FLAGS_${_config} "${VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS_${_config}}") + else() + set(LINKER_FLAGS_${_config} "${VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS_${_config}}") + endif() + vcpkg_internal_meson_convert_compiler_flags_to_list(LINKER_FLAGS_${_config} "${LINKER_FLAGS_${_config}}") + list(APPEND LINKER_FLAGS_${_config} "${LIBPATH_${_config}}") + vcpkg_internal_meson_convert_list_to_python_array(LINKER_FLAGS_${_config} ${LINKER_FLAGS_${_config}}) + string(APPEND ${_out_var} "c_link_args = ${LINKER_FLAGS_${_config}}\n") + string(APPEND ${_out_var} "cpp_link_args = ${LINKER_FLAGS_${_config}}\n") + set(${_out_var} "${${_out_var}}" PARENT_SCOPE) +endfunction() + +function(vcpkg_internal_meson_generate_native_file_config _config) #https://mesonbuild.com/Native-environments.html + set(NATIVE_${_config} "[properties]\n") #https://mesonbuild.com/Builtin-options.html + vcpkg_internal_meson_generate_flags_properties_string(NATIVE_PROPERTIES ${_config}) + string(APPEND NATIVE_${_config} "${NATIVE_PROPERTIES}") + #Setup CMake properties + string(APPEND NATIVE_${_config} "cmake_toolchain_file = '${SCRIPTS}/buildsystems/vcpkg.cmake'\n") + string(APPEND NATIVE_${_config} "[cmake]\n") + + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + elseif(VCPKG_TARGET_IS_LINUX) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/linux.cmake") + elseif(VCPKG_TARGET_IS_ANDROID) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/android.cmake") + elseif(VCPKG_TARGET_IS_OSX) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/osx.cmake") + elseif(VCPKG_TARGET_IS_IOS) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/ios.cmake") + elseif(VCPKG_TARGET_IS_FREEBSD) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/freebsd.cmake") + elseif(VCPKG_TARGET_IS_OPENBSD) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/openbsd.cmake") + elseif(VCPKG_TARGET_IS_MINGW) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/mingw.cmake") + endif() + endif() + + string(APPEND NATIVE_${_config} "VCPKG_TARGET_TRIPLET = '${TARGET_TRIPLET}'\n") + string(APPEND NATIVE_${_config} "VCPKG_CHAINLOAD_TOOLCHAIN_FILE = '${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}'\n") + string(APPEND NATIVE_${_config} "VCPKG_CRT_LINKAGE = '${VCPKG_CRT_LINKAGE}'\n") + + string(APPEND NATIVE_${_config} "[built-in options]\n") + if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(CRT mt) + else() + set(CRT md) + endif() + if(${_config} STREQUAL DEBUG) + set(CRT ${CRT}d) + endif() + string(APPEND NATIVE_${_config} "b_vscrt = '${CRT}'\n") + endif() + string(TOLOWER "${_config}" lowerconfig) + set(_file "${CURRENT_BUILDTREES_DIR}/meson-nativ-${TARGET_TRIPLET}-${lowerconfig}.log") + set(VCPKG_MESON_NATIVE_FILE_${_config} "${_file}" PARENT_SCOPE) + file(WRITE "${_file}" "${NATIVE_${_config}}") +endfunction() + +function(vcpkg_internal_meson_generate_cross_file _additional_binaries) #https://mesonbuild.com/Cross-compilation.html + if(CMAKE_HOST_WIN32) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(BUILD_ARCH $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(BUILD_ARCH $ENV{PROCESSOR_ARCHITECTURE}) + endif() + if(BUILD_ARCH MATCHES "(amd|AMD)64") + set(BUILD_CPU_FAM x86_64) + set(BUILD_CPU x86_64) + elseif(BUILD_ARCH MATCHES "(x|X)86") + set(BUILD_CPU_FAM x86) + set(BUILD_CPU i686) + elseif(BUILD_ARCH MATCHES "^(ARM|arm)64$") + set(BUILD_CPU_FAM aarch64) + set(BUILD_CPU armv8) + elseif(BUILD_ARCH MATCHES "^(ARM|arm)$") + set(BUILD_CPU_FAM arm) + set(BUILD_CPU armv7hl) + else() + message(FATAL_ERROR "Unsupported host architecture ${BUILD_ARCH}!") + endif() + elseif(CMAKE_HOST_UNIX) + # at this stage, CMAKE_HOST_SYSTEM_PROCESSOR is not defined + execute_process( + COMMAND uname -m + OUTPUT_VARIABLE MACHINE + COMMAND_ERROR_IS_FATAL ANY) - set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Z7") - set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Z7") + # Show real machine architecture to visually understand whether we are in a native Apple Silicon terminal or running under Rosetta emulation + debug_message("Machine: ${MACHINE}") + + if(MACHINE MATCHES "arm64") + set(BUILD_CPU_FAM aarch64) + set(BUILD_CPU armv8) + elseif(MACHINE MATCHES "x86_64|amd64") + set(BUILD_CPU_FAM x86_64) + set(BUILD_CPU x86_64) + elseif(MACHINE MATCHES "x86|i686") + set(BUILD_CPU_FAM x86) + set(BUILD_CPU i686) + elseif(MACHINE MATCHES "i386") + set(BUILD_CPU_FAM x86) + set(BUILD_CPU i386) + else() + unset(BUILD_CPU_FAM) + unset(BUILD_CPU) + + # https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-tables.md#cpu-families + message(FATAL_ERROR "Unhandled machine: ${MACHINE}") + endif() + else() + message(FATAL_ERROR "Failed to detect the host architecture!") endif() - - set(MESON_COMMON_LDFLAGS "${MESON_COMMON_LDFLAGS} /DEBUG") - set(MESON_RELEASE_LDFLAGS "${MESON_RELEASE_LDFLAGS} /INCREMENTAL:NO /OPT:REF /OPT:ICF") - - # select meson cmd-line options - list(APPEND _vcm_OPTIONS -Dcmake_prefix_path=${CURRENT_INSTALLED_DIR}) - list(APPEND _vcm_OPTIONS --buildtype plain --backend ninja --wrap-mode nodownload) - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - list(APPEND _vcm_OPTIONS --default-library shared) + + if(VCPKG_TARGET_ARCHITECTURE MATCHES "(amd|AMD|x|X)64") + set(HOST_CPU_FAM x86_64) + set(HOST_CPU x86_64) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)86") + set(HOST_CPU_FAM x86) + set(HOST_CPU i686) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)64$") + set(HOST_CPU_FAM aarch64) + set(HOST_CPU armv8) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)$") + set(HOST_CPU_FAM arm) + set(HOST_CPU armv7hl) else() - list(APPEND _vcm_OPTIONS --default-library static) + message(FATAL_ERROR "Unsupported target architecture ${VCPKG_TARGET_ARCHITECTURE}!" ) + endif() + set(CROSS "[binaries]\n") + if(VCPKG_TARGET_IS_WINDOWS) + set(proglist MT) + else() + set(proglist AR RANLIB STRIP NM OBJDUMP DLLTOOL MT) + endif() + foreach(prog IN LISTS proglist) + if(VCPKG_DETECTED_CMAKE_${prog}) + string(TOLOWER "${prog}" proglower) + string(APPEND CROSS "${proglower} = '${VCPKG_DETECTED_CMAKE_${prog}}'\n") + endif() + endforeach() + set(compiler C CXX RC) + foreach(prog IN LISTS compiler) + if(VCPKG_DETECTED_CMAKE_${prog}_COMPILER) + string(REPLACE "CXX" "CPP" mesonprog "${prog}") + string(REPLACE "RC" "windres" mesonprog "${mesonprog}") # https://mesonbuild.com/Windows-module.html + string(TOLOWER "${mesonprog}" proglower) + string(APPEND CROSS "${proglower} = '${VCPKG_DETECTED_CMAKE_${prog}_COMPILER}'\n") + endif() + endforeach() + if(VCPKG_DETECTED_CMAKE_LINKER AND VCPKG_TARGET_IS_WINDOWS) + if (NOT VCPKG_DETECTED_CMAKE_C_COMPILER_ID MATCHES "^(GNU|Intel)$") # for gcc and icc the linker flag -fuse-ld is used. See https://github.com/mesonbuild/meson/issues/8647#issuecomment-878673456 + string(APPEND CROSS "c_ld = '${VCPKG_DETECTED_CMAKE_LINKER}'\n") + endif() + endif() + if(VCPKG_DETECTED_CMAKE_LINKER AND VCPKG_TARGET_IS_WINDOWS) + if (NOT VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Intel)$") # for gcc and icc the linker flag -fuse-ld is used. See https://github.com/mesonbuild/meson/issues/8647#issuecomment-878673456 + string(APPEND CROSS "cpp_ld = '${VCPKG_DETECTED_CMAKE_LINKER}'\n") + endif() + endif() + foreach(_binary IN LISTS ${_additional_binaries}) + string(APPEND CROSS "${_binary}\n") + endforeach() + + string(APPEND CROSS "[properties]\n") + + string(APPEND CROSS "[host_machine]\n") + string(APPEND CROSS "endian = 'little'\n") + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_TARGET_IS_MINGW) + set(MESON_SYSTEM_NAME "windows") + else() + string(TOLOWER "${VCPKG_CMAKE_SYSTEM_NAME}" MESON_SYSTEM_NAME) + endif() + string(APPEND CROSS "system = '${MESON_SYSTEM_NAME}'\n") + string(APPEND CROSS "cpu_family = '${HOST_CPU_FAM}'\n") + string(APPEND CROSS "cpu = '${HOST_CPU}'\n") + + string(APPEND CROSS "[build_machine]\n") + string(APPEND CROSS "endian = 'little'\n") + if(WIN32) + string(APPEND CROSS "system = 'windows'\n") + elseif(DARWIN) + string(APPEND CROSS "system = 'darwin'\n") + else() + string(APPEND CROSS "system = 'linux'\n") + endif() + + if(DEFINED BUILD_CPU_FAM) + string(APPEND CROSS "cpu_family = '${BUILD_CPU_FAM}'\n") + endif() + if(DEFINED BUILD_CPU) + string(APPEND CROSS "cpu = '${BUILD_CPU}'\n") endif() - - list(APPEND _vcm_OPTIONS_DEBUG --prefix ${CURRENT_PACKAGES_DIR}/debug --includedir ../include) - list(APPEND _vcm_OPTIONS_RELEASE --prefix ${CURRENT_PACKAGES_DIR}) - + + if(NOT BUILD_CPU_FAM MATCHES "${HOST_CPU_FAM}" OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_IOS OR VCPKG_TARGET_IS_UWP OR (VCPKG_TARGET_IS_MINGW AND NOT WIN32)) + set(_file "${CURRENT_BUILDTREES_DIR}/meson-cross-${TARGET_TRIPLET}.log") + set(VCPKG_MESON_CROSS_FILE "${_file}" PARENT_SCOPE) + file(WRITE "${_file}" "${CROSS}") + endif() +endfunction() + +function(vcpkg_internal_meson_generate_cross_file_config _config) #https://mesonbuild.com/Native-environments.html + set(CROSS_${_config} "[properties]\n") #https://mesonbuild.com/Builtin-options.html + vcpkg_internal_meson_generate_flags_properties_string(CROSS_PROPERTIES ${_config}) + string(APPEND CROSS_${_config} "${CROSS_PROPERTIES}") + string(APPEND CROSS_${_config} "[built-in options]\n") + if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(CRT mt) + else() + set(CRT md) + endif() + if(${_config} STREQUAL DEBUG) + set(CRT ${CRT}d) + endif() + string(APPEND CROSS_${_config} "b_vscrt = '${CRT}'\n") + endif() + string(TOLOWER "${_config}" lowerconfig) + set(_file "${CURRENT_BUILDTREES_DIR}/meson-cross-${TARGET_TRIPLET}-${lowerconfig}.log") + set(VCPKG_MESON_CROSS_FILE_${_config} "${_file}" PARENT_SCOPE) + file(WRITE "${_file}" "${CROSS_${_config}}") +endfunction() + + +function(vcpkg_configure_meson) + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 _vcm "" "SOURCE_PATH" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;ADDITIONAL_NATIVE_BINARIES;ADDITIONAL_CROSS_BINARIES") + + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + z_vcpkg_get_cmake_vars(cmake_vars_file) + debug_message("Including cmake vars from: ${cmake_vars_file}") + include("${cmake_vars_file}") + + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) + vcpkg_add_to_path("${PYTHON3_DIR}") + list(APPEND _vcm_ADDITIONAL_NATIVE_BINARIES "python = '${PYTHON3}'") + list(APPEND _vcm_ADDITIONAL_CROSS_BINARIES "python = '${PYTHON3}'") + vcpkg_find_acquire_program(MESON) + + get_filename_component(CMAKE_PATH ${CMAKE_COMMAND} DIRECTORY) + vcpkg_add_to_path("${CMAKE_PATH}") # Make CMake invokeable for Meson + vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) - if(CMAKE_HOST_WIN32) - set(_PATHSEP ";") + vcpkg_add_to_path(PREPEND "${NINJA_PATH}") # Need to prepend so that meson picks up the correct ninja from vcpkg .... + # list(APPEND _vcm_ADDITIONAL_NATIVE_BINARIES "ninja = '${NINJA}'") # This does not work due to meson issues ...... + + list(APPEND _vcm_OPTIONS --buildtype plain --backend ninja --wrap-mode nodownload) + + if(NOT VCPKG_MESON_CROSS_FILE) + vcpkg_internal_meson_generate_cross_file("_vcm_ADDITIONAL_CROSS_BINARIES") + endif() + if(NOT VCPKG_MESON_CROSS_FILE_DEBUG AND VCPKG_MESON_CROSS_FILE) + vcpkg_internal_meson_generate_cross_file_config(DEBUG) + endif() + if(NOT VCPKG_MESON_CROSS_FILE_RELEASE AND VCPKG_MESON_CROSS_FILE) + vcpkg_internal_meson_generate_cross_file_config(RELEASE) + endif() + if(VCPKG_MESON_CROSS_FILE) + list(APPEND _vcm_OPTIONS --cross "${VCPKG_MESON_CROSS_FILE}") + endif() + if(VCPKG_MESON_CROSS_FILE_DEBUG) + list(APPEND _vcm_OPTIONS_DEBUG --cross "${VCPKG_MESON_CROSS_FILE_DEBUG}") + endif() + if(VCPKG_MESON_CROSS_FILE_RELEASE) + list(APPEND _vcm_OPTIONS_RELEASE --cross "${VCPKG_MESON_CROSS_FILE_RELEASE}") + endif() + + if(NOT VCPKG_MESON_NATIVE_FILE AND NOT VCPKG_MESON_CROSS_FILE) + vcpkg_internal_meson_generate_native_file("_vcm_ADDITIONAL_NATIVE_BINARIES") + endif() + if(NOT VCPKG_MESON_NATIVE_FILE_DEBUG AND NOT VCPKG_MESON_CROSS_FILE) + vcpkg_internal_meson_generate_native_file_config(DEBUG) + endif() + if(NOT VCPKG_MESON_NATIVE_FILE_RELEASE AND NOT VCPKG_MESON_CROSS_FILE) + vcpkg_internal_meson_generate_native_file_config(RELEASE) + endif() + if(VCPKG_MESON_NATIVE_FILE AND NOT VCPKG_MESON_CROSS_FILE) + list(APPEND _vcm_OPTIONS --native "${VCPKG_MESON_NATIVE_FILE}") + list(APPEND _vcm_OPTIONS_DEBUG --native "${VCPKG_MESON_NATIVE_FILE_DEBUG}") + list(APPEND _vcm_OPTIONS_RELEASE --native "${VCPKG_MESON_NATIVE_FILE_RELEASE}") else() - set(_PATHSEP ":") + list(APPEND _vcm_OPTIONS --native "${SCRIPTS}/buildsystems/meson/none.txt") + endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND _vcm_OPTIONS --default-library shared) + else() + list(APPEND _vcm_OPTIONS --default-library static) endif() - set(ENV{PATH} "$ENV{PATH}${_PATHSEP}${NINJA_PATH}") - # configure release - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_RELEASE_CFLAGS}") - set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_RELEASE_CXXFLAGS}") - set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_RELEASE_LDFLAGS}") - set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_RELEASE_CPPFLAGS}") - vcpkg_execute_required_process( - COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_RELEASE} ${_vcm_SOURCE_PATH} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + list(APPEND _vcm_OPTIONS --libdir lib) # else meson install into an architecture describing folder + list(APPEND _vcm_OPTIONS_DEBUG -Ddebug=true --prefix ${CURRENT_PACKAGES_DIR}/debug --includedir ../include) + list(APPEND _vcm_OPTIONS_RELEASE -Ddebug=false --prefix ${CURRENT_PACKAGES_DIR}) + + # select meson cmd-line options + if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND _vcm_OPTIONS_DEBUG "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}/debug','${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/share']") + list(APPEND _vcm_OPTIONS_RELEASE "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/debug','${CURRENT_INSTALLED_DIR}/share']") + else() + list(APPEND _vcm_OPTIONS_DEBUG "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}/debug','${CURRENT_INSTALLED_DIR}']") + list(APPEND _vcm_OPTIONS_RELEASE "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/debug']") endif() + vcpkg_find_acquire_program(PKGCONFIG) + get_filename_component(PKGCONFIG_PATH ${PKGCONFIG} DIRECTORY) + vcpkg_add_to_path("${PKGCONFIG_PATH}") + set(PKGCONFIG_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig/") + + set(buildtypes) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - # configure debug - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_DEBUG_CFLAGS}") - set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_DEBUG_CXXFLAGS}") - set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_DEBUG_LDFLAGS}") - set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_DEBUG_CPPFLAGS}") + set(BUILDNAME DEBUG) + list(APPEND buildtypes ${BUILDNAME}) + set(PATH_SUFFIX_${BUILDNAME} "debug/") + set(SUFFIX_${BUILDNAME} "dbg") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(BUILDNAME RELEASE) + list(APPEND buildtypes ${BUILDNAME}) + set(PATH_SUFFIX_${BUILDNAME} "") + set(SUFFIX_${BUILDNAME} "rel") + endif() + + if(VCPKG_TARGET_IS_OSX) + if(DEFINED ENV{SDKROOT}) + set(_VCPKG_ENV_SDKROOT_BACKUP $ENV{SDKROOT}) + endif() + set(ENV{SDKROOT} "${VCPKG_DETECTED_CMAKE_OSX_SYSROOT}") + set(VCPKG_DETECTED_CMAKE_OSX_SYSROOT "${VCPKG_DETECTED_CMAKE_OSX_SYSROOT}" PARENT_SCOPE) + + if(DEFINED ENV{MACOSX_DEPLOYMENT_TARGET}) + set(_VCPKG_ENV_MACOSX_DEPLOYMENT_TARGET_BACKUP $ENV{MACOSX_DEPLOYMENT_TARGET}) + endif() + set(ENV{MACOSX_DEPLOYMENT_TARGET} "${VCPKG_DETECTED_CMAKE_OSX_DEPLOYMENT_TARGET}") + set(VCPKG_DETECTED_CMAKE_OSX_DEPLOYMENT_TARGET "${VCPKG_DETECTED_CMAKE_OSX_DEPLOYMENT_TARGET}" PARENT_SCOPE) + endif() + + if(DEFINED ENV{INCLUDE}) + set(ENV{INCLUDE} "$ENV{INCLUDE}${VCPKG_HOST_PATH_SEPARATOR}${CURRENT_INSTALLED_DIR}/include") + else() + set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include") + endif() + # configure build + foreach(buildtype IN LISTS buildtypes) + message(STATUS "Configuring ${TARGET_TRIPLET}-${SUFFIX_${buildtype}}") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SUFFIX_${buildtype}}") + #setting up PKGCONFIG + set(ENV{PKG_CONFIG} "${PKGCONFIG}") # Set via native file? + set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}/${PATH_SUFFIX_${buildtype}}lib/pkgconfig/") + if(DEFINED ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH_RELEASE $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}") + endif() + vcpkg_execute_required_process( - COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_DEBUG} ${_vcm_SOURCE_PATH} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg + COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_${buildtype}} ${_vcm_SOURCE_PATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SUFFIX_${buildtype}} + LOGNAME config-${TARGET_TRIPLET}-${SUFFIX_${buildtype}} ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - endif() + #Copy meson log files into buildtree for CI + if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SUFFIX_${buildtype}}/meson-logs/meson-log.txt") + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SUFFIX_${buildtype}}/meson-logs/meson-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}") + file(RENAME "${CURRENT_BUILDTREES_DIR}/meson-log.txt" "${CURRENT_BUILDTREES_DIR}/meson-log-${SUFFIX_${buildtype}}.txt") + endif() + if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SUFFIX_${buildtype}}/meson-logs/install-log.txt") + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SUFFIX_${buildtype}}/meson-logs/install-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}") + file(RENAME "${CURRENT_BUILDTREES_DIR}/install-log.txt" "${CURRENT_BUILDTREES_DIR}/install-log-${SUFFIX_${buildtype}}.txt") + endif() + message(STATUS "Configuring ${TARGET_TRIPLET}-${SUFFIX_${buildtype}} done") + + #Restore PKG_CONFIG_PATH + if(BACKUP_ENV_PKG_CONFIG_PATH_${buildtype}) + set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH_${buildtype}}") + unset(BACKUP_ENV_PKG_CONFIG_PATH_${buildtype}) + else() + unset(ENV{PKG_CONFIG_PATH}) + endif() + endforeach() + + if(VCPKG_TARGET_IS_OSX) + if(DEFINED _VCPKG_ENV_SDKROOT_BACKUP) + set(ENV{SDKROOT} "${_VCPKG_ENV_SDKROOT_BACKUP}") + else() + unset(ENV{SDKROOT}) + endif() + if(DEFINED _VCPKG_ENV_MACOSX_DEPLOYMENT_TARGET_BACKUP) + set(ENV{MACOSX_DEPLOYMENT_TARGET} "${_VCPKG_ENV_MACOSX_DEPLOYMENT_TARGET_BACKUP}") + else() + unset(ENV{MACOSX_DEPLOYMENT_TARGET}) + endif() + endif() endfunction() diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake index d660fedd70016e..6fa3a609a5cc50 100644 --- a/scripts/cmake/vcpkg_configure_qmake.cmake +++ b/scripts/cmake/vcpkg_configure_qmake.cmake @@ -1,59 +1,134 @@ -#.rst: -# .. command:: vcpkg_configure_qmake -# -# Configure a qmake-based project. -# -# :: -# vcpkg_configure_qmake(SOURCE_PATH -# [OPTIONS arg1 [arg2 ...]] -# ) -# -# ``SOURCE_PATH`` -# The path to the *.pro qmake project file. -# ``OPTIONS`` -# The options passed to qmake. +#[===[.md: +# vcpkg_configure_qmake -function(vcpkg_configure_qmake) - cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) +Configure a qmake-based project. + +```cmake +vcpkg_configure_qmake( + SOURCE_PATH + [OPTIONS arg1 [arg2 ...]] + [OPTIONS_RELEASE arg1 [arg2 ...]] + [OPTIONS_DEBUG arg1 [arg2 ...]] +) +``` + +### SOURCE_PATH +The path to the *.pro qmake project file. + +### OPTIONS, OPTIONS\_RELEASE, OPTIONS\_DEBUG +The options passed to qmake. +#]===] +function(vcpkg_configure_qmake) + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 _csc "" "SOURCE_PATH" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;BUILD_OPTIONS;BUILD_OPTIONS_RELEASE;BUILD_OPTIONS_DEBUG") + # Find qmake executable - find_program(QMAKE_COMMAND NAMES qmake PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) + set(_triplet_hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5/bin) + if(DEFINED VCPKG_QT_HOST_TOOLS_ROOT_DIR) + find_program(QMAKE_COMMAND NAMES qmake PATHS ${VCPKG_QT_HOST_TOOLS_ROOT_DIR}/bin ${_triplet_hostbindir} NO_DEFAULT_PATH) + else() + find_program(QMAKE_COMMAND NAMES qmake PATHS ${_triplet_hostbindir} NO_DEFAULT_PATH) + endif() if(NOT QMAKE_COMMAND) message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - list(APPEND _csc_OPTIONS CONFIG+=staticlib) + list(APPEND _csc_OPTIONS "CONFIG-=shared") + list(APPEND _csc_OPTIONS "CONFIG*=static") + else() + list(APPEND _csc_OPTIONS "CONFIG-=static") + list(APPEND _csc_OPTIONS "CONFIG*=shared") + list(APPEND _csc_OPTIONS_DEBUG "CONFIG*=separate_debug_info") + endif() + + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND _csc_OPTIONS "CONFIG*=static-runtime") endif() # Cleanup build directories file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + endif() + + vcpkg_find_acquire_program(PKGCONFIG) + set(ENV{PKG_CONFIG} "${PKGCONFIG}") + get_filename_component(PKGCONFIG_PATH "${PKGCONFIG}" DIRECTORY) + vcpkg_add_to_path("${PKGCONFIG_PATH}") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_config RELEASE) + set(PKGCONFIG_INSTALLED_DIR "${_VCPKG_INSTALLED_PKGCONF}${PATH_SUFFIX_${_config}}/lib/pkgconfig") + set(PKGCONFIG_INSTALLED_SHARE_DIR "${_VCPKG_INSTALLED_PKGCONF}/share/pkgconfig") + set(PKGCONFIG_PACKAGES_DIR "${_VCPKG_PACKAGES_PKGCONF}${PATH_SUFFIX_${_config}}/lib/pkgconfig") + set(PKGCONFIG_PACKAGES_SHARE_DIR "${_VCPKG_PACKAGES_PKGCONF}/share/pkgconfig") + if(DEFINED ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH_${_config} $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}") + endif() + configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_release.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf) message(STATUS "Configuring ${TARGET_TRIPLET}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(DEFINED _csc_BUILD_OPTIONS OR DEFINED _csc_BUILD_OPTIONS_RELEASE) + set(BUILD_OPT -- ${_csc_BUILD_OPTIONS} ${_csc_BUILD_OPTIONS_RELEASE}) + endif() vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" + COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release + ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} ${_csc_SOURCE_PATH} + -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" + ${BUILD_OPT} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME config-${TARGET_TRIPLET}-rel ) message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.log") + file(REMOVE "${CURRENT_BUILDTREES_DIR}/internal-config-${TARGET_TRIPLET}-rel.log") + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.log" "${CURRENT_BUILDTREES_DIR}/internal-config-${TARGET_TRIPLET}-rel.log") + endif() endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(_config DEBUG) + set(PATH_SUFFIX_DEBUG /debug) + set(PKGCONFIG_INSTALLED_DIR "${_VCPKG_INSTALLED_PKGCONF}${PATH_SUFFIX_${_config}}/lib/pkgconfig") + set(PKGCONFIG_INSTALLED_SHARE_DIR "${_VCPKG_INSTALLED_PKGCONF}/share/pkgconfig") + set(PKGCONFIG_PACKAGES_DIR "${_VCPKG_PACKAGES_PKGCONF}${PATH_SUFFIX_${_config}}/lib/pkgconfig") + set(PKGCONFIG_PACKAGES_SHARE_DIR "${_VCPKG_PACKAGES_PKGCONF}/share/pkgconfig") + if(DEFINED ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH_${_config} $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}") + endif() + configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_debug.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(DEFINED _csc_BUILD_OPTIONS OR DEFINED _csc_BUILD_OPTIONS_DEBUG) + set(BUILD_OPT -- ${_csc_BUILD_OPTIONS} ${_csc_BUILD_OPTIONS_DEBUG}) + endif() vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf" + COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug + ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} ${_csc_SOURCE_PATH} + -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf" + ${BUILD_OPT} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME config-${TARGET_TRIPLET}-dbg ) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/config.log") + file(REMOVE "${CURRENT_BUILDTREES_DIR}/internal-config-${TARGET_TRIPLET}-dbg.log") + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/config.log" "${CURRENT_BUILDTREES_DIR}/internal-config-${TARGET_TRIPLET}-dbg.log") + endif() endif() -endfunction() \ No newline at end of file +endfunction() diff --git a/scripts/cmake/vcpkg_copy_pdbs.cmake b/scripts/cmake/vcpkg_copy_pdbs.cmake index 4e9f642b5b4961..7e5c81e6d73b96 100644 --- a/scripts/cmake/vcpkg_copy_pdbs.cmake +++ b/scripts/cmake/vcpkg_copy_pdbs.cmake @@ -1,77 +1,75 @@ -## # vcpkg_copy_pdbs -## -## Automatically locate pdbs in the build tree and copy them adjacent to all DLLs. -## -## ## Usage -## ```cmake -## vcpkg_copy_pdbs([BUILD_PATHS <${CURRENT_PACKAGES_DIR}/bin/*.dll> ...]) -## ``` -## -## ## Notes -## This command should always be called by portfiles after they have finished rearranging the binary output. -## -## ## Parameters -## ### BUILD_PATHS -## Path patterns passed to `file(GLOB_RECURSE)` for locating dlls. -## -## Defaults to `${CURRENT_PACKAGES_DIR}/bin/*.dll` and `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll`. -## -## ## Examples -## -## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) -## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +#[===[.md: +# vcpkg_copy_pdbs + +Automatically locate pdbs in the build tree and copy them adjacent to all DLLs. + +```cmake +vcpkg_copy_pdbs( + [BUILD_PATHS ...]) +``` + +The ``s are patterns which will be passed to `file(GLOB_RECURSE)`, +for locating DLLs. It defaults to using: + +- `${CURRENT_PACKAGES_DIR}/bin/*.dll` +- `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll` + +since that is generally where DLLs are located. + +## Notes +This command should always be called by portfiles after they have finished rearranging the binary output. + +## Examples + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +#]===] function(vcpkg_copy_pdbs) - cmake_parse_arguments(_vcp "" "" "BUILD_PATHS" ${ARGN}) - - if(NOT _vcp_BUILD_PATHS) - set( - _vcp_BUILD_PATHS - ${CURRENT_PACKAGES_DIR}/bin/*.dll - ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll - ) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "" "" "BUILD_PATHS") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") endif() - function(merge_filelist OUTVAR INVAR) - set(MSG "") - foreach(VAR ${${INVAR}}) - set(MSG "${MSG} ${VAR}\n") - endforeach() - set(${OUTVAR} ${MSG} PARENT_SCOPE) - endfunction() + if(NOT DEFINED arg_BUILD_PATHS) + set(arg_BUILD_PATHS + "${CURRENT_PACKAGES_DIR}/bin/*.dll" + "${CURRENT_PACKAGES_DIR}/debug/bin/*.dll" + ) + endif() - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB_RECURSE DLLS ${_vcp_BUILD_PATHS}) + set(dlls_without_matching_pdbs "") - set(DLLS_WITHOUT_MATCHING_PDBS) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + file(GLOB_RECURSE dlls ${arg_BUILD_PATHS}) - set(PREVIOUS_VSLANG $ENV{VSLANG}) + set(vslang_backup "$ENV{VSLANG}") set(ENV{VSLANG} 1033) - foreach(DLL ${DLLS}) - execute_process(COMMAND dumpbin /PDBPATH ${DLL} + foreach(dll IN LISTS dlls) + execute_process(COMMAND dumpbin /PDBPATH "${dll}" COMMAND findstr PDB - OUTPUT_VARIABLE PDB_LINE + OUTPUT_VARIABLE pdb_line ERROR_QUIET RESULT_VARIABLE error_code ) - if(NOT error_code AND PDB_LINE MATCHES "PDB file found at") - string(REGEX MATCH '.*' PDB_PATH ${PDB_LINE}) # Extract the path which is in single quotes - string(REPLACE ' "" PDB_PATH ${PDB_PATH}) # Remove single quotes - get_filename_component(DLL_DIR ${DLL} DIRECTORY) - file(COPY ${PDB_PATH} DESTINATION ${DLL_DIR}) + if(error_code EQUAL "0" AND pdb_line MATCHES "PDB file found at.*'(.*)'") + set(pdb_path "${CMAKE_MATCH_1}") + cmake_path(GET dll PARENT_PATH dll_dir) + file(COPY "${pdb_path}" DESTINATION "${dll_dir}") else() - list(APPEND DLLS_WITHOUT_MATCHING_PDBS ${DLL}) + list(APPEND dlls_without_matching_pdbs "${dll}") endif() endforeach() - set(ENV{VSLANG} ${PREVIOUS_VSLANG}) + set(ENV{VSLANG} "${vslang_backup}") - list(LENGTH DLLS_WITHOUT_MATCHING_PDBS UNMATCHED_DLLS_LENGTH) - if(UNMATCHED_DLLS_LENGTH GREATER 0) - merge_filelist(MSG DLLS_WITHOUT_MATCHING_PDBS) - message(STATUS "Warning: Could not find a matching pdb file for:\n${MSG}") + if(NOT dlls_without_matching_pdbs STREQUAL "") + list(JOIN dlls_without_matching_pdbs "\n " message) + message(WARNING "Could not find a matching pdb file for: + ${message}\n") endif() endif() -endfunction() \ No newline at end of file +endfunction() diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake index 165f19ed1c5835..856a2d7fe25e94 100644 --- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -1,32 +1,49 @@ -## # vcpkg_copy_tool_dependencies -## -## Copy all DLL dependencies of built tools into the tool folder. -## -## ## Usage -## ```cmake -## vcpkg_copy_tool_dependencies(<${CURRENT_PACKAGES_DIR}/tools/${PORT}>) -## ``` -## ## Parameters -## The path to the directory containing the tools. -## -## ## Notes -## This command should always be called by portfiles after they have finished rearranging the binary output, if they have any tools. -## -## ## Examples -## -## * [glib](https://github.com/Microsoft/vcpkg/blob/master/ports/glib/portfile.cmake) -## * [fltk](https://github.com/Microsoft/vcpkg/blob/master/ports/fltk/portfile.cmake) -function(vcpkg_copy_tool_dependencies TOOL_DIR) - macro(search_for_dependencies PATH_TO_SEARCH) - file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) - foreach(TOOL ${TOOLS}) - execute_process(COMMAND powershell -noprofile -executionpolicy Bypass -nologo - -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 - -targetBinary ${TOOL} - -installedDir ${PATH_TO_SEARCH} - OUTPUT_VARIABLE OUT) - endforeach() - endmacro() - search_for_dependencies(${CURRENT_PACKAGES_DIR}/bin) - search_for_dependencies(${CURRENT_INSTALLED_DIR}/bin) +#[===[.md: +# vcpkg_copy_tool_dependencies + +Copy all DLL dependencies of built tools into the tool folder. + +## Usage +```cmake +vcpkg_copy_tool_dependencies(<${CURRENT_PACKAGES_DIR}/tools/${PORT}>) +``` +## Parameters +The path to the directory containing the tools. + +## Notes +This command should always be called by portfiles after they have finished rearranging the binary output, if they have any tools. + +## Examples + +* [glib](https://github.com/Microsoft/vcpkg/blob/master/ports/glib/portfile.cmake) +* [fltk](https://github.com/Microsoft/vcpkg/blob/master/ports/fltk/portfile.cmake) +#]===] + +function(z_vcpkg_copy_tool_dependencies_search tool_dir path_to_search) + file(GLOB tools "${tool_dir}/*.exe" "${tool_dir}/*.dll" "${tool_dir}/*.pyd") + foreach(tool IN LISTS tools) + vcpkg_execute_required_process( + COMMAND "${Z_VCPKG_POWERSHELL_CORE}" -noprofile -executionpolicy Bypass -nologo + -file "${SCRIPTS}/buildsystems/msbuild/applocal.ps1" + -targetBinary "${tool}" + -installedDir "${path_to_search}" + WORKING_DIRECTORY "${VCPKG_ROOT_DIR}" + LOGNAME copy-tool-dependencies + ) + endforeach() +endfunction() + +function(vcpkg_copy_tool_dependencies tool_dir) + if(ARGC GREATER 1) + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${ARGN}") + endif() + + if(VCPKG_TARGET_IS_WINDOWS) + find_program(Z_VCPKG_POWERSHELL_CORE pwsh) + if (NOT Z_VCPKG_POWERSHELL_CORE) + message(FATAL_ERROR "Could not find PowerShell Core; please open an issue to report this.") + endif() + z_vcpkg_copy_tool_dependencies_search("${tool_dir}" "${CURRENT_PACKAGES_DIR}/bin") + z_vcpkg_copy_tool_dependencies_search("${tool_dir}" "${CURRENT_INSTALLED_DIR}/bin") + endif() endfunction() diff --git a/scripts/cmake/vcpkg_copy_tools.cmake b/scripts/cmake/vcpkg_copy_tools.cmake new file mode 100644 index 00000000000000..ef3259840ccf02 --- /dev/null +++ b/scripts/cmake/vcpkg_copy_tools.cmake @@ -0,0 +1,75 @@ +#[===[.md: +# vcpkg_copy_tools + +Copy tools and all their DLL dependencies into the `tools` folder. + +## Usage +```cmake +vcpkg_copy_tools( + TOOL_NAMES ... + [SEARCH_DIR <${CURRENT_PACKAGES_DIR}/bin>] + [DESTINATION <${CURRENT_PACKAGES_DIR}/tools/${PORT}>] + [AUTO_CLEAN] +) +``` +## Parameters +### TOOL_NAMES +A list of tool filenames without extension. + +### SEARCH_DIR +The path to the directory containing the tools. This will be set to `${CURRENT_PACKAGES_DIR}/bin` if omitted. + +### DESTINATION +Destination to copy the tools to. This will be set to `${CURRENT_PACKAGES_DIR}/tools/${PORT}` if omitted. + +### AUTO_CLEAN +Auto clean executables in `${CURRENT_PACKAGES_DIR}/bin` and `${CURRENT_PACKAGES_DIR}/debug/bin`. + +## Examples + +* [cpuinfo](https://github.com/microsoft/vcpkg/blob/master/ports/cpuinfo/portfile.cmake) +* [nanomsg](https://github.com/microsoft/vcpkg/blob/master/ports/nanomsg/portfile.cmake) +* [uriparser](https://github.com/microsoft/vcpkg/blob/master/ports/uriparser/portfile.cmake) +#]===] + +function(vcpkg_copy_tools) + cmake_parse_arguments(PARSE_ARGV 0 arg "AUTO_CLEAN" "SEARCH_DIR;DESTINATION" "TOOL_NAMES") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + if(NOT DEFINED arg_TOOL_NAMES) + message(FATAL_ERROR "TOOL_NAMES must be specified.") + endif() + + if(NOT DEFINED arg_DESTINATION) + set(arg_DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + endif() + + if(NOT DEFINED arg_SEARCH_DIR) + set(arg_SEARCH_DIR "${CURRENT_PACKAGES_DIR}/bin") + elseif(NOT IS_DIRECTORY "${arg_SEARCH_DIR}") + message(FATAL_ERROR "SEARCH_DIR (${arg_SEARCH_DIR}) must be a directory") + endif() + + foreach(tool_name IN LISTS arg_TOOL_NAMES) + set(tool_path "${arg_SEARCH_DIR}/${tool_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + set(tool_pdb "${arg_SEARCH_DIR}/${tool_name}.pdb") + if(EXISTS "${tool_path}") + file(COPY "${tool_path}" DESTINATION "${arg_DESTINATION}") + else() + message(FATAL_ERROR "Couldn't find tool \"${tool_name}\": + \"${tool_path}\" does not exist") + endif() + if(EXISTS "${tool_pdb}") + file(COPY "${tool_pdb}" DESTINATION "${arg_DESTINATION}") + endif() + endforeach() + + if(arg_AUTO_CLEAN) + vcpkg_clean_executables_in_bin(FILE_NAMES ${arg_TOOL_NAMES}) + endif() + + vcpkg_copy_tool_dependencies("${arg_DESTINATION}") +endfunction() diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 72016b8c925f0c..8bbe9e3b574de1 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -1,186 +1,279 @@ -## # vcpkg_download_distfile -## -## Download and cache a file needed for this port. -## -## This helper should always be used instead of CMake's built-in `file(DOWNLOAD)` command. -## -## ## Usage -## ```cmake -## vcpkg_download_distfile( -## -## URLS ... -## FILENAME -## SHA512 <5981de...> -## ) -## ``` -## ## Parameters -## ### OUT_VARIABLE -## This variable will be set to the full path to the downloaded file. This can then immediately be passed in to [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md) for sources. -## -## ### URLS -## A list of URLs to be consulted. They will be tried in order until one of the downloaded files successfully matches the SHA512 given. -## -## ### FILENAME -## The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. -## -## ### SHA512 -## The expected hash for the file. -## -## If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch. -## -## ### SKIP_SHA512 -## Skip SHA512 hash check for file. -## -## This switch is only valid when building with the `--head` command line flag. -## -## ### HEADERS -## A list of headers to append to the download request. This can be used for authentication during a download. -## -## Headers should be specified as ": ". -## -## ## Notes -## The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downloading from GitHub projects. -## -## ## Examples -## -## * [apr](https://github.com/Microsoft/vcpkg/blob/master/ports/apr/portfile.cmake) -## * [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake) -## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) -function(vcpkg_download_distfile VAR) - set(options SKIP_SHA512) - set(oneValueArgs FILENAME SHA512) - set(multipleValuesArgs URLS HEADERS) - cmake_parse_arguments(vcpkg_download_distfile "${options}" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) - - if(NOT DEFINED vcpkg_download_distfile_URLS) +#[===[.md: +# vcpkg_download_distfile + +Download and cache a file needed for this port. + +This helper should always be used instead of CMake's built-in `file(DOWNLOAD)` command. + +## Usage +```cmake +vcpkg_download_distfile( + + URLS ... + FILENAME + SHA512 <5981de...> + [ALWAYS_REDOWNLOAD] +) +``` +## Parameters +### OUT_VARIABLE +This variable will be set to the full path to the downloaded file. This can then immediately be passed in to [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md) for sources. + +### URLS +A list of URLs to be consulted. They will be tried in order until one of the downloaded files successfully matches the SHA512 given. + +### FILENAME +The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. + +### SHA512 +The expected hash for the file. + +If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch. + +### QUIET +Suppress output on cache hit + +### SKIP_SHA512 +Skip SHA512 hash check for file. + +This switch is only valid when building with the `--head` command line flag. + +### ALWAYS_REDOWNLOAD +Avoid caching; this is a REST call or otherwise unstable. + +Requires `SKIP_SHA512`. + +### HEADERS +A list of headers to append to the download request. This can be used for authentication during a download. + +Headers should be specified as ": ". + +## Notes +The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downloading from GitHub projects. + +## Examples + +* [apr](https://github.com/Microsoft/vcpkg/blob/master/ports/apr/portfile.cmake) +* [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake) +* [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake) +#]===] + +function(z_vcpkg_download_distfile_test_hash path kind error_advice sha512 skip_sha512) + if(_VCPKG_INTERNAL_NO_HASH_CHECK) + # When using the internal hash skip, do not output an explicit message. + return() + endif() + if(skip_sha512) + message(STATUS "Skipping hash check for ${file_path}.") + return() + endif() + + file(SHA512 "${path}" file_hash) + if(NOT "${file_hash}" STREQUAL "${sha512}") + message(FATAL_ERROR + "\nFile does not have expected hash:\n" + " File path: [ ${file_path} ]\n" + " Expected hash: [ ${sha512} ]\n" + " Actual hash: [ ${file_hash} ]\n" + "${CUSTOM_ERROR_ADVICE}\n") + endif() +endfunction() + +function(z_vcpkg_download_distfile_show_proxy_and_fail error_code) + message(FATAL_ERROR + " \n" + " Failed to download file with error: ${error_code}\n" + " If you use a proxy, please check your proxy setting. Possible causes are:\n" + " \n" + " 1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable\n" + " to `https://address:port`. This is not correct, because `https://` prefix\n" + " claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr\n" + " , etc..) is an HTTP proxy. Try setting `http://address:port` to both\n" + " HTTP_PROXY and HTTPS_PROXY instead.\n" + " \n" + " 2. You are using Fiddler. Currently a bug (https://github.com/microsoft/vcpkg/issues/17752)\n" + " will set HTTPS_PROXY to `https://fiddler_address:port` which lead to problem 1 above.\n" + " Workaround is open Windows 10 Settings App, and search for Proxy Configuration page,\n" + " Change `http=address:port;https=address:port` to `address`, and fill the port number.\n" + " \n" + " 3. You proxy's remote server is out of service.\n" + " \n" + " In future vcpkg releases, if you are using Windows, you no longer need to set\n" + " HTTP(S)_PROXY environment variables. Vcpkg will simply apply Windows IE Proxy\n" + " Settings set by your proxy software. See (https://github.com/microsoft/vcpkg-tool/pull/49)\n" + " and (https://github.com/microsoft/vcpkg-tool/pull/77)\n" + " \n" + " Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues\n") +endfunction() + +function(z_vcpkg_download_distfile_via_aria filename urls headers sha512 skip_sha512) + vcpkg_find_acquire_program(ARIA2) + message(STATUS "Downloading ${filename}...") + + vcpkg_list(SET headers_param) + foreach(header IN LISTS headers) + vcpkg_list(APPEND headers_param "--header=${header}") + endforeach() + + vcpkg_execute_in_download_mode( + COMMAND ${ARIA2} ${urls} + -o temp/${filename} + -l download-${filename}-detailed.log + ${headers_param} + OUTPUT_FILE download-${filename}-out.log + ERROR_FILE download-${filename}-err.log + RESULT_VARIABLE error_code + WORKING_DIRECTORY "${DOWNLOADS}" + ) + if (NOT "${error_code}" STREQUAL "0") + message(STATUS + "Downloading ${filename}... Failed.\n" + " Exit Code: ${error_code}\n" + " See logs for more information:\n" + " ${DOWNLOADS}/download-${filename}-out.log\n" + " ${DOWNLOADS}/download-${filename}-err.log\n" + " ${DOWNLOADS}/download-${filename}-detailed.log\n" + ) + z_vcpkg_download_distfile_show_proxy_and_fail() + else() + z_vcpkg_download_distfile_test_hash( + "${DOWNLOADS}/temp/${filename}" + "downloaded file" + "The file may have been corrupted in transit." + ) + file(REMOVE + ${DOWNLOADS}/download-${filename}-out.log + ${DOWNLOADS}/download-${filename}-err.log + ${DOWNLOADS}/download-${filename}-detailed.log + ) + get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY) + file(MAKE_DIRECTORY "${downloaded_file_dir}") + file(RENAME "${DOWNLOADS}/temp/${filename}" "${downloaded_file_path}") + endif() +endfunction() + +function(vcpkg_download_distfile out_var) + cmake_parse_arguments(PARSE_ARGV 1 arg + "SKIP_SHA512;SILENT_EXIT;QUIET;ALWAYS_REDOWNLOAD" + "FILENAME;SHA512" + "URLS;HEADERS" + ) + + if(NOT DEFINED arg_URLS) message(FATAL_ERROR "vcpkg_download_distfile requires a URLS argument.") endif() - if(NOT DEFINED vcpkg_download_distfile_FILENAME) + if(NOT DEFINED arg_FILENAME) message(FATAL_ERROR "vcpkg_download_distfile requires a FILENAME argument.") endif() - if(NOT _VCPKG_INTERNAL_NO_HASH_CHECK) - if(vcpkg_download_distfile_SKIP_SHA512 AND NOT VCPKG_USE_HEAD_VERSION) - message(FATAL_ERROR "vcpkg_download_distfile only allows SKIP_SHA512 when building with --head") - endif() - if(NOT vcpkg_download_distfile_SKIP_SHA512 AND NOT DEFINED vcpkg_download_distfile_SHA512) - message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument. If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") - endif() - if(vcpkg_download_distfile_SKIP_SHA512 AND DEFINED vcpkg_download_distfile_SHA512) - message(FATAL_ERROR "vcpkg_download_distfile must not be passed both SHA512 and SKIP_SHA512.") + if(arg_SILENT_EXIT) + message(WARNING "SILENT_EXIT has been deprecated as an argument to vcpkg_download_distfile -- remove the argument to resolve this warning") + endif() + if(arg_ALWAYS_REDOWNLOAD AND NOT arg_SKIP_SHA512) + message(FATAL_ERROR "ALWAYS_REDOWNLOAD option requires SKIP_SHA512 as well") + endif() + + if(NOT arg_SKIP_SHA512 AND NOT DEFINED arg_SHA512) + message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument. +If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") + elseif(arg_SKIP_SHA512 AND DEFINED arg_SHA512) + message(FATAL_ERROR "vcpkg_download_distfile must not be passed both SHA512 and SKIP_SHA512.") + endif() + + if(_VCPKG_INTERNAL_NO_HASH_CHECK) + set(arg_SKIP_SHA512 1) + endif() + + if(NOT arg_SKIP_SHA512) + if("${arg_SHA512}" STREQUAL "0") + string(REPEAT 0 128 arg_SHA512) + else() + string(LENGTH "${arg_SHA512}" arg_SHA512_length) + if(NOT "${arg_SHA512_length}" EQUAL "128" OR NOT "${arg_SHA512}" MATCHES "^[a-zA-Z0-9]*$") + message(FATAL_ERROR "Invalid SHA512: ${arg_SHA512}. + If you do not know the file's SHA512, set this to \"0\".") + endif() endif() endif() - set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) - set(download_file_path_part "${DOWNLOADS}/temp/${vcpkg_download_distfile_FILENAME}") + set(downloaded_file_path "${DOWNLOADS}/${arg_FILENAME}") + set(download_file_path_part "${DOWNLOADS}/temp/${arg_FILENAME}") # Works around issue #3399 - if(IS_DIRECTORY "${DOWNLOADS}/temp") - file(REMOVE_RECURSE "${DOWNLOADS}/temp0") - file(RENAME "${DOWNLOADS}/temp" "${DOWNLOADS}/temp0") - file(REMOVE_RECURSE "${DOWNLOADS}/temp0") - endif() + # Delete "temp0" directory created by the old version of vcpkg + file(REMOVE_RECURSE "${DOWNLOADS}/temp0") + file(REMOVE_RECURSE "${DOWNLOADS}/temp") file(MAKE_DIRECTORY "${DOWNLOADS}/temp") - function(test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE) - if(_VCPKG_INTERNAL_NO_HASH_CHECK) - # When using the internal hash skip, do not output an explicit message. - return() + # vcpkg_download_distfile_ALWAYS_REDOWNLOAD only triggers when NOT _VCPKG_NO_DOWNLOADS + # this could be de-morgan'd out but it's more clear this way + if(_VCPKG_NO_DOWNLOADS) + if(NOT EXISTS "${downloaded_file_path}") + message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") endif() - if(vcpkg_download_distfile_SKIP_SHA512) - message(STATUS "Skipping hash check for ${FILE_PATH}.") - return() + if(NOT arg_QUIET) + message(STATUS "Using ${downloaded_file_path}") endif() - file(SHA512 ${FILE_PATH} FILE_HASH) - if(NOT FILE_HASH STREQUAL vcpkg_download_distfile_SHA512) - message(FATAL_ERROR - "\nFile does not have expected hash:\n" - " File path: [ ${FILE_PATH} ]\n" - " Expected hash: [ ${vcpkg_download_distfile_SHA512} ]\n" - " Actual hash: [ ${FILE_HASH} ]\n" - "${CUSTOM_ERROR_ADVICE}\n") - endif() - endfunction() + z_vcpkg_download_distfile_test_hash( + "${downloaded_file_path}" + "cached file" + "Please delete the file and retry if this file should be downloaded again." + ) + set("${out_var}" "${downloaded_file_path}" PARENT_SCOPE) + return() + endif() + + if(_VCPKG_DOWNLOAD_TOOL STREQUAL "ARIA2" AND NOT EXISTS "${downloaded_file_path}") + z_vcpkg_download_distfile_via_aria( + "${arg_FILENAME}" + "${arg_URLS}" + "${arg_HEADERS}" + "${arg_SHA512}" + "${arg_skip_sha512}" + ) + set("${out_var}" "${downloaded_file_path}" PARENT_SCOPE) + return() + endif() + + vcpkg_list(SET urls_param) + foreach(url IN LISTS arg_URLS) + vcpkg_list(APPEND urls_param "--url=${url}") + endforeach() + if(NOT vcpkg_download_distfile_QUIET) + message(STATUS "Downloading ${arg_URLS} -> ${arg_FILENAME}...") + endif() + + vcpkg_list(SET headers_param) + foreach(header IN LISTS arg_HEADERS) + list(APPEND headers_param "--header=${header}") + endforeach() - if(EXISTS "${downloaded_file_path}") - message(STATUS "Using cached ${downloaded_file_path}") - test_hash("${downloaded_file_path}" "cached file" "Please delete the file and retry if this file should be downloaded again.") + if(arg_SKIP_SHA512) + vcpkg_list(SET sha512_param "--skip-sha512") else() - if(_VCPKG_NO_DOWNLOADS) - message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") - endif() + vcpkg_list(SET sha512_param "--sha512=${arg_SHA512}") + endif() - # Tries to download the file. - list(GET vcpkg_download_distfile_URLS 0 SAMPLE_URL) - if(_VCPKG_DOWNLOAD_TOOL STREQUAL "ARIA2" AND NOT SAMPLE_URL MATCHES "aria2") - vcpkg_find_acquire_program("ARIA2") - message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}...") - if(vcpkg_download_distfile_HEADERS) - foreach(header ${vcpkg_download_distfile_HEADERS}) - list(APPEND request_headers "--header=${header}") - endforeach() - endif() - execute_process( - COMMAND ${ARIA2} ${vcpkg_download_distfile_URLS} - -o temp/${vcpkg_download_distfile_FILENAME} - -l download-${vcpkg_download_distfile_FILENAME}-detailed.log - ${request_headers} - OUTPUT_FILE download-${vcpkg_download_distfile_FILENAME}-out.log - ERROR_FILE download-${vcpkg_download_distfile_FILENAME}-err.log - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${DOWNLOADS} - ) - if (NOT "${error_code}" STREQUAL "0") - message(STATUS - "Downloading ${vcpkg_download_distfile_FILENAME}... Failed.\n" - " Exit Code: ${error_code}\n" - " See logs for more information:\n" - " ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-out.log\n" - " ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-err.log\n" - " ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-detailed.log\n" - ) - set(download_success 0) - else() - file(REMOVE - ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-out.log - ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-err.log - ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-detailed.log - ) - set(download_success 1) - endif() - else() - foreach(url IN LISTS vcpkg_download_distfile_URLS) - message(STATUS "Downloading ${url}...") - if(vcpkg_download_distfile_HEADERS) - foreach(header ${vcpkg_download_distfile_HEADERS}) - list(APPEND request_headers HTTPHEADER ${header}) - endforeach() - endif() - file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status ${request_headers}) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") - set(download_success 0) - else() - set(download_success 1) - break() - endif() - endforeach(url) - endif() + if(NOT EXISTS "${downloaded_file_path}" OR arg_ALWAYS_REDOWNLOAD) + vcpkg_execute_in_download_mode( + COMMAND "$ENV{VCPKG_COMMAND}" x-download + "${downloaded_file_path}" + ${sha512_param} + ${urls_param} + ${headers_param} + --debug + --feature-flags=-manifests # there's a bug in vcpkg x-download when it finds a manifest-root + OUTPUT_VARIABLE output + ERROR_VARIABLE output + RESULT_VARIABLE error_code + WORKING_DIRECTORY "${DOWNLOADS}" + ) - if (NOT download_success) - message(FATAL_ERROR - " \n" - " Failed to download file.\n" - " If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment\n" - " variables to \"https://user:password@your-proxy-ip-address:port/\".\n" - " Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues\n") - else() - test_hash("${download_file_path_part}" "downloaded file" "The file may have been corrupted in transit. This can be caused by proxies. If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment variables to \"https://user:password@your-proxy-ip-address:port/\".\n") - get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY) - file(MAKE_DIRECTORY "${downloaded_file_dir}") - file(RENAME ${download_file_path_part} ${downloaded_file_path}) + if(NOT "${error_code}" EQUAL "0") + message("${output}") + z_vcpkg_download_distfile_show_proxy_and_fail("${error_code}") endif() endif() - set(${VAR} ${downloaded_file_path} PARENT_SCOPE) + + set("${out_var}" "${downloaded_file_path}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_execute_build_process.cmake b/scripts/cmake/vcpkg_execute_build_process.cmake index 9da6cec9f57baa..914c07e0d3054a 100644 --- a/scripts/cmake/vcpkg_execute_build_process.cmake +++ b/scripts/cmake/vcpkg_execute_build_process.cmake @@ -1,143 +1,162 @@ -## # vcpkg_execute_build_process -## -## Execute a required build process -## -## ## Usage -## ```cmake -## vcpkg_execute_build_process( -## COMMAND [...] -## [NO_PARALLEL_COMMAND [...]] -## WORKING_DIRECTORY -## LOGNAME ) -## ) -## ``` -## ## Parameters -## ### COMMAND -## The command to be executed, along with its arguments. -## -## ### NO_PARALLEL_COMMAND -## Optional parameter which specifies a non-parallel command to attempt if a -## failure potentially due to parallelism is detected. -## -## ### WORKING_DIRECTORY -## The directory to execute the command in. -## -## ### LOGNAME -## The prefix to use for the log files. -## -## This should be a unique name for different triplets so that the logs don't -## conflict when building multiple at once. -## -## ## Examples -## -## * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) -include(vcpkg_prettify_command) +#[===[.md: +# vcpkg_execute_build_process + +Execute a required build process + +## Usage +```cmake +vcpkg_execute_build_process( + COMMAND [...] + [NO_PARALLEL_COMMAND [...]] + WORKING_DIRECTORY + LOGNAME +) +``` +## Parameters +### COMMAND +The command to be executed, along with its arguments. + +### NO_PARALLEL_COMMAND +Optional parameter which specifies a non-parallel command to attempt if a +failure potentially due to parallelism is detected. + +### WORKING_DIRECTORY +The directory to execute the command in. + +### LOGNAME +The prefix to use for the log files. + +This should be a unique name for different triplets so that the logs don't +conflict when building multiple at once. + +## Examples + +* [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) +#]===] + +set(Z_VCPKG_EXECUTE_BUILD_PROCESS_RETRY_ERROR_MESSAGES + "LINK : fatal error LNK1102:" + " fatal error C1060: " + # The linker ran out of memory during execution. We will try continuing once more, with parallelism disabled. + "LINK : fatal error LNK1318:" + "LINK : fatal error LNK1104:" + "LINK : fatal error LNK1201:" + # Multiple threads using the same directory at the same time cause conflicts, will try again. + "Cannot create parent directory" + "Cannot write file" + # Multiple threads caused the wrong order of creating folders and creating files in folders + "Can't open" +) +list(JOIN Z_VCPKG_EXECUTE_BUILD_PROCESS_RETRY_ERROR_MESSAGES "|" Z_VCPKG_EXECUTE_BUILD_PROCESS_RETRY_ERROR_MESSAGES) + function(vcpkg_execute_build_process) - cmake_parse_arguments(_ebp "" "WORKING_DIRECTORY;LOGNAME" "COMMAND;NO_PARALLEL_COMMAND" ${ARGN}) + cmake_parse_arguments(PARSE_ARGV 0 arg "" "WORKING_DIRECTORY;LOGNAME" "COMMAND;NO_PARALLEL_COMMAND") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + foreach(required_arg IN ITEMS WORKING_DIRECTORY COMMAND) + if(NOT DEFINED arg_${required_arg}) + message(FATAL_ERROR "${required_arg} must be specified.") + endif() + endforeach() - set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-out.log") - set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-err.log") + if(NOT DEFINED arg_LOGNAME) + message(WARNING "LOGNAME should be specified.") + set(arg_LOGNAME "build") + endif() + + set(log_prefix "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}") + set(log_out "${log_prefix}-out.log") + set(log_err "${log_prefix}-err.log") + set(all_logs "${log_out}" "${log_err}") execute_process( - COMMAND ${_ebp_COMMAND} - WORKING_DIRECTORY ${_ebp_WORKING_DIRECTORY} - OUTPUT_FILE ${LOG_OUT} - ERROR_FILE ${LOG_ERR} + COMMAND ${arg_COMMAND} + WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}" + OUTPUT_FILE "${log_out}" + ERROR_FILE "${log_err}" RESULT_VARIABLE error_code ) - if(error_code) - file(READ ${LOG_OUT} out_contents) - file(READ ${LOG_ERR} err_contents) - - if(out_contents) - list(APPEND LOGS ${LOG_OUT}) - endif() - if(err_contents) - list(APPEND LOGS ${LOG_ERR}) - endif() - - if(out_contents MATCHES "LINK : fatal error LNK1102:" OR out_contents MATCHES " fatal error C1060: " - OR err_contents MATCHES "LINK : fatal error LNK1102:" OR err_contents MATCHES " fatal error C1060: " - OR out_contents MATCHES "LINK : fatal error LNK1318: Unexpected PDB error; ACCESS_DENIED" - OR out_contents MATCHES "LINK : fatal error LNK1104:" - OR out_contents MATCHES "LINK : fatal error LNK1201:") - # The linker ran out of memory during execution. We will try continuing once more, with parallelism disabled. + if(NOT error_code EQUAL "0") + file(READ "${log_out}" out_contents) + file(READ "${log_err}" err_contents) + set(all_contents "${out_contents}${err_contents}") + if(all_contents MATCHES "${Z_VCPKG_EXECUTE_BUILD_PROCESS_RETRY_ERROR_MESSAGES}") message(STATUS "Restarting Build without parallelism because memory exceeded") - set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-out-1.log") - set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-err-1.log") + set(log_out "${log_prefix}-out-1.log") + set(log_err "${log_prefix}-err-1.log") + list(APPEND all_logs "${log_out}" "${log_err}") - if(_ebp_NO_PARALLEL_COMMAND) + if(DEFINED arg_NO_PARALLEL_COMMAND) execute_process( - COMMAND ${_ebp_NO_PARALLEL_COMMAND} - WORKING_DIRECTORY ${_ebp_WORKING_DIRECTORY} - OUTPUT_FILE ${LOG_OUT} - ERROR_FILE ${LOG_ERR} + COMMAND ${arg_NO_PARALLEL_COMMAND} + WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}" + OUTPUT_FILE "${log_out}" + ERROR_FILE "${log_err}" RESULT_VARIABLE error_code ) else() execute_process( - COMMAND ${_ebp_COMMAND} - WORKING_DIRECTORY ${_ebp_WORKING_DIRECTORY} - OUTPUT_FILE ${LOG_OUT} - ERROR_FILE ${LOG_ERR} + COMMAND ${arg_COMMAND} + WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}" + OUTPUT_FILE "${log_out}" + ERROR_FILE "${log_err}" RESULT_VARIABLE error_code ) endif() - - if(error_code) - file(READ ${LOG_OUT} out_contents) - file(READ ${LOG_ERR} err_contents) - - if(out_contents) - list(APPEND LOGS ${LOG_OUT}) - endif() - if(err_contents) - list(APPEND LOGS ${LOG_ERR}) - endif() - endif() - elseif(out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ") + elseif(all_contents MATCHES "mt : general error c101008d: ") # Antivirus workaround - occasionally files are locked and cause mt.exe to fail message(STATUS "mt.exe has failed. This may be the result of anti-virus. Disabling anti-virus on the buildtree folder may improve build speed") - set(ITERATION 0) - while (ITERATION LESS 3 AND (out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ")) - MATH(EXPR ITERATION "${ITERATION}+1") - message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of mt.exe file locking issue. Iteration: ${ITERATION}") + foreach(iteration RANGE 1 3) + message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of mt.exe file locking issue. Iteration: ${iteration}") + + set(log_out "${log_prefix}-out-${iteration}.log") + set(log_err "${log_prefix}-err-${iteration}.log") + list(APPEND all_logs "${log_out}" "${log_err}") execute_process( - COMMAND ${_ebp_COMMAND} - OUTPUT_FILE "${LOGPREFIX}-out-${ITERATION}.log" - ERROR_FILE "${LOGPREFIX}-err-${ITERATION}.log" + COMMAND ${arg_COMMAND} + WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}" + OUTPUT_FILE "${log_out}" + ERROR_FILE "${log_err}" RESULT_VARIABLE error_code - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) - - if(error_code) - file(READ "${LOGPREFIX}-out-${ITERATION}.log" out_contents) - file(READ "${LOGPREFIX}-err-${ITERATION}.log" err_contents) - - if(out_contents) - list(APPEND LOGS "${LOGPREFIX}-out-${ITERATION}.log") - endif() - if(err_contents) - list(APPEND LOGS "${LOGPREFIX}-err-${ITERATION}.log") - endif() - else() + ) + + if(error_code EQUAL "0") break() endif() - endwhile() - endif() - if(error_code) - set(STRINGIFIED_LOGS) - foreach(LOG ${LOGS}) - file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) - list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") + file(READ "${log_out}" out_contents) + file(READ "${log_err}" err_contents) + set(all_contents "${out_contents}${err_contents}") + if(NOT all_contents MATCHES "mt : general error c101008d: ") + break() + endif() endforeach() - vcpkg_prettify_command(_ebp_COMMAND _ebp_COMMAND_PRETTY) - message(FATAL_ERROR - " Command failed: ${_ebp_COMMAND_PRETTY}\n" - " Working Directory: ${_ebp_WORKING_DIRECTORY}\n" - " See logs for more information:\n" - ${STRINGIFIED_LOGS}) - endif(error_code) - endif(error_code) -endfunction(vcpkg_execute_build_process) + elseif(all_contents MATCHES "fatal error: ld terminated with signal 9 [Killed]") + message(WARNING "ld was terminated with signal 9 [killed], please ensure your system has sufficient hard disk space and memory.") + endif() + endif() + + if(NOT error_code EQUAL "0") + set(stringified_logs "") + foreach(log IN LISTS all_logs) + if(NOT EXISTS "${log}") + continue() + endif() + file(SIZE "${log}" log_size) + if(NOT log_size EQUAL "0") + file(TO_NATIVE_PATH "${log}" native_log) + string(APPEND stringified_logs " ${native_log}\n") + endif() + endforeach() + z_vcpkg_prettify_command_line(pretty_command ${arg_COMMAND}) + message(FATAL_ERROR + " Command failed: ${pretty_command}\n" + " Working Directory: ${arg_WORKING_DIRECTORY}\n" + " See logs for more information:\n" + "${stringified_logs}" + ) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_execute_in_download_mode.cmake b/scripts/cmake/vcpkg_execute_in_download_mode.cmake new file mode 100644 index 00000000000000..bd88f8f5dce9ce --- /dev/null +++ b/scripts/cmake/vcpkg_execute_in_download_mode.cmake @@ -0,0 +1,65 @@ +#[===[.md: +# vcpkg_execute_in_download_mode + +Execute a process even in download mode. + +## Usage +```cmake +vcpkg_execute_in_download_mode( + ... +) +``` + +The signature of this function is identical to `execute_process()`. + +See [`execute_process()`] for more details. + +[`execute_process()`]: https://cmake.org/cmake/help/latest/command/execute_process.html +#]===] + +function(vcpkg_execute_in_download_mode) + # this allows us to grab the value of the output variables, but pass through the rest of the arguments + cmake_parse_arguments(PARSE_ARGV 0 arg "" "RESULT_VARIABLE;RESULTS_VARIABLE;OUTPUT_VARIABLE;ERROR_VARIABLE" "") + + set(output_and_error_same OFF) + set(output_variable_param "") + set(error_variable_param "") + set(result_variable_param "") + set(results_variable_param "") + if(DEFINED arg_OUTPUT_VARIABLE AND DEFINED arg_ERROR_VARIABLE AND arg_OUTPUT_VARIABLE STREQUAL arg_ERROR_VARIABLE) + set(output_variable_param OUTPUT_VARIABLE out_err_var) + set(error_variable_param ERROR_VARIABLE out_err_var) + set(output_and_error_same ON) + else() + if(DEFINED arg_OUTPUT_VARIABLE) + set(output_variable_param OUTPUT_VARIABLE out_var) + endif() + if(DEFINED arg_ERROR_VARIABLE) + set(error_variable_param ERROR_VARIABLE err_var) + endif() + endif() + if(DEFINED arg_RESULT_VARIABLE) + set(result_variable_param RESULT_VARIABLE result_var) + endif() + if(DEFINED arg_RESULTS_VARIABLE) + set(results_variable_param RESULTS_VARIABLE results_var) + endif() + + cmake_language(CALL "${Z_VCPKG_EXECUTE_PROCESS_NAME}" + ${arg_UNPARSED_ARGUMENTS} + ${output_variable_param} + ${error_variable_param} + ${result_variable_param} + ${results_variable_param} + ) + + if(output_and_error_same) + z_vcpkg_forward_output_variable(arg_OUTPUT_VARIABLE out_err_var) + else() + z_vcpkg_forward_output_variable(arg_OUTPUT_VARIABLE out_var) + z_vcpkg_forward_output_variable(arg_ERROR_VARIABLE err_var) + endif() + + z_vcpkg_forward_output_variable(arg_RESULT_VARIABLE result_var) + z_vcpkg_forward_output_variable(arg_RESULTS_VARIABLE results_var) +endfunction() diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index e65d1970a42984..27024fecfce862 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -1,66 +1,144 @@ -## # vcpkg_execute_required_process -## -## Execute a process with logging and fail the build if the command fails. -## -## ## Usage -## ```cmake -## vcpkg_execute_required_process( -## COMMAND <${PERL}> [...] -## WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg> -## LOGNAME -## ) -## ``` -## ## Parameters -## ### COMMAND -## The command to be executed, along with its arguments. -## -## ### WORKING_DIRECTORY -## The directory to execute the command in. -## -## ### LOGNAME -## The prefix to use for the log files. -## -## This should be a unique name for different triplets so that the logs don't conflict when building multiple at once. -## -## ## Examples -## -## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) -## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) -## * [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) -## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) -include(vcpkg_prettify_command) +#[===[.md: +# vcpkg_execute_required_process + +Execute a process with logging and fail the build if the command fails. + +## Usage +```cmake +vcpkg_execute_required_process( + COMMAND <${PERL}> [...] + WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg> + LOGNAME + [TIMEOUT ] + [OUTPUT_VARIABLE ] + [ERROR_VARIABLE ] +) +``` +## Parameters +### ALLOW_IN_DOWNLOAD_MODE +Allows the command to execute in Download Mode. +[See execute_process() override](../../scripts/cmake/execute_process.cmake). + +### COMMAND +The command to be executed, along with its arguments. + +### WORKING_DIRECTORY +The directory to execute the command in. + +### LOGNAME +The prefix to use for the log files. + +### TIMEOUT +Optional timeout after which to terminate the command. + +### OUTPUT_VARIABLE +Optional variable to receive stdout of the command. + +### ERROR_VARIABLE +Optional variable to receive stderr of the command. + +This should be a unique name for different triplets so that the logs don't conflict when building multiple at once. + +## Examples + +* [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +* [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) +* [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) +* [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) +#]===] + function(vcpkg_execute_required_process) - cmake_parse_arguments(vcpkg_execute_required_process "" "WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) - set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log") - set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-err.log") - execute_process( - COMMAND ${vcpkg_execute_required_process_COMMAND} - OUTPUT_FILE ${LOG_OUT} - ERROR_FILE ${LOG_ERR} - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${vcpkg_execute_required_process_WORKING_DIRECTORY}) - if(error_code) - set(LOGS) - file(READ "${LOG_OUT}" out_contents) - file(READ "${LOG_ERR}" err_contents) - if(out_contents) - list(APPEND LOGS "${LOG_OUT}") + cmake_parse_arguments(PARSE_ARGV 0 arg + "ALLOW_IN_DOWNLOAD_MODE" + "WORKING_DIRECTORY;LOGNAME;TIMEOUT;OUTPUT_VARIABLE;ERROR_VARIABLE" + "COMMAND" + ) + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + foreach(required_arg IN ITEMS WORKING_DIRECTORY COMMAND) + if(NOT DEFINED arg_${required_arg}) + message(FATAL_ERROR "${required_arg} must be specified.") + endif() + endforeach() + + if(NOT DEFINED arg_LOGNAME) + message(WARNING "LOGNAME should be specified.") + set(arg_LOGNAME "required") + endif() + + if (VCPKG_DOWNLOAD_MODE AND NOT arg_ALLOW_IN_DOWNLOAD_MODE) + message(FATAL_ERROR +[[ +This command cannot be executed in Download Mode. +Halting portfile execution. +]]) + endif() + + set(log_out "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-out.log") + set(log_err "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-err.log") + + set(timeout_param "") + set(output_and_error_same OFF) + set(output_variable_param "") + set(error_variable_param "") + + if(DEFINED arg_TIMEOUT) + set(timeout_param TIMEOUT "${arg_TIMEOUT}") + endif() + if(DEFINED arg_OUTPUT_VARIABLE AND DEFINED arg_ERROR_VARIABLE AND arg_OUTPUT_VARIABLE STREQUAL arg_ERROR_VARIABLE) + set(output_variable_param OUTPUT_VARIABLE out_err_var) + set(error_variable_param ERROR_VARIABLE out_err_var) + set(output_and_error_same ON) + else() + if(DEFINED arg_OUTPUT_VARIABLE) + set(output_variable_param OUTPUT_VARIABLE out_var) endif() - if(err_contents) - list(APPEND LOGS "${LOG_ERR}") + if(DEFINED arg_ERROR_VARIABLE) + set(error_variable_param ERROR_VARIABLE err_var) endif() - set(STRINGIFIED_LOGS) - foreach(LOG ${LOGS}) - file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) - list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") + endif() + + vcpkg_execute_in_download_mode( + COMMAND ${arg_COMMAND} + OUTPUT_FILE "${log_out}" + ERROR_FILE "${log_err}" + RESULT_VARIABLE error_code + WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}" + ${timeout_param} + ${output_variable_param} + ${error_variable_param} + ) + if(NOT error_code EQUAL 0) + set(stringified_logs "") + foreach(log IN ITEMS "${log_out}" "${log_err}") + if(NOT EXISTS "${log}") + continue() + endif() + file(SIZE "${log}" log_size) + if(NOT log_size EQUAL "0") + file(TO_NATIVE_PATH "${log}" native_log) + string(APPEND stringified_logs " ${native_log}\n") + endif() endforeach() - vcpkg_prettify_command(vcpkg_execute_required_process_COMMAND vcpkg_execute_required_process_COMMAND_PRETTY) + + z_vcpkg_prettify_command_line(pretty_command ${arg_COMMAND}) message(FATAL_ERROR - " Command failed: ${vcpkg_execute_required_process_COMMAND_PRETTY}\n" - " Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" + " Command failed: ${pretty_command}\n" + " Working Directory: ${arg_WORKING_DIRECTORY}\n" " Error code: ${error_code}\n" " See logs for more information:\n" - ${STRINGIFIED_LOGS} + "${stringified_logs}" ) endif() + + # pass output parameters back to caller's scope + if(output_and_error_same) + z_vcpkg_forward_output_variable(arg_OUTPUT_VARIABLE out_err_var) + # arg_ERROR_VARIABLE = arg_OUTPUT_VARIABLE, so no need to set it again + else() + z_vcpkg_forward_output_variable(arg_OUTPUT_VARIABLE out_var) + z_vcpkg_forward_output_variable(arg_ERROR_VARIABLE err_var) + endif() endfunction() diff --git a/scripts/cmake/vcpkg_execute_required_process_repeat.cmake b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake index ca11e8ea489c1d..3ad8d05ce9fe1a 100644 --- a/scripts/cmake/vcpkg_execute_required_process_repeat.cmake +++ b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake @@ -1,31 +1,84 @@ -# Usage: vcpkg_execute_required_process_repeat(COUNT COMMAND [...] WORKING_DIRECTORY LOGNAME ) -include(vcpkg_prettify_command) +#[===[.md: +# vcpkg_execute_required_process_repeat + +Execute a process until the command succeeds, or until the COUNT is reached. + +## Usage +```cmake +vcpkg_execute_required_process_repeat( + COMMAND [] + COUNT + WORKING_DIRECTORY + LOGNAME + [ALLOW_IN_DOWNLOAD_MODE] +) +``` +#]===] + function(vcpkg_execute_required_process_repeat) - cmake_parse_arguments(vcpkg_execute_required_process_repeat "" "COUNT;WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) - #debug_message("vcpkg_execute_required_process_repeat(${vcpkg_execute_required_process_repeat_COMMAND})") - set(SUCCESSFUL_EXECUTION FALSE) - foreach(loop_count RANGE ${vcpkg_execute_required_process_repeat_COUNT}) - execute_process( - COMMAND ${vcpkg_execute_required_process_repeat_COMMAND} - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-out-${loop_count}.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-err-${loop_count}.log - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY}) - #debug_message("error_code=${error_code}") - file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}" NATIVE_BUILDTREES_DIR) - if(NOT error_code) - set(SUCCESSFUL_EXECUTION TRUE) - break() + cmake_parse_arguments(PARSE_ARGV 0 arg + "ALLOW_IN_DOWNLOAD_MODE" + "COUNT;WORKING_DIRECTORY;LOGNAME" + "COMMAND" + ) + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + foreach(required_arg IN ITEMS COUNT WORKING_DIRECTORY LOGNAME COMMAND) + if(NOT DEFINED arg_${required_arg}) + message(FATAL_ERROR "${required_arg} must be specified.") endif() - endforeach(loop_count) - if (NOT SUCCESSFUL_EXECUTION) - vcpkg_prettify_command(vcpkg_execute_required_process_repeat_COMMAND vcpkg_execute_required_process_repeat_COMMAND_PRETTY) + endforeach() + + # also checks for COUNT being an integer + if(NOT arg_COUNT GREATER_EQUAL "1") + message(FATAL_ERROR "COUNT (${arg_COUNT}) must be greater than or equal to 1.") + endif() + + if (DEFINED VCPKG_DOWNLOAD_MODE AND NOT arg_ALLOW_IN_DOWNLOAD_MODE) message(FATAL_ERROR - " Command failed: ${vcpkg_execute_required_process_repeat_COMMAND_PRETTY}\n" - " Working Directory: ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY}\n" - " See logs for more information:\n" - " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_repeat_LOGNAME}-out.log\n" - " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_repeat_LOGNAME}-err.log\n" - ) +[[ +This command cannot be executed in Download Mode. +Halting portfile execution. +]]) endif() + + set(all_logs "") + foreach(loop_count RANGE 1 ${arg_COUNT}) + set(out_log "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-out-${loop_count}.log") + set(err_log "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-out-${loop_count}.log") + list(APPEND all_logs "${out_log}" "${err_log}") + + vcpkg_execute_in_download_mode( + COMMAND ${arg_COMMAND} + OUTPUT_FILE "${out_log}" + ERROR_FILE "${err_log}" + RESULT_VARIABLE error_code + WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}" + ) + if(error_code EQUAL "0") + return() + endif() + endforeach() + + set(stringified_logs "") + foreach(log IN LISTS all_logs) + if(NOT EXISTS "${log}") + continue() + endif() + file(SIZE "${log}" log_size) + if(NOT log_size EQUAL "0") + file(TO_NATIVE_PATH "${log}" native_log) + string(APPEND stringified_logs " ${native_log}\n") + endif() + endforeach() + + z_vcpkg_prettify_command_line(pretty_command ${arg_COMMAND}) + message(FATAL_ERROR + " Command failed: ${pretty_command}\n" + " Working Directory: ${arg_WORKING_DIRECTORY}\n" + " See logs for more information:\n" + "${stringifed_logs}" + ) endfunction() diff --git a/scripts/cmake/vcpkg_extract_source_archive.cmake b/scripts/cmake/vcpkg_extract_source_archive.cmake index a55419b19cdde0..59daac7d914b0a 100644 --- a/scripts/cmake/vcpkg_extract_source_archive.cmake +++ b/scripts/cmake/vcpkg_extract_source_archive.cmake @@ -1,50 +1,242 @@ -## # vcpkg_extract_source_archive -## -## Extract an archive into the source directory. Deprecated in favor of [`vcpkg_extract_source_archive_ex`](vcpkg_extract_source_archive_ex.md). -## -## ## Usage -## ```cmake -## vcpkg_extract_source_archive( -## <${ARCHIVE}> [<${TARGET_DIRECTORY}>] -## ) -## ``` -## ## Parameters -## ### ARCHIVE -## The full path to the archive to be extracted. -## -## This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). -## -## ### TARGET_DIRECTORY -## If specified, the archive will be extracted into the target directory instead of `${CURRENT_BUILDTREES_DIR}\src\`. -## -## This can be used to mimic git submodules, by extracting into a subdirectory of another archive. -## -## ## Notes -## This command will also create a tracking file named .extracted in the TARGET_DIRECTORY. This file, when present, will suppress the extraction of the archive. -## -## ## Examples -## -## * [libraw](https://github.com/Microsoft/vcpkg/blob/master/ports/libraw/portfile.cmake) -## * [protobuf](https://github.com/Microsoft/vcpkg/blob/master/ports/protobuf/portfile.cmake) -## * [msgpack](https://github.com/Microsoft/vcpkg/blob/master/ports/msgpack/portfile.cmake) -include(vcpkg_execute_required_process) - -function(vcpkg_extract_source_archive ARCHIVE) - if(NOT ARGC EQUAL 2) - set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src") - else() - set(WORKING_DIRECTORY ${ARGV1}) - endif() +#[===[.md: +# vcpkg_extract_source_archive + +Extract an archive into the source directory. + +## Usage +There are two "overloads" of this function. The first is deprecated: + +```cmake +vcpkg_extract_source_archive(<${ARCHIVE}> [<${TARGET_DIRECTORY}>]) +``` + +This overload should not be used. + +The latter is suggested to use for all future `vcpkg_extract_source_archive`s. + +```cmake +vcpkg_extract_source_archive( + ARCHIVE + [NO_REMOVE_ONE_LEVEL] + [PATCHES ...] + [SOURCE_BASE ] + [BASE_DIRECTORY | WORKING_DIRECTORY ] +) +``` + +`vcpkg_extract_source_archive` takes an archive and extracts it. +It replaces existing uses of `vcpkg_extract_source_archive_ex`. +The simplest use of it is: + +```cmake +vcpkg_download_distfile(archive ...) +vcpkg_extract_source_archive(source_path ARCHIVE "${archive}") +``` + +The general expectation is that an archives are laid out with a base directory, +and all the actual files underneath that directory; in other words, if you +extract the archive, you'll get something that looks like: + +``` +zlib-1.2.11/ + doc/ + ... + examples/ + ... + ChangeLog + CMakeLists.txt + README + zlib.h + ... +``` + +`vcpkg_extract_source_archive` automatically removes this directory, +and gives you the items under it directly. However, this only works +when there is exactly one item in the top level of an archive. +Otherwise, you'll have to pass the `NO_REMOVE_ONE_LEVEL` argument to +prevent `vcpkg_extract_source_archive` from performing this transformation. - get_filename_component(ARCHIVE_FILENAME "${ARCHIVE}" NAME) - if(NOT EXISTS ${WORKING_DIRECTORY}/${ARCHIVE_FILENAME}.extracted) - message(STATUS "Extracting source ${ARCHIVE}") - file(MAKE_DIRECTORY ${WORKING_DIRECTORY}) +If the source needs to be patched in some way, the `PATCHES` argument +allows one to do this, just like other `vcpkg_from_*` functions. + +`vcpkg_extract_source_archive` extracts the files to +`${CURRENT_BUILDTREES_DIR}//-.clean`. +When in editable mode, no `.clean` is appended, +to allow for a user to modify the sources. +`base-directory` defaults to `src`, +and `source-base` defaults to the stem of ``. +You can change these via the `BASE_DIRECTORY` and `SOURCE_BASE` arguments +respectively. +If you need to extract to a location that is not based in `CURRENT_BUILDTREES_DIR`, +you can use the `WORKING_DIRECTORY` argument to do the same. + +## Examples + +* [libraw](https://github.com/Microsoft/vcpkg/blob/master/ports/libraw/portfile.cmake) +* [protobuf](https://github.com/Microsoft/vcpkg/blob/master/ports/protobuf/portfile.cmake) +* [msgpack](https://github.com/Microsoft/vcpkg/blob/master/ports/msgpack/portfile.cmake) +#]===] + +function(z_vcpkg_extract_source_archive_deprecated_mode archive working_directory) + cmake_path(GET archive FILENAME archive_filename) + if(NOT EXISTS "${working_directory}/${archive_filename}.extracted") + message(STATUS "Extracting source ${archive}") + file(MAKE_DIRECTORY "${working_directory}") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} -E tar xjf ${ARCHIVE} - WORKING_DIRECTORY ${WORKING_DIRECTORY} + ALLOW_IN_DOWNLOAD_MODE + COMMAND "${CMAKE_COMMAND}" -E tar xjf "${archive}" + WORKING_DIRECTORY "${working_directory}" LOGNAME extract ) - file(WRITE ${WORKING_DIRECTORY}/${ARCHIVE_FILENAME}.extracted) + file(TOUCH "${working_directory}/${archive_filename}.extracted") endif() endfunction() + +function(vcpkg_extract_source_archive) + if(ARGC LESS_EQUAL "2") + z_vcpkg_deprecation_message( "Deprecated form of vcpkg_extract_source_archive used: + Please use the `vcpkg_extract_source_archive( ARCHIVE )` form.") + if(ARGC EQUAL "0") + message(FATAL_ERROR "vcpkg_extract_source_archive requires at least one argument.") + endif() + + set(archive "${ARGV0}") + if(ARGC EQUAL "1") + set(working_directory "${CURRENT_BUILDTREES_DIR}/src") + else() + set(working_directory "${ARGV1}") + endif() + + z_vcpkg_extract_source_archive_deprecated_mode("${archive}" "${working_directory}") + return() + endif() + + set(out_source_path "${ARGV0}") + cmake_parse_arguments(PARSE_ARGV 1 "arg" + "NO_REMOVE_ONE_LEVEL;SKIP_PATCH_CHECK;Z_ALLOW_OLD_PARAMETER_NAMES" + "ARCHIVE;SOURCE_BASE;BASE_DIRECTORY;WORKING_DIRECTORY;REF" + "PATCHES" + ) + + if(DEFINED arg_REF) + if(NOT arg_Z_ALLOW_OLD_PARAMETER_NAMES) + message(FATAL_ERROR "Unexpected argument REF") + elseif(DEFINED arg_SOURCE_BASE) + message(FATAL_ERROR "Cannot specify both REF and SOURCE_BASE") + else() + string(REPLACE "/" "-" arg_SOURCE_BASE "${arg_REF}") + endif() + endif() + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT DEFINED arg_ARCHIVE) + message(FATAL_ERROR "ARCHIVE must be specified") + endif() + + if(DEFINED arg_WORKING_DIRECTORY) + if(DEFINED arg_BASE_DIRECTORY) + message(FATAL_ERROR "Cannot specify both BASE_DIRECTORY and WORKING_DIRECTORY") + elseif(NOT IS_ABSOLUTE "${arg_WORKING_DIRECTORY}") + message(FATAL_ERROR "WORKING_DIRECTORY (${arg_WORKING_DIRECTORY}) must be an absolute path") + endif() + set(working_directory "${arg_WORKING_DIRECTORY}") + else() + if(NOT DEFINED arg_BASE_DIRECTORY) + set(arg_BASE_DIRECTORY "src") + elseif(IS_ABSOLUTE "${arg_BASE_DIRECTORY}") + message(FATAL_ERROR "BASE_DIRECTORY (${arg_BASE_DIRECTORY}) must be a relative path") + endif() + cmake_path(APPEND CURRENT_BUILDTREES_DIR "${arg_BASE_DIRECTORY}" + OUTPUT_VARIABLE working_directory) + endif() + + if(NOT DEFINED arg_SOURCE_BASE) + cmake_path(GET arg_ARCHIVE STEM arg_SOURCE_BASE) + elseif(arg_SOURCE_BASE MATCHES [[\\|/]]) + message(FATAL_ERROR "SOURCE_BASE (${arg_SOURCE_BASE}) must not contain slashes") + endif() + + # Take the last 10 chars of the base + set(base_max_length 10) + string(LENGTH "${arg_SOURCE_BASE}" source_base_length) + if(source_base_length GREATER base_max_length) + math(EXPR start "${source_base_length} - ${base_max_length}") + string(SUBSTRING "${arg_SOURCE_BASE}" "${start}" -1 arg_SOURCE_BASE) + endif() + + # Hash the archive hash along with the patches. Take the first 10 chars of the hash + file(SHA512 "${arg_ARCHIVE}" patchset_hash) + foreach(patch IN LISTS arg_PATCHES) + cmake_path(ABSOLUTE_PATH patch + BASE_DIRECTORY "${CURRENT_PORT_DIR}" + OUTPUT_VARIABLE absolute_patch + ) + if(NOT EXISTS "${absolute_patch}") + message(FATAL_ERROR "Could not find patch: '${patch}'") + endif() + file(SHA512 "${absolute_patch}" current_hash) + string(APPEND patchset_hash "${current_hash}") + endforeach() + + string(SHA512 patchset_hash "${patchset_hash}") + string(SUBSTRING "${patchset_hash}" 0 10 patchset_hash) + cmake_path(APPEND working_directory "${arg_SOURCE_BASE}-${patchset_hash}" + OUTPUT_VARIABLE source_path + ) + + if(_VCPKG_EDITABLE AND EXISTS "${source_path}") + set("${out_source_path}" "${source_path}" PARENT_SCOPE) + message(STATUS "Using source at ${source_path}") + return() + elseif(NOT _VCPKG_EDITABLE) + cmake_path(APPEND_STRING source_path ".clean") + if(EXISTS "${source_path}") + message(STATUS "Cleaning sources at ${source_path}. Use --editable to skip cleaning for the packages you specify.") + file(REMOVE_RECURSE "${source_path}") + endif() + endif() + + message(STATUS "Extracting source ${arg_ARCHIVE}") + cmake_path(APPEND_STRING source_path ".tmp" OUTPUT_VARIABLE temp_dir) + file(REMOVE_RECURSE "${temp_dir}") + file(MAKE_DIRECTORY "${temp_dir}") + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND "${CMAKE_COMMAND}" -E tar xjf "${arg_ARCHIVE}" + WORKING_DIRECTORY "${temp_dir}" + LOGNAME extract + ) + + if(arg_NO_REMOVE_ONE_LEVEL) + cmake_path(SET temp_source_path "${temp_dir}") + else() + file(GLOB archive_directory "${temp_dir}/*") + # make sure `archive_directory` is only a single file + if(NOT archive_directory MATCHES ";" AND IS_DIRECTORY "${archive_directory}") + cmake_path(SET temp_source_path "${archive_directory}") + else() + message(FATAL_ERROR "Could not unwrap top level directory from archive. Pass NO_REMOVE_ONE_LEVEL to disable this.") + endif() + endif() + + if (arg_Z_SKIP_PATCH_CHECK) + set(quiet_param QUIET) + else() + set(quiet_param "") + endif() + + z_vcpkg_apply_patches( + SOURCE_PATH "${temp_source_path}" + PATCHES ${arg_PATCHES} + ${quiet_param} + ) + + file(RENAME "${temp_source_path}" "${source_path}") + file(REMOVE_RECURSE "${temp_dir}") + + set("${out_source_path}" "${source_path}" PARENT_SCOPE) + message(STATUS "Using source at ${source_path}") +endfunction() + diff --git a/scripts/cmake/vcpkg_extract_source_archive_ex.cmake b/scripts/cmake/vcpkg_extract_source_archive_ex.cmake index a775c2094cd8b0..fb48c799d8d3c7 100644 --- a/scripts/cmake/vcpkg_extract_source_archive_ex.cmake +++ b/scripts/cmake/vcpkg_extract_source_archive_ex.cmake @@ -1,130 +1,35 @@ -## # vcpkg_extract_source_archive_ex -## -## Extract an archive into the source directory. Replaces [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md). -## -## ## Usage -## ```cmake -## vcpkg_extract_source_archive_ex( -## OUT_SOURCE_PATH -## ARCHIVE <${ARCHIVE}> -## [REF <1.0.0>] -## [NO_REMOVE_ONE_LEVEL] -## [WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/src>] -## [PATCHES ...] -## ) -## ``` -## ## Parameters -## ### OUT_SOURCE_PATH -## Specifies the out-variable that will contain the extracted location. -## -## This should be set to `SOURCE_PATH` by convention. -## -## ### ARCHIVE -## The full path to the archive to be extracted. -## -## This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). -## -## ### REF -## A friendly name that will be used instead of the filename of the archive. If more than 10 characters it will be truncated. -## -## By convention, this is set to the version number or tag fetched -## -## ### WORKING_DIRECTORY -## If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. -## -## Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). -## -## ### PATCHES -## A list of patches to be applied to the extracted sources. -## -## Relative paths are based on the port directory. -## -## ### NO_REMOVE_ONE_LEVEL -## Specifies that the default removal of the top level folder should not occur. -## -## ## Examples -## -## * [bzip2](https://github.com/Microsoft/vcpkg/blob/master/ports/bzip2/portfile.cmake) -## * [sqlite3](https://github.com/Microsoft/vcpkg/blob/master/ports/sqlite3/portfile.cmake) -## * [cairo](https://github.com/Microsoft/vcpkg/blob/master/ports/cairo/portfile.cmake) -include(vcpkg_apply_patches) -include(vcpkg_extract_source_archive) +#[===[.md: +# vcpkg_extract_source_archive_ex + +Extract an archive into the source directory. +Originally replaced [`vcpkg_extract_source_archive()`], +but new ports should instead use the second overload of +[`vcpkg_extract_source_archive()`]. + +## Usage +```cmake +vcpkg_extract_source_archive_ex( + [OUT_SOURCE_PATH ] + ... +) +``` + +See the documentation for [`vcpkg_extract_source_archive()`] for other parameters. +Additionally, `vcpkg_extract_source_archive_ex()` adds the `REF` and `WORKING_DIRECTORY` +parameters, which are wrappers around `SOURCE_BASE` and `BASE_DIRECTORY` +respectively. + +[`vcpkg_extract_source_archive()`]: vcpkg_extract_source_archive.md +#]===] function(vcpkg_extract_source_archive_ex) - cmake_parse_arguments(_vesae "NO_REMOVE_ONE_LEVEL" "OUT_SOURCE_PATH;ARCHIVE;REF;WORKING_DIRECTORY" "PATCHES" ${ARGN}) - - if(NOT _vesae_ARCHIVE) - message(FATAL_ERROR "Must specify ARCHIVE parameter to vcpkg_extract_source_archive_ex()") - endif() - - if(NOT DEFINED _vesae_OUT_SOURCE_PATH) - message(FATAL_ERROR "Must specify OUT_SOURCE_PATH parameter to vcpkg_extract_source_archive_ex()") - endif() - - if(NOT DEFINED _vesae_WORKING_DIRECTORY) - set(_vesae_WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src) + # OUT_SOURCE_PATH is an out-parameter so we need to parse it + cmake_parse_arguments(PARSE_ARGV 0 "arg" "" "OUT_SOURCE_PATH" "") + if(NOT DEFINED arg_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified") endif() - if(NOT DEFINED _vesae_REF) - get_filename_component(_vesae_REF ${_vesae_ARCHIVE} NAME_WE) - endif() - - string(REPLACE "/" "-" SANITIZED_REF "${_vesae_REF}") - - # Take the last 10 chars of the REF - set(REF_MAX_LENGTH 10) - string(LENGTH ${SANITIZED_REF} REF_LENGTH) - math(EXPR FROM_REF ${REF_LENGTH}-${REF_MAX_LENGTH}) - if(FROM_REF LESS 0) - set(FROM_REF 0) - endif() - string(SUBSTRING ${SANITIZED_REF} ${FROM_REF} ${REF_LENGTH} SHORTENED_SANITIZED_REF) - - # Hash the archive hash along with the patches. Take the first 10 chars of the hash - file(SHA512 ${_vesae_ARCHIVE} PATCHSET_HASH) - foreach(PATCH IN LISTS _vesae_PATCHES) - get_filename_component(ABSOLUTE_PATCH "${PATCH}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}") - file(SHA512 ${ABSOLUTE_PATCH} CURRENT_HASH) - string(APPEND PATCHSET_HASH ${CURRENT_HASH}) - endforeach() - - string(SHA512 PATCHSET_HASH ${PATCHSET_HASH}) - string(SUBSTRING ${PATCHSET_HASH} 0 10 PATCHSET_HASH) - set(SOURCE_PATH "${_vesae_WORKING_DIRECTORY}/${SHORTENED_SANITIZED_REF}-${PATCHSET_HASH}") - - if(NOT EXISTS ${SOURCE_PATH}) - set(TEMP_DIR "${_vesae_WORKING_DIRECTORY}/TEMP") - file(REMOVE_RECURSE ${TEMP_DIR}) - vcpkg_extract_source_archive("${_vesae_ARCHIVE}" "${TEMP_DIR}") - - if(_vesae_NO_REMOVE_ONE_LEVEL) - set(TEMP_SOURCE_PATH ${TEMP_DIR}) - else() - file(GLOB _ARCHIVE_FILES "${TEMP_DIR}/*") - list(LENGTH _ARCHIVE_FILES _NUM_ARCHIVE_FILES) - set(TEMP_SOURCE_PATH) - foreach(dir IN LISTS _ARCHIVE_FILES) - if (IS_DIRECTORY ${dir}) - set(TEMP_SOURCE_PATH "${dir}") - break() - endif() - endforeach() - - if(NOT _NUM_ARCHIVE_FILES EQUAL 2 OR NOT TEMP_SOURCE_PATH) - message(FATAL_ERROR "Could not unwrap top level directory from archive. Pass NO_REMOVE_ONE_LEVEL to disable this.") - endif() - endif() - - vcpkg_apply_patches( - SOURCE_PATH ${TEMP_SOURCE_PATH} - PATCHES ${_vesae_PATCHES} - ) - - file(RENAME ${TEMP_SOURCE_PATH} ${SOURCE_PATH}) - file(REMOVE_RECURSE ${TEMP_DIR}) - endif() + vcpkg_extract_source_archive(source_path ${arg_UNPARSED_ARGUMENTS} Z_ALLOW_OLD_PARAMETER_NAMES) - set(${_vesae_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - message(STATUS "Using source at ${SOURCE_PATH}") - return() + set("${arg_OUT_SOURCE_PATH}" "${source_path}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_fail_port_install.cmake b/scripts/cmake/vcpkg_fail_port_install.cmake index 0fdacb639b384f..2adfd28deae04d 100644 --- a/scripts/cmake/vcpkg_fail_port_install.cmake +++ b/scripts/cmake/vcpkg_fail_port_install.cmake @@ -1,92 +1,98 @@ -## # vcpkg_fail_port_install -## -## Fails the current portfile with a (default) error message -## -## ## Usage -## ```cmake -## vcpkg_fail_port_install([MESSAGE ] [ON_TARGET [ ...]] -## [ON_ARCH [ ...]] -## [ON_CRT_LINKAGE [ ...]]) -## [ON_LIBRARY_LINKAGE [ ...]]) -## ``` -## -## ## Parameters -## ### MESSAGE -## Additional failure message. If non is given a default message will be displayed depending on the failure condition -## -## ### ALWAYS -## will always fail early -## -## ### ON_TARGET -## targets for which the build should fail early. Valid targets are from VCPKG_IS_TARGET_ (see vcpkg_common_definitions.cmake) -## -## ### ON_ARCH -## architecture for which the build should fail early. -## -## ### ON_CRT_LINKAGE -## CRT linkage for which the build should fail early. -## -## ### ON_LIBRARY_LINKAGE -## library linkage for which the build should fail early. -## -## ## Examples -## -## * [aws-lambda-cpp](https://github.com/Microsoft/vcpkg/blob/master/ports/aws-lambda-cpp/portfile.cmake) +#[===[.md: +# vcpkg_fail_port_install + +Checks common requirements and fails the current portfile with a (default) error message + +## Usage +```cmake +vcpkg_fail_port_install( + [ALWAYS] + [MESSAGE <"Reason for failure">] + [ON_TARGET [ ...]] + [ON_ARCH [ ...]] + [ON_CRT_LINKAGE [ ...]]) + [ON_LIBRARY_LINKAGE [ ...]] +) +``` + +## Parameters +### MESSAGE +Additional failure message. If none is given, a default message will be displayed depending on the failure condition. + +### ALWAYS +Will always fail early + +### ON_TARGET +Targets for which the build should fail early. Valid targets are `` from `VCPKG_IS_TARGET_` (see `vcpkg_common_definitions.cmake`). + +### ON_ARCH +Architecture for which the build should fail early. + +### ON_CRT_LINKAGE +CRT linkage for which the build should fail early. + +### ON_LIBRARY_LINKAGE +Library linkage for which the build should fail early. + +## Examples + +* [aws-lambda-cpp](https://github.com/Microsoft/vcpkg/blob/master/ports/aws-lambda-cpp/portfile.cmake) +#]===] + function(vcpkg_fail_port_install) - cmake_parse_arguments(PARSE_ARGV 0 _csc "ALWAYS" "MESSAGE" "ON_TARGET;ON_ARCH;ON_CRT_LINKAGE;ON_LIBRARY_LINKAGE") - if(DEFINED _csc_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown arguments passed to vcpkg_fail_port_install. Please correct the portfile!") - endif() - if(DEFINED _csc_MESSAGE) - set(_csc_MESSAGE "${_csc_MESSAGE}\n") - else() - set(_csc_MESSAGE "") - endif() - - unset(_fail_port) - #Target fail check - if(DEFINED _csc_ON_TARGET) - foreach(_target ${_csc_ON_TARGET}) - string(TOUPPER ${_target} _target_upper) - if(VCPKG_TARGET_IS_${_target_upper}) - set(_fail_port TRUE) - set(_csc_MESSAGE "${_csc_MESSAGE}Target '${_target}' not supported by ${PORT}!\n") - endif() - endforeach() - endif() - - #Architecture fail check - if(DEFINED _csc_ON_ARCH) - foreach(_arch ${_csc_ON_ARCH}) - if(${VCPKG_TARGET_ARCHITECTURE} MATCHES ${_arch}) - set(_fail_port TRUE) - set(_csc_MESSAGE "${_csc_MESSAGE}Architecture '${_arch}' not supported by ${PORT}!\n") - endif() - endforeach() - endif() - - #CRT linkage fail check - if(DEFINED _csc_ON_CRT_LINKAGE) - foreach(_crt_link ${_csc_ON_CRT_LINKAGE}) - if("${VCPKG_CRT_LINKAGE}" MATCHES "${_crt_link}") - set(_fail_port TRUE) - set(_csc_MESSAGE "${_csc_MESSAGE}CRT linkage '${VCPKG_CRT_LINKAGE}' not supported by ${PORT}!\n") - endif() - endforeach() - endif() - - #Library linkage fail check - if(DEFINED _csc_ON_LIBRARY_LINKAGE) - foreach(_lib_link ${_csc_ON_LIBRARY_LINKAGE}) - if("${VCPKG_LIBRARY_LINKAGE}" MATCHES "${_lib_link}") - set(_fail_port TRUE) - set(_csc_MESSAGE "${_csc_MESSAGE}Library linkage '${VCPKG_LIBRARY_LINKAGE}' not supported by ${PORT}!\n") - endif() - endforeach() - endif() - - if(_fail_port OR _csc_ALWAYS) - message(FATAL_ERROR ${_csc_MESSAGE}) - endif() - -endfunction() \ No newline at end of file + cmake_parse_arguments(PARSE_ARGV 0 "arg" "ALWAYS" "MESSAGE" "ON_TARGET;ON_ARCH;ON_CRT_LINKAGE;ON_LIBRARY_LINKAGE") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_fail_port_install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(DEFINED arg_MESSAGE) + string(APPEND arg_MESSAGE "\n") + else() + set(arg_MESSAGE "") + endif() + + set(fail_port) + # Target fail check + if(DEFINED arg_ON_TARGET) + foreach(target IN LISTS arg_ON_TARGET) + string(TOUPPER "${target}" target_upper) + if(VCPKG_TARGET_IS_${target_upper}) + set(fail_port TRUE) + string(APPEND arg_MESSAGE "Target '${target}' not supported by ${PORT}!\n") + endif() + endforeach() + endif() + + # Architecture fail check + if(DEFINED arg_ON_ARCH) + foreach(arch IN LISTS arg_ON_ARCH) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL arch) + set(fail_port TRUE) + string(APPEND arg_MESSAGE "Architecture '${arch}' not supported by ${PORT}!\n") + endif() + endforeach() + endif() + + # CRT linkage fail check + if(DEFINED arg_ON_CRT_LINKAGE) + foreach(crt_linkage IN LISTS arg_ON_CRT_LINKAGE) + if(VCPKG_CRT_LINKAGE STREQUAL crt_linkage) + set(fail_port TRUE) + string(APPEND arg_MESSAGE "CRT linkage '${VCPKG_CRT_LINKAGE}' not supported by ${PORT}!\n") + endif() + endforeach() + endif() + + # Library linkage fail check + if(DEFINED arg_ON_LIBRARY_LINKAGE) + foreach(library_linkage IN LISTS arg_ON_LIBRARY_LINKAGE) + if(VCPKG_LIBRARY_LINKAGE STREQUAL library_linkage) + set(fail_port TRUE) + string(APPEND arg_MESSAGE "Library linkage '${VCPKG_LIBRARY_LINKAGE}' not supported by ${PORT}!\n") + endif() + endforeach() + endif() + + if(fail_port OR arg_ALWAYS) + message(FATAL_ERROR ${arg_MESSAGE}) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 84ebdbfa8c3785..a75e3c6be81310 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -1,40 +1,54 @@ -## # vcpkg_find_acquire_program -## -## Download or find a well-known tool. -## -## ## Usage -## ```cmake -## vcpkg_find_acquire_program() -## ``` -## ## Parameters -## ### VAR -## This variable specifies both the program to be acquired as well as the out parameter that will be set to the path of the program executable. -## -## ## Notes -## The current list of programs includes: -## -## - 7Z -## - BISON -## - FLEX -## - GASPREPROCESSOR -## - PERL -## - PYTHON2 -## - PYTHON3 -## - JOM -## - MESON -## - NASM -## - NINJA -## - NUGET -## - YASM -## - ARIA2 (Downloader) -## -## Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). -## -## ## Examples -## -## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) -## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) -## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) +#[===[.md: +# vcpkg_find_acquire_program + +Download or find a well-known tool. + +## Usage +```cmake +vcpkg_find_acquire_program() +``` +## Parameters +### VAR +This variable specifies both the program to be acquired as well as the out parameter that will be set to the path of the program executable. + +## Notes +The current list of programs includes: + +* 7Z +* ARIA2 (Downloader) +* BISON +* CLANG +* DARK +* DOXYGEN +* FLEX +* GASPREPROCESSOR +* GPERF +* PERL +* PYTHON2 +* PYTHON3 +* GIT +* GN +* GO +* JOM +* MESON +* NASM +* NINJA +* NUGET +* SCONS +* SWIG +* YASM + +Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). + +## Examples + +* [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +* [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) +* [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) +#]===] + +include(vcpkg_execute_in_download_mode) + function(vcpkg_find_acquire_program VAR) set(EXPANDED_VAR ${${VAR}}) if(EXPANDED_VAR) @@ -44,49 +58,111 @@ function(vcpkg_find_acquire_program VAR) unset(NOEXTRACT) unset(_vfa_RENAME) unset(SUBDIR) + unset(PROG_PATH_SUBDIR) unset(REQUIRED_INTERPRETER) + unset(_vfa_SUPPORTED) unset(POST_INSTALL_COMMAND) - - vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) - vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) + unset(PATHS) if(VAR MATCHES "PERL") set(PROGNAME perl) - set(PATHS ${DOWNLOADS}/tools/perl/perl/bin) + set(PERL_VERSION 5.32.1.1) + set(SUBDIR ${PERL_VERSION}) + set(PATHS ${DOWNLOADS}/tools/perl/${SUBDIR}/perl/bin) set(BREW_PACKAGE_NAME "perl") set(APT_PACKAGE_NAME "perl") - set(URL "http://strawberryperl.com/download/5.30.0.1/strawberry-perl-5.30.0.1-32bit.zip") - set(ARCHIVE "strawberry-perl-5.30.0.1-32bit.zip") - set(HASH d353d3dc743ebdc6d1e9f6f2b7a6db3c387c1ce6c890bae8adc8ae5deae8404f4c5e3cf249d1e151e7256d4c5ee9cd317e6c41f3b6f244340de18a24b938e0c4) + set(URL + "https://strawberryperl.com/download/${PERL_VERSION}/strawberry-perl-${PERL_VERSION}-32bit.zip" + ) + set(ARCHIVE "strawberry-perl-${PERL_VERSION}-32bit.zip") + set(HASH 936381254fea2e596db6a16c23b08ced25c4081fda484e1b8c4356755016e4b956bd00f3d2ee651d5f41a7695e9998f6c1ac3f4a237212b9c55aca8c5fea14e9) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) - set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.14.02) + set(NASM_VERSION 2.15.05) + set(PATHS ${DOWNLOADS}/tools/nasm/nasm-${NASM_VERSION}) set(BREW_PACKAGE_NAME "nasm") set(APT_PACKAGE_NAME "nasm") set(URL - "http://www.nasm.us/pub/nasm/releasebuilds/2.14.02/win32/nasm-2.14.02-win32.zip" - "http://fossies.org/windows/misc/nasm-2.14.02-win32.zip" + "https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/win32/nasm-${NASM_VERSION}-win32.zip" + "https://fossies.org/windows/misc/nasm-${NASM_VERSION}-win32.zip" ) - set(ARCHIVE "nasm-2.14.02-win32.zip") - set(HASH a0f16a9f3b668b086e3c4e23a33ff725998e120f2e3ccac8c28293fd4faeae6fc59398919e1b89eed7461685d2730de02f2eb83e321f73609f35bf6b17a23d1e) + set(ARCHIVE "nasm-${NASM_VERSION}-win32.zip") + set(HASH 9412b8caa07e15eac8f500f6f8fab9f038d95dc25e0124b08a80645607cf5761225f98546b52eac7b894420d64f26c3cbf22c19cd286bbe583f7c964256c97ed) elseif(VAR MATCHES "YASM") set(PROGNAME yasm) + set(YASM_VERSION 1.3.0.6.g1962) set(SUBDIR 1.3.0.6) - set(PATHS ${DOWNLOADS}/tools/yasm/${SUBDIR}) - set(URL "https://www.tortall.net/projects/yasm/snapshots/v1.3.0.6.g1962/yasm-1.3.0.6.g1962.exe") - set(ARCHIVE "yasm-1.3.0.6.g1962.exe") + set(BREW_PACKAGE_NAME "yasm") + set(APT_PACKAGE_NAME "yasm") + set(URL "https://www.tortall.net/projects/yasm/snapshots/v${YASM_VERSION}/yasm-${YASM_VERSION}.exe") + set(ARCHIVE "yasm-${YASM_VERSION}.exe") set(_vfa_RENAME "yasm.exe") set(NOEXTRACT ON) set(HASH c1945669d983b632a10c5ff31e86d6ecbff143c3d8b2c433c0d3d18f84356d2b351f71ac05fd44e5403651b00c31db0d14615d7f9a6ecce5750438d37105c55b) + elseif(VAR MATCHES "GIT") + set(PROGNAME git) + if(CMAKE_HOST_WIN32) + set(GIT_BASE_VERSION 2.32.0) + set(GIT_VERSION 2.32.0.2) + set(SUBDIR "git-${GIT_VERSION}-2-windows") + set(URL "https://github.com/git-for-windows/git/releases/download/v${GIT_BASE_VERSION}.windows.2/PortableGit-${GIT_VERSION}-32-bit.7z.exe") + set(ARCHIVE "PortableGit-${GIT_VERSION}-32-bit.7z.exe") + set(HASH 867d8534972cbaf7a4224e25a14d484f8d17ef186f8d79e9a758afb90cf69541375cb7615a39702311f4809cb8371ef85c2b1a15bfffe9e48f0e597ac011b348) + set(PATHS + "${DOWNLOADS}/tools/${SUBDIR}/mingw32/bin" + "${DOWNLOADS}/tools/git/${SUBDIR}/mingw32/bin") + else() + set(BREW_PACKAGE_NAME "git") + set(APT_PACKAGE_NAME "git") + endif() + elseif(VAR MATCHES "GN") + set(PROGNAME gn) + set(_vfa_RENAME "gn") + set(CIPD_DOWNLOAD_GN "https://chrome-infra-packages.appspot.com/dl/gn/gn") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(_vfa_SUPPORTED ON) + set(GN_VERSION "xus7xtaPhpv5vCmKFOnsBVoB-PKmhZvRsSTjbQAuF0MC") + set(GN_PLATFORM "linux-amd64") + set(HASH "871e75d7f3597b74fb99e36bb41fe5a9f8ce8a4d9f167f4729fc6e444807a59f35ec8aca70c2274a99c79d70a1108272be1ad991678a8ceb39e30f77abb13135") + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(_vfa_SUPPORTED ON) + set(GN_VERSION "qhxILDNcJ2H44HfHmfiU-XIY3E_SIXvFqLd2wvbIgOoC") + set(GN_PLATFORM "mac-amd64") + set(HASH "03ee64cb15bae7fceb412900d470601090bce147cfd45eb9b46683ac1a5dca848465a5d74c55a47df7f0e334d708151249a6d37bb021de74dd48b97ed4a07937") + else() + set(GN_VERSION "qUkAhy9J0P7c5racy-9wB6AHNK_btS18im8S06_ehhwC") + set(GN_PLATFORM "windows-amd64") + set(HASH "263e02bd79eee0cb7b664831b7898565c5656a046328d8f187ef7ae2a4d766991d477b190c9b425fcc960ab76f381cd3e396afb85cba7408ca9e74eb32c175db") + endif() + set(SUBDIR "${GN_VERSION}") + set(URL "${CIPD_DOWNLOAD_GN}/${GN_PLATFORM}/+/${GN_VERSION}") + set(ARCHIVE "gn-${GN_PLATFORM}.zip") + elseif(VAR MATCHES "GO") + set(PROGNAME go) + set(SUBDIR 1.16.6.windows-386) + set(PATHS ${DOWNLOADS}/tools/go/${SUBDIR}/go/bin) + set(BREW_PACKAGE_NAME "go") + set(APT_PACKAGE_NAME "golang-go") + set(URL "https://dl.google.com/go/go${SUBDIR}.zip") + set(ARCHIVE "go${SUBDIR}.zip") + set(HASH 2a1e539ed628c0cca5935d24d22cf3a7165f5c80e12a4003ac184deae6a6d0aa31f582f3e8257b0730adfc09aeec3a0e62f4732e658c312d5382170bcd8c94d8) elseif(VAR MATCHES "PYTHON3") if(CMAKE_HOST_WIN32) set(PROGNAME python) - set(SUBDIR "python-3.7.3") + set(PYTHON_VERSION 3.9.7) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(SUBDIR "python-${PYTHON_VERSION}-x86") + set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-win32.zip") + set(ARCHIVE "python-${PYTHON_VERSION}-embed-win32.zip") + set(HASH 5f12f693c6df68b75f96b797740a156f2dcd471e96e7980a6e297bbfd064467ba2b2cc9d2f450296388402a8a0b716fce1c4a25b94b50615503d528e33fea870) + else() + set(SUBDIR "python-${PYTHON_VERSION}-x64") + set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-amd64.zip") + set(ARCHIVE "python-${PYTHON_VERSION}-embed-amd64.zip") + set(HASH 482765de165863f86637591d57141930e2c4ca6e210d0c2569bd0e5fe63157966fb44dea0d5adf249ff15ec9c50cb2dddb704c4ea79369d598f348ee5406f160) + endif() set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) - set(URL "https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-win32.zip") - set(ARCHIVE "python-3.7.3-embed-win32.zip") - set(HASH 2c1b1f0a29d40a91771ae21a5f733eedc10984cd182cb10c2793bbd24191a89f20612a3f23c34047f37fb06369016bfd4a52915ed1b4a56f8bd2b4ca6994eb31) - set(POST_INSTALL_COMMAND ${CMAKE_COMMAND} -E remove python37._pth) + set(POST_INSTALL_COMMAND ${CMAKE_COMMAND} -E rm python39._pth) else() set(PROGNAME python3) set(BREW_PACKAGE_NAME "python") @@ -95,121 +171,183 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "PYTHON2") if(CMAKE_HOST_WIN32) set(PROGNAME python) - set(SUBDIR "python2") + set(PYTHON_VERSION 2.7.18) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(SUBDIR "python-${PYTHON_VERSION}-x86") + set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.msi") + set(ARCHIVE "python-${PYTHON_VERSION}.msi") + set(HASH 2c112733c777ddbf189b0a54047a9d5851ebce0564cc38b9687d79ce6c7a09006109dbad8627fb1a60c3ad55e261db850d9dfa454af0533b460b2afc316fe115) + else() + set(SUBDIR "python-${PYTHON_VERSION}-x64") + set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.amd64.msi") + set(ARCHIVE "python-${PYTHON_VERSION}.amd64.msi") + set(HASH 6a81a413b80fd39893e7444fd47efa455d240cbb77a456c9d12f7cf64962b38c08cfa244cd9c50a65947c40f936c6c8c5782f7236d7b92445ab3dd01e82af23e) + endif() set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) - set(URL "https://www.python.org/ftp/python/2.7.16/python-2.7.16.msi") - set(ARCHIVE "python2.msi") - set(HASH c34a6fa2438682104dccb53650a2bdb79eac7996deff075201a0f71bb835d60d3ed866652a1931f15a29510fe8e1009ac04e423b285122d2e5747fefc4c10254) + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + # macOS includes Python 2.7 built-in as `python` + set(PROGNAME python) + set(BREW_PACKAGE_NAME "python2") else() set(PROGNAME python2) - set(BREW_PACKAGE_NAME "python2") set(APT_PACKAGE_NAME "python") endif() elseif(VAR MATCHES "RUBY") set(PROGNAME "ruby") - set(PATHS ${DOWNLOADS}/tools/ruby/rubyinstaller-2.6.3-1-x86/bin) - set(URL https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.3-1/rubyinstaller-2.6.3-1-x86.7z) - set(ARCHIVE rubyinstaller-2.6.3-1-x86.7z) - set(HASH 4322317dd02ce13527bf09d6e6a7787ca3814ea04337107d28af1ac360bd272504b32e20ed3ea84eb5b21dae7b23bfe5eb0e529b6b0aa21a1a2bbb0a542d7aec) + set(RUBY_VERSION 2.7.4-1) + set(PATHS ${DOWNLOADS}/tools/ruby/rubyinstaller-${RUBY_VERSION}-x86/bin) + set(URL https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-${RUBY_VERSION}/rubyinstaller-${RUBY_VERSION}-x86.7z) + set(ARCHIVE rubyinstaller-${RUBY_VERSION}-x86.7z) + set(HASH 4bf459c987b407bdda328c52d95060bf6ad48fc3e5ed5f64d4b205c5b4153c7a00cb6f9da6c0bcd5f2e001e9dc3dda0b72269ec4afdeffd658b93c085cd1d859) elseif(VAR MATCHES "JOM") set(PROGNAME jom) set(SUBDIR "jom-1.1.3") set(PATHS ${DOWNLOADS}/tools/jom/${SUBDIR}) - set(URL "http://download.qt.io/official_releases/jom/jom_1_1_3.zip") + set(URL + "https://download.qt.io/official_releases/jom/jom_1_1_3.zip" + "https://mirrors.ocf.berkeley.edu/qt/official_releases/jom/jom_1_1_3.zip" + ) set(ARCHIVE "jom_1_1_3.zip") set(HASH 5b158ead86be4eb3a6780928d9163f8562372f30bde051d8c281d81027b766119a6e9241166b91de0aa6146836cea77e5121290e62e31b7a959407840fc57b33) elseif(VAR MATCHES "7Z") set(PROGNAME 7z) - set(PATHS "${PROGRAM_FILES_PLATFORM_BITNESS}/7-Zip" "${PROGRAM_FILES_32_BIT}/7-Zip" "${DOWNLOADS}/tools/7z/Files/7-Zip") + set(PATHS "${DOWNLOADS}/tools/7z/Files/7-Zip") set(URL "https://7-zip.org/a/7z1900.msi") set(ARCHIVE "7z1900.msi") set(HASH f73b04e2d9f29d4393fde572dcf3c3f0f6fa27e747e5df292294ab7536ae24c239bf917689d71eb10cc49f6b9a4ace26d7c122ee887d93cc935f268c404e9067) elseif(VAR MATCHES "NINJA") set(PROGNAME ninja) - set(SUBDIR "ninja-1.8.2") + set(NINJA_VERSION 1.10.2) + set(_vfa_SUPPORTED ON) if(CMAKE_HOST_WIN32) - set(PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}") + set(ARCHIVE "ninja-win-${NINJA_VERSION}.zip") + set(SUBDIR "${NINJA_VERSION}-windows") + set(URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-win.zip") + set(HASH 6004140d92e86afbb17b49c49037ccd0786ce238f340f7d0e62b4b0c29ed0d6ad0bab11feda2094ae849c387d70d63504393714ed0a1f4d3a1f155af7a4f1ba3) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") - set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-osx") + set(ARCHIVE "ninja-mac-${NINJA_VERSION}.zip") + set(URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-mac.zip") + set(SUBDIR "${NINJA_VERSION}-osx") + set(PATHS "${DOWNLOADS}/tools/ninja-${NINJA_VERSION}-osx") + set(HASH bcd12f6a3337591306d1b99a7a25a6933779ba68db79f17c1d3087d7b6308d245daac08df99087ff6be8dc7dd0dcdbb3a50839a144745fa719502b3a7a07260b) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD") set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-freebsd") + set(_vfa_SUPPORTED OFF) else() - set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-linux") + set(ARCHIVE "ninja-linux-${NINJA_VERSION}.zip") + set(URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-linux.zip") + set(SUBDIR "${NINJA_VERSION}-linux") + set(PATHS "${DOWNLOADS}/tools/ninja-${NINJA_VERSION}-linux") + set(HASH 93e802e9c17fb59636cddde4bad1ddaadad624f4ecfee00d5c78790330a4e9d433180e795718cda27da57215ce643c3929cf72c85337ee019d868c56f2deeef3) endif() - set(BREW_PACKAGE_NAME "ninja") - set(APT_PACKAGE_NAME "ninja-build") - set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip") - set(ARCHIVE "ninja-1.8.2-win.zip") - set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5) + set(VERSION_CMD --version) elseif(VAR MATCHES "NUGET") set(PROGNAME nuget) - set(PATHS "${DOWNLOADS}/tools/nuget") + set(SUBDIR "5.10.0") + set(PATHS "${DOWNLOADS}/tools/nuget-${SUBDIR}-windows") set(BREW_PACKAGE_NAME "nuget") - set(URL "https://dist.nuget.org/win-x86-commandline/v4.8.1/nuget.exe") - set(ARCHIVE "nuget.exe") + set(URL "https://dist.nuget.org/win-x86-commandline/v5.10.0/nuget.exe") + set(_vfa_RENAME "nuget.exe") + set(ARCHIVE "nuget.5.10.0.exe") set(NOEXTRACT ON) - set(HASH 42cb744338af8decc033a75bce5b4c4df28e102bafc45f9a8ba86d7bc010f5b43ebacae80d7b28c4f85ac900eefc2a349620ae65f27f6ca1c21c53b63b92924b) + set(HASH c4b7375e46cdb843096ce491b9809e0dc86773ba7b6333f13d49ec414b2953112df82ee8b833fd31be0cc7fe0fff1af88f3c07aa9553ad03f7f6c5a6eec2057e) elseif(VAR MATCHES "MESON") + set(MESON_VERSION 0.58.1) set(PROGNAME meson) set(REQUIRED_INTERPRETER PYTHON3) - set(BREW_PACKAGE_NAME "meson") set(APT_PACKAGE_NAME "meson") + set(BREW_PACKAGE_NAME "meson") + set(SCRIPTNAME meson meson.py) + set(REF aeda7f249c4a5dbbecc52e44f382246a2377b5b0) + set(PATHS ${DOWNLOADS}/tools/meson/meson-${REF}) + set(URL "https://github.com/mesonbuild/meson/archive/${REF}.tar.gz") + set(ARCHIVE "meson-${REF}.tar.gz") + #set(PATHS ${DOWNLOADS}/tools/meson/meson-${MESON_VERSION}) + #set(URL "https://github.com/mesonbuild/meson/releases/download/${MESON_VERSION}/meson-${MESON_VERSION}.tar.gz") + #set(ARCHIVE "meson-${MESON_VERSION}.tar.gz") + set(HASH 18a012a45274dbb4582e99fd69d920f38831e788d9860f9553c64847bedb1c2010ae0b5c0ef4a4350c03f5e0f95aaa0395378e1208109b59640c1a70b1e202d2) + set(_vfa_SUPPORTED ON) + set(VERSION_CMD --version) + elseif(VAR MATCHES "FLEX" OR VAR MATCHES "BISON") if(CMAKE_HOST_WIN32) - set(SCRIPTNAME meson.py) - else() - set(SCRIPTNAME meson) - endif() - set(PATHS ${DOWNLOADS}/tools/meson/meson-0.51.0) - set(URL "https://github.com/mesonbuild/meson/archive/0.51.0.zip") - set(ARCHIVE "meson-0.51.0.zip") - set(HASH bf1df65cde7e0e0a44e4b4be7d68de9897a77c4ea4c694f1d77fe82cd3c7e7818dc034a3313ce885ba6883b4ba6d282b7a589f665fa499d9eb79fc7a23e415cc) - elseif(VAR MATCHES "FLEX") - if(CMAKE_HOST_WIN32) - set(PROGNAME win_flex) - set(SUBDIR win_flex-2.5.16) - set(PATHS ${DOWNLOADS}/tools/win_flex/${SUBDIR}) - set(URL "https://sourceforge.net/projects/winflexbison/files/winflexbison-2.5.16.zip/download") - set(ARCHIVE "win_flex_bison-2.5.16.zip") - set(HASH 0a14154bff5d998feb23903c46961528f8ccb4464375d5384db8c4a7d230c0c599da9b68e7a32f3217a0a0735742242eaf3769cb4f03e00931af8640250e9123) + set(SOURCEFORGE_ARGS + REPO winflexbison + FILENAME winflexbison-2.5.16.zip + SHA512 0a14154bff5d998feb23903c46961528f8ccb4464375d5384db8c4a7d230c0c599da9b68e7a32f3217a0a0735742242eaf3769cb4f03e00931af8640250e9123 + NO_REMOVE_ONE_LEVEL + WORKING_DIRECTORY "${DOWNLOADS}/tools/winflexbison" + ) + if(VAR MATCHES "FLEX") + set(PROGNAME win_flex) + else() + set(PROGNAME win_bison) + endif() + set(PATHS ${DOWNLOADS}/tools/winflexbison/0a14154bff-a8cf65db07) if(NOT EXISTS "${PATHS}/data/m4sugar/m4sugar.m4") file(REMOVE_RECURSE "${PATHS}") endif() - else() + elseif(VAR MATCHES "FLEX") set(PROGNAME flex) set(APT_PACKAGE_NAME flex) set(BREW_PACKAGE_NAME flex) - endif() - elseif(VAR MATCHES "BISON") - if(CMAKE_HOST_WIN32) - set(PROGNAME win_bison) - set(SUBDIR win_bison-2.5.16) - set(PATHS ${DOWNLOADS}/tools/win_bison/${SUBDIR}) - set(URL "https://sourceforge.net/projects/winflexbison/files/winflexbison-2.5.16.zip/download") - set(ARCHIVE "win_flex_bison-2.5.16.zip") - set(HASH 0a14154bff5d998feb23903c46961528f8ccb4464375d5384db8c4a7d230c0c599da9b68e7a32f3217a0a0735742242eaf3769cb4f03e00931af8640250e9123) - if(NOT EXISTS "${PATHS}/data/m4sugar/m4sugar.m4") - file(REMOVE_RECURSE "${PATHS}") - endif() else() set(PROGNAME bison) set(APT_PACKAGE_NAME bison) set(BREW_PACKAGE_NAME bison) + if (APPLE) + set(PATHS /usr/local/opt/bison/bin) + endif() endif() + elseif(VAR MATCHES "CLANG") + set(PROGNAME clang) + set(SUBDIR "clang-12.0.0") + set(LLVM_VERSION 12.0.0) + if(CMAKE_HOST_WIN32) + set(PATHS + # Support LLVM in Visual Studio 2019 + "$ENV{LLVMInstallDir}/x64/bin" + "$ENV{LLVMInstallDir}/bin" + "$ENV{VCINSTALLDIR}/Tools/Llvm/x64/bin" + "$ENV{VCINSTALLDIR}/Tools/Llvm/bin" + "${DOWNLOADS}/tools/${SUBDIR}-windows/bin" + "${DOWNLOADS}/tools/clang/${SUBDIR}/bin") + + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(HOST_ARCH_ $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(HOST_ARCH_ $ENV{PROCESSOR_ARCHITECTURE}) + endif() + + if(HOST_ARCH_ MATCHES "64") + set(URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/LLVM-${LLVM_VERSION}-win64.exe") + set(ARCHIVE "LLVM-${LLVM_VERSION}-win64.7z.exe") + set(HASH 67a9b54abad5143fa5f79f0cfc184be1394c9fc894fa9cee709943cb6ccbde8f0ea6003d8fcc20eccf035631abe4009cc0f694ac84e7879331cebba8125e4c7f) + else() + set(URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/LLVM-${LLVM_VERSION}-win32.exe") + set(ARCHIVE "LLVM-${LLVM_VERSION}-win32.7z.exe") + set(HASH 92fa5252fd08c1414ee6d71e2544cd2c44872124c47225f8d98b3af711d20e699f2888bc30642dfd00e005013da1607a593674fb4878951cc434694f9a119199) + endif() + endif() + set(BREW_PACKAGE_NAME "llvm") + set(APT_PACKAGE_NAME "clang") elseif(VAR MATCHES "GPERF") set(PROGNAME gperf) + set(GPERF_VERSION 3.0.1) set(PATHS ${DOWNLOADS}/tools/gperf/bin) - set(URL "https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/gperf-3.0.1-bin.zip/download") - set(ARCHIVE "gperf-3.0.1-bin.zip") + set(URL "https://sourceforge.net/projects/gnuwin32/files/gperf/${GPERF_VERSION}/gperf-${GPERF_VERSION}-bin.zip/download") + set(ARCHIVE "gperf-${GPERF_VERSION}-bin.zip") set(HASH 3f2d3418304390ecd729b85f65240a9e4d204b218345f82ea466ca3d7467789f43d0d2129fcffc18eaad3513f49963e79775b10cc223979540fa2e502fe7d4d9) elseif(VAR MATCHES "GASPREPROCESSOR") set(NOEXTRACT true) set(PROGNAME gas-preprocessor) + set(SUBDIR "4daa6115") set(REQUIRED_INTERPRETER PERL) set(SCRIPTNAME "gas-preprocessor.pl") - set(PATHS ${DOWNLOADS}/tools/gas-preprocessor) - set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/cbe88474ec196370161032a3863ec65050f70ba4/gas-preprocessor.pl") - set(ARCHIVE "gas-preprocessor.pl") - set(HASH f6965875608bf2a3ee337e00c3f16e06cd9b5d10013da600d2a70887e47a7b4668af87b3524acf73dd122475712af831495a613a2128c1adb5fe0b4a11d96cd3) + set(PATHS ${DOWNLOADS}/tools/gas-preprocessor/${SUBDIR}) + set(_vfa_RENAME "gas-preprocessor.pl") + set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/4daa611556a0558dfe537b4f7ad80f7e50a079c1/gas-preprocessor.pl") + set(ARCHIVE "gas-preprocessor-${SUBDIR}.pl") + set(HASH 2737ba3c1cf85faeb1fbfe015f7bad170f43a857a50a1b3d81fa93ba325d481f73f271c5a886ff8b7eef206662e19f0e9ef24861dfc608b67b8ea8a2062dc061) elseif(VAR MATCHES "DARK") set(PROGNAME dark) set(SUBDIR "wix311-binaries") @@ -219,42 +357,183 @@ function(vcpkg_find_acquire_program VAR) set(HASH 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516) elseif(VAR MATCHES "SCONS") set(PROGNAME scons) + set(SCONS_VERSION 4.1.0) + set(SUBDIR ${SCONS_VERSION}) set(REQUIRED_INTERPRETER PYTHON2) set(SCRIPTNAME "scons.py") - set(PATHS ${DOWNLOADS}/tools/scons) - set(URL "https://sourceforge.net/projects/scons/files/scons-local-3.0.1.zip/download") - set(ARCHIVE "scons-local-3.0.1.zip") - set(HASH fe121b67b979a4e9580c7f62cfdbe0c243eba62a05b560d6d513ac7f35816d439b26d92fc2d7b7d7241c9ce2a49ea7949455a17587ef53c04a5f5125ac635727) + set(URL "https://sourceforge.net/projects/scons/files/scons-local-${SCONS_VERSION}.zip/download") + set(ARCHIVE "scons-local-${SCONS_VERSION}.zip") + set(HASH b173176ce8aca25039c64fcc68ec1b9ad31e03a926fd545e7631b3f9b374d914adffc593f505e3e7e2867b0ffe85e8deb0b39afe314edf05d02974ce5db1badb) + elseif(VAR MATCHES "SWIG") + set(SWIG_VERSION 4.0.2) + set(PROGNAME swig) + if(CMAKE_HOST_WIN32) + set(SOURCEFORGE_ARGS + REPO swig/swigwin + REF swigwin-${SWIG_VERSION} + FILENAME "swigwin-${SWIG_VERSION}.zip" + SHA512 b8f105f9b9db6acc1f6e3741990915b533cd1bc206eb9645fd6836457fd30789b7229d2e3219d8e35f2390605ade0fbca493ae162ec3b4bc4e428b57155db03d + NO_REMOVE_ONE_LEVEL + WORKING_DIRECTORY "${DOWNLOADS}/tools/swig" + ) + set(SUBDIR b8f105f9b9-f0518bc3b7/swigwin-${SWIG_VERSION}) + else() + set(APT_PACKAGE_NAME "swig") + set(BREW_PACKAGE_NAME "swig") + endif() + elseif(VAR MATCHES "DOXYGEN") set(PROGNAME doxygen) - set(PATHS ${DOWNLOADS}/tools/doxygen) - set(URL "http://doxygen.nl/files/doxygen-1.8.15.windows.bin.zip") - set(ARCHIVE "doxygen-1.8.15.windows.bin.zip") - set(HASH 89482dcb1863d381d47812c985593e736d703931d49994e09c7c03ef67e064115d0222b8de1563a7930404c9bc2d3be323f3d13a01ef18861be584db3d5a953c) - # Download Tools + set(DOXYGEN_VERSION 1.9.1) + set(SOURCEFORGE_ARGS + REPO doxygen + REF rel-${DOXYGEN_VERSION} + FILENAME "doxygen-${DOXYGEN_VERSION}.windows.bin.zip" + SHA512 c3eeb6b9fa4eab70fb6b0864fbbf94fb8050f3fee38d117cf470921a80e3569cc1c8b0272604d6731e05f01790cfaa70e159bec5d0882fc4f2d8ae4a5d52a21b + NO_REMOVE_ONE_LEVEL + WORKING_DIRECTORY "${DOWNLOADS}/tools/doxygen" + ) + set(SUBDIR c3eeb6b9fa-76d69c6db5) + elseif(VAR MATCHES "BAZEL") + set(PROGNAME bazel) + set(BAZEL_VERSION 4.1.0) + set(_vfa_RENAME "bazel") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(_vfa_SUPPORTED ON) + set(SUBDIR ${BAZEL_VERSION}-linux) + set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64") + set(ARCHIVE "bazel-${SUBDIR}-x86_64") + set(NOEXTRACT ON) + set(HASH 50aa0894dbeedb9189a56f17baa8cecfa55c5f9c1f93a61b9ab5e10984754a400884fc9802b4979f536778e15f813a72807396b4b47694e4c05eadb841361c69) + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(_vfa_SUPPORTED ON) + set(SUBDIR ${BAZEL_VERSION}-darwin) + set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64") + set(ARCHIVE "bazel-${SUBDIR}-x86_64") + set(NOEXTRACT ON) + set(HASH 3500560c9d49d37a1ead2d2777d673c6f1874582883e141ecd5b3991005b1b6b8aab5f255c187133d771497c2a956f5c1e0dfad04dc453525634537e65b649af) + else() + set(SUBDIR ${BAZEL_VERSION}-windows) + set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64.zip") + set(ARCHIVE "bazel-${SUBDIR}-x86_64.zip") + set(HASH 3954ab54b465d62eef397767dac7ce21d06ac8ea3e1571d0e7b1f0ea8b5c2cf44eea5d252b85a63a1e1a08dbe9a219783cc23c2888673c35e2df03edfdc9e5a7) + endif() elseif(VAR MATCHES "ARIA2") set(PROGNAME aria2c) - set(PATHS ${DOWNLOADS}/tools/aria2c/aria2-1.34.0-win-32bit-build1) - set(URL "https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip") - set(ARCHIVE "aria2-1.34.0-win-32bit-build1.zip") - set(HASH 2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27) + set(ARIA2_VERSION 1.35.0) + set(PATHS ${DOWNLOADS}/tools/aria2c/aria2-${ARIA2_VERSION}-win-32bit-build1) + set(URL "https://github.com/aria2/aria2/releases/download/release-${ARIA2_VERSION}/aria2-${ARIA2_VERSION}-win-32bit-build1.zip") + set(ARCHIVE "aria2-${ARIA2_VERSION}-win-32bit-build1.zip") + set(HASH 933537cad820b1cecf43a9eeca7e1b241dd7b1c902ee942441a166f2c38845f16046321efbdfa2f83c7e9fc50c7ecc5da6fd00e0c6e2124c07d3b783aa5092a4) + elseif(VAR MATCHES "PKGCONFIG") + set(PROGNAME pkg-config) + if(ENV{PKG_CONFIG}) + debug_message(STATUS "PKG_CONFIG found in ENV! Using $ENV{PKG_CONFIG}") + set(PKGCONFIG $ENV{PKG_CONFIG} PARENT_SCOPE) + return() + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "OpenBSD") + # As of 6.8, the OpenBSD specific pkg-config doesn't support {pcfiledir} + set(_vfa_SUPPORTED ON) + set(_vfa_RENAME "pkg-config") + set(PKGCONFIG_VERSION 0.29.2.1) + set(NOEXTRACT ON) + set(ARCHIVE "pkg-config.openbsd") + set(SUBDIR "openbsd") + set(URL "https://raw.githubusercontent.com/jgilje/pkg-config-openbsd/master/pkg-config") + set(HASH b7ec9017b445e00ae1377e36e774cf3f5194ab262595840b449832707d11e443a102675f66d8b7e8b2e2f28cebd6e256835507b1e0c69644cc9febab8285080b) + set(VERSION_CMD --version) + elseif(CMAKE_HOST_WIN32) + if(NOT EXISTS "${PKGCONFIG}") + set(VERSION 0.29.2-2) + set(LIBWINPTHREAD_VERSION git-8.0.0.5906.c9a21571-1) + vcpkg_acquire_msys( + PKGCONFIG_ROOT + NO_DEFAULT_PACKAGES + DIRECT_PACKAGES + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-${VERSION}-any.pkg.tar.zst" + 54f8dad3b1a36a4515db47825a3214fbd2bd82f604aec72e7fb8d79068095fda3c836fb2296acd308522d6e12ce15f69e0c26dcf4eb0681fd105d057d912cdb7 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-${LIBWINPTHREAD_VERSION}-any.pkg.tar.zst" + 2c3d9e6b2eee6a4c16fd69ddfadb6e2dc7f31156627d85845c523ac85e5c585d4cfa978659b1fe2ec823d44ef57bc2b92a6127618ff1a8d7505458b794f3f01c + ) + endif() + set(${VAR} "${PKGCONFIG_ROOT}/mingw32/bin/pkg-config.exe" PARENT_SCOPE) + return() + else() + set(BREW_PACKAGE_NAME pkg-config) + set(APT_PACKAGE_NAME pkg-config) + set(PATHS "/bin" "/usr/bin" "/usr/local/bin") + endif() else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() + macro(do_version_check) + if(VERSION_CMD) + vcpkg_execute_in_download_mode( + COMMAND ${${VAR}} ${VERSION_CMD} + WORKING_DIRECTORY ${VCPKG_ROOT_DIR} + OUTPUT_VARIABLE ${VAR}_VERSION_OUTPUT + ) + string(STRIP "${${VAR}_VERSION_OUTPUT}" ${VAR}_VERSION_OUTPUT) + #TODO: REGEX MATCH case for more complex cases! + if(NOT ${VAR}_VERSION_OUTPUT VERSION_GREATER_EQUAL ${VAR}_VERSION) + message(STATUS "Found ${PROGNAME}('${${VAR}_VERSION_OUTPUT}') but at least version ${${VAR}_VERSION} is required! Trying to use internal version if possible!") + unset(${VAR}) + set(${VAR} "${VAR}-NOTFOUND" CACHE INTERNAL "") + else() + message(STATUS "Found external ${PROGNAME}('${${VAR}_VERSION_OUTPUT}').") + endif() + endif() + endmacro() + macro(do_find) if(NOT DEFINED REQUIRED_INTERPRETER) - find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) + find_program(${VAR} ${PROGNAME} PATHS ${PATHS} NO_DEFAULT_PATH) + if(NOT ${VAR}) + find_program(${VAR} ${PROGNAME}) + if(${VAR} AND NOT ${VAR}_VERSION_CHECKED) + do_version_check() + set(${VAR}_VERSION_CHECKED ON) + elseif(${VAR}_VERSION_CHECKED) + message(FATAL_ERROR "Unable to find ${PROGNAME} with min version of ${${VAR}_VERSION}") + endif() + endif() else() vcpkg_find_acquire_program(${REQUIRED_INTERPRETER}) - find_file(SCRIPT ${SCRIPTNAME} PATHS ${PATHS}) - set(${VAR} ${${REQUIRED_INTERPRETER}} ${SCRIPT}) + find_file(SCRIPT_${VAR} NAMES ${SCRIPTNAME} PATHS ${PATHS} NO_DEFAULT_PATH) + if(NOT SCRIPT_${VAR}) + find_file(SCRIPT_${VAR} NAMES ${SCRIPTNAME}) + if(SCRIPT_${VAR} AND NOT ${VAR}_VERSION_CHECKED) + set(${VAR} ${${REQUIRED_INTERPRETER}} ${SCRIPT_${VAR}}) + do_version_check() + set(${VAR}_VERSION_CHECKED ON) + if(NOT ${VAR}) + unset(SCRIPT_${VAR} CACHE) + endif() + elseif(${VAR}_VERSION_CHECKED) + message(FATAL_ERROR "Unable to find ${PROGNAME} with min version of ${${VAR}_VERSION}") + endif() + endif() + if(SCRIPT_${VAR}) + set(${VAR} ${${REQUIRED_INTERPRETER}} ${SCRIPT_${VAR}}) + endif() endif() endmacro() + if(NOT DEFINED PROG_PATH_SUBDIR) + set(PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}") + endif() + if(DEFINED SUBDIR) + list(APPEND PATHS ${PROG_PATH_SUBDIR}) + endif() + if("${PROG_PATH_SUBDIR}" MATCHES [[^(.*)[/\\]$]]) + # remove trailing slash, which may turn into a trailing `\` which CMake _does not like_ + set(PROG_PATH_SUBDIR "${CMAKE_MATCH_1}") + endif() + do_find() - if("${${VAR}}" MATCHES "-NOTFOUND") - if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + if(NOT ${VAR}) + if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _vfa_SUPPORTED) set(EXAMPLE ".") if(DEFINED BREW_PACKAGE_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") set(EXAMPLE ":\n brew install ${BREW_PACKAGE_NAME}") @@ -264,47 +543,63 @@ function(vcpkg_find_acquire_program VAR) message(FATAL_ERROR "Could not find ${PROGNAME}. Please install it via your package manager${EXAMPLE}") endif() - vcpkg_download_distfile(ARCHIVE_PATH - URLS ${URL} - SHA512 ${HASH} - FILENAME ${ARCHIVE} - ) - - set(PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}") - file(MAKE_DIRECTORY ${PROG_PATH_SUBDIR}) - if(DEFINED NOEXTRACT) - if(DEFINED _vfa_RENAME) - file(INSTALL ${ARCHIVE_PATH} DESTINATION ${PROG_PATH_SUBDIR} RENAME ${_vfa_RENAME}) - else() - file(COPY ${ARCHIVE_PATH} DESTINATION ${PROG_PATH_SUBDIR}) - endif() + if(DEFINED SOURCEFORGE_ARGS) + # Locally change editable to suppress re-extraction each time + set(_VCPKG_EDITABLE 1) + vcpkg_from_sourceforge(OUT_SOURCE_PATH SFPATH ${SOURCEFORGE_ARGS}) + unset(_VCPKG_EDITABLE) else() - get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) - string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) - if(ARCHIVE_EXTENSION STREQUAL ".msi") - file(TO_NATIVE_PATH "${ARCHIVE_PATH}" ARCHIVE_NATIVE_PATH) - file(TO_NATIVE_PATH "${PROG_PATH_SUBDIR}" DESTINATION_NATIVE_PATH) - execute_process( - COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} - WORKING_DIRECTORY ${DOWNLOADS} - ) + vcpkg_download_distfile(ARCHIVE_PATH + URLS ${URL} + SHA512 ${HASH} + FILENAME ${ARCHIVE} + ) + + file(MAKE_DIRECTORY ${PROG_PATH_SUBDIR}) + if(DEFINED NOEXTRACT) + if(DEFINED _vfa_RENAME) + file(INSTALL ${ARCHIVE_PATH} DESTINATION ${PROG_PATH_SUBDIR} RENAME ${_vfa_RENAME} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + else() + file(COPY ${ARCHIVE_PATH} DESTINATION ${PROG_PATH_SUBDIR} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + endif() else() - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} - WORKING_DIRECTORY ${PROG_PATH_SUBDIR} - ) + get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} LAST_EXT) + string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) + if(ARCHIVE_EXTENSION STREQUAL ".msi") + file(TO_NATIVE_PATH "${ARCHIVE_PATH}" ARCHIVE_NATIVE_PATH) + file(TO_NATIVE_PATH "${PROG_PATH_SUBDIR}" DESTINATION_NATIVE_PATH) + vcpkg_execute_in_download_mode( + COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} + WORKING_DIRECTORY ${DOWNLOADS} + ) + elseif("${ARCHIVE_PATH}" MATCHES ".7z.exe$") + vcpkg_find_acquire_program(7Z) + vcpkg_execute_in_download_mode( + COMMAND ${7Z} x "${ARCHIVE_PATH}" "-o${PROG_PATH_SUBDIR}" -y -bso0 -bsp0 + WORKING_DIRECTORY ${PROG_PATH_SUBDIR} + ) + else() + vcpkg_execute_in_download_mode( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} + WORKING_DIRECTORY ${PROG_PATH_SUBDIR} + ) + endif() endif() endif() if(DEFINED POST_INSTALL_COMMAND) vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE COMMAND ${POST_INSTALL_COMMAND} WORKING_DIRECTORY ${PROG_PATH_SUBDIR} LOGNAME ${VAR}-tool-post-install ) endif() - + unset(${VAR} CACHE) do_find() + if(NOT ${VAR}) + message(FATAL_ERROR "Unable to find ${VAR}") + endif() endif() set(${VAR} "${${VAR}}" PARENT_SCOPE) diff --git a/scripts/cmake/vcpkg_find_fortran.cmake b/scripts/cmake/vcpkg_find_fortran.cmake new file mode 100644 index 00000000000000..c50497629277a9 --- /dev/null +++ b/scripts/cmake/vcpkg_find_fortran.cmake @@ -0,0 +1,147 @@ +#[===[.md: +# vcpkg_find_fortran + +Checks if a Fortran compiler can be found. +Windows(x86/x64) Only: If not it will switch/enable MinGW gfortran + and return required cmake args for building. + +## Usage +```cmake +vcpkg_find_fortran() +``` + +## Example +```cmake +vcpkg_find_fortran(fortran_args) +# ... +vcpkg_configure_cmake(... + OPTIONS + ${fortran_args} +) +``` +#]===] + +function(vcpkg_find_fortran out_var) + if("${ARGC}" GREATER "1") + message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra args: ${ARGN}") + endif() + + vcpkg_list(SET additional_cmake_args) + + set(CMAKE_BINARY_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") + set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_BINARY_DIR}") + set(CMAKE_PLATFORM_INFO_DIR "${CMAKE_BINARY_DIR}/Platform") + include(CMakeDetermineFortranCompiler) + + if(NOT CMAKE_Fortran_COMPILER AND "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" STREQUAL "") + # If a user uses their own VCPKG_CHAINLOAD_TOOLCHAIN_FILE, they _must_ figure out fortran on their own. + if(WIN32) + message(STATUS "No Fortran compiler found on the PATH. Using MinGW gfortran!") + # If no Fortran compiler is on the path we switch to use gfortan from MinGW within vcpkg + if("${VCPKG_TARGET_ARCHITECTURE}" STREQUAL "x86") + set(mingw_path mingw32) + set(machine_flag -m32) + vcpkg_acquire_msys(msys_root + DIRECT_PACKAGES + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-fortran-10.2.0-1-any.pkg.tar.zst" + ddbdaf9ea865181e16a0931b2ec88c2dcef8add34628e479c7b9de4fa2ccb22e09c7239442e58702e0acd3adabc920565e976984f2bcd90a3668bf7f48a245f1 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libgfortran-10.2.0-1-any.pkg.tar.zst" + 150f355085fcf4c54e8bce8f7f08b90fea9ca7e1f32cff0a2e495faa63cf7723f4bf935f0f4ec77c8dd2ba710ceaed88694cb3da71def5e2088dd65e13c9b002 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libs-10.2.0-1-any.pkg.tar.zst" + 113d8b3b155ea537be8b99688d454f781d70c67c810c2643bc02b83b332d99bfbf3a7fcada6b927fda67ef02cf968d4fdf930466c5909c4338bda64f1f3f483e + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gmp-6.2.0-1-any.pkg.tar.xz" + 37747f3f373ebff1a493f5dec099f8cd6d5abdc2254d9cd68a103ad7ba44a81a9a97ccaba76eaee427b4d67b2becb655ee2c379c2e563c8051b6708431e3c588 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + 2c3d9e6b2eee6a4c16fd69ddfadb6e2dc7f31156627d85845c523ac85e5c585d4cfa978659b1fe2ec823d44ef57bc2b92a6127618ff1a8d7505458b794f3f01c + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-winpthreads-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + e87ad4f4071c6b5bba3b13a85abf6657bb494b73c57ebe65bc5a92e2cef1d9de354e6858d1338ee72809e3dc742ba69ce090aaad4560ae1d3479a61dbebf03c6 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-mpc-1.1.0-1-any.pkg.tar.xz" + d236b815ec3cf569d24d96a386eca9f69a2b1e8af18e96c3f1e5a4d68a3598d32768c7fb3c92207ecffe531259822c1a421350949f2ffabd8ee813654f1af864 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-mpfr-4.1.0-2-any.pkg.tar.zst" + caac5cb73395082b479597a73c7398bf83009dbc0051755ef15157dc34996e156d4ed7881ef703f9e92861cfcad000888c4c32e4bf38b2596c415a19aafcf893 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-10.2.0-1-any.pkg.tar.zst" + 3085e744e716301ba8e4c8a391ab09c2d51e587e0a2df5dab49f83b403a32160f8d713cf1a42c1d962885b4c6ee3b6ed36ef40de15c4be2b69dbc3f12f974c3c + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-binutils-2.34-3-any.pkg.tar.zst" + ff06b2adebe6e9b278b63ca5638ff704750a346faad1cdc40089431b0a308edb6f2a131815e0577673a19878ec1bd8d5a4fa592aa227de769496c1fd3aedbc85 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-crt-git-8.0.0.5966.f5da805f-1-any.pkg.tar.zst" + 120c943ce173719e48400fa18299f3458bc9db4cf18bb5a4dda8a91cc3f816510b337a92f7388077c65b50bbbeae9078793891ceaad631d780b10fde19ad3649 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-headers-git-8.0.0.5966.f5da805f-1-any.pkg.tar.zst" + dbb9f8258da306a3441f9882faa472c3665a67b2ea68657f3e8a1402dcfacf9787a886a3daf0eefe4946f04557bc166eb15b21c1093ad85c909002daadba1923 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libiconv-1.16-2-any.pkg.tar.zst" + fe48d0d3c582fee1edb178425c6daf619d86362442c729047b3c356be26491164f92be1d87950429d2faca4ed3cf76cb4aafef1af3c87b780eee85ee85a4b4c5 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-windows-default-manifest-6.4-3-any.pkg.tar.xz" + 5b99abc55eaa74cf85ca64a9c91542554cb5c1098bc71effba9bd36242694cfd348503fcd3507fb9ba97486108c092c925e2f38cd744493386b3dc9ab28bc526 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-zlib-1.2.11-8-any.pkg.tar.zst" + 46bbf0f28d9faf047221def19e6f94b9556fc6c951cad9c4fb657fde9d15303b9cb64aad11eaa57892cde49eafb43fbe2ec6da6b612449a20ae49dc8233e945b + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-zstd-1.4.5-1-any.pkg.tar.zst" + 68f431073717b59549ab0fd26be8df8afcb43f3dd85be2ffcbc7d1a629999eed924656a7fc3f50937b2e6605a5067542d016181106b7bc3408b89b268ced5d23 + ) + elseif("${VCPKG_TARGET_ARCHITECTURE}" STREQUAL "x64") + set(mingw_path mingw64) + set(machine_flag -m64) + vcpkg_acquire_msys(msys_root + DIRECT_PACKAGES + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-fortran-10.2.0-1-any.pkg.tar.zst" + 0de02db791e978ae21577e675ee9676f741336c9a5ceb5614dbdfc793e2c1c4749b394f41362af7b069e970302fddf8c6772ebd8445fe1c360861606b1784b4d + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libgfortran-10.2.0-1-any.pkg.tar.zst" + c2dee2957356fa51aae39d907d0cc07f966028b418f74a1ea7ea551ff001c175d86781f980c0cf994207794322dcd369fa122ab78b6c6d0f0ab01e39a754e780 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-10.2.0-1-any.pkg.tar.zst" + d17eff08c83d08ef020d999a2ead0d25036ada1c1bf6ed7c02bad9b56840ee5a3304acd790d86f52b83b09c1e788f0cecdf7254dc6760c3c7e478f65882cd32d + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gmp-6.2.0-1-any.pkg.tar.xz" + 0b22b7363e27cec706eb79ee0c45b5fe7088a5ca69e0868e7366481ed2ea9b3f6623d340cebba0b5ed3d79e4dfc7cf15f53530eb260c6d4057bfc3d92eb8c7bc + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + a6969a5db1c55ba458c1a047d0a2a9d2db6cc24266ea47f740598b149a601995d2de734a0984ac5e57ee611d5982cbc03fd6fc0f498435e8d6401bf15724caad + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-winpthreads-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + 87ae090a8de855de5580f158f4007f88d6dad341429620685dc736be55b1f060487552040327a76003618e214a11c1f8e5105ca2c7abe164908121627449d679 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpc-1.1.0-1-any.pkg.tar.xz" + db075a1406690935db5780af293660385f56699881a1b2cd25ab252183643d71d646b0dadf1e34174df8f0744d51ce8b56dccd719e049efcaf9b7e08e80a7ef6 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpfr-4.1.0-2-any.pkg.tar.zst" + 14739667242b8852f0d26547eb3297899a51fd1edafc7101b4e7489273e1efb9cb8422fc067361e3c3694c2afcc6c49fc89537f9f811ad5b9b595873112ee890 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-10.2.0-1-any.pkg.tar.zst" + 7a08c7923f688ca8f06d55e1e91b9059a933ee56e27075ea073e6e58ae220310fb5f79869886a61b6987ab08993c9f962a4bfc50b6ea80473e933ce5551f3930 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-binutils-2.34-3-any.pkg.tar.zst" + 4efd5586c344802110ea0061867469a23571df88529d66a943f86add1287f85ef53b6a9a9b16af2cb67bd09e0760a6f290c3b04ba70c0d5861d8a9f79f0ac209 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-crt-git-8.0.0.5966.f5da805f-1-any.pkg.tar.zst" + 0142e4a44c59d17380a4fc7b101a2152486781621d5f9f930045b8f9c4bb2c93ea88211e7d8f8f233e0ae09595c6c8bc948ae80b9673f231e715b0d04c8a1e54 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-headers-git-8.0.0.5966.f5da805f-1-any.pkg.tar.zst" + b547091a45ea7df8182b627edc9a7c91a23f01c0d4e02634a590c02f24311741cad92ceb67b7e4432ffbe4266f135a5289eb3560cc90ffa5c57612c8537a1588 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libiconv-1.16-2-any.pkg.tar.zst" + 542ed5d898a57a79d3523458f8f3409669b411f87d0852bb566d66f75c96422433f70628314338993461bcb19d4bfac4dadd9d21390cb4d95ef0445669288658 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-windows-default-manifest-6.4-3-any.pkg.tar.xz" + 77d02121416e42ff32a702e21266ce9031b4d8fc9ecdb5dc049d92570b658b3099b65d167ca156367d17a76e53e172ca52d468e440c2cdfd14701da210ffea37 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-zlib-1.2.11-8-any.pkg.tar.zst" + f40dde3216185e945baf51c29bbf8d1947220593901f982c711a663bb5a303efe434a4f6cf0c885817812fdc81183bcc1a240b96c29abb24a4c83202fd15016e + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-zstd-1.4.5-1-any.pkg.tar.zst" + dc2c7289fb206966829c98f6bf4389b423784415532ca3d627a22ae9d756a4fe2faf9844994b3093d814d129d20b2b79897e702aa9569978f58431ea66b55feb + ) + else() + message(FATAL_ERROR "Unknown architecture '${VCPKG_TARGET_ARCHITECTURE}' for MinGW Fortran build!") + endif() + + set(mingw_bin "${msys_root}/${mingw_path}/bin") + vcpkg_add_to_path(PREPEND "${mingw_bin}") + vcpkg_list(APPEND additional_cmake_args + -DCMAKE_GNUtoMS=ON + "-DCMAKE_Fortran_COMPILER=${mingw_bin}/gfortran.exe" + "-DCMAKE_C_COMPILER=${mingw_bin}/gcc.exe" + "-DCMAKE_Fortran_FLAGS_INIT:STRING= -mabi=ms ${machine_flag} ${VCPKG_Fortran_FLAGS}") + + # This is for private use by vcpkg-gfortran + set(vcpkg_find_fortran_MSYS_ROOT "${msys_root}" PARENT_SCOPE) + set(VCPKG_USE_INTERNAL_Fortran TRUE PARENT_SCOPE) + set(VCPKG_POLICY_SKIP_DUMPBIN_CHECKS enabled PARENT_SCOPE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/mingw.cmake" PARENT_SCOPE) # Switching to MinGW toolchain for Fortran + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(VCPKG_CRT_LINKAGE dynamic PARENT_SCOPE) + message(STATUS "VCPKG_CRT_LINKAGE linkage for ${PORT} using vcpkg's internal gfortran cannot be static due to linking against MinGW libraries. Forcing dynamic CRT linkage") + endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(VCPKG_LIBRARY_LINKAGE dynamic PARENT_SCOPE) + message(STATUS "VCPKG_LIBRARY_LINKAGE linkage for ${PORT} using vcpkg's internal gfortran cannot be static due to linking against MinGW libraries. Forcing dynamic library linkage") + endif() + else() + message(FATAL_ERROR "Unable to find a Fortran compiler using 'CMakeDetermineFortranCompiler'. Please install one (e.g. gfortran) and make it available on the PATH!") + endif() + endif() + set("${out_var}" "${additional_cmake_args}" PARENT_SCOPE) +endfunction() diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 1e0f2493df9b3f..e6fbe785b5844e 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -1,53 +1,95 @@ -#.rst: -# .. command:: vcpkg_fixup_cmake_targets -# -# Transform all /debug/share//*targets-debug.cmake files and move them to /share/. -# Removes all /debug/share//*targets.cmake and /debug/share//*config.cmake -# -# Transform all references matching /bin/*.exe to /tools//*.exe on Windows -# Transform all references matching /bin/* to /tools//* on other platforms -# -# Fix ${_IMPORT_PREFIX} in auto generated targets to be one folder deeper. -# Replace ${CURRENT_INSTALLED_DIR} with ${_IMPORT_PREFIX} in configs/targets. -# -# :: -# vcpkg_fixup_cmake_targets([CONFIG_PATH ]) -# -# ``CONFIG_PATH`` -# *.cmake files subdirectory (like "lib/cmake/${PORT}"). -# +# DEPRECATED BY ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup +#[===[.md: +# vcpkg_fixup_cmake_targets -function(vcpkg_fixup_cmake_targets) - cmake_parse_arguments(_vfct "" "CONFIG_PATH;TARGET_PATH" "" ${ARGN}) +Merge release and debug CMake targets and configs to support multiconfig generators. - if(_vfct_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "vcpkg_fixup_cmake_targets was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}") - endif() +Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. + +## Usage +```cmake +vcpkg_fixup_cmake_targets([CONFIG_PATH ] + [TARGET_PATH ] + [TOOLS_PATH ] + [DO_NOT_DELETE_PARENT_CONFIG_PATH]) +``` + +## Parameters + +### CONFIG_PATH +Subpath currently containing `*.cmake` files subdirectory (like `lib/cmake/${PORT}`). Should be relative to `${CURRENT_PACKAGES_DIR}`. + +Defaults to `share/${PORT}`. + +### TARGET_PATH +Subpath to which the above `*.cmake` files should be moved. Should be relative to `${CURRENT_PACKAGES_DIR}`. +This needs to be specified if the port name differs from the `find_package()` name. + +Defaults to `share/${PORT}`. + +### DO_NOT_DELETE_PARENT_CONFIG_PATH +By default the parent directory of CONFIG_PATH is removed if it is named "cmake". +Passing this option disable such behavior, as it is convenient for ports that install +more than one CMake package configuration file. + +### NO_PREFIX_CORRECTION +Disables the correction of_IMPORT_PREFIX done by vcpkg due to moving the targets. +Currently the correction does not take into account how the files are moved and applies +I rather simply correction which in some cases will yield the wrong results. + +### TOOLS_PATH +Define the base path to tools. Default: `tools/` + +## Notes +Transform all `/debug//*targets-debug.cmake` files and move them to `/`. +Removes all `/debug//*targets.cmake` and `/debug//*config.cmake`. + +Transform all references matching `/bin/*.exe` to `/${TOOLS_PATH}/*.exe` on Windows. +Transform all references matching `/bin/*` to `/${TOOLS_PATH}/*` on other platforms. + +Fix `${_IMPORT_PREFIX}` in auto generated targets to be one folder deeper. +Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. - if(NOT _vfct_TARGET_PATH) - set(_vfct_TARGET_PATH share/${PORT}) +## Examples + +* [concurrentqueue](https://github.com/Microsoft/vcpkg/blob/master/ports/concurrentqueue/portfile.cmake) +* [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake) +* [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake) +#]===] + +function(vcpkg_fixup_cmake_targets) + if(Z_VCPKG_CMAKE_CONFIG_FIXUP_GUARD) + message(FATAL_ERROR "The ${PORT} port already depends on vcpkg-cmake-config; using both vcpkg-cmake-config and vcpkg_fixup_cmake_targets in the same port is unsupported.") endif() + cmake_parse_arguments(PARSE_ARGV 0 arg "DO_NOT_DELETE_PARENT_CONFIG_PATH" "CONFIG_PATH;TARGET_PATH;NO_PREFIX_CORRECTION;TOOLS_PATH" "") - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(EXECUTABLE_SUFFIX "\\.exe") - else() - set(EXECUTABLE_SUFFIX) + if(arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_fixup_cmake_targets was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") endif() - set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/${_vfct_TARGET_PATH}) - set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH}) + if(NOT arg_TARGET_PATH) + set(arg_TARGET_PATH share/${PORT}) + endif() + + if(NOT arg_TOOLS_PATH) + set(arg_TOOLS_PATH tools/${PORT}) + endif() + + string(REPLACE "." "\\." EXECUTABLE_SUFFIX "${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + + set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/${arg_TARGET_PATH}) + set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/${arg_TARGET_PATH}) - if(_vfct_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}") - if(_vfct_CONFIG_PATH STREQUAL "share") + if(arg_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}") + if(arg_CONFIG_PATH STREQUAL "share") file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/share2) file(RENAME ${CURRENT_PACKAGES_DIR}/share ${CURRENT_PACKAGES_DIR}/share2) - set(_vfct_CONFIG_PATH share2) + set(arg_CONFIG_PATH share2) endif() - set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) - set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}) - + set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}) + set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") if(NOT EXISTS ${DEBUG_CONFIG}) message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.") @@ -67,13 +109,13 @@ function(vcpkg_fixup_cmake_targets) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) - if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake") + if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) file(REMOVE_RECURSE ${DEBUG_CONFIG}) else() get_filename_component(DEBUG_CONFIG_PARENT_DIR ${DEBUG_CONFIG} DIRECTORY) get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG_PARENT_DIR} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) - if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake") + if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) file(REMOVE_RECURSE ${DEBUG_CONFIG_PARENT_DIR}) endif() endif() @@ -81,13 +123,13 @@ function(vcpkg_fixup_cmake_targets) get_filename_component(RELEASE_CONFIG_DIR_NAME ${RELEASE_CONFIG} NAME) string(TOLOWER "${RELEASE_CONFIG_DIR_NAME}" RELEASE_CONFIG_DIR_NAME) - if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake") + if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) file(REMOVE_RECURSE ${RELEASE_CONFIG}) else() get_filename_component(RELEASE_CONFIG_PARENT_DIR ${RELEASE_CONFIG} DIRECTORY) get_filename_component(RELEASE_CONFIG_DIR_NAME ${RELEASE_CONFIG_PARENT_DIR} NAME) string(TOLOWER "${RELEASE_CONFIG_DIR_NAME}" RELEASE_CONFIG_DIR_NAME) - if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake") + if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH) file(REMOVE_RECURSE ${RELEASE_CONFIG_PARENT_DIR}) endif() endif() @@ -115,7 +157,7 @@ function(vcpkg_fixup_cmake_targets) foreach(RELEASE_TARGET IN LISTS RELEASE_TARGETS) file(READ ${RELEASE_TARGET} _contents) string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") - string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/${arg_TOOLS_PATH}/\\1" _contents "${_contents}") file(WRITE ${RELEASE_TARGET} "${_contents}") endforeach() @@ -128,7 +170,7 @@ function(vcpkg_fixup_cmake_targets) file(READ ${DEBUG_TARGET} _contents) string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") - string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/${arg_TOOLS_PATH}/\\1" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") file(WRITE ${RELEASE_SHARE}/${DEBUG_TARGET_REL} "${_contents}") @@ -137,20 +179,43 @@ function(vcpkg_fixup_cmake_targets) endforeach() endif() - #Fix ${_IMPORT_PREFIX} in cmake generated targets and configs; + #Fix ${_IMPORT_PREFIX} in cmake generated targets and configs; #Since those can be renamed we have to check in every *.cmake file(GLOB_RECURSE MAIN_CMAKES "${RELEASE_SHARE}/*.cmake") + foreach(MAIN_CMAKE IN LISTS MAIN_CMAKES) file(READ ${MAIN_CMAKE} _contents) - string(REGEX REPLACE - "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" - "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" - _contents "${_contents}") # see #1044 for details why this replacement is necessary. See #4782 why it must be a regex. - string(REGEX REPLACE - "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\./(\\.\\./)*\" ABSOLUTE\\)" - "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" - _contents "${_contents}") + #This correction is not correct for all cases. To make it correct for all cases it needs to consider + #original folder deepness to CURRENT_PACKAGES_DIR in comparison to the moved to folder deepness which + #is always at least (>=) 2, e.g. share/${PORT}. Currently the code assumes it is always 2 although + #this requirement is only true for the *Config.cmake. The targets are not required to be in the same + #folder as the *Config.cmake! + if(NOT arg_NO_PREFIX_CORRECTION) + string(REGEX REPLACE + "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents "${_contents}") # see #1044 for details why this replacement is necessary. See #4782 why it must be a regex. + string(REGEX REPLACE + "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\./(\\.\\./)*\" ABSOLUTE\\)" + "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" + _contents "${_contents}") + string(REGEX REPLACE + "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\.((\\\\|/)\\.\\.)*\" ABSOLUTE\\)" + "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" + _contents "${_contents}") # This is a meson-related workaround, see https://github.com/mesonbuild/meson/issues/6955 + endif() + #Fix wrongly absolute paths to install dir with the correct dir using ${_IMPORT_PREFIX} + #This happens if vcpkg built libraries are directly linked to a target instead of using + #an imported target for it. We could add more logic here to identify defect target files. + #Since the replacement here in a multi config build always requires a generator expression + #in front of the absoulte path to ${CURRENT_INSTALLED_DIR}. So the match should always be at + #least >:${CURRENT_INSTALLED_DIR}. + #In general the following generator expressions should be there: + #\$<\$:${CURRENT_INSTALLED_DIR}/debug/lib/somelib> + #and/or + #\$<\$>:${CURRENT_INSTALLED_DIR}/lib/somelib> + #with ${CURRENT_INSTALLED_DIR} being fully expanded string(REPLACE "${CURRENT_INSTALLED_DIR}" [[${_IMPORT_PREFIX}]] _contents "${_contents}") file(WRITE ${MAIN_CMAKE} "${_contents}") endforeach() @@ -176,3 +241,5 @@ function(vcpkg_fixup_cmake_targets) file(WRITE ${CMAKE_FILE} "${_contents}") endforeach() endfunction() + + diff --git a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake new file mode 100644 index 00000000000000..3f37099a71c3df --- /dev/null +++ b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake @@ -0,0 +1,195 @@ +#[===[.md: +# vcpkg_fixup_pkgconfig + +Fix common paths in *.pc files and make everything relative to $(prefix). +Additionally, on static triplets, private entries are merged with their non-private counterparts, +allowing pkg-config to be called without the ``--static`` flag. +Note that vcpkg is designed to never have to call pkg-config with the ``--static`` flag, +since a consumer cannot know if a dependent library has been built statically or not. + +## Usage +```cmake +vcpkg_fixup_pkgconfig( + [RELEASE_FILES ...] + [DEBUG_FILES ...] + [SKIP_CHECK] +) +``` + +## Parameters +### RELEASE_FILES +Specifies a list of files to apply the fixes for release paths. +Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR} without ${CURRENT_PACKAGES_DIR}/debug/ + +### DEBUG_FILES +Specifies a list of files to apply the fixes for debug paths. +Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR}/debug/ + +### SKIP_CHECK +Skips the library checks in vcpkg_fixup_pkgconfig. Only use if the script itself has unhandled cases. + +### SYSTEM_PACKAGES (deprecated) +This argument has been deprecated and has no effect. + +### SYSTEM_LIBRARIES (deprecated) +This argument has been deprecated and has no effect. + +### IGNORE_FLAGS (deprecated) +This argument has been deprecated and has no effect. + +## Notes +Still work in progress. If there are more cases which can be handled here feel free to add them + +## Examples + +* [brotli](https://github.com/Microsoft/vcpkg/blob/master/ports/brotli/portfile.cmake) +#]===] + +function(vcpkg_fixup_pkgconfig_check_files pkg_cfg_cmd _file _config) + set(PATH_SUFFIX_DEBUG /debug) + set(PATH_SUFFIX_RELEASE) + set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_config}}/lib/pkgconfig") + set(PKGCONFIG_INSTALLED_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig") + set(PKGCONFIG_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}${PATH_SUFFIX_${_config}}/lib/pkgconfig") + set(PKGCONFIG_PACKAGES_SHARE_DIR "${CURRENT_PACKAGES_DIR}/share/pkgconfig") + + if(DEFINED ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH "$ENV{PKG_CONFIG_PATH}") + else() + unset(BACKUP_ENV_PKG_CONFIG_PATH) + endif() + if(DEFINED ENV{PKG_CONFIG_PATH} AND NOT ENV{PKG_CONFIG_PATH} STREQUAL "") + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}") + endif() + + # First make sure everything is ok with the package and its deps + get_filename_component(_package_name "${_file}" NAME_WLE) + debug_message("Checking package (${_config}): ${_package_name}") + execute_process(COMMAND "${pkg_cfg_cmd}" --print-errors --exists ${_package_name} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" + RESULT_VARIABLE _pkg_error_var + OUTPUT_VARIABLE _pkg_output + ERROR_VARIABLE _pkg_error_out + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if(NOT _pkg_error_var EQUAL 0) + message(STATUS "pkg_cfg_cmd call with:${pkg_cfg_cmd} --exists ${_package_name} failed") + message(STATUS "ENV{PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}") + message(STATUS "pkg-config call failed with error code:${_pkg_error_var}") + message(STATUS "pkg-config output:${_pkg_output}") + message(FATAL_ERROR "pkg-config error output:${_pkg_error_out}") + else() + debug_message("pkg-config returned:${_pkg_error_var}") + debug_message("pkg-config output:${_pkg_output}") + debug_message("pkg-config error output:${_pkg_error_out}") + endif() + if(DEFINED BACKUP_ENV_PKG_CONFIG_PATH) + set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH}") + else() + unset(ENV{PKG_CONFIG_PATH}) + endif() +endfunction() + +function(vcpkg_fixup_pkgconfig) + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 _vfpkg "SKIP_CHECK" "" "RELEASE_FILES;DEBUG_FILES;SYSTEM_LIBRARIES;SYSTEM_PACKAGES;IGNORE_FLAGS") + + if(_vfpkg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_fixup_pkgconfig() was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}") + endif() + + if((DEFINED _vfpkg_RELEASE_FILES AND NOT DEFINED _vfpkg_DEBUG_FILES) OR (NOT DEFINED _vfpkg_RELEASE_FILES AND DEFINED _vfpkg_DEBUG_FILES)) + message(FATAL_ERROR "vcpkg_fixup_pkgconfig() requires both or neither of DEBUG_FILES and RELEASE_FILES") + endif() + + if(NOT DEFINED _vfpkg_RELEASE_FILES) + file(GLOB_RECURSE _vfpkg_RELEASE_FILES "${CURRENT_PACKAGES_DIR}/**/*.pc") + file(GLOB_RECURSE _vfpkg_DEBUG_FILES "${CURRENT_PACKAGES_DIR}/debug/**/*.pc") + if(_vfpkg_DEBUG_FILES) + list(REMOVE_ITEM _vfpkg_RELEASE_FILES ${_vfpkg_DEBUG_FILES}) + endif() + endif() + + vcpkg_find_acquire_program(PKGCONFIG) + debug_message("Using pkg-config from: ${PKGCONFIG}") + + #Absolute Unix like paths + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}") + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}") + + foreach(CONFIG RELEASE DEBUG) + debug_message("${CONFIG} Files: ${_vfpkg_${CONFIG}_FILES}") + if(VCPKG_BUILD_TYPE STREQUAL "debug" AND CONFIG STREQUAL "RELEASE") + continue() + endif() + if(VCPKG_BUILD_TYPE STREQUAL "release" AND CONFIG STREQUAL "DEBUG") + continue() + endif() + foreach(_file ${_vfpkg_${CONFIG}_FILES}) + message(STATUS "Fixing pkgconfig file: ${_file}") + get_filename_component(PKG_LIB_SEARCH_PATH "${_file}" DIRECTORY) + if(CONFIG STREQUAL "DEBUG") + file(RELATIVE_PATH RELATIVE_PC_PATH "${PKG_LIB_SEARCH_PATH}" "${CURRENT_PACKAGES_DIR}/debug/") + else() + file(RELATIVE_PATH RELATIVE_PC_PATH "${PKG_LIB_SEARCH_PATH}" "${CURRENT_PACKAGES_DIR}") + endif() + # strip trailing slash + string(REGEX REPLACE "/$" "" RELATIVE_PC_PATH "${RELATIVE_PC_PATH}") + #Correct *.pc file + file(READ "${_file}" _contents) + string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "${_VCPKG_PACKAGES_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "${_VCPKG_INSTALLED_DIR}" "\${prefix}" _contents "${_contents}") + string(REGEX REPLACE "(^|\n)prefix[\t ]*=[^\n]*" "" _contents "${_contents}") + if(CONFIG STREQUAL "DEBUG") + string(REPLACE "}/debug" "}" _contents "${_contents}") + # Prefix points at the debug subfolder + string(REPLACE "\${prefix}/include" "\${prefix}/../include" _contents "${_contents}") + string(REPLACE "\${prefix}/share" "\${prefix}/../share" _contents "${_contents}") + endif() + string(REGEX REPLACE " -L(\\\${[^}]*}[^ \n\t]*)" " -L\"\\1\"" _contents "${_contents}") + string(REGEX REPLACE " -I(\\\${[^}]*}[^ \n\t]*)" " -I\"\\1\"" _contents "${_contents}") + string(REGEX REPLACE " -l(\\\${[^}]*}[^ \n\t]*)" " -l\"\\1\"" _contents "${_contents}") + # This section fuses XYZ.private and XYZ according to VCPKG_LIBRARY_LINKAGE + # + # Pkgconfig searches Requires.private transitively for Cflags in the dynamic case, + # which prevents us from removing it. + # + # Once this transformation is complete, users of vcpkg should never need to pass + # --static. + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Libs comes before Libs.private + string(REGEX REPLACE "(^|\n)(Libs: *[^\n]*)(.*)\nLibs.private:( *[^\n]*)" "\\1\\2\\4\\3" _contents "${_contents}") + # Libs.private comes before Libs + string(REGEX REPLACE "(^|\n)Libs.private:( *[^\n]*)(.*\nLibs: *[^\n]*)" "\\3\\2" _contents "${_contents}") + # Only Libs.private + string(REGEX REPLACE "(^|\n)Libs.private: *" "\\1Libs: " _contents "${_contents}") + # Requires comes before Requires.private + string(REGEX REPLACE "(^|\n)(Requires: *[^\n]*)(.*)\nRequires.private:( *[^\n]*)" "\\1\\2\\4\\3" _contents "${_contents}") + # Requires.private comes before Requires + string(REGEX REPLACE "(^|\n)Requires.private:( *[^\n]*)(.*\nRequires: *[^\n]*)" "\\3\\2" _contents "${_contents}") + # Only Requires.private + string(REGEX REPLACE "(^|\n)Requires.private: *" "\\1Requires: " _contents "${_contents}") + endif() + file(WRITE "${_file}" "prefix=\${pcfiledir}/${RELATIVE_PC_PATH}\n${_contents}") + unset(PKG_LIB_SEARCH_PATH) + endforeach() + + if(NOT _vfpkg_SKIP_CHECK) # The check can only run after all files have been corrected! + foreach(_file ${_vfpkg_${CONFIG}_FILES}) + vcpkg_fixup_pkgconfig_check_files("${PKGCONFIG}" "${_file}" "${CONFIG}") + endforeach() + endif() + endforeach() + debug_message("Fixing pkgconfig --- finished") + + set(VCPKG_FIXUP_PKGCONFIG_CALLED TRUE CACHE INTERNAL "See below" FORCE) + # Variable to check if this function has been called! + # Theoreotically vcpkg could look for *.pc files and automatically call this function + # or check if this function has been called if *.pc files are detected. + # The same is true for vcpkg_fixup_cmake_targets +endfunction() diff --git a/scripts/cmake/vcpkg_from_bitbucket.cmake b/scripts/cmake/vcpkg_from_bitbucket.cmake index 5f23714ead59a4..e27d62218e8ffe 100644 --- a/scripts/cmake/vcpkg_from_bitbucket.cmake +++ b/scripts/cmake/vcpkg_from_bitbucket.cmake @@ -1,197 +1,151 @@ -## # vcpkg_from_bitbucket -## -## Download and extract a project from Bitbucket. -## Enables support for installing HEAD `vcpkg.exe install --head `. -## -## ## Usage: -## ```cmake -## vcpkg_from_bitbucket( -## OUT_SOURCE_PATH -## REPO -## [REF ] -## [SHA512 <45d0d7f8cc350...>] -## [HEAD_REF ] -## [PATCHES ...] -## ) -## ``` -## -## ## Parameters: -## ### OUT_SOURCE_PATH -## Specifies the out-variable that will contain the extracted location. -## -## This should be set to `SOURCE_PATH` by convention. -## -## ### REPO -## The organization or user and repository on GitHub. -## -## ### REF -## A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.** -## -## For repositories without official releases, this can be set to the full commit id of the current latest master. -## -## If `REF` is specified, `SHA512` must also be specified. -## -## ### SHA512 -## The SHA512 hash that should match the archive (https://bitbucket.com/${REPO}/get/${REF}.tar.gz). -## -## This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. -## -## ### HEAD_REF -## The unstable git commit-ish (ideally a branch) to pull for `--head` builds. -## -## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. -## -## ### PATCHES -## A list of patches to be applied to the extracted sources. -## -## Relative paths are based on the port directory. -## -## ## Notes: -## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. -## -## This exports the `VCPKG_HEAD_VERSION` variable during head builds. -## -## ## Examples: -## -## * [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake) +#[===[.md: +# vcpkg_from_bitbucket + +Download and extract a project from Bitbucket. + +## Usage: +```cmake +vcpkg_from_bitbucket( + OUT_SOURCE_PATH + REPO + [REF ] + [SHA512 <45d0d7f8cc350...>] + [HEAD_REF ] + [PATCHES ...] +) +``` + +## Parameters: +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### REPO +The organization or user and repository on GitHub. + +### REF +A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.** + +For repositories without official releases, this can be set to the full commit id of the current latest master. + +If `REF` is specified, `SHA512` must also be specified. + +### SHA512 +The SHA512 hash that should match the archive (https://bitbucket.com/${REPO}/get/${REF}.tar.gz). + +This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. + +### HEAD_REF +The unstable git commit-ish (ideally a branch) to pull for `--head` builds. + +For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. + +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + +## Notes: +At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. + +This exports the `VCPKG_HEAD_VERSION` variable during head builds. + +## Examples: + +* [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake) +#]===] + function(vcpkg_from_bitbucket) - set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF) - set(multipleValuesArgs PATCHES) - cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + cmake_parse_arguments(PARSE_ARGV 0 "arg" + "" + "OUT_SOURCE_PATH;REPO;REF;SHA512;HEAD_REF" + "PATCHES") - if(NOT _vdud_OUT_SOURCE_PATH) - message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "vcpkg_from_bitbucket was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") endif() - if((_vdud_REF AND NOT _vdud_SHA512) OR (NOT _vdud_REF AND _vdud_SHA512)) + if(DEFINED arg_REF AND NOT DEFINED arg_SHA512) message(FATAL_ERROR "SHA512 must be specified if REF is specified.") endif() + if(NOT DEFINED arg_REF AND DEFINED arg_SHA512) + message(FATAL_ERROR "REF must be specified if SHA512 is specified.") + endif() - if(NOT _vdud_REPO) + if(NOT DEFINED arg_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + if(NOT DEFINED arg_REPO) message(FATAL_ERROR "The Bitbucket repository must be specified.") endif() - if(NOT _vdud_REF AND NOT _vdud_HEAD_REF) - message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.") + if(NOT DEFINED arg_REF AND NOT DEFINED arg_HEAD_REF) + message(FATAL_ERROR "At least one of REF or HEAD_REF must be specified.") endif() - string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO}) - string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) - - macro(set_SOURCE_PATH BASE BASEREF) - set(SOURCE_PATH "${BASE}/${ORG_NAME}-${REPO_NAME}-${BASEREF}") - if(EXISTS ${SOURCE_PATH}) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - else() - # Sometimes GitHub strips a leading 'v' off the REF. - string(REGEX REPLACE "^v" "" REF ${BASEREF}) - set(SOURCE_PATH "${BASE}/${ORG_NAME}-${REPO_NAME}-${REF}") - if(EXISTS ${SOURCE_PATH}) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - else() - message(FATAL_ERROR "Could not determine source path: '${BASE}/${ORG_NAME}-${REPO_NAME}-${BASEREF}' does not exist") - endif() - endif() - endmacro() - - if(VCPKG_USE_HEAD_VERSION AND NOT _vdud_HEAD_REF) - message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") - set(VCPKG_USE_HEAD_VERSION OFF) + if(NOT arg_REPO MATCHES "^([^/]*)/([^/]*)$") + message(FATAL_ERROR "REPO (${arg_REPO}) is not a valid repo name: + must be an organization name followed by a repository name separated by a single slash.") endif() - - # Handle --no-head scenarios - if(NOT VCPKG_USE_HEAD_VERSION) - if(NOT _vdud_REF) - message(FATAL_ERROR "Package does not specify REF. It must built using --head.") - endif() - - set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz") - set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz") - - file(DOWNLOAD "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/tags/${_vdud_REF}" - ${downloaded_file_path}.version - STATUS download_status - ) - list(GET download_status 0 status_code) - if ("${status_code}" STREQUAL "0") - # Parse the github refs response with regex. - # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${downloaded_file_path}.version" _contents) - string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}") - string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x}) - string(SUBSTRING ${_version} 0 12 _version) # Get the 12 first numbers from commit hash + set(org_name "${CMAKE_MATCH_1}") + set(repo_name "${CMAKE_MATCH_2}") + + set(redownload_param "") + set(working_directory_param "") + set(sha512_param "SHA512" "${arg_SHA512}") + set(ref_to_use "${arg_REF}") + if(VCPKG_USE_HEAD_VERSION) + if(DEFINED arg_HEAD_REF) + set(redownload_param "ALWAYS_REDOWNLOAD") + set(sha512_param "SKIP_SHA512") + set(working_directory_param "WORKING_DIRECTORY" "${CURRENT_BUILDTREES_DIR}/src/head") + set(ref_to_use "${arg_HEAD_REF}") else() - string(SUBSTRING ${_vdud_REF} 0 12 _version) # Get the 12 first numbers from commit hash + message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") endif() - - vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz" - SHA512 "${_vdud_SHA512}" - FILENAME "${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz" - ) - - vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${ARCHIVE}" - REF "${_vdud_REF}" - PATCHES ${_vdud_PATCHES} - ) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - return() + elseif(NOT DEFINED arg_REF) + message(FATAL_ERROR "Package does not specify REF. It must be built using --head.") endif() - # The following is for --head scenarios - set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_HEAD_REF}.tar.gz") - set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") - set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") + # avoid using either - or _, to allow both `foo/bar` and `foo-bar` to coexist + # we assume that no one will name a ref "foo_-bar" + string(REPLACE "/" "_-" sanitized_ref "${ref_to_use}") + set(downloaded_file_name "${org_name}-${repo_name}-${sanitized_ref}.tar.gz") - if(_VCPKG_NO_DOWNLOADS) - if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) - message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") - endif() - message(STATUS "Using cached ${downloaded_file_path}") - else() - if(EXISTS ${downloaded_file_path}) - message(STATUS "Purging cached ${downloaded_file_path} to fetch latest (use --no-downloads to suppress)") - file(REMOVE ${downloaded_file_path}) - endif() - if(EXISTS ${downloaded_file_path}.version) - file(REMOVE ${downloaded_file_path}.version) - endif() - if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/head) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/head) - endif() - - # Try to download the file and version information from bitbucket. - vcpkg_download_distfile(ARCHIVE_VERSION - URLS "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. + if(VCPKG_USE_HEAD_VERSION) + vcpkg_download_distfile(archive_version + URLS "https://api.bitbucket.com/2.0/repositories/${org_name}/${repo_name}/refs/branches/${arg_HEAD_REF}" FILENAME "${downloaded_file_name}.version" SKIP_SHA512 + ALWAYS_REDOWNLOAD ) - - vcpkg_download_distfile(ARCHIVE - URLS "${URL}" - FILENAME "${downloaded_file_name}" - SKIP_SHA512 - ) + # Parse the github refs response with regex. + # TODO: add json-pointer support to vcpkg + file(READ "${archive_version}" version_contents) + if(NOT version_contents MATCHES [["hash": "([a-f0-9]+)"]]) + message(FATAL_ERROR "Failed to parse API response from '${version_url}': + +${version_contents} +") + endif() + set(VCPKG_HEAD_VERSION "${CMAKE_MATCH_1}" PARENT_SCOPE) endif() - # Parse the github refs response with regex. - # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${ARCHIVE_VERSION}" _contents) - string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}") - string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x}) - string(SUBSTRING ${_version} 0 12 _vdud_HEAD_REF) # Get the 12 first numbers from commit hash - - # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. - set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) - + # download the file information from bitbucket. + vcpkg_download_distfile(archive + URLS "https://bitbucket.com/${org_name}/${repo_name}/get/${ref_to_use}.tar.gz" + FILENAME "${downloaded_file_name}" + ${sha512_param} + ${redownload_param} + ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${downloaded_file_path}" - REF "${_vdud_HEAD_REF}" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" - PATCHES ${_vdud_PATCHES} + ARCHIVE "${archive}" + REF "${sanitized_ref}" + PATCHES ${arg_PATCHES} + ${working_directory_param} ) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + set("${arg_OUT_SOURCE_PATH}" "${SOURCE_PATH}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_from_git.cmake b/scripts/cmake/vcpkg_from_git.cmake index 0db818f807f94e..0a5fdb622593b1 100644 --- a/scripts/cmake/vcpkg_from_git.cmake +++ b/scripts/cmake/vcpkg_from_git.cmake @@ -1,124 +1,185 @@ -## # vcpkg_from_git -## -## Download and extract a project from git -## -## ## Usage: -## ```cmake -## vcpkg_from_git( -## OUT_SOURCE_PATH -## URL -## REF <59f7335e4d...> -## [PATCHES ...] -## ) -## ``` -## -## ## Parameters: -## ### OUT_SOURCE_PATH -## Specifies the out-variable that will contain the extracted location. -## -## This should be set to `SOURCE_PATH` by convention. -## -## ### URL -## The url of the git repository. Must start with `https`. -## -## ### REF -## The git sha of the commit to download. -## -## ### PATCHES -## A list of patches to be applied to the extracted sources. -## -## Relative paths are based on the port directory. -## -## ## Notes: -## `OUT_SOURCE_PATH`, `REF`, and `URL` must be specified. -## -## ## Examples: -## -## * [fdlibm](https://github.com/Microsoft/vcpkg/blob/master/ports/fdlibm/portfile.cmake) +#[===[.md: +# vcpkg_from_git + +Download and extract a project from git + +## Usage: +```cmake +vcpkg_from_git( + OUT_SOURCE_PATH + URL + REF <59f7335e4d...> + [HEAD_REF ] + [PATCHES ...] +) +``` + +## Parameters: +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### URL +The url of the git repository. + +### REF +The git sha of the commit to download. + +### FETCH_REF +The git branch to fetch in non-HEAD mode. After this is fetched, +then `REF` is checked out. This is useful in cases where the git server +does not allow checking out non-advertised objects. + +### HEAD_REF +The git branch to use when the package is requested to be built from the latest sources. + +Example: `main`, `develop`, `HEAD` + +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + +## Notes: +`OUT_SOURCE_PATH`, `REF`, and `URL` must be specified. + +## Examples: + +* [fdlibm](https://github.com/Microsoft/vcpkg/blob/master/ports/fdlibm/portfile.cmake) +#]===] function(vcpkg_from_git) - set(oneValueArgs OUT_SOURCE_PATH URL REF) - set(multipleValuesArgs PATCHES) - cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) - - if(NOT DEFINED _vdud_OUT_SOURCE_PATH) - message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") - endif() - - if(NOT DEFINED _vdud_URL) - message(FATAL_ERROR "The git url must be specified") - endif() - - if( NOT _vdud_URL MATCHES "^https:") - # vcpkg_from_git does not support a SHA256 parameter because hashing the git archive is - # not stable across all supported platforms. The tradeoff is to require https to download - # and the ref to be the git sha (i.e. not things that can change like a label) - message(FATAL_ERROR "The git url must be https") - endif() - - if(NOT DEFINED _vdud_REF) - message(FATAL_ERROR "The git ref must be specified.") - endif() - - # using .tar.gz instead of .zip because the hash of the latter is affected by timezone. - string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") - set(TEMP_ARCHIVE "${DOWNLOADS}/temp/${PORT}-${SANITIZED_REF}.tar.gz") - set(ARCHIVE "${DOWNLOADS}/${PORT}-${SANITIZED_REF}.tar.gz") - set(TEMP_SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${SANITIZED_REF}") - - if(NOT EXISTS "${ARCHIVE}") - if(_VCPKG_NO_DOWNLOADS) - message(FATAL_ERROR "Downloads are disabled, but '${ARCHIVE}' does not exist.") - endif() - message(STATUS "Fetching ${_vdud_URL}...") - find_program(GIT NAMES git git.cmd) - # Note: git init is safe to run multiple times - vcpkg_execute_required_process( - COMMAND ${GIT} init git-tmp - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME git-init-${TARGET_TRIPLET} - ) - vcpkg_execute_required_process( - COMMAND ${GIT} fetch ${_vdud_URL} ${_vdud_REF} --depth 1 -n - WORKING_DIRECTORY ${DOWNLOADS}/git-tmp - LOGNAME git-fetch-${TARGET_TRIPLET} + cmake_parse_arguments(PARSE_ARGV 0 "arg" + "" + "OUT_SOURCE_PATH;URL;REF;FETCH_REF;HEAD_REF;TAG" + "PATCHES" ) - execute_process( - COMMAND ${GIT} rev-parse FETCH_HEAD - OUTPUT_VARIABLE REV_PARSE_HEAD - ERROR_VARIABLE REV_PARSE_HEAD - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${DOWNLOADS}/git-tmp - ) - if(error_code) - message(FATAL_ERROR "unable to determine FETCH_HEAD after fetching git repository") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "vcpkg_from_git was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(DEFINED arg_TAG) + message(WARNING "The TAG argument to vcpkg_from_git has been deprecated and has no effect.") + endif() + + + if(NOT DEFINED arg_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified") + endif() + if(NOT DEFINED arg_URL) + message(FATAL_ERROR "URL must be specified") + endif() + if(NOT DEFINED arg_REF AND NOT DEFINED arg_HEAD_REF) + message(FATAL_ERROR "At least one of REF or HEAD_REF must be specified") + endif() + if(DEFINED arg_FETCH_REF AND NOT DEFINED arg_REF) + message(FATAL_ERROR "REF must be specified if FETCH_REF is specified") endif() - string(REGEX REPLACE "\n$" "" REV_PARSE_HEAD "${REV_PARSE_HEAD}") - if(NOT REV_PARSE_HEAD STREQUAL _vdud_REF) - message(FATAL_ERROR "REF (${_vdud_REF}) does not match FETCH_HEAD (${REV_PARSE_HEAD})") + + vcpkg_list(SET git_fetch_shallow_param --depth 1) + vcpkg_list(SET extract_working_directory_param) + set(git_working_directory "${DOWNLOADS}/git-tmp") + if(VCPKG_USE_HEAD_VERSION) + if(DEFINED arg_HEAD_REF) + vcpkg_list(SET working_directory_param "WORKING_DIRECTORY" "${CURRENT_BUILDTREES_DIR}/src/head") + vcpkg_list(SET git_fetch_shallow_param --depth 1) + set(ref_to_use "${arg_HEAD_REF}") + set(git_working_directory "${CURRENT_BUILDTREES_DIR}/src/git-tmp") + else() + message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") + endif() + else() + if(NOT DEFINED arg_REF) + message(FATAL_ERROR "Package does not specify REF. It must be built using --head.") + endif() + + if(DEFINED arg_FETCH_REF) + set(ref_to_use "${arg_FETCH_REF}") + vcpkg_list(SET git_fetch_shallow_param) + else() + set(ref_to_use "${arg_REF}") + endif() + endif() + + string(REPLACE "/" "_-" sanitized_ref "${ref_to_use}") + set(temp_archive "${DOWNLOADS}/temp/${PORT}-${sanitized_ref}.tar.gz") + set(archive "${DOWNLOADS}/${PORT}-${sanitized_ref}.tar.gz") + + if(NOT EXISTS "${archive}") + if(_VCPKG_NO_DOWNLOADS) + message(FATAL_ERROR "Downloads are disabled, but '${archive}' does not exist.") + endif() + message(STATUS "Fetching ${arg_URL} ${ref_to_use}...") + find_program(GIT NAMES git git.cmd) + file(MAKE_DIRECTORY "${DOWNLOADS}") + # Note: git init is safe to run multiple times + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND "${GIT}" init "${git_working_directory}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" + LOGNAME "git-init-${TARGET_TRIPLET}" + ) + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND "${GIT}" fetch "${arg_URL}" "${ref_to_use}" ${git_fetch_shallow_param} -n + WORKING_DIRECTORY "${git_working_directory}" + LOGNAME "git-fetch-${TARGET_TRIPLET}" + ) + + if(VCPKG_USE_HEAD_VERSION) + vcpkg_execute_in_download_mode( + COMMAND "${GIT}" rev-parse FETCH_HEAD + OUTPUT_VARIABLE rev_parse_ref + ERROR_VARIABLE rev_parse_ref + RESULT_VARIABLE error_code + WORKING_DIRECTORY "${git_working_directory}" + ) + if(error_code) + message(FATAL_ERROR "unable to determine FETCH_HEAD after fetching git repository") + endif() + string(STRIP "${rev_parse_ref}" rev_parse_ref) + set(VCPKG_HEAD_VERSION "${rev_parse_ref}" PARENT_SCOPE) + else() + vcpkg_execute_in_download_mode( + COMMAND "${GIT}" rev-parse "${arg_REF}" + OUTPUT_VARIABLE rev_parse_ref + ERROR_VARIABLE rev_parse_ref + RESULT_VARIABLE error_code + WORKING_DIRECTORY "${git_working_directory}" + ) + if(error_code) + message(FATAL_ERROR "unable to rev-parse ${arg_REF} after fetching git repository") + endif() + string(STRIP "${rev_parse_ref}" rev_parse_ref) + if(NOT "${rev_parse_ref}" STREQUAL "${arg_REF}") + message(FATAL_ERROR "REF (${arg_REF}) does not match rev-parse'd reference (${rev_parse_ref}) + [Expected : ( ${arg_REF} )]) + [ Actual : ( ${rev_parse_ref} )]" + ) + endif() + endif() + + file(MAKE_DIRECTORY "${DOWNLOADS}/temp") + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND "${GIT}" archive "${rev_parse_ref}" -o "${temp_archive}" + WORKING_DIRECTORY "${DOWNLOADS}/git-tmp" + LOGNAME git-archive + ) + file(RENAME "${temp_archive}" "${archive}") + else() + message(STATUS "Using cached ${archive}") endif() - file(MAKE_DIRECTORY "${DOWNLOADS}/temp") - vcpkg_execute_required_process( - COMMAND ${GIT} archive FETCH_HEAD -o "${TEMP_ARCHIVE}" - WORKING_DIRECTORY ${DOWNLOADS}/git-tmp - LOGNAME git-archive + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${archive}" + REF "${sanitized_ref}" + PATCHES ${arg_PATCHES} + NO_REMOVE_ONE_LEVEL + ${extract_working_directory_param} ) - get_filename_component(downloaded_file_dir "${ARCHIVE}" DIRECTORY) - file(MAKE_DIRECTORY "${downloaded_file_dir}") - file(RENAME "${TEMP_ARCHIVE}" "${ARCHIVE}") - else() - message(STATUS "Using cached ${ARCHIVE}") - endif() - - vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${ARCHIVE}" - REF "${SANITIZED_REF}" - PATCHES ${_vdud_PATCHES} - NO_REMOVE_ONE_LEVEL - ) - - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + set("${arg_OUT_SOURCE_PATH}" "${SOURCE_PATH}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index c0d657bbc74dd7..2dae0ba501a941 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -1,182 +1,188 @@ -## # vcpkg_from_github -## -## Download and extract a project from GitHub. Enables support for `install --head`. -## -## ## Usage: -## ```cmake -## vcpkg_from_github( -## OUT_SOURCE_PATH -## REPO -## [REF ] -## [SHA512 <45d0d7f8cc350...>] -## [HEAD_REF ] -## [PATCHES ...] -## ) -## ``` -## -## ## Parameters: -## ### OUT_SOURCE_PATH -## Specifies the out-variable that will contain the extracted location. -## -## This should be set to `SOURCE_PATH` by convention. -## -## ### REPO -## The organization or user and repository on GitHub. -## -## ### REF -## A stable git commit-ish (ideally a tag or commit) that will not change contents. **This should not be a branch.** -## -## For repositories without official releases, this can be set to the full commit id of the current latest master. -## -## If `REF` is specified, `SHA512` must also be specified. -## -## ### SHA512 -## The SHA512 hash that should match the archive (https://github.com/${REPO}/archive/${REF}.tar.gz). -## -## This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. -## -## ### HEAD_REF -## The unstable git commit-ish (ideally a branch) to pull for `--head` builds. -## -## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. -## -## ### PATCHES -## A list of patches to be applied to the extracted sources. -## -## Relative paths are based on the port directory. -## -## ## Notes: -## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. -## -## This exports the `VCPKG_HEAD_VERSION` variable during head builds. -## -## ## Examples: -## -## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) -## * [ms-gsl](https://github.com/Microsoft/vcpkg/blob/master/ports/ms-gsl/portfile.cmake) -## * [beast](https://github.com/Microsoft/vcpkg/blob/master/ports/beast/portfile.cmake) +#[===[.md: +# vcpkg_from_github + +Download and extract a project from GitHub. Enables support for `install --head`. + +## Usage: +```cmake +vcpkg_from_github( + OUT_SOURCE_PATH + REPO + [REF ] + [SHA512 <45d0d7f8cc350...>] + [HEAD_REF ] + [PATCHES ...] + [GITHUB_HOST ] + [AUTHORIZATION_TOKEN <${SECRET_FROM_FILE}>] + [FILE_DISAMBIGUATOR ] +) +``` + +## Parameters: +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### REPO +The organization or user and repository on GitHub. + +### REF +A stable git commit-ish (ideally a tag or commit) that will not change contents. **This should not be a branch.** + +For repositories without official releases, this can be set to the full commit id of the current latest master. + +If `REF` is specified, `SHA512` must also be specified. + +### SHA512 +The SHA512 hash that should match the archive (https://github.com/${REPO}/archive/${REF}.tar.gz). + +This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. + +### HEAD_REF +The unstable git commit-ish (ideally a branch) to pull for `--head` builds. + +For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. + +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + +### GITHUB_HOST +A replacement host for enterprise GitHub instances. + +This field should contain the scheme, host, and port of the desired URL without a trailing slash. + +### AUTHORIZATION_TOKEN +A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}". + +### FILE_DISAMBIGUATOR +A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name. + +## Notes: +At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. + +This exports the `VCPKG_HEAD_VERSION` variable during head builds. + +## Examples: + +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [ms-gsl](https://github.com/Microsoft/vcpkg/blob/master/ports/ms-gsl/portfile.cmake) +* [boost-beast](https://github.com/Microsoft/vcpkg/blob/master/ports/boost-beast/portfile.cmake) +#]===] + function(vcpkg_from_github) - set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF) - set(multipleValuesArgs PATCHES) - cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + cmake_parse_arguments(PARSE_ARGV 0 "arg" + "" + "OUT_SOURCE_PATH;REPO;REF;SHA512;HEAD_REF;GITHUB_HOST;AUTHORIZATION_TOKEN;FILE_DISAMBIGUATOR" + "PATCHES") - if(NOT DEFINED _vdud_OUT_SOURCE_PATH) - message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "vcpkg_from_github was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") endif() - if((DEFINED _vdud_REF AND NOT DEFINED _vdud_SHA512) OR (NOT DEFINED _vdud_REF AND DEFINED _vdud_SHA512)) + if(DEFINED arg_REF AND NOT DEFINED arg_SHA512) message(FATAL_ERROR "SHA512 must be specified if REF is specified.") endif() + if(NOT DEFINED arg_REF AND DEFINED arg_SHA512) + message(FATAL_ERROR "REF must be specified if SHA512 is specified.") + endif() - if(NOT DEFINED _vdud_REPO) + if(NOT DEFINED arg_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + if(NOT DEFINED arg_REPO) message(FATAL_ERROR "The GitHub repository must be specified.") endif() - if(NOT DEFINED _vdud_REF AND NOT DEFINED _vdud_HEAD_REF) - message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.") + if(NOT DEFINED arg_GITHUB_HOST) + set(github_host "https://github.com") + set(github_api_url "https://api.github.com") + else() + set(github_host "${arg_GITHUB_HOST}") + set(github_api_url "${arg_GITHUB_HOST}/api/v3") endif() - string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO}) - string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) - - macro(set_TEMP_SOURCE_PATH BASE BASEREF) - set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${BASEREF}") - if(NOT EXISTS ${TEMP_SOURCE_PATH}) - # Sometimes GitHub strips a leading 'v' off the REF. - string(REGEX REPLACE "^v" "" REF ${BASEREF}) - string(REPLACE "/" "-" REF ${REF}) - set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") - if(NOT EXISTS ${TEMP_SOURCE_PATH}) - message(FATAL_ERROR "Could not determine source path: '${BASE}/${REPO_NAME}-${BASEREF}' does not exist") - endif() - endif() - endmacro() - - if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF) - message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") - set(VCPKG_USE_HEAD_VERSION OFF) + set(headers_param "") + if(DEFINED arg_AUTHORIZATION_TOKEN) + set(headers_param "HEADERS" "Authorization: token ${arg_AUTHORIZATION_TOKEN}") endif() - # Handle --no-head scenarios - if(NOT VCPKG_USE_HEAD_VERSION) - if(NOT _vdud_REF) - message(FATAL_ERROR "Package does not specify REF. It must built using --head.") - endif() - - string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") - - vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/${ORG_NAME}/${REPO_NAME}/archive/${_vdud_REF}.tar.gz" - SHA512 "${_vdud_SHA512}" - FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" - ) - vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${ARCHIVE}" - REF "${SANITIZED_REF}" - PATCHES ${_vdud_PATCHES} - ) - - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - return() + if(NOT DEFINED arg_REF AND NOT DEFINED arg_HEAD_REF) + message(FATAL_ERROR "At least one of REF or HEAD_REF must be specified.") endif() - # The following is for --head scenarios - set(URL "https://github.com/${ORG_NAME}/${REPO_NAME}/archive/${_vdud_HEAD_REF}.tar.gz") - string(REPLACE "/" "-" SANITIZED_HEAD_REF "${_vdud_HEAD_REF}") - set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${SANITIZED_HEAD_REF}.tar.gz") - set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") - - if(_VCPKG_NO_DOWNLOADS) - if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) - message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") - endif() - message(STATUS "Using cached ${downloaded_file_path}") - else() - if(EXISTS ${downloaded_file_path}) - message(STATUS "Purging cached ${downloaded_file_path} to fetch latest (use --no-downloads to suppress)") - file(REMOVE ${downloaded_file_path}) - endif() - if(EXISTS ${downloaded_file_path}.version) - file(REMOVE ${downloaded_file_path}.version) - endif() - if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/head) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/head) + if(NOT arg_REPO MATCHES "^([^/]*)/([^/]*)$") + message(FATAL_ERROR "REPO (${arg_REPO}) is not a valid repo name: + must be an organization name followed by a repository name separated by a single slash.") + endif() + set(org_name "${CMAKE_MATCH_1}") + set(repo_name "${CMAKE_MATCH_2}") + + set(redownload_param "") + set(working_directory_param "") + set(sha512_param "SHA512" "${arg_SHA512}") + set(ref_to_use "${arg_REF}") + if(VCPKG_USE_HEAD_VERSION) + if(DEFINED arg_HEAD_REF) + set(redownload_param "ALWAYS_REDOWNLOAD") + set(sha512_param "SKIP_SHA512") + set(working_directory_param "WORKING_DIRECTORY" "${CURRENT_BUILDTREES_DIR}/src/head") + set(ref_to_use "${arg_HEAD_REF}") + else() + message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") endif() + elseif(NOT DEFINED arg_REF) + message(FATAL_ERROR "Package does not specify REF. It must be built using --head.") + endif() - # Try to download the file and version information from github. - vcpkg_download_distfile(ARCHIVE_VERSION - URLS "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" - FILENAME ${downloaded_file_name}.version - SKIP_SHA512 - ) - - vcpkg_download_distfile(ARCHIVE - URLS ${URL} - FILENAME ${downloaded_file_name} - SKIP_SHA512 - ) + # avoid using either - or _, to allow both `foo/bar` and `foo-bar` to coexist + # we assume that no one will name a ref "foo_-bar" + string(REPLACE "/" "_-" sanitized_ref "${ref_to_use}") + if(DEFINED arg_FILE_DISAMBIGUATOR AND NOT VCPKG_USE_HEAD_VERSION) + set(downloaded_file_name "${org_name}-${repo_name}-${sanitized_ref}-${arg_FILE_DISAMBIGUATOR}.tar.gz") + else() + set(downloaded_file_name "${org_name}-${repo_name}-${sanitized_ref}.tar.gz") endif() - # Parse the github refs response with regex. - # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${downloaded_file_path}.version" _contents) - string(REGEX MATCH "\"sha\": \"[a-f0-9]+\"" x "${_contents}") - string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x}) # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. - # When multiple vcpkg_from_github's are used after each other, only use the version from the first (hopefully the primary one). - if(NOT DEFINED VCPKG_HEAD_VERSION) - set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + if(VCPKG_USE_HEAD_VERSION) + vcpkg_download_distfile(archive_version + URLS "${github_api_url}/repos/${org_name}/${repo_name}/git/refs/heads/${arg_HEAD_REF}" + FILENAME "${downloaded_file_name}.version" + ${headers_param} + SKIP_SHA512 + ALWAYS_REDOWNLOAD + ) + # Parse the github refs response with regex. + # TODO: add json-pointer support to vcpkg + file(READ "${archive_version}" version_contents) + if(NOT version_contents MATCHES [["sha":"([a-f0-9]+)"]]) + message(FATAL_ERROR "Failed to parse API response from '${version_url}': + +${version_contents} +") + endif() + set(VCPKG_HEAD_VERSION "${CMAKE_MATCH_1}" PARENT_SCOPE) endif() + # Try to download the file information from github + vcpkg_download_distfile(archive + URLS "${github_host}/${org_name}/${repo_name}/archive/${ref_to_use}.tar.gz" + FILENAME "${downloaded_file_name}" + ${headers_param} + ${sha512_param} + ${redownload_param} + ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${downloaded_file_path}" - REF "${SANITIZED_HEAD_REF}" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/head - PATCHES ${_vdud_PATCHES} + ARCHIVE "${archive}" + REF "${sanitized_ref}" + PATCHES ${arg_PATCHES} + ${working_directory_param} ) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + set("${arg_OUT_SOURCE_PATH}" "${SOURCE_PATH}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_from_gitlab.cmake b/scripts/cmake/vcpkg_from_gitlab.cmake index 6bbe81ed661621..e091ca5c084a37 100644 --- a/scripts/cmake/vcpkg_from_gitlab.cmake +++ b/scripts/cmake/vcpkg_from_gitlab.cmake @@ -1,173 +1,189 @@ -## # vcpkg_from_gitlab -## -## Download and extract a project from Gitlab instances. Enables support for `install --head`. -## -## ## Usage: -## ```cmake -## vcpkg_from_gitlab( -## GITLAB_URL -## OUT_SOURCE_PATH -## REPO -## [REF ] -## [SHA512 <45d0d7f8cc350...>] -## [HEAD_REF ] -## [PATCHES ...] -## ) -## ``` -## -## ## Parameters: -## -## ### GITLAB_URL -## The URL of the Gitlab instance to use. -## -## ### OUT_SOURCE_PATH -## Specifies the out-variable that will contain the extracted location. -## -## This should be set to `SOURCE_PATH` by convention. -## -## ### REPO -## The organization or user plus the repository name on the Gitlab instance. -## -## ### REF -## A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.** -## -## For repositories without official releases, this can be set to the full commit id of the current latest master. -## -## If `REF` is specified, `SHA512` must also be specified. -## -## ### SHA512 -## The SHA512 hash that should match the archive (${GITLAB_URL}/${REPO}/-/archive/${REF}/${REPO_NAME}-${REF}.tar.gz). -## The REPO_NAME variable is parsed from the value of REPO. -## -## This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. -## -## ### HEAD_REF -## The unstable git commit-ish (ideally a branch) to pull for `--head` builds. -## -## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. -## -## ### PATCHES -## A list of patches to be applied to the extracted sources. -## -## Relative paths are based on the port directory. -## -## ## Notes: -## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. -## -## This exports the `VCPKG_HEAD_VERSION` variable during head builds. -## -## ## Examples: -## * [curl][https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake#L75] -## * [folly](https://github.com/Microsoft/vcpkg/blob/master/ports/folly/portfile.cmake#L15) -## * [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) -## +#[===[.md: +# vcpkg_from_gitlab + +Download and extract a project from Gitlab instances. Enables support for `install --head`. + +## Usage: +```cmake +vcpkg_from_gitlab( + GITLAB_URL + OUT_SOURCE_PATH + REPO + [REF ] + [SHA512 <45d0d7f8cc350...>] + [HEAD_REF ] + [PATCHES ...] + [FILE_DISAMBIGUATOR ] +) +``` + +## Parameters: + +### GITLAB_URL +The URL of the Gitlab instance to use. + +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### REPO +The organization or user plus the repository name on the Gitlab instance. + +### REF +A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.** + +For repositories without official releases, this can be set to the full commit id of the current latest master. + +If `REF` is specified, `SHA512` must also be specified. + +### SHA512 +The SHA512 hash that should match the archive (${GITLAB_URL}/${REPO}/-/archive/${REF}/${REPO_NAME}-${REF}.tar.gz). +The REPO_NAME variable is parsed from the value of REPO. + +This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. + +### HEAD_REF +The unstable git commit-ish (ideally a branch) to pull for `--head` builds. + +For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. + +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + +### FILE_DISAMBIGUATOR +A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name. + +## Notes: +At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. + +This exports the `VCPKG_HEAD_VERSION` variable during head builds. + +## Examples: +* [curl][https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake#L75] +* [folly](https://github.com/Microsoft/vcpkg/blob/master/ports/folly/portfile.cmake#L15) +* [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) +#]===] + +include(vcpkg_execute_in_download_mode) + function(vcpkg_from_gitlab) - set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF) - set(multipleValuesArgs PATCHES) - cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + cmake_parse_arguments(PARSE_ARGV 0 "arg" + "" + "OUT_SOURCE_PATH;GITLAB_URL;REPO;REF;SHA512;HEAD_REF;FILE_DISAMBIGUATOR" + "PATCHES") - if(NOT DEFINED _vdud_GITLAB_URL) - message(FATAL_ERROR "GITLAB_URL must be specified.") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "vcpkg_from_gitlab was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") endif() - if(NOT DEFINED _vdud_OUT_SOURCE_PATH) - message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + if(NOT DEFINED arg_GITLAB_URL) + message(FATAL_ERROR "GITLAB_URL must be specified.") endif() - if((DEFINED _vdud_REF AND NOT DEFINED _vdud_SHA512) OR (NOT DEFINED _vdud_REF AND DEFINED _vdud_SHA512)) + if(DEFINED arg_REF AND NOT DEFINED arg_SHA512) message(FATAL_ERROR "SHA512 must be specified if REF is specified.") endif() + if(NOT DEFINED arg_REF AND DEFINED arg_SHA512) + message(FATAL_ERROR "REF must be specified if SHA512 is specified.") + endif() - if(NOT DEFINED _vdud_REPO) - message(FATAL_ERROR "REPO must be specified.") + if(NOT DEFINED arg_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + if(NOT DEFINED arg_REPO) + message(FATAL_ERROR "The GitHub repository must be specified.") endif() - if(NOT DEFINED _vdud_REF AND NOT DEFINED _vdud_HEAD_REF) - message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.") + set(headers_param "") + if(DEFINED arg_AUTHORIZATION_TOKEN) + set(headers_param "HEADERS" "Authorization: token ${arg_AUTHORIZATION_TOKEN}") endif() - if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF) - message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") - set(VCPKG_USE_HEAD_VERSION OFF) + if(NOT DEFINED arg_REF AND NOT DEFINED arg_HEAD_REF) + message(FATAL_ERROR "At least one of REF or HEAD_REF must be specified.") endif() - string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO}) - string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) + if(arg_REPO MATCHES [[^([^/]*)/([^/]*)$]]) # 2 elements + set(org_name "${CMAKE_MATCH_1}") + set(repo_name "${CMAKE_MATCH_2}") + set(gitlab_link "${arg_GITLAB_URL}/${org_name}/${repo_name}") + elseif(arg_REPO MATCHES [[^([^/]*)/([^/]*)/([^/]*)$]]) # 3 elements + set(org_name "${CMAKE_MATCH_1}") + set(group_name "${CMAKE_MATCH_2}") + set(repo_name "${CMAKE_MATCH_3}") + set(gitlab_link "${arg_GITLAB_URL}/${org_name}/${group_name}/${repo_name}") + else() + message(FATAL_ERROR "REPO (${arg_REPO}) is not a valid repo name. It must be: + - an organization name followed by a repository name separated by a single slash, or + - an organization name, group name, and repository name separated by slashes.") + endif() - # Handle --no-head scenarios - if(NOT VCPKG_USE_HEAD_VERSION) - if(NOT _vdud_REF) - message(FATAL_ERROR "Package does not specify REF. It must built using --head.") + set(redownload_param "") + set(working_directory_param "") + set(sha512_param "SHA512" "${arg_SHA512}") + set(ref_to_use "${arg_REF}") + if(VCPKG_USE_HEAD_VERSION) + if(DEFINED arg_HEAD_REF) + set(redownload_param "ALWAYS_REDOWNLOAD") + set(sha512_param "SKIP_SHA512") + set(working_directory_param "WORKING_DIRECTORY" "${CURRENT_BUILDTREES_DIR}/src/head") + set(ref_to_use "${arg_HEAD_REF}") + else() + message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") endif() + elseif(NOT DEFINED arg_REF) + message(FATAL_ERROR "Package does not specify REF. It must be built using --head.") + endif() - string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") - - vcpkg_download_distfile(ARCHIVE - URLS "${_vdud_GITLAB_URL}/${ORG_NAME}/${REPO_NAME}/-/archive/${_vdud_REF}/${REPO_NAME}-${_vdud_REF}.tar.gz" - SHA512 "${_vdud_SHA512}" - FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" - ) - - vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${ARCHIVE}" - REF "${SANITIZED_REF}" - PATCHES ${_vdud_PATCHES} - ) - - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - return() + # avoid using either - or _, to allow both `foo/bar` and `foo-bar` to coexist + # we assume that no one will name a ref "foo_-bar" + string(REPLACE "/" "_-" sanitized_ref "${ref_to_use}") + if(DEFINED arg_FILE_DISAMBIGUATOR AND NOT VCPKG_USE_HEAD_VERSION) + set(downloaded_file_name "${org_name}-${repo_name}-${sanitized_ref}-${arg_FILE_DISAMBIGUATOR}.tar.gz") + else() + set(downloaded_file_name "${org_name}-${repo_name}-${sanitized_ref}.tar.gz") endif() - # The following is for --head scenarios - set(URL "${_vdud_GITLAB_URL}/${ORG_NAME}/${REPO_NAME}/-/archive/${_vdud_HEAD_REF}/${_vdud_HEAD_REF}.tar.gz") - string(REPLACE "/" "-" SANITIZED_HEAD_REF "${_vdud_HEAD_REF}") - set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${SANITIZED_HEAD_REF}.tar.gz") - set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") - if(_VCPKG_NO_DOWNLOADS) - if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) - message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") - endif() - message(STATUS "Using cached ${downloaded_file_path}") - else() - if(EXISTS ${downloaded_file_path}) - message(STATUS "Purging cached ${downloaded_file_path} to fetch latest (use --no-downloads to suppress)") - file(REMOVE ${downloaded_file_path}) + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. + if(VCPKG_USE_HEAD_VERSION) + # There are issues with the Gitlab API project paths being URL-escaped, so we use git here to get the head revision + vcpkg_execute_in_download_mode(COMMAND ${GIT} ls-remote + "${gitlab_link}.git" "${arg_HEAD_REF}" + RESULT_VARIABLE git_result + OUTPUT_VARIABLE git_output + ) + if(NOT git_result EQUAL 0) + message(FATAL_ERROR "git ls-remote failed to read ref data of repository: '${gitlab_link}'") endif() - if(EXISTS ${downloaded_file_path}.version) - file(REMOVE ${downloaded_file_path}.version) + if(NOT git_output MATCHES "^([a-f0-9]*)\t") + message(FATAL_ERROR "git ls-remote returned unexpected result: +${git_output} +") endif() - if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/head) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/head) + # When multiple vcpkg_from_gitlab's are used after each other, only use the version from the first (hopefully the primary one). + if(NOT DEFINED VCPKG_HEAD_VERSION) + set(VCPKG_HEAD_VERSION "${CMAKE_MATCH_1}" PARENT_SCOPE) endif() - - vcpkg_download_distfile(ARCHIVE - URLS ${URL} - FILENAME ${downloaded_file_name} - SKIP_SHA512 - ) endif() - # There are issues with the Gitlab API project paths being URL-escaped, so we use git here to get the head revision - execute_process(COMMAND ${GIT} ls-remote - "${_vdud_GITLAB_URL}/${ORG_NAME}/${REPO_NAME}.git" "${_vdud_HEAD_REF}" - RESULT_VARIABLE _git_result - OUTPUT_VARIABLE _git_output + # download the file information from gitlab + vcpkg_download_distfile(archive + URLS "${gitlab_link}/-/archive/${ref_to_use}/${repo_name}-${ref_to_use}.tar.gz" + FILENAME "${downloaded_file_name}" + ${headers_param} + ${sha512_param} + ${redownload_param} ) - string(REGEX MATCH "[a-f0-9]+" _version "${_git_output}") - # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. - # When multiple vcpkg_from_gitlab's are used after each other, only use the version from the first (hopefully the primary one). - if(NOT DEFINED VCPKG_HEAD_VERSION) - set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) - endif() - vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${downloaded_file_path}" - REF "${SANITIZED_HEAD_REF}" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/head - PATCHES ${_vdud_PATCHES} + ARCHIVE "${archive}" + REF "${sanitized_ref}" + PATCHES ${arg_PATCHES} + ${working_directory_param} ) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + set("${arg_OUT_SOURCE_PATH}" "${SOURCE_PATH}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_from_sourceforge.cmake b/scripts/cmake/vcpkg_from_sourceforge.cmake new file mode 100644 index 00000000000000..e1226c3b10adac --- /dev/null +++ b/scripts/cmake/vcpkg_from_sourceforge.cmake @@ -0,0 +1,178 @@ +#[===[.md: +# vcpkg_from_sourceforge + +Download and extract a project from sourceforge. + +This function automatically checks a set of sourceforge mirrors. +Additional mirrors can be injected through the `VCPKG_SOURCEFORGE_EXTRA_MIRRORS` +list variable in the triplet. + +## Usage: +```cmake +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO + [REF <2.1-3>] + SHA512 <547b417109332...> + FILENAME + [DISABLE_SSL] + [NO_REMOVE_ONE_LEVEL] + [PATCHES ...] +) +``` + +## Parameters: +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### REPO +The organization or user and repository (optional) on sourceforge. + +### REF +A stable version number that will not change contents. + +### FILENAME +The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. + +For example, we can get the download link: +https://sourceforge.net/settings/mirror_choices?projectname=mad&filename=libmad/0.15.1b/libmad-0.15.1b.tar.gz&selected=nchc +So the REPO is `mad/libmad`, the REF is `0.15.1b`, and the FILENAME is `libmad-0.15.1b.tar.gz` + +For some special links: +https://sourceforge.net/settings/mirror_choices?projectname=soxr&filename=soxr-0.1.3-Source.tar.xz&selected=nchc +The REPO is `soxr`, REF is not exist, and the FILENAME is `soxr-0.1.3-Source.tar.xz` + +### SHA512 +The SHA512 hash that should match the archive. + +This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. + +### WORKING_DIRECTORY +If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. + +Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). + +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + +### NO_REMOVE_ONE_LEVEL +Specifies that the default removal of the top level folder should not occur. + +## Examples: + +* [cunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cunit/portfile.cmake) +* [polyclipping](https://github.com/Microsoft/vcpkg/blob/master/ports/polyclipping/portfile.cmake) +* [tinyfiledialogs](https://github.com/Microsoft/vcpkg/blob/master/ports/tinyfiledialogs/portfile.cmake) +#]===] + +function(vcpkg_from_sourceforge) + cmake_parse_arguments(PARSE_ARGV 0 "arg" + "DISABLE_SSL;NO_REMOVE_ONE_LEVEL" + "OUT_SOURCE_PATH;REPO;REF;SHA512;FILENAME;WORKING_DIRECTORY" + "PATCHES") + + if(NOT DEFINED arg_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + if(NOT DEFINED arg_SHA512) + message(FATAL_ERROR "SHA512 must be specified.") + endif() + if(NOT DEFINED arg_REPO) + message(FATAL_ERROR "The sourceforge repository must be specified.") + endif() + + + if(arg_DISABLE_SSL) + message(WARNING "DISABLE_SSL has been deprecated and has no effect") + endif() + + set(sourceforge_host "https://sourceforge.net/projects") + + if(arg_REPO MATCHES "^([^/]*)$") # just one element + set(org_name "${CMAKE_MATCH_1}") + set(repo_name "") + elseif(arg_REPO MATCHES "^([^/]*)/([^/]*)$") # two elements + set(org_name "${CMAKE_MATCH_1}") + set(repo_name "${CMAKE_MATCH_2}") + else() + message(FATAL_ERROR "REPO (${arg_REPO}) is not a valid repo name. It must be: + - an organization name without any slashes, or + - an organization name followed by a repository name separated by a single slash") + endif() + + if(DEFINED arg_REF) + set(url "${sourceforge_host}/${org_name}/files/${repo_name}/${arg_REF}/${arg_FILENAME}") + elseif(DEFINED repo_name) + set(url "${sourceforge_host}/${org_name}/${repo_name}/files/${arg_FILENAME}") + else() + set(url "${sourceforge_host}/${org_name}/files/${arg_FILENAME}") + endif() + + string(SUBSTRING "${arg_SHA512}" 0 10 sanitized_ref) + + set(sourceforge_mirrors + cfhcable # United States + pilotfiber # New York, NY + gigenet # Chicago, IL + versaweb # Las Vegas, NV + ayera # Modesto, CA + netactuate # Durham, NC + phoenixnap # Tempe, AZ + astuteinternet # Vancouver, BC + freefr # Paris, France + netcologne # Cologne, Germany + deac-riga # Latvia + excellmedia # Hyderabad, India + iweb # Montreal, QC + jaist # Nomi, Japan + jztkft # Mezotur, Hungary + managedway # Detroit, MI + nchc # Taipei, Taiwan + netix # Bulgaria + ufpr # Curitiba, Brazil + tenet # Wynberg, South Africa + ) + if(DEFINED SOURCEFORGE_MIRRORS AND NOT DEFINED VCPKG_SOURCEFORGE_EXTRA_MIRRORS) + message(WARNING "Extension point SOURCEFORGE_MIRRORS has been deprecated. + Please use the replacement VCPKG_SOURCEFORGE_EXTRA_MIRRORS variable instead.") + list(APPEND sourceforge_mirrors "${SOURCEFORGE_MIRRORS}") + list(REMOVE_DUPLICATES sourceforge_mirrors) + elseif(DEFINED VCPKG_SOURCEFORGE_EXTRA_MIRRORS) + list(APPEND sourceforge_mirrors "${VCPKG_SOURCEFORGE_EXTRA_MIRRORS}") + list(REMOVE_DUPLICATES sourceforge_mirrors) + endif() + + set(all_urls "${url}/download") + foreach(mirror IN LISTS sourceforge_mirrors) + list(APPEND all_urls "${url}/download?use_mirror=${mirror}") + endforeach() + + vcpkg_download_distfile(ARCHIVE + URLS ${all_urls} + SHA512 "${arg_SHA512}" + FILENAME "${arg_FILENAME}" + ) + + set(no_remove_one_level_param "") + set(working_directory_param "") + if(arg_NO_REMOVE_ONE_LEVEL) + set(no_remove_one_level_param "NO_REMOVE_ONE_LEVEL") + endif() + if(DEFINED arg_WORKING_DIRECTORY) + set(working_directory_param "WORKING_DIRECTORY" "${arg_WORKING_DIRECTORY}") + endif() + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${sanitized_ref}" + ${no_remove_one_level_param} + ${working_directory_param} + PATCHES ${arg_PATCHES} + ) + + set("${arg_OUT_SOURCE_PATH}" "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() diff --git a/scripts/cmake/vcpkg_get_program_files_32_bit.cmake b/scripts/cmake/vcpkg_get_program_files_32_bit.cmake deleted file mode 100644 index 6f434547399c6b..00000000000000 --- a/scripts/cmake/vcpkg_get_program_files_32_bit.cmake +++ /dev/null @@ -1,10 +0,0 @@ -function(vcpkg_get_program_files_32_bit ret) - - set(ret_temp $ENV{ProgramFiles\(X86\)}) - if (NOT DEFINED ret_temp) - set(ret_temp $ENV{PROGRAMFILES}) - endif() - - set(${ret} ${ret_temp} PARENT_SCOPE) - -endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake b/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake index ed51b74010ab0f..b40b24c42d2497 100644 --- a/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake +++ b/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake @@ -1,10 +1,20 @@ -function(vcpkg_get_program_files_platform_bitness ret) +#[===[.md: +# vcpkg_get_program_files_platform_bitness - set(ret_temp $ENV{ProgramW6432}) - if (NOT DEFINED ret_temp) - set(ret_temp $ENV{PROGRAMFILES}) - endif() +Get the Program Files directory of the current platform's bitness: +either `$ENV{ProgramW6432}` on 64-bit windows, +or `$ENV{PROGRAMFILES}` on 32-bit windows. - set(${ret} ${ret_temp} PARENT_SCOPE) +## Usage: +```cmake +vcpkg_get_program_files_platform_bitness() +``` +#]===] -endfunction() \ No newline at end of file +function(vcpkg_get_program_files_platform_bitness out_var) + if(DEFINED ENV{ProgramW6432}) + set("${out_var}" "$ENV{ProgramW6432}" PARENT_SCOPE) + else() + set("${out_var}" "$ENV{PROGRAMFILES}" PARENT_SCOPE) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index e7d72a1252890b..0a80d4c76c3706 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -1,6 +1,18 @@ -# Returns Windows SDK number via out variable "ret" -function(vcpkg_get_windows_sdk ret) - set(WINDOWS_SDK $ENV{WindowsSDKVersion}) - string(REPLACE "\\" "" WINDOWS_SDK "${WINDOWS_SDK}") - set(${ret} ${WINDOWS_SDK} PARENT_SCOPE) -endfunction() \ No newline at end of file +#[===[.md: +# vcpkg_get_windows_sdk + +Get the Windows SDK number. + +## Usage: +```cmake +vcpkg_get_windows_sdk() +``` +#]===] + +function(vcpkg_get_windows_sdk out_var) + if("$ENV{WindowsSDKVersion}" MATCHES [[^([0-9.]*)\\?$]]) + set("${out_var}" "${CMAKE_MATCH_1}" PARENT_SCOPE) + else() + message(FATAL_ERROR "Unexpected format for ENV{WindowsSDKVersion} ($ENV{WindowsSDKVersion})") + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake index ab72d054e4f93a..b94a3a4846448e 100644 --- a/scripts/cmake/vcpkg_install_cmake.cmake +++ b/scripts/cmake/vcpkg_install_cmake.cmake @@ -1,25 +1,49 @@ -## # vcpkg_install_cmake -## -## Build and install a cmake project. -## -## ## Usage: -## ```cmake -## vcpkg_install_cmake(...) -## ``` -## -## ## Parameters: -## See [`vcpkg_build_cmake()`](vcpkg_build_cmake.md). -## -## ## Notes: -## This command transparently forwards to [`vcpkg_build_cmake()`](vcpkg_build_cmake.md), adding a `TARGET install` -## parameter. -## -## ## Examples: -## -## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) -## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) -## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) -## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +# DEPRECATED BY ports/vcpkg-cmake/vcpkg_cmake_install +#[===[.md: +# vcpkg_install_cmake + +Build and install a cmake project. + +## Usage: +```cmake +vcpkg_install_cmake(...) +``` + +## Parameters: +See [`vcpkg_build_cmake()`](vcpkg_build_cmake.md). + +## Notes: +This command transparently forwards to [`vcpkg_build_cmake()`](vcpkg_build_cmake.md), adding a `TARGET install` +parameter. + +## Examples: + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +#]===] + function(vcpkg_install_cmake) - vcpkg_build_cmake(LOGFILE_ROOT install TARGET install ${ARGN}) + if(Z_VCPKG_CMAKE_INSTALL_GUARD) + message(FATAL_ERROR "The ${PORT} port already depends on vcpkg-cmake; using both vcpkg-cmake and vcpkg_install_cmake in the same port is unsupported.") + endif() + + cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "" "") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_cmake_install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + set(args) + foreach(arg IN ITEMS DISABLE_PARALLEL ADD_BIN_TO_PATH) + if(arg_${arg}) + list(APPEND args "${arg}") + endif() + endforeach() + + vcpkg_build_cmake(Z_VCPKG_DISABLE_DEPRECATION MESSAGE + ${args} + LOGFILE_ROOT install + TARGET install + ) endfunction() diff --git a/scripts/cmake/vcpkg_install_gn.cmake b/scripts/cmake/vcpkg_install_gn.cmake new file mode 100644 index 00000000000000..ac16fac1432895 --- /dev/null +++ b/scripts/cmake/vcpkg_install_gn.cmake @@ -0,0 +1,140 @@ +#[===[.md: +# vcpkg_install_gn + +Installs a GN project. + +In order to build a GN project without installing, use [`vcpkg_build_ninja()`]. + +## Usage: +```cmake +vcpkg_install_gn( + SOURCE_PATH + [TARGETS ...] +) +``` + +## Parameters: +### SOURCE_PATH +The path to the source directory + +### TARGETS +Only install the specified targets. + +Note: includes must be handled separately + +[`vcpkg_build_ninja()`]: vcpkg_build_ninja.md +#]===] + +function(z_vcpkg_install_gn_get_target_type out_var) + cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "SOURCE_PATH;BUILD_DIR;TARGET" "") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Internal error: get_target_type was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + execute_process( + COMMAND "${GN}" desc "${arg_BUILD_DIR}" "${arg_TARGET}" + WORKING_DIRECTORY "${arg_SOURCE_PATH}" + OUTPUT_VARIABLE output + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(output MATCHES [[type: ([A-Za-z0-9_]+)]]) + set("${out_var}" "${CMAKE_MATCH_1}" PARENT_SCOPE) + else() + message(FATAL_ERROR "invalid result from `gn desc`: ${output}") + endif() +endfunction() + +function(z_vcpkg_install_gn_get_desc out_var) + cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "SOURCE_PATH;BUILD_DIR;TARGET;WHAT_TO_DISPLAY" "") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Internal error: get_desc was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + execute_process( + COMMAND "${GN}" desc "${arg_BUILD_DIR}" "${arg_TARGET}" "${arg_WHAT_TO_DISPLAY}" + WORKING_DIRECTORY "${arg_SOURCE_PATH}" + OUTPUT_VARIABLE output + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(REPLACE ";" "\\;" output "${output}") + string(REGEX REPLACE "\n|(\r\n)" ";" output "${output}") + set("${out_var}" "${output}" PARENT_SCOPE) +endfunction() + +function(z_vcpkg_install_gn_install) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "" "SOURCE_PATH;BUILD_DIR;INSTALL_DIR" "TARGETS") + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Internal error: install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + foreach(target IN LISTS arg_TARGETS) + # GN targets must start with a // + z_vcpkg_install_gn_get_desc(outputs + SOURCE_PATH "${arg_SOURCE_PATH}" + BUILD_DIR "${arg_BUILD_DIR}" + TARGET "//${target}" + WHAT_TO_DISPLAY outputs + ) + z_vcpkg_install_gn_get_target_type(target_type + SOURCE_PATH "${arg_SOURCE_PATH}" + BUILD_DIR "${arg_BUILD_DIR}" + TARGET "//${target}" + ) + + foreach(output IN LISTS outputs) + if(output MATCHES "^//") + # relative path (e.g. //out/Release/target.lib) + string(REGEX REPLACE "^//" "${arg_SOURCE_PATH}/" output "${output}") + elseif(output MATCHES "^/" AND CMAKE_HOST_WIN32) + # absolute path (e.g. /C:/path/to/target.lib) + string(REGEX REPLACE "^/" "" output "${output}") + endif() + + if(NOT EXISTS "${output}") + message(WARNING "Output for target `${target}` doesn't exist: ${output}.") + continue() + endif() + + if(target_type STREQUAL "executable") + file(INSTALL "${output}" DESTINATION "${arg_INSTALL_DIR}/tools") + elseif(output MATCHES "(\\.dll|\\.pdb)$") + file(INSTALL "${output}" DESTINATION "${arg_INSTALL_DIR}/bin") + else() + file(INSTALL "${output}" DESTINATION "${arg_INSTALL_DIR}/lib") + endif() + endforeach() + endforeach() +endfunction() + +function(vcpkg_install_gn) + cmake_parse_arguments(PARSE_ARGV 0 arg "" "SOURCE_PATH" "TARGETS") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "vcpkg_install_gn was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + if(NOT DEFINED arg_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH must be specified.") + endif() + + vcpkg_build_ninja(TARGETS ${arg_TARGETS}) + + vcpkg_find_acquire_program(GN) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + z_vcpkg_install_gn_install( + SOURCE_PATH "${arg_SOURCE_PATH}" + BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + INSTALL_DIR "${CURRENT_PACKAGES_DIR}/debug" + TARGETS ${arg_TARGETS} + ) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + z_vcpkg_install_gn_install( + SOURCE_PATH "${arg_SOURCE_PATH}" + BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + INSTALL_DIR "${CURRENT_PACKAGES_DIR}" + TARGETS ${arg_TARGETS} + ) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_install_make.cmake b/scripts/cmake/vcpkg_install_make.cmake new file mode 100644 index 00000000000000..ce8a782d3c5953 --- /dev/null +++ b/scripts/cmake/vcpkg_install_make.cmake @@ -0,0 +1,27 @@ +#[===[.md: +# vcpkg_install_make + +Build and install a make project. + +## Usage: +```cmake +vcpkg_install_make(...) +``` + +## Parameters: +See [`vcpkg_build_make()`](vcpkg_build_make.md). + +## Notes: +This command transparently forwards to [`vcpkg_build_make()`](vcpkg_build_make.md), adding `ENABLE_INSTALL` + +## Examples + +* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake) +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +* [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) +#]===] + +function(vcpkg_install_make) + vcpkg_build_make(${ARGN} LOGFILE_ROOT ENABLE_INSTALL) +endfunction() diff --git a/scripts/cmake/vcpkg_install_meson.cmake b/scripts/cmake/vcpkg_install_meson.cmake index 7ab9d55b3bf41d..3e89b457e20769 100644 --- a/scripts/cmake/vcpkg_install_meson.cmake +++ b/scripts/cmake/vcpkg_install_meson.cmake @@ -1,21 +1,105 @@ -function(vcpkg_install_meson) +#[===[.md: +# vcpkg_install_meson - vcpkg_find_acquire_program(NINJA) +Builds a meson project previously configured with `vcpkg_configure_meson()`. + +## Usage +```cmake +vcpkg_install_meson([ADD_BIN_TO_PATH]) +``` + +## Parameters: +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + +## Examples + +* [fribidi](https://github.com/Microsoft/vcpkg/blob/master/ports/fribidi/portfile.cmake) +* [libepoxy](https://github.com/Microsoft/vcpkg/blob/master/ports/libepoxy/portfile.cmake) +#]===] +function(vcpkg_install_meson) + vcpkg_find_acquire_program(NINJA) unset(ENV{DESTDIR}) # installation directory was already specified with '--prefix' option + cmake_parse_arguments(PARSE_ARGV 0 _im "ADD_BIN_TO_PATH" "" "") + + if(VCPKG_TARGET_IS_OSX) + if(DEFINED ENV{SDKROOT}) + set(_VCPKG_ENV_SDKROOT_BACKUP $ENV{SDKROOT}) + endif() + set(ENV{SDKROOT} "${VCPKG_DETECTED_CMAKE_OSX_SYSROOT}") + + if(DEFINED ENV{MACOSX_DEPLOYMENT_TARGET}) + set(_VCPKG_ENV_MACOSX_DEPLOYMENT_TARGET_BACKUP $ENV{MACOSX_DEPLOYMENT_TARGET}) + endif() + set(ENV{MACOSX_DEPLOYMENT_TARGET} "${VCPKG_DETECTED_CMAKE_OSX_DEPLOYMENT_TARGET}") + endif() + + foreach(BUILDTYPE "debug" "release") + if(DEFINED VCPKG_BUILD_TYPE AND NOT VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) + continue() + endif() + + if(BUILDTYPE STREQUAL "debug") + set(SHORT_BUILDTYPE "dbg") + else() + set(SHORT_BUILDTYPE "rel") + endif() - message(STATUS "Package ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${NINJA} install -v - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME package-${TARGET_TRIPLET}-rel - ) + message(STATUS "Package ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") + if(_im_ADD_BIN_TO_PATH) + set(_BACKUP_ENV_PATH "$ENV{PATH}") + if(BUILDTYPE STREQUAL "debug") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") + else() + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") + endif() + endif() + vcpkg_execute_required_process( + COMMAND ${NINJA} install -v + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE} + LOGNAME package-${TARGET_TRIPLET}-${SHORT_BUILDTYPE} + ) + if(_im_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") + endif() + endforeach() - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${NINJA} install -v - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) + set(RENAMED_LIBS "") + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL static AND NOT VCPKG_TARGET_IS_MINGW) + # Meson names all static libraries lib.a which basically breaks the world + file(GLOB_RECURSE LIBRARIES "${CURRENT_PACKAGES_DIR}*/**/lib*.a") + foreach(_library IN LISTS LIBRARIES) + get_filename_component(LIBDIR "${_library}" DIRECTORY ) + get_filename_component(LIBNAME "${_library}" NAME) + string(REGEX REPLACE ".a$" ".lib" LIBNAMENEW "${LIBNAME}") + string(REGEX REPLACE "^lib" "" LIBNAMENEW "${LIBNAMENEW}") + file(RENAME "${_library}" "${LIBDIR}/${LIBNAMENEW}") + # For cmake fixes. + string(REGEX REPLACE ".a$" "" LIBRAWNAMEOLD "${LIBNAME}") + string(REGEX REPLACE ".lib$" "" LIBRAWNAMENEW "${LIBNAMENEW}") + list(APPEND RENAMED_LIBS ${LIBRAWNAMENEW}) + set(${LIBRAWNAME}_OLD ${LIBRAWNAMEOLD}) + set(${LIBRAWNAME}_NEW ${LIBRAWNAMENEW}) + endforeach() + file(GLOB_RECURSE CMAKE_FILES "${CURRENT_PACKAGES_DIR}*/*.cmake") + foreach(_cmake IN LISTS CMAKE_FILES) + foreach(_lib IN LISTS RENAMED_LIBS) + vcpkg_replace_string("${_cmake}" "${${_lib}_OLD}" "${${_lib}_NEW}") + endforeach() + endforeach() + endif() + if(VCPKG_TARGET_IS_OSX) + if(DEFINED _VCPKG_ENV_SDKROOT_BACKUP) + set(ENV{SDKROOT} "${_VCPKG_ENV_SDKROOT_BACKUP}") + else() + unset(ENV{SDKROOT}) + endif() + if(DEFINED _VCPKG_ENV_MACOSX_DEPLOYMENT_TARGET_BACKUP) + set(ENV{MACOSX_DEPLOYMENT_TARGET} "${_VCPKG_ENV_MACOSX_DEPLOYMENT_TARGET_BACKUP}") + else() + unset(ENV{MACOSX_DEPLOYMENT_TARGET}) + endif() + endif() endfunction() diff --git a/scripts/cmake/vcpkg_install_msbuild.cmake b/scripts/cmake/vcpkg_install_msbuild.cmake index 92c84bf0b55438..a6b9ec9c2973fd 100644 --- a/scripts/cmake/vcpkg_install_msbuild.cmake +++ b/scripts/cmake/vcpkg_install_msbuild.cmake @@ -1,226 +1,245 @@ -## # vcpkg_install_msbuild -## -## Build and install a msbuild-based project. This replaces `vcpkg_build_msbuild()`. -## -## ## Usage -## ```cmake -## vcpkg_install_msbuild( -## SOURCE_PATH <${SOURCE_PATH}> -## PROJECT_SUBPATH -## [INCLUDES_SUBPATH ] -## [LICENSE_SUBPATH ] -## [RELEASE_CONFIGURATION ] -## [DEBUG_CONFIGURATION ] -## [TARGET ] -## [TARGET_PLATFORM_VERSION <10.0.15063.0>] -## [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] -## [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] -## [OPTIONS ...] -## [OPTIONS_RELEASE ...] -## [OPTIONS_DEBUG ...] -## [USE_VCPKG_INTEGRATION] -## [ALLOW_ROOT_INCLUDES | REMOVE_ROOT_INCLUDES] -## ) -## ``` -## -## ## Parameters -## ### SOURCE_PATH -## The path to the root of the source tree. -## -## Because MSBuild uses in-source builds, the source tree will be copied into a temporary location for the build. This -## parameter is the base for that copy and forms the base for all XYZ_SUBPATH options. -## -## ### USE_VCPKG_INTEGRATION -## Apply the normal `integrate install` integration for building the project. -## -## By default, projects built with this command will not automatically link libraries or have header paths set. -## -## ### PROJECT_SUBPATH -## The subpath to the solution (`.sln`) or project (`.vcxproj`) file relative to `SOURCE_PATH`. -## -## ### LICENSE_SUBPATH -## The subpath to the license file relative to `SOURCE_PATH`. -## -## ### INCLUDES_SUBPATH -## The subpath to the includes directory relative to `SOURCE_PATH`. -## -## This parameter should be a directory and should not end in a trailing slash. -## -## ### ALLOW_ROOT_INCLUDES -## Indicates that top-level include files (e.g. `include/zlib.h`) should be allowed. -## -## ### REMOVE_ROOT_INCLUDES -## Indicates that top-level include files (e.g. `include/Makefile.am`) should be removed. -## -## ### SKIP_CLEAN -## Indicates that the intermediate files should not be removed. -## -## Ports using this option should later call [`vcpkg_clean_msbuild()`](vcpkg_clean_msbuild.md) to manually clean up. -## -## ### RELEASE_CONFIGURATION -## The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. -## -## ### DEBUG_CONFIGURATION -## The configuration (``/p:Configuration`` msbuild parameter) used for Debug builds. -## -## ### TARGET_PLATFORM_VERSION -## The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) -## -## ### TARGET -## The MSBuild target to build. (``/t:``) -## -## ### PLATFORM -## The platform (``/p:Platform`` msbuild parameter) used for the build. -## -## ### PLATFORM_TOOLSET -## The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. -## -## ### OPTIONS -## Additional options passed to msbuild for all builds. -## -## ### OPTIONS_RELEASE -## Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. -## -## ### OPTIONS_DEBUG -## Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. -## -## ## Examples -## -## * [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) -## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) - -include(vcpkg_clean_msbuild) +#[===[.md: +# vcpkg_install_msbuild + +Build and install a msbuild-based project. This replaces `vcpkg_build_msbuild()`. + +## Usage +```cmake +vcpkg_install_msbuild( + SOURCE_PATH <${SOURCE_PATH}> + PROJECT_SUBPATH + [INCLUDES_SUBPATH ] + [LICENSE_SUBPATH ] + [RELEASE_CONFIGURATION ] + [DEBUG_CONFIGURATION ] + [TARGET ] + [TARGET_PLATFORM_VERSION <10.0.15063.0>] + [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] + [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] + [OPTIONS ...] + [OPTIONS_RELEASE ...] + [OPTIONS_DEBUG ...] + [USE_VCPKG_INTEGRATION] + [ALLOW_ROOT_INCLUDES | REMOVE_ROOT_INCLUDES] +) +``` + +## Parameters +### SOURCE_PATH +The path to the root of the source tree. + +Because MSBuild uses in-source builds, the source tree will be copied into a temporary location for the build. This +parameter is the base for that copy and forms the base for all XYZ_SUBPATH options. + +### USE_VCPKG_INTEGRATION +Apply the normal `integrate install` integration for building the project. + +By default, projects built with this command will not automatically link libraries or have header paths set. + +### PROJECT_SUBPATH +The subpath to the solution (`.sln`) or project (`.vcxproj`) file relative to `SOURCE_PATH`. + +### LICENSE_SUBPATH +The subpath to the license file relative to `SOURCE_PATH`. + +### INCLUDES_SUBPATH +The subpath to the includes directory relative to `SOURCE_PATH`. + +This parameter should be a directory and should not end in a trailing slash. + +### ALLOW_ROOT_INCLUDES +Indicates that top-level include files (e.g. `include/zlib.h`) should be allowed. + +### REMOVE_ROOT_INCLUDES +Indicates that top-level include files (e.g. `include/Makefile.am`) should be removed. + +### SKIP_CLEAN +Indicates that the intermediate files should not be removed. + +Ports using this option should later call [`vcpkg_clean_msbuild()`](vcpkg_clean_msbuild.md) to manually clean up. + +### RELEASE_CONFIGURATION +The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. + +### DEBUG_CONFIGURATION +The configuration (``/p:Configuration`` msbuild parameter) used for Debug builds. + +### TARGET_PLATFORM_VERSION +The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) + +### TARGET +The MSBuild target to build. (``/t:``) + +### PLATFORM +The platform (``/p:Platform`` msbuild parameter) used for the build. + +### PLATFORM_TOOLSET +The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. + +### OPTIONS +Additional options passed to msbuild for all builds. + +### OPTIONS_RELEASE +Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. + +## Examples + +* [libirecovery](https://github.com/Microsoft/vcpkg/blob/master/ports/libirecovery/portfile.cmake) +* [libfabric](https://github.com/Microsoft/vcpkg/blob/master/ports/libfabric/portfile.cmake) +#]===] function(vcpkg_install_msbuild) cmake_parse_arguments( - _csc + PARSE_ARGV 0 + "arg" "USE_VCPKG_INTEGRATION;ALLOW_ROOT_INCLUDES;REMOVE_ROOT_INCLUDES;SKIP_CLEAN" "SOURCE_PATH;PROJECT_SUBPATH;INCLUDES_SUBPATH;LICENSE_SUBPATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" - ${ARGN} ) - if(NOT DEFINED _csc_RELEASE_CONFIGURATION) - set(_csc_RELEASE_CONFIGURATION Release) + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(WARNING "vcpkg_install_msbuild was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + if(NOT DEFINED arg_RELEASE_CONFIGURATION) + set(arg_RELEASE_CONFIGURATION Release) endif() - if(NOT DEFINED _csc_DEBUG_CONFIGURATION) - set(_csc_DEBUG_CONFIGURATION Debug) + if(NOT DEFINED arg_DEBUG_CONFIGURATION) + set(arg_DEBUG_CONFIGURATION Debug) endif() - if(NOT DEFINED _csc_PLATFORM) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(_csc_PLATFORM x64) - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) - set(_csc_PLATFORM Win32) - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL ARM) - set(_csc_PLATFORM ARM) + if(NOT DEFINED arg_PLATFORM) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(arg_PLATFORM x64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(arg_PLATFORM Win32) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(arg_PLATFORM ARM) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(arg_PLATFORM arm64) else() message(FATAL_ERROR "Unsupported target architecture") endif() endif() - if(NOT DEFINED _csc_PLATFORM_TOOLSET) - set(_csc_PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET}) + if(NOT DEFINED arg_PLATFORM_TOOLSET) + set(arg_PLATFORM_TOOLSET "${VCPKG_PLATFORM_TOOLSET}") endif() - if(NOT DEFINED _csc_TARGET_PLATFORM_VERSION) - vcpkg_get_windows_sdk(_csc_TARGET_PLATFORM_VERSION) + if(NOT DEFINED arg_TARGET_PLATFORM_VERSION) + vcpkg_get_windows_sdk(arg_TARGET_PLATFORM_VERSION) endif() - if(NOT DEFINED _csc_TARGET) - set(_csc_TARGET Rebuild) + if(NOT DEFINED arg_TARGET) + set(arg_TARGET Rebuild) endif() - list(APPEND _csc_OPTIONS - /t:${_csc_TARGET} - /p:Platform=${_csc_PLATFORM} - /p:PlatformToolset=${_csc_PLATFORM_TOOLSET} - /p:VCPkgLocalAppDataDisabled=true - /p:UseIntelMKL=No - /p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION} - /m + list(APPEND arg_OPTIONS + "/t:${arg_TARGET}" + "/p:Platform=${arg_PLATFORM}" + "/p:PlatformToolset=${arg_PLATFORM_TOOLSET}" + "/p:VCPkgLocalAppDataDisabled=true" + "/p:UseIntelMKL=No" + "/p:WindowsTargetPlatformVersion=${arg_TARGET_PLATFORM_VERSION}" + "/p:VcpkgTriplet=${TARGET_TRIPLET}" + "/p:VcpkgInstalledDir=${_VCPKG_INSTALLED_DIR}" + "/p:VcpkgManifestInstall=false" + "/m" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") # Disable LTCG for static libraries because this setting introduces ABI incompatibility between minor compiler versions # TODO: Add a way for the user to override this if they want to opt-in to incompatibility - list(APPEND _csc_OPTIONS /p:WholeProgramOptimization=false) + list(APPEND arg_OPTIONS "/p:WholeProgramOptimization=false") endif() - if(_csc_USE_VCPKG_INTEGRATION) - list(APPEND _csc_OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets /p:VcpkgApplocalDeps=false) + if(arg_USE_VCPKG_INTEGRATION) + list(APPEND arg_OPTIONS + "/p:ForceImportBeforeCppTargets=${SCRIPTS}/buildsystems/msbuild/vcpkg.targets" + "/p:VcpkgApplocalDeps=false" + ) endif() - get_filename_component(SOURCE_PATH_SUFFIX "${_csc_SOURCE_PATH}" NAME) + get_filename_component(source_path_suffix "${arg_SOURCE_PATH}" NAME) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Building ${_csc_PROJECT_SUBPATH} for Release") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - file(COPY ${_csc_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - set(SOURCE_COPY_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}) + message(STATUS "Building ${arg_PROJECT_SUBPATH} for Release") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + file(COPY "${arg_SOURCE_PATH}" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + set(source_copy_path "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${source_path_suffix}") vcpkg_execute_required_process( - COMMAND msbuild ${SOURCE_COPY_PATH}/${_csc_PROJECT_SUBPATH} - /p:Configuration=${_csc_RELEASE_CONFIGURATION} - ${_csc_OPTIONS} - ${_csc_OPTIONS_RELEASE} - WORKING_DIRECTORY ${SOURCE_COPY_PATH} - LOGNAME build-${TARGET_TRIPLET}-rel + COMMAND msbuild "${source_copy_path}/${arg_PROJECT_SUBPATH}" + "/p:Configuration=${arg_RELEASE_CONFIGURATION}" + ${arg_OPTIONS} + ${arg_OPTIONS_RELEASE} + WORKING_DIRECTORY "${source_copy_path}" + LOGNAME "build-${TARGET_TRIPLET}-rel" ) - file(GLOB_RECURSE LIBS ${SOURCE_COPY_PATH}/*.lib) - file(GLOB_RECURSE DLLS ${SOURCE_COPY_PATH}/*.dll) - file(GLOB_RECURSE EXES ${SOURCE_COPY_PATH}/*.exe) - if(LIBS) - file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(GLOB_RECURSE libs "${source_copy_path}/*.lib") + file(GLOB_RECURSE dlls "${source_copy_path}/*.dll") + file(GLOB_RECURSE exes "${source_copy_path}/*.exe") + if(NOT libs STREQUAL "") + file(COPY ${libs} DESTINATION "${CURRENT_PACKAGES_DIR}/lib") endif() - if(DLLS) - file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + if(NOT dlls STREQUAL "") + file(COPY ${dlls} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") endif() - if(EXES) - file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + if(NOT exes STREQUAL "") + file(COPY ${exes} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}") endif() endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Building ${_csc_PROJECT_SUBPATH} for Debug") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - file(COPY ${_csc_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - set(SOURCE_COPY_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${SOURCE_PATH_SUFFIX}) + message(STATUS "Building ${arg_PROJECT_SUBPATH} for Debug") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + file(COPY "${arg_SOURCE_PATH}" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + set(source_copy_path "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${source_path_suffix}") vcpkg_execute_required_process( - COMMAND msbuild ${SOURCE_COPY_PATH}/${_csc_PROJECT_SUBPATH} - /p:Configuration=${_csc_DEBUG_CONFIGURATION} - ${_csc_OPTIONS} - ${_csc_OPTIONS_DEBUG} - WORKING_DIRECTORY ${SOURCE_COPY_PATH} - LOGNAME build-${TARGET_TRIPLET}-dbg + COMMAND msbuild "${source_copy_path}/${arg_PROJECT_SUBPATH}" + "/p:Configuration=${arg_DEBUG_CONFIGURATION}" + ${arg_OPTIONS} + ${arg_OPTIONS_DEBUG} + WORKING_DIRECTORY "${source_copy_path}" + LOGNAME "build-${TARGET_TRIPLET}-dbg" ) - file(GLOB_RECURSE LIBS ${SOURCE_COPY_PATH}/*.lib) - file(GLOB_RECURSE DLLS ${SOURCE_COPY_PATH}/*.dll) - if(LIBS) - file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(GLOB_RECURSE libs "${source_copy_path}/*.lib") + file(GLOB_RECURSE dlls "${source_copy_path}/*.dll") + if(NOT libs STREQUAL "") + file(COPY ${libs} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") endif() - if(DLLS) - file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + if(NOT dlls STREQUAL "") + file(COPY ${dlls} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") endif() endif() vcpkg_copy_pdbs() - if(NOT _csc_SKIP_CLEAN) + if(NOT arg_SKIP_CLEAN) vcpkg_clean_msbuild() endif() - if(DEFINED _csc_INCLUDES_SUBPATH) - file(COPY ${_csc_SOURCE_PATH}/${_csc_INCLUDES_SUBPATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/) - file(GLOB ROOT_INCLUDES LIST_DIRECTORIES false ${CURRENT_PACKAGES_DIR}/include/*) - if(ROOT_INCLUDES) - if(_csc_REMOVE_ROOT_INCLUDES) - file(REMOVE ${ROOT_INCLUDES}) - elseif(_csc_ALLOW_ROOT_INCLUDES) + if(DEFINED arg_INCLUDES_SUBPATH) + file(COPY "${arg_SOURCE_PATH}/${arg_INCLUDES_SUBPATH}/" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/" + ) + file(GLOB root_includes + LIST_DIRECTORIES false + "${CURRENT_PACKAGES_DIR}/include/*") + if(NOT root_includes STREQUAL "") + if(arg_REMOVE_ROOT_INCLUDES) + file(REMOVE ${root_includes}) + elseif(arg_ALLOW_ROOT_INCLUDES) else() message(FATAL_ERROR "Top-level files were found in ${CURRENT_PACKAGES_DIR}/include; this may indicate a problem with the call to `vcpkg_install_msbuild()`.\nTo avoid conflicts with other libraries, it is recommended to not put includes into the root `include/` directory.\nPass either ALLOW_ROOT_INCLUDES or REMOVE_ROOT_INCLUDES to handle these files.\n") endif() endif() endif() - if(DEFINED _csc_LICENSE_SUBPATH) - file(INSTALL ${_csc_SOURCE_PATH}/${_csc_LICENSE_SUBPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + if(DEFINED arg_LICENSE_SUBPATH) + file(INSTALL "${arg_SOURCE_PATH}/${arg_LICENSE_SUBPATH}" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright + ) endif() endfunction() diff --git a/scripts/cmake/vcpkg_install_nmake.cmake b/scripts/cmake/vcpkg_install_nmake.cmake new file mode 100644 index 00000000000000..5aebdae90ce848 --- /dev/null +++ b/scripts/cmake/vcpkg_install_nmake.cmake @@ -0,0 +1,96 @@ +#[===[.md: +# vcpkg_install_nmake + +Build and install a msvc makefile project. + +## Usage: +```cmake +vcpkg_install_nmake( + SOURCE_PATH <${SOURCE_PATH}> + [NO_DEBUG] + [TARGET ] + PROJECT_SUBPATH <${SUBPATH}> + PROJECT_NAME <${MAKEFILE_NAME}> + [PRERUN_SHELL <${SHELL_PATH}>] + [PRERUN_SHELL_DEBUG <${SHELL_PATH}>] + [PRERUN_SHELL_RELEASE <${SHELL_PATH}>] + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the source files. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PROJECT_SUBPATH +Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile. + +### PROJECT_NAME +Specifies the name of msvc makefile name. +Default is makefile.vc + +### NO_DEBUG +This port doesn't support debug mode. + +### PRERUN_SHELL +Script that needs to be called before build + +### PRERUN_SHELL_DEBUG +Script that needs to be called before debug build + +### PRERUN_SHELL_RELEASE +Script that needs to be called before release build + +### OPTIONS +Additional options passed to generate during the generation. + +### OPTIONS_RELEASE +Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`. + +## Parameters: +See [`vcpkg_build_nmake()`](vcpkg_build_nmake.md). + +## Notes: +This command transparently forwards to [`vcpkg_build_nmake()`](vcpkg_build_nmake.md), adding `ENABLE_INSTALL` + +## Examples + +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +#]===] + +function(vcpkg_install_nmake) + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 _in + "NO_DEBUG" + "SOURCE_PATH;PROJECT_SUBPATH;PROJECT_NAME" + "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE;TARGET" + ) + + if (NOT CMAKE_HOST_WIN32) + message(FATAL_ERROR "vcpkg_install_nmake only support windows.") + endif() + + if (_in_NO_DEBUG) + set(NO_DEBUG NO_DEBUG) + endif() + + if (NOT _in_TARGET) + set(INSTALL_TARGET "all") + else() + set(INSTALL_TARGET "${_in_TARGET}") + endif() + + vcpkg_build_nmake(LOGFILE_ROOT ENABLE_INSTALL + ${NO_DEBUG} + TARGET "${INSTALL_TARGET}" + SOURCE_PATH ${_in_SOURCE_PATH} PROJECT_SUBPATH ${_in_PROJECT_SUBPATH} PROJECT_NAME ${_in_PROJECT_NAME} + PRERUN_SHELL ${_in_PRERUN_SHELL} PRERUN_SHELL_DEBUG ${_in_PRERUN_SHELL_DEBUG} PRERUN_SHELL_RELEASE ${_in_PRERUN_SHELL_RELEASE} + OPTIONS ${_in_OPTIONS} OPTIONS_RELEASE ${_in_OPTIONS_RELEASE} OPTIONS_DEBUG ${_in_OPTIONS_DEBUG} + ) +endfunction() diff --git a/scripts/cmake/vcpkg_install_qmake.cmake b/scripts/cmake/vcpkg_install_qmake.cmake new file mode 100644 index 00000000000000..d8362697abc762 --- /dev/null +++ b/scripts/cmake/vcpkg_install_qmake.cmake @@ -0,0 +1,66 @@ +#[===[.md: +# vcpkg_install_qmake + +Build and install a qmake project. + +## Usage: +```cmake +vcpkg_install_qmake(...) +``` + +## Parameters: +See [`vcpkg_build_qmake()`](vcpkg_build_qmake.md). + +## Notes: +This command transparently forwards to [`vcpkg_build_qmake()`](vcpkg_build_qmake.md). + +Additionally, this command will copy produced .libs/.dlls/.as/.dylibs/.sos to the appropriate +staging directories. + +## Examples + +* [libqglviewer](https://github.com/Microsoft/vcpkg/blob/master/ports/libqglviewer/portfile.cmake) +#]===] + +function(vcpkg_install_qmake) + vcpkg_build_qmake(${ARGN}) + file(GLOB_RECURSE RELEASE_LIBS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.a + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.so + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.so.* + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dylib + ) + file(GLOB_RECURSE RELEASE_BINS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll + ) + file(GLOB_RECURSE DEBUG_LIBS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.a + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.so + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.so.* + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dylib + ) + file(GLOB_RECURSE DEBUG_BINS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll + ) + if(NOT RELEASE_LIBS AND NOT DEBUG_LIBS) + message(FATAL_ERROR "Build did not appear to produce any libraries. If this is intended, use `vcpkg_build_qmake()` directly.") + endif() + if(RELEASE_LIBS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${RELEASE_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if(DEBUG_LIBS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + if(RELEASE_BINS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${RELEASE_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + if(DEBUG_BINS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${DEBUG_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_list.cmake b/scripts/cmake/vcpkg_list.cmake new file mode 100644 index 00000000000000..74523dc62eb586 --- /dev/null +++ b/scripts/cmake/vcpkg_list.cmake @@ -0,0 +1,257 @@ +#[===[.md: +# vcpkg_list + +A replacement for CMake's `list()` function, which correctly handles elements +with internal semicolons (in other words, escaped semicolons). +Use `vcpkg_list()` instead of `list()` whenever possible. + +```cmake +vcpkg_list(SET [...]) +vcpkg_list( [...]) +``` + +In addition to all of the commands from `list()`, `vcpkg_list` adds +a `vcpkg_list(SET)` command. +This command takes its arguments, escapes them, and then concatenates +them into a list; this should be used instead of `set()` for setting any +list variable. + +Otherwise, the `vcpkg_list()` function is the same as the built-in +`list()` function, with the following restrictions: + +- `GET`, `REMOVE_ITEM`, and `REMOVE_AT` support only one index/value +- `POP_BACK` and `POP_FRONT` do not support getting the value into + another out variable. Use C++ style `GET` then `POP_(BACK|FRONT)`. +- `FILTER` and `TRANSFORM` are unsupported. + +See the [CMake documentation for `list()`](https://cmake.org/cmake/help/latest/command/list.html) +for more information. + +## Notes: Some Weirdnesses + +The most major weirdness is due to `""` pulling double-duty as "list of zero elements", +and "list of one element, which is empty". `vcpkg_list` always uses the former understanding. +This can cause weird behavior, for example: + +```cmake +set(lst "") +vcpkg_list(APPEND lst "" "") +# lst = ";" +``` + +This is because you're appending two elements to the empty list. +One very weird behavior that comes out of this would be: + +```cmake +set(lst "") +vcpkg_list(APPEND lst "") +# lst = "" +``` + +since `""` is the empty list, we append the empty element and end up with a list +of one element, which is empty. This does not happen for non-empty lists; +for example: + +```cmake +set(lst "a") +vcpkg_list(APPEND lst "") +# lst = "a;" +``` + +only the empty list has this odd behavior. + +## Examples + +### Creating a list + +```cmake +vcpkg_list(SET foo_param) +if(DEFINED arg_FOO) + vcpkg_list(SET foo_param FOO "${arg_FOO}") +endif() +``` + +### Appending to a list + +```cmake +set(OPTIONS -DFOO=BAR) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_list(APPEND OPTIONS "-DOS=WINDOWS;FOO") +endif() +``` + +### Popping the end off a list + +```cmake +if(NOT list STREQUAL "") + vcpkg_list(GET list end -1) + vcpkg_list(POP_BACK list) +endif() +``` +#]===] + +macro(z_vcpkg_list_escape_once_more lst) + string(REPLACE [[\;]] [[\\;]] "${lst}" "${${lst}}") +endmacro() + +function(vcpkg_list) + # NOTE: as this function replaces an existing CMake command, + # it does not use cmake_parse_arguments + + # vcpkg_list( ...) + # A0 A1 + + if(ARGC LESS "2") + message(FATAL_ERROR "vcpkg_list requires at least two arguments.") + endif() + + if(ARGV1 MATCHES "^ARGV([0-9]*)$|^ARG[CN]$|^CMAKE_CURRENT_FUNCTION") + message(FATAL_ERROR "vcpkg_list does not support the list_var being ${ARGV1}. + Please use a different variable name.") + endif() + + set(list "${${ARGV1}}") + set(operation "${ARGV0}") + set(list_var "${ARGV1}") + + if(operation STREQUAL "SET") + z_vcpkg_function_arguments(args 2) + set("${list_var}" "${args}" PARENT_SCOPE) + return() + endif() + + # Normal reading functions + if(operation STREQUAL "LENGTH") + # vcpkg_list(LENGTH ) + # A0 A1 A2 + if(NOT ARGC EQUAL "3") + message(FATAL_ERROR "vcpkg_list sub-command ${operation} requires two arguments.") + endif() + list(LENGTH list out) + set("${ARGV2}" "${out}" PARENT_SCOPE) + return() + endif() + if(operation MATCHES "^(GET|JOIN|FIND)$") + # vcpkg_list( ) + # A0 A1 A2 A3 + if(NOT ARGC EQUAL "4") + message(FATAL_ERROR "vcpkg_list sub-command ${operation} requires three arguments.") + endif() + if(operation STREQUAL "GET") + list(LENGTH list length) + if(length EQUAL "0") + message(FATAL_ERROR "vcpkg_list GET given empty list") + elseif(ARGV2 GREATER_EQUAL length OR ARGV2 LESS "-${length}") + message(FATAL_ERROR "vcpkg_list index: ${ARGV2} is not in range") + endif() + endif() + list("${operation}" list "${ARGV2}" out) + set("${ARGV3}" "${out}" PARENT_SCOPE) + return() + endif() + if(operation STREQUAL "SUBLIST") + # vcpkg_list(SUBLIST ) + # A0 A1 A2 A3 A4 + if(NOT ARGC EQUAL "5") + message(FATAL_ERROR "vcpkg_list sub-command SUBLIST requires four arguments.") + endif() + list(LENGTH list length) + if(ARGV2 LESS "0" OR (ARGV2 GREATER_EQUAL length AND NOT ARGV2 EQUAL "0")) + message(FATAL_ERROR "vcpkg_list begin index: ${ARGV2} is out of range") + endif() + z_vcpkg_list_escape_once_more(list) + list(SUBLIST list "${ARGV2}" "${ARGV3}" out) + set("${ARGV4}" "${out}" PARENT_SCOPE) + return() + endif() + + # modification functions + + if(operation MATCHES "^(APPEND|PREPEND)$") + # vcpkg_list( [...]) + # A0 A1 A2... + + # if ARGC <= 2, then we don't have to do anything + if(ARGC GREATER 2) + z_vcpkg_function_arguments(args 2) + if(list STREQUAL "") + set("${list_var}" "${args}" PARENT_SCOPE) + elseif(operation STREQUAL "APPEND") + set("${list_var}" "${list};${args}" PARENT_SCOPE) + else() + set("${list_var}" "${args};${list}" PARENT_SCOPE) + endif() + endif() + return() + endif() + if(operation STREQUAL "INSERT") + # vcpkg_list(INSERT [...]) + # A0 A1 A2 A3... + + list(LENGTH list length) + if(ARGV2 LESS "-{$length}" OR ARGV2 GREATER length) + message(FATAL_ERROR "vcpkg_list index: ${ARGV2} out of range") + endif() + if(ARGC GREATER 3) + # list(LENGTH) is one of the few subcommands that's fine + list(LENGTH list length) + if(ARGV2 LESS "0") + math(EXPR ARGV2 "${length} + ${ARGV2}") + endif() + if(ARGV2 LESS "0" OR ARGV2 GREATER length) + message(FATAL_ERROR "list index: ${ARGV2} out of range (-${length}, ${length})") + endif() + + z_vcpkg_function_arguments(args 3) + if(list STREQUAL "") + set("${list_var}" "${args}" PARENT_SCOPE) + elseif(ARGV2 EQUAL "0") + set("${list_var}" "${args};${list}" PARENT_SCOPE) + elseif(ARGV2 EQUAL length) + set("${list_var}" "${list};${args}" PARENT_SCOPE) + else() + vcpkg_list(SUBLIST list 0 "${ARGV2}" list_start) + vcpkg_list(SUBLIST list "${ARGV2}" -1 list_end) + set("${list_var}" "${list_start};${args};${list_end}" PARENT_SCOPE) + endif() + elseif(ARGC LESS 3) + message(FATAL_ERROR "vcpkg_list sub-command INSERT requires at least two arguments.") + endif() + return() + endif() + + if(operation MATCHES "^(POP_BACK|POP_FRONT|REVERSE|REMOVE_DUPLICATES)$") + # vcpkg_list( ) + # A0 A1 + if(NOT ARGC EQUAL 2) + message(FATAL_ERROR "vcpkg_list sub-command ${operation} requires one argument.") + endif() + z_vcpkg_list_escape_once_more(list) + list("${operation}" list) + set("${list_var}" "${list}" PARENT_SCOPE) + return() + endif() + + if(operation MATCHES "^(REMOVE_AT|REMOVE_ITEM)$") + # vcpkg_list( ) + # A0 A1 A2 + if(NOT ARGC EQUAL 3) + message(FATAL_ERROR "vcpkg_list sub-command ${operation} requires two arguments.") + endif() + if(operation STREQUAL "REMOVE_AT") + list(LENGTH list length) + if(ARGV2 GREATER_EQUAL length OR ARGV2 LESS "-${length}") + message(FATAL_ERROR "vcpkg_list index: ${ARGV2} out of range") + endif() + endif() + + z_vcpkg_list_escape_once_more(list) + string(REPLACE [[;]] [[\;]] ARGV2 "${ARGV2}") + + list("${operation}" list "${ARGV2}") + set("${list_var}" "${list}" PARENT_SCOPE) + return() + endif() + + message(FATAL_ERROR "vcpkg_list sub-command ${operation} is not yet implemented.") +endfunction() diff --git a/scripts/cmake/vcpkg_minimum_required.cmake b/scripts/cmake/vcpkg_minimum_required.cmake new file mode 100644 index 00000000000000..a8f3a1265e26e1 --- /dev/null +++ b/scripts/cmake/vcpkg_minimum_required.cmake @@ -0,0 +1,50 @@ +#[===[.md: +# vcpkg_minimum_required + +Asserts that the version of the vcpkg program being used to build a port is later than the supplied date, inclusive. + +## Usage +```cmake +vcpkg_minimum_required(VERSION 2021-01-13) +``` + +## Parameters +### VERSION +The date-version to check against. +#]===] + +function(vcpkg_minimum_required) + cmake_parse_arguments(PARSE_ARGV 0 arg "" "VERSION" "") + if(NOT DEFINED VCPKG_BASE_VERSION) + message(FATAL_ERROR "Your vcpkg executable is outdated and is not compatible with the current CMake scripts. + Please re-acquire vcpkg by running bootstrap-vcpkg." + ) + endif() + if(NOT DEFINED arg_VERSION) + message(FATAL_ERROR "VERSION must be specified") + endif() + + set(vcpkg_date_regex "^[12][0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]$") + if(NOT "${VCPKG_BASE_VERSION}" MATCHES "${vcpkg_date_regex}") + message(FATAL_ERROR + "vcpkg internal failure; VCPKG_BASE_VERSION (${VCPKG_BASE_VERSION}) was not a valid date." + ) + endif() + + if(NOT "${arg_VERSION}" MATCHES "${vcpkg_date_regex}") + message(FATAL_ERROR + "VERSION (${arg_VERSION}) was not a valid date - expected something of the form 'YYYY-MM-DD'" + ) + endif() + + string(REPLACE "-" "." VCPKG_BASE_VERSION_as_dotted "${VCPKG_BASE_VERSION}") + string(REPLACE "-" "." arg_VERSION_as_dotted "${arg_VERSION}") + + if("${VCPKG_BASE_VERSION_as_dotted}" VERSION_LESS "${arg_VERSION_as_dotted}") + message(FATAL_ERROR + "Your vcpkg executable is from ${VCPKG_BASE_VERSION} which is older than required by the caller " + "of vcpkg_minimum_required(VERSION ${arg_VERSION}). " + "Please re-acquire vcpkg by running bootstrap-vcpkg." + ) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_prettify_command.cmake b/scripts/cmake/vcpkg_prettify_command.cmake deleted file mode 100644 index 9d9a2b798c8daa..00000000000000 --- a/scripts/cmake/vcpkg_prettify_command.cmake +++ /dev/null @@ -1,26 +0,0 @@ -## # vcpkg_prettify_command -## -## Turns list of command arguments into a formatted string. -## -## ## Usage -## ```cmake -## vcpkg_prettify_command() -## ``` -## -## ## Examples -## -## * `scripts/cmake/vcpkg_execute_build_process.cmake` -## * `scripts/cmake/vcpkg_execute_required_process.cmake` -## * `scripts/cmake/vcpkg_execute_required_process_repeat.cmake` - -macro(vcpkg_prettify_command INPUT_VAR OUTPUT_VAR) - set(${OUTPUT_VAR} "") - foreach(v ${${INPUT_VAR}}) - if(${v} MATCHES "( )") - list(APPEND ${OUTPUT_VAR} \"${v}\") - else() - list(APPEND ${OUTPUT_VAR} ${v}) - endif() - endforeach() - list(JOIN ${OUTPUT_VAR} " " ${OUTPUT_VAR}) -endmacro() diff --git a/scripts/cmake/vcpkg_replace_string.cmake b/scripts/cmake/vcpkg_replace_string.cmake index 3eb18d0bf75dbf..1f8b37b656fb6a 100644 --- a/scripts/cmake/vcpkg_replace_string.cmake +++ b/scripts/cmake/vcpkg_replace_string.cmake @@ -1,14 +1,15 @@ -#.rst: -# .. command:: vcpkg_replace_string -# -# Replace a string in a file. -# -# :: -# vcpkg_replace_string(filename match_string replace_string) -# -# -function(vcpkg_replace_string filename match_string replace_string) - file(READ ${filename} _contents) - string(REPLACE "${match_string}" "${replace_string}" _contents "${_contents}") - file(WRITE ${filename} "${_contents}") +#[===[.md: +# vcpkg_replace_string + +Replace a string in a file. + +```cmake +vcpkg_replace_string( ) +``` +#]===] + +function(vcpkg_replace_string filename match replace) + file(READ "${filename}" contents) + string(REPLACE "${match}" "${replace}" contents "${contents}") + file(WRITE "${filename}" "${contents}") endfunction() diff --git a/scripts/cmake/vcpkg_test_cmake.cmake b/scripts/cmake/vcpkg_test_cmake.cmake index 20343bf6464cd3..b3eb9f407c6b3e 100644 --- a/scripts/cmake/vcpkg_test_cmake.cmake +++ b/scripts/cmake/vcpkg_test_cmake.cmake @@ -1,79 +1,4 @@ -## # vcpkg_test_cmake -## -## Tests a built package for CMake `find_package()` integration. -## -## ## Usage: -## ```cmake -## vcpkg_test_cmake(PACKAGE_NAME [MODULE]) -## ``` -## -## ## Parameters: -## -## ### PACKAGE_NAME -## The expected name to find with `find_package()`. -## -## ### MODULE -## Indicates that the library expects to be found via built-in CMake targets. -## -function(vcpkg_test_cmake) - # The following issues need to be addressed before re-enabling this function. - # 1. Use the actual vcpkg toolchain file. - # 2. Select a generator in the same method as vcpkg_configure_cmake() as though the PREFER_NINJA flag was always passed. - # 3. Fully emulate the toolchain file for the just-built package (just adding it to CMAKE_PREFIX_PATH is not enough). - return() - - cmake_parse_arguments(_tc "MODULE" "PACKAGE_NAME" "" ${ARGN}) - - if(NOT DEFINED _tc_PACKAGE_NAME) - message(FATAL_ERROR "PACKAGE_NAME must be specified") - endif() - if(_tc_MODULE) - set(PACKAGE_TYPE MODULE) - else() - set(PACKAGE_TYPE CONFIG) - endif() - - if(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") - message(STATUS "Skipping CMake integration test due to v142 / CMake interaction issues") - return() - endif() - - message(STATUS "Performing CMake integration test") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test) - - #Generate Dummy source -# set(VCPKG_TEST_SOURCE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test/CMakeIntegration.cpp) -# file(WRITE ${VCPKG_TEST_SOURCE} "int main() \{\n") -# file(APPEND ${VCPKG_TEST_SOURCE} "return 0;}") - # Generate test source CMakeLists.txt - set(VCPKG_TEST_CMAKELIST ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test/CMakeLists.txt) - file(WRITE ${VCPKG_TEST_CMAKELIST} "cmake_minimum_required(VERSION 3.10)\n") - file(APPEND ${VCPKG_TEST_CMAKELIST} "set(CMAKE_PREFIX_PATH \"${CURRENT_PACKAGES_DIR};${CURRENT_INSTALLED_DIR}\")\n") - file(APPEND ${VCPKG_TEST_CMAKELIST} "\n") - file(APPEND ${VCPKG_TEST_CMAKELIST} "find_package(${_tc_PACKAGE_NAME} ${PACKAGE_TYPE} REQUIRED)\n") - #To properly test if the package is actually working haveway correctly we have to link all targets of a package to - #a test executable and than actually build it. This will not discover if every symbol exported by the library is available/linked - #but it will doscover if all files which are linked by a target actual exist. Problem is: How to discover all targets? -# file(APPEND ${VCPKG_TEST_CMAKELIST} "add_executable(${_tc_PACKAGE_NAME}_exe ${VCPKG_TEST_SOURCE})\n") -# file(APPEND ${VCPKG_TEST_CMAKELIST} "target_link_libraries(${_tc_PACKAGE_NAME}_exe PRIVATE ${_tc_PACKAGE_NAME})\n") - - if(DEFINED _VCPKG_CMAKE_GENERATOR) - set(VCPKG_CMAKE_TEST_GENERATOR "${_VCPKG_CMAKE_GENERATOR}") - else() - set(VCPKG_CMAKE_TEST_GENERATOR Ninja) - endif() - - # Run cmake config with a generated CMakeLists.txt - set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/test-cmake-${TARGET_TRIPLET}") - execute_process( - COMMAND ${CMAKE_COMMAND} -G ${VCPKG_CMAKE_TEST_GENERATOR} . - OUTPUT_FILE "${LOGPREFIX}-out.log" - ERROR_FILE "${LOGPREFIX}-err.log" - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test - ) - if(error_code) - message(FATAL_ERROR "CMake integration test failed; unable to find_package(${_tc_PACKAGE_NAME} ${PACKAGE_TYPE} REQUIRED)") - endif() -endfunction() +# DEPRECATED +function(vcpkg_test_cmake) + message("${Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL}" "vcpkg_test_cmake was a no-op and has been removed. Please remove the call to `vcpkg_test_cmake()`.") +endfunction() diff --git a/scripts/cmake/z_vcpkg_apply_patches.cmake b/scripts/cmake/z_vcpkg_apply_patches.cmake new file mode 100644 index 00000000000000..64eb6aa1b6a61f --- /dev/null +++ b/scripts/cmake/z_vcpkg_apply_patches.cmake @@ -0,0 +1,71 @@ +#[===[.md: +# z_vcpkg_apply_patches + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** + +Apply a set of patches to a source tree. + +```cmake +z_vcpkg_apply_patches( + SOURCE_PATH + [QUIET] + PATCHES ... +) +``` + +The `` should be set to `${SOURCE_PATH}` by convention, +and is the path to apply the patches in. + +`z_vcpkg_apply_patches` will take the list of ``es, +which are by default relative to the port directory, +and apply them in order using `git apply`. +Generally, these ``es take the form of `some.patch` +to select patches in the port directory. +One may also download patches and use `${VCPKG_DOWNLOADS}/path/to/some.patch`. + +If `QUIET` is not passed, it is a fatal error for a patch to fail to apply; +otherwise, if `QUIET` is passed, no message is printed. +This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. +#]===] + +function(z_vcpkg_apply_patches) + cmake_parse_arguments(PARSE_ARGV 0 "arg" "QUIET" "SOURCE_PATH" "PATCHES") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "internal error: z_vcpkg_apply_patches was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + find_program(GIT NAMES git git.cmd REQUIRED) + if(DEFINED ENV{GIT_CONFIG_NOSYSTEM}) + set(git_config_nosystem_backup "$ENV{GIT_CONFIG_NOSYSTEM}") + else() + unset(git_config_nosystem_backup) + endif() + + set(ENV{GIT_CONFIG_NOSYSTEM} 1) + set(patchnum 0) + foreach(patch IN LISTS arg_PATCHES) + get_filename_component(absolute_patch "${patch}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}") + message(STATUS "Applying patch ${patch}") + set(logname "patch-${TARGET_TRIPLET}-${patchnum}") + vcpkg_execute_in_download_mode( + COMMAND "${GIT}" -c core.longpaths=true -c core.autocrlf=false --work-tree=. --git-dir=.git apply "${absolute_patch}" --ignore-whitespace --whitespace=nowarn --verbose + OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/${logname}-out.log" + ERROR_VARIABLE error + WORKING_DIRECTORY "${arg_SOURCE_PATH}" + RESULT_VARIABLE error_code + ) + file(WRITE "${CURRENT_BUILDTREES_DIR}/${logname}-err.log" "${error}") + + if(error_code AND NOT arg_QUIET) + message(FATAL_ERROR "Applying patch failed: ${error}") + endif() + + math(EXPR patchnum "${patchnum} + 1") + endforeach() + if(DEFINED git_config_nosystem_backup) + set(ENV{GIT_CONFIG_NOSYSTEM} "${git_config_nosystem_backup}") + else() + unset(ENV{GIT_CONFIG_NOSYSTEM}) + endif() +endfunction() diff --git a/scripts/cmake/z_vcpkg_escape_regex_control_characters.cmake b/scripts/cmake/z_vcpkg_escape_regex_control_characters.cmake new file mode 100644 index 00000000000000..b238f0088d5221 --- /dev/null +++ b/scripts/cmake/z_vcpkg_escape_regex_control_characters.cmake @@ -0,0 +1,8 @@ +function(z_vcpkg_escape_regex_control_characters out_var string) + if(ARGC GREATER "2") + message(FATAL_ERROR "z_vcpkg_escape_regex_control_characters passed extra arguments: ${ARGN}") + endif() + # uses | instead of [] to avoid confusion; additionally, CMake doesn't support `]` in a `[]` + string(REGEX REPLACE [[\[|\]|\(|\)|\.|\+|\*|\^|\\|\$|\?|\|]] [[\\\0]] escaped_content "${string}") + set("${out_var}" "${escaped_content}" PARENT_SCOPE) +endfunction() diff --git a/scripts/cmake/z_vcpkg_forward_output_variable.cmake b/scripts/cmake/z_vcpkg_forward_output_variable.cmake new file mode 100644 index 00000000000000..4d775b8cc478f5 --- /dev/null +++ b/scripts/cmake/z_vcpkg_forward_output_variable.cmake @@ -0,0 +1,48 @@ +#[===[.md: +# z_vcpkg_forward_output_variable + +This macro helps with forwarding values from inner function calls, +through a local function scope, into pointer out parameters. + +```cmake +z_vcpkg_forward_output_variable(ptr_to_parent_var var_to_forward) +``` + +is equivalent to + +```cmake +if(DEFINED ptr_to_parent_var) + if(DEFINED value_var) + set("${ptr_to_parent_var}" "${value_var}" PARENT_SCOPE) + else() + unset("${ptr_to_parent_var}" PARENT_SCOPE) + endif() +endif() +``` + +Take note that the first argument should be a local variable that has a value of the parent variable name. +Most commonly, this local is the result of a pointer-out parameter to a function. +If the variable in the first parameter is not defined, this function does nothing, +simplifying functions with optional out parameters. +Most commonly, this should be used in cases like: + +```cmake +function(my_function out_var) + file(SHA512 "somefile.txt" local_var) + z_vcpkg_forward_output_variable(out_var local_var) +endfunction() +``` +#]===] + +macro(z_vcpkg_forward_output_variable ptr_to_parent_var var_to_forward) + if("${ARGC}" GREATER "2") + message(FATAL_ERROR "z_vcpkg_forward_output_variable was passed extra arguments: ${ARGN}") + endif() + if(DEFINED "${ptr_to_parent_var}") + if(DEFINED "${var_to_forward}") + set("${${ptr_to_parent_var}}" "${${var_to_forward}}" PARENT_SCOPE) + else() + unset("${${ptr_to_parent_var}}" PARENT_SCOPE) + endif() + endif() +endmacro() diff --git a/scripts/cmake/z_vcpkg_function_arguments.cmake b/scripts/cmake/z_vcpkg_function_arguments.cmake new file mode 100644 index 00000000000000..043c861910f6c3 --- /dev/null +++ b/scripts/cmake/z_vcpkg_function_arguments.cmake @@ -0,0 +1,63 @@ +#[===[.md: +# z_vcpkg_function_arguments + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** +Get a list of the arguments which were passed in. +Unlike `ARGV`, which is simply the arguments joined with `;`, +so that `(A B)` is not distinguishable from `("A;B")`, +this macro gives `"A;B"` for the first argument list, +and `"A\;B"` for the second. + +```cmake +z_vcpkg_function_arguments( []) +``` + +`z_vcpkg_function_arguments` gets the arguments between `ARGV` and the last argument. +`` defaults to `0`, so that all arguments are taken. + +## Example: +```cmake +function(foo_replacement) + z_vcpkg_function_arguments(ARGS) + foo(${ARGS}) + ... +endfunction() +``` +#]===] + +# NOTE: this function definition is copied directly to scripts/buildsystems/vcpkg.cmake +# do not make changes here without making the same change there. +macro(z_vcpkg_function_arguments OUT_VAR) + if("${ARGC}" EQUAL 1) + set(z_vcpkg_function_arguments_FIRST_ARG 0) + elseif("${ARGC}" EQUAL 2) + set(z_vcpkg_function_arguments_FIRST_ARG "${ARGV1}") + + if(NOT z_vcpkg_function_arguments_FIRST_ARG GREATER_EQUAL "0" AND NOT z_vcpkg_function_arguments_FIRST_ARG LESS "0") + message(FATAL_ERROR "z_vcpkg_function_arguments: index (${z_vcpkg_function_arguments_FIRST_ARG}) is not a number") + elseif(z_vcpkg_function_arguments_FIRST_ARG LESS "0" OR z_vcpkg_function_arguments_FIRST_ARG GREATER ARGC) + message(FATAL_ERROR "z_vcpkg_function_arguments: index (${z_vcpkg_function_arguments_FIRST_ARG}) out of range") + endif() + else() + # vcpkg bug + message(FATAL_ERROR "z_vcpkg_function_arguments: invalid arguments (${ARGV})") + endif() + + set("${OUT_VAR}" "") + + # this allows us to get the value of the enclosing function's ARGC + set(z_vcpkg_function_arguments_ARGC_NAME "ARGC") + set(z_vcpkg_function_arguments_ARGC "${${z_vcpkg_function_arguments_ARGC_NAME}}") + + math(EXPR z_vcpkg_function_arguments_LAST_ARG "${z_vcpkg_function_arguments_ARGC} - 1") + # GREATER_EQUAL added in CMake 3.7 + if(NOT z_vcpkg_function_arguments_LAST_ARG LESS z_vcpkg_function_arguments_FIRST_ARG) + foreach(z_vcpkg_function_arguments_N RANGE "${z_vcpkg_function_arguments_FIRST_ARG}" "${z_vcpkg_function_arguments_LAST_ARG}") + string(REPLACE ";" "\\;" z_vcpkg_function_arguments_ESCAPED_ARG "${ARGV${z_vcpkg_function_arguments_N}}") + # adds an extra ";" on the front + set("${OUT_VAR}" "${${OUT_VAR}};${z_vcpkg_function_arguments_ESCAPED_ARG}") + endforeach() + # and then removes that extra semicolon + string(SUBSTRING "${${OUT_VAR}}" 1 -1 "${OUT_VAR}") + endif() +endmacro() diff --git a/scripts/cmake/z_vcpkg_get_cmake_vars.cmake b/scripts/cmake/z_vcpkg_get_cmake_vars.cmake new file mode 100644 index 00000000000000..f50b1db26fe1c4 --- /dev/null +++ b/scripts/cmake/z_vcpkg_get_cmake_vars.cmake @@ -0,0 +1,65 @@ +#[===[.md: +# z_vcpkg_get_cmake_vars + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** +Runs a cmake configure with a dummy project to extract certain cmake variables + +## Usage +```cmake +z_vcpkg_get_cmake_vars() +``` + +`z_vcpkg_get_cmake_vars(cmake_vars_file)` sets `` to +a path to a generated CMake file, with the detected `CMAKE_*` variables +re-exported as `VCPKG_DETECTED_*`. + +## Notes +Avoid usage in portfiles. + +All calls to `z_vcpkg_get_cmake_vars` will result in the same output file; +the output file is not generated multiple times. + +## Examples + +* [vcpkg_configure_make](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) + +### Basic Usage + +```cmake +z_vcpkg_get_cmake_vars(cmake_vars_file) +include("${cmake_vars_file}") +message(STATUS "detected CXX flags: ${VCPKG_DETECTED_CXX_FLAGS}") +``` +#]===] + +function(z_vcpkg_get_cmake_vars out_file) + cmake_parse_arguments(PARSE_ARGV 1 arg "" "" "") + + if(DEFINED arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") + endif() + + if(NOT DEFINED CACHE{Z_VCPKG_GET_CMAKE_VARS_FILE}) + set(Z_VCPKG_GET_CMAKE_VARS_FILE "${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}.cmake.log" + CACHE PATH "The file to include to access the CMake variables from a generated project.") + vcpkg_configure_cmake( + SOURCE_PATH "${SCRIPTS}/get_cmake_vars" + OPTIONS_DEBUG "-DVCPKG_OUTPUT_FILE:PATH=${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}-dbg.cmake.log" + OPTIONS_RELEASE "-DVCPKG_OUTPUT_FILE:PATH=${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}-rel.cmake.log" + PREFER_NINJA + LOGNAME get-cmake-vars-${TARGET_TRIPLET} + Z_GET_CMAKE_VARS_USAGE # ignore vcpkg_cmake_configure, be quiet, don't set variables... + ) + + set(include_string "") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + string(APPEND include_string "include(\"\${CMAKE_CURRENT_LIST_DIR}/cmake-vars-${TARGET_TRIPLET}-rel.cmake.log\")\n") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + string(APPEND include_string "include(\"\${CMAKE_CURRENT_LIST_DIR}/cmake-vars-${TARGET_TRIPLET}-dbg.cmake.log\")\n") + endif() + file(WRITE "${Z_VCPKG_GET_CMAKE_VARS_FILE}" "${include_string}") + endif() + + set("${out_file}" "${Z_VCPKG_GET_CMAKE_VARS_FILE}" PARENT_SCOPE) +endfunction() diff --git a/scripts/cmake/z_vcpkg_prettify_command_line.cmake b/scripts/cmake/z_vcpkg_prettify_command_line.cmake new file mode 100644 index 00000000000000..ab12e78fe1c92a --- /dev/null +++ b/scripts/cmake/z_vcpkg_prettify_command_line.cmake @@ -0,0 +1,34 @@ +#[===[.md: +# z_vcpkg_prettify_command_line + +**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** +Turn a command line into a formatted string. + +```cmake +z_vcpkg_prettify_command_line( ...) +``` + +This command is for internal use, when printing out to a message. + +## Examples + +* `scripts/cmake/vcpkg_execute_build_process.cmake` +* `scripts/cmake/vcpkg_execute_required_process.cmake` +* `scripts/cmake/vcpkg_execute_required_process_repeat.cmake` +#]===] + +function(z_vcpkg_prettify_command_line out_var) + set(output_list "") + z_vcpkg_function_arguments(args 1) + foreach(v IN LISTS args) + string(REPLACE [[\]] [[\\]] v "${v}") + if(v MATCHES "( )") + string(REPLACE [["]] [[\"]] v "${v}") + list(APPEND output_list "\"${v}\"") + else() + list(APPEND output_list "${v}") + endif() + endforeach() + list(JOIN output_list " " output) + set("${out_var}" "${output}" PARENT_SCOPE) +endfunction() diff --git a/scripts/detect_compiler/CMakeLists.txt b/scripts/detect_compiler/CMakeLists.txt new file mode 100644 index 00000000000000..c55da9ebb2bdeb --- /dev/null +++ b/scripts/detect_compiler/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.20) +project(detect_compiler NONE) + +if(CMAKE_GENERATOR STREQUAL "Ninja" AND CMAKE_SYSTEM_NAME STREQUAL "Windows") + set(CMAKE_C_COMPILER_WORKS 1) + set(CMAKE_C_COMPILER_FORCED 1) + set(CMAKE_CXX_COMPILER_WORKS 1) + set(CMAKE_CXX_COMPILER_FORCED 1) +endif() + +enable_language(C) +enable_language(CXX) + +file(SHA1 "${CMAKE_CXX_COMPILER}" CXX_HASH) +file(SHA1 "${CMAKE_C_COMPILER}" C_HASH) +string(SHA1 COMPILER_HASH "${C_HASH}${CXX_HASH}") + +message("#COMPILER_HASH#${COMPILER_HASH}") +message("#COMPILER_C_HASH#${C_HASH}") +message("#COMPILER_C_VERSION#${CMAKE_C_COMPILER_VERSION}") +message("#COMPILER_C_ID#${CMAKE_C_COMPILER_ID}") +message("#COMPILER_CXX_HASH#${CXX_HASH}") +message("#COMPILER_CXX_VERSION#${CMAKE_CXX_COMPILER_VERSION}") +message("#COMPILER_CXX_ID#${CMAKE_CXX_COMPILER_ID}") diff --git a/scripts/detect_compiler/CONTROL b/scripts/detect_compiler/CONTROL new file mode 100644 index 00000000000000..d76f041f0083ac --- /dev/null +++ b/scripts/detect_compiler/CONTROL @@ -0,0 +1,3 @@ +Source: detect-compiler +Version: 0 +Description: None diff --git a/scripts/detect_compiler/portfile.cmake b/scripts/detect_compiler/portfile.cmake new file mode 100644 index 00000000000000..4f68faea46936b --- /dev/null +++ b/scripts/detect_compiler/portfile.cmake @@ -0,0 +1,28 @@ +set(LOGS + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-out.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel-out.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-dbg-out.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel-err.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-dbg-err.log +) + +foreach(LOG IN LISTS LOGS) + file(REMOVE ${LOG}) + if(EXISTS ${LOG}) + message(FATAL_ERROR "Could not remove ${LOG}") + endif() +endforeach() + +set(VCPKG_BUILD_TYPE release) + +vcpkg_configure_cmake( + SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}" + PREFER_NINJA +) + +foreach(LOG IN LISTS LOGS) + if(EXISTS ${LOG}) + file(READ "${LOG}" _contents) + message("${_contents}") + endif() +endforeach() diff --git a/scripts/file_script.py b/scripts/file_script.py new file mode 100644 index 00000000000000..de57f2720991fb --- /dev/null +++ b/scripts/file_script.py @@ -0,0 +1,42 @@ +import os +import os.path +import sys + + +keyword = "include/" + +def getFiles(path): + files = os.listdir(path) + return list(filter(lambda x: x[0] != '.', files)) + +def gen_all_file_strings(path, files, headers, output): + for file in files: + package = file[:file.find("_")] + f = open(path + file) + for line in f: + idx = line.strip().find(keyword) + if idx >= 0 and line.strip()[-1] != "/": + headers.write(package + ":" + line[idx + len(keyword):]) + output.write(package + ":" + line[idx-1:]) + elif line.strip()[-1] != "/": + output.write(package + ":" + line[line.find("/"):]) + f.close() + +def main(path): + try: + os.mkdir("scripts/list_files") + except FileExistsError: + print("Path already exists, continuing...") + + try: + headers = open("scripts/list_files/VCPKGHeadersDatabase.txt", mode='w') + output = open("scripts/list_files/VCPKGDatabase.txt", mode='w') + gen_all_file_strings(path, getFiles(path), headers, output) + headers.close() + output.close() + except e: + print("Failed to generate file lists") + +if __name__ == "__main__": + main(sys.argv[1]) + diff --git a/scripts/generateBaseline.py b/scripts/generateBaseline.py new file mode 100644 index 00000000000000..6488b5425bd82a --- /dev/null +++ b/scripts/generateBaseline.py @@ -0,0 +1,82 @@ +import os +import sys +import json +import time + +from pathlib import Path + + +SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) +PORTS_DIRECTORY = os.path.join(SCRIPT_DIRECTORY, '../ports') +VERSIONS_DB_DIRECTORY = os.path.join(SCRIPT_DIRECTORY, '../versions') + + +def get_version_tag(version): + if 'version' in version: + return version['version'] + elif 'version-date' in version: + return version['version-date'] + elif 'version-semver' in version: + return version['version-semver'] + elif 'version-string' in version: + return version['version-string'] + sys.exit(1) + + +def get_version_port_version(version): + if 'port-version' in version: + return version['port-version'] + return 0 + + +def generate_baseline(): + start_time = time.time() + + # Assume each directory in ${VCPKG_ROOT}/ports is a different port + port_names = [item for item in os.listdir( + PORTS_DIRECTORY) if os.path.isdir(os.path.join(PORTS_DIRECTORY, item))] + port_names.sort() + + baseline_entries = {} + total_count = len(port_names) + for i, port_name in enumerate(port_names, 1): + port_file_path = os.path.join( + VERSIONS_DB_DIRECTORY, f'{port_name[0]}-', f'{port_name}.json') + + if not os.path.exists(port_file_path): + print( + f'Error: No version file for {port_name}.\n', file=sys.stderr) + continue + sys.stderr.write( + f'\rProcessed {i}/{total_count} ({i/total_count:.2%})') + with open(port_file_path, 'r') as db_file: + try: + versions_object = json.load(db_file) + if versions_object['versions']: + last_version = versions_object['versions'][0] + baseline_entries[port_name] = { + 'baseline': get_version_tag(last_version), + 'port-version': get_version_port_version(last_version) + } + except json.JSONDecodeError as e: + print(f'Error: Decoding {port_file_path}\n{e}\n') + baseline_object = {} + baseline_object['default'] = baseline_entries + + os.makedirs(VERSIONS_DB_DIRECTORY, exist_ok=True) + baseline_path = os.path.join(VERSIONS_DB_DIRECTORY, 'baseline.json') + with open(baseline_path, 'w') as baseline_file: + json.dump(baseline_object, baseline_file) + + elapsed_time = time.time() - start_time + print(f'\nElapsed time: {elapsed_time:.2f} seconds') + + +def main(): + if not os.path.exists(VERSIONS_DB_DIRECTORY): + print(f'Version DB files must exist before generating a baseline.\nRun: `python generatePortVersionsDB`\n') + generate_baseline() + + +if __name__ == "__main__": + main() diff --git a/scripts/generatePortVersionsDb.py b/scripts/generatePortVersionsDb.py new file mode 100644 index 00000000000000..d35e51b523120b --- /dev/null +++ b/scripts/generatePortVersionsDb.py @@ -0,0 +1,87 @@ +import os +import sys +import subprocess +import json +import time +import shutil + +import multiprocessing + +from pathlib import Path + + +MAX_PROCESSES = multiprocessing.cpu_count() +SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) +PORTS_DIRECTORY = os.path.join(SCRIPT_DIRECTORY, '../ports') +VERSIONS_DB_DIRECTORY = os.path.join(SCRIPT_DIRECTORY, '../versions') + + +def get_current_git_ref(): + output = subprocess.run(['git', '-C', SCRIPT_DIRECTORY, 'rev-parse', '--verify', 'HEAD'], + capture_output=True, + encoding='utf-8') + if output.returncode == 0: + return output.stdout.strip() + print(f"Failed to get git ref:", output.stderr.strip(), file=sys.stderr) + return None + + +def generate_versions_file(port_name): + containing_dir = os.path.join(VERSIONS_DB_DIRECTORY, f'{port_name[0]}-') + os.makedirs(containing_dir, exist_ok=True) + + output_file_path = os.path.join(containing_dir, f'{port_name}.json') + if not os.path.exists(output_file_path): + env = os.environ.copy() + env['GIT_OPTIONAL_LOCKS'] = '0' + output = subprocess.run( + [os.path.join(SCRIPT_DIRECTORY, '../vcpkg'), + 'x-history', port_name, '--x-json', f'--output={output_file_path}'], + capture_output=True, encoding='utf-8', env=env) + if output.returncode != 0: + print(f'x-history {port_name} failed: ', + output.stdout.strip(), file=sys.stderr) + + +def generate_versions_db(revision): + start_time = time.time() + + # Assume each directory in ${VCPKG_ROOT}/ports is a different port + port_names = [item for item in os.listdir( + PORTS_DIRECTORY) if os.path.isdir(os.path.join(PORTS_DIRECTORY, item))] + total_count = len(port_names) + + concurrency = MAX_PROCESSES / 2 + print(f'Running {concurrency:.0f} parallel processes') + process_pool = multiprocessing.Pool(MAX_PROCESSES) + for i, _ in enumerate(process_pool.imap_unordered(generate_versions_file, port_names), 1): + sys.stderr.write( + f'\rProcessed: {i}/{total_count} ({(i / total_count):.2%})') + process_pool.close() + process_pool.join() + + # Generate timestamp + rev_file = os.path.join(VERSIONS_DB_DIRECTORY, revision) + Path(rev_file).touch() + + elapsed_time = time.time() - start_time + print( + f'\nElapsed time: {elapsed_time:.2f} seconds') + + +def main(): + revision = get_current_git_ref() + if not revision: + print('Couldn\'t fetch current Git revision', file=sys.stderr) + sys.exit(1) + + rev_file = os.path.join(VERSIONS_DB_DIRECTORY, revision) + if os.path.exists(rev_file): + print(f'Database files already exist for commit {revision}') + sys.exit(0) + + generate_versions_db(revision) + + +if __name__ == "__main__": + main() diff --git a/scripts/get_cmake_vars/CMakeLists.txt b/scripts/get_cmake_vars/CMakeLists.txt new file mode 100644 index 00000000000000..b6d5f0e4154d46 --- /dev/null +++ b/scripts/get_cmake_vars/CMakeLists.txt @@ -0,0 +1,150 @@ +cmake_minimum_required(VERSION 3.20) + +set(VCPKG_LANGUAGES "C;CXX" CACHE STRING "Languages to enables for this project") + +set(OUTPUT_STRING) +# Build default checklists +list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_CROSSCOMPILING + CMAKE_SYSTEM_NAME + CMAKE_HOST_SYSTEM_NAME + CMAKE_SYSTEM_PROCESSOR + CMAKE_HOST_SYSTEM_PROCESSOR) +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_OSX_DEPLOYMENT_TARGET + CMAKE_OSX_SYSROOT) +endif() +# Programs to check +set(PROGLIST AR RANLIB STRIP NM OBJDUMP DLLTOOL MT LINKER) +foreach(prog IN LISTS PROGLIST) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${prog}) +endforeach() +set(COMPILERS ${VCPKG_LANGUAGES} RC) +foreach(prog IN LISTS COMPILERS) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${prog}_COMPILER CMAKE_${prog}_COMPILER_ID) +endforeach() +# Variables to check +foreach(_lang IN LISTS VCPKG_LANGUAGES) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_STANDARD_INCLUDE_DIRECTORIES) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_STANDARD_LIBRARIES) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_STANDARD) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_COMPILE_FEATURES) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_EXTENSION) + list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES) + + # Probably never required since implicit. + #list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES) + #list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_INCLUDE_DIRECTORIES) + #list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_DIRECTORIES) + #list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_LIBRARIES) +endforeach() +list(REMOVE_DUPLICATES VCPKG_DEFAULT_VARS_TO_CHECK) + +# Environment variables to check. +list(APPEND VCPKG_DEFAULT_ENV_VARS_TO_CHECK PATH INCLUDE C_INCLUDE_PATH CPLUS_INCLUDE_PATH LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) +list(REMOVE_DUPLICATES VCPKG_DEFAULT_ENV_VARS_TO_CHECK) + +#Flags to check. Flags are a bit special since they are configuration aware. +set(FLAGS ${VCPKG_LANGUAGES} RC SHARED_LINKER STATIC_LINKER EXE_LINKER) +foreach(flag IN LISTS FLAGS) + list(APPEND VCPKG_DEFAULT_FLAGS_TO_CHECK CMAKE_${flag}_FLAGS) +endforeach() +list(REMOVE_DUPLICATES VCPKG_DEFAULT_FLAGS_TO_CHECK) + +#Language-specific flags. +foreach(_lang IN LISTS VCPKG_LANGUAGES) + list(APPEND VCPKG_LANG_FLAGS CMAKE_${_lang}_FLAGS) +endforeach() +list(REMOVE_DUPLICATES VCPKG_LANG_FLAGS) + +# TODO if ever necessary: Properties to check + +set(VCPKG_VAR_PREFIX "VCPKG_DETECTED" CACHE STRING "Variable prefix to use for detected flags") +set(VCPKG_VARS_TO_CHECK "${VCPKG_DEFAULT_VARS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") +set(VCPKG_FLAGS_TO_CHECK "${VCPKG_DEFAULT_FLAGS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") +set(VCPKG_ENV_VARS_TO_CHECK "${VCPKG_DEFAULT_ENV_VARS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") + +if(NOT VCPKG_OUTPUT_FILE) + message(FATAL_ERROR "VCPKG_OUTPUT_FILE is required to be defined") +endif() + +if(NOT CMAKE_BUILD_TYPE) + message(FATAL_ERROR "CMAKE_BUILD_TYPE is required to be defined") +else() + string(TOUPPER "${CMAKE_BUILD_TYPE}" VCPKG_CONFIGS) +endif() + + +project(get_cmake_vars LANGUAGES ${VCPKG_LANGUAGES}) + +foreach(VAR IN LISTS VCPKG_VARS_TO_CHECK) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${VAR} \"${${VAR}}\")\n") +endforeach() + +foreach(_env IN LISTS VCPKG_ENV_VARS_TO_CHECK) + if(CMAKE_HOST_WIN32) + string(REPLACE "\\" "/" ENV_${_env} "$ENV{${_env}}") + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_ENV_${_env} \"${ENV_${_env}}\")\n") + else() + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_ENV_${_env} \"$ENV{${_env}}\")\n") + endif() +endforeach() + +macro(_vcpkg_adjust_flags flag_var) + if(MSVC) # Transform MSVC /flags to -flags due to bash scripts intepreting /flag as a path. + string(REGEX REPLACE "(^| )/" "\\1-" ${flag_var} "${${flag_var}}") + endif() + if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + if("${flag_var}" IN_LIST VCPKG_LANG_FLAGS) + # macOS - append arch and isysroot if cross-compiling + if(NOT "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}") + + foreach(arch IN LISTS CMAKE_OSX_ARCHITECTURES) + string(APPEND ${flag_var} " -arch ${arch}") + endforeach() + string(APPEND ${flag_var} " -isysroot ${CMAKE_OSX_SYSROOT}") + endif() + endif() + endif() +endmacro() + +foreach(flag IN LISTS VCPKG_FLAGS_TO_CHECK) + string(STRIP "${${flag}}" ${flag}) # Strip leading and trailing whitespaces + _vcpkg_adjust_flags(${flag}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag} \" ${${flag}}\")\n") + foreach(config IN LISTS VCPKG_CONFIGS) + string(STRIP "${${flag}_${config}}" ${flag}_${config}) + _vcpkg_adjust_flags(${flag}_${config}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag}_${config} \"${CMAKE_${flag}_FLAGS_${config}}\")\n") + set(COMBINED_${flag}_${config} "${${flag}} ${${flag}_${config}}") + string(STRIP "${COMBINED_${flag}_${config}}" COMBINED_${flag}_${config}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${flag}_${config} \"${COMBINED_${flag}_${config}}\")\n") + endforeach() +endforeach() + + +file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}") + +# Programs: +# CMAKE_AR +# CMAKE__COMPILER_AR (Wrapper) +# CMAKE_RANLIB +# CMAKE__COMPILER_RANLIB +# CMAKE_STRIP +# CMAKE_NM +# CMAKE_OBJDUMP +# CMAKE_DLLTOOL +# CMAKE_MT +# CMAKE_LINKER +# CMAKE_C_COMPILER +# CMAKE_CXX_COMPILER +# CMAKE_RC_COMPILER + +# Flags: +# CMAKE__FLAGS +# CMAKE__FLAGS_ +# CMAKE_RC_FLAGS +# CMAKE_SHARED_LINKER_FLAGS +# CMAKE_STATIC_LINKER_FLAGS +# CMAKE_STATIC_LINKER_FLAGS_ +# CMAKE_EXE_LINKER_FLAGS +# CMAKE_EXE_LINKER_FLAGS_ diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake deleted file mode 100644 index 21464bb2e63ded..00000000000000 --- a/scripts/get_triplet_environment.cmake +++ /dev/null @@ -1,15 +0,0 @@ -include(${CMAKE_TRIPLET_FILE}) -if (DEFINED CMAKE_ENV_OVERRIDES_FILE) - include(${CMAKE_ENV_OVERRIDES_FILE} OPTIONAL) -endif() - -# GUID used as a flag - "cut here line" -message("c35112b6-d1ba-415b-aa5d-81de856ef8eb") -message("VCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}") -message("VCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") -message("VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") -message("VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}") -message("VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}") -message("VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") -message("VCPKG_BUILD_TYPE=${VCPKG_BUILD_TYPE}") -message("VCPKG_ENV_PASSTHROUGH=${VCPKG_ENV_PASSTHROUGH}") diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 58510567b268c7..e33fa58657ea7a 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -1,130 +1,188 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.21) -macro(debug_message) - if(DEFINED PORT_DEBUG AND PORT_DEBUG) - message(STATUS "[DEBUG] ${ARGN}") - endif() -endmacro() - -#Detect .vcpkg-root to figure VCPKG_ROOT_DIR -SET(VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) -while(IS_DIRECTORY ${VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") - get_filename_component(VCPKG_ROOT_DIR_TEMP ${VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) - if (VCPKG_ROOT_DIR_TEMP STREQUAL VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive - message(FATAL_ERROR "Could not find .vcpkg-root") - else() - SET(VCPKG_ROOT_DIR_CANDIDATE ${VCPKG_ROOT_DIR_TEMP}) - endif() -endwhile() +set(SCRIPTS "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Location to stored scripts") +list(APPEND CMAKE_MODULE_PATH "${SCRIPTS}/cmake") +include("${SCRIPTS}/cmake/execute_process.cmake") +include("${SCRIPTS}/cmake/vcpkg_acquire_msys.cmake") +include("${SCRIPTS}/cmake/vcpkg_add_to_path.cmake") +include("${SCRIPTS}/cmake/vcpkg_apply_patches.cmake") +include("${SCRIPTS}/cmake/vcpkg_build_cmake.cmake") +include("${SCRIPTS}/cmake/vcpkg_build_make.cmake") +include("${SCRIPTS}/cmake/vcpkg_build_msbuild.cmake") +include("${SCRIPTS}/cmake/vcpkg_build_ninja.cmake") +include("${SCRIPTS}/cmake/vcpkg_build_nmake.cmake") +include("${SCRIPTS}/cmake/vcpkg_build_qmake.cmake") +include("${SCRIPTS}/cmake/vcpkg_buildpath_length_warning.cmake") +include("${SCRIPTS}/cmake/vcpkg_check_features.cmake") +include("${SCRIPTS}/cmake/vcpkg_check_linkage.cmake") +include("${SCRIPTS}/cmake/vcpkg_clean_executables_in_bin.cmake") +include("${SCRIPTS}/cmake/vcpkg_clean_msbuild.cmake") +include("${SCRIPTS}/cmake/vcpkg_configure_cmake.cmake") +include("${SCRIPTS}/cmake/vcpkg_configure_gn.cmake") +include("${SCRIPTS}/cmake/vcpkg_configure_make.cmake") +include("${SCRIPTS}/cmake/vcpkg_configure_meson.cmake") +include("${SCRIPTS}/cmake/vcpkg_configure_qmake.cmake") +include("${SCRIPTS}/cmake/vcpkg_copy_pdbs.cmake") +include("${SCRIPTS}/cmake/vcpkg_copy_tool_dependencies.cmake") +include("${SCRIPTS}/cmake/vcpkg_copy_tools.cmake") +include("${SCRIPTS}/cmake/vcpkg_download_distfile.cmake") +include("${SCRIPTS}/cmake/vcpkg_execute_build_process.cmake") +include("${SCRIPTS}/cmake/vcpkg_execute_required_process.cmake") +include("${SCRIPTS}/cmake/vcpkg_execute_required_process_repeat.cmake") +include("${SCRIPTS}/cmake/vcpkg_extract_source_archive.cmake") +include("${SCRIPTS}/cmake/vcpkg_extract_source_archive_ex.cmake") +include("${SCRIPTS}/cmake/vcpkg_fail_port_install.cmake") +include("${SCRIPTS}/cmake/vcpkg_find_acquire_program.cmake") +include("${SCRIPTS}/cmake/vcpkg_fixup_cmake_targets.cmake") +include("${SCRIPTS}/cmake/vcpkg_fixup_pkgconfig.cmake") +include("${SCRIPTS}/cmake/vcpkg_from_bitbucket.cmake") +include("${SCRIPTS}/cmake/vcpkg_from_git.cmake") +include("${SCRIPTS}/cmake/vcpkg_from_github.cmake") +include("${SCRIPTS}/cmake/vcpkg_from_gitlab.cmake") +include("${SCRIPTS}/cmake/vcpkg_from_sourceforge.cmake") +include("${SCRIPTS}/cmake/vcpkg_get_program_files_platform_bitness.cmake") +include("${SCRIPTS}/cmake/vcpkg_get_windows_sdk.cmake") +include("${SCRIPTS}/cmake/vcpkg_install_cmake.cmake") +include("${SCRIPTS}/cmake/vcpkg_install_gn.cmake") +include("${SCRIPTS}/cmake/vcpkg_install_make.cmake") +include("${SCRIPTS}/cmake/vcpkg_install_meson.cmake") +include("${SCRIPTS}/cmake/vcpkg_install_msbuild.cmake") +include("${SCRIPTS}/cmake/vcpkg_install_nmake.cmake") +include("${SCRIPTS}/cmake/vcpkg_install_qmake.cmake") +include("${SCRIPTS}/cmake/vcpkg_list.cmake") +include("${SCRIPTS}/cmake/vcpkg_minimum_required.cmake") +include("${SCRIPTS}/cmake/vcpkg_replace_string.cmake") +include("${SCRIPTS}/cmake/vcpkg_test_cmake.cmake") -set(VCPKG_ROOT_DIR ${VCPKG_ROOT_DIR_CANDIDATE}) +include("${SCRIPTS}/cmake/z_vcpkg_apply_patches.cmake") +include("${SCRIPTS}/cmake/z_vcpkg_forward_output_variable.cmake") +include("${SCRIPTS}/cmake/z_vcpkg_function_arguments.cmake") +include("${SCRIPTS}/cmake/z_vcpkg_get_cmake_vars.cmake") +include("${SCRIPTS}/cmake/z_vcpkg_prettify_command_line.cmake") -list(APPEND CMAKE_MODULE_PATH ${VCPKG_ROOT_DIR}/scripts/cmake) -set(CURRENT_INSTALLED_DIR ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET} CACHE PATH "Location to install final packages") -set(DOWNLOADS ${VCPKG_ROOT_DIR}/downloads CACHE PATH "Location to download sources and tools") -set(PACKAGES_DIR ${VCPKG_ROOT_DIR}/packages CACHE PATH "Location to store package images") -set(BUILDTREES_DIR ${VCPKG_ROOT_DIR}/buildtrees CACHE PATH "Location to perform actual extract+config+build") +function(debug_message) + if(PORT_DEBUG) + z_vcpkg_function_arguments(ARGS) + list(JOIN ARGS " " ARG_STRING) + message(STATUS "[DEBUG] " "${ARG_STRING}") + endif() +endfunction() +function(z_vcpkg_deprecation_message) + z_vcpkg_function_arguments(ARGS) + list(JOIN ARGS " " ARG_STRING) + message(DEPRECATION "${ARG_STRING}") +endfunction() -if(PORT) - set(CURRENT_BUILDTREES_DIR ${BUILDTREES_DIR}/${PORT}) - set(CURRENT_PACKAGES_DIR ${PACKAGES_DIR}/${PORT}_${TARGET_TRIPLET}) +option(_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES "Controls whether use of a backcompat only support feature fails the build.") +if (_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES) + set(Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL "FATAL_ERROR") +else() + set(Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL "WARNING") endif() +vcpkg_minimum_required(VERSION 2021-08-03) + +file(TO_CMAKE_PATH "${BUILDTREES_DIR}" BUILDTREES_DIR) +file(TO_CMAKE_PATH "${PACKAGES_DIR}" PACKAGES_DIR) + +set(CURRENT_INSTALLED_DIR "${_VCPKG_INSTALLED_DIR}/${TARGET_TRIPLET}" CACHE PATH "Location to install final packages") + +if(PORT) + set(CURRENT_BUILDTREES_DIR "${BUILDTREES_DIR}/${PORT}") + set(CURRENT_PACKAGES_DIR "${PACKAGES_DIR}/${PORT}_${TARGET_TRIPLET}") +endif() if(CMD MATCHES "^BUILD$") - set(CMAKE_TRIPLET_FILE ${TARGET_TRIPLET_FILE}) - if(NOT EXISTS ${CMAKE_TRIPLET_FILE}) + set(CMAKE_TRIPLET_FILE "${TARGET_TRIPLET_FILE}") + if(NOT EXISTS "${CMAKE_TRIPLET_FILE}") message(FATAL_ERROR "Unsupported target triplet. Triplet file does not exist: ${CMAKE_TRIPLET_FILE}") endif() if(NOT DEFINED CURRENT_PORT_DIR) message(FATAL_ERROR "CURRENT_PORT_DIR was not defined") endif() - set(TO_CMAKE_PATH "${CURRENT_PORT_DIR}" CURRENT_PORT_DIR) - if(NOT EXISTS ${CURRENT_PORT_DIR}) + file(TO_CMAKE_PATH "${CURRENT_PORT_DIR}" CURRENT_PORT_DIR) + if(NOT EXISTS "${CURRENT_PORT_DIR}") message(FATAL_ERROR "Cannot find port: ${PORT}\n Directory does not exist: ${CURRENT_PORT_DIR}") endif() - if(NOT EXISTS ${CURRENT_PORT_DIR}/portfile.cmake) + if(NOT EXISTS "${CURRENT_PORT_DIR}/portfile.cmake") message(FATAL_ERROR "Port is missing portfile: ${CURRENT_PORT_DIR}/portfile.cmake") endif() - if(NOT EXISTS ${CURRENT_PORT_DIR}/CONTROL) - message(FATAL_ERROR "Port is missing control file: ${CURRENT_PORT_DIR}/CONTROL") + if(NOT EXISTS "${CURRENT_PORT_DIR}/CONTROL" AND NOT EXISTS "${CURRENT_PORT_DIR}/vcpkg.json") + message(FATAL_ERROR "Port is missing control or manifest file: ${CURRENT_PORT_DIR}/{CONTROL,vcpkg.json}") endif() unset(PACKAGES_DIR) unset(BUILDTREES_DIR) - if(EXISTS ${CURRENT_PACKAGES_DIR}) - file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*") - if(FILES_IN_CURRENT_PACKAGES_DIR) - file(REMOVE_RECURSE ${FILES_IN_CURRENT_PACKAGES_DIR}) - file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*") - if(FILES_IN_CURRENT_PACKAGES_DIR) - message(FATAL_ERROR "Unable to empty directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.") - endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}") + if(EXISTS "${CURRENT_PACKAGES_DIR}") + message(FATAL_ERROR "Unable to remove directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.") endif() endif() - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR} ${CURRENT_PACKAGES_DIR}) + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}" "${CURRENT_PACKAGES_DIR}") - include(${CMAKE_TRIPLET_FILE}) - include(${ENV_OVERRIDES_FILE} OPTIONAL) - set(TRIPLET_SYSTEM_ARCH ${VCPKG_TARGET_ARCHITECTURE}) - include(${CMAKE_CURRENT_LIST_DIR}/cmake/vcpkg_common_definitions.cmake) - include(${CMAKE_CURRENT_LIST_DIR}/cmake/vcpkg_common_functions.cmake) - include(${CURRENT_PORT_DIR}/portfile.cmake) + include("${CMAKE_TRIPLET_FILE}") - set(BUILD_INFO_FILE_PATH ${CURRENT_PACKAGES_DIR}/BUILD_INFO) - file(WRITE ${BUILD_INFO_FILE_PATH} "CRTLinkage: ${VCPKG_CRT_LINKAGE}\n") - file(APPEND ${BUILD_INFO_FILE_PATH} "LibraryLinkage: ${VCPKG_LIBRARY_LINKAGE}\n") - - if (DEFINED VCPKG_POLICY_DLLS_WITHOUT_LIBS) - file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyDLLsWithoutLIBs: ${VCPKG_POLICY_DLLS_WITHOUT_LIBS}\n") - endif() - if (DEFINED VCPKG_POLICY_EMPTY_PACKAGE) - file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyEmptyPackage: ${VCPKG_POLICY_EMPTY_PACKAGE}\n") + if (DEFINED VCPKG_PORT_CONFIGS) + foreach(VCPKG_PORT_CONFIG IN LISTS VCPKG_PORT_CONFIGS) + include("${VCPKG_PORT_CONFIG}") + endforeach() endif() - if (DEFINED VCPKG_POLICY_ONLY_RELEASE_CRT) - file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyOnlyReleaseCRT: ${VCPKG_POLICY_ONLY_RELEASE_CRT}\n") - endif() - if (DEFINED VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT) - file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyAllowObsoleteMsvcrt: ${VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT}\n") - endif() - if (DEFINED VCPKG_POLICY_EMPTY_INCLUDE_FOLDER) - file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyEmptyIncludeFolder: ${VCPKG_POLICY_EMPTY_INCLUDE_FOLDER}\n") - endif() - if (DEFINED VCPKG_HEAD_VERSION) - file(APPEND ${BUILD_INFO_FILE_PATH} "Version: ${VCPKG_HEAD_VERSION}\n") + + set(HOST_TRIPLET "${_HOST_TRIPLET}") + set(CURRENT_HOST_INSTALLED_DIR "${_VCPKG_INSTALLED_DIR}/${HOST_TRIPLET}" CACHE PATH "Location to install final packages for the host") + + set(TRIPLET_SYSTEM_ARCH "${VCPKG_TARGET_ARCHITECTURE}") + include("${SCRIPTS}/cmake/vcpkg_common_definitions.cmake") + + include("${CURRENT_PORT_DIR}/portfile.cmake") + if(DEFINED PORT) + include("${SCRIPTS}/build_info.cmake") endif() elseif(CMD MATCHES "^CREATE$") - file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR) - file(TO_NATIVE_PATH ${DOWNLOADS} NATIVE_DOWNLOADS) - if(EXISTS ports/${PORT}/portfile.cmake) - message(FATAL_ERROR "Portfile already exists: '${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}\\portfile.cmake'") + file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}" NATIVE_VCPKG_ROOT_DIR) + file(TO_NATIVE_PATH "${DOWNLOADS}" NATIVE_DOWNLOADS) + if(NOT DEFINED PORT_PATH) + set(PORT_PATH "${VCPKG_ROOT_DIR}/ports/${PORT}") + endif() + file(TO_NATIVE_PATH "${PORT_PATH}" NATIVE_PORT_PATH) + set(PORTFILE_PATH "${PORT_PATH}/portfile.cmake") + file(TO_NATIVE_PATH "${PORTFILE_PATH}" NATIVE_PORTFILE_PATH) + set(MANIFEST_PATH "${PORT_PATH}/vcpkg.json") + file(TO_NATIVE_PATH "${MANIFEST_PATH}" NATIVE_MANIFEST_PATH) + + if(EXISTS "${PORTFILE_PATH}") + message(FATAL_ERROR "Portfile already exists: '${NATIVE_PORTFILE_PATH}'") endif() if(NOT FILENAME) get_filename_component(FILENAME "${URL}" NAME) endif() - string(REGEX REPLACE "(\\.(zip|gz|tar|tgz|bz2))+\$" "" ROOT_NAME ${FILENAME}) - if(EXISTS ${DOWNLOADS}/${FILENAME}) - message(STATUS "Using pre-downloaded: ${NATIVE_DOWNLOADS}\\${FILENAME}") - message(STATUS "If this is not desired, delete the file and ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}") + string(REGEX REPLACE "(\\.(zip|gz|tar|tgz|bz2))+\$" "" ROOT_NAME "${FILENAME}") + + set(DOWNLOAD_PATH "${DOWNLOADS}/${FILENAME}") + file(TO_NATIVE_PATH "${DOWNLOAD_PATH}" NATIVE_DOWNLOAD_PATH) + + if(EXISTS "${DOWNLOAD_PATH}") + message(STATUS "Using pre-downloaded: ${NATIVE_DOWNLOAD_PATH}") + message(STATUS "If this is not desired, delete the file and ${NATIVE_PORT_PATH}") else() - include(vcpkg_download_distfile) - set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") - vcpkg_download_distfile(ARCHIVE - URLS ${URL} - FILENAME ${FILENAME} - ) - set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") + message(STATUS "Downloading ${URL} -> ${FILENAME}...") + file(DOWNLOAD "${URL}" "${DOWNLOAD_PATH}" STATUS download_status) + list(GET download_status 0 status_code) + if(NOT "${download_status}" EQUAL "0") + message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}") + endif() endif() - file(SHA512 ${DOWNLOADS}/${FILENAME} SHA512) + file(SHA512 "${DOWNLOAD_PATH}" SHA512) - file(MAKE_DIRECTORY ports/${PORT}) - configure_file(scripts/templates/portfile.in.cmake ports/${PORT}/portfile.cmake @ONLY) - configure_file(scripts/templates/CONTROL.in ports/${PORT}/CONTROL @ONLY) + file(MAKE_DIRECTORY "${PORT_PATH}") + configure_file("${SCRIPTS}/templates/portfile.in.cmake" "${PORTFILE_PATH}" @ONLY) + configure_file("${SCRIPTS}/templates/vcpkg.json.in" "${MANIFEST_PATH}" @ONLY) - message(STATUS "Generated portfile: ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}\\portfile.cmake") - message(STATUS "Generated CONTROL: ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}\\CONTROL") + message(STATUS "Generated portfile: ${NATIVE_PORTFILE_PATH}") + message(STATUS "Generated manifest: ${NATIVE_MANIFEST_PATH}") message(STATUS "To launch an editor for these new files, run") message(STATUS " .\\vcpkg edit ${PORT}") endif() diff --git a/scripts/templates/CONTROL.in b/scripts/templates/CONTROL.in deleted file mode 100644 index c5b706861d40f1..00000000000000 --- a/scripts/templates/CONTROL.in +++ /dev/null @@ -1,3 +0,0 @@ -Source: @PORT@ -Version: -Description: \ No newline at end of file diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index 33f8a4853c92de..5cd363ddce5935 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -2,15 +2,35 @@ # CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET} +# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads # PORT = current port name (zlib, etc) # TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) # VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) # VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) # VCPKG_ROOT_DIR = # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# VCPKG_TOOLCHAIN = ON OFF +# TRIPLET_SYSTEM_ARCH = arm x86 x64 +# BUILD_ARCH = "Win32" "x64" "ARM" +# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} +# DEBUG_CONFIG = "Debug Static" "Debug Dll" +# RELEASE_CONFIG = "Release Static"" "Release DLL" +# VCPKG_TARGET_IS_WINDOWS +# VCPKG_TARGET_IS_UWP +# VCPKG_TARGET_IS_LINUX +# VCPKG_TARGET_IS_OSX +# VCPKG_TARGET_IS_FREEBSD +# VCPKG_TARGET_IS_ANDROID +# VCPKG_TARGET_IS_MINGW +# VCPKG_TARGET_EXECUTABLE_SUFFIX +# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX +# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX # +# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md -include(vcpkg_common_functions) +# # Specifies if the port install should fail immediately given a condition +# vcpkg_fail_port_install(MESSAGE "@PORT@ currently only supports Linux and Mac platforms" ON_TARGET "Windows") vcpkg_download_distfile(ARCHIVE URLS "@URL@" @@ -20,16 +40,25 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + ARCHIVE ${ARCHIVE} # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag). # REF 1.0.0 - # (Optional) Read the docs for how to generate patches at: + # (Optional) Read the docs for how to generate patches at: # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md # PATCHES # 001_port_fixes.patch # 002_more_port_fixes.patch ) +# # Check if one or more features are a part of a package installation. +# # See /docs/maintainers/vcpkg_check_features.md for more details +# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +# FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used +# tbb WITH_TBB +# INVERTED_FEATURES +# tbb ROCKSDB_IGNORE_PACKAGE_TBB +# ) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja @@ -40,8 +69,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Handle copyright -# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@ RENAME copyright) +# # Moves all .cmake files from /debug/share/@PORT@/ to /share/@PORT@/ +# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details +# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/@PORT@) -# Post-build test for cmake libraries -# vcpkg_test_cmake(PACKAGE_NAME @PORT@) +# # Handle copyright +# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@ RENAME copyright) diff --git a/scripts/templates/vcpkg.json.in b/scripts/templates/vcpkg.json.in new file mode 100644 index 00000000000000..2e217387e76ecc --- /dev/null +++ b/scripts/templates/vcpkg.json.in @@ -0,0 +1,16 @@ +{ + "name": "@PORT@", + "version-string": "", + "homepage": "", + "description": "", + "dependencies": [], + + "default-features": [], + "features": [ + { + "name": "", + "description": "", + "dependencies": [] + } + ] +} diff --git a/scripts/test_ports/cmake/portfile.cmake b/scripts/test_ports/cmake/portfile.cmake new file mode 100644 index 00000000000000..3a74a2e65a6110 --- /dev/null +++ b/scripts/test_ports/cmake/portfile.cmake @@ -0,0 +1,75 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.kitware.com/ + OUT_SOURCE_PATH SOURCE_PATH + REPO cmake/cmake + REF + b7b0fb430397bafae4a7bd80b41d474c91a3b7f3 + SHA512 + 3b0de26910bceaf4bc6546255bada4c502cd0fd32f44bc28b067f347c09d028c175a3243551bbe4bb64bcf312df9ff827e8fdbcb0b34a12e1ce4a26ba0799ee2 + HEAD_REF master +) +set(OPTIONS) +if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP) + list(APPEND OPTIONS -DBUILD_CursesDialog=ON) +else() + list(APPEND OPTIONS -DBUILD_CursesDialog=OFF) +endif() + +if(VCPKG_CROSSCOMPILING) + list(APPEND OPTIONS -DQt6CoreTools_DIR=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6CoreTools) + list(APPEND OPTIONS -DQt6WidgetsTools_DIR=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6WidgetsTools) + list(APPEND OPTIONS -DQt6GuiTools_DIR=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6GuiTools) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 AND VCPKG_TARGET_IS_WINDOWS) # Remove if PR #16111 is merged + list(APPEND OPTIONS -DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64 -DCMAKE_SYSTEM_NAME:STRING=Windows) + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${OPTIONS} + -DBUILD_TESTING=OFF + #-DCMAKE_USE_SYSTEM_LIBRARIES=ON + -DCMAKE_USE_SYSTEM_LIBARCHIVE=ON + -DCMAKE_USE_SYSTEM_CURL=ON + -DCMAKE_USE_SYSTEM_EXPAT=ON + -DCMAKE_USE_SYSTEM_ZLIB=ON + -DCMAKE_USE_SYSTEM_BZIP2=ON + -DCMAKE_USE_SYSTEM_ZSTD=ON + -DCMAKE_USE_SYSTEM_FORM=ON + -DCMAKE_USE_SYSTEM_JSONCPP=ON + -DCMAKE_USE_SYSTEM_LIBRHASH=OFF # not yet in VCPKG + -DCMAKE_USE_SYSTEM_LIBUV=ON + -DBUILD_QtDialog=ON # Just to test Qt with CMake + -DCMake_QT_MAJOR_VERSION:STRING=6 +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_copy_pdbs() + +if(NOT VCPKG_TARGET_IS_OSX) + set(_tools cmake cmake-gui ctest cpack) + if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND _tools cmcldeps) + endif() + if(BUILD_CURSES_DIALOG) + list(APPEND _tools ccmake) + endif() + vcpkg_copy_tools(TOOL_NAMES ${_tools} AUTO_CLEAN) +else() + # On OSX everything is within a CMake.app folder + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) + file(RENAME "${CURRENT_PACKAGES_DIR}/CMake.app" "${CURRENT_PACKAGES_DIR}/tools/CMake.app") + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/CMake.app") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/debug) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/CMake.app" "${CURRENT_PACKAGES_DIR}/tools/debug/CMake.app") + endif() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/scripts/test_ports/cmake/vcpkg.json b/scripts/test_ports/cmake/vcpkg.json new file mode 100644 index 00000000000000..541ea1d77bb7b2 --- /dev/null +++ b/scripts/test_ports/cmake/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "cmake", + "version-string": "3.20.0", + "description": "CMake is an open-source, cross-platform family of tools designed to build, test and package software.", + "homepage": "https://cmake.org/", + "dependencies": [ + "bzip2", + "curl", + "expat", + "jsoncpp", + "libarchive", + "liblzma", + "libuv", + { + "name": "ncurses", + "platform": "!(windows | uwp)" + }, + "nghttp2", + "qtbase", + "zlib", + "zstd" + ] +} diff --git a/scripts/test_ports/llfio-run-tests/CONTROL b/scripts/test_ports/llfio-run-tests/CONTROL new file mode 100644 index 00000000000000..eeac83f9155fec --- /dev/null +++ b/scripts/test_ports/llfio-run-tests/CONTROL @@ -0,0 +1,5 @@ +Source: llfio-run-tests +Version: 0 +Description: Ensures that LLFIO built with vcpkg version of dependencies produces working executables. +Build-Depends: llfio[run-tests], llfio[status-code,run-tests] +Supports: x64 diff --git a/scripts/test_ports/llfio-run-tests/portfile.cmake b/scripts/test_ports/llfio-run-tests/portfile.cmake new file mode 100644 index 00000000000000..065116c276adcf --- /dev/null +++ b/scripts/test_ports/llfio-run-tests/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/scripts/test_ports/outcome-run-tests/CONTROL b/scripts/test_ports/outcome-run-tests/CONTROL new file mode 100644 index 00000000000000..bc289efab9465b --- /dev/null +++ b/scripts/test_ports/outcome-run-tests/CONTROL @@ -0,0 +1,5 @@ +Source: outcome-run-tests +Version: 0 +Description: Ensures that outcome built with vcpkg version of dependencies produces working executables. +Build-Depends: outcome[run-tests] +Supports: x64 diff --git a/scripts/test_ports/outcome-run-tests/portfile.cmake b/scripts/test_ports/outcome-run-tests/portfile.cmake new file mode 100644 index 00000000000000..065116c276adcf --- /dev/null +++ b/scripts/test_ports/outcome-run-tests/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/scripts/test_ports/unit-test-cmake/portfile.cmake b/scripts/test_ports/unit-test-cmake/portfile.cmake new file mode 100644 index 00000000000000..a567c11dec0f76 --- /dev/null +++ b/scripts/test_ports/unit-test-cmake/portfile.cmake @@ -0,0 +1,83 @@ +function(set_fatal_error err) + set(Z_VCPKG_UNIT_TEST_HAS_FATAL_ERROR "ON" CACHE BOOL "" FORCE) + set(Z_VCPKG_UNIT_TEST_FATAL_ERROR "${err}" CACHE STRING "" FORCE) +endfunction() +function(unset_fatal_error) + set(Z_VCPKG_UNIT_TEST_HAS_FATAL_ERROR "OFF" CACHE BOOL "" FORCE) +endfunction() +function(set_has_error) + set(Z_VCPKG_UNIT_TEST_HAS_ERROR ON CACHE BOOL "" FORCE) +endfunction() + +macro(message level msg) + if("${level}" STREQUAL "FATAL_ERROR") + set_fatal_error("${msg}") + return() + else() + _message("${level}" "${msg}") # note: this results in incorrect printing, but that's fine + # message(STATUS "\${asdf}") will result in + # message(STATUS "${asdf}"), since that's how macro arguments work. + endif() +endmacro() + +set(Z_VCPKG_UNIT_TEST_HAS_ERROR OFF CACHE BOOL "" FORCE) +unset_fatal_error() + +function(unit_test_check_variable_equal utcve_test utcve_variable utcve_value) + cmake_language(EVAL CODE "${utcve_test}") + if(Z_VCPKG_UNIT_TEST_HAS_FATAL_ERROR) + unset_fatal_error() + set_has_error() + message(STATUS "${utcve_test} had an unexpected FATAL_ERROR; + expected: \"${utcve_value}\"") + message(STATUS "FATAL_ERROR: ${Z_VCPKG_UNIT_TEST_FATAL_ERROR}") + return() + endif() + + if(NOT DEFINED "${utcve_variable}") + message(STATUS "${utcve_test} failed to set ${utcve_variable}; + expected: \"${utcve_value}\"") + set_has_error() + return() + endif() + if(NOT "${${utcve_variable}}" STREQUAL "${utcve_value}") + message(STATUS "${utcve_test} resulted in the wrong value for ${utcve_variable}; + expected: \"${utcve_value}\" + actual : \"${${utcve_variable}}\"") + set_has_error() + return() + endif() +endfunction() + +function(unit_test_ensure_success utcve_test) + cmake_language(EVAL CODE "${utcve_test}") + if(Z_VCPKG_UNIT_TEST_HAS_FATAL_ERROR) + set_has_error() + message(STATUS "${utcve_test} was expected to be successful.") + endif() + unset_fatal_error() +endfunction() +function(unit_test_ensure_fatal_error utcve_test) + cmake_language(EVAL CODE "${utcve_test}") + if(NOT Z_VCPKG_UNIT_TEST_HAS_FATAL_ERROR) + set_has_error() + message(STATUS "${utcve_test} was expected to be a FATAL_ERROR.") + endif() + unset_fatal_error() +endfunction() + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +if("minimum-required" IN_LIST FEATURES) + include("${CMAKE_CURRENT_LIST_DIR}/test-vcpkg_minimum_required.cmake") +endif() +if("list" IN_LIST FEATURES) + include("${CMAKE_CURRENT_LIST_DIR}/test-vcpkg_list.cmake") +endif() +if("function-arguments" IN_LIST FEATURES) + include("${CMAKE_CURRENT_LIST_DIR}/test-z_vcpkg_function_arguments.cmake") +endif() + +if(Z_VCPKG_UNIT_TEST_HAS_ERROR) + _message(FATAL_ERROR "At least one test failed") +endif() diff --git a/scripts/test_ports/unit-test-cmake/test-vcpkg_list.cmake b/scripts/test_ports/unit-test-cmake/test-vcpkg_list.cmake new file mode 100644 index 00000000000000..c0f3ac8c07ecbd --- /dev/null +++ b/scripts/test_ports/unit-test-cmake/test-vcpkg_list.cmake @@ -0,0 +1,813 @@ +# vcpkg_list(SET ...) +unit_test_check_variable_equal( + [[vcpkg_list(SET lst)]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(SET lst "")]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(SET lst "" "")]] + lst ";" +) +unit_test_check_variable_equal( + [[vcpkg_list(SET lst a)]] + lst "a" +) +unit_test_check_variable_equal( + [[vcpkg_list(SET lst a b)]] + lst "a;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(SET lst "a;b")]] + lst [[a\;b]] +) +unit_test_check_variable_equal( + [=[vcpkg_list(SET lst "a;b" "c" [[d\;e]])]=] + lst [[a\;b;c;d\\;e]] +) + +# vcpkg_list(LENGTH ) +set(lst [[]]) +unit_test_check_variable_equal( + [[vcpkg_list(LENGTH lst out)]] + out 0 +) +set(lst [[;]]) +unit_test_check_variable_equal( + [[vcpkg_list(LENGTH lst out)]] + out 2 +) +set(lst [[a]]) +unit_test_check_variable_equal( + [[vcpkg_list(LENGTH lst out)]] + out 1 +) +set(lst [[a;b]]) +unit_test_check_variable_equal( + [[vcpkg_list(LENGTH lst out)]] + out 2 +) +set(lst [[a\\;b]]) +unit_test_check_variable_equal( + [[vcpkg_list(LENGTH lst out)]] + out 1 +) +set(lst [[a\;b;c\\;d]]) +unit_test_check_variable_equal( + [[vcpkg_list(LENGTH lst out)]] + out 2 +) + +# vcpkg_list(GET ) +set(lst "") +unit_test_ensure_fatal_error([[vcpkg_list(GET lst 0 out)]]) + +set(lst "a") +unit_test_check_variable_equal( + [[vcpkg_list(GET lst 0 out)]] + out "a" +) +unit_test_check_variable_equal( + [[vcpkg_list(GET lst -1 out)]] + out "a" +) +unit_test_ensure_fatal_error([[vcpkg_list(GET lst 2 out)]]) +unit_test_ensure_fatal_error([[vcpkg_list(GET lst -2 out)]]) + +set(lst ";b") +unit_test_check_variable_equal( + [[vcpkg_list(GET lst 0 out)]] + out "" +) +unit_test_check_variable_equal( + [[vcpkg_list(GET lst -1 out)]] + out "b" +) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(GET lst 0 out)]] + out "a" +) +unit_test_check_variable_equal( + [[vcpkg_list(GET lst -1 out)]] + out "b" +) + +set(lst [[a\;b;c]]) +unit_test_check_variable_equal( + [[vcpkg_list(GET lst 0 out)]] + out "a;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(GET lst -1 out)]] + out "c" +) + +set(lst [[a;b\;c;d\\;e]]) +unit_test_check_variable_equal( + [[vcpkg_list(GET lst 1 out)]] + out "b;c" +) +unit_test_check_variable_equal( + [[vcpkg_list(GET lst -1 out)]] + out [[d\;e]] +) + +# vcpkg_list(JOIN ) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(JOIN lst "-" out)]] + out "" +) + +set(lst "a") +unit_test_check_variable_equal( + [[vcpkg_list(JOIN lst "-" out)]] + out "a" +) + +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(JOIN lst "-" out)]] + out "-" +) + +set(lst [[a;b]]) +unit_test_check_variable_equal( + [[vcpkg_list(JOIN lst "-" out)]] + out [[a-b]] +) +unit_test_check_variable_equal( + [[vcpkg_list(JOIN lst "+" out)]] + out [[a+b]] +) + +set(lst [[a;b\;c\\;d]]) +unit_test_check_variable_equal( + [[vcpkg_list(JOIN lst "-" out)]] + out [[a-b;c\;d]] +) + +# vcpkg_list(SUBLIST ) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 0 0 out)]] + out "" +) +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 0 1 out)]] + out "" +) +unit_test_ensure_fatal_error([[vcpkg_list(SUBLIST lst 1 0 out)]]) + +set(lst "a") +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 0 0 out)]] + out "" +) +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 0 1 out)]] + out "a" +) +unit_test_ensure_fatal_error([[vcpkg_list(SUBLIST lst 2 0 out)]]) +unit_test_ensure_fatal_error([[vcpkg_list(SUBLIST lst 2 1 out)]]) + +set(lst ";;") +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 0 0 out)]] + out "" +) +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 0 1 out)]] + out "" +) +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 0 2 out)]] + out ";" +) +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 0 3 out)]] + out ";;" +) + +set(lst "a;b;c;d") +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 1 2 out)]] + out "b;c" +) + +set(lst [[a\;b;c\;d;e]]) +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 1 2 out)]] + out [[c\;d;e]] +) + +set(lst [[a\;b;c\\;d;e;f;g;h]]) +unit_test_check_variable_equal( + [[vcpkg_list(SUBLIST lst 1 -1 out)]] + out [[c\\;d;e;f;g;h]] +) + +# vcpkg_list(FIND ) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(FIND lst "a" out)]] + out -1 +) + +set(lst "b") +unit_test_check_variable_equal( + [[vcpkg_list(FIND lst "a" out)]] + out -1 +) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(FIND lst "a" out)]] + out 0 +) +unit_test_check_variable_equal( + [[vcpkg_list(FIND lst b out)]] + out 1 +) + +set(lst ";b") +unit_test_check_variable_equal( + [[vcpkg_list(FIND lst "" out)]] + out 0 +) +unit_test_check_variable_equal( + [[vcpkg_list(FIND lst b out)]] + out 1 +) + +set(lst [[a\;b;c]]) +unit_test_check_variable_equal( + [[vcpkg_list(FIND lst "a;b" out)]] + out 0 +) +unit_test_check_variable_equal( + [[vcpkg_list(FIND lst c out)]] + out 1 +) +unit_test_check_variable_equal( + [[vcpkg_list(FIND lst a out)]] + out -1 +) + +set(lst [[a\\;b;c]]) +unit_test_check_variable_equal( + [=[vcpkg_list(FIND lst [[a\;b]] out)]=] + out 0 +) + +# vcpkg_list(APPEND [...]) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst)]] + lst [[]] +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst "")]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst "" "")]] + lst ";" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst a)]] + lst "a" +) + +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst)]] + lst ";" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst "")]] + lst ";;" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst b)]] + lst ";;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst "b;c" d)]] + lst [[;;b\;c;d]] +) + +set(lst "a") +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst)]] + lst "a" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst "")]] + lst "a;" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst b)]] + lst "a;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst "b;c" d)]] + lst [[a;b\;c;d]] +) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst)]] + lst "a;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst "")]] + lst "a;b;" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst c)]] + lst "a;b;c" +) +unit_test_check_variable_equal( + [[vcpkg_list(APPEND lst "c;d" e)]] + lst [[a;b;c\;d;e]] +) +unit_test_check_variable_equal( + [=[vcpkg_list(APPEND lst [[c\;d]])]=] + lst [[a;b;c\\;d]] +) + +# vcpkg_list(PREPEND [...]) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst)]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst "")]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst "" "")]] + lst ";" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst a)]] + lst "a" +) + +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst)]] + lst ";" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst "")]] + lst ";;" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst b)]] + lst "b;;" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst "b;c" d)]] + lst [[b\;c;d;;]] +) + +set(lst "a") +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst)]] + lst "a" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst "")]] + lst ";a" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst b)]] + lst "b;a" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst "b;c" d)]] + lst [[b\;c;d;a]] +) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst)]] + lst "a;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst "")]] + lst ";a;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst c)]] + lst "c;a;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(PREPEND lst "c;d" e)]] + lst [[c\;d;e;a;b]] +) +unit_test_check_variable_equal( + [=[vcpkg_list(PREPEND lst [[c\;d]])]=] + lst [[c\\;d;a;b]] +) + +# list(INSERT [...]) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 0)]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 0 "")]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 0 "" "")]] + lst ";" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 0 "a")]] + lst "a" +) +unit_test_ensure_fatal_error([[vcpkg_list(INSERT lst 1 "")]]) +unit_test_ensure_fatal_error([[vcpkg_list(INSERT lst -1 "")]]) + +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 0)]] + lst ";" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 1)]] + lst ";" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 1 "")]] + lst ";;" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 0 b)]] + lst "b;;" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 1 b)]] + lst ";b;" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 2 b)]] + lst ";;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst -1 "b;c" d)]] + lst [[;b\;c;d;]] +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst -2 "b;c" d)]] + lst [[b\;c;d;;]] +) +unit_test_ensure_fatal_error([[vcpkg_list(INSERT lst 3 "")]]) +unit_test_ensure_fatal_error([[vcpkg_list(INSERT lst -3 "")]]) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst -1 c)]] + lst "a;c;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 1 c)]] + lst "a;c;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 2 c)]] + lst "a;b;c" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst -2 c)]] + lst "c;a;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(INSERT lst 1 "c;d")]] + lst [[a;c\;d;b]] +) +unit_test_check_variable_equal( + [=[vcpkg_list(INSERT lst 1 [[c\;d]] e)]=] + lst [[a;c\\;d;e;b]] +) + +# vcpkg_list(POP_BACK ) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(POP_BACK lst)]] + lst "" +) + +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(POP_BACK lst)]] + lst "" +) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(POP_BACK lst)]] + lst "a" +) + +set(lst "a;;b") +unit_test_check_variable_equal( + [[vcpkg_list(POP_BACK lst)]] + lst "a;" +) + +set(lst [[a\;b]]) +unit_test_check_variable_equal( + [[vcpkg_list(POP_BACK lst)]] + lst "" +) + +set(lst [[c;a\;b;c]]) +unit_test_check_variable_equal( + [[vcpkg_list(POP_BACK lst)]] + lst [[c;a\;b]] +) + +# vcpkg_list(POP_FRONT ) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(POP_BACK lst)]] + lst "" +) + +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(POP_FRONT lst)]] + lst "" +) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(POP_FRONT lst)]] + lst "b" +) + +set(lst "a;;b") +unit_test_check_variable_equal( + [[vcpkg_list(POP_FRONT lst)]] + lst ";b" +) + +set(lst [[a\;b]]) +unit_test_check_variable_equal( + [[vcpkg_list(POP_FRONT lst)]] + lst "" +) + +set(lst [[c;a\;b;c]]) +unit_test_check_variable_equal( + [[vcpkg_list(POP_FRONT lst)]] + lst [[a\;b;c]] +) + +# vcpkg_list(REMOVE_DUPLICATES ) +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_DUPLICATES lst)]] + lst "" +) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_DUPLICATES lst)]] + lst "a;b" +) + +set(lst "a;a;b") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_DUPLICATES lst)]] + lst "a;b" +) + +set(lst "a;b;a") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_DUPLICATES lst)]] + lst "a;b" +) + +set(lst "c;a;b;a;c") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_DUPLICATES lst)]] + lst "c;a;b" +) + +set(lst "a;;b") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_DUPLICATES lst)]] + lst "a;;b" +) + +set(lst [[a\;b;a\;b]]) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_DUPLICATES lst)]] + lst [[a\;b]] +) + +set(lst [[c;a\;b;c]]) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_DUPLICATES lst)]] + lst [[c;a\;b]] +) + +# vcpkg_list(REVERSE ) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(REVERSE lst)]] + lst "" +) +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(REVERSE lst)]] + lst ";" +) +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(REVERSE lst)]] + lst "b;a" +) +set(lst "a;b;c;d;e;f;g") +unit_test_check_variable_equal( + [[vcpkg_list(REVERSE lst)]] + lst "g;f;e;d;c;b;a" +) + +set(lst [[a\;b;a\;b\\;c]]) +unit_test_check_variable_equal( + [[vcpkg_list(REVERSE lst)]] + lst [[a\;b\\;c;a\;b]] +) +set(lst [[c;a\;b]]) +unit_test_check_variable_equal( + [[vcpkg_list(REVERSE lst)]] + lst [[a\;b;c]] +) + +# vcpkg_list(REMOVE_ITEM ) +set(lst "") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst "a")]] + lst "" +) + +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst "")]] + lst "" +) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst a)]] + lst "b" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst b)]] + lst "a" +) + +set(lst "a;a;b") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst a)]] + lst "b" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst b)]] + lst "a;a" +) + +set(lst "a;b;c;a;d") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst b)]] + lst "a;c;a;d" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst a)]] + lst "b;c;d" +) + +set(lst "a;;b") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst "")]] + lst "a;b" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst a)]] + lst ";b" +) + +set(lst [[e;a\;b;c\;d]]) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst "a;b")]] + lst [[e;c\;d]] +) + +set(lst [[c;a\;b;c]]) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst "c")]] + lst [[a\;b]] +) + +set(lst [[c;a\\;b;c]]) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_ITEM lst "a\\;b")]] + lst [[c;c]] +) + +# vcpkg_list(REMOVE_AT ) +set(lst "") +unit_test_ensure_fatal_error([[vcpkg_list(REMOVE_AT lst 0)]]) + +set(lst ";") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 0)]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 1)]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst -1)]] + lst "" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst -2)]] + lst "" +) +unit_test_ensure_fatal_error([[vcpkg_list(REMOVE_AT lst 2)]]) +unit_test_ensure_fatal_error([[vcpkg_list(REMOVE_AT lst -3)]]) + +set(lst "a;b") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 0)]] + lst "b" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 1)]] + lst "a" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst -1)]] + lst "a" +) + +set(lst "a;;b") +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 0)]] + lst ";b" +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 1)]] + lst "a;b" +) + +set(lst [[e;a\;b;c\;d]]) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 0)]] + lst [[a\;b;c\;d]] +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 1)]] + lst [[e;c\;d]] +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst -1)]] + lst [[e;a\;b]] +) + +set(lst [[c;a\\;b;c\;d;e]]) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 0)]] + lst [[a\\;b;c\;d;e]] +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 1)]] + lst [[c;c\;d;e]] +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 2)]] + lst [[c;a\\;b;e]] +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst 3)]] + lst [[c;a\\;b;c\;d]] +) +unit_test_check_variable_equal( + [[vcpkg_list(REMOVE_AT lst -1)]] + lst [[c;a\\;b;c\;d]] +) diff --git a/scripts/test_ports/unit-test-cmake/test-vcpkg_minimum_required.cmake b/scripts/test_ports/unit-test-cmake/test-vcpkg_minimum_required.cmake new file mode 100644 index 00000000000000..93bfbcfaad8780 --- /dev/null +++ b/scripts/test_ports/unit-test-cmake/test-vcpkg_minimum_required.cmake @@ -0,0 +1,49 @@ +# -- error cases -- +# VCPKG_BASE_VERSION not set - vcpkg version is too old +set(VCPKG_BASE_VERSION_backup "${VCPKG_BASE_VERSION}") +unset(VCPKG_BASE_VERSION) +unset(VCPKG_BASE_VERSION CACHE) +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-01-01)]]) +unit_test_ensure_fatal_error([[vcpkg_minimum_required()]]) +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION "")]]) +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION "2021.01.01")]]) + +set(VCPKG_BASE_VERSION 2021-02-02) + +# VERSION not passed +unit_test_ensure_fatal_error([[vcpkg_minimum_required()]]) +# VERSION weird - empty +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION "")]]) +# VERSION weird - dotted +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021.01.01)]]) +# VERSION weird - not a valid year +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 3000-01-01)]]) +# VERSION weird - list +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION "2021-01-01;2021-01-02")]]) +# VERSION weird - small year +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 21-01-01)]]) +# VERSION weird - small month +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-1-01)]]) +# VERSION weird - small day +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-01-1)]]) +# VERSION too-new - later year, earlier month, earlier day +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2022-01-01)]]) +# VERSION too-new - same year, later month, earlier day +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-03-01)]]) +# VERSION too-new - same year, same month, later day +unit_test_ensure_fatal_error([[vcpkg_minimum_required(VERSION 2021-02-03)]]) + +# -- successes -- +# same date +unit_test_ensure_success([[vcpkg_minimum_required(VERSION 2021-02-02)]]) + +# VERSION old - earlier year, later month, later day +unit_test_ensure_success([[vcpkg_minimum_required(VERSION 2020-03-03)]]) +# VERSION old - same year, earlier month, later day +unit_test_ensure_success([[vcpkg_minimum_required(VERSION 2021-01-03)]]) +# VERSION old - same year, same month, earlier day +unit_test_ensure_success([[vcpkg_minimum_required(VERSION 2021-02-01)]]) + +# reset to backup +unset(VCPKG_BASE_VERSION) +set(VCPKG_BASE_VERSION "${VCPKG_BASE_VERSION_backup}" CACHE STRING "") diff --git a/scripts/test_ports/unit-test-cmake/test-z_vcpkg_function_arguments.cmake b/scripts/test_ports/unit-test-cmake/test-z_vcpkg_function_arguments.cmake new file mode 100644 index 00000000000000..e88eb683f9b497 --- /dev/null +++ b/scripts/test_ports/unit-test-cmake/test-z_vcpkg_function_arguments.cmake @@ -0,0 +1,63 @@ +# these both set `args` in the top level +function(check_function_args start) + z_vcpkg_function_arguments(out "${start}") + set(args "${out}" PARENT_SCOPE) +endfunction() +function(check_all_function_args) + z_vcpkg_function_arguments(out) + set(args "${out}" PARENT_SCOPE) +endfunction() + +unit_test_ensure_fatal_error([[check_function_args(-1)]]) +unit_test_ensure_fatal_error([[check_function_args(3)]]) +unit_test_ensure_fatal_error([[check_function_args(notanumber)]]) +unit_test_check_variable_equal( + [[check_all_function_args()]] + args "" +) +unit_test_check_variable_equal( + [[check_all_function_args("")]] + args "" +) +unit_test_check_variable_equal( + [[check_all_function_args("" "")]] + args ";" +) +unit_test_check_variable_equal( + [[check_all_function_args("" "" "" "")]] + args ";;;" +) + +unit_test_check_variable_equal( + [[check_all_function_args(a b c)]] + args "a;b;c" +) +unit_test_check_variable_equal( + [[check_function_args(2 a b c)]] + args "b;c" +) +unit_test_check_variable_equal( + [[check_function_args(3 a b c)]] + args "c" +) + +unit_test_check_variable_equal( + [=[check_all_function_args("a;b" [[c\;d]] e)]=] + args [[a\;b;c\\;d;e]] +) +unit_test_check_variable_equal( + [=[check_all_function_args("a;b" [[c\;d]] [[e\\;f]])]=] + args [[a\;b;c\\;d;e\\\;f]] +) +unit_test_check_variable_equal( + [=[check_function_args(2 "a;b" [[c\;d]] e)]=] + args [[c\\;d;e]] +) +unit_test_check_variable_equal( + [=[check_function_args(3 "a;b" [[c\;d]] e)]=] + args "e" +) +unit_test_check_variable_equal( + [=[check_function_args(4 "a;b" [[c\;d]] e)]=] + args "" +) diff --git a/scripts/test_ports/unit-test-cmake/vcpkg.json b/scripts/test_ports/unit-test-cmake/vcpkg.json new file mode 100644 index 00000000000000..c20cf2c6cb8f41 --- /dev/null +++ b/scripts/test_ports/unit-test-cmake/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "unit-test-cmake", + "version-string": "0", + "description": "Ensures that the CMake scripts are unit tested.", + "supports": "x64", + "default-features": [ + "function-arguments", + "list", + "minimum-required" + ], + "features": { + "function-arguments": { + "description": "Test the z_vcpkg_function_arguments function" + }, + "list": { + "description": "Test the vcpkg_list function" + }, + "minimum-required": { + "description": "Test the vcpkg_minimum_required function" + } + } +} diff --git a/scripts/test_ports/vcpkg-acquire-msys-test/CONTROL b/scripts/test_ports/vcpkg-acquire-msys-test/CONTROL new file mode 100644 index 00000000000000..47859b0769b2e9 --- /dev/null +++ b/scripts/test_ports/vcpkg-acquire-msys-test/CONTROL @@ -0,0 +1,4 @@ +Source: vcpkg-acquire-msys-test +Version: 0 +Description: Test port to exercise vcpkg_acquire_msys +Supports: x86 & windows diff --git a/scripts/test_ports/vcpkg-acquire-msys-test/portfile.cmake b/scripts/test_ports/vcpkg-acquire-msys-test/portfile.cmake new file mode 100644 index 00000000000000..7095dc682677c4 --- /dev/null +++ b/scripts/test_ports/vcpkg-acquire-msys-test/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_acquire_msys(MSYS_ROOT Z_ALL_PACKAGES) diff --git a/scripts/test_ports/vcpkg-ci-ffmpeg/CONTROL b/scripts/test_ports/vcpkg-ci-ffmpeg/CONTROL new file mode 100644 index 00000000000000..78687c423501f2 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-ffmpeg/CONTROL @@ -0,0 +1,5 @@ +Source: vcpkg-ci-ffmpeg +Version: 1 +Homepage: https://github.com/microsoft/vcpkg +Description: Port to force features of certain ports within CI +Build-Depends: ffmpeg[all-nonfree] diff --git a/scripts/test_ports/vcpkg-ci-ffmpeg/portfile.cmake b/scripts/test_ports/vcpkg-ci-ffmpeg/portfile.cmake new file mode 100644 index 00000000000000..0015715fb66c72 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-ffmpeg/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/scripts/test_ports/vcpkg-ci-opencv/CONTROL b/scripts/test_ports/vcpkg-ci-opencv/CONTROL new file mode 100644 index 00000000000000..bdf5f4251f3b2f --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-opencv/CONTROL @@ -0,0 +1,6 @@ +Source: vcpkg-ci-opencv +Version: 1 +Port-Version: 3 +Homepage: https://github.com/microsoft/vcpkg +Description: Port to force features of certain ports within CI +Build-Depends: opencv[cuda,cudnn,halide,ovis,tbb](windows&x64&!static&!uwp), opencv[gdcm,ipp,jasper,lapack,openexr,opengl,openmp,qt,sfm,vtk](!uwp&!(windows&(arm|arm64))), opencv[core,nonfree,ade,contrib,dnn,eigen,ffmpeg,jpeg,png,quirc,tiff,webp] diff --git a/scripts/test_ports/vcpkg-ci-opencv/portfile.cmake b/scripts/test_ports/vcpkg-ci-opencv/portfile.cmake new file mode 100644 index 00000000000000..0015715fb66c72 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-opencv/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/scripts/test_ports/vcpkg-ci-paraview/CONTROL b/scripts/test_ports/vcpkg-ci-paraview/CONTROL new file mode 100644 index 00000000000000..1377508422d025 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-paraview/CONTROL @@ -0,0 +1,6 @@ +Source: vcpkg-ci-paraview +Version: 1 +Port-Version: 2 +Homepage: https://github.com/microsoft/vcpkg +Description: Port to force features of certain ports within CI +Build-Depends: paraview[core,vtkm,tools](!(x86&windows)), paraview[core,tools](x86&windows) diff --git a/scripts/test_ports/vcpkg-ci-paraview/portfile.cmake b/scripts/test_ports/vcpkg-ci-paraview/portfile.cmake new file mode 100644 index 00000000000000..0015715fb66c72 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-paraview/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/scripts/test_ports/vcpkg-find-acquire-program/CONTROL b/scripts/test_ports/vcpkg-find-acquire-program/CONTROL new file mode 100644 index 00000000000000..6f248be58aff52 --- /dev/null +++ b/scripts/test_ports/vcpkg-find-acquire-program/CONTROL @@ -0,0 +1,4 @@ +Source: vcpkg-find-acquire-program +Version: 0 +Description: Test port to exercise vcpkg_find_acquire_program +Supports: windows diff --git a/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake b/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake new file mode 100644 index 00000000000000..88a4856c5f5e1c --- /dev/null +++ b/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake @@ -0,0 +1,21 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +if(CMAKE_HOST_WIN32) + foreach(PROG GO JOM NASM PERL YASM GIT PYTHON3 PYTHON2 RUBY 7Z NUGET FLEX BISON GPERF GASPREPROCESSOR DARK SCONS SWIG DOXYGEN ARIA2 PKGCONFIG) + vcpkg_find_acquire_program(${PROG}) + foreach(SUBPROG IN LISTS ${PROG}) + if(NOT EXISTS "${SUBPROG}") + message(FATAL_ERROR "Program ${SUBPROG} did not exist.") + endif() + endforeach() + endforeach() +endif() + +foreach(PROG GN NINJA MESON BAZEL) + vcpkg_find_acquire_program(${PROG}) + foreach(SUBPROG IN LISTS ${PROG}) + if(NOT EXISTS "${SUBPROG}") + message(FATAL_ERROR "Program ${SUBPROG} did not exist.") + endif() + endforeach() +endforeach() diff --git a/scripts/tls12-download.exe b/scripts/tls12-download.exe new file mode 100755 index 00000000000000..f1f640efd551ea Binary files /dev/null and b/scripts/tls12-download.exe differ diff --git a/scripts/toolchains/android.cmake b/scripts/toolchains/android.cmake index 69192aeca9fca2..ff04cb72d83ae4 100644 --- a/scripts/toolchains/android.cmake +++ b/scripts/toolchains/android.cmake @@ -1,26 +1,42 @@ - set(ANDROID_CPP_FEATURES "rtti exceptions" CACHE STRING "") set(CMAKE_SYSTEM_NAME Android CACHE STRING "") set(ANDROID_TOOLCHAIN clang CACHE STRING "") -set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "") +set(ANDROID_NATIVE_API_LEVEL ${CMAKE_SYSTEM_VERSION} CACHE STRING "") set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "") -if (VCPKG_TARGET_TRIPLET STREQUAL "arm64-android") +if (VCPKG_TARGET_TRIPLET MATCHES "^arm64-android") set(ANDROID_ABI arm64-v8a CACHE STRING "") -elseif(VCPKG_TARGET_TRIPLET STREQUAL "arm-android") +elseif(VCPKG_TARGET_TRIPLET MATCHES "^armv6-android") + set(ANDROID_ABI armeabi CACHE STRING "") + set(ANDROID_ARM_MODE arm CACHE STRING "") +elseif(VCPKG_TARGET_TRIPLET MATCHES "^arm-neon-android") + set(ANDROID_ABI armeabi-v7a CACHE STRING "") + set(ANDROID_ARM_NEON ON CACHE BOOL "") +elseif(VCPKG_TARGET_TRIPLET MATCHES "^arm-android") set(ANDROID_ABI armeabi-v7a CACHE STRING "") -elseif(VCPKG_TARGET_TRIPLET STREQUAL "x64-android") + set(ANDROID_ARM_NEON OFF CACHE BOOL "") +elseif(VCPKG_TARGET_TRIPLET MATCHES "^x64-android") set(ANDROID_ABI x86_64 CACHE STRING "") -elseif(VCPKG_TARGET_TRIPLET STREQUAL "x86-android") +elseif(VCPKG_TARGET_TRIPLET MATCHES "^x86-android") set(ANDROID_ABI x86 CACHE STRING "") else() message(FATAL_ERROR "Unknown ABI for target triplet ${VCPKG_TARGET_TRIPLET}") endif() +if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(ANDROID_STL c++_shared CACHE STRING "") +else() + set(ANDROID_STL c++_static CACHE STRING "") +endif() + if(DEFINED ENV{ANDROID_NDK_HOME}) set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME}) else() set(ANDROID_NDK_HOME "$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/") + if(NOT EXISTS "${ANDROID_NDK_HOME}") + # Use Xamarin default installation folder + set(ANDROID_NDK_HOME "$ENV{ProgramFiles\(x86\)}/Android/android-sdk/ndk-bundle") + endif() endif() if(NOT EXISTS "${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake") @@ -30,17 +46,21 @@ endif() include("${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake") if(NOT _VCPKG_ANDROID_TOOLCHAIN) -set(_VCPKG_ANDROID_TOOLCHAIN 1) -get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) -if(NOT _CMAKE_IN_TRY_COMPILE) - string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") - string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") - string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") - string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") - string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") - string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + set(_VCPKG_ANDROID_TOOLCHAIN 1) + get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) + if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE " ${VCPKG_CXX_FLAGS_RELEASE} ") - string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") - string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") -endif() + string(APPEND CMAKE_SHARED_LINKER_FLAGS " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE " ${VCPKG_LINKER_FLAGS_RELEASE} ") + endif() endif() diff --git a/scripts/toolchains/freebsd.cmake b/scripts/toolchains/freebsd.cmake index b6bf5a4791c2fa..4b1cc3e8c3b4d0 100644 --- a/scripts/toolchains/freebsd.cmake +++ b/scripts/toolchains/freebsd.cmake @@ -16,5 +16,9 @@ if(NOT _CMAKE_IN_TRY_COMPILE) string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") endif() endif() diff --git a/scripts/toolchains/ios.cmake b/scripts/toolchains/ios.cmake new file mode 100644 index 00000000000000..f173662c0266c4 --- /dev/null +++ b/scripts/toolchains/ios.cmake @@ -0,0 +1,60 @@ +if(NOT _VCPKG_IOS_TOOLCHAIN) + set(_VCPKG_IOS_TOOLCHAIN 1) + + # Set the CMAKE_SYSTEM_NAME for try_compile calls. + set(CMAKE_SYSTEM_NAME iOS CACHE STRING "") + + macro(_vcpkg_setup_ios_arch arch) + unset(_vcpkg_ios_system_processor) + unset(_vcpkg_ios_sysroot) + unset(_vcpkg_ios_target_architecture) + + if ("${arch}" STREQUAL "arm64") + set(_vcpkg_ios_system_processor "aarch64") + set(_vcpkg_ios_target_architecture "arm64") + elseif("${arch}" STREQUAL "arm") + set(_vcpkg_ios_system_processor "arm") + set(_vcpkg_ios_target_architecture "armv7") + elseif("${arch}" STREQUAL "x64") + set(_vcpkg_ios_system_processor "x86_64") + set(_vcpkg_ios_sysroot "iphonesimulator") + set(_vcpkg_ios_target_architecture "x86_64") + elseif("${arch}" STREQUAL "x86") + set(_vcpkg_ios_system_processor "i386") + set(_vcpkg_ios_sysroot "iphonesimulator") + set(_vcpkg_ios_target_architecture "i386") + else() + message(FATAL_ERROR + "Unknown VCPKG_TARGET_ARCHITECTURE value provided for triplet ${VCPKG_TARGET_TRIPLET}: ${arch}") + endif() + endmacro() + + _vcpkg_setup_ios_arch("${VCPKG_TARGET_ARCHITECTURE}") + if(_vcpkg_ios_system_processor AND NOT CMAKE_SYSTEM_PROCESSOR) + set(CMAKE_SYSTEM_PROCESSOR ${_vcpkg_ios_system_processor}) + endif() + + # If VCPKG_OSX_ARCHITECTURES or VCPKG_OSX_SYSROOT is set in the triplet, they will take priority, + # so the following will be no-ops. + set(CMAKE_OSX_ARCHITECTURES "${_vcpkg_ios_target_architecture}" CACHE STRING "Build architectures for iOS") + if(_vcpkg_ios_sysroot) + set(CMAKE_OSX_SYSROOT ${_vcpkg_ios_sysroot} CACHE STRING "iOS sysroot") + endif() + + get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) + if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + endif() +endif() diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake index 70f224da993af0..fb56665384e695 100644 --- a/scripts/toolchains/linux.cmake +++ b/scripts/toolchains/linux.cmake @@ -6,6 +6,32 @@ endif() set(CMAKE_SYSTEM_NAME Linux CACHE STRING "") if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(CMAKE_SYSTEM_PROCESSOR x86_64 CACHE STRING "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(CMAKE_SYSTEM_PROCESSOR x86 CACHE STRING "") + string(APPEND VCPKG_C_FLAGS " -m32") + string(APPEND VCPKG_CXX_FLAGS " -m32") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(CMAKE_SYSTEM_PROCESSOR armv7l CACHE STRING "") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + if(NOT DEFINED CMAKE_CXX_COMPILER) + set(CMAKE_CXX_COMPILER "arm-linux-gnueabihf-g++") + endif() + if(NOT DEFINED CMAKE_C_COMPILER) + set(CMAKE_C_COMPILER "arm-linux-gnueabihf-gcc") + endif() + message(STATUS "Cross compiling arm on host x86_64, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") + endif() +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(CMAKE_SYSTEM_PROCESSOR aarch64 CACHE STRING "") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + if(NOT DEFINED CMAKE_CXX_COMPILER) + set(CMAKE_CXX_COMPILER "aarch64-linux-gnu-g++") + endif() + if(NOT DEFINED CMAKE_C_COMPILER) + set(CMAKE_C_COMPILER "aarch64-linux-gnu-gcc") + endif() + message(STATUS "Cross compiling arm64 on host x86_64, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") + endif() endif() get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) @@ -23,5 +49,9 @@ if(NOT _CMAKE_IN_TRY_COMPILE) string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT "-static ") string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT "-static ") endif() + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") endif() endif() diff --git a/scripts/toolchains/mingw.cmake b/scripts/toolchains/mingw.cmake new file mode 100644 index 00000000000000..195e337f78c0f4 --- /dev/null +++ b/scripts/toolchains/mingw.cmake @@ -0,0 +1,51 @@ +if(NOT _VCPKG_MINGW_TOOLCHAIN) +set(_VCPKG_MINGW_TOOLCHAIN 1) +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") +endif() + +# Need to override MinGW from VCPKG_CMAKE_SYSTEM_NAME +set(CMAKE_SYSTEM_NAME Windows CACHE STRING "" FORCE) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(CMAKE_SYSTEM_PROCESSOR i686 CACHE STRING "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CMAKE_SYSTEM_PROCESSOR x86_64 CACHE STRING "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(CMAKE_SYSTEM_PROCESSOR armv7 CACHE STRING "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(CMAKE_SYSTEM_PROCESSOR aarch64 CACHE STRING "") +endif() + +foreach(lang C CXX) + set(CMAKE_${lang}_COMPILER_TARGET "${CMAKE_SYSTEM_PROCESSOR}-windows-gnu" CACHE STRING "") +endforeach() + +find_program(CMAKE_C_COMPILER "${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc") +find_program(CMAKE_CXX_COMPILER "${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-g++") +find_program(CMAKE_RC_COMPILER "${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-windres") +if(NOT CMAKE_RC_COMPILER) + find_program(CMAKE_RC_COMPILER "windres") +endif() + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + if(VCPKG_CRT_LINKAGE STREQUAL "static") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT "-static ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT "-static ") + endif() + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") +endif() +endif() diff --git a/scripts/toolchains/openbsd.cmake b/scripts/toolchains/openbsd.cmake new file mode 100644 index 00000000000000..9eb8f3a0b0e4fa --- /dev/null +++ b/scripts/toolchains/openbsd.cmake @@ -0,0 +1,32 @@ +if(NOT _VCPKG_OPENBSD_TOOLCHAIN) +set(_VCPKG_OPENBSD_TOOLCHAIN 1) + +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "OpenBSD") + set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") +endif() +set(CMAKE_SYSTEM_NAME OpenBSD CACHE STRING "") + +if(NOT DEFINED CMAKE_CXX_COMPILER) + set(CMAKE_CXX_COMPILER "/usr/bin/clang++") +endif() +if(NOT DEFINED CMAKE_C_COMPILER) + set(CMAKE_C_COMPILER "/usr/bin/clang") +endif() + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") +endif(NOT _CMAKE_IN_TRY_COMPILE) +endif(NOT _VCPKG_OPENBSD_TOOLCHAIN) diff --git a/scripts/toolchains/osx.cmake b/scripts/toolchains/osx.cmake index 7f6487c4091a53..1ab3da5e5d442f 100644 --- a/scripts/toolchains/osx.cmake +++ b/scripts/toolchains/osx.cmake @@ -24,5 +24,9 @@ if(NOT _CMAKE_IN_TRY_COMPILE) string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") endif() endif() diff --git a/scripts/toolchains/windows.cmake b/scripts/toolchains/windows.cmake index d5d7f8db510d94..954f95535dd93e 100644 --- a/scripts/toolchains/windows.cmake +++ b/scripts/toolchains/windows.cmake @@ -1,3 +1,7 @@ +if(NOT _VCPKG_WINDOWS_TOOLCHAIN) +set(_VCPKG_WINDOWS_TOOLCHAIN 1) +set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>$<$:DLL>" CACHE STRING "") + get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) if(NOT _CMAKE_IN_TRY_COMPILE) @@ -15,10 +19,10 @@ if(NOT _CMAKE_IN_TRY_COMPILE) set(CHARSET_FLAG) endif() - set(CMAKE_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 ${CHARSET_FLAG} /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" CACHE STRING "") - set(CMAKE_C_FLAGS " /DWIN32 /D_WINDOWS /W3 ${CHARSET_FLAG} /MP ${VCPKG_C_FLAGS}" CACHE STRING "") + set(CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 ${CHARSET_FLAG} /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" CACHE STRING "") + set(CMAKE_C_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 ${CHARSET_FLAG} /MP ${VCPKG_C_FLAGS}" CACHE STRING "") set(CMAKE_RC_FLAGS "-c65001 /DWIN32" CACHE STRING "") - + unset(CHARSET_FLAG) set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "") @@ -26,6 +30,12 @@ if(NOT _CMAKE_IN_TRY_COMPILE) set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "") set(CMAKE_C_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "") - set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" CACHE STRING "") - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" CACHE STRING "") + string(APPEND CMAKE_STATIC_LINKER_FLAGS_RELEASE_INIT " /nologo ") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/nologo /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS} ${VCPKG_LINKER_FLAGS_RELEASE}" CACHE STRING "") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/nologo /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS} ${VCPKG_LINKER_FLAGS_RELEASE}" CACHE STRING "") + + string(APPEND CMAKE_STATIC_LINKER_FLAGS_DEBUG_INIT " /nologo ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " /nologo ${VCPKG_LINKER_FLAGS} ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " /nologo ${VCPKG_LINKER_FLAGS} ${VCPKG_LINKER_FLAGS_DEBUG} ") +endif() endif() diff --git a/scripts/vcpkg.schema.json b/scripts/vcpkg.schema.json new file mode 100644 index 00000000000000..14848f00c8e89e --- /dev/null +++ b/scripts/vcpkg.schema.json @@ -0,0 +1,313 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "title": "Vcpkg manifest", + "description": "Vcpkg manifest file. See https://github.com/microsoft/vcpkg/blob/master/docs/specifications/manifests.md.", + "definitions": { + "identifier": { + "description": "Identifiers used for feature names.", + "allOf": [ + { + "description": "Identifier are lowercase with digits and dashes.", + "type": "string", + "pattern": "[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "not": { + "description": "Identifiers must not be a Windows filesystem or vcpkg reserved name.", + "type": "string", + "pattern": "^prn|aux|nul|con|lpt[1-9]|com[1-9]|core|default$" + } + } + ] + }, + "version-text": { + "type": "string", + "pattern": "[^#]+" + }, + "has-schemed-version": { + "type": "object", + "oneOf": [ + { + "properties": { + "version-string": { + "description": "Text used to identify an arbitrary version", + "type": "string", + "pattern": "^[^#]+$" + } + }, + "required": [ + "version-string" + ] + }, + { + "properties": { + "version": { + "description": "A relaxed version string (1.2.3.4...)", + "type": "string", + "pattern": "^\\d+(\\.\\d+)*$" + } + }, + "required": [ + "version" + ] + }, + { + "properties": { + "version-semver": { + "description": "A semantic version string. See https://semver.org/", + "type": "string", + "pattern": "^\\d+\\.\\d+\\.\\d+([+-].+)?$" + } + }, + "required": [ + "version-semver" + ] + }, + { + "properties": { + "version-date": { + "description": "A date version string (e.g. 2020-01-20)", + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}(\\.\\d+)*$" + } + }, + "required": [ + "version-date" + ] + } + ] + }, + "port-version": { + "description": "A non-negative integer indicating the port revision. If this field doesn't exist, it's assumed to be `0`.", + "type": "integer", + "minimum": 0, + "default": 0 + }, + "package-name": { + "description": "Name of a package.", + "allOf": [ + { + "description": "Package name must be a dot-separated list of valid identifiers", + "type": "string", + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*(\\.[a-z0-9]+(-[a-z0-9]+)*)*$" + }, + { + "not": { + "description": "Identifiers must not be a Windows filesystem or vcpkg reserved name.", + "type": "string", + "pattern": "(^|\\.)(prn|aux|nul|con|lpt[1-9]|com[1-9]|core|default)(\\.|$)" + } + } + ] + }, + "description-field": { + "description": "A string or array of strings containing the description of a package or feature.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "dependency-object": { + "description": "Expanded form of a dependency with explicit features and platform.", + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/package-name" + }, + "features": { + "type": "array", + "items": { + "$ref": "#/definitions/identifier" + } + }, + "host": { + "type": "boolean", + "default": false + }, + "default-features": { + "type": "boolean", + "default": true + }, + "platform": { + "$ref": "#/definitions/platform-expression" + }, + "version>=": { + "description": "Minimum required version", + "type": "string", + "pattern": "^[^#]+(#\\d+)?$" + } + }, + "patternProperties": { + "^\\$": {} + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "dependency": { + "description": "A dependency fetchable by Vcpkg.", + "oneOf": [ + { + "$ref": "#/definitions/package-name" + }, + { + "$ref": "#/definitions/dependency-object" + } + ] + }, + "override": { + "description": "A version override.", + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/identifier" + }, + "version": { + "$ref": "#/definitions/version-text" + }, + "port-version": { + "$ref": "#/definitions/port-version" + } + }, + "patternProperties": { + "^\\$": {} + }, + "required": [ + "name", + "version" + ] + }, + "platform-expression": { + "description": "A specification of a set of platforms. See https://github.com/microsoft/vcpkg/blob/master/docs/specifications/manifests.md#definitions.", + "type": "string" + }, + "feature": { + "description": "A package feature that can be activated by consumers.", + "type": "object", + "properties": { + "description": { + "$ref": "#/definitions/description-field" + }, + "dependencies": { + "description": "Dependencies used by this feature.", + "type": "array", + "items": { + "$ref": "#/definitions/dependency" + } + } + }, + "patternProperties": { + "^\\$": {} + }, + "required": [ + "description" + ], + "additionalProperties": false + } + }, + "type": "object", + "allOf": [ + { + "properties": { + "name": { + "description": "The name of the top-level package", + "$ref": "#/definitions/package-name" + }, + "version-string": {}, + "version": {}, + "version-date": {}, + "version-semver": {}, + "port-version": { + "$ref": "#/definitions/port-version" + }, + "maintainers": { + "description": "An array of strings which contain the authors of a package", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "$ref": "#/definitions/description-field" + }, + "homepage": { + "description": "A url which points to the homepage of a package.", + "type": "string", + "format": "uri" + }, + "documentation": { + "description": "A url which points to the documentation of a package.", + "type": "string", + "format": "uri" + }, + "license": { + "description": "An SPDX license expression at version 3.9.", + "type": "string" + }, + "builtin-baseline": { + "description": "A vcpkg repository commit for version control.", + "type": "string" + }, + "dependencies": { + "description": "Dependencies that are always required.", + "type": "array", + "items": { + "$ref": "#/definitions/dependency" + } + }, + "overrides": { + "description": "Version overrides for dependencies.", + "type": "array", + "items": { + "$ref": "#/definitions/override" + } + }, + "dev-dependencies": { + "description": "Dependencies only required for developers (testing and the like).", + "type": "array", + "items": { + "$ref": "#/definitions/dependency" + } + }, + "features": { + "description": "A map of features supported by the package", + "type": "object", + "patternProperties": { + "": { + "$ref": "#/definitions/feature" + } + } + }, + "default-features": { + "description": "Features enabled by default with the package.", + "type": "array", + "items": { + "$ref": "#/definitions/identifier" + } + }, + "supports": { + "$ref": "#/definitions/platform-expression" + } + }, + "patternProperties": { + "^\\$": {} + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + { + "$ref": "#/definitions/has-schemed-version" + } + ] +} diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 8f90ce8dc164f6..fc07adeb51206c 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -1,39 +1,46 @@ + + 3.9.7 + python.exe + https://www.python.org/ftp/python/3.9.7/python-3.9.7-embed-win32.zip + 5f12f693c6df68b75f96b797740a156f2dcd471e96e7980a6e297bbfd064467ba2b2cc9d2f450296388402a8a0b716fce1c4a25b94b50615503d528e33fea870 + python-3.9.7-embed-win32.zip + - 3.14.0 - cmake-3.14.0-win32-x86\bin\cmake.exe - https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-win32-x86.zip - 60eb6a0790883da4152a957bd1133405f620f4b7a073af3bea97695b3ef8c22c41d9b90e45815f2a896df5be0cd6dedb73a6df5f17a42761ca8f457c9f3b708c - cmake-3.14.0-win32-x86.zip + 3.21.1 + cmake-3.21.1-windows-i386\bin\cmake.exe + https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-windows-i386.zip + 3aa0e9c904bf8abfc9441c1f0fd571e613ade7bc12f36211cd9006b4a2226552815ec8b00c8ef43583769d9d90996e75d2e832b3718ac3b85d3f9fb4db1cd60a + cmake-3.21.1-windows-i386.zip - 3.14.0 - cmake-3.14.0-Darwin-x86_64/CMake.app/Contents/bin/cmake - https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Darwin-x86_64.tar.gz - a5a7217a049be3bb2ef5c93292b1d92eb4dd5ec6ab2dd04984aae01d2732eb343cea4f9741b333a5e21a27eb7934f568f780f3558e7ff870150c3309fc4656b3 - cmake-3.14.0-Darwin-x86_64.tar.gz + 3.21.1 + cmake-3.21.1-macos-universal/CMake.app/Contents/bin/cmake + https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-macos-universal.tar.gz + 0e5d3781101d6f54d916066719a0ff27d052b40e999dfd8e1f53d8d22d99e45cad22fc28b5d2a9e810b0cc8237e640d7747aff2a2c0896571c8a69ecdd0a9e41 + cmake-3.21.1-macos-universal.tar.gz - 3.14.0 - cmake-3.14.0-Linux-x86_64/bin/cmake - https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz - e687c0f3acfb15c880ddac67e2821907f833cb900c6ecedb4ab5df5102604d82753c948e3c7dca6e5bcce6278a09b7d577b1afade2e133aec5b2057ac48d3c74 - cmake-3.14.0-Linux-x86_64.tar.gz + 3.21.1 + cmake-3.21.1-linux-x86_64/bin/cmake + https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-Linux-x86_64.tar.gz + deb24087315bcf01d2969846246564a352b6f77521df6b235f9ef525450db9c89b32dca4ad78f93a356dd5ab7b587374d49fc1a892354760715a5ef1f88e925f + cmake-3.21.1-linux-x86_64.tar.gz - 3.12.4 - cmake-3.12.4-FreeBSD-x86_64/bin/cmake - https://github.com/ivysnow/CMake/releases/download/v3.12.4/cmake-3.12.4-FreeBSD-x86_64.tar.gz - b5aeb2de36f3c29757c9404e33756da88580ddfa07f29079c7f275ae0d6d018fdfe3f55d54d1403f38e359865cf93436e084c6b1ea91f26c88bc01dde3793479 - cmake-3.12.4-FreeBSD-x86_64.tar.gz + 3.20.4 + usr/local/bin/cmake + https://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/All/cmake-3.20.4.txz + 3e5b675d7ff924f92996d912e2365582e687375109ef99c9073fb8196bb329243a406b218cf1358d7cc518988b311ce9e5bf87de4d64f2e6377b7c2bc8894475 + cmake-3.20.4.txz - 2.21.0-1 + 2.32.0.2 mingw32\bin\git.exe - https://github.com/git-for-windows/git/releases/download/v2.21.0.windows.1/PortableGit-2.21.0-32-bit.7z.exe - d5600fc35e91cfa84e3547e38a9da9798cf0a53810cc35ac9a0dee671c4ef0e9fbcbe3eda9c790f8db4eafce7ce58d7a168d28938a66cdcca000bf5a7f5267c1 - PortableGit-2.21.0-32-bit.7z.exe + https://github.com/git-for-windows/git/releases/download/v2.32.0.windows.2/PortableGit-2.32.0.2-32-bit.7z.exe + 867d8534972cbaf7a4224e25a14d484f8d17ef186f8d79e9a758afb90cf69541375cb7615a39702311f4809cb8371ef85c2b1a15bfffe9e48f0e597ac011b348 + PortableGit-2.32.0.2-32-bit.7z.exe 2.7.4 @@ -53,17 +60,50 @@ + + 4.65 + google-cloud-sdk\bin\gsutil.cmd + https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-347.0.0-windows-x86_64-bundled-python.zip + e2792e17b132aad77f7c0b9fd26faf415e9437923d9227a9e6d253554e6843d29a6ddad0a7fb5e9aea4a130fd4c521e6ece8844fd4a4f9e8d580348775425389 + google-cloud-sdk-347.0.0-windows-x86_64-bundled-python.zip + + + 4.65 + gsutil/gsutil + https://storage.googleapis.com/pub/gsutil_4.65.tar.gz + 2c5c9dea48147f97180a491bbb9e24e8cbcd4f3452620e2f80338b781e4dfc90bb754e3bbfa05e1b990e44bff52d990d8c2dd51bc83d112339d8e6096a2f21c8 + gsutil_4.65.tar.gz + + + 4.65 + gsutil/gsutil + https://storage.googleapis.com/pub/gsutil_4.65.tar.gz + 2c5c9dea48147f97180a491bbb9e24e8cbcd4f3452620e2f80338b781e4dfc90bb754e3bbfa05e1b990e44bff52d990d8c2dd51bc83d112339d8e6096a2f21c8 + gsutil_4.65.tar.gz + - 2.4.1 + 2.8.4 vswhere.exe - https://github.com/Microsoft/vswhere/releases/download/2.4.1/vswhere.exe - f477842d0cebefcd6bf9c6d536ab8ea20ec5b0aa967ee963ab6a101aeff9df8742ca600d35f39e2e7158d76d8231f1ed2bef6104dce84d2bf8d6b07d17d706a1 + https://github.com/Microsoft/vswhere/releases/download/2.8.4/vswhere.exe + 1a98beebd1bb6929cbe98b86a3b77fb1ae4508b86cdcb64696b20c3a3336a2b5c8518e19a21092f1c98a46202c048dba819dc52bef122485ac34b888b77e59b2 - 4.6.2 + 5.10.0 nuget.exe - https://dist.nuget.org/win-x86-commandline/v4.6.2/nuget.exe - 60daea7bec2de23089f7ad73985dd788ac154171d6326c2c456726849b8f97dfc38cbdd9b9bf8d96aced009ccaaed317905b65c108e149cfbbbcdfb95f8f0519 + https://dist.nuget.org/win-x86-commandline/v5.10.0/nuget.exe + c4b7375e46cdb843096ce491b9809e0dc86773ba7b6333f13d49ec414b2953112df82ee8b833fd31be0cc7fe0fff1af88f3c07aa9553ad03f7f6c5a6eec2057e + + + 5.10.0 + nuget.exe + https://dist.nuget.org/win-x86-commandline/v5.10.0/nuget.exe + c4b7375e46cdb843096ce491b9809e0dc86773ba7b6333f13d49ec414b2953112df82ee8b833fd31be0cc7fe0fff1af88f3c07aa9553ad03f7f6c5a6eec2057e + + + 5.10.0 + nuget.exe + https://dist.nuget.org/win-x86-commandline/v5.10.0/nuget.exe + c4b7375e46cdb843096ce491b9809e0dc86773ba7b6333f13d49ec414b2953112df82ee8b833fd31be0cc7fe0fff1af88f3c07aa9553ad03f7f6c5a6eec2057e 3.1.81 @@ -73,39 +113,39 @@ QtInstallerFramework-win-x86.zip - 18.1.0 - 7-Zip.CommandLine.18.1.0\tools\7za.exe - https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 - 8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b2571305b3ae3f4e2b85fc4a290aeda63d1a13b8 - 7-zip.commandline.18.1.0.nupkg + 19.00 + Files\7-Zip\7z.exe + https://www.7-zip.org/a/7z1900-x64.msi + 7837a8677a01eed9c3309923f7084bc864063ba214ee169882c5b04a7a8b198ed052c15e981860d9d7952c98f459a4fab87a72fd78e7d0303004dcb86f4324c8 + 7z1900-x64.msi - 18.01.0 - aria2-1.33.1-win-32bit-build1\aria2c.exe - https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip - 2456176ba3d506a07cf0cc4f61f080e1ff8cb4106426d66f354c5bb67a9a8720b5ddb26904275e61b1f623c932355f7dcde4cd17556cc895f11293c23c3a9bf3 - aria2-1.33.1-win-32bit-build1.zip + 1.35.0 + aria2-1.35.0-win-32bit-build1\aria2c.exe + https://github.com/aria2/aria2/releases/download/release-1.35.0/aria2-1.35.0-win-32bit-build1.zip + 933537cad820b1cecf43a9eeca7e1b241dd7b1c902ee942441a166f2c38845f16046321efbdfa2f83c7e9fc50c7ecc5da6fd00e0c6e2124c07d3b783aa5092a4 + aria2-1.35.0-win-32bit-build1.zip - 1.8.2 + 1.10.2 ninja.exe - https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip - 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5 - ninja-win-1.8.2.zip + https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip + 6004140d92e86afbb17b49c49037ccd0786ce238f340f7d0e62b4b0c29ed0d6ad0bab11feda2094ae849c387d70d63504393714ed0a1f4d3a1f155af7a4f1ba3 + ninja-win-1.10.2.zip - 1.8.2 + 1.10.2 ninja - https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip - 38fcb68e745c1f15b4b50f20069ffe686b1ef5baf93b74958e132ea5d30d155cf6970d6dc1b095aafd421ebd8bcc63acf4f64e305c496266b5182f99b815cca5 - ninja-linux-1.8.2.zip + https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip + 93e802e9c17fb59636cddde4bad1ddaadad624f4ecfee00d5c78790330a4e9d433180e795718cda27da57215ce643c3929cf72c85337ee019d868c56f2deeef3 + ninja-linux-1.10.2.zip - 1.8.2 + 1.10.2 ninja - https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip - acadfb286eb7d93676629701917fa0c3c39f36daa068c169e4a098c29f97380d1ea95abfd42b04798ff118fd9dc93fdb250fcda36086bac20bc5506354214fc3 - ninja-mac-1.8.2.zip + https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-mac.zip + bcd12f6a3337591306d1b99a7a25a6933779ba68db79f17c1d3087d7b6308d245daac08df99087ff6be8dc7dd0dcdbb3a50839a144745fa719502b3a7a07260b + ninja-mac-1.10.2.zip 1.8.2 @@ -115,10 +155,10 @@ ninja-freebsd-1.8.2.zip - 6.2.1 + 7.1.4 pwsh.exe - https://github.com/PowerShell/PowerShell/releases/download/v6.2.1/PowerShell-6.2.1-win-x86.zip - ab1effc926b000a6adc12198a1886514ec203621a53b0cd7ec1cd9a8225dccda7e857feaabcfba4004bea73129b986abaad777c4573f44e0af70411226ce08b0 - PowerShell-6.2.1-win-x86.zip + https://github.com/PowerShell/PowerShell/releases/download/v7.1.4/PowerShell-7.1.4-win-x86.zip + cf30f80edb57f37501c4a380a8ddd8adf016a51a988a315e15ef517fdae42313ddf5260d8374db65ef12808ec980118bc8b543256df0c1d641a5b8355a80ba7b + PowerShell-7.1.4-win-x86.zip diff --git a/scripts/vcpkg_completion.fish b/scripts/vcpkg_completion.fish new file mode 100644 index 00000000000000..a55d700108f92e --- /dev/null +++ b/scripts/vcpkg_completion.fish @@ -0,0 +1,94 @@ +# vcpkg completions for fish +set vcpkg_executable (string split -m1 ' ' (commandline -cb))[1] + +function _vcpkg_completions + set arg (string split -m1 ' ' (commandline -cb))[2] + set curr_token (commandline -t) + if [ -n $arg ] + if [ -z $curr_token ] + set arg $arg " " + end + end + for key in ($vcpkg_executable autocomplete "$arg" -- 2>/dev/null) + echo $key + end +end + +complete -c vcpkg -f --arguments '(_vcpkg_completions)' + +set vcpkg_commands ($vcpkg_executable autocomplete) + +function _set_triplet_arguments + set triplets ($vcpkg_executable help triplet) + set -e triplets[(contains -i -- "Available architecture triplets" $triplets)] + set -e triplets[(contains -i -- "" $triplets)] + set triplet_from "" + for triplet in $triplets + echo (test -n "$triplet") >> temp.txt + if [ (string sub -l5 -- $triplet) = "VCPKG" ] + set -l temp (string length $triplet) + set triplet_from (string sub -s6 -l(math $temp - 15) -- $triplet) + else if [ -n "$triplet" ] + complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l triplet -d "$triplet_from" -a (string sub -s3 -- $triplet) + end + end +end +_set_triplet_arguments + +# options for all completions +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l triplet -d "Specify the target architecture triplet. See 'vcpkg help triplet' (default: \$VCPKG_DEFAULT_TRIPLET)" +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l overlay-ports -d "Specify directories to be used when searching for ports (also: \$VCPKG_OVERLAY_PORTS)" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l overlay-triplets -d "Specify directories containing triplets files (also: \$VCPKG_OVERLAY_TRIPLETS)" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l binarysource -d "Add sources for binary caching. See 'vcpkg help binarycaching'" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l downloads-root -d "Specify the downloads root directory (default: \$VCPKG_DOWNLOADS)" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from $vcpkg_commands" -x -l vcpkg-root -d "Specify the vcpkg root directory (default: \$VCPKG_ROOT)" -a '(__fish_complete_directories)' + +# options for install +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l dry-run -d "Do not actually build or install" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l head -d "Install the libraries on the command line using the latest upstream sources" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l no-downloads -d "Do not download new sources" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l only-downloads -d "Download sources but don't build packages" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l recurse -d "Allow removal of packages as part of installation" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l keep-going -d "Continue installing packages on failure" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l editable -d "Disable source re-extraction and binary caching for libraries on the command line" +complete -c vcpkg -n "__fish_seen_subcommand_from install" -f -l clean-after-build -d "Clean buildtrees, packages and downloads after building each package" + +# options for edit +complete -c vcpkg -n "__fish_seen_subcommand_from edit" -f -l buildtrees -d "Open editor into the port-specific buildtree subfolder" +complete -c vcpkg -n "__fish_seen_subcommand_from edit" -f -l all -d "Open editor into the port as well as the port-specific buildtree subfolder" + +# options for export +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l dry-run -d "Do not actually export" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l raw -d "Export to an uncompressed directory" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l nuget -d "Export a NuGet package" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l ifw -d "Export to an IFW-based installer" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l zip -d "Export to a zip file" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l 7zip -d "Export to a 7zip (.7z) file" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l prefab -d "Export to Prefab format" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l prefab-maven -d "Enable maven" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -l prefab-debug -d "Enable prefab debug" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l output -d "Specify the output name (used to construct filename)" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l output-dir -d "Specify the output directory for produced artifacts" -a '(__fish_complete_directories)' +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l nuget-id -d "Specify the id for the exported NuGet package (overrides --output)" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l nuget-version -d "Specify the version for the exported NuGet package" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-repository-url -d "Specify the remote repository URL for the online installer" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-packages-directory-path -d "Specify the temporary directory path for the repacked packages" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-repository-directory-path -d "Specify the directory path for the exported repository" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-configuration-file-path -d "Specify the temporary file path for the installer configuration" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l ifw-installer-file-path -d "Specify the file path for the exported installer" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-group-id -d "GroupId uniquely identifies your project according maven specifications" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-artifact-id -d "Artifact Id is the name of the project according maven specifications" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-version -d "Version is the name of the project according maven specifications" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-min-sdk -d "Android minimum supported sdk version" +complete -c vcpkg -n "__fish_seen_subcommand_from export" -f -r -l prefab-target-sdk -d "Android target sdk version" + +# options for remove +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l purge -d "Remove the cached copy of the package (default)" +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l no-purge -d "Do not remove the cached copy of the package (deprecated)" +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l recurse -d "Allow removal of packages not explicitly specified on the command line" +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l dry-run -d "Print the packages to be removed, but do not remove them" +complete -c vcpkg -n "__fish_seen_subcommand_from remove" -f -l outdated -d "Select all packages with versions that do not match the portfiles" + +# options for upgrade +complete -c vcpkg -n "__fish_seen_subcommand_from upgrade" -f -l no-dry-run -d "Actually upgrade" +complete -c vcpkg -n "__fish_seen_subcommand_from upgrade" -f -l keep-going -d "Continue installing packages on failure" diff --git a/scripts/vcpkg_completion.zsh b/scripts/vcpkg_completion.zsh new file mode 100644 index 00000000000000..ee499f67161567 --- /dev/null +++ b/scripts/vcpkg_completion.zsh @@ -0,0 +1,9 @@ + +_vcpkg_completions() +{ + local vcpkg_executable=${COMP_WORDS[0]} + local remaining_command_line=${COMP_LINE:(${#vcpkg_executable}+1)} + COMPREPLY=($(${vcpkg_executable} autocomplete "${remaining_command_line}" -- 2>/dev/null)) +} + +complete -F _vcpkg_completions vcpkg diff --git a/scripts/vcpkg_get_dep_info.cmake b/scripts/vcpkg_get_dep_info.cmake new file mode 100644 index 00000000000000..92212b82d02ac1 --- /dev/null +++ b/scripts/vcpkg_get_dep_info.cmake @@ -0,0 +1,19 @@ +function(vcpkg_get_dep_info PORT VCPKG_TRIPLET_ID) + message("d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af") + vcpkg_triplet_file(${VCPKG_TRIPLET_ID}) + + # GUID used as a flag - "cut here line" + message("c35112b6-d1ba-415b-aa5d-81de856ef8eb +VCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE} +VCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME} +VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION} +VCPKG_LIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} +VCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE} +VCPKG_DEP_INFO_OVERRIDE_VARS=${VCPKG_DEP_INFO_OVERRIDE_VARS} +CMAKE_HOST_SYSTEM_NAME=${CMAKE_HOST_SYSTEM_NAME} +CMAKE_HOST_SYSTEM_PROCESSOR=${CMAKE_HOST_SYSTEM_PROCESSOR} +CMAKE_HOST_SYSTEM_VERSION=${CMAKE_HOST_SYSTEM_VERSION} +CMAKE_HOST_SYSTEM=${CMAKE_HOST_SYSTEM} +e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f +8c504940-be29-4cba-9f8f-6cd83e9d87b7") +endfunction() diff --git a/scripts/vcpkg_get_tags.cmake b/scripts/vcpkg_get_tags.cmake new file mode 100644 index 00000000000000..6a948d129eb597 --- /dev/null +++ b/scripts/vcpkg_get_tags.cmake @@ -0,0 +1,33 @@ +function(vcpkg_get_tags PORT FEATURES VCPKG_TRIPLET_ID VCPKG_ABI_SETTINGS_FILE) + message("d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af") + vcpkg_triplet_file(${VCPKG_TRIPLET_ID}) + + # GUID used as a flag - "cut here line" + message("c35112b6-d1ba-415b-aa5d-81de856ef8eb +VCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE} +VCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME} +VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION} +VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET} +VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH} +VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE} +VCPKG_BUILD_TYPE=${VCPKG_BUILD_TYPE} +VCPKG_LIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} +VCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE} +VCPKG_DISABLE_COMPILER_TRACKING=${VCPKG_DISABLE_COMPILER_TRACKING} +e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f") + + # Just to enforce the user didn't set it in the triplet file + if (DEFINED VCPKG_PUBLIC_ABI_OVERRIDE) + set(VCPKG_PUBLIC_ABI_OVERRIDE) + message(WARNING "VCPKG_PUBLIC_ABI_OVERRIDE set in the triplet will be ignored.") + endif() + include("${VCPKG_ABI_SETTINGS_FILE}" OPTIONAL) + + message("c35112b6-d1ba-415b-aa5d-81de856ef8eb +VCPKG_PUBLIC_ABI_OVERRIDE=${VCPKG_PUBLIC_ABI_OVERRIDE} +VCPKG_ENV_PASSTHROUGH=${VCPKG_ENV_PASSTHROUGH} +VCPKG_ENV_PASSTHROUGH_UNTRACKED=${VCPKG_ENV_PASSTHROUGH_UNTRACKED} +VCPKG_LOAD_VCVARS_ENV=${VCPKG_LOAD_VCVARS_ENV} +e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f +8c504940-be29-4cba-9f8f-6cd83e9d87b7") +endfunction() diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000000000..accea1a0d14dea --- /dev/null +++ b/shell.nix @@ -0,0 +1,46 @@ +{ pkgs ? import {}, withX11 ? false }: + +(pkgs.buildFHSUserEnv { + name = "vcpkg"; + targetPkgs = pkgs: (with pkgs; [ + autoconf + automake + cmake + gcc + gettext + glibc.dev + gperf + libtool + libxkbcommon.dev + m4 + ninja + pkgconfig + zip + zstd.dev + ] ++ pkgs.lib.optionals withX11 [ + freetds + libdrm.dev + libglvnd.dev + mesa_drivers + mesa_glu.dev + mesa.dev + xlibs.libxcb.dev + xlibs.xcbutilimage.dev + xlibs.xcbutilwm.dev + xlibs.xorgserver.dev + xorg.libpthreadstubs + xorg.libX11.dev + xorg.libxcb.dev + xorg.libXext.dev + xorg.libXi.dev + xorg.xcbproto + xorg.xcbutil.dev + xorg.xcbutilcursor.dev + xorg.xcbutilerrors + xorg.xcbutilkeysyms.dev + xorg.xcbutilrenderutil.dev + xorg.xcbutilwm.dev + xorg.xorgproto + ]); + runScript = "bash"; +}).env \ No newline at end of file diff --git a/toolsrc/.clang-format b/toolsrc/.clang-format deleted file mode 100644 index 4d2c34fc41c436..00000000000000 --- a/toolsrc/.clang-format +++ /dev/null @@ -1,34 +0,0 @@ ---- -BasedOnStyle: WebKit -Language: Cpp -Standard: Cpp11 - -UseTab: Never -IndentWidth: 4 -ColumnLimit: 120 -PointerAlignment: Left - -BreakBeforeBraces: Allman - -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: true -AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: true -AllowShortLoopsOnASingleLine: false -AlwaysBreakTemplateDeclarations: true -AlignAfterOpenBracket: true -AlignOperands: true -AlignTrailingComments: true -BinPackArguments: false -BinPackParameters: false -BreakBeforeBinaryOperators: None -BreakConstructorInitializersBeforeComma: true -ConstructorInitializerAllOnOneLineOrOnePerLine: true -Cpp11BracedListStyle: true -IndentCaseLabels: true -KeepEmptyLinesAtTheStartOfBlocks: false -NamespaceIndentation: All -ForEachMacros: [TEST_CASE, SECTION] -PenaltyReturnTypeOnItsOwnLine: 1000 -SpaceAfterTemplateKeyword: false -SpaceBeforeCpp11BracedList: false diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt deleted file mode 100644 index 7245179f20a288..00000000000000 --- a/toolsrc/CMakeLists.txt +++ /dev/null @@ -1,114 +0,0 @@ -cmake_minimum_required(VERSION 3.14) - -project(vcpkg C CXX) - -OPTION(BUILD_TESTING "Option for enabling testing" ON) -OPTION(VCPKG_BUILD_BENCHMARKING "Option for enabling benchmarking" OFF) -OPTION(DEFINE_DISABLE_METRICS "Option for disabling metrics" OFF) -OPTION(VCPKG_ALLOW_APPLE_CLANG "Option for allowing apple clang" OFF) - -if (DEFINE_DISABLE_METRICS) - set(DISABLE_METRICS_VALUE "1") -else() - set(DISABLE_METRICS_VALUE "0") -endif() - -if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") - set(GCC 1) -elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") - if(NOT VCPKG_ALLOW_APPLE_CLANG) - message(FATAL_ERROR -"Building the vcpkg tool requires support for the C++ Filesystem TS. -Apple clang versions 10.01 and below do not have support for it. -Please install gcc6 or newer from homebrew (brew install gcc6). -If you would like to try anyway, pass --allowAppleClang to bootstrap.sh.") - else() - set(CLANG 1) - endif() -elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") - set(CLANG 1) -elseif(MSVC) - add_compile_options(/FC) -else() - message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}") -endif() - -if(GCC OR (CLANG AND NOT MSVC)) - if(WERROR) - add_compile_options(-Wall -Wno-unknown-pragmas -Werror) - endif() -endif() - -if (DEFINE_DISABLE_METRICS) - set(DISABLE_METRICS_VALUE "1") -else() - set(DISABLE_METRICS_VALUE "0") -endif() - -file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) - -add_library(vcpkglib OBJECT ${VCPKGLIB_SOURCES}) -add_executable(vcpkg src/vcpkg.cpp $) - -target_compile_features(vcpkg PRIVATE cxx_std_17) -target_compile_definitions(vcpkg PRIVATE -DDISABLE_METRICS=${DISABLE_METRICS_VALUE}) -target_include_directories(vcpkg PRIVATE include) - -set(THREADS_PREFER_PTHREAD_FLAG ON) -find_package(Threads REQUIRED) - -add_definitions(-DDISABLE_METRICS=${DISABLE_METRICS_VALUE}) -include_directories(include) -link_libraries(Threads::Threads) - -if(CLANG) - include(CheckCXXSourceCompiles) - check_cxx_source_compiles("#include - int main() { return __GLIBCXX__; }" USES_LIBSTDCXX) - check_cxx_source_compiles("#include - int main() { return _LIBCPP_VERSION; }" USES_LIBCXX) - if ( NOT USES_LIBSTDCXX AND NOT USES_LIBCXX ) - message(FATAL_ERROR "Can't find which C++ runtime is in use") - endif() -endif() - -if(GCC OR (CLANG AND USES_LIBSTDCXX)) - target_link_libraries(vcpkg PRIVATE stdc++fs) -elseif(CLANG AND NOT MSVC) - target_link_libraries(vcpkg PRIVATE c++fs) -endif() - -if(GCC OR CLANG) - add_compile_options(-std=c++1z) - if(WERROR) - add_compile_options(-Wall -Wno-unknown-pragmas -Werror) - endif() -endif() - -if (BUILD_TESTING) - file(GLOB_RECURSE VCPKGTEST_SOURCES src/vcpkg-test/*.cpp) - - enable_testing() - add_executable(vcpkg-test - ${VCPKGTEST_SOURCES} - $) - - add_test(NAME default COMMAND vcpkg-test [${TEST_NAME}]) - - if (VCPKG_BUILD_BENCHMARKING) - target_compile_options(vcpkg-test PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING) - endif() -endif() - -if(MSVC) - get_target_property(_srcs vcpkg SOURCES) - - if(NOT CMAKE_GENERATOR MATCHES "Visual Studio .*") - set_property(SOURCE src/pch.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/pch.pch") - set_property(SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pch.pch") - endif() - - set_source_files_properties(src/pch.cpp PROPERTIES COMPILE_FLAGS "/Ycpch.h") - target_sources(vcpkg PRIVATE src/pch.cpp) - target_compile_options(vcpkg PRIVATE /Yupch.h /FIpch.h /Zm200) -endif() diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index d7d695c69cb795..275e5a6e071c4b 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"2019.07.18" +"9999.99.99" diff --git a/toolsrc/dirs.proj b/toolsrc/dirs.proj deleted file mode 100644 index 7729c989792961..00000000000000 --- a/toolsrc/dirs.proj +++ /dev/null @@ -1,20 +0,0 @@ - - - $(MSBuildThisFileDirectory) - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h deleted file mode 100644 index ce2a7c9c53cd16..00000000000000 --- a/toolsrc/include/pch.h +++ /dev/null @@ -1,61 +0,0 @@ -#pragma once - -#include - -#if defined(_WIN32) -#define NOMINMAX -#define WIN32_LEAN_AND_MEAN - -#pragma warning(suppress : 4768) -#include - -#pragma warning(suppress : 4768) -#include - -#include -#include -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if defined(_WIN32) -#include -#else -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/toolsrc/include/vcpkg-test/catch.h b/toolsrc/include/vcpkg-test/catch.h deleted file mode 100644 index 303f664ffc3b05..00000000000000 --- a/toolsrc/include/vcpkg-test/catch.h +++ /dev/null @@ -1,16865 +0,0 @@ -/* - * Catch v2.9.1 - * Generated: 2019-06-17 11:59:24.363643 - * ---------------------------------------------------------- - * This file has been merged from multiple headers. Please don't edit it directly - * Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved. - * - * Distributed under the Boost Software License, Version 1.0. (See accompanying - * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - */ -#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -// start catch.hpp - - -#define CATCH_VERSION_MAJOR 2 -#define CATCH_VERSION_MINOR 9 -#define CATCH_VERSION_PATCH 1 - -#ifdef __clang__ -# pragma clang system_header -#elif defined __GNUC__ -# pragma GCC system_header -#endif - -// start catch_suppress_warnings.h - -#ifdef __clang__ -# ifdef __ICC // icpc defines the __clang__ macro -# pragma warning(push) -# pragma warning(disable: 161 1682) -# else // __ICC -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wpadded" -# pragma clang diagnostic ignored "-Wswitch-enum" -# pragma clang diagnostic ignored "-Wcovered-switch-default" -# endif -#elif defined __GNUC__ - // Because REQUIREs trigger GCC's -Wparentheses, and because still - // supported version of g++ have only buggy support for _Pragmas, - // Wparentheses have to be suppressed globally. -# pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details - -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wunused-variable" -# pragma GCC diagnostic ignored "-Wpadded" -#endif -// end catch_suppress_warnings.h -#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) -# define CATCH_IMPL -# define CATCH_CONFIG_ALL_PARTS -#endif - -// In the impl file, we want to have access to all parts of the headers -// Can also be used to sanely support PCHs -#if defined(CATCH_CONFIG_ALL_PARTS) -# define CATCH_CONFIG_EXTERNAL_INTERFACES -# if defined(CATCH_CONFIG_DISABLE_MATCHERS) -# undef CATCH_CONFIG_DISABLE_MATCHERS -# endif -# if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) -# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER -# endif -#endif - -#if !defined(CATCH_CONFIG_IMPL_ONLY) -// start catch_platform.h - -#ifdef __APPLE__ -# include -# if TARGET_OS_OSX == 1 -# define CATCH_PLATFORM_MAC -# elif TARGET_OS_IPHONE == 1 -# define CATCH_PLATFORM_IPHONE -# endif - -#elif defined(linux) || defined(__linux) || defined(__linux__) -# define CATCH_PLATFORM_LINUX - -#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) -# define CATCH_PLATFORM_WINDOWS -#endif - -// end catch_platform.h - -#ifdef CATCH_IMPL -# ifndef CLARA_CONFIG_MAIN -# define CLARA_CONFIG_MAIN_NOT_DEFINED -# define CLARA_CONFIG_MAIN -# endif -#endif - -// start catch_user_interfaces.h - -namespace Catch { - unsigned int rngSeed(); -} - -// end catch_user_interfaces.h -// start catch_tag_alias_autoregistrar.h - -// start catch_common.h - -// start catch_compiler_capabilities.h - -// Detect a number of compiler features - by compiler -// The following features are defined: -// -// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? -// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? -// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? -// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled? -// **************** -// Note to maintainers: if new toggles are added please document them -// in configuration.md, too -// **************** - -// In general each macro has a _NO_ form -// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. -// Many features, at point of detection, define an _INTERNAL_ macro, so they -// can be combined, en-mass, with the _NO_ forms later. - -#ifdef __cplusplus - -# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) -# define CATCH_CPP14_OR_GREATER -# endif - -# if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) -# define CATCH_CPP17_OR_GREATER -# endif - -#endif - -#if defined(CATCH_CPP17_OR_GREATER) -# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -#endif - -#ifdef __clang__ - -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ - _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") -# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) -# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) -# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" ) -# define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -#endif // __clang__ - -//////////////////////////////////////////////////////////////////////////////// -// Assume that non-Windows platforms support posix signals by default -#if !defined(CATCH_PLATFORM_WINDOWS) - #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS -#endif - -//////////////////////////////////////////////////////////////////////////////// -// We know some environments not to support full POSIX signals -#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) - #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -#endif - -#ifdef __OS400__ -# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -# define CATCH_CONFIG_COLOUR_NONE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Android somehow still does not support std::to_string -#if defined(__ANDROID__) -# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Not all Windows environments support SEH properly -#if defined(__MINGW32__) -# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH -#endif - -//////////////////////////////////////////////////////////////////////////////// -// PS4 -#if defined(__ORBIS__) -# define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Cygwin -#ifdef __CYGWIN__ - -// Required for some versions of Cygwin to declare gettimeofday -// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin -# define _BSD_SOURCE -// some versions of cygwin (most) do not support std::to_string. Use the libstd check. -// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 -# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ - && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) - -# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING - -# endif -#endif // __CYGWIN__ - -//////////////////////////////////////////////////////////////////////////////// -// Visual C++ -#ifdef _MSC_VER - -# if _MSC_VER >= 1900 // Visual Studio 2015 or newer -# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -# endif - -// Universal Windows platform does not support SEH -// Or console colours (or console at all...) -# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -# define CATCH_CONFIG_COLOUR_NONE -# else -# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH -# endif - -// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ -// _MSVC_TRADITIONAL == 0 means new conformant preprocessor -// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor -# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) -# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -# endif -#endif // _MSC_VER - -#if defined(_REENTRANT) || defined(_MSC_VER) -// Enable async processing, as -pthread is specified or no additional linking is required -# define CATCH_INTERNAL_CONFIG_USE_ASYNC -#endif // _MSC_VER - -//////////////////////////////////////////////////////////////////////////////// -// Check if we are compiled with -fno-exceptions or equivalent -#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) -# define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED -#endif - -//////////////////////////////////////////////////////////////////////////////// -// DJGPP -#ifdef __DJGPP__ -# define CATCH_INTERNAL_CONFIG_NO_WCHAR -#endif // __DJGPP__ - -//////////////////////////////////////////////////////////////////////////////// -// Embarcadero C++Build -#if defined(__BORLANDC__) - #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN -#endif - -//////////////////////////////////////////////////////////////////////////////// - -// Use of __COUNTER__ is suppressed during code analysis in -// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly -// handled by it. -// Otherwise all supported compilers support COUNTER macro, -// but user still might want to turn it off -#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) - #define CATCH_INTERNAL_CONFIG_COUNTER -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Check if string_view is available and usable -// The check is split apart to work around v140 (VS2015) preprocessor issue... -#if defined(__has_include) -#if __has_include() && defined(CATCH_CPP17_OR_GREATER) -# define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW -#endif -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Check if optional is available and usable -#if defined(__has_include) -# if __has_include() && defined(CATCH_CPP17_OR_GREATER) -# define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL -# endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) -#endif // __has_include - -//////////////////////////////////////////////////////////////////////////////// -// Check if variant is available and usable -#if defined(__has_include) -# if __has_include() && defined(CATCH_CPP17_OR_GREATER) -# if defined(__clang__) && (__clang_major__ < 8) - // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 - // fix should be in clang 8, workaround in libstdc++ 8.2 -# include -# if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) -# define CATCH_CONFIG_NO_CPP17_VARIANT -# else -# define CATCH_INTERNAL_CONFIG_CPP17_VARIANT -# endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) -# else -# define CATCH_INTERNAL_CONFIG_CPP17_VARIANT -# endif // defined(__clang__) && (__clang_major__ < 8) -# endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) -#endif // __has_include - -#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) -# define CATCH_CONFIG_COUNTER -#endif -#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) -# define CATCH_CONFIG_WINDOWS_SEH -#endif -// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. -#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) -# define CATCH_CONFIG_POSIX_SIGNALS -#endif -// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions. -#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR) -# define CATCH_CONFIG_WCHAR -#endif - -#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) -# define CATCH_CONFIG_CPP11_TO_STRING -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) -# define CATCH_CONFIG_CPP17_OPTIONAL -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) -# define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) -# define CATCH_CONFIG_CPP17_STRING_VIEW -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) -# define CATCH_CONFIG_CPP17_VARIANT -#endif - -#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) -# define CATCH_INTERNAL_CONFIG_NEW_CAPTURE -#endif - -#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) -# define CATCH_CONFIG_NEW_CAPTURE -#endif - -#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) -# define CATCH_CONFIG_DISABLE_EXCEPTIONS -#endif - -#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) -# define CATCH_CONFIG_POLYFILL_ISNAN -#endif - -#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC) -# define CATCH_CONFIG_USE_ASYNC -#endif - -#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS -#endif - -#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) -#define CATCH_TRY if ((true)) -#define CATCH_CATCH_ALL if ((false)) -#define CATCH_CATCH_ANON(type) if ((false)) -#else -#define CATCH_TRY try -#define CATCH_CATCH_ALL catch (...) -#define CATCH_CATCH_ANON(type) catch (type) -#endif - -#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) -#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#endif - -// end catch_compiler_capabilities.h -#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line -#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) -#ifdef CATCH_CONFIG_COUNTER -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) -#else -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) -#endif - -#include -#include -#include - -// We need a dummy global operator<< so we can bring it into Catch namespace later -struct Catch_global_namespace_dummy {}; -std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); - -namespace Catch { - - struct CaseSensitive { enum Choice { - Yes, - No - }; }; - - class NonCopyable { - NonCopyable( NonCopyable const& ) = delete; - NonCopyable( NonCopyable && ) = delete; - NonCopyable& operator = ( NonCopyable const& ) = delete; - NonCopyable& operator = ( NonCopyable && ) = delete; - - protected: - NonCopyable(); - virtual ~NonCopyable(); - }; - - struct SourceLineInfo { - - SourceLineInfo() = delete; - SourceLineInfo( char const* _file, std::size_t _line ) noexcept - : file( _file ), - line( _line ) - {} - - SourceLineInfo( SourceLineInfo const& other ) = default; - SourceLineInfo& operator = ( SourceLineInfo const& ) = default; - SourceLineInfo( SourceLineInfo&& ) noexcept = default; - SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; - - bool empty() const noexcept; - bool operator == ( SourceLineInfo const& other ) const noexcept; - bool operator < ( SourceLineInfo const& other ) const noexcept; - - char const* file; - std::size_t line; - }; - - std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); - - // Bring in operator<< from global namespace into Catch namespace - // This is necessary because the overload of operator<< above makes - // lookup stop at namespace Catch - using ::operator<<; - - // Use this in variadic streaming macros to allow - // >> +StreamEndStop - // as well as - // >> stuff +StreamEndStop - struct StreamEndStop { - std::string operator+() const; - }; - template - T const& operator + ( T const& value, StreamEndStop ) { - return value; - } -} - -#define CATCH_INTERNAL_LINEINFO \ - ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) - -// end catch_common.h -namespace Catch { - - struct RegistrarForTagAliases { - RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); - }; - -} // end namespace Catch - -#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ - CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS - -// end catch_tag_alias_autoregistrar.h -// start catch_test_registry.h - -// start catch_interfaces_testcase.h - -#include - -namespace Catch { - - class TestSpec; - - struct ITestInvoker { - virtual void invoke () const = 0; - virtual ~ITestInvoker(); - }; - - class TestCase; - struct IConfig; - - struct ITestCaseRegistry { - virtual ~ITestCaseRegistry(); - virtual std::vector const& getAllTests() const = 0; - virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; - }; - - bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); - std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); - std::vector const& getAllTestCasesSorted( IConfig const& config ); - -} - -// end catch_interfaces_testcase.h -// start catch_stringref.h - -#include -#include -#include - -namespace Catch { - - /// A non-owning string class (similar to the forthcoming std::string_view) - /// Note that, because a StringRef may be a substring of another string, - /// it may not be null terminated. c_str() must return a null terminated - /// string, however, and so the StringRef will internally take ownership - /// (taking a copy), if necessary. In theory this ownership is not externally - /// visible - but it does mean (substring) StringRefs should not be shared between - /// threads. - class StringRef { - public: - using size_type = std::size_t; - - private: - friend struct StringRefTestAccess; - - char const* m_start; - size_type m_size; - - char* m_data = nullptr; - - void takeOwnership(); - - static constexpr char const* const s_empty = ""; - - public: // construction/ assignment - StringRef() noexcept - : StringRef( s_empty, 0 ) - {} - - StringRef( StringRef const& other ) noexcept - : m_start( other.m_start ), - m_size( other.m_size ) - {} - - StringRef( StringRef&& other ) noexcept - : m_start( other.m_start ), - m_size( other.m_size ), - m_data( other.m_data ) - { - other.m_data = nullptr; - } - - StringRef( char const* rawChars ) noexcept; - - StringRef( char const* rawChars, size_type size ) noexcept - : m_start( rawChars ), - m_size( size ) - {} - - StringRef( std::string const& stdString ) noexcept - : m_start( stdString.c_str() ), - m_size( stdString.size() ) - {} - - ~StringRef() noexcept { - delete[] m_data; - } - - auto operator = ( StringRef const &other ) noexcept -> StringRef& { - delete[] m_data; - m_data = nullptr; - m_start = other.m_start; - m_size = other.m_size; - return *this; - } - - operator std::string() const; - - void swap( StringRef& other ) noexcept; - - public: // operators - auto operator == ( StringRef const& other ) const noexcept -> bool; - auto operator != ( StringRef const& other ) const noexcept -> bool; - - auto operator[] ( size_type index ) const noexcept -> char; - - public: // named queries - auto empty() const noexcept -> bool { - return m_size == 0; - } - auto size() const noexcept -> size_type { - return m_size; - } - - auto numberOfCharacters() const noexcept -> size_type; - auto c_str() const -> char const*; - - public: // substrings and searches - auto substr( size_type start, size_type size ) const noexcept -> StringRef; - - // Returns the current start pointer. - // Note that the pointer can change when if the StringRef is a substring - auto currentData() const noexcept -> char const*; - - private: // ownership queries - may not be consistent between calls - auto isOwned() const noexcept -> bool; - auto isSubstring() const noexcept -> bool; - }; - - auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string; - auto operator + ( StringRef const& lhs, char const* rhs ) -> std::string; - auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string; - - auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&; - auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; - - inline auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { - return StringRef( rawChars, size ); - } - -} // namespace Catch - -inline auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { - return Catch::StringRef( rawChars, size ); -} - -// end catch_stringref.h -// start catch_type_traits.hpp - - -#include - -namespace Catch{ - -#ifdef CATCH_CPP17_OR_GREATER - template - inline constexpr auto is_unique = std::true_type{}; - - template - inline constexpr auto is_unique = std::bool_constant< - (!std::is_same_v && ...) && is_unique - >{}; -#else - -template -struct is_unique : std::true_type{}; - -template -struct is_unique : std::integral_constant -::value - && is_unique::value - && is_unique::value ->{}; - -#endif -} - -// end catch_type_traits.hpp -// start catch_preprocessor.hpp - - -#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ -#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) - -#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ -// MSVC needs more evaluations -#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) -#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) -#else -#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) -#endif - -#define CATCH_REC_END(...) -#define CATCH_REC_OUT - -#define CATCH_EMPTY() -#define CATCH_DEFER(id) id CATCH_EMPTY() - -#define CATCH_REC_GET_END2() 0, CATCH_REC_END -#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 -#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 -#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT -#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) -#define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) - -#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) - -#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) - -// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, -// and passes userdata as the first parameter to each invocation, -// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) -#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) - -#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) - -#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param) -#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__ -#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__ -#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF -#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) -#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ -#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) -#else -// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF -#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) -#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ -#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) -#endif - -#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__ -#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name) - -#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__) - -#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper()) -#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) -#else -#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper())) -#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) -#endif - -#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\ - CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__) - -#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0) -#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1) -#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2) -#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) -#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) -#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) -#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6) -#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) -#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) -#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) -#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) - -#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N - -#define INTERNAL_CATCH_TYPE_GEN\ - template struct TypeList {};\ - template\ - constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ - \ - template class L1, typename...E1, template class L2, typename...E2> \ - constexpr auto append(L1, L2) noexcept -> L1 { return {}; }\ - template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ - constexpr auto append(L1, L2, Rest...) noexcept -> decltype(append(L1{}, Rest{}...)) { return {}; }\ - template< template class L1, typename...E1, typename...Rest>\ - constexpr auto append(L1, TypeList, Rest...) noexcept -> L1 { return {}; }\ - \ - template< template class Container, template class List, typename...elems>\ - constexpr auto rewrap(List) noexcept -> TypeList> { return {}; }\ - template< template class Container, template class List, class...Elems, typename...Elements>\ - constexpr auto rewrap(List,Elements...) noexcept -> decltype(append(TypeList>{}, rewrap(Elements{}...))) { return {}; }\ - \ - template